mates 0.4.0-beta.5 → 0.4.0-beta.6
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/dist/index.esm.js +8 -8
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +10 -10
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.esm.js
CHANGED
|
@@ -106,20 +106,20 @@ ${s}</pre
|
|
|
106
106
|
>
|
|
107
107
|
</details>`:null}
|
|
108
108
|
</div>
|
|
109
|
-
`;i.__isErrorView__=!0,i.skipDevToolsRender=!0,this.view=i,this.name=e,this._errorState=t}}an()&&window.addEventListener("mates:component-hot-update",t=>{const e=new Set(t.detail??[]);0!==e.size&&document.querySelectorAll("x-view").forEach(t=>{if(!(t instanceof un))return;const n=function(t){if(!an())return null;const e=t?.__mates_hmr_id;return"string"==typeof e?e:null}(t.view);n&&e.has(n)&&t._hotRefresh()})}),customElements.get("x-view")||customElements.define("x-view",un);class dn extends HTMLElement{constructor(){super(...arguments),this._onRequestContext=t=>{const e=t,n=e.detail?.context.id;n&&null!=this.id&&n===this.id&&(e.stopPropagation(),e.detail.resolve(this._value))}}connectedCallback(){this.addEventListener("request-context",this._onRequestContext)}set context(t){this.id=t.id}disconnectedCallback(){this.removeEventListener("request-context",this._onRequestContext)}set value(t){this._value=t}get value(){return this._value}}function fn(t){let e=-1===t.indexOf("\0")?t:t.replace(/\0/g,"");const n=function(t){const e=t.indexOf("{"),n=t.indexOf("}");return-1===e&&-1===n?-1:-1===e?n:-1===n?e:Math.min(e,n)}(e);return-1!==n&&(e=e.slice(0,n)),/url\s*\(/i.test(e)&&(e=e.replace(/\burl\s*\(\s*(['"]?)\s*(?:javascript:|vbscript:|data:text\/html[,;])/gi,"url($1")),e}function pn(t){return t.length>0&&/^[a-zA-Z-]+$/.test(t)}customElements.get("x-provider")||customElements.define("x-provider",dn);let mn=0;function _n(){return`_m${(mn++).toString(36)}`}const gn=Object.create(null),yn={sm:"640px",md:"768px",lg:"1024px",xl:"1280px","2xl":"1536px"};function wn(t){t.breakpoints&&Object.assign(yn,t.breakpoints)}function vn(t){const e=gn[t];if(void 0!==e)return e;const n=t.startsWith("--")?t:t.replace(/[A-Z]/g,t=>`-${t.toLowerCase()}`);return gn[t]=n,n}function bn(t,e,n){if(!n)return`.${t} {\n${e}}`;if(n.startsWith("&")){return`.${t}${n.slice(1)} {\n${e}}`}return`${n} {\n .${t} {\n${e.replace(/^ {2}/gm," ")} }\n}`}function Sn(t){return t.startsWith("&")||t.startsWith("@media")?t:Object.prototype.hasOwnProperty.call(yn,t)?`@media (min-width: ${yn[t]})`:null}function En(t,e,n){const s=Object.create(null);for(const i in t){const o=t[i];let r="",a=null;for(const t in o){const e=o[t];if(null!=e){if("object"==typeof e&&!Array.isArray(e)){const n=Sn(t);if(null===n)throw new Error(`[css-in-js] Unknown nested key "${t}" in block "${i}". Use "&:pseudo", "@media (...)", or a configured breakpoint key.`);let s="";const o=e;for(const t in o){const e=o[t];null!=e&&(pn(t)?s+=` ${vn(t)}: ${fn(String(e))};\n`:console.warn(`[css-in-js] invalid property name skipped: "${t}"`))}s.length>0&&(null===a&&(a=[]),a.push([s,n]));continue}pn(t)?r+=` ${vn(t)}: ${fn(String(e))};\n`:console.warn(`[css-in-js] invalid property name skipped: "${t}"`)}}if(0===r.length&&null===a){s[i]="";continue}const l=n?.literal?i:`${i}${_n()}`;if(r.length>0&&e.push(bn(l,r,"")),null!==a)for(let t=0;t<a.length;t++)e.push(bn(l,a[t][0],a[t][1]));s[i]=l}return s}function Cn(t){return Object.freeze(t)}var An,kn,Mn,xn,$n,Tn,Rn,On;function In(t){if(oe.templateInProgress)throw new Error(`[css-in-js] ${t}() must be called at module level, not inside a template function.`);if(oe.viewOuterInProgress)throw new Error(`[css-in-js] ${t}() must be called at module level, not inside a component outer function. Move it outside the component function.`);if(oe.setupInProgress)throw new Error(`[css-in-js] ${t}() must be called at module level, not inside a setup function.`)}let Pn=0;function zn(t){return`${t}_kf${(Pn++).toString(36)}`}function Dn(t,e){let n="";for(const t in e){const s=e[t];let i="";for(const t in s){const e=s[t];if(null==e)continue;const n=t.startsWith("--")?t:t.replace(/[A-Z]/g,t=>`-${t.toLowerCase()}`);i+=` ${n}: ${String(e)};\n`}i&&(n+=` ${t} {\n${i} }\n`)}return`@keyframes ${t} {\n${n}}`}const Nn=new Set;function Ln(){return""}class jn{constructor(){An.add(this),kn.set(this,""),Mn.set(this,0),xn.set(this,null),$n.set(this,[]),Nn.add(this)}keyframes(t,e){const n=zn(t);return this.appendRules(Dn(n,e)),n}appendRules(t){""!==t&&(ge(this,$n,"f").push(t),ge(this,Mn,"f")>0&&ge(this,An,"m",Tn).call(this))}mount(){var t;ye(this,Mn,(t=ge(this,Mn,"f"),++t),"f"),1===ge(this,Mn,"f")&&(ge(this,An,"m",Tn).call(this),ge(this,xn,"f")||ge(this,An,"m",Rn).call(this))}unmount(){var t;ge(this,Mn,"f")<=0||(ye(this,Mn,(t=ge(this,Mn,"f"),--t),"f"),0===ge(this,Mn,"f")&&ge(this,An,"m",On).call(this))}get refCount(){return ge(this,Mn,"f")}get cssText(){return ge(this,kn,"f")}get isMounted(){return ge(this,Mn,"f")>0}get sheet(){return ge(this,xn,"f")}getAllCSS(){const t=[];return ge(this,kn,"f")&&t.push(ge(this,kn,"f")),ge(this,$n,"f").length>0&&t.push(ge(this,$n,"f").join("\n")),t.join("\n")}}function Un(){if(In("stylesheet"),Pe())return{css:()=>({}),mount:()=>{},keyframes:()=>""};const t=new jn;return{css:function(e){In("css");const n=[],s=En(e,n);return n.length>0&&t.appendRules(n.join("\n")),Cn(s)},mount:function(){if(function(t){if(oe.templateInProgress)throw new Error(`[css-in-js] ${t}() must not be called inside a template function. Call it in the component outer function or at module level.`)}("mount"),null===Me(!1))return t.mount(),()=>t.unmount();Ge(()=>(t.mount(),()=>t.unmount()))},keyframes:function(e,n){return In("keyframes"),t.keyframes(e,n)}}}kn=new WeakMap,Mn=new WeakMap,xn=new WeakMap,$n=new WeakMap,An=new WeakSet,Tn=function(){if(0===ge(this,$n,"f").length)return;const t=ge(this,$n,"f").join("\n");ye(this,$n,[],"f"),ye(this,kn,ge(this,kn,"f")+(ge(this,kn,"f")?"\n":"")+t,"f"),ge(this,An,"m",Rn).call(this)},Rn=function(){ge(this,xn,"f")||(ye(this,xn,new CSSStyleSheet,"f"),document.adoptedStyleSheets=[...document.adoptedStyleSheets,ge(this,xn,"f")]),ge(this,xn,"f").replaceSync(ge(this,kn,"f"))},On=function(){ge(this,xn,"f")&&(document.adoptedStyleSheets=document.adoptedStyleSheets.filter(t=>t!==ge(this,xn,"f")),ye(this,xn,null,"f")),ge(this,kn,"f")&&(ge(this,$n,"f").unshift(ge(this,kn,"f")),ye(this,kn,"","f"))};let Fn=null,Vn=!1;function Wn(){return Fn||(Fn=new jn),Fn}function Bn(){Fn||(Fn=new jn),Vn||(Vn=!0,queueMicrotask(()=>{Vn=!1,Fn.mount()}))}function Hn(t,e){if(In("keyframes"),Pe())return t;Bn();const n=zn(t);return Fn.appendRules(Dn(n,e)),n}function Yn(t,e){if(In("globalCSS"),Pe())return{};Bn();const n=[],s=En(t,n,e);return n.length>0&&Fn.appendRules(n.join("\n")),Cn(s)}function qn(t){In("globalRawCSS"),Bn(),Fn.appendRules(t)}let Xn=!1;function Zn(){Xn||(Xn=!0,qn('\n[class*="mates-"] {\n --mates-duration : 300ms;\n --mates-easing : ease;\n --mates-distance : 24px;\n animation-duration : var(--mates-duration);\n animation-timing-function : var(--mates-easing);\n animation-fill-mode : both;\n}\n'),qn("\n@keyframes mates-kf-fade-in { from { opacity: 0 } to { opacity: 1 } }\n@keyframes mates-kf-fade-out { from { opacity: 1 } to { opacity: 0 } }\n\n@keyframes mates-kf-slide-in-up {\n from { opacity: 0; transform: translateY(var(--mates-distance)) }\n to { opacity: 1; transform: translateY(0) }\n}\n@keyframes mates-kf-slide-out-up {\n from { opacity: 1; transform: translateY(0) }\n to { opacity: 0; transform: translateY(calc(-1 * var(--mates-distance))) }\n}\n@keyframes mates-kf-slide-in-down {\n from { opacity: 0; transform: translateY(calc(-1 * var(--mates-distance))) }\n to { opacity: 1; transform: translateY(0) }\n}\n@keyframes mates-kf-slide-out-down {\n from { opacity: 1; transform: translateY(0) }\n to { opacity: 0; transform: translateY(var(--mates-distance)) }\n}\n@keyframes mates-kf-slide-in-left {\n from { opacity: 0; transform: translateX(var(--mates-distance)) }\n to { opacity: 1; transform: translateX(0) }\n}\n@keyframes mates-kf-slide-out-left {\n from { opacity: 1; transform: translateX(0) }\n to { opacity: 0; transform: translateX(calc(-1 * var(--mates-distance))) }\n}\n@keyframes mates-kf-slide-in-right {\n from { opacity: 0; transform: translateX(calc(-1 * var(--mates-distance))) }\n to { opacity: 1; transform: translateX(0) }\n}\n@keyframes mates-kf-slide-out-right {\n from { opacity: 1; transform: translateX(0) }\n to { opacity: 0; transform: translateX(var(--mates-distance)) }\n}\n\n@keyframes mates-kf-scale-in {\n from { opacity: 0; transform: scale(0.92) }\n to { opacity: 1; transform: scale(1) }\n}\n@keyframes mates-kf-scale-out {\n from { opacity: 1; transform: scale(1) }\n to { opacity: 0; transform: scale(0.92) }\n}\n\n@keyframes mates-kf-spring-in {\n from { opacity: 0; transform: scale(0.92) }\n to { opacity: 1; transform: scale(1) }\n}\n\n@keyframes mates-kf-flip-in-x {\n from { opacity: 0; transform: rotateX(90deg) }\n to { opacity: 1; transform: rotateX(0deg) }\n}\n@keyframes mates-kf-flip-in-y {\n from { opacity: 0; transform: rotateY(90deg) }\n to { opacity: 1; transform: rotateY(0deg) }\n}\n\n@keyframes mates-kf-blur-in {\n from { opacity: 0; filter: blur(10px) }\n to { opacity: 1; filter: blur(0) }\n}\n@keyframes mates-kf-blur-out {\n from { opacity: 1; filter: blur(0) }\n to { opacity: 0; filter: blur(10px) }\n}\n\n@keyframes mates-kf-shake {\n 0%, 100% { transform: translateX(0) }\n 15% { transform: translateX(calc(-1 * var(--mates-distance))) }\n 30% { transform: translateX(calc( 1 * var(--mates-distance))) }\n 45% { transform: translateX(calc(-0.6 * var(--mates-distance))) }\n 60% { transform: translateX(calc( 0.6 * var(--mates-distance))) }\n 75% { transform: translateX(calc(-0.3 * var(--mates-distance))) }\n 90% { transform: translateX(calc( 0.3 * var(--mates-distance))) }\n}\n\n@keyframes mates-kf-pulse {\n 0%, 100% { transform: scale(1) }\n 50% { transform: scale(1.08) }\n}\n\n@keyframes mates-kf-bounce {\n 0% { transform: translateY(0) }\n 20% { transform: translateY(calc(-0.40 * var(--mates-distance))) }\n 40% { transform: translateY(0) }\n 60% { transform: translateY(calc(-0.20 * var(--mates-distance))) }\n 80% { transform: translateY(0) }\n 90% { transform: translateY(calc(-0.08 * var(--mates-distance))) }\n 100% { transform: translateY(0) }\n}\n\n@keyframes mates-kf-spin {\n from { transform: rotate(0deg) }\n to { transform: rotate(360deg) }\n}\n"),Yn({"mates-fade-in":{animationName:"mates-kf-fade-in"},"mates-fade-out":{animationName:"mates-kf-fade-out"},"mates-slide-in-up":{animationName:"mates-kf-slide-in-up"},"mates-slide-out-up":{animationName:"mates-kf-slide-out-up"},"mates-slide-in-down":{animationName:"mates-kf-slide-in-down"},"mates-slide-out-down":{animationName:"mates-kf-slide-out-down"},"mates-slide-in-left":{animationName:"mates-kf-slide-in-left"},"mates-slide-out-left":{animationName:"mates-kf-slide-out-left"},"mates-slide-in-right":{animationName:"mates-kf-slide-in-right"},"mates-slide-out-right":{animationName:"mates-kf-slide-out-right"},"mates-scale-in":{animationName:"mates-kf-scale-in"},"mates-scale-out":{animationName:"mates-kf-scale-out"},"mates-spring-in":{animationName:"mates-kf-spring-in","--mates-easing":"cubic-bezier(0.34, 1.56, 0.64, 1)"},"mates-flip-in-x":{animationName:"mates-kf-flip-in-x"},"mates-flip-in-y":{animationName:"mates-kf-flip-in-y"},"mates-blur-in":{animationName:"mates-kf-blur-in"},"mates-blur-out":{animationName:"mates-kf-blur-out"},"mates-shake":{animationName:"mates-kf-shake","--mates-duration":"500ms","--mates-easing":"ease-in-out"},"mates-pulse":{animationName:"mates-kf-pulse","--mates-duration":"600ms","--mates-easing":"ease-in-out"},"mates-bounce":{animationName:"mates-kf-bounce","--mates-duration":"700ms"},"mates-spin":{animationName:"mates-kf-spin","--mates-easing":"linear"}},{literal:!0}))}const Gn={fadeIn:"mates-fade-in",fadeOut:"mates-fade-out",slideInUp:"mates-slide-in-up",slideOutUp:"mates-slide-out-up",slideInDown:"mates-slide-in-down",slideOutDown:"mates-slide-out-down",slideInLeft:"mates-slide-in-left",slideOutLeft:"mates-slide-out-left",slideInRight:"mates-slide-in-right",slideOutRight:"mates-slide-out-right",scaleIn:"mates-scale-in",scaleOut:"mates-scale-out",springIn:"mates-spring-in",flipInX:"mates-flip-in-x",flipInY:"mates-flip-in-y",blurIn:"mates-blur-in",blurOut:"mates-blur-out",shake:"mates-shake",pulse:"mates-pulse",bounce:"mates-bounce",spin:"mates-spin"};function Kn(t){ae("Action");let e=t;const n=new Set;let s=null,i=null;const o=t=>{n.forEach(e=>{try{e(t)}catch(t){console.error(t)}})},r=Object.assign(function(...t){return((t,n)=>{try{let r;return r=s?s((...n)=>e.call(t,...n),...n):e.call(t,...n),i&&(r=i(r)),o(r),r}catch(t){const e=t instanceof Error?t:new Error(String(t));throw o(void 0),e}})(this,t)},{val:()=>e,set:t=>{e=t},__isAction___:!0,__subscribe:t=>(ae("subscribe"),n.add(t),()=>n.delete(t)),interceptBefore:t=>{s=t},interceptAfter:t=>{i=t}});return r}function Qn(t=300,e="ease"){return{keyframes:[{opacity:0},{opacity:1}],options:{duration:t,easing:e,fill:"both"}}}function Jn(t=300,e="ease"){return{keyframes:[{opacity:1},{opacity:0}],options:{duration:t,easing:e,fill:"both"}}}Zn();const ts={up:"translateY(-100%)",down:"translateY(100%)",left:"translateX(-100%)",right:"translateX(100%)"};function es(t="up",e,n=400,s="cubic-bezier(0.4, 0, 0.2, 1)"){return{keyframes:[{transform:e?ss(t,e):ts[t],opacity:0},{transform:"translate(0, 0)",opacity:1}],options:{duration:n,easing:s,fill:"both"}}}function ns(t="down",e,n=400,s="cubic-bezier(0.4, 0, 0.2, 1)"){return{keyframes:[{transform:"translate(0, 0)",opacity:1},{transform:e?ss(t,e):ts[t],opacity:0}],options:{duration:n,easing:s,fill:"both"}}}function ss(t,e){switch(t){case"up":return`translateY(-${e})`;case"down":return`translateY(${e})`;case"left":return`translateX(-${e})`;case"right":return`translateX(${e})`}}function is(t=0,e=300,n="cubic-bezier(0.4, 0, 0.2, 1)"){return{keyframes:[{transform:`scale(${t})`,opacity:0},{transform:"scale(1)",opacity:1}],options:{duration:e,easing:n,fill:"both"}}}function os(t=0,e=300,n="cubic-bezier(0.4, 0, 0.2, 1)"){return{keyframes:[{transform:"scale(1)",opacity:1},{transform:`scale(${t})`,opacity:0}],options:{duration:e,easing:n,fill:"both"}}}function rs(t=1,e=600,n="linear"){return{keyframes:[{transform:"rotate(0deg)"},{transform:`rotate(${360*t}deg)`}],options:{duration:e,easing:n,fill:"both"}}}function as(t=600){return{keyframes:[{transform:"translateY(0)",offset:0},{transform:"translateY(-30%)",offset:.3},{transform:"translateY(0)",offset:.5},{transform:"translateY(-15%)",offset:.7},{transform:"translateY(0)",offset:.85},{transform:"translateY(-5%)",offset:.95},{transform:"translateY(0)",offset:1}],options:{duration:t,easing:"ease",fill:"both"}}}function ls(t=500,e="cubic-bezier(0.34, 1.56, 0.64, 1)"){return{keyframes:[{transform:"scale(0)",opacity:0},{transform:"scale(1)",opacity:1}],options:{duration:t,easing:e,fill:"both"}}}function cs(t=10,e=400){return{keyframes:[{transform:"translateX(0)"},{transform:`translateX(-${t}px)`},{transform:`translateX(${t}px)`},{transform:`translateX(-${t}px)`},{transform:`translateX(${t}px)`},{transform:"translateX(0)"}],options:{duration:e,easing:"ease-in-out",fill:"both"}}}function hs(t=1.05,e=400){return{keyframes:[{transform:"scale(1)"},{transform:`scale(${t})`},{transform:"scale(1)"}],options:{duration:e,easing:"ease-in-out",fill:"both"}}}function us(t="y",e=500,n="ease-out"){const s="x"===t?"rotateX":"rotateY";return{keyframes:[{transform:`${s}(90deg)`,opacity:0},{transform:`${s}(0deg)`,opacity:1}],options:{duration:e,easing:n,fill:"both"}}}function ds(t="y",e=500,n="ease-in"){const s="x"===t?"rotateX":"rotateY";return{keyframes:[{transform:`${s}(0deg)`,opacity:1},{transform:`${s}(90deg)`,opacity:0}],options:{duration:e,easing:n,fill:"both"}}}function fs(t=10,e=400,n="ease-out"){return{keyframes:[{filter:`blur(${t}px)`,opacity:0},{filter:"blur(0px)",opacity:1}],options:{duration:e,easing:n,fill:"both"}}}function ps(t=10,e=400,n="ease-in"){return{keyframes:[{filter:"blur(0px)",opacity:1},{filter:`blur(${t}px)`,opacity:0}],options:{duration:e,easing:n,fill:"both"}}}function ms(t=500,e="cubic-bezier(0.4, 0, 0.2, 1)"){return{keyframes:[{width:"0",overflow:"hidden"},{width:"auto",overflow:"hidden"}],options:{duration:t,easing:e,fill:"both"}}}function _s(t=500,e="cubic-bezier(0.4, 0, 0.2, 1)"){return{keyframes:[{width:"auto",overflow:"hidden"},{width:"0",overflow:"hidden"}],options:{duration:t,easing:e,fill:"both"}}}function gs(t,e,n=50){return{keyframes:t.keyframes,options:{...t.options,delay:(t.options.delay??0)+e*n}}}function ys(t){if(null==t||"object"!=typeof t)return t;try{return Object.keys(t).forEach(e=>{"object"!=typeof t[e]||null===t[e]||Object.isFrozen(t[e])||ys(t[e])}),Object.freeze(t)}catch(t){console.error(t)}}function ws(t,e,n){const s=ne();let i;Qt();try{i=t()}finally{Jt();se(s).forEach(t=>{"function"==typeof t.__subscribe&&e(t,n)})}return i}function vs(t,e){if(ae(t),"AsyncFunction"===e.constructor.name)throw new Error(`${t.toLowerCase()}() does not support async functions.`);if(Gt())throw new Error(`${t.toLowerCase()}() cannot be nested inside an effect() or memo().`)}function bs(t){const{name:e,fn:n,onRun:s,supportsCleanup:i}=t;vs(e,n);const o=new Set;let r,a=!1;const l=()=>{if(i&&r){try{r()}catch(t){console.error("Error in effect cleanup:",t)}r=void 0}},c=()=>{if(a)return;l();const t=new Set(o);o.clear();const e=()=>{a||Ye.schedule(c)};let h;try{h=ws(n,t=>{o.add(t.__subscribe(e))},e)}finally{t.forEach(t=>t())}if(a)return o.forEach(t=>t()),void o.clear();i&&"function"==typeof h&&(r=h),s(h)},h=()=>{a||(a=!0,l(),o.forEach(t=>t()),o.clear())};return c(),xe(n,h),h}let Ss=0;function Es(t,e){if("function"==typeof t){const e=t;let n;const s=Symbol("skip");return bs({name:"Memo",fn:()=>{try{return e()}catch(t){return console.error("[atom] Error in derived function:",t),s}},onRun:t=>{t!==s&&(n?(n.unlock("initial"),n.set(()=>t),n.lock("initial")):(n=As(t,{skipRestrictedContextCheck:!0}),n.lock("initial")))}}),n}e?.skipRestrictedContextCheck||ae("Atom");let n=t;const s=++Ss,i=new Se;function o(){return nn(o,!1),Xt()&&Kt(o),n}return o.get=function(){return o()},o.set=function(t,e=!1){var r,a;n="function"==typeof t?t(n):t,o.skipDevToolsLog||(r=String(s),a=n,jt.logAtomSet(r,a)),e||i.notify()},o.update=function(t,e=!1){var r;"object"==typeof n&&null!==n&&(t(n),o.skipDevToolsLog||(r=String(s),jt.logAtomUpdate(r)),e||i.notify())},o.__subscribe=function(t){return i.subscribe(t)},o.toJSON=function(){return JSON.stringify(n)},Object.defineProperty(o,"name",{value:"atom",writable:!0,configurable:!0,enumerable:!1}),Object.defineProperty(o,"val",{get:()=>o(),set:t=>o.set(t),enumerable:!1,configurable:!0}),Object.defineProperty(o,"__version__",{get:()=>i.getVersion(),enumerable:!1}),Object.defineProperty(o,"__isAtom___",{value:!0,writable:!1,enumerable:!1}),Object.defineProperty(o,"__id__",{value:s,writable:!1,enumerable:!1}),o}function Cs(t,e){e?.skipRestrictedContextCheck||ae("iAtom");const n=Es(ks(t),{skipRestrictedContextCheck:!0}),s=n.set;n.set=function(t,e=!1){const i="function"==typeof t?t(n.get()):t;s(ks(i),e)};const i=n;return delete i.update,i.name="iAtom",i}function As(t,e={}){e.skipRestrictedContextCheck||ae("superAtom"),Xe();const n=e.freeze??!1,s=n?ks(Ms(t)):t;let i=!1,o="default";const r=Es(n?ks(t):t,{skipRestrictedContextCheck:!0}),a=r.set;r.set=function(t,e=!1){if(i)return void me("Cannot mutate a locked atom.","superAtom");const s="function"==typeof t?t(r.get()):t;a(n?ks(s):s,e)};const l=r.update;r.update=function(t,e=!1){if(i)me("Cannot mutate a locked atom.","superAtom");else{if(n)throw new Error("update() is not supported when freeze is enabled — use set() with a new value.");l(t,e)}};const c=r;return c.lock=function(t="default"){i=!0,o=t},c.unlock=function(t="default"){if(o!==t)throw new Error("Incorrect passcode. Cannot unlock atom.");i=!1},c.reset=function(){i||r.set(n?ks(Ms(s)):s)},c.freeze=function(){ys(r.get())},c.name="superAtom",c}function ks(t){return"object"==typeof t&&null!==t?ys(t):t}function Ms(t){try{return structuredClone(t)}catch{return t}}function xs(t){const e=new Map,n=[],s=t=>JSON.stringify(t),i=t=>{e.delete(t);const s=n.indexOf(t);s>-1&&n.splice(s,1)};return{getCacheKey:s,removeCacheEntry:i,createCacheMethod:(o,r,a,l)=>async(...c)=>{const h=s(c),u=e.get(h);if(u){const e=Date.now();if(!(void 0!==t?.cacheDuration&&e-u.timestamp>t.cacheDuration)){const t=n.indexOf(h);return t>-1&&n.splice(t,1),n.push(h),o.set(u.result),r.set(null),a.set("success"),u.result}i(h)}const d=await l(this,c);e.set(h,{result:d,timestamp:Date.now()});const f=n.indexOf(h);if(f>-1&&n.splice(f,1),n.push(h),t?.cacheLimit&&n.length>t.cacheLimit){const t=n.shift();t&&e.delete(t)}return d},createClearCacheMethod:()=>(...t)=>{if(0===t.length)e.clear(),n.length=0;else{const e=s(t);i(e)}}}}function $s(t){let e=null,n=null;const s=()=>{e&&(clearInterval(e),e=null,n=null)};return{createStartPollingMethod:i=>(...o)=>{t?.pollInterval?(s(),n=o,i(...o),e=setInterval(()=>{n&&i(...n)},t.pollInterval)):me(new Error("pollInterval not specified in asyncAction options"))},createStopPollingMethod:()=>s,stopPolling:s}}function Ts(t,e){e?.allowInRestrictedContext||ae("Async Action");const n={...{cacheLimit:10,pollInterval:5e3},...e};let s=t;const i=new Set;let o=null,r=null,a=null,l=null;const c=xs(n),h=$s(n),u=Es(null),d=Es(null),f=Es(!1),p=Es("init"),m=t=>{i.forEach(e=>{if(void 0===e.filter||void 0===t||e.filter===t)try{e.fn()}catch(t){me(t)}})},_=()=>{r?.isActive()&&(r.cancel(),r=null),o&&(o.abort(),o=null),f.set(!1),p.set("init")},g=async(t,e)=>{_(),f.set(!0),p.set("loading"),o=new AbortController;const n=o;try{let i;if(a){i=a((...e)=>s.call(t,...e),...e)}else i=s.call(t,...e);i?.__isZeroPromise__&&(r=i);let c=await i;if(n.signal.aborted||o!==n)throw new Error("Operation was cancelled");return l&&(c=l(c)),u.set(c),d.set(null),p.set("success"),m(!0),c}catch(t){if(n.signal.aborted||o!==n)throw t;const e=t instanceof Error?t:new Error(String(t));throw u.set(null),d.set(e),p.set("error"),m(!1),e}finally{o===n&&(o=null),f.set(!1),r&&!r.isActive()&&(r=null)}},y=async(...t)=>{const e=this;if(Pe()){const n=Me(!1);je();const s=g(e,t).catch(()=>{}).finally(()=>{Ue()});return n?._ssrPromiseQueue&&n._ssrPromiseQueue.push(s),s}return g(e,t)},w=c.createCacheMethod(u,d,p,g),v=c.createClearCacheMethod(),b=h.createStartPollingMethod(y),S=h.createStopPollingMethod(),E=Object.assign(y,{data:u,error:d,isLoading:f,status:p,val:()=>s,set:t=>{s=t},params:{page:1},cancel:_,subscribe:(t,e)=>{ae("subscribe");const n={fn:t,filter:e};i.add(n);const s=()=>i.delete(n);return xe(t,s),s},cache:w,clearCache:v,startPolling:b,stopPolling:S,interceptBefore:t=>{a=t},interceptAfter:t=>{l=t},__isAsyncAction___:!0,__isAction___:!1});return Object.defineProperty(E,"abortController",{get:()=>o,enumerable:!0,configurable:!0}),xe(E,()=>{i.clear(),h.stopPolling(),_()}),E}const Rs=(t,e,n)=>{const s="timeout"===n?setTimeout(()=>t(),e):setInterval(()=>t(),e);return xe(s,"timeout"===n?()=>clearTimeout(s):()=>clearInterval(s)),s};class Os{constructor(){this.timeoutId=null,this.pendingArgs=null,this.pendingContext=null}clearPending(){this.pendingArgs=null,this.pendingContext=null}setPending(t,e){this.pendingArgs=t,this.pendingContext=e}clearTimer(){this.timeoutId&&(clearTimeout(this.timeoutId),this.timeoutId=null)}setTimer(t,e){this.timeoutId=((t,e)=>Rs(t,e,"timeout"))(t,e)}executePending(t){return this.pendingArgs&&(this.lastResult=t.apply(this.pendingContext,this.pendingArgs),this.clearPending()),this.lastResult}}function Is(t,e){return()=>{t.clearTimer(),t.clearPending(),e?.()}}function Ps(t,e){return()=>{if(t.pendingArgs&&t.timeoutId){t.clearTimer();return t.executePending(e)}return t.lastResult}}function zs(t,e){const n=new Os,s=function(...s){return n.setPending(s,this),n.clearTimer(),n.setTimer(()=>{n.lastResult=n.executePending(t),n.timeoutId=null},e),n.lastResult};return s.cancel=Is(n),s.flush=Ps(n,t),s}function Ds(t,e){const n=!!e?.allowInRestrictedContext,s=Ts(t,e),i=Es(1,{skipRestrictedContextCheck:n}),o=Es(-1,{skipRestrictedContextCheck:n});return Object.assign(s,{page:i,totalPages:o,next:(...t)=>{if(!(-1!==o.val&&i.val>=o.val))return i.update(t=>t+1),s(...t)}})}function Ns(t){ae("taskAction");const e=[];let n=0,s=1,i=!1;const o={skipRestrictedContextCheck:!0},r=Es([],o),a=Es("idle",o),l=Es(0,o);function c(){if(r.set([...e]),0===e.length)return void l.set(0);let t=0;for(const n of e)"running"===n.status?t+=.5:"pending"!==n.status&&(t+=1);l.set(Math.round(t/e.length*100))}function h(){if(i){const t=e.some(t=>"running"===t.status);return void(t||a.set("idle"))}if("running"!==a.get())return;const n=e.filter(t=>"running"===t.status).length,o=e.filter(t=>"pending"===t.status);if(0===o.length&&0===n)return void a.set("idle");const r=-1===s?o.length:Math.max(0,s-n);0!==r&&o.slice(0,r).forEach(e=>function(e){const n=new AbortController;e.status="running",e.abortController=n;const s=t(e.input,n.signal);if(s?.__isZeroPromise__){const t=s;e.abortController={signal:t.signal,abort:()=>{t.cancel()}}}c(),Promise.resolve(s).then(t=>{"cancelled"===e.status||(e.status="success",e.result.data=t),e.abortController=null,c(),h()}).catch(t=>{if("cancelled"===e.status||!0===e.abortController?.signal?.aborted)e.status="cancelled",e.abortController=null;else{const n=t instanceof Error?t:new Error(String(t));e.status="failed",e.result.error=n,e.abortController=null,me(n,"taskAction")}c(),h()})}(e))}function u(t){return{id:++n,input:t,status:"pending",result:{data:null,error:null},abortController:null}}function d(t){const n=Array.isArray(t)?t:[t];for(const t of n)e.push(u(t));c(),"running"!==a.get()||i||h()}function f(t=1){"running"!==a.get()&&(s=t,i=!1,a.set("running"),h())}function p(){i=!0,function(){for(const t of e)"running"===t.status&&(t.status="cancelled",t.abortController?.abort(),t.abortController=null)}(),a.set("idle"),c()}function m(t){p(),e.length=0,n=0,c(),d(t)}const _={add:d,start:f,pause:function(){i||(i=!0)},stop:p,delete:function(t){const n=Array.isArray(t)?t:[t],s=new Set(n.map(t=>t.id));for(let t=e.length-1;t>=0;t--){const n=e[t];s.has(n.id)&&("running"===n.status&&(n.status="cancelled",n.abortController?.abort(),n.abortController=null),e.splice(t,1))}c(),"running"!==a.get()||i||h()},clearAndAdd:m,addAndStart:function(t,e=1){d(t),f(e)},clearAndStart:function(t,e=1){m(t),f(e)},isRunning:function(){return"running"===a.val},progress:l,tasks:r,pendingTasks:function(){return r.val.filter(t=>"pending"===t.status)},runningTasks:function(){return r.val.filter(t=>"running"===t.status)},successTasks:function(){return r.val.filter(t=>"success"===t.status)},failedTasks:function(){return r.val.filter(t=>"failed"===t.status)},cancelledTasks:function(){return r.val.filter(t=>"cancelled"===t.status)},__isTaskAction__:!0};return xe(_,p),_}function Ls(t,e){const n=new Os;let s=0;const i=function(...i){const o=Date.now(),r=o-s;return r>=e?(s=o,n.lastResult=t.apply(this,i),n.clearPending(),n.clearTimer()):(n.setPending(i,this),n.timeoutId||n.setTimer(()=>{s=Date.now(),n.lastResult=n.executePending(t),n.timeoutId=null},e-r)),n.lastResult};return i.cancel=Is(n,()=>{s=0}),i.flush=Ps(n,t),i}function js(t,e){return"function"!=typeof t.animate?Promise.resolve():("function"==typeof t.getAnimations&&t.getAnimations().forEach(t=>t.cancel()),new Promise(n=>{const s=t.animate(e.keyframes,{duration:300,easing:"ease",fill:"both",...e.options});s.onfinish=()=>n(),s.oncancel=()=>n()}))}async function Us(t){const{el:e,exit:n,enter:s,swap:i,getEl:o,isStale:r}=t;if(!e)return void i();if(await js(e,n),r?.())return;if(i(),await("function"!=typeof requestAnimationFrame?Promise.resolve():new Promise(t=>requestAnimationFrame(()=>requestAnimationFrame(()=>t())))),r?.())return;const a=o?.()??e;a&&await js(a,s)}function Fs(t){return t.__isEffect__=!0,bs({name:"Effect",fn:t,onRun:()=>{},supportsCleanup:!0})}const Vs=new WeakMap,Ws=Y(class extends ut{render(t){return C}update(t,[e]){const n=e!==this.Y;return n&&void 0!==this.Y&&this.rt(void 0),(n||this.lt!==this.ct)&&(this.Y=e,this.ht=t.options?.host,this.rt(this.ct=t.element)),C}rt(t){if(this.isConnected||(t=void 0),"function"==typeof this.Y){const e=this.ht??globalThis;let n=Vs.get(e);void 0===n&&(n=new WeakMap,Vs.set(e,n)),void 0!==n.get(this.Y)&&this.Y.call(this.ht,void 0),n.set(this.Y,t),void 0!==t&&this.Y.call(this.ht,t)}else this.Y.value=t}get lt(){return"function"==typeof this.Y?Vs.get(this.ht??globalThis)?.get(this.Y):this.Y?.value}disconnected(){this.lt===this.ct&&this.rt(void 0)}reconnected(){this.rt(this.ct)}});function Bs(){const t=new Ee;let e;const n={get value(){return e},__subscribe:e=>t.subscribe(e),__isMatesRef__:!0,__set:n=>{e!==n&&(e=n,t.trigger(n))}};return n}function Hs(t){if(t&&t.__isMatesRef__){const e=t;return Ws(t=>{e.__set(t)})}return Ws(t)}const Ys=(t,e={})=>b`<x-view
|
|
109
|
+
`;i.__isErrorView__=!0,i.skipDevToolsRender=!0,this.view=i,this.name=e,this._errorState=t}}an()&&window.addEventListener("mates:component-hot-update",t=>{const e=new Set(t.detail??[]);0!==e.size&&document.querySelectorAll("x-view").forEach(t=>{if(!(t instanceof un))return;const n=function(t){if(!an())return null;const e=t?.__mates_hmr_id;return"string"==typeof e?e:null}(t.view);n&&e.has(n)&&t._hotRefresh()})}),customElements.get("x-view")||customElements.define("x-view",un);class dn extends HTMLElement{constructor(){super(...arguments),this._onRequestContext=t=>{const e=t,n=e.detail?.context.id;n&&null!=this.id&&n===this.id&&(e.stopPropagation(),e.detail.resolve(this._value))}}connectedCallback(){this.addEventListener("request-context",this._onRequestContext)}set context(t){this.id=t.id}disconnectedCallback(){this.removeEventListener("request-context",this._onRequestContext)}set value(t){this._value=t}get value(){return this._value}}function fn(t){let e=-1===t.indexOf("\0")?t:t.replace(/\0/g,"");const n=function(t){const e=t.indexOf("{"),n=t.indexOf("}");return-1===e&&-1===n?-1:-1===e?n:-1===n?e:Math.min(e,n)}(e);return-1!==n&&(e=e.slice(0,n)),/url\s*\(/i.test(e)&&(e=e.replace(/\burl\s*\(\s*(['"]?)\s*(?:javascript:|vbscript:|data:text\/html[,;])/gi,"url($1")),e}function pn(t){return t.length>0&&/^[a-zA-Z-]+$/.test(t)}customElements.get("x-provider")||customElements.define("x-provider",dn);let mn=0;function _n(){return`_m${(mn++).toString(36)}`}const gn=Object.create(null),yn={sm:"640px",md:"768px",lg:"1024px",xl:"1280px","2xl":"1536px"};function wn(t){t.breakpoints&&Object.assign(yn,t.breakpoints)}function vn(t){const e=gn[t];if(void 0!==e)return e;const n=t.startsWith("--")?t:t.replace(/[A-Z]/g,t=>`-${t.toLowerCase()}`);return gn[t]=n,n}function bn(t,e,n){if(!n)return`.${t} {\n${e}}`;if(n.startsWith("&")){return`.${t}${n.slice(1)} {\n${e}}`}return`${n} {\n .${t} {\n${e.replace(/^ {2}/gm," ")} }\n}`}function Sn(t){return t.startsWith("&")||t.startsWith("@media")?t:Object.prototype.hasOwnProperty.call(yn,t)?`@media (min-width: ${yn[t]})`:null}function En(t,e,n){const s=Object.create(null);for(const i in t){const o=t[i];let r="",a=null;for(const t in o){const e=o[t];if(null!=e){if("object"==typeof e&&!Array.isArray(e)){const n=Sn(t);if(null===n)throw new Error(`[css-in-js] Unknown nested key "${t}" in block "${i}". Use "&:pseudo", "@media (...)", or a configured breakpoint key.`);let s="";const o=e;for(const t in o){const e=o[t];null!=e&&(pn(t)?s+=` ${vn(t)}: ${fn(String(e))};\n`:console.warn(`[css-in-js] invalid property name skipped: "${t}"`))}s.length>0&&(null===a&&(a=[]),a.push([s,n]));continue}pn(t)?r+=` ${vn(t)}: ${fn(String(e))};\n`:console.warn(`[css-in-js] invalid property name skipped: "${t}"`)}}if(0===r.length&&null===a){s[i]="";continue}const l=n?.literal?i:`${i}${_n()}`;if(r.length>0&&e.push(bn(l,r,"")),null!==a)for(let t=0;t<a.length;t++)e.push(bn(l,a[t][0],a[t][1]));s[i]=l}return s}function Cn(t){return Object.freeze(t)}var An,kn,Mn,xn,$n,Tn,Rn,On;function In(t){if(oe.templateInProgress)throw new Error(`[css-in-js] ${t}() must be called at module level, not inside a template function.`);if(oe.viewOuterInProgress)throw new Error(`[css-in-js] ${t}() must be called at module level, not inside a component outer function. Move it outside the component function.`);if(oe.setupInProgress)throw new Error(`[css-in-js] ${t}() must be called at module level, not inside a setup function.`)}let Pn=0;function zn(t){return`${t}_kf${(Pn++).toString(36)}`}function Dn(t,e){let n="";for(const t in e){const s=e[t];let i="";for(const t in s){const e=s[t];if(null==e)continue;const n=t.startsWith("--")?t:t.replace(/[A-Z]/g,t=>`-${t.toLowerCase()}`);i+=` ${n}: ${String(e)};\n`}i&&(n+=` ${t} {\n${i} }\n`)}return`@keyframes ${t} {\n${n}}`}const Nn=new Set;function Ln(){return""}class jn{constructor(){An.add(this),kn.set(this,""),Mn.set(this,0),xn.set(this,null),$n.set(this,[]),Nn.add(this)}keyframes(t,e){const n=zn(t);return this.appendRules(Dn(n,e)),n}appendRules(t){""!==t&&(ge(this,$n,"f").push(t),ge(this,Mn,"f")>0&&ge(this,An,"m",Tn).call(this))}mount(){var t;ye(this,Mn,(t=ge(this,Mn,"f"),++t),"f"),1===ge(this,Mn,"f")&&(ge(this,An,"m",Tn).call(this),ge(this,xn,"f")||ge(this,An,"m",Rn).call(this))}unmount(){var t;ge(this,Mn,"f")<=0||(ye(this,Mn,(t=ge(this,Mn,"f"),--t),"f"),0===ge(this,Mn,"f")&&ge(this,An,"m",On).call(this))}get refCount(){return ge(this,Mn,"f")}get cssText(){return ge(this,kn,"f")}get isMounted(){return ge(this,Mn,"f")>0}get sheet(){return ge(this,xn,"f")}getAllCSS(){const t=[];return ge(this,kn,"f")&&t.push(ge(this,kn,"f")),ge(this,$n,"f").length>0&&t.push(ge(this,$n,"f").join("\n")),t.join("\n")}}function Un(){if(In("stylesheet"),Pe())return{css:()=>({}),mount:()=>{},keyframes:()=>""};const t=new jn;return{css:function(e){In("css");const n=[],s=En(e,n);return n.length>0&&t.appendRules(n.join("\n")),Cn(s)},mount:function(){if(function(t){if(oe.templateInProgress)throw new Error(`[css-in-js] ${t}() must not be called inside a template function. Call it in the component outer function or at module level.`)}("mount"),null===Me(!1))return t.mount(),()=>t.unmount();Ge(()=>(t.mount(),()=>t.unmount()))},keyframes:function(e,n){return In("keyframes"),t.keyframes(e,n)}}}kn=new WeakMap,Mn=new WeakMap,xn=new WeakMap,$n=new WeakMap,An=new WeakSet,Tn=function(){if(0===ge(this,$n,"f").length)return;const t=ge(this,$n,"f").join("\n");ye(this,$n,[],"f"),ye(this,kn,ge(this,kn,"f")+(ge(this,kn,"f")?"\n":"")+t,"f"),ge(this,An,"m",Rn).call(this)},Rn=function(){ge(this,xn,"f")||(ye(this,xn,new CSSStyleSheet,"f"),document.adoptedStyleSheets=[...document.adoptedStyleSheets,ge(this,xn,"f")]),ge(this,xn,"f").replaceSync(ge(this,kn,"f"))},On=function(){ge(this,xn,"f")&&(document.adoptedStyleSheets=document.adoptedStyleSheets.filter(t=>t!==ge(this,xn,"f")),ye(this,xn,null,"f")),ge(this,kn,"f")&&(ge(this,$n,"f").unshift(ge(this,kn,"f")),ye(this,kn,"","f"))};let Fn=null,Vn=!1;function Wn(){return Fn||(Fn=new jn),Fn}function Bn(){Fn||(Fn=new jn),Vn||(Vn=!0,queueMicrotask(()=>{Vn=!1,Fn.mount()}))}function Hn(t,e){if(In("keyframes"),Pe())return t;Bn();const n=zn(t);return Fn.appendRules(Dn(n,e)),n}function Yn(t,e){if(In("globalCSS"),Pe())return{};Bn();const n=[],s=En(t,n,e);return n.length>0&&Fn.appendRules(n.join("\n")),Cn(s)}function qn(t){In("globalRawCSS"),Bn(),Fn.appendRules(t)}let Xn=!1;function Zn(){Xn||(Xn=!0,qn('\n[class*="mates-"] {\n --mates-duration : 300ms;\n --mates-easing : ease;\n --mates-distance : 24px;\n animation-duration : var(--mates-duration);\n animation-timing-function : var(--mates-easing);\n animation-fill-mode : both;\n}\n'),qn("\n@keyframes mates-kf-fade-in { from { opacity: 0 } to { opacity: 1 } }\n@keyframes mates-kf-fade-out { from { opacity: 1 } to { opacity: 0 } }\n\n@keyframes mates-kf-slide-in-up {\n from { opacity: 0; transform: translateY(var(--mates-distance)) }\n to { opacity: 1; transform: translateY(0) }\n}\n@keyframes mates-kf-slide-out-up {\n from { opacity: 1; transform: translateY(0) }\n to { opacity: 0; transform: translateY(calc(-1 * var(--mates-distance))) }\n}\n@keyframes mates-kf-slide-in-down {\n from { opacity: 0; transform: translateY(calc(-1 * var(--mates-distance))) }\n to { opacity: 1; transform: translateY(0) }\n}\n@keyframes mates-kf-slide-out-down {\n from { opacity: 1; transform: translateY(0) }\n to { opacity: 0; transform: translateY(var(--mates-distance)) }\n}\n@keyframes mates-kf-slide-in-left {\n from { opacity: 0; transform: translateX(var(--mates-distance)) }\n to { opacity: 1; transform: translateX(0) }\n}\n@keyframes mates-kf-slide-out-left {\n from { opacity: 1; transform: translateX(0) }\n to { opacity: 0; transform: translateX(calc(-1 * var(--mates-distance))) }\n}\n@keyframes mates-kf-slide-in-right {\n from { opacity: 0; transform: translateX(calc(-1 * var(--mates-distance))) }\n to { opacity: 1; transform: translateX(0) }\n}\n@keyframes mates-kf-slide-out-right {\n from { opacity: 1; transform: translateX(0) }\n to { opacity: 0; transform: translateX(var(--mates-distance)) }\n}\n\n@keyframes mates-kf-scale-in {\n from { opacity: 0; transform: scale(0.92) }\n to { opacity: 1; transform: scale(1) }\n}\n@keyframes mates-kf-scale-out {\n from { opacity: 1; transform: scale(1) }\n to { opacity: 0; transform: scale(0.92) }\n}\n\n@keyframes mates-kf-spring-in {\n from { opacity: 0; transform: scale(0.92) }\n to { opacity: 1; transform: scale(1) }\n}\n\n@keyframes mates-kf-flip-in-x {\n from { opacity: 0; transform: rotateX(90deg) }\n to { opacity: 1; transform: rotateX(0deg) }\n}\n@keyframes mates-kf-flip-in-y {\n from { opacity: 0; transform: rotateY(90deg) }\n to { opacity: 1; transform: rotateY(0deg) }\n}\n\n@keyframes mates-kf-blur-in {\n from { opacity: 0; filter: blur(10px) }\n to { opacity: 1; filter: blur(0) }\n}\n@keyframes mates-kf-blur-out {\n from { opacity: 1; filter: blur(0) }\n to { opacity: 0; filter: blur(10px) }\n}\n\n@keyframes mates-kf-shake {\n 0%, 100% { transform: translateX(0) }\n 15% { transform: translateX(calc(-1 * var(--mates-distance))) }\n 30% { transform: translateX(calc( 1 * var(--mates-distance))) }\n 45% { transform: translateX(calc(-0.6 * var(--mates-distance))) }\n 60% { transform: translateX(calc( 0.6 * var(--mates-distance))) }\n 75% { transform: translateX(calc(-0.3 * var(--mates-distance))) }\n 90% { transform: translateX(calc( 0.3 * var(--mates-distance))) }\n}\n\n@keyframes mates-kf-pulse {\n 0%, 100% { transform: scale(1) }\n 50% { transform: scale(1.08) }\n}\n\n@keyframes mates-kf-bounce {\n 0% { transform: translateY(0) }\n 20% { transform: translateY(calc(-0.40 * var(--mates-distance))) }\n 40% { transform: translateY(0) }\n 60% { transform: translateY(calc(-0.20 * var(--mates-distance))) }\n 80% { transform: translateY(0) }\n 90% { transform: translateY(calc(-0.08 * var(--mates-distance))) }\n 100% { transform: translateY(0) }\n}\n\n@keyframes mates-kf-spin {\n from { transform: rotate(0deg) }\n to { transform: rotate(360deg) }\n}\n"),Yn({"mates-fade-in":{animationName:"mates-kf-fade-in"},"mates-fade-out":{animationName:"mates-kf-fade-out"},"mates-slide-in-up":{animationName:"mates-kf-slide-in-up"},"mates-slide-out-up":{animationName:"mates-kf-slide-out-up"},"mates-slide-in-down":{animationName:"mates-kf-slide-in-down"},"mates-slide-out-down":{animationName:"mates-kf-slide-out-down"},"mates-slide-in-left":{animationName:"mates-kf-slide-in-left"},"mates-slide-out-left":{animationName:"mates-kf-slide-out-left"},"mates-slide-in-right":{animationName:"mates-kf-slide-in-right"},"mates-slide-out-right":{animationName:"mates-kf-slide-out-right"},"mates-scale-in":{animationName:"mates-kf-scale-in"},"mates-scale-out":{animationName:"mates-kf-scale-out"},"mates-spring-in":{animationName:"mates-kf-spring-in","--mates-easing":"cubic-bezier(0.34, 1.56, 0.64, 1)"},"mates-flip-in-x":{animationName:"mates-kf-flip-in-x"},"mates-flip-in-y":{animationName:"mates-kf-flip-in-y"},"mates-blur-in":{animationName:"mates-kf-blur-in"},"mates-blur-out":{animationName:"mates-kf-blur-out"},"mates-shake":{animationName:"mates-kf-shake","--mates-duration":"500ms","--mates-easing":"ease-in-out"},"mates-pulse":{animationName:"mates-kf-pulse","--mates-duration":"600ms","--mates-easing":"ease-in-out"},"mates-bounce":{animationName:"mates-kf-bounce","--mates-duration":"700ms"},"mates-spin":{animationName:"mates-kf-spin","--mates-easing":"linear"}},{literal:!0}))}const Gn={fadeIn:"mates-fade-in",fadeOut:"mates-fade-out",slideInUp:"mates-slide-in-up",slideOutUp:"mates-slide-out-up",slideInDown:"mates-slide-in-down",slideOutDown:"mates-slide-out-down",slideInLeft:"mates-slide-in-left",slideOutLeft:"mates-slide-out-left",slideInRight:"mates-slide-in-right",slideOutRight:"mates-slide-out-right",scaleIn:"mates-scale-in",scaleOut:"mates-scale-out",springIn:"mates-spring-in",flipInX:"mates-flip-in-x",flipInY:"mates-flip-in-y",blurIn:"mates-blur-in",blurOut:"mates-blur-out",shake:"mates-shake",pulse:"mates-pulse",bounce:"mates-bounce",spin:"mates-spin"};function Kn(t){ae("Action");let e=t;const n=new Set;let s=null,i=null;const o=t=>{n.forEach(e=>{try{e(t)}catch(t){console.error(t)}})},r=Object.assign(function(...t){return((t,n)=>{try{let r;return r=s?s((...n)=>e.call(t,...n),...n):e.call(t,...n),i&&(r=i(r)),o(r),r}catch(t){const e=t instanceof Error?t:new Error(String(t));throw o(void 0),e}})(this,t)},{val:()=>e,set:t=>{e=t},__isAction___:!0,__subscribe:t=>(ae("subscribe"),n.add(t),()=>n.delete(t)),interceptBefore:t=>{s=t},interceptAfter:t=>{i=t}});return r}function Qn(t=300,e="ease"){return{keyframes:[{opacity:0},{opacity:1}],options:{duration:t,easing:e,fill:"both"}}}function Jn(t=300,e="ease"){return{keyframes:[{opacity:1},{opacity:0}],options:{duration:t,easing:e,fill:"both"}}}Zn();const ts={up:"translateY(-100%)",down:"translateY(100%)",left:"translateX(-100%)",right:"translateX(100%)"};function es(t="up",e,n=400,s="cubic-bezier(0.4, 0, 0.2, 1)"){return{keyframes:[{transform:e?ss(t,e):ts[t],opacity:0},{transform:"translate(0, 0)",opacity:1}],options:{duration:n,easing:s,fill:"both"}}}function ns(t="down",e,n=400,s="cubic-bezier(0.4, 0, 0.2, 1)"){return{keyframes:[{transform:"translate(0, 0)",opacity:1},{transform:e?ss(t,e):ts[t],opacity:0}],options:{duration:n,easing:s,fill:"both"}}}function ss(t,e){switch(t){case"up":return`translateY(-${e})`;case"down":return`translateY(${e})`;case"left":return`translateX(-${e})`;case"right":return`translateX(${e})`}}function is(t=0,e=300,n="cubic-bezier(0.4, 0, 0.2, 1)"){return{keyframes:[{transform:`scale(${t})`,opacity:0},{transform:"scale(1)",opacity:1}],options:{duration:e,easing:n,fill:"both"}}}function os(t=0,e=300,n="cubic-bezier(0.4, 0, 0.2, 1)"){return{keyframes:[{transform:"scale(1)",opacity:1},{transform:`scale(${t})`,opacity:0}],options:{duration:e,easing:n,fill:"both"}}}function rs(t=1,e=600,n="linear"){return{keyframes:[{transform:"rotate(0deg)"},{transform:`rotate(${360*t}deg)`}],options:{duration:e,easing:n,fill:"both"}}}function as(t=600){return{keyframes:[{transform:"translateY(0)",offset:0},{transform:"translateY(-30%)",offset:.3},{transform:"translateY(0)",offset:.5},{transform:"translateY(-15%)",offset:.7},{transform:"translateY(0)",offset:.85},{transform:"translateY(-5%)",offset:.95},{transform:"translateY(0)",offset:1}],options:{duration:t,easing:"ease",fill:"both"}}}function ls(t=500,e="cubic-bezier(0.34, 1.56, 0.64, 1)"){return{keyframes:[{transform:"scale(0)",opacity:0},{transform:"scale(1)",opacity:1}],options:{duration:t,easing:e,fill:"both"}}}function cs(t=10,e=400){return{keyframes:[{transform:"translateX(0)"},{transform:`translateX(-${t}px)`},{transform:`translateX(${t}px)`},{transform:`translateX(-${t}px)`},{transform:`translateX(${t}px)`},{transform:"translateX(0)"}],options:{duration:e,easing:"ease-in-out",fill:"both"}}}function hs(t=1.05,e=400){return{keyframes:[{transform:"scale(1)"},{transform:`scale(${t})`},{transform:"scale(1)"}],options:{duration:e,easing:"ease-in-out",fill:"both"}}}function us(t="y",e=500,n="ease-out"){const s="x"===t?"rotateX":"rotateY";return{keyframes:[{transform:`${s}(90deg)`,opacity:0},{transform:`${s}(0deg)`,opacity:1}],options:{duration:e,easing:n,fill:"both"}}}function ds(t="y",e=500,n="ease-in"){const s="x"===t?"rotateX":"rotateY";return{keyframes:[{transform:`${s}(0deg)`,opacity:1},{transform:`${s}(90deg)`,opacity:0}],options:{duration:e,easing:n,fill:"both"}}}function fs(t=10,e=400,n="ease-out"){return{keyframes:[{filter:`blur(${t}px)`,opacity:0},{filter:"blur(0px)",opacity:1}],options:{duration:e,easing:n,fill:"both"}}}function ps(t=10,e=400,n="ease-in"){return{keyframes:[{filter:"blur(0px)",opacity:1},{filter:`blur(${t}px)`,opacity:0}],options:{duration:e,easing:n,fill:"both"}}}function ms(t=500,e="cubic-bezier(0.4, 0, 0.2, 1)"){return{keyframes:[{width:"0",overflow:"hidden"},{width:"auto",overflow:"hidden"}],options:{duration:t,easing:e,fill:"both"}}}function _s(t=500,e="cubic-bezier(0.4, 0, 0.2, 1)"){return{keyframes:[{width:"auto",overflow:"hidden"},{width:"0",overflow:"hidden"}],options:{duration:t,easing:e,fill:"both"}}}function gs(t,e,n=50){return{keyframes:t.keyframes,options:{...t.options,delay:(t.options.delay??0)+e*n}}}function ys(t){if(null==t||"object"!=typeof t)return t;try{return Object.keys(t).forEach(e=>{"object"!=typeof t[e]||null===t[e]||Object.isFrozen(t[e])||ys(t[e])}),Object.freeze(t)}catch(t){console.error(t)}}function ws(t,e,n){const s=ne();let i;Qt();try{i=t()}finally{Jt();se(s).forEach(t=>{"function"==typeof t.__subscribe&&e(t,n)})}return i}function vs(t,e){if(ae(t),"AsyncFunction"===e.constructor.name)throw new Error(`${t.toLowerCase()}() does not support async functions.`);if(Gt())throw new Error(`${t.toLowerCase()}() cannot be nested inside an effect() or memo().`)}function bs(t){const{name:e,fn:n,onRun:s,supportsCleanup:i}=t;vs(e,n);const o=new Set;let r,a=!1;const l=()=>{if(i&&r){try{r()}catch(t){console.error("Error in effect cleanup:",t)}r=void 0}},c=()=>{if(a)return;l();const t=new Set(o);o.clear();const e=()=>{a||Ye.schedule(c)};let h;try{h=ws(n,t=>{o.add(t.__subscribe(e))},e)}finally{t.forEach(t=>t())}if(a)return o.forEach(t=>t()),void o.clear();i&&"function"==typeof h&&(r=h),s(h)},h=()=>{a||(a=!0,l(),o.forEach(t=>t()),o.clear())};return c(),xe(n,h),h}let Ss=0;function Es(t,e){if("function"==typeof t){const e=t;let n;const s=Symbol("skip");return bs({name:"Memo",fn:()=>{try{return e()}catch(t){return console.error("[atom] Error in derived function:",t),s}},onRun:t=>{t!==s&&(n?(n.unlock("initial"),n.set(()=>t),n.lock("initial")):(n=As(t,{skipRestrictedContextCheck:!0}),n.lock("initial")))}}),n}e?.skipRestrictedContextCheck||ae("Atom");let n=t;const s=++Ss,i=new Se;function o(){return nn(o,!1),Xt()&&Kt(o),n}return o.get=function(){return o()},o.set=function(t,e=!1){var r,a;n="function"==typeof t?t(n):t,o.skipDevToolsLog||(r=String(s),a=n,jt.logAtomSet(r,a)),e||i.notify()},o.update=function(t,e=!1){var r;"object"==typeof n&&null!==n&&(t(n),o.skipDevToolsLog||(r=String(s),jt.logAtomUpdate(r)),e||i.notify())},o.__subscribe=function(t){return i.subscribe(t)},o.toJSON=function(){return JSON.stringify(n)},Object.defineProperty(o,"name",{value:"atom",writable:!0,configurable:!0,enumerable:!1}),Object.defineProperty(o,"val",{get:()=>o(),set:t=>o.set(t),enumerable:!1,configurable:!0}),Object.defineProperty(o,"__version__",{get:()=>i.getVersion(),enumerable:!1}),Object.defineProperty(o,"__isAtom___",{value:!0,writable:!1,enumerable:!1}),Object.defineProperty(o,"__id__",{value:s,writable:!1,enumerable:!1}),o}function Cs(t,e){e?.skipRestrictedContextCheck||ae("iAtom");const n=Es(ks(t),{skipRestrictedContextCheck:!0}),s=n.set;n.set=function(t,e=!1){const i="function"==typeof t?t(n.get()):t;s(ks(i),e)};const i=n;return delete i.update,i.name="iAtom",i}function As(t,e={}){e.skipRestrictedContextCheck||ae("superAtom"),Xe();const n=e.freeze??!1,s=n?ks(Ms(t)):t;let i=!1,o="default";const r=Es(n?ks(t):t,{skipRestrictedContextCheck:!0}),a=r.set;r.set=function(t,e=!1){if(i)return void me("Cannot mutate a locked atom.","superAtom");const s="function"==typeof t?t(r.get()):t;a(n?ks(s):s,e)};const l=r.update;r.update=function(t,e=!1){if(i)me("Cannot mutate a locked atom.","superAtom");else{if(n)throw new Error("update() is not supported when freeze is enabled — use set() with a new value.");l(t,e)}};const c=r;return c.lock=function(t="default"){i=!0,o=t},c.unlock=function(t="default"){if(o!==t)throw new Error("Incorrect passcode. Cannot unlock atom.");i=!1},c.reset=function(){i||r.set(n?ks(Ms(s)):s)},c.freeze=function(){ys(r.get())},c.name="superAtom",c}function ks(t){return"object"==typeof t&&null!==t?ys(t):t}function Ms(t){try{return structuredClone(t)}catch{return t}}const xs=Es(0);function $s(){xs.set(xs.val+1)}function Ts(){xs.set(Math.max(0,xs.val-1))}function Rs(){return xs()}function Os(t){const e=new Map,n=[],s=t=>JSON.stringify(t),i=t=>{e.delete(t);const s=n.indexOf(t);s>-1&&n.splice(s,1)};return{getCacheKey:s,removeCacheEntry:i,createCacheMethod:(o,r,a,l)=>async(...c)=>{const h=s(c),u=e.get(h);if(u){const e=Date.now();if(!(void 0!==t?.cacheDuration&&e-u.timestamp>t.cacheDuration)){const t=n.indexOf(h);return t>-1&&n.splice(t,1),n.push(h),o.set(u.result),r.set(null),a.set("success"),u.result}i(h)}const d=await l(this,c);e.set(h,{result:d,timestamp:Date.now()});const f=n.indexOf(h);if(f>-1&&n.splice(f,1),n.push(h),t?.cacheLimit&&n.length>t.cacheLimit){const t=n.shift();t&&e.delete(t)}return d},createClearCacheMethod:()=>(...t)=>{if(0===t.length)e.clear(),n.length=0;else{const e=s(t);i(e)}}}}function Is(t){let e=null,n=null;const s=()=>{e&&(clearInterval(e),e=null,n=null)};return{createStartPollingMethod:i=>(...o)=>{t?.pollInterval?(s(),n=o,i(...o),e=setInterval(()=>{n&&i(...n)},t.pollInterval)):me(new Error("pollInterval not specified in asyncAction options"))},createStopPollingMethod:()=>s,stopPolling:s}}function Ps(t,e){e?.allowInRestrictedContext||ae("Async Action");const n={...{cacheLimit:10,pollInterval:5e3},...e};let s=t;const i=new Set;let o=null,r=null,a=null,l=null;const c=Os(n),h=Is(n),u=Es(null),d=Es(null),f=Es(!1),p=Es("init"),m=t=>{i.forEach(e=>{if(void 0===e.filter||void 0===t||e.filter===t)try{e.fn()}catch(t){me(t)}})},_=()=>{r?.isActive()&&(r.cancel(),r=null),o&&(o.abort(),o=null),f.set(!1),p.set("init")},g=async(t,e)=>{_(),f.set(!0),p.set("loading"),o=new AbortController;const n=o;try{let i;if(a){i=a((...e)=>s.call(t,...e),...e)}else i=s.call(t,...e);i?.__isZeroPromise__&&(r=i);let c=await i;if(n.signal.aborted||o!==n)throw new Error("Operation was cancelled");return l&&(c=l(c)),u.set(c),d.set(null),p.set("success"),m(!0),c}catch(t){if(n.signal.aborted||o!==n)throw t;const e=t instanceof Error?t:new Error(String(t));throw u.set(null),d.set(e),p.set("error"),m(!1),e}finally{o===n&&(o=null),f.set(!1),r&&!r.isActive()&&(r=null)}},y=async(...t)=>{const e=this;if(Pe()){const n=Me(!1);$s(),je();const s=g(e,t).catch(()=>{}).finally(()=>{Ue(),Ts()});return n?._ssrPromiseQueue&&n._ssrPromiseQueue.push(s),s}return $s(),g(e,t).finally(()=>Ts())},w=c.createCacheMethod(u,d,p,g),v=c.createClearCacheMethod(),b=h.createStartPollingMethod(y),S=h.createStopPollingMethod(),E=Object.assign(y,{data:u,error:d,isLoading:f,status:p,val:()=>s,set:t=>{s=t},params:{page:1},cancel:_,subscribe:(t,e)=>{ae("subscribe");const n={fn:t,filter:e};i.add(n);const s=()=>i.delete(n);return xe(t,s),s},cache:w,clearCache:v,startPolling:b,stopPolling:S,interceptBefore:t=>{a=t},interceptAfter:t=>{l=t},__isAsyncAction___:!0,__isAction___:!1});return Object.defineProperty(E,"abortController",{get:()=>o,enumerable:!0,configurable:!0}),xe(E,()=>{i.clear(),h.stopPolling(),_()}),E}const zs=(t,e,n)=>{const s="timeout"===n?setTimeout(()=>t(),e):setInterval(()=>t(),e);return xe(s,"timeout"===n?()=>clearTimeout(s):()=>clearInterval(s)),s};class Ds{constructor(){this.timeoutId=null,this.pendingArgs=null,this.pendingContext=null}clearPending(){this.pendingArgs=null,this.pendingContext=null}setPending(t,e){this.pendingArgs=t,this.pendingContext=e}clearTimer(){this.timeoutId&&(clearTimeout(this.timeoutId),this.timeoutId=null)}setTimer(t,e){this.timeoutId=((t,e)=>zs(t,e,"timeout"))(t,e)}executePending(t){return this.pendingArgs&&(this.lastResult=t.apply(this.pendingContext,this.pendingArgs),this.clearPending()),this.lastResult}}function Ns(t,e){return()=>{t.clearTimer(),t.clearPending(),e?.()}}function Ls(t,e){return()=>{if(t.pendingArgs&&t.timeoutId){t.clearTimer();return t.executePending(e)}return t.lastResult}}function js(t,e){const n=new Ds,s=function(...s){return n.setPending(s,this),n.clearTimer(),n.setTimer(()=>{n.lastResult=n.executePending(t),n.timeoutId=null},e),n.lastResult};return s.cancel=Ns(n),s.flush=Ls(n,t),s}function Us(t,e){const n=!!e?.allowInRestrictedContext,s=Ps(t,e),i=Es(1,{skipRestrictedContextCheck:n}),o=Es(-1,{skipRestrictedContextCheck:n});return Object.assign(s,{page:i,totalPages:o,next:(...t)=>{if(!(-1!==o.val&&i.val>=o.val))return i.update(t=>t+1),s(...t)}})}function Fs(t){ae("taskAction");const e=[];let n=0,s=1,i=!1;const o={skipRestrictedContextCheck:!0},r=Es([],o),a=Es("idle",o),l=Es(0,o);function c(){if(r.set([...e]),0===e.length)return void l.set(0);let t=0;for(const n of e)"running"===n.status?t+=.5:"pending"!==n.status&&(t+=1);l.set(Math.round(t/e.length*100))}function h(){if(i){const t=e.some(t=>"running"===t.status);return void(t||a.set("idle"))}if("running"!==a.get())return;const n=e.filter(t=>"running"===t.status).length,o=e.filter(t=>"pending"===t.status);if(0===o.length&&0===n)return void a.set("idle");const r=-1===s?o.length:Math.max(0,s-n);0!==r&&o.slice(0,r).forEach(e=>function(e){const n=new AbortController;e.status="running",e.abortController=n;const s=t(e.input,n.signal);if(s?.__isZeroPromise__){const t=s;e.abortController={signal:t.signal,abort:()=>{t.cancel()}}}c(),Promise.resolve(s).then(t=>{"cancelled"===e.status||(e.status="success",e.result.data=t),e.abortController=null,c(),h()}).catch(t=>{if("cancelled"===e.status||!0===e.abortController?.signal?.aborted)e.status="cancelled",e.abortController=null;else{const n=t instanceof Error?t:new Error(String(t));e.status="failed",e.result.error=n,e.abortController=null,me(n,"taskAction")}c(),h()})}(e))}function u(t){return{id:++n,input:t,status:"pending",result:{data:null,error:null},abortController:null}}function d(t){const n=Array.isArray(t)?t:[t];for(const t of n)e.push(u(t));c(),"running"!==a.get()||i||h()}function f(t=1){"running"!==a.get()&&(s=t,i=!1,a.set("running"),h())}function p(){i=!0,function(){for(const t of e)"running"===t.status&&(t.status="cancelled",t.abortController?.abort(),t.abortController=null)}(),a.set("idle"),c()}function m(t){p(),e.length=0,n=0,c(),d(t)}const _={add:d,start:f,pause:function(){i||(i=!0)},stop:p,delete:function(t){const n=Array.isArray(t)?t:[t],s=new Set(n.map(t=>t.id));for(let t=e.length-1;t>=0;t--){const n=e[t];s.has(n.id)&&("running"===n.status&&(n.status="cancelled",n.abortController?.abort(),n.abortController=null),e.splice(t,1))}c(),"running"!==a.get()||i||h()},clearAndAdd:m,addAndStart:function(t,e=1){d(t),f(e)},clearAndStart:function(t,e=1){m(t),f(e)},isRunning:function(){return"running"===a.val},progress:l,tasks:r,pendingTasks:function(){return r.val.filter(t=>"pending"===t.status)},runningTasks:function(){return r.val.filter(t=>"running"===t.status)},successTasks:function(){return r.val.filter(t=>"success"===t.status)},failedTasks:function(){return r.val.filter(t=>"failed"===t.status)},cancelledTasks:function(){return r.val.filter(t=>"cancelled"===t.status)},__isTaskAction__:!0};return xe(_,p),_}function Vs(t,e){const n=new Ds;let s=0;const i=function(...i){const o=Date.now(),r=o-s;return r>=e?(s=o,n.lastResult=t.apply(this,i),n.clearPending(),n.clearTimer()):(n.setPending(i,this),n.timeoutId||n.setTimer(()=>{s=Date.now(),n.lastResult=n.executePending(t),n.timeoutId=null},e-r)),n.lastResult};return i.cancel=Ns(n,()=>{s=0}),i.flush=Ls(n,t),i}function Ws(t,e){return"function"!=typeof t.animate?Promise.resolve():("function"==typeof t.getAnimations&&t.getAnimations().forEach(t=>t.cancel()),new Promise(n=>{const s=t.animate(e.keyframes,{duration:300,easing:"ease",fill:"both",...e.options});s.onfinish=()=>n(),s.oncancel=()=>n()}))}async function Bs(t){const{el:e,exit:n,enter:s,swap:i,getEl:o,isStale:r}=t;if(!e)return void i();if(await Ws(e,n),r?.())return;if(i(),await("function"!=typeof requestAnimationFrame?Promise.resolve():new Promise(t=>requestAnimationFrame(()=>requestAnimationFrame(()=>t())))),r?.())return;const a=o?.()??e;a&&await Ws(a,s)}function Hs(t){return t.__isEffect__=!0,bs({name:"Effect",fn:t,onRun:()=>{},supportsCleanup:!0})}const Ys=new WeakMap,qs=Y(class extends ut{render(t){return C}update(t,[e]){const n=e!==this.Y;return n&&void 0!==this.Y&&this.rt(void 0),(n||this.lt!==this.ct)&&(this.Y=e,this.ht=t.options?.host,this.rt(this.ct=t.element)),C}rt(t){if(this.isConnected||(t=void 0),"function"==typeof this.Y){const e=this.ht??globalThis;let n=Ys.get(e);void 0===n&&(n=new WeakMap,Ys.set(e,n)),void 0!==n.get(this.Y)&&this.Y.call(this.ht,void 0),n.set(this.Y,t),void 0!==t&&this.Y.call(this.ht,t)}else this.Y.value=t}get lt(){return"function"==typeof this.Y?Ys.get(this.ht??globalThis)?.get(this.Y):this.Y?.value}disconnected(){this.lt===this.ct&&this.rt(void 0)}reconnected(){this.rt(this.ct)}});function Xs(){const t=new Ee;let e;const n={get value(){return e},__subscribe:e=>t.subscribe(e),__isMatesRef__:!0,__set:n=>{e!==n&&(e=n,t.trigger(n))}};return n}function Zs(t){if(t&&t.__isMatesRef__){const e=t;return qs(t=>{e.__set(t)})}return qs(t)}const Gs=(t,e={})=>b`<x-view
|
|
110
110
|
.view=${t}
|
|
111
111
|
.props=${e}
|
|
112
|
-
></x-view>`,
|
|
112
|
+
></x-view>`,Ks=Gs,Qs=Gs,Js=(t,e,n={})=>U(Gs(t,n),e),ti=Js,ei=Es("undefined"!=typeof window?window.history.state:null),ni=Es(!1),si=()=>ni.set(!0),ii=()=>ni.set(!1);function oi(t){return new Promise(e=>{const n=()=>{t?.(),e()};Pe()?queueMicrotask(n):"undefined"!=typeof requestIdleCallback?requestIdleCallback(()=>n(),{timeout:300}):requestAnimationFrame(n)})}function ri(t,e,n){if(ni())return;if(t===ci.get())return;const s=t.includes("?"),i=t.includes("#");let o=t;if(s||i)if(i){if(!s){const e=t.indexOf("#");o=t.slice(0,e)+window.location.search+t.slice(e)}}else o=t+window.location.hash;else{o=t+window.location.search+window.location.hash}ai.trigger({to:t,from:ci.get()}),ni()||(ei.set(n??null),e?window.history.replaceState(n,"",o):window.history.pushState(n,"",o),ci.set(t))}const ai=Te("router:navigation-request"),li=t=>{if(Pe())return;Xe();let e=!1;const n=ai.__subscribe(n=>{if(e)return;const{to:s,from:i}=n;si();let o=!1;const r=t({to:s,from:i,next:()=>{o||(o=!0,e=!0,ii(),oi(()=>{ri(s),e=!1}))}});r instanceof Promise?r.then(()=>{o||ii()}).catch(()=>{o||ii()}):o||ii()});xe(t,n)},ci=As("undefined"!=typeof window?window.location.pathname:"/");function hi(t){t.preventDefault(),t.returnValue=""}Hs(()=>(ni()?"undefined"!=typeof window&&window.addEventListener("beforeunload",hi):"undefined"!=typeof window&&window.removeEventListener("beforeunload",hi),()=>{"undefined"!=typeof window&&window.removeEventListener("beforeunload",hi)})),"undefined"!=typeof window&&(window.addEventListener("popstate",t=>{if(ni())return window.history.pushState(window.history.state,"",ci.get()),void ei.set(window.history.state??null);const e=window.location.pathname;if(e!==ci.get()&&ai.trigger({to:e,from:ci.get()}),ni())return window.history.pushState(window.history.state,"",ci.get()),void ei.set(window.history.state??null);ei.set(t.state??null),e!==ci.get()&&ci.set(e)}),window.addEventListener("hashchange",()=>{if(ni())return;const t=window.location.pathname;t!==ci.get()&&ci.set(t)}),window.addEventListener("navigate",()=>{if(ni())return;const t=window.location.pathname;t!==ci.get()&&ci.set(t)}));const ui=t=>{const e=ci.get();if(e===t)return!0;const n=t.split("/").filter(Boolean),s=e.split("/").filter(Boolean);if(n.length!==s.length)return!1;for(let t=0;t<n.length;t++){const e=n[t],i=s[t];if(e.startsWith(":")){if(!i)return!1}else if(e!==i)return!1}return!0},di=t=>{const e=Xs(),n=()=>t().options,s=t().options.notFound?{path:"*",component:t().options.notFound}:null,i=()=>{const{routes:e}=t(),n=e.find(t=>ui(t.path));return n??s},o=i(),r=Es(o),a=Es(o);return Hs(()=>{const t=a();if(t===r.get())return;const s=e.value;if(!s)return void r.set(t);const i=n(),o=r.get();Bs({el:s,exit:o?.exit??i.exit??Jn(200),enter:t?.enter??i.enter??Qn(250),swap:()=>r.set(t),getEl:()=>e.value,isStale:()=>a.get()!==t})}),Hs(()=>{ci(),function(t){a.get()!==t&&a.set(t)}(i())}),Ge(()=>{const t=e.value;if(!t)return;const s=r.get(),i=n();Ws(t,s?.enter??i.enter??Qn(250))}),()=>{const t=r();return b`
|
|
113
113
|
<div style="position:relative;overflow:hidden">
|
|
114
|
-
<div ${
|
|
115
|
-
${t?
|
|
114
|
+
<div ${Zs(e)}>
|
|
115
|
+
${t?Gs(t.component,t.props??{}):C}
|
|
116
116
|
</div>
|
|
117
117
|
</div>
|
|
118
|
-
`}};function ci(t,e={}){return Ys(li,{routes:t,options:e})}function hi(...t){const[e,n]=t;return e.replace(/:([a-zA-Z_][a-zA-Z0-9_]*)/g,(t,e)=>{if(!n||!(e in n))throw new Error(`Missing parameter: "${e}"`);return String(n[e])})}const ui=()=>{if("undefined"==typeof window)return{};const t=window.location.hash.startsWith("#")?window.location.hash.slice(1):window.location.hash,e=new URLSearchParams(t),n={};for(const[t,s]of e)try{n[t]=JSON.parse(s)}catch{n[t]=s}return n},di=Es(ui());let fi=!1;Fs(()=>{const t=di();fi||Qs()||(t=>{if("undefined"==typeof window)return;const e=new URLSearchParams;for(const n in t){const s=t[n];null!=s&&e.set(n,"object"==typeof s?JSON.stringify(s):String(s))}const n=e.toString(),s=window.location.pathname+window.location.search+(n?`#${n}`:"");window.history.replaceState(null,"",s)})(t)});const pi=()=>{Qs()||(fi=!0,di.set(ui()),fi=!1)};function mi(t,e){if("undefined"==typeof window)return;const n=oi.get(),s=t.split("/"),i=n.split("/");if(s.length!==i.length)return void console.warn(`replaceParams: pattern "${t}" has ${s.length} segments but current path "${n}" has ${i.length}. No-op.`);const o=new Set(s.filter(t=>t.startsWith(":")).map(t=>t.slice(1)));for(const n of Object.keys(e))o.has(n)||console.warn(`replaceParams: param "${n}" not found in pattern "${t}".`);const r=i.map((t,n)=>{const i=s[n];if(!i.startsWith(":"))return t;const o=i.slice(1);return o in e?String(e[o]):t}),a=r.join("/");a!==n&&ni(a,!0)}"undefined"!=typeof window&&window.addEventListener("hashchange",pi);const _i=()=>{if("undefined"==typeof window)return{};const t=new URLSearchParams(window.location.search),e={};for(const[n,s]of t)try{e[n]=JSON.parse(s)}catch{e[n]=s}return e},gi=Es(_i());let yi=!1;Fs(()=>{const t=gi();yi||Qs()||(t=>{if("undefined"==typeof window)return;const e=new URLSearchParams;for(const n in t){const s=t[n];null!=s&&e.set(n,"object"==typeof s?JSON.stringify(s):String(s))}const n=e.toString(),s=window.location.pathname+(n?`?${n}`:"")+window.location.hash;window.history.replaceState(null,"",s)})(t)});const wi=()=>{Qs()||(yi=!0,gi.set(_i()),yi=!1)};"undefined"!=typeof window&&window.addEventListener("popstate",wi);const vi={get path(){return oi.get()},get hash(){return di()},get qsObj(){return gi()}},bi=(t,{view:e})=>ai(t)?e?qs(e,{}):C:null,Si=(t,e)=>{const n=t.find(t=>ai(t.path));if(void 0===n)return e?()=>Ys(e):()=>C;const{component:s}=n;return()=>Ys(s)};let Ei=null,Ci=null;function Ai(t){Ei=t}function ki(t){Ci=t}function Mi(){return Ei}function xi(){return Ci}class $i{constructor(){this.state="idle",this.__isZeroPromise__=!0,this.toActive()}isActive(){return"active"===this.state}isResolved(){return"resolved"===this.state}isRejected(){return"rejected"===this.state}isCancelled(){return"cancelled"===this.state}get signal(){return this.controller.signal}toActive(){return"active"===this.state||(this.state="active",this.controller=new AbortController,this.promise=new Promise((t,e)=>{this.resolveFn=t,this.rejectFn=e,this.controller.signal.addEventListener("abort",()=>{"active"===this.state&&(this.state="cancelled",e(new DOMException("Cancelled","AbortError")))})})),this}resolve(t){this.isActive()&&(this.state="resolved",this.resolveFn(t))}reject(t){this.isActive()&&(this.state="rejected",this.rejectFn(t))}cancel(t){this.isActive()&&this.controller.abort(t)}then(t,e){return this.promise.then(t,e)}catch(t){return this.promise.catch(t)}finally(t){return this.promise.finally(t)}get[Symbol.toStringTag](){return"ZeroPromise"}}const Ti={100:"CONTINUE",101:"SWITCHING_PROTOCOLS",102:"PROCESSING",103:"EARLY_HINTS",200:"OK",201:"CREATED",202:"ACCEPTED",203:"NON_AUTHORITATIVE_INFORMATION",204:"NO_CONTENT",205:"RESET_CONTENT",206:"PARTIAL_CONTENT",207:"MULTI_STATUS",208:"ALREADY_REPORTED",226:"IM_USED",300:"MULTIPLE_CHOICES",301:"MOVED_PERMANENTLY",302:"FOUND",303:"SEE_OTHER",304:"NOT_MODIFIED",305:"USE_PROXY",307:"TEMPORARY_REDIRECT",308:"PERMANENT_REDIRECT",400:"BAD_REQUEST",401:"UNAUTHORIZED",402:"PAYMENT_REQUIRED",403:"FORBIDDEN",404:"NOT_FOUND",405:"METHOD_NOT_ALLOWED",406:"NOT_ACCEPTABLE",407:"PROXY_AUTHENTICATION_REQUIRED",408:"REQUEST_TIMEOUT",409:"CONFLICT",410:"GONE",411:"LENGTH_REQUIRED",412:"PRECONDITION_FAILED",413:"PAYLOAD_TOO_LARGE",414:"URI_TOO_LONG",415:"UNSUPPORTED_MEDIA_TYPE",416:"RANGE_NOT_SATISFIABLE",417:"EXPECTATION_FAILED",418:"IM_A_TEAPOT",421:"MISDIRECTED_REQUEST",422:"UNPROCESSABLE_ENTITY",423:"LOCKED",424:"FAILED_DEPENDENCY",425:"TOO_EARLY",426:"UPGRADE_REQUIRED",428:"PRECONDITION_REQUIRED",429:"TOO_MANY_REQUESTS",431:"REQUEST_HEADER_FIELDS_TOO_LARGE",451:"UNAVAILABLE_FOR_LEGAL_REASONS",500:"INTERNAL_SERVER_ERROR",501:"NOT_IMPLEMENTED",502:"BAD_GATEWAY",503:"SERVICE_UNAVAILABLE",504:"GATEWAY_TIMEOUT",505:"HTTP_VERSION_NOT_SUPPORTED",506:"VARIANT_ALSO_NEGOTIATES",507:"INSUFFICIENT_STORAGE",508:"LOOP_DETECTED",510:"NOT_EXTENDED",511:"NETWORK_AUTHENTICATION_REQUIRED"};function Ri(t){return t>=200&&t<300}const Oi=Es(0);function Ii(){Oi.set(Oi.val+1)}function Pi(){Oi.set(Math.max(0,Oi.val-1))}function zi(){return Oi()}function Di(t){return"string"==typeof t?{url:t}:t}function Ni(t){const{url:e="",host:n="",path:s,params:i={}}=t,o=e||s||"",r=/^https?:\/\//i.test(o)?o:`${n}${o}`,{pathParams:a,qsParams:l}=function(t,e){const n=new Set;for(const[,e]of t.matchAll(/:([a-zA-Z_][a-zA-Z0-9_]*)/g))n.add(e);const s={},i={};for(const[t,o]of Object.entries(e))n.has(t)?s[t]=o:i[t]=o;return{pathParams:s,qsParams:i}}(r,i),c=Object.keys(a).length>0?hi(r,a):r;if(0===Object.keys(l).length)return c;let h,u;if(/^https?:\/\//i.test(c)){const t=new URL(c);h=t.origin+t.pathname,u=t.search}else{const t=c.indexOf("?");h=-1===t?c:c.slice(0,t),u=-1===t?"":c.slice(t)}const d=new URLSearchParams(u);for(const[t,e]of Object.entries(l))null!=e&&(Array.isArray(e)?e.forEach(e=>d.append(t,String(e))):d.set(t,String(e)));const f=d.toString();return f?`${h}?${f}`:h}function Li(t,e){return t.add(e),()=>t.delete(e)}const ji=new Set,Ui=new Set,Fi=new Set,Vi=t=>Li(ji,t),Wi=t=>Li(Ui,t),Bi=t=>Li(Fi,t),Hi=()=>{ji.clear(),Ui.clear(),Fi.clear()};class Yi{constructor(t={}){this.instanceBeforeFns=[],this.instanceAfterFns=[],this.instanceErrorFns=[],this.baseRequest=t}interceptBefore(t){return this.instanceBeforeFns.push(t),()=>{const e=this.instanceBeforeFns.indexOf(t);-1!==e&&this.instanceBeforeFns.splice(e,1)}}interceptAfter(t){return this.instanceAfterFns.push(t),()=>{const e=this.instanceAfterFns.indexOf(t);-1!==e&&this.instanceAfterFns.splice(e,1)}}interceptError(t){return this.instanceErrorFns.push(t),()=>{const e=this.instanceErrorFns.indexOf(t);-1!==e&&this.instanceErrorFns.splice(e,1)}}clearInterceptors(){this.instanceBeforeFns.length=0,this.instanceAfterFns.length=0,this.instanceErrorFns.length=0}fetch(t){const e=new $i,n={...this.baseRequest,...t,headers:{...this.baseRequest.headers,...t.headers},params:{...this.baseRequest.params,...t.params}},{body:s,url:i,host:o,params:r,path:a,...l}=n,c=Ni(n),h=function(t){return null==t?{}:"string"==typeof t||t instanceof FormData||t instanceof Blob||t instanceof ArrayBuffer||ArrayBuffer.isView(t)||t instanceof URLSearchParams||t instanceof ReadableStream?{body:t}:{body:JSON.stringify(t),headers:{"Content-Type":"application/json"}}}(s),u=(n.method??"GET").toUpperCase(),d=Mi(),f=xi();if(Pe()&&d){let t;try{t=c.startsWith("http")?new URL(c).pathname:c.split("?")[0]}catch{t=c.split("?")[0]}if(t.startsWith("/api")){const n=d(u,t);if(n){je();const t={"content-type":"application/json",...l.headers,...h.headers};if(f){const e=f.headers.get("cookie"),n=f.headers.get("authorization");e&&(t.cookie=e),n&&(t.authorization=n)}const s=new Request(c.startsWith("http")?c:`http://localhost${c}`,{method:u,headers:t,body:h.body??null});return n.handler(s,n.ctx).then(async t=>{if(!t.ok){const n=Ti[t.status]||"UNKNOWN_ERROR";return e.reject(new Error(`${n}: ${t.statusText}`)),void Ue()}const n=t.headers.get("content-type");n?.includes("application/json")?e.resolve(await t.json()):e.resolve(t),Ue()}).catch(t=>{e.reject(t),Ue()}),e}}}return(async()=>{let t,n=c,s={...l,method:u,...h,headers:{...l.headers,...h.headers}};0===Object.keys(s.headers).length&&delete s.headers,Ii();for(const t of this.instanceBeforeFns){const e=await t(n,s);n=e.url,s=e.options}for(const t of ji){const e=await t(n,s);n=e.url,s=e.options}try{t=await fetch(n,{...s,signal:e.signal})}catch(t){for(const e of this.instanceErrorFns)try{e(t)}catch(t){}for(const e of Fi)try{e(t)}catch(t){}return Pi(),void e.reject(t)}let i=t;for(const t of this.instanceAfterFns)i=await t(i);for(const t of Ui)i=await t(i);if(Pi(),!i.ok){const t=Ti[i.status]||"UNKNOWN_ERROR",n=new Error(`${t}: ${i.statusText}`);for(const t of this.instanceErrorFns)try{t(n)}catch(t){}for(const t of Fi)try{t(n)}catch(t){}return Pi(),void e.reject(n)}const o=i.headers.get("content-type");if(o?.includes("application/json")){const t=await i.json();if(t&&"object"==typeof t&&"Redirect"===t.__type&&"string"==typeof t.url){const n=t.url;return"undefined"!=typeof window&&(window.location.href=n),void e.resolve(void 0)}e.resolve(t)}else e.resolve(i)})().catch(t=>e.reject(t)),e}Fetch(t){return this.fetch(t)}Get(t){return this.fetch({...t,method:"GET"})}Post(t){return this.fetch({...t,method:"POST"})}Put(t){return this.fetch({...t,method:"PUT"})}Patch(t){return this.fetch({...t,method:"PATCH"})}Delete(t){return this.fetch({...t,method:"DELETE"})}fetchAction(t){const{baseRequest:e,options:n}=function(t){if(!t)return{baseRequest:{},options:{}};const{cacheDuration:e,cacheLimit:n,pollInterval:s,allowInRestrictedContext:i,...o}=t;return{baseRequest:o,options:{...void 0!==e&&{cacheDuration:e},...void 0!==n&&{cacheLimit:n},...void 0!==s&&{pollInterval:s},...void 0!==i&&{allowInRestrictedContext:i}}}}(t);return Ts(t=>this.fetch({...e,params:{...e.params,...t}}),n)}getAction(t){return this.fetchAction({...t,method:"GET"})}postAction(t){return this.fetchAction({...t,method:"POST"})}putAction(t){return this.fetchAction({...t,method:"PUT"})}patchAction(t){return this.fetchAction({...t,method:"PATCH"})}deleteAction(t){return this.fetchAction({...t,method:"DELETE"})}}const qi=new Yi({});async function Xi(t,e){let n,s=t,i=e;for(const t of ji){const e=await t(s,i);s=e.url,i=e.options}try{n=await fetch(s,i)}catch(t){for(const e of Fi)try{e(t)}catch{}throw t}for(const t of Ui)n=await t(n);if(!n.ok){const t=new Error(`${n.status} ${n.statusText}`);for(const e of Fi)try{e(t)}catch{}}return n}function Zi(t){return async(e,n)=>({url:e,options:{...n,headers:{...n.headers,Authorization:"string"==typeof t?t:await t()}}})}function Gi(t){return(e,n)=>({url:e.startsWith("http")?e:`${t}${e}`,options:n})}function Ki(t=console.log){return e=>(t(`[fetch] ${e.status} ${e.url}`),e)}const Qi=t=>qi.fetch(Di(t)),Ji=t=>qi.Get(Di(t)),to=t=>qi.Post(Di(t)),eo=t=>qi.Put(Di(t)),no=t=>qi.Patch(Di(t)),so=t=>qi.Delete(Di(t)),io=t=>qi.fetchAction(t),oo=t=>qi.getAction(t),ro=t=>qi.postAction(t),ao=t=>qi.putAction(t),lo=t=>qi.patchAction(t),co=t=>qi.deleteAction(t),ho="mates-theme";function uo(t){return"auto"===t?function(){try{return window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}catch{return"light"}}():t}const fo=function(){const t=Es(function(){try{const t=localStorage.getItem(ho);return"light"===t||"dark"===t||"auto"===t?t:null}catch{return null}}()??"auto",{skipRestrictedContextCheck:!0}),e=t;return e.setToLight=()=>{t.set("light")},e.setToDark=()=>{t.set("dark")},e.setToAuto=()=>{t.set("auto")},e.toggle=()=>{const e=uo(t.get());t.set("dark"===e?"light":"dark")},Object.defineProperty(e,"resolved",{get:()=>uo(t.get()),enumerable:!1,configurable:!0}),Object.defineProperty(e,"name",{value:"themeAtom",writable:!0,configurable:!0,enumerable:!1}),Fs(()=>{const e=t.get();!function(t){try{document.documentElement.setAttribute("data-theme",uo(t))}catch{}}(e),function(t){try{"auto"===t?localStorage.removeItem(ho):localStorage.setItem(ho,t)}catch{}}(e)}),"undefined"!=typeof window&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").addEventListener("change",()=>{"auto"===t.get()&&t.set("auto")}),e}();function po(t){return t.startsWith("--")?t:`--${t}`}function mo(t,e){let n="";for(const t in e){n+=` ${po(t)}: ${e[t]};\n`}return n?`${t} {\n${n}}`:""}function _o(t){const e=Object.keys(t);if(0===e.length)throw new Error("[globalTheme] themes object must have at least one entry.");const n=e[0],s=e[1],i=t[n],o=[];o.push(mo(":root",i));for(const n of e)o.push(mo(`[data-theme="${n}"]`,t[n]));void 0!==s&&o.push(function(t){let e="";for(const n in t)e+=` ${po(n)}: ${t[n]};\n`;return e?`@media (prefers-color-scheme: dark) {\n :root:not([data-theme]) {\n${e} }\n}`:""}(t[s])),Bn();const r=Wn(),a=o.filter(Boolean).join("\n");a&&r.appendRules(a);const l=Object.create(null);for(const t in i)l[t]=po(t);return{cssVars:Object.freeze(l),themeAtom:fo}}function go(t){Bn();const e=Wn(),n=mo(":root",t);return n&&e.appendRules(n),t}function yo(t){if(null==t)return{action:"remove"};if("boolean"==typeof t)return t?{action:"set",value:""}:{action:"remove"};if("string"==typeof t)return{action:"set",value:t};if("number"==typeof t)return{action:"set",value:String(t)};if(Array.isArray(t)){if(2===t.length){const[e,n]=t;return e?"boolean"==typeof n?n?{action:"set",value:""}:{action:"remove"}:{action:"set",value:String(n)}:{action:"remove"}}if(3===t.length){const[e,n,s]=t,i=e?n:s;return"boolean"==typeof i?i?{action:"set",value:""}:{action:"remove"}:{action:"set",value:String(i)}}}return{action:"remove"}}function wo(t){return t.startsWith("--")?t:t.replace(/[A-Z]/g,t=>`-${t.toLowerCase()}`)}function vo(t){if(null==t||!1===t)return null;if("string"==typeof t)return t;if("number"==typeof t)return String(t);if(Array.isArray(t)){if(2===t.length){const[e,n]=t;return e?String(n):null}if(3===t.length){const[e,n,s]=t;return String(e?n:s)}}return null}const bo=new WeakMap,So=new WeakMap,Eo=new WeakMap,Co=new WeakMap;class Ao{constructor(t){this.el=t}attr(t){const e=this.el;bo.has(e)||bo.set(e,new Map);const n=bo.get(e),s=new Map;for(const[i,o]of Object.entries(t)){const t=yo(o);"set"===t.action?(n.get(i)!==t.value&&e.setAttribute(i,t.value),s.set(i,t.value)):n.has(i)&&e.removeAttribute(i)}for(const t of n.keys())s.has(t)||e.removeAttribute(t);return bo.set(e,s),this}updateAttr(t){const e=this.el;bo.has(e)||bo.set(e,new Map);const n=bo.get(e),s=Object.fromEntries(n);t(s);const i=new Map;for(const[t,o]of Object.entries(s))n.get(t)!==o&&e.setAttribute(t,o),i.set(t,o);for(const t of n.keys())i.has(t)||e.removeAttribute(t);return bo.set(e,i),this}style(t){const e=this.el;So.has(e)||So.set(e,new Map);const n=So.get(e),s=new Map;for(const[i,o]of Object.entries(t)){const t=vo(o),r=wo(i);null!==t?(n.get(r)!==t&&e.style.setProperty(r,t),s.set(r,t)):n.has(r)&&e.style.removeProperty(r)}for(const t of n.keys())s.has(t)||e.style.removeProperty(t);return So.set(e,s),this}classes(t){const e=this.el;Eo.has(e)||Eo.set(e,new Set);const n=Eo.get(e),s=function(t){const e=new Set,n=t=>{for(const n of t.split(/\s+/))n&&e.add(n)};if("string"==typeof t)return n(t),e;if(Array.isArray(t)){for(const e of t)if(e||0===e)if("string"!=typeof e){if(Array.isArray(e))if(2===e.length){const[t,s]=e;t&&s&&n(s)}else if(3===e.length){const[t,s,i]=e;n(t?s:i)}}else n(e);return e}if("object"==typeof t&&null!==t)for(const[e,s]of Object.entries(t))s&&n(e);return e}(t);for(const t of s)n.has(t)||e.classList.add(t);for(const t of n)s.has(t)||e.classList.remove(t);return Eo.set(e,s),this}addClass(t){const e=this.el;for(const n of t.split(/\s+/))n&&e.classList.add(n);return this}removeClass(t){const e=this.el;for(const n of t.split(/\s+/))n&&e.classList.remove(n);return this}toggleClass(t,e){const n=this.el;for(const s of t.split(/\s+/))s&&n.classList.toggle(s,e);return this}html(t){if(null==t)throw new Error("$(el).html() — the factory function must return a lit-html TemplateResult (e.g. () => html`<span>${value}</span>`).");return U(t,this.el),this}text(t){return this.el.textContent=String(t),this}focus(t){return this.el.focus(t),this}blur(){return this.el.blur(),this}scroll(t){const e=this.el;return"string"==typeof t?e.scrollTo({top:0,behavior:t}):t?e.scrollTo(t):e.scrollTo({top:0}),this}scrollIntoView(t){return this.el.scrollIntoView(t),this}measure(t){const e=this.el.getBoundingClientRect();return t({width:e.width,height:e.height,top:e.top,left:e.left,right:e.right,bottom:e.bottom,x:e.x,y:e.y}),this}on(t,e,n){const s=this.el;Co.has(s)||Co.set(s,new Map);const i=Co.get(s),o=i.get(t);o&&s.removeEventListener(t,o.handler,o.options);const r=e;return s.addEventListener(t,r,n),i.set(t,{handler:r,options:n}),this}off(t,e){const n=this.el,s=Co.get(n);if(!s)return this;if(e){const i=s.get(t);i&&i.handler===e&&(n.removeEventListener(t,i.handler,i.options),s.delete(t))}else{const e=s.get(t);e&&(n.removeEventListener(t,e.handler,e.options),s.delete(t))}return this}once(t,e,n){const s="object"==typeof n?{...n,once:!0}:{once:!0};return this.el.addEventListener(t,e,s),this}delegate(t,e,n,s){const i=t=>{const s=t.target?.closest(e);s&&this.el.contains(s)&&n(t,s)};return this.el.addEventListener(t,i,s),Co.has(this.el)||Co.set(this.el,new Map),Co.get(this.el).set(`${t}:delegate:${e}`,{handler:i,options:s}),this}aria(t){const e=this.el;for(const[n,s]of Object.entries(t)){const t=n.startsWith("aria-")?n:`aria-${n}`;null==s||!1===s?e.removeAttribute(t):e.setAttribute(t,String(s))}return this}getAttr(t){return this.el.getAttribute(t)}data(t){const e=this.el;for(const[n,s]of Object.entries(t)){const t=n.startsWith("data-")?n.slice(5):n,i=n.startsWith("data-")?n:`data-${n}`;null==s?e.removeAttribute(i):e.setAttribute(i,String(s));const o=t.replace(/-([a-z])/g,(t,e)=>e.toUpperCase());null==s?delete e.dataset[o]:e.dataset[o]=String(s)}return this}}function ko(t){if(null!==t&&"object"==typeof t&&!0===t.__isMatesRef__){const e=t;if(void 0===e.value)throw new Error("$(ref): the ref has no element attached yet (ref.value is undefined).\nDOM manipulation via $() must happen after the element has mounted.\nUse one of the lifecycle hooks where the element is guaranteed to exist:\n • onMount() — runs once after the component's first render\n • onPaint() — runs after the browser has painted\n • onUpdate() — runs after every subsequent re-render\n\nExample:\n const inputRef = ref<HTMLInputElement>();\n onMount(() => { $(inputRef).focus(); });");return new Ao(e.value)}return new Ao(t)}const Mo=t=>{const e=Bs(),n=t().condition,s=Es(n),i=Es(n);return Fs(()=>{const n=i();if(n===s.get())return;const o=e.value;if(!o)return void s.set(n);const r=t().config;Us({el:o,exit:r?.exit??Jn(200),enter:r?.enter??Qn(250),swap:()=>s.set(n),getEl:()=>e.value,isStale:()=>i.get()!==n})}),Ge(()=>{const n=e.value;if(!n)return;const s=t().config;js(n,s?.enter??Qn(250))}),()=>{const n=s(),{condition:o,trueTpl:r,falseTpl:a}=t();return i.get()!==o&&i.set(o),b`
|
|
119
|
-
<div ${
|
|
118
|
+
`}};function fi(t,e={}){return Gs(di,{routes:t,options:e})}function pi(...t){const[e,n]=t;return e.replace(/:([a-zA-Z_][a-zA-Z0-9_]*)/g,(t,e)=>{if(!n||!(e in n))throw new Error(`Missing parameter: "${e}"`);return String(n[e])})}const mi=()=>{if("undefined"==typeof window)return{};const t=window.location.hash.startsWith("#")?window.location.hash.slice(1):window.location.hash,e=new URLSearchParams(t),n={};for(const[t,s]of e)try{n[t]=JSON.parse(s)}catch{n[t]=s}return n},_i=Es(mi());let gi=!1;Hs(()=>{const t=_i();gi||ni()||(t=>{if("undefined"==typeof window)return;const e=new URLSearchParams;for(const n in t){const s=t[n];null!=s&&e.set(n,"object"==typeof s?JSON.stringify(s):String(s))}const n=e.toString(),s=window.location.pathname+window.location.search+(n?`#${n}`:"");window.history.replaceState(null,"",s)})(t)});const yi=()=>{ni()||(gi=!0,_i.set(mi()),gi=!1)};function wi(t,e){if("undefined"==typeof window)return;const n=ci.get(),s=t.split("/"),i=n.split("/");if(s.length!==i.length)return void console.warn(`replaceParams: pattern "${t}" has ${s.length} segments but current path "${n}" has ${i.length}. No-op.`);const o=new Set(s.filter(t=>t.startsWith(":")).map(t=>t.slice(1)));for(const n of Object.keys(e))o.has(n)||console.warn(`replaceParams: param "${n}" not found in pattern "${t}".`);const r=i.map((t,n)=>{const i=s[n];if(!i.startsWith(":"))return t;const o=i.slice(1);return o in e?String(e[o]):t}),a=r.join("/");a!==n&&ri(a,!0)}"undefined"!=typeof window&&window.addEventListener("hashchange",yi);const vi=()=>{if("undefined"==typeof window)return{};const t=new URLSearchParams(window.location.search),e={};for(const[n,s]of t)try{e[n]=JSON.parse(s)}catch{e[n]=s}return e},bi=Es(vi());let Si=!1;Hs(()=>{const t=bi();Si||ni()||(t=>{if("undefined"==typeof window)return;const e=new URLSearchParams;for(const n in t){const s=t[n];null!=s&&e.set(n,"object"==typeof s?JSON.stringify(s):String(s))}const n=e.toString(),s=window.location.pathname+(n?`?${n}`:"")+window.location.hash;window.history.replaceState(null,"",s)})(t)});const Ei=()=>{ni()||(Si=!0,bi.set(vi()),Si=!1)};"undefined"!=typeof window&&window.addEventListener("popstate",Ei);const Ci={get path(){return ci.get()},get hash(){return _i()},get qsObj(){return bi()}},Ai=(t,{view:e})=>ui(t)?e?Ks(e,{}):C:null,ki=(t,e)=>{const n=t.find(t=>ui(t.path));if(void 0===n)return e?()=>Gs(e):()=>C;const{component:s}=n;return()=>Gs(s)};let Mi=null,xi=null;function $i(t){Mi=t}function Ti(t){xi=t}function Ri(){return Mi}function Oi(){return xi}class Ii{constructor(){this.state="idle",this.__isZeroPromise__=!0,this.toActive()}isActive(){return"active"===this.state}isResolved(){return"resolved"===this.state}isRejected(){return"rejected"===this.state}isCancelled(){return"cancelled"===this.state}get signal(){return this.controller.signal}toActive(){return"active"===this.state||(this.state="active",this.controller=new AbortController,this.promise=new Promise((t,e)=>{this.resolveFn=t,this.rejectFn=e,this.controller.signal.addEventListener("abort",()=>{"active"===this.state&&(this.state="cancelled",e(new DOMException("Cancelled","AbortError")))})})),this}resolve(t){this.isActive()&&(this.state="resolved",this.resolveFn(t))}reject(t){this.isActive()&&(this.state="rejected",this.rejectFn(t))}cancel(t){this.isActive()&&this.controller.abort(t)}then(t,e){return this.promise.then(t,e)}catch(t){return this.promise.catch(t)}finally(t){return this.promise.finally(t)}get[Symbol.toStringTag](){return"ZeroPromise"}}const Pi={100:"CONTINUE",101:"SWITCHING_PROTOCOLS",102:"PROCESSING",103:"EARLY_HINTS",200:"OK",201:"CREATED",202:"ACCEPTED",203:"NON_AUTHORITATIVE_INFORMATION",204:"NO_CONTENT",205:"RESET_CONTENT",206:"PARTIAL_CONTENT",207:"MULTI_STATUS",208:"ALREADY_REPORTED",226:"IM_USED",300:"MULTIPLE_CHOICES",301:"MOVED_PERMANENTLY",302:"FOUND",303:"SEE_OTHER",304:"NOT_MODIFIED",305:"USE_PROXY",307:"TEMPORARY_REDIRECT",308:"PERMANENT_REDIRECT",400:"BAD_REQUEST",401:"UNAUTHORIZED",402:"PAYMENT_REQUIRED",403:"FORBIDDEN",404:"NOT_FOUND",405:"METHOD_NOT_ALLOWED",406:"NOT_ACCEPTABLE",407:"PROXY_AUTHENTICATION_REQUIRED",408:"REQUEST_TIMEOUT",409:"CONFLICT",410:"GONE",411:"LENGTH_REQUIRED",412:"PRECONDITION_FAILED",413:"PAYLOAD_TOO_LARGE",414:"URI_TOO_LONG",415:"UNSUPPORTED_MEDIA_TYPE",416:"RANGE_NOT_SATISFIABLE",417:"EXPECTATION_FAILED",418:"IM_A_TEAPOT",421:"MISDIRECTED_REQUEST",422:"UNPROCESSABLE_ENTITY",423:"LOCKED",424:"FAILED_DEPENDENCY",425:"TOO_EARLY",426:"UPGRADE_REQUIRED",428:"PRECONDITION_REQUIRED",429:"TOO_MANY_REQUESTS",431:"REQUEST_HEADER_FIELDS_TOO_LARGE",451:"UNAVAILABLE_FOR_LEGAL_REASONS",500:"INTERNAL_SERVER_ERROR",501:"NOT_IMPLEMENTED",502:"BAD_GATEWAY",503:"SERVICE_UNAVAILABLE",504:"GATEWAY_TIMEOUT",505:"HTTP_VERSION_NOT_SUPPORTED",506:"VARIANT_ALSO_NEGOTIATES",507:"INSUFFICIENT_STORAGE",508:"LOOP_DETECTED",510:"NOT_EXTENDED",511:"NETWORK_AUTHENTICATION_REQUIRED"};function zi(t){return t>=200&&t<300}function Di(t){return"string"==typeof t?{url:t}:t}function Ni(t){const{url:e="",host:n="",path:s,params:i={}}=t,o=e||s||"",r=/^https?:\/\//i.test(o)?o:`${n}${o}`,{pathParams:a,qsParams:l}=function(t,e){const n=new Set;for(const[,e]of t.matchAll(/:([a-zA-Z_][a-zA-Z0-9_]*)/g))n.add(e);const s={},i={};for(const[t,o]of Object.entries(e))n.has(t)?s[t]=o:i[t]=o;return{pathParams:s,qsParams:i}}(r,i),c=Object.keys(a).length>0?pi(r,a):r;if(0===Object.keys(l).length)return c;let h,u;if(/^https?:\/\//i.test(c)){const t=new URL(c);h=t.origin+t.pathname,u=t.search}else{const t=c.indexOf("?");h=-1===t?c:c.slice(0,t),u=-1===t?"":c.slice(t)}const d=new URLSearchParams(u);for(const[t,e]of Object.entries(l))null!=e&&(Array.isArray(e)?e.forEach(e=>d.append(t,String(e))):d.set(t,String(e)));const f=d.toString();return f?`${h}?${f}`:h}function Li(t,e){return t.add(e),()=>t.delete(e)}const ji=new Set,Ui=new Set,Fi=new Set,Vi=t=>Li(ji,t),Wi=t=>Li(Ui,t),Bi=t=>Li(Fi,t),Hi=()=>{ji.clear(),Ui.clear(),Fi.clear()};class Yi{constructor(t={}){this.instanceBeforeFns=[],this.instanceAfterFns=[],this.instanceErrorFns=[],this.baseRequest=t}interceptBefore(t){return this.instanceBeforeFns.push(t),()=>{const e=this.instanceBeforeFns.indexOf(t);-1!==e&&this.instanceBeforeFns.splice(e,1)}}interceptAfter(t){return this.instanceAfterFns.push(t),()=>{const e=this.instanceAfterFns.indexOf(t);-1!==e&&this.instanceAfterFns.splice(e,1)}}interceptError(t){return this.instanceErrorFns.push(t),()=>{const e=this.instanceErrorFns.indexOf(t);-1!==e&&this.instanceErrorFns.splice(e,1)}}clearInterceptors(){this.instanceBeforeFns.length=0,this.instanceAfterFns.length=0,this.instanceErrorFns.length=0}fetch(t){const e=new Ii,n={...this.baseRequest,...t,headers:{...this.baseRequest.headers,...t.headers},params:{...this.baseRequest.params,...t.params}},{body:s,url:i,host:o,params:r,path:a,...l}=n,c=Ni(n),h=function(t){return null==t?{}:"string"==typeof t||t instanceof FormData||t instanceof Blob||t instanceof ArrayBuffer||ArrayBuffer.isView(t)||t instanceof URLSearchParams||t instanceof ReadableStream?{body:t}:{body:JSON.stringify(t),headers:{"Content-Type":"application/json"}}}(s),u=(n.method??"GET").toUpperCase(),d=Ri(),f=Oi();if(Pe()&&d){let t;try{t=c.startsWith("http")?new URL(c).pathname:c.split("?")[0]}catch{t=c.split("?")[0]}if(t.startsWith("/api")){const n=d(u,t);if(n){je();const t={"content-type":"application/json",...l.headers,...h.headers};if(f){const e=f.headers.get("cookie"),n=f.headers.get("authorization");e&&(t.cookie=e),n&&(t.authorization=n)}const s=new Request(c.startsWith("http")?c:`http://localhost${c}`,{method:u,headers:t,body:h.body??null});return n.handler(s,n.ctx).then(async t=>{if(!t.ok){const n=Pi[t.status]||"UNKNOWN_ERROR";return e.reject(new Error(`${n}: ${t.statusText}`)),void Ue()}const n=t.headers.get("content-type");n?.includes("application/json")?e.resolve(await t.json()):e.resolve(t),Ue()}).catch(t=>{e.reject(t),Ue()}),e}}}return(async()=>{let t,n=c,s={...l,method:u,...h,headers:{...l.headers,...h.headers}};0===Object.keys(s.headers).length&&delete s.headers,$s();for(const t of this.instanceBeforeFns){const e=await t(n,s);n=e.url,s=e.options}for(const t of ji){const e=await t(n,s);n=e.url,s=e.options}try{t=await fetch(n,{...s,signal:e.signal})}catch(t){for(const e of this.instanceErrorFns)try{e(t)}catch(t){}for(const e of Fi)try{e(t)}catch(t){}return Ts(),void e.reject(t)}let i=t;for(const t of this.instanceAfterFns)i=await t(i);for(const t of Ui)i=await t(i);if(Ts(),!i.ok){const t=Pi[i.status]||"UNKNOWN_ERROR",n=new Error(`${t}: ${i.statusText}`);for(const t of this.instanceErrorFns)try{t(n)}catch(t){}for(const t of Fi)try{t(n)}catch(t){}return Ts(),void e.reject(n)}const o=i.headers.get("content-type");if(o?.includes("application/json")){const t=await i.json();if(t&&"object"==typeof t&&"Redirect"===t.__type&&"string"==typeof t.url){const n=t.url;return"undefined"!=typeof window&&(window.location.href=n),void e.resolve(void 0)}e.resolve(t)}else e.resolve(i)})().catch(t=>e.reject(t)),e}Fetch(t){return this.fetch(t)}Get(t){return this.fetch({...t,method:"GET"})}Post(t){return this.fetch({...t,method:"POST"})}Put(t){return this.fetch({...t,method:"PUT"})}Patch(t){return this.fetch({...t,method:"PATCH"})}Delete(t){return this.fetch({...t,method:"DELETE"})}fetchAction(t){const{baseRequest:e,options:n}=function(t){if(!t)return{baseRequest:{},options:{}};const{cacheDuration:e,cacheLimit:n,pollInterval:s,allowInRestrictedContext:i,...o}=t;return{baseRequest:o,options:{...void 0!==e&&{cacheDuration:e},...void 0!==n&&{cacheLimit:n},...void 0!==s&&{pollInterval:s},...void 0!==i&&{allowInRestrictedContext:i}}}}(t);return Ps(t=>this.fetch({...e,params:{...e.params,...t}}),n)}getAction(t){return this.fetchAction({...t,method:"GET"})}postAction(t){return this.fetchAction({...t,method:"POST"})}putAction(t){return this.fetchAction({...t,method:"PUT"})}patchAction(t){return this.fetchAction({...t,method:"PATCH"})}deleteAction(t){return this.fetchAction({...t,method:"DELETE"})}}const qi=new Yi({});async function Xi(t,e){let n,s=t,i=e;for(const t of ji){const e=await t(s,i);s=e.url,i=e.options}try{n=await fetch(s,i)}catch(t){for(const e of Fi)try{e(t)}catch{}throw t}for(const t of Ui)n=await t(n);if(!n.ok){const t=new Error(`${n.status} ${n.statusText}`);for(const e of Fi)try{e(t)}catch{}}return n}function Zi(t){return async(e,n)=>({url:e,options:{...n,headers:{...n.headers,Authorization:"string"==typeof t?t:await t()}}})}function Gi(t){return(e,n)=>({url:e.startsWith("http")?e:`${t}${e}`,options:n})}function Ki(t=console.log){return e=>(t(`[fetch] ${e.status} ${e.url}`),e)}const Qi=t=>qi.fetch(Di(t)),Ji=t=>qi.Get(Di(t)),to=t=>qi.Post(Di(t)),eo=t=>qi.Put(Di(t)),no=t=>qi.Patch(Di(t)),so=t=>qi.Delete(Di(t)),io=t=>qi.fetchAction(t),oo=t=>qi.getAction(t),ro=t=>qi.postAction(t),ao=t=>qi.putAction(t),lo=t=>qi.patchAction(t),co=t=>qi.deleteAction(t),ho="mates-theme";function uo(t){return"auto"===t?function(){try{return window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}catch{return"light"}}():t}const fo=function(){const t=Es(function(){try{const t=localStorage.getItem(ho);return"light"===t||"dark"===t||"auto"===t?t:null}catch{return null}}()??"auto",{skipRestrictedContextCheck:!0}),e=t;return e.setToLight=()=>{t.set("light")},e.setToDark=()=>{t.set("dark")},e.setToAuto=()=>{t.set("auto")},e.toggle=()=>{const e=uo(t.get());t.set("dark"===e?"light":"dark")},Object.defineProperty(e,"resolved",{get:()=>uo(t.get()),enumerable:!1,configurable:!0}),Object.defineProperty(e,"name",{value:"themeAtom",writable:!0,configurable:!0,enumerable:!1}),Hs(()=>{const e=t.get();!function(t){try{document.documentElement.setAttribute("data-theme",uo(t))}catch{}}(e),function(t){try{"auto"===t?localStorage.removeItem(ho):localStorage.setItem(ho,t)}catch{}}(e)}),"undefined"!=typeof window&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").addEventListener("change",()=>{"auto"===t.get()&&t.set("auto")}),e}();function po(t){return t.startsWith("--")?t:`--${t}`}function mo(t,e){let n="";for(const t in e){n+=` ${po(t)}: ${e[t]};\n`}return n?`${t} {\n${n}}`:""}function _o(t){const e=Object.keys(t);if(0===e.length)throw new Error("[globalTheme] themes object must have at least one entry.");const n=e[0],s=e[1],i=t[n],o=[];o.push(mo(":root",i));for(const n of e)o.push(mo(`[data-theme="${n}"]`,t[n]));void 0!==s&&o.push(function(t){let e="";for(const n in t)e+=` ${po(n)}: ${t[n]};\n`;return e?`@media (prefers-color-scheme: dark) {\n :root:not([data-theme]) {\n${e} }\n}`:""}(t[s])),Bn();const r=Wn(),a=o.filter(Boolean).join("\n");a&&r.appendRules(a);const l=Object.create(null);for(const t in i)l[t]=po(t);return{cssVars:Object.freeze(l),themeAtom:fo}}function go(t){Bn();const e=Wn(),n=mo(":root",t);return n&&e.appendRules(n),t}function yo(t){if(null==t)return{action:"remove"};if("boolean"==typeof t)return t?{action:"set",value:""}:{action:"remove"};if("string"==typeof t)return{action:"set",value:t};if("number"==typeof t)return{action:"set",value:String(t)};if(Array.isArray(t)){if(2===t.length){const[e,n]=t;return e?"boolean"==typeof n?n?{action:"set",value:""}:{action:"remove"}:{action:"set",value:String(n)}:{action:"remove"}}if(3===t.length){const[e,n,s]=t,i=e?n:s;return"boolean"==typeof i?i?{action:"set",value:""}:{action:"remove"}:{action:"set",value:String(i)}}}return{action:"remove"}}function wo(t){return t.startsWith("--")?t:t.replace(/[A-Z]/g,t=>`-${t.toLowerCase()}`)}function vo(t){if(null==t||!1===t)return null;if("string"==typeof t)return t;if("number"==typeof t)return String(t);if(Array.isArray(t)){if(2===t.length){const[e,n]=t;return e?String(n):null}if(3===t.length){const[e,n,s]=t;return String(e?n:s)}}return null}const bo=new WeakMap,So=new WeakMap,Eo=new WeakMap,Co=new WeakMap;class Ao{constructor(t){this.el=t}attr(t){const e=this.el;bo.has(e)||bo.set(e,new Map);const n=bo.get(e),s=new Map;for(const[i,o]of Object.entries(t)){const t=yo(o);"set"===t.action?(n.get(i)!==t.value&&e.setAttribute(i,t.value),s.set(i,t.value)):n.has(i)&&e.removeAttribute(i)}for(const t of n.keys())s.has(t)||e.removeAttribute(t);return bo.set(e,s),this}updateAttr(t){const e=this.el;bo.has(e)||bo.set(e,new Map);const n=bo.get(e),s=Object.fromEntries(n);t(s);const i=new Map;for(const[t,o]of Object.entries(s))n.get(t)!==o&&e.setAttribute(t,o),i.set(t,o);for(const t of n.keys())i.has(t)||e.removeAttribute(t);return bo.set(e,i),this}style(t){const e=this.el;So.has(e)||So.set(e,new Map);const n=So.get(e),s=new Map;for(const[i,o]of Object.entries(t)){const t=vo(o),r=wo(i);null!==t?(n.get(r)!==t&&e.style.setProperty(r,t),s.set(r,t)):n.has(r)&&e.style.removeProperty(r)}for(const t of n.keys())s.has(t)||e.style.removeProperty(t);return So.set(e,s),this}classes(t){const e=this.el;Eo.has(e)||Eo.set(e,new Set);const n=Eo.get(e),s=function(t){const e=new Set,n=t=>{for(const n of t.split(/\s+/))n&&e.add(n)};if("string"==typeof t)return n(t),e;if(Array.isArray(t)){for(const e of t)if(e||0===e)if("string"!=typeof e){if(Array.isArray(e))if(2===e.length){const[t,s]=e;t&&s&&n(s)}else if(3===e.length){const[t,s,i]=e;n(t?s:i)}}else n(e);return e}if("object"==typeof t&&null!==t)for(const[e,s]of Object.entries(t))s&&n(e);return e}(t);for(const t of s)n.has(t)||e.classList.add(t);for(const t of n)s.has(t)||e.classList.remove(t);return Eo.set(e,s),this}addClass(t){const e=this.el;for(const n of t.split(/\s+/))n&&e.classList.add(n);return this}removeClass(t){const e=this.el;for(const n of t.split(/\s+/))n&&e.classList.remove(n);return this}toggleClass(t,e){const n=this.el;for(const s of t.split(/\s+/))s&&n.classList.toggle(s,e);return this}html(t){if(null==t)throw new Error("$(el).html() — the factory function must return a lit-html TemplateResult (e.g. () => html`<span>${value}</span>`).");return U(t,this.el),this}text(t){return this.el.textContent=String(t),this}focus(t){return this.el.focus(t),this}blur(){return this.el.blur(),this}scroll(t){const e=this.el;return"string"==typeof t?e.scrollTo({top:0,behavior:t}):t?e.scrollTo(t):e.scrollTo({top:0}),this}scrollIntoView(t){return this.el.scrollIntoView(t),this}measure(t){const e=this.el.getBoundingClientRect();return t({width:e.width,height:e.height,top:e.top,left:e.left,right:e.right,bottom:e.bottom,x:e.x,y:e.y}),this}on(t,e,n){const s=this.el;Co.has(s)||Co.set(s,new Map);const i=Co.get(s),o=i.get(t);o&&s.removeEventListener(t,o.handler,o.options);const r=e;return s.addEventListener(t,r,n),i.set(t,{handler:r,options:n}),this}off(t,e){const n=this.el,s=Co.get(n);if(!s)return this;if(e){const i=s.get(t);i&&i.handler===e&&(n.removeEventListener(t,i.handler,i.options),s.delete(t))}else{const e=s.get(t);e&&(n.removeEventListener(t,e.handler,e.options),s.delete(t))}return this}once(t,e,n){const s="object"==typeof n?{...n,once:!0}:{once:!0};return this.el.addEventListener(t,e,s),this}delegate(t,e,n,s){const i=t=>{const s=t.target?.closest(e);s&&this.el.contains(s)&&n(t,s)};return this.el.addEventListener(t,i,s),Co.has(this.el)||Co.set(this.el,new Map),Co.get(this.el).set(`${t}:delegate:${e}`,{handler:i,options:s}),this}aria(t){const e=this.el;for(const[n,s]of Object.entries(t)){const t=n.startsWith("aria-")?n:`aria-${n}`;null==s||!1===s?e.removeAttribute(t):e.setAttribute(t,String(s))}return this}getAttr(t){return this.el.getAttribute(t)}data(t){const e=this.el;for(const[n,s]of Object.entries(t)){const t=n.startsWith("data-")?n.slice(5):n,i=n.startsWith("data-")?n:`data-${n}`;null==s?e.removeAttribute(i):e.setAttribute(i,String(s));const o=t.replace(/-([a-z])/g,(t,e)=>e.toUpperCase());null==s?delete e.dataset[o]:e.dataset[o]=String(s)}return this}}function ko(t){if(null!==t&&"object"==typeof t&&!0===t.__isMatesRef__){const e=t;if(void 0===e.value)throw new Error("$(ref): the ref has no element attached yet (ref.value is undefined).\nDOM manipulation via $() must happen after the element has mounted.\nUse one of the lifecycle hooks where the element is guaranteed to exist:\n • onMount() — runs once after the component's first render\n • onPaint() — runs after the browser has painted\n • onUpdate() — runs after every subsequent re-render\n\nExample:\n const inputRef = ref<HTMLInputElement>();\n onMount(() => { $(inputRef).focus(); });");return new Ao(e.value)}return new Ao(t)}const Mo=t=>{const e=Xs(),n=t().condition,s=Es(n),i=Es(n);return Hs(()=>{const n=i();if(n===s.get())return;const o=e.value;if(!o)return void s.set(n);const r=t().config;Bs({el:o,exit:r?.exit??Jn(200),enter:r?.enter??Qn(250),swap:()=>s.set(n),getEl:()=>e.value,isStale:()=>i.get()!==n})}),Ge(()=>{const n=e.value;if(!n)return;const s=t().config;Ws(n,s?.enter??Qn(250))}),()=>{const n=s(),{condition:o,trueTpl:r,falseTpl:a}=t();return i.get()!==o&&i.set(o),b`
|
|
119
|
+
<div ${Zs(e)} style="position:relative">
|
|
120
120
|
${n?r:a}
|
|
121
121
|
</div>
|
|
122
|
-
`}};function xo(t,e,n=C,s){return
|
|
122
|
+
`}};function xo(t,e,n=C,s){return Gs(Mo,{condition:t,trueTpl:e,falseTpl:n,config:s})}function $o(t,e,n){const{show:s,...i}=n;return xo(s,b`<x-view .view=${t} .props=${e}></x-view>`,C,i)}function To(t){const e=oe.isHookRunning;oe.isHookRunning=!0;try{return t()}finally{oe.isHookRunning=e}}function Ro(t){var e,n,s,i,o;e=new WeakMap,n=new WeakMap,s=new WeakMap,i=new WeakMap,o=new WeakMap;const r=Y(class extends ut{constructor(t){if(super(t),e.set(this,null),n.set(this,!1),s.set(this,null),i.set(this,!1),o.set(this,null),t.type!==H)throw new Error("eleHook() must be used as an element expression, e.g. html`<div ${myHook()}>`")}update(r,a){const l=r.element;if(!ge(this,i,"f")||l.isConnected){if(!ge(this,n,"f")){ye(this,s,l,"f"),ye(this,i,!1,"f");const r=ko(ge(this,s,"f")),c=To(()=>t(r,...a));return ye(this,e,c??null,"f"),ye(this,n,!0,"f"),void ye(this,o,a,"f")}ge(this,e,"f")?.onUpdate&&To(()=>ge(this,e,"f").onUpdate(...a)),ye(this,o,a,"f")}else console.log("[eleHook] UPDATE SKIPPED — disconnected & host detached, el:",l)}render(...t){}disconnected(){ye(this,i,!0,"f"),console.log("[eleHook] DISCONNECTED — el:",ge(this,s,"f"),"mounted:",ge(this,n,"f"),"hasCleanup:",!!ge(this,e,"f")?.onCleanup),ge(this,e,"f")?.onCleanup&&ge(this,e,"f").onCleanup(),ye(this,e,null,"f"),ye(this,n,!1,"f")}reconnected(){if(console.log("[eleHook] RECONNECTED — el:",ge(this,s,"f"),"was disconnected:",ge(this,i,"f"),"will re-mount:",!(!ge(this,i,"f")||ge(this,n,"f")||!ge(this,s,"f")||!ge(this,o,"f"))),ye(this,i,!1,"f"),!ge(this,n,"f")&&ge(this,s,"f")&&ge(this,o,"f")){const i=ko(ge(this,s,"f")),r=To(()=>t(i,...ge(this,o,"f")));ye(this,e,r??null,"f"),ye(this,n,!0,"f"),console.log("[eleHook] RE-MOUNTED after reconnect — el:",ge(this,s,"f"))}}});return(...t)=>r(...t)}const Oo=Ro((t,e)=>(t.attr(e),{onUpdate(e){t.attr(e)},onCleanup(){t.attr({})}}));function Io(t){return Oo(t)}function Po(t){}const zo=Ro((t,e)=>{const n=t.el;let s=new Set;const i=t=>{const e=(t=>{const e=new Set;if(Array.isArray(t))for(const n of t)if(Array.isArray(n)){if(2===n.length){const[t,s]=n;t&&s&&e.add(s)}else if(3===n.length){const[t,s,i]=n,o=t?s:i;o&&e.add(o)}}else"string"==typeof n&&n&&e.add(n);else for(const[n,s]of Object.entries(t))s&&e.add(n);return e})(t);for(const t of s)e.has(t)||n.classList.remove(t);for(const t of e)s.has(t)||n.classList.add(t);s=e};return i(e),{onUpdate(t){i(t)},onCleanup(){for(const t of s)n.classList.remove(t);s=new Set}}});function Do(t){return zo(t)}function No(t){}const Lo=Ro((t,e,n)=>{const s=t.el;let i=n;const o=t=>{const e=t;i(e.detail,e)};return s.addEventListener(e,o),{onUpdate(t,e){i=e},onCleanup(){s.removeEventListener(e,o)}}});function jo(t,e){return Lo(t,e)}function Uo(){const t=Me(!1);return{dispatch(e,n){t&&t.dispatchEvent(new CustomEvent(e,{detail:n,bubbles:!0,composed:!0,cancelable:!0}))}}}function Fo(t,e){if(e<=0)return{start(){t()},pause(){},resume(){},stop(){},get state(){return"stopped"},get remaining(){return 0}};let n="idle",s=e,i=0,o=null;function r(){null!==o&&(clearTimeout(o),o=null)}function a(){const t=performance.now()-i;return Math.max(0,s-t)}function l(){r(),o=setTimeout(()=>{o=null,n="stopped",s=0,t()},s)}return{start(){"running"!==n&&(s=e,i=performance.now(),n="running",l())},pause(){"running"===n&&(s=a(),r(),n="paused")},resume(){if("paused"===n){if(s<=0)return n="stopped",s=0,void t();i=performance.now(),n="running",l()}},stop(){r(),n="stopped",s=e},get state(){return n},get remaining(){return"running"===n?a():s}}}const Vo=Ro((t,e)=>{const n=t.el;let s=Fo(()=>{n.remove()},e);return s.start(),{onUpdate(t){t!==e&&(e=t,s.stop(),s=Fo(()=>{n.remove()},e),s.start())},onCleanup(){s.stop()}}});function Wo(t){const e=oe.isHookRunning;oe.isHookRunning=!0;try{return t()}finally{oe.isHookRunning=e}}function Bo(t){var e,n,s,i,o,r;e=new WeakMap,n=new WeakMap,s=new WeakMap,i=new WeakMap,o=new WeakMap,r=new WeakMap;const a=Y(class extends ut{constructor(t){if(super(t),e.set(this,null),n.set(this,!1),s.set(this,!1),i.set(this,!1),o.set(this,null),r.set(this,t=>{ge(this,i,"f")?ye(this,o,t,"f"):this.setValue(t)}),t.type!==V)throw new Error("htmlHook() must be used as a child expression, e.g. html`<div>${myHook()}</div>`")}update(a,l){if(!ge(this,s,"f")||this.isConnected){if(ye(this,i,!0,"f"),ye(this,o,null,"f"),ge(this,n,"f"))ge(this,e,"f")?.onUpdate&&Wo(()=>ge(this,e,"f").onUpdate(...l));else{const s=Wo(()=>t(ge(this,r,"f"),...l));ye(this,e,s??null,"f"),ye(this,n,!0,"f")}if(ye(this,i,!1,"f"),null!==ge(this,o,"f")){const t=ge(this,o,"f");return ye(this,o,null,"f"),t}}else console.log("[htmlHook] UPDATE SKIPPED — disconnected & part detached")}render(...t){}disconnected(){ye(this,s,!0,"f"),ge(this,e,"f")?.onCleanup&&ge(this,e,"f").onCleanup(),ye(this,n,!1,"f"),ye(this,e,null,"f")}reconnected(){ge(this,s,"f")&&(ye(this,s,!1,"f"),ye(this,n,!1,"f"),ye(this,e,null,"f"))}});return(...t)=>a(...t)}const Ho=Ro((t,e)=>{let n=e;const s=new IntersectionObserver(t=>{for(const e of t)e.isIntersecting?n.onVisible?.():n.onHidden?.()},{rootMargin:e.rootMargin??"0px",threshold:e.threshold??0});return s.observe(t.el),{onUpdate(t){n=t},onCleanup(){s.disconnect()}}});function Yo(t){return Ho(t)}function qo(t,e){return Ho({onVisible:t,...e})}function Xo(t,e){return Ho({onHidden:t,...e})}const Zo=Ro((t,e,n)=>{let s=e,i=!1,o=!0;const r=new IntersectionObserver(t=>{for(const e of t){const t=e.isIntersecting;if(o)return o=!1,void(i=t);t&&!i&&s(),i=t}},{rootMargin:n?.rootMargin??"0px",threshold:n?.threshold??0});return r.observe(t.el),{onUpdate(t,e){s=t},onCleanup(){r.disconnect(),i=!1,o=!0}}});function Go(t,e){return Zo(t,e)}function Ko(t,e){return Zo(t,e)}const Qo=Ro((t,e)=>{e(t.el)}),Jo=Ro((t,e)=>{let n=e;return{onUpdate(t){n=t},onCleanup(){n(t.el)}}});function tr(t){return Qo(t)}function er(t){return Jo(t)}Ro((t,e)=>({onUpdate(e){e(t.el)}}));const nr=Bo((t,e,n,s,i)=>{function o(t,e,n){return"function"==typeof e?{keyFn:t,template:e,opts:n??{}}:{keyFn:null,template:t,opts:e??{}}}function r(t,e,n,s){const i=s.columns??3,o=s.gap??12,r=s.containerClass??"",a=[`column-count:${i}`,`column-gap:${o}px`,s.containerStyle??""].filter(Boolean).join(";"),l=["break-inside:avoid",`margin-bottom:${o}px`,"display:inline-block","width:100%","box-sizing:border-box"].join(";"),c=t,h=xt(c,e||((t,e)=>e),(t,e)=>b`
|
|
123
123
|
<div style="${l}">${n(t,e)}</div>
|
|
124
124
|
`);return b`
|
|
125
125
|
<div class="${r}" style="${a}">
|
|
@@ -176,5 +176,5 @@ class Hr{constructor(t){this._element=null;const e=t??window;this._node=e,t&&(th
|
|
|
176
176
|
* @license
|
|
177
177
|
* Copyright 2021 Google LLC
|
|
178
178
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
179
|
-
*/(this._hostElement,t),this._scrollerController=new Yr(this,this._clippingAncestors[0]),this._schedule(this._updateLayout),this._observeAndListen(),this._connected=!0}_observeAndListen(){this._mutationObserver.observe(this._hostElement,{childList:!0}),this._hostElementRO.observe(this._hostElement),this._scrollEventListeners.push(window),window.addEventListener("scroll",this,this._scrollEventListenerOptions),this._clippingAncestors.forEach(t=>{t.addEventListener("scroll",this,this._scrollEventListenerOptions),this._scrollEventListeners.push(t),this._hostElementRO.observe(t)}),this._hostElementRO.observe(this._scrollerController.element),this._children.forEach(t=>this._childrenRO.observe(t)),this._scrollEventListeners.forEach(t=>t.addEventListener("scroll",this,this._scrollEventListenerOptions))}disconnected(){this._scrollEventListeners.forEach(t=>t.removeEventListener("scroll",this,this._scrollEventListenerOptions)),null!==this._scrollEndRafId&&(cancelAnimationFrame(this._scrollEndRafId),this._scrollEndRafId=null),this._scrollEventListeners=[],this._clippingAncestors=[],this._scrollerController?.detach(this),this._scrollerController=null,this._mutationObserver?.disconnect(),this._mutationObserver=null,this._hostElementRO?.disconnect(),this._hostElementRO=null,this._childrenRO?.disconnect(),this._childrenRO=null,this._rejectLayoutCompletePromise("disconnected"),this._connected=!1}_applyVirtualizerStyles(){const t=this._hostElement.style;t.display=t.display||"block",t.position=t.position||"relative",t.contain=t.contain||"size layout",this._isScroller&&(t.overflow=t.overflow||"auto",t.minHeight=t.minHeight||"150px")}_getSizer(){const t=this._hostElement;if(!this._sizer){let e=t.querySelector(`[${Zr}]`);e||(e=document.createElement("div"),e.setAttribute(Zr,""),t.appendChild(e)),Object.assign(e.style,{position:"absolute",margin:"-2px 0 0 0",padding:0,visibility:"hidden",fontSize:"2px"}),e.textContent=" ",e.setAttribute(Zr,""),this._sizer=e}return this._sizer}async updateLayoutConfig(t){await this._layoutInitialized;const e=t.type||Gr;if("function"==typeof e&&this._layout instanceof e){const e={...t};return delete e.type,this._layout.config=e,!0}return!1}async _initLayout(t){let e,n;if("function"==typeof t.type){n=t.type;const s={...t};delete s.type,e=s}else e=t;void 0===n&&(Gr=n=(await Promise.resolve().then(function(){return Dr})).FlowLayout),this._layout=new n(t=>this._handleLayoutMessage(t),e),this._layout.measureChildren&&"function"==typeof this._layout.updateItemSizes&&("function"==typeof this._layout.measureChildren&&(this._measureChildOverride=this._layout.measureChildren),this._measureCallback=this._layout.updateItemSizes.bind(this._layout)),this._layout.listenForChildLoadEvents&&this._hostElement.addEventListener("load",this._loadListener,!0),this._schedule(this._updateLayout)}startBenchmarking(){null===this._benchmarkStart&&(this._benchmarkStart=window.performance.now())}stopBenchmarking(){if(null!==this._benchmarkStart){const t=window.performance.now(),e=t-this._benchmarkStart,n=performance.getEntriesByName("uv-virtualizing","measure").filter(e=>e.startTime>=this._benchmarkStart&&e.startTime<t).reduce((t,e)=>t+e.duration,0);return this._benchmarkStart=null,{timeElapsed:e,virtualizationTime:n}}return null}_measureChildren(){const t={},e=this._children,n=this._measureChildOverride||this._measureChild;for(let s=0;s<e.length;s++){const i=e[s],o=this._first+s;(this._itemsChanged||this._toBeMeasured.has(i))&&(t[o]=n.call(this,i,this._items[o]))}this._childMeasurements=t,this._schedule(this._updateLayout),this._toBeMeasured.clear()}_measureChild(t){const{width:e,height:n}=t.getBoundingClientRect();return Object.assign({width:e,height:n},function(t){const e=window.getComputedStyle(t);return{marginTop:Qr(e.marginTop),marginRight:Qr(e.marginRight),marginBottom:Qr(e.marginBottom),marginLeft:Qr(e.marginLeft)}}(t))}_schedule(t){const e=this._scheduled.get(t);void 0!==e&&cancelAnimationFrame(e);const n=requestAnimationFrame(()=>{this._scheduled.delete(t),t.call(this)});this._scheduled.set(t,n)}async _updateDOM(t){this._scrollSize=t.scrollSize,this._adjustRange(t.range),this._childrenPos=t.childPositions,this._scrollError=t.scrollError||null;const{_rangeChanged:e,_itemsChanged:n}=this;this._visibilityChanged&&(this._notifyVisibility(),this._visibilityChanged=!1),(e||n)&&(this._notifyRange(),this._rangeChanged=!1),this._finishDOMUpdate()}_finishDOMUpdate(){this._connected&&(this._children.forEach(t=>this._childrenRO.observe(t)),this._checkScrollIntoViewTarget(this._childrenPos),this._positionChildren(this._childrenPos),this._sizeHostElement(this._scrollSize),this._correctScrollError(),this._benchmarkStart&&"mark"in window.performance&&window.performance.mark("uv-end"))}_updateLayout(){this._layout&&this._connected&&(this._layout.items=this._items,this._updateView(),null!==this._childMeasurements&&(this._measureCallback&&this._measureCallback(this._childMeasurements),this._childMeasurements=null),this._layout.reflowIfNeeded(),this._benchmarkStart&&"mark"in window.performance&&window.performance.mark("uv-end"))}_handleScrollEvent(){if(this._benchmarkStart&&"mark"in window.performance){try{window.performance.measure("uv-virtualizing","uv-start","uv-end")}catch(t){console.warn("Error measuring performance data: ",t)}window.performance.mark("uv-start")}!1===this._scrollerController.correctingScrollError&&this._layout?.unpin(),this._schedule(this._updateLayout),null!==this._scrollEndRafId&&cancelAnimationFrame(this._scrollEndRafId),this._scrollEndRafId=requestAnimationFrame(()=>{this._scrollEndRafId=null,this._connected&&this._updateLayout()})}handleEvent(t){if("scroll"===t.type)(t.currentTarget===window||this._clippingAncestors.includes(t.currentTarget))&&this._handleScrollEvent();else console.warn("event not handled",t)}_handleLayoutMessage(t){"stateChanged"===t.type?this._updateDOM(t):"visibilityChanged"===t.type?(this._firstVisible=t.firstVisible,this._lastVisible=t.lastVisible,this._notifyVisibility()):"unpinned"===t.type&&this._hostElement.dispatchEvent(new Br)}get _children(){const t=[];let e=this._hostElement.firstElementChild;for(;e;)e.hasAttribute(Zr)||t.push(e),e=e.nextElementSibling;return t}_updateView(){const t=this._hostElement,e=this._scrollerController?.element,n=this._layout;if(t&&e&&n){let s,i,o,r;const a=t.getBoundingClientRect();s=0,i=0,o=window.innerHeight,r=window.innerWidth;const l=this._clippingAncestors.map(t=>t.getBoundingClientRect());l.unshift(a);for(const t of l)s=Math.max(s,t.top),i=Math.max(i,t.left),o=Math.min(o,t.bottom),r=Math.min(r,t.right);const c=e.getBoundingClientRect(),h={left:a.left-c.left,top:a.top-c.top},u={width:e.scrollWidth,height:e.scrollHeight},d=s-a.top+t.scrollTop,f=i-a.left+t.scrollLeft,p=Math.max(0,o-s),m=Math.max(0,r-i);n.viewportSize={width:m,height:p},n.viewportScroll={top:d,left:f},n.totalScrollSize=u,n.offsetWithinScroller=h}}_sizeHostElement(t){const e=82e5,n=t&&null!==t.width?Math.min(e,t.width):0,s=t&&null!==t.height?Math.min(e,t.height):0;if(this._isScroller)this._getSizer().style.transform=`translate(${n}px, ${s}px)`;else{const t=this._hostElement.style;t.minWidth=n?`${n}px`:"100%",t.minHeight=s?`${s}px`:"100%"}}_positionChildren(t){t&&t.forEach(({top:t,left:e,width:n,height:s,xOffset:i,yOffset:o},r)=>{const a=this._children[r-this._first];a&&(a.style.position="absolute",a.style.boxSizing="border-box",a.style.transform=`translate(${e}px, ${t}px)`,void 0!==n&&(a.style.width=`${n}px`),void 0!==s&&(a.style.height=`${s}px`),a.style.left=void 0===i?null:`${i}px`,a.style.top=void 0===o?null:`${o}px`)})}async _adjustRange(t){const{_first:e,_last:n,_firstVisible:s,_lastVisible:i}=this;this._first=t.first,this._last=t.last,this._firstVisible=t.firstVisible,this._lastVisible=t.lastVisible,this._rangeChanged=this._rangeChanged||this._first!==e||this._last!==n,this._visibilityChanged=this._visibilityChanged||this._firstVisible!==s||this._lastVisible!==i}_correctScrollError(){if(this._scrollError){const{scrollTop:t,scrollLeft:e}=this._scrollerController,{top:n,left:s}=this._scrollError;this._scrollError=null,this._scrollerController.correctScrollError({top:t-n,left:e-s})}}element(t){return t===1/0&&(t=this._items.length-1),void 0===this._items?.[t]?void 0:{scrollIntoView:(e={})=>this._scrollElementIntoView({...e,index:t})}}_scrollElementIntoView(t){if(t.index>=this._first&&t.index<=this._last)this._children[t.index-this._first].scrollIntoView(t);else if(t.index=Math.min(t.index,this._items.length-1),"smooth"===t.behavior){const e=this._layout.getScrollIntoViewCoordinates(t),{behavior:n}=t;this._updateScrollIntoViewCoordinates=this._scrollerController.managedScrollTo(Object.assign(e,{behavior:n}),()=>this._layout.getScrollIntoViewCoordinates(t),()=>this._scrollIntoViewTarget=null),this._scrollIntoViewTarget=t}else this._layout.pin=t}_checkScrollIntoViewTarget(t){const{index:e}=this._scrollIntoViewTarget||{};e&&t?.has(e)&&this._updateScrollIntoViewCoordinates(this._layout.getScrollIntoViewCoordinates(this._scrollIntoViewTarget))}_notifyRange(){this._hostElement.dispatchEvent(new Vr({first:this._first,last:this._last}))}_notifyVisibility(){this._hostElement.dispatchEvent(new Wr({first:this._firstVisible,last:this._lastVisible}))}get layoutComplete(){return this._layoutCompletePromise||(this._layoutCompletePromise=new Promise((t,e)=>{this._layoutCompleteResolver=t,this._layoutCompleteRejecter=e})),this._layoutCompletePromise}_rejectLayoutCompletePromise(t){null!==this._layoutCompleteRejecter&&this._layoutCompleteRejecter(t),this._resetLayoutCompleteState()}_scheduleLayoutComplete(){this._layoutCompletePromise&&null===this._pendingLayoutComplete&&(this._pendingLayoutComplete=requestAnimationFrame(()=>requestAnimationFrame(()=>this._resolveLayoutCompletePromise())))}_resolveLayoutCompletePromise(){null!==this._layoutCompleteResolver&&this._layoutCompleteResolver(),this._resetLayoutCompleteState()}_resetLayoutCompleteState(){this._layoutCompletePromise=null,this._layoutCompleteResolver=null,this._layoutCompleteRejecter=null,this._pendingLayoutComplete=null}_hostElementSizeChanged(){this._schedule(this._updateLayout)}_childLoaded(){}_childrenSizeChanged(t){if(this._layout?.measureChildren){for(const e of t)this._toBeMeasured.set(e.target,e.contentRect);this._measureChildren()}this._scheduleLayoutComplete(),this._itemsChanged=!1,this._rangeChanged=!1}}function Qr(t){const e=t?parseFloat(t):NaN;return Number.isNaN(e)?0:e}function Jr(t){if(null!==t.assignedSlot)return t.assignedSlot;if(null!==t.parentElement)return t.parentElement;const e=t.parentNode;return e&&e.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&e.host||null}const ta=Y(class extends ut{constructor(t){if(super(t),this._virtualizer=null,this._first=0,this._last=-1,this._renderItem=(t,e)=>((t,e)=>b`${e}: ${JSON.stringify(t,null,2)}`)(t,e+this._first),this._keyFunction=(t,e)=>(t=>t)(t,this._first),this._items=[],t.type!==V)throw new Error("The virtualize directive can only be used in child expressions")}render(t){t&&this._setFunctions(t);const e=[];if(this._first>=0&&this._last>=this._first)for(let t=this._first;t<=this._last;t++)e.push(this._items[t]);return xt(e,this._keyFunction,this._renderItem)}update(t,[e]){this._setFunctions(e);const n=this._items!==e.items;return this._items=e.items||[],this._virtualizer?this._updateVirtualizerConfig(t,e):this._initialize(t,e),n?E:this.render()}async _updateVirtualizerConfig(t,e){if(!await this._virtualizer.updateLayoutConfig(e.layout||{})){const n=t.parentNode;this._makeVirtualizer(n,e)}this._virtualizer.items=this._items}_setFunctions(t){const{renderItem:e,keyFunction:n}=t;e&&(this._renderItem=(t,n)=>e(t,n+this._first)),n&&(this._keyFunction=(t,e)=>n(t,e+this._first))}_makeVirtualizer(t,e){this._virtualizer&&this._virtualizer.disconnected();const{layout:n,scroller:s,items:i}=e;this._virtualizer=new Kr({hostElement:t,layout:n,scroller:s}),this._virtualizer.items=i,this._virtualizer.connected()}_initialize(t,e){const n=t.parentNode;n&&1===n.nodeType&&(n.addEventListener("rangeChanged",t=>{this._first=t.first,this._last=t.last,this.setValue(this.render())}),this._makeVirtualizer(n,e))}disconnected(){this._virtualizer?.disconnected()}reconnected(){this._virtualizer?.connected()}});function ea(t,e,n,s){const{keyFn:i,template:o,opts:r}=sa(e,n,s),a={direction:r?.direction??"vertical",...r?.pin?{pin:r.pin}:{}};return ta({items:t,renderItem:o,keyFunction:i,scroller:r?.scroller,layout:$r(a)})}function na(t,e,n,s){const{keyFn:i,template:o,opts:r}=sa(e,n,s),a={direction:r.direction??"vertical",getAspectRatio:r.getAspectRatio,gap:r.gap??"8px",flex:!0,...r.itemSize?{itemSize:r.itemSize}:{},...r.pin?{pin:r.pin}:{}};return ta({items:t,renderItem:o,keyFunction:i,scroller:r.scroller,layout:(l=a,Object.assign({type:Fr},l))});var l}function sa(t,e,n){return"function"==typeof e?{keyFn:t,template:e,opts:n}:{keyFn:void 0,template:t,opts:e}}function ia(t){return new Promise((e,n)=>{t.onsuccess=()=>e(t.result),t.onerror=()=>n(t.error)})}function oa(t,e,n){return new Promise((s,i)=>{const o=[];let r=!1;t.onsuccess=()=>{const i=t.result;if(i){if(e>0&&!r)return r=!0,void i.advance(e);o.push(i.value),null!==n&&o.length>=n?s(o):i.continue()}else s(o)},t.onerror=()=>i(t.error)})}const ra={equals:t=>IDBKeyRange.only(t),greaterThan:t=>IDBKeyRange.lowerBound(t,!0),greaterThanOrEqual:t=>IDBKeyRange.lowerBound(t,!1),lessThan:t=>IDBKeyRange.upperBound(t,!0),lessThanOrEqual:t=>IDBKeyRange.upperBound(t,!1),between:(t,e,n)=>IDBKeyRange.bound(t,e,n?.lowerOpen??!1,n?.upperOpen??!1),startsWith:t=>IDBKeyRange.bound(t,t+"",!1,!1)};class aa{constructor(t,e,n,s,i,o){this._db=t,this._storeName=e,this._pk=n,this._indexQuery=s,this._indexSort=i,this._page=o}filterByIndex(t,e){return new aa(this._db,this._storeName,this._pk,{indexName:t,range:e(ra)},this._indexSort,this._page)}sortByIndex(t,e="asc"){return new aa(this._db,this._storeName,this._pk,this._indexQuery,{indexName:t,direction:"desc"===e?"prev":"next"},this._page)}async toArray(){const t=new aa(this._db,this._storeName,this._pk,this._indexQuery,this._indexSort,null);return la(await t._run(),t)}async page(t,e){const n=new aa(this._db,this._storeName,this._pk,this._indexQuery,this._indexSort,{num:t,size:e});return la(await n._run(),n)}async _run(){const t=this._db.transaction(this._storeName,"readonly").objectStore(this._storeName),e=null!==this._indexQuery,n=null!==this._indexSort,s=this._page?(this._page.num-1)*this._page.size:0,i=this._page?this._page.size:null;if(!e&&!n)return this._page?oa(t.openCursor(),s,i):ia(t.getAll());const o=this._indexQuery.indexName,r=this._indexQuery?.range??null,a=this._indexSort.indexName,l=this._indexSort.direction;if(n&&(!e||o===a)){const n=e?r:null;return oa(t.index(a).openCursor(n,l),s,i)}let c=await ia(t.index(o).getAll(r));if(n){const t=a,e="prev"===l?-1:1;c.sort((n,s)=>{const i=n[t],o=s[t];return(i<o?-1:i>o?1:0)*e})}return this._page&&(c=c.slice(s,s+i)),c}}function la(t,e){const{_db:n,_storeName:s,_pk:i}=e,o=Es(t,{skipRestrictedContextCheck:!0}),r=o;return r.updateItem=async(t,e)=>{const r=o.get().find(e=>e[i]===t);null!=r&&"object"==typeof r&&(e(r),await ia(n.transaction(s,"readwrite").objectStore(s).put(r)),o.update(()=>{}))},r.setItem=async(t,e)=>{await ia(n.transaction(s,"readwrite").objectStore(s).put(e)),o.update(n=>{const s=n.findIndex(e=>e[i]===t);-1!==s&&(n[s]=e)})},r.removeItem=async t=>{await ia(n.transaction(s,"readwrite").objectStore(s).delete(t)),o.update(e=>{const n=e.findIndex(e=>e[i]===t);-1!==n&&e.splice(n,1)})},r.refresh=async()=>{o.set(await e._run())},Object.defineProperty(r,"name",{value:"dbTableAtom",writable:!0,configurable:!0,enumerable:!1}),r}function ca(t,e,n,s){const i=new aa(t,e,n,null,null,null),o=()=>s?s.objectStore(e):t.transaction(e,"readonly").objectStore(e),r=()=>s?s.objectStore(e):t.transaction(e,"readwrite").objectStore(e);return{filterByIndex:(t,e)=>i.filterByIndex(t,e),sortByIndex:(t,e)=>i.sortByIndex(t,e),toArray:()=>i.toArray(),page:(t,e)=>i.page(t,e),add:t=>ia(r().add(t)),set:async(t,e)=>{await ia(r().put(e))},update:async(n,i)=>{const o=s?s.objectStore(e):t.transaction(e,"readwrite").objectStore(e),r=await ia(o.get(n));null!=r&&(i(r),await ia(o.put(r)))},delete:async t=>{await ia(r().delete(t))},clear:async()=>{await ia(r().clear())},count:()=>ia(o().count()),get:t=>ia(o().get(t)),has:async t=>void 0!==await ia(o().getKey(t))}}function ha(t,e){return Pe()?Promise.reject(new Error("[indexDB] IndexedDB is not available in SSR environments.")):new Promise((n,s)=>{const i=indexedDB.open(t,e.version);i.onupgradeneeded=t=>{const n=i.result,s=i.transaction;e.upgrade&&e.upgrade(function(t,e){return{createTable(e,n,s=[]){if(t.objectStoreNames.contains(e))return;const i=t.createObjectStore(e,{keyPath:n});for(const t of s)i.createIndex(t,t,{unique:!1})},addIndex(n,s,i){if(!t.objectStoreNames.contains(n))return;const o=e.objectStore(n);o.indexNames.contains(s)||o.createIndex(s,s,i??{unique:!1})},removeIndex(n,s){if(!t.objectStoreNames.contains(n))return;const i=e.objectStore(n);i.indexNames.contains(s)&&i.deleteIndex(s)},dropTable(e){t.objectStoreNames.contains(e)&&t.deleteObjectStore(e)}}}(n,s),t.oldVersion)},i.onsuccess=()=>{const e=i.result;e.onversionchange=()=>{e.close(),console.warn(`[indexDB] "${t}" connection closed — version change detected. Reload the page to upgrade.`)};const s={table:(t,n)=>ca(e,t,n),transaction:(t,n)=>new Promise((s,i)=>{const o=e.transaction(t,"readwrite"),r={table:(t,n)=>ca(e,t,n,o)};o.oncomplete=()=>s(),o.onerror=()=>i(o.error),o.onabort=()=>i(new Error(`[indexDB] Transaction on [${t.join(", ")}] aborted`)),n(r).catch(t=>{try{o.abort()}catch{}i(t)})}),close(){e.close()}};n(s)},i.onerror=()=>s(i.error),i.onblocked=()=>{console.warn(`[indexDB] Opening "${t}" is blocked — close other connections first.`)}})}const ua=t=>"function"==typeof t&&!0===t.__isAtom___&&"function"==typeof t.set&&"function"==typeof t.__subscribe,da=t=>"object"==typeof t&&null!==t&&!0===t.__isUnit___&&"function"==typeof t.__subscribe&&"function"==typeof t.__reset,fa=t=>"function"==typeof t&&!0===t.__isAction___&&"function"==typeof t.__subscribe,pa=t=>"function"==typeof t&&!0===t.__isAsyncAction___&&"function"==typeof t.subscribe,ma=t=>"function"==typeof t&&!0===t.__isSetter___&&"function"==typeof t.__subscribe,_a=t=>"object"==typeof t&&null!==t&&!0===t.__isEvent___&&"function"==typeof t.__subscribe&&"function"==typeof t.trigger,ga=t=>"object"==typeof t&&null!==t&&!0===t.__isConfirmationEvent___&&"function"==typeof t.requestConfirmation&&"function"==typeof t.onConfirmRequest,ya=t=>"object"==typeof t&&null!==t&&!0===t.__isChannel___&&"function"==typeof t.join,wa=t=>"function"==typeof t&&!0===t.__isSelector___&&"function"==typeof t.areVersionsChanged,va=t=>"function"==typeof t,ba=t=>"AsyncFunction"===t.constructor.name,Sa=(t,e,n,s)=>{if(ua(t)){const i=t,o=Es(i(),s),r=n(o.set,e),a=n(o.update,e);return o.set=r,o.update=a,i.__subscribe(()=>{Ye.schedule(()=>o.set(i()))}),xe(o,()=>{r.cancel(),a.cancel()}),o}const i=Es(t,s),o=n(i.set,e),r=n(i.update,e);return i.set=o,i.update=r,xe(i,()=>{o.cancel(),r.cancel()}),i},Ea=(t,e,n)=>Sa(t,e,zs,n);function Ca(t,e,n){const s=new Set;function i(t){const n=setTimeout(()=>{s.delete(n),t()},e);s.add(n)}function o(){for(const t of s)clearTimeout(t);s.clear()}if(ua(t)){const e=t,s=Es(e(),n),r=s.set.bind(s),a=s.update.bind(s);return s.set=(t,e)=>{i(()=>r(t,e))},s.update=(t,e)=>{i(()=>a(t,e))},e.__subscribe(()=>{const t=e();i(()=>r(t))}),xe(s,o),s}const r=Es(t,n),a=r.set.bind(r),l=r.update.bind(r);return r.set=(t,e)=>{i(()=>a(t,e))},r.update=(t,e)=>{i(()=>l(t,e))},xe(r,o),r}const Aa=(t=[],e)=>{const n=new Map(t),s=Es(n,e),i=n.set.bind(n);n.set=(t,e)=>(i(t,e),s.update(()=>{}),n);const o=n.delete.bind(n);n.delete=t=>{const e=o(t);return s.update(()=>{}),e};const r=n.clear.bind(n);n.clear=()=>{r(),s.update(()=>{})};const a=n.get.bind(n);n.get=t=>(s.get(),a(t));const l=n.has.bind(n);n.has=t=>(s.get(),l(t));const c=Object.getOwnPropertyDescriptor(Map.prototype,"size");Object.defineProperty(n,"size",{get:()=>(s.get(),c.get.call(n))});const h=n.entries.bind(n);n.entries=()=>(s.get(),h());const u=n.values.bind(n);n.values=()=>(s.get(),u());const d=n.keys.bind(n);n.keys=()=>(s.get(),d());const f=n.forEach.bind(n);n.forEach=(t,e)=>(s.get(),f(t,e));const p=n[Symbol.iterator].bind(n);return n[Symbol.iterator]=()=>(s.get(),p()),n.update=t=>{const e={set:(t,n)=>(i(t,n),e),delete:t=>o(t),clear:()=>{r()},get:t=>a(t),has:t=>l(t),entries:()=>h(),values:()=>u(),keys:()=>d(),forEach:(t,e)=>f(t,e),[Symbol.iterator]:()=>p(),get size(){return c.get.call(n)}};return t(e),s.update(()=>{}),n},n.updateItem=(t,e)=>{const i=a(t);return null==i||"object"!=typeof i||(e(i),s.update(()=>{})),n},Object.defineProperty(n,"__isAtom___",{value:s,writable:!1,enumerable:!1}),Object.defineProperty(n,"__version__",{get:()=>s.__version__,enumerable:!1}),n},ka=(t=[],e)=>{const n=new Set(t),s=Es(n,e),i=n.add.bind(n);n.add=t=>(i(t),s.update(()=>{}),n);const o=n.delete.bind(n);n.delete=t=>{const e=o(t);return s.update(()=>{}),e};const r=n.clear.bind(n);n.clear=()=>{r(),s.update(()=>{})};const a=n.has.bind(n);n.has=t=>(s.get(),a(t));const l=Object.getOwnPropertyDescriptor(Set.prototype,"size");Object.defineProperty(n,"size",{get:()=>(s.get(),l.get.call(n))});const c=n.entries.bind(n);n.entries=()=>(s.get(),c());const h=n.values.bind(n);n.values=()=>(s.get(),h());const u=n.keys.bind(n);n.keys=()=>(s.get(),u());const d=n.forEach.bind(n);n.forEach=(t,e)=>(s.get(),d(t,e));const f=n[Symbol.iterator].bind(n);return n[Symbol.iterator]=()=>(s.get(),f()),n.update=t=>{const e={add:t=>(i(t),e),delete:t=>o(t),clear:()=>{r()},has:t=>a(t),entries:()=>c(),values:()=>h(),keys:()=>u(),forEach:(t,e)=>d(t,e),[Symbol.iterator]:()=>f(),get size(){return l.get.call(n)}};return t(e),s.update(()=>{}),n},n.updateItem=(t,e)=>(null==t||"object"!=typeof t||(e(t),s.update(()=>{})),n),Object.defineProperty(n,"__isAtom___",{value:s,writable:!1,enumerable:!1}),Object.defineProperty(n,"__version__",{get:()=>s.__version__,enumerable:!1}),n},Ma="mates";function xa(t,e){try{null===e?t.removeItem(Ma):t.setItem(Ma,JSON.stringify(e))}catch{}}function $a(t,e){const n=Es((()=>{try{return function(t){try{const e=t.getItem(Ma);if(e)return JSON.parse(e)}catch{}return null}(t())}catch{return null}})()),s=n.set;n.set=function(e,i=!1){s(e,i);try{xa(t(),n.get())}catch{}};const i=n.update;return n.update=function(e,s=!1){if(null!==n.get()){i(e,s);try{xa(t(),n.get())}catch{}}},e(t=>{if(t.key===Ma)if(t.newValue)try{s(JSON.parse(t.newValue))}catch{}else s(null)}),Object.defineProperty(n,"name",{value:"storageAtom",writable:!0,configurable:!0,enumerable:!1}),n}function Ta(t){"undefined"!=typeof window&&window.addEventListener("storage",t)}const Ra=$a(()=>localStorage,t=>Ta(e=>{e.storageArea===localStorage&&t(e)})),Oa=$a(()=>sessionStorage,t=>Ta(e=>{e.storageArea===sessionStorage&&t(e)})),Ia=(t,e,n)=>Sa(t,e,Ls,n),Pa=Es("undefined"!=typeof document?document.title:"");function za(t){const e=new Map,n=new Map,s=Es(e,t),i=s.get.bind(s),o=s;return o.add=(t,i,o)=>{if(n.has(t)&&(clearTimeout(n.get(t)),n.delete(t)),s.update(e=>{e.set(t,i)}),void 0!==o&&-1!==o&&o>0){const i=setTimeout(()=>{e.delete(t),n.delete(t),s.update(()=>{})},o);n.set(t,i)}},o.get=t=>(i(),e.get(t)),o.remove=t=>!!e.has(t)&&(n.has(t)&&(clearTimeout(n.get(t)),n.delete(t)),e.delete(t),s.update(()=>{}),!0),o.has=t=>(i(),e.has(t)),o.getAll=()=>(i(),Array.from(e.values())),o.clearAll=()=>{n.forEach(t=>clearTimeout(t)),n.clear(),e.clear(),s.update(()=>{})},Object.defineProperty(o,"size",{get:()=>(i(),e.size),enumerable:!0,configurable:!0}),Object.defineProperty(o,"name",{get:()=>"cacheAtom",enumerable:!0,configurable:!0}),xe(s,o.clearAll),o}function Da(t=0,e){const n=Es(t,e),s=n;return s.change=t=>{n.set(void 0!==t?t:Math.random())},s.name="changeFlagAtom",s}Fs(()=>{var t;t=Pa.get(),"undefined"!=typeof document&&(document.title=t)});const Na=(t=1,e)=>{const n=Es(t,e),s=n;return s.next=()=>{n.set(t=>t+1)},s.prev=()=>{n.set(t=>t>1?t-1:t)},s.reset=()=>{n.set(1)},Object.defineProperty(s,"currentPage",{get:()=>n.get(),enumerable:!1,configurable:!0}),Object.defineProperty(s,"name",{value:"paginationAtom",writable:!0,configurable:!0,enumerable:!1}),s};function La(t,e=2){let n=parseFloat(String(t).trim());Number.isFinite(n)||(n=0);const s=10**e;return Math.round(n*s)/s}function ja(t,e,n){const s=As(t,{skipRestrictedContextCheck:!0,...n}),i=As([],{skipRestrictedContextCheck:!0,...n});function o(){const t=s.get(),n=e.map(e=>e(t)).filter(t=>null!=t&&""!==t);return i.set(n),n}const r=s.set;s.set=function(t,e=!1){r(t,e),o()};const a=s.update;s.update=function(t,e=!1){a(t,e),o()};const l=s;return Object.defineProperty(l,"__isFormAtom__",{value:!0,writable:!1,enumerable:!1,configurable:!1}),Object.defineProperty(l,"errors",{get:()=>i.get(),enumerable:!1,configurable:!0}),Object.defineProperty(l,"isValid",{get:()=>0===i.get().length,enumerable:!1,configurable:!0}),l.validate=o,l.toFloat=()=>La(s.get()),l.toFloatString=()=>La(s.get()).toString(),l.toValidNumber=()=>function(t){const e=Number(t);return Number.isFinite(e)?e:0}(s.get()),Object.defineProperty(l,"name",{value:"formAtom",writable:!0,configurable:!0,enumerable:!1}),l}const Ua=(t,e=[],n)=>ja(t,e,n);function Fa(t){const e=[],n={},s=new WeakSet;return function t(i,o){if(null==i)return;const r=typeof i;if("object"!==r&&"function"!==r)return;if(s.has(i))return;if(s.add(i),function(t){if(null==t)return!1;const e=typeof t;return("object"===e||"function"===e)&&!0===t.__isFormAtom__}(i)){const t=i.validate();return void(t.length>0&&(e.push(...t),n[o]=t))}if(Array.isArray(i)){for(let e=0;e<i.length;e++){const n=o?`${o}[${e}]`:`[${e}]`;t(i[e],n)}return}const a=Object.keys(i);for(const e of a){const n=o?`${o}.${e}`:e;t(i[e],n)}}(t,""),{isValid:0===e.length,errors:e,errorsByField:n}}function Va(t,e,n){const s=e.replace(/\[(\d+)]/g,".$1").split(".");let i=t;for(const t of s){if(null==i)return n;i=i[t]}return void 0===i?n:i}function Wa(t,e){const n={};for(const s of e)s in t&&(n[s]=t[s]);return n}function Ba(t,e){const n={...t};for(const t of e)delete n[t];return n}function Ha(t){return null!==t&&"object"==typeof t&&!Array.isArray(t)}function Ya(t,...e){const n={...t};for(const t of e)for(const e of Object.keys(t))Ha(n[e])&&Ha(t[e])?n[e]=Ya(n[e],t[e]):n[e]=t[e];return n}function qa(t,e,n){return Math.min(Math.max(t,e),n)}function Xa(t,e,n){if(void 0===e&&(e=t,t=0),void 0===n&&(n=t<=e?1:-1),0===n)return[];const s=[];if(n>0)for(let i=t;i<e;i+=n)s.push(i);else for(let i=t;i>e;i+=n)s.push(i);return s}function Za(t,e){if(e<1)return[];const n=[];for(let s=0;s<t.length;s+=e)n.push(t.slice(s,s+e));return n}function Ga(t,e){const n=new Set,s=[];for(const i of t){const t=e(i);n.has(t)||(n.add(t),s.push(i))}return s}function Ka(t,e){const n={};for(const s of t){const t=String(e(s));n[t]||(n[t]=[]),n[t].push(s)}return n}function Qa(t){return null==t||("string"==typeof t||Array.isArray(t)?0===t.length:t instanceof Map||t instanceof Set?0===t.size:"object"==typeof t&&0===Object.keys(t).length)}function Ja(t,e){if(null==t||"object"!=typeof t)return;const n=Array.isArray(t)?t.map((t,e)=>e):Object.keys(t);for(const s of n){const n=e(s,t[s],t);void 0!==n&&(t[s]=n);const i=t[s];null!==i&&"object"==typeof i&&Ja(i,e)}}const tl=t=>(t=>"number"==typeof t||"boolean"==typeof t||!Qa(t))(t)?null:"Required",el=t=>(t=>/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(t))(t)?null:"Invalid email",nl=t=>e=>((t,e)=>t.length>=e)(e,t)?null:`Min ${t} characters`,sl=t=>e=>((t,e)=>t.length<=e)(e,t)?null:`Max ${t} characters`,il=(t,e="Invalid format")=>n=>((t,e)=>e.test(t))(n,t)?null:e,ol=t=>e=>((t,e)=>t>=e)(e,t)?null:`Min is ${t}`,rl=t=>e=>((t,e)=>t<=e)(e,t)?null:`Max is ${t}`;function al(t){let e;return bs({name:"Memo",fn:t,onRun:t=>{e?e.set(()=>t):(e=Es(void 0,{skipRestrictedContextCheck:!0}),e.set(()=>t,!0))}}),e}function ll(t){const e=new Set,n=[Object.prototype,Array.prototype,Function.prototype,String.prototype,Number.prototype,Boolean.prototype,Symbol.prototype,Date.prototype,RegExp.prototype,Map.prototype,Set.prototype,WeakMap.prototype,WeakSet.prototype,Promise.prototype,Error.prototype];let s=t;for(;s&&!n.includes(s);){for(const t of Reflect.ownKeys(s))"constructor"!==t&&e.add(t);s=Object.getPrototypeOf(s)}return Array.from(e)}const cl=t=>{const e=Me();if(e&&e.scopes.has(t))throw new Error("Scope already exists for the same class for this component");let n;oe.viewOuterInProgress=!0;try{n=new t}finally{oe.viewOuterInProgress=!1}const s=oe.setupInProgress;try{if((()=>{ll(n).forEach(t=>{const e=Object.getOwnPropertyDescriptor(n,t)||Object.getOwnPropertyDescriptor(Object.getPrototypeOf(n),t);if(e&&(e.get||e.set))return;const s=n[t];"function"!=typeof s||s.__version__||(n[t]=s.bind(n))})})(),"function"==typeof n.setup){ba(n.setup)&&console.warn("Async setup functions are not supported. Please ensure the setup function is synchronous."),oe.setupInProgress=!0;try{n.setup(e?._propsFn||(()=>({})))}catch(t){console.error(t)}finally{oe.setupInProgress=s}}e&&e.addScope(t,n),n.__isScope___=!0}catch(t){console.error(t)}finally{oe.setupInProgress=s}return n},hl=t=>{let e=null;const n=new CustomEvent("request-parent-scope",{bubbles:!0,composed:!0,detail:{ScopeClass:t,resolve:t=>{e=t}}});if(Me().dispatchEvent(n),e)return e;throw new Error(`No parent scope found for ${t.name}`)};function ul(t,e){let n=t;for(;n&&n!==Object.prototype;){const t=Object.getOwnPropertyDescriptor(n,e);if(t)return t;n=Object.getPrototypeOf(n)}}const dl=(t,e,n)=>{const s=ll(t);s.forEach(s=>{const i=ul(t,s);if(i?.get){let n,o=-1;const r=i.get;Object.defineProperty(t,s,{get(){const s=e.__version__;return s!==o&&(o=s,n=r.call(t)),n},configurable:!0,enumerable:i.enumerable})}else if(va(t[s])){if(ba(t[s]))throw new Error(`Async functions are not supported inside ${n}`);const i=t[s];t[s]=(...n)=>{e.update(()=>i.apply(t,n))}}});const i=Object.create(t);return s.forEach(n=>{const s=ul(t,n);if(!s)return;const o=!!s.get,r=!o&&va(s.value);o||r||Object.defineProperty(i,n,{get:()=>e()[n],set(t){e.update(e=>{e[n]=t})},enumerable:!0,configurable:!0})}),i},fl=t=>{if("object"!=typeof t||null===t)throw new Error("initial state must be an object");const e=Es(t),n=dl(t,e,"store");return()=>[n,e.update]},pl=t=>{const e=Me();if("object"!=typeof t||null===t)throw new Error("stateObj must be an object");const n=Es(t),s=dl(t,n,"useState");return e?._useStates&&e._useStates.push({state:t,atom:n}),[s,n.update]},ml=t=>{Xe();const e=Me();e._errorHandlers||(e._errorHandlers=[]),e._errorHandlers.push(t)},_l=(t,e)=>{const n=Me();if(Xe(),!n)throw new Error("onReferenceChange must be called inside a component");let s=[];t(),s=e(),n.onEachUpdate(()=>{const n=e();s.some((t,e)=>t!==n[e])&&(t(),s=n)})};function gl(){const t=new Uint8Array(16);if("undefined"!=typeof crypto&&crypto.getRandomValues)crypto.getRandomValues(t);else for(let e=0;e<16;e++)t[e]=256*Math.random()|0;t[6]=15&t[6]|64,t[8]=63&t[8]|128;const e=Array.from(t).map(t=>t.toString(16).padStart(2,"0")).join("");return`${e.slice(0,8)}-${e.slice(8,12)}-${e.slice(12,16)}-${e.slice(16,20)}-${e.slice(20,32)}`}function yl(){return{list:t=>Promise.resolve(function(){function t(){return[]}return t.get=t=>{},t.has=t=>!1,t.add=async t=>"",t.set=async(t,e)=>{},t.update=async(t,e)=>{},t.deleteRow=async t=>{},t.clear=async()=>{},Object.defineProperty(t,"size",{get:()=>0,enumerable:!0,configurable:!0}),t}())}}const wl="mini-db",vl="mini-db:v";function bl(t){return new Promise((e,n)=>{t.onsuccess=()=>e(t.result),t.onerror=()=>n(t.error)})}function Sl(t,e,n){return new Promise((s,i)=>{const o=e?indexedDB.open(t,e):indexedDB.open(t);o.onupgradeneeded=()=>n?.(o.result),o.onsuccess=()=>s(o.result),o.onerror=()=>i(o.error),o.onblocked=()=>console.warn("[miniDB] Open blocked — close other connections first.")})}function El(t){t.current.onversionchange=async()=>{t.current.close(),t.current=await Sl(wl),El(t)}}async function Cl(t,e,n){const s=await bl(t.current.transaction(e,"readonly").objectStore(e).getAll()),i=Aa(s.map(t=>[String(t.id),t])),o=n=>bl(t.current.transaction(e,"readwrite").objectStore(e).put(n));n&&n.addEventListener("message",t=>{const n=t.data;n&&n.store===e&&("set"===n.op?i.set(n.key,n.item):"delete"===n.op?i.delete(n.key):"clear"===n.op&&i.clear())});const r=t=>{try{n?.postMessage(t)}catch{}};function a(){return Array.from(i.values())}return a.get=t=>i.get(t),a.has=t=>i.has(t),a.add=async t=>{const n=String(t.id??gl()),s={...t,id:n};return await o(s),i.set(n,s),r({store:e,op:"set",key:n,item:s}),n},a.set=async(t,n)=>{const s={...n,id:t};await o(s),i.set(t,s),r({store:e,op:"set",key:t,item:s})},a.update=async(t,n)=>{const s=i.get(t);s&&(i.updateItem(t,n),await o(s),r({store:e,op:"set",key:t,item:s}))},a.deleteRow=async n=>{await(n=>bl(t.current.transaction(e,"readwrite").objectStore(e).delete(n)))(n),i.delete(n),r({store:e,op:"delete",key:n})},a.clear=async()=>{await bl(t.current.transaction(e,"readwrite").objectStore(e).clear()),i.clear(),r({store:e,op:"clear"})},Object.defineProperty(a,"size",{get:()=>i.size,enumerable:!0,configurable:!0}),a}async function Al(t=1,e){if(Pe())return yl();const n={current:await Sl(wl)};El(n);const s="undefined"!=typeof BroadcastChannel?new BroadcastChannel(wl):null,i=function(){try{return parseInt(localStorage.getItem(vl)??"0",10)||0}catch{return 0}}();if(i!==t){if(e){const s=[];e(i,t,{clear:t=>s.push(t)});for(const t of s)n.current.objectStoreNames.contains(t)&&await bl(n.current.transaction(t,"readwrite").objectStore(t).clear())}!function(t){try{localStorage.setItem(vl,String(t))}catch{}}(t)}const o=new Map;return{async list(t){if(o.has(t))return o.get(t);n.current.objectStoreNames.contains(t)||(n.current=await async function(t,e){const n=t.name,s=t.version+1;return t.close(),Sl(n,s,t=>{t.objectStoreNames.contains(e)||t.createObjectStore(e,{keyPath:"id"})})}(n.current,t),El(n));const e=await Cl(n,t,s);return o.set(t,e),e}}}function kl(t,e,n,s=!1){document.addEventListener(t,e,{capture:s}),n.addToCleanUps(e,()=>{document.removeEventListener(t,e,{capture:s})})}function Ml(t,e,n,s){let i;if("wheelUp"===t||"wheelDown"===t){const o="wheelUp"===t,r=e,a=t=>{(o?t.deltaY>=0:t.deltaY<=0)||(i&&i(),i=r(t))};return window.addEventListener("wheel",a,{capture:n,passive:!0}),void s.addToCleanUps(e,()=>{window.removeEventListener("wheel",a,{capture:n}),i&&i()})}const o="scroll"===t||"touchstart"===t||"touchmove"===t,r=e,a=t=>{i&&i(),i=r(t)};window.addEventListener(t,a,{capture:n,passive:o}),s.addToCleanUps(e,()=>{window.removeEventListener(t,a,{capture:n}),i&&i()})}function xl(t,e){Pe()||(Xe(),Ml(t,e,!1,Me()))}function $l(t,e){Pe()||(Xe(),Ml(t,e,!0,Me()))}const Tl=t=>{$l("scroll",t)},Rl=t=>{xl("blur",t)},Ol=t=>{xl("focus",t)},Il=t=>{xl("online",t)},Pl=t=>{xl("offline",t)},zl=t=>{xl("resize",t)},Dl=t=>{xl("paste",t)},Nl=t=>{xl("copy",t)},Ll=t=>{xl("cut",t)},jl=t=>{xl("keydown",t)},Ul=t=>{xl("keyup",t)},Fl=t=>{if(Pe())return;Xe();let e;kl("visibilitychange",()=>{e&&e(),e=t(document.hidden)},Me())},Vl=t=>{if(Pe())return;Xe();let e;kl("selectionchange",()=>{e&&e(),e=t(window.getSelection())},Me())},Wl=t=>{xl("storage",t)},Bl=t=>{if(Pe())return;Xe();const e=Me();let n;const s=t=>t.preventDefault(),i=e=>{e.preventDefault(),n&&n(),n=t(e)};window.addEventListener("dragover",s),window.addEventListener("drop",i),e.addToCleanUps(t,()=>{window.removeEventListener("dragover",s),window.removeEventListener("drop",i),n&&n()})},Hl=t=>{if(Pe())return;Xe();const e=Me(!0),n=n=>{const s=n.target;s&&!e.contains(s)&&t(n)};document.addEventListener("mousedown",n,!0),e.addToCleanUps(t,()=>{document.removeEventListener("mousedown",n,!0)})},Yl=(t,e=window)=>{if(Pe())return;Xe();const n=Me();let s;const i=e=>{s&&s(),s=t(e)};e.addEventListener("scroll",i,{passive:!0}),n.addToCleanUps(t,()=>{e.removeEventListener("scroll",i),s&&s()})},ql=(t,e)=>{if(Pe())return;Xe();const n=Me();let s;const i=new ResizeObserver(e=>{for(const n of e)s&&s(),s=t(n)}),o=e||n;i.observe(o),n.addToCleanUps(t,()=>{i.disconnect(),s&&s()})},Xl=t=>{if(Pe())return;Xe();const e=Me();let n;const s=oi.__subscribe(()=>{n&&n(),n=t(oi.get())||null});e.addToCleanUps(t,()=>{s(),n&&n()})},Zl=(t,e)=>{if(Pe())return;Xe();const n=Me();let s;const i=setInterval(()=>{s&&s(),s=t()},e);n.addToCleanUps(t,()=>{clearInterval(i),s&&s()})},Gl=(t,e)=>{if(Pe())return;Xe();const n=Me();let s;const i=setTimeout(()=>{s=t()},e);n.addToCleanUps(t,()=>{clearTimeout(i),s&&s()})};function Kl(t,e){Xe();const n=Me(),s=e.map(e=>e.__subscribe(t));n.addToCleanUps(t,()=>{s.forEach(t=>t())})}const Ql=t=>{Xe();const e=Me();let n;e.onEachUpdate(()=>{n&&n(),n=t()}),e.addToCleanUps(t,()=>{n&&n()})},Jl=t=>{const e=Me();if(!e)throw new Error("onDOMReady must be called within a component context");return e.DOMReadyEvent.__subscribe(t)},tc=Bo((t,e,n)=>{const s=document.createElement("div");Object.assign(s.style,{position:"fixed",inset:"0",zIndex:"9999",display:"flex",alignItems:"center",justifyContent:"center",background:"rgba(0, 0, 0, 0.5)"}),n?.style&&Object.assign(s.style,n.style),n?.onBackdropClick&&s.addEventListener("click",t=>{t.target===s&&n.onBackdropClick()});const i=document.createElement("div");n?.dialogStyle&&Object.assign(i.style,n.dialogStyle),i.addEventListener("click",t=>t.stopPropagation()),U(e,i),s.appendChild(i),document.body.appendChild(s);const o=document.body.style.overflow;return document.body.style.overflow="hidden",{onUpdate(t){U(t,i)},onCleanup(){s.remove(),document.body.style.overflow=o}}});function ec(t,e){return tc(t,e)}const nc={position:"fixed",display:"none",margin:"0"},sc="9999";function ic(t={}){const{style:e,target:n,zIndex:s=sc}=t,i=document.createElement("div");for(const[t,e]of Object.entries(nc))i.style[t]=e;i.style.zIndex=String(s),e&&Object.assign(i.style,e);return{el:i,attach:()=>{i.isConnected||function(t){return t?"string"==typeof t?document.querySelector(t)??document.body:t:document.body}(n).appendChild(i)},detach:()=>{i.isConnected&&i.remove()},isAttached:()=>i.isConnected}}function oc(t,e,n,s,i,o,r){return t.startsWith("top")?s>=n:t.startsWith("bottom")?i>=n:t.startsWith("left")?o>=e:!!t.startsWith("right")&&r>=e}function rc(t,e,n,s,i,o){const r=window.innerWidth,a=function(t){let e=t.parentElement;for(;e&&e!==document.documentElement;){const{overflowY:t}=window.getComputedStyle(e),n="auto"===t||"scroll"===t,s=e.scrollHeight>e.clientHeight;if(n&&s)return e;e=e.parentElement}return null}(t);let l,c;if(a){const t=a.getBoundingClientRect(),n=a.scrollHeight-a.scrollTop-a.clientHeight;c=t.bottom-e.bottom+n-i;const s=a.scrollTop;l=e.top-t.top+s-i}else{const t=window.scrollY||document.documentElement.scrollTop,n=document.documentElement.scrollHeight;l=e.top+t-i,c=n-(e.bottom+t)-i}const h=e.left-i,u=r-e.right-i;if("auto"===o){const t=["bottom-start","top-start","right","left"];for(const e of t)if(oc(e,n,s,l,c,h,u))return e;return"bottom-start"}if(oc(o,n,s,l,c,h,u))return o;const d=function(t){return t.startsWith("top")?t.replace("top","bottom"):t.startsWith("bottom")?t.replace("bottom","top"):t.startsWith("left")?t.replace("left","right"):t.startsWith("right")?t.replace("right","left"):t}(o);return oc(d,n,s,l,c,h,u)?d:o}const ac=Ro((t,e,n)=>{const s=t.el;let i=!1,o=e,r=n;console.log("[popup] MOUNT — anchor:",s,"destroyOnClose:",!!n.destroyOnClose);const a=ic({...void 0!==r.zIndex?{zIndex:r.zIndex}:{},style:{background:"var(--md-color-surface-raised,#fff)",boxShadow:"var(--md-shadow-dropdown,0 5px 5px -3px rgba(0,0,0,.20),0 8px 10px 1px rgba(0,0,0,.14),0 3px 14px 2px rgba(0,0,0,.12))",minWidth:"160px",...r.style??{}}}),l=a.el;r.destroyOnClose;const c=()=>{const t=s.getBoundingClientRect();l.style.visibility="hidden",l.style.display="block",r.matchAnchorWidth&&(l.style.width=`${t.width}px`);const e=l.offsetWidth,n=l.offsetHeight,i=rc(s,t,e,n,r.gap??4,r.position??"bottom-start");!function(t,e,n,s,i,o){const r=window.innerWidth,a=window.innerHeight;let l=0,c=0;n.startsWith("bottom")?l=e.bottom+o:n.startsWith("top")?l=e.top-o-i:"right"===n||"left"===n?l=e.top+e.height/2-i/2:n.endsWith("-start")?l=e.top:n.endsWith("-end")&&(l=e.bottom-i),"bottom"===n||"top"===n?c=e.left+e.width/2-s/2:n.endsWith("-start")?c=n.startsWith("right")?e.right+o:n.startsWith("left")?e.left-o-s:e.left:n.endsWith("-end")?c=n.startsWith("right")?e.right+o:n.startsWith("left")?e.left-o-s:e.right-s:n.startsWith("right")?c=e.right+o:n.startsWith("left")&&(c=e.left-o-s);const h=Math.max(4,Math.min(c,r-s-4)),u=Math.max(4,Math.min(l,a-i-4)),d=parseInt(String(h),10),f=parseInt(String(u),10);t.style.left=`${d}px`,t.style.top=`${f}px`}(l,t,i,e,n,r.gap??4),l.style.visibility=""},h=()=>{i&&c()};let u=null;const d=()=>{u?.disconnect(),u=null},f=t=>{const e=t.target;l.contains(e)||s.contains(e)||y()},p=t=>{"Escape"===t.key&&y()},m=t=>"boolean"==typeof t?t:t(),_=()=>void 0!==r.open,g=()=>{i||(i=!0,a.isAttached()||(a.attach(),U(o,l),console.log("[popup] LAZY-ATTACHED to body on open — floating:",l)),c(),r.onOpen?.(l),_()||(document.addEventListener("click",f,{capture:!0}),document.addEventListener("keydown",p)),window.addEventListener("scroll",h,{passive:!0,capture:!0}),window.addEventListener("resize",h,{passive:!0}),r.matchAnchorWidth&&(u=new ResizeObserver(t=>{if(!i)return;const e=t[0]?.borderBoxSize?.[0]?.inlineSize??t[0]?.contentRect.width;null!=e&&(l.style.width=`${e}px`,l.style.minWidth=`${e}px`,h())}),u.observe(s)))},y=()=>{i&&(console.log("[popup] CLOSE — destroyOnClose:",r.destroyOnClose,"floating.isConnected:",l.isConnected,"floating:",l),i=!1,r.destroyOnClose||(l.style.display="none"),r.onClose?.(s,l),r.destroyOnClose&&a.isAttached()&&(console.log("[popup] REMOVED from body in close() — floating:",l),a.detach()),_()||(document.removeEventListener("click",f,{capture:!0}),document.removeEventListener("keydown",p)),window.removeEventListener("scroll",h,{capture:!0}),window.removeEventListener("resize",h),d())},w=t=>{t.stopPropagation(),i?y():g()};return _()?m(r.open)&&g():s.addEventListener("click",w),{onUpdate(t,e){console.log("[popup] UPDATE — isOpen:",i,"anchor:",s);const n=_();if(o=t,r=e,l.isConnected&&U(t,l),e.style&&Object.assign(l.style,e.style),_()){n||s.removeEventListener("click",w);const t=m(e.open);t&&!i?g():!t&&i?y():i&&c()}else n&&s.addEventListener("click",w),i&&c()},onCleanup(){console.log("[popup] CLEANUP — isOpen:",i,"floating.parentNode:",l.parentNode??"NO PARENT","floating.isConnected:",l.isConnected,"floating:",l,"anchor.isConnected:",s.isConnected),i&&y(),d(),_()||s.removeEventListener("click",w),a.detach(),console.log("[popup] CLEANUP DONE — floating still in body?",a.isAttached())}}});function lc(t,e){return ac(t,"string"==typeof e?{position:e}:e??{})}function cc(t,e,n){const s=t=>parseInt(String(t),10);switch(e){case"top":case"top-start":return{top:s(t.top-n),left:s(t.left)};case"top-end":return{top:s(t.top-n),left:s(t.right)};case"bottom":case"bottom-start":default:return{top:s(t.bottom+n),left:s(t.left)};case"bottom-end":return{top:s(t.bottom+n),left:s(t.right)};case"right":case"right-start":return{top:s(t.top),left:s(t.right+n)};case"right-end":return{top:s(t.bottom),left:s(t.right+n)};case"left":case"left-start":return{top:s(t.top),left:s(t.left-n)};case"left-end":return{top:s(t.bottom),left:s(t.left-n)}}}function hc(t){return"top"===t||"top-start"===t||"top-end"===t?"translateY(-100%)":"left"===t||"left-start"===t||"left-end"===t?"translateX(-100%)":""}function uc(t,e,n,s){const i=window.innerHeight-t.bottom-s,o=t.top-s,r=window.innerWidth-t.right-s,a=t.left-s;if(i>=n)return"bottom";if(o>=n)return"top";if(r>=e)return"right";if(a>=e)return"left";return[["bottom",i],["top",o],["right",r],["left",a]].reduce((t,e)=>e[1]>t[1]?e:t)[0]}const dc=Bo((t,e,n)=>{const s=document.createElement("div");if(n?.style&&Object.assign(s.style,n.style),n?.on)for(const[t,e]of Object.entries(n.on))s.addEventListener(t,e);return function(t){return t?"string"==typeof t?document.querySelector(t)??document.body:t:document.body}(n?.target).appendChild(s),U(e,s),{onUpdate(t){U(t,s)},onCleanup(){s.remove()}}});function fc(t,e){return dc(t,e)}const pc=1e3,mc=3e4,_c=1/0;function gc(t,e={}){le("ws");const{reconnect:n=!0,reconnectDelay:s=pc,reconnectMaxDelay:i=mc,reconnectMaxAttempts:o=_c,protocols:r,auth:a,autoConnect:l=!0}=e,c=Es("connecting",{skipRestrictedContextCheck:!0}),h=new Set;let u=null,d=0,f=s,p=null,m=!1;const _=[];function g(){null!==p&&(clearTimeout(p),p=null)}function y(){let e;m=!1,g(),c.set("connecting");try{e=function(){if(!a)return t;const e=a(),n=Object.entries(e);if(0===n.length)return t;const s=n.map(([t,e])=>`${encodeURIComponent(t)}=${encodeURIComponent(e)}`).join("&");return t.includes("?")?`${t}&${s}`:`${t}?${s}`}()}catch(t){return me(t),void c.set("error")}try{u=r?new WebSocket(e,r):new WebSocket(e)}catch(t){return me(t),c.set("error"),void w()}u.onopen=()=>{m?u?.close():(d=0,f=s,c.set("connected"),function(){for(;_.length>0;){const t=_.shift();u?.readyState===WebSocket.OPEN&&u.send(t)}}())},u.onmessage=t=>{if(m)return;const e="string"==typeof t.data?t.data:String(t.data);let n;try{n=JSON.parse(e)}catch{n=e}var s;s=n,h.forEach(t=>{try{t(s)}catch(t){me(t)}})},u.onerror=()=>{c.set("error")},u.onclose=()=>{m||(c.set("disconnected"),w())}}function w(){if(!n||m)return;if(d>=o)return;d++;const t=f;f=Math.min(2*f,i),p=setTimeout(()=>{m||y()},t)}function v(){m=!0,g(),u&&(u.onopen=null,u.onmessage=null,u.onerror=null,u.onclose=null,u.readyState!==WebSocket.OPEN&&u.readyState!==WebSocket.CONNECTING||u.close(1e3,"client disconnect"),u=null),c.set("disconnected"),h.clear(),_.length=0}const b={send:function(t){const e="string"==typeof t?t:JSON.stringify(t);u?.readyState===WebSocket.OPEN?u.send(e):_.push(e)},__subscribe:function(t){return h.add(t),()=>h.delete(t)},status:c,connect:y,disconnect:v,__isWs___:!0};return l?y():c.set("disconnected"),xe(b,v),b}class yc{constructor(){this.id=Math.random().toString(36).substring(2,15),this.context=null}}function wc(){if("undefined"==typeof document)return{};const t=document.cookie;if(!t)return{};const e={};for(const n of t.split(";")){const t=n.indexOf("=");if(-1===t)continue;const s=n.slice(0,t).trim();if(!s)continue;const i=n.slice(t+1).trim();try{e[s]=decodeURIComponent(i)}catch{e[s]=i}}return e}function vc(t,e=new WeakMap){if("function"==typeof structuredClone)return structuredClone(t);if(null===t||"object"!=typeof t)return t;if(t instanceof Date)return new Date(t.getTime());if(t instanceof RegExp)return new RegExp(t.source,t.flags);if(t instanceof Map){const n=new Map;return e.set(t,n),t.forEach((t,s)=>n.set(vc(s,e),vc(t,e))),n}if(t instanceof Set){const n=new Set;return e.set(t,n),t.forEach(t=>n.add(vc(t,e))),n}if(Array.isArray(t)){const n=[];e.set(t,n);for(let s=0;s<t.length;s++)n[s]=vc(t[s],e);return n}const n=e.get(t);if(n)return n;const s={};e.set(t,s);for(const n of Object.keys(t))s[n]=vc(t[n],e);return s}function bc(t,e){let n=Object.getOwnPropertyDescriptor(t,e),s=Object.getPrototypeOf(t);for(;!n&&s&&s!==Object.prototype;)n=Object.getOwnPropertyDescriptor(s,e),s=Object.getPrototypeOf(s);return n?.get&&"function"==typeof n.get?n.get:null}var Sc,Ec,Cc,Ac,kc,Mc;function xc(t){return"number"==typeof t?`${t}px`:t}Ec=new WeakMap,Cc=new WeakMap,Ac=new WeakMap,kc=new WeakMap,Sc=new WeakSet,Mc=function(t){ge(this,Ec,"f")?.remove(),ye(this,Ec,null,"f"),ye(this,Cc,"","f"),ye(this,Ac,"","f"),ye(this,kc,new Set,"f");const e=t.endNode;if(e?.parentNode){const n=t.startNode,s=document.createRange();s.setStartAfter(n),s.setEndBefore(e),s.deleteContents()}};const $c=Y(class extends q{constructor(t){if(super(t),Sc.add(this),Ec.set(this,null),Cc.set(this,""),Ac.set(this,""),kc.set(this,new Set),t.type!==V)throw new Error("safeSVG() must be used as a child expression, e.g. html`<div>${safeSVG(markup)}</div>`")}update(t,[e,n]){if(console.log("update"),!e.trimStart().startsWith("<svg"))return console.warn("safeSVG: input does not start with <svg — nothing rendered"),ge(this,Sc,"m",Mc).call(this,t),E;const s=JSON.stringify(n);if(null===ge(this,Ec,"f")||e!==ge(this,Cc,"f")){const n=function(t){const e=document.createElement("template");e.innerHTML=t;const n=e.content.firstElementChild;return n instanceof SVGElement?n:null}(e);if(null===n)return console.warn("safeSVG: failed to parse SVG markup — nothing rendered"),ge(this,Sc,"m",Mc).call(this,t),E;ge(this,Ec,"f")?.remove(),ye(this,Ec,n,"f"),ye(this,Cc,e,"f"),ye(this,Ac,"","f"),ye(this,kc,new Set,"f");const s=t.endNode;s.parentNode.insertBefore(ge(this,Ec,"f"),s)}if(s!==ge(this,Ac,"f")){const t=function(t,e){const n=new Set,s=(e,s)=>{t.setAttribute(e,s),n.add(e)},i=e.width??e.size,o=e.height??e.size;void 0!==i&&s("width",xc(i)),void 0!==o&&s("height",xc(o)),void 0!==e.fill&&s("fill",e.fill),void 0!==e.stroke&&s("stroke",e.stroke),void 0!==e.strokeWidth&&s("stroke-width",String(e.strokeWidth)),void 0!==e.strokeLinecap&&s("stroke-linecap",e.strokeLinecap),void 0!==e.strokeLinejoin&&s("stroke-linejoin",e.strokeLinejoin),void 0!==e.opacity&&s("opacity",String(e.opacity)),void 0!==e.viewBox&&s("viewBox",e.viewBox),void 0!==e.transform&&s("transform",e.transform);const r=[],a=e.width??e.size,l=e.height??e.size;void 0!==a&&r.push(`width:${xc(a)}`),void 0!==l&&r.push(`height:${xc(l)}`),void 0!==e.color&&r.push(`color:${e.color}`),r.push("display:inline-block"),r.push("vertical-align:middle"),e.style&&r.push(e.style),s("style",r.join(";")),e.class&&s("class",e.class);const c=e.ariaHidden??!0;return e.ariaLabel?(s("aria-label",e.ariaLabel),s("role","img")):c&&s("aria-hidden","true"),n}(ge(this,Ec,"f"),n);for(const e of ge(this,kc,"f"))t.has(e)||ge(this,Ec,"f").removeAttribute(e);ye(this,kc,t,"f"),ye(this,Ac,s,"f")}return E}render(t,e){return E}});function Tc(t,e={}){return $c(t,e)}let Rc=null,Oc=null,Ic=null;function Pc(t){Rc=t}function zc(t){Oc=t}function Dc(){return Oc}function Nc(){return Rc??-(new Date).getTimezoneOffset()}function Lc(){return Ic??("undefined"!=typeof navigator?navigator.language:null)??"en"}function jc(t,e){const n={};for(const s of new Intl.DateTimeFormat("en",{timeZone:t,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",hour12:!1}).formatToParts(new Date(e)))"literal"!==s.type&&(n[s.type]=parseInt(s.value,10));const s=24===n.hour?0:n.hour,i=Date.UTC(n.year,n.month-1,n.day,s,n.minute,n.second);return Math.round((i-e)/6e4)||0}function Uc(t,e){try{const n=new Intl.DateTimeFormat("en",{timeZone:t,timeZoneName:"short"}).formatToParts(new Date(e)).find(t=>"timeZoneName"===t.type);return n?n.value:t}catch{return t}}function Fc(t,e){try{const n=new Intl.DateTimeFormat("en",{timeZone:t,timeZoneName:"long"}).formatToParts(new Date(e)).find(t=>"timeZoneName"===t.type);return n?n.value:t}catch{return t}}function Vc(t,e){const n=new Date(t+6e4*e);return{Y:n.getUTCFullYear(),M:n.getUTCMonth()+1,D:n.getUTCDate(),h:n.getUTCHours(),m:n.getUTCMinutes(),s:n.getUTCSeconds(),ms:n.getUTCMilliseconds(),wd:n.getUTCDay()}}const Wc=t=>String(t).padStart(2,"0");function Bc(t,e,n){const s={[n]:e};return Oc?s.timeZone=Oc:(s.timeZone="UTC",t+=6e4*Nc()),new Intl.DateTimeFormat(Lc(),s).format(new Date(t))}function Hc(t,e){const n=t>=0?"+":"-",s=Math.abs(t);return e?`${n}${Wc(Math.floor(s/60))}:${Wc(s%60)}`:`${n}${Wc(Math.floor(s/60))}${Wc(s%60)}`}function Yc(t){const e=t.replace(/s$/,"");if("millisecond"===e||"m"===e)return"ms";if("minute"===e)return"min";if(!new Set(["year","month","week","day","hour","min","second","ms"]).has(e))throw new RangeError(`Invalid date unit: "${t}"`);return e}function qc(){try{const t=new Intl.Locale(Lc()),e=t.weekInfo?.firstDay??t.getWeekInfo?.()?.firstDay;if(void 0!==e)return e%7}catch{}return 0}const Xc=/YYYY|YY|MMMM|MMM|MM|M|DD|D|dddd|ddd|HH|H|hh|h|mm|ss|SSS|ZZ|Z|A|a/g,Zc=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"];function Gc(t){try{const e=new Date(Date.UTC(2024,0,7+t,12,0,0));return new Intl.DateTimeFormat(Lc(),{weekday:"long",timeZone:"UTC"}).format(e)}catch{return Zc[t]||""}}function Kc(t){try{const e=new Date(Date.UTC(2024,t-1,15,12,0,0));return new Intl.DateTimeFormat(Lc(),{month:"long",timeZone:"UTC"}).format(e)}catch{return""}}function Qc(t){if(t instanceof Number)return t.valueOf();if("number"==typeof t)return t;if("string"==typeof t)return new Date(t).getTime();if(t instanceof Date)return t.getTime();if("object"==typeof t&&null!==t){const{year:e=1970,month:n=1,day:s=1,hour:i=0,minute:o=0,second:r=0,ms:a=0}=t;return Date.UTC(e,n-1,s,i,o,r,a)-6e4*Nc()}return NaN}function Jc(t,e,n){const s=Yc(n);if("hour"===s)return t+36e5*e;if("min"===s)return t+6e4*e;if("second"===s)return t+1e3*e;if("ms"===s)return t+e;const i=Nc(),o=Vc(t,i);let r=o.Y,a=o.M,l=o.D;if("year"===s)r+=e;else if("month"===s){const t=a-1+e;r+=Math.floor(t/12),a=(t%12+12)%12+1,l=Math.min(l,new Date(r,a,0).getDate())}else l+="week"===s?7*e:e;return Date.UTC(r,a-1,l,o.h,o.m,o.s,o.ms)-6e4*i}function th(t,e){const n=Nc(),s=Vc(t,n),i=Vc(e,n);return s.Y===i.Y&&s.M===i.M&&s.D===i.D}function eh(t){const e=Nc(),n=Vc(t,e);return Date.UTC(n.Y,n.M-1,n.D,0,0,0,0)-6e4*e}function nh(t,e){const n=Nc(),s=Vc(t,n),i=s.h%12||12,o=[],r=e.replace(/\[([^\]]*)\]/g,(t,e)=>(o.push(e),`\0${o.length-1}\0`));Xc.lastIndex=0;const a=r.replace(Xc,e=>{switch(e){case"YYYY":return String(s.Y);case"YY":return String(s.Y).slice(-2);case"MMMM":return Bc(t,"long","month");case"MMM":return Bc(t,"short","month");case"MM":return Wc(s.M);case"M":return String(s.M);case"DD":return Wc(s.D);case"D":return String(s.D);case"dddd":return Bc(t,"long","weekday");case"ddd":return Bc(t,"short","weekday");case"HH":return Wc(s.h);case"H":return String(s.h);case"hh":return Wc(i);case"h":return String(i);case"mm":return Wc(s.m);case"ss":return Wc(s.s);case"SSS":return(t=>String(t).padStart(3,"0"))(s.ms);case"A":return s.h>=12?"PM":"AM";case"a":return s.h>=12?"pm":"am";case"Z":return Hc(n,!0);case"ZZ":return Hc(n,!1);default:return e}});return a.replace(/\0(\d+)\0/g,(t,e)=>o[+e])}const sh=[["year",31536e3],["month",2592e3],["week",604800],["day",86400],["hour",3600],["minute",60],["second",1]];const ih=Symbol("ts"),oh=Object.create(Number.prototype);function rh(t){return function(t){const e=Object.create(oh);return e[ih]=t,e}(void 0===t?Date.now():Qc(t))}function ah(t){null==t?(Pc(null),zc(null)):(Pc(t.offset),zc(t.name))}function lh(t){Pc(t),zc(null)}function ch(){return Nc()}function hh(t){!function(t){Ic=t}(t??null)}function uh(){return Lc()}function dh(){let t;try{t=Intl.supportedValuesOf("timeZone")}catch{return[]}const e=Date.now();return t.map(t=>({name:t,longName:Fc(t,e),shortName:Uc(t,e),offset:jc(t,e)}))}function fh(t){const e=t??Lc(),n=new Intl.DateTimeFormat(e,{month:"long",timeZone:"UTC"}),s=new Intl.DateTimeFormat(e,{month:"short",timeZone:"UTC"}),i=[];for(let t=1;t<=12;t++){const e=new Date(Date.UTC(2024,t-1,15,12,0,0));i.push({number:t,name:n.format(e),shortName:s.format(e)})}return i}function ph(t,e){if(!Number.isInteger(t)||!Number.isInteger(e)||e<1||e>12)throw new RangeError("getCalendar(year, month): month must be integer 1–12");const n=rh({year:t,month:e,day:1}),{year:s,month:i,numberOfDaysOfTheMonth:o}=n.values,r=[];for(let t=Vc(n.valueOf(),Nc()).wd;t>0;t--)r.push(rh({year:s,month:i,day:1-t}));for(let t=1;t<=o;t++)r.push(rh({year:s,month:i,day:t}));const a=r.length%7,l=0===a?0:7-a,c=rh({year:s,month:i,day:o});for(let t=0;t<l;t++)c.add(1,"day"),r.push(rh(c.valueOf()));const h=[];for(let t=0;t<r.length;t+=7)h.push(r.slice(t,t+7));return h}Object.defineProperties(oh,{valueOf:{value(){return this[ih]},writable:!1,configurable:!1},values:{get(){const t=this[ih],e=Vc(t,Nc());return{year:e.Y,month:e.M,monthName:Kc(e.M),dayName:Gc(e.wd),date:e.D,weekStartDayName:Gc(qc()),numberOfDaysOfTheMonth:new Date(e.Y,e.M,0).getDate(),hours:e.h,minutes:e.m,seconds:e.s,milliSeconds:e.ms,timestamp:t,iso:new Date(t).toISOString()}},configurable:!1},toJSON:{value(){const t=this[ih];return Number.isFinite(t)?new Date(t).toISOString():"Invalid Date"},writable:!1,configurable:!1},toString:{value(){const t=this[ih];return Number.isFinite(t)?new Intl.DateTimeFormat(Lc(),{dateStyle:"medium",...Dc()?{timeZone:Dc()}:{timeZone:"UTC"}}).format(new Date(Dc()?t:t+6e4*Nc())):"Invalid Date"},writable:!1,configurable:!1},format:{value(t){return nh(this[ih],t)},writable:!1,configurable:!1},formatLongAgo:{value(t){return function(t,e={}){const{numeric:n="auto",style:s="long"}=e,i=((void 0!==e.now?Qc(e.now):Date.now())-t)/1e3,o=Math.abs(i),r=i>=0?-1:1,a=new Intl.RelativeTimeFormat(Lc(),{numeric:n,style:s});for(const[t,e]of sh)if(o>=e)return a.format(r*Math.round(o/e),t);return a.format(0,"second")}(this[ih],t)},writable:!1,configurable:!1},add:{value(t,e){return this[ih]=Jc(this[ih],t,e),this},writable:!1,configurable:!1},subtract:{value(t,e){return this[ih]=Jc(this[ih],-t,e),this},writable:!1,configurable:!1},isBefore:{value(t){return this[ih]<Qc(t)},writable:!1,configurable:!1},isAfter:{value(t){return this[ih]>Qc(t)},writable:!1,configurable:!1},isFuture:{value(){return this[ih]>Date.now()},writable:!1,configurable:!1},isPresent:{value(){return th(this[ih],Date.now())},writable:!1,configurable:!1},isToday:{value(){return th(this[ih],Date.now())},writable:!1,configurable:!1},isYesterday:{value(){const t=Jc(eh(Date.now()),-1,"day");return th(this[ih],t)},writable:!1,configurable:!1},isTomorrow:{value(){const t=Jc(eh(Date.now()),1,"day");return th(this[ih],t)},writable:!1,configurable:!1},getDifference:{value(t,e){return function(t,e,n){const s=Yc(n),i=t-e;if("ms"===s)return i;if("second"===s)return Math.trunc(i/1e3);if("min"===s)return Math.trunc(i/6e4);if("hour"===s)return Math.trunc(i/36e5);const o=Nc(),r=Vc(t,o),a=Vc(e,o);if("day"===s||"week"===s){const n=Math.floor((t+6e4*o)/864e5)-Math.floor((e+6e4*o)/864e5);return"week"===s?Math.trunc(n/7):n}return"month"===s?12*(r.Y-a.Y)+(r.M-a.M):r.Y-a.Y}(this[ih],Qc(t),e)},writable:!1,configurable:!1},getAge:{value(t){return function(t,e){const n=Nc(),s=Vc(t,n),i=Vc(e,n);let o=i.Y-s.Y,r=s.M,a=s.D;if(2===r&&29===a){const t=t=>t%4==0&&t%100!=0||t%400==0;t(i.Y)||(r=3,a=1)}return(i.M<r||i.M===r&&i.D<a)&&o--,Math.max(0,o)}(this[ih],void 0!==t?Qc(t):Date.now())},writable:!1,configurable:!1}});export{ko as $,yc as Context,so as Delete,Ti as ErrorTypes,Qi as Fetch,Yi as FetchClient,Ji as Get,Gn as MA,Se as NotificationManager,no as Patch,to as Post,eo as Put,Si as Router,Ee as SyncNotificationManager,$i as ZeroPromise,en as _,Oi as _hydrationCounter,nn as _subToView,Kn as action,Kt as addStoreBeingRead,xo as animatedIf,ci as animatedRouter,$o as animatedX,Xa as arrayRange,le as assertComponentOuterContext,ae as assertNotInRestrictedContext,Ts as asyncAction,_t as asyncAppend,mt as asyncReplace,Es as atom,Io as attr,fs as blurInPreset,ps as blurOutPreset,as as bouncePreset,hi as buildPath,Ni as buildRequestUrl,za as cacheAtom,xs as cacheFn,Da as changeFlagAtom,Za as chunk,qa as clamp,wt as classMap,Do as classes,He as cleanupScheduler,Hi as clearInterceptors,_s as collapseWidthPreset,Ln as collectSSRStyles,oe as componentRunningStatus,uc as computeAutoPlacement,wn as configureCSS,Fo as countdown,xs as createCacheManager,ic as createFloatingContainer,Rs as createManagedTimer,$s as createPollingManager,bs as createReactiveRunner,Sa as createTimedAtom,rh as date,zs as debounce,Ea as debouncedAtom,Ue as decrementSsrAsyncCounter,vc as deepClone,ys as deepFreeze,Ca as delayAtom,co as deleteAction,ys as df,ec as dialog,Vo as disappear,Fe as done,Fs as effect,Ye as effectScheduler,Ro as eleHook,Te as event,ms as expandWidthPreset,Qn as fadeInPreset,Jn as fadeOutPreset,io as fetchAction,qi as fetchClient,us as flipInPreset,ds as flipOutPreset,Ua as formAtom,Va as get,oo as getAction,ll as getAllProps,dh as getAllTimezones,ph as getCalendar,wc as getCookieObj,cc as getCoords,Me as getCurrentHost,uh as getLocale,fh as getMonths,hl as getParentScope,hl as getScope,Ve as getSsrAsyncCounter,Zt as getStoresBeingRead,ch as getTimezoneOffset,Yn as globalCSS,qe as globalScheduler,_o as globalTheme,Ka as groupBy,bt as guard,di as hashAtom,Ks as historyStateAtom,b as html,Bo as htmlHook,zi as hydrationPending,Cs as iAtom,St as ifDefined,Ii as incHydration,je as incrementSsrAsyncCounter,ha as indexDB,Zn as injectMatesAnimations,Bt as installDevToolsHooks,Wi as interceptAfter,Vi as interceptBefore,Bi as interceptError,fa as isAction,Ri as isApiResponseSuccess,pa as isAsyncAction,ba as isAsyncFunction,ln as isAsyncValue,ua as isAtom,ya as isChannel,ga as isConfirmationEvent,bc as isDefinedAsGetter,We as isDev,Ht as isDevToolsInstalled,Gt as isEffectRunning,el as isEmail,Qa as isEmpty,_a as isEvent,va as isFunction,wa as isGetter,re as isInRestrictedContext,rl as isMax,ol as isMin,ai as isPathMatching,il as isPattern,Xt as isReadTrackingEnabled,tl as isRequired,Pe as isSSR,ma as isSetter,da as isUnit,Ja as iterateDeeply,Et as join,Ct as keyed,Hn as keyframes,Ko as lazyLoad,yt as litCache,At as live,vi as location,Js as lockNavigation,pe as log,me as logError,_e as logWarning,Ra as lsAtom,Aa as mapAtom,sr as masonryGrid,he as matesLogEvent,sl as maxLength,al as memo,ar as memoTemplate,Ya as merge,nl as minLength,Al as miniDB,ni as navigateTo,Qs as navigationLocked,si as navigationRequestEvent,E as noChange,C as nothing,Ba as omit,on,Qe as onAllMount,Rl as onBlur,Je as onCleanup,Hl as onClickAway,tr as onConnect,Nl as onCopy,Ll as onCut,Jl as onDOMReady,er as onDisconnect,jo as onEleEvent,ml as onError,_r as onEvent,Bl as onFileDrop,Ol as onFocus,Xo as onHidden,Yo as onIntersect,Zl as onInterval,jl as onKeyDown,Ul as onKeyUp,Ge as onMount,Xl as onNavigate,ii as onNavigationRequest,Pl as onOffline,Il as onOnline,Ke as onPaint,wr as onParent,Dl as onPaste,_l as onReferenceChange,ql as onResize,Yl as onScroll,Go as onScrolledIntoView,Vl as onSelectionChange,Kl as onSocket,Wl as onStorageChange,Gl as onTimeout,Ql as onUpdate,Fl as onVisibilityChange,qo as onVisible,xl as onWindow,$l as onWindowCapture,zl as onWindowResize,Tl as onWindowScroll,ei as onceIdle,Ds as paginatedAsyncAction,Na as paginationAtom,lo as patchAction,oi as pathAtom,Wa as pick,hc as placementTransform,Jt as popEffect,lc as popup,fc as portal,ro as postAction,hs as pulsePreset,Qt as pushEffect,ao as putAction,gi as qsAtom,gl as randomId,kt as range,Bs as ref,xe as registerCleanup,Po as removeAttr,No as removeClasses,gr as removeOn,Er as removeStyle,U as render,vr as renderSwitch,Gs as renderTemplate,Zs as renderX,xt as repeat,mi as replaceParams,Be as resetComponentState,cn as resolveAsyncValue,ee as restoreTracking,go as rootCSS,bi as route,Xi as runWithGlobalInterceptors,ue as safeClone,Tc as safeSVG,Xe as safetyCheck,te as saveAndEnableTracking,is as scaleInPreset,os as scaleOutPreset,cl as scope,ka as setAtom,hh as setLocale,Hs as setRef,Ai as setSSRApiLookup,Ie as setSSRMode,ki as setSSRRequest,Le as setSsrDoneCallback,ah as setTimezone,lh as setTimezoneOffset,tn as setter,cs as shakePreset,Cs as signal,es as slideInPreset,ns as slideOutPreset,rs as spinPreset,ls as springInPreset,Oa as ssAtom,ne as startTracking,se as stopTracking,fl as store,Sr as style,Rt as styleMap,Un as stylesheet,As as superAtom,S as svg,Ns as taskAction,Xs as template,fo as themeAtom,Ls as throttle,Ia as throttledAtom,Ar as timerTemplate,Pa as titleAtom,ws as trackAndSubscribe,Ga as uniqBy,ti as unlockNavigation,It as unsafeHTML,Tc as unsafeSVG,Dt as until,hn as unwrapModule,rn as useContext,Uo as useEleEvent,cl as useScope,pl as useState,sn as useStore,gl as uuid,Fa as validateAll,vs as validateReactiveFunction,qs as view,ea as virtualList,na as virtualMasonry,on as watch,Nt as when,Zi as withAuth,Gi as withBaseUrl,ke as withHost,Ki as withLogging,gs as withStaggerPreset,gc as ws,Ys as x,$e as xTabEvent};
|
|
179
|
+
*/(this._hostElement,t),this._scrollerController=new Yr(this,this._clippingAncestors[0]),this._schedule(this._updateLayout),this._observeAndListen(),this._connected=!0}_observeAndListen(){this._mutationObserver.observe(this._hostElement,{childList:!0}),this._hostElementRO.observe(this._hostElement),this._scrollEventListeners.push(window),window.addEventListener("scroll",this,this._scrollEventListenerOptions),this._clippingAncestors.forEach(t=>{t.addEventListener("scroll",this,this._scrollEventListenerOptions),this._scrollEventListeners.push(t),this._hostElementRO.observe(t)}),this._hostElementRO.observe(this._scrollerController.element),this._children.forEach(t=>this._childrenRO.observe(t)),this._scrollEventListeners.forEach(t=>t.addEventListener("scroll",this,this._scrollEventListenerOptions))}disconnected(){this._scrollEventListeners.forEach(t=>t.removeEventListener("scroll",this,this._scrollEventListenerOptions)),null!==this._scrollEndRafId&&(cancelAnimationFrame(this._scrollEndRafId),this._scrollEndRafId=null),this._scrollEventListeners=[],this._clippingAncestors=[],this._scrollerController?.detach(this),this._scrollerController=null,this._mutationObserver?.disconnect(),this._mutationObserver=null,this._hostElementRO?.disconnect(),this._hostElementRO=null,this._childrenRO?.disconnect(),this._childrenRO=null,this._rejectLayoutCompletePromise("disconnected"),this._connected=!1}_applyVirtualizerStyles(){const t=this._hostElement.style;t.display=t.display||"block",t.position=t.position||"relative",t.contain=t.contain||"size layout",this._isScroller&&(t.overflow=t.overflow||"auto",t.minHeight=t.minHeight||"150px")}_getSizer(){const t=this._hostElement;if(!this._sizer){let e=t.querySelector(`[${Zr}]`);e||(e=document.createElement("div"),e.setAttribute(Zr,""),t.appendChild(e)),Object.assign(e.style,{position:"absolute",margin:"-2px 0 0 0",padding:0,visibility:"hidden",fontSize:"2px"}),e.textContent=" ",e.setAttribute(Zr,""),this._sizer=e}return this._sizer}async updateLayoutConfig(t){await this._layoutInitialized;const e=t.type||Gr;if("function"==typeof e&&this._layout instanceof e){const e={...t};return delete e.type,this._layout.config=e,!0}return!1}async _initLayout(t){let e,n;if("function"==typeof t.type){n=t.type;const s={...t};delete s.type,e=s}else e=t;void 0===n&&(Gr=n=(await Promise.resolve().then(function(){return Dr})).FlowLayout),this._layout=new n(t=>this._handleLayoutMessage(t),e),this._layout.measureChildren&&"function"==typeof this._layout.updateItemSizes&&("function"==typeof this._layout.measureChildren&&(this._measureChildOverride=this._layout.measureChildren),this._measureCallback=this._layout.updateItemSizes.bind(this._layout)),this._layout.listenForChildLoadEvents&&this._hostElement.addEventListener("load",this._loadListener,!0),this._schedule(this._updateLayout)}startBenchmarking(){null===this._benchmarkStart&&(this._benchmarkStart=window.performance.now())}stopBenchmarking(){if(null!==this._benchmarkStart){const t=window.performance.now(),e=t-this._benchmarkStart,n=performance.getEntriesByName("uv-virtualizing","measure").filter(e=>e.startTime>=this._benchmarkStart&&e.startTime<t).reduce((t,e)=>t+e.duration,0);return this._benchmarkStart=null,{timeElapsed:e,virtualizationTime:n}}return null}_measureChildren(){const t={},e=this._children,n=this._measureChildOverride||this._measureChild;for(let s=0;s<e.length;s++){const i=e[s],o=this._first+s;(this._itemsChanged||this._toBeMeasured.has(i))&&(t[o]=n.call(this,i,this._items[o]))}this._childMeasurements=t,this._schedule(this._updateLayout),this._toBeMeasured.clear()}_measureChild(t){const{width:e,height:n}=t.getBoundingClientRect();return Object.assign({width:e,height:n},function(t){const e=window.getComputedStyle(t);return{marginTop:Qr(e.marginTop),marginRight:Qr(e.marginRight),marginBottom:Qr(e.marginBottom),marginLeft:Qr(e.marginLeft)}}(t))}_schedule(t){const e=this._scheduled.get(t);void 0!==e&&cancelAnimationFrame(e);const n=requestAnimationFrame(()=>{this._scheduled.delete(t),t.call(this)});this._scheduled.set(t,n)}async _updateDOM(t){this._scrollSize=t.scrollSize,this._adjustRange(t.range),this._childrenPos=t.childPositions,this._scrollError=t.scrollError||null;const{_rangeChanged:e,_itemsChanged:n}=this;this._visibilityChanged&&(this._notifyVisibility(),this._visibilityChanged=!1),(e||n)&&(this._notifyRange(),this._rangeChanged=!1),this._finishDOMUpdate()}_finishDOMUpdate(){this._connected&&(this._children.forEach(t=>this._childrenRO.observe(t)),this._checkScrollIntoViewTarget(this._childrenPos),this._positionChildren(this._childrenPos),this._sizeHostElement(this._scrollSize),this._correctScrollError(),this._benchmarkStart&&"mark"in window.performance&&window.performance.mark("uv-end"))}_updateLayout(){this._layout&&this._connected&&(this._layout.items=this._items,this._updateView(),null!==this._childMeasurements&&(this._measureCallback&&this._measureCallback(this._childMeasurements),this._childMeasurements=null),this._layout.reflowIfNeeded(),this._benchmarkStart&&"mark"in window.performance&&window.performance.mark("uv-end"))}_handleScrollEvent(){if(this._benchmarkStart&&"mark"in window.performance){try{window.performance.measure("uv-virtualizing","uv-start","uv-end")}catch(t){console.warn("Error measuring performance data: ",t)}window.performance.mark("uv-start")}!1===this._scrollerController.correctingScrollError&&this._layout?.unpin(),this._schedule(this._updateLayout),null!==this._scrollEndRafId&&cancelAnimationFrame(this._scrollEndRafId),this._scrollEndRafId=requestAnimationFrame(()=>{this._scrollEndRafId=null,this._connected&&this._updateLayout()})}handleEvent(t){if("scroll"===t.type)(t.currentTarget===window||this._clippingAncestors.includes(t.currentTarget))&&this._handleScrollEvent();else console.warn("event not handled",t)}_handleLayoutMessage(t){"stateChanged"===t.type?this._updateDOM(t):"visibilityChanged"===t.type?(this._firstVisible=t.firstVisible,this._lastVisible=t.lastVisible,this._notifyVisibility()):"unpinned"===t.type&&this._hostElement.dispatchEvent(new Br)}get _children(){const t=[];let e=this._hostElement.firstElementChild;for(;e;)e.hasAttribute(Zr)||t.push(e),e=e.nextElementSibling;return t}_updateView(){const t=this._hostElement,e=this._scrollerController?.element,n=this._layout;if(t&&e&&n){let s,i,o,r;const a=t.getBoundingClientRect();s=0,i=0,o=window.innerHeight,r=window.innerWidth;const l=this._clippingAncestors.map(t=>t.getBoundingClientRect());l.unshift(a);for(const t of l)s=Math.max(s,t.top),i=Math.max(i,t.left),o=Math.min(o,t.bottom),r=Math.min(r,t.right);const c=e.getBoundingClientRect(),h={left:a.left-c.left,top:a.top-c.top},u={width:e.scrollWidth,height:e.scrollHeight},d=s-a.top+t.scrollTop,f=i-a.left+t.scrollLeft,p=Math.max(0,o-s),m=Math.max(0,r-i);n.viewportSize={width:m,height:p},n.viewportScroll={top:d,left:f},n.totalScrollSize=u,n.offsetWithinScroller=h}}_sizeHostElement(t){const e=82e5,n=t&&null!==t.width?Math.min(e,t.width):0,s=t&&null!==t.height?Math.min(e,t.height):0;if(this._isScroller)this._getSizer().style.transform=`translate(${n}px, ${s}px)`;else{const t=this._hostElement.style;t.minWidth=n?`${n}px`:"100%",t.minHeight=s?`${s}px`:"100%"}}_positionChildren(t){t&&t.forEach(({top:t,left:e,width:n,height:s,xOffset:i,yOffset:o},r)=>{const a=this._children[r-this._first];a&&(a.style.position="absolute",a.style.boxSizing="border-box",a.style.transform=`translate(${e}px, ${t}px)`,void 0!==n&&(a.style.width=`${n}px`),void 0!==s&&(a.style.height=`${s}px`),a.style.left=void 0===i?null:`${i}px`,a.style.top=void 0===o?null:`${o}px`)})}async _adjustRange(t){const{_first:e,_last:n,_firstVisible:s,_lastVisible:i}=this;this._first=t.first,this._last=t.last,this._firstVisible=t.firstVisible,this._lastVisible=t.lastVisible,this._rangeChanged=this._rangeChanged||this._first!==e||this._last!==n,this._visibilityChanged=this._visibilityChanged||this._firstVisible!==s||this._lastVisible!==i}_correctScrollError(){if(this._scrollError){const{scrollTop:t,scrollLeft:e}=this._scrollerController,{top:n,left:s}=this._scrollError;this._scrollError=null,this._scrollerController.correctScrollError({top:t-n,left:e-s})}}element(t){return t===1/0&&(t=this._items.length-1),void 0===this._items?.[t]?void 0:{scrollIntoView:(e={})=>this._scrollElementIntoView({...e,index:t})}}_scrollElementIntoView(t){if(t.index>=this._first&&t.index<=this._last)this._children[t.index-this._first].scrollIntoView(t);else if(t.index=Math.min(t.index,this._items.length-1),"smooth"===t.behavior){const e=this._layout.getScrollIntoViewCoordinates(t),{behavior:n}=t;this._updateScrollIntoViewCoordinates=this._scrollerController.managedScrollTo(Object.assign(e,{behavior:n}),()=>this._layout.getScrollIntoViewCoordinates(t),()=>this._scrollIntoViewTarget=null),this._scrollIntoViewTarget=t}else this._layout.pin=t}_checkScrollIntoViewTarget(t){const{index:e}=this._scrollIntoViewTarget||{};e&&t?.has(e)&&this._updateScrollIntoViewCoordinates(this._layout.getScrollIntoViewCoordinates(this._scrollIntoViewTarget))}_notifyRange(){this._hostElement.dispatchEvent(new Vr({first:this._first,last:this._last}))}_notifyVisibility(){this._hostElement.dispatchEvent(new Wr({first:this._firstVisible,last:this._lastVisible}))}get layoutComplete(){return this._layoutCompletePromise||(this._layoutCompletePromise=new Promise((t,e)=>{this._layoutCompleteResolver=t,this._layoutCompleteRejecter=e})),this._layoutCompletePromise}_rejectLayoutCompletePromise(t){null!==this._layoutCompleteRejecter&&this._layoutCompleteRejecter(t),this._resetLayoutCompleteState()}_scheduleLayoutComplete(){this._layoutCompletePromise&&null===this._pendingLayoutComplete&&(this._pendingLayoutComplete=requestAnimationFrame(()=>requestAnimationFrame(()=>this._resolveLayoutCompletePromise())))}_resolveLayoutCompletePromise(){null!==this._layoutCompleteResolver&&this._layoutCompleteResolver(),this._resetLayoutCompleteState()}_resetLayoutCompleteState(){this._layoutCompletePromise=null,this._layoutCompleteResolver=null,this._layoutCompleteRejecter=null,this._pendingLayoutComplete=null}_hostElementSizeChanged(){this._schedule(this._updateLayout)}_childLoaded(){}_childrenSizeChanged(t){if(this._layout?.measureChildren){for(const e of t)this._toBeMeasured.set(e.target,e.contentRect);this._measureChildren()}this._scheduleLayoutComplete(),this._itemsChanged=!1,this._rangeChanged=!1}}function Qr(t){const e=t?parseFloat(t):NaN;return Number.isNaN(e)?0:e}function Jr(t){if(null!==t.assignedSlot)return t.assignedSlot;if(null!==t.parentElement)return t.parentElement;const e=t.parentNode;return e&&e.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&e.host||null}const ta=Y(class extends ut{constructor(t){if(super(t),this._virtualizer=null,this._first=0,this._last=-1,this._renderItem=(t,e)=>((t,e)=>b`${e}: ${JSON.stringify(t,null,2)}`)(t,e+this._first),this._keyFunction=(t,e)=>(t=>t)(t,this._first),this._items=[],t.type!==V)throw new Error("The virtualize directive can only be used in child expressions")}render(t){t&&this._setFunctions(t);const e=[];if(this._first>=0&&this._last>=this._first)for(let t=this._first;t<=this._last;t++)e.push(this._items[t]);return xt(e,this._keyFunction,this._renderItem)}update(t,[e]){this._setFunctions(e);const n=this._items!==e.items;return this._items=e.items||[],this._virtualizer?this._updateVirtualizerConfig(t,e):this._initialize(t,e),n?E:this.render()}async _updateVirtualizerConfig(t,e){if(!await this._virtualizer.updateLayoutConfig(e.layout||{})){const n=t.parentNode;this._makeVirtualizer(n,e)}this._virtualizer.items=this._items}_setFunctions(t){const{renderItem:e,keyFunction:n}=t;e&&(this._renderItem=(t,n)=>e(t,n+this._first)),n&&(this._keyFunction=(t,e)=>n(t,e+this._first))}_makeVirtualizer(t,e){this._virtualizer&&this._virtualizer.disconnected();const{layout:n,scroller:s,items:i}=e;this._virtualizer=new Kr({hostElement:t,layout:n,scroller:s}),this._virtualizer.items=i,this._virtualizer.connected()}_initialize(t,e){const n=t.parentNode;n&&1===n.nodeType&&(n.addEventListener("rangeChanged",t=>{this._first=t.first,this._last=t.last,this.setValue(this.render())}),this._makeVirtualizer(n,e))}disconnected(){this._virtualizer?.disconnected()}reconnected(){this._virtualizer?.connected()}});function ea(t,e,n,s){const{keyFn:i,template:o,opts:r}=sa(e,n,s),a={direction:r?.direction??"vertical",...r?.pin?{pin:r.pin}:{}};return ta({items:t,renderItem:o,keyFunction:i,scroller:r?.scroller,layout:$r(a)})}function na(t,e,n,s){const{keyFn:i,template:o,opts:r}=sa(e,n,s),a={direction:r.direction??"vertical",getAspectRatio:r.getAspectRatio,gap:r.gap??"8px",flex:!0,...r.itemSize?{itemSize:r.itemSize}:{},...r.pin?{pin:r.pin}:{}};return ta({items:t,renderItem:o,keyFunction:i,scroller:r.scroller,layout:(l=a,Object.assign({type:Fr},l))});var l}function sa(t,e,n){return"function"==typeof e?{keyFn:t,template:e,opts:n}:{keyFn:void 0,template:t,opts:e}}function ia(t){return new Promise((e,n)=>{t.onsuccess=()=>e(t.result),t.onerror=()=>n(t.error)})}function oa(t,e,n){return new Promise((s,i)=>{const o=[];let r=!1;t.onsuccess=()=>{const i=t.result;if(i){if(e>0&&!r)return r=!0,void i.advance(e);o.push(i.value),null!==n&&o.length>=n?s(o):i.continue()}else s(o)},t.onerror=()=>i(t.error)})}const ra={equals:t=>IDBKeyRange.only(t),greaterThan:t=>IDBKeyRange.lowerBound(t,!0),greaterThanOrEqual:t=>IDBKeyRange.lowerBound(t,!1),lessThan:t=>IDBKeyRange.upperBound(t,!0),lessThanOrEqual:t=>IDBKeyRange.upperBound(t,!1),between:(t,e,n)=>IDBKeyRange.bound(t,e,n?.lowerOpen??!1,n?.upperOpen??!1),startsWith:t=>IDBKeyRange.bound(t,t+"",!1,!1)};class aa{constructor(t,e,n,s,i,o){this._db=t,this._storeName=e,this._pk=n,this._indexQuery=s,this._indexSort=i,this._page=o}filterByIndex(t,e){return new aa(this._db,this._storeName,this._pk,{indexName:t,range:e(ra)},this._indexSort,this._page)}sortByIndex(t,e="asc"){return new aa(this._db,this._storeName,this._pk,this._indexQuery,{indexName:t,direction:"desc"===e?"prev":"next"},this._page)}async toArray(){const t=new aa(this._db,this._storeName,this._pk,this._indexQuery,this._indexSort,null);return la(await t._run(),t)}async page(t,e){const n=new aa(this._db,this._storeName,this._pk,this._indexQuery,this._indexSort,{num:t,size:e});return la(await n._run(),n)}async _run(){const t=this._db.transaction(this._storeName,"readonly").objectStore(this._storeName),e=null!==this._indexQuery,n=null!==this._indexSort,s=this._page?(this._page.num-1)*this._page.size:0,i=this._page?this._page.size:null;if(!e&&!n)return this._page?oa(t.openCursor(),s,i):ia(t.getAll());const o=this._indexQuery.indexName,r=this._indexQuery?.range??null,a=this._indexSort.indexName,l=this._indexSort.direction;if(n&&(!e||o===a)){const n=e?r:null;return oa(t.index(a).openCursor(n,l),s,i)}let c=await ia(t.index(o).getAll(r));if(n){const t=a,e="prev"===l?-1:1;c.sort((n,s)=>{const i=n[t],o=s[t];return(i<o?-1:i>o?1:0)*e})}return this._page&&(c=c.slice(s,s+i)),c}}function la(t,e){const{_db:n,_storeName:s,_pk:i}=e,o=Es(t,{skipRestrictedContextCheck:!0}),r=o;return r.updateItem=async(t,e)=>{const r=o.get().find(e=>e[i]===t);null!=r&&"object"==typeof r&&(e(r),await ia(n.transaction(s,"readwrite").objectStore(s).put(r)),o.update(()=>{}))},r.setItem=async(t,e)=>{await ia(n.transaction(s,"readwrite").objectStore(s).put(e)),o.update(n=>{const s=n.findIndex(e=>e[i]===t);-1!==s&&(n[s]=e)})},r.removeItem=async t=>{await ia(n.transaction(s,"readwrite").objectStore(s).delete(t)),o.update(e=>{const n=e.findIndex(e=>e[i]===t);-1!==n&&e.splice(n,1)})},r.refresh=async()=>{o.set(await e._run())},Object.defineProperty(r,"name",{value:"dbTableAtom",writable:!0,configurable:!0,enumerable:!1}),r}function ca(t,e,n,s){const i=new aa(t,e,n,null,null,null),o=()=>s?s.objectStore(e):t.transaction(e,"readonly").objectStore(e),r=()=>s?s.objectStore(e):t.transaction(e,"readwrite").objectStore(e);return{filterByIndex:(t,e)=>i.filterByIndex(t,e),sortByIndex:(t,e)=>i.sortByIndex(t,e),toArray:()=>i.toArray(),page:(t,e)=>i.page(t,e),add:t=>ia(r().add(t)),set:async(t,e)=>{await ia(r().put(e))},update:async(n,i)=>{const o=s?s.objectStore(e):t.transaction(e,"readwrite").objectStore(e),r=await ia(o.get(n));null!=r&&(i(r),await ia(o.put(r)))},delete:async t=>{await ia(r().delete(t))},clear:async()=>{await ia(r().clear())},count:()=>ia(o().count()),get:t=>ia(o().get(t)),has:async t=>void 0!==await ia(o().getKey(t))}}function ha(t,e){return Pe()?Promise.reject(new Error("[indexDB] IndexedDB is not available in SSR environments.")):new Promise((n,s)=>{const i=indexedDB.open(t,e.version);i.onupgradeneeded=t=>{const n=i.result,s=i.transaction;e.upgrade&&e.upgrade(function(t,e){return{createTable(e,n,s=[]){if(t.objectStoreNames.contains(e))return;const i=t.createObjectStore(e,{keyPath:n});for(const t of s)i.createIndex(t,t,{unique:!1})},addIndex(n,s,i){if(!t.objectStoreNames.contains(n))return;const o=e.objectStore(n);o.indexNames.contains(s)||o.createIndex(s,s,i??{unique:!1})},removeIndex(n,s){if(!t.objectStoreNames.contains(n))return;const i=e.objectStore(n);i.indexNames.contains(s)&&i.deleteIndex(s)},dropTable(e){t.objectStoreNames.contains(e)&&t.deleteObjectStore(e)}}}(n,s),t.oldVersion)},i.onsuccess=()=>{const e=i.result;e.onversionchange=()=>{e.close(),console.warn(`[indexDB] "${t}" connection closed — version change detected. Reload the page to upgrade.`)};const s={table:(t,n)=>ca(e,t,n),transaction:(t,n)=>new Promise((s,i)=>{const o=e.transaction(t,"readwrite"),r={table:(t,n)=>ca(e,t,n,o)};o.oncomplete=()=>s(),o.onerror=()=>i(o.error),o.onabort=()=>i(new Error(`[indexDB] Transaction on [${t.join(", ")}] aborted`)),n(r).catch(t=>{try{o.abort()}catch{}i(t)})}),close(){e.close()}};n(s)},i.onerror=()=>s(i.error),i.onblocked=()=>{console.warn(`[indexDB] Opening "${t}" is blocked — close other connections first.`)}})}const ua=t=>"function"==typeof t&&!0===t.__isAtom___&&"function"==typeof t.set&&"function"==typeof t.__subscribe,da=t=>"object"==typeof t&&null!==t&&!0===t.__isUnit___&&"function"==typeof t.__subscribe&&"function"==typeof t.__reset,fa=t=>"function"==typeof t&&!0===t.__isAction___&&"function"==typeof t.__subscribe,pa=t=>"function"==typeof t&&!0===t.__isAsyncAction___&&"function"==typeof t.subscribe,ma=t=>"function"==typeof t&&!0===t.__isSetter___&&"function"==typeof t.__subscribe,_a=t=>"object"==typeof t&&null!==t&&!0===t.__isEvent___&&"function"==typeof t.__subscribe&&"function"==typeof t.trigger,ga=t=>"object"==typeof t&&null!==t&&!0===t.__isConfirmationEvent___&&"function"==typeof t.requestConfirmation&&"function"==typeof t.onConfirmRequest,ya=t=>"object"==typeof t&&null!==t&&!0===t.__isChannel___&&"function"==typeof t.join,wa=t=>"function"==typeof t&&!0===t.__isSelector___&&"function"==typeof t.areVersionsChanged,va=t=>"function"==typeof t,ba=t=>"AsyncFunction"===t.constructor.name,Sa=(t,e,n,s)=>{if(ua(t)){const i=t,o=Es(i(),s),r=n(o.set,e),a=n(o.update,e);return o.set=r,o.update=a,i.__subscribe(()=>{Ye.schedule(()=>o.set(i()))}),xe(o,()=>{r.cancel(),a.cancel()}),o}const i=Es(t,s),o=n(i.set,e),r=n(i.update,e);return i.set=o,i.update=r,xe(i,()=>{o.cancel(),r.cancel()}),i},Ea=(t,e,n)=>Sa(t,e,js,n);function Ca(t,e,n){const s=new Set;function i(t){const n=setTimeout(()=>{s.delete(n),t()},e);s.add(n)}function o(){for(const t of s)clearTimeout(t);s.clear()}if(ua(t)){const e=t,s=Es(e(),n),r=s.set.bind(s),a=s.update.bind(s);return s.set=(t,e)=>{i(()=>r(t,e))},s.update=(t,e)=>{i(()=>a(t,e))},e.__subscribe(()=>{const t=e();i(()=>r(t))}),xe(s,o),s}const r=Es(t,n),a=r.set.bind(r),l=r.update.bind(r);return r.set=(t,e)=>{i(()=>a(t,e))},r.update=(t,e)=>{i(()=>l(t,e))},xe(r,o),r}const Aa=(t=[],e)=>{const n=new Map(t),s=Es(n,e),i=n.set.bind(n);n.set=(t,e)=>(i(t,e),s.update(()=>{}),n);const o=n.delete.bind(n);n.delete=t=>{const e=o(t);return s.update(()=>{}),e};const r=n.clear.bind(n);n.clear=()=>{r(),s.update(()=>{})};const a=n.get.bind(n);n.get=t=>(s.get(),a(t));const l=n.has.bind(n);n.has=t=>(s.get(),l(t));const c=Object.getOwnPropertyDescriptor(Map.prototype,"size");Object.defineProperty(n,"size",{get:()=>(s.get(),c.get.call(n))});const h=n.entries.bind(n);n.entries=()=>(s.get(),h());const u=n.values.bind(n);n.values=()=>(s.get(),u());const d=n.keys.bind(n);n.keys=()=>(s.get(),d());const f=n.forEach.bind(n);n.forEach=(t,e)=>(s.get(),f(t,e));const p=n[Symbol.iterator].bind(n);return n[Symbol.iterator]=()=>(s.get(),p()),n.update=t=>{const e={set:(t,n)=>(i(t,n),e),delete:t=>o(t),clear:()=>{r()},get:t=>a(t),has:t=>l(t),entries:()=>h(),values:()=>u(),keys:()=>d(),forEach:(t,e)=>f(t,e),[Symbol.iterator]:()=>p(),get size(){return c.get.call(n)}};return t(e),s.update(()=>{}),n},n.updateItem=(t,e)=>{const i=a(t);return null==i||"object"!=typeof i||(e(i),s.update(()=>{})),n},Object.defineProperty(n,"__isAtom___",{value:s,writable:!1,enumerable:!1}),Object.defineProperty(n,"__version__",{get:()=>s.__version__,enumerable:!1}),n},ka=(t=[],e)=>{const n=new Set(t),s=Es(n,e),i=n.add.bind(n);n.add=t=>(i(t),s.update(()=>{}),n);const o=n.delete.bind(n);n.delete=t=>{const e=o(t);return s.update(()=>{}),e};const r=n.clear.bind(n);n.clear=()=>{r(),s.update(()=>{})};const a=n.has.bind(n);n.has=t=>(s.get(),a(t));const l=Object.getOwnPropertyDescriptor(Set.prototype,"size");Object.defineProperty(n,"size",{get:()=>(s.get(),l.get.call(n))});const c=n.entries.bind(n);n.entries=()=>(s.get(),c());const h=n.values.bind(n);n.values=()=>(s.get(),h());const u=n.keys.bind(n);n.keys=()=>(s.get(),u());const d=n.forEach.bind(n);n.forEach=(t,e)=>(s.get(),d(t,e));const f=n[Symbol.iterator].bind(n);return n[Symbol.iterator]=()=>(s.get(),f()),n.update=t=>{const e={add:t=>(i(t),e),delete:t=>o(t),clear:()=>{r()},has:t=>a(t),entries:()=>c(),values:()=>h(),keys:()=>u(),forEach:(t,e)=>d(t,e),[Symbol.iterator]:()=>f(),get size(){return l.get.call(n)}};return t(e),s.update(()=>{}),n},n.updateItem=(t,e)=>(null==t||"object"!=typeof t||(e(t),s.update(()=>{})),n),Object.defineProperty(n,"__isAtom___",{value:s,writable:!1,enumerable:!1}),Object.defineProperty(n,"__version__",{get:()=>s.__version__,enumerable:!1}),n},Ma="mates";function xa(t,e){try{null===e?t.removeItem(Ma):t.setItem(Ma,JSON.stringify(e))}catch{}}function $a(t,e){const n=Es((()=>{try{return function(t){try{const e=t.getItem(Ma);if(e)return JSON.parse(e)}catch{}return null}(t())}catch{return null}})()),s=n.set;n.set=function(e,i=!1){s(e,i);try{xa(t(),n.get())}catch{}};const i=n.update;return n.update=function(e,s=!1){if(null!==n.get()){i(e,s);try{xa(t(),n.get())}catch{}}},e(t=>{if(t.key===Ma)if(t.newValue)try{s(JSON.parse(t.newValue))}catch{}else s(null)}),Object.defineProperty(n,"name",{value:"storageAtom",writable:!0,configurable:!0,enumerable:!1}),n}function Ta(t){"undefined"!=typeof window&&window.addEventListener("storage",t)}const Ra=$a(()=>localStorage,t=>Ta(e=>{e.storageArea===localStorage&&t(e)})),Oa=$a(()=>sessionStorage,t=>Ta(e=>{e.storageArea===sessionStorage&&t(e)})),Ia=(t,e,n)=>Sa(t,e,Vs,n),Pa=Es("undefined"!=typeof document?document.title:"");function za(t){const e=new Map,n=new Map,s=Es(e,t),i=s.get.bind(s),o=s;return o.add=(t,i,o)=>{if(n.has(t)&&(clearTimeout(n.get(t)),n.delete(t)),s.update(e=>{e.set(t,i)}),void 0!==o&&-1!==o&&o>0){const i=setTimeout(()=>{e.delete(t),n.delete(t),s.update(()=>{})},o);n.set(t,i)}},o.get=t=>(i(),e.get(t)),o.remove=t=>!!e.has(t)&&(n.has(t)&&(clearTimeout(n.get(t)),n.delete(t)),e.delete(t),s.update(()=>{}),!0),o.has=t=>(i(),e.has(t)),o.getAll=()=>(i(),Array.from(e.values())),o.clearAll=()=>{n.forEach(t=>clearTimeout(t)),n.clear(),e.clear(),s.update(()=>{})},Object.defineProperty(o,"size",{get:()=>(i(),e.size),enumerable:!0,configurable:!0}),Object.defineProperty(o,"name",{get:()=>"cacheAtom",enumerable:!0,configurable:!0}),xe(s,o.clearAll),o}function Da(t=0,e){const n=Es(t,e),s=n;return s.change=t=>{n.set(void 0!==t?t:Math.random())},s.name="changeFlagAtom",s}Hs(()=>{var t;t=Pa.get(),"undefined"!=typeof document&&(document.title=t)});const Na=(t=1,e)=>{const n=Es(t,e),s=n;return s.next=()=>{n.set(t=>t+1)},s.prev=()=>{n.set(t=>t>1?t-1:t)},s.reset=()=>{n.set(1)},Object.defineProperty(s,"currentPage",{get:()=>n.get(),enumerable:!1,configurable:!0}),Object.defineProperty(s,"name",{value:"paginationAtom",writable:!0,configurable:!0,enumerable:!1}),s};function La(t,e=2){let n=parseFloat(String(t).trim());Number.isFinite(n)||(n=0);const s=10**e;return Math.round(n*s)/s}function ja(t,e,n){const s=As(t,{skipRestrictedContextCheck:!0,...n}),i=As([],{skipRestrictedContextCheck:!0,...n});function o(){const t=s.get(),n=e.map(e=>e(t)).filter(t=>null!=t&&""!==t);return i.set(n),n}const r=s.set;s.set=function(t,e=!1){r(t,e),o()};const a=s.update;s.update=function(t,e=!1){a(t,e),o()};const l=s;return Object.defineProperty(l,"__isFormAtom__",{value:!0,writable:!1,enumerable:!1,configurable:!1}),Object.defineProperty(l,"errors",{get:()=>i.get(),enumerable:!1,configurable:!0}),Object.defineProperty(l,"isValid",{get:()=>0===i.get().length,enumerable:!1,configurable:!0}),l.validate=o,l.toFloat=()=>La(s.get()),l.toFloatString=()=>La(s.get()).toString(),l.toValidNumber=()=>function(t){const e=Number(t);return Number.isFinite(e)?e:0}(s.get()),Object.defineProperty(l,"name",{value:"formAtom",writable:!0,configurable:!0,enumerable:!1}),l}const Ua=(t,e=[],n)=>ja(t,e,n);function Fa(t){const e=[],n={},s=new WeakSet;return function t(i,o){if(null==i)return;const r=typeof i;if("object"!==r&&"function"!==r)return;if(s.has(i))return;if(s.add(i),function(t){if(null==t)return!1;const e=typeof t;return("object"===e||"function"===e)&&!0===t.__isFormAtom__}(i)){const t=i.validate();return void(t.length>0&&(e.push(...t),n[o]=t))}if(Array.isArray(i)){for(let e=0;e<i.length;e++){const n=o?`${o}[${e}]`:`[${e}]`;t(i[e],n)}return}const a=Object.keys(i);for(const e of a){const n=o?`${o}.${e}`:e;t(i[e],n)}}(t,""),{isValid:0===e.length,errors:e,errorsByField:n}}function Va(t,e,n){const s=e.replace(/\[(\d+)]/g,".$1").split(".");let i=t;for(const t of s){if(null==i)return n;i=i[t]}return void 0===i?n:i}function Wa(t,e){const n={};for(const s of e)s in t&&(n[s]=t[s]);return n}function Ba(t,e){const n={...t};for(const t of e)delete n[t];return n}function Ha(t){return null!==t&&"object"==typeof t&&!Array.isArray(t)}function Ya(t,...e){const n={...t};for(const t of e)for(const e of Object.keys(t))Ha(n[e])&&Ha(t[e])?n[e]=Ya(n[e],t[e]):n[e]=t[e];return n}function qa(t,e,n){return Math.min(Math.max(t,e),n)}function Xa(t,e,n){if(void 0===e&&(e=t,t=0),void 0===n&&(n=t<=e?1:-1),0===n)return[];const s=[];if(n>0)for(let i=t;i<e;i+=n)s.push(i);else for(let i=t;i>e;i+=n)s.push(i);return s}function Za(t,e){if(e<1)return[];const n=[];for(let s=0;s<t.length;s+=e)n.push(t.slice(s,s+e));return n}function Ga(t,e){const n=new Set,s=[];for(const i of t){const t=e(i);n.has(t)||(n.add(t),s.push(i))}return s}function Ka(t,e){const n={};for(const s of t){const t=String(e(s));n[t]||(n[t]=[]),n[t].push(s)}return n}function Qa(t){return null==t||("string"==typeof t||Array.isArray(t)?0===t.length:t instanceof Map||t instanceof Set?0===t.size:"object"==typeof t&&0===Object.keys(t).length)}function Ja(t,e){if(null==t||"object"!=typeof t)return;const n=Array.isArray(t)?t.map((t,e)=>e):Object.keys(t);for(const s of n){const n=e(s,t[s],t);void 0!==n&&(t[s]=n);const i=t[s];null!==i&&"object"==typeof i&&Ja(i,e)}}const tl=t=>(t=>"number"==typeof t||"boolean"==typeof t||!Qa(t))(t)?null:"Required",el=t=>(t=>/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(t))(t)?null:"Invalid email",nl=t=>e=>((t,e)=>t.length>=e)(e,t)?null:`Min ${t} characters`,sl=t=>e=>((t,e)=>t.length<=e)(e,t)?null:`Max ${t} characters`,il=(t,e="Invalid format")=>n=>((t,e)=>e.test(t))(n,t)?null:e,ol=t=>e=>((t,e)=>t>=e)(e,t)?null:`Min is ${t}`,rl=t=>e=>((t,e)=>t<=e)(e,t)?null:`Max is ${t}`;function al(t){let e;return bs({name:"Memo",fn:t,onRun:t=>{e?e.set(()=>t):(e=Es(void 0,{skipRestrictedContextCheck:!0}),e.set(()=>t,!0))}}),e}function ll(t){const e=new Set,n=[Object.prototype,Array.prototype,Function.prototype,String.prototype,Number.prototype,Boolean.prototype,Symbol.prototype,Date.prototype,RegExp.prototype,Map.prototype,Set.prototype,WeakMap.prototype,WeakSet.prototype,Promise.prototype,Error.prototype];let s=t;for(;s&&!n.includes(s);){for(const t of Reflect.ownKeys(s))"constructor"!==t&&e.add(t);s=Object.getPrototypeOf(s)}return Array.from(e)}const cl=t=>{const e=Me();if(e&&e.scopes.has(t))throw new Error("Scope already exists for the same class for this component");let n;oe.viewOuterInProgress=!0;try{n=new t}finally{oe.viewOuterInProgress=!1}const s=oe.setupInProgress;try{if((()=>{ll(n).forEach(t=>{const e=Object.getOwnPropertyDescriptor(n,t)||Object.getOwnPropertyDescriptor(Object.getPrototypeOf(n),t);if(e&&(e.get||e.set))return;const s=n[t];"function"!=typeof s||s.__version__||(n[t]=s.bind(n))})})(),"function"==typeof n.setup){ba(n.setup)&&console.warn("Async setup functions are not supported. Please ensure the setup function is synchronous."),oe.setupInProgress=!0;try{n.setup(e?._propsFn||(()=>({})))}catch(t){console.error(t)}finally{oe.setupInProgress=s}}e&&e.addScope(t,n),n.__isScope___=!0}catch(t){console.error(t)}finally{oe.setupInProgress=s}return n},hl=t=>{let e=null;const n=new CustomEvent("request-parent-scope",{bubbles:!0,composed:!0,detail:{ScopeClass:t,resolve:t=>{e=t}}});if(Me().dispatchEvent(n),e)return e;throw new Error(`No parent scope found for ${t.name}`)};function ul(t,e){let n=t;for(;n&&n!==Object.prototype;){const t=Object.getOwnPropertyDescriptor(n,e);if(t)return t;n=Object.getPrototypeOf(n)}}const dl=(t,e,n)=>{const s=ll(t);s.forEach(s=>{const i=ul(t,s);if(i?.get){let n,o=-1;const r=i.get;Object.defineProperty(t,s,{get(){const s=e.__version__;return s!==o&&(o=s,n=r.call(t)),n},configurable:!0,enumerable:i.enumerable})}else if(va(t[s])){if(ba(t[s]))throw new Error(`Async functions are not supported inside ${n}`);const i=t[s];t[s]=(...n)=>{e.update(()=>i.apply(t,n))}}});const i=Object.create(t);return s.forEach(n=>{const s=ul(t,n);if(!s)return;const o=!!s.get,r=!o&&va(s.value);o||r||Object.defineProperty(i,n,{get:()=>e()[n],set(t){e.update(e=>{e[n]=t})},enumerable:!0,configurable:!0})}),i},fl=t=>{if("object"!=typeof t||null===t)throw new Error("initial state must be an object");const e=Es(t),n=dl(t,e,"store");return()=>[n,e.update]},pl=t=>{const e=Me();if("object"!=typeof t||null===t)throw new Error("stateObj must be an object");const n=Es(t),s=dl(t,n,"useState");return e?._useStates&&e._useStates.push({state:t,atom:n}),[s,n.update]},ml=t=>{Xe();const e=Me();e._errorHandlers||(e._errorHandlers=[]),e._errorHandlers.push(t)},_l=(t,e)=>{const n=Me();if(Xe(),!n)throw new Error("onReferenceChange must be called inside a component");let s=[];t(),s=e(),n.onEachUpdate(()=>{const n=e();s.some((t,e)=>t!==n[e])&&(t(),s=n)})};function gl(){const t=new Uint8Array(16);if("undefined"!=typeof crypto&&crypto.getRandomValues)crypto.getRandomValues(t);else for(let e=0;e<16;e++)t[e]=256*Math.random()|0;t[6]=15&t[6]|64,t[8]=63&t[8]|128;const e=Array.from(t).map(t=>t.toString(16).padStart(2,"0")).join("");return`${e.slice(0,8)}-${e.slice(8,12)}-${e.slice(12,16)}-${e.slice(16,20)}-${e.slice(20,32)}`}function yl(){return{list:t=>Promise.resolve(function(){function t(){return[]}return t.get=t=>{},t.has=t=>!1,t.add=async t=>"",t.set=async(t,e)=>{},t.update=async(t,e)=>{},t.deleteRow=async t=>{},t.clear=async()=>{},Object.defineProperty(t,"size",{get:()=>0,enumerable:!0,configurable:!0}),t}())}}const wl="mini-db",vl="mini-db:v";function bl(t){return new Promise((e,n)=>{t.onsuccess=()=>e(t.result),t.onerror=()=>n(t.error)})}function Sl(t,e,n){return new Promise((s,i)=>{const o=e?indexedDB.open(t,e):indexedDB.open(t);o.onupgradeneeded=()=>n?.(o.result),o.onsuccess=()=>s(o.result),o.onerror=()=>i(o.error),o.onblocked=()=>console.warn("[miniDB] Open blocked — close other connections first.")})}function El(t){t.current.onversionchange=async()=>{t.current.close(),t.current=await Sl(wl),El(t)}}async function Cl(t,e,n){const s=await bl(t.current.transaction(e,"readonly").objectStore(e).getAll()),i=Aa(s.map(t=>[String(t.id),t])),o=n=>bl(t.current.transaction(e,"readwrite").objectStore(e).put(n));n&&n.addEventListener("message",t=>{const n=t.data;n&&n.store===e&&("set"===n.op?i.set(n.key,n.item):"delete"===n.op?i.delete(n.key):"clear"===n.op&&i.clear())});const r=t=>{try{n?.postMessage(t)}catch{}};function a(){return Array.from(i.values())}return a.get=t=>i.get(t),a.has=t=>i.has(t),a.add=async t=>{const n=String(t.id??gl()),s={...t,id:n};return await o(s),i.set(n,s),r({store:e,op:"set",key:n,item:s}),n},a.set=async(t,n)=>{const s={...n,id:t};await o(s),i.set(t,s),r({store:e,op:"set",key:t,item:s})},a.update=async(t,n)=>{const s=i.get(t);s&&(i.updateItem(t,n),await o(s),r({store:e,op:"set",key:t,item:s}))},a.deleteRow=async n=>{await(n=>bl(t.current.transaction(e,"readwrite").objectStore(e).delete(n)))(n),i.delete(n),r({store:e,op:"delete",key:n})},a.clear=async()=>{await bl(t.current.transaction(e,"readwrite").objectStore(e).clear()),i.clear(),r({store:e,op:"clear"})},Object.defineProperty(a,"size",{get:()=>i.size,enumerable:!0,configurable:!0}),a}async function Al(t=1,e){if(Pe())return yl();const n={current:await Sl(wl)};El(n);const s="undefined"!=typeof BroadcastChannel?new BroadcastChannel(wl):null,i=function(){try{return parseInt(localStorage.getItem(vl)??"0",10)||0}catch{return 0}}();if(i!==t){if(e){const s=[];e(i,t,{clear:t=>s.push(t)});for(const t of s)n.current.objectStoreNames.contains(t)&&await bl(n.current.transaction(t,"readwrite").objectStore(t).clear())}!function(t){try{localStorage.setItem(vl,String(t))}catch{}}(t)}const o=new Map;return{async list(t){if(o.has(t))return o.get(t);n.current.objectStoreNames.contains(t)||(n.current=await async function(t,e){const n=t.name,s=t.version+1;return t.close(),Sl(n,s,t=>{t.objectStoreNames.contains(e)||t.createObjectStore(e,{keyPath:"id"})})}(n.current,t),El(n));const e=await Cl(n,t,s);return o.set(t,e),e}}}function kl(t,e,n,s=!1){document.addEventListener(t,e,{capture:s}),n.addToCleanUps(e,()=>{document.removeEventListener(t,e,{capture:s})})}function Ml(t,e,n,s){let i;if("wheelUp"===t||"wheelDown"===t){const o="wheelUp"===t,r=e,a=t=>{(o?t.deltaY>=0:t.deltaY<=0)||(i&&i(),i=r(t))};return window.addEventListener("wheel",a,{capture:n,passive:!0}),void s.addToCleanUps(e,()=>{window.removeEventListener("wheel",a,{capture:n}),i&&i()})}const o="scroll"===t||"touchstart"===t||"touchmove"===t,r=e,a=t=>{i&&i(),i=r(t)};window.addEventListener(t,a,{capture:n,passive:o}),s.addToCleanUps(e,()=>{window.removeEventListener(t,a,{capture:n}),i&&i()})}function xl(t,e){Pe()||(Xe(),Ml(t,e,!1,Me()))}function $l(t,e){Pe()||(Xe(),Ml(t,e,!0,Me()))}const Tl=t=>{$l("scroll",t)},Rl=t=>{xl("blur",t)},Ol=t=>{xl("focus",t)},Il=t=>{xl("online",t)},Pl=t=>{xl("offline",t)},zl=t=>{xl("resize",t)},Dl=t=>{xl("paste",t)},Nl=t=>{xl("copy",t)},Ll=t=>{xl("cut",t)},jl=t=>{xl("keydown",t)},Ul=t=>{xl("keyup",t)},Fl=t=>{if(Pe())return;Xe();let e;kl("visibilitychange",()=>{e&&e(),e=t(document.hidden)},Me())},Vl=t=>{if(Pe())return;Xe();let e;kl("selectionchange",()=>{e&&e(),e=t(window.getSelection())},Me())},Wl=t=>{xl("storage",t)},Bl=t=>{if(Pe())return;Xe();const e=Me();let n;const s=t=>t.preventDefault(),i=e=>{e.preventDefault(),n&&n(),n=t(e)};window.addEventListener("dragover",s),window.addEventListener("drop",i),e.addToCleanUps(t,()=>{window.removeEventListener("dragover",s),window.removeEventListener("drop",i),n&&n()})},Hl=t=>{if(Pe())return;Xe();const e=Me(!0),n=n=>{const s=n.target;s&&!e.contains(s)&&t(n)};document.addEventListener("mousedown",n,!0),e.addToCleanUps(t,()=>{document.removeEventListener("mousedown",n,!0)})},Yl=(t,e=window)=>{if(Pe())return;Xe();const n=Me();let s;const i=e=>{s&&s(),s=t(e)};e.addEventListener("scroll",i,{passive:!0}),n.addToCleanUps(t,()=>{e.removeEventListener("scroll",i),s&&s()})},ql=(t,e)=>{if(Pe())return;Xe();const n=Me();let s;const i=new ResizeObserver(e=>{for(const n of e)s&&s(),s=t(n)}),o=e||n;i.observe(o),n.addToCleanUps(t,()=>{i.disconnect(),s&&s()})},Xl=t=>{if(Pe())return;Xe();const e=Me();let n;const s=ci.__subscribe(()=>{n&&n(),n=t(ci.get())||null});e.addToCleanUps(t,()=>{s(),n&&n()})},Zl=(t,e)=>{if(Pe())return;Xe();const n=Me();let s;const i=setInterval(()=>{s&&s(),s=t()},e);n.addToCleanUps(t,()=>{clearInterval(i),s&&s()})},Gl=(t,e)=>{if(Pe())return;Xe();const n=Me();let s;const i=setTimeout(()=>{s=t()},e);n.addToCleanUps(t,()=>{clearTimeout(i),s&&s()})};function Kl(t,e){Xe();const n=Me(),s=e.map(e=>e.__subscribe(t));n.addToCleanUps(t,()=>{s.forEach(t=>t())})}const Ql=t=>{Xe();const e=Me();let n;e.onEachUpdate(()=>{n&&n(),n=t()}),e.addToCleanUps(t,()=>{n&&n()})},Jl=t=>{const e=Me();if(!e)throw new Error("onDOMReady must be called within a component context");return e.DOMReadyEvent.__subscribe(t)},tc=Bo((t,e,n)=>{const s=document.createElement("div");Object.assign(s.style,{position:"fixed",inset:"0",zIndex:"9999",display:"flex",alignItems:"center",justifyContent:"center",background:"rgba(0, 0, 0, 0.5)"}),n?.style&&Object.assign(s.style,n.style),n?.onBackdropClick&&s.addEventListener("click",t=>{t.target===s&&n.onBackdropClick()});const i=document.createElement("div");n?.dialogStyle&&Object.assign(i.style,n.dialogStyle),i.addEventListener("click",t=>t.stopPropagation()),U(e,i),s.appendChild(i),document.body.appendChild(s);const o=document.body.style.overflow;return document.body.style.overflow="hidden",{onUpdate(t){U(t,i)},onCleanup(){s.remove(),document.body.style.overflow=o}}});function ec(t,e){return tc(t,e)}const nc={position:"fixed",display:"none",margin:"0"},sc="9999";function ic(t={}){const{style:e,target:n,zIndex:s=sc}=t,i=document.createElement("div");for(const[t,e]of Object.entries(nc))i.style[t]=e;i.style.zIndex=String(s),e&&Object.assign(i.style,e);return{el:i,attach:()=>{i.isConnected||function(t){return t?"string"==typeof t?document.querySelector(t)??document.body:t:document.body}(n).appendChild(i)},detach:()=>{i.isConnected&&i.remove()},isAttached:()=>i.isConnected}}function oc(t,e,n,s,i,o,r){return t.startsWith("top")?s>=n:t.startsWith("bottom")?i>=n:t.startsWith("left")?o>=e:!!t.startsWith("right")&&r>=e}function rc(t,e,n,s,i,o){const r=window.innerWidth,a=function(t){let e=t.parentElement;for(;e&&e!==document.documentElement;){const{overflowY:t}=window.getComputedStyle(e),n="auto"===t||"scroll"===t,s=e.scrollHeight>e.clientHeight;if(n&&s)return e;e=e.parentElement}return null}(t);let l,c;if(a){const t=a.getBoundingClientRect(),n=a.scrollHeight-a.scrollTop-a.clientHeight;c=t.bottom-e.bottom+n-i;const s=a.scrollTop;l=e.top-t.top+s-i}else{const t=window.scrollY||document.documentElement.scrollTop,n=document.documentElement.scrollHeight;l=e.top+t-i,c=n-(e.bottom+t)-i}const h=e.left-i,u=r-e.right-i;if("auto"===o){const t=["bottom-start","top-start","right","left"];for(const e of t)if(oc(e,n,s,l,c,h,u))return e;return"bottom-start"}if(oc(o,n,s,l,c,h,u))return o;const d=function(t){return t.startsWith("top")?t.replace("top","bottom"):t.startsWith("bottom")?t.replace("bottom","top"):t.startsWith("left")?t.replace("left","right"):t.startsWith("right")?t.replace("right","left"):t}(o);return oc(d,n,s,l,c,h,u)?d:o}const ac=Ro((t,e,n)=>{const s=t.el;let i=!1,o=e,r=n;console.log("[popup] MOUNT — anchor:",s,"destroyOnClose:",!!n.destroyOnClose);const a=ic({...void 0!==r.zIndex?{zIndex:r.zIndex}:{},style:{background:"var(--md-color-surface-raised,#fff)",boxShadow:"var(--md-shadow-dropdown,0 5px 5px -3px rgba(0,0,0,.20),0 8px 10px 1px rgba(0,0,0,.14),0 3px 14px 2px rgba(0,0,0,.12))",minWidth:"160px",...r.style??{}}}),l=a.el;r.destroyOnClose;const c=()=>{const t=s.getBoundingClientRect();l.style.visibility="hidden",l.style.display="block",r.matchAnchorWidth&&(l.style.width=`${t.width}px`);const e=l.offsetWidth,n=l.offsetHeight,i=rc(s,t,e,n,r.gap??4,r.position??"bottom-start");!function(t,e,n,s,i,o){const r=window.innerWidth,a=window.innerHeight;let l=0,c=0;n.startsWith("bottom")?l=e.bottom+o:n.startsWith("top")?l=e.top-o-i:"right"===n||"left"===n?l=e.top+e.height/2-i/2:n.endsWith("-start")?l=e.top:n.endsWith("-end")&&(l=e.bottom-i),"bottom"===n||"top"===n?c=e.left+e.width/2-s/2:n.endsWith("-start")?c=n.startsWith("right")?e.right+o:n.startsWith("left")?e.left-o-s:e.left:n.endsWith("-end")?c=n.startsWith("right")?e.right+o:n.startsWith("left")?e.left-o-s:e.right-s:n.startsWith("right")?c=e.right+o:n.startsWith("left")&&(c=e.left-o-s);const h=Math.max(4,Math.min(c,r-s-4)),u=Math.max(4,Math.min(l,a-i-4)),d=parseInt(String(h),10),f=parseInt(String(u),10);t.style.left=`${d}px`,t.style.top=`${f}px`}(l,t,i,e,n,r.gap??4),l.style.visibility=""},h=()=>{i&&c()};let u=null;const d=()=>{u?.disconnect(),u=null},f=t=>{const e=t.target;l.contains(e)||s.contains(e)||y()},p=t=>{"Escape"===t.key&&y()},m=t=>"boolean"==typeof t?t:t(),_=()=>void 0!==r.open,g=()=>{i||(i=!0,a.isAttached()||(a.attach(),U(o,l),console.log("[popup] LAZY-ATTACHED to body on open — floating:",l)),c(),r.onOpen?.(l),_()||(document.addEventListener("click",f,{capture:!0}),document.addEventListener("keydown",p)),window.addEventListener("scroll",h,{passive:!0,capture:!0}),window.addEventListener("resize",h,{passive:!0}),r.matchAnchorWidth&&(u=new ResizeObserver(t=>{if(!i)return;const e=t[0]?.borderBoxSize?.[0]?.inlineSize??t[0]?.contentRect.width;null!=e&&(l.style.width=`${e}px`,l.style.minWidth=`${e}px`,h())}),u.observe(s)))},y=()=>{i&&(console.log("[popup] CLOSE — destroyOnClose:",r.destroyOnClose,"floating.isConnected:",l.isConnected,"floating:",l),i=!1,r.destroyOnClose||(l.style.display="none"),r.onClose?.(s,l),r.destroyOnClose&&a.isAttached()&&(console.log("[popup] REMOVED from body in close() — floating:",l),a.detach()),_()||(document.removeEventListener("click",f,{capture:!0}),document.removeEventListener("keydown",p)),window.removeEventListener("scroll",h,{capture:!0}),window.removeEventListener("resize",h),d())},w=t=>{t.stopPropagation(),i?y():g()};return _()?m(r.open)&&g():s.addEventListener("click",w),{onUpdate(t,e){console.log("[popup] UPDATE — isOpen:",i,"anchor:",s);const n=_();if(o=t,r=e,l.isConnected&&U(t,l),e.style&&Object.assign(l.style,e.style),_()){n||s.removeEventListener("click",w);const t=m(e.open);t&&!i?g():!t&&i?y():i&&c()}else n&&s.addEventListener("click",w),i&&c()},onCleanup(){console.log("[popup] CLEANUP — isOpen:",i,"floating.parentNode:",l.parentNode??"NO PARENT","floating.isConnected:",l.isConnected,"floating:",l,"anchor.isConnected:",s.isConnected),i&&y(),d(),_()||s.removeEventListener("click",w),a.detach(),console.log("[popup] CLEANUP DONE — floating still in body?",a.isAttached())}}});function lc(t,e){return ac(t,"string"==typeof e?{position:e}:e??{})}function cc(t,e,n){const s=t=>parseInt(String(t),10);switch(e){case"top":case"top-start":return{top:s(t.top-n),left:s(t.left)};case"top-end":return{top:s(t.top-n),left:s(t.right)};case"bottom":case"bottom-start":default:return{top:s(t.bottom+n),left:s(t.left)};case"bottom-end":return{top:s(t.bottom+n),left:s(t.right)};case"right":case"right-start":return{top:s(t.top),left:s(t.right+n)};case"right-end":return{top:s(t.bottom),left:s(t.right+n)};case"left":case"left-start":return{top:s(t.top),left:s(t.left-n)};case"left-end":return{top:s(t.bottom),left:s(t.left-n)}}}function hc(t){return"top"===t||"top-start"===t||"top-end"===t?"translateY(-100%)":"left"===t||"left-start"===t||"left-end"===t?"translateX(-100%)":""}function uc(t,e,n,s){const i=window.innerHeight-t.bottom-s,o=t.top-s,r=window.innerWidth-t.right-s,a=t.left-s;if(i>=n)return"bottom";if(o>=n)return"top";if(r>=e)return"right";if(a>=e)return"left";return[["bottom",i],["top",o],["right",r],["left",a]].reduce((t,e)=>e[1]>t[1]?e:t)[0]}const dc=Bo((t,e,n)=>{const s=document.createElement("div");if(n?.style&&Object.assign(s.style,n.style),n?.on)for(const[t,e]of Object.entries(n.on))s.addEventListener(t,e);return function(t){return t?"string"==typeof t?document.querySelector(t)??document.body:t:document.body}(n?.target).appendChild(s),U(e,s),{onUpdate(t){U(t,s)},onCleanup(){s.remove()}}});function fc(t,e){return dc(t,e)}const pc=1e3,mc=3e4,_c=1/0;function gc(t,e={}){le("ws");const{reconnect:n=!0,reconnectDelay:s=pc,reconnectMaxDelay:i=mc,reconnectMaxAttempts:o=_c,protocols:r,auth:a,autoConnect:l=!0}=e,c=Es("connecting",{skipRestrictedContextCheck:!0}),h=new Set;let u=null,d=0,f=s,p=null,m=!1;const _=[];function g(){null!==p&&(clearTimeout(p),p=null)}function y(){let e;m=!1,g(),c.set("connecting");try{e=function(){if(!a)return t;const e=a(),n=Object.entries(e);if(0===n.length)return t;const s=n.map(([t,e])=>`${encodeURIComponent(t)}=${encodeURIComponent(e)}`).join("&");return t.includes("?")?`${t}&${s}`:`${t}?${s}`}()}catch(t){return me(t),void c.set("error")}try{u=r?new WebSocket(e,r):new WebSocket(e)}catch(t){return me(t),c.set("error"),void w()}u.onopen=()=>{m?u?.close():(d=0,f=s,c.set("connected"),function(){for(;_.length>0;){const t=_.shift();u?.readyState===WebSocket.OPEN&&u.send(t)}}())},u.onmessage=t=>{if(m)return;const e="string"==typeof t.data?t.data:String(t.data);let n;try{n=JSON.parse(e)}catch{n=e}var s;s=n,h.forEach(t=>{try{t(s)}catch(t){me(t)}})},u.onerror=()=>{c.set("error")},u.onclose=()=>{m||(c.set("disconnected"),w())}}function w(){if(!n||m)return;if(d>=o)return;d++;const t=f;f=Math.min(2*f,i),p=setTimeout(()=>{m||y()},t)}function v(){m=!0,g(),u&&(u.onopen=null,u.onmessage=null,u.onerror=null,u.onclose=null,u.readyState!==WebSocket.OPEN&&u.readyState!==WebSocket.CONNECTING||u.close(1e3,"client disconnect"),u=null),c.set("disconnected"),h.clear(),_.length=0}const b={send:function(t){const e="string"==typeof t?t:JSON.stringify(t);u?.readyState===WebSocket.OPEN?u.send(e):_.push(e)},__subscribe:function(t){return h.add(t),()=>h.delete(t)},status:c,connect:y,disconnect:v,__isWs___:!0};return l?y():c.set("disconnected"),xe(b,v),b}class yc{constructor(){this.id=Math.random().toString(36).substring(2,15),this.context=null}}function wc(){if("undefined"==typeof document)return{};const t=document.cookie;if(!t)return{};const e={};for(const n of t.split(";")){const t=n.indexOf("=");if(-1===t)continue;const s=n.slice(0,t).trim();if(!s)continue;const i=n.slice(t+1).trim();try{e[s]=decodeURIComponent(i)}catch{e[s]=i}}return e}function vc(t,e=new WeakMap){if("function"==typeof structuredClone)return structuredClone(t);if(null===t||"object"!=typeof t)return t;if(t instanceof Date)return new Date(t.getTime());if(t instanceof RegExp)return new RegExp(t.source,t.flags);if(t instanceof Map){const n=new Map;return e.set(t,n),t.forEach((t,s)=>n.set(vc(s,e),vc(t,e))),n}if(t instanceof Set){const n=new Set;return e.set(t,n),t.forEach(t=>n.add(vc(t,e))),n}if(Array.isArray(t)){const n=[];e.set(t,n);for(let s=0;s<t.length;s++)n[s]=vc(t[s],e);return n}const n=e.get(t);if(n)return n;const s={};e.set(t,s);for(const n of Object.keys(t))s[n]=vc(t[n],e);return s}function bc(t,e){let n=Object.getOwnPropertyDescriptor(t,e),s=Object.getPrototypeOf(t);for(;!n&&s&&s!==Object.prototype;)n=Object.getOwnPropertyDescriptor(s,e),s=Object.getPrototypeOf(s);return n?.get&&"function"==typeof n.get?n.get:null}var Sc,Ec,Cc,Ac,kc,Mc;function xc(t){return"number"==typeof t?`${t}px`:t}Ec=new WeakMap,Cc=new WeakMap,Ac=new WeakMap,kc=new WeakMap,Sc=new WeakSet,Mc=function(t){ge(this,Ec,"f")?.remove(),ye(this,Ec,null,"f"),ye(this,Cc,"","f"),ye(this,Ac,"","f"),ye(this,kc,new Set,"f");const e=t.endNode;if(e?.parentNode){const n=t.startNode,s=document.createRange();s.setStartAfter(n),s.setEndBefore(e),s.deleteContents()}};const $c=Y(class extends q{constructor(t){if(super(t),Sc.add(this),Ec.set(this,null),Cc.set(this,""),Ac.set(this,""),kc.set(this,new Set),t.type!==V)throw new Error("safeSVG() must be used as a child expression, e.g. html`<div>${safeSVG(markup)}</div>`")}update(t,[e,n]){if(console.log("update"),!e.trimStart().startsWith("<svg"))return console.warn("safeSVG: input does not start with <svg — nothing rendered"),ge(this,Sc,"m",Mc).call(this,t),E;const s=JSON.stringify(n);if(null===ge(this,Ec,"f")||e!==ge(this,Cc,"f")){const n=function(t){const e=document.createElement("template");e.innerHTML=t;const n=e.content.firstElementChild;return n instanceof SVGElement?n:null}(e);if(null===n)return console.warn("safeSVG: failed to parse SVG markup — nothing rendered"),ge(this,Sc,"m",Mc).call(this,t),E;ge(this,Ec,"f")?.remove(),ye(this,Ec,n,"f"),ye(this,Cc,e,"f"),ye(this,Ac,"","f"),ye(this,kc,new Set,"f");const s=t.endNode;s.parentNode.insertBefore(ge(this,Ec,"f"),s)}if(s!==ge(this,Ac,"f")){const t=function(t,e){const n=new Set,s=(e,s)=>{t.setAttribute(e,s),n.add(e)},i=e.width??e.size,o=e.height??e.size;void 0!==i&&s("width",xc(i)),void 0!==o&&s("height",xc(o)),void 0!==e.fill&&s("fill",e.fill),void 0!==e.stroke&&s("stroke",e.stroke),void 0!==e.strokeWidth&&s("stroke-width",String(e.strokeWidth)),void 0!==e.strokeLinecap&&s("stroke-linecap",e.strokeLinecap),void 0!==e.strokeLinejoin&&s("stroke-linejoin",e.strokeLinejoin),void 0!==e.opacity&&s("opacity",String(e.opacity)),void 0!==e.viewBox&&s("viewBox",e.viewBox),void 0!==e.transform&&s("transform",e.transform);const r=[],a=e.width??e.size,l=e.height??e.size;void 0!==a&&r.push(`width:${xc(a)}`),void 0!==l&&r.push(`height:${xc(l)}`),void 0!==e.color&&r.push(`color:${e.color}`),r.push("display:inline-block"),r.push("vertical-align:middle"),e.style&&r.push(e.style),s("style",r.join(";")),e.class&&s("class",e.class);const c=e.ariaHidden??!0;return e.ariaLabel?(s("aria-label",e.ariaLabel),s("role","img")):c&&s("aria-hidden","true"),n}(ge(this,Ec,"f"),n);for(const e of ge(this,kc,"f"))t.has(e)||ge(this,Ec,"f").removeAttribute(e);ye(this,kc,t,"f"),ye(this,Ac,s,"f")}return E}render(t,e){return E}});function Tc(t,e={}){return $c(t,e)}let Rc=null,Oc=null,Ic=null;function Pc(t){Rc=t}function zc(t){Oc=t}function Dc(){return Oc}function Nc(){return Rc??-(new Date).getTimezoneOffset()}function Lc(){return Ic??("undefined"!=typeof navigator?navigator.language:null)??"en"}function jc(t,e){const n={};for(const s of new Intl.DateTimeFormat("en",{timeZone:t,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",hour12:!1}).formatToParts(new Date(e)))"literal"!==s.type&&(n[s.type]=parseInt(s.value,10));const s=24===n.hour?0:n.hour,i=Date.UTC(n.year,n.month-1,n.day,s,n.minute,n.second);return Math.round((i-e)/6e4)||0}function Uc(t,e){try{const n=new Intl.DateTimeFormat("en",{timeZone:t,timeZoneName:"short"}).formatToParts(new Date(e)).find(t=>"timeZoneName"===t.type);return n?n.value:t}catch{return t}}function Fc(t,e){try{const n=new Intl.DateTimeFormat("en",{timeZone:t,timeZoneName:"long"}).formatToParts(new Date(e)).find(t=>"timeZoneName"===t.type);return n?n.value:t}catch{return t}}function Vc(t,e){const n=new Date(t+6e4*e);return{Y:n.getUTCFullYear(),M:n.getUTCMonth()+1,D:n.getUTCDate(),h:n.getUTCHours(),m:n.getUTCMinutes(),s:n.getUTCSeconds(),ms:n.getUTCMilliseconds(),wd:n.getUTCDay()}}const Wc=t=>String(t).padStart(2,"0");function Bc(t,e,n){const s={[n]:e};return Oc?s.timeZone=Oc:(s.timeZone="UTC",t+=6e4*Nc()),new Intl.DateTimeFormat(Lc(),s).format(new Date(t))}function Hc(t,e){const n=t>=0?"+":"-",s=Math.abs(t);return e?`${n}${Wc(Math.floor(s/60))}:${Wc(s%60)}`:`${n}${Wc(Math.floor(s/60))}${Wc(s%60)}`}function Yc(t){const e=t.replace(/s$/,"");if("millisecond"===e||"m"===e)return"ms";if("minute"===e)return"min";if(!new Set(["year","month","week","day","hour","min","second","ms"]).has(e))throw new RangeError(`Invalid date unit: "${t}"`);return e}function qc(){try{const t=new Intl.Locale(Lc()),e=t.weekInfo?.firstDay??t.getWeekInfo?.()?.firstDay;if(void 0!==e)return e%7}catch{}return 0}const Xc=/YYYY|YY|MMMM|MMM|MM|M|DD|D|dddd|ddd|HH|H|hh|h|mm|ss|SSS|ZZ|Z|A|a/g,Zc=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"];function Gc(t){try{const e=new Date(Date.UTC(2024,0,7+t,12,0,0));return new Intl.DateTimeFormat(Lc(),{weekday:"long",timeZone:"UTC"}).format(e)}catch{return Zc[t]||""}}function Kc(t){try{const e=new Date(Date.UTC(2024,t-1,15,12,0,0));return new Intl.DateTimeFormat(Lc(),{month:"long",timeZone:"UTC"}).format(e)}catch{return""}}function Qc(t){if(t instanceof Number)return t.valueOf();if("number"==typeof t)return t;if("string"==typeof t)return new Date(t).getTime();if(t instanceof Date)return t.getTime();if("object"==typeof t&&null!==t){const{year:e=1970,month:n=1,day:s=1,hour:i=0,minute:o=0,second:r=0,ms:a=0}=t;return Date.UTC(e,n-1,s,i,o,r,a)-6e4*Nc()}return NaN}function Jc(t,e,n){const s=Yc(n);if("hour"===s)return t+36e5*e;if("min"===s)return t+6e4*e;if("second"===s)return t+1e3*e;if("ms"===s)return t+e;const i=Nc(),o=Vc(t,i);let r=o.Y,a=o.M,l=o.D;if("year"===s)r+=e;else if("month"===s){const t=a-1+e;r+=Math.floor(t/12),a=(t%12+12)%12+1,l=Math.min(l,new Date(r,a,0).getDate())}else l+="week"===s?7*e:e;return Date.UTC(r,a-1,l,o.h,o.m,o.s,o.ms)-6e4*i}function th(t,e){const n=Nc(),s=Vc(t,n),i=Vc(e,n);return s.Y===i.Y&&s.M===i.M&&s.D===i.D}function eh(t){const e=Nc(),n=Vc(t,e);return Date.UTC(n.Y,n.M-1,n.D,0,0,0,0)-6e4*e}function nh(t,e){const n=Nc(),s=Vc(t,n),i=s.h%12||12,o=[],r=e.replace(/\[([^\]]*)\]/g,(t,e)=>(o.push(e),`\0${o.length-1}\0`));Xc.lastIndex=0;const a=r.replace(Xc,e=>{switch(e){case"YYYY":return String(s.Y);case"YY":return String(s.Y).slice(-2);case"MMMM":return Bc(t,"long","month");case"MMM":return Bc(t,"short","month");case"MM":return Wc(s.M);case"M":return String(s.M);case"DD":return Wc(s.D);case"D":return String(s.D);case"dddd":return Bc(t,"long","weekday");case"ddd":return Bc(t,"short","weekday");case"HH":return Wc(s.h);case"H":return String(s.h);case"hh":return Wc(i);case"h":return String(i);case"mm":return Wc(s.m);case"ss":return Wc(s.s);case"SSS":return(t=>String(t).padStart(3,"0"))(s.ms);case"A":return s.h>=12?"PM":"AM";case"a":return s.h>=12?"pm":"am";case"Z":return Hc(n,!0);case"ZZ":return Hc(n,!1);default:return e}});return a.replace(/\0(\d+)\0/g,(t,e)=>o[+e])}const sh=[["year",31536e3],["month",2592e3],["week",604800],["day",86400],["hour",3600],["minute",60],["second",1]];const ih=Symbol("ts"),oh=Object.create(Number.prototype);function rh(t){return function(t){const e=Object.create(oh);return e[ih]=t,e}(void 0===t?Date.now():Qc(t))}function ah(t){null==t?(Pc(null),zc(null)):(Pc(t.offset),zc(t.name))}function lh(t){Pc(t),zc(null)}function ch(){return Nc()}function hh(t){!function(t){Ic=t}(t??null)}function uh(){return Lc()}function dh(){let t;try{t=Intl.supportedValuesOf("timeZone")}catch{return[]}const e=Date.now();return t.map(t=>({name:t,longName:Fc(t,e),shortName:Uc(t,e),offset:jc(t,e)}))}function fh(t){const e=t??Lc(),n=new Intl.DateTimeFormat(e,{month:"long",timeZone:"UTC"}),s=new Intl.DateTimeFormat(e,{month:"short",timeZone:"UTC"}),i=[];for(let t=1;t<=12;t++){const e=new Date(Date.UTC(2024,t-1,15,12,0,0));i.push({number:t,name:n.format(e),shortName:s.format(e)})}return i}function ph(t,e){if(!Number.isInteger(t)||!Number.isInteger(e)||e<1||e>12)throw new RangeError("getCalendar(year, month): month must be integer 1–12");const n=rh({year:t,month:e,day:1}),{year:s,month:i,numberOfDaysOfTheMonth:o}=n.values,r=[];for(let t=Vc(n.valueOf(),Nc()).wd;t>0;t--)r.push(rh({year:s,month:i,day:1-t}));for(let t=1;t<=o;t++)r.push(rh({year:s,month:i,day:t}));const a=r.length%7,l=0===a?0:7-a,c=rh({year:s,month:i,day:o});for(let t=0;t<l;t++)c.add(1,"day"),r.push(rh(c.valueOf()));const h=[];for(let t=0;t<r.length;t+=7)h.push(r.slice(t,t+7));return h}Object.defineProperties(oh,{valueOf:{value(){return this[ih]},writable:!1,configurable:!1},values:{get(){const t=this[ih],e=Vc(t,Nc());return{year:e.Y,month:e.M,monthName:Kc(e.M),dayName:Gc(e.wd),date:e.D,weekStartDayName:Gc(qc()),numberOfDaysOfTheMonth:new Date(e.Y,e.M,0).getDate(),hours:e.h,minutes:e.m,seconds:e.s,milliSeconds:e.ms,timestamp:t,iso:new Date(t).toISOString()}},configurable:!1},toJSON:{value(){const t=this[ih];return Number.isFinite(t)?new Date(t).toISOString():"Invalid Date"},writable:!1,configurable:!1},toString:{value(){const t=this[ih];return Number.isFinite(t)?new Intl.DateTimeFormat(Lc(),{dateStyle:"medium",...Dc()?{timeZone:Dc()}:{timeZone:"UTC"}}).format(new Date(Dc()?t:t+6e4*Nc())):"Invalid Date"},writable:!1,configurable:!1},format:{value(t){return nh(this[ih],t)},writable:!1,configurable:!1},formatLongAgo:{value(t){return function(t,e={}){const{numeric:n="auto",style:s="long"}=e,i=((void 0!==e.now?Qc(e.now):Date.now())-t)/1e3,o=Math.abs(i),r=i>=0?-1:1,a=new Intl.RelativeTimeFormat(Lc(),{numeric:n,style:s});for(const[t,e]of sh)if(o>=e)return a.format(r*Math.round(o/e),t);return a.format(0,"second")}(this[ih],t)},writable:!1,configurable:!1},add:{value(t,e){return this[ih]=Jc(this[ih],t,e),this},writable:!1,configurable:!1},subtract:{value(t,e){return this[ih]=Jc(this[ih],-t,e),this},writable:!1,configurable:!1},isBefore:{value(t){return this[ih]<Qc(t)},writable:!1,configurable:!1},isAfter:{value(t){return this[ih]>Qc(t)},writable:!1,configurable:!1},isFuture:{value(){return this[ih]>Date.now()},writable:!1,configurable:!1},isPresent:{value(){return th(this[ih],Date.now())},writable:!1,configurable:!1},isToday:{value(){return th(this[ih],Date.now())},writable:!1,configurable:!1},isYesterday:{value(){const t=Jc(eh(Date.now()),-1,"day");return th(this[ih],t)},writable:!1,configurable:!1},isTomorrow:{value(){const t=Jc(eh(Date.now()),1,"day");return th(this[ih],t)},writable:!1,configurable:!1},getDifference:{value(t,e){return function(t,e,n){const s=Yc(n),i=t-e;if("ms"===s)return i;if("second"===s)return Math.trunc(i/1e3);if("min"===s)return Math.trunc(i/6e4);if("hour"===s)return Math.trunc(i/36e5);const o=Nc(),r=Vc(t,o),a=Vc(e,o);if("day"===s||"week"===s){const n=Math.floor((t+6e4*o)/864e5)-Math.floor((e+6e4*o)/864e5);return"week"===s?Math.trunc(n/7):n}return"month"===s?12*(r.Y-a.Y)+(r.M-a.M):r.Y-a.Y}(this[ih],Qc(t),e)},writable:!1,configurable:!1},getAge:{value(t){return function(t,e){const n=Nc(),s=Vc(t,n),i=Vc(e,n);let o=i.Y-s.Y,r=s.M,a=s.D;if(2===r&&29===a){const t=t=>t%4==0&&t%100!=0||t%400==0;t(i.Y)||(r=3,a=1)}return(i.M<r||i.M===r&&i.D<a)&&o--,Math.max(0,o)}(this[ih],void 0!==t?Qc(t):Date.now())},writable:!1,configurable:!1}});export{ko as $,yc as Context,so as Delete,Pi as ErrorTypes,Qi as Fetch,Yi as FetchClient,Ji as Get,Gn as MA,Se as NotificationManager,no as Patch,to as Post,eo as Put,ki as Router,Ee as SyncNotificationManager,Ii as ZeroPromise,en as _,xs as _hydrationCounter,nn as _subToView,Kn as action,Kt as addStoreBeingRead,xo as animatedIf,fi as animatedRouter,$o as animatedX,Xa as arrayRange,le as assertComponentOuterContext,ae as assertNotInRestrictedContext,Ps as asyncAction,_t as asyncAppend,mt as asyncReplace,Es as atom,Io as attr,fs as blurInPreset,ps as blurOutPreset,as as bouncePreset,pi as buildPath,Ni as buildRequestUrl,za as cacheAtom,Os as cacheFn,Da as changeFlagAtom,Za as chunk,qa as clamp,wt as classMap,Do as classes,He as cleanupScheduler,Hi as clearInterceptors,_s as collapseWidthPreset,Ln as collectSSRStyles,oe as componentRunningStatus,uc as computeAutoPlacement,wn as configureCSS,Fo as countdown,Os as createCacheManager,ic as createFloatingContainer,zs as createManagedTimer,Is as createPollingManager,bs as createReactiveRunner,Sa as createTimedAtom,rh as date,js as debounce,Ea as debouncedAtom,Ue as decrementSsrAsyncCounter,vc as deepClone,ys as deepFreeze,Ca as delayAtom,co as deleteAction,ys as df,ec as dialog,Vo as disappear,Fe as done,Hs as effect,Ye as effectScheduler,Ro as eleHook,Te as event,ms as expandWidthPreset,Qn as fadeInPreset,Jn as fadeOutPreset,io as fetchAction,qi as fetchClient,us as flipInPreset,ds as flipOutPreset,Ua as formAtom,Va as get,oo as getAction,ll as getAllProps,dh as getAllTimezones,ph as getCalendar,wc as getCookieObj,cc as getCoords,Me as getCurrentHost,uh as getLocale,fh as getMonths,hl as getParentScope,hl as getScope,Ve as getSsrAsyncCounter,Zt as getStoresBeingRead,ch as getTimezoneOffset,Yn as globalCSS,qe as globalScheduler,_o as globalTheme,Ka as groupBy,bt as guard,_i as hashAtom,ei as historyStateAtom,b as html,Bo as htmlHook,Rs as hydrationPending,Cs as iAtom,St as ifDefined,$s as incHydration,je as incrementSsrAsyncCounter,ha as indexDB,Zn as injectMatesAnimations,Bt as installDevToolsHooks,Wi as interceptAfter,Vi as interceptBefore,Bi as interceptError,fa as isAction,zi as isApiResponseSuccess,pa as isAsyncAction,ba as isAsyncFunction,ln as isAsyncValue,ua as isAtom,ya as isChannel,ga as isConfirmationEvent,bc as isDefinedAsGetter,We as isDev,Ht as isDevToolsInstalled,Gt as isEffectRunning,el as isEmail,Qa as isEmpty,_a as isEvent,va as isFunction,wa as isGetter,re as isInRestrictedContext,rl as isMax,ol as isMin,ui as isPathMatching,il as isPattern,Xt as isReadTrackingEnabled,tl as isRequired,Pe as isSSR,ma as isSetter,da as isUnit,Ja as iterateDeeply,Et as join,Ct as keyed,Hn as keyframes,Ko as lazyLoad,yt as litCache,At as live,Ci as location,si as lockNavigation,pe as log,me as logError,_e as logWarning,Ra as lsAtom,Aa as mapAtom,sr as masonryGrid,he as matesLogEvent,sl as maxLength,al as memo,ar as memoTemplate,Ya as merge,nl as minLength,Al as miniDB,ri as navigateTo,ni as navigationLocked,ai as navigationRequestEvent,E as noChange,C as nothing,Ba as omit,on,Qe as onAllMount,Rl as onBlur,Je as onCleanup,Hl as onClickAway,tr as onConnect,Nl as onCopy,Ll as onCut,Jl as onDOMReady,er as onDisconnect,jo as onEleEvent,ml as onError,_r as onEvent,Bl as onFileDrop,Ol as onFocus,Xo as onHidden,Yo as onIntersect,Zl as onInterval,jl as onKeyDown,Ul as onKeyUp,Ge as onMount,Xl as onNavigate,li as onNavigationRequest,Pl as onOffline,Il as onOnline,Ke as onPaint,wr as onParent,Dl as onPaste,_l as onReferenceChange,ql as onResize,Yl as onScroll,Go as onScrolledIntoView,Vl as onSelectionChange,Kl as onSocket,Wl as onStorageChange,Gl as onTimeout,Ql as onUpdate,Fl as onVisibilityChange,qo as onVisible,xl as onWindow,$l as onWindowCapture,zl as onWindowResize,Tl as onWindowScroll,oi as onceIdle,Us as paginatedAsyncAction,Na as paginationAtom,lo as patchAction,ci as pathAtom,Wa as pick,hc as placementTransform,Jt as popEffect,lc as popup,fc as portal,ro as postAction,hs as pulsePreset,Qt as pushEffect,ao as putAction,bi as qsAtom,gl as randomId,kt as range,Xs as ref,xe as registerCleanup,Po as removeAttr,No as removeClasses,gr as removeOn,Er as removeStyle,U as render,vr as renderSwitch,ti as renderTemplate,Js as renderX,xt as repeat,wi as replaceParams,Be as resetComponentState,cn as resolveAsyncValue,ee as restoreTracking,go as rootCSS,Ai as route,Xi as runWithGlobalInterceptors,ue as safeClone,Tc as safeSVG,Xe as safetyCheck,te as saveAndEnableTracking,is as scaleInPreset,os as scaleOutPreset,cl as scope,ka as setAtom,hh as setLocale,Zs as setRef,$i as setSSRApiLookup,Ie as setSSRMode,Ti as setSSRRequest,Le as setSsrDoneCallback,ah as setTimezone,lh as setTimezoneOffset,tn as setter,cs as shakePreset,Cs as signal,es as slideInPreset,ns as slideOutPreset,rs as spinPreset,ls as springInPreset,Oa as ssAtom,ne as startTracking,se as stopTracking,fl as store,Sr as style,Rt as styleMap,Un as stylesheet,As as superAtom,S as svg,Fs as taskAction,Qs as template,fo as themeAtom,Vs as throttle,Ia as throttledAtom,Ar as timerTemplate,Pa as titleAtom,ws as trackAndSubscribe,Ga as uniqBy,ii as unlockNavigation,It as unsafeHTML,Tc as unsafeSVG,Dt as until,hn as unwrapModule,rn as useContext,Uo as useEleEvent,cl as useScope,pl as useState,sn as useStore,gl as uuid,Fa as validateAll,vs as validateReactiveFunction,Ks as view,ea as virtualList,na as virtualMasonry,on as watch,Nt as when,Zi as withAuth,Gi as withBaseUrl,ke as withHost,Ki as withLogging,gs as withStaggerPreset,gc as ws,Gs as x,$e as xTabEvent};
|
|
180
180
|
//# sourceMappingURL=index.esm.js.map
|