@jasonshimmy/custom-elements-runtime 1.0.10 → 1.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +93 -5
- package/dist/custom-elements-runtime.cjs.js +19 -19
- package/dist/custom-elements-runtime.cjs.js.map +1 -1
- package/dist/custom-elements-runtime.es.js +2816 -1938
- package/dist/custom-elements-runtime.es.js.map +1 -1
- package/dist/custom-elements-runtime.umd.js +18 -18
- package/dist/custom-elements-runtime.umd.js.map +1 -1
- package/dist/index.d.ts +2 -1
- package/dist/runtime/component.d.ts +10 -10
- package/dist/runtime/event-manager.d.ts +9 -23
- package/dist/runtime/helpers.d.ts +4 -0
- package/dist/runtime/hooks.d.ts +28 -2
- package/dist/runtime/reactive.d.ts +1 -4
- package/dist/runtime/scheduler.d.ts +0 -4
- package/dist/runtime/style.d.ts +1 -1
- package/dist/runtime/transition-utils.d.ts +12 -0
- package/dist/runtime/types.d.ts +2 -0
- package/dist/runtime/vdom-model-helpers.d.ts +28 -0
- package/dist/runtime/vdom.d.ts +1 -1
- package/dist/transitions.d.ts +240 -0
- package/package.json +1 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(j,be){typeof exports=="object"&&typeof module<"u"?be(exports):typeof define=="function"&&define.amd?define(["exports"],be):(j=typeof globalThis<"u"?globalThis:j||self,be(j.CustomElementsRuntime={}))})(this,(function(j){"use strict";const be=typeof process<"u"&&process.env?.NODE_ENV!=="production";function I(e,...t){be&&console.error(e,...t)}function ne(e,...t){be&&console.warn(e,...t)}class Vt{pendingUpdates=new Map;isFlushScheduled=!1;schedule(t,r){const n=r||t;this.pendingUpdates.set(n,t),this.isFlushScheduled||(this.isFlushScheduled=!0,typeof globalThis.process<"u"&&globalThis.process.env?.NODE_ENV==="test"||typeof window<"u"&&(window.__vitest__||window.Cypress)?this.flush():queueMicrotask(()=>this.flush()))}flush(){const t=this.pendingUpdates;this.pendingUpdates=new Map,this.isFlushScheduled=!1;for(const r of t.values())try{r()}catch(n){I("Error in batched update:",n)}}get pendingCount(){return this.pendingUpdates.size}}const qt=new Vt;function we(e,t){qt.schedule(e,t)}const vt=new WeakSet;class Gt{static cache=new WeakMap;static arrayHandlerCache=new WeakMap;static objectHandlerCache=new WeakMap;static getOrCreateProxy(t,r,n=!1){const i=this.cache.get(t);if(i)return i;const o=n?this.getOrCreateArrayHandler(r):this.getOrCreateObjectHandler(r),s=new Proxy(t,o);try{kt.markAsProxy(s)}catch{}return this.cache.set(t,s),s}static getOrCreateArrayHandler(t){if(!this.arrayHandlerCache.has(t)){const r={get:(n,i,o)=>{const s=Reflect.get(n,i,o);return typeof s=="function"&&typeof i=="string"&&["push","pop","shift","unshift","splice","sort","reverse","fill","copyWithin"].includes(i)?function(...a){const d=s.apply(n,a);return t.triggerUpdate(),d}:s},set:(n,i,o)=>(n[i]=t.makeReactiveValue(o),t.triggerUpdate(),!0),deleteProperty:(n,i)=>(delete n[i],t.triggerUpdate(),!0)};this.arrayHandlerCache.set(t,r)}return this.arrayHandlerCache.get(t)}static getOrCreateObjectHandler(t){if(!this.objectHandlerCache.has(t)){const r={get:(n,i,o)=>Reflect.get(n,i,o),set:(n,i,o)=>(n[i]=t.makeReactiveValue(o),t.triggerUpdate(),!0),deleteProperty:(n,i)=>(delete n[i],t.triggerUpdate(),!0)};this.objectHandlerCache.set(t,r)}return this.objectHandlerCache.get(t)}static hasProxy(t){return this.cache.has(t)}static clear(){this.cache=new WeakMap,this.arrayHandlerCache=new WeakMap,this.objectHandlerCache=new WeakMap}static getStats(){return{hasCachedProxies:this.cache instanceof WeakMap}}}class kt{static contextCache=new WeakMap;static createReactiveProxy(t,r,n){try{if(vt.has(t))return t}catch{}const i=Array.isArray(t);let o=this.contextCache.get(r);o||(o=new WeakMap,this.contextCache.set(r,o));let s=o.get(n);return s||(s={triggerUpdate:r,makeReactiveValue:n},o.set(n,s)),Gt.getOrCreateProxy(t,s,i)}static markAsProxy(t){if(t)try{vt.add(t)}catch{}}}class Zt{currentComponent=null;componentData=new Map;stateStorage=new Map;trackingDisabled=!1;setCurrentComponent(t,r){if(this.currentComponent=t,!this.componentData.has(t))this.componentData.set(t,{dependencies:new Set,renderFn:r,stateIndex:0,lastWarnTime:0});else{const n=this.componentData.get(t);n.renderFn=r,n.stateIndex=0}}clearCurrentComponent(){this.currentComponent=null}disableTracking(){this.trackingDisabled=!0}enableTracking(){this.trackingDisabled=!1}isRenderingComponent(){return this.currentComponent!==null}shouldEmitRenderWarning(){if(!this.currentComponent)return!0;const t=this.componentData.get(this.currentComponent);if(!t)return!0;const r=Date.now();return r-t.lastWarnTime<1e3?!1:(t.lastWarnTime=r,!0)}withoutTracking(t){const r=this.trackingDisabled;this.trackingDisabled=!0;try{return t()}finally{this.trackingDisabled=r}}getOrCreateState(t){if(!this.currentComponent)return new He(t);const r=this.componentData.get(this.currentComponent);if(!r)return new He(t);const n=`${this.currentComponent}:${r.stateIndex++}`;let i=this.stateStorage.get(n);return i||(i=new He(t),this.stateStorage.set(n,i)),i}trackDependency(t){if(this.trackingDisabled||!this.currentComponent)return;const r=this.componentData.get(this.currentComponent);r&&(r.dependencies.add(t),t.addDependent(this.currentComponent))}triggerUpdate(t){const r=t.getDependents();for(const n of r){const i=this.componentData.get(n);i&&we(i.renderFn,n)}}cleanup(t){const r=this.componentData.get(t);if(r){for(const i of r.dependencies)i.removeDependent(t);this.componentData.delete(t)}const n=t+":";for(const i of this.stateStorage.keys())i.startsWith(n)&&this.stateStorage.delete(i)}}const Q=new Zt;class He{_value;dependents=new Set;constructor(t){this._value=this.makeReactive(t);try{const r=Symbol.for("@cer/ReactiveState");Object.defineProperty(this,r,{value:!0,enumerable:!1,configurable:!1})}catch{}}get value(){return Q.trackDependency(this),this._value}set value(t){Q.isRenderingComponent()&&Q.shouldEmitRenderWarning()&&ne(`🚨 State modification detected during render! This can cause infinite loops.
|
|
2
2
|
• Move state updates to event handlers
|
|
3
3
|
• Use useEffect/watch for side effects
|
|
4
|
-
• Ensure computed properties don't modify state`),this._value=this.makeReactive(t),K.triggerUpdate(this)}addDependent(t){this.dependents.add(t)}removeDependent(t){this.dependents.delete(t)}getDependents(){return this.dependents}makeReactive(t){return t===null||typeof t!="object"||t instanceof Node||t instanceof Element||t instanceof HTMLElement?t:tt.createReactiveProxy(t,()=>K.triggerUpdate(this),r=>this.makeReactive(r))}}function Et(e){return K.getOrCreateState(e===void 0?null:e)}function ee(e){if(!e||typeof e!="object")return!1;try{const t=Symbol.for("@cer/ReactiveState");if(e[t])return!0}catch{}try{return!!(e.constructor&&e.constructor.name==="ReactiveState")}catch{return!1}}function St(e){const t=new De(e());return{get value(){return K.trackDependency(t),e()}}}function At(e,t,r={}){let n=e();r.immediate&&t(n,n);const i=`watch-${Math.random().toString(36).substr(2,9)}`,s=()=>{K.setCurrentComponent(i,s);const o=e();K.clearCurrentComponent(),o!==n&&(t(o,n),n=o)};return K.setCurrentComponent(i,s),e(),K.clearCurrentComponent(),()=>{K.cleanup(i)}}const _e=new Map,Ee=new Map,Se=new Map,Ie=500;function ne(e){if(_e.has(e))return _e.get(e);const t=e.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase();return _e.size<Ie&&_e.set(e,t),t}function rt(e){if(Ee.has(e))return Ee.get(e);const t=e.replace(/-([a-z])/g,(r,n)=>n.toUpperCase());return Ee.size<Ie&&Ee.set(e,t),t}function ye(e){if(typeof e=="string"){if(Se.has(e))return Se.get(e);const t=e.replace(/[&<>"']/g,r=>({"&":"&","<":"<",">":">",'"':""","'":"'"})[r]);return t!==e&&Se.size<Ie&&Se.set(e,t),t}return e}function B(e,t){if(typeof t=="string"){const r=t.split(".").reduce((n,i)=>n?.[i],e);return ee(r)?r.value:r}return t}function Ae(e,t,r){const n=String(t).split("."),i=n.pop();if(!i)return;const s=n.reduce((o,c)=>(o[c]==null&&(o[c]={}),o[c]),e);ee(s[i])?s[i].value=r:s[i]=r}const nt=typeof process<"u"&&process.env?.NODE_ENV!=="production";function oe(e,...t){nt&&console.error(e,...t)}function Ne(e,...t){nt&&console.warn(e,...t)}function jt(e,t,r){if(r)for(const[n,i]of Object.entries(r)){let s,o={};if(Array.isArray(i)?(s=i[0],o=i[1]||{}):s=i,t.set(n,{callback:s,options:o,oldValue:B(e,n)}),o.immediate)try{const c=B(e,n);s(c,void 0,e)}catch(c){oe(`Error in immediate watcher for "${n}":`,c)}}}function Ot(e,t,r,n){const i=(o,c)=>{if(o===c)return!0;if(typeof o!=typeof c||typeof o!="object"||o===null||c===null)return!1;if(Array.isArray(o)&&Array.isArray(c))return o.length!==c.length?!1:o.every((h,v)=>i(h,c[v]));const a=Object.keys(o),p=Object.keys(c);return a.length!==p.length?!1:a.every(h=>i(o[h],c[h]))},s=t.get(r);if(s&&!i(n,s.oldValue))try{s.callback(n,s.oldValue,e),s.oldValue=n}catch(o){oe(`Error in watcher for "${r}":`,o)}for(const[o,c]of t.entries())if(c.options.deep&&r.startsWith(o+"."))try{const a=B(e,o);i(a,c.oldValue)||(c.callback(a,c.oldValue,e),c.oldValue=a)}catch(a){oe(`Error in deep watcher for "${o}":`,a)}}function it(e,t){return t===Boolean?e==="true":t===Number?Number(e):e}function Tt(e,t,r){t&&Object.entries(t).forEach(([n,i])=>{const s=ne(n),o=e.getAttribute(s);if(i.type===Function&&typeof e[n]=="function")r[n]=e[n];else if(typeof e[n]<"u")try{const c=e[n];i.type===Boolean&&typeof c=="boolean"||i.type===Number&&typeof c=="number"||i.type===Function&&typeof c=="function"?r[n]=c:r[n]=it(String(c),i.type)}catch{r[n]=e[n]}else o!==null?r[n]=it(o,i.type):"default"in i&&i.default!==void 0&&(r[n]=i.default)})}function Rt(e,t,r){t.props&&Tt(e,t.props,r)}function Pt(e,t,r,n){e.onConnected&&!r&&(e.onConnected(t),n(!0))}function Lt(e,t,r,n,i,s,o,c){e.onDisconnected&&e.onDisconnected(t),r.forEach(a=>a()),n(),i(),s(!1),o(null),c(!1)}function Mt(e,t,r,n,i){e.onAttributeChanged&&e.onAttributeChanged(t,r,n,i)}class Wt{static cache=new Map;static maxCacheSize=1e3;static dangerousPatterns=[/constructor/i,/prototype/i,/__proto__/i,/function/i,/eval/i,/import/i,/require/i,/window/i,/document/i,/global/i,/process/i,/setTimeout/i,/setInterval/i,/fetch/i,/XMLHttpRequest/i];static evaluate(t,r){const n=this.cache.get(t);if(n){if(!n.isSecure){Ne("Blocked cached dangerous expression:",t);return}return n.evaluator(r)}const i=this.createEvaluator(t);if(this.cache.size>=this.maxCacheSize){const s=this.cache.keys().next().value;s&&this.cache.delete(s)}if(this.cache.set(t,i),!i.isSecure){Ne("Blocked dangerous expression:",t);return}return i.evaluator(r)}static createEvaluator(t){if(this.hasDangerousPatterns(t))return{evaluator:()=>{},isSecure:!1};if(t.length>1e3)return{evaluator:()=>{},isSecure:!1};try{return{evaluator:this.createSafeEvaluator(t),isSecure:!0}}catch(r){return Ne("Failed to create evaluator for expression:",t,r),{evaluator:()=>{},isSecure:!1}}}static hasDangerousPatterns(t){return this.dangerousPatterns.some(r=>r.test(t))}static createSafeEvaluator(t){if(t.trim().startsWith("{")&&t.trim().endsWith("}"))return this.createObjectEvaluator(t);if(/^ctx\.[a-zA-Z0-9_\.]+$/.test(t.trim())){const r=t.trim().slice(4);return n=>B(n,r)}return t.includes("ctx")||/[+\-*/%<>=&|?:\[\]]/.test(t)?this.createSimpleEvaluator(t):r=>B(r,t)}static createObjectEvaluator(t){const r=t.trim().slice(1,-1),n=this.parseObjectProperties(r);return i=>{const s={};for(const{key:o,value:c}of n)try{if(c.startsWith("ctx.")){const a=c.slice(4);s[o]=B(i,a)}else s[o]=this.evaluateSimpleValue(c,i)}catch{s[o]=void 0}return s}}static parseObjectProperties(t){const r=[],n=t.split(",");for(const i of n){const s=i.indexOf(":");if(s===-1)continue;const o=i.slice(0,s).trim(),c=i.slice(s+1).trim(),a=o.replace(/^['"]|['"]$/g,"");r.push({key:a,value:c})}return r}static createSimpleEvaluator(t){return r=>{try{let n=t;const i=[];n=n.replace(/("[^"\\]*(?:\\.[^"\\]*)*"|'[^'\\]*(?:\\.[^'\\]*)*')/g,v=>`<<#${i.push(v)-1}#>>`);const s=n.match(/ctx\.[\w.]+/g)||[];for(const v of s){const m=v.slice(4),d=B(r,m);if(d===void 0)return;const u=i.push(JSON.stringify(d))-1;n=n.replace(new RegExp(v.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),"g"),`<<#${u}#>>`)}const o=/\b[a-zA-Z_][a-zA-Z0-9_]*(?:\.[a-zA-Z_][a-zA-Z0-9_]*)+\b/g,c=n.match(o)||[];for(const v of c){if(v.startsWith("ctx."))continue;const m=B(r,v);if(m===void 0)return;const d=i.push(JSON.stringify(m))-1;n=n.replace(new RegExp(v.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),"g"),`<<#${d}#>>`)}const a=/\b([a-zA-Z_][a-zA-Z0-9_]*)\b/g;let p;const h=new Set;for(;(p=a.exec(n))!==null;){const v=p[1];if(["true","false","null","undefined"].includes(v)||/^[0-9]+$/.test(v)||v==="ctx"||h.has(v))continue;h.add(v);const m=B(r,v);if(m===void 0)return;const d=JSON.stringify(m),u=i.push(d)-1;v.includes(".")?n=n.replace(new RegExp(v.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),"g"),`<<#${u}#>>`):n=n.replace(new RegExp("\\b"+v.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")+"\\b","g"),`<<#${u}#>>`)}n=n.replace(/<<#(\d+)#>>/g,(v,m)=>i[Number(m)]);try{return this.evaluateBasicExpression(n)}catch{return}}catch{return}}}static evaluateBasicExpression(t){const r=this.tokenize(t);let n=0;function i(){return r[n]}function s(l){const f=r[n++];if(l&&!f)throw new Error(`Unexpected token EOF, expected ${l}`);if(l&&f&&f.type!==l&&f.value!==l)throw new Error(`Unexpected token ${f.type}/${f.value}, expected ${l}`);return f}function o(){return c()}function c(){let l=a();if(i()&&i().value==="?"){s("?");const f=o();s(":");const b=o();return l?f:b}return l}function a(){let l=p();for(;i()&&i().value==="||";){s("OP");const f=p();l=l||f}return l}function p(){let l=h();for(;i()&&i().value==="&&";){s("OP");const f=h();l=l&&f}return l}function h(){let l=v();for(;i()&&["==","!=","===","!=="].includes(i().value);){const f=s("OP").value,b=v();switch(f){case"==":l=l==b;break;case"!=":l=l!=b;break;case"===":l=l===b;break;case"!==":l=l!==b;break}}return l}function v(){let l=m();for(;i()&&[">","<",">=","<="].includes(i().value);){const f=s("OP").value,b=m();switch(f){case">":l=l>b;break;case"<":l=l<b;break;case">=":l=l>=b;break;case"<=":l=l<=b;break}}return l}function m(){let l=d();for(;i()&&(i().value==="+"||i().value==="-");){const f=s("OP").value,b=d();l=f==="+"?l+b:l-b}return l}function d(){let l=u();for(;i()&&(i().value==="*"||i().value==="/"||i().value==="%");){const f=s("OP").value,b=u();switch(f){case"*":l=l*b;break;case"/":l=l/b;break;case"%":l=l%b;break}}return l}function u(){return i()&&i().value==="!"?(s("OP"),!u()):i()&&i().value==="-"?(s("OP"),-u()):y()}function y(){const l=i();if(l){if(l.type==="NUMBER")return s("NUMBER"),Number(l.value);if(l.type==="STRING")return s("STRING"),l.value.slice(1,-1);if(l.type==="IDENT")return s("IDENT"),l.value==="true"?!0:l.value==="false"?!1:l.value==="null"?null:void 0;if(l.value==="["){s("PUNC");const f=[];for(;i()&&i().value!=="]";)f.push(o()),i()&&i().value===","&&s("PUNC");return s("PUNC"),f}if(l.value==="("){s("PUNC");const f=o();return s("PUNC"),f}throw new Error("Unexpected token in expression")}}return o()}static tokenize(t){const r=[],n=/\s*(=>|===|!==|==|!=|>=|<=|\|\||&&|[()?:,\[\]]|\+|-|\*|\/|%|>|<|!|\d+\.?\d*|"[^"]*"|'[^']*'|[a-zA-Z_][a-zA-Z0-9_]*|\S)\s*/g;let i;for(;(i=n.exec(t))!==null;){const s=i[1];s&&(/^\d/.test(s)?r.push({type:"NUMBER",value:s}):/^"/.test(s)||/^'/.test(s)?r.push({type:"STRING",value:s}):/^[a-zA-Z_]/.test(s)?r.push({type:"IDENT",value:s}):/^[()?:,\[\]]$/.test(s)?r.push({type:"PUNC",value:s}):r.push({type:"OP",value:s}))}return r}static evaluateSimpleValue(t,r){if(t==="true")return!0;if(t==="false")return!1;if(!isNaN(Number(t)))return Number(t);if(t.startsWith("ctx.")){const n=t.slice(4);return B(r,n)}return t.startsWith('"')&&t.endsWith('"')||t.startsWith("'")&&t.endsWith("'")?t.slice(1,-1):t}static clearCache(){this.cache.clear()}static getCacheSize(){return this.cache.size}}class ae{static cleanupFunctions=new WeakMap;static addListener(t,r,n,i){t.addEventListener(r,n,i);const o={event:r,handler:n,options:i,cleanup:()=>t.removeEventListener(r,n,i),addedAt:Date.now()};this.cleanupFunctions.has(t)||this.cleanupFunctions.set(t,[]);const c=this.cleanupFunctions.get(t);c.push(o),this.cleanupFunctions.get(t).__metaList=c}static removeListener(t,r,n,i){t.removeEventListener(r,n,i);const s=this.cleanupFunctions.get(t);if(s){const o=s.__metaList||null;if(o){const c=o.findIndex(a=>a.event===r&&a.handler===n&&JSON.stringify(a.options)===JSON.stringify(i));if(c>=0){try{o[c].cleanup()}catch{}o.splice(c,1)}o.length===0&&this.cleanupFunctions.delete(t)}else{const c=s.findIndex(()=>!0);c>=0&&(s.splice(c,1),s.length===0&&this.cleanupFunctions.delete(t))}}}static cleanup(t){const r=this.cleanupFunctions.get(t);r&&((r.__metaList||r).forEach(i=>{try{typeof i=="function"?i():i&&typeof i.cleanup=="function"&&i.cleanup()}catch(s){console.error("Error during event cleanup:",s)}}),this.cleanupFunctions.delete(t))}static cleanupAll(){try{this.cleanupFunctions=new WeakMap}catch(t){console.error("Error during global cleanup:",t)}}static hasListeners(t){const r=this.cleanupFunctions.get(t),n=r?r.__metaList||r:void 0;return!!(n&&n.length>0)}static getListenerCount(t){const r=this.cleanupFunctions.get(t),n=r?r.__metaList||r:void 0;return n?n.length:0}}function ue(e,t){if(t&&e instanceof HTMLElement){ae.cleanup(e);for(const r in t)t[r]===e&&delete t[r];for(const r of Array.from(e.childNodes))ue(r,t)}}function be(e,t,r){if(typeof e=="string")return;const n=e.props?.reactiveRef??(e.props?.props&&e.props.props.reactiveRef),i=e.props?.ref??(e.props?.props&&e.props.props.ref);n?n.value=t:i&&r&&(r[i]=t)}function Dt(e,t,r,n,i,s,o,c){if(!s)return;const a=t.includes("lazy"),p=t.includes("trim"),h=t.includes("number"),v=e&&typeof e=="object"&&"value"in e&&typeof e.value<"u",m=()=>{if(v){const k=e.value;return c&&typeof k=="object"&&k!==null?k[c]:k}return B(s._state||s,e)},d=m();let u="text";o instanceof HTMLInputElement?u=n?.type||o.type||"text":o instanceof HTMLSelectElement?u="select":o instanceof HTMLTextAreaElement&&(u="textarea");const y=o instanceof HTMLInputElement||o instanceof HTMLTextAreaElement||o instanceof HTMLSelectElement,l=y?u==="checkbox"||u==="radio"?"checked":"value":c??"modelValue";if(u==="checkbox")if(Array.isArray(d))r[l]=d.includes(String(o?.getAttribute("value")??n?.value??""));else{const k=o?.getAttribute("true-value")??!0;r[l]=d===k}else if(u==="radio")r[l]=d===(n?.value??"");else if(u==="select")if(o&&o.hasAttribute("multiple")&&o instanceof HTMLSelectElement){const k=Array.isArray(d)?d.map(String):[];setTimeout(()=>{Array.from(o.options).forEach(C=>{C.selected=k.includes(C.value)})},0),r[l]=Array.isArray(d)?d:[]}else r[l]=d;else{r[l]=d;try{const k=ne(l);n&&(n[k]=d)}catch{}}const f=a||u==="checkbox"||u==="radio"||u==="select"?"change":"input",b=k=>{if(k.isComposing||i._isComposing)return;const C=typeof globalThis.process<"u"&&globalThis.process.env?.NODE_ENV==="test"||typeof window<"u"&&window.__vitest__;if(k.isTrusted===!1&&!C)return;const g=k.target;if(!g||g._modelUpdating)return;let $=g.value;if(u==="checkbox"){const j=m();if(Array.isArray(j)){const I=g.getAttribute("value")??"",A=Array.from(j);if(g.checked)A.includes(I)||A.push(I);else{const T=A.indexOf(I);T>-1&&A.splice(T,1)}$=A}else{const I=g.getAttribute("true-value")??!0,A=g.getAttribute("false-value")??!1;$=g.checked?I:A}}else if(u==="radio")$=g.getAttribute("value")??g.value;else if(u==="select"&&g.multiple)$=Array.from(g.selectedOptions).map(j=>j.value);else if(p&&typeof $=="string"&&($=$.trim()),h){const j=Number($);isNaN(j)||($=j)}const O=s._state||s,x=m();if(Array.isArray($)&&Array.isArray(x)?JSON.stringify([...$].sort())!==JSON.stringify([...x].sort()):$!==x){g._modelUpdating=!0;try{if(v)if(c&&typeof e.value=="object"&&e.value!==null){const j={...e.value};j[c]=$,e.value=j}else e.value=$;else Ae(O,e,$);if(s._requestRender&&s._requestRender(),s._triggerWatchers){const j=v?"reactiveState":e;s._triggerWatchers(j,$)}if(g){const j=`update:${ne(l)}`,I=new CustomEvent(j,{detail:$,bubbles:!0,composed:!0});g.dispatchEvent(I)}}finally{setTimeout(()=>g._modelUpdating=!1,0)}}};if(y){if(i[f]){const k=i[f];o&&ae.removeListener(o,f,k)}i[f]=b}else{const k=`update:${ne(l)}`;if(i[k]){const C=i[k];o&&ae.removeListener(o,k,C)}i[k]=C=>{const g=s._state||s,$=C.detail!==void 0?C.detail:C.target?.value,O=B(g,e);if(Array.isArray($)&&Array.isArray(O)?JSON.stringify([...$].sort())!==JSON.stringify([...O].sort()):$!==O){Ae(g,e,$),s._requestRender&&s._requestRender(),s._triggerWatchers&&s._triggerWatchers(e,$);const _=C.target;if(_){_[l]=$;try{const j=ne(l);typeof $=="boolean"?$?_.setAttribute(j,"true"):_.setAttribute(j,"false"):_.setAttribute(j,String($))}catch{}queueMicrotask(()=>{typeof _._applyProps=="function"&&_._applyProps(_._cfg),typeof _._requestRender=="function"&&_._requestRender()})}}}}(u==="text"||u==="textarea")&&(i.compositionstart=(()=>i._isComposing=!0),i.compositionend=k=>{i._isComposing=!1;const C=k.target;C&&setTimeout(()=>{const g=C.value,$=s._state||s,O=B($,e);let x=g;if(p&&(x=x.trim()),h){const j=Number(x);isNaN(j)||(x=j)}if(Array.isArray(x)&&Array.isArray(O)?JSON.stringify([...x].sort())!==JSON.stringify([...O].sort()):x!==O){C._modelUpdating=!0;try{Ae($,e,x),s._requestRender&&s._requestRender(),s._triggerWatchers&&s._triggerWatchers(e,x)}finally{setTimeout(()=>C._modelUpdating=!1,0)}}},0)})}function st(e){const t=e.slice(2);return t?t.charAt(0).toLowerCase()+t.slice(1):""}function It(e,t,r,n){if(typeof e=="object"&&e!==null)for(const[i,s]of Object.entries(e))i.startsWith("data-")||i.startsWith("aria-")||i==="class"?r[i]=s:t[i]=s;else if(typeof e=="string"){if(!n)return;try{const i=we(e,n);if(typeof i=="object"&&i!==null){for(const[s,o]of Object.entries(i))s.startsWith("data-")||s.startsWith("aria-")||s==="class"?r[s]=o:t[s]=o;return}else{r[e]=i;return}}catch{const i=B(n,e);r[e]=i}}}function Nt(e,t,r){let n;if(typeof e=="string"){if(!r)return;n=we(e,r)}else n=e;const i=t.style||"";let s=i;if(n){if(i){const o=i.split(";").map(a=>a.trim()).filter(Boolean),c=o.findIndex(a=>a.startsWith("display:"));c>=0&&o[c]==="display: none"&&(o.splice(c,1),s=o.length>0?o.join("; ")+";":"")}}else if(i){const o=i.split(";").filter(Boolean),c=o.findIndex(a=>a.trim().startsWith("display:"));c>=0?o[c]="display: none":o.push("display: none"),s=o.join("; ")}else s="display: none";s!==i&&(s?t.style=s:delete t.style)}function we(e,t){return Wt.evaluate(e,t)}function Ht(e,t,r){let n;if(typeof e=="string"){if(!r)return;n=we(e,r)}else n=e;let i=[];typeof n=="string"?i=[n]:Array.isArray(n)?i=n.filter(Boolean):typeof n=="object"&&n!==null&&(i=Object.entries(n).filter(([,c])=>!!c).flatMap(([c])=>c.split(/\s+/).filter(Boolean)));const s=t.class||"",o=s?`${s} ${i.join(" ")}`.trim():i.join(" ");o&&(t.class=o)}function Bt(e,t,r){let n;if(typeof e=="string"){if(!r)return;n=we(e,r)}else n=e;let i="";if(typeof n=="string")i=n;else if(n&&typeof n=="object"){const o=[];for(const[c,a]of Object.entries(n))if(a!=null&&a!==""){const p=c.replace(/[A-Z]/g,m=>`-${m.toLowerCase()}`),h=["width","height","top","right","bottom","left","margin","margin-top","margin-right","margin-bottom","margin-left","padding","padding-top","padding-right","padding-bottom","padding-left","font-size","line-height","border-width","border-radius","min-width","max-width","min-height","max-height"];let v=String(a);typeof a=="number"&&h.includes(p)&&(v=`${a}px`),o.push(`${p}: ${v}`)}i=o.join("; ")+(o.length>0?";":"")}const s=t.style||"";t.style=s+(s&&!s.endsWith(";")?"; ":"")+i}function zt(e,t,r){let n=e;typeof e=="string"&&r&&(n=we(e,r)),ee(n)?t.reactiveRef=n:t.ref=n}function ot(e,t,r,n){const i={},s={...n||{}},o={};for(const[c,a]of Object.entries(e)){const{value:p,modifiers:h,arg:v}=a;if(c==="model"||c.startsWith("model:")){const m=c.split(":"),d=m.length>1?m[1]:v;Dt(p,h,i,s,o,t,r,d);continue}switch(c){case"bind":It(p,i,s,t);break;case"show":Nt(p,s,t);break;case"class":Ht(p,s,t);break;case"style":Bt(p,s,t);break;case"ref":zt(p,i,t);break}}return{props:i,attrs:s,listeners:o}}function He(e,t){if(Array.isArray(e)){const s=new Set;return e.map(o=>{if(!o||typeof o!="object")return o;let c=o.props?.key??o.key;if(!c){const v=o.tag||"node",d=[o.props?.attrs?.id,o.props?.attrs?.name,o.props?.attrs?.["data-key"],o.props?.props?.id,o.props?.props?.name,o.props?.props?.dataKey,o.props?.props?.["data-key"]].find(u=>u!=null)??"";c=d?`${t}:${v}:${d}`:`${t}:${v}`}let a=c,p=1;for(;s.has(a);)a=`${c}#${p++}`;s.add(a);let h=o.children;return Array.isArray(h)&&(h=He(h,a)),{...o,key:a,children:h}})}const r=e;let n=r.props?.key??r.key??t,i=r.children;return Array.isArray(i)&&(i=He(i,n)),{...r,key:n,children:i}}function at(e,t,r,n){const i=r.directives??{},s=ot(i,n,e,r.attrs),o={...t.props,...r.props,...s.props},c={...t.attrs,...r.attrs,...s.attrs},a=t.props??{},p=o,h=r?.isCustomElement??t?.isCustomElement??!1;let v=!1;for(const u in{...a,...p}){const y=a[u],w=p[u];if(y!==w)if(v=!0,u==="value"&&(e instanceof HTMLInputElement||e instanceof HTMLTextAreaElement||e instanceof HTMLSelectElement))e.value!==w&&(e.value=w??"");else if(u==="checked"&&e instanceof HTMLInputElement)e.checked=!!w;else if(u.startsWith("on")&&typeof w=="function"){const l=st(u);typeof y=="function"&&ae.removeListener(e,l,y),ae.addListener(e,l,w)}else if(w==null)e.removeAttribute(u);else if((r?.isCustomElement??t?.isCustomElement??!1)||u in e)try{e[u]=w}catch{}else w===!1&&e.removeAttribute(u)}for(const[u,y]of Object.entries(s.listeners||{}))ae.addListener(e,u,y);const m=t.attrs??{},d=c;for(const u in{...m,...d}){const y=m[u],w=d[u];let l=y,f=w;if(ee(y)&&(l=y.value),ee(w)&&(f=w.value),l!==f)if(v=!0,f==null||f===!1){if(e.removeAttribute(u),u==="value"){if(e instanceof HTMLInputElement||e instanceof HTMLTextAreaElement)try{e.value=""}catch{}else if(e instanceof HTMLSelectElement)try{e.value=""}catch{}else if(e instanceof HTMLProgressElement)try{e.value=0}catch{}}if(u==="checked"&&e instanceof HTMLInputElement)try{e.checked=!1}catch{}if(u==="disabled")try{e.disabled=!1}catch{}}else{if(u==="value"){if(e instanceof HTMLInputElement||e instanceof HTMLTextAreaElement){try{e.value=f??""}catch{e.setAttribute(u,String(f))}continue}else if(e instanceof HTMLSelectElement){try{e.value=f??""}catch{}continue}else if(e instanceof HTMLProgressElement){try{e.value=Number(f)}catch{}continue}}if(u==="checked"&&e instanceof HTMLInputElement){try{e.checked=!!f}catch{}continue}if(u==="style"){e.setAttribute(u,String(f));continue}const b=e.namespaceURI==="http://www.w3.org/2000/svg";if(h&&!b&&u.includes("-")){const k=rt(u);try{e[k]=f}catch{e.setAttribute(u,String(f))}}else if(!b&&u in e)try{e[u]=f}catch{e.setAttribute(u,String(f))}else e.setAttribute(u,String(f))}}if(h&&v)try{if(typeof e._applyProps=="function")try{e._applyProps(e._cfg)}catch{}typeof e.requestRender=="function"?e.requestRender():typeof e._render=="function"&&e._render(e._cfg)}catch{}}function J(e,t,r){if(typeof e=="string")return document.createTextNode(e);if(e.tag==="#text"){const m=document.createTextNode(typeof e.children=="string"?e.children:"");return e.key!=null&&(m.key=e.key),m}if(e.tag==="#anchor"){const m=e,d=Array.isArray(m.children)?m.children:[],u=document.createTextNode(""),y=document.createTextNode("");m.key!=null&&(u.key=`${m.key}:start`,y.key=`${m.key}:end`),m._startNode=u,m._endNode=y;const w=document.createDocumentFragment();w.appendChild(u);for(const l of d){const f=J(l,t);w.appendChild(f)}return w.appendChild(y),w}const n=document.createElement(e.tag);e.key!=null&&(n.key=e.key);const{props:i={},attrs:s={},directives:o={}}=e.props??{},c=ot(o,t,n,s),a={...i,...c.props},p={...s,...c.attrs},h=n.namespaceURI==="http://www.w3.org/2000/svg";for(const m in p){const d=p[m];if(!(typeof m!="string"||/\[object Object\]/.test(m))){if(typeof d=="boolean")d&&n.setAttribute(m,"");else if(d!=null)if(!h&&m==="value"&&(n instanceof HTMLInputElement||n instanceof HTMLTextAreaElement||n instanceof HTMLSelectElement||n instanceof HTMLProgressElement))try{n instanceof HTMLProgressElement?n.value=Number(d):n.value=d??""}catch{n.setAttribute(m,String(d))}else if(!h&&m==="checked"&&n instanceof HTMLInputElement)try{n.checked=!!d}catch{n.setAttribute(m,String(d))}else if(!h&&m in n)try{n[m]=d}catch{n.setAttribute(m,String(d))}else if((e.props?.isCustomElement??!1)&&!h&&m.includes("-")){const y=rt(m);try{n[y]=d}catch{n.setAttribute(m,String(d))}}else n.setAttribute(m,String(d))}}for(const m in a){const d=a[m];if(!(typeof m!="string"||/\[object Object\]/.test(m)))if(m==="value"&&(n instanceof HTMLInputElement||n instanceof HTMLTextAreaElement||n instanceof HTMLSelectElement)){const u=typeof d=="object"&&d!==null&&typeof d.value<"u"?d.value:d;n.value=u??""}else if(m==="checked"&&n instanceof HTMLInputElement){const u=typeof d=="object"&&d!==null&&typeof d.value<"u"?d.value:d;n.checked=!!u}else if(m.startsWith("on")&&typeof d=="function")ae.addListener(n,st(m),d);else{if(m.startsWith("on")&&d===void 0)continue;if(d==null||d===!1)n.removeAttribute(m);else if((e.props?.isCustomElement??!1)||m in n)try{const y=typeof d=="object"&&d!==null&&typeof d.value<"u"?d.value:d;n[m]=y}catch{}}}for(const[m,d]of Object.entries(c.listeners||{}))ae.addListener(n,m,d);const v={...e,props:{...e.props,...c.props}};be(v,n,r);try{if(typeof n._applyProps=="function")try{n._applyProps(n._cfg)}catch{}typeof n.requestRender=="function"?n.requestRender():typeof n._render=="function"&&n._render(n._cfg)}catch{}if(Array.isArray(e.children))for(const m of e.children)n.appendChild(J(m,t,r));else typeof e.children=="string"&&(n.textContent=e.children);try{if(n instanceof HTMLSelectElement&&p&&p.hasOwnProperty("value"))try{n.value=p.value??""}catch{}}catch{}return n}function Ut(e,t,r,n,i){if(typeof r=="string"){e.textContent!==r&&(e.textContent=r);return}if(!Array.isArray(r))return;const s=Array.from(e.childNodes),o=Array.isArray(t)?t:[],c=new Map;for(const d of o)d&&d.key!=null&&c.set(d.key,d);const a=new Map;for(const d of s){const u=d.key;u!=null&&a.set(u,d)}const p=new Set;let h=e.firstChild;function v(d,u){let y=d;for(;y&&(p.add(y),y!==u);)y=y.nextSibling}function m(d,u,y,w){const l=[];let f=d.nextSibling;for(;f&&f!==u;)l.push(f),f=f.nextSibling;const b=Array.isArray(y)?y:[];if(w.some(C=>C&&C.key!=null)||b.some(C=>C&&C.key!=null)){const C=new Map,g=new Map;for(const x of b)x&&x.key!=null&&C.set(x.key,x);for(const x of l){const _=x.key;_!=null&&g.set(_,x)}const $=new Set;let O=d.nextSibling;for(const x of w){let _;if(x.key!=null&&g.has(x.key)){const j=C.get(x.key);_=je(g.get(x.key),j,x,n),$.add(_),_!==O&&e.contains(_)&&e.insertBefore(_,O)}else _=J(x,n),e.insertBefore(_,O),$.add(_);O=_.nextSibling}for(const x of l)!$.has(x)&&e.contains(x)&&e.removeChild(x)}else{const C=Math.min(b.length,w.length);for(let g=0;g<C;g++){const $=b[g],O=w[g],x=je(l[g],$,O,n);x!==l[g]&&(e.insertBefore(x,l[g]),e.removeChild(l[g]))}for(let g=C;g<w.length;g++)e.insertBefore(J(w[g],n),u);for(let g=C;g<l.length;g++)e.removeChild(l[g])}}for(const d of r){let u;if(d.tag==="#anchor"){const y=d.key,w=`${y}:start`,l=`${y}:end`;let f=a.get(w),b=a.get(l);const k=Array.isArray(d.children)?d.children:[];if(f||(f=document.createTextNode(""),f.key=w),b||(b=document.createTextNode(""),b.key=l),d._startNode=f,d._endNode=b,!e.contains(f)||!e.contains(b)){e.insertBefore(f,h);for(const C of k)e.insertBefore(J(C,n),h);e.insertBefore(b,h)}else m(f,b,c.get(y)?.children,k);v(f,b),h=b.nextSibling;continue}if(d.key!=null&&a.has(d.key)){const y=c.get(d.key);u=je(a.get(d.key),y,d,n,i),p.add(u),u!==h&&e.contains(u)&&(h&&!e.contains(h)&&(h=null),e.insertBefore(u,h))}else u=J(d,n,i),h&&!e.contains(h)&&(h=null),e.insertBefore(u,h),p.add(u);h=u.nextSibling}for(const d of s)!p.has(d)&&e.contains(d)&&(ue(d,i),e.removeChild(d))}function je(e,t,r,n,i){if(t&&typeof t!="string"&&t.props?.ref&&i&&ue(e,i),t===r)return e;if(typeof r=="string"){if(e.nodeType===Node.TEXT_NODE)return e.textContent!==r&&(e.textContent=r),e;{const o=document.createTextNode(r);return e.parentNode?.replaceChild(o,e),o}}if(r&&typeof r!="string"&&r.tag==="#anchor"){const o=r,c=Array.isArray(o.children)?o.children:[],a=o._startNode??document.createTextNode(""),p=o._endNode??document.createTextNode("");o.key!=null&&(a.key=`${o.key}:start`,p.key=`${o.key}:end`),o._startNode=a,o._endNode=p;const h=document.createDocumentFragment();h.appendChild(a);for(const v of c){const m=J(v,n);h.appendChild(m)}return h.appendChild(p),e.parentNode?.replaceChild(h,e),a}if(!r){ue(e,i);const o=document.createComment("removed");return e.parentNode?.replaceChild(o,e),o}if(!t||typeof t=="string"){ue(e,i);const o=J(r,n,i);return be(r,o,i),e.parentNode?.replaceChild(o,e),o}if(r.tag==="#anchor"){const o=Array.isArray(r.children)?r.children:[],c=r._startNode??document.createTextNode(""),a=r._endNode??document.createTextNode("");r.key!=null&&(c.key=`${r.key}:start`,a.key=`${r.key}:end`),r._startNode=c,r._endNode=a;const p=document.createDocumentFragment();p.appendChild(c);for(const h of o)p.appendChild(J(h,n));return p.appendChild(a),e.parentNode?.replaceChild(p,e),c}if(typeof t!="string"&&typeof r!="string"&&t.tag===r.tag&&t.key===r.key){const o=e;return at(o,t.props||{},r.props||{},n),Ut(o,t.children,r.children,n,i),be(r,o,i),o}if(typeof t!="string"&&typeof r!="string"&&t.tag===r.tag&&(t.tag&&String(t.tag).includes("-")||r.props&&r.props.isCustomElement||t.props&&t.props.isCustomElement))try{const c=e;return at(c,t.props||{},r.props||{},n),be(r,c,i),c}catch{}ue(e,i);const s=J(r,n,i);return be(r,s,i),e.parentNode?.replaceChild(s,e),s}function qt(e,t,r,n){let i;Array.isArray(t)?t.length===1?(i=t[0],i&&typeof i=="object"&&i.key==null&&(i={...i,key:"__root__"})):i={tag:"div",key:"__root__",children:t}:(i=t,i&&typeof i=="object"&&i.key==null&&(i={...i,key:"__root__"})),i&&typeof i=="object"&&i.tag==="#anchor"&&(i={tag:"div",key:"__anchor_root__",props:{attrs:{"data-anchor-block-root":"",key:"__anchor_root__"}},children:[i]}),i=He(i,String(i.key??"root"));const s=e._prevVNode??null,o=e._prevDom??e.firstChild??null;let c;s&&o?typeof s!="string"&&typeof i!="string"&&s.tag===i.tag&&s.key===i.key?c=je(o,s,i,r,n):(c=J(i,r,n),e.replaceChild(c,o)):(c=J(i,r,n),e.firstChild?e.replaceChild(c,e.firstChild):e.appendChild(c));const a=[];for(let p=0;p<e.childNodes.length;p++){const h=e.childNodes[p];h!==c&&h.nodeName!=="STYLE"&&(ue(h,n),a.push(h))}a.forEach(p=>e.removeChild(p)),e._prevVNode=i,e._prevDom=c}function Oe(e){if(typeof e=="string")return ye(e);if(e.tag==="#text")return typeof e.children=="string"?ye(e.children):"";if(e.tag==="#anchor")return(Array.isArray(e.children)?e.children.filter(Boolean):[]).map(Oe).join("");let t="";e.props&&e.props.attrs&&(t=Object.entries(e.props.attrs).map(([i,s])=>` ${i}="${ye(String(s))}"`).join(""));let r="";e.props&&(r=Object.entries(e.props).filter(([i])=>i!=="attrs"&&i!=="directives"&&i!=="ref"&&i!=="key").map(([i,s])=>` ${i}="${ye(String(s))}"`).join(""));const n=Array.isArray(e.children)?e.children.filter(Boolean).map(Oe).join(""):typeof e.children=="string"?ye(e.children):e.children?Oe(e.children):"";return`<${e.tag}${t}${r}>${n}</${e.tag}>`}function ct(e,...t){let r="";for(let n=0;n<e.length;n++)r+=e[n],n<t.length&&(r+=t[n]);return r}function lt(e){return e.replace(/\/\*[\s\S]*?\*\//g,"").replace(/\s+/g," ").replace(/\s*([{}:;,>+~])\s*/g,"$1").replace(/;}/g,"}").trim()}let Te=null;function ut(){return Te||(Te=new CSSStyleSheet,Te.replaceSync(lt(Kt))),Te}function Ft(e){return e.replace(/url\s*\(\s*['"]?javascript:[^)]*\)/gi,"").replace(/<script[\s\S]*?>[\s\S]*?<\/script>/gi,"").replace(/expression\s*\([^)]*\)/gi,"")}const Kt=ct`
|
|
4
|
+
• Ensure computed properties don't modify state`),this._value=this.makeReactive(t),Q.triggerUpdate(this)}addDependent(t){this.dependents.add(t)}removeDependent(t){this.dependents.delete(t)}getDependents(){return this.dependents}makeReactive(t){return t===null||typeof t!="object"||t instanceof Node||t instanceof Element||t instanceof HTMLElement?t:kt.createReactiveProxy(t,()=>Q.triggerUpdate(this),r=>this.makeReactive(r))}}function Jt(e){return Q.getOrCreateState(e===void 0?null:e)}function M(e){if(!e||typeof e!="object")return!1;try{const t=Symbol.for("@cer/ReactiveState");return!!e[t]}catch{return!1}}function Qt(e){const t=new He(e());return{get value(){return Q.trackDependency(t),e()}}}function Xt(e,t,r={}){let n=e();r.immediate&&t(n,n);const i=`watch-${Math.random().toString(36).substr(2,9)}`,o=()=>{Q.setCurrentComponent(i,o);const s=e();Q.clearCurrentComponent(),s!==n&&(t(s,n),n=s)};return Q.setCurrentComponent(i,o),e(),Q.clearCurrentComponent(),()=>{Q.cleanup(i)}}const P=e=>{try{e()}catch{}},Be=new Map,We=new Map,Fe=new Map,Xe=500;function Y(e){if(Be.has(e))return Be.get(e);const t=e.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase();return Be.size<Xe&&Be.set(e,t),t}function Ye(e){if(We.has(e))return We.get(e);const t=e.replace(/-([a-z])/g,(r,n)=>n.toUpperCase());return We.size<Xe&&We.set(e,t),t}function Ae(e){if(typeof e=="string"){if(Fe.has(e))return Fe.get(e);const t=e.replace(/[&<>"']/g,r=>({"&":"&","<":"<",">":">",'"':""","'":"'"})[r]);return t!==e&&Fe.size<Xe&&Fe.set(e,t),t}return e}function q(e,t){if(typeof t=="string"){const r=t.split(".").reduce((n,i)=>n?.[i],e);return M(r)?r.value:r}return t}function ze(e,t,r){const n=String(t).split("."),i=n.pop();if(!i)return;const o=n.reduce((s,c)=>(s[c]==null&&(s[c]={}),s[c]),e);M(o[i])?o[i].value=r:o[i]=r}function Yt(e,t,r){if(r)for(const[n,i]of Object.entries(r)){let o,s={};if(Array.isArray(i)?(o=i[0],s=i[1]||{}):o=i,t.set(n,{callback:o,options:s,oldValue:q(e,n)}),s.immediate)try{const c=q(e,n);o(c,void 0,e)}catch(c){I(`Error in immediate watcher for "${n}":`,c)}}}function en(e,t,r,n){const i=(s,c)=>{if(s===c)return!0;if(typeof s!=typeof c||typeof s!="object"||s===null||c===null)return!1;if(Array.isArray(s)&&Array.isArray(c))return s.length!==c.length?!1:s.every((b,y)=>i(b,c[y]));const a=Object.keys(s),d=Object.keys(c);return a.length!==d.length?!1:a.every(b=>i(s[b],c[b]))},o=t.get(r);if(o&&!i(n,o.oldValue))try{o.callback(n,o.oldValue,e),o.oldValue=n}catch(s){I(`Error in watcher for "${r}":`,s)}for(const[s,c]of t.entries())if(c.options.deep&&r.startsWith(s+"."))try{const a=q(e,s);i(a,c.oldValue)||(c.callback(a,c.oldValue,e),c.oldValue=a)}catch(a){I(`Error in deep watcher for "${s}":`,a)}}function xt(e,t){return t===Boolean?e===""||e==="true":t===Number?Number(e):e}function tn(e,t,r){if(t)for(const n in t){const i=t[n],o=Y(n),s=e.getAttribute(o);if(i.type===Function&&typeof e[n]=="function")r[n]=e[n];else if(s!==null)r[n]=xt(s,i.type);else if(typeof e[n]<"u")try{const c=e[n];i.type===Boolean&&typeof c=="boolean"||i.type===Number&&typeof c=="number"||i.type===Function&&typeof c=="function"?r[n]=c:r[n]=xt(String(c),i.type)}catch{r[n]=e[n]}else"default"in i&&i.default!==void 0&&(r[n]=i.default)}}function nn(e,t,r){if(!t.props){try{const n=r&&r._hookCallbacks&&r._hookCallbacks.props||{},i=Array.from(new Set([...Object.keys(e),...Object.keys(n)]));for(const o of i){if(typeof o!="string"||o.startsWith("_"))continue;const s=Object.getOwnPropertyDescriptor(r,o);if(!(!Object.prototype.hasOwnProperty.call(n,o)&&s&&(s.get||s.set||!s.configurable)))try{Object.defineProperty(r,o,{enumerable:!0,configurable:!0,get(){try{const a=Y(o),d=e.getAttribute(a);if(d!==null)return d;const b=e[o];let y;return M(b)||b&&typeof b=="object"&&"value"in b&&!(b instanceof Node)?y=b.value:y=b,y}catch{return e[o]}}})}catch{}}}catch{}return}tn(e,t.props,r)}function rn(e,t,r,n){e.onConnected&&!r&&(e.onConnected(t),n(!0))}function on(e,t,r,n,i,o,s,c){e.onDisconnected&&e.onDisconnected(t),r.forEach(a=>a()),n(),i(),o(!1),s(null),c(!1)}function sn(e,t,r,n,i){e.onAttributeChanged&&e.onAttributeChanged(t,r,n,i)}class an{static cache=new Map;static maxCacheSize=1e3;static dangerousPatterns=[/constructor/i,/prototype/i,/__proto__/i,/function/i,/eval/i,/import/i,/require/i,/window/i,/document/i,/global/i,/process/i,/setTimeout/i,/setInterval/i,/fetch/i,/XMLHttpRequest/i];static evaluate(t,r){const n=this.cache.get(t);if(n){if(!n.isSecure){ne("Blocked cached dangerous expression:",t);return}return n.evaluator(r)}const i=this.createEvaluator(t);if(this.cache.size>=this.maxCacheSize){const o=this.cache.keys().next().value;o&&this.cache.delete(o)}if(this.cache.set(t,i),!i.isSecure){ne("Blocked dangerous expression:",t);return}return i.evaluator(r)}static createEvaluator(t){if(this.hasDangerousPatterns(t))return{evaluator:()=>{},isSecure:!1};if(t.length>1e3)return{evaluator:()=>{},isSecure:!1};try{return{evaluator:this.createSafeEvaluator(t),isSecure:!0}}catch(r){return ne("Failed to create evaluator for expression:",t,r),{evaluator:()=>{},isSecure:!1}}}static hasDangerousPatterns(t){return this.dangerousPatterns.some(r=>r.test(t))}static createSafeEvaluator(t){const r=t.trim();if(r.startsWith("{")&&r.endsWith("}"))return this.createObjectEvaluator(t);if(/^ctx\.[a-zA-Z0-9_\.]+$/.test(t.trim())){const n=t.trim().slice(4);return i=>q(i,n)}return t.includes("ctx")||/[+\-*/%<>=&|?:\[\]]/.test(t)?this.createSimpleEvaluator(t):n=>q(n,t)}static createObjectEvaluator(t){const r=t.trim().slice(1,-1),n=this.parseObjectProperties(r);return i=>{const o={};for(const{key:s,value:c}of n)try{if(c.startsWith("ctx.")){const a=c.slice(4);o[s]=q(i,a)}else o[s]=this.evaluateSimpleValue(c,i)}catch{o[s]=void 0}return o}}static parseObjectProperties(t){const r=[],n=t.split(",");for(const i of n){const o=i.indexOf(":");if(o===-1)continue;const s=i.slice(0,o).trim(),c=i.slice(o+1).trim(),a=s.replace(/^['"]|['"]$/g,"");r.push({key:a,value:c})}return r}static createSimpleEvaluator(t){return r=>{try{let n=t;const i=[];n=n.replace(/("[^"\\]*(?:\\.[^"\\]*)*"|'[^'\\]*(?:\\.[^'\\]*)*')/g,y=>`<<#${i.push(y)-1}#>>`);const o=n.match(/ctx\.[\w.]+/g)||[];for(const y of o){const p=y.slice(4),x=q(r,p);if(x===void 0)return;const u=i.push(JSON.stringify(x))-1;n=n.replace(new RegExp(y.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),"g"),`<<#${u}#>>`)}const s=/\b[a-zA-Z_][a-zA-Z0-9_]*(?:\.[a-zA-Z_][a-zA-Z0-9_]*)+\b/g,c=n.match(s)||[];for(const y of c){if(y.startsWith("ctx."))continue;const p=q(r,y);if(p===void 0)return;const x=i.push(JSON.stringify(p))-1;n=n.replace(new RegExp(y.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),"g"),`<<#${x}#>>`)}const a=/\b([a-zA-Z_][a-zA-Z0-9_]*)\b/g;let d;const b=new Set;for(;(d=a.exec(n))!==null;){const y=d[1];if(["true","false","null","undefined"].includes(y)||/^[0-9]+$/.test(y)||y==="ctx"||b.has(y))continue;b.add(y);const p=q(r,y);if(p===void 0)return;const x=JSON.stringify(p),u=i.push(x)-1;y.includes(".")?n=n.replace(new RegExp(y.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),"g"),`<<#${u}#>>`):n=n.replace(new RegExp("\\b"+y.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")+"\\b","g"),`<<#${u}#>>`)}n=n.replace(/<<#(\d+)#>>/g,(y,p)=>i[Number(p)]);try{return this.evaluateBasicExpression(n)}catch{return}}catch{return}}}static evaluateBasicExpression(t){const r=this.tokenize(t);let n=0;function i(){return r[n]}function o(l){const m=r[n++];if(l&&!m)throw new Error(`Unexpected token EOF, expected ${l}`);if(l&&m&&m.type!==l&&m.value!==l)throw new Error(`Unexpected token ${m.type}/${m.value}, expected ${l}`);return m}function s(){return c()}function c(){let l=a();if(i()&&i().value==="?"){o("?");const m=s();o(":");const k=s();return l?m:k}return l}function a(){let l=d();for(;i()&&i().value==="||";){o("OP");const m=d();l=l||m}return l}function d(){let l=b();for(;i()&&i().value==="&&";){o("OP");const m=b();l=l&&m}return l}function b(){let l=y();for(;i()&&["==","!=","===","!=="].includes(i().value);){const m=o("OP").value,k=y();switch(m){case"==":l=l==k;break;case"!=":l=l!=k;break;case"===":l=l===k;break;case"!==":l=l!==k;break}}return l}function y(){let l=p();for(;i()&&[">","<",">=","<="].includes(i().value);){const m=o("OP").value,k=p();switch(m){case">":l=l>k;break;case"<":l=l<k;break;case">=":l=l>=k;break;case"<=":l=l<=k;break}}return l}function p(){let l=x();for(;i()&&(i().value==="+"||i().value==="-");){const m=o("OP").value,k=x();l=m==="+"?l+k:l-k}return l}function x(){let l=u();for(;i()&&(i().value==="*"||i().value==="/"||i().value==="%");){const m=o("OP").value,k=u();switch(m){case"*":l=l*k;break;case"/":l=l/k;break;case"%":l=l%k;break}}return l}function u(){return i()&&i().value==="!"?(o("OP"),!u()):i()&&i().value==="-"?(o("OP"),-u()):f()}function f(){const l=i();if(l){if(l.type==="NUMBER")return o("NUMBER"),Number(l.value);if(l.type==="STRING")return o("STRING"),l.value.slice(1,-1);if(l.type==="IDENT")return o("IDENT"),l.value==="true"?!0:l.value==="false"?!1:l.value==="null"?null:void 0;if(l.value==="["){o("PUNC");const m=[];for(;i()&&i().value!=="]";)m.push(s()),i()&&i().value===","&&o("PUNC");return o("PUNC"),m}if(l.value==="("){o("PUNC");const m=s();return o("PUNC"),m}throw new Error("Unexpected token in expression")}}return s()}static tokenize(t){const r=[],n=/\s*(=>|===|!==|==|!=|>=|<=|\|\||&&|[()?:,\[\]]|\+|-|\*|\/|%|>|<|!|\d+\.?\d*|"[^"]*"|'[^']*'|[a-zA-Z_][a-zA-Z0-9_]*|\S)\s*/g;let i;for(;(i=n.exec(t))!==null;){const o=i[1];o&&(/^\d/.test(o)?r.push({type:"NUMBER",value:o}):/^"/.test(o)||/^'/.test(o)?r.push({type:"STRING",value:o}):/^[a-zA-Z_]/.test(o)?r.push({type:"IDENT",value:o}):/^[()?:,\[\]]$/.test(o)?r.push({type:"PUNC",value:o}):r.push({type:"OP",value:o}))}return r}static evaluateSimpleValue(t,r){if(t==="true")return!0;if(t==="false")return!1;if(!isNaN(Number(t)))return Number(t);if(t.startsWith("ctx.")){const n=t.slice(4);return q(r,n)}return t.startsWith('"')&&t.endsWith('"')||t.startsWith("'")&&t.endsWith("'")?t.slice(1,-1):t}static clearCache(){this.cache.clear()}static getCacheSize(){return this.cache.size}}class re{static cleanupFunctions=new WeakMap;static addListener(t,r,n,i){t.addEventListener(r,n,i);const s={event:r,handler:n,wrapper:n,options:i,cleanup:()=>t.removeEventListener(r,n,i),addedAt:Date.now()};this.cleanupFunctions.has(t)||this.cleanupFunctions.set(t,[]);const c=this.cleanupFunctions.get(t);c.push(s),c.__metaList=c}static removeListener(t,r,n,i){t.removeEventListener(r,n,i);const o=this.cleanupFunctions.get(t);if(o)for(let s=0;s<o.length;s++){const c=o[s];if(c.event===r&&c.handler===n){o.splice(s,1),o.length===0&&this.cleanupFunctions.delete(t);return}}}static cleanup(t){const r=this.cleanupFunctions.get(t);r&&(r.forEach(n=>{try{n.cleanup()}catch{}}),this.cleanupFunctions.delete(t))}static cleanupAll(){this.cleanupFunctions=new WeakMap}static hasListeners(t){const r=this.cleanupFunctions.get(t);return!!(r&&r.length>0)}static getListenerCount(t){const r=this.cleanupFunctions.get(t);return r?r.length:0}static getListenerInfo(t){const r=this.cleanupFunctions.get(t);return r?r.map(n=>({event:n.event,handler:n.handler,wrapper:n.wrapper,options:n.options})):[]}}function Ue(e,t){return Array.isArray(e)&&Array.isArray(t)?JSON.stringify([...e].sort())!==JSON.stringify([...t].sort()):e!==t}function $t(e,t,r,n,i){if(e)if(i&&typeof t.value=="object"&&t.value!==null){const o={...t.value};o[i]=r,t.value=o}else t.value=r;else{const o=n._state||n;ze(o,t,r)}}function Ke(e,t,r,n){if(e._requestRender&&e._requestRender(),e._triggerWatchers){const i=t?"reactiveState":r;e._triggerWatchers(i,n)}}function cn(e,t,r){const n=`update:${Y(t)}`,i=`update:${t}`,o=new CustomEvent(n,{detail:r,bubbles:!0,composed:!0}),s=new CustomEvent(i,{detail:r,bubbles:!0,composed:!0});e.dispatchEvent(o),e.dispatchEvent(s)}function Ct(e,t,r,n){const i=r;P(()=>{e[t]=i}),P(()=>{const o=Y(t);typeof i=="boolean"?i?e.setAttribute(o,"true"):e.setAttribute(o,"false"):i!=null&&(typeof i=="string"||typeof i=="number")?e.setAttribute(o,String(i)):e.removeAttribute?.(o)}),P(()=>{e._applyProps?.(e._cfg)}),P(()=>{e._requestRender?.()})}function ln(e,t,r,n){if(e){const o=t.value;return n&&typeof o=="object"&&o!==null?o[n]:o}const i=r._state||r;return q(i,t)}function ve(e){return e?e.split(/\s+/).filter(Boolean):[]}function ke(e,t){if(t.length===0)return;const r=t.filter(n=>n&&!e.classList.contains(n));r.length>0&&e.classList.add(...r)}function xe(e,t){if(t.length===0)return;const r=t.filter(Boolean);r.length>0&&e.classList.remove(...r)}let et=!1;async function un(e,t,r=10){if(!et){if(!e.isConnected){ne("⚠️ Element not connected to DOM, skipping style wait");return}for(let n=0;n<r;n++){const i=window.getComputedStyle(e),o=i.transform&&i.transform!=="",s=i.opacity&&i.opacity!=="";if(o||s){et=!0;return}await new Promise(c=>requestAnimationFrame(()=>c(void 0)))}et=!0,ne("⚠️ Styles did not load in time for transition, continuing anyway")}}function fn(e){const t=window.getComputedStyle(e),r=t.transitionDuration||"0s",n=t.transitionDelay||"0s",i=o=>{const s=parseFloat(o);return o.includes("ms")?s:s*1e3};return i(r)+i(n)}function Et(e,t){return new Promise(r=>{const n=t??fn(e);if(n<=0){r();return}let i=!1;const o=()=>{i||(i=!0,e.removeEventListener("transitionend",s),e.removeEventListener("transitioncancel",s),r())},s=()=>o();e.addEventListener("transitionend",s),e.addEventListener("transitioncancel",s),setTimeout(o,n+50)})}async function Te(e,t){const{classes:r,hooks:n,css:i,duration:o}=t;if(n?.onBeforeEnter)try{n.onBeforeEnter(e)}catch(u){I("Transition onBeforeEnter error:",u)}if(!i)return n?.onEnter?new Promise(u=>{n.onEnter(e,()=>{if(n?.onAfterEnter)try{n.onAfterEnter(e)}catch(f){I("Transition onAfterEnter error:",f)}u()})}):void 0;const s=ve(r?.enterFrom),c=ve(r?.enterActive),a=ve(r?.enterTo);ke(e,s),e.offsetHeight,ke(e,c),e.offsetHeight;let d;if(n?.onEnter){const u=new Promise(f=>{d=f});try{n.onEnter(e,()=>{d&&d()})}catch(f){I("Transition onEnter error:",f)}d&&await u}await new Promise(u=>requestAnimationFrame(()=>u(void 0))),e.offsetHeight;const b=window.getComputedStyle(e),y=b.transform,p=b.opacity;xe(e,s),y&&y!=="none"&&(e.style.transform=y),p&&p!==""&&(e.style.opacity=p),e.offsetHeight,await new Promise(u=>requestAnimationFrame(()=>u(void 0))),e.style.transform="",e.style.opacity="",ke(e,a),e.offsetHeight,await new Promise(u=>requestAnimationFrame(()=>u(void 0)));let x;if(typeof o=="number"?x=o:o&&typeof o=="object"&&"enter"in o&&(x=o.enter),await Et(e,x),xe(e,c),n?.onAfterEnter)try{n.onAfterEnter(e)}catch(u){I("Transition onAfterEnter error:",u)}}async function tt(e,t){const{classes:r,hooks:n,css:i,duration:o}=t;if(n?.onBeforeLeave)try{n.onBeforeLeave(e)}catch(y){I("Transition onBeforeLeave error:",y)}if(!i)return n?.onLeave?new Promise(y=>{n.onLeave(e,()=>{if(n?.onAfterLeave)try{n.onAfterLeave(e)}catch(p){I("Transition onAfterLeave error:",p)}y()})}):void 0;const s=ve(r?.leaveFrom),c=ve(r?.leaveActive),a=ve(r?.leaveTo);ke(e,s),e.offsetHeight,ke(e,c);let d;if(n?.onLeave){const y=new Promise(p=>{d=p});try{n.onLeave(e,()=>{d&&d()})}catch(p){I("Transition onLeave error:",p)}d&&await y}await new Promise(y=>requestAnimationFrame(()=>y(void 0))),await un(e,[...s,...c]),xe(e,s),ke(e,a);let b;if(typeof o=="number"?b=o:o&&typeof o=="object"&&"leave"in o&&(b=o.leave),await Et(e,b),xe(e,c),xe(e,a),xe(e,s),n?.onAfterLeave)try{n.onAfterLeave(e)}catch(y){I("Transition onAfterLeave error:",y)}}function ee(e){return e instanceof HTMLInputElement||e instanceof HTMLSelectElement||e instanceof HTMLTextAreaElement||e instanceof HTMLButtonElement}function $e(e){return e===""?!0:typeof e=="string"?e==="false"?!1:e==="true"?!0:e!=="":e&&typeof e=="object"?M(e)||"value"in e?!!e.value:!1:!!e}function he(e,t){if(!t||!(e instanceof HTMLElement))return;re.cleanup(e);for(const n in t)t[n]===e&&delete t[n];const r=e.childNodes;for(let n=0;n<r.length;n++)he(r[n],t)}function Oe(e,t,r){if(typeof e=="string")return;const n=e.props?.reactiveRef??(e.props?.props&&e.props.props.reactiveRef),i=e.props?.ref??(e.props?.props&&e.props.props.ref);n?n.value=t:i&&r&&(r[i]=t)}function dn(e,t,r,n,i,o,s,c){if(!o)return;const a=t.includes("lazy"),d=t.includes("trim"),b=t.includes("number"),y=e&&typeof e=="object"&&"value"in e&&typeof e.value<"u",p=()=>{if(y){const w=e.value;return c&&s&&(s instanceof HTMLInputElement||s instanceof HTMLTextAreaElement||s instanceof HTMLSelectElement)&&typeof w=="object"&&w!==null?w[c]:w}return q(o._state||o,e)},x=p();let u="text";s instanceof HTMLInputElement?u=n?.type||s.type||"text":s instanceof HTMLSelectElement?u="select":s instanceof HTMLTextAreaElement&&(u="textarea");const f=s instanceof HTMLInputElement||s instanceof HTMLTextAreaElement||s instanceof HTMLSelectElement,l=f?u==="checkbox"||u==="radio"?"checked":"value":c??"modelValue";if(u==="checkbox")if(Array.isArray(x))r[l]=x.includes(String(s?.getAttribute("value")??n?.value??""));else{const w=s?.getAttribute("true-value")??!0;r[l]=x===w}else if(u==="radio")r[l]=x===(n?.value??"");else if(u==="select")if(s&&s.hasAttribute("multiple")&&s instanceof HTMLSelectElement){const w=Array.isArray(x)?x.map(String):[];setTimeout(()=>{Array.from(s.options).forEach(_=>{_.selected=w.includes(_.value)})},0),r[l]=Array.isArray(x)?x:[]}else r[l]=x;else{!f&&y?r[l]=e:r[l]=x;try{const w=Y(l);n&&(n[w]=x)}catch{}}const m=a||u==="checkbox"||u==="radio"||u==="select"?"change":"input",k=w=>{if(w.isComposing||i._isComposing)return;const _=typeof globalThis.process<"u"&&globalThis.process.env?.NODE_ENV==="test"||typeof window<"u"&&window.__vitest__;if(w.isTrusted===!1&&!_)return;const C=w.target;if(!C||C._modelUpdating)return;let h=C.value;if(u==="checkbox"){const v=p();if(Array.isArray(v)){const $=C.getAttribute("value")??"",A=Array.from(v);if(C.checked)A.includes($)||A.push($);else{const R=A.indexOf($);R>-1&&A.splice(R,1)}h=A}else{const $=C.getAttribute("true-value")??!0,A=C.getAttribute("false-value")??!1;h=C.checked?$:A}}else if(u==="radio")h=C.getAttribute("value")??C.value;else if(u==="select"&&C.multiple)h=Array.from(C.selectedOptions).map(v=>v.value);else if(d&&typeof h=="string"&&(h=h.trim()),b){const v=Number(h);isNaN(v)||(h=v)}const T=p();if(Ue(h,T)){C._modelUpdating=!0;try{$t(y,e,h,o,c),Ke(o,y,e,h),C&&cn(C,l,h)}finally{setTimeout(()=>C._modelUpdating=!1,0)}}};if(f){if(i[m]){const w=i[m];s&&re.removeListener(s,m,w)}i[m]=k}else{const w=`update:${Y(l)}`,_=`update:${l}`;if(i[w]){const C=i[w];s&&re.removeListener(s,w,C)}if(i[_]){const C=i[_];s&&re.removeListener(s,_,C)}if(i[w]=C=>{const h=C.detail!==void 0?C.detail:C.target?.value,T=ln(y,e,o,c);if(Ue(h,T)){$t(y,e,h,o,c),Ke(o,y,e,h);const v=C.target;v&&Ct(v,l,y?e:h,y)}},y&&typeof e.value=="object"&&e.value!==null){let C=[];try{C=Reflect.ownKeys(e.value)}catch{C=Object.keys(e.value)}const h=C.filter(T=>typeof T=="string"&&!String(T).startsWith("_")&&T!=="constructor");for(const T of h){const E=`update:${Y(T)}`,v=`update:${T}`;i[E]||(i[E]=$=>{const A=$.detail!==void 0?$.detail:$.target?.value,R=y?e.value[T]:q(o._state||o,e);if(!Ue(A,R))return;if(y){const U={...e.value};U[T]=A,e.value=U}else ze(o._state||o,e,A);Ke(o,y,e,A);const L=$.currentTarget||s||$.target;L&&Ct(L,l,y?e:A,y)},i[v]=i[E])}}i[_]=i[w]}(u==="text"||u==="textarea")&&(i.compositionstart=(()=>i._isComposing=!0),i.compositionend=w=>{i._isComposing=!1;const _=w.target;_&&setTimeout(()=>{const C=_.value,h=o._state||o,T=q(h,e);let E=C;if(d&&(E=E.trim()),b){const $=Number(E);isNaN($)||(E=$)}if(Ue(E,T)){_._modelUpdating=!0;try{ze(h,e,E),Ke(o,y,e,E)}finally{setTimeout(()=>_._modelUpdating=!1,0)}}},0)})}function _t(e){const t=e.slice(2);return t?t.charAt(0).toLowerCase()+t.slice(1):""}function pn(e,t,r,n,i){if(typeof e=="object"&&e!==null)for(const[o,s]of Object.entries(e))if(o.startsWith("data-")||o.startsWith("aria-")||o==="class")r[o]=s;else if(o==="disabled"&&i&&ee(i)){const c=s&&typeof s=="object"&&"value"in s;(()=>{try{return M(s)}catch{return!1}})()||c?t[o]=s:r[o]=s}else t[o]=s;else if(typeof e=="string"){if(!n)return;try{const o=je(e,n);if(typeof o=="object"&&o!==null){for(const[s,c]of Object.entries(o))if(s.startsWith("data-")||s.startsWith("aria-")||s==="class")r[s]=c;else if(s==="disabled"&&i&&ee(i)){const a=c&&typeof c=="object"&&"value"in c;(()=>{try{return M(c)}catch{return!1}})()||a?t[s]=c:r[s]=c}else t[s]=c;return}else{r[e]=o;return}}catch{const o=q(n,e);r[e]=o}}}function hn(e,t,r){let n;if(typeof e=="string"){if(!r)return;n=je(e,r)}else n=e;const i=t.style||"";let o=i;if(n){if(i){const s=i.split(";").map(a=>a.trim()).filter(Boolean),c=s.findIndex(a=>a.startsWith("display:"));c>=0&&s[c]==="display: none"&&(s.splice(c,1),o=s.length>0?s.join("; ")+";":"")}}else if(i){const s=i.split(";").filter(Boolean),c=s.findIndex(a=>a.trim().startsWith("display:"));c>=0?s[c]="display: none":s.push("display: none"),o=s.join("; ")}else o="display: none";o!==i&&(o?t.style=o:delete t.style)}function je(e,t){return an.evaluate(e,t)}function gn(e,t,r){let n;if(typeof e=="string"){if(!r)return;n=je(e,r)}else n=e;let i=[];if(typeof n=="string")i=[n];else if(Array.isArray(n))i=n.filter(Boolean);else if(typeof n=="object"&&n!==null)for(const[c,a]of Object.entries(n))a&&i.push(c);const o=t.class||"",s=i.join(" ");t.class=o?`${o} ${s}`.trim():s}function nt(e){if(e===!0||e===!1)return!0;if(e==null)return!1;if(typeof e==="string")return e===""||e==="true"||e==="false";try{if(e&&typeof e=="object"&&"value"in e){const r=e.value,n=typeof r;return n==="boolean"?!0:n==="string"?r===""||r==="true"||r==="false":!1}}catch{}return!1}function mn(e,t,r){let n;if(typeof e=="string"){if(!r)return;n=je(e,r)}else n=e;let i="";if(typeof n=="string")i=n;else if(n&&typeof n=="object"){const s=[];for(const[c,a]of Object.entries(n))if(a!=null&&a!==""){const d=c.replace(/[A-Z]/g,p=>`-${p.toLowerCase()}`),b=["width","height","top","right","bottom","left","margin","margin-top","margin-right","margin-bottom","margin-left","padding","padding-top","padding-right","padding-bottom","padding-left","font-size","line-height","border-width","border-radius","min-width","max-width","min-height","max-height"];let y=String(a);typeof a=="number"&&b.includes(d)&&(y=`${a}px`),s.push(`${d}: ${y}`)}i=s.join("; ")+(s.length>0?";":"")}const o=t.style||"";t.style=o+(o&&!o.endsWith(";")?"; ":"")+i}function yn(e,t,r){let n=e;typeof e=="string"&&r&&(n=je(e,r)),M(n)?t.reactiveRef=n:t.ref=n}function St(e,t,r,n){const i={},o={...n||{}},s={};for(const[c,a]of Object.entries(e)){const{value:d,modifiers:b,arg:y}=a;if(c==="model"||c.startsWith("model:")){const p=c.split(":"),x=p.length>1?p[1]:y;dn(d,b,i,o,s,t,r,x);continue}switch(c){case"bind":pn(d,i,o,t,r);break;case"show":hn(d,o,t);break;case"class":gn(d,o,t);break;case"style":mn(d,o,t);break;case"ref":yn(d,i,t);break}}try{if(Object.prototype.hasOwnProperty.call(i,"disabled")&&r&&ee(r)){const a=i.disabled,d=a&&typeof a=="object"&&"value"in a;let b=!1;try{b=M(a)}catch{b=!1}if(!d&&!b)try{o.disabled=a,delete i.disabled;const y=globalThis;y.__VDOM_DISABLED_PROMOTIONS||(y.__VDOM_DISABLED_PROMOTIONS=[]),y.__VDOM_DISABLED_PROMOTIONS.push({phase:"bind-directive:postfix-move",location:"attrs",key:"disabled",value:a,time:Date.now(),stack:new Error().stack})}catch{}}}catch{}return{props:i,attrs:o,listeners:s}}function rt(e,t){if(Array.isArray(e)){const o=new Set;return e.map(s=>{if(!s||typeof s!="object")return s;let c=s.props?.key??s.key;if(!c){const y=s.tag||"node",x=[s.props?.attrs?.id,s.props?.attrs?.name,s.props?.attrs?.["data-key"],s.props?.props?.id,s.props?.props?.name,s.props?.props?.dataKey,s.props?.props?.["data-key"]].find(u=>u!=null)??"";c=x?`${t}:${y}:${x}`:`${t}:${y}`}let a=c,d=1;for(;o.has(a);)a=`${c}#${d++}`;o.add(a);let b=s.children;return Array.isArray(b)&&(b=rt(b,a)),{...s,key:a,children:b}})}const r=e;let n=r.props?.key??r.key??t,i=r.children;return Array.isArray(i)&&(i=rt(i,n)),{...r,key:n,children:i}}function At(e,t,r,n){const i=r.directives??{},o=St(i,n,e,r.attrs),s={...t.props,...r.props,...o.props},c={...t.attrs,...r.attrs,...o.attrs},a=t.props??{},d=s,b=r?.isCustomElement??t?.isCustomElement??!1;let y=!1;for(const u in{...a,...d}){const f=a[u],g=d[u];let l=f,m=g;if(P(()=>{(M(f)||f&&typeof f=="object"&&"value"in f)&&(l=f.value)}),P(()=>{(M(g)||g&&typeof g=="object"&&"value"in g)&&(m=g.value)}),!(f===g&&l===m))if(y=!0,u==="value"&&(e instanceof HTMLInputElement||e instanceof HTMLTextAreaElement||e instanceof HTMLSelectElement)){const k=typeof g=="object"&&g!==null&&M(g)||g&&typeof g=="object"&&"value"in g?g.value:g;e.value!==k&&(e.value=k??"")}else if(u==="checked"&&e instanceof HTMLInputElement){const k=typeof g=="object"&&g!==null&&M(g)||g&&typeof g=="object"&&"value"in g?g.value:g;e.checked=!!k}else if(u.startsWith("on")&&typeof g=="function"){const k=_t(u);typeof f=="function"&&re.removeListener(e,k,f),re.addListener(e,k,g);try{if(k&&k.startsWith("update:")){const w=k.split(":",2)[1],_=d[w];let C=[];try{if(M(_)){const T=_.value;C=T&&typeof T=="object"?Object.keys(T):[]}else _&&typeof _=="object"&&(C=Object.keys(_))}catch{C=[]}const h=C.filter(T=>typeof T=="string"&&!T.startsWith("_")&&T!=="constructor");for(const T of h){const E=`update:${T}`,v=$=>{const A=$.detail!==void 0?$.detail:$.target?.value,S={...M(_)?_.value||{}:d[w]||{},[T]:A};P(()=>{g({detail:S})})};P(()=>{re.addListener(e,E,v)})}}}catch{}}else if(g==null)e.removeAttribute(u);else{const k=r?.isCustomElement??t?.isCustomElement??!1;if(k||u in e)try{e[u]=g,u==="disabled"&&g===!1&&!k&&ee(e)&&e.removeAttribute("disabled")}catch{}else g===!1&&e.removeAttribute(u)}}for(const[u,f]of Object.entries(o.listeners||{})){re.addListener(e,u,f);try{const g=e&&e.parentElement;g&&g!==e&&re.addListener(g,u,f)}catch{}}const p=t.attrs??{},x=c;for(const u in{...p,...x}){const f=p[u],g=x[u];let l=f,m=g;if(M(f)&&(l=f.value),M(g)&&(m=g.value),l!==m)if(y=!0,m==null||m===!1)P(()=>{e.removeAttribute(u)}),u==="value"&&(e instanceof HTMLInputElement||e instanceof HTMLTextAreaElement?P(()=>{e.value=""}):e instanceof HTMLSelectElement?P(()=>{e.value=""}):e instanceof HTMLProgressElement&&P(()=>{e.value=0})),u==="checked"&&e instanceof HTMLInputElement&&P(()=>{e.checked=!1}),u==="disabled"&&ee(e)&&P(()=>{e.disabled=!1});else{if(u==="value"){if(e instanceof HTMLInputElement||e instanceof HTMLTextAreaElement){P(()=>{e.value=m??""});continue}else if(e instanceof HTMLSelectElement){P(()=>{e.value=m??""});continue}else if(e instanceof HTMLProgressElement){P(()=>{e.value=Number(m)});continue}}if(u==="checked"&&e instanceof HTMLInputElement){P(()=>{e.checked=!!m});continue}if(u==="style"){e.setAttribute(u,String(m));continue}if(u==="disabled"&&ee(e)){P(()=>{e.disabled=$e(m)}),$e(m)?P(()=>{e.setAttribute(u,"")}):P(()=>{e.removeAttribute(u)});continue}const k=e.namespaceURI==="http://www.w3.org/2000/svg";if(b&&!k&&u.includes("-")){const w=Ye(u);try{M(g)?e[w]=g:e[w]=m}catch{e.setAttribute(u,String(m))}}else if(!k&&u in e)try{M(g)?e[u]=g:e[u]=m}catch{e.setAttribute(u,String(m))}else e.setAttribute(u,String(m))}}try{if(ee(e)){const u=s.disabled;let f;try{const l=Object.prototype.hasOwnProperty.call(o.props||{},"disabled"),m=u&&typeof u=="object"&&"value"in u;let k=!1;P(()=>{k=!!M(u)});const w=nt(u);k||m||l||w?f=u:f=c.disabled}catch{f=c.disabled}const g=$e(f);P(()=>{e.disabled=g}),P(g?()=>{e.setAttribute("disabled","")}:()=>{e.removeAttribute("disabled")})}}catch{}b&&y&&(P(()=>{e._applyProps?.(e._cfg)}),P(()=>{typeof e.requestRender=="function"?e.requestRender():typeof e._render=="function"&&e._render(e._cfg)}))}function X(e,t,r){if(typeof e=="string")return document.createTextNode(e);if(e.tag==="#text"){const p=document.createTextNode(typeof e.children=="string"?e.children:"");return e.key!=null&&(p.key=e.key),p}if(e.tag==="#anchor"){const p=e,x=Array.isArray(p.children)?p.children:[],u=document.createTextNode(""),f=document.createTextNode("");p.key!=null&&(u.key=`${p.key}:start`,f.key=`${p.key}:end`),p._startNode=u,p._endNode=f;const g=document.createDocumentFragment();g.appendChild(u);for(const l of x){const m=X(l,t);if(p.key!=null&&m instanceof Element&&!m.hasAttribute("data-anchor-key")){const k=l;k&&typeof k=="object"&&k.key!=null||(m.key=p.key,m.setAttribute("data-anchor-key",String(p.key)))}g.appendChild(m)}return g.appendChild(f),g}const n=document.createElement(e.tag);e.key!=null&&(n.key=e.key),e.props&&e.props._transitionGroup&&(n._transitionGroup=e.props._transitionGroup);const{props:i={},attrs:o={},directives:s={}}=e.props??{},c=St(s,t,n,o),a={...i,...c.props},d={...o,...c.attrs};try{if(a.disabled!==void 0&&n&&ee(n)){const p=a.disabled,x=p&&typeof p=="object"&&"value"in p;let u=!1;try{u=M(p)}catch{u=!1}!x&&!u&&P(()=>{d.disabled=p,delete a.disabled;const f=globalThis;f.__VDOM_DISABLED_PROMOTIONS||(f.__VDOM_DISABLED_PROMOTIONS=[]),f.__VDOM_DISABLED_PROMOTIONS.push({phase:"createElement:move-prop-to-attr",location:"attrs",key:"disabled",value:p,time:Date.now(),stack:new Error().stack})})}}catch{}const b=n.namespaceURI==="http://www.w3.org/2000/svg";for(const p in d){const x=d[p];if(typeof p!="string"||/\[object Object\]/.test(p))continue;const u=typeof x=="object"&&x!==null&&M(x)||x&&typeof x=="object"&&"value"in x?x.value:x;if(typeof u=="boolean")u?n.setAttribute(p,""):P(()=>{n.removeAttribute(p)});else if(u!=null){if(p==="disabled"&&ee(n)){const f=a.disabled,g=nt(f)?f:u,l=$e(g);P(()=>{n.disabled=l}),P(l?()=>{n.setAttribute(p,"")}:()=>{n.removeAttribute(p)});continue}if(!b&&p==="value"&&(n instanceof HTMLInputElement||n instanceof HTMLTextAreaElement||n instanceof HTMLSelectElement||n instanceof HTMLProgressElement))try{n instanceof HTMLProgressElement?n.value=Number(u):n.value=u??""}catch{n.setAttribute(p,String(u))}else if(!b&&p==="checked"&&n instanceof HTMLInputElement)try{n.checked=!!u}catch{n.setAttribute(p,String(u))}else if(!b&&p in n)try{n[p]=u,p==="disabled"&&u===!1&&ee(n)&&n.removeAttribute("disabled")}catch{n.setAttribute(p,String(u))}else if((e.props?.isCustomElement??!1)&&!b&&p.includes("-")){const g=Ye(p);try{n[g]=u}catch{n.setAttribute(p,String(u))}}else n.setAttribute(p,String(u))}}for(const p in a){const x=a[p];if(!(typeof p!="string"||/\[object Object\]/.test(p)))if(p==="value"&&(n instanceof HTMLInputElement||n instanceof HTMLTextAreaElement||n instanceof HTMLSelectElement)){const u=typeof x=="object"&&x!==null&&typeof x.value<"u"?x.value:x;P(()=>{n.value=u??""})}else if(p.startsWith("on")&&typeof x=="function"){const u=_t(p),f=u.includes(":")?(()=>{const g=u.split(":"),l=g[1];if(l.includes("-")){const m=l.split("-").map((k,w)=>w===0?k:k.charAt(0).toUpperCase()+k.slice(1)).join("");return`${g[0]}:${m}`}else{const m=l.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();return`${g[0]}:${m}`}})():u;c.listeners&&(c.listeners[u]||c.listeners[f])||re.addListener(n,u,x)}else{if(p.startsWith("on")&&x===void 0)continue;if(x==null||x===!1)n.removeAttribute(p);else if((e.props?.isCustomElement??!1)||p in n)try{const f=typeof x=="object"&&x!==null&&M(x)?x:typeof x=="object"&&x!==null&&typeof x.value<"u"?x.value:x;if(p==="disabled"&&ee(n)){const g=a.disabled!==void 0?a.disabled:f,l=$e(g);P(()=>{n.disabled=l}),P(l?()=>{n.setAttribute(p,"")}:()=>{n.removeAttribute(p)});continue}try{if(typeof n[p]=="boolean"){let l=f;typeof f=="string"?f==="false"?l=!1:f==="true"?l=!0:l=!!f&&f!=="":l=!!f,n[p]=l}else n[p]=f}catch{n[p]=f}}catch{}}}for(const[p,x]of Object.entries(c.listeners||{}))re.addListener(n,p,x);const y={...e,props:{...e.props,...c.props}};Oe(y,n,r);try{if(typeof n._applyProps=="function")try{n._applyProps(n._cfg)}catch{}typeof n.requestRender=="function"?n.requestRender():typeof n._render=="function"&&n._render(n._cfg)}catch{}if(Array.isArray(e.children))for(const p of e.children)n.appendChild(X(p,t,r));else typeof e.children=="string"&&(n.textContent=e.children);try{if(n instanceof HTMLSelectElement&&d&&d.hasOwnProperty("value"))try{n.value=d.value??""}catch{}}catch{}try{if(ee(n)){const p=a.disabled,x=d.disabled,u=p&&typeof p=="object"&&"value"in p;let f=!1;try{f=!!M(p)}catch{f=!1}const l=f||u||nt(p)?p:x,m=$e(l);P(()=>{n.disabled=m}),P(m?()=>{n.setAttribute("disabled","")}:()=>{n.removeAttribute("disabled")})}}catch{}return n}function bn(e,t,r,n,i){if(typeof r=="string"){e.textContent!==r&&(e.textContent=r);return}if(!Array.isArray(r))return;const o=e.childNodes,s=[];for(let f=0;f<o.length;f++)s.push(o[f]);const c=Array.isArray(t)?t:[],a=e._transitionGroup;if(a){const f=e._hasTransitionGroupRendered||!1;f||(e._hasTransitionGroupRendered=!0);const g=w=>typeof w=="string"&&w.startsWith("each-")?w.substring(5):w,l=[],m=[];for(const w of r)if(w&&w.tag==="#anchor"){const _=Array.isArray(w.children)?w.children:[];for(const C of _){const h=g(C.key||w.key||"unknown");l.push({...C,key:h})}}else w&&l.push({...w,key:g(w.key)});for(const w of c)if(w&&w.tag==="#anchor"){const _=Array.isArray(w.children)?w.children:[];for(const C of _){const h=g(C.key||w.key||"unknown");m.push({...C,key:h})}}else w&&m.push({...w,key:g(w.key)});if(l.some(w=>w&&w.key!=null)||m.some(w=>w&&w.key!=null)){const w=new Map,_=new Map;for(const E of m)if(E&&E.key!=null){const v=String(E.key);w.set(v,E)}for(let E=0;E<s.length;E++){const v=s[E];let $=v.key;if(!$&&v instanceof Element){const A=v.getAttribute("data-anchor-key");A&&($=A)}if($=g($),$!=null&&v instanceof Element&&v.nodeType===Node.ELEMENT_NODE){let A=typeof $=="string"&&$.includes(":")?$.substring(0,$.lastIndexOf(":")):$;A=String(A),_.set(A,v)}}const C=new Set,h=[];for(const E of l){let v=E.key;if(v==null)continue;v=String(v);const $=w.get(v);let A=_.get(v);if(A&&$){const R=Le(A,$,E,n);C.add(A);const S=String(v);R.key=S,R instanceof Element&&R.setAttribute("data-anchor-key",S),h.push({node:R,key:v,newVNode:E,oldVNode:$,isNew:!1})}else{A=X(E,n),A.key=v,A instanceof Element&&A.setAttribute("data-anchor-key",String(v)),e.appendChild(A);const S=!!f||a.appear===!0;A instanceof HTMLElement&&S&&Te(A,a).catch(L=>{I("Enter transition error:",L)}),h.push({node:A,key:v,newVNode:E,isNew:!0})}}const T=[];for(let E=0;E<s.length;E++){const v=s[E],$=v.key;if(!C.has(v)&&$!=null&&v instanceof HTMLElement){const R=tt(v,a).then(()=>{e.contains(v)&&e.removeChild(v)}).catch(S=>{I("Leave transition error:",S),e.contains(v)&&e.removeChild(v)});T.push(R)}}requestAnimationFrame(()=>{if(T.length>0)return;let E=e.firstChild;for(const{node:v}of h)v!==E&&e.insertBefore(v,E),E=v.nextSibling});return}}const d=new Map;for(const f of c)f&&f.key!=null&&d.set(f.key,f);const b=new Map;for(let f=0;f<s.length;f++){const g=s[f],l=g.key;l!=null&&b.set(l,g)}const y=new Set;let p=e.firstChild;function x(f,g){let l=f;for(;l&&(y.add(l),l!==g);)l=l.nextSibling}function u(f,g,l,m,k,w=!0){const _=[];let C=f.nextSibling;for(;C&&C!==g;)_.push(C),C=C.nextSibling;const h=Array.isArray(l)?l:[];if(m.some(E=>E&&E.key!=null)||h.some(E=>E&&E.key!=null)){const E=new Map,v=new Map;for(const S of h)S&&S.key!=null&&E.set(S.key,S);for(const S of _){const L=S.key;L!=null&&v.set(L,S)}const $=k&&k.state==="visible"&&h.length===0&&m.length>0,A=new Set;let R=f.nextSibling;for(const S of m){let L;if(S.key!=null&&v.has(S.key)){const U=E.get(S.key);L=Le(v.get(S.key),U,S,n),A.add(L),k&&L instanceof HTMLElement&&$&&k.appear&&Te(L,k).catch(oe=>{I("Transition enter error (appear):",oe)}),L!==R&&e.contains(L)&&e.insertBefore(L,R)}else L=X(S,n),e.insertBefore(L,R),A.add(L),k&&L instanceof HTMLElement&&w&&Te(L,k).catch(U=>{I("Transition enter error:",U)});R=L.nextSibling}for(const S of _)!A.has(S)&&e.contains(S)&&(k&&S instanceof HTMLElement&&w?tt(S,k).then(()=>{e.contains(S)&&e.removeChild(S)}).catch(L=>{I("Transition leave error:",L),e.contains(S)&&e.removeChild(S)}):e.removeChild(S))}else{const E=Math.min(h.length,m.length);for(let v=0;v<E;v++){const $=h[v],A=m[v],R=Le(_[v],$,A,n);R!==_[v]&&(e.insertBefore(R,_[v]),e.removeChild(_[v]))}for(let v=E;v<m.length;v++){const $=X(m[v],n);e.insertBefore($,g),k&&$ instanceof HTMLElement&&w&&Te($,k).catch(A=>{I("Transition enter error:",A)})}for(let v=E;v<_.length;v++){const $=_[v];k&&$ instanceof HTMLElement&&w?tt($,k).then(()=>{e.contains($)&&e.removeChild($)}).catch(A=>{I("Transition leave error:",A),e.contains($)&&e.removeChild($)}):e.removeChild($)}}}for(const f of r){let g;if(f.tag==="#anchor"){const l=f.key,m=`${l}:start`,k=`${l}:end`;let w=b.get(m),_=b.get(k);const C=Array.isArray(f.children)?f.children:[];if(w||(w=document.createTextNode(""),w.key=m),_||(_=document.createTextNode(""),_.key=k),f._startNode=w,f._endNode=_,!e.contains(w)||!e.contains(_)){e.insertBefore(w,p);const h=f._transition,E=!(h&&h.state==="visible"&&C.length>0)||h.appear;for(const v of C){const $=X(v,n);e.insertBefore($,p),h&&$ instanceof HTMLElement&&E&&Te($,h).catch(A=>{I("Transition enter error:",A)})}e.insertBefore(_,p)}else{const h=f._transition,E=d.get(l)?._transition,v=E&&E.state!==h?.state,$=h&&h.state==="visible"&&C.length>0&&!v,A=v||!$||h?.appear===!0;u(w,_,d.get(l)?.children,C,h,A)}x(w,_),p=_.nextSibling;continue}if(f.key!=null&&b.has(f.key)){const l=d.get(f.key);g=Le(b.get(f.key),l,f,n,i),y.add(g),g!==p&&e.contains(g)&&(p&&!e.contains(p)&&(p=null),e.insertBefore(g,p))}else g=X(f,n,i),p&&!e.contains(p)&&(p=null),e.insertBefore(g,p),y.add(g);p=g.nextSibling}for(let f=0;f<s.length;f++){const g=s[f];!y.has(g)&&e.contains(g)&&(he(g,i),e.removeChild(g))}}function Le(e,t,r,n,i){if(t&&typeof t!="string"&&t.props?.ref&&i&&he(e,i),t===r)return e;if(typeof r=="string"){if(e.nodeType===Node.TEXT_NODE)return e.textContent!==r&&(e.textContent=r),e;{const s=document.createTextNode(r);return e.parentNode?.replaceChild(s,e),s}}if(r&&typeof r!="string"&&r.tag==="#anchor"){const s=r,c=Array.isArray(s.children)?s.children:[],a=s._startNode??document.createTextNode(""),d=s._endNode??document.createTextNode("");s.key!=null&&(a.key=`${s.key}:start`,d.key=`${s.key}:end`),s._startNode=a,s._endNode=d;const b=document.createDocumentFragment();b.appendChild(a);for(const y of c){const p=X(y,n);b.appendChild(p)}return b.appendChild(d),e.parentNode?.replaceChild(b,e),a}if(!r){he(e,i);const s=document.createComment("removed");return e.parentNode?.replaceChild(s,e),s}if(!t||typeof t=="string"){he(e,i);const s=X(r,n,i);return Oe(r,s,i),e.parentNode?.replaceChild(s,e),s}if(r.tag==="#anchor"){const s=Array.isArray(r.children)?r.children:[],c=r._startNode??document.createTextNode(""),a=r._endNode??document.createTextNode("");r.key!=null&&(c.key=`${r.key}:start`,a.key=`${r.key}:end`),r._startNode=c,r._endNode=a;const d=document.createDocumentFragment();d.appendChild(c);for(const b of s)d.appendChild(X(b,n));return d.appendChild(a),e.parentNode?.replaceChild(d,e),c}if(typeof t!="string"&&typeof r!="string"&&t.tag===r.tag&&t.key===r.key){const s=e;return At(s,t.props||{},r.props||{},n),bn(s,t.children,r.children,n,i),Oe(r,s,i),s}if(typeof t!="string"&&typeof r!="string"&&t.tag===r.tag&&(t.tag&&String(t.tag).includes("-")||r.props&&r.props.isCustomElement||t.props&&t.props.isCustomElement))try{const c=e;return At(c,t.props||{},r.props||{},n),Oe(r,c,i),c}catch{}he(e,i);const o=X(r,n,i);return Oe(r,o,i),e.parentNode?.replaceChild(o,e),o}function wn(e,t,r,n){let i;Array.isArray(t)?t.length===1?(i=t[0],i&&typeof i=="object"&&i.key==null&&(i={...i,key:"__root__"})):i={tag:"div",key:"__root__",children:t}:(i=t,i&&typeof i=="object"&&i.key==null&&(i={...i,key:"__root__"})),i&&typeof i=="object"&&i.tag==="#anchor"&&(i={tag:"div",key:"__anchor_root__",props:{attrs:{"data-anchor-block-root":"",key:"__anchor_root__"}},children:[i]}),i=rt(i,String(i.key??"root"));const o=e._prevVNode??null,s=e._prevDom??e.firstChild??null;let c;o&&s?typeof o!="string"&&typeof i!="string"&&o.tag===i.tag&&o.key===i.key?c=Le(s,o,i,r,n):(c=X(i,r,n),e.replaceChild(c,s)):(c=X(i,r,n),e.firstChild?e.replaceChild(c,e.firstChild):e.appendChild(c));const a=[];for(let d=0;d<e.childNodes.length;d++){const b=e.childNodes[d];b!==c&&b.nodeName!=="STYLE"&&(he(b,n),a.push(b))}a.forEach(d=>e.removeChild(d)),e._prevVNode=i,e._prevDom=c}function Ve(e){if(typeof e=="string")return Ae(e);if(e.tag==="#text")return typeof e.children=="string"?Ae(e.children):"";if(e.tag==="#anchor")return(Array.isArray(e.children)?e.children.filter(Boolean):[]).map(Ve).join("");let t="";e.props&&e.props.attrs&&(t=Object.entries(e.props.attrs).map(([i,o])=>` ${i}="${Ae(String(o))}"`).join(""));let r="";e.props&&(r=Object.entries(e.props).filter(([i])=>i!=="attrs"&&i!=="directives"&&i!=="ref"&&i!=="key").map(([i,o])=>` ${i}="${Ae(String(o))}"`).join(""));const n=Array.isArray(e.children)?e.children.filter(Boolean).map(Ve).join(""):typeof e.children=="string"?Ae(e.children):e.children?Ve(e.children):"";return`<${e.tag}${t}${r}>${n}</${e.tag}>`}function Tt(e,...t){let r="";for(let n=0;n<e.length;n++)r+=e[n],n<t.length&&(r+=t[n]);return r}function Ot(e){return e.replace(/\/\*[\s\S]*?\*\//g,"").replace(/\s+/g," ").replace(/\s*([{}:;,>+~])\s*/g,"$1").replace(/;}/g,"}").trim()}let qe=null;function jt(){return qe||(qe=new CSSStyleSheet,qe.replaceSync(Ot(kn))),qe}function vn(e){return e.replace(/url\s*\(\s*['"]?javascript:[^)]*\)/gi,"").replace(/<script[\s\S]*?>[\s\S]*?<\/script>/gi,"").replace(/expression\s*\([^)]*\)/gi,"")}const kn=Tt`
|
|
5
5
|
:host,
|
|
6
6
|
*,
|
|
7
7
|
::before,
|
|
@@ -112,36 +112,36 @@
|
|
|
112
112
|
[hidden] {
|
|
113
113
|
display: none;
|
|
114
114
|
}
|
|
115
|
-
`,ft=Object.fromEntries(Object.entries({neutral:{50:"#fafafa",100:"#f4f4f5",200:"#e4e4e7",300:"#d4d4d8",400:"#9f9fa9",500:"#71717b",600:"#52525c",700:"#3f3f46",800:"#27272a",900:"#18181b",950:"#09090b"},primary:{50:"#eff6ff",100:"#dbeafe",200:"#bfdbfe",300:"#93c5fd",400:"#60a5fa",500:"#3b82f6",600:"#2563eb",700:"#1d4ed8",800:"#1e40af",900:"#1e3a8a",950:"#172554"},secondary:{50:"#eef2ff",100:"#e0e7ff",200:"#c7d2fe",300:"#a5b4fc",400:"#818cf8",500:"#6366f1",600:"#4f46e5",700:"#4338ca",800:"#3730a3",900:"#312e81",950:"#1e1b4b"},success:{50:"#f0fdf4",100:"#dcfce7",200:"#bbf7d0",300:"#86efac",400:"#4ade80",500:"#22c55e",600:"#16a34a",700:"#15803d",800:"#166534",900:"#14532d",950:"#052e16"},info:{50:"#f0f9ff",100:"#e0f2fe",200:"#bae6fd",300:"#7dd3fc",400:"#38bdf8",500:"#0ea5e9",600:"#0284c7",700:"#0369a1",800:"#075985",900:"#0c4a6e",950:"#082f49"},warning:{50:"#fffbeb",100:"#fef3c7",200:"#fde68a",300:"#fcd34d",400:"#fbbf24",500:"#f59e0b",600:"#d97706",700:"#b45309",800:"#92400e",900:"#78350f",950:"#451a03"},error:{50:"#fef2f2",100:"#fee2e2",200:"#fecaca",300:"#fca5a5",400:"#f87171",500:"#ef4444",600:"#dc2626",700:"#b91c1c",800:"#991b1b",900:"#7f1d1d",950:"#450a0a"},white:{DEFAULT:"#ffffff"},black:{DEFAULT:"#000000"},transparent:{DEFAULT:"transparent"},current:{DEFAULT:"currentColor"}}).map(([e,t])=>[e,Object.fromEntries(Object.entries(t).map(([r,n])=>[r,`var(--color-${e}${r==="DEFAULT"?"":`-${r}`}, ${n})`]))])),fe="0.25rem",Vt={"3xs":64,"2xs":72,xs:80,sm:96,md:112,lg:128,xl:144,"2xl":168,"3xl":192,"4xl":224,"5xl":256,"6xl":288,"7xl":320},dt={m:["margin"],mx:["margin-inline"],my:["margin-block"],mt:["margin-top"],mr:["margin-right"],mb:["margin-bottom"],ml:["margin-left"],p:["padding"],px:["padding-inline"],py:["padding-block"],pt:["padding-top"],pr:["padding-right"],pb:["padding-bottom"],pl:["padding-left"],inset:["inset"],"inset-x":["inset-inline"],"inset-y":["inset-block"],h:["height"],w:["width"],"min-h":["min-height"],"min-w":["min-width"],"max-h":["max-height"],"max-w":["max-width"],top:["top"],bottom:["bottom"],left:["left"],right:["right"],gap:["gap"],"gap-x":["column-gap"],"gap-y":["row-gap"]},Be=(()=>{const e={};e["@container"]="container-type:inline-size;",["block","inline","inline-block","flex","inline-flex","grid","inline-grid","table","table-cell","table-row","hidden"].forEach(a=>{e[a]=a==="hidden"?"display:none;":`display:${a};`}),["absolute","relative","fixed","sticky","static"].forEach(a=>{e[a]=`position:${a};`}),Object.assign(e,{"items-center":"align-items:center;","items-start":"align-items:flex-start;","items-end":"align-items:flex-end;","items-baseline":"align-items:baseline;","items-stretch":"align-items:stretch;","justify-center":"justify-content:center;","justify-start":"justify-content:flex-start;","justify-between":"justify-content:space-between;","justify-around":"justify-content:space-around;","justify-evenly":"justify-content:space-evenly;","justify-end":"justify-content:flex-end;","flex-wrap":"flex-wrap:wrap;","flex-nowrap":"flex-wrap:nowrap;","flex-wrap-reverse":"flex-wrap:wrap-reverse;","content-center":"align-content:center;","content-start":"align-content:flex-start;","content-end":"align-content:flex-end;","content-between":"align-content:space-between;","content-around":"align-content:space-around;","content-evenly":"align-content:space-evenly;","content-stretch":"align-content:stretch;","self-auto":"align-self:auto;","self-start":"align-self:flex-start;","self-end":"align-self:flex-end;","self-center":"align-self:center;","self-stretch":"align-self:stretch;","flex-col":"flex-direction:column;","flex-row":"flex-direction:row;","flex-col-reverse":"flex-direction:column-reverse;","flex-row-reverse":"flex-direction:row-reverse;","flex-1":"flex:1 1 0%;","flex-auto":"flex:1 1 auto;","flex-initial":"flex:0 1 auto;","flex-none":"flex:0 0 auto;",grow:"flex-grow:1;",shrink:"flex-shrink:1;","grow-0":"flex-grow:0;","shrink-0":"flex-shrink:0;"});for(let a=1;a<=12;a++)e[`grid-cols-${a}`]=`grid-template-columns:repeat(${a},minmax(0,1fr));`,e[`grid-rows-${a}`]=`grid-template-rows:repeat(${a},minmax(0,1fr));`,e[`col-span-${a}`]=`grid-column:span ${a} / span ${a};`,e[`row-span-${a}`]=`grid-row:span ${a} / span ${a};`,e[`col-start-${a}`]=`grid-column-start:${a};`,e[`col-end-${a}`]=`grid-column-end:${a};`,e[`row-start-${a}`]=`grid-row-start:${a};`,e[`row-end-${a}`]=`grid-row-end:${a};`;Object.assign(e,{"grid-cols-none":"grid-template-columns:none;","grid-rows-none":"grid-template-rows:none;","col-span-full":"grid-column:1 / -1;","row-span-full":"grid-row:1 / -1;","auto-cols-auto":"grid-auto-columns:auto;","auto-cols-min":"grid-auto-columns:min-content;","auto-cols-max":"grid-auto-columns:max-content;","auto-cols-fr":"grid-auto-columns:1fr;","auto-rows-auto":"grid-auto-rows:auto;","auto-rows-min":"grid-auto-rows:min-content;","auto-rows-max":"grid-auto-rows:max-content;","auto-rows-fr":"grid-auto-rows:1fr;","grid-flow-row":"grid-auto-flow:row;","grid-flow-col":"grid-auto-flow:column;","grid-flow-row-dense":"grid-auto-flow:row dense;","grid-flow-col-dense":"grid-auto-flow:column dense;"}),Object.assign(e,{"text-left":"text-align:left;","text-center":"text-align:center;","text-right":"text-align:right;","text-justify":"text-align:justify;","font-thin":"font-weight:100;","font-extralight":"font-weight:200;","font-light":"font-weight:300;","font-normal":"font-weight:400;","font-medium":"font-weight:500;","font-semibold":"font-weight:600;","font-bold":"font-weight:700;","font-extrabold":"font-weight:800;","font-black":"font-weight:900;",italic:"font-style:italic;","not-italic":"font-style:normal;",uppercase:"text-transform:uppercase;",lowercase:"text-transform:lowercase;",capitalize:"text-transform:capitalize;","normal-case":"text-transform:none;",underline:"text-decoration-line:underline;",overline:"text-decoration-line:overline;","line-through":"text-decoration-line:line-through;","no-underline":"text-decoration-line:none;",truncate:"overflow:hidden;text-overflow:ellipsis;white-space:nowrap;","whitespace-normal":"white-space:normal;","whitespace-nowrap":"white-space:nowrap;","whitespace-pre":"white-space:pre;","whitespace-pre-line":"white-space:pre-line;","whitespace-pre-wrap":"white-space:pre-wrap;","break-normal":"overflow-wrap:normal;word-break:normal;","break-words":"overflow-wrap:break-word;","break-all":"word-break:break-all;"}),[["text-xs","0.75rem","1"],["text-sm","0.875rem","1.25"],["text-base","1rem","1.5"],["text-lg","1.125rem","1.75"],["text-xl","1.25rem","1.75"],["text-2xl","1.5rem","2"],["text-3xl","1.875rem","2.25"],["text-4xl","2.25rem","2.5"],["text-5xl","3rem","1"],["text-6xl","3.75rem","1"],["text-7xl","4.5rem","1"],["text-8xl","6rem","1"],["text-9xl","8rem","1"]].forEach(([a,p,h])=>{e[a]=`font-size:${p};line-height:${h};`}),[["tracking-tighter","-0.05em"],["tracking-tight","-0.025em"],["tracking-normal","0em"],["tracking-wide","0.025em"],["tracking-wider","0.05em"],["tracking-widest","0.1em"]].forEach(([a,p])=>{e[a]=`letter-spacing:${p};`}),[["leading-3","0.75rem"],["leading-4","1rem"],["leading-5","1.25rem"],["leading-6","1.5rem"],["leading-7","1.75rem"],["leading-8","2rem"],["leading-9","2.25rem"],["leading-10","2.5rem"],["leading-none","1"],["leading-tight","1.25"],["leading-snug","1.375"],["leading-normal","1.5"],["leading-relaxed","1.625"],["leading-loose","2"]].forEach(([a,p])=>{e[a]=`line-height:${p};`}),Object.assign(e,{"font-sans":"font-family:var(--font-sans, ui-sans-serif,system-ui,sans-serif);","font-serif":"font-family:var(--font-serif, ui-serif,Georgia,serif);","font-mono":"font-family:var(--font-mono, ui-monospace,SFMono-Regular,monospace);"}),[0,1,2,4,6,8].forEach(a=>{const p=`${a}px`;e[`border-${a}`]=`border-width:${p};`,e[`border-t-${a}`]=`border-top-width:${p};`,e[`border-r-${a}`]=`border-right-width:${p};`,e[`border-b-${a}`]=`border-bottom-width:${p};`,e[`border-l-${a}`]=`border-left-width:${p};`,e[`border-x-${a}`]=`border-left-width:${p};border-right-width:${p};`,e[`border-y-${a}`]=`border-top-width:${p};border-bottom-width:${p};`}),e.border="border-width:1px;",e["border-t"]="border-top-width:1px;",e["border-r"]="border-right-width:1px;",e["border-b"]="border-bottom-width:1px;",e["border-l"]="border-left-width:1px;",e["border-x"]="border-left-width:1px;border-right-width:1px;",e["border-y"]="border-top-width:1px;border-bottom-width:1px;",Object.assign(e,{"border-solid":"border-style:solid;","border-dashed":"border-style:dashed;","border-dotted":"border-style:dotted;","border-double":"border-style:double;","border-none":"border-style:none;"}),Object.entries({none:0,xs:2,sm:4,md:6,lg:8,xl:12,"2xl":16,"3xl":24,"4xl":32,full:9999}).forEach(([a,p])=>{const h=p===9999?"9999px":`${p/16}rem`;e[`rounded-${a}`]=`border-radius:${h};`,e[`rounded-t-${a}`]=`border-top-left-radius:${h};border-top-right-radius:${h};`,e[`rounded-r-${a}`]=`border-top-right-radius:${h};border-bottom-right-radius:${h};`,e[`rounded-b-${a}`]=`border-bottom-left-radius:${h};border-bottom-right-radius:${h};`,e[`rounded-l-${a}`]=`border-top-left-radius:${h};border-bottom-left-radius:${h};`,e[`rounded-tl-${a}`]=`border-top-left-radius:${h};`,e[`rounded-tr-${a}`]=`border-top-right-radius:${h};`,e[`rounded-br-${a}`]=`border-bottom-right-radius:${h};`,e[`rounded-bl-${a}`]=`border-bottom-left-radius:${h};`}),Object.assign(e,{"shadow-none":"--ce-shadow-color:rgb(0 0 0 / 0);box-shadow:0 0 var(--ce-shadow-color, #0000);","shadow-xs":"--ce-shadow-color:rgb(0 0 0 / 0.05);box-shadow:0 1px 2px 0 var(--ce-shadow-color, rgb(0 0 0 / 0.05));","shadow-sm":"--ce-shadow-color:rgb(0 0 0 / 0.1);box-shadow:0 1px 3px 0 var(--ce-shadow-color, rgb(0 0 0 / 0.1)),0 1px 2px -1px var(--ce-shadow-color, rgb(0 0 0 / 0.1));",shadow:"--ce-shadow-color:rgb(0 0 0 / 0.1);box-shadow:0 1px 3px 0 var(--ce-shadow-color, rgb(0 0 0 / 0.1)),0 1px 2px -1px var(--ce-shadow-color, rgb(0 0 0 / 0.1));","shadow-md":"--ce-shadow-color:rgb(0 0 0 / 0.1);box-shadow:0 4px 6px -1px var(--ce-shadow-color, rgb(0 0 0 / 0.1)),0 2px 4px -2px var(--ce-shadow-color, rgb(0 0 0 / 0.1));","shadow-lg":"--ce-shadow-color:rgb(0 0 0 / 0.1);box-shadow:0 10px 15px -3px var(--ce-shadow-color, rgb(0 0 0 / 0.1)),0 4px 6px -4px var(--ce-shadow-color, rgb(0 0 0 / 0.1));","shadow-xl":"--ce-shadow-color:rgb(0 0 0 / 0.1);box-shadow:0 20px 25px -5px var(--ce-shadow-color, rgb(0 0 0 / 0.1)),0 8px 10px -6px var(--ce-shadow-color, rgb(0 0 0 / 0.1));","shadow-2xl":"--ce-shadow-color:rgb(0 0 0 / 0.25);box-shadow:0 25px 50px -12px var(--ce-shadow-color, rgb(0 0 0 / 0.25));","shadow-inner":"box-shadow:inset 0 2px 4px 0 rgb(0 0 0 / 0.05);"}),Object.assign(e,{rounded:"border-radius:0.25rem;",shadow:"--ce-shadow-color:rgb(0 0 0 / 0.1);box-shadow:0 1px 3px 0 var(--ce-shadow-color, rgb(0 0 0 / 0.1)),0 1px 2px -1px var(--ce-shadow-color, rgb(0 0 0 / 0.1));"}),Object.assign(e,{"overflow-auto":"overflow:auto;","overflow-hidden":"overflow:hidden;","overflow-visible":"overflow:visible;","overflow-scroll":"overflow:scroll;","overflow-x-auto":"overflow-x:auto;","overflow-x-hidden":"overflow-x:hidden;","overflow-x-visible":"overflow-x:visible;","overflow-x-scroll":"overflow-x:scroll;","overflow-y-auto":"overflow-y:auto;","overflow-y-hidden":"overflow-y:hidden;","overflow-y-visible":"overflow-y:visible;","overflow-y-scroll":"overflow-y:scroll;"}),Object.assign(e,{"sr-only":"position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border-width:0;","not-sr-only":"position:static;width:auto;height:auto;padding:0;margin:0;overflow:visible;clip:auto;white-space:normal;"}),Object.assign(e,{"pointer-events-none":"pointer-events:none;","pointer-events-auto":"pointer-events:auto;"}),["auto","default","pointer","wait","text","move","help","not-allowed","grab","grabbing"].forEach(a=>{e[`cursor-${a}`]=`cursor:${a};`}),[0,10,20,30,40,50].forEach(a=>{e[`z-${a}`]=`z-index:${a};`}),Object.assign(e,{visible:"visibility:visible;",invisible:"visibility:hidden;"}),Object.assign(e,{"w-full":"width:100%;","w-screen":"width:100dvw;","h-full":"height:100%;","h-screen":"height:100dvh;","max-w-full":"max-width:100%;","max-h-full":"max-height:100%;","max-w-screen":"max-width:100dvw;","max-h-screen":"max-height:100dvh;","min-w-0":"min-width:0;","min-h-0":"min-height:0;","min-w-full":"min-width:100%;","min-h-full":"min-height:100%;","min-w-screen":"min-width:100dvw;","min-h-screen":"min-height:100dvh;","w-auto":"width:auto;","h-auto":"height:auto;","w-fit":"width:fit-content;","h-fit":"height:fit-content;","w-min":"width:min-content;","h-min":"height:min-content;","w-max":"width:max-content;","h-max":"height:max-content;"}),Object.assign(e,{"m-auto":"margin:auto;","mx-auto":"margin-inline:auto;","my-auto":"margin-block:auto;"}),Object.entries(Vt).forEach(([a,p])=>{e[`max-w-${a}`]=`max-width:calc(${fe} * ${p});`,e[`min-w-${a}`]=`min-width:calc(${fe} * ${p});`,e[`w-${a}`]=`width:calc(${fe} * ${p});`,e[`max-h-${a}`]=`max-height:calc(${fe} * ${p});`,e[`min-h-${a}`]=`min-height:calc(${fe} * ${p});`,e[`h-${a}`]=`height:calc(${fe} * ${p});`}),Object.assign(e,{transition:"transition-property:all;transition-duration:150ms;transition-timing-function:ease-in-out;","transition-none":"transition-property:none;","transition-all":"transition-property:all;","transition-colors":"transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;","transition-shadow":"transition-property:box-shadow;","transition-opacity":"transition-property:opacity;","transition-transform":"transition-property:transform;","ease-linear":"transition-timing-function:linear;","ease-in":"transition-timing-function:ease-in;","ease-out":"transition-timing-function:ease-out;","ease-in-out":"transition-timing-function:ease-in-out;","duration-75":"transition-duration:75ms;","duration-100":"transition-duration:100ms;","duration-150":"transition-duration:150ms;","duration-200":"transition-duration:200ms;","duration-300":"transition-duration:300ms;","duration-500":"transition-duration:500ms;","duration-700":"transition-duration:700ms;","duration-1000":"transition-duration:1000ms;"}),Object.assign(e,{"scale-0":"transform:scale(0);","scale-50":"transform:scale(0.5);","scale-75":"transform:scale(0.75);","scale-90":"transform:scale(0.9);","scale-95":"transform:scale(0.95);","scale-100":"transform:scale(1);","scale-105":"transform:scale(1.05);","scale-110":"transform:scale(1.1);","scale-125":"transform:scale(1.25);","scale-150":"transform:scale(1.5);","rotate-0":"transform:rotate(0deg);","rotate-1":"transform:rotate(1deg);","rotate-2":"transform:rotate(2deg);","rotate-3":"transform:rotate(3deg);","rotate-6":"transform:rotate(6deg);","rotate-12":"transform:rotate(12deg);","rotate-45":"transform:rotate(45deg);","rotate-90":"transform:rotate(90deg);","rotate-180":"transform:rotate(180deg);","-rotate-1":"transform:rotate(-1deg);","-rotate-2":"transform:rotate(-2deg);","-rotate-3":"transform:rotate(-3deg);","-rotate-6":"transform:rotate(-6deg);","-rotate-12":"transform:rotate(-12deg);","-rotate-45":"transform:rotate(-45deg);","-rotate-90":"transform:rotate(-90deg);","-rotate-180":"transform:rotate(-180deg);"}),Object.assign(e,{"aspect-auto":"aspect-ratio:auto;","aspect-square":"aspect-ratio:1 / 1;","aspect-video":"aspect-ratio:16 / 9;"}),Object.assign(e,{"object-contain":"object-fit:contain;","object-cover":"object-fit:cover;","object-fill":"object-fit:fill;","object-none":"object-fit:none;","object-scale-down":"object-fit:scale-down;","object-bottom":"object-position:bottom;","object-center":"object-position:center;","object-left":"object-position:left;","object-left-bottom":"object-position:left bottom;","object-left-top":"object-position:left top;","object-right":"object-position:right;","object-right-bottom":"object-position:right bottom;","object-right-top":"object-position:right top;","object-top":"object-position:top;"});for(let a=1;a<=6;a++)e[`line-clamp-${a}`]=`display:-webkit-box;-webkit-line-clamp:${a};-webkit-box-orient:vertical;overflow:hidden;`;e["line-clamp-none"]="overflow:visible;display:block;-webkit-box-orient:horizontal;-webkit-line-clamp:none;";for(let a=1;a<=12;a++)e[`order-${a}`]=`order:${a};`;e["order-first"]="order:-9999;",e["order-last"]="order:9999;",e["order-none"]="order:0;";for(let a=0;a<=12;a++)a<=1||(e[`grow-${a}`]=`flex-grow:${a};`,e[`shrink-${a}`]=`flex-shrink:${a};`);return Object.assign(e,{"bg-gradient-to-t":"background-image:linear-gradient(to top, var(--tw-gradient-stops));","bg-gradient-to-tr":"background-image:linear-gradient(to top right, var(--tw-gradient-stops));","bg-gradient-to-r":"background-image:linear-gradient(to right, var(--tw-gradient-stops));","bg-gradient-to-br":"background-image:linear-gradient(to bottom right, var(--tw-gradient-stops));","bg-gradient-to-b":"background-image:linear-gradient(to bottom, var(--tw-gradient-stops));","bg-gradient-to-bl":"background-image:linear-gradient(to bottom left, var(--tw-gradient-stops));","bg-gradient-to-l":"background-image:linear-gradient(to left, var(--tw-gradient-stops));","bg-gradient-to-tl":"background-image:linear-gradient(to top left, var(--tw-gradient-stops));"}),e})();function Z(e,t){let r=0;for(let n=0;n<e.length;n++){const i=e[n];if(i==="["||i==="(")r++;else if((i==="]"||i===")")&&r>0)r--;else if(r===0&&(i===">"||i==="+"||i==="~"||i===" "))return e.slice(0,n)+t+e.slice(n)}return e+t}const Jt={before:(e,t)=>`${e}::before{${t}}`,after:(e,t)=>`${e}::after{${t}}`,hover:(e,t)=>`${Z(e,":hover")}{${t}}`,focus:(e,t)=>`${Z(e,":focus")}{${t}}`,active:(e,t)=>`${Z(e,":active")}{${t}}`,disabled:(e,t)=>`${Z(e,":disabled")}{${t}}`,visited:(e,t)=>`${Z(e,":visited")}{${t}}`,checked:(e,t)=>`${Z(e,":checked")}{${t}}`,first:(e,t)=>`${Z(e,":first-child")}{${t}}`,last:(e,t)=>`${Z(e,":last-child")}{${t}}`,odd:(e,t)=>`${Z(e,":nth-child(odd)")}{${t}}`,even:(e,t)=>`${Z(e,":nth-child(even)")}{${t}}`,"focus-within":(e,t)=>`${Z(e,":focus-within")}{${t}}`,"focus-visible":(e,t)=>`${Z(e,":focus-visible")}{${t}}`,"group-hover":(e,t)=>`.group:hover ${e}{${t}}`,"group-focus":(e,t)=>`.group:focus ${e}{${t}}`,"group-active":(e,t)=>`.group:active ${e}{${t}}`,"group-disabled":(e,t)=>`.group:disabled ${e}{${t}}`,"peer-hover":(e,t)=>`.peer:hover ~ ${e}{${t}}`,"peer-focus":(e,t)=>`.peer:focus ~ ${e}{${t}}`,"peer-checked":(e,t)=>`.peer:checked ~ ${e}{${t}}`,"peer-disabled":(e,t)=>`.peer:disabled ~ ${e}{${t}}`},ht={sm:"(min-width:640px)",md:"(min-width:768px)",lg:"(min-width:1024px)",xl:"(min-width:1280px)","2xl":"(min-width:1536px)",dark:"(prefers-color-scheme: dark)"},Zt={xs:"(min-width:20rem)",sm:"(min-width:24rem)",md:"(min-width:28rem)",lg:"(min-width:32rem)",xl:"(min-width:36rem)","2xl":"(min-width:42rem)","3xl":"(min-width:48rem)","4xl":"(min-width:56rem)","5xl":"(min-width:64rem)","6xl":"(min-width:72rem)","7xl":"(min-width:80rem)"},ze=["sm","md","lg","xl","2xl"],Ue=["xs","sm","md","lg","xl","2xl","3xl","4xl","5xl","6xl","7xl"];function qe(e){const t=e.startsWith("-"),r=t?e.slice(1):e,n=r.lastIndexOf("-");if(n===-1)return null;const i=r.slice(0,n),s=r.slice(n+1),o=parseFloat(s);if(Number.isNaN(o)||!dt[i])return null;const c=t?"-":"";return dt[i].map(a=>`${a}:calc(${c}${fe} * ${o});`).join("")}function pt(e){const t=e.replace("#",""),r=parseInt(t,16);return`${r>>16&255} ${r>>8&255} ${r&255}`}const Gt=/^(bg|text|border|decoration|shadow|outline|caret|accent|fill|stroke)-([a-z]+)-?(\d{2,3}|DEFAULT)?$/,Qt={bg:"background-color",decoration:"text-decoration-color",text:"color",border:"border-color",outline:"outline-color",caret:"caret-color",accent:"accent-color",fill:"fill",stroke:"stroke"};function Xt(e){const t=Gt.exec(e);if(!t)return null;const[,r,n,i="DEFAULT"]=t,s=ft[n]?.[i];if(!s)return null;if(r==="shadow")return`--ce-shadow-color:${s};`;const o=Qt[r];return o?`${o}:${s};`:null}function Yt(e){const t=e.indexOf("/");if(t===-1)return{base:e};const r=e.slice(0,t),n=e.slice(t+1),i=parseInt(n,10);return isNaN(i)||i<0||i>100?{base:r}:{base:r,opacity:i/100}}function Fe(e){const{base:t,opacity:r}=Yt(e),n=Xt(t);if(n&&r!==void 0){const s=/#([0-9a-f]{6})/i.exec(n);if(s){const o=pt(s[0]);return n.replace(/#([0-9a-f]{6})/i,`rgb(${o} / ${r})`)}}if(n)return n;const i=Re(t);if(i&&r!==void 0){const s=/#([0-9a-f]{6})/i.exec(i);if(s){const o=pt(s[0]);return i.replace(/#([0-9a-f]{6})/i,`rgb(${o} / ${r})`)}}return i}function Ke(e){const t=/^(from|to|via)-([a-z]+)-?(\d{2,3}|DEFAULT)?$/.exec(e);if(!t)return null;const[,r,n,i="DEFAULT"]=t,s=ft[n]?.[i];if(!s)return null;switch(r){case"from":return`--tw-gradient-from:${s} var(--tw-gradient-from-position);--tw-gradient-to:rgb(255 255 255 / 0) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-from), var(--tw-gradient-to);`;case"to":return`--tw-gradient-to:${s} var(--tw-gradient-to-position);`;case"via":return`--tw-gradient-to:rgb(255 255 255 / 0) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-from), ${s} var(--tw-gradient-via-position), var(--tw-gradient-to);`;default:return null}}function Ve(e){const t=/^opacity-(\d{1,3})$/.exec(e);if(!t)return null;const r=parseInt(t[1],10);return r<0||r>100?null:`opacity:${r/100};`}function Re(e){if(e.startsWith("[")&&e.endsWith("]")&&!e.includes("-[")){const o=e.slice(1,-1).trim(),c=o.indexOf(":");if(c===-1)return null;const a=o.slice(0,c).trim();let p=o.slice(c+1).trim();return/^[a-zA-Z][a-zA-Z0-9-]*$/.test(a)?(p=p.replace(/url\('\s*([^']*?)\s*'\)/g,'url("$1")'),p=p.replace(/^'([^']*)'$/g,'"$1"'),`${a}:${p};`):null}const t=e.indexOf("-[");if(t<=0||!e.endsWith("]"))return null;const r=e.slice(0,t);let n=e.slice(t+2,-1).replace(/_/g," ");const i={bg:"background-color",shadow:"box-shadow",p:"padding",px:"padding-inline",py:"padding-block",m:"margin",mx:"margin-inline",my:"margin-block",w:"width",h:"height","min-w":"min-width","max-w":"max-width","min-h":"min-height","max-h":"max-height","border-t":"border-top-width","border-b":"border-bottom-width","border-l":"border-left-width","border-r":"border-right-width","border-x":"border-inline-width","border-y":"border-block-width","grid-cols":"grid-template-columns","grid-rows":"grid-template-rows",transition:"transition-property",ease:"transition-timing-function",delay:"transition-delay",duration:"transition-duration",list:"list-style",break:"word-break",flex:"flex-direction",items:"align-items",justify:"justify-content",content:"align-content",self:"align-self",basis:"flex-basis",tracking:"letter-spacing",leading:"line-height",z:"z-index",opacity:"opacity"};if(r==="text")return/^\d*\.?\d+(px|rem|em|%|vh|vw|ch|ex)$/.test(n)?`font-size:${n};`:`color:${n};`;if(r==="rotate")return`transform:rotate(${n});`;if(r==="scale")return`transform:scale(${n});`;if(r==="translate-x")return`transform:translateX(${n});`;if(r==="translate-y")return`transform:translateY(${n});`;const s=i[r]??r.replace(/_/g,"-");return s&&n?`${s}:${n};`:null}function er(e){if(e.startsWith("[")&&e.endsWith("]")){const r=e.slice(1,-1);return r.includes("&")?r:e}const t=e.indexOf("-[");if(t>0&&e.endsWith("]")){const r=e.slice(t+2,-1).replace(/_/g,"-");return r.includes("&")?r:e.replace(/_/g,"-")}return null}function gt(e){return e.replace(/([!"#$%&'()*+,./:;<=>?@[\\\]^`{|}~])/g,"\\$1")}function tr(e){const t=/class\s*=\s*(['"])(.*?)\1/g,r=[];let n;for(;n=t.exec(e);){const i=n[2].split(/\s+/).filter(Boolean);i.length&&r.push(...i)}return r}const ve=new Map,rr=16,mt=1e3;function nr(e){const t=Date.now(),r=ve.get(e);if(r&&t-r.timestamp<rr)return r.css;const n=tr(e);if(!n.length)return"";const i=new Set(n),s=[[],[],[],[]],o={},c=(u,y=!1)=>{const w=y?`dark|${u}`:u;if(w in o)return o[w];const l=v(u,y);return o[w]=l,l},a=u=>{const y=u.some(f=>ze.includes(f)),w=u.some(f=>f.startsWith("@")&&(Ue.includes(f.slice(1))||f.match(/^@\[.+\]$/))),l=u.includes("dark");return u.length?!y&&!l&&!w?1:l&&(y||w)?3:2:0},p=u=>{const y=[];let w="",l=0;for(let f=0;f<u.length;f++){const b=u[f];b==="["||b==="("?l++:(b==="]"||b===")")&&l--,b===":"&&l===0?(y.push(w),w=""):w+=b}return w&&y.push(w),y},h={hover:":hover",focus:":focus",active:":active",visited:":visited",disabled:":disabled",checked:":checked",first:":first-child",last:":last-child",odd:":nth-child(odd)",even:":nth-child(even)","focus-within":":focus-within","focus-visible":":focus-visible"},v=(u,y=!1)=>{const w=p(u);let l="",f=!1;for(const E of w){let R=E;if(R.startsWith("!")&&(f=!0,R=R.slice(1)),Be[R]||qe(R)||Ve(R)||Fe(R)||Ke(R)||Re(R)){l=E;break}}if(!l)return null;const b=l.replace(/^!/,""),k=Be[b]??qe(b)??Ve(b)??Fe(b)??Ke(b)??Re(b);if(!k)return null;const C=w.indexOf(l);let g=C>=0?w.slice(0,C):[];y&&(g=g.filter(E=>E!=="dark"));const $=`.${gt(u)}`,O=f?k.replace(/;/g," !important;"):k,x="__SUBJECT__";let _=x;const j=[];for(const E of g)E.startsWith("group-")?(_=`.group:${E.slice(6)} ${_}`,j.push(E)):E.startsWith("peer-")&&(_=_.replace(x,`.peer:${E.slice(5)}~${x}`),j.push(E));g=g.filter(E=>!j.includes(E));const I=[],A=[];let T=null;for(const E of g){if(E==="dark"||ze.includes(E)||E.startsWith("@")&&(Ue.includes(E.slice(1))||E.match(/^@\[.+\]$/)))continue;const R=er(E);if(R){T=R;continue}const P=h[E];if(P){T?A.push(P):I.push(P);continue}const q=Jt[E];typeof q=="function"&&(_=q(_,O).split("{")[0])}const U=I.join(""),ie=A.join("");function We(E,R){if(!R)return E;let P=0,q=0;if(E.length&&(E[0]===">"||E[0]==="+"||E[0]==="~"||E[0]===" ")){let L=1;for(;L<E.length&&E[L]===" ";)L++;for(;L<E.length;L++){const F=E[L];if(F==="["?P++:F==="]"&&P>0?P--:F==="("?q++:F===")"&&q>0&&q--,P===0&&q===0&&(E[L]===">"||E[L]==="+"||E[L]==="~"||E[L]===" "))return E.slice(0,L)+R+E.slice(L)}return E+R}for(let L=0;L<E.length;L++){const F=E[L];if(F==="["?P++:F==="]"&&P>0?P--:F==="("?q++:F===")"&&q>0&&q--,P===0&&q===0&&(F===">"||F==="+"||F==="~"||F===" "))return E.slice(0,L)+R+E.slice(L)}return E+R}if(T)if(T.includes("&")){const E=T.indexOf("&"),R=T.slice(0,E),P=T.slice(E+1),q=x+U;if(I.length===0)_=_.replace(x,R+q+ie+P);else{const L=We(P,ie);_=_.replace(x,R+q+L)}}else _=_.replace(x,`${T}${x+U}`),ie&&(_=_.replace(x,`${x}${ie}`));else _=_.replace(x,x+U+ie);_=_.replace(new RegExp(x,"g"),$);let H=`${_}{${O}}`;const D=g.filter(E=>ze.includes(E)),G=g.filter(E=>E.startsWith("@")&&(Ue.includes(E.slice(1))||E.match(/^@\[.+\]$/))),V=D.length?D[D.length-1]:null,X=G.length?G[G.length-1]:null,N=g.includes("dark");let Y="",se="";if(N&&V?Y=`@media (prefers-color-scheme: dark) and ${ht[V]}`:N?Y="@media (prefers-color-scheme: dark)":V&&(Y=`@media ${ht[V]}`),X)if(X.startsWith("@[")&&X.endsWith("]")){const E=X.slice(2,-1);if(!/^-?\d*\.?\d+(px|rem|em|%|vh|vw|ch|ex|cm|mm|in|pt|pc)$/.test(E))return null;se=`@container (min-width:${E})`}else{const E=X.slice(1);se=`@container ${Zt[E]||`(min-width:${E})`}`}return Y&&se?H=`${Y}${se}{${H}}`:Y?H=`${Y}{${H}}`:se&&(H=`${se}{${H}}`),H};for(const u of i){const y=p(u),w=y.find(C=>Be[C.replace(/^!/,"")]||qe(C.replace(/^!/,""))||Ve(C.replace(/^!/,""))||Fe(C.replace(/^!/,""))||Ke(C.replace(/^!/,""))||Re(C.replace(/^!/,"")));if(!w)continue;const l=y.indexOf(w),f=l>=0?y.slice(0,l):[],b=a(f),k=c(u);k&&s[b].push(k)}const m=/^(from|via|to)-[a-z]+-?\d{2,3}?$/;for(const u of i)if(m.test(u)){if(s.flat().join("").includes(`.${gt(u)}`))continue;const w=c(u);w&&s[0].push(w)}const d=s.flat().join("");return ve.size>=mt&&Array.from(ve.keys()).slice(0,Math.floor(mt/2)).forEach(y=>ve.delete(y)),ve.set(e,{css:d,timestamp:t}),d}const xe=[];function ir(e,t,r,n,i,s,o,c){if(e){xe.push(r);try{const a=t.render(r);if(a instanceof Promise){s(!0),a.then(p=>{s(!1),o(null),yt(e,p,r,n,i),c(e.innerHTML)}).catch(p=>{s(!1),o(p)});return}yt(e,a,r,n,i),c(e.innerHTML)}finally{xe.pop()}}}function yt(e,t,r,n,i){e&&(qt(e,Array.isArray(t)?t:[t],r,n),i(e.innerHTML))}function sr(e,t,r,n,i,s,o){if(s!==null&&clearTimeout(s),Date.now()-t<16){if(i(r+1),r===15)console.warn(`⚠️ Component is re-rendering rapidly. This might indicate:
|
|
115
|
+
`,Lt=Object.fromEntries(Object.entries({neutral:{50:"#fafafa",100:"#f4f4f5",200:"#e4e4e7",300:"#d4d4d8",400:"#9f9fa9",500:"#71717b",600:"#52525c",700:"#3f3f46",800:"#27272a",900:"#18181b",950:"#09090b"},primary:{50:"#eff6ff",100:"#dbeafe",200:"#bfdbfe",300:"#93c5fd",400:"#60a5fa",500:"#3b82f6",600:"#2563eb",700:"#1d4ed8",800:"#1e40af",900:"#1e3a8a",950:"#172554"},secondary:{50:"#eef2ff",100:"#e0e7ff",200:"#c7d2fe",300:"#a5b4fc",400:"#818cf8",500:"#6366f1",600:"#4f46e5",700:"#4338ca",800:"#3730a3",900:"#312e81",950:"#1e1b4b"},success:{50:"#f0fdf4",100:"#dcfce7",200:"#bbf7d0",300:"#86efac",400:"#4ade80",500:"#22c55e",600:"#16a34a",700:"#15803d",800:"#166534",900:"#14532d",950:"#052e16"},info:{50:"#f0f9ff",100:"#e0f2fe",200:"#bae6fd",300:"#7dd3fc",400:"#38bdf8",500:"#0ea5e9",600:"#0284c7",700:"#0369a1",800:"#075985",900:"#0c4a6e",950:"#082f49"},warning:{50:"#fffbeb",100:"#fef3c7",200:"#fde68a",300:"#fcd34d",400:"#fbbf24",500:"#f59e0b",600:"#d97706",700:"#b45309",800:"#92400e",900:"#78350f",950:"#451a03"},error:{50:"#fef2f2",100:"#fee2e2",200:"#fecaca",300:"#fca5a5",400:"#f87171",500:"#ef4444",600:"#dc2626",700:"#b91c1c",800:"#991b1b",900:"#7f1d1d",950:"#450a0a"},white:{DEFAULT:"#ffffff"},black:{DEFAULT:"#000000"},transparent:{DEFAULT:"transparent"},current:{DEFAULT:"currentColor"}}).map(([e,t])=>[e,Object.fromEntries(Object.entries(t).map(([r,n])=>[r,`var(--color-${e}${r==="DEFAULT"?"":`-${r}`}, ${n})`]))])),ge="0.25rem",xn={"3xs":64,"2xs":72,xs:80,sm:96,md:112,lg:128,xl:144,"2xl":168,"3xl":192,"4xl":224,"5xl":256,"6xl":288,"7xl":320},it={m:["margin"],mx:["margin-inline"],my:["margin-block"],mt:["margin-top"],mr:["margin-right"],mb:["margin-bottom"],ml:["margin-left"],p:["padding"],px:["padding-inline"],py:["padding-block"],pt:["padding-top"],pr:["padding-right"],pb:["padding-bottom"],pl:["padding-left"],inset:["inset"],"inset-x":["inset-inline"],"inset-y":["inset-block"],h:["height"],w:["width"],"min-h":["min-height"],"min-w":["min-width"],"max-h":["max-height"],"max-w":["max-width"],top:["top"],bottom:["bottom"],left:["left"],right:["right"],gap:["gap"],"gap-x":["column-gap"],"gap-y":["row-gap"]},ot=(()=>{const e={};e["@container"]="container-type:inline-size;",["block","inline","inline-block","flex","inline-flex","grid","inline-grid","table","table-cell","table-row","hidden"].forEach(a=>{e[a]=a==="hidden"?"display:none;":`display:${a};`}),["absolute","relative","fixed","sticky","static"].forEach(a=>{e[a]=`position:${a};`}),Object.assign(e,{"items-center":"align-items:center;","items-start":"align-items:flex-start;","items-end":"align-items:flex-end;","items-baseline":"align-items:baseline;","items-stretch":"align-items:stretch;","justify-center":"justify-content:center;","justify-start":"justify-content:flex-start;","justify-between":"justify-content:space-between;","justify-around":"justify-content:space-around;","justify-evenly":"justify-content:space-evenly;","justify-end":"justify-content:flex-end;","flex-wrap":"flex-wrap:wrap;","flex-nowrap":"flex-wrap:nowrap;","flex-wrap-reverse":"flex-wrap:wrap-reverse;","content-center":"align-content:center;","content-start":"align-content:flex-start;","content-end":"align-content:flex-end;","content-between":"align-content:space-between;","content-around":"align-content:space-around;","content-evenly":"align-content:space-evenly;","content-stretch":"align-content:stretch;","self-auto":"align-self:auto;","self-start":"align-self:flex-start;","self-end":"align-self:flex-end;","self-center":"align-self:center;","self-stretch":"align-self:stretch;","flex-col":"flex-direction:column;","flex-row":"flex-direction:row;","flex-col-reverse":"flex-direction:column-reverse;","flex-row-reverse":"flex-direction:row-reverse;","flex-1":"flex:1 1 0%;","flex-auto":"flex:1 1 auto;","flex-initial":"flex:0 1 auto;","flex-none":"flex:0 0 auto;",grow:"flex-grow:1;",shrink:"flex-shrink:1;","grow-0":"flex-grow:0;","shrink-0":"flex-shrink:0;"});for(let a=1;a<=12;a++)e[`grid-cols-${a}`]=`grid-template-columns:repeat(${a},minmax(0,1fr));`,e[`grid-rows-${a}`]=`grid-template-rows:repeat(${a},minmax(0,1fr));`,e[`col-span-${a}`]=`grid-column:span ${a} / span ${a};`,e[`row-span-${a}`]=`grid-row:span ${a} / span ${a};`,e[`col-start-${a}`]=`grid-column-start:${a};`,e[`col-end-${a}`]=`grid-column-end:${a};`,e[`row-start-${a}`]=`grid-row-start:${a};`,e[`row-end-${a}`]=`grid-row-end:${a};`;Object.assign(e,{"grid-cols-none":"grid-template-columns:none;","grid-rows-none":"grid-template-rows:none;","col-span-full":"grid-column:1 / -1;","row-span-full":"grid-row:1 / -1;","auto-cols-auto":"grid-auto-columns:auto;","auto-cols-min":"grid-auto-columns:min-content;","auto-cols-max":"grid-auto-columns:max-content;","auto-cols-fr":"grid-auto-columns:1fr;","auto-rows-auto":"grid-auto-rows:auto;","auto-rows-min":"grid-auto-rows:min-content;","auto-rows-max":"grid-auto-rows:max-content;","auto-rows-fr":"grid-auto-rows:1fr;","grid-flow-row":"grid-auto-flow:row;","grid-flow-col":"grid-auto-flow:column;","grid-flow-row-dense":"grid-auto-flow:row dense;","grid-flow-col-dense":"grid-auto-flow:column dense;"}),Object.assign(e,{"text-left":"text-align:left;","text-center":"text-align:center;","text-right":"text-align:right;","text-justify":"text-align:justify;","font-thin":"font-weight:100;","font-extralight":"font-weight:200;","font-light":"font-weight:300;","font-normal":"font-weight:400;","font-medium":"font-weight:500;","font-semibold":"font-weight:600;","font-bold":"font-weight:700;","font-extrabold":"font-weight:800;","font-black":"font-weight:900;",italic:"font-style:italic;","not-italic":"font-style:normal;",uppercase:"text-transform:uppercase;",lowercase:"text-transform:lowercase;",capitalize:"text-transform:capitalize;","normal-case":"text-transform:none;",underline:"text-decoration-line:underline;",overline:"text-decoration-line:overline;","line-through":"text-decoration-line:line-through;","no-underline":"text-decoration-line:none;",truncate:"overflow:hidden;text-overflow:ellipsis;white-space:nowrap;","whitespace-normal":"white-space:normal;","whitespace-nowrap":"white-space:nowrap;","whitespace-pre":"white-space:pre;","whitespace-pre-line":"white-space:pre-line;","whitespace-pre-wrap":"white-space:pre-wrap;","break-normal":"overflow-wrap:normal;word-break:normal;","break-words":"overflow-wrap:break-word;","break-all":"word-break:break-all;"}),[["text-xs","0.75rem","1"],["text-sm","0.875rem","1.25"],["text-base","1rem","1.5"],["text-lg","1.125rem","1.75"],["text-xl","1.25rem","1.75"],["text-2xl","1.5rem","2"],["text-3xl","1.875rem","2.25"],["text-4xl","2.25rem","2.5"],["text-5xl","3rem","1"],["text-6xl","3.75rem","1"],["text-7xl","4.5rem","1"],["text-8xl","6rem","1"],["text-9xl","8rem","1"]].forEach(([a,d,b])=>{e[a]=`font-size:${d};line-height:${b};`}),[["tracking-tighter","-0.05em"],["tracking-tight","-0.025em"],["tracking-normal","0em"],["tracking-wide","0.025em"],["tracking-wider","0.05em"],["tracking-widest","0.1em"]].forEach(([a,d])=>{e[a]=`letter-spacing:${d};`}),[["leading-3","0.75rem"],["leading-4","1rem"],["leading-5","1.25rem"],["leading-6","1.5rem"],["leading-7","1.75rem"],["leading-8","2rem"],["leading-9","2.25rem"],["leading-10","2.5rem"],["leading-none","1"],["leading-tight","1.25"],["leading-snug","1.375"],["leading-normal","1.5"],["leading-relaxed","1.625"],["leading-loose","2"]].forEach(([a,d])=>{e[a]=`line-height:${d};`});const o=[0,1,2,4,6,8];for(const a of o){const d=`${a}px`;e[`border-${a}`]=`border-width:${d};`,e[`border-t-${a}`]=`border-top-width:${d};`,e[`border-r-${a}`]=`border-right-width:${d};`,e[`border-b-${a}`]=`border-bottom-width:${d};`,e[`border-l-${a}`]=`border-left-width:${d};`,e[`border-x-${a}`]=`border-left-width:${d};border-right-width:${d};`,e[`border-y-${a}`]=`border-top-width:${d};border-bottom-width:${d};`}Object.assign(e,{"font-sans":"font-family:var(--font-sans, ui-sans-serif,system-ui,sans-serif);","font-serif":"font-family:var(--font-serif, ui-serif,Georgia,serif);","font-mono":"font-family:var(--font-mono, ui-monospace,SFMono-Regular,monospace);",border:"border-width:1px;","border-t":"border-top-width:1px;","border-r":"border-right-width:1px;","border-b":"border-bottom-width:1px;","border-l":"border-left-width:1px;","border-x":"border-left-width:1px;border-right-width:1px;","border-y":"border-top-width:1px;border-bottom-width:1px;","border-solid":"border-style:solid;","border-dashed":"border-style:dashed;","border-dotted":"border-style:dotted;","border-double":"border-style:double;","border-none":"border-style:none;"});const s={none:0,xs:2,sm:4,md:6,lg:8,xl:12,"2xl":16,"3xl":24,"4xl":32,full:9999};for(const[a,d]of Object.entries(s)){const b=d===9999?"9999px":`${d/16}rem`;e[`rounded-${a}`]=`border-radius:${b};`,e[`rounded-t-${a}`]=`border-top-left-radius:${b};border-top-right-radius:${b};`,e[`rounded-r-${a}`]=`border-top-right-radius:${b};border-bottom-right-radius:${b};`,e[`rounded-b-${a}`]=`border-bottom-left-radius:${b};border-bottom-right-radius:${b};`,e[`rounded-l-${a}`]=`border-top-left-radius:${b};border-bottom-left-radius:${b};`,e[`rounded-tl-${a}`]=`border-top-left-radius:${b};`,e[`rounded-tr-${a}`]=`border-top-right-radius:${b};`,e[`rounded-br-${a}`]=`border-bottom-right-radius:${b};`,e[`rounded-bl-${a}`]=`border-bottom-left-radius:${b};`}Object.assign(e,{"shadow-none":"--ce-shadow-color:rgb(0 0 0 / 0);box-shadow:0 0 var(--ce-shadow-color, #0000);","shadow-xs":"--ce-shadow-color:rgb(0 0 0 / 0.05);box-shadow:0 1px 2px 0 var(--ce-shadow-color, rgb(0 0 0 / 0.05));","shadow-sm":"--ce-shadow-color:rgb(0 0 0 / 0.1);box-shadow:0 1px 3px 0 var(--ce-shadow-color, rgb(0 0 0 / 0.1)),0 1px 2px -1px var(--ce-shadow-color, rgb(0 0 0 / 0.1));",shadow:"--ce-shadow-color:rgb(0 0 0 / 0.1);box-shadow:0 1px 3px 0 var(--ce-shadow-color, rgb(0 0 0 / 0.1)),0 1px 2px -1px var(--ce-shadow-color, rgb(0 0 0 / 0.1));","shadow-md":"--ce-shadow-color:rgb(0 0 0 / 0.1);box-shadow:0 4px 6px -1px var(--ce-shadow-color, rgb(0 0 0 / 0.1)),0 2px 4px -2px var(--ce-shadow-color, rgb(0 0 0 / 0.1));","shadow-lg":"--ce-shadow-color:rgb(0 0 0 / 0.1);box-shadow:0 10px 15px -3px var(--ce-shadow-color, rgb(0 0 0 / 0.1)),0 4px 6px -4px var(--ce-shadow-color, rgb(0 0 0 / 0.1));","shadow-xl":"--ce-shadow-color:rgb(0 0 0 / 0.1);box-shadow:0 20px 25px -5px var(--ce-shadow-color, rgb(0 0 0 / 0.1)),0 8px 10px -6px var(--ce-shadow-color, rgb(0 0 0 / 0.1));","shadow-2xl":"--ce-shadow-color:rgb(0 0 0 / 0.25);box-shadow:0 25px 50px -12px var(--ce-shadow-color, rgb(0 0 0 / 0.25));","shadow-inner":"box-shadow:inset 0 2px 4px 0 rgb(0 0 0 / 0.05);"}),Object.assign(e,{rounded:"border-radius:0.25rem;",shadow:"--ce-shadow-color:rgb(0 0 0 / 0.1);box-shadow:0 1px 3px 0 var(--ce-shadow-color, rgb(0 0 0 / 0.1)),0 1px 2px -1px var(--ce-shadow-color, rgb(0 0 0 / 0.1));"}),Object.assign(e,{"overflow-auto":"overflow:auto;","overflow-hidden":"overflow:hidden;","overflow-visible":"overflow:visible;","overflow-scroll":"overflow:scroll;","overflow-x-auto":"overflow-x:auto;","overflow-x-hidden":"overflow-x:hidden;","overflow-x-visible":"overflow-x:visible;","overflow-x-scroll":"overflow-x:scroll;","overflow-y-auto":"overflow-y:auto;","overflow-y-hidden":"overflow-y:hidden;","overflow-y-visible":"overflow-y:visible;","overflow-y-scroll":"overflow-y:scroll;"});const c=["auto","default","pointer","wait","text","move","help","not-allowed","grab","grabbing"];for(const a of c)e[`cursor-${a}`]=`cursor:${a};`;for(const a of[0,10,20,30,40,50])e[`z-${a}`]=`z-index:${a};`;Object.assign(e,{"sr-only":"position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border-width:0;","not-sr-only":"position:static;width:auto;height:auto;padding:0;margin:0;overflow:visible;clip:auto;white-space:normal;","pointer-events-none":"pointer-events:none;","pointer-events-auto":"pointer-events:auto;",visible:"visibility:visible;",invisible:"visibility:hidden;"}),Object.assign(e,{"w-full":"width:100%;","w-screen":"width:100dvw;","h-full":"height:100%;","h-screen":"height:100dvh;","max-w-full":"max-width:100%;","max-h-full":"max-height:100%;","max-w-screen":"max-width:100dvw;","max-h-screen":"max-height:100dvh;","min-w-0":"min-width:0;","min-h-0":"min-height:0;","min-w-full":"min-width:100%;","min-h-full":"min-height:100%;","min-w-screen":"min-width:100dvw;","min-h-screen":"min-height:100dvh;","w-auto":"width:auto;","h-auto":"height:auto;","w-fit":"width:fit-content;","h-fit":"height:fit-content;","w-min":"width:min-content;","h-min":"height:min-content;","w-max":"width:max-content;","h-max":"height:max-content;","m-auto":"margin:auto;","mx-auto":"margin-inline:auto;","my-auto":"margin-block:auto;"});for(const[a,d]of Object.entries(xn))e[`max-w-${a}`]=`max-width:calc(${ge} * ${d});`,e[`min-w-${a}`]=`min-width:calc(${ge} * ${d});`,e[`w-${a}`]=`width:calc(${ge} * ${d});`,e[`max-h-${a}`]=`max-height:calc(${ge} * ${d});`,e[`min-h-${a}`]=`min-height:calc(${ge} * ${d});`,e[`h-${a}`]=`height:calc(${ge} * ${d});`;Object.assign(e,{transition:"transition-property:all;transition-duration:150ms;transition-timing-function:ease-in-out;","transition-none":"transition-property:none;","transition-all":"transition-property:all;","transition-colors":"transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;","transition-shadow":"transition-property:box-shadow;","transition-opacity":"transition-property:opacity;","transition-transform":"transition-property:transform;","ease-linear":"transition-timing-function:linear;","ease-in":"transition-timing-function:ease-in;","ease-out":"transition-timing-function:ease-out;","ease-in-out":"transition-timing-function:ease-in-out;","duration-75":"transition-duration:75ms;","duration-100":"transition-duration:100ms;","duration-150":"transition-duration:150ms;","duration-200":"transition-duration:200ms;","duration-300":"transition-duration:300ms;","duration-500":"transition-duration:500ms;","duration-700":"transition-duration:700ms;","duration-1000":"transition-duration:1000ms;"}),Object.assign(e,{"scale-0":"transform:scale(0);","scale-50":"transform:scale(0.5);","scale-75":"transform:scale(0.75);","scale-90":"transform:scale(0.9);","scale-95":"transform:scale(0.95);","scale-100":"transform:scale(1);","scale-105":"transform:scale(1.05);","scale-110":"transform:scale(1.1);","scale-125":"transform:scale(1.25);","scale-150":"transform:scale(1.5);","rotate-0":"transform:rotate(0deg);","rotate-1":"transform:rotate(1deg);","rotate-2":"transform:rotate(2deg);","rotate-3":"transform:rotate(3deg);","rotate-6":"transform:rotate(6deg);","rotate-12":"transform:rotate(12deg);","rotate-45":"transform:rotate(45deg);","rotate-90":"transform:rotate(90deg);","rotate-180":"transform:rotate(180deg);","-rotate-1":"transform:rotate(-1deg);","-rotate-2":"transform:rotate(-2deg);","-rotate-3":"transform:rotate(-3deg);","-rotate-6":"transform:rotate(-6deg);","-rotate-12":"transform:rotate(-12deg);","-rotate-45":"transform:rotate(-45deg);","-rotate-90":"transform:rotate(-90deg);","-rotate-180":"transform:rotate(-180deg);"}),Object.assign(e,{"aspect-auto":"aspect-ratio:auto;","aspect-square":"aspect-ratio:1 / 1;","aspect-video":"aspect-ratio:16 / 9;"}),Object.assign(e,{"object-contain":"object-fit:contain;","object-cover":"object-fit:cover;","object-fill":"object-fit:fill;","object-none":"object-fit:none;","object-scale-down":"object-fit:scale-down;","object-bottom":"object-position:bottom;","object-center":"object-position:center;","object-left":"object-position:left;","object-left-bottom":"object-position:left bottom;","object-left-top":"object-position:left top;","object-right":"object-position:right;","object-right-bottom":"object-position:right bottom;","object-right-top":"object-position:right top;","object-top":"object-position:top;"});for(let a=1;a<=6;a++)e[`line-clamp-${a}`]=`display:-webkit-box;-webkit-line-clamp:${a};-webkit-box-orient:vertical;overflow:hidden;`;e["line-clamp-none"]="overflow:visible;display:block;-webkit-box-orient:horizontal;-webkit-line-clamp:none;";for(let a=1;a<=12;a++)e[`order-${a}`]=`order:${a};`;e["order-first"]="order:-9999;",e["order-last"]="order:9999;",e["order-none"]="order:0;";for(let a=0;a<=12;a++)a<=1||(e[`grow-${a}`]=`flex-grow:${a};`,e[`shrink-${a}`]=`flex-shrink:${a};`);return Object.assign(e,{"bg-linear-to-t":"background-image:linear-gradient(to top, var(--tw-gradient-stops));","bg-linear-to-tr":"background-image:linear-gradient(to top right, var(--tw-gradient-stops));","bg-linear-to-r":"background-image:linear-gradient(to right, var(--tw-gradient-stops));","bg-linear-to-br":"background-image:linear-gradient(to bottom right, var(--tw-gradient-stops));","bg-linear-to-b":"background-image:linear-gradient(to bottom, var(--tw-gradient-stops));","bg-linear-to-bl":"background-image:linear-gradient(to bottom left, var(--tw-gradient-stops));","bg-linear-to-l":"background-image:linear-gradient(to left, var(--tw-gradient-stops));","bg-linear-to-tl":"background-image:linear-gradient(to top left, var(--tw-gradient-stops));","bg-radial":"background-image:radial-gradient(ellipse at center, var(--tw-gradient-stops));","bg-radial-at-t":"background-image:radial-gradient(ellipse at top, var(--tw-gradient-stops));","bg-radial-at-tr":"background-image:radial-gradient(ellipse at top right, var(--tw-gradient-stops));","bg-radial-at-r":"background-image:radial-gradient(ellipse at right, var(--tw-gradient-stops));","bg-radial-at-br":"background-image:radial-gradient(ellipse at bottom right, var(--tw-gradient-stops));","bg-radial-at-b":"background-image:radial-gradient(ellipse at bottom, var(--tw-gradient-stops));","bg-radial-at-bl":"background-image:radial-gradient(ellipse at bottom left, var(--tw-gradient-stops));","bg-radial-at-l":"background-image:radial-gradient(ellipse at left, var(--tw-gradient-stops));","bg-radial-at-tl":"background-image:radial-gradient(ellipse at top left, var(--tw-gradient-stops));","bg-radial-circle":"background-image:radial-gradient(circle at center, var(--tw-gradient-stops));","bg-radial-circle-at-t":"background-image:radial-gradient(circle at top, var(--tw-gradient-stops));","bg-radial-circle-at-tr":"background-image:radial-gradient(circle at top right, var(--tw-gradient-stops));","bg-radial-circle-at-r":"background-image:radial-gradient(circle at right, var(--tw-gradient-stops));","bg-radial-circle-at-br":"background-image:radial-gradient(circle at bottom right, var(--tw-gradient-stops));","bg-radial-circle-at-b":"background-image:radial-gradient(circle at bottom, var(--tw-gradient-stops));","bg-radial-circle-at-bl":"background-image:radial-gradient(circle at bottom left, var(--tw-gradient-stops));","bg-radial-circle-at-l":"background-image:radial-gradient(circle at left, var(--tw-gradient-stops));","bg-radial-circle-at-tl":"background-image:radial-gradient(circle at top left, var(--tw-gradient-stops));","bg-conic":"background-image:conic-gradient(from 0deg at center, var(--tw-gradient-stops));","bg-conic-at-t":"background-image:conic-gradient(from 0deg at top, var(--tw-gradient-stops));","bg-conic-at-tr":"background-image:conic-gradient(from 0deg at top right, var(--tw-gradient-stops));","bg-conic-at-r":"background-image:conic-gradient(from 0deg at right, var(--tw-gradient-stops));","bg-conic-at-br":"background-image:conic-gradient(from 0deg at bottom right, var(--tw-gradient-stops));","bg-conic-at-b":"background-image:conic-gradient(from 0deg at bottom, var(--tw-gradient-stops));","bg-conic-at-bl":"background-image:conic-gradient(from 0deg at bottom left, var(--tw-gradient-stops));","bg-conic-at-l":"background-image:conic-gradient(from 0deg at left, var(--tw-gradient-stops));","bg-conic-at-tl":"background-image:conic-gradient(from 0deg at top left, var(--tw-gradient-stops));"}),e})();function te(e,t){let r=0;for(let n=0;n<e.length;n++){const i=e[n];if(i==="["||i==="(")r++;else if((i==="]"||i===")")&&r>0)r--;else if(r===0&&(i===">"||i==="+"||i==="~"||i===" "))return e.slice(0,n)+t+e.slice(n)}return e+t}const $n={before:(e,t)=>`${e}::before{${t}}`,after:(e,t)=>`${e}::after{${t}}`,hover:(e,t)=>`${te(e,":hover")}{${t}}`,focus:(e,t)=>`${te(e,":focus")}{${t}}`,active:(e,t)=>`${te(e,":active")}{${t}}`,disabled:(e,t)=>`${te(e,":disabled")}{${t}}`,visited:(e,t)=>`${te(e,":visited")}{${t}}`,checked:(e,t)=>`${te(e,":checked")}{${t}}`,first:(e,t)=>`${te(e,":first-child")}{${t}}`,last:(e,t)=>`${te(e,":last-child")}{${t}}`,odd:(e,t)=>`${te(e,":nth-child(odd)")}{${t}}`,even:(e,t)=>`${te(e,":nth-child(even)")}{${t}}`,"focus-within":(e,t)=>`${te(e,":focus-within")}{${t}}`,"focus-visible":(e,t)=>`${te(e,":focus-visible")}{${t}}`,"group-hover":(e,t)=>`.group:hover ${e}{${t}}`,"group-focus":(e,t)=>`.group:focus ${e}{${t}}`,"group-active":(e,t)=>`.group:active ${e}{${t}}`,"group-disabled":(e,t)=>`.group:disabled ${e}{${t}}`,"peer-hover":(e,t)=>`.peer:hover ~ ${e}{${t}}`,"peer-focus":(e,t)=>`.peer:focus ~ ${e}{${t}}`,"peer-checked":(e,t)=>`.peer:checked ~ ${e}{${t}}`,"peer-disabled":(e,t)=>`.peer:disabled ~ ${e}{${t}}`},st={sm:"(min-width:640px)",md:"(min-width:768px)",lg:"(min-width:1024px)",xl:"(min-width:1280px)","2xl":"(min-width:1536px)",dark:"(prefers-color-scheme: dark)"},Pt={xs:"(min-width:20rem)",sm:"(min-width:24rem)",md:"(min-width:28rem)",lg:"(min-width:32rem)",xl:"(min-width:36rem)","2xl":"(min-width:42rem)","3xl":"(min-width:48rem)","4xl":"(min-width:56rem)","5xl":"(min-width:64rem)","6xl":"(min-width:72rem)","7xl":"(min-width:80rem)"},at=["sm","md","lg","xl","2xl"],ct=["xs","sm","md","lg","xl","2xl","3xl","4xl","5xl","6xl","7xl"];function lt(e){const t=e.startsWith("-"),r=t?e.slice(1):e,n=r.lastIndexOf("-");if(n===-1)return null;const i=r.slice(0,n),o=r.slice(n+1);if(!it[i])return null;if(o.includes("/")){const[a,d]=o.split("/").map(y=>parseFloat(y));if(Number.isNaN(a)||Number.isNaN(d)||d===0)return null;const b=a/d*100;return it[i].map(y=>`${y}:${b}%;`).join("")}const s=parseFloat(o);if(Number.isNaN(s))return null;const c=t?"-":"";return it[i].map(a=>`${a}:calc(${c}${ge} * ${s});`).join("")}function Rt(e){const t=e.replace("#",""),r=parseInt(t,16);return`${r>>16&255} ${r>>8&255} ${r&255}`}const Cn=/^(bg|text|border|decoration|shadow|outline|caret|accent|fill|stroke)-([a-z]+)-?(\d{2,3}|DEFAULT)?$/,En={bg:"background-color",decoration:"text-decoration-color",text:"color",border:"border-color",outline:"outline-color",caret:"caret-color",accent:"accent-color",fill:"fill",stroke:"stroke"};function _n(e){const t=Cn.exec(e);if(!t)return null;const[,r,n,i="DEFAULT"]=t,o=Lt[n]?.[i];if(!o)return null;if(r==="shadow")return`--ce-shadow-color:${o};`;const s=En[r];return s?`${s}:${o};`:null}function Sn(e){const t=e.indexOf("/");if(t===-1)return{base:e};const r=e.slice(0,t),n=e.slice(t+1),i=parseInt(n,10);return isNaN(i)||i<0||i>100?{base:r}:{base:r,opacity:i/100}}function ut(e){const{base:t,opacity:r}=Sn(e),n=_n(t);if(n&&r!==void 0){const o=/#([0-9a-f]{6})/i.exec(n);if(o){const s=Rt(o[0]);return n.replace(/#([0-9a-f]{6})/i,`rgb(${s} / ${r})`)}}if(n)return n;const i=Ge(t);if(i&&r!==void 0){const o=/#([0-9a-f]{6})/i.exec(i);if(o){const s=Rt(o[0]);return i.replace(/#([0-9a-f]{6})/i,`rgb(${s} / ${r})`)}}return i}function ft(e){const t=/^(from|to|via)-([a-z]+)-?(\d{2,3}|DEFAULT)?$/.exec(e);if(!t)return null;const[,r,n,i="DEFAULT"]=t,o=Lt[n]?.[i];if(!o)return null;switch(r){case"from":return`--tw-gradient-from:${o} var(--tw-gradient-from-position);--tw-gradient-to:rgb(255 255 255 / 0) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-from), var(--tw-gradient-to);`;case"to":return`--tw-gradient-to:${o} var(--tw-gradient-to-position);`;case"via":return`--tw-gradient-to:rgb(255 255 255 / 0) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-from), ${o} var(--tw-gradient-via-position), var(--tw-gradient-to);`;default:return null}}function dt(e){const t=/^opacity-(\d{1,3})$/.exec(e);if(!t)return null;const r=parseInt(t[1],10);return r<0||r>100?null:`opacity:${r/100};`}function Ge(e){if(e.startsWith("[")&&e.endsWith("]")&&!e.includes("-[")){const s=e.slice(1,-1).trim(),c=s.indexOf(":");if(c===-1)return null;const a=s.slice(0,c).trim();let d=s.slice(c+1).trim();return/^[a-zA-Z][a-zA-Z0-9-]*$/.test(a)?(d=d.replace(/_/g," "),d=d.replace(/url\('\s*([^']*?)\s*'\)/g,'url("$1")'),d=d.replace(/^'([^']*)'$/g,'"$1"'),`${a}:${d};`):null}const t=e.indexOf("-[");if(t<=0||!e.endsWith("]"))return null;const r=e.slice(0,t);let n=e.slice(t+2,-1).replace(/_/g," ");const i={bg:"background-color",shadow:"box-shadow",p:"padding",px:"padding-inline",py:"padding-block",m:"margin",mx:"margin-inline",my:"margin-block",w:"width",h:"height","min-w":"min-width","max-w":"max-width","min-h":"min-height","max-h":"max-height","border-t":"border-top-width","border-b":"border-bottom-width","border-l":"border-left-width","border-r":"border-right-width","border-x":"border-inline-width","border-y":"border-block-width","grid-cols":"grid-template-columns","grid-rows":"grid-template-rows",transition:"transition-property",ease:"transition-timing-function",delay:"transition-delay",duration:"transition-duration",list:"list-style",break:"word-break",flex:"flex-direction",items:"align-items",justify:"justify-content",content:"align-content",self:"align-self",basis:"flex-basis",tracking:"letter-spacing",leading:"line-height",z:"z-index",opacity:"opacity"};if(r==="text")return/^\d*\.?\d+(px|rem|em|%|vh|vw|ch|ex)$/.test(n)?`font-size:${n};`:`color:${n};`;if(r==="rotate")return`transform:rotate(${n});`;if(r==="scale")return`transform:scale(${n});`;if(r==="translate-x")return`transform:translateX(${n});`;if(r==="translate-y")return`transform:translateY(${n});`;const o=i[r]??r.replace(/_/g,"-");return o&&n?`${o}:${n};`:null}function An(e){if(e.startsWith("[")&&e.endsWith("]")){const r=e.slice(1,-1);return r.includes("&")?r:e}const t=e.indexOf("-[");if(t>0&&e.endsWith("]")){const r=e.slice(t+2,-1).replace(/_/g,"-");return r.includes("&")?r:e.replace(/_/g,"-")}return null}function Mt(e){return e.replace(/([!"#$%&'()*+,./:;<=>?@[\\\]^`{|}~])/g,"\\$1")}function Tn(e){const t=/class\s*=\s*(['"])([\s\S]*?)\1/g,r=[];let n;for(;n=t.exec(e);){const i=n[2].split(/\s+/).filter(Boolean);i.length&&r.push(...i)}return r}const Pe=new Map,On=16,Dt=1e3;function Nt(e){const t=Date.now(),r=Pe.get(e);if(r&&t-r.timestamp<On)return r.css;const n=Tn(e);if(!n.length)return"";const i=new Set(n),o=[[],[],[],[]],s={},c=(f,g=!1)=>{const l=g?`dark|${f}`:f;if(l in s)return s[l];const m=y(f,g);return s[l]=m,m},a=f=>{const g=f.some(k=>at.includes(k)),l=f.some(k=>k.startsWith("@")&&(ct.includes(k.slice(1))||k.match(/^@\[.+\]$/))),m=f.includes("dark");return f.length?!g&&!m&&!l?1:m&&(g||l)?3:2:0},d=f=>{const g=[];let l="",m=0;for(let k=0;k<f.length;k++){const w=f[k];w==="["||w==="("?m++:(w==="]"||w===")")&&m--,w===":"&&m===0?(g.push(l),l=""):l+=w}return l&&g.push(l),g},b={hover:":hover",focus:":focus",active:":active",visited:":visited",disabled:":disabled",checked:":checked",first:":first-child",last:":last-child",odd:":nth-child(odd)",even:":nth-child(even)","focus-within":":focus-within","focus-visible":":focus-visible"},y=(f,g=!1)=>{const l=d(f);let m="",k=!1;for(const O of l){let N=O;if(N.startsWith("!")&&(k=!0,N=N.slice(1)),ot[N]||lt(N)||dt(N)||ut(N)||ft(N)||Ge(N)){m=O;break}}if(!m)return null;const w=m.replace(/^!/,""),_=ot[w]??lt(w)??dt(w)??ut(w)??ft(w)??Ge(w);if(!_)return null;const C=l.indexOf(m);let h=C>=0?l.slice(0,C):[];g&&(h=h.filter(O=>O!=="dark"));const T=`.${Mt(f)}`,E=k?_.replace(/;/g," !important;"):_,v="__SUBJECT__";let $=v;const A=[];for(const O of h)O.startsWith("group-")?($=`.group:${O.slice(6)} ${$}`,A.push(O)):O.startsWith("peer-")&&($=$.replace(v,`.peer:${O.slice(5)}~${v}`),A.push(O));h=h.filter(O=>!A.includes(O));const R=[],S=[];let L=null;for(const O of h){if(O==="dark"||at.includes(O)||O.startsWith("@")&&(ct.includes(O.slice(1))||O.match(/^@\[.+\]$/)))continue;const N=An(O);if(N){L=N;continue}const B=b[O];if(B){L?S.push(B):R.push(B);continue}const Z=$n[O];typeof Z=="function"&&($=Z($,E).split("{")[0])}const U=R.join(""),oe=S.join("");function Qe(O,N){if(!N)return O;let B=0,Z=0;if(O.length&&(O[0]===">"||O[0]==="+"||O[0]==="~"||O[0]===" ")){let F=1;for(;F<O.length&&O[F]===" ";)F++;for(;F<O.length;F++){const J=O[F];if(J==="["?B++:J==="]"&&B>0?B--:J==="("?Z++:J===")"&&Z>0&&Z--,B===0&&Z===0&&(O[F]===">"||O[F]==="+"||O[F]==="~"||O[F]===" "))return O.slice(0,F)+N+O.slice(F)}return O+N}for(let F=0;F<O.length;F++){const J=O[F];if(J==="["?B++:J==="]"&&B>0?B--:J==="("?Z++:J===")"&&Z>0&&Z--,B===0&&Z===0&&(J===">"||J==="+"||J==="~"||J===" "))return O.slice(0,F)+N+O.slice(F)}return O+N}if(L)if(L.includes("&")){const O=L.indexOf("&"),N=L.slice(0,O),B=L.slice(O+1),Z=v+U;if(R.length===0)$=$.replace(v,N+Z+oe+B);else{const F=Qe(B,oe);$=$.replace(v,N+Z+F)}}else $=$.replace(v,`${L}${v+U}`),oe&&($=$.replace(v,`${v}${oe}`));else $=$.replace(v,v+U+oe);$=$.replace(new RegExp(v,"g"),T);let W=`${$}{${E}}`;const D=h.filter(O=>at.includes(O)),V=h.filter(O=>O.startsWith("@")&&(ct.includes(O.slice(1))||O.match(/^@\[.+\]$/))),ce=D.length?D[D.length-1]:null,de=V.length?V[V.length-1]:null,K=h.includes("dark");let se="",ue="";if(K&&ce?se=`@media (prefers-color-scheme: dark) and ${st[ce]}`:K?se="@media (prefers-color-scheme: dark)":ce&&(se=`@media ${st[ce]}`),de)if(de.startsWith("@[")&&de.endsWith("]")){const O=de.slice(2,-1);if(!/^-?\d*\.?\d+(px|rem|em|%|vh|vw|ch|ex|cm|mm|in|pt|pc)$/.test(O))return null;ue=`@container (min-width:${O})`}else{const O=de.slice(1);ue=`@container ${Pt[O]||`(min-width:${O})`}`}return se&&ue?W=`${se}${ue}{${W}}`:se?W=`${se}{${W}}`:ue&&(W=`${ue}{${W}}`),W};for(const f of i){const g=d(f),l=g.find(C=>ot[C.replace(/^!/,"")]||lt(C.replace(/^!/,""))||dt(C.replace(/^!/,""))||ut(C.replace(/^!/,""))||ft(C.replace(/^!/,""))||Ge(C.replace(/^!/,"")));if(!l)continue;const m=g.indexOf(l),k=m>=0?g.slice(0,m):[],w=a(k),_=c(f);_&&o[w].push(_)}const p=/^(from|via|to)-[a-z]+-?\d{2,3}?$/;for(const f of i)if(p.test(f)){if(o.flat().join("").includes(`.${Mt(f)}`))continue;const l=c(f);l&&o[0].push(l)}const x=f=>f.sort((g,l)=>{const m=T=>{const E={sm:640,md:768,lg:1024,xl:1280,"2xl":1536};for(const[v,$]of Object.entries(E))if(T.includes(`@media ${st[v]}`))return $;return-1},k=T=>{const E={xs:320,sm:384,md:448,lg:512,xl:576,"2xl":672,"3xl":768,"4xl":896,"5xl":1024,"6xl":1152,"7xl":1280};for(const[v,$]of Object.entries(E))if(T.includes(`@container ${Pt[v]}`))return $;if(T.includes("@container (min-width:")){const v=/@container \(min-width:(\d+(?:\.\d+)?)(px|rem|em)/.exec(T);if(v){const $=parseFloat(v[1]),A=v[2];return A==="rem"||A==="em"?$*16:$}}return-1},w=m(g),_=m(l),C=k(g),h=k(l);return w>=0&&_>=0&&w!==_?w-_:C>=0&&h>=0&&C!==h?C-h:0});o[2]=x(o[2]),o[3]=x(o[3]);const u=o.flat().join("");return Pe.size>=Dt&&Array.from(Pe.keys()).slice(0,Math.floor(Dt/2)).forEach(g=>Pe.delete(g)),Pe.set(e,{css:u,timestamp:t}),u}function Re(e,t){return z(e?t:[],"when-block")}function jn(e,t){return e.map((r,n)=>{const i=typeof r=="object"?r?.key??r?.id??`idx-${n}`:String(r);return z(t(r,n),`each-${i}`)})}function It(){const e=[];return{when(t,r){return e.push([t,r]),this},otherwise(t){return e.push([!0,t]),this},done(){return Ln(...e)}}}function Ln(...e){for(let t=0;t<e.length;t++){const[r,n]=e[t];if(r)return[z(n,`whenChain-branch-${t}`)]}return[z([],"whenChain-empty")]}function z(e,t){const r=e?Array.isArray(e)?e.filter(Boolean):[e].filter(Boolean):[];return{tag:"#anchor",key:t,children:r}}const Ce={fade:{enterFrom:"opacity-0",enterActive:"transition-opacity duration-300 ease-out",enterTo:"opacity-100",leaveFrom:"opacity-100",leaveActive:"transition-opacity duration-200 ease-in",leaveTo:"opacity-0"},"slide-right":{enterFrom:"translate-x-[100%] opacity-0",enterActive:"transition-all duration-300 ease-out",enterTo:"translate-x-[0%] opacity-100",leaveFrom:"translate-x-[0%] opacity-100",leaveActive:"transition-all duration-200 ease-in",leaveTo:"translate-x-[100%] opacity-0"},"slide-left":{enterFrom:"translate-x-[-100%] opacity-0",enterActive:"transition-all duration-300 ease-out",enterTo:"translate-x-[0%] opacity-100",leaveFrom:"translate-x-[0%] opacity-100",leaveActive:"transition-all duration-200 ease-in",leaveTo:"translate-x-[-100%] opacity-0"},"slide-up":{enterFrom:"translate-y-[100%] opacity-0",enterActive:"transition-all duration-300 ease-out",enterTo:"translate-y-[0%] opacity-100",leaveFrom:"translate-y-[0%] opacity-100",leaveActive:"transition-all duration-200 ease-in",leaveTo:"translate-y-[100%] opacity-0"},"slide-down":{enterFrom:"translate-y-[-100%] opacity-0",enterActive:"transition-all duration-300 ease-out",enterTo:"translate-y-[0%] opacity-100",leaveFrom:"translate-y-[0%] opacity-100",leaveActive:"transition-all duration-200 ease-in",leaveTo:"translate-y-[-100%] opacity-0"},scale:{enterFrom:"scale-95 opacity-0",enterActive:"transition-all duration-200 ease-out",enterTo:"scale-100 opacity-100",leaveFrom:"scale-100 opacity-100",leaveActive:"transition-all duration-150 ease-in",leaveTo:"scale-95 opacity-0"},"scale-down":{enterFrom:"scale-105 opacity-0",enterActive:"transition-all duration-200 ease-out",enterTo:"scale-100 opacity-100",leaveFrom:"scale-100 opacity-100",leaveActive:"transition-all duration-150 ease-in",leaveTo:"scale-105 opacity-0"},bounce:{enterFrom:"scale-0 opacity-0",enterActive:"transition-all duration-500 ease-out",enterTo:"scale-100 opacity-100",leaveFrom:"scale-100 opacity-100",leaveActive:"transition-all duration-200 ease-in",leaveTo:"scale-0 opacity-0"},zoom:{enterFrom:"scale-0 opacity-0",enterActive:"transition-all duration-300 ease-out",enterTo:"scale-100 opacity-100",leaveFrom:"scale-100 opacity-100",leaveActive:"transition-all duration-200 ease-in",leaveTo:"scale-0 opacity-0"},flip:{enterFrom:"rotate-[90deg] opacity-0",enterActive:"transition-all duration-400 ease-out",enterTo:"rotate-[0deg] opacity-100",leaveFrom:"rotate-[0deg] opacity-100",leaveActive:"transition-all duration-300 ease-in",leaveTo:"rotate-[90deg] opacity-0"}};function Pn(e,t){const{preset:r,show:n,mode:i="default",duration:o,appear:s=!1,css:c=!0,name:a,enterFrom:d,enterActive:b,enterTo:y,leaveFrom:p,leaveActive:x,leaveTo:u,onBeforeEnter:f,onEnter:g,onAfterEnter:l,onEnterCancelled:m,onBeforeLeave:k,onLeave:w,onAfterLeave:_,onLeaveCancelled:C}=e;let h;r&&Ce[r]?(h={...Ce[r]},d&&(h.enterFrom=d),b&&(h.enterActive=b),y&&(h.enterTo=y),p&&(h.leaveFrom=p),x&&(h.leaveActive=x),u&&(h.leaveTo=u)):h={enterFrom:d,enterActive:b,enterTo:y,leaveFrom:p,leaveActive:x,leaveTo:u};const T=a||(r?`transition-${r}`:"transition"),E=z(n?t:[],T);return E._transition={name:T,classes:h,mode:i,duration:o,appear:s,css:c,state:n?"visible":"hidden",hooks:{onBeforeEnter:f,onEnter:g,onAfterEnter:l,onEnterCancelled:m,onBeforeLeave:k,onLeave:w,onAfterLeave:_,onLeaveCancelled:C}},E}function Rn(e,t){const{tag:r="div",moveClass:n="transition-transform duration-300",preset:i,show:o=!0,mode:s="default",duration:c,appear:a=!1,css:d=!0,name:b,enterFrom:y,enterActive:p,enterTo:x,leaveFrom:u,leaveActive:f,leaveTo:g,onBeforeEnter:l,onEnter:m,onAfterEnter:k,onEnterCancelled:w,onBeforeLeave:_,onLeave:C,onAfterLeave:h,onLeaveCancelled:T}=e;let E;i&&Ce[i]?(E={...Ce[i]},y&&(E.enterFrom=y),p&&(E.enterActive=p),x&&(E.enterTo=x),u&&(E.leaveFrom=u),f&&(E.leaveActive=f),g&&(E.leaveTo=g)):E={enterFrom:y,enterActive:p,enterTo:x,leaveFrom:u,leaveActive:f,leaveTo:g};const v=b||(i?`transition-group-${i}`:"transition-group"),$=[];for(const A of o?t:[])if(A&&typeof A=="object"&&A.tag==="#anchor"){const R=Array.isArray(A.children)?A.children:[];for(const S of R)if(S&&typeof S=="object"){const L={...S,key:A.key||S.key,props:{...S.props,_anchorKey:A.key}};$.push(L)}else $.push(S)}else $.push(A);return{tag:r,children:$,key:v,props:{_transitionGroup:{name:v,classes:E,moveClass:n,mode:s,duration:c,appear:a,css:d,hooks:{onBeforeEnter:l,onEnter:m,onAfterEnter:k,onEnterCancelled:w,onBeforeLeave:_,onLeave:C,onAfterLeave:h,onLeaveCancelled:T}}}}}function Mn(e){return{...e}}let Ze=null;function Je(){if(!Ze){const e=[];Object.values(Ce).forEach(n=>{n.enterFrom&&e.push(n.enterFrom),n.enterActive&&e.push(n.enterActive),n.enterTo&&e.push(n.enterTo),n.leaveFrom&&e.push(n.leaveFrom),n.leaveActive&&e.push(n.leaveActive),n.leaveTo&&e.push(n.leaveTo)});const t=`<div class="${e.join(" ")}"></div>`,r=Nt(t);Ze=new CSSStyleSheet,Ze.replaceSync(r)}return Ze}function Dn(){Je()}Dn();const Me=[];function Nn(e,t,r,n,i,o,s,c){if(e){Me.push(r);try{const a=t.render(r);if(a instanceof Promise){o(!0),a.then(d=>{o(!1),s(null),Ht(e,d,r,n,i),c(e.innerHTML)}).catch(d=>{o(!1),s(d)});return}Ht(e,a,r,n,i),c(e.innerHTML)}finally{Me.pop()}}}function Ht(e,t,r,n,i){e&&(wn(e,Array.isArray(t)?t:[t],r,n),i(e.innerHTML))}function In(e,t,r,n,i,o,s){if(o!==null&&clearTimeout(o),Date.now()-t<16){if(i(r+1),r===15)ne(`⚠️ Component is re-rendering rapidly. This might indicate:
|
|
116
116
|
Common causes:
|
|
117
117
|
• Event handler calling a function immediately: @click="\${fn()}" should be @click="\${fn}"
|
|
118
118
|
• State modification during render
|
|
119
119
|
• Missing dependencies in computed/watch
|
|
120
|
-
Component rendering will be throttled to prevent browser freeze.`);else if(r>20){
|
|
120
|
+
Component rendering will be throttled to prevent browser freeze.`);else if(r>20){I(`🛑 Infinite loop detected in component render:
|
|
121
121
|
• This might be caused by state updates during render
|
|
122
122
|
• Ensure all state modifications are done in event handlers or effects
|
|
123
|
-
Stopping runaway component render to prevent browser freeze`),
|
|
124
|
-
${
|
|
125
|
-
`);c=lt(c);let a=n;a||(a=new CSSStyleSheet),(a.cssRules.length===0||a.toString()!==c)&&a.replaceSync(c),e.adoptedStyleSheets=[ut(),a],i(a)}let W=null;function ar(e){W=e}function cr(){W=null}function lr(){if(!W)throw new Error("useEmit must be called during component render");const e=W.emit;return(t,r)=>e(t,r)}function $e(e){e._hookCallbacks||Object.defineProperty(e,"_hookCallbacks",{value:{},writable:!0,enumerable:!1,configurable:!1})}function ur(e){if(!W)throw new Error("useOnConnected must be called during component render");$e(W),W._hookCallbacks.onConnected=e}function fr(e){if(!W)throw new Error("useOnDisconnected must be called during component render");$e(W),W._hookCallbacks.onDisconnected=e}function dr(e){if(!W)throw new Error("useOnAttributeChanged must be called during component render");$e(W),W._hookCallbacks.onAttributeChanged=e}function hr(e){if(!W)throw new Error("useOnError must be called during component render");$e(W),W._hookCallbacks.onError=e}function pr(e){if(!W)throw new Error("useStyle must be called during component render");$e(W);try{const t=e();Object.defineProperty(W,"_computedStyle",{value:t,writable:!0,enumerable:!1,configurable:!0})}catch(t){console.warn("Error in useStyle callback:",t),Object.defineProperty(W,"_computedStyle",{value:"",writable:!0,enumerable:!1,configurable:!0})}}const Pe=new Map,bt=Symbol.for("cer.registry");if(typeof window<"u"){const e=globalThis;e[bt]||(e[bt]=Pe)}function gr(e,t){if(!t.render)throw new Error("Component must have a render function");return typeof window>"u"?class{constructor(){}}:class extends HTMLElement{context;_refs={};_listeners=[];_watchers=new Map;_renderTimeoutId=null;_mounted=!1;_hasError=!1;_initializing=!0;_componentId;_styleSheet=null;_lastHtmlStringForJitCSS="";get lastHtmlStringForJitCSS(){return this._lastHtmlStringForJitCSS}get isLoading(){return this._templateLoading}get lastError(){return this._templateError}_cfg;_lastRenderTime=0;_renderCount=0;_templateLoading=!1;_templateError=null;constructor(){super(),this.attachShadow({mode:"open"}),this._cfg=Pe.get(e)||t,this._componentId=`${e}-${Math.random().toString(36).substr(2,9)}`;const r=this._initContext(t);Object.defineProperty(r,"refs",{value:this._refs,writable:!1,enumerable:!1,configurable:!1}),Object.defineProperty(r,"requestRender",{value:()=>this.requestRender(),writable:!1,enumerable:!1,configurable:!1}),Object.defineProperty(r,"_requestRender",{value:()=>this._requestRender(),writable:!1,enumerable:!1,configurable:!1}),Object.defineProperty(r,"_componentId",{value:this._componentId,writable:!1,enumerable:!1,configurable:!1}),Object.defineProperty(r,"_triggerWatchers",{value:(i,s)=>this._triggerWatchers(i,s),writable:!1,enumerable:!1,configurable:!1}),this.context=r,Object.defineProperty(this.context,"emit",{value:(i,s,o)=>{const c=new CustomEvent(i,{detail:s,bubbles:!0,composed:!0,...o||{}});return this.dispatchEvent(c),!c.defaultPrevented},writable:!1,enumerable:!1,configurable:!1});const n=Pe.get(e)||t;Object.keys(n).forEach(i=>{const s=n[i];typeof s=="function"&&(this.context[i]=(...o)=>s(...o,this.context))}),this._applyComputed(n),n.props&&Object.keys(n.props).forEach(i=>{let s=this[i];Object.defineProperty(this,i,{get(){return s},set(o){const c=s;s=o,this.context[i]=o,this._initializing||(this._applyProps(n),c!==o&&this._requestRender())},enumerable:!0,configurable:!0})}),this._initializing=!1,this._initWatchers(n),this._applyProps(n),this._render(n)}connectedCallback(){this._runLogicWithinErrorBoundary(t,()=>{this._applyProps(t),this._requestRender(),Pt(t,this.context,this._mounted,r=>{this._mounted=r})})}disconnectedCallback(){this._runLogicWithinErrorBoundary(t,()=>{Lt(t,this.context,this._listeners,()=>{this._listeners=[]},()=>{this._watchers.clear()},r=>{this._templateLoading=r},r=>{this._templateError=r},r=>{this._mounted=r})})}attributeChangedCallback(r,n,i){this._runLogicWithinErrorBoundary(t,()=>{this._applyProps(t),n!==i&&this._requestRender(),Mt(t,r,n,i,this.context)})}static get observedAttributes(){return t.props?Object.keys(t.props).map(ne):[]}_applyComputed(r){}_render(r){this._runLogicWithinErrorBoundary(r,()=>{ir(this.shadowRoot,r,this.context,this._refs,n=>{this._lastHtmlStringForJitCSS=n,typeof this.onHtmlStringUpdate=="function"&&this.onHtmlStringUpdate(n)},n=>{this._templateLoading=n,typeof this.onLoadingStateChange=="function"&&this.onLoadingStateChange(n)},n=>{this._templateError=n,typeof this.onErrorStateChange=="function"&&this.onErrorStateChange(n)},n=>this._applyStyle(r,n))})}requestRender(){this._requestRender()}_requestRender(){this._runLogicWithinErrorBoundary(this._cfg,()=>{pe(()=>{sr(()=>this._render(this._cfg),this._lastRenderTime,this._renderCount,r=>{this._lastRenderTime=r},r=>{this._renderCount=r},this._renderTimeoutId,r=>{this._renderTimeoutId=r})},this._componentId)})}_applyStyle(r,n){this._runLogicWithinErrorBoundary(r,()=>{or(this.shadowRoot,this.context,n,this._styleSheet,i=>{this._styleSheet=i})})}_runLogicWithinErrorBoundary(r,n){this._hasError&&(this._hasError=!1);try{n()}catch(i){this._hasError=!0,r.onError&&r.onError(i,this.context)}}_initContext(r){try{let n=function(s,o=""){return Array.isArray(s)?new Proxy(s,{get(c,a,p){const h=Reflect.get(c,a,p);return typeof h=="function"&&typeof a=="string"&&["push","pop","shift","unshift","splice","sort","reverse"].includes(a)?function(...m){const d=h.apply(c,m);if(!i._initializing){const u=o||"root";i._triggerWatchers(u,c),pe(()=>i._render(r),i._componentId)}return d}:h},set(c,a,p){if(c[a]=p,!i._initializing){const h=o?`${o}.${String(a)}`:String(a);i._triggerWatchers(h,p),pe(()=>i._render(r),i._componentId)}return!0},deleteProperty(c,a){if(delete c[a],!i._initializing){const p=o?`${o}.${String(a)}`:String(a);i._triggerWatchers(p,void 0),pe(()=>i._render(r),i._componentId)}return!0}}):s&&typeof s=="object"?s.constructor&&s.constructor.name==="ReactiveState"?s:(Object.keys(s).forEach(c=>{const a=o?`${o}.${c}`:c;s[c]=n(s[c],a)}),new Proxy(s,{set(c,a,p){const h=o?`${o}.${String(a)}`:String(a);return c[a]=n(p,h),i._initializing||(i._triggerWatchers(h,c[a]),pe(()=>i._render(r),i._componentId)),!0},get(c,a,p){return Reflect.get(c,a,p)}})):s};const i=this;return n({...r.props?Object.fromEntries(Object.entries(r.props).map(([s,o])=>[s,o.default])):{}})}catch{return{}}}_initWatchers(r){this._runLogicWithinErrorBoundary(r,()=>{jt(this.context,this._watchers,{})})}_triggerWatchers(r,n){Ot(this.context,this._watchers,r,n)}_applyProps(r){this._runLogicWithinErrorBoundary(r,()=>{try{Rt(this,r,this.context)}catch(n){this._hasError=!0,r.onError&&r.onError(n,this.context)}})}}}function Je(e,t){let r=ne(e);r.includes("-")||(r=`cer-${r}`);let n={};if(typeof window<"u")try{const o=t.toString();let c=null;const a=o.indexOf("({");if(a!==-1){let p=0,h=!1,v=null,m=!1,d=-1;for(let u=a+2;u<o.length;u++){const y=o[u];if(m){m=!1;continue}if(y==="\\"){m=!0;continue}if(!h&&(y==='"'||y==="'"||y==="`")){h=!0,v=y;continue}if(h&&y===v){h=!1,v=null;continue}if(!h){if(y==="{")p++;else if(y==="}"){if(p===0){d=u;break}p--}}}if(d!==-1){const u=o.substring(a,d+2),y=o.substring(a+2,d).trim();c=[u,y]}}if(c){const p=c[1];let h="",v="",m=!0,d=0,u=null,y=!1,w=0;for(;w<p.length;){const l=p[w];if(y){m?h+=l:v+=l,y=!1,w++;continue}if(l==="\\"){y=!0,m?h+=l:v+=l,w++;continue}if((l==='"'||l==="'"||l==="`")&&!u){u=l,m?h+=l:v+=l,w++;continue}if(l===u){u=null,m?h+=l:v+=l,w++;continue}if(u){m?h+=l:v+=l,w++;continue}if(l==="{"||l==="["){d++,m?h+=l:v+=l,w++;continue}if(l==="}"||l==="]"){d--,m?h+=l:v+=l,w++;continue}if(l==="="&&d===0&&m){m=!1,w++;continue}if(l===","&&d===0){if(h.trim()&&v.trim()){const f=h.trim(),b=v.trim();try{if(b==="true")n[f]=!0;else if(b==="false")n[f]=!1;else if(b==="[]")n[f]=[];else if(b==="{}")n[f]={};else if(/^\d+$/.test(b))n[f]=parseInt(b);else if(/^'.*'$/s.test(b))n[f]=b.slice(1,-1).replace(/\\'/g,"'").replace(/\\"/g,'"').replace(/\\\//g,"/");else if(/^".*"$/s.test(b))n[f]=b.slice(1,-1).replace(/\\"/g,'"').replace(/\\'/g,"'").replace(/\\\//g,"/");else if(/^`.*`$/s.test(b)){const k=b.slice(1,-1);if(k.includes("${"))try{n[f]=new Function(`return \`${k}\`;`)()}catch{n[f]=k}else n[f]=k}else n[f]=b}catch{n[f]=""}}else if(h.trim()){const f=h.split(":")[0].trim();f&&!f.includes("}")&&(n[f]="")}h="",v="",m=!0,w++;continue}m?h+=l:v+=l,w++}if(h.trim()&&v.trim()){const l=h.trim(),f=v.trim();try{if(f==="true")n[l]=!0;else if(f==="false")n[l]=!1;else if(f==="[]")n[l]=[];else if(f==="{}")n[l]={};else if(/^\d+$/.test(f))n[l]=parseInt(f);else if(/^'.*'$/s.test(f))n[l]=f.slice(1,-1).replace(/\\'/g,"'").replace(/\\"/g,'"').replace(/\\\//g,"/");else if(/^".*"$/s.test(f))n[l]=f.slice(1,-1).replace(/\\"/g,'"').replace(/\\'/g,"'").replace(/\\\//g,"/");else if(/^`.*`$/s.test(f)){const b=f.slice(1,-1);if(b.includes("${"))try{n[l]=new Function(`return \`${b}\`;`)()}catch{n[l]=b}else n[l]=b}else n[l]=f}catch{n[l]=""}}else if(h.trim()){const l=h.split(":")[0].trim();l&&!l.includes("}")&&(n[l]="")}}}catch{}let i={};const s={props:Object.fromEntries(Object.entries(n).map(([o,c])=>[o,{type:typeof c=="boolean"?Boolean:typeof c=="number"?Number:typeof c=="string"?String:Function,default:c}])),onConnected:o=>{i.onConnected&&i.onConnected()},onDisconnected:o=>{i.onDisconnected&&i.onDisconnected()},onAttributeChanged:(o,c,a,p)=>{i.onAttributeChanged&&i.onAttributeChanged(o,c,a)},onError:(o,c)=>{i.onError&&o&&i.onError(o)},render:o=>{const c=o._componentId||`${r}-${Math.random().toString(36).substr(2,9)}`;K.setCurrentComponent(c,()=>{o.requestRender&&o.requestRender()});try{ar(o);const a=Object.keys(n).length>0;let p;if(a){const h={};Object.keys(n).forEach(v=>{const m=o[v],d=n[v];h[v]=m!=null&&m!==""?m:d}),p=t(h)}else p=t();if(o._hookCallbacks){const h=o._hookCallbacks;h.onConnected&&(i.onConnected=h.onConnected),h.onDisconnected&&(i.onDisconnected=h.onDisconnected),h.onAttributeChanged&&(i.onAttributeChanged=h.onAttributeChanged),h.onError&&(i.onError=h.onError),h.style&&(o._styleCallback=h.style)}return p}finally{cr(),K.clearCurrentComponent()}}};Pe.set(r,s),typeof window<"u"&&(customElements.get(r)||customElements.define(r,gr(r,s)))}class mr{map=new Map;maxSize;constructor(t){this.maxSize=t}get(t){const r=this.map.get(t);if(r!==void 0)return this.map.delete(t),this.map.set(t,r),r}set(t,r){if(this.map.has(t)&&this.map.delete(t),this.map.set(t,r),this.map.size>this.maxSize){const n=this.map.keys().next().value;n!==void 0&&this.map.delete(n)}}has(t){return this.map.has(t)}clear(){this.map.clear()}}const Ze=new mr(500);function yr(e,t){if(e==null){console.warn(`⚠️ Event handler for '@${t}' is ${e}. This will prevent the event from working. Use a function reference instead: @${t}="\${functionName}"`);return}typeof e!="function"&&console.warn(`🚨 Potential infinite loop detected! Event handler for '@${t}' appears to be the result of a function call (${typeof e}) instead of a function reference. Change @${t}="\${functionName()}" to @${t}="\${functionName}" to pass the function reference instead of calling it immediately.`),e===void 0&&typeof e!="function"&&console.warn(`💡 Tip: If your event handler function returns undefined, make sure you're passing the function reference, not calling it. Use @${t}="\${fn}" not @${t}="\${fn()}"`)}function ke(e,t={},r,n){const i=n??t.key;return{tag:e,key:i,props:t,children:r}}function Le(e){return!!e&&typeof e=="object"&&(e.type==="AnchorBlock"||e.tag==="#anchor")}function Me(e){return typeof e=="object"&&e!==null&&"tag"in e&&!Le(e)}function br(e,t){return e.key!=null?e:{...e,key:t}}function wr(e,t=[],r={}){const n={},i={},s={},o=[],c=/([:@#]?)([a-zA-Z0-9-:\.]+)=("([^"\\]*(\\.[^"\\]*)*)"|'([^'\\]*(\\.[^'\\]*)*)')/g;let a;for(;a=c.exec(e);){const p=a[1],h=a[2],v=(a[4]||a[6])??"",m=v.match(/^{{(\d+)}}$/);let d=m?t[Number(m[1])]??null:v;m||(d==="true"?d=!0:d==="false"?d=!1:d==="null"?d=null:isNaN(Number(d))||(d=Number(d)));const u=["model","bind","show","class","style","ref"];if(p===":"){const[y,w]=h.split(":"),[l,...f]=y.split(".");if(u.includes(l)){const b=[...f],k=l==="model"&&w?`model:${w}`:l;s[k]={value:d,modifiers:b,arg:w}}else{let b=d;b&&ee(b)&&(b=b.value),i[h]=b,o.push(h)}}else if(p==="@"){const[y,...w]=h.split("."),l=w;yr(d,y);const f=typeof d=="function"?d:typeof r[d]=="function"?r[d]:void 0;if(f){const b=C=>{if(l.includes("prevent")&&C.preventDefault(),l.includes("stop")&&C.stopPropagation(),!(l.includes("self")&&C.target!==C.currentTarget))return l.includes("once")&&C.currentTarget?.removeEventListener(y,b),f(C)},k="on"+y.charAt(0).toUpperCase()+y.slice(1);n[k]=b}}else h==="ref"?n.ref=d:i[h]=d}return{props:n,attrs:i,directives:s,bound:o}}function vr(e,t,r){const n=xe.length>0?xe[xe.length-1]:void 0,i=r??n,s=!r&&t.length===0,o=s?e.join("<!--TEMPLATE_DELIM-->"):null;if(s&&o){const g=Ze.get(o);if(g)return g}function c(g,$){return ke("#text",{},g,$)}let a="";for(let g=0;g<e.length;g++)a+=e[g],g<t.length&&(a+=`{{${g}}}`);const p=/<!--[\s\S]*?-->|<\/?([a-zA-Z0-9-]+)((?:\s+[^\s=>/]+(?:\s*=\s*(?:"(?:\\.|[^"])*"|'(?:\\.|[^'])*'|[^\s>]+))?)*)\s*\/?>|{{(\d+)}}|([^<]+)/g,h=[];let v,m=[],d=null,u={},y,w=0,l=[];function f(g){!g||typeof g!="object"||Le(g)||(g.props||g.attrs?(g.props&&(u.props||(u.props={}),Object.assign(u.props,g.props)),g.attrs&&(u.attrs||(u.attrs={}),Object.keys(g.attrs).forEach($=>{if($==="style"&&u.attrs.style){const O=u.attrs.style.replace(/;?\s*$/,""),x=g.attrs.style.replace(/^;?\s*/,"");u.attrs.style=O+"; "+x}else if($==="class"&&u.attrs.class){const O=u.attrs.class.trim().split(/\s+/).filter(Boolean),x=g.attrs.class.trim().split(/\s+/).filter(Boolean),_=[...new Set([...O,...x])];u.attrs.class=_.join(" ")}else u.attrs[$]=g.attrs[$]}))):(u.props||(u.props={}),Object.assign(u.props,g)))}function b(g,$){const O=d?m:l;if(Le(g)){const x=g.key??$;let _=g.children;O.push({...g,key:x,children:_});return}if(Me(g)){O.push(br(g,void 0));return}if(Array.isArray(g)){if(g.length===0)return;for(let x=0;x<g.length;x++){const _=g[x];Le(_)||Me(_)||Array.isArray(_)?b(_,`${$}-${x}`):_!==null&&typeof _=="object"?f(_):O.push(c(String(_),`${$}-${x}`))}return}if(g!==null&&typeof g=="object"){f(g);return}O.push(c(String(g),$))}const k=new Set(["area","base","br","col","embed","hr","img","input","link","meta","param","source","track","wbr"]);for(;v=p.exec(a);)if(!(v[0].startsWith("<!--")&&v[0].endsWith("-->"))){if(v[1]){const g=v[1],$=v[0][1]==="/",O=v[0][v[0].length-2]==="/"||k.has(g),{props:x,attrs:_,directives:j,bound:I}=wr(v[2]||"",t,i),A={props:{},attrs:{}};for(const T in x)A.props[T]=x[T];for(const T in _)A.attrs[T]=_[T];if(A.attrs&&Object.prototype.hasOwnProperty.call(A.attrs,"key")&&!(A.props&&Object.prototype.hasOwnProperty.call(A.props,"key")))try{A.props.key=A.attrs.key}catch{}try{const T={input:["value","checked","disabled","readonly","required","placeholder","maxlength","minlength"],textarea:["value","disabled","readonly","required","placeholder","maxlength","minlength"],select:["value","disabled","required","multiple"],option:["selected","disabled","value"],video:["muted","autoplay","controls","loop","playsinline"],audio:["muted","autoplay","controls","loop"],img:["src","alt","width","height"],button:["type","name","value","disabled","autofocus","form"]},U=g.toLowerCase(),ie=T[U]??[];if(A.attrs){for(const H of ie)if(I&&I.includes(H)&&H in A.attrs&&!(A.props&&H in A.props)){let D=A.attrs[H];D&&ee(D)&&(D=D.value),A.props[H]=D,delete A.attrs[H]}}if((g.includes("-")||!!i?.__customElements?.has?.(g))&&(A.isCustomElement=!0,I&&A.attrs)){const H=new Set(["id","name","data-key","key"]);for(const D of I)if(D in A.attrs&&!(A.props&&D in A.props)){const G=D.includes("-")?D.split("-").map((X,N)=>N===0?X:X.charAt(0).toUpperCase()+X.slice(1)).join(""):D;let V=A.attrs[D];V&&ee(V)&&(V=V.value),A.props[G]=V,H.has(D)||delete A.attrs[D]}}}catch{}if(j&&Object.keys(j).some(T=>T==="model"||T.startsWith("model:")))try{const T=Symbol.for("cer.registry"),U=globalThis[T],ie=!!(U&&typeof U.has=="function"&&U.has(g)),We=!!(i&&(i.__customElements instanceof Set&&i.__customElements.has(g)||Array.isArray(i.__isCustomElements)&&i.__isCustomElements.includes(g)));if(!!(g.includes("-")||We||ie))for(const G of Object.keys(j)){if(G!=="model"&&!G.startsWith("model:"))continue;const V=j[G],X=V.arg??(G.includes(":")?G.split(":",2)[1]:void 0),N=V.value,Y=X??"modelValue",se=B,E=Ae,R=i?i._state||i:void 0;let P;typeof N=="string"&&i?P=se(R,N):(P=N,P&&ee(P)&&(P=P.value)),A.props[Y]=P;try{const le=ne(Y);A.attrs||(A.attrs={}),P!==void 0&&(A.attrs[le]=P)}catch{}A.isCustomElement=!0;const L=`update:${ne(Y)}`.replace(/-([a-z])/g,(le,re)=>re.toUpperCase()),F="on"+L.charAt(0).toUpperCase()+L.slice(1);A.props[F]=function(le){const re=le.detail!==void 0?le.detail:le.target?le.target.value:void 0;if(R)if(N&&ee(N)){const he=N.value;(Array.isArray(re)&&Array.isArray(he)?JSON.stringify([...re].sort())!==JSON.stringify([...he].sort()):re!==he)&&(N.value=re,i?.requestRender?i.requestRender():i?._requestRender&&i._requestRender())}else{const he=se(R,typeof N=="string"?N:String(N));(Array.isArray(re)&&Array.isArray(he)?JSON.stringify([...re].sort())!==JSON.stringify([...he].sort()):re!==he)&&(E(R,typeof N=="string"?N:String(N),re),i?.requestRender?i.requestRender():i?._requestRender&&i._requestRender())}},delete j[G]}}catch{}if(Object.keys(j).length>0&&(A.directives={...j}),$){const T=ke(d,u,m.length===1&&Me(m[0])&&m[0].tag==="#text"?typeof m[0].children=="string"?m[0].children:"":m.length?m:void 0,y),U=h.pop();U?(d=U.tag,u=U.props,y=U.key,m=U.children,m.push(T)):(l.push(T),d=null,u={},y=void 0,m=[])}else O?d?m.push(ke(g,A,void 0,void 0)):l.push(ke(g,A,void 0,void 0)):(d&&h.push({tag:d,props:u,children:m,key:y}),d=g,u=A,m=[])}else if(typeof v[3]<"u"){const g=Number(v[3]),$=t[g],O=`interp-${g}`;b($,O)}else if(v[4]){const g=v[4],$=d?m:l,O=g.split(/({{\d+}})/);for(const x of O){if(!x)continue;const _=x.match(/^{{(\d+)}}$/);if(_){const j=Number(_[1]),I=t[j],A=`interp-${j}`;b(I,A)}else{const j=`text-${w++}`;$.push(c(x,j))}}}}const C=l.filter(g=>Me(g)&&g.tag==="#text"?typeof g.children=="string"&&g.children.trim()!=="":!0);if(C.length===1){const g=C[0];return s&&o&&Ze.set(o,g),g}else if(C.length>1){const g=C;return s&&o&&Ze.set(o,g),g}return ke("div",{},"","fallback-root")}function ce(e,...t){const r=t[t.length-1],n=typeof r=="object"&&r&&!Array.isArray(r)?r:void 0;return vr(e,t,n)}function Ce(e,t){return M(e?t:[],"when-block")}function xr(e,t){return e.map((r,n)=>{const i=typeof r=="object"?r?.key??r?.id??`idx-${n}`:String(r);return M(t(r,n),`each-${i}`)})}function wt(){const e=[];return{when(t,r){return e.push([t,r]),this},otherwise(t){return e.push([!0,t]),this},done(){return $r(...e)}}}function $r(...e){for(let t=0;t<e.length;t++){const[r,n]=e[t];if(r)return[M(n,`whenChain-branch-${t}`)]}return[M([],"whenChain-empty")]}function M(e,t){const r=e?Array.isArray(e)?e.filter(Boolean):[e].filter(Boolean):[];return{tag:"#anchor",key:t,children:r}}function kr(e,t){return Ce(!e,t)}function Cr(e,t){const r=!e||e.length===0;return Ce(r,t)}function _r(e,t){const r=!!(e&&e.length>0);return Ce(r,t)}function Er(e,t,r){const n=[];return e.forEach((i,s)=>{t(i,s)&&n.push({item:i,originalIndex:s})}),n.map(({item:i,originalIndex:s},o)=>{const c=typeof i=="object"&&i!=null?i?.key??i?.id??`filtered-${s}`:`filtered-${s}`;return M(r(i,s,o),`each-where-${c}`)})}function Sr(e,t){const r=e?.length??0;return r===0&&t.empty?M(t.empty,"switch-length-empty"):r===1&&t.one?M(t.one(e[0]),"switch-length-one"):t.exactly?.[r]?M(t.exactly[r](e),`switch-length-${r}`):r>1&&t.many?M(t.many(e),"switch-length-many"):M([],"switch-length-fallback")}function Ar(e,t,r){const n=new Map;return e.forEach(i=>{const s=t(i);n.has(s)||n.set(s,[]),n.get(s).push(i)}),Array.from(n.entries()).map(([i,s],o)=>M(r(i,s,o),`each-group-${i}`))}function jr(e,t,r,n){const i=r*t,s=Math.min(i+t,e.length);return e.slice(i,s).map((c,a)=>{const p=i+a,h=typeof c=="object"&&c!=null?c?.key??c?.id??`page-${p}`:`page-${p}`;return M(n(c,p,a),`each-page-${h}`)})}function Or(e,t){return e.loading&&t.loading?M(t.loading,"promise-loading"):e.error&&t.error?M(t.error(e.error),"promise-error"):e.data!==void 0&&t.success?M(t.success(e.data),"promise-success"):t.idle?M(t.idle,"promise-idle"):M([],"promise-fallback")}function z(e,t){const r=typeof window<"u"&&window.matchMedia?.(e)?.matches;return Ce(!!r,t)}const te={sm:"(min-width:640px)",md:"(min-width:768px)",lg:"(min-width:1024px)",xl:"(min-width:1280px)","2xl":"(min-width:1536px)",dark:"(prefers-color-scheme: dark)"},Ge=["sm","md","lg","xl","2xl"],vt={sm:e=>z(te.sm,e),md:e=>z(te.md,e),lg:e=>z(te.lg,e),xl:e=>z(te.xl,e),"2xl":e=>z(te["2xl"],e),dark:e=>z(te.dark,e),light:e=>z("(prefers-color-scheme: light)",e),touch:e=>z("(hover: none) and (pointer: coarse)",e),mouse:e=>z("(hover: hover) and (pointer: fine)",e),reducedMotion:e=>z("(prefers-reduced-motion: reduce)",e),highContrast:e=>z("(prefers-contrast: high)",e),portrait:e=>z("(orientation: portrait)",e),landscape:e=>z("(orientation: landscape)",e)};function Tr(e,t){const r=[];e.includes("dark")?r.push(te.dark):e.includes("light")&&r.push("(prefers-color-scheme: light)");const n=e.filter(o=>Ge.includes(o)),i=n[n.length-1];i&&i in te&&r.push(te[i]);const s=r.length>0?r.join(" and "):"all";return z(s,t)}function Rr(e){const t=[];return e.base&&t.push(M(e.base,"responsive-base")),Ge.forEach(r=>{const n=e[r];n&&t.push(vt[r](n))}),t}function Pr(e){const t=[];let r=null;return{case(n,i){const s=typeof n=="function"?n:o=>o===n;return t.push({condition:s,content:i}),this},when(n,i){return t.push({condition:n,content:i}),this},otherwise(n){return r=n,this},done(){for(let n=0;n<t.length;n++){const{condition:i,content:s}=t[n];if(i(e))return M(s,`switch-case-${n}`)}return M(r||[],"switch-otherwise")}}}class de extends EventTarget{handlers={};static instance;eventCounters=new Map;static getInstance(){return de.instance||(de.instance=new de),de.instance}emit(t,r){const n=Date.now(),i=this.eventCounters.get(t);if(!i||n-i.window>1e3)this.eventCounters.set(t,{count:1,window:n});else if(i.count++,i.count>50&&i.count>100)return;this.dispatchEvent(new CustomEvent(t,{detail:r,bubbles:!1,cancelable:!0}));const s=this.handlers[t];s&&s.forEach(o=>{try{o(r)}catch(c){oe(`Error in global event handler for "${t}":`,c)}})}on(t,r){return this.handlers[t]||(this.handlers[t]=new Set),this.handlers[t].add(r),()=>this.off(t,r)}off(t,r){const n=this.handlers[t];n&&n.delete(r)}offAll(t){delete this.handlers[t]}listen(t,r,n){return this.addEventListener(t,r,n),()=>this.removeEventListener(t,r)}once(t,r){return new Promise(n=>{const i=this.on(t,s=>{i(),r(s),n(s)})})}getActiveEvents(){return Object.keys(this.handlers).filter(t=>this.handlers[t]&&this.handlers[t].size>0)}clear(){this.handlers={}}getHandlerCount(t){return this.handlers[t]?.size||0}getEventStats(){const t={};for(const[r,n]of this.eventCounters.entries())t[r]={count:n.count,handlersCount:this.getHandlerCount(r)};return t}resetEventCounters(){this.eventCounters.clear()}}const ge=de.getInstance(),Lr=(e,t)=>ge.emit(e,t),Mr=(e,t)=>ge.on(e,t),Wr=(e,t)=>ge.off(e,t),Dr=(e,t)=>ge.once(e,t),Ir=(e,t,r)=>ge.listen(e,t,r);function Qe(e){let t={...e};const r=[];function n(c){r.push(c),c(t)}function i(){return t}function s(c){const a=typeof c=="function"?c(t):c;t={...t,...a},o()}function o(){r.forEach(c=>c(t))}return{subscribe:n,getState:i,setState:s}}const Xe=e=>e?typeof URLSearchParams>"u"?{}:Object.fromEntries(new URLSearchParams(e)):{},Q=(e,t)=>{for(const r of e){const n=[],i=r.path.replace(/:[^/]+/g,c=>(n.push(c.slice(1)),"([^/]+)")),s=new RegExp(`^${i}$`),o=t.match(s);if(o){const c={};return n.forEach((a,p)=>{c[a]=o[p+1]}),{route:r,params:c}}}return{route:null,params:{}}},Ye={};async function xt(e){if(e.component)return e.component;if(e.load){if(Ye[e.path])return Ye[e.path];try{const t=await e.load();return Ye[e.path]=t.default,t.default}catch{throw new Error(`Failed to load component for route: ${e.path}`)}}throw new Error(`No component or loader defined for route: ${e.path}`)}function $t(e){const{routes:t,base:r="",initialUrl:n}=e;let i,s,o,c,a,p,h;const v=async(y,w)=>{const l=t.find(f=>Q([f],y.path).route!==null);if(l?.beforeEnter)try{const f=await l.beforeEnter(y,w);return typeof f=="string"?(await u(f,!0),!1):f!==!1}catch(f){return oe("beforeEnter error",f),!1}return!0},m=async(y,w)=>{const l=t.find(f=>Q([f],y.path).route!==null);if(l?.onEnter)try{const f=await l.onEnter(y,w);return typeof f=="string"?(await u(f,!0),!1):f!==!1}catch(f){return oe("onEnter error",f),!1}return!0},d=(y,w)=>{const l=t.find(f=>Q([f],y.path).route!==null);if(l?.afterEnter)try{l.afterEnter(y,w)}catch(f){oe("afterEnter error",f)}},u=async(y,w=!1)=>{try{const l={path:y.replace(r,"")||"/",query:{}},f=Q(t,l.path);if(!f)throw new Error(`No route found for ${l.path}`);const b=o.getState(),k={path:l.path,params:f.params,query:l.query};if(!await v(k,b)||!await m(k,b))return;typeof window<"u"&&typeof document<"u"&&(w?window.history.replaceState({},"",r+y):window.history.pushState({},"",r+y)),o.setState(k),d(k,b)}catch(l){oe("Navigation error:",l)}};if(typeof window<"u"&&typeof document<"u"&&typeof n>"u"){i=()=>{const w=new URL(window.location.href),l=w.pathname.replace(r,"")||"/",f=Xe(w.search);return{path:l,query:f}},s=i();const y=Q(t,s.path);o=Qe({path:s.path,params:y.params,query:s.query}),c=async(w=!1)=>{const l=i();await u(l.path,w)},window.addEventListener("popstate",()=>c(!0)),a=w=>u(w,!1),p=w=>u(w,!0),h=()=>window.history.back()}else{i=()=>{const l=new URL(n||"/","http://localhost"),f=l.pathname.replace(r,"")||"/",b=Xe(l.search);return{path:f,query:b}},s=i();const y=Q(t,s.path);o=Qe({path:s.path,params:y.params,query:s.query}),c=async()=>{const l=i();await w(l.path)};const w=async l=>{try{const f={path:l.replace(r,"")||"/",query:{}},b=Q(t,f.path);if(!b)throw new Error(`No route found for ${f.path}`);const k=o.getState(),C={path:f.path,params:b.params,query:f.query},g=t.find($=>Q([$],C.path).route!==null);if(g?.beforeEnter)try{const $=await g.beforeEnter(C,k);if(typeof $=="string"){await w($);return}if($===!1)return}catch{return}if(g?.onEnter)try{const $=await g.onEnter(C,k);if(typeof $=="string"){await w($);return}if($===!1)return}catch{return}if(o.setState(C),g?.afterEnter)try{g.afterEnter(C,k)}catch{}}catch{}};a=async l=>w(l),p=async l=>w(l),h=()=>{}}return{store:o,push:a,replace:p,back:h,subscribe:o.subscribe,matchRoute:y=>Q(t,y),getCurrent:()=>o.getState(),resolveRouteComponent:xt}}function Nr(e,t){return Q(e,t)}function Hr(e){const t=$t(e);return Je("router-view",(r={},n={})=>{const{onConnected:i}=n;if(i&&i(()=>{t&&typeof t.subscribe=="function"&&t.subscribe(()=>{})}),!t)return ce`<div>Router not initialized.</div>`;const s=t.getCurrent(),{path:o}=s,c=t.matchRoute(o);return c.route?t.resolveRouteComponent(c.route).then(a=>{if(typeof a=="string")return{tag:a,props:{},children:[]};if(typeof a=="function"){const p=a();return(p instanceof Promise?p:Promise.resolve(p)).then(v=>typeof v=="string"?{tag:v,props:{},children:[]}:v)}return ce`<div>Invalid route component</div>`}).catch(()=>ce`<div>Invalid route component</div>`):ce`<div>Not found</div>`}),Je("router-link",(r={},n={})=>{const{to:i="",tag:s="a",replace:o=!1,exact:c=!1,activeClass:a="active",exactActiveClass:p="exact-active",ariaCurrentValue:h="page",disabled:v=!1,external:m=!1,class:d=""}=r,u=t.getCurrent(),y=u.path===i,w=c?y:u&&typeof u.path=="string"?u.path.startsWith(i):!1,l=y?`aria-current="${h}"`:"",f=(d||"").split(/\s+/).filter(Boolean),b={};for(const x of f)b[x]=!0;const k={...b,[a]:w,[p]:y},C=s==="button",g=v?C?'disabled aria-disabled="true" tabindex="-1"':'aria-disabled="true" tabindex="-1"':"",$=m&&(s==="a"||!s)?'target="_blank" rel="noopener noreferrer"':"",O=x=>{if(v){x.preventDefault();return}m&&(s==="a"||!s)||(x.preventDefault(),o?t.replace(i):t.push(i))};return ce`
|
|
126
|
-
${
|
|
123
|
+
Stopping runaway component render to prevent browser freeze`),s(null);return}}else i(0);const d=setTimeout(()=>{n(Date.now()),e(),s(null)},r>10?100:0);s(d)}function Hn(e,t,r,n,i){if(!e)return;const o=Nt(r);if((!o||o.trim()==="")&&!t._computedStyle){i(null),e.adoptedStyleSheets=[jt(),Je()];return}let s="";t._computedStyle&&(s=t._computedStyle);let c=vn(`${s}
|
|
124
|
+
${o}
|
|
125
|
+
`);c=Ot(c);let a=n;a||(a=new CSSStyleSheet),(a.cssRules.length===0||a.cssRules.length>0&&Array.from(a.cssRules).map(b=>b.cssText).join("")!==c)&&a.replaceSync(c),e.adoptedStyleSheets=[jt(),Je(),a],i(a)}let H=null;function Bt(e){H=e}function Wt(){H=null}function Bn(){if(!H)throw new Error("useEmit must be called during component render");const e=H.emit;return(t,r)=>e(t,r)}function Ee(e){e._hookCallbacks||Object.defineProperty(e,"_hookCallbacks",{value:{},writable:!0,enumerable:!1,configurable:!1})}function Wn(e){if(!H)throw new Error("useOnConnected must be called during component render");Ee(H),H._hookCallbacks.onConnected=e}function Fn(e){if(!H)throw new Error("useOnDisconnected must be called during component render");Ee(H),H._hookCallbacks.onDisconnected=e}function zn(e){if(!H)throw new Error("useOnAttributeChanged must be called during component render");Ee(H),H._hookCallbacks.onAttributeChanged=e}function Un(e){if(!H)throw new Error("useOnError must be called during component render");Ee(H),H._hookCallbacks.onError=e}function Kn(e){if(!H)throw new Error("useProps must be called during component render");Ee(H),H._hookCallbacks.props={...H._hookCallbacks.props||{},...e};const t=H;try{const n=Object.keys(e||{});for(const i of n){if(typeof i!="string"||i.startsWith("_"))continue;const o=Object.getOwnPropertyDescriptor(t,i);if(!(o&&!o.configurable))try{let c=Object.prototype.hasOwnProperty.call(t,i)?t[i]:void 0;Object.defineProperty(t,i,{configurable:!0,enumerable:!0,get(){try{const a=t&&t._host;if(a){const d=Y(i),b=a.getAttribute(d);if(b!==null){const y=typeof e[i];return y==="boolean"?b===""||b==="true":y==="number"?Number(b):b}if(typeof a[i]<"u"){const y=a[i];return M(y)||y&&typeof y=="object"&&"value"in y&&!(y instanceof Node)?y.value:typeof e[i]==="boolean"&&typeof y=="string"?y===""||y==="true":y}}}catch{}return c},set(a){c=a}})}catch{}}}catch{}return new Proxy({},{get(n,i){if(typeof i!="string")return;const o=e[i];try{const c=t&&t._host;if(c){if(c instanceof HTMLElement||typeof c.getAttribute=="function"&&typeof c.hasAttribute=="function"){const d=i.replace(/([A-Z])/g,"-$1").toLowerCase(),b=c.getAttribute(d);if(b!==null)return typeof o=="boolean"?b===""||b==="true":typeof o=="number"?Number(b):b}const a=c[i];if(typeof a<"u"&&a!=="")return typeof o=="boolean"&&o===!1&&a===""?o:M(a)||a&&typeof a=="object"&&"value"in a&&!(a instanceof Node)?a.value:typeof o=="boolean"&&typeof a=="string"?a==="true"||a!==""&&a!=="false":typeof o=="number"&&typeof a=="string"&&!Number.isNaN(Number(a))?Number(a):a}}catch{}const s=t[i];return typeof o=="boolean"&&s===""?o===!1?o:!0:M(s)||s&&typeof s=="object"&&"value"in s&&!(s instanceof Node)?s.value:s!=null&&s!==""?typeof o=="boolean"&&typeof s=="string"?s==="true":typeof o=="number"&&typeof s=="string"&&!Number.isNaN(Number(s))?Number(s):s:o},has(n,i){return typeof i=="string"&&(i in t||i in e)},ownKeys(){return Array.from(new Set([...Object.keys(e),...Object.keys(t||{})]))},getOwnPropertyDescriptor(){return{configurable:!0,enumerable:!0}}})}function Vn(e){if(!H)throw new Error("useStyle must be called during component render");Ee(H);try{const t=e();Object.defineProperty(H,"_computedStyle",{value:t,writable:!0,enumerable:!1,configurable:!0})}catch(t){ne("Error in useStyle callback:",t),Object.defineProperty(H,"_computedStyle",{value:"",writable:!0,enumerable:!1,configurable:!0})}}const _e=new Map,Ft=Symbol.for("cer.registry");if(typeof window<"u"){const e=globalThis;e[Ft]||(e[Ft]=_e)}function qn(e,t){if(!t.render)throw new Error("Component must have a render function");return typeof window>"u"?class{constructor(){}}:class extends HTMLElement{context;_refs={};_listeners=[];_watchers=new Map;_renderTimeoutId=null;_mounted=!1;_hasError=!1;_initializing=!0;_componentId;_styleSheet=null;_lastHtmlStringForJitCSS="";get lastHtmlStringForJitCSS(){return this._lastHtmlStringForJitCSS}get isLoading(){return this._templateLoading}get lastError(){return this._templateError}_cfg;_lastRenderTime=0;_renderCount=0;_templateLoading=!1;_templateError=null;constructor(){super(),this.attachShadow({mode:"open"}),this._cfg=_e.get(e)||t,this._componentId=`${e}-${Math.random().toString(36).substr(2,9)}`;const r=this._initContext(t),n=(o,s,c)=>{Object.defineProperty(o,s,{value:c,writable:!1,enumerable:!1,configurable:!1})};n(r,"refs",this._refs),n(r,"requestRender",()=>this.requestRender()),n(r,"_requestRender",()=>this._requestRender()),n(r,"_componentId",this._componentId),n(r,"_triggerWatchers",(o,s)=>this._triggerWatchers(o,s)),this.context=r,P(()=>{n(r,"_host",this)}),n(this.context,"emit",(o,s,c)=>{const a={detail:s,bubbles:!0,composed:!0,...c||{}},d=new CustomEvent(o,a);this.dispatchEvent(d);const b=o.indexOf(":");if(b>0){const y=o.substring(0,b),p=o.substring(b+1),x=p.includes("-")?`${y}:${p.split("-").map((u,f)=>f===0?u:u.charAt(0).toUpperCase()+u.slice(1)).join("")}`:`${y}:${p.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase()}`;x!==o&&P(()=>{this.dispatchEvent(new CustomEvent(x,a))})}return!d.defaultPrevented});const i=_e.get(e)||t;for(const o in i){const s=i[o];typeof s=="function"&&(this.context[o]=(...c)=>s(...c,this.context))}if(i.props)for(const o in i.props){let s=this[o];Object.defineProperty(this,o,{get(){return s},set(c){const a=s;s=c,this.context[o]=c,this._initializing||(this._applyProps(i),a!==c&&this._requestRender())},enumerable:!0,configurable:!0})}this._initializing=!1,this._initWatchers(i),this._applyProps(i),this._render(i)}connectedCallback(){this._runLogicWithinErrorBoundary(t,()=>{this._applyProps(t),this._requestRender(),rn(t,this.context,this._mounted,r=>{this._mounted=r})})}disconnectedCallback(){this._runLogicWithinErrorBoundary(t,()=>{on(t,this.context,this._listeners,()=>{this._listeners=[]},()=>{this._watchers.clear()},r=>{this._templateLoading=r},r=>{this._templateError=r},r=>{this._mounted=r})})}attributeChangedCallback(r,n,i){this._runLogicWithinErrorBoundary(t,()=>{this._applyProps(t),n!==i&&this._requestRender(),sn(t,r,n,i,this.context)})}static get observedAttributes(){return t.props?Object.keys(t.props).map(Y):[]}_render(r){this._runLogicWithinErrorBoundary(r,()=>{Nn(this.shadowRoot,r,this.context,this._refs,n=>{this._lastHtmlStringForJitCSS=n,typeof this.onHtmlStringUpdate=="function"&&this.onHtmlStringUpdate(n)},n=>{this._templateLoading=n,typeof this.onLoadingStateChange=="function"&&this.onLoadingStateChange(n)},n=>{this._templateError=n,typeof this.onErrorStateChange=="function"&&this.onErrorStateChange(n)},n=>this._applyStyle(r,n))})}requestRender(){this._requestRender()}_requestRender(){this._runLogicWithinErrorBoundary(this._cfg,()=>{we(()=>{In(()=>this._render(this._cfg),this._lastRenderTime,this._renderCount,r=>{this._lastRenderTime=r},r=>{this._renderCount=r},this._renderTimeoutId,r=>{this._renderTimeoutId=r})},this._componentId)})}_applyStyle(r,n){this._runLogicWithinErrorBoundary(r,()=>{Hn(this.shadowRoot,this.context,n,this._styleSheet,i=>{this._styleSheet=i})})}_runLogicWithinErrorBoundary(r,n){this._hasError&&(this._hasError=!1);try{n()}catch(i){this._hasError=!0,r.onError&&r.onError(i,this.context)}}_initContext(r){try{let n=function(o,s=""){if(Array.isArray(o))return new Proxy(o,{get(c,a,d){const b=Reflect.get(c,a,d);return typeof b=="function"&&typeof a=="string"&&["push","pop","shift","unshift","splice","sort","reverse"].includes(a)?function(...p){const x=b.apply(c,p);if(!i._initializing){const u=s||"root";i._triggerWatchers(u,c),we(()=>i._render(r),i._componentId)}return x}:b},set(c,a,d){if(c[a]=d,!i._initializing){const b=s?`${s}.${String(a)}`:String(a);i._triggerWatchers(b,d),we(()=>i._render(r),i._componentId)}return!0},deleteProperty(c,a){if(delete c[a],!i._initializing){const d=s?`${s}.${String(a)}`:String(a);i._triggerWatchers(d,void 0),we(()=>i._render(r),i._componentId)}return!0}});if(o&&typeof o=="object"){if(M(o))return o;for(const c in o){const a=s?`${s}.${c}`:c;o[c]=n(o[c],a)}return new Proxy(o,{set(c,a,d){const b=s?`${s}.${String(a)}`:String(a);return c[a]=n(d,b),i._initializing||(i._triggerWatchers(b,c[a]),we(()=>i._render(r),i._componentId)),!0},get(c,a,d){return Reflect.get(c,a,d)}})}return o};const i=this;return n({...r.props?Object.fromEntries(Object.entries(r.props).map(([o,s])=>[o,s.default])):{}})}catch{return{}}}_initWatchers(r){this._runLogicWithinErrorBoundary(r,()=>{Yt(this.context,this._watchers,{})})}_triggerWatchers(r,n){en(this.context,this._watchers,r,n)}_applyProps(r){this._runLogicWithinErrorBoundary(r,()=>{try{nn(this,r,this.context)}catch(n){this._hasError=!0,r.onError&&r.onError(n,this.context)}})}}}function pt(e,t){let r=Y(e);r.includes("-")||(r=`cer-${r}`);let n={};const i={props:{},onConnected:o=>{n.onConnected&&n.onConnected()},onDisconnected:o=>{n.onDisconnected&&n.onDisconnected()},onAttributeChanged:(o,s,c,a)=>{n.onAttributeChanged&&n.onAttributeChanged(o,s,c)},onError:(o,s)=>{n.onError&&o&&n.onError(o)},render:o=>{const s=o._componentId||`${r}-${Math.random().toString(36).substr(2,9)}`;Q.setCurrentComponent(s,()=>{o.requestRender&&o.requestRender()});try{Bt(o);const c=t();if(o._hookCallbacks){const a=o._hookCallbacks;if(a.onConnected&&(n.onConnected=a.onConnected),a.onDisconnected&&(n.onDisconnected=a.onDisconnected),a.onAttributeChanged&&(n.onAttributeChanged=a.onAttributeChanged),a.onError&&(n.onError=a.onError),a.style&&(o._styleCallback=a.style),a.props){const d=a.props;i.props=Object.fromEntries(Object.entries(d).map(([b,y])=>[b,{type:typeof y=="boolean"?Boolean:typeof y=="number"?Number:typeof y=="string"?String:Function,default:y}])),_e.set(r,i)}}return c}finally{Wt(),Q.clearCurrentComponent()}}};if(_e.set(r,i),typeof window<"u"){try{const o={_hookCallbacks:{},requestRender:()=>{}};if(Bt(o),t(),Wt(),o._hookCallbacks?.props){const s=o._hookCallbacks.props;i.props=Object.fromEntries(Object.entries(s).map(([c,a])=>[c,{type:typeof a=="boolean"?Boolean:typeof a=="number"?Number:typeof a=="string"?String:Function,default:a}])),_e.set(r,i)}}catch{}customElements.get(r)||customElements.define(r,qn(r,i))}}class Gn{map=new Map;maxSize;constructor(t){this.maxSize=t}get(t){const r=this.map.get(t);if(r!==void 0)return this.map.delete(t),this.map.set(t,r),r}set(t,r){if(this.map.delete(t),this.map.set(t,r),this.map.size>this.maxSize){const n=this.map.keys().next().value;n!==void 0&&this.map.delete(n)}}has(t){return this.map.has(t)}clear(){this.map.clear()}}const ht=new Gn(500);function Zn(e,t){if(e==null){ne(`⚠️ Event handler for '@${t}' is ${e}. This will prevent the event from working. Use a function reference instead: @${t}="\${functionName}"`);return}typeof e!="function"&&ne(`🚨 Potential infinite loop detected! Event handler for '@${t}' appears to be the result of a function call (${typeof e}) instead of a function reference. Change @${t}="\${functionName()}" to @${t}="\${functionName}" to pass the function reference instead of calling it immediately.`),e===void 0&&typeof e!="function"&&ne(`💡 Tip: If your event handler function returns undefined, make sure you're passing the function reference, not calling it. Use @${t}="\${fn}" not @${t}="\${fn()}"`)}function De(e,t={},r,n){const i=n??t.key;return{tag:e,key:i,props:t,children:r}}function Ne(e){return!!e&&typeof e=="object"&&(e.type==="AnchorBlock"||e.tag==="#anchor")}function Ie(e){return typeof e=="object"&&e!==null&&"tag"in e&&!Ne(e)}function Jn(e,t){return e.key!=null?e:{...e,key:t}}function Qn(e,t=[],r={}){const n={},i={},o={},s=[],c=/([:@#]?)([a-zA-Z0-9-:\.]+)(?:=("([^"\\]*(\\.[^"\\]*)*)"|'([^'\\]*(\\.[^'\\]*)*)'))?/g;let a;for(;a=c.exec(e);){const d=a[1],b=a[2],y=(a[4]||a[6])??"",p=a[3]===void 0&&a[6]===void 0,x=y.match(/^{{(\d+)}}$/);let u=p?!0:x?t[Number(x[1])]??null:y;x||(u==="true"?u=!0:u==="false"?u=!1:u==="null"?u=null:isNaN(Number(u))||(u=Number(u)));const f=["model","bind","show","class","style","ref","when"];if(d===":"){const[g,l]=b.split(":"),[m,...k]=g.split(".");if(f.includes(m)){const w=[...k],_=m==="model"&&l?`model:${l}`:m;o[_]={value:u,modifiers:w,arg:l}}else if(b==="disabled"){let w=u;w&&M(w)&&(w=w.value);const _=typeof w;if(w===""||_==="boolean"||_==="string"&&(w==="true"||w==="false")||w==null||_==="number")n[b]=w;else{let T=u;T&&M(T)&&(T=T.value),i[b]=T}s.push(b)}else{let w=u;w&&M(w)&&(w=w.value),i[b]=w,s.push(b)}}else if(d==="@"){const[g,...l]=b.split("."),m=l;Zn(u,g);const k=typeof u=="function"?u:typeof r[u]=="function"?r[u]:void 0;if(k){const w=C=>{if(m.includes("prevent")&&C.preventDefault(),m.includes("stop")&&C.stopPropagation(),!(m.includes("self")&&C.target!==C.currentTarget))return m.includes("once")&&C.currentTarget?.removeEventListener(g,w),k(C)},_="on"+g.charAt(0).toUpperCase()+g.slice(1);n[_]=w}}else b==="ref"?n.ref=u:i[b]=u}return{props:n,attrs:i,directives:o,bound:s}}function gt(e){if(!Ie(e)||Ne(e))return e;const t=e.props?.directives;if(t&&t.when){const r=t.when.value,{when:n,...i}=t,o={...e.props};Object.keys(i).length>0?o.directives=i:delete o.directives;const s={...e,props:o};return Array.isArray(s.children)&&(s.children=s.children.map(a=>typeof a=="object"&&a!==null?gt(a):a)),{tag:"#anchor",key:e.key!=null?`when-${e.key}`:`when-${e.tag}`,children:r?[s]:[]}}if(Array.isArray(e.children)){const r=e.children.map(n=>typeof n=="object"&&n!==null?gt(n):n);return{...e,children:r}}return e}function Xn(e,t,r){const n=Me.length>0?Me[Me.length-1]:void 0,i=r??n,o=!r&&t.length===0,s=o?e.join("<!--TEMPLATE_DELIM-->"):null;if(o&&s){const h=ht.get(s);if(h)return h}function c(h,T){return De("#text",{},h,T)}let a="";for(let h=0;h<e.length;h++)a+=e[h],h<t.length&&(a+=`{{${h}}}`);const d=/<!--[\s\S]*?-->|<\/?([a-zA-Z0-9-]+)((?:\s+[^\s=>/]+(?:\s*=\s*(?:"(?:\\.|[^"])*"|'(?:\\.|[^'])*'|[^\s>]+))?)*)\s*\/?>|{{(\d+)}}|([^<]+)/g,b=[];let y,p=[],x=null,u={},f,g=0,l=[];function m(h){!h||typeof h!="object"||Ne(h)||(h.props||h.attrs?(h.props&&(u.props||(u.props={}),Object.assign(u.props,h.props)),h.attrs&&(u.attrs||(u.attrs={}),Object.keys(h.attrs).forEach(T=>{if(T==="style"&&u.attrs.style){const E=u.attrs.style.replace(/;?\s*$/,""),v=h.attrs.style.replace(/^;?\s*/,"");u.attrs.style=E+"; "+v}else if(T==="class"&&u.attrs.class){const E=u.attrs.class.trim().split(/\s+/).filter(Boolean),v=h.attrs.class.trim().split(/\s+/).filter(Boolean),$=[...new Set([...E,...v])];u.attrs.class=$.join(" ")}else u.attrs[T]=h.attrs[T]}))):(u.props||(u.props={}),Object.assign(u.props,h)))}function k(h,T){const E=x?p:l;if(Ne(h)){const v=h.key??T;let $=h.children;E.push({...h,key:v,children:$});return}if(Ie(h)){E.push(Jn(h,void 0));return}if(Array.isArray(h)){if(h.length===0)return;for(let v=0;v<h.length;v++){const $=h[v];Ne($)||Ie($)||Array.isArray($)?k($,`${T}-${v}`):$!==null&&typeof $=="object"?m($):E.push(c(String($),`${T}-${v}`))}return}if(h!==null&&typeof h=="object"){m(h);return}E.push(c(String(h),T))}const w=new Set(["area","base","br","col","embed","hr","img","input","link","meta","param","source","track","wbr"]);for(;y=d.exec(a);)if(!(y[0].startsWith("<!--")&&y[0].endsWith("-->"))){if(y[1]){const h=y[1],T=y[0][1]==="/",E=y[0][y[0].length-2]==="/"||w.has(h),{props:v,attrs:$,directives:A,bound:R}=Qn(y[2]||"",t,i),S={props:{},attrs:{}};for(const L in v)S.props[L]=v[L];for(const L in $)S.attrs[L]=$[L];S.attrs&&Object.prototype.hasOwnProperty.call(S.attrs,"key")&&!(S.props&&Object.prototype.hasOwnProperty.call(S.props,"key"))&&P(()=>{S.props.key=S.attrs.key});try{const L={input:["value","checked","readonly","required","placeholder","maxlength","minlength"],textarea:["value","readonly","required","placeholder","maxlength","minlength"],select:["value","required","multiple"],option:["selected","value"],video:["muted","autoplay","controls","loop","playsinline"],audio:["muted","autoplay","controls","loop"],img:["src","alt","width","height"],button:["type","name","value","autofocus","form"]},U=h.toLowerCase(),oe=L[U]??[];if(S.attrs){for(const W of oe)if(R&&R.includes(W)&&W in S.attrs&&!(S.props&&W in S.props)){let D=S.attrs[W];if(D&&M(D))D=D.value,S.props[W]=D,delete S.attrs[W];else{const V=typeof D;W==="disabled"?(D===""||V==="boolean"||V==="string"&&(D==="true"||D==="false")||D==null||V==="number")&&(S.props[W]=D,P(()=>{const K=globalThis;K.__VDOM_DISABLED_PROMOTIONS||(K.__VDOM_DISABLED_PROMOTIONS=[]),K.__VDOM_DISABLED_PROMOTIONS.push({phase:"compiler-promotion",tag:h,propName:W,value:D,time:Date.now(),stack:new Error().stack})}),delete S.attrs[W]):(D===""||V==="string"||V==="number"||V==="boolean"||D==null)&&(S.props[W]=D,delete S.attrs[W])}}}if((h.includes("-")||!!i?.__customElements?.has?.(h))&&(S.isCustomElement=!0,R&&S.attrs)){const W=new Set(["id","name","data-key","key"]);for(const D of R)if(D in S.attrs&&!(S.props&&D in S.props)){const V=D.includes("-")?Ye(D):D;let ce=S.attrs[D];S.props[V]=ce,W.has(D)||delete S.attrs[D]}}}catch{}if(A&&Object.keys(A).some(L=>L==="model"||L.startsWith("model:")))try{const L=Symbol.for("cer.registry"),U=globalThis[L],oe=!!(U&&typeof U.has=="function"&&U.has(h)),Qe=!!(i&&(i.__customElements instanceof Set&&i.__customElements.has(h)||Array.isArray(i.__isCustomElements)&&i.__isCustomElements.includes(h)));if(!!(h.includes("-")||Qe||oe))for(const V of Object.keys(A)){if(V!=="model"&&!V.startsWith("model:"))continue;const ce=A[V],de=ce.arg??(V.includes(":")?V.split(":",2)[1]:void 0),K=ce.value,se=de??"modelValue",ue=q,O=ze,N=i?i._state||i:void 0;let B;typeof K=="string"&&i?B=ue(N,K):B=K,S.props[se]=B;try{const pe=Y(se);S.attrs||(S.attrs={}),B!=null&&(typeof B=="string"||typeof B=="number"||typeof B=="boolean")&&(S.attrs[pe]=B)}catch{}S.isCustomElement=!0;const F=`update:${Y(se)}`.replace(/-([a-z])/g,(pe,le)=>le.toUpperCase()),J="on"+F.charAt(0).toUpperCase()+F.slice(1);S.props[J]=function(pe){const le=pe.detail!==void 0?pe.detail:pe.target?pe.target.value:void 0;if(N)if(K&&M(K)){const ye=K.value;(Array.isArray(le)&&Array.isArray(ye)?JSON.stringify([...le].sort())!==JSON.stringify([...ye].sort()):le!==ye)&&(K.value=le,i?.requestRender?i.requestRender():i?._requestRender&&i._requestRender())}else{const ye=ue(N,typeof K=="string"?K:String(K));(Array.isArray(le)&&Array.isArray(ye)?JSON.stringify([...le].sort())!==JSON.stringify([...ye].sort()):le!==ye)&&(O(N,typeof K=="string"?K:String(K),le),i?.requestRender?i.requestRender():i?._requestRender&&i._requestRender())}},delete A[V]}}catch{}if(Object.keys(A).length>0&&(S.directives={...A}),T){const L=De(x,u,p.length===1&&Ie(p[0])&&p[0].tag==="#text"?typeof p[0].children=="string"?p[0].children:"":p.length?p:void 0,f),U=b.pop();U?(x=U.tag,u=U.props,f=U.key,p=U.children,p.push(L)):(l.push(L),x=null,u={},f=void 0,p=[])}else E?x?p.push(De(h,S,void 0,void 0)):l.push(De(h,S,void 0,void 0)):(x&&b.push({tag:x,props:u,children:p,key:f}),x=h,u=S,p=[])}else if(typeof y[3]<"u"){const h=Number(y[3]),T=t[h],E=`interp-${h}`;k(T,E)}else if(y[4]){const h=y[4],T=x?p:l,E=h.split(/({{\d+}})/);for(const v of E){if(!v)continue;const $=v.match(/^{{(\d+)}}$/);if($){const A=Number($[1]),R=t[A],S=`interp-${A}`;k(R,S)}else{const A=`text-${g++}`;T.push(c(v,A))}}}}const C=l.filter(h=>Ie(h)&&h.tag==="#text"?typeof h.children=="string"&&h.children.trim()!=="":!0).map(h=>gt(h));if(C.length===1){const h=C[0];return o&&s&&ht.set(s,h),h}else if(C.length>1){const h=C;return o&&s&&ht.set(s,h),h}return De("div",{},"","fallback-root")}function fe(e,...t){const r=t[t.length-1],n=typeof r=="object"&&r&&!Array.isArray(r)?r:void 0;return Xn(e,t,n)}function Yn(e,t){return Re(!e,t)}function er(e,t){const r=!e||e.length===0;return Re(r,t)}function tr(e,t){const r=!!(e&&e.length>0);return Re(r,t)}function nr(e,t,r){const n=[];return e.forEach((i,o)=>{t(i,o)&&n.push({item:i,originalIndex:o})}),n.map(({item:i,originalIndex:o},s)=>{const c=typeof i=="object"&&i!=null?i?.key??i?.id??`filtered-${o}`:`filtered-${o}`;return z(r(i,o,s),`each-where-${c}`)})}function rr(e,t){const r=e?.length??0;return r===0&&t.empty?z(t.empty,"switch-length-empty"):r===1&&t.one?z(t.one(e[0]),"switch-length-one"):t.exactly?.[r]?z(t.exactly[r](e),`switch-length-${r}`):r>1&&t.many?z(t.many(e),"switch-length-many"):z([],"switch-length-fallback")}function ir(e,t,r){const n=new Map;return e.forEach(i=>{const o=t(i);n.has(o)||n.set(o,[]),n.get(o).push(i)}),Array.from(n.entries()).map(([i,o],s)=>z(r(i,o,s),`each-group-${i}`))}function or(e,t,r,n){const i=r*t,o=Math.min(i+t,e.length);return e.slice(i,o).map((c,a)=>{const d=i+a,b=typeof c=="object"&&c!=null?c?.key??c?.id??`page-${d}`:`page-${d}`;return z(n(c,d,a),`each-page-${b}`)})}function sr(e,t){return e.loading&&t.loading?z(t.loading,"promise-loading"):e.error&&t.error?z(t.error(e.error),"promise-error"):e.data!==void 0&&t.success?z(t.success(e.data),"promise-success"):t.idle?z(t.idle,"promise-idle"):z([],"promise-fallback")}function G(e,t){const r=typeof window<"u"&&window.matchMedia?.(e)?.matches;return Re(!!r,t)}const ae={sm:"(min-width:640px)",md:"(min-width:768px)",lg:"(min-width:1024px)",xl:"(min-width:1280px)","2xl":"(min-width:1536px)",dark:"(prefers-color-scheme: dark)"},mt=["sm","md","lg","xl","2xl"],zt={sm:e=>G(ae.sm,e),md:e=>G(ae.md,e),lg:e=>G(ae.lg,e),xl:e=>G(ae.xl,e),"2xl":e=>G(ae["2xl"],e),dark:e=>G(ae.dark,e),light:e=>G("(prefers-color-scheme: light)",e),touch:e=>G("(hover: none) and (pointer: coarse)",e),mouse:e=>G("(hover: hover) and (pointer: fine)",e),reducedMotion:e=>G("(prefers-reduced-motion: reduce)",e),highContrast:e=>G("(prefers-contrast: high)",e),portrait:e=>G("(orientation: portrait)",e),landscape:e=>G("(orientation: landscape)",e)};function ar(e,t){const r=[];e.includes("dark")?r.push(ae.dark):e.includes("light")&&r.push("(prefers-color-scheme: light)");const n=e.filter(s=>mt.includes(s)),i=n[n.length-1];i&&i in ae&&r.push(ae[i]);const o=r.length>0?r.join(" and "):"all";return G(o,t)}function cr(e){const t=[];return e.base&&t.push(z(e.base,"responsive-base")),mt.forEach(r=>{const n=e[r];n&&t.push(zt[r](n))}),t}function lr(e){const t=[];let r=null;return{case(n,i){const o=typeof n=="function"?n:s=>s===n;return t.push({condition:o,content:i}),this},when(n,i){return t.push({condition:n,content:i}),this},otherwise(n){return r=n,this},done(){for(let n=0;n<t.length;n++){const{condition:i,content:o}=t[n];if(i(e))return z(o,`switch-case-${n}`)}return z(r||[],"switch-otherwise")}}}class me extends EventTarget{handlers={};static instance;eventCounters=new Map;static getInstance(){return me.instance||(me.instance=new me),me.instance}emit(t,r){const n=Date.now(),i=this.eventCounters.get(t);if(!i||n-i.window>1e3)this.eventCounters.set(t,{count:1,window:n});else if(i.count++,i.count>50&&i.count>100)return;this.dispatchEvent(new CustomEvent(t,{detail:r,bubbles:!1,cancelable:!0}));const o=this.handlers[t];o&&o.forEach(s=>{try{s(r)}catch(c){I(`Error in global event handler for "${t}":`,c)}})}on(t,r){return this.handlers[t]||(this.handlers[t]=new Set),this.handlers[t].add(r),()=>this.off(t,r)}off(t,r){const n=this.handlers[t];n&&n.delete(r)}offAll(t){delete this.handlers[t]}listen(t,r,n){return this.addEventListener(t,r,n),()=>this.removeEventListener(t,r)}once(t,r){return new Promise(n=>{const i=this.on(t,o=>{i(),r(o),n(o)})})}getActiveEvents(){return Object.keys(this.handlers).filter(t=>this.handlers[t]&&this.handlers[t].size>0)}clear(){this.handlers={}}getHandlerCount(t){return this.handlers[t]?.size||0}getEventStats(){const t={};for(const[r,n]of this.eventCounters.entries())t[r]={count:n.count,handlersCount:this.getHandlerCount(r)};return t}resetEventCounters(){this.eventCounters.clear()}}const Se=me.getInstance(),ur=(e,t)=>Se.emit(e,t),fr=(e,t)=>Se.on(e,t),dr=(e,t)=>Se.off(e,t),pr=(e,t)=>Se.once(e,t),hr=(e,t,r)=>Se.listen(e,t,r);function yt(e){let t={...e};const r=[];function n(c){r.push(c),c(t)}function i(){return t}function o(c){const a=typeof c=="function"?c(t):c;t={...t,...a},s()}function s(){r.forEach(c=>c(t))}return{subscribe:n,getState:i,setState:o}}const bt=e=>e?typeof URLSearchParams>"u"?{}:Object.fromEntries(new URLSearchParams(e)):{},ie=(e,t)=>{for(const r of e){const n=[],i=r.path.replace(/:[^/]+/g,c=>(n.push(c.slice(1)),"([^/]+)")),o=new RegExp(`^${i}$`),s=t.match(o);if(s){const c={};return n.forEach((a,d)=>{c[a]=s[d+1]}),{route:r,params:c}}}return{route:null,params:{}}},wt={};async function Ut(e){if(e.component)return e.component;if(e.load){if(wt[e.path])return wt[e.path];try{const t=await e.load();return wt[e.path]=t.default,t.default}catch{throw new Error(`Failed to load component for route: ${e.path}`)}}throw new Error(`No component or loader defined for route: ${e.path}`)}function Kt(e){const{routes:t,base:r="",initialUrl:n}=e;let i,o,s,c,a,d,b;const y=async(f,g)=>{const l=t.find(m=>ie([m],f.path).route!==null);if(l?.beforeEnter)try{const m=await l.beforeEnter(f,g);return typeof m=="string"?(await u(m,!0),!1):m!==!1}catch(m){return I("beforeEnter error",m),!1}return!0},p=async(f,g)=>{const l=t.find(m=>ie([m],f.path).route!==null);if(l?.onEnter)try{const m=await l.onEnter(f,g);return typeof m=="string"?(await u(m,!0),!1):m!==!1}catch(m){return I("onEnter error",m),!1}return!0},x=(f,g)=>{const l=t.find(m=>ie([m],f.path).route!==null);if(l?.afterEnter)try{l.afterEnter(f,g)}catch(m){I("afterEnter error",m)}},u=async(f,g=!1)=>{try{const l={path:f.replace(r,"")||"/",query:{}},m=ie(t,l.path);if(!m)throw new Error(`No route found for ${l.path}`);const k=s.getState(),w={path:l.path,params:m.params,query:l.query};if(!await y(w,k)||!await p(w,k))return;typeof window<"u"&&typeof document<"u"&&(g?window.history.replaceState({},"",r+f):window.history.pushState({},"",r+f)),s.setState(w),x(w,k)}catch(l){I("Navigation error:",l)}};if(typeof window<"u"&&typeof document<"u"&&typeof n>"u"){i=()=>{const g=new URL(window.location.href),l=g.pathname.replace(r,"")||"/",m=bt(g.search);return{path:l,query:m}},o=i();const f=ie(t,o.path);s=yt({path:o.path,params:f.params,query:o.query}),c=async(g=!1)=>{const l=i();await u(l.path,g)},window.addEventListener("popstate",()=>c(!0)),a=g=>u(g,!1),d=g=>u(g,!0),b=()=>window.history.back()}else{i=()=>{const l=new URL(n||"/","http://localhost"),m=l.pathname.replace(r,"")||"/",k=bt(l.search);return{path:m,query:k}},o=i();const f=ie(t,o.path);s=yt({path:o.path,params:f.params,query:o.query}),c=async()=>{const l=i();await g(l.path)};const g=async l=>{try{const m={path:l.replace(r,"")||"/",query:{}},k=ie(t,m.path);if(!k)throw new Error(`No route found for ${m.path}`);const w=s.getState(),_={path:m.path,params:k.params,query:m.query},C=t.find(h=>ie([h],_.path).route!==null);if(C?.beforeEnter)try{const h=await C.beforeEnter(_,w);if(typeof h=="string"){await g(h);return}if(h===!1)return}catch{return}if(C?.onEnter)try{const h=await C.onEnter(_,w);if(typeof h=="string"){await g(h);return}if(h===!1)return}catch{return}if(s.setState(_),C?.afterEnter)try{C.afterEnter(_,w)}catch{}}catch{}};a=async l=>g(l),d=async l=>g(l),b=()=>{}}return{store:s,push:a,replace:d,back:b,subscribe:s.subscribe,matchRoute:f=>ie(t,f),getCurrent:()=>s.getState(),resolveRouteComponent:Ut}}function gr(e,t){return ie(e,t)}function mr(e){const t=Kt(e);return pt("router-view",(r={},n={})=>{const{onConnected:i}=n;if(i&&i(()=>{t&&typeof t.subscribe=="function"&&t.subscribe(()=>{})}),!t)return fe`<div>Router not initialized.</div>`;const o=t.getCurrent(),{path:s}=o,c=t.matchRoute(s);return c.route?t.resolveRouteComponent(c.route).then(a=>{if(typeof a=="string")return{tag:a,props:{},children:[]};if(typeof a=="function"){const d=a();return(d instanceof Promise?d:Promise.resolve(d)).then(y=>typeof y=="string"?{tag:y,props:{},children:[]}:y)}return fe`<div>Invalid route component</div>`}).catch(()=>fe`<div>Invalid route component</div>`):fe`<div>Not found</div>`}),pt("router-link",(r={},n={})=>{const{to:i="",tag:o="a",replace:s=!1,exact:c=!1,activeClass:a="active",exactActiveClass:d="exact-active",ariaCurrentValue:b="page",disabled:y=!1,external:p=!1,class:x=""}=r,u=t.getCurrent(),f=u.path===i,g=c?f:u&&typeof u.path=="string"?u.path.startsWith(i):!1,l=f?`aria-current="${b}"`:"",m=(x||"").split(/\s+/).filter(Boolean),k={};for(const E of m)k[E]=!0;const w={...k,[a]:g,[d]:f},_=o==="button",C=y?_?'disabled aria-disabled="true" tabindex="-1"':'aria-disabled="true" tabindex="-1"':"",h=p&&(o==="a"||!o)?'target="_blank" rel="noopener noreferrer"':"",T=E=>{if(y){E.preventDefault();return}p&&(o==="a"||!o)||(E.preventDefault(),s?t.replace(i):t.push(i))};return fe`
|
|
126
|
+
${It().when(_,fe`
|
|
127
127
|
<button
|
|
128
128
|
part="button"
|
|
129
|
-
:class="${
|
|
129
|
+
:class="${w}"
|
|
130
130
|
${l}
|
|
131
|
-
${
|
|
132
|
-
${
|
|
133
|
-
@click="${
|
|
131
|
+
${C}
|
|
132
|
+
${h}
|
|
133
|
+
@click="${T}"
|
|
134
134
|
><slot></slot></button>
|
|
135
|
-
`).otherwise(
|
|
135
|
+
`).otherwise(fe`
|
|
136
136
|
<a
|
|
137
137
|
part="link"
|
|
138
138
|
href="${i}"
|
|
139
|
-
:class="${
|
|
139
|
+
:class="${w}"
|
|
140
140
|
${l}
|
|
141
|
-
${
|
|
142
|
-
${
|
|
143
|
-
@click="${
|
|
141
|
+
${C}
|
|
142
|
+
${h}
|
|
143
|
+
@click="${T}"
|
|
144
144
|
><slot></slot></a>
|
|
145
145
|
`).done()}
|
|
146
|
-
`}),t}
|
|
146
|
+
`}),t}j.GlobalEventBus=me,j.Transition=Pn,j.TransitionGroup=Rn,j.anchorBlock=z,j.component=pt,j.computed=Qt,j.createStore=yt,j.createTransitionPreset=Mn,j.css=Tt,j.each=jn,j.eachGroup=ir,j.eachPage=or,j.eachWhere=nr,j.emit=ur,j.eventBus=Se,j.getTransitionStyleSheet=Je,j.html=fe,j.initRouter=mr,j.listen=hr,j.match=It,j.matchRoute=ie,j.matchRouteSSR=gr,j.mediaVariants=ae,j.off=dr,j.on=fr,j.once=pr,j.parseQuery=bt,j.ref=Jt,j.renderToString=Ve,j.resolveRouteComponent=Ut,j.responsive=zt,j.responsiveOrder=mt,j.responsiveSwitch=cr,j.switchOn=lr,j.switchOnLength=rr,j.switchOnPromise=sr,j.transitionPresets=Ce,j.unless=Yn,j.useEmit=Bn,j.useOnAttributeChanged=zn,j.useOnConnected=Wn,j.useOnDisconnected=Fn,j.useOnError=Un,j.useProps=Kn,j.useRouter=Kt,j.useStyle=Vn,j.watch=Xt,j.when=Re,j.whenEmpty=er,j.whenMedia=G,j.whenNotEmpty=tr,j.whenVariants=ar,Object.defineProperty(j,Symbol.toStringTag,{value:"Module"})}));
|
|
147
147
|
//# sourceMappingURL=custom-elements-runtime.umd.js.map
|