@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.
Files changed (59) hide show
  1. package/README.md +845 -964
  2. package/custom-elements.json +3922 -0
  3. package/dist/browser/assets/{evaluation-worker-CORp9m0K.js → evaluation-worker-0xRDVTJx.js} +82215 -73234
  4. package/dist/browser/chunks/ToolCoordinator-0a6c4088.js +1 -0
  5. package/dist/browser/chunks/attribute-coercion-b93b482c.js +1 -0
  6. package/dist/browser/chunks/calculator-element-271c142f.js +8 -9
  7. package/dist/browser/chunks/catalog-context-46d3e50e.js +1 -1
  8. package/dist/browser/chunks/classPrivateFieldGet2-338e0179.js +1 -1
  9. package/dist/browser/chunks/classPrivateMethodInitSpec-563cd0a5.js +1 -0
  10. package/dist/browser/chunks/custom-element-define-2a92deb0.js +1 -0
  11. package/dist/browser/chunks/dist-41b39e7f.js +1 -1
  12. package/dist/browser/chunks/dist-ca9b9622.js +1 -1
  13. package/dist/browser/chunks/focus-trap-44913bf3.js +1 -1
  14. package/dist/browser/chunks/math-rendering-ready-9a0fd90a.js +1 -1
  15. package/dist/browser/chunks/mathjax-BKrHE4xs-3ca05bf6.js +1 -1
  16. package/dist/browser/chunks/nl-NL-364d61b9.js +1 -1
  17. package/dist/browser/chunks/nl-NL-8b7e6d4b.js +1 -1
  18. package/dist/browser/chunks/pie-api-client-687c319a.js +1 -1
  19. package/dist/browser/chunks/provider-4c704118.js +1 -1
  20. package/dist/browser/chunks/runtime-YFqnU6ic-d5c0cb49.js +8605 -0
  21. package/dist/browser/chunks/{src-BcptuNS5-ed25d7fd.js → src-D_1goyPT-8cca0246.js} +81 -82
  22. package/dist/browser/chunks/{sre-engine-jd8cc08x-42d270e5.js → sre-engine-bj997w4b-891a4cbe.js} +1 -1
  23. package/dist/browser/chunks/term-lookup-632cf6b1.js +1 -0
  24. package/dist/browser/chunks/tool-annotation-toolbar-997438b4.js +5 -5
  25. package/dist/browser/chunks/tool-answer-eliminator-35483abd.js +6 -6
  26. package/dist/browser/chunks/tool-color-scheme-b7de5cdf.js +5 -5
  27. package/dist/browser/chunks/tool-dictionary-cecff3b4.js +3 -3
  28. package/dist/browser/chunks/tool-graph-cb0338e8.js +6 -6
  29. package/dist/browser/chunks/tool-host-contract-fae1c415.js +1 -0
  30. package/dist/browser/chunks/tool-instance-id-76ac45e2.js +1 -0
  31. package/dist/browser/chunks/tool-line-reader-f8ef3c6a.js +3 -3
  32. package/dist/browser/chunks/tool-periodic-table-43b133b8.js +13 -16
  33. package/dist/browser/chunks/tool-picture-dictionary-33721e91.js +3 -3
  34. package/dist/browser/chunks/tool-protractor-23f77028.js +6 -6
  35. package/dist/browser/chunks/tool-ruler-1d9a03a6.js +12 -9
  36. package/dist/browser/chunks/tool-tts-inline-98c2ce7a.js +24 -30
  37. package/dist/browser/chunks/toolbar-registration-helpers-a7ab1ad4.js +194 -0
  38. package/dist/browser/chunks/versioned-tag-54a76be9.js +1 -1
  39. package/dist/browser/pie-section-player.js +66 -65
  40. package/dist/chunks/nl-NL-364d61b9.js +34 -6
  41. package/dist/chunks/{sre-engine-jd8cc08x-42d270e5.js → sre-engine-bj997w4b-891a4cbe.js} +1 -1
  42. package/dist/component-definitions.d.ts +0 -2
  43. package/dist/components/shared/card-media-region.d.ts +3 -4
  44. package/dist/components/shared/framework-error-latch.d.ts +4 -2
  45. package/dist/components/shared/missing-tool-providers.d.ts +0 -6
  46. package/dist/components/shared/player-preload.d.ts +4 -9
  47. package/dist/components/shared/section-player-card-context.d.ts +0 -3
  48. package/dist/components/shared/section-player-host-runtime.d.ts +0 -2
  49. package/dist/components/shared/section-player-view-state.d.ts +0 -1
  50. package/dist/controllers/SectionController.d.ts +20 -6
  51. package/dist/pie-section-player.js +11279 -11191
  52. package/package.json +11 -9
  53. package/dist/browser/chunks/ToolCoordinator-cc2dc319.js +0 -1
  54. package/dist/browser/chunks/runtime-wcU7KOFU-ac86d7b8.js +0 -8536
  55. package/dist/browser/chunks/tool-host-contract-b93b482c.js +0 -1
  56. package/dist/browser/chunks/tool-instance-id-2a92deb0.js +0 -1
  57. package/dist/browser/chunks/tts-runtime-config-a7ab1ad4.js +0 -194
  58. /package/dist/browser/chunks/{ItemToolBar-jx38w99s-58defccc.js → ItemToolBar-66hcwmfw-3bcb82a3.js} +0 -0
  59. /package/dist/chunks/{ItemToolBar-jx38w99s-1287ba31.js → ItemToolBar-66hcwmfw-1287ba31.js} +0 -0
