nuclo 0.2.11 → 0.2.13

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 +1 @@
1
- {"version":3,"file":"runtime.d.ts","sourceRoot":"","sources":["../../src/list/runtime.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,YAAY,EAAE,WAAW,EAAkC,iBAAiB,EAAE,MAAM,SAAS,CAAC;AAC5G,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAmMnD,wBAAgB,IAAI,CAAC,KAAK,EAAE,QAAQ,SAAS,cAAc,EACzD,OAAO,EAAE,WAAW,CAAC,KAAK,EAAE,QAAQ,CAAC,GACpC,IAAI,CAsLN;AAED,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,QAAQ,SAAS,cAAc,GAAG,cAAc,EACvF,aAAa,EAAE,iBAAiB,CAAC,KAAK,CAAC,EACvC,UAAU,EAAE,YAAY,CAAC,KAAK,EAAE,QAAQ,CAAC,EACzC,IAAI,EAAE,eAAe,CAAC,QAAQ,CAAC,EAC/B,KAAK,EAAE,MAAM,GACZ,WAAW,CAAC,KAAK,EAAE,QAAQ,CAAC,CAM9B;AAkJD,wBAAgB,kBAAkB,CAAC,KAAK,CAAC,EAAE,WAAW,GAAG,IAAI,CAoC5D"}
1
+ {"version":3,"file":"runtime.d.ts","sourceRoot":"","sources":["../../src/list/runtime.ts"],"names":[],"mappings":"AAkBA,OAAO,KAAK,EAAE,YAAY,EAAE,WAAW,EAAkC,iBAAiB,EAAE,MAAM,SAAS,CAAC;AAC5G,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAgLnD,wBAAgB,IAAI,CAAC,KAAK,EAAE,QAAQ,SAAS,cAAc,EACzD,OAAO,EAAE,WAAW,CAAC,KAAK,EAAE,QAAQ,CAAC,GACpC,IAAI,CA6NN;AAED,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,QAAQ,SAAS,cAAc,GAAG,cAAc,EACvF,aAAa,EAAE,iBAAiB,CAAC,KAAK,CAAC,EACvC,UAAU,EAAE,YAAY,CAAC,KAAK,EAAE,QAAQ,CAAC,EACzC,IAAI,EAAE,eAAe,CAAC,QAAQ,CAAC,EAC/B,KAAK,EAAE,MAAM,GACZ,WAAW,CAAC,KAAK,EAAE,QAAQ,CAAC,CAM9B;AAyJD,wBAAgB,kBAAkB,CAAC,KAAK,CAAC,EAAE,WAAW,GAAG,IAAI,CAoC5D"}
package/dist/nuclo.cjs CHANGED
@@ -1,2 +1,2 @@
1
- Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});function e(e){return e===null||typeof e!=`object`&&typeof e!=`function`}function t(e){return e instanceof Node?!0:typeof e!=`object`||!e?!1:typeof e.nodeType==`number`}function n(e){return typeof e==`object`&&!!e}function r(e){return n(e)&&`tagName`in e}function i(e){return typeof e==`boolean`}function a(e){return typeof e==`function`}function o(e){return a(e)&&e.length===0}function s(e,t){typeof console<`u`&&console.error(`nuclo: ${e}`,t)}const c=typeof window<`u`&&typeof document<`u`,l=new WeakMap;function u(e,t){let n=l.get(e);n?n.push(t):l.set(e,[t])}function d(e,t){e.removeEventListener(t.type,t.wrapped,t.options)}function f(e,t){let n=l.get(e);if(!n)return;if(t===void 0){for(let t=0;t<n.length;t++)d(e,n[t]);l.delete(e);return}let r=0;for(let i=0;i<n.length;i++){let a=n[i];a.type===t?d(e,a):n[r++]=a}n.length=r,r===0&&l.delete(e)}function p(e,t,n){return function(r){if(!c||!r||typeof r.addEventListener!=`function`)return;let i=r,a=function(n){try{t.call(i,n)}catch(t){s(`Error in '${e}' listener`,t)}};i.addEventListener(e,a,n),u(i,{type:e,wrapped:a,options:n})}}const m=new Set,h=new WeakMap,g=new Set,_=new WeakMap,v=typeof FinalizationRegistry<`u`?new FinalizationRegistry(e=>{m.delete(e)}):null,y=typeof FinalizationRegistry<`u`?new FinalizationRegistry(e=>{g.delete(e)}):null;function ee(e,t){let n=h.get(e);if(n){n.info.resolver=t.resolver,n.info.lastValue=t.lastValue;return}let r=new WeakRef(e);m.add(r),h.set(e,{ref:r,info:t}),v?.register(e,r)}function te(e,t){let n=new WeakRef(e);g.add(n),_.set(e,{ref:n,info:t}),y?.register(e,n)}function ne(e){m.delete(e)}function re(e){g.delete(e)}function ie(e){let t=h.get(e);t&&(m.delete(t.ref),h.delete(e))}function ae(e){let t=_.get(e);t&&(g.delete(t.ref),_.delete(e))}const oe=new WeakMap,b=new Set,se=new WeakMap,ce=typeof FinalizationRegistry<`u`?new FinalizationRegistry(e=>{b.delete(e)}):null;function le(e,t){oe.set(e,t);let n=new WeakRef(e);b.add(n),se.set(e,n),ce?.register(e,n)}function ue(e){oe.delete(e);let t=se.get(e);t&&(b.delete(t),se.delete(e))}function de(){let e=[],t=[];for(let n of b){let r=n.deref();r===void 0?t.push(n):e.push(r)}for(let e of t)b.delete(e);return e}function fe(e){return oe.get(e)??null}const pe=`http://www.w3.org/2000/svg`;function me(e){return globalThis.document?document.createElement(e):null}function he(e,t){return globalThis.document?document.createElementNS(e,t):null}function x(e){return globalThis.document?document.createTextNode(e):null}function ge(){return globalThis.document?document.createDocumentFragment():null}function _e(e,t){try{return e.appendChild(t),!0}catch(e){return s(`Failed to append child node`,e),!1}}function ve(e){if(e.nodeType===Node.ELEMENT_NODE){let t=e;f(t),ae(t),ue(t)}else e.nodeType===Node.TEXT_NODE?ie(e):e.nodeType===Node.COMMENT_NODE&&ue(e);if(e.childNodes&&e.childNodes.length>0)for(let t=0;t<e.childNodes.length;t++)ve(e.childNodes[t])}function S(e){if(!e?.parentNode)return!1;try{return ve(e),e.parentNode.removeChild(e),!0}catch(e){return s(`Failed to remove child node`,e),!1}}function ye(e,t,n){try{return e.insertBefore(t,n),!0}catch(e){return s(`Failed to insert node before reference`,e),!1}}function C(e){return globalThis.document?globalThis.document.createComment(e):null}function be(e,t=`hidden`){return globalThis.document?globalThis.document.createComment(`conditional-${e}-${t}`):null}function xe(e,t){let n=C(`${e}-end`);if(!n)throw Error(`Failed to create comment: document not available`);let r=C(`${e}-start-${t}`);if(!r)throw Error(`Failed to create comment: document not available`);return{start:r,end:n}}function Se(e,t){let n=e.nextSibling;for(;n&&n!==t;){let e=n.nextSibling;S(n),n=e}}function Ce(e,t){let n=t.parentNode;if(n)for(let r=0;r<e.length;r++)ye(n,e[r],t)}function we(e,...t){if(!e)return e;for(let n=0;n<t.length;n++){let r=t[n];if(r!=null){let t;if(typeof r==`string`){let e=x(r);if(e)t=e;else continue}else t=r;_e(e,t)}}return e}function w(e){return e?.isConnected===!0}function Te(e,t){if(!e?.parentNode)return!1;try{return e.parentNode.replaceChild(t,e),!0}catch(e){return s(`Error replacing conditional node`,e),!1}}function Ee(e){return e}function De(e,t,n){let r=Ee(e),i=r.appendChild.bind(r),a=r.insertBefore.bind(r);r.appendChild=function(e){return a(e,t)};try{return n()}finally{r.appendChild=i}}function Oe(e,t,n){try{if(n==null||n===``)return e.style[t]=``,!0;let r=String(n);return e.style[t]=r,!0}catch{return!1}}const ke={};let Ae=!1;function je(e){let t=e.target;if(!t||typeof Node>`u`||!(t instanceof Node))return;let n=t;for(;n;){if(n instanceof Element){let e=_.get(n);e&&(w(n)?Ie(e.info):(re(e.ref),_.delete(n)))}n=n.parentNode}}function Me(){Ae||typeof document>`u`||typeof document.addEventListener!=`function`||(document.addEventListener(`update`,je,!0),Ae=!0)}function Ne(e){let t=_.get(e);if(t)return t.info;let n={attributeResolvers:new Map};return te(e,n),n}function Pe(e){return typeof e!=`object`||!e}function Fe(e,t){let n;try{n=t.resolver()}catch(t){s(`Failed to resolve reactive attribute: ${e}`,t);return}let r=Pe(n);if(!(r&&Object.is(n,t.lastValue)))try{t.applyValue(n),t.lastValue=r?n:ke}catch(t){s(`Failed to apply reactive attribute: ${e}`,t)}}function Ie(e){for(let[t,n]of e.attributeResolvers)Fe(t,n)}function Le(e,t,n,r){if(!(e instanceof Element)||!t||typeof n!=`function`){s(`Invalid parameters for registerAttributeResolver`);return}let i={resolver:n,applyValue:r,lastValue:ke};if(!c){Fe(t,i);return}Me(),Ne(e).attributeResolvers.set(t,i),Fe(t,i)}function Re(e){let t=[];for(let n of g){let r=n.deref();if(r===void 0){t.push(n);continue}let i=_.get(r);if(!i){t.push(n);continue}if(!w(r)){_.delete(r),t.push(n);continue}e&&!e.contains(r)||Ie(i.info)}for(let e of t)re(e)}function ze(e,t){if(!(!e?.style||!t))for(let n in t)Oe(e,n,t[n])||s(`Failed to set style property '${n}'`)}function Be(e,t){e&&(a(t)?Le(e,`style`,t,function(t){ze(e,t)}):ze(e,t))}const T=new WeakMap,Ve=new WeakSet;function E(e,t){let n=t.length,r=0;for(let i=0;i<=n;i++)(i===n||t.charCodeAt(i)===32)&&(i>r&&e.add(t.substring(r,i)),r=i+1)}function D(e){let t=``;for(let n of e)t&&(t+=` `),t+=n;return t}function He(e){if(e.className&&!T.has(e)){let t=new Set;E(t,e.className),T.set(e,t)}Ve.add(e)}function Ue(e){return Ve.has(e)}function We(e,t){if(!t)return;let n=T.get(e);n||(n=new Set,T.set(e,n)),E(n,t)}function Ge(e,t){let n=T.get(e);if(!n||n.size===0){e.className=t||``;return}if(!t){e.className=D(n);return}let r=D(n),i=t.length,a=0;for(let e=0;e<=i;e++)if(e===i||t.charCodeAt(e)===32){if(e>a){let i=t.substring(a,e);n.has(i)||(r+=` `+i)}a=e+1}e.className=r}function Ke(e,t){if(!t)return;let n=e.className;if(n&&n!==t){let r=new Set;E(r,n),E(r,t),e.className=D(r)}else e.className=t}function qe(e,t){if(typeof e!=`function`){s(`Invalid resolver provided to createReactiveTextNode`);let e=x(``);if(!e)throw Error(`Failed to create text node: document not available`);return e}let n;if(arguments.length>1)n=t;else try{n=e()}catch(e){s(`Failed to evaluate reactive text resolver`,e),n=``}let r=n===void 0?``:String(n),i=x(r);if(!i)throw Error(`Failed to create text node: document not available`);return c&&ee(i,{resolver:e,lastValue:r}),i}function Je(e){let t=[];for(let n of m){let r=n.deref();if(r===void 0){t.push(n);continue}let i=h.get(r);if(!i){t.push(n);continue}let a=i.info;if(!w(r)){h.delete(r),t.push(n);continue}if(e&&!e.contains(r))continue;let o;try{o=a.resolver()}catch(e){s(`Failed to update reactive text node`,e),o=void 0}let c=o===void 0?``:String(o);c!==a.lastValue&&(r.textContent=c,a.lastValue=c)}for(let e of t)ne(e)}function Ye(e,t,n,r=!1){if(n==null)return;if(t===`style`){Be(e,n);return}let i=(n,r=!1)=>{if(n!=null){if(t===`className`&&e instanceof HTMLElement&&r){Ke(e,String(n));return}if(e instanceof Element&&e.namespaceURI===`http://www.w3.org/2000/svg`)e.setAttribute(String(t),String(n));else if(t in e)try{e[t]=n}catch{e instanceof Element&&e.setAttribute(String(t),String(n))}else e instanceof Element&&e.setAttribute(String(t),String(n))}};if(a(n)&&n.length===0){let r=n;t===`className`&&e instanceof HTMLElement?(He(e),Le(e,String(t),r,function(t){Ge(e,String(t||``))})):Le(e,String(t),r,function(e){i(e,!1)})}else{if(t===`className`&&e instanceof HTMLElement&&Ue(e)){let t=String(n||``);t&&(We(e,t),Ke(e,t));return}i(n,r)}}function O(e,t,n=!0){if(t)for(let r of Object.keys(t)){let i=t[r];Ye(e,r,i,n&&r===`className`)}}let k=!1,Xe=new WeakMap;function A(){return k}function Ze(){return!1}function Qe(){k=!0,Xe=new WeakMap}function $e(){k=!1}function et(e){let t=k;k=!1;try{return e()}finally{k=t}}function j(e){let t=Xe.get(e);return t===void 0?e.firstChild:t}function M(e,t){Xe.set(e,t)}function tt(e){return e.nodeType===3&&!/\S/.test(e.textContent||``)}function N(e){let t=j(e),n=!1;for(;t&&tt(t);)t=t.nextSibling,n=!0;n&&M(e,t)}function P(e){let t=j(e);return t&&M(e,t.nextSibling),t}function nt(e,t){if(!k)return null;N(e);let n=j(e);return n&&n.nodeType===1&&n.tagName.toLowerCase()===t?P(e):null}function rt(e,t){if(!t)return;let n=j(e);for(;n;){let r=n===t?null:n.nextSibling;e.removeChild(n),n=r}M(e,null)}const F=new WeakMap;function it(e){return n(e)&&!t(e)&&`className`in e&&typeof e.className==`string`&&Object.keys(e).length===1}function at(e){N(e);let t=j(e);return!!t&&t.nodeType===8&&t.textContent?.trimStart().startsWith(`text-`)===!0}function ot(e,t){let n=j(e);if(n&&n.nodeType===3)return P(e),n.textContent!==t&&(n.textContent=t),n;let r=x(t);return r?(e.insertBefore(r,n),M(e,n),r):null}function I(r,i,c){if(i==null)return null;if(a(i)){if(o(i))try{let t=F.get(i);if(t||(t={value:i(),error:!1},F.set(i,t)),t.error)return ct(c,()=>``);let n=t.value;if(it(n))return O(r,{className:()=>{let e=i();return it(e)?e.className:``}}),null;if(e(n)){let t=()=>{let t=i();return e(t)&&t!=null?t:``},a=n??``;if(A()&&at(r)){let e=r;P(e);let n=String(a),i=ot(e,n);return i&&ee(i,{resolver:t,lastValue:n}),null}return ct(c,t,a)}return null}catch(e){return F.set(i,{value:void 0,error:!0}),s(`Error evaluating reactive text function:`,e),ct(c,()=>``)}let a=i(r,c);return a==null?null:e(a)?lt(c,a):t(a)?a:(n(a)&&O(r,a),null)}let l=i;if(e(l)){if(A()&&at(r)){let e=r;return P(e),ot(e,String(l)),null}return lt(c,l)}return t(l)?l:(O(r,l),null)}function st(e,t){if(c&&!A()&&!Ze())return t;let n=ge();if(!n)throw Error(`Failed to create document fragment: document not available`);let r=C(` text-${e} `);return r&&n.appendChild(r),t&&n.appendChild(t),n}function ct(e,t,n){return st(e,qe(t,n))}function lt(e,t){return st(e,x(String(t)))}function L(e,t,n=0){if(!t||t.length===0)return;let r=n,i=e;for(let n=0;n<t.length;n+=1){let a=t[n];if(a==null)continue;let o=I(e,a,r);o&&(o.parentNode!==i&&i.appendChild(o),r+=1)}}function ut(e,t){let n=me(e);return L(n,t,0),n}function dt(e,t){let n=he(pe,e);if(!n)throw Error(`Failed to create SVG element: ${e}`);return L(n,t,0),n}function ft(e,...t){return function(n,r=0){let i=n,a=i?nt(i,e):null,o=a??me(e),s=o,c=a?s.lastChild:null;return L(o,t,r),a&&rt(s,c),o}}function pt(e,...t){return function(n,r=0){let i=n,a=i?nt(i,e):null,o=a??he(`http://www.w3.org/2000/svg`,e);if(!o)throw Error(`Failed to create SVG element: ${e}`);let s=o,c=a?s.lastChild:null;return L(o,t,r),a&&rt(s,c),o}}function mt(e){return(...t)=>ft(e,...t)}function ht(e){return(...t)=>pt(e,...t)}const gt=`a.abbr.address.area.article.aside.audio.b.base.bdi.bdo.blockquote.body.br.button.canvas.caption.cite.code.col.colgroup.data.datalist.dd.del.details.dfn.dialog.div.dl.dt.em.embed.fieldset.figcaption.figure.footer.form.h1.h2.h3.h4.h5.h6.head.header.hgroup.hr.html.i.iframe.img.input.ins.kbd.label.legend.li.link.main.map.mark.menu.meta.meter.nav.noscript.object.ol.optgroup.option.output.p.picture.pre.progress.q.rp.rt.ruby.s.samp.script.search.section.select.slot.small.source.span.strong.style.sub.summary.sup.table.tbody.td.template.textarea.tfoot.th.thead.time.title.tr.track.u.ul.var.video.wbr`.split(`.`),_t=`a.animate.animateMotion.animateTransform.circle.clipPath.defs.desc.ellipse.feBlend.feColorMatrix.feComponentTransfer.feComposite.feConvolveMatrix.feDiffuseLighting.feDisplacementMap.feDistantLight.feDropShadow.feFlood.feFuncA.feFuncB.feFuncG.feFuncR.feGaussianBlur.feImage.feMerge.feMergeNode.feMorphology.feOffset.fePointLight.feSpecularLighting.feSpotLight.feTile.feTurbulence.filter.foreignObject.g.image.line.linearGradient.marker.mask.metadata.mpath.path.pattern.polygon.polyline.radialGradient.rect.script.set.stop.style.svg.switch.symbol.text.textPath.title.tspan.use.view`.split(`.`),vt=[`area`,`base`,`br`,`col`,`embed`,`hr`,`img`,`input`,`link`,`meta`,`source`,`track`,`wbr`];function yt(e,t){if(t in e&&typeof e[t]!=`function`)return;let n=mt(t);e[t]=n,t===`var`&&(e.var_=n)}function bt(e,t){let n=`${t}Svg`;n in e||(e[n]=ht(t))}function xt(e=globalThis){let t=`__nuclo_tags_registered`;if(!e[t]){for(let t=0;t<_t.length;t++)bt(e,_t[t]);for(let t=0;t<gt.length;t++)yt(e,gt[t]);e[t]=!0}}function St(e,t,n){if(a(e)){let i=e(t,n);return i&&r(i)?i:null}return e&&r(e)?e:null}function Ct(e,t){if(e===t)return!0;if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}const R=new Set,z=new WeakMap,wt=typeof FinalizationRegistry<`u`?new FinalizationRegistry(e=>{R.delete(e)}):null;function Tt(e,t){let n=new WeakRef(e);R.add(n),z.set(e,t),wt?.register(e,n)}function Et(e){return Array.isArray(e)?e:Array.from(e)}function Dt(e,t,n){return St(e.renderItem(t,n),e.host,n)}function Ot(e){let t=e;t.element=null,t.item=null}function B(e){S(e.element),Ot(e)}function kt(e,t,n,r){if(n.parentNode!==t||r.parentNode!==t)return!1;for(let n=0;n<e.length;n++){let r=e[n],i=r.element;i&&i.parentNode===t&&t.removeChild(i),Ot(r)}return!0}function At(e){let t=e.length;if(t===0)return[];let n=Array(t),r=[];for(let i=0;i<t;i++){let t=e[i],a=0,o=r.length;for(;a<o;){let n=a+o>>1;e[r[n]]<t?a=n+1:o=n}n[i]=a>0?r[a-1]:-1,a===r.length?r.push(i):r[a]=i}let i=r.length,a=r[i-1],o=Array(i);for(;i>0;)o[--i]=a,a=n[a];return o}function jt(e,t,n,r,i,a,o){let s=ge(),c=0;for(let l=r;l<i;l++){let r=n[l],i=Dt(e,r,l);if(!i)continue;o.push({item:r,element:i});let u=i;s?(s.appendChild(u),c++):t.insertBefore(u,a)}s&&c>0&&t.insertBefore(s,a)}function Mt(e,t){for(let n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}function Nt(e){let{host:t,startMarker:n,endMarker:r}=e,i=n.parentNode??t,a=Et(e.itemsProvider());if(Ct(e.lastSyncedItems,a))return;let o=e.records,s=a.length;if(s===0){if(!kt(o,i,n,r))for(let e=0;e<o.length;e++)B(o[e]);e.records=[],e.lastSyncedItems=[];return}if(o.length===0){let t=[];jt(e,i,a,0,s,r,t),e.records=t,e.lastSyncedItems=a.slice();return}let c=e.lastSyncedItems;if(s>c.length&&Mt(c,a)){jt(e,i,a,c.length,s,r,o),e.records=o,e.lastSyncedItems=a.slice();return}let l=new Map,u=new Map,d=new Map;for(let e=0;e<o.length;e++){let t=o[e];d.set(t,e);let n=u.get(t.item);n?n.push(t):u.set(t.item,[t])}for(let e=0;e<s;e++){let t=a[e];if(e<c.length&&c[e]===t){let n=o[e];if(n&&n.item===t){l.set(e,n);let r=u.get(t);r.splice(r.indexOf(n),1),r.length===0&&u.delete(t)}}}let f=Array(s),p=new Set(o),m=0;for(let t=s-1;t>=0;t--){let n=a[t],r=l.get(t);if(!r){let e=u.get(n);e&&e.length>0&&(r=e.shift(),e.length===0&&u.delete(n))}if(r)p.delete(r),m++;else{let i=Dt(e,n,t);if(!i){f[t]=null;continue}r={item:n,element:i}}f[t]=r}if(m===0){if(!kt(o,i,n,r))for(let e of p)B(e)}else for(let e of p)B(e);let h=[],g=[];for(let e=0;e<s;e++){let t=f[e];if(!t)continue;let n=d.get(t);n!==void 0&&(h.push(e),g.push(n))}let _=new Set;if(g.length>0){let e=At(g);for(let t=0;t<e.length;t++)_.add(h[e[t]])}let v=r,y=null;for(let e=s-1;e>=0;e--){let t=f[e];if(!t)continue;let n=t.element;if(!d.has(t)){y||=ge(),y?y.insertBefore(n,y.firstChild):(i.insertBefore(n,v),v=n);continue}if(y&&y.firstChild){let e=y.firstChild;i.insertBefore(y,v),v=e,y=null}_.has(e)||i.insertBefore(n,v),v=n}y&&y.firstChild&&i.insertBefore(y,v),e.records=f.filter(e=>e!==null),e.lastSyncedItems=a.slice()}function Pt(e,t,n,r){return A()?Ft(e,t,n,r):V(e,t,n,r)}function V(e,t,n,r){let{start:i,end:a}=xe(`list`,r),o={itemsProvider:e,renderItem:t,startMarker:i,endMarker:a,records:[],host:n,lastSyncedItems:[]},s=n;return s.appendChild(i),s.appendChild(a),Nt(o),c&&Tt(i,o),o}function Ft(e,t,n,r){let i=n;N(i);let a=j(i);if(!a||a.nodeType!==8||!a.textContent?.startsWith(`list-start-`))return V(e,t,n,r);let o=P(i),s=0,l=j(i);for(;l;){if(l.nodeType===8){let e=l.textContent||``;if(e.startsWith(`list-start-`))s++;else if(e===`list-end`){if(s===0)break;s--}}l=l.nextSibling}let u=l;if(!u){let e=C(`list-end`);e&&(i.insertBefore(e,o.nextSibling),u=e)}if(!u)return V(e,t,n,r);let d=Et(e()),f=[];for(let e=0;e<d.length;e++){let r=St(t(d[e],e),n,e);r&&f.push({item:d[e],element:r})}let p=j(i);for(;p&&p!==u;){let e=p.nextSibling;S(p),p=e}let m=u;for(let e=f.length-1;e>=0;e--){let t=f[e].element;(t.parentNode!==i||t.nextSibling!==m)&&i.insertBefore(t,m),m=t}M(i,u.nextSibling);let h={itemsProvider:e,renderItem:t,startMarker:o,endMarker:u,records:f,host:n,lastSyncedItems:d.slice()};return c&&Tt(o,h),h}function It(e){for(let t=0;t<e.records.length;t++){let n=e.records[t];n.element=null,n.item=null}e.records=[]}function Lt(e){let t=[];for(let n of R){let r=n.deref();if(!r){t.push(n);continue}let i=z.get(r);if(!i){t.push(n);continue}if(!w(r)||!w(i.endMarker)){It(i),z.delete(r),t.push(n);continue}e&&!e.contains(r)||Nt(i)}for(let e of t)R.delete(e)}function Rt(e,t){return function(n,r){return Pt(e,t,n,r).startMarker}}function zt(e,t){try{return e()}catch(e){if(t)return t(e),!1;throw e}}function Bt(e,t){return typeof e==`function`?zt(e,t):!!e}const H=new Set,U=new WeakMap,Vt=typeof FinalizationRegistry<`u`?new FinalizationRegistry(e=>{H.delete(e)}):null;function Ht(e,t){for(let t=0;t<e.length;t++)if(Bt(e[t].condition))return t;return t.length>0?-1:null}function Ut(e){let{groups:t,elseContent:n,host:r,index:i,endMarker:a}=e,o=Ht(t,n);o!==e.activeIndex&&(Se(e.startMarker,e.endMarker),e.activeIndex=o,o!==null&&Ce(qt(o>=0?t[o].content:n,r,i,a),a))}function Wt(e){let t=new WeakRef(e.startMarker);H.add(t),U.set(e.startMarker,e),Vt?.register(e.startMarker,t)}function Gt(e){let t=[];for(let n of H){let r=n.deref();if(r===void 0){t.push(n);continue}let i=U.get(r);if(!i){t.push(n);continue}if(!w(r)||!w(i.endMarker)){U.delete(r),t.push(n);continue}if(!(e&&!e.contains(r)))try{i.update()}catch(e){s(`when() branch threw during update; unregistering this conditional`,e),U.delete(r),t.push(n)}}for(let e of t)H.delete(e)}function Kt(e,t,n,r){return a(e)?o(e)?(F.delete(e),I(t,e,n)):De(t,r,()=>{let r=I(t,e,n);return r&&!r.parentNode?r:null}):I(t,e,n)}function qt(e,t,n,r){let i=[];for(let a of e){let e=Kt(a,t,n,r);e&&i.push(e)}return i}function Jt(e,t){return`when-start-${e}-b${t===null?`n`:t}`}function Yt(e){let t=/-b(n|-?\d+)$/.exec(e||``);if(t)return t[1]===`n`?null:parseInt(t[1],10)}var Xt=class e{groups=[];elseContent=[];constructor(e,...t){this.groups.push({condition:e,content:t})}cloneWith(t,n){let r=Object.create(e.prototype);return r.groups=[...this.groups],t&&r.groups.push(t),r.elseContent=n??[...this.elseContent],r}when(e,...t){return this.groups.push({condition:e,content:t}),this}else(...e){return this.elseContent=e,this}render(e,t){return globalThis.document?A()?this.hydrateRender(e,t):this.freshRender(e,t):null}freshRender(e,t){let{start:n,end:r}=xe(`when`,t),i=this.createRuntimeFromMarkers(e,t,n,r),a=Ee(e);return a.appendChild(n),a.appendChild(r),Ut(i),n.textContent=Jt(t,i.activeIndex),n}hydrateRender(e,t){let n=e;N(n);let r=j(n);if(!r||r.nodeType!==8||!r.textContent?.startsWith(`when-start-`))return this.freshRender(e,t);let i=P(n),a=0,o=j(n);for(;o;){if(o.nodeType===8){let e=o.textContent||``;if(e.startsWith(`when-start-`))a++;else if(e===`when-end`){if(a===0)break;a--}}o=o.nextSibling}let s=o,c=!1;if(!s){let e=C(`when-end`);if(!e)return i;n.insertBefore(e,i.nextSibling),s=e,c=!0}let l=Ht(this.groups,this.elseContent),u=Yt(i.textContent);if(!c&&(u===void 0||u===l)){if(l!==null){let n=l>=0?this.groups[l].content:this.elseContent;for(let r of n)I(e,r,t)}}else if(Se(i,s),l!==null){let n=l>=0?this.groups[l].content:this.elseContent,r=s;et(()=>{Ce(qt(n,e,t,r),r)})}return M(n,s.nextSibling),this.createRuntimeFromMarkers(e,t,i,s,l),i}createRuntimeFromMarkers(e,t,n,r,i=null){let a={startMarker:n,endMarker:r,host:e,index:t,groups:[...this.groups],elseContent:[...this.elseContent],activeIndex:i,update:function(){Ut(a)}};return c&&Wt(a),a}};function Zt(e){return Object.assign(function(t,n){return e.render(t,n)},{when:function(t,...n){return Zt(e.cloneWith({condition:t,content:n}))},else:function(...t){return Zt(e.cloneWith(void 0,t))}})}function Qt(e,...t){return Zt(new Xt(e,...t))}function $t(e){try{return e.isSvg?dt(e.tagName,e.modifiers):ut(e.tagName,e.modifiers)}catch(t){if(s(`Error applying modifiers in conditional element "${e.tagName}"`,t),e.isSvg){let n=he(pe,e.tagName);if(!n)throw Error(`Failed to create SVG element: ${e.tagName}`,{cause:t});return n}let n=me(e.tagName);if(!n)throw Error(`Failed to create element: ${e.tagName}`,{cause:t});return n}}function en(e){let t=fe(e);if(!t)return;let n=zt(t.condition,e=>{s(`Error evaluating conditional condition`,e)}),r=e.nodeType===Node.ELEMENT_NODE;if(n&&!r){let n=$t(t);le(n,t),Te(e,n)}else if(!n&&r){let n=be(t.tagName);n&&(le(n,t),Te(e,n))}}function tn(e){if(c)try{let t=de();for(let n of t){if(!n.isConnected){ue(n);continue}e&&!e.contains(n)||en(n)}}catch(e){s(`Error during conditional elements update`,e)}}const W=new Map;function nn(e){let t=[],n=new Set;for(let r of e){if(typeof r!=`string`)continue;let e=r.trim();e&&(n.has(e)||(n.add(e),t.push(e)))}return t}function rn(e,t){let n=W.get(e);n||(n=new Set,W.set(e,n)),n.add(new WeakRef(t))}function an(e){let t=nn(e);if(t.length===0)return[];let n=new Set;for(let e of t){let t=W.get(e);if(!t)continue;let r=[];for(let e of t){let t=e.deref();if(t===void 0){r.push(e);continue}if(!w(t)){r.push(e);continue}n.add(t)}for(let e of r)t.delete(e);t.size===0&&W.delete(e)}return Array.from(n)}function on(...e){let t=nn(e);return function(e){if(c&&e instanceof Element)for(let n of t)rn(n,e)}}const sn=[Lt,Gt,tn,Re,Je,ln];function cn(...e){let t;if(e.length>0){let n=an(e);if(n.length===1){let e=n[0];t={roots:n,contains:t=>e.contains(t)}}else t={roots:n,contains:e=>{for(let t of n)if(t.contains(e))return!0;return!1}}}for(let e of sn)e(t)}function ln(e){if(typeof document>`u`)return;let t=e?e.roots:[document.body??document];for(let e of t)try{e.dispatchEvent(new Event(`update`,{bubbles:!0}))}catch(e){s(`Error dispatching global update event`,e)}}function un(e,t,n=0){let r=t||document.body,i=e(r,n);return r.appendChild(i),i}function dn(e,t){let n=t||document.body,r=n;Qe();try{let t=e(n,0),i=t;if(i&&i.nodeType===1&&i.parentNode!==r){let e=j(r);if(e){let t=e.nextSibling;r.insertBefore(i,e),S(e),M(r,t)}else r.appendChild(i),M(r,null)}return t}finally{$e()}}let fn=null;function pn(e){fn=e}const mn=new Map,hn=new Map,gn=new Set,G=[],K=new Map;let q=null,J=null,_n=null,Y=0;const X=new Map;function vn(e){for(let t of e)K.has(t)||K.set(t,[])}function yn(e,t){try{let n=e.cssRules.length;e.insertRule(t+`{}`,n);let r=e.cssRules[n];return X.set(t,r),r}catch{return null}}function bn(e,t){try{e.insertRule(t,Y),Y++}catch{}}function xn(){if(typeof document>`u`||typeof document.getElementById!=`function`)return null;if(J&&_n===document&&J.ownerNode&&J.ownerNode.isConnected)return J;let e=document.getElementById(`nuclo-styles`);if(e||(e=document.createElement(`style`),e.id=`nuclo-styles`,document.head.appendChild(e)),J=e.sheet,_n=document,X.clear(),Y=0,!J)return null;for(let e of G)bn(J,e);for(let[e,t]of K){let n=yn(J,e);if(n)for(let e of t)try{n.insertRule(e,n.cssRules.length)}catch{}}return J}function Sn(e,t){if(t===void 0)G.push(e);else{let n=K.get(t);n||(n=[],K.set(t,n)),n.push(e)}q=null,fn?.(t===void 0?e:t+`{`+e+`}`);let n=xn();if(n)if(t===void 0)bn(n,e);else{let r=X.get(t)??yn(n,t);if(r)try{r.insertRule(e,r.cssRules.length)}catch{}}}function Cn(e){let t=2166136261,n=2128831035;for(let r=0;r<e.length;r++){let i=e.charCodeAt(r);t=Math.imul(t^i,16777619),n=Math.imul(n^i,2246822507)}return(t>>>0).toString(36)+((n>>>9)%1296).toString(36)}function Z(e,t,n,r){let i=(e??``)+`|`+t+`|`+n+`:`+r,a=mn.get(i);return a===void 0?(a=`n`+Cn(i),mn.set(i,a),hn.set(a,(e??``)+`|`+t+`|`+n),Sn(`.`+a+t+`{`+n+`:`+r+`}`,e),a):(xn(),a)}function wn(e){return hn.get(e)}function Tn(e,t){if(gn.has(e)){xn();return}gn.add(e),Sn(t,void 0)}function En(){if(q!==null)return q;let e=G.join(``);for(let[t,n]of K)n.length>0&&(e+=t+`{`+n.join(``)+`}`);return q=e,e}function Dn(){mn.clear(),hn.clear(),gn.clear(),G.length=0,K.clear(),X.clear(),q=null,Y=0,J=null,_n=null,typeof document<`u`&&document.getElementById(`nuclo-styles`)?.remove()}const On={hover:`:hover`,focus:`:focus`,focusVisible:`:focus-visible`,focusWithin:`:focus-within`,active:`:active`,visited:`:visited`,disabled:`:disabled`,enabled:`:enabled`,checked:`:checked`,required:`:required`,invalid:`:invalid`,valid:`:valid`,readOnly:`:read-only`,first:`:first-child`,last:`:last-child`,only:`:only-child`,odd:`:nth-child(odd)`,even:`:nth-child(even)`,empty:`:empty`,placeholderShown:`:placeholder-shown`,placeholder:`::placeholder`,before:`::before`,after:`::after`,selection:`::selection`,marker:`::marker`,firstLine:`::first-line`,firstLetter:`::first-letter`},kn={bg:[`background`],p:[`padding`],px:[`padding-left`,`padding-right`],py:[`padding-top`,`padding-bottom`],pt:[`padding-top`],pr:[`padding-right`],pb:[`padding-bottom`],pl:[`padding-left`],m:[`margin`],mx:[`margin-left`,`margin-right`],my:[`margin-top`,`margin-bottom`],mt:[`margin-top`],mr:[`margin-right`],mb:[`margin-bottom`],ml:[`margin-left`],w:[`width`],h:[`height`],minW:[`min-width`],maxW:[`max-width`],minH:[`min-height`],maxH:[`max-height`],size:[`width`,`height`],text:[`font-size`],font:[`font-family`],weight:[`font-weight`],leading:[`line-height`],tracking:[`letter-spacing`],align:[`text-align`],items:[`align-items`],justify:[`justify-content`],z:[`z-index`],rounded:[`border-radius`],shadow:[`box-shadow`],select:[`user-select`]},An={row:{display:`flex`,"flex-direction":`row`},col:{display:`flex`,"flex-direction":`column`},center:{"align-items":`center`,"justify-content":`center`},truncate:{overflow:`hidden`,"text-overflow":`ellipsis`,"white-space":`nowrap`}},jn={background:`colors`,"background-color":`colors`,color:`colors`,"border-color":`colors`,"border-top-color":`colors`,"border-right-color":`colors`,"border-bottom-color":`colors`,"border-left-color":`colors`,"outline-color":`colors`,"caret-color":`colors`,"text-decoration-color":`colors`,"font-family":`fonts`,"box-shadow":`shadows`,"border-radius":`radii`},Mn=new Set([`z-index`,`opacity`,`font-weight`,`line-height`,`flex`,`flex-grow`,`flex-shrink`,`order`,`aspect-ratio`,`zoom`,`scale`,`column-count`,`orphans`,`widows`,`tab-size`,`animation-iteration-count`,`grid-column`,`grid-row`]),Nn=new Map;function Pn(e){let t=Nn.get(e);return t===void 0&&(t=e.replace(/[A-Z]/g,e=>`-`+e.toLowerCase()),Nn.set(e,t)),t}function Fn(e){return e.charCodeAt(0)===64?e:`@media `+e}function In(e,t){return e!==void 0&&e.startsWith(`@media`)&&t.startsWith(`@media`)?e+` and`+t.slice(6):t}function Ln(e){let t={className:e};return Object.defineProperty(t,"toString",{value:()=>e,enumerable:!1}),t}function Rn(e,t){for(let n of e)if(n)if(typeof n==`string`)for(let e of n.split(` `))e&&t.set(wn(e)??e,e);else if(Array.isArray(n))Rn(n,t);else for(let e of n.className.split(` `))e&&t.set(wn(e)??e,e)}function Q(...e){let t=new Map;Rn(e,t);let n=``;for(let e of t.values())n+=(n?` `:``)+e;return Ln(n)}function zn(e={}){let t=e.screens??{};vn(Object.values(t).map(Fn));let n=new WeakMap;function r(t,n){if(typeof n==`number`)return n===0||Mn.has(t)?String(n):n+`px`;let r=jn[t];if(r!==void 0){let t=e[r]?.[n];if(t!==void 0)return t}return n}function i(e,n,a,o){for(let s in e){let c=e[s];if(c==null||c===!1)continue;if(typeof c==`object`){if(s===`raw`){let e=c;for(let t in e)o.push(Z(n,a,t,r(t,e[t])));continue}let e=On[s];if(e!==void 0){i(c,n,a+e,o);continue}let l=t[s];if(l!==void 0){i(c,In(n,Fn(l)),a,o);continue}let u=s.charCodeAt(0);if(u===38){i(c,n,a+s.slice(1),o);continue}if(u===64){i(c,In(n,s),a,o);continue}continue}if(c===!0){let e=An[s];if(e)for(let t in e)o.push(Z(n,a,t,e[t]));continue}let l=kn[s];if(l!==void 0)for(let e of l)o.push(Z(n,a,e,r(e,c)));else{let e=Pn(s);o.push(Z(n,a,e,r(e,c)))}}}function a(e){let t=n.get(e);if(t)return t;let r=[];i(e,void 0,``,r);let a=Ln(r.join(` `));return n.set(e,a),a}function o(e){let t=``,n=(e,n)=>{t+=(t?`;`:``)+e+`:`+n};for(let t in e){let i=e[t];if(i==null||i===!1)continue;if(t===`raw`&&typeof i==`object`){let e=i;for(let t in e)n(t,r(t,e[t]));continue}if(typeof i==`object`)continue;if(i===!0){let e=An[t];if(e)for(let t in e)n(t,e[t]);continue}let a=kn[t];if(a!==void 0)for(let e of a)n(e,r(e,i));else{let e=Pn(t);n(e,r(e,i))}}return t}function s(e){let t=``;for(let n in e)t+=n+`{`+o(e[n])+`}`;let n=`nk`+Cn(t);return Tn(n,`@keyframes `+n+`{`+t+`}`),n}function c(e,t){let n=e+`{`+o(t)+`}`;Tn(`g|`+n,n)}function l(e){let t=e=>e===!0?`true`:e===!1?`false`:String(e),n=e.variants??{},r=Object.keys(n),i=e.defaultVariants??{},o=e.base?a(e.base):null,s={};for(let e of r){let t=n[e],r={};for(let e in t)r[e]=a(t[e]);s[e]=r}let c=(e.compoundVariants??[]).map(e=>{let{css:n,...r}=e,i={};for(let e in r)i[e]=t(r[e]);return{conditions:i,result:a(n)}}),l=new Map;return function(e){let n={};for(let a of r){let r=(e?e[a]:void 0)??i[a];r!=null&&(n[a]=t(r))}let a=``;for(let e of r)a+=e+`=`+(n[e]??``)+`;`;let u=l.get(a);if(u)return u;let d=[];o&&d.push(o);for(let e of r){let t=n[e];if(t!==void 0){let n=s[e][t];n&&d.push(n)}}for(let e of c){let t=!0;for(let r in e.conditions)if(n[r]!==e.conditions[r]){t=!1;break}t&&d.push(e.result)}let f=Q(...d);return l.set(a,f),f}}return{css:a,cx:Q,variants:l,keyframes:s,globalStyle:c,theme:e}}const $=zn({}),Bn=$.css,Vn=$.variants,Hn=$.keyframes,Un=$.globalStyle;function Wn(){xt();let e=globalThis;e.list=Rt,e.update=cn,e.when=Qt,e.on=p,e.scope=on,e.render=un,e.hydrate=dn,e.createCss=zn,e.css=Bn,e.cx=Q,e.variants=Vn,e.keyframes=Hn,e.globalStyle=Un}Wn(),exports.HTML_TAGS=gt,exports.SELF_CLOSING_TAGS=vt,exports.SVG_TAGS=_t,exports.appendChildren=we,exports.applyAttributes=O,exports.applyNodeModifier=I,exports.createComment=C,exports.createConditionalComment=be,exports.createCss=zn,exports.createHtmlElementWithModifiers=ut,exports.createHtmlTagBuilder=mt,exports.createSvgElementWithModifiers=dt,exports.createSvgTagBuilder=ht,exports.css=Bn,exports.cx=Q,exports.getCssText=En,exports.globalStyle=Un,exports.hydrate=dn,exports.initializeRuntime=Wn,exports.isBoolean=i,exports.isBrowser=c,exports.isFunction=a,exports.isNode=t,exports.isObject=n,exports.isPrimitive=e,exports.isTagLike=r,exports.isZeroArityFunction=o,exports.keyframes=Hn,exports.list=Rt,exports.on=p,exports.registerGlobalTagBuilders=xt,exports.render=un,exports.replaceNodeSafely=Te,exports.resetStyles=Dn,exports.scope=on,exports.setSSRCollector=pn,exports.update=cn,exports.variants=Vn,exports.when=Qt;
1
+ Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});function e(e){return e===null||typeof e!=`object`&&typeof e!=`function`}function t(e){return e instanceof Node?!0:typeof e!=`object`||!e?!1:typeof e.nodeType==`number`}function n(e){return typeof e==`object`&&!!e}function r(e){return n(e)&&`tagName`in e}function i(e){return typeof e==`boolean`}function a(e){return typeof e==`function`}function o(e){return a(e)&&e.length===0}function s(e,t){typeof console<`u`&&console.error(`nuclo: ${e}`,t)}const c=typeof window<`u`&&typeof document<`u`,l=new WeakMap;function u(e,t){let n=l.get(e);n?n.push(t):l.set(e,[t])}function d(e,t){e.removeEventListener(t.type,t.wrapped,t.options)}function f(e,t){let n=l.get(e);if(!n)return;if(t===void 0){for(let t=0;t<n.length;t++)d(e,n[t]);l.delete(e);return}let r=0;for(let i=0;i<n.length;i++){let a=n[i];a.type===t?d(e,a):n[r++]=a}n.length=r,r===0&&l.delete(e)}function p(e,t,n){return function(r){if(!c||!r||typeof r.addEventListener!=`function`)return;let i=r,a=function(n){try{t.call(i,n)}catch(t){s(`Error in '${e}' listener`,t)}};i.addEventListener(e,a,n),u(i,{type:e,wrapped:a,options:n})}}const m=new Set,h=new WeakMap,g=new Set,_=new WeakMap,v=typeof FinalizationRegistry<`u`?new FinalizationRegistry(e=>{m.delete(e)}):null,y=typeof FinalizationRegistry<`u`?new FinalizationRegistry(e=>{g.delete(e)}):null;function b(e,t){let n=h.get(e);if(n){n.info.resolver=t.resolver,n.info.lastValue=t.lastValue;return}let r=new WeakRef(e);m.add(r),h.set(e,{ref:r,info:t}),v?.register(e,r)}function ee(e,t){let n=new WeakRef(e);g.add(n),_.set(e,{ref:n,info:t}),y?.register(e,n)}function x(e){m.delete(e)}function S(e){g.delete(e)}function C(e){let t=h.get(e);t&&(m.delete(t.ref),h.delete(e))}function te(e){let t=_.get(e);t&&(g.delete(t.ref),_.delete(e))}const w=new WeakMap,T=new Set,E=new WeakMap,D=typeof FinalizationRegistry<`u`?new FinalizationRegistry(e=>{T.delete(e)}):null;function ne(e,t){w.set(e,t);let n=new WeakRef(e);T.add(n),E.set(e,n),D?.register(e,n)}function re(e){w.delete(e);let t=E.get(e);t&&(T.delete(t),E.delete(e))}function ie(){let e=[],t=[];for(let n of T){let r=n.deref();r===void 0?t.push(n):e.push(r)}for(let e of t)T.delete(e);return e}function ae(e){return w.get(e)??null}const oe=`http://www.w3.org/2000/svg`;function se(e){return globalThis.document?document.createElement(e):null}function ce(e,t){return globalThis.document?document.createElementNS(e,t):null}function O(e){return globalThis.document?document.createTextNode(e):null}function le(){return globalThis.document?document.createDocumentFragment():null}function ue(e,t){try{return e.appendChild(t),!0}catch(e){return s(`Failed to append child node`,e),!1}}function de(e){if(e.nodeType===Node.ELEMENT_NODE){let t=e;f(t),te(t),re(t)}else e.nodeType===Node.TEXT_NODE?C(e):e.nodeType===Node.COMMENT_NODE&&re(e);if(e.childNodes&&e.childNodes.length>0)for(let t=0;t<e.childNodes.length;t++)de(e.childNodes[t])}function k(e){if(!e?.parentNode)return!1;try{return de(e),e.parentNode.removeChild(e),!0}catch(e){return s(`Failed to remove child node`,e),!1}}function fe(e,t,n){try{return e.insertBefore(t,n),!0}catch(e){return s(`Failed to insert node before reference`,e),!1}}function A(e){return globalThis.document?globalThis.document.createComment(e):null}function pe(e,t=`hidden`){return globalThis.document?globalThis.document.createComment(`conditional-${e}-${t}`):null}function me(e,t){let n=A(`${e}-end`);if(!n)throw Error(`Failed to create comment: document not available`);let r=A(`${e}-start-${t}`);if(!r)throw Error(`Failed to create comment: document not available`);return{start:r,end:n}}function he(e,t){let n=e.nextSibling;for(;n&&n!==t;){let e=n.nextSibling;k(n),n=e}}function ge(e,t){let n=t.parentNode;if(n)for(let r=0;r<e.length;r++)fe(n,e[r],t)}function _e(e,...t){if(!e)return e;for(let n=0;n<t.length;n++){let r=t[n];if(r!=null){let t;if(typeof r==`string`){let e=O(r);if(e)t=e;else continue}else t=r;ue(e,t)}}return e}function j(e){return e?.isConnected===!0}function ve(e,t){if(!e?.parentNode)return!1;try{return e.parentNode.replaceChild(t,e),!0}catch(e){return s(`Error replacing conditional node`,e),!1}}function ye(e){return e}function be(e,t,n){let r=ye(e),i=r.appendChild.bind(r),a=r.insertBefore.bind(r);r.appendChild=function(e){return a(e,t)};try{return n()}finally{r.appendChild=i}}function xe(e,t,n){try{if(n==null||n===``)return e.style[t]=``,!0;let r=String(n);return e.style[t]=r,!0}catch{return!1}}const Se={};let Ce=!1;function we(e){let t=e.target;if(!t||typeof Node>`u`||!(t instanceof Node))return;let n=t;for(;n;){if(n instanceof Element){let e=_.get(n);e&&(j(n)?ke(e.info):(S(e.ref),_.delete(n)))}n=n.parentNode}}function Te(){Ce||typeof document>`u`||typeof document.addEventListener!=`function`||(document.addEventListener(`update`,we,!0),Ce=!0)}function Ee(e){let t=_.get(e);if(t)return t.info;let n={attributeResolvers:new Map};return ee(e,n),n}function De(e){return typeof e!=`object`||!e}function Oe(e,t){let n;try{n=t.resolver()}catch(t){s(`Failed to resolve reactive attribute: ${e}`,t);return}let r=De(n);if(!(r&&Object.is(n,t.lastValue)))try{t.applyValue(n),t.lastValue=r?n:Se}catch(t){s(`Failed to apply reactive attribute: ${e}`,t)}}function ke(e){for(let[t,n]of e.attributeResolvers)Oe(t,n)}function Ae(e,t,n,r){if(!(e instanceof Element)||!t||typeof n!=`function`){s(`Invalid parameters for registerAttributeResolver`);return}let i={resolver:n,applyValue:r,lastValue:Se};if(!c){Oe(t,i);return}Te(),Ee(e).attributeResolvers.set(t,i),Oe(t,i)}function je(e){let t=[];for(let n of g){let r=n.deref();if(r===void 0){t.push(n);continue}let i=_.get(r);if(!i){t.push(n);continue}if(!j(r)){_.delete(r),t.push(n);continue}e&&!e.contains(r)||ke(i.info)}for(let e of t)S(e)}function Me(e,t){if(!(!e?.style||!t))for(let n in t)xe(e,n,t[n])||s(`Failed to set style property '${n}'`)}function Ne(e,t){e&&(a(t)?Ae(e,`style`,t,function(t){Me(e,t)}):Me(e,t))}const M=new WeakMap,Pe=new WeakSet;function N(e,t){let n=t.length,r=0;for(let i=0;i<=n;i++)(i===n||t.charCodeAt(i)===32)&&(i>r&&e.add(t.substring(r,i)),r=i+1)}function Fe(e){let t=``;for(let n of e)t&&(t+=` `),t+=n;return t}function Ie(e){if(e.className&&!M.has(e)){let t=new Set;N(t,e.className),M.set(e,t)}Pe.add(e)}function Le(e){return Pe.has(e)}function Re(e,t){if(!t)return;let n=M.get(e);n||(n=new Set,M.set(e,n)),N(n,t)}function ze(e,t){let n=M.get(e);if(!n||n.size===0){e.className=t||``;return}if(!t){e.className=Fe(n);return}let r=Fe(n),i=t.length,a=0;for(let e=0;e<=i;e++)if(e===i||t.charCodeAt(e)===32){if(e>a){let i=t.substring(a,e);n.has(i)||(r+=` `+i)}a=e+1}e.className=r}function Be(e,t){if(!t)return;let n=e.className;if(n&&n!==t){let r=new Set;N(r,n),N(r,t),e.className=Fe(r)}else e.className=t}function Ve(e,t){if(typeof e!=`function`){s(`Invalid resolver provided to createReactiveTextNode`);let e=O(``);if(!e)throw Error(`Failed to create text node: document not available`);return e}let n;if(arguments.length>1)n=t;else try{n=e()}catch(e){s(`Failed to evaluate reactive text resolver`,e),n=``}let r=n===void 0?``:String(n),i=O(r);if(!i)throw Error(`Failed to create text node: document not available`);return c&&b(i,{resolver:e,lastValue:r}),i}function He(e){let t=[];for(let n of m){let r=n.deref();if(r===void 0){t.push(n);continue}let i=h.get(r);if(!i){t.push(n);continue}let a=i.info;if(!j(r)){h.delete(r),t.push(n);continue}if(e&&!e.contains(r))continue;let o;try{o=a.resolver()}catch(e){s(`Failed to update reactive text node`,e),o=void 0}let c=o===void 0?``:String(o);c!==a.lastValue&&(r.textContent=c,a.lastValue=c)}for(let e of t)x(e)}function Ue(e,t,n,r=!1){if(n==null)return;if(t===`style`){Ne(e,n);return}let i=(n,r=!1)=>{if(n!=null){if(t===`className`&&e instanceof HTMLElement&&r){Be(e,String(n));return}if(e instanceof Element&&e.namespaceURI===`http://www.w3.org/2000/svg`)e.setAttribute(String(t),String(n));else if(t in e)try{e[t]=n}catch{e instanceof Element&&e.setAttribute(String(t),String(n))}else e instanceof Element&&e.setAttribute(String(t),String(n))}};if(a(n)&&n.length===0){let r=n;t===`className`&&e instanceof HTMLElement?(Ie(e),Ae(e,String(t),r,function(t){ze(e,String(t||``))})):Ae(e,String(t),r,function(e){i(e,!1)})}else{if(t===`className`&&e instanceof HTMLElement&&Le(e)){let t=String(n||``);t&&(Re(e,t),Be(e,t));return}i(n,r)}}function P(e,t,n=!0){if(t)for(let r of Object.keys(t)){let i=t[r];Ue(e,r,i,n&&r===`className`)}}let F=!1,We=new WeakMap;function I(){return F}function Ge(){return!1}function Ke(){F=!0,We=new WeakMap}function qe(){F=!1}function Je(e){let t=F;F=!1;try{return e()}finally{F=t}}function L(e){let t=We.get(e);return t===void 0?e.firstChild:t}function R(e,t){We.set(e,t)}function Ye(e){return e.nodeType===3&&!/\S/.test(e.textContent||``)}function z(e){let t=L(e),n=!1;for(;t&&Ye(t);)t=t.nextSibling,n=!0;n&&R(e,t)}function B(e){let t=L(e);return t&&R(e,t.nextSibling),t}function Xe(e,t){if(!F)return null;z(e);let n=L(e);return n&&n.nodeType===1&&n.tagName.toLowerCase()===t?B(e):null}function Ze(e,t){if(!t)return;let n=L(e);for(;n;){let r=n===t?null:n.nextSibling;e.removeChild(n),n=r}R(e,null)}const V=new WeakMap;function Qe(e){return n(e)&&!t(e)&&`className`in e&&typeof e.className==`string`&&Object.keys(e).length===1}function $e(e){z(e);let t=L(e);return!!t&&t.nodeType===8&&t.textContent?.trimStart().startsWith(`text-`)===!0}function et(e,t){let n=L(e);if(n&&n.nodeType===3)return B(e),n.textContent!==t&&(n.textContent=t),n;let r=O(t);return r?(e.insertBefore(r,n),R(e,n),r):null}function H(r,i,c){if(i==null)return null;if(a(i)){if(o(i))try{let t=V.get(i);if(t||(t={value:i(),error:!1},V.set(i,t)),t.error)return nt(c,()=>``);let n=t.value;if(Qe(n))return P(r,{className:()=>{let e=i();return Qe(e)?e.className:``}}),null;if(e(n)){let t=()=>{let t=i();return e(t)&&t!=null?t:``},a=n??``;if(I()&&$e(r)){let e=r;B(e);let n=String(a),i=et(e,n);return i&&b(i,{resolver:t,lastValue:n}),null}return nt(c,t,a)}return null}catch(e){return V.set(i,{value:void 0,error:!0}),s(`Error evaluating reactive text function:`,e),nt(c,()=>``)}let a=i(r,c);return a==null?null:e(a)?rt(c,a):t(a)?a:(n(a)&&P(r,a),null)}let l=i;if(e(l)){if(I()&&$e(r)){let e=r;return B(e),et(e,String(l)),null}return rt(c,l)}return t(l)?l:(P(r,l),null)}function tt(e,t){if(c&&!I()&&!Ge())return t;let n=le();if(!n)throw Error(`Failed to create document fragment: document not available`);let r=A(` text-${e} `);return r&&n.appendChild(r),t&&n.appendChild(t),n}function nt(e,t,n){return tt(e,Ve(t,n))}function rt(e,t){return tt(e,O(String(t)))}function U(e,t,n=0){if(!t||t.length===0)return;let r=n,i=e;for(let n=0;n<t.length;n+=1){let a=t[n];if(a==null)continue;let o=H(e,a,r);o&&(o.parentNode!==i&&i.appendChild(o),r+=1)}}function it(e,t){let n=se(e);return U(n,t,0),n}function at(e,t){let n=ce(oe,e);if(!n)throw Error(`Failed to create SVG element: ${e}`);return U(n,t,0),n}function ot(e,...t){return function(n,r=0){let i=n,a=i?Xe(i,e):null,o=a??se(e),s=o,c=a?s.lastChild:null;return U(o,t,r),a&&Ze(s,c),o}}function st(e,...t){return function(n,r=0){let i=n,a=i?Xe(i,e):null,o=a??ce(`http://www.w3.org/2000/svg`,e);if(!o)throw Error(`Failed to create SVG element: ${e}`);let s=o,c=a?s.lastChild:null;return U(o,t,r),a&&Ze(s,c),o}}function ct(e){return(...t)=>ot(e,...t)}function lt(e){return(...t)=>st(e,...t)}const ut=`a.abbr.address.area.article.aside.audio.b.base.bdi.bdo.blockquote.body.br.button.canvas.caption.cite.code.col.colgroup.data.datalist.dd.del.details.dfn.dialog.div.dl.dt.em.embed.fieldset.figcaption.figure.footer.form.h1.h2.h3.h4.h5.h6.head.header.hgroup.hr.html.i.iframe.img.input.ins.kbd.label.legend.li.link.main.map.mark.menu.meta.meter.nav.noscript.object.ol.optgroup.option.output.p.picture.pre.progress.q.rp.rt.ruby.s.samp.script.search.section.select.slot.small.source.span.strong.style.sub.summary.sup.table.tbody.td.template.textarea.tfoot.th.thead.time.title.tr.track.u.ul.var.video.wbr`.split(`.`),dt=`a.animate.animateMotion.animateTransform.circle.clipPath.defs.desc.ellipse.feBlend.feColorMatrix.feComponentTransfer.feComposite.feConvolveMatrix.feDiffuseLighting.feDisplacementMap.feDistantLight.feDropShadow.feFlood.feFuncA.feFuncB.feFuncG.feFuncR.feGaussianBlur.feImage.feMerge.feMergeNode.feMorphology.feOffset.fePointLight.feSpecularLighting.feSpotLight.feTile.feTurbulence.filter.foreignObject.g.image.line.linearGradient.marker.mask.metadata.mpath.path.pattern.polygon.polyline.radialGradient.rect.script.set.stop.style.svg.switch.symbol.text.textPath.title.tspan.use.view`.split(`.`),ft=[`area`,`base`,`br`,`col`,`embed`,`hr`,`img`,`input`,`link`,`meta`,`source`,`track`,`wbr`];function pt(e,t){if(t in e&&typeof e[t]!=`function`)return;let n=ct(t);e[t]=n,t===`var`&&(e.var_=n)}function mt(e,t){let n=`${t}Svg`;n in e||(e[n]=lt(t))}function ht(e=globalThis){let t=`__nuclo_tags_registered`;if(!e[t]){for(let t=0;t<dt.length;t++)mt(e,dt[t]);for(let t=0;t<ut.length;t++)pt(e,ut[t]);e[t]=!0}}function gt(e,t,n){if(a(e)){let i=e(t,n);return i&&r(i)?i:null}return e&&r(e)?e:null}function _t(e,t){if(e===t)return!0;if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}const W=new Set,vt=new WeakMap,yt=typeof FinalizationRegistry<`u`?new FinalizationRegistry(e=>{W.delete(e)}):null;function bt(e,t){let n=new WeakRef(e);W.add(n),vt.set(e,t),yt?.register(e,n)}function xt(e){return Array.isArray(e)?e:Array.from(e)}function St(e,t,n){return gt(e.renderItem(t,n),e.host,n)}function G(e){k(e.element)}function Ct(e,t,n,r){if(n.parentNode!==t||r.parentNode!==t)return!1;for(let n=0;n<e.length;n++){let r=e[n].element;r&&r.parentNode===t&&t.removeChild(r)}return!0}function wt(e){let t=e.length;if(t===0)return[];let n=Array(t),r=[];for(let i=0;i<t;i++){let t=e[i],a=0,o=r.length;for(;a<o;){let n=a+o>>1;e[r[n]]<t?a=n+1:o=n}n[i]=a>0?r[a-1]:-1,a===r.length?r.push(i):r[a]=i}let i=r.length,a=r[i-1],o=Array(i);for(;i>0;)o[--i]=a,a=n[a];return o}function Tt(e,t,n,r,i,a,o){let s=le(),c=0;for(let l=r;l<i;l++){let r=n[l],i=St(e,r,l);if(!i)continue;o.push({item:r,element:i});let u=i;s?(s.appendChild(u),c++):t.insertBefore(u,a)}s&&c>0&&t.insertBefore(s,a)}function Et(e){let{startMarker:t,endMarker:n}=e,r=t.parentNode??e.host,i=xt(e.itemsProvider());if(_t(e.lastSyncedItems,i))return;let a=e.records,o=a.length,s=i.length;if(s===0){if(o>0&&!Ct(a,r,t,n))for(let e=0;e<o;e++)G(a[e]);e.records=[],e.lastSyncedItems=[];return}let c=0,l=Math.min(o,s);for(;c<l&&a[c].item===i[c];)c++;let u=0,d=l-c;for(;u<d&&a[o-1-u].item===i[s-1-u];)u++;let f=c,p=o-u,m=c,h=s-u;if(f===p){let t=p<o?a[p].element:n;if(p===o)Tt(e,r,i,m,h,t,a);else{let n=[];Tt(e,r,i,m,h,t,n),e.records=a.slice(0,f).concat(n,a.slice(f))}e.lastSyncedItems=i.slice();return}if(m===h){for(let e=f;e<p;e++)G(a[e]);a.splice(f,p-f),e.lastSyncedItems=i.slice();return}let g=p-f,_=h-m,v=Array(_).fill(-1),y=new Uint8Array(g),b=0,ee=Math.min(p,h);for(let e=c;e<ee;e++)a[e].item===i[e]&&(v[e-m]=e,y[e-f]=1,b++);let x=new Map;for(let e=f;e<p;e++){if(y[e-f])continue;let t=a[e].item,n=x.get(t);n===void 0?x.set(t,e):typeof n==`number`?x.set(t,[n,e]):n.push(e)}for(let e=0;e<_;e++){if(v[e]!==-1)continue;let t=x.get(i[m+e]);if(t===void 0)continue;let n;typeof t==`number`?(n=t,x.delete(i[m+e])):(n=t.shift(),t.length===0&&x.delete(i[m+e])),v[e]=n,y[n-f]=1,b++}if(b===0&&f===0&&p===o){if(!Ct(a,r,t,n))for(let e=0;e<o;e++)G(a[e]);let c=[];Tt(e,r,i,0,s,n,c),e.records=c,e.lastSyncedItems=i.slice();return}for(let e=f;e<p;e++)y[e-f]||G(a[e]);let S=null;if(b>0){let e=[],t=[];for(let n=0;n<_;n++)v[n]!==-1&&(e.push(v[n]),t.push(n));S=new Uint8Array(_);let n=wt(e);for(let e=0;e<n.length;e++)S[t[n[e]]]=1}let C=Array(_),te=0,w=p<o?a[p].element:n,T=null;for(let t=_-1;t>=0;t--){let n=v[t];if(n===-1){let n=i[m+t],a=St(e,n,m+t);if(!a){C[t]=null,te++;continue}C[t]={item:n,element:a};let o=a;T||=le(),T?T.insertBefore(o,T.firstChild):(r.insertBefore(o,w),w=o);continue}let o=a[n];C[t]=o;let s=o.element;if(T&&T.firstChild){let e=T.firstChild;r.insertBefore(T,w),w=e,T=null}(!S||!S[t])&&r.insertBefore(s,w),w=s}T&&T.firstChild&&r.insertBefore(T,w);let E=Array(f+(_-te)+(o-p)),D=0;for(let e=0;e<f;e++)E[D++]=a[e];for(let e=0;e<_;e++){let t=C[e];t&&(E[D++]=t)}for(let e=p;e<o;e++)E[D++]=a[e];e.records=E,e.lastSyncedItems=i.slice()}function Dt(e,t,n,r){return I()?kt(e,t,n,r):Ot(e,t,n,r)}function Ot(e,t,n,r){let{start:i,end:a}=me(`list`,r),o={itemsProvider:e,renderItem:t,startMarker:i,endMarker:a,records:[],host:n,lastSyncedItems:[]},s=n;return s.appendChild(i),s.appendChild(a),Et(o),c&&bt(i,o),o}function kt(e,t,n,r){let i=n;z(i);let a=L(i);if(!a||a.nodeType!==8||!a.textContent?.startsWith(`list-start-`))return Ot(e,t,n,r);let o=B(i),s=0,l=L(i);for(;l;){if(l.nodeType===8){let e=l.textContent||``;if(e.startsWith(`list-start-`))s++;else if(e===`list-end`){if(s===0)break;s--}}l=l.nextSibling}let u=l;if(!u){let e=A(`list-end`);e&&(i.insertBefore(e,o.nextSibling),u=e)}if(!u)return Ot(e,t,n,r);let d=xt(e()),f=[];for(let e=0;e<d.length;e++){let r=gt(t(d[e],e),n,e);r&&f.push({item:d[e],element:r})}let p=L(i);for(;p&&p!==u;){let e=p.nextSibling;k(p),p=e}let m=u;for(let e=f.length-1;e>=0;e--){let t=f[e].element;(t.parentNode!==i||t.nextSibling!==m)&&i.insertBefore(t,m),m=t}R(i,u.nextSibling);let h={itemsProvider:e,renderItem:t,startMarker:o,endMarker:u,records:f,host:n,lastSyncedItems:d.slice()};return c&&bt(o,h),h}function At(e){for(let t=0;t<e.records.length;t++){let n=e.records[t];n.element=null,n.item=null}e.records=[],e.lastSyncedItems=[]}function jt(e){let t=[];for(let n of W){let r=n.deref();if(!r){t.push(n);continue}let i=vt.get(r);if(!i){t.push(n);continue}if(!j(r)||!j(i.endMarker)){At(i),vt.delete(r),t.push(n);continue}e&&!e.contains(r)||Et(i)}for(let e of t)W.delete(e)}function Mt(e,t){return function(n,r){return Dt(e,t,n,r).startMarker}}function Nt(e,t){try{return e()}catch(e){if(t)return t(e),!1;throw e}}function Pt(e,t){return typeof e==`function`?Nt(e,t):!!e}const K=new Set,q=new WeakMap,Ft=typeof FinalizationRegistry<`u`?new FinalizationRegistry(e=>{K.delete(e)}):null;function It(e,t){for(let t=0;t<e.length;t++)if(Pt(e[t].condition))return t;return t.length>0?-1:null}function Lt(e){let{groups:t,elseContent:n,host:r,index:i,endMarker:a}=e,o=It(t,n);o!==e.activeIndex&&(he(e.startMarker,e.endMarker),e.activeIndex=o,o!==null&&ge(Vt(o>=0?t[o].content:n,r,i,a),a))}function Rt(e){let t=new WeakRef(e.startMarker);K.add(t),q.set(e.startMarker,e),Ft?.register(e.startMarker,t)}function zt(e){let t=[];for(let n of K){let r=n.deref();if(r===void 0){t.push(n);continue}let i=q.get(r);if(!i){t.push(n);continue}if(!j(r)||!j(i.endMarker)){q.delete(r),t.push(n);continue}if(!(e&&!e.contains(r)))try{i.update()}catch(e){s(`when() branch threw during update; unregistering this conditional`,e),q.delete(r),t.push(n)}}for(let e of t)K.delete(e)}function Bt(e,t,n,r){return a(e)?o(e)?(V.delete(e),H(t,e,n)):be(t,r,()=>{let r=H(t,e,n);return r&&!r.parentNode?r:null}):H(t,e,n)}function Vt(e,t,n,r){let i=[];for(let a of e){let e=Bt(a,t,n,r);e&&i.push(e)}return i}function Ht(e,t){return`when-start-${e}-b${t===null?`n`:t}`}function Ut(e){let t=/-b(n|-?\d+)$/.exec(e||``);if(t)return t[1]===`n`?null:parseInt(t[1],10)}var Wt=class e{groups=[];elseContent=[];constructor(e,...t){this.groups.push({condition:e,content:t})}cloneWith(t,n){let r=Object.create(e.prototype);return r.groups=[...this.groups],t&&r.groups.push(t),r.elseContent=n??[...this.elseContent],r}when(e,...t){return this.groups.push({condition:e,content:t}),this}else(...e){return this.elseContent=e,this}render(e,t){return globalThis.document?I()?this.hydrateRender(e,t):this.freshRender(e,t):null}freshRender(e,t){let{start:n,end:r}=me(`when`,t),i=this.createRuntimeFromMarkers(e,t,n,r),a=ye(e);return a.appendChild(n),a.appendChild(r),Lt(i),n.textContent=Ht(t,i.activeIndex),n}hydrateRender(e,t){let n=e;z(n);let r=L(n);if(!r||r.nodeType!==8||!r.textContent?.startsWith(`when-start-`))return this.freshRender(e,t);let i=B(n),a=0,o=L(n);for(;o;){if(o.nodeType===8){let e=o.textContent||``;if(e.startsWith(`when-start-`))a++;else if(e===`when-end`){if(a===0)break;a--}}o=o.nextSibling}let s=o,c=!1;if(!s){let e=A(`when-end`);if(!e)return i;n.insertBefore(e,i.nextSibling),s=e,c=!0}let l=It(this.groups,this.elseContent),u=Ut(i.textContent);if(!c&&(u===void 0||u===l)){if(l!==null){let n=l>=0?this.groups[l].content:this.elseContent;for(let r of n)H(e,r,t)}}else if(he(i,s),l!==null){let n=l>=0?this.groups[l].content:this.elseContent,r=s;Je(()=>{ge(Vt(n,e,t,r),r)})}return R(n,s.nextSibling),this.createRuntimeFromMarkers(e,t,i,s,l),i}createRuntimeFromMarkers(e,t,n,r,i=null){let a={startMarker:n,endMarker:r,host:e,index:t,groups:[...this.groups],elseContent:[...this.elseContent],activeIndex:i,update:function(){Lt(a)}};return c&&Rt(a),a}};function Gt(e){return Object.assign(function(t,n){return e.render(t,n)},{when:function(t,...n){return Gt(e.cloneWith({condition:t,content:n}))},else:function(...t){return Gt(e.cloneWith(void 0,t))}})}function Kt(e,...t){return Gt(new Wt(e,...t))}function qt(e){try{return e.isSvg?at(e.tagName,e.modifiers):it(e.tagName,e.modifiers)}catch(t){if(s(`Error applying modifiers in conditional element "${e.tagName}"`,t),e.isSvg){let n=ce(oe,e.tagName);if(!n)throw Error(`Failed to create SVG element: ${e.tagName}`,{cause:t});return n}let n=se(e.tagName);if(!n)throw Error(`Failed to create element: ${e.tagName}`,{cause:t});return n}}function Jt(e){let t=ae(e);if(!t)return;let n=Nt(t.condition,e=>{s(`Error evaluating conditional condition`,e)}),r=e.nodeType===Node.ELEMENT_NODE;if(n&&!r){let n=qt(t);ne(n,t),ve(e,n)}else if(!n&&r){let n=pe(t.tagName);n&&(ne(n,t),ve(e,n))}}function Yt(e){if(c)try{let t=ie();for(let n of t){if(!n.isConnected){re(n);continue}e&&!e.contains(n)||Jt(n)}}catch(e){s(`Error during conditional elements update`,e)}}const J=new Map;function Xt(e){let t=[],n=new Set;for(let r of e){if(typeof r!=`string`)continue;let e=r.trim();e&&(n.has(e)||(n.add(e),t.push(e)))}return t}function Zt(e,t){let n=J.get(e);n||(n=new Set,J.set(e,n)),n.add(new WeakRef(t))}function Qt(e){let t=Xt(e);if(t.length===0)return[];let n=new Set;for(let e of t){let t=J.get(e);if(!t)continue;let r=[];for(let e of t){let t=e.deref();if(t===void 0){r.push(e);continue}if(!j(t)){r.push(e);continue}n.add(t)}for(let e of r)t.delete(e);t.size===0&&J.delete(e)}return Array.from(n)}function $t(...e){let t=Xt(e);return function(e){if(c&&e instanceof Element)for(let n of t)Zt(n,e)}}const en=[jt,zt,Yt,je,He,nn];function tn(...e){let t;if(e.length>0){let n=Qt(e);if(n.length===1){let e=n[0];t={roots:n,contains:t=>e.contains(t)}}else t={roots:n,contains:e=>{for(let t of n)if(t.contains(e))return!0;return!1}}}for(let e of en)e(t)}function nn(e){if(typeof document>`u`)return;let t=e?e.roots:[document.body??document];for(let e of t)try{e.dispatchEvent(new Event(`update`,{bubbles:!0}))}catch(e){s(`Error dispatching global update event`,e)}}function rn(e,t,n=0){let r=t||document.body,i=e(r,n);return r.appendChild(i),i}function an(e,t){let n=t||document.body,r=n;Ke();try{let t=e(n,0),i=t;if(i&&i.nodeType===1&&i.parentNode!==r){let e=L(r);if(e){let t=e.nextSibling;r.insertBefore(i,e),k(e),R(r,t)}else r.appendChild(i),R(r,null)}return t}finally{qe()}}let on=null;function sn(e){on=e}const cn=new Map,ln=new Map,un=new Set,Y=[],X=new Map;let Z=null,Q=null,dn=null,fn=0;const pn=new Map;function mn(e){for(let t of e)X.has(t)||X.set(t,[])}function hn(e,t){try{let n=e.cssRules.length;e.insertRule(t+`{}`,n);let r=e.cssRules[n];return pn.set(t,r),r}catch{return null}}function gn(e,t){try{e.insertRule(t,fn),fn++}catch{}}function _n(){if(typeof document>`u`||typeof document.getElementById!=`function`)return null;if(Q&&dn===document&&Q.ownerNode&&Q.ownerNode.isConnected)return Q;let e=document.getElementById(`nuclo-styles`);if(e||(e=document.createElement(`style`),e.id=`nuclo-styles`,document.head.appendChild(e)),Q=e.sheet,dn=document,pn.clear(),fn=0,!Q)return null;for(let e of Y)gn(Q,e);for(let[e,t]of X){let n=hn(Q,e);if(n)for(let e of t)try{n.insertRule(e,n.cssRules.length)}catch{}}return Q}function vn(e,t){if(t===void 0)Y.push(e);else{let n=X.get(t);n||(n=[],X.set(t,n)),n.push(e)}Z=null,on?.(t===void 0?e:t+`{`+e+`}`);let n=_n();if(n)if(t===void 0)gn(n,e);else{let r=pn.get(t)??hn(n,t);if(r)try{r.insertRule(e,r.cssRules.length)}catch{}}}function yn(e){let t=2166136261,n=2128831035;for(let r=0;r<e.length;r++){let i=e.charCodeAt(r);t=Math.imul(t^i,16777619),n=Math.imul(n^i,2246822507)}return(t>>>0).toString(36)+((n>>>9)%1296).toString(36)}function bn(e,t,n,r){let i=(e??``)+`|`+t+`|`+n+`:`+r,a=cn.get(i);return a===void 0?(a=`n`+yn(i),cn.set(i,a),ln.set(a,(e??``)+`|`+t+`|`+n),vn(`.`+a+t+`{`+n+`:`+r+`}`,e),a):(_n(),a)}function xn(e){return ln.get(e)}function Sn(e,t){if(un.has(e)){_n();return}un.add(e),vn(t,void 0)}function Cn(){if(Z!==null)return Z;let e=Y.join(``);for(let[t,n]of X)n.length>0&&(e+=t+`{`+n.join(``)+`}`);return Z=e,e}function wn(){cn.clear(),ln.clear(),un.clear(),Y.length=0,X.clear(),pn.clear(),Z=null,fn=0,Q=null,dn=null,typeof document<`u`&&document.getElementById(`nuclo-styles`)?.remove()}const Tn={hover:`:hover`,focus:`:focus`,focusVisible:`:focus-visible`,focusWithin:`:focus-within`,active:`:active`,visited:`:visited`,disabled:`:disabled`,enabled:`:enabled`,checked:`:checked`,required:`:required`,invalid:`:invalid`,valid:`:valid`,readOnly:`:read-only`,first:`:first-child`,last:`:last-child`,only:`:only-child`,odd:`:nth-child(odd)`,even:`:nth-child(even)`,empty:`:empty`,placeholderShown:`:placeholder-shown`,placeholder:`::placeholder`,before:`::before`,after:`::after`,selection:`::selection`,marker:`::marker`,firstLine:`::first-line`,firstLetter:`::first-letter`},En={bg:[`background`],p:[`padding`],px:[`padding-left`,`padding-right`],py:[`padding-top`,`padding-bottom`],pt:[`padding-top`],pr:[`padding-right`],pb:[`padding-bottom`],pl:[`padding-left`],m:[`margin`],mx:[`margin-left`,`margin-right`],my:[`margin-top`,`margin-bottom`],mt:[`margin-top`],mr:[`margin-right`],mb:[`margin-bottom`],ml:[`margin-left`],w:[`width`],h:[`height`],minW:[`min-width`],maxW:[`max-width`],minH:[`min-height`],maxH:[`max-height`],size:[`width`,`height`],text:[`font-size`],font:[`font-family`],weight:[`font-weight`],leading:[`line-height`],tracking:[`letter-spacing`],align:[`text-align`],items:[`align-items`],justify:[`justify-content`],z:[`z-index`],rounded:[`border-radius`],shadow:[`box-shadow`],select:[`user-select`]},Dn={row:{display:`flex`,"flex-direction":`row`},col:{display:`flex`,"flex-direction":`column`},center:{"align-items":`center`,"justify-content":`center`},truncate:{overflow:`hidden`,"text-overflow":`ellipsis`,"white-space":`nowrap`}},On={background:`colors`,"background-color":`colors`,color:`colors`,"border-color":`colors`,"border-top-color":`colors`,"border-right-color":`colors`,"border-bottom-color":`colors`,"border-left-color":`colors`,"outline-color":`colors`,"caret-color":`colors`,"text-decoration-color":`colors`,"font-family":`fonts`,"box-shadow":`shadows`,"border-radius":`radii`},kn=new Set([`z-index`,`opacity`,`font-weight`,`line-height`,`flex`,`flex-grow`,`flex-shrink`,`order`,`aspect-ratio`,`zoom`,`scale`,`column-count`,`orphans`,`widows`,`tab-size`,`animation-iteration-count`,`grid-column`,`grid-row`]),An=new Map;function jn(e){let t=An.get(e);return t===void 0&&(t=e.replace(/[A-Z]/g,e=>`-`+e.toLowerCase()),An.set(e,t)),t}function Mn(e){return e.charCodeAt(0)===64?e:`@media `+e}function Nn(e,t){return e!==void 0&&e.startsWith(`@media`)&&t.startsWith(`@media`)?e+` and`+t.slice(6):t}function Pn(e){let t={className:e};return Object.defineProperty(t,"toString",{value:()=>e,enumerable:!1}),t}function Fn(e,t){for(let n of e)if(n)if(typeof n==`string`)for(let e of n.split(` `))e&&t.set(xn(e)??e,e);else if(Array.isArray(n))Fn(n,t);else for(let e of n.className.split(` `))e&&t.set(xn(e)??e,e)}function In(...e){let t=new Map;Fn(e,t);let n=``;for(let e of t.values())n+=(n?` `:``)+e;return Pn(n)}function Ln(e={}){let t=e.screens??{};mn(Object.values(t).map(Mn));let n=new WeakMap;function r(t,n){if(typeof n==`number`)return n===0||kn.has(t)?String(n):n+`px`;let r=On[t];if(r!==void 0){let t=e[r]?.[n];if(t!==void 0)return t}return n}function i(e,n,a,o){for(let s in e){let c=e[s];if(c==null||c===!1)continue;if(typeof c==`object`){if(s===`raw`){let e=c;for(let t in e)o.push(bn(n,a,t,r(t,e[t])));continue}let e=Tn[s];if(e!==void 0){i(c,n,a+e,o);continue}let l=t[s];if(l!==void 0){i(c,Nn(n,Mn(l)),a,o);continue}let u=s.charCodeAt(0);if(u===38){i(c,n,a+s.slice(1),o);continue}if(u===64){i(c,Nn(n,s),a,o);continue}continue}if(c===!0){let e=Dn[s];if(e)for(let t in e)o.push(bn(n,a,t,e[t]));continue}let l=En[s];if(l!==void 0)for(let e of l)o.push(bn(n,a,e,r(e,c)));else{let e=jn(s);o.push(bn(n,a,e,r(e,c)))}}}function a(e){let t=n.get(e);if(t)return t;let r=[];i(e,void 0,``,r);let a=Pn(r.join(` `));return n.set(e,a),a}function o(e){let t=``,n=(e,n)=>{t+=(t?`;`:``)+e+`:`+n};for(let t in e){let i=e[t];if(i==null||i===!1)continue;if(t===`raw`&&typeof i==`object`){let e=i;for(let t in e)n(t,r(t,e[t]));continue}if(typeof i==`object`)continue;if(i===!0){let e=Dn[t];if(e)for(let t in e)n(t,e[t]);continue}let a=En[t];if(a!==void 0)for(let e of a)n(e,r(e,i));else{let e=jn(t);n(e,r(e,i))}}return t}function s(e){let t=``;for(let n in e)t+=n+`{`+o(e[n])+`}`;let n=`nk`+yn(t);return Sn(n,`@keyframes `+n+`{`+t+`}`),n}function c(e,t){let n=e+`{`+o(t)+`}`;Sn(`g|`+n,n)}function l(e){let t=e=>e===!0?`true`:e===!1?`false`:String(e),n=e.variants??{},r=Object.keys(n),i=e.defaultVariants??{},o=e.base?a(e.base):null,s={};for(let e of r){let t=n[e],r={};for(let e in t)r[e]=a(t[e]);s[e]=r}let c=(e.compoundVariants??[]).map(e=>{let{css:n,...r}=e,i={};for(let e in r)i[e]=t(r[e]);return{conditions:i,result:a(n)}}),l=new Map;return function(e){let n={};for(let a of r){let r=(e?e[a]:void 0)??i[a];r!=null&&(n[a]=t(r))}let a=``;for(let e of r)a+=e+`=`+(n[e]??``)+`;`;let u=l.get(a);if(u)return u;let d=[];o&&d.push(o);for(let e of r){let t=n[e];if(t!==void 0){let n=s[e][t];n&&d.push(n)}}for(let e of c){let t=!0;for(let r in e.conditions)if(n[r]!==e.conditions[r]){t=!1;break}t&&d.push(e.result)}let f=In(...d);return l.set(a,f),f}}return{css:a,cx:In,variants:l,keyframes:s,globalStyle:c,theme:e}}const $=Ln({}),Rn=$.css,zn=$.variants,Bn=$.keyframes,Vn=$.globalStyle;function Hn(){ht();let e=globalThis;e.list=Mt,e.update=tn,e.when=Kt,e.on=p,e.scope=$t,e.render=rn,e.hydrate=an,e.createCss=Ln,e.css=Rn,e.cx=In,e.variants=zn,e.keyframes=Bn,e.globalStyle=Vn}Hn(),exports.HTML_TAGS=ut,exports.SELF_CLOSING_TAGS=ft,exports.SVG_TAGS=dt,exports.appendChildren=_e,exports.applyAttributes=P,exports.applyNodeModifier=H,exports.createComment=A,exports.createConditionalComment=pe,exports.createCss=Ln,exports.createHtmlElementWithModifiers=it,exports.createHtmlTagBuilder=ct,exports.createSvgElementWithModifiers=at,exports.createSvgTagBuilder=lt,exports.css=Rn,exports.cx=In,exports.getCssText=Cn,exports.globalStyle=Vn,exports.hydrate=an,exports.initializeRuntime=Hn,exports.isBoolean=i,exports.isBrowser=c,exports.isFunction=a,exports.isNode=t,exports.isObject=n,exports.isPrimitive=e,exports.isTagLike=r,exports.isZeroArityFunction=o,exports.keyframes=Bn,exports.list=Mt,exports.on=p,exports.registerGlobalTagBuilders=ht,exports.render=rn,exports.replaceNodeSafely=ve,exports.resetStyles=wn,exports.scope=$t,exports.setSSRCollector=sn,exports.update=tn,exports.variants=zn,exports.when=Kt;
2
2
  //# sourceMappingURL=nuclo.cjs.map