@fluixi/dom 1.0.0-alpha.80 → 1.0.0-alpha.82
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/dom-client.cjs +1 -1
- package/dist/cdn/dom-client.global.js +1 -1
- package/dist/cdn/dom-client.mjs +1 -1
- package/dist/cdn/dom.cjs +1 -1
- package/dist/cdn/dom.global.js +1 -1
- package/dist/cdn/dom.mjs +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.mjs +1 -1
- package/dist/lib/dom/hydration.cjs +1 -1
- package/dist/lib/dom/hydration.mjs +1 -1
- package/dist/lib/dom/index.cjs +1 -1
- package/dist/lib/dom/index.mjs +1 -1
- package/dist/lib/dom/island.cjs +1 -1
- package/dist/lib/dom/island.mjs +1 -1
- package/dist/lib/dom/runtime.cjs +1 -1
- package/dist/lib/dom/runtime.mjs +1 -1
- package/dist/lib/dom/versions.cjs +1 -1
- package/dist/lib/dom/versions.mjs +1 -1
- package/dist/lib/index.cjs +1 -1
- package/dist/lib/index.mjs +1 -1
- package/dist/tsconfig.lib.tsbuildinfo +1 -1
- package/dist/version.generated.cjs +1 -1
- package/dist/version.generated.d.ts +1 -1
- package/dist/version.generated.js +1 -1
- package/dist/version.generated.mjs +1 -1
- package/package.json +3 -3
package/dist/index.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function Fr(e){return e.startsWith("aria-")||e.startsWith("data-")?e:/[A-Z]/.test(e)?e.replace(/([A-Z])/g,"-$1").toLowerCase():e}function Hr(e){return e.startsWith("@")||e.startsWith("on")&&e.length>2}function Vr(e){return e.startsWith("@")?e.slice(1):e.startsWith("on")?e.slice(2).toLowerCase():e}function Wr(e,t){let n=new Set(["checked","value","selected","disabled","readonly","required","multiple","open","contenteditable","draggable","spellcheck"]),r={input:new Set(["value","checked","indeterminate"]),textarea:new Set(["value"]),select:new Set(["value"]),option:new Set(["selected","value"]),audio:new Set(["volume","currentTime","paused"]),video:new Set(["volume","currentTime","paused"]),img:new Set(["src","srcset"]),iframe:new Set(["src"]),a:new Set(["href"])};return n.has(t)||r[e]&&r[e].has(t)}var Ur=new Set(["area","base","br","col","embed","hr","img","input","link","meta","param","source","track","wbr"]),Br=new Set(["svg","g","path","circle","rect","line","polyline","polygon","ellipse","text","tspan","use","defs","symbol","mask","clipPath","pattern","linearGradient","radialGradient","stop","filter","feGaussianBlur","feOffset","feMerge","feMergeNode","foreignObject"]),U="http://www.w3.org/2000/svg";function en(e){return e.localName.includes("-")}function Se(e,t,n,r=!1){if(n==null){e.removeAttribute(t);return}if(en(e)){e[t]=n;return}h(e,t,n,r)}var ve=new Set(["className","value","checked","selected","innerHTML","innerText","textContent","indeterminate","htmlFor"]);function Ze(e,t=document){return t.querySelector(e)}function Kr(e,t=document){return Array.from(t.querySelectorAll(e))}function zr(e,t){return e.closest(t)}function Qe(e,...t){e.classList.add(...t)}function et(e,...t){e.classList.remove(...t)}function tt(e,...t){t.forEach(n=>e.classList.toggle(n))}function Gr(e,t){return e.classList.contains(t)}function h(e,t,n,r=!1){if(n==null||n===!1){e.removeAttribute(t);return}if(n===!0){e.setAttribute(t,"");return}if(typeof n=="object"){e.setAttribute(t,JSON.stringify(n));return}e.setAttribute(t,String(n))}function nt(e,t){return e.getAttribute(t)}function rt(e,t){e.removeAttribute(t)}function Ae(e,t){Object.assign(e.style,t)}function Xr(e,t){return window.getComputedStyle(e).getPropertyValue(t)}function ot(e,t={},...n){let r=document.createElement(e);return Object.entries(t).forEach(([o,i])=>{if(o==="class"||o==="className")r.className=i;else if(o==="style"&&typeof i=="object")Ae(r,i);else if(o.startsWith("on")&&typeof i=="function"){let s=o.slice(2).toLowerCase();r.addEventListener(s,i)}else h(r,o,i)}),n.forEach(o=>{typeof o=="string"?r.appendChild(document.createTextNode(o)):r.appendChild(o)}),r}function it(e){for(;e.firstChild;)e.removeChild(e.firstChild)}function st(e,...t){t.forEach(n=>{typeof n=="string"?e.appendChild(document.createTextNode(n)):e.appendChild(n)})}function Jr(e){let t=e.getBoundingClientRect();return t.top>=0&&t.left>=0&&t.bottom<=window.innerHeight&&t.right<=window.innerWidth}function Yr(e,t={behavior:"smooth",block:"nearest"}){e.scrollIntoView(t)}function Zr(e){let t=e.getBoundingClientRect();return{top:t.top+window.pageYOffset,left:t.left+window.pageXOffset}}function Qr(e,t,n,r){let o=i=>{let s=i.target.closest(n);s&&e.contains(s)&&r(i,s)};return e.addEventListener(t,o),()=>{e.removeEventListener(t,o)}}function eo(e,t=5e3){return new Promise((n,r)=>{let o=Ze(e);if(o){n(o);return}let i=new MutationObserver(()=>{let a=Ze(e);a&&(i.disconnect(),clearTimeout(s),n(a))});i.observe(document.body,{childList:!0,subtree:!0});let s=setTimeout(()=>{i.disconnect(),r(new Error(`Element ${e} not found within ${t}ms`))},t)})}function to(e,t,n={}){let r=new IntersectionObserver(o=>{o.forEach(i=>{t(i.isIntersecting)})},n);return r.observe(e),()=>{r.disconnect()}}function no(e,t){let n=new ResizeObserver(r=>{r.forEach(t)});return n.observe(e),()=>{n.disconnect()}}var tn=typeof Symbol=="function"&&Symbol.for?Symbol.for("react.element"):60103;function ro(e){return typeof e=="object"&&e!==null&&e.$$typeof===tn}function nn(e){return e&&typeof e=="object"&&e.strings&&Array.isArray(e.strings)&&e.values&&Array.isArray(e.values)}function oo(e){if(typeof e!="function")return!1;try{let t=e();return nn(t)}catch{return!1}}function io(e){return typeof e=="object"&&e!==null&&(e.$$typeof==="template"||typeof e.type=="function")}function so(e){return e instanceof Node}function ao(e,t,n="Fluixi"){typeof globalThis<"u"&&(typeof globalThis[n]>"u"&&(globalThis[n]={}),typeof globalThis[n][e]>"u"&&(globalThis[n][e]=t))}function lo(e,t,n="Fluixi"){return typeof globalThis<"u"&&typeof globalThis[n]<"u"&&typeof globalThis[n][e]<"u"?globalThis[n][e]:t}import{isSignal as b}from"@fluixi/reactive/signal";var Ce="1.0.0-alpha.80";import{VERSION as rn}from"@fluixi/reactive/version";var x={dom:Ce,reactive:rn};function on(e){x.core=e}function Re(e){x.core&&e.setAttribute("fluixi",x.core),e.setAttribute("fx-dom",x.dom),e.setAttribute("fx-reactive",x.reactive),typeof globalThis<"u"&&(globalThis.Fluixi=x)}function Me(){let e=[x.core,x.dom,x.reactive].filter(t=>t!==void 0);new Set(e).size<=1||console.warn(`[fluixi] package versions disagree — core ${x.core??"(absent)"}, dom ${x.dom}, reactive ${x.reactive}. These ship as one release, so a mismatch usually means a stale lockfile or two copies resolved side by side. Reinstall, or check for duplicates with \`pnpm why @fluixi/dom\`.`)}function mo(e){return Object.defineProperty(e,Symbol.for("fluixi-router"),{value:!0,enumerable:!0}),e}function go(e){return Object.defineProperty(e,Symbol.for("fluixi-routes"),{value:!0,enumerable:!0}),e}function ho(e){return Object.defineProperty(e,Symbol.for("fluixi-route"),{value:!0,enumerable:!0}),e}function xo(e){return typeof e!="function"||Object.defineProperty(e,Symbol.for("fluixi-outlet"),{value:!0,enumerable:!0}),e}function To(e){return Object.defineProperty(e,Symbol.for("fluixi-provider"),{value:!0,enumerable:!0}),e}function bo(e){return Object.defineProperty(e,Symbol.for("fluixi-context"),{value:!0,enumerable:!0}),e}function at(e){return typeof e!="function"||Object.defineProperty(e,Symbol.for("fluixi-component"),{value:!0,enumerable:!0}),e}function Eo(e){return Object.defineProperty(e,Symbol.for("fluixi-suspense"),{value:!0,enumerable:!0}),e}function sn(e){return typeof e=="function"&&e[Symbol.for("fluixi-router")]===!0}function an(e){return typeof e=="function"&&e[Symbol.for("fluixi-routes")]===!0}function ln(e){return typeof e=="function"&&e[Symbol.for("fluixi-route")]===!0}function cn(e){return typeof e=="function"&&e[Symbol.for("fluixi-outlet")]===!0}function un(e){return typeof e=="function"&&e[Symbol.for("fluixi-provider")]===!0}function fn(e){return typeof e=="function"&&e[Symbol.for("fluixi-context")]===!0}function N(e){return typeof e=="function"&&e[Symbol.for("fluixi-component")]===!0}function dn(e){return typeof e=="function"&&e[Symbol.for("fluixi-suspense")]===!0}function wo(e){return sn(e)?{type:"router",value:e}:ln(e)?{type:"route",value:e}:an(e)?{type:"routes",value:e}:cn(e)?{type:"outlet",value:e}:N(e)?{type:"component",value:e}:dn(e)?{type:"suspense",value:e}:un(e)?{type:"provider",value:e}:fn(e)?{type:"context",value:e}:{type:"none",value:e}}import{batch as dt,createEffect as z,createRenderEffect as m,createRoot as mn,onCleanup as O,readChildren as gn}from"@fluixi/reactive/signal";var g=typeof document>"u";function _(e){g=e}var B=Symbol.for("fluixi.server-node"),Pe=null;function lt(e){Pe=e}function $(){if(!Pe)throw new Error("[fluixi] server render ran before @fluixi/dom/server loaded");return Pe}function I(e){return e!=null&&e[B]===!0?!0:typeof Node<"u"&&e instanceof Node}function Oe(e){return e!=null&&e[B]===!0?e.nodeType===1:typeof Element<"u"&&e instanceof Element}function Le(e){return e!=null&&e[B]===!0?e.nodeType===3:typeof Text<"u"&&e instanceof Text}var u={active:!1,cursor:null,parents:[]},ct=null;function ut(e){ct=e}function ee(){return ct}function ke(e,t){return u.active&&t.parentNode===e}function De(e){let t=u.parents.lastIndexOf(e);t!==-1&&(u.parents.length=t),u.cursor=e.nextSibling}function pn(){return u.active?u.cursor:null}function te(e,t){if(!e||e.parentNode==null)return t();let n=u.active,r=u.cursor,o=u.parents;u.active=!0,u.cursor=e,u.parents=[];try{return t()}finally{u.active=n,u.cursor=r,u.parents=o}}function yn(e){if(!u.active)return e();let t=u.cursor,n=u.parents;u.active=!1,u.parents=[];try{return e()}finally{u.active=!0,u.cursor=t,u.parents=n}}function K(e){if(!u.active||e==null)return;let t=Array.isArray(e)?e[e.length-1]:e;t&&typeof t.nodeType=="number"&&De(t)}function hn(e){let t=[];for(;e&&e.nodeType===1;){let n=e.tagName.toLowerCase();if(e.id){n+=`#${e.id}`,t.unshift(n);break}e.getAttribute("data-id")&&(n+=`[data-id="${e.getAttribute("data-id")}"]`);let r=0,o=e;for(;o=o.previousElementSibling;)o.tagName===e.tagName&&r++;n+=`:nth-of-type(${r+1})`,t.unshift(n),e=e.parentElement}return t.join(">")}function xn(e){let t=0;for(let n=0;n<e.length;n++)t=(t<<5)-t+e.charCodeAt(n),t|=0;return`el_${Math.abs(t)}`}function Do(e){return xn(hn(e))}var _o=()=>"xxyxxxxxxy-4xx8".replace(/[xy]/g,function(e){let t=Math.random()*16|0;return(e==="x"?t:t&3|8).toString(16)}),Tn={};var ft=new Map,re=new Set,le=new Set(["scroll","focus","blur","load","error","resize","mouseenter","mouseleave","pointerenter","pointerleave","gotpointercapture","lostpointercapture"]);function ce(e){if(!g)for(let t of e)re.has(t)||le.has(t)||(re.add(t),document.addEventListener(t,bn))}function bn(e){let t=`$$${e.type}`,n=e.composedPath&&e.composedPath()[0]||e.target;for(;n;){let r=n[t];if(r&&!n.disabled&&(r(e),e.cancelBubble))return;n=n.host&&n.host!==n&&n.host instanceof Element?n.host:n.parentNode}}function _e(e,t,n){if(e[`$$${t}`]=n,le.has(t)){let r=`__fx_${t}`;if(!e[r]){let o=i=>{e[`$$${t}`]?.(i)};e.addEventListener(t,o),e[r]=o}return}re.has(t)||ce([t])}function oe(e,t){delete e[`$$${t}`];let n=`__fx_${t}`,r=e[n];r&&(e.removeEventListener(t,r),delete e[n])}function $o(e){return!le.has(e)}function Io(e){return typeof e=="function"}function R(e,t=!1){if(g)return $().createText(e);if(u.active&&!t){let n=ee()?.hydrateText(e);if(n)return n}return document.createTextNode(e)}function ue(e,t=!1){if(g)return $().createElement(e,t);if(u.active){let n=ee()?.hydrateElement(e);if(n)return n}return t?document.createElementNS(U,e):document.createElement(e)}function $e(e,t=!1){let n=ft.get(e);if(n)return n;let r=document.createElement("template");return t?r.innerHTML=`<svg>${e}</svg>`:r.innerHTML=e,ft.set(e,r),r}function pt(e,t,n=!1,r=!1){if(g){let o=$();return n?o.parseTemplate(e,r):o.createRaw(e)}if(u.active){let o=ee()?.hydrateStatic(t);if(o)return o}return Ie($e(e,r),r).firstChild}function yt(e,t){if(!u.active)return t();let n=te(e.nextSibling,t);if(typeof n=="function"){let r=n;return((...o)=>u.active?te(e.nextSibling,()=>r(...o)):r(...o))}return n}function mt(e){for(let t=e.nextSibling;t;t=t.nextSibling)if(t.nodeType===8&&t.data==="fx/")return t;throw new Error("[fluixi] template hole is missing its closing marker")}function gt(e,t){let n=[];for(let r=e.nextSibling;r&&r!==t;r=r.nextSibling)n.push(r);return n}function Ie(e,t=!1){let n=e.content.cloneNode(!0);return t?n.firstChild:n}function En(e){return Array.isArray(e)?e.length===2&&e[1]===" "?Array.isArray(e[0])?En(e[0]):(typeof e[0]=="function",e[0]):e.length===1&&typeof e[0]=="function"?e[0]:e:e}function qo(e){return typeof e!="function"?null:e._name||e.name||"anonymous"}function jo(e){if(b(e)||N(e)||typeof e!="function")return e;let t=e();for(;typeof t=="function"&&!b(t)&&!N(t);)t=t();return t}var A=0,wn=200;function Nn(e,t,n,r,o){let i=r,s=new Map;return m(()=>{let a;if(N(e)&&!b(e)){if(!s.has(e)){A++;try{let l=e();s.set(e,l)}finally{A--}}for(a=s.get(e);typeof a=="function"&&b(a);)a=a()}else for(a=e();typeof a=="function"&&b(a);)a=a();{let l=0;for(;typeof a=="function"&&l++<50;)if(N(a)){if(!s.has(a)){let c=a;A++;try{let f=c();s.set(c,f)}finally{A--}}a=s.get(a)}else if(b(a))a=a();else if(a=a(),typeof a!="function"||!b(a)&&!N(a))break}A++;try{i=ie(t,a,n,i,s),o(i)}finally{A--}})}function E(e,t,n,r){if(A>wn)return console.error("[insert] Exceeded max call depth — possible infinite loop."),()=>null;n!==void 0&&!n&&(n=R("",!0),e.appendChild(n));let o=r??null,i=l=>Array.isArray(l)&&l.some(c=>typeof c=="function"),s=l=>typeof l=="function"?l:()=>l;if(typeof t!="function"&&!i(t)){A++;try{o=ie(e,t,n,o)}finally{A--}return()=>o}let a=Nn(s(t),e,n,o,l=>{o=l});return()=>(a?.(),o)}function ie(e,t,n,r,o){if(t==null||typeof t=="boolean")return P(e,r,n);if(typeof t=="function")for(;typeof t=="function";)t=t();if(t==null||typeof t=="boolean")return P(e,r,n);if(ne(t)){let s=R("",!0);return Array.isArray(r)?r.length>0?(e.replaceChild(s,r[0]),P(e,r.slice(1),n)):T(e,s,n):r?e.replaceChild(s,r):T(e,s,n),t.then(a=>{s.parentNode===e&&ie(e,a,s.nextSibling,s)}).catch(a=>{console.error("Error resolving promise in insertExpression:",a)}),s}let i=typeof t;if(i==="string"||i==="number"){if(i==="number"&&(t=String(t)),Array.isArray(r)){if(r.length===0){let a=R(t);return T(e,a,n),a}if(r.length===1&&r[0].nodeType===3)return r[0].data=t,r;r=P(e,r,n)}if(r&&Le(r))return r.data=t,r;let s=R(t);return r&&r.parentNode===e?e.replaceChild(s,r):ke(e,s)||T(e,s,n),s}if(I(t))return ke(e,t)?(De(t),t):Array.isArray(r)?(r.length===0?T(e,t,n):r[0].parentNode===e?(e.replaceChild(t,r[0]),P(e,r.slice(1),n)):T(e,t,n),t):(r?r!==t&&(r.parentNode===e?e.replaceChild(t,r):T(e,t,n)):T(e,t,n),t);if(Array.isArray(t)){let s=[],a=Array.isArray(r)?r:r?[r]:[],l=[];v(t,s,e,n,!0,o,l);let c=Sn(e,a,s,n);for(let f of l){let d=E(e,f.sig,f.marker);O(()=>{P(e,d()),f.marker.parentNode===e&&e.removeChild(f.marker)})}return c}if(i==="object"&&t!==null&&typeof t=="object"){let s=t;if("type"in s&&"props"in s){let a=s;if(typeof a.type=="function"){let l=a.type(a.props||{});return ie(e,l,n,r)}}}return P(e,r,n)}function v(e,t,n,r,o=!0,i,s){for(let a=0;a<e.length;a++){let l=e[a];if(!(l==null||typeof l=="boolean")){for(;typeof l=="function"&&!ne(l)&&!b(l)&&!N(l)&&(l=l(),!(l==null||typeof l=="boolean")););if(!(l==null||typeof l=="boolean")){if(typeof l=="function"){let c;for(N(l)&&!b(l)?(i||(i=new Map),i.has(l)||i.set(l,l()),c=i.get(l)):c=l();typeof c=="function"&&!ne(c)&&!b(c)&&!N(c);)i||(i=new Map),i.has(c)||i.set(c,c()),c=i.get(c);if(c==null||typeof c=="boolean")continue;if(typeof c=="function"){if(b(c)){if(s){let d=R("",!0);t.push(d),s.push({marker:d,sig:c});continue}let f=c();for(;typeof f=="function"&&b(f);)f=f();if(f==null||typeof f=="boolean")continue;Array.isArray(f)?v(f,t,n,r,o,i):v([f],t,n,r,o,i);continue}continue}Array.isArray(c)?v(c,t,n,r,o,i,s):v([c],t,n,r,o,i,s);continue}if(ne(l)){let c=R("",!0);t.push(c),l.then(f=>{if(c.parentNode){let d=[];if(v([f],d,c.parentNode,void 0,!1,i),d.length>0){c.parentNode.replaceChild(d[0],c);for(let p=1;p<d.length;p++)c.parentNode?.insertBefore(d[p],d[p-1].nextSibling)}}}).catch(f=>console.error("Error resolving promise in array:",f));continue}if(Array.isArray(l)){v(l,t,n,r,o,i,s);continue}if(I(l)){t.push(l);continue}if(typeof l=="object"&&l!==null&&"type"in l&&"props"in l){let c=l;if(typeof c.type=="function"){let f=c.type(c.props||{});Array.isArray(f)?v(f,t,n,r,!1,i):v([f],t,n,r,!1,i);continue}}if(typeof l=="string"||typeof l=="number"){let c=String(l);if(c.trim()===""&&c!==" ")continue;t.push(R(c));continue}t.push(R(String(l)))}}}}function Sn(e,t,n,r){for(let d=0;d<n.length;d++){let p=n[d].parentNode;p!==null&&p!==e&&p.nodeType!==11&&(n=n.slice(),n[d]=n[d].cloneNode(!0))}let o=n.length,i=t.length,s=o,a=0,l=0,c=i>0?t[i-1].nextSibling??void 0:r,f=null;for(;a<i||l<s;){if(t[a]===n[l]){a++,l++;continue}for(;i>a&&s>l&&t[i-1]===n[s-1];)i--,s--;if(i===a){let d=s<o?l?n[l-1].nextSibling??void 0:n[s-l]:c;for(;l<s;)T(e,n[l++],d)}else if(s===l)for(;a<i;)(!f||!f.has(t[a]))&&t[a].parentNode===e&&e.removeChild(t[a]),a++;else if(t[a]===n[s-1]&&n[l]===t[i-1]){let d=t[--i].nextSibling;T(e,n[l++],t[a++].nextSibling),T(e,n[--s],d),t[i]=t[a-1]}else{if(!f){f=new Map;let p=l;for(;p<s;)f.set(n[p],p++)}let d=f.get(t[a]);if(d!=null)if(l<d&&d<s){let p=a,y=1;for(;++p<i&&p<s&&!(!f.has(t[p])||f.get(t[p])!==d+y);)y++;if(y>d-l){let we=t[a];for(;l<d;)T(e,n[l++],we)}else t[a].parentNode===e?e.replaceChild(n[l++],t[a++]):(T(e,n[l++],c),a++)}else a++;else t[a].parentNode===e&&e.removeChild(t[a]),a++}}return n}function P(e,t,n){if(t)if(Array.isArray(t))for(let r=0;r<t.length;r++)t[r].parentNode===e&&e.removeChild(t[r]);else t.parentNode===e&&e.removeChild(t);return null}function T(e,t,n){u.active&&t.parentNode===e||(n&&n.parentNode===e?e.insertBefore(t,n):e.appendChild(t))}function q(e,t,n){n==null?delete e[t]:e[t]=n}function ht(e,t,n){let r=n,o;return Array.isArray(n)&&(r=n[0],o=n[1]),typeof r!="function"?()=>{}:(e.addEventListener(t,r,o),()=>e.removeEventListener(t,r,o))}function xt(e,t){let n=(r,o)=>{typeof r=="function"&&r(e,o??(()=>{}))};if(typeof t=="function"){n(t);return}if(Array.isArray(t)){if(typeof t[0]=="function"){n(t[0],t[1]);return}for(let r of t)Array.isArray(r)?n(r[0],r[1]):n(r)}}function G(e,t,n,r=!1){return typeof n!="function"?(h(e,t,n,r),()=>{}):m(()=>{let o=typeof n=="function"?n():n;h(e,t,o,r)})}function X(e,t,n){return typeof n!="function"?(q(e,t,n),()=>{}):m(()=>{let r=typeof n=="function"?n():n;q(e,t,r)})}function Tt(e,t,n){return typeof n!="function"?(h(e,t,!!n),()=>{}):m(()=>{let r=n();h(e,t,!!r)})}function j(e,t){if(t==null){e.removeAttribute("class");return}if(typeof t=="function"){m(()=>j(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 n=Object.keys(t).filter(r=>{let o=t[r];return typeof o=="function"?o():!!o}).join(" ");e.setAttribute("class",n);return}e.setAttribute("class",String(t))}function se(e,t,n){if(!(!t||typeof t!="object"))for(let r in t){let o=t[r],i=r.split(/\s+/).filter(Boolean);if(typeof o=="function"&&n)n.push(m(()=>{let s=!!o();for(let a of i)e.classList.toggle(a,s)}));else{let s=!!(typeof o=="function"?o():o);for(let a of i)e.classList.toggle(a,s)}}}function ae(e,t){let n=t;for(;typeof n=="function";)n=n();if(n==null){e.removeAttribute("style");return}if(typeof n=="string"){e.style.cssText=n;return}if(typeof n=="object")for(let r in n){let o=n[r];o==null?e.style[r]="":e.style[r]=o}}function bt(e){let{element:t,props:n,prevProps:r=Tn,isSVG:o=!1,skipChildren:i=!1}=e;if(!t||!Oe(t))return console.error("[spread] Error: element is not a DOM Element!"),()=>{};if(!n)return console.warn("[spread] Warning: props is undefined!"),()=>{};let s=o||t.namespaceURI===U,a=[];for(let l in n){if(i&&l==="children")continue;let c=n[l],f=r[l];if(c===f)continue;if(l==="ref"){F(c,t);continue}if(l==="use"){xt(t,c);continue}if(l.startsWith("on:")){a.push(ht(t,l.slice(3),c));continue}if(l.startsWith("prop:")){a.push(X(t,l.slice(5),c));continue}if(l.startsWith("attr:")){a.push(G(t,l.slice(5),c,s));continue}if(l.startsWith("bool:")){a.push(Tt(t,l.slice(5),c));continue}if(l==="class"||l==="className"){typeof c=="function"?a.push(m(()=>j(t,c()))):j(t,c);continue}if(l==="classList"){typeof c=="function"?a.push(m(()=>se(t,c()))):se(t,c,a);continue}if(l==="style"){typeof c=="function"?a.push(m(()=>ae(t,c()))):ae(t,c);continue}if(l.startsWith("on")){let p=l.slice(2).toLowerCase();f&&oe(t,p),c&&_e(t,p,c);continue}let d=ve.has(l)||!s&&l in t;typeof c=="function"?a.push(d?X(t,l,c):G(t,l,c,s)):a.push(m(()=>d?q(t,l,n[l]):h(t,l,n[l],s)))}for(let l in r)if(!(l in n))if(l.startsWith("on")){let c=l.slice(2).toLowerCase();oe(t,c)}else ve.has(l)?q(t,l,null):t.removeAttribute(l);return()=>{a.forEach(l=>l())}}function fe(e,t,n=!1){for(let r in t){let o=t[r];if(r==="ref"){F(o,e);continue}if(r!=="children"){if(r==="use"){xt(e,o);continue}if(r.startsWith("on:")){ht(e,r.slice(3),o);continue}if(r.startsWith("prop:")){X(e,r.slice(5),o);continue}if(r.startsWith("attr:")){G(e,r.slice(5),o,n);continue}if(r.startsWith("bool:")){Tt(e,r.slice(5),o);continue}if(r.startsWith("on")&&r.length>2){let i=r.slice(2).toLowerCase();if(typeof o=="function")if(le.has(i)){e[`$$${i}`]=o;let s=`__fx_${i}`;if(!e[s]){let a=l=>{e[`$$${i}`]?.(l)};e.addEventListener(i,a),e[s]=a}}else e[`$$${i}`]=o,re.has(i)||ce([i]);continue}if(r==="class"||r==="className"){j(e,o);continue}if(r==="classList"){typeof o=="function"?m(()=>se(e,o())):se(e,o);continue}if(r==="style"){typeof o=="function"?m(()=>ae(e,o())):ae(e,o);continue}if(r==="innerHTML"){if(typeof o=="function"){let i=z(()=>{let s=o();for(;typeof s=="function";)s=s();e.innerHTML=s});O(()=>i())}else e.innerHTML=o;continue}if(r==="value"&&(e.tagName==="INPUT"||e.tagName==="TEXTAREA")){if(typeof o=="function"){let i=z(()=>{let s=o();for(;typeof s=="function"&&s.length===0;)s=s();document.activeElement!==e&&(e.value=s??"")});O(()=>{i()})}else m(()=>{document.activeElement!==e&&(e.value=t[r]??"")});continue}if(r==="checked"&&e.tagName==="INPUT"){if(typeof o=="function"){let i=z(()=>{let s=o();for(;typeof s=="function"&&s.length===0;)s=s();document.activeElement!==e&&(e.checked=s??"")});O(()=>{i()})}else m(()=>{document.activeElement!==e&&(e.checked=t[r]??"")});continue}if(r==="value"&&e.tagName==="SELECT"){if(typeof o=="function"){let i=!0,s=z(()=>{let a=o();for(;typeof a=="function"&&a.length===0;)a=a();i?(i=!1,queueMicrotask(()=>{e.value=a??""})):e.value=a??""});O(()=>{s()})}else{let i=!0;m(()=>{let s=t[r];i?(i=!1,queueMicrotask(()=>{e.value=s??""})):e.value=s??""})}continue}if(typeof o=="function"){let i=z(()=>{let s=o();for(;typeof s=="function"&&s.length===0;)s=s();Se(e,r,s,n)});O(()=>{i()})}else m(()=>Se(e,r,t[r],n))}}}function Et(...e){let t=r=>{for(let o=e.length-1;o>=0;o--){let i=e[o];if(i&&r in i&&i[r]!==void 0)return i[r]}},n=r=>{for(let o of e)if(o&&r in o)return!0;return!1};return new Proxy({},{get:(r,o)=>t(o),has:(r,o)=>n(o),ownKeys:()=>{let r=new Set;for(let o of e)if(o)for(let i of Reflect.ownKeys(o))r.add(i);return[...r]},getOwnPropertyDescriptor:(r,o)=>n(o)?{enumerable:!0,configurable:!0,get:()=>t(o)}:void 0})}function Fo(e,...t){let n=new Set;for(let s of t)for(let a of s)n.add(a);let r=s=>({enumerable:!0,configurable:!0,get:()=>e[s]}),o=t.map(s=>{let a=new Set(s);return new Proxy({},{get:(l,c)=>a.has(c)?e[c]:void 0,has:(l,c)=>a.has(c)&&c in e,ownKeys:()=>Array.from(a).filter(l=>l in e),getOwnPropertyDescriptor:(l,c)=>a.has(c)&&c in e?r(c):void 0})}),i=new Proxy({},{get:(s,a)=>n.has(a)?void 0:e[a],has:(s,a)=>!n.has(a)&&a in e,ownKeys:()=>Reflect.ownKeys(e).filter(s=>!n.has(s)),getOwnPropertyDescriptor:(s,a)=>!n.has(a)&&a in e?r(a):void 0});return[...o,i]}function F(e,t){if(e){if(I(e)){let n=t,r=e;if(!n)return;typeof n=="function"?n(r):typeof n=="object"&&"current"in n&&(n.current=r);return}typeof e=="function"?e(t):typeof e=="object"&&"current"in e&&(e.current=t)}}function wt(e,t,n){let r=t||document.body,o=gn(()=>e),i=[];return dt(()=>{let s=m(()=>{let a=o();Array.isArray(a)?(a.forEach(l=>r.appendChild(l)),i.push(()=>{a.forEach(l=>{l.parentNode===r&&r.removeChild(l)})})):I(a)&&(r.appendChild(a),i.push(()=>{a.parentNode===r&&r.removeChild(a)}))});i.push(s),O(()=>{i.forEach(a=>a())})}),null}function Ho(e){return typeof e=="string"&&e.toLowerCase()===e}function Nt(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 Vo(e){return e.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")}function ne(e){return e!=null&&(typeof e=="object"||typeof e=="function")&&typeof e.then=="function"||e instanceof Promise}function Wo(e){return typeof e=="function"&&e.length===0&&b(e)}function de(e,t,n){if(!t)throw new Error("Container element is required");let r,o,i=[];return mn(s=>{dt(()=>{u.active||(t.textContent=""),Re(t),Me(),E(t,e)}),o=s}),()=>{o?.(),r?.(),i.forEach(s=>s()),t.textContent=""}}function St(e){if(Array.isArray(e))return e;if(typeof e=="function"&&typeof e.set=="function")return[e,e.set];throw new TypeError("[fluixi] bind: needs a signal — either `signal(…)` or the `[get, set]` pair from `createSignal(…)`.")}import{untrack as vn,isSignal as An}from"@fluixi/reactive";var Cn="__fx_dom_create_component__",L=globalThis[Cn]??={fn:null};function zo(e){L.fn=e}function Go(e={}){let t=e.signalSystem?.createComponent;t&&(L.fn=t)}function pe(e,t){if(L.fn)return L.fn(e,t);let n=typeof e=="function"?vn(()=>e(t)):e;if(n!=null&&(typeof n=="function"||typeof n=="object")&&!An(n)){try{n.$name=e?.name}catch{}return at(n)}return n}var Xo=()=>L.fn!==null,vt=()=>L.fn!==null;function At(){L.fn=null}var ye,Rt={getStore:()=>ye,run(e,t){let n=ye;ye=e;try{return t()}finally{ye=n}}},qe=Rt;function Mt(e){qe=e??Rt}function J(e={}){e.locals||(e.locals=e.request?Fe(e.request):{});let t=0,n=0,r=null,o=new Map,i=new Map;return{event:e,routeData:new Map,matchedRoute:new Map,nextId:()=>`s${t++}`,nextResourceId:()=>{if(r===null)return`r${n++}`;let s=o.get(r)??0;return o.set(r,s+1),`${r}:r${s}`},nextIslandNamespace:s=>{let a=i.get(s)??0;return i.set(s,a+1),`${s}#${a}`},withResourceScope(s,a){let l=r;r=s;try{return a()}finally{r=l}},pending:new Set,data:new Map}}function Y(e,t){return qe.run(e,t)}function C(){return qe.getStore()}function je(){return C()?.event}function Pt(){let e=je();return e?(e.locals||(e.locals={}),e.locals):{}}var Ct=new WeakMap;function Fe(e){let t=Ct.get(e);return t||(t={},Ct.set(e,t)),t}import{setResourceIdSource as Rn,setServerDataGetter as Mn}from"@fluixi/reactive/signal";var Z="__FX_DATA__";function me(e){return e.replace(/[<>&\u2028\u2029]/g,t=>"\\u"+t.charCodeAt(0).toString(16).padStart(4,"0"))}var He;function ge(){let e=globalThis.__FX_DATA__;if(e)return e;if(He!==void 0)return He;let t=null;if(typeof document<"u"){let n=document.getElementById(Z)?.textContent;if(n)try{t=JSON.parse(n)}catch{t=null}}return He=t}function he(){for(;;){for(;u.cursor&&u.cursor.nodeType===3&&u.cursor.data==="";)u.cursor=u.cursor.nextSibling;if(u.cursor!=null||!u.parents.length)return;u.cursor=u.parents.pop().nextSibling}}var Pn=new Set(["area","base","br","col","embed","hr","img","input","link","meta","param","source","track","wbr"]),xe=typeof process<"u"&&process.env&&!1;function Te(e,t){let n=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 ${n}. 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 On(e){he();let t=u.cursor;return t&&t.nodeType===1&&t.tagName.toLowerCase()===e.toLowerCase()?(Pn.has(e.toLowerCase())?u.cursor=t.nextSibling:(u.parents.push(t),u.cursor=t.firstChild),t):(xe&&t&&Te(`<${e}>`,t),null)}function Ln(e){he();let t=u.cursor;return t&&t.nodeType===1&&t.tagName.toLowerCase()===e.toLowerCase()?(u.cursor=t.nextSibling,t):(xe&&t&&Te(`<${e}> (static)`,t),null)}function kn(e){if(e===""){let n=u.cursor;return n&&n.nodeType===3&&n.data!==""?(u.cursor=n.nextSibling,n.data="",n):null}he();let t=u.cursor;return t&&t.nodeType===3?(u.cursor=t.nextSibling,t.nodeValue!==e&&(t.nodeValue=e),t):(xe&&t&&Te(`text ${JSON.stringify(e.slice(0,24))}`,t),null)}function Dn(e){he();let t=u.cursor;return t&&t.nodeType===8&&t.data===e?(u.cursor=t.nextSibling,t):(xe&&t&&Te(`marker <!--${e.slice(0,24)}-->`,t),null)}var Ot=!1;function _n(){Ot||(Ot=!0,ut({hydrateElement:On,hydrateText:kn,hydrateMarker:Dn,hydrateStatic:Ln}))}function Q(e,t,n){_n(),u.active=!0,u.cursor=t.firstChild,u.parents=[];let r=ge(),o=n?.resourceNamespace,i=0;Rn(()=>o?`${o}:r${i++}`:`r${i++}`),Mn(r?s=>s in r?{value:r[s]}:void 0:null);try{return de(e,t)}finally{u.active=!1,u.cursor=null,u.parents=[]}}var Ve="fluixi-island";function $n(e){let{component:t,props:n={},name:r}=e,o=ue(Ve),i=r??t.name??"Island";h(o,"name",i),h(o,"props",JSON.stringify(n??{}));let s=g?C():void 0;if(s){let a=s.nextIslandNamespace(i);E(o,()=>s.withResourceScope(a,()=>t(n)))}else E(o,()=>t(n));return o}var Lt=!1;function In(){if(Lt||typeof document>"u")return;Lt=!0;let e=document.createElement("style");e.textContent=`${Ve}{display:contents}`,document.head.appendChild(e)}function qn(e){if(typeof document>"u")return;In();let t=document.querySelectorAll(Ve),n=new Map;t.forEach(r=>{let o=r.getAttribute("name")??"",i=n.get(o)??0;n.set(o,i+1);let s=e[o];if(!s){typeof process>"u"&&console.warn(`[fluixi] island "${o}" has no component in the registry — left static.`);return}let a={};try{a=JSON.parse(r.getAttribute("props")||"{}")}catch{}Q(()=>s(a),r,{resourceNamespace:`${o}#${i}`})})}function jn(e,...t){throw new Error("html`` was not compiled — enable the lit format: fluixi({ format: 'lit' }).")}function Fn(e,...t){throw new Error("svg`` was not compiled — enable the lit format: fluixi({ format: 'lit' }).")}import{readChildren as Hn}from"@fluixi/reactive/signal";function Si(e,t={}){if(typeof e=="function")return pe(e,t);if(typeof e!="string"||e.length===0)return null;let n=Nt(e);if(g)return $().createElement(e,n);let r=n?document.createElementNS(U,e):document.createElement(e);return fe(r,t,n),Vn(r,t),r}function Vn(e,t){if(!t||t.children===void 0)return;let n=Hn(()=>t.children),r=o=>{E(e,o,typeof o=="function"?null:void 0)};Array.isArray(n)?n.forEach(r):r(n)}import{createChildOwner as Wn,createMemo as We,disposeScope as Un,getOwner as Bn,runWithOwner as Kn,untrack as $t}from"@fluixi/reactive/signal";function kt(e){return typeof e=="function"?e:(()=>e)}function M(e){return()=>{let t=e();return typeof t=="function"?t():t}}function Dt(e){return e!=null&&e!==!1}function _t(e){return!e||typeof e!="object"?!1:!!(typeof e._$litType$<"u"||typeof e._$litDirective$<"u"||Array.isArray(e.strings)&&Array.isArray(e.values))}function zn(e){let t=M(()=>e.when),n=We(t,void 0),r=We(n,void 0),o=Bn(),i=null,s=null,a=l=>{l!==s&&(i&&Un(i),i=Wn(o),s=l)};return We(()=>{let l=r();return a(l?"when":"fallback"),Kn(i,()=>{if(l){let c=e.children;return typeof c=="function"&&!_t(c)?typeof n=="function"?$t(()=>$t(n)?c(n()):e.fallback):c(n):c}return e.fallback});return e.fallback??null},void 0,{name:"show"})}import{mapArray as Gn,keyArray as Xn}from"@fluixi/reactive/signal";function Jn(e){let t=M(()=>e.each),n=()=>e.fallback??null,r=(o,i)=>{let s=e.children,a=Array.isArray(s)?s.map(l=>typeof l=="function"?l(o,i):l):typeof s=="function"?s(o,i):s;return K(a),a};return e.by?Xn(t,e.by,(o,i)=>r(o,i),{fallback:n}):Gn(t,(o,i)=>r(o,i),{fallback:n})}import{indexArray as Yn}from"@fluixi/reactive/signal";function Zn(e){let t=M(()=>e.each);return Yn(t,(n,r)=>{let o=e.children(n,r);return K(o),o},{fallback:()=>e.fallback??null})}import{mapArray as bs,keyArray as Es,indexArray as ws}from"@fluixi/reactive/signal";import{createMemo as Qn,createChildOwner as er,disposeScope as tr,getOwner as nr,runWithOwner as It}from"@fluixi/reactive/signal";var Ue=Symbol("match");function rr(e){return{[Ue]:!0,when:M(()=>e.when),get children(){return e.children}}}function or(e){let t=Array.isArray(e.children)?e.children:[e.children],n=nr(),r=null,o=-1,i=s=>{s!==o&&(r&&tr(r),r=er(n),o=s)};return Qn(()=>{for(let s=0;s<t.length;s+=1){let l=t[s],c=0;for(;typeof l=="function"&&!l[Ue]&&c++<10;)l=l();if(!l||typeof l!="object"||l[Ue]!==!0)continue;let f=l.when();if(Dt(f))return i(s),It(r,()=>typeof l.children=="function"?l.children(f):l.children)}return i(-2),It(r,()=>e.fallback??null)})}import{createMemo as ir,createChildOwner as sr,disposeScope as ar,getOwner as lr,runWithOwner as cr}from"@fluixi/reactive/signal";function ur(e){let t=kt(e.component),{component:n,...r}=e,o=lr(),i=null,s;return ir(()=>{let a=t();return a!==s&&(i&&ar(i),i=sr(o),s=a),a==null?null:typeof a=="string"?{tag:a,props:r}:cr(i,()=>a(r))})}import{createRoot as fr,onCleanup as dr}from"@fluixi/reactive/signal";function pr(e){let t=()=>e.mount?typeof e.mount=="function"?e.mount():e.mount:document.body,n,r;return fr(o=>{n=o,r=document.createElement("div"),r.style.display="contents",t().appendChild(r),E(r,e.children)&&F(e.ref,r)}),dr(()=>{n(),r.remove()}),null}import{createMemo as yr,createSignal as mr}from"@fluixi/reactive/signal";function qt(e){if(g)return e.fallback??null;let t=u.active,[n,r]=mr(!t);return t&&queueMicrotask(()=>r(!0)),yr(()=>n()?e.children:e.fallback??null,void 0,{name:"client-only"})}var gr=qt;import{createMemo as hr,createSignal as xr}from"@fluixi/reactive/signal";function Tr(e){let[t,n]=xr(null),r=()=>n(null);return hr(()=>{let o=t();if(o!==null)return typeof e.fallback=="function"?e.fallback(o,r):e.fallback;try{return typeof e.children=="function"?e.children():e.children}catch(i){return n(i),typeof e.fallback=="function"?e.fallback(i,r):e.fallback}})}import{createMemo as br}from"@fluixi/reactive/signal";function Er(e){return br(()=>{let t=typeof e=="function"?e():e,n=[];for(let[r,o]of Object.entries(t)){if(!r)continue;(typeof o=="function"?o():o)&&n.push(r)}return n.join(" ")})}import{createMemo as wr}from"@fluixi/reactive/signal";function Nr(e){return e.startsWith("--")?e:e.replace(/[A-Z]/g,t=>`-${t.toLowerCase()}`)}function Sr(e){return wr(()=>{let t=typeof e=="function"?e():e,n=[];for(let[r,o]of Object.entries(t)){if(!r)continue;let i=typeof o=="function"?o():o;i!=null&&n.push(`${Nr(r)}: ${i}`)}return n.join("; ")})}var Ee=1,ze=3,Ge=8,jt;jt=B;var H=class{constructor(){this[jt]=!0;this.parentNode=null;this.childNodes=[]}get firstChild(){return this.childNodes[0]??null}get lastChild(){return this.childNodes[this.childNodes.length-1]??null}get nextSibling(){let t=this.parentNode;if(!t)return null;let n=t.childNodes.indexOf(this);return n>=0?t.childNodes[n+1]??null:null}get previousSibling(){let t=this.parentNode;if(!t)return null;let n=t.childNodes.indexOf(this);return n>0?t.childNodes[n-1]??null:null}get parentElement(){return this.parentNode}appendChild(t){return t.parentNode&&t.parentNode.removeChild(t),t.parentNode=this,this.childNodes.push(t),t}insertBefore(t,n){if(n==null)return this.appendChild(t);t.parentNode&&t.parentNode.removeChild(t);let r=this.childNodes.indexOf(n);return t.parentNode=this,r<0?this.childNodes.push(t):this.childNodes.splice(r,0,t),t}removeChild(t){let n=this.childNodes.indexOf(t);return n>=0&&this.childNodes.splice(n,1),t.parentNode=null,t}replaceChild(t,n){let r=this.childNodes.indexOf(n);return r>=0&&(t.parentNode&&t.parentNode.removeChild(t),t.parentNode=this,this.childNodes[r]=t,n.parentNode=null),n}addEventListener(){}removeEventListener(){}},k=class e extends H{constructor(n){super();this.nodeType=ze;this.data=n}get nodeValue(){return this.data}set nodeValue(n){this.data=n==null?"":String(n)}get textContent(){return this.data}set textContent(n){this.data=n==null?"":String(n)}cloneNode(){return new e(this.data)}},be=class e extends H{constructor(n){super();this.nodeType=Ee;this.rawOuterHTML=n}get textContent(){return this.rawOuterHTML.replace(/<[^>]*>/g,"")}cloneNode(){return new e(this.rawOuterHTML)}},V=class e extends H{constructor(n){super();this.nodeType=Ge;this.data=n}get nodeValue(){return this.data}set nodeValue(n){this.data=n==null?"":String(n)}cloneNode(){return new e(this.data)}},Be=class{constructor(){this.cssText=""}setProperty(t,n){this[t]=n}removeProperty(t){delete this[t]}},Ke=class{constructor(t){this.el=t}list(){let t=this.el.getAttribute("class");return t?t.split(/\s+/).filter(Boolean):[]}write(t){t.length?this.el.setAttribute("class",t.join(" ")):this.el.removeAttribute("class")}add(...t){let n=this.list();for(let r of t)n.includes(r)||n.push(r);this.write(n)}remove(...t){this.write(this.list().filter(n=>!t.includes(n)))}contains(t){return this.list().includes(t)}toggle(t,n){let r=this.contains(t),o=n===void 0?!r:n;return o?this.add(t):this.remove(t),o}},D=class e extends H{constructor(n,r=!1){super();this.nodeType=Ee;this.attributes=new Map;this.style=new Be;this.classList=new Ke(this);this.rawHTML=null;this.localName=n.toLowerCase(),this.tagName=r?n:n.toUpperCase(),this.isSVG=r,this.namespaceURI=r?"http://www.w3.org/2000/svg":null}setAttribute(n,r){this.attributes.set(n,String(r))}removeAttribute(n){this.attributes.delete(n)}getAttribute(n){return this.attributes.has(n)?this.attributes.get(n):null}hasAttribute(n){return this.attributes.has(n)}get id(){return this.getAttribute("id")??""}set id(n){n==null?this.removeAttribute("id"):this.setAttribute("id",n)}get className(){return this.getAttribute("class")??""}set className(n){n==null?this.removeAttribute("class"):this.setAttribute("class",n)}get htmlFor(){return this.getAttribute("for")??""}set htmlFor(n){n==null?this.removeAttribute("for"):this.setAttribute("for",n)}set value(n){n==null?this.removeAttribute("value"):this.setAttribute("value",String(n))}set checked(n){n?this.setAttribute("checked",""):this.removeAttribute("checked")}set selected(n){n?this.setAttribute("selected",""):this.removeAttribute("selected")}set indeterminate(n){}get textContent(){return this.childNodes.map(n=>n.textContent??"").join("")}set textContent(n){for(let r of this.childNodes)r.parentNode=null;this.childNodes=[],this.rawHTML=null,n!=null&&n!==""&&this.appendChild(new k(String(n)))}set innerText(n){this.textContent=n}set innerHTML(n){for(let r of this.childNodes)r.parentNode=null;this.childNodes=[],this.rawHTML=n==null?"":String(n)}cloneNode(n=!1){let r=new e(this.localName,this.isSVG);if(r.attributes=new Map(this.attributes),r.style.cssText=this.style.cssText,r.rawHTML=this.rawHTML,n)for(let o of this.childNodes)r.appendChild(o.cloneNode(!0));return r}};var vr=new Set(["area","base","br","col","embed","hr","img","input","link","meta","param","source","track","wbr"]),Ht=/&/g,Vt=/</g,Wt=/>/g,Ar=/"/g;function Xe(e){return e.replace(Ht,"&").replace(Vt,"<").replace(Wt,">")}function Ft(e){return e.replace(Ht,"&").replace(Ar,""").replace(Vt,"<").replace(Wt,">")}function Cr(e){return e.startsWith("--")?e:e.replace(/[A-Z]/g,t=>"-"+t.toLowerCase())}function Rr(e){if(!e)return"";let t=[];e.cssText&&t.push(e.cssText.trim().replace(/;\s*$/,""));for(let n of Object.keys(e)){if(n==="cssText")continue;let r=e[n];r==null||r===""||t.push(`${Cr(n)}: ${r}`)}return t.join("; ")}function Mr(e){let t="",n=Rr(e.style);for(let[r,o]of e.attributes)r==="style"&&n||(t+=` ${r}="${Ft(o)}"`);if(n){let r=e.attributes.get("style"),o=r?`${r.replace(/;\s*$/,"")}; ${n}`:n;t+=` style="${Ft(o)}"`}return t}function S(e){if(e==null||e===!1||e===!0)return"";if(typeof e=="string")return Xe(e);if(typeof e=="number")return Xe(String(e));if(typeof e=="function")return S(e());if(Array.isArray(e))return e.map(S).join("");if(typeof e.rawOuterHTML=="string")return e.rawOuterHTML;switch(e.nodeType){case ze:return Xe(e.data??"");case Ge:return`<!--${e.data??""}-->`;case Ee:{let t=e.localName,n=`<${t}${Mr(e)}>`;if(vr.has(t))return n;let r=e.rawHTML!=null?e.rawHTML:(e.childNodes??[]).map(S).join("");return`${n}${r}</${t}>`}}return Array.isArray(e.childNodes)?e.childNodes.map(S).join(""):""}import{createRoot as Xt}from"@fluixi/reactive/signal";import{setResourceTracker as Lr,setResourceIdSource as kr,setResourceDataSink as Dr,getOwner as _r,runWithOwner as Kt,flush as $r}from"@fluixi/reactive/signal";var Pr=new Set(["area","base","br","col","embed","hr","img","input","link","meta","param","source","track","wbr"]),Or={amp:"&",lt:"<",gt:">",quot:'"',"#39":"'"};function Ut(e){return e.replace(/&(#?\w+);/g,(t,n)=>Or[n]??t)}var w=class extends Error{};function Bt(e,t=!1){let n=0,r=[],o=[],i=c=>{let f=o[o.length-1];f?f.appendChild(c):r.push(c)};for(;n<e.length;){let c=e.indexOf("<",n);if(c===-1){a(e.slice(n));break}if(c>n&&a(e.slice(n,c)),e.startsWith("<!--",c)){let f=e.indexOf("-->",c);if(f===-1)throw new w(`unterminated comment at ${c}`);i(new V(e.slice(c+4,f))),n=f+3;continue}if(e[c+1]==="/"){let f=e.indexOf(">",c);if(f===-1)throw new w(`unterminated closing tag at ${c}`);let d=e.slice(c+2,f).trim().toLowerCase(),p=o.pop();if(!p||p.localName!==d)throw new w(`</${d}> does not close <${p?.localName??"nothing"}>`);n=f+1;continue}n=l(c)}if(o.length>0)throw new w(`unclosed <${o[o.length-1].localName}>`);let s=r[0];if(r.length!==1||!(s instanceof D))throw new w(`expected exactly one root element, got ${r.length}`);return s;function a(c){c!==""&&i(new k(Ut(c)))}function l(c){let f=/[\s/>]/.exec(e.slice(c+1));if(!f)throw new w(`unterminated tag at ${c}`);let d=e.slice(c+1,c+1+f.index).toLowerCase(),p=new D(d,t),y=c+1+f.index;for(;y<e.length;){for(;y<e.length&&/\s/.test(e[y]);)y++;if(e[y]===">"){y++;break}if(e[y]==="/"&&e[y+1]===">"){y+=2;break}let we=y;for(;y<e.length&&!/[\s=/>]/.test(e[y]);)y++;let W=e.slice(we,y);if(W==="")throw new w(`malformed attribute at ${y}`);if(e[y]==="="){if(e[y+1]!=='"')throw new w(`attribute ${W} must have a double-quoted value`);let Ne=e.indexOf('"',y+2);if(Ne===-1)throw new w(`unterminated value for ${W}`);p.setAttribute(W,Ut(e.slice(y+2,Ne))),y=Ne+1}else p.setAttribute(W,"")}return i(p),Pr.has(d)||o.push(p),y}}var zt=!1;function Jt(){zt||(zt=!0,lt({createElement:(e,t)=>new D(e,t),createText:e=>new k(e),createRaw:e=>new be(e),parseTemplate:(e,t)=>Bt(e,t),createComment:e=>new V(e)}))}function Yt(e,t={}){let n=g;Jt(),_(!0);let r=J(t.event);try{return Y(r,()=>Xt(o=>{try{let i=typeof e=="function"?e():e;return S(i)}finally{o()}}))}finally{_(n)}}var Gt=!1;function Ir(){Gt||(Gt=!0,Lr(e=>{C()?.pending.add(e)}),kr(()=>C()?.nextResourceId()??""),Dr((e,t)=>{e&&C()?.data.set(e,t)}))}var Je=null;function Zt(e){Je=e}function Ye(e){if(e.data.size===0)return"";let t={};for(let[r,o]of e.data){let i=o;if(Je)try{i=Je(o,r)}catch{continue}i!==void 0&&(typeof i=="function"||typeof i=="symbol"||(t[r]=i))}if(Object.keys(t).length===0)return"";let n=me(JSON.stringify(t));return n==="{}"?"":`<script type="application/json" id="${Z}">${n}<\/script>`}var qr=50;async function Qt(e,t={}){let n=g;Jt(),_(!0),Ir();let r=J(t.event);try{return await Y(r,async()=>{t.preload&&await t.preload(t.event);let o,i=null,s=()=>{};Xt(f=>{s=f,i=_r(),o=typeof e=="function"?e():e});let a=()=>{try{Kt(i,()=>S(o))}catch{}};a();let l=0;for(;r.pending.size>0&&l++<qr;){let f=Array.from(r.pending);r.pending.clear(),await Promise.allSettled(f),await $r(),a()}let c=Kt(i,()=>S(o))+Ye(r);return s(),c})}finally{_(n)}}var jr={createComponent:pe,createElement:ot,createNativeElement:ue,createTemplate:$e,cloneTemplate:Ie,templateNode:pt,holeContent:gt,holeEnd:mt,holeScope:yt,createPortal:wt,render:de,hydrate:Q,insert:E,appendChildren:st,removeChildren:it,spread:bt,applyProps:fe,mergeProps:Et,bindPair:St,setProperty:q,setDynamicProperty:X,setAttribute:h,setDynamicAttribute:G,removeAttribute:rt,getAttribute:nt,setClassName:j,addClass:Qe,removeClass:et,toggleClass:tt,setStyles:Ae,delegateEvents:ce,addDelegatedEventListener:_e,removeDelegatedEventListener:oe,handleRef:F,resetIntegration:At,isIntegrationInitialized:vt},aa=jr;export{qt as ClientOnly,ur as Dynamic,Tr as ErrorBoundary,Z as FX_DATA_ID,Jn as For,Zn as Index,$n as Island,ve as JSX_PROPERTIES,rr as Match,gr as NoSsr,pr as Portal,Br as SVG_ELEMENTS,U as SVG_NAMESPACE,zn as Show,or as Switch,Ce as VERSION,Ur as VOID_ELEMENTS,Qe as addClass,_e as addDelegatedEventListener,ht as addNativeEventListener,st as appendChildren,Se as applyElementProp,fe as applyProps,xt as applyUse,at as asComponent,bo as asContext,xo as asOutlet,To as asProvider,ho as asRoute,mo as asRouter,go as asRoutes,Eo as asSuspense,St as bindPair,pn as captureHydrationCursor,wo as checkRenderType,Er as classMap,P as cleanChildren,Ie as cloneTemplate,zr as closest,pe as createComponent,Si as createDynamicElement,ot as createElement,ue as createNativeElement,wt as createPortal,J as createRequestContext,$e as createTemplate,aa as default,Qr as delegate,ce as delegateEvents,me as escapeFxJson,Vo as escapeHTML,qo as fnName,_o as generateID,nt as getAttribute,lo as getGlobal,Vr as getLitEventName,Pt as getLocals,Zr as getOffset,C as getRequestContext,je as getRequestEvent,Fe as getRequestLocals,ge as getServerData,Do as getStableElementId,Xr as getStyle,F as handleRef,Gr as hasClass,gt as holeContent,mt as holeEnd,yt as holeScope,jn as html,Q as hydrate,K as hydrateAdvancePast,qn as hydrateIslands,ws as indexArray,Go as initializeIntegration,E as insert,ie as insertExpression,Xo as intergartionInitialized,Wo as isAccessor,N as isComponent,fn as isContext,en as isCustomElement,so as isDOMNode,$o as isDelegatedEvent,Oe as isDomElement,I as isDomNode,Le as isDomText,Hr as isEventHandler,Io as isFunction,vt as isIntegrationInitialized,io as isJSXTemplate,nn as isLitTemplateResult,Ho as isNativeElement,cn as isOutlet,ne as isPromise,un as isProvider,ro as isReactElement,ln as isRoute,sn as isRouter,an as isRoutes,Nt as isSVGElement,g as isServer,dn as isSuspense,oo as isTemplateFactory,Jr as isVisible,jo as iterateFn,Es as keyArray,En as makeArrayFlat,bs as mapArray,Et as mergeProps,to as observeIntersection,no as observeResize,Ze as query,Kr as queryAll,on as registerCoreVersion,zo as registerCreateComponent,ao as registerGlobal,rt as removeAttribute,it as removeChildren,et as removeClass,oe as removeDelegatedEventListener,de as render,Yt as renderToString,Qt as renderToStringAsync,At as resetIntegration,te as runHydrationAt,Y as runWithRequestContext,yn as runWithoutHydration,Yr as scrollIntoView,S as serializeNode,Ye as serializeResourceData,h as setAttribute,se as setClassList,j as setClassName,Zt as setDataRedactor,G as setDynamicAttribute,Tt as setDynamicBoolAttribute,X as setDynamicProperty,q as setProperty,Mt as setRequestStore,_ as setServerMode,ae as setStyle,Ae as setStyles,Wr as shouldSetAsProperty,Fo as splitProps,bt as spread,Re as stampVersions,Sr as styleMap,Fn as svg,pt as templateNode,Fr as toAttributeName,tt as toggleClass,x as versions,eo as waitForElement,Me as warnOnVersionSkew};
|
|
1
|
+
function Fr(e){return e.startsWith("aria-")||e.startsWith("data-")?e:/[A-Z]/.test(e)?e.replace(/([A-Z])/g,"-$1").toLowerCase():e}function Hr(e){return e.startsWith("@")||e.startsWith("on")&&e.length>2}function Vr(e){return e.startsWith("@")?e.slice(1):e.startsWith("on")?e.slice(2).toLowerCase():e}function Wr(e,t){let n=new Set(["checked","value","selected","disabled","readonly","required","multiple","open","contenteditable","draggable","spellcheck"]),r={input:new Set(["value","checked","indeterminate"]),textarea:new Set(["value"]),select:new Set(["value"]),option:new Set(["selected","value"]),audio:new Set(["volume","currentTime","paused"]),video:new Set(["volume","currentTime","paused"]),img:new Set(["src","srcset"]),iframe:new Set(["src"]),a:new Set(["href"])};return n.has(t)||r[e]&&r[e].has(t)}var Ur=new Set(["area","base","br","col","embed","hr","img","input","link","meta","param","source","track","wbr"]),Br=new Set(["svg","g","path","circle","rect","line","polyline","polygon","ellipse","text","tspan","use","defs","symbol","mask","clipPath","pattern","linearGradient","radialGradient","stop","filter","feGaussianBlur","feOffset","feMerge","feMergeNode","foreignObject"]),U="http://www.w3.org/2000/svg";function en(e){return e.localName.includes("-")}function Se(e,t,n,r=!1){if(n==null){e.removeAttribute(t);return}if(en(e)){e[t]=n;return}h(e,t,n,r)}var ve=new Set(["className","value","checked","selected","innerHTML","innerText","textContent","indeterminate","htmlFor"]);function Ze(e,t=document){return t.querySelector(e)}function Kr(e,t=document){return Array.from(t.querySelectorAll(e))}function zr(e,t){return e.closest(t)}function Qe(e,...t){e.classList.add(...t)}function et(e,...t){e.classList.remove(...t)}function tt(e,...t){t.forEach(n=>e.classList.toggle(n))}function Gr(e,t){return e.classList.contains(t)}function h(e,t,n,r=!1){if(n==null||n===!1){e.removeAttribute(t);return}if(n===!0){e.setAttribute(t,"");return}if(typeof n=="object"){e.setAttribute(t,JSON.stringify(n));return}e.setAttribute(t,String(n))}function nt(e,t){return e.getAttribute(t)}function rt(e,t){e.removeAttribute(t)}function Ae(e,t){Object.assign(e.style,t)}function Xr(e,t){return window.getComputedStyle(e).getPropertyValue(t)}function ot(e,t={},...n){let r=document.createElement(e);return Object.entries(t).forEach(([o,i])=>{if(o==="class"||o==="className")r.className=i;else if(o==="style"&&typeof i=="object")Ae(r,i);else if(o.startsWith("on")&&typeof i=="function"){let s=o.slice(2).toLowerCase();r.addEventListener(s,i)}else h(r,o,i)}),n.forEach(o=>{typeof o=="string"?r.appendChild(document.createTextNode(o)):r.appendChild(o)}),r}function it(e){for(;e.firstChild;)e.removeChild(e.firstChild)}function st(e,...t){t.forEach(n=>{typeof n=="string"?e.appendChild(document.createTextNode(n)):e.appendChild(n)})}function Jr(e){let t=e.getBoundingClientRect();return t.top>=0&&t.left>=0&&t.bottom<=window.innerHeight&&t.right<=window.innerWidth}function Yr(e,t={behavior:"smooth",block:"nearest"}){e.scrollIntoView(t)}function Zr(e){let t=e.getBoundingClientRect();return{top:t.top+window.pageYOffset,left:t.left+window.pageXOffset}}function Qr(e,t,n,r){let o=i=>{let s=i.target.closest(n);s&&e.contains(s)&&r(i,s)};return e.addEventListener(t,o),()=>{e.removeEventListener(t,o)}}function eo(e,t=5e3){return new Promise((n,r)=>{let o=Ze(e);if(o){n(o);return}let i=new MutationObserver(()=>{let a=Ze(e);a&&(i.disconnect(),clearTimeout(s),n(a))});i.observe(document.body,{childList:!0,subtree:!0});let s=setTimeout(()=>{i.disconnect(),r(new Error(`Element ${e} not found within ${t}ms`))},t)})}function to(e,t,n={}){let r=new IntersectionObserver(o=>{o.forEach(i=>{t(i.isIntersecting)})},n);return r.observe(e),()=>{r.disconnect()}}function no(e,t){let n=new ResizeObserver(r=>{r.forEach(t)});return n.observe(e),()=>{n.disconnect()}}var tn=typeof Symbol=="function"&&Symbol.for?Symbol.for("react.element"):60103;function ro(e){return typeof e=="object"&&e!==null&&e.$$typeof===tn}function nn(e){return e&&typeof e=="object"&&e.strings&&Array.isArray(e.strings)&&e.values&&Array.isArray(e.values)}function oo(e){if(typeof e!="function")return!1;try{let t=e();return nn(t)}catch{return!1}}function io(e){return typeof e=="object"&&e!==null&&(e.$$typeof==="template"||typeof e.type=="function")}function so(e){return e instanceof Node}function ao(e,t,n="Fluixi"){typeof globalThis<"u"&&(typeof globalThis[n]>"u"&&(globalThis[n]={}),typeof globalThis[n][e]>"u"&&(globalThis[n][e]=t))}function lo(e,t,n="Fluixi"){return typeof globalThis<"u"&&typeof globalThis[n]<"u"&&typeof globalThis[n][e]<"u"?globalThis[n][e]:t}import{isSignal as b}from"@fluixi/reactive/signal";var Ce="1.0.0-alpha.82";import{VERSION as rn}from"@fluixi/reactive/version";var x={dom:Ce,reactive:rn};function on(e){x.core=e}function Re(e){x.core&&e.setAttribute("fluixi",x.core),e.setAttribute("fx-dom",x.dom),e.setAttribute("fx-reactive",x.reactive),typeof globalThis<"u"&&(globalThis.Fluixi=x)}function Me(){let e=[x.core,x.dom,x.reactive].filter(t=>t!==void 0);new Set(e).size<=1||console.warn(`[fluixi] package versions disagree — core ${x.core??"(absent)"}, dom ${x.dom}, reactive ${x.reactive}. These ship as one release, so a mismatch usually means a stale lockfile or two copies resolved side by side. Reinstall, or check for duplicates with \`pnpm why @fluixi/dom\`.`)}function mo(e){return Object.defineProperty(e,Symbol.for("fluixi-router"),{value:!0,enumerable:!0}),e}function go(e){return Object.defineProperty(e,Symbol.for("fluixi-routes"),{value:!0,enumerable:!0}),e}function ho(e){return Object.defineProperty(e,Symbol.for("fluixi-route"),{value:!0,enumerable:!0}),e}function xo(e){return typeof e!="function"||Object.defineProperty(e,Symbol.for("fluixi-outlet"),{value:!0,enumerable:!0}),e}function To(e){return Object.defineProperty(e,Symbol.for("fluixi-provider"),{value:!0,enumerable:!0}),e}function bo(e){return Object.defineProperty(e,Symbol.for("fluixi-context"),{value:!0,enumerable:!0}),e}function at(e){return typeof e!="function"||Object.defineProperty(e,Symbol.for("fluixi-component"),{value:!0,enumerable:!0}),e}function Eo(e){return Object.defineProperty(e,Symbol.for("fluixi-suspense"),{value:!0,enumerable:!0}),e}function sn(e){return typeof e=="function"&&e[Symbol.for("fluixi-router")]===!0}function an(e){return typeof e=="function"&&e[Symbol.for("fluixi-routes")]===!0}function ln(e){return typeof e=="function"&&e[Symbol.for("fluixi-route")]===!0}function cn(e){return typeof e=="function"&&e[Symbol.for("fluixi-outlet")]===!0}function un(e){return typeof e=="function"&&e[Symbol.for("fluixi-provider")]===!0}function fn(e){return typeof e=="function"&&e[Symbol.for("fluixi-context")]===!0}function N(e){return typeof e=="function"&&e[Symbol.for("fluixi-component")]===!0}function dn(e){return typeof e=="function"&&e[Symbol.for("fluixi-suspense")]===!0}function wo(e){return sn(e)?{type:"router",value:e}:ln(e)?{type:"route",value:e}:an(e)?{type:"routes",value:e}:cn(e)?{type:"outlet",value:e}:N(e)?{type:"component",value:e}:dn(e)?{type:"suspense",value:e}:un(e)?{type:"provider",value:e}:fn(e)?{type:"context",value:e}:{type:"none",value:e}}import{batch as dt,createEffect as z,createRenderEffect as m,createRoot as mn,onCleanup as O,readChildren as gn}from"@fluixi/reactive/signal";var g=typeof document>"u";function _(e){g=e}var B=Symbol.for("fluixi.server-node"),Pe=null;function lt(e){Pe=e}function $(){if(!Pe)throw new Error("[fluixi] server render ran before @fluixi/dom/server loaded");return Pe}function I(e){return e!=null&&e[B]===!0?!0:typeof Node<"u"&&e instanceof Node}function Oe(e){return e!=null&&e[B]===!0?e.nodeType===1:typeof Element<"u"&&e instanceof Element}function Le(e){return e!=null&&e[B]===!0?e.nodeType===3:typeof Text<"u"&&e instanceof Text}var u={active:!1,cursor:null,parents:[]},ct=null;function ut(e){ct=e}function ee(){return ct}function ke(e,t){return u.active&&t.parentNode===e}function De(e){let t=u.parents.lastIndexOf(e);t!==-1&&(u.parents.length=t),u.cursor=e.nextSibling}function pn(){return u.active?u.cursor:null}function te(e,t){if(!e||e.parentNode==null)return t();let n=u.active,r=u.cursor,o=u.parents;u.active=!0,u.cursor=e,u.parents=[];try{return t()}finally{u.active=n,u.cursor=r,u.parents=o}}function yn(e){if(!u.active)return e();let t=u.cursor,n=u.parents;u.active=!1,u.parents=[];try{return e()}finally{u.active=!0,u.cursor=t,u.parents=n}}function K(e){if(!u.active||e==null)return;let t=Array.isArray(e)?e[e.length-1]:e;t&&typeof t.nodeType=="number"&&De(t)}function hn(e){let t=[];for(;e&&e.nodeType===1;){let n=e.tagName.toLowerCase();if(e.id){n+=`#${e.id}`,t.unshift(n);break}e.getAttribute("data-id")&&(n+=`[data-id="${e.getAttribute("data-id")}"]`);let r=0,o=e;for(;o=o.previousElementSibling;)o.tagName===e.tagName&&r++;n+=`:nth-of-type(${r+1})`,t.unshift(n),e=e.parentElement}return t.join(">")}function xn(e){let t=0;for(let n=0;n<e.length;n++)t=(t<<5)-t+e.charCodeAt(n),t|=0;return`el_${Math.abs(t)}`}function Do(e){return xn(hn(e))}var _o=()=>"xxyxxxxxxy-4xx8".replace(/[xy]/g,function(e){let t=Math.random()*16|0;return(e==="x"?t:t&3|8).toString(16)}),Tn={};var ft=new Map,re=new Set,le=new Set(["scroll","focus","blur","load","error","resize","mouseenter","mouseleave","pointerenter","pointerleave","gotpointercapture","lostpointercapture"]);function ce(e){if(!g)for(let t of e)re.has(t)||le.has(t)||(re.add(t),document.addEventListener(t,bn))}function bn(e){let t=`$$${e.type}`,n=e.composedPath&&e.composedPath()[0]||e.target;for(;n;){let r=n[t];if(r&&!n.disabled&&(r(e),e.cancelBubble))return;n=n.host&&n.host!==n&&n.host instanceof Element?n.host:n.parentNode}}function _e(e,t,n){if(e[`$$${t}`]=n,le.has(t)){let r=`__fx_${t}`;if(!e[r]){let o=i=>{e[`$$${t}`]?.(i)};e.addEventListener(t,o),e[r]=o}return}re.has(t)||ce([t])}function oe(e,t){delete e[`$$${t}`];let n=`__fx_${t}`,r=e[n];r&&(e.removeEventListener(t,r),delete e[n])}function $o(e){return!le.has(e)}function Io(e){return typeof e=="function"}function R(e,t=!1){if(g)return $().createText(e);if(u.active&&!t){let n=ee()?.hydrateText(e);if(n)return n}return document.createTextNode(e)}function ue(e,t=!1){if(g)return $().createElement(e,t);if(u.active){let n=ee()?.hydrateElement(e);if(n)return n}return t?document.createElementNS(U,e):document.createElement(e)}function $e(e,t=!1){let n=ft.get(e);if(n)return n;let r=document.createElement("template");return t?r.innerHTML=`<svg>${e}</svg>`:r.innerHTML=e,ft.set(e,r),r}function pt(e,t,n=!1,r=!1){if(g){let o=$();return n?o.parseTemplate(e,r):o.createRaw(e)}if(u.active){let o=ee()?.hydrateStatic(t);if(o)return o}return Ie($e(e,r),r).firstChild}function yt(e,t){if(!u.active)return t();let n=te(e.nextSibling,t);if(typeof n=="function"){let r=n;return((...o)=>u.active?te(e.nextSibling,()=>r(...o)):r(...o))}return n}function mt(e){for(let t=e.nextSibling;t;t=t.nextSibling)if(t.nodeType===8&&t.data==="fx/")return t;throw new Error("[fluixi] template hole is missing its closing marker")}function gt(e,t){let n=[];for(let r=e.nextSibling;r&&r!==t;r=r.nextSibling)n.push(r);return n}function Ie(e,t=!1){let n=e.content.cloneNode(!0);return t?n.firstChild:n}function En(e){return Array.isArray(e)?e.length===2&&e[1]===" "?Array.isArray(e[0])?En(e[0]):(typeof e[0]=="function",e[0]):e.length===1&&typeof e[0]=="function"?e[0]:e:e}function qo(e){return typeof e!="function"?null:e._name||e.name||"anonymous"}function jo(e){if(b(e)||N(e)||typeof e!="function")return e;let t=e();for(;typeof t=="function"&&!b(t)&&!N(t);)t=t();return t}var A=0,wn=200;function Nn(e,t,n,r,o){let i=r,s=new Map;return m(()=>{let a;if(N(e)&&!b(e)){if(!s.has(e)){A++;try{let l=e();s.set(e,l)}finally{A--}}for(a=s.get(e);typeof a=="function"&&b(a);)a=a()}else for(a=e();typeof a=="function"&&b(a);)a=a();{let l=0;for(;typeof a=="function"&&l++<50;)if(N(a)){if(!s.has(a)){let c=a;A++;try{let f=c();s.set(c,f)}finally{A--}}a=s.get(a)}else if(b(a))a=a();else if(a=a(),typeof a!="function"||!b(a)&&!N(a))break}A++;try{i=ie(t,a,n,i,s),o(i)}finally{A--}})}function E(e,t,n,r){if(A>wn)return console.error("[insert] Exceeded max call depth — possible infinite loop."),()=>null;n!==void 0&&!n&&(n=R("",!0),e.appendChild(n));let o=r??null,i=l=>Array.isArray(l)&&l.some(c=>typeof c=="function"),s=l=>typeof l=="function"?l:()=>l;if(typeof t!="function"&&!i(t)){A++;try{o=ie(e,t,n,o)}finally{A--}return()=>o}let a=Nn(s(t),e,n,o,l=>{o=l});return()=>(a?.(),o)}function ie(e,t,n,r,o){if(t==null||typeof t=="boolean")return P(e,r,n);if(typeof t=="function")for(;typeof t=="function";)t=t();if(t==null||typeof t=="boolean")return P(e,r,n);if(ne(t)){let s=R("",!0);return Array.isArray(r)?r.length>0?(e.replaceChild(s,r[0]),P(e,r.slice(1),n)):T(e,s,n):r?e.replaceChild(s,r):T(e,s,n),t.then(a=>{s.parentNode===e&&ie(e,a,s.nextSibling,s)}).catch(a=>{console.error("Error resolving promise in insertExpression:",a)}),s}let i=typeof t;if(i==="string"||i==="number"){if(i==="number"&&(t=String(t)),Array.isArray(r)){if(r.length===0){let a=R(t);return T(e,a,n),a}if(r.length===1&&r[0].nodeType===3)return r[0].data=t,r;r=P(e,r,n)}if(r&&Le(r))return r.data=t,r;let s=R(t);return r&&r.parentNode===e?e.replaceChild(s,r):ke(e,s)||T(e,s,n),s}if(I(t))return ke(e,t)?(De(t),t):Array.isArray(r)?(r.length===0?T(e,t,n):r[0].parentNode===e?(e.replaceChild(t,r[0]),P(e,r.slice(1),n)):T(e,t,n),t):(r?r!==t&&(r.parentNode===e?e.replaceChild(t,r):T(e,t,n)):T(e,t,n),t);if(Array.isArray(t)){let s=[],a=Array.isArray(r)?r:r?[r]:[],l=[];v(t,s,e,n,!0,o,l);let c=Sn(e,a,s,n);for(let f of l){let d=E(e,f.sig,f.marker);O(()=>{P(e,d()),f.marker.parentNode===e&&e.removeChild(f.marker)})}return c}if(i==="object"&&t!==null&&typeof t=="object"){let s=t;if("type"in s&&"props"in s){let a=s;if(typeof a.type=="function"){let l=a.type(a.props||{});return ie(e,l,n,r)}}}return P(e,r,n)}function v(e,t,n,r,o=!0,i,s){for(let a=0;a<e.length;a++){let l=e[a];if(!(l==null||typeof l=="boolean")){for(;typeof l=="function"&&!ne(l)&&!b(l)&&!N(l)&&(l=l(),!(l==null||typeof l=="boolean")););if(!(l==null||typeof l=="boolean")){if(typeof l=="function"){let c;for(N(l)&&!b(l)?(i||(i=new Map),i.has(l)||i.set(l,l()),c=i.get(l)):c=l();typeof c=="function"&&!ne(c)&&!b(c)&&!N(c);)i||(i=new Map),i.has(c)||i.set(c,c()),c=i.get(c);if(c==null||typeof c=="boolean")continue;if(typeof c=="function"){if(b(c)){if(s){let d=R("",!0);t.push(d),s.push({marker:d,sig:c});continue}let f=c();for(;typeof f=="function"&&b(f);)f=f();if(f==null||typeof f=="boolean")continue;Array.isArray(f)?v(f,t,n,r,o,i):v([f],t,n,r,o,i);continue}continue}Array.isArray(c)?v(c,t,n,r,o,i,s):v([c],t,n,r,o,i,s);continue}if(ne(l)){let c=R("",!0);t.push(c),l.then(f=>{if(c.parentNode){let d=[];if(v([f],d,c.parentNode,void 0,!1,i),d.length>0){c.parentNode.replaceChild(d[0],c);for(let p=1;p<d.length;p++)c.parentNode?.insertBefore(d[p],d[p-1].nextSibling)}}}).catch(f=>console.error("Error resolving promise in array:",f));continue}if(Array.isArray(l)){v(l,t,n,r,o,i,s);continue}if(I(l)){t.push(l);continue}if(typeof l=="object"&&l!==null&&"type"in l&&"props"in l){let c=l;if(typeof c.type=="function"){let f=c.type(c.props||{});Array.isArray(f)?v(f,t,n,r,!1,i):v([f],t,n,r,!1,i);continue}}if(typeof l=="string"||typeof l=="number"){let c=String(l);if(c.trim()===""&&c!==" ")continue;t.push(R(c));continue}t.push(R(String(l)))}}}}function Sn(e,t,n,r){for(let d=0;d<n.length;d++){let p=n[d].parentNode;p!==null&&p!==e&&p.nodeType!==11&&(n=n.slice(),n[d]=n[d].cloneNode(!0))}let o=n.length,i=t.length,s=o,a=0,l=0,c=i>0?t[i-1].nextSibling??void 0:r,f=null;for(;a<i||l<s;){if(t[a]===n[l]){a++,l++;continue}for(;i>a&&s>l&&t[i-1]===n[s-1];)i--,s--;if(i===a){let d=s<o?l?n[l-1].nextSibling??void 0:n[s-l]:c;for(;l<s;)T(e,n[l++],d)}else if(s===l)for(;a<i;)(!f||!f.has(t[a]))&&t[a].parentNode===e&&e.removeChild(t[a]),a++;else if(t[a]===n[s-1]&&n[l]===t[i-1]){let d=t[--i].nextSibling;T(e,n[l++],t[a++].nextSibling),T(e,n[--s],d),t[i]=t[a-1]}else{if(!f){f=new Map;let p=l;for(;p<s;)f.set(n[p],p++)}let d=f.get(t[a]);if(d!=null)if(l<d&&d<s){let p=a,y=1;for(;++p<i&&p<s&&!(!f.has(t[p])||f.get(t[p])!==d+y);)y++;if(y>d-l){let we=t[a];for(;l<d;)T(e,n[l++],we)}else t[a].parentNode===e?e.replaceChild(n[l++],t[a++]):(T(e,n[l++],c),a++)}else a++;else t[a].parentNode===e&&e.removeChild(t[a]),a++}}return n}function P(e,t,n){if(t)if(Array.isArray(t))for(let r=0;r<t.length;r++)t[r].parentNode===e&&e.removeChild(t[r]);else t.parentNode===e&&e.removeChild(t);return null}function T(e,t,n){u.active&&t.parentNode===e||(n&&n.parentNode===e?e.insertBefore(t,n):e.appendChild(t))}function q(e,t,n){n==null?delete e[t]:e[t]=n}function ht(e,t,n){let r=n,o;return Array.isArray(n)&&(r=n[0],o=n[1]),typeof r!="function"?()=>{}:(e.addEventListener(t,r,o),()=>e.removeEventListener(t,r,o))}function xt(e,t){let n=(r,o)=>{typeof r=="function"&&r(e,o??(()=>{}))};if(typeof t=="function"){n(t);return}if(Array.isArray(t)){if(typeof t[0]=="function"){n(t[0],t[1]);return}for(let r of t)Array.isArray(r)?n(r[0],r[1]):n(r)}}function G(e,t,n,r=!1){return typeof n!="function"?(h(e,t,n,r),()=>{}):m(()=>{let o=typeof n=="function"?n():n;h(e,t,o,r)})}function X(e,t,n){return typeof n!="function"?(q(e,t,n),()=>{}):m(()=>{let r=typeof n=="function"?n():n;q(e,t,r)})}function Tt(e,t,n){return typeof n!="function"?(h(e,t,!!n),()=>{}):m(()=>{let r=n();h(e,t,!!r)})}function j(e,t){if(t==null){e.removeAttribute("class");return}if(typeof t=="function"){m(()=>j(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 n=Object.keys(t).filter(r=>{let o=t[r];return typeof o=="function"?o():!!o}).join(" ");e.setAttribute("class",n);return}e.setAttribute("class",String(t))}function se(e,t,n){if(!(!t||typeof t!="object"))for(let r in t){let o=t[r],i=r.split(/\s+/).filter(Boolean);if(typeof o=="function"&&n)n.push(m(()=>{let s=!!o();for(let a of i)e.classList.toggle(a,s)}));else{let s=!!(typeof o=="function"?o():o);for(let a of i)e.classList.toggle(a,s)}}}function ae(e,t){let n=t;for(;typeof n=="function";)n=n();if(n==null){e.removeAttribute("style");return}if(typeof n=="string"){e.style.cssText=n;return}if(typeof n=="object")for(let r in n){let o=n[r];o==null?e.style[r]="":e.style[r]=o}}function bt(e){let{element:t,props:n,prevProps:r=Tn,isSVG:o=!1,skipChildren:i=!1}=e;if(!t||!Oe(t))return console.error("[spread] Error: element is not a DOM Element!"),()=>{};if(!n)return console.warn("[spread] Warning: props is undefined!"),()=>{};let s=o||t.namespaceURI===U,a=[];for(let l in n){if(i&&l==="children")continue;let c=n[l],f=r[l];if(c===f)continue;if(l==="ref"){F(c,t);continue}if(l==="use"){xt(t,c);continue}if(l.startsWith("on:")){a.push(ht(t,l.slice(3),c));continue}if(l.startsWith("prop:")){a.push(X(t,l.slice(5),c));continue}if(l.startsWith("attr:")){a.push(G(t,l.slice(5),c,s));continue}if(l.startsWith("bool:")){a.push(Tt(t,l.slice(5),c));continue}if(l==="class"||l==="className"){typeof c=="function"?a.push(m(()=>j(t,c()))):j(t,c);continue}if(l==="classList"){typeof c=="function"?a.push(m(()=>se(t,c()))):se(t,c,a);continue}if(l==="style"){typeof c=="function"?a.push(m(()=>ae(t,c()))):ae(t,c);continue}if(l.startsWith("on")){let p=l.slice(2).toLowerCase();f&&oe(t,p),c&&_e(t,p,c);continue}let d=ve.has(l)||!s&&l in t;typeof c=="function"?a.push(d?X(t,l,c):G(t,l,c,s)):a.push(m(()=>d?q(t,l,n[l]):h(t,l,n[l],s)))}for(let l in r)if(!(l in n))if(l.startsWith("on")){let c=l.slice(2).toLowerCase();oe(t,c)}else ve.has(l)?q(t,l,null):t.removeAttribute(l);return()=>{a.forEach(l=>l())}}function fe(e,t,n=!1){for(let r in t){let o=t[r];if(r==="ref"){F(o,e);continue}if(r!=="children"){if(r==="use"){xt(e,o);continue}if(r.startsWith("on:")){ht(e,r.slice(3),o);continue}if(r.startsWith("prop:")){X(e,r.slice(5),o);continue}if(r.startsWith("attr:")){G(e,r.slice(5),o,n);continue}if(r.startsWith("bool:")){Tt(e,r.slice(5),o);continue}if(r.startsWith("on")&&r.length>2){let i=r.slice(2).toLowerCase();if(typeof o=="function")if(le.has(i)){e[`$$${i}`]=o;let s=`__fx_${i}`;if(!e[s]){let a=l=>{e[`$$${i}`]?.(l)};e.addEventListener(i,a),e[s]=a}}else e[`$$${i}`]=o,re.has(i)||ce([i]);continue}if(r==="class"||r==="className"){j(e,o);continue}if(r==="classList"){typeof o=="function"?m(()=>se(e,o())):se(e,o);continue}if(r==="style"){typeof o=="function"?m(()=>ae(e,o())):ae(e,o);continue}if(r==="innerHTML"){if(typeof o=="function"){let i=z(()=>{let s=o();for(;typeof s=="function";)s=s();e.innerHTML=s});O(()=>i())}else e.innerHTML=o;continue}if(r==="value"&&(e.tagName==="INPUT"||e.tagName==="TEXTAREA")){if(typeof o=="function"){let i=z(()=>{let s=o();for(;typeof s=="function"&&s.length===0;)s=s();document.activeElement!==e&&(e.value=s??"")});O(()=>{i()})}else m(()=>{document.activeElement!==e&&(e.value=t[r]??"")});continue}if(r==="checked"&&e.tagName==="INPUT"){if(typeof o=="function"){let i=z(()=>{let s=o();for(;typeof s=="function"&&s.length===0;)s=s();document.activeElement!==e&&(e.checked=s??"")});O(()=>{i()})}else m(()=>{document.activeElement!==e&&(e.checked=t[r]??"")});continue}if(r==="value"&&e.tagName==="SELECT"){if(typeof o=="function"){let i=!0,s=z(()=>{let a=o();for(;typeof a=="function"&&a.length===0;)a=a();i?(i=!1,queueMicrotask(()=>{e.value=a??""})):e.value=a??""});O(()=>{s()})}else{let i=!0;m(()=>{let s=t[r];i?(i=!1,queueMicrotask(()=>{e.value=s??""})):e.value=s??""})}continue}if(typeof o=="function"){let i=z(()=>{let s=o();for(;typeof s=="function"&&s.length===0;)s=s();Se(e,r,s,n)});O(()=>{i()})}else m(()=>Se(e,r,t[r],n))}}}function Et(...e){let t=r=>{for(let o=e.length-1;o>=0;o--){let i=e[o];if(i&&r in i&&i[r]!==void 0)return i[r]}},n=r=>{for(let o of e)if(o&&r in o)return!0;return!1};return new Proxy({},{get:(r,o)=>t(o),has:(r,o)=>n(o),ownKeys:()=>{let r=new Set;for(let o of e)if(o)for(let i of Reflect.ownKeys(o))r.add(i);return[...r]},getOwnPropertyDescriptor:(r,o)=>n(o)?{enumerable:!0,configurable:!0,get:()=>t(o)}:void 0})}function Fo(e,...t){let n=new Set;for(let s of t)for(let a of s)n.add(a);let r=s=>({enumerable:!0,configurable:!0,get:()=>e[s]}),o=t.map(s=>{let a=new Set(s);return new Proxy({},{get:(l,c)=>a.has(c)?e[c]:void 0,has:(l,c)=>a.has(c)&&c in e,ownKeys:()=>Array.from(a).filter(l=>l in e),getOwnPropertyDescriptor:(l,c)=>a.has(c)&&c in e?r(c):void 0})}),i=new Proxy({},{get:(s,a)=>n.has(a)?void 0:e[a],has:(s,a)=>!n.has(a)&&a in e,ownKeys:()=>Reflect.ownKeys(e).filter(s=>!n.has(s)),getOwnPropertyDescriptor:(s,a)=>!n.has(a)&&a in e?r(a):void 0});return[...o,i]}function F(e,t){if(e){if(I(e)){let n=t,r=e;if(!n)return;typeof n=="function"?n(r):typeof n=="object"&&"current"in n&&(n.current=r);return}typeof e=="function"?e(t):typeof e=="object"&&"current"in e&&(e.current=t)}}function wt(e,t,n){let r=t||document.body,o=gn(()=>e),i=[];return dt(()=>{let s=m(()=>{let a=o();Array.isArray(a)?(a.forEach(l=>r.appendChild(l)),i.push(()=>{a.forEach(l=>{l.parentNode===r&&r.removeChild(l)})})):I(a)&&(r.appendChild(a),i.push(()=>{a.parentNode===r&&r.removeChild(a)}))});i.push(s),O(()=>{i.forEach(a=>a())})}),null}function Ho(e){return typeof e=="string"&&e.toLowerCase()===e}function Nt(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 Vo(e){return e.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")}function ne(e){return e!=null&&(typeof e=="object"||typeof e=="function")&&typeof e.then=="function"||e instanceof Promise}function Wo(e){return typeof e=="function"&&e.length===0&&b(e)}function de(e,t,n){if(!t)throw new Error("Container element is required");let r,o,i=[];return mn(s=>{dt(()=>{u.active||(t.textContent=""),Re(t),Me(),E(t,e)}),o=s}),()=>{o?.(),r?.(),i.forEach(s=>s()),t.textContent=""}}function St(e){if(Array.isArray(e))return e;if(typeof e=="function"&&typeof e.set=="function")return[e,e.set];throw new TypeError("[fluixi] bind: needs a signal — either `signal(…)` or the `[get, set]` pair from `createSignal(…)`.")}import{untrack as vn,isSignal as An}from"@fluixi/reactive";var Cn="__fx_dom_create_component__",L=globalThis[Cn]??={fn:null};function zo(e){L.fn=e}function Go(e={}){let t=e.signalSystem?.createComponent;t&&(L.fn=t)}function pe(e,t){if(L.fn)return L.fn(e,t);let n=typeof e=="function"?vn(()=>e(t)):e;if(n!=null&&(typeof n=="function"||typeof n=="object")&&!An(n)){try{n.$name=e?.name}catch{}return at(n)}return n}var Xo=()=>L.fn!==null,vt=()=>L.fn!==null;function At(){L.fn=null}var ye,Rt={getStore:()=>ye,run(e,t){let n=ye;ye=e;try{return t()}finally{ye=n}}},qe=Rt;function Mt(e){qe=e??Rt}function J(e={}){e.locals||(e.locals=e.request?Fe(e.request):{});let t=0,n=0,r=null,o=new Map,i=new Map;return{event:e,routeData:new Map,matchedRoute:new Map,nextId:()=>`s${t++}`,nextResourceId:()=>{if(r===null)return`r${n++}`;let s=o.get(r)??0;return o.set(r,s+1),`${r}:r${s}`},nextIslandNamespace:s=>{let a=i.get(s)??0;return i.set(s,a+1),`${s}#${a}`},withResourceScope(s,a){let l=r;r=s;try{return a()}finally{r=l}},pending:new Set,data:new Map}}function Y(e,t){return qe.run(e,t)}function C(){return qe.getStore()}function je(){return C()?.event}function Pt(){let e=je();return e?(e.locals||(e.locals={}),e.locals):{}}var Ct=new WeakMap;function Fe(e){let t=Ct.get(e);return t||(t={},Ct.set(e,t)),t}import{setResourceIdSource as Rn,setServerDataGetter as Mn}from"@fluixi/reactive/signal";var Z="__FX_DATA__";function me(e){return e.replace(/[<>&\u2028\u2029]/g,t=>"\\u"+t.charCodeAt(0).toString(16).padStart(4,"0"))}var He;function ge(){let e=globalThis.__FX_DATA__;if(e)return e;if(He!==void 0)return He;let t=null;if(typeof document<"u"){let n=document.getElementById(Z)?.textContent;if(n)try{t=JSON.parse(n)}catch{t=null}}return He=t}function he(){for(;;){for(;u.cursor&&u.cursor.nodeType===3&&u.cursor.data==="";)u.cursor=u.cursor.nextSibling;if(u.cursor!=null||!u.parents.length)return;u.cursor=u.parents.pop().nextSibling}}var Pn=new Set(["area","base","br","col","embed","hr","img","input","link","meta","param","source","track","wbr"]),xe=typeof process<"u"&&process.env&&!1;function Te(e,t){let n=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 ${n}. 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 On(e){he();let t=u.cursor;return t&&t.nodeType===1&&t.tagName.toLowerCase()===e.toLowerCase()?(Pn.has(e.toLowerCase())?u.cursor=t.nextSibling:(u.parents.push(t),u.cursor=t.firstChild),t):(xe&&t&&Te(`<${e}>`,t),null)}function Ln(e){he();let t=u.cursor;return t&&t.nodeType===1&&t.tagName.toLowerCase()===e.toLowerCase()?(u.cursor=t.nextSibling,t):(xe&&t&&Te(`<${e}> (static)`,t),null)}function kn(e){if(e===""){let n=u.cursor;return n&&n.nodeType===3&&n.data!==""?(u.cursor=n.nextSibling,n.data="",n):null}he();let t=u.cursor;return t&&t.nodeType===3?(u.cursor=t.nextSibling,t.nodeValue!==e&&(t.nodeValue=e),t):(xe&&t&&Te(`text ${JSON.stringify(e.slice(0,24))}`,t),null)}function Dn(e){he();let t=u.cursor;return t&&t.nodeType===8&&t.data===e?(u.cursor=t.nextSibling,t):(xe&&t&&Te(`marker <!--${e.slice(0,24)}-->`,t),null)}var Ot=!1;function _n(){Ot||(Ot=!0,ut({hydrateElement:On,hydrateText:kn,hydrateMarker:Dn,hydrateStatic:Ln}))}function Q(e,t,n){_n(),u.active=!0,u.cursor=t.firstChild,u.parents=[];let r=ge(),o=n?.resourceNamespace,i=0;Rn(()=>o?`${o}:r${i++}`:`r${i++}`),Mn(r?s=>s in r?{value:r[s]}:void 0:null);try{return de(e,t)}finally{u.active=!1,u.cursor=null,u.parents=[]}}var Ve="fluixi-island";function $n(e){let{component:t,props:n={},name:r}=e,o=ue(Ve),i=r??t.name??"Island";h(o,"name",i),h(o,"props",JSON.stringify(n??{}));let s=g?C():void 0;if(s){let a=s.nextIslandNamespace(i);E(o,()=>s.withResourceScope(a,()=>t(n)))}else E(o,()=>t(n));return o}var Lt=!1;function In(){if(Lt||typeof document>"u")return;Lt=!0;let e=document.createElement("style");e.textContent=`${Ve}{display:contents}`,document.head.appendChild(e)}function qn(e){if(typeof document>"u")return;In();let t=document.querySelectorAll(Ve),n=new Map;t.forEach(r=>{let o=r.getAttribute("name")??"",i=n.get(o)??0;n.set(o,i+1);let s=e[o];if(!s){typeof process>"u"&&console.warn(`[fluixi] island "${o}" has no component in the registry — left static.`);return}let a={};try{a=JSON.parse(r.getAttribute("props")||"{}")}catch{}Q(()=>s(a),r,{resourceNamespace:`${o}#${i}`})})}function jn(e,...t){throw new Error("html`` was not compiled — enable the lit format: fluixi({ format: 'lit' }).")}function Fn(e,...t){throw new Error("svg`` was not compiled — enable the lit format: fluixi({ format: 'lit' }).")}import{readChildren as Hn}from"@fluixi/reactive/signal";function Si(e,t={}){if(typeof e=="function")return pe(e,t);if(typeof e!="string"||e.length===0)return null;let n=Nt(e);if(g)return $().createElement(e,n);let r=n?document.createElementNS(U,e):document.createElement(e);return fe(r,t,n),Vn(r,t),r}function Vn(e,t){if(!t||t.children===void 0)return;let n=Hn(()=>t.children),r=o=>{E(e,o,typeof o=="function"?null:void 0)};Array.isArray(n)?n.forEach(r):r(n)}import{createChildOwner as Wn,createMemo as We,disposeScope as Un,getOwner as Bn,runWithOwner as Kn,untrack as $t}from"@fluixi/reactive/signal";function kt(e){return typeof e=="function"?e:(()=>e)}function M(e){return()=>{let t=e();return typeof t=="function"?t():t}}function Dt(e){return e!=null&&e!==!1}function _t(e){return!e||typeof e!="object"?!1:!!(typeof e._$litType$<"u"||typeof e._$litDirective$<"u"||Array.isArray(e.strings)&&Array.isArray(e.values))}function zn(e){let t=M(()=>e.when),n=We(t,void 0),r=We(n,void 0),o=Bn(),i=null,s=null,a=l=>{l!==s&&(i&&Un(i),i=Wn(o),s=l)};return We(()=>{let l=r();return a(l?"when":"fallback"),Kn(i,()=>{if(l){let c=e.children;return typeof c=="function"&&!_t(c)?typeof n=="function"?$t(()=>$t(n)?c(n()):e.fallback):c(n):c}return e.fallback});return e.fallback??null},void 0,{name:"show"})}import{mapArray as Gn,keyArray as Xn}from"@fluixi/reactive/signal";function Jn(e){let t=M(()=>e.each),n=()=>e.fallback??null,r=(o,i)=>{let s=e.children,a=Array.isArray(s)?s.map(l=>typeof l=="function"?l(o,i):l):typeof s=="function"?s(o,i):s;return K(a),a};return e.by?Xn(t,e.by,(o,i)=>r(o,i),{fallback:n}):Gn(t,(o,i)=>r(o,i),{fallback:n})}import{indexArray as Yn}from"@fluixi/reactive/signal";function Zn(e){let t=M(()=>e.each);return Yn(t,(n,r)=>{let o=e.children(n,r);return K(o),o},{fallback:()=>e.fallback??null})}import{mapArray as bs,keyArray as Es,indexArray as ws}from"@fluixi/reactive/signal";import{createMemo as Qn,createChildOwner as er,disposeScope as tr,getOwner as nr,runWithOwner as It}from"@fluixi/reactive/signal";var Ue=Symbol("match");function rr(e){return{[Ue]:!0,when:M(()=>e.when),get children(){return e.children}}}function or(e){let t=Array.isArray(e.children)?e.children:[e.children],n=nr(),r=null,o=-1,i=s=>{s!==o&&(r&&tr(r),r=er(n),o=s)};return Qn(()=>{for(let s=0;s<t.length;s+=1){let l=t[s],c=0;for(;typeof l=="function"&&!l[Ue]&&c++<10;)l=l();if(!l||typeof l!="object"||l[Ue]!==!0)continue;let f=l.when();if(Dt(f))return i(s),It(r,()=>typeof l.children=="function"?l.children(f):l.children)}return i(-2),It(r,()=>e.fallback??null)})}import{createMemo as ir,createChildOwner as sr,disposeScope as ar,getOwner as lr,runWithOwner as cr}from"@fluixi/reactive/signal";function ur(e){let t=kt(e.component),{component:n,...r}=e,o=lr(),i=null,s;return ir(()=>{let a=t();return a!==s&&(i&&ar(i),i=sr(o),s=a),a==null?null:typeof a=="string"?{tag:a,props:r}:cr(i,()=>a(r))})}import{createRoot as fr,onCleanup as dr}from"@fluixi/reactive/signal";function pr(e){let t=()=>e.mount?typeof e.mount=="function"?e.mount():e.mount:document.body,n,r;return fr(o=>{n=o,r=document.createElement("div"),r.style.display="contents",t().appendChild(r),E(r,e.children)&&F(e.ref,r)}),dr(()=>{n(),r.remove()}),null}import{createMemo as yr,createSignal as mr}from"@fluixi/reactive/signal";function qt(e){if(g)return e.fallback??null;let t=u.active,[n,r]=mr(!t);return t&&queueMicrotask(()=>r(!0)),yr(()=>n()?e.children:e.fallback??null,void 0,{name:"client-only"})}var gr=qt;import{createMemo as hr,createSignal as xr}from"@fluixi/reactive/signal";function Tr(e){let[t,n]=xr(null),r=()=>n(null);return hr(()=>{let o=t();if(o!==null)return typeof e.fallback=="function"?e.fallback(o,r):e.fallback;try{return typeof e.children=="function"?e.children():e.children}catch(i){return n(i),typeof e.fallback=="function"?e.fallback(i,r):e.fallback}})}import{createMemo as br}from"@fluixi/reactive/signal";function Er(e){return br(()=>{let t=typeof e=="function"?e():e,n=[];for(let[r,o]of Object.entries(t)){if(!r)continue;(typeof o=="function"?o():o)&&n.push(r)}return n.join(" ")})}import{createMemo as wr}from"@fluixi/reactive/signal";function Nr(e){return e.startsWith("--")?e:e.replace(/[A-Z]/g,t=>`-${t.toLowerCase()}`)}function Sr(e){return wr(()=>{let t=typeof e=="function"?e():e,n=[];for(let[r,o]of Object.entries(t)){if(!r)continue;let i=typeof o=="function"?o():o;i!=null&&n.push(`${Nr(r)}: ${i}`)}return n.join("; ")})}var Ee=1,ze=3,Ge=8,jt;jt=B;var H=class{constructor(){this[jt]=!0;this.parentNode=null;this.childNodes=[]}get firstChild(){return this.childNodes[0]??null}get lastChild(){return this.childNodes[this.childNodes.length-1]??null}get nextSibling(){let t=this.parentNode;if(!t)return null;let n=t.childNodes.indexOf(this);return n>=0?t.childNodes[n+1]??null:null}get previousSibling(){let t=this.parentNode;if(!t)return null;let n=t.childNodes.indexOf(this);return n>0?t.childNodes[n-1]??null:null}get parentElement(){return this.parentNode}appendChild(t){return t.parentNode&&t.parentNode.removeChild(t),t.parentNode=this,this.childNodes.push(t),t}insertBefore(t,n){if(n==null)return this.appendChild(t);t.parentNode&&t.parentNode.removeChild(t);let r=this.childNodes.indexOf(n);return t.parentNode=this,r<0?this.childNodes.push(t):this.childNodes.splice(r,0,t),t}removeChild(t){let n=this.childNodes.indexOf(t);return n>=0&&this.childNodes.splice(n,1),t.parentNode=null,t}replaceChild(t,n){let r=this.childNodes.indexOf(n);return r>=0&&(t.parentNode&&t.parentNode.removeChild(t),t.parentNode=this,this.childNodes[r]=t,n.parentNode=null),n}addEventListener(){}removeEventListener(){}},k=class e extends H{constructor(n){super();this.nodeType=ze;this.data=n}get nodeValue(){return this.data}set nodeValue(n){this.data=n==null?"":String(n)}get textContent(){return this.data}set textContent(n){this.data=n==null?"":String(n)}cloneNode(){return new e(this.data)}},be=class e extends H{constructor(n){super();this.nodeType=Ee;this.rawOuterHTML=n}get textContent(){return this.rawOuterHTML.replace(/<[^>]*>/g,"")}cloneNode(){return new e(this.rawOuterHTML)}},V=class e extends H{constructor(n){super();this.nodeType=Ge;this.data=n}get nodeValue(){return this.data}set nodeValue(n){this.data=n==null?"":String(n)}cloneNode(){return new e(this.data)}},Be=class{constructor(){this.cssText=""}setProperty(t,n){this[t]=n}removeProperty(t){delete this[t]}},Ke=class{constructor(t){this.el=t}list(){let t=this.el.getAttribute("class");return t?t.split(/\s+/).filter(Boolean):[]}write(t){t.length?this.el.setAttribute("class",t.join(" ")):this.el.removeAttribute("class")}add(...t){let n=this.list();for(let r of t)n.includes(r)||n.push(r);this.write(n)}remove(...t){this.write(this.list().filter(n=>!t.includes(n)))}contains(t){return this.list().includes(t)}toggle(t,n){let r=this.contains(t),o=n===void 0?!r:n;return o?this.add(t):this.remove(t),o}},D=class e extends H{constructor(n,r=!1){super();this.nodeType=Ee;this.attributes=new Map;this.style=new Be;this.classList=new Ke(this);this.rawHTML=null;this.localName=n.toLowerCase(),this.tagName=r?n:n.toUpperCase(),this.isSVG=r,this.namespaceURI=r?"http://www.w3.org/2000/svg":null}setAttribute(n,r){this.attributes.set(n,String(r))}removeAttribute(n){this.attributes.delete(n)}getAttribute(n){return this.attributes.has(n)?this.attributes.get(n):null}hasAttribute(n){return this.attributes.has(n)}get id(){return this.getAttribute("id")??""}set id(n){n==null?this.removeAttribute("id"):this.setAttribute("id",n)}get className(){return this.getAttribute("class")??""}set className(n){n==null?this.removeAttribute("class"):this.setAttribute("class",n)}get htmlFor(){return this.getAttribute("for")??""}set htmlFor(n){n==null?this.removeAttribute("for"):this.setAttribute("for",n)}set value(n){n==null?this.removeAttribute("value"):this.setAttribute("value",String(n))}set checked(n){n?this.setAttribute("checked",""):this.removeAttribute("checked")}set selected(n){n?this.setAttribute("selected",""):this.removeAttribute("selected")}set indeterminate(n){}get textContent(){return this.childNodes.map(n=>n.textContent??"").join("")}set textContent(n){for(let r of this.childNodes)r.parentNode=null;this.childNodes=[],this.rawHTML=null,n!=null&&n!==""&&this.appendChild(new k(String(n)))}set innerText(n){this.textContent=n}set innerHTML(n){for(let r of this.childNodes)r.parentNode=null;this.childNodes=[],this.rawHTML=n==null?"":String(n)}cloneNode(n=!1){let r=new e(this.localName,this.isSVG);if(r.attributes=new Map(this.attributes),r.style.cssText=this.style.cssText,r.rawHTML=this.rawHTML,n)for(let o of this.childNodes)r.appendChild(o.cloneNode(!0));return r}};var vr=new Set(["area","base","br","col","embed","hr","img","input","link","meta","param","source","track","wbr"]),Ht=/&/g,Vt=/</g,Wt=/>/g,Ar=/"/g;function Xe(e){return e.replace(Ht,"&").replace(Vt,"<").replace(Wt,">")}function Ft(e){return e.replace(Ht,"&").replace(Ar,""").replace(Vt,"<").replace(Wt,">")}function Cr(e){return e.startsWith("--")?e:e.replace(/[A-Z]/g,t=>"-"+t.toLowerCase())}function Rr(e){if(!e)return"";let t=[];e.cssText&&t.push(e.cssText.trim().replace(/;\s*$/,""));for(let n of Object.keys(e)){if(n==="cssText")continue;let r=e[n];r==null||r===""||t.push(`${Cr(n)}: ${r}`)}return t.join("; ")}function Mr(e){let t="",n=Rr(e.style);for(let[r,o]of e.attributes)r==="style"&&n||(t+=` ${r}="${Ft(o)}"`);if(n){let r=e.attributes.get("style"),o=r?`${r.replace(/;\s*$/,"")}; ${n}`:n;t+=` style="${Ft(o)}"`}return t}function S(e){if(e==null||e===!1||e===!0)return"";if(typeof e=="string")return Xe(e);if(typeof e=="number")return Xe(String(e));if(typeof e=="function")return S(e());if(Array.isArray(e))return e.map(S).join("");if(typeof e.rawOuterHTML=="string")return e.rawOuterHTML;switch(e.nodeType){case ze:return Xe(e.data??"");case Ge:return`<!--${e.data??""}-->`;case Ee:{let t=e.localName,n=`<${t}${Mr(e)}>`;if(vr.has(t))return n;let r=e.rawHTML!=null?e.rawHTML:(e.childNodes??[]).map(S).join("");return`${n}${r}</${t}>`}}return Array.isArray(e.childNodes)?e.childNodes.map(S).join(""):""}import{createRoot as Xt}from"@fluixi/reactive/signal";import{setResourceTracker as Lr,setResourceIdSource as kr,setResourceDataSink as Dr,getOwner as _r,runWithOwner as Kt,flush as $r}from"@fluixi/reactive/signal";var Pr=new Set(["area","base","br","col","embed","hr","img","input","link","meta","param","source","track","wbr"]),Or={amp:"&",lt:"<",gt:">",quot:'"',"#39":"'"};function Ut(e){return e.replace(/&(#?\w+);/g,(t,n)=>Or[n]??t)}var w=class extends Error{};function Bt(e,t=!1){let n=0,r=[],o=[],i=c=>{let f=o[o.length-1];f?f.appendChild(c):r.push(c)};for(;n<e.length;){let c=e.indexOf("<",n);if(c===-1){a(e.slice(n));break}if(c>n&&a(e.slice(n,c)),e.startsWith("<!--",c)){let f=e.indexOf("-->",c);if(f===-1)throw new w(`unterminated comment at ${c}`);i(new V(e.slice(c+4,f))),n=f+3;continue}if(e[c+1]==="/"){let f=e.indexOf(">",c);if(f===-1)throw new w(`unterminated closing tag at ${c}`);let d=e.slice(c+2,f).trim().toLowerCase(),p=o.pop();if(!p||p.localName!==d)throw new w(`</${d}> does not close <${p?.localName??"nothing"}>`);n=f+1;continue}n=l(c)}if(o.length>0)throw new w(`unclosed <${o[o.length-1].localName}>`);let s=r[0];if(r.length!==1||!(s instanceof D))throw new w(`expected exactly one root element, got ${r.length}`);return s;function a(c){c!==""&&i(new k(Ut(c)))}function l(c){let f=/[\s/>]/.exec(e.slice(c+1));if(!f)throw new w(`unterminated tag at ${c}`);let d=e.slice(c+1,c+1+f.index).toLowerCase(),p=new D(d,t),y=c+1+f.index;for(;y<e.length;){for(;y<e.length&&/\s/.test(e[y]);)y++;if(e[y]===">"){y++;break}if(e[y]==="/"&&e[y+1]===">"){y+=2;break}let we=y;for(;y<e.length&&!/[\s=/>]/.test(e[y]);)y++;let W=e.slice(we,y);if(W==="")throw new w(`malformed attribute at ${y}`);if(e[y]==="="){if(e[y+1]!=='"')throw new w(`attribute ${W} must have a double-quoted value`);let Ne=e.indexOf('"',y+2);if(Ne===-1)throw new w(`unterminated value for ${W}`);p.setAttribute(W,Ut(e.slice(y+2,Ne))),y=Ne+1}else p.setAttribute(W,"")}return i(p),Pr.has(d)||o.push(p),y}}var zt=!1;function Jt(){zt||(zt=!0,lt({createElement:(e,t)=>new D(e,t),createText:e=>new k(e),createRaw:e=>new be(e),parseTemplate:(e,t)=>Bt(e,t),createComment:e=>new V(e)}))}function Yt(e,t={}){let n=g;Jt(),_(!0);let r=J(t.event);try{return Y(r,()=>Xt(o=>{try{let i=typeof e=="function"?e():e;return S(i)}finally{o()}}))}finally{_(n)}}var Gt=!1;function Ir(){Gt||(Gt=!0,Lr(e=>{C()?.pending.add(e)}),kr(()=>C()?.nextResourceId()??""),Dr((e,t)=>{e&&C()?.data.set(e,t)}))}var Je=null;function Zt(e){Je=e}function Ye(e){if(e.data.size===0)return"";let t={};for(let[r,o]of e.data){let i=o;if(Je)try{i=Je(o,r)}catch{continue}i!==void 0&&(typeof i=="function"||typeof i=="symbol"||(t[r]=i))}if(Object.keys(t).length===0)return"";let n=me(JSON.stringify(t));return n==="{}"?"":`<script type="application/json" id="${Z}">${n}<\/script>`}var qr=50;async function Qt(e,t={}){let n=g;Jt(),_(!0),Ir();let r=J(t.event);try{return await Y(r,async()=>{t.preload&&await t.preload(t.event);let o,i=null,s=()=>{};Xt(f=>{s=f,i=_r(),o=typeof e=="function"?e():e});let a=()=>{try{Kt(i,()=>S(o))}catch{}};a();let l=0;for(;r.pending.size>0&&l++<qr;){let f=Array.from(r.pending);r.pending.clear(),await Promise.allSettled(f),await $r(),a()}let c=Kt(i,()=>S(o))+Ye(r);return s(),c})}finally{_(n)}}var jr={createComponent:pe,createElement:ot,createNativeElement:ue,createTemplate:$e,cloneTemplate:Ie,templateNode:pt,holeContent:gt,holeEnd:mt,holeScope:yt,createPortal:wt,render:de,hydrate:Q,insert:E,appendChildren:st,removeChildren:it,spread:bt,applyProps:fe,mergeProps:Et,bindPair:St,setProperty:q,setDynamicProperty:X,setAttribute:h,setDynamicAttribute:G,removeAttribute:rt,getAttribute:nt,setClassName:j,addClass:Qe,removeClass:et,toggleClass:tt,setStyles:Ae,delegateEvents:ce,addDelegatedEventListener:_e,removeDelegatedEventListener:oe,handleRef:F,resetIntegration:At,isIntegrationInitialized:vt},aa=jr;export{qt as ClientOnly,ur as Dynamic,Tr as ErrorBoundary,Z as FX_DATA_ID,Jn as For,Zn as Index,$n as Island,ve as JSX_PROPERTIES,rr as Match,gr as NoSsr,pr as Portal,Br as SVG_ELEMENTS,U as SVG_NAMESPACE,zn as Show,or as Switch,Ce as VERSION,Ur as VOID_ELEMENTS,Qe as addClass,_e as addDelegatedEventListener,ht as addNativeEventListener,st as appendChildren,Se as applyElementProp,fe as applyProps,xt as applyUse,at as asComponent,bo as asContext,xo as asOutlet,To as asProvider,ho as asRoute,mo as asRouter,go as asRoutes,Eo as asSuspense,St as bindPair,pn as captureHydrationCursor,wo as checkRenderType,Er as classMap,P as cleanChildren,Ie as cloneTemplate,zr as closest,pe as createComponent,Si as createDynamicElement,ot as createElement,ue as createNativeElement,wt as createPortal,J as createRequestContext,$e as createTemplate,aa as default,Qr as delegate,ce as delegateEvents,me as escapeFxJson,Vo as escapeHTML,qo as fnName,_o as generateID,nt as getAttribute,lo as getGlobal,Vr as getLitEventName,Pt as getLocals,Zr as getOffset,C as getRequestContext,je as getRequestEvent,Fe as getRequestLocals,ge as getServerData,Do as getStableElementId,Xr as getStyle,F as handleRef,Gr as hasClass,gt as holeContent,mt as holeEnd,yt as holeScope,jn as html,Q as hydrate,K as hydrateAdvancePast,qn as hydrateIslands,ws as indexArray,Go as initializeIntegration,E as insert,ie as insertExpression,Xo as intergartionInitialized,Wo as isAccessor,N as isComponent,fn as isContext,en as isCustomElement,so as isDOMNode,$o as isDelegatedEvent,Oe as isDomElement,I as isDomNode,Le as isDomText,Hr as isEventHandler,Io as isFunction,vt as isIntegrationInitialized,io as isJSXTemplate,nn as isLitTemplateResult,Ho as isNativeElement,cn as isOutlet,ne as isPromise,un as isProvider,ro as isReactElement,ln as isRoute,sn as isRouter,an as isRoutes,Nt as isSVGElement,g as isServer,dn as isSuspense,oo as isTemplateFactory,Jr as isVisible,jo as iterateFn,Es as keyArray,En as makeArrayFlat,bs as mapArray,Et as mergeProps,to as observeIntersection,no as observeResize,Ze as query,Kr as queryAll,on as registerCoreVersion,zo as registerCreateComponent,ao as registerGlobal,rt as removeAttribute,it as removeChildren,et as removeClass,oe as removeDelegatedEventListener,de as render,Yt as renderToString,Qt as renderToStringAsync,At as resetIntegration,te as runHydrationAt,Y as runWithRequestContext,yn as runWithoutHydration,Yr as scrollIntoView,S as serializeNode,Ye as serializeResourceData,h as setAttribute,se as setClassList,j as setClassName,Zt as setDataRedactor,G as setDynamicAttribute,Tt as setDynamicBoolAttribute,X as setDynamicProperty,q as setProperty,Mt as setRequestStore,_ as setServerMode,ae as setStyle,Ae as setStyles,Wr as shouldSetAsProperty,Fo as splitProps,bt as spread,Re as stampVersions,Sr as styleMap,Fn as svg,pt as templateNode,Fr as toAttributeName,tt as toggleClass,x as versions,eo as waitForElement,Me as warnOnVersionSkew};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var _=Object.defineProperty;var Q=Object.getOwnPropertyDescriptor;var Z=Object.getOwnPropertyNames;var ee=Object.prototype.hasOwnProperty;var ne=(n,e)=>{for(var t in e)_(n,t,{get:e[t],enumerable:!0})},te=(n,e,t,i)=>{if(e&&typeof e=="object"||typeof e=="function")for(let c of Z(e))!ee.call(n,c)&&c!==t&&_(n,c,{get:()=>e[c],enumerable:!(i=Q(e,c))||i.enumerable});return n};var oe=n=>te(_({},"__esModule",{value:!0}),n);var he={};ne(he,{hydrate:()=>pe});module.exports=oe(he);var x=require("@fluixi/reactive/signal");var $="1.0.0-alpha.
|
|
1
|
+
"use strict";var _=Object.defineProperty;var Q=Object.getOwnPropertyDescriptor;var Z=Object.getOwnPropertyNames;var ee=Object.prototype.hasOwnProperty;var ne=(n,e)=>{for(var t in e)_(n,t,{get:e[t],enumerable:!0})},te=(n,e,t,i)=>{if(e&&typeof e=="object"||typeof e=="function")for(let c of Z(e))!ee.call(n,c)&&c!==t&&_(n,c,{get:()=>e[c],enumerable:!(i=Q(e,c))||i.enumerable});return n};var oe=n=>te(_({},"__esModule",{value:!0}),n);var he={};ne(he,{hydrate:()=>pe});module.exports=oe(he);var x=require("@fluixi/reactive/signal");var $="1.0.0-alpha.82";var D=require("@fluixi/reactive/version"),h={dom:$,reactive:D.VERSION};function O(n){h.core&&n.setAttribute("fluixi",h.core),n.setAttribute("fx-dom",h.dom),n.setAttribute("fx-reactive",h.reactive),typeof globalThis<"u"&&(globalThis.Fluixi=h)}function F(){let n=[h.core,h.dom,h.reactive].filter(e=>e!==void 0);new Set(n).size<=1||console.warn(`[fluixi] package versions disagree — core ${h.core??"(absent)"}, dom ${h.dom}, reactive ${h.reactive}. These ship as one release, so a mismatch usually means a stale lockfile or two copies resolved side by side. Reinstall, or check for duplicates with \`pnpm why @fluixi/dom\`.`)}function E(n){return typeof n=="function"&&n[Symbol.for("fluixi-component")]===!0}var g=require("@fluixi/reactive/signal");var j=typeof document>"u";var V=Symbol.for("fluixi.server-node"),H=null;function I(){if(!H)throw new Error("[fluixi] server render ran before @fluixi/dom/server loaded");return H}function L(n){return n!=null&&n[V]===!0?!0:typeof Node<"u"&&n instanceof Node}function W(n){return n!=null&&n[V]===!0?n.nodeType===3:typeof Text<"u"&&n instanceof Text}var u={active:!1,cursor:null,parents:[]},K=null;function B(n){K=n}function X(){return K}function R(n,e){return u.active&&e.parentNode===n}function q(n){let e=u.parents.lastIndexOf(n);e!==-1&&(u.parents.length=e),u.cursor=n.nextSibling}function b(n,e=!1){if(j)return I().createText(n);if(u.active&&!e){let t=X()?.hydrateText(n);if(t)return t}return document.createTextNode(n)}var N=0,re=200;function ie(n,e,t,i,c){let f=i,s=new Map;return(0,g.createRenderEffect)(()=>{let r;if(E(n)&&!(0,x.isSignal)(n)){if(!s.has(n)){N++;try{let o=n();s.set(n,o)}finally{N--}}for(r=s.get(n);typeof r=="function"&&(0,x.isSignal)(r);)r=r()}else for(r=n();typeof r=="function"&&(0,x.isSignal)(r);)r=r();{let o=0;for(;typeof r=="function"&&o++<50;)if(E(r)){if(!s.has(r)){let a=r;N++;try{let l=a();s.set(a,l)}finally{N--}}r=s.get(r)}else if((0,x.isSignal)(r))r=r();else if(r=r(),typeof r!="function"||!(0,x.isSignal)(r)&&!E(r))break}N++;try{f=S(e,r,t,f,s),c(f)}finally{N--}})}function J(n,e,t,i){if(N>re)return console.error("[insert] Exceeded max call depth — possible infinite loop."),()=>null;t!==void 0&&!t&&(t=b("",!0),n.appendChild(t));let c=i??null,f=o=>Array.isArray(o)&&o.some(a=>typeof a=="function"),s=o=>typeof o=="function"?o:()=>o;if(typeof e!="function"&&!f(e)){N++;try{c=S(n,e,t,c)}finally{N--}return()=>c}let r=ie(s(e),n,t,c,o=>{c=o});return()=>(r?.(),c)}function S(n,e,t,i,c){if(e==null||typeof e=="boolean")return T(n,i,t);if(typeof e=="function")for(;typeof e=="function";)e=e();if(e==null||typeof e=="boolean")return T(n,i,t);if(w(e)){let s=b("",!0);return Array.isArray(i)?i.length>0?(n.replaceChild(s,i[0]),T(n,i.slice(1),t)):p(n,s,t):i?n.replaceChild(s,i):p(n,s,t),e.then(r=>{s.parentNode===n&&S(n,r,s.nextSibling,s)}).catch(r=>{console.error("Error resolving promise in insertExpression:",r)}),s}let f=typeof e;if(f==="string"||f==="number"){if(f==="number"&&(e=String(e)),Array.isArray(i)){if(i.length===0){let r=b(e);return p(n,r,t),r}if(i.length===1&&i[0].nodeType===3)return i[0].data=e,i;i=T(n,i,t)}if(i&&W(i))return i.data=e,i;let s=b(e);return i&&i.parentNode===n?n.replaceChild(s,i):R(n,s)||p(n,s,t),s}if(L(e))return R(n,e)?(q(e),e):Array.isArray(i)?(i.length===0?p(n,e,t):i[0].parentNode===n?(n.replaceChild(e,i[0]),T(n,i.slice(1),t)):p(n,e,t),e):(i?i!==e&&(i.parentNode===n?n.replaceChild(e,i):p(n,e,t)):p(n,e,t),e);if(Array.isArray(e)){let s=[],r=Array.isArray(i)?i:i?[i]:[],o=[];m(e,s,n,t,!0,c,o);let a=se(n,r,s,t);for(let l of o){let d=J(n,l.sig,l.marker);(0,g.onCleanup)(()=>{T(n,d()),l.marker.parentNode===n&&n.removeChild(l.marker)})}return a}if(f==="object"&&e!==null&&typeof e=="object"){let s=e;if("type"in s&&"props"in s){let r=s;if(typeof r.type=="function"){let o=r.type(r.props||{});return S(n,o,t,i)}}}return T(n,i,t)}function m(n,e,t,i,c=!0,f,s){for(let r=0;r<n.length;r++){let o=n[r];if(!(o==null||typeof o=="boolean")){for(;typeof o=="function"&&!w(o)&&!(0,x.isSignal)(o)&&!E(o)&&(o=o(),!(o==null||typeof o=="boolean")););if(!(o==null||typeof o=="boolean")){if(typeof o=="function"){let a;for(E(o)&&!(0,x.isSignal)(o)?(f||(f=new Map),f.has(o)||f.set(o,o()),a=f.get(o)):a=o();typeof a=="function"&&!w(a)&&!(0,x.isSignal)(a)&&!E(a);)f||(f=new Map),f.has(a)||f.set(a,a()),a=f.get(a);if(a==null||typeof a=="boolean")continue;if(typeof a=="function"){if((0,x.isSignal)(a)){if(s){let d=b("",!0);e.push(d),s.push({marker:d,sig:a});continue}let l=a();for(;typeof l=="function"&&(0,x.isSignal)(l);)l=l();if(l==null||typeof l=="boolean")continue;Array.isArray(l)?m(l,e,t,i,c,f):m([l],e,t,i,c,f);continue}continue}Array.isArray(a)?m(a,e,t,i,c,f,s):m([a],e,t,i,c,f,s);continue}if(w(o)){let a=b("",!0);e.push(a),o.then(l=>{if(a.parentNode){let d=[];if(m([l],d,a.parentNode,void 0,!1,f),d.length>0){a.parentNode.replaceChild(d[0],a);for(let y=1;y<d.length;y++)a.parentNode?.insertBefore(d[y],d[y-1].nextSibling)}}}).catch(l=>console.error("Error resolving promise in array:",l));continue}if(Array.isArray(o)){m(o,e,t,i,c,f,s);continue}if(L(o)){e.push(o);continue}if(typeof o=="object"&&o!==null&&"type"in o&&"props"in o){let a=o;if(typeof a.type=="function"){let l=a.type(a.props||{});Array.isArray(l)?m(l,e,t,i,!1,f):m([l],e,t,i,!1,f);continue}}if(typeof o=="string"||typeof o=="number"){let a=String(o);if(a.trim()===""&&a!==" ")continue;e.push(b(a));continue}e.push(b(String(o)))}}}}function se(n,e,t,i){for(let d=0;d<t.length;d++){let y=t[d].parentNode;y!==null&&y!==n&&y.nodeType!==11&&(t=t.slice(),t[d]=t[d].cloneNode(!0))}let c=t.length,f=e.length,s=c,r=0,o=0,a=f>0?e[f-1].nextSibling??void 0:i,l=null;for(;r<f||o<s;){if(e[r]===t[o]){r++,o++;continue}for(;f>r&&s>o&&e[f-1]===t[s-1];)f--,s--;if(f===r){let d=s<c?o?t[o-1].nextSibling??void 0:t[s-o]:a;for(;o<s;)p(n,t[o++],d)}else if(s===o)for(;r<f;)(!l||!l.has(e[r]))&&e[r].parentNode===n&&n.removeChild(e[r]),r++;else if(e[r]===t[s-1]&&t[o]===e[f-1]){let d=e[--f].nextSibling;p(n,t[o++],e[r++].nextSibling),p(n,t[--s],d),e[f]=e[r-1]}else{if(!l){l=new Map;let y=o;for(;y<s;)l.set(t[y],y++)}let d=l.get(e[r]);if(d!=null)if(o<d&&d<s){let y=r,k=1;for(;++y<f&&y<s&&!(!l.has(e[y])||l.get(e[y])!==d+k);)k++;if(k>d-o){let Y=e[r];for(;o<d;)p(n,t[o++],Y)}else e[r].parentNode===n?n.replaceChild(t[o++],e[r++]):(p(n,t[o++],a),r++)}else r++;else e[r].parentNode===n&&n.removeChild(e[r]),r++}}return t}function T(n,e,t){if(e)if(Array.isArray(e))for(let i=0;i<e.length;i++)e[i].parentNode===n&&n.removeChild(e[i]);else e.parentNode===n&&n.removeChild(e);return null}function p(n,e,t){u.active&&e.parentNode===n||(t&&t.parentNode===n?n.insertBefore(e,t):n.appendChild(e))}function w(n){return n!=null&&(typeof n=="object"||typeof n=="function")&&typeof n.then=="function"||n instanceof Promise}function U(n,e,t){if(!e)throw new Error("Container element is required");let i,c,f=[];return(0,g.createRoot)(s=>{(0,g.batch)(()=>{u.active||(e.textContent=""),O(e),F(),J(e,n)}),c=s}),()=>{c?.(),i?.(),f.forEach(s=>s()),e.textContent=""}}var A=require("@fluixi/reactive/signal");var fe="__FX_DATA__";var M;function z(){let n=globalThis.__FX_DATA__;if(n)return n;if(M!==void 0)return M;let e=null;if(typeof document<"u"){let t=document.getElementById(fe)?.textContent;if(t)try{e=JSON.parse(t)}catch{e=null}}return M=e}function v(){for(;;){for(;u.cursor&&u.cursor.nodeType===3&&u.cursor.data==="";)u.cursor=u.cursor.nextSibling;if(u.cursor!=null||!u.parents.length)return;u.cursor=u.parents.pop().nextSibling}}var ae=new Set(["area","base","br","col","embed","hr","img","input","link","meta","param","source","track","wbr"]),C=typeof process<"u"&&process.env&&!1;function P(n,e){let t=e.nodeType===1?`<${e.tagName.toLowerCase()}>`:e.nodeType===3?`text ${JSON.stringify((e.nodeValue??"").slice(0,24))}`:e.nodeType===8?"comment":"node";console.warn(`[fluixi] hydration mismatch: expected ${n} but the server DOM has ${t}. 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 ue(n){v();let e=u.cursor;return e&&e.nodeType===1&&e.tagName.toLowerCase()===n.toLowerCase()?(ae.has(n.toLowerCase())?u.cursor=e.nextSibling:(u.parents.push(e),u.cursor=e.firstChild),e):(C&&e&&P(`<${n}>`,e),null)}function le(n){v();let e=u.cursor;return e&&e.nodeType===1&&e.tagName.toLowerCase()===n.toLowerCase()?(u.cursor=e.nextSibling,e):(C&&e&&P(`<${n}> (static)`,e),null)}function ce(n){if(n===""){let t=u.cursor;return t&&t.nodeType===3&&t.data!==""?(u.cursor=t.nextSibling,t.data="",t):null}v();let e=u.cursor;return e&&e.nodeType===3?(u.cursor=e.nextSibling,e.nodeValue!==n&&(e.nodeValue=n),e):(C&&e&&P(`text ${JSON.stringify(n.slice(0,24))}`,e),null)}function de(n){v();let e=u.cursor;return e&&e.nodeType===8&&e.data===n?(u.cursor=e.nextSibling,e):(C&&e&&P(`marker <!--${n.slice(0,24)}-->`,e),null)}var G=!1;function ye(){G||(G=!0,B({hydrateElement:ue,hydrateText:ce,hydrateMarker:de,hydrateStatic:le}))}function pe(n,e,t){ye(),u.active=!0,u.cursor=e.firstChild,u.parents=[];let i=z(),c=t?.resourceNamespace,f=0;(0,A.setResourceIdSource)(()=>c?`${c}:r${f++}`:`r${f++}`),(0,A.setServerDataGetter)(i?s=>s in i?{value:i[s]}:void 0:null);try{return U(n,e)}finally{u.active=!1,u.cursor=null,u.parents=[]}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{isSignal as x}from"@fluixi/reactive/signal";var L="1.0.0-alpha.
|
|
1
|
+
import{isSignal as x}from"@fluixi/reactive/signal";var L="1.0.0-alpha.82";import{VERSION as U}from"@fluixi/reactive/version";var h={dom:L,reactive:U};function R(n){h.core&&n.setAttribute("fluixi",h.core),n.setAttribute("fx-dom",h.dom),n.setAttribute("fx-reactive",h.reactive),typeof globalThis<"u"&&(globalThis.Fluixi=h)}function M(){let n=[h.core,h.dom,h.reactive].filter(e=>e!==void 0);new Set(n).size<=1||console.warn(`[fluixi] package versions disagree — core ${h.core??"(absent)"}, dom ${h.dom}, reactive ${h.reactive}. These ship as one release, so a mismatch usually means a stale lockfile or two copies resolved side by side. Reinstall, or check for duplicates with \`pnpm why @fluixi/dom\`.`)}function b(n){return typeof n=="function"&&n[Symbol.for("fluixi-component")]===!0}import{batch as z,createEffect as Se,createRenderEffect as G,createRoot as Y,onCleanup as Q,readChildren as Ae}from"@fluixi/reactive/signal";var D=typeof document>"u";var O=Symbol.for("fluixi.server-node"),$=null;function F(){if(!$)throw new Error("[fluixi] server render ran before @fluixi/dom/server loaded");return $}function P(n){return n!=null&&n[O]===!0?!0:typeof Node<"u"&&n instanceof Node}function H(n){return n!=null&&n[O]===!0?n.nodeType===3:typeof Text<"u"&&n instanceof Text}var u={active:!1,cursor:null,parents:[]},j=null;function V(n){j=n}function I(){return j}function k(n,e){return u.active&&e.parentNode===n}function W(n){let e=u.parents.lastIndexOf(n);e!==-1&&(u.parents.length=e),u.cursor=n.nextSibling}function N(n,e=!1){if(D)return F().createText(n);if(u.active&&!e){let t=I()?.hydrateText(n);if(t)return t}return document.createTextNode(n)}var m=0,Z=200;function ee(n,e,t,i,d){let f=i,s=new Map;return G(()=>{let r;if(b(n)&&!x(n)){if(!s.has(n)){m++;try{let o=n();s.set(n,o)}finally{m--}}for(r=s.get(n);typeof r=="function"&&x(r);)r=r()}else for(r=n();typeof r=="function"&&x(r);)r=r();{let o=0;for(;typeof r=="function"&&o++<50;)if(b(r)){if(!s.has(r)){let a=r;m++;try{let l=a();s.set(a,l)}finally{m--}}r=s.get(r)}else if(x(r))r=r();else if(r=r(),typeof r!="function"||!x(r)&&!b(r))break}m++;try{f=w(e,r,t,f,s),d(f)}finally{m--}})}function K(n,e,t,i){if(m>Z)return console.error("[insert] Exceeded max call depth — possible infinite loop."),()=>null;t!==void 0&&!t&&(t=N("",!0),n.appendChild(t));let d=i??null,f=o=>Array.isArray(o)&&o.some(a=>typeof a=="function"),s=o=>typeof o=="function"?o:()=>o;if(typeof e!="function"&&!f(e)){m++;try{d=w(n,e,t,d)}finally{m--}return()=>d}let r=ee(s(e),n,t,d,o=>{d=o});return()=>(r?.(),d)}function w(n,e,t,i,d){if(e==null||typeof e=="boolean")return E(n,i,t);if(typeof e=="function")for(;typeof e=="function";)e=e();if(e==null||typeof e=="boolean")return E(n,i,t);if(T(e)){let s=N("",!0);return Array.isArray(i)?i.length>0?(n.replaceChild(s,i[0]),E(n,i.slice(1),t)):p(n,s,t):i?n.replaceChild(s,i):p(n,s,t),e.then(r=>{s.parentNode===n&&w(n,r,s.nextSibling,s)}).catch(r=>{console.error("Error resolving promise in insertExpression:",r)}),s}let f=typeof e;if(f==="string"||f==="number"){if(f==="number"&&(e=String(e)),Array.isArray(i)){if(i.length===0){let r=N(e);return p(n,r,t),r}if(i.length===1&&i[0].nodeType===3)return i[0].data=e,i;i=E(n,i,t)}if(i&&H(i))return i.data=e,i;let s=N(e);return i&&i.parentNode===n?n.replaceChild(s,i):k(n,s)||p(n,s,t),s}if(P(e))return k(n,e)?(W(e),e):Array.isArray(i)?(i.length===0?p(n,e,t):i[0].parentNode===n?(n.replaceChild(e,i[0]),E(n,i.slice(1),t)):p(n,e,t),e):(i?i!==e&&(i.parentNode===n?n.replaceChild(e,i):p(n,e,t)):p(n,e,t),e);if(Array.isArray(e)){let s=[],r=Array.isArray(i)?i:i?[i]:[],o=[];g(e,s,n,t,!0,d,o);let a=ne(n,r,s,t);for(let l of o){let c=K(n,l.sig,l.marker);Q(()=>{E(n,c()),l.marker.parentNode===n&&n.removeChild(l.marker)})}return a}if(f==="object"&&e!==null&&typeof e=="object"){let s=e;if("type"in s&&"props"in s){let r=s;if(typeof r.type=="function"){let o=r.type(r.props||{});return w(n,o,t,i)}}}return E(n,i,t)}function g(n,e,t,i,d=!0,f,s){for(let r=0;r<n.length;r++){let o=n[r];if(!(o==null||typeof o=="boolean")){for(;typeof o=="function"&&!T(o)&&!x(o)&&!b(o)&&(o=o(),!(o==null||typeof o=="boolean")););if(!(o==null||typeof o=="boolean")){if(typeof o=="function"){let a;for(b(o)&&!x(o)?(f||(f=new Map),f.has(o)||f.set(o,o()),a=f.get(o)):a=o();typeof a=="function"&&!T(a)&&!x(a)&&!b(a);)f||(f=new Map),f.has(a)||f.set(a,a()),a=f.get(a);if(a==null||typeof a=="boolean")continue;if(typeof a=="function"){if(x(a)){if(s){let c=N("",!0);e.push(c),s.push({marker:c,sig:a});continue}let l=a();for(;typeof l=="function"&&x(l);)l=l();if(l==null||typeof l=="boolean")continue;Array.isArray(l)?g(l,e,t,i,d,f):g([l],e,t,i,d,f);continue}continue}Array.isArray(a)?g(a,e,t,i,d,f,s):g([a],e,t,i,d,f,s);continue}if(T(o)){let a=N("",!0);e.push(a),o.then(l=>{if(a.parentNode){let c=[];if(g([l],c,a.parentNode,void 0,!1,f),c.length>0){a.parentNode.replaceChild(c[0],a);for(let y=1;y<c.length;y++)a.parentNode?.insertBefore(c[y],c[y-1].nextSibling)}}}).catch(l=>console.error("Error resolving promise in array:",l));continue}if(Array.isArray(o)){g(o,e,t,i,d,f,s);continue}if(P(o)){e.push(o);continue}if(typeof o=="object"&&o!==null&&"type"in o&&"props"in o){let a=o;if(typeof a.type=="function"){let l=a.type(a.props||{});Array.isArray(l)?g(l,e,t,i,!1,f):g([l],e,t,i,!1,f);continue}}if(typeof o=="string"||typeof o=="number"){let a=String(o);if(a.trim()===""&&a!==" ")continue;e.push(N(a));continue}e.push(N(String(o)))}}}}function ne(n,e,t,i){for(let c=0;c<t.length;c++){let y=t[c].parentNode;y!==null&&y!==n&&y.nodeType!==11&&(t=t.slice(),t[c]=t[c].cloneNode(!0))}let d=t.length,f=e.length,s=d,r=0,o=0,a=f>0?e[f-1].nextSibling??void 0:i,l=null;for(;r<f||o<s;){if(e[r]===t[o]){r++,o++;continue}for(;f>r&&s>o&&e[f-1]===t[s-1];)f--,s--;if(f===r){let c=s<d?o?t[o-1].nextSibling??void 0:t[s-o]:a;for(;o<s;)p(n,t[o++],c)}else if(s===o)for(;r<f;)(!l||!l.has(e[r]))&&e[r].parentNode===n&&n.removeChild(e[r]),r++;else if(e[r]===t[s-1]&&t[o]===e[f-1]){let c=e[--f].nextSibling;p(n,t[o++],e[r++].nextSibling),p(n,t[--s],c),e[f]=e[r-1]}else{if(!l){l=new Map;let y=o;for(;y<s;)l.set(t[y],y++)}let c=l.get(e[r]);if(c!=null)if(o<c&&c<s){let y=r,C=1;for(;++y<f&&y<s&&!(!l.has(e[y])||l.get(e[y])!==c+C);)C++;if(C>c-o){let J=e[r];for(;o<c;)p(n,t[o++],J)}else e[r].parentNode===n?n.replaceChild(t[o++],e[r++]):(p(n,t[o++],a),r++)}else r++;else e[r].parentNode===n&&n.removeChild(e[r]),r++}}return t}function E(n,e,t){if(e)if(Array.isArray(e))for(let i=0;i<e.length;i++)e[i].parentNode===n&&n.removeChild(e[i]);else e.parentNode===n&&n.removeChild(e);return null}function p(n,e,t){u.active&&e.parentNode===n||(t&&t.parentNode===n?n.insertBefore(e,t):n.appendChild(e))}function T(n){return n!=null&&(typeof n=="object"||typeof n=="function")&&typeof n.then=="function"||n instanceof Promise}function B(n,e,t){if(!e)throw new Error("Container element is required");let i,d,f=[];return Y(s=>{z(()=>{u.active||(e.textContent=""),R(e),M(),K(e,n)}),d=s}),()=>{d?.(),i?.(),f.forEach(s=>s()),e.textContent=""}}import{setResourceIdSource as oe,setServerDataGetter as re}from"@fluixi/reactive/signal";var te="__FX_DATA__";var _;function X(){let n=globalThis.__FX_DATA__;if(n)return n;if(_!==void 0)return _;let e=null;if(typeof document<"u"){let t=document.getElementById(te)?.textContent;if(t)try{e=JSON.parse(t)}catch{e=null}}return _=e}function S(){for(;;){for(;u.cursor&&u.cursor.nodeType===3&&u.cursor.data==="";)u.cursor=u.cursor.nextSibling;if(u.cursor!=null||!u.parents.length)return;u.cursor=u.parents.pop().nextSibling}}var ie=new Set(["area","base","br","col","embed","hr","img","input","link","meta","param","source","track","wbr"]),A=typeof process<"u"&&process.env&&!1;function v(n,e){let t=e.nodeType===1?`<${e.tagName.toLowerCase()}>`:e.nodeType===3?`text ${JSON.stringify((e.nodeValue??"").slice(0,24))}`:e.nodeType===8?"comment":"node";console.warn(`[fluixi] hydration mismatch: expected ${n} but the server DOM has ${t}. 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 se(n){S();let e=u.cursor;return e&&e.nodeType===1&&e.tagName.toLowerCase()===n.toLowerCase()?(ie.has(n.toLowerCase())?u.cursor=e.nextSibling:(u.parents.push(e),u.cursor=e.firstChild),e):(A&&e&&v(`<${n}>`,e),null)}function fe(n){S();let e=u.cursor;return e&&e.nodeType===1&&e.tagName.toLowerCase()===n.toLowerCase()?(u.cursor=e.nextSibling,e):(A&&e&&v(`<${n}> (static)`,e),null)}function ae(n){if(n===""){let t=u.cursor;return t&&t.nodeType===3&&t.data!==""?(u.cursor=t.nextSibling,t.data="",t):null}S();let e=u.cursor;return e&&e.nodeType===3?(u.cursor=e.nextSibling,e.nodeValue!==n&&(e.nodeValue=n),e):(A&&e&&v(`text ${JSON.stringify(n.slice(0,24))}`,e),null)}function ue(n){S();let e=u.cursor;return e&&e.nodeType===8&&e.data===n?(u.cursor=e.nextSibling,e):(A&&e&&v(`marker <!--${n.slice(0,24)}-->`,e),null)}var q=!1;function le(){q||(q=!0,V({hydrateElement:se,hydrateText:ae,hydrateMarker:ue,hydrateStatic:fe}))}function De(n,e,t){le(),u.active=!0,u.cursor=e.firstChild,u.parents=[];let i=X(),d=t?.resourceNamespace,f=0;oe(()=>d?`${d}:r${f++}`:`r${f++}`),re(i?s=>s in i?{value:i[s]}:void 0:null);try{return B(n,e)}finally{u.active=!1,u.cursor=null,u.parents=[]}}export{De as hydrate};
|
package/dist/lib/dom/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var ee=Object.defineProperty;var Ve=Object.getOwnPropertyDescriptor;var We=Object.getOwnPropertyNames;var Ke=Object.prototype.hasOwnProperty;var Be=(e,t)=>{for(var n in t)ee(e,n,{get:t[n],enumerable:!0})},Ge=(e,t,n,o)=>{if(t&&typeof t=="object"||typeof t=="function")for(let r of We(t))!Ke.call(e,r)&&r!==n&&ee(e,r,{get:()=>t[r],enumerable:!(o=Ve(t,r))||o.enumerable});return e};var Je=e=>Ge(ee({},"__esModule",{value:!0}),e);var xn={};Be(xn,{Island:()=>He,JSX_PROPERTIES:()=>D,SVG_ELEMENTS:()=>Qe,SVG_NAMESPACE:()=>O,VOID_ELEMENTS:()=>Ze,addClass:()=>nt,addDelegatedEventListener:()=>Me,addNativeEventListener:()=>fe,appendChildren:()=>ct,applyElementProp:()=>k,applyProps:()=>Kt,applyUse:()=>ue,bindPair:()=>Zt,captureHydrationCursor:()=>Ae,cleanChildren:()=>w,cloneTemplate:()=>$e,closest:()=>tt,createComponent:()=>nn,createElement:()=>ut,createNativeElement:()=>ae,createPortal:()=>Jt,createTemplate:()=>_e,delegate:()=>mt,delegateEvents:()=>se,escapeHTML:()=>Ut,fnName:()=>Ft,generateID:()=>Lt,getAttribute:()=>st,getGlobal:()=>vt,getLitEventName:()=>Ue,getOffset:()=>yt,getStableElementId:()=>Rt,getStyle:()=>ft,handleRef:()=>ce,hasClass:()=>it,holeContent:()=>Dt,holeEnd:()=>kt,holeScope:()=>Ot,hydrate:()=>Z,hydrateAdvancePast:()=>Le,hydrateIslands:()=>je,initializeIntegration:()=>tn,insert:()=>A,insertExpression:()=>P,intergartionInitialized:()=>on,isAccessor:()=>Yt,isCustomElement:()=>me,isDOMNode:()=>wt,isDelegatedEvent:()=>_t,isDomElement:()=>H,isDomNode:()=>v,isDomText:()=>j,isEventHandler:()=>ze,isFunction:()=>$t,isIntegrationInitialized:()=>rn,isJSXTemplate:()=>Tt,isLitTemplateResult:()=>xe,isNativeElement:()=>Xt,isPromise:()=>L,isReactElement:()=>bt,isSVGElement:()=>zt,isServer:()=>E,isTemplateFactory:()=>Nt,isVisible:()=>dt,iterateFn:()=>Ht,makeArrayFlat:()=>Ie,mergeProps:()=>Bt,observeIntersection:()=>xt,observeResize:()=>ht,query:()=>te,queryAll:()=>et,registerCreateComponent:()=>en,registerGlobal:()=>St,removeAttribute:()=>at,removeChildren:()=>lt,removeClass:()=>ot,removeDelegatedEventListener:()=>ie,render:()=>de,resetIntegration:()=>sn,runHydrationAt:()=>R,runWithoutHydration:()=>Re,scrollIntoView:()=>pt,setAttribute:()=>x,setClassList:()=>$,setClassName:()=>_,setDynamicAttribute:()=>W,setDynamicBoolAttribute:()=>le,setDynamicProperty:()=>K,setProperty:()=>M,setServerMode:()=>Se,setStyle:()=>I,setStyles:()=>ge,shouldSetAsProperty:()=>Ye,splitProps:()=>Gt,spread:()=>Wt,templateNode:()=>It,toAttributeName:()=>Xe,toggleClass:()=>rt,waitForElement:()=>gt});module.exports=Je(xn);function Xe(e){return e.startsWith("aria-")||e.startsWith("data-")?e:/[A-Z]/.test(e)?e.replace(/([A-Z])/g,"-$1").toLowerCase():e}function ze(e){return e.startsWith("@")||e.startsWith("on")&&e.length>2}function Ue(e){return e.startsWith("@")?e.slice(1):e.startsWith("on")?e.slice(2).toLowerCase():e}function Ye(e,t){let n=new Set(["checked","value","selected","disabled","readonly","required","multiple","open","contenteditable","draggable","spellcheck"]),o={input:new Set(["value","checked","indeterminate"]),textarea:new Set(["value"]),select:new Set(["value"]),option:new Set(["selected","value"]),audio:new Set(["volume","currentTime","paused"]),video:new Set(["volume","currentTime","paused"]),img:new Set(["src","srcset"]),iframe:new Set(["src"]),a:new Set(["href"])};return n.has(t)||o[e]&&o[e].has(t)}var Ze=new Set(["area","base","br","col","embed","hr","img","input","link","meta","param","source","track","wbr"]),Qe=new Set(["svg","g","path","circle","rect","line","polyline","polygon","ellipse","text","tspan","use","defs","symbol","mask","clipPath","pattern","linearGradient","radialGradient","stop","filter","feGaussianBlur","feOffset","feMerge","feMergeNode","foreignObject"]),O="http://www.w3.org/2000/svg";function me(e){return e.localName.includes("-")}function k(e,t,n,o=!1){if(n==null){e.removeAttribute(t);return}if(me(e)){e[t]=n;return}x(e,t,n,o)}var D=new Set(["className","value","checked","selected","innerHTML","innerText","textContent","indeterminate","htmlFor"]);function te(e,t=document){return t.querySelector(e)}function et(e,t=document){return Array.from(t.querySelectorAll(e))}function tt(e,t){return e.closest(t)}function nt(e,...t){e.classList.add(...t)}function ot(e,...t){e.classList.remove(...t)}function rt(e,...t){t.forEach(n=>e.classList.toggle(n))}function it(e,t){return e.classList.contains(t)}function x(e,t,n,o=!1){if(n==null||n===!1){e.removeAttribute(t);return}if(n===!0){e.setAttribute(t,"");return}if(typeof n=="object"){e.setAttribute(t,JSON.stringify(n));return}e.setAttribute(t,String(n))}function st(e,t){return e.getAttribute(t)}function at(e,t){e.removeAttribute(t)}function ge(e,t){Object.assign(e.style,t)}function ft(e,t){return window.getComputedStyle(e).getPropertyValue(t)}function ut(e,t={},...n){let o=document.createElement(e);return Object.entries(t).forEach(([r,f])=>{if(r==="class"||r==="className")o.className=f;else if(r==="style"&&typeof f=="object")ge(o,f);else if(r.startsWith("on")&&typeof f=="function"){let s=r.slice(2).toLowerCase();o.addEventListener(s,f)}else x(o,r,f)}),n.forEach(r=>{typeof r=="string"?o.appendChild(document.createTextNode(r)):o.appendChild(r)}),o}function lt(e){for(;e.firstChild;)e.removeChild(e.firstChild)}function ct(e,...t){t.forEach(n=>{typeof n=="string"?e.appendChild(document.createTextNode(n)):e.appendChild(n)})}function dt(e){let t=e.getBoundingClientRect();return t.top>=0&&t.left>=0&&t.bottom<=window.innerHeight&&t.right<=window.innerWidth}function pt(e,t={behavior:"smooth",block:"nearest"}){e.scrollIntoView(t)}function yt(e){let t=e.getBoundingClientRect();return{top:t.top+window.pageYOffset,left:t.left+window.pageXOffset}}function mt(e,t,n,o){let r=f=>{let s=f.target.closest(n);s&&e.contains(s)&&o(f,s)};return e.addEventListener(t,r),()=>{e.removeEventListener(t,r)}}function gt(e,t=5e3){return new Promise((n,o)=>{let r=te(e);if(r){n(r);return}let f=new MutationObserver(()=>{let i=te(e);i&&(f.disconnect(),clearTimeout(s),n(i))});f.observe(document.body,{childList:!0,subtree:!0});let s=setTimeout(()=>{f.disconnect(),o(new Error(`Element ${e} not found within ${t}ms`))},t)})}function xt(e,t,n={}){let o=new IntersectionObserver(r=>{r.forEach(f=>{t(f.isIntersecting)})},n);return o.observe(e),()=>{o.disconnect()}}function ht(e,t){let n=new ResizeObserver(o=>{o.forEach(t)});return n.observe(e),()=>{n.disconnect()}}var Et=typeof Symbol=="function"&&Symbol.for?Symbol.for("react.element"):60103;function bt(e){return typeof e=="object"&&e!==null&&e.$$typeof===Et}function xe(e){return e&&typeof e=="object"&&e.strings&&Array.isArray(e.strings)&&e.values&&Array.isArray(e.values)}function Nt(e){if(typeof e!="function")return!1;try{let t=e();return xe(t)}catch{return!1}}function Tt(e){return typeof e=="object"&&e!==null&&(e.$$typeof==="template"||typeof e.type=="function")}function wt(e){return e instanceof Node}function St(e,t,n="Fluixi"){typeof globalThis<"u"&&(typeof globalThis[n]>"u"&&(globalThis[n]={}),typeof globalThis[n][e]>"u"&&(globalThis[n][e]=t))}function vt(e,t,n="Fluixi"){return typeof globalThis<"u"&&typeof globalThis[n]<"u"&&typeof globalThis[n][e]<"u"?globalThis[n][e]:t}var m=require("@fluixi/reactive/signal");var he="1.0.0-alpha.80";var Ee=require("@fluixi/reactive/version"),h={dom:he,reactive:Ee.VERSION};function be(e){h.core&&e.setAttribute("fluixi",h.core),e.setAttribute("fx-dom",h.dom),e.setAttribute("fx-reactive",h.reactive),typeof globalThis<"u"&&(globalThis.Fluixi=h)}function Ne(){let e=[h.core,h.dom,h.reactive].filter(t=>t!==void 0);new Set(e).size<=1||console.warn(`[fluixi] package versions disagree — core ${h.core??"(absent)"}, dom ${h.dom}, reactive ${h.reactive}. These ship as one release, so a mismatch usually means a stale lockfile or two copies resolved side by side. Reinstall, or check for duplicates with \`pnpm why @fluixi/dom\`.`)}function Te(e){return typeof e!="function"||Object.defineProperty(e,Symbol.for("fluixi-component"),{value:!0,enumerable:!0}),e}function b(e){return typeof e=="function"&&e[Symbol.for("fluixi-component")]===!0}var c=require("@fluixi/reactive/signal");var E=typeof document>"u";function Se(e){E=e}var ne=Symbol.for("fluixi.server-node"),we=null;function F(){if(!we)throw new Error("[fluixi] server render ran before @fluixi/dom/server loaded");return we}function v(e){return e!=null&&e[ne]===!0?!0:typeof Node<"u"&&e instanceof Node}function H(e){return e!=null&&e[ne]===!0?e.nodeType===1:typeof Element<"u"&&e instanceof Element}function j(e){return e!=null&&e[ne]===!0?e.nodeType===3:typeof Text<"u"&&e instanceof Text}var l={active:!1,cursor:null,parents:[]},ve=null;function Ce(e){ve=e}function q(){return ve}function oe(e,t){return l.active&&t.parentNode===e}function re(e){let t=l.parents.lastIndexOf(e);t!==-1&&(l.parents.length=t),l.cursor=e.nextSibling}function Ae(){return l.active?l.cursor:null}function R(e,t){if(!e||e.parentNode==null)return t();let n=l.active,o=l.cursor,r=l.parents;l.active=!0,l.cursor=e,l.parents=[];try{return t()}finally{l.active=n,l.cursor=o,l.parents=r}}function Re(e){if(!l.active)return e();let t=l.cursor,n=l.parents;l.active=!1,l.parents=[];try{return e()}finally{l.active=!0,l.cursor=t,l.parents=n}}function Le(e){if(!l.active||e==null)return;let t=Array.isArray(e)?e[e.length-1]:e;t&&typeof t.nodeType=="number"&&re(t)}function Ct(e){let t=[];for(;e&&e.nodeType===1;){let n=e.tagName.toLowerCase();if(e.id){n+=`#${e.id}`,t.unshift(n);break}e.getAttribute("data-id")&&(n+=`[data-id="${e.getAttribute("data-id")}"]`);let o=0,r=e;for(;r=r.previousElementSibling;)r.tagName===e.tagName&&o++;n+=`:nth-of-type(${o+1})`,t.unshift(n),e=e.parentElement}return t.join(">")}function At(e){let t=0;for(let n=0;n<e.length;n++)t=(t<<5)-t+e.charCodeAt(n),t|=0;return`el_${Math.abs(t)}`}function Rt(e){return At(Ct(e))}var Lt=()=>"xxyxxxxxxy-4xx8".replace(/[xy]/g,function(e){let t=Math.random()*16|0;return(e==="x"?t:t&3|8).toString(16)}),Pt={};var Pe=new Map,V=new Set,B=new Set(["scroll","focus","blur","load","error","resize","mouseenter","mouseleave","pointerenter","pointerleave","gotpointercapture","lostpointercapture"]);function se(e){if(!E)for(let t of e)V.has(t)||B.has(t)||(V.add(t),document.addEventListener(t,Mt))}function Mt(e){let t=`$$${e.type}`,n=e.composedPath&&e.composedPath()[0]||e.target;for(;n;){let o=n[t];if(o&&!n.disabled&&(o(e),e.cancelBubble))return;n=n.host&&n.host!==n&&n.host instanceof Element?n.host:n.parentNode}}function Me(e,t,n){if(e[`$$${t}`]=n,B.has(t)){let o=`__fx_${t}`;if(!e[o]){let r=f=>{e[`$$${t}`]?.(f)};e.addEventListener(t,r),e[o]=r}return}V.has(t)||se([t])}function ie(e,t){delete e[`$$${t}`];let n=`__fx_${t}`,o=e[n];o&&(e.removeEventListener(t,o),delete e[n])}function _t(e){return!B.has(e)}function $t(e){return typeof e=="function"}function S(e,t=!1){if(E)return F().createText(e);if(l.active&&!t){let n=q()?.hydrateText(e);if(n)return n}return document.createTextNode(e)}function ae(e,t=!1){if(E)return F().createElement(e,t);if(l.active){let n=q()?.hydrateElement(e);if(n)return n}return t?document.createElementNS(O,e):document.createElement(e)}function _e(e,t=!1){let n=Pe.get(e);if(n)return n;let o=document.createElement("template");return t?o.innerHTML=`<svg>${e}</svg>`:o.innerHTML=e,Pe.set(e,o),o}function It(e,t,n=!1,o=!1){if(E){let r=F();return n?r.parseTemplate(e,o):r.createRaw(e)}if(l.active){let r=q()?.hydrateStatic(t);if(r)return r}return $e(_e(e,o),o).firstChild}function Ot(e,t){if(!l.active)return t();let n=R(e.nextSibling,t);if(typeof n=="function"){let o=n;return((...r)=>l.active?R(e.nextSibling,()=>o(...r)):o(...r))}return n}function kt(e){for(let t=e.nextSibling;t;t=t.nextSibling)if(t.nodeType===8&&t.data==="fx/")return t;throw new Error("[fluixi] template hole is missing its closing marker")}function Dt(e,t){let n=[];for(let o=e.nextSibling;o&&o!==t;o=o.nextSibling)n.push(o);return n}function $e(e,t=!1){let n=e.content.cloneNode(!0);return t?n.firstChild:n}function Ie(e){return Array.isArray(e)?e.length===2&&e[1]===" "?Array.isArray(e[0])?Ie(e[0]):(typeof e[0]=="function",e[0]):e.length===1&&typeof e[0]=="function"?e[0]:e:e}function Ft(e){return typeof e!="function"?null:e._name||e.name||"anonymous"}function Ht(e){if((0,m.isSignal)(e)||b(e)||typeof e!="function")return e;let t=e();for(;typeof t=="function"&&!(0,m.isSignal)(t)&&!b(t);)t=t();return t}var T=0,jt=200;function qt(e,t,n,o,r){let f=o,s=new Map;return(0,c.createRenderEffect)(()=>{let i;if(b(e)&&!(0,m.isSignal)(e)){if(!s.has(e)){T++;try{let a=e();s.set(e,a)}finally{T--}}for(i=s.get(e);typeof i=="function"&&(0,m.isSignal)(i);)i=i()}else for(i=e();typeof i=="function"&&(0,m.isSignal)(i);)i=i();{let a=0;for(;typeof i=="function"&&a++<50;)if(b(i)){if(!s.has(i)){let u=i;T++;try{let d=u();s.set(u,d)}finally{T--}}i=s.get(i)}else if((0,m.isSignal)(i))i=i();else if(i=i(),typeof i!="function"||!(0,m.isSignal)(i)&&!b(i))break}T++;try{f=P(t,i,n,f,s),r(f)}finally{T--}})}function A(e,t,n,o){if(T>jt)return console.error("[insert] Exceeded max call depth — possible infinite loop."),()=>null;n!==void 0&&!n&&(n=S("",!0),e.appendChild(n));let r=o??null,f=a=>Array.isArray(a)&&a.some(u=>typeof u=="function"),s=a=>typeof a=="function"?a:()=>a;if(typeof t!="function"&&!f(t)){T++;try{r=P(e,t,n,r)}finally{T--}return()=>r}let i=qt(s(t),e,n,r,a=>{r=a});return()=>(i?.(),r)}function P(e,t,n,o,r){if(t==null||typeof t=="boolean")return w(e,o,n);if(typeof t=="function")for(;typeof t=="function";)t=t();if(t==null||typeof t=="boolean")return w(e,o,n);if(L(t)){let s=S("",!0);return Array.isArray(o)?o.length>0?(e.replaceChild(s,o[0]),w(e,o.slice(1),n)):g(e,s,n):o?e.replaceChild(s,o):g(e,s,n),t.then(i=>{s.parentNode===e&&P(e,i,s.nextSibling,s)}).catch(i=>{console.error("Error resolving promise in insertExpression:",i)}),s}let f=typeof t;if(f==="string"||f==="number"){if(f==="number"&&(t=String(t)),Array.isArray(o)){if(o.length===0){let i=S(t);return g(e,i,n),i}if(o.length===1&&o[0].nodeType===3)return o[0].data=t,o;o=w(e,o,n)}if(o&&j(o))return o.data=t,o;let s=S(t);return o&&o.parentNode===e?e.replaceChild(s,o):oe(e,s)||g(e,s,n),s}if(v(t))return oe(e,t)?(re(t),t):Array.isArray(o)?(o.length===0?g(e,t,n):o[0].parentNode===e?(e.replaceChild(t,o[0]),w(e,o.slice(1),n)):g(e,t,n),t):(o?o!==t&&(o.parentNode===e?e.replaceChild(t,o):g(e,t,n)):g(e,t,n),t);if(Array.isArray(t)){let s=[],i=Array.isArray(o)?o:o?[o]:[],a=[];N(t,s,e,n,!0,r,a);let u=Vt(e,i,s,n);for(let d of a){let p=A(e,d.sig,d.marker);(0,c.onCleanup)(()=>{w(e,p()),d.marker.parentNode===e&&e.removeChild(d.marker)})}return u}if(f==="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 a=i.type(i.props||{});return P(e,a,n,o)}}}return w(e,o,n)}function N(e,t,n,o,r=!0,f,s){for(let i=0;i<e.length;i++){let a=e[i];if(!(a==null||typeof a=="boolean")){for(;typeof a=="function"&&!L(a)&&!(0,m.isSignal)(a)&&!b(a)&&(a=a(),!(a==null||typeof a=="boolean")););if(!(a==null||typeof a=="boolean")){if(typeof a=="function"){let u;for(b(a)&&!(0,m.isSignal)(a)?(f||(f=new Map),f.has(a)||f.set(a,a()),u=f.get(a)):u=a();typeof u=="function"&&!L(u)&&!(0,m.isSignal)(u)&&!b(u);)f||(f=new Map),f.has(u)||f.set(u,u()),u=f.get(u);if(u==null||typeof u=="boolean")continue;if(typeof u=="function"){if((0,m.isSignal)(u)){if(s){let p=S("",!0);t.push(p),s.push({marker:p,sig:u});continue}let d=u();for(;typeof d=="function"&&(0,m.isSignal)(d);)d=d();if(d==null||typeof d=="boolean")continue;Array.isArray(d)?N(d,t,n,o,r,f):N([d],t,n,o,r,f);continue}continue}Array.isArray(u)?N(u,t,n,o,r,f,s):N([u],t,n,o,r,f,s);continue}if(L(a)){let u=S("",!0);t.push(u),a.then(d=>{if(u.parentNode){let p=[];if(N([d],p,u.parentNode,void 0,!1,f),p.length>0){u.parentNode.replaceChild(p[0],u);for(let y=1;y<p.length;y++)u.parentNode?.insertBefore(p[y],p[y-1].nextSibling)}}}).catch(d=>console.error("Error resolving promise in array:",d));continue}if(Array.isArray(a)){N(a,t,n,o,r,f,s);continue}if(v(a)){t.push(a);continue}if(typeof a=="object"&&a!==null&&"type"in a&&"props"in a){let u=a;if(typeof u.type=="function"){let d=u.type(u.props||{});Array.isArray(d)?N(d,t,n,o,!1,f):N([d],t,n,o,!1,f);continue}}if(typeof a=="string"||typeof a=="number"){let u=String(a);if(u.trim()===""&&u!==" ")continue;t.push(S(u));continue}t.push(S(String(a)))}}}}function Vt(e,t,n,o){for(let p=0;p<n.length;p++){let y=n[p].parentNode;y!==null&&y!==e&&y.nodeType!==11&&(n=n.slice(),n[p]=n[p].cloneNode(!0))}let r=n.length,f=t.length,s=r,i=0,a=0,u=f>0?t[f-1].nextSibling??void 0:o,d=null;for(;i<f||a<s;){if(t[i]===n[a]){i++,a++;continue}for(;f>i&&s>a&&t[f-1]===n[s-1];)f--,s--;if(f===i){let p=s<r?a?n[a-1].nextSibling??void 0:n[s-a]:u;for(;a<s;)g(e,n[a++],p)}else if(s===a)for(;i<f;)(!d||!d.has(t[i]))&&t[i].parentNode===e&&e.removeChild(t[i]),i++;else if(t[i]===n[s-1]&&n[a]===t[f-1]){let p=t[--f].nextSibling;g(e,n[a++],t[i++].nextSibling),g(e,n[--s],p),t[f]=t[i-1]}else{if(!d){d=new Map;let y=a;for(;y<s;)d.set(n[y],y++)}let p=d.get(t[i]);if(p!=null)if(a<p&&p<s){let y=i,Q=1;for(;++y<f&&y<s&&!(!d.has(t[y])||d.get(t[y])!==p+Q);)Q++;if(Q>p-a){let qe=t[i];for(;a<p;)g(e,n[a++],qe)}else t[i].parentNode===e?e.replaceChild(n[a++],t[i++]):(g(e,n[a++],u),i++)}else i++;else t[i].parentNode===e&&e.removeChild(t[i]),i++}}return n}function w(e,t,n){if(t)if(Array.isArray(t))for(let o=0;o<t.length;o++)t[o].parentNode===e&&e.removeChild(t[o]);else t.parentNode===e&&e.removeChild(t);return null}function g(e,t,n){l.active&&t.parentNode===e||(n&&n.parentNode===e?e.insertBefore(t,n):e.appendChild(t))}function M(e,t,n){n==null?delete e[t]:e[t]=n}function fe(e,t,n){let o=n,r;return Array.isArray(n)&&(o=n[0],r=n[1]),typeof o!="function"?()=>{}:(e.addEventListener(t,o,r),()=>e.removeEventListener(t,o,r))}function ue(e,t){let n=(o,r)=>{typeof o=="function"&&o(e,r??(()=>{}))};if(typeof t=="function"){n(t);return}if(Array.isArray(t)){if(typeof t[0]=="function"){n(t[0],t[1]);return}for(let o of t)Array.isArray(o)?n(o[0],o[1]):n(o)}}function W(e,t,n,o=!1){return typeof n!="function"?(x(e,t,n,o),()=>{}):(0,c.createRenderEffect)(()=>{let r=typeof n=="function"?n():n;x(e,t,r,o)})}function K(e,t,n){return typeof n!="function"?(M(e,t,n),()=>{}):(0,c.createRenderEffect)(()=>{let o=typeof n=="function"?n():n;M(e,t,o)})}function le(e,t,n){return typeof n!="function"?(x(e,t,!!n),()=>{}):(0,c.createRenderEffect)(()=>{let o=n();x(e,t,!!o)})}function _(e,t){if(t==null){e.removeAttribute("class");return}if(typeof t=="function"){(0,c.createRenderEffect)(()=>_(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 n=Object.keys(t).filter(o=>{let r=t[o];return typeof r=="function"?r():!!r}).join(" ");e.setAttribute("class",n);return}e.setAttribute("class",String(t))}function $(e,t,n){if(!(!t||typeof t!="object"))for(let o in t){let r=t[o],f=o.split(/\s+/).filter(Boolean);if(typeof r=="function"&&n)n.push((0,c.createRenderEffect)(()=>{let s=!!r();for(let i of f)e.classList.toggle(i,s)}));else{let s=!!(typeof r=="function"?r():r);for(let i of f)e.classList.toggle(i,s)}}}function I(e,t){let n=t;for(;typeof n=="function";)n=n();if(n==null){e.removeAttribute("style");return}if(typeof n=="string"){e.style.cssText=n;return}if(typeof n=="object")for(let o in n){let r=n[o];r==null?e.style[o]="":e.style[o]=r}}function Wt(e){let{element:t,props:n,prevProps:o=Pt,isSVG:r=!1,skipChildren:f=!1}=e;if(!t||!H(t))return console.error("[spread] Error: element is not a DOM Element!"),()=>{};if(!n)return console.warn("[spread] Warning: props is undefined!"),()=>{};let s=r||t.namespaceURI===O,i=[];for(let a in n){if(f&&a==="children")continue;let u=n[a],d=o[a];if(u===d)continue;if(a==="ref"){ce(u,t);continue}if(a==="use"){ue(t,u);continue}if(a.startsWith("on:")){i.push(fe(t,a.slice(3),u));continue}if(a.startsWith("prop:")){i.push(K(t,a.slice(5),u));continue}if(a.startsWith("attr:")){i.push(W(t,a.slice(5),u,s));continue}if(a.startsWith("bool:")){i.push(le(t,a.slice(5),u));continue}if(a==="class"||a==="className"){typeof u=="function"?i.push((0,c.createRenderEffect)(()=>_(t,u()))):_(t,u);continue}if(a==="classList"){typeof u=="function"?i.push((0,c.createRenderEffect)(()=>$(t,u()))):$(t,u,i);continue}if(a==="style"){typeof u=="function"?i.push((0,c.createRenderEffect)(()=>I(t,u()))):I(t,u);continue}if(a.startsWith("on")){let y=a.slice(2).toLowerCase();d&&ie(t,y),u&&Me(t,y,u);continue}let p=D.has(a)||!s&&a in t;typeof u=="function"?i.push(p?K(t,a,u):W(t,a,u,s)):i.push((0,c.createRenderEffect)(()=>p?M(t,a,n[a]):x(t,a,n[a],s)))}for(let a in o)if(!(a in n))if(a.startsWith("on")){let u=a.slice(2).toLowerCase();ie(t,u)}else D.has(a)?M(t,a,null):t.removeAttribute(a);return()=>{i.forEach(a=>a())}}function Kt(e,t,n=!1){for(let o in t){let r=t[o];if(o==="ref"){ce(r,e);continue}if(o!=="children"){if(o==="use"){ue(e,r);continue}if(o.startsWith("on:")){fe(e,o.slice(3),r);continue}if(o.startsWith("prop:")){K(e,o.slice(5),r);continue}if(o.startsWith("attr:")){W(e,o.slice(5),r,n);continue}if(o.startsWith("bool:")){le(e,o.slice(5),r);continue}if(o.startsWith("on")&&o.length>2){let f=o.slice(2).toLowerCase();if(typeof r=="function")if(B.has(f)){e[`$$${f}`]=r;let s=`__fx_${f}`;if(!e[s]){let i=a=>{e[`$$${f}`]?.(a)};e.addEventListener(f,i),e[s]=i}}else e[`$$${f}`]=r,V.has(f)||se([f]);continue}if(o==="class"||o==="className"){_(e,r);continue}if(o==="classList"){typeof r=="function"?(0,c.createRenderEffect)(()=>$(e,r())):$(e,r);continue}if(o==="style"){typeof r=="function"?(0,c.createRenderEffect)(()=>I(e,r())):I(e,r);continue}if(o==="innerHTML"){if(typeof r=="function"){let f=(0,c.createEffect)(()=>{let s=r();for(;typeof s=="function";)s=s();e.innerHTML=s});(0,c.onCleanup)(()=>f())}else e.innerHTML=r;continue}if(o==="value"&&(e.tagName==="INPUT"||e.tagName==="TEXTAREA")){if(typeof r=="function"){let f=(0,c.createEffect)(()=>{let s=r();for(;typeof s=="function"&&s.length===0;)s=s();document.activeElement!==e&&(e.value=s??"")});(0,c.onCleanup)(()=>{f()})}else(0,c.createRenderEffect)(()=>{document.activeElement!==e&&(e.value=t[o]??"")});continue}if(o==="checked"&&e.tagName==="INPUT"){if(typeof r=="function"){let f=(0,c.createEffect)(()=>{let s=r();for(;typeof s=="function"&&s.length===0;)s=s();document.activeElement!==e&&(e.checked=s??"")});(0,c.onCleanup)(()=>{f()})}else(0,c.createRenderEffect)(()=>{document.activeElement!==e&&(e.checked=t[o]??"")});continue}if(o==="value"&&e.tagName==="SELECT"){if(typeof r=="function"){let f=!0,s=(0,c.createEffect)(()=>{let i=r();for(;typeof i=="function"&&i.length===0;)i=i();f?(f=!1,queueMicrotask(()=>{e.value=i??""})):e.value=i??""});(0,c.onCleanup)(()=>{s()})}else{let f=!0;(0,c.createRenderEffect)(()=>{let s=t[o];f?(f=!1,queueMicrotask(()=>{e.value=s??""})):e.value=s??""})}continue}if(typeof r=="function"){let f=(0,c.createEffect)(()=>{let s=r();for(;typeof s=="function"&&s.length===0;)s=s();k(e,o,s,n)});(0,c.onCleanup)(()=>{f()})}else(0,c.createRenderEffect)(()=>k(e,o,t[o],n))}}}function Bt(...e){let t=o=>{for(let r=e.length-1;r>=0;r--){let f=e[r];if(f&&o in f&&f[o]!==void 0)return f[o]}},n=o=>{for(let r of e)if(r&&o in r)return!0;return!1};return new Proxy({},{get:(o,r)=>t(r),has:(o,r)=>n(r),ownKeys:()=>{let o=new Set;for(let r of e)if(r)for(let f of Reflect.ownKeys(r))o.add(f);return[...o]},getOwnPropertyDescriptor:(o,r)=>n(r)?{enumerable:!0,configurable:!0,get:()=>t(r)}:void 0})}function Gt(e,...t){let n=new Set;for(let s of t)for(let i of s)n.add(i);let o=s=>({enumerable:!0,configurable:!0,get:()=>e[s]}),r=t.map(s=>{let i=new Set(s);return new Proxy({},{get:(a,u)=>i.has(u)?e[u]:void 0,has:(a,u)=>i.has(u)&&u in e,ownKeys:()=>Array.from(i).filter(a=>a in e),getOwnPropertyDescriptor:(a,u)=>i.has(u)&&u in e?o(u):void 0})}),f=new Proxy({},{get:(s,i)=>n.has(i)?void 0:e[i],has:(s,i)=>!n.has(i)&&i in e,ownKeys:()=>Reflect.ownKeys(e).filter(s=>!n.has(s)),getOwnPropertyDescriptor:(s,i)=>!n.has(i)&&i in e?o(i):void 0});return[...r,f]}function ce(e,t){if(e){if(v(e)){let n=t,o=e;if(!n)return;typeof n=="function"?n(o):typeof n=="object"&&"current"in n&&(n.current=o);return}typeof e=="function"?e(t):typeof e=="object"&&"current"in e&&(e.current=t)}}function Jt(e,t,n){let o=t||document.body,r=(0,c.readChildren)(()=>e),f=[];return(0,c.batch)(()=>{let s=(0,c.createRenderEffect)(()=>{let i=r();Array.isArray(i)?(i.forEach(a=>o.appendChild(a)),f.push(()=>{i.forEach(a=>{a.parentNode===o&&o.removeChild(a)})})):v(i)&&(o.appendChild(i),f.push(()=>{i.parentNode===o&&o.removeChild(i)}))});f.push(s),(0,c.onCleanup)(()=>{f.forEach(i=>i())})}),null}function Xt(e){return typeof e=="string"&&e.toLowerCase()===e}function zt(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 Ut(e){return e.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")}function L(e){return e!=null&&(typeof e=="object"||typeof e=="function")&&typeof e.then=="function"||e instanceof Promise}function Yt(e){return typeof e=="function"&&e.length===0&&(0,m.isSignal)(e)}function de(e,t,n){if(!t)throw new Error("Container element is required");let o,r,f=[];return(0,c.createRoot)(s=>{(0,c.batch)(()=>{l.active||(t.textContent=""),be(t),Ne(),A(t,e)}),r=s}),()=>{r?.(),o?.(),f.forEach(s=>s()),t.textContent=""}}function Zt(e){if(Array.isArray(e))return e;if(typeof e=="function"&&typeof e.set=="function")return[e,e.set];throw new TypeError("[fluixi] bind: needs a signal — either `signal(…)` or the `[get, set]` pair from `createSignal(…)`.")}var G=require("@fluixi/reactive");var Qt="__fx_dom_create_component__",C=globalThis[Qt]??={fn:null};function en(e){C.fn=e}function tn(e={}){let t=e.signalSystem?.createComponent;t&&(C.fn=t)}function nn(e,t){if(C.fn)return C.fn(e,t);let n=typeof e=="function"?(0,G.untrack)(()=>e(t)):e;if(n!=null&&(typeof n=="function"||typeof n=="object")&&!(0,G.isSignal)(n)){try{n.$name=e?.name}catch{}return Te(n)}return n}var on=()=>C.fn!==null,rn=()=>C.fn!==null;function sn(){C.fn=null}var J,an={getStore:()=>J,run(e,t){let n=J;J=e;try{return t()}finally{J=n}}},fn=an;function Oe(){return fn.getStore()}var X=require("@fluixi/reactive/signal");var un="__FX_DATA__";var pe;function ke(){let e=globalThis.__FX_DATA__;if(e)return e;if(pe!==void 0)return pe;let t=null;if(typeof document<"u"){let n=document.getElementById(un)?.textContent;if(n)try{t=JSON.parse(n)}catch{t=null}}return pe=t}function z(){for(;;){for(;l.cursor&&l.cursor.nodeType===3&&l.cursor.data==="";)l.cursor=l.cursor.nextSibling;if(l.cursor!=null||!l.parents.length)return;l.cursor=l.parents.pop().nextSibling}}var ln=new Set(["area","base","br","col","embed","hr","img","input","link","meta","param","source","track","wbr"]),U=typeof process<"u"&&process.env&&!1;function Y(e,t){let n=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 ${n}. 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 cn(e){z();let t=l.cursor;return t&&t.nodeType===1&&t.tagName.toLowerCase()===e.toLowerCase()?(ln.has(e.toLowerCase())?l.cursor=t.nextSibling:(l.parents.push(t),l.cursor=t.firstChild),t):(U&&t&&Y(`<${e}>`,t),null)}function dn(e){z();let t=l.cursor;return t&&t.nodeType===1&&t.tagName.toLowerCase()===e.toLowerCase()?(l.cursor=t.nextSibling,t):(U&&t&&Y(`<${e}> (static)`,t),null)}function pn(e){if(e===""){let n=l.cursor;return n&&n.nodeType===3&&n.data!==""?(l.cursor=n.nextSibling,n.data="",n):null}z();let t=l.cursor;return t&&t.nodeType===3?(l.cursor=t.nextSibling,t.nodeValue!==e&&(t.nodeValue=e),t):(U&&t&&Y(`text ${JSON.stringify(e.slice(0,24))}`,t),null)}function yn(e){z();let t=l.cursor;return t&&t.nodeType===8&&t.data===e?(l.cursor=t.nextSibling,t):(U&&t&&Y(`marker <!--${e.slice(0,24)}-->`,t),null)}var De=!1;function mn(){De||(De=!0,Ce({hydrateElement:cn,hydrateText:pn,hydrateMarker:yn,hydrateStatic:dn}))}function Z(e,t,n){mn(),l.active=!0,l.cursor=t.firstChild,l.parents=[];let o=ke(),r=n?.resourceNamespace,f=0;(0,X.setResourceIdSource)(()=>r?`${r}:r${f++}`:`r${f++}`),(0,X.setServerDataGetter)(o?s=>s in o?{value:o[s]}:void 0:null);try{return de(e,t)}finally{l.active=!1,l.cursor=null,l.parents=[]}}var ye="fluixi-island";function He(e){let{component:t,props:n={},name:o}=e,r=ae(ye),f=o??t.name??"Island";x(r,"name",f),x(r,"props",JSON.stringify(n??{}));let s=E?Oe():void 0;if(s){let i=s.nextIslandNamespace(f);A(r,()=>s.withResourceScope(i,()=>t(n)))}else A(r,()=>t(n));return r}var Fe=!1;function gn(){if(Fe||typeof document>"u")return;Fe=!0;let e=document.createElement("style");e.textContent=`${ye}{display:contents}`,document.head.appendChild(e)}function je(e){if(typeof document>"u")return;gn();let t=document.querySelectorAll(ye),n=new Map;t.forEach(o=>{let r=o.getAttribute("name")??"",f=n.get(r)??0;n.set(r,f+1);let s=e[r];if(!s){typeof process>"u"&&console.warn(`[fluixi] island "${r}" has no component in the registry — left static.`);return}let i={};try{i=JSON.parse(o.getAttribute("props")||"{}")}catch{}Z(()=>s(i),o,{resourceNamespace:`${r}#${f}`})})}
|
|
1
|
+
"use strict";var ee=Object.defineProperty;var Ve=Object.getOwnPropertyDescriptor;var We=Object.getOwnPropertyNames;var Ke=Object.prototype.hasOwnProperty;var Be=(e,t)=>{for(var n in t)ee(e,n,{get:t[n],enumerable:!0})},Ge=(e,t,n,o)=>{if(t&&typeof t=="object"||typeof t=="function")for(let r of We(t))!Ke.call(e,r)&&r!==n&&ee(e,r,{get:()=>t[r],enumerable:!(o=Ve(t,r))||o.enumerable});return e};var Je=e=>Ge(ee({},"__esModule",{value:!0}),e);var xn={};Be(xn,{Island:()=>He,JSX_PROPERTIES:()=>D,SVG_ELEMENTS:()=>Qe,SVG_NAMESPACE:()=>O,VOID_ELEMENTS:()=>Ze,addClass:()=>nt,addDelegatedEventListener:()=>Me,addNativeEventListener:()=>fe,appendChildren:()=>ct,applyElementProp:()=>k,applyProps:()=>Kt,applyUse:()=>ue,bindPair:()=>Zt,captureHydrationCursor:()=>Ae,cleanChildren:()=>w,cloneTemplate:()=>$e,closest:()=>tt,createComponent:()=>nn,createElement:()=>ut,createNativeElement:()=>ae,createPortal:()=>Jt,createTemplate:()=>_e,delegate:()=>mt,delegateEvents:()=>se,escapeHTML:()=>Ut,fnName:()=>Ft,generateID:()=>Lt,getAttribute:()=>st,getGlobal:()=>vt,getLitEventName:()=>Ue,getOffset:()=>yt,getStableElementId:()=>Rt,getStyle:()=>ft,handleRef:()=>ce,hasClass:()=>it,holeContent:()=>Dt,holeEnd:()=>kt,holeScope:()=>Ot,hydrate:()=>Z,hydrateAdvancePast:()=>Le,hydrateIslands:()=>je,initializeIntegration:()=>tn,insert:()=>A,insertExpression:()=>P,intergartionInitialized:()=>on,isAccessor:()=>Yt,isCustomElement:()=>me,isDOMNode:()=>wt,isDelegatedEvent:()=>_t,isDomElement:()=>H,isDomNode:()=>v,isDomText:()=>j,isEventHandler:()=>ze,isFunction:()=>$t,isIntegrationInitialized:()=>rn,isJSXTemplate:()=>Tt,isLitTemplateResult:()=>xe,isNativeElement:()=>Xt,isPromise:()=>L,isReactElement:()=>bt,isSVGElement:()=>zt,isServer:()=>E,isTemplateFactory:()=>Nt,isVisible:()=>dt,iterateFn:()=>Ht,makeArrayFlat:()=>Ie,mergeProps:()=>Bt,observeIntersection:()=>xt,observeResize:()=>ht,query:()=>te,queryAll:()=>et,registerCreateComponent:()=>en,registerGlobal:()=>St,removeAttribute:()=>at,removeChildren:()=>lt,removeClass:()=>ot,removeDelegatedEventListener:()=>ie,render:()=>de,resetIntegration:()=>sn,runHydrationAt:()=>R,runWithoutHydration:()=>Re,scrollIntoView:()=>pt,setAttribute:()=>x,setClassList:()=>$,setClassName:()=>_,setDynamicAttribute:()=>W,setDynamicBoolAttribute:()=>le,setDynamicProperty:()=>K,setProperty:()=>M,setServerMode:()=>Se,setStyle:()=>I,setStyles:()=>ge,shouldSetAsProperty:()=>Ye,splitProps:()=>Gt,spread:()=>Wt,templateNode:()=>It,toAttributeName:()=>Xe,toggleClass:()=>rt,waitForElement:()=>gt});module.exports=Je(xn);function Xe(e){return e.startsWith("aria-")||e.startsWith("data-")?e:/[A-Z]/.test(e)?e.replace(/([A-Z])/g,"-$1").toLowerCase():e}function ze(e){return e.startsWith("@")||e.startsWith("on")&&e.length>2}function Ue(e){return e.startsWith("@")?e.slice(1):e.startsWith("on")?e.slice(2).toLowerCase():e}function Ye(e,t){let n=new Set(["checked","value","selected","disabled","readonly","required","multiple","open","contenteditable","draggable","spellcheck"]),o={input:new Set(["value","checked","indeterminate"]),textarea:new Set(["value"]),select:new Set(["value"]),option:new Set(["selected","value"]),audio:new Set(["volume","currentTime","paused"]),video:new Set(["volume","currentTime","paused"]),img:new Set(["src","srcset"]),iframe:new Set(["src"]),a:new Set(["href"])};return n.has(t)||o[e]&&o[e].has(t)}var Ze=new Set(["area","base","br","col","embed","hr","img","input","link","meta","param","source","track","wbr"]),Qe=new Set(["svg","g","path","circle","rect","line","polyline","polygon","ellipse","text","tspan","use","defs","symbol","mask","clipPath","pattern","linearGradient","radialGradient","stop","filter","feGaussianBlur","feOffset","feMerge","feMergeNode","foreignObject"]),O="http://www.w3.org/2000/svg";function me(e){return e.localName.includes("-")}function k(e,t,n,o=!1){if(n==null){e.removeAttribute(t);return}if(me(e)){e[t]=n;return}x(e,t,n,o)}var D=new Set(["className","value","checked","selected","innerHTML","innerText","textContent","indeterminate","htmlFor"]);function te(e,t=document){return t.querySelector(e)}function et(e,t=document){return Array.from(t.querySelectorAll(e))}function tt(e,t){return e.closest(t)}function nt(e,...t){e.classList.add(...t)}function ot(e,...t){e.classList.remove(...t)}function rt(e,...t){t.forEach(n=>e.classList.toggle(n))}function it(e,t){return e.classList.contains(t)}function x(e,t,n,o=!1){if(n==null||n===!1){e.removeAttribute(t);return}if(n===!0){e.setAttribute(t,"");return}if(typeof n=="object"){e.setAttribute(t,JSON.stringify(n));return}e.setAttribute(t,String(n))}function st(e,t){return e.getAttribute(t)}function at(e,t){e.removeAttribute(t)}function ge(e,t){Object.assign(e.style,t)}function ft(e,t){return window.getComputedStyle(e).getPropertyValue(t)}function ut(e,t={},...n){let o=document.createElement(e);return Object.entries(t).forEach(([r,f])=>{if(r==="class"||r==="className")o.className=f;else if(r==="style"&&typeof f=="object")ge(o,f);else if(r.startsWith("on")&&typeof f=="function"){let s=r.slice(2).toLowerCase();o.addEventListener(s,f)}else x(o,r,f)}),n.forEach(r=>{typeof r=="string"?o.appendChild(document.createTextNode(r)):o.appendChild(r)}),o}function lt(e){for(;e.firstChild;)e.removeChild(e.firstChild)}function ct(e,...t){t.forEach(n=>{typeof n=="string"?e.appendChild(document.createTextNode(n)):e.appendChild(n)})}function dt(e){let t=e.getBoundingClientRect();return t.top>=0&&t.left>=0&&t.bottom<=window.innerHeight&&t.right<=window.innerWidth}function pt(e,t={behavior:"smooth",block:"nearest"}){e.scrollIntoView(t)}function yt(e){let t=e.getBoundingClientRect();return{top:t.top+window.pageYOffset,left:t.left+window.pageXOffset}}function mt(e,t,n,o){let r=f=>{let s=f.target.closest(n);s&&e.contains(s)&&o(f,s)};return e.addEventListener(t,r),()=>{e.removeEventListener(t,r)}}function gt(e,t=5e3){return new Promise((n,o)=>{let r=te(e);if(r){n(r);return}let f=new MutationObserver(()=>{let i=te(e);i&&(f.disconnect(),clearTimeout(s),n(i))});f.observe(document.body,{childList:!0,subtree:!0});let s=setTimeout(()=>{f.disconnect(),o(new Error(`Element ${e} not found within ${t}ms`))},t)})}function xt(e,t,n={}){let o=new IntersectionObserver(r=>{r.forEach(f=>{t(f.isIntersecting)})},n);return o.observe(e),()=>{o.disconnect()}}function ht(e,t){let n=new ResizeObserver(o=>{o.forEach(t)});return n.observe(e),()=>{n.disconnect()}}var Et=typeof Symbol=="function"&&Symbol.for?Symbol.for("react.element"):60103;function bt(e){return typeof e=="object"&&e!==null&&e.$$typeof===Et}function xe(e){return e&&typeof e=="object"&&e.strings&&Array.isArray(e.strings)&&e.values&&Array.isArray(e.values)}function Nt(e){if(typeof e!="function")return!1;try{let t=e();return xe(t)}catch{return!1}}function Tt(e){return typeof e=="object"&&e!==null&&(e.$$typeof==="template"||typeof e.type=="function")}function wt(e){return e instanceof Node}function St(e,t,n="Fluixi"){typeof globalThis<"u"&&(typeof globalThis[n]>"u"&&(globalThis[n]={}),typeof globalThis[n][e]>"u"&&(globalThis[n][e]=t))}function vt(e,t,n="Fluixi"){return typeof globalThis<"u"&&typeof globalThis[n]<"u"&&typeof globalThis[n][e]<"u"?globalThis[n][e]:t}var m=require("@fluixi/reactive/signal");var he="1.0.0-alpha.82";var Ee=require("@fluixi/reactive/version"),h={dom:he,reactive:Ee.VERSION};function be(e){h.core&&e.setAttribute("fluixi",h.core),e.setAttribute("fx-dom",h.dom),e.setAttribute("fx-reactive",h.reactive),typeof globalThis<"u"&&(globalThis.Fluixi=h)}function Ne(){let e=[h.core,h.dom,h.reactive].filter(t=>t!==void 0);new Set(e).size<=1||console.warn(`[fluixi] package versions disagree — core ${h.core??"(absent)"}, dom ${h.dom}, reactive ${h.reactive}. These ship as one release, so a mismatch usually means a stale lockfile or two copies resolved side by side. Reinstall, or check for duplicates with \`pnpm why @fluixi/dom\`.`)}function Te(e){return typeof e!="function"||Object.defineProperty(e,Symbol.for("fluixi-component"),{value:!0,enumerable:!0}),e}function b(e){return typeof e=="function"&&e[Symbol.for("fluixi-component")]===!0}var c=require("@fluixi/reactive/signal");var E=typeof document>"u";function Se(e){E=e}var ne=Symbol.for("fluixi.server-node"),we=null;function F(){if(!we)throw new Error("[fluixi] server render ran before @fluixi/dom/server loaded");return we}function v(e){return e!=null&&e[ne]===!0?!0:typeof Node<"u"&&e instanceof Node}function H(e){return e!=null&&e[ne]===!0?e.nodeType===1:typeof Element<"u"&&e instanceof Element}function j(e){return e!=null&&e[ne]===!0?e.nodeType===3:typeof Text<"u"&&e instanceof Text}var l={active:!1,cursor:null,parents:[]},ve=null;function Ce(e){ve=e}function q(){return ve}function oe(e,t){return l.active&&t.parentNode===e}function re(e){let t=l.parents.lastIndexOf(e);t!==-1&&(l.parents.length=t),l.cursor=e.nextSibling}function Ae(){return l.active?l.cursor:null}function R(e,t){if(!e||e.parentNode==null)return t();let n=l.active,o=l.cursor,r=l.parents;l.active=!0,l.cursor=e,l.parents=[];try{return t()}finally{l.active=n,l.cursor=o,l.parents=r}}function Re(e){if(!l.active)return e();let t=l.cursor,n=l.parents;l.active=!1,l.parents=[];try{return e()}finally{l.active=!0,l.cursor=t,l.parents=n}}function Le(e){if(!l.active||e==null)return;let t=Array.isArray(e)?e[e.length-1]:e;t&&typeof t.nodeType=="number"&&re(t)}function Ct(e){let t=[];for(;e&&e.nodeType===1;){let n=e.tagName.toLowerCase();if(e.id){n+=`#${e.id}`,t.unshift(n);break}e.getAttribute("data-id")&&(n+=`[data-id="${e.getAttribute("data-id")}"]`);let o=0,r=e;for(;r=r.previousElementSibling;)r.tagName===e.tagName&&o++;n+=`:nth-of-type(${o+1})`,t.unshift(n),e=e.parentElement}return t.join(">")}function At(e){let t=0;for(let n=0;n<e.length;n++)t=(t<<5)-t+e.charCodeAt(n),t|=0;return`el_${Math.abs(t)}`}function Rt(e){return At(Ct(e))}var Lt=()=>"xxyxxxxxxy-4xx8".replace(/[xy]/g,function(e){let t=Math.random()*16|0;return(e==="x"?t:t&3|8).toString(16)}),Pt={};var Pe=new Map,V=new Set,B=new Set(["scroll","focus","blur","load","error","resize","mouseenter","mouseleave","pointerenter","pointerleave","gotpointercapture","lostpointercapture"]);function se(e){if(!E)for(let t of e)V.has(t)||B.has(t)||(V.add(t),document.addEventListener(t,Mt))}function Mt(e){let t=`$$${e.type}`,n=e.composedPath&&e.composedPath()[0]||e.target;for(;n;){let o=n[t];if(o&&!n.disabled&&(o(e),e.cancelBubble))return;n=n.host&&n.host!==n&&n.host instanceof Element?n.host:n.parentNode}}function Me(e,t,n){if(e[`$$${t}`]=n,B.has(t)){let o=`__fx_${t}`;if(!e[o]){let r=f=>{e[`$$${t}`]?.(f)};e.addEventListener(t,r),e[o]=r}return}V.has(t)||se([t])}function ie(e,t){delete e[`$$${t}`];let n=`__fx_${t}`,o=e[n];o&&(e.removeEventListener(t,o),delete e[n])}function _t(e){return!B.has(e)}function $t(e){return typeof e=="function"}function S(e,t=!1){if(E)return F().createText(e);if(l.active&&!t){let n=q()?.hydrateText(e);if(n)return n}return document.createTextNode(e)}function ae(e,t=!1){if(E)return F().createElement(e,t);if(l.active){let n=q()?.hydrateElement(e);if(n)return n}return t?document.createElementNS(O,e):document.createElement(e)}function _e(e,t=!1){let n=Pe.get(e);if(n)return n;let o=document.createElement("template");return t?o.innerHTML=`<svg>${e}</svg>`:o.innerHTML=e,Pe.set(e,o),o}function It(e,t,n=!1,o=!1){if(E){let r=F();return n?r.parseTemplate(e,o):r.createRaw(e)}if(l.active){let r=q()?.hydrateStatic(t);if(r)return r}return $e(_e(e,o),o).firstChild}function Ot(e,t){if(!l.active)return t();let n=R(e.nextSibling,t);if(typeof n=="function"){let o=n;return((...r)=>l.active?R(e.nextSibling,()=>o(...r)):o(...r))}return n}function kt(e){for(let t=e.nextSibling;t;t=t.nextSibling)if(t.nodeType===8&&t.data==="fx/")return t;throw new Error("[fluixi] template hole is missing its closing marker")}function Dt(e,t){let n=[];for(let o=e.nextSibling;o&&o!==t;o=o.nextSibling)n.push(o);return n}function $e(e,t=!1){let n=e.content.cloneNode(!0);return t?n.firstChild:n}function Ie(e){return Array.isArray(e)?e.length===2&&e[1]===" "?Array.isArray(e[0])?Ie(e[0]):(typeof e[0]=="function",e[0]):e.length===1&&typeof e[0]=="function"?e[0]:e:e}function Ft(e){return typeof e!="function"?null:e._name||e.name||"anonymous"}function Ht(e){if((0,m.isSignal)(e)||b(e)||typeof e!="function")return e;let t=e();for(;typeof t=="function"&&!(0,m.isSignal)(t)&&!b(t);)t=t();return t}var T=0,jt=200;function qt(e,t,n,o,r){let f=o,s=new Map;return(0,c.createRenderEffect)(()=>{let i;if(b(e)&&!(0,m.isSignal)(e)){if(!s.has(e)){T++;try{let a=e();s.set(e,a)}finally{T--}}for(i=s.get(e);typeof i=="function"&&(0,m.isSignal)(i);)i=i()}else for(i=e();typeof i=="function"&&(0,m.isSignal)(i);)i=i();{let a=0;for(;typeof i=="function"&&a++<50;)if(b(i)){if(!s.has(i)){let u=i;T++;try{let d=u();s.set(u,d)}finally{T--}}i=s.get(i)}else if((0,m.isSignal)(i))i=i();else if(i=i(),typeof i!="function"||!(0,m.isSignal)(i)&&!b(i))break}T++;try{f=P(t,i,n,f,s),r(f)}finally{T--}})}function A(e,t,n,o){if(T>jt)return console.error("[insert] Exceeded max call depth — possible infinite loop."),()=>null;n!==void 0&&!n&&(n=S("",!0),e.appendChild(n));let r=o??null,f=a=>Array.isArray(a)&&a.some(u=>typeof u=="function"),s=a=>typeof a=="function"?a:()=>a;if(typeof t!="function"&&!f(t)){T++;try{r=P(e,t,n,r)}finally{T--}return()=>r}let i=qt(s(t),e,n,r,a=>{r=a});return()=>(i?.(),r)}function P(e,t,n,o,r){if(t==null||typeof t=="boolean")return w(e,o,n);if(typeof t=="function")for(;typeof t=="function";)t=t();if(t==null||typeof t=="boolean")return w(e,o,n);if(L(t)){let s=S("",!0);return Array.isArray(o)?o.length>0?(e.replaceChild(s,o[0]),w(e,o.slice(1),n)):g(e,s,n):o?e.replaceChild(s,o):g(e,s,n),t.then(i=>{s.parentNode===e&&P(e,i,s.nextSibling,s)}).catch(i=>{console.error("Error resolving promise in insertExpression:",i)}),s}let f=typeof t;if(f==="string"||f==="number"){if(f==="number"&&(t=String(t)),Array.isArray(o)){if(o.length===0){let i=S(t);return g(e,i,n),i}if(o.length===1&&o[0].nodeType===3)return o[0].data=t,o;o=w(e,o,n)}if(o&&j(o))return o.data=t,o;let s=S(t);return o&&o.parentNode===e?e.replaceChild(s,o):oe(e,s)||g(e,s,n),s}if(v(t))return oe(e,t)?(re(t),t):Array.isArray(o)?(o.length===0?g(e,t,n):o[0].parentNode===e?(e.replaceChild(t,o[0]),w(e,o.slice(1),n)):g(e,t,n),t):(o?o!==t&&(o.parentNode===e?e.replaceChild(t,o):g(e,t,n)):g(e,t,n),t);if(Array.isArray(t)){let s=[],i=Array.isArray(o)?o:o?[o]:[],a=[];N(t,s,e,n,!0,r,a);let u=Vt(e,i,s,n);for(let d of a){let p=A(e,d.sig,d.marker);(0,c.onCleanup)(()=>{w(e,p()),d.marker.parentNode===e&&e.removeChild(d.marker)})}return u}if(f==="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 a=i.type(i.props||{});return P(e,a,n,o)}}}return w(e,o,n)}function N(e,t,n,o,r=!0,f,s){for(let i=0;i<e.length;i++){let a=e[i];if(!(a==null||typeof a=="boolean")){for(;typeof a=="function"&&!L(a)&&!(0,m.isSignal)(a)&&!b(a)&&(a=a(),!(a==null||typeof a=="boolean")););if(!(a==null||typeof a=="boolean")){if(typeof a=="function"){let u;for(b(a)&&!(0,m.isSignal)(a)?(f||(f=new Map),f.has(a)||f.set(a,a()),u=f.get(a)):u=a();typeof u=="function"&&!L(u)&&!(0,m.isSignal)(u)&&!b(u);)f||(f=new Map),f.has(u)||f.set(u,u()),u=f.get(u);if(u==null||typeof u=="boolean")continue;if(typeof u=="function"){if((0,m.isSignal)(u)){if(s){let p=S("",!0);t.push(p),s.push({marker:p,sig:u});continue}let d=u();for(;typeof d=="function"&&(0,m.isSignal)(d);)d=d();if(d==null||typeof d=="boolean")continue;Array.isArray(d)?N(d,t,n,o,r,f):N([d],t,n,o,r,f);continue}continue}Array.isArray(u)?N(u,t,n,o,r,f,s):N([u],t,n,o,r,f,s);continue}if(L(a)){let u=S("",!0);t.push(u),a.then(d=>{if(u.parentNode){let p=[];if(N([d],p,u.parentNode,void 0,!1,f),p.length>0){u.parentNode.replaceChild(p[0],u);for(let y=1;y<p.length;y++)u.parentNode?.insertBefore(p[y],p[y-1].nextSibling)}}}).catch(d=>console.error("Error resolving promise in array:",d));continue}if(Array.isArray(a)){N(a,t,n,o,r,f,s);continue}if(v(a)){t.push(a);continue}if(typeof a=="object"&&a!==null&&"type"in a&&"props"in a){let u=a;if(typeof u.type=="function"){let d=u.type(u.props||{});Array.isArray(d)?N(d,t,n,o,!1,f):N([d],t,n,o,!1,f);continue}}if(typeof a=="string"||typeof a=="number"){let u=String(a);if(u.trim()===""&&u!==" ")continue;t.push(S(u));continue}t.push(S(String(a)))}}}}function Vt(e,t,n,o){for(let p=0;p<n.length;p++){let y=n[p].parentNode;y!==null&&y!==e&&y.nodeType!==11&&(n=n.slice(),n[p]=n[p].cloneNode(!0))}let r=n.length,f=t.length,s=r,i=0,a=0,u=f>0?t[f-1].nextSibling??void 0:o,d=null;for(;i<f||a<s;){if(t[i]===n[a]){i++,a++;continue}for(;f>i&&s>a&&t[f-1]===n[s-1];)f--,s--;if(f===i){let p=s<r?a?n[a-1].nextSibling??void 0:n[s-a]:u;for(;a<s;)g(e,n[a++],p)}else if(s===a)for(;i<f;)(!d||!d.has(t[i]))&&t[i].parentNode===e&&e.removeChild(t[i]),i++;else if(t[i]===n[s-1]&&n[a]===t[f-1]){let p=t[--f].nextSibling;g(e,n[a++],t[i++].nextSibling),g(e,n[--s],p),t[f]=t[i-1]}else{if(!d){d=new Map;let y=a;for(;y<s;)d.set(n[y],y++)}let p=d.get(t[i]);if(p!=null)if(a<p&&p<s){let y=i,Q=1;for(;++y<f&&y<s&&!(!d.has(t[y])||d.get(t[y])!==p+Q);)Q++;if(Q>p-a){let qe=t[i];for(;a<p;)g(e,n[a++],qe)}else t[i].parentNode===e?e.replaceChild(n[a++],t[i++]):(g(e,n[a++],u),i++)}else i++;else t[i].parentNode===e&&e.removeChild(t[i]),i++}}return n}function w(e,t,n){if(t)if(Array.isArray(t))for(let o=0;o<t.length;o++)t[o].parentNode===e&&e.removeChild(t[o]);else t.parentNode===e&&e.removeChild(t);return null}function g(e,t,n){l.active&&t.parentNode===e||(n&&n.parentNode===e?e.insertBefore(t,n):e.appendChild(t))}function M(e,t,n){n==null?delete e[t]:e[t]=n}function fe(e,t,n){let o=n,r;return Array.isArray(n)&&(o=n[0],r=n[1]),typeof o!="function"?()=>{}:(e.addEventListener(t,o,r),()=>e.removeEventListener(t,o,r))}function ue(e,t){let n=(o,r)=>{typeof o=="function"&&o(e,r??(()=>{}))};if(typeof t=="function"){n(t);return}if(Array.isArray(t)){if(typeof t[0]=="function"){n(t[0],t[1]);return}for(let o of t)Array.isArray(o)?n(o[0],o[1]):n(o)}}function W(e,t,n,o=!1){return typeof n!="function"?(x(e,t,n,o),()=>{}):(0,c.createRenderEffect)(()=>{let r=typeof n=="function"?n():n;x(e,t,r,o)})}function K(e,t,n){return typeof n!="function"?(M(e,t,n),()=>{}):(0,c.createRenderEffect)(()=>{let o=typeof n=="function"?n():n;M(e,t,o)})}function le(e,t,n){return typeof n!="function"?(x(e,t,!!n),()=>{}):(0,c.createRenderEffect)(()=>{let o=n();x(e,t,!!o)})}function _(e,t){if(t==null){e.removeAttribute("class");return}if(typeof t=="function"){(0,c.createRenderEffect)(()=>_(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 n=Object.keys(t).filter(o=>{let r=t[o];return typeof r=="function"?r():!!r}).join(" ");e.setAttribute("class",n);return}e.setAttribute("class",String(t))}function $(e,t,n){if(!(!t||typeof t!="object"))for(let o in t){let r=t[o],f=o.split(/\s+/).filter(Boolean);if(typeof r=="function"&&n)n.push((0,c.createRenderEffect)(()=>{let s=!!r();for(let i of f)e.classList.toggle(i,s)}));else{let s=!!(typeof r=="function"?r():r);for(let i of f)e.classList.toggle(i,s)}}}function I(e,t){let n=t;for(;typeof n=="function";)n=n();if(n==null){e.removeAttribute("style");return}if(typeof n=="string"){e.style.cssText=n;return}if(typeof n=="object")for(let o in n){let r=n[o];r==null?e.style[o]="":e.style[o]=r}}function Wt(e){let{element:t,props:n,prevProps:o=Pt,isSVG:r=!1,skipChildren:f=!1}=e;if(!t||!H(t))return console.error("[spread] Error: element is not a DOM Element!"),()=>{};if(!n)return console.warn("[spread] Warning: props is undefined!"),()=>{};let s=r||t.namespaceURI===O,i=[];for(let a in n){if(f&&a==="children")continue;let u=n[a],d=o[a];if(u===d)continue;if(a==="ref"){ce(u,t);continue}if(a==="use"){ue(t,u);continue}if(a.startsWith("on:")){i.push(fe(t,a.slice(3),u));continue}if(a.startsWith("prop:")){i.push(K(t,a.slice(5),u));continue}if(a.startsWith("attr:")){i.push(W(t,a.slice(5),u,s));continue}if(a.startsWith("bool:")){i.push(le(t,a.slice(5),u));continue}if(a==="class"||a==="className"){typeof u=="function"?i.push((0,c.createRenderEffect)(()=>_(t,u()))):_(t,u);continue}if(a==="classList"){typeof u=="function"?i.push((0,c.createRenderEffect)(()=>$(t,u()))):$(t,u,i);continue}if(a==="style"){typeof u=="function"?i.push((0,c.createRenderEffect)(()=>I(t,u()))):I(t,u);continue}if(a.startsWith("on")){let y=a.slice(2).toLowerCase();d&&ie(t,y),u&&Me(t,y,u);continue}let p=D.has(a)||!s&&a in t;typeof u=="function"?i.push(p?K(t,a,u):W(t,a,u,s)):i.push((0,c.createRenderEffect)(()=>p?M(t,a,n[a]):x(t,a,n[a],s)))}for(let a in o)if(!(a in n))if(a.startsWith("on")){let u=a.slice(2).toLowerCase();ie(t,u)}else D.has(a)?M(t,a,null):t.removeAttribute(a);return()=>{i.forEach(a=>a())}}function Kt(e,t,n=!1){for(let o in t){let r=t[o];if(o==="ref"){ce(r,e);continue}if(o!=="children"){if(o==="use"){ue(e,r);continue}if(o.startsWith("on:")){fe(e,o.slice(3),r);continue}if(o.startsWith("prop:")){K(e,o.slice(5),r);continue}if(o.startsWith("attr:")){W(e,o.slice(5),r,n);continue}if(o.startsWith("bool:")){le(e,o.slice(5),r);continue}if(o.startsWith("on")&&o.length>2){let f=o.slice(2).toLowerCase();if(typeof r=="function")if(B.has(f)){e[`$$${f}`]=r;let s=`__fx_${f}`;if(!e[s]){let i=a=>{e[`$$${f}`]?.(a)};e.addEventListener(f,i),e[s]=i}}else e[`$$${f}`]=r,V.has(f)||se([f]);continue}if(o==="class"||o==="className"){_(e,r);continue}if(o==="classList"){typeof r=="function"?(0,c.createRenderEffect)(()=>$(e,r())):$(e,r);continue}if(o==="style"){typeof r=="function"?(0,c.createRenderEffect)(()=>I(e,r())):I(e,r);continue}if(o==="innerHTML"){if(typeof r=="function"){let f=(0,c.createEffect)(()=>{let s=r();for(;typeof s=="function";)s=s();e.innerHTML=s});(0,c.onCleanup)(()=>f())}else e.innerHTML=r;continue}if(o==="value"&&(e.tagName==="INPUT"||e.tagName==="TEXTAREA")){if(typeof r=="function"){let f=(0,c.createEffect)(()=>{let s=r();for(;typeof s=="function"&&s.length===0;)s=s();document.activeElement!==e&&(e.value=s??"")});(0,c.onCleanup)(()=>{f()})}else(0,c.createRenderEffect)(()=>{document.activeElement!==e&&(e.value=t[o]??"")});continue}if(o==="checked"&&e.tagName==="INPUT"){if(typeof r=="function"){let f=(0,c.createEffect)(()=>{let s=r();for(;typeof s=="function"&&s.length===0;)s=s();document.activeElement!==e&&(e.checked=s??"")});(0,c.onCleanup)(()=>{f()})}else(0,c.createRenderEffect)(()=>{document.activeElement!==e&&(e.checked=t[o]??"")});continue}if(o==="value"&&e.tagName==="SELECT"){if(typeof r=="function"){let f=!0,s=(0,c.createEffect)(()=>{let i=r();for(;typeof i=="function"&&i.length===0;)i=i();f?(f=!1,queueMicrotask(()=>{e.value=i??""})):e.value=i??""});(0,c.onCleanup)(()=>{s()})}else{let f=!0;(0,c.createRenderEffect)(()=>{let s=t[o];f?(f=!1,queueMicrotask(()=>{e.value=s??""})):e.value=s??""})}continue}if(typeof r=="function"){let f=(0,c.createEffect)(()=>{let s=r();for(;typeof s=="function"&&s.length===0;)s=s();k(e,o,s,n)});(0,c.onCleanup)(()=>{f()})}else(0,c.createRenderEffect)(()=>k(e,o,t[o],n))}}}function Bt(...e){let t=o=>{for(let r=e.length-1;r>=0;r--){let f=e[r];if(f&&o in f&&f[o]!==void 0)return f[o]}},n=o=>{for(let r of e)if(r&&o in r)return!0;return!1};return new Proxy({},{get:(o,r)=>t(r),has:(o,r)=>n(r),ownKeys:()=>{let o=new Set;for(let r of e)if(r)for(let f of Reflect.ownKeys(r))o.add(f);return[...o]},getOwnPropertyDescriptor:(o,r)=>n(r)?{enumerable:!0,configurable:!0,get:()=>t(r)}:void 0})}function Gt(e,...t){let n=new Set;for(let s of t)for(let i of s)n.add(i);let o=s=>({enumerable:!0,configurable:!0,get:()=>e[s]}),r=t.map(s=>{let i=new Set(s);return new Proxy({},{get:(a,u)=>i.has(u)?e[u]:void 0,has:(a,u)=>i.has(u)&&u in e,ownKeys:()=>Array.from(i).filter(a=>a in e),getOwnPropertyDescriptor:(a,u)=>i.has(u)&&u in e?o(u):void 0})}),f=new Proxy({},{get:(s,i)=>n.has(i)?void 0:e[i],has:(s,i)=>!n.has(i)&&i in e,ownKeys:()=>Reflect.ownKeys(e).filter(s=>!n.has(s)),getOwnPropertyDescriptor:(s,i)=>!n.has(i)&&i in e?o(i):void 0});return[...r,f]}function ce(e,t){if(e){if(v(e)){let n=t,o=e;if(!n)return;typeof n=="function"?n(o):typeof n=="object"&&"current"in n&&(n.current=o);return}typeof e=="function"?e(t):typeof e=="object"&&"current"in e&&(e.current=t)}}function Jt(e,t,n){let o=t||document.body,r=(0,c.readChildren)(()=>e),f=[];return(0,c.batch)(()=>{let s=(0,c.createRenderEffect)(()=>{let i=r();Array.isArray(i)?(i.forEach(a=>o.appendChild(a)),f.push(()=>{i.forEach(a=>{a.parentNode===o&&o.removeChild(a)})})):v(i)&&(o.appendChild(i),f.push(()=>{i.parentNode===o&&o.removeChild(i)}))});f.push(s),(0,c.onCleanup)(()=>{f.forEach(i=>i())})}),null}function Xt(e){return typeof e=="string"&&e.toLowerCase()===e}function zt(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 Ut(e){return e.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")}function L(e){return e!=null&&(typeof e=="object"||typeof e=="function")&&typeof e.then=="function"||e instanceof Promise}function Yt(e){return typeof e=="function"&&e.length===0&&(0,m.isSignal)(e)}function de(e,t,n){if(!t)throw new Error("Container element is required");let o,r,f=[];return(0,c.createRoot)(s=>{(0,c.batch)(()=>{l.active||(t.textContent=""),be(t),Ne(),A(t,e)}),r=s}),()=>{r?.(),o?.(),f.forEach(s=>s()),t.textContent=""}}function Zt(e){if(Array.isArray(e))return e;if(typeof e=="function"&&typeof e.set=="function")return[e,e.set];throw new TypeError("[fluixi] bind: needs a signal — either `signal(…)` or the `[get, set]` pair from `createSignal(…)`.")}var G=require("@fluixi/reactive");var Qt="__fx_dom_create_component__",C=globalThis[Qt]??={fn:null};function en(e){C.fn=e}function tn(e={}){let t=e.signalSystem?.createComponent;t&&(C.fn=t)}function nn(e,t){if(C.fn)return C.fn(e,t);let n=typeof e=="function"?(0,G.untrack)(()=>e(t)):e;if(n!=null&&(typeof n=="function"||typeof n=="object")&&!(0,G.isSignal)(n)){try{n.$name=e?.name}catch{}return Te(n)}return n}var on=()=>C.fn!==null,rn=()=>C.fn!==null;function sn(){C.fn=null}var J,an={getStore:()=>J,run(e,t){let n=J;J=e;try{return t()}finally{J=n}}},fn=an;function Oe(){return fn.getStore()}var X=require("@fluixi/reactive/signal");var un="__FX_DATA__";var pe;function ke(){let e=globalThis.__FX_DATA__;if(e)return e;if(pe!==void 0)return pe;let t=null;if(typeof document<"u"){let n=document.getElementById(un)?.textContent;if(n)try{t=JSON.parse(n)}catch{t=null}}return pe=t}function z(){for(;;){for(;l.cursor&&l.cursor.nodeType===3&&l.cursor.data==="";)l.cursor=l.cursor.nextSibling;if(l.cursor!=null||!l.parents.length)return;l.cursor=l.parents.pop().nextSibling}}var ln=new Set(["area","base","br","col","embed","hr","img","input","link","meta","param","source","track","wbr"]),U=typeof process<"u"&&process.env&&!1;function Y(e,t){let n=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 ${n}. 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 cn(e){z();let t=l.cursor;return t&&t.nodeType===1&&t.tagName.toLowerCase()===e.toLowerCase()?(ln.has(e.toLowerCase())?l.cursor=t.nextSibling:(l.parents.push(t),l.cursor=t.firstChild),t):(U&&t&&Y(`<${e}>`,t),null)}function dn(e){z();let t=l.cursor;return t&&t.nodeType===1&&t.tagName.toLowerCase()===e.toLowerCase()?(l.cursor=t.nextSibling,t):(U&&t&&Y(`<${e}> (static)`,t),null)}function pn(e){if(e===""){let n=l.cursor;return n&&n.nodeType===3&&n.data!==""?(l.cursor=n.nextSibling,n.data="",n):null}z();let t=l.cursor;return t&&t.nodeType===3?(l.cursor=t.nextSibling,t.nodeValue!==e&&(t.nodeValue=e),t):(U&&t&&Y(`text ${JSON.stringify(e.slice(0,24))}`,t),null)}function yn(e){z();let t=l.cursor;return t&&t.nodeType===8&&t.data===e?(l.cursor=t.nextSibling,t):(U&&t&&Y(`marker <!--${e.slice(0,24)}-->`,t),null)}var De=!1;function mn(){De||(De=!0,Ce({hydrateElement:cn,hydrateText:pn,hydrateMarker:yn,hydrateStatic:dn}))}function Z(e,t,n){mn(),l.active=!0,l.cursor=t.firstChild,l.parents=[];let o=ke(),r=n?.resourceNamespace,f=0;(0,X.setResourceIdSource)(()=>r?`${r}:r${f++}`:`r${f++}`),(0,X.setServerDataGetter)(o?s=>s in o?{value:o[s]}:void 0:null);try{return de(e,t)}finally{l.active=!1,l.cursor=null,l.parents=[]}}var ye="fluixi-island";function He(e){let{component:t,props:n={},name:o}=e,r=ae(ye),f=o??t.name??"Island";x(r,"name",f),x(r,"props",JSON.stringify(n??{}));let s=E?Oe():void 0;if(s){let i=s.nextIslandNamespace(f);A(r,()=>s.withResourceScope(i,()=>t(n)))}else A(r,()=>t(n));return r}var Fe=!1;function gn(){if(Fe||typeof document>"u")return;Fe=!0;let e=document.createElement("style");e.textContent=`${ye}{display:contents}`,document.head.appendChild(e)}function je(e){if(typeof document>"u")return;gn();let t=document.querySelectorAll(ye),n=new Map;t.forEach(o=>{let r=o.getAttribute("name")??"",f=n.get(r)??0;n.set(r,f+1);let s=e[r];if(!s){typeof process>"u"&&console.warn(`[fluixi] island "${r}" has no component in the registry — left static.`);return}let i={};try{i=JSON.parse(o.getAttribute("props")||"{}")}catch{}Z(()=>s(i),o,{resourceNamespace:`${r}#${f}`})})}
|