what-core 0.7.0 → 0.8.1

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.
@@ -1,2 +1,2 @@
1
- var E=!(typeof process<"u"),w=null;var k=null,z=null,Y=null,De=!1,fe=0,O=[],ne=!1,Be=Symbol("needs_upstream");function q(e,n){let t=e,o=new Set,r=null,i=0;function a(c){E&&De&&console.warn("[what] Signal.set() called inside a computed function. This may cause infinite loops. Use effect() instead."+(n?` (signal: ${n})`:""));let f=typeof c=="function"?c(t):c;t===f||t!==t&&f!==f||(t=f,r=null,E&&w&&w.onSignalUpdate(s),o.size>0&&$e(o))}function s(c){if(arguments.length===0){let f=k;return f!==null&&(f!==r||f._epoch!==i)&&(r=f,i=f._epoch,o.add(f),f.deps.push(o)),t}a(c)}return s.set=a,s.peek=()=>t,s.subscribe=c=>T(()=>c(s())),s._signal=!0,E&&(s._subs=o,n&&(s._debugName=n)),E&&w&&w.onSignalCreate(s),s}function le(e){let n=0,t=e.deps;for(let o=0;o<t.length;o++){let r=t[o]._owner;if(r){let i=r._level;i>n&&(n=i)}}e._level=n+1}function T(e,n){let t=Oe(e);t._level=1;let o=k;k=t;try{let i=t.fn();typeof i=="function"&&(t._cleanup=i)}finally{k=o}le(t),n?.stable&&(t._stable=!0);let r=()=>He(t);return z&&z.disposals.push(r),r}function Oe(e,n){let t={fn:e,deps:[],lazy:n||!1,_onNotify:null,disposed:!1,_pending:!1,_stable:!1,_level:0,_computed:!1,_computedSubs:null,_isDirty:null,_markDirty:null,_cleanup:null,_epoch:0};return E&&w&&w.onEffectCreate(t),t}function je(e){if(e.disposed)return;if(e._stable){if(e._cleanup){try{e._cleanup()}catch(r){E&&console.warn("[what] Error in effect cleanup:",r)}e._cleanup=null}let o=k;k=null;try{let r=e.fn();typeof r=="function"&&(e._cleanup=r)}catch(r){w?.onError&&w.onError(r,{type:"effect",effect:e}),E&&console.warn("[what] Error in stable effect:",r)}finally{k=o}E&&w?.onEffectRun&&w.onEffectRun(e);return}let n=e.deps.length===1?e.deps[0]:null;if(ae(e),e._cleanup){try{e._cleanup()}catch(o){E&&w?.onError&&w.onError(o,{type:"effect-cleanup",effect:e}),E&&console.warn("[what] Error in effect cleanup:",o)}e._cleanup=null}let t=k;k=e;try{let o=e.fn();typeof o=="function"&&(e._cleanup=o)}catch(o){throw o===Be||E&&w?.onError&&w.onError(o,{type:"effect",effect:e}),o}finally{k=t}n!==null&&e.deps.length===1&&e.deps[0]===n&&!e._cleanup&&!e._pending&&(e._stable=!0),E&&w?.onEffectRun&&w.onEffectRun(e)}function He(e){if(e.disposed=!0,E&&w&&w.onEffectDispose(e),ae(e),e._cleanup){try{e._cleanup()}catch(n){E&&console.warn("[what] Error in effect cleanup on dispose:",n)}e._cleanup=null}}function ae(e){let n=e.deps;for(let t=0;t<n.length;t++)n[t].delete(e);n.length=0,e._epoch++}var F=0,W=null,I=0;function ce(e){if(!e.disposed){if(e._onNotify)e._onNotify();else if(!e._pending)if(fe===0&&e._stable){let n=k;k=null;try{let t=e.fn();if(typeof t=="function"){if(e._cleanup)try{e._cleanup()}catch{}e._cleanup=t}}catch(t){E&&w?.onError&&w.onError(t,{type:"effect",effect:e}),E&&console.warn("[what] Error in stable effect:",t)}finally{k=n}}else{e._pending=!0;let n=e._level,t=O.length;t>0&&O[t-1]._level>n&&(ne=!0),O.push(e)}}}function $e(e){if(F===0){F=1;try{for(let n of e)ce(n);if(I>0){let n=0;for(;n<I;){let t=W[n];W[n]=null,n++;for(let o of t)ce(o)}I=0}}finally{F=0}fe===0&&O.length>0&&Pe()}else W===null&&(W=[]),I>=W.length?W.push(e):W[I]=e,I++}var ee=!1;function Pe(){ee||(ee=!0,queueMicrotask(()=>{ee=!1,Re()}))}var te=!1;function Re(){if(!te){te=!0;try{let e=0;for(;O.length>0&&e<25;){let n=O;O=[],n.length>1&&ne&&n.sort((t,o)=>t._level-o._level),ne=!1;for(let t=0;t<n.length;t++){let o=n[t];if(o._pending=!1,!o.disposed&&!o._onNotify){let r=o.deps.length;je(o),!o._computed&&o.deps.length!==r&&le(o)}}e++}if(e>=25){if(E){let t=O.slice(0,3).map(o=>o.fn?.name||o.fn?.toString().slice(0,60)||"(anonymous)");console.warn(`[what] Possible infinite effect loop detected (25 iterations). Likely cause: an effect writes to a signal it also reads, creating a cycle. Use untrack() to read signals without subscribing. Looping effects: ${t.join(", ")}`)}else console.warn("[what] Possible infinite effect loop detected");for(let n=0;n<O.length;n++)O[n]._pending=!1;O.length=0}}finally{te=!1}}}function oe(e){let n=k;k=null;try{return e()}finally{k=n}}function ue(e){if(!e._disposed){e._disposed=!0;for(let n=e.children.length-1;n>=0;n--)ue(e.children[n]);e.children.length=0;for(let n=e.disposals.length-1;n>=0;n--)e.disposals[n]();e.disposals.length=0}}function v(e){let n=z,t=Y,o={disposals:[],owner:null,children:[],_disposed:!1};z=o,Y=o;try{return e(()=>{if(!o._disposed){o._disposed=!0;for(let i=o.children.length-1;i>=0;i--)ue(o.children[i]);o.children.length=0;for(let i=o.disposals.length-1;i>=0;i--)o.disposals[i]();o.disposals.length=0}})}finally{z=n,Y=t}}var pe=null;function de(e){pe=e}function he(e,n){let t=n||pe?.();for(;t;){if(t._errorBoundary)return t._errorBoundary(e),!0;t=t._parentCtx}return!1}var We=null;function me(e){We=e}var ve=new Set(["svg","path","circle","rect","line","polyline","polygon","ellipse","g","defs","use","symbol","clipPath","mask","pattern","image","text","tspan","textPath","foreignObject","linearGradient","radialGradient","stop","marker","animate","animateTransform","animateMotion","set","filter","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feFlood","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","feSpecularLighting","feTile","feTurbulence"]),Ie="http://www.w3.org/2000/svg",_e=new Set,X=new WeakMap;function qe(e){return!e||typeof e!="object"?!1:typeof Node<"u"&&e instanceof Node?!0:typeof e.nodeType=="number"&&typeof e.nodeName=="string"}function ge(e){return!!e&&typeof e=="object"&&(e._vnode===!0||"tag"in e)}function ye(e){if(!e.disposed){if(e.disposed=!0,e.cleanups)for(let n of e.cleanups)try{n()}catch(t){console.error("[what] cleanup error:",t)}if(e.effects)for(let n of e.effects)try{n()}catch{}if(e.hooks){for(let n of e.hooks)if(n&&typeof n.cleanup=="function")try{n.cleanup()}catch(t){console.error("[what] hook cleanup error:",t)}}if(e._cleanupCallbacks)for(let n of e._cleanupCallbacks)try{n()}catch(t){console.error("[what] onCleanup error:",t)}E&&w?.onComponentUnmount&&w.onComponentUnmount(e),_e.delete(e)}}function j(e){if(!e)return;if(e._componentCtx&&ye(e._componentCtx),e.nodeType===8){let t=X.get(e);t&&ye(t)}if(e._dispose)try{e._dispose()}catch{}if(e._propEffects)for(let t in e._propEffects)try{e._propEffects[t]()}catch{}let n=e.childNodes;if(n&&n.length>0)for(let t=0;t<n.length;t++)j(n[t])}function H(e,n,t){if(e==null||e===!1||e===!0)return document.createComment("");if(typeof e=="string"||typeof e=="number")return document.createTextNode(String(e));if(qe(e))return e;if(typeof e=="function"){let o=document.createComment("fn"),r=document.createComment("/fn"),i=[],a=document.createDocumentFragment();a.appendChild(o),a.appendChild(r);let s=T(()=>{let c=e(),f=c==null||c===!1||c===!0?[]:Array.isArray(c)?c:[c],d=r.parentNode;if(d){for(let p of i)j(p),p.parentNode===d&&d.removeChild(p);i=[];for(let p of f){let m=H(p,d,n?._isSvg);if(m)if(m.nodeType===11){let y=Array.from(m.childNodes);d.insertBefore(m,r);for(let g of y)i.push(g)}else d.insertBefore(m,r),i.push(m)}}});return o._dispose=s,r._dispose=s,a}if(Array.isArray(e)){let o=document.createDocumentFragment();for(let r of e){let i=H(r,n,t);i&&o.appendChild(i)}return o}return ge(e)&&typeof e.tag=="function"?Ue(e,n,t):ge(e)?Je(e,n,t):document.createTextNode(String(e))}var Ve={get(e,n){if(n!=="_sig")return e._sig()[n]},has(e,n){return n==="_sig"?!1:n in e._sig()},ownKeys(e){return Reflect.ownKeys(e._sig())},getOwnPropertyDescriptor(e,n){if(n==="_sig")return;let t=e._sig();if(n in t)return{value:t[n],writable:!1,enumerable:!0,configurable:!0}}},A=[];function Ce(){return A[A.length-1]}de(Ce);me(Ce);function be(){return A}function Ue(e,n,t){let{tag:o,props:r,children:i}=e;if(typeof o=="function"&&(o.prototype?.isReactComponent||o.prototype?.render)){let u=o;o=function(x){return new u(x).render()},o.displayName=u.displayName||u.name||"ClassComponent"}if(o==="__errorBoundary"||e.tag==="__errorBoundary")return Ge(e,n);if(o==="__suspense"||e.tag==="__suspense")return ze(e,n);if(o==="__portal"||e.tag==="__portal")return Ke(e,n);let a=A[A.length-1]||null,s=null;if(a&&(s=a._errorBoundary||null,!s)){let u=a._parentCtx;for(;u;){if(u._errorBoundary){s=u._errorBoundary;break}u=u._parentCtx}}let c={hooks:[],hookIndex:0,effects:[],cleanups:[],mounted:!1,disposed:!1,Component:o,_parentCtx:a,_errorBoundary:s},f=document.createComment("c:start"),d=document.createComment("c:end");X.set(f,c),c._startComment=f,c._endComment=d;let p=document.createDocumentFragment();p._componentCtx=c,c._wrapper=f,_e.add(c),E&&w?.onComponentMount&&w.onComponentMount(c);let m=i.length===0?void 0:i.length===1?i[0]:i,y;m!==void 0?y=r?Object.assign({},r,{children:m}):{children:m}:y=r?Object.assign({},r):{};let g=q(y);c._propsSignal=g;let C=new Proxy({_sig:g},Ve);A.push(c);let N;try{N=o(C)}catch(u){if(A.pop(),!he(u,c))throw console.error("[what] Uncaught error in component:",o.name||"Anonymous",u),u;return p.appendChild(f),p.appendChild(d),p}A.pop(),c.mounted=!0,c._mountCallbacks&&queueMicrotask(()=>{if(!c.disposed)for(let u of c._mountCallbacks)try{u()}catch(b){console.error("[what] onMount error:",b)}}),p.appendChild(f);let h=Array.isArray(N)?N:[N];for(let u of h){let b=H(u,p,t);b&&p.appendChild(b)}return p.appendChild(d),p}function Ge(e,n){let{errorState:t,handleError:o,fallback:r,reset:i}=e.props,a=e.children,s=document.createComment("eb:start"),c=document.createComment("eb:end"),f={hooks:[],hookIndex:0,effects:[],cleanups:[],mounted:!1,disposed:!1,_parentCtx:A[A.length-1]||null,_errorBoundary:o,_startComment:s,_endComment:c};X.set(s,f);let d=document.createDocumentFragment();d._componentCtx=f,d.appendChild(s),d.appendChild(c);let p=T(()=>{let m=t();if(A.push(f),s.parentNode)for(;s.nextSibling&&s.nextSibling!==c;){let g=s.nextSibling;j(g),g.parentNode.removeChild(g)}let y;m?y=typeof r=="function"?[r({error:m,reset:i})]:[r]:y=a,y=Array.isArray(y)?y:[y];for(let g of y){let C=H(g,n);C&&(c.parentNode?c.parentNode.insertBefore(C,c):d.insertBefore(C,c))}A.pop()});return f.effects.push(p),d}function ze(e,n){let{boundary:t,fallback:o,loading:r}=e.props,i=e.children,a=document.createComment("sb:start"),s=document.createComment("sb:end"),c={hooks:[],hookIndex:0,effects:[],cleanups:[],mounted:!1,disposed:!1,_parentCtx:A[A.length-1]||null,_startComment:a,_endComment:s};X.set(a,c);let f=document.createDocumentFragment();f._componentCtx=c,f.appendChild(a),f.appendChild(s);let d=T(()=>{let m=r()?[o]:i,y=Array.isArray(m)?m:[m];if(A.push(c),a.parentNode)for(;a.nextSibling&&a.nextSibling!==s;){let g=a.nextSibling;j(g),g.parentNode.removeChild(g)}for(let g of y){let C=H(g,n);C&&(s.parentNode?s.parentNode.insertBefore(C,s):f.insertBefore(C,s))}A.pop()});return c.effects.push(d),f}function Ke(e,n){let{container:t}=e.props,o=e.children;if(!t)return console.warn("[what] Portal: target container not found"),document.createComment("portal:empty");let r={hooks:[],hookIndex:0,effects:[],cleanups:[],mounted:!1,disposed:!1,_parentCtx:A[A.length-1]||null},i=document.createComment("portal");i._componentCtx=r;let a=[];for(let s of o){let c=H(s,t);c&&(t.appendChild(c),a.push(c))}return r._cleanupCallbacks=[()=>{for(let s of a)j(s),s.parentNode&&s.parentNode.removeChild(s)}],i}function Je(e,n,t){let{tag:o,props:r,children:i}=e,a=t||ve.has(o),s=a?document.createElementNS(Ie,o):document.createElement(o);r&&Xe(s,r,{},a);let c=a&&o!=="foreignObject";for(let f=0;f<i.length;f++){let d=H(i[f],s,c);d&&s.appendChild(d)}return s._vnode=e,s}function Xe(e,n,t,o){if(n){for(let r in n)if(!(r==="key"||r==="children")){if(r==="ref"){let i=n.ref;typeof i=="function"?i(e):i&&(i.current=e);continue}we(e,r,n[r],o)}}}function we(e,n,t,o){if(typeof t=="function"&&!(n.startsWith("on")&&n.length>2)&&n!=="ref"){if(e._propEffects||(e._propEffects={}),e._propEffects[n])try{e._propEffects[n]()}catch{}e._propEffects[n]=T(()=>{let r=t();we(e,n,r,o)});return}if(n.startsWith("on")&&n.length>2){let r=n.slice(2),i=!1;r.endsWith("Capture")&&(r=r.slice(0,-7),i=!0);let a=r.toLowerCase(),s=i?a+"_capture":a,c=e._events?.[s];if(c&&c._original===t||(c&&e.removeEventListener(a,c,i),t==null))return;e._events||(e._events={});let f=p=>(p.nativeEvent||(p.nativeEvent=p),oe(()=>f._handler(p)));f._handler=t,f._original=t,e._events[s]=f;let d=t._eventOpts;e.addEventListener(a,f,d||i||void 0);return}if(n==="className"||n==="class"){o?e.setAttribute("class",t||""):e.className=t||"";return}if(n==="style"){if(typeof t=="string")e.style.cssText=t,e._prevStyle=null;else if(typeof t=="object"){let r=e._prevStyle||{};for(let i in r)i in t||(e.style[i]="");for(let i in t)e.style[i]=t[i]??"";e._prevStyle={...t}}return}if(n==="dangerouslySetInnerHTML"){e.innerHTML=t?.__html??"";return}if(n==="innerHTML"){if(t==null)return;if(t&&typeof t=="object"&&"__html"in t)e.innerHTML=t.__html??"";else{E&&console.warn("[what] innerHTML received a raw string. This is a security risk (XSS). Use innerHTML={{ __html: trustedString }} or dangerouslySetInnerHTML={{ __html: trustedString }} instead.");return}return}if(typeof t=="boolean"){t?e.setAttribute(n,""):e.removeAttribute(n);return}if(n.startsWith("data-")||n.startsWith("aria-")){e.setAttribute(n,t);return}if(o){t===!1||t==null?e.removeAttribute(n):e.setAttribute(n,t===!0?"":String(t));return}n in e?e[n]=t:e.setAttribute(n,t)}function Et(e,n,t){if(t&&t.length>0){let o=t.length===1?t[0]:t;n?n.children=o:n={children:o}}return H({tag:e,props:n||{},children:t||[],key:null,_vnode:!0})}var xe=new Set(["href","src","action","formaction","formAction"]);function Ze(e){if(typeof e!="string")return!0;let n=e.trim().replace(/[\s\x00-\x1f]/g,"").toLowerCase();return!(n.startsWith("javascript:")||n.startsWith("data:")||n.startsWith("vbscript:"))}var Qe={tr:{depth:2,wrap:"<table><tbody>",unwrap:"</tbody></table>"},td:{depth:3,wrap:"<table><tbody><tr>",unwrap:"</tr></tbody></table>"},th:{depth:3,wrap:"<table><tbody><tr>",unwrap:"</tr></tbody></table>"},thead:{depth:1,wrap:"<table>",unwrap:"</table>"},tbody:{depth:1,wrap:"<table>",unwrap:"</table>"},tfoot:{depth:1,wrap:"<table>",unwrap:"</table>"},colgroup:{depth:1,wrap:"<table>",unwrap:"</table>"},col:{depth:1,wrap:"<table>",unwrap:"</table>"},caption:{depth:1,wrap:"<table>",unwrap:"</table>"}},Ye=new Set(["svg","path","circle","rect","line","polyline","polygon","ellipse","g","defs","use","text","tspan","foreignObject","clipPath","mask","pattern","linearGradient","radialGradient","stop","marker","symbol","image","animate","animateTransform","animateMotion","set","filter","feGaussianBlur","feOffset","feMerge","feMergeNode","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feFlood","feImage","feMorphology","feSpecularLighting","feTile","feTurbulence","feDistantLight","fePointLight","feSpotLight"]);function Te(e){let n=e.match(/^<([a-zA-Z][a-zA-Z0-9]*)/);return n?n[1]:""}function Fe(e){let n=e.trim(),t=Te(n);if(Ye.has(t))return et(n);let o=Qe[t];if(o){let i=document.createElement("template");i.innerHTML=o.wrap+n+o.unwrap;let a=i.content.firstChild;for(let s=0;s<o.depth;s++)a=a.firstChild;return()=>a.cloneNode(!0)}let r=document.createElement("template");return r.innerHTML=n,()=>r.content.firstChild.cloneNode(!0)}var Ee=!1;function St(e){return E&&!Ee&&(Ee=!0,console.warn("[what] template() is a compiler internal. Use JSX instead. Direct calls with user input can lead to XSS vulnerabilities.")),Fe(e)}function et(e){let n=e.trim();if(Te(n)==="svg"){let r=document.createElement("template");return r.innerHTML=n,()=>r.content.firstChild.cloneNode(!0)}let o=document.createElement("template");return o.innerHTML=`<svg xmlns="http://www.w3.org/2000/svg">${n}</svg>`,()=>o.content.firstChild.firstChild.cloneNode(!0)}function Lt(e,n,t){if(typeof n=="function"){let o=n(),r=typeof o;if(r==="string"||r==="number"){let a=document.createTextNode(String(o)),s=t||null;s?e.insertBefore(a,s):e.appendChild(a);let c=a,f=!0;return T(()=>{let d=n(),p=typeof d;if(f&&(p==="string"||p==="number")){let m=String(d);a.data!==m&&(a.data=m)}else f=!1,c=V(e,d,c,s)}),a}let i=o!=null?V(e,o,null,t||null):null;return T(()=>{i=V(e,n(),i,t||null)}),i}if(typeof n=="string"||typeof n=="number"){let o=document.createTextNode(String(n));return t?e.insertBefore(o,t):e.appendChild(o),o}return n!=null&&typeof n=="object"&&n.nodeType>0?(t?e.insertBefore(n,t):e.appendChild(n),n):V(e,n,null,t||null)}function Ae(e){return!e||typeof e!="object"?!1:typeof Node<"u"&&e instanceof Node?!0:typeof e.nodeType=="number"&&typeof e.nodeName=="string"}function tt(e){return!!e&&typeof e=="object"&&(e._vnode===!0||"tag"in e)}var nt=typeof SVGElement<"u";function ot(e){return nt&&e instanceof SVGElement&&e.tagName!=="foreignObject"}function Se(e){return e==null?[]:Array.isArray(e)?e:[e]}function Me(e,n,t){if(e==null||typeof e=="boolean")return t;if(Array.isArray(e)){for(let o=0;o<e.length;o++)Me(e[o],n,t);return t}return typeof e=="string"||typeof e=="number"?(t.push(document.createTextNode(String(e))),t):Ae(e)?(t.push(e),t):tt(e)?(t.push(H(e,n,ot(n))),t):(t.push(document.createTextNode(String(e))),t)}function rt(e,n){if(e.length!==n.length)return!1;for(let t=0;t<e.length;t++)if(e[t]!==n[t])return!1;return!0}function V(e,n,t,o){if(!e||typeof e.insertBefore!="function")return E&&console.warn("[what] reconcileInsert called with invalid parent:",e),t;let r=o||null;if(n==null||typeof n=="boolean"){let f=Se(t);for(let d=0;d<f.length;d++){let p=f[d];p.parentNode===e&&(j(p),e.removeChild(p))}return null}if((typeof n=="string"||typeof n=="number")&&t&&!Array.isArray(t)&&t.nodeType===3){let f=String(n);return t.data!==f&&(t.data=f),t}if(typeof n=="object"&&n!==null&&n.nodeType>0&&!Array.isArray(n)){if(n===t)return t;if(t&&!Array.isArray(t)&&t.nodeType>0)return t.parentNode===e?(j(t),e.replaceChild(n,t)):r?e.insertBefore(n,r):e.appendChild(n),n}let i=Me(n,e,[]),a=Se(t);if(rt(a,i))return t;let s=i.length;for(let f=0;f<a.length;f++){let d=a[f];if(d.parentNode!==e)continue;let p=!1;for(let m=0;m<s;m++)if(i[m]===d){p=!0;break}p||(j(d),e.removeChild(d))}let c=r;for(let f=i.length-1;f>=0;f--){let d=i[f];(d.parentNode!==e||d.nextSibling!==c)&&(c&&c.parentNode!==e&&(c=null),c?e.insertBefore(d,c):e.appendChild(d)),c=d}return i.length===0?null:i.length===1?i[0]:i}function Nt(e,n,t){let o=t?.key,r=t?.raw||!1;return(i,a)=>{let s=[],c=[],f=[],d=o&&!r?new Map:null,p=document.createComment("/list");return i.insertBefore(p,a||null),T(()=>{let m=e()||[];o?ft(i,p,s,m,c,f,n,o,d):it(i,p,s,m,c,f,n),s=m.length>0?m.slice():m}),p}}function it(e,n,t,o,r,i,a){let s=o.length,c=t.length;if(s===0){if(c>0){for(let h=0;h<c;h++)i[h]&&i[h]();for(let h=c-1;h>=0;h--){let u=r[h];u&&((u._componentCtx||u._dispose||u._propEffects)&&j(u),u.parentNode===e&&e.removeChild(u))}r.length=0,i.length=0}return}if(c===0){let h=document.createDocumentFragment();for(let u=0;u<s;u++){let b=o[u],x=v(M=>(i[u]=M,a(b,u)));r[u]=x,h.appendChild(x)}e.insertBefore(h,n);return}let f=0,d=Math.min(c,s);for(;f<d&&t[f]===o[f];)f++;if(f===c&&f===s)return;let p=c-1,m=s-1;for(;p>=f&&m>=f&&t[p]===o[m];)p--,m--;let y=new Array(s),g=new Array(s);for(let h=0;h<f;h++)y[h]=r[h],g[h]=i[h];for(let h=m+1;h<s;h++){let u=p+1+(h-m-1);y[h]=r[u],g[h]=i[u]}let C=m-f+1,N=p-f+1;if(C===0)for(let h=f;h<=p;h++)i[h]?.(),r[h]?.parentNode&&r[h].parentNode.removeChild(r[h]);else if(N===0){let h=f<s&&y[m+1]?y[m+1]:n,u=document.createDocumentFragment();for(let b=f;b<=m;b++){let x=o[b],M=b;y[b]=v(D=>(g[M]=D,a(x,M))),u.appendChild(y[b])}e.insertBefore(u,h)}else st(e,n,t,o,r,i,a,f,p,m,y,g);r.length=s,i.length=s;for(let h=0;h<s;h++)r[h]=y[h],i[h]=g[h]}function st(e,n,t,o,r,i,a,s,c,f,d,p){let m=new Map;for(let u=s;u<=c;u++)m.set(t[u],u);let y=f-s+1,g=new Int32Array(y);g.fill(-1);for(let u=s;u<=f;u++){let b=m.get(o[u]);b!==void 0&&(m.delete(o[u]),d[u]=r[b],p[u]=i[b],g[u-s]=b)}for(let[,u]of m)i[u]?.(),r[u]?.parentNode&&r[u].parentNode.removeChild(r[u]);let C=y-ct(g,y),N=new Uint8Array(y);if(C>1){let u=new Int32Array(C),b=new Int32Array(C),x=0;for(let D=0;D<y;D++)g[D]!==-1&&(u[x]=g[D],b[x]=D,x++);let M=ke(u,C);for(let D=0;D<M.length;D++)N[b[M[D]]]=1}else if(C===1){for(let u=0;u<y;u++)if(g[u]!==-1){N[u]=1;break}}for(let u=s;u<=f;u++)if(!d[u]){let b=o[u],x=u;d[u]=v(M=>(p[x]=M,a(b,x)))}let h=f+1<d.length&&d[f+1]?d[f+1]:n;for(let u=f;u>=s;u--){let b=u-s;(g[b]===-1||!N[b])&&(h&&h.parentNode!==e&&(h=n),e.insertBefore(d[u],h)),h=d[u]}}function ct(e,n){let t=0;for(let o=0;o<n;o++)e[o]===-1&&t++;return t}function ke(e,n){if(n===0)return[];if(n===1)return[0];let t=new Int32Array(n),o=new Int32Array(n),r=1;t[0]=0,o[0]=-1;for(let s=1;s<n;s++)if(e[s]>e[t[r-1]])o[s]=t[r-1],t[r++]=s;else{let c=0,f=r-1;for(;c<f;){let d=c+f>>1;e[t[d]]<e[s]?c=d+1:f=d}t[c]=s,o[s]=c>0?t[c-1]:-1}let i=new Array(r),a=t[r-1];for(let s=r-1;s>=0;s--)i[s]=a,a=o[a];return i}function ft(e,n,t,o,r,i,a,s,c){let f=o.length,d=t.length;if(f===0){if(d>0){for(let l=0;l<d;l++)i[l]&&i[l]();for(let l=d-1;l>=0;l--){let _=r[l];_&&((_._componentCtx||_._dispose||_._propEffects)&&j(_),_.parentNode===e&&e.removeChild(_))}r.length=0,i.length=0,c&&c.clear()}return}if(d===0){let l=document.createDocumentFragment();for(let _=0;_<f;_++){let S=o[_],B=_,L;if(c){let R=s(S),G=q(S);L=G,c.set(R,{itemSig:G})}else L=S;let $=v(R=>(i[B]=R,a(L,B)));r[_]=$,l.appendChild($)}e.insertBefore(l,n);return}let p=0,m=Math.min(d,f);for(;p<m;){if(t[p]===o[p]){p++;continue}let l=s(t[p]),_=s(o[p]);if(l!==_)break;c&&c.get(l).itemSig.set(o[p]),p++}let y=d-1,g=f-1;for(;y>=p&&g>=p;){if(t[y]===o[g]){y--,g--;continue}let l=s(t[y]),_=s(o[g]);if(l!==_)break;c&&c.get(l).itemSig.set(o[g]),y--,g--}if(p>y&&p>g)return;let C=new Array(f),N=new Array(f);for(let l=0;l<p;l++)C[l]=r[l],N[l]=i[l];for(let l=g+1;l<f;l++){let _=y+1+(l-g-1);C[l]=r[_],N[l]=i[_]}let h=g-p+1;if(y-p+1===0){let l=g+1<f&&C[g+1]?C[g+1]:n,_=document.createDocumentFragment();for(let S=p;S<=g;S++){let B=o[S],L=S,$;if(c){let R=s(B),G=q(B);$=G,c.set(R,{itemSig:G})}else $=B;C[S]=v(R=>(N[L]=R,a($,L))),_.appendChild(C[S])}e.insertBefore(_,l),re(r,i,C,N,f);return}if(h===0){for(let l=p;l<=y;l++)i[l]?.(),r[l]?.parentNode&&e.removeChild(r[l]),c&&c.delete(s(t[l]));re(r,i,C,N,f);return}let b=new Map;for(let l=p;l<=y;l++)b.set(s(t[l]),l);let x=new Int32Array(h);x.fill(-1);for(let l=p;l<=g;l++){let _=s(o[l]),S=b.get(_);S!==void 0&&(b.delete(_),C[l]=r[S],N[l]=i[S],x[l-p]=S,c&&o[l]!==t[S]&&c.get(_).itemSig.set(o[l]))}for(let[l,_]of b)i[_]?.(),r[_]?.parentNode&&e.removeChild(r[_]),c&&c.delete(l);for(let l=p;l<=g;l++)if(!C[l]){let _=o[l],S=l,B;if(c){let L=s(_),$=q(_);B=$,c.set(L,{itemSig:$})}else B=_;C[l]=v(L=>(N[S]=L,a(B,S)))}let M=0,D=!0,se=-1;for(let l=0;l<h;l++)x[l]!==-1&&(M++,x[l]<=se&&(D=!1),se=x[l]);let J=new Uint8Array(h);if(D)for(let l=0;l<h;l++)x[l]!==-1&&(J[l]=1);else if(M>1){let l=new Int32Array(M),_=new Int32Array(M),S=0;for(let L=0;L<h;L++)x[L]!==-1&&(l[S]=x[L],_[S]=L,S++);let B=ke(l,M);for(let L=0;L<B.length;L++)J[_[B[L]]]=1}else if(M===1){for(let l=0;l<h;l++)if(x[l]!==-1){J[l]=1;break}}let U=g+1<C.length&&C[g+1]?C[g+1]:n;for(let l=g;l>=p;l--){let _=l-p;(x[_]===-1||!J[_])&&(U&&U.parentNode!==e&&(U=n),e.insertBefore(C[l],U)),U=C[l]}re(r,i,C,N,f)}function re(e,n,t,o,r){e.length=r,n.length=r;for(let i=0;i<r;i++)e[i]=t[i],n[i]=o[i]}function Tt(e,n){for(let t in n){let o=n[t];if(t.startsWith("on")&&t.length>2){let r=t.slice(2).toLowerCase();e.addEventListener(r,o);continue}typeof o=="function"&&!t.startsWith("on")?t==="class"||t==="className"?T(()=>{e.className=o()||""}):t==="style"&&typeof o()=="object"?T(()=>{let r=o();for(let i in r)e.style[i]=r[i]??""}):T(()=>{Z(e,t,o())}):Z(e,t,o)}}function Z(e,n,t){if(n==="ref"){typeof t=="function"?t(e):t&&typeof t=="object"&&(t.current=e);return}if(n!=="key"){if((xe.has(n)||xe.has(n.toLowerCase()))&&!Ze(t)){typeof console<"u"&&console.warn(`[what] Blocked unsafe URL in "${n}" attribute: ${t}`);return}if(n==="class"||n==="className")e.className=t||"";else if(n==="dangerouslySetInnerHTML")e.innerHTML=t?.__html??"";else if(n==="innerHTML")t&&typeof t=="object"&&"__html"in t?e.innerHTML=t.__html??"":typeof console<"u"&&t!=null&&t!==""&&console.warn('[what] Plain string innerHTML is not allowed. Use { __html: "..." } or dangerouslySetInnerHTML={{ __html: "..." }} instead.');else if(n==="style"){if(typeof t=="string")e.style.cssText=t;else if(typeof t=="object")for(let o in t)e.style[o]=t[o]??""}else n.startsWith("data-")||n.startsWith("aria-")?e.setAttribute(n,t):typeof t=="boolean"?t?e.setAttribute(n,""):e.removeAttribute(n):n in e?e[n]=t:e.setAttribute(n,t)}}var Le=new Set;function At(e){for(let n of e)Le.has(n)||(Le.add(n),document.addEventListener(n,t=>{let o=t.target,r="$$"+n;for(;o;){let i=o[r];if(i&&(i(t),t.cancelBubble))return;o=o.parentNode}}))}function Mt(e,n,t){return e.addEventListener(n,t),()=>e.removeEventListener(n,t)}function kt(e,n){T(()=>{for(let t in n){let o=typeof n[t]=="function"?n[t]():n[t];e.classList.toggle(t,!!o)}})}var Q=!1,P=null;function Dt(){return Q}function Bt(e,n){Q=!0,P={parent:n,index:0};try{return K(e,n)}finally{Q=!1,P=null}}function Ne(e){let n=e.childNodes;for(;P.index<n.length;){let t=n[P.index];if(t.nodeType===8){let o=t.textContent;if(o==="$"||o==="/$"||o==="[]"||o==="/[]"){P.index++;continue}}return P.index++,t}return null}function ie(){return typeof process<"u"&&!1}function K(e,n){if(e==null||typeof e=="boolean")return null;if(typeof e=="string"||typeof e=="number"){let o=Ne(n),r=String(e);if(o&&o.nodeType===3)return ie()&&o.textContent!==r&&(console.warn(`[what] Hydration mismatch: expected text "${r}", got "${o.textContent}"`),o.textContent=r),o;ie()&&console.warn(`[what] Hydration mismatch: expected text node "${r}", got ${o?o.nodeName:"nothing"}. Falling back to client render.`);let i=document.createTextNode(r);return o?n.replaceChild(i,o):n.appendChild(i),i}if(typeof e=="function"){let o=e(),r=K(o,n);return T(()=>{let i=e();Q||(r=V(n,i,r,null))}),r}if(Array.isArray(e)){let o=[];for(let r of e){let i=K(r,n);i&&o.push(i)}return o.length===1?o[0]:o}if(typeof e=="object"&&e._vnode){if(typeof e.tag=="function"){let a=be(),s=e.tag,c=e.props||{},f=e.children||[],d={hooks:[],hookIndex:0,effects:[],cleanups:[],mounted:!1,disposed:!1,Component:s,_parentCtx:a[a.length-1]||null,_errorBoundary:null};a.push(d);let p;try{let m=f.length===0?void 0:f.length===1?f[0]:f;p=s({...c,children:m})}catch(m){return a.pop(),console.error("[what] Error in component during hydration:",s.name||"Anonymous",m),null}return a.pop(),d.mounted=!0,d._mountCallbacks&&queueMicrotask(()=>{if(!d.disposed)for(let m of d._mountCallbacks)try{m()}catch(y){console.error("[what] onMount error:",y)}}),K(p,n)}let o=Ne(n),r=e.tag.toUpperCase();if(o&&o.nodeType===1&&o.nodeName===r){lt(o,e.props||{});let a=P;if(P={parent:o,index:0},e.props?.dangerouslySetInnerHTML?.__html==null)for(let c of e.children)K(c,o);return P=a,o}ie()&&console.warn(`[what] Hydration mismatch: expected <${e.tag}>, got ${o?o.nodeName:"nothing"}. Falling back to client render.`);let i=document.createElement(e.tag);for(let a in e.props||{})a==="children"||a==="key"||Z(i,a,e.props[a]);for(let a of e.children)V(i,a,null,null);return o?n.replaceChild(i,o):n.appendChild(i),i}if(Ae(e))return e;let t=document.createTextNode(String(e));return n.appendChild(t),t}function lt(e,n){for(let t in n){if(t==="children"||t==="key"||t==="ref"||t==="dangerouslySetInnerHTML"||t==="innerHTML")continue;let o=n[t];if(t.startsWith("on")&&t.length>2){let r=t.slice(2).toLowerCase();e.addEventListener(r,o);continue}if(t.startsWith("$$")){e[t]=o;continue}if(typeof o=="function"&&!t.startsWith("on")){t==="class"||t==="className"?T(()=>{e.className=o()||""}):t==="style"&&typeof o()=="object"?T(()=>{let r=o();for(let i in r)e.style[i]=r[i]??""}):T(()=>{Z(e,t,o())});continue}}}export{Et as _$createComponent,Fe as _$template,St as _template,kt as classList,At as delegateEvents,T as effect,Bt as hydrate,Lt as insert,Dt as isHydrating,Nt as mapArray,Mt as on,Z as setProp,Tt as spread,et as svgTemplate,St as template,oe as untrack};
1
+ var E=!(typeof process<"u"),w=null;var k=null,z=null,F=null,Be=!1,le=0,O=[],oe=!1,Oe=Symbol("needs_upstream");function q(e,n){let t=e,o=new Set,r=null,i=0;function a(c){E&&Be&&console.warn("[what] Signal.set() called inside a computed function. This may cause infinite loops. Use effect() instead."+(n?` (signal: ${n})`:""));let f=typeof c=="function"?c(t):c;t===f||t!==t&&f!==f||(t=f,r=null,E&&w&&w.onSignalUpdate(s),o.size>0&&Ie(o))}function s(c){if(arguments.length===0){let f=k;return f!==null&&(f!==r||f._epoch!==i)&&(r=f,i=f._epoch,o.add(f),f.deps.push(o)),t}a(c)}return s.set=a,s.peek=()=>t,s.subscribe=c=>T(()=>c(s())),s._signal=!0,E&&(s._subs=o,n&&(s._debugName=n)),E&&w&&w.onSignalCreate(s),s}function ae(e){let n=0,t=e.deps;for(let o=0;o<t.length;o++){let r=t[o]._owner;if(r){let i=r._level;i>n&&(n=i)}}e._level=n+1}function T(e,n){let t=je(e);t._level=1;let o=k;k=t;try{let i=t.fn();typeof i=="function"&&(t._cleanup=i)}finally{k=o}ae(t),n?.stable&&(t._stable=!0);let r=()=>$e(t);return z&&z.disposals.push(r),r}function je(e,n){let t={fn:e,deps:[],lazy:n||!1,_onNotify:null,disposed:!1,_pending:!1,_stable:!1,_level:0,_computed:!1,_computedSubs:null,_isDirty:null,_markDirty:null,_cleanup:null,_epoch:0};return E&&w&&w.onEffectCreate(t),t}function He(e){if(e.disposed)return;if(e._stable){if(e._cleanup){try{e._cleanup()}catch(r){E&&console.warn("[what] Error in effect cleanup:",r)}e._cleanup=null}let o=k;k=null;try{let r=e.fn();typeof r=="function"&&(e._cleanup=r)}catch(r){w?.onError&&w.onError(r,{type:"effect",effect:e}),E&&console.warn("[what] Error in stable effect:",r)}finally{k=o}E&&w?.onEffectRun&&w.onEffectRun(e);return}let n=e.deps.length===1?e.deps[0]:null;if(ue(e),e._cleanup){try{e._cleanup()}catch(o){E&&w?.onError&&w.onError(o,{type:"effect-cleanup",effect:e}),E&&console.warn("[what] Error in effect cleanup:",o)}e._cleanup=null}let t=k;k=e;try{let o=e.fn();typeof o=="function"&&(e._cleanup=o)}catch(o){throw o===Oe||E&&w?.onError&&w.onError(o,{type:"effect",effect:e}),o}finally{k=t}n!==null&&e.deps.length===1&&e.deps[0]===n&&!e._cleanup&&!e._pending&&(e._stable=!0),E&&w?.onEffectRun&&w.onEffectRun(e)}function $e(e){if(e.disposed=!0,E&&w&&w.onEffectDispose(e),ue(e),e._cleanup){try{e._cleanup()}catch(n){E&&console.warn("[what] Error in effect cleanup on dispose:",n)}e._cleanup=null}}function ue(e){let n=e.deps;for(let t=0;t<n.length;t++)n[t].delete(e);n.length=0,e._epoch++}var ee=0,R=null,v=0;function fe(e){if(!e.disposed){if(e._onNotify)e._onNotify();else if(!e._pending)if(le===0&&e._stable){let n=k;k=null;try{let t=e.fn();if(typeof t=="function"){if(e._cleanup)try{e._cleanup()}catch{}e._cleanup=t}}catch(t){E&&w?.onError&&w.onError(t,{type:"effect",effect:e}),E&&console.warn("[what] Error in stable effect:",t)}finally{k=n}}else{e._pending=!0;let n=e._level,t=O.length;t>0&&O[t-1]._level>n&&(oe=!0),O.push(e)}}}function Ie(e){if(ee===0){ee=1;try{for(let n of e)fe(n);if(v>0){let n=0;for(;n<v;){let t=R[n];R[n]=null,n++;for(let o of t)fe(o)}v=0}}finally{ee=0}le===0&&O.length>0&&Pe()}else R===null&&(R=[]),v>=R.length?R.push(e):R[v]=e,v++}var te=!1;function Pe(){te||(te=!0,queueMicrotask(()=>{te=!1,Re()}))}var ne=!1;function Re(){if(!ne){ne=!0;try{let e=0;for(;O.length>0&&e<25;){let n=O;O=[],n.length>1&&oe&&n.sort((t,o)=>t._level-o._level),oe=!1;for(let t=0;t<n.length;t++){let o=n[t];if(o._pending=!1,!o.disposed&&!o._onNotify){let r=o.deps.length;He(o),!o._computed&&o.deps.length!==r&&ae(o)}}e++}if(e>=25){if(E){let t=O.slice(0,3).map(o=>o.fn?.name||o.fn?.toString().slice(0,60)||"(anonymous)");console.warn(`[what] Possible infinite effect loop detected (25 iterations). Likely cause: an effect writes to a signal it also reads, creating a cycle. Use untrack() to read signals without subscribing. Looping effects: ${t.join(", ")}`)}else console.warn("[what] Possible infinite effect loop detected");for(let n=0;n<O.length;n++)O[n]._pending=!1;O.length=0}}finally{ne=!1}}}function re(e){let n=k;k=null;try{return e()}finally{k=n}}function pe(e){if(!e._disposed){e._disposed=!0;for(let n=e.children.length-1;n>=0;n--)pe(e.children[n]);e.children.length=0;for(let n=e.disposals.length-1;n>=0;n--)e.disposals[n]();e.disposals.length=0}}function W(e){let n=z,t=F,o={disposals:[],owner:null,children:[],_disposed:!1};z=o,F=o;try{return e(()=>{if(!o._disposed){o._disposed=!0;for(let i=o.children.length-1;i>=0;i--)pe(o.children[i]);o.children.length=0;for(let i=o.disposals.length-1;i>=0;i--)o.disposals[i]();o.disposals.length=0}})}finally{z=n,F=t}}var de=null;function he(e){de=e}function me(e,n){let t=n||de?.();for(;t;){if(t._errorBoundary)return t._errorBoundary(e),!0;t=t._parentCtx}return!1}var We=null;function ge(e){We=e}var ve=new Set(["svg","path","circle","rect","line","polyline","polygon","ellipse","g","defs","use","symbol","clipPath","mask","pattern","image","text","tspan","textPath","foreignObject","linearGradient","radialGradient","stop","marker","animate","animateTransform","animateMotion","set","filter","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feFlood","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","feSpecularLighting","feTile","feTurbulence"]),qe="http://www.w3.org/2000/svg",Ce=new Set,Z=new WeakMap;function Ve(e){return!e||typeof e!="object"?!1:typeof Node<"u"&&e instanceof Node?!0:typeof e.nodeType=="number"&&typeof e.nodeName=="string"}function ye(e){return!!e&&typeof e=="object"&&(e._vnode===!0||"tag"in e)}function _e(e){if(!e.disposed){if(e.disposed=!0,e.cleanups)for(let n of e.cleanups)try{n()}catch(t){console.error("[what] cleanup error:",t)}if(e.effects)for(let n of e.effects)try{n()}catch{}if(e.hooks){for(let n of e.hooks)if(n&&typeof n.cleanup=="function")try{n.cleanup()}catch(t){console.error("[what] hook cleanup error:",t)}}if(e._cleanupCallbacks)for(let n of e._cleanupCallbacks)try{n()}catch(t){console.error("[what] onCleanup error:",t)}E&&w?.onComponentUnmount&&w.onComponentUnmount(e),Ce.delete(e)}}function j(e){if(!e)return;if(e._componentCtx&&_e(e._componentCtx),e.nodeType===8){let t=Z.get(e);t&&_e(t)}if(e._dispose)try{e._dispose()}catch{}if(e._propEffects)for(let t in e._propEffects)try{e._propEffects[t]()}catch{}let n=e.childNodes;if(n&&n.length>0)for(let t=0;t<n.length;t++)j(n[t])}function H(e,n,t){if(e==null||e===!1||e===!0)return document.createComment("");if(typeof e=="string"||typeof e=="number")return document.createTextNode(String(e));if(Ve(e))return e;if(typeof e=="function"){let o=document.createComment("fn"),r=document.createComment("/fn"),i=[],a=document.createDocumentFragment();a.appendChild(o),a.appendChild(r);let s=T(()=>{let c=e(),f=c==null||c===!1||c===!0?[]:Array.isArray(c)?c:[c],d=r.parentNode;if(d){for(let p of i)j(p),p.parentNode===d&&d.removeChild(p);i=[];for(let p of f){let m=H(p,d,n?._isSvg);if(m)if(m.nodeType===11){let y=Array.from(m.childNodes);d.insertBefore(m,r);for(let g of y)i.push(g)}else d.insertBefore(m,r),i.push(m)}}});return o._dispose=s,r._dispose=s,a}if(Array.isArray(e)){let o=document.createDocumentFragment();for(let r of e){let i=H(r,n,t);i&&o.appendChild(i)}return o}return ye(e)&&typeof e.tag=="function"?Ge(e,n,t):ye(e)?Xe(e,n,t):document.createTextNode(String(e))}var Ue={get(e,n){if(n!=="_sig")return e._sig()[n]},has(e,n){return n==="_sig"?!1:n in e._sig()},ownKeys(e){return Reflect.ownKeys(e._sig())},getOwnPropertyDescriptor(e,n){if(n==="_sig")return;let t=e._sig();if(n in t)return{value:t[n],writable:!1,enumerable:!0,configurable:!0}}},A=[];function be(){return A[A.length-1]}he(be);ge(be);function we(){return A}function Ge(e,n,t){let{tag:o,props:r,children:i}=e;if(typeof o=="function"&&(o.prototype?.isReactComponent||o.prototype?.render)){let u=o;o=function(x){return new u(x).render()},o.displayName=u.displayName||u.name||"ClassComponent"}if(o==="__errorBoundary"||e.tag==="__errorBoundary")return ze(e,n);if(o==="__suspense"||e.tag==="__suspense")return Ke(e,n);if(o==="__portal"||e.tag==="__portal")return Je(e,n);let a=A[A.length-1]||null,s=null;if(a&&(s=a._errorBoundary||null,!s)){let u=a._parentCtx;for(;u;){if(u._errorBoundary){s=u._errorBoundary;break}u=u._parentCtx}}let c={hooks:[],hookIndex:0,effects:[],cleanups:[],mounted:!1,disposed:!1,Component:o,_parentCtx:a,_errorBoundary:s},f=document.createComment("c:start"),d=document.createComment("c:end");Z.set(f,c),c._startComment=f,c._endComment=d;let p=document.createDocumentFragment();p._componentCtx=c,c._wrapper=f,Ce.add(c),E&&w?.onComponentMount&&w.onComponentMount(c);let m=i.length===0?void 0:i.length===1?i[0]:i,y;m!==void 0?y=r?Object.assign({},r,{children:m}):{children:m}:y=r?Object.assign({},r):{};let g=q(y);c._propsSignal=g;let C=new Proxy({_sig:g},Ue);A.push(c);let N;try{N=o(C)}catch(u){if(A.pop(),!me(u,c))throw console.error("[what] Uncaught error in component:",o.name||"Anonymous",u),u;return p.appendChild(f),p.appendChild(d),p}A.pop(),c.mounted=!0,c._mountCallbacks&&queueMicrotask(()=>{if(!c.disposed)for(let u of c._mountCallbacks)try{u()}catch(b){console.error("[what] onMount error:",b)}}),p.appendChild(f);let h=Array.isArray(N)?N:[N];for(let u of h){let b=H(u,p,t);b&&p.appendChild(b)}return p.appendChild(d),p}function ze(e,n){let{errorState:t,handleError:o,fallback:r,reset:i}=e.props,a=e.children,s=document.createComment("eb:start"),c=document.createComment("eb:end"),f={hooks:[],hookIndex:0,effects:[],cleanups:[],mounted:!1,disposed:!1,_parentCtx:A[A.length-1]||null,_errorBoundary:o,_startComment:s,_endComment:c};Z.set(s,f);let d=document.createDocumentFragment();d._componentCtx=f,d.appendChild(s),d.appendChild(c);let p=T(()=>{let m=t();if(A.push(f),s.parentNode)for(;s.nextSibling&&s.nextSibling!==c;){let g=s.nextSibling;j(g),g.parentNode.removeChild(g)}let y;m?y=typeof r=="function"?[r({error:m,reset:i})]:[r]:y=a,y=Array.isArray(y)?y:[y];for(let g of y){let C=H(g,n);C&&(c.parentNode?c.parentNode.insertBefore(C,c):d.insertBefore(C,c))}A.pop()});return f.effects.push(p),d}function Ke(e,n){let{boundary:t,fallback:o,loading:r}=e.props,i=e.children,a=document.createComment("sb:start"),s=document.createComment("sb:end"),c={hooks:[],hookIndex:0,effects:[],cleanups:[],mounted:!1,disposed:!1,_parentCtx:A[A.length-1]||null,_startComment:a,_endComment:s};Z.set(a,c);let f=document.createDocumentFragment();f._componentCtx=c,f.appendChild(a),f.appendChild(s);let d=T(()=>{let m=r()?[o]:i,y=Array.isArray(m)?m:[m];if(A.push(c),a.parentNode)for(;a.nextSibling&&a.nextSibling!==s;){let g=a.nextSibling;j(g),g.parentNode.removeChild(g)}for(let g of y){let C=H(g,n);C&&(s.parentNode?s.parentNode.insertBefore(C,s):f.insertBefore(C,s))}A.pop()});return c.effects.push(d),f}function Je(e,n){let{container:t}=e.props,o=e.children;if(!t)return console.warn("[what] Portal: target container not found"),document.createComment("portal:empty");let r={hooks:[],hookIndex:0,effects:[],cleanups:[],mounted:!1,disposed:!1,_parentCtx:A[A.length-1]||null},i=document.createComment("portal");i._componentCtx=r;let a=[];for(let s of o){let c=H(s,t);c&&(t.appendChild(c),a.push(c))}return r._cleanupCallbacks=[()=>{for(let s of a)j(s),s.parentNode&&s.parentNode.removeChild(s)}],i}function Xe(e,n,t){let{tag:o,props:r,children:i}=e,a=t||ve.has(o),s=a?document.createElementNS(qe,o):document.createElement(o);r&&Ze(s,r,{},a);let c=a&&o!=="foreignObject";for(let f=0;f<i.length;f++){let d=H(i[f],s,c);d&&s.appendChild(d)}return s._vnode=e,s}function Ze(e,n,t,o){if(n){for(let r in n)if(!(r==="key"||r==="children")){if(r==="ref"){let i=n.ref;typeof i=="function"?i(e):i&&(i.current=e);continue}xe(e,r,n[r],o)}}}function xe(e,n,t,o){if(typeof t=="function"&&!(n.startsWith("on")&&n.length>2)&&n!=="ref"){if(e._propEffects||(e._propEffects={}),e._propEffects[n])try{e._propEffects[n]()}catch{}e._propEffects[n]=T(()=>{let r=t();xe(e,n,r,o)});return}if(n.startsWith("on")&&n.length>2){let r=n.slice(2),i=!1;r.endsWith("Capture")&&(r=r.slice(0,-7),i=!0);let a=r.toLowerCase(),s=i?a+"_capture":a,c=e._events?.[s];if(c&&c._original===t||(c&&e.removeEventListener(a,c,i),t==null))return;e._events||(e._events={});let f=p=>(p.nativeEvent||(p.nativeEvent=p),re(()=>f._handler(p)));f._handler=t,f._original=t,e._events[s]=f;let d=t._eventOpts;e.addEventListener(a,f,d||i||void 0);return}if(n==="className"||n==="class"){o?e.setAttribute("class",t||""):e.className=t||"";return}if(n==="style"){if(typeof t=="string")e.style.cssText=t,e._prevStyle=null;else if(typeof t=="object"){let r=e._prevStyle||{};for(let i in r)i in t||(e.style[i]="");for(let i in t)e.style[i]=t[i]??"";e._prevStyle={...t}}return}if(n==="dangerouslySetInnerHTML"){e.innerHTML=t?.__html??"";return}if(n==="innerHTML"){if(t==null)return;if(t&&typeof t=="object"&&"__html"in t)e.innerHTML=t.__html??"";else{E&&console.warn("[what] innerHTML received a raw string. This is a security risk (XSS). Use innerHTML={{ __html: trustedString }} or dangerouslySetInnerHTML={{ __html: trustedString }} instead.");return}return}if(typeof t=="boolean"){t?e.setAttribute(n,""):e.removeAttribute(n);return}if(n.startsWith("data-")||n.startsWith("aria-")){e.setAttribute(n,t);return}if(o){t===!1||t==null?e.removeAttribute(n):e.setAttribute(n,t===!0?"":String(t));return}n in e?e[n]=t:e.setAttribute(n,t)}var K=null;function St(e){K=typeof e=="function"?e:null}function Lt(e,n,t){if(t&&t.length>0){let o=t.length===1?t[0]:t;n?n.children=o:n={children:o}}return H({tag:e,props:n||{},children:t||[],key:null,_vnode:!0})}var Ee=new Set(["href","src","action","formaction","formAction"]);function Qe(e){if(typeof e!="string")return!0;let n=e.trim().replace(/[\s\x00-\x1f]/g,"").toLowerCase();return!(n.startsWith("javascript:")||n.startsWith("data:")||n.startsWith("vbscript:"))}var Ye={tr:{depth:2,wrap:"<table><tbody>",unwrap:"</tbody></table>"},td:{depth:3,wrap:"<table><tbody><tr>",unwrap:"</tr></tbody></table>"},th:{depth:3,wrap:"<table><tbody><tr>",unwrap:"</tr></tbody></table>"},thead:{depth:1,wrap:"<table>",unwrap:"</table>"},tbody:{depth:1,wrap:"<table>",unwrap:"</table>"},tfoot:{depth:1,wrap:"<table>",unwrap:"</table>"},colgroup:{depth:1,wrap:"<table>",unwrap:"</table>"},col:{depth:1,wrap:"<table>",unwrap:"</table>"},caption:{depth:1,wrap:"<table>",unwrap:"</table>"}},Fe=new Set(["svg","path","circle","rect","line","polyline","polygon","ellipse","g","defs","use","text","tspan","foreignObject","clipPath","mask","pattern","linearGradient","radialGradient","stop","marker","symbol","image","animate","animateTransform","animateMotion","set","filter","feGaussianBlur","feOffset","feMerge","feMergeNode","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feFlood","feImage","feMorphology","feSpecularLighting","feTile","feTurbulence","feDistantLight","fePointLight","feSpotLight"]);function Ae(e){let n=e.match(/^<([a-zA-Z][a-zA-Z0-9]*)/);return n?n[1]:""}function et(e){let n=e.trim(),t=Ae(n);if(Fe.has(t))return tt(n);let o=Ye[t];if(o){let i=document.createElement("template");i.innerHTML=o.wrap+n+o.unwrap;let a=i.content.firstChild;for(let s=0;s<o.depth;s++)a=a.firstChild;return()=>a.cloneNode(!0)}let r=document.createElement("template");return r.innerHTML=n,()=>r.content.firstChild.cloneNode(!0)}var Se=!1;function Nt(e){return E&&!Se&&(Se=!0,console.warn("[what] template() is a compiler internal. Use JSX instead. Direct calls with user input can lead to XSS vulnerabilities.")),et(e)}function tt(e){let n=e.trim();if(Ae(n)==="svg"){let r=document.createElement("template");return r.innerHTML=n,()=>r.content.firstChild.cloneNode(!0)}let o=document.createElement("template");return o.innerHTML=`<svg xmlns="http://www.w3.org/2000/svg">${n}</svg>`,()=>o.content.firstChild.firstChild.cloneNode(!0)}function Tt(e,n,t){if(typeof n=="function"){let o=n(),r=typeof o;if(r==="string"||r==="number"){let a=document.createTextNode(String(o)),s=t||null;s?e.insertBefore(a,s):e.appendChild(a),K&&K(e,String(o));let c=a,f=!0;return T(()=>{let d=n(),p=typeof d;if(f&&(p==="string"||p==="number")){let m=String(d);a.data!==m&&(a.data=m),K&&K(e,m)}else f=!1,c=V(e,d,c,s)}),a}let i=o!=null?V(e,o,null,t||null):null;return T(()=>{i=V(e,n(),i,t||null)}),i}if(typeof n=="string"||typeof n=="number"){let o=document.createTextNode(String(n));return t?e.insertBefore(o,t):e.appendChild(o),o}return n!=null&&typeof n=="object"&&n.nodeType>0?(t?e.insertBefore(n,t):e.appendChild(n),n):V(e,n,null,t||null)}function Me(e){return!e||typeof e!="object"?!1:typeof Node<"u"&&e instanceof Node?!0:typeof e.nodeType=="number"&&typeof e.nodeName=="string"}function nt(e){return!!e&&typeof e=="object"&&(e._vnode===!0||"tag"in e)}var ot=typeof SVGElement<"u";function rt(e){return ot&&e instanceof SVGElement&&e.tagName!=="foreignObject"}function Le(e){return e==null?[]:Array.isArray(e)?e:[e]}function ke(e,n,t){if(e==null||typeof e=="boolean")return t;if(Array.isArray(e)){for(let o=0;o<e.length;o++)ke(e[o],n,t);return t}return typeof e=="string"||typeof e=="number"?(t.push(document.createTextNode(String(e))),t):Me(e)?(t.push(e),t):nt(e)?(t.push(H(e,n,rt(n))),t):(t.push(document.createTextNode(String(e))),t)}function it(e,n){if(e.length!==n.length)return!1;for(let t=0;t<e.length;t++)if(e[t]!==n[t])return!1;return!0}function V(e,n,t,o){if(!e||typeof e.insertBefore!="function")return E&&console.warn("[what] reconcileInsert called with invalid parent:",e),t;let r=o||null;if(n==null||typeof n=="boolean"){let f=Le(t);for(let d=0;d<f.length;d++){let p=f[d];p.parentNode===e&&(j(p),e.removeChild(p))}return null}if((typeof n=="string"||typeof n=="number")&&t&&!Array.isArray(t)&&t.nodeType===3){let f=String(n);return t.data!==f&&(t.data=f),t}if(typeof n=="object"&&n!==null&&n.nodeType>0&&!Array.isArray(n)){if(n===t)return t;if(t&&!Array.isArray(t)&&t.nodeType>0)return t.parentNode===e?(j(t),e.replaceChild(n,t)):r?e.insertBefore(n,r):e.appendChild(n),n}let i=ke(n,e,[]),a=Le(t);if(it(a,i))return t;let s=i.length;for(let f=0;f<a.length;f++){let d=a[f];if(d.parentNode!==e)continue;let p=!1;for(let m=0;m<s;m++)if(i[m]===d){p=!0;break}p||(j(d),e.removeChild(d))}let c=r;for(let f=i.length-1;f>=0;f--){let d=i[f];(d.parentNode!==e||d.nextSibling!==c)&&(c&&c.parentNode!==e&&(c=null),c?e.insertBefore(d,c):e.appendChild(d)),c=d}return i.length===0?null:i.length===1?i[0]:i}function At(e,n,t){let o=t?.key,r=t?.raw||!1;return(i,a)=>{let s=[],c=[],f=[],d=o&&!r?new Map:null,p=document.createComment("/list");return i.insertBefore(p,a||null),T(()=>{let m=e()||[];o?lt(i,p,s,m,c,f,n,o,d):st(i,p,s,m,c,f,n),s=m.length>0?m.slice():m}),p}}function st(e,n,t,o,r,i,a){let s=o.length,c=t.length;if(s===0){if(c>0){for(let h=0;h<c;h++)i[h]&&i[h]();for(let h=c-1;h>=0;h--){let u=r[h];u&&((u._componentCtx||u._dispose||u._propEffects)&&j(u),u.parentNode===e&&e.removeChild(u))}r.length=0,i.length=0}return}if(c===0){let h=document.createDocumentFragment();for(let u=0;u<s;u++){let b=o[u],x=W(M=>(i[u]=M,a(b,u)));r[u]=x,h.appendChild(x)}e.insertBefore(h,n);return}let f=0,d=Math.min(c,s);for(;f<d&&t[f]===o[f];)f++;if(f===c&&f===s)return;let p=c-1,m=s-1;for(;p>=f&&m>=f&&t[p]===o[m];)p--,m--;let y=new Array(s),g=new Array(s);for(let h=0;h<f;h++)y[h]=r[h],g[h]=i[h];for(let h=m+1;h<s;h++){let u=p+1+(h-m-1);y[h]=r[u],g[h]=i[u]}let C=m-f+1,N=p-f+1;if(C===0)for(let h=f;h<=p;h++)i[h]?.(),r[h]?.parentNode&&r[h].parentNode.removeChild(r[h]);else if(N===0){let h=f<s&&y[m+1]?y[m+1]:n,u=document.createDocumentFragment();for(let b=f;b<=m;b++){let x=o[b],M=b;y[b]=W(D=>(g[M]=D,a(x,M))),u.appendChild(y[b])}e.insertBefore(u,h)}else ct(e,n,t,o,r,i,a,f,p,m,y,g);r.length=s,i.length=s;for(let h=0;h<s;h++)r[h]=y[h],i[h]=g[h]}function ct(e,n,t,o,r,i,a,s,c,f,d,p){let m=new Map;for(let u=s;u<=c;u++)m.set(t[u],u);let y=f-s+1,g=new Int32Array(y);g.fill(-1);for(let u=s;u<=f;u++){let b=m.get(o[u]);b!==void 0&&(m.delete(o[u]),d[u]=r[b],p[u]=i[b],g[u-s]=b)}for(let[,u]of m)i[u]?.(),r[u]?.parentNode&&r[u].parentNode.removeChild(r[u]);let C=y-ft(g,y),N=new Uint8Array(y);if(C>1){let u=new Int32Array(C),b=new Int32Array(C),x=0;for(let D=0;D<y;D++)g[D]!==-1&&(u[x]=g[D],b[x]=D,x++);let M=De(u,C);for(let D=0;D<M.length;D++)N[b[M[D]]]=1}else if(C===1){for(let u=0;u<y;u++)if(g[u]!==-1){N[u]=1;break}}for(let u=s;u<=f;u++)if(!d[u]){let b=o[u],x=u;d[u]=W(M=>(p[x]=M,a(b,x)))}let h=f+1<d.length&&d[f+1]?d[f+1]:n;for(let u=f;u>=s;u--){let b=u-s;(g[b]===-1||!N[b])&&(h&&h.parentNode!==e&&(h=n),e.insertBefore(d[u],h)),h=d[u]}}function ft(e,n){let t=0;for(let o=0;o<n;o++)e[o]===-1&&t++;return t}function De(e,n){if(n===0)return[];if(n===1)return[0];let t=new Int32Array(n),o=new Int32Array(n),r=1;t[0]=0,o[0]=-1;for(let s=1;s<n;s++)if(e[s]>e[t[r-1]])o[s]=t[r-1],t[r++]=s;else{let c=0,f=r-1;for(;c<f;){let d=c+f>>1;e[t[d]]<e[s]?c=d+1:f=d}t[c]=s,o[s]=c>0?t[c-1]:-1}let i=new Array(r),a=t[r-1];for(let s=r-1;s>=0;s--)i[s]=a,a=o[a];return i}function lt(e,n,t,o,r,i,a,s,c){let f=o.length,d=t.length;if(f===0){if(d>0){for(let l=0;l<d;l++)i[l]&&i[l]();for(let l=d-1;l>=0;l--){let _=r[l];_&&((_._componentCtx||_._dispose||_._propEffects)&&j(_),_.parentNode===e&&e.removeChild(_))}r.length=0,i.length=0,c&&c.clear()}return}if(d===0){let l=document.createDocumentFragment();for(let _=0;_<f;_++){let S=o[_],B=_,L;if(c){let P=s(S),G=q(S);L=G,c.set(P,{itemSig:G})}else L=S;let $=W(P=>(i[B]=P,a(L,B)));r[_]=$,l.appendChild($)}e.insertBefore(l,n);return}let p=0,m=Math.min(d,f);for(;p<m;){if(t[p]===o[p]){p++;continue}let l=s(t[p]),_=s(o[p]);if(l!==_)break;c&&c.get(l).itemSig.set(o[p]),p++}let y=d-1,g=f-1;for(;y>=p&&g>=p;){if(t[y]===o[g]){y--,g--;continue}let l=s(t[y]),_=s(o[g]);if(l!==_)break;c&&c.get(l).itemSig.set(o[g]),y--,g--}if(p>y&&p>g)return;let C=new Array(f),N=new Array(f);for(let l=0;l<p;l++)C[l]=r[l],N[l]=i[l];for(let l=g+1;l<f;l++){let _=y+1+(l-g-1);C[l]=r[_],N[l]=i[_]}let h=g-p+1;if(y-p+1===0){let l=g+1<f&&C[g+1]?C[g+1]:n,_=document.createDocumentFragment();for(let S=p;S<=g;S++){let B=o[S],L=S,$;if(c){let P=s(B),G=q(B);$=G,c.set(P,{itemSig:G})}else $=B;C[S]=W(P=>(N[L]=P,a($,L))),_.appendChild(C[S])}e.insertBefore(_,l),ie(r,i,C,N,f);return}if(h===0){for(let l=p;l<=y;l++)i[l]?.(),r[l]?.parentNode&&e.removeChild(r[l]),c&&c.delete(s(t[l]));ie(r,i,C,N,f);return}let b=new Map;for(let l=p;l<=y;l++)b.set(s(t[l]),l);let x=new Int32Array(h);x.fill(-1);for(let l=p;l<=g;l++){let _=s(o[l]),S=b.get(_);S!==void 0&&(b.delete(_),C[l]=r[S],N[l]=i[S],x[l-p]=S,c&&o[l]!==t[S]&&c.get(_).itemSig.set(o[l]))}for(let[l,_]of b)i[_]?.(),r[_]?.parentNode&&e.removeChild(r[_]),c&&c.delete(l);for(let l=p;l<=g;l++)if(!C[l]){let _=o[l],S=l,B;if(c){let L=s(_),$=q(_);B=$,c.set(L,{itemSig:$})}else B=_;C[l]=W(L=>(N[S]=L,a(B,S)))}let M=0,D=!0,ce=-1;for(let l=0;l<h;l++)x[l]!==-1&&(M++,x[l]<=ce&&(D=!1),ce=x[l]);let X=new Uint8Array(h);if(D)for(let l=0;l<h;l++)x[l]!==-1&&(X[l]=1);else if(M>1){let l=new Int32Array(M),_=new Int32Array(M),S=0;for(let L=0;L<h;L++)x[L]!==-1&&(l[S]=x[L],_[S]=L,S++);let B=De(l,M);for(let L=0;L<B.length;L++)X[_[B[L]]]=1}else if(M===1){for(let l=0;l<h;l++)if(x[l]!==-1){X[l]=1;break}}let U=g+1<C.length&&C[g+1]?C[g+1]:n;for(let l=g;l>=p;l--){let _=l-p;(x[_]===-1||!X[_])&&(U&&U.parentNode!==e&&(U=n),e.insertBefore(C[l],U)),U=C[l]}ie(r,i,C,N,f)}function ie(e,n,t,o,r){e.length=r,n.length=r;for(let i=0;i<r;i++)e[i]=t[i],n[i]=o[i]}function Mt(e,n){for(let t in n){let o=n[t];if(t.startsWith("on")&&t.length>2){let r=t.slice(2).toLowerCase();e.addEventListener(r,o);continue}typeof o=="function"&&!t.startsWith("on")?t==="class"||t==="className"?T(()=>{e.className=o()||""}):t==="style"&&typeof o()=="object"?T(()=>{let r=o();for(let i in r)e.style[i]=r[i]??""}):T(()=>{Q(e,t,o())}):Q(e,t,o)}}function Q(e,n,t){if(n==="ref"){typeof t=="function"?t(e):t&&typeof t=="object"&&(t.current=e);return}if(n!=="key"){if((Ee.has(n)||Ee.has(n.toLowerCase()))&&!Qe(t)){typeof console<"u"&&console.warn(`[what] Blocked unsafe URL in "${n}" attribute: ${t}`);return}if(n==="class"||n==="className")e.className=t||"";else if(n==="dangerouslySetInnerHTML")e.innerHTML=t?.__html??"";else if(n==="innerHTML")t&&typeof t=="object"&&"__html"in t?e.innerHTML=t.__html??"":typeof console<"u"&&t!=null&&t!==""&&console.warn('[what] Plain string innerHTML is not allowed. Use { __html: "..." } or dangerouslySetInnerHTML={{ __html: "..." }} instead.');else if(n==="style"){if(typeof t=="string")e.style.cssText=t;else if(typeof t=="object")for(let o in t)e.style[o]=t[o]??""}else n.startsWith("data-")||n.startsWith("aria-")?e.setAttribute(n,t):typeof t=="boolean"?t?e.setAttribute(n,""):e.removeAttribute(n):n in e?e[n]=t:e.setAttribute(n,t)}}var Ne=new Set;function kt(e){for(let n of e)Ne.has(n)||(Ne.add(n),document.addEventListener(n,t=>{let o=t.target,r="$$"+n;for(;o;){let i=o[r];if(i&&(i(t),t.cancelBubble))return;o=o.parentNode}}))}function Dt(e,n,t){return e.addEventListener(n,t),()=>e.removeEventListener(n,t)}function Bt(e,n){T(()=>{for(let t in n){let o=typeof n[t]=="function"?n[t]():n[t];e.classList.toggle(t,!!o)}})}var Y=!1,I=null;function Ot(){return Y}function jt(e,n){Y=!0,I={parent:n,index:0};try{return J(e,n)}finally{Y=!1,I=null}}function Te(e){let n=e.childNodes;for(;I.index<n.length;){let t=n[I.index];if(t.nodeType===8){let o=t.textContent;if(o==="$"||o==="/$"||o==="[]"||o==="/[]"){I.index++;continue}}return I.index++,t}return null}function se(){return typeof process<"u"&&!1}function J(e,n){if(e==null||typeof e=="boolean")return null;if(typeof e=="string"||typeof e=="number"){let o=Te(n),r=String(e);if(o&&o.nodeType===3)return se()&&o.textContent!==r&&(console.warn(`[what] Hydration mismatch: expected text "${r}", got "${o.textContent}"`),o.textContent=r),o;se()&&console.warn(`[what] Hydration mismatch: expected text node "${r}", got ${o?o.nodeName:"nothing"}. Falling back to client render.`);let i=document.createTextNode(r);return o?n.replaceChild(i,o):n.appendChild(i),i}if(typeof e=="function"){let o=e(),r=J(o,n);return T(()=>{let i=e();Y||(r=V(n,i,r,null))}),r}if(Array.isArray(e)){let o=[];for(let r of e){let i=J(r,n);i&&o.push(i)}return o.length===1?o[0]:o}if(typeof e=="object"&&e._vnode){if(typeof e.tag=="function"){let a=we(),s=e.tag,c=e.props||{},f=e.children||[],d={hooks:[],hookIndex:0,effects:[],cleanups:[],mounted:!1,disposed:!1,Component:s,_parentCtx:a[a.length-1]||null,_errorBoundary:null};a.push(d);let p;try{let m=f.length===0?void 0:f.length===1?f[0]:f;p=s({...c,children:m})}catch(m){return a.pop(),console.error("[what] Error in component during hydration:",s.name||"Anonymous",m),null}return a.pop(),d.mounted=!0,d._mountCallbacks&&queueMicrotask(()=>{if(!d.disposed)for(let m of d._mountCallbacks)try{m()}catch(y){console.error("[what] onMount error:",y)}}),J(p,n)}let o=Te(n),r=e.tag.toUpperCase();if(o&&o.nodeType===1&&o.nodeName===r){at(o,e.props||{});let a=I;if(I={parent:o,index:0},e.props?.dangerouslySetInnerHTML?.__html==null)for(let c of e.children)J(c,o);return I=a,o}se()&&console.warn(`[what] Hydration mismatch: expected <${e.tag}>, got ${o?o.nodeName:"nothing"}. Falling back to client render.`);let i=document.createElement(e.tag);for(let a in e.props||{})a==="children"||a==="key"||Q(i,a,e.props[a]);for(let a of e.children)V(i,a,null,null);return o?n.replaceChild(i,o):n.appendChild(i),i}if(Me(e))return e;let t=document.createTextNode(String(e));return n.appendChild(t),t}function at(e,n){for(let t in n){if(t==="children"||t==="key"||t==="ref"||t==="dangerouslySetInnerHTML"||t==="innerHTML")continue;let o=n[t];if(t.startsWith("on")&&t.length>2){let r=t.slice(2).toLowerCase();e.addEventListener(r,o);continue}if(t.startsWith("$$")){e[t]=o;continue}if(typeof o=="function"&&!t.startsWith("on")){t==="class"||t==="className"?T(()=>{e.className=o()||""}):t==="style"&&typeof o()=="object"?T(()=>{let r=o();for(let i in r)e.style[i]=r[i]??""}):T(()=>{Q(e,t,o())});continue}}}export{Lt as _$createComponent,et as _$template,St as _setTextInsertHook,Nt as _template,Bt as classList,kt as delegateEvents,T as effect,jt as hydrate,Tt as insert,Ot as isHydrating,At as mapArray,Dt as on,Q as setProp,Mt as spread,tt as svgTemplate,Nt as template,re as untrack};
2
2
  //# sourceMappingURL=render.min.js.map