import{aG as ae,g as z,am as J,L as re,w as N,aH as $,M as O,a0 as d,N as c,ak as le,a6 as R,H,O as G,ai as k,R as oe,J as _,aI as E,$ as D,aJ as j,aK as T,aL as U,aM as fe,aN as C,z as o,aO as ue,I as S,U as b,n as he,T as ce,aP as W,aQ as de,P as K,aR as _e,aS as pe,as as A,aT as ve,W as Q,aU as ge,aV as X,V as y,ah as I,aW as F,aX as M,aY as ye,au as be,an as me,aZ as Ee,a_ as B,a$ as Te,b0 as w,p as we,b1 as Z,aj as Re,b2 as Se,a as Ce,b3 as Ae,b4 as Ne,aF as ke,b5 as m,v as xe,b6 as De,ae as Oe,b7 as ee,aa as Fe,aC as Me,b8 as Pe,b9 as He,ba as Ie,bb as Le,bc as Ve,j as Ye}from"./DaF1Dxyz.js";function $e(t){let e=0,n=J(0),s;return()=>{ae()&&(z(n),re(()=>(e===0&&(s=N(()=>t(()=>$(n)))),e+=1,()=>{O(()=>{e-=1,e===0&&(s?.(),s=void 0,$(n))})})))}}var je=K|_e|pe;function Ue(t,e,n){new We(t,e,n)}class We{parent;#s=!1;#t;#p=c?d:null;#i;#u;#a;#n=null;#e=null;#r=null;#l=null;#h=0;#o=0;#c=!1;#f=null;#g=()=>{this.#f&&le(this.#f,this.#h)};#y=$e(()=>(this.#f=J(this.#h),()=>{this.#f=null}));constructor(e,n,s){this.#t=e,this.#i=n,this.#u=s,this.parent=R.b,this.#s=!!this.#i.pending,this.#a=H(()=>{if(R.b=this,c){const i=this.#p;G(),i.nodeType===k&&i.data===oe?this.#m():this.#b()}else{try{this.#n=_(()=>s(this.#t))}catch(i){this.error(i)}this.#o>0?this.#_():this.#s=!1}},je),c&&(this.#t=d)}#b(){try{this.#n=_(()=>this.#u(this.#t))}catch(e){this.error(e)}this.#s=!1}#m(){const e=this.#i.pending;e&&(this.#e=_(()=>e(this.#t)),E.enqueue(()=>{this.#n=this.#d(()=>(E.ensure(),_(()=>this.#u(this.#t)))),this.#o>0?this.#_():(D(this.#e,()=>{this.#e=null}),this.#s=!1)}))}is_pending(){return this.#s||!!this.parent&&this.parent.is_pending()}has_pending_snippet(){return!!this.#i.pending}#d(e){var n=R,s=C,i=o;j(this.#a),T(this.#a),U(this.#a.ctx);try{return e()}catch(a){return fe(a),null}finally{j(n),T(s),U(i)}}#_(){const e=this.#i.pending;this.#n!==null&&(this.#l=document.createDocumentFragment(),Be(this.#n,this.#l)),this.#e===null&&(this.#e=_(()=>e(this.#t)))}#v(e){if(!this.has_pending_snippet()){this.parent&&this.parent.#v(e);return}this.#o+=e,this.#o===0&&(this.#s=!1,this.#e&&D(this.#e,()=>{this.#e=null}),this.#l&&(this.#t.before(this.#l),this.#l=null),O(()=>{E.ensure().flush()}))}update_pending_count(e){this.#v(e),this.#h+=e,ue.add(this.#g)}get_effect_pending(){return this.#y(),z(this.#f)}error(e){var n=this.#i.onerror;let s=this.#i.failed;if(this.#c||!n&&!s)throw e;this.#n&&(S(this.#n),this.#n=null),this.#e&&(S(this.#e),this.#e=null),this.#r&&(S(this.#r),this.#r=null),c&&(b(this.#p),he(),b(ce()));var i=!1,a=!1;const r=()=>{if(i){ve();return}i=!0,a&&de(),E.ensure(),this.#h=0,this.#r!==null&&D(this.#r,()=>{this.#r=null}),this.#s=this.has_pending_snippet(),this.#n=this.#d(()=>(this.#c=!1,_(()=>this.#u(this.#t)))),this.#o>0?this.#_():this.#s=!1};var f=C;try{T(null),a=!0,n?.(e,r),a=!1}catch(p){W(p,this.#a&&this.#a.parent)}finally{T(f)}s&&O(()=>{this.#r=this.#d(()=>{this.#c=!0;try{return _(()=>{s(this.#t,()=>e,()=>r)})}catch(p){return W(p,this.#a.parent),null}finally{this.#c=!1}})})}}function Be(t,e){for(var n=t.nodes_start,s=t.nodes_end;n!==null;){var i=n===s?null:A(n);e.append(n),n=i}}const qe=["touchstart","touchmove"];function ze(t){return qe.includes(t)}let h;function Je(){h=void 0}function at(t){let e=null,n=c;var s;if(c){for(e=d,h===void 0&&(h=I(document.head));h!==null&&(h.nodeType!==k||h.data!==X);)h=A(h);h===null?y(!1):h=b(A(h))}c||(s=document.head.appendChild(Q()));try{H(()=>t(s),ge)}finally{n&&(y(!0),h=d,b(e))}}let q=!0;function rt(t,e){var n=e==null?"":typeof e=="object"?e+"":e;n!==(t.__t??=t.nodeValue)&&(t.__t=n,t.nodeValue=n+"")}function te(t,e){return ne(t,e)}function Ge(t,e){F(),e.intro=e.intro??!1;const n=e.target,s=c,i=d;try{for(var a=I(n);a&&(a.nodeType!==k||a.data!==X);)a=A(a);if(!a)throw M;y(!0),b(a);const r=ne(t,{...e,anchor:a});return y(!1),r}catch(r){if(r instanceof Error&&r.message.split(`
`).some(f=>f.startsWith("https://svelte.dev/e/")))throw r;return r!==M&&console.warn("Failed to hydrate: ",r),e.recover===!1&&ye(),F(),be(n),y(!1),te(t,e)}finally{y(s),b(i),Je()}}const g=new Map;function ne(t,{target:e,anchor:n,props:s={},events:i,context:a,intro:r=!0}){F();var f=new Set,p=v=>{for(var u=0;u<v.length;u++){var l=v[u];if(!f.has(l)){f.add(l);var V=ze(l);e.addEventListener(l,w,{passive:V});var Y=g.get(l);Y===void 0?(document.addEventListener(l,w,{passive:V}),g.set(l,1)):g.set(l,Y+1)}}};p(me(Ee)),B.add(p);var x=void 0,ie=Te(()=>{var v=n??e.appendChild(Q());return Ue(v,{pending:()=>{}},u=>{if(a){we({});var l=o;l.c=a}if(i&&(s.$$events=i),c&&Z(u,null),q=r,x=t(u,s)||{},q=!0,c&&(R.nodes_end=d,d===null||d.nodeType!==k||d.data!==Re))throw Se(),M;a&&Ce()}),()=>{for(var u of f){e.removeEventListener(u,w);var l=g.get(u);--l===0?(document.removeEventListener(u,w),g.delete(u)):g.set(u,l)}B.delete(p),v!==n&&v.parentNode?.removeChild(v)}});return P.set(x,ie),x}let P=new WeakMap;function Ke(t,e){const n=P.get(t);return n?(P.delete(t),n(e)):Promise.resolve()}function lt(t,e,...n){var s=t,i=ke,a;H(()=>{i!==(i=e())&&(a&&(S(a),a=null),a=_(()=>i(s,...n)))},K),c&&(s=d)}function Qe(t){return(e,...n)=>{var s=t(...n),i;if(c)i=d,G();else{var a=s.render().trim(),r=Ae(a);i=I(r),e.before(i)}const f=s.setup?.(i);Z(i,i),typeof f=="function"&&Ne(f)}}function Xe(){return C===null&&De(),(C.ac??=new AbortController).signal}function se(t){o===null&&m(),Fe&&o.l!==null?L(o).m.push(t):xe(()=>{const e=N(t);if(typeof e=="function")return e})}function Ze(t){o===null&&m(),se(()=>()=>N(t))}function et(t,e,{bubbles:n=!1,cancelable:s=!1}={}){return new CustomEvent(t,{detail:e,bubbles:n,cancelable:s})}function tt(){const t=o;return t===null&&m(),(e,n,s)=>{const i=t.s.$$events?.[e];if(i){const a=Oe(i)?i.slice():[i],r=et(e,n,s);for(const f of a)f.call(t.x,r);return!r.defaultPrevented}return!0}}function nt(t){o===null&&m(),o.l===null&&ee(),L(o).b.push(t)}function st(t){o===null&&m(),o.l===null&&ee(),L(o).a.push(t)}function L(t){var e=t.l;return e.u??={a:[],b:[],m:[]}}const ot=Object.freeze(Object.defineProperty({__proto__:null,afterUpdate:st,beforeUpdate:nt,createEventDispatcher:tt,createRawSnippet:Qe,flushSync:Me,getAbortSignal:Xe,getAllContexts:Pe,getContext:He,hasContext:Ie,hydrate:Ge,mount:te,onDestroy:Ze,onMount:se,setContext:Le,settled:Ve,tick:Ye,unmount:Ke,untrack:N},Symbol.toStringTag,{value:"Module"}));export{at as a,lt as b,Ze as c,q as d,$e as e,ot as f,Ge as h,te as m,se as o,rt as s,Ke as u};
