@pie-players/pie-section-player 0.3.75 → 1.0.0-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +845 -964
- package/custom-elements.json +3922 -0
- package/dist/browser/assets/{evaluation-worker-CORp9m0K.js → evaluation-worker-0xRDVTJx.js} +82215 -73234
- package/dist/browser/chunks/ToolCoordinator-0a6c4088.js +1 -0
- package/dist/browser/chunks/attribute-coercion-b93b482c.js +1 -0
- package/dist/browser/chunks/calculator-element-271c142f.js +8 -9
- package/dist/browser/chunks/catalog-context-46d3e50e.js +1 -1
- package/dist/browser/chunks/classPrivateFieldGet2-338e0179.js +1 -1
- package/dist/browser/chunks/classPrivateMethodInitSpec-563cd0a5.js +1 -0
- package/dist/browser/chunks/custom-element-define-2a92deb0.js +1 -0
- package/dist/browser/chunks/dist-41b39e7f.js +1 -1
- package/dist/browser/chunks/dist-ca9b9622.js +1 -1
- package/dist/browser/chunks/focus-trap-44913bf3.js +1 -1
- package/dist/browser/chunks/math-rendering-ready-9a0fd90a.js +1 -1
- package/dist/browser/chunks/mathjax-BKrHE4xs-3ca05bf6.js +1 -1
- package/dist/browser/chunks/nl-NL-364d61b9.js +1 -1
- package/dist/browser/chunks/nl-NL-8b7e6d4b.js +1 -1
- package/dist/browser/chunks/pie-api-client-687c319a.js +1 -1
- package/dist/browser/chunks/provider-4c704118.js +1 -1
- package/dist/browser/chunks/runtime-YFqnU6ic-d5c0cb49.js +8605 -0
- package/dist/browser/chunks/{src-BcptuNS5-ed25d7fd.js → src-D_1goyPT-8cca0246.js} +81 -82
- package/dist/browser/chunks/{sre-engine-jd8cc08x-42d270e5.js → sre-engine-bj997w4b-891a4cbe.js} +1 -1
- package/dist/browser/chunks/term-lookup-632cf6b1.js +1 -0
- package/dist/browser/chunks/tool-annotation-toolbar-997438b4.js +5 -5
- package/dist/browser/chunks/tool-answer-eliminator-35483abd.js +6 -6
- package/dist/browser/chunks/tool-color-scheme-b7de5cdf.js +5 -5
- package/dist/browser/chunks/tool-dictionary-cecff3b4.js +3 -3
- package/dist/browser/chunks/tool-graph-cb0338e8.js +6 -6
- package/dist/browser/chunks/tool-host-contract-fae1c415.js +1 -0
- package/dist/browser/chunks/tool-instance-id-76ac45e2.js +1 -0
- package/dist/browser/chunks/tool-line-reader-f8ef3c6a.js +3 -3
- package/dist/browser/chunks/tool-periodic-table-43b133b8.js +13 -16
- package/dist/browser/chunks/tool-picture-dictionary-33721e91.js +3 -3
- package/dist/browser/chunks/tool-protractor-23f77028.js +6 -6
- package/dist/browser/chunks/tool-ruler-1d9a03a6.js +12 -9
- package/dist/browser/chunks/tool-tts-inline-98c2ce7a.js +24 -30
- package/dist/browser/chunks/toolbar-registration-helpers-a7ab1ad4.js +194 -0
- package/dist/browser/chunks/versioned-tag-54a76be9.js +1 -1
- package/dist/browser/pie-section-player.js +66 -65
- package/dist/chunks/nl-NL-364d61b9.js +34 -6
- package/dist/chunks/{sre-engine-jd8cc08x-42d270e5.js → sre-engine-bj997w4b-891a4cbe.js} +1 -1
- package/dist/component-definitions.d.ts +0 -2
- package/dist/components/shared/card-media-region.d.ts +3 -4
- package/dist/components/shared/framework-error-latch.d.ts +4 -2
- package/dist/components/shared/missing-tool-providers.d.ts +0 -6
- package/dist/components/shared/player-preload.d.ts +4 -9
- package/dist/components/shared/section-player-card-context.d.ts +0 -3
- package/dist/components/shared/section-player-host-runtime.d.ts +0 -2
- package/dist/components/shared/section-player-view-state.d.ts +0 -1
- package/dist/controllers/SectionController.d.ts +20 -6
- package/dist/pie-section-player.js +11279 -11191
- package/package.json +11 -9
- package/dist/browser/chunks/ToolCoordinator-cc2dc319.js +0 -1
- package/dist/browser/chunks/runtime-wcU7KOFU-ac86d7b8.js +0 -8536
- package/dist/browser/chunks/tool-host-contract-b93b482c.js +0 -1
- package/dist/browser/chunks/tool-instance-id-2a92deb0.js +0 -1
- package/dist/browser/chunks/tts-runtime-config-a7ab1ad4.js +0 -194
- /package/dist/browser/chunks/{ItemToolBar-jx38w99s-58defccc.js → ItemToolBar-66hcwmfw-3bcb82a3.js} +0 -0
- /package/dist/chunks/{ItemToolBar-jx38w99s-1287ba31.js → ItemToolBar-66hcwmfw-1287ba31.js} +0 -0
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
if(typeof window<"u"){var gr,mr;((gr=(mr=window).__svelte??(mr.__svelte={})).v??(gr.v=new Set)).add("5")}var ce={},C=Symbol("uninitialized"),Ir=Array.isArray,Yi=Array.prototype.indexOf,An=Array.prototype.includes,mn=Array.from,rn=Object.keys,je=Object.defineProperty,Qt=Object.getOwnPropertyDescriptor,ts=Object.getOwnPropertyDescriptors,es=Object.prototype,ns=Array.prototype,Rr=Object.getPrototypeOf,yr=Object.isExtensible,rs=()=>{};function is(t){for(var e=0;e<t.length;e++)t[e]()}function Br(){var t,e;return{promise:new Promise((n,r)=>{t=n,e=r}),resolve:t,reject:e}}function Pe(t){"@babel/helpers - typeof";return Pe=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Pe(t)}function ss(t,e){if(Pe(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e||"default");if(Pe(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function os(t){var e=ss(t,"string");return Pe(e)=="symbol"?e:e+""}function T(t,e,n){return(e=os(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var tt=1024,ct=2048,ne=4096,Zn=8192,as=16384,Qn=32768,wr=1<<25,Xn=65536,ge=1<<19,ls=1<<20,Ee=1<<25,br=1<<21,us=1<<22,sn=1<<23,Ye=Symbol("$state"),Dr=Symbol("component"),Vr=Symbol("legacy props"),fs=Symbol(""),Nn=Symbol("attributes"),cs=Symbol("class"),hs=Symbol("style"),tn=Symbol("text"),Te=Symbol("form reset"),Re=new class extends Error{constructor(...t){super(...t),T(this,"name","StaleReactionError"),T(this,"message","The reaction that called `getAbortSignal()` was re-run or destroyed")}},vs=!!globalThis.document?.contentType&&globalThis.document.contentType.includes("xml");function ds(){console.warn("https://svelte.dev/e/derived_inert")}function yn(t){console.warn("https://svelte.dev/e/hydration_mismatch")}function ps(){console.warn("https://svelte.dev/e/svelte_boundary_reset_noop")}var E=!1;function Lt(t){E=t}var W;function J(t){if(t===null)throw yn(),ce;return W=t}function wn(){return J(St(W))}function gt(t){if(E){if(St(W)!==null)throw yn(),ce;W=t}}function gs(t=1){if(E){for(var e=t,n=W;e--;)n=St(n);W=n}}function on(t=!0){for(var e=0,n=W;;){if(n.nodeType===8){var r=n.data;if(r==="]"){if(e===0)return n;e-=1}else(r==="["||r==="[!"||r[0]==="["&&!isNaN(Number(r.slice(1))))&&(e+=1)}var i=St(n);t&&n.remove(),n=i}}function Hr(t){if(!t||t.nodeType!==8)throw yn(),ce;return t.data}function Fr(t){return t===this.v}function ms(t,e){return t!=t?e==e:t!==e||t!==null&&typeof t=="object"||typeof t=="function"}function Jr(t){return!ms(t,this.v)}function ys(){throw new Error("https://svelte.dev/e/async_derived_orphan")}function ws(t,e,n){throw new Error("https://svelte.dev/e/each_key_duplicate")}function bs(t){throw new Error("https://svelte.dev/e/effect_in_teardown")}function _s(){throw new Error("https://svelte.dev/e/effect_in_unowned_derived")}function $s(t){throw new Error("https://svelte.dev/e/effect_orphan")}function ks(){throw new Error("https://svelte.dev/e/effect_update_depth_exceeded")}function qs(){throw new Error("https://svelte.dev/e/hydration_failed")}function Ss(t){throw new Error("https://svelte.dev/e/props_invalid_value")}function xs(){throw new Error("https://svelte.dev/e/state_descriptors_fixed")}function Ms(){throw new Error("https://svelte.dev/e/state_prototype_fixed")}function Ws(){throw new Error("https://svelte.dev/e/state_unsafe_mutation")}function Es(){throw new Error("https://svelte.dev/e/svelte_boundary_reset_onerror")}var me=!1,bn=!1,I=null;function he(t){I=t}function Kr(t,e=!1,n){I={p:I,i:!1,c:null,e:null,s:t,x:null,r:q,l:bn&&!e?{s:null,u:null,$:[]}:null}}function Ur(t){var e=I,n=e.e;if(n!==null){e.e=null;for(var r of n)yi(r)}return t!==void 0&&(e.x=t),e.i=!0,I=e.p,Gr(t)}function Gr(t={}){return je(t,Dr,{value:!0}),t}function Be(){return!bn||I!==null&&I.l===null}var Ut=[];function Zr(){var t=Ut;Ut=[],is(t)}function kt(t){if(Ut.length===0&&!Le){var e=Ut;queueMicrotask(()=>{e===Ut&&Zr()})}Ut.push(t)}function Ts(){for(;Ut.length>0;)Zr()}var Ls=~(ct|ne|tt);function A(t,e){t.f=t.f&Ls|e}function Yn(t){(t.f&512)!==0||t.deps===null?A(t,tt):A(t,ne)}function Qr(t,e,n){(t.f&2048)!==0?e.add(t):t.f&4096&&n.add(t),A(t,tt)}var _r=!1;function Xr(){_r||(_r=!0,document.addEventListener("reset",t=>{Promise.resolve().then(()=>{if(!t.defaultPrevented)for(const e of t.target.elements)e[Te]?.()})},{capture:!0}))}function ye(t){var e=x,n=q;nt(null),qt(null);try{return t()}finally{nt(e),qt(n)}}function Os(t,e,n,r=n){t.addEventListener(e,()=>ye(n));const i=t[Te];i?t[Te]=()=>{i(),r(!0)}:t[Te]=()=>r(!0),Xr()}function js(t,e,n,r){const i=Be()?Ae:tr;var s=t.filter(h=>!h.settled),a=e.map(i);if(n.length===0&&s.length===0){r(a);return}var l=q,f=Ps(),u=s.length===1?s[0].promise:s.length>1?Promise.all(s.map(h=>h.promise)):null;function c(h){if((l.f&16384)===0){f();try{r([...a,...h])}catch(y){$t(y,l)}an()}}var v=Yr();if(n.length===0){u.then(()=>c([])).finally(v);return}function d(){Promise.all(n.map(h=>As(h))).then(c).catch(h=>$t(h,l)).finally(v)}u?u.then(()=>{f(),d(),an()}):d()}function Ps(){var t=q,e=x,n=I,r=$;return function(i=!0){qt(t),nt(e),he(n),i&&!(t.f&16384)&&(r?.activate(),r?.apply())}}function an(t=!0){qt(null),nt(null),he(null),t&&$?.deactivate()}function Yr(){var t=q,e=t.b,n=$,r=!!e?.is_rendered();return e?.update_pending_count(1,n),n.increment(r,t),()=>{e?.update_pending_count(-1,n),n.decrement(r,t)}}function Ae(t){var e=2|ct;return q!==null&&(q.f|=ge),{ctx:I,deps:null,effects:null,equals:Fr,f:e,fn:t,reactions:null,rv:0,v:C,wv:0,parent:q,ac:null}}var xe=Symbol("obsolete");function As(t,e,n){let r=q;r===null&&ys();var i=void 0,s=ee(C),a=!x,l=new Set;return Xs(()=>{var f=q,u=Br();i=u.promise;try{Promise.resolve(t()).then(u.resolve,h=>{h!==Re&&u.reject(h)}).finally(an)}catch(h){u.reject(h),an()}var c=$;if(a){if((f.f&32768)!==0)var v=Yr();if(r.b?.is_rendered())c.async_deriveds.get(f)?.reject(xe);else for(const h of l.values())h.reject(xe);l.add(u),c.async_deriveds.set(f,u)}const d=(h,y=void 0)=>{v?.(),l.delete(u),y!==xe&&(c.activate(),y?(s.f|=sn,de(s,y)):(s.f&8388608&&(s.f^=sn),de(s,h)),c.deactivate())};u.promise.then(d,h=>d(null,h||"unknown"))}),mi(()=>{for(const f of l)f.reject(xe)}),new Promise(f=>{function u(c){function v(){c===i?f(s):u(i)}c.then(v,v)}u(i)})}function $r(t){const e=Ae(t);return ki(e),e}function tr(t){const e=Ae(t);return e.equals=Jr,e}function Ns(t){var e=t.effects;if(e!==null){t.effects=null;for(var n=0;n<e.length;n+=1)V(e[n])}}function er(t){var e,n=q,r=t.parent;if(!jt&&r!==null&&t.v!==C&&(r.f&24576)!==0)return ds(),t.v;qt(r);try{Ns(t),e=Mi(t)}finally{qt(n)}return e}function ti(t){var e=er(t);if(!t.equals(e)&&(t.wv=Si(),(!$?.is_fork||t.deps===null)&&($!==null?($.capture(t,e,!0),ln?.capture(t,e,!0)):t.v=e,t.deps===null))){A(t,tt);return}jt||(D!==null?(sr()||$?.is_fork)&&D.set(t,e):Yn(t))}function Cs(t){if(t.effects!==null)for(const e of t.effects)(e.teardown||e.ac)&&(e.teardown?.(),e.ac!==null&&ye(()=>{e.ac.abort(Re),e.ac=null}),e.fn!==null&&(e.teardown=rs),Ce(e,0),lr(e))}function ei(t){if(t.effects!==null)for(const e of t.effects)e.teardown&&e.fn!==null&&pe(e)}function ni(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}function nr(t,e){ni(t,e),e.add(t)}function w(t,e,n){ni(t,e),e.set(t,n)}function k(t,e,n){if(typeof t=="function"?t===e:t.has(e))return arguments.length<3?e:n;throw new TypeError("Private element is not present on this object")}function g(t,e,n){return t.set(k(t,e),n),n}function o(t,e){return t.get(k(t,e))}var ri,Cn=null,se=null,$=null,ln=null,D=null,zn=null,Le=!1,qn=!1,Ne=null,un=null,ii=0,zs=1,In=new WeakMap,Xt=new WeakMap,ue=new WeakMap,fn=new WeakMap,Fe=new WeakMap,oe=new WeakMap,Jt=new WeakMap,Me=new WeakMap,wt=new WeakMap,kr=new WeakMap,ve=new WeakMap,Ot=new WeakMap,Rt=new WeakMap,Sn=new WeakMap,Je=new WeakMap,N=new WeakSet,re=class si{constructor(){nr(this,N),T(this,"id",zs++),w(this,In,!1),T(this,"linked",!0),w(this,Xt,null),w(this,ue,null),T(this,"async_deriveds",new Map),T(this,"current",new Map),T(this,"previous",new Map),w(this,fn,new Set),w(this,Fe,new Set),w(this,oe,0),w(this,Jt,new Map),w(this,Me,null),w(this,wt,[]),w(this,kr,[]),w(this,ve,new Set),w(this,Ot,new Set),w(this,Rt,new Map),w(this,Sn,new Set),T(this,"is_fork",!1),w(this,Je,!1),se===null?Cn=se=this:(g(ue,se,this),g(Xt,this,se)),se=this}skip_effect(e){o(Rt,this).has(e)||o(Rt,this).set(e,{d:[],m:[]}),o(Sn,this).delete(e)}unskip_effect(e,n=r=>this.schedule(r)){var r=o(Rt,this).get(e);if(r){o(Rt,this).delete(e);for(var i of r.d)A(i,ct),n(i);for(i of r.m)A(i,ne),n(i)}o(Sn,this).add(e)}capture(e,n,r=!1){e.v!==C&&!this.previous.has(e)&&this.previous.set(e,e.v),!(e.f&8388608)&&(this.current.set(e,[n,r]),D?.set(e,n)),this.is_fork||(e.v=n)}activate(){$=this}deactivate(){$=null,D=null}flush(){try{qn=!0,$=this,k(N,this,cn).call(this)}finally{ii=0,zn=null,Ne=null,un=null,qn=!1,$=null,D=null,_t.clear()}}discard(){for(const e of o(Fe,this))e(this);o(Fe,this).clear();for(const e of this.async_deriveds.values())e.reject(xe);k(N,this,hn).call(this),o(Me,this)?.resolve()}register_created_effect(e){o(kr,this).push(e)}increment(e,n){if(g(oe,this,o(oe,this)+1),e){let r=o(Jt,this).get(n)??0;o(Jt,this).set(n,r+1)}}decrement(e,n){if(g(oe,this,o(oe,this)-1),e){let r=o(Jt,this).get(n)??0;r===1?o(Jt,this).delete(n):o(Jt,this).set(n,r-1)}o(Je,this)||(g(Je,this,!0),kt(()=>{g(Je,this,!1),this.linked&&this.flush()}))}transfer_effects(e,n){for(const r of e)o(ve,this).add(r);for(const r of n)o(Ot,this).add(r);e.clear(),n.clear()}oncommit(e){o(fn,this).add(e)}ondiscard(e){o(Fe,this).add(e)}settled(){return(o(Me,this)??g(Me,this,Br())).promise}static ensure(){if($===null){const e=$=new si;!qn&&!Le&&kt(()=>{o(In,e)||e.flush()})}return $}apply(){if(!me||!this.is_fork&&o(Xt,this)===null&&o(ue,this)===null){D=null;return}D=new Map;for(const[n,[r]]of this.current)D.set(n,r);for(let n=Cn;n!==null;n=o(ue,n))if(!(n===this||n.is_fork)){var e=!1;if(n.id<this.id){for(const[r,[,i]]of n.current)if(!i&&this.current.has(r)){e=!0;break}}if(!e)for(const[r,i]of n.previous)D.has(r)||D.set(r,i)}}schedule(e){if(zn=e,e.b?.is_pending&&(e.f&16777228)!==0&&(e.f&32768)===0){e.b.defer_effect(e);return}o(wt,this).push(e)}};ri=re;function qr(){if(this.is_fork)return!0;for(const n of o(Jt,this).keys()){for(var t=n,e=!1;t.parent!==null;){if(o(Rt,this).has(t)){e=!0;break}t=t.parent}if(!e)return!0}return!1}function Is(){var t=[];for(const i of o(wt,this))if(!((i.f&16384)!==0||(i.f&6144)===0)){for(var e=i,n=!1;e.parent!==null;){e=e.parent;var r=e.f;if((r&96)!==0){if((r&1024)===0){n=!0;break}e.f^=tt}}n||t.push(e)}return g(wt,this,[]),t}function cn(){g(In,this,!0);for(const a of o(ve,this))o(Ot,this).delete(a),A(a,ct),this.schedule(a);for(const a of o(Ot,this))A(a,ne),this.schedule(a);this.apply();for(var t=Ne=[],e=[],n=un=[];o(wt,this).length>0;){ii++>1e3&&(k(N,this,hn).call(this),Vs());for(const a of k(N,this,Is).call(this))try{k(N,this,Rs).call(this,a,t,e)}catch(l){throw li(a),k(N,this,qr).call(this)||this.discard(),l}}if($=null,n.length>0){var r=ri.ensure();for(const a of n)r.schedule(a)}if(Ne=null,un=null,k(N,this,qr).call(this)){k(N,this,Ke).call(this,e),k(N,this,Ke).call(this,t);for(const[a,l]of o(Rt,this))ai(a,l);n.length>0&&k(N,$,cn).call($);return}const i=k(N,this,Bs).call(this);if(i){k(N,this,Ke).call(this,e),k(N,this,Ke).call(this,t),k(N,i,Ds).call(i,this);return}o(ve,this).clear(),o(Ot,this).clear();for(const a of o(fn,this))a(this);o(fn,this).clear(),ln=this,Sr(e),Sr(t),ln=null,o(Me,this)?.resolve();var s=$;if(o(oe,this)===0&&(o(wt,this).length===0||s!==null)&&k(N,this,hn).call(this),o(wt,this).length>0)if(s!==null){for(const a of o(wt,this))o(wt,s).push(a);g(wt,this,[])}else s=this;s!==null&&(_t.clear(),k(N,s,cn).call(s))}function Rs(t,e,n){t.f^=tt;for(var r=t.first;r!==null;){var i=r.f,s=(i&96)!==0;if(!(s&&(i&1024)!==0||(i&8192)!==0||o(Rt,this).has(r))&&r.fn!==null){s?r.f^=tt:(i&4)!==0?e.push(r):me&&(i&16777224)!==0?n.push(r):De(r)&&(i&16&&o(Ot,this).add(r),pe(r));var a=r.first;if(a!==null){r=a;continue}}for(;r!==null;){var l=r.next;if(l!==null){r=l;break}r=r.parent}}}function Bs(){for(var t=o(Xt,this);t!==null;){if(!t.is_fork){for(const[e,[,n]]of this.current)if(t.current.has(e)&&!n)return t}t=o(Xt,t)}return null}function Ds(t){for(const[n,r]of t.current)!this.previous.has(n)&&t.previous.has(n)&&this.previous.set(n,t.previous.get(n)),this.current.set(n,r);for(const[n,r]of t.async_deriveds){const i=this.async_deriveds.get(n);i&&r.promise.then(i.resolve).catch(i.reject)}t.async_deriveds.clear(),this.transfer_effects(o(ve,t),o(Ot,t));const e=n=>{var r=n.reactions;if(r!==null&&!((n.f&2)!==0&&(n.f&6144)===0))for(const a of r){var i=a.f;if((i&2)!==0)e(a);else{var s=a;i&4194320&&!this.async_deriveds.has(s)&&(o(Ot,this).delete(s),A(s,ct),this.schedule(s))}}};for(const n of this.current.keys())e(n);this.oncommit(()=>t.discard()),k(N,t,hn).call(t),$=this,k(N,this,cn).call(this)}function Ke(t){for(var e=0;e<t.length;e+=1)Qr(t[e],o(ve,this),o(Ot,this))}function hn(){if(this.linked){var t=o(Xt,this),e=o(ue,this);t===null?Cn=e:g(ue,t,e),e===null?se=t:g(Xt,e,t),this.linked=!1}}function st(t){var e=Le;Le=!0;try{var n;for(t&&($!==null&&!$.is_fork&&$.flush(),n=t());;){if(Ts(),$===null)return n;$.flush()}}finally{Le=e}}function Vs(){try{ks()}catch(t){$t(t,zn)}}var yt=null;function Sr(t){var e=t.length;if(e!==0){for(var n=0;n<e;){var r=t[n++];if((r.f&24576)===0&&De(r)&&(yt=new Set,pe(r),r.deps===null&&r.first===null&&r.nodes===null&&r.teardown===null&&r.ac===null&&bi(r),yt?.size>0)){_t.clear();for(const i of yt){if((i.f&24576)!==0)continue;const s=[i];let a=i.parent;for(;a!==null;)yt.has(a)&&(yt.delete(a),s.push(a)),a=a.parent;for(let l=s.length-1;l>=0;l--){const f=s[l];!(f.f&24576)&&pe(f)}}yt.clear()}}yt=null}}function oi(t){$.schedule(t)}function ai(t,e){if(!((t.f&32)!==0&&(t.f&1024)!==0)){(t.f&2048)!==0?e.d.push(t):t.f&4096&&e.m.push(t),A(t,tt);for(var n=t.first;n!==null;)ai(n,e),n=n.next}}function li(t){A(t,tt);for(var e=t.first;e!==null;)li(e),e=e.next}var vn=new Set,_t=new Map,ui=!1;function ee(t,e){return{f:0,v:t,reactions:null,equals:Fr,rv:0,wv:0}}function mt(t,e){const n=ee(t,e);return ki(n),n}function fi(t,e=!1,n=!0){const r=ee(t);if(e||(r.equals=Jr),bn&&n&&I!==null&&I.l!==null){var i;((i=I.l).s??(i.s=[])).push(r)}return r}function X(t,e,n=!1){return x!==null&&(!ot||x.f&131072)&&Be()&&x.f&4325394&&(lt===null||!lt.has(t))&&Ws(),de(t,n?Gt(e):e,un)}var Kt=null,Rn=0;function de(t,e,n=null){if(!t.equals(e)){jt?_t.set(t,e):_t.has(t)||_t.set(t,t.v);var r=re.ensure();if(r.capture(t,e),(t.f&2)!==0){const i=t;t.f&2048&&er(i),D===null&&Yn(i)}t.wv=Si(),Kt=null,Rn=0,ci(t,ct,n),Kt=null,Be()&&q!==null&&q.f&1024&&!(q.f&96)&&(Q===null?no([t]):Q.push(t)),!r.is_fork&&vn.size>0&&!ui&&Hs()}return e}function Hs(){ui=!1;for(const t of vn){t.f&1024&&A(t,ne);let e;try{e=De(t)}catch{e=!0}e&&pe(t)}vn.clear()}function Oe(t){X(t,t.v+1)}function ci(t,e,n){var r=t.reactions;if(r!==null){var i=Be(),s=r.length;if(Rn+=s,Rn>1e5&&Kt===null&&(Kt=new Set),Kt!==null){if(Kt.has(t))return;Kt.add(t)}for(var a=0;a<s;a++){var l=r[a],f=l.f;if(!(!i&&l===q)){var u=(f&ct)===0;if(u&&A(l,e),(f&131072)!==0)vn.add(l);else if((f&2)!==0){var c=l;D?.delete(c),ci(c,ne,n)}else if(u){var v=l;f&16&&yt!==null&&yt.add(v),n!==null?n.push(v):oi(v)}}}}}function Gt(t){if(typeof t!="object"||t===null||Ye in t||Dr in t)return t;const e=Rr(t);if(e!==es&&e!==ns)return t;var n=new Map,r=Ir(t),i=mt(0),s=null,a=Yt,l=f=>{if(Yt===a)return f();var u=x,c=Yt;nt(null),Er(a);var v=f();return nt(u),Er(c),v};return r&&n.set("length",mt(t.length,s)),new Proxy(t,{defineProperty(f,u,c){(!("value"in c)||c.configurable===!1||c.enumerable===!1||c.writable===!1)&&xs();var v=n.get(u);return v===void 0?l(()=>{var d=mt(c.value,s);return n.set(u,d),d}):X(v,c.value,!0),!0},deleteProperty(f,u){var c=n.get(u);if(c===void 0){if(u in f){const v=l(()=>mt(C,s));n.set(u,v),Oe(i)}}else X(c,C),Oe(i);return!0},get(f,u,c){if(u===Ye)return t;var v=n.get(u),d=u in f;if(v===void 0&&(!d||Qt(f,u)?.writable)&&(v=l(()=>mt(Gt(d?f[u]:C),s)),n.set(u,v)),v!==void 0){var h=_(v);return h===C?void 0:h}return Reflect.get(f,u,c)},getOwnPropertyDescriptor(f,u){this.has?.(f,u);var c=Reflect.getOwnPropertyDescriptor(f,u),v=n.get(u);if(v!==void 0){var d=_(v);if(d===C)return;if(c&&"value"in c)c.value=d;else return{enumerable:!0,configurable:!0,value:d,writable:!0}}return c},has(f,u){if(u===Ye)return!0;var c=n.get(u),v=c!==void 0&&c.v!==C||Reflect.has(f,u);return(c!==void 0||q!==null&&(!v||Qt(f,u)?.writable))&&(c===void 0&&(c=l(()=>mt(v?Gt(f[u]):C,s)),n.set(u,c)),_(c)===C)?!1:v},set(f,u,c,v){var d=n.get(u),h=u in f;if(r&&u==="length")for(var y=c;y<d.v;y+=1){var S=n.get(y+"");S!==void 0?X(S,C):y in f&&(S=l(()=>mt(C,s)),n.set(y+"",S))}if(d===void 0)(!h||Qt(f,u)?.writable)&&(d=l(()=>mt(void 0,s)),X(d,Gt(c)),n.set(u,d));else{h=d.v!==C;var p=l(()=>Gt(c));X(d,p)}var m=Reflect.getOwnPropertyDescriptor(f,u);if(m?.set&&m.set.call(v,c),!h){if(r&&typeof u=="string"){var O=n.get("length"),j=Number(u);Number.isInteger(j)&&j>=O.v&&X(O,j+1)}Oe(i)}return!0},ownKeys(f){_(i);var u=Reflect.ownKeys(f).filter(d=>{var h=n.get(d);return h===void 0||h.v!==C});for(var[c,v]of n)v.v!==C&&!(c in f)&&u.push(c);return u},setPrototypeOf(){Ms()}})}var xr,hi,vi,di;function Bn(){if(xr===void 0){xr=window,hi=/Firefox/.test(navigator.userAgent);var t=Element.prototype,e=Node.prototype,n=Text.prototype;vi=Qt(e,"firstChild").get,di=Qt(e,"nextSibling").get,yr(t)&&(t[cs]=void 0,t[Nn]=null,t[hs]=void 0,t.__e=void 0),yr(n)&&(n[tn]=void 0)}}function Y(t=""){return document.createTextNode(t)}function Dt(t){return vi.call(t)}function St(t){return di.call(t)}function It(t,e){if(!E)return Dt(t);var n=Dt(W);if(n===null)n=W.appendChild(Y());else if(e&&n.nodeType!==3){var r=Y();return n?.before(r),J(r),r}return e&&ir(n),J(n),n}function Fs(t,e=!1){if(!E){var n=Dt(t);return n instanceof Comment&&n.data===""?St(n):n}if(e){if(W?.nodeType!==3){var r=Y();return W?.before(r),J(r),r}ir(W)}return W}function At(t,e=!1){if(!E)return Dt(t);var n=It(t,e);return gt(t),n}function Nt(t,e=1,n=!1){let r=E?W:t;for(var i;e--;)i=r,r=St(r);if(!E)return r;if(n){if(r?.nodeType!==3){var s=Y();return r===null?i?.after(s):r.before(s),J(s),s}ir(r)}return J(r),r}function pi(t){t.textContent=""}function gi(){return!me||yt!==null?!1:(q.f&Qn)!==0}function rr(t,e,n){return e==null||e==="http://www.w3.org/1999/xhtml"?n?document.createElement(t,{is:n}):document.createElement(t):n?document.createElementNS(e,t,{is:n}):document.createElementNS(e,t)}function ir(t){if(t.nodeValue.length<65536)return;let e=t.nextSibling;for(;e!==null&&e.nodeType===3;)e.remove(),t.nodeValue+=e.nodeValue,e=t.nextSibling}function Js(t){var e=q;if(e===null)return x.f|=sn,t;if((e.f&32768)===0&&(e.f&4)===0)throw t;$t(t,e)}function $t(t,e){if(!(e!==null&&(e.f&16384)!==0)){for(;e!==null;){if((e.f&128)!==0&&(e.f&33570816)===0){if((e.f&32768)===0)throw t;try{e.b.error(t);return}catch(n){t=n}}e=e.parent}throw t}}function Ks(t){q===null&&(x===null&&$s(t),_s()),jt&&bs(t)}function Us(t,e){var n=e.last;n===null?e.last=e.first=t:(n.next=t,t.prev=n,e.last=t)}function xt(t,e){var n=q;n!==null&&n.f&8192&&(t|=Zn);var r={ctx:I,deps:null,nodes:null,f:t|ct|512,first:null,fn:e,last:null,next:null,parent:n,b:n&&n.b,prev:null,teardown:null,wv:0,ac:null};$?.register_created_effect(r);var i=r;if((t&4)!==0)Ne!==null?Ne.push(r):re.ensure().schedule(r);else if(e!==null){try{pe(r)}catch(a){throw V(r),a}i.deps===null&&i.teardown===null&&i.nodes===null&&i.first===i.last&&!(i.f&524288)&&(i=i.first,t&16&&t&65536&&i!==null&&(i.f|=Xn))}if(i!==null&&(i.parent=n,n!==null&&Us(i,n),x!==null&&(x.f&2)!==0&&(t&64)===0)){var s=x;(s.effects??(s.effects=[])).push(i)}return r}function sr(){return x!==null&&!ot}function mi(t){const e=xt(8,null);return A(e,tt),e.teardown=t,e}function Mr(t){Ks("$effect");var e=q.f;if(!x&&(e&32)!==0&&I!==null&&!I.i){var n=I;(n.e??(n.e=[])).push(t)}else return yi(t)}function yi(t){return xt(4|ls,t)}function Gs(t){re.ensure();const e=xt(64|ge,t);return()=>{V(e)}}function Zs(t){re.ensure();const e=xt(64|ge,t);return(n={})=>new Promise(r=>{n.outro?ie(e,()=>{V(e),r(void 0)}):(V(e),r(void 0))})}function Qs(t){return xt(4,t)}function Xs(t){return xt(us|ge,t)}function or(t,e=0){return xt(8|e,t)}function Mt(t,e=[],n=[],r=[]){js(r,e,n,i=>{xt(8,()=>{t(...i.map(_))})})}function ar(t,e=0){return xt(16|e,t)}function et(t){return xt(32|ge,t)}function wi(t){var e=t.teardown;if(e!==null){const n=jt,r=x;Wr(!0),nt(null);try{e.call(null)}catch(i){$t(i,t.parent)}finally{Wr(n),nt(r)}}}function lr(t,e=!1){var n=t.first;for(t.first=t.last=null;n!==null;){const i=n.ac;i!==null&&ye(()=>{i.abort(Re)});var r=n.next;(n.f&64)!==0?n.parent=null:V(n,e),n=r}}function Ys(t){for(var e=t.first;e!==null;){var n=e.next;!(e.f&32)&&V(e),e=n}}function V(t,e=!0){var n=!1;(e||t.f&262144)&&t.nodes!==null&&t.nodes.end!==null&&(to(t.nodes.start,t.nodes.end),n=!0),t.f|=wr,lr(t,e&&!n),Ce(t,0);var r=t.nodes&&t.nodes.t;if(r!==null)for(const s of r)s.stop();wi(t),t.f^=wr,t.f|=as;var i=t.parent;i!==null&&i.first!==null&&bi(t),t.next=t.prev=t.teardown=t.ctx=t.deps=t.fn=t.nodes=t.ac=t.b=null}function to(t,e){for(;t!==null;){var n=t===e?null:St(t);t.remove(),t=n}}function bi(t){var e=t.parent,n=t.prev,r=t.next;n!==null&&(n.next=r),r!==null&&(r.prev=n),e!==null&&(e.first===t&&(e.first=r),e.last===t&&(e.last=n))}function ie(t,e,n=!0){var r=[];t.f|=256,_i(t,r,!0);var i=()=>{n&&V(t),e&&e()},s=r.length;if(s>0){var a=()=>--s||i();for(var l of r)l.out(a)}else i()}function _i(t,e,n){if((t.f&8192)===0){t.f^=Zn;var r=t.nodes&&t.nodes.t;if(r!==null)for(const l of r)(l.is_global||n)&&e.push(l);for(var i=t.first;i!==null;){var s=i.next;if((i.f&64)===0){var a=(i.f&65536)!==0||(i.f&32)!==0&&(t.f&16)!==0;_i(i,e,a?n:!1)}i=s}}}function dn(t){t.f&=-257,$i(t,!0)}function $i(t,e){if((t.f&256)===0&&(t.f&8192)!==0){t.f^=Zn,!(t.f&1024)&&(A(t,ct),re.ensure().schedule(t));for(var n=t.first;n!==null;){var r=n.next,i=(n.f&65536)!==0||(n.f&32)!==0;$i(n,i?e:!1),n=r}var s=t.nodes&&t.nodes.t;if(s!==null)for(const a of s)(a.is_global||e)&&a.in()}}function ur(t,e){if(t.nodes)for(var n=t.nodes.start,r=t.nodes.end;n!==null;){var i=n===r?null:St(n);e.append(n),n=i}}var eo=null,en=!1,jt=!1;function Wr(t){jt=t}var x=null,ot=!1;function nt(t){x=t}var q=null;function qt(t){q=t}var lt=null;function ki(t){x!==null&&(x.f&2097152||x.f&2)&&(lt??(lt=new Set)).add(t)}var F=null,K=0,Q=null;function no(t){Q=t}var qi=1,Zt=0,Yt=Zt;function Er(t){Yt=t}function Si(){return++qi}function De(t){var e=t.f;if((e&2048)!==0)return!0;if((e&4096)!==0){for(var n=t.deps,r=n.length,i=0;i<r;i++){var s=n[i];if(De(s)&&ti(s),s.wv>t.wv)return!0}e&512&&D===null&&A(t,tt)}return!1}function xi(t,e,n=!0){var r=t.reactions;if(r!==null&&!(!me&<!==null&<.has(t)))for(var i=0;i<r.length;i++){var s=r[i];(s.f&2)!==0?xi(s,e,!1):e===s&&(n?A(s,ct):s.f&1024&&A(s,ne),oi(s))}}function Mi(t){var e=F,n=K,r=Q,i=x,s=lt,a=I,l=ot,f=Yt,u=t.f;F=null,K=0,Q=null,x=(u&96)===0?t:null,lt=null,he(t.ctx),ot=!1,Yt=++Zt,t.ac!==null&&(ye(()=>{t.ac.abort(Re)}),t.ac=null);try{t.f|=br;var c=t.fn,v=c();t.f|=Qn;var d=Tr(t);if(Be()&&Q!==null&&!ot&&d!==null&&(t.f&6146)===0)for(var h=0;h<Q.length;h++)xi(Q[h],t);if(i!==null&&i!==t){if(Zt++,i.deps!==null)for(let y=0;y<n;y+=1)i.deps[y].rv=Zt;if(e!==null)for(const y of e)y.rv=Zt;Q!==null&&(r===null?r=Q:r.push(...Q))}return t.f&8388608&&(t.f^=sn),v}catch(y){return Tr(t),Js(y)}finally{t.f^=br,F=e,K=n,Q=r,x=i,lt=s,he(a),ot=l,Yt=f}}function Tr(t){var e=t.deps,n=$?.is_fork;if(F!==null){var r;if(n||Ce(t,K),e!==null&&K>0)for(e.length=K+F.length,r=0;r<F.length;r++)e[K+r]=F[r];else t.deps=e=F;if(sr()&&(t.f&512)!==0)for(r=K;r<e.length;r++){var i;((i=e[r]).reactions??(i.reactions=[])).push(t)}}else!n&&e!==null&&K<e.length&&(Ce(t,K),e.length=K);return e}function ro(t,e){let n=e.reactions;if(n!==null){var r=Yi.call(n,t);if(r!==-1){var i=n.length-1;i===0?n=e.reactions=null:(n[r]=n[i],n.pop())}}if(n===null&&(e.f&2)!==0&&(F===null||!An.call(F,e))){var s=e;s.f&512&&(s.f^=512),s.v!==C&&Yn(s),s.ac!==null&&ye(()=>{s.ac.abort(Re),s.ac=null,A(s,ct)}),Cs(s),Ce(s,0)}}function Ce(t,e){var n=t.deps;if(n!==null)for(var r=e;r<n.length;r++)ro(t,n[r])}function pe(t){var e=t.f;if((e&16384)===0){A(t,tt);var n=q,r=en;q=t,en=(e&96)===0;try{(e&16777232)!==0?Ys(t):lr(t),wi(t);var i=Mi(t);t.teardown=typeof i=="function"?i:null,t.wv=qi}finally{en=r,q=n}}}async function io(){if(me)return new Promise(t=>{requestAnimationFrame(()=>t()),setTimeout(()=>t())});await Promise.resolve(),st()}function _(t){var e=(t.f&2)!==0;if(eo?.add(t),x!==null&&!ot&&!(q!==null&&(q.f&16384)!==0)&&(lt===null||!lt.has(t))){var n=x.deps;if((x.f&2097152)!==0)t.rv<Zt&&(t.rv=Zt,F===null&&n!==null&&n[K]===t?K++:F===null?F=[t]:F.push(t));else{var r;(r=x).deps??(r.deps=[]),An.call(x.deps,t)||x.deps.push(t);var i=t.reactions;i===null?t.reactions=[x]:An.call(i,x)||i.push(x)}}if(jt&&_t.has(t))return _t.get(t);if(e){var s=t;if(jt){var a=s.v;return(!(s.f&1024)&&s.reactions!==null||Ei(s))&&(a=er(s)),_t.set(s,a),a}var l=(s.f&512)===0&&!ot&&x!==null&&(en||(x.f&512)!==0),f=(s.f&Qn)===0;De(s)&&(l&&(s.f|=512),ti(s)),l&&!f&&(ei(s),Wi(s))}if(D?.has(t))return D.get(t);if((t.f&8388608)!==0)throw t.v;return t.v}function Wi(t){if(t.f|=512,t.deps!==null)for(const e of t.deps)(e.reactions??(e.reactions=[])).push(t),e.f&2&&!(e.f&512)&&(ei(e),Wi(e))}function Ei(t){if(t.v===C)return!0;if(t.deps===null)return!1;for(const e of t.deps)if(_t.has(e)||(e.f&2)!==0&&Ei(e))return!0;return!1}function ze(t){var e=ot;try{return ot=!0,t()}finally{ot=e}}var Ue=Symbol("events"),so=new Set,Lr=new Set;function oo(t,e,n,r={}){function i(s){if(r.capture||Dn.call(e,s),!s.cancelBubble)return ye(()=>n?.call(this,s))}return t.startsWith("pointer")||t.startsWith("touch")||t==="wheel"?(i.__removed=!1,kt(()=>{i.__removed||e.addEventListener(t,i,r)})):e.addEventListener(t,i,r),i}function ao(t,e,n,r,i){var s={capture:r,passive:i},a=oo(t,e,n,s);(e===document.body||e===window||e===document||e instanceof HTMLMediaElement)&&mi(()=>{a.__removed=!0,e.removeEventListener(t,a,s)})}var xn=null,Mn=!1;function Dn(t){var e=this,n=e.ownerDocument,r=t.type,i=t.composedPath?.()||[],s=i[0]||t.target;xn=t,Mn||(Mn=!0,setTimeout(()=>{Mn=!1,xn=null}));var a=0,l=xn===t&&t[Ue];if(l){var f=i.indexOf(l);if(f!==-1&&(e===document||e===window)){t[Ue]=e;return}var u=i.indexOf(e);if(u===-1)return;f<=u&&(a=f)}if(s=i[a]||t.target,s!==e){je(t,"currentTarget",{configurable:!0,get(){return s||n}});var c=x,v=q;nt(null),qt(null);try{for(var d,h=[];s!==null&&s!==e;){try{var y=s[Ue]?.[r];y!=null&&(!s.disabled||t.target===s)&&y.call(s,t)}catch(S){d?h.push(S):d=S}if(t.cancelBubble)break;a++,s=a<i.length?i[a]:null}if(d){for(let S of h)queueMicrotask(()=>{throw S});throw d}}finally{t[Ue]=e,delete t.currentTarget,nt(c),qt(v)}}}var lo=globalThis?.window?.trustedTypes&&globalThis.window.trustedTypes.createPolicy("svelte-trusted-html",{createHTML:t=>t});function uo(t){return lo?.createHTML(t)??t}function fo(t){var e=rr("template");return e.innerHTML=uo(t.replaceAll("<!>","<!---->")),e.content}function fe(t,e){var n=q;n.nodes===null&&(n.nodes={start:t,end:e,a:null,t:null})}function ht(t,e){var n=(e&1)!==0,r=(e&2)!==0,i,s=!t.startsWith("<!>");return()=>{if(E)return fe(W,null),W;i===void 0&&(i=fo(s?t:"<!>"+t),n||(i=Dt(i)));var a=r||hi?document.importNode(i,!0):i.cloneNode(!0);if(n){var l=Dt(a),f=a.lastChild;fe(l,f)}else fe(a,a);return a}}function co(){if(E)return fe(W,null),W;var t=document.createDocumentFragment(),e=document.createComment(""),n=Y();return t.append(e,n),fe(e,n),t}function H(t,e){if(E){var n=q;(!(n.f&32768)||n.nodes.end===null)&&(n.nodes.end=W),wn();return}t!==null&&t.before(e)}var ho=["touchstart","touchmove"];function vo(t){return ho.includes(t)}function po(t){let e=0,n=ee(0),r;return()=>{sr()&&(_(n),or(()=>(e===0&&(r=ze(()=>t(()=>Oe(n)))),e+=1,()=>{kt(()=>{e-=1,e===0&&(r?.(),r=void 0,Oe(n))})})))}}var go=Xn|ge;function mo(t,e,n,r){new yo(t,e,n,r)}var ut=new WeakMap,Vn=new WeakMap,bt=new WeakMap,Ie=new WeakMap,U=new WeakMap,ft=new WeakMap,G=new WeakMap,at=new WeakMap,Bt=new WeakMap,ae=new WeakMap,te=new WeakMap,Ge=new WeakMap,Hn=new WeakMap,Fn=new WeakMap,Ht=new WeakMap,Or=new WeakMap,z=new WeakSet,yo=class{constructor(t,e,n,r){nr(this,z),T(this,"parent",void 0),T(this,"is_pending",!1),T(this,"transform_error",void 0),w(this,ut,void 0),w(this,Vn,E?W:null),w(this,bt,void 0),w(this,Ie,void 0),w(this,U,void 0),w(this,ft,null),w(this,G,null),w(this,at,null),w(this,Bt,null),w(this,ae,0),w(this,te,0),w(this,Ge,!1),w(this,Hn,new Set),w(this,Fn,new Set),w(this,Ht,null),w(this,Or,po(()=>(g(Ht,this,ee(o(ae,this))),()=>{g(Ht,this,null)}))),g(ut,this,t),g(bt,this,e),g(Ie,this,i=>{var s=q;s.b=this,s.f|=128,n(i)}),this.parent=q.b,this.transform_error=r??this.parent?.transform_error??(i=>i),g(U,this,ar(()=>{if(E){const i=o(Vn,this);wn();const s=i.data==="[!";if(i.data.startsWith("[?")){const a=JSON.parse(i.data.slice(2));k(z,this,bo).call(this,a)}else s?k(z,this,_o).call(this):k(z,this,wo).call(this)}else k(z,this,Li).call(this)},go)),E&&g(ut,this,W)}defer_effect(t){Qr(t,o(Hn,this),o(Fn,this))}is_rendered(){return!this.is_pending&&(!this.parent||this.parent.is_rendered())}has_pending_snippet(){return!!o(bt,this).pending}update_pending_count(t,e){k(z,this,Oi).call(this,t,e),g(ae,this,o(ae,this)+t),o(Ht,this)&&!o(Ge,this)&&(g(Ge,this,!0),kt(()=>{g(Ge,this,!1),o(Ht,this)&&de(o(Ht,this),o(ae,this))}))}get_effect_pending(){return o(Or,this).call(this),_(o(Ht,this))}error(t){if(!o(bt,this).onerror&&!o(bt,this).failed)throw t;$?.is_fork?(o(ft,this)&&$.skip_effect(o(ft,this)),o(G,this)&&$.skip_effect(o(G,this)),o(at,this)&&$.skip_effect(o(at,this)),$.oncommit(()=>{k(z,this,jr).call(this,t)})):k(z,this,jr).call(this,t)}};function wo(){try{g(ft,this,et(()=>o(Ie,this).call(this,o(ut,this))))}catch(t){this.error(t)}}function bo(t){const e=o(bt,this).failed,{reset:n,invoke_onerror:r}=k(z,this,Ti).call(this,t);kt(r),e&&g(at,this,et(()=>{e(o(ut,this),()=>t,()=>n)}))}function Ti(t){var e=!1,n=!1;const r=()=>{if(e){ps();return}e=!0,n&&Es(),o(at,this)!==null&&ie(o(at,this),()=>{g(at,this,null)}),k(z,this,fr).call(this,()=>{k(z,this,Li).call(this)})};return{reset:r,invoke_onerror:()=>{try{n=!0,o(bt,this).onerror?.(t,r),n=!1}catch(i){$t(i,o(U,this)&&o(U,this).parent)}}}}function _o(){const t=o(bt,this).pending;t&&(this.is_pending=!0,g(G,this,et(()=>t(o(ut,this)))),kt(()=>{var e=g(Bt,this,document.createDocumentFragment()),n=Y(),r=!1;if(e.append(n),g(ft,this,k(z,this,fr).call(this,()=>{try{return et(()=>o(Ie,this).call(this,n))}catch(i){try{this.error(i),r=!0}catch(s){$t(s,o(U,this).parent)}return null}})),o(ft,this)===null){g(Bt,this,null),r&&k(z,this,pn).call(this,$);return}o(te,this)===0&&(o(ut,this).before(e),g(Bt,this,null),ie(o(G,this),()=>{g(G,this,null)}),k(z,this,pn).call(this,$))}))}function Li(){try{if(this.is_pending=this.has_pending_snippet(),g(te,this,0),g(ae,this,0),g(ft,this,et(()=>{o(Ie,this).call(this,o(ut,this))})),o(te,this)>0){var t=g(Bt,this,document.createDocumentFragment());ur(o(ft,this),t);const e=o(bt,this).pending;g(G,this,et(()=>e(o(ut,this))))}else k(z,this,pn).call(this,$)}catch(e){this.error(e)}}function pn(t){this.is_pending=!1,t.transfer_effects(o(Hn,this),o(Fn,this))}function fr(t){var e=q,n=x,r=I;qt(o(U,this)),nt(o(U,this)),he(o(U,this).ctx);try{return re.ensure(),t()}finally{qt(e),nt(n),he(r)}}function Oi(t,e){if(!this.has_pending_snippet()){if(this.parent){var n;k(z,n=this.parent,Oi).call(n,t,e)}return}g(te,this,o(te,this)+t),o(te,this)===0&&(k(z,this,pn).call(this,e),o(G,this)&&ie(o(G,this),()=>{g(G,this,null)}),o(Bt,this)&&(o(ut,this).before(o(Bt,this)),g(Bt,this,null)))}function jr(t){o(ft,this)&&(V(o(ft,this)),g(ft,this,null)),o(G,this)&&(V(o(G,this)),g(G,this,null)),o(at,this)&&(V(o(at,this)),g(at,this,null)),E&&(J(o(Vn,this)),gs(),J(on()));let e=o(bt,this).failed;const n=r=>{const{reset:i,invoke_onerror:s}=k(z,this,Ti).call(this,r);s(),e&&g(at,this,k(z,this,fr).call(this,()=>{try{return et(()=>{var a=q;a.b=this,a.f|=128,e(o(ut,this),()=>r,()=>i)})}catch(a){return $t(a,o(U,this).parent),null}}))};kt(()=>{var r;try{r=this.transform_error(t)}catch(i){$t(i,o(U,this)&&o(U,this).parent);return}r!==null&&typeof r=="object"&&typeof r.then=="function"?r.then(n,i=>$t(i,o(U,this)&&o(U,this).parent)):n(r)})}function Wt(t,e){var n=e==null?"":typeof e=="object"?`${e}`:e;n!==(t[tn]??(t[tn]=t.nodeValue))&&(t[tn]=n,t.nodeValue=`${n}`)}function ji(t,e){return Pi(t,e)}function $o(t,e){Bn(),e.intro=e.intro??!1;const n=e.target,r=E,i=W;try{for(var s=Dt(n);s&&(s.nodeType!==8||s.data!=="[");)s=St(s);if(!s)throw ce;Lt(!0),J(s);const a=Pi(t,{...e,anchor:s});return Lt(!1),a}catch(a){if(a instanceof Error&&a.message.split(`
|
|
2
|
-
`).some(l=>l.startsWith("https://svelte.dev/e/")))throw a;return a!==ce&&console.warn("Failed to hydrate: ",a),e.recover===!1&&qs(),Bn(),pi(n),Lt(!1),ji(t,e)}finally{Lt(r),J(i)}}var Ze=new Map;function Pi(t,{target:e,anchor:n,props:r={},events:i,context:s,intro:a=!0,transformError:l}){Bn();var f=void 0,u=Zs(()=>{var c=n??e.appendChild(Y());mo(c,{pending:()=>{}},h=>{Kr({});var y=I;if(s&&(y.c=s),i&&(r.$$events=i),E&&fe(h,null),f=t(h,r)||Gr(),E&&(q.nodes.end=W,W===null||W.nodeType!==8||W.data!=="]"))throw yn(),ce;Ur()},l);var v=new Set,d=h=>{for(var y=0;y<h.length;y++){var S=h[y];if(!v.has(S)){v.add(S);var p=vo(S);for(const j of[e,document]){var m=Ze.get(j);m===void 0&&(m=new Map,Ze.set(j,m));var O=m.get(S);O===void 0?(j.addEventListener(S,Dn,{passive:p}),m.set(S,1)):m.set(S,O+1)}}}};return d(mn(so)),Lr.add(d),()=>{for(var h of v)for(const p of[e,document]){var y=Ze.get(p),S=y.get(h);--S==0?(p.removeEventListener(h,Dn),y.delete(h),y.size===0&&Ze.delete(p)):y.set(h,S)}Lr.delete(d),c!==n&&c.parentNode?.removeChild(c)}});return Jn.set(f,u),f}var Jn=new WeakMap;function ko(t,e){const n=Jn.get(t);return n?(Jn.delete(t),n(e)):Promise.resolve()}var Et=new WeakMap,Ct=new WeakMap,it=new WeakMap,$e=new WeakMap,Wn=new WeakMap,En=new WeakMap,Pr=new WeakMap,qo=class{constructor(t,e=!0){T(this,"anchor",void 0),w(this,Et,new Map),w(this,Ct,new Map),w(this,it,new Map),w(this,$e,new Set),w(this,Wn,!0),w(this,En,n=>{if(o(Et,this).has(n)){var r=o(Et,this).get(n),i=o(Ct,this).get(r);if(i)dn(i),o($e,this).delete(r);else{var s=o(it,this).get(r);s&&(dn(s.effect),o(Ct,this).set(r,s.effect),o(it,this).delete(r),s.fragment.lastChild.remove(),this.anchor.before(s.fragment),i=s.effect)}for(const[a,l]of o(Et,this)){if(o(Et,this).delete(a),a===n)break;const f=o(it,this).get(l);f&&(V(f.effect),o(it,this).delete(l))}for(const[a,l]of o(Ct,this)){if(a===r||o($e,this).has(a))continue;const f=()=>{if(Array.from(o(Et,this).values()).includes(a)){var u=document.createDocumentFragment();ur(l,u),u.append(Y()),o(it,this).set(a,{effect:l,fragment:u})}else V(l);o($e,this).delete(a),o(Ct,this).delete(a)};o(Wn,this)||!i?(o($e,this).add(a),ie(l,f,!1)):f()}}}),w(this,Pr,n=>{o(Et,this).delete(n);const r=Array.from(o(Et,this).values());for(const[i,s]of o(it,this))r.includes(i)||(V(s.effect),o(it,this).delete(i))}),this.anchor=t,g(Wn,this,e)}ensure(t,e){var n=$,r=gi();if(e&&!o(Ct,this).has(t)&&!o(it,this).has(t))if(r){var i=document.createDocumentFragment(),s=Y();i.append(s),o(it,this).set(t,{effect:et(()=>e(s)),fragment:i})}else o(Ct,this).set(t,et(()=>e(this.anchor)));if(o(Et,this).set(n,t),r){for(const[a,l]of o(Ct,this))a===t?n.unskip_effect(l):n.skip_effect(l);for(const[a,l]of o(it,this))a===t?n.unskip_effect(l.effect):n.skip_effect(l.effect);n.oncommit(o(En,this)),n.ondiscard(o(Pr,this))}else E&&(this.anchor=W),o(En,this).call(this,n)}};function ke(t,e,n=!1){var r;E&&(r=W,wn());var i=new qo(t),s=n?Xn:0;function a(l,f){if(E){var u=Hr(r);if(l!==parseInt(u.substring(1))){var c=on();J(c),i.anchor=c,Lt(!1),i.ensure(l,f),Lt(!0);return}}i.ensure(l,f)}ar(()=>{var l=!1;e((f,u=0)=>{l=!0,a(u,f)}),l||a(-1,null)},s)}function So(t,e){return e}function xo(t,e,n){for(var r=[],i=e.length,s,a=e.length,l=0;l<i;l++){let v=e[l];ie(v,()=>{if(s){if(s.pending.delete(v),s.done.add(v),s.pending.size===0){var d=t.outrogroups;Kn(t,mn(s.done)),d.delete(s),d.size===0&&(t.outrogroups=null)}}else a-=1},!1)}if(a===0){var f=r.length===0&&n!==null&&t.pending.size===0;if(f){var u=n,c=u.parentNode;pi(c),c.append(u),t.items.clear()}Kn(t,e,!f)}else s={pending:new Set(e),done:new Set},(t.outrogroups??(t.outrogroups=new Set)).add(s)}function Kn(t,e,n=!0){var r;if(t.pending.size>0){r=new Set;for(const a of t.pending.values())for(const l of a)r.add(t.items.get(l).e)}for(var i=0;i<e.length;i++){var s=e[i];r?.has(s)?(s.f|=Ee,ur(s,document.createDocumentFragment())):V(e[i],n)}}var Qe;function Ar(t,e,n,r,i,s=null){var a=t,l=new Map;if((e&4)!==0){var f=t;a=E?J(Dt(f)):f.appendChild(Y())}E&&wn();var u=null,c=tr(()=>{var m=n();return Ir(m)?m:m==null?[]:mn(m)}),v,d=new Map,h=!0;function y(m){!(p.effect.f&16384)&&(p.pending.delete(m),p.fallback=u,Mo(p,v,a,e,r),u!==null&&(v.length===0?(u.f&33554432)===0?dn(u):(u.f^=Ee,We(u,null,a)):ie(u,()=>{u=null})))}function S(m){p.pending.delete(m)}var p={effect:ar(()=>{v=_(c);var m=v.length;let O=!1;E&&Hr(a)==="[!"!=(m===0)&&(a=on(),J(a),Lt(!1),O=!0);for(var j=new Set,M=$,b=gi(),P=0;P<m;P+=1){E&&W.nodeType===8&&W.data==="]"&&(a=W,O=!0,Lt(!1));var R=v[P],rt=r(R,P),B=h?null:l.get(rt);B?(B.v&&de(B.v,R),B.i&&de(B.i,P),b&&M.unskip_effect(B.e)):(B=Wo(l,h?a:Qe??(Qe=Y()),R,rt,P,i,e,n),h||(B.e.f|=Ee),l.set(rt,B)),j.add(rt)}if(m===0&&s&&!u&&(h?u=et(()=>s(a)):(u=et(()=>s(Qe??(Qe=Y()))),u.f|=Ee)),m>j.size&&ws("","",""),E&&m>0&&J(on()),!h)if(d.set(M,j),b){for(const[vt,Ve]of l)j.has(vt)||M.skip_effect(Ve.e);M.oncommit(y),M.ondiscard(S)}else y(M);O&&Lt(!0),_(c)}),flags:e,items:l,pending:d,outrogroups:null,fallback:u};h=!1,E&&(a=W)}function qe(t){for(;t!==null&&(t.f&32)===0;)t=t.next;return t}function Mo(t,e,n,r,i){var s=(r&8)!==0,a=e.length,l=t.items,f=qe(t.effect.first),u,c=null,v,d=[],h=[],y,S,p,m;if(s)for(m=0;m<a;m+=1)y=e[m],S=i(y,m),p=l.get(S).e,!(p.f&33554432)&&(p.nodes?.a?.measure(),(v??(v=new Set)).add(p));for(m=0;m<a;m+=1){if(y=e[m],S=i(y,m),p=l.get(S).e,t.outrogroups!==null)for(const vt of t.outrogroups)vt.pending.delete(p),vt.done.delete(p);if(p.f&8192&&(dn(p),s&&(p.nodes?.a?.unfix(),(v??(v=new Set)).delete(p))),(p.f&33554432)!==0)if(p.f^=Ee,p===f)We(p,null,n);else{var O=c?c.next:f;p===t.effect.last&&(t.effect.last=p.prev),p.prev&&(p.prev.next=p.next),p.next&&(p.next.prev=p.prev),zt(t,c,p),zt(t,p,O),We(p,O,n),c=p,d=[],h=[],f=qe(c.next);continue}if(p!==f){if(u!==void 0&&u.has(p)){if(d.length<h.length){var j=h[0],M;c=j.prev;var b=d[0],P=d[d.length-1];for(M=0;M<d.length;M+=1)We(d[M],j,n);for(M=0;M<h.length;M+=1)u.delete(h[M]);zt(t,b.prev,P.next),zt(t,c,b),zt(t,P,j),f=j,c=P,m-=1,d=[],h=[]}else u.delete(p),We(p,f,n),zt(t,p.prev,p.next),zt(t,p,c===null?t.effect.first:c.next),zt(t,c,p),c=p;continue}for(d=[],h=[];f!==null&&f!==p;)(u??(u=new Set)).add(f),h.push(f),f=qe(f.next);if(f===null)continue}!(p.f&33554432)&&d.push(p),c=p,f=qe(p.next)}if(t.outrogroups!==null){for(const vt of t.outrogroups)vt.pending.size===0&&(Kn(t,mn(vt.done)),t.outrogroups?.delete(vt));t.outrogroups.size===0&&(t.outrogroups=null)}if(f!==null||u!==void 0){var R=[];if(u!==void 0)for(p of u)!(p.f&8192)&&R.push(p);for(;f!==null;)!(f.f&8192)&&f!==t.fallback&&R.push(f),f=qe(f.next);var rt=R.length;if(rt>0){var B=(r&4)!==0&&a===0?n:null;if(s){for(m=0;m<rt;m+=1)R[m].nodes?.a?.measure();for(m=0;m<rt;m+=1)R[m].nodes?.a?.fix()}xo(t,R,B)}}s&&kt(()=>{if(v!==void 0)for(p of v)p.nodes?.a?.apply()})}function Wo(t,e,n,r,i,s,a,l){var f=(a&1)!==0?(a&16)===0?fi(n,!1,!1):ee(n):null,u=(a&2)!==0?ee(i):null;return{v:f,i:u,e:et(()=>(s(e,f??n,u??i,l),()=>{t.delete(r)}))}}function We(t,e,n){if(t.nodes)for(var r=t.nodes.start,i=t.nodes.end,s=e&&(e.f&33554432)===0?e.nodes.start:n;r!==null;){var a=St(r);if(s.before(r),r===i)return;r=a}}function zt(t,e,n){e===null?t.effect.first=n:e.next=n,n===null?t.effect.last=e:n.prev=e}function Eo(t,e){Qs(()=>{t=q?.parent?.nodes?.start??t;var n=t.getRootNode(),r=n.host?n:n.head??n.ownerDocument.head;if(!r.querySelector("#"+e.hash)){const i=rr("style");i.id=e.hash,i.textContent=e.code,r.appendChild(i)}})}var To=Symbol("is custom element"),Lo=Symbol("is html"),Oo=vs?"link":"LINK";function jo(t){if(E){var e=!1,n=()=>{if(!e){if(e=!0,t.hasAttribute("value")){var r=t.value;Un(t,"value",null),t.value=r}if(t.hasAttribute("checked")){var i=t.checked;Un(t,"checked",null),t.checked=i}}};t[Te]=n,kt(n),Xr()}}function Un(t,e,n,r){var i=Po(t);E&&(i[e]=t.getAttribute(e),e==="src"||e==="srcset"||e==="href"&&t.nodeName===Oo)||i[e]!==(i[e]=n)&&(e==="loading"&&(t[fs]=n),n==null?t.removeAttribute(e):typeof n!="string"&&Ao(t).has(e)?t[e]=n:t.setAttribute(e,n))}function Po(t){return t[Nn]??(t[Nn]={[To]:t.nodeName.includes("-"),[Lo]:t.namespaceURI==="http://www.w3.org/1999/xhtml"})}var Nr=new Map;function Ao(t){var e=t.getAttribute("is")||t.nodeName,n=Nr.get(e);if(n)return n;Nr.set(e,n=new Set);for(var r,i=t,s=Element.prototype;s!==i;){r=ts(i);for(var a in r)r[a].set&&a!=="innerHTML"&&a!=="textContent"&&a!=="innerText"&&n.add(a);i=Rr(i)}return n}function No(t,e,n=e){var r=new WeakSet;Os(t,"input",async i=>{var s=i?t.defaultValue:t.value;if(s=Tn(t)?Ln(s):s,n(s),$!==null&&r.add($),await io(),s!==(s=e())){var a=t.selectionStart,l=t.selectionEnd,f=t.value.length;if(t.value=s??"",l!==null){var u=t.value.length;a===l&&l===f&&u>f?(t.selectionStart=u,t.selectionEnd=u):(t.selectionStart=a,t.selectionEnd=Math.min(l,u))}}}),(E&&t.defaultValue!==t.value||ze(e)==null&&t.value)&&(n(Tn(t)?Ln(t.value):t.value),$!==null&&r.add($)),or(()=>{var i=e();if(t===document.activeElement){var s=me?ln:$;if(r.has(s))return}Tn(t)&&i===Ln(t.value)||t.type==="date"&&!i&&!t.value||i!==t.value&&(t.value=i??"")})}function Tn(t){var e=t.type;return e==="number"||e==="range"}function Ln(t){return t===""?null:+t}var Ai,le=new WeakMap,gn=new WeakMap,On=new WeakMap,Cr=new WeakSet,Ni=class{constructor(t){nr(this,Cr),w(this,le,new WeakMap),w(this,gn,void 0),w(this,On,void 0),g(On,this,t)}observe(t,e){var n=o(le,this).get(t)||new Set;return n.add(e),o(le,this).set(t,n),k(Cr,this,Co).call(this).observe(t,o(On,this)),()=>{var r=o(le,this).get(t);r.delete(e),r.size===0&&(o(le,this).delete(t),o(gn,this).unobserve(t))}}};Ai=Ni;function Co(){return o(gn,this)??g(gn,this,new ResizeObserver(t=>{for(var e of t){Ai.entries.set(e.target,e);for(var n of o(le,this).get(e.target)||[])n(e)}}))}T(Ni,"entries",new WeakMap);var Xe=!1;function zo(t){var e=Xe;try{return Xe=!1,[t(),Xe]}finally{Xe=e}}function Tt(t,e,n,r){var i=!bn||(n&2)!==0,s=(n&8)!==0,a=(n&16)!==0,l=r,f=!0,u=void 0,c=()=>a&&i?(u??(u=Ae(r)),_(u)):(f&&(f=!1,l=a?ze(r):r),l);let v;if(s){var d=Ye in t||Vr in t;v=Qt(t,e)?.set??(d&&e in t?M=>t[e]=M:void 0)}var h,y=!1;s?[h,y]=zo(()=>t[e]):h=t[e],h===void 0&&r!==void 0&&(h=c(),v&&(i&&Ss(e),v(h)));var S;if(i?S=()=>{var M=t[e];return M===void 0?c():(f=!0,M)}:S=()=>{var M=t[e];return M!==void 0&&(l=void 0),M===void 0?l:M},i&&(n&4)===0)return S;if(v){var p=t.$$legacy;return(function(M,b){return arguments.length>0?((!i||!b||p||y)&&v(b?S():M),M):S()})}var m=!1,O=((n&1)!==0?Ae:tr)(()=>(m=!1,S()));s&&_(O);var j=q;return(function(M,b){if(arguments.length>0){const P=b?_(O):i&&s?Gt(M):M;return X(O,P),m=!0,l!==void 0&&(l=P),M}return jt&&m||(j.f&16384)!==0?O.v:_(O)})}function Io(t){return new Ro(t)}var Ft=new WeakMap,pt=new WeakMap,Ro=class{constructor(t){w(this,Ft,void 0),w(this,pt,void 0);var e=new Map,n=(i,s)=>{var a=fi(s,!1,!1);return e.set(i,a),a};const r=new Proxy({...t.props||{},$$events:{}},{get(i,s){return _(e.get(s)??n(s,Reflect.get(i,s)))},has(i,s){return s===Vr?!0:(_(e.get(s)??n(s,Reflect.get(i,s))),Reflect.has(i,s))},set(i,s,a){return X(e.get(s)??n(s,a),a),Reflect.set(i,s,a)}});g(pt,this,(t.hydrate?$o:ji)(t.component,{target:t.target,anchor:t.anchor,props:r,context:t.context,intro:t.intro??!1,recover:t.recover,transformError:t.transformError})),(!t?.props?.$$host||t.sync===!1)&&st(),g(Ft,this,r.$$events);for(const i of Object.keys(o(pt,this)))i==="$set"||i==="$destroy"||i==="$on"||je(this,i,{get(){return o(pt,this)[i]},set(s){o(pt,this)[i]=s},enumerable:!0});o(pt,this).$set=i=>{Object.assign(r,i)},o(pt,this).$destroy=()=>{ko(o(pt,this))}}$set(t){o(pt,this).$set(t)}$on(t,e){o(Ft,this)[t]=o(Ft,this)[t]||[];const n=(...r)=>e.call(this,...r);return o(Ft,this)[t].push(n),()=>{o(Ft,this)[t]=o(Ft,this)[t].filter(r=>r!==n)}}$destroy(){o(pt,this).$destroy()}},Ci;typeof HTMLElement=="function"&&(Ci=class extends HTMLElement{constructor(t,e,n){super(),T(this,"$$ctor",void 0),T(this,"$$s",void 0),T(this,"$$c",void 0),T(this,"$$cn",!1),T(this,"$$d",{}),T(this,"$$r",!1),T(this,"$$p_d",{}),T(this,"$$l",{}),T(this,"$$l_u",new Map),T(this,"$$me",void 0),T(this,"$$shadowRoot",null),this.$$ctor=t,this.$$s=e,n&&(this.$$shadowRoot=this.attachShadow(n))}addEventListener(t,e,n){if(this.$$l[t]=this.$$l[t]||[],this.$$l[t].push(e),this.$$c){const r=this.$$c.$on(t,e);this.$$l_u.set(e,r)}super.addEventListener(t,e,n)}removeEventListener(t,e,n){if(super.removeEventListener(t,e,n),this.$$c){const r=this.$$l_u.get(e);r&&(r(),this.$$l_u.delete(e))}}async connectedCallback(){if(this.$$cn=!0,!this.$$c){let t=function(r){return i=>{const s=rr("slot");r!=="default"&&(s.name=r),H(i,s)}};if(await Promise.resolve(),!this.$$cn||this.$$c)return;const e={},n=Bo(this);for(const r of this.$$s)r in n&&(r==="default"&&!this.$$d.children?(this.$$d.children=t(r),e.default=!0):e[r]=t(r));for(const r of this.attributes){const i=this.$$g_p(r.name);i in this.$$d||(this.$$d[i]=nn(i,r.value,this.$$p_d,"toProp"))}for(const r in this.$$p_d)!(r in this.$$d)&&this[r]!==void 0&&(this.$$d[r]=this[r],delete this[r]);this.$$c=Io({component:this.$$ctor,target:this.$$shadowRoot||this,props:{...this.$$d,$$slots:e,$$host:this}}),this.$$me=Gs(()=>{or(()=>{this.$$r=!0;for(const r of rn(this.$$c)){if(!this.$$p_d[r]?.reflect)continue;this.$$d[r]=this.$$c[r];const i=nn(r,this.$$d[r],this.$$p_d,"toAttribute");i==null?this.removeAttribute(this.$$p_d[r].attribute||r):this.setAttribute(this.$$p_d[r].attribute||r,i)}this.$$r=!1})});for(const r in this.$$l)for(const i of this.$$l[r]){const s=this.$$c.$on(r,i);this.$$l_u.set(i,s)}this.$$l={}}}attributeChangedCallback(t,e,n){this.$$r||(t=this.$$g_p(t),this.$$d[t]=nn(t,n,this.$$p_d,"toProp"),this.$$c?.$set({[t]:this.$$d[t]}))}disconnectedCallback(){this.$$cn=!1,Promise.resolve().then(()=>{!this.$$cn&&this.$$c&&(this.$$c.$destroy(),this.$$me(),this.$$c=void 0)})}$$g_p(t){return rn(this.$$p_d).find(e=>this.$$p_d[e].attribute===t||!this.$$p_d[e].attribute&&e.toLowerCase()===t)||t}});function nn(t,e,n,r){const i=n[t]?.type;if(e=i==="Boolean"&&typeof e!="boolean"?e!=null:e,!r||!n[t])return e;if(r==="toAttribute")switch(i){case"Object":case"Array":return e==null?null:JSON.stringify(e);case"Boolean":return e?"":null;case"Number":return e??null;default:return e}else switch(i){case"Object":case"Array":return e&&JSON.parse(e);case"Boolean":return e;case"Number":return e!=null?+e:e;default:return e}}function Bo(t){const e={};return t.childNodes.forEach(n=>{e[n.slot||"default"]=!0}),e}function Do(t,e,n,r,i,s){let a=class extends Ci{constructor(){super(t,n,i),this.$$p_d=e}static get observedAttributes(){return rn(e).map(l=>(e[l].attribute||l).toLowerCase())}};return rn(e).forEach(l=>{je(a.prototype,l,{get(){return this.$$c&&l in this.$$c?this.$$c[l]:this.$$d[l]},set(f){f=nn(l,f,e),this.$$d[l]=f;var u=this.$$c;u&&(Qt(u,l)?.get?u[l]=f:u.$set({[l]:f}))}})}),r.forEach(l=>{je(a.prototype,l,{get(){return this.$$c?.[l]}})}),s&&(a=s(a)),t.element=a,a}function Vo(t,e=!1){if(typeof t=="boolean")return t;if(t==null)return e;const n=String(t).trim().toLowerCase();return n===""?e:["false","0","off","no"].includes(n)?!1:["true","1","on","yes"].includes(n)?!0:!!n}function Ho(t){return t!==null&&Vo(t,!0)}var Fo=(t,e)=>{const n=t.$$p_d;return n?Object.entries(n).some(([r,i])=>i.type==="Boolean"&&(i.attribute??r.toLowerCase())===e):!1};function Jo(t){const e=t.prototype.attributeChangedCallback;return class extends t{attributeChangedCallback(n,r,i){const s=i!==null&&Fo(this,n)&&!Ho(i)?null:i;e?.call(this,n,r,s)}}}function Gn(t){return t.replace(/\s+/gu," ").trim().replace(/^[^\p{L}\p{N}]+/u,"").replace(/[^\p{L}\p{N}]+$/u,"")}function Ko(t){return!t||t.length>80?!1:t.split(" ").length<=4}function Uo(t,e){if(!t||typeof t!="object")return{status:"error",reason:`The ${e.serviceLabel} returned no data.`};const n=t;let r=null;for(const s of e.keys)if(Array.isArray(n[s])){r=n[s];break}if(!r)return{status:"error",reason:`The ${e.serviceLabel} response was unreadable.`};const i=r.map(e.toItem).filter(s=>s!==null);return i.length>0?{status:"ok",items:i}:{status:"empty"}}function Go(t){const e=t.fetchImpl??globalThis.fetch;return async(n,r)=>{if(typeof e!="function")return{status:"error",reason:"No fetch implementation is available."};let i={"content-type":"application/json"};try{const s=await t.headers?.();s&&(i={...i,...s})}catch{return{status:"error",reason:`The ${t.serviceLabel} could not be authorized.`}}try{const s=await e(t.endpoint,{method:"POST",headers:i,credentials:t.credentials??"same-origin",body:JSON.stringify(n),signal:r});return s.ok?t.readResponse(await s.json()):{status:"error",reason:`The ${t.serviceLabel} is unavailable (${s.status}).`}}catch(s){return s instanceof DOMException&&s.name==="AbortError"?{status:"empty"}:{status:"error",reason:`The ${t.serviceLabel} could not be reached.`}}}}var Zo="Look up a single word or short phrase.",Se=new WeakMap,jn=new WeakMap,Pn=new WeakMap,Qo=class{constructor(t){T(this,"options",void 0),w(this,Se,null),w(this,jn,""),w(this,Pn,null),this.options=t}get searchedFor(){return o(jn,this)}syncConfigured(t){const e=this.options.resolver();if(!e&&t.kind==="idle"){this.options.onState({kind:"unconfigured"});return}e&&t.kind==="unconfigured"&&this.options.onState({kind:"idle"})}syncRequestedTerm(t){const e=Gn(t.term);if(!t.visible||!e)return!1;const n=t.requestId===void 0?`term:${e}`:`id:${t.requestId}`;return n===o(Pn,this)?!1:(g(Pn,this,n),this.run(e),!0)}async run(t){const e=this.options.resolver();if(!e){this.options.onState({kind:"unconfigured"});return}const n=Gn(t);if(!Ko(n)){this.options.onState({kind:"error",term:n,reason:Zo});return}o(Se,this)?.abort();const r=new AbortController;g(Se,this,r),g(jn,this,n),this.options.onState({kind:"searching",term:n});const i=await e({keyword:n,language:this.options.language?.()||void 0,max:this.options.max},r.signal);if(r===o(Se,this)){if(g(Se,this,null),i.status==="ok"){this.options.onState({kind:"results",term:n,items:i.items});return}if(i.status==="empty"){this.options.onState({kind:"empty",term:n});return}this.options.onState({kind:"error",term:n,reason:i.reason})}}};function Xo(t,e){return t.kind==="searching"?`Looking up ${t.term}`:t.kind==="results"?`${e.countLabel(t.items.length)} for ${t.term}`:t.kind==="empty"?e.emptyLabel(t.term):""}var zi="dictionary";function Yo(t){if(!t||typeof t!="object")return null;const e=t,n=typeof e.word=="string"?e.word.trim():"";if(!n)return null;const r=Array.isArray(e.senses)?e.senses:[],i=[];for(const s of r){if(!s||typeof s!="object")continue;const a=s,l=typeof a.definition=="string"?a.definition.trim():"";l&&i.push({definition:l,partOfSpeech:typeof a.partOfSpeech=="string"?a.partOfSpeech:void 0,example:typeof a.example=="string"?a.example:void 0})}return i.length===0?null:{word:n,pronunciation:typeof e.pronunciation=="string"?e.pronunciation:void 0,senses:i}}function ta(t){return Uo(t,{serviceLabel:zi,keys:["entries"],toItem:Yo})}function ea(t){return Go({...t,serviceLabel:zi,readResponse:ta})}var na=ht('<p class="pie-tool-dictionary__notice svelte-1qfqsgt">No dictionary service is configured for this assessment.</p>'),ra=ht('<p class="pie-tool-dictionary__notice svelte-1qfqsgt">Type a word to look it up.</p>'),zr=ht('<p class="pie-tool-dictionary__notice svelte-1qfqsgt"> </p>'),ia=ht('<p class="pie-tool-dictionary__error svelte-1qfqsgt" role="alert"> </p>'),sa=ht('<span class="pie-tool-dictionary__pronunciation svelte-1qfqsgt"> </span>'),oa=ht('<span class="pie-tool-dictionary__pos svelte-1qfqsgt"> </span>'),aa=ht('<span class="pie-tool-dictionary__example svelte-1qfqsgt"> </span>'),la=ht('<li class="pie-tool-dictionary__sense svelte-1qfqsgt"><!> <span class="pie-tool-dictionary__definition"> </span> <!></li>'),ua=ht('<li class="pie-tool-dictionary__entry svelte-1qfqsgt"><p class="pie-tool-dictionary__word svelte-1qfqsgt"> <!></p> <ol class="pie-tool-dictionary__senses svelte-1qfqsgt"></ol></li>'),fa=ht('<ul class="pie-tool-dictionary__entries svelte-1qfqsgt"></ul>'),ca=ht('<div class="pie-tool-dictionary svelte-1qfqsgt" role="dialog" aria-label="Dictionary"><form class="pie-tool-dictionary__search svelte-1qfqsgt"><label class="pie-tool-dictionary__label svelte-1qfqsgt" for="pie-tool-dictionary-term">Word or phrase</label> <div class="pie-tool-dictionary__row svelte-1qfqsgt"><input id="pie-tool-dictionary-term" class="pie-tool-dictionary__input svelte-1qfqsgt" type="text" autocomplete="off" spellcheck="false"/> <button class="pie-tool-dictionary__submit svelte-1qfqsgt" type="submit">Look up</button></div></form> <div class="pie-tool-dictionary__status svelte-1qfqsgt" role="status" aria-live="polite"> </div> <div class="pie-tool-dictionary__body svelte-1qfqsgt"><!></div></div>'),ha={hash:"svelte-1qfqsgt",code:`.pie-tool-dictionary.svelte-1qfqsgt {display:flex;flex-direction:column;gap:0.5rem;height:100%;min-height:0;padding:0.75rem;box-sizing:border-box;color:var(--pie-text, #1f2937);background:var(--pie-background, #fff);font-size:0.95rem;}.pie-tool-dictionary__search.svelte-1qfqsgt {display:flex;flex-direction:column;gap:0.25rem;}.pie-tool-dictionary__label.svelte-1qfqsgt {font-size:0.8rem;font-weight:600;}.pie-tool-dictionary__row.svelte-1qfqsgt {display:flex;gap:0.5rem;}.pie-tool-dictionary__input.svelte-1qfqsgt {flex:1 1 auto;min-width:0;padding:0.35rem 0.5rem;border:1px solid var(--pie-border-light, #e5e7eb);border-radius:0.375rem;background:var(--pie-background, #fff);color:inherit;font:inherit;}.pie-tool-dictionary__submit.svelte-1qfqsgt {flex:0 0 auto;padding:0.35rem 0.75rem;border:1px solid var(--pie-border-light, #e5e7eb);border-radius:0.375rem;background:var(--pie-secondary-background, #f9fafb);color:inherit;font:inherit;cursor:pointer;}.pie-tool-dictionary__submit.svelte-1qfqsgt:disabled {opacity:0.5;cursor:not-allowed;}
|
|
1
|
+
import{t as Qi}from"./attribute-coercion-b93b482c.js";import{a as Xi,i as Yi,n as Zi,r as Ui,t as ts}from"./term-lookup-632cf6b1.js";if(typeof window<"u"){var hr,vr;((hr=(vr=window).__svelte??(vr.__svelte={})).v??(hr.v=new Set)).add("5")}var ce={},L=Symbol("uninitialized"),Nr=Array.isArray,es=Array.prototype.indexOf,On=Array.prototype.includes,gn=Array.from,nn=Object.keys,Oe=Object.defineProperty,Yt=Object.getOwnPropertyDescriptor,ns=Object.getOwnPropertyDescriptors,rs=Object.prototype,is=Array.prototype,Cr=Object.getPrototypeOf,dr=Object.isExtensible,ss=()=>{};function os(t){for(var e=0;e<t.length;e++)t[e]()}function Lr(){var t,e;return{promise:new Promise((n,r)=>{t=n,e=r}),resolve:t,reject:e}}function je(t){"@babel/helpers - typeof";return je=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},je(t)}function as(t,e){if(je(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e||"default");if(je(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function ls(t){var e=as(t,"string");return je(e)=="symbol"?e:e+""}function T(t,e,n){return(e=ls(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var tt=1024,ct=2048,ne=4096,Jn=8192,us=16384,Kn=32768,pr=1<<25,Gn=65536,ge=1<<19,fs=1<<20,We=1<<25,gr=1<<21,cs=1<<22,rn=1<<23,Ze=Symbol("$state"),zr=Symbol("component"),Rr=Symbol("legacy props"),hs=Symbol(""),jn=Symbol("attributes"),vs=Symbol("class"),ds=Symbol("style"),Ue=Symbol("text"),Ee=Symbol("form reset"),Re=new class extends Error{constructor(...t){super(...t),T(this,"name","StaleReactionError"),T(this,"message","The reaction that called `getAbortSignal()` was re-run or destroyed")}},ps=!!globalThis.document?.contentType&&globalThis.document.contentType.includes("xml");function gs(){console.warn("https://svelte.dev/e/derived_inert")}function mn(t){console.warn("https://svelte.dev/e/hydration_mismatch")}function ms(){console.warn("https://svelte.dev/e/svelte_boundary_reset_noop")}var E=!1;function Pt(t){E=t}var W;function J(t){if(t===null)throw mn(),ce;return W=t}function yn(){return J(xt(W))}function gt(t){if(E){if(xt(W)!==null)throw mn(),ce;W=t}}function ys(t=1){if(E){for(var e=t,n=W;e--;)n=xt(n);W=n}}function sn(t=!0){for(var e=0,n=W;;){if(n.nodeType===8){var r=n.data;if(r==="]"){if(e===0)return n;e-=1}else(r==="["||r==="[!"||r[0]==="["&&!isNaN(Number(r.slice(1))))&&(e+=1)}var i=xt(n);t&&n.remove(),n=i}}function Ir(t){if(!t||t.nodeType!==8)throw mn(),ce;return t.data}function Br(t){return t===this.v}function ws(t,e){return t!=t?e==e:t!==e||t!==null&&typeof t=="object"||typeof t=="function"}function Dr(t){return!ws(t,this.v)}function _s(){throw new Error("https://svelte.dev/e/async_derived_orphan")}function bs(t,e,n){throw new Error("https://svelte.dev/e/each_key_duplicate")}function $s(t){throw new Error("https://svelte.dev/e/effect_in_teardown")}function ks(){throw new Error("https://svelte.dev/e/effect_in_unowned_derived")}function qs(t){throw new Error("https://svelte.dev/e/effect_orphan")}function xs(){throw new Error("https://svelte.dev/e/effect_update_depth_exceeded")}function Ss(){throw new Error("https://svelte.dev/e/hydration_failed")}function Ms(t){throw new Error("https://svelte.dev/e/props_invalid_value")}function Ws(){throw new Error("https://svelte.dev/e/state_descriptors_fixed")}function Es(){throw new Error("https://svelte.dev/e/state_prototype_fixed")}function Ts(){throw new Error("https://svelte.dev/e/state_unsafe_mutation")}function Ps(){throw new Error("https://svelte.dev/e/svelte_boundary_reset_onerror")}var me=!1,wn=!1,R=null;function he(t){R=t}function Vr(t,e=!1,n){R={p:R,i:!1,c:null,e:null,s:t,x:null,r:q,l:wn&&!e?{s:null,u:null,$:[]}:null}}function Hr(t){var e=R,n=e.e;if(n!==null){e.e=null;for(var r of n)di(r)}return t!==void 0&&(e.x=t),e.i=!0,R=e.p,Fr(t)}function Fr(t={}){return Oe(t,zr,{value:!0}),t}function Ie(){return!wn||R!==null&&R.l===null}var Gt=[];function Jr(){var t=Gt;Gt=[],os(t)}function kt(t){if(Gt.length===0&&!Te){var e=Gt;queueMicrotask(()=>{e===Gt&&Jr()})}Gt.push(t)}function Os(){for(;Gt.length>0;)Jr()}var js=~(ct|ne|tt);function N(t,e){t.f=t.f&js|e}function Qn(t){(t.f&512)!==0||t.deps===null?N(t,tt):N(t,ne)}function Kr(t,e,n){(t.f&2048)!==0?e.add(t):t.f&4096&&n.add(t),N(t,tt)}var mr=!1;function Gr(){mr||(mr=!0,document.addEventListener("reset",t=>{Promise.resolve().then(()=>{if(!t.defaultPrevented)for(const e of t.target.elements)e[Ee]?.()})},{capture:!0}))}function ye(t){var e=S,n=q;nt(null),qt(null);try{return t()}finally{nt(e),qt(n)}}function As(t,e,n,r=n){t.addEventListener(e,()=>ye(n));const i=t[Ee];i?t[Ee]=()=>{i(),r(!0)}:t[Ee]=()=>r(!0),Gr()}function Ns(t,e,n,r){const i=Ie()?Ae:Xn;var s=t.filter(h=>!h.settled),a=e.map(i);if(n.length===0&&s.length===0){r(a);return}var l=q,f=Cs(),u=s.length===1?s[0].promise:s.length>1?Promise.all(s.map(h=>h.promise)):null;function c(h){if((l.f&16384)===0){f();try{r([...a,...h])}catch(m){$t(m,l)}on()}}var v=Qr();if(n.length===0){u.then(()=>c([])).finally(v);return}function d(){Promise.all(n.map(h=>Ls(h))).then(c).catch(h=>$t(h,l)).finally(v)}u?u.then(()=>{f(),d(),on()}):d()}function Cs(){var t=q,e=S,n=R,r=$;return function(i=!0){qt(t),nt(e),he(n),i&&!(t.f&16384)&&(r?.activate(),r?.apply())}}function on(t=!0){qt(null),nt(null),he(null),t&&$?.deactivate()}function Qr(){var t=q,e=t.b,n=$,r=!!e?.is_rendered();return e?.update_pending_count(1,n),n.increment(r,t),()=>{e?.update_pending_count(-1,n),n.decrement(r,t)}}function Ae(t){var e=2|ct;return q!==null&&(q.f|=ge),{ctx:R,deps:null,effects:null,equals:Br,f:e,fn:t,reactions:null,rv:0,v:L,wv:0,parent:q,ac:null}}var xe=Symbol("obsolete");function Ls(t,e,n){let r=q;r===null&&_s();var i=void 0,s=ee(L),a=!S,l=new Set;return to(()=>{var f=q,u=Lr();i=u.promise;try{Promise.resolve(t()).then(u.resolve,h=>{h!==Re&&u.reject(h)}).finally(on)}catch(h){u.reject(h),on()}var c=$;if(a){if((f.f&32768)!==0)var v=Qr();if(r.b?.is_rendered())c.async_deriveds.get(f)?.reject(xe);else for(const h of l.values())h.reject(xe);l.add(u),c.async_deriveds.set(f,u)}const d=(h,m=void 0)=>{v?.(),l.delete(u),m!==xe&&(c.activate(),m?(s.f|=rn,de(s,m)):(s.f&8388608&&(s.f^=rn),de(s,h)),c.deactivate())};u.promise.then(d,h=>d(null,h||"unknown"))}),vi(()=>{for(const f of l)f.reject(xe)}),new Promise(f=>{function u(c){function v(){c===i?f(s):u(i)}c.then(v,v)}u(i)})}function yr(t){const e=Ae(t);return wi(e),e}function Xn(t){const e=Ae(t);return e.equals=Dr,e}function zs(t){var e=t.effects;if(e!==null){t.effects=null;for(var n=0;n<e.length;n+=1)V(e[n])}}function Yn(t){var e,n=q,r=t.parent;if(!jt&&r!==null&&t.v!==L&&(r.f&24576)!==0)return gs(),t.v;qt(r);try{zs(t),e=ki(t)}finally{qt(n)}return e}function Xr(t){var e=Yn(t);if(!t.equals(e)&&(t.wv=bi(),(!$?.is_fork||t.deps===null)&&($!==null?($.capture(t,e,!0),an?.capture(t,e,!0)):t.v=e,t.deps===null))){N(t,tt);return}jt||(D!==null?(er()||$?.is_fork)&&D.set(t,e):Qn(t))}function Rs(t){if(t.effects!==null)for(const e of t.effects)(e.teardown||e.ac)&&(e.teardown?.(),e.ac!==null&&ye(()=>{e.ac.abort(Re),e.ac=null}),e.fn!==null&&(e.teardown=ss),Ce(e,0),ir(e))}function Yr(t){if(t.effects!==null)for(const e of t.effects)e.teardown&&e.fn!==null&&pe(e)}function Zr(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}function Zn(t,e){Zr(t,e),e.add(t)}function b(t,e,n){Zr(t,e),e.set(t,n)}function k(t,e,n){if(typeof t=="function"?t===e:t.has(e))return arguments.length<3?e:n;throw new TypeError("Private element is not present on this object")}function y(t,e,n){return t.set(k(t,e),n),n}function o(t,e){return t.get(k(t,e))}var Ur,An=null,se=null,$=null,an=null,D=null,Nn=null,Te=!1,kn=!1,Ne=null,ln=null,ti=0,Is=1,Cn=new WeakMap,Zt=new WeakMap,ue=new WeakMap,un=new WeakMap,He=new WeakMap,oe=new WeakMap,Jt=new WeakMap,Se=new WeakMap,wt=new WeakMap,wr=new WeakMap,ve=new WeakMap,Ot=new WeakMap,It=new WeakMap,qn=new WeakMap,Fe=new WeakMap,C=new WeakSet,re=class ei{constructor(){Zn(this,C),T(this,"id",Is++),b(this,Cn,!1),T(this,"linked",!0),b(this,Zt,null),b(this,ue,null),T(this,"async_deriveds",new Map),T(this,"current",new Map),T(this,"previous",new Map),b(this,un,new Set),b(this,He,new Set),b(this,oe,0),b(this,Jt,new Map),b(this,Se,null),b(this,wt,[]),b(this,wr,[]),b(this,ve,new Set),b(this,Ot,new Set),b(this,It,new Map),b(this,qn,new Set),T(this,"is_fork",!1),b(this,Fe,!1),se===null?An=se=this:(y(ue,se,this),y(Zt,this,se)),se=this}skip_effect(e){o(It,this).has(e)||o(It,this).set(e,{d:[],m:[]}),o(qn,this).delete(e)}unskip_effect(e,n=r=>this.schedule(r)){var r=o(It,this).get(e);if(r){o(It,this).delete(e);for(var i of r.d)N(i,ct),n(i);for(i of r.m)N(i,ne),n(i)}o(qn,this).add(e)}capture(e,n,r=!1){e.v!==L&&!this.previous.has(e)&&this.previous.set(e,e.v),!(e.f&8388608)&&(this.current.set(e,[n,r]),D?.set(e,n)),this.is_fork||(e.v=n)}activate(){$=this}deactivate(){$=null,D=null}flush(){try{kn=!0,$=this,k(C,this,fn).call(this)}finally{ti=0,Nn=null,Ne=null,ln=null,kn=!1,$=null,D=null,bt.clear()}}discard(){for(const e of o(He,this))e(this);o(He,this).clear();for(const e of this.async_deriveds.values())e.reject(xe);k(C,this,cn).call(this),o(Se,this)?.resolve()}register_created_effect(e){o(wr,this).push(e)}increment(e,n){if(y(oe,this,o(oe,this)+1),e){let r=o(Jt,this).get(n)??0;o(Jt,this).set(n,r+1)}}decrement(e,n){if(y(oe,this,o(oe,this)-1),e){let r=o(Jt,this).get(n)??0;r===1?o(Jt,this).delete(n):o(Jt,this).set(n,r-1)}o(Fe,this)||(y(Fe,this,!0),kt(()=>{y(Fe,this,!1),this.linked&&this.flush()}))}transfer_effects(e,n){for(const r of e)o(ve,this).add(r);for(const r of n)o(Ot,this).add(r);e.clear(),n.clear()}oncommit(e){o(un,this).add(e)}ondiscard(e){o(He,this).add(e)}settled(){return(o(Se,this)??y(Se,this,Lr())).promise}static ensure(){if($===null){const e=$=new ei;!kn&&!Te&&kt(()=>{o(Cn,e)||e.flush()})}return $}apply(){if(!me||!this.is_fork&&o(Zt,this)===null&&o(ue,this)===null){D=null;return}D=new Map;for(const[n,[r]]of this.current)D.set(n,r);for(let n=An;n!==null;n=o(ue,n))if(!(n===this||n.is_fork)){var e=!1;if(n.id<this.id){for(const[r,[,i]]of n.current)if(!i&&this.current.has(r)){e=!0;break}}if(!e)for(const[r,i]of n.previous)D.has(r)||D.set(r,i)}}schedule(e){if(Nn=e,e.b?.is_pending&&(e.f&16777228)!==0&&(e.f&32768)===0){e.b.defer_effect(e);return}o(wt,this).push(e)}};Ur=re;function _r(){if(this.is_fork)return!0;for(const n of o(Jt,this).keys()){for(var t=n,e=!1;t.parent!==null;){if(o(It,this).has(t)){e=!0;break}t=t.parent}if(!e)return!0}return!1}function Bs(){var t=[];for(const i of o(wt,this))if(!((i.f&16384)!==0||(i.f&6144)===0)){for(var e=i,n=!1;e.parent!==null;){e=e.parent;var r=e.f;if((r&96)!==0){if((r&1024)===0){n=!0;break}e.f^=tt}}n||t.push(e)}return y(wt,this,[]),t}function fn(){y(Cn,this,!0);for(const a of o(ve,this))o(Ot,this).delete(a),N(a,ct),this.schedule(a);for(const a of o(Ot,this))N(a,ne),this.schedule(a);this.apply();for(var t=Ne=[],e=[],n=ln=[];o(wt,this).length>0;){ti++>1e3&&(k(C,this,cn).call(this),Fs());for(const a of k(C,this,Bs).call(this))try{k(C,this,Ds).call(this,a,t,e)}catch(l){throw ii(a),k(C,this,_r).call(this)||this.discard(),l}}if($=null,n.length>0){var r=Ur.ensure();for(const a of n)r.schedule(a)}if(Ne=null,ln=null,k(C,this,_r).call(this)){k(C,this,Je).call(this,e),k(C,this,Je).call(this,t);for(const[a,l]of o(It,this))ri(a,l);n.length>0&&k(C,$,fn).call($);return}const i=k(C,this,Vs).call(this);if(i){k(C,this,Je).call(this,e),k(C,this,Je).call(this,t),k(C,i,Hs).call(i,this);return}o(ve,this).clear(),o(Ot,this).clear();for(const a of o(un,this))a(this);o(un,this).clear(),an=this,br(e),br(t),an=null,o(Se,this)?.resolve();var s=$;if(o(oe,this)===0&&(o(wt,this).length===0||s!==null)&&k(C,this,cn).call(this),o(wt,this).length>0)if(s!==null){for(const a of o(wt,this))o(wt,s).push(a);y(wt,this,[])}else s=this;s!==null&&(bt.clear(),k(C,s,fn).call(s))}function Ds(t,e,n){t.f^=tt;for(var r=t.first;r!==null;){var i=r.f,s=(i&96)!==0;if(!(s&&(i&1024)!==0||(i&8192)!==0||o(It,this).has(r))&&r.fn!==null){s?r.f^=tt:(i&4)!==0?e.push(r):me&&(i&16777224)!==0?n.push(r):Be(r)&&(i&16&&o(Ot,this).add(r),pe(r));var a=r.first;if(a!==null){r=a;continue}}for(;r!==null;){var l=r.next;if(l!==null){r=l;break}r=r.parent}}}function Vs(){for(var t=o(Zt,this);t!==null;){if(!t.is_fork){for(const[e,[,n]]of this.current)if(t.current.has(e)&&!n)return t}t=o(Zt,t)}return null}function Hs(t){for(const[n,r]of t.current)!this.previous.has(n)&&t.previous.has(n)&&this.previous.set(n,t.previous.get(n)),this.current.set(n,r);for(const[n,r]of t.async_deriveds){const i=this.async_deriveds.get(n);i&&r.promise.then(i.resolve).catch(i.reject)}t.async_deriveds.clear(),this.transfer_effects(o(ve,t),o(Ot,t));const e=n=>{var r=n.reactions;if(r!==null&&!((n.f&2)!==0&&(n.f&6144)===0))for(const a of r){var i=a.f;if((i&2)!==0)e(a);else{var s=a;i&4194320&&!this.async_deriveds.has(s)&&(o(Ot,this).delete(s),N(s,ct),this.schedule(s))}}};for(const n of this.current.keys())e(n);this.oncommit(()=>t.discard()),k(C,t,cn).call(t),$=this,k(C,this,fn).call(this)}function Je(t){for(var e=0;e<t.length;e+=1)Kr(t[e],o(ve,this),o(Ot,this))}function cn(){if(this.linked){var t=o(Zt,this),e=o(ue,this);t===null?An=e:y(ue,t,e),e===null?se=t:y(Zt,e,t),this.linked=!1}}function st(t){var e=Te;Te=!0;try{var n;for(t&&($!==null&&!$.is_fork&&$.flush(),n=t());;){if(Os(),$===null)return n;$.flush()}}finally{Te=e}}function Fs(){try{xs()}catch(t){$t(t,Nn)}}var yt=null;function br(t){var e=t.length;if(e!==0){for(var n=0;n<e;){var r=t[n++];if((r.f&24576)===0&&Be(r)&&(yt=new Set,pe(r),r.deps===null&&r.first===null&&r.nodes===null&&r.teardown===null&&r.ac===null&&gi(r),yt?.size>0)){bt.clear();for(const i of yt){if((i.f&24576)!==0)continue;const s=[i];let a=i.parent;for(;a!==null;)yt.has(a)&&(yt.delete(a),s.push(a)),a=a.parent;for(let l=s.length-1;l>=0;l--){const f=s[l];!(f.f&24576)&&pe(f)}}yt.clear()}}yt=null}}function ni(t){$.schedule(t)}function ri(t,e){if(!((t.f&32)!==0&&(t.f&1024)!==0)){(t.f&2048)!==0?e.d.push(t):t.f&4096&&e.m.push(t),N(t,tt);for(var n=t.first;n!==null;)ri(n,e),n=n.next}}function ii(t){N(t,tt);for(var e=t.first;e!==null;)ii(e),e=e.next}var hn=new Set,bt=new Map,si=!1;function ee(t,e){return{f:0,v:t,reactions:null,equals:Br,rv:0,wv:0}}function mt(t,e){const n=ee(t,e);return wi(n),n}function oi(t,e=!1,n=!0){const r=ee(t);if(e||(r.equals=Dr),wn&&n&&R!==null&&R.l!==null){var i;((i=R.l).s??(i.s=[])).push(r)}return r}function Z(t,e,n=!1){return S!==null&&(!ot||S.f&131072)&&Ie()&&S.f&4325394&&(lt===null||!lt.has(t))&&Ts(),de(t,n?Qt(e):e,ln)}var Kt=null,Ln=0;function de(t,e,n=null){if(!t.equals(e)){jt?bt.set(t,e):bt.has(t)||bt.set(t,t.v);var r=re.ensure();if(r.capture(t,e),(t.f&2)!==0){const i=t;t.f&2048&&Yn(i),D===null&&Qn(i)}t.wv=bi(),Kt=null,Ln=0,ai(t,ct,n),Kt=null,Ie()&&q!==null&&q.f&1024&&!(q.f&96)&&(Y===null?io([t]):Y.push(t)),!r.is_fork&&hn.size>0&&!si&&Js()}return e}function Js(){si=!1;for(const t of hn){t.f&1024&&N(t,ne);let e;try{e=Be(t)}catch{e=!0}e&&pe(t)}hn.clear()}function Pe(t){Z(t,t.v+1)}function ai(t,e,n){var r=t.reactions;if(r!==null){var i=Ie(),s=r.length;if(Ln+=s,Ln>1e5&&Kt===null&&(Kt=new Set),Kt!==null){if(Kt.has(t))return;Kt.add(t)}for(var a=0;a<s;a++){var l=r[a],f=l.f;if(!(!i&&l===q)){var u=(f&ct)===0;if(u&&N(l,e),(f&131072)!==0)hn.add(l);else if((f&2)!==0){var c=l;D?.delete(c),ai(c,ne,n)}else if(u){var v=l;f&16&&yt!==null&&yt.add(v),n!==null?n.push(v):ni(v)}}}}}function Qt(t){if(typeof t!="object"||t===null||Ze in t||zr in t)return t;const e=Cr(t);if(e!==rs&&e!==is)return t;var n=new Map,r=Nr(t),i=mt(0),s=null,a=Ut,l=f=>{if(Ut===a)return f();var u=S,c=Ut;nt(null),xr(a);var v=f();return nt(u),xr(c),v};return r&&n.set("length",mt(t.length,s)),new Proxy(t,{defineProperty(f,u,c){(!("value"in c)||c.configurable===!1||c.enumerable===!1||c.writable===!1)&&Ws();var v=n.get(u);return v===void 0?l(()=>{var d=mt(c.value,s);return n.set(u,d),d}):Z(v,c.value,!0),!0},deleteProperty(f,u){var c=n.get(u);if(c===void 0){if(u in f){const v=l(()=>mt(L,s));n.set(u,v),Pe(i)}}else Z(c,L),Pe(i);return!0},get(f,u,c){if(u===Ze)return t;var v=n.get(u),d=u in f;if(v===void 0&&(!d||Yt(f,u)?.writable)&&(v=l(()=>mt(Qt(d?f[u]:L),s)),n.set(u,v)),v!==void 0){var h=_(v);return h===L?void 0:h}return Reflect.get(f,u,c)},getOwnPropertyDescriptor(f,u){this.has?.(f,u);var c=Reflect.getOwnPropertyDescriptor(f,u),v=n.get(u);if(v!==void 0){var d=_(v);if(d===L)return;if(c&&"value"in c)c.value=d;else return{enumerable:!0,configurable:!0,value:d,writable:!0}}return c},has(f,u){if(u===Ze)return!0;var c=n.get(u),v=c!==void 0&&c.v!==L||Reflect.has(f,u);return(c!==void 0||q!==null&&(!v||Yt(f,u)?.writable))&&(c===void 0&&(c=l(()=>mt(v?Qt(f[u]):L,s)),n.set(u,c)),_(c)===L)?!1:v},set(f,u,c,v){var d=n.get(u),h=u in f;if(r&&u==="length")for(var m=c;m<d.v;m+=1){var x=n.get(m+"");x!==void 0?Z(x,L):m in f&&(x=l(()=>mt(L,s)),n.set(m+"",x))}if(d===void 0)(!h||Yt(f,u)?.writable)&&(d=l(()=>mt(void 0,s)),Z(d,Qt(c)),n.set(u,d));else{h=d.v!==L;var p=l(()=>Qt(c));Z(d,p)}var g=Reflect.getOwnPropertyDescriptor(f,u);if(g?.set&&g.set.call(v,c),!h){if(r&&typeof u=="string"){var O=n.get("length"),j=Number(u);Number.isInteger(j)&&j>=O.v&&Z(O,j+1)}Pe(i)}return!0},ownKeys(f){_(i);var u=Reflect.ownKeys(f).filter(d=>{var h=n.get(d);return h===void 0||h.v!==L});for(var[c,v]of n)v.v!==L&&!(c in f)&&u.push(c);return u},setPrototypeOf(){Es()}})}var $r,li,ui,fi;function zn(){if($r===void 0){$r=window,li=/Firefox/.test(navigator.userAgent);var t=Element.prototype,e=Node.prototype,n=Text.prototype;ui=Yt(e,"firstChild").get,fi=Yt(e,"nextSibling").get,dr(t)&&(t[vs]=void 0,t[jn]=null,t[ds]=void 0,t.__e=void 0),dr(n)&&(n[Ue]=void 0)}}function U(t=""){return document.createTextNode(t)}function Dt(t){return ui.call(t)}function xt(t){return fi.call(t)}function Rt(t,e){if(!E)return Dt(t);var n=Dt(W);if(n===null)n=W.appendChild(U());else if(e&&n.nodeType!==3){var r=U();return n?.before(r),J(r),r}return e&&tr(n),J(n),n}function Ks(t,e=!1){if(!E){var n=Dt(t);return n instanceof Comment&&n.data===""?xt(n):n}if(e){if(W?.nodeType!==3){var r=U();return W?.before(r),J(r),r}tr(W)}return W}function Nt(t,e=!1){if(!E)return Dt(t);var n=Rt(t,e);return gt(t),n}function Ct(t,e=1,n=!1){let r=E?W:t;for(var i;e--;)i=r,r=xt(r);if(!E)return r;if(n){if(r?.nodeType!==3){var s=U();return r===null?i?.after(s):r.before(s),J(s),s}tr(r)}return J(r),r}function ci(t){t.textContent=""}function hi(){return!me||yt!==null?!1:(q.f&Kn)!==0}function Un(t,e,n){return e==null||e==="http://www.w3.org/1999/xhtml"?n?document.createElement(t,{is:n}):document.createElement(t):n?document.createElementNS(e,t,{is:n}):document.createElementNS(e,t)}function tr(t){if(t.nodeValue.length<65536)return;let e=t.nextSibling;for(;e!==null&&e.nodeType===3;)e.remove(),t.nodeValue+=e.nodeValue,e=t.nextSibling}function Gs(t){var e=q;if(e===null)return S.f|=rn,t;if((e.f&32768)===0&&(e.f&4)===0)throw t;$t(t,e)}function $t(t,e){if(!(e!==null&&(e.f&16384)!==0)){for(;e!==null;){if((e.f&128)!==0&&(e.f&33570816)===0){if((e.f&32768)===0)throw t;try{e.b.error(t);return}catch(n){t=n}}e=e.parent}throw t}}function Qs(t){q===null&&(S===null&&qs(t),ks()),jt&&$s(t)}function Xs(t,e){var n=e.last;n===null?e.last=e.first=t:(n.next=t,t.prev=n,e.last=t)}function St(t,e){var n=q;n!==null&&n.f&8192&&(t|=Jn);var r={ctx:R,deps:null,nodes:null,f:t|ct|512,first:null,fn:e,last:null,next:null,parent:n,b:n&&n.b,prev:null,teardown:null,wv:0,ac:null};$?.register_created_effect(r);var i=r;if((t&4)!==0)Ne!==null?Ne.push(r):re.ensure().schedule(r);else if(e!==null){try{pe(r)}catch(a){throw V(r),a}i.deps===null&&i.teardown===null&&i.nodes===null&&i.first===i.last&&!(i.f&524288)&&(i=i.first,t&16&&t&65536&&i!==null&&(i.f|=Gn))}if(i!==null&&(i.parent=n,n!==null&&Xs(i,n),S!==null&&(S.f&2)!==0&&(t&64)===0)){var s=S;(s.effects??(s.effects=[])).push(i)}return r}function er(){return S!==null&&!ot}function vi(t){const e=St(8,null);return N(e,tt),e.teardown=t,e}function kr(t){Qs("$effect");var e=q.f;if(!S&&(e&32)!==0&&R!==null&&!R.i){var n=R;(n.e??(n.e=[])).push(t)}else return di(t)}function di(t){return St(4|fs,t)}function Ys(t){re.ensure();const e=St(64|ge,t);return()=>{V(e)}}function Zs(t){re.ensure();const e=St(64|ge,t);return(n={})=>new Promise(r=>{n.outro?ie(e,()=>{V(e),r(void 0)}):(V(e),r(void 0))})}function Us(t){return St(4,t)}function to(t){return St(cs|ge,t)}function nr(t,e=0){return St(8|e,t)}function Mt(t,e=[],n=[],r=[]){Ns(r,e,n,i=>{St(8,()=>{t(...i.map(_))})})}function rr(t,e=0){return St(16|e,t)}function et(t){return St(32|ge,t)}function pi(t){var e=t.teardown;if(e!==null){const n=jt,r=S;qr(!0),nt(null);try{e.call(null)}catch(i){$t(i,t.parent)}finally{qr(n),nt(r)}}}function ir(t,e=!1){var n=t.first;for(t.first=t.last=null;n!==null;){const i=n.ac;i!==null&&ye(()=>{i.abort(Re)});var r=n.next;(n.f&64)!==0?n.parent=null:V(n,e),n=r}}function eo(t){for(var e=t.first;e!==null;){var n=e.next;!(e.f&32)&&V(e),e=n}}function V(t,e=!0){var n=!1;(e||t.f&262144)&&t.nodes!==null&&t.nodes.end!==null&&(no(t.nodes.start,t.nodes.end),n=!0),t.f|=pr,ir(t,e&&!n),Ce(t,0);var r=t.nodes&&t.nodes.t;if(r!==null)for(const s of r)s.stop();pi(t),t.f^=pr,t.f|=us;var i=t.parent;i!==null&&i.first!==null&&gi(t),t.next=t.prev=t.teardown=t.ctx=t.deps=t.fn=t.nodes=t.ac=t.b=null}function no(t,e){for(;t!==null;){var n=t===e?null:xt(t);t.remove(),t=n}}function gi(t){var e=t.parent,n=t.prev,r=t.next;n!==null&&(n.next=r),r!==null&&(r.prev=n),e!==null&&(e.first===t&&(e.first=r),e.last===t&&(e.last=n))}function ie(t,e,n=!0){var r=[];t.f|=256,mi(t,r,!0);var i=()=>{n&&V(t),e&&e()},s=r.length;if(s>0){var a=()=>--s||i();for(var l of r)l.out(a)}else i()}function mi(t,e,n){if((t.f&8192)===0){t.f^=Jn;var r=t.nodes&&t.nodes.t;if(r!==null)for(const l of r)(l.is_global||n)&&e.push(l);for(var i=t.first;i!==null;){var s=i.next;if((i.f&64)===0){var a=(i.f&65536)!==0||(i.f&32)!==0&&(t.f&16)!==0;mi(i,e,a?n:!1)}i=s}}}function vn(t){t.f&=-257,yi(t,!0)}function yi(t,e){if((t.f&256)===0&&(t.f&8192)!==0){t.f^=Jn,!(t.f&1024)&&(N(t,ct),re.ensure().schedule(t));for(var n=t.first;n!==null;){var r=n.next,i=(n.f&65536)!==0||(n.f&32)!==0;yi(n,i?e:!1),n=r}var s=t.nodes&&t.nodes.t;if(s!==null)for(const a of s)(a.is_global||e)&&a.in()}}function sr(t,e){if(t.nodes)for(var n=t.nodes.start,r=t.nodes.end;n!==null;){var i=n===r?null:xt(n);e.append(n),n=i}}var ro=null,tn=!1,jt=!1;function qr(t){jt=t}var S=null,ot=!1;function nt(t){S=t}var q=null;function qt(t){q=t}var lt=null;function wi(t){S!==null&&(S.f&2097152||S.f&2)&&(lt??(lt=new Set)).add(t)}var F=null,K=0,Y=null;function io(t){Y=t}var _i=1,Xt=0,Ut=Xt;function xr(t){Ut=t}function bi(){return++_i}function Be(t){var e=t.f;if((e&2048)!==0)return!0;if((e&4096)!==0){for(var n=t.deps,r=n.length,i=0;i<r;i++){var s=n[i];if(Be(s)&&Xr(s),s.wv>t.wv)return!0}e&512&&D===null&&N(t,tt)}return!1}function $i(t,e,n=!0){var r=t.reactions;if(r!==null&&!(!me&<!==null&<.has(t)))for(var i=0;i<r.length;i++){var s=r[i];(s.f&2)!==0?$i(s,e,!1):e===s&&(n?N(s,ct):s.f&1024&&N(s,ne),ni(s))}}function ki(t){var e=F,n=K,r=Y,i=S,s=lt,a=R,l=ot,f=Ut,u=t.f;F=null,K=0,Y=null,S=(u&96)===0?t:null,lt=null,he(t.ctx),ot=!1,Ut=++Xt,t.ac!==null&&(ye(()=>{t.ac.abort(Re)}),t.ac=null);try{t.f|=gr;var c=t.fn,v=c();t.f|=Kn;var d=Sr(t);if(Ie()&&Y!==null&&!ot&&d!==null&&(t.f&6146)===0)for(var h=0;h<Y.length;h++)$i(Y[h],t);if(i!==null&&i!==t){if(Xt++,i.deps!==null)for(let m=0;m<n;m+=1)i.deps[m].rv=Xt;if(e!==null)for(const m of e)m.rv=Xt;Y!==null&&(r===null?r=Y:r.push(...Y))}return t.f&8388608&&(t.f^=rn),v}catch(m){return Sr(t),Gs(m)}finally{t.f^=gr,F=e,K=n,Y=r,S=i,lt=s,he(a),ot=l,Ut=f}}function Sr(t){var e=t.deps,n=$?.is_fork;if(F!==null){var r;if(n||Ce(t,K),e!==null&&K>0)for(e.length=K+F.length,r=0;r<F.length;r++)e[K+r]=F[r];else t.deps=e=F;if(er()&&(t.f&512)!==0)for(r=K;r<e.length;r++){var i;((i=e[r]).reactions??(i.reactions=[])).push(t)}}else!n&&e!==null&&K<e.length&&(Ce(t,K),e.length=K);return e}function so(t,e){let n=e.reactions;if(n!==null){var r=es.call(n,t);if(r!==-1){var i=n.length-1;i===0?n=e.reactions=null:(n[r]=n[i],n.pop())}}if(n===null&&(e.f&2)!==0&&(F===null||!On.call(F,e))){var s=e;s.f&512&&(s.f^=512),s.v!==L&&Qn(s),s.ac!==null&&ye(()=>{s.ac.abort(Re),s.ac=null,N(s,ct)}),Rs(s),Ce(s,0)}}function Ce(t,e){var n=t.deps;if(n!==null)for(var r=e;r<n.length;r++)so(t,n[r])}function pe(t){var e=t.f;if((e&16384)===0){N(t,tt);var n=q,r=tn;q=t,tn=(e&96)===0;try{(e&16777232)!==0?eo(t):ir(t),pi(t);var i=ki(t);t.teardown=typeof i=="function"?i:null,t.wv=_i}finally{tn=r,q=n}}}async function oo(){if(me)return new Promise(t=>{requestAnimationFrame(()=>t()),setTimeout(()=>t())});await Promise.resolve(),st()}function _(t){var e=(t.f&2)!==0;if(ro?.add(t),S!==null&&!ot&&!(q!==null&&(q.f&16384)!==0)&&(lt===null||!lt.has(t))){var n=S.deps;if((S.f&2097152)!==0)t.rv<Xt&&(t.rv=Xt,F===null&&n!==null&&n[K]===t?K++:F===null?F=[t]:F.push(t));else{var r;(r=S).deps??(r.deps=[]),On.call(S.deps,t)||S.deps.push(t);var i=t.reactions;i===null?t.reactions=[S]:On.call(i,S)||i.push(S)}}if(jt&&bt.has(t))return bt.get(t);if(e){var s=t;if(jt){var a=s.v;return(!(s.f&1024)&&s.reactions!==null||xi(s))&&(a=Yn(s)),bt.set(s,a),a}var l=(s.f&512)===0&&!ot&&S!==null&&(tn||(S.f&512)!==0),f=(s.f&Kn)===0;Be(s)&&(l&&(s.f|=512),Xr(s)),l&&!f&&(Yr(s),qi(s))}if(D?.has(t))return D.get(t);if((t.f&8388608)!==0)throw t.v;return t.v}function qi(t){if(t.f|=512,t.deps!==null)for(const e of t.deps)(e.reactions??(e.reactions=[])).push(t),e.f&2&&!(e.f&512)&&(Yr(e),qi(e))}function xi(t){if(t.v===L)return!0;if(t.deps===null)return!1;for(const e of t.deps)if(bt.has(e)||(e.f&2)!==0&&xi(e))return!0;return!1}function Le(t){var e=ot;try{return ot=!0,t()}finally{ot=e}}var Ke=Symbol("events"),ao=new Set,Mr=new Set;function lo(t,e,n,r={}){function i(s){if(r.capture||Rn.call(e,s),!s.cancelBubble)return ye(()=>n?.call(this,s))}return t.startsWith("pointer")||t.startsWith("touch")||t==="wheel"?(i.__removed=!1,kt(()=>{i.__removed||e.addEventListener(t,i,r)})):e.addEventListener(t,i,r),i}function uo(t,e,n,r,i){var s={capture:r,passive:i},a=lo(t,e,n,s);(e===document.body||e===window||e===document||e instanceof HTMLMediaElement)&&vi(()=>{a.__removed=!0,e.removeEventListener(t,a,s)})}var xn=null,Sn=!1;function Rn(t){var e=this,n=e.ownerDocument,r=t.type,i=t.composedPath?.()||[],s=i[0]||t.target;xn=t,Sn||(Sn=!0,setTimeout(()=>{Sn=!1,xn=null}));var a=0,l=xn===t&&t[Ke];if(l){var f=i.indexOf(l);if(f!==-1&&(e===document||e===window)){t[Ke]=e;return}var u=i.indexOf(e);if(u===-1)return;f<=u&&(a=f)}if(s=i[a]||t.target,s!==e){Oe(t,"currentTarget",{configurable:!0,get(){return s||n}});var c=S,v=q;nt(null),qt(null);try{for(var d,h=[];s!==null&&s!==e;){try{var m=s[Ke]?.[r];m!=null&&(!s.disabled||t.target===s)&&m.call(s,t)}catch(x){d?h.push(x):d=x}if(t.cancelBubble)break;a++,s=a<i.length?i[a]:null}if(d){for(let x of h)queueMicrotask(()=>{throw x});throw d}}finally{t[Ke]=e,delete t.currentTarget,nt(c),qt(v)}}}var fo=globalThis?.window?.trustedTypes&&globalThis.window.trustedTypes.createPolicy("svelte-trusted-html",{createHTML:t=>t});function co(t){return fo?.createHTML(t)??t}function ho(t){var e=Un("template");return e.innerHTML=co(t.replaceAll("<!>","<!---->")),e.content}function fe(t,e){var n=q;n.nodes===null&&(n.nodes={start:t,end:e,a:null,t:null})}function ht(t,e){var n=(e&1)!==0,r=(e&2)!==0,i,s=!t.startsWith("<!>");return()=>{if(E)return fe(W,null),W;i===void 0&&(i=ho(s?t:"<!>"+t),n||(i=Dt(i)));var a=r||li?document.importNode(i,!0):i.cloneNode(!0);if(n){var l=Dt(a),f=a.lastChild;fe(l,f)}else fe(a,a);return a}}function vo(){if(E)return fe(W,null),W;var t=document.createDocumentFragment(),e=document.createComment(""),n=U();return t.append(e,n),fe(e,n),t}function H(t,e){if(E){var n=q;(!(n.f&32768)||n.nodes.end===null)&&(n.nodes.end=W),yn();return}t!==null&&t.before(e)}var po=["touchstart","touchmove"];function go(t){return po.includes(t)}function mo(t){let e=0,n=ee(0),r;return()=>{er()&&(_(n),nr(()=>(e===0&&(r=Le(()=>t(()=>Pe(n)))),e+=1,()=>{kt(()=>{e-=1,e===0&&(r?.(),r=void 0,Pe(n))})})))}}var yo=Gn|ge;function wo(t,e,n,r){new _o(t,e,n,r)}var ut=new WeakMap,In=new WeakMap,_t=new WeakMap,ze=new WeakMap,G=new WeakMap,ft=new WeakMap,Q=new WeakMap,at=new WeakMap,Bt=new WeakMap,ae=new WeakMap,te=new WeakMap,Ge=new WeakMap,Bn=new WeakMap,Dn=new WeakMap,Ht=new WeakMap,Wr=new WeakMap,z=new WeakSet,_o=class{constructor(t,e,n,r){Zn(this,z),T(this,"parent",void 0),T(this,"is_pending",!1),T(this,"transform_error",void 0),b(this,ut,void 0),b(this,In,E?W:null),b(this,_t,void 0),b(this,ze,void 0),b(this,G,void 0),b(this,ft,null),b(this,Q,null),b(this,at,null),b(this,Bt,null),b(this,ae,0),b(this,te,0),b(this,Ge,!1),b(this,Bn,new Set),b(this,Dn,new Set),b(this,Ht,null),b(this,Wr,mo(()=>(y(Ht,this,ee(o(ae,this))),()=>{y(Ht,this,null)}))),y(ut,this,t),y(_t,this,e),y(ze,this,i=>{var s=q;s.b=this,s.f|=128,n(i)}),this.parent=q.b,this.transform_error=r??this.parent?.transform_error??(i=>i),y(G,this,rr(()=>{if(E){const i=o(In,this);yn();const s=i.data==="[!";if(i.data.startsWith("[?")){const a=JSON.parse(i.data.slice(2));k(z,this,$o).call(this,a)}else s?k(z,this,ko).call(this):k(z,this,bo).call(this)}else k(z,this,Mi).call(this)},yo)),E&&y(ut,this,W)}defer_effect(t){Kr(t,o(Bn,this),o(Dn,this))}is_rendered(){return!this.is_pending&&(!this.parent||this.parent.is_rendered())}has_pending_snippet(){return!!o(_t,this).pending}update_pending_count(t,e){k(z,this,Wi).call(this,t,e),y(ae,this,o(ae,this)+t),o(Ht,this)&&!o(Ge,this)&&(y(Ge,this,!0),kt(()=>{y(Ge,this,!1),o(Ht,this)&&de(o(Ht,this),o(ae,this))}))}get_effect_pending(){return o(Wr,this).call(this),_(o(Ht,this))}error(t){if(!o(_t,this).onerror&&!o(_t,this).failed)throw t;$?.is_fork?(o(ft,this)&&$.skip_effect(o(ft,this)),o(Q,this)&&$.skip_effect(o(Q,this)),o(at,this)&&$.skip_effect(o(at,this)),$.oncommit(()=>{k(z,this,Er).call(this,t)})):k(z,this,Er).call(this,t)}};function bo(){try{y(ft,this,et(()=>o(ze,this).call(this,o(ut,this))))}catch(t){this.error(t)}}function $o(t){const e=o(_t,this).failed,{reset:n,invoke_onerror:r}=k(z,this,Si).call(this,t);kt(r),e&&y(at,this,et(()=>{e(o(ut,this),()=>t,()=>n)}))}function Si(t){var e=!1,n=!1;const r=()=>{if(e){ms();return}e=!0,n&&Ps(),o(at,this)!==null&&ie(o(at,this),()=>{y(at,this,null)}),k(z,this,or).call(this,()=>{k(z,this,Mi).call(this)})};return{reset:r,invoke_onerror:()=>{try{n=!0,o(_t,this).onerror?.(t,r),n=!1}catch(i){$t(i,o(G,this)&&o(G,this).parent)}}}}function ko(){const t=o(_t,this).pending;t&&(this.is_pending=!0,y(Q,this,et(()=>t(o(ut,this)))),kt(()=>{var e=y(Bt,this,document.createDocumentFragment()),n=U(),r=!1;if(e.append(n),y(ft,this,k(z,this,or).call(this,()=>{try{return et(()=>o(ze,this).call(this,n))}catch(i){try{this.error(i),r=!0}catch(s){$t(s,o(G,this).parent)}return null}})),o(ft,this)===null){y(Bt,this,null),r&&k(z,this,dn).call(this,$);return}o(te,this)===0&&(o(ut,this).before(e),y(Bt,this,null),ie(o(Q,this),()=>{y(Q,this,null)}),k(z,this,dn).call(this,$))}))}function Mi(){try{if(this.is_pending=this.has_pending_snippet(),y(te,this,0),y(ae,this,0),y(ft,this,et(()=>{o(ze,this).call(this,o(ut,this))})),o(te,this)>0){var t=y(Bt,this,document.createDocumentFragment());sr(o(ft,this),t);const e=o(_t,this).pending;y(Q,this,et(()=>e(o(ut,this))))}else k(z,this,dn).call(this,$)}catch(e){this.error(e)}}function dn(t){this.is_pending=!1,t.transfer_effects(o(Bn,this),o(Dn,this))}function or(t){var e=q,n=S,r=R;qt(o(G,this)),nt(o(G,this)),he(o(G,this).ctx);try{return re.ensure(),t()}finally{qt(e),nt(n),he(r)}}function Wi(t,e){if(!this.has_pending_snippet()){if(this.parent){var n;k(z,n=this.parent,Wi).call(n,t,e)}return}y(te,this,o(te,this)+t),o(te,this)===0&&(k(z,this,dn).call(this,e),o(Q,this)&&ie(o(Q,this),()=>{y(Q,this,null)}),o(Bt,this)&&(o(ut,this).before(o(Bt,this)),y(Bt,this,null)))}function Er(t){o(ft,this)&&(V(o(ft,this)),y(ft,this,null)),o(Q,this)&&(V(o(Q,this)),y(Q,this,null)),o(at,this)&&(V(o(at,this)),y(at,this,null)),E&&(J(o(In,this)),ys(),J(sn()));let e=o(_t,this).failed;const n=r=>{const{reset:i,invoke_onerror:s}=k(z,this,Si).call(this,r);s(),e&&y(at,this,k(z,this,or).call(this,()=>{try{return et(()=>{var a=q;a.b=this,a.f|=128,e(o(ut,this),()=>r,()=>i)})}catch(a){return $t(a,o(G,this).parent),null}}))};kt(()=>{var r;try{r=this.transform_error(t)}catch(i){$t(i,o(G,this)&&o(G,this).parent);return}r!==null&&typeof r=="object"&&typeof r.then=="function"?r.then(n,i=>$t(i,o(G,this)&&o(G,this).parent)):n(r)})}function Wt(t,e){var n=e==null?"":typeof e=="object"?`${e}`:e;n!==(t[Ue]??(t[Ue]=t.nodeValue))&&(t[Ue]=n,t.nodeValue=`${n}`)}function Ei(t,e){return Ti(t,e)}function qo(t,e){zn(),e.intro=e.intro??!1;const n=e.target,r=E,i=W;try{for(var s=Dt(n);s&&(s.nodeType!==8||s.data!=="[");)s=xt(s);if(!s)throw ce;Pt(!0),J(s);const a=Ti(t,{...e,anchor:s});return Pt(!1),a}catch(a){if(a instanceof Error&&a.message.split(`
|
|
2
|
+
`).some(l=>l.startsWith("https://svelte.dev/e/")))throw a;return a!==ce&&console.warn("Failed to hydrate: ",a),e.recover===!1&&Ss(),zn(),ci(n),Pt(!1),Ei(t,e)}finally{Pt(r),J(i)}}var Qe=new Map;function Ti(t,{target:e,anchor:n,props:r={},events:i,context:s,intro:a=!0,transformError:l}){zn();var f=void 0,u=Zs(()=>{var c=n??e.appendChild(U());wo(c,{pending:()=>{}},h=>{Vr({});var m=R;if(s&&(m.c=s),i&&(r.$$events=i),E&&fe(h,null),f=t(h,r)||Fr(),E&&(q.nodes.end=W,W===null||W.nodeType!==8||W.data!=="]"))throw mn(),ce;Hr()},l);var v=new Set,d=h=>{for(var m=0;m<h.length;m++){var x=h[m];if(!v.has(x)){v.add(x);var p=go(x);for(const j of[e,document]){var g=Qe.get(j);g===void 0&&(g=new Map,Qe.set(j,g));var O=g.get(x);O===void 0?(j.addEventListener(x,Rn,{passive:p}),g.set(x,1)):g.set(x,O+1)}}}};return d(gn(ao)),Mr.add(d),()=>{for(var h of v)for(const p of[e,document]){var m=Qe.get(p),x=m.get(h);--x==0?(p.removeEventListener(h,Rn),m.delete(h),m.size===0&&Qe.delete(p)):m.set(h,x)}Mr.delete(d),c!==n&&c.parentNode?.removeChild(c)}});return Vn.set(f,u),f}var Vn=new WeakMap;function xo(t,e){const n=Vn.get(t);return n?(Vn.delete(t),n(e)):Promise.resolve()}var Et=new WeakMap,Lt=new WeakMap,it=new WeakMap,$e=new WeakMap,Mn=new WeakMap,Wn=new WeakMap,Tr=new WeakMap,So=class{constructor(t,e=!0){T(this,"anchor",void 0),b(this,Et,new Map),b(this,Lt,new Map),b(this,it,new Map),b(this,$e,new Set),b(this,Mn,!0),b(this,Wn,n=>{if(o(Et,this).has(n)){var r=o(Et,this).get(n),i=o(Lt,this).get(r);if(i)vn(i),o($e,this).delete(r);else{var s=o(it,this).get(r);s&&(vn(s.effect),o(Lt,this).set(r,s.effect),o(it,this).delete(r),s.fragment.lastChild.remove(),this.anchor.before(s.fragment),i=s.effect)}for(const[a,l]of o(Et,this)){if(o(Et,this).delete(a),a===n)break;const f=o(it,this).get(l);f&&(V(f.effect),o(it,this).delete(l))}for(const[a,l]of o(Lt,this)){if(a===r||o($e,this).has(a))continue;const f=()=>{if(Array.from(o(Et,this).values()).includes(a)){var u=document.createDocumentFragment();sr(l,u),u.append(U()),o(it,this).set(a,{effect:l,fragment:u})}else V(l);o($e,this).delete(a),o(Lt,this).delete(a)};o(Mn,this)||!i?(o($e,this).add(a),ie(l,f,!1)):f()}}}),b(this,Tr,n=>{o(Et,this).delete(n);const r=Array.from(o(Et,this).values());for(const[i,s]of o(it,this))r.includes(i)||(V(s.effect),o(it,this).delete(i))}),this.anchor=t,y(Mn,this,e)}ensure(t,e){var n=$,r=hi();if(e&&!o(Lt,this).has(t)&&!o(it,this).has(t))if(r){var i=document.createDocumentFragment(),s=U();i.append(s),o(it,this).set(t,{effect:et(()=>e(s)),fragment:i})}else o(Lt,this).set(t,et(()=>e(this.anchor)));if(o(Et,this).set(n,t),r){for(const[a,l]of o(Lt,this))a===t?n.unskip_effect(l):n.skip_effect(l);for(const[a,l]of o(it,this))a===t?n.unskip_effect(l.effect):n.skip_effect(l.effect);n.oncommit(o(Wn,this)),n.ondiscard(o(Tr,this))}else E&&(this.anchor=W),o(Wn,this).call(this,n)}};function ke(t,e,n=!1){var r;E&&(r=W,yn());var i=new So(t),s=n?Gn:0;function a(l,f){if(E){var u=Ir(r);if(l!==parseInt(u.substring(1))){var c=sn();J(c),i.anchor=c,Pt(!1),i.ensure(l,f),Pt(!0);return}}i.ensure(l,f)}rr(()=>{var l=!1;e((f,u=0)=>{l=!0,a(u,f)}),l||a(-1,null)},s)}function Mo(t,e){return e}function Wo(t,e,n){for(var r=[],i=e.length,s,a=e.length,l=0;l<i;l++){let v=e[l];ie(v,()=>{if(s){if(s.pending.delete(v),s.done.add(v),s.pending.size===0){var d=t.outrogroups;Hn(t,gn(s.done)),d.delete(s),d.size===0&&(t.outrogroups=null)}}else a-=1},!1)}if(a===0){var f=r.length===0&&n!==null&&t.pending.size===0;if(f){var u=n,c=u.parentNode;ci(c),c.append(u),t.items.clear()}Hn(t,e,!f)}else s={pending:new Set(e),done:new Set},(t.outrogroups??(t.outrogroups=new Set)).add(s)}function Hn(t,e,n=!0){var r;if(t.pending.size>0){r=new Set;for(const a of t.pending.values())for(const l of a)r.add(t.items.get(l).e)}for(var i=0;i<e.length;i++){var s=e[i];r?.has(s)?(s.f|=We,sr(s,document.createDocumentFragment())):V(e[i],n)}}var Xe;function Pr(t,e,n,r,i,s=null){var a=t,l=new Map;if((e&4)!==0){var f=t;a=E?J(Dt(f)):f.appendChild(U())}E&&yn();var u=null,c=Xn(()=>{var g=n();return Nr(g)?g:g==null?[]:gn(g)}),v,d=new Map,h=!0;function m(g){!(p.effect.f&16384)&&(p.pending.delete(g),p.fallback=u,Eo(p,v,a,e,r),u!==null&&(v.length===0?(u.f&33554432)===0?vn(u):(u.f^=We,Me(u,null,a)):ie(u,()=>{u=null})))}function x(g){p.pending.delete(g)}var p={effect:rr(()=>{v=_(c);var g=v.length;let O=!1;E&&Ir(a)==="[!"!=(g===0)&&(a=sn(),J(a),Pt(!1),O=!0);for(var j=new Set,M=$,w=hi(),A=0;A<g;A+=1){E&&W.nodeType===8&&W.data==="]"&&(a=W,O=!0,Pt(!1));var I=v[A],rt=r(I,A),B=h?null:l.get(rt);B?(B.v&&de(B.v,I),B.i&&de(B.i,A),w&&M.unskip_effect(B.e)):(B=To(l,h?a:Xe??(Xe=U()),I,rt,A,i,e,n),h||(B.e.f|=We),l.set(rt,B)),j.add(rt)}if(g===0&&s&&!u&&(h?u=et(()=>s(a)):(u=et(()=>s(Xe??(Xe=U()))),u.f|=We)),g>j.size&&bs("","",""),E&&g>0&&J(sn()),!h)if(d.set(M,j),w){for(const[vt,De]of l)j.has(vt)||M.skip_effect(De.e);M.oncommit(m),M.ondiscard(x)}else m(M);O&&Pt(!0),_(c)}),flags:e,items:l,pending:d,outrogroups:null,fallback:u};h=!1,E&&(a=W)}function qe(t){for(;t!==null&&(t.f&32)===0;)t=t.next;return t}function Eo(t,e,n,r,i){var s=(r&8)!==0,a=e.length,l=t.items,f=qe(t.effect.first),u,c=null,v,d=[],h=[],m,x,p,g;if(s)for(g=0;g<a;g+=1)m=e[g],x=i(m,g),p=l.get(x).e,!(p.f&33554432)&&(p.nodes?.a?.measure(),(v??(v=new Set)).add(p));for(g=0;g<a;g+=1){if(m=e[g],x=i(m,g),p=l.get(x).e,t.outrogroups!==null)for(const vt of t.outrogroups)vt.pending.delete(p),vt.done.delete(p);if(p.f&8192&&(vn(p),s&&(p.nodes?.a?.unfix(),(v??(v=new Set)).delete(p))),(p.f&33554432)!==0)if(p.f^=We,p===f)Me(p,null,n);else{var O=c?c.next:f;p===t.effect.last&&(t.effect.last=p.prev),p.prev&&(p.prev.next=p.next),p.next&&(p.next.prev=p.prev),zt(t,c,p),zt(t,p,O),Me(p,O,n),c=p,d=[],h=[],f=qe(c.next);continue}if(p!==f){if(u!==void 0&&u.has(p)){if(d.length<h.length){var j=h[0],M;c=j.prev;var w=d[0],A=d[d.length-1];for(M=0;M<d.length;M+=1)Me(d[M],j,n);for(M=0;M<h.length;M+=1)u.delete(h[M]);zt(t,w.prev,A.next),zt(t,c,w),zt(t,A,j),f=j,c=A,g-=1,d=[],h=[]}else u.delete(p),Me(p,f,n),zt(t,p.prev,p.next),zt(t,p,c===null?t.effect.first:c.next),zt(t,c,p),c=p;continue}for(d=[],h=[];f!==null&&f!==p;)(u??(u=new Set)).add(f),h.push(f),f=qe(f.next);if(f===null)continue}!(p.f&33554432)&&d.push(p),c=p,f=qe(p.next)}if(t.outrogroups!==null){for(const vt of t.outrogroups)vt.pending.size===0&&(Hn(t,gn(vt.done)),t.outrogroups?.delete(vt));t.outrogroups.size===0&&(t.outrogroups=null)}if(f!==null||u!==void 0){var I=[];if(u!==void 0)for(p of u)!(p.f&8192)&&I.push(p);for(;f!==null;)!(f.f&8192)&&f!==t.fallback&&I.push(f),f=qe(f.next);var rt=I.length;if(rt>0){var B=(r&4)!==0&&a===0?n:null;if(s){for(g=0;g<rt;g+=1)I[g].nodes?.a?.measure();for(g=0;g<rt;g+=1)I[g].nodes?.a?.fix()}Wo(t,I,B)}}s&&kt(()=>{if(v!==void 0)for(p of v)p.nodes?.a?.apply()})}function To(t,e,n,r,i,s,a,l){var f=(a&1)!==0?(a&16)===0?oi(n,!1,!1):ee(n):null,u=(a&2)!==0?ee(i):null;return{v:f,i:u,e:et(()=>(s(e,f??n,u??i,l),()=>{t.delete(r)}))}}function Me(t,e,n){if(t.nodes)for(var r=t.nodes.start,i=t.nodes.end,s=e&&(e.f&33554432)===0?e.nodes.start:n;r!==null;){var a=xt(r);if(s.before(r),r===i)return;r=a}}function zt(t,e,n){e===null?t.effect.first=n:e.next=n,n===null?t.effect.last=e:n.prev=e}function Po(t,e){Us(()=>{t=q?.parent?.nodes?.start??t;var n=t.getRootNode(),r=n.host?n:n.head??n.ownerDocument.head;if(!r.querySelector("#"+e.hash)){const i=Un("style");i.id=e.hash,i.textContent=e.code,r.appendChild(i)}})}var Oo=Symbol("is custom element"),jo=Symbol("is html"),Ao=ps?"link":"LINK";function No(t){if(E){var e=!1,n=()=>{if(!e){if(e=!0,t.hasAttribute("value")){var r=t.value;Fn(t,"value",null),t.value=r}if(t.hasAttribute("checked")){var i=t.checked;Fn(t,"checked",null),t.checked=i}}};t[Ee]=n,kt(n),Gr()}}function Fn(t,e,n,r){var i=Co(t);E&&(i[e]=t.getAttribute(e),e==="src"||e==="srcset"||e==="href"&&t.nodeName===Ao)||i[e]!==(i[e]=n)&&(e==="loading"&&(t[hs]=n),n==null?t.removeAttribute(e):typeof n!="string"&&Lo(t).has(e)?t[e]=n:t.setAttribute(e,n))}function Co(t){return t[jn]??(t[jn]={[Oo]:t.nodeName.includes("-"),[jo]:t.namespaceURI==="http://www.w3.org/1999/xhtml"})}var Or=new Map;function Lo(t){var e=t.getAttribute("is")||t.nodeName,n=Or.get(e);if(n)return n;Or.set(e,n=new Set);for(var r,i=t,s=Element.prototype;s!==i;){r=ns(i);for(var a in r)r[a].set&&a!=="innerHTML"&&a!=="textContent"&&a!=="innerText"&&n.add(a);i=Cr(i)}return n}function zo(t,e,n=e){var r=new WeakSet;As(t,"input",async i=>{var s=i?t.defaultValue:t.value;if(s=En(t)?Tn(s):s,n(s),$!==null&&r.add($),await oo(),s!==(s=e())){var a=t.selectionStart,l=t.selectionEnd,f=t.value.length;if(t.value=s??"",l!==null){var u=t.value.length;a===l&&l===f&&u>f?(t.selectionStart=u,t.selectionEnd=u):(t.selectionStart=a,t.selectionEnd=Math.min(l,u))}}}),(E&&t.defaultValue!==t.value||Le(e)==null&&t.value)&&(n(En(t)?Tn(t.value):t.value),$!==null&&r.add($)),nr(()=>{var i=e();if(t===document.activeElement){var s=me?an:$;if(r.has(s))return}En(t)&&i===Tn(t.value)||t.type==="date"&&!i&&!t.value||i!==t.value&&(t.value=i??"")})}function En(t){var e=t.type;return e==="number"||e==="range"}function Tn(t){return t===""?null:+t}var Pi,le=new WeakMap,pn=new WeakMap,Pn=new WeakMap,jr=new WeakSet,Oi=class{constructor(t){Zn(this,jr),b(this,le,new WeakMap),b(this,pn,void 0),b(this,Pn,void 0),y(Pn,this,t)}observe(t,e){var n=o(le,this).get(t)||new Set;return n.add(e),o(le,this).set(t,n),k(jr,this,Ro).call(this).observe(t,o(Pn,this)),()=>{var r=o(le,this).get(t);r.delete(e),r.size===0&&(o(le,this).delete(t),o(pn,this).unobserve(t))}}};Pi=Oi;function Ro(){return o(pn,this)??y(pn,this,new ResizeObserver(t=>{for(var e of t){Pi.entries.set(e.target,e);for(var n of o(le,this).get(e.target)||[])n(e)}}))}T(Oi,"entries",new WeakMap);var Ye=!1;function Io(t){var e=Ye;try{return Ye=!1,[t(),Ye]}finally{Ye=e}}function Tt(t,e,n,r){var i=!wn||(n&2)!==0,s=(n&8)!==0,a=(n&16)!==0,l=r,f=!0,u=void 0,c=()=>a&&i?(u??(u=Ae(r)),_(u)):(f&&(f=!1,l=a?Le(r):r),l);let v;if(s){var d=Ze in t||Rr in t;v=Yt(t,e)?.set??(d&&e in t?M=>t[e]=M:void 0)}var h,m=!1;s?[h,m]=Io(()=>t[e]):h=t[e],h===void 0&&r!==void 0&&(h=c(),v&&(i&&Ms(e),v(h)));var x;if(i?x=()=>{var M=t[e];return M===void 0?c():(f=!0,M)}:x=()=>{var M=t[e];return M!==void 0&&(l=void 0),M===void 0?l:M},i&&(n&4)===0)return x;if(v){var p=t.$$legacy;return(function(M,w){return arguments.length>0?((!i||!w||p||m)&&v(w?x():M),M):x()})}var g=!1,O=((n&1)!==0?Ae:Xn)(()=>(g=!1,x()));s&&_(O);var j=q;return(function(M,w){if(arguments.length>0){const A=w?_(O):i&&s?Qt(M):M;return Z(O,A),g=!0,l!==void 0&&(l=A),M}return jt&&g||(j.f&16384)!==0?O.v:_(O)})}function Bo(t){return new Do(t)}var Ft=new WeakMap,pt=new WeakMap,Do=class{constructor(t){b(this,Ft,void 0),b(this,pt,void 0);var e=new Map,n=(i,s)=>{var a=oi(s,!1,!1);return e.set(i,a),a};const r=new Proxy({...t.props||{},$$events:{}},{get(i,s){return _(e.get(s)??n(s,Reflect.get(i,s)))},has(i,s){return s===Rr?!0:(_(e.get(s)??n(s,Reflect.get(i,s))),Reflect.has(i,s))},set(i,s,a){return Z(e.get(s)??n(s,a),a),Reflect.set(i,s,a)}});y(pt,this,(t.hydrate?qo:Ei)(t.component,{target:t.target,anchor:t.anchor,props:r,context:t.context,intro:t.intro??!1,recover:t.recover,transformError:t.transformError})),(!t?.props?.$$host||t.sync===!1)&&st(),y(Ft,this,r.$$events);for(const i of Object.keys(o(pt,this)))i==="$set"||i==="$destroy"||i==="$on"||Oe(this,i,{get(){return o(pt,this)[i]},set(s){o(pt,this)[i]=s},enumerable:!0});o(pt,this).$set=i=>{Object.assign(r,i)},o(pt,this).$destroy=()=>{xo(o(pt,this))}}$set(t){o(pt,this).$set(t)}$on(t,e){o(Ft,this)[t]=o(Ft,this)[t]||[];const n=(...r)=>e.call(this,...r);return o(Ft,this)[t].push(n),()=>{o(Ft,this)[t]=o(Ft,this)[t].filter(r=>r!==n)}}$destroy(){o(pt,this).$destroy()}},ji;typeof HTMLElement=="function"&&(ji=class extends HTMLElement{constructor(t,e,n){super(),T(this,"$$ctor",void 0),T(this,"$$s",void 0),T(this,"$$c",void 0),T(this,"$$cn",!1),T(this,"$$d",{}),T(this,"$$r",!1),T(this,"$$p_d",{}),T(this,"$$l",{}),T(this,"$$l_u",new Map),T(this,"$$me",void 0),T(this,"$$shadowRoot",null),this.$$ctor=t,this.$$s=e,n&&(this.$$shadowRoot=this.attachShadow(n))}addEventListener(t,e,n){if(this.$$l[t]=this.$$l[t]||[],this.$$l[t].push(e),this.$$c){const r=this.$$c.$on(t,e);this.$$l_u.set(e,r)}super.addEventListener(t,e,n)}removeEventListener(t,e,n){if(super.removeEventListener(t,e,n),this.$$c){const r=this.$$l_u.get(e);r&&(r(),this.$$l_u.delete(e))}}async connectedCallback(){if(this.$$cn=!0,!this.$$c){let t=function(r){return i=>{const s=Un("slot");r!=="default"&&(s.name=r),H(i,s)}};if(await Promise.resolve(),!this.$$cn||this.$$c)return;const e={},n=Vo(this);for(const r of this.$$s)r in n&&(r==="default"&&!this.$$d.children?(this.$$d.children=t(r),e.default=!0):e[r]=t(r));for(const r of this.attributes){const i=this.$$g_p(r.name);i in this.$$d||(this.$$d[i]=en(i,r.value,this.$$p_d,"toProp"))}for(const r in this.$$p_d)!(r in this.$$d)&&this[r]!==void 0&&(this.$$d[r]=this[r],delete this[r]);this.$$c=Bo({component:this.$$ctor,target:this.$$shadowRoot||this,props:{...this.$$d,$$slots:e,$$host:this}}),this.$$me=Ys(()=>{nr(()=>{this.$$r=!0;for(const r of nn(this.$$c)){if(!this.$$p_d[r]?.reflect)continue;this.$$d[r]=this.$$c[r];const i=en(r,this.$$d[r],this.$$p_d,"toAttribute");i==null?this.removeAttribute(this.$$p_d[r].attribute||r):this.setAttribute(this.$$p_d[r].attribute||r,i)}this.$$r=!1})});for(const r in this.$$l)for(const i of this.$$l[r]){const s=this.$$c.$on(r,i);this.$$l_u.set(i,s)}this.$$l={}}}attributeChangedCallback(t,e,n){this.$$r||(t=this.$$g_p(t),this.$$d[t]=en(t,n,this.$$p_d,"toProp"),this.$$c?.$set({[t]:this.$$d[t]}))}disconnectedCallback(){this.$$cn=!1,Promise.resolve().then(()=>{!this.$$cn&&this.$$c&&(this.$$c.$destroy(),this.$$me(),this.$$c=void 0)})}$$g_p(t){return nn(this.$$p_d).find(e=>this.$$p_d[e].attribute===t||!this.$$p_d[e].attribute&&e.toLowerCase()===t)||t}});function en(t,e,n,r){const i=n[t]?.type;if(e=i==="Boolean"&&typeof e!="boolean"?e!=null:e,!r||!n[t])return e;if(r==="toAttribute")switch(i){case"Object":case"Array":return e==null?null:JSON.stringify(e);case"Boolean":return e?"":null;case"Number":return e??null;default:return e}else switch(i){case"Object":case"Array":return e&&JSON.parse(e);case"Boolean":return e;case"Number":return e!=null?+e:e;default:return e}}function Vo(t){const e={};return t.childNodes.forEach(n=>{e[n.slot||"default"]=!0}),e}function Ho(t,e,n,r,i,s){let a=class extends ji{constructor(){super(t,n,i),this.$$p_d=e}static get observedAttributes(){return nn(e).map(l=>(e[l].attribute||l).toLowerCase())}};return nn(e).forEach(l=>{Oe(a.prototype,l,{get(){return this.$$c&&l in this.$$c?this.$$c[l]:this.$$d[l]},set(f){f=en(l,f,e),this.$$d[l]=f;var u=this.$$c;u&&(Yt(u,l)?.get?u[l]=f:u.$set({[l]:f}))}})}),r.forEach(l=>{Oe(a.prototype,l,{get(){return this.$$c?.[l]}})}),s&&(a=s(a)),t.element=a,a}var Ai="dictionary";function Fo(t){if(!t||typeof t!="object")return null;const e=t,n=typeof e.word=="string"?e.word.trim():"";if(!n)return null;const r=Array.isArray(e.senses)?e.senses:[],i=[];for(const s of r){if(!s||typeof s!="object")continue;const a=s,l=typeof a.definition=="string"?a.definition.trim():"";l&&i.push({definition:l,partOfSpeech:typeof a.partOfSpeech=="string"?a.partOfSpeech:void 0,example:typeof a.example=="string"?a.example:void 0})}return i.length===0?null:{word:n,pronunciation:typeof e.pronunciation=="string"?e.pronunciation:void 0,senses:i}}function Jo(t){return Yi(t,{serviceLabel:Ai,keys:["entries"],toItem:Fo})}function Ko(t){return Zi({...t,serviceLabel:Ai,readResponse:Jo})}var Go=ht('<p class="pie-tool-dictionary__notice svelte-1qfqsgt">No dictionary service is configured for this assessment.</p>'),Qo=ht('<p class="pie-tool-dictionary__notice svelte-1qfqsgt">Type a word to look it up.</p>'),Ar=ht('<p class="pie-tool-dictionary__notice svelte-1qfqsgt"> </p>'),Xo=ht('<p class="pie-tool-dictionary__error svelte-1qfqsgt" role="alert"> </p>'),Yo=ht('<span class="pie-tool-dictionary__pronunciation svelte-1qfqsgt"> </span>'),Zo=ht('<span class="pie-tool-dictionary__pos svelte-1qfqsgt"> </span>'),Uo=ht('<span class="pie-tool-dictionary__example svelte-1qfqsgt"> </span>'),ta=ht('<li class="pie-tool-dictionary__sense svelte-1qfqsgt"><!> <span class="pie-tool-dictionary__definition"> </span> <!></li>'),ea=ht('<li class="pie-tool-dictionary__entry svelte-1qfqsgt"><p class="pie-tool-dictionary__word svelte-1qfqsgt"> <!></p> <ol class="pie-tool-dictionary__senses svelte-1qfqsgt"></ol></li>'),na=ht('<ul class="pie-tool-dictionary__entries svelte-1qfqsgt"></ul>'),ra=ht('<div class="pie-tool-dictionary svelte-1qfqsgt" role="dialog" aria-label="Dictionary"><form class="pie-tool-dictionary__search svelte-1qfqsgt"><label class="pie-tool-dictionary__label svelte-1qfqsgt" for="pie-tool-dictionary-term">Word or phrase</label> <div class="pie-tool-dictionary__row svelte-1qfqsgt"><input id="pie-tool-dictionary-term" class="pie-tool-dictionary__input svelte-1qfqsgt" type="text" autocomplete="off" spellcheck="false"/> <button class="pie-tool-dictionary__submit svelte-1qfqsgt" type="submit">Look up</button></div></form> <div class="pie-tool-dictionary__status svelte-1qfqsgt" role="status" aria-live="polite"> </div> <div class="pie-tool-dictionary__body svelte-1qfqsgt"><!></div></div>'),ia={hash:"svelte-1qfqsgt",code:`.pie-tool-dictionary.svelte-1qfqsgt {display:flex;flex-direction:column;gap:0.5rem;height:100%;min-height:0;padding:0.75rem;box-sizing:border-box;color:var(--pie-text, #1f2937);background:var(--pie-background, #fff);font-size:0.95rem;}.pie-tool-dictionary__search.svelte-1qfqsgt {display:flex;flex-direction:column;gap:0.25rem;}.pie-tool-dictionary__label.svelte-1qfqsgt {font-size:0.8rem;font-weight:600;}.pie-tool-dictionary__row.svelte-1qfqsgt {display:flex;gap:0.5rem;}.pie-tool-dictionary__input.svelte-1qfqsgt {flex:1 1 auto;min-width:0;padding:0.35rem 0.5rem;border:1px solid var(--pie-border-light, #e5e7eb);border-radius:0.375rem;background:var(--pie-background, #fff);color:inherit;font:inherit;}.pie-tool-dictionary__submit.svelte-1qfqsgt {flex:0 0 auto;padding:0.35rem 0.75rem;border:1px solid var(--pie-border-light, #e5e7eb);border-radius:0.375rem;background:var(--pie-secondary-background, #f9fafb);color:inherit;font:inherit;cursor:pointer;}.pie-tool-dictionary__submit.svelte-1qfqsgt:disabled {opacity:0.5;cursor:not-allowed;}
|
|
3
3
|
|
|
4
4
|
/* Visible focus is not optional: this panel is the keyboard route into the tool. */.pie-tool-dictionary__input.svelte-1qfqsgt:focus-visible,
|
|
5
5
|
.pie-tool-dictionary__submit.svelte-1qfqsgt:focus-visible {outline:2px solid var(--pie-button-focus-outline, #2563eb);outline-offset:2px;}.pie-tool-dictionary__status.svelte-1qfqsgt {position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap;border:0;}.pie-tool-dictionary__body.svelte-1qfqsgt {flex:1 1 auto;min-height:0;overflow-y:auto;}.pie-tool-dictionary__notice.svelte-1qfqsgt,
|
|
6
6
|
.pie-tool-dictionary__error.svelte-1qfqsgt {margin:0.25rem 0;}.pie-tool-dictionary__entries.svelte-1qfqsgt,
|
|
7
|
-
.pie-tool-dictionary__senses.svelte-1qfqsgt {margin:0;padding:0 0 0 1.1rem;}.pie-tool-dictionary__entries.svelte-1qfqsgt {list-style:none;padding-left:0;}.pie-tool-dictionary__entry.svelte-1qfqsgt + .pie-tool-dictionary__entry:where(.svelte-1qfqsgt) {margin-top:0.75rem;padding-top:0.75rem;border-top:1px solid var(--pie-border-light, #e5e7eb);}.pie-tool-dictionary__word.svelte-1qfqsgt {margin:0 0 0.25rem;font-weight:700;}.pie-tool-dictionary__pronunciation.svelte-1qfqsgt {margin-left:0.4rem;font-weight:400;opacity:0.75;}.pie-tool-dictionary__sense.svelte-1qfqsgt {margin-bottom:0.35rem;}.pie-tool-dictionary__pos.svelte-1qfqsgt {margin-right:0.3rem;font-style:italic;opacity:0.8;}.pie-tool-dictionary__example.svelte-1qfqsgt {display:block;opacity:0.8;}`};function
|
|
7
|
+
.pie-tool-dictionary__senses.svelte-1qfqsgt {margin:0;padding:0 0 0 1.1rem;}.pie-tool-dictionary__entries.svelte-1qfqsgt {list-style:none;padding-left:0;}.pie-tool-dictionary__entry.svelte-1qfqsgt + .pie-tool-dictionary__entry:where(.svelte-1qfqsgt) {margin-top:0.75rem;padding-top:0.75rem;border-top:1px solid var(--pie-border-light, #e5e7eb);}.pie-tool-dictionary__word.svelte-1qfqsgt {margin:0 0 0.25rem;font-weight:700;}.pie-tool-dictionary__pronunciation.svelte-1qfqsgt {margin-left:0.4rem;font-weight:400;opacity:0.75;}.pie-tool-dictionary__sense.svelte-1qfqsgt {margin-bottom:0.35rem;}.pie-tool-dictionary__pos.svelte-1qfqsgt {margin-right:0.3rem;font-style:italic;opacity:0.8;}.pie-tool-dictionary__example.svelte-1qfqsgt {display:block;opacity:0.8;}`};function sa(t,e){Vr(e,!0),Po(t,ia);let n=Tt(e,"visible",7,!1),r=Tt(e,"toolId",7,"dictionary"),i=Tt(e,"term",7,""),s=Tt(e,"termRequestId",7,void 0),a=Tt(e,"endpoint",7,""),l=Tt(e,"language",7,""),f=Tt(e,"lookup",7,void 0),u=Tt(e,"headers",7,void 0),c=Tt(e,"credentials",7,void 0),v=mt(""),d=mt(Qt({kind:"idle"}));const h=yr(()=>f()??(a()?Ko({endpoint:a(),headers:u(),credentials:c()}):null)),m=new ts({resolver:()=>_(h),max:6,language:()=>l(),onState:w=>{Z(d,w,!0)}});kr(()=>{_(h),Le(()=>m.syncConfigured(_(d)))}),kr(()=>{const w=Ui(i()),A=s(),I=n();Le(()=>{m.syncRequestedTerm({term:w,requestId:A,visible:I})&&Z(v,w,!0)})});function x(w){w.preventDefault(),m.run(_(v))}const p=yr(()=>Xi(_(d),{countLabel:w=>`${w} ${w===1?"entry":"entries"}`,emptyLabel:w=>`No dictionary entry for ${w}`}));var g={get visible(){return n()},set visible(w=!1){n(w),st()},get toolId(){return r()},set toolId(w="dictionary"){r(w),st()},get term(){return i()},set term(w=""){i(w),st()},get termRequestId(){return s()},set termRequestId(w=void 0){s(w),st()},get endpoint(){return a()},set endpoint(w=""){a(w),st()},get language(){return l()},set language(w=""){l(w),st()},get lookup(){return f()},set lookup(w=void 0){f(w),st()},get headers(){return u()},set headers(w=void 0){u(w),st()},get credentials(){return c()},set credentials(w=void 0){c(w),st()}},O=vo(),j=Ks(O),M=w=>{var A=ra(),I=Rt(A),rt=Ct(Rt(I),2),B=Rt(rt);No(B);var vt=Ct(B,2);gt(rt),gt(I);var De=Ct(I,2),Ni=Nt(De,!0),ar=Ct(De,2),Ci=Rt(ar),Li=P=>{H(P,Go())},zi=P=>{H(P,Qo())},Ri=P=>{var X=Ar(),dt=Nt(X);Mt(()=>Wt(dt,`Looking up “${_(d).term??""}”…`)),H(P,X)},Ii=P=>{var X=Ar(),dt=Nt(X);Mt(()=>Wt(dt,`No entry for “${_(d).term??""}”.`)),H(P,X)},Bi=P=>{var X=Xo(),dt=Nt(X,!0);Mt(()=>Wt(dt,_(d).reason)),H(P,X)},Di=P=>{var X=na();Pr(X,21,()=>_(d).items,dt=>dt.word+dt.senses.length,(dt,Ve)=>{var _n=ea(),bn=Rt(_n),lr=Rt(bn),Vi=Ct(lr),Hi=we=>{var At=Yo(),_e=Nt(At,!0);Mt(()=>Wt(_e,_(Ve).pronunciation)),H(we,At)};ke(Vi,we=>{_(Ve).pronunciation&&we(Hi)}),gt(bn);var ur=Ct(bn,2);Pr(ur,21,()=>_(Ve).senses,Mo,(we,At)=>{var _e=ta(),fr=Rt(_e),Fi=Vt=>{var be=Zo(),$n=Nt(be,!0);Mt(()=>Wt($n,_(At).partOfSpeech)),H(Vt,be)};ke(fr,Vt=>{_(At).partOfSpeech&&Vt(Fi)});var cr=Ct(fr,2),Ji=Nt(cr,!0),Ki=Ct(cr,2),Gi=Vt=>{var be=Uo(),$n=Nt(be);Mt(()=>Wt($n,`“${_(At).example??""}”`)),H(Vt,be)};ke(Ki,Vt=>{_(At).example&&Vt(Gi)}),gt(_e),Mt(()=>Wt(Ji,_(At).definition)),H(we,_e)}),gt(ur),gt(_n),Mt(()=>Wt(lr,`${_(Ve).word??""} `)),H(dt,_n)}),gt(X),H(P,X)};ke(Ci,P=>{_(d).kind==="unconfigured"?P(Li):_(d).kind==="idle"?P(zi,1):_(d).kind==="searching"?P(Ri,2):_(d).kind==="empty"?P(Ii,3):_(d).kind==="error"?P(Bi,4):P(Di,-1)}),gt(ar),gt(A),Mt(P=>{Fn(A,"data-pie-tool-id",r()),B.disabled=_(d).kind==="unconfigured",vt.disabled=P,Wt(Ni,_(p))},[()=>_(d).kind==="unconfigured"||!_(v).trim()]),uo("submit",I,x),zo(B,()=>_(v),P=>Z(v,P)),H(w,A)};return ke(j,w=>{n()&&w(M)}),H(t,O),Hr(g)}oa("pie-tool-dictionary",Ho(sa,{visible:{attribute:"visible",type:"Boolean"},toolId:{attribute:"tool-id",type:"String"},term:{attribute:"term",type:"String"},endpoint:{attribute:"endpoint",type:"String"},language:{attribute:"language",type:"String"},termRequestId:{},lookup:{},headers:{},credentials:{}},[],[],{mode:"open"},Qi));function oa(t,e){customElements.get(t)||customElements.define(t,e)}export{sa as default};
|