@fluixi/core 1.0.0-alpha.78 → 1.0.0-alpha.80
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +4 -4
- package/dist/cdn/core.global.js +1 -1
- package/dist/fluixi.d.ts +1 -1
- package/dist/src/cdn/chunk-RN7C7HNS.mjs +1 -0
- package/dist/src/cdn/core.cjs +1 -1
- package/dist/src/cdn/core.d.ts +2 -2
- package/dist/src/cdn/core.d.ts.map +1 -1
- package/dist/src/cdn/core.js +2 -2
- package/dist/src/cdn/core.mjs +1 -1
- package/dist/src/cdn/router-QB3W43UQ.mjs +1 -0
- package/dist/src/index.cjs +1 -1
- package/dist/src/index.js +1 -7
- package/dist/src/index.mjs +1 -1
- package/dist/src/jsx-runtime.d.ts +1 -1
- package/dist/src/jsx-runtime.js +1 -1
- package/dist/src/lib/client/chunk-FT22BLCQ.mjs +1 -0
- package/dist/src/lib/client/index.cjs +1 -1
- package/dist/src/lib/client/index.d.ts.map +1 -1
- package/dist/src/lib/client/index.js +1 -3
- package/dist/src/lib/client/index.mjs +1 -1
- package/dist/src/lib/client/router-IH7JYMRU.mjs +1 -0
- package/dist/src/lib/context/context.cjs +1 -1
- package/dist/src/lib/context/context.d.ts.map +1 -1
- package/dist/src/lib/context/context.js +0 -2
- package/dist/src/lib/context/context.mjs +1 -1
- package/dist/src/lib/context/index.cjs +1 -1
- package/dist/src/lib/context/index.mjs +1 -1
- package/dist/src/lib/core.cjs +1 -1
- package/dist/src/lib/core.d.ts +4 -4
- package/dist/src/lib/core.d.ts.map +1 -1
- package/dist/src/lib/core.js +5 -8
- package/dist/src/lib/core.mjs +1 -1
- package/dist/src/lib/index.cjs +1 -1
- package/dist/src/lib/index.d.ts +1 -1
- package/dist/src/lib/index.d.ts.map +1 -1
- package/dist/src/lib/index.js +2 -4
- package/dist/src/lib/index.mjs +1 -1
- package/dist/src/lib/jsx-runtime/index.d.ts +1 -1
- package/dist/src/lib/jsx-runtime/index.js +1 -1
- package/dist/src/lib/plugins/fluixi-routes-plugin.cjs +2 -2
- package/dist/src/lib/plugins/fluixi-routes-plugin.mjs +2 -2
- package/dist/src/lib/plugins/index.cjs +3 -3
- package/dist/src/lib/plugins/index.mjs +3 -3
- package/dist/src/lib/plugins/route-codegen.cjs +1 -1
- package/dist/src/lib/plugins/route-codegen.js +3 -3
- package/dist/src/lib/plugins/route-codegen.mjs +1 -1
- package/dist/src/lib/render/component.cjs +1 -1
- package/dist/src/lib/render/component.d.ts +10 -1
- package/dist/src/lib/render/component.d.ts.map +1 -1
- package/dist/src/lib/render/component.js +12 -10
- package/dist/src/lib/render/component.mjs +1 -1
- package/dist/src/lib/render/index.cjs +1 -1
- package/dist/src/lib/render/index.d.ts.map +1 -1
- package/dist/src/lib/render/index.js +0 -2
- package/dist/src/lib/render/index.mjs +1 -1
- package/dist/src/lib/render/versions.cjs +1 -1
- package/dist/src/lib/render/versions.mjs +1 -1
- package/dist/src/lib/router/data.cjs +1 -0
- package/dist/src/lib/router/data.d.ts.map +1 -0
- package/dist/src/lib/router/data.mjs +1 -0
- package/dist/src/lib/router/index.cjs +1 -0
- package/dist/src/lib/router/index.d.ts.map +1 -0
- package/dist/src/lib/{router-next → router}/index.js +3 -3
- package/dist/src/lib/router/index.mjs +1 -0
- package/dist/src/routes.d.ts +1 -1
- package/dist/src/routes.d.ts.map +1 -1
- package/dist/src/version.generated.cjs +1 -1
- package/dist/src/version.generated.d.ts +1 -1
- package/dist/src/version.generated.js +1 -1
- package/dist/src/version.generated.mjs +1 -1
- package/dist/tsconfig.lib.tsbuildinfo +1 -1
- package/package.json +16 -22
- package/src/index.ts +2 -3
- package/types/fluixi.d.ts +1 -1
- package/dist/src/cdn/chunk-3IZZ7QBW.mjs +0 -1
- package/dist/src/cdn/router-next-W2YUEGIJ.mjs +0 -1
- package/dist/src/lib/client/chunk-7CZ3YHHR.mjs +0 -1
- package/dist/src/lib/client/router-next-G4DNKAF2.mjs +0 -1
- package/dist/src/lib/router-next/data.cjs +0 -1
- package/dist/src/lib/router-next/data.d.ts.map +0 -1
- package/dist/src/lib/router-next/data.mjs +0 -1
- package/dist/src/lib/router-next/index.cjs +0 -1
- package/dist/src/lib/router-next/index.d.ts.map +0 -1
- package/dist/src/lib/router-next/index.mjs +0 -1
- package/dist/src/rx.cjs +0 -1
- package/dist/src/rx.d.ts +0 -2
- package/dist/src/rx.d.ts.map +0 -1
- package/dist/src/rx.js +0 -101
- package/dist/src/rx.mjs +0 -0
- /package/dist/src/lib/{router-next → router}/data.d.ts +0 -0
- /package/dist/src/lib/{router-next → router}/data.js +0 -0
- /package/dist/src/lib/{router-next → router}/index.d.ts +0 -0
package/README.md
CHANGED
|
@@ -2,13 +2,13 @@
|
|
|
2
2
|
<img src="https://raw.githubusercontent.com/fluixi/assets/main/logos/128x128.png" alt="Fluixi" width="120" height="120" />
|
|
3
3
|
</p>
|
|
4
4
|
|
|
5
|
-
#
|
|
5
|
+
# fluixi
|
|
6
6
|
|
|
7
7
|
**A compiler-native reactive framework. The compiler knows what's reactive, so you write ordinary TypeScript.**
|
|
8
8
|
|
|
9
9
|
[](./LICENSE)
|
|
10
10
|

