@pie-players/pie-section-player 0.3.73 → 0.3.75
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +395 -149
- package/dist/browser/assets/evaluation-worker-CORp9m0K.js +156459 -0
- package/dist/browser/chunks/ItemToolBar-jx38w99s-58defccc.js +1 -0
- package/dist/browser/chunks/PUA-tLuTiQ7--f2b27953.js +1 -0
- package/dist/browser/chunks/ToolCoordinator-cc2dc319.js +1 -0
- package/dist/browser/chunks/accents-BTUYmhn9-cafeb96e.js +1 -0
- package/dist/browser/chunks/accents-b-i-CngHZsLL-e0eb98fd.js +1 -0
- package/dist/browser/chunks/arabic-BzEHMVZD-30ac1ade.js +1 -0
- package/dist/browser/chunks/arrows-VjxlU-jv-2e17c192.js +1 -0
- package/dist/browser/chunks/base-dfd67c41.js +1 -0
- package/dist/browser/chunks/braille-BeWC_Ruq-a3bb8ef9.js +1 -0
- package/dist/browser/chunks/braille-d-Dk6J96GO-d832bfbf.js +1 -0
- package/dist/browser/chunks/browser-a3c32178.js +37 -0
- package/dist/browser/chunks/calculator-element-271c142f.js +13 -0
- package/dist/browser/chunks/calligraphic-Cew9cU3x-04cf0735.js +1 -0
- package/dist/browser/chunks/catalog-context-46d3e50e.js +1 -0
- package/dist/browser/chunks/catalog-owner-d602f784.js +1 -0
- package/dist/browser/chunks/cherokee-Cny3FYho-4da7d2f3.js +1 -0
- package/dist/browser/chunks/classPrivateFieldGet2-338e0179.js +1 -0
- package/dist/browser/chunks/cyrillic-CfCDulXU-5550df0b.js +1 -0
- package/dist/browser/chunks/cyrillic-ss-lU7bNGG9-12eb0188.js +1 -0
- package/dist/browser/chunks/defineProperty-a20a667d.js +1 -0
- package/dist/browser/chunks/devanagari-CDIz2h-r-18c38725.js +1 -0
- package/dist/browser/chunks/dist-41b39e7f.js +1 -0
- package/dist/browser/chunks/dist-59132a53.js +1 -0
- package/dist/browser/chunks/dist-60d7afef.js +1 -0
- package/dist/browser/chunks/dist-ca9b9622.js +1 -0
- package/dist/browser/chunks/double-struck-BpJEQk8y-500ce8dd.js +1 -0
- package/dist/browser/chunks/en-5ff22e17.js +1 -0
- package/dist/browser/chunks/es-a0ba6cb6.js +1 -0
- package/dist/browser/chunks/focus-trap-44913bf3.js +1 -0
- package/dist/browser/chunks/fraktur-rLEq9DEH-44cc14d8.js +1 -0
- package/dist/browser/chunks/greek-BlraJTyL-90ce8924.js +1 -0
- package/dist/browser/chunks/greek-ss-D-EN2PK0-91610739.js +1 -0
- package/dist/browser/chunks/hebrew-GiQZeybp-b583f555.js +1 -0
- package/dist/browser/chunks/latin-b-BhEnC7R2-d13e06ff.js +1 -0
- package/dist/browser/chunks/latin-bi-DqiIKv3U-1dec8705.js +1 -0
- package/dist/browser/chunks/latin-i-B1xtwaE1-21637466.js +1 -0
- package/dist/browser/chunks/latin-xfWFlLkD-5bcea5cf.js +1 -0
- package/dist/browser/chunks/logger-8b07fb72.js +1 -0
- package/dist/browser/chunks/marrows-DD1NgMQi-15b63755.js +1 -0
- package/dist/browser/chunks/math-DpWn1mbG-38eeb914.js +1 -0
- package/dist/browser/chunks/math-rendering-ready-9a0fd90a.js +1 -0
- package/dist/browser/chunks/mathjax-BKrHE4xs-3ca05bf6.js +232 -0
- package/dist/browser/chunks/module-0191e321.js +74 -0
- package/dist/browser/chunks/module-shim-58659a86.js +0 -0
- package/dist/browser/chunks/module-shim-b4470740.js +12 -0
- package/dist/browser/chunks/monospace-D116QD2a-98d484fd.js +1 -0
- package/dist/browser/chunks/monospace-ex-DcXpouKS-456b403c.js +1 -0
- package/dist/browser/chunks/monospace-l-Ct5wkMDs-f34a4a9e.js +1 -0
- package/dist/browser/chunks/mshapes-DCp86WSX-c0055952.js +1 -0
- package/dist/browser/chunks/nl-NL-364d61b9.js +1 -0
- package/dist/browser/chunks/nl-NL-8b7e6d4b.js +1 -0
- package/dist/browser/chunks/overlay-containment-edaaff13.js +1 -0
- package/dist/browser/chunks/overlay-placement-e8058232.js +1 -0
- package/dist/browser/chunks/phonetics-BwOCw2Y9-d2e3af59.js +1 -0
- package/dist/browser/chunks/phonetics-ss-CRtMn02f-579b6135.js +1 -0
- package/dist/browser/chunks/pie-api-client-687c319a.js +1 -0
- package/dist/browser/chunks/pointer-gesture-ce75f0a7.js +1 -0
- package/dist/browser/chunks/preload-helper-6ad28da3.js +1 -0
- package/dist/browser/chunks/provider-4c704118.js +1 -0
- package/dist/browser/chunks/rolldown-runtime-1287ba31.js +1 -0
- package/dist/browser/chunks/runtime-wcU7KOFU-ac86d7b8.js +8536 -0
- package/dist/browser/chunks/sanitize-svg-icon-b9082bba.js +3 -0
- package/dist/browser/chunks/sans-serif-BYPZKlE9-2efdbcd9.js +1 -0
- package/dist/browser/chunks/sans-serif-b-B0kRKiC--b5530dce.js +1 -0
- package/dist/browser/chunks/sans-serif-bi-DXWul6mu-5370dba4.js +1 -0
- package/dist/browser/chunks/sans-serif-ex-Boux1kMP-aa178f31.js +1 -0
- package/dist/browser/chunks/sans-serif-i-676RFaSO-2db54474.js +1 -0
- package/dist/browser/chunks/sans-serif-r-DrN9xdZt-0fc72eea.js +1 -0
- package/dist/browser/chunks/script-0ohehnXc-526904f4.js +1 -0
- package/dist/browser/chunks/shapes-BG47NodJ-d59b0eca.js +1 -0
- package/dist/browser/chunks/src-BcptuNS5-ed25d7fd.js +191 -0
- package/dist/browser/chunks/sre-0162a7a9.js +53 -0
- package/dist/browser/chunks/sre-engine-ace23548.js +1 -0
- package/dist/browser/chunks/sre-engine-jd8cc08x-42d270e5.js +1 -0
- package/dist/browser/chunks/sre-locales-112320af.js +1 -0
- package/dist/browser/chunks/symbols-BqnUxf_t-83087e87.js +1 -0
- package/dist/browser/chunks/symbols-b-i-eg9k5hmF-9c461ac2.js +1 -0
- package/dist/browser/chunks/tool-annotation-toolbar-997438b4.js +249 -0
- package/dist/browser/chunks/tool-answer-eliminator-35483abd.js +13 -0
- package/dist/browser/chunks/tool-color-scheme-b7de5cdf.js +26 -0
- package/dist/browser/chunks/tool-dictionary-cecff3b4.js +7 -0
- package/dist/browser/chunks/tool-graph-cb0338e8.js +11 -0
- package/dist/browser/chunks/tool-host-contract-b93b482c.js +1 -0
- package/dist/browser/chunks/tool-instance-id-2a92deb0.js +1 -0
- package/dist/browser/chunks/tool-line-reader-f8ef3c6a.js +62 -0
- package/dist/browser/chunks/tool-periodic-table-43b133b8.js +153 -0
- package/dist/browser/chunks/tool-picture-dictionary-33721e91.js +4 -0
- package/dist/browser/chunks/tool-protractor-23f77028.js +17 -0
- package/dist/browser/chunks/tool-ruler-1d9a03a6.js +15 -0
- package/dist/browser/chunks/tool-tts-inline-98c2ce7a.js +179 -0
- package/dist/browser/chunks/tts-runtime-config-a7ab1ad4.js +194 -0
- package/dist/browser/chunks/variants-2LRNhOUP-966fc49d.js +1 -0
- package/dist/browser/chunks/versioned-tag-54a76be9.js +1 -0
- package/dist/browser/pie-section-player.js +1727 -0
- package/dist/browser.d.ts +10 -0
- package/dist/chunks/ItemToolBar-jx38w99s-1287ba31.js +28 -0
- package/dist/chunks/module-shim-58659a86.js +2129 -0
- package/dist/chunks/{nl-NL-9312c316.js → nl-NL-364d61b9.js} +9 -26
- package/dist/chunks/sre-engine-jd8cc08x-42d270e5.js +8 -0
- package/dist/components/shared/composition.d.ts +3 -2
- package/dist/components/shared/framework-error-latch.d.ts +32 -0
- package/dist/components/shared/host-element.d.ts +10 -0
- package/dist/components/shared/kernel-host-default-body.d.ts +14 -0
- package/dist/components/shared/layout-host-methods.d.ts +385 -0
- package/dist/components/shared/missing-tool-providers.d.ts +16 -0
- package/dist/components/shared/player-preload.d.ts +14 -10
- package/dist/components/shared/section-player-backend-delivery.d.ts +1 -1
- package/dist/components/shared/section-player-card-context.d.ts +5 -1
- package/dist/components/shared/section-player-host-runtime.d.ts +32 -19
- package/dist/components/shared/section-player-layout-context.d.ts +77 -0
- package/dist/components/shared/section-player-own-event.d.ts +10 -0
- package/dist/components/shared/section-player-runtime-callbacks.d.ts +1 -1
- package/dist/components/shared/section-player-shell-layout.svelte.d.ts +3 -11
- package/dist/components/shared/section-player-view-state.d.ts +6 -1
- package/dist/components/shared/toolkit-ready-wait.d.ts +16 -0
- package/dist/contracts/host-hooks.d.ts +4 -12
- package/dist/contracts/host-hooks.js +0 -0
- package/dist/contracts/runtime-host-contract.d.ts +0 -5
- package/dist/contracts/runtime-host-contract.js +0 -0
- package/dist/controllers/SectionController.d.ts +14 -0
- package/dist/controllers/toolkit-section-contracts.d.ts +1 -17
- package/dist/controllers/types.d.ts +25 -11
- package/dist/item-section/index.d.ts +22 -0
- package/dist/item-section/index.js +37 -0
- package/dist/pie-section-player.d.ts +4 -6
- package/dist/pie-section-player.js +22006 -41076
- package/dist/policies/index.d.ts +5 -16
- package/dist/policies/index.js +17 -0
- package/dist/policies/types.d.ts +0 -4
- package/package.json +33 -68
- package/dist/chunks/module-a516757f.js +0 -73997
- package/dist/chunks/nl-NL-ef6dd604.js +0 -505
- package/dist/chunks/pie-api-client-22de9d9c.js +0 -168
- package/dist/chunks/rolldown-runtime-1287ba31.js +0 -20
- package/dist/chunks/sre-0162a7a9.js +0 -17637
- package/dist/components/item-shell-element.d.ts +0 -1
- package/dist/components/shared/shell-registration.d.ts +0 -55
- package/dist/contracts/layout-contract.d.ts +0 -17
- package/dist/contracts/layout-parity-metadata.d.ts +0 -4
- package/dist/contracts/public-events.d.ts +0 -93
- package/dist/contracts/stages.d.ts +0 -10
- package/dist/policies/guards.d.ts +0 -2
- package/dist/utils/z-index.d.ts +0 -5
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import{a as Ln,i as In,m as Rn,r as Mn}from"./tool-host-contract-b93b482c.js";import{t as On}from"./versioned-tag-54a76be9.js";import{t as Hn}from"./ToolCoordinator-cc2dc319.js";if(typeof window<"u"){var cr,fr;((cr=(fr=window).__svelte??(fr.__svelte={})).v??(cr.v=new Set)).add("5")}var ye={},R=Symbol("uninitialized"),xn=Array.isArray,Nn=Array.prototype.indexOf,Fe=Array.prototype.includes,Kn=Array.from,be=Object.keys,Jt=Object.defineProperty,Tt=Object.getOwnPropertyDescriptor,Wn=Object.prototype,Bn=Array.prototype,Gn=Object.getPrototypeOf,dr=Object.isExtensible,Pn=()=>{};function Fn(e){for(var t=0;t<e.length;t++)e[t]()}function Dn(){var e,t;return{promise:new Promise((r,n)=>{e=r,t=n}),resolve:e,reject:t}}function Qt(e){"@babel/helpers - typeof";return Qt=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Qt(e)}function qn(e,t){if(Qt(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(Qt(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function jn(e){var t=qn(e,"string");return Qt(t)=="symbol"?t:t+""}function l(e,t,r){return(t=jn(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var rt=1024,lt=2048,Mt=4096,Ir=8192,Xn=16384,Rr=32768,vr=1<<25,Mr=65536,ne=1<<19,zn=1<<20,pr=1<<21,Or=1<<23,Vt=Symbol("$state"),Hr=Symbol("component"),xr=Symbol("legacy props"),Vn=Symbol("attributes"),Yn=Symbol("class"),Un=Symbol("style"),Jn=Symbol("text"),Le=new class extends Error{constructor(...e){super(...e),l(this,"name","StaleReactionError"),l(this,"message","The reaction that called `getAbortSignal()` was re-run or destroyed")}};globalThis.document?.contentType;function Qn(){console.warn("https://svelte.dev/e/derived_inert")}function Nr(e){console.warn("https://svelte.dev/e/hydration_mismatch")}function Zn(){console.warn("https://svelte.dev/e/svelte_boundary_reset_noop")}var J=!1;function ae(e){J=e}var K;function Zt(e){if(e===null)throw Nr(),ye;return K=e}function Kr(){return Zt(jt(K))}function ti(e=1){if(J){for(var t=e,r=K;t--;)r=jt(r);K=r}}function ei(e=!0){for(var t=0,r=K;;){if(r.nodeType===8){var n=r.data;if(n==="]"){if(t===0)return r;t-=1}else(n==="["||n==="[!"||n[0]==="["&&!isNaN(Number(n.slice(1))))&&(t+=1)}var i=jt(r);e&&r.remove(),r=i}}function Wr(e){return e===this.v}function ri(e,t){return e!=e?t==t:e!==t||e!==null&&typeof e=="object"||typeof e=="function"}function Br(e){return!ri(e,this.v)}function ni(e){throw new Error("https://svelte.dev/e/lifecycle_outside_component")}function ii(e){throw new Error("https://svelte.dev/e/effect_in_teardown")}function si(){throw new Error("https://svelte.dev/e/effect_in_unowned_derived")}function ai(e){throw new Error("https://svelte.dev/e/effect_orphan")}function oi(){throw new Error("https://svelte.dev/e/effect_update_depth_exceeded")}function li(){throw new Error("https://svelte.dev/e/hydration_failed")}function ui(e){throw new Error("https://svelte.dev/e/props_invalid_value")}function hi(){throw new Error("https://svelte.dev/e/state_descriptors_fixed")}function ci(){throw new Error("https://svelte.dev/e/state_prototype_fixed")}function fi(){throw new Error("https://svelte.dev/e/state_unsafe_mutation")}function di(){throw new Error("https://svelte.dev/e/svelte_boundary_reset_onerror")}var tr=!1,ie=!1,k=null;function Ae(e){k=e}function Gr(e,t=!1,r){k={p:k,i:!1,c:null,e:null,s:e,x:null,r:$,l:ie&&!t?{s:null,u:null,$:[]}:null}}function Pr(e){var t=k,r=t.e;if(r!==null){t.e=null;for(var n of r)ln(n)}return e!==void 0&&(t.x=e),t.i=!0,k=t.p,er(e)}function er(e={}){return Jt(e,Hr,{value:!0}),e}function Ie(){return!ie||k!==null&&k.l===null}var Ct=[];function Fr(){var e=Ct;Ct=[],Fn(e)}function It(e){if(Ct.length===0&&!Yt){var t=Ct;queueMicrotask(()=>{t===Ct&&Fr()})}Ct.push(e)}function vi(){for(;Ct.length>0;)Fr()}var pi=~(lt|Mt|rt);function M(e,t){e.f=e.f&pi|t}function rr(e){(e.f&512)!==0||e.deps===null?M(e,rt):M(e,Mt)}function Dr(e,t,r){(e.f&2048)!==0?t.add(e):e.f&4096&&r.add(e),M(e,rt)}function Re(e){var t=w,r=$;ot(null),gt(null);try{return e()}finally{ot(t),gt(r)}}function Se(e){var t=2|lt;return $!==null&&($.f|=ne),{ctx:k,deps:null,effects:null,equals:Wr,f:t,fn:e,reactions:null,rv:0,v:R,wv:0,parent:$,ac:null}}var mi=Symbol("obsolete");function xe(e){const t=Se(e);return fn(t),t}function gi(e){const t=Se(e);return t.equals=Br,t}function yi(e){var t=e.effects;if(t!==null){e.effects=null;for(var r=0;r<t.length;r+=1)Q(t[r])}}function nr(e){var t,r=$,n=e.parent;if(!ft&&n!==null&&e.v!==R&&(n.f&24576)!==0)return Qn(),e.v;gt(n);try{yi(e),t=mn(e)}finally{gt(r)}return t}function qr(e){var t=nr(e);if(!e.equals(t)&&(e.wv=vn(),(!C?.is_fork||e.deps===null)&&(C!==null?(C.capture(e,t,!0),qe?.capture(e,t,!0)):e.v=t,e.deps===null))){M(e,rt);return}ft||(N!==null?(sr()||C?.is_fork)&&N.set(e,t):rr(e))}function bi(e){if(e.effects!==null)for(const t of e.effects)(t.teardown||t.ac)&&(t.teardown?.(),t.ac!==null&&Re(()=>{t.ac.abort(Le),t.ac=null}),t.fn!==null&&(t.teardown=Pn),ee(t,0),or(t))}function jr(e){if(e.effects!==null)for(const t of e.effects)t.teardown&&t.fn!==null&&Dt(t)}function Xr(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function ir(e,t){Xr(e,t),t.add(e)}function A(e,t,r){Xr(e,t),t.set(e,r)}function g(e,t,r){if(typeof e=="function"?e===t:e.has(t))return arguments.length<3?t:r;throw new TypeError("Private element is not present on this object")}function d(e,t,r){return e.set(g(e,t),r),r}function a(e,t){return e.get(g(e,t))}var zr,De=null,Nt=null,C=null,qe=null,N=null,je=null,Yt=!1,Ne=!1,te=null,we=null,Vr=0,Ai=1,Xe=new WeakMap,_t=new WeakMap,Gt=new WeakMap,Ee=new WeakMap,oe=new WeakMap,Kt=new WeakMap,St=new WeakMap,zt=new WeakMap,it=new WeakMap,mr=new WeakMap,Ft=new WeakMap,ct=new WeakMap,vt=new WeakMap,Ke=new WeakMap,le=new WeakMap,L=new WeakSet,qt=class Yr{constructor(){ir(this,L),l(this,"id",Ai++),A(this,Xe,!1),l(this,"linked",!0),A(this,_t,null),A(this,Gt,null),l(this,"async_deriveds",new Map),l(this,"current",new Map),l(this,"previous",new Map),A(this,Ee,new Set),A(this,oe,new Set),A(this,Kt,0),A(this,St,new Map),A(this,zt,null),A(this,it,[]),A(this,mr,[]),A(this,Ft,new Set),A(this,ct,new Set),A(this,vt,new Map),A(this,Ke,new Set),l(this,"is_fork",!1),A(this,le,!1),Nt===null?De=Nt=this:(d(Gt,Nt,this),d(_t,this,Nt)),Nt=this}skip_effect(t){a(vt,this).has(t)||a(vt,this).set(t,{d:[],m:[]}),a(Ke,this).delete(t)}unskip_effect(t,r=n=>this.schedule(n)){var n=a(vt,this).get(t);if(n){a(vt,this).delete(t);for(var i of n.d)M(i,lt),r(i);for(i of n.m)M(i,Mt),r(i)}a(Ke,this).add(t)}capture(t,r,n=!1){t.v!==R&&!this.previous.has(t)&&this.previous.set(t,t.v),!(t.f&8388608)&&(this.current.set(t,[r,n]),N?.set(t,r)),this.is_fork||(t.v=r)}activate(){C=this}deactivate(){C=null,N=null}flush(){try{Ne=!0,C=this,g(L,this,Ce).call(this)}finally{Vr=0,je=null,te=null,we=null,Ne=!1,C=null,N=null,at.clear()}}discard(){for(const t of a(oe,this))t(this);a(oe,this).clear();for(const t of this.async_deriveds.values())t.reject(mi);g(L,this,$e).call(this),a(zt,this)?.resolve()}register_created_effect(t){a(mr,this).push(t)}increment(t,r){if(d(Kt,this,a(Kt,this)+1),t){let n=a(St,this).get(r)??0;a(St,this).set(r,n+1)}}decrement(t,r){if(d(Kt,this,a(Kt,this)-1),t){let n=a(St,this).get(r)??0;n===1?a(St,this).delete(r):a(St,this).set(r,n-1)}a(le,this)||(d(le,this,!0),It(()=>{d(le,this,!1),this.linked&&this.flush()}))}transfer_effects(t,r){for(const n of t)a(Ft,this).add(n);for(const n of r)a(ct,this).add(n);t.clear(),r.clear()}oncommit(t){a(Ee,this).add(t)}ondiscard(t){a(oe,this).add(t)}settled(){return(a(zt,this)??d(zt,this,Dn())).promise}static ensure(){if(C===null){const t=C=new Yr;!Ne&&!Yt&&It(()=>{a(Xe,t)||t.flush()})}return C}apply(){if(!tr||!this.is_fork&&a(_t,this)===null&&a(Gt,this)===null){N=null;return}N=new Map;for(const[r,[n]]of this.current)N.set(r,n);for(let r=De;r!==null;r=a(Gt,r))if(!(r===this||r.is_fork)){var t=!1;if(r.id<this.id){for(const[n,[,i]]of r.current)if(!i&&this.current.has(n)){t=!0;break}}if(!t)for(const[n,i]of r.previous)N.has(n)||N.set(n,i)}}schedule(t){if(je=t,t.b?.is_pending&&(t.f&16777228)!==0&&(t.f&32768)===0){t.b.defer_effect(t);return}a(it,this).push(t)}};zr=qt;function gr(){if(this.is_fork)return!0;for(const r of a(St,this).keys()){for(var e=r,t=!1;e.parent!==null;){if(a(vt,this).has(e)){t=!0;break}e=e.parent}if(!t)return!0}return!1}function Si(){var e=[];for(const i of a(it,this))if(!((i.f&16384)!==0||(i.f&6144)===0)){for(var t=i,r=!1;t.parent!==null;){t=t.parent;var n=t.f;if((n&96)!==0){if((n&1024)===0){r=!0;break}t.f^=rt}}r||e.push(t)}return d(it,this,[]),e}function Ce(){d(Xe,this,!0);for(const o of a(Ft,this))a(ct,this).delete(o),M(o,lt),this.schedule(o);for(const o of a(ct,this))M(o,Mt),this.schedule(o);this.apply();for(var e=te=[],t=[],r=we=[];a(it,this).length>0;){Vr++>1e3&&(g(L,this,$e).call(this),$i());for(const o of g(L,this,Si).call(this))try{g(L,this,wi).call(this,o,e,t)}catch(u){throw Qr(o),g(L,this,gr).call(this)||this.discard(),u}}if(C=null,r.length>0){var n=zr.ensure();for(const o of r)n.schedule(o)}if(te=null,we=null,g(L,this,gr).call(this)){g(L,this,ue).call(this,t),g(L,this,ue).call(this,e);for(const[o,u]of a(vt,this))Jr(o,u);r.length>0&&g(L,C,Ce).call(C);return}const i=g(L,this,Ei).call(this);if(i){g(L,this,ue).call(this,t),g(L,this,ue).call(this,e),g(L,i,Ci).call(i,this);return}a(Ft,this).clear(),a(ct,this).clear();for(const o of a(Ee,this))o(this);a(Ee,this).clear(),qe=this,yr(t),yr(e),qe=null,a(zt,this)?.resolve();var s=C;if(a(Kt,this)===0&&(a(it,this).length===0||s!==null)&&g(L,this,$e).call(this),a(it,this).length>0)if(s!==null){for(const o of a(it,this))a(it,s).push(o);d(it,this,[])}else s=this;s!==null&&(at.clear(),g(L,s,Ce).call(s))}function wi(e,t,r){e.f^=rt;for(var n=e.first;n!==null;){var i=n.f,s=(i&96)!==0;if(!(s&&(i&1024)!==0||(i&8192)!==0||a(vt,this).has(n))&&n.fn!==null){s?n.f^=rt:(i&4)!==0?t.push(n):tr&&(i&16777224)!==0?r.push(n):se(n)&&(i&16&&a(ct,this).add(n),Dt(n));var o=n.first;if(o!==null){n=o;continue}}for(;n!==null;){var u=n.next;if(u!==null){n=u;break}n=n.parent}}}function Ei(){for(var e=a(_t,this);e!==null;){if(!e.is_fork){for(const[t,[,r]]of this.current)if(e.current.has(t)&&!r)return e}e=a(_t,e)}return null}function Ci(e){for(const[r,n]of e.current)!this.previous.has(r)&&e.previous.has(r)&&this.previous.set(r,e.previous.get(r)),this.current.set(r,n);for(const[r,n]of e.async_deriveds){const i=this.async_deriveds.get(r);i&&n.promise.then(i.resolve).catch(i.reject)}e.async_deriveds.clear(),this.transfer_effects(a(Ft,e),a(ct,e));const t=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)t(o);else{var s=o;i&4194320&&!this.async_deriveds.has(s)&&(a(ct,this).delete(s),M(s,lt),this.schedule(s))}}};for(const r of this.current.keys())t(r);this.oncommit(()=>e.discard()),g(L,e,$e).call(e),C=this,g(L,this,Ce).call(this)}function ue(e){for(var t=0;t<e.length;t+=1)Dr(e[t],a(Ft,this),a(ct,this))}function $e(){if(this.linked){var e=a(_t,this),t=a(Gt,this);e===null?De=t:d(Gt,e,t),t===null?Nt=e:d(_t,t,e),this.linked=!1}}function dt(e){var t=Yt;Yt=!0;try{var r;for(e&&(C!==null&&!C.is_fork&&C.flush(),r=e());;){if(vi(),C===null)return r;C.flush()}}finally{Yt=t}}function $i(){try{oi()}catch(e){pt(e,je)}}var ht=null;function yr(e){var t=e.length;if(t!==0){for(var r=0;r<t;){var n=e[r++];if((n.f&24576)===0&&se(n)&&(ht=new Set,Dt(n),n.deps===null&&n.first===null&&n.nodes===null&&n.teardown===null&&n.ac===null&&hn(n),ht?.size>0)){at.clear();for(const i of ht){if((i.f&24576)!==0)continue;const s=[i];let o=i.parent;for(;o!==null;)ht.has(o)&&(ht.delete(o),s.push(o)),o=o.parent;for(let u=s.length-1;u>=0;u--){const h=s[u];!(h.f&24576)&&Dt(h)}}ht.clear()}}ht=null}}function Ur(e){C.schedule(e)}function Jr(e,t){if(!((e.f&32)!==0&&(e.f&1024)!==0)){(e.f&2048)!==0?t.d.push(e):e.f&4096&&t.m.push(e),M(e,rt);for(var r=e.first;r!==null;)Jr(r,t),r=r.next}}function Qr(e){M(e,rt);for(var t=e.first;t!==null;)Qr(t),t=t.next}var Te=new Set,at=new Map,Zr=!1;function Me(e,t){return{f:0,v:e,reactions:null,equals:Wr,rv:0,wv:0}}function D(e,t){const r=Me(e,t);return fn(r),r}function Ti(e,t=!1,r=!0){const n=Me(e);if(t||(n.equals=Br),ie&&r&&k!==null&&k.l!==null){var i;((i=k.l).s??(i.s=[])).push(n)}return n}function x(e,t,r=!1){return w!==null&&(!Y||w.f&131072)&&Ie()&&w.f&4325394&&(Z===null||!Z.has(e))&&fi(),tn(e,r?Pt(t):t,we)}var Et=null,ze=0;function tn(e,t,r=null){if(!e.equals(t)){ft?at.set(e,t):at.has(e)||at.set(e,e.v);var n=qt.ensure();if(n.capture(e,t),(e.f&2)!==0){const i=e;e.f&2048&&nr(i),N===null&&rr(i)}e.wv=vn(),Et=null,ze=0,en(e,lt,r),Et=null,Ie()&&$!==null&&$.f&1024&&!($.f&96)&&(V===null?Gi([e]):V.push(e)),!n.is_fork&&Te.size>0&&!Zr&&_i()}return t}function _i(){Zr=!1;for(const e of Te){e.f&1024&&M(e,Mt);let t;try{t=se(e)}catch{t=!0}t&&Dt(e)}Te.clear()}function Ut(e){x(e,e.v+1)}function en(e,t,r){var n=e.reactions;if(n!==null){var i=Ie(),s=n.length;if(ze+=s,ze>1e5&&Et===null&&(Et=new Set),Et!==null){if(Et.has(e))return;Et.add(e)}for(var o=0;o<s;o++){var u=n[o],h=u.f;if(!(!i&&u===$)){var c=(h<)===0;if(c&&M(u,t),(h&131072)!==0)Te.add(u);else if((h&2)!==0){var f=u;N?.delete(f),en(f,Mt,r)}else if(c){var v=u;h&16&&ht!==null&&ht.add(v),r!==null?r.push(v):Ur(v)}}}}}function Pt(e){if(typeof e!="object"||e===null||Vt in e||Hr in e)return e;const t=Gn(e);if(t!==Wn&&t!==Bn)return e;var r=new Map,n=xn(e),i=D(0),s=null,o=kt,u=h=>{if(kt===o)return h();var c=w,f=kt;ot(null),Sr(o);var v=h();return ot(c),Sr(f),v};return n&&r.set("length",D(e.length,s)),new Proxy(e,{defineProperty(h,c,f){(!("value"in f)||f.configurable===!1||f.enumerable===!1||f.writable===!1)&&hi();var v=r.get(c);return v===void 0?u(()=>{var S=D(f.value,s);return r.set(c,S),S}):x(v,f.value,!0),!0},deleteProperty(h,c){var f=r.get(c);if(f===void 0){if(c in h){const v=u(()=>D(R,s));r.set(c,v),Ut(i)}}else x(f,R),Ut(i);return!0},get(h,c,f){if(c===Vt)return e;var v=r.get(c),S=c in h;if(v===void 0&&(!S||Tt(h,c)?.writable)&&(v=u(()=>D(Pt(S?h[c]:R),s)),r.set(c,v)),v!==void 0){var b=y(v);return b===R?void 0:b}return Reflect.get(h,c,f)},getOwnPropertyDescriptor(h,c){this.has?.(h,c);var f=Reflect.getOwnPropertyDescriptor(h,c),v=r.get(c);if(v!==void 0){var S=y(v);if(S===R)return;if(f&&"value"in f)f.value=S;else return{enumerable:!0,configurable:!0,value:S,writable:!0}}return f},has(h,c){if(c===Vt)return!0;var f=r.get(c),v=f!==void 0&&f.v!==R||Reflect.has(h,c);return(f!==void 0||$!==null&&(!v||Tt(h,c)?.writable))&&(f===void 0&&(f=u(()=>D(v?Pt(h[c]):R,s)),r.set(c,f)),y(f)===R)?!1:v},set(h,c,f,v){var S=r.get(c),b=c in h;if(n&&c==="length")for(var p=f;p<S.v;p+=1){var E=r.get(p+"");E!==void 0?x(E,R):p in h&&(E=u(()=>D(R,s)),r.set(p+"",E))}if(S===void 0)(!b||Tt(h,c)?.writable)&&(S=u(()=>D(void 0,s)),x(S,Pt(f)),r.set(c,S));else{b=S.v!==R;var z=u(()=>Pt(f));x(S,z)}var O=Reflect.getOwnPropertyDescriptor(h,c);if(O?.set&&O.set.call(v,f),!b){if(n&&typeof c=="string"){var G=r.get("length"),P=Number(c);Number.isInteger(P)&&P>=G.v&&x(G,P+1)}Ut(i)}return!0},ownKeys(h){y(i);var c=Reflect.ownKeys(h).filter(S=>{var b=r.get(S);return b===void 0||b.v!==R});for(var[f,v]of r)v.v!==R&&!(f in h)&&c.push(f);return c},setPrototypeOf(){ci()}})}var br,rn,nn,sn;function Ve(){if(br===void 0){br=window,rn=/Firefox/.test(navigator.userAgent);var e=Element.prototype,t=Node.prototype,r=Text.prototype;nn=Tt(t,"firstChild").get,sn=Tt(t,"nextSibling").get,dr(e)&&(e[Yn]=void 0,e[Vn]=null,e[Un]=void 0,e.__e=void 0),dr(r)&&(r[Jn]=void 0)}}function an(e=""){return document.createTextNode(e)}function Ye(e){return nn.call(e)}function jt(e){return sn.call(e)}function ki(e){e.textContent=""}function on(e,t,r){return t==null||t==="http://www.w3.org/1999/xhtml"?r?document.createElement(e,{is:r}):document.createElement(e):r?document.createElementNS(t,e,{is:r}):document.createElementNS(t,e)}function Li(e){var t=$;if(t===null)return w.f|=Or,e;if((t.f&32768)===0&&(t.f&4)===0)throw e;pt(e,t)}function pt(e,t){if(!(t!==null&&(t.f&16384)!==0)){for(;t!==null;){if((t.f&128)!==0&&(t.f&33570816)===0){if((t.f&32768)===0)throw e;try{t.b.error(e);return}catch(r){e=r}}t=t.parent}throw e}}function Ii(e){$===null&&(w===null&&ai(e),si()),ft&&ii(e)}function Ri(e,t){var r=t.last;r===null?t.last=t.first=e:(r.next=e,e.prev=r,t.last=e)}function Ot(e,t){var r=$;r!==null&&r.f&8192&&(e|=Ir);var n={ctx:k,deps:null,nodes:null,f:e|lt|512,first:null,fn:t,last:null,next:null,parent:r,b:r&&r.b,prev:null,teardown:null,wv:0,ac:null};C?.register_created_effect(n);var i=n;if((e&4)!==0)te!==null?te.push(n):qt.ensure().schedule(n);else if(t!==null){try{Dt(n)}catch(o){throw Q(n),o}i.deps===null&&i.teardown===null&&i.nodes===null&&i.first===i.last&&!(i.f&524288)&&(i=i.first,e&16&&e&65536&&i!==null&&(i.f|=Mr))}if(i!==null&&(i.parent=r,r!==null&&Ri(i,r),w!==null&&(w.f&2)!==0&&(e&64)===0)){var s=w;(s.effects??(s.effects=[])).push(i)}return n}function sr(){return w!==null&&!Y}function wt(e){Ii("$effect");var t=$.f;if(!w&&(t&32)!==0&&k!==null&&!k.i){var r=k;(r.e??(r.e=[])).push(e)}else return ln(e)}function ln(e){return Ot(4|zn,e)}function Mi(e){qt.ensure();const t=Ot(64|ne,e);return()=>{Q(t)}}function Oi(e){qt.ensure();const t=Ot(64|ne,e);return(r={})=>new Promise(n=>{r.outro?Oe(t,()=>{Q(t),n(void 0)}):(Q(t),n(void 0))})}function Hi(e){return Ot(4,e)}function ar(e,t=0){return Ot(8|t,e)}function xi(e,t=0){return Ot(16|t,e)}function Rt(e){return Ot(32|ne,e)}function un(e){var t=e.teardown;if(t!==null){const r=ft,n=w;Ar(!0),ot(null);try{t.call(null)}catch(i){pt(i,e.parent)}finally{Ar(r),ot(n)}}}function or(e,t=!1){var r=e.first;for(e.first=e.last=null;r!==null;){const i=r.ac;i!==null&&Re(()=>{i.abort(Le)});var n=r.next;(r.f&64)!==0?r.parent=null:Q(r,t),r=n}}function Ni(e){for(var t=e.first;t!==null;){var r=t.next;!(t.f&32)&&Q(t),t=r}}function Q(e,t=!0){var r=!1;(t||e.f&262144)&&e.nodes!==null&&e.nodes.end!==null&&(Ki(e.nodes.start,e.nodes.end),r=!0),e.f|=vr,or(e,t&&!r),ee(e,0);var n=e.nodes&&e.nodes.t;if(n!==null)for(const s of n)s.stop();un(e),e.f^=vr,e.f|=Xn;var i=e.parent;i!==null&&i.first!==null&&hn(e),e.next=e.prev=e.teardown=e.ctx=e.deps=e.fn=e.nodes=e.ac=e.b=null}function Ki(e,t){for(;e!==null;){var r=e===t?null:jt(e);e.remove(),e=r}}function hn(e){var t=e.parent,r=e.prev,n=e.next;r!==null&&(r.next=n),n!==null&&(n.prev=r),t!==null&&(t.first===e&&(t.first=n),t.last===e&&(t.last=r))}function Oe(e,t,r=!0){var n=[];e.f|=256,cn(e,n,!0);var i=()=>{r&&Q(e),t&&t()},s=n.length;if(s>0){var o=()=>--s||i();for(var u of n)u.out(o)}else i()}function cn(e,t,r){if((e.f&8192)===0){e.f^=Ir;var n=e.nodes&&e.nodes.t;if(n!==null)for(const u of n)(u.is_global||r)&&t.push(u);for(var i=e.first;i!==null;){var s=i.next;if((i.f&64)===0){var o=(i.f&65536)!==0||(i.f&32)!==0&&(e.f&16)!==0;cn(i,t,o?r:!1)}i=s}}}function Wi(e,t){if(e.nodes)for(var r=e.nodes.start,n=e.nodes.end;r!==null;){var i=r===n?null:jt(r);t.append(r),r=i}}var Bi=null,ve=!1,ft=!1;function Ar(e){ft=e}var w=null,Y=!1;function ot(e){w=e}var $=null;function gt(e){$=e}var Z=null;function fn(e){w!==null&&(w.f&2097152||w.f&2)&&(Z??(Z=new Set)).add(e)}var B=null,q=0,V=null;function Gi(e){V=e}var dn=1,$t=0,kt=$t;function Sr(e){kt=e}function vn(){return++dn}function se(e){var t=e.f;if((t&2048)!==0)return!0;if((t&4096)!==0){for(var r=e.deps,n=r.length,i=0;i<n;i++){var s=r[i];if(se(s)&&qr(s),s.wv>e.wv)return!0}t&512&&N===null&&M(e,rt)}return!1}function pn(e,t,r=!0){var n=e.reactions;if(n!==null&&!(!tr&&Z!==null&&Z.has(e)))for(var i=0;i<n.length;i++){var s=n[i];(s.f&2)!==0?pn(s,t,!1):t===s&&(r?M(s,lt):s.f&1024&&M(s,Mt),Ur(s))}}function mn(e){var t=B,r=q,n=V,i=w,s=Z,o=k,u=Y,h=kt,c=e.f;B=null,q=0,V=null,w=(c&96)===0?e:null,Z=null,Ae(e.ctx),Y=!1,kt=++$t,e.ac!==null&&(Re(()=>{e.ac.abort(Le)}),e.ac=null);try{e.f|=pr;var f=e.fn,v=f();e.f|=Rr;var S=wr(e);if(Ie()&&V!==null&&!Y&&S!==null&&(e.f&6146)===0)for(var b=0;b<V.length;b++)pn(V[b],e);if(i!==null&&i!==e){if($t++,i.deps!==null)for(let p=0;p<r;p+=1)i.deps[p].rv=$t;if(t!==null)for(const p of t)p.rv=$t;V!==null&&(n===null?n=V:n.push(...V))}return e.f&8388608&&(e.f^=Or),v}catch(p){return wr(e),Li(p)}finally{e.f^=pr,B=t,q=r,V=n,w=i,Z=s,Ae(o),Y=u,kt=h}}function wr(e){var t=e.deps,r=C?.is_fork;if(B!==null){var n;if(r||ee(e,q),t!==null&&q>0)for(t.length=q+B.length,n=0;n<B.length;n++)t[q+n]=B[n];else e.deps=t=B;if(sr()&&(e.f&512)!==0)for(n=q;n<t.length;n++){var i;((i=t[n]).reactions??(i.reactions=[])).push(e)}}else!r&&t!==null&&q<t.length&&(ee(e,q),t.length=q);return t}function Pi(e,t){let r=t.reactions;if(r!==null){var n=Nn.call(r,e);if(n!==-1){var i=r.length-1;i===0?r=t.reactions=null:(r[n]=r[i],r.pop())}}if(r===null&&(t.f&2)!==0&&(B===null||!Fe.call(B,t))){var s=t;s.f&512&&(s.f^=512),s.v!==R&&rr(s),s.ac!==null&&Re(()=>{s.ac.abort(Le),s.ac=null,M(s,lt)}),bi(s),ee(s,0)}}function ee(e,t){var r=e.deps;if(r!==null)for(var n=t;n<r.length;n++)Pi(e,r[n])}function Dt(e){var t=e.f;if((t&16384)===0){M(e,rt);var r=$,n=ve;$=e,ve=(t&96)===0;try{(t&16777232)!==0?Ni(e):or(e),un(e);var i=mn(e);e.teardown=typeof i=="function"?i:null,e.wv=dn}finally{ve=n,$=r}}}function y(e){var t=(e.f&2)!==0;if(Bi?.add(e),w!==null&&!Y&&!($!==null&&($.f&16384)!==0)&&(Z===null||!Z.has(e))){var r=w.deps;if((w.f&2097152)!==0)e.rv<$t&&(e.rv=$t,B===null&&r!==null&&r[q]===e?q++:B===null?B=[e]:B.push(e));else{var n;(n=w).deps??(n.deps=[]),Fe.call(w.deps,e)||w.deps.push(e);var i=e.reactions;i===null?e.reactions=[w]:Fe.call(i,w)||i.push(w)}}if(ft&&at.has(e))return at.get(e);if(t){var s=e;if(ft){var o=s.v;return(!(s.f&1024)&&s.reactions!==null||yn(s))&&(o=nr(s)),at.set(s,o),o}var u=(s.f&512)===0&&!Y&&w!==null&&(ve||(w.f&512)!==0),h=(s.f&Rr)===0;se(s)&&(u&&(s.f|=512),qr(s)),u&&!h&&(jr(s),gn(s))}if(N?.has(e))return N.get(e);if((e.f&8388608)!==0)throw e.v;return e.v}function gn(e){if(e.f|=512,e.deps!==null)for(const t of e.deps)(t.reactions??(t.reactions=[])).push(e),t.f&2&&!(t.f&512)&&(jr(t),gn(t))}function yn(e){if(e.v===R)return!0;if(e.deps===null)return!1;for(const t of e.deps)if(at.has(t)||(t.f&2)!==0&&yn(t))return!0;return!1}function He(e){var t=Y;try{return Y=!0,e()}finally{Y=t}}var he=Symbol("events"),Fi=new Set,Er=new Set,We=null,Be=!1;function Cr(e){var t=this,r=t.ownerDocument,n=e.type,i=e.composedPath?.()||[],s=i[0]||e.target;We=e,Be||(Be=!0,setTimeout(()=>{Be=!1,We=null}));var o=0,u=We===e&&e[he];if(u){var h=i.indexOf(u);if(h!==-1&&(t===document||t===window)){e[he]=t;return}var c=i.indexOf(t);if(c===-1)return;h<=c&&(o=h)}if(s=i[o]||e.target,s!==t){Jt(e,"currentTarget",{configurable:!0,get(){return s||r}});var f=w,v=$;ot(null),gt(null);try{for(var S,b=[];s!==null&&s!==t;){try{var p=s[he]?.[n];p!=null&&(!s.disabled||e.target===s)&&p.call(s,e)}catch(E){S?b.push(E):S=E}if(e.cancelBubble)break;o++,s=o<i.length?i[o]:null}if(S){for(let E of b)queueMicrotask(()=>{throw E});throw S}}finally{e[he]=t,delete e.currentTarget,ot(f),gt(v)}}}var Di=globalThis?.window?.trustedTypes&&globalThis.window.trustedTypes.createPolicy("svelte-trusted-html",{createHTML:e=>e});function qi(e){return Di?.createHTML(e)??e}function ji(e){var t=on("template");return t.innerHTML=qi(e.replaceAll("<!>","<!---->")),t.content}function pe(e,t){var r=$;r.nodes===null&&(r.nodes={start:e,end:t,a:null,t:null})}function Xi(e,t){var r=(t&1)!==0,n=(t&2)!==0,i,s=!e.startsWith("<!>");return()=>{if(J)return pe(K,null),K;i===void 0&&(i=ji(s?e:"<!>"+e),r||(i=Ye(i)));var o=n||rn?document.importNode(i,!0):i.cloneNode(!0);if(r){var u=Ye(o),h=o.lastChild;pe(u,h)}else pe(o,o);return o}}function bn(e,t){if(J){var r=$;(!(r.f&32768)||r.nodes.end===null)&&(r.nodes.end=K),Kr();return}e!==null&&e.before(t)}var zi=["touchstart","touchmove"];function Vi(e){return zi.includes(e)}function Yi(e){let t=0,r=Me(0),n;return()=>{sr()&&(y(r),ar(()=>(t===0&&(n=He(()=>e(()=>Ut(r)))),t+=1,()=>{It(()=>{t-=1,t===0&&(n?.(),n=void 0,Ut(r))})})))}}var Ui=Mr|ne;function Ji(e,t,r,n){new Qi(e,t,r,n)}var tt=new WeakMap,Ue=new WeakMap,st=new WeakMap,re=new WeakMap,j=new WeakMap,et=new WeakMap,X=new WeakMap,U=new WeakMap,mt=new WeakMap,Wt=new WeakMap,Lt=new WeakMap,ce=new WeakMap,Je=new WeakMap,Qe=new WeakMap,yt=new WeakMap,$r=new WeakMap,I=new WeakSet,Qi=class{constructor(e,t,r,n){ir(this,I),l(this,"parent",void 0),l(this,"is_pending",!1),l(this,"transform_error",void 0),A(this,tt,void 0),A(this,Ue,J?K:null),A(this,st,void 0),A(this,re,void 0),A(this,j,void 0),A(this,et,null),A(this,X,null),A(this,U,null),A(this,mt,null),A(this,Wt,0),A(this,Lt,0),A(this,ce,!1),A(this,Je,new Set),A(this,Qe,new Set),A(this,yt,null),A(this,$r,Yi(()=>(d(yt,this,Me(a(Wt,this))),()=>{d(yt,this,null)}))),d(tt,this,e),d(st,this,t),d(re,this,i=>{var s=$;s.b=this,s.f|=128,r(i)}),this.parent=$.b,this.transform_error=n??this.parent?.transform_error??(i=>i),d(j,this,xi(()=>{if(J){const i=a(Ue,this);Kr();const s=i.data==="[!";if(i.data.startsWith("[?")){const o=JSON.parse(i.data.slice(2));g(I,this,ts).call(this,o)}else s?g(I,this,es).call(this):g(I,this,Zi).call(this)}else g(I,this,Sn).call(this)},Ui)),J&&d(tt,this,K)}defer_effect(e){Dr(e,a(Je,this),a(Qe,this))}is_rendered(){return!this.is_pending&&(!this.parent||this.parent.is_rendered())}has_pending_snippet(){return!!a(st,this).pending}update_pending_count(e,t){g(I,this,wn).call(this,e,t),d(Wt,this,a(Wt,this)+e),a(yt,this)&&!a(ce,this)&&(d(ce,this,!0),It(()=>{d(ce,this,!1),a(yt,this)&&tn(a(yt,this),a(Wt,this))}))}get_effect_pending(){return a($r,this).call(this),y(a(yt,this))}error(e){if(!a(st,this).onerror&&!a(st,this).failed)throw e;C?.is_fork?(a(et,this)&&C.skip_effect(a(et,this)),a(X,this)&&C.skip_effect(a(X,this)),a(U,this)&&C.skip_effect(a(U,this)),C.oncommit(()=>{g(I,this,Tr).call(this,e)})):g(I,this,Tr).call(this,e)}};function Zi(){try{d(et,this,Rt(()=>a(re,this).call(this,a(tt,this))))}catch(e){this.error(e)}}function ts(e){const t=a(st,this).failed,{reset:r,invoke_onerror:n}=g(I,this,An).call(this,e);It(n),t&&d(U,this,Rt(()=>{t(a(tt,this),()=>e,()=>r)}))}function An(e){var t=!1,r=!1;const n=()=>{if(t){Zn();return}t=!0,r&&di(),a(U,this)!==null&&Oe(a(U,this),()=>{d(U,this,null)}),g(I,this,lr).call(this,()=>{g(I,this,Sn).call(this)})};return{reset:n,invoke_onerror:()=>{try{r=!0,a(st,this).onerror?.(e,n),r=!1}catch(i){pt(i,a(j,this)&&a(j,this).parent)}}}}function es(){const e=a(st,this).pending;e&&(this.is_pending=!0,d(X,this,Rt(()=>e(a(tt,this)))),It(()=>{var t=d(mt,this,document.createDocumentFragment()),r=an(),n=!1;if(t.append(r),d(et,this,g(I,this,lr).call(this,()=>{try{return Rt(()=>a(re,this).call(this,r))}catch(i){try{this.error(i),n=!0}catch(s){pt(s,a(j,this).parent)}return null}})),a(et,this)===null){d(mt,this,null),n&&g(I,this,_e).call(this,C);return}a(Lt,this)===0&&(a(tt,this).before(t),d(mt,this,null),Oe(a(X,this),()=>{d(X,this,null)}),g(I,this,_e).call(this,C))}))}function Sn(){try{if(this.is_pending=this.has_pending_snippet(),d(Lt,this,0),d(Wt,this,0),d(et,this,Rt(()=>{a(re,this).call(this,a(tt,this))})),a(Lt,this)>0){var e=d(mt,this,document.createDocumentFragment());Wi(a(et,this),e);const t=a(st,this).pending;d(X,this,Rt(()=>t(a(tt,this))))}else g(I,this,_e).call(this,C)}catch(t){this.error(t)}}function _e(e){this.is_pending=!1,e.transfer_effects(a(Je,this),a(Qe,this))}function lr(e){var t=$,r=w,n=k;gt(a(j,this)),ot(a(j,this)),Ae(a(j,this).ctx);try{return qt.ensure(),e()}finally{gt(t),ot(r),Ae(n)}}function wn(e,t){if(!this.has_pending_snippet()){if(this.parent){var r;g(I,r=this.parent,wn).call(r,e,t)}return}d(Lt,this,a(Lt,this)+e),a(Lt,this)===0&&(g(I,this,_e).call(this,t),a(X,this)&&Oe(a(X,this),()=>{d(X,this,null)}),a(mt,this)&&(a(tt,this).before(a(mt,this)),d(mt,this,null)))}function Tr(e){a(et,this)&&(Q(a(et,this)),d(et,this,null)),a(X,this)&&(Q(a(X,this)),d(X,this,null)),a(U,this)&&(Q(a(U,this)),d(U,this,null)),J&&(Zt(a(Ue,this)),ti(),Zt(ei()));let t=a(st,this).failed;const r=n=>{const{reset:i,invoke_onerror:s}=g(I,this,An).call(this,n);s(),t&&d(U,this,g(I,this,lr).call(this,()=>{try{return Rt(()=>{var o=$;o.b=this,o.f|=128,t(a(tt,this),()=>n,()=>i)})}catch(o){return pt(o,a(j,this).parent),null}}))};It(()=>{var n;try{n=this.transform_error(e)}catch(i){pt(i,a(j,this)&&a(j,this).parent);return}n!==null&&typeof n=="object"&&typeof n.then=="function"?n.then(r,i=>pt(i,a(j,this)&&a(j,this).parent)):r(n)})}function En(e,t){return Cn(e,t)}function rs(e,t){Ve(),t.intro=t.intro??!1;const r=t.target,n=J,i=K;try{for(var s=Ye(r);s&&(s.nodeType!==8||s.data!=="[");)s=jt(s);if(!s)throw ye;ae(!0),Zt(s);const o=Cn(e,{...t,anchor:s});return ae(!1),o}catch(o){if(o instanceof Error&&o.message.split(`
|
|
2
|
+
`).some(u=>u.startsWith("https://svelte.dev/e/")))throw o;return o!==ye&&console.warn("Failed to hydrate: ",o),t.recover===!1&&li(),Ve(),ki(r),ae(!1),En(e,t)}finally{ae(n),Zt(i)}}var fe=new Map;function Cn(e,{target:t,anchor:r,props:n={},events:i,context:s,intro:o=!0,transformError:u}){Ve();var h=void 0,c=Oi(()=>{var f=r??t.appendChild(an());Ji(f,{pending:()=>{}},b=>{Gr({});var p=k;if(s&&(p.c=s),i&&(n.$$events=i),J&&pe(b,null),h=e(b,n)||er(),J&&($.nodes.end=K,K===null||K.nodeType!==8||K.data!=="]"))throw Nr(),ye;Pr()},u);var v=new Set,S=b=>{for(var p=0;p<b.length;p++){var E=b[p];if(!v.has(E)){v.add(E);var z=Vi(E);for(const P of[t,document]){var O=fe.get(P);O===void 0&&(O=new Map,fe.set(P,O));var G=O.get(E);G===void 0?(P.addEventListener(E,Cr,{passive:z}),O.set(E,1)):O.set(E,G+1)}}}};return S(Kn(Fi)),Er.add(S),()=>{for(var b of v)for(const z of[t,document]){var p=fe.get(z),E=p.get(b);--E==0?(z.removeEventListener(b,Cr),p.delete(b),p.size===0&&fe.delete(z)):p.set(b,E)}Er.delete(S),f!==r&&f.parentNode?.removeChild(f)}});return Ze.set(h,c),h}var Ze=new WeakMap;function ns(e,t){const r=Ze.get(e);return r?(Ze.delete(e),r(t)):Promise.resolve()}function is(e){k===null&&ni("onMount"),ie&&k.l!==null?ss(k).m.push(e):wt(()=>{const t=He(e);if(typeof t=="function")return t})}function ss(e){var t=e.l;return t.u??(t.u={a:[],b:[],m:[]})}var $n,Bt=new WeakMap,ke=new WeakMap,Ge=new WeakMap,_r=new WeakSet,Tn=class{constructor(e){ir(this,_r),A(this,Bt,new WeakMap),A(this,ke,void 0),A(this,Ge,void 0),d(Ge,this,e)}observe(e,t){var r=a(Bt,this).get(e)||new Set;return r.add(t),a(Bt,this).set(e,r),g(_r,this,as).call(this).observe(e,a(Ge,this)),()=>{var n=a(Bt,this).get(e);n.delete(t),n.size===0&&(a(Bt,this).delete(e),a(ke,this).unobserve(e))}}};$n=Tn;function as(){return a(ke,this)??d(ke,this,new ResizeObserver(e=>{for(var t of e){$n.entries.set(t.target,t);for(var r of a(Bt,this).get(t.target)||[])r(t)}}))}l(Tn,"entries",new WeakMap);function Pe(e,t){return e===t||e?.[Vt]===t}function os(e=er(),t,r,n){var i=k.r,s=$;return Hi(()=>{var o,u;return ar(()=>{o=u,u=n?.()||[],He(()=>{Pe(r(...u),e)||(t(e,...u),o&&Pe(r(...o),e)&&t(null,...o))})}),()=>{let h=s;for(;h!==i&&h.parent!==null&&h.parent.f&33554432;)h=h.parent;const c=()=>{u&&Pe(r(...u),e)&&t(null,...u)},f=h.teardown;h.teardown=()=>{c(),f?.()}}}),e}var de=!1;function ls(e){var t=de;try{return de=!1,[e(),de]}finally{de=t}}function bt(e,t,r,n){var i=!ie||(r&2)!==0,s=(r&8)!==0,o=(r&16)!==0,u=n,h=!0,c=void 0,f=()=>o&&i?(c??(c=Se(n)),y(c)):(h&&(h=!1,u=o?He(n):n),u);let v;if(s){var S=Vt in e||xr in e;v=Tt(e,t)?.set??(S&&t in e?H=>e[t]=H:void 0)}var b,p=!1;s?[b,p]=ls(()=>e[t]):b=e[t],b===void 0&&n!==void 0&&(b=f(),v&&(i&&ui(t),v(b)));var E;if(i?E=()=>{var H=e[t];return H===void 0?f():(h=!0,H)}:E=()=>{var H=e[t];return H!==void 0&&(u=void 0),H===void 0?u:H},i&&(r&4)===0)return E;if(v){var z=e.$$legacy;return(function(H,xt){return arguments.length>0?((!i||!xt||z||p)&&v(xt?E():H),H):E()})}var O=!1,G=((r&1)!==0?Se:gi)(()=>(O=!1,E()));s&&y(G);var P=$;return(function(H,xt){if(arguments.length>0){const Xt=xt?y(G):i&&s?Pt(H):H;return x(G,Xt),O=!0,u!==void 0&&(u=Xt),H}return ft&&O||(P.f&16384)!==0?G.v:y(G)})}function us(e){return new hs(e)}var At=new WeakMap,nt=new WeakMap,hs=class{constructor(e){A(this,At,void 0),A(this,nt,void 0);var t=new Map,r=(i,s)=>{var o=Ti(s,!1,!1);return t.set(i,o),o};const n=new Proxy({...e.props||{},$$events:{}},{get(i,s){return y(t.get(s)??r(s,Reflect.get(i,s)))},has(i,s){return s===xr?!0:(y(t.get(s)??r(s,Reflect.get(i,s))),Reflect.has(i,s))},set(i,s,o){return x(t.get(s)??r(s,o),o),Reflect.set(i,s,o)}});d(nt,this,(e.hydrate?rs:En)(e.component,{target:e.target,anchor:e.anchor,props:n,context:e.context,intro:e.intro??!1,recover:e.recover,transformError:e.transformError})),(!e?.props?.$$host||e.sync===!1)&&dt(),d(At,this,n.$$events);for(const i of Object.keys(a(nt,this)))i==="$set"||i==="$destroy"||i==="$on"||Jt(this,i,{get(){return a(nt,this)[i]},set(s){a(nt,this)[i]=s},enumerable:!0});a(nt,this).$set=i=>{Object.assign(n,i)},a(nt,this).$destroy=()=>{ns(a(nt,this))}}$set(e){a(nt,this).$set(e)}$on(e,t){a(At,this)[e]=a(At,this)[e]||[];const r=(...n)=>t.call(this,...n);return a(At,this)[e].push(r),()=>{a(At,this)[e]=a(At,this)[e].filter(n=>n!==r)}}$destroy(){a(nt,this).$destroy()}},_n;typeof HTMLElement=="function"&&(_n=class extends HTMLElement{constructor(e,t,r){super(),l(this,"$$ctor",void 0),l(this,"$$s",void 0),l(this,"$$c",void 0),l(this,"$$cn",!1),l(this,"$$d",{}),l(this,"$$r",!1),l(this,"$$p_d",{}),l(this,"$$l",{}),l(this,"$$l_u",new Map),l(this,"$$me",void 0),l(this,"$$shadowRoot",null),this.$$ctor=e,this.$$s=t,r&&(this.$$shadowRoot=this.attachShadow(r))}addEventListener(e,t,r){if(this.$$l[e]=this.$$l[e]||[],this.$$l[e].push(t),this.$$c){const n=this.$$c.$on(e,t);this.$$l_u.set(t,n)}super.addEventListener(e,t,r)}removeEventListener(e,t,r){if(super.removeEventListener(e,t,r),this.$$c){const n=this.$$l_u.get(t);n&&(n(),this.$$l_u.delete(t))}}async connectedCallback(){if(this.$$cn=!0,!this.$$c){let e=function(n){return i=>{const s=on("slot");n!=="default"&&(s.name=n),bn(i,s)}};if(await Promise.resolve(),!this.$$cn||this.$$c)return;const t={},r=cs(this);for(const n of this.$$s)n in r&&(n==="default"&&!this.$$d.children?(this.$$d.children=e(n),t.default=!0):t[n]=e(n));for(const n of this.attributes){const i=this.$$g_p(n.name);i in this.$$d||(this.$$d[i]=me(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=us({component:this.$$ctor,target:this.$$shadowRoot||this,props:{...this.$$d,$$slots:t,$$host:this}}),this.$$me=Mi(()=>{ar(()=>{this.$$r=!0;for(const n of be(this.$$c)){if(!this.$$p_d[n]?.reflect)continue;this.$$d[n]=this.$$c[n];const i=me(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 s=this.$$c.$on(n,i);this.$$l_u.set(i,s)}this.$$l={}}}attributeChangedCallback(e,t,r){this.$$r||(e=this.$$g_p(e),this.$$d[e]=me(e,r,this.$$p_d,"toProp"),this.$$c?.$set({[e]:this.$$d[e]}))}disconnectedCallback(){this.$$cn=!1,Promise.resolve().then(()=>{!this.$$cn&&this.$$c&&(this.$$c.$destroy(),this.$$me(),this.$$c=void 0)})}$$g_p(e){return be(this.$$p_d).find(t=>this.$$p_d[t].attribute===e||!this.$$p_d[t].attribute&&t.toLowerCase()===e)||e}});function me(e,t,r,n){const i=r[e]?.type;if(t=i==="Boolean"&&typeof t!="boolean"?t!=null:t,!n||!r[e])return t;if(n==="toAttribute")switch(i){case"Object":case"Array":return t==null?null:JSON.stringify(t);case"Boolean":return t?"":null;case"Number":return t??null;default:return t}else switch(i){case"Object":case"Array":return t&&JSON.parse(t);case"Boolean":return t;case"Number":return t!=null?+t:t;default:return t}}function cs(e){const t={};return e.childNodes.forEach(r=>{t[r.slot||"default"]=!0}),t}function fs(e,t,r,n,i,s){let o=class extends _n{constructor(){super(e,r,i),this.$$p_d=t}static get observedAttributes(){return be(t).map(u=>(t[u].attribute||u).toLowerCase())}};return be(t).forEach(u=>{Jt(o.prototype,u,{get(){return this.$$c&&u in this.$$c?this.$$c[u]:this.$$d[u]},set(h){h=me(u,h,t),this.$$d[u]=h;var c=this.$$c;c&&(Tt(c,u)?.get?c[u]=h:c.$set({[u]:h}))}})}),n.forEach(u=>{Jt(o.prototype,u,{get(){return this.$$c?.[u]}})}),s&&(o=s(o)),e.element=o,o}var kn,ut=class F{constructor(){l(this,"elementType","multiple-choice"),l(this,"priority",100)}canHandle(t){return t.tagName.toLowerCase()==="multiple-choice"||t.classList.contains("multiple-choice")}findChoices(t){t.setAttribute(F.ROOT_HOOK_ATTR,"true");const r=Array.from(t.querySelectorAll(F.CHOICE_SELECTOR));for(const n of r)this.annotateChoice(n);return this.annotateFeedbackTicks(t),r}createChoiceRange(t){const r=this.resolveLabelElement(t);if(!r)return null;const n=document.createRange();return n.selectNodeContents(r),n}getChoiceId(t){const r=t.querySelector('input[type="checkbox"], input[type="radio"]');return r?.getAttribute("value")||r?.id||this.generateFallbackId(t)}getChoiceLabel(t){return this.resolveLabelElement(t)?.textContent?.trim()||"Unlabeled choice"}isSelected(t){const r=t.querySelector('input[type="checkbox"], input[type="radio"]');return r?r.checked||r.getAttribute("aria-checked")==="true":!1}canEliminate(t){const r=t.querySelector('input[type="checkbox"], input[type="radio"]');return!(!r||this.isSelected(t)||r.disabled||(t.closest(`[${F.ROOT_HOOK_ATTR}="true"]`)||t.closest("multiple-choice"))?.querySelector(`[${F.FEEDBACK_HOOK_ATTR}="true"]`))}setSelectable(t,r){const n=t.querySelector('input[type="checkbox"], input[type="radio"]');if(!n)return;n.disabled=!r,r?n.removeAttribute("aria-disabled"):n.setAttribute("aria-disabled","true");const i=n.closest(F.MUI_BUTTON_SELECTOR);i&&i.classList.toggle(F.MUI_DISABLED_CLASS,!r)}getButtonContainer(t){return t}generateFallbackId(t){const r=(t.closest(`[${F.ROOT_HOOK_ATTR}="true"]`)||t.closest("multiple-choice"))?.querySelectorAll(`[${F.CHOICE_HOOK_ATTR}="true"]`)||[];return`choice-${Array.from(r).indexOf(t)}`}annotateChoice(t){t.setAttribute(F.CHOICE_HOOK_ATTR,"true");const r=this.resolveLabelElement(t);r&&r.setAttribute(F.LABEL_HOOK_ATTR,"true")}resolveLabelElement(t){return t.querySelector(`[${F.LABEL_HOOK_ATTR}="true"]`)||t.querySelector("label")||t.querySelector("span")}annotateFeedbackTicks(t){for(const r of t.querySelectorAll(".feedback-tick"))r.setAttribute(F.FEEDBACK_HOOK_ATTR,"true")}};kn=ut;l(ut,"CHOICE_HOOK_ATTR","data-pie-answer-eliminator-choice");l(ut,"LABEL_HOOK_ATTR","data-pie-answer-eliminator-label");l(ut,"ROOT_HOOK_ATTR","data-pie-answer-eliminator-root");l(ut,"FEEDBACK_HOOK_ATTR","data-pie-answer-eliminator-feedback-tick");l(ut,"CHOICE_SELECTOR",`[${kn.CHOICE_HOOK_ATTR}="true"], .corespring-checkbox, .corespring-radio-button`);l(ut,"MUI_BUTTON_SELECTOR",".MuiButtonBase-root, .MuiRadio-root, .MuiCheckbox-root");l(ut,"MUI_DISABLED_CLASS","Mui-disabled");var ds="ebsr-multiple-choice",ur=e=>e instanceof HTMLElement&&On(e.tagName.toLowerCase()).baseName===ds,kr=(e,t)=>Array.from(e.querySelectorAll(`[id="${t}"]`)).find(ur)??null,vs=e=>{let t=e.parentElement;for(;t!==null;){if(ur(t))return t;t=t.parentElement}return null},ps=class{constructor(){l(this,"elementType","ebsr"),l(this,"priority",110),l(this,"mcAdapter",new ut)}canHandle(e){return e.tagName.toLowerCase()==="ebsr"||Array.from(e.querySelectorAll("*")).some(ur)}findChoices(e){const t=kr(e,"a"),r=kr(e,"b"),n=[];return t&&n.push(...this.mcAdapter.findChoices(t)),r&&n.push(...this.mcAdapter.findChoices(r)),n}createChoiceRange(e){return this.mcAdapter.createChoiceRange(e)}getChoiceId(e){return`${vs(e)?.id||"unknown"}-${this.mcAdapter.getChoiceId(e)}`}getChoiceLabel(e){return this.mcAdapter.getChoiceLabel(e)}isSelected(e){return this.mcAdapter.isSelected(e)}canEliminate(e){return this.mcAdapter.canEliminate(e)}setSelectable(e,t){this.mcAdapter.setSelectable(e,t)}getButtonContainer(e){return this.mcAdapter.getButtonContainer(e)}},ms=class{constructor(){l(this,"elementType","inline-dropdown"),l(this,"priority",90)}canHandle(e){return e.tagName.toLowerCase()==="inline-dropdown"||e.querySelector('[role="combobox"]')!==null}findChoices(e){return Array.from(e.querySelectorAll('[role="option"]'))}createChoiceRange(e){const t=document.createRange();return t.selectNodeContents(e),t}getChoiceId(e){return e.id||e.getAttribute("data-value")||""}getChoiceLabel(e){return e.textContent?.trim()||"Unlabeled option"}canEliminate(e){return e.getAttribute("aria-selected")!=="true"}getButtonContainer(e){return e}},gs=class{constructor(){l(this,"adapters",void 0),this.adapters=[new ut,new ps,new ms].sort((e,t)=>t.priority-e.priority)}findAdapter(e){return this.adapters.find(t=>t.canHandle(e))||null}findAllChoicesWithAdapters(e){const t=[],r=new Set;for(const n of this.adapters){const i=n.findChoices(e);for(const s of i)r.has(s)||(r.add(s),t.push({choice:s,adapter:n}))}return t}registerAdapter(e){this.adapters.push(e),this.adapters.sort((t,r)=>r.priority-t.priority)}},Ht=class W{constructor(){l(this,"name","mask"),l(this,"highlights",new Map),l(this,"ranges",new Map),l(this,"fallbackContainers",new Map)}initialize(){}destroy(){this.clearAll()}apply(t,r){if(!this.isSupported()){this.applyFallback(t,r);return}this.injectHighlightCSS(t);const n=new Highlight(r);CSS.highlights.set(`${W.HIGHLIGHT_NAME_PREFIX}${t}`,n),this.highlights.set(t,n),this.ranges.set(t,r),this.addAriaAttributes(r)}remove(t){if(!this.isSupported()){this.removeFallback(t);return}CSS.highlights.delete(`${W.HIGHLIGHT_NAME_PREFIX}${t}`),this.removeHighlightCSS(t);const r=this.ranges.get(t);r&&this.removeAriaAttributes(r),this.highlights.delete(t),this.ranges.delete(t),this.fallbackContainers.delete(t)}isEliminated(t){return this.highlights.has(t)||this.fallbackContainers.has(t)}clearAll(){for(const t of this.getEliminatedIds())this.remove(t);this.fallbackContainers.clear()}getEliminatedIds(){return Array.from(new Set([...this.highlights.keys(),...this.fallbackContainers.keys()]))}isSupported(){return typeof CSS<"u"&&"highlights"in CSS}injectHighlightCSS(t){const r=`${W.HIGHLIGHT_STYLE_PREFIX}${t}`;if(document.getElementById(r))return;const n=document.createElement("style");n.id=r,n.textContent=`
|
|
3
|
+
::highlight(pie-answer-masked-${t}) {
|
|
4
|
+
opacity: 0.2;
|
|
5
|
+
filter: blur(2px);
|
|
6
|
+
}
|
|
7
|
+
`,document.head.appendChild(n)}removeHighlightCSS(t){document.getElementById(`${W.HIGHLIGHT_STYLE_PREFIX}${t}`)?.remove()}addAriaAttributes(t){const r=this.findChoiceContainer(t);r&&(r.setAttribute(W.ELIMINATED_ATTR,"true"),r.setAttribute("aria-hidden","true"))}removeAriaAttributes(t){const r=this.findChoiceContainer(t);r&&(r.removeAttribute(W.ELIMINATED_ATTR),r.removeAttribute("aria-hidden"))}findChoiceContainer(t){let r=t.startContainer;for(r.nodeType===Node.TEXT_NODE&&(r=r.parentElement);r&&r!==document.body;){if(r.getAttribute(W.CHOICE_HOOK_ATTR)==="true")return r;r=r.parentElement}return null}applyFallback(t,r){const n=this.findChoiceContainer(r);n&&(n.classList.add(W.FALLBACK_CLASS),n.setAttribute(W.ELIMINATED_ATTR,"true"),n.setAttribute(W.ELIMINATED_ID_ATTR,t),this.fallbackContainers.set(t,n),this.addAriaAttributes(r))}removeFallback(t){const r=this.fallbackContainers.get(t);if(!r)return;r.classList.remove(W.FALLBACK_CLASS),r.removeAttribute(W.ELIMINATED_ATTR),r.removeAttribute(W.ELIMINATED_ID_ATTR);const n=document.createRange();n.selectNodeContents(r),this.removeAriaAttributes(n),this.fallbackContainers.delete(t)}};l(Ht,"HIGHLIGHT_STYLE_PREFIX","pie-answer-eliminator-mask-highlight-");l(Ht,"HIGHLIGHT_NAME_PREFIX","pie-answer-masked-");l(Ht,"FALLBACK_CLASS","pie-answer-masked-fallback");l(Ht,"CHOICE_HOOK_ATTR","data-pie-answer-eliminator-choice");l(Ht,"ELIMINATED_ATTR","data-pie-answer-eliminated");l(Ht,"ELIMINATED_ID_ATTR","data-pie-answer-eliminated-id");var _=class m{constructor(){l(this,"name","strikethrough"),l(this,"highlights",new Map),l(this,"ranges",new Map),l(this,"fallbackContainers",new Map),l(this,"imageWrappers",new Map),l(this,"mathTargets",new Map)}initialize(){this.isSupported()||console.warn("CSS Custom Highlight API not supported, using fallback")}destroy(){this.clearAll()}apply(t,r){if(this.isSupported()){this.injectHighlightCSS(t);const n=new Highlight(r);CSS.highlights.set(`${m.HIGHLIGHT_NAME_PREFIX}${t}`,n),this.highlights.set(t,n),this.ranges.set(t,r),this.addAriaAttributes(r)}else this.applyFallback(t,r);this.strikeImages(t,r),this.strikeMath(t,r)}remove(t){if(this.unstrikeImages(t),this.unstrikeMath(t),!this.isSupported()){this.removeFallback(t);return}CSS.highlights.delete(`${m.HIGHLIGHT_NAME_PREFIX}${t}`),this.removeHighlightCSS(t);const r=this.ranges.get(t);r&&this.removeAriaAttributes(r),this.highlights.delete(t),this.ranges.delete(t),this.fallbackContainers.delete(t)}isEliminated(t){return this.highlights.has(t)||this.fallbackContainers.has(t)}clearAll(){const t=new Set([...this.highlights.keys(),...this.fallbackContainers.keys(),...this.imageWrappers.keys(),...this.mathTargets.keys()]);for(const r of t)this.remove(r);this.fallbackContainers.clear(),this.imageWrappers.clear(),this.mathTargets.clear()}getEliminatedIds(){return Array.from(new Set([...this.highlights.keys(),...this.fallbackContainers.keys()]))}isSupported(){return typeof CSS<"u"&&"highlights"in CSS}injectHighlightCSS(t){const r=`${m.HIGHLIGHT_STYLE_PREFIX}${t}`;if(document.getElementById(r))return;const n=document.createElement("style");n.id=r,n.textContent=`
|
|
8
|
+
::highlight(pie-answer-eliminated-${t}) {
|
|
9
|
+
text-decoration: line-through;
|
|
10
|
+
text-decoration-thickness: 2px;
|
|
11
|
+
text-decoration-color: var(--pie-answer-eliminator-strike-color, var(--pie-incorrect, #ff9800));
|
|
12
|
+
}
|
|
13
|
+
`,document.head.appendChild(n)}removeHighlightCSS(t){document.getElementById(`${m.HIGHLIGHT_STYLE_PREFIX}${t}`)?.remove()}addAriaAttributes(t){const r=this.findChoiceContainer(t);if(!r)return;r.setAttribute(m.ELIMINATED_ATTR,"true"),r.setAttribute("aria-disabled","true");const n=this.resolveLabelElement(r);if(n&&!n.querySelector(`.${m.SR_CLASS}`)){const i=document.createElement("span");i.className=m.SR_CLASS,i.textContent=" (eliminated)",n.appendChild(i)}}removeAriaAttributes(t){const r=this.findChoiceContainer(t);r&&(r.removeAttribute(m.ELIMINATED_ATTR),r.removeAttribute("aria-disabled"),r.querySelector(`.${m.SR_CLASS}`)?.remove())}findChoiceContainer(t){let r=t.startContainer;for(r.nodeType===Node.TEXT_NODE&&(r=r.parentElement);r&&r!==document.body;){if(r.getAttribute(m.CHOICE_HOOK_ATTR)==="true")return r;r=r.parentElement}return null}applyFallback(t,r){const n=this.findChoiceContainer(r);n&&(n.classList.add(m.FALLBACK_CLASS),n.setAttribute(m.ELIMINATED_ATTR,"true"),n.setAttribute(m.ELIMINATED_ID_ATTR,t),this.fallbackContainers.set(t,n),this.addAriaAttributes(r))}removeFallback(t){const r=this.fallbackContainers.get(t);if(!r)return;r.classList.remove(m.FALLBACK_CLASS),r.removeAttribute(m.ELIMINATED_ATTR),r.removeAttribute(m.ELIMINATED_ID_ATTR);const n=document.createRange();n.selectNodeContents(r),this.removeAriaAttributes(n),this.fallbackContainers.delete(t)}strikeImages(t,r){const n=this.resolveImageScope(r);if(!n)return;const i=[];for(const s of Array.from(n.querySelectorAll("img"))){const o=this.wrapImage(s);o&&i.push(o)}i.length>0&&this.imageWrappers.set(t,i)}unstrikeImages(t){const r=this.imageWrappers.get(t);if(r){for(const n of r)this.unwrapImage(n);this.imageWrappers.delete(t)}}strikeMath(t,r){const n=this.resolveImageScope(r);if(!n)return;const i=[];for(const s of n.querySelectorAll(m.MATH_SELECTOR)){const o=s.querySelector(m.MATH_BOX_SELECTOR)??s,u=!!o.querySelector(m.MATH_STACKED_SELECTOR);o.classList.add(m.MATH_STRIKE_CLASS,u?m.MATH_STRIKE_CROSS_CLASS:m.MATH_STRIKE_LINE_CLASS),o.setAttribute(m.MATH_STRIKE_ATTR,u?"cross":"line"),i.push(o)}i.length>0&&this.mathTargets.set(t,i)}unstrikeMath(t){const r=this.mathTargets.get(t);if(r){for(const n of r)n.classList.remove(m.MATH_STRIKE_CLASS,m.MATH_STRIKE_LINE_CLASS,m.MATH_STRIKE_CROSS_CLASS),n.removeAttribute(m.MATH_STRIKE_ATTR);this.mathTargets.delete(t)}}resolveImageScope(t){const r=t.commonAncestorContainer;return(r.nodeType===Node.TEXT_NODE?r.parentElement:r)??this.findChoiceContainer(t)}wrapImage(t){const r=t.parentElement;if(!r)return null;if(r.classList.contains(m.IMAGE_WRAPPER_CLASS)||r.hasAttribute(m.IMAGE_WRAPPER_ATTR))return r;const n=document.createElement("span");return n.className=m.IMAGE_WRAPPER_CLASS,n.setAttribute(m.IMAGE_WRAPPER_ATTR,"true"),this.fillsParentWidth(t,r)?n.style.display="block":m.BLOCK_DISPLAYS.has(getComputedStyle(t).display)&&(n.style.display="block",n.style.width="fit-content"),r.insertBefore(n,t),n.appendChild(t),n.appendChild(this.createImageStrikeOverlay()),n}fillsParentWidth(t,r){const n=t.getBoundingClientRect().width,i=r.clientWidth;return n===0||i===0?!1:n>=i-1}unwrapImage(t){t.querySelector(`.${m.IMAGE_OVERLAY_CLASS}`)?.remove();const r=t.parentElement;if(r){for(;t.firstChild;)r.insertBefore(t.firstChild,t);t.remove()}}createImageStrikeOverlay(){const t=document.createElementNS(m.SVG_NS,"svg");t.setAttribute("class",m.IMAGE_OVERLAY_CLASS),t.setAttribute("viewBox","0 0 100 100"),t.setAttribute("preserveAspectRatio","none"),t.setAttribute("aria-hidden","true"),t.setAttribute("focusable","false");const r=[{x1:"0",y1:"0",x2:"100",y2:"100"},{x1:"0",y1:"100",x2:"100",y2:"0"}];for(const n of[m.IMAGE_CASING_CLASS,m.IMAGE_LINE_CLASS])for(const{x1:i,y1:s,x2:o,y2:u}of r){const h=document.createElementNS(m.SVG_NS,"line");h.setAttribute("class",n),h.setAttribute("x1",i),h.setAttribute("y1",s),h.setAttribute("x2",o),h.setAttribute("y2",u),h.setAttribute("vector-effect","non-scaling-stroke"),t.appendChild(h)}return t}resolveLabelElement(t){return t.querySelector(`[${m.LABEL_HOOK_ATTR}="true"]`)||t.querySelector("label")}};l(_,"HIGHLIGHT_STYLE_PREFIX","pie-answer-eliminator-highlight-");l(_,"HIGHLIGHT_NAME_PREFIX","pie-answer-eliminated-");l(_,"FALLBACK_CLASS","pie-answer-eliminator-eliminated-fallback");l(_,"SR_CLASS","pie-answer-eliminator-sr-announcement");l(_,"CHOICE_HOOK_ATTR","data-pie-answer-eliminator-choice");l(_,"LABEL_HOOK_ATTR","data-pie-answer-eliminator-label");l(_,"ELIMINATED_ATTR","data-pie-answer-eliminated");l(_,"ELIMINATED_ID_ATTR","data-pie-answer-eliminated-id");l(_,"IMAGE_WRAPPER_CLASS","pie-answer-eliminator-image-strike");l(_,"IMAGE_WRAPPER_ATTR","data-pie-answer-eliminator-image-strike");l(_,"IMAGE_OVERLAY_CLASS","pie-answer-eliminator-image-strike-overlay");l(_,"IMAGE_LINE_CLASS","pie-answer-eliminator-image-strike-line");l(_,"IMAGE_CASING_CLASS","pie-answer-eliminator-image-strike-casing");l(_,"MATH_STRIKE_CLASS","pie-answer-eliminator-math-strike");l(_,"MATH_STRIKE_LINE_CLASS","pie-answer-eliminator-math-strike--line");l(_,"MATH_STRIKE_CROSS_CLASS","pie-answer-eliminator-math-strike--cross");l(_,"MATH_STRIKE_ATTR","data-pie-answer-eliminator-math-strike");l(_,"MATH_STACKED_SELECTOR","mjx-mfrac, mjx-mtable");l(_,"MATH_BOX_SELECTOR","mjx-math");l(_,"MATH_SELECTOR","mjx-container");l(_,"SVG_NS","http://www.w3.org/2000/svg");l(_,"BLOCK_DISPLAYS",new Set(["block","flex","grid","table","flow-root","list-item"]));var Lr="answerEliminator",hr=class ge{constructor(t="strikethrough",r="right"){l(this,"registry",void 0),l(this,"strategy",void 0),l(this,"choices",new Map),l(this,"eliminated",new Set),l(this,"strategyKeys",new Map),l(this,"anonymousGroups",new WeakMap),l(this,"nextToken",0),l(this,"buttonAlignment","right"),l(this,"shouldRestoreState",!0),l(this,"active",!0),l(this,"questionRoot",null),l(this,"selectionChangeHandler",null),l(this,"selectionObserver",null),l(this,"selectionRefreshFrame",null),l(this,"store",null),l(this,"elementStateKeys",{}),this.registry=new gs,this.strategy=this.createStrategy(t),this.strategy.initialize(),this.buttonAlignment=r}createStrategy(t){return t==="mask"?new Ht:new _}initializeForQuestion(t){this.active=!0;const r=new Set(this.eliminated);this.restoreAllSelectable(),this.strategy.clearAll(),this.eliminated.clear(),this.cleanupButtons();const n=this.registry.findAllChoicesWithAdapters(t);for(const{choice:s,adapter:o}of n)this.initializeChoice(s,o,t);const i=this.readPersistedEliminations();for(const[s,o]of this.choices)(i.has(o.group)?i.get(o.group)?.has(o.choiceId):r.has(s))&&this.applyElimination(s,o);this.attachSelectionListener(t)}trackingKey(t,r){return`${t}\0${r}`}resolveGroup(t,r){let n=null;for(let o=t.parentElement;o!==null;o=o===r?null:o.parentElement){if(o.id&&Object.hasOwn(this.elementStateKeys,o.id))return o.id;n===null&&o.localName.includes("-")&&(n=o)}const i=n??r;let s=this.anonymousGroups.get(i);return s||(s=`\0anonymous-${this.nextToken++}`,this.anonymousGroups.set(i,s)),s}strategyKeyFor(t){let r=this.strategyKeys.get(t);return r||(r=`choice-${this.nextToken++}`,this.strategyKeys.set(t,r)),r}initializeChoice(t,r,n){const i=r.getChoiceId(t),s=this.resolveGroup(t,n),o=this.trackingKey(s,i),u={choiceId:i,group:s,strategyKey:this.strategyKeyFor(o),element:t,adapter:r,button:null};this.choices.set(o,u);const h=this.createToggleButton(o,u);u.button=h,this.updateButtonVisibility(o);const c=r.getButtonContainer(t);c&&(c.style.position="relative",c.appendChild(h))}createToggleButton(t,r){const n=r.adapter.getChoiceLabel(r.element),i=document.createElement("button");i.type="button",i.className=ge.TOGGLE_CLASS,i.setAttribute("aria-label",`Toggle elimination for ${n}`),i.setAttribute("aria-pressed","false"),i.setAttribute("data-choice-id",r.choiceId);const s=document.createElement("span");return s.setAttribute("aria-hidden","true"),s.textContent="⊗",i.appendChild(s),this.applyButtonAlignment(i),i.dataset.pieShownDisplay=i.style.display,i.addEventListener("click",o=>{o.preventDefault(),o.stopPropagation(),this.toggleElimination(t)}),i}toggleElimination(t){const r=this.choices.get(t);if(r){if(this.eliminated.has(t))this.restoreChoice(t);else{if(!r.adapter.canEliminate(r.element)){console.warn("Cannot eliminate this choice (already selected or in evaluate mode)");return}if(!this.applyElimination(t,r)){console.error("Failed to create range for choice");return}}this.saveState(r.group)}}applyElimination(t,r){if(r.adapter.isSelected?.(r.element))return!1;const n=r.adapter.createChoiceRange(r.element);return n?(this.strategy.apply(r.strategyKey,n),this.eliminated.add(t),r.adapter.setSelectable?.(r.element,!1),r.button&&(r.button.classList.add(ge.TOGGLE_ACTIVE_CLASS),r.button.setAttribute("aria-pressed","true")),this.updateButtonVisibility(t),!0):!1}restoreChoice(t){const r=this.choices.get(t);this.eliminated.delete(t),r&&(this.strategy.remove(r.strategyKey),r.adapter.setSelectable?.(r.element,!0),r.button&&(r.button.classList.remove(ge.TOGGLE_ACTIVE_CLASS),r.button.setAttribute("aria-pressed","false")),this.updateButtonVisibility(t))}resetAll(){if(this.eliminated.size===0)return;const t=new Set;for(const r of Array.from(this.eliminated)){const n=this.choices.get(r)?.group;n!==void 0&&t.add(n),this.restoreChoice(r)}for(const r of t)this.saveState(r)}getEliminatedCount(){return this.eliminated.size}setStoreIntegration(t,r){this.store=t,this.elementStateKeys=r}saveState(t){if(!this.store||!Object.hasOwn(this.elementStateKeys,t))return;const r=[];for(const n of this.eliminated){const i=this.choices.get(n);i?.group===t&&r.push(i.choiceId)}this.store.setState(this.elementStateKeys[t],Lr,{eliminatedChoices:r})}readPersistedEliminations(){const t=new Map;if(!this.store||!this.shouldRestoreState)return t;for(const{group:r}of this.choices.values())if(!(t.has(r)||!Object.hasOwn(this.elementStateKeys,r)))try{const n=this.store.getState(this.elementStateKeys[r],Lr),i=Array.isArray(n?.eliminatedChoices)?n.eliminatedChoices.filter(s=>typeof s=="string"):[];t.set(r,new Set(i))}catch(n){console.error("Failed to restore eliminator state:",n)}return t}restoreAllSelectable(){for(const t of this.eliminated){const r=this.choices.get(t);r?.adapter.setSelectable?.(r.element,!0)}}setButtonHidden(t,r){const n=r?"none":t.dataset.pieShownDisplay??"";t.style.display!==n&&(t.style.display=n)}shouldHideButton(t,r){return this.eliminated.has(t)?!1:this.active?r.adapter.isSelected?.(r.element)??!1:!0}updateButtonVisibility(t){const r=this.choices.get(t);r?.button&&this.setButtonHidden(r.button,this.shouldHideButton(t,r))}refreshSelectionState(){for(const t of this.choices.keys())this.updateButtonVisibility(t)}scheduleSelectionRefresh(){this.selectionRefreshFrame===null&&(this.selectionRefreshFrame=requestAnimationFrame(()=>{this.selectionRefreshFrame=null,this.refreshSelectionState()}))}attachSelectionListener(t){this.detachSelectionListener(),this.questionRoot=t,this.selectionChangeHandler=()=>this.scheduleSelectionRefresh(),t.addEventListener("change",this.selectionChangeHandler),typeof MutationObserver<"u"&&(this.selectionObserver=new MutationObserver(r=>{const n=new Set;for(const{button:i}of this.choices.values())i&&n.add(i);r.some(i=>!n.has(i.target))&&this.scheduleSelectionRefresh()}),this.selectionObserver.observe(t,{subtree:!0,childList:!0,attributes:!0}))}detachSelectionListener(){this.selectionRefreshFrame!==null&&(cancelAnimationFrame(this.selectionRefreshFrame),this.selectionRefreshFrame=null),this.selectionObserver&&(this.selectionObserver.disconnect(),this.selectionObserver=null),this.questionRoot&&this.selectionChangeHandler&&this.questionRoot.removeEventListener("change",this.selectionChangeHandler),this.questionRoot=null,this.selectionChangeHandler=null}cleanupButtons(){this.detachSelectionListener();for(const{button:t}of this.choices.values())t?.remove();this.choices.clear()}applyButtonAlignment(t){switch(this.buttonAlignment){case"right":Object.assign(t.style,{position:"absolute",right:"8px",top:"50%",transform:"translateY(-50%)"});break;case"left":Object.assign(t.style,{position:"absolute",left:"8px",top:"50%",transform:"translateY(-50%)"});break;case"inline":Object.assign(t.style,{position:"relative",marginLeft:"8px",marginRight:"8px",display:"inline-flex",verticalAlign:"middle"})}}enableStateRestoration(){this.shouldRestoreState=!0}disableStateRestoration(){this.shouldRestoreState=!1}cleanup(){this.active=!1,this.refreshSelectionState()}destroy(){this.restoreAllSelectable(),this.eliminated.clear(),this.cleanupButtons(),this.strategy.destroy()}};l(hr,"TOGGLE_CLASS","pie-answer-eliminator-toggle");l(hr,"TOGGLE_ACTIVE_CLASS","pie-answer-eliminator-toggle--active");var ys=Xi('<div style="display: none;" aria-hidden="true"></div>');function bs(e,t){Gr(t,!0);let r=bt(t,"visible",7,!1),n=bt(t,"toolId",7,"answerEliminator"),i=bt(t,"strategy",7,"strikethrough"),s=bt(t,"alwaysOn",7,!1),o=bt(t,"buttonAlignment",7,"right"),u=bt(t,"scopeElement",7,null),h=bt(t,"elementStateKeys",23,()=>({})),c=D(null),f=D(null),v=D(null);const S=xe(()=>y(f)?.toolCoordinator),b=xe(()=>y(f)?.elementToolStateStore??null);let p=D(null),E=D(null);const z=Ln("Answer Eliminator",Hn.MODAL);let O=xe(()=>s()||r());wt(()=>{if(y(c))return Mn(y(c),T=>{x(f,T,!0)})}),wt(()=>{if(y(c))return In(y(c),T=>{x(v,T,!0)})});function G(){return u()||y(v)?.scopeElement||null}function P(){if(!y(O)||!y(p))return;const T=G();if(!T){console.warn("[AnswerEliminator] Missing shell scope context for question root");return}y(p).initializeForQuestion(T)}function H(){requestAnimationFrame(()=>{requestAnimationFrame(()=>{P()})})}wt(()=>z.sync(y(S),n())),wt(()=>{y(p)?.setStoreIntegration(y(b),h()??{})}),is(()=>(x(p,new hr(i(),o()),!0),y(p).setStoreIntegration(y(b),h()??{}),y(O)?P():y(p).cleanup(),()=>{y(p)?.destroy(),x(p,null),z.release()})),wt(()=>{const T=y(v)?.contextVersion??null;if(T!==null){if(y(E)===null){x(E,T,!0);return}T!==y(E)&&(x(E,T,!0),H())}}),wt(()=>{y(p)&&(y(O)?(y(p).enableStateRestoration(),P()):y(p).cleanup())});var xt={get visible(){return r()},set visible(T=!1){r(T),dt()},get toolId(){return n()},set toolId(T="answerEliminator"){n(T),dt()},get strategy(){return i()},set strategy(T="strikethrough"){i(T),dt()},get alwaysOn(){return s()},set alwaysOn(T=!1){s(T),dt()},get buttonAlignment(){return o()},set buttonAlignment(T="right"){o(T),dt()},get scopeElement(){return u()},set scopeElement(T=null){u(T),dt()},get elementStateKeys(){return h()},set elementStateKeys(T={}){h(T),dt()}},Xt=ys();return os(Xt,T=>x(c,T),()=>y(c)),bn(e,Xt),Pr(xt)}As("pie-tool-answer-eliminator",fs(bs,{visible:{attribute:"visible",type:"Boolean"},toolId:{attribute:"tool-id",type:"String"},strategy:{attribute:"strategy",type:"String"},alwaysOn:{attribute:"always-on",type:"Boolean"},buttonAlignment:{attribute:"button-alignment",type:"String"},scopeElement:{type:"Object"},elementStateKeys:{type:"Object"}},[],[],{mode:"open"},Rn));function As(e,t){customElements.get(e)||customElements.define(e,t)}export{bs as default};
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import{t as Ve}from"./defineProperty-a20a667d.js";import{a as ta,m as ia,r as oa}from"./tool-host-contract-b93b482c.js";import{t as na}from"./focus-trap-44913bf3.js";import{i as aa}from"./provider-4c704118.js";import{t as ca}from"./ToolCoordinator-cc2dc319.js";function sa(e){try{return typeof localStorage>"u"?null:localStorage.getItem(e)}catch{return null}}var la={"--pie-answer-eliminator-strike-color":"optional","--pie-background":"required","--pie-background-dark":"required","--pie-black":"required","--pie-blue-grey-100":"required","--pie-blue-grey-300":"required","--pie-blue-grey-600":"required","--pie-blue-grey-900":"required","--pie-border":"required","--pie-border-dark":"required","--pie-border-gray":"required","--pie-border-light":"required","--pie-button-active-bg":"required","--pie-button-background-color":"excluded","--pie-button-bg":"required","--pie-button-border":"required","--pie-button-color":"required","--pie-button-focus-outline":"required","--pie-button-hover-background-color":"excluded","--pie-button-hover-bg":"required","--pie-button-hover-border":"required","--pie-button-hover-color":"required","--pie-calculator-series-1":"optional","--pie-calculator-series-2":"optional","--pie-calculator-series-3":"optional","--pie-calculator-series-4":"optional","--pie-calculator-series-5":"optional","--pie-calculator-series-6":"optional","--pie-content-styles":"excluded","--pie-content-emphasis":"required","--pie-correct":"required","--pie-correct-icon":"required","--pie-correct-secondary":"required","--pie-correct-tertiary":"required","--pie-disabled":"required","--pie-disabled-secondary":"required","--pie-disabled-text":"required","--pie-dropdown-background":"required","--pie-surface":"required","--pie-faded-primary":"required","--pie-fixed-hue-collapse":"required","--pie-focus-checked":"required","--pie-focus-checked-border":"required","--pie-focus-outline":"excluded","--pie-focus-ring-color":"excluded","--pie-focus-unchecked":"required","--pie-focus-unchecked-border":"required","--pie-font-scale":"excluded","--pie-incorrect":"required","--pie-incorrect-icon":"required","--pie-incorrect-secondary":"required","--pie-missing":"required","--pie-missing-icon":"required","--pie-passage-header-background":"optional","--pie-primary":"required","--pie-primary-dark":"required","--pie-primary-light":"required","--pie-scrollbar-thumb":"excluded","--pie-scrollbar-thumb-hover":"excluded","--pie-scrollbar-track":"excluded","--pie-secondary":"required","--pie-secondary-background":"required","--pie-secondary-dark":"required","--pie-secondary-light":"required","--pie-section-player-card-header-background":"optional","--pie-section-player-card-header-background-dark":"optional","--pie-section-player-card-header-radius":"excluded","--pie-section-player-card-radius":"excluded","--pie-section-player-item-media-aspect-ratio":"excluded","--pie-section-player-item-media-min-height":"excluded","--pie-section-player-item-media-max-height":"excluded","--pie-section-player-layout-max-width":"excluded","--pie-section-player-tab-active-background":"optional","--pie-section-player-tab-active-color":"optional","--pie-section-player-tab-background":"optional","--pie-section-player-tab-color":"optional","--pie-section-player-tab-gap":"excluded","--pie-section-player-tab-padding-block":"excluded","--pie-section-player-tab-track-padding":"excluded","--pie-section-player-tab-track-radius":"excluded","--pie-section-player-tab-zoom-comp":"excluded","--pie-tertiary":"required","--pie-tertiary-light":"required","--pie-text":"required","--pie-annotation-underline":"required","--pie-annotation-underline-dark":"required","--pie-tool-annotation-toolbar-border":"required","--pie-tool-line-reader-control-color":"excluded","--pie-tool-line-reader-frame-color":"excluded","--pie-tool-line-reader-frame-opacity":"excluded","--pie-tool-trigger-active-background":"optional","--pie-tool-trigger-active-border-color":"optional","--pie-tool-trigger-active-color":"optional","--pie-toolbar-tools-row-height":"excluded","--pie-tts-controls-row-height":"excluded","--pie-tts-line-highlight":"excluded","--pie-tts-sentence-highlight":"excluded","--pie-tts-word-highlight":"excluded","--pie-tts-word-shadow":"excluded","--pie-tts-word-underline":"excluded","--pie-white":"required"};function lr(e){if(e&&typeof e=="object"&&!Object.isFrozen(e)){for(const r of Object.values(e))lr(r);Object.freeze(e)}return e}var Po={"--pie-text":"black","--pie-disabled":"grey","--pie-disabled-secondary":"#ababab","--pie-disabled-text":"#666666","--pie-correct":"#208537","--pie-correct-secondary":"#e8f5e9","--pie-correct-tertiary":"#087d38","--pie-correct-icon":"#087d38","--pie-incorrect":"#a65f00","--pie-content-emphasis":"#b00000","--pie-incorrect-secondary":"#ffebee","--pie-incorrect-icon":"#bf0d00","--pie-missing":"#d32f2f","--pie-missing-icon":"#6a78a1","--pie-primary":"#3f51b5","--pie-primary-light":"#9fa8da","--pie-primary-dark":"#283593","--pie-faded-primary":"#dcdafb","--pie-secondary":"#f50057","--pie-secondary-light":"#f48fb1","--pie-secondary-dark":"#880e4f","--pie-tertiary":"#146eb3","--pie-tertiary-light":"#d0e2f0","--pie-background":"#ffffff","--pie-background-dark":"#ecedf1","--pie-secondary-background":"rgba(241, 241, 241, 1)","--pie-dropdown-background":"#e0e1e6","--pie-surface":"#ecedf1","--pie-border":"#8f8f8f","--pie-border-light":"#d1d1d1","--pie-border-dark":"#646464","--pie-border-gray":"#7e8494","--pie-black":"#000000","--pie-white":"#ffffff","--pie-focus-checked":"#bbdefb","--pie-focus-checked-border":"#1565c0","--pie-focus-unchecked":"#e0e0e0","--pie-focus-unchecked-border":"#757575","--pie-blue-grey-100":"#f3f5f7","--pie-blue-grey-300":"#81848f","--pie-blue-grey-600":"#7e8494","--pie-blue-grey-900":"#152452","--pie-font-scale":"1","--pie-button-bg":"#ffffff","--pie-button-border":"#8f8f8f","--pie-button-color":"#374151","--pie-button-hover-bg":"#f9fafb","--pie-button-hover-border":"#8b919c","--pie-button-hover-color":"#111827","--pie-button-active-bg":"#f3f4f6","--pie-button-focus-outline":"#3b82f6","--pie-fixed-hue-collapse":"0%"},ua={"--pie-annotation-underline":"#4221d5","--pie-annotation-underline-dark":"#9c89ec","--pie-tool-annotation-toolbar-border":"#5c5c5c"},fa={"--pie-text":"#ffffff","--pie-disabled":"#999999","--pie-disabled-secondary":"#777777","--pie-disabled-text":"#808080","--pie-correct":"#00ff00","--pie-correct-secondary":"#003300","--pie-correct-tertiary":"#00cc00","--pie-correct-icon":"#00ff00","--pie-incorrect":"#ff3333","--pie-content-emphasis":"#ff6666","--pie-incorrect-secondary":"#330000","--pie-incorrect-icon":"#ff0000","--pie-missing":"#ff6666","--pie-missing-icon":"#6666ff","--pie-primary":"#ffff00","--pie-primary-light":"#ffff99","--pie-primary-dark":"#cccc00","--pie-faded-primary":"#666600","--pie-secondary":"#ff00ff","--pie-secondary-light":"#ff99ff","--pie-secondary-dark":"#cc00cc","--pie-tertiary":"#00ffff","--pie-tertiary-light":"#99ffff","--pie-background":"#000000","--pie-background-dark":"#1a1a1a","--pie-secondary-background":"#222222","--pie-dropdown-background":"#2a2a2a","--pie-surface":"#2a2a2a","--pie-border":"#ffffff","--pie-border-light":"#cccccc","--pie-border-dark":"#ffffff","--pie-border-gray":"#aaaaaa","--pie-black":"#ffffff","--pie-white":"#000000","--pie-focus-checked":"#ffff00","--pie-focus-checked-border":"#ffff00","--pie-focus-unchecked":"#666666","--pie-focus-unchecked-border":"#ffffff","--pie-blue-grey-100":"#2a2a2a","--pie-blue-grey-300":"#686868","--pie-blue-grey-600":"#999999","--pie-blue-grey-900":"#ffffff","--pie-font-scale":"1","--pie-button-bg":"#1f2937","--pie-button-border":"#535e6d","--pie-button-color":"#f9fafb","--pie-button-hover-bg":"#374151","--pie-button-hover-border":"#6b7280","--pie-button-hover-color":"#ffffff","--pie-button-active-bg":"#4b5563","--pie-button-focus-outline":"#93c5fd","--pie-fixed-hue-collapse":"0%"},da={"--pie-annotation-underline":"#9c89ec","--pie-annotation-underline-dark":"#9c89ec","--pie-tool-annotation-toolbar-border":"#949494"},pa=lr({light:{...Po,...ua},dark:{...fa,...da}}),qo=lr([{id:"black-on-white",name:"Black on White",description:"High contrast for readability",variables:{"--pie-text":"#000000","--pie-disabled":"#666666","--pie-disabled-secondary":"#888888","--pie-disabled-text":"#666666","--pie-correct":"#006600","--pie-correct-secondary":"#ccffcc","--pie-correct-tertiary":"#008800","--pie-correct-icon":"#004400","--pie-incorrect":"#cc0000","--pie-content-emphasis":"#cc0000","--pie-incorrect-secondary":"#ffcccc","--pie-incorrect-icon":"#990000","--pie-missing":"#cc0000","--pie-missing-icon":"#000099","--pie-primary":"#0000cc","--pie-primary-light":"#6666ff","--pie-primary-dark":"#000088","--pie-faded-primary":"#ccccff","--pie-secondary":"#cc0066","--pie-secondary-light":"#ff99cc","--pie-secondary-dark":"#990044","--pie-tertiary":"#006699","--pie-tertiary-light":"#99ccff","--pie-background":"#ffffff","--pie-background-dark":"#f5f5f5","--pie-secondary-background":"#eeeeee","--pie-dropdown-background":"#e0e0e0","--pie-surface":"#e0e0e0","--pie-border":"#000000","--pie-border-light":"#666666","--pie-border-dark":"#000000","--pie-border-gray":"#555555","--pie-black":"#000000","--pie-white":"#ffffff","--pie-focus-checked":"#0066ff","--pie-focus-checked-border":"#0000cc","--pie-focus-unchecked":"#cccccc","--pie-focus-unchecked-border":"#000000","--pie-blue-grey-100":"#f5f5f5","--pie-blue-grey-300":"#848484","--pie-blue-grey-600":"#666666","--pie-blue-grey-900":"#000000","--pie-tool-annotation-toolbar-border":"var(--pie-border)","--pie-annotation-underline":"#4221d5","--pie-annotation-underline-dark":"#4221d5","--pie-button-bg":"#ffffff","--pie-button-border":"#666666","--pie-button-color":"#000000","--pie-button-hover-bg":"#f5f5f5","--pie-button-hover-border":"#000000","--pie-button-hover-color":"#000000","--pie-button-active-bg":"#eeeeee","--pie-button-focus-outline":"#0000cc","--pie-fixed-hue-collapse":"100%"}},{id:"white-on-black",name:"White on Black",description:"Inverse high contrast",variables:{"--pie-text":"#ffffff","--pie-disabled":"#999999","--pie-disabled-secondary":"#777777","--pie-disabled-text":"#808080","--pie-correct":"#00ff00","--pie-correct-secondary":"#003300","--pie-correct-tertiary":"#00cc00","--pie-correct-icon":"#00ff00","--pie-incorrect":"#ff3333","--pie-content-emphasis":"#ff3333","--pie-incorrect-secondary":"#330000","--pie-incorrect-icon":"#ff0000","--pie-missing":"#ff6666","--pie-missing-icon":"#6666ff","--pie-primary":"#ffff00","--pie-primary-light":"#ffff99","--pie-primary-dark":"#cccc00","--pie-faded-primary":"#666600","--pie-secondary":"#ff00ff","--pie-secondary-light":"#ff99ff","--pie-secondary-dark":"#cc00cc","--pie-tertiary":"#00ffff","--pie-tertiary-light":"#99ffff","--pie-background":"#000000","--pie-background-dark":"#1a1a1a","--pie-secondary-background":"#222222","--pie-dropdown-background":"#2a2a2a","--pie-surface":"#2a2a2a","--pie-border":"#ffffff","--pie-border-light":"#cccccc","--pie-border-dark":"#ffffff","--pie-border-gray":"#aaaaaa","--pie-black":"#ffffff","--pie-white":"#000000","--pie-focus-checked":"#ffff00","--pie-focus-checked-border":"#ffff00","--pie-focus-unchecked":"#666666","--pie-focus-unchecked-border":"#ffffff","--pie-blue-grey-100":"#2a2a2a","--pie-blue-grey-300":"#686868","--pie-blue-grey-600":"#999999","--pie-blue-grey-900":"#ffffff","--pie-tool-annotation-toolbar-border":"var(--pie-border)","--pie-annotation-underline":"#9c89ec","--pie-annotation-underline-dark":"#9c89ec","--pie-button-bg":"#000000","--pie-button-border":"#cccccc","--pie-button-color":"#ffffff","--pie-button-hover-bg":"#1a1a1a","--pie-button-hover-border":"#ffffff","--pie-button-hover-color":"#ffffff","--pie-button-active-bg":"#222222","--pie-button-focus-outline":"#ffff00","--pie-fixed-hue-collapse":"100%"}},{id:"rose-on-green",name:"Rose on Green",description:"Color blind friendly (protanopia/deuteranopia)",variables:{"--pie-text":"#3d0022","--pie-disabled":"#996677","--pie-disabled-secondary":"#bb8899","--pie-disabled-text":"#6f595e","--pie-correct":"#004400","--pie-correct-secondary":"#aaffaa","--pie-correct-tertiary":"#006600","--pie-correct-icon":"#003300","--pie-incorrect":"#aa0044","--pie-content-emphasis":"#aa0044","--pie-incorrect-secondary":"#ffccdd","--pie-incorrect-icon":"#880033","--pie-missing":"#aa0044","--pie-missing-icon":"#440044","--pie-primary":"#660044","--pie-primary-light":"#cc6699","--pie-primary-dark":"#440033","--pie-faded-primary":"#ddbbcc","--pie-secondary":"#880055","--pie-secondary-light":"#dd99bb","--pie-secondary-dark":"#550033","--pie-tertiary":"#770044","--pie-tertiary-light":"#dd99bb","--pie-background":"#ccffcc","--pie-background-dark":"#aaeedd","--pie-secondary-background":"#99ddbb","--pie-dropdown-background":"#88cc99","--pie-surface":"#88cc99","--pie-border":"#3d0022","--pie-border-light":"#663344","--pie-border-dark":"#220011","--pie-border-gray":"#664455","--pie-black":"#3d0022","--pie-white":"#ccffcc","--pie-focus-checked":"#880055","--pie-focus-checked-border":"#660044","--pie-focus-unchecked":"#aaddbb","--pie-focus-unchecked-border":"#3d0022","--pie-blue-grey-100":"#ccffdd","--pie-blue-grey-300":"#529475","--pie-blue-grey-600":"#668877","--pie-blue-grey-900":"#3d0022","--pie-tool-annotation-toolbar-border":"var(--pie-border)","--pie-annotation-underline":"#4221d5","--pie-annotation-underline-dark":"#4221d5","--pie-button-bg":"#ccffcc","--pie-button-border":"#663344","--pie-button-color":"#3d0022","--pie-button-hover-bg":"#aaeedd","--pie-button-hover-border":"#3d0022","--pie-button-hover-color":"#3d0022","--pie-button-active-bg":"#99ddbb","--pie-button-focus-outline":"#660044","--pie-fixed-hue-collapse":"100%"}},{id:"yellow-on-blue",name:"Yellow on Blue",description:"Strong contrast scheme",variables:{"--pie-text":"#ffff00","--pie-disabled":"#9999aa","--pie-disabled-secondary":"#aaaacc","--pie-disabled-text":"#999929","--pie-correct":"#00ff00","--pie-correct-secondary":"#003333","--pie-correct-tertiary":"#00cc00","--pie-correct-icon":"#00ff00","--pie-incorrect":"#ff6666","--pie-content-emphasis":"#ff6666","--pie-incorrect-secondary":"#331111","--pie-incorrect-icon":"#ff3333","--pie-missing":"#ff6666","--pie-missing-icon":"#99ff99","--pie-primary":"#ffff66","--pie-primary-light":"#ffffaa","--pie-primary-dark":"#cccc00","--pie-faded-primary":"#666633","--pie-secondary":"#ffaa00","--pie-secondary-light":"#ffcc66","--pie-secondary-dark":"#cc8800","--pie-tertiary":"#ffee00","--pie-tertiary-light":"#ffff99","--pie-background":"#000066","--pie-background-dark":"#000055","--pie-secondary-background":"#000044","--pie-dropdown-background":"#000033","--pie-surface":"#000033","--pie-border":"#ffff00","--pie-border-light":"#aaaa66","--pie-border-dark":"#cccc00","--pie-border-gray":"#8888aa","--pie-black":"#ffff00","--pie-white":"#000066","--pie-focus-checked":"#ffff00","--pie-focus-checked-border":"#cccc00","--pie-focus-unchecked":"#333366","--pie-focus-unchecked-border":"#ffff00","--pie-blue-grey-100":"#000055","--pie-blue-grey-300":"#6064ad","--pie-blue-grey-600":"#6666aa","--pie-blue-grey-900":"#ffff00","--pie-tool-annotation-toolbar-border":"var(--pie-border)","--pie-annotation-underline":"#9c89ec","--pie-annotation-underline-dark":"#9c89ec","--pie-button-bg":"#000066","--pie-button-border":"#aaaa66","--pie-button-color":"#ffff00","--pie-button-hover-bg":"#000055","--pie-button-hover-border":"#ffff00","--pie-button-hover-color":"#ffff00","--pie-button-active-bg":"#000044","--pie-button-focus-outline":"#ffff66","--pie-fixed-hue-collapse":"100%"}},{id:"black-on-rose",name:"Black on Rose",description:"Warm tinted background",variables:{"--pie-text":"#000000","--pie-disabled":"#666666","--pie-disabled-secondary":"#888888","--pie-disabled-text":"#665258","--pie-correct":"#006600","--pie-correct-secondary":"#ccffcc","--pie-correct-tertiary":"#007000","--pie-correct-icon":"#004400","--pie-incorrect":"#990000","--pie-content-emphasis":"#990000","--pie-incorrect-secondary":"#ffdddd","--pie-incorrect-icon":"#770000","--pie-missing":"#990000","--pie-missing-icon":"#000099","--pie-primary":"#880044","--pie-primary-light":"#dd6699","--pie-primary-dark":"#550033","--pie-faded-primary":"#ffccdd","--pie-secondary":"#aa0055","--pie-secondary-light":"#ff99cc","--pie-secondary-dark":"#770033","--pie-tertiary":"#990044","--pie-tertiary-light":"#ffaacc","--pie-background":"#ffccdd","--pie-background-dark":"#ffb3cc","--pie-secondary-background":"#ff99bb","--pie-dropdown-background":"#ff88aa","--pie-surface":"#ff88aa","--pie-border":"#000000","--pie-border-light":"#555555","--pie-border-dark":"#000000","--pie-border-gray":"#444444","--pie-black":"#000000","--pie-white":"#ffccdd","--pie-focus-checked":"#880044","--pie-focus-checked-border":"#550033","--pie-focus-unchecked":"#ffddee","--pie-focus-unchecked-border":"#000000","--pie-blue-grey-100":"#ffeef5","--pie-blue-grey-300":"#a8637b","--pie-blue-grey-600":"#cc6688","--pie-blue-grey-900":"#000000","--pie-tool-annotation-toolbar-border":"var(--pie-border)","--pie-annotation-underline":"#4221d5","--pie-annotation-underline-dark":"#4221d5","--pie-button-bg":"#ffccdd","--pie-button-border":"#555555","--pie-button-color":"#000000","--pie-button-hover-bg":"#ffb3cc","--pie-button-hover-border":"#000000","--pie-button-hover-color":"#000000","--pie-button-active-bg":"#ff99bb","--pie-button-focus-outline":"#880044","--pie-fixed-hue-collapse":"100%"}},{id:"light-gray-on-dark-gray",name:"Light Gray on Dark Gray",description:"Reduced brightness for light sensitivity",variables:{"--pie-text":"#e0e0e0","--pie-disabled":"#999999","--pie-disabled-secondary":"#888888","--pie-disabled-text":"#a3a3a3","--pie-correct":"#00cc00","--pie-correct-secondary":"#003300","--pie-correct-tertiary":"#00bb00","--pie-correct-icon":"#00ff00","--pie-incorrect":"#ff6a6a","--pie-content-emphasis":"#ff6a6a","--pie-incorrect-secondary":"#331111","--pie-incorrect-icon":"#ff0000","--pie-missing":"#ff6a6a","--pie-missing-icon":"#6868ff","--pie-primary":"#aaaaaa","--pie-primary-light":"#cccccc","--pie-primary-dark":"#888888","--pie-faded-primary":"#555555","--pie-secondary":"#bbbbbb","--pie-secondary-light":"#dddddd","--pie-secondary-dark":"#999999","--pie-tertiary":"#cccccc","--pie-tertiary-light":"#eeeeee","--pie-background":"#333333","--pie-background-dark":"#2a2a2a","--pie-secondary-background":"#222222","--pie-dropdown-background":"#1a1a1a","--pie-surface":"#1a1a1a","--pie-border":"#e0e0e0","--pie-border-light":"#cccccc","--pie-border-dark":"#ffffff","--pie-border-gray":"#aaaaaa","--pie-black":"#e0e0e0","--pie-white":"#333333","--pie-focus-checked":"#cccccc","--pie-focus-checked-border":"#aaaaaa","--pie-focus-unchecked":"#555555","--pie-focus-unchecked-border":"#e0e0e0","--pie-blue-grey-100":"#2a2a2a","--pie-blue-grey-300":"#626262","--pie-blue-grey-600":"#999999","--pie-blue-grey-900":"#e0e0e0","--pie-tool-annotation-toolbar-border":"var(--pie-border)","--pie-annotation-underline":"#9c89ec","--pie-annotation-underline-dark":"#9c89ec","--pie-button-bg":"#333333","--pie-button-border":"#cccccc","--pie-button-color":"#e0e0e0","--pie-button-hover-bg":"#2a2a2a","--pie-button-hover-border":"#ffffff","--pie-button-hover-color":"#e0e0e0","--pie-button-active-bg":"#222222","--pie-button-focus-outline":"#aaaaaa","--pie-fixed-hue-collapse":"100%"}},{id:"grey-on-light-grey",name:"Grey on Light Grey",description:"Low-glare neutral palette",variables:{"--pie-text":"#4a4a4a","--pie-disabled":"#757575","--pie-disabled-secondary":"#8f8f8f","--pie-disabled-text":"#626262","--pie-correct":"#145c1e","--pie-correct-secondary":"#dde9de","--pie-correct-tertiary":"#1a7526","--pie-correct-icon":"#0e3f15","--pie-incorrect":"#8c1c1c","--pie-content-emphasis":"#8c1c1c","--pie-incorrect-secondary":"#eddcdc","--pie-incorrect-icon":"#6f1616","--pie-missing":"#8c1c1c","--pie-missing-icon":"#33406b","--pie-primary":"#3d3d3d","--pie-primary-light":"#6f6f6f","--pie-primary-dark":"#2b2b2b","--pie-faded-primary":"#dcdcdc","--pie-secondary":"#4a4a4a","--pie-secondary-light":"#8f8f8f","--pie-secondary-dark":"#2b2b2b","--pie-tertiary":"#3d3d3d","--pie-tertiary-light":"#c4c4c4","--pie-background":"#ebebeb","--pie-background-dark":"#dcdcdc","--pie-secondary-background":"#d0d0d0","--pie-dropdown-background":"#c4c4c4","--pie-surface":"#c4c4c4","--pie-border":"#4a4a4a","--pie-border-light":"#7a7a7a","--pie-border-dark":"#2b2b2b","--pie-border-gray":"#6f6f6f","--pie-black":"#4a4a4a","--pie-white":"#ebebeb","--pie-focus-checked":"#6f6f6f","--pie-focus-checked-border":"#3d3d3d","--pie-focus-unchecked":"#e0e0e0","--pie-focus-unchecked-border":"#4a4a4a","--pie-blue-grey-100":"#f0f0f0","--pie-blue-grey-300":"#bbbbbb","--pie-blue-grey-600":"#6f6f6f","--pie-blue-grey-900":"#2b2b2b","--pie-tool-annotation-toolbar-border":"var(--pie-border)","--pie-annotation-underline":"#4221d5","--pie-annotation-underline-dark":"#4221d5","--pie-button-bg":"#ebebeb","--pie-button-border":"#7a7a7a","--pie-button-color":"#4a4a4a","--pie-button-hover-bg":"#dcdcdc","--pie-button-hover-border":"#4a4a4a","--pie-button-hover-color":"#4a4a4a","--pie-button-active-bg":"#d0d0d0","--pie-button-focus-outline":"#3d3d3d","--pie-fixed-hue-collapse":"100%"}},{id:"purple-on-light-green",name:"Purple on Light Green",description:"Color blind friendly, low-glare background",variables:{"--pie-text":"#8e2464","--pie-disabled":"#5f7266","--pie-disabled-secondary":"#7c8f83","--pie-disabled-text":"#94386f","--pie-correct":"#14591f","--pie-correct-secondary":"#d8ecdc","--pie-correct-tertiary":"#1a7328","--pie-correct-icon":"#0e3d16","--pie-incorrect":"#8c1c1c","--pie-content-emphasis":"#8c1c1c","--pie-incorrect-secondary":"#f0dcdc","--pie-incorrect-icon":"#6f1616","--pie-missing":"#8c1c1c","--pie-missing-icon":"#33406b","--pie-primary":"#6d1a4c","--pie-primary-light":"#b3608e","--pie-primary-dark":"#4f1237","--pie-faded-primary":"#b8dcc3","--pie-secondary":"#a02b72","--pie-secondary-light":"#c76d9d","--pie-secondary-dark":"#6d1a4c","--pie-tertiary":"#8e2464","--pie-tertiary-light":"#e2c6d5","--pie-background":"#cce8d4","--pie-background-dark":"#b8dcc3","--pie-secondary-background":"#a6d0b2","--pie-dropdown-background":"#94c4a1","--pie-surface":"#a6d0b2","--pie-border":"#8e2464","--pie-border-light":"#a85a86","--pie-border-dark":"#4f1237","--pie-border-gray":"#5f7266","--pie-black":"#8e2464","--pie-white":"#cce8d4","--pie-focus-checked":"#8e2464","--pie-focus-checked-border":"#6d1a4c","--pie-focus-unchecked":"#dcefe2","--pie-focus-unchecked-border":"#8e2464","--pie-blue-grey-100":"#e2f2e7","--pie-blue-grey-300":"#a3cdaf","--pie-blue-grey-600":"#5f7266","--pie-blue-grey-900":"#4f1237","--pie-tool-annotation-toolbar-border":"var(--pie-border)","--pie-annotation-underline":"#4221d5","--pie-annotation-underline-dark":"#4221d5","--pie-button-bg":"#cce8d4","--pie-button-border":"#a85a86","--pie-button-color":"#8e2464","--pie-button-hover-bg":"#b8dcc3","--pie-button-hover-border":"#8e2464","--pie-button-hover-color":"#8e2464","--pie-button-active-bg":"#a6d0b2","--pie-button-focus-outline":"#6d1a4c","--pie-fixed-hue-collapse":"100%"}},{id:"black-on-violet",name:"Black on Violet",description:"Cool tinted background",variables:{"--pie-text":"#000000","--pie-disabled":"#5c5c5c","--pie-disabled-secondary":"#7a7a7a","--pie-disabled-text":"#4a3b4e","--pie-correct":"#0d4f16","--pie-correct-secondary":"#e0cfe6","--pie-correct-tertiary":"#0f4d17","--pie-correct-icon":"#093a0f","--pie-incorrect":"#7d1414","--pie-content-emphasis":"#7d1414","--pie-incorrect-secondary":"#eccfd0","--pie-incorrect-icon":"#5c0f0f","--pie-missing":"#7d1414","--pie-missing-icon":"#2b2b6b","--pie-primary":"#4a1259","--pie-primary-light":"#8e4fa1","--pie-primary-dark":"#330d3f","--pie-faded-primary":"#c795d3","--pie-secondary":"#6d1a7d","--pie-secondary-light":"#a95cb8","--pie-secondary-dark":"#4a1259","--pie-tertiary":"#4a1259","--pie-tertiary-light":"#e2cbe8","--pie-background":"#d4a9de","--pie-background-dark":"#c795d3","--pie-secondary-background":"#b982c8","--pie-dropdown-background":"#ac70bd","--pie-surface":"#ac70bd","--pie-border":"#000000","--pie-border-light":"#4a4a4a","--pie-border-dark":"#000000","--pie-border-gray":"#4a4a4a","--pie-black":"#000000","--pie-white":"#d4a9de","--pie-focus-checked":"#4a1259","--pie-focus-checked-border":"#330d3f","--pie-focus-unchecked":"#e2cbe8","--pie-focus-unchecked-border":"#000000","--pie-blue-grey-100":"#ece0f0","--pie-blue-grey-300":"#94649f","--pie-blue-grey-600":"#6d5c73","--pie-blue-grey-900":"#000000","--pie-tool-annotation-toolbar-border":"var(--pie-border)","--pie-annotation-underline":"#4221d5","--pie-annotation-underline-dark":"#4221d5","--pie-button-bg":"#d4a9de","--pie-button-border":"#4a4a4a","--pie-button-color":"#000000","--pie-button-hover-bg":"#c795d3","--pie-button-hover-border":"#000000","--pie-button-hover-color":"#000000","--pie-button-active-bg":"#b982c8","--pie-button-focus-outline":"#4a1259","--pie-fixed-hue-collapse":"100%"}},{id:"yellow-on-navy",name:"Yellow on Navy",description:"Strong contrast on a softened dark blue",variables:{"--pie-text":"#ffff55","--pie-disabled":"#9aa4bd","--pie-disabled-secondary":"#7d88a3","--pie-disabled-text":"#d6dc60","--pie-correct":"#7fe08a","--pie-correct-secondary":"#1d3a24","--pie-correct-tertiary":"#a0dda9","--pie-correct-icon":"#a8f0b0","--pie-incorrect":"#ffbebe","--pie-content-emphasis":"#ffbebe","--pie-incorrect-secondary":"#3d1d1d","--pie-incorrect-icon":"#ffb3b3","--pie-missing":"#ffbebe","--pie-missing-icon":"#b3c2ff","--pie-primary":"#ffff99","--pie-primary-light":"#ffffc2","--pie-primary-dark":"#e0e04a","--pie-faded-primary":"#2b4576","--pie-secondary":"#ffd95c","--pie-secondary-light":"#ffeaa0","--pie-secondary-dark":"#e0bb3d","--pie-tertiary":"#ffff99","--pie-tertiary-light":"#ffffcc","--pie-background":"#33508a","--pie-background-dark":"#2b4576","--pie-secondary-background":"#243a63","--pie-dropdown-background":"#1d2f50","--pie-surface":"#1d2f50","--pie-border":"#ffff55","--pie-border-light":"#c2c266","--pie-border-dark":"#e0e04a","--pie-border-gray":"#9aa4bd","--pie-black":"#ffff55","--pie-white":"#33508a","--pie-focus-checked":"#ffff55","--pie-focus-checked-border":"#e0e04a","--pie-focus-unchecked":"#243a63","--pie-focus-unchecked-border":"#ffff55","--pie-blue-grey-100":"#2b4576","--pie-blue-grey-300":"#5070af","--pie-blue-grey-600":"#9aa4bd","--pie-blue-grey-900":"#ffff55","--pie-tool-annotation-toolbar-border":"var(--pie-border)","--pie-annotation-underline":"var(--pie-primary)","--pie-annotation-underline-dark":"var(--pie-primary)","--pie-button-bg":"#33508a","--pie-button-border":"#c2c266","--pie-button-color":"#ffff55","--pie-button-hover-bg":"#2b4576","--pie-button-hover-border":"#ffff55","--pie-button-hover-color":"#ffff55","--pie-button-active-bg":"#243a63","--pie-button-focus-outline":"#ffff99","--pie-fixed-hue-collapse":"100%"}}]),ha=new Map(qo.map(e=>[e.id,e])),ba=lr({id:"default",name:"Default",description:"Standard PIE colors",kind:"default",preview:Ai(Po)}),Xs=Object.freeze(Object.entries(la).filter(([,e])=>e==="required").map(([e])=>e).sort()),va=lr([{foreground:"--pie-text",background:"--pie-background",minimum:4.5,role:"ordinary text"},{foreground:"--pie-text",background:"--pie-background-dark",minimum:4.5,role:"recessed surface text"},{foreground:"--pie-text",background:"--pie-surface",minimum:4.5,role:"raised surface text"},{foreground:"--pie-button-color",background:"--pie-surface",minimum:4.5,role:"raised surface control text"},{foreground:"--pie-button-focus-outline",background:"--pie-surface",minimum:3,role:"raised surface control focus indicator"},{foreground:"--pie-tertiary",background:"--pie-background",minimum:4.5,role:"link text"},{foreground:"--pie-correct",background:"--pie-background",minimum:4.5,role:"correct feedback text"},{foreground:"--pie-correct-tertiary",background:"--pie-background",minimum:4.5,role:"correct feedback text"},{foreground:"--pie-incorrect",background:"--pie-background",minimum:4.5,role:"incorrect feedback text"},{foreground:"--pie-missing",background:"--pie-background",minimum:4.5,role:"missing-response text"},{foreground:"--pie-correct-icon",background:"--pie-background",minimum:3,role:"correct feedback icon"},{foreground:"--pie-incorrect-icon",background:"--pie-background",minimum:3,role:"incorrect feedback icon"},{foreground:"--pie-text",background:"--pie-incorrect-secondary",minimum:4.5,role:"incorrect feedback surface text"},{foreground:"--pie-missing-icon",background:"--pie-background",minimum:3,role:"missing-response icon"},{foreground:"--pie-text",background:"--pie-blue-grey-300",minimum:4.5,role:"selectable hover text"},{foreground:"--pie-border",background:"--pie-background",minimum:3,role:"control boundary"},{foreground:"--pie-focus-checked-border",background:"--pie-background",minimum:3,role:"checked-control focus boundary"},{foreground:"--pie-focus-unchecked-border",background:"--pie-background",minimum:3,role:"unchecked-control focus boundary"},{foreground:"--pie-button-color",background:"--pie-button-bg",minimum:4.5,role:"button text"},{foreground:"--pie-button-color",background:"--pie-button-active-bg",minimum:4.5,role:"active button text"},{foreground:"--pie-button-border",background:"--pie-background",minimum:3,role:"button boundary"},{foreground:"--pie-button-hover-color",background:"--pie-button-hover-bg",minimum:4.5,role:"hovered button text"},{foreground:"--pie-button-hover-border",background:"--pie-background",minimum:3,role:"hovered button boundary"},{foreground:"--pie-button-focus-outline",background:"--pie-background",minimum:3,role:"button focus indicator"},{foreground:"--pie-button-focus-outline",background:"--pie-button-bg",minimum:3,role:"button focus indicator against its control"},{foreground:"--pie-button-focus-outline",background:"--pie-button-hover-bg",minimum:3,role:"hovered button focus indicator"},{foreground:"--pie-button-focus-outline",background:"--pie-button-active-bg",minimum:3,role:"active button focus indicator"},{foreground:"--pie-annotation-underline",background:"--pie-background",minimum:3,role:"annotation underline"},{foreground:"--pie-tool-annotation-toolbar-border",background:"--pie-background",minimum:3,role:"annotation toolbar boundary"}]);function li(e){const r=e.trim().toLowerCase();if(r==="black")return{r:0,g:0,b:0};if(r==="white")return{r:255,g:255,b:255};const t=/^#([0-9a-f]{3}|[0-9a-f]{6})$/i.exec(r);if(t){const n=t[1].length===3?[...t[1]].map(s=>s.repeat(2)).join(""):t[1],a=Number.parseInt(n,16);return{r:a>>16&255,g:a>>8&255,b:a&255}}const i=/^rgba?\(\s*(\d+(?:\.\d+)?)\s*,\s*(\d+(?:\.\d+)?)\s*,\s*(\d+(?:\.\d+)?)(?:\s*,\s*(\d+(?:\.\d+)?))?\s*\)$/.exec(r);if(!i||i[4]!==void 0&&Number.parseFloat(i[4])!==1)return null;const o=i.slice(1,4).map(Number);return o.some(n=>n<0||n>255)?null:{r:o[0],g:o[1],b:o[2]}}function Kt(e){const r=e/255;return r<=.04045?r/12.92:((r+.055)/1.055)**2.4}function Qi(e){return .2126*Kt(e.r)+.7152*Kt(e.g)+.0722*Kt(e.b)}function ui(e,r){const t=Qi(e),i=Qi(r);return(Math.max(t,i)+.05)/(Math.min(t,i)+.05)}function kt(e,r,t=new Set){if(t.has(r))return;t.add(r);const i=e[r]?.trim();if(!i)return;const o=/^var\(\s*(--pie-[a-z0-9-]+)\s*\)$/i.exec(i);return o?kt(e,o[1],t):i}function ma(e){const r=kt(e,"--pie-background"),t=r?li(r):null;return t?ui({r:255,g:255,b:255},t)>ui({r:0,g:0,b:0},t)?"dark":"light":null}function ga(e,r,t){const i=[];for(const o of va){if(t&&!t.has(o.foreground)&&!t.has(o.background))continue;const n=kt(e,o.foreground),a=kt(e,o.background),s=n?li(n):null,l=a?li(a):null;if(!s||!l){i.push({code:"contrast-unmeasurable",severity:"warning",message:`Could not measure ${o.role} contrast for ${o.foreground} against ${o.background}.`,schemeId:r,token:o.foreground});continue}const u=ui(s,l);u<o.minimum&&i.push({code:"contrast-too-low",severity:"warning",message:`${o.role} contrast is ${u.toFixed(2)}:1; ${o.minimum}:1 is required.`,schemeId:r,token:o.foreground})}return Object.freeze(i)}function fi(e){return pa[e]}function Ro(){return qo}function ya(e){return ha.get(e)}function ka(){return ba}function Ai(e){return lr({bg:e["--pie-background"]??e["--pie-secondary-background"]??"#ffffff",text:e["--pie-text"]??"#000000",primary:e["--pie-primary"]??"#3f51b5"})}function Io(e){return lr({id:e.id,name:e.name,description:e.description,kind:"built-in",preview:Ai(e.variables)})}function wa(e){return e==="light"||e==="dark"||e==="auto"}function _a(e){return e==="self"||e==="document"}function wt(e){if(!e||typeof e!="object")return{};const r={};for(const[t,i]of Object.entries(e))if(t.startsWith("--pie-"))if(typeof i=="string"){const o=i.trim();o&&(r[t]=o)}else typeof i=="number"&&(r[t]=String(i));return r}var Do=new Map,Ji=new Set,Xi=new Set,Zs=new Set(Ro().map(e=>e.id)),xa=0,$a=new Set(`aliceblue antiquewhite aqua aquamarine azure beige bisque black
|
|
2
|
+
blanchedalmond blue blueviolet brown burlywood cadetblue chartreuse
|
|
3
|
+
chocolate coral cornflowerblue cornsilk crimson cyan darkblue darkcyan
|
|
4
|
+
darkgoldenrod darkgray darkgreen darkgrey darkkhaki darkmagenta
|
|
5
|
+
darkolivegreen darkorange darkorchid darkred darksalmon darkseagreen
|
|
6
|
+
darkslateblue darkslategray darkslategrey darkturquoise darkviolet
|
|
7
|
+
deeppink deepskyblue dimgray dimgrey dodgerblue firebrick floralwhite
|
|
8
|
+
forestgreen fuchsia gainsboro ghostwhite gold goldenrod gray green
|
|
9
|
+
greenyellow grey honeydew hotpink indianred indigo ivory khaki lavender
|
|
10
|
+
lavenderblush lawngreen lemonchiffon lightblue lightcoral lightcyan
|
|
11
|
+
lightgoldenrodyellow lightgray lightgreen lightgrey lightpink lightsalmon
|
|
12
|
+
lightseagreen lightskyblue lightslategray lightslategrey lightsteelblue
|
|
13
|
+
lightyellow lime limegreen linen magenta maroon mediumaquamarine mediumblue
|
|
14
|
+
mediumorchid mediumpurple mediumseagreen mediumslateblue mediumspringgreen
|
|
15
|
+
mediumturquoise mediumvioletred midnightblue mintcream mistyrose moccasin
|
|
16
|
+
navajowhite navy oldlace olive olivedrab orange orangered orchid
|
|
17
|
+
palegoldenrod palegreen paleturquoise palevioletred papayawhip peachpuff
|
|
18
|
+
peru pink plum powderblue purple rebeccapurple red rosybrown royalblue
|
|
19
|
+
saddlebrown salmon sandybrown seagreen seashell sienna silver skyblue
|
|
20
|
+
slateblue slategray slategrey snow springgreen steelblue tan teal thistle
|
|
21
|
+
tomato turquoise violet wheat white whitesmoke yellow yellowgreen`.split(/\s+/)),Dt=String.raw`[+-]?(?:\d+|\d*\.\d+)(?:e[+-]?\d+)?`,Ut=new RegExp(`^${Dt}$`,"i"),Ir=new RegExp(`^${Dt}%$`,"i"),De=new RegExp(`^${Dt}%?$`,"i"),Zi=new RegExp(`^${Dt}(?:deg|grad|rad|turn)?$`,"i"),jo=/[ \t\n\f\r]+/,Sa=new Set(["srgb","srgb-linear","display-p3","a98-rgb","prophoto-rgb","rec2020","xyz","xyz-d50","xyz-d65"]);function Ea(e){return Object.freeze({...e})}function Ta(e){return Object.freeze(e.map(r=>Object.freeze({...r})))}function _t(e){return e.replace(/^[ \t\n\f\r]+|[ \t\n\f\r]+$/g,"")}function Ma(e){for(let r=0;r<e.length;r+=1)if(e.charCodeAt(r)>127)return!1;return!0}function br(e,r,t=!1){if(e.includes("/"))return!1;const i=e.includes(",");if(i&&!t)return!1;const o=(i?e.split(","):_t(e).split(jo)).map(_t);return o.length===r.length&&o.every((n,a)=>n.length>0&&r[a]?.test(n))}function eo(e){if(!e||!Ma(e))return!1;const r=_t(e).toLowerCase();if(!r)return!1;if(/^#[\da-f]{3}$/i.test(r)||/^#[\da-f]{6}$/i.test(r)||$a.has(r))return!0;const t=/^([a-z-]+)\(([^()]*)\)$/.exec(r);if(!t)return!1;const[,i,o]=t;if(!i||o===void 0)return!1;switch(i){case"rgb":return o.includes(",")?br(o,[Ut,Ut,Ut],!0)||br(o,[Ir,Ir,Ir],!0):br(o,[De,De,De]);case"hsl":case"hwb":return br(o,[Zi,Ir,Ir],i==="hsl");case"lab":case"oklab":return br(o,[De,De,De]);case"lch":case"oklch":return br(o,[De,De,Zi]);case"color":{if(o.includes(",")||o.includes("/"))return!1;const[n,...a]=_t(o).split(jo);return!!(n&&Sa.has(n)&&a.length===3&&a.every(s=>De.test(s)))}default:return!1}}function Lo(e){const r={...fi("light"),...e.variables},t=r["--pie-background"];eo(t)||(r["--pie-background"]="#ffffff");for(const i of["--pie-text","--pie-primary"])eo(r[i])||(r[i]=fi("light")[i]);return Object.freeze({id:e.id,name:e.name,description:e.description,kind:"custom",preview:Ai(r)})}function Ca(){return Object.freeze({generation:xa,schemes:Object.freeze([ka(),...Ro().map(Io),...Array.from(Do.values(),Lo)])})}var No=Ca();function Wo(e){const r=[e.code,e.schemeId??"",e.token??"",e.message].join("|");Xi.has(r)||(Xi.add(r),console.warn(`[pie-theme] ${e.message}`))}function Oa(e){const r=e?.trim();return r&&r!=="default"?r:"default"}function Aa(e){if(!e||typeof e!="object")return{};const r={};for(const[t,i]of Object.entries(e))t.startsWith("--")&&(typeof i=="string"&&i.trim()?r[t]=i.trim():typeof i=="number"&&Number.isFinite(i)&&(r[t]=String(i)));return r}function Pa(){return No}function zo(e){Ji.add(e);try{e(No)}catch{Wo({code:"observer-error",severity:"warning",message:"A color-scheme observer threw while receiving an update."})}let r=!0;return()=>{r&&(r=!1,Ji.delete(e))}}function qa(e={}){const r=e.baseTheme==="dark"?"dark":"light",t=Oa(e.requestedScheme),i=wt(e.providerVariables),o=Aa(e.variables),n={...fi(r),...i},a=new Set;let s=null,l="default";const u=[];if(t!=="default"){const d=ya(t),b=Do.get(t);if(d){Object.assign(n,d.variables);for(const h of Object.keys(d.variables))a.add(h);s=Io(d),l="built-in"}else if(b){n["--pie-fixed-hue-collapse"]="100%",Object.assign(n,b.variables);for(const h of Object.keys(b.variables))a.add(h);s=Lo(b),l="custom"}else l="unavailable",u.push({code:"unknown-scheme",severity:"warning",message:`Requested color scheme "${t}" is unavailable; the base theme and provider remain active.`,schemeId:t})}Object.assign(n,o);for(const d of Object.keys(o))a.add(d);a.size>0&&u.push(...ga(n,t==="default"?void 0:t,a));for(const d of u)Wo(d);const f=l==="built-in"||l==="custom"?ma(n):null;return Object.freeze({baseTheme:r,requestedScheme:t,resolvedScheme:s,status:l,variables:Ea(n),colorScheme:f,diagnostics:Ta(u)})}var Ra=4.5;var ro=5;function Yt(e){const r=e/255;return r<=.03928?r/12.92:((r+.055)/1.055)**2.4}function to(e){return .2126*Yt(e.r)+.7152*Yt(e.g)+.0722*Yt(e.b)}function xr(e,r){const t=to(e),i=to(r);return(Math.max(t,i)+.05)/(Math.min(t,i)+.05)}function di(e,r,t){return`color-mix(in srgb, ${e} ${t}%, ${r})`}function Ia(){if(typeof document>"u")return null;const e=document.createElement("canvas");e.width=1,e.height=1;const r=e.getContext?.("2d",{willReadFrequently:!0});return r?t=>{const i=t.trim();if(!i)return null;try{r.fillStyle="#000000",r.fillStyle=i;const o=r.fillStyle;if(r.fillStyle="#ffffff",r.fillStyle=i,r.fillStyle!==o)return null;r.clearRect(0,0,1,1),r.fillRect(0,0,1,1);const n=r.getImageData(0,0,1,1).data;return{r:n[0],g:n[1],b:n[2],a:n[3]/255}}catch{return null}}:null}function io(e){const{hue:r,text:t,background:i,measure:o}=e;if(!r)return;if(!t)return r;const n=e.minimum??4.5,a=e.unmeasuredHueWeight??30,s=()=>di(r,t,a);if(!o||!i)return s();const l=o(i),u=o(r);if(!l||!u||l.a<1||u.a<1)return s();if(xr(u,l)>=n)return r;for(let f=95;f>=ro;f-=ro){const d=di(r,t,f),b=o(d);if(!b)return s();if(xr(b,l)>=n)return d}return t}var oo=1;function Da(e){const{fill:r,text:t,background:i,measure:o}=e;if(!r)return;if(!t||!i||!o)return r;const n=e.minimum??3,a=e.textMinimum??4.5,s=o(i),l=o(t),u=o(r);if(!s||!l||!u||s.a<1||l.a<1||u.a<1||xr(u,s)>=n||xr(l,u)<a)return r;let f=r;for(let d=99;d>=oo;d-=oo){const b=di(r,t,d),h=o(b);if(!h||xr(l,h)<a)return f;if(f=b,xr(h,s)>=n)return b}return f}var ja={base100:"--color-base-100",base200:"--color-base-200",base300:"--color-base-300",baseContent:"--color-base-content",primary:"--color-primary",secondary:"--color-secondary",accent:"--color-accent",neutral:"--color-neutral",neutralContent:"--color-neutral-content",success:"--color-success",error:"--color-error",warning:"--color-warning"},He=(e,r)=>({token:e,kind:"legible",from:r,minimum:Ra,fallbackWeight:30}),vr=(e,r)=>({token:e,kind:"legible",from:r,minimum:3,fallbackWeight:35}),P=(e,r)=>({token:e,kind:"direct",from:r}),be=(e,r,t,i)=>({token:e,kind:"mix",from:r,towards:t,weight:i}),La=[P("--pie-background","base100"),P("--pie-background-dark","base200"),P("--pie-secondary-background","base200"),P("--pie-dropdown-background","base300"),be("--pie-surface","base300","base100",70),P("--pie-text","baseContent"),P("--pie-primary","primary"),be("--pie-primary-light","primary","base100",60),be("--pie-primary-dark","primary","baseContent",75),be("--pie-faded-primary","primary","base100",20),P("--pie-secondary","secondary"),be("--pie-secondary-light","secondary","base100",60),be("--pie-secondary-dark","secondary","baseContent",75),P("--pie-tertiary","accent"),be("--pie-tertiary-light","accent","base100",60),vr("--pie-border","base300"),P("--pie-border-light","base200"),vr("--pie-border-dark","neutral"),vr("--pie-border-gray","base300"),He("--pie-correct","success"),be("--pie-correct-secondary","success","base100",20),He("--pie-correct-tertiary","success"),He("--pie-correct-icon","success"),He("--pie-content-emphasis","error"),He("--pie-incorrect","error"),be("--pie-incorrect-secondary","error","base100",20),He("--pie-incorrect-icon","error"),He("--pie-missing","warning"),He("--pie-missing-icon","warning"),P("--pie-disabled","base300"),P("--pie-disabled-secondary","base200"),be("--pie-focus-checked","primary","base100",20),P("--pie-focus-checked-border","primary"),P("--pie-focus-unchecked","base200"),P("--pie-focus-unchecked-border","base300"),P("--pie-blue-grey-100","base100"),{token:"--pie-blue-grey-300",kind:"state-fill",from:"base200"},P("--pie-blue-grey-600","base300"),P("--pie-blue-grey-900","baseContent"),P("--pie-black","neutralContent"),P("--pie-white","base100"),P("--pie-button-bg","base100"),vr("--pie-button-border","base300"),P("--pie-button-color","baseContent"),P("--pie-button-hover-bg","base200"),vr("--pie-button-hover-border","base300"),P("--pie-button-hover-color","baseContent"),be("--pie-button-active-bg","base300","base100",70),vr("--pie-button-focus-outline","primary")];function Na(e){const{read:r,measure:t}=e,i={};for(const o of La){const n=r(o.from);if(!n)continue;let a;if(o.kind==="direct")a=n;else if(o.kind==="mix"){const s=r(o.towards);a=s?`color-mix(in srgb, ${n} ${o.weight}%, ${s})`:void 0}else o.kind==="state-fill"?a=Da({fill:n,text:r("baseContent"),background:r("base100"),measure:t}):(a=io({hue:n,text:r("baseContent"),background:r("base100"),measure:t,minimum:o.minimum,unmeasuredHueWeight:o.fallbackWeight}),o.token==="--pie-button-focus-outline"&&t&&i["--pie-surface"]&&(a=io({hue:a,text:r("baseContent"),background:i["--pie-surface"],measure:t,minimum:o.minimum,unmeasuredHueWeight:o.fallbackWeight})));a&&(i[o.token]=a)}return i}var no;(no=globalThis).PIE_THEME_PROVIDERS??(no.PIE_THEME_PROVIDERS={adapters:new Map,observers:new Set});var xt=globalThis.PIE_THEME_PROVIDERS.adapters,ao=globalThis.PIE_THEME_PROVIDERS.observers;function vt(e){const r=e.trim();return r||void 0}var Qt;function Wa(){return Qt===void 0&&(Qt=Ia()),Qt}function za(e){return wt(Na({read:r=>vt(e.getPropertyValue(ja[r])),measure:Wa()}))}var Jt={id:"daisyui",canRead(e){const r=getComputedStyle(e);return!!(vt(r.getPropertyValue("--color-base-100"))||vt(r.getPropertyValue("--color-base-content"))||vt(r.getPropertyValue("--color-primary")))},read(e){return za(getComputedStyle(e))}};xt.has(Jt.id)||xt.set(Jt.id,Jt);function Va(e){ao.add(e);let r=!0;return()=>{r&&(r=!1,ao.delete(e))}}function Ha(e){const r=e.provider?.trim()||"auto";if(r==="none")return{};const t=o=>{if(r&&r!=="auto"){const n=xt.get(r);return!n||!n.canRead(o)?{}:wt(n.read(o))}for(const n of xt.values())if(n.canRead(o))return wt(n.read(o));return{}},i=t(e.target);return Object.keys(i).length>0?i:typeof document<"u"&&e.target!==document.documentElement?t(document.documentElement):{}}var Ba=typeof HTMLElement>"u"?class{}:HTMLElement;function Fa(e,r){if(!customElements.get(e))try{customElements.define(e,r)}catch(t){if(!(t instanceof DOMException&&t.name==="NotSupportedError")||!customElements.get(e))throw t}}function pi(e){if(!e)return{};if(typeof e=="string")try{return pi(JSON.parse(e))}catch{return{}}if(typeof e!="object")return{};const r={};for(const[t,i]of Object.entries(e))t.startsWith("--")&&(typeof i=="string"&&i.trim()?r[t]=i.trim():typeof i=="number"&&Number.isFinite(i)&&(r[t]=String(i)));return r}function Vo(e,r,t){r?e.style.setProperty("color-scheme",r):t?e.style.setProperty("color-scheme",t.value,t.priority):e.style.removeProperty("color-scheme")}var Je=new Map,Ue=null,Pi=new Set;function Ga(e,r){Ue??(Ue={dataTheme:e.getAttribute("data-theme"),dataColorScheme:e.getAttribute("data-color-scheme"),colorScheme:e.style.getPropertyValue("color-scheme")?{value:e.style.getPropertyValue("color-scheme"),priority:e.style.getPropertyPriority("color-scheme")}:null,variables:new Map});for(const t of r){if(Ue.variables.has(t))continue;const i=e.style.getPropertyValue(t);Ue.variables.set(t,i?{value:i,priority:e.style.getPropertyPriority(t)}:null)}}function Ho(e){for(const t of Pi)e.style.removeProperty(t);const r=Ue;if(r)for(const[t,i]of r.variables)i?e.style.setProperty(t,i.value,i.priority):e.style.removeProperty(t)}function co(e,r){Ga(e,Object.keys(r.variables)),Ho(e),e.setAttribute("data-theme",r.dataTheme),r.dataColorScheme?e.setAttribute("data-color-scheme",r.dataColorScheme):e.removeAttribute("data-color-scheme"),Vo(e,r.colorScheme,Ue?.colorScheme??null);for(const[t,i]of Object.entries(r.variables))e.style.setProperty(t,i);Pi=new Set(Object.keys(r.variables))}function Ka(e){const r=Ue;r&&(r.dataTheme===null?e.removeAttribute("data-theme"):e.setAttribute("data-theme",r.dataTheme),r.dataColorScheme===null?e.removeAttribute("data-color-scheme"):e.setAttribute("data-color-scheme",r.dataColorScheme),r.colorScheme?e.style.setProperty("color-scheme",r.colorScheme.value,r.colorScheme.priority):e.style.removeProperty("color-scheme"),Ho(e),Ue=null,Pi.clear())}var Ua=class extends Ba{constructor(...e){super(...e),Ve(this,"mediaQuery",null),Ve(this,"onMediaChange",()=>this.applyTheme()),Ve(this,"previousKeys",new Set),Ve(this,"previousTarget",null),Ve(this,"variablesOverride",{}),Ve(this,"promoteDocumentOwnership",!1),Ve(this,"stopObservingSchemes",null),Ve(this,"stopObservingProviders",null)}static get observedAttributes(){return["theme","scope","provider","scheme","variables"]}get theme(){const e=this.getAttribute("theme");return wa(e)?e:"light"}set theme(e){this.setAttribute("theme",e)}get scope(){const e=this.getAttribute("scope");return _a(e)?e:"self"}set scope(e){this.setAttribute("scope",e)}get variables(){return{...this.variablesOverride}}set variables(e){this.variablesOverride=pi(e),this.setAttribute("variables",JSON.stringify(this.variablesOverride))}get provider(){return this.getAttribute("provider")?.trim()||"auto"}set provider(e){this.setAttribute("provider",e||"auto")}get scheme(){return this.getAttribute("scheme")?.trim()||"default"}set scheme(e){this.setAttribute("scheme",e||"default")}connectedCallback(){this.style.display||(this.style.display="contents"),this.setupAutoThemeListener(),this.stopObservingProviders??(this.stopObservingProviders=Va(()=>this.applyTheme())),this.stopObservingSchemes??(this.stopObservingSchemes=zo(()=>this.applyTheme()))}disconnectedCallback(){this.mediaQuery&&this.mediaQuery.removeEventListener("change",this.onMediaChange),this.mediaQuery=null,this.stopObservingSchemes?.(),this.stopObservingSchemes=null,this.stopObservingProviders?.(),this.stopObservingProviders=null,this.clearPreviousTarget()}attributeChangedCallback(e,r,t){r!==t&&(e==="variables"&&(this.variablesOverride=pi(t)),e==="theme"&&this.setupAutoThemeListener(),this.promoteDocumentOwnership=!0,this.applyTheme())}getTarget(){return this.scope==="document"?document.documentElement:this}applyTheme(){if(!this.isConnected||typeof document>"u"||typeof window>"u")return;const{effectiveTheme:e,dataTheme:r}=this.resolveThemeState(),t=this.getTarget();this.previousTarget&&this.previousTarget!==t&&this.clearPreviousTarget();const i=this.scheme==="default"?null:this.scheme,o=this.resolveProviderVariablesForState(t,r,i),n=qa({baseTheme:e,providerVariables:o,requestedScheme:this.scheme,variables:this.variablesOverride}),a=Object.freeze({dataTheme:r,dataColorScheme:i,colorScheme:n.colorScheme,variables:n.variables});if(this.scope==="document")this.promoteDocumentOwnership&&Je.has(this)&&Je.delete(this),Je.set(this,a),this.promoteDocumentOwnership=!1,[...Je.entries()].at(-1)?.[0]===this&&co(t,a);else{t.setAttribute("data-theme",r),a.dataColorScheme?t.setAttribute("data-color-scheme",a.dataColorScheme):t.removeAttribute("data-color-scheme"),Vo(t,a.colorScheme,null),this.clearPreviousKeys(t);for(const[s,l]of Object.entries(n.variables))t.style.setProperty(s,l)}this.previousTarget=t,this.previousKeys=new Set(Object.keys(n.variables))}resolveProviderVariablesForState(e,r,t){const i=(a,s)=>{s===null?e.removeAttribute(a):e.setAttribute(a,s)},o=e.getAttribute("data-theme"),n=e.getAttribute("data-color-scheme");i("data-theme",r),i("data-color-scheme",t);try{return Ha({target:e,provider:this.provider})}finally{i("data-theme",o),i("data-color-scheme",n)}}resolveThemeState(){const e=this.getAttribute("theme")?.trim();if(e==="auto"){const r=window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light";return{effectiveTheme:r,dataTheme:r}}return e==="dark"||e==="light"?{effectiveTheme:e,dataTheme:e}:e?{effectiveTheme:"light",dataTheme:e}:{effectiveTheme:"light",dataTheme:"light"}}clearPreviousTarget(){if(!this.previousTarget)return;const e=this.previousTarget;if(e===document.documentElement&&Je.has(this)){Je.delete(this);const r=[...Je.values()].at(-1);r?co(e,r):Ka(e)}else this.clearPreviousKeys(e),e.removeAttribute("data-theme"),e.removeAttribute("data-color-scheme"),e.style.removeProperty("color-scheme");this.previousTarget=null,this.previousKeys.clear()}clearPreviousKeys(e){for(const r of this.previousKeys)e.style.removeProperty(r)}setupAutoThemeListener(){typeof window>"u"||(this.mediaQuery&&(this.mediaQuery.removeEventListener("change",this.onMediaChange),this.mediaQuery=null),this.isConnected&&this.getAttribute("theme")?.trim()==="auto"&&(this.mediaQuery=window.matchMedia("(prefers-color-scheme: dark)"),this.mediaQuery.addEventListener("change",this.onMediaChange)))}};function Ya(e="pie-theme"){typeof customElements>"u"||Fa(e,Ua)}var Qa="pie-color-scheme";function Bo(e){if(typeof document>"u")return null;let r=e instanceof Element?e:null;for(;r;){const t=r.closest("pie-theme");if(t)return t;const i=r.getRootNode();r=i instanceof ShadowRoot?i.host:null}return document.querySelector('pie-theme[scope="document"]')||document.querySelector("pie-theme")}function Ja(e,r={}){if(typeof document>"u")return;const t=(e||"default").trim()||"default",i=Bo(r.from);if(i)i.getAttribute("scheme")!==t&&i.setAttribute("scheme",t);else{const o=document.documentElement;t==="default"?o.removeAttribute("data-color-scheme"):o.setAttribute("data-color-scheme",t)}if(r.persistenceKey!==null)try{if(typeof localStorage>"u")return;localStorage.setItem(r.persistenceKey??Qa,t)}catch{}}Ya();if(typeof window<"u"){var so,lo;((so=(lo=window).__svelte??(lo.__svelte={})).v??(so.v=new Set)).add("5")}var Tr={},N=Symbol("uninitialized"),Fo=Array.isArray,Xa=Array.prototype.indexOf,hi=Array.prototype.includes,jt=Array.from,$t=Object.keys,Yr=Object.defineProperty,or=Object.getOwnPropertyDescriptor,Za=Object.getOwnPropertyDescriptors,ec=Object.prototype,rc=Array.prototype,Go=Object.getPrototypeOf,uo=Object.isExtensible,tc=()=>{};function ic(e){for(var r=0;r<e.length;r++)e[r]()}function Ko(){var e,r;return{promise:new Promise((t,i)=>{e=t,r=i}),resolve:e,reject:r}}function Qr(e){"@babel/helpers - typeof";return Qr=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},Qr(e)}function oc(e,r){if(Qr(e)!="object"||!e)return e;var t=e[Symbol.toPrimitive];if(t!==void 0){var i=t.call(e,r||"default");if(Qr(i)!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(e)}function nc(e){var r=oc(e,"string");return Qr(r)=="symbol"?r:r+""}function A(e,r,t){return(r=nc(r))in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}var ue=1024,xe=2048,ur=4096,qi=8192,ac=16384,Ri=32768,fo=1<<25,Ii=65536,Pr=1<<19,cc=1<<20,Fr=1<<25,po=1<<21,sc=1<<22,St=1<<23,Gr=Symbol("$state"),Uo=Symbol("component"),Yo=Symbol("legacy props"),lc=Symbol(""),bi=Symbol("attributes"),vi=Symbol("class"),mi=Symbol("style"),mt=Symbol("text"),rt=new class extends Error{constructor(...e){super(...e),A(this,"name","StaleReactionError"),A(this,"message","The reaction that called `getAbortSignal()` was re-run or destroyed")}},uc=!!globalThis.document?.contentType&&globalThis.document.contentType.includes("xml");function fc(){console.warn("https://svelte.dev/e/derived_inert")}function Lt(e){console.warn("https://svelte.dev/e/hydration_mismatch")}function dc(){console.warn("https://svelte.dev/e/svelte_boundary_reset_noop")}var M=!1;function Le(e){M=e}var T;function U(e){if(e===null)throw Lt(),Tr;return T=e}function Nt(){return U(Re(T))}function Q(e){if(M){if(Re(T)!==null)throw Lt(),Tr;T=e}}function Qo(e=1){if(M){for(var r=e,t=T;r--;)t=Re(t);T=t}}function Et(e=!0){for(var r=0,t=T;;){if(t.nodeType===8){var i=t.data;if(i==="]"){if(r===0)return t;r-=1}else(i==="["||i==="[!"||i[0]==="["&&!isNaN(Number(i.slice(1))))&&(r+=1)}var o=Re(t);e&&t.remove(),t=o}}function Jo(e){if(!e||e.nodeType!==8)throw Lt(),Tr;return e.data}function Xo(e){return e===this.v}function pc(e,r){return e!=e?r==r:e!==r||e!==null&&typeof e=="object"||typeof e=="function"}function Zo(e){return!pc(e,this.v)}function hc(e){throw new Error("https://svelte.dev/e/lifecycle_outside_component")}function bc(){throw new Error("https://svelte.dev/e/async_derived_orphan")}function vc(e,r,t){throw new Error("https://svelte.dev/e/each_key_duplicate")}function mc(e){throw new Error("https://svelte.dev/e/effect_in_teardown")}function gc(){throw new Error("https://svelte.dev/e/effect_in_unowned_derived")}function yc(e){throw new Error("https://svelte.dev/e/effect_orphan")}function kc(){throw new Error("https://svelte.dev/e/effect_update_depth_exceeded")}function wc(){throw new Error("https://svelte.dev/e/hydration_failed")}function _c(e){throw new Error("https://svelte.dev/e/props_invalid_value")}function xc(){throw new Error("https://svelte.dev/e/state_descriptors_fixed")}function $c(){throw new Error("https://svelte.dev/e/state_prototype_fixed")}function Sc(){throw new Error("https://svelte.dev/e/state_unsafe_mutation")}function Ec(){throw new Error("https://svelte.dev/e/svelte_boundary_reset_onerror")}var Wt=!1,tt=!1,q=null;function Mr(e){q=e}function en(e,r=!1,t){q={p:q,i:!1,c:null,e:null,s:e,x:null,r:S,l:tt&&!r?{s:null,u:null,$:[]}:null}}function rn(e){var r=q,t=r.e;if(t!==null){r.e=null;for(var i of t)xn(i)}return e!==void 0&&(r.x=e),r.i=!0,q=r.p,Di(e)}function Di(e={}){return Yr(e,Uo,{value:!0}),e}function it(){return!tt||q!==null&&q.l===null}var tr=[];function tn(){var e=tr;tr=[],ic(e)}function Qe(e){if(tr.length===0&&!Kr){var r=tr;queueMicrotask(()=>{r===tr&&tn()})}tr.push(e)}function Tc(){for(;tr.length>0;)tn()}var Mc=~(xe|ur|ue);function j(e,r){e.f=e.f&Mc|r}function ji(e){(e.f&512)!==0||e.deps===null?j(e,ue):j(e,ur)}function on(e,r,t){(e.f&2048)!==0?r.add(e):e.f&4096&&t.add(e),j(e,ue)}function zt(e){var r=E,t=S;de(null),qe(null);try{return e()}finally{de(r),qe(t)}}function Cc(e,r,t,i){const o=it()?Jr:Li;var n=e.filter(h=>!h.settled),a=r.map(o);if(t.length===0&&n.length===0){i(a);return}var s=S,l=Oc(),u=n.length===1?n[0].promise:n.length>1?Promise.all(n.map(h=>h.promise)):null;function f(h){if((s.f&16384)===0){l();try{i([...a,...h])}catch(m){Pe(m,s)}Tt()}}var d=nn();if(t.length===0){u.then(()=>f([])).finally(d);return}function b(){Promise.all(t.map(h=>Ac(h))).then(f).catch(h=>Pe(h,s)).finally(d)}u?u.then(()=>{l(),b(),Tt()}):b()}function Oc(){var e=S,r=E,t=q,i=$;return function(o=!0){qe(e),de(r),Mr(t),o&&!(e.f&16384)&&(i?.activate(),i?.apply())}}function Tt(e=!0){qe(null),de(null),Mr(null),e&&$?.deactivate()}function nn(){var e=S,r=e.b,t=$,i=!!r?.is_rendered();return r?.update_pending_count(1,t),t.increment(i,e),()=>{r?.update_pending_count(-1,t),t.decrement(i,e)}}function Jr(e){var r=2|xe;return S!==null&&(S.f|=Pr),{ctx:q,deps:null,effects:null,equals:Xo,f:r,fn:e,reactions:null,rv:0,v:N,wv:0,parent:S,ac:null}}var zr=Symbol("obsolete");function Ac(e,r,t){let i=S;i===null&&bc();var o=void 0,n=sr(N),a=!E,s=new Set;return Uc(()=>{var l=S,u=Ko();o=u.promise;try{Promise.resolve(e()).then(u.resolve,h=>{h!==rt&&u.reject(h)}).finally(Tt)}catch(h){u.reject(h),Tt()}var f=$;if(a){if((l.f&32768)!==0)var d=nn();if(i.b?.is_rendered())f.async_deriveds.get(l)?.reject(zr);else for(const h of s.values())h.reject(zr);s.add(u),f.async_deriveds.set(l,u)}const b=(h,m=void 0)=>{d?.(),s.delete(u),m!==zr&&(f.activate(),m?(n.f|=St,Or(n,m)):(n.f&8388608&&(n.f^=St),Or(n,h)),f.deactivate())};u.promise.then(b,h=>b(null,h||"unknown"))}),Fc(()=>{for(const l of s)l.reject(zr)}),new Promise(l=>{function u(f){function d(){f===o?l(n):u(o)}f.then(d,d)}u(o)})}function Dr(e){const r=Jr(e);return Cn(r),r}function Li(e){const r=Jr(e);return r.equals=Zo,r}function Pc(e){var r=e.effects;if(r!==null){e.effects=null;for(var t=0;t<r.length;t+=1)Y(r[t])}}function Ni(e){var r,t=S,i=e.parent;if(!We&&i!==null&&e.v!==N&&(i.f&24576)!==0)return fc(),e.v;qe(i);try{Pc(e),r=qn(e)}finally{qe(t)}return r}function an(e){var r=Ni(e);if(!e.equals(r)&&(e.wv=An(),(!$?.is_fork||e.deps===null)&&($!==null?($.capture(e,r,!0),yi?.capture(e,r,!0)):e.v=r,e.deps===null))){j(e,ue);return}We||(K!==null?(Vi()||$?.is_fork)&&K.set(e,r):ji(e))}function qc(e){if(e.effects!==null)for(const r of e.effects)(r.teardown||r.ac)&&(r.teardown?.(),r.ac!==null&&zt(()=>{r.ac.abort(rt),r.ac=null}),r.fn!==null&&(r.teardown=tc),Zr(r,0),Fi(r))}function cn(e){if(e.effects!==null)for(const r of e.effects)r.teardown&&r.fn!==null&&Ar(r)}function sn(e,r){if(r.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function Wi(e,r){sn(e,r),r.add(e)}function _(e,r,t){sn(e,r),r.set(e,t)}function x(e,r,t){if(typeof e=="function"?e===r:e.has(r))return arguments.length<3?r:t;throw new TypeError("Private element is not present on this object")}function w(e,r,t){return e.set(x(e,r),t),t}function c(e,r){return e.get(x(e,r))}var ln,gi=null,yr=null,$=null,yi=null,K=null,ki=null,Kr=!1,Xt=!1,Xr=null,Mt=null,un=0,Rc=1,wi=new WeakMap,nr=new WeakMap,$r=new WeakMap,Ct=new WeakMap,st=new WeakMap,kr=new WeakMap,er=new WeakMap,Vr=new WeakMap,Ce=new WeakMap,ho=new WeakMap,Cr=new WeakMap,Ne=new WeakMap,Ke=new WeakMap,Zt=new WeakMap,lt=new WeakMap,L=new WeakSet,fr=class fn{constructor(){Wi(this,L),A(this,"id",Rc++),_(this,wi,!1),A(this,"linked",!0),_(this,nr,null),_(this,$r,null),A(this,"async_deriveds",new Map),A(this,"current",new Map),A(this,"previous",new Map),_(this,Ct,new Set),_(this,st,new Set),_(this,kr,0),_(this,er,new Map),_(this,Vr,null),_(this,Ce,[]),_(this,ho,[]),_(this,Cr,new Set),_(this,Ne,new Set),_(this,Ke,new Map),_(this,Zt,new Set),A(this,"is_fork",!1),_(this,lt,!1),yr===null?gi=yr=this:(w($r,yr,this),w(nr,this,yr)),yr=this}skip_effect(r){c(Ke,this).has(r)||c(Ke,this).set(r,{d:[],m:[]}),c(Zt,this).delete(r)}unskip_effect(r,t=i=>this.schedule(i)){var i=c(Ke,this).get(r);if(i){c(Ke,this).delete(r);for(var o of i.d)j(o,xe),t(o);for(o of i.m)j(o,ur),t(o)}c(Zt,this).add(r)}capture(r,t,i=!1){r.v!==N&&!this.previous.has(r)&&this.previous.set(r,r.v),!(r.f&8388608)&&(this.current.set(r,[t,i]),K?.set(r,t)),this.is_fork||(r.v=t)}activate(){$=this}deactivate(){$=null,K=null}flush(){try{Xt=!0,$=this,x(L,this,Ot).call(this)}finally{un=0,ki=null,Xr=null,Mt=null,Xt=!1,$=null,K=null,Ae.clear()}}discard(){for(const r of c(st,this))r(this);c(st,this).clear();for(const r of this.async_deriveds.values())r.reject(zr);x(L,this,At).call(this),c(Vr,this)?.resolve()}register_created_effect(r){c(ho,this).push(r)}increment(r,t){if(w(kr,this,c(kr,this)+1),r){let i=c(er,this).get(t)??0;c(er,this).set(t,i+1)}}decrement(r,t){if(w(kr,this,c(kr,this)-1),r){let i=c(er,this).get(t)??0;i===1?c(er,this).delete(t):c(er,this).set(t,i-1)}c(lt,this)||(w(lt,this,!0),Qe(()=>{w(lt,this,!1),this.linked&&this.flush()}))}transfer_effects(r,t){for(const i of r)c(Cr,this).add(i);for(const i of t)c(Ne,this).add(i);r.clear(),t.clear()}oncommit(r){c(Ct,this).add(r)}ondiscard(r){c(st,this).add(r)}settled(){return(c(Vr,this)??w(Vr,this,Ko())).promise}static ensure(){if($===null){const r=$=new fn;!Xt&&!Kr&&Qe(()=>{c(wi,r)||r.flush()})}return $}apply(){if(!Wt||!this.is_fork&&c(nr,this)===null&&c($r,this)===null){K=null;return}K=new Map;for(const[t,[i]]of this.current)K.set(t,i);for(let t=gi;t!==null;t=c($r,t))if(!(t===this||t.is_fork)){var r=!1;if(t.id<this.id){for(const[i,[,o]]of t.current)if(!o&&this.current.has(i)){r=!0;break}}if(!r)for(const[i,o]of t.previous)K.has(i)||K.set(i,o)}}schedule(r){if(ki=r,r.b?.is_pending&&(r.f&16777228)!==0&&(r.f&32768)===0){r.b.defer_effect(r);return}c(Ce,this).push(r)}};ln=fr;function bo(){if(this.is_fork)return!0;for(const t of c(er,this).keys()){for(var e=t,r=!1;e.parent!==null;){if(c(Ke,this).has(e)){r=!0;break}e=e.parent}if(!r)return!0}return!1}function Ic(){var e=[];for(const o of c(Ce,this))if(!((o.f&16384)!==0||(o.f&6144)===0)){for(var r=o,t=!1;r.parent!==null;){r=r.parent;var i=r.f;if((i&96)!==0){if((i&1024)===0){t=!0;break}r.f^=ue}}t||e.push(r)}return w(Ce,this,[]),e}function Ot(){w(wi,this,!0);for(const a of c(Cr,this))c(Ne,this).delete(a),j(a,xe),this.schedule(a);for(const a of c(Ne,this))j(a,ur),this.schedule(a);this.apply();for(var e=Xr=[],r=[],t=Mt=[];c(Ce,this).length>0;){un++>1e3&&(x(L,this,At).call(this),Nc());for(const a of x(L,this,Ic).call(this))try{x(L,this,Dc).call(this,a,e,r)}catch(s){throw hn(a),x(L,this,bo).call(this)||this.discard(),s}}if($=null,t.length>0){var i=ln.ensure();for(const a of t)i.schedule(a)}if(Xr=null,Mt=null,x(L,this,bo).call(this)){x(L,this,ut).call(this,r),x(L,this,ut).call(this,e);for(const[a,s]of c(Ke,this))pn(a,s);t.length>0&&x(L,$,Ot).call($);return}const o=x(L,this,jc).call(this);if(o){x(L,this,ut).call(this,r),x(L,this,ut).call(this,e),x(L,o,Lc).call(o,this);return}c(Cr,this).clear(),c(Ne,this).clear();for(const a of c(Ct,this))a(this);c(Ct,this).clear(),yi=this,vo(r),vo(e),yi=null,c(Vr,this)?.resolve();var n=$;if(c(kr,this)===0&&(c(Ce,this).length===0||n!==null)&&x(L,this,At).call(this),c(Ce,this).length>0)if(n!==null){for(const a of c(Ce,this))c(Ce,n).push(a);w(Ce,this,[])}else n=this;n!==null&&(Ae.clear(),x(L,n,Ot).call(n))}function Dc(e,r,t){e.f^=ue;for(var i=e.first;i!==null;){var o=i.f,n=(o&96)!==0;if(!(n&&(o&1024)!==0||(o&8192)!==0||c(Ke,this).has(i))&&i.fn!==null){n?i.f^=ue:(o&4)!==0?r.push(i):Wt&&(o&16777224)!==0?t.push(i):ot(i)&&(o&16&&c(Ne,this).add(i),Ar(i));var a=i.first;if(a!==null){i=a;continue}}for(;i!==null;){var s=i.next;if(s!==null){i=s;break}i=i.parent}}}function jc(){for(var e=c(nr,this);e!==null;){if(!e.is_fork){for(const[r,[,t]]of this.current)if(e.current.has(r)&&!t)return e}e=c(nr,e)}return null}function Lc(e){for(const[t,i]of e.current)!this.previous.has(t)&&e.previous.has(t)&&this.previous.set(t,e.previous.get(t)),this.current.set(t,i);for(const[t,i]of e.async_deriveds){const o=this.async_deriveds.get(t);o&&i.promise.then(o.resolve).catch(o.reject)}e.async_deriveds.clear(),this.transfer_effects(c(Cr,e),c(Ne,e));const r=t=>{var i=t.reactions;if(i!==null&&!((t.f&2)!==0&&(t.f&6144)===0))for(const a of i){var o=a.f;if((o&2)!==0)r(a);else{var n=a;o&4194320&&!this.async_deriveds.has(n)&&(c(Ne,this).delete(n),j(n,xe),this.schedule(n))}}};for(const t of this.current.keys())r(t);this.oncommit(()=>e.discard()),x(L,e,At).call(e),$=this,x(L,this,Ot).call(this)}function ut(e){for(var r=0;r<e.length;r+=1)on(e[r],c(Cr,this),c(Ne,this))}function At(){if(this.linked){var e=c(nr,this),r=c($r,this);e===null?gi=r:w($r,e,r),r===null?yr=e:w(nr,r,e),this.linked=!1}}function _i(e){var r=Kr;Kr=!0;try{var t;for(e&&($!==null&&!$.is_fork&&$.flush(),t=e());;){if(Tc(),$===null)return t;$.flush()}}finally{Kr=r}}function Nc(){try{kc()}catch(e){Pe(e,ki)}}var Me=null;function vo(e){var r=e.length;if(r!==0){for(var t=0;t<r;){var i=e[t++];if((i.f&24576)===0&&ot(i)&&(Me=new Set,Ar(i),i.deps===null&&i.first===null&&i.nodes===null&&i.teardown===null&&i.ac===null&&En(i),Me?.size>0)){Ae.clear();for(const o of Me){if((o.f&24576)!==0)continue;const n=[o];let a=o.parent;for(;a!==null;)Me.has(a)&&(Me.delete(a),n.push(a)),a=a.parent;for(let s=n.length-1;s>=0;s--){const l=n[s];!(l.f&24576)&&Ar(l)}}Me.clear()}}Me=null}}function dn(e){$.schedule(e)}function pn(e,r){if(!((e.f&32)!==0&&(e.f&1024)!==0)){(e.f&2048)!==0?r.d.push(e):e.f&4096&&r.m.push(e),j(e,ue);for(var t=e.first;t!==null;)pn(t,r),t=t.next}}function hn(e){j(e,ue);for(var r=e.first;r!==null;)hn(r),r=r.next}var Pt=new Set,Ae=new Map,bn=!1;function sr(e,r){return{f:0,v:e,reactions:null,equals:Xo,rv:0,wv:0}}function J(e,r){const t=sr(e,r);return Cn(t),t}function vn(e,r=!1,t=!0){const i=sr(e);if(r||(i.equals=Zo),tt&&t&&q!==null&&q.l!==null){var o;((o=q.l).s??(o.s=[])).push(i)}return i}function W(e,r,t=!1){return E!==null&&(!me||E.f&131072)&&it()&&E.f&4325394&&(ye===null||!ye.has(e))&&Sc(),Or(e,t?Sr(r):r,Mt)}var rr=null,xi=0;function Or(e,r,t=null){if(!e.equals(r)){We?Ae.set(e,r):Ae.has(e)||Ae.set(e,e.v);var i=fr.ensure();if(i.capture(e,r),(e.f&2)!==0){const o=e;e.f&2048&&Ni(o),K===null&&ji(o)}e.wv=An(),rr=null,xi=0,mn(e,xe,t),rr=null,it()&&S!==null&&S.f&1024&&!(S.f&96)&&(le===null?Xc([e]):le.push(e)),!i.is_fork&&Pt.size>0&&!bn&&Wc()}return r}function Wc(){bn=!1;for(const e of Pt){e.f&1024&&j(e,ur);let r;try{r=ot(e)}catch{r=!0}r&&Ar(e)}Pt.clear()}function Ur(e){W(e,e.v+1)}function mn(e,r,t){var i=e.reactions;if(i!==null){var o=it(),n=i.length;if(xi+=n,xi>1e5&&rr===null&&(rr=new Set),rr!==null){if(rr.has(e))return;rr.add(e)}for(var a=0;a<n;a++){var s=i[a],l=s.f;if(!(!o&&s===S)){var u=(l&xe)===0;if(u&&j(s,r),(l&131072)!==0)Pt.add(s);else if((l&2)!==0){var f=s;K?.delete(f),mn(f,ur,t)}else if(u){var d=s;l&16&&Me!==null&&Me.add(d),t!==null?t.push(d):dn(d)}}}}}function Sr(e){if(typeof e!="object"||e===null||Gr in e||Uo in e)return e;const r=Go(e);if(r!==ec&&r!==rc)return e;var t=new Map,i=Fo(e),o=J(0),n=null,a=ar,s=l=>{if(ar===a)return l();var u=E,f=ar;de(null),yo(a);var d=l();return de(u),yo(f),d};return i&&t.set("length",J(e.length,n)),new Proxy(e,{defineProperty(l,u,f){(!("value"in f)||f.configurable===!1||f.enumerable===!1||f.writable===!1)&&xc();var d=t.get(u);return d===void 0?s(()=>{var b=J(f.value,n);return t.set(u,b),b}):W(d,f.value,!0),!0},deleteProperty(l,u){var f=t.get(u);if(f===void 0){if(u in l){const d=s(()=>J(N,n));t.set(u,d),Ur(o)}}else W(f,N),Ur(o);return!0},get(l,u,f){if(u===Gr)return e;var d=t.get(u),b=u in l;if(d===void 0&&(!b||or(l,u)?.writable)&&(d=s(()=>J(Sr(b?l[u]:N),n)),t.set(u,d)),d!==void 0){var h=p(d);return h===N?void 0:h}return Reflect.get(l,u,f)},getOwnPropertyDescriptor(l,u){this.has?.(l,u);var f=Reflect.getOwnPropertyDescriptor(l,u),d=t.get(u);if(d!==void 0){var b=p(d);if(b===N)return;if(f&&"value"in f)f.value=b;else return{enumerable:!0,configurable:!0,value:b,writable:!0}}return f},has(l,u){if(u===Gr)return!0;var f=t.get(u),d=f!==void 0&&f.v!==N||Reflect.has(l,u);return(f!==void 0||S!==null&&(!d||or(l,u)?.writable))&&(f===void 0&&(f=s(()=>J(d?Sr(l[u]):N,n)),t.set(u,f)),p(f)===N)?!1:d},set(l,u,f,d){var b=t.get(u),h=u in l;if(i&&u==="length")for(var m=f;m<b.v;m+=1){var y=t.get(m+"");y!==void 0?W(y,N):m in l&&(y=s(()=>J(N,n)),t.set(m+"",y))}if(b===void 0)(!h||or(l,u)?.writable)&&(b=s(()=>J(void 0,n)),W(b,Sr(f)),t.set(u,b));else{h=b.v!==N;var v=s(()=>Sr(f));W(b,v)}var g=Reflect.getOwnPropertyDescriptor(l,u);if(g?.set&&g.set.call(d,f),!h){if(i&&typeof u=="string"){var D=t.get("length"),R=Number(u);Number.isInteger(R)&&R>=D.v&&W(D,R+1)}Ur(o)}return!0},ownKeys(l){p(o);var u=Reflect.ownKeys(l).filter(b=>{var h=t.get(b);return h===void 0||h.v!==N});for(var[f,d]of t)d.v!==N&&!(f in l)&&u.push(f);return u},setPrototypeOf(){$c()}})}var mo,gn,yn,kn;function $i(){if(mo===void 0){mo=window,gn=/Firefox/.test(navigator.userAgent);var e=Element.prototype,r=Node.prototype,t=Text.prototype;yn=or(r,"firstChild").get,kn=or(r,"nextSibling").get,uo(e)&&(e[vi]=void 0,e[bi]=null,e[mi]=void 0,e.__e=void 0),uo(t)&&(t[mt]=void 0)}}function Z(e=""){return document.createTextNode(e)}function ie(e){return yn.call(e)}function Re(e){return kn.call(e)}function re(e,r){if(!M)return ie(e);var t=ie(T);if(t===null)t=T.appendChild(Z());else if(r&&t.nodeType!==3){var i=Z();return t?.before(i),U(i),i}return r&&Vt(t),U(t),t}function zc(e,r=!1){if(!M){var t=ie(e);return t instanceof Comment&&t.data===""?Re(t):t}if(r){if(T?.nodeType!==3){var i=Z();return T?.before(i),U(i),i}Vt(T)}return T}function jr(e,r=!1){if(!M)return ie(e);var t=re(e,r);return Q(e),t}function Se(e,r=1,t=!1){let i=M?T:e;for(var o;r--;)o=i,i=Re(i);if(!M)return i;if(t){if(i?.nodeType!==3){var n=Z();return i===null?o?.after(n):i.before(n),U(n),n}Vt(i)}return U(i),i}function wn(e){e.textContent=""}function _n(){return!Wt||Me!==null?!1:(S.f&Ri)!==0}function zi(e,r,t){return r==null||r==="http://www.w3.org/1999/xhtml"?t?document.createElement(e,{is:t}):document.createElement(e):t?document.createElementNS(r,e,{is:t}):document.createElementNS(r,e)}function Vt(e){if(e.nodeValue.length<65536)return;let r=e.nextSibling;for(;r!==null&&r.nodeType===3;)r.remove(),e.nodeValue+=r.nodeValue,r=e.nextSibling}function Vc(e){var r=S;if(r===null)return E.f|=St,e;if((r.f&32768)===0&&(r.f&4)===0)throw e;Pe(e,r)}function Pe(e,r){if(!(r!==null&&(r.f&16384)!==0)){for(;r!==null;){if((r.f&128)!==0&&(r.f&33570816)===0){if((r.f&32768)===0)throw e;try{r.b.error(e);return}catch(t){e=t}}r=r.parent}throw e}}function Hc(e){S===null&&(E===null&&yc(e),gc()),We&&mc(e)}function Bc(e,r){var t=r.last;t===null?r.last=r.first=e:(t.next=e,e.prev=t,r.last=e)}function Ie(e,r){var t=S;t!==null&&t.f&8192&&(e|=qi);var i={ctx:q,deps:null,nodes:null,f:e|xe|512,first:null,fn:r,last:null,next:null,parent:t,b:t&&t.b,prev:null,teardown:null,wv:0,ac:null};$?.register_created_effect(i);var o=i;if((e&4)!==0)Xr!==null?Xr.push(i):fr.ensure().schedule(i);else if(r!==null){try{Ar(i)}catch(a){throw Y(i),a}o.deps===null&&o.teardown===null&&o.nodes===null&&o.first===o.last&&!(o.f&524288)&&(o=o.first,e&16&&e&65536&&o!==null&&(o.f|=Ii))}if(o!==null&&(o.parent=t,t!==null&&Bc(o,t),E!==null&&(E.f&2)!==0&&(e&64)===0)){var n=E;(n.effects??(n.effects=[])).push(o)}return i}function Vi(){return E!==null&&!me}function Fc(e){const r=Ie(8,null);return j(r,ue),r.teardown=e,r}function Hr(e){Hc("$effect");var r=S.f;if(!E&&(r&32)!==0&&q!==null&&!q.i){var t=q;(t.e??(t.e=[])).push(e)}else return xn(e)}function xn(e){return Ie(4|cc,e)}function Gc(e){fr.ensure();const r=Ie(64|Pr,e);return()=>{Y(r)}}function Kc(e){fr.ensure();const r=Ie(64|Pr,e);return(t={})=>new Promise(i=>{t.outro?dr(r,()=>{Y(r),i(void 0)}):(Y(r),i(void 0))})}function $n(e){return Ie(4,e)}function Uc(e){return Ie(sc|Pr,e)}function Hi(e,r=0){return Ie(8|r,e)}function ft(e,r=[],t=[],i=[]){Cc(i,r,t,o=>{Ie(8,()=>{e(...o.map(p))})})}function Bi(e,r=0){return Ie(16|r,e)}function fe(e){return Ie(32|Pr,e)}function Sn(e){var r=e.teardown;if(r!==null){const t=We,i=E;go(!0),de(null);try{r.call(null)}catch(o){Pe(o,e.parent)}finally{go(t),de(i)}}}function Fi(e,r=!1){var t=e.first;for(e.first=e.last=null;t!==null;){const o=t.ac;o!==null&&zt(()=>{o.abort(rt)});var i=t.next;(t.f&64)!==0?t.parent=null:Y(t,r),t=i}}function Yc(e){for(var r=e.first;r!==null;){var t=r.next;!(r.f&32)&&Y(r),r=t}}function Y(e,r=!0){var t=!1;(r||e.f&262144)&&e.nodes!==null&&e.nodes.end!==null&&(Qc(e.nodes.start,e.nodes.end),t=!0),e.f|=fo,Fi(e,r&&!t),Zr(e,0);var i=e.nodes&&e.nodes.t;if(i!==null)for(const n of i)n.stop();Sn(e),e.f^=fo,e.f|=ac;var o=e.parent;o!==null&&o.first!==null&&En(e),e.next=e.prev=e.teardown=e.ctx=e.deps=e.fn=e.nodes=e.ac=e.b=null}function Qc(e,r){for(;e!==null;){var t=e===r?null:Re(e);e.remove(),e=t}}function En(e){var r=e.parent,t=e.prev,i=e.next;t!==null&&(t.next=i),i!==null&&(i.prev=t),r!==null&&(r.first===e&&(r.first=i),r.last===e&&(r.last=t))}function dr(e,r,t=!0){var i=[];e.f|=256,Tn(e,i,!0);var o=()=>{t&&Y(e),r&&r()},n=i.length;if(n>0){var a=()=>--n||o();for(var s of i)s.out(a)}else o()}function Tn(e,r,t){if((e.f&8192)===0){e.f^=qi;var i=e.nodes&&e.nodes.t;if(i!==null)for(const s of i)(s.is_global||t)&&r.push(s);for(var o=e.first;o!==null;){var n=o.next;if((o.f&64)===0){var a=(o.f&65536)!==0||(o.f&32)!==0&&(e.f&16)!==0;Tn(o,r,a?t:!1)}o=n}}}function qt(e){e.f&=-257,Mn(e,!0)}function Mn(e,r){if((e.f&256)===0&&(e.f&8192)!==0){e.f^=qi,!(e.f&1024)&&(j(e,xe),fr.ensure().schedule(e));for(var t=e.first;t!==null;){var i=t.next,o=(t.f&65536)!==0||(t.f&32)!==0;Mn(t,o?r:!1),t=i}var n=e.nodes&&e.nodes.t;if(n!==null)for(const a of n)(a.is_global||r)&&a.in()}}function Gi(e,r){if(e.nodes)for(var t=e.nodes.start,i=e.nodes.end;t!==null;){var o=t===i?null:Re(t);r.append(t),t=o}}var Jc=null,gt=!1,We=!1;function go(e){We=e}var E=null,me=!1;function de(e){E=e}var S=null;function qe(e){S=e}var ye=null;function Cn(e){E!==null&&(E.f&2097152||E.f&2)&&(ye??(ye=new Set)).add(e)}var X=null,te=0,le=null;function Xc(e){le=e}var On=1,ir=0,ar=ir;function yo(e){ar=e}function An(){return++On}function ot(e){var r=e.f;if((r&2048)!==0)return!0;if((r&4096)!==0){for(var t=e.deps,i=t.length,o=0;o<i;o++){var n=t[o];if(ot(n)&&an(n),n.wv>e.wv)return!0}r&512&&K===null&&j(e,ue)}return!1}function Pn(e,r,t=!0){var i=e.reactions;if(i!==null&&!(!Wt&&ye!==null&&ye.has(e)))for(var o=0;o<i.length;o++){var n=i[o];(n.f&2)!==0?Pn(n,r,!1):r===n&&(t?j(n,xe):n.f&1024&&j(n,ur),dn(n))}}function qn(e){var r=X,t=te,i=le,o=E,n=ye,a=q,s=me,l=ar,u=e.f;X=null,te=0,le=null,E=(u&96)===0?e:null,ye=null,Mr(e.ctx),me=!1,ar=++ir,e.ac!==null&&(zt(()=>{e.ac.abort(rt)}),e.ac=null);try{e.f|=po;var f=e.fn,d=f();e.f|=Ri;var b=ko(e);if(it()&&le!==null&&!me&&b!==null&&(e.f&6146)===0)for(var h=0;h<le.length;h++)Pn(le[h],e);if(o!==null&&o!==e){if(ir++,o.deps!==null)for(let m=0;m<t;m+=1)o.deps[m].rv=ir;if(r!==null)for(const m of r)m.rv=ir;le!==null&&(i===null?i=le:i.push(...le))}return e.f&8388608&&(e.f^=St),d}catch(m){return ko(e),Vc(m)}finally{e.f^=po,X=r,te=t,le=i,E=o,ye=n,Mr(a),me=s,ar=l}}function ko(e){var r=e.deps,t=$?.is_fork;if(X!==null){var i;if(t||Zr(e,te),r!==null&&te>0)for(r.length=te+X.length,i=0;i<X.length;i++)r[te+i]=X[i];else e.deps=r=X;if(Vi()&&(e.f&512)!==0)for(i=te;i<r.length;i++){var o;((o=r[i]).reactions??(o.reactions=[])).push(e)}}else!t&&r!==null&&te<r.length&&(Zr(e,te),r.length=te);return r}function Zc(e,r){let t=r.reactions;if(t!==null){var i=Xa.call(t,e);if(i!==-1){var o=t.length-1;o===0?t=r.reactions=null:(t[i]=t[o],t.pop())}}if(t===null&&(r.f&2)!==0&&(X===null||!hi.call(X,r))){var n=r;n.f&512&&(n.f^=512),n.v!==N&&ji(n),n.ac!==null&&zt(()=>{n.ac.abort(rt),n.ac=null,j(n,xe)}),qc(n),Zr(n,0)}}function Zr(e,r){var t=e.deps;if(t!==null)for(var i=r;i<t.length;i++)Zc(e,t[i])}function Ar(e){var r=e.f;if((r&16384)===0){j(e,ue);var t=S,i=gt;S=e,gt=(r&96)===0;try{(r&16777232)!==0?Yc(e):Fi(e),Sn(e);var o=qn(e);e.teardown=typeof o=="function"?o:null,e.wv=On}finally{gt=i,S=t}}}function p(e){var r=(e.f&2)!==0;if(Jc?.add(e),E!==null&&!me&&!(S!==null&&(S.f&16384)!==0)&&(ye===null||!ye.has(e))){var t=E.deps;if((E.f&2097152)!==0)e.rv<ir&&(e.rv=ir,X===null&&t!==null&&t[te]===e?te++:X===null?X=[e]:X.push(e));else{var i;(i=E).deps??(i.deps=[]),hi.call(E.deps,e)||E.deps.push(e);var o=e.reactions;o===null?e.reactions=[E]:hi.call(o,E)||o.push(E)}}if(We&&Ae.has(e))return Ae.get(e);if(r){var n=e;if(We){var a=n.v;return(!(n.f&1024)&&n.reactions!==null||In(n))&&(a=Ni(n)),Ae.set(n,a),a}var s=(n.f&512)===0&&!me&&E!==null&&(gt||(E.f&512)!==0),l=(n.f&Ri)===0;ot(n)&&(s&&(n.f|=512),an(n)),s&&!l&&(cn(n),Rn(n))}if(K?.has(e))return K.get(e);if((e.f&8388608)!==0)throw e.v;return e.v}function Rn(e){if(e.f|=512,e.deps!==null)for(const r of e.deps)(r.reactions??(r.reactions=[])).push(e),r.f&2&&!(r.f&512)&&(cn(r),Rn(r))}function In(e){if(e.v===N)return!0;if(e.deps===null)return!1;for(const r of e.deps)if(Ae.has(r)||(r.f&2)!==0&&In(r))return!0;return!1}function Ht(e){var r=me;try{return me=!0,e()}finally{me=r}}var Er=Symbol("events"),Dn=new Set,Si=new Set;function ei(e,r,t){(r[Er]??(r[Er]={}))[e]=t}function es(e){for(var r=0;r<e.length;r++)Dn.add(e[r]);for(var t of Si)t(e)}var ri=null,ti=!1;function wo(e){var r=this,t=r.ownerDocument,i=e.type,o=e.composedPath?.()||[],n=o[0]||e.target;ri=e,ti||(ti=!0,setTimeout(()=>{ti=!1,ri=null}));var a=0,s=ri===e&&e[Er];if(s){var l=o.indexOf(s);if(l!==-1&&(r===document||r===window)){e[Er]=r;return}var u=o.indexOf(r);if(u===-1)return;l<=u&&(a=l)}if(n=o[a]||e.target,n!==r){Yr(e,"currentTarget",{configurable:!0,get(){return n||t}});var f=E,d=S;de(null),qe(null);try{for(var b,h=[];n!==null&&n!==r;){try{var m=n[Er]?.[i];m!=null&&(!n.disabled||e.target===n)&&m.call(n,e)}catch(y){b?h.push(y):b=y}if(e.cancelBubble)break;a++,n=a<o.length?o[a]:null}if(b){for(let y of h)queueMicrotask(()=>{throw y});throw b}}finally{e[Er]=r,delete e.currentTarget,de(f),qe(d)}}}var rs=globalThis?.window?.trustedTypes&&globalThis.window.trustedTypes.createPolicy("svelte-trusted-html",{createHTML:e=>e});function ts(e){return rs?.createHTML(e)??e}function jn(e){var r=zi("template");return r.innerHTML=ts(e.replaceAll("<!>","<!---->")),r.content}function ke(e,r){var t=S;t.nodes===null&&(t.nodes={start:e,end:r,a:null,t:null})}function Bt(e,r){var t=(r&1)!==0,i=(r&2)!==0,o,n=!e.startsWith("<!>");return()=>{if(M)return ke(T,null),T;o===void 0&&(o=jn(n?e:"<!>"+e),t||(o=ie(o)));var a=i||gn?document.importNode(o,!0):o.cloneNode(!0);if(t){var s=ie(a),l=a.lastChild;ke(s,l)}else ke(a,a);return a}}function is(e,r,t="svg"){var i=!e.startsWith("<!>"),o=(r&1)!==0,n=`<${t}>${i?e:"<!>"+e}</${t}>`,a;return()=>{if(M)return ke(T,null),T;if(!a){var s=ie(jn(n));if(o)for(a=document.createDocumentFragment();ie(s);)a.appendChild(ie(s));else a=ie(s)}var l=a.cloneNode(!0);if(o){var u=ie(l),f=l.lastChild;ke(u,f)}else ke(l,l);return l}}function os(e,r){return is(e,r,"svg")}function ns(e=""){if(!M){var r=Z(e+"");return ke(r,r),r}var t=T;return t.nodeType!==3?(t.before(t=Z()),U(t)):Vt(t),ke(t,t),t}function as(){if(M)return ke(T,null),T;var e=document.createDocumentFragment(),r=document.createComment(""),t=Z();return e.append(r,t),ke(r,t),e}function Ge(e,r){if(M){var t=S;(!(t.f&32768)||t.nodes.end===null)&&(t.nodes.end=T),Nt();return}e!==null&&e.before(r)}var cs=["touchstart","touchmove"];function ss(e){return cs.includes(e)}function ls(e){let r=0,t=sr(0),i;return()=>{Vi()&&(p(t),Hi(()=>(r===0&&(i=Ht(()=>e(()=>Ur(t)))),r+=1,()=>{Qe(()=>{r-=1,r===0&&(i?.(),i=void 0,Ur(t))})})))}}var us=Ii|Pr;function fs(e,r,t,i){new ds(e,r,t,i)}var we=new WeakMap,Ei=new WeakMap,Oe=new WeakMap,et=new WeakMap,oe=new WeakMap,_e=new WeakMap,ne=new WeakMap,ge=new WeakMap,Ye=new WeakMap,wr=new WeakMap,cr=new WeakMap,dt=new WeakMap,Ti=new WeakMap,Mi=new WeakMap,Xe=new WeakMap,_o=new WeakMap,z=new WeakSet,ds=class{constructor(e,r,t,i){Wi(this,z),A(this,"parent",void 0),A(this,"is_pending",!1),A(this,"transform_error",void 0),_(this,we,void 0),_(this,Ei,M?T:null),_(this,Oe,void 0),_(this,et,void 0),_(this,oe,void 0),_(this,_e,null),_(this,ne,null),_(this,ge,null),_(this,Ye,null),_(this,wr,0),_(this,cr,0),_(this,dt,!1),_(this,Ti,new Set),_(this,Mi,new Set),_(this,Xe,null),_(this,_o,ls(()=>(w(Xe,this,sr(c(wr,this))),()=>{w(Xe,this,null)}))),w(we,this,e),w(Oe,this,r),w(et,this,o=>{var n=S;n.b=this,n.f|=128,t(o)}),this.parent=S.b,this.transform_error=i??this.parent?.transform_error??(o=>o),w(oe,this,Bi(()=>{if(M){const o=c(Ei,this);Nt();const n=o.data==="[!";if(o.data.startsWith("[?")){const a=JSON.parse(o.data.slice(2));x(z,this,hs).call(this,a)}else n?x(z,this,bs).call(this):x(z,this,ps).call(this)}else x(z,this,Nn).call(this)},us)),M&&w(we,this,T)}defer_effect(e){on(e,c(Ti,this),c(Mi,this))}is_rendered(){return!this.is_pending&&(!this.parent||this.parent.is_rendered())}has_pending_snippet(){return!!c(Oe,this).pending}update_pending_count(e,r){x(z,this,Wn).call(this,e,r),w(wr,this,c(wr,this)+e),c(Xe,this)&&!c(dt,this)&&(w(dt,this,!0),Qe(()=>{w(dt,this,!1),c(Xe,this)&&Or(c(Xe,this),c(wr,this))}))}get_effect_pending(){return c(_o,this).call(this),p(c(Xe,this))}error(e){if(!c(Oe,this).onerror&&!c(Oe,this).failed)throw e;$?.is_fork?(c(_e,this)&&$.skip_effect(c(_e,this)),c(ne,this)&&$.skip_effect(c(ne,this)),c(ge,this)&&$.skip_effect(c(ge,this)),$.oncommit(()=>{x(z,this,xo).call(this,e)})):x(z,this,xo).call(this,e)}};function ps(){try{w(_e,this,fe(()=>c(et,this).call(this,c(we,this))))}catch(e){this.error(e)}}function hs(e){const r=c(Oe,this).failed,{reset:t,invoke_onerror:i}=x(z,this,Ln).call(this,e);Qe(i),r&&w(ge,this,fe(()=>{r(c(we,this),()=>e,()=>t)}))}function Ln(e){var r=!1,t=!1;const i=()=>{if(r){dc();return}r=!0,t&&Ec(),c(ge,this)!==null&&dr(c(ge,this),()=>{w(ge,this,null)}),x(z,this,Ki).call(this,()=>{x(z,this,Nn).call(this)})};return{reset:i,invoke_onerror:()=>{try{t=!0,c(Oe,this).onerror?.(e,i),t=!1}catch(o){Pe(o,c(oe,this)&&c(oe,this).parent)}}}}function bs(){const e=c(Oe,this).pending;e&&(this.is_pending=!0,w(ne,this,fe(()=>e(c(we,this)))),Qe(()=>{var r=w(Ye,this,document.createDocumentFragment()),t=Z(),i=!1;if(r.append(t),w(_e,this,x(z,this,Ki).call(this,()=>{try{return fe(()=>c(et,this).call(this,t))}catch(o){try{this.error(o),i=!0}catch(n){Pe(n,c(oe,this).parent)}return null}})),c(_e,this)===null){w(Ye,this,null),i&&x(z,this,Rt).call(this,$);return}c(cr,this)===0&&(c(we,this).before(r),w(Ye,this,null),dr(c(ne,this),()=>{w(ne,this,null)}),x(z,this,Rt).call(this,$))}))}function Nn(){try{if(this.is_pending=this.has_pending_snippet(),w(cr,this,0),w(wr,this,0),w(_e,this,fe(()=>{c(et,this).call(this,c(we,this))})),c(cr,this)>0){var e=w(Ye,this,document.createDocumentFragment());Gi(c(_e,this),e);const r=c(Oe,this).pending;w(ne,this,fe(()=>r(c(we,this))))}else x(z,this,Rt).call(this,$)}catch(r){this.error(r)}}function Rt(e){this.is_pending=!1,e.transfer_effects(c(Ti,this),c(Mi,this))}function Ki(e){var r=S,t=E,i=q;qe(c(oe,this)),de(c(oe,this)),Mr(c(oe,this).ctx);try{return fr.ensure(),e()}finally{qe(r),de(t),Mr(i)}}function Wn(e,r){if(!this.has_pending_snippet()){if(this.parent){var t;x(z,t=this.parent,Wn).call(t,e,r)}return}w(cr,this,c(cr,this)+e),c(cr,this)===0&&(x(z,this,Rt).call(this,r),c(ne,this)&&dr(c(ne,this),()=>{w(ne,this,null)}),c(Ye,this)&&(c(we,this).before(c(Ye,this)),w(Ye,this,null)))}function xo(e){c(_e,this)&&(Y(c(_e,this)),w(_e,this,null)),c(ne,this)&&(Y(c(ne,this)),w(ne,this,null)),c(ge,this)&&(Y(c(ge,this)),w(ge,this,null)),M&&(U(c(Ei,this)),Qo(),U(Et()));let r=c(Oe,this).failed;const t=i=>{const{reset:o,invoke_onerror:n}=x(z,this,Ln).call(this,i);n(),r&&w(ge,this,x(z,this,Ki).call(this,()=>{try{return fe(()=>{var a=S;a.b=this,a.f|=128,r(c(we,this),()=>i,()=>o)})}catch(a){return Pe(a,c(oe,this).parent),null}}))};Qe(()=>{var i;try{i=this.transform_error(e)}catch(o){Pe(o,c(oe,this)&&c(oe,this).parent);return}i!==null&&typeof i=="object"&&typeof i.then=="function"?i.then(t,o=>Pe(o,c(oe,this)&&c(oe,this).parent)):t(i)})}function mr(e,r){var t=r==null?"":typeof r=="object"?`${r}`:r;t!==(e[mt]??(e[mt]=e.nodeValue))&&(e[mt]=t,e.nodeValue=`${t}`)}function zn(e,r){return Vn(e,r)}function vs(e,r){$i(),r.intro=r.intro??!1;const t=r.target,i=M,o=T;try{for(var n=ie(t);n&&(n.nodeType!==8||n.data!=="[");)n=Re(n);if(!n)throw Tr;Le(!0),U(n);const a=Vn(e,{...r,anchor:n});return Le(!1),a}catch(a){if(a instanceof Error&&a.message.split(`
|
|
22
|
+
`).some(s=>s.startsWith("https://svelte.dev/e/")))throw a;return a!==Tr&&console.warn("Failed to hydrate: ",a),r.recover===!1&&wc(),$i(),wn(t),Le(!1),zn(e,r)}finally{Le(i),U(o)}}var pt=new Map;function Vn(e,{target:r,anchor:t,props:i={},events:o,context:n,intro:a=!0,transformError:s}){$i();var l=void 0,u=Kc(()=>{var f=t??r.appendChild(Z());fs(f,{pending:()=>{}},h=>{en({});var m=q;if(n&&(m.c=n),o&&(i.$$events=o),M&&ke(h,null),l=e(h,i)||Di(),M&&(S.nodes.end=T,T===null||T.nodeType!==8||T.data!=="]"))throw Lt(),Tr;rn()},s);var d=new Set,b=h=>{for(var m=0;m<h.length;m++){var y=h[m];if(!d.has(y)){d.add(y);var v=ss(y);for(const R of[r,document]){var g=pt.get(R);g===void 0&&(g=new Map,pt.set(R,g));var D=g.get(y);D===void 0?(R.addEventListener(y,wo,{passive:v}),g.set(y,1)):g.set(y,D+1)}}}};return b(jt(Dn)),Si.add(b),()=>{for(var h of d)for(const v of[r,document]){var m=pt.get(v),y=m.get(h);--y==0?(v.removeEventListener(h,wo),m.delete(h),m.size===0&&pt.delete(v)):m.set(h,y)}Si.delete(b),f!==t&&f.parentNode?.removeChild(f)}});return Ci.set(l,u),l}var Ci=new WeakMap;function ms(e,r){const t=Ci.get(e);return t?(Ci.delete(e),t(r)):Promise.resolve()}var je=new WeakMap,Be=new WeakMap,ve=new WeakMap,Lr=new WeakMap,ii=new WeakMap,oi=new WeakMap,$o=new WeakMap,gs=class{constructor(e,r=!0){A(this,"anchor",void 0),_(this,je,new Map),_(this,Be,new Map),_(this,ve,new Map),_(this,Lr,new Set),_(this,ii,!0),_(this,oi,t=>{if(c(je,this).has(t)){var i=c(je,this).get(t),o=c(Be,this).get(i);if(o)qt(o),c(Lr,this).delete(i);else{var n=c(ve,this).get(i);n&&(qt(n.effect),c(Be,this).set(i,n.effect),c(ve,this).delete(i),n.fragment.lastChild.remove(),this.anchor.before(n.fragment),o=n.effect)}for(const[a,s]of c(je,this)){if(c(je,this).delete(a),a===t)break;const l=c(ve,this).get(s);l&&(Y(l.effect),c(ve,this).delete(s))}for(const[a,s]of c(Be,this)){if(a===i||c(Lr,this).has(a))continue;const l=()=>{if(Array.from(c(je,this).values()).includes(a)){var u=document.createDocumentFragment();Gi(s,u),u.append(Z()),c(ve,this).set(a,{effect:s,fragment:u})}else Y(s);c(Lr,this).delete(a),c(Be,this).delete(a)};c(ii,this)||!o?(c(Lr,this).add(a),dr(s,l,!1)):l()}}}),_(this,$o,t=>{c(je,this).delete(t);const i=Array.from(c(je,this).values());for(const[o,n]of c(ve,this))i.includes(o)||(Y(n.effect),c(ve,this).delete(o))}),this.anchor=e,w(ii,this,r)}ensure(e,r){var t=$,i=_n();if(r&&!c(Be,this).has(e)&&!c(ve,this).has(e))if(i){var o=document.createDocumentFragment(),n=Z();o.append(n),c(ve,this).set(e,{effect:fe(()=>r(n)),fragment:o})}else c(Be,this).set(e,fe(()=>r(this.anchor)));if(c(je,this).set(t,e),i){for(const[a,s]of c(Be,this))a===e?t.unskip_effect(s):t.skip_effect(s);for(const[a,s]of c(ve,this))a===e?t.unskip_effect(s.effect):t.skip_effect(s.effect);t.oncommit(c(oi,this)),t.ondiscard(c($o,this))}else M&&(this.anchor=T),c(oi,this).call(this,t)}};function ys(e){q===null&&hc("onMount"),tt&&q.l!==null?ks(q).m.push(e):Hr(()=>{const r=Ht(e);if(typeof r=="function")return r})}function ks(e){var r=e.l;return r.u??(r.u={a:[],b:[],m:[]})}function Nr(e,r,t=!1){var i;M&&(i=T,Nt());var o=new gs(e),n=t?Ii:0;function a(s,l){if(M){var u=Jo(i);if(s!==parseInt(u.substring(1))){var f=Et();U(f),o.anchor=f,Le(!1),o.ensure(s,l),Le(!0);return}}o.ensure(s,l)}Bi(()=>{var s=!1;r((l,u=0)=>{s=!0,a(u,l)}),s||a(-1,null)},n)}function ws(e,r,t){for(var i=[],o=r.length,n,a=r.length,s=0;s<o;s++){let d=r[s];dr(d,()=>{if(n){if(n.pending.delete(d),n.done.add(d),n.pending.size===0){var b=e.outrogroups;Oi(e,jt(n.done)),b.delete(n),b.size===0&&(e.outrogroups=null)}}else a-=1},!1)}if(a===0){var l=i.length===0&&t!==null&&e.pending.size===0;if(l){var u=t,f=u.parentNode;wn(f),f.append(u),e.items.clear()}Oi(e,r,!l)}else n={pending:new Set(r),done:new Set},(e.outrogroups??(e.outrogroups=new Set)).add(n)}function Oi(e,r,t=!0){var i;if(e.pending.size>0){i=new Set;for(const a of e.pending.values())for(const s of a)i.add(e.items.get(s).e)}for(var o=0;o<r.length;o++){var n=r[o];i?.has(n)?(n.f|=Fr,Gi(n,document.createDocumentFragment())):Y(r[o],t)}}var ht;function _s(e,r,t,i,o,n=null){var a=e,s=new Map;if((r&4)!==0){var l=e;a=M?U(ie(l)):l.appendChild(Z())}M&&Nt();var u=null,f=Li(()=>{var g=t();return Fo(g)?g:g==null?[]:jt(g)}),d,b=new Map,h=!0;function m(g){!(v.effect.f&16384)&&(v.pending.delete(g),v.fallback=u,xs(v,d,a,r,i),u!==null&&(d.length===0?(u.f&33554432)===0?qt(u):(u.f^=Fr,Br(u,null,a)):dr(u,()=>{u=null})))}function y(g){v.pending.delete(g)}var v={effect:Bi(()=>{d=p(f);var g=d.length;let D=!1;M&&Jo(a)==="[!"!=(g===0)&&(a=Et(),U(a),Le(!1),D=!0);for(var R=new Set,k=$,ae=_n(),B=0;B<g;B+=1){M&&T.nodeType===8&&T.data==="]"&&(a=T,D=!0,Le(!1));var ce=d[B],pe=i(ce,B),ee=h?null:s.get(pe);ee?(ee.v&&Or(ee.v,ce),ee.i&&Or(ee.i,B),ae&&k.unskip_effect(ee.e)):(ee=$s(s,h?a:ht??(ht=Z()),ce,pe,B,o,r,t),h||(ee.e.f|=Fr),s.set(pe,ee)),R.add(pe)}if(g===0&&n&&!u&&(h?u=fe(()=>n(a)):(u=fe(()=>n(ht??(ht=Z()))),u.f|=Fr)),g>R.size&&vc("","",""),M&&g>0&&U(Et()),!h)if(b.set(k,R),ae){for(const[$e,C]of s)R.has($e)||k.skip_effect(C.e);k.oncommit(m),k.ondiscard(y)}else m(k);D&&Le(!0),p(f)}),flags:r,items:s,pending:b,outrogroups:null,fallback:u};h=!1,M&&(a=T)}function Wr(e){for(;e!==null&&(e.f&32)===0;)e=e.next;return e}function xs(e,r,t,i,o){var n=(i&8)!==0,a=r.length,s=e.items,l=Wr(e.effect.first),u,f=null,d,b=[],h=[],m,y,v,g;if(n)for(g=0;g<a;g+=1)m=r[g],y=o(m,g),v=s.get(y).e,!(v.f&33554432)&&(v.nodes?.a?.measure(),(d??(d=new Set)).add(v));for(g=0;g<a;g+=1){if(m=r[g],y=o(m,g),v=s.get(y).e,e.outrogroups!==null)for(const $e of e.outrogroups)$e.pending.delete(v),$e.done.delete(v);if(v.f&8192&&(qt(v),n&&(v.nodes?.a?.unfix(),(d??(d=new Set)).delete(v))),(v.f&33554432)!==0)if(v.f^=Fr,v===l)Br(v,null,t);else{var D=f?f.next:l;v===e.effect.last&&(e.effect.last=v.prev),v.prev&&(v.prev.next=v.next),v.next&&(v.next.prev=v.prev),Fe(e,f,v),Fe(e,v,D),Br(v,D,t),f=v,b=[],h=[],l=Wr(f.next);continue}if(v!==l){if(u!==void 0&&u.has(v)){if(b.length<h.length){var R=h[0],k;f=R.prev;var ae=b[0],B=b[b.length-1];for(k=0;k<b.length;k+=1)Br(b[k],R,t);for(k=0;k<h.length;k+=1)u.delete(h[k]);Fe(e,ae.prev,B.next),Fe(e,f,ae),Fe(e,B,R),l=R,f=B,g-=1,b=[],h=[]}else u.delete(v),Br(v,l,t),Fe(e,v.prev,v.next),Fe(e,v,f===null?e.effect.first:f.next),Fe(e,f,v),f=v;continue}for(b=[],h=[];l!==null&&l!==v;)(u??(u=new Set)).add(l),h.push(l),l=Wr(l.next);if(l===null)continue}!(v.f&33554432)&&b.push(v),f=v,l=Wr(v.next)}if(e.outrogroups!==null){for(const $e of e.outrogroups)$e.pending.size===0&&(Oi(e,jt($e.done)),e.outrogroups?.delete($e));e.outrogroups.size===0&&(e.outrogroups=null)}if(l!==null||u!==void 0){var ce=[];if(u!==void 0)for(v of u)!(v.f&8192)&&ce.push(v);for(;l!==null;)!(l.f&8192)&&l!==e.fallback&&ce.push(l),l=Wr(l.next);var pe=ce.length;if(pe>0){var ee=(i&4)!==0&&a===0?t:null;if(n){for(g=0;g<pe;g+=1)ce[g].nodes?.a?.measure();for(g=0;g<pe;g+=1)ce[g].nodes?.a?.fix()}ws(e,ce,ee)}}n&&Qe(()=>{if(d!==void 0)for(v of d)v.nodes?.a?.apply()})}function $s(e,r,t,i,o,n,a,s){var l=(a&1)!==0?(a&16)===0?vn(t,!1,!1):sr(t):null,u=(a&2)!==0?sr(o):null;return{v:l,i:u,e:fe(()=>(n(r,l??t,u??o,s),()=>{e.delete(i)}))}}function Br(e,r,t){if(e.nodes)for(var i=e.nodes.start,o=e.nodes.end,n=r&&(r.f&33554432)===0?r.nodes.start:t;i!==null;){var a=Re(i);if(n.before(i),i===o)return;i=a}}function Fe(e,r,t){r===null?e.effect.first=t:r.next=t,t===null?e.effect.last=r:t.prev=r}function Ss(e,r){$n(()=>{e=S?.parent?.nodes?.start??e;var t=e.getRootNode(),i=t.host?t:t.head??t.ownerDocument.head;if(!i.querySelector("#"+r.hash)){const o=zi("style");o.id=r.hash,o.textContent=r.code,i.appendChild(o)}})}var So=[...`
|
|
23
|
+
\r\f \v\uFEFF`];function Es(e,r,t){var i=e==null?"":""+e;if(r&&(i=i?i+" "+r:r),t){for(var o of Object.keys(t))if(t[o])i=i?i+" "+o:o;else if(i.length)for(var n=o.length,a=0;(a=i.indexOf(o,a))>=0;){var s=a+n;(a===0||So.includes(i[a-1]))&&(s===i.length||So.includes(i[s]))?i=(a===0?"":i.substring(0,a))+i.substring(s+1):a=s}}return i===""?null:i}function Eo(e,r=!1){var t=r?" !important;":";",i="";for(var o of Object.keys(e)){var n=e[o];n!=null&&n!==""&&(i+=" "+o+": "+n+t)}return i}function ni(e){return e[0]!=="-"||e[1]!=="-"?e.toLowerCase():e}function Ts(e,r){if(r){var t="",i,o;if(Array.isArray(r)?(i=r[0],o=r[1]):i=r,e){e=String(e).replaceAll(/\/\*.*?\*\//g,"").trim();var n=!1,a=0,s=!1,l=[];i&&l.push(...Object.keys(i).map(ni)),o&&l.push(...Object.keys(o).map(ni));var u=0,f=-1;const y=e.length;for(var d=0;d<y;d++){var b=e[d];if(s?b==="/"&&e[d-1]==="*"&&(s=!1):n?n===b&&(n=!1):b==="/"&&e[d+1]==="*"?s=!0:b==='"'||b==="'"?n=b:b==="("?a++:b===")"&&a--,!s&&n===!1&&a===0){if(b===":"&&f===-1)f=d;else if(b===";"||d===y-1){if(f!==-1){var h=ni(e.substring(u,f).trim());if(!l.includes(h)){b!==";"&&d++;var m=e.substring(u,d).trim();t+=" "+m+";"}}u=d+1,f=-1}}}}return i&&(t+=Eo(i)),o&&(t+=Eo(o,!0)),t=t.trim(),t===""?null:t}return e==null?null:String(e)}function To(e,r,t,i,o,n){var a=e[vi];if(M||a!==t||a===void 0){var s=Es(t,i,n);(!M||s!==e.getAttribute("class"))&&(s==null?e.removeAttribute("class"):r?e.className=s:e.setAttribute("class",s)),e[vi]=t}else if(n&&o!==n)for(var l in n){var u=!!n[l];(o==null||u!==!!o[l])&&e.classList.toggle(l,u)}return n}function ai(e,r={},t,i){for(var o in t){var n=t[o];r[o]!==n&&(t[o]==null?e.style.removeProperty(o):e.style.setProperty(o,n,i))}}function gr(e,r,t,i){var o=e[mi];if(M||o!==r){var n=Ts(r,i);(!M||n!==e.getAttribute("style"))&&(n==null?e.removeAttribute("style"):e.style.cssText=n),e[mi]=r}else i&&(Array.isArray(i)?(ai(e,t?.[0],i[0]),ai(e,t?.[1],i[1],"important")):ai(e,t,i));return i}var Ms=Symbol("is custom element"),Cs=Symbol("is html"),Os=uc?"link":"LINK";function Ee(e,r,t,i){var o=As(e);M&&(o[r]=e.getAttribute(r),r==="src"||r==="srcset"||r==="href"&&e.nodeName===Os)||o[r]!==(o[r]=t)&&(r==="loading"&&(e[lc]=t),t==null?e.removeAttribute(r):typeof t!="string"&&Ps(e).has(r)?e[r]=t:e.setAttribute(r,t))}function As(e){return e[bi]??(e[bi]={[Ms]:e.nodeName.includes("-"),[Cs]:e.namespaceURI==="http://www.w3.org/1999/xhtml"})}var Mo=new Map;function Ps(e){var r=e.getAttribute("is")||e.nodeName,t=Mo.get(r);if(t)return t;Mo.set(r,t=new Set);for(var i,o=e,n=Element.prototype;n!==o;){i=Za(o);for(var a in i)i[a].set&&a!=="innerHTML"&&a!=="textContent"&&a!=="innerText"&&t.add(a);o=Go(o)}return t}var Hn,_r=new WeakMap,It=new WeakMap,ci=new WeakMap,Co=new WeakSet,Bn=class{constructor(e){Wi(this,Co),_(this,_r,new WeakMap),_(this,It,void 0),_(this,ci,void 0),w(ci,this,e)}observe(e,r){var t=c(_r,this).get(e)||new Set;return t.add(r),c(_r,this).set(e,t),x(Co,this,qs).call(this).observe(e,c(ci,this)),()=>{var i=c(_r,this).get(e);i.delete(r),i.size===0&&(c(_r,this).delete(e),c(It,this).unobserve(e))}}};Hn=Bn;function qs(){return c(It,this)??w(It,this,new ResizeObserver(e=>{for(var r of e){Hn.entries.set(r.target,r);for(var t of c(_r,this).get(r.target)||[])t(r)}}))}A(Bn,"entries",new WeakMap);function si(e,r){return e===r||e?.[Gr]===r}function Oo(e=Di(),r,t,i){var o=q.r,n=S;return $n(()=>{var a,s;return Hi(()=>{a=s,s=i?.()||[],Ht(()=>{si(t(...s),e)||(r(e,...s),a&&si(t(...a),e)&&r(null,...a))})}),()=>{let l=n;for(;l!==o&&l.parent!==null&&l.parent.f&33554432;)l=l.parent;const u=()=>{s&&si(t(...s),e)&&r(null,...s)},f=l.teardown;l.teardown=()=>{u(),f?.()}}}),e}var bt=!1;function Rs(e){var r=bt;try{return bt=!1,[e(),bt]}finally{bt=r}}function Ao(e,r,t,i){var o=!tt||(t&2)!==0,n=(t&8)!==0,a=(t&16)!==0,s=i,l=!0,u=void 0,f=()=>a&&o?(u??(u=Jr(i)),p(u)):(l&&(l=!1,s=a?Ht(i):i),s);let d;if(n){var b=Gr in e||Yo in e;d=or(e,r)?.set??(b&&r in e?k=>e[r]=k:void 0)}var h,m=!1;n?[h,m]=Rs(()=>e[r]):h=e[r],h===void 0&&i!==void 0&&(h=f(),d&&(o&&_c(r),d(h)));var y;if(o?y=()=>{var k=e[r];return k===void 0?f():(l=!0,k)}:y=()=>{var k=e[r];return k!==void 0&&(s=void 0),k===void 0?s:k},o&&(t&4)===0)return y;if(d){var v=e.$$legacy;return(function(k,ae){return arguments.length>0?((!o||!ae||v||m)&&d(ae?y():k),k):y()})}var g=!1,D=((t&1)!==0?Jr:Li)(()=>(g=!1,y()));n&&p(D);var R=S;return(function(k,ae){if(arguments.length>0){const B=ae?p(D):o&&n?Sr(k):k;return W(D,B),g=!0,s!==void 0&&(s=B),k}return We&&g||(R.f&16384)!==0?D.v:p(D)})}function Is(e){return new Ds(e)}var Ze=new WeakMap,Te=new WeakMap,Ds=class{constructor(e){_(this,Ze,void 0),_(this,Te,void 0);var r=new Map,t=(o,n)=>{var a=vn(n,!1,!1);return r.set(o,a),a};const i=new Proxy({...e.props||{},$$events:{}},{get(o,n){return p(r.get(n)??t(n,Reflect.get(o,n)))},has(o,n){return n===Yo?!0:(p(r.get(n)??t(n,Reflect.get(o,n))),Reflect.has(o,n))},set(o,n,a){return W(r.get(n)??t(n,a),a),Reflect.set(o,n,a)}});w(Te,this,(e.hydrate?vs:zn)(e.component,{target:e.target,anchor:e.anchor,props:i,context:e.context,intro:e.intro??!1,recover:e.recover,transformError:e.transformError})),(!e?.props?.$$host||e.sync===!1)&&_i(),w(Ze,this,i.$$events);for(const o of Object.keys(c(Te,this)))o==="$set"||o==="$destroy"||o==="$on"||Yr(this,o,{get(){return c(Te,this)[o]},set(n){c(Te,this)[o]=n},enumerable:!0});c(Te,this).$set=o=>{Object.assign(i,o)},c(Te,this).$destroy=()=>{ms(c(Te,this))}}$set(e){c(Te,this).$set(e)}$on(e,r){c(Ze,this)[e]=c(Ze,this)[e]||[];const t=(...i)=>r.call(this,...i);return c(Ze,this)[e].push(t),()=>{c(Ze,this)[e]=c(Ze,this)[e].filter(i=>i!==t)}}$destroy(){c(Te,this).$destroy()}},Fn;typeof HTMLElement=="function"&&(Fn=class extends HTMLElement{constructor(e,r,t){super(),A(this,"$$ctor",void 0),A(this,"$$s",void 0),A(this,"$$c",void 0),A(this,"$$cn",!1),A(this,"$$d",{}),A(this,"$$r",!1),A(this,"$$p_d",{}),A(this,"$$l",{}),A(this,"$$l_u",new Map),A(this,"$$me",void 0),A(this,"$$shadowRoot",null),this.$$ctor=e,this.$$s=r,t&&(this.$$shadowRoot=this.attachShadow(t))}addEventListener(e,r,t){if(this.$$l[e]=this.$$l[e]||[],this.$$l[e].push(r),this.$$c){const i=this.$$c.$on(e,r);this.$$l_u.set(r,i)}super.addEventListener(e,r,t)}removeEventListener(e,r,t){if(super.removeEventListener(e,r,t),this.$$c){const i=this.$$l_u.get(r);i&&(i(),this.$$l_u.delete(r))}}async connectedCallback(){if(this.$$cn=!0,!this.$$c){let e=function(i){return o=>{const n=zi("slot");i!=="default"&&(n.name=i),Ge(o,n)}};if(await Promise.resolve(),!this.$$cn||this.$$c)return;const r={},t=js(this);for(const i of this.$$s)i in t&&(i==="default"&&!this.$$d.children?(this.$$d.children=e(i),r.default=!0):r[i]=e(i));for(const i of this.attributes){const o=this.$$g_p(i.name);o in this.$$d||(this.$$d[o]=yt(o,i.value,this.$$p_d,"toProp"))}for(const i in this.$$p_d)!(i in this.$$d)&&this[i]!==void 0&&(this.$$d[i]=this[i],delete this[i]);this.$$c=Is({component:this.$$ctor,target:this.$$shadowRoot||this,props:{...this.$$d,$$slots:r,$$host:this}}),this.$$me=Gc(()=>{Hi(()=>{this.$$r=!0;for(const i of $t(this.$$c)){if(!this.$$p_d[i]?.reflect)continue;this.$$d[i]=this.$$c[i];const o=yt(i,this.$$d[i],this.$$p_d,"toAttribute");o==null?this.removeAttribute(this.$$p_d[i].attribute||i):this.setAttribute(this.$$p_d[i].attribute||i,o)}this.$$r=!1})});for(const i in this.$$l)for(const o of this.$$l[i]){const n=this.$$c.$on(i,o);this.$$l_u.set(o,n)}this.$$l={}}}attributeChangedCallback(e,r,t){this.$$r||(e=this.$$g_p(e),this.$$d[e]=yt(e,t,this.$$p_d,"toProp"),this.$$c?.$set({[e]:this.$$d[e]}))}disconnectedCallback(){this.$$cn=!1,Promise.resolve().then(()=>{!this.$$cn&&this.$$c&&(this.$$c.$destroy(),this.$$me(),this.$$c=void 0)})}$$g_p(e){return $t(this.$$p_d).find(r=>this.$$p_d[r].attribute===e||!this.$$p_d[r].attribute&&r.toLowerCase()===e)||e}});function yt(e,r,t,i){const o=t[e]?.type;if(r=o==="Boolean"&&typeof r!="boolean"?r!=null:r,!i||!t[e])return r;if(i==="toAttribute")switch(o){case"Object":case"Array":return r==null?null:JSON.stringify(r);case"Boolean":return r?"":null;case"Number":return r??null;default:return r}else switch(o){case"Object":case"Array":return r&&JSON.parse(r);case"Boolean":return r;case"Number":return r!=null?+r:r;default:return r}}function js(e){const r={};return e.childNodes.forEach(t=>{r[t.slot||"default"]=!0}),r}function Ls(e,r,t,i,o,n){let a=class extends Fn{constructor(){super(e,t,o),this.$$p_d=r}static get observedAttributes(){return $t(r).map(s=>(r[s].attribute||s).toLowerCase())}};return $t(r).forEach(s=>{Yr(a.prototype,s,{get(){return this.$$c&&s in this.$$c?this.$$c[s]:this.$$d[s]},set(l){l=yt(s,l,r),this.$$d[s]=l;var u=this.$$c;u&&(or(u,s)?.get?u[s]=l:u.$set({[s]:l}))}})}),i.forEach(s=>{Yr(a.prototype,s,{get(){return this.$$c?.[s]}})}),n&&(a=n(a)),e.element=a,a}var Ns=Bt('<div class="pie-tool-color-scheme__current svelte-1k3xgut"><div class="pie-tool-color-scheme__preview svelte-1k3xgut"><div class="pie-tool-color-scheme__preview-bg svelte-1k3xgut"><div class="pie-tool-color-scheme__preview-text svelte-1k3xgut">A</div> <div class="pie-tool-color-scheme__preview-primary svelte-1k3xgut"></div></div></div> <div class="pie-tool-color-scheme__current-info svelte-1k3xgut"><div class="pie-tool-color-scheme__current-name svelte-1k3xgut"> </div> <div class="pie-tool-color-scheme__current-description svelte-1k3xgut"> </div></div> <svg class="pie-tool-color-scheme__dropdown-arrow svelte-1k3xgut" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="M7,10L12,15L17,10H7Z"></path></svg></div>'),Ws=os('<svg xmlns="http://www.w3.org/2000/svg" class="pie-tool-color-scheme__check svelte-1k3xgut" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="3" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><polyline points="20 6 9 17 4 12"></polyline></svg>'),zs=Bt('<button type="button" role="menuitem"><div class="pie-tool-color-scheme__preview svelte-1k3xgut"><div class="pie-tool-color-scheme__preview-bg svelte-1k3xgut"><div class="pie-tool-color-scheme__preview-text svelte-1k3xgut">A</div> <div class="pie-tool-color-scheme__preview-primary svelte-1k3xgut"></div></div></div> <div class="pie-tool-color-scheme__info svelte-1k3xgut"><div class="pie-tool-color-scheme__name svelte-1k3xgut"> </div> <div class="pie-tool-color-scheme__description svelte-1k3xgut"> </div></div> <!></button>'),Vs=Bt('<div id="pie-tool-color-scheme-menu" class="pie-tool-color-scheme__dropdown svelte-1k3xgut" role="menu"></div>'),Hs=Bt('<div class="pie-tool-color-scheme svelte-1k3xgut" role="dialog" tabindex="-1"><div class="pie-tool-color-scheme__content svelte-1k3xgut"><p class="pie-tool-color-scheme__description svelte-1k3xgut"> </p> <button type="button" class="pie-tool-color-scheme__dropdown-trigger svelte-1k3xgut" aria-haspopup="menu" aria-controls="pie-tool-color-scheme-menu"><!></button> <p id="pie-tool-color-scheme-status" role="status" aria-live="polite"><!></p> <!></div></div>'),Bs={hash:"svelte-1k3xgut",code:`.pie-tool-color-scheme.svelte-1k3xgut {position:relative;width:100%;height:100%;min-height:0;background-color:var(--pie-background, white);display:flex;flex-direction:column;}.pie-tool-color-scheme__content.svelte-1k3xgut {padding:1rem;position:relative;display:flex;flex-direction:column;gap:1rem;min-height:0;overflow:auto;}.pie-tool-color-scheme__description.svelte-1k3xgut {margin:0 0 1rem 0;color:var(--pie-text, black);font-size:0.875rem;}.pie-tool-color-scheme__dropdown-trigger.svelte-1k3xgut {width:100%;padding:0.75rem;border:2px solid var(--pie-button-border, #767676);border-radius:0.5rem;background-color:var(--pie-button-bg, white);color:var(--pie-button-color, black);cursor:pointer;transition:all 0.15s ease;}.pie-tool-color-scheme__dropdown-trigger.svelte-1k3xgut:hover {border-color:var(--pie-button-hover-border, #767676);background-color:var(--pie-button-hover-bg, #f0f0f0);color:var(--pie-button-hover-color, black);}.pie-tool-color-scheme__current.svelte-1k3xgut {display:flex;align-items:center;gap:0.75rem;}.pie-tool-color-scheme__current-info.svelte-1k3xgut {flex:1;text-align:left;}.pie-tool-color-scheme__current-name.svelte-1k3xgut {font-size:0.875rem;font-weight:600;color:inherit;}.pie-tool-color-scheme__current-description.svelte-1k3xgut {font-size:0.75rem;color:inherit;}.pie-tool-color-scheme__status.svelte-1k3xgut {margin:0;padding:0.75rem;border:2px solid var(--pie-button-border, #767676);border-radius:0.5rem;background-color:var(--pie-button-bg, #f0f0f0);color:var(--pie-button-color, #000000);font-size:0.875rem;line-height:1.4;}.pie-tool-color-scheme__status--empty.svelte-1k3xgut {display:block;width:0;height:0;padding:0;margin:0;overflow:hidden;border:0;}.pie-tool-color-scheme__dropdown-arrow.svelte-1k3xgut {width:1.5rem;height:1.5rem;flex-shrink:0;}.pie-tool-color-scheme__dropdown.svelte-1k3xgut {position:relative;width:100%;max-height:24rem;background-color:var(--pie-background, white);border:2px solid var(--pie-border, #ccc);border-radius:0.5rem;box-shadow:0 4px 12px rgba(0, 0, 0, 0.15);overflow-y:auto;overflow-x:hidden;margin-top:0.5rem;}.pie-tool-color-scheme__option.svelte-1k3xgut {display:flex;align-items:center;gap:0.75rem;width:100%;padding:0.75rem 1rem;border:none;background-color:transparent;color:var(--pie-text, black);cursor:pointer;text-align:left;transition:background-color 0.15s ease;}.pie-tool-color-scheme__option.svelte-1k3xgut:hover {background-color:var(--pie-button-hover-bg, rgba(0, 0, 0, 0.05));color:var(--pie-button-hover-color, black);}.pie-tool-color-scheme__option--active.svelte-1k3xgut {background-color:var(--pie-button-active-bg, #f3f4f6);color:var(--pie-button-color, var(--pie-text, #374151));}.pie-tool-color-scheme__option.svelte-1k3xgut:disabled {outline:2px dashed var(--pie-button-border, #767676);outline-offset:-2px;background-color:var(--pie-button-bg, #f0f0f0);color:var(--pie-button-color, #000000);cursor:not-allowed;}.pie-tool-color-scheme__preview.svelte-1k3xgut {flex-shrink:0;width:2.5rem;height:2.5rem;border:2px solid var(--pie-border, #ccc);border-radius:0.25rem;overflow:hidden;}.pie-tool-color-scheme__preview-bg.svelte-1k3xgut {width:100%;height:100%;position:relative;display:flex;align-items:center;justify-content:center;background-color:#ffffff;}.pie-tool-color-scheme__preview-text.svelte-1k3xgut {font-weight:700;font-size:1.25rem;color:#000000;}.pie-tool-color-scheme__preview-primary.svelte-1k3xgut {position:absolute;bottom:0;right:0;width:0.75rem;height:0.75rem;border-radius:50%;background-color:#3f51b5;}.pie-tool-color-scheme__info.svelte-1k3xgut {flex:1;}.pie-tool-color-scheme__name.svelte-1k3xgut {font-size:0.875rem;font-weight:600;color:inherit;line-height:1.25;}.pie-tool-color-scheme__info.svelte-1k3xgut .pie-tool-color-scheme__description:where(.svelte-1k3xgut) {font-size:0.75rem;color:inherit;}.pie-tool-color-scheme__check.svelte-1k3xgut {flex-shrink:0;width:1rem;height:1rem;color:currentColor;}
|
|
24
|
+
|
|
25
|
+
/* Keyboard focus styling */.pie-tool-color-scheme__dropdown-trigger.svelte-1k3xgut:focus-visible,
|
|
26
|
+
.pie-tool-color-scheme__option.svelte-1k3xgut:focus-visible {outline:2px solid var(--pie-button-focus-outline, #3b82f6);outline-offset:-2px;}`};function Fs(e,r){en(r,!0),Ss(e,Bs);const t=typeof window<"u";let i=Ao(r,"visible",7,!1),o=Ao(r,"toolId",7,"theme"),n=J(void 0),a=J(void 0),s=J(null);const l=Dr(()=>p(s)?.toolCoordinator),u=ta("Theme",ca.MODAL);Hr(()=>{if(p(n))return oa(p(n),C=>{W(s,C,!0)})});function f(){return Bo(p(n))}const d=Dr(()=>aa(p(s)));let b=J(Pa());const h=Dr(()=>p(b).schemes.map(C=>({...C,description:C.description||"",available:!0})));let m=J("default"),y=J(!1),v=null;function g(C){t&&Ja(C,{from:p(n)})}function D(C){W(m,C,!0),W(y,!1),g(C),p(l)?.hideTool(o())}function R(){W(y,!p(y))}const k=Dr(()=>{const C=p(h).find(V=>V.id===p(m));if(C)return C;const O=p(h).find(V=>V.id==="default")||p(h)[0];return O?{id:p(m),name:p(d).t("tools.theme.unavailableName",{id:p(m)}),description:p(d).t("tools.theme.unavailableDescription"),kind:"unavailable",preview:O.preview,available:!1}:null}),ae=Dr(()=>p(k)&&!p(k).available?[p(k),...p(h)]:p(h));function B(C){if(C.key==="Escape")p(y)&&(C.preventDefault(),C.stopPropagation(),W(y,!1),queueMicrotask(()=>p(a)?.focus()));else if(p(y)&&(C.key==="ArrowDown"||C.key==="ArrowUp")){C.preventDefault();const O=p(n)?.querySelectorAll(".pie-tool-color-scheme__option:not([disabled])");if(!O||O.length===0)return;const V=Array.from(O).findIndex(qr=>qr===C.composedPath()[0]);let F;C.key==="ArrowDown"?F=V===-1?0:(V+1)%O.length:F=V===-1?O.length-1:(V-1+O.length)%O.length,O[F]?.focus()}}Hr(()=>u.sync(p(l),o())),Hr(()=>{p(l)&&p(n)&&o()&&p(l).updateToolElement(o(),p(n))}),Hr(()=>{!i()&&v?(v(),v=null):i()&&p(n)&&!v&&(v=na(p(n)))}),ys(()=>{const C=zo(V=>{const F=(p(n)?.getRootNode()instanceof ShadowRoot?p(n).getRootNode().activeElement?.closest(".pie-tool-color-scheme__option"):null)?.getAttribute("data-scheme-id");W(b,V),F&&!V.schemes.some(qr=>qr.id===F)&&queueMicrotask(()=>p(a)?.focus())});if(t){const V=f()?.getAttribute("scheme"),F=sa("pie-color-scheme")??V??"default";W(m,F,!0),F&&requestAnimationFrame(()=>{g(F)})}function O(V){if(!p(y))return;const F=V.composedPath();(!p(n)||!F.includes(p(n)))&&W(y,!1)}return document.addEventListener("click",O),()=>{C(),document.removeEventListener("click",O),u.release()}});var ce={get visible(){return i()},set visible(C=!1){i(C),_i()},get toolId(){return o()},set toolId(C="theme"){o(C),_i()}},pe=as(),ee=zc(pe),$e=C=>{var O=Hs(),V=re(O),F=re(V),qr=jr(F,!0),ze=Se(F,2),Gn=re(ze),Kn=H=>{var se=Ns(),he=re(se),I=re(he),G=re(I),at=Se(G,2);Q(I),Q(he);var pr=Se(he,2),hr=re(pr),ct=jr(hr,!0),Ft=jr(Se(hr,2),!0);Q(pr),Qo(2),Q(se),ft(()=>{gr(I,`background-color: ${p(k).preview.bg??""}`),gr(G,`color: ${p(k).preview.text??""}`),gr(at,`background-color: ${p(k).preview.primary??""}`),mr(ct,p(k).name),mr(Ft,p(k).description)}),Ge(H,se)};Nr(Gn,H=>{p(k)&&H(Kn)}),Q(ze),Oo(ze,H=>W(a,H),()=>p(a));var nt=Se(ze,2);let Ui;var Un=re(nt),Yn=H=>{var se=ns();ft(he=>mr(se,he),[()=>p(d).t("tools.theme.unavailableStatus")]),Ge(H,se)};Nr(Un,H=>{p(k)&&!p(k).available&&H(Yn)}),Q(nt);var Qn=Se(nt,2),Jn=H=>{var se=Vs();_s(se,21,()=>p(ae),he=>he.id,(he,I)=>{var G=zs();let at;var pr=re(G),hr=re(pr),ct=re(hr),Ft=Se(ct,2);Q(hr),Q(pr);var Gt=Se(pr,2),Yi=re(Gt),Xn=jr(Yi,!0),Zn=jr(Se(Yi,2),!0);Q(Gt);var ea=Se(Gt,2),ra=Rr=>{Ge(Rr,Ws())};Nr(ea,Rr=>{p(m)===p(I).id&&Rr(ra)}),Q(G),ft(Rr=>{at=To(G,1,"pie-tool-color-scheme__option svelte-1k3xgut",null,at,{"pie-tool-color-scheme__option--active":p(m)===p(I).id}),Ee(G,"aria-label",Rr),Ee(G,"aria-current",p(m)===p(I).id),Ee(G,"aria-disabled",!p(I).available),G.disabled=!p(I).available,Ee(G,"data-scheme-id",p(I).id),gr(hr,`background-color: ${p(I).preview.bg??""}`),gr(ct,`color: ${p(I).preview.text??""}`),gr(Ft,`background-color: ${p(I).preview.primary??""}`),mr(Xn,p(I).name),mr(Zn,p(I).description)},[()=>p(I).available?p(I).name:p(d).t("tools.theme.optionUnavailableA11y",{name:p(I).name})]),ei("click",G,()=>D(p(I).id)),Ge(he,G)}),Q(se),Ge(H,se)};Nr(Qn,H=>{p(y)&&H(Jn)}),Q(V),Q(O),Oo(O,H=>W(n,H),()=>p(n)),ft((H,se,he,I,G)=>{Ee(O,"lang",H),Ee(O,"dir",se),Ee(O,"aria-label",he),mr(qr,I),Ee(ze,"aria-label",G),Ee(ze,"aria-expanded",p(y)),Ee(ze,"aria-describedby",p(k)&&!p(k).available?"pie-tool-color-scheme-status":void 0),Ui=To(nt,1,"pie-tool-color-scheme__status svelte-1k3xgut",null,Ui,{"pie-tool-color-scheme__status--empty":p(k)?.available!==!1}),O.dir=O.dir},[()=>p(d).getLocale(),()=>p(d).getDirection?.()??"ltr",()=>p(d).t("tools.theme.selectorA11y"),()=>p(d).t("tools.theme.hint"),()=>p(k)?p(d).t("tools.theme.selectCurrentA11y",{name:p(k).name}):p(d).t("tools.theme.selectA11y")]),ei("keydown",O,B),ei("click",ze,R),Ge(C,O)};return Nr(ee,C=>{i()&&C($e)}),Ge(e,pe),rn(ce)}es(["keydown","click"]);Gs("pie-tool-theme",Ls(Fs,{visible:{attribute:"visible",type:"Boolean"},toolId:{attribute:"tool-id",type:"String"}},[],[],{mode:"open"},ia));function Gs(e,r){customElements.get(e)||customElements.define(e,r)}export{Fs as default};
|