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