@jasonshimmy/custom-elements-runtime 1.0.8 → 1.0.9
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/README.md +1 -1
- package/dist/custom-elements-runtime.cjs.js +83 -37
- package/dist/custom-elements-runtime.cjs.js.map +1 -1
- package/dist/custom-elements-runtime.es.js +1854 -1629
- package/dist/custom-elements-runtime.es.js.map +1 -1
- package/dist/custom-elements-runtime.umd.js +80 -34
- package/dist/custom-elements-runtime.umd.js.map +1 -1
- package/dist/runtime/style.d.ts +8 -29
- package/package.json +1 -1
|
@@ -1,8 +1,11 @@
|
|
|
1
|
-
(function(S,
|
|
1
|
+
(function(S,ge){typeof exports=="object"&&typeof module<"u"?ge(exports):typeof define=="function"&&define.amd?define(["exports"],ge):(S=typeof globalThis<"u"?globalThis:S||self,ge(S.CustomElementsRuntime={}))})(this,(function(S){"use strict";class ge{pendingUpdates=new Map;isFlushScheduled=!1;schedule(t,r){const n=r||t.toString();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=Array.from(this.pendingUpdates.values());this.pendingUpdates.clear(),this.isFlushScheduled=!1;for(const r of t)try{r()}catch(n){typeof console<"u"&&console.error&&console.error("Error in batched update:",n)}}get pendingCount(){return this.pendingUpdates.size}}const xt=new ge;function he(e,t){xt.schedule(e,t)}const Xe=new WeakSet;class $t{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 s=n?this.getOrCreateArrayHandler(r):this.getOrCreateObjectHandler(r),o=new Proxy(t,s);try{Ye.markAsProxy(o)}catch{}return this.cache.set(t,o),o}static getOrCreateArrayHandler(t){if(!this.arrayHandlerCache.has(t)){const r={get:(n,i,s)=>{const o=Reflect.get(n,i,s);return typeof o=="function"&&typeof i=="string"&&["push","pop","shift","unshift","splice","sort","reverse","fill","copyWithin"].includes(i)?function(...a){const p=o.apply(n,a);return t.triggerUpdate(),p}:o},set:(n,i,s)=>(n[i]=t.makeReactiveValue(s),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,s)=>Reflect.get(n,i,s),set:(n,i,s)=>(n[i]=t.makeReactiveValue(s),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 Ye{static contextCache=new WeakMap;static createReactiveProxy(t,r,n){try{if(Xe.has(t))return t}catch{}const i=Array.isArray(t);let s=this.contextCache.get(r);s||(s=new WeakMap,this.contextCache.set(r,s));let o=s.get(n);return o||(o={triggerUpdate:r,makeReactiveValue:n},s.set(n,o)),$t.getOrCreateProxy(t,o,i)}static markAsProxy(t){if(t)try{Xe.add(t)}catch{}}}class kt{currentComponent=null;componentDependencies=new Map;componentRenderFunctions=new Map;stateStorage=new Map;stateIndexCounter=new Map;trackingDisabled=!1;lastWarningTime=new Map;setCurrentComponent(t,r){this.currentComponent=t,this.componentRenderFunctions.set(t,r),this.componentDependencies.has(t)||this.componentDependencies.set(t,new Set),this.stateIndexCounter.set(t,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.currentComponent,r=this.lastWarningTime.get(t)||0,n=Date.now();return n-r<1e3?!1:(this.lastWarningTime.set(t,n),!0)}withoutTracking(t){const r=this.trackingDisabled;this.trackingDisabled=!0;try{return t()}finally{this.trackingDisabled=r}}getOrCreateState(t){if(!this.currentComponent)return new We(t);const r=this.currentComponent,n=this.stateIndexCounter.get(r)||0,i=`${r}:${n}`;if(this.stateIndexCounter.set(r,n+1),this.stateStorage.has(i))return this.stateStorage.get(i);const s=new We(t);return this.stateStorage.set(i,s),s}trackDependency(t){this.trackingDisabled||this.currentComponent&&(this.componentDependencies.get(this.currentComponent)?.add(t),t.addDependent(this.currentComponent))}triggerUpdate(t){t.getDependents().forEach(r=>{const n=this.componentRenderFunctions.get(r);n&&he(n,r)})}cleanup(t){const r=this.componentDependencies.get(t);r&&(r.forEach(n=>n.removeDependent(t)),this.componentDependencies.delete(t)),this.componentRenderFunctions.delete(t);for(const n of Array.from(this.stateStorage.keys()))n.startsWith(t+":")&&this.stateStorage.delete(n);this.stateIndexCounter.delete(t)}}const F=new kt;class We{_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 F.trackDependency(this),this._value}set value(t){F.isRenderingComponent()&&F.shouldEmitRenderWarning()&&console.warn(`🚨 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),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:Qe.createReactiveProxy(t,()=>q.triggerUpdate(this),r=>this.makeReactive(r))}}function vt(e){return q.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 $t(e){const t=new Me(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)}`,s=()=>{q.setCurrentComponent(i,s);const o=e();q.clearCurrentComponent(),o!==n&&(t(o,n),n=o)};return q.setCurrentComponent(i,s),e(),q.clearCurrentComponent(),()=>{q.cleanup(i)}}const xe=new Map,ke=new Map,Ce=new Map,je=500;function ne(e){if(xe.has(e))return xe.get(e);const t=e.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase();return xe.size<je&&xe.set(e,t),t}function Xe(e){if(ke.has(e))return ke.get(e);const t=e.replace(/-([a-z])/g,(r,n)=>n.toUpperCase());return ke.size<je&&ke.set(e,t),t}function ge(e){if(typeof e=="string"){if(Ce.has(e))return Ce.get(e);const t=e.replace(/[&<>"']/g,r=>({"&":"&","<":"<",">":">",'"':""","'":"'"})[r]);return t!==e&&Ce.size<je&&Ce.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 _e(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 Ye=typeof process<"u"&&process.env?.NODE_ENV!=="production";function ie(e,...t){Ye&&console.error(e,...t)}function We(e,...t){Ye&&console.warn(e,...t)}function kt(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){ie(`Error in immediate watcher for "${n}":`,c)}}}function Ct(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((g,b)=>i(g,c[b]));const u=Object.keys(o),m=Object.keys(c);return u.length!==m.length?!1:u.every(g=>i(o[g],c[g]))},s=t.get(r);if(s&&!i(n,s.oldValue))try{s.callback(n,s.oldValue,e),s.oldValue=n}catch(o){ie(`Error in watcher for "${r}":`,o)}for(const[o,c]of t.entries())if(c.options.deep&&r.startsWith(o+"."))try{const u=B(e,o);i(u,c.oldValue)||(c.callback(u,c.oldValue,e),c.oldValue=u)}catch(u){ie(`Error in deep watcher for "${o}":`,u)}}function et(e,t){return t===Boolean?e==="true":t===Number?Number(e):e}function _t(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]=et(String(c),i.type)}catch{r[n]=e[n]}else o!==null?r[n]=et(o,i.type):"default"in i&&i.default!==void 0&&(r[n]=i.default)})}function Et(e,t,r){t.props&&_t(e,t.props,r)}function St(e,t,r,n){e.onConnected&&!r&&(e.onConnected(t),n(!0))}function At(e,t,r,n,i,s,o,c){e.onDisconnected&&e.onDisconnected(t),r.forEach(u=>u()),n(),i(),s(!1),o(null),c(!1)}function Tt(e,t,r,n,i){e.onAttributeChanged&&e.onAttributeChanged(t,r,n,i)}class Rt{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){We("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){We("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 We("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 u=c.slice(4);s[o]=B(i,u)}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(),u=o.replace(/^['"]|['"]$/g,"");r.push({key:u,value:c})}return r}static createSimpleEvaluator(t){return r=>{try{let n=t;const i=[];n=n.replace(/("[^"\\]*(?:\\.[^"\\]*)*"|'[^'\\]*(?:\\.[^'\\]*)*')/g,b=>`<<#${i.push(b)-1}#>>`);const s=n.match(/ctx\.[\w.]+/g)||[];for(const b of s){const p=b.slice(4),f=B(r,p);if(f===void 0)return;const h=i.push(JSON.stringify(f))-1;n=n.replace(new RegExp(b.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),"g"),`<<#${h}#>>`)}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 b of c){if(b.startsWith("ctx."))continue;const p=B(r,b);if(p===void 0)return;const f=i.push(JSON.stringify(p))-1;n=n.replace(new RegExp(b.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),"g"),`<<#${f}#>>`)}const u=/\b([a-zA-Z_][a-zA-Z0-9_]*)\b/g;let m;const g=new Set;for(;(m=u.exec(n))!==null;){const b=m[1];if(["true","false","null","undefined"].includes(b)||/^[0-9]+$/.test(b)||b==="ctx"||g.has(b))continue;g.add(b);const p=B(r,b);if(p===void 0)return;const f=JSON.stringify(p),h=i.push(f)-1;b.includes(".")?n=n.replace(new RegExp(b.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),"g"),`<<#${h}#>>`):n=n.replace(new RegExp("\\b"+b.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")+"\\b","g"),`<<#${h}#>>`)}n=n.replace(/<<#(\d+)#>>/g,(b,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 s(a){const l=r[n++];if(a&&!l)throw new Error(`Unexpected token EOF, expected ${a}`);if(a&&l&&l.type!==a&&l.value!==a)throw new Error(`Unexpected token ${l.type}/${l.value}, expected ${a}`);return l}function o(){return c()}function c(){let a=u();if(i()&&i().value==="?"){s("?");const l=o();s(":");const y=o();return a?l:y}return a}function u(){let a=m();for(;i()&&i().value==="||";){s("OP");const l=m();a=a||l}return a}function m(){let a=g();for(;i()&&i().value==="&&";){s("OP");const l=g();a=a&&l}return a}function g(){let a=b();for(;i()&&["==","!=","===","!=="].includes(i().value);){const l=s("OP").value,y=b();switch(l){case"==":a=a==y;break;case"!=":a=a!=y;break;case"===":a=a===y;break;case"!==":a=a!==y;break}}return a}function b(){let a=p();for(;i()&&[">","<",">=","<="].includes(i().value);){const l=s("OP").value,y=p();switch(l){case">":a=a>y;break;case"<":a=a<y;break;case">=":a=a>=y;break;case"<=":a=a<=y;break}}return a}function p(){let a=f();for(;i()&&(i().value==="+"||i().value==="-");){const l=s("OP").value,y=f();a=l==="+"?a+y:a-y}return a}function f(){let a=h();for(;i()&&(i().value==="*"||i().value==="/"||i().value==="%");){const l=s("OP").value,y=h();switch(l){case"*":a=a*y;break;case"/":a=a/y;break;case"%":a=a%y;break}}return a}function h(){return i()&&i().value==="!"?(s("OP"),!h()):i()&&i().value==="-"?(s("OP"),-h()):v()}function v(){const a=i();if(a){if(a.type==="NUMBER")return s("NUMBER"),Number(a.value);if(a.type==="STRING")return s("STRING"),a.value.slice(1,-1);if(a.type==="IDENT")return s("IDENT"),a.value==="true"?!0:a.value==="false"?!1:a.value==="null"?null:void 0;if(a.value==="["){s("PUNC");const l=[];for(;i()&&i().value!=="]";)l.push(o()),i()&&i().value===","&&s("PUNC");return s("PUNC"),l}if(a.value==="("){s("PUNC");const l=o();return s("PUNC"),l}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 se{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(u=>u.event===r&&u.handler===n&&JSON.stringify(u.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 ce(e,t){if(t&&e instanceof HTMLElement){se.cleanup(e);for(const r in t)t[r]===e&&delete t[r];for(const r of Array.from(e.childNodes))ce(r,t)}}function me(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 Ot(e,t,r,n,i,s,o,c){if(!s)return;const u=t.includes("lazy"),m=t.includes("trim"),g=t.includes("number"),b=e&&typeof e=="object"&&"value"in e&&typeof e.value<"u",p=()=>{if(b){const x=e.value;return c&&typeof x=="object"&&x!==null?x[c]:x}return B(s._state||s,e)},f=p();let h="text";o instanceof HTMLInputElement?h=n?.type||o.type||"text":o instanceof HTMLSelectElement?h="select":o instanceof HTMLTextAreaElement&&(h="textarea");const v=o instanceof HTMLInputElement||o instanceof HTMLTextAreaElement||o instanceof HTMLSelectElement,a=v?h==="checkbox"||h==="radio"?"checked":"value":c??"modelValue";if(h==="checkbox")if(Array.isArray(f))r[a]=f.includes(String(o?.getAttribute("value")??n?.value??""));else{const x=o?.getAttribute("true-value")??!0;r[a]=f===x}else if(h==="radio")r[a]=f===(n?.value??"");else if(h==="select")if(o&&o.hasAttribute("multiple")&&o instanceof HTMLSelectElement){const x=Array.isArray(f)?f.map(String):[];setTimeout(()=>{Array.from(o.options).forEach(k=>{k.selected=x.includes(k.value)})},0),r[a]=Array.isArray(f)?f:[]}else r[a]=f;else{r[a]=f;try{const x=ne(a);n&&(n[x]=f)}catch{}}const l=u||h==="checkbox"||h==="radio"||h==="select"?"change":"input",y=x=>{if(x.isComposing||i._isComposing)return;const k=typeof globalThis.process<"u"&&globalThis.process.env?.NODE_ENV==="test"||typeof window<"u"&&window.__vitest__;if(x.isTrusted===!1&&!k)return;const d=x.target;if(!d||d._modelUpdating)return;let $=d.value;if(h==="checkbox"){const R=p();if(Array.isArray(R)){const O=d.getAttribute("value")??"",A=Array.from(R);if(d.checked)A.includes(O)||A.push(O);else{const L=A.indexOf(O);L>-1&&A.splice(L,1)}$=A}else{const O=d.getAttribute("true-value")??!0,A=d.getAttribute("false-value")??!1;$=d.checked?O:A}}else if(h==="radio")$=d.getAttribute("value")??d.value;else if(h==="select"&&d.multiple)$=Array.from(d.selectedOptions).map(R=>R.value);else if(m&&typeof $=="string"&&($=$.trim()),g){const R=Number($);isNaN(R)||($=R)}const T=s._state||s,C=p();if(Array.isArray($)&&Array.isArray(C)?JSON.stringify([...$].sort())!==JSON.stringify([...C].sort()):$!==C){d._modelUpdating=!0;try{if(b)if(c&&typeof e.value=="object"&&e.value!==null){const R={...e.value};R[c]=$,e.value=R}else e.value=$;else _e(T,e,$);if(s._requestRender&&s._requestRender(),s._triggerWatchers){const R=b?"reactiveState":e;s._triggerWatchers(R,$)}if(d){const R=`update:${ne(a)}`,O=new CustomEvent(R,{detail:$,bubbles:!0,composed:!0});d.dispatchEvent(O)}}finally{setTimeout(()=>d._modelUpdating=!1,0)}}};if(v){if(i[l]){const x=i[l];o&&se.removeListener(o,l,x)}i[l]=y}else{const x=`update:${ne(a)}`;if(i[x]){const k=i[x];o&&se.removeListener(o,x,k)}i[x]=k=>{const d=s._state||s,$=k.detail!==void 0?k.detail:k.target?.value,T=B(d,e);if(Array.isArray($)&&Array.isArray(T)?JSON.stringify([...$].sort())!==JSON.stringify([...T].sort()):$!==T){_e(d,e,$),s._requestRender&&s._requestRender(),s._triggerWatchers&&s._triggerWatchers(e,$);const E=k.target;if(E){E[a]=$;try{const R=ne(a);typeof $=="boolean"?$?E.setAttribute(R,"true"):E.setAttribute(R,"false"):E.setAttribute(R,String($))}catch{}queueMicrotask(()=>{typeof E._applyProps=="function"&&E._applyProps(E._cfg),typeof E._requestRender=="function"&&E._requestRender()})}}}}(h==="text"||h==="textarea")&&(i.compositionstart=(()=>i._isComposing=!0),i.compositionend=x=>{i._isComposing=!1;const k=x.target;k&&setTimeout(()=>{const d=k.value,$=s._state||s,T=B($,e);let C=d;if(m&&(C=C.trim()),g){const R=Number(C);isNaN(R)||(C=R)}if(Array.isArray(C)&&Array.isArray(T)?JSON.stringify([...C].sort())!==JSON.stringify([...T].sort()):C!==T){k._modelUpdating=!0;try{_e($,e,C),s._requestRender&&s._requestRender(),s._triggerWatchers&&s._triggerWatchers(e,C)}finally{setTimeout(()=>k._modelUpdating=!1,0)}}},0)})}function tt(e){const t=e.slice(2);return t?t.charAt(0).toLowerCase()+t.slice(1):""}function Pt(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=ye(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 Lt(e,t,r){let n;if(typeof e=="string"){if(!r)return;n=ye(e,r)}else n=e;const i=t.style||"";let s=i;if(n){if(i){const o=i.split(";").map(u=>u.trim()).filter(Boolean),c=o.findIndex(u=>u.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(u=>u.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 ye(e,t){return Rt.evaluate(e,t)}function Mt(e,t,r){let n;if(typeof e=="string"){if(!r)return;n=ye(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 jt(e,t,r){let n;if(typeof e=="string"){if(!r)return;n=ye(e,r)}else n=e;let i="";if(typeof n=="string")i=n;else if(n&&typeof n=="object"){const o=[];for(const[c,u]of Object.entries(n))if(u!=null&&u!==""){const m=c.replace(/[A-Z]/g,p=>`-${p.toLowerCase()}`),g=["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 b=String(u);typeof u=="number"&&g.includes(m)&&(b=`${u}px`),o.push(`${m}: ${b}`)}i=o.join("; ")+(o.length>0?";":"")}const s=t.style||"";t.style=s+(s&&!s.endsWith(";")?"; ":"")+i}function Wt(e,t,r){let n=e;typeof e=="string"&&r&&(n=ye(e,r)),ee(n)?t.reactiveRef=n:t.ref=n}function rt(e,t,r,n){const i={},s={...n||{}},o={};for(const[c,u]of Object.entries(e)){const{value:m,modifiers:g,arg:b}=u;if(c==="model"||c.startsWith("model:")){const p=c.split(":"),f=p.length>1?p[1]:b;Ot(m,g,i,s,o,t,r,f);continue}switch(c){case"bind":Pt(m,i,s,t);break;case"show":Lt(m,s,t);break;case"class":Mt(m,s,t);break;case"style":jt(m,s,t);break;case"ref":Wt(m,i,t);break}}return{props:i,attrs:s,listeners:o}}function Ne(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 b=o.tag||"node",f=[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(h=>h!=null)??"";c=f?`${t}:${b}:${f}`:`${t}:${b}`}let u=c,m=1;for(;s.has(u);)u=`${c}#${m++}`;s.add(u);let g=o.children;return Array.isArray(g)&&(g=Ne(g,u)),{...o,key:u,children:g}})}const r=e;let n=r.props?.key??r.key??t,i=r.children;return Array.isArray(i)&&(i=Ne(i,n)),{...r,key:n,children:i}}function nt(e,t,r,n){const i=r.directives??{},s=rt(i,n,e,r.attrs),o={...t.props,...r.props,...s.props},c={...t.attrs,...r.attrs,...s.attrs},u=t.props??{},m=o,g=r?.isCustomElement??t?.isCustomElement??!1;let b=!1;for(const h in{...u,...m}){const v=u[h],w=m[h];if(v!==w)if(b=!0,h==="value"&&(e instanceof HTMLInputElement||e instanceof HTMLTextAreaElement||e instanceof HTMLSelectElement))e.value!==w&&(e.value=w??"");else if(h==="checked"&&e instanceof HTMLInputElement)e.checked=!!w;else if(h.startsWith("on")&&typeof w=="function"){const a=tt(h);typeof v=="function"&&se.removeListener(e,a,v),se.addListener(e,a,w)}else if(w==null)e.removeAttribute(h);else if((r?.isCustomElement??t?.isCustomElement??!1)||h in e)try{e[h]=w}catch{}else w===!1&&e.removeAttribute(h)}for(const[h,v]of Object.entries(s.listeners||{}))se.addListener(e,h,v);const p=t.attrs??{},f=c;for(const h in{...p,...f}){const v=p[h],w=f[h];let a=v,l=w;if(ee(v)&&(a=v.value),ee(w)&&(l=w.value),a!==l)if(b=!0,l==null||l===!1){if(e.removeAttribute(h),h==="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(h==="checked"&&e instanceof HTMLInputElement)try{e.checked=!1}catch{}if(h==="disabled")try{e.disabled=!1}catch{}}else{if(h==="value"){if(e instanceof HTMLInputElement||e instanceof HTMLTextAreaElement){try{e.value=l??""}catch{e.setAttribute(h,String(l))}continue}else if(e instanceof HTMLSelectElement){try{e.value=l??""}catch{}continue}else if(e instanceof HTMLProgressElement){try{e.value=Number(l)}catch{}continue}}if(h==="checked"&&e instanceof HTMLInputElement){try{e.checked=!!l}catch{}continue}if(h==="style"){e.setAttribute(h,String(l));continue}const y=e.namespaceURI==="http://www.w3.org/2000/svg";if(g&&!y&&h.includes("-")){const x=Xe(h);try{e[x]=l}catch{e.setAttribute(h,String(l))}}else if(!y&&h in e)try{e[h]=l}catch{e.setAttribute(h,String(l))}else e.setAttribute(h,String(l))}}if(g&&b)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 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,f=Array.isArray(p.children)?p.children:[],h=document.createTextNode(""),v=document.createTextNode("");p.key!=null&&(h.key=`${p.key}:start`,v.key=`${p.key}:end`),p._startNode=h,p._endNode=v;const w=document.createDocumentFragment();w.appendChild(h);for(const a of f){const l=J(a,t);w.appendChild(l)}return w.appendChild(v),w}const n=document.createElement(e.tag);e.key!=null&&(n.key=e.key);const{props:i={},attrs:s={},directives:o={}}=e.props??{},c=rt(o,t,n,s),u={...i,...c.props},m={...s,...c.attrs},g=n.namespaceURI==="http://www.w3.org/2000/svg";for(const p in m){const f=m[p];if(!(typeof p!="string"||/\[object Object\]/.test(p))){if(typeof f=="boolean")f&&n.setAttribute(p,"");else if(f!=null)if(!g&&p==="value"&&(n instanceof HTMLInputElement||n instanceof HTMLTextAreaElement||n instanceof HTMLSelectElement||n instanceof HTMLProgressElement))try{n instanceof HTMLProgressElement?n.value=Number(f):n.value=f??""}catch{n.setAttribute(p,String(f))}else if(!g&&p==="checked"&&n instanceof HTMLInputElement)try{n.checked=!!f}catch{n.setAttribute(p,String(f))}else if(!g&&p in n)try{n[p]=f}catch{n.setAttribute(p,String(f))}else if((e.props?.isCustomElement??!1)&&!g&&p.includes("-")){const v=Xe(p);try{n[v]=f}catch{n.setAttribute(p,String(f))}}else n.setAttribute(p,String(f))}}for(const p in u){const f=u[p];if(!(typeof p!="string"||/\[object Object\]/.test(p)))if(p==="value"&&(n instanceof HTMLInputElement||n instanceof HTMLTextAreaElement||n instanceof HTMLSelectElement)){const h=typeof f=="object"&&f!==null&&typeof f.value<"u"?f.value:f;n.value=h??""}else if(p==="checked"&&n instanceof HTMLInputElement){const h=typeof f=="object"&&f!==null&&typeof f.value<"u"?f.value:f;n.checked=!!h}else if(p.startsWith("on")&&typeof f=="function")se.addListener(n,tt(p),f);else{if(p.startsWith("on")&&f===void 0)continue;if(f==null||f===!1)n.removeAttribute(p);else if((e.props?.isCustomElement??!1)||p in n)try{const v=typeof f=="object"&&f!==null&&typeof f.value<"u"?f.value:f;n[p]=v}catch{}}}for(const[p,f]of Object.entries(c.listeners||{}))se.addListener(n,p,f);const b={...e,props:{...e.props,...c.props}};me(b,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(J(p,t,r));else typeof e.children=="string"&&(n.textContent=e.children);try{if(n instanceof HTMLSelectElement&&m&&m.hasOwnProperty("value"))try{n.value=m.value??""}catch{}}catch{}return n}function Nt(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 f of o)f&&f.key!=null&&c.set(f.key,f);const u=new Map;for(const f of s){const h=f.key;h!=null&&u.set(h,f)}const m=new Set;let g=e.firstChild;function b(f,h){let v=f;for(;v&&(m.add(v),v!==h);)v=v.nextSibling}function p(f,h,v,w){const a=[];let l=f.nextSibling;for(;l&&l!==h;)a.push(l),l=l.nextSibling;const y=Array.isArray(v)?v:[];if(w.some(k=>k&&k.key!=null)||y.some(k=>k&&k.key!=null)){const k=new Map,d=new Map;for(const C of y)C&&C.key!=null&&k.set(C.key,C);for(const C of a){const E=C.key;E!=null&&d.set(E,C)}const $=new Set;let T=f.nextSibling;for(const C of w){let E;if(C.key!=null&&d.has(C.key)){const R=k.get(C.key);E=Ee(d.get(C.key),R,C,n),$.add(E),E!==T&&e.contains(E)&&e.insertBefore(E,T)}else E=J(C,n),e.insertBefore(E,T),$.add(E);T=E.nextSibling}for(const C of a)!$.has(C)&&e.contains(C)&&e.removeChild(C)}else{const k=Math.min(y.length,w.length);for(let d=0;d<k;d++){const $=y[d],T=w[d],C=Ee(a[d],$,T,n);C!==a[d]&&(e.insertBefore(C,a[d]),e.removeChild(a[d]))}for(let d=k;d<w.length;d++)e.insertBefore(J(w[d],n),h);for(let d=k;d<a.length;d++)e.removeChild(a[d])}}for(const f of r){let h;if(f.tag==="#anchor"){const v=f.key,w=`${v}:start`,a=`${v}:end`;let l=u.get(w),y=u.get(a);const x=Array.isArray(f.children)?f.children:[];if(l||(l=document.createTextNode(""),l.key=w),y||(y=document.createTextNode(""),y.key=a),f._startNode=l,f._endNode=y,!e.contains(l)||!e.contains(y)){e.insertBefore(l,g);for(const k of x)e.insertBefore(J(k,n),g);e.insertBefore(y,g)}else p(l,y,c.get(v)?.children,x);b(l,y),g=y.nextSibling;continue}if(f.key!=null&&u.has(f.key)){const v=c.get(f.key);h=Ee(u.get(f.key),v,f,n,i),m.add(h),h!==g&&e.contains(h)&&(g&&!e.contains(g)&&(g=null),e.insertBefore(h,g))}else h=J(f,n,i),g&&!e.contains(g)&&(g=null),e.insertBefore(h,g),m.add(h);g=h.nextSibling}for(const f of s)!m.has(f)&&e.contains(f)&&(ce(f,i),e.removeChild(f))}function Ee(e,t,r,n,i){if(t&&typeof t!="string"&&t.props?.ref&&i&&ce(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:[],u=o._startNode??document.createTextNode(""),m=o._endNode??document.createTextNode("");o.key!=null&&(u.key=`${o.key}:start`,m.key=`${o.key}:end`),o._startNode=u,o._endNode=m;const g=document.createDocumentFragment();g.appendChild(u);for(const b of c){const p=J(b,n);g.appendChild(p)}return g.appendChild(m),e.parentNode?.replaceChild(g,e),u}if(!r){ce(e,i);const o=document.createComment("removed");return e.parentNode?.replaceChild(o,e),o}if(!t||typeof t=="string"){ce(e,i);const o=J(r,n,i);return me(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(""),u=r._endNode??document.createTextNode("");r.key!=null&&(c.key=`${r.key}:start`,u.key=`${r.key}:end`),r._startNode=c,r._endNode=u;const m=document.createDocumentFragment();m.appendChild(c);for(const g of o)m.appendChild(J(g,n));return m.appendChild(u),e.parentNode?.replaceChild(m,e),c}if(typeof t!="string"&&typeof r!="string"&&t.tag===r.tag&&t.key===r.key){const o=e;return nt(o,t.props||{},r.props||{},n),Nt(o,t.children,r.children,n,i),me(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 nt(c,t.props||{},r.props||{},n),me(r,c,i),c}catch{}ce(e,i);const s=J(r,n,i);return me(r,s,i),e.parentNode?.replaceChild(s,e),s}function zt(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=Ne(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=Ee(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 u=[];for(let m=0;m<e.childNodes.length;m++){const g=e.childNodes[m];g!==c&&g.nodeName!=="STYLE"&&(ce(g,n),u.push(g))}u.forEach(m=>e.removeChild(m)),e._prevVNode=i,e._prevDom=c}function Se(e){if(typeof e=="string")return ge(e);if(e.tag==="#text")return typeof e.children=="string"?ge(e.children):"";if(e.tag==="#anchor")return(Array.isArray(e.children)?e.children.filter(Boolean):[]).map(Se).join("");let t="";e.props&&e.props.attrs&&(t=Object.entries(e.props.attrs).map(([i,s])=>` ${i}="${ge(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}="${ge(String(s))}"`).join(""));const n=Array.isArray(e.children)?e.children.filter(Boolean).map(Se).join(""):typeof e.children=="string"?ge(e.children):e.children?Se(e.children):"";return`<${e.tag}${t}${r}>${n}</${e.tag}>`}function it(e,...t){let r="";for(let n=0;n<e.length;n++)r+=e[n],n<t.length&&(r+=t[n]);return r}function st(e){return e.replace(/\/\*[\s\S]*?\*\//g,"").replace(/\s+/g," ").replace(/\s*([{}:;,>+~])\s*/g,"$1").replace(/;}/g,"}").trim()}let Ae=null;function ot(){return Ae||(Ae=new CSSStyleSheet,Ae.replaceSync(st(It))),Ae}function Dt(e){return e.replace(/url\s*\(\s*['"]?javascript:[^)]*\)/gi,"").replace(/<script[\s\S]*?>[\s\S]*?<\/script>/gi,"").replace(/expression\s*\([^)]*\)/gi,"")}const It=it`
|
|
5
|
-
:host,
|
|
4
|
+
• Ensure computed properties don't modify state`),this._value=this.makeReactive(t),F.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:Ye.createReactiveProxy(t,()=>F.triggerUpdate(this),r=>this.makeReactive(r))}}function Ct(e){return F.getOrCreateState(e===void 0?null:e)}function X(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 _t(e){const t=new We(e());return{get value(){return F.trackDependency(t),e()}}}function Et(e,t,r={}){let n=e();r.immediate&&t(n,n);const i=`watch-${Math.random().toString(36).substr(2,9)}`,s=()=>{F.setCurrentComponent(i,s);const o=e();F.clearCurrentComponent(),o!==n&&(t(o,n),n=o)};return F.setCurrentComponent(i,s),e(),F.clearCurrentComponent(),()=>{F.cleanup(i)}}const _e=new Map,Ee=new Map,Se=new Map,De=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<De&&_e.set(e,t),t}function et(e){if(Ee.has(e))return Ee.get(e);const t=e.replace(/-([a-z])/g,(r,n)=>n.toUpperCase());return Ee.size<De&&Ee.set(e,t),t}function me(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<De&&Se.set(e,t),t}return e}function U(e,t){if(typeof t=="string"){const r=t.split(".").reduce((n,i)=>n?.[i],e);return X(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);X(s[i])?s[i].value=r:s[i]=r}const tt=typeof process<"u"&&process.env?.NODE_ENV!=="production";function ie(e,...t){tt&&console.error(e,...t)}function Ie(e,...t){tt&&console.warn(e,...t)}function St(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:U(e,n)}),o.immediate)try{const c=U(e,n);s(c,void 0,e)}catch(c){ie(`Error in immediate watcher for "${n}":`,c)}}}function At(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,b)=>i(h,c[b]));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){ie(`Error in watcher for "${r}":`,o)}for(const[o,c]of t.entries())if(c.options.deep&&r.startsWith(o+"."))try{const a=U(e,o);i(a,c.oldValue)||(c.callback(a,c.oldValue,e),c.oldValue=a)}catch(a){ie(`Error in deep watcher for "${o}":`,a)}}function rt(e,t){return t===Boolean?e==="true":t===Number?Number(e):e}function Ot(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]=rt(String(c),i.type)}catch{r[n]=e[n]}else o!==null?r[n]=rt(o,i.type):"default"in i&&i.default!==void 0&&(r[n]=i.default)})}function jt(e,t,r){t.props&&Ot(e,t.props,r)}function Tt(e,t,r,n){e.onConnected&&!r&&(e.onConnected(t),n(!0))}function Rt(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 Pt(e,t,r,n,i){e.onAttributeChanged&&e.onAttributeChanged(t,r,n,i)}class Lt{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){Ie("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){Ie("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 Ie("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=>U(n,r)}return t.includes("ctx")||/[+\-*/%<>=&|?:\[\]]/.test(t)?this.createSimpleEvaluator(t):r=>U(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]=U(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,b=>`<<#${i.push(b)-1}#>>`);const s=n.match(/ctx\.[\w.]+/g)||[];for(const b of s){const g=b.slice(4),u=U(r,g);if(u===void 0)return;const f=i.push(JSON.stringify(u))-1;n=n.replace(new RegExp(b.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),"g"),`<<#${f}#>>`)}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 b of c){if(b.startsWith("ctx."))continue;const g=U(r,b);if(g===void 0)return;const u=i.push(JSON.stringify(g))-1;n=n.replace(new RegExp(b.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),"g"),`<<#${u}#>>`)}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 b=p[1];if(["true","false","null","undefined"].includes(b)||/^[0-9]+$/.test(b)||b==="ctx"||h.has(b))continue;h.add(b);const g=U(r,b);if(g===void 0)return;const u=JSON.stringify(g),f=i.push(u)-1;b.includes(".")?n=n.replace(new RegExp(b.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),"g"),`<<#${f}#>>`):n=n.replace(new RegExp("\\b"+b.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")+"\\b","g"),`<<#${f}#>>`)}n=n.replace(/<<#(\d+)#>>/g,(b,g)=>i[Number(g)]);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 d=r[n++];if(l&&!d)throw new Error(`Unexpected token EOF, expected ${l}`);if(l&&d&&d.type!==l&&d.value!==l)throw new Error(`Unexpected token ${d.type}/${d.value}, expected ${l}`);return d}function o(){return c()}function c(){let l=a();if(i()&&i().value==="?"){s("?");const d=o();s(":");const w=o();return l?d:w}return l}function a(){let l=p();for(;i()&&i().value==="||";){s("OP");const d=p();l=l||d}return l}function p(){let l=h();for(;i()&&i().value==="&&";){s("OP");const d=h();l=l&&d}return l}function h(){let l=b();for(;i()&&["==","!=","===","!=="].includes(i().value);){const d=s("OP").value,w=b();switch(d){case"==":l=l==w;break;case"!=":l=l!=w;break;case"===":l=l===w;break;case"!==":l=l!==w;break}}return l}function b(){let l=g();for(;i()&&[">","<",">=","<="].includes(i().value);){const d=s("OP").value,w=g();switch(d){case">":l=l>w;break;case"<":l=l<w;break;case">=":l=l>=w;break;case"<=":l=l<=w;break}}return l}function g(){let l=u();for(;i()&&(i().value==="+"||i().value==="-");){const d=s("OP").value,w=u();l=d==="+"?l+w:l-w}return l}function u(){let l=f();for(;i()&&(i().value==="*"||i().value==="/"||i().value==="%");){const d=s("OP").value,w=f();switch(d){case"*":l=l*w;break;case"/":l=l/w;break;case"%":l=l%w;break}}return l}function f(){return i()&&i().value==="!"?(s("OP"),!f()):i()&&i().value==="-"?(s("OP"),-f()):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 d=[];for(;i()&&i().value!=="]";)d.push(o()),i()&&i().value===","&&s("PUNC");return s("PUNC"),d}if(l.value==="("){s("PUNC");const d=o();return s("PUNC"),d}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 U(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 se{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 le(e,t){if(t&&e instanceof HTMLElement){se.cleanup(e);for(const r in t)t[r]===e&&delete t[r];for(const r of Array.from(e.childNodes))le(r,t)}}function ye(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 Mt(e,t,r,n,i,s,o,c){if(!s)return;const a=t.includes("lazy"),p=t.includes("trim"),h=t.includes("number"),b=e&&typeof e=="object"&&"value"in e&&typeof e.value<"u",g=()=>{if(b){const k=e.value;return c&&typeof k=="object"&&k!==null?k[c]:k}return U(s._state||s,e)},u=g();let f="text";o instanceof HTMLInputElement?f=n?.type||o.type||"text":o instanceof HTMLSelectElement?f="select":o instanceof HTMLTextAreaElement&&(f="textarea");const y=o instanceof HTMLInputElement||o instanceof HTMLTextAreaElement||o instanceof HTMLSelectElement,l=y?f==="checkbox"||f==="radio"?"checked":"value":c??"modelValue";if(f==="checkbox")if(Array.isArray(u))r[l]=u.includes(String(o?.getAttribute("value")??n?.value??""));else{const k=o?.getAttribute("true-value")??!0;r[l]=u===k}else if(f==="radio")r[l]=u===(n?.value??"");else if(f==="select")if(o&&o.hasAttribute("multiple")&&o instanceof HTMLSelectElement){const k=Array.isArray(u)?u.map(String):[];setTimeout(()=>{Array.from(o.options).forEach(C=>{C.selected=k.includes(C.value)})},0),r[l]=Array.isArray(u)?u:[]}else r[l]=u;else{r[l]=u;try{const k=ne(l);n&&(n[k]=u)}catch{}}const d=a||f==="checkbox"||f==="radio"||f==="select"?"change":"input",w=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 m=k.target;if(!m||m._modelUpdating)return;let $=m.value;if(f==="checkbox"){const j=g();if(Array.isArray(j)){const H=m.getAttribute("value")??"",E=Array.from(j);if(m.checked)E.includes(H)||E.push(H);else{const T=E.indexOf(H);T>-1&&E.splice(T,1)}$=E}else{const H=m.getAttribute("true-value")??!0,E=m.getAttribute("false-value")??!1;$=m.checked?H:E}}else if(f==="radio")$=m.getAttribute("value")??m.value;else if(f==="select"&&m.multiple)$=Array.from(m.selectedOptions).map(j=>j.value);else if(p&&typeof $=="string"&&($=$.trim()),h){const j=Number($);isNaN(j)||($=j)}const A=s._state||s,x=g();if(Array.isArray($)&&Array.isArray(x)?JSON.stringify([...$].sort())!==JSON.stringify([...x].sort()):$!==x){m._modelUpdating=!0;try{if(b)if(c&&typeof e.value=="object"&&e.value!==null){const j={...e.value};j[c]=$,e.value=j}else e.value=$;else Ae(A,e,$);if(s._requestRender&&s._requestRender(),s._triggerWatchers){const j=b?"reactiveState":e;s._triggerWatchers(j,$)}if(m){const j=`update:${ne(l)}`,H=new CustomEvent(j,{detail:$,bubbles:!0,composed:!0});m.dispatchEvent(H)}}finally{setTimeout(()=>m._modelUpdating=!1,0)}}};if(y){if(i[d]){const k=i[d];o&&se.removeListener(o,d,k)}i[d]=w}else{const k=`update:${ne(l)}`;if(i[k]){const C=i[k];o&&se.removeListener(o,k,C)}i[k]=C=>{const m=s._state||s,$=C.detail!==void 0?C.detail:C.target?.value,A=U(m,e);if(Array.isArray($)&&Array.isArray(A)?JSON.stringify([...$].sort())!==JSON.stringify([...A].sort()):$!==A){Ae(m,e,$),s._requestRender&&s._requestRender(),s._triggerWatchers&&s._triggerWatchers(e,$);const O=C.target;if(O){O[l]=$;try{const j=ne(l);typeof $=="boolean"?$?O.setAttribute(j,"true"):O.setAttribute(j,"false"):O.setAttribute(j,String($))}catch{}queueMicrotask(()=>{typeof O._applyProps=="function"&&O._applyProps(O._cfg),typeof O._requestRender=="function"&&O._requestRender()})}}}}(f==="text"||f==="textarea")&&(i.compositionstart=(()=>i._isComposing=!0),i.compositionend=k=>{i._isComposing=!1;const C=k.target;C&&setTimeout(()=>{const m=C.value,$=s._state||s,A=U($,e);let x=m;if(p&&(x=x.trim()),h){const j=Number(x);isNaN(j)||(x=j)}if(Array.isArray(x)&&Array.isArray(A)?JSON.stringify([...x].sort())!==JSON.stringify([...A].sort()):x!==A){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 nt(e){const t=e.slice(2);return t?t.charAt(0).toLowerCase()+t.slice(1):""}function Wt(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=be(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=U(n,e);r[e]=i}}}function Dt(e,t,r){let n;if(typeof e=="string"){if(!r)return;n=be(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 be(e,t){return Lt.evaluate(e,t)}function It(e,t,r){let n;if(typeof e=="string"){if(!r)return;n=be(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 Nt(e,t,r){let n;if(typeof e=="string"){if(!r)return;n=be(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,g=>`-${g.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 b=String(a);typeof a=="number"&&h.includes(p)&&(b=`${a}px`),o.push(`${p}: ${b}`)}i=o.join("; ")+(o.length>0?";":"")}const s=t.style||"";t.style=s+(s&&!s.endsWith(";")?"; ":"")+i}function Ht(e,t,r){let n=e;typeof e=="string"&&r&&(n=be(e,r)),X(n)?t.reactiveRef=n:t.ref=n}function it(e,t,r,n){const i={},s={...n||{}},o={};for(const[c,a]of Object.entries(e)){const{value:p,modifiers:h,arg:b}=a;if(c==="model"||c.startsWith("model:")){const g=c.split(":"),u=g.length>1?g[1]:b;Mt(p,h,i,s,o,t,r,u);continue}switch(c){case"bind":Wt(p,i,s,t);break;case"show":Dt(p,s,t);break;case"class":It(p,s,t);break;case"style":Nt(p,s,t);break;case"ref":Ht(p,i,t);break}}return{props:i,attrs:s,listeners:o}}function Ne(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 b=o.tag||"node",u=[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(f=>f!=null)??"";c=u?`${t}:${b}:${u}`:`${t}:${b}`}let a=c,p=1;for(;s.has(a);)a=`${c}#${p++}`;s.add(a);let h=o.children;return Array.isArray(h)&&(h=Ne(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=Ne(i,n)),{...r,key:n,children:i}}function st(e,t,r,n){const i=r.directives??{},s=it(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 b=!1;for(const f in{...a,...p}){const y=a[f],v=p[f];if(y!==v)if(b=!0,f==="value"&&(e instanceof HTMLInputElement||e instanceof HTMLTextAreaElement||e instanceof HTMLSelectElement))e.value!==v&&(e.value=v??"");else if(f==="checked"&&e instanceof HTMLInputElement)e.checked=!!v;else if(f.startsWith("on")&&typeof v=="function"){const l=nt(f);typeof y=="function"&&se.removeListener(e,l,y),se.addListener(e,l,v)}else if(v==null)e.removeAttribute(f);else if((r?.isCustomElement??t?.isCustomElement??!1)||f in e)try{e[f]=v}catch{}else v===!1&&e.removeAttribute(f)}for(const[f,y]of Object.entries(s.listeners||{}))se.addListener(e,f,y);const g=t.attrs??{},u=c;for(const f in{...g,...u}){const y=g[f],v=u[f];let l=y,d=v;if(X(y)&&(l=y.value),X(v)&&(d=v.value),l!==d)if(b=!0,d==null||d===!1){if(e.removeAttribute(f),f==="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(f==="checked"&&e instanceof HTMLInputElement)try{e.checked=!1}catch{}if(f==="disabled")try{e.disabled=!1}catch{}}else{if(f==="value"){if(e instanceof HTMLInputElement||e instanceof HTMLTextAreaElement){try{e.value=d??""}catch{e.setAttribute(f,String(d))}continue}else if(e instanceof HTMLSelectElement){try{e.value=d??""}catch{}continue}else if(e instanceof HTMLProgressElement){try{e.value=Number(d)}catch{}continue}}if(f==="checked"&&e instanceof HTMLInputElement){try{e.checked=!!d}catch{}continue}if(f==="style"){e.setAttribute(f,String(d));continue}const w=e.namespaceURI==="http://www.w3.org/2000/svg";if(h&&!w&&f.includes("-")){const k=et(f);try{e[k]=d}catch{e.setAttribute(f,String(d))}}else if(!w&&f in e)try{e[f]=d}catch{e.setAttribute(f,String(d))}else e.setAttribute(f,String(d))}}if(h&&b)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 Z(e,t,r){if(typeof e=="string")return document.createTextNode(e);if(e.tag==="#text"){const g=document.createTextNode(typeof e.children=="string"?e.children:"");return e.key!=null&&(g.key=e.key),g}if(e.tag==="#anchor"){const g=e,u=Array.isArray(g.children)?g.children:[],f=document.createTextNode(""),y=document.createTextNode("");g.key!=null&&(f.key=`${g.key}:start`,y.key=`${g.key}:end`),g._startNode=f,g._endNode=y;const v=document.createDocumentFragment();v.appendChild(f);for(const l of u){const d=Z(l,t);v.appendChild(d)}return v.appendChild(y),v}const n=document.createElement(e.tag);e.key!=null&&(n.key=e.key);const{props:i={},attrs:s={},directives:o={}}=e.props??{},c=it(o,t,n,s),a={...i,...c.props},p={...s,...c.attrs},h=n.namespaceURI==="http://www.w3.org/2000/svg";for(const g in p){const u=p[g];if(!(typeof g!="string"||/\[object Object\]/.test(g))){if(typeof u=="boolean")u&&n.setAttribute(g,"");else if(u!=null)if(!h&&g==="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(g,String(u))}else if(!h&&g==="checked"&&n instanceof HTMLInputElement)try{n.checked=!!u}catch{n.setAttribute(g,String(u))}else if(!h&&g in n)try{n[g]=u}catch{n.setAttribute(g,String(u))}else if((e.props?.isCustomElement??!1)&&!h&&g.includes("-")){const y=et(g);try{n[y]=u}catch{n.setAttribute(g,String(u))}}else n.setAttribute(g,String(u))}}for(const g in a){const u=a[g];if(!(typeof g!="string"||/\[object Object\]/.test(g)))if(g==="value"&&(n instanceof HTMLInputElement||n instanceof HTMLTextAreaElement||n instanceof HTMLSelectElement)){const f=typeof u=="object"&&u!==null&&typeof u.value<"u"?u.value:u;n.value=f??""}else if(g==="checked"&&n instanceof HTMLInputElement){const f=typeof u=="object"&&u!==null&&typeof u.value<"u"?u.value:u;n.checked=!!f}else if(g.startsWith("on")&&typeof u=="function")se.addListener(n,nt(g),u);else{if(g.startsWith("on")&&u===void 0)continue;if(u==null||u===!1)n.removeAttribute(g);else if((e.props?.isCustomElement??!1)||g in n)try{const y=typeof u=="object"&&u!==null&&typeof u.value<"u"?u.value:u;n[g]=y}catch{}}}for(const[g,u]of Object.entries(c.listeners||{}))se.addListener(n,g,u);const b={...e,props:{...e.props,...c.props}};ye(b,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 g of e.children)n.appendChild(Z(g,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 Bt(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 u of o)u&&u.key!=null&&c.set(u.key,u);const a=new Map;for(const u of s){const f=u.key;f!=null&&a.set(f,u)}const p=new Set;let h=e.firstChild;function b(u,f){let y=u;for(;y&&(p.add(y),y!==f);)y=y.nextSibling}function g(u,f,y,v){const l=[];let d=u.nextSibling;for(;d&&d!==f;)l.push(d),d=d.nextSibling;const w=Array.isArray(y)?y:[];if(v.some(C=>C&&C.key!=null)||w.some(C=>C&&C.key!=null)){const C=new Map,m=new Map;for(const x of w)x&&x.key!=null&&C.set(x.key,x);for(const x of l){const O=x.key;O!=null&&m.set(O,x)}const $=new Set;let A=u.nextSibling;for(const x of v){let O;if(x.key!=null&&m.has(x.key)){const j=C.get(x.key);O=Oe(m.get(x.key),j,x,n),$.add(O),O!==A&&e.contains(O)&&e.insertBefore(O,A)}else O=Z(x,n),e.insertBefore(O,A),$.add(O);A=O.nextSibling}for(const x of l)!$.has(x)&&e.contains(x)&&e.removeChild(x)}else{const C=Math.min(w.length,v.length);for(let m=0;m<C;m++){const $=w[m],A=v[m],x=Oe(l[m],$,A,n);x!==l[m]&&(e.insertBefore(x,l[m]),e.removeChild(l[m]))}for(let m=C;m<v.length;m++)e.insertBefore(Z(v[m],n),f);for(let m=C;m<l.length;m++)e.removeChild(l[m])}}for(const u of r){let f;if(u.tag==="#anchor"){const y=u.key,v=`${y}:start`,l=`${y}:end`;let d=a.get(v),w=a.get(l);const k=Array.isArray(u.children)?u.children:[];if(d||(d=document.createTextNode(""),d.key=v),w||(w=document.createTextNode(""),w.key=l),u._startNode=d,u._endNode=w,!e.contains(d)||!e.contains(w)){e.insertBefore(d,h);for(const C of k)e.insertBefore(Z(C,n),h);e.insertBefore(w,h)}else g(d,w,c.get(y)?.children,k);b(d,w),h=w.nextSibling;continue}if(u.key!=null&&a.has(u.key)){const y=c.get(u.key);f=Oe(a.get(u.key),y,u,n,i),p.add(f),f!==h&&e.contains(f)&&(h&&!e.contains(h)&&(h=null),e.insertBefore(f,h))}else f=Z(u,n,i),h&&!e.contains(h)&&(h=null),e.insertBefore(f,h),p.add(f);h=f.nextSibling}for(const u of s)!p.has(u)&&e.contains(u)&&(le(u,i),e.removeChild(u))}function Oe(e,t,r,n,i){if(t&&typeof t!="string"&&t.props?.ref&&i&&le(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 b of c){const g=Z(b,n);h.appendChild(g)}return h.appendChild(p),e.parentNode?.replaceChild(h,e),a}if(!r){le(e,i);const o=document.createComment("removed");return e.parentNode?.replaceChild(o,e),o}if(!t||typeof t=="string"){le(e,i);const o=Z(r,n,i);return ye(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(Z(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 st(o,t.props||{},r.props||{},n),Bt(o,t.children,r.children,n,i),ye(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 st(c,t.props||{},r.props||{},n),ye(r,c,i),c}catch{}le(e,i);const s=Z(r,n,i);return ye(r,s,i),e.parentNode?.replaceChild(s,e),s}function zt(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=Ne(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=Oe(o,s,i,r,n):(c=Z(i,r,n),e.replaceChild(c,o)):(c=Z(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"&&(le(h,n),a.push(h))}a.forEach(p=>e.removeChild(p)),e._prevVNode=i,e._prevDom=c}function je(e){if(typeof e=="string")return me(e);if(e.tag==="#text")return typeof e.children=="string"?me(e.children):"";if(e.tag==="#anchor")return(Array.isArray(e.children)?e.children.filter(Boolean):[]).map(je).join("");let t="";e.props&&e.props.attrs&&(t=Object.entries(e.props.attrs).map(([i,s])=>` ${i}="${me(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}="${me(String(s))}"`).join(""));const n=Array.isArray(e.children)?e.children.filter(Boolean).map(je).join(""):typeof e.children=="string"?me(e.children):e.children?je(e.children):"";return`<${e.tag}${t}${r}>${n}</${e.tag}>`}function ot(e,...t){let r="";for(let n=0;n<e.length;n++)r+=e[n],n<t.length&&(r+=t[n]);return r}function at(e){return e.replace(/\/\*[\s\S]*?\*\//g,"").replace(/\s+/g," ").replace(/\s*([{}:;,>+~])\s*/g,"$1").replace(/;}/g,"}").trim()}let Te=null;function ct(){return Te||(Te=new CSSStyleSheet,Te.replaceSync(at(qt))),Te}function Ut(e){return e.replace(/url\s*\(\s*['"]?javascript:[^)]*\)/gi,"").replace(/<script[\s\S]*?>[\s\S]*?<\/script>/gi,"").replace(/expression\s*\([^)]*\)/gi,"")}const qt=ot`
|
|
5
|
+
:host,
|
|
6
|
+
*,
|
|
7
|
+
::before,
|
|
8
|
+
::after {
|
|
6
9
|
all: isolate;
|
|
7
10
|
box-sizing: border-box;
|
|
8
11
|
border: 0 solid currentColor;
|
|
@@ -20,46 +23,89 @@
|
|
|
20
23
|
-webkit-text-size-adjust: 100%;
|
|
21
24
|
text-size-adjust: 100%;
|
|
22
25
|
}
|
|
23
|
-
button,
|
|
26
|
+
button,
|
|
27
|
+
input,
|
|
28
|
+
select,
|
|
29
|
+
textarea {
|
|
24
30
|
background: transparent;
|
|
25
31
|
outline: none;
|
|
26
32
|
}
|
|
27
|
-
textarea {
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
33
|
+
textarea {
|
|
34
|
+
resize: vertical;
|
|
35
|
+
}
|
|
36
|
+
progress {
|
|
37
|
+
vertical-align: baseline;
|
|
38
|
+
}
|
|
39
|
+
button,
|
|
40
|
+
textarea {
|
|
41
|
+
overflow: visible;
|
|
42
|
+
}
|
|
43
|
+
img,
|
|
44
|
+
svg,
|
|
45
|
+
video,
|
|
46
|
+
canvas,
|
|
47
|
+
audio,
|
|
48
|
+
iframe,
|
|
49
|
+
embed,
|
|
50
|
+
object {
|
|
31
51
|
display: block;
|
|
32
52
|
max-width: 100%;
|
|
33
53
|
height: auto;
|
|
34
54
|
}
|
|
35
|
-
svg {
|
|
36
|
-
|
|
37
|
-
|
|
55
|
+
svg {
|
|
56
|
+
fill: currentColor;
|
|
57
|
+
stroke: none;
|
|
58
|
+
}
|
|
59
|
+
a {
|
|
60
|
+
text-decoration: inherit;
|
|
61
|
+
cursor: pointer;
|
|
62
|
+
}
|
|
63
|
+
button,
|
|
64
|
+
[type="button"],
|
|
65
|
+
[type="reset"],
|
|
66
|
+
[type="submit"] {
|
|
38
67
|
cursor: pointer;
|
|
39
68
|
appearance: button;
|
|
40
69
|
background: none;
|
|
41
70
|
-webkit-user-select: none;
|
|
42
71
|
user-select: none;
|
|
43
72
|
}
|
|
44
|
-
::-webkit-input-placeholder,
|
|
45
|
-
|
|
73
|
+
::-webkit-input-placeholder,
|
|
74
|
+
::placeholder {
|
|
75
|
+
color: inherit;
|
|
76
|
+
opacity: 0.5;
|
|
46
77
|
}
|
|
47
78
|
*:focus-visible {
|
|
48
79
|
outline: 2px solid var(--color-primary-500, #3b82f6);
|
|
49
80
|
outline-offset: 2px;
|
|
50
81
|
}
|
|
51
|
-
ol,
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
82
|
+
ol,
|
|
83
|
+
ul {
|
|
84
|
+
list-style: none;
|
|
85
|
+
}
|
|
86
|
+
table {
|
|
87
|
+
border-collapse: collapse;
|
|
88
|
+
}
|
|
89
|
+
sub,
|
|
90
|
+
sup {
|
|
91
|
+
font-size: 0.75em;
|
|
55
92
|
line-height: 0;
|
|
56
93
|
position: relative;
|
|
57
94
|
}
|
|
58
|
-
sub {
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
`,Ht=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})`]))])),le="0.25rem",Bt={"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},Ut=()=>{const e={};for(const[t,r]of Object.entries(Bt))e[`max-w-${t}`]=`max-width:calc(${le} * ${r});`,e[`min-w-${t}`]=`min-width:calc(${le} * ${r});`,e[`w-${t}`]=`width:calc(${le} * ${r});`,e[`max-h-${t}`]=`max-height:calc(${le} * ${r});`,e[`min-h-${t}`]=`min-height:calc(${le} * ${r});`,e[`h-${t}`]=`height:calc(${le} * ${r});`;return e},qt=()=>{const e={},t=[1,2,3,4,5,6,7,8,9,10,11,12];for(const r of t)e[`grid-cols-${r}`]=`grid-template-columns:repeat(${r},minmax(0,1fr));`,e[`grid-rows-${r}`]=`grid-template-rows:repeat(${r},minmax(0,1fr));`,e[`col-span-${r}`]=`grid-column:span ${r} / span ${r};`,e[`row-span-${r}`]=`grid-row:span ${r} / span ${r};`,e[`col-start-${r}`]=`grid-column-start:${r};`,e[`col-end-${r}`]=`grid-column-end:${r};`,e[`row-start-${r}`]=`grid-row-start:${r};`,e[`row-end-${r}`]=`grid-row-end:${r};`;return e["grid-cols-none"]="grid-template-columns:none;",e["grid-rows-none"]="grid-template-rows:none;",e["col-span-full"]="grid-column:1 / -1;",e["row-span-full"]="grid-row:1 / -1;",e["auto-cols-auto"]="grid-auto-columns:auto;",e["auto-cols-min"]="grid-auto-columns:min-content;",e["auto-cols-max"]="grid-auto-columns:max-content;",e["auto-cols-fr"]="grid-auto-columns:1fr;",e["auto-rows-auto"]="grid-auto-rows:auto;",e["auto-rows-min"]="grid-auto-rows:min-content;",e["auto-rows-max"]="grid-auto-rows:max-content;",e["auto-rows-fr"]="grid-auto-rows:1fr;",e["grid-flow-row"]="grid-auto-flow:row;",e["grid-flow-col"]="grid-auto-flow:column;",e["grid-flow-row-dense"]="grid-auto-flow:row dense;",e["grid-flow-col-dense"]="grid-auto-flow:column dense;",e},Ft=()=>{const e={},t=[0,1,2,4,6,8];for(const r of t){const n=`${r}px`;e[`border-${r}`]=`border-width:${n};`,e[`border-s-${r}`]=`border-inline-start-width:${n};`,e[`border-e-${r}`]=`border-inline-end-width:${n};`,e[`border-bs-${r}`]=`border-block-start-width:${n};`,e[`border-be-${r}`]=`border-block-end-width:${n};`,e[`border-x-${r}`]=`border-inline-width:${n};`,e[`border-y-${r}`]=`border-block-width:${n};`,e[`border-t-${r}`]=`border-top-width:${n};`,e[`border-r-${r}`]=`border-right-width:${n};`,e[`border-b-${r}`]=`border-bottom-width:${n};`,e[`border-l-${r}`]=`border-left-width:${n};`}return 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;",e["border-s"]="border-inline-start-width:1px;",e["border-e"]="border-inline-end-width:1px;",e["border-bs"]="border-block-start-width:1px;",e["border-be"]="border-block-end-width:1px;",e},Kt=()=>{const e={},t={none:0,xs:2,sm:4,md:6,lg:8,xl:12,"2xl":16,"3xl":24,"4xl":32,full:9999};for(const[r,n]of Object.entries(t)){const i=n===9999?"9999px":`${n/16}rem`;e[`rounded-${r}`]=`border-radius:${i};`,e[`rounded-s-${r}`]=`border-start-start-radius:${i};border-end-start-radius:${i};`,e[`rounded-e-${r}`]=`border-start-end-radius:${i};border-end-end-radius:${i};`,e[`rounded-t-${r}`]=`border-top-left-radius:${i};border-top-right-radius:${i};`,e[`rounded-r-${r}`]=`border-top-right-radius:${i};border-bottom-right-radius:${i};`,e[`rounded-b-${r}`]=`border-bottom-left-radius:${i};border-bottom-right-radius:${i};`,e[`rounded-l-${r}`]=`border-top-left-radius:${i};border-bottom-left-radius:${i};`,e[`rounded-x-${r}`]=`border-top-left-radius:${i};border-bottom-left-radius:${i};border-top-right-radius:${i};border-bottom-right-radius:${i};`,e[`rounded-y-${r}`]=`border-top-left-radius:${i};border-top-right-radius:${i};border-bottom-left-radius:${i};border-bottom-right-radius:${i};`}return e},ze={block:"display:block;",inline:"display:inline;","inline-block":"display:inline-block;",flex:"display:flex;","inline-flex":"display:inline-flex;",grid:"display:grid;",hidden:"display:none;","w-full":"width:100%;","w-screen":"width:100dvw;","h-full":"height:100%;","h-screen":"height:100dvw;","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-screen":"min-width:100dvw;","min-h-screen":"min-height:100dvh;",...Ut(),"m-auto":"margin:auto;","mx-auto":"margin-inline:auto;","my-auto":"margin-block:auto;","overflow-auto":"overflow:auto;","overflow-hidden":"overflow:hidden;","overflow-visible":"overflow:visible;","overflow-scroll":"overflow: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;","overflow-x-auto":"overflow-x:auto;","overflow-x-hidden":"overflow-x:hidden;","overflow-x-visible":"overflow-x:visible;","overflow-x-scroll":"overflow-x:scroll;","pointer-events-none":"pointer-events:none;","pointer-events-auto":"pointer-events:auto;","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;",...qt(),absolute:"position:absolute;",relative:"position:relative;",fixed:"position:fixed;",sticky:"position:sticky;","font-bold":"font-weight:700;","font-semibold":"font-weight:600;","font-medium":"font-weight:500;","font-light":"font-weight:300;",underline:"text-decoration-line:underline;",overline:"text-decoration-line:overline;","line-through":"text-decoration-line:line-through;","no-underline":"text-decoration-line:none;",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;","text-left":"text-align:left;","text-center":"text-align:center;","text-right":"text-align:right;","text-xs":"font-size:0.75rem;line-height:calc(1 / 0.75)","text-sm":"font-size:0.875rem;line-height:calc(1.25 / 0.875)","text-base":"font-size:1rem;line-height:calc(1.5 / 1)","text-lg":"font-size:1.125rem;line-height:calc(1.75 / 1.125)","text-xl":"font-size:1.25rem;line-height:calc(1.75 / 1.25)","text-2xl":"font-size:1.5rem;line-height:calc(2 / 1.5)","text-3xl":"font-size:1.875rem;line-height:calc(2.25 / 1.875)","text-4xl":"font-size:2.25rem;line-height:calc(2.5 / 2.25)","text-5xl":"font-size:3rem;line-height:1","text-6xl":"font-size:3.75rem;line-height:1","text-7xl":"font-size:4.5rem;line-height:1","text-8xl":"font-size:6rem;line-height:1",...Ft(),...Kt(),"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-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));",truncate:"overflow:hidden;text-overflow:ellipsis;white-space:nowrap;",visible:"visibility:visible;",invisible:"visibility:hidden;","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-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-1":"flex:1 1 0%;","flex-auto":"flex:1 1 auto;","flex-initial":"flex:0 1 auto;","flex-none":"flex:0 0 auto;","flex-col":"flex-direction:column;","flex-row":"flex-direction:row;",grow:"flex-grow:1;",shrink:"flex-shrink:1;","grow-0":"flex-grow:0;","shrink-0":"flex-shrink:0;","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);","line-clamp-1":"display:-webkit-box;-webkit-line-clamp:1;-webkit-box-orient:vertical;overflow:hidden;","line-clamp-2":"display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;","line-clamp-3":"display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden;","line-clamp-4":"display:-webkit-box;-webkit-line-clamp:4;-webkit-box-orient:vertical;overflow:hidden;",transition:"transition-property:all;transition-duration:150ms;transition-timing-function:ease-in-out;","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;","transition-none":"transition-property:none;","cursor-auto":"cursor:auto;","cursor-default":"cursor:default;","cursor-pointer":"cursor:pointer;","cursor-wait":"cursor:wait;","cursor-text":"cursor:text;","cursor-move":"cursor:move;","cursor-help":"cursor:help;","cursor-not-allowed":"cursor:not-allowed;","z-0":"z-index:0;","z-10":"z-index:10;","z-20":"z-index:20;","z-30":"z-index:30;","z-40":"z-index:40;","z-50":"z-index:50;"},at={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"]};function Z(e,t){let r=0,n=0;for(let i=0;i<e.length;i++){const s=e[i];if(s==="[")r++;else if(s==="]"&&r>0)r--;else if(s==="(")n++;else if(s===")"&&n>0)n--;else if(r===0&&n===0&&(s===">"||s==="+"||s==="~"||s===" "))return e.slice(0,i)+t+e.slice(i)}return e+t}const Vt={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}}`},De={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)"},Ie=["sm","md","lg","xl","2xl"];function He(e){const t=e.startsWith("-"),n=(t?e.slice(1):e).split("-");if(n.length<2)return null;const i=n.slice(0,-1).join("-"),s=n[n.length-1],o=parseFloat(s);if(Number.isNaN(o)||!at[i])return null;const c=t?"-":"";return at[i].map(u=>`${u}:calc(${c}${le} * ${o});`).join("")}function ct(e){const t=e.replace("#",""),r=parseInt(t,16),n=r>>16&255,i=r>>8&255,s=r&255;return`${n} ${i} ${s}`}function Jt(e){const t=/^(bg|text|border|decoration|shadow|outline|caret|accent|fill|stroke)-([a-z]+)-?(\d{2,3}|DEFAULT)?$/.exec(e);if(!t)return null;const[,r,n,i="DEFAULT"]=t,s=Ht[n]?.[i];if(!s)return null;if(r==="shadow")return`--ce-shadow-color:${s};`;const c={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"}[r];return c?`${c}:${s};`:null}function Zt(e){const[t,r]=e.split("/");if(!r)return{base:t};const n=parseInt(r,10);return isNaN(n)||n<0||n>100?{base:t}:{base:t,opacity:n/100}}function Be(e){const{base:t,opacity:r}=Zt(e),n=Jt(t);if(n){if(r!==void 0){const s=/#([0-9a-f]{6})/i.exec(n);if(s){const o=ct(s[0]);return n.replace(/#([0-9a-f]{6})/i,`rgb(${o} / ${r})`)}}return n}const i=Te(t);if(i&&r!==void 0){const s=/#([0-9a-f]{6})/i.exec(i);if(s){const o=ct(s[0]);return i.replace(/#([0-9a-f]{6})/i,`rgb(${o} / ${r})`)}}return i}function Ue(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 Te(e){if(e.startsWith("[")&&e.endsWith("]")&&!e.includes("-[")){const i=e.slice(1,-1).trim().match(/^([a-zA-Z][a-zA-Z0-9-]*)\s*:(.*)$/);if(i){const s=i[1].trim();let o=i[2].trim();return o=o.replace(/url\('\s*([^']*?)\s*'\)/g,'url("$1")'),o=o.replace(/^'([^']*)'$/g,'"$1"'),`${s}:${o};`}return null}const t=e.indexOf("-["),r=e.endsWith("]");if(t>0&&r){const n=e.slice(0,t);let i=e.slice(t+2,-1);i=i.replace(/_/g," ");const s={bg:"background-color",text:"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",whitespace:"white-space",select:"user-select",content:"align-content",self:"align-self",basis:"flex-basis",tracking:"letter-spacing",scroll:"scroll-behavior",weight:"font-weight",leading:"line-height",z:"z-index"};if(n==="rotate")return`transform:rotate(${i});`;const o=s[n]??n.replace(/_/g,"-");if(o&&i)return`${o}:${i};`}return null}function Gt(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 Qt(e){return e.replace(/([!"#$%&'()*+,./:;<=>?@[\\\]^`{|}~])/g,"\\$1")}function Xt(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.filter(Boolean)}const lt=new Map,Yt=16;function er(e){const t=Date.now(),r=lt.get(e);if(r&&t-r.timestamp<Yt)return r.css;const n=Xt(e),i=new Set(n),s=[],o=[],c=[],u=[],m={};function g(w,a=!1){const l=(a?"dark|":"")+w;if(l in m)return m[l];const y=h(w,a);return m[l]=y,y}function b(w){const a=w.some(y=>Ie.includes(y)),l=w.includes("dark");return w.length===0?1:!a&&!l?2:a&&!l?3:4}function p(w){const a=[];let l="",y=0,x=0;for(let k=0;k<w.length;k++){const d=w[k];d==="["?y++:d==="]"&&y>0?y--:d==="("?x++:d===")"&&x>0&&x--,d===":"&&y===0&&x===0?(a.push(l),l=""):l+=d}return l&&a.push(l),a}function f(w){switch(w){case"hover":return":hover";case"focus":return":focus";case"active":return":active";case"visited":return":visited";case"disabled":return":disabled";case"checked":return":checked";case"first":return":first-child";case"last":return":last-child";case"odd":return":nth-child(odd)";case"even":return":nth-child(even)";case"focus-within":return":focus-within";case"focus-visible":return":focus-visible";default:return null}}function h(w,a=!1){const l=p(w);let y=!1;const x=l.find(_=>(_.startsWith("!")&&(y=!0,_=_.slice(1)),ze[_]||He(_)||Ue(_)||Be(_)||Te(_)));if(!x)return null;const k=x.replace(/^!/,""),d=ze[k]??He(k)??Ue(k)??Be(k)??Te(k);if(!d)return null;const $=l.indexOf(x);let T=$>=0?l.slice(0,$):[];a&&(T=T.filter(_=>_!=="dark"));const C=`.${Qt(w)}`,E="__SUBJECT__",R=y?d.replace(/;$/," !important;"):d;let O=E;const A=[];for(const _ of T)_.startsWith("group-")?(O=`.group:${_.slice(6)} ${O}`,A.push(_)):_.startsWith("peer-")&&(O=O.replace(E,`.peer:${_.slice(5)}~${E}`),A.push(_));T=T.filter(_=>!A.includes(_));const L=[],F=[];let G=null;for(const _ of T){if(_==="dark"||Ie.includes(_))continue;const K=Gt(_);if(K){G=K;continue}const I=f(_);if(I){G?F.push(I):L.push(I);continue}const z=Vt[_];typeof z=="function"&&(O=z(O,R).split("{")[0])}function Le(_,K){if(!K)return _;let I=0,z=0;if(_.length&&(_[0]===">"||_[0]==="+"||_[0]==="~"||_[0]===" ")){let P=1;for(;P<_.length&&_[P]===" ";)P++;for(;P<_.length;P++){const H=_[P];if(H==="["?I++:H==="]"&&I>0?I--:H==="("?z++:H===")"&&z>0&&z--,I===0&&z===0&&(_[P]===">"||_[P]==="+"||_[P]==="~"||_[P]===" "))return _.slice(0,P)+K+_.slice(P)}return _+K}for(let P=0;P<_.length;P++){const H=_[P];if(H==="["?I++:H==="]"&&I>0?I--:H==="("?z++:H===")"&&z>0&&z--,I===0&&z===0&&(H===">"||H==="+"||H==="~"||H===" "))return _.slice(0,P)+K+_.slice(P)}return _+K}const V=L.join(""),j=F.join("");if(G)if(G.includes("&")){const _=G.indexOf("&"),K=G.slice(0,_),I=G.slice(_+1),z=E+V,P=O;if(L.length===0)O=P.replace(E,K+z+j+I);else{const H=Le(I,j);O=P.replace(E,K+z+H)}}else O=O.replace(E,`${G}${E+V}`),j&&(O=O.replace(E,`${E}${j}`));else O=E+V+j;O=O.replace(new RegExp(E,"g"),C);let N=`${O}{${R}}`;const Q=T.filter(_=>Ie.includes(_)),X=Q.length?Q[Q.length-1]:null,D=T.includes("dark");return a&&X?N=`@media (prefers-color-scheme: dark) and ${De[X]}{${N}}`:a?N=`@media (prefers-color-scheme: dark){${N}}`:D&&X?N=`@media (prefers-color-scheme: dark) and ${De[X]}{${N}}`:D?N=`@media (prefers-color-scheme: dark){${N}}`:X&&(N=`@media ${De[X]}{${N}}`),N}for(const w of i){const a=p(w),l=a.find(d=>ze[d]||He(d)||Ue(d)||Be(d)||Te(d));if(!l)continue;const y=a.indexOf(l),x=y>=0?a.slice(0,y):[],k=b(x);if(k===4){const d=g(w,!0);d&&u.push(d)}else{const d=g(w);d&&(k===1?s.push(d):k===2?o.push(d):k===3&&c.push(d))}}const v=[...s,...o,...c,...u].join("");return lt.set(e,{css:v,timestamp:t}),v}const be=[];function tr(e,t,r,n,i,s,o,c){if(e){be.push(r);try{const u=t.render(r);if(u instanceof Promise){s(!0),u.then(m=>{s(!1),o(null),ut(e,m,r,n,i),c(e.innerHTML)}).catch(m=>{s(!1),o(m)});return}ut(e,u,r,n,i),c(e.innerHTML)}finally{be.pop()}}}function ut(e,t,r,n,i){e&&(zt(e,Array.isArray(t)?t:[t],r,n),i(e.innerHTML))}function rr(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:
|
|
95
|
+
sub {
|
|
96
|
+
bottom: -0.25em;
|
|
97
|
+
}
|
|
98
|
+
sup {
|
|
99
|
+
top: -0.5em;
|
|
100
|
+
}
|
|
101
|
+
[disabled],
|
|
102
|
+
[aria-disabled="true"] {
|
|
103
|
+
cursor: not-allowed;
|
|
104
|
+
}
|
|
105
|
+
[hidden] {
|
|
106
|
+
display: none;
|
|
107
|
+
}
|
|
108
|
+
`,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})`]))])),ue="0.25rem",Ft={"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},ut={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"]},He=(()=>{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(Ft).forEach(([a,p])=>{e[`max-w-${a}`]=`max-width:calc(${ue} * ${p});`,e[`min-w-${a}`]=`min-width:calc(${ue} * ${p});`,e[`w-${a}`]=`width:calc(${ue} * ${p});`,e[`max-h-${a}`]=`max-height:calc(${ue} * ${p});`,e[`min-h-${a}`]=`min-height:calc(${ue} * ${p});`,e[`h-${a}`]=`height:calc(${ue} * ${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 G(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 Kt={before:(e,t)=>`${e}::before{${t}}`,after:(e,t)=>`${e}::after{${t}}`,hover:(e,t)=>`${G(e,":hover")}{${t}}`,focus:(e,t)=>`${G(e,":focus")}{${t}}`,active:(e,t)=>`${G(e,":active")}{${t}}`,disabled:(e,t)=>`${G(e,":disabled")}{${t}}`,visited:(e,t)=>`${G(e,":visited")}{${t}}`,checked:(e,t)=>`${G(e,":checked")}{${t}}`,first:(e,t)=>`${G(e,":first-child")}{${t}}`,last:(e,t)=>`${G(e,":last-child")}{${t}}`,odd:(e,t)=>`${G(e,":nth-child(odd)")}{${t}}`,even:(e,t)=>`${G(e,":nth-child(even)")}{${t}}`,"focus-within":(e,t)=>`${G(e,":focus-within")}{${t}}`,"focus-visible":(e,t)=>`${G(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}}`},ft={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)"},Vt={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)"},Be=["sm","md","lg","xl","2xl"],ze=["xs","sm","md","lg","xl","2xl","3xl","4xl","5xl","6xl","7xl"];function Ue(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)||!ut[i])return null;const c=t?"-":"";return ut[i].map(a=>`${a}:calc(${c}${ue} * ${o});`).join("")}function dt(e){const t=e.replace("#",""),r=parseInt(t,16);return`${r>>16&255} ${r>>8&255} ${r&255}`}const Jt=/^(bg|text|border|decoration|shadow|outline|caret|accent|fill|stroke)-([a-z]+)-?(\d{2,3}|DEFAULT)?$/,Zt={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 Gt(e){const t=Jt.exec(e);if(!t)return null;const[,r,n,i="DEFAULT"]=t,s=lt[n]?.[i];if(!s)return null;if(r==="shadow")return`--ce-shadow-color:${s};`;const o=Zt[r];return o?`${o}:${s};`:null}function Qt(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 qe(e){const{base:t,opacity:r}=Qt(e),n=Gt(t);if(n&&r!==void 0){const s=/#([0-9a-f]{6})/i.exec(n);if(s){const o=dt(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=dt(s[0]);return i.replace(/#([0-9a-f]{6})/i,`rgb(${o} / ${r})`)}}return i}function ht(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=lt[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 Fe(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 Xt(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 Yt(e){return e.replace(/([!"#$%&'()*+,./:;<=>?@[\\\]^`{|}~])/g,"\\$1")}function er(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 we=new Map,tr=16,pt=1e3;function rr(e){const t=Date.now(),r=we.get(e);if(r&&t-r.timestamp<tr)return r.css;const n=er(e);if(!n.length)return"";const i=new Set(n),s=[[],[],[],[]],o={},c=(u,f=!1)=>{const y=f?`dark|${u}`:u;if(y in o)return o[y];const v=b(u,f);return o[y]=v,v},a=u=>{const f=u.some(l=>Be.includes(l)),y=u.some(l=>l.startsWith("@")&&(ze.includes(l.slice(1))||l.match(/^@\[.+\]$/))),v=u.includes("dark");return u.length?!f&&!v&&!y?1:v&&(f||y)?3:2:0},p=u=>{const f=[];let y="",v=0;for(let l=0;l<u.length;l++){const d=u[l];d==="["||d==="("?v++:(d==="]"||d===")")&&v--,d===":"&&v===0?(f.push(y),y=""):y+=d}return y&&f.push(y),f},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"},b=(u,f=!1)=>{const y=p(u);let v="",l=!1;for(const _ of y){let L=_;if(L.startsWith("!")&&(l=!0,L=L.slice(1)),He[L]||Ue(L)||Fe(L)||qe(L)||Re(L)){v=_;break}}if(!v)return null;const d=v.replace(/^!/,""),w=He[d]??Ue(d)??Fe(d)??qe(d)??ht(d)??Re(d);if(!w)return null;const k=y.indexOf(v);let C=k>=0?y.slice(0,k):[];f&&(C=C.filter(_=>_!=="dark"));const m=`.${Yt(u)}`,$=l?w.replace(/;/g," !important;"):w,A="__SUBJECT__";let x=A;const O=[];for(const _ of C)_.startsWith("group-")?(x=`.group:${_.slice(6)} ${x}`,O.push(_)):_.startsWith("peer-")&&(x=x.replace(A,`.peer:${_.slice(5)}~${A}`),O.push(_));C=C.filter(_=>!O.includes(_));const j=[],H=[];let E=null;for(const _ of C){if(_==="dark"||Be.includes(_)||_.startsWith("@")&&(ze.includes(_.slice(1))||_.match(/^@\[.+\]$/)))continue;const L=Xt(_);if(L){E=L;continue}const I=h[_];if(I){E?H.push(I):j.push(I);continue}const R=Kt[_];typeof R=="function"&&(x=R(x,$).split("{")[0])}const T=j.join(""),B=H.join("");function Ce(_,L){if(!L)return _;let I=0,R=0;if(_.length&&(_[0]===">"||_[0]==="+"||_[0]==="~"||_[0]===" ")){let W=1;for(;W<_.length&&_[W]===" ";)W++;for(;W<_.length;W++){const z=_[W];if(z==="["?I++:z==="]"&&I>0?I--:z==="("?R++:z===")"&&R>0&&R--,I===0&&R===0&&(_[W]===">"||_[W]==="+"||_[W]==="~"||_[W]===" "))return _.slice(0,W)+L+_.slice(W)}return _+L}for(let W=0;W<_.length;W++){const z=_[W];if(z==="["?I++:z==="]"&&I>0?I--:z==="("?R++:z===")"&&R>0&&R--,I===0&&R===0&&(z===">"||z==="+"||z==="~"||z===" "))return _.slice(0,W)+L+_.slice(W)}return _+L}if(E)if(E.includes("&")){const _=E.indexOf("&"),L=E.slice(0,_),I=E.slice(_+1),R=A+T;if(j.length===0)x=x.replace(A,L+R+B+I);else{const W=Ce(I,B);x=x.replace(A,L+R+W)}}else x=x.replace(A,`${E}${A+T}`),B&&(x=x.replace(A,`${A}${B}`));else x=x.replace(A,A+T+B);x=x.replace(new RegExp(A,"g"),m);let ee=`${x}{${$}}`;const V=C.filter(_=>Be.includes(_)),N=C.filter(_=>_.startsWith("@")&&(ze.includes(_.slice(1))||_.match(/^@\[.+\]$/))),J=V.length?V[V.length-1]:null,K=N.length?N[N.length-1]:null,ae=C.includes("dark");let P="",te="";if(ae&&J?P=`@media (prefers-color-scheme: dark) and ${ft[J]}`:ae?P="@media (prefers-color-scheme: dark)":J&&(P=`@media ${ft[J]}`),K)if(K.startsWith("@[")&&K.endsWith("]")){const _=K.slice(2,-1);if(!/^-?\d*\.?\d+(px|rem|em|%|vh|vw|ch|ex|cm|mm|in|pt|pc)$/.test(_))return null;te=`@container (min-width:${_})`}else{const _=K.slice(1);te=`@container ${Vt[_]||`(min-width:${_})`}`}return P&&te?ee=`${P}${te}{${ee}}`:P?ee=`${P}{${ee}}`:te&&(ee=`${te}{${ee}}`),ee};for(const u of i){const f=p(u),y=f.find(k=>He[k.replace(/^!/,"")]||Ue(k.replace(/^!/,""))||Fe(k.replace(/^!/,""))||qe(k.replace(/^!/,""))||ht(k.replace(/^!/,""))||Re(k.replace(/^!/,"")));if(!y)continue;const v=f.indexOf(y),l=v>=0?f.slice(0,v):[],d=a(l),w=c(u);w&&s[d].push(w)}const g=s.flat().join("");return we.size>=pt&&Array.from(we.keys()).slice(0,Math.floor(pt/2)).forEach(f=>we.delete(f)),we.set(e,{css:g,timestamp:t}),g}const ve=[];function nr(e,t,r,n,i,s,o,c){if(e){ve.push(r);try{const a=t.render(r);if(a instanceof Promise){s(!0),a.then(p=>{s(!1),o(null),gt(e,p,r,n,i),c(e.innerHTML)}).catch(p=>{s(!1),o(p)});return}gt(e,a,r,n,i),c(e.innerHTML)}finally{ve.pop()}}}function gt(e,t,r,n,i){e&&(zt(e,Array.isArray(t)?t:[t],r,n),i(e.innerHTML))}function ir(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:
|
|
63
109
|
Common causes:
|
|
64
110
|
• Event handler calling a function immediately: @click="\${fn()}" should be @click="\${fn}"
|
|
65
111
|
• State modification during render
|
|
@@ -67,28 +113,28 @@
|
|
|
67
113
|
Component rendering will be throttled to prevent browser freeze.`);else if(r>20){console.error(`🛑 Infinite loop detected in component render:
|
|
68
114
|
• This might be caused by state updates during render
|
|
69
115
|
• Ensure all state modifications are done in event handlers or effects
|
|
70
|
-
Stopping runaway component render to prevent browser freeze`),o(null);return}}else i(0);const
|
|
116
|
+
Stopping runaway component render to prevent browser freeze`),o(null);return}}else i(0);const p=setTimeout(()=>{n(Date.now()),e(),o(null)},r>10?100:0);o(p)}function sr(e,t,r,n,i){if(!e)return;const s=rr(r);if((!s||s.trim()==="")&&!t._computedStyle){i(null),e.adoptedStyleSheets=[ct()];return}let o="";t._computedStyle&&(o=t._computedStyle);let c=Ut(`${o}
|
|
71
117
|
${s}
|
|
72
|
-
`);c=st(c);let u=n;u||(u=new CSSStyleSheet),(u.cssRules.length===0||u.toString()!==c)&&u.replaceSync(c),e.adoptedStyleSheets=[ot(),u],i(u)}let W=null;function ir(e){W=e}function sr(){W=null}function or(){if(!W)throw new Error("useEmit must be called during component render");const e=W.emit;return(t,r)=>e(t,r)}function we(e){e._hookCallbacks||Object.defineProperty(e,"_hookCallbacks",{value:{},writable:!0,enumerable:!1,configurable:!1})}function ar(e){if(!W)throw new Error("useOnConnected must be called during component render");we(W),W._hookCallbacks.onConnected=e}function cr(e){if(!W)throw new Error("useOnDisconnected must be called during component render");we(W),W._hookCallbacks.onDisconnected=e}function lr(e){if(!W)throw new Error("useOnAttributeChanged must be called during component render");we(W),W._hookCallbacks.onAttributeChanged=e}function ur(e){if(!W)throw new Error("useOnError must be called during component render");we(W),W._hookCallbacks.onError=e}function fr(e){if(!W)throw new Error("useStyle must be called during component render");we(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 Re=new Map,ft=Symbol.for("cer.registry");if(typeof window<"u"){const e=globalThis;e[ft]||(e[ft]=Re)}function dr(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=Re.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=Re.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(),St(t,this.context,this._mounted,r=>{this._mounted=r})})}disconnectedCallback(){this._runLogicWithinErrorBoundary(t,()=>{At(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(),Tt(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,()=>{tr(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,()=>{de(()=>{rr(()=>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,()=>{nr(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,u,m){const g=Reflect.get(c,u,m);return typeof g=="function"&&typeof u=="string"&&["push","pop","shift","unshift","splice","sort","reverse"].includes(u)?function(...p){const f=g.apply(c,p);if(!i._initializing){const h=o||"root";i._triggerWatchers(h,c),de(()=>i._render(r),i._componentId)}return f}:g},set(c,u,m){if(c[u]=m,!i._initializing){const g=o?`${o}.${String(u)}`:String(u);i._triggerWatchers(g,m),de(()=>i._render(r),i._componentId)}return!0},deleteProperty(c,u){if(delete c[u],!i._initializing){const m=o?`${o}.${String(u)}`:String(u);i._triggerWatchers(m,void 0),de(()=>i._render(r),i._componentId)}return!0}}):s&&typeof s=="object"?s.constructor&&s.constructor.name==="ReactiveState"?s:(Object.keys(s).forEach(c=>{const u=o?`${o}.${c}`:c;s[c]=n(s[c],u)}),new Proxy(s,{set(c,u,m){const g=o?`${o}.${String(u)}`:String(u);return c[u]=n(m,g),i._initializing||(i._triggerWatchers(g,c[u]),de(()=>i._render(r),i._componentId)),!0},get(c,u,m){return Reflect.get(c,u,m)}})):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,()=>{kt(this.context,this._watchers,{})})}_triggerWatchers(r,n){Ct(this.context,this._watchers,r,n)}_applyProps(r){this._runLogicWithinErrorBoundary(r,()=>{try{Et(this,r,this.context)}catch(n){this._hasError=!0,r.onError&&r.onError(n,this.context)}})}}}function qe(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 u=o.indexOf("({");if(u!==-1){let m=0,g=!1,b=null,p=!1,f=-1;for(let h=u+2;h<o.length;h++){const v=o[h];if(p){p=!1;continue}if(v==="\\"){p=!0;continue}if(!g&&(v==='"'||v==="'"||v==="`")){g=!0,b=v;continue}if(g&&v===b){g=!1,b=null;continue}if(!g){if(v==="{")m++;else if(v==="}"){if(m===0){f=h;break}m--}}}if(f!==-1){const h=o.substring(u,f+2),v=o.substring(u+2,f).trim();c=[h,v]}}if(c){const m=c[1];let g="",b="",p=!0,f=0,h=null,v=!1,w=0;for(;w<m.length;){const a=m[w];if(v){p?g+=a:b+=a,v=!1,w++;continue}if(a==="\\"){v=!0,p?g+=a:b+=a,w++;continue}if((a==='"'||a==="'"||a==="`")&&!h){h=a,p?g+=a:b+=a,w++;continue}if(a===h){h=null,p?g+=a:b+=a,w++;continue}if(h){p?g+=a:b+=a,w++;continue}if(a==="{"||a==="["){f++,p?g+=a:b+=a,w++;continue}if(a==="}"||a==="]"){f--,p?g+=a:b+=a,w++;continue}if(a==="="&&f===0&&p){p=!1,w++;continue}if(a===","&&f===0){if(g.trim()&&b.trim()){const l=g.trim(),y=b.trim();try{if(y==="true")n[l]=!0;else if(y==="false")n[l]=!1;else if(y==="[]")n[l]=[];else if(y==="{}")n[l]={};else if(/^\d+$/.test(y))n[l]=parseInt(y);else if(/^'.*'$/s.test(y))n[l]=y.slice(1,-1).replace(/\\'/g,"'").replace(/\\"/g,'"').replace(/\\\//g,"/");else if(/^".*"$/s.test(y))n[l]=y.slice(1,-1).replace(/\\"/g,'"').replace(/\\'/g,"'").replace(/\\\//g,"/");else if(/^`.*`$/s.test(y)){const x=y.slice(1,-1);if(x.includes("${"))try{n[l]=new Function(`return \`${x}\`;`)()}catch{n[l]=x}else n[l]=x}else n[l]=y}catch{n[l]=""}}else if(g.trim()){const l=g.split(":")[0].trim();l&&!l.includes("}")&&(n[l]="")}g="",b="",p=!0,w++;continue}p?g+=a:b+=a,w++}if(g.trim()&&b.trim()){const a=g.trim(),l=b.trim();try{if(l==="true")n[a]=!0;else if(l==="false")n[a]=!1;else if(l==="[]")n[a]=[];else if(l==="{}")n[a]={};else if(/^\d+$/.test(l))n[a]=parseInt(l);else if(/^'.*'$/s.test(l))n[a]=l.slice(1,-1).replace(/\\'/g,"'").replace(/\\"/g,'"').replace(/\\\//g,"/");else if(/^".*"$/s.test(l))n[a]=l.slice(1,-1).replace(/\\"/g,'"').replace(/\\'/g,"'").replace(/\\\//g,"/");else if(/^`.*`$/s.test(l)){const y=l.slice(1,-1);if(y.includes("${"))try{n[a]=new Function(`return \`${y}\`;`)()}catch{n[a]=y}else n[a]=y}else n[a]=l}catch{n[a]=""}}else if(g.trim()){const a=g.split(":")[0].trim();a&&!a.includes("}")&&(n[a]="")}}}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,u,m)=>{i.onAttributeChanged&&i.onAttributeChanged(o,c,u)},onError:(o,c)=>{i.onError&&o&&i.onError(o)},render:o=>{const c=o._componentId||`${r}-${Math.random().toString(36).substr(2,9)}`;q.setCurrentComponent(c,()=>{o.requestRender&&o.requestRender()});try{ir(o);const u=Object.keys(n).length>0;let m;if(u){const g={};Object.keys(n).forEach(b=>{const p=o[b],f=n[b];g[b]=p!=null&&p!==""?p:f}),m=t(g)}else m=t();if(o._hookCallbacks){const g=o._hookCallbacks;g.onConnected&&(i.onConnected=g.onConnected),g.onDisconnected&&(i.onDisconnected=g.onDisconnected),g.onAttributeChanged&&(i.onAttributeChanged=g.onAttributeChanged),g.onError&&(i.onError=g.onError),g.style&&(o._styleCallback=g.style)}return m}finally{sr(),q.clearCurrentComponent()}}};Re.set(r,s),typeof window<"u"&&(customElements.get(r)||customElements.define(r,dr(r,s)))}class hr{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 Fe=new hr(500);function pr(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 ve(e,t={},r,n){const i=n??t.key;return{tag:e,key:i,props:t,children:r}}function Oe(e){return!!e&&typeof e=="object"&&(e.type==="AnchorBlock"||e.tag==="#anchor")}function Pe(e){return typeof e=="object"&&e!==null&&"tag"in e&&!Oe(e)}function gr(e,t){return e.key!=null?e:{...e,key:t}}function mr(e,t=[],r={}){const n={},i={},s={},o=[],c=/([:@#]?)([a-zA-Z0-9-:\.]+)=("([^"\\]*(\\.[^"\\]*)*)"|'([^'\\]*(\\.[^'\\]*)*)')/g;let u;for(;u=c.exec(e);){const m=u[1],g=u[2],b=(u[4]||u[6])??"",p=b.match(/^{{(\d+)}}$/);let f=p?t[Number(p[1])]??null:b;p||(f==="true"?f=!0:f==="false"?f=!1:f==="null"?f=null:isNaN(Number(f))||(f=Number(f)));const h=["model","bind","show","class","style","ref"];if(m===":"){const[v,w]=g.split(":"),[a,...l]=v.split(".");if(h.includes(a)){const y=[...l],x=a==="model"&&w?`model:${w}`:a;s[x]={value:f,modifiers:y,arg:w}}else{let y=f;y&&ee(y)&&(y=y.value),i[g]=y,o.push(g)}}else if(m==="@"){const[v,...w]=g.split("."),a=w;pr(f,v);const l=typeof f=="function"?f:typeof r[f]=="function"?r[f]:void 0;if(l){const y=k=>{if(a.includes("prevent")&&k.preventDefault(),a.includes("stop")&&k.stopPropagation(),!(a.includes("self")&&k.target!==k.currentTarget))return a.includes("once")&&k.currentTarget?.removeEventListener(v,y),l(k)},x="on"+v.charAt(0).toUpperCase()+v.slice(1);n[x]=y}}else g==="ref"?n.ref=f:i[g]=f}return{props:n,attrs:i,directives:s,bound:o}}function yr(e,t,r){const n=be.length>0?be[be.length-1]:void 0,i=r??n,s=!r&&t.length===0,o=s?e.join("<!--TEMPLATE_DELIM-->"):null;if(s&&o){const d=Fe.get(o);if(d)return d}function c(d,$){return ve("#text",{},d,$)}let u="";for(let d=0;d<e.length;d++)u+=e[d],d<t.length&&(u+=`{{${d}}}`);const m=/<!--[\s\S]*?-->|<\/?([a-zA-Z0-9-]+)((?:\s+[^\s=>/]+(?:\s*=\s*(?:"(?:\\.|[^"])*"|'(?:\\.|[^'])*'|[^\s>]+))?)*)\s*\/?>|{{(\d+)}}|([^<]+)/g,g=[];let b,p=[],f=null,h={},v,w=0,a=[];function l(d){!d||typeof d!="object"||Oe(d)||(d.props||d.attrs?(d.props&&(h.props||(h.props={}),Object.assign(h.props,d.props)),d.attrs&&(h.attrs||(h.attrs={}),Object.keys(d.attrs).forEach($=>{if($==="style"&&h.attrs.style){const T=h.attrs.style.replace(/;?\s*$/,""),C=d.attrs.style.replace(/^;?\s*/,"");h.attrs.style=T+"; "+C}else if($==="class"&&h.attrs.class){const T=h.attrs.class.trim().split(/\s+/).filter(Boolean),C=d.attrs.class.trim().split(/\s+/).filter(Boolean),E=[...new Set([...T,...C])];h.attrs.class=E.join(" ")}else h.attrs[$]=d.attrs[$]}))):(h.props||(h.props={}),Object.assign(h.props,d)))}function y(d,$){const T=f?p:a;if(Oe(d)){const C=d.key??$;let E=d.children;T.push({...d,key:C,children:E});return}if(Pe(d)){T.push(gr(d,void 0));return}if(Array.isArray(d)){if(d.length===0)return;for(let C=0;C<d.length;C++){const E=d[C];Oe(E)||Pe(E)||Array.isArray(E)?y(E,`${$}-${C}`):E!==null&&typeof E=="object"?l(E):T.push(c(String(E),`${$}-${C}`))}return}if(d!==null&&typeof d=="object"){l(d);return}T.push(c(String(d),$))}const x=new Set(["area","base","br","col","embed","hr","img","input","link","meta","param","source","track","wbr"]);for(;b=m.exec(u);)if(!(b[0].startsWith("<!--")&&b[0].endsWith("-->"))){if(b[1]){const d=b[1],$=b[0][1]==="/",T=b[0][b[0].length-2]==="/"||x.has(d),{props:C,attrs:E,directives:R,bound:O}=mr(b[2]||"",t,i),A={props:{},attrs:{}};for(const L in C)A.props[L]=C[L];for(const L in E)A.attrs[L]=E[L];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 L={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"]},F=d.toLowerCase(),G=L[F]??[];if(A.attrs){for(const V of G)if(O&&O.includes(V)&&V in A.attrs&&!(A.props&&V in A.props)){let j=A.attrs[V];j&&ee(j)&&(j=j.value),A.props[V]=j,delete A.attrs[V]}}if((d.includes("-")||!!i?.__customElements?.has?.(d))&&(A.isCustomElement=!0,O&&A.attrs)){const V=new Set(["id","name","data-key","key"]);for(const j of O)if(j in A.attrs&&!(A.props&&j in A.props)){const N=j.includes("-")?j.split("-").map((X,D)=>D===0?X:X.charAt(0).toUpperCase()+X.slice(1)).join(""):j;let Q=A.attrs[j];Q&&ee(Q)&&(Q=Q.value),A.props[N]=Q,V.has(j)||delete A.attrs[j]}}}catch{}if(R&&Object.keys(R).some(L=>L==="model"||L.startsWith("model:")))try{const L=Symbol.for("cer.registry"),F=globalThis[L],G=!!(F&&typeof F.has=="function"&&F.has(d)),Le=!!(i&&(i.__customElements instanceof Set&&i.__customElements.has(d)||Array.isArray(i.__isCustomElements)&&i.__isCustomElements.includes(d)));if(!!(d.includes("-")||Le||G))for(const N of Object.keys(R)){if(N!=="model"&&!N.startsWith("model:"))continue;const Q=R[N],X=Q.arg??(N.includes(":")?N.split(":",2)[1]:void 0),D=Q.value,_=X??"modelValue",K=B,I=_e,z=i?i._state||i:void 0;let P;typeof D=="string"&&i?P=K(z,D):(P=D,P&&ee(P)&&(P=P.value)),A.props[_]=P;try{const ae=ne(_);A.attrs||(A.attrs={}),P!==void 0&&(A.attrs[ae]=P)}catch{}A.isCustomElement=!0;const mt=`update:${ne(_)}`.replace(/-([a-z])/g,(ae,re)=>re.toUpperCase()),zr="on"+mt.charAt(0).toUpperCase()+mt.slice(1);A.props[zr]=function(ae){const re=ae.detail!==void 0?ae.detail:ae.target?ae.target.value:void 0;if(z)if(D&&ee(D)){const fe=D.value;(Array.isArray(re)&&Array.isArray(fe)?JSON.stringify([...re].sort())!==JSON.stringify([...fe].sort()):re!==fe)&&(D.value=re,i?.requestRender?i.requestRender():i?._requestRender&&i._requestRender())}else{const fe=K(z,typeof D=="string"?D:String(D));(Array.isArray(re)&&Array.isArray(fe)?JSON.stringify([...re].sort())!==JSON.stringify([...fe].sort()):re!==fe)&&(I(z,typeof D=="string"?D:String(D),re),i?.requestRender?i.requestRender():i?._requestRender&&i._requestRender())}},delete R[N]}}catch{}if(Object.keys(R).length>0&&(A.directives={...R}),$){const L=ve(f,h,p.length===1&&Pe(p[0])&&p[0].tag==="#text"?typeof p[0].children=="string"?p[0].children:"":p.length?p:void 0,v),F=g.pop();F?(f=F.tag,h=F.props,v=F.key,p=F.children,p.push(L)):(a.push(L),f=null,h={},v=void 0,p=[])}else T?f?p.push(ve(d,A,void 0,void 0)):a.push(ve(d,A,void 0,void 0)):(f&&g.push({tag:f,props:h,children:p,key:v}),f=d,h=A,p=[])}else if(typeof b[3]<"u"){const d=Number(b[3]),$=t[d],T=`interp-${d}`;y($,T)}else if(b[4]){const d=b[4],$=f?p:a,T=d.split(/({{\d+}})/);for(const C of T){if(!C)continue;const E=C.match(/^{{(\d+)}}$/);if(E){const R=Number(E[1]),O=t[R],A=`interp-${R}`;y(O,A)}else{const R=`text-${w++}`;$.push(c(C,R))}}}}const k=a.filter(d=>Pe(d)&&d.tag==="#text"?typeof d.children=="string"&&d.children.trim()!=="":!0);if(k.length===1){const d=k[0];return s&&o&&Fe.set(o,d),d}else if(k.length>1){const d=k;return s&&o&&Fe.set(o,d),d}return ve("div",{},"","fallback-root")}function oe(e,...t){const r=t[t.length-1],n=typeof r=="object"&&r&&!Array.isArray(r)?r:void 0;return yr(e,t,n)}function $e(e,t){return M(e?t:[],"when-block")}function br(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 dt(){const e=[];return{when(t,r){return e.push([t,r]),this},otherwise(t){return e.push([!0,t]),this},done(){return wr(...e)}}}function wr(...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 vr(e,t){return $e(!e,t)}function $r(e,t){const r=!e||e.length===0;return $e(r,t)}function xr(e,t){const r=!!(e&&e.length>0);return $e(r,t)}function kr(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 Cr(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 _r(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 Er(e,t,r,n){const i=r*t,s=Math.min(i+t,e.length);return e.slice(i,s).map((c,u)=>{const m=i+u,g=typeof c=="object"&&c!=null?c?.key??c?.id??`page-${m}`:`page-${m}`;return M(n(c,m,u),`each-page-${g}`)})}function Sr(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 U(e,t){const r=typeof window<"u"&&window.matchMedia?.(e)?.matches;return $e(!!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)"},Ke=["sm","md","lg","xl","2xl"],ht={sm:e=>U(te.sm,e),md:e=>U(te.md,e),lg:e=>U(te.lg,e),xl:e=>U(te.xl,e),"2xl":e=>U(te["2xl"],e),dark:e=>U(te.dark,e),light:e=>U("(prefers-color-scheme: light)",e),touch:e=>U("(hover: none) and (pointer: coarse)",e),mouse:e=>U("(hover: hover) and (pointer: fine)",e),reducedMotion:e=>U("(prefers-reduced-motion: reduce)",e),highContrast:e=>U("(prefers-contrast: high)",e),portrait:e=>U("(orientation: portrait)",e),landscape:e=>U("(orientation: landscape)",e)};function Ar(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=>Ke.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 U(s,t)}function Tr(e){const t=[];return e.base&&t.push(M(e.base,"responsive-base")),Ke.forEach(r=>{const n=e[r];n&&t.push(ht[r](n))}),t}function Rr(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 ue extends EventTarget{handlers={};static instance;eventCounters=new Map;static getInstance(){return ue.instance||(ue.instance=new ue),ue.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){ie(`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 he=ue.getInstance(),Or=(e,t)=>he.emit(e,t),Pr=(e,t)=>he.on(e,t),Lr=(e,t)=>he.off(e,t),Mr=(e,t)=>he.once(e,t),jr=(e,t,r)=>he.listen(e,t,r);function Ve(e){let t={...e};const r=[];function n(c){r.push(c),c(t)}function i(){return t}function s(c){const u=typeof c=="function"?c(t):c;t={...t,...u},o()}function o(){r.forEach(c=>c(t))}return{subscribe:n,getState:i,setState:s}}const Je=e=>e?typeof URLSearchParams>"u"?{}:Object.fromEntries(new URLSearchParams(e)):{},Y=(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((u,m)=>{c[u]=o[m+1]}),{route:r,params:c}}}return{route:null,params:{}}},Ze={};async function pt(e){if(e.component)return e.component;if(e.load){if(Ze[e.path])return Ze[e.path];try{const t=await e.load();return Ze[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 gt(e){const{routes:t,base:r="",initialUrl:n}=e;let i,s,o,c,u,m,g;const b=async(v,w)=>{const a=t.find(l=>Y([l],v.path).route!==null);if(a?.beforeEnter)try{const l=await a.beforeEnter(v,w);return typeof l=="string"?(await h(l,!0),!1):l!==!1}catch(l){return ie("beforeEnter error",l),!1}return!0},p=async(v,w)=>{const a=t.find(l=>Y([l],v.path).route!==null);if(a?.onEnter)try{const l=await a.onEnter(v,w);return typeof l=="string"?(await h(l,!0),!1):l!==!1}catch(l){return ie("onEnter error",l),!1}return!0},f=(v,w)=>{const a=t.find(l=>Y([l],v.path).route!==null);if(a?.afterEnter)try{a.afterEnter(v,w)}catch(l){ie("afterEnter error",l)}},h=async(v,w=!1)=>{try{const a={path:v.replace(r,"")||"/",query:{}},l=Y(t,a.path);if(!l)throw new Error(`No route found for ${a.path}`);const y=o.getState(),x={path:a.path,params:l.params,query:a.query};if(!await b(x,y)||!await p(x,y))return;typeof window<"u"&&typeof document<"u"&&(w?window.history.replaceState({},"",r+v):window.history.pushState({},"",r+v)),o.setState(x),f(x,y)}catch(a){ie("Navigation error:",a)}};if(typeof window<"u"&&typeof document<"u"&&typeof n>"u"){i=()=>{const w=new URL(window.location.href),a=w.pathname.replace(r,"")||"/",l=Je(w.search);return{path:a,query:l}},s=i();const v=Y(t,s.path);o=Ve({path:s.path,params:v.params,query:s.query}),c=async(w=!1)=>{const a=i();await h(a.path,w)},window.addEventListener("popstate",()=>c(!0)),u=w=>h(w,!1),m=w=>h(w,!0),g=()=>window.history.back()}else{i=()=>{const a=new URL(n||"/","http://localhost"),l=a.pathname.replace(r,"")||"/",y=Je(a.search);return{path:l,query:y}},s=i();const v=Y(t,s.path);o=Ve({path:s.path,params:v.params,query:s.query}),c=async()=>{const a=i();await w(a.path)};const w=async a=>{try{const l={path:a.replace(r,"")||"/",query:{}},y=Y(t,l.path);if(!y)throw new Error(`No route found for ${l.path}`);const x=o.getState(),k={path:l.path,params:y.params,query:l.query},d=t.find($=>Y([$],k.path).route!==null);if(d?.beforeEnter)try{const $=await d.beforeEnter(k,x);if(typeof $=="string"){await w($);return}if($===!1)return}catch{return}if(d?.onEnter)try{const $=await d.onEnter(k,x);if(typeof $=="string"){await w($);return}if($===!1)return}catch{return}if(o.setState(k),d?.afterEnter)try{d.afterEnter(k,x)}catch{}}catch{}};u=async a=>w(a),m=async a=>w(a),g=()=>{}}return{store:o,push:u,replace:m,back:g,subscribe:o.subscribe,matchRoute:v=>Y(t,v),getCurrent:()=>o.getState(),resolveRouteComponent:pt}}function Wr(e,t){return Y(e,t)}function Nr(e){const t=gt(e);return qe("router-view",(r={},n={})=>{const{onConnected:i}=n;if(i&&i(()=>{t&&typeof t.subscribe=="function"&&t.subscribe(()=>{})}),!t)return oe`<div>Router not initialized.</div>`;const s=t.getCurrent(),{path:o}=s,c=t.matchRoute(o);return c.route?t.resolveRouteComponent(c.route).then(u=>{if(typeof u=="string")return{tag:u,props:{},children:[]};if(typeof u=="function"){const m=u();return(m instanceof Promise?m:Promise.resolve(m)).then(b=>typeof b=="string"?{tag:b,props:{},children:[]}:b)}return oe`<div>Invalid route component</div>`}).catch(()=>oe`<div>Invalid route component</div>`):oe`<div>Not found</div>`}),qe("router-link",(r={},n={})=>{const{to:i="",tag:s="a",replace:o=!1,exact:c=!1,activeClass:u="active",exactActiveClass:m="exact-active",ariaCurrentValue:g="page",disabled:b=!1,external:p=!1,class:f=""}=r,h=t.getCurrent(),v=h.path===i,w=c?v:h&&typeof h.path=="string"?h.path.startsWith(i):!1,a=v?`aria-current="${g}"`:"",l=(f||"").split(/\s+/).filter(Boolean),y={};for(const C of l)y[C]=!0;const x={...y,[u]:w,[m]:v},k=s==="button",d=b?k?'disabled aria-disabled="true" tabindex="-1"':'aria-disabled="true" tabindex="-1"':"",$=p&&(s==="a"||!s)?'target="_blank" rel="noopener noreferrer"':"",T=C=>{if(b){C.preventDefault();return}p&&(s==="a"||!s)||(C.preventDefault(),o?t.replace(i):t.push(i))};return oe`
|
|
73
|
-
${
|
|
118
|
+
`);c=at(c);let a=n;a||(a=new CSSStyleSheet),(a.cssRules.length===0||a.toString()!==c)&&a.replaceSync(c),e.adoptedStyleSheets=[ct(),a],i(a)}let D=null;function or(e){D=e}function ar(){D=null}function cr(){if(!D)throw new Error("useEmit must be called during component render");const e=D.emit;return(t,r)=>e(t,r)}function xe(e){e._hookCallbacks||Object.defineProperty(e,"_hookCallbacks",{value:{},writable:!0,enumerable:!1,configurable:!1})}function lr(e){if(!D)throw new Error("useOnConnected must be called during component render");xe(D),D._hookCallbacks.onConnected=e}function ur(e){if(!D)throw new Error("useOnDisconnected must be called during component render");xe(D),D._hookCallbacks.onDisconnected=e}function fr(e){if(!D)throw new Error("useOnAttributeChanged must be called during component render");xe(D),D._hookCallbacks.onAttributeChanged=e}function dr(e){if(!D)throw new Error("useOnError must be called during component render");xe(D),D._hookCallbacks.onError=e}function hr(e){if(!D)throw new Error("useStyle must be called during component render");xe(D);try{const t=e();Object.defineProperty(D,"_computedStyle",{value:t,writable:!0,enumerable:!1,configurable:!0})}catch(t){console.warn("Error in useStyle callback:",t),Object.defineProperty(D,"_computedStyle",{value:"",writable:!0,enumerable:!1,configurable:!0})}}const Pe=new Map,mt=Symbol.for("cer.registry");if(typeof window<"u"){const e=globalThis;e[mt]||(e[mt]=Pe)}function pr(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(),Tt(t,this.context,this._mounted,r=>{this._mounted=r})})}disconnectedCallback(){this._runLogicWithinErrorBoundary(t,()=>{Rt(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(),Pt(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,()=>{nr(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,()=>{he(()=>{ir(()=>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,()=>{sr(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(...g){const u=h.apply(c,g);if(!i._initializing){const f=o||"root";i._triggerWatchers(f,c),he(()=>i._render(r),i._componentId)}return u}:h},set(c,a,p){if(c[a]=p,!i._initializing){const h=o?`${o}.${String(a)}`:String(a);i._triggerWatchers(h,p),he(()=>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),he(()=>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]),he(()=>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,()=>{St(this.context,this._watchers,{})})}_triggerWatchers(r,n){At(this.context,this._watchers,r,n)}_applyProps(r){this._runLogicWithinErrorBoundary(r,()=>{try{jt(this,r,this.context)}catch(n){this._hasError=!0,r.onError&&r.onError(n,this.context)}})}}}function Ke(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,b=null,g=!1,u=-1;for(let f=a+2;f<o.length;f++){const y=o[f];if(g){g=!1;continue}if(y==="\\"){g=!0;continue}if(!h&&(y==='"'||y==="'"||y==="`")){h=!0,b=y;continue}if(h&&y===b){h=!1,b=null;continue}if(!h){if(y==="{")p++;else if(y==="}"){if(p===0){u=f;break}p--}}}if(u!==-1){const f=o.substring(a,u+2),y=o.substring(a+2,u).trim();c=[f,y]}}if(c){const p=c[1];let h="",b="",g=!0,u=0,f=null,y=!1,v=0;for(;v<p.length;){const l=p[v];if(y){g?h+=l:b+=l,y=!1,v++;continue}if(l==="\\"){y=!0,g?h+=l:b+=l,v++;continue}if((l==='"'||l==="'"||l==="`")&&!f){f=l,g?h+=l:b+=l,v++;continue}if(l===f){f=null,g?h+=l:b+=l,v++;continue}if(f){g?h+=l:b+=l,v++;continue}if(l==="{"||l==="["){u++,g?h+=l:b+=l,v++;continue}if(l==="}"||l==="]"){u--,g?h+=l:b+=l,v++;continue}if(l==="="&&u===0&&g){g=!1,v++;continue}if(l===","&&u===0){if(h.trim()&&b.trim()){const d=h.trim(),w=b.trim();try{if(w==="true")n[d]=!0;else if(w==="false")n[d]=!1;else if(w==="[]")n[d]=[];else if(w==="{}")n[d]={};else if(/^\d+$/.test(w))n[d]=parseInt(w);else if(/^'.*'$/s.test(w))n[d]=w.slice(1,-1).replace(/\\'/g,"'").replace(/\\"/g,'"').replace(/\\\//g,"/");else if(/^".*"$/s.test(w))n[d]=w.slice(1,-1).replace(/\\"/g,'"').replace(/\\'/g,"'").replace(/\\\//g,"/");else if(/^`.*`$/s.test(w)){const k=w.slice(1,-1);if(k.includes("${"))try{n[d]=new Function(`return \`${k}\`;`)()}catch{n[d]=k}else n[d]=k}else n[d]=w}catch{n[d]=""}}else if(h.trim()){const d=h.split(":")[0].trim();d&&!d.includes("}")&&(n[d]="")}h="",b="",g=!0,v++;continue}g?h+=l:b+=l,v++}if(h.trim()&&b.trim()){const l=h.trim(),d=b.trim();try{if(d==="true")n[l]=!0;else if(d==="false")n[l]=!1;else if(d==="[]")n[l]=[];else if(d==="{}")n[l]={};else if(/^\d+$/.test(d))n[l]=parseInt(d);else if(/^'.*'$/s.test(d))n[l]=d.slice(1,-1).replace(/\\'/g,"'").replace(/\\"/g,'"').replace(/\\\//g,"/");else if(/^".*"$/s.test(d))n[l]=d.slice(1,-1).replace(/\\"/g,'"').replace(/\\'/g,"'").replace(/\\\//g,"/");else if(/^`.*`$/s.test(d)){const w=d.slice(1,-1);if(w.includes("${"))try{n[l]=new Function(`return \`${w}\`;`)()}catch{n[l]=w}else n[l]=w}else n[l]=d}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)}`;F.setCurrentComponent(c,()=>{o.requestRender&&o.requestRender()});try{or(o);const a=Object.keys(n).length>0;let p;if(a){const h={};Object.keys(n).forEach(b=>{const g=o[b],u=n[b];h[b]=g!=null&&g!==""?g:u}),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{ar(),F.clearCurrentComponent()}}};Pe.set(r,s),typeof window<"u"&&(customElements.get(r)||customElements.define(r,pr(r,s)))}class gr{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 Ve=new gr(500);function mr(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 $e(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 yr(e,t){return e.key!=null?e:{...e,key:t}}function br(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],b=(a[4]||a[6])??"",g=b.match(/^{{(\d+)}}$/);let u=g?t[Number(g[1])]??null:b;g||(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"];if(p===":"){const[y,v]=h.split(":"),[l,...d]=y.split(".");if(f.includes(l)){const w=[...d],k=l==="model"&&v?`model:${v}`:l;s[k]={value:u,modifiers:w,arg:v}}else{let w=u;w&&X(w)&&(w=w.value),i[h]=w,o.push(h)}}else if(p==="@"){const[y,...v]=h.split("."),l=v;mr(u,y);const d=typeof u=="function"?u:typeof r[u]=="function"?r[u]:void 0;if(d){const w=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,w),d(C)},k="on"+y.charAt(0).toUpperCase()+y.slice(1);n[k]=w}}else h==="ref"?n.ref=u:i[h]=u}return{props:n,attrs:i,directives:s,bound:o}}function wr(e,t,r){const n=ve.length>0?ve[ve.length-1]:void 0,i=r??n,s=!r&&t.length===0,o=s?e.join("<!--TEMPLATE_DELIM-->"):null;if(s&&o){const m=Ve.get(o);if(m)return m}function c(m,$){return $e("#text",{},m,$)}let a="";for(let m=0;m<e.length;m++)a+=e[m],m<t.length&&(a+=`{{${m}}}`);const p=/<!--[\s\S]*?-->|<\/?([a-zA-Z0-9-]+)((?:\s+[^\s=>/]+(?:\s*=\s*(?:"(?:\\.|[^"])*"|'(?:\\.|[^'])*'|[^\s>]+))?)*)\s*\/?>|{{(\d+)}}|([^<]+)/g,h=[];let b,g=[],u=null,f={},y,v=0,l=[];function d(m){!m||typeof m!="object"||Le(m)||(m.props||m.attrs?(m.props&&(f.props||(f.props={}),Object.assign(f.props,m.props)),m.attrs&&(f.attrs||(f.attrs={}),Object.keys(m.attrs).forEach($=>{if($==="style"&&f.attrs.style){const A=f.attrs.style.replace(/;?\s*$/,""),x=m.attrs.style.replace(/^;?\s*/,"");f.attrs.style=A+"; "+x}else if($==="class"&&f.attrs.class){const A=f.attrs.class.trim().split(/\s+/).filter(Boolean),x=m.attrs.class.trim().split(/\s+/).filter(Boolean),O=[...new Set([...A,...x])];f.attrs.class=O.join(" ")}else f.attrs[$]=m.attrs[$]}))):(f.props||(f.props={}),Object.assign(f.props,m)))}function w(m,$){const A=u?g:l;if(Le(m)){const x=m.key??$;let O=m.children;A.push({...m,key:x,children:O});return}if(Me(m)){A.push(yr(m,void 0));return}if(Array.isArray(m)){if(m.length===0)return;for(let x=0;x<m.length;x++){const O=m[x];Le(O)||Me(O)||Array.isArray(O)?w(O,`${$}-${x}`):O!==null&&typeof O=="object"?d(O):A.push(c(String(O),`${$}-${x}`))}return}if(m!==null&&typeof m=="object"){d(m);return}A.push(c(String(m),$))}const k=new Set(["area","base","br","col","embed","hr","img","input","link","meta","param","source","track","wbr"]);for(;b=p.exec(a);)if(!(b[0].startsWith("<!--")&&b[0].endsWith("-->"))){if(b[1]){const m=b[1],$=b[0][1]==="/",A=b[0][b[0].length-2]==="/"||k.has(m),{props:x,attrs:O,directives:j,bound:H}=br(b[2]||"",t,i),E={props:{},attrs:{}};for(const T in x)E.props[T]=x[T];for(const T in O)E.attrs[T]=O[T];if(E.attrs&&Object.prototype.hasOwnProperty.call(E.attrs,"key")&&!(E.props&&Object.prototype.hasOwnProperty.call(E.props,"key")))try{E.props.key=E.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"]},B=m.toLowerCase(),Ce=T[B]??[];if(E.attrs){for(const V of Ce)if(H&&H.includes(V)&&V in E.attrs&&!(E.props&&V in E.props)){let N=E.attrs[V];N&&X(N)&&(N=N.value),E.props[V]=N,delete E.attrs[V]}}if((m.includes("-")||!!i?.__customElements?.has?.(m))&&(E.isCustomElement=!0,H&&E.attrs)){const V=new Set(["id","name","data-key","key"]);for(const N of H)if(N in E.attrs&&!(E.props&&N in E.props)){const J=N.includes("-")?N.split("-").map((ae,P)=>P===0?ae:ae.charAt(0).toUpperCase()+ae.slice(1)).join(""):N;let K=E.attrs[N];K&&X(K)&&(K=K.value),E.props[J]=K,V.has(N)||delete E.attrs[N]}}}catch{}if(j&&Object.keys(j).some(T=>T==="model"||T.startsWith("model:")))try{const T=Symbol.for("cer.registry"),B=globalThis[T],Ce=!!(B&&typeof B.has=="function"&&B.has(m)),ee=!!(i&&(i.__customElements instanceof Set&&i.__customElements.has(m)||Array.isArray(i.__isCustomElements)&&i.__isCustomElements.includes(m)));if(!!(m.includes("-")||ee||Ce))for(const J of Object.keys(j)){if(J!=="model"&&!J.startsWith("model:"))continue;const K=j[J],ae=K.arg??(J.includes(":")?J.split(":",2)[1]:void 0),P=K.value,te=ae??"modelValue",_=U,L=Ae,I=i?i._state||i:void 0;let R;typeof P=="string"&&i?R=_(I,P):(R=P,R&&X(R)&&(R=R.value)),E.props[te]=R;try{const ce=ne(te);E.attrs||(E.attrs={}),R!==void 0&&(E.attrs[ce]=R)}catch{}E.isCustomElement=!0;const z=`update:${ne(te)}`.replace(/-([a-z])/g,(ce,re)=>re.toUpperCase()),Hr="on"+z.charAt(0).toUpperCase()+z.slice(1);E.props[Hr]=function(ce){const re=ce.detail!==void 0?ce.detail:ce.target?ce.target.value:void 0;if(I)if(P&&X(P)){const de=P.value;(Array.isArray(re)&&Array.isArray(de)?JSON.stringify([...re].sort())!==JSON.stringify([...de].sort()):re!==de)&&(P.value=re,i?.requestRender?i.requestRender():i?._requestRender&&i._requestRender())}else{const de=_(I,typeof P=="string"?P:String(P));(Array.isArray(re)&&Array.isArray(de)?JSON.stringify([...re].sort())!==JSON.stringify([...de].sort()):re!==de)&&(L(I,typeof P=="string"?P:String(P),re),i?.requestRender?i.requestRender():i?._requestRender&&i._requestRender())}},delete j[J]}}catch{}if(Object.keys(j).length>0&&(E.directives={...j}),$){const T=$e(u,f,g.length===1&&Me(g[0])&&g[0].tag==="#text"?typeof g[0].children=="string"?g[0].children:"":g.length?g:void 0,y),B=h.pop();B?(u=B.tag,f=B.props,y=B.key,g=B.children,g.push(T)):(l.push(T),u=null,f={},y=void 0,g=[])}else A?u?g.push($e(m,E,void 0,void 0)):l.push($e(m,E,void 0,void 0)):(u&&h.push({tag:u,props:f,children:g,key:y}),u=m,f=E,g=[])}else if(typeof b[3]<"u"){const m=Number(b[3]),$=t[m],A=`interp-${m}`;w($,A)}else if(b[4]){const m=b[4],$=u?g:l,A=m.split(/({{\d+}})/);for(const x of A){if(!x)continue;const O=x.match(/^{{(\d+)}}$/);if(O){const j=Number(O[1]),H=t[j],E=`interp-${j}`;w(H,E)}else{const j=`text-${v++}`;$.push(c(x,j))}}}}const C=l.filter(m=>Me(m)&&m.tag==="#text"?typeof m.children=="string"&&m.children.trim()!=="":!0);if(C.length===1){const m=C[0];return s&&o&&Ve.set(o,m),m}else if(C.length>1){const m=C;return s&&o&&Ve.set(o,m),m}return $e("div",{},"","fallback-root")}function oe(e,...t){const r=t[t.length-1],n=typeof r=="object"&&r&&!Array.isArray(r)?r:void 0;return wr(e,t,n)}function ke(e,t){return M(e?t:[],"when-block")}function vr(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 yt(){const e=[];return{when(t,r){return e.push([t,r]),this},otherwise(t){return e.push([!0,t]),this},done(){return xr(...e)}}}function xr(...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 $r(e,t){return ke(!e,t)}function kr(e,t){const r=!e||e.length===0;return ke(r,t)}function Cr(e,t){const r=!!(e&&e.length>0);return ke(r,t)}function _r(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 Er(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 Sr(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 Ar(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 q(e,t){const r=typeof window<"u"&&window.matchMedia?.(e)?.matches;return ke(!!r,t)}const Y={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)"},Je=["sm","md","lg","xl","2xl"],bt={sm:e=>q(Y.sm,e),md:e=>q(Y.md,e),lg:e=>q(Y.lg,e),xl:e=>q(Y.xl,e),"2xl":e=>q(Y["2xl"],e),dark:e=>q(Y.dark,e),light:e=>q("(prefers-color-scheme: light)",e),touch:e=>q("(hover: none) and (pointer: coarse)",e),mouse:e=>q("(hover: hover) and (pointer: fine)",e),reducedMotion:e=>q("(prefers-reduced-motion: reduce)",e),highContrast:e=>q("(prefers-contrast: high)",e),portrait:e=>q("(orientation: portrait)",e),landscape:e=>q("(orientation: landscape)",e)};function jr(e,t){const r=[];e.includes("dark")?r.push(Y.dark):e.includes("light")&&r.push("(prefers-color-scheme: light)");const n=e.filter(o=>Je.includes(o)),i=n[n.length-1];i&&i in Y&&r.push(Y[i]);const s=r.length>0?r.join(" and "):"all";return q(s,t)}function Tr(e){const t=[];return e.base&&t.push(M(e.base,"responsive-base")),Je.forEach(r=>{const n=e[r];n&&t.push(bt[r](n))}),t}function Rr(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 fe extends EventTarget{handlers={};static instance;eventCounters=new Map;static getInstance(){return fe.instance||(fe.instance=new fe),fe.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){ie(`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 pe=fe.getInstance(),Pr=(e,t)=>pe.emit(e,t),Lr=(e,t)=>pe.on(e,t),Mr=(e,t)=>pe.off(e,t),Wr=(e,t)=>pe.once(e,t),Dr=(e,t,r)=>pe.listen(e,t,r);function Ze(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 Ge=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:{}}},Qe={};async function wt(e){if(e.component)return e.component;if(e.load){if(Qe[e.path])return Qe[e.path];try{const t=await e.load();return Qe[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 vt(e){const{routes:t,base:r="",initialUrl:n}=e;let i,s,o,c,a,p,h;const b=async(y,v)=>{const l=t.find(d=>Q([d],y.path).route!==null);if(l?.beforeEnter)try{const d=await l.beforeEnter(y,v);return typeof d=="string"?(await f(d,!0),!1):d!==!1}catch(d){return ie("beforeEnter error",d),!1}return!0},g=async(y,v)=>{const l=t.find(d=>Q([d],y.path).route!==null);if(l?.onEnter)try{const d=await l.onEnter(y,v);return typeof d=="string"?(await f(d,!0),!1):d!==!1}catch(d){return ie("onEnter error",d),!1}return!0},u=(y,v)=>{const l=t.find(d=>Q([d],y.path).route!==null);if(l?.afterEnter)try{l.afterEnter(y,v)}catch(d){ie("afterEnter error",d)}},f=async(y,v=!1)=>{try{const l={path:y.replace(r,"")||"/",query:{}},d=Q(t,l.path);if(!d)throw new Error(`No route found for ${l.path}`);const w=o.getState(),k={path:l.path,params:d.params,query:l.query};if(!await b(k,w)||!await g(k,w))return;typeof window<"u"&&typeof document<"u"&&(v?window.history.replaceState({},"",r+y):window.history.pushState({},"",r+y)),o.setState(k),u(k,w)}catch(l){ie("Navigation error:",l)}};if(typeof window<"u"&&typeof document<"u"&&typeof n>"u"){i=()=>{const v=new URL(window.location.href),l=v.pathname.replace(r,"")||"/",d=Ge(v.search);return{path:l,query:d}},s=i();const y=Q(t,s.path);o=Ze({path:s.path,params:y.params,query:s.query}),c=async(v=!1)=>{const l=i();await f(l.path,v)},window.addEventListener("popstate",()=>c(!0)),a=v=>f(v,!1),p=v=>f(v,!0),h=()=>window.history.back()}else{i=()=>{const l=new URL(n||"/","http://localhost"),d=l.pathname.replace(r,"")||"/",w=Ge(l.search);return{path:d,query:w}},s=i();const y=Q(t,s.path);o=Ze({path:s.path,params:y.params,query:s.query}),c=async()=>{const l=i();await v(l.path)};const v=async l=>{try{const d={path:l.replace(r,"")||"/",query:{}},w=Q(t,d.path);if(!w)throw new Error(`No route found for ${d.path}`);const k=o.getState(),C={path:d.path,params:w.params,query:d.query},m=t.find($=>Q([$],C.path).route!==null);if(m?.beforeEnter)try{const $=await m.beforeEnter(C,k);if(typeof $=="string"){await v($);return}if($===!1)return}catch{return}if(m?.onEnter)try{const $=await m.onEnter(C,k);if(typeof $=="string"){await v($);return}if($===!1)return}catch{return}if(o.setState(C),m?.afterEnter)try{m.afterEnter(C,k)}catch{}}catch{}};a=async l=>v(l),p=async l=>v(l),h=()=>{}}return{store:o,push:a,replace:p,back:h,subscribe:o.subscribe,matchRoute:y=>Q(t,y),getCurrent:()=>o.getState(),resolveRouteComponent:wt}}function Ir(e,t){return Q(e,t)}function Nr(e){const t=vt(e);return Ke("router-view",(r={},n={})=>{const{onConnected:i}=n;if(i&&i(()=>{t&&typeof t.subscribe=="function"&&t.subscribe(()=>{})}),!t)return oe`<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(b=>typeof b=="string"?{tag:b,props:{},children:[]}:b)}return oe`<div>Invalid route component</div>`}).catch(()=>oe`<div>Invalid route component</div>`):oe`<div>Not found</div>`}),Ke("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:b=!1,external:g=!1,class:u=""}=r,f=t.getCurrent(),y=f.path===i,v=c?y:f&&typeof f.path=="string"?f.path.startsWith(i):!1,l=y?`aria-current="${h}"`:"",d=(u||"").split(/\s+/).filter(Boolean),w={};for(const x of d)w[x]=!0;const k={...w,[a]:v,[p]:y},C=s==="button",m=b?C?'disabled aria-disabled="true" tabindex="-1"':'aria-disabled="true" tabindex="-1"':"",$=g&&(s==="a"||!s)?'target="_blank" rel="noopener noreferrer"':"",A=x=>{if(b){x.preventDefault();return}g&&(s==="a"||!s)||(x.preventDefault(),o?t.replace(i):t.push(i))};return oe`
|
|
119
|
+
${yt().when(C,oe`
|
|
74
120
|
<button
|
|
75
121
|
part="button"
|
|
76
|
-
:class="${
|
|
77
|
-
${
|
|
78
|
-
${
|
|
122
|
+
:class="${k}"
|
|
123
|
+
${l}
|
|
124
|
+
${m}
|
|
79
125
|
${$}
|
|
80
|
-
@click="${
|
|
126
|
+
@click="${A}"
|
|
81
127
|
><slot></slot></button>
|
|
82
128
|
`).otherwise(oe`
|
|
83
129
|
<a
|
|
84
130
|
part="link"
|
|
85
131
|
href="${i}"
|
|
86
|
-
:class="${
|
|
87
|
-
${
|
|
88
|
-
${
|
|
132
|
+
:class="${k}"
|
|
133
|
+
${l}
|
|
134
|
+
${m}
|
|
89
135
|
${$}
|
|
90
|
-
@click="${
|
|
136
|
+
@click="${A}"
|
|
91
137
|
><slot></slot></a>
|
|
92
138
|
`).done()}
|
|
93
|
-
`}),t}S.GlobalEventBus=
|
|
139
|
+
`}),t}S.GlobalEventBus=fe,S.anchorBlock=M,S.component=Ke,S.computed=_t,S.createStore=Ze,S.css=ot,S.each=vr,S.eachGroup=Sr,S.eachPage=Ar,S.eachWhere=_r,S.emit=Pr,S.eventBus=pe,S.html=oe,S.initRouter=Nr,S.listen=Dr,S.match=yt,S.matchRoute=Q,S.matchRouteSSR=Ir,S.mediaVariants=Y,S.off=Mr,S.on=Lr,S.once=Wr,S.parseQuery=Ge,S.ref=Ct,S.renderToString=je,S.resolveRouteComponent=wt,S.responsive=bt,S.responsiveOrder=Je,S.responsiveSwitch=Tr,S.switchOn=Rr,S.switchOnLength=Er,S.switchOnPromise=Or,S.unless=$r,S.useEmit=cr,S.useOnAttributeChanged=fr,S.useOnConnected=lr,S.useOnDisconnected=ur,S.useOnError=dr,S.useRouter=vt,S.useStyle=hr,S.watch=Et,S.when=ke,S.whenEmpty=kr,S.whenMedia=q,S.whenNotEmpty=Cr,S.whenVariants=jr,Object.defineProperty(S,Symbol.toStringTag,{value:"Module"})}));
|
|
94
140
|
//# sourceMappingURL=custom-elements-runtime.umd.js.map
|