|
|
11
|
-
[](https://www.npmjs.com/package/fluixi)
|
|
12
12
|
|
|
13
13
|
---
|
|
14
14
|
|
|
@@ -233,7 +233,7 @@ The router takes a `routes` config; nested routes render through `<Outlet />`, a
|
|
|
233
233
|
|
|
234
234
|
```tsx
|
|
235
235
|
import { render } from '@fluixi/core';
|
|
236
|
-
import { Router, Outlet, lazy } from '@fluixi/core/router
|
|
236
|
+
import { Router, Outlet, lazy } from '@fluixi/core/router';
|
|
237
237
|
|
|
238
238
|
const routes = [
|
|
239
239
|
{
|
|
@@ -331,4 +331,4 @@ MIT
|
|
|
331
331
|
|
|
332
332
|
## Links
|
|
333
333
|
|
|
334
|
-
- [npm](https://www.npmjs.com/package
|
|
334
|
+
- [npm](https://www.npmjs.com/package/fluixi)
|
package/dist/cdn/core.global.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var Fluixi=(()=>{var Tt=Object.defineProperty;var ei=Object.getOwnPropertyDescriptor;var ti=Object.getOwnPropertyNames;var ri=Object.prototype.hasOwnProperty;var R=(e,t)=>()=>(e&&(t=e(e=0)),t);var Dr=(e,t)=>{for(var r in t)Tt(e,r,{get:t[r],enumerable:!0})},ni=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of ti(t))!ri.call(e,o)&&o!==r&&Tt(e,o,{get:()=>t[o],enumerable:!(n=ei(t,o))||n.enumerable});return e};var oi=e=>ni(Tt({},"__esModule",{value:!0}),e);function Ot(e){if(e.watchers)for(let t of[...e.watchers])t._notify(e)}function ui(e){if(m.untracked)return e();m.untracked=!0;try{return e()}finally{m.untracked=!1}}function ae(e){let t=xe(e);return e&&(e.owned??=[]).push(t),t}function le(e,t=!0){Ae(e,t)}function zr(e){return!!e&&e.disposed===!0}function xe(e){return{cleanups:null,owned:null,parent:e,contexts:null}}function V(e){let t=Symbol("context");return{id:t,defaultValue:e,Provider:r=>{let n=m.owner,o=xe(n);(o.contexts=new Map).set(t,r.value),n&&(n.owned??=[]).push(o),m.owner=o;try{return r.children}finally{m.owner=n}}}}function F(e){let t=m.owner;for(;t;){if(t.contexts&&t.contexts.has(e.id))return t.contexts.get(e.id);t=t.parent}return e.defaultValue}function Ur(e,t){let r=e;for(;r;){if(r.contexts&&r.contexts.has(t.id))return r.contexts.get(t.id);r=r.parent}return t.defaultValue}function ci(e,t,r){let n=xe(m.owner);(n.contexts=new Map).set(e.id,t),m.owner&&(m.owner.owned??=[]).push(n);let o=m.owner;m.owner=n;try{return r()}finally{m.owner=o}}function fi(e){m.onSuspend=e}function pi(e){return m.onSuspend?(m.onSuspend(e,m.owner),!0):!1}function di(e){m.onError=e}function $(){return m.owner}function Br(e){let t=m.owner;return m.owner=e,t}function _(e,t){let r=m.owner;m.owner=e;try{return t()}finally{m.owner=r}}function x(e){if(m.owner){if(m.owner.disposed){e();return}(m.owner.cleanups??=[]).push(e)}}function Ae(e,t=!0){if(!e.disposed){if(e.owned){for(let r=e.owned.length-1;r>=0;r--)Ae(e.owned[r]);e.owned=null}if(e.cleanups){for(let r=e.cleanups.length-1;r>=0;r--)e.cleanups[r]();e.cleanups=null}t&&(e.disposed=!0)}}function D(e){let t=xe(m.owner);m.owner&&(m.owner.owned??=[]).push(t);let r=m.owner;m.owner=t;try{return e(()=>Ae(t))}finally{m.owner=r}}function yi(e){m.hostSchedule=e??(t=>{Promise.resolve().then(t)})}function hi(e){e.queued||(e.queued=!0,m.queue.push(e),!m.scheduled&&m.batchDepth===0&&(m.scheduled=!0,m.hostSchedule(_t)))}function _t(){if(m.scheduled=!1,m.flushing)return;m.flushing=!0;let e=0;try{for(;m.queue.length;){if(++e>1e5)throw new Error("[fluixi] effect flush did not settle (cycle?)");let t=m.queue;m.queue=[];for(let r of t)r.queued=!1,r.disposed||r.run()}}finally{m.flushing=!1}}function mi(){m.batchDepth===0&&_t()}function gi(e){m.batchDepth++;try{return e()}finally{--m.batchDepth===0&&_t()}}function jt(e){let t=new vi(e);return()=>t.dispose()}function bi(e){return!!e&&typeof e.then=="function"}function w(e,t){let r=new ai(e,{equals:t?.equals}),n=(()=>r.get()),o=(s=>{let a=typeof s=="function"?s(r.peek()):s;return r.set(a),mi(),a});return Object.defineProperty(n,Kr,{value:!0,enumerable:!0}),Object.defineProperty(n,Ai,{value:{get value(){return r.peek()},get version(){return r.version}},enumerable:!1}),[n,o]}function g(e,t,r){let n=t,o=$(),s=new Vr(()=>_(o,()=>{try{return n=e(n)}catch(i){if(bi(i))return pi(i),n;throw i}}),{equals:r?.equals}),a=(()=>s.get());return Object.defineProperty(a,Kr,{value:!0,enumerable:!0}),Object.defineProperty(a,wi,{value:!0,enumerable:!0}),a}function S(e,t){let r=t;return jt(()=>{r=e(r)})}function Jr(e,t){let r=t;jt(()=>{r=e(r)})}function O(e,t){let r=t;return jt(()=>{r=e(r)})}function N(e){return gi(e)}function T(e){return ui(e)}function Xr(e,t,r){let n=[];return x(()=>{for(let o of n)o.dispose();n=[]}),g(()=>{let o=e()||[];return T(()=>{if(o.length===0){for(let l of n)l.dispose();return n=[],r?.fallback?r.fallback():[]}let s=new Map;for(let l of n)s.has(l.item)||s.set(l.item,l);let a=[],i=new Set;for(let l=0;l<o.length;l++){let u=o[l],f=s.get(u);if(f&&!i.has(f))f.setIndex(l),a.push(f),i.add(f);else{let c,p,y;D(h=>{y=h;let[b,k]=w(l);p=k,c=t(u,b)});let d={item:u,rendered:c,dispose:y,setIndex:p};a.push(d),i.add(d)}}for(let l of n)i.has(l)||l.dispose();return n=a,a.map(l=>l.rendered)})})}function Gr(e,t,r,n){let o=[],s=[];return x(()=>{for(let a of s)a.dispose();o=[],s=[]}),g(()=>{let a=e()||[];return T(()=>{if(a.length===0){for(let c of s)c.dispose();return o=[],s=[],n?.fallback?n.fallback():[]}let i=new Map;for(let c=0;c<o.length;c++)i.set(o[c],s[c]);let l=[],u=[],f=new Set;for(let c=0;c<a.length;c++){let p=t(a[c]),y=i.get(p);if(y&&!f.has(p))y.setIndex(c),l.push(y);else{let d,h,b;D(k=>{b=k;let[j,be]=w(c);h=be;let De=g(se=>(e()||[])[j()]??se,a[c]);d=r(De,j)}),l.push({rendered:d,dispose:b,setIndex:h})}u.push(p),f.add(p)}for(let[c,p]of i)f.has(c)||p.dispose();return o=u,s=l,l.map(c=>c.rendered)})})}function Yr(e,t,r){let n=[];return x(()=>{for(let o of n)o.dispose();n=[]}),g(()=>{let o=e()||[];return T(()=>{if(o.length===0){for(let l of n)l.dispose();return n=[],r?.fallback?r.fallback():[]}let s=n.length,a=o.length;for(let l=s;l<a;l++){let u,f,c,p=o[l];D(y=>{c=y;let[d,h]=w(p);f=h,u=t(d,l)}),n.push({rendered:u,setItem:f,dispose:c})}for(let l=a;l<s;l++)n[l].dispose();a<s&&(n=n.slice(0,a));let i=Math.min(s,a);for(let l=0;l<i;l++)n[l].setItem(o[l]);return n.map(l=>l.rendered)})})}function P(e){return typeof e=="function"&&e[xi]===!0}function Si(e){Hr&&Hr(e)}function Zr(e){Pt=e}function ki(e){return Pt?Pt(e):void 0}function Qr(e){Et=e}function Ti(){return Et?Et():void 0}function Ci(e,t){Fr&&Fr(e,t)}function en(e,t=(r,n)=>r===n){let r=new Map;return S(()=>{let n=e();for(let[o,s]of r){let[a,i]=s,l=t(o,n);a()!==l&&i(l)}}),n=>{let o=r.get(n);if(!o){let[s,a]=w(!1);o=[s,a],r.set(n,o);let i=e();a(t(n,i))}return o[0]()}}function tn(e,t){let[r,n]=w(e(),t);return S(()=>{let o=e();t?.timeoutMs?setTimeout(()=>n(()=>o),t.timeoutMs):typeof requestIdleCallback=="function"?requestIdleCallback(()=>n(()=>o)):Promise.resolve().then(()=>n(()=>o))}),r}function rn(e,t){let r,n=(...o)=>{r!==void 0&&clearTimeout(r),r=setTimeout(()=>{r=void 0,e(...o)},t)};return x(()=>{r!==void 0&&clearTimeout(r)}),n}function Oi(e){return!!e&&typeof e.then=="function"}function J(e,t,r={}){let n,o;typeof t=="function"?(n=typeof e=="function"?e:()=>e,o=t):(n=()=>!0,o=e,t&&typeof t=="object"&&(r=t));let s=r.transport===!1?void 0:Ti(),a=s!==void 0?ki(s):void 0,i=a!==void 0,[l,u]=w(a!==void 0?a.value:r.initialValue,{equals:!1}),[f,c]=w(void 0,{equals:!1}),[p,y]=w(a!==void 0||r.initialValue!==void 0?"ready":"unresolved",{equals:!1}),[d,h]=w(void 0,{equals:!1}),[b,k]=w(void 0,{equals:!1}),j=Ct,be=!1;S(()=>{let L=n();if(b(),L===!1||L===null||L===void 0){j=Ct,N(()=>{y("unresolved"),h(void 0),c(void 0)});return}let Ie=be;if(be=!1,j!==Ct&&L===j&&!Ie)return;if(j=L,i){i=!1;return}let qe=!1;x(()=>qe=!0);let Mr=T(p),Qo=T(l),Lr=Mr==="ready"||Mr==="refreshing";N(()=>{y(Lr?"refreshing":"pending"),c(void 0)});try{let Z=o(L,{value:Qo,refetching:Lr});Oi(Z)?(h(Z),Si(Z),Z.then(He=>{qe||(s!==void 0&&Ci(s,He),N(()=>{u(()=>He),y("ready"),h(void 0)}))},He=>{qe||N(()=>{c(He),y("errored"),h(void 0)})})):N(()=>{u(()=>Z),y("ready"),h(void 0)})}catch(Z){if(qe)return;N(()=>{c(Z),y("errored"),h(void 0)})}});let De=()=>{let L=p();return L==="pending"||L==="refreshing"},se=(()=>{let L=f();if(L)throw L;if(De()){let Ie=d();if(Ie)throw Ie}return l()});return Object.defineProperties(se,{state:{get:p},loading:{get:De},error:{get:f},latest:{get:l}}),Object.defineProperty(se,Symbol.for("resource"),{value:!0,enumerable:!0}),Object.defineProperty(se,Symbol.for("signal"),{value:!0,enumerable:!0}),[se,{mutate:u,refetch:()=>{be=!0,k(void 0)}}]}function $t(e){if(typeof e=="function"&&!e.length){let t=e();return P(t)?t:$t(t)}if(Array.isArray(e)){let t=[];for(let r=0;r<e.length;r++){let n=$t(e[r]);Array.isArray(n)?t.push.apply(t,n):t.push(n)}return t}return e}function Q(e){let t=g(e);return g(()=>$t(t()))}function on(){let[e,t]=w(0),r=0;return{increment:()=>t(r+=1),decrement:()=>t(r-=1),inFallback:()=>e()>0}}function Rt(e,t){return ci(nn,e,t)}var ii,si,m,Ir,qr,we,Wr,ai,Vr,li,vi,Kr,wi,Ai,xi,Hr,Pt,Et,Fr,Ct,nn,Pi,Nt,A=R(()=>{"use strict";ii="__fluixi_signal_next_state__",si=e=>{typeof queueMicrotask=="function"?queueMicrotask(e):Promise.resolve().then(e)},m=globalThis[ii]??={consumer:null,untracked:!1,owner:null,queue:[],scheduled:!1,flushing:!1,batchDepth:0,hostSchedule:si,onSuspend:null,onError:null},Ir=0,qr=1,we=2,Wr=class{constructor(){this.observers=null,this.watchers=null,this.version=0}updateIfNecessary(){}track(){if(m.untracked)return;let e=m.consumer;e&&((this.observers??=new Set).add(e),(e.sources??=new Set).add(this))}},ai=class extends Wr{constructor(e,t){super(),this._value=e,this._equals=t?.equals===!1?()=>!1:t?.equals??Object.is}get(){return this.track(),this._value}set(e){if(!this._equals(this._value,e)){if(this._value=e,this.version++,this.observers)for(let t of[...this.observers])t.markDirty(we);Ot(this)}}peek(){return this._value}},Vr=class extends Wr{constructor(e,t){super(),this._threw=!1,this._initialized=!1,this.state=we,this.sources=null,this._fn=e,this._equals=t?.equals===!1?()=>!1:t?.equals??Object.is}get(){if(m.consumer===this)throw new Error("Signal.Computed cannot read itself");if(this.track(),this.updateIfNecessary(),this._threw)throw this._error;return this._value}updateIfNecessary(){if(this.state===qr&&this.sources){for(let e of this.sources)if(e.updateIfNecessary(),this.state===we)break}(this.state===we||!this._initialized)&&this.recompute(),this.state=Ir}recompute(){if(this.sources){for(let a of this.sources)a.observers?.delete(this);this.sources.clear()}let e=m.consumer,t=m.untracked;m.consumer=this,m.untracked=!1;let r,n=!1,o;try{r=this._fn()}catch(a){n=!0,o=a,r=this._value}finally{m.consumer=e,m.untracked=t}let s=!this._initialized||this._threw!==n||(n?o!==this._error:!this._equals(this._value,r));if(this._initialized=!0,this._threw=n,this._error=o,this._value=r,s){if(this.version++,this.observers)for(let a of[...this.observers])a.markDirty(we);Ot(this)}}markDirty(e){if(this.state>=e)return;let t=this.state===Ir;if(this.state=e,t){if(this.observers)for(let r of[...this.observers])r.markDirty(qr);Ot(this)}}peek(){if(this.updateIfNecessary(),this._threw)throw this._error;return this._value}};li=class{constructor(e){this._watched=new Set,this._pending=new Set,this._notifyFn=e}watch(...e){for(let t of e)this._watched.add(t),(t.watchers??=new Set).add(this)}unwatch(...e){for(let t of e)this._watched.delete(t),t.watchers?.delete(this),this._pending.delete(t)}getPending(){let e=[...this._pending];return this._pending.clear(),e}_notify(e){if(!this._watched.has(e)||this._pending.has(e))return;let t=this._pending.size===0;this._pending.add(e),t&&this._notifyFn()}};vi=class{constructor(e){this.queued=!1,this.disposed=!1,this.owner=xe(m.owner),m.owner&&(m.owner.cleanups??=[]).push(()=>this.dispose()),this.computed=new Vr(()=>{Ae(this.owner,!1),_(this.owner,()=>{let t=e();typeof t=="function"&&(this.owner.cleanups??=[]).push(t)})}),this.watcher=new li(()=>hi(this)),this.run(),this.watcher.watch(this.computed)}run(){if(!this.disposed){this.watcher.getPending();try{this.computed.get()}catch(e){if(e&&typeof e.then=="function"&&m.onSuspend){m.onSuspend(e,this.owner);return}if(m.onError&&m.onError(e,this.owner))return;throw e}}}dispose(){this.disposed||(this.disposed=!0,this.watcher.unwatch(this.computed),Ae(this.owner))}};yi(()=>{});Kr=Symbol.for("signal"),wi=Symbol.for("memo"),Ai=Symbol.for("signal-node");xi=Symbol.for("signal");Hr=null;Pt=null;Et=null;Fr=null;Ct=Symbol();nn=V();fi((e,t)=>{let r=Ur(t,nn);r&&(r.increment(),e.finally(()=>r.decrement()))});Pi=V();di((e,t)=>{let r=Ur(t,Pi);return r?(r.setError(e),!0):!1});Nt=Symbol.for("fluixi-proxy")});var kn,Tn=R(()=>{"use strict";kn="1.0.0-alpha.78"});function Bi(e){return e.localName.includes("-")}function Cn(e,t,r,n=!1){if(r==null){e.removeAttribute(t);return}if(Bi(e)){e[t]=r;return}C(e,t,r,n)}function jn(e,...t){e.classList.add(...t)}function Rn(e,...t){e.classList.remove(...t)}function Nn(e,...t){t.forEach(r=>e.classList.toggle(r))}function C(e,t,r,n=!1){if(r==null||r===!1){e.removeAttribute(t);return}if(r===!0){e.setAttribute(t,"");return}if(typeof r=="object"){e.setAttribute(t,JSON.stringify(r));return}e.setAttribute(t,String(r))}function Mn(e){return e&&typeof e=="object"&&e.strings&&Array.isArray(e.strings)&&e.values&&Array.isArray(e.values)}function Ze(e){return e instanceof Node}function Ln(e){q.core=e}function Qe(e){q.core&&e.setAttribute("fluixi",q.core),e.setAttribute("fx-dom",q.dom),e.setAttribute("fx-reactive",q.reactive),typeof globalThis<"u"&&(globalThis.Fluixi=q)}function et(){let e=[q.core,q.dom,q.reactive].filter(t=>t!==void 0);new Set(e).size<=1||console.warn(`[fluixi] package versions disagree — core ${q.core??"(absent)"}, dom ${q.dom}, reactive ${q.reactive}. These ship as one release, so a mismatch usually means a stale lockfile or two copies resolved side by side. Reinstall, or check for duplicates with \`pnpm why @fluixi/dom\`.`)}function Dn(e){return Object.defineProperty(e,Symbol.for("fluixi-provider"),{value:!0,enumerable:!0}),e}function tt(e){return typeof e!="function"||Object.defineProperty(e,Symbol.for("fluixi-component"),{value:!0,enumerable:!0}),e}function In(e){return Object.defineProperty(e,Symbol.for("fluixi-suspense"),{value:!0,enumerable:!0}),e}function Ji(e){return typeof e=="function"&&e[Symbol.for("fluixi-router")]===!0}function Xi(e){return typeof e=="function"&&e[Symbol.for("fluixi-routes")]===!0}function Gi(e){return typeof e=="function"&&e[Symbol.for("fluixi-route")]===!0}function Yi(e){return typeof e=="function"&&e[Symbol.for("fluixi-outlet")]===!0}function Zi(e){return typeof e=="function"&&e[Symbol.for("fluixi-provider")]===!0}function Qi(e){return typeof e=="function"&&e[Symbol.for("fluixi-context")]===!0}function B(e){return typeof e=="function"&&e[Symbol.for("fluixi-component")]===!0}function es(e){return typeof e=="function"&&e[Symbol.for("fluixi-suspense")]===!0}function qn(e){return Ji(e)?{type:"router",value:e}:Gi(e)?{type:"route",value:e}:Xi(e)?{type:"routes",value:e}:Yi(e)?{type:"outlet",value:e}:B(e)?{type:"component",value:e}:es(e)?{type:"suspense",value:e}:Zi(e)?{type:"provider",value:e}:Qi(e)?{type:"context",value:e}:{type:"none",value:e}}function Jt(){if(!Pn)throw new Error("[fluixi] server render ran before @fluixi/dom/server loaded");return Pn}function Xt(e){return e!=null&&e[rt]===!0?!0:typeof Node<"u"&&e instanceof Node}function ts(e){return e!=null&&e[rt]===!0?e.nodeType===1:typeof Element<"u"&&e instanceof Element}function rs(e){return e!=null&&e[rt]===!0?e.nodeType===3:typeof Text<"u"&&e instanceof Text}function ns(e){Hn=e}function Fn(){return Hn}function En(e,t){return v.active&&t.parentNode===e}function Wn(e){let t=v.parents.lastIndexOf(e);t!==-1&&(v.parents.length=t),v.cursor=e.nextSibling}function Vn(e){if(!v.active)return e();let t=v.cursor,r=v.parents;v.active=!1,v.parents=[];try{return e()}finally{v.active=!0,v.cursor=t,v.parents=r}}function zn(e){if(!v.active||e==null)return;let t=Array.isArray(e)?e[e.length-1]:e;t&&typeof t.nodeType=="number"&&Wn(t)}function te(e){if(!ke)for(let t of e)Ke.has(t)||Gt.has(t)||(Ke.add(t),document.addEventListener(t,is))}function is(e){let t=`$$${e.type}`,r=e.composedPath&&e.composedPath()[0]||e.target;for(;r;){let n=r[t];if(n&&!r.disabled&&(n(e),e.cancelBubble))return;r=r.host&&r.host!==r&&r.host instanceof Element?r.host:r.parentNode}}function ss(e,t,r){if(e[`$$${t}`]=r,Gt.has(t)){let n=`__fx_${t}`;if(!e[n]){let o=s=>{e[`$$${t}`]?.(s)};e.addEventListener(t,o),e[n]=o}return}Ke.has(t)||te([t])}function $n(e,t){delete e[`$$${t}`];let r=`__fx_${t}`,n=e[r];n&&(e.removeEventListener(t,n),delete e[r])}function X(e,t=!1){if(ke)return Jt().createText(e);if(v.active&&!t){let r=Fn()?.hydrateText(e);if(r)return r}return document.createTextNode(e)}function fe(e,t=!1){if(ke)return Jt().createElement(e,t);if(v.active){let r=Fn()?.hydrateElement(e);if(r)return r}return t?document.createElementNS(Kt,e):document.createElement(e)}function ls(e,t,r,n,o){let s=n,a=new Map;return O(()=>{let i;if(B(e)&&!P(e)){if(!a.has(e)){U++;try{let l=e();a.set(e,l)}finally{U--}}for(i=a.get(e);typeof i=="function"&&P(i);)i=i()}else for(i=e();typeof i=="function"&&P(i);)i=i();{let l=0;for(;typeof i=="function"&&l++<50;)if(B(i)){if(!a.has(i)){let u=i;U++;try{let f=u();a.set(u,f)}finally{U--}}i=a.get(i)}else if(P(i))i=i();else if(i=i(),typeof i!="function"||!P(i)&&!B(i))break}U++;try{s=Je(t,i,r,s,a),o(s)}finally{U--}})}function H(e,t,r,n){if(U>as)return console.error("[insert] Exceeded max call depth — possible infinite loop."),()=>null;r!==void 0&&!r&&(r=X("",!0),e.appendChild(r));let o=n??null,s=l=>Array.isArray(l)&&l.some(u=>typeof u=="function"),a=l=>typeof l=="function"?l:()=>l;if(typeof t!="function"&&!s(t)){U++;try{o=Je(e,t,r,o)}finally{U--}return()=>o}let i=ls(a(t),e,r,o,l=>{o=l});return()=>(i?.(),o)}function Je(e,t,r,n,o){if(t==null||typeof t=="boolean")return ee(e,n,r);if(typeof t=="function")for(;typeof t=="function";)t=t();if(t==null||typeof t=="boolean")return ee(e,n,r);if(Be(t)){let a=X("",!0);return Array.isArray(n)?n.length>0?(e.replaceChild(a,n[0]),ee(e,n.slice(1),r)):I(e,a,r):n?e.replaceChild(a,n):I(e,a,r),t.then(i=>{a.parentNode===e&&Je(e,i,a.nextSibling,a)}).catch(i=>{console.error("Error resolving promise in insertExpression:",i)}),a}let s=typeof t;if(s==="string"||s==="number"){if(s==="number"&&(t=String(t)),Array.isArray(n)){if(n.length===0){let i=X(t);return I(e,i,r),i}if(n.length===1&&n[0].nodeType===3)return n[0].data=t,n;n=ee(e,n,r)}if(n&&rs(n))return n.data=t,n;let a=X(t);return n&&n.parentNode===e?e.replaceChild(a,n):En(e,a)||I(e,a,r),a}if(Xt(t))return En(e,t)?(Wn(t),t):Array.isArray(n)?(n.length===0?I(e,t,r):n[0].parentNode===e?(e.replaceChild(t,n[0]),ee(e,n.slice(1),r)):I(e,t,r),t):(n?n!==t&&(n.parentNode===e?e.replaceChild(t,n):I(e,t,r)):I(e,t,r),t);if(Array.isArray(t)){let a=[],i=Array.isArray(n)?n:n?[n]:[],l=[];z(t,a,e,r,!0,o,l);let u=us(e,i,a,r);for(let f of l){let c=H(e,f.sig,f.marker);x(()=>{ee(e,c()),f.marker.parentNode===e&&e.removeChild(f.marker)})}return u}if(s==="object"&&t!==null&&typeof t=="object"){let a=t;if("type"in a&&"props"in a){let i=a;if(typeof i.type=="function"){let l=i.type(i.props||{});return Je(e,l,r,n)}}}return ee(e,n,r)}function z(e,t,r,n,o=!0,s,a){for(let i=0;i<e.length;i++){let l=e[i];if(!(l==null||typeof l=="boolean")){for(;typeof l=="function"&&!Be(l)&&!P(l)&&!B(l)&&(l=l(),!(l==null||typeof l=="boolean")););if(!(l==null||typeof l=="boolean")){if(typeof l=="function"){let u;for(B(l)&&!P(l)?(s||(s=new Map),s.has(l)||s.set(l,l()),u=s.get(l)):u=l();typeof u=="function"&&!Be(u)&&!P(u)&&!B(u);)s||(s=new Map),s.has(u)||s.set(u,u()),u=s.get(u);if(u==null||typeof u=="boolean")continue;if(typeof u=="function"){if(P(u)){if(a){let c=X("",!0);t.push(c),a.push({marker:c,sig:u});continue}let f=u();for(;typeof f=="function"&&P(f);)f=f();if(f==null||typeof f=="boolean")continue;Array.isArray(f)?z(f,t,r,n,o,s):z([f],t,r,n,o,s);continue}continue}Array.isArray(u)?z(u,t,r,n,o,s,a):z([u],t,r,n,o,s,a);continue}if(Be(l)){let u=X("",!0);t.push(u),l.then(f=>{if(u.parentNode){let c=[];if(z([f],c,u.parentNode,void 0,!1,s),c.length>0){u.parentNode.replaceChild(c[0],u);for(let p=1;p<c.length;p++)u.parentNode?.insertBefore(c[p],c[p-1].nextSibling)}}}).catch(f=>console.error("Error resolving promise in array:",f));continue}if(Array.isArray(l)){z(l,t,r,n,o,s,a);continue}if(Xt(l)){t.push(l);continue}if(typeof l=="object"&&l!==null&&"type"in l&&"props"in l){let u=l;if(typeof u.type=="function"){let f=u.type(u.props||{});Array.isArray(f)?z(f,t,r,n,!1,s):z([f],t,r,n,!1,s);continue}}if(typeof l=="string"||typeof l=="number"){let u=String(l);if(u.trim()===""&&u!==" ")continue;t.push(X(u));continue}t.push(X(String(l)))}}}}function us(e,t,r,n){for(let c=0;c<r.length;c++){let p=r[c].parentNode;p!==null&&p!==e&&p.nodeType!==11&&(r=r.slice(),r[c]=r[c].cloneNode(!0))}let o=r.length,s=t.length,a=o,i=0,l=0,u=s>0?t[s-1].nextSibling??void 0:n,f=null;for(;i<s||l<a;){if(t[i]===r[l]){i++,l++;continue}for(;s>i&&a>l&&t[s-1]===r[a-1];)s--,a--;if(s===i){let c=a<o?l?r[l-1].nextSibling??void 0:r[a-l]:u;for(;l<a;)I(e,r[l++],c)}else if(a===l)for(;i<s;)(!f||!f.has(t[i]))&&t[i].parentNode===e&&e.removeChild(t[i]),i++;else if(t[i]===r[a-1]&&r[l]===t[s-1]){let c=t[--s].nextSibling;I(e,r[l++],t[i++].nextSibling),I(e,r[--a],c),t[s]=t[i-1]}else{if(!f){f=new Map;let p=l;for(;p<a;)f.set(r[p],p++)}let c=f.get(t[i]);if(c!=null)if(l<c&&c<a){let p=i,y=1;for(;++p<s&&p<a&&!(!f.has(t[p])||f.get(t[p])!==c+y);)y++;if(y>c-l){let d=t[i];for(;l<c;)I(e,r[l++],d)}else t[i].parentNode===e?e.replaceChild(r[l++],t[i++]):(I(e,r[l++],u),i++)}else i++;else t[i].parentNode===e&&e.removeChild(t[i]),i++}}return r}function ee(e,t,r){if(t)if(Array.isArray(t))for(let n=0;n<t.length;n++)t[n].parentNode===e&&e.removeChild(t[n]);else t.parentNode===e&&e.removeChild(t);return null}function I(e,t,r){v.active&&t.parentNode===e||(r&&r.parentNode===e?e.insertBefore(t,r):e.appendChild(t))}function ce(e,t,r){r==null?delete e[t]:e[t]=r}function Un(e,t,r){let n=r,o;return Array.isArray(r)&&(n=r[0],o=r[1]),typeof n!="function"?()=>{}:(e.addEventListener(t,n,o),()=>e.removeEventListener(t,n,o))}function Bn(e,t){let r=(n,o)=>{typeof n=="function"&&n(e,o??(()=>{}))};if(typeof t=="function"){r(t);return}if(Array.isArray(t)){if(typeof t[0]=="function"){r(t[0],t[1]);return}for(let n of t)Array.isArray(n)?r(n[0],n[1]):r(n)}}function Vt(e,t,r,n=!1){return typeof r!="function"?(C(e,t,r,n),()=>{}):O(()=>{let o=typeof r=="function"?r():r;C(e,t,o,n)})}function zt(e,t,r){return typeof r!="function"?(ce(e,t,r),()=>{}):O(()=>{let n=typeof r=="function"?r():r;ce(e,t,n)})}function Kn(e,t,r){return typeof r!="function"?(C(e,t,!!r),()=>{}):O(()=>{let n=r();C(e,t,!!n)})}function Xe(e,t){if(t==null){e.removeAttribute("class");return}if(typeof t=="function"){O(()=>Xe(e,t()));return}if(typeof t=="string"){e.setAttribute("class",t);return}if(Array.isArray(t)){e.setAttribute("class",t.filter(Boolean).join(" "));return}if(typeof t=="object"){let r=Object.keys(t).filter(n=>{let o=t[n];return typeof o=="function"?o():!!o}).join(" ");e.setAttribute("class",r);return}e.setAttribute("class",String(t))}function Ge(e,t,r){if(!(!t||typeof t!="object"))for(let n in t){let o=t[n],s=n.split(/\s+/).filter(Boolean);if(typeof o=="function"&&r)r.push(O(()=>{let a=!!o();for(let i of s)e.classList.toggle(i,a)}));else{let a=!!(typeof o=="function"?o():o);for(let i of s)e.classList.toggle(i,a)}}}function Ye(e,t){let r=t;for(;typeof r=="function";)r=r();if(r==null){e.removeAttribute("style");return}if(typeof r=="string"){e.style.cssText=r;return}if(typeof r=="object")for(let n in r){let o=r[n];o==null?e.style[n]="":e.style[n]=o}}function Jn(e){let{element:t,props:r,prevProps:n=os,isSVG:o=!1,skipChildren:s=!1}=e;if(!t||!ts(t))return console.error("[spread] Error: element is not a DOM Element!"),()=>{};if(!r)return console.warn("[spread] Warning: props is undefined!"),()=>{};let a=o||t.namespaceURI===Kt,i=[];for(let l in r){if(s&&l==="children")continue;let u=r[l],f=n[l];if(u===f)continue;if(l==="ref"){Yt(u,t);continue}if(l==="use"){Bn(t,u);continue}if(l.startsWith("on:")){i.push(Un(t,l.slice(3),u));continue}if(l.startsWith("prop:")){i.push(zt(t,l.slice(5),u));continue}if(l.startsWith("attr:")){i.push(Vt(t,l.slice(5),u,a));continue}if(l.startsWith("bool:")){i.push(Kn(t,l.slice(5),u));continue}if(l==="class"||l==="className"){typeof u=="function"?i.push(O(()=>Xe(t,u()))):Xe(t,u);continue}if(l==="classList"){typeof u=="function"?i.push(O(()=>Ge(t,u()))):Ge(t,u,i);continue}if(l==="style"){typeof u=="function"?i.push(O(()=>Ye(t,u()))):Ye(t,u);continue}if(l.startsWith("on")){let p=l.slice(2).toLowerCase();f&&$n(t,p),u&&ss(t,p,u);continue}let c=On.has(l)||!a&&l in t;typeof u=="function"?i.push(c?zt(t,l,u):Vt(t,l,u,a)):i.push(O(()=>c?ce(t,l,r[l]):C(t,l,r[l],a)))}for(let l in n)if(!(l in r))if(l.startsWith("on")){let u=l.slice(2).toLowerCase();$n(t,u)}else On.has(l)?ce(t,l,null):t.removeAttribute(l);return()=>{i.forEach(l=>l())}}function cs(e,t,r=!1){for(let n in t){let o=t[n];if(n==="ref"){Yt(o,e);continue}if(n!=="children"){if(n==="use"){Bn(e,o);continue}if(n.startsWith("on:")){Un(e,n.slice(3),o);continue}if(n.startsWith("prop:")){zt(e,n.slice(5),o);continue}if(n.startsWith("attr:")){Vt(e,n.slice(5),o,r);continue}if(n.startsWith("bool:")){Kn(e,n.slice(5),o);continue}if(n.startsWith("on")&&n.length>2){let s=n.slice(2).toLowerCase();if(typeof o=="function")if(Gt.has(s)){e[`$$${s}`]=o;let a=`__fx_${s}`;if(!e[a]){let i=l=>{e[`$$${s}`]?.(l)};e.addEventListener(s,i),e[a]=i}}else e[`$$${s}`]=o,Ke.has(s)||te([s]);continue}if(n==="class"||n==="className"){Xe(e,o);continue}if(n==="classList"){typeof o=="function"?O(()=>Ge(e,o())):Ge(e,o);continue}if(n==="style"){typeof o=="function"?O(()=>Ye(e,o())):Ye(e,o);continue}if(n==="innerHTML"){if(typeof o=="function"){let s=S(()=>{let a=o();for(;typeof a=="function";)a=a();e.innerHTML=a});x(()=>s())}else e.innerHTML=o;continue}if(n==="value"&&(e.tagName==="INPUT"||e.tagName==="TEXTAREA")){if(typeof o=="function"){let s=S(()=>{let a=o();for(;typeof a=="function"&&a.length===0;)a=a();document.activeElement!==e&&(e.value=a??"")});x(()=>{s()})}else O(()=>{document.activeElement!==e&&(e.value=t[n]??"")});continue}if(n==="checked"&&e.tagName==="INPUT"){if(typeof o=="function"){let s=S(()=>{let a=o();for(;typeof a=="function"&&a.length===0;)a=a();document.activeElement!==e&&(e.checked=a??"")});x(()=>{s()})}else O(()=>{document.activeElement!==e&&(e.checked=t[n]??"")});continue}if(n==="value"&&e.tagName==="SELECT"){if(typeof o=="function"){let s=!0,a=S(()=>{let i=o();for(;typeof i=="function"&&i.length===0;)i=i();s?(s=!1,queueMicrotask(()=>{e.value=i??""})):e.value=i??""});x(()=>{a()})}else{let s=!0;O(()=>{let a=t[n];s?(s=!1,queueMicrotask(()=>{e.value=a??""})):e.value=a??""})}continue}if(typeof o=="function"){let s=S(()=>{let a=o();for(;typeof a=="function"&&a.length===0;)a=a();Cn(e,n,a,r)});x(()=>{s()})}else O(()=>Cn(e,n,t[n],r))}}}function Yt(e,t){if(e){if(Xt(e)){let r=t,n=e;if(!r)return;typeof r=="function"?r(n):typeof r=="object"&&"current"in r&&(r.current=n);return}typeof e=="function"?e(t):typeof e=="object"&&"current"in e&&(e.current=t)}}function fs(e){return e==="svg"||e==="path"||e==="circle"||e==="rect"||e==="line"||e==="polygon"||e==="polyline"||e==="ellipse"||e==="g"||e==="defs"||e==="clipPath"||e==="text"}function Be(e){return e!=null&&(typeof e=="object"||typeof e=="function")&&typeof e.then=="function"||e instanceof Promise}function Zt(e,t,r){if(!t)throw new Error("Container element is required");let n,o,s=[];return D(a=>{N(()=>{v.active||(t.textContent=""),Qe(t),et(),H(t,e)}),o=a}),()=>{o?.(),n?.(),s.forEach(a=>a()),t.textContent=""}}function Xn(e){Ut.fn=e}function G(e,t){return Ut.fn?Ut.fn(e,t):(()=>e(t))}function Qt(){let e=globalThis.__FX_DATA__;if(e)return e;if(Wt!==void 0)return Wt;let t=null;if(typeof document<"u"){let r=document.getElementById(ds)?.textContent;if(r)try{t=JSON.parse(r)}catch{t=null}}return Wt=t}function nt(){for(;;){for(;v.cursor&&v.cursor.nodeType===3&&v.cursor.data==="";)v.cursor=v.cursor.nextSibling;if(v.cursor!=null||!v.parents.length)return;v.cursor=v.parents.pop().nextSibling}}function it(e,t){let r=t.nodeType===1?`<${t.tagName.toLowerCase()}>`:t.nodeType===3?`text ${JSON.stringify((t.nodeValue??"").slice(0,24))}`:t.nodeType===8?"comment":"node";console.warn(`[fluixi] hydration mismatch: expected ${e} but the server DOM has ${r}. Server and client rendered different markup; recreating this node on the client. Check for non-deterministic render (Date.now(), Math.random(), browser-only branches, untransported data).`)}function hs(e){nt();let t=v.cursor;return t&&t.nodeType===1&&t.tagName.toLowerCase()===e.toLowerCase()?(ys.has(e.toLowerCase())?v.cursor=t.nextSibling:(v.parents.push(t),v.cursor=t.firstChild),t):(ot&&t&&it(`<${e}>`,t),null)}function ms(e){nt();let t=v.cursor;return t&&t.nodeType===1&&t.tagName.toLowerCase()===e.toLowerCase()?(v.cursor=t.nextSibling,t):(ot&&t&&it(`<${e}> (static)`,t),null)}function gs(e){if(e===""){let r=v.cursor;return r&&r.nodeType===3&&r.data!==""?(v.cursor=r.nextSibling,r.data="",r):null}nt();let t=v.cursor;return t&&t.nodeType===3?(v.cursor=t.nextSibling,t.nodeValue!==e&&(t.nodeValue=e),t):(ot&&t&&it(`text ${JSON.stringify(e.slice(0,24))}`,t),null)}function vs(e){nt();let t=v.cursor;return t&&t.nodeType===8&&t.data===e?(v.cursor=t.nextSibling,t):(ot&&t&&it(`marker <!--${e.slice(0,24)}-->`,t),null)}function bs(){_n||(_n=!0,ns({hydrateElement:hs,hydrateText:gs,hydrateMarker:vs,hydrateStatic:ms}))}function st(e,t,r){bs(),v.active=!0,v.cursor=t.firstChild,v.parents=[];let n=Qt(),o=r?.resourceNamespace,s=0;Qr(()=>o?`${o}:r${s++}`:`r${s++}`),Zr(n?a=>a in n?{value:n[a]}:void 0:null);try{return Zt(e,t)}finally{v.active=!1,v.cursor=null,v.parents=[]}}function Gn(e,t={}){if(typeof e=="function")return G(e,t);if(typeof e!="string"||e.length===0)return null;let r=fs(e);if(ke)return Jt().createElement(e,r);let n=r?document.createElementNS(Kt,e):document.createElement(e);return cs(n,t,r),ws(n,t),n}function ws(e,t){if(!t||t.children===void 0)return;let r=Q(()=>t.children),n=o=>{H(e,o,typeof o=="function"?null:void 0)};Array.isArray(r)?r.forEach(n):n(r)}function As(e){return typeof e=="function"?e:(()=>e)}function at(e){return()=>{let t=e();return typeof t=="function"?t():t}}function xs(e){return e!=null&&e!==!1}function Ss(e){return!e||typeof e!="object"?!1:!!(typeof e._$litType$<"u"||typeof e._$litDirective$<"u"||Array.isArray(e.strings)&&Array.isArray(e.values))}function Yn(e){let t=at(()=>e.when),r=g(t,void 0),n=g(r,void 0),o=$(),s=null,a=null,i=l=>{l!==a&&(s&&le(s),s=ae(o),a=l)};return g(()=>{let l=n();return i(l?"when":"fallback"),_(s,()=>{if(l){let u=e.children;return typeof u=="function"&&!Ss(u)?typeof r=="function"?T(()=>T(r)?u(r()):e.fallback):u(r):u}return e.fallback})},void 0,{name:"show"})}function Zn(e){let t=at(()=>e.each),r=()=>e.fallback??null,n=(o,s)=>{let a=e.children,i=Array.isArray(a)?a.map(l=>typeof l=="function"?l(o,s):l):typeof a=="function"?a(o,s):a;return zn(i),i};return e.by?Gr(t,e.by,(o,s)=>n(o,s),{fallback:r}):Xr(t,(o,s)=>n(o,s),{fallback:r})}function Qn(e){let t=at(()=>e.each);return Yr(t,(r,n)=>{let o=e.children(r,n);return zn(o),o},{fallback:()=>e.fallback??null})}function eo(e){return{[Bt]:!0,when:at(()=>e.when),get children(){return e.children}}}function to(e){let t=Array.isArray(e.children)?e.children:[e.children],r=$(),n=null,o=-1,s=a=>{a!==o&&(n&&le(n),n=ae(r),o=a)};return g(()=>{for(let a=0;a<t.length;a+=1){let i=t[a],l=0;for(;typeof i=="function"&&!i[Bt]&&l++<10;)i=i();if(!i||typeof i!="object"||i[Bt]!==!0)continue;let u=i.when();if(xs(u))return s(a),_(n,()=>typeof i.children=="function"?i.children(u):i.children)}return s(-2),_(n,()=>e.fallback??null)})}function ro(e){let t=As(e.component),{component:r,...n}=e,o=$(),s=null,a;return g(()=>{let i=t();return i!==a&&(s&&le(s),s=ae(o),a=i),i==null?null:typeof i=="string"?{tag:i,props:n}:_(s,()=>i(n))})}function no(e){let t=()=>e.mount?typeof e.mount=="function"?e.mount():e.mount:document.body,r,n;return D(o=>{r=o,n=document.createElement("div"),n.style.display="contents",t().appendChild(n),H(n,e.children)&&Yt(e.ref,n)}),x(()=>{r(),n.remove()}),null}function er(e){if(ke)return e.fallback??null;let t=v.active,[r,n]=w(!t);return t&&queueMicrotask(()=>n(!0)),g(()=>r()?e.children:e.fallback??null,void 0,{name:"client-only"})}function io(e){let[t,r]=w(null),n=()=>r(null);return g(()=>{let o=t();if(o!==null)return typeof e.fallback=="function"?e.fallback(o,n):e.fallback;try{return typeof e.children=="function"?e.children():e.children}catch(s){return r(s),typeof e.fallback=="function"?e.fallback(s,n):e.fallback}})}function so(e){return g(()=>{let t=typeof e=="function"?e():e,r=[];for(let[n,o]of Object.entries(t))n&&(typeof o=="function"?o():o)&&r.push(n);return r.join(" ")})}function ks(e){return e.startsWith("--")?e:e.replace(/[A-Z]/g,t=>`-${t.toLowerCase()}`)}function ao(e){return g(()=>{let t=typeof e=="function"?e():e,r=[];for(let[n,o]of Object.entries(t)){if(!n)continue;let s=typeof o=="function"?o():o;s!=null&&r.push(`${ks(n)}: ${s}`)}return r.join("; ")})}var Kt,On,Ia,Ki,q,ke,rt,Pn,v,Hn,os,Ke,Gt,U,as,ps,Ut,ds,Wt,ys,ot,_n,Bt,oo,Ts,M=R(()=>{"use strict";A();Tn();A();A();A();A();A();A();A();A();A();A();A();A();A();Kt="http://www.w3.org/2000/svg";On=new Set(["className","value","checked","selected","innerHTML","innerText","textContent","indeterminate","htmlFor"]);Ia=typeof Symbol=="function"&&Symbol.for?Symbol.for("react.element"):60103;Ki="1.0.0-alpha.78",q={dom:Ki,reactive:kn};ke=typeof document>"u",rt=Symbol.for("fluixi.server-node"),Pn=null;v={active:!1,cursor:null,parents:[]},Hn=null;os={},Ke=new Set,Gt=new Set(["scroll","focus","blur","load","error","resize","mouseenter","mouseleave","pointerenter","pointerleave","gotpointercapture","lostpointercapture"]);U=0,as=200;ps="__fx_dom_create_component__",Ut=globalThis[ps]??={fn:null};ds="__FX_DATA__";ys=new Set(["area","base","br","col","embed","hr","img","input","link","meta","param","source","track","wbr"]),ot=typeof process<"u"&&process.env&&!1;_n=!1;Bt=Symbol("match");oo=er;Ts=rt});function rr(){return Cs}function uo(){let e=$();if(!e)return null;if(!e[tr]){let t={mounts:[],effects:[],scheduled:!1};e[tr]=t}return e[tr]}function co(e){if(e.scheduled)return;e.scheduled=!0;let t=$();queueMicrotask(()=>{if(zr(t)){e.mounts=[],e.effects=[];return}_(t,()=>{for(let r of e.mounts)try{let n=r();typeof n=="function"&&x(n)}catch(n){console.error("Error in onMount callback:",n)}for(let r of e.effects){let n;S(()=>{n&&n(),n=r()}),x(()=>{n&&n()})}e.mounts=[],e.effects=[]})})}function Y(e){Xn(Ce)}function Ce(e,t){return lt(e,t)}function lt(e,t){let r=typeof e=="function"?T(()=>e(t)):e;if(r!=null&&(typeof r=="function"||typeof r=="object")&&!P(r)){try{r.$name=e.name}catch{}return tt(r)}return r}function ut(e,t=!0){let r=uo();if(r){if(!t){r.scheduled||e();return}r.mounts.push(e),co(r)}else{if(!t){e();return}S(()=>{let n=T(e);typeof n=="function"&&x(n)})}}function ct(e){x(e)}function Oe(e){let t=uo();if(t)t.effects.push(e),co(t);else{let r;S(()=>{r&&r(),r=e()}),x(()=>{r&&r()})}}function ft(e){return g(e)}function pt(e){let t={current:e};return x(()=>{t.current=null}),t}function dt(e,t){let[r,n]=w(t);return[r,s=>{n(e(r(),s))}]}function yt(e,t,r,n){Oe(()=>{let o=e&&"current"in e?e.current:e;if(o)return o.addEventListener(t,r,n),()=>{o.removeEventListener(t,r,n)}})}function ht(e){return e}function nr(){return Te}function or(e){Te&&e()}var Cs,Te,tr,pe=R(()=>{"use strict";M();A();Cs={context:null,owner:null};Te=typeof process<"u"&&!1,tr=Symbol.for("fluixi-lifecycle")});function de(e,t){let r,n,o;function s(){return n||(n=e().then(i=>r=i.default)),n}t?.preload&&s();let a=(i=>{if(r){let l=r;return T(()=>l(i))}if(!o){let[l]=J(()=>s(),{transport:!1});if(o=l,l.error)throw l.error}return g(()=>{let l=o();return l?T(()=>l(i)):void 0},void 0,{name:"lazy"})});return a.preload=()=>s().then(()=>{}),a.$lazy=!0,a.loader=e,a}var mt=R(()=>{"use strict";A()});function $s(){go||(go=!0,!(typeof process<"u")&&console.warn("[fluixi] createProvider({ context, value, children }) reads `children` eagerly: the object literal materialises `children` BEFORE the context is stamped, so a routed <Outlet/> that has siblings inside the provider renders detached and its descendants see no context under SSR. Use the lazy form instead:\n createProvider(Context, value, props) // children stays a getter\n // or JSX: <Context.Provider value={…}>{props.children}</Context.Provider>"))}function gt(e,t,r){let n=!!e?.Provider,o=n?e:e.context,s=n?t:e.value,a=n?!1:e.debug??!1;n||$s();let i=typeof s=="function"?s():s,l=n?r:e;return o.Provider({value:i,get children(){return l?.children},debug:a})}function vo(e){let t=he(e);return[t,n=>gt(t,n.value,n)]}function sr(e,t){if(e.length===0)return Q(()=>t);let[r,n]=e[0],o=e.slice(1);return gt(r,n,{get children(){return sr(o,t)}})}function bo(e){return t=>{let r=me(e);return t.children(r)}}function wo(e,t){let r=me(e);return r===e.defaultValue?t():r}function he(e){let t=V(e),r=n=>(n.debug,t.Provider({value:n.value,get children(){return n.children},debug:n.debug}));return typeof Symbol<"u"&&Symbol.for&&(r.$$typeof=Symbol.for("react.provider")),r.$$typeof=Symbol.for("react.provider"),{id:t.id,Provider:Dn(r),defaultValue:e}}function me(e){let t=F(e);return t!==void 0?t:e.defaultValue}var go,ar=R(()=>{"use strict";M();A();A();pe();Y("index");go=!1});function Po(){return Oo}function cr(e){Oo=e}function Eo(e,t){vt.set(e,t)}function $o(e){return vt.get(e)}function Ds(){vt.clear()}function _o(){if(typeof window>"u")return!1;let e=document.getElementById("__FLUIXI_HYDRATION__");if(!e||e.getAttribute("type")!=="application/json")return!1;try{let t=e.textContent||"{}",r=JSON.parse(t);for(let[n,o]of Object.entries(r))vt.set(n,o);return!0}catch(t){return console.error("Failed to deserialize hydration data:",t),!1}}function fr(){if(typeof window>"u")return;let e=document.getElementById("__FLUIXI_HYDRATION__");e&&e.remove();let t=document.createTreeWalker(document.body,NodeFilter.SHOW_COMMENT,null),r=[],n;for(;n=t.nextNode();){let o=n,s=o.nodeValue||"";(s.startsWith("#")||s.startsWith("/"))&&r.push(o)}r.forEach(o=>o.remove()),Ds()}function jo(){return typeof window>"u"}var Oo,vt,pr=R(()=>{"use strict";Oo=!1,vt=new Map;typeof window<"u"&&window.addEventListener("load",()=>{setTimeout(fr,100)})});function At(e,t,r={}){let{preserveStructure:n,multiple:o,throwOnError:s=!1,defaultValue:a,maxDepth:i=20}=r;if(!e||typeof e!="object")return a;if(!t)return e;if(Array.isArray(t))if(n){let f={};for(let c of t){let p=At(e,c,{...r,preserveStructure:!1});p!==void 0&&Zs(f,c,p)}return f}else return t.map(f=>At(e,f,{...r,preserveStructure:!1}));let l=gr(t,{...r,throwOnError:s});if(l.length===0)return e;if(typeof n>"u"||n===!1){let f=Qs(e,t);return o===!1&&Array.isArray(f)?f[0]:f===void 0&&a!==void 0?a:f}let u=W(e,l,0,i);return u===void 0&&a!==void 0?a:u}function Qs(e,t,r={}){let{createMissing:n=!1,add:o=!1,debug:s=!1}=r,a=gr(t),i=e,l=!1,u="",f=t;if(typeof i=="object"&&!Array.isArray(i)&&f.length>0&&i[f])return i=i[f],i;for(let c=0;c<a.length;c++){let p=a[c],y=a.length>1?c===a.length-1:!1;if(i===null&&!n)return;let d=a[c+1];switch(p.type){case"property":if(i&&typeof i=="object")if(Array.isArray(i)){if(typeof p.value=="number"){let h=p.value;if(n&&h>=i.length)for(let b=i.length;b<=h;b++)i.push(void 0);if(n&&(i[h]===null||i[h]===void 0)&&(!y||l)&&(d?i[h]=d.type==="index"||d.type==="slice"||d.type==="union"||d.type==="wildcard"?[]:{}:i[h]=null,l=!1),i=i[h],d){l=!0;continue}}else o?i.push({[String(p.value)]:null}):i=i.map(h=>h[String(p.value)]);if(d)continue;return No(i)}else{if(i[u]&&u.split(".").length>=2){i=i[u];continue}if(n&&(i[String(p.value)]===null||i[String(p.value)]===void 0)&&(!y||l)&&(d?i[String(p.value)]=d.type==="index"||d.type==="slice"||d.type==="union"||d.type==="wildcard"?[]:{}:i[String(p.value)]=null,l=!1,i=i[String(p.value)],d)){l=!0;continue}if(i?(!i[String(p.value)]&&n&&(i[String(p.value)]=null),i=i[String(p.value)]):i={[String(p.value)]:null},d)continue}else if(n)i={},i[String(p.value)]=d.type==="index"||d.type==="slice"||d.type==="union"||d.type==="wildcard"||r.type==="array"?[]:{},i=i[String(p.value)];else return;break;case"index":case"wildcard":if(Array.isArray(i)){if(p.type==="index"){let h=p.value;if(h<0){i=i[i.length-Math.abs(h)];continue}if(n&&(h>=i.length||i[h]==null||i[h]==null)&&!y){for(let b=i.length;b<=h;b++)i.push(void 0);d&&(i[h]=d.type==="index"||d.type==="slice"||d.type==="union"||d.type==="wildcard"?[]:{})}i=i[h]}else if(!y)continue}else if(n){let h=a[c+1];i=[];let b=p.value;for(let k=0;k<=b;k++)i.push(void 0);i[b]=h.type==="index"||h.type==="slice"||h.type==="union"||h.type==="wildcard"||r.type==="array"?[]:{},i=i[b]}else{if(p.type==="index"&&typeof i=="object"&&i&&i[String(p.value)]!==void 0){i=i[String(p.value)];continue}if(typeof i=="object"){i=Object.values(i);continue}return}break;default:return}}return No(i)}function No(e){return Array.isArray(e)?e.filter(t=>typeof t<"u"):e}var xt,W,gr,Ys,Zs,vr=R(()=>{"use strict";xt=e=>e==null||Array.isArray(e)||typeof e=="function"||e instanceof Date||e instanceof RegExp||e instanceof Map||e instanceof Set||e instanceof Error?!1:typeof e=="object",W=(e,t,r,n)=>{if(r>n)return;if(t.length===0)return e;let o=t[0],s=t.slice(1);if(o.type==="descendant"){let a=W(e,s,r+1,n);if(a!==void 0)return a;if(e&&typeof e=="object")if(Array.isArray(e)){let i=[];for(let l=0;l<e.length;l++){let u=W(e[l],t,r+1,n);u!==void 0&&(i[l]=u)}return i.length>0?i:void 0}else{let i={};for(let l in e)if(e.hasOwnProperty(l)){let u=W(e[l],t,r+1,n);u!==void 0&&(i[l]=u)}return Object.keys(i).length>0?i:void 0}return}switch(o.type){case"property":if(xt(e)&&o.value&&String(o.value)in e){let a=e[String(o.value)],i=W(a,s,r+1,n);if(i!==void 0)return{[String(o.value)]:i}}break;case"index":if(Array.isArray(e)){let a=o.value;if(a>=0&&a<e.length){let i=W(e[a],s,r+1,n);if(i!==void 0){let l=new Array(e.length).filter(u=>u!==void 0);return l[a]=i,l}}}else if(e&&typeof e=="object"){let a=String(o.value);if(a in e){let i=W(e[a],s,r+1,n);if(i!==void 0)return{[a]:i}}}break;case"wildcard":if(e&&typeof e=="object")if(Array.isArray(e)){let a=[],i=!1;for(let l=0;l<e.length;l++){let u=W(e[l],s,r+1,n);u!==void 0&&(a[l]=u,i=!0)}return i?a:void 0}else{let a={},i=!1;for(let l in e)if(e.hasOwnProperty(l)){let u=W(e[l],s,r+1,n);u!==void 0&&(a[l]=u,i=!0)}return i?a:void 0}break;case"slice":if(Array.isArray(e)){let[a,i]=o.value,l=Math.max(0,a),u=Math.min(e.length,i===1/0?e.length:i),f=[],c=!1;for(let p=l;p<u;p++){let y=W(e[p],s,r+1,n);y!==void 0&&(f[p]=y,c=!0)}return c?f:void 0}break;case"union":if(Array.isArray(e)){let a=o.value,i=[],l=!1;for(let u of a)if(u>=0&&u<e.length){let f=W(e[u],s,r+1,n);f!==void 0&&(i[u]=f,l=!0)}return l?i:void 0}break;case"filter":if(Array.isArray(e)){let a=o.value,i=[],l=!1;for(let u=0;u<e.length;u++)if(a(e[u])){let f=W(e[u],s,r+1,n);f!==void 0&&(i[u]=f,l=!0)}return l?i:void 0}break}},gr=(e,t={})=>{let{type:r="auto",throwOnError:n=!1}=t;if(!e||typeof e!="string")return[];let o=[],s="",a=!1,i=!1,l="",u="",f=0,c=r==="auto"?(y=>y.includes("..")?"descendant":y.includes("[?(")?"filter":y.includes("[:")||y.includes("[0:")?"slice":y.includes("[,")||y.includes("[0,1]")?"union":y.includes("[*]")||y.includes(".*.")?"wildcard":y.includes("[]")?"array-wildcard":y.includes("[")&&y.includes("]")?"bracket":"dot")(e):r,p=y=>{let d=y.trim();if(d==="*"||d==="")return{type:"wildcard",value:d===""?"[]":"*",raw:d===""?"[]":y};if(d==="[]")return{type:"wildcard",value:"[]",raw:y};if(/^-?\d+$/.test(d))return{type:"index",value:parseInt(d,10),raw:y};if(d.includes(":")){let h=d.split(":").map(j=>j.trim()),b=h[0]===""?0:parseInt(h[0],10),k=h[1]===""?1/0:parseInt(h[1],10);if(isNaN(b)||isNaN(k)){if(n)throw new Error(`Invalid slice notation: ${y}`);return{type:"wildcard",value:"*",raw:y}}return{type:"slice",value:[b,k],raw:y}}if(d.includes(",")){let h=d.split(",").map(b=>{let k=parseInt(b.trim(),10);return isNaN(k)?-1:k}).filter(b=>b>=0);if(h.length===0){if(n)throw new Error(`Invalid union notation: ${y}`);return{type:"wildcard",value:"*",raw:y}}return{type:"union",value:h,raw:y}}if(d.startsWith("?(")&&d.endsWith(")")){let h=d.slice(2,-1);try{return{type:"filter",value:Ys(h),raw:y}}catch(b){if(n)throw b;return{type:"wildcard",value:"*",raw:y}}}return d.startsWith('"')&&d.endsWith('"')||d.startsWith("'")&&d.endsWith("'")?{type:"property",value:d.slice(1,-1),raw:y}:{type:"property",value:d,raw:y}};for(let y=0;y<e.length;y++){let d=e[y],h=e[y+1];if((d==='"'||d==="'")&&!i){i=!0,l=d;continue}else if(d===l&&i){i=!1,l="",d==='"'||d==="'"||(a?u+=d:s+=d);continue}if(i){a?u+=d:s+=d;continue}if(d==="["&&!a){s&&(o.push({type:"property",value:s,raw:s}),s=""),a=!0,u="";continue}if(d==="]"&&a&&!i){a=!1;let k=p(u);o.push(k);continue}let b=o.length>0?o[o.length-1]:null;if(d==="."&&!a&&!i){if(h==="."){let k=e.split("..")[0];o.push({type:"property",value:k,raw:k}),o.push({type:"descendant",value:"..",raw:".."}),y++}else s&&(s==="*"?o.push({type:"wildcard",value:s,raw:s}):o.push({type:"property",value:s,raw:s}),s="");continue}if(a)u+=d;else if(b&&b.type!=="descendant")s+=d;else{let k=e.split(b?.raw)[1];k!==void 0?s=k:s+=d}}return s&&o.push({type:"property",value:s,raw:s}),o.map(y=>{if(y.type==="property"&&typeof y.value=="string"&&/^-?\d+$/.test(y.value)){let d=parseInt(y.value,10);if(!isNaN(d))return{...y,type:"index",value:d}}return y})},Ys=e=>{let t=e.replace(/@\.([a-zA-Z_$][\w$]*)/g,(r,n)=>`item.${n}`).replace(/@/g,"item");try{return new Function("item",`return ${t}`)}catch{throw new Error(`Invalid filter expression: ${e}`)}},Zs=(e,t,r)=>{let n=gr(t),o=e;for(let s=0;s<n.length;s++){let a=n[s],i=s===n.length-1;switch(a.type){case"property":if(i)o[String(a.value)]=r;else{if(!o[String(a.value)]){let u=n[s+1];o[String(a.value)]=u.type==="index"||u.type==="slice"||u.type==="union"||u.type==="wildcard"?[]:{}}o=o[String(a.value)]}break;case"index":Array.isArray(o)||(o=[]);let l=a.value;if(i){if(l>=o.length)for(let u=o.length;u<=l;u++)o.push(void 0);o[l]=r}else{if(!o[l]){let u=n[s+1];o[l]=u.type==="index"||u.type==="slice"||u.type==="union"||u.type==="wildcard"?[]:{}}o=o[l]}break;case"wildcard":if(Array.isArray(o))if(i)for(let u=0;u<o.length;u++)o[u]=r;else{let u=n[s+1];for(let f=0;f<o.length;f++)o[f]||(o[f]=u.type==="index"||u.type==="slice"||u.type==="union"||u.type==="wildcard"?[]:{});o.length>0&&(o=o[0])}break}}}});function ea(e,t,r){let n=new Uint8Array(t.length);e:for(let o=0;o<e.length;o++){for(let s=0;s<t.length;s++)if(!n[s]&&ne(e[o],t[s],r)){n[s]=1;continue e}return!1}return!0}var ne,Mo=R(()=>{"use strict";vr();ne=(e,t,r={})=>{if(e===t)return!0;if(e==null||t==null||typeof e!=typeof t)return!1;let n=Array.isArray(e),o=Array.isArray(t);if(n!==o)return!1;if(n&&o)return e.length!==t.length?!1:r.unordered?ea(e,t,r):e.every((h,b)=>ne(h,t[b],r));if(typeof e!="object")return e===t;let s=e instanceof Date,a=t instanceof Date;if(s!==a)return!1;if(s)return e.getTime()===t.getTime();let i=e instanceof RegExp,l=t instanceof RegExp;if(i!==l)return!1;if(i)return e.toString()===t.toString();let u=e instanceof Map,f=t instanceof Map;if(u!==f)return!1;if(u){if(e.size!==t.size)return!1;for(let[h,b]of e)if(!t.has(h)||!ne(b,t.get(h),r))return!1;return!0}let c=e instanceof Set,p=t instanceof Set;if(c!==p)return!1;if(c){if(e.size!==t.size)return!1;let h=[...t],b=new Uint8Array(h.length);e:for(let k of e){for(let j=0;j<h.length;j++)if(!b[j]&&ne(k,h[j],r)){b[j]=1;continue e}return!1}return!0}if(!xt(e)||!xt(t))return!1;let y=Object.keys(e),d=Object.keys(t);if(y.length!==d.length)return!1;for(let h of y)if(!Object.prototype.hasOwnProperty.call(t,h)||!ne(e[h],t[h],r))return!1;return!0}});function ta(e){return e.startsWith("//")?e.replace(/^\/+/,"/"):e}function ge(e,t,r=!1){let n=[];if(e===t)return{params:{},path:t};if(!r&&e==="/"&&t.startsWith("/"))return{params:{},path:"/"};let o=e.replace(/:([a-zA-Z0-9_]+)/g,(l,u)=>(n.push(u),"([^/]+)")).replace(/\*([a-zA-Z0-9_]*)/g,(l,u)=>(u&&n.push(u),"(.*)"));o.startsWith("/")||(o="/"+o),o===""&&(o="/");let s=new RegExp(`^${o}${r?"$":"(?=/|$)"}`),a=t.match(s);if(!a)return null;let i={};return n.forEach((l,u)=>{i[l]=a[u+1]}),{params:i,path:a[0]}}function br(e){let t=e.path.split("/").filter(Boolean);if(t.length===0)return 5;let r=0;for(let n of t)n.startsWith("*")?r+=1:n.startsWith(":")?r+=10:r+=100;return r}function Lo(e){return[...e].sort((t,r)=>br(r)-br(t))}function oe(e,t){let r=t.length>1?t.replace(/\/+$/,"")||"/":t,n=Do(e,r);if(!n)return null;let o=[],s="",a={};for(let i of n.layers){s=ta(ra(s,i.consumed));let l={};for(let[u,f]of Object.entries(i.params))u in a||(l[u]=f),a[u]=f;o.push({route:i.route,component:i.route.component,params:l,pathname:s||"/"})}return{matched:o,params:a,pathname:t}}function Do(e,t){if(!e||e.length===0)return null;let r=Lo(e);for(let n of r){let o=!!n.children&&n.children.length>0,s=ge(n.path,t,!o);if(s){if(o){let a=Do(n.children,t);if(a)return{layers:[{route:n,params:s.params,consumed:s.path},...a.layers]};continue}return{layers:[{route:n,params:s.params,consumed:s.path}]}}}return null}function ra(e,t){if(!e)return t;if(t===e)return e;if(t.startsWith(e))return t;let r=e.replace(/\/$/,""),n=t.replace(/^\//,"");return`${r}/${n}`}var wr=R(()=>{"use strict"});function Ar(e){let t=e,r="",n=t.indexOf("#");n!==-1&&(r=t.slice(n),t=t.slice(0,n));let o="",s=t.indexOf("?");return s!==-1&&(o=t.slice(s),t=t.slice(0,s)),{pathname:t||"/",search:o,hash:r}}function _e(e="/"){let t=[{path:e,state:null}],r=0,n=new Set,o=()=>n.forEach(s=>s());return{get(){let{path:s,state:a}=t[r];return{...Ar(s),state:a}},push(s,a=null){t=t.slice(0,r+1),t.push({path:s,state:a}),r=t.length-1,o()},replace(s,a=null){t[r]={path:s,state:a},o()},subscribe(s){return n.add(s),()=>n.delete(s)}}}function ie(){let e=typeof window<"u"?window:void 0,t=new Set,r=()=>t.forEach(n=>n());return e&&e.addEventListener("popstate",r),{get(){if(!e)return{pathname:"/",search:"",hash:"",state:null};let{pathname:n,search:o,hash:s}=e.location;return{pathname:n,search:o,hash:s,state:e.history.state??null}},push(n,o=null){e?.history.pushState(o,"",n),r()},replace(n,o=null){e?.history.replaceState(o,"",n),r()},subscribe(n){return t.add(n),()=>t.delete(n)}}}var xr=R(()=>{"use strict"});function na(e){let t={};return e&&new URLSearchParams(e.startsWith("?")?e.slice(1):e).forEach((n,o)=>t[o]=n),t}function oa(e,t){if(!t)return e||"/";let r=t.replace(/\/$/,"");return e===r?"/":e.startsWith(r+"/")?e.slice(r.length)||"/":e||"/"}function ia(e,t){return!t||/^https?:\/\//.test(e)?e:`${t.replace(/\/$/,"")}${e.startsWith("/")?e:"/"+e}`}function Sr(e){let{routes:t,history:r,base:n}=e,o=new Set,s=()=>{let f=r.get();return{pathname:f.pathname,search:f.search,hash:f.hash,state:f.state,query:na(f.search)}},a=f=>oe(t,oa(f,n)),i=(()=>{let f=s();return{location:f,match:a(f.pathname)}})(),l=()=>{let f=s();i={location:f,match:a(f.pathname)},o.forEach(c=>c(i))},u=r.subscribe(l);return{state(){return i},subscribe(f){return o.add(f),()=>o.delete(f)},navigate(f,c={}){let p=ia(f,n);c.replace?r.replace(p,c.state??null):r.push(p,c.state??null)},match(f){return a(f)},destroy(){u(),o.clear()}}}var Io=R(()=>{"use strict";wr();xr()});var kr=R(()=>{"use strict";wr();xr();Io()});function qo(e,t){return async(...r)=>{let n=t+":"+JSON.stringify(r);if(Po()||typeof window<"u"){let s=$o(n);if(s!==void 0)return s}if(Re.has(n))return Re.get(n);if(je.has(n))return je.get(n);let o=Promise.resolve(e(...r)).then(s=>(Re.set(n,s),je.delete(n),jo()&&Eo(n,s),s),s=>{throw je.delete(n),s});return je.set(n,o),o}}function Ho(e){let t=typeof e=="string"?r=>r.startsWith(e):e;for(let r of Re.keys())t(r)&&(Re.delete(r),aa.add(r));sa(r=>r+1)}function Fo(e,t){let[r]=J(t||(()=>!0),e);return r}function Wo(e){return Tr.has(e)||Tr.set(e,w(void 0)),Tr.get(e)}function Cr(e,t){let r=t||e.name||"action",n=async o=>{let[,s]=Wo(r),a=()=>s(void 0),i=()=>n(o);s({input:o,pending:!0,clear:a,retry:i});try{let l=await e(o);return s({input:o,result:l,pending:!1,clear:a,retry:i}),l}catch(l){throw s({input:o,error:l,pending:!1,clear:a,retry:i}),l}};return n.url=r,n.with=o=>Cr((...s)=>e(o,...s),t),n}function Vo(e){let[t]=Wo(e.url);return t}function zo(e){return e}var Re,je,Tc,sa,aa,Tr,la,Cc,Uo=R(()=>{"use strict";A();pr();ar();Re=new Map,je=new Map;[Tc,sa]=w(0),aa=new Set;Tr=new Map;la=he(),Cc=la.Provider});var Go={};Dr(Go,{A:()=>Rr,Form:()=>ba,Link:()=>kt,Outlet:()=>Pr,Redirect:()=>Er,Router:()=>Or,action:()=>Cr,cache:()=>qo,createAsync:()=>Fo,createBrowserHistory:()=>ie,createMemoryHistory:()=>_e,lazy:()=>de,matchPath:()=>ge,matchRoutes:()=>oe,preloadRoutes:()=>wa,revalidate:()=>Ho,runWithOwner:()=>_,select:()=>ha,useAction:()=>zo,useLevelParams:()=>da,useLinkNavigation:()=>ma,useLocation:()=>Le,useMatch:()=>_r,useNavigate:()=>St,useParam:()=>$r,useParamSelector:()=>ya,useParams:()=>Me,useRouteData:()=>ga,useRouter:()=>ve,useSearchParams:()=>jr,useSubmission:()=>Vo});function ua(e,t,r){let n,o=e.route.data;if(typeof o=="function"){let f=!1;x(()=>{f=!0});let c=$(),[p]=J(()=>o({params:r.params,location:r.location},c,()=>f));n=p}let s=()=>Jo.Provider({value:n,get children(){return Ko.Provider({value:e.params,get children(){return Bo.Provider({value:{depth:t,...r},get children(){return G(e.component,{})}})}})}});if(!n)return s();let a=n,i=()=>a.loading,[l,u]=w(T(()=>!i()));return S(()=>u(!i())),g(()=>l()?s():null)}function Xo(e){let t=e.depth+1,[r,n]=w(T(()=>e.matched()[t]?.component));return S(()=>{let o=e.matched()[t]?.component;n(()=>o)}),g(()=>{if(!r())return e.notFound?e.notFound():null;let s=T(()=>e.matched())[t];return ua(s,t,{matched:e.matched,params:e.params,location:e.location})})}function ca(e){return e==null?fa():typeof e=="function"?G(e,{}):e}function fa(){let e=fe("div");C(e,"class","fx-not-found"),C(e,"role","main"),C(e,"style","min-height:60vh;display:grid;place-content:center;gap:.25rem;text-align:center;font-family:system-ui,-apple-system,sans-serif");let t=fe("h1");C(t,"style","margin:0;font-size:2.5rem;font-weight:700"),H(t,"404");let r=fe("p");return C(r,"style","margin:0;opacity:.7"),H(r,"This page could not be found."),e.appendChild(t),e.appendChild(r),e}function Or(e){let t=e.history??ie(),r=Sr({routes:e.routes,base:e.base,history:t}),[n,o]=w(r.state()),s=r.subscribe(o);x(()=>{s(),r.destroy()});let a=g(()=>(n().match?.matched??[]).filter(f=>f.component)),i={router:r,location:g(()=>n().location),params:g(()=>n().match?.params??{})},l={depth:-1,matched:a,params:i.params,location:i.location,notFound:()=>ca(e.notFound)},u;return Ne.Provider({value:i,get children(){return u??=Xo(l)}})}function Pr(){let e=F(Bo);return e?Xo(e):null}function Er(e){let t=F(Ne);if(t&&typeof window<"u"){let r=!1;x(()=>r=!0),queueMicrotask(()=>{r||t.router.navigate(e.to,{replace:e.replace!==!1})})}return null}function ve(){let e=F(Ne);if(e)return e;if(typeof window>"u")return pa;throw new Error("[router-next] useRouter must be used within <Router>")}function Me(){let e=ve().params;return g(()=>e(),{},{equals:(t,r)=>JSON.stringify(t)===JSON.stringify(r)})}function da(){return F(Ko)??{}}function $r(e){let t=Me();return g(()=>t()[e])}function ya(e,t){let r=Me();return g(()=>e(r()),void 0,t?{equals:t}:void 0)}function _r(e){let t=Le();return g(()=>ge(typeof e=="function"?e():e,t.pathname))}function jr(){let e=Le(),t=St();return[g(()=>e.query),(o,s)=>{let a=new URLSearchParams(e.search);for(let[l,u]of Object.entries(o))u===null?a.delete(l):a.set(l,u);let i=a.toString();t(e.pathname+(i?`?${i}`:""),s)}]}function ha(e,t){let r=(n,o)=>ne(n,o);return t!==void 0?g(()=>At(e(),t),void 0,{equals:r}):g(e,void 0,{equals:r})}function Le(){let{location:e}=ve();return new Proxy({},{get:(t,r)=>e()[r],has:(t,r)=>r in e(),ownKeys:()=>Reflect.ownKeys(e()),getOwnPropertyDescriptor:(t,r)=>Object.getOwnPropertyDescriptor(e(),r)})}function ma(e={}){let t=F(Ne);return r=>{if(!t||r.defaultPrevented||r.button!==0||r.metaKey||r.ctrlKey||r.shiftKey||r.altKey)return;let o=r.target?.closest?.("a");if(!o||!o.getAttribute("href")||o.target&&o.target!=="_self"||o.hasAttribute("download")||/(^|\s)external(\s|$)/.test(o.getAttribute("rel")??""))return;let s=new URL(o.href);s.protocol!=="http:"&&s.protocol!=="https:"||s.origin===window.location.origin&&(s.hash&&s.pathname===window.location.pathname&&s.search===window.location.search||e.shouldNavigate&&!e.shouldNavigate(s,o)||(r.preventDefault(),t.router.navigate(s.pathname+s.search+s.hash,{replace:e.replace})))}}function St(){let{router:e}=ve();return(t,r)=>e.navigate(t,r)}function ga(){return F(Jo)??(()=>{})}function kt(e){let t=F(Ne),r=typeof document>"u",n=()=>t?.router.navigate(K(e.href)??"",{replace:K(e.replace)}),o=fe("a");C(o,"href",K(e.href)??""),e.slot&&C(o,"slot",K(e.slot));for(let a of Object.keys(e)){if(va.has(a))continue;let i=e[a];i!=null&&typeof i!="function"&&C(o,a,String(i))}if(typeof o.addEventListener=="function")o.addEventListener("click",a=>{a.metaKey||a.ctrlKey||a.shiftKey||a.altKey||(a.preventDefault(),n())});else{let a=K(e.className??e.class)??"";a&&C(o,"class",a)}typeof o.addEventListener=="function"&&S(()=>{let a=K(e.href)??"";o.setAttribute("href",a);let i=K(e.className??e.class)??"",l=K(e.activeClass)??"",u=K(e.active)??t?.location().pathname===a;o.className=[i,u?l:""].filter(Boolean).join(" ")});let s=e.children;return s!=null&&H(o,s),o}function ba(e){let t=e.action,r=e.className??e.class,n=t.url??"",o=fe("form");C(o,"method","post"),n&&C(o,"action",n),r&&C(o,"class",r);for(let a of Object.keys(e)){if(a==="action"||a==="children"||a==="class"||a==="className")continue;let i=e[a];i!=null&&typeof i!="function"&&C(o,a,String(i))}typeof o.addEventListener=="function"&&o.addEventListener("submit",a=>{a.preventDefault();let i={};new FormData(o).forEach((l,u)=>{i[u]=l}),Promise.resolve(t(i)).catch(()=>{})});let s=e.children;return s!=null&&H(o,s),o}async function wa(e,t){let r=oe(e,t);if(!r)return;let n=[];for(let o of r.matched){let s=o.component;s&&typeof s.preload=="function"&&n.push(s.preload())}await Promise.all(n)}var Ne,Bo,Ko,Jo,pa,K,va,Rr,Nr=R(()=>{"use strict";A();M();A();vr();Mo();kr();kr();Uo();mt();A();Ne=V(),Bo=V(),Ko=V(),Jo=V();pa={router:{navigate:()=>{}},location:()=>({pathname:"",search:"",hash:"",query:{}}),params:()=>({})};K=e=>typeof e=="function"?e():e,va=new Set(["href","slot","class","className","active","activeClass","replace","children"]);Rr=kt});var xa={};Dr(xa,{$component:()=>lt,A:()=>Rr,ClientOnly:()=>er,DEV:()=>Te,Dynamic:()=>ro,ErrorBoundary:()=>io,FRAMEWORK_NAME:()=>Co,For:()=>Zn,Fragment:()=>lr,Index:()=>Qn,Link:()=>kt,Match:()=>eo,NoSsr:()=>oo,Outlet:()=>Pr,Portal:()=>no,Redirect:()=>Er,Router:()=>Or,Show:()=>Yn,Store:()=>Ue,Suspense:()=>Pe,Switch:()=>to,VERSION:()=>To,addClass:()=>jn,batch:()=>N,classMap:()=>so,cleanupDelegation:()=>mo,composeProviders:()=>sr,createBrowserHistory:()=>ie,createComponent:()=>Ce,createComputed:()=>Jr,createConsumer:()=>bo,createContext:()=>he,createContextWithProvider:()=>vo,createDebounce:()=>rn,createDeferred:()=>tn,createEffect:()=>S,createIsomorphicState:()=>Ao,createMemo:()=>g,createMemoryHistory:()=>_e,createProvider:()=>gt,createRenderEffect:()=>O,createResource:()=>J,createRoot:()=>D,createSelector:()=>en,createSignal:()=>w,createStore:()=>Ht,delegateEvents:()=>te,devOnly:()=>or,getFrameworkInfo:()=>Ls,getOwner:()=>$,getSharedConfig:()=>rr,hydrate:()=>st,initDelegation:()=>ho,insert:()=>H,isDOMNode:()=>Ze,isDev:()=>nr,isLitTemplateResult:()=>Mn,isRenderable:()=>yo,jsx:()=>ur,jsxs:()=>ko,lazy:()=>de,mount:()=>Yo,onCleanup:()=>x,onMount:()=>ut,onUnmount:()=>ct,portal:()=>po,read:()=>cn,reduce:()=>un,removeClass:()=>Rn,render:()=>ye,runWithOwner:()=>_,setAttribute:()=>C,setOwner:()=>Br,setProperty:()=>ce,spread:()=>Jn,startClient:()=>Zo,styleMap:()=>ao,toggleClass:()=>Nn,untrack:()=>T,untrackStore:()=>Ft,useCallback:()=>ht,useContext:()=>me,useEffect:()=>Oe,useEventListener:()=>yt,useLocation:()=>Le,useMatch:()=>_r,useMemo:()=>ft,useNavigate:()=>St,useParam:()=>$r,useParams:()=>Me,useProvide:()=>wo,useReducer:()=>dt,useRef:()=>pt,useRouter:()=>ve,useSearchParams:()=>jr});A();A();var Ei="__fluixi_signal_next_state__",$i=e=>{typeof queueMicrotask=="function"?queueMicrotask(e):Promise.resolve().then(e)},E=globalThis[Ei]??={consumer:null,untracked:!1,owner:null,queue:[],scheduled:!1,flushing:!1,batchDepth:0,hostSchedule:$i,onSuspend:null,onError:null},sn=0,an=1,Fe=2,_i=class{constructor(){this.observers=null,this.watchers=null,this.version=0}updateIfNecessary(){}track(){if(E.untracked)return;let e=E.consumer;e&&((this.observers??=new Set).add(e),(e.sources??=new Set).add(this))}};var ji=class extends _i{constructor(e,t){super(),this._threw=!1,this._initialized=!1,this.state=Fe,this.sources=null,this._fn=e,this._equals=t?.equals===!1?()=>!1:t?.equals??Object.is}get(){if(E.consumer===this)throw new Error("Signal.Computed cannot read itself");if(this.track(),this.updateIfNecessary(),this._threw)throw this._error;return this._value}updateIfNecessary(){if(this.state===an&&this.sources){for(let e of this.sources)if(e.updateIfNecessary(),this.state===Fe)break}(this.state===Fe||!this._initialized)&&this.recompute(),this.state=sn}recompute(){if(this.sources){for(let a of this.sources)a.observers?.delete(this);this.sources.clear()}let e=E.consumer,t=E.untracked;E.consumer=this,E.untracked=!1;let r,n=!1,o;try{r=this._fn()}catch(a){n=!0,o=a,r=this._value}finally{E.consumer=e,E.untracked=t}let s=!this._initialized||this._threw!==n||(n?o!==this._error:!this._equals(this._value,r));if(this._initialized=!0,this._threw=n,this._error=o,this._value=r,s){if(this.version++,this.observers)for(let a of[...this.observers])a.markDirty(Fe);ln(this)}}markDirty(e){if(this.state>=e)return;let t=this.state===sn;if(this.state=e,t){if(this.observers)for(let r of[...this.observers])r.markDirty(an);ln(this)}}peek(){if(this.updateIfNecessary(),this._threw)throw this._error;return this._value}};function ln(e){if(e.watchers)for(let t of[...e.watchers])t._notify(e)}function Ri(e){return E.onSuspend?(E.onSuspend(e,E.owner),!0):!1}function Ni(){return E.owner}function Mi(e,t){let r=E.owner;E.owner=e;try{return t()}finally{E.owner=r}}function Li(e){E.hostSchedule=e??(t=>{Promise.resolve().then(t)})}function Di(e){return!!e&&typeof e.then=="function"}Li(()=>{});var Ii=Symbol.for("signal"),qi=Symbol.for("memo");function Hi(e,t,r){let n=t,o=Ni(),s=new ji(()=>Mi(o,()=>{try{return n=e(n)}catch(i){if(Di(i))return Ri(i),n;throw i}}),{equals:r?.equals}),a=(()=>s.get());return Object.defineProperty(a,Ii,{value:!0,enumerable:!0}),Object.defineProperty(a,qi,{value:!0,enumerable:!0}),a}function un(e,t,r,n){return Hi(()=>e().reduce(t,r),void 0,n)}function cn(e){let t=e;for(;typeof t=="function";)t=t();return t}A();var Lt=Symbol("store-raw"),fn=Symbol("store-node"),pn=Symbol("store-has"),dn=Symbol("store-self"),yn=Symbol("store-track");var hn=new WeakMap,mn=new WeakMap;function An(e){let[t,r]=w(e),n=t;return n.$=r,n}function Ve(e){let t=hn.get(e);return t||hn.set(e,t={keys:new Map}),t}function gn(e,t,r){let n=e.keys.get(t);return n||e.keys.set(t,n=An(r)),n}function vn(e){let t=Ve(e);(t.all||(t.all=An()))()}function bn(e,t){e.$(typeof t=="function"?()=>t:t)}function xn(e){if(e==null||typeof e!="object")return!1;if(Array.isArray(e))return!0;let t=Object.getPrototypeOf(e);return t===Object.prototype||t===null}function We(e){if(!xn(e))return e;let t=mn.get(e);if(t)return t;let r=new Proxy(e,Fi);return mn.set(e,r),r}var Fi={get(e,t,r){if(t===Lt||t===fn)return e;if(t===Nt)return r;if(t===pn)return a=>a in e;if(t==="__proxy")return!0;if(t===yn||t===dn)return vn(e),r;let n=e[t];if(typeof n=="function"&&!Object.prototype.hasOwnProperty.call(e,t))return n;let o=Object.getOwnPropertyDescriptor(e,t);if(o&&o.get)return o.get.call(r);let s=gn(Ve(e),t,n)();return xn(s)?We(s):s},set(){return!0},deleteProperty(e,t){return t in e&&Se(e,t,void 0),!0},has(e,t){return t===Lt||t===Nt||t===fn||t===pn||t===dn||t===yn?!0:(gn(Ve(e),t,e[t])(),t in e)},ownKeys(e){return vn(e),Reflect.ownKeys(e)},getOwnPropertyDescriptor(e,t){return Reflect.getOwnPropertyDescriptor(e,t)}};function Se(e,t,r){if(e[t]===r&&(r!==void 0||t in e))return;let n=Array.isArray(e),o=n?e.length:0;r===void 0?delete e[t]:e[t]=r;let s=Ve(e),a=s.keys.get(t);if(a&&bn(a,r),n&&e.length!==o){let i=s.keys.get("length");i&&bn(i,e.length)}s.all&&s.all.$(void 0)}function wn(e,t){return typeof e=="function"?e(t):e}function Dt(e,t){for(let r of Object.keys(t)){let n=t[r],o=e[r];n&&typeof n=="object"&&!Array.isArray(n)&&o&&typeof o=="object"&&!Array.isArray(o)?Dt(o,n):Se(e,r,n)}}function qt(e){let t=[],r=e.replace(/\[([^\]]*)\]/g,".$1");for(let n of r.split("."))n.length&&t.push(n);return t}function Sn(e,t,r){let n=t.length-1;for(let s=0;s<n;s++){let a=t[s];if(a==="*"){let l=t.slice(s+1);if(Array.isArray(e))for(let u=0;u<e.length;u++)Sn(e[u],l,r);return}let i=e[a];(i==null||typeof i!="object")&&(i=/^\d+$/.test(t[s+1])?[]:{},Se(e,a,i)),e=i}let o=t[n];if(o==="*"){if(Array.isArray(e))for(let s=0;s<e.length;s++)Se(e,s,wn(r,e[s]));return}Se(e,o,wn(r,e[o]))}function Mt(e,t,r){Sn(e,qt(t),r)}function Wi(e,t){let r=t[0];if(typeof r=="function"&&t.length===1){let n=r(e);n&&n!==e&&Dt(e,n);return}if(Array.isArray(r)&&t.length===1){for(let n of r)Array.isArray(n)&&Mt(e,n[0],n[1]);return}if(r&&typeof r=="object"&&!Array.isArray(r)&&t.length===1){Dt(e,r);return}if(Array.isArray(t[1])&&t.length>=3){Mt(e,`${r}.${t[1].join(".")}`,t[2]);return}Mt(e,String(r),t[1])}function It(e){if(e==null||typeof e!="object")return e;if(Array.isArray(e))return e.map(It);let t={};for(let r of Object.keys(e))t[r]=It(e[r]);return t}function ue(e,t){let r=e;for(let n of qt(t)){if(r==null)return;r=r[n]}return r}var Ue=class{constructor(e,t={immutable:!0}){this.options=t,this.root=e,this.set=((...r)=>N(()=>Wi(this.root,r)))}get state(){return We(this.root)}get proxy(){return We(this.root)}get accessor(){return(()=>We(this.root))}unwrap(){return this.root}getNode(e){return this.root&&this.root[e]}get(e){if(e==null||e==="")return ze(this.state);let t=this.state;for(let r of qt(e)){if(t==null)return;t=t[r]}return ze(t)}select(e){return g(()=>e(this.state))}subscribe(e){return S(()=>e(this.state))}watch(e,t){let r;return S(()=>{let n=e(this.state);Object.is(n,r)||(t(n,r),r=n)})}reactive(e){return g(()=>this.state[e])}produce(e){this.set((t=>{let r=It(t);return e(r),r}))}reconcile(e,t={}){this.set(e)}push(e,...t){let r=ue(this.root,e);this.set(e,r.concat(t))}pop(e){let t=ue(this.root,e).slice(),r=t.pop();return this.set(e,t),r}shift(e){let t=ue(this.root,e).slice(),r=t.shift();return this.set(e,t),r}splice(e,t,r,...n){let o=ue(this.root,e).slice(),s=o.splice(t,r,...n);return this.set(e,o),s}insert(e,t,r){let n=ue(this.root,e).slice();n.splice(t,0,r),this.set(e,n)}removeAt(e,t){let r=ue(this.root,e).slice(),n=r.splice(t,1);return this.set(e,r),n}toObservable(){let[e]=w(this.state);return e.toObservable()}dispose(){}},Vi=["get","select","watch","subscribe","produce","reconcile","push","pop","shift","splice","insert","removeAt","unwrap","toObservable"];function zi(e,t){for(let r of Vi)e[r]=t[r].bind(t);e.$=t.reactive.bind(t)}function Ht(e,t={immutable:!0}){let r=new Ue(e,t);return zi(r.set,r),[r.proxy,r.set]}function Ui(e,t={}){return new Ue(e,{...t,immutable:!1})}function ze(e){if(e==null||typeof e!="object")return e;let t=e[Lt];return t!==void 0?t:e}function Ft(e){return T(()=>ze(e))}var Na=Object.freeze({createStore:Ht,createMutableStore:Ui,batch:N,unwrap:ze,untrackStore:Ft});A();M();var lo="1.0.0-alpha.78";M();Ln(lo);M();pe();pe();A();M();function fo(e){return!!(e&&typeof e=="object"&&typeof e.then=="function"||e instanceof Promise)}var Os=V();function Pe(e){return G(Ps,e)}function Ps(e){let t=on(),r=F(Os),n=r?r.register(t.inFallback):void 0;function o(c){return c==null||typeof c=="boolean"?null:typeof c=="function"&&B(c)&&!P(c)?c():c}let s=Vn(()=>o(e.fallback??null)),a=Rt(t,()=>Q(()=>e.children)),i=(c,p)=>{if(!(p>8))if(Array.isArray(c))for(let y of c)i(y,p+1);else typeof c=="function"&&P(c)&&i(c(),p+1)};Rt(t,()=>{O(()=>i(a,0))});let[l,u]=w(void 0),f=fo(a);return f&&(t.increment(),a.then(c=>{u(()=>c),t.decrement()},()=>t.decrement())),g(()=>{let c=n?n.showFallback():t.inFallback();return process.env.FX_DEBUG&&console.log("[s] output; showFallback:",c),c?s:f?l():a})}In(Pe);Object.defineProperty(Pe,"__suspense",{value:!0,enumerable:!0});mt();mt();var ir=typeof window>"u";function ye(e,t,r={}){if(Y("render"),te(["click","input","change","submit"]),ir)throw new Error("render() is for client-side only. Use renderToString() on server.");if(!t)throw new Error("Container element is required");let n;return D(o=>{n=o;let s=typeof e=="function"?e():e;t.textContent="",Qe(t),et(),H(t,()=>s)}),()=>{n&&(n(),n=void 0)}}function Es(e){return e&&typeof e=="object"&&(e._$litType$!==void 0||e._$litDirective$!==void 0)}function po(e,t,r={}){let n=document.createElement("div");n.setAttribute("data-portal","true"),t.appendChild(n);let o=ye(e,n,r);return()=>{o(),t.contains(n)&&t.removeChild(n)}}function yo(e){return!!(e==null||typeof e=="function"||Ze(e)||Es(e)||Array.isArray(e)||typeof e=="string"||typeof e=="number"||typeof e=="boolean")}function ho(){ir||te(["click","input","change","submit"])}function mo(){}ar();A();M();var _s="__fluixi_iso_states__",js="__iso:";function Rs(){return globalThis[_s]??=new Map}function Ns(e){if(typeof window>"u")return;let t=Qt();return t?t[js+e]:void 0}function Ao(e,t){let r=Ns(e),n=r!==void 0?r:typeof window<"u"&&t.client?t.client():t.fallback,[o,s]=w(n);return Rs().set(e,{server:t.server,set:s}),{value:o,set:s,key:e}}M();M();M();M();M();A();var lr=Symbol.for("fluixi.fragment"),xo=typeof window>"u";function So(e){return e==null||e===!1?null:Array.isArray(e)?e.map(So).flat():e}function ur(e,t,r){if(e==null)return null;let n=t||{};if(r!==void 0&&(n.key=r),e===lr)return g(()=>tt(So(n.children)));if(typeof e=="function"){let{type:o}=qn(e);return e.$$typeof===Symbol.for("react.provider")||o==="provider"?e(n):xo?{type:e,props:n}:g(()=>G(e,n),void 0,{name:"jsx component"})}return typeof e=="string"&&e.trim().length>0?Ms(e,n):null}var ko=ur;function Ms(e,t){return xo?{type:e,props:t||{}}:Gn(e,t)}pe();var To="0.0.1",Co="Fluixi";function Ls(){return{name:Co,version:To,features:{ssr:!0,hydration:!0,jsx:!0,litHtml:!0,signals:!0,fineGrained:!0,lazy:!0,hooks:!0,devMode:!0}}}Y("index");M();pr();pe();A();function re(e){return typeof e=="function"?e():e}function Is(e){if(typeof e=="string")return e;let t=[];return t.push(e.index===!1?"noindex":"index"),t.push(e.follow===!1?"nofollow":"follow"),e.noarchive&&t.push("noarchive"),e.nosnippet&&t.push("nosnippet"),e.noimageindex&&t.push("noimageindex"),e.maxSnippet!=null&&t.push(`max-snippet:${e.maxSnippet}`),e.maxImagePreview&&t.push(`max-image-preview:${e.maxImagePreview}`),e.maxVideoPreview!=null&&t.push(`max-video-preview:${e.maxVideoPreview}`),t.join(", ")}function dr(){let e=[],[t,r]=w(0);return{sources:e,version:t,push(n){return e.push(n),r(o=>o+1),()=>{let o=e.indexOf(n);o!==-1&&(e.splice(o,1),r(s=>s+1))}}}}var qs=null;function yr(e){qs=e}function bt(e){let t=5381;for(let r=0;r<e.length;r++)t=t*33^e.charCodeAt(r);return(t>>>0).toString(36)}function Hs(e){return e.charset!=null?"meta:charset":e.property?"meta:property:"+e.property:e.name?"meta:name:"+e.name:e["http-equiv"]?"meta:http-equiv:"+e["http-equiv"]:"meta:"+bt(JSON.stringify(e))}function Fs(e,t){let r=typeof t=="string"?{url:t}:t;e.push({tag:"meta",key:"meta:property:og:image:"+r.url,attrs:{property:"og:image",content:r.url}}),r.secureUrl&&e.push({tag:"meta",key:"meta:property:og:image:secure:"+r.url,attrs:{property:"og:image:secure_url",content:r.secureUrl}}),r.type&&e.push({tag:"meta",key:"meta:property:og:image:type:"+r.url,attrs:{property:"og:image:type",content:r.type}}),r.width!=null&&e.push({tag:"meta",key:"meta:property:og:image:width:"+r.url,attrs:{property:"og:image:width",content:String(r.width)}}),r.height!=null&&e.push({tag:"meta",key:"meta:property:og:image:height:"+r.url,attrs:{property:"og:image:height",content:String(r.height)}}),r.alt&&e.push({tag:"meta",key:"meta:property:og:image:alt:"+r.url,attrs:{property:"og:image:alt",content:r.alt}})}function Ws(e,t){let r=(n,o)=>{o!=null&&t.push({tag:"meta",key:"meta:property:og:"+n,attrs:{property:"og:"+n,content:o}})};r("title",e.title),r("description",e.description),r("type",e.type),r("url",e.url),r("site_name",e.siteName),r("locale",e.locale);for(let n of e.localeAlternate??[])t.push({tag:"meta",key:"meta:property:og:locale:alt:"+n,attrs:{property:"og:locale:alternate",content:n}});if(e.image!=null){let n=Array.isArray(e.image)?e.image:[e.image];for(let o of n)Fs(t,o)}if(e.video){let n=typeof e.video=="string"?{url:e.video}:e.video;r("video",n.url),"type"in n&&n.type&&r("video:type",n.type),"width"in n&&n.width!=null&&r("video:width",String(n.width)),"height"in n&&n.height!=null&&r("video:height",String(n.height))}if(e.audio){let n=typeof e.audio=="string"?{url:e.audio}:e.audio;r("audio",n.url),"type"in n&&n.type&&r("audio:type",n.type)}if(e.article){let n=e.article;r("article:published_time",n.publishedTime),r("article:modified_time",n.modifiedTime),r("article:expiration_time",n.expirationTime),r("article:section",n.section);for(let o of[].concat(n.author??[]))t.push({tag:"meta",key:"meta:property:og:article:author:"+o,attrs:{property:"article:author",content:o}});for(let o of[].concat(n.tag??[]))t.push({tag:"meta",key:"meta:property:og:article:tag:"+o,attrs:{property:"article:tag",content:o}})}if(e.book){let n=e.book;r("book:isbn",n.isbn),r("book:release_date",n.releaseDate);for(let o of[].concat(n.author??[]))t.push({tag:"meta",key:"meta:property:og:book:author:"+o,attrs:{property:"book:author",content:o}});for(let o of[].concat(n.tag??[]))t.push({tag:"meta",key:"meta:property:og:book:tag:"+o,attrs:{property:"book:tag",content:o}})}if(e.profile){let n=e.profile;r("profile:first_name",n.firstName),r("profile:last_name",n.lastName),r("profile:username",n.username),r("profile:gender",n.gender)}}function Vs(e,t){let r=(n,o)=>{o!=null&&t.push({tag:"meta",key:"meta:name:twitter:"+n,attrs:{name:"twitter:"+n,content:o}})};r("card",e.card),r("site",e.site),r("creator",e.creator),r("title",e.title),r("description",e.description),r("image",e.image),r("image:alt",e.imageAlt),r("player",e.player),e.playerWidth!=null&&r("player:width",String(e.playerWidth)),e.playerHeight!=null&&r("player:height",String(e.playerHeight)),e.app&&(r("app:name:iphone",e.app.name),r("app:id:iphone",e.app.idIphone),r("app:id:ipad",e.app.idIpad),r("app:id:googleplay",e.app.idGooglePlay))}function zs(e,t){let r=(n,o)=>t.push({tag:"link",key:n,attrs:o});if(e.icon!=null){let n=typeof e.icon=="string"?[{url:e.icon}]:e.icon;for(let o of n)r("link:icon:"+o.url,{rel:"icon",href:o.url,...o.type?{type:o.type}:{},...o.sizes?{sizes:o.sizes}:{}})}if(e.apple!=null){let n=typeof e.apple=="string"?[{url:e.apple}]:e.apple;for(let o of n)r("link:apple-touch-icon:"+o.url,{rel:"apple-touch-icon",href:o.url,...o.sizes?{sizes:o.sizes}:{}})}e.mask&&r("link:mask-icon",{rel:"mask-icon",href:e.mask.url,...e.mask.color?{color:e.mask.color}:{}}),e.shortcut&&r("link:shortcut",{rel:"shortcut icon",href:e.shortcut}),e.msTileImage&&t.push({tag:"meta",key:"meta:name:msapplication-TileImage",attrs:{name:"msapplication-TileImage",content:e.msTileImage}}),e.msTileColor&&t.push({tag:"meta",key:"meta:name:msapplication-TileColor",attrs:{name:"msapplication-TileColor",content:e.msTileColor}})}function Us(e,t,r){let n=(c,p)=>t.push({tag:"meta",key:c,attrs:p}),o=re(e.title);o!==void 0&&(r.title=o),e.titleTemplate!==void 0&&(r.template=e.titleTemplate);let s=re(e.lang);s!==void 0&&t.push({tag:"htmlAttr",key:"html:lang",name:"lang",value:s}),e.charset!==void 0&&n("meta:charset",{charset:e.charset}),e.viewport!==void 0&&n("meta:name:viewport",{name:"viewport",content:e.viewport});let a=re(e.description);a!==void 0&&n("meta:name:description",{name:"description",content:a});let i=re(e.keywords);i!==void 0&&n("meta:name:keywords",{name:"keywords",content:Array.isArray(i)?i.join(", "):i}),e.author!==void 0&&n("meta:name:author",{name:"author",content:e.author}),e.robots!==void 0&&n("meta:name:robots",{name:"robots",content:Is(e.robots)}),e.generator!==void 0&&n("meta:name:generator",{name:"generator",content:e.generator}),e.applicationName!==void 0&&n("meta:name:application-name",{name:"application-name",content:e.applicationName}),e.referrer!==void 0&&n("meta:name:referrer",{name:"referrer",content:e.referrer}),e.colorScheme!==void 0&&n("meta:name:color-scheme",{name:"color-scheme",content:e.colorScheme});let l=re(e.themeColor);l!==void 0&&n("meta:name:theme-color",{name:"theme-color",content:l});let u=re(e.canonical);if(u!==void 0&&t.push({tag:"link",key:"link:rel:canonical",attrs:{rel:"canonical",href:u}}),e.manifest!==void 0&&t.push({tag:"link",key:"link:rel:manifest",attrs:{rel:"manifest",href:e.manifest}}),e.base!==void 0&&t.push({tag:"base",key:"base",attrs:{href:e.base}}),e.verification){let c={google:"google-site-verification",bing:"msvalidate.01",yandex:"yandex-verification",pinterest:"p:domain_verify"};for(let[p,y]of Object.entries(e.verification)){if(y==null)continue;let d=c[p]??p;n("meta:name:"+d,{name:d,content:y})}}for(let c of e.alternates??[])t.push({tag:"link",key:"link:alternate:hreflang:"+c.hreflang,attrs:{rel:"alternate",hreflang:c.hreflang,href:c.href}});for(let c of e.feeds??[])t.push({tag:"link",key:"link:alternate:feed:"+c.href,attrs:{rel:"alternate",type:c.type??"application/rss+xml",href:c.href,...c.title?{title:c.title}:{}}});e.og&&Ws(e.og,t),e.twitter&&Vs(e.twitter,t),e.icons&&zs(e.icons,t);let f=re(e.jsonLd);if(f!==void 0){let c=Array.isArray(f)?f:[f];for(let p of c){let y=JSON.stringify(p);t.push({tag:"script",key:"script:ldjson:"+bt(y),attrs:{type:"application/ld+json"},children:y})}}for(let c of e.meta??[]){let p={};for(let[y,d]of Object.entries(c))d!=null&&(p[y==="httpEquiv"?"http-equiv":y]=d);t.push({tag:"meta",key:Hs(p),attrs:p})}for(let c of e.link??[]){let p={};for(let[y,d]of Object.entries(c))d!=null&&(p[y]=d);t.push({tag:"link",key:"link:"+(p.rel??"")+":"+(p.href??bt(JSON.stringify(p))),attrs:p})}for(let c of e.script??[]){let p={},y;for(let[d,h]of Object.entries(c))h!=null&&(d==="children"?y=h:p[d]=h);t.push({tag:"script",key:"script:"+(p.src??bt((y??"")+JSON.stringify(p))),attrs:p,children:y})}}function Bs(e,t){return typeof e=="function"?e(t):e.includes("%s")?e.replace("%s",t):e}function wt(e){let t=[],r={};for(let s of e.sources){let a=typeof s=="function"?s():s;Us(a,t,r)}r.title!==void 0&&t.push({tag:"title",key:"title",children:r.template?Bs(r.template,r.title):r.title});let n=new Map,o={};for(let s of t){if(s.tag==="htmlAttr"){o[s.name]=s.value;continue}n.set(s.key,s)}return{tags:[...n.values()],htmlAttrs:o}}var Ee="data-fh",$e="data-fh-key";function hr(e){for(let t=e.firstChild;t;t=t.nextSibling)if(t.nodeType===8&&t.data.startsWith("fh:")){t.parentNode?.removeChild(t);return}}A();function Ro(e,t){for(let r of Array.from(e.attributes))r.name===Ee||r.name===$e||r.name in t||e.removeAttribute(r.name);for(let[r,n]of Object.entries(t))e.getAttribute(r)!==n&&e.setAttribute(r,n)}function Ks(e){let t=document.createElement(e.tag);return Ro(t,e.attrs),t.setAttribute(Ee,""),t.setAttribute($e,e.key),e.tag==="script"&&e.children!=null&&(t.textContent=e.children),t}function Js(e,t){let r=document.head,n=new Map;for(let a of Array.from(r.querySelectorAll(`[${Ee}]`))){let i=a.getAttribute($e);a.tagName!=="TITLE"&&i&&n.set(i,a)}let o=null,s=new Set;for(let a of e){if(a.tag==="title"){o=a.children;continue}if(a.tag==="htmlAttr")continue;s.add(a.key);let i=n.get(a.key);i&&i.tagName===a.tag.toUpperCase()?(Ro(i,a.attrs),a.tag==="script"&&(i.textContent??"")!==(a.children??"")&&(i.textContent=a.children??"")):(i&&i.remove(),r.appendChild(Ks(a)))}for(let[a,i]of n)s.has(a)||i.remove();o!=null&&document.title!==o&&(document.title=o);for(let[a,i]of Object.entries(t))document.documentElement.getAttribute(a)!==i&&document.documentElement.setAttribute(a,i)}function mr(e){return D(t=>(S(()=>{e.version();let{tags:r,htmlAttrs:n}=wt(e);Js(r,n)}),x(()=>{}),t))}Y("client index");function Yo(e,t){if(!t)throw new Error("Container element not found for mount()");Zt(()=>e(),t)}async function Zo(e,t={}){let r=typeof t.root=="string"?document.querySelector(t.root):t.root??document.querySelector("#app");if(!r)throw new Error(`[Fluixi] Mount container not found: ${t.root??"#app"}`);let n=!!document.getElementById("__FLUIXI_HYDRATION__")||!!t.routes&&r.firstElementChild!=null,o=t.hydrate??n,s=dr();if(yr(s),hr(r),o){if(t.routes&&t.routes.length){let{preloadRoutes:a}=await Promise.resolve().then(()=>(Nr(),Go));await a(t.routes,window.location.pathname)}_o(),cr(!0),st(()=>e(),r),Aa(),setTimeout(()=>{cr(!1),fr()},100)}else ye(()=>e(),r);mr(s)}function Aa(){if(typeof window>"u")return;let e=window;typeof e.__FX_REPLAY_STOP__=="function"&&e.__FX_REPLAY_STOP__();let t=e.__FX_REPLAY__;if(e.__FX_REPLAY__=void 0,e.__FX_REPLAY_STOP__=void 0,!(!Array.isArray(t)||t.length===0))for(let r of t){let n=r&&r.target;if(!n||n.isConnected===!1||typeof n.dispatchEvent!="function")continue;let o=r.type,s=o==="click"?new MouseEvent(o,{bubbles:!0,cancelable:!0}):new Event(o,{bubbles:!0,cancelable:!0});n.dispatchEvent(s)}}Nr();return oi(xa);})();
|
|
1
|
+
"use strict";var Fluixi=(()=>{var Et=Object.defineProperty;var Ti=Object.getOwnPropertyDescriptor;var _i=Object.getOwnPropertyNames;var Pi=Object.prototype.hasOwnProperty;var N=(e,t)=>()=>(e&&(t=e(e=0)),t);var Ur=(e,t)=>{for(var r in t)Et(e,r,{get:t[r],enumerable:!0})},Ei=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of _i(t))!Pi.call(e,o)&&o!==r&&Et(e,o,{get:()=>t[o],enumerable:!(n=Ti(t,o))||n.enumerable});return e};var $i=e=>Ei(Et({},"__esModule",{value:!0}),e);function jt(e){if(e.watchers)for(let t of[...e.watchers])t._notify(e)}function Li(e){if(m.untracked)return e();m.untracked=!0;try{return e()}finally{m.untracked=!1}}function ae(e){let t=Se(e);return e&&(e.owned??=[]).push(t),t}function le(e,t=!0){xe(e,t)}function Zr(e){return!!e&&e.disposed===!0}function Se(e){return{cleanups:null,owned:null,parent:e,contexts:null}}function W(e){let t=Symbol("context");return{id:t,defaultValue:e,Provider:r=>{let n=m.owner,o=Se(n);(o.contexts=new Map).set(t,r.value),n&&(n.owned??=[]).push(o),m.owner=o;try{return r.children}finally{m.owner=n}}}}function H(e){let t=m.owner;for(;t;){if(t.contexts&&t.contexts.has(e.id))return t.contexts.get(e.id);t=t.parent}return e.defaultValue}function Qr(e,t){let r=e;for(;r;){if(r.contexts&&r.contexts.has(t.id))return r.contexts.get(t.id);r=r.parent}return t.defaultValue}function Di(e,t,r){let n=Se(m.owner);(n.contexts=new Map).set(e.id,t),m.owner&&(m.owner.owned??=[]).push(n);let o=m.owner;m.owner=n;try{return r()}finally{m.owner=o}}function Ii(e){m.onSuspend=e}function qi(e){return m.onSuspend?(m.onSuspend(e,m.owner),!0):!1}function Fi(e){m.onError=e}function $(){return m.owner}function en(e){let t=m.owner;return m.owner=e,t}function j(e,t){let r=m.owner;m.owner=e;try{return t()}finally{m.owner=r}}function x(e){if(m.owner){if(m.owner.disposed){e();return}(m.owner.cleanups??=[]).push(e)}}function xe(e,t=!0){if(!e.disposed){if(e.owned){for(let r=e.owned.length-1;r>=0;r--)xe(e.owned[r]);e.owned=null}if(e.cleanups){for(let r=e.cleanups.length-1;r>=0;r--)e.cleanups[r]();e.cleanups=null}t&&(e.disposed=!0)}}function D(e){let t=Se(m.owner);m.owner&&(m.owner.owned??=[]).push(t);let r=m.owner;m.owner=t;try{return e(()=>xe(t))}finally{m.owner=r}}function Hi(e){m.hostSchedule=e??(t=>{Promise.resolve().then(t)})}function Vi(e){e.queued||(e.queued=!0,m.queue.push(e),!m.scheduled&&m.batchDepth===0&&(m.scheduled=!0,m.hostSchedule(Mt)))}function Mt(){if(m.scheduled=!1,m.flushing)return;m.flushing=!0;let e=0;try{for(;m.queue.length;){if(++e>1e5)throw new Error("[fluixi] effect flush did not settle (cycle?)");let t=m.queue;m.queue=[];for(let r of t)r.queued=!1,r.disposed||r.run()}}finally{m.flushing=!1}}function Wi(){m.batchDepth===0&&Mt()}function zi(e){m.batchDepth++;try{return e()}finally{--m.batchDepth===0&&Mt()}}function Lt(e){let t=new Ui(e);return()=>t.dispose()}function Bi(e){return!!e&&typeof e.then=="function"}function v(e,t){let r=new Ni(e,{equals:t?.equals}),n=(()=>r.get()),o=(i=>{let a=typeof i=="function"?i(r.peek()):i;return r.set(a),Wi(),a});return Object.defineProperty(n,tn,{value:!0,enumerable:!0}),Object.defineProperty(n,Ji,{value:{get value(){return r.peek()},get version(){return r.version}},enumerable:!1}),[n,o]}function g(e,t,r){let n=t,o=$(),i=new Yr(()=>j(o,()=>{try{return n=e(n)}catch(s){if(Bi(s))return qi(s),n;throw s}}),{equals:r?.equals}),a=(()=>i.get());return Object.defineProperty(a,tn,{value:!0,enumerable:!0}),Object.defineProperty(a,Ki,{value:!0,enumerable:!0}),a}function S(e,t){let r=t;return Lt(()=>{r=e(r)})}function rn(e,t){let r=t;Lt(()=>{r=e(r)})}function T(e,t){let r=t;return Lt(()=>{r=e(r)})}function _(e){return zi(e)}function O(e){return Li(e)}function nn(e,t,r){let n=[];return x(()=>{for(let o of n)o.dispose();n=[]}),g(()=>{let o=e()||[];return O(()=>{if(o.length===0){for(let l of n)l.dispose();return n=[],r?.fallback?r.fallback():[]}let i=new Map;for(let l of n)i.has(l.item)||i.set(l.item,l);let a=[],s=new Set;for(let l=0;l<o.length;l++){let u=o[l],f=i.get(u);if(f&&!s.has(f))f.setIndex(l),a.push(f),s.add(f);else{let c,p,h;D(y=>{h=y;let[w,k]=v(l);p=k,c=t(u,w)});let d={item:u,rendered:c,dispose:h,setIndex:p};a.push(d),s.add(d)}}for(let l of n)s.has(l)||l.dispose();return n=a,a.map(l=>l.rendered)})})}function on(e,t,r,n){let o=[],i=[];return x(()=>{for(let a of i)a.dispose();o=[],i=[]}),g(()=>{let a=e()||[];return O(()=>{if(a.length===0){for(let c of i)c.dispose();return o=[],i=[],n?.fallback?n.fallback():[]}let s=new Map;for(let c=0;c<o.length;c++)s.set(o[c],i[c]);let l=[],u=[],f=new Set;for(let c=0;c<a.length;c++){let p=t(a[c]),h=s.get(p);if(h&&!f.has(p))h.setIndex(c),l.push(h);else{let d,y,w;D(k=>{w=k;let[R,we]=v(c);y=we;let qe=g(se=>(e()||[])[R()]??se,a[c]);d=r(qe,R)}),l.push({rendered:d,dispose:w,setIndex:y})}u.push(p),f.add(p)}for(let[c,p]of s)f.has(c)||p.dispose();return o=u,i=l,l.map(c=>c.rendered)})})}function sn(e,t,r){let n=[];return x(()=>{for(let o of n)o.dispose();n=[]}),g(()=>{let o=e()||[];return O(()=>{if(o.length===0){for(let l of n)l.dispose();return n=[],r?.fallback?r.fallback():[]}let i=n.length,a=o.length;for(let l=i;l<a;l++){let u,f,c,p=o[l];D(h=>{c=h;let[d,y]=v(p);f=y,u=t(d,l)}),n.push({rendered:u,setItem:f,dispose:c})}for(let l=a;l<i;l++)n[l].dispose();a<i&&(n=n.slice(0,a));let s=Math.min(i,a);for(let l=0;l<s;l++)n[l].setItem(o[l]);return n.map(l=>l.rendered)})})}function P(e){return typeof e=="function"&&e[Yi]===!0}function Zi(e){Jr&&Jr(e)}function an(e){Rt=e}function Qi(e){return Rt?Rt(e):void 0}function ln(e){Nt=e}function es(){return Nt?Nt():void 0}function ts(e,t){Xr&&Xr(e,t)}function un(e,t=(r,n)=>r===n){let r=new Map;return S(()=>{let n=e();for(let[o,i]of r){let[a,s]=i,l=t(o,n);a()!==l&&s(l)}}),n=>{let o=r.get(n);if(!o){let[i,a]=v(!1);o=[i,a],r.set(n,o);let s=e();a(t(n,s))}return o[0]()}}function cn(e,t){let[r,n]=v(e(),t);return S(()=>{let o=e();t?.timeoutMs?setTimeout(()=>n(()=>o),t.timeoutMs):typeof requestIdleCallback=="function"?requestIdleCallback(()=>n(()=>o)):Promise.resolve().then(()=>n(()=>o))}),r}function fn(e,t){let r,n=(...o)=>{r!==void 0&&clearTimeout(r),r=setTimeout(()=>{r=void 0,e(...o)},t)};return x(()=>{r!==void 0&&clearTimeout(r)}),n}function rs(e){return!!e&&typeof e.then=="function"}function G(e,t,r={}){let n,o;typeof t=="function"?(n=typeof e=="function"?e:()=>e,o=t):(n=()=>!0,o=e,t&&typeof t=="object"&&(r=t));let i=r.transport===!1?void 0:es(),a=i!==void 0?Qi(i):void 0,s=a!==void 0,[l,u]=v(a!==void 0?a.value:r.initialValue,{equals:!1}),[f,c]=v(void 0,{equals:!1}),[p,h]=v(a!==void 0||r.initialValue!==void 0?"ready":"unresolved",{equals:!1}),[d,y]=v(void 0,{equals:!1}),[w,k]=v(void 0,{equals:!1}),R=$t,we=!1;S(()=>{let L=n();if(w(),L===!1||L===null||L===void 0){R=$t,_(()=>{h("unresolved"),y(void 0),c(void 0)});return}let Fe=we;if(we=!1,R!==$t&&L===R&&!Fe)return;if(R=L,s){s=!1;return}let He=!1;x(()=>He=!0);let Wr=O(p),Ci=O(l),zr=Wr==="ready"||Wr==="refreshing";_(()=>{h(zr?"refreshing":"pending"),c(void 0)});try{let Z=o(L,{value:Ci,refetching:zr});rs(Z)?(y(Z),Zi(Z),Z.then(Ve=>{He||(i!==void 0&&ts(i,Ve),_(()=>{u(()=>Ve),h("ready"),y(void 0)}))},Ve=>{He||_(()=>{c(Ve),h("errored"),y(void 0)})})):_(()=>{u(()=>Z),h("ready"),y(void 0)})}catch(Z){if(He)return;_(()=>{c(Z),h("errored"),y(void 0)})}});let qe=()=>{let L=p();return L==="pending"||L==="refreshing"},se=(()=>{let L=f();if(L)throw L;if(qe()){let Fe=d();if(Fe)throw Fe}return l()});return Object.defineProperties(se,{state:{get:p},loading:{get:qe},error:{get:f},latest:{get:l}}),Object.defineProperty(se,Symbol.for("resource"),{value:!0,enumerable:!0}),Object.defineProperty(se,Symbol.for("signal"),{value:!0,enumerable:!0}),[se,{mutate:u,refetch:()=>{we=!0,k(void 0)}}]}function We(e){if(typeof e=="function"&&!e.length){let t=e();return P(t)?t:We(t)}if(Array.isArray(e)){let t=[];for(let r=0;r<e.length;r++){let n=We(e[r]);Array.isArray(n)?t.push.apply(t,n):t.push(n)}return t}return e}function Q(e){let t=g(e);return Gi?g(()=>We(t()),void 0,{name:"children"}):g(()=>We(t()))}function dn(){let[e,t]=v(0),r=0;return{increment:()=>t(r+=1),decrement:()=>t(r-=1),inFallback:()=>e()>0}}function Dt(e,t){return Di(pn,e,t)}var ji,Ri,m,Br,Kr,Ae,Gr,Ni,Yr,Mi,Ui,tn,Ki,Ji,Xi,Gi,Yi,Jr,Rt,Nt,Xr,$t,pn,ns,ue,A=N(()=>{"use strict";ji="__fluixi_signal_next_state__",Ri=e=>{typeof queueMicrotask=="function"?queueMicrotask(e):Promise.resolve().then(e)},m=globalThis[ji]??={consumer:null,untracked:!1,owner:null,queue:[],scheduled:!1,flushing:!1,batchDepth:0,hostSchedule:Ri,onSuspend:null,onError:null},Br=0,Kr=1,Ae=2,Gr=class{constructor(){this.observers=null,this.watchers=null,this.version=0}updateIfNecessary(){}track(){if(m.untracked)return;let e=m.consumer;e&&((this.observers??=new Set).add(e),(e.sources??=new Set).add(this))}},Ni=class extends Gr{constructor(e,t){super(),this._value=e,this._equals=t?.equals===!1?()=>!1:t?.equals??Object.is}get(){return this.track(),this._value}set(e){if(!this._equals(this._value,e)){if(this._value=e,this.version++,this.observers)for(let t of[...this.observers])t.markDirty(Ae);jt(this)}}peek(){return this._value}},Yr=class extends Gr{constructor(e,t){super(),this._threw=!1,this._initialized=!1,this.state=Ae,this.sources=null,this._fn=e,this._equals=t?.equals===!1?()=>!1:t?.equals??Object.is}get(){if(m.consumer===this)throw new Error("Signal.Computed cannot read itself");if(this.track(),this.updateIfNecessary(),this._threw)throw this._error;return this._value}updateIfNecessary(){if(this.state===Kr&&this.sources){for(let e of this.sources)if(e.updateIfNecessary(),this.state===Ae)break}(this.state===Ae||!this._initialized)&&this.recompute(),this.state=Br}recompute(){if(this.sources){for(let a of this.sources)a.observers?.delete(this);this.sources.clear()}let e=m.consumer,t=m.untracked;m.consumer=this,m.untracked=!1;let r,n=!1,o;try{r=this._fn()}catch(a){n=!0,o=a,r=this._value}finally{m.consumer=e,m.untracked=t}let i=!this._initialized||this._threw!==n||(n?o!==this._error:!this._equals(this._value,r));if(this._initialized=!0,this._threw=n,this._error=o,this._value=r,i){if(this.version++,this.observers)for(let a of[...this.observers])a.markDirty(Ae);jt(this)}}markDirty(e){if(this.state>=e)return;let t=this.state===Br;if(this.state=e,t){if(this.observers)for(let r of[...this.observers])r.markDirty(Kr);jt(this)}}peek(){if(this.updateIfNecessary(),this._threw)throw this._error;return this._value}};Mi=class{constructor(e){this._watched=new Set,this._pending=new Set,this._notifyFn=e}watch(...e){for(let t of e)this._watched.add(t),(t.watchers??=new Set).add(this)}unwatch(...e){for(let t of e)this._watched.delete(t),t.watchers?.delete(this),this._pending.delete(t)}getPending(){let e=[...this._pending];return this._pending.clear(),e}_notify(e){if(!this._watched.has(e)||this._pending.has(e))return;let t=this._pending.size===0;this._pending.add(e),t&&this._notifyFn()}};Ui=class{constructor(e){this.queued=!1,this.disposed=!1,this.owner=Se(m.owner),m.owner&&(m.owner.cleanups??=[]).push(()=>this.dispose()),this.computed=new Yr(()=>{xe(this.owner,!1),j(this.owner,()=>{let t=e();typeof t=="function"&&(this.owner.cleanups??=[]).push(t)})}),this.watcher=new Mi(()=>Vi(this)),this.run(),this.watcher.watch(this.computed)}run(){if(!this.disposed){this.watcher.getPending();try{this.computed.get()}catch(e){if(e&&typeof e.then=="function"&&m.onSuspend){m.onSuspend(e,this.owner);return}if(m.onError&&m.onError(e,this.owner))return;throw e}}}dispose(){this.disposed||(this.disposed=!0,this.watcher.unwatch(this.computed),xe(this.owner))}};Hi(()=>{});tn=Symbol.for("signal"),Ki=Symbol.for("memo"),Ji=Symbol.for("signal-node");Xi=typeof window>"u"?!1:window.__FLUIXI_PROD__===!0,Gi=typeof process>"u"?Xi:!1,Yi=Symbol.for("signal");Jr=null;Rt=null;Nt=null;Xr=null;$t=Symbol();pn=W();Ii((e,t)=>{let r=Qr(t,pn);r&&(r.increment(),e.finally(()=>r.decrement()))});ns=W();Fi((e,t)=>{let r=Qr(t,ns);return r?(r.setError(e),!0):!1});ue=Symbol.for("fluixi-proxy")});var jn,Rn=N(()=>{"use strict";jn="1.0.0-alpha.80"});function Ss(e){if(U.untracked)return e();U.untracked=!0;try{return e()}finally{U.untracked=!1}}function ks(e){return{cleanups:null,owned:null,parent:e,contexts:null}}function zn(e){let t=Symbol("context");return{id:t,defaultValue:e,Provider:r=>{let n=U.owner,o=ks(n);(o.contexts=new Map).set(t,r.value),n&&(n.owned??=[]).push(o),U.owner=o;try{return r.children}finally{U.owner=n}}}}function Un(e,t){let r=e;for(;r;){if(r.contexts&&r.contexts.has(t.id))return r.contexts.get(t.id);r=r.parent}return t.defaultValue}function Os(e){U.onSuspend=e}function Cs(e){U.onError=e}function Ts(e){U.hostSchedule=e??(t=>{Promise.resolve().then(t)})}function Bn(e){return Ss(e)}function Kn(e){return typeof e=="function"&&e[_s]===!0}function Jn(e){let[t,r]=v(e),n=t;return n.$=r,n}function Ge(e){let t=In.get(e);return t||In.set(e,t={keys:new Map}),t}function Fn(e,t,r){let n=e.keys.get(t);return n||e.keys.set(t,n=Jn(r)),n}function Hn(e){let t=Ge(e);(t.all||(t.all=Jn()))()}function Vn(e,t){e.$(typeof t=="function"?()=>t:t)}function Xn(e){if(e==null||typeof e!="object")return!1;if(Array.isArray(e))return!0;let t=Object.getPrototypeOf(e);return t===Object.prototype||t===null}function Xe(e){if(!Xn(e))return e;let t=qn.get(e);if(t)return t;let r=new Proxy(e,$s);return qn.set(e,r),r}function Oe(e,t,r){if(e[t]===r&&(r!==void 0||t in e))return;let n=Array.isArray(e),o=n?e.length:0;r===void 0?delete e[t]:e[t]=r;let i=Ge(e),a=i.keys.get(t);if(a&&Vn(a,r),n&&e.length!==o){let s=i.keys.get("length");s&&Vn(s,e.length)}i.all&&i.all.$(void 0)}function Wn(e,t){return typeof e=="function"?e(t):e}function Kt(e,t){for(let r of Object.keys(t)){let n=t[r],o=e[r];n&&typeof n=="object"&&!Array.isArray(n)&&o&&typeof o=="object"&&!Array.isArray(o)?Kt(o,n):Oe(e,r,n)}}function Xt(e){let t=[],r=e.replace(/\[([^\]]*)\]/g,".$1");for(let n of r.split("."))n.length&&t.push(n);return t}function Gn(e,t,r){let n=t.length-1;for(let i=0;i<n;i++){let a=t[i];if(a==="*"){let l=t.slice(i+1);if(Array.isArray(e))for(let u=0;u<e.length;u++)Gn(e[u],l,r);return}let s=e[a];(s==null||typeof s!="object")&&(s=/^\d+$/.test(t[i+1])?[]:{},Oe(e,a,s)),e=s}let o=t[n];if(o==="*"){if(Array.isArray(e))for(let i=0;i<e.length;i++)Oe(e,i,Wn(r,e[i]));return}Oe(e,o,Wn(r,e[o]))}function Ut(e,t,r){Gn(e,Xt(t),r)}function js(e,t){let r=t[0];if(typeof r=="function"&&t.length===1){let n=r(e);n&&n!==e&&Kt(e,n);return}if(Array.isArray(r)&&t.length===1){for(let n of r)Array.isArray(n)&&Ut(e,n[0],n[1]);return}if(r&&typeof r=="object"&&!Array.isArray(r)&&t.length===1){Kt(e,r);return}if(Array.isArray(t[1])&&t.length>=3){Ut(e,`${r}.${t[1].join(".")}`,t[2]);return}Ut(e,String(r),t[1])}function Jt(e){if(e==null||typeof e!="object")return e;if(Array.isArray(e))return e.map(Jt);let t={};for(let r of Object.keys(e))t[r]=Jt(e[r]);return t}function fe(e,t){let r=e;for(let n of Xt(t)){if(r==null)return;r=r[n]}return r}function Ns(e,t){for(let r of Rs)e[r]=t[r].bind(t);e.$=t.reactive.bind(t)}function Ms(e,t={immutable:!0}){let r=new Yn(e,t);return Ns(r.set,r),[r.proxy,r.set]}function Ls(e,t={}){return new Yn(e,{...t,immutable:!1})}function Ye(e){if(e==null||typeof e!="object")return e;let t=e[Bt];return t!==void 0?t:e}function Ds(e){return O(()=>Ye(e))}var As,xs,U,El,_s,Ps,Es,Bt,Nn,Mn,Ln,Dn,In,qn,$s,Yn,Rs,jl,Zn=N(()=>{"use strict";A();As="__fluixi_signal_next_state__",xs=e=>{typeof queueMicrotask=="function"?queueMicrotask(e):Promise.resolve().then(e)},U=globalThis[As]??={consumer:null,untracked:!1,owner:null,queue:[],scheduled:!1,flushing:!1,batchDepth:0,hostSchedule:xs,onSuspend:null,onError:null};Ts(()=>{});El=typeof window>"u"?!1:window.__FLUIXI_PROD__===!0,_s=Symbol.for("signal");Ps=zn();Os((e,t)=>{let r=Un(t,Ps);r&&(r.increment(),e.finally(()=>r.decrement()))});Es=zn();Cs((e,t)=>{let r=Un(t,Es);return r?(r.setError(e),!0):!1});Bt=Symbol("store-raw"),Nn=Symbol("store-node"),Mn=Symbol("store-has"),Ln=Symbol("store-self"),Dn=Symbol("store-track"),In=new WeakMap,qn=new WeakMap;$s={get(e,t,r){if(t===Bt||t===Nn)return e;if(t===ue)return r;if(t===Mn)return a=>a in e;if(t==="__proxy")return!0;if(t===Dn||t===Ln)return Hn(e),r;let n=e[t];if(typeof n=="function"&&!Object.prototype.hasOwnProperty.call(e,t))return n;let o=Object.getOwnPropertyDescriptor(e,t);if(o&&o.get)return o.get.call(r);let i=Fn(Ge(e),t,n)();return Xn(i)?Xe(i):i},set(){return!0},deleteProperty(e,t){return t in e&&Oe(e,t,void 0),!0},has(e,t){return t===Bt||t===ue||t===Nn||t===Mn||t===Ln||t===Dn?!0:(Fn(Ge(e),t,e[t])(),t in e)},ownKeys(e){return Hn(e),Reflect.ownKeys(e)},getOwnPropertyDescriptor(e,t){return Reflect.getOwnPropertyDescriptor(e,t)}};Yn=class{constructor(e,t={immutable:!0}){this.options=t,this.root=e,this.set=((...r)=>_(()=>js(this.root,r)))}get state(){return Xe(this.root)}get proxy(){return Xe(this.root)}get accessor(){return(()=>Xe(this.root))}unwrap(){return this.root}getNode(e){return this.root&&this.root[e]}get(e){if(e==null||e==="")return Ye(this.state);let t=this.state;for(let r of Xt(e)){if(t==null)return;t=t[r]}return Ye(t)}select(e){return g(()=>e(this.state))}subscribe(e){return S(()=>e(this.state))}watch(e,t){let r;return S(()=>{let n=e(this.state);Object.is(n,r)||(t(n,r),r=n)})}reactive(e){return g(()=>this.state[e])}produce(e){this.set((t=>{let r=Jt(t);return e(r),r}))}reconcile(e,t={}){this.set(e)}push(e,...t){let r=fe(this.root,e);this.set(e,r.concat(t))}pop(e){let t=fe(this.root,e).slice(),r=t.pop();return this.set(e,t),r}shift(e){let t=fe(this.root,e).slice(),r=t.shift();return this.set(e,t),r}splice(e,t,r,...n){let o=fe(this.root,e).slice(),i=o.splice(t,r,...n);return this.set(e,o),i}insert(e,t,r){let n=fe(this.root,e).slice();n.splice(t,0,r),this.set(e,n)}removeAt(e,t){let r=fe(this.root,e).slice(),n=r.splice(t,1);return this.set(e,r),n}toObservable(){let[e]=v(this.state);return e.toObservable()}dispose(){}},Rs=["get","select","watch","subscribe","produce","reconcile","push","pop","shift","splice","insert","removeAt","unwrap","toObservable"];jl=Object.freeze({createStore:Ms,createMutableStore:Ls,batch:_,unwrap:Ye,untrackStore:Ds})});function Is(e){return e.localName.includes("-")}function Qn(e,t,r,n=!1){if(r==null){e.removeAttribute(t);return}if(Is(e)){e[t]=r;return}C(e,t,r,n)}function so(e,...t){e.classList.add(...t)}function ao(e,...t){e.classList.remove(...t)}function lo(e,...t){t.forEach(r=>e.classList.toggle(r))}function C(e,t,r,n=!1){if(r==null||r===!1){e.removeAttribute(t);return}if(r===!0){e.setAttribute(t,"");return}if(typeof r=="object"){e.setAttribute(t,JSON.stringify(r));return}e.setAttribute(t,String(r))}function uo(e){return e&&typeof e=="object"&&e.strings&&Array.isArray(e.strings)&&e.values&&Array.isArray(e.values)}function ot(e){return e instanceof Node}function co(e){q.core=e}function it(e){q.core&&e.setAttribute("fluixi",q.core),e.setAttribute("fx-dom",q.dom),e.setAttribute("fx-reactive",q.reactive),typeof globalThis<"u"&&(globalThis.Fluixi=q)}function st(){let e=[q.core,q.dom,q.reactive].filter(t=>t!==void 0);new Set(e).size<=1||console.warn(`[fluixi] package versions disagree — core ${q.core??"(absent)"}, dom ${q.dom}, reactive ${q.reactive}. These ship as one release, so a mismatch usually means a stale lockfile or two copies resolved side by side. Reinstall, or check for duplicates with \`pnpm why @fluixi/dom\`.`)}function fo(e){return Object.defineProperty(e,Symbol.for("fluixi-provider"),{value:!0,enumerable:!0}),e}function Ce(e){return typeof e!="function"||Object.defineProperty(e,Symbol.for("fluixi-component"),{value:!0,enumerable:!0}),e}function po(e){return Object.defineProperty(e,Symbol.for("fluixi-suspense"),{value:!0,enumerable:!0}),e}function Fs(e){return typeof e=="function"&&e[Symbol.for("fluixi-router")]===!0}function Hs(e){return typeof e=="function"&&e[Symbol.for("fluixi-routes")]===!0}function Vs(e){return typeof e=="function"&&e[Symbol.for("fluixi-route")]===!0}function Ws(e){return typeof e=="function"&&e[Symbol.for("fluixi-outlet")]===!0}function zs(e){return typeof e=="function"&&e[Symbol.for("fluixi-provider")]===!0}function Us(e){return typeof e=="function"&&e[Symbol.for("fluixi-context")]===!0}function J(e){return typeof e=="function"&&e[Symbol.for("fluixi-component")]===!0}function Bs(e){return typeof e=="function"&&e[Symbol.for("fluixi-suspense")]===!0}function ho(e){return Fs(e)?{type:"router",value:e}:Vs(e)?{type:"route",value:e}:Hs(e)?{type:"routes",value:e}:Ws(e)?{type:"outlet",value:e}:J(e)?{type:"component",value:e}:Bs(e)?{type:"suspense",value:e}:zs(e)?{type:"provider",value:e}:Us(e)?{type:"context",value:e}:{type:"none",value:e}}function tr(){if(!to)throw new Error("[fluixi] server render ran before @fluixi/dom/server loaded");return to}function rr(e){return e!=null&&e[at]===!0?!0:typeof Node<"u"&&e instanceof Node}function Ks(e){return e!=null&&e[at]===!0?e.nodeType===1:typeof Element<"u"&&e instanceof Element}function Js(e){return e!=null&&e[at]===!0?e.nodeType===3:typeof Text<"u"&&e instanceof Text}function Xs(e){yo=e}function mo(){return yo}function ro(e,t){return b.active&&t.parentNode===e}function go(e){let t=b.parents.lastIndexOf(e);t!==-1&&(b.parents.length=t),b.cursor=e.nextSibling}function bo(e){if(!b.active)return e();let t=b.cursor,r=b.parents;b.active=!1,b.parents=[];try{return e()}finally{b.active=!0,b.cursor=t,b.parents=r}}function vo(e){if(!b.active||e==null)return;let t=Array.isArray(e)?e[e.length-1]:e;t&&typeof t.nodeType=="number"&&go(t)}function te(e){if(!Te)for(let t of e)Qe.has(t)||nr.has(t)||(Qe.add(t),document.addEventListener(t,Ys))}function Ys(e){let t=`$$${e.type}`,r=e.composedPath&&e.composedPath()[0]||e.target;for(;r;){let n=r[t];if(n&&!r.disabled&&(n(e),e.cancelBubble))return;r=r.host&&r.host!==r&&r.host instanceof Element?r.host:r.parentNode}}function Zs(e,t,r){if(e[`$$${t}`]=r,nr.has(t)){let n=`__fx_${t}`;if(!e[n]){let o=i=>{e[`$$${t}`]?.(i)};e.addEventListener(t,o),e[n]=o}return}Qe.has(t)||te([t])}function no(e,t){delete e[`$$${t}`];let r=`__fx_${t}`,n=e[r];n&&(e.removeEventListener(t,n),delete e[r])}function Y(e,t=!1){if(Te)return tr().createText(e);if(b.active&&!t){let r=mo()?.hydrateText(e);if(r)return r}return document.createTextNode(e)}function de(e,t=!1){if(Te)return tr().createElement(e,t);if(b.active){let r=mo()?.hydrateElement(e);if(r)return r}return t?document.createElementNS(er,e):document.createElement(e)}function ea(e,t,r,n,o){let i=n,a=new Map;return T(()=>{let s;if(J(e)&&!P(e)){if(!a.has(e)){K++;try{let l=e();a.set(e,l)}finally{K--}}for(s=a.get(e);typeof s=="function"&&P(s);)s=s()}else for(s=e();typeof s=="function"&&P(s);)s=s();{let l=0;for(;typeof s=="function"&&l++<50;)if(J(s)){if(!a.has(s)){let u=s;K++;try{let f=u();a.set(u,f)}finally{K--}}s=a.get(s)}else if(P(s))s=s();else if(s=s(),typeof s!="function"||!P(s)&&!J(s))break}K++;try{i=et(t,s,r,i,a),o(i)}finally{K--}})}function F(e,t,r,n){if(K>Qs)return console.error("[insert] Exceeded max call depth — possible infinite loop."),()=>null;r!==void 0&&!r&&(r=Y("",!0),e.appendChild(r));let o=n??null,i=l=>Array.isArray(l)&&l.some(u=>typeof u=="function"),a=l=>typeof l=="function"?l:()=>l;if(typeof t!="function"&&!i(t)){K++;try{o=et(e,t,r,o)}finally{K--}return()=>o}let s=ea(a(t),e,r,o,l=>{o=l});return()=>(s?.(),o)}function et(e,t,r,n,o){if(t==null||typeof t=="boolean")return ee(e,n,r);if(typeof t=="function")for(;typeof t=="function";)t=t();if(t==null||typeof t=="boolean")return ee(e,n,r);if(Ze(t)){let a=Y("",!0);return Array.isArray(n)?n.length>0?(e.replaceChild(a,n[0]),ee(e,n.slice(1),r)):I(e,a,r):n?e.replaceChild(a,n):I(e,a,r),t.then(s=>{a.parentNode===e&&et(e,s,a.nextSibling,a)}).catch(s=>{console.error("Error resolving promise in insertExpression:",s)}),a}let i=typeof t;if(i==="string"||i==="number"){if(i==="number"&&(t=String(t)),Array.isArray(n)){if(n.length===0){let s=Y(t);return I(e,s,r),s}if(n.length===1&&n[0].nodeType===3)return n[0].data=t,n;n=ee(e,n,r)}if(n&&Js(n))return n.data=t,n;let a=Y(t);return n&&n.parentNode===e?e.replaceChild(a,n):ro(e,a)||I(e,a,r),a}if(rr(t))return ro(e,t)?(go(t),t):Array.isArray(n)?(n.length===0?I(e,t,r):n[0].parentNode===e?(e.replaceChild(t,n[0]),ee(e,n.slice(1),r)):I(e,t,r),t):(n?n!==t&&(n.parentNode===e?e.replaceChild(t,n):I(e,t,r)):I(e,t,r),t);if(Array.isArray(t)){let a=[],s=Array.isArray(n)?n:n?[n]:[],l=[];B(t,a,e,r,!0,o,l);let u=ta(e,s,a,r);for(let f of l){let c=F(e,f.sig,f.marker);x(()=>{ee(e,c()),f.marker.parentNode===e&&e.removeChild(f.marker)})}return u}if(i==="object"&&t!==null&&typeof t=="object"){let a=t;if("type"in a&&"props"in a){let s=a;if(typeof s.type=="function"){let l=s.type(s.props||{});return et(e,l,r,n)}}}return ee(e,n,r)}function B(e,t,r,n,o=!0,i,a){for(let s=0;s<e.length;s++){let l=e[s];if(!(l==null||typeof l=="boolean")){for(;typeof l=="function"&&!Ze(l)&&!P(l)&&!J(l)&&(l=l(),!(l==null||typeof l=="boolean")););if(!(l==null||typeof l=="boolean")){if(typeof l=="function"){let u;for(J(l)&&!P(l)?(i||(i=new Map),i.has(l)||i.set(l,l()),u=i.get(l)):u=l();typeof u=="function"&&!Ze(u)&&!P(u)&&!J(u);)i||(i=new Map),i.has(u)||i.set(u,u()),u=i.get(u);if(u==null||typeof u=="boolean")continue;if(typeof u=="function"){if(P(u)){if(a){let c=Y("",!0);t.push(c),a.push({marker:c,sig:u});continue}let f=u();for(;typeof f=="function"&&P(f);)f=f();if(f==null||typeof f=="boolean")continue;Array.isArray(f)?B(f,t,r,n,o,i):B([f],t,r,n,o,i);continue}continue}Array.isArray(u)?B(u,t,r,n,o,i,a):B([u],t,r,n,o,i,a);continue}if(Ze(l)){let u=Y("",!0);t.push(u),l.then(f=>{if(u.parentNode){let c=[];if(B([f],c,u.parentNode,void 0,!1,i),c.length>0){u.parentNode.replaceChild(c[0],u);for(let p=1;p<c.length;p++)u.parentNode?.insertBefore(c[p],c[p-1].nextSibling)}}}).catch(f=>console.error("Error resolving promise in array:",f));continue}if(Array.isArray(l)){B(l,t,r,n,o,i,a);continue}if(rr(l)){t.push(l);continue}if(typeof l=="object"&&l!==null&&"type"in l&&"props"in l){let u=l;if(typeof u.type=="function"){let f=u.type(u.props||{});Array.isArray(f)?B(f,t,r,n,!1,i):B([f],t,r,n,!1,i);continue}}if(typeof l=="string"||typeof l=="number"){let u=String(l);if(u.trim()===""&&u!==" ")continue;t.push(Y(u));continue}t.push(Y(String(l)))}}}}function ta(e,t,r,n){for(let c=0;c<r.length;c++){let p=r[c].parentNode;p!==null&&p!==e&&p.nodeType!==11&&(r=r.slice(),r[c]=r[c].cloneNode(!0))}let o=r.length,i=t.length,a=o,s=0,l=0,u=i>0?t[i-1].nextSibling??void 0:n,f=null;for(;s<i||l<a;){if(t[s]===r[l]){s++,l++;continue}for(;i>s&&a>l&&t[i-1]===r[a-1];)i--,a--;if(i===s){let c=a<o?l?r[l-1].nextSibling??void 0:r[a-l]:u;for(;l<a;)I(e,r[l++],c)}else if(a===l)for(;s<i;)(!f||!f.has(t[s]))&&t[s].parentNode===e&&e.removeChild(t[s]),s++;else if(t[s]===r[a-1]&&r[l]===t[i-1]){let c=t[--i].nextSibling;I(e,r[l++],t[s++].nextSibling),I(e,r[--a],c),t[i]=t[s-1]}else{if(!f){f=new Map;let p=l;for(;p<a;)f.set(r[p],p++)}let c=f.get(t[s]);if(c!=null)if(l<c&&c<a){let p=s,h=1;for(;++p<i&&p<a&&!(!f.has(t[p])||f.get(t[p])!==c+h);)h++;if(h>c-l){let d=t[s];for(;l<c;)I(e,r[l++],d)}else t[s].parentNode===e?e.replaceChild(r[l++],t[s++]):(I(e,r[l++],u),s++)}else s++;else t[s].parentNode===e&&e.removeChild(t[s]),s++}}return r}function ee(e,t,r){if(t)if(Array.isArray(t))for(let n=0;n<t.length;n++)t[n].parentNode===e&&e.removeChild(t[n]);else t.parentNode===e&&e.removeChild(t);return null}function I(e,t,r){b.active&&t.parentNode===e||(r&&r.parentNode===e?e.insertBefore(t,r):e.appendChild(t))}function pe(e,t,r){r==null?delete e[t]:e[t]=r}function wo(e,t,r){let n=r,o;return Array.isArray(r)&&(n=r[0],o=r[1]),typeof n!="function"?()=>{}:(e.addEventListener(t,n,o),()=>e.removeEventListener(t,n,o))}function Ao(e,t){let r=(n,o)=>{typeof n=="function"&&n(e,o??(()=>{}))};if(typeof t=="function"){r(t);return}if(Array.isArray(t)){if(typeof t[0]=="function"){r(t[0],t[1]);return}for(let n of t)Array.isArray(n)?r(n[0],n[1]):r(n)}}function Yt(e,t,r,n=!1){return typeof r!="function"?(C(e,t,r,n),()=>{}):T(()=>{let o=typeof r=="function"?r():r;C(e,t,o,n)})}function Zt(e,t,r){return typeof r!="function"?(pe(e,t,r),()=>{}):T(()=>{let n=typeof r=="function"?r():r;pe(e,t,n)})}function xo(e,t,r){return typeof r!="function"?(C(e,t,!!r),()=>{}):T(()=>{let n=r();C(e,t,!!n)})}function tt(e,t){if(t==null){e.removeAttribute("class");return}if(typeof t=="function"){T(()=>tt(e,t()));return}if(typeof t=="string"){e.setAttribute("class",t);return}if(Array.isArray(t)){e.setAttribute("class",t.filter(Boolean).join(" "));return}if(typeof t=="object"){let r=Object.keys(t).filter(n=>{let o=t[n];return typeof o=="function"?o():!!o}).join(" ");e.setAttribute("class",r);return}e.setAttribute("class",String(t))}function rt(e,t,r){if(!(!t||typeof t!="object"))for(let n in t){let o=t[n],i=n.split(/\s+/).filter(Boolean);if(typeof o=="function"&&r)r.push(T(()=>{let a=!!o();for(let s of i)e.classList.toggle(s,a)}));else{let a=!!(typeof o=="function"?o():o);for(let s of i)e.classList.toggle(s,a)}}}function nt(e,t){let r=t;for(;typeof r=="function";)r=r();if(r==null){e.removeAttribute("style");return}if(typeof r=="string"){e.style.cssText=r;return}if(typeof r=="object")for(let n in r){let o=r[n];o==null?e.style[n]="":e.style[n]=o}}function So(e){let{element:t,props:r,prevProps:n=Gs,isSVG:o=!1,skipChildren:i=!1}=e;if(!t||!Ks(t))return console.error("[spread] Error: element is not a DOM Element!"),()=>{};if(!r)return console.warn("[spread] Warning: props is undefined!"),()=>{};let a=o||t.namespaceURI===er,s=[];for(let l in r){if(i&&l==="children")continue;let u=r[l],f=n[l];if(u===f)continue;if(l==="ref"){or(u,t);continue}if(l==="use"){Ao(t,u);continue}if(l.startsWith("on:")){s.push(wo(t,l.slice(3),u));continue}if(l.startsWith("prop:")){s.push(Zt(t,l.slice(5),u));continue}if(l.startsWith("attr:")){s.push(Yt(t,l.slice(5),u,a));continue}if(l.startsWith("bool:")){s.push(xo(t,l.slice(5),u));continue}if(l==="class"||l==="className"){typeof u=="function"?s.push(T(()=>tt(t,u()))):tt(t,u);continue}if(l==="classList"){typeof u=="function"?s.push(T(()=>rt(t,u()))):rt(t,u,s);continue}if(l==="style"){typeof u=="function"?s.push(T(()=>nt(t,u()))):nt(t,u);continue}if(l.startsWith("on")){let p=l.slice(2).toLowerCase();f&&no(t,p),u&&Zs(t,p,u);continue}let c=eo.has(l)||!a&&l in t;typeof u=="function"?s.push(c?Zt(t,l,u):Yt(t,l,u,a)):s.push(T(()=>c?pe(t,l,r[l]):C(t,l,r[l],a)))}for(let l in n)if(!(l in r))if(l.startsWith("on")){let u=l.slice(2).toLowerCase();no(t,u)}else eo.has(l)?pe(t,l,null):t.removeAttribute(l);return()=>{s.forEach(l=>l())}}function ra(e,t,r=!1){for(let n in t){let o=t[n];if(n==="ref"){or(o,e);continue}if(n!=="children"){if(n==="use"){Ao(e,o);continue}if(n.startsWith("on:")){wo(e,n.slice(3),o);continue}if(n.startsWith("prop:")){Zt(e,n.slice(5),o);continue}if(n.startsWith("attr:")){Yt(e,n.slice(5),o,r);continue}if(n.startsWith("bool:")){xo(e,n.slice(5),o);continue}if(n.startsWith("on")&&n.length>2){let i=n.slice(2).toLowerCase();if(typeof o=="function")if(nr.has(i)){e[`$$${i}`]=o;let a=`__fx_${i}`;if(!e[a]){let s=l=>{e[`$$${i}`]?.(l)};e.addEventListener(i,s),e[a]=s}}else e[`$$${i}`]=o,Qe.has(i)||te([i]);continue}if(n==="class"||n==="className"){tt(e,o);continue}if(n==="classList"){typeof o=="function"?T(()=>rt(e,o())):rt(e,o);continue}if(n==="style"){typeof o=="function"?T(()=>nt(e,o())):nt(e,o);continue}if(n==="innerHTML"){if(typeof o=="function"){let i=S(()=>{let a=o();for(;typeof a=="function";)a=a();e.innerHTML=a});x(()=>i())}else e.innerHTML=o;continue}if(n==="value"&&(e.tagName==="INPUT"||e.tagName==="TEXTAREA")){if(typeof o=="function"){let i=S(()=>{let a=o();for(;typeof a=="function"&&a.length===0;)a=a();document.activeElement!==e&&(e.value=a??"")});x(()=>{i()})}else T(()=>{document.activeElement!==e&&(e.value=t[n]??"")});continue}if(n==="checked"&&e.tagName==="INPUT"){if(typeof o=="function"){let i=S(()=>{let a=o();for(;typeof a=="function"&&a.length===0;)a=a();document.activeElement!==e&&(e.checked=a??"")});x(()=>{i()})}else T(()=>{document.activeElement!==e&&(e.checked=t[n]??"")});continue}if(n==="value"&&e.tagName==="SELECT"){if(typeof o=="function"){let i=!0,a=S(()=>{let s=o();for(;typeof s=="function"&&s.length===0;)s=s();i?(i=!1,queueMicrotask(()=>{e.value=s??""})):e.value=s??""});x(()=>{a()})}else{let i=!0;T(()=>{let a=t[n];i?(i=!1,queueMicrotask(()=>{e.value=a??""})):e.value=a??""})}continue}if(typeof o=="function"){let i=S(()=>{let a=o();for(;typeof a=="function"&&a.length===0;)a=a();Qn(e,n,a,r)});x(()=>{i()})}else T(()=>Qn(e,n,t[n],r))}}}function or(e,t){if(e){if(rr(e)){let r=t,n=e;if(!r)return;typeof r=="function"?r(n):typeof r=="object"&&"current"in r&&(r.current=n);return}typeof e=="function"?e(t):typeof e=="object"&&"current"in e&&(e.current=t)}}function na(e){return e==="svg"||e==="path"||e==="circle"||e==="rect"||e==="line"||e==="polygon"||e==="polyline"||e==="ellipse"||e==="g"||e==="defs"||e==="clipPath"||e==="text"}function Ze(e){return e!=null&&(typeof e=="object"||typeof e=="function")&&typeof e.then=="function"||e instanceof Promise}function ir(e,t,r){if(!t)throw new Error("Container element is required");let n,o,i=[];return D(a=>{_(()=>{b.active||(t.textContent=""),it(t),st(),F(t,e)}),o=a}),()=>{o?.(),n?.(),i.forEach(a=>a()),t.textContent=""}}function z(e,t){if(oo.fn)return oo.fn(e,t);let r=typeof e=="function"?Bn(()=>e(t)):e;if(r!=null&&(typeof r=="function"||typeof r=="object")&&!Kn(r)){try{r.$name=e?.name}catch{}return Ce(r)}return r}function sr(){let e=globalThis.__FX_DATA__;if(e)return e;if(Gt!==void 0)return Gt;let t=null;if(typeof document<"u"){let r=document.getElementById(ia)?.textContent;if(r)try{t=JSON.parse(r)}catch{t=null}}return Gt=t}function lt(){for(;;){for(;b.cursor&&b.cursor.nodeType===3&&b.cursor.data==="";)b.cursor=b.cursor.nextSibling;if(b.cursor!=null||!b.parents.length)return;b.cursor=b.parents.pop().nextSibling}}function ct(e,t){let r=t.nodeType===1?`<${t.tagName.toLowerCase()}>`:t.nodeType===3?`text ${JSON.stringify((t.nodeValue??"").slice(0,24))}`:t.nodeType===8?"comment":"node";console.warn(`[fluixi] hydration mismatch: expected ${e} but the server DOM has ${r}. Server and client rendered different markup; recreating this node on the client. Check for non-deterministic render (Date.now(), Math.random(), browser-only branches, untransported data).`)}function aa(e){lt();let t=b.cursor;return t&&t.nodeType===1&&t.tagName.toLowerCase()===e.toLowerCase()?(sa.has(e.toLowerCase())?b.cursor=t.nextSibling:(b.parents.push(t),b.cursor=t.firstChild),t):(ut&&t&&ct(`<${e}>`,t),null)}function la(e){lt();let t=b.cursor;return t&&t.nodeType===1&&t.tagName.toLowerCase()===e.toLowerCase()?(b.cursor=t.nextSibling,t):(ut&&t&&ct(`<${e}> (static)`,t),null)}function ua(e){if(e===""){let r=b.cursor;return r&&r.nodeType===3&&r.data!==""?(b.cursor=r.nextSibling,r.data="",r):null}lt();let t=b.cursor;return t&&t.nodeType===3?(b.cursor=t.nextSibling,t.nodeValue!==e&&(t.nodeValue=e),t):(ut&&t&&ct(`text ${JSON.stringify(e.slice(0,24))}`,t),null)}function ca(e){lt();let t=b.cursor;return t&&t.nodeType===8&&t.data===e?(b.cursor=t.nextSibling,t):(ut&&t&&ct(`marker <!--${e.slice(0,24)}-->`,t),null)}function fa(){io||(io=!0,Xs({hydrateElement:aa,hydrateText:ua,hydrateMarker:ca,hydrateStatic:la}))}function ft(e,t,r){fa(),b.active=!0,b.cursor=t.firstChild,b.parents=[];let n=sr(),o=r?.resourceNamespace,i=0;ln(()=>o?`${o}:r${i++}`:`r${i++}`),an(n?a=>a in n?{value:n[a]}:void 0:null);try{return ir(e,t)}finally{b.active=!1,b.cursor=null,b.parents=[]}}function ko(e,t={}){if(typeof e=="function")return z(e,t);if(typeof e!="string"||e.length===0)return null;let r=na(e);if(Te)return tr().createElement(e,r);let n=r?document.createElementNS(er,e):document.createElement(e);return ra(n,t,r),pa(n,t),n}function pa(e,t){if(!t||t.children===void 0)return;let r=Q(()=>t.children),n=o=>{F(e,o,typeof o=="function"?null:void 0)};Array.isArray(r)?r.forEach(n):n(r)}function da(e){return typeof e=="function"?e:(()=>e)}function pt(e){return()=>{let t=e();return typeof t=="function"?t():t}}function ha(e){return e!=null&&e!==!1}function ya(e){return!e||typeof e!="object"?!1:!!(typeof e._$litType$<"u"||typeof e._$litDirective$<"u"||Array.isArray(e.strings)&&Array.isArray(e.values))}function Oo(e){let t=pt(()=>e.when),r=g(t,void 0),n=g(r,void 0),o=$(),i=null,a=null,s=l=>{l!==a&&(i&&le(i),i=ae(o),a=l)};return g(()=>{let l=n();return s(l?"when":"fallback"),j(i,()=>{if(l){let u=e.children;return typeof u=="function"&&!ya(u)?typeof r=="function"?O(()=>O(r)?u(r()):e.fallback):u(r):u}return e.fallback})},void 0,{name:"show"})}function Co(e){let t=pt(()=>e.each),r=()=>e.fallback??null,n=(o,i)=>{let a=e.children,s=Array.isArray(a)?a.map(l=>typeof l=="function"?l(o,i):l):typeof a=="function"?a(o,i):a;return vo(s),s};return e.by?on(t,e.by,(o,i)=>n(o,i),{fallback:r}):nn(t,(o,i)=>n(o,i),{fallback:r})}function To(e){let t=pt(()=>e.each);return sn(t,(r,n)=>{let o=e.children(r,n);return vo(o),o},{fallback:()=>e.fallback??null})}function _o(e){return{[Qt]:!0,when:pt(()=>e.when),get children(){return e.children}}}function Po(e){let t=Array.isArray(e.children)?e.children:[e.children],r=$(),n=null,o=-1,i=a=>{a!==o&&(n&&le(n),n=ae(r),o=a)};return g(()=>{for(let a=0;a<t.length;a+=1){let s=t[a],l=0;for(;typeof s=="function"&&!s[Qt]&&l++<10;)s=s();if(!s||typeof s!="object"||s[Qt]!==!0)continue;let u=s.when();if(ha(u))return i(a),j(n,()=>typeof s.children=="function"?s.children(u):s.children)}return i(-2),j(n,()=>e.fallback??null)})}function Eo(e){let t=da(e.component),{component:r,...n}=e,o=$(),i=null,a;return g(()=>{let s=t();return s!==a&&(i&&le(i),i=ae(o),a=s),s==null?null:typeof s=="string"?{tag:s,props:n}:j(i,()=>s(n))})}function $o(e){let t=()=>e.mount?typeof e.mount=="function"?e.mount():e.mount:document.body,r,n;return D(o=>{r=o,n=document.createElement("div"),n.style.display="contents",t().appendChild(n),F(n,e.children)&&or(e.ref,n)}),x(()=>{r(),n.remove()}),null}function ar(e){if(Te)return e.fallback??null;let t=b.active,[r,n]=v(!t);return t&&queueMicrotask(()=>n(!0)),g(()=>r()?e.children:e.fallback??null,void 0,{name:"client-only"})}function Ro(e){let[t,r]=v(null),n=()=>r(null);return g(()=>{let o=t();if(o!==null)return typeof e.fallback=="function"?e.fallback(o,n):e.fallback;try{return typeof e.children=="function"?e.children():e.children}catch(i){return r(i),typeof e.fallback=="function"?e.fallback(i,n):e.fallback}})}function No(e){return g(()=>{let t=typeof e=="function"?e():e,r=[];for(let[n,o]of Object.entries(t))n&&(typeof o=="function"?o():o)&&r.push(n);return r.join(" ")})}function ma(e){return e.startsWith("--")?e:e.replace(/[A-Z]/g,t=>`-${t.toLowerCase()}`)}function Mo(e){return g(()=>{let t=typeof e=="function"?e():e,r=[];for(let[n,o]of Object.entries(t)){if(!n)continue;let i=typeof o=="function"?o():o;i!=null&&r.push(`${ma(n)}: ${i}`)}return r.join("; ")})}var er,eo,Ml,qs,q,Te,at,to,b,yo,Gs,Qe,nr,K,Qs,oa,oo,ia,Gt,sa,ut,io,Qt,jo,ga,M=N(()=>{"use strict";A();Rn();A();Zn();A();A();A();A();A();A();A();A();A();A();A();A();er="http://www.w3.org/2000/svg";eo=new Set(["className","value","checked","selected","innerHTML","innerText","textContent","indeterminate","htmlFor"]);Ml=typeof Symbol=="function"&&Symbol.for?Symbol.for("react.element"):60103;qs="1.0.0-alpha.80",q={dom:qs,reactive:jn};Te=typeof document>"u",at=Symbol.for("fluixi.server-node"),to=null;b={active:!1,cursor:null,parents:[]},yo=null;Gs={},Qe=new Set,nr=new Set(["scroll","focus","blur","load","error","resize","mouseenter","mouseleave","pointerenter","pointerleave","gotpointercapture","lostpointercapture"]);K=0,Qs=200;oa="__fx_dom_create_component__",oo=globalThis[oa]??={fn:null};ia="__FX_DATA__";sa=new Set(["area","base","br","col","embed","hr","img","input","link","meta","param","source","track","wbr"]),ut=typeof process<"u"&&process.env&&!1;io=!1;Qt=Symbol("match");jo=ar;ga=at});function he(e,t){let r,n,o;function i(){return n||(n=e().then(s=>r=s.default)),n}t?.preload&&i();let a=(s=>{if(r){let l=r;return O(()=>l(s))}if(!o){let[l]=G(()=>i(),{transport:!1});if(o=l,l.error)throw l.error}return g(()=>{let l=o();return l?O(()=>l(s)):void 0},void 0,{name:"lazy"})});return a.preload=()=>i().then(()=>{}),a.$lazy=!0,a.loader=e,a}var At=N(()=>{"use strict";A()});function xa(){zo||(zo=!0,!(typeof process<"u")&&console.warn("[fluixi] createProvider({ context, value, children }) reads `children` eagerly: the object literal materialises `children` BEFORE the context is stamped, so a routed <Outlet/> that has siblings inside the provider renders detached and its descendants see no context under SSR. Use the lazy form instead:\n createProvider(Context, value, props) // children stays a getter\n // or JSX: <Context.Provider value={…}>{props.children}</Context.Provider>"))}function xt(e,t,r){let n=!!e?.Provider,o=n?e:e.context,i=n?t:e.value,a=n?!1:e.debug??!1;n||xa();let s=typeof i=="function"?i():i,l=n?r:e;return o.Provider({value:s,get children(){return l?.children},debug:a})}function Uo(e){let t=me(e);return[t,n=>xt(t,n.value,n)]}function hr(e,t){if(e.length===0)return Q(()=>t);let[r,n]=e[0],o=e.slice(1);return xt(r,n,{get children(){return hr(o,t)}})}function Bo(e){return t=>{let r=ge(e);return t.children(r)}}function Ko(e,t){let r=ge(e);return r===e.defaultValue?t():r}function me(e){let t=W(e),r=n=>(n.debug,t.Provider({value:n.value,get children(){return n.children},debug:n.debug}));return typeof Symbol<"u"&&Symbol.for&&(r.$$typeof=Symbol.for("react.provider")),r.$$typeof=Symbol.for("react.provider"),{id:t.id,Provider:fo(r),defaultValue:e}}function ge(e){let t=H(e);return t!==void 0?t:e.defaultValue}var zo,yr=N(()=>{"use strict";M();A();A();zo=!1});function ti(){return ei}function br(e){ei=e}function ri(e,t){St.set(e,t)}function ni(e){return St.get(e)}function Pa(){St.clear()}function oi(){if(typeof window>"u")return!1;let e=document.getElementById("__FLUIXI_HYDRATION__");if(!e||e.getAttribute("type")!=="application/json")return!1;try{let t=e.textContent||"{}",r=JSON.parse(t);for(let[n,o]of Object.entries(r))St.set(n,o);return!0}catch(t){return console.error("Failed to deserialize hydration data:",t),!1}}function vr(){if(typeof window>"u")return;let e=document.getElementById("__FLUIXI_HYDRATION__");e&&e.remove();let t=document.createTreeWalker(document.body,NodeFilter.SHOW_COMMENT,null),r=[],n;for(;n=t.nextNode();){let o=n,i=o.nodeValue||"";(i.startsWith("#")||i.startsWith("/"))&&r.push(o)}r.forEach(o=>o.remove()),Pa()}function ii(){return typeof window>"u"}var ei,St,wr=N(()=>{"use strict";ei=!1,St=new Map;typeof window<"u"&&window.addEventListener("load",()=>{setTimeout(vr,100)})});function Ct(e,t,r={}){let{preserveStructure:n,multiple:o,throwOnError:i=!1,defaultValue:a,maxDepth:s=20}=r;if(!e||typeof e!="object")return a;if(!t)return e;if(Array.isArray(t))if(n){let f={};for(let c of t){let p=Ct(e,c,{...r,preserveStructure:!1});p!==void 0&&za(f,c,p)}return f}else return t.map(f=>Ct(e,f,{...r,preserveStructure:!1}));let l=Or(t,{...r,throwOnError:i});if(l.length===0)return e;if(typeof n>"u"||n===!1){let f=Ua(e,t);return o===!1&&Array.isArray(f)?f[0]:f===void 0&&a!==void 0?a:f}let u=V(e,l,0,s);return u===void 0&&a!==void 0?a:u}function Ua(e,t,r={}){let{createMissing:n=!1,add:o=!1,debug:i=!1}=r,a=Or(t),s=e,l=!1,u="",f=t;if(typeof s=="object"&&!Array.isArray(s)&&f.length>0&&s[f])return s=s[f],s;for(let c=0;c<a.length;c++){let p=a[c],h=a.length>1?c===a.length-1:!1;if(s===null&&!n)return;let d=a[c+1];switch(p.type){case"property":if(s&&typeof s=="object")if(Array.isArray(s)){if(typeof p.value=="number"){let y=p.value;if(n&&y>=s.length)for(let w=s.length;w<=y;w++)s.push(void 0);if(n&&(s[y]===null||s[y]===void 0)&&(!h||l)&&(d?s[y]=d.type==="index"||d.type==="slice"||d.type==="union"||d.type==="wildcard"?[]:{}:s[y]=null,l=!1),s=s[y],d){l=!0;continue}}else o?s.push({[String(p.value)]:null}):s=s.map(y=>y[String(p.value)]);if(d)continue;return ai(s)}else{if(s[u]&&u.split(".").length>=2){s=s[u];continue}if(n&&(s[String(p.value)]===null||s[String(p.value)]===void 0)&&(!h||l)&&(d?s[String(p.value)]=d.type==="index"||d.type==="slice"||d.type==="union"||d.type==="wildcard"?[]:{}:s[String(p.value)]=null,l=!1,s=s[String(p.value)],d)){l=!0;continue}if(s?(!s[String(p.value)]&&n&&(s[String(p.value)]=null),s=s[String(p.value)]):s={[String(p.value)]:null},d)continue}else if(n)s={},s[String(p.value)]=d.type==="index"||d.type==="slice"||d.type==="union"||d.type==="wildcard"||r.type==="array"?[]:{},s=s[String(p.value)];else return;break;case"index":case"wildcard":if(Array.isArray(s)){if(p.type==="index"){let y=p.value;if(y<0){s=s[s.length-Math.abs(y)];continue}if(n&&(y>=s.length||s[y]==null||s[y]==null)&&!h){for(let w=s.length;w<=y;w++)s.push(void 0);d&&(s[y]=d.type==="index"||d.type==="slice"||d.type==="union"||d.type==="wildcard"?[]:{})}s=s[y]}else if(!h)continue}else if(n){let y=a[c+1];s=[];let w=p.value;for(let k=0;k<=w;k++)s.push(void 0);s[w]=y.type==="index"||y.type==="slice"||y.type==="union"||y.type==="wildcard"||r.type==="array"?[]:{},s=s[w]}else{if(p.type==="index"&&typeof s=="object"&&s&&s[String(p.value)]!==void 0){s=s[String(p.value)];continue}if(typeof s=="object"){s=Object.values(s);continue}return}break;default:return}}return ai(s)}function ai(e){return Array.isArray(e)?e.filter(t=>typeof t<"u"):e}var Tt,V,Or,Wa,za,Cr=N(()=>{"use strict";Tt=e=>e==null||Array.isArray(e)||typeof e=="function"||e instanceof Date||e instanceof RegExp||e instanceof Map||e instanceof Set||e instanceof Error?!1:typeof e=="object",V=(e,t,r,n)=>{if(r>n)return;if(t.length===0)return e;let o=t[0],i=t.slice(1);if(o.type==="descendant"){let a=V(e,i,r+1,n);if(a!==void 0)return a;if(e&&typeof e=="object")if(Array.isArray(e)){let s=[];for(let l=0;l<e.length;l++){let u=V(e[l],t,r+1,n);u!==void 0&&(s[l]=u)}return s.length>0?s:void 0}else{let s={};for(let l in e)if(e.hasOwnProperty(l)){let u=V(e[l],t,r+1,n);u!==void 0&&(s[l]=u)}return Object.keys(s).length>0?s:void 0}return}switch(o.type){case"property":if(Tt(e)&&o.value&&String(o.value)in e){let a=e[String(o.value)],s=V(a,i,r+1,n);if(s!==void 0)return{[String(o.value)]:s}}break;case"index":if(Array.isArray(e)){let a=o.value;if(a>=0&&a<e.length){let s=V(e[a],i,r+1,n);if(s!==void 0){let l=new Array(e.length).filter(u=>u!==void 0);return l[a]=s,l}}}else if(e&&typeof e=="object"){let a=String(o.value);if(a in e){let s=V(e[a],i,r+1,n);if(s!==void 0)return{[a]:s}}}break;case"wildcard":if(e&&typeof e=="object")if(Array.isArray(e)){let a=[],s=!1;for(let l=0;l<e.length;l++){let u=V(e[l],i,r+1,n);u!==void 0&&(a[l]=u,s=!0)}return s?a:void 0}else{let a={},s=!1;for(let l in e)if(e.hasOwnProperty(l)){let u=V(e[l],i,r+1,n);u!==void 0&&(a[l]=u,s=!0)}return s?a:void 0}break;case"slice":if(Array.isArray(e)){let[a,s]=o.value,l=Math.max(0,a),u=Math.min(e.length,s===1/0?e.length:s),f=[],c=!1;for(let p=l;p<u;p++){let h=V(e[p],i,r+1,n);h!==void 0&&(f[p]=h,c=!0)}return c?f:void 0}break;case"union":if(Array.isArray(e)){let a=o.value,s=[],l=!1;for(let u of a)if(u>=0&&u<e.length){let f=V(e[u],i,r+1,n);f!==void 0&&(s[u]=f,l=!0)}return l?s:void 0}break;case"filter":if(Array.isArray(e)){let a=o.value,s=[],l=!1;for(let u=0;u<e.length;u++)if(a(e[u])){let f=V(e[u],i,r+1,n);f!==void 0&&(s[u]=f,l=!0)}return l?s:void 0}break}},Or=(e,t={})=>{let{type:r="auto",throwOnError:n=!1}=t;if(!e||typeof e!="string")return[];let o=[],i="",a=!1,s=!1,l="",u="",f=0,c=r==="auto"?(h=>h.includes("..")?"descendant":h.includes("[?(")?"filter":h.includes("[:")||h.includes("[0:")?"slice":h.includes("[,")||h.includes("[0,1]")?"union":h.includes("[*]")||h.includes(".*.")?"wildcard":h.includes("[]")?"array-wildcard":h.includes("[")&&h.includes("]")?"bracket":"dot")(e):r,p=h=>{let d=h.trim();if(d==="*"||d==="")return{type:"wildcard",value:d===""?"[]":"*",raw:d===""?"[]":h};if(d==="[]")return{type:"wildcard",value:"[]",raw:h};if(/^-?\d+$/.test(d))return{type:"index",value:parseInt(d,10),raw:h};if(d.includes(":")){let y=d.split(":").map(R=>R.trim()),w=y[0]===""?0:parseInt(y[0],10),k=y[1]===""?1/0:parseInt(y[1],10);if(isNaN(w)||isNaN(k)){if(n)throw new Error(`Invalid slice notation: ${h}`);return{type:"wildcard",value:"*",raw:h}}return{type:"slice",value:[w,k],raw:h}}if(d.includes(",")){let y=d.split(",").map(w=>{let k=parseInt(w.trim(),10);return isNaN(k)?-1:k}).filter(w=>w>=0);if(y.length===0){if(n)throw new Error(`Invalid union notation: ${h}`);return{type:"wildcard",value:"*",raw:h}}return{type:"union",value:y,raw:h}}if(d.startsWith("?(")&&d.endsWith(")")){let y=d.slice(2,-1);try{return{type:"filter",value:Wa(y),raw:h}}catch(w){if(n)throw w;return{type:"wildcard",value:"*",raw:h}}}return d.startsWith('"')&&d.endsWith('"')||d.startsWith("'")&&d.endsWith("'")?{type:"property",value:d.slice(1,-1),raw:h}:{type:"property",value:d,raw:h}};for(let h=0;h<e.length;h++){let d=e[h],y=e[h+1];if((d==='"'||d==="'")&&!s){s=!0,l=d;continue}else if(d===l&&s){s=!1,l="",d==='"'||d==="'"||(a?u+=d:i+=d);continue}if(s){a?u+=d:i+=d;continue}if(d==="["&&!a){i&&(o.push({type:"property",value:i,raw:i}),i=""),a=!0,u="";continue}if(d==="]"&&a&&!s){a=!1;let k=p(u);o.push(k);continue}let w=o.length>0?o[o.length-1]:null;if(d==="."&&!a&&!s){if(y==="."){let k=e.split("..")[0];o.push({type:"property",value:k,raw:k}),o.push({type:"descendant",value:"..",raw:".."}),h++}else i&&(i==="*"?o.push({type:"wildcard",value:i,raw:i}):o.push({type:"property",value:i,raw:i}),i="");continue}if(a)u+=d;else if(w&&w.type!=="descendant")i+=d;else{let k=e.split(w?.raw)[1];k!==void 0?i=k:i+=d}}return i&&o.push({type:"property",value:i,raw:i}),o.map(h=>{if(h.type==="property"&&typeof h.value=="string"&&/^-?\d+$/.test(h.value)){let d=parseInt(h.value,10);if(!isNaN(d))return{...h,type:"index",value:d}}return h})},Wa=e=>{let t=e.replace(/@\.([a-zA-Z_$][\w$]*)/g,(r,n)=>`item.${n}`).replace(/@/g,"item");try{return new Function("item",`return ${t}`)}catch{throw new Error(`Invalid filter expression: ${e}`)}},za=(e,t,r)=>{let n=Or(t),o=e;for(let i=0;i<n.length;i++){let a=n[i],s=i===n.length-1;switch(a.type){case"property":if(s)o[String(a.value)]=r;else{if(!o[String(a.value)]){let u=n[i+1];o[String(a.value)]=u.type==="index"||u.type==="slice"||u.type==="union"||u.type==="wildcard"?[]:{}}o=o[String(a.value)]}break;case"index":Array.isArray(o)||(o=[]);let l=a.value;if(s){if(l>=o.length)for(let u=o.length;u<=l;u++)o.push(void 0);o[l]=r}else{if(!o[l]){let u=n[i+1];o[l]=u.type==="index"||u.type==="slice"||u.type==="union"||u.type==="wildcard"?[]:{}}o=o[l]}break;case"wildcard":if(Array.isArray(o))if(s)for(let u=0;u<o.length;u++)o[u]=r;else{let u=n[i+1];for(let f=0;f<o.length;f++)o[f]||(o[f]=u.type==="index"||u.type==="slice"||u.type==="union"||u.type==="wildcard"?[]:{});o.length>0&&(o=o[0])}break}}}});function Ba(e,t,r){let n=new Uint8Array(t.length);e:for(let o=0;o<e.length;o++){for(let i=0;i<t.length;i++)if(!n[i]&&ne(e[o],t[i],r)){n[i]=1;continue e}return!1}return!0}var ne,li=N(()=>{"use strict";Cr();ne=(e,t,r={})=>{if(e===t)return!0;if(e==null||t==null||typeof e!=typeof t)return!1;let n=Array.isArray(e),o=Array.isArray(t);if(n!==o)return!1;if(n&&o)return e.length!==t.length?!1:r.unordered?Ba(e,t,r):e.every((y,w)=>ne(y,t[w],r));if(typeof e!="object")return e===t;let i=e instanceof Date,a=t instanceof Date;if(i!==a)return!1;if(i)return e.getTime()===t.getTime();let s=e instanceof RegExp,l=t instanceof RegExp;if(s!==l)return!1;if(s)return e.toString()===t.toString();let u=e instanceof Map,f=t instanceof Map;if(u!==f)return!1;if(u){if(e.size!==t.size)return!1;for(let[y,w]of e)if(!t.has(y)||!ne(w,t.get(y),r))return!1;return!0}let c=e instanceof Set,p=t instanceof Set;if(c!==p)return!1;if(c){if(e.size!==t.size)return!1;let y=[...t],w=new Uint8Array(y.length);e:for(let k of e){for(let R=0;R<y.length;R++)if(!w[R]&&ne(k,y[R],r)){w[R]=1;continue e}return!1}return!0}if(!Tt(e)||!Tt(t))return!1;let h=Object.keys(e),d=Object.keys(t);if(h.length!==d.length)return!1;for(let y of h)if(!Object.prototype.hasOwnProperty.call(t,y)||!ne(e[y],t[y],r))return!1;return!0}});function Ka(e){return e.startsWith("//")?e.replace(/^\/+/,"/"):e}function be(e,t,r=!1){let n=[];if(e===t)return{params:{},path:t};if(!r&&e==="/"&&t.startsWith("/"))return{params:{},path:"/"};let o=e.replace(/:([a-zA-Z0-9_]+)/g,(l,u)=>(n.push(u),"([^/]+)")).replace(/\*([a-zA-Z0-9_]*)/g,(l,u)=>(u&&n.push(u),"(.*)"));o.startsWith("/")||(o="/"+o),o===""&&(o="/");let i=new RegExp(`^${o}${r?"$":"(?=/|$)"}`),a=t.match(i);if(!a)return null;let s={};return n.forEach((l,u)=>{s[l]=a[u+1]}),{params:s,path:a[0]}}function Tr(e){let t=e.path.split("/").filter(Boolean);if(t.length===0)return 5;let r=0;for(let n of t)n.startsWith("*")?r+=1:n.startsWith(":")?r+=10:r+=100;return r}function ui(e){return[...e].sort((t,r)=>Tr(r)-Tr(t))}function oe(e,t){let r=t.length>1?t.replace(/\/+$/,"")||"/":t,n=ci(e,r);if(!n)return null;let o=[],i="",a={};for(let s of n.layers){i=Ka(Ja(i,s.consumed));let l={};for(let[u,f]of Object.entries(s.params))u in a||(l[u]=f),a[u]=f;o.push({route:s.route,component:s.route.component,params:l,pathname:i||"/"})}return{matched:o,params:a,pathname:t}}function ci(e,t){if(!e||e.length===0)return null;let r=ui(e);for(let n of r){let o=!!n.children&&n.children.length>0,i=be(n.path,t,!o);if(i){if(o){let a=ci(n.children,t);if(a)return{layers:[{route:n,params:i.params,consumed:i.path},...a.layers]};continue}return{layers:[{route:n,params:i.params,consumed:i.path}]}}}return null}function Ja(e,t){if(!e)return t;if(t===e)return e;if(t.startsWith(e))return t;let r=e.replace(/\/$/,""),n=t.replace(/^\//,"");return`${r}/${n}`}var _r=N(()=>{"use strict"});function Pr(e){let t=e,r="",n=t.indexOf("#");n!==-1&&(r=t.slice(n),t=t.slice(0,n));let o="",i=t.indexOf("?");return i!==-1&&(o=t.slice(i),t=t.slice(0,i)),{pathname:t||"/",search:o,hash:r}}function Re(e="/"){let t=[{path:e,state:null}],r=0,n=new Set,o=()=>n.forEach(i=>i());return{get(){let{path:i,state:a}=t[r];return{...Pr(i),state:a}},push(i,a=null){t=t.slice(0,r+1),t.push({path:i,state:a}),r=t.length-1,o()},replace(i,a=null){t[r]={path:i,state:a},o()},subscribe(i){return n.add(i),()=>n.delete(i)}}}function ie(){let e=typeof window<"u"?window:void 0,t=new Set,r=()=>t.forEach(n=>n());return e&&e.addEventListener("popstate",r),{get(){if(!e)return{pathname:"/",search:"",hash:"",state:null};let{pathname:n,search:o,hash:i}=e.location;return{pathname:n,search:o,hash:i,state:e.history.state??null}},push(n,o=null){e?.history.pushState(o,"",n),r()},replace(n,o=null){e?.history.replaceState(o,"",n),r()},subscribe(n){return t.add(n),()=>t.delete(n)}}}var Er=N(()=>{"use strict"});function Xa(e){let t={};return e&&new URLSearchParams(e.startsWith("?")?e.slice(1):e).forEach((n,o)=>t[o]=n),t}function Ga(e,t){if(!t)return e||"/";let r=t.replace(/\/$/,"");return e===r?"/":e.startsWith(r+"/")?e.slice(r.length)||"/":e||"/"}function Ya(e,t){return!t||/^https?:\/\//.test(e)?e:`${t.replace(/\/$/,"")}${e.startsWith("/")?e:"/"+e}`}function $r(e){let{routes:t,history:r,base:n}=e,o=new Set,i=()=>{let f=r.get();return{pathname:f.pathname,search:f.search,hash:f.hash,state:f.state,query:Xa(f.search)}},a=f=>oe(t,Ga(f,n)),s=(()=>{let f=i();return{location:f,match:a(f.pathname)}})(),l=()=>{let f=i();s={location:f,match:a(f.pathname)},o.forEach(c=>c(s))},u=r.subscribe(l);return{state(){return s},subscribe(f){return o.add(f),()=>o.delete(f)},navigate(f,c={}){let p=Ya(f,n);c.replace?r.replace(p,c.state??null):r.push(p,c.state??null)},match(f){return a(f)},destroy(){u(),o.clear()}}}var fi=N(()=>{"use strict";_r();Er()});var jr=N(()=>{"use strict";_r();Er();fi()});function pi(e,t){return async(...r)=>{let n=t+":"+JSON.stringify(r);if(ti()||typeof window<"u"){let i=ni(n);if(i!==void 0)return i}if(Me.has(n))return Me.get(n);if(Ne.has(n))return Ne.get(n);let o=Promise.resolve(e(...r)).then(i=>(Me.set(n,i),Ne.delete(n),ii()&&ri(n,i),i),i=>{throw Ne.delete(n),i});return Ne.set(n,o),o}}function di(e){let t=typeof e=="string"?r=>r.startsWith(e):e;for(let r of Me.keys())t(r)&&(Me.delete(r),Qa.add(r));Za(r=>r+1)}function hi(e,t){let[r]=G(t||(()=>!0),e);return r}function yi(e){return Rr.has(e)||Rr.set(e,v(void 0)),Rr.get(e)}function Nr(e,t){let r=t||e.name||"action",n=async o=>{let[,i]=yi(r),a=()=>i(void 0),s=()=>n(o);i({input:o,pending:!0,clear:a,retry:s});try{let l=await e(o);return i({input:o,result:l,pending:!1,clear:a,retry:s}),l}catch(l){throw i({input:o,error:l,pending:!1,clear:a,retry:s}),l}};return n.url=r,n.with=o=>Nr((...i)=>e(o,...i),t),n}function mi(e){let[t]=yi(e.url);return t}function gi(e){return e}var Me,Ne,kf,Za,Qa,Rr,el,Of,bi=N(()=>{"use strict";A();wr();yr();Me=new Map,Ne=new Map;[kf,Za]=v(0),Qa=new Set;Rr=new Map;el=me(),Of=el.Provider});var Si={};Ur(Si,{A:()=>Hr,Form:()=>fl,Link:()=>Pt,Outlet:()=>Lr,Redirect:()=>Dr,Router:()=>Mr,action:()=>Nr,cache:()=>pi,createAsync:()=>hi,createBrowserHistory:()=>ie,createMemoryHistory:()=>Re,lazy:()=>he,matchPath:()=>be,matchRoutes:()=>oe,preloadRoutes:()=>pl,revalidate:()=>di,runWithOwner:()=>j,select:()=>al,useAction:()=>gi,useLevelParams:()=>il,useLinkNavigation:()=>ll,useLocation:()=>Ie,useMatch:()=>qr,useNavigate:()=>_t,useParam:()=>Ir,useParamSelector:()=>sl,useParams:()=>De,useRouteData:()=>ul,useRouter:()=>ve,useSearchParams:()=>Fr,useSubmission:()=>mi});function tl(e,t,r){let n,o=e.route.data;if(typeof o=="function"){let f=!1;x(()=>{f=!0});let c=$(),[p]=G(()=>o({params:r.params,location:r.location},c,()=>f));n=p}let i=()=>Ai.Provider({value:n,get children(){return wi.Provider({value:e.params,get children(){return vi.Provider({value:{depth:t,...r},get children(){return z(e.component,{})}})}})}});if(!n)return i();let a=n,s=()=>a.loading,[l,u]=v(O(()=>!s()));return S(()=>u(!s())),g(()=>l()?i():null)}function xi(e){let t=e.depth+1,[r,n]=v(O(()=>e.matched()[t]?.component));return S(()=>{let o=e.matched()[t]?.component;n(()=>o)}),g(()=>{if(!r())return e.notFound?e.notFound():null;let i=O(()=>e.matched())[t];return tl(i,t,{matched:e.matched,params:e.params,location:e.location})})}function rl(e){return e==null?nl():typeof e=="function"?z(e,{}):e}function nl(){let e=de("div");C(e,"class","fx-not-found"),C(e,"role","main"),C(e,"style","min-height:60vh;display:grid;place-content:center;gap:.25rem;text-align:center;font-family:system-ui,-apple-system,sans-serif");let t=de("h1");C(t,"style","margin:0;font-size:2.5rem;font-weight:700"),F(t,"404");let r=de("p");return C(r,"style","margin:0;opacity:.7"),F(r,"This page could not be found."),e.appendChild(t),e.appendChild(r),e}function Mr(e){let t=e.history??ie(),r=$r({routes:e.routes,base:e.base,history:t}),[n,o]=v(r.state()),i=r.subscribe(o);x(()=>{i(),r.destroy()});let a=g(()=>(n().match?.matched??[]).filter(f=>f.component)),s={router:r,location:g(()=>n().location),params:g(()=>n().match?.params??{})},l={depth:-1,matched:a,params:s.params,location:s.location,notFound:()=>rl(e.notFound)},u;return Le.Provider({value:s,get children(){return u??=xi(l)}})}function Lr(){let e=H(vi);return e?xi(e):null}function Dr(e){let t=H(Le);if(t&&typeof window<"u"){let r=!1;x(()=>r=!0),queueMicrotask(()=>{r||t.router.navigate(e.to,{replace:e.replace!==!1})})}return null}function ve(){let e=H(Le);if(e)return e;if(typeof window>"u")return ol;throw new Error("[router] useRouter must be used within <Router>")}function De(){let e=ve().params;return g(()=>e(),{},{equals:(t,r)=>JSON.stringify(t)===JSON.stringify(r)})}function il(){return H(wi)??{}}function Ir(e){let t=De();return g(()=>t()[e])}function sl(e,t){let r=De();return g(()=>e(r()),void 0,t?{equals:t}:void 0)}function qr(e){let t=Ie();return g(()=>be(typeof e=="function"?e():e,t.pathname))}function Fr(){let e=Ie(),t=_t();return[g(()=>e.query),(o,i)=>{let a=new URLSearchParams(e.search);for(let[l,u]of Object.entries(o))u===null?a.delete(l):a.set(l,u);let s=a.toString();t(e.pathname+(s?`?${s}`:""),i)}]}function al(e,t){let r=(n,o)=>ne(n,o);return t!==void 0?g(()=>Ct(e(),t),void 0,{equals:r}):g(e,void 0,{equals:r})}function Ie(){let{location:e}=ve();return new Proxy({},{get:(t,r)=>e()[r],has:(t,r)=>r in e(),ownKeys:()=>Reflect.ownKeys(e()),getOwnPropertyDescriptor:(t,r)=>Object.getOwnPropertyDescriptor(e(),r)})}function ll(e={}){let t=H(Le);return r=>{if(!t||r.defaultPrevented||r.button!==0||r.metaKey||r.ctrlKey||r.shiftKey||r.altKey)return;let o=r.target?.closest?.("a");if(!o||!o.getAttribute("href")||o.target&&o.target!=="_self"||o.hasAttribute("download")||/(^|\s)external(\s|$)/.test(o.getAttribute("rel")??""))return;let i=new URL(o.href);i.protocol!=="http:"&&i.protocol!=="https:"||i.origin===window.location.origin&&(i.hash&&i.pathname===window.location.pathname&&i.search===window.location.search||e.shouldNavigate&&!e.shouldNavigate(i,o)||(r.preventDefault(),t.router.navigate(i.pathname+i.search+i.hash,{replace:e.replace})))}}function _t(){let{router:e}=ve();return(t,r)=>e.navigate(t,r)}function ul(){return H(Ai)??(()=>{})}function Pt(e){let t=H(Le),r=typeof document>"u",n=()=>t?.router.navigate(X(e.href)??"",{replace:X(e.replace)}),o=de("a");C(o,"href",X(e.href)??""),e.slot&&C(o,"slot",X(e.slot));for(let a of Object.keys(e)){if(cl.has(a))continue;let s=e[a];s!=null&&typeof s!="function"&&C(o,a,String(s))}if(typeof o.addEventListener=="function")o.addEventListener("click",a=>{a.metaKey||a.ctrlKey||a.shiftKey||a.altKey||(a.preventDefault(),n())});else{let a=X(e.className??e.class)??"";a&&C(o,"class",a)}typeof o.addEventListener=="function"&&S(()=>{let a=X(e.href)??"";o.setAttribute("href",a);let s=X(e.className??e.class)??"",l=X(e.activeClass)??"",u=X(e.active)??t?.location().pathname===a;o.className=[s,u?l:""].filter(Boolean).join(" ")});let i=e.children;return i!=null&&F(o,i),o}function fl(e){let t=e.action,r=e.className??e.class,n=t.url??"",o=de("form");C(o,"method","post"),n&&C(o,"action",n),r&&C(o,"class",r);for(let a of Object.keys(e)){if(a==="action"||a==="children"||a==="class"||a==="className")continue;let s=e[a];s!=null&&typeof s!="function"&&C(o,a,String(s))}typeof o.addEventListener=="function"&&o.addEventListener("submit",a=>{a.preventDefault();let s={};new FormData(o).forEach((l,u)=>{s[u]=l}),Promise.resolve(t(s)).catch(()=>{})});let i=e.children;return i!=null&&F(o,i),o}async function pl(e,t){let r=oe(e,t);if(!r)return;let n=[];for(let o of r.matched){let i=o.component;i&&typeof i.preload=="function"&&n.push(i.preload())}await Promise.all(n)}var Le,vi,wi,Ai,ol,X,cl,Hr,Vr=N(()=>{"use strict";A();M();A();Cr();li();jr();jr();bi();At();A();Le=W(),vi=W(),wi=W(),Ai=W();ol={router:{navigate:()=>{}},location:()=>({pathname:"",search:"",hash:"",query:{}}),params:()=>({})};X=e=>typeof e=="function"?e():e,cl=new Set(["href","slot","class","className","active","activeClass","replace","children"]);Hr=Pt});var hl={};Ur(hl,{$component:()=>cr,A:()=>Hr,ClientOnly:()=>ar,DEV:()=>_e,Dynamic:()=>Eo,ErrorBoundary:()=>Ro,FRAMEWORK_NAME:()=>Qo,For:()=>Co,Fragment:()=>mr,Index:()=>To,Link:()=>Pt,Match:()=>_o,NoSsr:()=>jo,Outlet:()=>Lr,Portal:()=>$o,Redirect:()=>Dr,Router:()=>Mr,Show:()=>Oo,Store:()=>Je,Suspense:()=>Ee,Switch:()=>Po,VERSION:()=>Zo,addClass:()=>so,batch:()=>_,classMap:()=>No,cleanupDelegation:()=>Wo,composeProviders:()=>hr,createBrowserHistory:()=>ie,createComponent:()=>dt,createComputed:()=>rn,createConsumer:()=>Bo,createContext:()=>me,createContextWithProvider:()=>Uo,createDebounce:()=>fn,createDeferred:()=>cn,createEffect:()=>S,createIsomorphicState:()=>Jo,createMemo:()=>g,createMemoryHistory:()=>Re,createProvider:()=>xt,createRenderEffect:()=>T,createResource:()=>G,createRoot:()=>D,createSelector:()=>un,createSignal:()=>v,createStore:()=>Wt,delegateEvents:()=>te,devOnly:()=>pr,getFrameworkInfo:()=>_a,getOwner:()=>$,getSharedConfig:()=>ur,hydrate:()=>ft,initDelegation:()=>Vo,insert:()=>F,isDOMNode:()=>ot,isDev:()=>fr,isLitTemplateResult:()=>uo,isRenderable:()=>Ho,jsx:()=>gr,jsxs:()=>Yo,lazy:()=>he,mount:()=>ki,onCleanup:()=>x,onMount:()=>ht,onUnmount:()=>yt,portal:()=>Fo,read:()=>bn,reduce:()=>gn,removeClass:()=>ao,render:()=>ye,runWithOwner:()=>j,setAttribute:()=>C,setOwner:()=>en,setProperty:()=>pe,spread:()=>So,startClient:()=>Oi,styleMap:()=>Mo,toggleClass:()=>lo,untrack:()=>O,untrackStore:()=>zt,useCallback:()=>wt,useContext:()=>ge,useEffect:()=>Pe,useEventListener:()=>vt,useLocation:()=>Ie,useMatch:()=>qr,useMemo:()=>mt,useNavigate:()=>_t,useParam:()=>Ir,useParams:()=>De,useProvide:()=>Ko,useReducer:()=>bt,useRef:()=>gt,useRouter:()=>ve,useSearchParams:()=>Fr});A();A();var os="__fluixi_signal_next_state__",is=e=>{typeof queueMicrotask=="function"?queueMicrotask(e):Promise.resolve().then(e)},E=globalThis[os]??={consumer:null,untracked:!1,owner:null,queue:[],scheduled:!1,flushing:!1,batchDepth:0,hostSchedule:is,onSuspend:null,onError:null},hn=0,yn=1,ze=2,ss=class{constructor(){this.observers=null,this.watchers=null,this.version=0}updateIfNecessary(){}track(){if(E.untracked)return;let e=E.consumer;e&&((this.observers??=new Set).add(e),(e.sources??=new Set).add(this))}};var as=class extends ss{constructor(e,t){super(),this._threw=!1,this._initialized=!1,this.state=ze,this.sources=null,this._fn=e,this._equals=t?.equals===!1?()=>!1:t?.equals??Object.is}get(){if(E.consumer===this)throw new Error("Signal.Computed cannot read itself");if(this.track(),this.updateIfNecessary(),this._threw)throw this._error;return this._value}updateIfNecessary(){if(this.state===yn&&this.sources){for(let e of this.sources)if(e.updateIfNecessary(),this.state===ze)break}(this.state===ze||!this._initialized)&&this.recompute(),this.state=hn}recompute(){if(this.sources){for(let a of this.sources)a.observers?.delete(this);this.sources.clear()}let e=E.consumer,t=E.untracked;E.consumer=this,E.untracked=!1;let r,n=!1,o;try{r=this._fn()}catch(a){n=!0,o=a,r=this._value}finally{E.consumer=e,E.untracked=t}let i=!this._initialized||this._threw!==n||(n?o!==this._error:!this._equals(this._value,r));if(this._initialized=!0,this._threw=n,this._error=o,this._value=r,i){if(this.version++,this.observers)for(let a of[...this.observers])a.markDirty(ze);mn(this)}}markDirty(e){if(this.state>=e)return;let t=this.state===hn;if(this.state=e,t){if(this.observers)for(let r of[...this.observers])r.markDirty(yn);mn(this)}}peek(){if(this.updateIfNecessary(),this._threw)throw this._error;return this._value}};function mn(e){if(e.watchers)for(let t of[...e.watchers])t._notify(e)}function ls(e){return E.onSuspend?(E.onSuspend(e,E.owner),!0):!1}function us(){return E.owner}function cs(e,t){let r=E.owner;E.owner=e;try{return t()}finally{E.owner=r}}function fs(e){E.hostSchedule=e??(t=>{Promise.resolve().then(t)})}function ps(e){return!!e&&typeof e.then=="function"}fs(()=>{});var ds=Symbol.for("signal"),hs=Symbol.for("memo");function ys(e,t,r){let n=t,o=us(),i=new as(()=>cs(o,()=>{try{return n=e(n)}catch(s){if(ps(s))return ls(s),n;throw s}}),{equals:r?.equals}),a=(()=>i.get());return Object.defineProperty(a,ds,{value:!0,enumerable:!0}),Object.defineProperty(a,hs,{value:!0,enumerable:!0}),a}function gn(e,t,r,n){return ys(()=>e().reduce(t,r),void 0,n)}function bn(e){let t=e;for(;typeof t=="function";)t=t();return t}A();var qt=Symbol("store-raw"),vn=Symbol("store-node"),wn=Symbol("store-has"),An=Symbol("store-self"),xn=Symbol("store-track");var Sn=new WeakMap,kn=new WeakMap;function Pn(e){let[t,r]=v(e),n=t;return n.$=r,n}function Be(e){let t=Sn.get(e);return t||Sn.set(e,t={keys:new Map}),t}function On(e,t,r){let n=e.keys.get(t);return n||e.keys.set(t,n=Pn(r)),n}function Cn(e){let t=Be(e);(t.all||(t.all=Pn()))()}function Tn(e,t){e.$(typeof t=="function"?()=>t:t)}function En(e){if(e==null||typeof e!="object")return!1;if(Array.isArray(e))return!0;let t=Object.getPrototypeOf(e);return t===Object.prototype||t===null}function Ue(e){if(!En(e))return e;let t=kn.get(e);if(t)return t;let r=new Proxy(e,ms);return kn.set(e,r),r}var ms={get(e,t,r){if(t===qt||t===vn)return e;if(t===ue)return r;if(t===wn)return a=>a in e;if(t==="__proxy")return!0;if(t===xn||t===An)return Cn(e),r;let n=e[t];if(typeof n=="function"&&!Object.prototype.hasOwnProperty.call(e,t))return n;let o=Object.getOwnPropertyDescriptor(e,t);if(o&&o.get)return o.get.call(r);let i=On(Be(e),t,n)();return En(i)?Ue(i):i},set(){return!0},deleteProperty(e,t){return t in e&&ke(e,t,void 0),!0},has(e,t){return t===qt||t===ue||t===vn||t===wn||t===An||t===xn?!0:(On(Be(e),t,e[t])(),t in e)},ownKeys(e){return Cn(e),Reflect.ownKeys(e)},getOwnPropertyDescriptor(e,t){return Reflect.getOwnPropertyDescriptor(e,t)}};function ke(e,t,r){if(e[t]===r&&(r!==void 0||t in e))return;let n=Array.isArray(e),o=n?e.length:0;r===void 0?delete e[t]:e[t]=r;let i=Be(e),a=i.keys.get(t);if(a&&Tn(a,r),n&&e.length!==o){let s=i.keys.get("length");s&&Tn(s,e.length)}i.all&&i.all.$(void 0)}function _n(e,t){return typeof e=="function"?e(t):e}function Ft(e,t){for(let r of Object.keys(t)){let n=t[r],o=e[r];n&&typeof n=="object"&&!Array.isArray(n)&&o&&typeof o=="object"&&!Array.isArray(o)?Ft(o,n):ke(e,r,n)}}function Vt(e){let t=[],r=e.replace(/\[([^\]]*)\]/g,".$1");for(let n of r.split("."))n.length&&t.push(n);return t}function $n(e,t,r){let n=t.length-1;for(let i=0;i<n;i++){let a=t[i];if(a==="*"){let l=t.slice(i+1);if(Array.isArray(e))for(let u=0;u<e.length;u++)$n(e[u],l,r);return}let s=e[a];(s==null||typeof s!="object")&&(s=/^\d+$/.test(t[i+1])?[]:{},ke(e,a,s)),e=s}let o=t[n];if(o==="*"){if(Array.isArray(e))for(let i=0;i<e.length;i++)ke(e,i,_n(r,e[i]));return}ke(e,o,_n(r,e[o]))}function It(e,t,r){$n(e,Vt(t),r)}function gs(e,t){let r=t[0];if(typeof r=="function"&&t.length===1){let n=r(e);n&&n!==e&&Ft(e,n);return}if(Array.isArray(r)&&t.length===1){for(let n of r)Array.isArray(n)&&It(e,n[0],n[1]);return}if(r&&typeof r=="object"&&!Array.isArray(r)&&t.length===1){Ft(e,r);return}if(Array.isArray(t[1])&&t.length>=3){It(e,`${r}.${t[1].join(".")}`,t[2]);return}It(e,String(r),t[1])}function Ht(e){if(e==null||typeof e!="object")return e;if(Array.isArray(e))return e.map(Ht);let t={};for(let r of Object.keys(e))t[r]=Ht(e[r]);return t}function ce(e,t){let r=e;for(let n of Vt(t)){if(r==null)return;r=r[n]}return r}var Je=class{constructor(e,t={immutable:!0}){this.options=t,this.root=e,this.set=((...r)=>_(()=>gs(this.root,r)))}get state(){return Ue(this.root)}get proxy(){return Ue(this.root)}get accessor(){return(()=>Ue(this.root))}unwrap(){return this.root}getNode(e){return this.root&&this.root[e]}get(e){if(e==null||e==="")return Ke(this.state);let t=this.state;for(let r of Vt(e)){if(t==null)return;t=t[r]}return Ke(t)}select(e){return g(()=>e(this.state))}subscribe(e){return S(()=>e(this.state))}watch(e,t){let r;return S(()=>{let n=e(this.state);Object.is(n,r)||(t(n,r),r=n)})}reactive(e){return g(()=>this.state[e])}produce(e){this.set((t=>{let r=Ht(t);return e(r),r}))}reconcile(e,t={}){this.set(e)}push(e,...t){let r=ce(this.root,e);this.set(e,r.concat(t))}pop(e){let t=ce(this.root,e).slice(),r=t.pop();return this.set(e,t),r}shift(e){let t=ce(this.root,e).slice(),r=t.shift();return this.set(e,t),r}splice(e,t,r,...n){let o=ce(this.root,e).slice(),i=o.splice(t,r,...n);return this.set(e,o),i}insert(e,t,r){let n=ce(this.root,e).slice();n.splice(t,0,r),this.set(e,n)}removeAt(e,t){let r=ce(this.root,e).slice(),n=r.splice(t,1);return this.set(e,r),n}toObservable(){let[e]=v(this.state);return e.toObservable()}dispose(){}},bs=["get","select","watch","subscribe","produce","reconcile","push","pop","shift","splice","insert","removeAt","unwrap","toObservable"];function vs(e,t){for(let r of bs)e[r]=t[r].bind(t);e.$=t.reactive.bind(t)}function Wt(e,t={immutable:!0}){let r=new Je(e,t);return vs(r.set,r),[r.proxy,r.set]}function ws(e,t={}){return new Je(e,{...t,immutable:!1})}function Ke(e){if(e==null||typeof e!="object")return e;let t=e[qt];return t!==void 0?t:e}function zt(e){return O(()=>Ke(e))}var Cl=Object.freeze({createStore:Wt,createMutableStore:ws,batch:_,unwrap:Ke,untrackStore:zt});A();M();var Lo="1.0.0-alpha.80";M();co(Lo);M();M();A();var ba={context:null,owner:null};function ur(){return ba}var _e=typeof process<"u"&&!1,lr=Symbol.for("fluixi-lifecycle");function Do(){let e=$();if(!e)return null;if(!e[lr]){let t={mounts:[],effects:[],scheduled:!1};e[lr]=t}return e[lr]}function Io(e){if(e.scheduled)return;e.scheduled=!0;let t=$();queueMicrotask(()=>{if(Zr(t)){e.mounts=[],e.effects=[];return}j(t,()=>{for(let r of e.mounts)try{let n=r();typeof n=="function"&&x(n)}catch(n){console.error("Error in onMount callback:",n)}for(let r of e.effects){let n;S(()=>{n&&n(),n=r()}),x(()=>{n&&n()})}e.mounts=[],e.effects=[]})})}function dt(e,t){return z(e,t)}function cr(e,t){let r=typeof e=="function"?O(()=>e(t)):e;if(r!=null&&(typeof r=="function"||typeof r=="object")&&!P(r)){try{r.$name=e.name}catch{}return Ce(r)}return r}function ht(e,t=!0){let r=Do();if(r){if(!t){r.scheduled||e();return}r.mounts.push(e),Io(r)}else{if(!t){e();return}S(()=>{let n=O(e);typeof n=="function"&&x(n)})}}function yt(e){x(e)}function Pe(e){let t=Do();if(t)t.effects.push(e),Io(t);else{let r;S(()=>{r&&r(),r=e()}),x(()=>{r&&r()})}}function mt(e){return g(e)}function gt(e){let t={current:e};return x(()=>{t.current=null}),t}function bt(e,t){let[r,n]=v(t);return[r,i=>{n(e(r(),i))}]}function vt(e,t,r,n){Pe(()=>{let o=e&&"current"in e?e.current:e;if(o)return o.addEventListener(t,r,n),()=>{o.removeEventListener(t,r,n)}})}function wt(e){return e}function fr(){return _e}function pr(e){_e&&e()}A();M();function qo(e){return!!(e&&typeof e=="object"&&typeof e.then=="function"||e instanceof Promise)}var va=W();function Ee(e){return z(wa,e)}function wa(e){let t=dn(),r=H(va),n=r?r.register(t.inFallback):void 0;function o(c){return c==null||typeof c=="boolean"?null:typeof c=="function"&&J(c)&&!P(c)?c():c}let i=bo(()=>o(e.fallback??null)),a=Dt(t,()=>Q(()=>e.children)),s=(c,p)=>{if(!(p>8))if(Array.isArray(c))for(let h of c)s(h,p+1);else typeof c=="function"&&P(c)&&s(c(),p+1)};Dt(t,()=>{T(()=>s(a,0))});let[l,u]=v(void 0),f=qo(a);return f&&(t.increment(),a.then(c=>{u(()=>c),t.decrement()},()=>t.decrement())),g(()=>{let c=n?n.showFallback():t.inFallback();return process.env.FX_DEBUG&&console.log("[s] output; showFallback:",c),c?i:f?l():a})}po(Ee);Object.defineProperty(Ee,"__suspense",{value:!0,enumerable:!0});At();At();var dr=typeof window>"u";function ye(e,t,r={}){if(te(["click","input","change","submit"]),dr)throw new Error("render() is for client-side only. Use renderToString() on server.");if(!t)throw new Error("Container element is required");let n;return D(o=>{n=o;let i=typeof e=="function"?e():e;t.textContent="",it(t),st(),F(t,()=>i)}),()=>{n&&(n(),n=void 0)}}function Aa(e){return e&&typeof e=="object"&&(e._$litType$!==void 0||e._$litDirective$!==void 0)}function Fo(e,t,r={}){let n=document.createElement("div");n.setAttribute("data-portal","true"),t.appendChild(n);let o=ye(e,n,r);return()=>{o(),t.contains(n)&&t.removeChild(n)}}function Ho(e){return!!(e==null||typeof e=="function"||ot(e)||Aa(e)||Array.isArray(e)||typeof e=="string"||typeof e=="number"||typeof e=="boolean")}function Vo(){dr||te(["click","input","change","submit"])}function Wo(){}yr();A();M();var Sa="__fluixi_iso_states__",ka="__iso:";function Oa(){return globalThis[Sa]??=new Map}function Ca(e){if(typeof window>"u")return;let t=sr();return t?t[ka+e]:void 0}function Jo(e,t){let r=Ca(e),n=r!==void 0?r:typeof window<"u"&&t.client?t.client():t.fallback,[o,i]=v(n);return Oa().set(e,{server:t.server,set:i}),{value:o,set:i,key:e}}M();M();M();M();M();A();var mr=Symbol.for("fluixi.fragment"),Xo=typeof window>"u";function Go(e){return e==null||e===!1?null:Array.isArray(e)?e.map(Go).flat():e}function gr(e,t,r){if(e==null)return null;let n=t||{};if(r!==void 0&&(n.key=r),e===mr)return g(()=>Ce(Go(n.children)));if(typeof e=="function"){let{type:o}=ho(e);return e.$$typeof===Symbol.for("react.provider")||o==="provider"?e(n):Xo?{type:e,props:n}:g(()=>z(e,n),void 0,{name:"jsx component"})}return typeof e=="string"&&e.trim().length>0?Ta(e,n):null}var Yo=gr;function Ta(e,t){return Xo?{type:e,props:t||{}}:ko(e,t)}var Zo="0.0.1",Qo="Fluixi";function _a(){return{name:Qo,version:Zo,features:{ssr:!0,hydration:!0,jsx:!0,litHtml:!0,signals:!0,fineGrained:!0,lazy:!0,hooks:!0,devMode:!0}}}M();wr();A();function re(e){return typeof e=="function"?e():e}function Ea(e){if(typeof e=="string")return e;let t=[];return t.push(e.index===!1?"noindex":"index"),t.push(e.follow===!1?"nofollow":"follow"),e.noarchive&&t.push("noarchive"),e.nosnippet&&t.push("nosnippet"),e.noimageindex&&t.push("noimageindex"),e.maxSnippet!=null&&t.push(`max-snippet:${e.maxSnippet}`),e.maxImagePreview&&t.push(`max-image-preview:${e.maxImagePreview}`),e.maxVideoPreview!=null&&t.push(`max-video-preview:${e.maxVideoPreview}`),t.join(", ")}function Ar(){let e=[],[t,r]=v(0);return{sources:e,version:t,push(n){return e.push(n),r(o=>o+1),()=>{let o=e.indexOf(n);o!==-1&&(e.splice(o,1),r(i=>i+1))}}}}var $a=null;function xr(e){$a=e}function kt(e){let t=5381;for(let r=0;r<e.length;r++)t=t*33^e.charCodeAt(r);return(t>>>0).toString(36)}function ja(e){return e.charset!=null?"meta:charset":e.property?"meta:property:"+e.property:e.name?"meta:name:"+e.name:e["http-equiv"]?"meta:http-equiv:"+e["http-equiv"]:"meta:"+kt(JSON.stringify(e))}function Ra(e,t){let r=typeof t=="string"?{url:t}:t;e.push({tag:"meta",key:"meta:property:og:image:"+r.url,attrs:{property:"og:image",content:r.url}}),r.secureUrl&&e.push({tag:"meta",key:"meta:property:og:image:secure:"+r.url,attrs:{property:"og:image:secure_url",content:r.secureUrl}}),r.type&&e.push({tag:"meta",key:"meta:property:og:image:type:"+r.url,attrs:{property:"og:image:type",content:r.type}}),r.width!=null&&e.push({tag:"meta",key:"meta:property:og:image:width:"+r.url,attrs:{property:"og:image:width",content:String(r.width)}}),r.height!=null&&e.push({tag:"meta",key:"meta:property:og:image:height:"+r.url,attrs:{property:"og:image:height",content:String(r.height)}}),r.alt&&e.push({tag:"meta",key:"meta:property:og:image:alt:"+r.url,attrs:{property:"og:image:alt",content:r.alt}})}function Na(e,t){let r=(n,o)=>{o!=null&&t.push({tag:"meta",key:"meta:property:og:"+n,attrs:{property:"og:"+n,content:o}})};r("title",e.title),r("description",e.description),r("type",e.type),r("url",e.url),r("site_name",e.siteName),r("locale",e.locale);for(let n of e.localeAlternate??[])t.push({tag:"meta",key:"meta:property:og:locale:alt:"+n,attrs:{property:"og:locale:alternate",content:n}});if(e.image!=null){let n=Array.isArray(e.image)?e.image:[e.image];for(let o of n)Ra(t,o)}if(e.video){let n=typeof e.video=="string"?{url:e.video}:e.video;r("video",n.url),"type"in n&&n.type&&r("video:type",n.type),"width"in n&&n.width!=null&&r("video:width",String(n.width)),"height"in n&&n.height!=null&&r("video:height",String(n.height))}if(e.audio){let n=typeof e.audio=="string"?{url:e.audio}:e.audio;r("audio",n.url),"type"in n&&n.type&&r("audio:type",n.type)}if(e.article){let n=e.article;r("article:published_time",n.publishedTime),r("article:modified_time",n.modifiedTime),r("article:expiration_time",n.expirationTime),r("article:section",n.section);for(let o of[].concat(n.author??[]))t.push({tag:"meta",key:"meta:property:og:article:author:"+o,attrs:{property:"article:author",content:o}});for(let o of[].concat(n.tag??[]))t.push({tag:"meta",key:"meta:property:og:article:tag:"+o,attrs:{property:"article:tag",content:o}})}if(e.book){let n=e.book;r("book:isbn",n.isbn),r("book:release_date",n.releaseDate);for(let o of[].concat(n.author??[]))t.push({tag:"meta",key:"meta:property:og:book:author:"+o,attrs:{property:"book:author",content:o}});for(let o of[].concat(n.tag??[]))t.push({tag:"meta",key:"meta:property:og:book:tag:"+o,attrs:{property:"book:tag",content:o}})}if(e.profile){let n=e.profile;r("profile:first_name",n.firstName),r("profile:last_name",n.lastName),r("profile:username",n.username),r("profile:gender",n.gender)}}function Ma(e,t){let r=(n,o)=>{o!=null&&t.push({tag:"meta",key:"meta:name:twitter:"+n,attrs:{name:"twitter:"+n,content:o}})};r("card",e.card),r("site",e.site),r("creator",e.creator),r("title",e.title),r("description",e.description),r("image",e.image),r("image:alt",e.imageAlt),r("player",e.player),e.playerWidth!=null&&r("player:width",String(e.playerWidth)),e.playerHeight!=null&&r("player:height",String(e.playerHeight)),e.app&&(r("app:name:iphone",e.app.name),r("app:id:iphone",e.app.idIphone),r("app:id:ipad",e.app.idIpad),r("app:id:googleplay",e.app.idGooglePlay))}function La(e,t){let r=(n,o)=>t.push({tag:"link",key:n,attrs:o});if(e.icon!=null){let n=typeof e.icon=="string"?[{url:e.icon}]:e.icon;for(let o of n)r("link:icon:"+o.url,{rel:"icon",href:o.url,...o.type?{type:o.type}:{},...o.sizes?{sizes:o.sizes}:{}})}if(e.apple!=null){let n=typeof e.apple=="string"?[{url:e.apple}]:e.apple;for(let o of n)r("link:apple-touch-icon:"+o.url,{rel:"apple-touch-icon",href:o.url,...o.sizes?{sizes:o.sizes}:{}})}e.mask&&r("link:mask-icon",{rel:"mask-icon",href:e.mask.url,...e.mask.color?{color:e.mask.color}:{}}),e.shortcut&&r("link:shortcut",{rel:"shortcut icon",href:e.shortcut}),e.msTileImage&&t.push({tag:"meta",key:"meta:name:msapplication-TileImage",attrs:{name:"msapplication-TileImage",content:e.msTileImage}}),e.msTileColor&&t.push({tag:"meta",key:"meta:name:msapplication-TileColor",attrs:{name:"msapplication-TileColor",content:e.msTileColor}})}function Da(e,t,r){let n=(c,p)=>t.push({tag:"meta",key:c,attrs:p}),o=re(e.title);o!==void 0&&(r.title=o),e.titleTemplate!==void 0&&(r.template=e.titleTemplate);let i=re(e.lang);i!==void 0&&t.push({tag:"htmlAttr",key:"html:lang",name:"lang",value:i}),e.charset!==void 0&&n("meta:charset",{charset:e.charset}),e.viewport!==void 0&&n("meta:name:viewport",{name:"viewport",content:e.viewport});let a=re(e.description);a!==void 0&&n("meta:name:description",{name:"description",content:a});let s=re(e.keywords);s!==void 0&&n("meta:name:keywords",{name:"keywords",content:Array.isArray(s)?s.join(", "):s}),e.author!==void 0&&n("meta:name:author",{name:"author",content:e.author}),e.robots!==void 0&&n("meta:name:robots",{name:"robots",content:Ea(e.robots)}),e.generator!==void 0&&n("meta:name:generator",{name:"generator",content:e.generator}),e.applicationName!==void 0&&n("meta:name:application-name",{name:"application-name",content:e.applicationName}),e.referrer!==void 0&&n("meta:name:referrer",{name:"referrer",content:e.referrer}),e.colorScheme!==void 0&&n("meta:name:color-scheme",{name:"color-scheme",content:e.colorScheme});let l=re(e.themeColor);l!==void 0&&n("meta:name:theme-color",{name:"theme-color",content:l});let u=re(e.canonical);if(u!==void 0&&t.push({tag:"link",key:"link:rel:canonical",attrs:{rel:"canonical",href:u}}),e.manifest!==void 0&&t.push({tag:"link",key:"link:rel:manifest",attrs:{rel:"manifest",href:e.manifest}}),e.base!==void 0&&t.push({tag:"base",key:"base",attrs:{href:e.base}}),e.verification){let c={google:"google-site-verification",bing:"msvalidate.01",yandex:"yandex-verification",pinterest:"p:domain_verify"};for(let[p,h]of Object.entries(e.verification)){if(h==null)continue;let d=c[p]??p;n("meta:name:"+d,{name:d,content:h})}}for(let c of e.alternates??[])t.push({tag:"link",key:"link:alternate:hreflang:"+c.hreflang,attrs:{rel:"alternate",hreflang:c.hreflang,href:c.href}});for(let c of e.feeds??[])t.push({tag:"link",key:"link:alternate:feed:"+c.href,attrs:{rel:"alternate",type:c.type??"application/rss+xml",href:c.href,...c.title?{title:c.title}:{}}});e.og&&Na(e.og,t),e.twitter&&Ma(e.twitter,t),e.icons&&La(e.icons,t);let f=re(e.jsonLd);if(f!==void 0){let c=Array.isArray(f)?f:[f];for(let p of c){let h=JSON.stringify(p);t.push({tag:"script",key:"script:ldjson:"+kt(h),attrs:{type:"application/ld+json"},children:h})}}for(let c of e.meta??[]){let p={};for(let[h,d]of Object.entries(c))d!=null&&(p[h==="httpEquiv"?"http-equiv":h]=d);t.push({tag:"meta",key:ja(p),attrs:p})}for(let c of e.link??[]){let p={};for(let[h,d]of Object.entries(c))d!=null&&(p[h]=d);t.push({tag:"link",key:"link:"+(p.rel??"")+":"+(p.href??kt(JSON.stringify(p))),attrs:p})}for(let c of e.script??[]){let p={},h;for(let[d,y]of Object.entries(c))y!=null&&(d==="children"?h=y:p[d]=y);t.push({tag:"script",key:"script:"+(p.src??kt((h??"")+JSON.stringify(p))),attrs:p,children:h})}}function Ia(e,t){return typeof e=="function"?e(t):e.includes("%s")?e.replace("%s",t):e}function Ot(e){let t=[],r={};for(let i of e.sources){let a=typeof i=="function"?i():i;Da(a,t,r)}r.title!==void 0&&t.push({tag:"title",key:"title",children:r.template?Ia(r.template,r.title):r.title});let n=new Map,o={};for(let i of t){if(i.tag==="htmlAttr"){o[i.name]=i.value;continue}n.set(i.key,i)}return{tags:[...n.values()],htmlAttrs:o}}var $e="data-fh",je="data-fh-key";function Sr(e){for(let t=e.firstChild;t;t=t.nextSibling)if(t.nodeType===8&&t.data.startsWith("fh:")){t.parentNode?.removeChild(t);return}}A();function si(e,t){for(let r of Array.from(e.attributes))r.name===$e||r.name===je||r.name in t||e.removeAttribute(r.name);for(let[r,n]of Object.entries(t))e.getAttribute(r)!==n&&e.setAttribute(r,n)}function qa(e){let t=document.createElement(e.tag);return si(t,e.attrs),t.setAttribute($e,""),t.setAttribute(je,e.key),e.tag==="script"&&e.children!=null&&(t.textContent=e.children),t}function Fa(e,t){let r=document.head,n=new Map;for(let a of Array.from(r.querySelectorAll(`[${$e}]`))){let s=a.getAttribute(je);a.tagName!=="TITLE"&&s&&n.set(s,a)}let o=null,i=new Set;for(let a of e){if(a.tag==="title"){o=a.children;continue}if(a.tag==="htmlAttr")continue;i.add(a.key);let s=n.get(a.key);s&&s.tagName===a.tag.toUpperCase()?(si(s,a.attrs),a.tag==="script"&&(s.textContent??"")!==(a.children??"")&&(s.textContent=a.children??"")):(s&&s.remove(),r.appendChild(qa(a)))}for(let[a,s]of n)i.has(a)||s.remove();o!=null&&document.title!==o&&(document.title=o);for(let[a,s]of Object.entries(t))document.documentElement.getAttribute(a)!==s&&document.documentElement.setAttribute(a,s)}function kr(e){return D(t=>(S(()=>{e.version();let{tags:r,htmlAttrs:n}=Ot(e);Fa(r,n)}),x(()=>{}),t))}function ki(e,t){if(!t)throw new Error("Container element not found for mount()");ir(()=>e(),t)}async function Oi(e,t={}){let r=typeof t.root=="string"?document.querySelector(t.root):t.root??document.querySelector("#app");if(!r)throw new Error(`[Fluixi] Mount container not found: ${t.root??"#app"}`);let n=!!document.getElementById("__FLUIXI_HYDRATION__")||!!t.routes&&r.firstElementChild!=null,o=t.hydrate??n,i=Ar();if(xr(i),Sr(r),o){if(t.routes&&t.routes.length){let{preloadRoutes:a}=await Promise.resolve().then(()=>(Vr(),Si));await a(t.routes,window.location.pathname)}oi(),br(!0),ft(()=>e(),r),dl(),setTimeout(()=>{br(!1),vr()},100)}else ye(()=>e(),r);kr(i)}function dl(){if(typeof window>"u")return;let e=window;typeof e.__FX_REPLAY_STOP__=="function"&&e.__FX_REPLAY_STOP__();let t=e.__FX_REPLAY__;if(e.__FX_REPLAY__=void 0,e.__FX_REPLAY_STOP__=void 0,!(!Array.isArray(t)||t.length===0))for(let r of t){let n=r&&r.target;if(!n||n.isConnected===!1||typeof n.dispatchEvent!="function")continue;let o=r.type,i=o==="click"?new MouseEvent(o,{bubbles:!0,cancelable:!0}):new Event(o,{bubbles:!0,cancelable:!0});n.dispatchEvent(i)}}Vr();return $i(hl);})();
|
package/dist/fluixi.d.ts
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var G=Object.defineProperty;var Q=Object.getOwnPropertyDescriptor;var Z=Object.getOwnPropertyNames;var ee=Object.prototype.hasOwnProperty;var k=(e,t,n,o)=>{if(t&&typeof t=="object"||typeof t=="function")for(let r of Z(t))!ee.call(e,r)&&r!==n&&G(e,r,{get:()=>t[r],enumerable:!(o=Q(t,r))||o.enumerable});return e},_e=(e,t,n)=>(k(e,t,"default"),n&&k(n,t,"default"));import{createSignal as w,createMemo as d,createResource as Ce,createEffect as S,getOwner as Pe,onCleanup as O,untrack as A}from"@fluixi/reactive/signal";import{insert as v,createComponent as z,createNativeElement as g,setAttribute as u}from"@fluixi/dom";import{createContext as C,useContext as p}from"@fluixi/reactive/signal";import{get as Re}from"@fluixi/utils/object";import{deepEqual as be}from"@fluixi/utils/compare";import{createRouter as Ae,createBrowserHistory as we,matchRoutes as Se,matchPath as Oe}from"@fluixi/router";import{createMemoryHistory as Ot,createBrowserHistory as Lt,matchRoutes as kt,matchPath as Dt}from"@fluixi/router";import{createResource as ue,createSignal as F}from"@fluixi/reactive/signal";var D=!1,T=new Map;function N(){return D}function Fe(e){D=e}function M(e,t){T.set(e,t)}function E(e){return T.get(e)}function te(){T.clear()}function Ie(){if(typeof window>"u")return!1;let e=document.getElementById("__FLUIXI_HYDRATION__");if(!e||e.getAttribute("type")!=="application/json")return!1;try{let t=e.textContent||"{}",n=JSON.parse(t);for(let[o,r]of Object.entries(n))T.set(o,r);return!0}catch(t){return console.error("Failed to deserialize hydration data:",t),!1}}function ne(){if(typeof window>"u")return;let e=document.getElementById("__FLUIXI_HYDRATION__");e&&e.remove();let t=document.createTreeWalker(document.body,NodeFilter.SHOW_COMMENT,null),n=[],o;for(;o=t.nextNode();){let r=o,a=r.nodeValue||"";(a.startsWith("#")||a.startsWith("/"))&&n.push(r)}n.forEach(r=>r.remove()),te()}typeof window<"u"&&window.addEventListener("load",()=>{setTimeout(ne,100)});function H(){return typeof window>"u"}import{asProvider as re}from"@fluixi/dom";import{createContext as oe,useContext as ae}from"@fluixi/reactive/signal";import{readChildren as ie}from"@fluixi/reactive/signal";var _=!1;function se(){_||(_=!0,!(typeof process<"u")&&console.warn("[fluixi] createProvider({ context, value, children }) reads `children` eagerly: the object literal materialises `children` BEFORE the context is stamped, so a routed <Outlet/> that has siblings inside the provider renders detached and its descendants see no context under SSR. Use the lazy form instead:\n createProvider(Context, value, props) // children stays a getter\n // or JSX: <Context.Provider value={…}>{props.children}</Context.Provider>"))}function V(e,t,n){let o=!!e?.Provider,r=o?e:e.context,a=o?t:e.value,i=o?!1:e.debug??!1;o||se();let s=typeof a=="function"?a():a,c=o?n:e;return r.Provider({value:s,get children(){return c?.children},debug:i})}function qe(e){let t=P(e);return[t,o=>V(t,o.value,o)]}function ce(e,t){if(e.length===0)return ie(()=>t);let[n,o]=e[0],r=e.slice(1);return V(n,o,{get children(){return ce(r,t)}})}function Be(e){return t=>{let n=R(e);return t.children(n)}}function Je(e,t){let n=R(e);return n===e.defaultValue?t():n}function P(e){let t=oe(e),n=o=>(o.debug,t.Provider({value:o.value,get children(){return o.children},debug:o.debug}));return typeof Symbol<"u"&&Symbol.for&&(n.$$typeof=Symbol.for("react.provider")),n.$$typeof=Symbol.for("react.provider"),{id:t.id,Provider:re(n),defaultValue:e}}function R(e){let t=ae(e);return t!==void 0?t:e.defaultValue}var m=new Map,y=new Map;function de(e,t){return async(...n)=>{let o=t+":"+JSON.stringify(n);if(N()||typeof window<"u"){let a=E(o);if(a!==void 0)return a}if(m.has(o))return m.get(o);if(y.has(o))return y.get(o);let r=Promise.resolve(e(...n)).then(a=>(m.set(o,a),y.delete(o),H()&&M(o,a),a),a=>{throw y.delete(o),a});return y.set(o,r),r}}var[et,le]=F(0),fe=new Set;function pe(e){let t=typeof e=="string"?n=>n.startsWith(e):e;for(let n of m.keys())t(n)&&(m.delete(n),fe.add(n));le(n=>n+1)}function ye(e,t){let[n]=ue(t||(()=>!0),e);return n}var b=new Map;function I(e){return b.has(e)||b.set(e,F(void 0)),b.get(e)}function K(e,t){let n=t||e.name||"action",o=async r=>{let[,a]=I(n),i=()=>a(void 0),s=()=>o(r);a({input:r,pending:!0,clear:i,retry:s});try{let c=await e(r);return a({input:r,result:c,pending:!1,clear:i,retry:s}),c}catch(c){throw a({input:r,error:c,pending:!1,clear:i,retry:s}),c}};return o.url=n,o.with=r=>K((...a)=>e(r,...a),t),o}function me(e){let[t]=I(e.url);return t}function ge(e){return e}var he=P(),tt=he.Provider;import{untrack as j,createMemo as xe,createResource as Te}from"@fluixi/reactive/signal";function ve(e,t){let n,o,r;function a(){return o||(o=e().then(s=>n=s.default)),o}t?.preload&&a();let i=(s=>{if(n){let c=n;return j(()=>c(s))}if(!r){let[c]=Te(()=>a(),{transport:!1});if(r=c,c.error)throw c.error}return xe(()=>{let c=r();return c?j(()=>c(s)):void 0},void 0,{name:"lazy"})});return i.preload=()=>a().then(()=>{}),i.$lazy=!0,i.loader=e,i}import{runWithOwner as Ht}from"@fluixi/reactive/signal";var h=C(),U=C(),$=C(),W=C();function Le(e,t,n){let o,r=e.route.data;if(typeof r=="function"){let x=!1;O(()=>{x=!0});let X=Pe(),[Y]=Ce(()=>r({params:n.params,location:n.location},X,()=>x));o=Y}let a=()=>W.Provider({value:o,get children(){return $.Provider({value:e.params,get children(){return U.Provider({value:{depth:t,...n},get children(){return z(e.component,{})}})}})}});if(!o)return a();let i=o,s=()=>i.loading,[c,l]=w(A(()=>!s()));return S(()=>l(!s())),d(()=>c()?a():null)}function q(e){let t=e.depth+1,[n,o]=w(A(()=>e.matched()[t]?.component));return S(()=>{let r=e.matched()[t]?.component;o(()=>r)}),d(()=>{if(!n())return e.notFound?e.notFound():null;let a=A(()=>e.matched())[t];return Le(a,t,{matched:e.matched,params:e.params,location:e.location})})}function ke(e){return e==null?De():typeof e=="function"?z(e,{}):e}function De(){let e=g("div");u(e,"class","fx-not-found"),u(e,"role","main"),u(e,"style","min-height:60vh;display:grid;place-content:center;gap:.25rem;text-align:center;font-family:system-ui,-apple-system,sans-serif");let t=g("h1");u(t,"style","margin:0;font-size:2.5rem;font-weight:700"),v(t,"404");let n=g("p");return u(n,"style","margin:0;opacity:.7"),v(n,"This page could not be found."),e.appendChild(t),e.appendChild(n),e}function ft(e){let t=e.history??we(),n=Ae({routes:e.routes,base:e.base,history:t}),[o,r]=w(n.state()),a=n.subscribe(r);O(()=>{a(),n.destroy()});let i=d(()=>(o().match?.matched??[]).filter(x=>x.component)),s={router:n,location:d(()=>o().location),params:d(()=>o().match?.params??{})},c={depth:-1,matched:i,params:s.params,location:s.location,notFound:()=>ke(e.notFound)},l;return h.Provider({value:s,get children(){return l??=q(c)}})}function pt(){let e=p(U);return e?q(e):null}function yt(e){let t=p(h);if(t&&typeof window<"u"){let n=!1;O(()=>n=!0),queueMicrotask(()=>{n||t.router.navigate(e.to,{replace:e.replace!==!1})})}return null}var Ne={router:{navigate:()=>{}},location:()=>({pathname:"",search:"",hash:"",query:{}}),params:()=>({})};function L(){let e=p(h);if(e)return e;if(typeof window>"u")return Ne;throw new Error("[router] useRouter must be used within <Router>")}function B(){let e=L().params;return d(()=>e(),{},{equals:(t,n)=>JSON.stringify(t)===JSON.stringify(n)})}function mt(){return p($)??{}}function gt(e){let t=B();return d(()=>t()[e])}function ht(e,t){let n=B();return d(()=>e(n()),void 0,t?{equals:t}:void 0)}function xt(e){let t=J();return d(()=>Oe(typeof e=="function"?e():e,t.pathname))}function Tt(){let e=J(),t=Me();return[d(()=>e.query),(r,a)=>{let i=new URLSearchParams(e.search);for(let[c,l]of Object.entries(r))l===null?i.delete(c):i.set(c,l);let s=i.toString();t(e.pathname+(s?`?${s}`:""),a)}]}function vt(e,t){let n=(o,r)=>be(o,r);return t!==void 0?d(()=>Re(e(),t),void 0,{equals:n}):d(e,void 0,{equals:n})}function J(){let{location:e}=L();return new Proxy({},{get:(t,n)=>e()[n],has:(t,n)=>n in e(),ownKeys:()=>Reflect.ownKeys(e()),getOwnPropertyDescriptor:(t,n)=>Object.getOwnPropertyDescriptor(e(),n)})}function Ct(e={}){let t=p(h);return n=>{if(!t||n.defaultPrevented||n.button!==0||n.metaKey||n.ctrlKey||n.shiftKey||n.altKey)return;let r=n.target?.closest?.("a");if(!r||!r.getAttribute("href")||r.target&&r.target!=="_self"||r.hasAttribute("download")||/(^|\s)external(\s|$)/.test(r.getAttribute("rel")??""))return;let a=new URL(r.href);a.protocol!=="http:"&&a.protocol!=="https:"||a.origin===window.location.origin&&(a.hash&&a.pathname===window.location.pathname&&a.search===window.location.search||e.shouldNavigate&&!e.shouldNavigate(a,r)||(n.preventDefault(),t.router.navigate(a.pathname+a.search+a.hash,{replace:e.replace})))}}function Me(){let{router:e}=L();return(t,n)=>e.navigate(t,n)}function Pt(){return p(W)??(()=>{})}var f=e=>typeof e=="function"?e():e,Ee=new Set(["href","slot","class","className","active","activeClass","replace","children"]);function He(e){let t=p(h),n=typeof document>"u",o=()=>t?.router.navigate(f(e.href)??"",{replace:f(e.replace)}),r=g("a");u(r,"href",f(e.href)??""),e.slot&&u(r,"slot",f(e.slot));for(let i of Object.keys(e)){if(Ee.has(i))continue;let s=e[i];s!=null&&typeof s!="function"&&u(r,i,String(s))}if(typeof r.addEventListener=="function")r.addEventListener("click",i=>{i.metaKey||i.ctrlKey||i.shiftKey||i.altKey||(i.preventDefault(),o())});else{let i=f(e.className??e.class)??"";i&&u(r,"class",i)}typeof r.addEventListener=="function"&&S(()=>{let i=f(e.href)??"";r.setAttribute("href",i);let s=f(e.className??e.class)??"",c=f(e.activeClass)??"",l=f(e.active)??t?.location().pathname===i;r.className=[s,l?c:""].filter(Boolean).join(" ")});let a=e.children;return a!=null&&v(r,a),r}var Rt=He;function bt(e){let t=e.action,n=e.className??e.class,o=t.url??"",r=g("form");u(r,"method","post"),o&&u(r,"action",o),n&&u(r,"class",n);for(let i of Object.keys(e)){if(i==="action"||i==="children"||i==="class"||i==="className")continue;let s=e[i];s!=null&&typeof s!="function"&&u(r,i,String(s))}typeof r.addEventListener=="function"&&r.addEventListener("submit",i=>{i.preventDefault();let s={};new FormData(r).forEach((c,l)=>{s[l]=c}),Promise.resolve(t(s)).catch(()=>{})});let a=e.children;return a!=null&&v(r,a),r}async function At(e,t){let n=Se(e,t);if(!n)return;let o=[];for(let r of n.matched){let a=r.component;a&&typeof a.preload=="function"&&o.push(a.preload())}await Promise.all(o)}export{_e as a,ve as b,V as c,qe as d,ce as e,Be as f,Je as g,P as h,R as i,Fe as j,Ie as k,ne as l,de as m,pe as n,ye as o,K as p,me as q,ge as r,ft as s,pt as t,yt as u,L as v,B as w,mt as x,gt as y,ht as z,xt as A,Tt as B,vt as C,J as D,Ct as E,Me as F,Pt as G,He as H,Rt as I,bt as J,At as K,Ot as L,Lt as M,kt as N,Dt as O,Ht as P};
|