nuclo 0.1.128 → 0.2.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/core/modifierProcessor.d.ts.map +1 -1
- package/dist/core/reactiveAttributes.d.ts.map +1 -1
- package/dist/core/reactiveCleanup.d.ts +15 -6
- package/dist/core/reactiveCleanup.d.ts.map +1 -1
- package/dist/core/reactiveText.d.ts.map +1 -1
- package/dist/core/runtimeBootstrap.d.ts.map +1 -1
- package/dist/hydration/context.d.ts +31 -6
- package/dist/hydration/context.d.ts.map +1 -1
- package/dist/list/runtime.d.ts.map +1 -1
- package/dist/nuclo.cjs +1 -1
- package/dist/nuclo.cjs.map +1 -1
- package/dist/nuclo.mjs +1 -1
- package/dist/nuclo.mjs.map +1 -1
- package/dist/nuclo.umd.js +1 -1
- package/dist/nuclo.umd.js.map +1 -1
- package/dist/polyfill/nuclo.polyfill.cjs +1 -1
- package/dist/polyfill/nuclo.polyfill.cjs.map +1 -1
- package/dist/polyfill/nuclo.polyfill.mjs +1 -1
- package/dist/polyfill/nuclo.polyfill.mjs.map +1 -1
- package/dist/ssr/index.d.ts +1 -1
- package/dist/ssr/index.d.ts.map +1 -1
- package/dist/ssr/nuclo.ssr.cjs +1 -1
- package/dist/ssr/nuclo.ssr.cjs.map +1 -1
- package/dist/ssr/nuclo.ssr.mjs +1 -1
- package/dist/ssr/nuclo.ssr.mjs.map +1 -1
- package/dist/ssr/renderToString.d.ts.map +1 -1
- package/dist/style/css.d.ts +314 -0
- package/dist/style/css.d.ts.map +1 -0
- package/dist/style/engine.d.ts +34 -0
- package/dist/style/engine.d.ts.map +1 -0
- package/dist/style/index.d.ts +2 -4
- package/dist/style/index.d.ts.map +1 -1
- package/dist/utility/conditionalInfo.d.ts.map +1 -1
- package/dist/utility/render.d.ts.map +1 -1
- package/dist/utility/stringUtils.d.ts.map +1 -1
- package/dist/when/builder.d.ts.map +1 -1
- package/dist/when/runtime.d.ts.map +1 -1
- package/package.json +8 -6
- package/types/features/style.d.ts +61 -1954
- package/dist/environment-UucRvjm0.mjs +0 -2
- package/dist/environment-UucRvjm0.mjs.map +0 -1
- package/dist/environment-z8pVZwev.cjs +0 -2
- package/dist/environment-z8pVZwev.cjs.map +0 -1
- package/dist/style/cssGenerator.d.ts +0 -13
- package/dist/style/cssGenerator.d.ts.map +0 -1
- package/dist/style/cssPropertyTypes.d.ts +0 -98
- package/dist/style/cssPropertyTypes.d.ts.map +0 -1
- package/dist/style/styleBuilder.d.ts +0 -337
- package/dist/style/styleBuilder.d.ts.map +0 -1
- package/dist/style/styleCache.d.ts +0 -5
- package/dist/style/styleCache.d.ts.map +0 -1
- package/dist/style/styleProperties.d.ts +0 -13
- package/dist/style/styleProperties.d.ts.map +0 -1
- package/dist/style/styleQueries.d.ts +0 -25
- package/dist/style/styleQueries.d.ts.map +0 -1
package/dist/nuclo.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
var e=Object.defineProperty,t=(t,n)=>{let r={};for(var i in t)e(r,i,{get:t[i],enumerable:!0});return n||e(r,Symbol.toStringTag,{value:`Module`}),r};function n(e){return e===null||typeof e!=`object`&&typeof e!=`function`}function r(e){return e instanceof Node?!0:typeof e!=`object`||!e?!1:typeof e.nodeType==`number`}function i(e){return typeof e==`object`&&!!e}function a(e){return i(e)&&`tagName`in e}function o(e){return typeof e==`boolean`}function s(e){return typeof e==`function`}function c(e){return s(e)&&e.length===0}function l(e,t){typeof console<`u`&&console.error(`nuclo: ${e}`,t)}const u=typeof window<`u`&&typeof document<`u`,d=new WeakMap;function f(e,t,n,r,i,a){let o=d.get(e);o||(o=new Map,d.set(e,o));let s=o.get(t);s||(s=new Set,o.set(t,s)),s.add({original:n,wrapped:r,options:i,controller:a})}function p(e,t,n){n.controller?n.controller.abort():e.removeEventListener(t,n.wrapped,n.options)}function ee(e,t){let n=d.get(e);if(n)if(t){let r=n.get(t);if(r){for(let n of r)p(e,t,n);n.delete(t)}}else{for(let[t,r]of n)for(let n of r)p(e,t,n);d.delete(e)}}function te(e,t,n){return function(r){if(!u||!r||typeof r.addEventListener!=`function`)return;let i=r,a=new AbortController,o=function(n){try{t.call(i,n)}catch(t){l(`Error in '${e}' listener`,t)}},s=typeof n==`boolean`?{capture:n,signal:a.signal}:{...n||{},signal:a.signal};i.addEventListener(e,o,s),f(i,e,t,o,n,a)}}const m=new Map,h=new WeakMap,g=new Map,_=new WeakMap;function ne(e,t){let n=new WeakRef(e);m.set(n,t),h.set(e,{ref:n,info:t})}function re(e,t){let n=new WeakRef(e);g.set(n,t),_.set(e,{ref:n,info:t})}function ie(e){m.delete(e)}function ae(e){g.delete(e)}function oe(e){let t=h.get(e);t&&(m.delete(t.ref),h.delete(e))}function se(e){let t=_.get(e);t&&(g.delete(t.ref),_.delete(e))}const ce=new WeakMap,v=new Set,y=new WeakMap;function le(e,t){ce.set(e,t);let n=new WeakRef(e);v.add(n),y.set(e,n)}function b(e){ce.delete(e);let t=y.get(e);t&&(v.delete(t),y.delete(e))}function ue(){let e=[],t=[];for(let n of v){let r=n.deref();r===void 0?t.push(n):e.push(r)}for(let e of t)v.delete(e);return e}function de(e){return ce.get(e)??null}const x=`http://www.w3.org/2000/svg`;function S(e){return globalThis.document?document.createElement(e):null}function C(e,t){return globalThis.document?document.createElementNS(e,t):null}function w(e){return globalThis.document?document.createTextNode(e):null}function fe(){return globalThis.document?document.createDocumentFragment():null}function pe(e,t){try{return e.appendChild(t),!0}catch(e){return l(`Failed to append child node`,e),!1}}function me(e){if(e.nodeType===Node.ELEMENT_NODE){let t=e;ee(t),se(t),b(t)}else e.nodeType===Node.TEXT_NODE?oe(e):e.nodeType===Node.COMMENT_NODE&&b(e);if(e.childNodes&&e.childNodes.length>0)for(let t=0;t<e.childNodes.length;t++)me(e.childNodes[t])}function he(e){if(!e?.parentNode)return!1;try{return me(e),e.parentNode.removeChild(e),!0}catch(e){return l(`Failed to remove child node`,e),!1}}function ge(e,t,n){try{return e.insertBefore(t,n),!0}catch(e){return l(`Failed to insert node before reference`,e),!1}}function T(e){return globalThis.document?globalThis.document.createComment(e):null}function _e(e,t=`hidden`){return globalThis.document?globalThis.document.createComment(`conditional-${e}-${t}`):null}function ve(e,t){let n=T(`${e}-end`);if(!n)throw Error(`Failed to create comment: document not available`);let r=T(`${e}-start-${t}`);if(!r)throw Error(`Failed to create comment: document not available`);return{start:r,end:n}}function ye(e,t){let n=e.nextSibling;for(;n&&n!==t;){let e=n.nextSibling;he(n),n=e}}function be(e,t){let n=t.parentNode;if(n)for(let r=0;r<e.length;r++)ge(n,e[r],t)}function xe(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=w(r);if(e)t=e;else continue}else t=r;pe(e,t)}}return e}function E(e){return e?e.isConnected===!0:!1}function D(e,t){if(!e?.parentNode)return!1;try{return e.parentNode.replaceChild(t,e),!0}catch(e){return l(`Error replacing conditional node`,e),!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&&(E(n)?Oe(e.info):(ae(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 re(e,n),n}function De(e){return typeof e!=`object`||!e}function O(e,t){let n;try{n=t.resolver()}catch(t){l(`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){l(`Failed to apply reactive attribute: ${e}`,t)}}function Oe(e){for(let[t,n]of e.attributeResolvers)O(t,n)}function ke(e,t,n,r){if(!(e instanceof Element)||!t||typeof n!=`function`){l(`Invalid parameters for registerAttributeResolver`);return}let i={resolver:n,applyValue:r,lastValue:Se};if(!u){O(t,i);return}Te(),Ee(e).attributeResolvers.set(t,i),O(t,i)}function Ae(e){let t=[];for(let[n,r]of g){let i=n.deref();if(i===void 0){t.push(n);continue}if(!E(i)){_.delete(i),t.push(n);continue}e&&!e.contains(i)||Oe(r)}for(let e of t)ae(e)}function je(e){return e}function Me(e,t,n){let r=je(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 Ne(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}}function Pe(e,t){if(!(!e?.style||!t))for(let[n,r]of Object.entries(t))Ne(e,n,r)||l(`Failed to set style property '${n}'`)}function Fe(e,t){e&&(s(t)?ke(e,`style`,t,function(t){Pe(e,t)}):Pe(e,t))}const k=new WeakMap,Ie=new WeakSet;function A(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 j(e){let t=``;for(let n of e)t&&(t+=` `),t+=n;return t}function Le(e){if(!k.has(e)){let t=new Set;e.className&&A(t,e.className),k.set(e,t)}Ie.add(e)}function Re(e){return Ie.has(e)}function ze(e,t){if(!t)return;let n=k.get(e);n||(n=new Set,k.set(e,n)),A(n,t)}function Be(e,t){let n=k.get(e);if(!n||n.size===0){e.className=t||``;return}if(!t){e.className=j(n);return}let r=j(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 Ve(e,t){if(!t)return;let n=e.className;if(n&&n!==t){let r=new Set;A(r,n),A(r,t),e.className=j(r)}else e.className=t}function He(e,t){if(typeof e!=`function`){l(`Invalid resolver provided to createReactiveTextNode`);let e=w(``);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){l(`Failed to evaluate reactive text resolver`,e),n=``}let r=n===void 0?``:String(n),i=w(r);if(!i)throw Error(`Failed to create text node: document not available`);return u&&ne(i,{resolver:e,lastValue:r}),i}function Ue(e){let t=[];for(let[n,r]of m){let i=n.deref();if(i===void 0){t.push(n);continue}if(!E(i)){h.delete(i),t.push(n);continue}if(e&&!e.contains(i))continue;let a;try{a=r.resolver()}catch(e){l(`Failed to update reactive text node`,e),a=void 0}let o=a===void 0?``:String(a);o!==r.lastValue&&(i.textContent=o,r.lastValue=o)}for(let e of t)ie(e)}function We(e,t,n,r=!1){if(n==null)return;if(t===`style`){Fe(e,n);return}let i=(n,r=!1)=>{if(n!=null){if(t===`className`&&e instanceof HTMLElement&&r){Ve(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(s(n)&&n.length===0){let r=n;t===`className`&&e instanceof HTMLElement?(Le(e),ke(e,String(t),r,function(t){Be(e,String(t||``))})):ke(e,String(t),r,function(e){i(e,!1)})}else{if(t===`className`&&e instanceof HTMLElement&&Re(e)){let t=String(n||``);t&&(ze(e,t),Ve(e,t));return}i(n,r)}}function M(e,t,n=!0){if(t)for(let r of Object.keys(t)){let i=t[r];We(e,r,i,n&&r===`className`)}}const N=new WeakMap;let P=!1;const Ge=new WeakMap;function F(){return P}function Ke(){P=!0}function qe(){P=!1}function I(e){return Ge.get(e)??0}function Je(e,t){Ge.set(e,t)}function L(e){let t=I(e),n=e.childNodes[t]??null;return n&&Je(e,t+1),n}function Ye(e,t){if(!P)return null;let n=e.childNodes[I(e)];return n&&n.nodeType===1&&n.tagName.toLowerCase()===t?L(e):null}function Xe(e,t){let n=I(e),r=t-n;for(;r-- >0;){let t=e.childNodes[n];t&&e.removeChild(t)}}function Ze(e){return i(e)&&!r(e)&&`className`in e&&typeof e.className==`string`&&Object.keys(e).length===1}function Qe(e){let t=I(e),n=e.childNodes[t];return!!n&&n.nodeType===8&&n.textContent?.trimStart().startsWith(`text-`)===!0}function R(e,t,a){if(t==null)return null;if(s(t)){if(c(t))try{let r=N.get(t);if(r||(r={value:t(),error:!1},N.set(t,r)),r.error)return z(a,()=>``);let i=r.value;if(Ze(i))return M(e,{className:()=>{let e=t();return Ze(e)?e.className:``}}),null;if(n(i)&&i!=null){if(F()&&Qe(e)){let n=e;L(n);let r=L(n);return r&&r.nodeType===3&&ne(r,{resolver:t,lastValue:r.textContent||``}),null}return z(a,t,i)}return null}catch(e){return N.set(t,{value:void 0,error:!0}),l(`Error evaluating reactive text function:`,e),z(a,()=>``)}let o=t(e,a);return o==null?null:n(o)?$e(a,o):r(o)?o:(i(o)&&M(e,o),null)}let o=t;if(n(o)){if(F()&&Qe(e)){let t=e;return L(t),L(t),null}return $e(a,o)}return r(o)?o:(M(e,o),null)}function z(e,t,n){let r=fe();if(!r)throw Error(`Failed to create document fragment: document not available`);let i=T(` text-${e} `);i&&r.appendChild(i);let a=He(t,n);return r.appendChild(a),r}function $e(e,t){let n=fe();if(!n)throw Error(`Failed to create document fragment: document not available`);let r=T(` text-${e} `);r&&n.appendChild(r);let i=w(String(t));return i&&n.appendChild(i),n}function B(e,t,n=0){if(!t||t.length===0)return{element:e,nextIndex:n,appended:0};let r=n,i=0,a=e;for(let n=0;n<t.length;n+=1){let o=t[n];if(o==null)continue;let s=R(e,o,r);s&&(s.parentNode!==a&&a.appendChild(s),r+=1,i+=1)}return{element:e,nextIndex:r,appended:i}}function et(e,t){let n=S(e);return B(n,t,0),n}function tt(e,t){let n=C(x,e);if(!n)throw Error(`Failed to create SVG element: ${e}`);return B(n,t,0),n}function nt(e,...t){return function(n,r=0){let i=n,a=i?Ye(i,e):null,o=a??S(e),s=o,c=a?s.childNodes.length:0;return B(o,t,r),a&&Xe(s,c),o}}function rt(e,...t){return function(n,r=0){let i=n,a=i?Ye(i,e):null,o;if(a)o=a;else{let t=C(x,e);if(!t)throw Error(`Failed to create SVG element: ${e}`);o=t}let s=o,c=a?s.childNodes.length:0;return B(o,t,r),a&&Xe(s,c),o}}function it(e){return(...t)=>nt(e,...t)}function at(e){return(...t)=>rt(e,...t)}const V=`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(`.`),H=`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(`.`),ot=[`area`,`base`,`br`,`col`,`embed`,`hr`,`img`,`input`,`link`,`meta`,`source`,`track`,`wbr`];function st(e,t){t in e&&typeof e[t]!=`function`||(e[t]=it(t))}function ct(e,t){let n=`${t}Svg`;n in e||(e[n]=at(t))}function lt(e=globalThis){let t=`__nuclo_tags_registered`;if(!e[t]){for(let t=0;t<H.length;t++)ct(e,H[t]);for(let t=0;t<V.length;t++)st(e,V[t]);e[t]=!0}}function ut(e,t,n){if(s(e)){let r=e(t,n);return r&&a(r)?r:null}return e&&a(e)?e:null}function dt(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 U=new Map;function ft(e){return Array.isArray(e)?e:Array.from(e)}function pt(e,t,n){return ut(e.renderItem(t,n),e.host,n)}function mt(e){he(e.element);let t=e;t.element=null,t.item=null}function ht(e){let{host:t,startMarker:n,endMarker:r}=e,i=n.parentNode??t,a=ft(e.itemsProvider());if(dt(e.lastSyncedItems,a))return;let o=new Map,s=new Map;for(let t=0;t<e.records.length;t++){let n=e.records[t],r=s.get(n.item);r?r.push(n):s.set(n.item,[n])}for(let t=0;t<a.length;t++){let n=a[t];if(t<e.lastSyncedItems.length&&e.lastSyncedItems[t]===n){let r=e.records[t];if(r&&r.item===n){o.set(t,r);let e=s.get(n);e.splice(e.indexOf(r),1),e.length===0&&s.delete(n)}}}let c=Array(a.length),l=new Set(e.records),u=r;for(let t=a.length-1;t>=0;t--){let n=a[t],r=o.get(t);if(!r){let e=s.get(n);e&&e.length>0&&(r=e.shift(),e.length===0&&s.delete(n))}if(r)l.delete(r);else{let i=pt(e,n,t);if(!i){c[t]=null;continue}r={item:n,element:i}}c[t]=r;let d=r.element;d.nextSibling!==u&&i.insertBefore(d,u),u=d}for(let e of l)mt(e);e.records=c.filter(e=>e!==null),e.lastSyncedItems=a.slice(),c.length===0&&(e.records=[],e.lastSyncedItems=[])}function gt(e,t,n,r){return F()?vt(e,t,n,r):_t(e,t,n,r)}function _t(e,t,n,r){let{start:i,end:a}=ve(`list`,r),o={itemsProvider:e,renderItem:t,startMarker:i,endMarker:a,records:[],host:n,lastSyncedItems:[]},s=n;if(s.appendChild(i),s.appendChild(a),ht(o),u){let e={runtime:o};U.set(new WeakRef(i),e)}return o}function vt(e,t,n,r){let i=n,a=I(i),o=i.childNodes[a];if(!o||o.nodeType!==8||!o.textContent?.startsWith(`list-start-`))return _t(e,t,n,r);let s=L(i),c=I(i);for(;c<i.childNodes.length;){let e=i.childNodes[c];if(e.nodeType===8&&e.textContent===`list-end`)break;c++}let l=i.childNodes[c],d=ft(e()),f=[];for(let e=0;e<d.length;e++){let r=ut(t(d[e],e),n,e);r&&f.push({item:d[e],element:r})}Je(i,c+1);let p={itemsProvider:e,renderItem:t,startMarker:s,endMarker:l,records:f,host:n,lastSyncedItems:d.slice()};if(u){let e={runtime:p};U.set(new WeakRef(s),e)}return p}function yt(e){for(let t=0;t<e.records.length;t++){let n=e.records[t];n.element=null,n.item=null}e.records=[]}function bt(e){let t=[];for(let[n,r]of U){let i=n.deref();if(!i||!E(i)||!E(r.runtime.endMarker)){yt(r.runtime),t.push(n);continue}e&&!e.contains(i)||ht(r.runtime)}for(let e of t)U.delete(e)}function xt(e,t){return function(n,r){return gt(e,t,n,r).startMarker}}function St(e,t){try{return e()}catch(e){if(t)return t(e),!1;throw e}}function Ct(e,t){return typeof e==`function`?St(e,t):!!e}function wt(e,t,n,r){return s(e)?c(e)?(N.delete(e),R(t,e,n)):Me(t,r,()=>{let r=R(t,e,n);return r&&!r.parentNode?r:null}):R(t,e,n)}function Tt(e,t,n,r){let i=[];for(let a of e){let e=wt(a,t,n,r);e&&i.push(e)}return i}const W=new Map;function Et(e,t){for(let t=0;t<e.length;t++)if(Ct(e[t].condition))return t;return t.length>0?-1:null}function Dt(e){let{groups:t,elseContent:n,host:r,index:i,endMarker:a}=e,o=Et(t,n);o!==e.activeIndex&&(ye(e.startMarker,e.endMarker),e.activeIndex=o,o!==null&&be(Tt(o>=0?t[o].content:n,r,i,a),a))}function Ot(e){let t={runtime:e};W.set(new WeakRef(e.startMarker),t)}function kt(e){let t=[];for(let[n,r]of W){let i=n.deref();if(i===void 0){t.push(n);continue}if(!E(i)||!E(r.runtime.endMarker)){t.push(n);continue}if(!(e&&!e.contains(i)))try{r.runtime.update()}catch{t.push(n)}}for(let e of t)W.delete(e)}var At=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?F()?this.hydrateRender(e,t):this.freshRender(e,t):null}freshRender(e,t){let{start:n,end:r}=ve(`when`,t),i=this.createRuntimeFromMarkers(e,t,n,r),a=je(e);return a.appendChild(n),a.appendChild(r),Dt(i),n}hydrateRender(e,t){let n=e,r=I(n),i=n.childNodes[r];if(!i||i.nodeType!==8||!i.textContent?.startsWith(`when-start-`))return this.freshRender(e,t);let a=L(n),o=I(n);for(;o<n.childNodes.length;){let e=n.childNodes[o];if(e.nodeType===8&&e.textContent===`when-end`)break;o++}let s=n.childNodes[o],c=Et([...this.groups],[...this.elseContent]);if(c!==null){let n=c>=0?this.groups[c].content:this.elseContent;for(let r of n)R(e,r,t)}return Je(n,o+1),this.createRuntimeFromMarkers(e,t,a,s,c),a}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(){Dt(a)}};return u&&Ot(a),a}};function G(e){return Object.assign(function(t,n){return e.render(t,n)},{when:function(t,...n){return G(e.cloneWith({condition:t,content:n}))},else:function(...t){return G(e.cloneWith(void 0,t))}})}function jt(e,...t){return G(new At(e,...t))}function Mt(e){try{return e.isSvg?tt(e.tagName,e.modifiers):et(e.tagName,e.modifiers)}catch(t){if(l(`Error applying modifiers in conditional element "${e.tagName}"`,t),e.isSvg){let n=C(x,e.tagName);if(!n)throw Error(`Failed to create SVG element: ${e.tagName}`,{cause:t});return n}let n=S(e.tagName);if(!n)throw Error(`Failed to create element: ${e.tagName}`,{cause:t});return n}}function Nt(e){let t=de(e);if(!t)return;let n=St(t.condition,e=>{l(`Error evaluating conditional condition`,e)}),r=e.nodeType===Node.ELEMENT_NODE;if(n&&!r){let n=Mt(t);le(n,t),D(e,n)}else if(!n&&r){let n=_e(t.tagName);n&&(le(n,t),D(e,n))}}function Pt(e){if(u)try{let t=ue();for(let n of t){if(!n.isConnected){b(n);continue}e&&!e.contains(n)||Nt(n)}}catch(e){l(`Error during conditional elements update`,e)}}function Ft(){if(typeof document>`u`)return;let e=document.body?[document.body,document]:[document];for(let t of e)try{t.dispatchEvent(new Event(`update`,{bubbles:!0}))}catch(e){l(`Error dispatching global update event`,e)}}const K=new Map;function It(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 Lt(e,t){let n=K.get(e);n||(n=new Set,K.set(e,n)),n.add(new WeakRef(t))}function Rt(e){let t=It(e);if(t.length===0)return[];let n=new Set;for(let e of t){let t=K.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(!E(t)){r.push(e);continue}n.add(t)}for(let e of r)t.delete(e);t.size===0&&K.delete(e)}return Array.from(n)}function zt(...e){let t=It(e);return function(e){if(u&&e instanceof Element)for(let n of t)Lt(n,e)}}const Bt=[bt,kt,Pt,Ae,Ue,Ft];function Vt(...e){let t;if(e.length>0){let n=Rt(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 Bt)e(t)}function Ht(e,t,n=0){let r=e(t||document.body,n);return(t||document.body).appendChild(r),r}function Ut(e,t){let n=t||document.body;Ke();try{return e(n,0)}finally{qe()}}const Wt=[{name:`display`,cssProperty:`display`},{name:`grid`,cssProperty:`display`,defaultValue:`grid`,isShorthand:!0},{name:`bg`,cssProperty:`background-color`},{name:`color`,cssProperty:`color`},{name:`accentColor`,cssProperty:`accent-color`},{name:`fontSize`,cssProperty:`font-size`},{name:`fontWeight`,cssProperty:`font-weight`},{name:`fontFamily`,cssProperty:`font-family`},{name:`lineHeight`,cssProperty:`line-height`},{name:`letterSpacing`,cssProperty:`letter-spacing`},{name:`textAlign`,cssProperty:`text-align`},{name:`textDecoration`,cssProperty:`text-decoration`},{name:`fontStyle`,cssProperty:`font-style`},{name:`fontVariant`,cssProperty:`font-variant`},{name:`fontStretch`,cssProperty:`font-stretch`},{name:`textTransform`,cssProperty:`text-transform`},{name:`textIndent`,cssProperty:`text-indent`},{name:`textOverflow`,cssProperty:`text-overflow`},{name:`textShadow`,cssProperty:`text-shadow`},{name:`whiteSpace`,cssProperty:`white-space`},{name:`wordSpacing`,cssProperty:`word-spacing`},{name:`wordWrap`,cssProperty:`word-wrap`},{name:`overflowWrap`,cssProperty:`overflow-wrap`},{name:`textAlignLast`,cssProperty:`text-align-last`},{name:`textJustify`,cssProperty:`text-justify`},{name:`textDecorationLine`,cssProperty:`text-decoration-line`},{name:`textDecorationColor`,cssProperty:`text-decoration-color`},{name:`textDecorationStyle`,cssProperty:`text-decoration-style`},{name:`textDecorationThickness`,cssProperty:`text-decoration-thickness`},{name:`textUnderlineOffset`,cssProperty:`text-underline-offset`},{name:`verticalAlign`,cssProperty:`vertical-align`},{name:`position`,cssProperty:`position`},{name:`padding`,cssProperty:`padding`},{name:`paddingTop`,cssProperty:`padding-top`},{name:`paddingRight`,cssProperty:`padding-right`},{name:`paddingBottom`,cssProperty:`padding-bottom`},{name:`paddingLeft`,cssProperty:`padding-left`},{name:`margin`,cssProperty:`margin`},{name:`marginTop`,cssProperty:`margin-top`},{name:`marginRight`,cssProperty:`margin-right`},{name:`marginBottom`,cssProperty:`margin-bottom`},{name:`marginLeft`,cssProperty:`margin-left`},{name:`width`,cssProperty:`width`},{name:`height`,cssProperty:`height`},{name:`minWidth`,cssProperty:`min-width`},{name:`maxWidth`,cssProperty:`max-width`},{name:`minHeight`,cssProperty:`min-height`},{name:`maxHeight`,cssProperty:`max-height`},{name:`boxSizing`,cssProperty:`box-sizing`},{name:`top`,cssProperty:`top`},{name:`right`,cssProperty:`right`},{name:`bottom`,cssProperty:`bottom`},{name:`left`,cssProperty:`left`},{name:`zIndex`,cssProperty:`z-index`},{name:`flexDirection`,cssProperty:`flex-direction`},{name:`alignItems`,cssProperty:`align-items`},{name:`justifyContent`,cssProperty:`justify-content`},{name:`gap`,cssProperty:`gap`},{name:`flexWrap`,cssProperty:`flex-wrap`},{name:`flexGrow`,cssProperty:`flex-grow`},{name:`flexShrink`,cssProperty:`flex-shrink`},{name:`flexBasis`,cssProperty:`flex-basis`},{name:`alignSelf`,cssProperty:`align-self`},{name:`alignContent`,cssProperty:`align-content`},{name:`justifySelf`,cssProperty:`justify-self`},{name:`justifyItems`,cssProperty:`justify-items`},{name:`gridTemplateColumns`,cssProperty:`grid-template-columns`},{name:`gridTemplateRows`,cssProperty:`grid-template-rows`},{name:`gridTemplateAreas`,cssProperty:`grid-template-areas`},{name:`gridColumn`,cssProperty:`grid-column`},{name:`gridRow`,cssProperty:`grid-row`},{name:`gridColumnStart`,cssProperty:`grid-column-start`},{name:`gridColumnEnd`,cssProperty:`grid-column-end`},{name:`gridRowStart`,cssProperty:`grid-row-start`},{name:`gridRowEnd`,cssProperty:`grid-row-end`},{name:`gridArea`,cssProperty:`grid-area`},{name:`gridAutoColumns`,cssProperty:`grid-auto-columns`},{name:`gridAutoRows`,cssProperty:`grid-auto-rows`},{name:`gridAutoFlow`,cssProperty:`grid-auto-flow`},{name:`border`,cssProperty:`border`},{name:`borderTop`,cssProperty:`border-top`},{name:`borderRight`,cssProperty:`border-right`},{name:`borderBottom`,cssProperty:`border-bottom`},{name:`borderLeft`,cssProperty:`border-left`},{name:`borderWidth`,cssProperty:`border-width`},{name:`borderStyle`,cssProperty:`border-style`},{name:`borderColor`,cssProperty:`border-color`},{name:`borderTopWidth`,cssProperty:`border-top-width`},{name:`borderRightWidth`,cssProperty:`border-right-width`},{name:`borderBottomWidth`,cssProperty:`border-bottom-width`},{name:`borderLeftWidth`,cssProperty:`border-left-width`},{name:`borderTopStyle`,cssProperty:`border-top-style`},{name:`borderRightStyle`,cssProperty:`border-right-style`},{name:`borderBottomStyle`,cssProperty:`border-bottom-style`},{name:`borderLeftStyle`,cssProperty:`border-left-style`},{name:`borderTopColor`,cssProperty:`border-top-color`},{name:`borderRightColor`,cssProperty:`border-right-color`},{name:`borderBottomColor`,cssProperty:`border-bottom-color`},{name:`borderLeftColor`,cssProperty:`border-left-color`},{name:`borderRadius`,cssProperty:`border-radius`},{name:`borderTopLeftRadius`,cssProperty:`border-top-left-radius`},{name:`borderTopRightRadius`,cssProperty:`border-top-right-radius`},{name:`borderBottomLeftRadius`,cssProperty:`border-bottom-left-radius`},{name:`borderBottomRightRadius`,cssProperty:`border-bottom-right-radius`},{name:`outline`,cssProperty:`outline`},{name:`outlineWidth`,cssProperty:`outline-width`},{name:`outlineStyle`,cssProperty:`outline-style`},{name:`outlineColor`,cssProperty:`outline-color`},{name:`outlineOffset`,cssProperty:`outline-offset`},{name:`backgroundColor`,cssProperty:`background-color`},{name:`backgroundImage`,cssProperty:`background-image`},{name:`backgroundRepeat`,cssProperty:`background-repeat`},{name:`backgroundPosition`,cssProperty:`background-position`},{name:`backgroundSize`,cssProperty:`background-size`},{name:`backgroundAttachment`,cssProperty:`background-attachment`},{name:`backgroundClip`,cssProperty:`background-clip`},{name:`backgroundOrigin`,cssProperty:`background-origin`},{name:`boxShadow`,cssProperty:`box-shadow`},{name:`opacity`,cssProperty:`opacity`},{name:`transition`,cssProperty:`transition`},{name:`transitionProperty`,cssProperty:`transition-property`},{name:`transitionDuration`,cssProperty:`transition-duration`},{name:`transitionTimingFunction`,cssProperty:`transition-timing-function`},{name:`transitionDelay`,cssProperty:`transition-delay`},{name:`transform`,cssProperty:`transform`},{name:`transformOrigin`,cssProperty:`transform-origin`},{name:`transformStyle`,cssProperty:`transform-style`},{name:`perspective`,cssProperty:`perspective`},{name:`perspectiveOrigin`,cssProperty:`perspective-origin`},{name:`backfaceVisibility`,cssProperty:`backface-visibility`},{name:`animation`,cssProperty:`animation`},{name:`animationName`,cssProperty:`animation-name`},{name:`animationDuration`,cssProperty:`animation-duration`},{name:`animationTimingFunction`,cssProperty:`animation-timing-function`},{name:`animationDelay`,cssProperty:`animation-delay`},{name:`animationIterationCount`,cssProperty:`animation-iteration-count`},{name:`animationDirection`,cssProperty:`animation-direction`},{name:`animationFillMode`,cssProperty:`animation-fill-mode`},{name:`animationPlayState`,cssProperty:`animation-play-state`},{name:`filter`,cssProperty:`filter`},{name:`backdropFilter`,cssProperty:`backdrop-filter`},{name:`overflow`,cssProperty:`overflow`},{name:`overflowX`,cssProperty:`overflow-x`},{name:`overflowY`,cssProperty:`overflow-y`},{name:`visibility`,cssProperty:`visibility`},{name:`objectFit`,cssProperty:`object-fit`},{name:`objectPosition`,cssProperty:`object-position`},{name:`listStyle`,cssProperty:`list-style`},{name:`listStyleType`,cssProperty:`list-style-type`},{name:`listStylePosition`,cssProperty:`list-style-position`},{name:`listStyleImage`,cssProperty:`list-style-image`},{name:`borderCollapse`,cssProperty:`border-collapse`},{name:`borderSpacing`,cssProperty:`border-spacing`},{name:`captionSide`,cssProperty:`caption-side`},{name:`emptyCells`,cssProperty:`empty-cells`},{name:`tableLayout`,cssProperty:`table-layout`},{name:`content`,cssProperty:`content`},{name:`quotes`,cssProperty:`quotes`},{name:`counterReset`,cssProperty:`counter-reset`},{name:`counterIncrement`,cssProperty:`counter-increment`},{name:`appearance`,cssProperty:`appearance`},{name:`userSelect`,cssProperty:`user-select`},{name:`pointerEvents`,cssProperty:`pointer-events`},{name:`resize`,cssProperty:`resize`},{name:`scrollBehavior`,cssProperty:`scroll-behavior`},{name:`clip`,cssProperty:`clip`},{name:`clipPath`,cssProperty:`clip-path`},{name:`isolation`,cssProperty:`isolation`},{name:`mixBlendMode`,cssProperty:`mix-blend-mode`},{name:`willChange`,cssProperty:`will-change`},{name:`contain`,cssProperty:`contain`},{name:`pageBreakBefore`,cssProperty:`page-break-before`},{name:`pageBreakAfter`,cssProperty:`page-break-after`},{name:`pageBreakInside`,cssProperty:`page-break-inside`},{name:`breakBefore`,cssProperty:`break-before`},{name:`breakAfter`,cssProperty:`break-after`},{name:`breakInside`,cssProperty:`break-inside`},{name:`orphans`,cssProperty:`orphans`},{name:`widows`,cssProperty:`widows`},{name:`columnCount`,cssProperty:`column-count`},{name:`columnFill`,cssProperty:`column-fill`},{name:`columnGap`,cssProperty:`column-gap`},{name:`columnRule`,cssProperty:`column-rule`},{name:`columnRuleColor`,cssProperty:`column-rule-color`},{name:`columnRuleStyle`,cssProperty:`column-rule-style`},{name:`columnRuleWidth`,cssProperty:`column-rule-width`},{name:`columnSpan`,cssProperty:`column-span`},{name:`columnWidth`,cssProperty:`column-width`},{name:`columns`,cssProperty:`columns`},{name:`cursor`,cssProperty:`cursor`},{name:`aspectRatio`,cssProperty:`aspect-ratio`},{name:`clear`,cssProperty:`clear`},{name:`float`,cssProperty:`float`},{name:`order`,cssProperty:`order`},{name:`placeContent`,cssProperty:`place-content`},{name:`placeItems`,cssProperty:`place-items`},{name:`placeSelf`,cssProperty:`place-self`},{name:`hyphens`,cssProperty:`hyphens`},{name:`lineBreak`,cssProperty:`line-break`},{name:`wordBreak`,cssProperty:`word-break`},{name:`textOrientation`,cssProperty:`text-orientation`},{name:`writingMode`,cssProperty:`writing-mode`},{name:`direction`,cssProperty:`direction`},{name:`unicodeBidi`,cssProperty:`unicode-bidi`},{name:`backgroundBlendMode`,cssProperty:`background-blend-mode`},{name:`backgroundPositionX`,cssProperty:`background-position-x`},{name:`backgroundPositionY`,cssProperty:`background-position-y`},{name:`borderImage`,cssProperty:`border-image`},{name:`borderImageSource`,cssProperty:`border-image-source`},{name:`borderImageSlice`,cssProperty:`border-image-slice`},{name:`borderImageWidth`,cssProperty:`border-image-width`},{name:`borderImageOutset`,cssProperty:`border-image-outset`},{name:`borderImageRepeat`,cssProperty:`border-image-repeat`},{name:`inset`,cssProperty:`inset`},{name:`insetBlock`,cssProperty:`inset-block`},{name:`insetBlockStart`,cssProperty:`inset-block-start`},{name:`insetBlockEnd`,cssProperty:`inset-block-end`},{name:`insetInline`,cssProperty:`inset-inline`},{name:`insetInlineStart`,cssProperty:`inset-inline-start`},{name:`insetInlineEnd`,cssProperty:`inset-inline-end`},{name:`marginBlock`,cssProperty:`margin-block`},{name:`marginBlockStart`,cssProperty:`margin-block-start`},{name:`marginBlockEnd`,cssProperty:`margin-block-end`},{name:`marginInline`,cssProperty:`margin-inline`},{name:`marginInlineStart`,cssProperty:`margin-inline-start`},{name:`marginInlineEnd`,cssProperty:`margin-inline-end`},{name:`paddingBlock`,cssProperty:`padding-block`},{name:`paddingBlockStart`,cssProperty:`padding-block-start`},{name:`paddingBlockEnd`,cssProperty:`padding-block-end`},{name:`paddingInline`,cssProperty:`padding-inline`},{name:`paddingInlineStart`,cssProperty:`padding-inline-start`},{name:`paddingInlineEnd`,cssProperty:`padding-inline-end`},{name:`inlineSize`,cssProperty:`inline-size`},{name:`blockSize`,cssProperty:`block-size`},{name:`minInlineSize`,cssProperty:`min-inline-size`},{name:`minBlockSize`,cssProperty:`min-block-size`},{name:`maxInlineSize`,cssProperty:`max-inline-size`},{name:`maxBlockSize`,cssProperty:`max-block-size`},{name:`borderBlock`,cssProperty:`border-block`},{name:`borderBlockStart`,cssProperty:`border-block-start`},{name:`borderBlockEnd`,cssProperty:`border-block-end`},{name:`borderInline`,cssProperty:`border-inline`},{name:`borderInlineStart`,cssProperty:`border-inline-start`},{name:`borderInlineEnd`,cssProperty:`border-inline-end`},{name:`borderBlockWidth`,cssProperty:`border-block-width`},{name:`borderBlockStartWidth`,cssProperty:`border-block-start-width`},{name:`borderBlockEndWidth`,cssProperty:`border-block-end-width`},{name:`borderInlineWidth`,cssProperty:`border-inline-width`},{name:`borderInlineStartWidth`,cssProperty:`border-inline-start-width`},{name:`borderInlineEndWidth`,cssProperty:`border-inline-end-width`},{name:`borderBlockStyle`,cssProperty:`border-block-style`},{name:`borderBlockStartStyle`,cssProperty:`border-block-start-style`},{name:`borderBlockEndStyle`,cssProperty:`border-block-end-style`},{name:`borderInlineStyle`,cssProperty:`border-inline-style`},{name:`borderInlineStartStyle`,cssProperty:`border-inline-start-style`},{name:`borderInlineEndStyle`,cssProperty:`border-inline-end-style`},{name:`borderBlockColor`,cssProperty:`border-block-color`},{name:`borderBlockStartColor`,cssProperty:`border-block-start-color`},{name:`borderBlockEndColor`,cssProperty:`border-block-end-color`},{name:`borderInlineColor`,cssProperty:`border-inline-color`},{name:`borderInlineStartColor`,cssProperty:`border-inline-start-color`},{name:`borderInlineEndColor`,cssProperty:`border-inline-end-color`},{name:`borderStartStartRadius`,cssProperty:`border-start-start-radius`},{name:`borderStartEndRadius`,cssProperty:`border-start-end-radius`},{name:`borderEndStartRadius`,cssProperty:`border-end-start-radius`},{name:`borderEndEndRadius`,cssProperty:`border-end-end-radius`},{name:`scrollMargin`,cssProperty:`scroll-margin`},{name:`scrollMarginTop`,cssProperty:`scroll-margin-top`},{name:`scrollMarginRight`,cssProperty:`scroll-margin-right`},{name:`scrollMarginBottom`,cssProperty:`scroll-margin-bottom`},{name:`scrollMarginLeft`,cssProperty:`scroll-margin-left`},{name:`scrollPadding`,cssProperty:`scroll-padding`},{name:`scrollPaddingTop`,cssProperty:`scroll-padding-top`},{name:`scrollPaddingRight`,cssProperty:`scroll-padding-right`},{name:`scrollPaddingBottom`,cssProperty:`scroll-padding-bottom`},{name:`scrollPaddingLeft`,cssProperty:`scroll-padding-left`},{name:`overscrollBehavior`,cssProperty:`overscroll-behavior`},{name:`overscrollBehaviorX`,cssProperty:`overscroll-behavior-x`},{name:`overscrollBehaviorY`,cssProperty:`overscroll-behavior-y`},{name:`caretColor`,cssProperty:`caret-color`},{name:`caretShape`,cssProperty:`caret-shape`},{name:`caretAnimation`,cssProperty:`caret-animation`},{name:`imageRendering`,cssProperty:`image-rendering`},{name:`colorScheme`,cssProperty:`color-scheme`},{name:`contentVisibility`,cssProperty:`content-visibility`},{name:`touchAction`,cssProperty:`touch-action`},{name:`containerType`,cssProperty:`container-type`},{name:`containerName`,cssProperty:`container-name`},{name:`container`,cssProperty:`container`},{name:`fontFeatureSettings`,cssProperty:`font-feature-settings`},{name:`fontKerning`,cssProperty:`font-kerning`},{name:`fontSynthesis`,cssProperty:`font-synthesis`},{name:`fontOpticalSizing`,cssProperty:`font-optical-sizing`},{name:`fontDisplay`,cssProperty:`font-display`},{name:`fontVariantCaps`,cssProperty:`font-variant-caps`},{name:`fontVariantNumeric`,cssProperty:`font-variant-numeric`},{name:`fontVariantLigatures`,cssProperty:`font-variant-ligatures`},{name:`fontVariantEastAsian`,cssProperty:`font-variant-east-asian`},{name:`fontVariantAlternates`,cssProperty:`font-variant-alternates`},{name:`fontVariantPosition`,cssProperty:`font-variant-position`},{name:`textRendering`,cssProperty:`text-rendering`},{name:`textCombineUpright`,cssProperty:`text-combine-upright`},{name:`textSizeAdjust`,cssProperty:`text-size-adjust`},{name:`mask`,cssProperty:`mask`},{name:`maskImage`,cssProperty:`mask-image`},{name:`maskMode`,cssProperty:`mask-mode`},{name:`maskRepeat`,cssProperty:`mask-repeat`},{name:`maskPosition`,cssProperty:`mask-position`},{name:`maskSize`,cssProperty:`mask-size`},{name:`maskOrigin`,cssProperty:`mask-origin`},{name:`maskClip`,cssProperty:`mask-clip`},{name:`maskComposite`,cssProperty:`mask-composite`},{name:`clipRule`,cssProperty:`clip-rule`},{name:`gridColumnGap`,cssProperty:`grid-column-gap`},{name:`gridRowGap`,cssProperty:`grid-row-gap`},{name:`gridGap`,cssProperty:`grid-gap`}],Gt=[`bold`,`center`,`flex`],Kt=new Map;function q(e){let t=0;for(let n=0;n<e.length;n++){let r=e.charCodeAt(n);t=(t<<5)-t+r,t&=t}return Math.abs(t).toString(16).padStart(8,`0`).substring(0,8)}function J(e){return Object.entries(e).sort(([e],[t])=>e.localeCompare(t)).map(([e,t])=>`${e}:${t}`).join(`|`)}function qt(e){return Kt.get(e)}function Jt(e,t){Kt.set(e,t)}function Yt(e){return e instanceof CSSMediaRule||e instanceof CSSContainerRule||e instanceof CSSSupportsRule}function Xt(e,t,n){return t===`media`&&e instanceof CSSMediaRule?e.media.mediaText===n:t===`container`&&e instanceof CSSContainerRule||t===`supports`&&e instanceof CSSSupportsRule?e.conditionText===n:!1}function Y(e,t){for(let n=0;n<e.length;n++){let r=e[n];if(r instanceof CSSStyleRule&&r.selectorText===t)return r}return null}function X(e,t){e.style.cssText=``;for(let[n,r]of Object.entries(t))e.style.setProperty(n,r)}function Zt(){if(!u)return null;let e=document.querySelector(`#nuclo-styles`);return e||(e=S(`style`),e.id=`nuclo-styles`,document.head.appendChild(e)),e}function Qt(e){let t=Object.entries(e),n=``;for(let e=0;e<t.length;e++)e>0&&(n+=`; `),n+=`${t[e][0]}: ${t[e][1]}`;return n}function $t(e,t,n=`media`,r){if(!u)return!1;let i=document.querySelector(`#nuclo-styles`);if(!i?.sheet)return!1;let a=i.sheet.cssRules;if(r)return Y(a,`.${e}${r}`)!==null;if(t){for(let r=0;r<a.length;r++)if(Xt(a[r],n,t))return Y(a[r].cssRules,`.${e}`)!==null;return!1}return Y(a,`.${e}`)!==null}function Z(e,t,n,r=`media`,i){if(!u){let r=Qt(t);i?`${e}${i}${r}`:n?`${n}${e}${r}`:`${e}${r}`;return}let a=Zt();if(!a)return;let o=a.sheet;if(!o)return;let s=Qt(t);if(i){let n=`.${e}${i}`,r=o.cssRules,a=r.length,c=null,l=a;for(let e=0;e<a;e++){let t=r[e];if(t instanceof CSSStyleRule){if(t.selectorText===n){c=t;break}t.selectorText.includes(`:`)||(l=e+1)}}c?X(c,t):o.insertRule(`${n} { ${s} }`,l);return}if(n){let i=o.cssRules,a=i.length,c=null;for(let e=0;e<a;e++)if(Xt(i[e],r,n)){c=i[e];break}if(!c){let e=a;for(let t=a-1;t>=0;t--)if(Yt(i[t])||i[t]instanceof CSSStyleRule){e=t+1;break}let t=r===`media`?`@media`:r===`container`?`@container`:r===`supports`?`@supports`:`@media`;o.insertRule(`${t} ${n} {}`,e),c=o.cssRules[e]}let l=Y(c.cssRules,`.${e}`);l?X(l,t):c.insertRule(`.${e} { ${s} }`,c.cssRules.length)}else{let n=null,r=0,i=o.cssRules,a=i.length;for(let t=0;t<a;t++){let a=i[t];if(a instanceof CSSStyleRule&&a.selectorText===`.${e}`){n=a,r=t;break}Yt(a)||(r=t+1)}n?X(n,t):o.insertRule(`.${e} { ${s} }`,r)}}function en(e,t){Z(e,t)}function tn(e,t=``,n){let r=J(e),i=t?`${t}:${r}`:r,a=qt(i);if(a)return(!u||!$t(a,n))&&Z(a,e,n),a;let o=q(r),s=t?`n${t}-${o}`:`n${o}`;return Jt(i,s),Z(s,e,n),s}var Q=class{styles={};getStyles(){return{...this.styles}}getClassName(e=``,t){return tn(this.styles,e,t)}getClassNames(){return[this.getClassName()]}getClassDefinitions(){return Object.entries(this.styles).map(([e,t])=>({className:this.getClassName(),property:e,value:t}))}toString(){return this.getClassName()}add(e,t){return this.styles[e]=t,this}bold(){return this.styles[`font-weight`]=`bold`,this}center(){return this.styles[`justify-content`]=`center`,this.styles[`align-items`]=`center`,this}flex(e){return e===void 0?this.styles.display=`flex`:this.styles.flex=e,this}};function nn(){let e=Q.prototype;for(let t of Wt)t.name in e||(t.isShorthand?e[t.name]=function(){return this.add(t.cssProperty,t.defaultValue||``),this}:e[t.name]=function(e){return this.add(t.cssProperty,e),this})}nn();function rn(e){return e.isShorthand?()=>new Q().add(e.cssProperty,e.defaultValue||``):t=>new Q().add(e.cssProperty,t||``)}const $={};for(let e of Wt)$[e.name]=rn(e);for(let e of Gt)e===`bold`||e===`center`?$[e]=()=>new Q()[e]():e===`flex`&&($[e]=e=>new Q().flex(e));const{display:an,flex:on,grid:sn,bg:cn,color:ln,accentColor:un,fontSize:dn,fontWeight:fn,fontFamily:pn,lineHeight:mn,letterSpacing:hn,textAlign:gn,textDecoration:_n,bold:vn,fontStyle:yn,fontVariant:bn,fontStretch:xn,textTransform:Sn,textIndent:Cn,textOverflow:wn,textShadow:Tn,whiteSpace:En,wordSpacing:Dn,wordWrap:On,overflowWrap:kn,textAlignLast:An,textJustify:jn,textDecorationLine:Mn,textDecorationColor:Nn,textDecorationStyle:Pn,textDecorationThickness:Fn,textUnderlineOffset:In,verticalAlign:Ln,position:Rn,padding:zn,paddingTop:Bn,paddingRight:Vn,paddingBottom:Hn,paddingLeft:Un,margin:Wn,marginTop:Gn,marginRight:Kn,marginBottom:qn,marginLeft:Jn,width:Yn,height:Xn,minWidth:Zn,maxWidth:Qn,minHeight:$n,maxHeight:er,boxSizing:tr,top:nr,right:rr,bottom:ir,left:ar,zIndex:or,flexDirection:sr,alignItems:cr,justifyContent:lr,center:ur,gap:dr,flexWrap:fr,flexGrow:pr,flexShrink:mr,flexBasis:hr,alignSelf:gr,alignContent:_r,justifySelf:vr,justifyItems:yr,gridTemplateColumns:br,gridTemplateRows:xr,gridTemplateAreas:Sr,gridColumn:Cr,gridRow:wr,gridColumnStart:Tr,gridColumnEnd:Er,gridRowStart:Dr,gridRowEnd:Or,gridArea:kr,gridAutoColumns:Ar,gridAutoRows:jr,gridAutoFlow:Mr,border:Nr,borderTop:Pr,borderRight:Fr,borderBottom:Ir,borderLeft:Lr,borderWidth:Rr,borderStyle:zr,borderColor:Br,borderTopWidth:Vr,borderRightWidth:Hr,borderBottomWidth:Ur,borderLeftWidth:Wr,borderTopStyle:Gr,borderRightStyle:Kr,borderBottomStyle:qr,borderLeftStyle:Jr,borderTopColor:Yr,borderRightColor:Xr,borderBottomColor:Zr,borderLeftColor:Qr,borderRadius:$r,borderTopLeftRadius:ei,borderTopRightRadius:ti,borderBottomLeftRadius:ni,borderBottomRightRadius:ri,outline:ii,outlineWidth:ai,outlineStyle:oi,outlineColor:si,outlineOffset:ci,backgroundColor:li,backgroundImage:ui,backgroundRepeat:di,backgroundPosition:fi,backgroundSize:pi,backgroundAttachment:mi,backgroundClip:hi,backgroundOrigin:gi,boxShadow:_i,opacity:vi,transition:yi,transitionProperty:bi,transitionDuration:xi,transitionTimingFunction:Si,transitionDelay:Ci,transform:wi,transformOrigin:Ti,transformStyle:Ei,perspective:Di,perspectiveOrigin:Oi,backfaceVisibility:ki,animation:Ai,animationName:ji,animationDuration:Mi,animationTimingFunction:Ni,animationDelay:Pi,animationIterationCount:Fi,animationDirection:Ii,animationFillMode:Li,animationPlayState:Ri,filter:zi,backdropFilter:Bi,overflow:Vi,overflowX:Hi,overflowY:Ui,visibility:Wi,objectFit:Gi,objectPosition:Ki,listStyle:qi,listStyleType:Ji,listStylePosition:Yi,listStyleImage:Xi,borderCollapse:Zi,borderSpacing:Qi,captionSide:$i,emptyCells:ea,tableLayout:ta,content:na,quotes:ra,counterReset:ia,counterIncrement:aa,appearance:oa,userSelect:sa,pointerEvents:ca,resize:la,scrollBehavior:ua,clip:da,clipPath:fa,isolation:pa,mixBlendMode:ma,willChange:ha,contain:ga,pageBreakBefore:_a,pageBreakAfter:va,pageBreakInside:ya,breakBefore:ba,breakAfter:xa,breakInside:Sa,orphans:Ca,widows:wa,columnCount:Ta,columnFill:Ea,columnGap:Da,columnRule:Oa,columnRuleColor:ka,columnRuleStyle:Aa,columnRuleWidth:ja,columnSpan:Ma,columnWidth:Na,columns:Pa,cursor:Fa,aspectRatio:Ia,clear:La,float:Ra,order:za,placeContent:Ba,placeItems:Va,placeSelf:Ha,hyphens:Ua,lineBreak:Wa,wordBreak:Ga,textOrientation:Ka,writingMode:qa,direction:Ja,unicodeBidi:Ya,backgroundBlendMode:Xa,backgroundPositionX:Za,backgroundPositionY:Qa,borderImage:$a,borderImageSource:eo,borderImageSlice:to,borderImageWidth:no,borderImageOutset:ro,borderImageRepeat:io,inset:ao,insetBlock:oo,insetBlockStart:so,insetBlockEnd:co,insetInline:lo,insetInlineStart:uo,insetInlineEnd:fo,marginBlock:po,marginBlockStart:mo,marginBlockEnd:ho,marginInline:go,marginInlineStart:_o,marginInlineEnd:vo,paddingBlock:yo,paddingBlockStart:bo,paddingBlockEnd:xo,paddingInline:So,paddingInlineStart:Co,paddingInlineEnd:wo,inlineSize:To,blockSize:Eo,minInlineSize:Do,minBlockSize:Oo,maxInlineSize:ko,maxBlockSize:Ao,borderBlock:jo,borderBlockStart:Mo,borderBlockEnd:No,borderInline:Po,borderInlineStart:Fo,borderInlineEnd:Io,borderBlockWidth:Lo,borderBlockStartWidth:Ro,borderBlockEndWidth:zo,borderInlineWidth:Bo,borderInlineStartWidth:Vo,borderInlineEndWidth:Ho,borderBlockStyle:Uo,borderBlockStartStyle:Wo,borderBlockEndStyle:Go,borderInlineStyle:Ko,borderInlineStartStyle:qo,borderInlineEndStyle:Jo,borderBlockColor:Yo,borderBlockStartColor:Xo,borderBlockEndColor:Zo,borderInlineColor:Qo,borderInlineStartColor:$o,borderInlineEndColor:es,borderStartStartRadius:ts,borderStartEndRadius:ns,borderEndStartRadius:rs,borderEndEndRadius:is,scrollMargin:as,scrollMarginTop:os,scrollMarginRight:ss,scrollMarginBottom:cs,scrollMarginLeft:ls,scrollPadding:us,scrollPaddingTop:ds,scrollPaddingRight:fs,scrollPaddingBottom:ps,scrollPaddingLeft:ms,overscrollBehavior:hs,overscrollBehaviorX:gs,overscrollBehaviorY:_s,caretColor:vs,caretShape:ys,caretAnimation:bs,imageRendering:xs,colorScheme:Ss,contentVisibility:Cs,touchAction:ws,containerType:Ts,containerName:Es,container:Ds,fontFeatureSettings:Os,fontKerning:ks,fontSynthesis:As,fontOpticalSizing:js,fontDisplay:Ms,fontVariantCaps:Ns,fontVariantNumeric:Ps,fontVariantLigatures:Fs,fontVariantEastAsian:Is,fontVariantAlternates:Ls,fontVariantPosition:Rs,textRendering:zs,textCombineUpright:Bs,textSizeAdjust:Vs,mask:Hs,maskImage:Us,maskMode:Ws,maskRepeat:Gs,maskPosition:Ks,maskSize:qs,maskOrigin:Js,maskClip:Ys,maskComposite:Xs,clipRule:Zs,gridColumnGap:Qs,gridRowGap:$s,gridGap:ec}=$,tc=new Set(`hover.active.focus.focus-visible.focus-within.visited.link.target.root.empty.enabled.disabled.checked.indeterminate.default.required.optional.valid.invalid.in-range.out-of-range.placeholder-shown.autofill.read-only.read-write.first-child.last-child.only-child.first-of-type.last-of-type.only-of-type.nth-child.nth-last-child.nth-of-type.nth-last-of-type.lang.dir.not.is.where.has.any-link.local-link.scope.current.past.future.playing.paused.seeking.muted.volume-locked.buffering.stalled.picture-in-picture.fullscreen.modal.popover-open.user-invalid.user-valid`.split(`.`));function nc(e){let t=e.trim();return t.startsWith(`&:`)||t.startsWith(`:`)?{type:`pseudo`,pseudoClass:(t.startsWith(`&:`)?t.slice(1):t).trim()}:t.startsWith(`@media `)?{type:`media`,condition:t.slice(7).trim()}:t.startsWith(`@container `)?{type:`container`,condition:t.slice(11).trim()}:t.startsWith(`@supports `)?{type:`supports`,condition:t.slice(10).trim()}:t.startsWith(`@style `)?{type:`style`,condition:t.slice(7).trim()}:{type:`media`,condition:t}}function rc(e){return tc.has(e)}function ic(e,t){return`${e}_${q(t)}`}const ac=new Map;function oc(e){let t=Array.isArray(e)?[...e]:Object.entries(e),n=new Map;for(let[e,r]of t){let t=ac.get(r);t||(t=nc(r),ac.set(r,t)),n.set(e,t)}return function(e,r,i){let a,o,s;typeof e==`string`?(a=e.trim()||void 0,r instanceof Q?(o=r,s=i):s=r):r===void 0?e instanceof Q?o=e:s=e:(o=e,s=r);let c=s!=null&&Object.keys(s).length>0;if(!o&&!c)return{className:a??``};if(c){let e=[],r=new Set;for(let[i]of t){let t=s?.[i];t&&(r.add(i),e.push({queryName:i,query:n.get(i),styles:t.getStyles()}))}for(let[t,n]of Object.entries(s??{}))!r.has(t)&&rc(t)&&n instanceof Q&&e.push({queryName:t,query:{type:`pseudo`,pseudoClass:`:${t}`},styles:n.getStyles()});if(e.length===0&&!o)return{className:a??``};let i=[];i.length=e.length+ +!!o;let c=0;if(o){let e=o.getStyles();i[c++]=`default:${J(e)}`}for(let{queryName:t,styles:n}of e){let e=J(n);i[c++]=`${t}:${e}`}let l=i.sort().join(`||`),u=a?ic(a,l):`n${q(l)}`,d={};o&&(d={...o.getStyles()},Z(u,d));let f=[],p=[];for(let t of e)t.query.type===`pseudo`?p.push(t):f.push(t);for(let{query:e,styles:t}of f)d={...d,...t},Z(u,d,e.condition,e.type);for(let{query:e,styles:t}of p)Z(u,t,void 0,`pseudo`,e.pseudoClass);return{className:u}}if(a){let e=J(o.getStyles()),t=ic(a,e);return Z(t,o.getStyles()),{className:t}}return{className:o.getClassName()}}}const sc=oc;var cc=t({StyleBuilder:()=>Q,accentColor:()=>un,alignContent:()=>_r,alignItems:()=>cr,alignSelf:()=>gr,animation:()=>Ai,animationDelay:()=>Pi,animationDirection:()=>Ii,animationDuration:()=>Mi,animationFillMode:()=>Li,animationIterationCount:()=>Fi,animationName:()=>ji,animationPlayState:()=>Ri,animationTimingFunction:()=>Ni,appearance:()=>oa,backdropFilter:()=>Bi,backfaceVisibility:()=>ki,backgroundAttachment:()=>mi,backgroundClip:()=>hi,backgroundColor:()=>li,backgroundImage:()=>ui,backgroundOrigin:()=>gi,backgroundPosition:()=>fi,backgroundRepeat:()=>di,backgroundSize:()=>pi,bg:()=>cn,bold:()=>vn,border:()=>Nr,borderBottom:()=>Ir,borderBottomColor:()=>Zr,borderBottomLeftRadius:()=>ni,borderBottomRightRadius:()=>ri,borderBottomStyle:()=>qr,borderBottomWidth:()=>Ur,borderCollapse:()=>Zi,borderColor:()=>Br,borderLeft:()=>Lr,borderLeftColor:()=>Qr,borderLeftStyle:()=>Jr,borderLeftWidth:()=>Wr,borderRadius:()=>$r,borderRight:()=>Fr,borderRightColor:()=>Xr,borderRightStyle:()=>Kr,borderRightWidth:()=>Hr,borderSpacing:()=>Qi,borderStyle:()=>zr,borderTop:()=>Pr,borderTopColor:()=>Yr,borderTopLeftRadius:()=>ei,borderTopRightRadius:()=>ti,borderTopStyle:()=>Gr,borderTopWidth:()=>Vr,borderWidth:()=>Rr,bottom:()=>ir,boxShadow:()=>_i,boxSizing:()=>tr,breakAfter:()=>xa,breakBefore:()=>ba,breakInside:()=>Sa,captionSide:()=>$i,center:()=>ur,clip:()=>da,clipPath:()=>fa,color:()=>ln,columnCount:()=>Ta,columnFill:()=>Ea,columnGap:()=>Da,columnRule:()=>Oa,columnRuleColor:()=>ka,columnRuleStyle:()=>Aa,columnRuleWidth:()=>ja,columnSpan:()=>Ma,columnWidth:()=>Na,columns:()=>Pa,contain:()=>ga,content:()=>na,counterIncrement:()=>aa,counterReset:()=>ia,createBreakpoints:()=>sc,createCSSClass:()=>en,createStyleQueries:()=>oc,cursor:()=>Fa,display:()=>an,emptyCells:()=>ea,filter:()=>zi,flex:()=>on,flexBasis:()=>hr,flexDirection:()=>sr,flexGrow:()=>pr,flexShrink:()=>mr,flexWrap:()=>fr,fontFamily:()=>pn,fontSize:()=>dn,fontStretch:()=>xn,fontStyle:()=>yn,fontVariant:()=>bn,fontWeight:()=>fn,gap:()=>dr,grid:()=>sn,gridArea:()=>kr,gridAutoColumns:()=>Ar,gridAutoFlow:()=>Mr,gridAutoRows:()=>jr,gridColumn:()=>Cr,gridColumnEnd:()=>Er,gridColumnStart:()=>Tr,gridRow:()=>wr,gridRowEnd:()=>Or,gridRowStart:()=>Dr,gridTemplateAreas:()=>Sr,gridTemplateColumns:()=>br,gridTemplateRows:()=>xr,height:()=>Xn,isolation:()=>pa,justifyContent:()=>lr,justifyItems:()=>yr,justifySelf:()=>vr,left:()=>ar,letterSpacing:()=>hn,lineHeight:()=>mn,listStyle:()=>qi,listStyleImage:()=>Xi,listStylePosition:()=>Yi,listStyleType:()=>Ji,margin:()=>Wn,marginBottom:()=>qn,marginLeft:()=>Jn,marginRight:()=>Kn,marginTop:()=>Gn,maxHeight:()=>er,maxWidth:()=>Qn,minHeight:()=>$n,minWidth:()=>Zn,mixBlendMode:()=>ma,objectFit:()=>Gi,objectPosition:()=>Ki,opacity:()=>vi,orphans:()=>Ca,outline:()=>ii,outlineColor:()=>si,outlineOffset:()=>ci,outlineStyle:()=>oi,outlineWidth:()=>ai,overflow:()=>Vi,overflowWrap:()=>kn,overflowX:()=>Hi,overflowY:()=>Ui,padding:()=>zn,paddingBottom:()=>Hn,paddingLeft:()=>Un,paddingRight:()=>Vn,paddingTop:()=>Bn,pageBreakAfter:()=>va,pageBreakBefore:()=>_a,pageBreakInside:()=>ya,perspective:()=>Di,perspectiveOrigin:()=>Oi,pointerEvents:()=>ca,position:()=>Rn,quotes:()=>ra,resize:()=>la,right:()=>rr,scrollBehavior:()=>ua,tableLayout:()=>ta,textAlign:()=>gn,textAlignLast:()=>An,textDecoration:()=>_n,textDecorationColor:()=>Nn,textDecorationLine:()=>Mn,textDecorationStyle:()=>Pn,textDecorationThickness:()=>Fn,textIndent:()=>Cn,textJustify:()=>jn,textOverflow:()=>wn,textShadow:()=>Tn,textTransform:()=>Sn,textUnderlineOffset:()=>In,top:()=>nr,transform:()=>wi,transformOrigin:()=>Ti,transformStyle:()=>Ei,transition:()=>yi,transitionDelay:()=>Ci,transitionDuration:()=>xi,transitionProperty:()=>bi,transitionTimingFunction:()=>Si,userSelect:()=>sa,verticalAlign:()=>Ln,visibility:()=>Wi,whiteSpace:()=>En,widows:()=>wa,width:()=>Yn,willChange:()=>ha,wordSpacing:()=>Dn,wordWrap:()=>On,zIndex:()=>or});function lc(){lt();let e=globalThis;e.list=xt,e.update=Vt,e.when=jt,e.on=te,e.scope=zt,e.render=Ht,e.hydrate=Ut;for(let[t,n]of Object.entries(cc))try{e[t]=n}catch{}}lc();export{V as HTML_TAGS,ot as SELF_CLOSING_TAGS,H as SVG_TAGS,Q as StyleBuilder,un as accentColor,_r as alignContent,cr as alignItems,gr as alignSelf,Ai as animation,Pi as animationDelay,Ii as animationDirection,Mi as animationDuration,Li as animationFillMode,Fi as animationIterationCount,ji as animationName,Ri as animationPlayState,Ni as animationTimingFunction,oa as appearance,xe as appendChildren,M as applyAttributes,R as applyNodeModifier,Bi as backdropFilter,ki as backfaceVisibility,mi as backgroundAttachment,hi as backgroundClip,li as backgroundColor,ui as backgroundImage,gi as backgroundOrigin,fi as backgroundPosition,di as backgroundRepeat,pi as backgroundSize,cn as bg,vn as bold,Nr as border,Ir as borderBottom,Zr as borderBottomColor,ni as borderBottomLeftRadius,ri as borderBottomRightRadius,qr as borderBottomStyle,Ur as borderBottomWidth,Zi as borderCollapse,Br as borderColor,Lr as borderLeft,Qr as borderLeftColor,Jr as borderLeftStyle,Wr as borderLeftWidth,$r as borderRadius,Fr as borderRight,Xr as borderRightColor,Kr as borderRightStyle,Hr as borderRightWidth,Qi as borderSpacing,zr as borderStyle,Pr as borderTop,Yr as borderTopColor,ei as borderTopLeftRadius,ti as borderTopRightRadius,Gr as borderTopStyle,Vr as borderTopWidth,Rr as borderWidth,ir as bottom,_i as boxShadow,tr as boxSizing,xa as breakAfter,ba as breakBefore,Sa as breakInside,$i as captionSide,ur as center,da as clip,fa as clipPath,ln as color,Ta as columnCount,Ea as columnFill,Da as columnGap,Oa as columnRule,ka as columnRuleColor,Aa as columnRuleStyle,ja as columnRuleWidth,Ma as columnSpan,Na as columnWidth,Pa as columns,ga as contain,na as content,aa as counterIncrement,ia as counterReset,sc as createBreakpoints,en as createCSSClass,T as createComment,_e as createConditionalComment,et as createHtmlElementWithModifiers,it as createHtmlTagBuilder,oc as createStyleQueries,tt as createSvgElementWithModifiers,at as createSvgTagBuilder,Fa as cursor,an as display,ea as emptyCells,zi as filter,on as flex,hr as flexBasis,sr as flexDirection,pr as flexGrow,mr as flexShrink,fr as flexWrap,pn as fontFamily,dn as fontSize,xn as fontStretch,yn as fontStyle,bn as fontVariant,fn as fontWeight,dr as gap,sn as grid,kr as gridArea,Ar as gridAutoColumns,Mr as gridAutoFlow,jr as gridAutoRows,Cr as gridColumn,Er as gridColumnEnd,Tr as gridColumnStart,wr as gridRow,Or as gridRowEnd,Dr as gridRowStart,Sr as gridTemplateAreas,br as gridTemplateColumns,xr as gridTemplateRows,Xn as height,Ut as hydrate,lc as initializeRuntime,o as isBoolean,u as isBrowser,s as isFunction,r as isNode,i as isObject,n as isPrimitive,a as isTagLike,c as isZeroArityFunction,pa as isolation,lr as justifyContent,yr as justifyItems,vr as justifySelf,ar as left,hn as letterSpacing,mn as lineHeight,xt as list,qi as listStyle,Xi as listStyleImage,Yi as listStylePosition,Ji as listStyleType,Wn as margin,qn as marginBottom,Jn as marginLeft,Kn as marginRight,Gn as marginTop,er as maxHeight,Qn as maxWidth,$n as minHeight,Zn as minWidth,ma as mixBlendMode,Gi as objectFit,Ki as objectPosition,te as on,vi as opacity,Ca as orphans,ii as outline,si as outlineColor,ci as outlineOffset,oi as outlineStyle,ai as outlineWidth,Vi as overflow,kn as overflowWrap,Hi as overflowX,Ui as overflowY,zn as padding,Hn as paddingBottom,Un as paddingLeft,Vn as paddingRight,Bn as paddingTop,va as pageBreakAfter,_a as pageBreakBefore,ya as pageBreakInside,Di as perspective,Oi as perspectiveOrigin,ca as pointerEvents,Rn as position,ra as quotes,lt as registerGlobalTagBuilders,Ht as render,D as replaceNodeSafely,la as resize,rr as right,zt as scope,ua as scrollBehavior,ta as tableLayout,gn as textAlign,An as textAlignLast,_n as textDecoration,Nn as textDecorationColor,Mn as textDecorationLine,Pn as textDecorationStyle,Fn as textDecorationThickness,Cn as textIndent,jn as textJustify,wn as textOverflow,Tn as textShadow,Sn as textTransform,In as textUnderlineOffset,nr as top,wi as transform,Ti as transformOrigin,Ei as transformStyle,yi as transition,Ci as transitionDelay,xi as transitionDuration,bi as transitionProperty,Si as transitionTimingFunction,Vt as update,sa as userSelect,Ln as verticalAlign,Wi as visibility,jt as when,En as whiteSpace,wa as widows,Yn as width,ha as willChange,Dn as wordSpacing,On as wordWrap,or as zIndex};
|
|
1
|
+
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,n,r,i,a){let o=l.get(e);o||(o=new Map,l.set(e,o));let s=o.get(t);s||(s=new Set,o.set(t,s)),s.add({original:n,wrapped:r,options:i,controller:a})}function d(e,t,n){n.controller?n.controller.abort():e.removeEventListener(t,n.wrapped,n.options)}function f(e,t){let n=l.get(e);if(n)if(t){let r=n.get(t);if(r){for(let n of r)d(e,t,n);n.delete(t)}}else{for(let[t,r]of n)for(let n of r)d(e,t,n);l.delete(e)}}function p(e,t,n){return function(r){if(!c||!r||typeof r.addEventListener!=`function`)return;let i=r,a=new AbortController,o=function(n){try{t.call(i,n)}catch(t){s(`Error in '${e}' listener`,t)}},l=typeof n==`boolean`?{capture:n,signal:a.signal}:{...n||{},signal:a.signal};i.addEventListener(e,o,l),u(i,e,t,o,n,a)}}const m=new Set,h=new WeakMap,g=new Set,_=new WeakMap,ee=typeof FinalizationRegistry<`u`?new FinalizationRegistry(e=>{m.delete(e)}):null,te=typeof FinalizationRegistry<`u`?new FinalizationRegistry(e=>{g.delete(e)}):null;function ne(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}),ee?.register(e,r)}function re(e,t){let n=new WeakRef(e);g.add(n),_.set(e,{ref:n,info:t}),te?.register(e,n)}function ie(e){m.delete(e)}function ae(e){g.delete(e)}function oe(e){let t=h.get(e);t&&(m.delete(t.ref),h.delete(e))}function se(e){let t=_.get(e);t&&(g.delete(t.ref),_.delete(e))}const ce=new WeakMap,v=new Set,le=new WeakMap,ue=typeof FinalizationRegistry<`u`?new FinalizationRegistry(e=>{v.delete(e)}):null;function de(e,t){ce.set(e,t);let n=new WeakRef(e);v.add(n),le.set(e,n),ue?.register(e,n)}function y(e){ce.delete(e);let t=le.get(e);t&&(v.delete(t),le.delete(e))}function fe(){let e=[],t=[];for(let n of v){let r=n.deref();r===void 0?t.push(n):e.push(r)}for(let e of t)v.delete(e);return e}function pe(e){return ce.get(e)??null}const me=`http://www.w3.org/2000/svg`;function b(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),se(t),y(t)}else e.nodeType===Node.TEXT_NODE?oe(e):e.nodeType===Node.COMMENT_NODE&&y(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?e.isConnected===!0:!1}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}}const Ee={};let De=!1;function Oe(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)?Ne(e.info):(ae(e.ref),_.delete(n)))}n=n.parentNode}}function ke(){De||typeof document>`u`||typeof document.addEventListener!=`function`||(document.addEventListener(`update`,Oe,!0),De=!0)}function Ae(e){let t=_.get(e);if(t)return t.info;let n={attributeResolvers:new Map};return re(e,n),n}function je(e){return typeof e!=`object`||!e}function Me(e,t){let n;try{n=t.resolver()}catch(t){s(`Failed to resolve reactive attribute: ${e}`,t);return}let r=je(n);if(!(r&&Object.is(n,t.lastValue)))try{t.applyValue(n),t.lastValue=r?n:Ee}catch(t){s(`Failed to apply reactive attribute: ${e}`,t)}}function Ne(e){for(let[t,n]of e.attributeResolvers)Me(t,n)}function T(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:Ee};if(!c){Me(t,i);return}ke(),Ae(e).attributeResolvers.set(t,i),Me(t,i)}function Pe(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)||Ne(i.info)}for(let e of t)ae(e)}function Fe(e){return e}function Ie(e,t,n){let r=Fe(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 Le(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}}function Re(e,t){if(!(!e?.style||!t))for(let n in t)Le(e,n,t[n])||s(`Failed to set style property '${n}'`)}function ze(e,t){e&&(a(t)?T(e,`style`,t,function(t){Re(e,t)}):Re(e,t))}const E=new WeakMap,Be=new WeakSet;function D(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 Ve(e){let t=``;for(let n of e)t&&(t+=` `),t+=n;return t}function He(e){if(!E.has(e)){let t=new Set;e.className&&D(t,e.className),E.set(e,t)}Be.add(e)}function Ue(e){return Be.has(e)}function We(e,t){if(!t)return;let n=E.get(e);n||(n=new Set,E.set(e,n)),D(n,t)}function Ge(e,t){let n=E.get(e);if(!n||n.size===0){e.className=t||``;return}if(!t){e.className=Ve(n);return}let r=Ve(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;D(r,n),D(r,t),e.className=Ve(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&&ne(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)ie(e)}function Ye(e,t,n,r=!1){if(n==null)return;if(t===`style`){ze(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),T(e,String(t),r,function(t){Ge(e,String(t||``))})):T(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`)}}const k=new WeakMap;let A=!1,j=new WeakMap;function M(){return A}function Xe(){A=!0,j=new WeakMap}function Ze(){A=!1}function Qe(e){let t=A;A=!1;try{return e()}finally{A=t}}function N(e){let t=j.get(e);return t===void 0?e.firstChild:t}function P(e,t){j.set(e,t)}function $e(e){return e.nodeType===3&&!/\S/.test(e.textContent||``)}function F(e){let t=N(e),n=!1;for(;t&&$e(t);)t=t.nextSibling,n=!0;n&&P(e,t)}function I(e){let t=N(e);return t&&P(e,t.nextSibling),t}function et(e,t){if(!A)return null;F(e);let n=N(e);return n&&n.nodeType===1&&n.tagName.toLowerCase()===t?I(e):null}function tt(e,t){if(!t)return;let n=N(e);for(;n;){let r=n===t?null:n.nextSibling;e.removeChild(n),n=r}P(e,null)}function nt(e){return n(e)&&!t(e)&&`className`in e&&typeof e.className==`string`&&Object.keys(e).length===1}function rt(e){F(e);let t=N(e);return!!t&&t.nodeType===8&&t.textContent?.trimStart().startsWith(`text-`)===!0}function it(e,t){let n=N(e);if(n&&n.nodeType===3)return I(e),n.textContent!==t&&(n.textContent=t),n;let r=x(t);return r?(e.insertBefore(r,n),P(e,n),r):null}function L(r,i,c){if(i==null)return null;if(a(i)){if(o(i))try{let t=k.get(i);if(t||(t={value:i(),error:!1},k.set(i,t)),t.error)return at(c,()=>``);let n=t.value;if(nt(n))return O(r,{className:()=>{let e=i();return nt(e)?e.className:``}}),null;if(e(n)&&n!=null){if(M()&&rt(r)){let e=r;I(e);let t=String(n),a=it(e,t);return a&&ne(a,{resolver:i,lastValue:t}),null}return at(c,i,n)}return null}catch(e){return k.set(i,{value:void 0,error:!0}),s(`Error evaluating reactive text function:`,e),at(c,()=>``)}let a=i(r,c);return a==null?null:e(a)?ot(c,a):t(a)?a:(n(a)&&O(r,a),null)}let l=i;if(e(l)){if(M()&&rt(r)){let e=r;return I(e),it(e,String(l)),null}return ot(c,l)}return t(l)?l:(O(r,l),null)}function at(e,t,n){let r=ge();if(!r)throw Error(`Failed to create document fragment: document not available`);let i=C(` text-${e} `);i&&r.appendChild(i);let a=qe(t,n);return r.appendChild(a),r}function ot(e,t){let n=ge();if(!n)throw Error(`Failed to create document fragment: document not available`);let r=C(` text-${e} `);r&&n.appendChild(r);let i=x(String(t));return i&&n.appendChild(i),n}function R(e,t,n=0){if(!t||t.length===0)return{element:e,nextIndex:n,appended:0};let r=n,i=0,a=e;for(let n=0;n<t.length;n+=1){let o=t[n];if(o==null)continue;let s=L(e,o,r);s&&(s.parentNode!==a&&a.appendChild(s),r+=1,i+=1)}return{element:e,nextIndex:r,appended:i}}function st(e,t){let n=b(e);return R(n,t,0),n}function ct(e,t){let n=he(me,e);if(!n)throw Error(`Failed to create SVG element: ${e}`);return R(n,t,0),n}function lt(e,...t){return function(n,r=0){let i=n,a=i?et(i,e):null,o=a??b(e),s=o,c=a?s.lastChild:null;return R(o,t,r),a&&tt(s,c),o}}function ut(e,...t){return function(n,r=0){let i=n,a=i?et(i,e):null,o;if(a)o=a;else{let t=he(me,e);if(!t)throw Error(`Failed to create SVG element: ${e}`);o=t}let s=o,c=a?s.lastChild:null;return R(o,t,r),a&&tt(s,c),o}}function dt(e){return(...t)=>lt(e,...t)}function ft(e){return(...t)=>ut(e,...t)}const pt=`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(`.`),z=`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(`.`),mt=[`area`,`base`,`br`,`col`,`embed`,`hr`,`img`,`input`,`link`,`meta`,`source`,`track`,`wbr`];function ht(e,t){t in e&&typeof e[t]!=`function`||(e[t]=dt(t))}function gt(e,t){let n=`${t}Svg`;n in e||(e[n]=ft(t))}function _t(e=globalThis){let t=`__nuclo_tags_registered`;if(!e[t]){for(let t=0;t<z.length;t++)gt(e,z[t]);for(let t=0;t<pt.length;t++)ht(e,pt[t]);e[t]=!0}}function vt(e,t,n){if(a(e)){let i=e(t,n);return i&&r(i)?i:null}return e&&r(e)?e:null}function yt(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 B=new Set,V=new WeakMap,bt=typeof FinalizationRegistry<`u`?new FinalizationRegistry(e=>{B.delete(e)}):null;function xt(e,t){let n=new WeakRef(e);B.add(n),V.set(e,t),bt?.register(e,n)}function St(e){return Array.isArray(e)?e:Array.from(e)}function Ct(e,t,n){return vt(e.renderItem(t,n),e.host,n)}function wt(e){S(e.element);let t=e;t.element=null,t.item=null}function Tt(e){let{host:t,startMarker:n,endMarker:r}=e,i=n.parentNode??t,a=St(e.itemsProvider());if(yt(e.lastSyncedItems,a))return;let o=new Map,s=new Map;for(let t=0;t<e.records.length;t++){let n=e.records[t],r=s.get(n.item);r?r.push(n):s.set(n.item,[n])}for(let t=0;t<a.length;t++){let n=a[t];if(t<e.lastSyncedItems.length&&e.lastSyncedItems[t]===n){let r=e.records[t];if(r&&r.item===n){o.set(t,r);let e=s.get(n);e.splice(e.indexOf(r),1),e.length===0&&s.delete(n)}}}let c=Array(a.length),l=new Set(e.records);for(let t=a.length-1;t>=0;t--){let n=a[t],r=o.get(t);if(!r){let e=s.get(n);e&&e.length>0&&(r=e.shift(),e.length===0&&s.delete(n))}if(r)l.delete(r);else{let i=Ct(e,n,t);if(!i){c[t]=null;continue}r={item:n,element:i}}c[t]=r}for(let e of l)wt(e);let u=r;for(let e=a.length-1;e>=0;e--){let t=c[e];if(!t)continue;let n=t.element;n.nextSibling!==u&&i.insertBefore(n,u),u=n}e.records=c.filter(e=>e!==null),e.lastSyncedItems=a.slice(),c.length===0&&(e.records=[],e.lastSyncedItems=[])}function Et(e,t,n,r){return M()?Dt(e,t,n,r):H(e,t,n,r)}function H(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),Tt(o),c&&xt(i,o),o}function Dt(e,t,n,r){let i=n;F(i);let a=N(i);if(!a||a.nodeType!==8||!a.textContent?.startsWith(`list-start-`))return H(e,t,n,r);let o=I(i),s=0,l=N(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 H(e,t,n,r);let d=St(e()),f=[];for(let e=0;e<d.length;e++){let r=vt(t(d[e],e),n,e);r&&f.push({item:d[e],element:r})}let p=N(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}P(i,u.nextSibling);let h={itemsProvider:e,renderItem:t,startMarker:o,endMarker:u,records:f,host:n,lastSyncedItems:d.slice()};return c&&xt(o,h),h}function Ot(e){for(let t=0;t<e.records.length;t++){let n=e.records[t];n.element=null,n.item=null}e.records=[]}function kt(e){let t=[];for(let n of B){let r=n.deref();if(!r){t.push(n);continue}let i=V.get(r);if(!i){t.push(n);continue}if(!w(r)||!w(i.endMarker)){Ot(i),V.delete(r),t.push(n);continue}e&&!e.contains(r)||Tt(i)}for(let e of t)B.delete(e)}function At(e,t){return function(n,r){return Et(e,t,n,r).startMarker}}function jt(e,t){try{return e()}catch(e){if(t)return t(e),!1;throw e}}function Mt(e,t){return typeof e==`function`?jt(e,t):!!e}function Nt(e,t,n,r){return a(e)?o(e)?(k.delete(e),L(t,e,n)):Ie(t,r,()=>{let r=L(t,e,n);return r&&!r.parentNode?r:null}):L(t,e,n)}function Pt(e,t,n,r){let i=[];for(let a of e){let e=Nt(a,t,n,r);e&&i.push(e)}return i}const U=new Set,W=new WeakMap,Ft=typeof FinalizationRegistry<`u`?new FinalizationRegistry(e=>{U.delete(e)}):null;function It(e,t){for(let t=0;t<e.length;t++)if(Mt(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&&(Se(e.startMarker,e.endMarker),e.activeIndex=o,o!==null&&Ce(Pt(o>=0?t[o].content:n,r,i,a),a))}function Rt(e){let t=new WeakRef(e.startMarker);U.add(t),W.set(e.startMarker,e),Ft?.register(e.startMarker,t)}function zt(e){let t=[];for(let n of U){let r=n.deref();if(r===void 0){t.push(n);continue}let i=W.get(r);if(!i){t.push(n);continue}if(!w(r)||!w(i.endMarker)){W.delete(r),t.push(n);continue}if(!(e&&!e.contains(r)))try{i.update()}catch{W.delete(r),t.push(n)}}for(let e of t)U.delete(e)}function Bt(e,t){return`when-start-${e}-b${t===null?`n`:t}`}function Vt(e){let t=/-b(n|-?\d+)$/.exec(e||``);if(t)return t[1]===`n`?null:parseInt(t[1],10)}var Ht=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?M()?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=Fe(e);return a.appendChild(n),a.appendChild(r),Lt(i),n.textContent=Bt(t,i.activeIndex),n}hydrateRender(e,t){let n=e;F(n);let r=N(n);if(!r||r.nodeType!==8||!r.textContent?.startsWith(`when-start-`))return this.freshRender(e,t);let i=I(n),a=0,o=N(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=It(this.groups,this.elseContent),u=Vt(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)L(e,r,t)}}else if(Se(i,s),l!==null){let n=l>=0?this.groups[l].content:this.elseContent,r=s;Qe(()=>{Ce(Pt(n,e,t,r),r)})}return P(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 G(e){return Object.assign(function(t,n){return e.render(t,n)},{when:function(t,...n){return G(e.cloneWith({condition:t,content:n}))},else:function(...t){return G(e.cloneWith(void 0,t))}})}function Ut(e,...t){return G(new Ht(e,...t))}function Wt(e){try{return e.isSvg?ct(e.tagName,e.modifiers):st(e.tagName,e.modifiers)}catch(t){if(s(`Error applying modifiers in conditional element "${e.tagName}"`,t),e.isSvg){let n=he(me,e.tagName);if(!n)throw Error(`Failed to create SVG element: ${e.tagName}`,{cause:t});return n}let n=b(e.tagName);if(!n)throw Error(`Failed to create element: ${e.tagName}`,{cause:t});return n}}function Gt(e){let t=pe(e);if(!t)return;let n=jt(t.condition,e=>{s(`Error evaluating conditional condition`,e)}),r=e.nodeType===Node.ELEMENT_NODE;if(n&&!r){let n=Wt(t);de(n,t),Te(e,n)}else if(!n&&r){let n=be(t.tagName);n&&(de(n,t),Te(e,n))}}function Kt(e){if(c)try{let t=fe();for(let n of t){if(!n.isConnected){y(n);continue}e&&!e.contains(n)||Gt(n)}}catch(e){s(`Error during conditional elements update`,e)}}function qt(){if(typeof document>`u`)return;let e=document.body?[document.body,document]:[document];for(let t of e)try{t.dispatchEvent(new Event(`update`,{bubbles:!0}))}catch(e){s(`Error dispatching global update event`,e)}}const K=new Map;function Jt(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 Yt(e,t){let n=K.get(e);n||(n=new Set,K.set(e,n)),n.add(new WeakRef(t))}function Xt(e){let t=Jt(e);if(t.length===0)return[];let n=new Set;for(let e of t){let t=K.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&&K.delete(e)}return Array.from(n)}function Zt(...e){let t=Jt(e);return function(e){if(c&&e instanceof Element)for(let n of t)Yt(n,e)}}const Qt=[kt,zt,Kt,Pe,Je,qt];function $t(...e){let t;if(e.length>0){let n=Xt(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 Qt)e(t)}function en(e,t,n=0){let r=e(t||document.body,n);return(t||document.body).appendChild(r),r}function tn(e,t){let n=t||document.body,r=n;Xe();try{let t=e(n,0),i=t;if(i&&i.nodeType===1&&i.parentNode!==r){let e=N(r);if(e){let t=e.nextSibling;r.insertBefore(i,e),S(e),P(r,t)}else r.appendChild(i),P(r,null)}return t}finally{Ze()}}let nn=null;function rn(e){nn=e}const an=new Map,on=new Map,sn=new Set,q=[],J=new Map;let Y=null,X=null,Z=0;const Q=new Map;function cn(e){for(let t of e)J.has(t)||J.set(t,[])}function ln(e,t){try{let n=e.cssRules.length;e.insertRule(t+`{}`,n);let r=e.cssRules[n];return Q.set(t,r),r}catch{return null}}function un(e,t){try{e.insertRule(t,Z),Z++}catch{}}function dn(){if(typeof document>`u`||typeof document.getElementById!=`function`)return null;if(Y&&X===document&&Y.ownerNode&&Y.ownerNode.isConnected)return Y;let e=document.getElementById(`nuclo-styles`);if(e||(e=document.createElement(`style`),e.id=`nuclo-styles`,document.head.appendChild(e)),Y=e.sheet,X=document,Q.clear(),Z=0,!Y)return null;for(let e of q)un(Y,e);for(let[e,t]of J){let n=ln(Y,e);if(n)for(let e of t)try{n.insertRule(e,n.cssRules.length)}catch{}}return Y}function fn(e,t){if(t===void 0)q.push(e);else{let n=J.get(t);n||(n=[],J.set(t,n)),n.push(e)}nn?.(t===void 0?e:t+`{`+e+`}`);let n=dn();if(n)if(t===void 0)un(n,e);else{let r=Q.get(t)??ln(n,t);if(r)try{r.insertRule(e,r.cssRules.length)}catch{}}}function pn(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 $(e,t,n,r){let i=(e??``)+`|`+t+`|`+n+`:`+r,a=an.get(i);return a===void 0?(a=`n`+pn(i),an.set(i,a),on.set(a,(e??``)+`|`+t+`|`+n),fn(`.`+a+t+`{`+n+`:`+r+`}`,e),a):(dn(),a)}function mn(e){return on.get(e)}function hn(e,t){if(sn.has(e)){dn();return}sn.add(e),fn(t,void 0)}function gn(){let e=q.join(``);for(let[t,n]of J)n.length>0&&(e+=t+`{`+n.join(``)+`}`);return e}function _n(){an.clear(),on.clear(),sn.clear(),q.length=0,J.clear(),Q.clear(),Z=0,Y=null,X=null,typeof document<`u`&&document.getElementById(`nuclo-styles`)?.remove()}const vn={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`},yn={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`]},bn={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`}},xn={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`},Sn=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`]),Cn=new Map;function wn(e){let t=Cn.get(e);return t===void 0&&(t=e.replace(/[A-Z]/g,e=>`-`+e.toLowerCase()),Cn.set(e,t)),t}function Tn(e){return e.charCodeAt(0)===64?e:`@media `+e}function En(e,t){return e!==void 0&&e.startsWith(`@media`)&&t.startsWith(`@media`)?e+` and`+t.slice(6):t}function Dn(e){let t={className:e};return Object.defineProperty(t,"toString",{value:()=>e,enumerable:!1}),t}function On(...e){let t=new Map;for(let n of e){if(!n)continue;let e=(typeof n==`string`?n:n.className).split(` `);for(let n of e)n&&t.set(mn(n)??n,n)}let n=``;for(let e of t.values())n+=(n?` `:``)+e;return Dn(n)}function kn(e={}){let t=e.screens??{};cn(Object.values(t).map(Tn));let n=new WeakMap;function r(t,n){if(typeof n==`number`)return n===0||Sn.has(t)?String(n):n+`px`;let r=xn[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($(n,a,t,r(t,e[t])));continue}let e=vn[s];if(e!==void 0){i(c,n,a+e,o);continue}let l=t[s];if(l!==void 0){i(c,En(n,Tn(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,En(n,s),a,o);continue}continue}if(c===!0){let e=bn[s];if(e)for(let t in e)o.push($(n,a,t,e[t]));continue}let l=yn[s];if(l!==void 0)for(let e of l)o.push($(n,a,e,r(e,c)));else{let e=wn(s);o.push($(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=Dn(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=bn[t];if(e)for(let t in e)n(t,e[t]);continue}let a=yn[t];if(a!==void 0)for(let e of a)n(e,r(e,i));else{let e=wn(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`+pn(t);return hn(n,`@keyframes `+n+`{`+t+`}`),n}function c(e,t){let n=e+`{`+o(t)+`}`;hn(`g|`+n,n)}return{css:a,cx:On,keyframes:s,globalStyle:c,theme:e}}const An=kn({}),jn=An.css,Mn=An.keyframes,Nn=An.globalStyle;function Pn(){_t();let e=globalThis;e.list=At,e.update=$t,e.when=Ut,e.on=p,e.scope=Zt,e.render=en,e.hydrate=tn,e.createCss=kn,e.css=jn,e.cx=On,e.keyframes=Mn,e.globalStyle=Nn}Pn();export{pt as HTML_TAGS,mt as SELF_CLOSING_TAGS,z as SVG_TAGS,we as appendChildren,O as applyAttributes,L as applyNodeModifier,C as createComment,be as createConditionalComment,kn as createCss,st as createHtmlElementWithModifiers,dt as createHtmlTagBuilder,ct as createSvgElementWithModifiers,ft as createSvgTagBuilder,jn as css,On as cx,gn as getCssText,Nn as globalStyle,tn as hydrate,Pn as initializeRuntime,i as isBoolean,c as isBrowser,a as isFunction,t as isNode,n as isObject,e as isPrimitive,r as isTagLike,o as isZeroArityFunction,Mn as keyframes,At as list,p as on,_t as registerGlobalTagBuilders,en as render,Te as replaceNodeSafely,_n as resetStyles,Zt as scope,rn as setSSRCollector,$t as update,Ut as when};
|
|
2
2
|
//# sourceMappingURL=nuclo.mjs.map
|