@pie-players/pie-assessment-toolkit 0.3.67 → 0.3.69
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 +81 -9
- package/dist/attempt/AssessmentSession.d.ts +7 -27
- package/dist/components/ItemToolBar.custom-element.js +1 -1
- package/dist/components/PieAssessmentToolkit.custom-element.js +14 -14
- package/dist/components/SectionToolBar.custom-element.js +1 -1
- package/dist/components/chunks/ItemToolBar-pe5szfyx.js +46 -0
- package/dist/components/chunks/ItemToolBar-rd7te9r0.js +51 -0
- package/dist/components/item-toolbar-element.js +1 -0
- package/dist/components/pie-assessment-toolkit-element.js +1 -0
- package/dist/components/section-toolbar-element.js +1 -0
- package/dist/context/assessment-toolkit-context.d.ts +28 -0
- package/dist/index.d.ts +7 -3
- package/dist/index.js +4 -2
- package/dist/policy/core/compose-decision.js +14 -0
- package/dist/policy/core/decision-types.d.ts +1 -1
- package/dist/policy/sources/PnpPolicySource.d.ts +8 -0
- package/dist/policy/sources/PnpPolicySource.js +19 -10
- package/dist/runtime/SectionRuntimeEngine.d.ts +56 -0
- package/dist/runtime/SectionRuntimeEngine.js +66 -1
- package/dist/runtime/core/engine-resolver.d.ts +25 -1
- package/dist/runtime/registration-events.d.ts +52 -0
- package/dist/runtime/registration-events.js +2 -0
- package/dist/services/AccessibilityCatalogResolver.js +21 -5
- package/dist/services/I18nService.d.ts +28 -100
- package/dist/services/I18nService.js +43 -233
- package/dist/services/TTSService.d.ts +12 -0
- package/dist/services/TTSService.js +18 -17
- package/dist/services/ToolRegistry.d.ts +120 -2
- package/dist/services/ToolRegistry.js +64 -0
- package/dist/services/ToolkitCoordinator.d.ts +39 -37
- package/dist/services/ToolkitCoordinator.js +40 -0
- package/dist/services/audio-handoff.d.ts +39 -0
- package/dist/services/audio-handoff.js +58 -0
- package/dist/services/catalog-media.d.ts +35 -4
- package/dist/services/catalog-media.js +92 -3
- package/dist/services/framework-error.d.ts +15 -1
- package/dist/services/interfaces.d.ts +28 -0
- package/dist/services/pnp-standard-features.d.ts +1 -1
- package/dist/services/section-controller-types.d.ts +218 -7
- package/dist/services/selection-action.d.ts +49 -0
- package/dist/services/selection-action.js +10 -0
- package/dist/services/spoken-audio-cards.js +5 -1
- package/dist/services/tool-context.d.ts +6 -5
- package/dist/services/tool-context.js +205 -155
- package/dist/services/tool-icons.d.ts +18 -0
- package/dist/services/tool-icons.js +31 -0
- package/dist/services/tool-providers/CortexToolProvider.d.ts +18 -0
- package/dist/services/tool-providers/CortexToolProvider.js +32 -0
- package/dist/services/tool-providers/DesmosToolProvider.d.ts +13 -101
- package/dist/services/tool-providers/DesmosToolProvider.js +14 -145
- package/dist/services/tool-providers/GeoGebraToolProvider.d.ts +21 -0
- package/dist/services/tool-providers/GeoGebraToolProvider.js +32 -0
- package/dist/services/tool-providers/LazyCalculatorToolProvider.d.ts +35 -0
- package/dist/services/tool-providers/LazyCalculatorToolProvider.js +95 -0
- package/dist/services/tool-providers/index.d.ts +4 -0
- package/dist/services/tool-providers/index.js +2 -0
- package/dist/services/tool-request.d.ts +106 -0
- package/dist/services/tool-request.js +127 -0
- package/dist/services/toolbar-items.d.ts +6 -0
- package/dist/tools/client.d.ts +0 -2
- package/dist/tools/client.js +0 -4
- package/dist/tools/internal.d.ts +7 -1
- package/dist/tools/internal.js +8 -1
- package/dist/tools/tool-surface-host.d.ts +57 -0
- package/dist/tools/tool-surface-host.js +610 -0
- package/dist/tools/types.d.ts +1 -66
- package/package.json +22 -12
- package/dist/components/chunks/ItemToolBar-8jgdz50p.js +0 -51
- package/dist/components/chunks/ItemToolBar-cvs646j3.js +0 -36
- package/dist/tools/calculators/desmos-provider.d.ts +0 -46
- package/dist/tools/calculators/desmos-provider.js +0 -393
- package/dist/tools/library-loader.d.ts +0 -62
- package/dist/tools/library-loader.js +0 -261
|
@@ -1 +1 @@
|
|
|
1
|
-
import"./chunks/ItemToolBar-
|
|
1
|
+
import"./chunks/ItemToolBar-pe5szfyx.js";import{H as w,J as G,K as Y,d as U,e as V,g as F,o as E,t as W,v as X}from"./chunks/ItemToolBar-rd7te9r0.js";var x=(H,A)=>{if(customElements.get(H))return;try{customElements.define(H,A)}catch(C){if(!(C instanceof DOMException&&C.name==="NotSupportedError"||C&&typeof C==="object"&&C.name==="NotSupportedError")||!customElements.get(H))throw C}},D=W("<pie-item-toolbar></pie-item-toolbar>",2);function Z(H,A){U(A,!0);let C=G(A,"enabledTools",7,""),J=G(A,"position",7,"bottom"),K=G(A,"sectionId",7,""),L=G(A,"size",7,"md"),M=G(A,"language",7,"en-US"),O=G(A,"toolRegistry",7,null),P=G(A,"item",7,null),Q=G(A,"hostButtons",23,()=>[]);var j={get enabledTools(){return C()},set enabledTools(k){C(k),F()},get position(){return J()},set position(k){J(k),F()},get sectionId(){return K()},set sectionId(k){K(k),F()},get size(){return L()},set size(k){L(k),F()},get language(){return M()},set language(k){M(k),F()},get toolRegistry(){return O()},set toolRegistry(k){O(k),F()},get item(){return P()},set item(k){P(k),F()},get hostButtons(){return Q()},set hostButtons(k){Q(k),F()}},q=D();return w(q,"level","section"),E(()=>w(q,"scope-id",K())),E(()=>w(q,"section-id",K())),E(()=>w(q,"tools",C())),w(q,"content-kind","section"),E(()=>w(q,"position",J())),E(()=>w(q,"size",L())),E(()=>w(q,"language",M())),E(()=>w(q,"toolRegistry",O())),E(()=>w(q,"item",P())),E(()=>w(q,"hostButtons",Q())),X(H,q),V(j)}x("pie-section-toolbar",Y(Z,{enabledTools:{attribute:"enabled-tools",type:"String"},position:{attribute:"position",type:"String"},sectionId:{attribute:"section-id",type:"String"},size:{attribute:"size",type:"String"},language:{attribute:"language",type:"String"},toolRegistry:{type:"Object"},item:{type:"Object"},hostButtons:{type:"Object"}},[],[],{mode:"open"}));export{Z as default};
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import{A as U0,C as hj,D as HL,E as CL,F as cj,G as LL,H as IL,I as sj,J as r,K as ij,L as aj,N as dj,P as rj,R as lj,T as oj,c as DL,d as gj,e as $j,f as O,g as d,h as fL,i as OL,j as mj,k as aL,l as ZL,m as z0,n as UL,o as KL,p as L,r as f0,s as uj,t as GL,u as QL,v as z,x as XL,y as H0,z as Z0}from"./ItemToolBar-rd7te9r0.js";import{ContextProvider as yJ}from"@pie-players/pie-context";function i0(H){return typeof H.href==="string"}function Ij(H){if(!H||typeof H!=="object"||Array.isArray(H))return!1;let N=H;if(typeof N.id!=="string"||N.id.trim().length===0)return!1;if(typeof N.label!=="string"||N.label.trim().length===0)return!1;if(N.ariaLabel!==void 0&&typeof N.ariaLabel!=="string")return!1;if(N.icon!==void 0&&typeof N.icon!=="string")return!1;if(N.tooltip!==void 0&&typeof N.tooltip!=="string")return!1;if(N.active!==void 0&&typeof N.active!=="boolean")return!1;if(N.disabled!==void 0&&typeof N.disabled!=="boolean")return!1;let p=typeof N.href==="string",VL=typeof N.onClick==="function";if(p===VL)return!1;if(p)return!0;return VL}function a0(H){return typeof H==="string"&&H.trimStart().startsWith("<svg")}function d0(H){return typeof H==="string"&&H.trimStart().startsWith("http")}import{sanitizeSvgIcon as k0}from"@pie-players/pie-players-shared/security";import{resolveInterfaceI18n as pJ}from"@pie-players/pie-players-shared/i18n/provider";import{approximateZoomFromWidths as bJ,computeZoomCompensation as _J,ICON_BUTTON_ZOOM_OPTIONS as bj}from"@pie-players/pie-players-shared/ui/zoom-compensation";import{collectFocusable as EJ,createFocusTrap as vJ,FOCUSABLE_SELECTOR as gJ,isProgrammaticFocusTarget as $J}from"@pie-players/pie-players-shared";var TJ={calculator:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M7 2h10a2 2 0 0 1 2 2v16a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2Zm0 2v4h10V4H7Zm0 6v2h2v-2H7Zm4 0v2h2v-2h-2Zm4 0v2h2v-2h-2Zm-8 4v2h2v-2H7Zm4 0v2h2v-2h-2Zm4 0v2h2v-2h-2Zm-8 4v2h2v-2H7Zm4 0v2h2v-2h-2Zm4 0v2h2v-2h-2Z" fill="currentColor"/></svg>',"volume-up":'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M14 3.23v2.06A7.002 7.002 0 0 1 19 12a7 7 0 0 1-5 6.71v2.06c4.01-.91 7-4.49 7-8.77s-2.99-7.86-7-8.77Zm-2 17.75V3L7 8H3v8h4l5 5Zm4.5-9a4.5 4.5 0 0 0-2.5-4.03v8.05A4.5 4.5 0 0 0 16.5 12Z" fill="currentColor"/></svg>',swatch:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 3a9 9 0 1 0 9 9c0-.55-.45-1-1-1h-2.5a1.5 1.5 0 0 1 0-3H20a1 1 0 0 0 1-1 8.99 8.99 0 0 0-9-4Zm-5.5 9A1.5 1.5 0 1 1 8 13.5 1.5 1.5 0 0 1 6.5 12Zm3-4A1.5 1.5 0 1 1 11 9.5 1.5 1.5 0 0 1 9.5 8Zm5 0A1.5 1.5 0 1 1 16 9.5 1.5 1.5 0 0 1 14.5 8Z" fill="currentColor"/></svg>',"chart-bar":'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M4.75 5a.76.76 0 0 1 .75.75v11c0 .438.313.75.75.75h13a.76.76 0 0 1 .696 1.039.74.74 0 0 1-.696.461h-13C5 19 4 18 4 16.75v-11A.74.74 0 0 1 4.75 5ZM8 8.25a.74.74 0 0 1 .75-.75h6.5a.76.76 0 0 1 .696 1.039.74.74 0 0 1-.696.461h-6.5A.722.722 0 0 1 8 8.25Zm.75 2.25h4.5a.76.76 0 0 1 .696 1.039.74.74 0 0 1-.696.461h-4.5a.723.723 0 0 1-.75-.75.74.74 0 0 1 .75-.75Zm0 3h8.5a.76.76 0 0 1 .696 1.039.74.74 0 0 1-.696.461h-8.5a.723.723 0 0 1-.75-.75.74.74 0 0 1 .75-.75Z" fill="currentColor"/></svg>',beaker:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M5 21c-.85 0-1.454-.38-1.813-1.137-.358-.759-.27-1.463.263-2.113L9 11V5H8a.968.968 0 0 1-.713-.287A.968.968 0 0 1 7 4c0-.283.096-.52.287-.712A.968.968 0 0 1 8 3h8c.283 0 .52.096.712.288.192.191.288.429.288.712s-.096.52-.288.713A.968.968 0 0 1 16 5h-1v6l5.55 6.75c.533.65.62 1.354.262 2.113C20.454 20.62 19.85 21 19 21H5Zm2-3h10l-3.4-4h-3.2L7 18Zm-2 1h14l-6-7.3V5h-2v6.7L5 19Z" fill="currentColor"/></svg>',protractor:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="m6.75 21-.25-2.2 2.85-7.85a3.95 3.95 0 0 0 1.75.95l-2.75 7.55L6.75 21Zm10.5 0-1.6-1.55-2.75-7.55a3.948 3.948 0 0 0 1.75-.95l2.85 7.85-.25 2.2ZM12 11a2.893 2.893 0 0 1-2.125-.875A2.893 2.893 0 0 1 9 8c0-.65.188-1.23.563-1.737A2.935 2.935 0 0 1 11 5.2V3h2v2.2c.583.2 1.063.554 1.438 1.063C14.812 6.77 15 7.35 15 8c0 .833-.292 1.542-.875 2.125A2.893 2.893 0 0 1 12 11Zm0-2c.283 0 .52-.096.713-.287A.967.967 0 0 0 13 8a.967.967 0 0 0-.287-.713A.968.968 0 0 0 12 7a.968.968 0 0 0-.713.287A.967.967 0 0 0 11 8c0 .283.096.52.287.713.192.191.43.287.713.287Z" fill="currentColor"/></svg>',"bars-3":'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M6.85 15c.517 0 .98-.15 1.388-.45.408-.3.695-.692.862-1.175l.375-1.15c.267-.8.2-1.537-.2-2.213C8.875 9.337 8.3 9 7.55 9H4.025l.475 3.925c.083.583.346 1.075.787 1.475.442.4.963.6 1.563.6Zm10.3 0c.6 0 1.12-.2 1.563-.6.441-.4.704-.892.787-1.475L19.975 9h-3.5c-.75 0-1.325.342-1.725 1.025-.4.683-.467 1.425-.2 2.225l.35 1.125c.167.483.454.875.862 1.175.409.3.871.45 1.388.45Zm-10.3 2c-1.1 0-2.063-.363-2.887-1.088a4.198 4.198 0 0 1-1.438-2.737L2 9H1V7h6.55c.733 0 1.404.18 2.013.537A3.906 3.906 0 0 1 11 9h2.025c.35-.617.83-1.104 1.438-1.463A3.892 3.892 0 0 1 16.474 7H23v2h-1l-.525 4.175a4.198 4.198 0 0 1-1.438 2.737A4.238 4.238 0 0 1 17.15 17c-.95 0-1.804-.27-2.562-.813A4.234 4.234 0 0 1 13 14.026l-.375-1.125a21.35 21.35 0 0 1-.1-.363 4.926 4.926 0 0 1-.1-.537h-.85c-.033.2-.067.363-.1.488a21.35 21.35 0 0 1-.1.362L11 14a4.3 4.3 0 0 1-1.588 2.175A4.258 4.258 0 0 1 6.85 17Z" fill="currentColor"/></svg>',ruler:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="m8.8 10.95 2.15-2.175-1.4-1.425-1.1 1.1-1.4-1.4 1.075-1.1L7 4.825 4.825 7 8.8 10.95Zm8.2 8.225L19.175 17l-1.125-1.125-1.1 1.075-1.4-1.4 1.075-1.1-1.425-1.4-2.15 2.15L17 19.175ZM7.25 21H3v-4.25l4.375-4.375L2 7l5-5 5.4 5.4 3.775-3.8c.2-.2.425-.35.675-.45a2.068 2.068 0 0 1 1.55 0c.25.1.475.25.675.45L20.4 4.95c.2.2.35.425.45.675.1.25.15.508.15.775a1.975 1.975 0 0 1-.6 1.425l-3.775 3.8L22 17l-5 5-5.375-5.375L7.25 21ZM5 19h1.4l9.8-9.775L14.775 7.8 5 17.6V19Z" fill="currentColor"/></svg>',"book-open":'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 6.25a6.6 6.6 0 0 0-2.3-1.32A8.6 8.6 0 0 0 7 4.5c-.63 0-1.25.06-1.85.18-.6.12-1.19.3-1.76.54a1.5 1.5 0 0 0-.93 1.4v10.1c0 .52.26.98.68 1.24.42.26.92.28 1.35.06.36-.18.75-.31 1.18-.4.42-.09.86-.13 1.33-.13.78 0 1.53.14 2.24.42.7.28 1.35.7 1.93 1.24l.83-.75.83.75c.58-.54 1.22-.96 1.93-1.24a6.1 6.1 0 0 1 2.24-.42c.47 0 .91.04 1.33.13.43.09.82.22 1.18.4.43.22.93.2 1.35-.06.42-.26.68-.72.68-1.24V6.62c0-.6-.36-1.15-.93-1.4a9.3 9.3 0 0 0-1.76-.54A9.8 9.8 0 0 0 17 4.5a8.6 8.6 0 0 0-2.7.43A6.6 6.6 0 0 0 12 6.25Zm1 10.06V8.02c.55-.5 1.16-.88 1.84-1.13A6 6 0 0 1 17 6.5c.45 0 .89.04 1.32.11.43.08.85.19 1.26.34v9.24a8.2 8.2 0 0 0-1.28-.24A10 10 0 0 0 17 15.85c-.72 0-1.42.09-2.09.26a7.7 7.7 0 0 0-1.91.8Zm-2 0a7.7 7.7 0 0 0-1.91-.8 8.4 8.4 0 0 0-2.09-.26c-.44 0-.87.02-1.3.07-.43.05-.86.13-1.28.24V6.95c.41-.15.83-.26 1.26-.34A7.7 7.7 0 0 1 7 6.5c.76 0 1.48.13 2.16.39.68.25 1.29.63 1.84 1.13Z" fill="currentColor"/></svg>',photo:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M4 21c-.55 0-1.02-.2-1.41-.59A1.93 1.93 0 0 1 2 19V5c0-.55.2-1.02.59-1.41A1.93 1.93 0 0 1 4 3h16c.55 0 1.02.2 1.41.59.39.39.59.86.59 1.41v14c0 .55-.2 1.02-.59 1.41-.39.39-.86.59-1.41.59H4Zm0-2h16V5H4v14Zm1.5-2.5h13l-4.1-5.47-3.4 4.47-2.5-3.25L5.5 16.5ZM8.5 10a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3Z" fill="currentColor"/></svg>'};function yj(H){return TJ[H]||null}var AJ=["assessment","section","item","passage","rubric"],CJ=new Set(AJ);function pj(H){return CJ.has(H)}function P0(H,N,p){let VL=H.trim(),xL=p.trim();if(!VL||!xL)throw Error("Tool instance ids require non-empty tool and scope ids");if(!pj(N))throw Error(`Unknown tool scope level '${N}'. Register custom levels with registerToolScopeLevel().`);return`${VL}:${N}:${xL}`}function r0(H){let N=H.split(":");if(N.length!==3)return null;let[p,VL,xL]=N;if(!p||!xL)return null;if(!pj(VL))return null;return{baseToolId:p,scopeLevel:VL,scopeId:xL}}import"@pie-players/pie-players-shared/nds-icon-button";var IJ=(H,N)=>{if(customElements.get(H))return;try{customElements.define(H,N)}catch(p){if(!(p instanceof DOMException&&p.name==="NotSupportedError"||p&&typeof p==="object"&&p.name==="NotSupportedError")||!customElements.get(H))throw p}},W0=GL('<span class="item-toolbar__element-host svelte-rnx3ie"></span>'),mJ=GL('<span class="item-toolbar__nds-button-zoom svelte-rnx3ie"><nds-icon-button></nds-icon-button></span>',2),w0=GL('<span aria-hidden="true"></span>'),_j=GL('<img class="item-toolbar__icon-image svelte-rnx3ie" alt=""/>'),Ej=GL('<i aria-hidden="true"></i>'),uJ=GL("<a><!></a>"),hJ=GL('<button type="button"><!></button>'),vj=GL('<span class="item-toolbar__controls-host svelte-rnx3ie"></span>'),cJ=GL("<div></div>"),sJ=GL('<div><div class="item-toolbar__tools-row svelte-rnx3ie"><!> <!> <!></div> <!></div>'),iJ={hash:"svelte-rnx3ie",code:`.item-toolbar.svelte-rnx3ie {display:flex;flex-direction:column;align-items:flex-end;gap:0;--pie-toolbar-tools-row-height: 2rem;--pie-tts-controls-row-height: 2.875rem;}.item-toolbar__tools-row.svelte-rnx3ie {display:flex;align-items:center;justify-content:flex-end;flex-wrap:nowrap;
|
|
2
|
+
/* Cap the gap between toolbar items (e.g. TTS play ↔ calculator) at its
|
|
3
|
+
200%-zoom size with the same factor the buttons use, so the spacing
|
|
4
|
+
doesn't keep growing past 200% while the buttons themselves freeze. */gap:calc(0.5rem * var(--pie-toolbar-zoom-comp, 1));min-height:var(--pie-toolbar-tools-row-height);}
|
|
5
|
+
|
|
6
|
+
/* A granted section tool must stay reachable even when there isn't room for
|
|
7
|
+
every button: scroll the row rather than clipping items past the edge,
|
|
8
|
+
which left them impossible to focus, tab to, or click. \`min-width: 0\`
|
|
9
|
+
beats the flex default (\`auto\`, i.e. never shrink below content), which
|
|
10
|
+
would otherwise keep the row at full content width and make overflow-x
|
|
11
|
+
moot. Scoped to section level: an item's own toolbar hosts far fewer
|
|
12
|
+
tools and, for the inline TTS tool's "expanding row" layout, relies on
|
|
13
|
+
this row growing freely to host its reading-controls panel — capping its
|
|
14
|
+
width here clips that panel instead. */.item-toolbar[data-level="section"].svelte-rnx3ie .item-toolbar__tools-row:where(.svelte-rnx3ie) {overflow-x:auto;max-width:100%;min-width:0;}.item-toolbar__controls-row.svelte-rnx3ie {display:flex;align-items:center;justify-content:flex-end;width:100%;min-height:0;height:auto;}.item-toolbar__controls-row--reserve.svelte-rnx3ie {min-height:var(--pie-tts-controls-row-height);height:var(--pie-tts-controls-row-height);}.item-toolbar__controls-row--active.svelte-rnx3ie {min-height:var(--pie-tts-controls-row-height);height:var(--pie-tts-controls-row-height);}.item-toolbar__controls-row--align-start.svelte-rnx3ie {justify-content:flex-start;}.item-toolbar__controls-host.svelte-rnx3ie {display:inline-flex;align-items:center;justify-content:flex-end;width:100%;}.item-toolbar--top.svelte-rnx3ie,
|
|
15
|
+
.item-toolbar--bottom.svelte-rnx3ie {align-items:flex-end;}.item-toolbar--left.svelte-rnx3ie,
|
|
16
|
+
.item-toolbar--right.svelte-rnx3ie {align-items:stretch;}.item-toolbar--left.svelte-rnx3ie .item-toolbar__tools-row:where(.svelte-rnx3ie),
|
|
17
|
+
.item-toolbar--right.svelte-rnx3ie .item-toolbar__tools-row:where(.svelte-rnx3ie) {flex-direction:column;align-items:center;justify-content:flex-start;flex-wrap:nowrap;}.item-toolbar--left.svelte-rnx3ie .item-toolbar__controls-row:where(.svelte-rnx3ie),
|
|
18
|
+
.item-toolbar--right.svelte-rnx3ie .item-toolbar__controls-row:where(.svelte-rnx3ie) {justify-content:flex-start;width:auto;min-height:0;height:auto;}.item-toolbar__button.svelte-rnx3ie {display:flex;align-items:center;justify-content:center;width:2rem;height:2rem;padding:0.25rem;border:1px solid var(--pie-button-border, var(--pie-border, #ccc));border-radius:0.25rem;background-color:var(--pie-button-bg, var(--pie-background, white));color:var(--pie-button-color, var(--pie-text, #333));cursor:pointer;transition:all 0.15s ease;text-decoration:none;}
|
|
19
|
+
|
|
20
|
+
/* Drive the vendored NDS icon button's outer size via its own \`--height-32\`
|
|
21
|
+
custom property so its light-DOM inner button matches the toolbar's
|
|
22
|
+
md/sm/lg dimensions (32 / 44 / 40 px) without a layout shift. The glyph
|
|
23
|
+
keeps the NDS-native icon size (we render size="small"), so it isn't
|
|
24
|
+
oversized. */
|
|
25
|
+
/* Freeze the calculator's header open/close button at its 200%-zoom size
|
|
26
|
+
(factor is 1 at zoom <= 200%). Zoom on this wrapper, not the host. */.item-toolbar__nds-button-zoom.svelte-rnx3ie {display:inline-flex;zoom:var(--pie-toolbar-zoom-comp, 1);}.item-toolbar.svelte-rnx3ie nds-icon-button:where(.svelte-rnx3ie) {
|
|
27
|
+
/* Host-settable button size per toolbar size (drives the NDS outer button
|
|
28
|
+
via its own --height-32). */--height-32: var(--pie-calculator-button-size, 2rem);
|
|
29
|
+
/* Host-settable accent for the calculator button: the NDS tertiary glyph
|
|
30
|
+
colour derives from --color-interactive-blue, remapped here to a
|
|
31
|
+
themeable variable. --pie-calculator-button-color is package-private, so
|
|
32
|
+
nothing sets it and the default is what ships: it now resolves through
|
|
33
|
+
--pie-button-color (DaisyUI base-content) instead of holding the Figma
|
|
34
|
+
blue on every theme, with the literal as the no-theme last resort.
|
|
35
|
+
Not --pie-primary or --pie-tertiary: both are \`direct\` mappings of
|
|
36
|
+
DaisyUI slots chosen to pair with their own -content colour, so a glyph
|
|
37
|
+
taken from either sits at 1.37:1 against the page under \`pastel\` and 11
|
|
38
|
+
of the 35 shipped themes fall under SC 1.4.11's 3:1. */--color-interactive-blue: var(--pie-calculator-button-color, var(--pie-button-color, var(--pie-text, #222)));
|
|
39
|
+
/* NDS palette bridge — keep in sync with the copies in tool-tts-inline
|
|
40
|
+
and section-player SectionItemsPane (asserted by
|
|
41
|
+
scripts/check-theme-tokens.mjs). The vendored button paints its fill,
|
|
42
|
+
its on-accent glyph, its hover ring and its focus ring from the NDS
|
|
43
|
+
design-system palette, which no PIE theme sets, so a tertiary button
|
|
44
|
+
kept a #f3f5f7 pill on every page — and once the glyph followed the
|
|
45
|
+
theme, a light glyph landed on that light pill. */--color-new-gray: var(--pie-background-dark, #f3f5f7);--color-primary-white: var(--pie-white, #ffffff);--color-primary-black: var(--pie-text, #000000);--color-focus-blue: var(--pie-button-focus-outline, #2b87ff);}.item-toolbar--sm.svelte-rnx3ie nds-icon-button:where(.svelte-rnx3ie) {--height-32: var(--pie-calculator-button-size-sm, 2.75rem);}.item-toolbar--lg.svelte-rnx3ie nds-icon-button:where(.svelte-rnx3ie) {--height-32: var(--pie-calculator-button-size-lg, 2.5rem);}.item-toolbar__element-host.svelte-rnx3ie {display:contents;}.item-toolbar--sm.svelte-rnx3ie .item-toolbar__button:where(.svelte-rnx3ie) {width:2.75rem;height:2.75rem;}.item-toolbar--sm.svelte-rnx3ie {--pie-toolbar-tools-row-height: 2.75rem;--pie-tts-controls-row-height: 3.625rem;}.item-toolbar--lg.svelte-rnx3ie .item-toolbar__button:where(.svelte-rnx3ie) {width:2.5rem;height:2.5rem;}.item-toolbar--lg.svelte-rnx3ie {--pie-toolbar-tools-row-height: 2.5rem;--pie-tts-controls-row-height: 3.375rem;}.item-toolbar__button.svelte-rnx3ie:hover:not(:disabled) {background-color:var(--pie-button-hover-bg, var(--pie-secondary-background, #f5f5f5));border-color:var(--pie-button-hover-border, var(--pie-button-border, var(--pie-border, #ccc)));color:var(--pie-button-hover-color, var(--pie-button-color, var(--pie-text, #333)));transform:translateY(-1px);box-shadow:0 2px 4px color-mix(in srgb, var(--pie-black, #000) 10%, transparent);}.item-toolbar__button.svelte-rnx3ie:active:not(:disabled) {transform:translateY(0);box-shadow:none;}.item-toolbar__button--active.svelte-rnx3ie {background-color:var(--pie-primary, #1976d2);color:var(--pie-white, #fff);border-color:var(--pie-primary, #1976d2);}.item-toolbar__button--active.svelte-rnx3ie:hover:not(:disabled) {background-color:var(--pie-primary-dark, #1565c0);}.item-toolbar__button.svelte-rnx3ie:focus-visible {outline:2px solid var(--pie-button-focus-outline, var(--pie-primary, #1976d2));outline-offset:2px;}.item-toolbar__button.svelte-rnx3ie:disabled {opacity:0.5;cursor:not-allowed;}.item-toolbar__button.svelte-rnx3ie svg {width:100%;height:100%;}.item-toolbar__icon-image.svelte-rnx3ie {width:100%;height:100%;object-fit:contain;}`};function nj(H,N){gj(N,!0),hj(H,iJ);let p=typeof window<"u",VL=["/_fa-pro/fontawesome.min.css","/_fa-pro/light.min.css"],xL="https://cdn.jsdelivr.net/npm/@fortawesome/fontawesome-free@6.5.2/css/all.min.css",tj="https://fonts.googleapis.com/css2?family=Roboto:wght@400;500;700&display=swap",l0=/font.?awesome|fa-?pro/i,o0=!1,x0=()=>{if(!p||o0)return;if(o0=!0,!document.querySelector('link[href*="Roboto"]')){let U=document.createElement("link");U.rel="stylesheet",U.href=tj,document.head.appendChild(U)}if(Array.from(document.querySelectorAll('link[rel="stylesheet"][href]')).some((U)=>l0.test(U.href)))return;if(!document.querySelector(`link[href="${xL}"]`)){let U=document.createElement("link");U.rel="stylesheet",U.href=xL,document.head.appendChild(U)}for(let U of VL){if(document.querySelector(`link[href="${U}"]`))continue;let J=document.createElement("link");J.rel="stylesheet",J.href=U,document.head.appendChild(J)}},n0="__pieFaToolbarShadowInstalled",ej=(j)=>{let U=j.getRootNode();if(!(U instanceof ShadowRoot))return;let J=U;if(J[n0])return;J[n0]=!0;let K=new Set,q=(X)=>{if(!X||K.has(X))return;K.add(X);let W=document.createElement("link");W.rel="stylesheet",W.href=X,U.appendChild(W)},x=Array.from(document.querySelectorAll('link[rel="stylesheet"][href]')).filter((X)=>l0.test(X.href));for(let X of x)q(X.href)},LJ=(j)=>{return x0(),ej(j),{}},jJ=(j,U)=>{let J=U,K=()=>{let x=j.querySelector("button");if(x)x.setAttribute("aria-pressed",J?"true":"false")};K();let q=new MutationObserver(K);return q.observe(j,{childList:!0,subtree:!0}),{update(x){J=x,K()},destroy(){q.disconnect()}}},t0=(j)=>j.faIconName||null,JJ=new oj,yL=fL(mj({})),$L=r(N,"level",7,"item"),K0=r(N,"scopeId",7,""),B0=r(N,"itemId",7,""),S0=r(N,"sectionId",7,""),T0=r(N,"catalogId",7,""),A0=r(N,"tools",7,""),C0=r(N,"contentKind",7,"assessment-item"),BL=r(N,"position",7,"bottom"),dL=r(N,"scopeElement",7,null),I0=r(N,"toolRegistry",7,null),y0=r(N,"item",7,null),Q0=r(N,"hostButtons",23,()=>[]),p0=r(N,"class",7,""),rL=r(N,"size",7,"md"),X0=r(N,"language",7,"en-US"),ML=fL(null);function e0(){if(typeof window>"u")return 1;return _J(bJ(window.outerWidth,window.innerWidth),bj.maxZoom,bj.minCompensation)}let Lj=fL(1);UL(()=>{if(typeof window>"u")return;let j=()=>{OL(Lj,e0(),!0)};return j(),window.addEventListener("resize",j),()=>window.removeEventListener("resize",j)});let B=fL(null),lL=O(()=>L(B)?.ndsIcons===!0),oL=O(()=>pJ(L(B))),pL=fL(null),nL=fL(0),V0=fL(0),b0=fL(0);UL(()=>{if(!L(ML))return;return dj(L(ML),(j)=>{OL(B,j,!0)})}),UL(()=>{if(!L(ML))return;return rj(L(ML),(j)=>{OL(pL,j,!0)})}),UL(()=>{let j=L(B)?.toolkitCoordinator;if(!j||typeof j.onPolicyChange!=="function")return;let U=j.onPolicyChange(()=>{OL(V0,L(V0)+1)});return()=>{try{U?.()}catch{}}}),UL(()=>{let j=L(B)?.toolkitCoordinator;if(!j||typeof j.onToolContextResolverChange!=="function")return;let U=j.onToolContextResolverChange(()=>{OL(b0,L(b0)+1)});return()=>{try{U?.()}catch{}}});let S=O(()=>L(B)?.toolCoordinator),jj=O(()=>L(B)?.ttsService),mL=O(()=>L(B)?.elementToolStateStore),Y0=O(()=>L(B)?.assessmentId??""),tL=O(()=>B0()||L(pL)?.itemId||""),l=O(()=>L(pL)?.canonicalItemId||L(tL)),SL=O(()=>S0()||L(B)?.sectionId||""),uL=O(()=>C0()||L(pL)?.contentKind||($L()==="section"?"section":"assessment-item")),b=O(()=>{if($L()&&$L()!=="item")return $L();if(L(uL)==="rubric-block-stimulus")return"passage";return"item"}),FL=O(()=>{if(K0())return K0();if(L(b)==="section")return L(SL)||L(B)?.sectionId||"default-section";if(L(b)==="assessment")return L(B)?.assessmentId||"default-assessment";return L(l)||L(tL)||"default-item"}),Jj=O(()=>T0()||L(FL)),PL=O(()=>y0()||L(pL)?.item||null),t=O(()=>I0()||JJ),ZJ=O(()=>lj(A0())),UJ=O(()=>L(t).normalizeToolIds(L(ZJ)).filter(Boolean)),Zj=O(()=>{if(L(b)==="section")return"section";if(L(b)==="passage"||L(uL)==="rubric-block-stimulus")return"passage";return"item"}),D0=O(()=>{L(V0);let j=L(B)?.toolkitCoordinator;if(!j||typeof j.decideToolPolicy!=="function")return null;return j.decideToolPolicy({level:L(Zj),scope:{level:L(b),scopeId:L(FL),assessmentId:L(B)?.assessmentId,sectionId:L(SL)||void 0,itemId:L(tL)||void 0,canonicalItemId:L(l)||void 0,contentKind:L(uL)}})}),Uj=O(()=>{let j=(U)=>Array.from(new Set(U));if(L(D0))return j(L(t).normalizeToolIds(L(D0).visibleTools.map((U)=>U.toolId)).filter(Boolean));return j(L(UJ))}),KJ=O(()=>{let j=new Set;if(!L(D0))return j;for(let U of L(D0).visibleTools){if(!U.required&&!U.alwaysAvailable)continue;for(let J of L(t).normalizeToolIds([U.toolId]).filter(Boolean))j.add(J)}return j}),_0=O(()=>{if(L(b)==="section"||L(b)==="assessment")return!0;let j=L(PL)?.config;return!!(L(PL)&&j&&typeof j==="object")}),Kj=O(()=>{L(V0);let j=L(B)?.toolkitCoordinator;if(!j||typeof j.getPolicyInputs!=="function")return null;return j.getPolicyInputs()}),hL=O(()=>L(Kj)?.assessment??null),O0=O(()=>L(Kj)?.currentItemRef??null),bL=O(()=>{if(L(b)==="section")return{level:"section",assessment:L(hL)||{},section:{}};if(L(b)==="assessment")return{level:"assessment",assessment:L(hL)||{}};if(!L(_0)||!L(PL))return null;if(L(b)==="passage")return{level:"passage",assessment:L(hL)||{},itemRef:L(O0)||{id:L(l)},passage:L(PL)};return{level:"item",assessment:L(hL)||{},itemRef:L(O0)||{id:L(l)},item:L(PL)}}),Qj=O(()=>{if(L(bL))return L(bL);return{level:"item",assessment:L(hL)||{},itemRef:L(O0)||{id:L(l)},item:L(PL)||{id:L(l),config:{}}}}),G0=O(()=>{if(L(b)!=="item"&&L(b)!=="passage")return[];if(!L(_0)||!L(PL))return[];let j=L(PL)?.config?.models;return(Array.isArray(j)?j:j&&typeof j==="object"?Object.values(j):[]).filter((J)=>J&&typeof J==="object"&&typeof J.id==="string").map((J)=>({level:"element",assessment:L(hL)||{},itemRef:L(O0)||{id:L(l)},item:L(PL),elementId:J.id}))}),QJ=O(()=>{let j=L(B)?.toolkitCoordinator||null,U=(J)=>r0(J)?J:P0(J,L(b),L(FL));return{scope:{level:L(b),scopeId:L(FL),assessmentId:L(B)?.assessmentId,sectionId:L(SL),itemId:L(tL),canonicalItemId:L(l),contentKind:L(uL)},itemId:L(FL),catalogId:L(Jj),language:X0(),i18n:L(oL),ui:{size:rL()},getScopeElement:()=>dL()||L(pL)?.scopeElement||null,getGlobalElementId:()=>{if(!L(mL)||!L(Y0)||!L(SL)||!L(l))return null;return L(mL).getGlobalElementId(L(Y0),L(SL),L(l),L(l))},toolCoordinator:L(S)||null,toolkitCoordinator:j,ttsService:L(jj)||null,elementToolStateStore:L(mL)||null,toggleTool:(J)=>{if(!L(S))return;let K=U(J);if(!L(S).getToolState(K))L(S).registerTool(K,J);L(S).toggleTool(K)},isToolVisible:(J)=>{if(!L(S))return!1;return L(S).isToolVisible(U(J))},subscribeVisibility:L(S)?(J)=>L(S).subscribe(J):null}}),E0=O(()=>{L(b0);let j=L(B)?.toolkitCoordinator;if(!j||typeof j.hasToolContextResolver!=="function"||typeof j.resolveToolContext!=="function")return{};let U={};for(let J of L(Uj)){if(!L(t).get(J)?.supportedLevels.includes(L(b)))continue;if(!j.hasToolContextResolver(J))continue;let q=j.resolveToolContext({toolId:J,context:L(Qj),toolbarContext:L(QJ)});if(q)U[J]=q}return U}),XJ=O(()=>{let j=L(Uj).filter((X)=>{let W=L(t).get(X);return W?W.supportedLevels.includes(L(b)):!1}),U=Object.values(L(E0)),J=new Set(U.map((X)=>X.toolId)),K=new Set(U.filter((X)=>X.visible).map((X)=>X.toolId)),q=j.filter((X)=>!J.has(X));if(L(b)==="section")return q.forEach((X)=>K.add(X)),Array.from(K);if(!L(_0))return q.forEach((X)=>K.add(X)),Array.from(K);if(!L(bL)&&L(G0).length===0)return q.forEach((X)=>K.add(X)),Array.from(K);if(q.filter((X)=>L(KJ).has(X)).forEach((X)=>K.add(X)),L(bL))L(t).filterVisibleInContext(q,L(bL)).forEach((X)=>K.add(X.toolId));for(let X of L(G0))L(t).filterVisibleInContext(q,X).forEach((W)=>K.add(W.toolId));let x=L(bL)?[L(bL),...L(G0)]:L(G0);for(let X of Array.from(K)){if(J.has(X))continue;if(!L(t).isApplicableToAnyContext(X,x))K.delete(X)}return Array.from(K)}),eL=O(()=>L(t).filterToolIdsByActivation(L(XJ),"toolbar-toggle"));UL(()=>{if(!p)return;let j=!1;return L(t).ensureToolModulesLoaded(L(eL)).then(()=>{if(!j)OL(nL,L(nL)+1)}).catch((U)=>{console.error("[ItemToolBar] Failed to load one or more tool modules:",U)}),()=>{j=!0}});function VJ(){if(dL())return dL();return L(pL)?.scopeElement||null}function YJ(){if(!L(mL)||!L(Y0)||!L(SL)||!L(l))return null;return L(mL).getGlobalElementId(L(Y0),L(SL),L(l),L(l))}let _L=O(()=>{let j=L(B)?.toolkitCoordinator||null,U=(J)=>{return r0(J)?J:P0(J,L(b),L(FL))};return{scope:{level:L(b),scopeId:L(FL),assessmentId:L(B)?.assessmentId,sectionId:L(SL),itemId:L(tL),canonicalItemId:L(l),contentKind:L(uL)},itemId:L(FL),catalogId:L(Jj),language:X0(),i18n:L(oL),ui:{size:rL()},getScopeElement:VJ,getGlobalElementId:YJ,toolCoordinator:L(S)||null,toolkitCoordinator:j,ttsService:L(jj)||null,elementToolStateStore:L(mL)||null,toggleTool:(J)=>{if(!L(S))return;let K=U(J);if(!L(S).getToolState(K))L(S).registerTool(K,J);L(S).toggleTool(K)},isToolVisible:(J)=>{if(!L(S))return!1;return L(S).isToolVisible(U(J))},subscribeVisibility:L(S)?(J)=>L(S).subscribe(J):null,getResolvedToolContext:(J)=>L(E0)[J]??null,getToolRenderParams:(J)=>{let K=L(E0)[J]?.params??null,q=Xj.get(J);if(!q)return K;return{...K??{},...q}}}}),Xj=new Map,Vj=0,kL=O(()=>{if(!p)return[];L(nL);let j=[];for(let U of L(eL)){let J=L(t).renderForToolbar(U,L(Qj),L(_L));if(J)j.push(J)}return j}),DJ=O(()=>{if(!Array.isArray(Q0()))return[];let j=[];return Q0().forEach((U,J)=>{if(Ij(U)){j.push(U);return}console.warn(`[ItemToolBar] Ignoring invalid host button at index ${J}. Expected { id, label, href | onClick } with valid types.`)}),j}),OJ=O(()=>L(kL).filter((j)=>!!j.button).map((j)=>{let U=j.button;return{id:j.toolId,label:U.label,ariaLabel:U.ariaLabel||U.label,icon:U.icon,faIconName:U.faIconName,tooltip:U.tooltip||U.label,disabled:U.disabled,active:L(yL)[j.toolId]??U.active??!1,onClick:()=>{U.onClick(),cL()}}})),Yj=O(()=>[...L(OJ),...L(DJ)]),L0=O(()=>{let j={};for(let U of L(kL))j[U.toolId]=L(yL)[U.toolId]??U.button?.active??!1;return j}),GJ=O(()=>L(kL).flatMap((j)=>(j.elements||[]).filter((U)=>U.mount==="before-buttons").filter((U)=>Boolean(U.element)).map((U,J)=>({key:`before-${j.toolId}-${J}`,toolId:j.toolId,entry:U})))),MJ=O(()=>L(kL).flatMap((j)=>(j.elements||[]).filter((U)=>U.mount==="after-buttons").filter((U)=>Boolean(U.element)).map((U,J)=>({key:`after-${j.toolId}-${J}`,toolId:j.toolId,entry:U})))),Dj=O(()=>L(kL).flatMap((j)=>(j.elements||[]).filter((U)=>U.mount==="controls-row").filter((U)=>Boolean(U.element)).map((U,J)=>({key:`controls-row-${j.toolId}-${J}`,toolId:j.toolId,entry:U})))),Oj=O(()=>L(kL).flatMap((j)=>(j.elements||[]).map((U)=>({toolId:j.toolId,hint:U.layoutHints?.controlsRow})).filter((U)=>Boolean(U.hint)))),Gj=O(()=>L(kL).flatMap((j)=>(j.elements||[]).map((U)=>({toolId:j.toolId,hint:U.layoutHints?.headerOverlay})).filter((U)=>Boolean(U.hint)))),Mj=O(()=>L(Oj).some((j)=>j.hint?.reserveSpace===!0)),Nj=O(()=>L(Oj).some((j)=>j.hint?.showWhenToolActive===!0&&(L(L0)[j.toolId]??!1))),NJ=O(()=>BL()==="left"||BL()==="right"),Rj=O(()=>L(Gj).some((j)=>j.hint?.showWhenToolActive===!0&&(L(L0)[j.toolId]??!1))),RJ=O(()=>L(Dj).length>0||L(Mj)||L(Nj));function qJ(){if(!L(ML))return null;let j=L(ML).getRootNode();if(j instanceof ShadowRoot)return j.host;return null}UL(()=>{let j=qJ();if(!j)return;let U=L(Gj).length>0,J=L(Rj);return j.setAttribute("data-pie-header-overlay",U?"true":"false"),j.setAttribute("data-pie-header-overlay-active",J?"true":"false"),()=>{j.removeAttribute("data-pie-header-overlay"),j.removeAttribute("data-pie-header-overlay-active")}}),UL(()=>{if(!p)return;if(L(Yj).some((j)=>!!t0(j)))x0()});function M0(j){if(j.id in L(yL))return L(yL)[j.id]===!0;return j.active===!0}function qj(j){return yj(j)}function cL(){let j={};for(let U of L(kL))if(U.sync?.(),U.button)j[U.toolId]=U.button.active??!1;OL(yL,j,!0)}UL(()=>{let j=[];cL();for(let U of L(kL))if(U.subscribeActive){let J=!1,K=U.subscribeActive((q)=>{queueMicrotask(()=>{if(J)return;OL(yL,{...L(yL),[U.toolId]:q},!0),U.sync?.()})});j.push(()=>{J=!0,K()})}return()=>{j.forEach((U)=>U())}}),UL(()=>{let j=L(B)?.toolkitCoordinator;if(typeof j?.registerToolRequestTarget!=="function")return;let U=L(Zj);return j.registerToolRequestTarget({level:U,hostsTool:(J)=>L(eL).includes(J),open:(J,K)=>{if(!L(S))return;if(!L(eL).includes(J))return;if(K&&Object.keys(K).length>0)Vj+=1,Xj.set(J,{...K,toolRequestId:Vj});let q=P0(J,L(b),L(FL));if(!L(S).getToolState(q))L(S).registerTool(q,J);L(S).showTool(q),queueMicrotask(()=>cL())}})}),UL(()=>{if(!L(_L).subscribeVisibility)return;let j=!1,U=L(_L).subscribeVisibility(()=>{queueMicrotask(()=>{if(j)return;cL()})});return()=>{j=!0,U?.()}}),UL(()=>{let j=L(_L).toolkitCoordinator;if(typeof j?.subscribeTelemetry!=="function")return;let U=!1,J=j.subscribeTelemetry(({eventName:K,payload:q})=>{if(K!=="pie-toolkit-tool-config-updated")return;if(q?.toolId&&!L(eL).includes(q.toolId))return;queueMicrotask(()=>{if(U)return;OL(nL,L(nL)+1),cL()})});return()=>{U=!0,J?.()}});function v0(j,U){let J=null,K=(x)=>{if(!x)return;let X=x.__pieToolElementUnmount;if(typeof X==="function")X()},q=(x)=>{if(J===x)return;if(J){if(K(J),J.parentNode===j)j.removeChild(J)}if(J=x,J){if(J.parentNode&&J.parentNode!==j)J.parentNode.removeChild(J);j.appendChild(J)}};return q(U),{update(x){q(x)},destroy(){q(null)}}}function g0(j,U){let J=U,K=null,q=null,x=[],X=null,W=null,WL=null,f=null,Y=null,NL=null,jL=null,i=null,a=!1,T=!1,g=()=>J.mounted.entry.shell?.pageTabOrder===!0,_=()=>J.mounted.entry.shell?.ndsHeaderControls===!0,F=null,u=null,I=null,w=0,C=0,$=0,o=0,h=0,RL=0,EL=0,vL=0,wL=null,gL=[],E=0,v=0,P=J.mounted.entry.shell?.initialWidth??720,k=J.mounted.entry.shell?.initialHeight??560,TL=P,sL=k,zL=!1,qL=null,A=null,c=!1,Pj=(Z)=>{if(!Z)return;let V=Z.__pieToolElementUnmount;if(typeof V==="function")V()},$0=()=>{let Z=J.mounted.entry.shell;if(!Z)return null;return{toolId:J.mounted.toolId,toolbarContext:L(_L),shellConfig:Z}},WJ=(Z)=>{let V=L(t).get(J.mounted.toolId),G=$0();if(!V?.onHostedMount||!G)return;V.onHostedMount(Z,G)},N0=()=>{let Z=L(t).get(J.mounted.toolId),V=$0();if(!Z?.onHostedResize||!V)return;Z.onHostedResize({width:P,height:k},J.mounted.entry.element,V)},wJ=()=>{let Z=L(t).get(J.mounted.toolId),V=$0();if(!Z?.onHostedUnmount||!V)return;Z.onHostedUnmount(J.mounted.entry.element,V)},e=(Z,V,G)=>Math.max(V,Math.min(Z,G)),zJ=()=>{let Z=J.mounted.entry.shell,V=Z?.minWidth??320,G=Z?.minHeight??240,D=Z?.maxWidth??window.innerWidth,Q=Z?.maxHeight??window.innerHeight;return{minWidth:V,minHeight:G,maxWidth:D,maxHeight:Q}},m0=()=>{let Z=J.mounted.entry.shell?.minWidth,V=typeof Z==="number"&&Z>0&&P<Z,G=V?`${Z}px`:"";if(F)F.style.minWidth=G;if(X)X.style.minWidth=G;if(W)W.style.minWidth=G;if(K)K.style.overflowX=V?"auto":"visible",K.style.overflowY="visible"},kj=()=>J.mounted.entry.shell?.content?.overflowY==="auto"?"auto":"hidden",fJ=()=>{if(!X)return 0;let Z=X.getBoundingClientRect().height;if(Z>0)return Z;return X.offsetHeight||0},u0=()=>{if(!W)return;let Z=J.mounted.entry.shell;if(W.style.overflowX="hidden",W.style.overflowY=kj(),!F)return;if(Z?.content?.preserveMinHeight===!0){let V=fJ(),G=Z.minHeight??240,D=Math.max(0,G-V),Q=Math.max(0,k-V),M=Math.max(Q,D);F.style.height=`${M}px`,F.style.minHeight="0",F.style.flex=`0 0 ${M}px`;return}F.style.height="100%",F.style.minHeight="0",F.style.flex="1 1 auto"},HJ=()=>{let Z=J.mounted.entry.shell,V=Z?.initialWidth??720,G=Z?.initialHeight??560;if(V===TL&&G===sL)return;if(TL=V,sL=G,zL)return;P=V,k=G,F0()},R0=()=>{let{minWidth:Z,minHeight:V,maxWidth:G,maxHeight:D}=zJ(),Q=Math.min(Z,window.innerWidth),M=Math.min(V,window.innerHeight);P=e(P,Q,Math.max(Q,Math.min(G,window.innerWidth))),k=e(k,M,Math.max(M,Math.min(D,window.innerHeight))),E=e(E,0,Math.max(0,window.innerWidth-P)),v=e(v,0,Math.max(0,window.innerHeight-k)),j0(),m0(),u0(),N0()},AL=(Z,V)=>{zL=!0,E+=Z,v+=V,R0()},q0=(Z,V)=>{zL=!0,P+=Z,k+=V,R0()},Wj=(Z,V,G,D="fa-regular")=>{let Q=document.createElement("nds-icon-button");if(Q.setAttribute("variant","tertiary"),Q.setAttribute("size","small"),Q.setAttribute("type","circle"),Q.setAttribute("icon-name",V),Q.setAttribute("button-aria-label",Z),Q.title=Z,Q.addEventListener("click",(M)=>{M.stopPropagation(),G(),iL()}),D!=="fa-light"){let M=(y)=>{y.classList.remove("fa-light"),y.classList.add(D)},R=Q.querySelector("i.fa-light");if(R)M(R);else{let y=new MutationObserver(()=>{let s=Q.querySelector("i.fa-light");if(s)M(s),y.disconnect()});y.observe(Q,{childList:!0,subtree:!0})}}return Q},wj=(Z,V,G)=>{let D=document.createElement("button");return D.type="button",D.className="pie-tool-shell__control",D.setAttribute("aria-label",Z),D.title=Z,D.textContent=V,D.style.border="1px solid transparent",D.style.background="color-mix(in srgb, var(--pie-white, #fff) 10%, transparent)",D.style.color="inherit",D.style.cursor="pointer",D.style.display="inline-flex",D.style.alignItems="center",D.style.justifyContent="center",D.style.width="28px",D.style.height="28px",D.style.padding="0",D.style.fontSize="14px",D.style.fontWeight="700",D.style.borderRadius="8px",D.style.lineHeight="1",D.onclick=(Q)=>{Q.stopPropagation(),G(),iL()},D.onfocus=()=>{D.style.outline="2px solid var(--pie-button-focus-outline, var(--pie-primary, #4A90E2))",D.style.outlineOffset="2px"},D.onblur=()=>{D.style.outline="none",D.style.outlineOffset="0"},D},j0=()=>{if(!K)return;K.style.left=`${E}px`,K.style.top=`${v}px`,K.style.width=`${P}px`,K.style.height=`${k}px`,K.style.display=J.active?"flex":"none",K.style.setProperty("--pie-tool-shell-zoom-comp",String(e0()))},zj=()=>{if(WL)WL.textContent=J.mounted.entry.shell?.title||J.mounted.toolId;for(let{el:Z,key:V}of x){let G=J.i18n.t(V);if(Z.tagName==="NDS-ICON-BUTTON")Z.setAttribute("button-aria-label",G);else Z.setAttribute("aria-label",G);if(Z.title)Z.title=G}},fj=()=>{if(!W)return;let Z=J.mounted.entry.element;if(Z.style.display="block",Z.style.width="100%",Z.style.height="100%",Z.style.flex="1 1 auto",Z.style.minHeight="0",F&&F!==Z){if(F.parentNode===W)Pj(F),W.removeChild(F);F=null}if(Z.parentNode&&Z.parentNode!==W)Z.parentNode.removeChild(Z);if(Z.parentNode!==W)W.appendChild(Z);F=Z,m0(),u0(),WJ(Z)},iL=()=>{if(L(S)&&K)L(S).bringToFront(K)},F0=()=>{let{innerWidth:Z,innerHeight:V}=window,G=J.mounted.entry.shell,D=G?.initialAlign??"center",Q=G?.initialMargin??16,M=Q+60;switch(D){case"top-left":E=Q,v=M;break;case"top-right":E=Math.max(0,Z-P-Q),v=M;break;case"bottom-left":E=Q,v=Math.max(0,V-k-M);break;case"bottom-right":E=Math.max(0,Z-P-Q),v=Math.max(0,V-k-M);break;default:E=Math.max(0,Math.round((Z-P)/2)),v=Math.max(0,Math.round((V-k)/2))}R0()},xJ=()=>{let Z=A;if(!Z)return;queueMicrotask(()=>{if(!Z.isConnected)return;try{Z.focus()}catch{}})},Hj=()=>{if(typeof document>"u")return null;let Z=document.activeElement;while(Z){let V=Z.shadowRoot;if(V&&V.activeElement&&V.activeElement!==Z)Z=V.activeElement;else break}return Z??null},xj=()=>{if(!K||qL)return;let Z=Hj();if(!A&&Z&&!K.contains(Z))A=Z;if(g()&&!T)document.addEventListener("keydown",c0,!0),T=!0;qL=vJ(K,{initialFocus:Y,onEscape:()=>{s0()},wrap:!g(),onTabExit:g()?(V,G)=>{if(V==="backward"){if(A?.isConnected){G.preventDefault();try{A.focus()}catch{}}return}let D=h0();if(D){G.preventDefault();try{D.focus()}catch{}}}:void 0})},h0=()=>{let Z=L(_L).getScopeElement?.()??null;if(!Z)return null;let V=(D)=>{if(L(ML)&&L(ML).contains(D))return!0;if(K&&K.contains(D))return!0;return!1},G=(D)=>{if(D instanceof HTMLElement){if(V(D))return null;if(D.matches?.(gJ)&&$J(D))return D}let Q=D.shadowRoot;if(Q)for(let M=0;M<Q.children.length;M++){let R=G(Q.children[M]);if(R)return R}for(let M=0;M<D.children.length;M++){let R=G(D.children[M]);if(R)return R}return null};return G(Z)},BJ=()=>{if(!K)return[];return EJ(K).filter((Z)=>Z!==jL&&Z!==i)},c0=(Z)=>{if(Z.key!=="Tab")return;if(!K||!J.active)return;let V=Hj();if(!V)return;if(K.contains(V))return;let G=BJ();if(G.length===0)return;if(Z.shiftKey){let D=h0();if(V!==D)return;Z.preventDefault();try{G[G.length-1].focus()}catch{}return}if(V!==A)return;Z.preventDefault();try{G[0].focus()}catch{}},Bj=()=>{if(T)document.removeEventListener("keydown",c0,!0),T=!1;if(!qL)return;let Z=qL;qL=null;try{Z()}catch{}xJ()},s0=()=>{L(_L).toggleTool(J.mounted.toolId),cL()},Sj=(Z)=>{if(!J.mounted.entry.shell?.draggable)return;if(Z.target.closest("button")||!K)return;Z.preventDefault(),zL=!0,u=Z.pointerId,w=Z.clientX-E,C=Z.clientY-v,K.setPointerCapture(Z.pointerId),iL()},SJ=(Z)=>(V)=>{if(!K||!J.mounted.entry.shell?.resizable)return;V.preventDefault(),V.stopPropagation(),zL=!0,I=V.pointerId,wL=Z,$=P,o=k,h=V.clientX,RL=V.clientY,EL=E,vL=v,K.setPointerCapture(V.pointerId),iL()},Tj=(Z)=>{if(!K)return;if(u===Z.pointerId){Z.preventDefault();let V=Math.max(0,window.innerWidth-P),G=Math.max(0,window.innerHeight-k);E=e(Z.clientX-w,0,V),v=e(Z.clientY-C,0,G),j0();return}if(I===Z.pointerId){Z.preventDefault();let V=J.mounted.entry.shell,G=V?.minWidth??320,D=V?.minHeight??240,Q=Math.min(G,window.innerWidth),M=Math.min(D,window.innerHeight),R=V?.maxWidth??window.innerWidth,y=V?.maxHeight??window.innerHeight,s=Z.clientX-h,JL=Z.clientY-RL;if(wL==="se")P=e($+s,Q,Math.max(Q,Math.min(R,window.innerWidth-E))),k=e(o+JL,M,Math.max(M,Math.min(y,window.innerHeight-v)));else if(wL==="sw"){let n=EL+$,YL=e($-s,Q,Math.min(R,n));E=n-YL,P=YL,k=e(o+JL,M,Math.max(M,Math.min(y,window.innerHeight-v)))}else if(wL==="ne"){let n=vL+o;P=e($+s,Q,Math.max(Q,Math.min(R,window.innerWidth-E)));let YL=e(o-JL,M,Math.min(y,n));v=n-YL,k=YL}else if(wL==="nw"){let n=EL+$,YL=vL+o,m=e($-s,Q,Math.min(R,n));E=n-m,P=m;let J0=e(o-JL,M,Math.min(y,YL));v=YL-J0,k=J0}j0(),m0(),u0(),N0()}},Aj=(Z)=>{if(!K)return;if(u===Z.pointerId)u=null,K.releasePointerCapture(Z.pointerId);if(I===Z.pointerId)I=null,K.releasePointerCapture(Z.pointerId)},Cj=()=>{R0()};if(p&&J.mounted.entry.shell){let Z=J.mounted.entry.shell?.ndsHeaderControls===!0&&L(lL);if(Z)x0();if(K=document.createElement("div"),K.className="pie-tool-shell",K.setAttribute("data-pie-tool-shell",J.mounted.toolId),K.style.position="fixed",K.style.zIndex="2000",K.style.background="var(--pie-background, #fff)",K.style.border="1px solid var(--pie-border-light, #d1d5db)",K.style.borderRadius="12px",K.style.boxShadow="0 10px 40px color-mix(in srgb, var(--pie-black, #000) 25%, transparent)",K.style.setProperty("--color-interactive-blue","var(--pie-calculator-button-color, var(--pie-button-color, var(--pie-text, #222)))"),K.style.setProperty("--color-new-gray","var(--pie-background-dark, #f3f5f7)"),K.style.setProperty("--color-primary-white","var(--pie-white, #ffffff)"),K.style.setProperty("--color-primary-black","var(--pie-text, #000000)"),K.style.setProperty("--color-focus-blue","var(--pie-button-focus-outline, #2b87ff)"),K.style.overflow="visible",K.style.display=J.active?"flex":"none",K.style.flexDirection="column",K.style.userSelect="none",K.style.webkitUserSelect="none",K.style.touchAction="none",K.setAttribute("draggable","false"),K.addEventListener("dragstart",(Q)=>Q.preventDefault()),X=document.createElement("div"),X.className="pie-tool-shell__header",X.style.display="flex",X.style.alignItems="center",X.style.justifyContent="space-between",X.style.gap="6px",X.style.padding=_()?"12px 12px 12px 28px":"10px 12px",_())X.style.minHeight="48px";if(_())X.style.background="var(--pie-section-player-card-header-background, var(--pie-button-active-bg, #f3f4f6))",X.style.color="var(--pie-text, #111827)",X.style.borderBottom="1px solid var(--pie-border-light, #e5e7eb)";else X.style.background="var(--pie-primary-dark, #2c3e50)",X.style.color="var(--pie-white, #fff)";X.style.cursor=J.mounted.entry.shell.draggable===!1?"default":"move",X.style.flex="0 0 auto",X.style.borderRadius="12px 12px 0 0",X.style.overflow="hidden",X.style.userSelect="none",X.style.webkitUserSelect="none",X.style.touchAction="none",X.setAttribute("draggable","false"),X.addEventListener("dragstart",(Q)=>Q.preventDefault()),WL=document.createElement("span"),WL.className="pie-tool-shell__title",WL.textContent=J.mounted.entry.shell.title||J.mounted.toolId,X.appendChild(WL),f=document.createElement("div"),f.className="pie-tool-shell__controls",f.style.display="inline-flex",f.style.alignItems="center",f.style.gap=_()?"6px":"4px";let V=J.mounted.entry.shell,G=(Q,M,R,y,s="fa-regular")=>{if(!f)return;let JL=J.i18n.t(Q),n=Z?Wj(JL,R,y,s):wj(JL,M,y);x.push({el:n,key:Q}),f.appendChild(n)};if(V?.draggable!==!1)G("toolkit.window.moveLeftA11y","←","chevron-left",()=>AL(-24,0)),G("toolkit.window.moveRightA11y","→","chevron-right",()=>AL(24,0)),G("toolkit.window.moveUpA11y","↑","chevron-up",()=>AL(0,-24)),G("toolkit.window.moveDownA11y","↓","chevron-down",()=>AL(0,24));if(V?.resizable!==!1)G("toolkit.window.shrinkA11y","−","magnifying-glass-minus",()=>q0(-40,-40)),G("toolkit.window.growA11y","+","magnifying-glass-plus",()=>q0(40,40));if(!_()){let Q=wj(J.i18n.t("toolkit.window.centerA11y"),"◎",F0);x.push({el:Q,key:"toolkit.window.centerA11y"}),f.appendChild(Q)}let D=null;if(_())D=document.createElement("div"),D.className="pie-tool-shell__header-right",D.style.display="inline-flex",D.style.alignItems="center",D.style.gap="6px",D.style.setProperty("zoom","var(--pie-tool-shell-zoom-comp, 1)"),D.appendChild(f),X.appendChild(D);else X.appendChild(f);if(Z)Y=Wj(J.i18n.t("toolkit.window.closeA11y"),"xmark",s0,"fa-regular"),x.push({el:Y,key:"toolkit.window.closeA11y"}),Y.style.display=J.mounted.entry.shell.closeable===!1?"none":"inline-block";else{let Q=document.createElement("button");Q.type="button",Q.className="pie-tool-shell__close",Q.setAttribute("aria-label",J.i18n.t("toolkit.window.closeA11y")),x.push({el:Q,key:"toolkit.window.closeA11y"});let M="http://www.w3.org/2000/svg",R=document.createElementNS(M,"svg");R.setAttribute("xmlns",M),R.setAttribute("viewBox","0 0 16 16"),R.setAttribute("aria-hidden","true");let y=document.createElementNS(M,"path");y.setAttribute("d","M3.5 3.5L12.5 12.5M12.5 3.5L3.5 12.5"),y.setAttribute("stroke","currentColor"),y.setAttribute("stroke-width","1.8"),y.setAttribute("stroke-linecap","round"),R.appendChild(y),Q.appendChild(R);let s=R.style;s.width="16px",s.height="16px",s.display="block",s.flexShrink="0",s.pointerEvents="none";let JL="color-mix(in srgb, var(--pie-white, #fff) 8%, transparent)",n="color-mix(in srgb, var(--pie-white, #fff) 18%, transparent)";Q.style.border="1px solid transparent",Q.style.background=JL,Q.style.color="inherit",Q.style.cursor="pointer",Q.style.display="inline-flex",Q.style.alignItems="center",Q.style.justifyItems="center",Q.style.width="28px",Q.style.height="28px",Q.style.padding="0",Q.style.borderRadius="8px",Q.style.lineHeight="0",Q.style.transition="background-color 0.15s ease, border-color 0.15s ease",Q.style.display=J.mounted.entry.shell.closeable===!1?"none":"inline-flex",Q.onmouseenter=()=>{Q.style.background=n},Q.onmouseleave=()=>{Q.style.background=JL},Q.onfocus=()=>{Q.style.outline="2px solid var(--pie-button-focus-outline, var(--pie-primary, #4A90E2))",Q.style.outlineOffset="2px"},Q.onblur=()=>{Q.style.outline="none",Q.style.outlineOffset="0"},Q.onclick=s0,Y=Q}if(D)D.appendChild(Y);else X.appendChild(Y);if(X.tabIndex=0,X.onkeydown=(Q)=>{if(Q.key==="Home"){Q.preventDefault(),F0();return}let M=J.mounted.entry.shell;if(Q.shiftKey&&M?.resizable!==!1){if(Q.key==="ArrowRight"||Q.key==="ArrowDown"){Q.preventDefault(),q0(40,40);return}if(Q.key==="ArrowLeft"||Q.key==="ArrowUp"){Q.preventDefault(),q0(-40,-40);return}}if(M?.draggable!==!1){if(Q.key==="ArrowLeft")Q.preventDefault(),AL(-24,0);else if(Q.key==="ArrowRight")Q.preventDefault(),AL(24,0);else if(Q.key==="ArrowUp")Q.preventDefault(),AL(0,-24);else if(Q.key==="ArrowDown")Q.preventDefault(),AL(0,24)}},W=document.createElement("div"),W.className="pie-tool-shell__content",W.style.position="relative",W.style.width="100%",W.style.flex="1 1 auto",W.style.minHeight="0",W.style.overflowX="hidden",W.style.overflowY=kj(),W.style.borderRadius="0 0 12px 12px",_()){let Q=(M)=>{let R=document.createElement("div");return R.tabIndex=0,R.setAttribute("aria-hidden","true"),R.setAttribute("data-pie-tool-shell-focus-guard",M),R.style.position="absolute",R.style.width="1px",R.style.height="1px",R.style.padding="0",R.style.margin="-1px",R.style.overflow="hidden",R.style.clipPath="inset(50%)",R.style.whiteSpace="nowrap",R.style.border="0",R};jL=Q("start"),i=Q("end"),jL.addEventListener("focus",(M)=>{if(a)return;a=!0;try{if(M.stopPropagation(),A?.isConnected)try{A.focus()}catch{}}finally{queueMicrotask(()=>{a=!1})}}),i.addEventListener("focus",(M)=>{if(a)return;a=!0;try{M.stopPropagation();let R=h0();if(R)try{R.focus()}catch{}}finally{queueMicrotask(()=>{a=!1})}}),K.appendChild(jL)}if(K.appendChild(X),K.appendChild(W),_()&&i)K.appendChild(i);if(J.mounted.entry.shell.resizable!==!1){let Q=(M,R,y,s,JL,n,YL)=>{let m=document.createElement("div");if(m.className="pie-tool-shell__resize",m.style.position="absolute",m.style.width="24px",m.style.height="24px",m.style.cursor=n,m.style.zIndex="10",m.style.touchAction="none",m.setAttribute("draggable","false"),R!==null)m.style.top=R;if(y!==null)m.style.right=y;if(s!==null)m.style.bottom=s;if(JL!==null)m.style.left=JL;if(YL!==null)m.style.background=`linear-gradient(${YL}, transparent 0%, transparent 40%, rgba(0,0,0,0.35) 40%, rgba(0,0,0,0.35) 60%, transparent 60%, transparent 100%)`;let J0=SJ(M);m.addEventListener("pointerdown",J0),K.appendChild(m),gL.push({el:m,handler:J0})};Q("se",null,"0","0",null,"nwse-resize",null),Q("nw","0",null,null,"0","nwse-resize","135deg"),Q("ne","0","0",null,null,"nesw-resize",null),Q("sw",null,null,"0","0","nesw-resize",null)}if(X.addEventListener("pointerdown",Sj),K.addEventListener("pointermove",Tj),K.addEventListener("pointerup",Aj),K.addEventListener("pointerdown",iL),window.addEventListener("resize",Cj),document.body.appendChild(K),q=new yJ(K,{context:aj,initialValue:J.runtime}),q.connect(),F0(),j0(),zj(),fj(),N0(),J.active)xj();c=J.active}return{update(Z){if(J=Z,!K||!W||!WL||!Y)return;q?.setValue(J.runtime),zj(),HJ();let V=Y.tagName.toLowerCase()==="nds-icon-button"?"inline-block":"inline-flex";if(Y.style.display=J.mounted.entry.shell?.closeable===!1?"none":V,j0(),fj(),N0(),!c&&J.active)xj();else if(c&&!J.active)Bj(),A=null;c=J.active},destroy(){if(wJ(),q?.disconnect(),q=null,x.length=0,qL)Bj();if(T)document.removeEventListener("keydown",c0,!0),T=!1;for(let{el:Z,handler:V}of gL)Z.removeEventListener("pointerdown",V);if(A=null,gL.length=0,X)X.removeEventListener("pointerdown",Sj),X.onkeydown=null;if(K)K.removeEventListener("pointermove",Tj),K.removeEventListener("pointerup",Aj),K.removeEventListener("pointerdown",iL);if(window.removeEventListener("resize",Cj),F&&W&&F.parentNode===W)Pj(F),W.removeChild(F);if(F=null,K&&K.parentElement)K.remove()}}}var FJ={get level(){return $L()},set level(j){$L(j),d()},get scopeId(){return K0()},set scopeId(j){K0(j),d()},get itemId(){return B0()},set itemId(j){B0(j),d()},get sectionId(){return S0()},set sectionId(j){S0(j),d()},get catalogId(){return T0()},set catalogId(j){T0(j),d()},get tools(){return A0()},set tools(j){A0(j),d()},get contentKind(){return C0()},set contentKind(j){C0(j),d()},get position(){return BL()},set position(j){BL(j),d()},get scopeElement(){return dL()},set scopeElement(j){dL(j),d()},get toolRegistry(){return I0()},set toolRegistry(j){I0(j),d()},get item(){return y0()},set item(j){y0(j),d()},get hostButtons(){return Q0()},set hostButtons(j){Q0(j),d()},get class(){return p0()},set class(j){p0(j),d()},get size(){return rL()},set size(j){rL(j),d()},get language(){return X0()},set language(j){X0(j),d()}},Fj=QL(),PJ=ZL(Fj);{var kJ=(j)=>{var U=sJ();let J;var K=aL(U),q=aL(K);Z0(q,17,()=>L(GJ),(f)=>f.key,(f,Y)=>{var NL=QL(),jL=ZL(NL);{var i=(T)=>{var g=QL(),_=ZL(g);H0(_,()=>L(lL),(F)=>{var u=W0();HL(u,(I,w)=>g0?.(I,w),()=>({mounted:L(Y),active:L(L0)[L(Y).toolId]??!1,runtime:L(B),i18n:L(oL)})),z(F,u)}),z(T,g)},a=(T)=>{var g=W0();HL(g,(_,F)=>v0?.(_,F),()=>L(Y).entry.element),z(T,g)};XL(jL,(T)=>{if(L(Y).entry.shell)T(i);else T(a,-1)})}z(f,NL)});var x=z0(q,2);Z0(x,17,()=>L(Yj),(f)=>f.id,(f,Y,NL,jL)=>{let i=O(()=>L(lL)&&!i0(L(Y))?t0(L(Y)):null);var a=QL(),T=ZL(a);{var g=(I)=>{var w=mJ(),C=aL(w);CL(C,1,"item-toolbar__nds-button svelte-rnx3ie"),IL(C,"type","circle"),IL(C,"size","small"),IL(C,"variant","tertiary"),KL(()=>IL(C,"icon-name",L(i))),KL(()=>IL(C,"button-aria-label",L(Y).ariaLabel||L(Y).label)),KL(()=>IL(C,"title",L(Y).tooltip||L(Y).label)),KL(()=>IL(C,"disabled",L(Y).disabled)),HL(C,($)=>LJ?.($)),HL(C,($,o)=>jJ?.($,o),()=>M0(L(Y))),DL(w),f0("click",C,function(...$){L(Y).onClick?.apply(this,$)}),z(I,w)},_=(I)=>{var w=uJ();let C;var $=aL(w);{var o=(h)=>{var RL=QL(),EL=ZL(RL);{var vL=(P)=>{var k=w0();U0(k,()=>k0(L(Y).icon),!0),DL(k),z(P,k)},wL=O(()=>a0(L(Y).icon)),gL=(P)=>{var k=_j();KL(()=>LL(k,"src",L(Y).icon)),z(P,k)},E=O(()=>d0(L(Y).icon)),v=(P)=>{let k=O(()=>qj(L(Y).icon));var TL=QL(),sL=ZL(TL);{var zL=(A)=>{var c=w0();U0(c,()=>k0(L(k)),!0),DL(c),z(A,c)},qL=(A)=>{var c=Ej();KL(()=>CL(c,1,`icon icon-${L(Y).icon}`,"svelte-rnx3ie")),z(A,c)};XL(sL,(A)=>{if(L(k))A(zL);else A(qL,-1)})}z(P,TL)};XL(EL,(P)=>{if(L(wL))P(vL);else if(L(E))P(gL,1);else P(v,-1)})}z(h,RL)};XL($,(h)=>{if(L(Y).icon)h(o)})}DL(w),KL((h)=>{C=CL(w,1,"item-toolbar__button svelte-rnx3ie",null,C,h),LL(w,"href",L(Y).disabled?void 0:L(Y).href),LL(w,"target",L(Y).target),LL(w,"rel",L(Y).rel),LL(w,"aria-label",L(Y).ariaLabel||L(Y).label),LL(w,"title",L(Y).tooltip||L(Y).label),LL(w,"aria-disabled",L(Y).disabled?"true":void 0)},[()=>({"item-toolbar__button--active":M0(L(Y))})]),f0("click",w,(h)=>{if(L(Y).disabled)h.preventDefault()}),z(I,w)},F=O(()=>i0(L(Y))),u=(I)=>{var w=hJ();let C;var $=aL(w);{var o=(h)=>{var RL=QL(),EL=ZL(RL);{var vL=(P)=>{var k=w0();U0(k,()=>k0(L(Y).icon),!0),DL(k),z(P,k)},wL=O(()=>a0(L(Y).icon)),gL=(P)=>{var k=_j();KL(()=>LL(k,"src",L(Y).icon)),z(P,k)},E=O(()=>d0(L(Y).icon)),v=(P)=>{let k=O(()=>qj(L(Y).icon));var TL=QL(),sL=ZL(TL);{var zL=(A)=>{var c=w0();U0(c,()=>k0(L(k)),!0),DL(c),z(A,c)},qL=(A)=>{var c=Ej();KL(()=>CL(c,1,`icon icon-${L(Y).icon}`,"svelte-rnx3ie")),z(A,c)};XL(sL,(A)=>{if(L(k))A(zL);else A(qL,-1)})}z(P,TL)};XL(EL,(P)=>{if(L(wL))P(vL);else if(L(E))P(gL,1);else P(v,-1)})}z(h,RL)};XL($,(h)=>{if(L(Y).icon)h(o)})}DL(w),KL((h,RL)=>{C=CL(w,1,"item-toolbar__button svelte-rnx3ie",null,C,h),LL(w,"aria-label",L(Y).ariaLabel||L(Y).label),LL(w,"aria-pressed",RL),LL(w,"title",L(Y).tooltip||L(Y).label),w.disabled=L(Y).disabled},[()=>({"item-toolbar__button--active":M0(L(Y))}),()=>M0(L(Y))]),f0("click",w,function(...h){L(Y).onClick?.apply(this,h)}),z(I,w)};XL(T,(I)=>{if(L(i))I(g);else if(L(F))I(_,1);else I(u,-1)})}z(f,a)});var X=z0(x,2);Z0(X,17,()=>L(MJ),(f)=>f.key,(f,Y)=>{var NL=QL(),jL=ZL(NL);{var i=(T)=>{var g=QL(),_=ZL(g);H0(_,()=>L(lL),(F)=>{var u=W0();HL(u,(I,w)=>g0?.(I,w),()=>({mounted:L(Y),active:L(L0)[L(Y).toolId]??!1,runtime:L(B),i18n:L(oL)})),z(F,u)}),z(T,g)},a=(T)=>{var g=W0();HL(g,(_,F)=>v0?.(_,F),()=>L(Y).entry.element),z(T,g)};XL(jL,(T)=>{if(L(Y).entry.shell)T(i);else T(a,-1)})}z(f,NL)}),DL(K);var W=z0(K,2);{var WL=(f)=>{var Y=cJ();let NL;Z0(Y,21,()=>L(Dj),(jL)=>jL.key,(jL,i)=>{var a=QL(),T=ZL(a);{var g=(F)=>{var u=QL(),I=ZL(u);H0(I,()=>L(lL),(w)=>{var C=vj();HL(C,($,o)=>g0?.($,o),()=>({mounted:L(i),active:L(L0)[L(i).toolId]??!1,runtime:L(B),i18n:L(oL)})),z(w,C)}),z(F,u)},_=(F)=>{var u=vj();HL(u,(I,w)=>v0?.(I,w),()=>L(i).entry.element),z(F,u)};XL(T,(F)=>{if(L(i).entry.shell)F(g);else F(_,-1)})}z(jL,a)}),DL(Y),KL(()=>NL=CL(Y,1,"item-toolbar__controls-row svelte-rnx3ie",null,NL,{"item-toolbar__controls-row--reserve":L(Mj),"item-toolbar__controls-row--active":L(Nj),"item-toolbar__controls-row--align-start":L(NJ)})),z(f,Y)};XL(W,(f)=>{if(L(RJ))f(WL)})}DL(U),sj(U,(f)=>OL(ML,f),()=>L(ML)),KL(()=>{J=CL(U,1,`item-toolbar ${p0()??""} item-toolbar--${rL()??""}`,"svelte-rnx3ie",J,{"item-toolbar--top":BL()==="top","item-toolbar--right":BL()==="right","item-toolbar--bottom":BL()==="bottom","item-toolbar--left":BL()==="left","item-toolbar--header-overlay-active":L(Rj)}),LL(U,"data-content-kind",L(uL)),LL(U,"data-level",L(b)),cj(U,`--pie-toolbar-zoom-comp: ${L(Lj)};`)}),z(j,U)};XL(PJ,(j)=>{if(p)j(kJ)})}return z(H,Fj),$j(FJ)}uj(["click"]);IJ("pie-item-toolbar",ij(nj,{level:{attribute:"level",type:"String"},scopeId:{attribute:"scope-id",type:"String"},itemId:{attribute:"item-id",type:"String"},sectionId:{attribute:"section-id",type:"String"},catalogId:{attribute:"catalog-id",type:"String"},tools:{attribute:"tools",type:"String"},contentKind:{attribute:"content-kind",type:"String"},position:{attribute:"position",type:"String"},size:{attribute:"size",type:"String"},language:{attribute:"language",type:"String"},scopeElement:{type:"Object"},toolRegistry:{type:"Object"},item:{type:"Object"},hostButtons:{type:"Object"},class:{}},[],[],{mode:"open"}));
|
|
46
|
+
export{nj as a};
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
var d1=((J)=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(J,{get:(Q,W)=>(typeof require<"u"?require:Q)[W]}):J)(function(J){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+J+'" is not supported')});var $4="5";if(typeof window<"u")((window.__svelte??={}).v??=new Set).add($4);var b=2,l0=4,PJ=8,NJ=16777216,W0=16,c=32,B0=64,fJ=128,X0=512,x=1024,I=2048,m=4096,_=8192,g=16384,H0=32768,pJ=33554432,O0=65536,UJ=131072,W7=262144,c0=524288,q4=1048576,h0=33554432,A0=65536,AJ=2097152,D0=4194304,k0=8388608,i=Symbol("$state"),QQ=Symbol("legacy props"),P4=Symbol(""),OQ=Symbol("proxy path"),FQ=Symbol("attributes"),WQ=Symbol("class"),XQ=Symbol("style"),zQ=Symbol("text"),X7=Symbol("form reset"),z7=Symbol("hmr anchor"),zJ=new class extends Error{name="StaleReactionError";message="The reaction that called `getAbortSignal()` was re-run or destroyed"},Z7=!!globalThis.document?.contentType&&globalThis.document.contentType.includes("xml");var dJ=3,I0=8;var U4=1,B4=2,K7=4,H4=8,Y4=16,M4=1,V4=2,L4=4,O4=8,F4=16;var w4=1,S4=2;var _J="[",BJ="[!",G7="[?",DJ="]",i0={};var y=Symbol("uninitialized"),F0=Symbol("filename"),C4=Symbol("hmr"),wQ="http://www.w3.org/1999/xhtml",ZQ="http://www.w3.org/2000/svg",$7="http://www.w3.org/1998/Math/MathML";var P=!0;var o0="font-weight: bold",s0="font-weight: normal";function N4(J){if(P)console.warn(`%c[svelte] await_reactivity_loss
|
|
2
|
+
%cDetected reactivity loss when reading \`${J}\`. This happens when state is read in an async function after an earlier \`await\`
|
|
3
|
+
https://svelte.dev/e/await_reactivity_loss`,o0,s0);else console.warn("https://svelte.dev/e/await_reactivity_loss")}function A4(J,Q){if(P)console.warn(`%c[svelte] await_waterfall
|
|
4
|
+
%cAn async derived, \`${J}\` (${Q}) was not read immediately after it resolved. This often indicates an unnecessary waterfall, which can slow down your app
|
|
5
|
+
https://svelte.dev/e/await_waterfall`,o0,s0);else console.warn("https://svelte.dev/e/await_waterfall")}function D4(){if(P)console.warn(`%c[svelte] derived_inert
|
|
6
|
+
%cReading a derived belonging to a now-destroyed effect may result in stale values
|
|
7
|
+
https://svelte.dev/e/derived_inert`,o0,s0);else console.warn("https://svelte.dev/e/derived_inert")}function I4(J,Q,W){if(P)console.warn(`%c[svelte] hydration_attribute_changed
|
|
8
|
+
%cThe \`${J}\` attribute on \`${Q}\` changed its value between server and client renders. The client value, \`${W}\`, will be ignored in favour of the server value
|
|
9
|
+
https://svelte.dev/e/hydration_attribute_changed`,o0,s0);else console.warn("https://svelte.dev/e/hydration_attribute_changed")}function R4(J){if(P)console.warn(`%c[svelte] hydration_html_changed
|
|
10
|
+
%c${J?`The value of an \`{@html ...}\` block ${J} changed between server and client renders. The client value will be ignored in favour of the server value`:"The value of an `{@html ...}` block changed between server and client renders. The client value will be ignored in favour of the server value"}
|
|
11
|
+
https://svelte.dev/e/hydration_html_changed`,o0,s0);else console.warn("https://svelte.dev/e/hydration_html_changed")}function HJ(J){if(P)console.warn(`%c[svelte] hydration_mismatch
|
|
12
|
+
%c${J?`Hydration failed because the initial UI does not match what was rendered on the server. The error occurred near ${J}`:"Hydration failed because the initial UI does not match what was rendered on the server"}
|
|
13
|
+
https://svelte.dev/e/hydration_mismatch`,o0,s0);else console.warn("https://svelte.dev/e/hydration_mismatch")}function j4(){if(P)console.warn(`%c[svelte] lifecycle_double_unmount
|
|
14
|
+
%cTried to unmount a component that was not mounted
|
|
15
|
+
https://svelte.dev/e/lifecycle_double_unmount`,o0,s0);else console.warn("https://svelte.dev/e/lifecycle_double_unmount")}function SQ(J){if(P)console.warn(`%c[svelte] state_proxy_equality_mismatch
|
|
16
|
+
%cReactive \`$state(...)\` proxies and the values they proxy have different identities. Because of this, comparisons with \`${J}\` will produce unexpected results
|
|
17
|
+
https://svelte.dev/e/state_proxy_equality_mismatch`,o0,s0);else console.warn("https://svelte.dev/e/state_proxy_equality_mismatch")}function T4(){if(P)console.warn(`%c[svelte] state_proxy_unmount
|
|
18
|
+
%cTried to unmount a state proxy, rather than a component
|
|
19
|
+
https://svelte.dev/e/state_proxy_unmount`,o0,s0);else console.warn("https://svelte.dev/e/state_proxy_unmount")}function x4(){if(P)console.warn("%c[svelte] svelte_boundary_reset_noop\n%cA `<svelte:boundary>` `reset` function only resets the boundary the first time it is called\nhttps://svelte.dev/e/svelte_boundary_reset_noop",o0,s0);else console.warn("https://svelte.dev/e/svelte_boundary_reset_noop")}var ZJ=Array.isArray,k4=Array.prototype.indexOf,YJ=Array.prototype.includes,lJ=Array.from,KQ=Object.keys,n=Object.defineProperty,Y0=Object.getOwnPropertyDescriptor,CQ=Object.getOwnPropertyDescriptors,q7=Object.prototype,E4=Array.prototype,IJ=Object.getPrototypeOf,P7=Object.isExtensible;var a0=()=>{};function NQ(J){for(var Q=0;Q<J.length;Q++)J[Q]()}function AQ(){var J,Q,W=new Promise((X,z)=>{J=X,Q=z});return{promise:W,resolve:J,reject:Q}}function b4(J){if(P){let Q=Error(`invariant_violation
|
|
20
|
+
An invariant violation occurred, meaning Svelte's internal assumptions were flawed. This is a bug in Svelte, not your app — please open an issue at https://github.com/sveltejs/svelte, citing the following message: "${J}"
|
|
21
|
+
https://svelte.dev/e/invariant_violation`);throw Q.name="Svelte error",Q}else throw Error("https://svelte.dev/e/invariant_violation")}function h4(){if(P){let J=Error("async_derived_orphan\nCannot create a `$derived(...)` with an `await` expression outside of an effect tree\nhttps://svelte.dev/e/async_derived_orphan");throw J.name="Svelte error",J}else throw Error("https://svelte.dev/e/async_derived_orphan")}function g4(){if(P){let J=Error(`derived_references_self
|
|
22
|
+
A derived value cannot reference itself recursively
|
|
23
|
+
https://svelte.dev/e/derived_references_self`);throw J.name="Svelte error",J}else throw Error("https://svelte.dev/e/derived_references_self")}function U7(J,Q,W){if(P){let X=Error(`each_key_duplicate
|
|
24
|
+
${W?`Keyed each block has duplicate key \`${W}\` at indexes ${J} and ${Q}`:`Keyed each block has duplicate key at indexes ${J} and ${Q}`}
|
|
25
|
+
https://svelte.dev/e/each_key_duplicate`);throw X.name="Svelte error",X}else throw Error("https://svelte.dev/e/each_key_duplicate")}function v4(J,Q,W){if(P){let X=Error(`each_key_volatile
|
|
26
|
+
Keyed each block has key that is not idempotent — the key for item at index ${J} was \`${Q}\` but is now \`${W}\`. Keys must be the same each time for a given item
|
|
27
|
+
https://svelte.dev/e/each_key_volatile`);throw X.name="Svelte error",X}else throw Error("https://svelte.dev/e/each_key_volatile")}function m4(J){if(P){let Q=Error(`effect_in_teardown
|
|
28
|
+
\`${J}\` cannot be used inside an effect cleanup function
|
|
29
|
+
https://svelte.dev/e/effect_in_teardown`);throw Q.name="Svelte error",Q}else throw Error("https://svelte.dev/e/effect_in_teardown")}function u4(){if(P){let J=Error("effect_in_unowned_derived\nEffect cannot be created inside a `$derived` value that was not itself created inside an effect\nhttps://svelte.dev/e/effect_in_unowned_derived");throw J.name="Svelte error",J}else throw Error("https://svelte.dev/e/effect_in_unowned_derived")}function f4(J){if(P){let Q=Error(`effect_orphan
|
|
30
|
+
\`${J}\` can only be used inside an effect (e.g. during component initialisation)
|
|
31
|
+
https://svelte.dev/e/effect_orphan`);throw Q.name="Svelte error",Q}else throw Error("https://svelte.dev/e/effect_orphan")}function p4(){if(P){let J=Error(`effect_update_depth_exceeded
|
|
32
|
+
Maximum update depth exceeded. This typically indicates that an effect reads and writes the same piece of state
|
|
33
|
+
https://svelte.dev/e/effect_update_depth_exceeded`);throw J.name="Svelte error",J}else throw Error("https://svelte.dev/e/effect_update_depth_exceeded")}function d4(){if(P){let J=Error(`hydration_failed
|
|
34
|
+
Failed to hydrate the application
|
|
35
|
+
https://svelte.dev/e/hydration_failed`);throw J.name="Svelte error",J}else throw Error("https://svelte.dev/e/hydration_failed")}function _4(J){if(P){let Q=Error(`props_invalid_value
|
|
36
|
+
Cannot do \`bind:${J}={undefined}\` when \`${J}\` has a fallback value
|
|
37
|
+
https://svelte.dev/e/props_invalid_value`);throw Q.name="Svelte error",Q}else throw Error("https://svelte.dev/e/props_invalid_value")}function l4(J){if(P){let Q=Error(`rune_outside_svelte
|
|
38
|
+
The \`${J}\` rune is only available inside \`.svelte\` and \`.svelte.js/ts\` files
|
|
39
|
+
https://svelte.dev/e/rune_outside_svelte`);throw Q.name="Svelte error",Q}else throw Error("https://svelte.dev/e/rune_outside_svelte")}function c4(){if(P){let J=Error("state_descriptors_fixed\nProperty descriptors defined on `$state` objects must contain `value` and always be `enumerable`, `configurable` and `writable`.\nhttps://svelte.dev/e/state_descriptors_fixed");throw J.name="Svelte error",J}else throw Error("https://svelte.dev/e/state_descriptors_fixed")}function i4(){if(P){let J=Error("state_prototype_fixed\nCannot set prototype of `$state` object\nhttps://svelte.dev/e/state_prototype_fixed");throw J.name="Svelte error",J}else throw Error("https://svelte.dev/e/state_prototype_fixed")}function o4(){if(P){let J=Error("state_unsafe_mutation\nUpdating state inside `$derived(...)`, `$inspect(...)` or a template expression is forbidden. If the value should not be reactive, declare it without `$state`\nhttps://svelte.dev/e/state_unsafe_mutation");throw J.name="Svelte error",J}else throw Error("https://svelte.dev/e/state_unsafe_mutation")}function s4(){if(P){let J=Error("svelte_boundary_reset_onerror\nA `<svelte:boundary>` `reset` function cannot be called while an error is still being handled\nhttps://svelte.dev/e/svelte_boundary_reset_onerror");throw J.name="Svelte error",J}else throw Error("https://svelte.dev/e/svelte_boundary_reset_onerror")}var t=!1,MJ=!1,g0=!1;var A=null;function KJ(J){A=J}var r0=null;function cJ(J){r0=J}var R0=null;function DQ(J){R0=J}function B7(J,Q=!1,W){if(A={p:A,i:!1,c:null,e:null,s:J,x:null,r:O,l:MJ&&!Q?{s:null,u:null,$:[]}:null},P)A.function=W,R0=W}function H7(J){var Q=A,W=Q.e;if(W!==null){Q.e=null;for(var X of W)Y7(X)}if(J!==void 0)Q.x=J;if(Q.i=!0,A=Q.p,P)R0=A?.function??null;return J??{}}function v0(){return!MJ||A!==null&&A.l===null}var RJ=[];function r4(){var J=RJ;RJ=[],NQ(J)}function o(J){if(RJ.length===0&&!jJ){var Q=RJ;queueMicrotask(()=>{if(Q===RJ)r4()})}RJ.push(J)}function n4(){while(RJ.length>0)r4()}var M7=new WeakMap;function IQ(J){var Q=O;if(Q===null)return w.f|=k0,J;if(P&&J instanceof Error&&!M7.has(J))M7.set(J,$8(J,Q));if((Q.f&H0)===0&&(Q.f&l0)===0){if(P&&!Q.parent&&J instanceof Error)t4(J);throw J}m0(J,Q)}function m0(J,Q){if(Q!==null&&(Q.f&g)!==0)return;while(Q!==null){if((Q.f&fJ)!==0){if((Q.f&H0)===0)throw J;try{Q.b.error(J);return}catch(W){J=W}}Q=Q.parent}if(P&&J instanceof Error)t4(J);throw J}function $8(J,Q){let W=Y0(J,"message");if(W&&!W.configurable)return;var X=GQ?" ":"\t",z=`
|
|
40
|
+
${X}in ${Q.fn?.name||"<unknown>"}`,Z=Q.ctx;while(Z!==null)z+=`
|
|
41
|
+
${X}in ${Z.function?.[F0].split("/").pop()}`,Z=Z.p;return{message:J.message+`
|
|
42
|
+
${z}
|
|
43
|
+
`,stack:J.stack?.split(`
|
|
44
|
+
`).filter((K)=>!K.includes("svelte/src/internal")).join(`
|
|
45
|
+
`)}}function t4(J){let Q=M7.get(J);if(Q)n(J,"message",{value:Q.message}),n(J,"stack",{value:Q.stack})}function RQ(J){return J===this.v}function jQ(J,Q){return J!=J?Q==Q:J!==Q||J!==null&&typeof J==="object"||typeof J==="function"}function TQ(J){return!jQ(J,this.v)}var $Q=null;function G0(J,Q){return J.label=Q,kQ(J.v,Q),J}function kQ(J,Q){return J?.[OQ]?.(Q),J}function u0(J){let Q=Error(),W=q8();if(W.length===0)return null;return W.unshift(`
|
|
46
|
+
`),n(Q,"stack",{value:W.join(`
|
|
47
|
+
`)}),n(Q,"name",{value:J}),Q}function q8(){let J=Error.stackTraceLimit;Error.stackTraceLimit=1/0;let Q=Error().stack;if(Error.stackTraceLimit=J,!Q)return[];let W=Q.split(`
|
|
48
|
+
`),X=[];for(let z=0;z<W.length;z++){let Z=W[z],K=Z.replaceAll("\\","/");if(Z.trim()==="Error")continue;if(Z.includes("validate_each_keys"))return[];if(K.includes("svelte/src/internal")||K.includes("node_modules/.vite"))continue;X.push(Z)}return X}function J6(J,Q){if(!P)throw Error("invariant(...) was not guarded by if (DEV)");if(!J)b4(Q)}function n0(J){var Q=w,W=O;f(null),p(null);try{return J()}finally{f(Q),p(W)}}function Q6(J){let Q=0,W=q0(0),X;if(P)G0(W,"createSubscriber version");return()=>{if(VJ())R(W),e(()=>{if(Q===0)X=h(()=>J(()=>TJ(W)));return Q+=1,()=>{o(()=>{if(Q-=1,Q===0)X?.(),X=void 0,TJ(W)})}})}}var U8=~(I|m|x);function T(J,Q){J.f=J.f&U8|Q}function iJ(J){if((J.f&X0)!==0||J.deps===null)T(J,x);else T(J,m)}function W6(J){if(J===null)return;for(let Q of J){if((Q.f&b)===0||(Q.f&A0)===0)continue;Q.f^=A0,W6(Q.deps)}}function EQ(J,Q,W){if((J.f&I)!==0)Q.add(J);else if((J.f&m)!==0)W.add(J);W6(J.deps),T(J,x)}var B8=O0|c0;function O7(J,Q,W,X){new F7(J,Q,W,X)}class F7{parent;is_pending=!1;transform_error;#J;#Q=F?C:null;#W;#G;#Z;#K=null;#X=null;#$=null;#z=null;#M=0;#P=0;#U=!1;#B=new Set;#V=new Set;#q=null;#F=Q6(()=>{if(this.#q=q0(this.#M),P)G0(this.#q,"$effect.pending()");return()=>{this.#q=null}});constructor(J,Q,W,X){if(this.#J=J,this.#W=Q,this.#G=(z)=>{var Z=O;Z.b=this,Z.f|=fJ,W(z)},this.parent=O.b,this.transform_error=X??this.parent?.transform_error??((z)=>z),this.#Z=w0(()=>{if(F){let z=this.#Q;l();let Z=z.data===BJ;if(z.data.startsWith(G7)){let G=JSON.parse(z.data.slice(G7.length));this.#w(G)}else if(Z)this.#C();else this.#L()}else this.#H()},B8),F)this.#J=C}#L(){try{this.#K=s(()=>this.#G(this.#J))}catch(J){this.error(J)}}#w(J){let Q=this.#W.failed,{reset:W,invoke_onerror:X}=this.#S(J);if(o(X),!Q)return;this.#$=s(()=>{Q(this.#J,()=>J,()=>W)})}#S(J){var Q=!1,W=!1;let X=()=>{if(Q){x4();return}if(Q=!0,W)s4();if(this.#$!==null)t0(this.#$,()=>{this.#$=null});this.#Y(()=>{this.#H()})};return{reset:X,invoke_onerror:()=>{try{W=!0,this.#W.onerror?.(J,X),W=!1}catch(Z){m0(Z,this.#Z&&this.#Z.parent)}}}}#C(){let J=this.#W.pending;if(!J)return;this.is_pending=!0,this.#X=s(()=>J(this.#J)),o(()=>{var Q=this.#z=document.createDocumentFragment(),W=a();if(Q.append(W),this.#K=this.#Y(()=>{return s(()=>this.#G(W))}),this.#P===0)this.#J.before(Q),this.#z=null,t0(this.#X,()=>{this.#X=null}),this.#O(S)})}#H(){try{if(this.is_pending=this.has_pending_snippet(),this.#P=0,this.#M=0,this.#K=s(()=>{this.#G(this.#J)}),this.#P>0){var J=this.#z=document.createDocumentFragment();oJ(this.#K,J);let Q=this.#W.pending;this.#X=s(()=>Q(this.#J))}else this.#O(S)}catch(Q){this.error(Q)}}#O(J){this.is_pending=!1,J.transfer_effects(this.#B,this.#V)}defer_effect(J){EQ(J,this.#B,this.#V)}is_rendered(){return!this.is_pending&&(!this.parent||this.parent.is_rendered())}has_pending_snippet(){return!!this.#W.pending}#Y(J){var Q=O,W=w,X=A;p(this.#Z),f(this.#Z),KJ(this.#Z.ctx);try{return K0.ensure(),J()}catch(z){return IQ(z),null}finally{p(Q),f(W),KJ(X)}}#N(J,Q){if(!this.has_pending_snippet()){if(this.parent)this.parent.#N(J,Q);return}if(this.#P+=J,this.#P===0){if(this.#O(Q),this.#X)t0(this.#X,()=>{this.#X=null});if(this.#z)this.#J.before(this.#z),this.#z=null}}update_pending_count(J,Q){if(this.#N(J,Q),this.#M+=J,!this.#q||this.#U)return;this.#U=!0,o(()=>{if(this.#U=!1,this.#q)f0(this.#q,this.#M)})}get_effect_pending(){return this.#F(),R(this.#q)}error(J){if(!this.#W.onerror&&!this.#W.failed)throw J;if(S?.is_fork){if(this.#K)S.skip_effect(this.#K);if(this.#X)S.skip_effect(this.#X);if(this.#$)S.skip_effect(this.#$);S.oncommit(()=>{this.#A(J)})}else this.#A(J)}#A(J){if(this.#K)v(this.#K),this.#K=null;if(this.#X)v(this.#X),this.#X=null;if(this.#$)v(this.#$),this.#$=null;if(F)j(this.#Q),L7(),j(e0());let Q=this.#W.failed,W=(X)=>{let{reset:z,invoke_onerror:Z}=this.#S(X);if(Z(),Q)this.#$=this.#Y(()=>{try{return s(()=>{var K=O;K.b=this,K.f|=fJ,Q(this.#J,()=>X,()=>z)})}catch(K){return m0(K,this.#Z.parent),null}})};o(()=>{var X;try{X=this.transform_error(J)}catch(z){m0(z,this.#Z&&this.#Z.parent);return}if(X!==null&&typeof X==="object"&&typeof X.then==="function")X.then(W,(z)=>m0(z,this.#Z&&this.#Z.parent));else W(X)})}}function bQ(J,Q,W,X){let z=v0()?LJ:xJ;var Z=J.filter((U)=>!U.settled),K=Q.map(z);if(P)K.forEach((U,M)=>{U.label=Q[M].toString().replace("() => ","").replaceAll("$.eager(() => ","$state.eager(").replace(/\$\.get\((.+?)\)/g,(L,V)=>V)});if(W.length===0&&Z.length===0){X(K);return}var G=O,$=X6(),Y=Z.length===1?Z[0].promise:Z.length>1?Promise.all(Z.map((U)=>U.promise)):null;function H(U){if((G.f&g)!==0)return;$();try{X([...K,...U])}catch(M){m0(M,G)}sJ()}var B=w7();if(W.length===0){Y.then(()=>H([])).finally(B);return}function q(){Promise.all(W.map((U)=>C7(U))).then(H).catch((U)=>m0(U,G)).finally(B)}if(Y)Y.then(()=>{$(),q(),sJ()});else q()}function X6(){var J=O,Q=w,W=A,X=S;if(P)var z=r0;return function(K=!0){if(p(J),f(Q),KJ(W),K&&(J.f&g)===0)X?.activate(),X?.apply();if(P)S7(null),cJ(z)}}function sJ(J=!0){if(p(null),f(null),KJ(null),J)S?.deactivate();if(P)S7(null),cJ(null)}function w7(){var J=O,Q=J.b,W=S,X=!!Q?.is_rendered();return Q?.update_pending_count(1,W),W.increment(X,J),()=>{Q?.update_pending_count(-1,W),W.decrement(X,J)}}var S0=null;function S7(J){S0=J}var PQ=new Set;function LJ(J){var Q=b|I;if(O!==null)O.f|=c0;let W={ctx:A,deps:null,effects:null,equals:RQ,f:Q,fn:J,reactions:null,rv:0,v:y,wv:0,parent:O,ac:null};if(P&&g0)W.created=u0("created at");return W}var aJ=Symbol("obsolete");function C7(J,Q,W){let X=O;if(X===null)h4();var z=void 0,Z=q0(y);if(P)Z.label=Q??J.toString();var K=!w,G=new Set;if(K6(()=>{var $=O;if(P)S0={effect:$,effect_deps:new Set,warned:!1};var Y=AQ();z=Y.promise;try{Promise.resolve(J()).then(Y.resolve,(U)=>{if(U!==zJ)Y.reject(U)}).finally(sJ)}catch(U){Y.reject(U),sJ()}if(P){if(S0){if($.deps!==null)for(let U=0;U<M0;U+=1)S0.effect_deps.add($.deps[U]);if(J0!==null)for(let U=0;U<J0.length;U+=1)S0.effect_deps.add(J0[U])}S0=null}var H=S;if(K){if(($.f&H0)!==0)var B=w7();if(X.b?.is_rendered())H.async_deriveds.get($)?.reject(aJ);else for(let U of G.values())U.reject(aJ);G.add(Y),H.async_deriveds.set($,Y)}let q=(U,M=void 0)=>{if(P)S0=null;if(B?.(),G.delete(Y),M===aJ)return;if(H.activate(),M)Z.f|=k0,f0(Z,M);else{if((Z.f&k0)!==0)Z.f^=k0;if(P&&W!==void 0&&!Z.equals(U))PQ.add(Z),setTimeout(()=>{if(PQ.has(Z)&&($.f&g)===0)A4(Z.label,W),PQ.delete(Z)});f0(Z,U)}H.deactivate()};Y.promise.then(q,(U)=>q(null,U||"unknown"))}),$0(()=>{for(let $ of G)$.reject(aJ)}),P)Z.f|=D0;return new Promise(($)=>{function Y(H){function B(){if(H===z)$(Z);else Y(z)}H.then(B,B)}Y(z)})}function Y8(J){let Q=LJ(J);if(!t)gQ(Q);return Q}function xJ(J){let Q=LJ(J);return Q.equals=TQ,Q}function z6(J){var Q=J.effects;if(Q!==null){J.effects=null;for(var W=0;W<Q.length;W+=1)v(Q[W])}}var N7=[];function UQ(J){var Q,W=O,X=J.parent;if(!j0&&X!==null&&J.v!==y&&(X.f&(g|_))!==0)return D4(),J.v;if(p(X),P){let z=kJ;yQ(new Set);try{if(YJ.call(N7,J))g4();N7.push(J),J.f&=~A0,z6(J),Q=hQ(J)}finally{p(W),yQ(z),N7.pop()}}else try{J.f&=~A0,z6(J),Q=hQ(J)}finally{p(W)}return Q}function A7(J){var Q=UQ(J);if(!J.equals(Q)){if(J.wv=rJ(),!S?.is_fork||J.deps===null){if(S!==null)S.capture(J,Q,!0),OJ?.capture(J,Q,!0);else J.v=Q;if(J.deps===null){T(J,x);return}}}if(j0)return;if(Q0!==null){if(VJ()||S?.is_fork)Q0.set(J,Q)}else iJ(J)}function Z6(J){if(J.effects===null)return;for(let Q of J.effects)if(Q.teardown||Q.ac){if(Q.teardown?.(),Q.ac!==null)n0(()=>{Q.ac.abort(zJ),Q.ac=null});if(Q.fn!==null)Q.teardown=a0;EJ(Q,0),BQ(Q)}}function D7(J){if(J.effects===null)return;for(let Q of J.effects)if(Q.teardown&&Q.fn!==null)JJ(Q)}var kJ=new Set,E0=new Map;function yQ(J){kJ=J}var I7=!1;function G6(){I7=!0}function q0(J,Q){var W={f:0,v:J,reactions:null,equals:RQ,rv:0,wv:0};if(P&&g0)W.created=Q??u0("created at"),W.updated=null,W.set_during_effect=!1,W.trace=null;return W}function QJ(J,Q){let W=q0(J,Q);return gQ(W),W}function bJ(J,Q=!1,W=!0){let X=q0(J);if(!Q)X.equals=TQ;if(MJ&&W&&A!==null&&A.l!==null)(A.l.s??=[]).push(X);return X}function P0(J,Q,W=!1){if(w!==null&&(!V0||(w.f&UJ)!==0)&&v0()&&(w.f&(b|W0|D0|UJ))!==0&&(p0===null||!p0.has(J)))o4();let X=W?GJ(Q):Q;if(P)kQ(X,J.label);return f0(J,X,HQ)}function f0(J,Q,W=null){if(!J.equals(Q)){if(j0)E0.set(J,Q);else if(!E0.has(J))E0.set(J,J.v);var X=K0.ensure();if(X.capture(J,Q),P){if(g0||O!==null){J.updated??=new Map;let z=(J.updated.get("")?.count??0)+1;if(J.updated.set("",{error:null,count:z}),g0||z>5){let Z=u0("updated at");if(Z!==null){let K=J.updated.get(Z.stack);if(!K)K={error:Z,count:0},J.updated.set(Z.stack,K);K.count++}}}if(O!==null)J.set_during_effect=!0}if((J.f&b)!==0){let z=J;if((J.f&I)!==0)UQ(z);if(Q0===null)iJ(z)}if(J.wv=rJ(),$6(J,I,W),v0()&&O!==null&&(O.f&x)!==0&&(O.f&(c|B0))===0)if(T0===null)q6([J]);else T0.push(J);if(!X.is_fork&&kJ.size>0&&!I7)vQ()}return Q}function vQ(){I7=!1;for(let J of kJ){if((J.f&x)!==0)T(J,m);let Q;try{Q=FJ(J)}catch{Q=!0}if(Q)JJ(J)}kJ.clear()}function TJ(J){P0(J,J.v+1)}function $6(J,Q,W){var X=J.reactions;if(X===null)return;var z=v0(),Z=X.length;for(var K=0;K<Z;K++){var G=X[K],$=G.f;if(!z&&G===O)continue;var Y=($&I)===0;if(Y)T(G,Q);if(($&UJ)!==0)kJ.add(G);else if(($&b)!==0){var H=G;if(Q0?.delete(H),($&A0)===0){if($&X0&&(O===null||(O.f&AJ)===0))G.f|=A0;$6(H,m,W)}}else if(Y){var B=G;if(($&W0)!==0&&b0!==null)b0.add(B);if(W!==null)W.push(B);else YQ(B)}}}var P6=!1,mQ=!1,EW=Symbol("unmounted");function R7(J){var Q=mQ;try{return mQ=!1,[J(),mQ]}finally{mQ=Q}}var uQ=null,nJ=null,S=null,OJ=null,Q0=null,x7=null,jJ=!1,j7=!1,yJ=null,HQ=null,U6=0,T7=new Set,L8=1;class K0{id=L8++;#J=!1;linked=!0;#Q=null;#W=null;async_deriveds=new Map;current=new Map;previous=new Map;#G=new Set;#Z=new Set;#K=0;#X=new Map;#$=null;#z=[];#M=[];#P=new Set;#U=new Set;#B=new Map;#V=new Set;is_fork=!1;#q=!1;constructor(){if(nJ===null)uQ=nJ=this;else nJ.#W=this,this.#Q=nJ;nJ=this}#F(){if(this.is_fork)return!0;for(let W of this.#X.keys()){var J=W,Q=!1;while(J.parent!==null){if(this.#B.has(J)){Q=!0;break}J=J.parent}if(!Q)return!0}return!1}skip_effect(J){if(!this.#B.has(J))this.#B.set(J,{d:[],m:[]});this.#V.delete(J)}unskip_effect(J,Q=(W)=>this.schedule(W)){var W=this.#B.get(J);if(W){this.#B.delete(J);for(var X of W.d)T(X,I),Q(X);for(X of W.m)T(X,m),Q(X)}this.#V.add(J)}#L(){if(this.#J=!0,U6++>1000)this.#Y(),O8();if(P)for(let G of this.current.keys())T7.add(G);for(let G of this.#P)this.#U.delete(G),T(G,I),this.schedule(G);for(let G of this.#U)T(G,m),this.schedule(G);let J=this.#z;this.#z=[],this.apply();var Q=yJ=[],W=[],X=HQ=[];for(let G of J)try{this.#w(G,Q,W)}catch($){if(M6(G),!this.#F())this.discard();throw $}if(S=null,X.length>0){var z=K0.ensure();for(let G of X)z.schedule(G)}if(yJ=null,HQ=null,this.#F()){this.#H(W),this.#H(Q);for(let[G,$]of this.#B)Y6(G,$);if(X.length>0)S.#L();return}let Z=this.#S();if(Z){this.#H(W),this.#H(Q),Z.#C(this);return}this.#P.clear(),this.#U.clear();for(let G of this.#G)G(this);this.#G.clear(),OJ=this,B6(W),B6(Q),OJ=null,this.#$?.resolve();var K=S;if(this.#K===0&&(this.#z.length===0||K!==null)){if(this.#Y(),t)this.#O(),S=K}if(this.#z.length>0)if(K!==null){let G=K;G.#z.push(...this.#z.filter(($)=>!G.#z.includes($)))}else K=this;if(K!==null)E0.clear(),K.#L()}#w(J,Q,W){J.f^=x;var X=J.first;while(X!==null){var z=X.f,Z=(z&(c|B0))!==0,K=Z&&(z&x)!==0,G=K||(z&_)!==0||this.#B.has(X);if(!G&&X.fn!==null){if(Z)X.f^=x;else if((z&l0)!==0)Q.push(X);else if(t&&(z&(PJ|NJ))!==0)W.push(X);else if(FJ(X)){if((z&W0)!==0)this.#U.add(X);JJ(X)}var $=X.first;if($!==null){X=$;continue}}while(X!==null){var Y=X.next;if(Y!==null){X=Y;break}X=X.parent}}}#S(){var J=this.#Q;while(J!==null){if(!J.is_fork){for(let[Q,[,W]]of this.current)if(J.current.has(Q)&&!W)return J}J=J.#Q}return null}#C(J){for(let[W,X]of J.current){if(!this.previous.has(W)&&J.previous.has(W))this.previous.set(W,J.previous.get(W));this.current.set(W,X)}for(let[W,X]of J.async_deriveds){let z=this.async_deriveds.get(W);if(z)X.promise.then(z.resolve).catch(z.reject)}J.async_deriveds.clear(),this.transfer_effects(J.#P,J.#U);let Q=(W)=>{var X=W.reactions;if(X===null)return;if((W.f&b)!==0&&(W.f&(I|m))===0)return;for(let K of X){var z=K.f;if((z&b)!==0)Q(K);else{var Z=K;if(z&(D0|W0)&&!this.async_deriveds.has(Z))this.#U.delete(Z),T(Z,I),this.schedule(Z)}}};for(let W of this.current.keys())Q(W);this.oncommit(()=>J.discard()),J.#Y(),S=this,this.#L()}#H(J){for(var Q=0;Q<J.length;Q+=1)EQ(J[Q],this.#P,this.#U)}capture(J,Q,W=!1){if(J.v!==y&&!this.previous.has(J))this.previous.set(J,J.v);if((J.f&k0)===0)this.current.set(J,[Q,W]),Q0?.set(J,Q);if(!this.is_fork)J.v=Q}activate(){S=this}deactivate(){S=null,Q0=null}flush(){try{if(P)T7.clear();j7=!0,S=this,this.#L()}finally{if(U6=0,x7=null,yJ=null,HQ=null,j7=!1,S=null,Q0=null,E0.clear(),P)for(let J of T7)J.updated=null}}discard(){for(let J of this.#Z)J(this);this.#Z.clear();for(let J of this.async_deriveds.values())J.reject(aJ);this.#Y(),this.#$?.resolve()}register_created_effect(J){this.#M.push(J)}#O(){for(let H=uQ;H!==null;H=H.#W){var J=H.id<this.id,Q=[];for(let[B,[q,U]]of this.current){if(H.current.has(B)){var W=H.current.get(B)[0];if(J&&q!==W)H.current.set(B,[q,U]);else continue}Q.push(B)}if(J)for(let[B,q]of this.async_deriveds){let U=H.async_deriveds.get(B);if(U)q.promise.then(U.resolve).catch(U.reject)}var X=[...H.current.keys()].filter((B)=>!H.current.get(B)[1]);if(!H.#J||X.length===0)continue;var z=X.filter((B)=>!this.current.has(B));if(z.length===0){if(J)H.discard()}else if(Q.length>0){if(P&&!H.#q)J6(H.#z.length===0,"Batch has scheduled roots");if(J)for(let B of this.#V)H.unskip_effect(B,(q)=>{if((q.f&(W0|D0))!==0)H.schedule(q);else H.#H([q])});H.activate();var Z=new Set,K=new Map;for(var G of Q)H6(G,z,Z,K);K=new Map;var $=[...H.current].filter(([B,q])=>{let U=this.current.get(B);if(!U)return!0;return U[0]!==q[0]||U[1]!==q[1]}).map(([B])=>B);if($.length>0){for(let B of this.#M)if((B.f&(g|_|UJ))===0&&k7(B,$,K))if((B.f&(D0|W0))!==0)T(B,I),H.schedule(B);else H.#P.add(B)}if(H.#z.length>0&&!H.#q){H.apply();for(var Y of H.#z)H.#w(Y,[],[]);H.#z=[]}H.deactivate()}}}increment(J,Q){if(this.#K+=1,J){let W=this.#X.get(Q)??0;this.#X.set(Q,W+1)}}decrement(J,Q){if(this.#K-=1,J){let W=this.#X.get(Q)??0;if(W===1)this.#X.delete(Q);else this.#X.set(Q,W-1)}if(this.#q)return;this.#q=!0,o(()=>{if(this.#q=!1,this.linked)this.flush()})}transfer_effects(J,Q){for(let W of J)this.#P.add(W);for(let W of Q)this.#U.add(W);J.clear(),Q.clear()}oncommit(J){this.#G.add(J)}ondiscard(J){this.#Z.add(J)}settled(){return(this.#$??=AQ()).promise}static ensure(){if(S===null){let J=S=new K0;if(!j7&&!jJ)o(()=>{if(!J.#J)J.flush()})}return S}apply(){if(!t||!this.is_fork&&this.#Q===null&&this.#W===null){Q0=null;return}Q0=new Map;for(let[Q,[W]]of this.current)Q0.set(Q,W);for(let Q=uQ;Q!==null;Q=Q.#W){if(Q===this||Q.is_fork)continue;var J=!1;if(Q.id<this.id)for(let[W,[,X]]of Q.current){if(X)continue;if(this.current.has(W)){J=!0;break}}if(!J){for(let[W,X]of Q.previous)if(!Q0.has(W))Q0.set(W,X)}}}schedule(J){if(x7=J,J.b?.is_pending&&(J.f&(l0|PJ|NJ))!==0&&(J.f&H0)===0){J.b.defer_effect(J);return}var Q=J;while(Q.parent!==null){Q=Q.parent;var W=Q.f;if(yJ!==null&&Q===O){if(t)return;if((w===null||(w.f&b)===0)&&!P6)return}if((W&(B0|c))!==0){if((W&x)===0)return;Q.f^=x}}this.#z.push(Q)}#Y(){if(!this.linked)return;var J=this.#Q,Q=this.#W;if(J===null)uQ=Q;else J.#W=Q;if(Q===null)nJ=J;else Q.#Q=J;this.linked=!1}}function tJ(J){var Q=jJ;jJ=!0;try{var W;if(J){if(S!==null&&!S.is_fork)S.flush();W=J()}while(!0){if(n4(),S===null)return W;S.flush()}}finally{jJ=Q}}function O8(){if(P){var J=new Map;for(let W of S.current.keys())for(let[X,z]of W.updated??[]){var Q=J.get(X);if(!Q)Q={error:z.error,count:0},J.set(X,Q);Q.count+=z.count}for(let W of J.values())if(W.error)console.error(W.error)}try{p4()}catch(W){if(P)n(W,"stack",{value:""});m0(W,x7)}}var b0=null;function B6(J){var Q=J.length;if(Q===0)return;var W=0;while(W<Q){var X=J[W++];if((X.f&(g|_))===0&&FJ(X)){if(b0=new Set,JJ(X),X.deps===null&&X.first===null&&X.nodes===null&&X.teardown===null&&X.ac===null)E7(X);if(b0?.size>0){E0.clear();for(let z of b0){if((z.f&(g|_))!==0)continue;let Z=[z],K=z.parent;while(K!==null){if(b0.has(K))b0.delete(K),Z.push(K);K=K.parent}for(let G=Z.length-1;G>=0;G--){let $=Z[G];if(($.f&(g|_))!==0)continue;JJ($)}}b0.clear()}}}b0=null}function H6(J,Q,W,X){if(W.has(J))return;if(W.add(J),J.reactions!==null)for(let z of J.reactions){let Z=z.f;if((Z&b)!==0)H6(z,Q,W,X);else if((Z&(D0|W0))!==0&&(Z&I)===0&&k7(z,Q,X))T(z,I),YQ(z)}}function k7(J,Q,W){let X=W.get(J);if(X!==void 0)return X;if(J.deps!==null)for(let z of J.deps){if(YJ.call(Q,z))return!0;if((z.f&b)!==0&&k7(z,Q,W))return W.set(z,!0),!0}return W.set(J,!1),!1}function YQ(J){S.schedule(J)}function Y6(J,Q){if((J.f&c)!==0&&(J.f&x)!==0)return;if((J.f&I)!==0)Q.d.push(J);else if((J.f&m)!==0)Q.m.push(J);T(J,x);var W=J.first;while(W!==null)Y6(W,Q),W=W.next}function M6(J){T(J,x);var Q=J.first;while(Q!==null)M6(Q),Q=Q.next}function L6(J){if(O===null){if(w===null)f4(J);u4()}if(j0)m4(J)}function w8(J,Q){var W=Q.last;if(W===null)Q.last=Q.first=J;else W.next=J,J.prev=W,Q.last=J}function WJ(J,Q){var W=O;if(P)while(W!==null&&(W.f&UJ)!==0)W=W.parent;if(W!==null&&(W.f&_)!==0)J|=_;var X={ctx:A,deps:null,nodes:null,f:J|I|X0,first:null,fn:Q,last:null,next:null,parent:W,b:W&&W.b,prev:null,teardown:null,wv:0,ac:null};if(P)X.component_function=R0;S?.register_created_effect(X);var z=X;if((J&l0)!==0)if(yJ!==null)yJ.push(X);else K0.ensure().schedule(X);else if(Q!==null){try{JJ(X)}catch(K){throw v(X),K}if(z.deps===null&&z.teardown===null&&z.nodes===null&&z.first===z.last&&(z.f&c0)===0){if(z=z.first,(J&W0)!==0&&(J&O0)!==0&&z!==null)z.f|=O0}}if(z!==null){if(z.parent=W,W!==null)w8(z,W);if(w!==null&&(w.f&b)!==0&&(J&B0)===0){var Z=w;(Z.effects??=[]).push(z)}}return X}function VJ(){return w!==null&&!V0}function $0(J){let Q=WJ(PJ,null);return T(Q,x),Q.teardown=J,Q}function y7(J){if(L6("$effect"),P)n(J,"name",{value:"$effect"});var Q=O.f,W=!w&&(Q&c)!==0&&A!==null&&!A.i;if(W){var X=A;(X.e??=[]).push(J)}else return Y7(J)}function Y7(J){return WJ(l0|q4,J)}function h7(J){K0.ensure();let Q=WJ(B0|c0,J);return()=>{v(Q)}}function O6(J){K0.ensure();let Q=WJ(B0|c0,J);return(W={})=>{return new Promise((X)=>{if(W.outro)t0(Q,()=>{v(Q),X(void 0)});else v(Q),X(void 0)})}}function L0(J){return WJ(l0,J)}function K6(J){return WJ(D0|c0,J)}function e(J,Q=0){return WJ(PJ|Q,J)}function g7(J,Q=[],W=[],X=[]){bQ(X,Q,W,(z)=>{WJ(PJ,()=>{J(...z.map(R))})})}function w0(J,Q=0){var W=WJ(W0|Q,J);if(P)W.dev_stack=r0;return W}function s(J){return WJ(c|c0,J)}function v7(J){var Q=J.teardown;if(Q!==null){let W=j0,X=w;b7(!0),f(null);try{Q.call(null)}finally{b7(W),f(X)}}}function BQ(J,Q=!1){var W=J.first;J.first=J.last=null;while(W!==null){let z=W.ac;if(z!==null)n0(()=>{z.abort(zJ)});var X=W.next;if((W.f&B0)!==0)W.parent=null;else v(W,Q);W=X}}function F6(J){var Q=J.first;while(Q!==null){var W=Q.next;if((Q.f&c)===0)v(Q);Q=W}}function v(J,Q=!0){var W=!1;if((Q||(J.f&W7)!==0)&&J.nodes!==null&&J.nodes.end!==null)m7(J.nodes.start,J.nodes.end),W=!0;J.f|=pJ,BQ(J,Q&&!W),EJ(J,0);var X=J.nodes&&J.nodes.t;if(X!==null)for(let Z of X)Z.stop();v7(J),J.f^=pJ,J.f|=g;var z=J.parent;if(z!==null&&z.first!==null)E7(J);if(P)J.component_function=null;J.next=J.prev=J.teardown=J.ctx=J.deps=J.fn=J.nodes=J.ac=J.b=null}function m7(J,Q){while(J!==null){var W=J===Q?null:r(J);J.remove(),J=W}}function E7(J){var{parent:Q,prev:W,next:X}=J;if(W!==null)W.next=X;if(X!==null)X.prev=W;if(Q!==null){if(Q.first===J)Q.first=X;if(Q.last===J)Q.last=W}}function t0(J,Q,W=!0){var X=[];w6(J,X,!0);var z=()=>{if(W)v(J);if(Q)Q()},Z=X.length;if(Z>0){var K=()=>--Z||z();for(var G of X)G.out(K)}else z()}function w6(J,Q,W){if((J.f&_)!==0)return;J.f^=_;var X=J.nodes&&J.nodes.t;if(X!==null){for(let G of X)if(G.is_global||W)Q.push(G)}var z=J.first;while(z!==null){var Z=z.next;if((z.f&B0)===0){var K=(z.f&O0)!==0||(z.f&c)!==0&&(J.f&W0)!==0;w6(z,Q,K?W:!1)}z=Z}}function eJ(J){S6(J,!0)}function S6(J,Q){if((J.f&_)===0)return;if(J.f^=_,(J.f&x)===0)T(J,I),K0.ensure().schedule(J);var W=J.first;while(W!==null){var X=W.next,z=(W.f&O0)!==0||(W.f&c)!==0;S6(W,z?Q:!1),W=X}var Z=J.nodes&&J.nodes.t;if(Z!==null){for(let K of Z)if(K.is_global||Q)K.in()}}function oJ(J,Q){if(!J.nodes)return;var W=J.nodes.start,X=J.nodes.end;while(W!==null){var z=W===X?null:r(W);Q.append(W),W=z}}var C6=null;var fQ=!1,j0=!1;function b7(J){j0=J}var w=null,V0=!1;function f(J){w=J}var O=null;function p(J){O=J}var p0=null;function gQ(J){if(w!==null&&(!t||(w.f&b)!==0))(p0??=new Set).add(J)}var J0=null,M0=0,T0=null;function q6(J){T0=J}var N6=1,hJ=0,wJ=hJ;function u7(J){wJ=J}function rJ(){return++N6}function FJ(J){var Q=J.f;if((Q&I)!==0)return!0;if(Q&b)J.f&=~A0;if((Q&m)!==0){var W=J.deps,X=W.length;for(var z=0;z<X;z++){var Z=W[z];if(FJ(Z))A7(Z);if(Z.wv>J.wv)return!0}if((Q&X0)!==0&&Q0===null)T(J,x)}return!1}function A6(J,Q,W=!0){var X=J.reactions;if(X===null)return;if(!t&&p0!==null&&p0.has(J))return;for(var z=0;z<X.length;z++){var Z=X[z];if((Z.f&b)!==0)A6(Z,Q,!1);else if(Q===Z){if(W)T(Z,I);else if((Z.f&x)!==0)T(Z,m);YQ(Z)}}}function hQ(J){var Q=J0,W=M0,X=T0,z=w,Z=p0,K=A,G=V0,$=wJ,Y=J.f;if(J0=null,M0=0,T0=null,w=(Y&(c|B0))===0?J:null,p0=null,KJ(J.ctx),V0=!1,wJ=++hJ,J.ac!==null)n0(()=>{J.ac.abort(zJ)}),J.ac=null;try{J.f|=AJ;var H=J.fn,B=H();J.f|=H0;var q=J.deps,U=S?.is_fork;if(J0!==null){var M;if(!U)EJ(J,M0);if(q!==null&&M0>0){q.length=M0+J0.length;for(M=0;M<J0.length;M++)q[M0+M]=J0[M]}else J.deps=q=J0;if(VJ()&&(J.f&X0)!==0)for(M=M0;M<q.length;M++)(q[M].reactions??=[]).push(J)}else if(!U&&q!==null&&M0<q.length)EJ(J,M0),q.length=M0;if(v0()&&T0!==null&&!V0&&q!==null&&(J.f&(b|m|I))===0)for(M=0;M<T0.length;M++)A6(T0[M],J);if(z!==null&&z!==J){if(hJ++,z.deps!==null)for(let L=0;L<W;L+=1)z.deps[L].rv=hJ;if(Q!==null)for(let L of Q)L.rv=hJ;if(T0!==null)if(X===null)X=T0;else X.push(...T0)}if((J.f&k0)!==0)J.f^=k0;return B}catch(L){return IQ(L)}finally{J.f^=AJ,J0=Q,M0=W,T0=X,w=z,p0=Z,KJ(K),V0=G,wJ=$}}function S8(J,Q){let W=Q.reactions;if(W!==null){var X=k4.call(W,J);if(X!==-1){var z=W.length-1;if(z===0)W=Q.reactions=null;else W[X]=W[z],W.pop()}}if(W===null&&(Q.f&b)!==0&&(J0===null||!YJ.call(J0,Q))){var Z=Q;if((Z.f&X0)!==0)Z.f^=X0,Z.f&=~A0;if(Z.v!==y)iJ(Z);if(Z.ac!==null)n0(()=>{Z.ac.abort(zJ),Z.ac=null,T(Z,I)});Z6(Z),EJ(Z,0)}}function EJ(J,Q){var W=J.deps;if(W===null)return;for(var X=Q;X<W.length;X++)S8(J,W[X])}function JJ(J){var Q=J.f;if((Q&g)!==0)return;T(J,x);var W=O,X=fQ;if(O=J,fQ=(Q&(c|B0))===0,P){var z=R0;DQ(J.component_function);var Z=r0;cJ(J.dev_stack??r0)}try{if((Q&(W0|NJ))!==0)F6(J);else BQ(J);v7(J);var K=hQ(J);if(J.teardown=typeof K==="function"?K:null,J.wv=N6,P&&g0&&(J.f&I)!==0&&J.deps!==null){for(var G of J.deps)if(G.set_during_effect)G.wv=rJ(),G.set_during_effect=!1}}finally{if(fQ=X,O=W,P)DQ(z),cJ(Z)}}function R(J){var Q=J.f,W=(Q&b)!==0;if(C6?.add(J),w!==null&&!V0){var X=O!==null&&(O.f&g)!==0;if(!X&&(p0===null||!p0.has(J))){var z=w.deps;if((w.f&AJ)!==0){if(J.rv<hJ)if(J.rv=hJ,J0===null&&z!==null&&z[M0]===J)M0++;else if(J0===null)J0=[J];else J0.push(J)}else{if(w.deps??=[],!YJ.call(w.deps,J))w.deps.push(J);var Z=J.reactions;if(Z===null)J.reactions=[w];else if(!YJ.call(Z,w))Z.push(w)}}}if(P){if(!V0&&S0&&S===null&&OJ===null&&!S0.warned&&(S0.effect.f&AJ)===0&&!S0.effect_deps.has(J)){S0.warned=!0,N4(J.label);var K=u0("traced at");if(K)console.warn(K)}if(PQ.delete(J),g0&&!V0&&$Q!==null&&w!==null&&$Q.reaction===w){if(J.trace)J.trace();else if(K=u0("traced at"),K){var G=$Q.entries.get(J);if(G===void 0)G={traces:[]},$Q.entries.set(J,G);var $=G.traces[G.traces.length-1];if(K.stack!==$?.stack)G.traces.push(K)}}}if(j0&&E0.has(J))return E0.get(J);if(W){var Y=J;if(j0){var H=Y.v;if((Y.f&x)===0&&Y.reactions!==null||I6(Y))H=UQ(Y);return E0.set(Y,H),H}var B=(Y.f&X0)===0&&!V0&&w!==null&&(fQ||(w.f&X0)!==0),q=(Y.f&H0)===0;if(FJ(Y)){if(B)Y.f|=X0;A7(Y)}if(B&&!q)D7(Y),D6(Y)}if(Q0?.has(J))return Q0.get(J);if((J.f&k0)!==0)throw J.v;return J.v}function D6(J){if(J.f|=X0,J.deps===null)return;for(let Q of J.deps)if((Q.reactions??=[]).push(J),(Q.f&b)!==0&&(Q.f&X0)===0)D7(Q),D6(Q)}function I6(J){if(J.v===y)return!0;if(J.deps===null)return!1;for(let Q of J.deps){if(E0.has(Q))return!0;if((Q.f&b)!==0&&I6(Q))return!0}return!1}function h(J){var Q=V0;try{return V0=!0,J()}finally{V0=Q}}function dQ(J){if(typeof J!=="object"||!J||J instanceof EventTarget)return;if(i in J)pQ(J);else if(!Array.isArray(J))for(let Q in J){let W=J[Q];if(typeof W==="object"&&W&&i in W)pQ(W)}}function pQ(J,Q=new Set){if(typeof J==="object"&&J!==null&&!(J instanceof EventTarget)&&!Q.has(J)){if(Q.add(J),J instanceof Date)J.getTime();for(let X in J)try{pQ(J[X],Q)}catch(z){}let W=IJ(J);if(W!==Object.prototype&&W!==Array.prototype&&W!==Map.prototype&&W!==Set.prototype&&W!==Date.prototype){let X=CQ(W);for(let z in X){let Z=X[z].get;if(Z)try{Z.call(J)}catch(K){}}}}}var C8=/^[a-zA-Z_$][a-zA-Z_$0-9]*$/;function GJ(J){if(typeof J!=="object"||J===null||i in J)return J;let Q=IJ(J);if(Q!==q7&&Q!==E4)return J;var W=new Map,X=ZJ(J),z=QJ(0),Z=P&&g0?u0("created at"):null,K=wJ,G=(B)=>{if(wJ===K)return B();var q=w,U=wJ;f(null),u7(K);var M=B();return f(q),u7(U),M};if(X){if(W.set("length",QJ(J.length,Z)),P)J=A8(J)}var $="";let Y=!1;function H(B){if(Y)return;Y=!0,$=B,G0(z,`${$} version`);for(let[q,U]of W)G0(U,gJ($,q));Y=!1}return new Proxy(J,{defineProperty(B,q,U){if(!("value"in U)||U.configurable===!1||U.enumerable===!1||U.writable===!1)c4();var M=W.get(q);if(M===void 0)G(()=>{var L=QJ(U.value,Z);if(W.set(q,L),P&&typeof q==="string")G0(L,gJ($,q));return L});else P0(M,U.value,!0);return!0},deleteProperty(B,q){var U=W.get(q);if(U===void 0){if(q in B){let M=G(()=>QJ(y,Z));if(W.set(q,M),TJ(z),P)G0(M,gJ($,q))}}else P0(U,y),TJ(z);return!0},get(B,q,U){if(q===i)return J;if(P&&q===OQ)return H;var M=W.get(q),L=q in B;if(M===void 0&&(!L||Y0(B,q)?.writable))M=G(()=>{var N=GJ(L?B[q]:y),k=QJ(N,Z);if(P)G0(k,gJ($,q));return k}),W.set(q,M);if(M!==void 0){var V=R(M);return V===y?void 0:V}return Reflect.get(B,q,U)},getOwnPropertyDescriptor(B,q){var U=Reflect.getOwnPropertyDescriptor(B,q);if(U&&"value"in U){var M=W.get(q);if(M)U.value=R(M)}else if(U===void 0){var L=W.get(q),V=L?.v;if(L!==void 0&&V!==y)return{enumerable:!0,configurable:!0,value:V,writable:!0}}return U},has(B,q){if(q===i)return!0;var U=W.get(q),M=U!==void 0&&U.v!==y||Reflect.has(B,q);if(U!==void 0||O!==null&&(!M||Y0(B,q)?.writable)){if(U===void 0)U=G(()=>{var V=M?GJ(B[q]):y,N=QJ(V,Z);if(P)G0(N,gJ($,q));return N}),W.set(q,U);var L=R(U);if(L===y)return!1}return M},set(B,q,U,M){var L=W.get(q),V=q in B;if(X&&q==="length")for(var N=U;N<L.v;N+=1){var k=W.get(N+"");if(k!==void 0)P0(k,y);else if(N in B){if(k=G(()=>QJ(y,Z)),W.set(N+"",k),P)G0(k,gJ($,N))}}if(L===void 0){if(!V||Y0(B,q)?.writable){if(L=G(()=>QJ(void 0,Z)),P)G0(L,gJ($,q));P0(L,GJ(U)),W.set(q,L)}}else{V=L.v!==y;var E=G(()=>GJ(U));P0(L,E)}var D=Reflect.getOwnPropertyDescriptor(B,q);if(D?.set)D.set.call(M,U);if(!V){if(X&&typeof q==="string"){var x0=W.get("length"),U0=Number(q);if(Number.isInteger(U0)&&U0>=x0.v)P0(x0,U0+1)}TJ(z)}return!0},ownKeys(B){R(z);var q=Reflect.ownKeys(B).filter((L)=>{var V=W.get(L);return V===void 0||V.v!==y});for(var[U,M]of W)if(M.v!==y&&!(U in B))q.push(U);return q},setPrototypeOf(){i4()}})}function gJ(J,Q){if(typeof Q==="symbol")return`${J}[Symbol(${Q.description??""})]`;if(C8.test(Q))return`${J}.${Q}`;return/^\d+$/.test(Q)?`${J}[${Q}]`:`${J}['${Q}']`}function _Q(J){try{if(J!==null&&typeof J==="object"&&i in J)return J[i]}catch{}return J}var N8=new Set(["copyWithin","fill","pop","push","reverse","shift","sort","splice","unshift"]);function A8(J){return new Proxy(J,{get(Q,W,X){var z=Reflect.get(Q,W,X);if(!N8.has(W))return z;return function(...Z){G6();var K=z.apply(this,Z);return vQ(),K}}})}function R6(){let{prototype:J,__svelte_cleanup:Q}=Array;if(Q)Q();let{indexOf:W,lastIndexOf:X,includes:z}=J;J.indexOf=function(Z,K){let G=W.call(this,Z,K);if(G===-1){for(let $=K??0;$<this.length;$+=1)if(_Q(this[$])===Z){SQ("array.indexOf(...)");break}}return G},J.lastIndexOf=function(Z,K){let G=X.call(this,Z,K??this.length-1);if(G===-1){for(let $=0;$<=(K??this.length-1);$+=1)if(_Q(this[$])===Z){SQ("array.lastIndexOf(...)");break}}return G},J.includes=function(Z,K){let G=z.call(this,Z,K);if(!G){for(let $=0;$<this.length;$+=1)if(_Q(this[$])===Z){SQ("array.includes(...)");break}}return G},Array.__svelte_cleanup=()=>{J.indexOf=W,J.lastIndexOf=X,J.includes=z}}var f7,j6,GQ,T6,x6;function lQ(){if(f7!==void 0)return;f7=window,j6=document,GQ=/Firefox/.test(navigator.userAgent);var J=Element.prototype,Q=Node.prototype,W=Text.prototype;if(T6=Y0(Q,"firstChild").get,x6=Y0(Q,"nextSibling").get,P7(J))J[WQ]=void 0,J[FQ]=null,J[XQ]=void 0,J.__e=void 0;if(P7(W))W[zQ]=void 0;if(P)J.__svelte_meta=null,R6()}function a(J=""){return document.createTextNode(J)}function u(J){return T6.call(J)}function r(J){return x6.call(J)}function D8(J,Q){if(!F)return u(J);var W=u(C);if(W===null)W=C.appendChild(a());else if(Q&&W.nodeType!==dJ){var X=a();return W?.before(X),j(X),X}if(Q)iQ(W);return j(W),W}function I8(J,Q=!1){if(!F){var W=u(J);if(W instanceof Comment&&W.data==="")return r(W);return W}if(Q){if(C?.nodeType!==dJ){var X=a();return C?.before(X),j(X),X}iQ(C)}return C}function R8(J,Q=1,W=!1){let X=F?C:J;var z;while(Q--)z=X,X=r(X);if(!F)return X;if(W){if(X?.nodeType!==dJ){var Z=a();if(X===null)z?.after(Z);else X.before(Z);return j(Z),Z}iQ(X)}return j(X),X}function qQ(J){J.textContent=""}function cQ(){if(!t)return!1;if(b0!==null)return!1;var J=O.f;return(J&H0)!==0}function d0(J,Q,W){if(Q==null||Q===wQ)return W?document.createElement(J,{is:W}):document.createElement(J);return W?document.createElementNS(Q,J,{is:W}):document.createElementNS(Q,J)}function iQ(J){if(J.nodeValue.length<65536)return;let Q=J.nextSibling;while(Q!==null&&Q.nodeType===dJ)Q.remove(),J.nodeValue+=Q.nodeValue,Q=J.nextSibling}var F=!1;function d(J){F=J}var C;function j(J){if(J===null)throw HJ(),i0;return C=J}function l(){return j(r(C))}function k6(J){if(!F)return;if(r(C)!==null)throw HJ(),i0;C=J}function L7(J=1){if(F){var Q=J,W=C;while(Q--)W=r(W);C=W}}function e0(J=!0){var Q=0,W=C;while(!0){if(W.nodeType===I0){var X=W.data;if(X===DJ){if(Q===0)return W;Q-=1}else if(X===_J||X===BJ||X[0]==="["&&!isNaN(Number(X.slice(1))))Q+=1}var z=r(W);if(J)W.remove();W=z}}function MQ(J){if(!J||J.nodeType!==I0)throw HJ(),i0;return J.data}var JQ=Symbol("events"),_7=new Set,oQ=new Set;function E6(J,Q,W){(Q[JQ]??={})[J]=W}function b6(J){for(var Q=0;Q<J.length;Q++)_7.add(J[Q]);for(var W of oQ)W(J)}var p7=null,d7=!1;function l7(J){var Q=this,W=Q.ownerDocument,X=J.type,z=J.composedPath?.()||[],Z=z[0]||J.target;if(p7=J,!d7)d7=!0,setTimeout(()=>{d7=!1,p7=null});var K=0,G=p7===J&&J[JQ];if(G){var $=z.indexOf(G);if($!==-1&&(Q===document||Q===window)){J[JQ]=Q;return}var Y=z.indexOf(Q);if(Y===-1)return;if($<=Y)K=$}if(Z=z[K]||J.target,Z===Q)return;n(J,"currentTarget",{configurable:!0,get(){return Z||W}});var H=w,B=O;f(null),p(null);try{var q,U=[];while(Z!==null){if(Z===Q)break;try{var M=Z[JQ]?.[X];if(M!=null&&(!Z.disabled||J.target===Z))M.call(Z,J)}catch(L){if(q)U.push(L);else q=L}if(J.cancelBubble)break;K++,Z=K<z.length?z[K]:null}if(q){for(let L of U)queueMicrotask(()=>{throw L});throw q}}finally{J[JQ]=Q,delete J.currentTarget,f(H),p(B)}}var j8=globalThis?.window?.trustedTypes&&globalThis.window.trustedTypes.createPolicy("svelte-trusted-html",{createHTML:(J)=>{return J}});function y6(J){return j8?.createHTML(J)??J}function c7(J){var Q=d0("template");return Q.innerHTML=y6(J.replaceAll("<!>","<!---->")),Q.content}function C0(J,Q){var W=O;if(W.nodes===null)W.nodes={start:J,end:Q,a:null,t:null}}function k8(J,Q){var W=(Q&w4)!==0,X=(Q&S4)!==0,z,Z=!J.startsWith("<!>");return()=>{if(F)return C0(C,null),C;if(z===void 0){if(z=c7(Z?J:"<!>"+J),!W)z=u(z)}var K=X||GQ?document.importNode(z,!0):z.cloneNode(!0);if(W){var G=u(K),$=K.lastChild;C0(G,$)}else C0(K,K);return K}}function E8(){if(F)return C0(C,null),C;var J=document.createDocumentFragment(),Q=document.createComment(""),W=a();return J.append(Q,W),C0(Q,W),J}function i7(J,Q){if(F){var W=O;if((W.f&H0)===0||W.nodes.end===null)W.nodes.end=C;l();return}if(J===null)return;J.before(Q)}var b8=/\r/g;function h6(J){J=J.replace(b8,"");let Q=5381,W=J.length;while(W--)Q=(Q<<5)-Q^J.charCodeAt(W);return(Q>>>0).toString(36)}var y8=["allowfullscreen","async","autofocus","autoplay","checked","controls","default","disabled","formnovalidate","indeterminate","inert","ismap","loop","multiple","muted","nomodule","novalidate","open","playsinline","readonly","required","reversed","seamless","selected","webkitdirectory","defer","disablepictureinpicture","disableremoteplayback"];var T2=[...y8,"formNoValidate","isMap","noModule","playsInline","readOnly","value","volume","defaultValue","defaultChecked","srcObject","noValidate","allowFullscreen","disablePictureInPicture","disableRemotePlayback"];var h8=["touchstart","touchmove"];function g6(J){return h8.includes(J)}var g8=["$state","$state.raw","$derived","$derived.by"],x2=[...g8,"$state.eager","$state.snapshot","$props","$props.id","$bindable","$effect","$effect.pre","$effect.tracking","$effect.root","$effect.pending","$inspect","$inspect().with","$inspect.trace","$host"];function sQ(J){return J?.replace(/\//g,"/")}var o7=!0;function v8(J,Q){var W=Q==null?"":typeof Q==="object"?`${Q}`:Q;if(W!==(J[zQ]??=J.nodeValue))J[zQ]=W,J.nodeValue=`${W}`}function rQ(J,Q){return v6(J,Q)}function a7(J,Q){lQ(),Q.intro=Q.intro??!1;let W=Q.target,X=F,z=C;try{var Z=u(W);while(Z&&(Z.nodeType!==I0||Z.data!==_J))Z=r(Z);if(!Z)throw i0;d(!0),j(Z);let K=v6(J,{...Q,anchor:Z});return d(!1),K}catch(K){if(K instanceof Error&&K.message.split(`
|
|
49
|
+
`).some((G)=>G.startsWith("https://svelte.dev/e/")))throw K;if(K!==i0)console.warn("Failed to hydrate: ",K);if(Q.recover===!1)d4();return lQ(),qQ(W),d(!1),rQ(J,Q)}finally{d(X),j(z)}}var aQ=new Map;function v6(J,{target:Q,anchor:W,props:X={},events:z,context:Z,intro:K=!0,transformError:G}){lQ();var $=void 0,Y=O6(()=>{var H=W??Q.appendChild(a());O7(H,{pending:()=>{}},(U)=>{B7({});var M=A;if(Z)M.c=Z;if(z)X.$$events=z;if(F)C0(U,null);if(o7=K,$=J(U,X)||{},o7=!0,F){if(O.nodes.end=C,C===null||C.nodeType!==I0||C.data!==DJ)throw HJ(),i0}H7()},G);var B=new Set,q=(U)=>{for(var M=0;M<U.length;M++){var L=U[M];if(B.has(L))continue;B.add(L);var V=g6(L);for(let E of[Q,document]){var N=aQ.get(E);if(N===void 0)N=new Map,aQ.set(E,N);var k=N.get(L);if(k===void 0)E.addEventListener(L,l7,{passive:V}),N.set(L,1);else N.set(L,k+1)}}};return q(lJ(_7)),oQ.add(q),()=>{for(var U of B)for(let V of[Q,document]){var M=aQ.get(V),L=M.get(U);if(--L==0){if(V.removeEventListener(U,l7),M.delete(U),M.size===0)aQ.delete(V)}else M.set(U,L)}if(oQ.delete(q),H!==W)H.parentNode?.removeChild(H)}});return s7.set($,Y),$}var s7=new WeakMap;function r7(J,Q){let W=s7.get(J);if(W)return s7.delete(J),W(Q);if(P)if(i in J)T4();else j4();return Promise.resolve()}var m6=new Map;function u6(J,Q){var W=m6.get(J);if(!W)W=new Set,m6.set(J,W);W.add(Q)}class $J{anchor;#J=new Map;#Q=new Map;#W=new Map;#G=new Set;#Z=!0;constructor(J,Q=!0){this.anchor=J,this.#Z=Q}#K=(J)=>{if(!this.#J.has(J))return;var Q=this.#J.get(J),W=this.#Q.get(Q);if(W)eJ(W),this.#G.delete(Q);else{var X=this.#W.get(Q);if(X){if(eJ(X.effect),this.#Q.set(Q,X.effect),this.#W.delete(Q),P)X.fragment.lastChild[z7]=this.anchor;X.fragment.lastChild.remove(),this.anchor.before(X.fragment),W=X.effect}}for(let[z,Z]of this.#J){if(this.#J.delete(z),z===J)break;let K=this.#W.get(Z);if(K)v(K.effect),this.#W.delete(Z)}for(let[z,Z]of this.#Q){if(z===Q||this.#G.has(z))continue;let K=()=>{if(Array.from(this.#J.values()).includes(z)){var $=document.createDocumentFragment();oJ(Z,$),$.append(a()),this.#W.set(z,{effect:Z,fragment:$})}else v(Z);this.#G.delete(z),this.#Q.delete(z)};if(this.#Z||!W)this.#G.add(z),t0(Z,K,!1);else K()}};#X=(J)=>{this.#J.delete(J);let Q=Array.from(this.#J.values());for(let[W,X]of this.#W)if(!Q.includes(W))v(X.effect),this.#W.delete(W)};ensure(J,Q){var W=S,X=cQ();if(Q&&!this.#Q.has(J)&&!this.#W.has(J))if(X){var z=document.createDocumentFragment(),Z=a();z.append(Z),this.#W.set(J,{effect:s(()=>Q(Z)),fragment:z})}else this.#Q.set(J,s(()=>Q(this.anchor)));if(this.#J.set(W,J),X){for(let[K,G]of this.#Q)if(K===J)W.unskip_effect(G);else W.skip_effect(G);for(let[K,G]of this.#W)if(K===J)W.unskip_effect(G.effect);else W.skip_effect(G.effect);W.oncommit(this.#K),W.ondiscard(this.#X)}else{if(F)this.anchor=C;this.#K(W)}}}function f8(J,Q,W=!1){var X;if(F)X=C,l();var z=new $J(J),Z=W?O0:0;function K(G,$){if(F){var Y=MQ(X);if(G!==parseInt(Y.substring(1))){var H=e0();j(H),z.anchor=H,d(!1),z.ensure(G,$),d(!0);return}}z.ensure(G,$)}w0(()=>{var G=!1;if(Q(($,Y=0)=>{G=!0,K(Y,$)}),!G)K(-1,null)},Z)}var p8=Symbol("NaN");function d8(J,Q,W){if(F)l();var X=new $J(J),z=!v0();w0(()=>{var Z=Q();if(Z!==Z)Z=p8;if(z&&Z!==null&&typeof Z==="object")Z={};X.ensure(Z,W)})}function _8(J,Q,W){var X=[],z=Q.length,Z,K=Q.length;for(var G=0;G<z;G++){let B=Q[G];t0(B,()=>{if(Z){if(Z.pending.delete(B),Z.done.add(B),Z.pending.size===0){var q=J.outrogroups;if(n7(J,lJ(Z.done)),q.delete(Z),q.size===0)J.outrogroups=null}}else K-=1},!1)}if(K===0){var $=X.length===0&&W!==null&&J.pending.size===0;if($){var Y=W,H=Y.parentNode;qQ(H),H.append(Y),J.items.clear()}n7(J,Q,!$)}else Z={pending:new Set(Q),done:new Set},(J.outrogroups??=new Set).add(Z)}function n7(J,Q,W=!0){var X;if(J.pending.size>0){X=new Set;for(let K of J.pending.values())for(let G of K)X.add(J.items.get(G).e)}for(var z=0;z<Q.length;z++){var Z=Q[z];if(X?.has(Z)){Z.f|=h0;let K=document.createDocumentFragment();oJ(Z,K)}else v(Q[z],W)}}var p6;function l8(J,Q,W,X,z,Z=null){var K=J,G=new Map,$=(Q&K7)!==0;if($){var Y=J;K=F?j(u(Y)):Y.appendChild(a())}if(F)l();var H=null,B=xJ(()=>{var E=W();return ZJ(E)?E:E==null?[]:lJ(E)});if(P)G0(B,"{#each ...}");var q,U=new Map,M=!0;function L(E){if((k.effect.f&g)!==0)return;if(k.pending.delete(E),k.fallback=H,c8(k,q,K,Q,X),H!==null)if(q.length===0)if((H.f&h0)===0)eJ(H);else H.f^=h0,LQ(H,null,K);else t0(H,()=>{H=null})}function V(E){k.pending.delete(E)}var N=w0(()=>{q=R(B);var E=q.length;let D=!1;if(F){var x0=MQ(K)===BJ;if(x0!==(E===0))K=e0(),j(K),d(!1),D=!0}var U0=new Set,N0=S,mJ=cQ();for(var _0=0;_0<E;_0+=1){if(F&&C.nodeType===I0&&C.data===DJ)K=C,D=!0,d(!1);var y0=q[_0],uJ=X(y0,_0);if(P){var G4=X(y0,_0);if(uJ!==G4)v4(String(_0),String(uJ),String(G4))}var XJ=M?null:G.get(uJ);if(XJ){if(XJ.v)f0(XJ.v,y0);if(XJ.i)f0(XJ.i,_0);if(mJ)N0.unskip_effect(XJ.e)}else{if(XJ=i8(G,M?K:p6??=a(),y0,uJ,_0,z,Q,W),!M)XJ.e.f|=h0;G.set(uJ,XJ)}U0.add(uJ)}if(E===0&&Z&&!H)if(M)H=s(()=>Z(K));else H=s(()=>Z(p6??=a())),H.f|=h0;if(E>U0.size)if(P)o8(q,X);else U7("","","");if(F&&E>0)j(e0());if(!M)if(U.set(N0,U0),mJ){for(let[K8,G8]of G)if(!U0.has(K8))N0.skip_effect(G8.e);N0.oncommit(L),N0.ondiscard(V)}else L(N0);if(D)d(!0);R(B)}),k={effect:N,flags:Q,items:G,pending:U,outrogroups:null,fallback:H};if(M=!1,F)K=C}function VQ(J){while(J!==null&&(J.f&c)===0)J=J.next;return J}function c8(J,Q,W,X,z){var Z=(X&H4)!==0,K=Q.length,G=J.items,$=VQ(J.effect.first),Y,H=null,B,q=[],U=[],M,L,V,N;if(Z){for(N=0;N<K;N+=1)if(M=Q[N],L=z(M,N),V=G.get(L).e,(V.f&h0)===0)V.nodes?.a?.measure(),(B??=new Set).add(V)}for(N=0;N<K;N+=1){if(M=Q[N],L=z(M,N),V=G.get(L).e,J.outrogroups!==null)for(let y0 of J.outrogroups)y0.pending.delete(V),y0.done.delete(V);if((V.f&_)!==0){if(eJ(V),Z)V.nodes?.a?.unfix(),(B??=new Set).delete(V)}if((V.f&h0)!==0)if(V.f^=h0,V===$)LQ(V,null,W);else{var k=H?H.next:$;if(V===J.effect.last)J.effect.last=V.prev;if(V.prev)V.prev.next=V.next;if(V.next)V.next.prev=V.prev;SJ(J,H,V),SJ(J,V,k),LQ(V,k,W),H=V,q=[],U=[],$=VQ(H.next);continue}if(V!==$){if(Y!==void 0&&Y.has(V)){if(q.length<U.length){var E=U[0],D;H=E.prev;var x0=q[0],U0=q[q.length-1];for(D=0;D<q.length;D+=1)LQ(q[D],E,W);for(D=0;D<U.length;D+=1)Y.delete(U[D]);SJ(J,x0.prev,U0.next),SJ(J,H,x0),SJ(J,U0,E),$=E,H=U0,N-=1,q=[],U=[]}else Y.delete(V),LQ(V,$,W),SJ(J,V.prev,V.next),SJ(J,V,H===null?J.effect.first:H.next),SJ(J,H,V),H=V;continue}q=[],U=[];while($!==null&&$!==V)(Y??=new Set).add($),U.push($),$=VQ($.next);if($===null)continue}if((V.f&h0)===0)q.push(V);H=V,$=VQ(V.next)}if(J.outrogroups!==null){for(let y0 of J.outrogroups)if(y0.pending.size===0)n7(J,lJ(y0.done)),J.outrogroups?.delete(y0);if(J.outrogroups.size===0)J.outrogroups=null}if($!==null||Y!==void 0){var N0=[];if(Y!==void 0){for(V of Y)if((V.f&_)===0)N0.push(V)}while($!==null){if(($.f&_)===0&&$!==J.fallback)N0.push($);$=VQ($.next)}var mJ=N0.length;if(mJ>0){var _0=(X&K7)!==0&&K===0?W:null;if(Z){for(N=0;N<mJ;N+=1)N0[N].nodes?.a?.measure();for(N=0;N<mJ;N+=1)N0[N].nodes?.a?.fix()}_8(J,N0,_0)}}if(Z)o(()=>{if(B===void 0)return;for(V of B)V.nodes?.a?.apply()})}function i8(J,Q,W,X,z,Z,K,G){var $=(K&U4)!==0?(K&Y4)===0?bJ(W,!1,!1):q0(W):null,Y=(K&B4)!==0?q0(z):null;if(P&&$)$.trace=()=>{G()[Y?.v??z]};return{v:$,i:Y,e:s(()=>{return Z(Q,$??W,Y??z,G),()=>{J.delete(X)}})}}function LQ(J,Q,W){if(!J.nodes)return;var X=J.nodes.start,z=J.nodes.end,Z=Q&&(Q.f&h0)===0?Q.nodes.start:W;while(X!==null){var K=r(X);if(Z.before(X),X===z)return;X=K}}function SJ(J,Q,W){if(Q===null)J.effect.first=W;else Q.next=W;if(W===null)J.effect.last=Q;else W.prev=Q}function o8(J,Q){let W=new Map,X=J.length;for(let z=0;z<X;z++){let Z=Q(J[z],z);if(W.has(Z)){let K=String(W.get(Z)),G=String(z),$=String(Z);if($.startsWith("[object "))$=null;U7(K,G,$)}W.set(Z,z)}}function s8(J,Q,W){if(!Q||Q===h6(String(W??"")))return;let X,z=J.__svelte_meta?.loc;if(z)X=`near ${z.file}:${z.line}:${z.column}`;else if(R0?.[F0])X=`in ${R0[F0]}`;R4(sQ(X))}function a8(J,Q,W=!1,X=!1,z=!1,Z=!1){var K=J,G="";if(W){var $=J;if(F)K=j(u($))}g7(()=>{var Y=O;if(G===(G=Q()??"")){if(F)l();return}if(W&&!F){if(Y.nodes=null,$.innerHTML=G,G!=="")C0(u($),$.lastChild);return}if(Y.nodes!==null)m7(Y.nodes.start,Y.nodes.end),Y.nodes=null;if(G==="")return;if(F){var H=C.data,B=l(),q=B;while(B!==null&&(B.nodeType!==I0||B.data!==""))q=B,B=r(B);if(B===null)throw HJ(),i0;if(P&&!Z)s8(B.parentNode,H,G);C0(C,q),K=j(B);return}var U=X?ZQ:z?$7:void 0,M=d0(X?"svg":z?"math":"template",U);M.innerHTML=G;var L=X||z?M:M.content;if(C0(u(L),L.lastChild),X||z)while(u(L))K.before(u(L));else K.before(L)})}function r8(J,Q,W,X,z){if(F)l();var Z=Q.$$slots?.[W],K=!1;if(Z===!0)Z=Q[W==="default"?"children":W],K=!0;if(Z===void 0){if(z!==null)z(J)}else Z(J,K?()=>X:X)}function Q1(J,Q){L0(()=>{J=O?.parent?.nodes?.start??J;var W=J.getRootNode(),X=W.host?W:W.head??W.ownerDocument.head;if(!X.querySelector("#"+Q.hash)){let z=d0("style");if(z.id=Q.hash,z.textContent=Q.code,X.appendChild(z),P)u6(Q.hash,z)}})}function W1(J,Q,W){L0(()=>{var X=h(()=>Q(J,W?.())||{});if(W&&X?.update){var z=!1,Z={};e(()=>{var K=W();if(dQ(K),z&&jQ(Z,K))Z=K,X.update(K)}),z=!0}if(X?.destroy)return()=>X.destroy()})}var d6=[...`
|
|
50
|
+
\r\f \v\uFEFF`];function l6(J,Q,W){var X=J==null?"":""+J;if(Q)X=X?X+" "+Q:Q;if(W){for(var z of Object.keys(W))if(W[z])X=X?X+" "+z:z;else if(X.length){var Z=z.length,K=0;while((K=X.indexOf(z,K))>=0){var G=K+Z;if((K===0||d6.includes(X[K-1]))&&(G===X.length||d6.includes(X[G])))X=(K===0?"":X.substring(0,K))+X.substring(G+1);else K=G}}}return X===""?null:X}function _6(J,Q=!1){var W=Q?" !important;":";",X="";for(var z of Object.keys(J)){var Z=J[z];if(Z!=null&&Z!=="")X+=" "+z+": "+Z+W}return X}function t7(J){if(J[0]!=="-"||J[1]!=="-")return J.toLowerCase();return J}function c6(J,Q){if(Q){var W="",X,z;if(Array.isArray(Q))X=Q[0],z=Q[1];else X=Q;if(J){J=String(J).replaceAll(/\/\*.*?\*\//g,"").trim();var Z=!1,K=0,G=!1,$=[];if(X)$.push(...Object.keys(X).map(t7));if(z)$.push(...Object.keys(z).map(t7));var Y=0,H=-1;let L=J.length;for(var B=0;B<L;B++){var q=J[B];if(G){if(q==="/"&&J[B-1]==="*")G=!1}else if(Z){if(Z===q)Z=!1}else if(q==="/"&&J[B+1]==="*")G=!0;else if(q==='"'||q==="'")Z=q;else if(q==="(")K++;else if(q===")")K--;if(!G&&Z===!1&&K===0){if(q===":"&&H===-1)H=B;else if(q===";"||B===L-1){if(H!==-1){var U=t7(J.substring(Y,H).trim());if(!$.includes(U)){if(q!==";")B++;var M=J.substring(Y,B).trim();W+=" "+M+";"}}Y=B+1,H=-1}}}}if(X)W+=_6(X);if(z)W+=_6(z,!0);return W=W.trim(),W===""?null:W}return J==null?null:String(J)}function i6(J,Q,W,X,z,Z){var K=J[WQ];if(F||K!==W||K===void 0){var G=l6(W,X,Z);if(!F||G!==J.getAttribute("class"))if(G==null)J.removeAttribute("class");else if(Q)J.className=G;else J.setAttribute("class",G);J[WQ]=W}else if(Z&&z!==Z)for(var $ in Z){var Y=!!Z[$];if(z==null||Y!==!!z[$])J.classList.toggle($,Y)}return Z}function e7(J,Q={},W,X){for(var z in W){var Z=W[z];if(Q[z]!==Z)if(W[z]==null)J.style.removeProperty(z);else J.style.setProperty(z,Z,X)}}function o6(J,Q,W,X){var z=J[XQ];if(F||z!==Q){var Z=c6(Q,X);if(!F||Z!==J.getAttribute("style"))if(Z==null)J.removeAttribute("style");else J.style.cssText=Z;J[XQ]=Q}else if(X)if(Array.isArray(X))e7(J,W?.[0],X[0]),e7(J,W?.[1],X[1],"important");else e7(J,W,X);return X}var U1=Symbol("class"),B1=Symbol("style"),H1=Symbol("is custom element"),Y1=Symbol("is html"),M1=Z7?"link":"LINK";function r6(J,Q,W,X){var z=L1(J);if(F){if(z[Q]=J.getAttribute(Q),Q==="src"||Q==="srcset"||Q==="href"&&J.nodeName===M1){if(!X)O1(J,Q,W??"");return}}if(z[Q]===(z[Q]=W))return;if(Q==="loading")J[P4]=W;if(W==null)J.removeAttribute(Q);else if(typeof W!=="string"&&n6(J).includes(Q))J[Q]=W;else J.setAttribute(Q,W)}function V1(J,Q,W){var X=w,z=O;let Z=F;if(F)d(!1);f(null),p(null);try{if(Q!=="style"&&(J4.has(J.getAttribute("is")||J.nodeName)||!customElements||customElements.get(J.getAttribute("is")||J.nodeName.toLowerCase())?n6(J).includes(Q):W&&typeof W==="object"))J[Q]=W;else r6(J,Q,W==null?W:String(W))}finally{if(f(X),p(z),Z)d(!0)}}function L1(J){return J[FQ]??={[H1]:J.nodeName.includes("-"),[Y1]:J.namespaceURI===wQ}}var J4=new Map;function n6(J){var Q=J.getAttribute("is")||J.nodeName,W=J4.get(Q);if(W)return W;J4.set(Q,W=[]);var X,z=J,Z=Element.prototype;while(Z!==z){X=CQ(z);for(var K in X)if(X[K].set&&K!=="innerHTML"&&K!=="textContent"&&K!=="innerText")W.push(K);z=IJ(z)}return W}function O1(J,Q,W){if(!P)return;if(Q==="srcset"&&F1(J,W))return;if(Q4(J.getAttribute(Q)??"",W))return;I4(Q,J.outerHTML.replace(J.innerHTML,J.innerHTML&&"..."),String(W))}function Q4(J,Q){if(J===Q)return!0;return new URL(J,document.baseURI).href===new URL(Q,document.baseURI).href}function s6(J){return J.split(",").map((Q)=>Q.trim().split(" ").filter(Boolean))}function F1(J,Q){var W=s6(J.srcset),X=s6(Q);return X.length===W.length&&X.every(([z,Z],K)=>Z===W[K][1]&&(Q4(W[K][0],z)||Q4(z,W[K][0])))}class t6{#J=new WeakMap;#Q;#W;static entries=new WeakMap;constructor(J){this.#W=J}observe(J,Q){var W=this.#J.get(J)||new Set;return W.add(Q),this.#J.set(J,W),this.#G().observe(J,this.#W),()=>{var X=this.#J.get(J);if(X.delete(Q),X.size===0)this.#J.delete(J),this.#Q.unobserve(J)}}#G(){return this.#Q??(this.#Q=new ResizeObserver((J)=>{for(var Q of J){t6.entries.set(Q.target,Q);for(var W of this.#J.get(Q.target)||[])W(Q)}}))}}function W4(J,Q){return J===Q||J?.[i]===Q}function w1(J={},Q,W,X){var z=A.r,Z=O;return L0(()=>{var K,G;return e(()=>{K=G,G=X?.()||[],h(()=>{if(!W4(W(...G),J)){if(Q(J,...G),K&&W4(W(...K),J))Q(null,...K)}})}),()=>{let $=Z;while($!==z&&$.parent!==null&&$.parent.f&pJ)$=$.parent;let Y=()=>{if(G&&W4(W(...G),J))Q(null,...G)},H=$.teardown;$.teardown=()=>{Y(),H?.()}}}),J}function S1(J,Q,W,X){var z=!MJ||(W&V4)!==0,Z=(W&O4)!==0,K=(W&F4)!==0,G=X,$=!0,Y=void 0,H=()=>{if(K&&z)return Y??=LJ(X),R(Y);if($)$=!1,G=K?h(X):X;return G};let B;if(Z){var q=i in J||QQ in J;B=Y0(J,Q)?.set??(q&&Q in J?(D)=>J[Q]=D:void 0)}var U,M=!1;if(Z)[U,M]=R7(()=>J[Q]);else U=J[Q];if(U===void 0&&X!==void 0){if(U=H(),B){if(z)_4(Q);B(U)}}var L;if(z)L=()=>{var D=J[Q];if(D===void 0)return H();return $=!0,D};else L=()=>{var D=J[Q];if(D!==void 0)G=void 0;return D===void 0?G:D};if(z&&(W&L4)===0)return L;if(B){var V=J.$$legacy;return function(D,x0){if(arguments.length>0){if(!z||!x0||V||M)B(x0?L():D);return D}return L()}}var N=!1,k=((W&M4)!==0?LJ:xJ)(()=>{return N=!1,L()});if(P)k.label=Q;if(Z)R(k);var E=O;return function(D,x0){if(arguments.length>0){let U0=x0?R(k):z&&Z?GJ(D):D;if(P0(k,U0),N=!0,G!==void 0)G=U0;return D}if(j0&&N||(E.f&g)!==0)return k.v;return R(k)}}function e6(J){return new J8(J)}class J8{#J;#Q;constructor(J){var Q=new Map,W=(z,Z)=>{var K=bJ(Z,!1,!1);return Q.set(z,K),K};let X=new Proxy({...J.props||{},$$events:{}},{get(z,Z){return R(Q.get(Z)??W(Z,Reflect.get(z,Z)))},has(z,Z){if(Z===QQ)return!0;return R(Q.get(Z)??W(Z,Reflect.get(z,Z))),Reflect.has(z,Z)},set(z,Z,K){return P0(Q.get(Z)??W(Z,K),K),Reflect.set(z,Z,K)}});if(this.#Q=(J.hydrate?a7:rQ)(J.component,{target:J.target,anchor:J.anchor,props:X,context:J.context,intro:J.intro??!1,recover:J.recover,transformError:J.transformError}),!t&&(!J?.props?.$$host||J.sync===!1))tJ();this.#J=X.$$events;for(let z of Object.keys(this.#Q)){if(z==="$set"||z==="$destroy"||z==="$on")continue;n(this,z,{get(){return this.#Q[z]},set(Z){this.#Q[z]=Z},enumerable:!0})}this.#Q.$set=(z)=>{Object.assign(X,z)},this.#Q.$destroy=()=>{r7(this.#Q)}}$set(J){this.#Q.$set(J)}$on(J,Q){this.#J[J]=this.#J[J]||[];let W=(...X)=>Q.call(this,...X);return this.#J[J].push(W),()=>{this.#J[J]=this.#J[J].filter((X)=>X!==W)}}$destroy(){this.#Q.$destroy()}}var Q8;if(typeof HTMLElement==="function")Q8=class extends HTMLElement{$$ctor;$$s;$$c;$$cn=!1;$$d={};$$r=!1;$$p_d={};$$l={};$$l_u=new Map;$$me;$$shadowRoot=null;constructor(J,Q,W){super();if(this.$$ctor=J,this.$$s=Q,W)this.$$shadowRoot=this.attachShadow(W)}addEventListener(J,Q,W){if(this.$$l[J]=this.$$l[J]||[],this.$$l[J].push(Q),this.$$c){let X=this.$$c.$on(J,Q);this.$$l_u.set(Q,X)}super.addEventListener(J,Q,W)}removeEventListener(J,Q,W){if(super.removeEventListener(J,Q,W),this.$$c){let X=this.$$l_u.get(Q);if(X)X(),this.$$l_u.delete(Q)}}async connectedCallback(){if(this.$$cn=!0,!this.$$c){let J=function(X){return(z)=>{let Z=d0("slot");if(X!=="default")Z.name=X;i7(z,Z)}};if(await Promise.resolve(),!this.$$cn||this.$$c)return;let Q={},W=T1(this);for(let X of this.$$s)if(X in W)if(X==="default"&&!this.$$d.children)this.$$d.children=J(X),Q.default=!0;else Q[X]=J(X);for(let X of this.attributes){let z=this.$$g_p(X.name);if(!(z in this.$$d))this.$$d[z]=tQ(z,X.value,this.$$p_d,"toProp")}for(let X in this.$$p_d)if(!(X in this.$$d)&&this[X]!==void 0)this.$$d[X]=this[X],delete this[X];this.$$c=e6({component:this.$$ctor,target:this.$$shadowRoot||this,props:{...this.$$d,$$slots:Q,$$host:this}}),this.$$me=h7(()=>{e(()=>{this.$$r=!0;for(let X of KQ(this.$$c)){if(!this.$$p_d[X]?.reflect)continue;this.$$d[X]=this.$$c[X];let z=tQ(X,this.$$d[X],this.$$p_d,"toAttribute");if(z==null)this.removeAttribute(this.$$p_d[X].attribute||X);else this.setAttribute(this.$$p_d[X].attribute||X,z)}this.$$r=!1})});for(let X in this.$$l)for(let z of this.$$l[X]){let Z=this.$$c.$on(X,z);this.$$l_u.set(z,Z)}this.$$l={}}}attributeChangedCallback(J,Q,W){if(this.$$r)return;J=this.$$g_p(J),this.$$d[J]=tQ(J,W,this.$$p_d,"toProp"),this.$$c?.$set({[J]:this.$$d[J]})}disconnectedCallback(){this.$$cn=!1,Promise.resolve().then(()=>{if(!this.$$cn&&this.$$c)this.$$c.$destroy(),this.$$me(),this.$$c=void 0})}$$g_p(J){return KQ(this.$$p_d).find((Q)=>this.$$p_d[Q].attribute===J||!this.$$p_d[Q].attribute&&Q.toLowerCase()===J)||J}};function tQ(J,Q,W,X){let z=W[J]?.type;if(Q=z==="Boolean"&&typeof Q!=="boolean"?Q!=null:Q,!X||!W[J])return Q;else if(X==="toAttribute")switch(z){case"Object":case"Array":return Q==null?null:JSON.stringify(Q);case"Boolean":return Q?"":null;case"Number":return Q==null?null:Q;default:return Q}else switch(z){case"Object":case"Array":return Q&&JSON.parse(Q);case"Boolean":return Q;case"Number":return Q!=null?+Q:Q;default:return Q}}function T1(J){let Q={};return J.childNodes.forEach((W)=>{Q[W.slot||"default"]=!0}),Q}function x1(J,Q,W,X,z,Z){let K=class extends Q8{constructor(){super(J,W,z);this.$$p_d=Q}static get observedAttributes(){return KQ(Q).map((G)=>(Q[G].attribute||G).toLowerCase())}};if(KQ(Q).forEach((G)=>{n(K.prototype,G,{get(){return this.$$c&&G in this.$$c?this.$$c[G]:this.$$d[G]},set($){$=tQ(G,$,Q),this.$$d[G]=$;var Y=this.$$c;if(Y){var H=Y0(Y,G)?.get;if(H)Y[G]=$;else Y.$set({[G]:$})}}})}),X.forEach((G)=>{n(K.prototype,G,{get(){return this.$$c?.[G]}})}),Z)K=Z(K);return J.element=K,K}if(P){let J=function(Q){if(!(Q in globalThis)){let W;Object.defineProperty(globalThis,Q,{configurable:!0,get:()=>{if(W!==void 0)return W;l4(Q)},set:(X)=>{W=X}})}};J("$state"),J("$effect"),J("$derived"),J("$inspect"),J("$props"),J("$bindable")}import{createContext as eQ}from"@pie-players/pie-context";var W8=eQ(Symbol.for("pie.assessmentToolkit.runtimeContext")),X8=eQ(Symbol.for("pie.assessmentToolkit.hostRuntimeContext")),z8=eQ(Symbol.for("pie.assessmentToolkit.shellContext")),k1=eQ(Symbol.for("pie.assessmentToolkit.regionScopeContext"));import{ContextConsumer as E1}from"@pie-players/pie-context";function z4(J,Q,W){let X=!1,z=new E1(J,{context:Q,subscribe:!0,onValue:(Y)=>{X=!0,W(Y)}});z.connect();let Z=(Y)=>{if(Y.context!==Q)return;z.requestValue()};J.addEventListener("context-provider",Z);let K=0,G=200,$=globalThis.setInterval(()=>{if(X||K>=G){globalThis.clearInterval($);return}K+=1,z.requestValue()},50);return()=>{globalThis.clearInterval($),J.removeEventListener("context-provider",Z),z.disconnect()}}function VH(J,Q){return z4(J,W8,Q)}function LH(J,Q){return z4(J,X8,Q)}function OH(J,Q){return z4(J,z8,Q)}var J7={assessment:[],section:[],item:[],passage:[],rubric:[],element:[]};var Z4={section:[...J7.section],item:[...J7.item],passage:[...J7.passage]};function vJ(J){return typeof J==="object"&&J!==null&&!Array.isArray(J)}function CJ(J,Q){if(J==null)return[];if(!Array.isArray(J))throw Error(`Invalid tools config at "${Q}": expected an array of tool ids.`);if(J.find((X)=>typeof X!=="string")!==void 0)throw Error(`Invalid tools config at "${Q}": all entries must be strings.`);return J}function b1(J){if(J==null)return;if(!vJ(J))throw Error('Invalid tools config at "placement": expected an object with section/item/passage arrays.');return J}function y1(J){if(J==null)return;if(!vJ(J))throw Error('Invalid tools config at "policy": expected an object with allowed/blocked arrays.');return J}function h1(J,Q){if(Q==null)return;if(!vJ(Q))throw Error(`Invalid tools config at "providers.${J}": expected an object.`);let W=Q,X=(z)=>z==="polly"||z==="google"||z==="custom";if("enabled"in W&&W.enabled!==void 0&&typeof W.enabled!=="boolean")throw Error(`Invalid tools config at "providers.${J}.enabled": expected a boolean.`);if("settings"in W&&W.settings!==void 0&&!vJ(W.settings))throw Error(`Invalid tools config at "providers.${J}.settings": expected an object.`);if("provider"in W&&W.provider!==void 0&&!vJ(W.provider)&&!(J==="textToSpeech"&&X(W.provider)))throw Error(`Invalid tools config at "providers.${J}.provider": expected an object.`);return W}function g1(J){if(J==null)return{};if(!vJ(J))throw Error('Invalid tools config at "providers": expected an object keyed by tool id.');let Q={};for(let[W,X]of Object.entries(J))Q[W]=h1(W,X);return Q}function K4(J){let Q=J.trim();if(!Q)return"";return Q}function qJ(J){if(!J||J.length===0)return[];let Q=new Set;for(let W of J){if(typeof W!=="string")throw Error("Invalid tools config: tool list entries must be strings.");let X=K4(W);if(!X)continue;Q.add(X)}return Array.from(Q)}function CH(J){if(!J)return[];return qJ(J.split(",").map((Q)=>Q.trim()).filter(Boolean))}function v1(J,Q){if(J==null)return;if(J==="on"||J==="off")return J;throw Error(`Invalid tools config at "${Q}": expected "on" or "off", got ${JSON.stringify(J)}.`)}function NH(J){if(J!=null&&!vJ(J))throw Error('Invalid tools config: expected an object with "policy", "placement", and "providers".');let Q=y1(J?.policy),W=b1(J?.placement),X=g1(J?.providers),z=v1(J?.pnpEnforcement,"pnpEnforcement"),Z={policy:{allowed:qJ(CJ(Q?.allowed,"policy.allowed")),blocked:qJ(CJ(Q?.blocked,"policy.blocked"))},placement:{section:qJ(CJ(W?.section,"placement.section")).length?qJ(CJ(W?.section,"placement.section")):[...Z4.section],item:qJ(CJ(W?.item,"placement.item")).length?qJ(CJ(W?.item,"placement.item")):[...Z4.item],passage:qJ(CJ(W?.passage,"placement.passage")).length?qJ(CJ(W?.passage,"placement.passage")):[...Z4.passage]},providers:X};if(z)Z.pnpEnforcement=z;return Z}import{dynamicMessageKey as IH}from"@pie-players/pie-players-shared/i18n/provider";var m1=["assessment","section","item","passage","rubric","element"];function Q7(J,Q){if(typeof J!=="string"||J.trim().length===0)throw Error(`Invalid tool registration: "${Q}" must be a non-empty string.`)}var u1=[{pattern:/<script\b/i,reason:"contains a <script> tag"},{pattern:/\son[a-z]+\s*=/i,reason:"contains an inline event handler (on*=) attribute"},{pattern:/javascript:/i,reason:"contains a javascript: URL"},{pattern:/<foreignObject\b/i,reason:"contains a <foreignObject> element"}];function f1(J,Q,W){let X=Q.trimStart(),z=X.toLowerCase().startsWith("<svg"),Z=/^https?:/i.test(X);if(/^data:/i.test(X))throw Error(`Invalid tool registration "${J}": "${W}" may not be a data: URL.`);if(!z&&!Z)return;for(let{pattern:G,reason:$}of u1)if(G.test(Q))throw Error(`Invalid tool registration "${J}": "${W}" ${$}. Inline SVG icons must not include scriptable content.`)}function Z8(J){Q7(J.toolId,"toolId"),Q7(J.name,"name"),Q7(J.description,"description");let Q=J.activation==="region";if(!Q||J.icon!==void 0){if(typeof J.icon!=="string"&&typeof J.icon!=="function")throw Error(`Invalid tool registration "${J.toolId}": "icon" must be a string or function.`)}if(typeof J.icon==="string")f1(J.toolId,J.icon,"icon");if(!Array.isArray(J.supportedLevels)||J.supportedLevels.length===0)throw Error(`Invalid tool registration "${J.toolId}": "supportedLevels" must be a non-empty array.`);let W=J.supportedLevels.find((X)=>!m1.includes(X));if(W)throw Error(`Invalid tool registration "${J.toolId}": unsupported level "${W}".`);if(J.activation!==void 0&&J.activation!=="toolbar-toggle"&&J.activation!=="selection-gateway"&&J.activation!=="region")throw Error(`Invalid tool registration "${J.toolId}": unsupported activation "${String(J.activation)}".`);if(J.surfaces!==void 0&&(!Array.isArray(J.surfaces)||J.surfaces.some((X)=>typeof X!=="string"||X.trim().length===0)))throw Error(`Invalid tool registration "${J.toolId}": "surfaces" must be an array of non-empty strings.`);if(Q&&!J.surfaces?.length)throw Error(`Invalid tool registration "${J.toolId}": region tools must declare at least one host surface in "surfaces".`);if(Q&&typeof J.renderSurface!=="function")throw Error(`Invalid tool registration "${J.toolId}": region tools must implement "renderSurface".`);if(J.resolvesWithoutGrant!==void 0&&typeof J.resolvesWithoutGrant!=="boolean")throw Error(`Invalid tool registration "${J.toolId}": "resolvesWithoutGrant" must be a boolean.`);if(J.resolvesWithoutGrant&&!J.requiresAuthoredContent)throw Error(`Invalid tool registration "${J.toolId}": "resolvesWithoutGrant" requires "requiresAuthoredContent".`);if(J.renderSurface!==void 0&&typeof J.renderSurface!=="function")throw Error(`Invalid tool registration "${J.toolId}": "renderSurface" must be a function.`);if(J.renderSurface&&!J.surfaces?.length)throw Error(`Invalid tool registration "${J.toolId}": "renderSurface" requires at least one entry in "surfaces".`);if(J.singletonScope!==void 0&&J.singletonScope!=="section")throw Error(`Invalid tool registration "${J.toolId}": unsupported singletonScope "${String(J.singletonScope)}".`);if(J.activation==="selection-gateway"&&J.singletonScope!=="section")throw Error(`Invalid tool registration "${J.toolId}": selection-gateway tools must declare singletonScope "section".`);if(J.pnpSupportIds!==void 0&&(!Array.isArray(J.pnpSupportIds)||J.pnpSupportIds.some((X)=>typeof X!=="string"||X.trim().length===0)))throw Error(`Invalid tool registration "${J.toolId}": "pnpSupportIds" must be an array of non-empty strings.`);if(J.activation!=="region"&&typeof J.isVisibleInContext!=="function")throw Error(`Invalid tool registration "${J.toolId}": "isVisibleInContext" must be a function.`);if(J.isVisibleInContext!==void 0&&typeof J.isVisibleInContext!=="function")throw Error(`Invalid tool registration "${J.toolId}": "isVisibleInContext" must be a function when present.`);if(J.isApplicableToContent!==void 0&&typeof J.isApplicableToContent!=="function")throw Error(`Invalid tool registration "${J.toolId}": "isApplicableToContent" must be a function when present.`);if(J.requiresAuthoredContent!==void 0){if(typeof J.requiresAuthoredContent!=="object"||J.requiresAuthoredContent===null||typeof J.requiresAuthoredContent.resolve!=="function")throw Error(`Invalid tool registration "${J.toolId}": "requiresAuthoredContent" must be an object with a "resolve" function.`);if(!J.pnpSupportIds?.length)throw Error(`Invalid tool registration "${J.toolId}": "requiresAuthoredContent" requires at least one entry in "pnpSupportIds", which is what a host filters a default grant list on.`)}if(J.renderToolbar!==void 0){if(typeof J.renderToolbar!=="function")throw Error(`Invalid tool registration "${J.toolId}": "renderToolbar" must be a function.`)}else if(!Q)throw Error(`Invalid tool registration "${J.toolId}": "renderToolbar" must be a function.`)}class p1{tools=new Map;pnpIndex=new Map;componentOverrides={};moduleLoaders=new Map;loadedToolModules=new Set;moduleLoadPromises=new Map;changeListeners=new Set;emitChange(J){for(let Q of this.changeListeners)try{Q(J)}catch(W){console.warn("[ToolRegistry] change listener failed:",W)}}onRegistryChange(J){this.changeListeners.add(J);let Q=!0;return()=>{if(!Q)return;Q=!1,this.changeListeners.delete(J)}}normalizeToolId(J){return K4(J)}normalizeToolIds(J){return J.map((Q)=>this.normalizeToolId(Q))}register(J){if(Z8(J),this.tools.has(J.toolId))throw Error(`Tool '${J.toolId}' is already registered`);if(this.tools.set(J.toolId,J),J.pnpSupportIds)for(let Q of J.pnpSupportIds){if(!this.pnpIndex.has(Q))this.pnpIndex.set(Q,new Set);this.pnpIndex.get(Q).add(J.toolId)}this.emitChange({kind:"register",toolIds:[J.toolId]})}override(J){if(Z8(J),!this.tools.has(J.toolId))throw Error(`Cannot override non-existent tool '${J.toolId}'`);let Q=this.tools.get(J.toolId);if(Q.pnpSupportIds)for(let W of Q.pnpSupportIds)this.pnpIndex.get(W)?.delete(J.toolId);if(this.tools.set(J.toolId,J),J.pnpSupportIds)for(let W of J.pnpSupportIds){if(!this.pnpIndex.has(W))this.pnpIndex.set(W,new Set);this.pnpIndex.get(W).add(J.toolId)}this.emitChange({kind:"override",toolIds:[J.toolId]})}unregister(J){let Q=this.tools.get(J);if(!Q)return;if(Q.pnpSupportIds)for(let W of Q.pnpSupportIds)this.pnpIndex.get(W)?.delete(J);this.tools.delete(J),this.emitChange({kind:"unregister",toolIds:[J]})}get(J){return this.tools.get(J)}has(J){return this.tools.has(J)}getAllToolIds(){return Array.from(this.tools.keys())}getAllTools(){return Array.from(this.tools.values())}getToolsByPNPSupport(J){return this.pnpIndex.get(J)||new Set}getToolsByLevel(J){return this.getAllTools().filter((Q)=>Q.supportedLevels.includes(J))}getToolActivation(J){return this.get(J)?.activation||"toolbar-toggle"}getToolSingletonScope(J){return this.get(J)?.singletonScope||null}getToolsBySurface(J){if(!J)return[];return this.getAllTools().filter((Q)=>typeof Q.renderSurface==="function"&&Q.surfaces?.includes(J))}getContentDependentSupportIds(){let J=new Set;for(let Q of this.getAllTools()){if(!Q.requiresAuthoredContent)continue;for(let W of Q.pnpSupportIds||[])J.add(W)}return[...J].sort()}filterToolIdsByActivation(J,Q){return J.filter((W)=>this.getToolActivation(W)===Q)}filterVisibleInContext(J,Q){let W=[];for(let X of J){let z=this.get(X);if(!z){console.warn(`Tool '${X}' is allowed but not registered`);continue}if(!z.supportedLevels.includes(Q.level))continue;try{if(z.isVisibleInContext?.(Q))W.push(z)}catch(Z){console.error(`Error evaluating visibility for tool '${X}':`,Z)}}return W}isApplicableToAnyContext(J,Q){let W=this.get(J);if(!W?.isApplicableToContent)return!0;if(Q.length===0)return!0;return Q.some((X)=>{try{return W.isApplicableToContent?.(X)??!0}catch(z){return console.error(`Error evaluating applicability for tool '${J}':`,z),!0}})}getToolMetadata(){return this.getAllTools().map((J)=>({toolId:J.toolId,name:J.name,description:J.description,pnpSupportIds:J.pnpSupportIds||[],supportedLevels:J.supportedLevels,activation:J.activation||"toolbar-toggle",singletonScope:J.singletonScope||null,surfaces:J.surfaces||[],requiresAuthoredContent:Boolean(J.requiresAuthoredContent),contentDependencyDescription:J.requiresAuthoredContent?.description??null}))}generatePNPSupportsFromTools(J){let Q=new Set;for(let W of J){let X=this.get(W);if(X?.pnpSupportIds)for(let z of X.pnpSupportIds)Q.add(z)}return Array.from(Q)}clear(){let J=this.getAllToolIds();if(J.length===0)return;this.tools.clear(),this.pnpIndex.clear(),this.emitChange({kind:"clear",toolIds:J})}setComponentOverrides(J){if(this.componentOverrides===J)return;this.componentOverrides=J,this.emitChange({kind:"component-overrides",toolIds:[]})}setToolModuleLoaders(J){let Q=Object.entries(J).filter((X)=>X[1]!==void 0);for(let[X,z]of Q)if(Q7(X,"tool module loader id"),typeof z!=="function")throw Error(`Invalid tool module loader for "${X}": expected a function.`);let W=[];for(let[X,z]of Q){if(this.moduleLoaders.get(X)===z)continue;this.moduleLoaders.set(X,z),W.push(X)}if(W.length>0)this.emitChange({kind:"module-loaders",toolIds:W})}async ensureToolModuleLoaded(J){if(this.loadedToolModules.has(J))return;let Q=this.moduleLoadPromises.get(J);if(Q){await Q;return}let W=this.moduleLoaders.get(J);if(!W)return;let X=(async()=>{await W(),this.loadedToolModules.add(J)})();this.moduleLoadPromises.set(J,X);try{await X}finally{this.moduleLoadPromises.delete(J)}}async ensureToolModulesLoaded(J){await Promise.all(J.map((Q)=>this.ensureToolModuleLoaded(Q)))}isToolModuleLoaded(J){return this.loadedToolModules.has(J)}renderForToolbar(J,Q,W){let X=this.get(J);if(!X)throw Error(`Tool '${J}' is not registered`);if(typeof X.renderToolbar!=="function")throw Error(`Tool '${J}' has activation "${X.activation||"toolbar-toggle"}" and renders into a host surface, not a toolbar. Remove it from toolbar placement.`);let z={...W,componentOverrides:{...this.componentOverrides||{},...W.componentOverrides||{}}};return X.renderToolbar(Q,z)}renderForSurface(J,Q){let W=this.get(J);if(!W)throw Error(`Tool '${J}' is not registered`);if(typeof W.renderSurface!=="function")throw Error(`Tool '${J}' does not render into a host surface. Surface capabilities declare "surfaces" and implement "renderSurface".`);return W.renderSurface({...Q,componentOverrides:{...this.componentOverrides||{},...Q.componentOverrides||{}}})}}
|
|
51
|
+
export{d1 as b,k6 as c,B7 as d,H7 as e,Y8 as f,tJ as g,QJ as h,P0 as i,GJ as j,D8 as k,I8 as l,R8 as m,y7 as n,g7 as o,R as p,h as q,E6 as r,b6 as s,k8 as t,E8 as u,i7 as v,v8 as w,f8 as x,d8 as y,l8 as z,a8 as A,r8 as B,Q1 as C,W1 as D,i6 as E,o6 as F,r6 as G,V1 as H,w1 as I,S1 as J,x1 as K,W8 as L,X8 as M,VH as N,LH as O,OH as P,qJ as Q,CH as R,NH as S,p1 as T};
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { I18nProvider } from "@pie-players/pie-players-shared/i18n/types";
|
|
1
2
|
import type { LoaderConfig } from "@pie-players/pie-players-shared/loader-config";
|
|
2
3
|
import type { AccessibilityCatalogResolverApi, ElementToolStateStoreApi, HighlightCoordinatorApi, ToolCoordinatorApi, ToolkitCoordinatorApi, TtsServiceApi } from "../services/interfaces.js";
|
|
3
4
|
import type { TTSHighlightTargetResolver } from "../services/tts/highlight-target-resolver.js";
|
|
@@ -28,6 +29,33 @@ export interface AssessmentToolkitRuntimeContext {
|
|
|
28
29
|
* `runtime.ndsIcons` (or the `nds-icons` attribute on the toolkit).
|
|
29
30
|
*/
|
|
30
31
|
ndsIcons?: boolean;
|
|
32
|
+
/**
|
|
33
|
+
* Interface locale: the language this deployment renders its *own* UI in —
|
|
34
|
+
* toolbar labels, tool panels, `aria-label`s. Not the language of the
|
|
35
|
+
* authored content, which is a fact about the item and travels on `env`.
|
|
36
|
+
*
|
|
37
|
+
* A composition context in the sense of `composition-context.md`: the
|
|
38
|
+
* deployment knows it and no tool can. Sourced from the host's
|
|
39
|
+
* `runtime.locale` (or the `locale` attribute on the toolkit), defaulting to
|
|
40
|
+
* `en-US` with no host input — never `navigator.language`, because a
|
|
41
|
+
* rendered-string change reaches a host's live delivery on their next install
|
|
42
|
+
* with no build signal on their side.
|
|
43
|
+
*/
|
|
44
|
+
locale?: string;
|
|
45
|
+
/**
|
|
46
|
+
* The provider resolving {@link locale} to strings.
|
|
47
|
+
*
|
|
48
|
+
* Published here rather than constructed per tool so one catalog load serves
|
|
49
|
+
* every capability on the page, and so a host that supplies its own
|
|
50
|
+
* `I18nProvider` implementation reaches all of them. A tool that finds no
|
|
51
|
+
* context falls back to `getDefaultI18n()`, which is English-only and needs no
|
|
52
|
+
* publisher — the graceful default the pull pattern requires.
|
|
53
|
+
*
|
|
54
|
+
* The change signal is this context's own republish: the value re-derives when
|
|
55
|
+
* `locale` moves, so resolvers re-read instead of pinning the first provider
|
|
56
|
+
* they saw.
|
|
57
|
+
*/
|
|
58
|
+
i18n?: I18nProvider;
|
|
31
59
|
reportSessionChanged?: (itemId: string, detail: unknown) => void;
|
|
32
60
|
}
|
|
33
61
|
export declare const assessmentToolkitRuntimeContext: {
|
package/dist/index.d.ts
CHANGED
|
@@ -11,7 +11,7 @@ export type { TTSHighlightContext, TTSHighlightTargetResolver, TTSHighlightTarge
|
|
|
11
11
|
export { assessmentToolkitHostRuntimeContext, assessmentToolkitRegionScopeContext, assessmentToolkitRuntimeContext, assessmentToolkitShellContext, } from "./context/assessment-toolkit-context.js";
|
|
12
12
|
export { connectAssessmentToolkitHostRuntimeContext, connectAssessmentToolkitRegionScopeContext, connectAssessmentToolkitRuntimeContext, connectAssessmentToolkitShellContext, } from "./context/runtime-context-consumer.js";
|
|
13
13
|
export { catalogOwnerContextFor, type CatalogOwnerContext, type CatalogOwnerIdentity, type CatalogOwnerKind, type CatalogSourceEntity, } from "./services/catalog-owner.js";
|
|
14
|
-
export { PIE_INTERNAL_CONTENT_LOADED_EVENT, PIE_INTERNAL_ITEM_SESSION_CHANGED_EVENT, PIE_INTERNAL_ITEM_PLAYER_ERROR_EVENT, PIE_ITEM_SESSION_CHANGED_EVENT, PIE_REGISTER_EVENT, PIE_UNREGISTER_EVENT, type InternalContentLoadedDetail, type InternalItemSessionChangedDetail, type InternalItemPlayerErrorDetail, type ItemSessionChangedDetail, type RuntimeRegistrationDetail, type RuntimeRegistrationKind, } from "./runtime/registration-events.js";
|
|
14
|
+
export { PIE_INTERNAL_CONTENT_LOADED_EVENT, PIE_INTERNAL_FORMATIVE_ACTION_EVENT, PIE_INTERNAL_ITEM_SESSION_CHANGED_EVENT, PIE_INTERNAL_ITEM_PLAYER_ERROR_EVENT, PIE_INTERNAL_MEDIA_TIME_SOURCE_EVENT, PIE_ITEM_SESSION_CHANGED_EVENT, PIE_REGISTER_EVENT, PIE_UNREGISTER_EVENT, type InternalContentLoadedDetail, type InternalFormativeActionDetail, type InternalItemSessionChangedDetail, type InternalItemPlayerErrorDetail, type InternalMediaTimeSourceDetail, type ItemSessionChangedDetail, type RuntimeRegistrationDetail, type RuntimeRegistrationKind, } from "./runtime/registration-events.js";
|
|
15
15
|
export { connectToolRegionScopeContext, connectToolRuntimeContext, connectToolShellContext, createCrossBoundaryEvent, dispatchCrossBoundaryEvent, isContextValueDefined, } from "./runtime/tool-host-contract.js";
|
|
16
16
|
export type { AccessibilityCatalogResolverApi, ElementToolStateStoreApi, HighlightCoordinatorApi, I18nServiceApi, ThemeProviderApi, ToolCoordinatorApi, ToolkitCoordinatorApi, TtsServiceApi, ToolState, } from "./services/interfaces.js";
|
|
17
17
|
export type { CatalogCardForm, CatalogChangeEvent, CatalogChangeListener, CatalogChangeReason, CatalogLookupContext, CatalogLookupOptions, CatalogOwnerCard, CatalogOwnerRegistration, CatalogOwnerSnapshot, CatalogOwnerView, CatalogStatistics, CatalogType, ResolvedCatalog, } from "./services/AccessibilityCatalogResolver.js";
|
|
@@ -22,10 +22,13 @@ export type { Annotation } from "./services/HighlightCoordinator.js";
|
|
|
22
22
|
export { HighlightColor, HighlightCoordinator, HighlightType, } from "./services/HighlightCoordinator.js";
|
|
23
23
|
export type { SerializedRange } from "./services/RangeSerializer.js";
|
|
24
24
|
export { RangeSerializer } from "./services/RangeSerializer.js";
|
|
25
|
-
export type { I18nConfig,
|
|
25
|
+
export type { I18nConfig, I18nProvider, InterpolationValues, LocaleCode, MessageCatalog, MessageKeyInput, PluralOptions, TextDirection, } from "./services/I18nService.js";
|
|
26
26
|
export { I18nService } from "./services/I18nService.js";
|
|
27
27
|
export type { ResolvedToolContext, ToolbarContext, ToolContextResolver, ToolContextResolverContext, ToolContextResolverMap, ToolContextResolverResult, ToolActivation, ToolContentDependency, ToolContentDependencyContext, ToolModuleLoader, ToolRegistryChangeEvent, ToolRegistryChangeKind, ToolRegistryChangeListener, ToolSingletonScope, ToolSurfaceRenderContext, ToolSurfaceRenderResult, ToolSurfaceServices, ToolToolbarButtonDefinition, ToolToolbarRenderResult, ToolWindowShellAction, ToolWindowShellAlign, ToolWindowShellConfig, ToolWindowShellContentConfig, ToolRegistration, } from "./services/ToolRegistry.js";
|
|
28
28
|
export { ToolRegistry } from "./services/ToolRegistry.js";
|
|
29
|
+
export type { ToolOpenRequest, ToolRequestTarget, } from "./services/tool-request.js";
|
|
30
|
+
export { DEFAULT_TOOL_REQUEST_LEVEL } from "./services/tool-request.js";
|
|
31
|
+
export type { ToolSelectionAction, ToolSelectionContext, } from "./services/selection-action.js";
|
|
29
32
|
export type { AssessmentToolContext, BaseToolContext, ElementToolContext, ItemToolContext, PassageToolContext, RubricToolContext, SectionToolContext, ToolContext, ToolLevel, } from "./services/tool-context.js";
|
|
30
33
|
export { extractTextContent, hasChoiceInteraction, hasMathContent, hasReadableText, isAssessmentContext, isElementContext, isItemContext, isPassageContext, isRubricContext, isSectionContext, } from "./services/tool-context.js";
|
|
31
34
|
export { DEFAULT_TOOL_PLACEMENT } from "./services/createDefaultToolRegistry.js";
|
|
@@ -35,7 +38,7 @@ export { createEmptyPersonalNeedsProfile } from "./services/defaultPersonalNeeds
|
|
|
35
38
|
export type { ToolComponentFactory, ToolComponentFactoryMap, ToolComponentOverrides, ToolTagMap, } from "./tools/tool-tag-map.js";
|
|
36
39
|
export { createToolElement, resolveToolTag, toToolIdFromTag, } from "./tools/tool-tag-map.js";
|
|
37
40
|
export { ALL_STANDARD_ACCESS_FEATURES, EXAMPLE_PNP_CONFIGURATIONS, getFeatureCategory, getFeaturesInCategory, isStandardAccessFeature, QTI_STANDARD_ACCESS_FEATURES, } from "./services/pnp-standard-features.js";
|
|
38
|
-
export { applyMediaFragment, isSafeMediaSrc, normalizeMediaFragment, normalizeMediaSources, trimmedOrUndefined, } from "./services/catalog-media.js";
|
|
41
|
+
export { applyMediaFragment, enforceMediaFragment, isSafeMediaSrc, isUnsupportedMediaAssetVersion, normalizeMediaFragment, normalizeMediaSources, SUPPORTED_MEDIA_ASSET_VERSION, trimmedOrUndefined, } from "./services/catalog-media.js";
|
|
39
42
|
export type { SpokenAudioMedia } from "./services/spoken-audio-cards.js";
|
|
40
43
|
export { resolveSpokenAudioMedia, SPOKEN_CATALOG_TYPE, } from "./services/spoken-audio-cards.js";
|
|
41
44
|
export type { ExtractionResult } from "./services/SSMLExtractor.js";
|
|
@@ -60,6 +63,7 @@ export { createScopedToolId, parseScopedToolId, toOverlayToolId, } from "./servi
|
|
|
60
63
|
export type { TTSConfig } from "./services/TTSService.js";
|
|
61
64
|
export { PlaybackState, TTSService } from "./services/TTSService.js";
|
|
62
65
|
export { PIE_TTS_CONTROL_HANDOFF_EVENT, type TTSControlHandoffDetail, } from "./services/tts-control-events.js";
|
|
66
|
+
export { bindTtsAudioHandoff, pauseTtsForMediaAudio, } from "./services/audio-handoff.js";
|
|
63
67
|
export { BrowserTTSProvider } from "./services/tts/browser-provider.js";
|
|
64
68
|
export type { SREMathSpeechOptions } from "./services/tts/math-speech.js";
|
|
65
69
|
export type { NormalizedTTSSpeedOption, TTSHostToolbarLayout, TTSLayoutMode, TTSRuntimeSettings, TTSSpeedOption, TTSSpeedOptionConfig, } from "./services/tts-runtime-config.js";
|
package/dist/index.js
CHANGED
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
export { assessmentToolkitHostRuntimeContext, assessmentToolkitRegionScopeContext, assessmentToolkitRuntimeContext, assessmentToolkitShellContext, } from "./context/assessment-toolkit-context.js";
|
|
10
10
|
export { connectAssessmentToolkitHostRuntimeContext, connectAssessmentToolkitRegionScopeContext, connectAssessmentToolkitRuntimeContext, connectAssessmentToolkitShellContext, } from "./context/runtime-context-consumer.js";
|
|
11
11
|
export { catalogOwnerContextFor, } from "./services/catalog-owner.js";
|
|
12
|
-
export { PIE_INTERNAL_CONTENT_LOADED_EVENT, PIE_INTERNAL_ITEM_SESSION_CHANGED_EVENT, PIE_INTERNAL_ITEM_PLAYER_ERROR_EVENT, PIE_ITEM_SESSION_CHANGED_EVENT, PIE_REGISTER_EVENT, PIE_UNREGISTER_EVENT, } from "./runtime/registration-events.js";
|
|
12
|
+
export { PIE_INTERNAL_CONTENT_LOADED_EVENT, PIE_INTERNAL_FORMATIVE_ACTION_EVENT, PIE_INTERNAL_ITEM_SESSION_CHANGED_EVENT, PIE_INTERNAL_ITEM_PLAYER_ERROR_EVENT, PIE_INTERNAL_MEDIA_TIME_SOURCE_EVENT, PIE_ITEM_SESSION_CHANGED_EVENT, PIE_REGISTER_EVENT, PIE_UNREGISTER_EVENT, } from "./runtime/registration-events.js";
|
|
13
13
|
export { connectToolRegionScopeContext, connectToolRuntimeContext, connectToolShellContext, createCrossBoundaryEvent, dispatchCrossBoundaryEvent, isContextValueDefined, } from "./runtime/tool-host-contract.js";
|
|
14
14
|
export { AccessibilityCatalogResolver, catalogCardForm, isKnownCatalogType, KNOWN_CATALOG_TYPES, } from "./services/AccessibilityCatalogResolver.js";
|
|
15
15
|
// Context Variable Store (QTI 3.0 Context Declarations)
|
|
@@ -20,6 +20,7 @@ export { HighlightColor, HighlightCoordinator, HighlightType, } from "./services
|
|
|
20
20
|
export { RangeSerializer } from "./services/RangeSerializer.js";
|
|
21
21
|
export { I18nService } from "./services/I18nService.js";
|
|
22
22
|
export { ToolRegistry } from "./services/ToolRegistry.js";
|
|
23
|
+
export { DEFAULT_TOOL_REQUEST_LEVEL } from "./services/tool-request.js";
|
|
23
24
|
export { extractTextContent, hasChoiceInteraction, hasMathContent, hasReadableText, isAssessmentContext, isElementContext, isItemContext, isPassageContext, isRubricContext, isSectionContext, } from "./services/tool-context.js";
|
|
24
25
|
export { DEFAULT_TOOL_PLACEMENT } from "./services/createDefaultToolRegistry.js";
|
|
25
26
|
export { createToolsConfig } from "./services/create-tools-config.js";
|
|
@@ -32,7 +33,7 @@ export { ALL_STANDARD_ACCESS_FEATURES, EXAMPLE_PNP_CONFIGURATIONS, getFeatureCat
|
|
|
32
33
|
// the public surface through `sign-language-cards.js` until signing moved to
|
|
33
34
|
// `@pie-players/pie-tool-sign-language`; it is exported from its own module now,
|
|
34
35
|
// alongside the validators a capability package needs to read a media payload.
|
|
35
|
-
export { applyMediaFragment, isSafeMediaSrc, normalizeMediaFragment, normalizeMediaSources, trimmedOrUndefined, } from "./services/catalog-media.js";
|
|
36
|
+
export { applyMediaFragment, enforceMediaFragment, isSafeMediaSrc, isUnsupportedMediaAssetVersion, normalizeMediaFragment, normalizeMediaSources, SUPPORTED_MEDIA_ASSET_VERSION, trimmedOrUndefined, } from "./services/catalog-media.js";
|
|
36
37
|
export { resolveSpokenAudioMedia, SPOKEN_CATALOG_TYPE, } from "./services/spoken-audio-cards.js";
|
|
37
38
|
export { SSMLExtractor } from "./services/SSMLExtractor.js";
|
|
38
39
|
export { ThemeProvider } from "./services/ThemeProvider.js";
|
|
@@ -47,6 +48,7 @@ export { frameworkErrorFromToolConfigValidation, normalizeAndValidateToolsConfig
|
|
|
47
48
|
export { createScopedToolId, parseScopedToolId, toOverlayToolId, } from "./services/tool-instance-id.js";
|
|
48
49
|
export { PlaybackState, TTSService } from "./services/TTSService.js";
|
|
49
50
|
export { PIE_TTS_CONTROL_HANDOFF_EVENT, } from "./services/tts-control-events.js";
|
|
51
|
+
export { bindTtsAudioHandoff, pauseTtsForMediaAudio, } from "./services/audio-handoff.js";
|
|
50
52
|
export { BrowserTTSProvider } from "./services/tts/browser-provider.js";
|
|
51
53
|
export { DEFAULT_TTS_SPEED_OPTIONS, formatTTSSpeedOptionsAsText, normalizeTTSLayoutMode, normalizeTTSSpeedControlOptions, normalizeTTSSpeedOptionConfigs, normalizeTTSSpeedOptions, parseTTSSpeedOptionsFromText, resolveTTSHostToolbarLayout, resolveTTSLayoutMode, resolveTTSRuntimeSettings, } from "./services/tts-runtime-config.js";
|
|
52
54
|
export { createFetchItemLoader, createLoadItem, ItemLoadError, } from "./item-loader.js";
|
|
@@ -141,6 +141,20 @@ export function composeDecision(inputs) {
|
|
|
141
141
|
value: decision.value,
|
|
142
142
|
});
|
|
143
143
|
}
|
|
144
|
+
// A support id no registration claims resolves to itself and then matches
|
|
145
|
+
// nothing placed, so the capability is absent with no trace of why — the
|
|
146
|
+
// failure a host sending its own vocabulary instead of an AfA/QTI feature
|
|
147
|
+
// id actually hits. Reported per decision rather than at config time
|
|
148
|
+
// because the ids arrive with the profile, not with the tools config.
|
|
149
|
+
for (const supportId of pnpPolicyResult.unmappedSupportIds) {
|
|
150
|
+
diagnostics.push({
|
|
151
|
+
code: "tool-policy.unknownSupportId",
|
|
152
|
+
level: request.level,
|
|
153
|
+
toolId: supportId,
|
|
154
|
+
message: `No registered tool claims PNP support id "${supportId}"; it was carried through as a feature id and matched nothing. Expected an AfA 3.0 / QTI 3.0 access feature id.`,
|
|
155
|
+
source: "pnp.pnp-support",
|
|
156
|
+
});
|
|
157
|
+
}
|
|
144
158
|
// 5a — remove PNP/profile-blocked tools from the candidate set.
|
|
145
159
|
candidates = candidates.filter((toolId) => {
|
|
146
160
|
return !pnpPolicyResult.blockedToolIds.has(toolId);
|