@fluixi/core 1.0.0-alpha.92 → 1.0.0-alpha.94
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cdn/core.global.js +2 -2
- package/dist/src/cdn/{chunk-MDJLC3PE.mjs → chunk-7XM7Q5VR.mjs} +271 -229
- package/dist/src/cdn/core.cjs +360 -253
- package/dist/src/cdn/core.mjs +92 -20
- package/dist/src/cdn/{router-JYFZP3EZ.mjs → router-VOY43YNM.mjs} +7 -3
- package/dist/src/index.cjs +548 -232
- package/dist/src/index.mjs +549 -224
- package/dist/src/lib/client/chunk-TSXM2PNY.mjs +53 -0
- package/dist/src/lib/client/index.cjs +310 -176
- package/dist/src/lib/client/index.d.ts.map +1 -1
- package/dist/src/lib/client/index.js +33 -18
- package/dist/src/lib/client/index.mjs +86 -15
- package/dist/src/lib/client/{router-PHLUYVQU.mjs → router-BDVPLLYX.mjs} +244 -99
- package/dist/src/lib/context/context.cjs +35 -72
- package/dist/src/lib/context/context.d.ts +45 -291
- package/dist/src/lib/context/context.d.ts.map +1 -1
- package/dist/src/lib/context/context.js +65 -397
- package/dist/src/lib/context/context.mjs +38 -73
- package/dist/src/lib/context/index.cjs +35 -72
- package/dist/src/lib/context/index.d.ts +2 -2
- package/dist/src/lib/context/index.d.ts.map +1 -1
- package/dist/src/lib/context/index.js +1 -5
- package/dist/src/lib/context/index.mjs +38 -73
- package/dist/src/lib/core.cjs +547 -231
- package/dist/src/lib/core.d.ts +5 -3
- package/dist/src/lib/core.d.ts.map +1 -1
- package/dist/src/lib/core.js +6 -4
- package/dist/src/lib/core.mjs +548 -223
- package/dist/src/lib/env/index.cjs +1 -17
- package/dist/src/lib/env/index.d.ts +2 -14
- package/dist/src/lib/env/index.d.ts.map +1 -1
- package/dist/src/lib/env/index.js +2 -26
- package/dist/src/lib/env/index.mjs +1 -17
- package/dist/src/lib/i18n/index.cjs +17 -2
- package/dist/src/lib/i18n/index.d.ts +10 -0
- package/dist/src/lib/i18n/index.d.ts.map +1 -1
- package/dist/src/lib/i18n/index.js +17 -1
- package/dist/src/lib/i18n/index.mjs +17 -2
- package/dist/src/lib/index.cjs +64 -99
- package/dist/src/lib/index.mjs +43 -76
- package/dist/src/lib/isomorphic.cjs +9 -4
- package/dist/src/lib/isomorphic.d.ts +9 -2
- package/dist/src/lib/isomorphic.d.ts.map +1 -1
- package/dist/src/lib/isomorphic.js +11 -4
- package/dist/src/lib/isomorphic.mjs +9 -4
- package/dist/src/lib/jsx-runtime/index.cjs +1 -1
- package/dist/src/lib/jsx-runtime/index.mjs +1 -1
- package/dist/src/lib/jsx-runtime/jsx-dev-runtime.cjs +1 -1
- package/dist/src/lib/jsx-runtime/jsx-dev-runtime.mjs +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 +2 -2
- package/dist/src/lib/plugins/route-codegen.js +1 -1
- package/dist/src/lib/plugins/route-codegen.mjs +2 -2
- package/dist/src/lib/render/index.cjs +1 -1
- 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 +113 -115
- package/dist/src/lib/router/data.d.ts +63 -10
- package/dist/src/lib/router/data.d.ts.map +1 -1
- package/dist/src/lib/router/data.js +158 -68
- package/dist/src/lib/router/data.mjs +112 -112
- package/dist/src/lib/router/index.cjs +260 -163
- package/dist/src/lib/router/index.d.ts +22 -2
- package/dist/src/lib/router/index.d.ts.map +1 -1
- package/dist/src/lib/router/index.js +165 -22
- package/dist/src/lib/router/index.mjs +244 -143
- package/dist/src/lib/server/index.cjs +1 -1
- package/dist/src/lib/server/index.mjs +1 -1
- package/dist/src/lib/storage/cache.cjs +51 -0
- package/dist/src/lib/storage/cache.d.ts +18 -0
- package/dist/src/lib/storage/cache.d.ts.map +1 -0
- package/dist/src/lib/storage/cache.js +42 -0
- package/dist/src/lib/storage/cache.mjs +30 -0
- package/dist/src/lib/storage/index.cjs +246 -0
- package/dist/src/lib/storage/index.d.ts +83 -0
- package/dist/src/lib/storage/index.d.ts.map +1 -0
- package/dist/src/lib/storage/index.js +179 -0
- package/dist/src/lib/storage/index.mjs +231 -0
- package/dist/src/lib/storage/persisted.cjs +91 -0
- package/dist/src/lib/storage/persisted.d.ts +53 -0
- package/dist/src/lib/storage/persisted.d.ts.map +1 -0
- package/dist/src/lib/storage/persisted.js +75 -0
- package/dist/src/lib/storage/persisted.mjs +70 -0
- package/dist/src/lib/theme/color-scheme.cjs +281 -0
- package/dist/src/lib/theme/color-scheme.d.ts +61 -0
- package/dist/src/lib/theme/color-scheme.d.ts.map +1 -0
- package/dist/src/lib/theme/color-scheme.js +120 -0
- package/dist/src/lib/theme/color-scheme.mjs +265 -0
- package/dist/src/lib/theme/index.cjs +194 -37
- package/dist/src/lib/theme/index.d.ts +23 -11
- package/dist/src/lib/theme/index.d.ts.map +1 -1
- package/dist/src/lib/theme/index.js +73 -32
- package/dist/src/lib/theme/index.mjs +197 -35
- package/dist/src/lib/theme/provider.cjs +346 -0
- package/dist/src/lib/theme/provider.d.ts +34 -0
- package/dist/src/lib/theme/provider.d.ts.map +1 -0
- package/dist/src/lib/theme/provider.js +60 -0
- package/dist/src/lib/theme/provider.mjs +332 -0
- package/dist/src/routes.cjs +1 -1
- package/dist/src/routes.mjs +1 -1
- package/dist/src/utils.cjs +1 -1
- package/dist/src/utils.mjs +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 +18 -11
- package/dist/src/lib/client/chunk-VB567ABU.mjs +0 -133
package/dist/cdn/core.global.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
/*! @fluixi/core v1.0.0-alpha.
|
|
2
|
-
"use strict";var Fluixi=(()=>{var rr=Object.defineProperty;var Ws=Object.getOwnPropertyDescriptor;var Fs=Object.getOwnPropertyNames;var js=Object.prototype.hasOwnProperty;var q=(e,t)=>()=>(e&&(t=e(e=0)),t);var On=(e,t)=>{for(var r in t)rr(e,r,{get:t[r],enumerable:!0})},Hs=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of Fs(t))!js.call(e,o)&&o!==r&&rr(e,o,{get:()=>t[o],enumerable:!(n=Ws(t,o))||n.enumerable});return e};var Ks=e=>Hs(rr({},"__esModule",{value:!0}),e);function Ln(){return{consumer:null,untracked:!1,owner:null,queue:[],scheduled:!1,flushing:!1,batchDepth:0,hostSchedule:Us,onSuspend:null,onError:null,observer:null}}function zs(e){let t=Ln(),r=e;for(let n of Object.keys(t))n in e||(r[n]=t[n]);return e}function Bs(){let e=et[En];return e?zs(e):et[En]=Ln()}function Dn(){return[...new Set(et[In]??[])]}function Js(e){return y.observer=e,()=>{y.observer===e&&(y.observer=null)}}function ur(e){let t=y.observer;t&&t.created(e.parents===void 0?{...e,parents:H,origin:e.origin??Xs}:e)}function Gs(e){return y.observer?(H.push(e),!0):!1}function Ys(){H.pop()}function Zs(e){y.observer?.ran?.(e)}function Qs(e,t){y.observer?.wrote?.(e,t)}function B(e,t,r,n){let o=y.observer;!o?.bound||!H.length||o.bound(H[H.length-1],e,t,r,n)}function J(e,t,r,n){let o=y.observer;!o?.directive||!H.length||o.directive(H[H.length-1],e,t,r,n)}function ea(e){y.observer?.contextCreated?.(e)}function or(e,t,r){let n=y.observer;!n?.context||!H.length||n.context(H[H.length-1],e,t,r)}function fr(e){y.observer?.disposed?.(e)}function qn(){return y.observer!=null}function ir(e){if(e.watchers)for(let t of[...e.watchers])t._notify(e)}function oa(e){if(y.untracked)return e();y.untracked=!0;try{return e()}finally{y.untracked=!1}}function ge(e){let t=Le(e);return e&&(e.owned??=[]).push(t),t}function ve(e,t=!0){Ie(e,t)}function Fn(e){return!!e&&e.disposed===!0}function Le(e){return{cleanups:null,owned:null,parent:e,contexts:null}}function X(e,t){let r=Symbol(t??"context");return ea(r),{id:r,defaultValue:e,Provider:o=>{or(r,"provide",o.value);let i=y.owner,s=Le(i);(s.contexts=new Map).set(r,o.value),i&&(i.owned??=[]).push(s),y.owner=s;try{return o.children}finally{y.owner=i}}}}function K(e){let t=y.owner;for(;t;){if(t.contexts&&t.contexts.has(e.id)){let r=t.contexts.get(e.id);return or(e.id,"read",r),r}t=t.parent}return or(e.id,"read",e.defaultValue),e.defaultValue}function jn(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 ia(e,t,r){let n=Le(y.owner);(n.contexts=new Map).set(e.id,t),y.owner&&(y.owner.owned??=[]).push(n);let o=y.owner;y.owner=n;try{return r()}finally{y.owner=o}}function sa(e){y.onSuspend=e}function aa(e){return y.onSuspend?(y.onSuspend(e,y.owner),!0):!1}function ca(e){y.onError=e}function N(){return y.owner}function Hn(e){let t=y.owner;return y.owner=e,t}function I(e,t){let r=y.owner;y.owner=e;try{return t()}finally{y.owner=r}}function S(e){if(y.owner){if(y.owner.disposed){e();return}(y.owner.cleanups??=[]).push(e)}}function Ie(e,t=!0){if(!e.disposed){if(e.owned){for(let r=e.owned.length-1;r>=0;r--)Ie(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 V(e){let t=Le(y.owner);y.owner&&(y.owner.owned??=[]).push(t);let r=y.owner;y.owner=t;try{return e(()=>Ie(t))}finally{y.owner=r}}function ua(e){y.hostSchedule=e??(t=>{Promise.resolve().then(t)})}function fa(e){e.queued||(e.queued=!0,y.queue.push(e),!y.scheduled&&y.batchDepth===0&&(y.scheduled=!0,y.hostSchedule(rt)))}function rt(){if(y.scheduled=!1,y.flushing)return;y.flushing=!0;let e=0;try{for(;y.queue.length;){if(++e>1e5)throw new Error("[fluixi] effect flush did not settle (cycle?)");let t=y.queue;y.queue=[];for(let r of t)r.queued=!1,r.disposed||r.run()}}finally{y.flushing=!1}}function la(){y.batchDepth===0&&rt()}function da(e){y.batchDepth++;try{return e()}finally{--y.batchDepth===0&&rt()}}function lr(e,t=!1){let r=new pa(e,t);return()=>r.dispose()}function ha(e){return!!e&&typeof e.then=="function"}function w(e,t){let r=new ra(e,{equals:t?.equals}),n=(()=>r.get()),o=(i=>{let s=typeof i=="function"?i(r.peek()):i;return r.set(s),la(),s});return Object.defineProperty(n,Kn,{value:!0,enumerable:!0}),Object.defineProperty(n,ma,{value:{get value(){return r.peek()},get version(){return r.version}},enumerable:!1}),ur({kind:"signal",node:r,handle:n,name:t?.name,set:o}),qn()&&S(()=>fr(r)),[n,o]}function m(e,t,r){let n=t,o=N(),i=new Wn(()=>I(o,()=>{try{return n=e(n)}catch(a){if(ha(a))return aa(a),n;throw a}}),{equals:r?.equals}),s=(()=>i.get());return Object.defineProperty(s,Kn,{value:!0,enumerable:!0}),Object.defineProperty(s,ya,{value:!0,enumerable:!0}),ur({kind:"memo",node:i,handle:s,name:r?.name}),qn()&&S(()=>fr(i)),s}function x(e,t){let r=t;return lr(()=>{r=e(r)},!0)}function Un(e,t){let r=t;lr(()=>{r=e(r)})}function C(e,t){let r=t;return lr(()=>{r=e(r)})}function $(e){return da(e)}function O(e){return oa(e)}function zn(){return rt(),Promise.resolve()}function Bn(e,t,r){let n=[];return S(()=>{for(let o of n)o.dispose();n=[]}),m(()=>{let o=e()||[];return O(()=>{if(o.length===0){for(let c of n)c.dispose();return n=[],r?.fallback?r.fallback():[]}let i=new Map;for(let c of n)i.has(c.item)||i.set(c.item,c);let s=[],a=new Set;for(let c=0;c<o.length;c++){let u=o[c],f=i.get(u);if(f&&!a.has(f))f.setIndex(c),s.push(f),a.add(f);else{let l,d,g;V(p=>{g=p;let[b,T]=w(c,{name:"row index"});d=T,l=t(u,b)});let h={item:u,rendered:l,dispose:g,setIndex:d};s.push(h),a.add(h)}}for(let c of n)a.has(c)||c.dispose();return n=s,s.map(c=>c.rendered)})},void 0,{name:"mapArray"})}function Jn(e,t,r,n){let o=[],i=[];return S(()=>{for(let s of i)s.dispose();o=[],i=[]}),m(()=>{let s=e()||[];return O(()=>{if(s.length===0){for(let l of i)l.dispose();return o=[],i=[],n?.fallback?n.fallback():[]}let a=new Map;for(let l=0;l<o.length;l++)a.set(o[l],i[l]);let c=[],u=[],f=new Set;for(let l=0;l<s.length;l++){let d=t(s[l]),g=a.get(d);if(g&&!f.has(d))g.setIndex(l),c.push(g);else{let h,p,b;V(T=>{b=T;let[_,ce]=w(l,{name:"row index"});p=ce;let Ye=m(me=>{let re=(e()||[])[_()];return re??me},s[l]);h=r(Ye,_)}),c.push({rendered:h,dispose:b,setIndex:p})}u.push(d),f.add(d)}for(let[l,d]of a)f.has(l)||d.dispose();return o=u,i=c,c.map(l=>l.rendered)})},void 0,{name:"keyArray"})}function Xn(e,t,r){let n=[];return S(()=>{for(let o of n)o.dispose();n=[]}),m(()=>{let o=e()||[];return O(()=>{if(o.length===0){for(let c of n)c.dispose();return n=[],r?.fallback?r.fallback():[]}let i=n.length,s=o.length;for(let c=i;c<s;c++){let u,f,l,d=o[c];V(g=>{l=g;let[h,p]=w(d);f=p,u=t(h,c)}),n.push({rendered:u,setItem:f,dispose:l})}for(let c=s;c<i;c++)n[c].dispose();s<i&&(n=n.slice(0,s));let a=Math.min(i,s);for(let c=0;c<a;c++)n[c].setItem(o[c]);return n.map(c=>c.rendered)})},void 0,{name:"indexArray"})}function M(e){return typeof e=="function"&&e[wa]===!0}function ba(e){$n&&$n(e)}function Gn(e){sr=e}function Aa(e){return sr?sr(e):void 0}function Yn(e){ar=e}function Sa(){return ar?ar():void 0}function xa(e,t){Nn&&Nn(e,t)}function Zn(e,t=(r,n)=>r===n){let r=new Map;return x(()=>{let n=e();for(let[o,i]of r){let[s,a]=i,c=t(o,n);s()!==c&&a(c)}}),n=>{let o=r.get(n);if(!o){let[i,s]=w(!1);o=[i,s],r.set(n,o);let a=e();s(t(n,a))}return o[0]()}}function Qn(e,t){let[r,n]=w(e(),t);return x(()=>{let o=e();t?.timeoutMs?setTimeout(()=>n(()=>o),t.timeoutMs):typeof requestIdleCallback=="function"?requestIdleCallback(()=>n(()=>o)):Promise.resolve().then(()=>n(()=>o))}),r}function eo(e,t){let r,n=(...o)=>{r!==void 0&&clearTimeout(r),r=setTimeout(()=>{r=void 0,e(...o)},t)};return S(()=>{r!==void 0&&clearTimeout(r)}),n}function ka(e){return!!e&&typeof e.then=="function"}function ne(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:Sa(),s=i!==void 0?Aa(i):void 0,a=s!==void 0,[c,u]=w(s!==void 0?s.value:r.initialValue,{equals:!1}),[f,l]=w(void 0,{equals:!1}),[d,g]=w(s!==void 0||r.initialValue!==void 0?"ready":"unresolved",{equals:!1}),[h,p]=w(void 0,{equals:!1}),[b,T]=w(void 0,{equals:!1}),_=nr,ce=!1;x(()=>{let D=n();if(b(),D===!1||D===null||D===void 0){_=nr,$(()=>{g("unresolved"),p(void 0),l(void 0)});return}let re=ce;if(ce=!1,_!==nr&&D===_&&!re)return;if(_=D,a){a=!1;return}let Ze=!1;S(()=>Ze=!0);let _n=O(d),Vs=O(c),Tn=_n==="ready"||_n==="refreshing";$(()=>{g(Tn?"refreshing":"pending"),l(void 0)});try{let ue=o(D,{value:Vs,refetching:Tn});ka(ue)?(p(ue),ba(ue),ue.then(Qe=>{Ze||(i!==void 0&&xa(i,Qe),$(()=>{u(()=>Qe),g("ready"),p(void 0)}))},Qe=>{Ze||$(()=>{l(Qe),g("errored"),p(void 0)})})):$(()=>{u(()=>ue),g("ready"),p(void 0)})}catch(ue){if(Ze)return;$(()=>{l(ue),g("errored"),p(void 0)})}});let Ye=()=>{let D=d();return D==="pending"||D==="refreshing"},me=(()=>{let D=f();if(D)throw D;if(Ye()){let re=h();if(re)throw re}return c()});return Object.defineProperties(me,{state:{get:d},loading:{get:Ye},error:{get:f},latest:{get:c}}),Object.defineProperty(me,Symbol.for("resource"),{value:!0,enumerable:!0}),Object.defineProperty(me,Symbol.for("signal"),{value:!0,enumerable:!0}),[me,{mutate:u,refetch:()=>{ce=!0,T(void 0)}}]}function tt(e){if(typeof e=="function"&&!e.length){let t=e();return M(t)?t:tt(t)}if(Array.isArray(e)){let t=[];for(let r=0;r<e.length;r++){let n=tt(e[r]);Array.isArray(n)?t.push.apply(t,n):t.push(n)}return t}return e}function fe(e){let t=m(e);return va?m(()=>tt(t()),void 0,{name:"children"}):m(()=>tt(t()))}function ro(){let[e,t]=w(0),r=0;return{increment:()=>t(r+=1),decrement:()=>t(r-=1),inFallback:()=>e()>0}}function dr(e,t){return ia(to,e,t)}var cr,Mn,En,In,Us,et,y,H,Xs,ta,Cn,Rn,Pn,Me,Vn,ra,Wn,na,pa,Kn,ya,ma,ga,va,wa,$n,sr,ar,Nn,nr,to,_a,we,A=q(()=>{"use strict";cr="1.0.0-alpha.92",Mn=cr.split(".")[0],En=`__fluixi_signal_state_v${Mn}__`,In=`__fluixi_signal_builds_v${Mn}__`,Us=e=>{typeof queueMicrotask=="function"?queueMicrotask(e):Promise.resolve().then(e)};et=globalThis;y=Bs();(et[In]??=[]).push(cr);H=[];ta="__FLUIXI_DEVTOOLS_HOOK__",Cn=globalThis[ta];if(typeof Cn?.inject=="function")try{Cn.inject({observeReactiveNodes:Js,version:cr})}catch{}Rn=0,Pn=1,Me=2,Vn=class{constructor(){this.observers=null,this.watchers=null,this.version=0}updateIfNecessary(){}track(){if(y.untracked)return;let e=y.consumer;e&&((this.observers??=new Set).add(e),(e.sources??=new Set).add(this))}},ra=class extends Vn{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++,Qs(this,y.consumer),this.observers)for(let t of[...this.observers])t.markDirty(Me);ir(this)}}peek(){return this._value}},Wn=class extends Vn{constructor(e,t){super(),this._threw=!1,this._initialized=!1,this.state=Me,this.sources=null,this._fn=e,this._equals=t?.equals===!1?()=>!1:t?.equals??Object.is}get(){if(y.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===Pn&&this.sources){for(let e of this.sources)if(e.updateIfNecessary(),this.state===Me)break}(this.state===Me||!this._initialized)&&this.recompute(),this.state=Rn}recompute(){if(this.sources){for(let a of this.sources)a.observers?.delete(this);this.sources.clear()}let e=y.consumer,t=y.untracked,r=Gs(this);y.consumer=this,y.untracked=!1;let n,o=!1,i;try{n=this._fn()}catch(a){o=!0,i=a,n=this._value}finally{y.consumer=e,y.untracked=t,r&&Ys()}let s=!this._initialized||this._threw!==o||(o?i!==this._error:!this._equals(this._value,n));if(this._initialized=!0,this._threw=o,this._error=i,this._value=n,Zs(this),s){if(this.version++,this.observers)for(let a of[...this.observers])a.markDirty(Me);ir(this)}}markDirty(e){if(this.state>=e)return;let t=this.state===Rn;if(this.state=e,t){if(this.observers)for(let r of[...this.observers])r.markDirty(Pn);ir(this)}}peek(){if(this.updateIfNecessary(),this._threw)throw this._error;return this._value}};na=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()}};pa=class{constructor(e,t=!1){this.queued=!1,this.disposed=!1,this.owner=Le(y.owner),y.owner&&(y.owner.cleanups??=[]).push(()=>this.dispose()),this.computed=new Wn(()=>{Ie(this.owner,!1),I(this.owner,()=>{let r=e();typeof r=="function"&&(this.owner.cleanups??=[]).push(r)})}),ur({kind:"effect",node:this.computed,handle:this,internal:!t}),this.watcher=new na(()=>fa(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"&&y.onSuspend){y.onSuspend(e,this.owner);return}if(y.onError&&y.onError(e,this.owner))return;throw e}}}dispose(){this.disposed||(this.disposed=!0,fr(this.computed),this.watcher.unwatch(this.computed),Ie(this.owner))}};ua(()=>{});Kn=Symbol.for("signal"),ya=Symbol.for("memo"),ma=Symbol.for("signal-node");ga=typeof window>"u"?!1:window.__FLUIXI_PROD__===!0,va=typeof process>"u"?ga:!1,wa=Symbol.for("signal");$n=null;sr=null;ar=null;Nn=null;nr=Symbol();to=X();sa((e,t)=>{let r=jn(t,to);r&&(r.increment(),e.finally(()=>r.decrement()))});_a=X();ca((e,t)=>{let r=jn(t,_a);return r?(r.setError(e),!0):!1});we=Symbol.for("fluixi-proxy")});var Po,$o=q(()=>{"use strict";Po="1.0.0-alpha.92"});function zo(){return{consumer:null,untracked:!1,owner:null,queue:[],scheduled:!1,flushing:!1,batchDepth:0,hostSchedule:yc,onSuspend:null,onError:null,observer:null}}function mc(e){let t=zo(),r=e;for(let n of Object.keys(t))n in e||(r[n]=t[n]);return e}function gc(){let e=_r[No];return e?mc(e):_r[No]=zo()}function vc(e){return R.observer=e,()=>{R.observer===e&&(R.observer=null)}}function wc(e,t){if(!R.observer)return t();let r=ht;ht=e;try{return t()}finally{ht=r}}function bc(e){let t=R.observer;t&&t.created(e.parents===void 0?{...e,parents:le,origin:e.origin??ht}:e)}function Bo(e){let t=R.observer;!t?.props||!le.length||!e||t.props(le[le.length-1],e)}function Ac(e){R.observer?.contextCreated?.(e)}function Sc(e,t,r){let n=R.observer;!n?.context||!le.length||n.context(le[le.length-1],e,t,r)}function Mo(e,t,r){R.observer?.moved?.(e,t,r)}function Io(e){R.observer?.disposed?.(e)}function Jo(){return R.observer!=null}function kc(e){if(R.untracked)return e();R.untracked=!0;try{return e()}finally{R.untracked=!1}}function _c(e){return{cleanups:null,owned:null,parent:e,contexts:null}}function Xo(e,t){let r=Symbol(t??"context");return Ac(r),{id:r,defaultValue:e,Provider:o=>{Sc(r,"provide",o.value);let i=R.owner,s=_c(i);(s.contexts=new Map).set(r,o.value),i&&(i.owned??=[]).push(s),R.owner=s;try{return o.children}finally{R.owner=i}}}}function Go(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 Tc(e){R.onSuspend=e}function Oc(e){R.onError=e}function Ec(e){R.hostSchedule=e??(t=>{Promise.resolve().then(t)})}function Yo(e){return kc(e)}function Zo(e){return typeof e=="function"&&e[Cc]===!0}function $c(e,t){if(!Se(e)||!Jo())return;let r=new Set,n=s=>{if(!(!Se(s)||r.has(s))){r.add(s);for(let a of Object.values(s))n(a)}};n(vt.get(t)??t);let o=new Set,i=s=>{if(!Se(s))return;let a=s;if(r.has(a)||o.has(a))return;o.add(a);let c=qe.get(a);if(c){for(let u of c.keys.values())Io(u);c.all&&Io(c.all),qe.delete(a),xe.delete(a),Tr.delete(a)}for(let u of Object.values(a))i(u)};i(e)}function Qo(e,t,r){let n=t?.owner,o=n&&r!==void 0?wt(n.name,r,t?.array):void 0,[i,s]=wc(n?.store,()=>w(e,o?{name:o}:void 0)),a=i;return a.$=s,a}function bt(e){let t=qe.get(e);return t?t.owner||(t.owner=xe.get(e)):qe.set(e,t={keys:new Map,owner:xe.get(e),array:Array.isArray(e)}),t}function Fo(e,t,r){let n=e.keys.get(t);return n||e.keys.set(t,n=Qo(r,e,t)),n}function Nc(e,t,r,n){let o=xe.get(e);if(o&&o.store===t&&o.name===r)return;let i={store:t,name:r};xe.set(e,i),vt.set(e,vt.get(n)??n);let s=qe.get(e);if(s&&(s.owner=i,!!Jo())){for(let[a,c]of s.keys)Mo(c,t,wt(r,a,s.array));s.all&&Mo(s.all,t,wt(r,"*",s.array))}}function jo(e){let t=bt(e);(t.all||(t.all=Qo(void 0,t,"*")))()}function Ho(e,t){e.$(typeof t=="function"?()=>t:t)}function Se(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 yt(e){if(!Se(e))return e;let t=Tr.get(e);if(t)return t;let r=new Proxy(e,Mc);return Tr.set(e,r),r}function ei(e,t=new Set){if(e==null||typeof e!="object")return e;let r=e[gt]??e;if(t.has(r)||!Se(r))return r;t.add(r);let n=!1,o=s=>{let a=ei(s,t);return a!==s&&(n=!0),a};if(Array.isArray(r)){let s=r.map(o);return n?s:r}let i={};for(let s of Object.keys(r))i[s]=o(r[s]);return n?i:r}function Y(e,t,r){let n=ei(r),o=e[t];if(o===n&&(n!==void 0||t in e))return;let i=Array.isArray(e),s=i?e.length:0;n===void 0?delete e[t]:e[t]=n;let a=bt(e),c=a.keys.get(t);if(c&&Ho(c,n),$c(o,e),i&&e.length!==s){let u=a.keys.get("length");u&&Ho(u,e.length)}a.all&&a.all.$(void 0)}function Or(e,t){return typeof e=="function"?e(t):e}function Er(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)?Er(o,n):Y(e,r,n)}}function St(e){let t=[],r=e.replace(/\[([^\]]*)\]/g,".$1");for(let n of r.split("."))n.length&&t.push(n);return t}function ti(e,t,r){let n=t.length-1;for(let i=0;i<n;i++){let s=t[i];if(s==="*"){let c=t.slice(i+1);if(Array.isArray(e))for(let u=0;u<e.length;u++)ti(e[u],c,r);return}let a=e[s];(a==null||typeof a!="object")&&(a=/^\d+$/.test(t[i+1])?[]:{},Y(e,s,a)),e=a}let o=t[n];if(o==="*"){if(Array.isArray(e))for(let i=0;i<e.length;i++)Y(e,i,Or(r,e[i]));return}Y(e,o,Or(r,e[o]))}function Ko(e,t,r){ti(e,St(t),r)}function Ic(e){return Array.isArray(e)&&e.length>0&&e.every(t=>Array.isArray(t)&&t.length>=2&&typeof t[0]=="string")}function mt(e,t){for(let r=e.length-1;r>=t.length;r--)Y(e,String(r),void 0);e.length!==t.length&&Y(e,"length",t.length);for(let r=0;r<t.length;r++)Y(e,String(r),t[r])}function Lc(e,t){let r=t[0];if(typeof r=="function"&&t.length===1){let n=r(e);n&&n!==e&&Er(e,n);return}if(Array.isArray(r)&&t.length===1){if(Ic(r)){for(let n of r)Ko(e,n[0],n[1]);return}if(Array.isArray(e)){mt(e,r);return}if(r.length===0)return;throw new TypeError("[fluixi] set() was given an array that is neither a batch of [path, value] pairs nor a replacement for an array root. Name the path you meant, as in set('items', [...]).")}if(r&&typeof r=="object"&&!Array.isArray(r)&&t.length===1){Er(e,r);return}if(t.length>=3){Cr(e,t.slice(0,-1),t[t.length-1]);return}Ko(e,String(r),t[1])}function Dc(e,t){if(typeof t=="function"){if(!Array.isArray(e))return[];let r=[];for(let n=0;n<e.length;n++)t(e[n],n)&&r.push(n);return r}if(Array.isArray(t))return Array.isArray(e)?t.map(Number):t.map(String);if(t&&typeof t=="object"&&("from"in t||"to"in t||"by"in t)){if(!Array.isArray(e))return[];let r=t.by??1,n=t.from??0,o=t.to??e.length-1,i=[];for(let s=n;s<=o;s+=r)s>=0&&s<e.length&&i.push(s);return i}return t==="*"?Array.isArray(e)?e.map((r,n)=>n):Object.keys(e??{}):[t]}function Cr(e,t,r){if(e==null)return;let[n,...o]=t;if(typeof n=="string"){let s=St(n);if(s.length>1){Cr(e,[...s,...o],r);return}}let i=Dc(e,n);if(o.length===0){for(let s of i)Y(e,s,Or(r,e[s]));return}for(let s of i){let a=e[s];if(a==null||typeof a!="object"){let c=o[0];a=typeof c=="number"||/^\d+$/.test(String(c))?[]:{},Y(e,s,a)}Cr(a,o,r)}}function Rr(e){if(e==null||typeof e!="object")return e;if(Array.isArray(e))return e.map(Rr);let t={};for(let r of Object.keys(e))t[r]=Rr(e[r]);return t}function se(e,t){let r=e;for(let n of St(t)){if(r==null)return;r=r[n]}return r}function Vc(e,t){for(let r of qc)e[r]=t[r].bind(t);e.$=t.reactive.bind(t)}function Wc(e,t={immutable:!0}){let r=new ri(e,t);return Vc(r.set,r),[r.proxy,r.set]}function Fc(e,t={}){return new ri(e,{...t,immutable:!1})}function At(e){if(e==null||typeof e!="object")return e;let t=e[gt];return t!==void 0?t:e}function jc(e){return O(()=>At(e))}var Pr,Uo,No,hc,yc,_r,R,le,ht,xc,Lo,Qf,Cc,Rc,Pc,gt,Do,qo,Vo,Wo,qe,Tr,xe,vt,wt,Mc,ri,qc,tl,ni=q(()=>{"use strict";A();Pr="1.0.0-alpha.92",Uo=Pr.split(".")[0],No=`__fluixi_signal_state_v${Uo}__`,hc=`__fluixi_signal_builds_v${Uo}__`,yc=e=>{typeof queueMicrotask=="function"?queueMicrotask(e):Promise.resolve().then(e)};_r=globalThis;R=gc();(_r[hc]??=[]).push(Pr);le=[];xc="__FLUIXI_DEVTOOLS_HOOK__",Lo=globalThis[xc];if(typeof Lo?.inject=="function")try{Lo.inject({observeReactiveNodes:vc,version:Pr})}catch{}Ec(()=>{});Qf=typeof window>"u"?!1:window.__FLUIXI_PROD__===!0,Cc=Symbol.for("signal");Rc=Xo();Tc((e,t)=>{let r=Go(t,Rc);r&&(r.increment(),e.finally(()=>r.decrement()))});Pc=Xo();Oc((e,t)=>{let r=Go(t,Pc);return r?(r.setError(e),!0):!1});gt=Symbol("store-raw"),Do=Symbol("store-node"),qo=Symbol("store-has"),Vo=Symbol("store-self"),Wo=Symbol("store-track"),qe=new WeakMap,Tr=new WeakMap,xe=new WeakMap,vt=new WeakMap;wt=(e,t,r)=>r?`${e}[${String(t)}]`:`${e}.${String(t)}`;Mc={get(e,t,r){if(t===gt||t===Do)return e;if(t===we)return r;if(t===qo)return c=>c in e;if(t==="__proxy")return!0;if(t===Wo||t===Vo)return jo(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=bt(e),s=Fo(i,t,n),a=s();return Se(a)?(i.owner&&Nc(a,s,wt(i.owner.name,t,i.array),e),yt(a)):a},set(){return!0},deleteProperty(e,t){return t in e&&Y(e,t,void 0),!0},has(e,t){return t===gt||t===we||t===Do||t===qo||t===Vo||t===Wo?!0:(Fo(bt(e),t,e[t])(),t in e)},ownKeys(e){return jo(e),Reflect.ownKeys(e)},getOwnPropertyDescriptor(e,t){return Reflect.getOwnPropertyDescriptor(e,t)}};ri=class{constructor(e,t={immutable:!0}){this.options=t,this.root=e,this.set=((...r)=>$(()=>Lc(this.root,r))),e&&typeof e=="object"&&(xe.set(e,{store:this,name:t.name??"store"}),vt.set(e,e)),bc({kind:"store",node:this,handle:()=>this.root,name:t.name})}get state(){return yt(this.root)}get proxy(){return yt(this.root)}get accessor(){return(()=>yt(this.root))}unwrap(){return this.root}getNode(e){return this.root&&this.root[e]}get(e){if(e==null||e==="")return At(this.state);let t=this.state;for(let r of St(e)){if(t==null)return;t=t[r]}return At(t)}select(e){return m(()=>e(this.state))}subscribe(e){return x(()=>e(this.state))}watch(e,t){let r;return x(()=>{let n=e(this.state);Object.is(n,r)||(t(n,r),r=n)})}reactive(e){return m(()=>this.state[e])}produce(e){this.set((t=>{let r=Rr(t);return e(r),r}))}reconcile(e,t={}){this.set(e)}push(e,...t){let r=se(this.root,e);this.set(e,r.concat(t))}pop(e){let t=se(this.root,e).slice(),r=t.pop();return this.set(e,t),r}shift(e){let t=se(this.root,e).slice(),r=t.shift();return this.set(e,t),r}splice(e,t,r,...n){let o=se(this.root,e).slice(),i=o.splice(t,r,...n);return this.set(e,o),i}insert(e,t,r){let n=se(this.root,e).slice();n.splice(t,0,r),this.set(e,n)}removeAt(e,t){let r=se(this.root,e).slice(),n=r.splice(t,1);return this.set(e,r),n}replace(e,t){if(arguments.length>=2){let n=se(this.root,String(e)),o=t;if(Array.isArray(n)&&Array.isArray(o)){mt(n,o);return}this.set(e,o);return}let r=this.root;if(Array.isArray(r)&&Array.isArray(e)){mt(r,e);return}this.set(e)}clear(e){let t=e===void 0?this.root:se(this.root,e);if(Array.isArray(t)){mt(t,[]);return}if(t&&typeof t=="object")for(let r of Object.keys(t))Y(t,r,void 0)}toObservable(){let[e]=w(this.state);return e.toObservable()}dispose(){}},qc=["get","select","watch","subscribe","produce","reconcile","push","pop","shift","splice","insert","removeAt","replace","clear","unwrap","toObservable"];tl=Object.freeze({createStore:Wc,createMutableStore:Fc,batch:$,unwrap:At,untrackStore:jc})});function Hc(e){return e.localName.includes("-")}function oi(e,t,r,n=!1){if(r==null){e.removeAttribute(t);return}if(Hc(e)){e[t]=r;return}E(e,t,r,n)}function Uc(e){return Kc.has(e)||e.startsWith("aria-")||e.startsWith("data-")}function li(e,...t){e.classList.add(...t)}function di(e,...t){e.classList.remove(...t)}function pi(e,...t){t.forEach(r=>e.classList.toggle(r))}function E(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 hi(e){return e&&typeof e=="object"&&e.strings&&Array.isArray(e.strings)&&e.values&&Array.isArray(e.values)}function Rt(e){return e instanceof Node}function yi(e){F.core=e}function Pt(e){F.core&&e.setAttribute("fluixi",F.core),e.setAttribute("fx-dom",F.dom),e.setAttribute("fx-reactive",F.reactive),typeof globalThis<"u"&&(globalThis.Fluixi=F)}function $t(){let e=Dn();e.length>1&&console.warn(`[fluixi] ${e.length} builds of @fluixi/reactive are driving one reactive graph: ${e.join(", ")}. They share it on purpose, so signals still cross between them, but the oldest one decided what the graph looks like. Build the components on one release, or load them as shared-runtime bundles.`);let t=[F.core,F.dom,F.reactive].filter(r=>r!==void 0);new Set(t).size<=1||console.warn(`[fluixi] package versions disagree: core ${F.core??"(absent)"}, dom ${F.dom}, reactive ${F.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 mi(e){return Object.defineProperty(e,Symbol.for("fluixi-provider"),{value:!0,enumerable:!0}),e}function Ve(e){return typeof e!="function"||Object.defineProperty(e,Symbol.for("fluixi-component"),{value:!0,enumerable:!0}),e}function gi(e){return Object.defineProperty(e,Symbol.for("fluixi-suspense"),{value:!0,enumerable:!0}),e}function Bc(e){return typeof e=="function"&&e[Symbol.for("fluixi-router")]===!0}function Jc(e){return typeof e=="function"&&e[Symbol.for("fluixi-routes")]===!0}function Xc(e){return typeof e=="function"&&e[Symbol.for("fluixi-route")]===!0}function Gc(e){return typeof e=="function"&&e[Symbol.for("fluixi-outlet")]===!0}function Yc(e){return typeof e=="function"&&e[Symbol.for("fluixi-provider")]===!0}function Zc(e){return typeof e=="function"&&e[Symbol.for("fluixi-context")]===!0}function ee(e){return typeof e=="function"&&e[Symbol.for("fluixi-component")]===!0}function Qc(e){return typeof e=="function"&&e[Symbol.for("fluixi-suspense")]===!0}function vi(e){return Bc(e)?{type:"router",value:e}:Xc(e)?{type:"route",value:e}:Jc(e)?{type:"routes",value:e}:Gc(e)?{type:"outlet",value:e}:ee(e)?{type:"component",value:e}:Qc(e)?{type:"suspense",value:e}:Yc(e)?{type:"provider",value:e}:Zc(e)?{type:"context",value:e}:{type:"none",value:e}}function L(){return Nr.server}function Vr(){if(!Nr.nodes)throw new Error("[fluixi] server render ran before @fluixi/dom/server loaded");return Nr.nodes}function Wr(e){return e!=null&&e[Nt]===!0?!0:typeof Node<"u"&&e instanceof Node}function ru(e){return e!=null&&e[Nt]===!0?e.nodeType===1:typeof Element<"u"&&e instanceof Element}function nu(e){return e!=null&&e[Nt]===!0?e.nodeType===3:typeof Text<"u"&&e instanceof Text}function ou(e){wi=e}function bi(){return wi}function si(e,t){return v.active&&t.parentNode===e}function Ai(e){let t=v.parents.lastIndexOf(e);t!==-1&&(v.parents.length=t),v.cursor=e.nextSibling}function Si(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 xi(e){if(!v.active||e==null)return;let t=Array.isArray(e)?e[e.length-1]:e;t&&typeof t.nodeType=="number"&&Ai(t)}function ai(e,t){return t&&(e[su]=t),e}function pe(e){if(!L())for(let t of e)kt.has(t)||Fr.has(t)||(kt.add(t),Mr.dispatch??=cu,document.addEventListener(t,Mr.dispatch))}function cu(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 uu(e,t,r){if(e[`$$${t}`]=r,Fr.has(t)){let n=`__fx_${t}`;if(!e[n]){let o=i=>{e[`$$${t}`]?.(i)};e.addEventListener(t,o),e[n]=o}return}kt.has(t)||pe([t])}function ci(e,t){delete e[`$$${t}`];let r=`__fx_${t}`,n=e[r];n&&(e.removeEventListener(t,n),delete e[r])}function ae(e,t=!1){if(L())return Vr().createText(e);if(v.active&&!t){let r=bi()?.hydrateText(e);if(r)return r}return document.createTextNode(e)}function _e(e,t=!1,r){if(L())return Vr().createElement(e,t);if(v.active){let n=bi()?.hydrateElement(e);if(n)return r?ai(n,r):n}return ai(t?document.createElementNS(qr,e):document.createElement(e),r)}function lu(e,t,r,n,o){let i=n,s=new Map;return C(()=>{B(r??t,"content",void 0,e);let a;if(ee(e)&&!M(e)){if(!s.has(e)){Q++;try{let c=e();s.set(e,c)}finally{Q--}}for(a=s.get(e);typeof a=="function"&&M(a);)a=a()}else for(a=e();typeof a=="function"&&M(a);)a=a();{let c=0;for(;typeof a=="function"&&c++<50;)if(ee(a)){if(!s.has(a)){let u=a;Q++;try{let f=u();s.set(u,f)}finally{Q--}}a=s.get(a)}else if(M(a))a=a();else if(a=a(),typeof a!="function"||!M(a)&&!ee(a))break}Q++;try{i=_t(t,a,r,i,s),o(i)}finally{Q--}})}function j(e,t,r,n){if(Q>fu)return console.error("[insert] Exceeded max call depth, possible infinite loop."),()=>null;r!==void 0&&!r&&(r=ae("",!0),e.appendChild(r));let o=n??null,i=c=>Array.isArray(c)&&c.some(u=>typeof u=="function"),s=c=>typeof c=="function"?c:()=>c;if(typeof t!="function"&&!i(t)){Q++;try{o=_t(e,t,r,o)}finally{Q--}return()=>o}let a=lu(s(t),e,r,o,c=>{o=c});return()=>(a?.(),o)}function _t(e,t,r,n,o){if(t==null||typeof t=="boolean")return de(e,n,r);if(typeof t=="function")for(;typeof t=="function";)t=t();if(t==null||typeof t=="boolean")return de(e,n,r);if(xt(t)){let s=ae("",!0);return Array.isArray(n)?n.length>0?(e.replaceChild(s,n[0]),de(e,n.slice(1),r)):W(e,s,r):n?e.replaceChild(s,n):W(e,s,r),t.then(a=>{s.parentNode===e&&_t(e,a,s.nextSibling,s)}).catch(a=>{console.error("Error resolving promise in insertExpression:",a)}),s}let i=typeof t;if(i==="string"||i==="number"){if(i==="number"&&(t=String(t)),Array.isArray(n)){if(n.length===0){let a=ae(t);return W(e,a,r),a}if(n.length===1&&n[0].nodeType===3)return n[0].data=t,n;n=de(e,n,r)}if(n&&nu(n))return n.data=t,n;let s=ae(t);return n&&n.parentNode===e?e.replaceChild(s,n):si(e,s)||W(e,s,r),s}if(Wr(t))return si(e,t)?(Ai(t),t):Array.isArray(n)?(n.length===0?W(e,t,r):n[0].parentNode===e?(e.replaceChild(t,n[0]),de(e,n.slice(1),r)):W(e,t,r),t):(n?n!==t&&(n.parentNode===e?e.replaceChild(t,n):W(e,t,r)):W(e,t,r),t);if(Array.isArray(t)){let s=[],a=Array.isArray(n)?n:n?[n]:[],c=[];Z(t,s,e,r,!0,o,c);let u=du(e,a,s,r);for(let f of c){let l=j(e,f.sig,f.marker);S(()=>{de(e,l()),f.marker.parentNode===e&&e.removeChild(f.marker)})}return u}if(i==="object"&&t!==null&&typeof t=="object"){let s=t;if("type"in s&&"props"in s){let a=s;if(typeof a.type=="function"){let c=a.type(a.props||{});return _t(e,c,r,n)}}}return de(e,n,r)}function Z(e,t,r,n,o=!0,i,s){for(let a=0;a<e.length;a++){let c=e[a];if(!(c==null||typeof c=="boolean")){for(;typeof c=="function"&&!xt(c)&&!M(c)&&!ee(c)&&(c=c(),!(c==null||typeof c=="boolean")););if(!(c==null||typeof c=="boolean")){if(typeof c=="function"){let u;for(ee(c)&&!M(c)?(i||(i=new Map),i.has(c)||i.set(c,c()),u=i.get(c)):u=c();typeof u=="function"&&!xt(u)&&!M(u)&&!ee(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(M(u)){if(s){let l=ae("",!0);t.push(l),s.push({marker:l,sig:u});continue}let f=u();for(;typeof f=="function"&&M(f);)f=f();if(f==null||typeof f=="boolean")continue;Array.isArray(f)?Z(f,t,r,n,o,i):Z([f],t,r,n,o,i);continue}continue}Array.isArray(u)?Z(u,t,r,n,o,i,s):Z([u],t,r,n,o,i,s);continue}if(xt(c)){let u=ae("",!0);t.push(u),c.then(f=>{if(u.parentNode){let l=[];if(Z([f],l,u.parentNode,void 0,!1,i),l.length>0){u.parentNode.replaceChild(l[0],u);for(let d=1;d<l.length;d++)u.parentNode?.insertBefore(l[d],l[d-1].nextSibling)}}}).catch(f=>console.error("Error resolving promise in array:",f));continue}if(Array.isArray(c)){Z(c,t,r,n,o,i,s);continue}if(Wr(c)){t.push(c);continue}if(typeof c=="object"&&c!==null&&"type"in c&&"props"in c){let u=c;if(typeof u.type=="function"){let f=u.type(u.props||{});Array.isArray(f)?Z(f,t,r,n,!1,i):Z([f],t,r,n,!1,i);continue}}if(typeof c=="string"||typeof c=="number"){let u=String(c);if(u.trim()===""&&u!==" ")continue;t.push(ae(u));continue}t.push(ae(String(c)))}}}}function du(e,t,r,n){for(let l=0;l<r.length;l++){let d=r[l].parentNode;d!==null&&d!==e&&d.nodeType!==11&&(r=r.slice(),r[l]=r[l].cloneNode(!0))}let o=r.length,i=t.length,s=o,a=0,c=0,u=i>0?t[i-1].nextSibling??void 0:n,f=null;for(;a<i||c<s;){if(t[a]===r[c]){a++,c++;continue}for(;i>a&&s>c&&t[i-1]===r[s-1];)i--,s--;if(i===a){let l=s<o?c?r[c-1].nextSibling??void 0:r[s-c]:u;for(;c<s;)W(e,r[c++],l)}else if(s===c)for(;a<i;)(!f||!f.has(t[a]))&&t[a].parentNode===e&&e.removeChild(t[a]),a++;else if(t[a]===r[s-1]&&r[c]===t[i-1]){let l=t[--i].nextSibling;W(e,r[c++],t[a++].nextSibling),W(e,r[--s],l),t[i]=t[a-1]}else{if(!f){f=new Map;let d=c;for(;d<s;)f.set(r[d],d++)}let l=f.get(t[a]);if(l!=null)if(c<l&&l<s){let d=a,g=1;for(;++d<i&&d<s&&!(!f.has(t[d])||f.get(t[d])!==l+g);)g++;if(g>l-c){let h=t[a];for(;c<l;)W(e,r[c++],h)}else t[a].parentNode===e?e.replaceChild(r[c++],t[a++]):(W(e,r[c++],u),a++)}else a++;else t[a].parentNode===e&&e.removeChild(t[a]),a++}}return r}function de(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 W(e,t,r){v.active&&t.parentNode===e||(r&&r.parentNode===e?e.insertBefore(t,r):e.appendChild(t))}function ke(e,t,r){r==null?delete e[t]:e[t]=r}function _i(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 Ti(e,t){if(!t||typeof t!="function")return;let r=t[ki]?.name;if(!r)return;let n=r.indexOf(":");n!==-1&&J(e,r.slice(0,n),r.slice(n+1),t)}function Tt(e,t,r){let n=typeof r=="function"?O(()=>r()):r;if(!(!n||typeof n!="object"))for(let o of Object.keys(n))J(e,t,o)}function Oi(e,t){let r=(n,o)=>{typeof n=="function"&&(J(e,"use",n.name||"use",o),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 Ir(e,t,r,n=!1){return Ti(e,r),typeof r!="function"?(E(e,t,r,n),()=>{}):C(()=>{B(e,"attribute",t,r);let o=typeof r=="function"?r():r;E(e,t,o,n)})}function Lr(e,t,r){return typeof r!="function"?(ke(e,t,r),()=>{}):(Ti(e,r),C(()=>{B(e,"property",t,r);let n=typeof r=="function"?r():r;ke(e,t,n)}))}function Ei(e,t,r){return typeof r!="function"?(E(e,t,!!r),()=>{}):C(()=>{B(e,"attribute",t,r);let n=r();E(e,t,!!n)})}function Ot(e,t){if(t==null){e.removeAttribute("class");return}if(typeof t=="function"){C(()=>{B(e,"attribute","class",t),Ot(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 Et(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(C(()=>{let s=!!o();for(let a of i)e.classList.toggle(a,s)}));else{let s=!!(typeof o=="function"?o():o);for(let a of i)e.classList.toggle(a,s)}}}function Ct(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 Ci(e){let{element:t,props:r,prevProps:n=iu,isSVG:o=!1,skipChildren:i=!1,isCustomElement:s}=e;if(!t||!ru(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===qr,c=[];for(let u in r){if(i&&u==="children")continue;let f=r[u],l=n[u];if(f===l)continue;if(u==="ref"){jr(f,t);continue}if(u==="use"){Oi(t,f);continue}if(u.startsWith("on:")){c.push(_i(t,u.slice(3),f));continue}if(u.startsWith("prop:")){J(t,"prop",u.slice(5),f),c.push(Lr(t,u.slice(5),f));continue}if(u.startsWith("attr:")){J(t,"attr",u.slice(5),f),c.push(Ir(t,u.slice(5),f,a));continue}if(u.startsWith("bool:")){J(t,"bool",u.slice(5),f),c.push(Ei(t,u.slice(5),f));continue}if(u==="class"||u==="className"){typeof f=="function"?c.push(C(()=>{B(t,"attribute","class",f),Ot(t,f())})):Ot(t,f);continue}if(u==="classList"){Tt(t,"class",f),typeof f=="function"?c.push(C(()=>{B(t,"attribute","class",f),Et(t,f())})):Et(t,f,c);continue}if(u==="style"){Tt(t,"style",f),typeof f=="function"?c.push(C(()=>{B(t,"attribute","style",f),Ct(t,f())})):Ct(t,f);continue}if(u.startsWith("on")){let h=u.slice(2).toLowerCase();l&&ci(t,h),f&&uu(t,h,f);continue}let d=s??t.localName.includes("-"),g=ii.has(u)||!a&&u in t||d&&!a&&!Uc(u);typeof f=="function"?c.push(g?Lr(t,u,f):Ir(t,u,f,a)):c.push(C(()=>g?ke(t,u,r[u]):E(t,u,r[u],a)))}for(let u in n)if(!(u in r))if(u.startsWith("on")){let f=u.slice(2).toLowerCase();ci(t,f)}else ii.has(u)?ke(t,u,null):t.removeAttribute(u);return()=>{c.forEach(u=>u())}}function pu(e,t,r=!1){for(let n in t){let o=t[n];if(n==="ref"){jr(o,e);continue}if(n!=="children"){if(n==="use"){Oi(e,o);continue}if(n.startsWith("on:")){_i(e,n.slice(3),o);continue}if(n.startsWith("prop:")){J(e,"prop",n.slice(5),o),Lr(e,n.slice(5),o);continue}if(n.startsWith("attr:")){J(e,"attr",n.slice(5),o),Ir(e,n.slice(5),o,r);continue}if(n.startsWith("bool:")){J(e,"bool",n.slice(5),o),Ei(e,n.slice(5),o);continue}if(n.startsWith("on")&&n.length>2){let i=n.slice(2).toLowerCase();if(typeof o=="function")if(Fr.has(i)){e[`$$${i}`]=o;let s=`__fx_${i}`;if(!e[s]){let a=c=>{e[`$$${i}`]?.(c)};e.addEventListener(i,a),e[s]=a}}else e[`$$${i}`]=o,kt.has(i)||pe([i]);continue}if(n==="class"||n==="className"){Ot(e,o);continue}if(n==="classList"){Tt(e,"class",o),typeof o=="function"?C(()=>{B(e,"attribute","class",o),Et(e,o())}):Et(e,o);continue}if(n==="style"){Tt(e,"style",o),typeof o=="function"?C(()=>{B(e,"attribute","style",o),Ct(e,o())}):Ct(e,o);continue}if(n==="innerHTML"){if(typeof o=="function"){let i=x(()=>{let s=o();for(;typeof s=="function";)s=s();e.innerHTML=s});S(()=>i())}else e.innerHTML=o;continue}if(n==="value"&&(e.tagName==="INPUT"||e.tagName==="TEXTAREA")){if(typeof o=="function"){let i=x(()=>{let s=o();for(;typeof s=="function"&&s.length===0;)s=s();document.activeElement!==e&&(e.value=s??"")});S(()=>{i()})}else C(()=>{document.activeElement!==e&&(e.value=t[n]??"")});continue}if(n==="checked"&&e.tagName==="INPUT"){if(typeof o=="function"){let i=x(()=>{let s=o();for(;typeof s=="function"&&s.length===0;)s=s();document.activeElement!==e&&(e.checked=s??"")});S(()=>{i()})}else C(()=>{document.activeElement!==e&&(e.checked=t[n]??"")});continue}if(n==="value"&&e.tagName==="SELECT"){if(typeof o=="function"){let i=!0,s=x(()=>{let a=o();for(;typeof a=="function"&&a.length===0;)a=a();i?(i=!1,queueMicrotask(()=>{e.value=a??""})):e.value=a??""});S(()=>{s()})}else{let i=!0;C(()=>{let s=t[n];i?(i=!1,queueMicrotask(()=>{e.value=s??""})):e.value=s??""})}continue}if(typeof o=="function"){let i=x(()=>{let s=o();for(;typeof s=="function"&&s.length===0;)s=s();oi(e,n,s,r)});S(()=>{i()})}else C(()=>oi(e,n,t[n],r))}}}function jr(e,t){if(!e)return;let r=e[ki]?.name;if(J(t,"ref",r||typeof e=="function"&&e.name||"ref",e),Wr(e)){let n=t,o=e;if(!n)return;typeof n=="function"?n(o):typeof n=="object"&&"current"in n&&(n.current=o);return}typeof e=="function"?e(t):typeof e=="object"&&"current"in e&&(e.current=t)}function hu(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 xt(e){return e!=null&&(typeof e=="object"||typeof e=="function")&&typeof e.then=="function"||e instanceof Promise}function Hr(e,t,r){if(!t)throw new Error("Container element is required");let n,o,i=[];return V(s=>{$(()=>{v.active||(t.textContent=""),Pt(t),$t(),j(t,e)}),o=s}),()=>{o?.(),n?.(),i.forEach(s=>s()),t.textContent=""}}function U(e,t){if(ui.fn)return ui.fn(e,t);t&&Bo(t);let r=typeof e=="function"?Yo(()=>e(t)):e,n=r!=null&&(typeof r=="function"||typeof r=="object");if(n)try{r.$name=e?.name}catch{}return n&&!Zo(r)?Ve(r):r}function Kr(){let e=globalThis.__FX_DATA__;if(e)return e;if($r!==void 0)return $r;let t=null;if(typeof document<"u"){let r=document.getElementById(mu)?.textContent;if(r)try{t=JSON.parse(r)}catch{t=null}}return $r=t}function Mt(){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 Lt(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 vu(e){Mt();let t=v.cursor;return t&&t.nodeType===1&&t.tagName.toLowerCase()===e.toLowerCase()?(gu.has(e.toLowerCase())?v.cursor=t.nextSibling:(v.parents.push(t),v.cursor=t.firstChild),t):(It&&t&&Lt(`<${e}>`,t),null)}function wu(e){Mt();let t=v.cursor;return t&&t.nodeType===1&&t.tagName.toLowerCase()===e.toLowerCase()?(v.cursor=t.nextSibling,t):(It&&t&&Lt(`<${e}> (static)`,t),null)}function bu(e){if(e===""){let r=v.cursor;return r&&r.nodeType===3&&r.data!==""?(v.cursor=r.nextSibling,r.data="",r):null}Mt();let t=v.cursor;return t&&t.nodeType===3?(v.cursor=t.nextSibling,t.nodeValue!==e&&(t.nodeValue=e),t):(It&&t&&Lt(`text ${JSON.stringify(e.slice(0,24))}`,t),null)}function Au(e){Mt();let t=v.cursor;return t&&t.nodeType===8&&t.data===e?(v.cursor=t.nextSibling,t):(It&&t&&Lt(`marker <!--${e.slice(0,24)}-->`,t),null)}function Su(){fi||(fi=!0,ou({hydrateElement:vu,hydrateText:bu,hydrateMarker:Au,hydrateStatic:wu}))}function Dt(e,t,r){Su(),v.active=!0,v.cursor=t.firstChild,v.parents=[];let n=Kr(),o=r?.resourceNamespace,i=0;Yn(()=>o?`${o}:r${i++}`:`r${i++}`),Gn(n?s=>s in n?{value:n[s]}:void 0:null);try{return Hr(e,t)}finally{v.active=!1,v.cursor=null,v.parents=[]}}function Ri(e,t={}){if(typeof e=="function")return U(e,t);if(typeof e!="string"||e.length===0)return null;let r=hu(e);if(L())return Vr().createElement(e,r);let n=r?document.createElementNS(qr,e):document.createElement(e);return pu(n,t,r),xu(n,t),n}function xu(e,t){if(!t||t.children===void 0)return;let r=fe(()=>t.children),n=o=>{j(e,o,typeof o=="function"?null:void 0)};Array.isArray(r)?r.forEach(n):n(r)}function ku(e){return typeof e=="function"?e:(()=>e)}function qt(e){return()=>{let t=e();return typeof t=="function"?t():t}}function _u(e){return e!=null&&e!==!1}function Tu(e){return!e||typeof e!="object"?!1:!!(typeof e._$litType$<"u"||typeof e._$litDirective$<"u"||Array.isArray(e.strings)&&Array.isArray(e.values))}function Pi(e){let t=qt(()=>e.when),r=m(t,void 0,{name:"Show.when"}),n=m(r,void 0,{name:"Show.cond"}),o=N(),i=null,s=null,a=c=>{c!==s&&(i&&ve(i),i=ge(o),s=c)};return m(()=>{let c=n();return a(c?"when":"fallback"),I(i,()=>{if(c){let u=e.children;return typeof u=="function"&&!Tu(u)?typeof r=="function"?O(()=>O(r)?u(r()):e.fallback):u(r):u}return e.fallback});return e.fallback??null},void 0,{name:"Show.result"})}function $i(e){let t=qt(()=>e.each),r=()=>e.fallback??null,n=(o,i)=>{let s=e.children,a=Array.isArray(s)?s.map(c=>typeof c=="function"?c(o,i):c):typeof s=="function"?s(o,i):s;return xi(a),a};return e.by?Jn(t,e.by,(o,i)=>n(o,i),{fallback:r}):Bn(t,(o,i)=>n(o,i),{fallback:r})}function Ni(e){let t=qt(()=>e.each);return Xn(t,(r,n)=>{let o=e.children(r,n);return xi(o),o},{fallback:()=>e.fallback??null})}function Mi(e){return{[Dr]:!0,when:qt(()=>e.when),get children(){return e.children}}}function Ii(e){let t=Array.isArray(e.children)?e.children:[e.children],r=N(),n=null,o=-1,i=s=>{s!==o&&(n&&ve(n),n=ge(r),o=s)};return m(()=>{for(let s=0;s<t.length;s+=1){let c=t[s],u=0;for(;typeof c=="function"&&!c[Dr]&&u++<10;)c=c();if(!c||typeof c!="object"||c[Dr]!==!0)continue;let f=c.when();if(_u(f))return i(s),I(n,()=>typeof c.children=="function"?c.children(f):c.children)}return i(-2),I(n,()=>e.fallback??null)},void 0,{name:"Switch"})}function Li(e){let t=ku(e.component),{component:r,...n}=e,o=N(),i=null,s;return m(()=>{let a=t();return a!==s&&(i&&ve(i),i=ge(o),s=a),a==null?null:typeof a=="string"?{tag:a,props:n}:I(i,()=>a(n))},void 0,{name:"Dynamic"})}function Di(e){let t=()=>e.mount?typeof e.mount=="function"?e.mount():e.mount:document.body,r,n;return V(o=>{r=o,n=document.createElement("div"),n.style.display="contents",t().appendChild(n),j(n,e.children)&&jr(e.ref,n)}),S(()=>{r(),n.remove()}),null}function Ur(e){if(L())return e.fallback??null;let t=v.active,[r,n]=w(!t);return t&&queueMicrotask(()=>n(!0)),m(()=>r()?e.children:e.fallback??null,void 0,{name:"client-only"})}function Vi(e){let[t,r]=w(null),n=()=>r(null);return m(()=>{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}},void 0,{name:"ErrorBoundary"})}function Wi(e){return m(()=>{let t=typeof e=="function"?e():e,r=[];for(let[n,o]of Object.entries(t)){if(!n)continue;(typeof o=="function"?o():o)&&r.push(n)}return r.join(" ")},void 0,{name:"ClassMap"})}function Ou(e){return e.startsWith("--")?e:e.replace(/[A-Z]/g,t=>`-${t.toLowerCase()}`)}function Fi(e){return m(()=>{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(`${Ou(n)}: ${i}`)}return r.join("; ")},void 0,{name:"StyleMap"})}var qr,ii,Kc,ol,zc,F,Nt,eu,tu,Nr,v,wi,iu,ki,su,au,Mr,kt,Fr,Q,fu,yu,ui,fl,mu,$r,gu,It,fi,Dr,qi,Eu,P=q(()=>{"use strict";A();$o();A();A();ni();A();A();A();A();A();A();A();A();A();A();A();A();qr="http://www.w3.org/2000/svg";ii=new Set(["className","value","checked","selected","innerHTML","innerText","textContent","indeterminate","htmlFor"]),Kc=new Set(["id","class","className","style","slot","part","exportparts","is","title","role","lang","dir","tabindex","hidden"]);ol=typeof Symbol=="function"&&Symbol.for?Symbol.for("react.element"):60103;zc="1.0.0-alpha.92",F={dom:zc,reactive:Po};Nt=Symbol.for("fluixi.server-node"),eu=Symbol.for("fluixi.dom.server-host"),tu=globalThis,Nr=tu[eu]??={server:typeof document>"u",nodes:null};v={active:!1,cursor:null,parents:[]},wi=null;iu={},ki="__fx_at",su="__fx_loc";au="__fluixi_delegated_events__",Mr=globalThis[au]??={names:new Set},kt=Mr.names,Fr=new Set(["scroll","focus","blur","load","error","resize","mouseenter","mouseleave","pointerenter","pointerleave","gotpointercapture","lostpointercapture"]);Q=0,fu=200;yu="__fx_dom_create_component__",ui=globalThis[yu]??={fn:null};fl=globalThis[Symbol.for("fluixi.requestLocals")]??=new WeakMap,mu="__FX_DATA__";gu=new Set(["area","base","br","col","embed","hr","img","input","link","meta","param","source","track","wbr"]),It=typeof process<"u"&&process.env&&!1;fi=!1;Dr=Symbol("match");qi=Ur;Eu=Nt});function zi(e){if(e!=null&&(typeof e=="object"||typeof e=="function"))try{e.$lazy=!0}catch{}return e}function Oe(e,t){let r,n,o;function i(){return n||(n=e().then(a=>r=a.default)),n}t?.preload&&i();let s=(a=>{if(r){let c=r;return zi(O(()=>c(a)))}if(!o){let[c]=ne(()=>i(),{transport:!1});if(o=c,c.error)throw c.error}return m(()=>{let c=o();return c?zi(U(c,a)):void 0})});return s.preload=()=>i().then(()=>{}),s.$lazy=!0,s.loader=e,s}var zt=q(()=>{"use strict";P();A()});function Nu(){Yi||(Yi=!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 Bt(e,t,r){let n=!!e?.Provider,o=n?e:e.context,i=n?t:e.value,s=n?!1:e.debug??!1;n||Nu();let a=typeof i=="function"?i():i,c=n?r:e;return o.Provider({value:a,get children(){return c?.children},debug:s})}function Zi(e){let t=Ce(e);return[t,n=>Bt(t,n.value,n)]}function Yr(e,t){if(e.length===0)return fe(()=>t);let[r,n]=e[0],o=e.slice(1);return Bt(r,n,{get children(){return Yr(o,t)}})}function Qi(e){return t=>{let r=Re(e);return t.children(r)}}function es(e,t){let r=Re(e);return r===e.defaultValue?t():r}function Ce(e,t){let r=X(e,t),n=o=>(o.debug,r.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:r.id,Provider:mi(n),defaultValue:e}}function Re(e){let t=K(e);return t!==void 0?t:e.defaultValue}var Yi,Zr=q(()=>{"use strict";P();A();A();Yi=!1});function cs(){return as}function tn(e){as=e}function us(e,t){Jt.set(e,t)}function fs(e){return Jt.get(e)}function Wu(){Jt.clear()}function ls(){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))Jt.set(n,o);return!0}catch(t){return console.error("Failed to deserialize hydration data:",t),!1}}function rn(){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()),Wu()}function ds(){return L()}var as,Jt,nn=q(()=>{"use strict";P();as=!1,Jt=new Map;typeof window<"u"&&window.addEventListener("load",()=>{setTimeout(rn,100)})});function cn(){return typeof document<"u"&&typeof document.startViewTransition=="function"}function un(){if(typeof window>"u"||typeof window.matchMedia!="function")return!1;try{return window.matchMedia("(prefers-reduced-motion: reduce)").matches}catch{return!1}}function uf(e){return e!=="none"&&cn()&&!un()}function vs(e){let t=[];for(let r of e){let n=r?.preload;if(typeof n=="function")try{let o=n();o&&typeof o.then=="function"&&t.push(o.catch(()=>{}))}catch{}}return t.length?Promise.all(t).then(()=>{}):null}function fn(e,t){if(!uf(e))return Promise.resolve(t()).then(()=>{});let r=document.startViewTransition;try{let n=r.call(document,()=>t());return n.finished?.catch(()=>{}),n.ready?.catch(()=>{}),n.updateCallbackDone.catch(()=>{})}catch{return Promise.resolve(t()).then(()=>{})}}var ln=q(()=>{"use strict"});function Gt(e,t,r={}){let{preserveStructure:n,multiple:o,throwOnError:i=!1,defaultValue:s,maxDepth:a=20}=r;if(!e||typeof e!="object")return s;if(!t)return e;if(Array.isArray(t))if(n){let f={};for(let l of t){let d=Gt(e,l,{...r,preserveStructure:!1});d!==void 0&&lf(f,l,d)}return f}else return t.map(f=>Gt(e,f,{...r,preserveStructure:!1}));let c=dn(t,{...r,throwOnError:i});if(c.length===0)return e;if(typeof n>"u"||n===!1){let f=df(e,t);return o===!1&&Array.isArray(f)?f[0]:f===void 0&&s!==void 0?s:f}let u=z(e,c,0,a);return u===void 0&&s!==void 0?s:u}function df(e,t,r={}){let{createMissing:n=!1,add:o=!1,debug:i=!1}=r,s=dn(t),a=e,c=!1,u="",f=t;if(typeof a=="object"&&!Array.isArray(a)&&f.length>0&&a[f])return a=a[f],a;for(let l=0;l<s.length;l++){let d=s[l],g=s.length>1?l===s.length-1:!1;if(a===null&&!n)return;let h=s[l+1];switch(d.type){case"property":if(a&&typeof a=="object")if(Array.isArray(a)){if(typeof d.value=="number"){let p=d.value;if(n&&p>=a.length)for(let b=a.length;b<=p;b++)a.push(void 0);if(n&&(a[p]===null||a[p]===void 0)&&(!g||c)&&(h?a[p]=h.type==="index"||h.type==="slice"||h.type==="union"||h.type==="wildcard"?[]:{}:a[p]=null,c=!1),a=a[p],h){c=!0;continue}}else o?a.push({[String(d.value)]:null}):a=a.map(p=>p[String(d.value)]);if(h)continue;return ws(a)}else{if(a[u]&&u.split(".").length>=2){a=a[u];continue}if(n&&(a[String(d.value)]===null||a[String(d.value)]===void 0)&&(!g||c)&&(h?a[String(d.value)]=h.type==="index"||h.type==="slice"||h.type==="union"||h.type==="wildcard"?[]:{}:a[String(d.value)]=null,c=!1,a=a[String(d.value)],h)){c=!0;continue}if(a?(!a[String(d.value)]&&n&&(a[String(d.value)]=null),a=a[String(d.value)]):a={[String(d.value)]:null},h)continue}else if(n)a={},a[String(d.value)]=h.type==="index"||h.type==="slice"||h.type==="union"||h.type==="wildcard"||r.type==="array"?[]:{},a=a[String(d.value)];else return;break;case"index":case"wildcard":if(Array.isArray(a)){if(d.type==="index"){let p=d.value;if(p<0){a=a[a.length-Math.abs(p)];continue}if(n&&(p>=a.length||a[p]==null||a[p]==null)&&!g){for(let b=a.length;b<=p;b++)a.push(void 0);h&&(a[p]=h.type==="index"||h.type==="slice"||h.type==="union"||h.type==="wildcard"?[]:{})}a=a[p]}else if(!g)continue}else if(n){let p=s[l+1];a=[];let b=d.value;for(let T=0;T<=b;T++)a.push(void 0);a[b]=p.type==="index"||p.type==="slice"||p.type==="union"||p.type==="wildcard"||r.type==="array"?[]:{},a=a[b]}else{if(d.type==="index"&&typeof a=="object"&&a&&a[String(d.value)]!==void 0){a=a[String(d.value)];continue}if(typeof a=="object"){a=Object.values(a);continue}return}break;default:return}}return ws(a)}function ws(e){return Array.isArray(e)?e.filter(t=>typeof t<"u"):e}var Yt,z,dn,ff,lf,pn=q(()=>{"use strict";Yt=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",z=(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 s=z(e,i,r+1,n);if(s!==void 0)return s;if(e&&typeof e=="object")if(Array.isArray(e)){let a=[];for(let c=0;c<e.length;c++){let u=z(e[c],t,r+1,n);u!==void 0&&(a[c]=u)}return a.length>0?a:void 0}else{let a={};for(let c in e)if(e.hasOwnProperty(c)){let u=z(e[c],t,r+1,n);u!==void 0&&(a[c]=u)}return Object.keys(a).length>0?a:void 0}return}switch(o.type){case"property":if(Yt(e)&&o.value&&String(o.value)in e){let s=e[String(o.value)],a=z(s,i,r+1,n);if(a!==void 0)return{[String(o.value)]:a}}break;case"index":if(Array.isArray(e)){let s=o.value;if(s>=0&&s<e.length){let a=z(e[s],i,r+1,n);if(a!==void 0){let c=new Array(e.length).filter(u=>u!==void 0);return c[s]=a,c}}}else if(e&&typeof e=="object"){let s=String(o.value);if(s in e){let a=z(e[s],i,r+1,n);if(a!==void 0)return{[s]:a}}}break;case"wildcard":if(e&&typeof e=="object")if(Array.isArray(e)){let s=[],a=!1;for(let c=0;c<e.length;c++){let u=z(e[c],i,r+1,n);u!==void 0&&(s[c]=u,a=!0)}return a?s:void 0}else{let s={},a=!1;for(let c in e)if(e.hasOwnProperty(c)){let u=z(e[c],i,r+1,n);u!==void 0&&(s[c]=u,a=!0)}return a?s:void 0}break;case"slice":if(Array.isArray(e)){let[s,a]=o.value,c=Math.max(0,s),u=Math.min(e.length,a===1/0?e.length:a),f=[],l=!1;for(let d=c;d<u;d++){let g=z(e[d],i,r+1,n);g!==void 0&&(f[d]=g,l=!0)}return l?f:void 0}break;case"union":if(Array.isArray(e)){let s=o.value,a=[],c=!1;for(let u of s)if(u>=0&&u<e.length){let f=z(e[u],i,r+1,n);f!==void 0&&(a[u]=f,c=!0)}return c?a:void 0}break;case"filter":if(Array.isArray(e)){let s=o.value,a=[],c=!1;for(let u=0;u<e.length;u++)if(s(e[u])){let f=z(e[u],i,r+1,n);f!==void 0&&(a[u]=f,c=!0)}return c?a:void 0}break}},dn=(e,t={})=>{let{type:r="auto",throwOnError:n=!1}=t;if(!e||typeof e!="string")return[];let o=[],i="",s=!1,a=!1,c="",u="",f=0,d=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,g=h=>{let p=h.trim();if(p==="*"||p==="")return{type:"wildcard",value:p===""?"[]":"*",raw:p===""?"[]":h};if(p==="[]")return{type:"wildcard",value:"[]",raw:h};if(/^-?\d+$/.test(p))return{type:"index",value:parseInt(p,10),raw:h};if(p.includes(":")){let b=p.split(":").map(ce=>ce.trim()),T=b[0]===""?0:parseInt(b[0],10),_=b[1]===""?1/0:parseInt(b[1],10);if(isNaN(T)||isNaN(_)){if(n)throw new Error(`Invalid slice notation: ${h}`);return{type:"wildcard",value:"*",raw:h}}return{type:"slice",value:[T,_],raw:h}}if(p.includes(",")){let b=p.split(",").map(T=>{let _=parseInt(T.trim(),10);return isNaN(_)?-1:_}).filter(T=>T>=0);if(b.length===0){if(n)throw new Error(`Invalid union notation: ${h}`);return{type:"wildcard",value:"*",raw:h}}return{type:"union",value:b,raw:h}}if(p.startsWith("?(")&&p.endsWith(")")){let b=p.slice(2,-1);try{return{type:"filter",value:ff(b),raw:h}}catch(T){if(n)throw T;return{type:"wildcard",value:"*",raw:h}}}return p.startsWith('"')&&p.endsWith('"')||p.startsWith("'")&&p.endsWith("'")?{type:"property",value:p.slice(1,-1),raw:h}:{type:"property",value:p,raw:h}};for(let h=0;h<e.length;h++){let p=e[h],b=e[h+1];if((p==='"'||p==="'")&&!a){a=!0,c=p;continue}else if(p===c&&a){a=!1,c="",p==='"'||p==="'"||(s?u+=p:i+=p);continue}if(a){s?u+=p:i+=p;continue}if(p==="["&&!s){i&&(o.push({type:"property",value:i,raw:i}),i=""),s=!0,u="";continue}if(p==="]"&&s&&!a){s=!1;let _=g(u);o.push(_);continue}let T=o.length>0?o[o.length-1]:null;if(p==="."&&!s&&!a){if(b==="."){let _=e.split("..")[0];o.push({type:"property",value:_,raw:_}),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(s)u+=p;else if(T&&T.type!=="descendant")i+=p;else{let _=e.split(T?.raw)[1];_!==void 0?i=_:i+=p}}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 p=parseInt(h.value,10);if(!isNaN(p))return{...h,type:"index",value:p}}return h})},ff=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}`)}},lf=(e,t,r)=>{let n=dn(t),o=e;for(let i=0;i<n.length;i++){let s=n[i],a=i===n.length-1;switch(s.type){case"property":if(a)o[String(s.value)]=r;else{if(!o[String(s.value)]){let u=n[i+1];o[String(s.value)]=u.type==="index"||u.type==="slice"||u.type==="union"||u.type==="wildcard"?[]:{}}o=o[String(s.value)]}break;case"index":Array.isArray(o)||(o=[]);let c=s.value;if(a){if(c>=o.length)for(let u=o.length;u<=c;u++)o.push(void 0);o[c]=r}else{if(!o[c]){let u=n[i+1];o[c]=u.type==="index"||u.type==="slice"||u.type==="union"||u.type==="wildcard"?[]:{}}o=o[c]}break;case"wildcard":if(Array.isArray(o))if(a)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 pf(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]&&ye(e[o],t[i],r)){n[i]=1;continue e}return!1}return!0}var ye,bs=q(()=>{"use strict";pn();ye=(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?pf(e,t,r):e.every((p,b)=>ye(p,t[b],r));if(typeof e!="object")return e===t;let i=e instanceof Date,s=t instanceof Date;if(i!==s)return!1;if(i)return e.getTime()===t.getTime();let a=e instanceof RegExp,c=t instanceof RegExp;if(a!==c)return!1;if(a)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[p,b]of e)if(!t.has(p)||!ye(b,t.get(p),r))return!1;return!0}let l=e instanceof Set,d=t instanceof Set;if(l!==d)return!1;if(l){if(e.size!==t.size)return!1;let p=[...t],b=new Uint8Array(p.length);e:for(let T of e){for(let _=0;_<p.length;_++)if(!b[_]&&ye(T,p[_],r)){b[_]=1;continue e}return!1}return!0}if(!Yt(e)||!Yt(t))return!1;let g=Object.keys(e),h=Object.keys(t);if(g.length!==h.length)return!1;for(let p of g)if(!Object.prototype.hasOwnProperty.call(t,p)||!ye(e[p],t[p],r))return!1;return!0}});function hf(e){return e.startsWith("//")?e.replace(/^\/+/,"/"):e}function Ke(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,(c,u)=>(n.push(u),"([^/]+)")).replace(/\*([a-zA-Z0-9_]*)/g,(c,u)=>(u&&n.push(u),"(.*)"));o.startsWith("/")||(o="/"+o),o===""&&(o="/");let i=new RegExp(`^${o}${r?"$":"(?=/|$)"}`),s=t.match(i);if(!s)return null;let a={};return n.forEach((c,u)=>{a[c]=s[u+1]}),{params:a,path:s[0]}}function As(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 yf(e){return[...e].sort((t,r)=>As(r)-As(t))}function Ue(e,t){let r=t.length>1?t.replace(/\/+$/,"")||"/":t,n=Ss(e,r);if(!n)return null;let o=[],i="",s={};for(let a of n.layers){i=hf(mf(i,a.consumed));let c={};for(let[u,f]of Object.entries(a.params))u in s||(c[u]=f),s[u]=f;o.push({route:a.route,component:a.route.component,params:c,pathname:i||"/"})}return{matched:o,params:s,pathname:t}}function Ss(e,t){if(!e||e.length===0)return null;let r=yf(e);for(let n of r){let o=!!n.children&&n.children.length>0,i=Ke(n.path,t,!o);if(i){if(o){let s=Ss(n.children,t);if(s)return{layers:[{route:n,params:i.params,consumed:i.path},...s.layers]};continue}return{layers:[{route:n,params:i.params,consumed:i.path}]}}}return null}function mf(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}`}function gf(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 Zt(e="/"){let t=[{path:e,state:null}],r=0,n=new Set,o=()=>n.forEach(i=>i());return{get(){let{path:i,state:s}=t[r];return{...gf(i),state:s}},push(i,s=null){t=t.slice(0,r+1),t.push({path:i,state:s}),r=t.length-1,o()},replace(i,s=null){t[r]={path:i,state:s},o()},subscribe(i){return n.add(i),()=>n.delete(i)}}}function $e(){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)}}}function vf(e){let t={};return e&&new URLSearchParams(e.startsWith("?")?e.slice(1):e).forEach((n,o)=>t[o]=n),t}function wf(e,t){if(!t)return e||"/";let r=t.replace(/\/$/,"");return e===r?"/":e.startsWith(r+"/")?e.slice(r.length)||"/":e||"/"}function bf(e,t){return!t||/^https?:\/\//.test(e)?e:`${t.replace(/\/$/,"")}${e.startsWith("/")?e:"/"+e}`}function xs(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:vf(f.search)}},s=f=>Ue(t,wf(f,n)),a=(()=>{let f=i();return{location:f,match:s(f.pathname)}})(),c=()=>{let f=i();a={location:f,match:s(f.pathname)},o.forEach(l=>l(a))},u=r.subscribe(c);return{state(){return a},subscribe(f){return o.add(f),()=>o.delete(f)},navigate(f,l={}){let d=bf(f,n);l.replace?r.replace(d,l.state??null):r.push(d,l.state??null)},match(f){return s(f)},destroy(){u(),o.clear()}}}var hn=q(()=>{"use strict";});function ks(e,t){return async(...r)=>{let n=t+":"+JSON.stringify(r);if(cs()||typeof window<"u"){let i=fs(n);if(i!==void 0)return i}if(Be.has(n))return Be.get(n);if(ze.has(n))return ze.get(n);let o=Promise.resolve(e(...r)).then(i=>(Be.set(n,i),ze.delete(n),ds()&&us(n,i),i),i=>{throw ze.delete(n),i});return ze.set(n,o),o}}function _s(e){let t=typeof e=="string"?r=>r.startsWith(e):e;for(let r of Be.keys())t(r)&&(Be.delete(r),Sf.add(r));Af(r=>r+1)}function Ts(e,t){let[r]=ne(t||(()=>!0),e);return r}function Os(e){return yn.has(e)||yn.set(e,w(void 0)),yn.get(e)}function mn(e,t){let r=t||e.name||"action",n=async o=>{let[,i]=Os(r),s=()=>i(void 0),a=()=>n(o);i({input:o,pending:!0,clear:s,retry:a});try{let c=await e(o);return i({input:o,result:c,pending:!1,clear:s,retry:a}),c}catch(c){throw i({input:o,error:c,pending:!1,clear:s,retry:a}),c}};return n.url=r,n.with=o=>mn((...i)=>e(o,...i),t),n}function Es(e){let[t]=Os(e.url);return t}function Cs(e){return e}var Be,ze,dp,Af,Sf,yn,xf,pp,Rs=q(()=>{"use strict";A();nn();Zr();Be=new Map,ze=new Map;[dp,Af]=w(0),Sf=new Set;yn=new Map;xf=Ce(void 0,"route-data"),pp=xf.Provider});var Is={};On(Is,{A:()=>xn,Form:()=>Mf,Link:()=>tr,Outlet:()=>vn,Redirect:()=>wn,Router:()=>gn,action:()=>mn,cache:()=>ks,createAsync:()=>Ts,createBrowserHistory:()=>$e,createMemoryHistory:()=>Zt,lazy:()=>Oe,matchPath:()=>Ke,matchRoutes:()=>Ue,prefersReducedMotion:()=>un,preloadRoutes:()=>If,revalidate:()=>_s,runWithOwner:()=>I,select:()=>Rf,supportsViewTransitions:()=>cn,useAction:()=>Cs,useLevelParams:()=>Ef,useLinkNavigation:()=>Pf,useLocation:()=>Ge,useMatch:()=>An,useNavigate:()=>er,useParam:()=>bn,useParamSelector:()=>Cf,useParams:()=>Xe,useRouteData:()=>$f,useRouter:()=>Ne,useSearchParams:()=>Sn,useSubmission:()=>Es});function kf(e,t,r){let n,o=e.route.data;if(typeof o=="function"){let f=!1;S(()=>{f=!0});let l=N(),[d]=ne(()=>o({params:r.params,location:r.location},l,()=>f));n=d}let i=()=>Ns.Provider({value:n,get children(){return $s.Provider({value:e.params,get children(){return Ps.Provider({value:{depth:t,...r},get children(){return U(e.component,{})}})}})}});if(!n)return i();let s=n,a=()=>s.loading,[c,u]=w(O(()=>!a()));return x(()=>u(!a())),m(()=>c()?i():null)}function Ms(e){let t=e.depth+1,[r,n]=w(O(()=>e.matched()[t]?.component));return x(()=>{let o=e.matched()[t]?.component;O(r)!==o&&n(()=>o)}),m(()=>{if(!r())return e.notFound?e.notFound():null;let i=O(()=>e.matched())[t];return kf(i,t,{matched:e.matched,params:e.params,location:e.location})})}function _f(e){return e==null?Tf():typeof e=="function"?U(e,{}):e}function Tf(){let e=_e("div");E(e,"class","fx-not-found"),E(e,"role","main"),E(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=_e("h1");E(t,"style","margin:0;font-size:2.5rem;font-weight:700"),j(t,"404");let r=_e("p");return E(r,"style","margin:0;opacity:.7"),j(r,"This page could not be found."),e.appendChild(t),e.appendChild(r),e}function gn(e){let t=e.history??$e(),r=xs({routes:e.routes,base:e.base,history:t}),[n,o]=w(r.state()),i=0,s=()=>{let d=Qt??e.transition??"auto";return Qt=void 0,d},a=r.subscribe(d=>{let g=++i,h=s(),p=vs((d.match?.matched??[]).map(T=>T.component).filter(Boolean)),b=()=>(o(d),zn());if(!p){fn(h,b);return}p.then(()=>{if(g===i)return fn(h,b)})});S(()=>{a(),r.destroy(),i++});let c=m(()=>(n().match?.matched??[]).filter(d=>d.component)),u={router:r,location:m(()=>n().location),params:m(()=>n().match?.params??{})},f={depth:-1,matched:c,params:u.params,location:u.location,notFound:()=>_f(e.notFound)},l;return Je.Provider({value:u,get children(){return l??=Ms(f)}})}function vn(){let e=K(Ps);return e?Ms(e):null}function wn(e){let t=K(Je);if(t&&typeof window<"u"){let r=!1;S(()=>r=!0),queueMicrotask(()=>{r||t.router.navigate(e.to,{replace:e.replace!==!1})})}return null}function Ne(){let e=K(Je);if(e)return e;if(typeof window>"u")return Of;throw new Error("[router] useRouter must be used within <Router>")}function Xe(){let e=Ne().params;return m(()=>e(),{},{equals:(t,r)=>JSON.stringify(t)===JSON.stringify(r)})}function Ef(){return K($s)??{}}function bn(e){let t=Xe();return m(()=>t()[e])}function Cf(e,t){let r=Xe();return m(()=>e(r()),void 0,t?{equals:t}:void 0)}function An(e){let t=Ge();return m(()=>Ke(typeof e=="function"?e():e,t.pathname))}function Sn(){let e=Ge(),t=er();return[m(()=>e.query),(o,i)=>{let s=new URLSearchParams(e.search);for(let[c,u]of Object.entries(o))u===null?s.delete(c):s.set(c,u);let a=s.toString();t(e.pathname+(a?`?${a}`:""),i)}]}function Rf(e,t){let r=(n,o)=>ye(n,o);return t!==void 0?m(()=>Gt(e(),t),void 0,{equals:r}):m(e,void 0,{equals:r})}function Ge(){let{location:e}=Ne();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 Pf(e={}){let t=K(Je);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(),Qt=e.transition,t.router.navigate(i.pathname+i.search+i.hash,{replace:e.replace})))}}function er(){let{router:e}=Ne();return(t,r)=>{Qt=r?.transition,e.navigate(t,r)}}function $f(){return K(Ns)??(()=>{})}function tr(e){let t=K(Je),r=()=>t?.router.navigate(te(e.href)??"",{replace:te(e.replace)}),n=_e("a");E(n,"href",te(e.href)??""),e.slot&&E(n,"slot",te(e.slot));for(let i of Object.keys(e)){if(Nf.has(i))continue;let s=e[i];s!=null&&typeof s!="function"&&E(n,i,String(s))}if(typeof n.addEventListener=="function")n.addEventListener("click",i=>{i.metaKey||i.ctrlKey||i.shiftKey||i.altKey||(i.preventDefault(),r())});else{let i=te(e.className??e.class)??"";i&&E(n,"class",i)}typeof n.addEventListener=="function"&&x(()=>{let i=te(e.href)??"";n.setAttribute("href",i);let s=te(e.className??e.class)??"",a=te(e.activeClass)??"",c=te(e.active)??t?.location().pathname===i;n.className=[s,c?a:""].filter(Boolean).join(" ")});let o=e.children;return o!=null&&j(n,o),n}function Mf(e){let t=e.action,r=e.className??e.class,n=t.url??"",o=_e("form");E(o,"method","post"),n&&E(o,"action",n),r&&E(o,"class",r);for(let s of Object.keys(e)){if(s==="action"||s==="children"||s==="class"||s==="className")continue;let a=e[s];a!=null&&typeof a!="function"&&E(o,s,String(a))}typeof o.addEventListener=="function"&&o.addEventListener("submit",s=>{s.preventDefault();let a={};new FormData(o).forEach((c,u)=>{a[u]=c}),Promise.resolve(t(a)).catch(()=>{})});let i=e.children;return i!=null&&j(o,i),o}async function If(e,t){let r=Ue(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 Je,Ps,$s,Ns,Qt,Of,te,Nf,xn,kn=q(()=>{"use strict";A();ln();P();A();pn();bs();hn();hn();Rs();zt();ln();A();Je=X(void 0,"router"),Ps=X(void 0,"outlet"),$s=X(void 0,"route-params"),Ns=X(void 0,"route-data");Of={router:{navigate:()=>{}},location:()=>({pathname:"",search:"",hash:"",query:{}}),params:()=>({})};te=e=>typeof e=="function"?e():e,Nf=new Set(["href","slot","class","className","active","activeClass","replace","children"]);xn=tr});var Df={};On(Df,{$component:()=>Jr,A:()=>xn,ClientOnly:()=>Ur,DEV:()=>We,Dynamic:()=>Li,ErrorBoundary:()=>Vi,FRAMEWORK_NAME:()=>ss,For:()=>$i,Fragment:()=>Qr,Index:()=>Ni,Link:()=>tr,Match:()=>Mi,NoSsr:()=>qi,Outlet:()=>vn,Portal:()=>Di,Redirect:()=>wn,Router:()=>gn,Show:()=>Pi,Store:()=>pt,Suspense:()=>je,Switch:()=>Ii,VERSION:()=>is,addClass:()=>li,batch:()=>$,classMap:()=>Wi,cleanupDelegation:()=>Gi,composeProviders:()=>Yr,createBrowserHistory:()=>$e,createComponent:()=>Te,createComputed:()=>Un,createConsumer:()=>Qi,createContext:()=>Ce,createContextWithProvider:()=>Zi,createDebounce:()=>eo,createDeferred:()=>Qn,createEffect:()=>x,createIsomorphicState:()=>ts,createMemo:()=>m,createMemoryHistory:()=>Zt,createProvider:()=>Bt,createRenderEffect:()=>C,createResource:()=>ne,createRoot:()=>V,createSelector:()=>Zn,createSignal:()=>w,createStore:()=>xr,delegateEvents:()=>pe,devOnly:()=>Gr,getFrameworkInfo:()=>Vu,getOwner:()=>N,getSharedConfig:()=>Br,hydrate:()=>Dt,initDelegation:()=>Xi,insert:()=>j,isDOMNode:()=>Rt,isDev:()=>Xr,isLitTemplateResult:()=>hi,isRenderable:()=>Ji,jsx:()=>en,jsxs:()=>os,lazy:()=>Oe,mount:()=>Ds,onCleanup:()=>S,onMount:()=>Vt,onUnmount:()=>Wt,portal:()=>Bi,read:()=>lo,reduce:()=>fo,removeClass:()=>di,render:()=>Ee,runWithOwner:()=>I,setAttribute:()=>E,setOwner:()=>Hn,setProperty:()=>ke,spread:()=>Ci,startClient:()=>qs,styleMap:()=>Fi,toggleClass:()=>pi,untrack:()=>O,untrackStore:()=>kr,useCallback:()=>Ut,useContext:()=>Re,useEffect:()=>Fe,useEventListener:()=>Kt,useLocation:()=>Ge,useMatch:()=>An,useMemo:()=>Ft,useNavigate:()=>er,useParam:()=>bn,useParams:()=>Xe,useProvide:()=>es,useReducer:()=>Ht,useRef:()=>jt,useRouter:()=>Ne,useSearchParams:()=>Sn});A();A();var hr="1.0.0-alpha.92",co=hr.split(".")[0],no=`__fluixi_signal_state_v${co}__`,Ta=`__fluixi_signal_builds_v${co}__`,Oa=e=>{typeof queueMicrotask=="function"?queueMicrotask(e):Promise.resolve().then(e)};function uo(){return{consumer:null,untracked:!1,owner:null,queue:[],scheduled:!1,flushing:!1,batchDepth:0,hostSchedule:Oa,onSuspend:null,onError:null,observer:null}}var pr=globalThis;function Ea(e){let t=uo(),r=e;for(let n of Object.keys(t))n in e||(r[n]=t[n]);return e}function Ca(){let e=pr[no];return e?Ea(e):pr[no]=uo()}var k=Ca();(pr[Ta]??=[]).push(hr);function Ra(e){return k.observer=e,()=>{k.observer===e&&(k.observer=null)}}var yr=[],Pa;function $a(e){let t=k.observer;t&&t.created(e.parents===void 0?{...e,parents:yr,origin:e.origin??Pa}:e)}function Na(e){return k.observer?(yr.push(e),!0):!1}function Ma(){yr.pop()}function Ia(e){k.observer?.ran?.(e)}function La(e){k.observer?.disposed?.(e)}var Da="__FLUIXI_DEVTOOLS_HOOK__",oo=globalThis[Da];if(typeof oo?.inject=="function")try{oo.inject({observeReactiveNodes:Ra,version:hr})}catch{}function qa(){return k.observer!=null}var io=0,so=1,nt=2,Va=class{constructor(){this.observers=null,this.watchers=null,this.version=0}updateIfNecessary(){}track(){if(k.untracked)return;let e=k.consumer;e&&((this.observers??=new Set).add(e),(e.sources??=new Set).add(this))}};var Wa=class extends Va{constructor(e,t){super(),this._threw=!1,this._initialized=!1,this.state=nt,this.sources=null,this._fn=e,this._equals=t?.equals===!1?()=>!1:t?.equals??Object.is}get(){if(k.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===so&&this.sources){for(let e of this.sources)if(e.updateIfNecessary(),this.state===nt)break}(this.state===nt||!this._initialized)&&this.recompute(),this.state=io}recompute(){if(this.sources){for(let a of this.sources)a.observers?.delete(this);this.sources.clear()}let e=k.consumer,t=k.untracked,r=Na(this);k.consumer=this,k.untracked=!1;let n,o=!1,i;try{n=this._fn()}catch(a){o=!0,i=a,n=this._value}finally{k.consumer=e,k.untracked=t,r&&Ma()}let s=!this._initialized||this._threw!==o||(o?i!==this._error:!this._equals(this._value,n));if(this._initialized=!0,this._threw=o,this._error=i,this._value=n,Ia(this),s){if(this.version++,this.observers)for(let a of[...this.observers])a.markDirty(nt);ao(this)}}markDirty(e){if(this.state>=e)return;let t=this.state===io;if(this.state=e,t){if(this.observers)for(let r of[...this.observers])r.markDirty(so);ao(this)}}peek(){if(this.updateIfNecessary(),this._threw)throw this._error;return this._value}};function ao(e){if(e.watchers)for(let t of[...e.watchers])t._notify(e)}function Fa(e){return k.onSuspend?(k.onSuspend(e,k.owner),!0):!1}function ja(){return k.owner}function Ha(e,t){let r=k.owner;k.owner=e;try{return t()}finally{k.owner=r}}function Ka(e){if(k.owner){if(k.owner.disposed){e();return}(k.owner.cleanups??=[]).push(e)}}function Ua(e){k.hostSchedule=e??(t=>{Promise.resolve().then(t)})}function za(e){return!!e&&typeof e.then=="function"}Ua(()=>{});var Ba=Symbol.for("signal"),Ja=Symbol.for("memo");function Xa(e,t,r){let n=t,o=ja(),i=new Wa(()=>Ha(o,()=>{try{return n=e(n)}catch(a){if(za(a))return Fa(a),n;throw a}}),{equals:r?.equals}),s=(()=>i.get());return Object.defineProperty(s,Ba,{value:!0,enumerable:!0}),Object.defineProperty(s,Ja,{value:!0,enumerable:!0}),$a({kind:"memo",node:i,handle:s,name:r?.name}),qa()&&Ka(()=>La(i)),s}function fo(e,t,r,n){return Xa(()=>e().reduce(t,r),void 0,n)}function lo(e){let t=e;for(;typeof t=="function";)t=t();return t}A();var Sr="1.0.0-alpha.92",_o=Sr.split(".")[0],po=`__fluixi_signal_state_v${_o}__`,Ga=`__fluixi_signal_builds_v${_o}__`,Ya=e=>{typeof queueMicrotask=="function"?queueMicrotask(e):Promise.resolve().then(e)};function To(){return{consumer:null,untracked:!1,owner:null,queue:[],scheduled:!1,flushing:!1,batchDepth:0,hostSchedule:Ya,onSuspend:null,onError:null,observer:null}}var mr=globalThis;function Za(e){let t=To(),r=e;for(let n of Object.keys(t))n in e||(r[n]=t[n]);return e}function Qa(){let e=mr[po];return e?Za(e):mr[po]=To()}var ie=Qa();(mr[Ga]??=[]).push(Sr);function ec(e){return ie.observer=e,()=>{ie.observer===e&&(ie.observer=null)}}var tc=[],ot;function rc(e,t){if(!ie.observer)return t();let r=ot;ot=e;try{return t()}finally{ot=r}}function nc(e){let t=ie.observer;t&&t.created(e.parents===void 0?{...e,parents:tc,origin:e.origin??ot}:e)}function ho(e,t,r){ie.observer?.moved?.(e,t,r)}function yo(e){ie.observer?.disposed?.(e)}var oc="__FLUIXI_DEVTOOLS_HOOK__",mo=globalThis[oc];if(typeof mo?.inject=="function")try{mo.inject({observeReactiveNodes:ec,version:Sr})}catch{}function Oo(){return ie.observer!=null}var at=Symbol("store-raw"),go=Symbol("store-node"),vo=Symbol("store-has"),wo=Symbol("store-self"),bo=Symbol("store-track");var De=new WeakMap,gr=new WeakMap,Ae=new WeakMap,ct=new WeakMap;function ic(e,t){if(!be(e)||!Oo())return;let r=new Set,n=s=>{if(!(!be(s)||r.has(s))){r.add(s);for(let a of Object.values(s))n(a)}};n(ct.get(t)??t);let o=new Set,i=s=>{if(!be(s))return;let a=s;if(r.has(a)||o.has(a))return;o.add(a);let c=De.get(a);if(c){for(let u of c.keys.values())yo(u);c.all&&yo(c.all),De.delete(a),Ae.delete(a),gr.delete(a)}for(let u of Object.values(a))i(u)};i(e)}var ut=(e,t,r)=>r?`${e}[${String(t)}]`:`${e}.${String(t)}`;function Eo(e,t,r){let n=t?.owner,o=n&&r!==void 0?ut(n.name,r,t?.array):void 0,[i,s]=rc(n?.store,()=>w(e,o?{name:o}:void 0)),a=i;return a.$=s,a}function ft(e){let t=De.get(e);return t?t.owner||(t.owner=Ae.get(e)):De.set(e,t={keys:new Map,owner:Ae.get(e),array:Array.isArray(e)}),t}function Ao(e,t,r){let n=e.keys.get(t);return n||e.keys.set(t,n=Eo(r,e,t)),n}function sc(e,t,r,n){let o=Ae.get(e);if(o&&o.store===t&&o.name===r)return;let i={store:t,name:r};Ae.set(e,i),ct.set(e,ct.get(n)??n);let s=De.get(e);if(s&&(s.owner=i,!!Oo())){for(let[a,c]of s.keys)ho(c,t,ut(r,a,s.array));s.all&&ho(s.all,t,ut(r,"*",s.array))}}function So(e){let t=ft(e);(t.all||(t.all=Eo(void 0,t,"*")))()}function xo(e,t){e.$(typeof t=="function"?()=>t:t)}function be(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 it(e){if(!be(e))return e;let t=gr.get(e);if(t)return t;let r=new Proxy(e,ac);return gr.set(e,r),r}var ac={get(e,t,r){if(t===at||t===go)return e;if(t===we)return r;if(t===vo)return c=>c in e;if(t==="__proxy")return!0;if(t===bo||t===wo)return So(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=ft(e),s=Ao(i,t,n),a=s();return be(a)?(i.owner&&sc(a,s,ut(i.owner.name,t,i.array),e),it(a)):a},set(){return!0},deleteProperty(e,t){return t in e&&G(e,t,void 0),!0},has(e,t){return t===at||t===we||t===go||t===vo||t===wo||t===bo?!0:(Ao(ft(e),t,e[t])(),t in e)},ownKeys(e){return So(e),Reflect.ownKeys(e)},getOwnPropertyDescriptor(e,t){return Reflect.getOwnPropertyDescriptor(e,t)}};function Co(e,t=new Set){if(e==null||typeof e!="object")return e;let r=e[at]??e;if(t.has(r)||!be(r))return r;t.add(r);let n=!1,o=s=>{let a=Co(s,t);return a!==s&&(n=!0),a};if(Array.isArray(r)){let s=r.map(o);return n?s:r}let i={};for(let s of Object.keys(r))i[s]=o(r[s]);return n?i:r}function G(e,t,r){let n=Co(r),o=e[t];if(o===n&&(n!==void 0||t in e))return;let i=Array.isArray(e),s=i?e.length:0;n===void 0?delete e[t]:e[t]=n;let a=ft(e),c=a.keys.get(t);if(c&&xo(c,n),ic(o,e),i&&e.length!==s){let u=a.keys.get("length");u&&xo(u,e.length)}a.all&&a.all.$(void 0)}function vr(e,t){return typeof e=="function"?e(t):e}function wr(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)?wr(o,n):G(e,r,n)}}function dt(e){let t=[],r=e.replace(/\[([^\]]*)\]/g,".$1");for(let n of r.split("."))n.length&&t.push(n);return t}function Ro(e,t,r){let n=t.length-1;for(let i=0;i<n;i++){let s=t[i];if(s==="*"){let c=t.slice(i+1);if(Array.isArray(e))for(let u=0;u<e.length;u++)Ro(e[u],c,r);return}let a=e[s];(a==null||typeof a!="object")&&(a=/^\d+$/.test(t[i+1])?[]:{},G(e,s,a)),e=a}let o=t[n];if(o==="*"){if(Array.isArray(e))for(let i=0;i<e.length;i++)G(e,i,vr(r,e[i]));return}G(e,o,vr(r,e[o]))}function ko(e,t,r){Ro(e,dt(t),r)}function cc(e){return Array.isArray(e)&&e.length>0&&e.every(t=>Array.isArray(t)&&t.length>=2&&typeof t[0]=="string")}function st(e,t){for(let r=e.length-1;r>=t.length;r--)G(e,String(r),void 0);e.length!==t.length&&G(e,"length",t.length);for(let r=0;r<t.length;r++)G(e,String(r),t[r])}function uc(e,t){let r=t[0];if(typeof r=="function"&&t.length===1){let n=r(e);n&&n!==e&&wr(e,n);return}if(Array.isArray(r)&&t.length===1){if(cc(r)){for(let n of r)ko(e,n[0],n[1]);return}if(Array.isArray(e)){st(e,r);return}if(r.length===0)return;throw new TypeError("[fluixi] set() was given an array that is neither a batch of [path, value] pairs nor a replacement for an array root. Name the path you meant, as in set('items', [...]).")}if(r&&typeof r=="object"&&!Array.isArray(r)&&t.length===1){wr(e,r);return}if(t.length>=3){br(e,t.slice(0,-1),t[t.length-1]);return}ko(e,String(r),t[1])}function fc(e,t){if(typeof t=="function"){if(!Array.isArray(e))return[];let r=[];for(let n=0;n<e.length;n++)t(e[n],n)&&r.push(n);return r}if(Array.isArray(t))return Array.isArray(e)?t.map(Number):t.map(String);if(t&&typeof t=="object"&&("from"in t||"to"in t||"by"in t)){if(!Array.isArray(e))return[];let r=t.by??1,n=t.from??0,o=t.to??e.length-1,i=[];for(let s=n;s<=o;s+=r)s>=0&&s<e.length&&i.push(s);return i}return t==="*"?Array.isArray(e)?e.map((r,n)=>n):Object.keys(e??{}):[t]}function br(e,t,r){if(e==null)return;let[n,...o]=t;if(typeof n=="string"){let s=dt(n);if(s.length>1){br(e,[...s,...o],r);return}}let i=fc(e,n);if(o.length===0){for(let s of i)G(e,s,vr(r,e[s]));return}for(let s of i){let a=e[s];if(a==null||typeof a!="object"){let c=o[0];a=typeof c=="number"||/^\d+$/.test(String(c))?[]:{},G(e,s,a)}br(a,o,r)}}function Ar(e){if(e==null||typeof e!="object")return e;if(Array.isArray(e))return e.map(Ar);let t={};for(let r of Object.keys(e))t[r]=Ar(e[r]);return t}function oe(e,t){let r=e;for(let n of dt(t)){if(r==null)return;r=r[n]}return r}var pt=class{constructor(e,t={immutable:!0}){this.options=t,this.root=e,this.set=((...r)=>$(()=>uc(this.root,r))),e&&typeof e=="object"&&(Ae.set(e,{store:this,name:t.name??"store"}),ct.set(e,e)),nc({kind:"store",node:this,handle:()=>this.root,name:t.name})}get state(){return it(this.root)}get proxy(){return it(this.root)}get accessor(){return(()=>it(this.root))}unwrap(){return this.root}getNode(e){return this.root&&this.root[e]}get(e){if(e==null||e==="")return lt(this.state);let t=this.state;for(let r of dt(e)){if(t==null)return;t=t[r]}return lt(t)}select(e){return m(()=>e(this.state))}subscribe(e){return x(()=>e(this.state))}watch(e,t){let r;return x(()=>{let n=e(this.state);Object.is(n,r)||(t(n,r),r=n)})}reactive(e){return m(()=>this.state[e])}produce(e){this.set((t=>{let r=Ar(t);return e(r),r}))}reconcile(e,t={}){this.set(e)}push(e,...t){let r=oe(this.root,e);this.set(e,r.concat(t))}pop(e){let t=oe(this.root,e).slice(),r=t.pop();return this.set(e,t),r}shift(e){let t=oe(this.root,e).slice(),r=t.shift();return this.set(e,t),r}splice(e,t,r,...n){let o=oe(this.root,e).slice(),i=o.splice(t,r,...n);return this.set(e,o),i}insert(e,t,r){let n=oe(this.root,e).slice();n.splice(t,0,r),this.set(e,n)}removeAt(e,t){let r=oe(this.root,e).slice(),n=r.splice(t,1);return this.set(e,r),n}replace(e,t){if(arguments.length>=2){let n=oe(this.root,String(e)),o=t;if(Array.isArray(n)&&Array.isArray(o)){st(n,o);return}this.set(e,o);return}let r=this.root;if(Array.isArray(r)&&Array.isArray(e)){st(r,e);return}this.set(e)}clear(e){let t=e===void 0?this.root:oe(this.root,e);if(Array.isArray(t)){st(t,[]);return}if(t&&typeof t=="object")for(let r of Object.keys(t))G(t,r,void 0)}toObservable(){let[e]=w(this.state);return e.toObservable()}dispose(){}},lc=["get","select","watch","subscribe","produce","reconcile","push","pop","shift","splice","insert","removeAt","replace","clear","unwrap","toObservable"];function dc(e,t){for(let r of lc)e[r]=t[r].bind(t);e.$=t.reactive.bind(t)}function xr(e,t={immutable:!0}){let r=new pt(e,t);return dc(r.set,r),[r.proxy,r.set]}function pc(e,t={}){return new pt(e,{...t,immutable:!1})}function lt(e){if(e==null||typeof e!="object")return e;let t=e[at];return t!==void 0?t:e}function kr(e){return O(()=>lt(e))}var Xf=Object.freeze({createStore:xr,createMutableStore:pc,batch:$,unwrap:lt,untrackStore:kr});P();A();P();var ji="1.0.0-alpha.92";P();yi(ji);P();P();P();A();var Cu={context:null,owner:null};function Br(){return Cu}var We=typeof process<"u"&&!1,zr=Symbol.for("fluixi-lifecycle");function Hi(){let e=N();if(!e)return null;if(!e[zr]){let t={mounts:[],effects:[],scheduled:!1};e[zr]=t}return e[zr]}function Ki(e){if(e.scheduled)return;if(L()){e.mounts=[],e.effects=[];return}e.scheduled=!0;let t=N();queueMicrotask(()=>{if(Fn(t)){e.mounts=[],e.effects=[];return}I(t,()=>{for(let r of e.mounts)try{let n=r();typeof n=="function"&&S(n)}catch(n){console.error("Error in onMount callback:",n)}for(let r of e.effects){let n;x(()=>{n&&n(),n=r()}),S(()=>{n&&n()})}e.mounts=[],e.effects=[]})})}function Te(e,t){return U(e,t)}function Jr(e,t){let r=typeof e=="function"?O(()=>e(t)):e,n=r!=null&&(typeof r=="function"||typeof r=="object");if(n)try{r.$name=e.name}catch{}return n&&!M(r)?Ve(r):r}function Vt(e,t=!0){if(L())return;let r=Hi();if(r){if(!t){r.scheduled||e();return}r.mounts.push(e),Ki(r)}else{if(!t){e();return}x(()=>{let n=O(e);typeof n=="function"&&S(n)})}}function Wt(e){S(e)}function Fe(e){let t=Hi();if(t)t.effects.push(e),Ki(t);else{let r;x(()=>{r&&r(),r=e()}),S(()=>{r&&r()})}}function Ft(e){return m(e)}function jt(e){let t={current:e};return S(()=>{t.current=null}),t}function Ht(e,t){let[r,n]=w(t);return[r,i=>{n(e(r(),i))}]}function Kt(e,t,r,n){Fe(()=>{let o=e&&"current"in e?e.current:e;if(o)return o.addEventListener(t,r,n),()=>{o.removeEventListener(t,r,n)}})}function Ut(e){return e}function Xr(){return We}function Gr(e){We&&e()}A();P();function Ui(e){return!!(e&&typeof e=="object"&&typeof e.then=="function"||e instanceof Promise)}var Ru=X(void 0,"suspense-list");function je(e){return U(Pu,e)}function Pu(e){let t=ro(),r=K(Ru),n=r?r.register(t.inFallback):void 0;function o(l){return l==null||typeof l=="boolean"?null:typeof l=="function"&&ee(l)&&!M(l)?l():l}let i=Si(()=>o(e.fallback??null)),s=dr(t,()=>fe(()=>e.children)),a=(l,d)=>{if(!(d>8))if(Array.isArray(l))for(let g of l)a(g,d+1);else typeof l=="function"&&M(l)&&a(l(),d+1)};dr(t,()=>{C(()=>a(s,0))});let[c,u]=w(void 0),f=Ui(s);return f&&(t.increment(),s.then(l=>{u(()=>l),t.decrement()},()=>t.decrement())),m(()=>(n?n.showFallback():t.inFallback())?i:f?c():s)}gi(je);Object.defineProperty(je,"__suspense",{value:!0,enumerable:!0});zt();zt();function Ee(e,t,r={}){if(pe(["click","input","change","submit"]),L())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 V(o=>{n=o;let i=typeof e=="function"?e():e;t.textContent="",Pt(t),$t(),j(t,()=>i)}),()=>{n&&(n(),n=void 0)}}function $u(e){return e&&typeof e=="object"&&(e._$litType$!==void 0||e._$litDirective$!==void 0)}function Bi(e,t,r={}){let n=document.createElement("div");n.setAttribute("data-portal","true"),t.appendChild(n);let o=Ee(e,n,r);return()=>{o(),t.contains(n)&&t.removeChild(n)}}function Ji(e){return!!(e==null||typeof e=="function"||Rt(e)||$u(e)||Array.isArray(e)||typeof e=="string"||typeof e=="number"||typeof e=="boolean")}function Xi(){L()||pe(["click","input","change","submit"])}function Gi(){L()}Zr();A();P();var Mu="__fluixi_iso_states__",Iu="__iso:";function Lu(){return globalThis[Mu]??=new Map}function Du(e){if(typeof window>"u")return;let t=Kr();return t?t[Iu+e]:void 0}function ts(e,t){let r=Du(e),n=r!==void 0?r:typeof window<"u"&&t.client?t.client():t.fallback,[o,i]=w(n);return Lu().set(e,{server:t.server,set:i}),{value:o,set:i,key:e}}P();P();P();P();P();A();var Qr=Symbol.for("fluixi.fragment"),rs=typeof window>"u";function ns(e){return e==null||e===!1?null:Array.isArray(e)?e.map(ns).flat():e}function en(e,t,r){if(e==null)return null;let n=t||{};if(r!==void 0&&(n.key=r),e===Qr)return m(()=>Ve(ns(n.children)));if(typeof e=="function"){let{type:o}=vi(e);return e.$$typeof===Symbol.for("react.provider")||o==="provider"?e(n):rs?{type:e,props:n}:m(()=>U(e,n),void 0,{name:"jsx component"})}return typeof e=="string"&&e.trim().length>0?qu(e,n):null}var os=en;function qu(e,t){return rs?{type:e,props:t||{}}:Ri(e,t)}var is="0.0.1",ss="Fluixi";function Vu(){return{name:ss,version:is,features:{ssr:!0,hydration:!0,jsx:!0,litHtml:!0,signals:!0,fineGrained:!0,lazy:!0,hooks:!0,devMode:!0}}}P();nn();A();A();A();var Fu=Object.defineProperty,ju=(e,t)=>{for(var r in t)Fu(e,r,{get:t[r],enumerable:!0})};function he(e){return typeof e=="function"?e():e}function Hu(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 ps(){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(i=>i+1))}}}}var on=globalThis[Symbol.for("fluixi.head")]??={active:null,scope:null};function hs(e){on.active=e}function Ku(){return on.scope?.()??on.active}function Pe(e){let t=Ku();if(!t)return globalThis.process?.env?.NODE_ENV!=="production"&&console.warn("[fluixi/head] useHead() called with no active head registry — ignored."),()=>{};let r=t.push(e);return typeof window<"u"&&N()&&S(r),r}function Xt(e){let t=5381;for(let r=0;r<e.length;r++)t=t*33^e.charCodeAt(r);return(t>>>0).toString(36)}function Uu(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:"+Xt(JSON.stringify(e))}function zu(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 Bu(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)zu(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 Ju(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 Xu(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 Gu(e,t,r){let n=(l,d)=>t.push({tag:"meta",key:l,attrs:d}),o=he(e.title);o!==void 0&&(r.title=o),e.titleTemplate!==void 0&&(r.template=e.titleTemplate);let i=he(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 s=he(e.description);s!==void 0&&n("meta:name:description",{name:"description",content:s});let a=he(e.keywords);a!==void 0&&n("meta:name:keywords",{name:"keywords",content:Array.isArray(a)?a.join(", "):a}),e.author!==void 0&&n("meta:name:author",{name:"author",content:e.author}),e.robots!==void 0&&n("meta:name:robots",{name:"robots",content:Hu(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 c=he(e.themeColor);c!==void 0&&n("meta:name:theme-color",{name:"theme-color",content:c});let u=he(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 l={google:"google-site-verification",bing:"msvalidate.01",yandex:"yandex-verification",pinterest:"p:domain_verify"};for(let[d,g]of Object.entries(e.verification)){if(g==null)continue;let h=l[d]??d;n("meta:name:"+h,{name:h,content:g})}}for(let l of e.alternates??[])t.push({tag:"link",key:"link:alternate:hreflang:"+l.hreflang,attrs:{rel:"alternate",hreflang:l.hreflang,href:l.href}});for(let l of e.feeds??[])t.push({tag:"link",key:"link:alternate:feed:"+l.href,attrs:{rel:"alternate",type:l.type??"application/rss+xml",href:l.href,...l.title?{title:l.title}:{}}});e.og&&Bu(e.og,t),e.twitter&&Ju(e.twitter,t),e.icons&&Xu(e.icons,t);let f=he(e.jsonLd);if(f!==void 0){let l=Array.isArray(f)?f:[f];for(let d of l){let g=JSON.stringify(d);t.push({tag:"script",key:"script:ldjson:"+Xt(g),attrs:{type:"application/ld+json"},children:g})}}for(let l of e.meta??[]){let d={};for(let[g,h]of Object.entries(l))h!=null&&(d[g==="httpEquiv"?"http-equiv":g]=h);t.push({tag:"meta",key:Uu(d),attrs:d})}for(let l of e.link??[]){let d={};for(let[g,h]of Object.entries(l))h!=null&&(d[g]=h);t.push({tag:"link",key:"link:"+(d.rel??"")+":"+(d.href??Xt(JSON.stringify(d))),attrs:d})}for(let l of e.script??[]){let d={},g;for(let[h,p]of Object.entries(l))p!=null&&(h==="children"?g=p:d[h]=p);t.push({tag:"script",key:"script:"+(d.src??Xt((g??"")+JSON.stringify(d))),attrs:d,children:g})}}function Yu(e,t){return typeof e=="function"?e(t):e.includes("%s")?e.replace("%s",t):e}function Zu(e){let t=[],r={};for(let i of e.sources){let s=typeof i=="function"?i():i;Gu(s,t,r)}r.title!==void 0&&t.push({tag:"title",key:"title",children:r.template?Yu(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 sn="data-fh",an="data-fh-key";function ys(e){for(let t=e.firstChild;t;t=t.nextSibling)if(t.nodeType===8&&t.data.startsWith("fh:")){t.parentNode?.removeChild(t);return}}function ms(e,t){for(let r of Array.from(e.attributes))r.name===sn||r.name===an||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 Qu(e){let t=document.createElement(e.tag);return ms(t,e.attrs),t.setAttribute(sn,""),t.setAttribute(an,e.key),e.tag==="script"&&e.children!=null&&(t.textContent=e.children),t}function ef(e,t){let r=document.head,n=new Map;for(let s of Array.from(r.querySelectorAll(`[${sn}]`))){let a=s.getAttribute(an);s.tagName!=="TITLE"&&a&&n.set(a,s)}let o=null,i=new Set;for(let s of e){if(s.tag==="title"){o=s.children;continue}if(s.tag==="htmlAttr")continue;i.add(s.key);let a=n.get(s.key);a&&a.tagName===s.tag.toUpperCase()?(ms(a,s.attrs),s.tag==="script"&&(a.textContent??"")!==(s.children??"")&&(a.textContent=s.children??"")):(a&&a.remove(),r.appendChild(Qu(s)))}for(let[s,a]of n)i.has(s)||a.remove();o!=null&&document.title!==o&&(document.title=o);for(let[s,a]of Object.entries(t))document.documentElement.getAttribute(s)!==a&&document.documentElement.setAttribute(s,a)}function gs(e){return V(t=>(x(()=>{e.version();let{tags:r,htmlAttrs:n}=Zu(e);ef(r,n)}),S(()=>{}),t))}var tf={};ju(tf,{Base:()=>af,JsonLD:()=>cf,Link:()=>of,Meta:()=>nf,Script:()=>sf,Title:()=>rf});function He(e){return typeof e=="function"?e():e}function rf(e){return Pe(()=>({title:He(e.children)})),null}function nf(e){return Pe(()=>({meta:[{...e,content:He(e.content)}]})),null}function of(e){return Pe(()=>{let t={};for(let[r,n]of Object.entries(e))t[r]=He(n);return{link:[t]}}),null}function sf(e){return Pe(()=>{let t={};for(let[r,n]of Object.entries(e))t[r]=He(n);return{script:[t]}}),null}function af(e){return Pe({base:e.href}),null}function cf(e){return Pe(()=>({jsonLd:He(e.data)})),null}function Ds(e,t){if(!t)throw new Error("Container element not found for mount()");Hr(()=>e(),t)}var Ls=e=>m(()=>Te(e));async function qs(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=ps();if(hs(i),ys(r),o){if(t.routes&&t.routes.length){let{preloadRoutes:s}=await Promise.resolve().then(()=>(kn(),Is));await s(t.routes,window.location.pathname)}ls(),tn(!0),Dt(Ls(e),r),Lf(),setTimeout(()=>{tn(!1),rn()},100)}else Ee(Ls(e),r);gs(i)}function Lf(){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)}}kn();return Ks(Df);})();
|
|
1
|
+
/*! @fluixi/core v1.0.0-alpha.94 | (c) 2026 Ibrahima Touré and Fluixi contributors | MIT */
|
|
2
|
+
"use strict";var Fluixi=(()=>{var or=Object.defineProperty;var ya=Object.getOwnPropertyDescriptor;var ha=Object.getOwnPropertyNames;var ma=Object.prototype.hasOwnProperty;var F=(e,t)=>()=>(e&&(t=e(e=0)),t);var Vn=(e,t)=>{for(var r in t)or(e,r,{get:t[r],enumerable:!0})},ga=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of ha(t))!ma.call(e,o)&&o!==r&&or(e,o,{get:()=>t[o],enumerable:!(n=ya(t,o))||n.enumerable});return e};var va=e=>ga(or({},"__esModule",{value:!0}),e);function Yn(){return{consumer:null,untracked:!1,owner:null,queue:[],scheduled:!1,flushing:!1,batchDepth:0,hostSchedule:wa,onSuspend:null,onError:null,observer:null}}function ba(e){let t=Yn(),r=e;for(let n of Object.keys(t))n in e||(r[n]=t[n]);return e}function Aa(){let e=nt[Hn];return e?ba(e):nt[Hn]=Yn()}function Gn(){return[...new Set(nt[Xn]??[])]}function Sa(e){return m.observer=e,()=>{m.observer===e&&(m.observer=null)}}function lr(e){let t=m.observer;t&&t.created(e.parents===void 0?{...e,parents:U,origin:e.origin??xa,scope:e.scope??Wn}:{...e,scope:e.scope??Wn})}function ka(e){return m.observer?(U.push(e),!0):!1}function _a(){U.pop()}function Oa(e){m.observer?.ran?.(e)}function Ea(e,t){m.observer?.wrote?.(e,t)}function J(e,t,r,n){let o=m.observer;!o?.bound||!U.length||o.bound(U[U.length-1],e,t,r,n)}function X(e,t,r,n){let o=m.observer;!o?.directive||!U.length||o.directive(U[U.length-1],e,t,r,n)}function Ta(e){m.observer?.contextCreated?.(e)}function sr(e,t,r){let n=m.observer;!n?.context||!U.length||n.context(U[U.length-1],e,t,r)}function dr(e){m.observer?.disposed?.(e)}function Zn(){return m.observer!=null}function ar(e){if(e.watchers)for(let t of[...e.watchers])t._notify(e)}function $a(e){if(m.untracked)return e();m.untracked=!0;try{return e()}finally{m.untracked=!1}}function be(e){let t=Ie(e);return e&&(e.owned??=[]).push(t),t}function Ae(e,t=!0){Le(e,t)}function to(e){return!!e&&e.disposed===!0}function Ie(e){return{cleanups:null,owned:null,parent:e,contexts:null}}function Y(e,t){let r=Symbol(t??"context");return Ta(r),{id:r,defaultValue:e,Provider:o=>{sr(r,"provide",o.value);let s=m.owner,i=Ie(s);(i.contexts=new Map).set(r,o.value),s&&(s.owned??=[]).push(i),m.owner=i;try{return o.children}finally{m.owner=s}}}}function q(e){let t=m.owner;for(;t;){if(t.contexts&&t.contexts.has(e.id)){let r=t.contexts.get(e.id);return sr(e.id,"read",r),r}t=t.parent}return sr(e.id,"read",e.defaultValue),e.defaultValue}function ro(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 no(e,t,r){let n=Ie(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 Na(e){m.onSuspend=e}function Ma(e){return m.onSuspend?(m.onSuspend(e,m.owner),!0):!1}function La(e){m.onError=e}function T(){return m.owner}function oo(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 S(e){if(m.owner){if(m.owner.disposed){e();return}(m.owner.cleanups??=[]).push(e)}}function Le(e,t=!0){if(!e.disposed){if(e.owned){for(let r=e.owned.length-1;r>=0;r--)Le(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=Ie(m.owner);m.owner&&(m.owner.owned??=[]).push(t);let r=m.owner;m.owner=t;try{return e(()=>Le(t))}finally{m.owner=r}}function Ia(e){m.hostSchedule=e??(t=>{Promise.resolve().then(t)})}function Da(e){e.queued||(e.queued=!0,m.queue.push(e),!m.scheduled&&m.batchDepth===0&&(m.scheduled=!0,m.hostSchedule(it)))}function it(){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 qa(){m.batchDepth===0&&it()}function Va(e){m.batchDepth++;try{return e()}finally{--m.batchDepth===0&&it()}}function pr(e,t=!1,r){let n=new Ha(e,t,r);return()=>n.dispose()}function Wa(e){return!!e&&typeof e.then=="function"}function b(e,t){let r=new Ra(e,{equals:t?.equals}),n=(()=>r.get()),o=(s=>{let i=typeof s=="function"?s(r.peek()):s;return r.set(i),qa(),i});return Object.defineProperty(n,io,{value:!0,enumerable:!0}),Object.defineProperty(n,Ka,{value:{get value(){return r.peek()},get version(){return r.version}},enumerable:!1}),lr({kind:"signal",node:r,handle:n,name:t?.name,set:o}),Zn()&&S(()=>dr(r)),[n,o]}function w(e,t,r){let n=t,o=T(),s=new eo(()=>$(o,()=>{try{return n=e(n)}catch(a){if(Wa(a))return Ma(a),n;throw a}}),{equals:r?.equals}),i=(()=>s.get());return Object.defineProperty(i,io,{value:!0,enumerable:!0}),Object.defineProperty(i,ja,{value:!0,enumerable:!0}),lr({kind:"memo",node:s,handle:i,name:r?.name}),Zn()&&S(()=>dr(s)),i}function _(e,t,r){let n=t;return pr(()=>{n=e(n)},!0,r?.name)}function so(e,t){let r=t;pr(()=>{r=e(r)})}function C(e,t){let r=t;return pr(()=>{r=e(r)})}function N(e){return Va(e)}function E(e){return $a(e)}function ao(){return it(),Promise.resolve()}function co(e,t,r){let n=[];return S(()=>{for(let o of n)o.dispose();n=[]}),w(()=>{let o=e()||[];return E(()=>{if(o.length===0){for(let c of n)c.dispose();return n=[],r?.fallback?r.fallback():[]}let s=new Map;for(let c of n)s.has(c.item)||s.set(c.item,c);let i=[],a=new Set;for(let c=0;c<o.length;c++){let u=o[c],f=s.get(u);if(f&&!a.has(f))f.setIndex(c),i.push(f),a.add(f);else{let l,d,h;D(p=>{h=p;let[v,A]=b(c,{name:"row index"});d=A,l=t(u,v)});let y={item:u,rendered:l,dispose:h,setIndex:d};i.push(y),a.add(y)}}for(let c of n)a.has(c)||c.dispose();return n=i,i.map(c=>c.rendered)})},void 0,{name:"mapArray"})}function uo(e,t,r,n){let o=[],s=[];return S(()=>{for(let i of s)i.dispose();o=[],s=[]}),w(()=>{let i=e()||[];return E(()=>{if(i.length===0){for(let l of s)l.dispose();return o=[],s=[],n?.fallback?n.fallback():[]}let a=new Map;for(let l=0;l<o.length;l++)a.set(o[l],s[l]);let c=[],u=[],f=new Set;for(let l=0;l<i.length;l++){let d=t(i[l]),h=a.get(d);if(h&&!f.has(d))h.setIndex(l),c.push(h);else{let y,p,v;D(A=>{v=A;let[k,Q]=b(l,{name:"row index"});p=Q;let pe=w(ee=>{let se=(e()||[])[k()];return se??ee},i[l]);y=r(pe,k)}),c.push({rendered:y,dispose:v,setIndex:p})}u.push(d),f.add(d)}for(let[l,d]of a)f.has(l)||d.dispose();return o=u,s=c,c.map(l=>l.rendered)})},void 0,{name:"keyArray"})}function fo(e,t,r){let n=[];return S(()=>{for(let o of n)o.dispose();n=[]}),w(()=>{let o=e()||[];return E(()=>{if(o.length===0){for(let c of n)c.dispose();return n=[],r?.fallback?r.fallback():[]}let s=n.length,i=o.length;for(let c=s;c<i;c++){let u,f,l,d=o[c];D(h=>{l=h;let[y,p]=b(d);f=p,u=t(y,c)}),n.push({rendered:u,setItem:f,dispose:l})}for(let c=i;c<s;c++)n[c].dispose();i<s&&(n=n.slice(0,i));let a=Math.min(s,i);for(let c=0;c<a;c++)n[c].setItem(o[c]);return n.map(c=>c.rendered)})},void 0,{name:"indexArray"})}function L(e){return typeof e=="function"&&e[za]===!0}function Ba(e){Un&&Un(e)}function lo(e){cr=e}function Ja(e){return cr?cr(e):void 0}function po(e){ur=e}function Xa(){return ur?ur():void 0}function Ya(e,t){zn&&zn(e,t)}function Bn(){let e=new Map,t=new Map;return{get:r=>e.get(r),set:(r,n)=>{e.set(r,n)},delete:r=>{e.delete(r)},keys:()=>e.keys(),clear:()=>{e.clear(),t.clear()},inflight:t}}function st(){let e=Ga?.();return e||(typeof window>"u"?Bn():Za??=Bn())}function yo(e,t=(r,n)=>r===n){let r=new Map;return _(()=>{let n=e();for(let[o,s]of r){let[i,a]=s,c=t(o,n);i()!==c&&a(c)}}),n=>{let o=r.get(n);if(!o){let[s,i]=b(!1);o=[s,i],r.set(n,o);let a=e();i(t(n,a))}return o[0]()}}function ho(e,t){let[r,n]=b(e(),t);return _(()=>{let o=e();t?.timeoutMs?setTimeout(()=>n(()=>o),t.timeoutMs):typeof requestIdleCallback=="function"?requestIdleCallback(()=>n(()=>o)):Promise.resolve().then(()=>n(()=>o))}),r}function mo(e,t){let r,n=(...o)=>{r!==void 0&&clearTimeout(r),r=setTimeout(()=>{r=void 0,e(...o)},t)};return S(()=>{r!==void 0&&clearTimeout(r)}),n}function Qa(e){return!!e&&typeof e.then=="function"}function ae(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:Xa(),i=s!==void 0?Ja(s):void 0,a=i!==void 0,[c,u]=b(i!==void 0?i.value:r.initialValue,{equals:!1}),[f,l]=b(void 0,{equals:!1}),[d,h]=b(i!==void 0||r.initialValue!==void 0?"ready":"unresolved",{equals:!1}),[y,p]=b(void 0,{equals:!1}),[v,A]=b(void 0,{equals:!1}),k=ir,Q=!1;_(()=>{let H=n();if(v(),H===!1||H===null||H===void 0){k=ir,N(()=>{h("unresolved"),p(void 0),l(void 0)});return}let se=Q;if(Q=!1,k!==ir&&H===k&&!se)return;if(k=H,a){a=!1;return}let tt=!1;S(()=>tt=!0);let Dn=E(d),pa=E(c),qn=Dn==="ready"||Dn==="refreshing";N(()=>{h(qn?"refreshing":"pending"),l(void 0)});try{let ye=o(H,{value:pa,refetching:qn});Qa(ye)?(p(ye),Ba(ye),ye.then(rt=>{tt||(s!==void 0&&Ya(s,rt),N(()=>{u(()=>rt),h("ready"),p(void 0)}))},rt=>{tt||N(()=>{l(rt),h("errored"),p(void 0)})})):N(()=>{u(()=>ye),h("ready"),p(void 0)})}catch(ye){if(tt)return;N(()=>{l(ye),h("errored"),p(void 0)})}});let pe=()=>{let H=d();return H==="pending"||H==="refreshing"},ee=(()=>{let H=f();if(H)throw H;if(pe()){let se=y();if(se)throw se}return c()});return Object.defineProperties(ee,{state:{get:d},loading:{get:pe},error:{get:f},latest:{get:c}}),Object.defineProperty(ee,Symbol.for("resource"),{value:!0,enumerable:!0}),Object.defineProperty(ee,Symbol.for("signal"),{value:!0,enumerable:!0}),[ee,{mutate:u,refetch:()=>{Q=!0,A(void 0)}}]}function ot(e){if(typeof e=="function"&&!e.length){let t=e();return L(t)?t:ot(t)}if(Array.isArray(e)){let t=[];for(let r=0;r<e.length;r++){let n=ot(e[r]);Array.isArray(n)?t.push.apply(t,n):t.push(n)}return t}return e}function De(e){let t=w(e);return Ua?w(()=>ot(t()),void 0,{name:"children"}):w(()=>ot(t()))}function vo(){let[e,t]=b(0),r=0;return{increment:()=>t(r+=1),decrement:()=>t(r-=1),inFallback:()=>e()>0}}function yr(e,t){return no(go,e,t)}function bo(){let[e,t]=b(void 0,{equals:!1});return{error:e,reset:()=>t(()=>{}),setError:n=>t(()=>n)}}function Ao(e,t){return no(wo,e,t)}var fr,Jn,Hn,Xn,wa,nt,m,U,xa,Wn,Ca,jn,Kn,Fn,Me,Qn,Ra,eo,Pa,Ha,io,ja,Ka,Fa,Ua,za,Un,cr,ur,zn,Ga,Za,ir,go,wo,Se,x=F(()=>{"use strict";fr="1.0.0-alpha.94",Jn=fr.split(".")[0],Hn=`__fluixi_signal_state_v${Jn}__`,Xn=`__fluixi_signal_builds_v${Jn}__`,wa=e=>{typeof queueMicrotask=="function"?queueMicrotask(e):Promise.resolve().then(e)};nt=globalThis;m=Aa();(nt[Xn]??=[]).push(fr);U=[];Ca="__FLUIXI_DEVTOOLS_HOOK__",jn=globalThis[Ca];if(typeof jn?.inject=="function")try{jn.inject({observeReactiveNodes:Sa,version:fr})}catch{}Kn=0,Fn=1,Me=2,Qn=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))}},Ra=class extends Qn{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++,Ea(this,m.consumer),this.observers)for(let t of[...this.observers])t.markDirty(Me);ar(this)}}peek(){return this._value}},eo=class extends Qn{constructor(e,t){super(),this._threw=!1,this._initialized=!1,this.state=Me,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===Fn&&this.sources){for(let e of this.sources)if(e.updateIfNecessary(),this.state===Me)break}(this.state===Me||!this._initialized)&&this.recompute(),this.state=Kn}recompute(){if(this.sources){for(let a of this.sources)a.observers?.delete(this);this.sources.clear()}let e=m.consumer,t=m.untracked,r=ka(this);m.consumer=this,m.untracked=!1;let n,o=!1,s;try{n=this._fn()}catch(a){o=!0,s=a,n=this._value}finally{m.consumer=e,m.untracked=t,r&&_a()}let i=!this._initialized||this._threw!==o||(o?s!==this._error:!this._equals(this._value,n));if(this._initialized=!0,this._threw=o,this._error=s,this._value=n,Oa(this),i){if(this.version++,this.observers)for(let a of[...this.observers])a.markDirty(Me);ar(this)}}markDirty(e){if(this.state>=e)return;let t=this.state===Kn;if(this.state=e,t){if(this.observers)for(let r of[...this.observers])r.markDirty(Fn);ar(this)}}peek(){if(this.updateIfNecessary(),this._threw)throw this._error;return this._value}};Pa=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()}};Ha=class{constructor(e,t=!1,r){this.queued=!1,this.disposed=!1,this.owner=Ie(m.owner),m.owner&&(m.owner.cleanups??=[]).push(()=>this.dispose()),this.computed=new eo(()=>{Le(this.owner,!1),$(this.owner,()=>{let n=e();typeof n=="function"&&(this.owner.cleanups??=[]).push(n)})}),lr({kind:"effect",node:this.computed,handle:this,internal:!t,...r?{name:r}:{}}),this.watcher=new Pa(()=>Da(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,dr(this.computed),this.watcher.unwatch(this.computed),Le(this.owner))}};Ia(()=>{});io=Symbol.for("signal"),ja=Symbol.for("memo"),Ka=Symbol.for("signal-node");Fa=typeof window>"u"?!1:window.__FLUIXI_PROD__===!0,Ua=typeof process>"u"?Fa:!1,za=Symbol.for("signal");Un=null;cr=null;ur=null;zn=null;Ga=null;ir=Symbol();go=Y();Na((e,t)=>{let r=ro(t,go);r&&(r.increment(),e.finally(()=>r.decrement()))});wo=Y();La((e,t)=>{let r=ro(t,wo);return r?(r.setError(e),!0):!1});Se=Symbol.for("fluixi-proxy")});var Go,Zo=F(()=>{"use strict";Go="1.0.0-alpha.94"});function pi(){return{consumer:null,untracked:!1,owner:null,queue:[],scheduled:!1,flushing:!1,batchDepth:0,hostSchedule:Kc,onSuspend:null,onError:null,observer:null}}function Fc(e){let t=pi(),r=e;for(let n of Object.keys(t))n in e||(r[n]=t[n]);return e}function Uc(){let e=Er[Qo];return e?Fc(e):Er[Qo]=pi()}function zc(e){return P.observer=e,()=>{P.observer===e&&(P.observer=null)}}function Bc(e,t){if(!P.observer)return t();let r=vt;vt=e;try{return t()}finally{vt=r}}function Jc(e){let t=P.observer;t&&t.created(e.parents===void 0?{...e,parents:he,origin:e.origin??vt,scope:e.scope??ei}:{...e,scope:e.scope??ei})}function yi(e){let t=P.observer;!t?.props||!he.length||!e||t.props(he[he.length-1],e)}function Xc(e){P.observer?.contextCreated?.(e)}function Yc(e,t,r){let n=P.observer;!n?.context||!he.length||n.context(he[he.length-1],e,t,r)}function ti(e,t,r){P.observer?.moved?.(e,t,r)}function ri(e){P.observer?.disposed?.(e)}function hi(){return P.observer!=null}function Zc(e){if(P.untracked)return e();P.untracked=!0;try{return e()}finally{P.untracked=!1}}function Qc(e){return{cleanups:null,owned:null,parent:e,contexts:null}}function mi(e,t){let r=Symbol(t??"context");return Xc(r),{id:r,defaultValue:e,Provider:o=>{Yc(r,"provide",o.value);let s=P.owner,i=Qc(s);(i.contexts=new Map).set(r,o.value),s&&(s.owned??=[]).push(i),P.owner=i;try{return o.children}finally{P.owner=s}}}}function gi(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 eu(e){P.onSuspend=e}function tu(e){P.onError=e}function ru(e){P.hostSchedule=e??(t=>{Promise.resolve().then(t)})}function vi(e){return Zc(e)}function wi(e){return typeof e=="function"&&e[nu]===!0}function su(e,t){if(!_e(e)||!hi())return;let r=new Set,n=i=>{if(!(!_e(i)||r.has(i))){r.add(i);for(let a of Object.values(i))n(a)}};n(St.get(t)??t);let o=new Set,s=i=>{if(!_e(i))return;let a=i;if(r.has(a)||o.has(a))return;o.add(a);let c=Ve.get(a);if(c){for(let u of c.keys.values())ri(u);c.all&&ri(c.all),Ve.delete(a),Oe.delete(a),Tr.delete(a)}for(let u of Object.values(a))s(u)};s(e)}function bi(e,t,r){let n=t?.owner,o=n&&r!==void 0?xt(n.name,r,t?.array):void 0,[s,i]=Bc(n?.store,()=>b(e,o?{name:o}:void 0)),a=s;return a.$=i,a}function kt(e){let t=Ve.get(e);return t?t.owner||(t.owner=Oe.get(e)):Ve.set(e,t={keys:new Map,owner:Oe.get(e),array:Array.isArray(e)}),t}function ci(e,t,r){let n=e.keys.get(t);return n||e.keys.set(t,n=bi(r,e,t)),n}function au(e,t,r,n){let o=Oe.get(e);if(o&&o.store===t&&o.name===r)return;let s={store:t,name:r};Oe.set(e,s),St.set(e,St.get(n)??n);let i=Ve.get(e);if(i&&(i.owner=s,!!hi())){for(let[a,c]of i.keys)ti(c,t,xt(r,a,i.array));i.all&&ti(i.all,t,xt(r,"*",i.array))}}function ui(e){let t=kt(e);(t.all||(t.all=bi(void 0,t,"*")))()}function fi(e,t){e.$(typeof t=="function"?()=>t:t)}function _e(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 wt(e){if(!_e(e))return e;let t=Tr.get(e);if(t)return t;let r=new Proxy(e,cu);return Tr.set(e,r),r}function Ai(e,t=new Set){if(e==null||typeof e!="object")return e;let r=e[At]??e;if(t.has(r)||!_e(r))return r;t.add(r);let n=!1,o=i=>{let a=Ai(i,t);return a!==i&&(n=!0),a};if(Array.isArray(r)){let i=r.map(o);return n?i:r}let s={};for(let i of Object.keys(r))s[i]=o(r[i]);return n?s:r}function Z(e,t,r){let n=Ai(r),o=e[t];if(o===n&&(n!==void 0||t in e))return;let s=Array.isArray(e),i=s?e.length:0;n===void 0?delete e[t]:e[t]=n;let a=kt(e),c=a.keys.get(t);if(c&&fi(c,n),su(o,e),s&&e.length!==i){let u=a.keys.get("length");u&&fi(u,e.length)}a.all&&a.all.$(void 0)}function Cr(e,t){return typeof e=="function"?e(t):e}function Rr(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)?Rr(o,n):Z(e,r,n)}}function Ot(e){let t=[],r=e.replace(/\[([^\]]*)\]/g,".$1");for(let n of r.split("."))n.length&&t.push(n);return t}function Si(e,t,r){let n=t.length-1;for(let s=0;s<n;s++){let i=t[s];if(i==="*"){let c=t.slice(s+1);if(Array.isArray(e))for(let u=0;u<e.length;u++)Si(e[u],c,r);return}let a=e[i];(a==null||typeof a!="object")&&(a=/^\d+$/.test(t[s+1])?[]:{},Z(e,i,a)),e=a}let o=t[n];if(o==="*"){if(Array.isArray(e))for(let s=0;s<e.length;s++)Z(e,s,Cr(r,e[s]));return}Z(e,o,Cr(r,e[o]))}function li(e,t,r){Si(e,Ot(t),r)}function uu(e){return Array.isArray(e)&&e.length>0&&e.every(t=>Array.isArray(t)&&t.length>=2&&typeof t[0]=="string")}function bt(e,t){for(let r=e.length-1;r>=t.length;r--)Z(e,String(r),void 0);e.length!==t.length&&Z(e,"length",t.length);for(let r=0;r<t.length;r++)Z(e,String(r),t[r])}function fu(e,t){let r=t[0];if(typeof r=="function"&&t.length===1){let n=r(e);n&&n!==e&&Rr(e,n);return}if(Array.isArray(r)&&t.length===1){if(uu(r)){for(let n of r)li(e,n[0],n[1]);return}if(Array.isArray(e)){bt(e,r);return}if(r.length===0)return;throw new TypeError("[fluixi] set() was given an array that is neither a batch of [path, value] pairs nor a replacement for an array root. Name the path you meant, as in set('items', [...]).")}if(r&&typeof r=="object"&&!Array.isArray(r)&&t.length===1){Rr(e,r);return}if(t.length>=3){Pr(e,t.slice(0,-1),t[t.length-1]);return}li(e,String(r),t[1])}function lu(e,t){if(typeof t=="function"){if(!Array.isArray(e))return[];let r=[];for(let n=0;n<e.length;n++)t(e[n],n)&&r.push(n);return r}if(Array.isArray(t))return Array.isArray(e)?t.map(Number):t.map(String);if(t&&typeof t=="object"&&("from"in t||"to"in t||"by"in t)){if(!Array.isArray(e))return[];let r=t.by??1,n=t.from??0,o=t.to??e.length-1,s=[];for(let i=n;i<=o;i+=r)i>=0&&i<e.length&&s.push(i);return s}return t==="*"?Array.isArray(e)?e.map((r,n)=>n):Object.keys(e??{}):[t]}function Pr(e,t,r){if(e==null)return;let[n,...o]=t;if(typeof n=="string"){let i=Ot(n);if(i.length>1){Pr(e,[...i,...o],r);return}}let s=lu(e,n);if(o.length===0){for(let i of s)Z(e,i,Cr(r,e[i]));return}for(let i of s){let a=e[i];if(a==null||typeof a!="object"){let c=o[0];a=typeof c=="number"||/^\d+$/.test(String(c))?[]:{},Z(e,i,a)}Pr(a,o,r)}}function $r(e){if(e==null||typeof e!="object")return e;if(Array.isArray(e))return e.map($r);let t={};for(let r of Object.keys(e))t[r]=$r(e[r]);return t}function fe(e,t){let r=e;for(let n of Ot(t)){if(r==null)return;r=r[n]}return r}function pu(e,t){for(let r of du)e[r]=t[r].bind(t);e.$=t.reactive.bind(t)}function yu(e,t={immutable:!0}){let r=new xi(e,t);return pu(r.set,r),[r.proxy,r.set]}function hu(e,t={}){return new xi(e,{...t,immutable:!1})}function _t(e){if(e==null||typeof e!="object")return e;let t=e[At];return t!==void 0?t:e}function mu(e){return E(()=>_t(e))}var Nr,di,Qo,jc,Kc,Er,P,he,vt,ei,Gc,ni,ql,nu,ou,iu,At,oi,ii,si,ai,Ve,Tr,Oe,St,xt,cu,xi,du,Hl,ki=F(()=>{"use strict";x();Nr="1.0.0-alpha.94",di=Nr.split(".")[0],Qo=`__fluixi_signal_state_v${di}__`,jc=`__fluixi_signal_builds_v${di}__`,Kc=e=>{typeof queueMicrotask=="function"?queueMicrotask(e):Promise.resolve().then(e)};Er=globalThis;P=Uc();(Er[jc]??=[]).push(Nr);he=[];Gc="__FLUIXI_DEVTOOLS_HOOK__",ni=globalThis[Gc];if(typeof ni?.inject=="function")try{ni.inject({observeReactiveNodes:zc,version:Nr})}catch{}ru(()=>{});ql=typeof window>"u"?!1:window.__FLUIXI_PROD__===!0,nu=Symbol.for("signal");ou=mi();eu((e,t)=>{let r=gi(t,ou);r&&(r.increment(),e.finally(()=>r.decrement()))});iu=mi();tu((e,t)=>{let r=gi(t,iu);return r?(r.setError(e),!0):!1});At=Symbol("store-raw"),oi=Symbol("store-node"),ii=Symbol("store-has"),si=Symbol("store-self"),ai=Symbol("store-track"),Ve=new WeakMap,Tr=new WeakMap,Oe=new WeakMap,St=new WeakMap;xt=(e,t,r)=>r?`${e}[${String(t)}]`:`${e}.${String(t)}`;cu={get(e,t,r){if(t===At||t===oi)return e;if(t===Se)return r;if(t===ii)return c=>c in e;if(t==="__proxy")return!0;if(t===ai||t===si)return ui(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=kt(e),i=ci(s,t,n),a=i();return _e(a)?(s.owner&&au(a,i,xt(s.owner.name,t,s.array),e),wt(a)):a},set(){return!0},deleteProperty(e,t){return t in e&&Z(e,t,void 0),!0},has(e,t){return t===At||t===Se||t===oi||t===ii||t===si||t===ai?!0:(ci(kt(e),t,e[t])(),t in e)},ownKeys(e){return ui(e),Reflect.ownKeys(e)},getOwnPropertyDescriptor(e,t){return Reflect.getOwnPropertyDescriptor(e,t)}};xi=class{constructor(e,t={immutable:!0}){this.options=t,this.root=e,this.set=((...r)=>N(()=>fu(this.root,r))),e&&typeof e=="object"&&(Oe.set(e,{store:this,name:t.name??"store"}),St.set(e,e)),Jc({kind:"store",node:this,handle:()=>this.root,name:t.name})}get state(){return wt(this.root)}get proxy(){return wt(this.root)}get accessor(){return(()=>wt(this.root))}unwrap(){return this.root}getNode(e){return this.root&&this.root[e]}get(e){if(e==null||e==="")return _t(this.state);let t=this.state;for(let r of Ot(e)){if(t==null)return;t=t[r]}return _t(t)}select(e){return w(()=>e(this.state))}subscribe(e){return _(()=>e(this.state))}watch(e,t){let r;return _(()=>{let n=e(this.state);Object.is(n,r)||(t(n,r),r=n)})}reactive(e){return w(()=>this.state[e])}produce(e){this.set((t=>{let r=$r(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(),s=o.splice(t,r,...n);return this.set(e,o),s}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}replace(e,t){if(arguments.length>=2){let n=fe(this.root,String(e)),o=t;if(Array.isArray(n)&&Array.isArray(o)){bt(n,o);return}this.set(e,o);return}let r=this.root;if(Array.isArray(r)&&Array.isArray(e)){bt(r,e);return}this.set(e)}clear(e){let t=e===void 0?this.root:fe(this.root,e);if(Array.isArray(t)){bt(t,[]);return}if(t&&typeof t=="object")for(let r of Object.keys(t))Z(t,r,void 0)}toObservable(){let[e]=b(this.state);return e.toObservable()}dispose(){}},du=["get","select","watch","subscribe","produce","reconcile","push","pop","shift","splice","insert","removeAt","replace","clear","unwrap","toObservable"];Hl=Object.freeze({createStore:yu,createMutableStore:hu,batch:N,unwrap:_t,untrackStore:mu})});function I(){return Vr.server}function Br(){if(!Vr.nodes)throw new Error("[fluixi] server render ran before @fluixi/dom/server loaded");return Vr.nodes}function Jr(e){return e!=null&&e[Lt]===!0?!0:typeof Node<"u"&&e instanceof Node}function wu(e){return e!=null&&e[Lt]===!0?e.nodeType===1:typeof Element<"u"&&e instanceof Element}function bu(e){return e!=null&&e[Lt]===!0?e.nodeType===3:typeof Text<"u"&&e instanceof Text}function Au(e){return e.localName.includes("-")}function _i(e,t,r,n=!1){if(r==null){e.removeAttribute(t);return}if(Au(e)){if(I()){Hr(e,t,r);return}e[t]=r;return}R(e,t,r,n)}function Hr(e,t,r){let n=e[Su]??={};n[t]=r,r==null||r===!1?e.removeAttribute(t):r===!0?e.setAttribute(t,""):(typeof r=="string"||typeof r=="number")&&e.setAttribute(t,String(r))}function Mr(e){return xu.has(e)||e.startsWith("aria-")||e.startsWith("data-")}function Ni(e,...t){e.classList.add(...t)}function Mi(e,...t){e.classList.remove(...t)}function Li(e,...t){t.forEach(r=>e.classList.toggle(r))}function R(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 Ii(e){return e&&typeof e=="object"&&e.strings&&Array.isArray(e.strings)&&e.values&&Array.isArray(e.values)}function It(e){return e instanceof Node}function Di(e){j.core=e}function Dt(e){j.core&&e.setAttribute("fluixi",j.core),e.setAttribute("fx-dom",j.dom),e.setAttribute("fx-reactive",j.reactive),typeof globalThis<"u"&&(globalThis.Fluixi=j)}function qt(){let e=Gn();e.length>1&&console.warn(`[fluixi] ${e.length} builds of @fluixi/reactive are driving one reactive graph: ${e.join(", ")}. They share it on purpose, so signals still cross between them, but the oldest one decided what the graph looks like. Build the components on one release, or load them as shared-runtime bundles.`);let t=[j.core,j.dom,j.reactive].filter(r=>r!==void 0);new Set(t).size<=1||console.warn(`[fluixi] package versions disagree: core ${j.core??"(absent)"}, dom ${j.dom}, reactive ${j.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 qi(e){return Object.defineProperty(e,Symbol.for("fluixi-provider"),{value:!0,enumerable:!0}),e}function Fe(e){return typeof e!="function"||Object.defineProperty(e,Symbol.for("fluixi-component"),{value:!0,enumerable:!0}),e}function Vi(e){return Object.defineProperty(e,Symbol.for("fluixi-suspense"),{value:!0,enumerable:!0}),e}function _u(e){return typeof e=="function"&&e[Symbol.for("fluixi-router")]===!0}function Ou(e){return typeof e=="function"&&e[Symbol.for("fluixi-routes")]===!0}function Eu(e){return typeof e=="function"&&e[Symbol.for("fluixi-route")]===!0}function Tu(e){return typeof e=="function"&&e[Symbol.for("fluixi-outlet")]===!0}function Cu(e){return typeof e=="function"&&e[Symbol.for("fluixi-provider")]===!0}function Ru(e){return typeof e=="function"&&e[Symbol.for("fluixi-context")]===!0}function ne(e){return typeof e=="function"&&e[Symbol.for("fluixi-component")]===!0}function Pu(e){return typeof e=="function"&&e[Symbol.for("fluixi-suspense")]===!0}function Hi(e){return _u(e)?{type:"router",value:e}:Eu(e)?{type:"route",value:e}:Ou(e)?{type:"routes",value:e}:Tu(e)?{type:"outlet",value:e}:ne(e)?{type:"component",value:e}:Pu(e)?{type:"suspense",value:e}:Cu(e)?{type:"provider",value:e}:Ru(e)?{type:"context",value:e}:{type:"none",value:e}}function Mu(){return Nu.getStore()}function Lu(e){Wi=e}function Wr(){return Wi}function Ei(e,t){return g.active&&t.parentNode===e}function ji(e){let t=g.parents.lastIndexOf(e);t!==-1&&(g.parents.length=t),g.cursor=e.nextSibling}function Iu(e,t){if(!e||e.parentNode==null)return t();let r=g.active,n=g.cursor,o=g.parents;g.active=!0,g.cursor=e,g.parents=[];try{return t()}finally{g.active=r,g.cursor=n,g.parents=o}}function Ki(e){if(!g.active)return e();let t=g.cursor,r=g.parents;g.active=!1,g.parents=[];try{return e()}finally{g.active=!0,g.cursor=t,g.parents=r}}function Fi(e){if(!g.active||e==null)return;let t=Array.isArray(e)?e[e.length-1]:e;t&&typeof t.nodeType=="number"&&ji(t)}function Ui(){let e=globalThis;return e[Symbol.for("fluixi.appHydration")]??={pending:0,waiting:new Set}}function zi(){Ui().pending++}function Bi(){let e=Ui();if(e.pending>0&&e.pending--,e.pending>0)return;let t=[...e.waiting];e.waiting.clear();for(let r of t)r()}function Ji(e){let t=e;for(;t;){let r=t.contexts?.get(jr);if(r)return r;if(!t.parent){let n={id:"",next:0};return(t.contexts??=new Map).set(jr,n),n}t=t.parent}return{id:"",next:0}}function Xi(){return I()?Mu()?.hydrationKeys!==!1:g.active}function Ti(e){let t=3735928559,r=1103547991;for(let n=0;n<e.length;n++){let o=e.charCodeAt(n);t=Math.imul(t^o,2654435761),r=Math.imul(r^o,1597334677)}return t=Math.imul(t^t>>>16,2246822507)^Math.imul(r^r>>>13,3266489909),r=Math.imul(r^r>>>16,2246822507)^Math.imul(t^t>>>13,3266489909),(4294967296*(2097151&r)+(t>>>0)).toString(36)}function Du(e){if(!Xi())return null;let t=Ji(T()),r=t.id+(t.next++).toString(36);return e?`${Ti(r)}-${e}`:Ti(r)}function qu(e){let t=e.getAttribute(We)??"",r=t.indexOf("-");return r<0?"":t.slice(r+1)}function Yi(e){let t=e.getAttribute(We);t&&K?.get(t)===e&&K.delete(t)}function Vu(){if(!Xi())return;let e=T();if(!e)return;let t=Ji(e),r={id:t.id+(t.next++).toString(36)+".",next:0};(e.contexts??=new Map).set(jr,r)}function Hu(e){K??=new Map;for(let t of e.querySelectorAll(`[${We}]`)){let r=t.getAttribute(We);K.has(r)||K.set(r,t)}}function Yr(){K=null}function Gi(e){if(!K)return 0;let t=0;for(let[r,n]of K){if(!n.isConnected){K.delete(r);continue}e&&!e.contains(n)||n.parentElement?.closest("[data-fx-ssr]")||(K.delete(r),n.remove(),t++)}return t}function Wu(e,t){if(!e||!K)return null;let r=K.get(e);return!r||r.localName!==t.toLowerCase()?null:(K.delete(e),r)}function Lr(e,t){return t&&(e[Ku]=t),e}function Ci(e){let t=T();t&&(e[Fu]=t)}function ge(e){if(!I())for(let t of e)Ct.has(t)||Gr.has(t)||(Ct.add(t),Kr.dispatch??=zu,document.addEventListener(t,Kr.dispatch))}function zu(e){let t=`$$${e.type}`,r=e.composedPath&&e.composedPath()[0]||e.target;Object.defineProperty(e,"currentTarget",{configurable:!0,get:()=>r??document});try{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}}finally{delete e.currentTarget}}function Bu(e,t,r){if(e[`$$${t}`]=r,Gr.has(t)){let n=`__fx_${t}`;if(!e[n]){let o=s=>{e[`$$${t}`]?.(s)};e.addEventListener(t,o),e[n]=o}return}Ct.has(t)||ge([t])}function Ri(e,t){delete e[`$$${t}`];let r=`__fx_${t}`,n=e[r];n&&(e.removeEventListener(t,n),delete e[r])}function de(e,t=!1){if(I())return Br().createText(e);if(g.active&&!t){let r=Wr()?.hydrateText(e);if(r)return r}return document.createTextNode(e)}function Ee(e,t=!1,r){let n=Du();if(I()){let o=Br().createElement(e,t);return n&&o.setAttribute(We,n),o}if(g.active){let o=Wu(n,e);if(o)return Wr()?.enterElement(o),e.includes("-")&&Ci(o),r?Lr(o,r):o;let s=Wr()?.hydrateElement(e);if(s)return e.includes("-")&&Ci(s),r?Lr(s,r):s}return Lr(t?document.createElementNS(Xr,e):document.createElement(e),r)}function Xu(e,t,r,n,o){let s=n,i=new Map,a=!1;return C(()=>{let u=a&&g.active;if(a=!0,!u)return c();g.active=!1;try{return c()}finally{g.active=!0}});function c(){J(r??t,"content",void 0,e);let u;if(ne(e)&&!L(e)){if(!i.has(e)){re++;try{let f=e();i.set(e,f)}finally{re--}}for(u=i.get(e);typeof u=="function"&&L(u);)u=u()}else for(u=e();typeof u=="function"&&L(u);)u=u();{let f=0;for(;typeof u=="function"&&f++<50;)if(ne(u)){if(!i.has(u)){let l=u;re++;try{let d=l();i.set(l,d)}finally{re--}}u=i.get(u)}else if(L(u))u=u();else if(u=u(),typeof u!="function"||!L(u)&&!ne(u))break}re++;try{s=Rt(t,u,r,s,i),o(s)}finally{re--}}}function V(e,t,r,n){if(re>Ju)return console.error("[insert] Exceeded max call depth, possible infinite loop."),()=>null;let o=r!==void 0&&!r&&g.active;r!==void 0&&!r&&(r=de("",!0),o||e.appendChild(r));let s=()=>{if(!o||r.parentNode)return;let f=g.cursor;e.insertBefore(r,f&&f.parentNode===e?f:null)},i=n??null,a=f=>Array.isArray(f)&&f.some(l=>typeof l=="function"),c=f=>typeof f=="function"?f:()=>f;if(typeof t!="function"&&!a(t)){re++;try{i=Rt(e,t,r,i)}finally{re--}return s(),()=>i}let u=Xu(c(t),e,r,i,f=>{i=f});return s(),()=>(u?.(),i)}function Rt(e,t,r,n,o){if(t==null||typeof t=="boolean")return le(e,n,r);if(typeof t=="function")for(;typeof t=="function";)t=t();if(t==null||typeof t=="boolean")return le(e,n,r);if(Tt(t)){let i=de("",!0);return Array.isArray(n)?n.length>0?(e.replaceChild(i,n[0]),le(e,n.slice(1),r)):W(e,i,r):n?e.replaceChild(i,n):W(e,i,r),t.then(a=>{i.parentNode===e&&Rt(e,a,i.nextSibling,i)}).catch(a=>{console.error("Error resolving promise in insertExpression:",a)}),i}let s=typeof t;if(s==="string"||s==="number"){if(s==="number"&&(t=String(t)),Array.isArray(n)){if(n.length===0){let a=de(t);return W(e,a,r),a}if(n.length===1&&n[0].nodeType===3)return n[0].data=t,n;n=le(e,n,r)}if(n&&bu(n))return n.data=t,n;let i=de(t);return n&&n.parentNode===e?e.replaceChild(i,n):Ei(e,i)||W(e,i,r),i}if(Jr(t))return Ei(e,t)?(ji(t),t):Array.isArray(n)?(n.length===0?W(e,t,r):n[0].parentNode===e?(e.replaceChild(t,n[0]),le(e,n.slice(1),r)):W(e,t,r),t):(n?n!==t&&(n.parentNode===e?e.replaceChild(t,n):W(e,t,r)):W(e,t,r),t);if(Array.isArray(t)){let i=[],a=Array.isArray(n)?n:n?[n]:[],c=[],u=new Set,f=()=>te(t,i,e,r,!0,o,c,u);g.active&&a.length?Iu(a[0],f):f();let l=Yu(e,u.size?a.filter(d=>!u.has(d)):a,i,r);for(let d of c){if(d.wired)continue;let h=V(e,d.sig,d.marker);S(()=>{le(e,h()),d.marker.parentNode===e&&e.removeChild(d.marker)})}return l}if(s==="object"&&t!==null&&typeof t=="object"){let i=t;if("type"in i&&"props"in i){let a=i;if(typeof a.type=="function"){let c=a.type(a.props||{});return Rt(e,c,r,n)}}}return le(e,n,r)}function te(e,t,r,n,o=!0,s,i,a){for(let c=0;c<e.length;c++){let u=e[c];if(!(u==null||typeof u=="boolean")){for(;typeof u=="function"&&!Tt(u)&&!L(u)&&!ne(u)&&(u=u(),!(u==null||typeof u=="boolean")););if(!(u==null||typeof u=="boolean")){if(typeof u=="function"){let f;for(ne(u)&&!L(u)?(s||(s=new Map),s.has(u)||s.set(u,u()),f=s.get(u)):f=u();typeof f=="function"&&!Tt(f)&&!L(f)&&!ne(f);)s||(s=new Map),s.has(f)||s.set(f,f()),f=s.get(f);if(f==null||typeof f=="boolean")continue;if(typeof f=="function"){if(L(f)){if(i){let d=de("",!0);if(t.push(d),g.active&&a){let h=()=>g.cursor&&g.cursor.parentNode===r?g.cursor:null;r.insertBefore(d,h());let y=V(r,f,d),p=y();for(let v of Array.isArray(p)?p:p?[p]:[])a.add(v);r.insertBefore(d,h()),S(()=>{le(r,y()),d.parentNode===r&&r.removeChild(d)}),i.push({marker:d,sig:f,wired:!0});continue}i.push({marker:d,sig:f});continue}let l=f();for(;typeof l=="function"&&L(l);)l=l();if(l==null||typeof l=="boolean")continue;Array.isArray(l)?te(l,t,r,n,o,s):te([l],t,r,n,o,s);continue}continue}Array.isArray(f)?te(f,t,r,n,o,s,i,a):te([f],t,r,n,o,s,i,a);continue}if(Tt(u)){let f=de("",!0);t.push(f),u.then(l=>{if(f.parentNode){let d=[];if(te([l],d,f.parentNode,void 0,!1,s),d.length>0){f.parentNode.replaceChild(d[0],f);for(let h=1;h<d.length;h++)f.parentNode?.insertBefore(d[h],d[h-1].nextSibling)}}}).catch(l=>console.error("Error resolving promise in array:",l));continue}if(Array.isArray(u)){te(u,t,r,n,o,s,i,a);continue}if(Jr(u)){t.push(u);continue}if(typeof u=="object"&&u!==null&&"type"in u&&"props"in u){let f=u;if(typeof f.type=="function"){let l=f.type(f.props||{});Array.isArray(l)?te(l,t,r,n,!1,s):te([l],t,r,n,!1,s);continue}}if(typeof u=="string"||typeof u=="number"){let f=String(u);if(f.trim()===""&&f!==" ")continue;t.push(de(f));continue}t.push(de(String(u)))}}}}function Yu(e,t,r,n){for(let l=0;l<r.length;l++){let d=r[l].parentNode;d!==null&&d!==e&&d.nodeType!==11&&(r=r.slice(),r[l]=r[l].cloneNode(!0))}let o=r.length,s=t.length,i=o,a=0,c=0,u=s>0?t[s-1].nextSibling??void 0:n,f=null;for(;a<s||c<i;){if(t[a]===r[c]){a++,c++;continue}for(;s>a&&i>c&&t[s-1]===r[i-1];)s--,i--;if(s===a){let l=i<o?c?r[c-1].nextSibling??void 0:r[i-c]:u;for(;c<i;)W(e,r[c++],l)}else if(i===c)for(;a<s;)(!f||!f.has(t[a]))&&t[a].parentNode===e&&e.removeChild(t[a]),a++;else if(t[a]===r[i-1]&&r[c]===t[s-1]){let l=t[--s].nextSibling;W(e,r[c++],t[a++].nextSibling),W(e,r[--i],l),t[s]=t[a-1]}else{if(!f){f=new Map;let d=c;for(;d<i;)f.set(r[d],d++)}let l=f.get(t[a]);if(l!=null)if(c<l&&l<i){let d=a,h=1;for(;++d<s&&d<i&&!(!f.has(t[d])||f.get(t[d])!==l+h);)h++;if(h>l-c){let y=t[a];for(;c<l;)W(e,r[c++],y)}else t[a].parentNode===e?e.replaceChild(r[c++],t[a++]):(W(e,r[c++],u),a++)}else a++;else t[a].parentNode===e&&e.removeChild(t[a]),a++}}return r}function le(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 W(e,t,r){g.active&&t.parentNode===e||(r&&r.parentNode===e?e.insertBefore(t,r):e.appendChild(t))}function me(e,t,r){r==null?delete e[t]:e[t]=r}function Qi(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 es(e,t){if(!t||typeof t!="function")return;let r=t[Zi]?.name;if(!r)return;let n=r.indexOf(":");n!==-1&&X(e,r.slice(0,n),r.slice(n+1),t)}function Pt(e,t,r){let n=typeof r=="function"?E(()=>r()):r;if(!(!n||typeof n!="object"))for(let o of Object.keys(n))X(e,t,o)}function ts(e,t){let r=(n,o)=>{typeof n=="function"&&(X(e,"use",n.name||"use",o),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 Fr(e,t,r,n=!1){return es(e,r),typeof r!="function"?(R(e,t,r,n),()=>{}):C(()=>{J(e,"attribute",t,r);let o=typeof r=="function"?r():r;R(e,t,o,n)})}function Ur(e,t,r){return typeof r!="function"?(me(e,t,r),()=>{}):(es(e,r),C(()=>{J(e,"property",t,r);let n=typeof r=="function"?r():r;me(e,t,n)}))}function rs(e,t,r){return typeof r!="function"?(R(e,t,!!r),()=>{}):C(()=>{J(e,"attribute",t,r);let n=r();R(e,t,!!n)})}function $t(e,t){if(t==null){e.removeAttribute("class");return}if(typeof t=="function"){C(()=>{J(e,"attribute","class",t),$t(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 Nt(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(C(()=>{let i=!!o();for(let a of s)e.classList.toggle(a,i)}));else{let i=!!(typeof o=="function"?o():o);for(let a of s)e.classList.toggle(a,i)}}}function Ir(e,t,r){t.includes("-")?r==null?e.removeProperty(t):e.setProperty(t,String(r)):e[t]=r??""}function He(e){for(;typeof e=="function";)e=e();return e}function Mt(e,t,r){let n=He(t),o=Dr.get(e);if(n==null){Dr.delete(e),e.removeAttribute("style");return}let s=new Set,i=a=>{if(typeof a=="function"&&r){r.push(C(()=>i(He(a))));return}if(a=He(a),a!=null){if(typeof a=="string")e.style.cssText=a;else if(Array.isArray(a))for(let c of a)i(c);else if(typeof a=="object")for(let c in a){s.add(c);let u=a[c];typeof u=="function"&&r?r.push(C(()=>Ir(e.style,c,He(u)))):Ir(e.style,c,He(u))}}};if(Array.isArray(n))for(let a of n)i(a);else i(n);if(o)for(let a of o)s.has(a)||Ir(e.style,a,null);Dr.set(e,s)}function ns(e){let{element:t,props:r,prevProps:n=ju,isSVG:o=!1,skipChildren:s=!1,isCustomElement:i,accessors:a}=e;if(!t||!wu(t))return console.error("[spread] Error: element is not a DOM Element!"),()=>{};if(!r)return console.warn("[spread] Warning: props is undefined!"),()=>{};let c=o||t.namespaceURI===Xr,u=[];for(let f in r){if(s&&f==="children")continue;let l=r[f],d=n[f];if(l===d)continue;if(f==="ref"){Zr(l,t);continue}if(f==="use"){ts(t,l);continue}if(f.startsWith("on:")){u.push(Qi(t,f.slice(3),l));continue}if(f.startsWith("prop:")){X(t,"prop",f.slice(5),l),u.push(Ur(t,f.slice(5),l));continue}if(f.startsWith("attr:")){X(t,"attr",f.slice(5),l),u.push(Fr(t,f.slice(5),l,c));continue}if(f.startsWith("bool:")){X(t,"bool",f.slice(5),l),u.push(rs(t,f.slice(5),l));continue}if(f==="class"||f==="className"){typeof l=="function"?u.push(C(()=>{J(t,"attribute","class",l),$t(t,l())})):$t(t,l);continue}if(f==="classList"){Pt(t,"class",l),typeof l=="function"?u.push(C(()=>{J(t,"attribute","class",l),Nt(t,l())})):Nt(t,l,u);continue}if(f==="style"){Pt(t,"style",l),typeof l=="function"?u.push(C(()=>{J(t,"attribute","style",l),Mt(t,l())})):Mt(t,l,u);continue}if(f.startsWith("on")){let v=f.slice(2).toLowerCase();d&&Ri(t,v),l&&Bu(t,v,l);continue}let h=i??t.localName.includes("-"),y=Oi.has(f)||!c&&f in t||h&&!c&&!Mr(f);if(h&&!c&&!Mr(f)&&a!==void 0&&typeof l=="function"&&!a.includes(f)){I()?Hr(t,f,l):me(t,f,l);continue}if(h&&!c&&!Mr(f)&&I()){u.push(C(()=>{let v=typeof l=="function"?l():r[f];for(;typeof v=="function"&&v.length===0;)v=v();Hr(t,f,v)}));continue}typeof l=="function"?u.push(y?Ur(t,f,l):Fr(t,f,l,c)):u.push(C(()=>y?me(t,f,r[f]):R(t,f,r[f],c)))}for(let f in n)if(!(f in r))if(f.startsWith("on")){let l=f.slice(2).toLowerCase();Ri(t,l)}else Oi.has(f)?me(t,f,null):t.removeAttribute(f);return()=>{u.forEach(f=>f())}}function Gu(e,t,r=!1){for(let n in t){let o=t[n];if(n==="ref"){Zr(o,e);continue}if(n!=="children"){if(n==="use"){ts(e,o);continue}if(n.startsWith("on:")){Qi(e,n.slice(3),o);continue}if(n.startsWith("prop:")){X(e,"prop",n.slice(5),o),Ur(e,n.slice(5),o);continue}if(n.startsWith("attr:")){X(e,"attr",n.slice(5),o),Fr(e,n.slice(5),o,r);continue}if(n.startsWith("bool:")){X(e,"bool",n.slice(5),o),rs(e,n.slice(5),o);continue}if(n.startsWith("on")&&n.length>2){let s=n.slice(2).toLowerCase();if(typeof o=="function")if(Gr.has(s)){e[`$$${s}`]=o;let i=`__fx_${s}`;if(!e[i]){let a=c=>{e[`$$${s}`]?.(c)};e.addEventListener(s,a),e[i]=a}}else e[`$$${s}`]=o,Ct.has(s)||ge([s]);continue}if(n==="class"||n==="className"){$t(e,o);continue}if(n==="classList"){Pt(e,"class",o),typeof o=="function"?C(()=>{J(e,"attribute","class",o),Nt(e,o())}):Nt(e,o,[]);continue}if(n==="style"){Pt(e,"style",o),typeof o=="function"?C(()=>{J(e,"attribute","style",o),Mt(e,o())}):Mt(e,o,[]);continue}if(n==="innerHTML"){if(typeof o=="function"){let s=_(()=>{let i=o();for(;typeof i=="function";)i=i();e.innerHTML=i});S(()=>s())}else e.innerHTML=o;continue}if(n==="value"&&(e.tagName==="INPUT"||e.tagName==="TEXTAREA")){if(typeof o=="function"){let s=_(()=>{let i=o();for(;typeof i=="function"&&i.length===0;)i=i();document.activeElement!==e&&(e.value=i??"")});S(()=>{s()})}else C(()=>{document.activeElement!==e&&(e.value=t[n]??"")});continue}if(n==="checked"&&e.tagName==="INPUT"){if(typeof o=="function"){let s=_(()=>{let i=o();for(;typeof i=="function"&&i.length===0;)i=i();document.activeElement!==e&&(e.checked=i??"")});S(()=>{s()})}else C(()=>{document.activeElement!==e&&(e.checked=t[n]??"")});continue}if(n==="value"&&e.tagName==="SELECT"){if(typeof o=="function"){let s=!0,i=_(()=>{let a=o();for(;typeof a=="function"&&a.length===0;)a=a();s?(s=!1,queueMicrotask(()=>{e.value=a??""})):e.value=a??""});S(()=>{i()})}else{let s=!0;C(()=>{let i=t[n];s?(s=!1,queueMicrotask(()=>{e.value=i??""})):e.value=i??""})}continue}if(typeof o=="function"){let s=_(()=>{let i=o();for(;typeof i=="function"&&i.length===0;)i=i();_i(e,n,i,r)});S(()=>{s()})}else C(()=>_i(e,n,t[n],r))}}}function Zr(e,t){if(!e)return;let r=e[Zi]?.name;if(X(t,"ref",r||typeof e=="function"&&e.name||"ref",e),Jr(e)){let n=t,o=e;if(!n)return;typeof n=="function"?n(o):typeof n=="object"&&"current"in n&&(n.current=o);return}typeof e=="function"?e(t):typeof e=="object"&&"current"in e&&(e.current=t)}function Zu(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 Tt(e){return e!=null&&(typeof e=="object"||typeof e=="function")&&typeof e.then=="function"||e instanceof Promise}function Qr(e,t,r){if(!t)throw new Error("Container element is required");let n,o,s=[];return D(i=>{N(()=>{g.active||(t.textContent=""),Dt(t),qt(),V(t,e)}),o=i}),()=>{o?.(),n?.(),s.forEach(i=>i()),t.textContent=""}}function z(e,t){if(Vu(),Pi.fn)return Pi.fn(e,t);t&&yi(t);let r=typeof e=="function"?vi(()=>e(t)):e,n=r!=null&&(typeof r=="function"||typeof r=="object");if(n)try{r.$name=e?.name}catch{}return n&&!wi(r)?Fe(r):r}function en(){let e=globalThis.__FX_DATA__;if(e&&typeof e.nodeType!="number")return e;if(qr!==void 0)return qr;let t=null;if(typeof document<"u"){let r=document.getElementById(ef)?.textContent;if(r)try{t=JSON.parse(r)}catch{t=null}}return qr=t}function Vt(){for(;;){for(;g.cursor&&g.cursor.nodeType===3&&g.cursor.data==="";)g.cursor=g.cursor.nextSibling;if(g.cursor!=null||!g.parents.length)return;g.cursor=g.parents.pop().nextSibling}}function Ke(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 is(e){return e.localName.includes("-")?e.hasAttribute("data-fx-ssr")||e[tf]===!0:!1}function rf(e){Vt();let t=g.cursor;return t&&t.nodeType===1&&t.tagName.toLowerCase()===e.toLowerCase()?(Yi(t),os.has(e.toLowerCase())||is(t)?g.cursor=t.nextSibling:(g.parents.push(t),g.cursor=t.firstChild),t):(je&&t&&Ke(`<${e}>`,t),null)}function nf(e){os.has(e.localName)||is(e)?g.cursor=e.nextSibling:(g.parents.push(e),g.cursor=e.firstChild)}function of(e,t){Vt();let r=g.cursor;if(r&&r.nodeType===1&&r.tagName.toLowerCase()===e.toLowerCase()){let n=qu(r);return t&&n&&n!==t?(je&&Ke(`<${e}> (another template)`,r),null):(Yi(r),g.cursor=r.nextSibling,r)}return je&&r&&Ke(`<${e}> (static)`,r),null}function sf(e){if(e===""){let r=g.cursor;return r&&r.nodeType===3&&r.data!==""?(g.cursor=r.nextSibling,r.data="",r):null}Vt();let t=g.cursor;return t&&t.nodeType===3?(g.cursor=t.nextSibling,t.nodeValue!==e&&(t.nodeValue=e),t):(je&&t&&Ke(`text ${JSON.stringify(e.slice(0,24))}`,t),null)}function af(e){Vt();let t=g.cursor;return t&&t.nodeType===8&&t.data===e?(g.cursor=t.nextSibling,t):(je&&t&&Ke(`marker <!--${e.slice(0,24)}-->`,t),null)}function cf(){$i||($i=!0,Lu({hydrateElement:rf,hydrateText:sf,hydrateMarker:af,hydrateStatic:of,enterElement:nf}))}function Ht(e,t,r){cf(),g.active=!0,g.cursor=t.firstChild,g.parents=[],Yr(),Hu(t);let n=en(),o=r?.resourceNamespace,s=0;po(()=>o?`${o}:r${s++}`:`r${s++}`),lo(n?i=>i in n?{value:n[i]}:void 0:null);try{return Qr(e,t)}finally{g.active=!1,g.cursor=null,g.parents=[]}}function ss(e,t={}){if(typeof e=="function")return z(e,t);if(typeof e!="string"||e.length===0)return null;let r=Zu(e);if(I())return Br().createElement(e,r);let n=r?document.createElementNS(Xr,e):document.createElement(e);return Gu(n,t,r),uf(n,t),n}function uf(e,t){if(!t||t.children===void 0)return;let r=De(()=>t.children),n=o=>{V(e,o,typeof o=="function"?null:void 0)};Array.isArray(r)?r.forEach(n):n(r)}function ff(e){return typeof e=="function"?e:(()=>e)}function Wt(e){return()=>{let t=e();return typeof t=="function"?t():t}}function lf(e){return e!=null&&e!==!1}function df(e){return!e||typeof e!="object"?!1:!!(typeof e._$litType$<"u"||typeof e._$litDirective$<"u"||Array.isArray(e.strings)&&Array.isArray(e.values))}function as(e){let t=Wt(()=>e.when),r=w(t,void 0,{name:"Show.when"}),n=w(r,void 0,{name:"Show.cond"}),o=T(),s=null,i=null,a=c=>{c!==i&&(s&&Ae(s),s=be(o),i=c)};return w(()=>{let c=n();return a(c?"when":"fallback"),$(s,()=>{if(c){let u=e.children;return typeof u=="function"&&!df(u)?typeof r=="function"?E(()=>E(r)?u(r()):e.fallback):u(r):u}return e.fallback});return e.fallback??null},void 0,{name:"Show.result"})}function cs(e){let t=Wt(()=>e.each),r=()=>e.fallback??null,n=(o,s)=>{let i=e.children,a=Array.isArray(i)?i.map(c=>typeof c=="function"?c(o,s):c):typeof i=="function"?i(o,s):i;return Fi(a),a};return e.by?uo(t,e.by,(o,s)=>n(o,s),{fallback:r}):co(t,(o,s)=>n(o,s),{fallback:r})}function us(e){let t=Wt(()=>e.each);return fo(t,(r,n)=>{let o=e.children(r,n);return Fi(o),o},{fallback:()=>e.fallback??null})}function fs(e){return{[zr]:!0,when:Wt(()=>e.when),get children(){return e.children}}}function ls(e){let t=Array.isArray(e.children)?e.children:[e.children],r=T(),n=null,o=-1,s=i=>{i!==o&&(n&&Ae(n),n=be(r),o=i)};return w(()=>{for(let i=0;i<t.length;i+=1){let c=t[i],u=0;for(;typeof c=="function"&&!c[zr]&&u++<10;)c=c();if(!c||typeof c!="object"||c[zr]!==!0)continue;let f=c.when();if(lf(f))return s(i),$(n,()=>typeof c.children=="function"?c.children(f):c.children)}return s(-2),$(n,()=>e.fallback??null)},void 0,{name:"Switch"})}function ds(e){let t=ff(e.component),{component:r,...n}=e,o=T(),s=null,i;return w(()=>{let a=t();return a!==i&&(s&&Ae(s),s=be(o),i=a),a==null?null:typeof a=="string"?{tag:a,props:n}:$(s,()=>a(n))},void 0,{name:"Dynamic"})}function ps(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),V(n,e.children)&&Zr(e.ref,n)}),S(()=>{r(),n.remove()}),null}function tn(e){if(I())return e.fallback??null;let t=g.active,[r,n]=b(!t);return t&&queueMicrotask(()=>n(!0)),w(()=>r()?e.children:e.fallback??null,void 0,{name:"client-only"})}function hs(e){let t=bo(),r=i=>!!i&&typeof i.then=="function",n=i=>typeof e.fallback=="function"?e.fallback(i,t.reset):e.fallback,o=i=>{if(r(i))throw i;return queueMicrotask(()=>t.setError(i)),null},s=i=>{if(Array.isArray(i))return i.map(s);if(typeof i!="function")return i;let a=i;return()=>{try{return s(a())}catch(c){return o(c)}}};return w(()=>{let i=t.error();if(i!==void 0)return n(i);try{return Ao(t,()=>s(typeof e.children=="function"?e.children():e.children))}catch(a){return o(a),n(a)}},void 0,{name:"ErrorBoundary"})}function ms(e){return w(()=>{let t=typeof e=="function"?e():e,r=[];for(let[n,o]of Object.entries(t)){if(!n)continue;(typeof o=="function"?o():o)&&r.push(n)}return r.join(" ")},void 0,{name:"ClassMap"})}function pf(e){return e.startsWith("--")?e:e.replace(/[A-Z]/g,t=>`-${t.toLowerCase()}`)}function gs(e){return w(()=>{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(`${pf(n)}: ${s}`)}return r.join("; ")},void 0,{name:"StyleMap"})}var Lt,gu,vu,Vr,Xr,Su,Oi,xu,Kl,ku,j,Et,$u,Nu,Xl,Yl,g,Wi,jr,We,K,ju,Zi,Ku,Fu,Uu,Kr,Ct,Gr,re,Ju,Dr,Qu,Pi,ef,qr,os,je,tf,$i,zr,ys,yf,M=F(()=>{"use strict";x();Zo();x();x();x();ki();x();x();x();x();x();x();x();x();x();x();x();x();Lt=Symbol.for("fluixi.server-node"),gu=Symbol.for("fluixi.dom.server-host"),vu=globalThis,Vr=vu[gu]??={server:typeof document>"u",nodes:null};Xr="http://www.w3.org/2000/svg";Su=Symbol.for("fluixi.serverProps");Oi=new Set(["className","value","checked","selected","innerHTML","innerText","textContent","indeterminate","htmlFor"]),xu=new Set(["id","class","className","style","slot","part","exportparts","is","title","role","lang","dir","tabindex","hidden"]);Kl=typeof Symbol=="function"&&Symbol.for?Symbol.for("react.element"):60103;ku="1.0.0-alpha.94",j={dom:ku,reactive:Go};$u={getStore:()=>Et,run(e,t){let r=Et;Et=e;try{return t()}finally{Et=r}}},Nu=$u;Xl=globalThis[Symbol.for("fluixi.requestLocals")]??=new WeakMap,Yl=globalThis[Symbol.for("fluixi.responseHeaders")]??=new WeakMap,g={active:!1,cursor:null,parents:[]},Wi=null;jr=Symbol.for("fluixi.hydrationKeys"),We="data-hk";K=null;ju={},Zi="__fx_at",Ku="__fx_loc";Fu=Symbol.for("fluixi.owner");Uu="__fluixi_delegated_events__",Kr=globalThis[Uu]??={names:new Set},Ct=Kr.names,Gr=new Set(["scroll","focus","blur","load","error","resize","mouseenter","mouseleave","pointerenter","pointerleave","gotpointercapture","lostpointercapture"]);re=0,Ju=200;Dr=new WeakMap;Qu="__fx_dom_create_component__",Pi=globalThis[Qu]??={fn:null};ef="__FX_DATA__";os=new Set(["area","base","br","col","embed","hr","img","input","link","meta","param","source","track","wbr"]),je=typeof process<"u"&&process.env&&!1;tf=Symbol.for("fluixi.ownsContent");$i=!1;zr=Symbol("match");ys=tn;yf=Lt});function Ss(e){if(e!=null&&(typeof e=="object"||typeof e=="function"))try{e.$lazy=!0}catch{}return e}function Ce(e,t){let r,n,o;function s(){return n||(n=e().then(a=>r=a.default)),n}t?.preload&&s();let i=(a=>{if(r){let c=r;return Ss(E(()=>c(a)))}if(!o){let[c]=ae(()=>s(),{transport:!1});if(o=c,c.error)throw c.error}return w(()=>{let c=o();return c?Ss(z(c,a)):void 0})});return i.preload=()=>s().then(()=>{}),i.$lazy=!0,i.loader=e,i}var Xt=F(()=>{"use strict";M();x()});function Je(e,t){let r=Y(e,t),n=o=>r.Provider({value:o.value,get children(){return o.children},debug:o.debug});return{id:r.id,Provider:qi(n),defaultValue:e}}function Xe(e){let t=q(e);return t!==void 0?t:e.defaultValue}function cn(e,t,r){let n=typeof t=="function"?t():t;return e.Provider({value:n,get children(){return r.children}})}function Es(e,t){return e.reduceRight((n,[o,s])=>({get children(){return cn(o,s,n)}}),t).children}function Ts(e,t){for(let r=T();r;r=r.parent)if(r.contexts?.has(e.id))return Xe(e);throw new Error(t??`[fluixi] No Provider for ${e.id.description??"this context"} above this component.`)}var un=F(()=>{"use strict";M();x()});function gn(){return typeof document<"u"&&typeof document.startViewTransition=="function"}function vn(){if(typeof window>"u"||typeof window.matchMedia!="function")return!1;try{return window.matchMedia("(prefers-reduced-motion: reduce)").matches}catch{return!1}}function Jf(e){return e!=="none"&&gn()&&!vn()}function js(e){let t=[];for(let r of e){let n=r?.preload;if(typeof n=="function")try{let o=n();o&&typeof o.then=="function"&&t.push(o.catch(()=>{}))}catch{}}return t.length?Promise.all(t).then(()=>{}):null}function wn(e,t){if(!Jf(e))return Promise.resolve(t()).then(()=>{});let r=document.startViewTransition;try{let n=r.call(document,()=>t());return n.finished?.catch(()=>{}),n.ready?.catch(()=>{}),n.updateCallbackDone.catch(()=>{})}catch{return Promise.resolve(t()).then(()=>{})}}var bn=F(()=>{"use strict"});function Gt(e,t,r={}){let{preserveStructure:n,multiple:o,throwOnError:s=!1,defaultValue:i,maxDepth:a=20}=r;if(!e||typeof e!="object")return i;if(!t)return e;if(Array.isArray(t))if(n){let f={};for(let l of t){let d=Gt(e,l,{...r,preserveStructure:!1});d!==void 0&&Yf(f,l,d)}return f}else return t.map(f=>Gt(e,f,{...r,preserveStructure:!1}));let c=An(t,{...r,throwOnError:s});if(c.length===0)return e;if(typeof n>"u"||n===!1){let f=Gf(e,t);return o===!1&&Array.isArray(f)?f[0]:f===void 0&&i!==void 0?i:f}let u=B(e,c,0,a);return u===void 0&&i!==void 0?i:u}function Gf(e,t,r={}){let{createMissing:n=!1,add:o=!1,debug:s=!1}=r,i=An(t),a=e,c=!1,u="",f=t;if(typeof a=="object"&&!Array.isArray(a)&&f.length>0&&a[f])return a=a[f],a;for(let l=0;l<i.length;l++){let d=i[l],h=i.length>1?l===i.length-1:!1;if(a===null&&!n)return;let y=i[l+1];switch(d.type){case"property":if(a&&typeof a=="object")if(Array.isArray(a)){if(typeof d.value=="number"){let p=d.value;if(n&&p>=a.length)for(let v=a.length;v<=p;v++)a.push(void 0);if(n&&(a[p]===null||a[p]===void 0)&&(!h||c)&&(y?a[p]=y.type==="index"||y.type==="slice"||y.type==="union"||y.type==="wildcard"?[]:{}:a[p]=null,c=!1),a=a[p],y){c=!0;continue}}else o?a.push({[String(d.value)]:null}):a=a.map(p=>p[String(d.value)]);if(y)continue;return Ks(a)}else{if(a[u]&&u.split(".").length>=2){a=a[u];continue}if(n&&(a[String(d.value)]===null||a[String(d.value)]===void 0)&&(!h||c)&&(y?a[String(d.value)]=y.type==="index"||y.type==="slice"||y.type==="union"||y.type==="wildcard"?[]:{}:a[String(d.value)]=null,c=!1,a=a[String(d.value)],y)){c=!0;continue}if(a?(!a[String(d.value)]&&n&&(a[String(d.value)]=null),a=a[String(d.value)]):a={[String(d.value)]:null},y)continue}else if(n)a={},a[String(d.value)]=y.type==="index"||y.type==="slice"||y.type==="union"||y.type==="wildcard"||r.type==="array"?[]:{},a=a[String(d.value)];else return;break;case"index":case"wildcard":if(Array.isArray(a)){if(d.type==="index"){let p=d.value;if(p<0){a=a[a.length-Math.abs(p)];continue}if(n&&(p>=a.length||a[p]==null||a[p]==null)&&!h){for(let v=a.length;v<=p;v++)a.push(void 0);y&&(a[p]=y.type==="index"||y.type==="slice"||y.type==="union"||y.type==="wildcard"?[]:{})}a=a[p]}else if(!h)continue}else if(n){let p=i[l+1];a=[];let v=d.value;for(let A=0;A<=v;A++)a.push(void 0);a[v]=p.type==="index"||p.type==="slice"||p.type==="union"||p.type==="wildcard"||r.type==="array"?[]:{},a=a[v]}else{if(d.type==="index"&&typeof a=="object"&&a&&a[String(d.value)]!==void 0){a=a[String(d.value)];continue}if(typeof a=="object"){a=Object.values(a);continue}return}break;default:return}}return Ks(a)}function Ks(e){return Array.isArray(e)?e.filter(t=>typeof t<"u"):e}var Zt,B,An,Xf,Yf,Sn=F(()=>{"use strict";Zt=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",B=(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 i=B(e,s,r+1,n);if(i!==void 0)return i;if(e&&typeof e=="object")if(Array.isArray(e)){let a=[];for(let c=0;c<e.length;c++){let u=B(e[c],t,r+1,n);u!==void 0&&(a[c]=u)}return a.length>0?a:void 0}else{let a={};for(let c in e)if(e.hasOwnProperty(c)){let u=B(e[c],t,r+1,n);u!==void 0&&(a[c]=u)}return Object.keys(a).length>0?a:void 0}return}switch(o.type){case"property":if(Zt(e)&&o.value&&String(o.value)in e){let i=e[String(o.value)],a=B(i,s,r+1,n);if(a!==void 0)return{[String(o.value)]:a}}break;case"index":if(Array.isArray(e)){let i=o.value;if(i>=0&&i<e.length){let a=B(e[i],s,r+1,n);if(a!==void 0){let c=new Array(e.length).filter(u=>u!==void 0);return c[i]=a,c}}}else if(e&&typeof e=="object"){let i=String(o.value);if(i in e){let a=B(e[i],s,r+1,n);if(a!==void 0)return{[i]:a}}}break;case"wildcard":if(e&&typeof e=="object")if(Array.isArray(e)){let i=[],a=!1;for(let c=0;c<e.length;c++){let u=B(e[c],s,r+1,n);u!==void 0&&(i[c]=u,a=!0)}return a?i:void 0}else{let i={},a=!1;for(let c in e)if(e.hasOwnProperty(c)){let u=B(e[c],s,r+1,n);u!==void 0&&(i[c]=u,a=!0)}return a?i:void 0}break;case"slice":if(Array.isArray(e)){let[i,a]=o.value,c=Math.max(0,i),u=Math.min(e.length,a===1/0?e.length:a),f=[],l=!1;for(let d=c;d<u;d++){let h=B(e[d],s,r+1,n);h!==void 0&&(f[d]=h,l=!0)}return l?f:void 0}break;case"union":if(Array.isArray(e)){let i=o.value,a=[],c=!1;for(let u of i)if(u>=0&&u<e.length){let f=B(e[u],s,r+1,n);f!==void 0&&(a[u]=f,c=!0)}return c?a:void 0}break;case"filter":if(Array.isArray(e)){let i=o.value,a=[],c=!1;for(let u=0;u<e.length;u++)if(i(e[u])){let f=B(e[u],s,r+1,n);f!==void 0&&(a[u]=f,c=!0)}return c?a:void 0}break}},An=(e,t={})=>{let{type:r="auto",throwOnError:n=!1}=t;if(!e||typeof e!="string")return[];let o=[],s="",i=!1,a=!1,c="",u="",f=0,d=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,h=y=>{let p=y.trim();if(p==="*"||p==="")return{type:"wildcard",value:p===""?"[]":"*",raw:p===""?"[]":y};if(p==="[]")return{type:"wildcard",value:"[]",raw:y};if(/^-?\d+$/.test(p))return{type:"index",value:parseInt(p,10),raw:y};if(p.includes(":")){let v=p.split(":").map(Q=>Q.trim()),A=v[0]===""?0:parseInt(v[0],10),k=v[1]===""?1/0:parseInt(v[1],10);if(isNaN(A)||isNaN(k)){if(n)throw new Error(`Invalid slice notation: ${y}`);return{type:"wildcard",value:"*",raw:y}}return{type:"slice",value:[A,k],raw:y}}if(p.includes(",")){let v=p.split(",").map(A=>{let k=parseInt(A.trim(),10);return isNaN(k)?-1:k}).filter(A=>A>=0);if(v.length===0){if(n)throw new Error(`Invalid union notation: ${y}`);return{type:"wildcard",value:"*",raw:y}}return{type:"union",value:v,raw:y}}if(p.startsWith("?(")&&p.endsWith(")")){let v=p.slice(2,-1);try{return{type:"filter",value:Xf(v),raw:y}}catch(A){if(n)throw A;return{type:"wildcard",value:"*",raw:y}}}return p.startsWith('"')&&p.endsWith('"')||p.startsWith("'")&&p.endsWith("'")?{type:"property",value:p.slice(1,-1),raw:y}:{type:"property",value:p,raw:y}};for(let y=0;y<e.length;y++){let p=e[y],v=e[y+1];if((p==='"'||p==="'")&&!a){a=!0,c=p;continue}else if(p===c&&a){a=!1,c="",p==='"'||p==="'"||(i?u+=p:s+=p);continue}if(a){i?u+=p:s+=p;continue}if(p==="["&&!i){s&&(o.push({type:"property",value:s,raw:s}),s=""),i=!0,u="";continue}if(p==="]"&&i&&!a){i=!1;let k=h(u);o.push(k);continue}let A=o.length>0?o[o.length-1]:null;if(p==="."&&!i&&!a){if(v==="."){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(i)u+=p;else if(A&&A.type!=="descendant")s+=p;else{let k=e.split(A?.raw)[1];k!==void 0?s=k:s+=p}}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 p=parseInt(y.value,10);if(!isNaN(p))return{...y,type:"index",value:p}}return y})},Xf=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}`)}},Yf=(e,t,r)=>{let n=An(t),o=e;for(let s=0;s<n.length;s++){let i=n[s],a=s===n.length-1;switch(i.type){case"property":if(a)o[String(i.value)]=r;else{if(!o[String(i.value)]){let u=n[s+1];o[String(i.value)]=u.type==="index"||u.type==="slice"||u.type==="union"||u.type==="wildcard"?[]:{}}o=o[String(i.value)]}break;case"index":Array.isArray(o)||(o=[]);let c=i.value;if(a){if(c>=o.length)for(let u=o.length;u<=c;u++)o.push(void 0);o[c]=r}else{if(!o[c]){let u=n[s+1];o[c]=u.type==="index"||u.type==="slice"||u.type==="union"||u.type==="wildcard"?[]:{}}o=o[c]}break;case"wildcard":if(Array.isArray(o))if(a)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 Zf(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]&&ve(e[o],t[s],r)){n[s]=1;continue e}return!1}return!0}var ve,Fs=F(()=>{"use strict";Sn();ve=(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?Zf(e,t,r):e.every((p,v)=>ve(p,t[v],r));if(typeof e!="object")return e===t;let s=e instanceof Date,i=t instanceof Date;if(s!==i)return!1;if(s)return e.getTime()===t.getTime();let a=e instanceof RegExp,c=t instanceof RegExp;if(a!==c)return!1;if(a)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[p,v]of e)if(!t.has(p)||!ve(v,t.get(p),r))return!1;return!0}let l=e instanceof Set,d=t instanceof Set;if(l!==d)return!1;if(l){if(e.size!==t.size)return!1;let p=[...t],v=new Uint8Array(p.length);e:for(let A of e){for(let k=0;k<p.length;k++)if(!v[k]&&ve(A,p[k],r)){v[k]=1;continue e}return!1}return!0}if(!Zt(e)||!Zt(t))return!1;let h=Object.keys(e),y=Object.keys(t);if(h.length!==y.length)return!1;for(let p of h)if(!Object.prototype.hasOwnProperty.call(t,p)||!ve(e[p],t[p],r))return!1;return!0}});function Qf(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,(c,u)=>(n.push(u),"([^/]+)")).replace(/\*([a-zA-Z0-9_]*)/g,(c,u)=>(u&&n.push(u),"(.*)"));o.startsWith("/")||(o="/"+o),o===""&&(o="/");let s=new RegExp(`^${o}${r?"$":"(?=/|$)"}`),i=t.match(s);if(!i)return null;let a={};return n.forEach((c,u)=>{a[c]=i[u+1]}),{params:a,path:i[0]}}function Us(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 el(e){return[...e].sort((t,r)=>Us(r)-Us(t))}function Ze(e,t){let r=t.length>1?t.replace(/\/+$/,"")||"/":t,n=zs(e,r);if(!n)return null;let o=[],s="",i={};for(let a of n.layers){s=Qf(tl(s,a.consumed));let c={};for(let[u,f]of Object.entries(a.params))u in i||(c[u]=f),i[u]=f;o.push({route:a.route,component:a.route.component,params:c,pathname:s||"/"})}return{matched:o,params:i,pathname:t}}function zs(e,t){if(!e||e.length===0)return null;let r=el(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 i=zs(n.children,t);if(i)return{layers:[{route:n,params:s.params,consumed:s.path},...i.layers]};continue}return{layers:[{route:n,params:s.params,consumed:s.path}]}}}return null}function tl(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}`}function rl(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 Qt(e="/"){let t=[{path:e,state:null}],r=0,n=new Set,o=()=>n.forEach(s=>s());return{get(){let{path:s,state:i}=t[r];return{...rl(s),state:i}},push(s,i=null){t=t.slice(0,r+1),t.push({path:s,state:i}),r=t.length-1,o()},replace(s,i=null){t[r]={path:s,state:i},o()},subscribe(s){return n.add(s),()=>n.delete(s)}}}function $e(){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)}}}function nl(e){let t={};return e&&new URLSearchParams(e.startsWith("?")?e.slice(1):e).forEach((n,o)=>t[o]=n),t}function ol(e,t){if(!t)return e||"/";let r=t.replace(/\/$/,"");return e===r?"/":e.startsWith(r+"/")?e.slice(r.length)||"/":e||"/"}function il(e,t){return!t||/^https?:\/\//.test(e)?e:`${t.replace(/\/$/,"")}${e.startsWith("/")?e:"/"+e}`}function Bs(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:nl(f.search)}},i=f=>Ze(t,ol(f,n)),a=(()=>{let f=s();return{location:f,match:i(f.pathname)}})(),c=()=>{let f=s();a={location:f,match:i(f.pathname)},o.forEach(l=>l(a))},u=r.subscribe(c);return{state(){return a},subscribe(f){return o.add(f),()=>o.delete(f)},navigate(f,l={}){let d=il(f,n);l.replace?r.replace(d,l.state??null):r.push(d,l.state??null)},match(f){return i(f)},destroy(){u(),o.clear()}}}var xn=F(()=>{"use strict";});function Js(e){return On.add(e),()=>{On.delete(e)}}function Ys(e,t,r={}){let{ttl:n=1/0,staleWhileRevalidate:o=!0}=r;return(...s)=>{let i=r.cache??st(),a=t+":"+JSON.stringify(s),c=()=>{let f=i.inflight.get(a);if(f)return f;let l=Promise.resolve(e(...s)).then(d=>(i.set(a,{value:d,timestamp:Date.now()}),i.inflight.delete(a),d),d=>{throw i.inflight.delete(a),d});return i.inflight.set(a,l),l},u=i.get(a);return u&&(n===1/0||Date.now()-u.timestamp<=n)?Promise.resolve(u.value):u&&o?(c().then(Xs,()=>{}),Promise.resolve(u.value)):c()}}function er(e,t){let r=typeof e=="string"?[e]:Array.isArray(e)?e:null;Gs(r??e,t??st()),r&&!t&&sl(r)}function Gs(e,t){let r=Array.isArray(e)?n=>e.some(o=>n===o||n.startsWith(o+":")):e;for(let n of[...t.keys()])r(n)&&t.delete(n);Xs()}function sl(e){try{localStorage.setItem(Zs,JSON.stringify({names:e,at:Date.now()+Math.random()}))}catch{}}function Qs(e,t){let[r]=ae(t||(()=>!0),e);return r}function ea(e){return kn.has(e)||kn.set(e,b(void 0)),kn.get(e)}function ta(e){return _n.has(e)||_n.set(e,b([])),_n.get(e)}function En(e,t,r={}){let n=t||e.name||"action",o=async s=>{let[,i]=ea(n),[,a]=ta(n),c,u=()=>a(h=>h.filter(y=>y!==c)),f=h=>{a(y=>y.map(p=>p===c?h:p)),c=h},l=()=>{i(void 0),u()},d=()=>(u(),o(s));c={input:s,pending:!0,clear:l,retry:d},i(c),a(h=>[...h,c]);try{let h=await e(s);i({input:s,result:h,pending:!1,clear:l,retry:d}),u();let y=typeof r.invalidates=="function"?r.invalidates(h):r.invalidates;for(let p of y??[])er(p);return h}catch(h){let y={input:s,error:h,pending:!1,clear:l,retry:d};throw i(y),f(y),h}};return o.url=n,o.with=s=>En((...i)=>e(s,...i),t,r),o}function ra(e){let[t]=ea(e.url);return t}function na(e){let[t]=ta(e.url);return t}function oa(e){return e}var On,Xs,Zs,kn,_n,al,Xp,Tn=F(()=>{"use strict";x();x();un();On=new Set;Xs=()=>{for(let e of[...On])e()};Zs="fluixi:revalidate";typeof window<"u"&&window.addEventListener("storage",e=>{if(!(e.key!==Zs||!e.newValue))try{let t=JSON.parse(e.newValue).names;Array.isArray(t)&&t.every(r=>typeof r=="string")&&Gs(t,st())}catch{}});globalThis[Symbol.for("fluixi.revalidate")]=e=>er(e);kn=new Map;_n=new Map;al=Je(void 0,"route-data"),Xp=al.Provider});var ua={};Vn(ua,{A:()=>Ln,Form:()=>wl,Link:()=>nr,Outlet:()=>Rn,Redirect:()=>Pn,Router:()=>Cn,action:()=>En,cache:()=>Ys,createAsync:()=>Qs,createBrowserHistory:()=>$e,createMemoryHistory:()=>Qt,lazy:()=>Ce,matchPath:()=>Ge,matchRoutes:()=>Ze,prefersReducedMotion:()=>vn,preloadRoutes:()=>bl,revalidate:()=>er,runWithOwner:()=>$,select:()=>hl,supportsViewTransitions:()=>gn,useAction:()=>oa,useIsRouting:()=>ll,useLevelParams:()=>pl,useLinkNavigation:()=>ml,useLocation:()=>et,useMatch:()=>Nn,useNavigate:()=>rr,useParam:()=>$n,useParamSelector:()=>yl,useParams:()=>Qe,useRouteData:()=>gl,useRouter:()=>Ne,useSearchParams:()=>Mn,useSubmission:()=>ra,useSubmissions:()=>na});function cl(e,t,r){let n,o=e.route.data;if(typeof o=="function"){let f=!1;S(()=>{f=!0});let l=T(),d=q(we),h=!1,y=A=>{h||f||(h=!0,$(l,()=>{let k=!0;_(()=>{A(),k?k=!1:E(()=>{v()})})}))},[p,{refetch:v}]=ae(()=>{let A=o({params:r.params,location:r.location},l,()=>f,y);return d?d.trackLoad(A):A});S(Js(()=>{v()})),n=()=>{let A=p.error;if(A!=null)throw A;return p()},Object.defineProperty(n,"loading",{get:()=>p.loading}),Object.defineProperty(n,"state",{get:()=>p.state})}let s=()=>aa.Provider({value:n,get children(){return sa.Provider({value:e.params,get children(){return ia.Provider({value:{depth:t,...r},get children(){return z(e.component,{})}})}})}});if(!n)return{view:s(),ready:()=>!0};let i=n,a=()=>{let f=i.state;return f===void 0?i.loading:f==="pending"||f==="unresolved"},[c,u]=b(E(()=>!a()));return _(()=>u(!a())),{view:w(()=>c()?s():null),ready:c}}function ca(e){let t=e.depth+1,[r,n]=b(E(()=>e.matched()[t]?.component));_(()=>{let u=e.matched()[t]?.component;E(r)!==u&&n(()=>u)});let o=T(),s=null,i=null,a=u=>u?.dispose();S(()=>{a(s),a(i),s=i=null});let c=w(()=>{if(!r())return null;let f=E(()=>e.matched())[t];return $(o,()=>D(l=>({...cl(f,t,{matched:e.matched,params:e.params,location:e.location}),dispose:l})))});return w(()=>{let u=c();return u?(u===s||(i&&i!==u&&a(i),i=u,s&&!u.ready())||(a(s),s=u,i=null),s.view):(a(s),a(i),s=i=null,e.notFound?e.notFound():null)})}function ul(e){return e==null?fl():typeof e=="function"?z(e,{}):e}function fl(){let e=Ee("div");R(e,"class","fx-not-found"),R(e,"role","main"),R(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=Ee("h1");R(t,"style","margin:0;font-size:2.5rem;font-weight:700"),V(t,"404");let r=Ee("p");return R(r,"style","margin:0;opacity:.7"),V(r,"This page could not be found."),e.appendChild(t),e.appendChild(r),e}function Cn(e){let t=e.history??$e(),r=Bs({routes:e.routes,base:e.base,history:t}),[n,o]=b(r.state()),[s,i]=b(!1),[a,c]=b(0),u=0,f=()=>{let v=tr??e.transition??"auto";return tr=void 0,v},l=r.subscribe(v=>{let A=++u,k=f();i(!0);let Q=js((v.match?.matched??[]).map(ee=>ee.component).filter(Boolean)),pe=()=>{o(v);let ee=ao();return A===u&&i(!1),ee};if(!Q){wn(k,pe);return}Q.then(()=>{if(A===u)return wn(k,pe)})});S(()=>{l(),r.destroy(),u++});let d=w(()=>(n().match?.matched??[]).filter(v=>v.component)),h={router:r,location:w(()=>n().location),params:w(()=>n().match?.params??{}),isRouting:()=>s()||a()>0,trackLoad(v){return v&&typeof v.finally=="function"&&(c(A=>A+1),v.finally(()=>c(A=>A-1)).catch(()=>{})),v}},y={depth:-1,matched:d,params:h.params,location:h.location,notFound:()=>ul(e.notFound)},p;return we.Provider({value:h,get children(){return p??=ca(y)}})}function Rn(){let e=q(ia);return e?ca(e):null}function ll(e={}){let t=q(we)?.isRouting??(()=>!1),r=e.delay??0;if(r<=0)return t;let[n,o]=b(!1);return _(()=>{if(!t()){o(!1);return}let s=setTimeout(()=>o(!0),r);S(()=>clearTimeout(s))}),()=>t()&&n()}function Pn(e){let t=q(we);if(t&&typeof window<"u"){let r=!1;S(()=>r=!0),queueMicrotask(()=>{r||t.router.navigate(e.to,{replace:e.replace!==!1})})}return null}function Ne(){let e=q(we);if(e)return e;if(typeof window>"u")return dl;throw new Error("[router] useRouter must be used within <Router>")}function Qe(){let e=Ne().params;return w(()=>e(),{},{equals:(t,r)=>JSON.stringify(t)===JSON.stringify(r)})}function pl(){return q(sa)??{}}function $n(e){let t=Qe();return w(()=>t()[e])}function yl(e,t){let r=Qe();return w(()=>e(r()),void 0,t?{equals:t}:void 0)}function Nn(e){let t=et();return w(()=>Ge(typeof e=="function"?e():e,t.pathname))}function Mn(){let e=et(),t=rr();return[w(()=>e.query),(o,s)=>{let i=new URLSearchParams(e.search);for(let[c,u]of Object.entries(o))u===null?i.delete(c):i.set(c,u);let a=i.toString();t(e.pathname+(a?`?${a}`:""),s)}]}function hl(e,t){let r=(n,o)=>ve(n,o);return t!==void 0?w(()=>Gt(e(),t),void 0,{equals:r}):w(e,void 0,{equals:r})}function et(){let{location:e}=Ne();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 ml(e={}){let t=q(we);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(),tr=e.transition,t.router.navigate(s.pathname+s.search+s.hash,{replace:e.replace})))}}function rr(){let{router:e}=Ne();return(t,r)=>{tr=r?.transition,e.navigate(t,r)}}function gl(){return q(aa)??(()=>{})}function nr(e){let t=q(we),r=()=>t.router.navigate(ie(e.href)??"",{replace:ie(e.replace)}),n=Ee("a");R(n,"href",ie(e.href)??""),e.slot&&R(n,"slot",ie(e.slot));for(let s of Object.keys(e)){if(vl.has(s))continue;let i=e[s];if(typeof i=="function"){if(/^on[A-Z]/.test(s))continue;let a=i,c=()=>{let u=a();u==null||u===!1?n.removeAttribute?.(s):R(n,s,String(u))};typeof n.addEventListener=="function"?_(c):c();continue}i!=null&&R(n,s,String(i))}if(typeof n.addEventListener=="function")n.addEventListener("click",s=>{s.metaKey||s.ctrlKey||s.shiftKey||s.altKey||t&&(s.preventDefault(),r())});else{let s=ie(e.className??e.class)??"";s&&R(n,"class",s)}typeof n.addEventListener=="function"&&_(()=>{let s=ie(e.href)??"";n.setAttribute("href",s);let i=ie(e.className??e.class)??"",a=ie(e.activeClass)??"",c=ie(e.active)??t?.location().pathname===s;n.className=[i,c?a:""].filter(Boolean).join(" ")});let o=e.children;return o!=null&&V(n,o),n}function wl(e){let t=e.action,r=e.className??e.class,n=t.url??"",o=Ee("form");R(o,"method","post"),n&&R(o,"action",n),r&&R(o,"class",r);for(let i of Object.keys(e)){if(i==="action"||i==="children"||i==="class"||i==="className")continue;let a=e[i];a!=null&&typeof a!="function"&&R(o,i,String(a))}typeof o.addEventListener=="function"&&o.addEventListener("submit",i=>{i.preventDefault();let a={};new FormData(o).forEach((c,u)=>{a[u]=c}),Promise.resolve(t(a)).catch(()=>{})});let s=e.children;return s!=null&&V(o,s),o}async function bl(e,t){let r=Ze(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 we,ia,sa,aa,tr,dl,ie,vl,Ln,In=F(()=>{"use strict";x();bn();M();x();Sn();Fs();xn();Tn();xn();Tn();Xt();bn();x();we=Y(void 0,"router"),ia=Y(void 0,"outlet"),sa=Y(void 0,"route-params"),aa=Y(void 0,"route-data");dl={router:{navigate:()=>{}},location:()=>({pathname:"",search:"",hash:"",query:{}}),params:()=>({}),isRouting:()=>!1,trackLoad:e=>e};ie=e=>typeof e=="function"?e():e,vl=new Set(["href","slot","class","className","active","activeClass","replace","children"]);Ln=nr});var Sl={};Vn(Sl,{$component:()=>on,A:()=>Ln,ClientOnly:()=>tn,DEV:()=>Ue,Dynamic:()=>ds,ErrorBoundary:()=>hs,FRAMEWORK_NAME:()=>Ms,For:()=>cs,Fragment:()=>fn,Index:()=>us,Link:()=>nr,Match:()=>fs,NoSsr:()=>ys,Outlet:()=>Rn,Portal:()=>ps,Redirect:()=>Pn,Router:()=>Cn,Show:()=>as,Store:()=>gt,Suspense:()=>Be,Switch:()=>ls,VERSION:()=>Ns,addClass:()=>Ni,batch:()=>N,classMap:()=>ms,cleanupDelegation:()=>Os,composeProviders:()=>Es,createBrowserHistory:()=>$e,createComponent:()=>Te,createComputed:()=>so,createContext:()=>Je,createDebounce:()=>mo,createDeferred:()=>ho,createEffect:()=>_,createIsomorphicState:()=>Cs,createMemo:()=>w,createMemoryHistory:()=>Qt,createProvider:()=>cn,createRenderEffect:()=>C,createResource:()=>ae,createRoot:()=>D,createSelector:()=>yo,createSignal:()=>b,createStore:()=>_r,delegateEvents:()=>ge,devOnly:()=>an,getFrameworkInfo:()=>kf,getOwner:()=>T,getSharedConfig:()=>nn,hydrate:()=>Ht,initDelegation:()=>_s,insert:()=>V,isDOMNode:()=>It,isDev:()=>sn,isLitTemplateResult:()=>Ii,isRenderable:()=>ks,jsx:()=>ln,jsxs:()=>$s,lazy:()=>Ce,mount:()=>la,onCleanup:()=>S,onMount:()=>jt,onUnmount:()=>Kt,portal:()=>xs,read:()=>Po,reduce:()=>Ro,removeClass:()=>Mi,render:()=>Re,requireContext:()=>Ts,runWithOwner:()=>$,setAttribute:()=>R,setOwner:()=>oo,setProperty:()=>me,spread:()=>ns,startClient:()=>da,styleMap:()=>gs,toggleClass:()=>Li,untrack:()=>E,untrackStore:()=>Or,useCallback:()=>Jt,useContext:()=>Xe,useEffect:()=>ze,useEventListener:()=>Bt,useLocation:()=>et,useMatch:()=>Nn,useMemo:()=>Ft,useNavigate:()=>rr,useParam:()=>$n,useParams:()=>Qe,useReducer:()=>zt,useRef:()=>Ut,useRouter:()=>Ne,useSearchParams:()=>Mn});x();x();var mr="1.0.0-alpha.94",To=mr.split(".")[0],So=`__fluixi_signal_state_v${To}__`,ec=`__fluixi_signal_builds_v${To}__`,tc=e=>{typeof queueMicrotask=="function"?queueMicrotask(e):Promise.resolve().then(e)};function Co(){return{consumer:null,untracked:!1,owner:null,queue:[],scheduled:!1,flushing:!1,batchDepth:0,hostSchedule:tc,onSuspend:null,onError:null,observer:null}}var hr=globalThis;function rc(e){let t=Co(),r=e;for(let n of Object.keys(t))n in e||(r[n]=t[n]);return e}function nc(){let e=hr[So];return e?rc(e):hr[So]=Co()}var O=nc();(hr[ec]??=[]).push(mr);function oc(e){return O.observer=e,()=>{O.observer===e&&(O.observer=null)}}var gr=[],ic,xo;function sc(e){let t=O.observer;t&&t.created(e.parents===void 0?{...e,parents:gr,origin:e.origin??ic,scope:e.scope??xo}:{...e,scope:e.scope??xo})}function ac(e){return O.observer?(gr.push(e),!0):!1}function cc(){gr.pop()}function uc(e){O.observer?.ran?.(e)}function fc(e){O.observer?.disposed?.(e)}var lc="__FLUIXI_DEVTOOLS_HOOK__",ko=globalThis[lc];if(typeof ko?.inject=="function")try{ko.inject({observeReactiveNodes:oc,version:mr})}catch{}function dc(){return O.observer!=null}var _o=0,Oo=1,at=2,pc=class{constructor(){this.observers=null,this.watchers=null,this.version=0}updateIfNecessary(){}track(){if(O.untracked)return;let e=O.consumer;e&&((this.observers??=new Set).add(e),(e.sources??=new Set).add(this))}};var yc=class extends pc{constructor(e,t){super(),this._threw=!1,this._initialized=!1,this.state=at,this.sources=null,this._fn=e,this._equals=t?.equals===!1?()=>!1:t?.equals??Object.is}get(){if(O.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===Oo&&this.sources){for(let e of this.sources)if(e.updateIfNecessary(),this.state===at)break}(this.state===at||!this._initialized)&&this.recompute(),this.state=_o}recompute(){if(this.sources){for(let a of this.sources)a.observers?.delete(this);this.sources.clear()}let e=O.consumer,t=O.untracked,r=ac(this);O.consumer=this,O.untracked=!1;let n,o=!1,s;try{n=this._fn()}catch(a){o=!0,s=a,n=this._value}finally{O.consumer=e,O.untracked=t,r&&cc()}let i=!this._initialized||this._threw!==o||(o?s!==this._error:!this._equals(this._value,n));if(this._initialized=!0,this._threw=o,this._error=s,this._value=n,uc(this),i){if(this.version++,this.observers)for(let a of[...this.observers])a.markDirty(at);Eo(this)}}markDirty(e){if(this.state>=e)return;let t=this.state===_o;if(this.state=e,t){if(this.observers)for(let r of[...this.observers])r.markDirty(Oo);Eo(this)}}peek(){if(this.updateIfNecessary(),this._threw)throw this._error;return this._value}};function Eo(e){if(e.watchers)for(let t of[...e.watchers])t._notify(e)}function hc(e){return O.onSuspend?(O.onSuspend(e,O.owner),!0):!1}function mc(){return O.owner}function gc(e,t){let r=O.owner;O.owner=e;try{return t()}finally{O.owner=r}}function vc(e){if(O.owner){if(O.owner.disposed){e();return}(O.owner.cleanups??=[]).push(e)}}function wc(e){O.hostSchedule=e??(t=>{Promise.resolve().then(t)})}function bc(e){return!!e&&typeof e.then=="function"}wc(()=>{});var Ac=Symbol.for("signal"),Sc=Symbol.for("memo");function xc(e,t,r){let n=t,o=mc(),s=new yc(()=>gc(o,()=>{try{return n=e(n)}catch(a){if(bc(a))return hc(a),n;throw a}}),{equals:r?.equals}),i=(()=>s.get());return Object.defineProperty(i,Ac,{value:!0,enumerable:!0}),Object.defineProperty(i,Sc,{value:!0,enumerable:!0}),sc({kind:"memo",node:s,handle:i,name:r?.name}),dc()&&vc(()=>fc(s)),i}function Ro(e,t,r,n){return xc(()=>e().reduce(t,r),void 0,n)}function Po(e){let t=e;for(;typeof t=="function";)t=t();return t}x();var kr="1.0.0-alpha.94",Uo=kr.split(".")[0],$o=`__fluixi_signal_state_v${Uo}__`,kc=`__fluixi_signal_builds_v${Uo}__`,_c=e=>{typeof queueMicrotask=="function"?queueMicrotask(e):Promise.resolve().then(e)};function zo(){return{consumer:null,untracked:!1,owner:null,queue:[],scheduled:!1,flushing:!1,batchDepth:0,hostSchedule:_c,onSuspend:null,onError:null,observer:null}}var vr=globalThis;function Oc(e){let t=zo(),r=e;for(let n of Object.keys(t))n in e||(r[n]=t[n]);return e}function Ec(){let e=vr[$o];return e?Oc(e):vr[$o]=zo()}var ue=Ec();(vr[kc]??=[]).push(kr);function Tc(e){return ue.observer=e,()=>{ue.observer===e&&(ue.observer=null)}}var Cc=[],ct;function Rc(e,t){if(!ue.observer)return t();let r=ct;ct=e;try{return t()}finally{ct=r}}var No;function Pc(e){let t=ue.observer;t&&t.created(e.parents===void 0?{...e,parents:Cc,origin:e.origin??ct,scope:e.scope??No}:{...e,scope:e.scope??No})}function Mo(e,t,r){ue.observer?.moved?.(e,t,r)}function Lo(e){ue.observer?.disposed?.(e)}var $c="__FLUIXI_DEVTOOLS_HOOK__",Io=globalThis[$c];if(typeof Io?.inject=="function")try{Io.inject({observeReactiveNodes:Tc,version:kr})}catch{}function Bo(){return ue.observer!=null}var lt=Symbol("store-raw"),Do=Symbol("store-node"),qo=Symbol("store-has"),Vo=Symbol("store-self"),Ho=Symbol("store-track");var qe=new WeakMap,wr=new WeakMap,ke=new WeakMap,dt=new WeakMap;function Nc(e,t){if(!xe(e)||!Bo())return;let r=new Set,n=i=>{if(!(!xe(i)||r.has(i))){r.add(i);for(let a of Object.values(i))n(a)}};n(dt.get(t)??t);let o=new Set,s=i=>{if(!xe(i))return;let a=i;if(r.has(a)||o.has(a))return;o.add(a);let c=qe.get(a);if(c){for(let u of c.keys.values())Lo(u);c.all&&Lo(c.all),qe.delete(a),ke.delete(a),wr.delete(a)}for(let u of Object.values(a))s(u)};s(e)}var pt=(e,t,r)=>r?`${e}[${String(t)}]`:`${e}.${String(t)}`;function Jo(e,t,r){let n=t?.owner,o=n&&r!==void 0?pt(n.name,r,t?.array):void 0,[s,i]=Rc(n?.store,()=>b(e,o?{name:o}:void 0)),a=s;return a.$=i,a}function yt(e){let t=qe.get(e);return t?t.owner||(t.owner=ke.get(e)):qe.set(e,t={keys:new Map,owner:ke.get(e),array:Array.isArray(e)}),t}function Wo(e,t,r){let n=e.keys.get(t);return n||e.keys.set(t,n=Jo(r,e,t)),n}function Mc(e,t,r,n){let o=ke.get(e);if(o&&o.store===t&&o.name===r)return;let s={store:t,name:r};ke.set(e,s),dt.set(e,dt.get(n)??n);let i=qe.get(e);if(i&&(i.owner=s,!!Bo())){for(let[a,c]of i.keys)Mo(c,t,pt(r,a,i.array));i.all&&Mo(i.all,t,pt(r,"*",i.array))}}function jo(e){let t=yt(e);(t.all||(t.all=Jo(void 0,t,"*")))()}function Ko(e,t){e.$(typeof t=="function"?()=>t:t)}function xe(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 ut(e){if(!xe(e))return e;let t=wr.get(e);if(t)return t;let r=new Proxy(e,Lc);return wr.set(e,r),r}var Lc={get(e,t,r){if(t===lt||t===Do)return e;if(t===Se)return r;if(t===qo)return c=>c in e;if(t==="__proxy")return!0;if(t===Ho||t===Vo)return jo(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=yt(e),i=Wo(s,t,n),a=i();return xe(a)?(s.owner&&Mc(a,i,pt(s.owner.name,t,s.array),e),ut(a)):a},set(){return!0},deleteProperty(e,t){return t in e&&G(e,t,void 0),!0},has(e,t){return t===lt||t===Se||t===Do||t===qo||t===Vo||t===Ho?!0:(Wo(yt(e),t,e[t])(),t in e)},ownKeys(e){return jo(e),Reflect.ownKeys(e)},getOwnPropertyDescriptor(e,t){return Reflect.getOwnPropertyDescriptor(e,t)}};function Xo(e,t=new Set){if(e==null||typeof e!="object")return e;let r=e[lt]??e;if(t.has(r)||!xe(r))return r;t.add(r);let n=!1,o=i=>{let a=Xo(i,t);return a!==i&&(n=!0),a};if(Array.isArray(r)){let i=r.map(o);return n?i:r}let s={};for(let i of Object.keys(r))s[i]=o(r[i]);return n?s:r}function G(e,t,r){let n=Xo(r),o=e[t];if(o===n&&(n!==void 0||t in e))return;let s=Array.isArray(e),i=s?e.length:0;n===void 0?delete e[t]:e[t]=n;let a=yt(e),c=a.keys.get(t);if(c&&Ko(c,n),Nc(o,e),s&&e.length!==i){let u=a.keys.get("length");u&&Ko(u,e.length)}a.all&&a.all.$(void 0)}function br(e,t){return typeof e=="function"?e(t):e}function Ar(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)?Ar(o,n):G(e,r,n)}}function mt(e){let t=[],r=e.replace(/\[([^\]]*)\]/g,".$1");for(let n of r.split("."))n.length&&t.push(n);return t}function Yo(e,t,r){let n=t.length-1;for(let s=0;s<n;s++){let i=t[s];if(i==="*"){let c=t.slice(s+1);if(Array.isArray(e))for(let u=0;u<e.length;u++)Yo(e[u],c,r);return}let a=e[i];(a==null||typeof a!="object")&&(a=/^\d+$/.test(t[s+1])?[]:{},G(e,i,a)),e=a}let o=t[n];if(o==="*"){if(Array.isArray(e))for(let s=0;s<e.length;s++)G(e,s,br(r,e[s]));return}G(e,o,br(r,e[o]))}function Fo(e,t,r){Yo(e,mt(t),r)}function Ic(e){return Array.isArray(e)&&e.length>0&&e.every(t=>Array.isArray(t)&&t.length>=2&&typeof t[0]=="string")}function ft(e,t){for(let r=e.length-1;r>=t.length;r--)G(e,String(r),void 0);e.length!==t.length&&G(e,"length",t.length);for(let r=0;r<t.length;r++)G(e,String(r),t[r])}function Dc(e,t){let r=t[0];if(typeof r=="function"&&t.length===1){let n=r(e);n&&n!==e&&Ar(e,n);return}if(Array.isArray(r)&&t.length===1){if(Ic(r)){for(let n of r)Fo(e,n[0],n[1]);return}if(Array.isArray(e)){ft(e,r);return}if(r.length===0)return;throw new TypeError("[fluixi] set() was given an array that is neither a batch of [path, value] pairs nor a replacement for an array root. Name the path you meant, as in set('items', [...]).")}if(r&&typeof r=="object"&&!Array.isArray(r)&&t.length===1){Ar(e,r);return}if(t.length>=3){Sr(e,t.slice(0,-1),t[t.length-1]);return}Fo(e,String(r),t[1])}function qc(e,t){if(typeof t=="function"){if(!Array.isArray(e))return[];let r=[];for(let n=0;n<e.length;n++)t(e[n],n)&&r.push(n);return r}if(Array.isArray(t))return Array.isArray(e)?t.map(Number):t.map(String);if(t&&typeof t=="object"&&("from"in t||"to"in t||"by"in t)){if(!Array.isArray(e))return[];let r=t.by??1,n=t.from??0,o=t.to??e.length-1,s=[];for(let i=n;i<=o;i+=r)i>=0&&i<e.length&&s.push(i);return s}return t==="*"?Array.isArray(e)?e.map((r,n)=>n):Object.keys(e??{}):[t]}function Sr(e,t,r){if(e==null)return;let[n,...o]=t;if(typeof n=="string"){let i=mt(n);if(i.length>1){Sr(e,[...i,...o],r);return}}let s=qc(e,n);if(o.length===0){for(let i of s)G(e,i,br(r,e[i]));return}for(let i of s){let a=e[i];if(a==null||typeof a!="object"){let c=o[0];a=typeof c=="number"||/^\d+$/.test(String(c))?[]:{},G(e,i,a)}Sr(a,o,r)}}function xr(e){if(e==null||typeof e!="object")return e;if(Array.isArray(e))return e.map(xr);let t={};for(let r of Object.keys(e))t[r]=xr(e[r]);return t}function ce(e,t){let r=e;for(let n of mt(t)){if(r==null)return;r=r[n]}return r}var gt=class{constructor(e,t={immutable:!0}){this.options=t,this.root=e,this.set=((...r)=>N(()=>Dc(this.root,r))),e&&typeof e=="object"&&(ke.set(e,{store:this,name:t.name??"store"}),dt.set(e,e)),Pc({kind:"store",node:this,handle:()=>this.root,name:t.name})}get state(){return ut(this.root)}get proxy(){return ut(this.root)}get accessor(){return(()=>ut(this.root))}unwrap(){return this.root}getNode(e){return this.root&&this.root[e]}get(e){if(e==null||e==="")return ht(this.state);let t=this.state;for(let r of mt(e)){if(t==null)return;t=t[r]}return ht(t)}select(e){return w(()=>e(this.state))}subscribe(e){return _(()=>e(this.state))}watch(e,t){let r;return _(()=>{let n=e(this.state);Object.is(n,r)||(t(n,r),r=n)})}reactive(e){return w(()=>this.state[e])}produce(e){this.set((t=>{let r=xr(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(),s=o.splice(t,r,...n);return this.set(e,o),s}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}replace(e,t){if(arguments.length>=2){let n=ce(this.root,String(e)),o=t;if(Array.isArray(n)&&Array.isArray(o)){ft(n,o);return}this.set(e,o);return}let r=this.root;if(Array.isArray(r)&&Array.isArray(e)){ft(r,e);return}this.set(e)}clear(e){let t=e===void 0?this.root:ce(this.root,e);if(Array.isArray(t)){ft(t,[]);return}if(t&&typeof t=="object")for(let r of Object.keys(t))G(t,r,void 0)}toObservable(){let[e]=b(this.state);return e.toObservable()}dispose(){}},Vc=["get","select","watch","subscribe","produce","reconcile","push","pop","shift","splice","insert","removeAt","replace","clear","unwrap","toObservable"];function Hc(e,t){for(let r of Vc)e[r]=t[r].bind(t);e.$=t.reactive.bind(t)}function _r(e,t={immutable:!0}){let r=new gt(e,t);return Hc(r.set,r),[r.proxy,r.set]}function Wc(e,t={}){return new gt(e,{...t,immutable:!1})}function ht(e){if(e==null||typeof e!="object")return e;let t=e[lt];return t!==void 0?t:e}function Or(e){return E(()=>ht(e))}var Ml=Object.freeze({createStore:_r,createMutableStore:Wc,batch:N,unwrap:ht,untrackStore:Or});M();x();M();var vs="1.0.0-alpha.94";M();Di(vs);M();M();M();x();var hf={context:null,owner:null};function nn(){return hf}var Ue=typeof process<"u"&&!1,rn=Symbol.for("fluixi-lifecycle");function ws(){let e=T();if(!e)return null;if(!e[rn]){let t={mounts:[],effects:[],scheduled:!1};e[rn]=t}return e[rn]}function bs(e){if(e.scheduled)return;if(I()){e.mounts=[],e.effects=[];return}e.scheduled=!0;let t=T();queueMicrotask(()=>{if(to(t)){e.mounts=[],e.effects=[];return}$(t,()=>{for(let r of e.mounts)try{let n=r();typeof n=="function"&&S(n)}catch(n){console.error("Error in onMount callback:",n)}for(let r of e.effects){let n;_(()=>{n&&n(),n=r()}),S(()=>{n&&n()})}e.mounts=[],e.effects=[]})})}function Te(e,t){return z(e,t)}function on(e,t){let r=typeof e=="function"?E(()=>e(t)):e,n=r!=null&&(typeof r=="function"||typeof r=="object");if(n)try{r.$name=e.name}catch{}return n&&!L(r)?Fe(r):r}function jt(e,t=!0){if(I())return;let r=ws();if(r){if(!t){r.scheduled||e();return}r.mounts.push(e),bs(r)}else{if(!t){e();return}_(()=>{let n=E(e);typeof n=="function"&&S(n)})}}function Kt(e){S(e)}function ze(e){let t=ws();if(t)t.effects.push(e),bs(t);else{let r;_(()=>{r&&r(),r=e()}),S(()=>{r&&r()})}}function Ft(e){return w(e)}function Ut(e){let t={current:e};return S(()=>{t.current=null}),t}function zt(e,t){let[r,n]=b(t);return[r,s=>{n(e(r(),s))}]}function Bt(e,t,r,n){ze(()=>{let o=e&&"current"in e?e.current:e;if(o)return o.addEventListener(t,r,n),()=>{o.removeEventListener(t,r,n)}})}function Jt(e){return e}function sn(){return Ue}function an(e){Ue&&e()}x();M();function As(e){return!!(e&&typeof e=="object"&&typeof e.then=="function"||e instanceof Promise)}var mf=Y(void 0,"suspense-list");function Be(e){return z(gf,e)}function gf(e){let t=vo(),r=q(mf),n=r?r.register(t.inFallback):void 0;function o(l){return l==null||typeof l=="boolean"?null:typeof l=="function"&&ne(l)&&!L(l)?l():l}let s=Ki(()=>o(e.fallback??null)),i=yr(t,()=>De(()=>e.children)),a=(l,d)=>{if(!(d>8))if(Array.isArray(l))for(let h of l)a(h,d+1);else typeof l=="function"&&L(l)&&a(l(),d+1)};yr(t,()=>{C(()=>a(i,0))});let[c,u]=b(void 0),f=As(i);return f&&(t.increment(),i.then(l=>{u(()=>l),t.decrement()},()=>t.decrement())),w(()=>(n?n.showFallback():t.inFallback())?s:f?c():i)}Vi(Be);Object.defineProperty(Be,"__suspense",{value:!0,enumerable:!0});Xt();Xt();function Re(e,t,r={}){if(ge(["click","input","change","submit"]),I())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="",Dt(t),qt(),V(t,()=>s)}),()=>{n&&(n(),n=void 0)}}function vf(e){return e&&typeof e=="object"&&(e._$litType$!==void 0||e._$litDirective$!==void 0)}function xs(e,t,r={}){let n=document.createElement("div");n.setAttribute("data-portal","true"),t.appendChild(n);let o=Re(e,n,r);return()=>{o(),t.contains(n)&&t.removeChild(n)}}function ks(e){return!!(e==null||typeof e=="function"||It(e)||vf(e)||Array.isArray(e)||typeof e=="string"||typeof e=="number"||typeof e=="boolean")}function _s(){I()||ge(["click","input","change","submit"])}function Os(){I()}un();x();M();var wf="__fluixi_iso_states__",bf="__iso:";function Af(){return globalThis[wf]??=new Map}function Sf(e){if(typeof window>"u")return;let t=en();return t?t[bf+e]:void 0}function Cs(e,t){let r=Sf(e),n=r!==void 0?r:typeof window<"u"&&t.client?t.client():t.fallback,[o,s]=b(n,{name:e});return Af().set(e,{server:t.server,set:s}),{value:o,set:s,key:e}}M();M();M();M();M();x();var fn=Symbol.for("fluixi.fragment"),Rs=typeof window>"u";function Ps(e){return e==null||e===!1?null:Array.isArray(e)?e.map(Ps).flat():e}function ln(e,t,r){if(e==null)return null;let n=t||{};if(r!==void 0&&(n.key=r),e===fn)return w(()=>Fe(Ps(n.children)));if(typeof e=="function"){let{type:o}=Hi(e);return e.$$typeof===Symbol.for("react.provider")||o==="provider"?e(n):Rs?{type:e,props:n}:w(()=>z(e,n),void 0,{name:"jsx component"})}return typeof e=="string"&&e.trim().length>0?xf(e,n):null}var $s=ln;function xf(e,t){return Rs?{type:e,props:t||{}}:ss(e,t)}var Ns="0.0.1",Ms="Fluixi";function kf(){return{name:Ms,version:Ns,features:{ssr:!0,hydration:!0,jsx:!0,litHtml:!0,signals:!0,fineGrained:!0,lazy:!0,hooks:!0,devMode:!0}}}M();var _f=!1,Ls=new Map;function dn(e){_f=e}function Of(){Ls.clear()}function Is(){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))Ls.set(n,o);return!0}catch(t){return console.error("Failed to deserialize hydration data:",t),!1}}function pn(){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()),Of()}typeof window<"u"&&window.addEventListener("load",()=>{setTimeout(pn,100)});x();x();x();var Ef=Object.defineProperty,Tf=(e,t)=>{for(var r in t)Ef(e,r,{get:t[r],enumerable:!0})};function oe(e){return typeof e=="function"?e():e}function Cf(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 Ds(){let e=[],[t,r]=b(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 yn=globalThis[Symbol.for("fluixi.head")]??={active:null,scope:null};function qs(e){yn.active=e}function Rf(){return yn.scope?.()??yn.active}function Pe(e){let t=Rf();if(!t)return globalThis.process?.env?.NODE_ENV!=="production"&&console.warn("[fluixi/head] useHead() called with no active head registry — ignored."),()=>{};let r=t.push(e);return typeof window<"u"&&T()&&S(r),r}function Yt(e){let t=5381;for(let r=0;r<e.length;r++)t=t*33^e.charCodeAt(r);return(t>>>0).toString(36)}function Pf(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:"+Yt(JSON.stringify(e))}function $f(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 Nf(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)$f(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 Mf(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 Lf(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 If(e,t,r){let n=(d,h)=>t.push({tag:"meta",key:d,attrs:h}),o=oe(e.title);o!==void 0&&(r.title=o),e.titleTemplate!==void 0&&(r.template=e.titleTemplate);let s=oe(e.lang);s!==void 0&&t.push({tag:"htmlAttr",key:"html:lang",name:"lang",value:s});for(let[d,h]of Object.entries(e.htmlAttrs??{})){let y=oe(h);y!==void 0&&t.push({tag:"htmlAttr",key:`html:${d}`,name:d,value:y})}e.charset!==void 0&&n("meta:charset",{charset:e.charset}),e.viewport!==void 0&&n("meta:name:viewport",{name:"viewport",content:e.viewport});let i=oe(e.description);i!==void 0&&n("meta:name:description",{name:"description",content:i});let a=oe(e.keywords);a!==void 0&&n("meta:name:keywords",{name:"keywords",content:Array.isArray(a)?a.join(", "):a}),e.author!==void 0&&n("meta:name:author",{name:"author",content:e.author}),e.robots!==void 0&&n("meta:name:robots",{name:"robots",content:Cf(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});let c=oe(e.colorScheme);c!==void 0&&n("meta:name:color-scheme",{name:"color-scheme",content:c});let u=oe(e.themeColor);if(typeof u=="string")n("meta:name:theme-color",{name:"theme-color",content:u});else if(u)for(let{color:d,media:h}of u)n(`meta:name:theme-color${h?`:${h}`:""}`,h?{name:"theme-color",content:d,media:h}:{name:"theme-color",content:d});let f=oe(e.canonical);if(f!==void 0&&t.push({tag:"link",key:"link:rel:canonical",attrs:{rel:"canonical",href:f}}),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 d={google:"google-site-verification",bing:"msvalidate.01",yandex:"yandex-verification",pinterest:"p:domain_verify"};for(let[h,y]of Object.entries(e.verification)){if(y==null)continue;let p=d[h]??h;n("meta:name:"+p,{name:p,content:y})}}for(let d of e.alternates??[])t.push({tag:"link",key:"link:alternate:hreflang:"+d.hreflang,attrs:{rel:"alternate",hreflang:d.hreflang,href:d.href}});for(let d of e.feeds??[])t.push({tag:"link",key:"link:alternate:feed:"+d.href,attrs:{rel:"alternate",type:d.type??"application/rss+xml",href:d.href,...d.title?{title:d.title}:{}}});e.og&&Nf(e.og,t),e.twitter&&Mf(e.twitter,t),e.icons&&Lf(e.icons,t);let l=oe(e.jsonLd);if(l!==void 0){let d=Array.isArray(l)?l:[l];for(let h of d){let y=JSON.stringify(h);t.push({tag:"script",key:"script:ldjson:"+Yt(y),attrs:{type:"application/ld+json"},children:y})}}for(let d of e.meta??[]){let h={};for(let[y,p]of Object.entries(d))p!=null&&(h[y==="httpEquiv"?"http-equiv":y]=p);t.push({tag:"meta",key:Pf(h),attrs:h})}for(let d of e.link??[]){let h={};for(let[y,p]of Object.entries(d))p!=null&&(h[y]=p);t.push({tag:"link",key:"link:"+(h.rel??"")+":"+(h.href??Yt(JSON.stringify(h))),attrs:h})}for(let d of e.script??[]){let h={},y;for(let[p,v]of Object.entries(d))v!=null&&(p==="children"?y=v:h[p]=v);t.push({tag:"script",key:"script:"+(h.src??Yt((y??"")+JSON.stringify(h))),attrs:h,children:y})}}function Df(e,t){return typeof e=="function"?e(t):e.includes("%s")?e.replace("%s",t):e}function qf(e){let t=[],r={};for(let s of e.sources){let i=typeof s=="function"?s():s;If(i,t,r)}r.title!==void 0&&t.push({tag:"title",key:"title",children:r.template?Df(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 hn="data-fh",mn="data-fh-key";function Vs(e){for(let t=e.firstChild;t;t=t.nextSibling)if(t.nodeType===8&&t.data.startsWith("fh:")){t.parentNode?.removeChild(t);return}}function Hs(e,t){for(let r of Array.from(e.attributes))r.name===hn||r.name===mn||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 Vf(e){let t=document.createElement(e.tag);return Hs(t,e.attrs),t.setAttribute(hn,""),t.setAttribute(mn,e.key),e.tag==="script"&&e.children!=null&&(t.textContent=e.children),t}function Hf(e,t){let r=document.head,n=new Map;for(let i of Array.from(r.querySelectorAll(`[${hn}]`))){let a=i.getAttribute(mn);i.tagName!=="TITLE"&&a&&n.set(a,i)}let o=null,s=new Set;for(let i of e){if(i.tag==="title"){o=i.children;continue}if(i.tag==="htmlAttr")continue;s.add(i.key);let a=n.get(i.key);a&&a.tagName===i.tag.toUpperCase()?(Hs(a,i.attrs),i.tag==="script"&&(a.textContent??"")!==(i.children??"")&&(a.textContent=i.children??"")):(a&&a.remove(),r.appendChild(Vf(i)))}for(let[i,a]of n)s.has(i)||a.remove();o!=null&&document.title!==o&&(document.title=o);for(let[i,a]of Object.entries(t))document.documentElement.getAttribute(i)!==a&&document.documentElement.setAttribute(i,a)}function Ws(e){return D(t=>(_(()=>{e.version();let{tags:r,htmlAttrs:n}=qf(e);Hf(r,n)}),S(()=>{}),t))}var Wf={};Tf(Wf,{Base:()=>zf,JsonLD:()=>Bf,Link:()=>Ff,Meta:()=>Kf,Script:()=>Uf,Title:()=>jf});function Ye(e){return typeof e=="function"?e():e}function jf(e){return Pe(()=>({title:Ye(e.children)})),null}function Kf(e){return Pe(()=>({meta:[{...e,content:Ye(e.content)}]})),null}function Ff(e){return Pe(()=>{let t={};for(let[r,n]of Object.entries(e))t[r]=Ye(n);return{link:[t]}}),null}function Uf(e){return Pe(()=>{let t={};for(let[r,n]of Object.entries(e))t[r]=Ye(n);return{script:[t]}}),null}function zf(e){return Pe({base:e.href}),null}function Bf(e){return Pe(()=>({jsonLd:Ye(e.data)})),null}function la(e,t){if(!t)throw new Error("Container element not found for mount()");Qr(()=>e(),t)}var fa=e=>w(()=>Te(e));async function da(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=Ds();if(qs(s),Vs(r),o){zi();try{if(t.routes&&t.routes.length){let{preloadRoutes:i}=await Promise.resolve().then(()=>(In(),ua));await i(t.routes,window.location.pathname)}Is(),dn(!0),Ht(fa(e),r),Al()}finally{Bi()}setTimeout(()=>{dn(!1),Gi(r)&&typeof process<"u",Yr(),pn()},100)}else Re(fa(e),r);Ws(s)}function Al(){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)}}In();return va(Sl);})();
|