@@ -1,11 +1,11 @@
1
- import{m as kl,r as xl}from"./tool-host-contract-b93b482c.js";import{i as Ml}from"./provider-4c704118.js";if(typeof window<"u"){var Nn,An;((Nn=(An=window).__svelte??(An.__svelte={})).v??(Nn.v=new Set)).add("5")}var Me={},Q=Symbol("uninitialized"),ui=Array.isArray,Sl=Array.prototype.indexOf,Ur=Array.prototype.includes,jr=Array.from,gr=Object.keys,Je=Object.defineProperty,fe=Object.getOwnPropertyDescriptor,Wl=Object.getOwnPropertyDescriptors,El=Object.prototype,Pl=Array.prototype,fi=Object.getPrototypeOf,Hn=Object.isExtensible,jl=()=>{};function Cl(t){for(var e=0;e<t.length;e++)t[e]()}function ci(){var t,e;return{promise:new Promise((r,n)=>{t=r,e=n}),resolve:t,reject:e}}function Ge(t){"@babel/helpers - typeof";return Ge=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},Ge(t)}function Il(t,e){if(Ge(t)!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e||"default");if(Ge(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function Ll(t){var e=Il(t,"string");return Ge(e)=="symbol"?e:e+""}function H(t,e,r){return(e=Ll(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var pt=1024,Mt=2048,pe=4096,gn=8192,zl=16384,mn=32768,Rn=1<<25,wn=65536,je=1<<19,Tl=1<<20,Re=1<<25,Fn=1<<21,Ol=1<<22,mr=1<<23,Fe=Symbol("$state"),hi=Symbol("component"),vi=Symbol("legacy props"),Dl=Symbol(""),tn=Symbol("attributes"),en=Symbol("class"),rn=Symbol("style"),vr=Symbol("text"),Be=Symbol("form reset"),Ye=new class extends Error{constructor(...t){super(...t),H(this,"name","StaleReactionError"),H(this,"message","The reaction that called `getAbortSignal()` was re-run or destroyed")}},Nl=!!globalThis.document?.contentType&&globalThis.document.contentType.includes("xml");function Al(){console.warn("https://svelte.dev/e/derived_inert")}function Cr(t){console.warn("https://svelte.dev/e/hydration_mismatch")}function Hl(){console.warn("https://svelte.dev/e/svelte_boundary_reset_noop")}var L=!1;function Vt(t){L=t}var T;function it(t){if(t===null)throw Cr(),Me;return T=t}function Ir(){return it(Nt(T))}function ht(t){if(L){if(Nt(T)!==null)throw Cr(),Me;T=t}}function Rl(t=1){if(L){for(var e=t,r=T;e--;)r=Nt(r);T=r}}function wr(t=!0){for(var e=0,r=T;;){if(r.nodeType===8){var n=r.data;if(n==="]"){if(e===0)return r;e-=1}else(n==="["||n==="[!"||n[0]==="["&&!isNaN(Number(n.slice(1))))&&(e+=1)}var i=Nt(r);t&&r.remove(),r=i}}function di(t){if(!t||t.nodeType!==8)throw Cr(),Me;return t.data}function pi(t){return t===this.v}function Fl(t,e){return t!=t?e==e:t!==e||t!==null&&typeof t=="object"||typeof t=="function"}function gi(t){return!Fl(t,this.v)}function Bl(){throw new Error("https://svelte.dev/e/async_derived_orphan")}function Vl(t,e,r){throw new Error("https://svelte.dev/e/each_key_duplicate")}function ql(t){throw new Error("https://svelte.dev/e/effect_in_teardown")}function Jl(){throw new Error("https://svelte.dev/e/effect_in_unowned_derived")}function Gl(t){throw new Error("https://svelte.dev/e/effect_orphan")}function Ql(){throw new Error("https://svelte.dev/e/effect_update_depth_exceeded")}function Xl(){throw new Error("https://svelte.dev/e/hydration_failed")}function Zl(t){throw new Error("https://svelte.dev/e/props_invalid_value")}function Kl(){throw new Error("https://svelte.dev/e/state_descriptors_fixed")}function Yl(){throw new Error("https://svelte.dev/e/state_prototype_fixed")}function Ul(){throw new Error("https://svelte.dev/e/state_unsafe_mutation")}function to(){throw new Error("https://svelte.dev/e/svelte_boundary_reset_onerror")}var Ce=!1,Lr=!1,V=null;function Se(t){V=t}function mi(t,e=!1,r){V={p:V,i:!1,c:null,e:null,s:t,x:null,r:j,l:Lr&&!e?{s:null,u:null,$:[]}:null}}function wi(t){var e=V,r=e.e;if(r!==null){e.e=null;for(var n of r)Ri(n)}return t!==void 0&&(e.x=t),e.i=!0,V=e.p,yn(t)}function yn(t={}){return Je(t,hi,{value:!0}),t}function Ue(){return!Lr||V!==null&&V.l===null}var ae=[];function yi(){var t=ae;ae=[],Cl(t)}function Ot(t){if(ae.length===0&&!Ve){var e=ae;queueMicrotask(()=>{e===ae&&yi()})}ae.push(t)}function eo(){for(;ae.length>0;)yi()}var ro=~(Mt|pe|pt);function q(t,e){t.f=t.f&ro|e}function _n(t){(t.f&512)!==0||t.deps===null?q(t,pt):q(t,pe)}function _i(t,e,r){(t.f&2048)!==0?e.add(t):t.f&4096&&r.add(t),q(t,pt)}var Bn=!1;function bi(){Bn||(Bn=!0,document.addEventListener("reset",t=>{Promise.resolve().then(()=>{if(!t.defaultPrevented)for(const e of t.target.elements)e[Be]?.()})},{capture:!0}))}function Ie(t){var e=I,r=j;mt(null),Dt(null);try{return t()}finally{mt(e),Dt(r)}}function no(t,e,r,n=r){t.addEventListener(e,()=>Ie(r));const i=t[Be];i?t[Be]=()=>{i(),n(!0)}:t[Be]=()=>n(!0),bi()}function io(t,e,r,n){const i=Ue()?Qe:bn;var l=t.filter(p=>!p.settled),o=e.map(i);if(r.length===0&&l.length===0){n(o);return}var a=j,u=lo(),f=l.length===1?l[0].promise:l.length>1?Promise.all(l.map(p=>p.promise)):null;function h(p){if((a.f&16384)===0){u();try{n([...o,...p])}catch(m){Tt(m,a)}yr()}}var d=$i();if(r.length===0){f.then(()=>h([])).finally(d);return}function v(){Promise.all(r.map(p=>oo(p))).then(h).catch(p=>Tt(p,a)).finally(d)}f?f.then(()=>{u(),v(),yr()}):v()}function lo(){var t=j,e=I,r=V,n=x;return function(i=!0){Dt(t),mt(e),Se(r),i&&!(t.f&16384)&&(n?.activate(),n?.apply())}}function yr(t=!0){Dt(null),mt(null),Se(null),t&&x?.deactivate()}function $i(){var t=j,e=t.b,r=x,n=!!e?.is_rendered();return e?.update_pending_count(1,r),r.increment(n,t),()=>{e?.update_pending_count(-1,r),r.decrement(n,t)}}function Qe(t){var e=2|Mt;return j!==null&&(j.f|=je),{ctx:V,deps:null,effects:null,equals:pi,f:e,fn:t,reactions:null,rv:0,v:Q,wv:0,parent:j,ac:null}}var Ne=Symbol("obsolete");function oo(t,e,r){let n=j;n===null&&Bl();var i=void 0,l=de(Q),o=!I,a=new Set;return ko(()=>{var u=j,f=ci();i=f.promise;try{Promise.resolve(t()).then(f.resolve,p=>{p!==Ye&&f.reject(p)}).finally(yr)}catch(p){f.reject(p),yr()}var h=x;if(o){if((u.f&32768)!==0)var d=$i();if(n.b?.is_rendered())h.async_deriveds.get(u)?.reject(Ne);else for(const p of a.values())p.reject(Ne);a.add(f),h.async_deriveds.set(u,f)}const v=(p,m=void 0)=>{d?.(),a.delete(f),m!==Ne&&(h.activate(),m?(l.f|=mr,Ee(l,m)):(l.f&8388608&&(l.f^=mr),Ee(l,p)),h.deactivate())};f.promise.then(v,p=>v(null,p||"unknown"))}),Hi(()=>{for(const u of a)u.reject(Ne)}),new Promise(u=>{function f(h){function d(){h===i?u(l):f(i)}h.then(d,d)}f(i)})}function ee(t){const e=Qe(t);return Gi(e),e}function bn(t){const e=Qe(t);return e.equals=gi,e}function so(t){var e=t.effects;if(e!==null){t.effects=null;for(var r=0;r<e.length;r+=1)rt(e[r])}}function $n(t){var e,r=j,n=t.parent;if(!Gt&&n!==null&&t.v!==Q&&(n.f&24576)!==0)return Al(),t.v;Dt(n);try{so(t),e=Ki(t)}finally{Dt(r)}return e}function ki(t){var e=$n(t);if(!t.equals(e)&&(t.wv=Xi(),(!x?.is_fork||t.deps===null)&&(x!==null?(x.capture(t,e,!0),_r?.capture(t,e,!0)):t.v=e,t.deps===null))){q(t,pt);return}Gt||(et!==null?(Sn()||x?.is_fork)&&et.set(t,e):_n(t))}function ao(t){if(t.effects!==null)for(const e of t.effects)(e.teardown||e.ac)&&(e.teardown?.(),e.ac!==null&&Ie(()=>{e.ac.abort(Ye),e.ac=null}),e.fn!==null&&(e.teardown=jl),Ze(e,0),En(e))}function xi(t){if(t.effects!==null)for(const e of t.effects)e.teardown&&e.fn!==null&&Pe(e)}function Mi(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}function kn(t,e){Mi(t,e),e.add(t)}function k(t,e,r){Mi(t,e),e.set(t,r)}function E(t,e,r){if(typeof t=="function"?t===e:t.has(e))return arguments.length<3?e:r;throw new TypeError("Private element is not present on this object")}function b(t,e,r){return t.set(E(t,e),r),r}function s(t,e){return t.get(E(t,e))}var Si,nn=null,ye=null,x=null,_r=null,et=null,ln=null,Ve=!1,Nr=!1,Xe=null,br=null,Wi=0,uo=1,on=new WeakMap,ce=new WeakMap,ke=new WeakMap,$r=new WeakMap,lr=new WeakMap,_e=new WeakMap,oe=new WeakMap,Ae=new WeakMap,It=new WeakMap,Vn=new WeakMap,We=new WeakMap,qt=new WeakMap,Zt=new WeakMap,Ar=new WeakMap,or=new WeakMap,G=new WeakSet,ge=class Ei{constructor(){kn(this,G),H(this,"id",uo++),k(this,on,!1),H(this,"linked",!0),k(this,ce,null),k(this,ke,null),H(this,"async_deriveds",new Map),H(this,"current",new Map),H(this,"previous",new Map),k(this,$r,new Set),k(this,lr,new Set),k(this,_e,0),k(this,oe,new Map),k(this,Ae,null),k(this,It,[]),k(this,Vn,[]),k(this,We,new Set),k(this,qt,new Set),k(this,Zt,new Map),k(this,Ar,new Set),H(this,"is_fork",!1),k(this,or,!1),ye===null?nn=ye=this:(b(ke,ye,this),b(ce,this,ye)),ye=this}skip_effect(e){s(Zt,this).has(e)||s(Zt,this).set(e,{d:[],m:[]}),s(Ar,this).delete(e)}unskip_effect(e,r=n=>this.schedule(n)){var n=s(Zt,this).get(e);if(n){s(Zt,this).delete(e);for(var i of n.d)q(i,Mt),r(i);for(i of n.m)q(i,pe),r(i)}s(Ar,this).add(e)}capture(e,r,n=!1){e.v!==Q&&!this.previous.has(e)&&this.previous.set(e,e.v),!(e.f&8388608)&&(this.current.set(e,[r,n]),et?.set(e,r)),this.is_fork||(e.v=r)}activate(){x=this}deactivate(){x=null,et=null}flush(){try{Nr=!0,x=this,E(G,this,kr).call(this)}finally{Wi=0,ln=null,Xe=null,br=null,Nr=!1,x=null,et=null,zt.clear()}}discard(){for(const e of s(lr,this))e(this);s(lr,this).clear();for(const e of this.async_deriveds.values())e.reject(Ne);E(G,this,xr).call(this),s(Ae,this)?.resolve()}register_created_effect(e){s(Vn,this).push(e)}increment(e,r){if(b(_e,this,s(_e,this)+1),e){let n=s(oe,this).get(r)??0;s(oe,this).set(r,n+1)}}decrement(e,r){if(b(_e,this,s(_e,this)-1),e){let n=s(oe,this).get(r)??0;n===1?s(oe,this).delete(r):s(oe,this).set(r,n-1)}s(or,this)||(b(or,this,!0),Ot(()=>{b(or,this,!1),this.linked&&this.flush()}))}transfer_effects(e,r){for(const n of e)s(We,this).add(n);for(const n of r)s(qt,this).add(n);e.clear(),r.clear()}oncommit(e){s($r,this).add(e)}ondiscard(e){s(lr,this).add(e)}settled(){return(s(Ae,this)??b(Ae,this,ci())).promise}static ensure(){if(x===null){const e=x=new Ei;!Nr&&!Ve&&Ot(()=>{s(on,e)||e.flush()})}return x}apply(){if(!Ce||!this.is_fork&&s(ce,this)===null&&s(ke,this)===null){et=null;return}et=new Map;for(const[r,[n]]of this.current)et.set(r,n);for(let r=nn;r!==null;r=s(ke,r))if(!(r===this||r.is_fork)){var e=!1;if(r.id<this.id){for(const[n,[,i]]of r.current)if(!i&&this.current.has(n)){e=!0;break}}if(!e)for(const[n,i]of r.previous)et.has(n)||et.set(n,i)}}schedule(e){if(ln=e,e.b?.is_pending&&(e.f&16777228)!==0&&(e.f&32768)===0){e.b.defer_effect(e);return}s(It,this).push(e)}};Si=ge;function qn(){if(this.is_fork)return!0;for(const r of s(oe,this).keys()){for(var t=r,e=!1;t.parent!==null;){if(s(Zt,this).has(t)){e=!0;break}t=t.parent}if(!e)return!0}return!1}function fo(){var t=[];for(const i of s(It,this))if(!((i.f&16384)!==0||(i.f&6144)===0)){for(var e=i,r=!1;e.parent!==null;){e=e.parent;var n=e.f;if((n&96)!==0){if((n&1024)===0){r=!0;break}e.f^=pt}}r||t.push(e)}return b(It,this,[]),t}function kr(){b(on,this,!0);for(const o of s(We,this))s(qt,this).delete(o),q(o,Mt),this.schedule(o);for(const o of s(qt,this))q(o,pe),this.schedule(o);this.apply();for(var t=Xe=[],e=[],r=br=[];s(It,this).length>0;){Wi++>1e3&&(E(G,this,xr).call(this),po());for(const o of E(G,this,fo).call(this))try{E(G,this,co).call(this,o,t,e)}catch(a){throw Ci(o),E(G,this,qn).call(this)||this.discard(),a}}if(x=null,r.length>0){var n=Si.ensure();for(const o of r)n.schedule(o)}if(Xe=null,br=null,E(G,this,qn).call(this)){E(G,this,sr).call(this,e),E(G,this,sr).call(this,t);for(const[o,a]of s(Zt,this))ji(o,a);r.length>0&&E(G,x,kr).call(x);return}const i=E(G,this,ho).call(this);if(i){E(G,this,sr).call(this,e),E(G,this,sr).call(this,t),E(G,i,vo).call(i,this);return}s(We,this).clear(),s(qt,this).clear();for(const o of s($r,this))o(this);s($r,this).clear(),_r=this,Jn(e),Jn(t),_r=null,s(Ae,this)?.resolve();var l=x;if(s(_e,this)===0&&(s(It,this).length===0||l!==null)&&E(G,this,xr).call(this),s(It,this).length>0)if(l!==null){for(const o of s(It,this))s(It,l).push(o);b(It,this,[])}else l=this;l!==null&&(zt.clear(),E(G,l,kr).call(l))}function co(t,e,r){t.f^=pt;for(var n=t.first;n!==null;){var i=n.f,l=(i&96)!==0;if(!(l&&(i&1024)!==0||(i&8192)!==0||s(Zt,this).has(n))&&n.fn!==null){l?n.f^=pt:(i&4)!==0?e.push(n):Ce&&(i&16777224)!==0?r.push(n):tr(n)&&(i&16&&s(qt,this).add(n),Pe(n));var o=n.first;if(o!==null){n=o;continue}}for(;n!==null;){var a=n.next;if(a!==null){n=a;break}n=n.parent}}}function ho(){for(var t=s(ce,this);t!==null;){if(!t.is_fork){for(const[e,[,r]]of this.current)if(t.current.has(e)&&!r)return t}t=s(ce,t)}return null}function vo(t){for(const[r,n]of t.current)!this.previous.has(r)&&t.previous.has(r)&&this.previous.set(r,t.previous.get(r)),this.current.set(r,n);for(const[r,n]of t.async_deriveds){const i=this.async_deriveds.get(r);i&&n.promise.then(i.resolve).catch(i.reject)}t.async_deriveds.clear(),this.transfer_effects(s(We,t),s(qt,t));const e=r=>{var n=r.reactions;if(n!==null&&!((r.f&2)!==0&&(r.f&6144)===0))for(const o of n){var i=o.f;if((i&2)!==0)e(o);else{var l=o;i&4194320&&!this.async_deriveds.has(l)&&(s(qt,this).delete(l),q(l,Mt),this.schedule(l))}}};for(const r of this.current.keys())e(r);this.oncommit(()=>t.discard()),E(G,t,xr).call(t),x=this,E(G,this,kr).call(this)}function sr(t){for(var e=0;e<t.length;e+=1)_i(t[e],s(We,this),s(qt,this))}function xr(){if(this.linked){var t=s(ce,this),e=s(ke,this);t===null?nn=e:b(ke,t,e),e===null?ye=t:b(ce,e,t),this.linked=!1}}function Mr(t){var e=Ve;Ve=!0;try{var r;for(t&&(x!==null&&!x.is_fork&&x.flush(),r=t());;){if(eo(),x===null)return r;x.flush()}}finally{Ve=e}}function po(){try{Ql()}catch(t){Tt(t,ln)}}var Ct=null;function Jn(t){var e=t.length;if(e!==0){for(var r=0;r<e;){var n=t[r++];if((n.f&24576)===0&&tr(n)&&(Ct=new Set,Pe(n),n.deps===null&&n.first===null&&n.nodes===null&&n.teardown===null&&n.ac===null&&Vi(n),Ct?.size>0)){zt.clear();for(const i of Ct){if((i.f&24576)!==0)continue;const l=[i];let o=i.parent;for(;o!==null;)Ct.has(o)&&(Ct.delete(o),l.push(o)),o=o.parent;for(let a=l.length-1;a>=0;a--){const u=l[a];!(u.f&24576)&&Pe(u)}}Ct.clear()}}Ct=null}}function Pi(t){x.schedule(t)}function ji(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),q(t,pt);for(var r=t.first;r!==null;)ji(r,e),r=r.next}}function Ci(t){q(t,pt);for(var e=t.first;e!==null;)Ci(e),e=e.next}var Sr=new Set,zt=new Map,Ii=!1;function de(t,e){return{f:0,v:t,reactions:null,equals:pi,rv:0,wv:0}}function F(t,e){const r=de(t,e);return Gi(r),r}function Li(t,e=!1,r=!0){const n=de(t);if(e||(n.equals=gi),Lr&&r&&V!==null&&V.l!==null){var i;((i=V.l).s??(i.s=[])).push(n)}return n}function M(t,e,r=!1){return I!==null&&(!_t||I.f&131072)&&Ue()&&I.f&4325394&&($t===null||!$t.has(t))&&Ul(),Ee(t,r?Kt(e):e,br)}var se=null,sn=0;function Ee(t,e,r=null){if(!t.equals(e)){Gt?zt.set(t,e):zt.has(t)||zt.set(t,t.v);var n=ge.ensure();if(n.capture(t,e),(t.f&2)!==0){const i=t;t.f&2048&&$n(i),et===null&&_n(i)}t.wv=Xi(),se=null,sn=0,zi(t,Mt,r),se=null,Ue()&&j!==null&&j.f&1024&&!(j.f&96)&&(vt===null?Wo([t]):vt.push(t)),!n.is_fork&&Sr.size>0&&!Ii&&go()}return e}function go(){Ii=!1;for(const t of Sr){t.f&1024&&q(t,pe);let e;try{e=tr(t)}catch{e=!0}e&&Pe(t)}Sr.clear()}function mo(t,e=1){var r=c(t),n=e===1?r++:r--;return M(t,r),n}function qe(t){M(t,t.v+1)}function zi(t,e,r){var n=t.reactions;if(n!==null){var i=Ue(),l=n.length;if(sn+=l,sn>1e5&&se===null&&(se=new Set),se!==null){if(se.has(t))return;se.add(t)}for(var o=0;o<l;o++){var a=n[o],u=a.f;if(!(!i&&a===j)){var f=(u&Mt)===0;if(f&&q(a,e),(u&131072)!==0)Sr.add(a);else if((u&2)!==0){var h=a;et?.delete(h),zi(h,pe,r)}else if(f){var d=a;u&16&&Ct!==null&&Ct.add(d),r!==null?r.push(d):Pi(d)}}}}}function Kt(t){if(typeof t!="object"||t===null||Fe in t||hi in t)return t;const e=fi(t);if(e!==El&&e!==Pl)return t;var r=new Map,n=ui(t),i=F(0),l=null,o=he,a=u=>{if(he===o)return u();var f=I,h=he;mt(null),Kn(o);var d=u();return mt(f),Kn(h),d};return n&&r.set("length",F(t.length,l)),new Proxy(t,{defineProperty(u,f,h){(!("value"in h)||h.configurable===!1||h.enumerable===!1||h.writable===!1)&&Kl();var d=r.get(f);return d===void 0?a(()=>{var v=F(h.value,l);return r.set(f,v),v}):M(d,h.value,!0),!0},deleteProperty(u,f){var h=r.get(f);if(h===void 0){if(f in u){const d=a(()=>F(Q,l));r.set(f,d),qe(i)}}else M(h,Q),qe(i);return!0},get(u,f,h){if(f===Fe)return t;var d=r.get(f),v=f in u;if(d===void 0&&(!v||fe(u,f)?.writable)&&(d=a(()=>F(Kt(v?u[f]:Q),l)),r.set(f,d)),d!==void 0){var p=c(d);return p===Q?void 0:p}return Reflect.get(u,f,h)},getOwnPropertyDescriptor(u,f){this.has?.(u,f);var h=Reflect.getOwnPropertyDescriptor(u,f),d=r.get(f);if(d!==void 0){var v=c(d);if(v===Q)return;if(h&&"value"in h)h.value=v;else return{enumerable:!0,configurable:!0,value:v,writable:!0}}return h},has(u,f){if(f===Fe)return!0;var h=r.get(f),d=h!==void 0&&h.v!==Q||Reflect.has(u,f);return(h!==void 0||j!==null&&(!d||fe(u,f)?.writable))&&(h===void 0&&(h=a(()=>F(d?Kt(u[f]):Q,l)),r.set(f,h)),c(h)===Q)?!1:d},set(u,f,h,d){var v=r.get(f),p=f in u;if(n&&f==="length")for(var m=h;m<v.v;m+=1){var S=r.get(m+"");S!==void 0?M(S,Q):m in u&&(S=a(()=>F(Q,l)),r.set(m+"",S))}if(v===void 0)(!p||fe(u,f)?.writable)&&(v=a(()=>F(void 0,l)),M(v,Kt(h)),r.set(f,v));else{p=v.v!==Q;var g=a(()=>Kt(h));M(v,g)}var _=Reflect.getOwnPropertyDescriptor(u,f);if(_?.set&&_.set.call(d,h),!p){if(n&&typeof f=="string"){var R=r.get("length"),N=Number(f);Number.isInteger(N)&&N>=R.v&&M(R,N+1)}qe(i)}return!0},ownKeys(u){c(i);var f=Reflect.ownKeys(u).filter(v=>{var p=r.get(v);return p===void 0||p.v!==Q});for(var[h,d]of r)d.v!==Q&&!(h in u)&&f.push(h);return f},setPrototypeOf(){Yl()}})}var Gn,Ti,Oi,Di;function an(){if(Gn===void 0){Gn=window,Ti=/Firefox/.test(navigator.userAgent);var t=Element.prototype,e=Node.prototype,r=Text.prototype;Oi=fe(e,"firstChild").get,Di=fe(e,"nextSibling").get,Hn(t)&&(t[en]=void 0,t[tn]=null,t[rn]=void 0,t.__e=void 0),Hn(r)&&(r[vr]=void 0)}}function dt(t=""){return document.createTextNode(t)}function at(t){return Oi.call(t)}function Nt(t){return Di.call(t)}function Bt(t,e){if(!L)return at(t);var r=at(T);if(r===null)r=T.appendChild(dt());else if(e&&r.nodeType!==3){var n=dt();return r?.before(n),it(n),n}return e&&Mn(r),it(r),r}function Hr(t,e=!1){if(!L){var r=at(t);return r instanceof Comment&&r.data===""?Nt(r):r}if(e){if(T?.nodeType!==3){var n=dt();return T?.before(n),it(n),n}Mn(T)}return T}function Qn(t,e=!1){if(!L)return at(t);var r=Bt(t,e);return ht(t),r}function Pt(t,e=1,r=!1){let n=L?T:t;for(var i;e--;)i=n,n=Nt(n);if(!L)return n;if(r){if(n?.nodeType!==3){var l=dt();return n===null?i?.after(l):n.before(l),it(l),l}Mn(n)}return it(n),n}function Ni(t){t.textContent=""}function Ai(){return!Ce||Ct!==null?!1:(j.f&mn)!==0}function xn(t,e,r){return e==null||e==="http://www.w3.org/1999/xhtml"?r?document.createElement(t,{is:r}):document.createElement(t):r?document.createElementNS(e,t,{is:r}):document.createElementNS(e,t)}function Mn(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 wo(t){var e=j;if(e===null)return I.f|=mr,t;if((e.f&32768)===0&&(e.f&4)===0)throw t;Tt(t,e)}function Tt(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(r){t=r}}e=e.parent}throw t}}function yo(t){j===null&&(I===null&&Gl(t),Jl()),Gt&&ql(t)}function _o(t,e){var r=e.last;r===null?e.last=e.first=t:(r.next=t,t.prev=r,e.last=t)}function At(t,e){var r=j;r!==null&&r.f&8192&&(t|=gn);var n={ctx:V,deps:null,nodes:null,f:t|Mt|512,first:null,fn:e,last:null,next:null,parent:r,b:r&&r.b,prev:null,teardown:null,wv:0,ac:null};x?.register_created_effect(n);var i=n;if((t&4)!==0)Xe!==null?Xe.push(n):ge.ensure().schedule(n);else if(e!==null){try{Pe(n)}catch(o){throw rt(n),o}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|=wn))}if(i!==null&&(i.parent=r,r!==null&&_o(i,r),I!==null&&(I.f&2)!==0&&(t&64)===0)){var l=I;(l.effects??(l.effects=[])).push(i)}return n}function Sn(){return I!==null&&!_t}function Hi(t){const e=At(8,null);return q(e,pt),e.teardown=t,e}function Xn(t){yo("$effect");var e=j.f;if(!I&&(e&32)!==0&&V!==null&&!V.i){var r=V;(r.e??(r.e=[])).push(t)}else return Ri(t)}function Ri(t){return At(4|Tl,t)}function bo(t){ge.ensure();const e=At(64|je,t);return()=>{rt(e)}}function $o(t){ge.ensure();const e=At(64|je,t);return(r={})=>new Promise(n=>{r.outro?me(e,()=>{rt(e),n(void 0)}):(rt(e),n(void 0))})}function Fi(t){return At(4,t)}function ko(t){return At(Ol|je,t)}function zr(t,e=0){return At(8|e,t)}function Rt(t,e=[],r=[],n=[]){io(n,e,r,i=>{At(8,()=>{t(...i.map(c))})})}function Wn(t,e=0){return At(16|e,t)}function gt(t){return At(32|je,t)}function Bi(t){var e=t.teardown;if(e!==null){const r=Gt,n=I;Zn(!0),mt(null);try{e.call(null)}catch(i){Tt(i,t.parent)}finally{Zn(r),mt(n)}}}function En(t,e=!1){var r=t.first;for(t.first=t.last=null;r!==null;){const i=r.ac;i!==null&&Ie(()=>{i.abort(Ye)});var n=r.next;(r.f&64)!==0?r.parent=null:rt(r,e),r=n}}function xo(t){for(var e=t.first;e!==null;){var r=e.next;!(e.f&32)&&rt(e),e=r}}function rt(t,e=!0){var r=!1;(e||t.f&262144)&&t.nodes!==null&&t.nodes.end!==null&&(Mo(t.nodes.start,t.nodes.end),r=!0),t.f|=Rn,En(t,e&&!r),Ze(t,0);var n=t.nodes&&t.nodes.t;if(n!==null)for(const l of n)l.stop();Bi(t),t.f^=Rn,t.f|=zl;var i=t.parent;i!==null&&i.first!==null&&Vi(t),t.next=t.prev=t.teardown=t.ctx=t.deps=t.fn=t.nodes=t.ac=t.b=null}function Mo(t,e){for(;t!==null;){var r=t===e?null:Nt(t);t.remove(),t=r}}function Vi(t){var e=t.parent,r=t.prev,n=t.next;r!==null&&(r.next=n),n!==null&&(n.prev=r),e!==null&&(e.first===t&&(e.first=n),e.last===t&&(e.last=r))}function me(t,e,r=!0){var n=[];t.f|=256,qi(t,n,!0);var i=()=>{r&&rt(t),e&&e()},l=n.length;if(l>0){var o=()=>--l||i();for(var a of n)a.out(o)}else i()}function qi(t,e,r){if((t.f&8192)===0){t.f^=gn;var n=t.nodes&&t.nodes.t;if(n!==null)for(const a of n)(a.is_global||r)&&e.push(a);for(var i=t.first;i!==null;){var l=i.next;if((i.f&64)===0){var o=(i.f&65536)!==0||(i.f&32)!==0&&(t.f&16)!==0;qi(i,e,o?r:!1)}i=l}}}function Wr(t){t.f&=-257,Ji(t,!0)}function Ji(t,e){if((t.f&256)===0&&(t.f&8192)!==0){t.f^=gn,!(t.f&1024)&&(q(t,Mt),ge.ensure().schedule(t));for(var r=t.first;r!==null;){var n=r.next,i=(r.f&65536)!==0||(r.f&32)!==0;Ji(r,i?e:!1),r=n}var l=t.nodes&&t.nodes.t;if(l!==null)for(const o of l)(o.is_global||e)&&o.in()}}function Pn(t,e){if(t.nodes)for(var r=t.nodes.start,n=t.nodes.end;r!==null;){var i=r===n?null:Nt(r);e.append(r),r=i}}var So=null,dr=!1,Gt=!1;function Zn(t){Gt=t}var I=null,_t=!1;function mt(t){I=t}var j=null;function Dt(t){j=t}var $t=null;function Gi(t){I!==null&&(I.f&2097152||I.f&2)&&($t??($t=new Set)).add(t)}var nt=null,st=0,vt=null;function Wo(t){vt=t}var Qi=1,ue=0,he=ue;function Kn(t){he=t}function Xi(){return++Qi}function tr(t){var e=t.f;if((e&2048)!==0)return!0;if((e&4096)!==0){for(var r=t.deps,n=r.length,i=0;i<n;i++){var l=r[i];if(tr(l)&&ki(l),l.wv>t.wv)return!0}e&512&&et===null&&q(t,pt)}return!1}function Zi(t,e,r=!0){var n=t.reactions;if(n!==null&&!(!Ce&&$t!==null&&$t.has(t)))for(var i=0;i<n.length;i++){var l=n[i];(l.f&2)!==0?Zi(l,e,!1):e===l&&(r?q(l,Mt):l.f&1024&&q(l,pe),Pi(l))}}function Ki(t){var e=nt,r=st,n=vt,i=I,l=$t,o=V,a=_t,u=he,f=t.f;nt=null,st=0,vt=null,I=(f&96)===0?t:null,$t=null,Se(t.ctx),_t=!1,he=++ue,t.ac!==null&&(Ie(()=>{t.ac.abort(Ye)}),t.ac=null);try{t.f|=Fn;var h=t.fn,d=h();t.f|=mn;var v=Yn(t);if(Ue()&&vt!==null&&!_t&&v!==null&&(t.f&6146)===0)for(var p=0;p<vt.length;p++)Zi(vt[p],t);if(i!==null&&i!==t){if(ue++,i.deps!==null)for(let m=0;m<r;m+=1)i.deps[m].rv=ue;if(e!==null)for(const m of e)m.rv=ue;vt!==null&&(n===null?n=vt:n.push(...vt))}return t.f&8388608&&(t.f^=mr),d}catch(m){return Yn(t),wo(m)}finally{t.f^=Fn,nt=e,st=r,vt=n,I=i,$t=l,Se(o),_t=a,he=u}}function Yn(t){var e=t.deps,r=x?.is_fork;if(nt!==null){var n;if(r||Ze(t,st),e!==null&&st>0)for(e.length=st+nt.length,n=0;n<nt.length;n++)e[st+n]=nt[n];else t.deps=e=nt;if(Sn()&&(t.f&512)!==0)for(n=st;n<e.length;n++){var i;((i=e[n]).reactions??(i.reactions=[])).push(t)}}else!r&&e!==null&&st<e.length&&(Ze(t,st),e.length=st);return e}function Eo(t,e){let r=e.reactions;if(r!==null){var n=Sl.call(r,t);if(n!==-1){var i=r.length-1;i===0?r=e.reactions=null:(r[n]=r[i],r.pop())}}if(r===null&&(e.f&2)!==0&&(nt===null||!Ur.call(nt,e))){var l=e;l.f&512&&(l.f^=512),l.v!==Q&&_n(l),l.ac!==null&&Ie(()=>{l.ac.abort(Ye),l.ac=null,q(l,Mt)}),ao(l),Ze(l,0)}}function Ze(t,e){var r=t.deps;if(r!==null)for(var n=e;n<r.length;n++)Eo(t,r[n])}function Pe(t){var e=t.f;if((e&16384)===0){q(t,pt);var r=j,n=dr;j=t,dr=(e&96)===0;try{(e&16777232)!==0?xo(t):En(t),Bi(t);var i=Ki(t);t.teardown=typeof i=="function"?i:null,t.wv=Qi}finally{dr=n,j=r}}}async function Po(){if(Ce)return new Promise(t=>{requestAnimationFrame(()=>t()),setTimeout(()=>t())});await Promise.resolve(),Mr()}function c(t){var e=(t.f&2)!==0;if(So?.add(t),I!==null&&!_t&&!(j!==null&&(j.f&16384)!==0)&&($t===null||!$t.has(t))){var r=I.deps;if((I.f&2097152)!==0)t.rv<ue&&(t.rv=ue,nt===null&&r!==null&&r[st]===t?st++:nt===null?nt=[t]:nt.push(t));else{var n;(n=I).deps??(n.deps=[]),Ur.call(I.deps,t)||I.deps.push(t);var i=t.reactions;i===null?t.reactions=[I]:Ur.call(i,I)||i.push(I)}}if(Gt&&zt.has(t))return zt.get(t);if(e){var l=t;if(Gt){var o=l.v;return(!(l.f&1024)&&l.reactions!==null||Ui(l))&&(o=$n(l)),zt.set(l,o),o}var a=(l.f&512)===0&&!_t&&I!==null&&(dr||(I.f&512)!==0),u=(l.f&mn)===0;tr(l)&&(a&&(l.f|=512),ki(l)),a&&!u&&(xi(l),Yi(l))}if(et?.has(t))return et.get(t);if((t.f&8388608)!==0)throw t.v;return t.v}function Yi(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)&&(xi(e),Yi(e))}function Ui(t){if(t.v===Q)return!0;if(t.deps===null)return!1;for(const e of t.deps)if(zt.has(e)||(e.f&2)!==0&&Ui(e))return!0;return!1}function Tr(t){var e=_t;try{return _t=!0,t()}finally{_t=e}}var xe=Symbol("events"),tl=new Set,un=new Set;function jo(t,e,r,n={}){function i(l){if(n.capture||fn.call(e,l),!l.cancelBubble)return Ie(()=>r?.call(this,l))}return t.startsWith("pointer")||t.startsWith("touch")||t==="wheel"?(i.__removed=!1,Ot(()=>{i.__removed||e.addEventListener(t,i,n)})):e.addEventListener(t,i,n),i}function Co(t,e,r,n,i){var l={capture:n,passive:i},o=jo(t,e,r,l);(e===document.body||e===window||e===document||e instanceof HTMLMediaElement)&&Hi(()=>{o.__removed=!0,e.removeEventListener(t,o,l)})}function re(t,e,r){(e[xe]??(e[xe]={}))[t]=r}function Io(t){for(var e=0;e<t.length;e++)tl.add(t[e]);for(var r of un)r(t)}var Rr=null,Fr=!1;function fn(t){var e=this,r=e.ownerDocument,n=t.type,i=t.composedPath?.()||[],l=i[0]||t.target;Rr=t,Fr||(Fr=!0,setTimeout(()=>{Fr=!1,Rr=null}));var o=0,a=Rr===t&&t[xe];if(a){var u=i.indexOf(a);if(u!==-1&&(e===document||e===window)){t[xe]=e;return}var f=i.indexOf(e);if(f===-1)return;u<=f&&(o=u)}if(l=i[o]||t.target,l!==e){Je(t,"currentTarget",{configurable:!0,get(){return l||r}});var h=I,d=j;mt(null),Dt(null);try{for(var v,p=[];l!==null&&l!==e;){try{var m=l[xe]?.[n];m!=null&&(!l.disabled||t.target===l)&&m.call(l,t)}catch(S){v?p.push(S):v=S}if(t.cancelBubble)break;o++,l=o<i.length?i[o]:null}if(v){for(let S of p)queueMicrotask(()=>{throw S});throw v}}finally{t[xe]=e,delete t.currentTarget,mt(h),Dt(d)}}}var Lo=globalThis?.window?.trustedTypes&&globalThis.window.trustedTypes.createPolicy("svelte-trusted-html",{createHTML:t=>t});function zo(t){return Lo?.createHTML(t)??t}function el(t){var e=xn("template");return e.innerHTML=zo(t.replaceAll("<!>","<!---->")),e.content}function Jt(t,e){var r=j;r.nodes===null&&(r.nodes={start:t,end:e,a:null,t:null})}function rl(t,e){var r=(e&1)!==0,n=(e&2)!==0,i,l=!t.startsWith("<!>");return()=>{if(L)return Jt(T,null),T;i===void 0&&(i=el(l?t:"<!>"+t),r||(i=at(i)));var o=n||Ti?document.importNode(i,!0):i.cloneNode(!0);if(r){var a=at(o),u=o.lastChild;Jt(a,u)}else Jt(o,o);return o}}function To(t,e,r="svg"){var n=!t.startsWith("<!>"),i=(e&1)!==0,l=`<${r}>${n?t:"<!>"+t}</${r}>`,o;return()=>{if(L)return Jt(T,null),T;if(!o){var a=at(el(l));if(i)for(o=document.createDocumentFragment();at(a);)o.appendChild(at(a));else o=at(a)}var u=o.cloneNode(!0);if(i){var f=at(u),h=u.lastChild;Jt(f,h)}else Jt(u,u);return u}}function St(t,e){return To(t,e,"svg")}function Br(){if(L)return Jt(T,null),T;var t=document.createDocumentFragment(),e=document.createComment(""),r=dt();return t.append(e,r),Jt(e,r),t}function Z(t,e){if(L){var r=j;(!(r.f&32768)||r.nodes.end===null)&&(r.nodes.end=T),Ir();return}t!==null&&t.before(e)}var Oo=["touchstart","touchmove"];function Do(t){return Oo.includes(t)}function No(t){let e=0,r=de(0),n;return()=>{Sn()&&(c(r),zr(()=>(e===0&&(n=Tr(()=>t(()=>qe(r)))),e+=1,()=>{Ot(()=>{e-=1,e===0&&(n?.(),n=void 0,qe(r))})})))}}var Ao=wn|je;function Ho(t,e,r,n){new Ro(t,e,r,n)}var kt=new WeakMap,cn=new WeakMap,Lt=new WeakMap,Ke=new WeakMap,ut=new WeakMap,xt=new WeakMap,ft=new WeakMap,bt=new WeakMap,Yt=new WeakMap,be=new WeakMap,ve=new WeakMap,ar=new WeakMap,hn=new WeakMap,vn=new WeakMap,ne=new WeakMap,Un=new WeakMap,X=new WeakSet,Ro=class{constructor(t,e,r,n){kn(this,X),H(this,"parent",void 0),H(this,"is_pending",!1),H(this,"transform_error",void 0),k(this,kt,void 0),k(this,cn,L?T:null),k(this,Lt,void 0),k(this,Ke,void 0),k(this,ut,void 0),k(this,xt,null),k(this,ft,null),k(this,bt,null),k(this,Yt,null),k(this,be,0),k(this,ve,0),k(this,ar,!1),k(this,hn,new Set),k(this,vn,new Set),k(this,ne,null),k(this,Un,No(()=>(b(ne,this,de(s(be,this))),()=>{b(ne,this,null)}))),b(kt,this,t),b(Lt,this,e),b(Ke,this,i=>{var l=j;l.b=this,l.f|=128,r(i)}),this.parent=j.b,this.transform_error=n??this.parent?.transform_error??(i=>i),b(ut,this,Wn(()=>{if(L){const i=s(cn,this);Ir();const l=i.data==="[!";if(i.data.startsWith("[?")){const o=JSON.parse(i.data.slice(2));E(X,this,Bo).call(this,o)}else l?E(X,this,Vo).call(this):E(X,this,Fo).call(this)}else E(X,this,il).call(this)},Ao)),L&&b(kt,this,T)}defer_effect(t){_i(t,s(hn,this),s(vn,this))}is_rendered(){return!this.is_pending&&(!this.parent||this.parent.is_rendered())}has_pending_snippet(){return!!s(Lt,this).pending}update_pending_count(t,e){E(X,this,ll).call(this,t,e),b(be,this,s(be,this)+t),s(ne,this)&&!s(ar,this)&&(b(ar,this,!0),Ot(()=>{b(ar,this,!1),s(ne,this)&&Ee(s(ne,this),s(be,this))}))}get_effect_pending(){return s(Un,this).call(this),c(s(ne,this))}error(t){if(!s(Lt,this).onerror&&!s(Lt,this).failed)throw t;x?.is_fork?(s(xt,this)&&x.skip_effect(s(xt,this)),s(ft,this)&&x.skip_effect(s(ft,this)),s(bt,this)&&x.skip_effect(s(bt,this)),x.oncommit(()=>{E(X,this,ti).call(this,t)})):E(X,this,ti).call(this,t)}};function Fo(){try{b(xt,this,gt(()=>s(Ke,this).call(this,s(kt,this))))}catch(t){this.error(t)}}function Bo(t){const e=s(Lt,this).failed,{reset:r,invoke_onerror:n}=E(X,this,nl).call(this,t);Ot(n),e&&b(bt,this,gt(()=>{e(s(kt,this),()=>t,()=>r)}))}function nl(t){var e=!1,r=!1;const n=()=>{if(e){Hl();return}e=!0,r&&to(),s(bt,this)!==null&&me(s(bt,this),()=>{b(bt,this,null)}),E(X,this,jn).call(this,()=>{E(X,this,il).call(this)})};return{reset:n,invoke_onerror:()=>{try{r=!0,s(Lt,this).onerror?.(t,n),r=!1}catch(i){Tt(i,s(ut,this)&&s(ut,this).parent)}}}}function Vo(){const t=s(Lt,this).pending;t&&(this.is_pending=!0,b(ft,this,gt(()=>t(s(kt,this)))),Ot(()=>{var e=b(Yt,this,document.createDocumentFragment()),r=dt(),n=!1;if(e.append(r),b(xt,this,E(X,this,jn).call(this,()=>{try{return gt(()=>s(Ke,this).call(this,r))}catch(i){try{this.error(i),n=!0}catch(l){Tt(l,s(ut,this).parent)}return null}})),s(xt,this)===null){b(Yt,this,null),n&&E(X,this,Er).call(this,x);return}s(ve,this)===0&&(s(kt,this).before(e),b(Yt,this,null),me(s(ft,this),()=>{b(ft,this,null)}),E(X,this,Er).call(this,x))}))}function il(){try{if(this.is_pending=this.has_pending_snippet(),b(ve,this,0),b(be,this,0),b(xt,this,gt(()=>{s(Ke,this).call(this,s(kt,this))})),s(ve,this)>0){var t=b(Yt,this,document.createDocumentFragment());Pn(s(xt,this),t);const e=s(Lt,this).pending;b(ft,this,gt(()=>e(s(kt,this))))}else E(X,this,Er).call(this,x)}catch(e){this.error(e)}}function Er(t){this.is_pending=!1,t.transfer_effects(s(hn,this),s(vn,this))}function jn(t){var e=j,r=I,n=V;Dt(s(ut,this)),mt(s(ut,this)),Se(s(ut,this).ctx);try{return ge.ensure(),t()}finally{Dt(e),mt(r),Se(n)}}function ll(t,e){if(!this.has_pending_snippet()){if(this.parent){var r;E(X,r=this.parent,ll).call(r,t,e)}return}b(ve,this,s(ve,this)+t),s(ve,this)===0&&(E(X,this,Er).call(this,e),s(ft,this)&&me(s(ft,this),()=>{b(ft,this,null)}),s(Yt,this)&&(s(kt,this).before(s(Yt,this)),b(Yt,this,null)))}function ti(t){s(xt,this)&&(rt(s(xt,this)),b(xt,this,null)),s(ft,this)&&(rt(s(ft,this)),b(ft,this,null)),s(bt,this)&&(rt(s(bt,this)),b(bt,this,null)),L&&(it(s(cn,this)),Rl(),it(wr()));let e=s(Lt,this).failed;const r=n=>{const{reset:i,invoke_onerror:l}=E(X,this,nl).call(this,n);l(),e&&b(bt,this,E(X,this,jn).call(this,()=>{try{return gt(()=>{var o=j;o.b=this,o.f|=128,e(s(kt,this),()=>n,()=>i)})}catch(o){return Tt(o,s(ut,this).parent),null}}))};Ot(()=>{var n;try{n=this.transform_error(t)}catch(i){Tt(i,s(ut,this)&&s(ut,this).parent);return}n!==null&&typeof n=="object"&&typeof n.then=="function"?n.then(r,i=>Tt(i,s(ut,this)&&s(ut,this).parent)):r(n)})}function ei(t,e){var r=e==null?"":typeof e=="object"?`${e}`:e;r!==(t[vr]??(t[vr]=t.nodeValue))&&(t[vr]=r,t.nodeValue=`${r}`)}function ol(t,e){return sl(t,e)}function qo(t,e){an(),e.intro=e.intro??!1;const r=e.target,n=L,i=T;try{for(var l=at(r);l&&(l.nodeType!==8||l.data!=="[");)l=Nt(l);if(!l)throw Me;Vt(!0),it(l);const o=sl(t,{...e,anchor:l});return Vt(!1),o}catch(o){if(o instanceof Error&&o.message.split(`
2
- `).some(a=>a.startsWith("https://svelte.dev/e/")))throw o;return o!==Me&&console.warn("Failed to hydrate: ",o),e.recover===!1&&Xl(),an(),Ni(r),Vt(!1),ol(t,e)}finally{Vt(n),it(i)}}var ur=new Map;function sl(t,{target:e,anchor:r,props:n={},events:i,context:l,intro:o=!0,transformError:a}){an();var u=void 0,f=$o(()=>{var h=r??e.appendChild(dt());Ho(h,{pending:()=>{}},p=>{mi({});var m=V;if(l&&(m.c=l),i&&(n.$$events=i),L&&Jt(p,null),u=t(p,n)||yn(),L&&(j.nodes.end=T,T===null||T.nodeType!==8||T.data!=="]"))throw Cr(),Me;wi()},a);var d=new Set,v=p=>{for(var m=0;m<p.length;m++){var S=p[m];if(!d.has(S)){d.add(S);var g=Do(S);for(const N of[e,document]){var _=ur.get(N);_===void 0&&(_=new Map,ur.set(N,_));var R=_.get(S);R===void 0?(N.addEventListener(S,fn,{passive:g}),_.set(S,1)):_.set(S,R+1)}}}};return v(jr(tl)),un.add(v),()=>{for(var p of d)for(const g of[e,document]){var m=ur.get(g),S=m.get(p);--S==0?(g.removeEventListener(p,fn),m.delete(p),m.size===0&&ur.delete(g)):m.set(p,S)}un.delete(v),h!==r&&h.parentNode?.removeChild(h)}});return dn.set(u,f),u}var dn=new WeakMap;function Jo(t,e){const r=dn.get(t);return r?(dn.delete(t),r(e)):Promise.resolve()}var Ft=new WeakMap,Qt=new WeakMap,yt=new WeakMap,Te=new WeakMap,Vr=new WeakMap,qr=new WeakMap,ri=new WeakMap,Go=class{constructor(t,e=!0){H(this,"anchor",void 0),k(this,Ft,new Map),k(this,Qt,new Map),k(this,yt,new Map),k(this,Te,new Set),k(this,Vr,!0),k(this,qr,r=>{if(s(Ft,this).has(r)){var n=s(Ft,this).get(r),i=s(Qt,this).get(n);if(i)Wr(i),s(Te,this).delete(n);else{var l=s(yt,this).get(n);l&&(Wr(l.effect),s(Qt,this).set(n,l.effect),s(yt,this).delete(n),l.fragment.lastChild.remove(),this.anchor.before(l.fragment),i=l.effect)}for(const[o,a]of s(Ft,this)){if(s(Ft,this).delete(o),o===r)break;const u=s(yt,this).get(a);u&&(rt(u.effect),s(yt,this).delete(a))}for(const[o,a]of s(Qt,this)){if(o===n||s(Te,this).has(o))continue;const u=()=>{if(Array.from(s(Ft,this).values()).includes(o)){var f=document.createDocumentFragment();Pn(a,f),f.append(dt()),s(yt,this).set(o,{effect:a,fragment:f})}else rt(a);s(Te,this).delete(o),s(Qt,this).delete(o)};s(Vr,this)||!i?(s(Te,this).add(o),me(a,u,!1)):u()}}}),k(this,ri,r=>{s(Ft,this).delete(r);const n=Array.from(s(Ft,this).values());for(const[i,l]of s(yt,this))n.includes(i)||(rt(l.effect),s(yt,this).delete(i))}),this.anchor=t,b(Vr,this,e)}ensure(t,e){var r=x,n=Ai();if(e&&!s(Qt,this).has(t)&&!s(yt,this).has(t))if(n){var i=document.createDocumentFragment(),l=dt();i.append(l),s(yt,this).set(t,{effect:gt(()=>e(l)),fragment:i})}else s(Qt,this).set(t,gt(()=>e(this.anchor)));if(s(Ft,this).set(r,t),n){for(const[o,a]of s(Qt,this))o===t?r.unskip_effect(a):r.skip_effect(a);for(const[o,a]of s(yt,this))o===t?r.unskip_effect(a.effect):r.skip_effect(a.effect);r.oncommit(s(qr,this)),r.ondiscard(s(ri,this))}else L&&(this.anchor=T),s(qr,this).call(this,r)}};function Oe(t,e,r=!1){var n;L&&(n=T,Ir());var i=new Go(t),l=r?wn:0;function o(a,u){if(L){var f=di(n);if(a!==parseInt(f.substring(1))){var h=wr();it(h),i.anchor=h,Vt(!1),i.ensure(a,u),Vt(!0);return}}i.ensure(a,u)}Wn(()=>{var a=!1;e((u,f=0)=>{a=!0,o(f,u)}),a||o(-1,null)},l)}function fr(t,e){return e}function Qo(t,e,r){for(var n=[],i=e.length,l,o=e.length,a=0;a<i;a++){let d=e[a];me(d,()=>{if(l){if(l.pending.delete(d),l.done.add(d),l.pending.size===0){var v=t.outrogroups;pn(t,jr(l.done)),v.delete(l),v.size===0&&(t.outrogroups=null)}}else o-=1},!1)}if(o===0){var u=n.length===0&&r!==null&&t.pending.size===0;if(u){var f=r,h=f.parentNode;Ni(h),h.append(f),t.items.clear()}pn(t,e,!u)}else l={pending:new Set(e),done:new Set},(t.outrogroups??(t.outrogroups=new Set)).add(l)}function pn(t,e,r=!0){var n;if(t.pending.size>0){n=new Set;for(const o of t.pending.values())for(const a of o)n.add(t.items.get(a).e)}for(var i=0;i<e.length;i++){var l=e[i];n?.has(l)?(l.f|=Re,Pn(l,document.createDocumentFragment())):rt(e[i],r)}}var cr;function ie(t,e,r,n,i,l=null){var o=t,a=new Map;if((e&4)!==0){var u=t;o=L?it(at(u)):u.appendChild(dt())}L&&Ir();var f=null,h=bn(()=>{var _=r();return ui(_)?_:_==null?[]:jr(_)}),d,v=new Map,p=!0;function m(_){!(g.effect.f&16384)&&(g.pending.delete(_),g.fallback=f,Xo(g,d,o,e,n),f!==null&&(d.length===0?(f.f&33554432)===0?Wr(f):(f.f^=Re,He(f,null,o)):me(f,()=>{f=null})))}function S(_){g.pending.delete(_)}var g={effect:Wn(()=>{d=c(h);var _=d.length;let R=!1;L&&di(o)==="[!"!=(_===0)&&(o=wr(),it(o),Vt(!1),R=!0);for(var N=new Set,C=x,K=Ai(),Y=0;Y<_;Y+=1){L&&T.nodeType===8&&T.data==="]"&&(o=T,R=!0,Vt(!1));var D=d[Y],Wt=n(D,Y),U=p?null:a.get(Wt);U?(U.v&&Ee(U.v,D),U.i&&Ee(U.i,Y),K&&C.unskip_effect(U.e)):(U=Zo(a,p?o:cr??(cr=dt()),D,Wt,Y,i,e,r),p||(U.e.f|=Re),a.set(Wt,U)),N.add(Wt)}if(_===0&&l&&!f&&(p?f=gt(()=>l(o)):(f=gt(()=>l(cr??(cr=dt()))),f.f|=Re)),_>N.size&&Vl("","",""),L&&_>0&&it(wr()),!p)if(v.set(C,N),K){for(const[lt,er]of a)N.has(lt)||C.skip_effect(er.e);C.oncommit(m),C.ondiscard(S)}else m(C);R&&Vt(!0),c(h)}),flags:e,items:a,pending:v,outrogroups:null,fallback:f};p=!1,L&&(o=T)}function De(t){for(;t!==null&&(t.f&32)===0;)t=t.next;return t}function Xo(t,e,r,n,i){var l=(n&8)!==0,o=e.length,a=t.items,u=De(t.effect.first),f,h=null,d,v=[],p=[],m,S,g,_;if(l)for(_=0;_<o;_+=1)m=e[_],S=i(m,_),g=a.get(S).e,!(g.f&33554432)&&(g.nodes?.a?.measure(),(d??(d=new Set)).add(g));for(_=0;_<o;_+=1){if(m=e[_],S=i(m,_),g=a.get(S).e,t.outrogroups!==null)for(const lt of t.outrogroups)lt.pending.delete(g),lt.done.delete(g);if(g.f&8192&&(Wr(g),l&&(g.nodes?.a?.unfix(),(d??(d=new Set)).delete(g))),(g.f&33554432)!==0)if(g.f^=Re,g===u)He(g,null,r);else{var R=h?h.next:u;g===t.effect.last&&(t.effect.last=g.prev),g.prev&&(g.prev.next=g.next),g.next&&(g.next.prev=g.prev),Xt(t,h,g),Xt(t,g,R),He(g,R,r),h=g,v=[],p=[],u=De(h.next);continue}if(g!==u){if(f!==void 0&&f.has(g)){if(v.length<p.length){var N=p[0],C;h=N.prev;var K=v[0],Y=v[v.length-1];for(C=0;C<v.length;C+=1)He(v[C],N,r);for(C=0;C<p.length;C+=1)f.delete(p[C]);Xt(t,K.prev,Y.next),Xt(t,h,K),Xt(t,Y,N),u=N,h=Y,_-=1,v=[],p=[]}else f.delete(g),He(g,u,r),Xt(t,g.prev,g.next),Xt(t,g,h===null?t.effect.first:h.next),Xt(t,h,g),h=g;continue}for(v=[],p=[];u!==null&&u!==g;)(f??(f=new Set)).add(u),p.push(u),u=De(u.next);if(u===null)continue}!(g.f&33554432)&&v.push(g),h=g,u=De(g.next)}if(t.outrogroups!==null){for(const lt of t.outrogroups)lt.pending.size===0&&(pn(t,jr(lt.done)),t.outrogroups?.delete(lt));t.outrogroups.size===0&&(t.outrogroups=null)}if(u!==null||f!==void 0){var D=[];if(f!==void 0)for(g of f)!(g.f&8192)&&D.push(g);for(;u!==null;)!(u.f&8192)&&u!==t.fallback&&D.push(u),u=De(u.next);var Wt=D.length;if(Wt>0){var U=(n&4)!==0&&o===0?r:null;if(l){for(_=0;_<Wt;_+=1)D[_].nodes?.a?.measure();for(_=0;_<Wt;_+=1)D[_].nodes?.a?.fix()}Qo(t,D,U)}}l&&Ot(()=>{if(d!==void 0)for(g of d)g.nodes?.a?.apply()})}function Zo(t,e,r,n,i,l,o,a){var u=(o&1)!==0?(o&16)===0?Li(r,!1,!1):de(r):null,f=(o&2)!==0?de(i):null;return{v:u,i:f,e:gt(()=>(l(e,u??r,f??i,a),()=>{t.delete(n)}))}}function He(t,e,r){if(t.nodes)for(var n=t.nodes.start,i=t.nodes.end,l=e&&(e.f&33554432)===0?e.nodes.start:r;n!==null;){var o=Nt(n);if(l.before(n),n===i)return;n=o}}function Xt(t,e,r){e===null?t.effect.first=r:e.next=r,r===null?t.effect.last=e:r.prev=e}function Ko(t,e){Fi(()=>{t=j?.parent?.nodes?.start??t;var r=t.getRootNode(),n=r.host?r:r.head??r.ownerDocument.head;if(!n.querySelector("#"+e.hash)){const i=xn("style");i.id=e.hash,i.textContent=e.code,n.appendChild(i)}})}var ni=[...`
3
- \r\f \v\uFEFF`];function Yo(t,e,r){var n=t==null?"":""+t;if(e&&(n=n?n+" "+e:e),r){for(var i of Object.keys(r))if(r[i])n=n?n+" "+i:i;else if(n.length)for(var l=i.length,o=0;(o=n.indexOf(i,o))>=0;){var a=o+l;(o===0||ni.includes(n[o-1]))&&(a===n.length||ni.includes(n[a]))?n=(o===0?"":n.substring(0,o))+n.substring(a+1):o=a}}return n===""?null:n}function ii(t,e=!1){var r=e?" !important;":";",n="";for(var i of Object.keys(t)){var l=t[i];l!=null&&l!==""&&(n+=" "+i+": "+l+r)}return n}function Jr(t){return t[0]!=="-"||t[1]!=="-"?t.toLowerCase():t}function Uo(t,e){if(e){var r="",n,i;if(Array.isArray(e)?(n=e[0],i=e[1]):n=e,t){t=String(t).replaceAll(/\/\*.*?\*\//g,"").trim();var l=!1,o=0,a=!1,u=[];n&&u.push(...Object.keys(n).map(Jr)),i&&u.push(...Object.keys(i).map(Jr));var f=0,h=-1;const S=t.length;for(var d=0;d<S;d++){var v=t[d];if(a?v==="/"&&t[d-1]==="*"&&(a=!1):l?l===v&&(l=!1):v==="/"&&t[d+1]==="*"?a=!0:v==='"'||v==="'"?l=v:v==="("?o++:v===")"&&o--,!a&&l===!1&&o===0){if(v===":"&&h===-1)h=d;else if(v===";"||d===S-1){if(h!==-1){var p=Jr(t.substring(f,h).trim());if(!u.includes(p)){v!==";"&&d++;var m=t.substring(f,d).trim();r+=" "+m+";"}}f=d+1,h=-1}}}}return n&&(r+=ii(n)),i&&(r+=ii(i,!0)),r=r.trim(),r===""?null:r}return t==null?null:String(t)}function li(t,e,r,n,i,l){var o=t[en];if(L||o!==r||o===void 0){var a=Yo(r,n,l);(!L||a!==t.getAttribute("class"))&&(a==null?t.removeAttribute("class"):e?t.className=a:t.setAttribute("class",a)),t[en]=r}else if(l&&i!==l)for(var u in l){var f=!!l[u];(i==null||f!==!!i[u])&&t.classList.toggle(u,f)}return l}function Gr(t,e={},r,n){for(var i in r){var l=r[i];e[i]!==l&&(r[i]==null?t.style.removeProperty(i):t.style.setProperty(i,l,n))}}function ts(t,e,r,n){var i=t[rn];if(L||i!==e){var l=Uo(e,n);(!L||l!==t.getAttribute("style"))&&(l==null?t.removeAttribute("style"):t.style.cssText=l),t[rn]=e}else n&&(Array.isArray(n)?(Gr(t,r?.[0],n[0]),Gr(t,r?.[1],n[1],"important")):Gr(t,r,n));return n}var es=Symbol("is custom element"),rs=Symbol("is html"),ns=Nl?"link":"LINK";function is(t){if(L){var e=!1,r=()=>{if(!e){if(e=!0,t.hasAttribute("value")){var n=t.value;z(t,"value",null),t.value=n}if(t.hasAttribute("checked")){var i=t.checked;z(t,"checked",null),t.checked=i}}};t[Be]=r,Ot(r),bi()}}function z(t,e,r,n){var i=ls(t);L&&(i[e]=t.getAttribute(e),e==="src"||e==="srcset"||e==="href"&&t.nodeName===ns)||i[e]!==(i[e]=r)&&(e==="loading"&&(t[Dl]=r),r==null?t.removeAttribute(e):typeof r!="string"&&os(t).has(e)?t[e]=r:t.setAttribute(e,r))}function ls(t){return t[tn]??(t[tn]={[es]:t.nodeName.includes("-"),[rs]:t.namespaceURI==="http://www.w3.org/1999/xhtml"})}var oi=new Map;function os(t){var e=t.getAttribute("is")||t.nodeName,r=oi.get(e);if(r)return r;oi.set(e,r=new Set);for(var n,i=t,l=Element.prototype;l!==i;){n=Wl(i);for(var o in n)n[o].set&&o!=="innerHTML"&&o!=="textContent"&&o!=="innerText"&&r.add(o);i=fi(i)}return r}function ss(t,e,r=e){var n=new WeakSet;no(t,"input",async i=>{var l=i?t.defaultValue:t.value;if(l=Qr(t)?Xr(l):l,r(l),x!==null&&n.add(x),await Po(),l!==(l=e())){var o=t.selectionStart,a=t.selectionEnd,u=t.value.length;if(t.value=l??"",a!==null){var f=t.value.length;o===a&&a===u&&f>u?(t.selectionStart=f,t.selectionEnd=f):(t.selectionStart=o,t.selectionEnd=Math.min(a,f))}}}),(L&&t.defaultValue!==t.value||Tr(e)==null&&t.value)&&(r(Qr(t)?Xr(t.value):t.value),x!==null&&n.add(x)),zr(()=>{var i=e();if(t===document.activeElement){var l=Ce?_r:x;if(n.has(l))return}Qr(t)&&i===Xr(t.value)||t.type==="date"&&!i&&!t.value||i!==t.value&&(t.value=i??"")})}function Qr(t){var e=t.type;return e==="number"||e==="range"}function Xr(t){return t===""?null:+t}var al,$e=new WeakMap,Pr=new WeakMap,Zr=new WeakMap,si=new WeakSet,ul=class{constructor(t){kn(this,si),k(this,$e,new WeakMap),k(this,Pr,void 0),k(this,Zr,void 0),b(Zr,this,t)}observe(t,e){var r=s($e,this).get(t)||new Set;return r.add(e),s($e,this).set(t,r),E(si,this,as).call(this).observe(t,s(Zr,this)),()=>{var n=s($e,this).get(t);n.delete(e),n.size===0&&(s($e,this).delete(t),s(Pr,this).unobserve(t))}}};al=ul;function as(){return s(Pr,this)??b(Pr,this,new ResizeObserver(t=>{for(var e of t){al.entries.set(e.target,e);for(var r of s($e,this).get(e.target)||[])r(e)}}))}H(ul,"entries",new WeakMap);function Kr(t,e){return t===e||t?.[Fe]===e}function Yr(t=yn(),e,r,n){var i=V.r,l=j;return Fi(()=>{var o,a;return zr(()=>{o=a,a=n?.()||[],Tr(()=>{Kr(r(...a),t)||(e(t,...a),o&&Kr(r(...o),t)&&e(null,...o))})}),()=>{let u=l;for(;u!==i&&u.parent!==null&&u.parent.f&33554432;)u=u.parent;const f=()=>{a&&Kr(r(...a),t)&&e(null,...a)},h=u.teardown;u.teardown=()=>{f(),h?.()}}}),t}var hr=!1;function us(t){var e=hr;try{return hr=!1,[t(),hr]}finally{hr=e}}function ai(t,e,r,n){var i=!Lr||(r&2)!==0,l=(r&8)!==0,o=(r&16)!==0,a=n,u=!0,f=void 0,h=()=>o&&i?(f??(f=Qe(n)),c(f)):(u&&(u=!1,a=o?Tr(n):n),a);let d;if(l){var v=Fe in t||vi in t;d=fe(t,e)?.set??(v&&e in t?C=>t[e]=C:void 0)}var p,m=!1;l?[p,m]=us(()=>t[e]):p=t[e],p===void 0&&n!==void 0&&(p=h(),d&&(i&&Zl(e),d(p)));var S;if(i?S=()=>{var C=t[e];return C===void 0?h():(u=!0,C)}:S=()=>{var C=t[e];return C!==void 0&&(a=void 0),C===void 0?a:C},i&&(r&4)===0)return S;if(d){var g=t.$$legacy;return(function(C,K){return arguments.length>0?((!i||!K||g||m)&&d(K?S():C),C):S()})}var _=!1,R=((r&1)!==0?Qe:bn)(()=>(_=!1,S()));l&&c(R);var N=j;return(function(C,K){if(arguments.length>0){const Y=K?c(R):i&&l?Kt(C):C;return M(R,Y),_=!0,a!==void 0&&(a=Y),C}return Gt&&_||(N.f&16384)!==0?R.v:c(R)})}function fs(t){return new cs(t)}var le=new WeakMap,jt=new WeakMap,cs=class{constructor(t){k(this,le,void 0),k(this,jt,void 0);var e=new Map,r=(i,l)=>{var o=Li(l,!1,!1);return e.set(i,o),o};const n=new Proxy({...t.props||{},$$events:{}},{get(i,l){return c(e.get(l)??r(l,Reflect.get(i,l)))},has(i,l){return l===vi?!0:(c(e.get(l)??r(l,Reflect.get(i,l))),Reflect.has(i,l))},set(i,l,o){return M(e.get(l)??r(l,o),o),Reflect.set(i,l,o)}});b(jt,this,(t.hydrate?qo:ol)(t.component,{target:t.target,anchor:t.anchor,props:n,context:t.context,intro:t.intro??!1,recover:t.recover,transformError:t.transformError})),(!t?.props?.$$host||t.sync===!1)&&Mr(),b(le,this,n.$$events);for(const i of Object.keys(s(jt,this)))i==="$set"||i==="$destroy"||i==="$on"||Je(this,i,{get(){return s(jt,this)[i]},set(l){s(jt,this)[i]=l},enumerable:!0});s(jt,this).$set=i=>{Object.assign(n,i)},s(jt,this).$destroy=()=>{Jo(s(jt,this))}}$set(t){s(jt,this).$set(t)}$on(t,e){s(le,this)[t]=s(le,this)[t]||[];const r=(...n)=>e.call(this,...n);return s(le,this)[t].push(r),()=>{s(le,this)[t]=s(le,this)[t].filter(n=>n!==r)}}$destroy(){s(jt,this).$destroy()}},fl;typeof HTMLElement=="function"&&(fl=class extends HTMLElement{constructor(t,e,r){super(),H(this,"$$ctor",void 0),H(this,"$$s",void 0),H(this,"$$c",void 0),H(this,"$$cn",!1),H(this,"$$d",{}),H(this,"$$r",!1),H(this,"$$p_d",{}),H(this,"$$l",{}),H(this,"$$l_u",new Map),H(this,"$$me",void 0),H(this,"$$shadowRoot",null),this.$$ctor=t,this.$$s=e,r&&(this.$$shadowRoot=this.attachShadow(r))}addEventListener(t,e,r){if(this.$$l[t]=this.$$l[t]||[],this.$$l[t].push(e),this.$$c){const n=this.$$c.$on(t,e);this.$$l_u.set(e,n)}super.addEventListener(t,e,r)}removeEventListener(t,e,r){if(super.removeEventListener(t,e,r),this.$$c){const n=this.$$l_u.get(e);n&&(n(),this.$$l_u.delete(e))}}async connectedCallback(){if(this.$$cn=!0,!this.$$c){let t=function(n){return i=>{const l=xn("slot");n!=="default"&&(l.name=n),Z(i,l)}};if(await Promise.resolve(),!this.$$cn||this.$$c)return;const e={},r=hs(this);for(const n of this.$$s)n in r&&(n==="default"&&!this.$$d.children?(this.$$d.children=t(n),e.default=!0):e[n]=t(n));for(const n of this.attributes){const i=this.$$g_p(n.name);i in this.$$d||(this.$$d[i]=pr(i,n.value,this.$$p_d,"toProp"))}for(const n in this.$$p_d)!(n in this.$$d)&&this[n]!==void 0&&(this.$$d[n]=this[n],delete this[n]);this.$$c=fs({component:this.$$ctor,target:this.$$shadowRoot||this,props:{...this.$$d,$$slots:e,$$host:this}}),this.$$me=bo(()=>{zr(()=>{this.$$r=!0;for(const n of gr(this.$$c)){if(!this.$$p_d[n]?.reflect)continue;this.$$d[n]=this.$$c[n];const i=pr(n,this.$$d[n],this.$$p_d,"toAttribute");i==null?this.removeAttribute(this.$$p_d[n].attribute||n):this.setAttribute(this.$$p_d[n].attribute||n,i)}this.$$r=!1})});for(const n in this.$$l)for(const i of this.$$l[n]){const l=this.$$c.$on(n,i);this.$$l_u.set(i,l)}this.$$l={}}}attributeChangedCallback(t,e,r){this.$$r||(t=this.$$g_p(t),this.$$d[t]=pr(t,r,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 gr(this.$$p_d).find(e=>this.$$p_d[e].attribute===t||!this.$$p_d[e].attribute&&e.toLowerCase()===t)||t}});function pr(t,e,r,n){const i=r[t]?.type;if(e=i==="Boolean"&&typeof e!="boolean"?e!=null:e,!n||!r[t])return e;if(n==="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 hs(t){const e={};return t.childNodes.forEach(r=>{e[r.slot||"default"]=!0}),e}function vs(t,e,r,n,i,l){let o=class extends fl{constructor(){super(t,r,i),this.$$p_d=e}static get observedAttributes(){return gr(e).map(a=>(e[a].attribute||a).toLowerCase())}};return gr(e).forEach(a=>{Je(o.prototype,a,{get(){return this.$$c&&a in this.$$c?this.$$c[a]:this.$$d[a]},set(u){u=pr(a,u,e),this.$$d[a]=u;var f=this.$$c;f&&(fe(f,a)?.get?f[a]=u:f.$set({[a]:u}))}})}),n.forEach(a=>{Je(o.prototype,a,{get(){return this.$$c?.[a]}})}),l&&(o=l(o)),t.element=o,o}var ds=St('<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M3 3l7.07 16.97 2.51-7.39 7.39-2.51L3 3z"></path></svg>'),ps=St('<svg viewBox="0 0 24 24" fill="currentColor"><path d="M12 2C8.13 2 5 5.13 5 9c0 5.25 7 13 7 13s7-7.75 7-13c0-3.87-3.13-7-7-7zm0 9.5c-1.38 0-2.5-1.12-2.5-2.5s1.12-2.5 2.5-2.5 2.5 1.12 2.5 2.5-1.12 2.5-2.5 2.5z"></path></svg>'),gs=St('<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M17 3a2.828 2.828 0 1 1 4 4L7.5 20.5 2 22l1.5-5.5L17 3z"></path></svg>'),ms=St('<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M3 6h18M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6m3 0V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2"></path></svg>'),ws=rl('<button type="button"><span class="pie-tool-graph__tool-icon svelte-v3lao1" aria-hidden="true"><!></span> <span class="pie-tool-graph__tool-label svelte-v3lao1"> </span></button>'),ys=St('<line x1="0" class="pie-tool-graph__grid-line pie-tool-graph__grid-line--minor svelte-v3lao1"></line>'),_s=St('<line x1="0" class="pie-tool-graph__grid-line pie-tool-graph__grid-line--major svelte-v3lao1"></line>'),bs=St('<line y1="0" y2="100" class="pie-tool-graph__grid-line pie-tool-graph__grid-line--minor svelte-v3lao1"></line>'),$s=St('<line y1="0" y2="100" class="pie-tool-graph__grid-line pie-tool-graph__grid-line--major svelte-v3lao1"></line>'),ks=St('<line class="pie-tool-graph__user-line svelte-v3lao1"></line>'),xs=St('<circle r="2" role="button" tabindex="0"></circle>'),Ms=St('<line class="pie-tool-graph__temp-line svelte-v3lao1"></line>'),Ss=rl('<div class="pie-tool-graph svelte-v3lao1" role="dialog" tabindex="-1"><div class="pie-tool-graph__toolbar svelte-v3lao1"><div class="pie-tool-graph__tool-buttons svelte-v3lao1"></div> <div class="pie-tool-graph__transparency-control svelte-v3lao1"><label for="grid-opacity" class="svelte-v3lao1"> </label> <input type="range" id="grid-opacity" min="0" max="1" step="0.1" class="svelte-v3lao1"/></div></div> <div class="pie-tool-graph__canvas-wrapper svelte-v3lao1" role="img" tabindex="0"><svg class="pie-tool-graph__canvas svelte-v3lao1" preserveAspectRatio="xMinYMin meet" aria-hidden="true"><g class="pie-tool-graph__grid-lines" aria-hidden="true"><!><!><!><!></g><g class="pie-tool-graph__lines"></g><g class="pie-tool-graph__points"></g><!></svg></div></div>'),Ws={hash:"svelte-v3lao1",code:`.pie-tool-graph.svelte-v3lao1 {position:relative;background:var(--pie-background, #fff);color:var(--pie-text, #111827);width:100%;height:100%;min-height:0;overflow:hidden;display:flex;flex-direction:column;}
1
+ import{t as Ol}from"./attribute-coercion-b93b482c.js";import{r as Ll}from"./tool-host-contract-fae1c415.js";import{i as Nl}from"./provider-4c704118.js";if(typeof window<"u"){var Kn,Un;((Kn=(Un=window).__svelte??(Un.__svelte={})).v??(Kn.v=new Set)).add("5")}var Me={},U=Symbol("uninitialized"),mi=Array.isArray,Pl=Array.prototype.indexOf,en=Array.prototype.includes,Ar=Array.from,gr=Object.keys,Ke=Object.defineProperty,fe=Object.getOwnPropertyDescriptor,zl=Object.getOwnPropertyDescriptors,Il=Object.prototype,Tl=Array.prototype,wi=Object.getPrototypeOf,Gn=Object.isExtensible,Rl=()=>{};function Dl(t){for(var e=0;e<t.length;e++)t[e]()}function yi(){var t,e;return{promise:new Promise((r,n)=>{t=r,e=n}),resolve:t,reject:e}}function Ue(t){"@babel/helpers - typeof";return Ue=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},Ue(t)}function Hl(t,e){if(Ue(t)!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e||"default");if(Ue(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function Vl(t){var e=Hl(t,"string");return Ue(e)=="symbol"?e:e+""}function D(t,e,r){return(e=Vl(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var pt=1024,St=2048,de=4096,wn=8192,Bl=16384,yn=32768,Yn=1<<25,bn=65536,Ae=1<<19,ql=1<<20,He=1<<25,Zn=1<<21,Fl=1<<22,mr=1<<23,Ve=Symbol("$state"),bi=Symbol("component"),_i=Symbol("legacy props"),Kl=Symbol(""),rn=Symbol("attributes"),nn=Symbol("class"),ln=Symbol("style"),vr=Symbol("text"),Be=Symbol("form reset"),Xe=new class extends Error{constructor(...t){super(...t),D(this,"name","StaleReactionError"),D(this,"message","The reaction that called `getAbortSignal()` was re-run or destroyed")}},Ul=!!globalThis.document?.contentType&&globalThis.document.contentType.includes("xml");function Gl(){console.warn("https://svelte.dev/e/derived_inert")}function Cr(t){console.warn("https://svelte.dev/e/hydration_mismatch")}function Yl(){console.warn("https://svelte.dev/e/svelte_boundary_reset_noop")}var O=!1;function qt(t){O=t}var L;function it(t){if(t===null)throw Cr(),Me;return L=t}function Or(){return it(Tt(L))}function ct(t){if(O){if(Tt(L)!==null)throw Cr(),Me;L=t}}function Zl(t=1){if(O){for(var e=t,r=L;e--;)r=Tt(r);L=r}}function wr(t=!0){for(var e=0,r=L;;){if(r.nodeType===8){var n=r.data;if(n==="]"){if(e===0)return r;e-=1}else(n==="["||n==="[!"||n[0]==="["&&!isNaN(Number(n.slice(1))))&&(e+=1)}var i=Tt(r);t&&r.remove(),r=i}}function $i(t){if(!t||t.nodeType!==8)throw Cr(),Me;return t.data}function ki(t){return t===this.v}function Ql(t,e){return t!=t?e==e:t!==e||t!==null&&typeof t=="object"||typeof t=="function"}function xi(t){return!Ql(t,this.v)}function Xl(){throw new Error("https://svelte.dev/e/async_derived_orphan")}function Jl(t,e,r){throw new Error("https://svelte.dev/e/each_key_duplicate")}function to(t){throw new Error("https://svelte.dev/e/effect_in_teardown")}function eo(){throw new Error("https://svelte.dev/e/effect_in_unowned_derived")}function ro(t){throw new Error("https://svelte.dev/e/effect_orphan")}function no(){throw new Error("https://svelte.dev/e/effect_update_depth_exceeded")}function io(){throw new Error("https://svelte.dev/e/hydration_failed")}function lo(t){throw new Error("https://svelte.dev/e/props_invalid_value")}function oo(){throw new Error("https://svelte.dev/e/state_descriptors_fixed")}function so(){throw new Error("https://svelte.dev/e/state_prototype_fixed")}function ao(){throw new Error("https://svelte.dev/e/state_unsafe_mutation")}function uo(){throw new Error("https://svelte.dev/e/svelte_boundary_reset_onerror")}var Ce=!1,Lr=!1,B=null;function Se(t){B=t}function Mi(t,e=!1,r){B={p:B,i:!1,c:null,e:null,s:t,x:null,r:j,l:Lr&&!e?{s:null,u:null,$:[]}:null}}function Si(t){var e=B,r=e.e;if(r!==null){e.e=null;for(var n of r)Yi(n)}return t!==void 0&&(e.x=t),e.i=!0,B=e.p,_n(t)}function _n(t={}){return Ke(t,bi,{value:!0}),t}function Je(){return!Lr||B!==null&&B.l===null}var ae=[];function Ei(){var t=ae;ae=[],Dl(t)}function zt(t){if(ae.length===0&&!qe){var e=ae;queueMicrotask(()=>{e===ae&&Ei()})}ae.push(t)}function fo(){for(;ae.length>0;)Ei()}var co=~(St|de|pt);function q(t,e){t.f=t.f&co|e}function $n(t){(t.f&512)!==0||t.deps===null?q(t,pt):q(t,de)}function Wi(t,e,r){(t.f&2048)!==0?e.add(t):t.f&4096&&r.add(t),q(t,pt)}var Qn=!1;function ji(){Qn||(Qn=!0,document.addEventListener("reset",t=>{Promise.resolve().then(()=>{if(!t.defaultPrevented)for(const e of t.target.elements)e[Be]?.()})},{capture:!0}))}function Oe(t){var e=C,r=j;gt(null),It(null);try{return t()}finally{gt(e),It(r)}}function ho(t,e,r,n=r){t.addEventListener(e,()=>Oe(r));const i=t[Be];i?t[Be]=()=>{i(),n(!0)}:t[Be]=()=>n(!0),ji()}function vo(t,e,r,n){const i=Je()?Ge:kn;var l=t.filter(d=>!d.settled),o=e.map(i);if(r.length===0&&l.length===0){n(o);return}var a=j,u=po(),c=l.length===1?l[0].promise:l.length>1?Promise.all(l.map(d=>d.promise)):null;function h(d){if((a.f&16384)===0){u();try{n([...o,...d])}catch(y){Pt(y,a)}yr()}}var p=Ai();if(r.length===0){c.then(()=>h([])).finally(p);return}function v(){Promise.all(r.map(d=>go(d))).then(h).catch(d=>Pt(d,a)).finally(p)}c?c.then(()=>{u(),v(),yr()}):v()}function po(){var t=j,e=C,r=B,n=x;return function(i=!0){It(t),gt(e),Se(r),i&&!(t.f&16384)&&(n?.activate(),n?.apply())}}function yr(t=!0){It(null),gt(null),Se(null),t&&x?.deactivate()}function Ai(){var t=j,e=t.b,r=x,n=!!e?.is_rendered();return e?.update_pending_count(1,r),r.increment(n,t),()=>{e?.update_pending_count(-1,r),r.decrement(n,t)}}function Ge(t){var e=2|St;return j!==null&&(j.f|=Ae),{ctx:B,deps:null,effects:null,equals:ki,f:e,fn:t,reactions:null,rv:0,v:U,wv:0,parent:j,ac:null}}var Te=Symbol("obsolete");function go(t,e,r){let n=j;n===null&&Xl();var i=void 0,l=pe(U),o=!C,a=new Set;return Oo(()=>{var u=j,c=yi();i=c.promise;try{Promise.resolve(t()).then(c.resolve,d=>{d!==Xe&&c.reject(d)}).finally(yr)}catch(d){c.reject(d),yr()}var h=x;if(o){if((u.f&32768)!==0)var p=Ai();if(n.b?.is_rendered())h.async_deriveds.get(u)?.reject(Te);else for(const d of a.values())d.reject(Te);a.add(c),h.async_deriveds.set(u,c)}const v=(d,y=void 0)=>{p?.(),a.delete(c),y!==Te&&(h.activate(),y?(l.f|=mr,We(l,y)):(l.f&8388608&&(l.f^=mr),We(l,d)),h.deactivate())};c.promise.then(v,d=>v(null,d||"unknown"))}),Gi(()=>{for(const u of a)u.reject(Te)}),new Promise(u=>{function c(h){function p(){h===i?u(l):c(i)}h.then(p,p)}c(i)})}function Gt(t){const e=Ge(t);return el(e),e}function kn(t){const e=Ge(t);return e.equals=xi,e}function mo(t){var e=t.effects;if(e!==null){t.effects=null;for(var r=0;r<e.length;r+=1)et(e[r])}}function xn(t){var e,r=j,n=t.parent;if(!Ut&&n!==null&&t.v!==U&&(n.f&24576)!==0)return Gl(),t.v;It(n);try{mo(t),e=ll(t)}finally{It(r)}return e}function Ci(t){var e=xn(t);if(!t.equals(e)&&(t.wv=nl(),(!x?.is_fork||t.deps===null)&&(x!==null?(x.capture(t,e,!0),br?.capture(t,e,!0)):t.v=e,t.deps===null))){q(t,pt);return}Ut||(tt!==null?(Wn()||x?.is_fork)&&tt.set(t,e):$n(t))}function wo(t){if(t.effects!==null)for(const e of t.effects)(e.teardown||e.ac)&&(e.teardown?.(),e.ac!==null&&Oe(()=>{e.ac.abort(Xe),e.ac=null}),e.fn!==null&&(e.teardown=Rl),Ze(e,0),An(e))}function Oi(t){if(t.effects!==null)for(const e of t.effects)e.teardown&&e.fn!==null&&je(e)}function Li(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}function Mn(t,e){Li(t,e),e.add(t)}function k(t,e,r){Li(t,e),e.set(t,r)}function W(t,e,r){if(typeof t=="function"?t===e:t.has(e))return arguments.length<3?e:r;throw new TypeError("Private element is not present on this object")}function _(t,e,r){return t.set(W(t,e),r),r}function s(t,e){return t.get(W(t,e))}var Ni,on=null,ye=null,x=null,br=null,tt=null,sn=null,qe=!1,Dr=!1,Ye=null,_r=null,Pi=0,yo=1,an=new WeakMap,ce=new WeakMap,ke=new WeakMap,$r=new WeakMap,lr=new WeakMap,be=new WeakMap,oe=new WeakMap,Re=new WeakMap,Ot=new WeakMap,Xn=new WeakMap,Ee=new WeakMap,Ft=new WeakMap,Qt=new WeakMap,Hr=new WeakMap,or=new WeakMap,K=new WeakSet,ge=class zi{constructor(){Mn(this,K),D(this,"id",yo++),k(this,an,!1),D(this,"linked",!0),k(this,ce,null),k(this,ke,null),D(this,"async_deriveds",new Map),D(this,"current",new Map),D(this,"previous",new Map),k(this,$r,new Set),k(this,lr,new Set),k(this,be,0),k(this,oe,new Map),k(this,Re,null),k(this,Ot,[]),k(this,Xn,[]),k(this,Ee,new Set),k(this,Ft,new Set),k(this,Qt,new Map),k(this,Hr,new Set),D(this,"is_fork",!1),k(this,or,!1),ye===null?on=ye=this:(_(ke,ye,this),_(ce,this,ye)),ye=this}skip_effect(e){s(Qt,this).has(e)||s(Qt,this).set(e,{d:[],m:[]}),s(Hr,this).delete(e)}unskip_effect(e,r=n=>this.schedule(n)){var n=s(Qt,this).get(e);if(n){s(Qt,this).delete(e);for(var i of n.d)q(i,St),r(i);for(i of n.m)q(i,de),r(i)}s(Hr,this).add(e)}capture(e,r,n=!1){e.v!==U&&!this.previous.has(e)&&this.previous.set(e,e.v),!(e.f&8388608)&&(this.current.set(e,[r,n]),tt?.set(e,r)),this.is_fork||(e.v=r)}activate(){x=this}deactivate(){x=null,tt=null}flush(){try{Dr=!0,x=this,W(K,this,kr).call(this)}finally{Pi=0,sn=null,Ye=null,_r=null,Dr=!1,x=null,tt=null,Nt.clear()}}discard(){for(const e of s(lr,this))e(this);s(lr,this).clear();for(const e of this.async_deriveds.values())e.reject(Te);W(K,this,xr).call(this),s(Re,this)?.resolve()}register_created_effect(e){s(Xn,this).push(e)}increment(e,r){if(_(be,this,s(be,this)+1),e){let n=s(oe,this).get(r)??0;s(oe,this).set(r,n+1)}}decrement(e,r){if(_(be,this,s(be,this)-1),e){let n=s(oe,this).get(r)??0;n===1?s(oe,this).delete(r):s(oe,this).set(r,n-1)}s(or,this)||(_(or,this,!0),zt(()=>{_(or,this,!1),this.linked&&this.flush()}))}transfer_effects(e,r){for(const n of e)s(Ee,this).add(n);for(const n of r)s(Ft,this).add(n);e.clear(),r.clear()}oncommit(e){s($r,this).add(e)}ondiscard(e){s(lr,this).add(e)}settled(){return(s(Re,this)??_(Re,this,yi())).promise}static ensure(){if(x===null){const e=x=new zi;!Dr&&!qe&&zt(()=>{s(an,e)||e.flush()})}return x}apply(){if(!Ce||!this.is_fork&&s(ce,this)===null&&s(ke,this)===null){tt=null;return}tt=new Map;for(const[r,[n]]of this.current)tt.set(r,n);for(let r=on;r!==null;r=s(ke,r))if(!(r===this||r.is_fork)){var e=!1;if(r.id<this.id){for(const[n,[,i]]of r.current)if(!i&&this.current.has(n)){e=!0;break}}if(!e)for(const[n,i]of r.previous)tt.has(n)||tt.set(n,i)}}schedule(e){if(sn=e,e.b?.is_pending&&(e.f&16777228)!==0&&(e.f&32768)===0){e.b.defer_effect(e);return}s(Ot,this).push(e)}};Ni=ge;function Jn(){if(this.is_fork)return!0;for(const r of s(oe,this).keys()){for(var t=r,e=!1;t.parent!==null;){if(s(Qt,this).has(t)){e=!0;break}t=t.parent}if(!e)return!0}return!1}function bo(){var t=[];for(const i of s(Ot,this))if(!((i.f&16384)!==0||(i.f&6144)===0)){for(var e=i,r=!1;e.parent!==null;){e=e.parent;var n=e.f;if((n&96)!==0){if((n&1024)===0){r=!0;break}e.f^=pt}}r||t.push(e)}return _(Ot,this,[]),t}function kr(){_(an,this,!0);for(const o of s(Ee,this))s(Ft,this).delete(o),q(o,St),this.schedule(o);for(const o of s(Ft,this))q(o,de),this.schedule(o);this.apply();for(var t=Ye=[],e=[],r=_r=[];s(Ot,this).length>0;){Pi++>1e3&&(W(K,this,xr).call(this),xo());for(const o of W(K,this,bo).call(this))try{W(K,this,_o).call(this,o,t,e)}catch(a){throw Ri(o),W(K,this,Jn).call(this)||this.discard(),a}}if(x=null,r.length>0){var n=Ni.ensure();for(const o of r)n.schedule(o)}if(Ye=null,_r=null,W(K,this,Jn).call(this)){W(K,this,sr).call(this,e),W(K,this,sr).call(this,t);for(const[o,a]of s(Qt,this))Ti(o,a);r.length>0&&W(K,x,kr).call(x);return}const i=W(K,this,$o).call(this);if(i){W(K,this,sr).call(this,e),W(K,this,sr).call(this,t),W(K,i,ko).call(i,this);return}s(Ee,this).clear(),s(Ft,this).clear();for(const o of s($r,this))o(this);s($r,this).clear(),br=this,ti(e),ti(t),br=null,s(Re,this)?.resolve();var l=x;if(s(be,this)===0&&(s(Ot,this).length===0||l!==null)&&W(K,this,xr).call(this),s(Ot,this).length>0)if(l!==null){for(const o of s(Ot,this))s(Ot,l).push(o);_(Ot,this,[])}else l=this;l!==null&&(Nt.clear(),W(K,l,kr).call(l))}function _o(t,e,r){t.f^=pt;for(var n=t.first;n!==null;){var i=n.f,l=(i&96)!==0;if(!(l&&(i&1024)!==0||(i&8192)!==0||s(Qt,this).has(n))&&n.fn!==null){l?n.f^=pt:(i&4)!==0?e.push(n):Ce&&(i&16777224)!==0?r.push(n):tr(n)&&(i&16&&s(Ft,this).add(n),je(n));var o=n.first;if(o!==null){n=o;continue}}for(;n!==null;){var a=n.next;if(a!==null){n=a;break}n=n.parent}}}function $o(){for(var t=s(ce,this);t!==null;){if(!t.is_fork){for(const[e,[,r]]of this.current)if(t.current.has(e)&&!r)return t}t=s(ce,t)}return null}function ko(t){for(const[r,n]of t.current)!this.previous.has(r)&&t.previous.has(r)&&this.previous.set(r,t.previous.get(r)),this.current.set(r,n);for(const[r,n]of t.async_deriveds){const i=this.async_deriveds.get(r);i&&n.promise.then(i.resolve).catch(i.reject)}t.async_deriveds.clear(),this.transfer_effects(s(Ee,t),s(Ft,t));const e=r=>{var n=r.reactions;if(n!==null&&!((r.f&2)!==0&&(r.f&6144)===0))for(const o of n){var i=o.f;if((i&2)!==0)e(o);else{var l=o;i&4194320&&!this.async_deriveds.has(l)&&(s(Ft,this).delete(l),q(l,St),this.schedule(l))}}};for(const r of this.current.keys())e(r);this.oncommit(()=>t.discard()),W(K,t,xr).call(t),x=this,W(K,this,kr).call(this)}function sr(t){for(var e=0;e<t.length;e+=1)Wi(t[e],s(Ee,this),s(Ft,this))}function xr(){if(this.linked){var t=s(ce,this),e=s(ke,this);t===null?on=e:_(ke,t,e),e===null?ye=t:_(ce,e,t),this.linked=!1}}function Mr(t){var e=qe;qe=!0;try{var r;for(t&&(x!==null&&!x.is_fork&&x.flush(),r=t());;){if(fo(),x===null)return r;x.flush()}}finally{qe=e}}function xo(){try{no()}catch(t){Pt(t,sn)}}var Ct=null;function ti(t){var e=t.length;if(e!==0){for(var r=0;r<e;){var n=t[r++];if((n.f&24576)===0&&tr(n)&&(Ct=new Set,je(n),n.deps===null&&n.first===null&&n.nodes===null&&n.teardown===null&&n.ac===null&&Xi(n),Ct?.size>0)){Nt.clear();for(const i of Ct){if((i.f&24576)!==0)continue;const l=[i];let o=i.parent;for(;o!==null;)Ct.has(o)&&(Ct.delete(o),l.push(o)),o=o.parent;for(let a=l.length-1;a>=0;a--){const u=l[a];!(u.f&24576)&&je(u)}}Ct.clear()}}Ct=null}}function Ii(t){x.schedule(t)}function Ti(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),q(t,pt);for(var r=t.first;r!==null;)Ti(r,e),r=r.next}}function Ri(t){q(t,pt);for(var e=t.first;e!==null;)Ri(e),e=e.next}var Sr=new Set,Nt=new Map,Di=!1;function pe(t,e){return{f:0,v:t,reactions:null,equals:ki,rv:0,wv:0}}function H(t,e){const r=pe(t,e);return el(r),r}function Hi(t,e=!1,r=!0){const n=pe(t);if(e||(n.equals=xi),Lr&&r&&B!==null&&B.l!==null){var i;((i=B.l).s??(i.s=[])).push(n)}return n}function S(t,e,r=!1){return C!==null&&(!_t||C.f&131072)&&Je()&&C.f&4325394&&(kt===null||!kt.has(t))&&ao(),We(t,r?Xt(e):e,_r)}var se=null,un=0;function We(t,e,r=null){if(!t.equals(e)){Ut?Nt.set(t,e):Nt.has(t)||Nt.set(t,t.v);var n=ge.ensure();if(n.capture(t,e),(t.f&2)!==0){const i=t;t.f&2048&&xn(i),tt===null&&$n(i)}t.wv=nl(),se=null,un=0,Vi(t,St,r),se=null,Je()&&j!==null&&j.f&1024&&!(j.f&96)&&(ht===null?zo([t]):ht.push(t)),!n.is_fork&&Sr.size>0&&!Di&&Mo()}return e}function Mo(){Di=!1;for(const t of Sr){t.f&1024&&q(t,de);let e;try{e=tr(t)}catch{e=!0}e&&je(t)}Sr.clear()}function So(t,e=1){var r=f(t),n=e===1?r++:r--;return S(t,r),n}function Fe(t){S(t,t.v+1)}function Vi(t,e,r){var n=t.reactions;if(n!==null){var i=Je(),l=n.length;if(un+=l,un>1e5&&se===null&&(se=new Set),se!==null){if(se.has(t))return;se.add(t)}for(var o=0;o<l;o++){var a=n[o],u=a.f;if(!(!i&&a===j)){var c=(u&St)===0;if(c&&q(a,e),(u&131072)!==0)Sr.add(a);else if((u&2)!==0){var h=a;tt?.delete(h),Vi(h,de,r)}else if(c){var p=a;u&16&&Ct!==null&&Ct.add(p),r!==null?r.push(p):Ii(p)}}}}}function Xt(t){if(typeof t!="object"||t===null||Ve in t||bi in t)return t;const e=wi(t);if(e!==Il&&e!==Tl)return t;var r=new Map,n=mi(t),i=H(0),l=null,o=he,a=u=>{if(he===o)return u();var c=C,h=he;gt(null),li(o);var p=u();return gt(c),li(h),p};return n&&r.set("length",H(t.length,l)),new Proxy(t,{defineProperty(u,c,h){(!("value"in h)||h.configurable===!1||h.enumerable===!1||h.writable===!1)&&oo();var p=r.get(c);return p===void 0?a(()=>{var v=H(h.value,l);return r.set(c,v),v}):S(p,h.value,!0),!0},deleteProperty(u,c){var h=r.get(c);if(h===void 0){if(c in u){const p=a(()=>H(U,l));r.set(c,p),Fe(i)}}else S(h,U),Fe(i);return!0},get(u,c,h){if(c===Ve)return t;var p=r.get(c),v=c in u;if(p===void 0&&(!v||fe(u,c)?.writable)&&(p=a(()=>H(Xt(v?u[c]:U),l)),r.set(c,p)),p!==void 0){var d=f(p);return d===U?void 0:d}return Reflect.get(u,c,h)},getOwnPropertyDescriptor(u,c){this.has?.(u,c);var h=Reflect.getOwnPropertyDescriptor(u,c),p=r.get(c);if(p!==void 0){var v=f(p);if(v===U)return;if(h&&"value"in h)h.value=v;else return{enumerable:!0,configurable:!0,value:v,writable:!0}}return h},has(u,c){if(c===Ve)return!0;var h=r.get(c),p=h!==void 0&&h.v!==U||Reflect.has(u,c);return(h!==void 0||j!==null&&(!p||fe(u,c)?.writable))&&(h===void 0&&(h=a(()=>H(p?Xt(u[c]):U,l)),r.set(c,h)),f(h)===U)?!1:p},set(u,c,h,p){var v=r.get(c),d=c in u;if(n&&c==="length")for(var y=h;y<v.v;y+=1){var M=r.get(y+"");M!==void 0?S(M,U):y in u&&(M=a(()=>H(U,l)),r.set(y+"",M))}if(v===void 0)(!d||fe(u,c)?.writable)&&(v=a(()=>H(void 0,l)),S(v,Xt(h)),r.set(c,v));else{d=v.v!==U;var m=a(()=>Xt(h));S(v,m)}var b=Reflect.getOwnPropertyDescriptor(u,c);if(b?.set&&b.set.call(p,h),!d){if(n&&typeof c=="string"){var V=r.get("length"),I=Number(c);Number.isInteger(I)&&I>=V.v&&S(V,I+1)}Fe(i)}return!0},ownKeys(u){f(i);var c=Reflect.ownKeys(u).filter(v=>{var d=r.get(v);return d===void 0||d.v!==U});for(var[h,p]of r)p.v!==U&&!(h in u)&&c.push(h);return c},setPrototypeOf(){so()}})}var ei,Bi,qi,Fi;function fn(){if(ei===void 0){ei=window,Bi=/Firefox/.test(navigator.userAgent);var t=Element.prototype,e=Node.prototype,r=Text.prototype;qi=fe(e,"firstChild").get,Fi=fe(e,"nextSibling").get,Gn(t)&&(t[nn]=void 0,t[rn]=null,t[ln]=void 0,t.__e=void 0),Gn(r)&&(r[vr]=void 0)}}function vt(t=""){return document.createTextNode(t)}function st(t){return qi.call(t)}function Tt(t){return Fi.call(t)}function Bt(t,e){if(!O)return st(t);var r=st(L);if(r===null)r=L.appendChild(vt());else if(e&&r.nodeType!==3){var n=vt();return r?.before(n),it(n),n}return e&&En(r),it(r),r}function Vr(t,e=!1){if(!O){var r=st(t);return r instanceof Comment&&r.data===""?Tt(r):r}if(e){if(L?.nodeType!==3){var n=vt();return L?.before(n),it(n),n}En(L)}return L}function ri(t,e=!1){if(!O)return st(t);var r=Bt(t,e);return ct(t),r}function yt(t,e=1,r=!1){let n=O?L:t;for(var i;e--;)i=n,n=Tt(n);if(!O)return n;if(r){if(n?.nodeType!==3){var l=vt();return n===null?i?.after(l):n.before(l),it(l),l}En(n)}return it(n),n}function Ki(t){t.textContent=""}function Ui(){return!Ce||Ct!==null?!1:(j.f&yn)!==0}function Sn(t,e,r){return e==null||e==="http://www.w3.org/1999/xhtml"?r?document.createElement(t,{is:r}):document.createElement(t):r?document.createElementNS(e,t,{is:r}):document.createElementNS(e,t)}function En(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 Eo(t){var e=j;if(e===null)return C.f|=mr,t;if((e.f&32768)===0&&(e.f&4)===0)throw t;Pt(t,e)}function Pt(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(r){t=r}}e=e.parent}throw t}}function Wo(t){j===null&&(C===null&&ro(t),eo()),Ut&&to(t)}function jo(t,e){var r=e.last;r===null?e.last=e.first=t:(r.next=t,t.prev=r,e.last=t)}function Rt(t,e){var r=j;r!==null&&r.f&8192&&(t|=wn);var n={ctx:B,deps:null,nodes:null,f:t|St|512,first:null,fn:e,last:null,next:null,parent:r,b:r&&r.b,prev:null,teardown:null,wv:0,ac:null};x?.register_created_effect(n);var i=n;if((t&4)!==0)Ye!==null?Ye.push(n):ge.ensure().schedule(n);else if(e!==null){try{je(n)}catch(o){throw et(n),o}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|=bn))}if(i!==null&&(i.parent=r,r!==null&&jo(i,r),C!==null&&(C.f&2)!==0&&(t&64)===0)){var l=C;(l.effects??(l.effects=[])).push(i)}return n}function Wn(){return C!==null&&!_t}function Gi(t){const e=Rt(8,null);return q(e,pt),e.teardown=t,e}function ni(t){Wo("$effect");var e=j.f;if(!C&&(e&32)!==0&&B!==null&&!B.i){var r=B;(r.e??(r.e=[])).push(t)}else return Yi(t)}function Yi(t){return Rt(4|ql,t)}function Ao(t){ge.ensure();const e=Rt(64|Ae,t);return()=>{et(e)}}function Co(t){ge.ensure();const e=Rt(64|Ae,t);return(r={})=>new Promise(n=>{r.outro?me(e,()=>{et(e),n(void 0)}):(et(e),n(void 0))})}function Zi(t){return Rt(4,t)}function Oo(t){return Rt(Fl|Ae,t)}function Nr(t,e=0){return Rt(8|e,t)}function Ht(t,e=[],r=[],n=[]){vo(n,e,r,i=>{Rt(8,()=>{t(...i.map(f))})})}function jn(t,e=0){return Rt(16|e,t)}function dt(t){return Rt(32|Ae,t)}function Qi(t){var e=t.teardown;if(e!==null){const r=Ut,n=C;ii(!0),gt(null);try{e.call(null)}catch(i){Pt(i,t.parent)}finally{ii(r),gt(n)}}}function An(t,e=!1){var r=t.first;for(t.first=t.last=null;r!==null;){const i=r.ac;i!==null&&Oe(()=>{i.abort(Xe)});var n=r.next;(r.f&64)!==0?r.parent=null:et(r,e),r=n}}function Lo(t){for(var e=t.first;e!==null;){var r=e.next;!(e.f&32)&&et(e),e=r}}function et(t,e=!0){var r=!1;(e||t.f&262144)&&t.nodes!==null&&t.nodes.end!==null&&(No(t.nodes.start,t.nodes.end),r=!0),t.f|=Yn,An(t,e&&!r),Ze(t,0);var n=t.nodes&&t.nodes.t;if(n!==null)for(const l of n)l.stop();Qi(t),t.f^=Yn,t.f|=Bl;var i=t.parent;i!==null&&i.first!==null&&Xi(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 r=t===e?null:Tt(t);t.remove(),t=r}}function Xi(t){var e=t.parent,r=t.prev,n=t.next;r!==null&&(r.next=n),n!==null&&(n.prev=r),e!==null&&(e.first===t&&(e.first=n),e.last===t&&(e.last=r))}function me(t,e,r=!0){var n=[];t.f|=256,Ji(t,n,!0);var i=()=>{r&&et(t),e&&e()},l=n.length;if(l>0){var o=()=>--l||i();for(var a of n)a.out(o)}else i()}function Ji(t,e,r){if((t.f&8192)===0){t.f^=wn;var n=t.nodes&&t.nodes.t;if(n!==null)for(const a of n)(a.is_global||r)&&e.push(a);for(var i=t.first;i!==null;){var l=i.next;if((i.f&64)===0){var o=(i.f&65536)!==0||(i.f&32)!==0&&(t.f&16)!==0;Ji(i,e,o?r:!1)}i=l}}}function Er(t){t.f&=-257,tl(t,!0)}function tl(t,e){if((t.f&256)===0&&(t.f&8192)!==0){t.f^=wn,!(t.f&1024)&&(q(t,St),ge.ensure().schedule(t));for(var r=t.first;r!==null;){var n=r.next,i=(r.f&65536)!==0||(r.f&32)!==0;tl(r,i?e:!1),r=n}var l=t.nodes&&t.nodes.t;if(l!==null)for(const o of l)(o.is_global||e)&&o.in()}}function Cn(t,e){if(t.nodes)for(var r=t.nodes.start,n=t.nodes.end;r!==null;){var i=r===n?null:Tt(r);e.append(r),r=i}}var Po=null,pr=!1,Ut=!1;function ii(t){Ut=t}var C=null,_t=!1;function gt(t){C=t}var j=null;function It(t){j=t}var kt=null;function el(t){C!==null&&(C.f&2097152||C.f&2)&&(kt??(kt=new Set)).add(t)}var nt=null,ot=0,ht=null;function zo(t){ht=t}var rl=1,ue=0,he=ue;function li(t){he=t}function nl(){return++rl}function tr(t){var e=t.f;if((e&2048)!==0)return!0;if((e&4096)!==0){for(var r=t.deps,n=r.length,i=0;i<n;i++){var l=r[i];if(tr(l)&&Ci(l),l.wv>t.wv)return!0}e&512&&tt===null&&q(t,pt)}return!1}function il(t,e,r=!0){var n=t.reactions;if(n!==null&&!(!Ce&&kt!==null&&kt.has(t)))for(var i=0;i<n.length;i++){var l=n[i];(l.f&2)!==0?il(l,e,!1):e===l&&(r?q(l,St):l.f&1024&&q(l,de),Ii(l))}}function ll(t){var e=nt,r=ot,n=ht,i=C,l=kt,o=B,a=_t,u=he,c=t.f;nt=null,ot=0,ht=null,C=(c&96)===0?t:null,kt=null,Se(t.ctx),_t=!1,he=++ue,t.ac!==null&&(Oe(()=>{t.ac.abort(Xe)}),t.ac=null);try{t.f|=Zn;var h=t.fn,p=h();t.f|=yn;var v=oi(t);if(Je()&&ht!==null&&!_t&&v!==null&&(t.f&6146)===0)for(var d=0;d<ht.length;d++)il(ht[d],t);if(i!==null&&i!==t){if(ue++,i.deps!==null)for(let y=0;y<r;y+=1)i.deps[y].rv=ue;if(e!==null)for(const y of e)y.rv=ue;ht!==null&&(n===null?n=ht:n.push(...ht))}return t.f&8388608&&(t.f^=mr),p}catch(y){return oi(t),Eo(y)}finally{t.f^=Zn,nt=e,ot=r,ht=n,C=i,kt=l,Se(o),_t=a,he=u}}function oi(t){var e=t.deps,r=x?.is_fork;if(nt!==null){var n;if(r||Ze(t,ot),e!==null&&ot>0)for(e.length=ot+nt.length,n=0;n<nt.length;n++)e[ot+n]=nt[n];else t.deps=e=nt;if(Wn()&&(t.f&512)!==0)for(n=ot;n<e.length;n++){var i;((i=e[n]).reactions??(i.reactions=[])).push(t)}}else!r&&e!==null&&ot<e.length&&(Ze(t,ot),e.length=ot);return e}function Io(t,e){let r=e.reactions;if(r!==null){var n=Pl.call(r,t);if(n!==-1){var i=r.length-1;i===0?r=e.reactions=null:(r[n]=r[i],r.pop())}}if(r===null&&(e.f&2)!==0&&(nt===null||!en.call(nt,e))){var l=e;l.f&512&&(l.f^=512),l.v!==U&&$n(l),l.ac!==null&&Oe(()=>{l.ac.abort(Xe),l.ac=null,q(l,St)}),wo(l),Ze(l,0)}}function Ze(t,e){var r=t.deps;if(r!==null)for(var n=e;n<r.length;n++)Io(t,r[n])}function je(t){var e=t.f;if((e&16384)===0){q(t,pt);var r=j,n=pr;j=t,pr=(e&96)===0;try{(e&16777232)!==0?Lo(t):An(t),Qi(t);var i=ll(t);t.teardown=typeof i=="function"?i:null,t.wv=rl}finally{pr=n,j=r}}}async function To(){if(Ce)return new Promise(t=>{requestAnimationFrame(()=>t()),setTimeout(()=>t())});await Promise.resolve(),Mr()}function f(t){var e=(t.f&2)!==0;if(Po?.add(t),C!==null&&!_t&&!(j!==null&&(j.f&16384)!==0)&&(kt===null||!kt.has(t))){var r=C.deps;if((C.f&2097152)!==0)t.rv<ue&&(t.rv=ue,nt===null&&r!==null&&r[ot]===t?ot++:nt===null?nt=[t]:nt.push(t));else{var n;(n=C).deps??(n.deps=[]),en.call(C.deps,t)||C.deps.push(t);var i=t.reactions;i===null?t.reactions=[C]:en.call(i,C)||i.push(C)}}if(Ut&&Nt.has(t))return Nt.get(t);if(e){var l=t;if(Ut){var o=l.v;return(!(l.f&1024)&&l.reactions!==null||sl(l))&&(o=xn(l)),Nt.set(l,o),o}var a=(l.f&512)===0&&!_t&&C!==null&&(pr||(C.f&512)!==0),u=(l.f&yn)===0;tr(l)&&(a&&(l.f|=512),Ci(l)),a&&!u&&(Oi(l),ol(l))}if(tt?.has(t))return tt.get(t);if((t.f&8388608)!==0)throw t.v;return t.v}function ol(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)&&(Oi(e),ol(e))}function sl(t){if(t.v===U)return!0;if(t.deps===null)return!1;for(const e of t.deps)if(Nt.has(e)||(e.f&2)!==0&&sl(e))return!0;return!1}function Pr(t){var e=_t;try{return _t=!0,t()}finally{_t=e}}var xe=Symbol("events"),al=new Set,cn=new Set;function Ro(t,e,r,n={}){function i(l){if(n.capture||hn.call(e,l),!l.cancelBubble)return Oe(()=>r?.call(this,l))}return t.startsWith("pointer")||t.startsWith("touch")||t==="wheel"?(i.__removed=!1,zt(()=>{i.__removed||e.addEventListener(t,i,n)})):e.addEventListener(t,i,n),i}function Do(t,e,r,n,i){var l={capture:n,passive:i},o=Ro(t,e,r,l);(e===document.body||e===window||e===document||e instanceof HTMLMediaElement)&&Gi(()=>{o.__removed=!0,e.removeEventListener(t,o,l)})}function re(t,e,r){(e[xe]??(e[xe]={}))[t]=r}function Ho(t){for(var e=0;e<t.length;e++)al.add(t[e]);for(var r of cn)r(t)}var Br=null,qr=!1;function hn(t){var e=this,r=e.ownerDocument,n=t.type,i=t.composedPath?.()||[],l=i[0]||t.target;Br=t,qr||(qr=!0,setTimeout(()=>{qr=!1,Br=null}));var o=0,a=Br===t&&t[xe];if(a){var u=i.indexOf(a);if(u!==-1&&(e===document||e===window)){t[xe]=e;return}var c=i.indexOf(e);if(c===-1)return;u<=c&&(o=u)}if(l=i[o]||t.target,l!==e){Ke(t,"currentTarget",{configurable:!0,get(){return l||r}});var h=C,p=j;gt(null),It(null);try{for(var v,d=[];l!==null&&l!==e;){try{var y=l[xe]?.[n];y!=null&&(!l.disabled||t.target===l)&&y.call(l,t)}catch(M){v?d.push(M):v=M}if(t.cancelBubble)break;o++,l=o<i.length?i[o]:null}if(v){for(let M of d)queueMicrotask(()=>{throw M});throw v}}finally{t[xe]=e,delete t.currentTarget,gt(h),It(p)}}}var Vo=globalThis?.window?.trustedTypes&&globalThis.window.trustedTypes.createPolicy("svelte-trusted-html",{createHTML:t=>t});function Bo(t){return Vo?.createHTML(t)??t}function ul(t){var e=Sn("template");return e.innerHTML=Bo(t.replaceAll("<!>","<!---->")),e.content}function Kt(t,e){var r=j;r.nodes===null&&(r.nodes={start:t,end:e,a:null,t:null})}function fl(t,e){var r=(e&1)!==0,n=(e&2)!==0,i,l=!t.startsWith("<!>");return()=>{if(O)return Kt(L,null),L;i===void 0&&(i=ul(l?t:"<!>"+t),r||(i=st(i)));var o=n||Bi?document.importNode(i,!0):i.cloneNode(!0);if(r){var a=st(o),u=o.lastChild;Kt(a,u)}else Kt(o,o);return o}}function qo(t,e,r="svg"){var n=!t.startsWith("<!>"),i=(e&1)!==0,l=`<${r}>${n?t:"<!>"+t}</${r}>`,o;return()=>{if(O)return Kt(L,null),L;if(!o){var a=st(ul(l));if(i)for(o=document.createDocumentFragment();st(a);)o.appendChild(st(a));else o=st(a)}var u=o.cloneNode(!0);if(i){var c=st(u),h=u.lastChild;Kt(c,h)}else Kt(u,u);return u}}function Et(t,e){return qo(t,e,"svg")}function Fr(){if(O)return Kt(L,null),L;var t=document.createDocumentFragment(),e=document.createComment(""),r=vt();return t.append(e,r),Kt(e,r),t}function Q(t,e){if(O){var r=j;(!(r.f&32768)||r.nodes.end===null)&&(r.nodes.end=L),Or();return}t!==null&&t.before(e)}var Fo=["touchstart","touchmove"];function Ko(t){return Fo.includes(t)}function Uo(t){let e=0,r=pe(0),n;return()=>{Wn()&&(f(r),Nr(()=>(e===0&&(n=Pr(()=>t(()=>Fe(r)))),e+=1,()=>{zt(()=>{e-=1,e===0&&(n?.(),n=void 0,Fe(r))})})))}}var Go=bn|Ae;function Yo(t,e,r,n){new Zo(t,e,r,n)}var xt=new WeakMap,vn=new WeakMap,Lt=new WeakMap,Qe=new WeakMap,at=new WeakMap,Mt=new WeakMap,ut=new WeakMap,$t=new WeakMap,Jt=new WeakMap,_e=new WeakMap,ve=new WeakMap,ar=new WeakMap,pn=new WeakMap,dn=new WeakMap,ne=new WeakMap,si=new WeakMap,G=new WeakSet,Zo=class{constructor(t,e,r,n){Mn(this,G),D(this,"parent",void 0),D(this,"is_pending",!1),D(this,"transform_error",void 0),k(this,xt,void 0),k(this,vn,O?L:null),k(this,Lt,void 0),k(this,Qe,void 0),k(this,at,void 0),k(this,Mt,null),k(this,ut,null),k(this,$t,null),k(this,Jt,null),k(this,_e,0),k(this,ve,0),k(this,ar,!1),k(this,pn,new Set),k(this,dn,new Set),k(this,ne,null),k(this,si,Uo(()=>(_(ne,this,pe(s(_e,this))),()=>{_(ne,this,null)}))),_(xt,this,t),_(Lt,this,e),_(Qe,this,i=>{var l=j;l.b=this,l.f|=128,r(i)}),this.parent=j.b,this.transform_error=n??this.parent?.transform_error??(i=>i),_(at,this,jn(()=>{if(O){const i=s(vn,this);Or();const l=i.data==="[!";if(i.data.startsWith("[?")){const o=JSON.parse(i.data.slice(2));W(G,this,Xo).call(this,o)}else l?W(G,this,Jo).call(this):W(G,this,Qo).call(this)}else W(G,this,hl).call(this)},Go)),O&&_(xt,this,L)}defer_effect(t){Wi(t,s(pn,this),s(dn,this))}is_rendered(){return!this.is_pending&&(!this.parent||this.parent.is_rendered())}has_pending_snippet(){return!!s(Lt,this).pending}update_pending_count(t,e){W(G,this,vl).call(this,t,e),_(_e,this,s(_e,this)+t),s(ne,this)&&!s(ar,this)&&(_(ar,this,!0),zt(()=>{_(ar,this,!1),s(ne,this)&&We(s(ne,this),s(_e,this))}))}get_effect_pending(){return s(si,this).call(this),f(s(ne,this))}error(t){if(!s(Lt,this).onerror&&!s(Lt,this).failed)throw t;x?.is_fork?(s(Mt,this)&&x.skip_effect(s(Mt,this)),s(ut,this)&&x.skip_effect(s(ut,this)),s($t,this)&&x.skip_effect(s($t,this)),x.oncommit(()=>{W(G,this,ai).call(this,t)})):W(G,this,ai).call(this,t)}};function Qo(){try{_(Mt,this,dt(()=>s(Qe,this).call(this,s(xt,this))))}catch(t){this.error(t)}}function Xo(t){const e=s(Lt,this).failed,{reset:r,invoke_onerror:n}=W(G,this,cl).call(this,t);zt(n),e&&_($t,this,dt(()=>{e(s(xt,this),()=>t,()=>r)}))}function cl(t){var e=!1,r=!1;const n=()=>{if(e){Yl();return}e=!0,r&&uo(),s($t,this)!==null&&me(s($t,this),()=>{_($t,this,null)}),W(G,this,On).call(this,()=>{W(G,this,hl).call(this)})};return{reset:n,invoke_onerror:()=>{try{r=!0,s(Lt,this).onerror?.(t,n),r=!1}catch(i){Pt(i,s(at,this)&&s(at,this).parent)}}}}function Jo(){const t=s(Lt,this).pending;t&&(this.is_pending=!0,_(ut,this,dt(()=>t(s(xt,this)))),zt(()=>{var e=_(Jt,this,document.createDocumentFragment()),r=vt(),n=!1;if(e.append(r),_(Mt,this,W(G,this,On).call(this,()=>{try{return dt(()=>s(Qe,this).call(this,r))}catch(i){try{this.error(i),n=!0}catch(l){Pt(l,s(at,this).parent)}return null}})),s(Mt,this)===null){_(Jt,this,null),n&&W(G,this,Wr).call(this,x);return}s(ve,this)===0&&(s(xt,this).before(e),_(Jt,this,null),me(s(ut,this),()=>{_(ut,this,null)}),W(G,this,Wr).call(this,x))}))}function hl(){try{if(this.is_pending=this.has_pending_snippet(),_(ve,this,0),_(_e,this,0),_(Mt,this,dt(()=>{s(Qe,this).call(this,s(xt,this))})),s(ve,this)>0){var t=_(Jt,this,document.createDocumentFragment());Cn(s(Mt,this),t);const e=s(Lt,this).pending;_(ut,this,dt(()=>e(s(xt,this))))}else W(G,this,Wr).call(this,x)}catch(e){this.error(e)}}function Wr(t){this.is_pending=!1,t.transfer_effects(s(pn,this),s(dn,this))}function On(t){var e=j,r=C,n=B;It(s(at,this)),gt(s(at,this)),Se(s(at,this).ctx);try{return ge.ensure(),t()}finally{It(e),gt(r),Se(n)}}function vl(t,e){if(!this.has_pending_snippet()){if(this.parent){var r;W(G,r=this.parent,vl).call(r,t,e)}return}_(ve,this,s(ve,this)+t),s(ve,this)===0&&(W(G,this,Wr).call(this,e),s(ut,this)&&me(s(ut,this),()=>{_(ut,this,null)}),s(Jt,this)&&(s(xt,this).before(s(Jt,this)),_(Jt,this,null)))}function ai(t){s(Mt,this)&&(et(s(Mt,this)),_(Mt,this,null)),s(ut,this)&&(et(s(ut,this)),_(ut,this,null)),s($t,this)&&(et(s($t,this)),_($t,this,null)),O&&(it(s(vn,this)),Zl(),it(wr()));let e=s(Lt,this).failed;const r=n=>{const{reset:i,invoke_onerror:l}=W(G,this,cl).call(this,n);l(),e&&_($t,this,W(G,this,On).call(this,()=>{try{return dt(()=>{var o=j;o.b=this,o.f|=128,e(s(xt,this),()=>n,()=>i)})}catch(o){return Pt(o,s(at,this).parent),null}}))};zt(()=>{var n;try{n=this.transform_error(t)}catch(i){Pt(i,s(at,this)&&s(at,this).parent);return}n!==null&&typeof n=="object"&&typeof n.then=="function"?n.then(r,i=>Pt(i,s(at,this)&&s(at,this).parent)):r(n)})}function ui(t,e){var r=e==null?"":typeof e=="object"?`${e}`:e;r!==(t[vr]??(t[vr]=t.nodeValue))&&(t[vr]=r,t.nodeValue=`${r}`)}function pl(t,e){return dl(t,e)}function ts(t,e){fn(),e.intro=e.intro??!1;const r=e.target,n=O,i=L;try{for(var l=st(r);l&&(l.nodeType!==8||l.data!=="[");)l=Tt(l);if(!l)throw Me;qt(!0),it(l);const o=dl(t,{...e,anchor:l});return qt(!1),o}catch(o){if(o instanceof Error&&o.message.split(`
2
+ `).some(a=>a.startsWith("https://svelte.dev/e/")))throw o;return o!==Me&&console.warn("Failed to hydrate: ",o),e.recover===!1&&io(),fn(),Ki(r),qt(!1),pl(t,e)}finally{qt(n),it(i)}}var ur=new Map;function dl(t,{target:e,anchor:r,props:n={},events:i,context:l,intro:o=!0,transformError:a}){fn();var u=void 0,c=Co(()=>{var h=r??e.appendChild(vt());Yo(h,{pending:()=>{}},d=>{Mi({});var y=B;if(l&&(y.c=l),i&&(n.$$events=i),O&&Kt(d,null),u=t(d,n)||_n(),O&&(j.nodes.end=L,L===null||L.nodeType!==8||L.data!=="]"))throw Cr(),Me;Si()},a);var p=new Set,v=d=>{for(var y=0;y<d.length;y++){var M=d[y];if(!p.has(M)){p.add(M);var m=Ko(M);for(const I of[e,document]){var b=ur.get(I);b===void 0&&(b=new Map,ur.set(I,b));var V=b.get(M);V===void 0?(I.addEventListener(M,hn,{passive:m}),b.set(M,1)):b.set(M,V+1)}}}};return v(Ar(al)),cn.add(v),()=>{for(var d of p)for(const m of[e,document]){var y=ur.get(m),M=y.get(d);--M==0?(m.removeEventListener(d,hn),y.delete(d),y.size===0&&ur.delete(m)):y.set(d,M)}cn.delete(v),h!==r&&h.parentNode?.removeChild(h)}});return gn.set(u,c),u}var gn=new WeakMap;function es(t,e){const r=gn.get(t);return r?(gn.delete(t),r(e)):Promise.resolve()}var Vt=new WeakMap,Yt=new WeakMap,bt=new WeakMap,Pe=new WeakMap,Kr=new WeakMap,Ur=new WeakMap,fi=new WeakMap,rs=class{constructor(t,e=!0){D(this,"anchor",void 0),k(this,Vt,new Map),k(this,Yt,new Map),k(this,bt,new Map),k(this,Pe,new Set),k(this,Kr,!0),k(this,Ur,r=>{if(s(Vt,this).has(r)){var n=s(Vt,this).get(r),i=s(Yt,this).get(n);if(i)Er(i),s(Pe,this).delete(n);else{var l=s(bt,this).get(n);l&&(Er(l.effect),s(Yt,this).set(n,l.effect),s(bt,this).delete(n),l.fragment.lastChild.remove(),this.anchor.before(l.fragment),i=l.effect)}for(const[o,a]of s(Vt,this)){if(s(Vt,this).delete(o),o===r)break;const u=s(bt,this).get(a);u&&(et(u.effect),s(bt,this).delete(a))}for(const[o,a]of s(Yt,this)){if(o===n||s(Pe,this).has(o))continue;const u=()=>{if(Array.from(s(Vt,this).values()).includes(o)){var c=document.createDocumentFragment();Cn(a,c),c.append(vt()),s(bt,this).set(o,{effect:a,fragment:c})}else et(a);s(Pe,this).delete(o),s(Yt,this).delete(o)};s(Kr,this)||!i?(s(Pe,this).add(o),me(a,u,!1)):u()}}}),k(this,fi,r=>{s(Vt,this).delete(r);const n=Array.from(s(Vt,this).values());for(const[i,l]of s(bt,this))n.includes(i)||(et(l.effect),s(bt,this).delete(i))}),this.anchor=t,_(Kr,this,e)}ensure(t,e){var r=x,n=Ui();if(e&&!s(Yt,this).has(t)&&!s(bt,this).has(t))if(n){var i=document.createDocumentFragment(),l=vt();i.append(l),s(bt,this).set(t,{effect:dt(()=>e(l)),fragment:i})}else s(Yt,this).set(t,dt(()=>e(this.anchor)));if(s(Vt,this).set(r,t),n){for(const[o,a]of s(Yt,this))o===t?r.unskip_effect(a):r.skip_effect(a);for(const[o,a]of s(bt,this))o===t?r.unskip_effect(a.effect):r.skip_effect(a.effect);r.oncommit(s(Ur,this)),r.ondiscard(s(fi,this))}else O&&(this.anchor=L),s(Ur,this).call(this,r)}};function ze(t,e,r=!1){var n;O&&(n=L,Or());var i=new rs(t),l=r?bn:0;function o(a,u){if(O){var c=$i(n);if(a!==parseInt(c.substring(1))){var h=wr();it(h),i.anchor=h,qt(!1),i.ensure(a,u),qt(!0);return}}i.ensure(a,u)}jn(()=>{var a=!1;e((u,c=0)=>{a=!0,o(c,u)}),a||o(-1,null)},l)}function fr(t,e){return e}function ns(t,e,r){for(var n=[],i=e.length,l,o=e.length,a=0;a<i;a++){let p=e[a];me(p,()=>{if(l){if(l.pending.delete(p),l.done.add(p),l.pending.size===0){var v=t.outrogroups;mn(t,Ar(l.done)),v.delete(l),v.size===0&&(t.outrogroups=null)}}else o-=1},!1)}if(o===0){var u=n.length===0&&r!==null&&t.pending.size===0;if(u){var c=r,h=c.parentNode;Ki(h),h.append(c),t.items.clear()}mn(t,e,!u)}else l={pending:new Set(e),done:new Set},(t.outrogroups??(t.outrogroups=new Set)).add(l)}function mn(t,e,r=!0){var n;if(t.pending.size>0){n=new Set;for(const o of t.pending.values())for(const a of o)n.add(t.items.get(a).e)}for(var i=0;i<e.length;i++){var l=e[i];n?.has(l)?(l.f|=He,Cn(l,document.createDocumentFragment())):et(e[i],r)}}var cr;function ie(t,e,r,n,i,l=null){var o=t,a=new Map;if((e&4)!==0){var u=t;o=O?it(st(u)):u.appendChild(vt())}O&&Or();var c=null,h=kn(()=>{var b=r();return mi(b)?b:b==null?[]:Ar(b)}),p,v=new Map,d=!0;function y(b){!(m.effect.f&16384)&&(m.pending.delete(b),m.fallback=c,is(m,p,o,e,n),c!==null&&(p.length===0?(c.f&33554432)===0?Er(c):(c.f^=He,De(c,null,o)):me(c,()=>{c=null})))}function M(b){m.pending.delete(b)}var m={effect:jn(()=>{p=f(h);var b=p.length;let V=!1;O&&$i(o)==="[!"!=(b===0)&&(o=wr(),it(o),qt(!1),V=!0);for(var I=new Set,N=x,X=Ui(),Y=0;Y<b;Y+=1){O&&L.nodeType===8&&L.data==="]"&&(o=L,V=!0,qt(!1));var Z=p[Y],J=n(Z,Y),rt=d?null:a.get(J);rt?(rt.v&&We(rt.v,Z),rt.i&&We(rt.i,Y),X&&N.unskip_effect(rt.e)):(rt=ls(a,d?o:cr??(cr=vt()),Z,J,Y,i,e,r),d||(rt.e.f|=He),a.set(J,rt)),I.add(J)}if(b===0&&l&&!c&&(d?c=dt(()=>l(o)):(c=dt(()=>l(cr??(cr=vt()))),c.f|=He)),b>I.size&&Jl("","",""),O&&b>0&&it(wr()),!d)if(v.set(N,I),X){for(const[R,zr]of a)I.has(R)||N.skip_effect(zr.e);N.oncommit(y),N.ondiscard(M)}else y(N);V&&qt(!0),f(h)}),flags:e,items:a,pending:v,outrogroups:null,fallback:c};d=!1,O&&(o=L)}function Ie(t){for(;t!==null&&(t.f&32)===0;)t=t.next;return t}function is(t,e,r,n,i){var l=(n&8)!==0,o=e.length,a=t.items,u=Ie(t.effect.first),c,h=null,p,v=[],d=[],y,M,m,b;if(l)for(b=0;b<o;b+=1)y=e[b],M=i(y,b),m=a.get(M).e,!(m.f&33554432)&&(m.nodes?.a?.measure(),(p??(p=new Set)).add(m));for(b=0;b<o;b+=1){if(y=e[b],M=i(y,b),m=a.get(M).e,t.outrogroups!==null)for(const R of t.outrogroups)R.pending.delete(m),R.done.delete(m);if(m.f&8192&&(Er(m),l&&(m.nodes?.a?.unfix(),(p??(p=new Set)).delete(m))),(m.f&33554432)!==0)if(m.f^=He,m===u)De(m,null,r);else{var V=h?h.next:u;m===t.effect.last&&(t.effect.last=m.prev),m.prev&&(m.prev.next=m.next),m.next&&(m.next.prev=m.prev),Zt(t,h,m),Zt(t,m,V),De(m,V,r),h=m,v=[],d=[],u=Ie(h.next);continue}if(m!==u){if(c!==void 0&&c.has(m)){if(v.length<d.length){var I=d[0],N;h=I.prev;var X=v[0],Y=v[v.length-1];for(N=0;N<v.length;N+=1)De(v[N],I,r);for(N=0;N<d.length;N+=1)c.delete(d[N]);Zt(t,X.prev,Y.next),Zt(t,h,X),Zt(t,Y,I),u=I,h=Y,b-=1,v=[],d=[]}else c.delete(m),De(m,u,r),Zt(t,m.prev,m.next),Zt(t,m,h===null?t.effect.first:h.next),Zt(t,h,m),h=m;continue}for(v=[],d=[];u!==null&&u!==m;)(c??(c=new Set)).add(u),d.push(u),u=Ie(u.next);if(u===null)continue}!(m.f&33554432)&&v.push(m),h=m,u=Ie(m.next)}if(t.outrogroups!==null){for(const R of t.outrogroups)R.pending.size===0&&(mn(t,Ar(R.done)),t.outrogroups?.delete(R));t.outrogroups.size===0&&(t.outrogroups=null)}if(u!==null||c!==void 0){var Z=[];if(c!==void 0)for(m of c)!(m.f&8192)&&Z.push(m);for(;u!==null;)!(u.f&8192)&&u!==t.fallback&&Z.push(u),u=Ie(u.next);var J=Z.length;if(J>0){var rt=(n&4)!==0&&o===0?r:null;if(l){for(b=0;b<J;b+=1)Z[b].nodes?.a?.measure();for(b=0;b<J;b+=1)Z[b].nodes?.a?.fix()}ns(t,Z,rt)}}l&&zt(()=>{if(p!==void 0)for(m of p)m.nodes?.a?.apply()})}function ls(t,e,r,n,i,l,o,a){var u=(o&1)!==0?(o&16)===0?Hi(r,!1,!1):pe(r):null,c=(o&2)!==0?pe(i):null;return{v:u,i:c,e:dt(()=>(l(e,u??r,c??i,a),()=>{t.delete(n)}))}}function De(t,e,r){if(t.nodes)for(var n=t.nodes.start,i=t.nodes.end,l=e&&(e.f&33554432)===0?e.nodes.start:r;n!==null;){var o=Tt(n);if(l.before(n),n===i)return;n=o}}function Zt(t,e,r){e===null?t.effect.first=r:e.next=r,r===null?t.effect.last=e:r.prev=e}function os(t,e){Zi(()=>{t=j?.parent?.nodes?.start??t;var r=t.getRootNode(),n=r.host?r:r.head??r.ownerDocument.head;if(!n.querySelector("#"+e.hash)){const i=Sn("style");i.id=e.hash,i.textContent=e.code,n.appendChild(i)}})}var ci=[...`
3
+ \r\f \v\uFEFF`];function ss(t,e,r){var n=t==null?"":""+t;if(e&&(n=n?n+" "+e:e),r){for(var i of Object.keys(r))if(r[i])n=n?n+" "+i:i;else if(n.length)for(var l=i.length,o=0;(o=n.indexOf(i,o))>=0;){var a=o+l;(o===0||ci.includes(n[o-1]))&&(a===n.length||ci.includes(n[a]))?n=(o===0?"":n.substring(0,o))+n.substring(a+1):o=a}}return n===""?null:n}function hi(t,e=!1){var r=e?" !important;":";",n="";for(var i of Object.keys(t)){var l=t[i];l!=null&&l!==""&&(n+=" "+i+": "+l+r)}return n}function Gr(t){return t[0]!=="-"||t[1]!=="-"?t.toLowerCase():t}function as(t,e){if(e){var r="",n,i;if(Array.isArray(e)?(n=e[0],i=e[1]):n=e,t){t=String(t).replaceAll(/\/\*.*?\*\//g,"").trim();var l=!1,o=0,a=!1,u=[];n&&u.push(...Object.keys(n).map(Gr)),i&&u.push(...Object.keys(i).map(Gr));var c=0,h=-1;const M=t.length;for(var p=0;p<M;p++){var v=t[p];if(a?v==="/"&&t[p-1]==="*"&&(a=!1):l?l===v&&(l=!1):v==="/"&&t[p+1]==="*"?a=!0:v==='"'||v==="'"?l=v:v==="("?o++:v===")"&&o--,!a&&l===!1&&o===0){if(v===":"&&h===-1)h=p;else if(v===";"||p===M-1){if(h!==-1){var d=Gr(t.substring(c,h).trim());if(!u.includes(d)){v!==";"&&p++;var y=t.substring(c,p).trim();r+=" "+y+";"}}c=p+1,h=-1}}}}return n&&(r+=hi(n)),i&&(r+=hi(i,!0)),r=r.trim(),r===""?null:r}return t==null?null:String(t)}function vi(t,e,r,n,i,l){var o=t[nn];if(O||o!==r||o===void 0){var a=ss(r,n,l);(!O||a!==t.getAttribute("class"))&&(a==null?t.removeAttribute("class"):e?t.className=a:t.setAttribute("class",a)),t[nn]=r}else if(l&&i!==l)for(var u in l){var c=!!l[u];(i==null||c!==!!i[u])&&t.classList.toggle(u,c)}return l}function Yr(t,e={},r,n){for(var i in r){var l=r[i];e[i]!==l&&(r[i]==null?t.style.removeProperty(i):t.style.setProperty(i,l,n))}}function us(t,e,r,n){var i=t[ln];if(O||i!==e){var l=as(e,n);(!O||l!==t.getAttribute("style"))&&(l==null?t.removeAttribute("style"):t.style.cssText=l),t[ln]=e}else n&&(Array.isArray(n)?(Yr(t,r?.[0],n[0]),Yr(t,r?.[1],n[1],"important")):Yr(t,r,n));return n}var fs=Symbol("is custom element"),cs=Symbol("is html"),hs=Ul?"link":"LINK";function vs(t){if(O){var e=!1,r=()=>{if(!e){if(e=!0,t.hasAttribute("value")){var n=t.value;A(t,"value",null),t.value=n}if(t.hasAttribute("checked")){var i=t.checked;A(t,"checked",null),t.checked=i}}};t[Be]=r,zt(r),ji()}}function A(t,e,r,n){var i=ps(t);O&&(i[e]=t.getAttribute(e),e==="src"||e==="srcset"||e==="href"&&t.nodeName===hs)||i[e]!==(i[e]=r)&&(e==="loading"&&(t[Kl]=r),r==null?t.removeAttribute(e):typeof r!="string"&&ds(t).has(e)?t[e]=r:t.setAttribute(e,r))}function ps(t){return t[rn]??(t[rn]={[fs]:t.nodeName.includes("-"),[cs]:t.namespaceURI==="http://www.w3.org/1999/xhtml"})}var pi=new Map;function ds(t){var e=t.getAttribute("is")||t.nodeName,r=pi.get(e);if(r)return r;pi.set(e,r=new Set);for(var n,i=t,l=Element.prototype;l!==i;){n=zl(i);for(var o in n)n[o].set&&o!=="innerHTML"&&o!=="textContent"&&o!=="innerText"&&r.add(o);i=wi(i)}return r}function gs(t,e,r=e){var n=new WeakSet;ho(t,"input",async i=>{var l=i?t.defaultValue:t.value;if(l=Zr(t)?Qr(l):l,r(l),x!==null&&n.add(x),await To(),l!==(l=e())){var o=t.selectionStart,a=t.selectionEnd,u=t.value.length;if(t.value=l??"",a!==null){var c=t.value.length;o===a&&a===u&&c>u?(t.selectionStart=c,t.selectionEnd=c):(t.selectionStart=o,t.selectionEnd=Math.min(a,c))}}}),(O&&t.defaultValue!==t.value||Pr(e)==null&&t.value)&&(r(Zr(t)?Qr(t.value):t.value),x!==null&&n.add(x)),Nr(()=>{var i=e();if(t===document.activeElement){var l=Ce?br:x;if(n.has(l))return}Zr(t)&&i===Qr(t.value)||t.type==="date"&&!i&&!t.value||i!==t.value&&(t.value=i??"")})}function Zr(t){var e=t.type;return e==="number"||e==="range"}function Qr(t){return t===""?null:+t}var gl,$e=new WeakMap,jr=new WeakMap,Xr=new WeakMap,di=new WeakSet,ml=class{constructor(t){Mn(this,di),k(this,$e,new WeakMap),k(this,jr,void 0),k(this,Xr,void 0),_(Xr,this,t)}observe(t,e){var r=s($e,this).get(t)||new Set;return r.add(e),s($e,this).set(t,r),W(di,this,ms).call(this).observe(t,s(Xr,this)),()=>{var n=s($e,this).get(t);n.delete(e),n.size===0&&(s($e,this).delete(t),s(jr,this).unobserve(t))}}};gl=ml;function ms(){return s(jr,this)??_(jr,this,new ResizeObserver(t=>{for(var e of t){gl.entries.set(e.target,e);for(var r of s($e,this).get(e.target)||[])r(e)}}))}D(ml,"entries",new WeakMap);function Jr(t,e){return t===e||t?.[Ve]===e}function tn(t=_n(),e,r,n){var i=B.r,l=j;return Zi(()=>{var o,a;return Nr(()=>{o=a,a=n?.()||[],Pr(()=>{Jr(r(...a),t)||(e(t,...a),o&&Jr(r(...o),t)&&e(null,...o))})}),()=>{let u=l;for(;u!==i&&u.parent!==null&&u.parent.f&33554432;)u=u.parent;const c=()=>{a&&Jr(r(...a),t)&&e(null,...a)},h=u.teardown;u.teardown=()=>{c(),h?.()}}}),t}var hr=!1;function ws(t){var e=hr;try{return hr=!1,[t(),hr]}finally{hr=e}}function gi(t,e,r,n){var i=!Lr||(r&2)!==0,l=(r&8)!==0,o=(r&16)!==0,a=n,u=!0,c=void 0,h=()=>o&&i?(c??(c=Ge(n)),f(c)):(u&&(u=!1,a=o?Pr(n):n),a);let p;if(l){var v=Ve in t||_i in t;p=fe(t,e)?.set??(v&&e in t?N=>t[e]=N:void 0)}var d,y=!1;l?[d,y]=ws(()=>t[e]):d=t[e],d===void 0&&n!==void 0&&(d=h(),p&&(i&&lo(e),p(d)));var M;if(i?M=()=>{var N=t[e];return N===void 0?h():(u=!0,N)}:M=()=>{var N=t[e];return N!==void 0&&(a=void 0),N===void 0?a:N},i&&(r&4)===0)return M;if(p){var m=t.$$legacy;return(function(N,X){return arguments.length>0?((!i||!X||m||y)&&p(X?M():N),N):M()})}var b=!1,V=((r&1)!==0?Ge:kn)(()=>(b=!1,M()));l&&f(V);var I=j;return(function(N,X){if(arguments.length>0){const Y=X?f(V):i&&l?Xt(N):N;return S(V,Y),b=!0,a!==void 0&&(a=Y),N}return Ut&&b||(I.f&16384)!==0?V.v:f(V)})}function ys(t){return new bs(t)}var le=new WeakMap,At=new WeakMap,bs=class{constructor(t){k(this,le,void 0),k(this,At,void 0);var e=new Map,r=(i,l)=>{var o=Hi(l,!1,!1);return e.set(i,o),o};const n=new Proxy({...t.props||{},$$events:{}},{get(i,l){return f(e.get(l)??r(l,Reflect.get(i,l)))},has(i,l){return l===_i?!0:(f(e.get(l)??r(l,Reflect.get(i,l))),Reflect.has(i,l))},set(i,l,o){return S(e.get(l)??r(l,o),o),Reflect.set(i,l,o)}});_(At,this,(t.hydrate?ts:pl)(t.component,{target:t.target,anchor:t.anchor,props:n,context:t.context,intro:t.intro??!1,recover:t.recover,transformError:t.transformError})),(!t?.props?.$$host||t.sync===!1)&&Mr(),_(le,this,n.$$events);for(const i of Object.keys(s(At,this)))i==="$set"||i==="$destroy"||i==="$on"||Ke(this,i,{get(){return s(At,this)[i]},set(l){s(At,this)[i]=l},enumerable:!0});s(At,this).$set=i=>{Object.assign(n,i)},s(At,this).$destroy=()=>{es(s(At,this))}}$set(t){s(At,this).$set(t)}$on(t,e){s(le,this)[t]=s(le,this)[t]||[];const r=(...n)=>e.call(this,...n);return s(le,this)[t].push(r),()=>{s(le,this)[t]=s(le,this)[t].filter(n=>n!==r)}}$destroy(){s(At,this).$destroy()}},wl;typeof HTMLElement=="function"&&(wl=class extends HTMLElement{constructor(t,e,r){super(),D(this,"$$ctor",void 0),D(this,"$$s",void 0),D(this,"$$c",void 0),D(this,"$$cn",!1),D(this,"$$d",{}),D(this,"$$r",!1),D(this,"$$p_d",{}),D(this,"$$l",{}),D(this,"$$l_u",new Map),D(this,"$$me",void 0),D(this,"$$shadowRoot",null),this.$$ctor=t,this.$$s=e,r&&(this.$$shadowRoot=this.attachShadow(r))}addEventListener(t,e,r){if(this.$$l[t]=this.$$l[t]||[],this.$$l[t].push(e),this.$$c){const n=this.$$c.$on(t,e);this.$$l_u.set(e,n)}super.addEventListener(t,e,r)}removeEventListener(t,e,r){if(super.removeEventListener(t,e,r),this.$$c){const n=this.$$l_u.get(e);n&&(n(),this.$$l_u.delete(e))}}async connectedCallback(){if(this.$$cn=!0,!this.$$c){let t=function(n){return i=>{const l=Sn("slot");n!=="default"&&(l.name=n),Q(i,l)}};if(await Promise.resolve(),!this.$$cn||this.$$c)return;const e={},r=_s(this);for(const n of this.$$s)n in r&&(n==="default"&&!this.$$d.children?(this.$$d.children=t(n),e.default=!0):e[n]=t(n));for(const n of this.attributes){const i=this.$$g_p(n.name);i in this.$$d||(this.$$d[i]=dr(i,n.value,this.$$p_d,"toProp"))}for(const n in this.$$p_d)!(n in this.$$d)&&this[n]!==void 0&&(this.$$d[n]=this[n],delete this[n]);this.$$c=ys({component:this.$$ctor,target:this.$$shadowRoot||this,props:{...this.$$d,$$slots:e,$$host:this}}),this.$$me=Ao(()=>{Nr(()=>{this.$$r=!0;for(const n of gr(this.$$c)){if(!this.$$p_d[n]?.reflect)continue;this.$$d[n]=this.$$c[n];const i=dr(n,this.$$d[n],this.$$p_d,"toAttribute");i==null?this.removeAttribute(this.$$p_d[n].attribute||n):this.setAttribute(this.$$p_d[n].attribute||n,i)}this.$$r=!1})});for(const n in this.$$l)for(const i of this.$$l[n]){const l=this.$$c.$on(n,i);this.$$l_u.set(i,l)}this.$$l={}}}attributeChangedCallback(t,e,r){this.$$r||(t=this.$$g_p(t),this.$$d[t]=dr(t,r,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 gr(this.$$p_d).find(e=>this.$$p_d[e].attribute===t||!this.$$p_d[e].attribute&&e.toLowerCase()===t)||t}});function dr(t,e,r,n){const i=r[t]?.type;if(e=i==="Boolean"&&typeof e!="boolean"?e!=null:e,!n||!r[t])return e;if(n==="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 _s(t){const e={};return t.childNodes.forEach(r=>{e[r.slot||"default"]=!0}),e}function $s(t,e,r,n,i,l){let o=class extends wl{constructor(){super(t,r,i),this.$$p_d=e}static get observedAttributes(){return gr(e).map(a=>(e[a].attribute||a).toLowerCase())}};return gr(e).forEach(a=>{Ke(o.prototype,a,{get(){return this.$$c&&a in this.$$c?this.$$c[a]:this.$$d[a]},set(u){u=dr(a,u,e),this.$$d[a]=u;var c=this.$$c;c&&(fe(c,a)?.get?c[a]=u:c.$set({[a]:u}))}})}),n.forEach(a=>{Ke(o.prototype,a,{get(){return this.$$c?.[a]}})}),l&&(o=l(o)),t.element=o,o}var ks=Et('<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M3 3l7.07 16.97 2.51-7.39 7.39-2.51L3 3z"></path></svg>'),xs=Et('<svg viewBox="0 0 24 24" fill="currentColor"><path d="M12 2C8.13 2 5 5.13 5 9c0 5.25 7 13 7 13s7-7.75 7-13c0-3.87-3.13-7-7-7zm0 9.5c-1.38 0-2.5-1.12-2.5-2.5s1.12-2.5 2.5-2.5 2.5 1.12 2.5 2.5-1.12 2.5-2.5 2.5z"></path></svg>'),Ms=Et('<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M17 3a2.828 2.828 0 1 1 4 4L7.5 20.5 2 22l1.5-5.5L17 3z"></path></svg>'),Ss=Et('<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M3 6h18M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6m3 0V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2"></path></svg>'),Es=fl('<button type="button"><span class="pie-tool-graph__tool-icon svelte-v3lao1" aria-hidden="true"><!></span> <span class="pie-tool-graph__tool-label svelte-v3lao1"> </span></button>'),Ws=Et('<line x1="0" class="pie-tool-graph__grid-line pie-tool-graph__grid-line--minor svelte-v3lao1"></line>'),js=Et('<line x1="0" class="pie-tool-graph__grid-line pie-tool-graph__grid-line--major svelte-v3lao1"></line>'),As=Et('<line y1="0" y2="100" class="pie-tool-graph__grid-line pie-tool-graph__grid-line--minor svelte-v3lao1"></line>'),Cs=Et('<line y1="0" y2="100" class="pie-tool-graph__grid-line pie-tool-graph__grid-line--major svelte-v3lao1"></line>'),Os=Et('<line class="pie-tool-graph__user-line svelte-v3lao1"></line>'),Ls=Et('<circle r="2" role="button" tabindex="0"></circle>'),Ns=Et('<line class="pie-tool-graph__temp-line svelte-v3lao1"></line>'),Ps=fl('<div class="pie-tool-graph svelte-v3lao1" role="dialog" tabindex="-1"><div class="pie-tool-graph__toolbar svelte-v3lao1"><div class="pie-tool-graph__tool-buttons svelte-v3lao1"></div> <div class="pie-tool-graph__transparency-control svelte-v3lao1"><label for="grid-opacity" class="svelte-v3lao1"> </label> <input type="range" id="grid-opacity" min="0" max="1" step="0.1" class="svelte-v3lao1"/></div></div> <div class="pie-tool-graph__canvas-wrapper svelte-v3lao1" role="img" tabindex="0"><svg class="pie-tool-graph__canvas svelte-v3lao1" preserveAspectRatio="xMinYMin meet" aria-hidden="true"><g class="pie-tool-graph__grid-lines" aria-hidden="true"><!><!><!><!></g><g class="pie-tool-graph__lines"></g><g class="pie-tool-graph__points"></g><!><circle r="3" class="pie-tool-graph__keyboard-cursor svelte-v3lao1"></circle></svg></div></div>'),zs={hash:"svelte-v3lao1",code:`.pie-tool-graph.svelte-v3lao1 {position:relative;background:var(--pie-background, #fff);color:var(--pie-text, #111827);width:100%;height:100%;min-height:0;overflow:hidden;display:flex;flex-direction:column;}
4
4
 
5
- /* Toolbar (matching production implementation: lighter teal) */.pie-tool-graph__toolbar.svelte-v3lao1 {padding:8px;background:var(--pie-primary-light, #5a7fa3); /* Lighter teal-like color */display:flex;gap:16px;align-items:center;flex-wrap:wrap;}.pie-tool-graph__tool-buttons.svelte-v3lao1 {display:flex;gap:4px;flex:1;}.pie-tool-graph__tool-button.svelte-v3lao1 {flex:1;display:flex;flex-direction:column;align-items:center;gap:4px;padding:8px 12px;background:color-mix(in srgb, var(--pie-white, #fff) 20%, transparent);border:2px solid transparent;border-radius:4px;cursor:pointer;color:var(--pie-white, #fff);font-size:12px;transition:all 0.2s;}.pie-tool-graph__tool-button.svelte-v3lao1:hover {background:color-mix(in srgb, var(--pie-white, #fff) 30%, transparent);}.pie-tool-graph__tool-button.pie-tool-graph__tool-button--active.svelte-v3lao1 {background:var(--pie-background, #fff);color:var(--pie-primary-dark, #2c3e50);border-color:var(--pie-primary-dark, #2c3e50);}.pie-tool-graph__tool-icon.svelte-v3lao1 {width:20px;height:20px;display:flex;align-items:center;justify-content:center;}.pie-tool-graph__tool-label.svelte-v3lao1 {font-size:11px;font-weight:500;}.pie-tool-graph__transparency-control.svelte-v3lao1 {display:flex;align-items:center;gap:8px;color:var(--pie-white, #fff);font-size:12px;padding-left:8px;}.pie-tool-graph__transparency-control.svelte-v3lao1 label:where(.svelte-v3lao1) {font-weight:500;}.pie-tool-graph__transparency-control.svelte-v3lao1 input[type='range']:where(.svelte-v3lao1) {width:100px;cursor:pointer;}
5
+ /* Toolbar */.pie-tool-graph__toolbar.svelte-v3lao1 {padding:8px;background:var(--pie-primary-light, #5a7fa3); /* Lighter teal-like color */display:flex;gap:16px;align-items:center;flex-wrap:wrap;}.pie-tool-graph__tool-buttons.svelte-v3lao1 {display:flex;gap:4px;flex:1;}.pie-tool-graph__tool-button.svelte-v3lao1 {flex:1;display:flex;flex-direction:column;align-items:center;gap:4px;padding:8px 12px;background:color-mix(in srgb, var(--pie-white, #fff) 20%, transparent);border:2px solid transparent;border-radius:4px;cursor:pointer;color:var(--pie-white, #fff);font-size:12px;transition:all 0.2s;}.pie-tool-graph__tool-button.svelte-v3lao1:hover {background:color-mix(in srgb, var(--pie-white, #fff) 30%, transparent);}.pie-tool-graph__tool-button.pie-tool-graph__tool-button--active.svelte-v3lao1 {background:var(--pie-background, #fff);color:var(--pie-primary-dark, #2c3e50);border-color:var(--pie-primary-dark, #2c3e50);}.pie-tool-graph__tool-icon.svelte-v3lao1 {width:20px;height:20px;display:flex;align-items:center;justify-content:center;}.pie-tool-graph__tool-label.svelte-v3lao1 {font-size:11px;font-weight:500;}.pie-tool-graph__transparency-control.svelte-v3lao1 {display:flex;align-items:center;gap:8px;color:var(--pie-white, #fff);font-size:12px;padding-left:8px;}.pie-tool-graph__transparency-control.svelte-v3lao1 label:where(.svelte-v3lao1) {font-weight:500;}.pie-tool-graph__transparency-control.svelte-v3lao1 input[type='range']:where(.svelte-v3lao1) {width:100px;cursor:pointer;}
6
6
 
7
7
  /* Canvas wrapper */.pie-tool-graph__canvas-wrapper.svelte-v3lao1 {flex:1;background:var(--pie-background, #fff);display:flex;align-items:center;justify-content:center;overflow:hidden;}.pie-tool-graph__canvas.svelte-v3lao1 {display:block;width:100%;height:100%;}
8
8
 
9
- /* Grid lines (matching production implementation: dark gray) */.pie-tool-graph__grid-line.svelte-v3lao1 {stroke:var(--pie-border-dark, #666);vector-effect:non-scaling-stroke;}.pie-tool-graph__grid-line--major.svelte-v3lao1 {stroke:var(--pie-border-dark, #333);stroke-width:0.75;}.pie-tool-graph__grid-line--minor.svelte-v3lao1 {stroke:var(--pie-border-light, #ccc);stroke-width:0.5;}
9
+ /* Grid lines */.pie-tool-graph__grid-line.svelte-v3lao1 {stroke:var(--pie-border-dark, #666);vector-effect:non-scaling-stroke;}.pie-tool-graph__grid-line--major.svelte-v3lao1 {stroke:var(--pie-border-dark, #333);stroke-width:0.75;}.pie-tool-graph__grid-line--minor.svelte-v3lao1 {stroke:var(--pie-border-light, #ccc);stroke-width:0.5;}
10
10
 
11
- /* User drawing styles */.pie-tool-graph__user-point.svelte-v3lao1 {cursor:pointer;fill:var(--pie-primary, #3f51b5);stroke:var(--pie-primary-dark, #2c3e50);stroke-width:0.5;vector-effect:non-scaling-stroke;}.pie-tool-graph__user-point.pie-tool-graph__user-point--highlight.svelte-v3lao1 {fill:var(--pie-missing, #ffc107);stroke:var(--pie-missing-icon, #ff9800);}.pie-tool-graph__user-line.svelte-v3lao1 {stroke:var(--pie-text, #333);stroke-linecap:round;stroke-width:1;vector-effect:non-scaling-stroke;}.pie-tool-graph__temp-line.svelte-v3lao1 {pointer-events:none;stroke:var(--pie-correct, #4caf50);stroke-dasharray:2, 2;stroke-width:0.75;vector-effect:non-scaling-stroke;}`};function Es(t,e){mi(e,!0),Ko(t,Ws);let r=ai(e,"visible",7,!1),n=ai(e,"toolId",7,"graph"),i=F(void 0),l=F(void 0),o=F(void 0),a=F("selector"),u=F(Kt([])),f=F(Kt([])),h=F(1),d=F(1),v=F(null),p=F(null),m=F(null);const S=5,g=5,_=100/S,R=_/g;let N=F(0),C=F(0),K=ee(()=>{if(c(C)<=0||c(N)<=0)return 100;const y=c(C)/100,w=c(N)/y;return Math.max(100,w)}),Y=F(null);const D=ee(()=>Ml(c(Y))),Wt=ee(()=>[{name:"selector",icon:"selector",label:c(D).t("tools.graph.modeSelector"),title:c(D).t("tools.graph.modeSelectorHint")},{name:"point",icon:"point",label:c(D).t("tools.graph.modePoint"),title:c(D).t("tools.graph.modePointHint")},{name:"line",icon:"line",label:c(D).t("tools.graph.modeLine"),title:c(D).t("tools.graph.modeLineHint")},{name:"delete",icon:"delete",label:c(D).t("tools.graph.modeDelete"),title:c(D).t("tools.graph.modeDeleteHint")}]);Xn(()=>{if(c(l))return xl(c(l),y=>{M(Y,y,!0)})});function U(){return mo(h)}function lt(y){if(y!==null)return c(u).find(w=>w.id===y)}function er(y){if(!c(o))return null;const w=c(o).createSVGPoint();w.x=y.clientX,w.y=y.clientY;const A=c(o).getScreenCTM();if(!A)return null;try{const O=w.matrixTransform(A.inverse());return O.y=Math.max(0,Math.min(100,O.y)),O.x=Math.max(0,Math.min(c(K),O.x)),{x:O.x,y:O.y}}catch(O){return console.error("Error transforming point:",O),null}}function Cn(y,w=5){const A=w*w;let O=null,tt=1/0;for(const B of c(u)){const nr=B.x-y.x,we=B.y-y.y,Et=nr*nr+we*we;Et<tt&&Et<A&&(tt=Et,O=B)}return O}function cl(y){return y===c(v)||y===c(p)}function hl(y){if(c(a)==="delete"){M(u,c(u).filter(w=>w.id!==y),!0),M(f,c(f).filter(w=>w.p1Id!==y&&w.p2Id!==y),!0);return}if(c(a)==="line"){if(c(v)===null){M(v,y,!0);return}c(v)!==y&&(c(f).some(w=>w.p1Id===c(v)&&w.p2Id===y||w.p1Id===y&&w.p2Id===c(v))||M(f,[...c(f),{id:U(),p1Id:c(v),p2Id:y}],!0)),M(v,null),M(m,null)}}let rr=ee(()=>{const y={majorVertical:[],majorHorizontal:[],minorVertical:[],minorHorizontal:[]},w=c(K);for(let O=0;O<=S;O++){const tt=O*_;if(y.majorHorizontal.push(tt),O<S)for(let B=1;B<g;B++)y.minorHorizontal.push(tt+B*R)}let A=0;for(;A<=w;){if(y.majorVertical.push(A),A<w)for(let O=1;O<g;O++){const tt=A+O*R;if(tt<=w)y.minorVertical.push(tt);else break}A+=_}return y});function vl(y){M(a,y,!0),M(v,null),M(p,null),M(m,null)}function In(y){const w=er(y);if(!w)return;const A=Cn(w,R);switch(c(a)){case"point":M(u,[...c(u),{id:U(),x:w.x,y:w.y}],!0);break;case"line":const O=A??{id:U(),x:w.x,y:w.y};A||M(u,[...c(u),O],!0),c(v)===null?M(v,O.id,!0):(c(v)!==O.id&&(c(f).some(B=>B.p1Id===c(v)&&B.p2Id===O.id||B.p1Id===O.id&&B.p2Id===c(v))||M(f,[...c(f),{id:U(),p1Id:c(v),p2Id:O.id}],!0)),M(v,null),M(m,null));break;case"delete":const tt=Cn(w,2);tt&&(M(u,c(u).filter(B=>B.id!==tt.id),!0),M(f,c(f).filter(B=>B.p1Id!==tt.id&&B.p2Id!==tt.id),!0));break;case"selector":M(v,null),M(m,null)}}function dl(y,w){c(a)==="selector"&&(M(p,y,!0),w.target.setPointerCapture(w.pointerId))}function pl(y){const w=er(y);if(w&&(M(m,w,!0),c(p)!==null&&c(a)==="selector")){const A=lt(c(p));A&&(A.x=w.x,A.y=w.y,M(u,c(u),!0))}}function Ln(y){c(p)!==null&&(y.target?.hasPointerCapture(y.pointerId)&&y.target.releasePointerCapture(y.pointerId),M(p,null)),(c(a)!=="line"||c(v)===null)&&M(m,null)}let Le=null;Xn(()=>{if(c(i))return Le||(Le=new ResizeObserver(y=>{const{width:w,height:A}=y[0].contentRect;(Math.abs(c(N)-w)>.1||Math.abs(c(C)-A)>.1)&&(M(N,w,!0),M(C,A,!0))})),Le.observe(c(i)),()=>{Le&&Le.disconnect()}});var gl={get visible(){return r()},set visible(y=!1){r(y),Mr()},get toolId(){return n()},set toolId(y="graph"){n(y),Mr()}},zn=Br(),ml=Hr(zn),wl=y=>{var w=Ss(),A=Bt(w),O=Bt(A);ie(O,21,()=>c(Wt),P=>P.name,(P,W)=>{var $=ws();let ot;var J=Bt($),wt=Bt(J),Ht=ct=>{Z(ct,ds())},ze=ct=>{Z(ct,ps())},te=ct=>{Z(ct,gs())},bl=ct=>{Z(ct,ms())};Oe(wt,ct=>{c(W).name==="selector"?ct(Ht):c(W).name==="point"?ct(ze,1):c(W).name==="line"?ct(te,2):c(W).name==="delete"&&ct(bl,3)}),ht(J);var $l=Qn(Pt(J,2),!0);ht($),Rt(()=>{ot=li($,1,"pie-tool-graph__tool-button svelte-v3lao1",null,ot,{"pie-tool-graph__tool-button--active":c(a)===c(W).name}),z($,"title",c(W).title),z($,"aria-label",c(W).title),z($,"aria-pressed",c(a)===c(W).name),ei($l,c(W).label)}),re("click",$,()=>vl(c(W).name)),Z(P,$)}),ht(O);var tt=Pt(O,2),B=Bt(tt),nr=Qn(B,!0),we=Pt(B,2);is(we),ht(tt),ht(A);var Et=Pt(A,2),Ut=Bt(Et),ir=Bt(Ut),Tn=Bt(ir);ie(Tn,17,()=>c(rr).minorHorizontal,fr,(P,W)=>{var $=ys();Rt(()=>{z($,"y1",c(W)),z($,"x2",c(K)),z($,"y2",c(W))}),Z(P,$)});var On=Pt(Tn);ie(On,17,()=>c(rr).majorHorizontal,fr,(P,W)=>{var $=_s();Rt(()=>{z($,"y1",c(W)),z($,"x2",c(K)),z($,"y2",c(W))}),Z(P,$)});var Dn=Pt(On);ie(Dn,17,()=>c(rr).minorVertical,fr,(P,W)=>{var $=bs();Rt(()=>{z($,"x1",c(W)),z($,"x2",c(W))}),Z(P,$)}),ie(Pt(Dn),17,()=>c(rr).majorVertical,fr,(P,W)=>{var $=$s();Rt(()=>{z($,"x1",c(W)),z($,"x2",c(W))}),Z(P,$)}),ht(ir);var Or=Pt(ir);ie(Or,21,()=>c(f),P=>P.id,(P,W)=>{const $=ee(()=>lt(c(W).p1Id)),ot=ee(()=>lt(c(W).p2Id));var J=Br(),wt=Hr(J),Ht=ze=>{var te=ks();Rt(()=>{z(te,"x1",c($).x),z(te,"y1",c($).y),z(te,"x2",c(ot).x),z(te,"y2",c(ot).y)}),Z(ze,te)};Oe(wt,ze=>{c($)&&c(ot)&&ze(Ht)}),Z(P,J)}),ht(Or);var Dr=Pt(Or);ie(Dr,21,()=>c(u),P=>P.id,(P,W)=>{var $=xs();let ot;Rt((J,wt)=>{z($,"cx",c(W).x),z($,"cy",c(W).y),ot=li($,0,"pie-tool-graph__user-point svelte-v3lao1",null,ot,{"pie-tool-graph__user-point--highlight":J}),z($,"data-id",c(W).id),z($,"aria-label",wt)},[()=>cl(c(W).id),()=>c(D).t("tools.graph.pointA11y",{id:c(W).id})]),re("pointerdown",$,J=>{J.stopPropagation(),dl(c(W).id,J)}),re("keydown",$,J=>{(J.key==="Enter"||J.key===" ")&&(J.preventDefault(),hl(c(W).id))}),Z(P,$)}),ht(Dr);var yl=Pt(Dr),_l=P=>{const W=ee(()=>lt(c(v)));var $=Br(),ot=Hr($),J=wt=>{var Ht=Ms();Rt(()=>{z(Ht,"x1",c(W).x),z(Ht,"y1",c(W).y),z(Ht,"x2",c(m).x),z(Ht,"y2",c(m).y)}),Z(wt,Ht)};Oe(ot,wt=>{c(W)&&wt(J)}),Z(P,$)};Oe(yl,P=>{c(v)&&c(m)&&P(_l)}),ht(Ut),Yr(Ut,P=>M(o,P),()=>c(o)),ht(Et),Yr(Et,P=>M(i,P),()=>c(i)),ht(w),Yr(w,P=>M(l,P),()=>c(l)),Rt((P,W,$,ot,J,wt)=>{z(w,"lang",P),z(w,"dir",W),z(w,"aria-label",$),z(w,"data-tool-id",n()),ei(nr,ot),z(we,"aria-label",J),z(Et,"aria-label",wt),z(Ut,"viewBox",`0 0 ${c(K)??""} 100`),ts(ir,`opacity: ${c(d)??""}`),w.dir=w.dir},[()=>c(D).getLocale(),()=>c(D).getDirection?.()??"ltr",()=>c(D).t("tools.graph.toolA11y"),()=>c(D).t("tools.graph.grid"),()=>c(D).t("tools.graph.gridOpacityA11y"),()=>c(D).t("tools.graph.canvasA11y")]),ss(we,()=>c(d),P=>M(d,P)),re("click",Et,In),re("keydown",Et,P=>{(P.key==="Enter"||P.key===" ")&&(P.preventDefault(),In(P))}),re("pointermove",Ut,pl),re("pointerup",Ut,Ln),Co("pointerleave",Ut,Ln),Z(y,w)};return Oe(ml,y=>{r()&&y(wl)}),Z(t,zn),wi(gl)}Io(["click","keydown","pointermove","pointerup","pointerdown"]);Ps("pie-tool-graph",vs(Es,{visible:{attribute:"visible",type:"Boolean"},toolId:{attribute:"tool-id",type:"String"}},[],[],{mode:"open"},kl));function Ps(t,e){customElements.get(t)||customElements.define(t,e)}export{Es as default};
11
+ /* User drawing styles */.pie-tool-graph__user-point.svelte-v3lao1 {cursor:pointer;fill:var(--pie-primary, #3f51b5);stroke:var(--pie-primary-dark, #2c3e50);stroke-width:0.5;vector-effect:non-scaling-stroke;}.pie-tool-graph__user-point.pie-tool-graph__user-point--highlight.svelte-v3lao1 {fill:var(--pie-missing, #ffc107);stroke:var(--pie-missing-icon, #ff9800);}.pie-tool-graph__user-line.svelte-v3lao1 {stroke:var(--pie-text, #333);stroke-linecap:round;stroke-width:1;vector-effect:non-scaling-stroke;}.pie-tool-graph__temp-line.svelte-v3lao1 {pointer-events:none;stroke:var(--pie-correct, #4caf50);stroke-dasharray:2, 2;stroke-width:0.75;vector-effect:non-scaling-stroke;}.pie-tool-graph__keyboard-cursor.svelte-v3lao1 {display:none;fill:none;pointer-events:none;stroke:var(--pie-button-focus-outline, var(--pie-primary, #3f51b5));stroke-width:2;vector-effect:non-scaling-stroke;}.pie-tool-graph__canvas-wrapper.svelte-v3lao1:focus-visible .pie-tool-graph__keyboard-cursor:where(.svelte-v3lao1) {display:inline;}`};function Is(t,e){Mi(e,!0),os(t,zs);let r=gi(e,"visible",7,!1),n=gi(e,"toolId",7,"graph"),i=H(void 0),l=H(void 0),o=H(void 0),a=H("selector"),u=H(Xt([])),c=H(Xt([])),h=H(1),p=H(1),v=H(null),d=H(null),y=H(null),M=H(null);const m=5,b=5,V=100/m,I=V/b,N={ArrowLeft:[-1,0],ArrowRight:[1,0],ArrowUp:[0,-1],ArrowDown:[0,1]};let X=H(0),Y=H(0),Z=Gt(()=>{if(f(Y)<=0||f(X)<=0)return 100;const g=f(Y)/100,w=f(X)/g;return Math.max(100,w)}),J=Gt(()=>{const g=f(M)??{x:f(Z)/2,y:50};return{x:Ln(g.x,f(Z)),y:Ln(g.y,100)}}),rt=H(null);const R=Gt(()=>Nl(f(rt))),zr=Gt(()=>[{name:"selector",label:f(R).t("tools.graph.modeSelector"),title:f(R).t("tools.graph.modeSelectorHint")},{name:"point",label:f(R).t("tools.graph.modePoint"),title:f(R).t("tools.graph.modePointHint")},{name:"line",label:f(R).t("tools.graph.modeLine"),title:f(R).t("tools.graph.modeLineHint")},{name:"delete",label:f(R).t("tools.graph.modeDelete"),title:f(R).t("tools.graph.modeDeleteHint")}]);ni(()=>{if(f(l))return Ll(f(l),g=>{S(rt,g,!0)})});function Ir(){return So(h)}function er(g){if(g!==null)return f(u).find(w=>w.id===g)}function Ln(g,w){const z=Math.floor(w/I);return Math.max(0,Math.min(z,Math.round(g/I)))*I}function Nn(g){if(!f(o))return null;const w=f(o).createSVGPoint();w.x=g.clientX,w.y=g.clientY;const z=f(o).getScreenCTM();if(!z)return null;try{const T=w.matrixTransform(z.inverse());return T.y=Math.max(0,Math.min(100,T.y)),T.x=Math.max(0,Math.min(f(Z),T.x)),{x:T.x,y:T.y}}catch(T){return console.error("Error transforming point:",T),null}}function Pn(g,w=5){const z=w*w;let T=null,mt=1/0;for(const Wt of f(u)){const nr=Wt.x-g.x,we=Wt.y-g.y,jt=nr*nr+we*we;jt<mt&&jt<z&&(mt=jt,T=Wt)}return T}function yl(g){return g===f(v)||g===f(d)}function zn(g){S(u,f(u).filter(w=>w.id!==g),!0),S(c,f(c).filter(w=>w.p1Id!==g&&w.p2Id!==g),!0)}function In(g,w){g!==w&&(f(c).some(z=>z.p1Id===g&&z.p2Id===w||z.p1Id===w&&z.p2Id===g)||S(c,[...f(c),{id:Ir(),p1Id:g,p2Id:w}],!0))}function bl(g){if(f(a)==="delete"){zn(g);return}if(f(a)==="line"){if(f(v)===null){S(v,g,!0);return}In(f(v),g),S(v,null),S(y,null)}}let rr=Gt(()=>{const g={majorVertical:[],majorHorizontal:[],minorVertical:[],minorHorizontal:[]},w=f(Z);for(let T=0;T<=m;T++){const mt=T*V;if(g.majorHorizontal.push(mt),T<m)for(let Wt=1;Wt<b;Wt++)g.minorHorizontal.push(mt+Wt*I)}let z=0;for(;z<=w;){if(g.majorVertical.push(z),z<w)for(let T=1;T<b;T++){const mt=z+T*I;if(mt<=w)g.minorVertical.push(mt);else break}z+=V}return g});function _l(g){S(a,g,!0),S(v,null),S(d,null),S(y,null)}function $l(g){const w=Nn(g);w&&Tn(w)}function kl(g){if(g.target!==g.currentTarget)return;const w=N[g.key];w?(g.preventDefault(),S(M,{x:f(J).x+w[0]*I,y:f(J).y+w[1]*I},!0),f(v)!==null&&S(y,f(J),!0)):(g.key==="Enter"||g.key===" ")&&(g.preventDefault(),Tn(f(J)))}function Tn(g){const w=Pn(g,I);switch(f(a)){case"point":S(u,[...f(u),{id:Ir(),x:g.x,y:g.y}],!0);break;case"line":const z=w??{id:Ir(),x:g.x,y:g.y};w||S(u,[...f(u),z],!0),f(v)===null?S(v,z.id,!0):(In(f(v),z.id),S(v,null),S(y,null));break;case"delete":const T=Pn(g,2);T&&zn(T.id);break;case"selector":S(v,null),S(y,null)}}function xl(g,w){f(a)==="selector"&&(S(d,g,!0),w.target.setPointerCapture(w.pointerId))}function Ml(g){const w=Nn(g);if(w&&(S(y,w,!0),f(d)!==null&&f(a)==="selector")){const z=er(f(d));z&&(z.x=w.x,z.y=w.y)}}function Rn(g){f(d)!==null&&(g.target?.hasPointerCapture(g.pointerId)&&g.target.releasePointerCapture(g.pointerId),S(d,null)),(f(a)!=="line"||f(v)===null)&&S(y,null)}let Le=null;ni(()=>{if(f(i))return Le||(Le=new ResizeObserver(g=>{const{width:w,height:z}=g[0].contentRect;(Math.abs(f(X)-w)>.1||Math.abs(f(Y)-z)>.1)&&(S(X,w,!0),S(Y,z,!0))})),Le.observe(f(i)),()=>{Le&&Le.disconnect()}});var Sl={get visible(){return r()},set visible(g=!1){r(g),Mr()},get toolId(){return n()},set toolId(g="graph"){n(g),Mr()}},Dn=Fr(),El=Vr(Dn),Wl=g=>{var w=Ps(),z=Bt(w),T=Bt(z);ie(T,21,()=>f(zr),P=>P.name,(P,E)=>{var $=Es();let lt;var F=Bt($),wt=Bt(F),Dt=ft=>{Q(ft,ks())},Ne=ft=>{Q(ft,xs())},ee=ft=>{Q(ft,Ms())},Al=ft=>{Q(ft,Ss())};ze(wt,ft=>{f(E).name==="selector"?ft(Dt):f(E).name==="point"?ft(Ne,1):f(E).name==="line"?ft(ee,2):f(E).name==="delete"&&ft(Al,3)}),ct(F);var Cl=ri(yt(F,2),!0);ct($),Ht(()=>{lt=vi($,1,"pie-tool-graph__tool-button svelte-v3lao1",null,lt,{"pie-tool-graph__tool-button--active":f(a)===f(E).name}),A($,"title",f(E).title),A($,"aria-label",f(E).title),A($,"aria-pressed",f(a)===f(E).name),ui(Cl,f(E).label)}),re("click",$,()=>_l(f(E).name)),Q(P,$)}),ct(T);var mt=yt(T,2),Wt=Bt(mt),nr=ri(Wt,!0),we=yt(Wt,2);vs(we),ct(mt),ct(z);var jt=yt(z,2),te=Bt(jt),ir=Bt(te),Hn=Bt(ir);ie(Hn,17,()=>f(rr).minorHorizontal,fr,(P,E)=>{var $=Ws();Ht(()=>{A($,"y1",f(E)),A($,"x2",f(Z)),A($,"y2",f(E))}),Q(P,$)});var Vn=yt(Hn);ie(Vn,17,()=>f(rr).majorHorizontal,fr,(P,E)=>{var $=js();Ht(()=>{A($,"y1",f(E)),A($,"x2",f(Z)),A($,"y2",f(E))}),Q(P,$)});var Bn=yt(Vn);ie(Bn,17,()=>f(rr).minorVertical,fr,(P,E)=>{var $=As();Ht(()=>{A($,"x1",f(E)),A($,"x2",f(E))}),Q(P,$)}),ie(yt(Bn),17,()=>f(rr).majorVertical,fr,(P,E)=>{var $=Cs();Ht(()=>{A($,"x1",f(E)),A($,"x2",f(E))}),Q(P,$)}),ct(ir);var Tr=yt(ir);ie(Tr,21,()=>f(c),P=>P.id,(P,E)=>{const $=Gt(()=>er(f(E).p1Id)),lt=Gt(()=>er(f(E).p2Id));var F=Fr(),wt=Vr(F),Dt=Ne=>{var ee=Os();Ht(()=>{A(ee,"x1",f($).x),A(ee,"y1",f($).y),A(ee,"x2",f(lt).x),A(ee,"y2",f(lt).y)}),Q(Ne,ee)};ze(wt,Ne=>{f($)&&f(lt)&&Ne(Dt)}),Q(P,F)}),ct(Tr);var Rr=yt(Tr);ie(Rr,21,()=>f(u),P=>P.id,(P,E)=>{var $=Ls();let lt;Ht((F,wt)=>{A($,"cx",f(E).x),A($,"cy",f(E).y),lt=vi($,0,"pie-tool-graph__user-point svelte-v3lao1",null,lt,{"pie-tool-graph__user-point--highlight":F}),A($,"data-id",f(E).id),A($,"aria-label",wt)},[()=>yl(f(E).id),()=>f(R).t("tools.graph.pointA11y",{id:f(E).id})]),re("pointerdown",$,F=>{F.stopPropagation(),xl(f(E).id,F)}),re("keydown",$,F=>{(F.key==="Enter"||F.key===" ")&&(F.preventDefault(),bl(f(E).id))}),Q(P,$)}),ct(Rr);var qn=yt(Rr),jl=P=>{const E=Gt(()=>er(f(v)));var $=Fr(),lt=Vr($),F=wt=>{var Dt=Ns();Ht(()=>{A(Dt,"x1",f(E).x),A(Dt,"y1",f(E).y),A(Dt,"x2",f(y).x),A(Dt,"y2",f(y).y)}),Q(wt,Dt)};ze(lt,wt=>{f(E)&&wt(F)}),Q(P,$)};ze(qn,P=>{f(v)&&f(y)&&P(jl)});var Fn=yt(qn);ct(te),tn(te,P=>S(o,P),()=>f(o)),ct(jt),tn(jt,P=>S(i,P),()=>f(i)),ct(w),tn(w,P=>S(l,P),()=>f(l)),Ht((P,E,$,lt,F,wt)=>{A(w,"lang",P),A(w,"dir",E),A(w,"aria-label",$),A(w,"data-pie-tool-id",n()),ui(nr,lt),A(we,"aria-label",F),A(jt,"aria-label",wt),A(te,"viewBox",`0 0 ${f(Z)??""} 100`),us(ir,`opacity: ${f(p)??""}`),A(Fn,"cx",f(J).x),A(Fn,"cy",f(J).y),w.dir=w.dir},[()=>f(R).getLocale(),()=>f(R).getDirection?.()??"ltr",()=>f(R).t("tools.graph.toolA11y"),()=>f(R).t("tools.graph.grid"),()=>f(R).t("tools.graph.gridOpacityA11y"),()=>f(R).t("tools.graph.canvasA11y")]),gs(we,()=>f(p),P=>S(p,P)),re("click",jt,$l),re("keydown",jt,kl),re("pointermove",te,Ml),re("pointerup",te,Rn),Do("pointerleave",te,Rn),Q(g,w)};return ze(El,g=>{r()&&g(Wl)}),Q(t,Dn),Si(Sl)}Ho(["click","keydown","pointermove","pointerup","pointerdown"]);Ts("pie-tool-graph",$s(Is,{visible:{attribute:"visible",type:"Boolean"},toolId:{attribute:"tool-id",type:"String"}},[],[],{mode:"open"},Ol));function Ts(t,e){customElements.get(t)||customElements.define(t,e)}export{Is as default};
@@ -0,0 +1 @@
1
+ import{t as i}from"./defineProperty-a20a667d.js";function v(n,e,t){const s=e.ownerDocument?.defaultView?.Event??Event;return Object.assign(new s(n,{bubbles:!0,composed:!0}),t)}var l=new WeakSet,d=new WeakSet,b=(n,e)=>typeof e=="object"&&e!==null&&n.has(e),h=class{constructor(e,t,s,o){const r=v("context-request",t,{context:e,contextTarget:t,callback:s,subscribe:o??!1});return l.add(r),r}static[Symbol.hasInstance](e){return b(l,e)}},w=class{constructor(e,t){const s=v("context-provider",t,{context:e,contextTarget:t});return d.add(s),s}static[Symbol.hasInstance](e){return b(d,e)}},x=n=>{const e=[];for(const t of n)t.requestorRef.deref()&&t.callbackRef.deref()&&e.push(t);return e},C=class{constructor(n){i(this,"host",void 0),i(this,"pendingByContext",new Map),i(this,"attached",!1),i(this,"onContextRequest",e=>{if(e.cancelBubble)return;const t=e;if(t.subscribe!==!0||typeof t.callback!="function"||t.context===void 0)return;const s=t.contextTarget??e.composedPath?.()[0];if(!s)return;let o=this.pendingByContext.get(t.context);o||(o={callbacks:new WeakMap,requests:[]},this.pendingByContext.set(t.context,o));const r=t.callback;let c=o.callbacks.get(s);c||(c=new WeakSet,o.callbacks.set(s,c)),!c.has(r)&&(c.add(r),o.requests.push({requestorRef:new WeakRef(s),callbackRef:new WeakRef(r)}),o.requests=x(o.requests))}),i(this,"onContextProvider",e=>{const t=e.context;if(t===void 0)return;const s=this.pendingByContext.get(t);if(!(!s||s.requests.length===0)){this.pendingByContext.delete(t);for(const o of s.requests){const r=o.requestorRef.deref(),c=o.callbackRef.deref();!r||!c||r.dispatchEvent(new h(t,r,c,!0))}}}),this.host=n}attach(){this.attached||(this.attached=!0,this.host.addEventListener("context-request",this.onContextRequest),this.host.addEventListener("context-provider",this.onContextProvider))}detach(){this.attached&&(this.attached=!1,this.host.removeEventListener("context-request",this.onContextRequest),this.host.removeEventListener("context-provider",this.onContextProvider),this.pendingByContext.clear())}},f=Symbol.for("pie.context.documentRoot");function m(n){if(!n)return;const e=n;if(e[f])return;const t=n.documentElement;if(!t)return;const s=new C(t);s.attach(),e[f]=s}var p=class{constructor(n,e){i(this,"host",void 0),i(this,"context",void 0),i(this,"subscribe",void 0),i(this,"onValue",void 0),i(this,"isConnected",!1),i(this,"isDisconnected",!1),i(this,"unsubscribe",void 0),i(this,"currentValue",void 0),i(this,"handleValue",(t,s)=>{if(this.isDisconnected){s?.();return}s!==this.unsubscribe&&(this.unsubscribe?.(),this.unsubscribe=s),!this.subscribe&&this.unsubscribe&&(this.unsubscribe(),this.unsubscribe=void 0),this.currentValue=t,this.onValue?.(t)}),this.host=n,this.context=e.context,this.subscribe=e.subscribe??!0,this.onValue=e.onValue}connect(){this.isConnected||(this.isConnected=!0,this.isDisconnected=!1,this.subscribe&&m(this.host.ownerDocument),this.requestValue())}disconnect(){this.isConnected&&(this.isConnected=!1,this.isDisconnected=!0,this.unsubscribe?.(),this.unsubscribe=void 0)}get value(){return this.currentValue}requestValue(){this.host.dispatchEvent(new h(this.context,this.host,this.handleValue,this.subscribe))}},B=(n,e)=>{let t;return n.dispatchEvent(new h(e,n,s=>{t=s},!1)),t},u=(n,e,t)=>{const s=new p(n,{context:e,subscribe:!0,onValue:t});s.connect();const o=r=>{r.context===e&&s.requestValue()};return n.addEventListener("context-provider",o),()=>{n.removeEventListener("context-provider",o),s.disconnect()}},a=n=>n,R=a(Symbol.for("pie.assessmentToolkit.runtimeContext")),E=a(Symbol.for("pie.assessmentToolkit.hostRuntimeContext")),q=a(Symbol.for("pie.assessmentToolkit.shellContext")),k=a(Symbol.for("pie.assessmentToolkit.regionScopeContext")),g={bubbles:!0,composed:!0,cancelable:!1};function y(n,e,t={}){return new CustomEvent(n,{detail:e,...g,...t})}function P(n,e,t,s={}){return n.dispatchEvent(y(e,t,s))}function D(n,e){return u(n,R,e)}function L(n,e){return u(n,q,e)}function O(n,e){return u(n,k,e)}function W(n,e){return u(n,E,e)}function _(n,e){let t=null;function s(){t?.coordinator.unregisterTool(t.toolId),t=null}return{sync(o,r){!o||!r||t?.coordinator===o&&t.toolId===r||(s(),o.registerTool(r,n,void 0,e),t={coordinator:o,toolId:r})},release:s}}export{_ as a,q as c,B as d,w as f,L as i,a as l,O as n,P as o,h as p,D as r,k as s,W as t,u};
@@ -0,0 +1 @@
1
+ var l=new Set(["assessment","section","item","passage","rubric"]);function s(o){return l.has(o)}function i(o,e,t){const n=o.trim(),r=t.trim();if(!n||!r)throw new Error("Tool instance ids require non-empty tool and scope ids");if(!s(e))throw new Error(`Unknown tool scope level '${e}'.`);return`${n}:${e}:${r}`}function c(o){const e=o.split(":");if(e.length!==3)return null;const[t,n,r]=e;return!t||!r||!s(n)?null:{baseToolId:t,scopeLevel:n,scopeId:r}}export{c as n,i as t};