@jasonshimmy/custom-elements-runtime 0.2.6 → 0.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/custom-elements-runtime.cjs.js +12 -12
- package/dist/custom-elements-runtime.cjs.js.map +1 -1
- package/dist/custom-elements-runtime.es.js +991 -824
- package/dist/custom-elements-runtime.es.js.map +1 -1
- package/dist/custom-elements-runtime.umd.js +12 -12
- package/dist/custom-elements-runtime.umd.js.map +1 -1
- package/dist/runtime/template-compiler.d.ts +5 -3
- package/package.json +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});function Me(e,t){return ue(e?t:[],"when-block")}function We(e,t){return e.map((r,i)=>{const n=typeof r=="object"?r?.key??r?.id??`idx-${i}`:String(r);return ue(t(r,i),`each-${n}`)})}function Le(){const e=[];return{when(t,r){return e.push([t,r]),this},otherwise(t){return e.push([!0,t]),this},done(){return qe(...e)}}}function qe(...e){for(let t=0;t<e.length;t++){const[r,i]=e[t];if(r)return[ue(i,`whenChain-branch-${t}`)]}return[ue([],"whenChain-empty")]}function ue(e,t){const r=e?Array.isArray(e)?e.filter(Boolean):[e].filter(Boolean):[];return{tag:"#anchor",key:t,children:r}}class V extends EventTarget{handlers={};static instance;eventCounters=new Map;static getInstance(){return V.instance||(V.instance=new V),V.instance}emit(t,r){const i=Date.now(),n=this.eventCounters.get(t);if(!n||i-n.window>1e3)this.eventCounters.set(t,{count:1,window:i});else if(n.count++,n.count>50&&n.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(a){console.error(`Error in global event handler for "${t}":`,a)}})}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 i=this.handlers[t];i&&i.delete(r)}offAll(t){delete this.handlers[t]}listen(t,r,i){return this.addEventListener(t,r,i),()=>this.removeEventListener(t,r)}once(t,r){return new Promise(i=>{const n=this.on(t,s=>{n(),r(s),i(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,i]of this.eventCounters.entries())t[r]={count:i.count,handlersCount:this.getHandlerCount(r)};return t}resetEventCounters(){this.eventCounters.clear()}}const Q=V.getInstance(),De=(e,t)=>Q.emit(e,t),Ie=(e,t)=>Q.on(e,t),He=(e,t)=>Q.off(e,t),Fe=(e,t)=>Q.once(e,t),Ke=(e,t,r)=>Q.listen(e,t,r);function ve(e){let t={...e};const r=[];function i(a){r.push(a),a(t)}function n(){return t}function s(a){const f=typeof a=="function"?a(t):a;t={...t,...f},o()}function o(){r.forEach(a=>a(t))}return{subscribe:i,getState:n,setState:s}}function Z(e){return e.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase()}function F(e){return typeof e=="string"?e.replace(/[&<>"']/g,t=>({"&":"&","<":"<",">":">",'"':""","'":"'"})[t]):e}function z(e,t){return typeof t=="string"?t.split(".").reduce((r,i)=>r?.[i],e):t}function oe(e,t,r){const i=String(t).split("."),n=i.pop();if(!n)return;const s=i.reduce((o,a)=>(o[a]==null&&(o[a]={}),o[a]),e);s[n]=r}function Ue(e,t,r){if(r)for(const[i,n]of Object.entries(r)){let s,o={};if(Array.isArray(n)?(s=n[0],o=n[1]||{}):s=n,t.set(i,{callback:s,options:o,oldValue:z(e,i)}),o.immediate)try{const a=z(e,i);s(a,void 0,e)}catch(a){console.error(`Error in immediate watcher for "${i}":`,a)}}}function Ve(e,t,r,i){const n=(o,a)=>{if(o===a)return!0;if(typeof o!=typeof a||typeof o!="object"||o===null||a===null)return!1;if(Array.isArray(o)&&Array.isArray(a))return o.length!==a.length?!1:o.every((d,y)=>n(d,a[y]));const f=Object.keys(o),u=Object.keys(a);return f.length!==u.length?!1:f.every(d=>n(o[d],a[d]))},s=t.get(r);if(s&&!n(i,s.oldValue))try{s.callback(i,s.oldValue,e),s.oldValue=i}catch(o){console.error(`Error in watcher for "${r}":`,o)}for(const[o,a]of t.entries())if(a.options.deep&&r.startsWith(o+"."))try{const f=z(e,o);n(f,a.oldValue)||(a.callback(f,a.oldValue,e),a.oldValue=f)}catch(f){console.error(`Error in deep watcher for "${o}":`,f)}}function Je(e,t,r){if(!t.props)return;function i(n,s){return s===Boolean?n==="true":s===Number?Number(n):n}Object.entries(t.props).forEach(([n,s])=>{if(s.type===Function&&typeof e[n]=="function")r[n]=e[n];else{const o=e.getAttribute(Z(n));o!==null?r[n]=F(i(o,s.type)):"default"in s&&s.default!==void 0&&(r[n]=F(s.default))}})}function Ze(e,t,r,i){e.onConnected&&!r&&(e.onConnected(t),i(!0))}function Ge(e,t,r,i,n,s,o,a){e.onDisconnected&&e.onDisconnected(t),r.forEach(f=>f()),i(),n(),s(!1),o(null),a(!1)}function Ye(e,t,r,i,n){e.onAttributeChanged&&e.onAttributeChanged(t,r,i,n)}function J(e,t){if(t&&e instanceof HTMLElement){for(const r in t)t[r]===e&&delete t[r];for(const r of Array.from(e.childNodes))J(r,t)}}function Qe(e,t,r,i,n,s,o,a){if(!s)return;const f=t.includes("lazy"),u=t.includes("trim"),d=t.includes("number"),y=()=>z(s._state||s,e),c=y();let h="text";o instanceof HTMLInputElement?h=i?.type||o.type||"text":o instanceof HTMLSelectElement?h="select":o instanceof HTMLTextAreaElement&&(h="textarea");const k=o instanceof HTMLInputElement||o instanceof HTMLTextAreaElement||o instanceof HTMLSelectElement,w=k?h==="checkbox"||h==="radio"?"checked":"value":a??"modelValue";if(h==="checkbox")if(Array.isArray(c))r[w]=c.includes(String(o?.getAttribute("value")??i?.value??""));else{const x=o?.getAttribute("true-value")??!0;r[w]=c===x}else if(h==="radio")r[w]=c===(i?.value??"");else if(h==="select")if(o&&o.hasAttribute("multiple")&&o instanceof HTMLSelectElement){const x=Array.isArray(c)?c.map(String):[];setTimeout(()=>{Array.from(o.options).forEach(l=>{l.selected=x.includes(l.value)})},0),r[w]=Array.isArray(c)?c:[]}else r[w]=c;else{r[w]=c;try{const x=Z(w);i&&(i[x]=c)}catch{}}const b=f||h==="checkbox"||h==="radio"||h==="select"?"change":"input",m=x=>{if(x.isComposing||n._isComposing||x.isTrusted===!1)return;const l=x.target;if(!l||l._modelUpdating)return;let g=l.value;if(h==="checkbox"){const E=y();if(Array.isArray(E)){const S=l.getAttribute("value")??"",A=Array.from(E);if(l.checked)A.includes(S)||A.push(S);else{const T=A.indexOf(S);T>-1&&A.splice(T,1)}g=A}else{const S=l.getAttribute("true-value")??!0,A=l.getAttribute("false-value")??!1;g=l.checked?S:A}}else if(h==="radio")g=l.getAttribute("value")??l.value;else if(h==="select"&&l.multiple)g=Array.from(l.selectedOptions).map(E=>E.value);else if(u&&typeof g=="string"&&(g=g.trim()),d){const E=Number(g);isNaN(E)||(g=E)}const p=s._state||s,_=z(p,e);if(Array.isArray(g)&&Array.isArray(_)?JSON.stringify([...g].sort())!==JSON.stringify([..._].sort()):g!==_){l._modelUpdating=!0;try{oe(p,e,g),s._requestRender&&s._requestRender()}finally{setTimeout(()=>l._modelUpdating=!1,0)}}};k?n[b]=m:n[`update:${Z(w)}`]=x=>{const l=s._state||s,g=x.detail!==void 0?x.detail:x.target?.value,p=z(l,e);(Array.isArray(g)&&Array.isArray(p)?JSON.stringify([...g].sort())!==JSON.stringify([...p].sort()):g!==p)&&(oe(l,e,g),s._requestRender&&s._requestRender())},(h==="text"||h==="textarea")&&(n.compositionstart=(()=>n._isComposing=!0),n.compositionend=x=>{n._isComposing=!1;const l=x.target;l&&setTimeout(()=>{const g=l.value,p=s._state||s,_=z(p,e);let C=g;if(u&&(C=C.trim()),d){const S=Number(C);isNaN(S)||(C=S)}if(Array.isArray(C)&&Array.isArray(_)?JSON.stringify([...C].sort())!==JSON.stringify([..._].sort()):C!==_){l._modelUpdating=!0;try{oe(p,e,C),s._requestRender&&s._requestRender()}finally{setTimeout(()=>l._modelUpdating=!1,0)}}},0)})}function Be(e){const t=e.slice(2);return t?t.charAt(0).toLowerCase()+t.slice(1):""}function Xe(e,t,r,i){if(i){if(typeof e=="object"&&e!==null)for(const[n,s]of Object.entries(e))t[n]=s;else if(typeof e=="string")try{const n=JSON.parse(e);if(typeof n=="object"&&n!==null){for(const[s,o]of Object.entries(n))t[s]=o;return}}catch{const n=z(i,e);r[e]=n}}}function et(e,t,r){if(!r)return;const i=z(r,e),n=t.style||"",s=i?"":"none";if(n){const o=n.split(";").filter(Boolean),a=o.findIndex(f=>f.trim().startsWith("display:"));a>=0?o[a]=`display: ${s}`:o.push(`display: ${s}`),t.style=o.join("; ")}else t.style=`display: ${s}`}function tt(e,t,r){if(!r)return;const i=z(r,e);let n=[];typeof i=="string"?n=[i]:Array.isArray(i)?n=i.filter(Boolean):typeof i=="object"&&(n=Object.entries(i).filter(([,a])=>!!a).flatMap(([a])=>a.split(/\s+/).filter(Boolean)));const s=t.class||"",o=s?`${s} ${n.join(" ")}`.trim():n.join(" ");o&&(t.class=o)}function rt(e,t,r){let i;if(typeof e=="string"){if(!r)return;i=z(r,e)}else i=e;let n="";if(typeof i=="string")n=i;else if(i&&typeof i=="object"){const o=[];for(const[a,f]of Object.entries(i))if(f!=null&&f!==""){const u=a.replace(/[A-Z]/g,c=>`-${c.toLowerCase()}`),d=["width","height","top","right","bottom","left","margin","margin-top","margin-right","margin-bottom","margin-left","padding","padding-top","padding-right","padding-bottom","padding-left","font-size","line-height","border-width","border-radius","min-width","max-width","min-height","max-height"];let y=String(f);typeof f=="number"&&d.includes(u)&&(y=`${f}px`),o.push(`${u}: ${y}`)}n=o.join("; ")+(o.length>0?";":"")}const s=t.style||"";t.style=s+(s&&!s.endsWith(";")?"; ":"")+n}function Oe(e,t,r,i){const n={},s={...i||{}},o={};for(const[a,f]of Object.entries(e)){const{value:u,modifiers:d,arg:y}=f;if(a==="model"||a.startsWith("model:")){const c=a.split(":"),h=c.length>1?c[1]:y;Qe(typeof u=="string"?u:String(u),d,n,s,o,t,r,h);continue}switch(a){case"bind":Xe(u,n,s,t);break;case"show":et(u,s,t);break;case"class":tt(u,s,t);break;case"style":rt(u,s,t);break}}return{props:n,attrs:s,listeners:o}}function $e(e,t){if(Array.isArray(e)){const s=new Set;return e.map(o=>{if(!o||typeof o!="object")return o;let a=o.props?.key??o.key;if(!a){const y=o.tag||"node",c=o.props?.attrs?.id??o.props?.attrs?.name??o.props?.attrs?.["data-key"]??"";a=c?`${t}:${y}:${c}`:`${t}:${y}`}let f=a,u=1;for(;s.has(f);)f=`${a}#${u++}`;s.add(f);let d=o.children;return Array.isArray(d)&&(d=$e(d,f)),{...o,key:f,children:d}})}const r=e;let i=r.props?.key??r.key??t,n=r.children;return Array.isArray(n)&&(n=$e(n,i)),{...r,key:i,children:n}}function nt(e,t,r,i){const n=r.directives??{},s=Oe(n,i,e,r.attrs),o={...t.props,...r.props,...s.props},a={...t.attrs,...r.attrs,...s.attrs},f=t.props??{},u=o;for(const c in{...f,...u}){const h=f[c],k=u[c];if(h!==k){if(c==="value"&&(e instanceof HTMLInputElement||e instanceof HTMLTextAreaElement||e instanceof HTMLSelectElement))e.value!==k&&(e.value=k??"");else if(c==="checked"&&e instanceof HTMLInputElement)e.checked=!!k;else if(c.startsWith("on")&&typeof k=="function"){const $=Be(c);typeof h=="function"&&e.removeEventListener($,h),e.addEventListener($,k)}else if(k==null||k===!1)e.removeAttribute(c);else if((r?.isCustomElement??t?.isCustomElement??!1)||c in e)try{e[c]=k}catch{}}}for(const[c,h]of Object.entries(s.listeners||{}))e.addEventListener(c,h);const d=t.attrs??{},y=a;for(const c in{...d,...y}){const h=d[c],k=y[c];h!==k&&(k==null||k===!1?e.removeAttribute(c):e.setAttribute(c,String(k)))}}function M(e,t,r){if(typeof e=="string")return document.createTextNode(e);if(e.tag==="#text"){const y=document.createTextNode(typeof e.children=="string"?e.children:"");return e.key!=null&&(y.key=e.key),y}if(e.tag==="#anchor"){const y=e,c=Array.isArray(y.children)?y.children:[],h=document.createTextNode(""),k=document.createTextNode("");y.key!=null&&(h.key=`${y.key}:start`,k.key=`${y.key}:end`),y._startNode=h,y._endNode=k;const $=document.createDocumentFragment();$.appendChild(h);for(const w of c){const b=M(w,t);$.appendChild(b)}return $.appendChild(k),$}const i=document.createElement(e.tag);e.key!=null&&(i.key=e.key);const{props:n={},attrs:s={},directives:o={}}=e.props??{},a=Oe(o,t,i,s),f={...n,...a.props},u={...s,...a.attrs};for(const y in u){const c=u[y];typeof y!="string"||/\[object Object\]/.test(y)||(typeof c=="boolean"?c&&i.setAttribute(y,""):c!=null&&i.setAttribute(y,c))}for(const y in f){const c=f[y];if(!(typeof y!="string"||/\[object Object\]/.test(y)))if(y==="value"&&(i instanceof HTMLInputElement||i instanceof HTMLTextAreaElement||i instanceof HTMLSelectElement))i.value=c??"";else if(y==="checked"&&i instanceof HTMLInputElement)i.checked=!!c;else if(y.startsWith("on")&&typeof c=="function")i.addEventListener(Be(y),c);else{if(y.startsWith("on")&&c===void 0)continue;if(c==null||c===!1)i.removeAttribute(y);else if((e.props?.isCustomElement??!1)||y in i)try{i[y]=c}catch{}}}for(const[y,c]of Object.entries(a.listeners||{}))i.addEventListener(y,c);const d=e.props?.ref??(e.props?.props&&e.props.props.ref);typeof e!="string"&&d&&r&&(r[d]=i);try{if(typeof i._applyProps=="function")try{i._applyProps(i._cfg)}catch{}typeof i.requestRender=="function"?i.requestRender():typeof i._render=="function"&&i._render(i._cfg)}catch{}if(Array.isArray(e.children))for(const y of e.children)i.appendChild(M(y,t,r));else typeof e.children=="string"&&(i.textContent=e.children);return i}function it(e,t,r,i,n){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:[],a=new Map;for(const h of o)h&&h.key!=null&&a.set(h.key,h);const f=new Map;for(const h of s){const k=h.key;k!=null&&f.set(k,h)}const u=new Set;let d=e.firstChild;function y(h,k){let $=h;for(;$&&(u.add($),$!==k);)$=$.nextSibling}function c(h,k,$,w){const b=[];let m=h.nextSibling;for(;m&&m!==k;)b.push(m),m=m.nextSibling;const x=Array.isArray($)?$:[];if(w.some(g=>g&&g.key!=null)||x.some(g=>g&&g.key!=null)){const g=new Map,p=new Map;for(const E of x)E&&E.key!=null&&g.set(E.key,E);for(const E of b){const S=E.key;S!=null&&p.set(S,E)}const _=new Set;let C=h.nextSibling;for(const E of w){let S;if(E.key!=null&&p.has(E.key)){const A=g.get(E.key);S=ae(p.get(E.key),A,E,i),_.add(S),S!==C&&e.contains(S)&&e.insertBefore(S,C)}else S=M(E,i),e.insertBefore(S,C),_.add(S);C=S.nextSibling}for(const E of b)!_.has(E)&&e.contains(E)&&e.removeChild(E)}else{const g=Math.min(x.length,w.length);for(let p=0;p<g;p++){const _=x[p],C=w[p],E=ae(b[p],_,C,i);E!==b[p]&&(e.insertBefore(E,b[p]),e.removeChild(b[p]))}for(let p=g;p<w.length;p++)e.insertBefore(M(w[p],i),k);for(let p=g;p<b.length;p++)e.removeChild(b[p])}}for(const h of r){let k;if(h.tag==="#anchor"){const $=h.key,w=`${$}:start`,b=`${$}:end`;let m=f.get(w),x=f.get(b);const l=Array.isArray(h.children)?h.children:[];if(m||(m=document.createTextNode(""),m.key=w),x||(x=document.createTextNode(""),x.key=b),h._startNode=m,h._endNode=x,!e.contains(m)||!e.contains(x)){e.insertBefore(m,d);for(const g of l)e.insertBefore(M(g,i),d);e.insertBefore(x,d)}else c(m,x,a.get($)?.children,l);y(m,x),d=x.nextSibling;continue}if(h.key!=null&&f.has(h.key)){const $=a.get(h.key);k=ae(f.get(h.key),$,h,i,n),u.add(k),k!==d&&e.contains(k)&&(d&&!e.contains(d)&&(d=null),e.insertBefore(k,d))}else k=M(h,i,n),d&&!e.contains(d)&&(d=null),e.insertBefore(k,d),u.add(k);d=k.nextSibling}for(const h of s)!u.has(h)&&e.contains(h)&&(J(h,n),e.removeChild(h))}function ae(e,t,r,i,n){if(t&&typeof t!="string"&&t.props?.ref&&n&&J(e,n),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,a=Array.isArray(o.children)?o.children:[],f=o._startNode??document.createTextNode(""),u=o._endNode??document.createTextNode("");o.key!=null&&(f.key=`${o.key}:start`,u.key=`${o.key}:end`),o._startNode=f,o._endNode=u;const d=document.createDocumentFragment();d.appendChild(f);for(const y of a){const c=M(y,i);d.appendChild(c)}return d.appendChild(u),e.parentNode?.replaceChild(d,e),f}if(!r){J(e,n);const o=document.createComment("removed");return e.parentNode?.replaceChild(o,e),o}if(!t||typeof t=="string"){J(e,n);const o=M(r,i,n);return typeof r!="string"&&r.props?.ref&&n&&(n[r.props.ref]=o),e.parentNode?.replaceChild(o,e),o}if(r.tag==="#anchor"){const o=Array.isArray(r.children)?r.children:[],a=r._startNode??document.createTextNode(""),f=r._endNode??document.createTextNode("");r.key!=null&&(a.key=`${r.key}:start`,f.key=`${r.key}:end`),r._startNode=a,r._endNode=f;const u=document.createDocumentFragment();u.appendChild(a);for(const d of o)u.appendChild(M(d,i));return u.appendChild(f),e.parentNode?.replaceChild(u,e),a}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||{},i),it(o,t.children,r.children,i,n),typeof r!="string"&&r.props?.ref&&n&&(n[r.props.ref]=o),o}J(e,n);const s=M(r,i,n);return typeof r!="string"&&r.props?.ref&&n&&(n[r.props.ref]=s),e.parentNode?.replaceChild(s,e),s}function st(e,t,r,i){let n;Array.isArray(t)?t.length===1?(n=t[0],n&&typeof n=="object"&&n.key==null&&(n={...n,key:"__root__"})):n={tag:"div",key:"__root__",children:t}:(n=t,n&&typeof n=="object"&&n.key==null&&(n={...n,key:"__root__"})),n&&typeof n=="object"&&n.tag==="#anchor"&&(n={tag:"div",key:"__anchor_root__",props:{attrs:{"data-anchor-block-root":"",key:"__anchor_root__"}},children:[n]}),n=$e(n,String(n.key??"root"));const s=e._prevVNode??null,o=e._prevDom??e.firstChild??null;let a;s&&o?typeof s!="string"&&typeof n!="string"&&s.tag===n.tag&&s.key===n.key?a=ae(o,s,n,r,i):(a=M(n,r,i),e.replaceChild(a,o)):(a=M(n,r,i),e.firstChild?e.replaceChild(a,e.firstChild):e.appendChild(a));const f=[];for(let u=0;u<e.childNodes.length;u++){const d=e.childNodes[u];d!==a&&d.nodeName!=="STYLE"&&(J(d,i),f.push(d))}f.forEach(u=>e.removeChild(u)),e._prevVNode=n,e._prevDom=a}function ce(e){if(typeof e=="string")return F(e);if(e.tag==="#text")return typeof e.children=="string"?F(e.children):"";if(e.tag==="#anchor")return(Array.isArray(e.children)?e.children.filter(Boolean):[]).map(ce).join("");let t="";e.props&&e.props.attrs&&(t=Object.entries(e.props.attrs).map(([n,s])=>` ${n}="${F(String(s))}"`).join(""));let r="";e.props&&(r=Object.entries(e.props).filter(([n])=>n!=="attrs"&&n!=="directives"&&n!=="ref"&&n!=="key").map(([n,s])=>` ${n}="${F(String(s))}"`).join(""));const i=Array.isArray(e.children)?e.children.filter(Boolean).map(ce).join(""):typeof e.children=="string"?F(e.children):e.children?ce(e.children):"";return`<${e.tag}${t}${r}>${i}</${e.tag}>`}function Ee(e,...t){let r="";for(let i=0;i<e.length;i++)r+=e[i],i<t.length&&(r+=t[i]);return r}function Pe(e){return e.replace(/\/\*[\s\S]*?\*\//g,"").replace(/\s+/g," ").replace(/\s*([{}:;,>+~])\s*/g,"$1").replace(/;}/g,"}").trim()}let ie=null;function Ce(){return ie||(ie=new CSSStyleSheet,ie.replaceSync(Pe(at))),ie}function ot(e){return e.replace(/url\s*\(\s*['"]?javascript:[^)]*\)/gi,"").replace(/<script[\s\S]*?>[\s\S]*?<\/script>/gi,"").replace(/expression\s*\([^)]*\)/gi,"")}const at=Ee`
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});function Ie(e,t){return de(e?t:[],"when-block")}function Ne(e,t){return e.map((r,i)=>{const n=typeof r=="object"?r?.key??r?.id??`idx-${i}`:String(r);return de(t(r,i),`each-${n}`)})}function Oe(){const e=[];return{when(t,r){return e.push([t,r]),this},otherwise(t){return e.push([!0,t]),this},done(){return We(...e)}}}function We(...e){for(let t=0;t<e.length;t++){const[r,i]=e[t];if(r)return[de(i,`whenChain-branch-${t}`)]}return[de([],"whenChain-empty")]}function de(e,t){const r=e?Array.isArray(e)?e.filter(Boolean):[e].filter(Boolean):[];return{tag:"#anchor",key:t,children:r}}class V extends EventTarget{handlers={};static instance;eventCounters=new Map;static getInstance(){return V.instance||(V.instance=new V),V.instance}emit(t,r){const i=Date.now(),n=this.eventCounters.get(t);if(!n||i-n.window>1e3)this.eventCounters.set(t,{count:1,window:i});else if(n.count++,n.count>50&&n.count>100)return;this.dispatchEvent(new CustomEvent(t,{detail:r,bubbles:!1,cancelable:!0}));const o=this.handlers[t];o&&o.forEach(s=>{try{s(r)}catch(a){console.error(`Error in global event handler for "${t}":`,a)}})}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 i=this.handlers[t];i&&i.delete(r)}offAll(t){delete this.handlers[t]}listen(t,r,i){return this.addEventListener(t,r,i),()=>this.removeEventListener(t,r)}once(t,r){return new Promise(i=>{const n=this.on(t,o=>{n(),r(o),i(o)})})}getActiveEvents(){return Object.keys(this.handlers).filter(t=>this.handlers[t]&&this.handlers[t].size>0)}clear(){this.handlers={}}getHandlerCount(t){return this.handlers[t]?.size||0}getEventStats(){const t={};for(const[r,i]of this.eventCounters.entries())t[r]={count:i.count,handlersCount:this.getHandlerCount(r)};return t}resetEventCounters(){this.eventCounters.clear()}}const ee=V.getInstance(),De=(e,t)=>ee.emit(e,t),Ue=(e,t)=>ee.on(e,t),Fe=(e,t)=>ee.off(e,t),Ke=(e,t)=>ee.once(e,t),Je=(e,t,r)=>ee.listen(e,t,r);function Se(e){let t={...e};const r=[];function i(a){r.push(a),a(t)}function n(){return t}function o(a){const f=typeof a=="function"?a(t):a;t={...t,...f},s()}function s(){r.forEach(a=>a(t))}return{subscribe:i,getState:n,setState:o}}function Q(e){return e.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase()}function J(e){return typeof e=="string"?e.replace(/[&<>"']/g,t=>({"&":"&","<":"<",">":">",'"':""","'":"'"})[t]):e}function W(e,t){return typeof t=="string"?t.split(".").reduce((r,i)=>r?.[i],e):t}function ce(e,t,r){const i=String(t).split("."),n=i.pop();if(!n)return;const o=i.reduce((s,a)=>(s[a]==null&&(s[a]={}),s[a]),e);o[n]=r}function Ge(e,t,r){if(r)for(const[i,n]of Object.entries(r)){let o,s={};if(Array.isArray(n)?(o=n[0],s=n[1]||{}):o=n,t.set(i,{callback:o,options:s,oldValue:W(e,i)}),s.immediate)try{const a=W(e,i);o(a,void 0,e)}catch(a){console.error(`Error in immediate watcher for "${i}":`,a)}}}function Ze(e,t,r,i){const n=(s,a)=>{if(s===a)return!0;if(typeof s!=typeof a||typeof s!="object"||s===null||a===null)return!1;if(Array.isArray(s)&&Array.isArray(a))return s.length!==a.length?!1:s.every((h,C)=>n(h,a[C]));const f=Object.keys(s),p=Object.keys(a);return f.length!==p.length?!1:f.every(h=>n(s[h],a[h]))},o=t.get(r);if(o&&!n(i,o.oldValue))try{o.callback(i,o.oldValue,e),o.oldValue=i}catch(s){console.error(`Error in watcher for "${r}":`,s)}for(const[s,a]of t.entries())if(a.options.deep&&r.startsWith(s+"."))try{const f=W(e,s);n(f,a.oldValue)||(a.callback(f,a.oldValue,e),a.oldValue=f)}catch(f){console.error(`Error in deep watcher for "${s}":`,f)}}function Ve(e,t,r){if(!t.props)return;function i(n,o){return o===Boolean?n==="true":o===Number?Number(n):n}Object.entries(t.props).forEach(([n,o])=>{if(o.type===Function&&typeof e[n]=="function")r[n]=e[n];else{const s=Q(n),a=e.getAttribute(s);if(typeof e[n]<"u")try{r[n]=J(i(e[n],o.type))}catch{r[n]=e[n]}else a!==null?r[n]=J(i(a,o.type)):"default"in o&&o.default!==void 0&&(r[n]=J(o.default))}})}function Ye(e,t,r,i){e.onConnected&&!r&&(e.onConnected(t),i(!0))}function Qe(e,t,r,i,n,o,s,a){e.onDisconnected&&e.onDisconnected(t),r.forEach(f=>f()),i(),n(),o(!1),s(null),a(!1)}function Xe(e,t,r,i,n){e.onAttributeChanged&&e.onAttributeChanged(t,r,i,n)}function Y(e,t){if(t&&e instanceof HTMLElement){for(const r in t)t[r]===e&&delete t[r];for(const r of Array.from(e.childNodes))Y(r,t)}}function et(e,t,r,i,n,o,s,a){if(!o)return;const f=t.includes("lazy"),p=t.includes("trim"),h=t.includes("number"),C=()=>W(o._state||o,e),u=C();let c="text";s instanceof HTMLInputElement?c=i?.type||s.type||"text":s instanceof HTMLSelectElement?c="select":s instanceof HTMLTextAreaElement&&(c="textarea");const w=s instanceof HTMLInputElement||s instanceof HTMLTextAreaElement||s instanceof HTMLSelectElement,d=w?c==="checkbox"||c==="radio"?"checked":"value":a??"modelValue";if(c==="checkbox")if(Array.isArray(u))r[d]=u.includes(String(s?.getAttribute("value")??i?.value??""));else{const x=s?.getAttribute("true-value")??!0;r[d]=u===x}else if(c==="radio")r[d]=u===(i?.value??"");else if(c==="select")if(s&&s.hasAttribute("multiple")&&s instanceof HTMLSelectElement){const x=Array.isArray(u)?u.map(String):[];setTimeout(()=>{Array.from(s.options).forEach(l=>{l.selected=x.includes(l.value)})},0),r[d]=Array.isArray(u)?u:[]}else r[d]=u;else{r[d]=u;try{const x=Q(d);i&&(i[x]=u)}catch{}}const g=f||c==="checkbox"||c==="radio"||c==="select"?"change":"input",m=x=>{if(x.isComposing||n._isComposing||x.isTrusted===!1)return;const l=x.target;if(!l||l._modelUpdating)return;let b=l.value;if(c==="checkbox"){const $=C();if(Array.isArray($)){const A=l.getAttribute("value")??"",_=Array.from($);if(l.checked)_.includes(A)||_.push(A);else{const T=_.indexOf(A);T>-1&&_.splice(T,1)}b=_}else{const A=l.getAttribute("true-value")??!0,_=l.getAttribute("false-value")??!1;b=l.checked?A:_}}else if(c==="radio")b=l.getAttribute("value")??l.value;else if(c==="select"&&l.multiple)b=Array.from(l.selectedOptions).map($=>$.value);else if(p&&typeof b=="string"&&(b=b.trim()),h){const $=Number(b);isNaN($)||(b=$)}const y=o._state||o,S=W(y,e);if(Array.isArray(b)&&Array.isArray(S)?JSON.stringify([...b].sort())!==JSON.stringify([...S].sort()):b!==S){l._modelUpdating=!0;try{ce(y,e,b),o._requestRender&&o._requestRender()}finally{setTimeout(()=>l._modelUpdating=!1,0)}}};w?n[g]=m:n[`update:${Q(d)}`]=x=>{const l=o._state||o,b=x.detail!==void 0?x.detail:x.target?.value,y=W(l,e);(Array.isArray(b)&&Array.isArray(y)?JSON.stringify([...b].sort())!==JSON.stringify([...y].sort()):b!==y)&&(ce(l,e,b),o._requestRender&&o._requestRender())},(c==="text"||c==="textarea")&&(n.compositionstart=(()=>n._isComposing=!0),n.compositionend=x=>{n._isComposing=!1;const l=x.target;l&&setTimeout(()=>{const b=l.value,y=o._state||o,S=W(y,e);let E=b;if(p&&(E=E.trim()),h){const A=Number(E);isNaN(A)||(E=A)}if(Array.isArray(E)&&Array.isArray(S)?JSON.stringify([...E].sort())!==JSON.stringify([...S].sort()):E!==S){l._modelUpdating=!0;try{ce(y,e,E),o._requestRender&&o._requestRender()}finally{setTimeout(()=>l._modelUpdating=!1,0)}}},0)})}function Pe(e){const t=e.slice(2);return t?t.charAt(0).toLowerCase()+t.slice(1):""}function tt(e,t,r,i){if(i){if(typeof e=="object"&&e!==null)for(const[n,o]of Object.entries(e))t[n]=o;else if(typeof e=="string")try{const n=JSON.parse(e);if(typeof n=="object"&&n!==null){for(const[o,s]of Object.entries(n))t[o]=s;return}}catch{const n=W(i,e);r[e]=n}}}function rt(e,t,r){if(!r)return;const i=W(r,e),n=t.style||"",o=i?"":"none";if(n){const s=n.split(";").filter(Boolean),a=s.findIndex(f=>f.trim().startsWith("display:"));a>=0?s[a]=`display: ${o}`:s.push(`display: ${o}`),t.style=s.join("; ")}else t.style=`display: ${o}`}function nt(e,t,r){if(!r)return;const i=W(r,e);let n=[];typeof i=="string"?n=[i]:Array.isArray(i)?n=i.filter(Boolean):typeof i=="object"&&(n=Object.entries(i).filter(([,a])=>!!a).flatMap(([a])=>a.split(/\s+/).filter(Boolean)));const o=t.class||"",s=o?`${o} ${n.join(" ")}`.trim():n.join(" ");s&&(t.class=s)}function it(e,t,r){let i;if(typeof e=="string"){if(!r)return;i=W(r,e)}else i=e;let n="";if(typeof i=="string")n=i;else if(i&&typeof i=="object"){const s=[];for(const[a,f]of Object.entries(i))if(f!=null&&f!==""){const p=a.replace(/[A-Z]/g,u=>`-${u.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 C=String(f);typeof f=="number"&&h.includes(p)&&(C=`${f}px`),s.push(`${p}: ${C}`)}n=s.join("; ")+(s.length>0?";":"")}const o=t.style||"";t.style=o+(o&&!o.endsWith(";")?"; ":"")+n}function Be(e,t,r,i){const n={},o={...i||{}},s={};for(const[a,f]of Object.entries(e)){const{value:p,modifiers:h,arg:C}=f;if(a==="model"||a.startsWith("model:")){const u=a.split(":"),c=u.length>1?u[1]:C;et(typeof p=="string"?p:String(p),h,n,o,s,t,r,c);continue}switch(a){case"bind":tt(p,n,o,t);break;case"show":rt(p,o,t);break;case"class":nt(p,o,t);break;case"style":it(p,o,t);break}}return{props:n,attrs:o,listeners:s}}function _e(e,t){if(Array.isArray(e)){const o=new Set;return e.map(s=>{if(!s||typeof s!="object")return s;let a=s.props?.key??s.key;if(!a){const C=s.tag||"node",c=[s.props?.attrs?.id,s.props?.attrs?.name,s.props?.attrs?.["data-key"],s.props?.props?.id,s.props?.props?.name,s.props?.props?.dataKey,s.props?.props?.["data-key"]].find(w=>w!=null)??"";a=c?`${t}:${C}:${c}`:`${t}:${C}`}let f=a,p=1;for(;o.has(f);)f=`${a}#${p++}`;o.add(f);let h=s.children;return Array.isArray(h)&&(h=_e(h,f)),{...s,key:f,children:h}})}const r=e;let i=r.props?.key??r.key??t,n=r.children;return Array.isArray(n)&&(n=_e(n,i)),{...r,key:i,children:n}}function Ae(e,t,r,i){const n=r.directives??{},o=Be(n,i,e,r.attrs),s={...t.props,...r.props,...o.props},a={...t.attrs,...r.attrs,...o.attrs},f=t.props??{},p=s,h=r?.isCustomElement??t?.isCustomElement??!1;let C=!1;for(const w in{...f,...p}){const v=f[w],d=p[w];if(v!==d){if(C=!0,w==="value"&&(e instanceof HTMLInputElement||e instanceof HTMLTextAreaElement||e instanceof HTMLSelectElement))e.value!==d&&(e.value=d??"");else if(w==="checked"&&e instanceof HTMLInputElement)e.checked=!!d;else if(w.startsWith("on")&&typeof d=="function"){const g=Pe(w);typeof v=="function"&&e.removeEventListener(g,v),e.addEventListener(g,d)}else if(d==null||d===!1)e.removeAttribute(w);else if((r?.isCustomElement??t?.isCustomElement??!1)||w in e)try{e[w]=d}catch{}}}for(const[w,v]of Object.entries(o.listeners||{}))e.addEventListener(w,v);const u=t.attrs??{},c=a;for(const w in{...u,...c}){const v=u[w],d=c[w];if(v!==d)if(C=!0,d==null||d===!1){if(e.removeAttribute(w),w==="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(w==="checked"&&e instanceof HTMLInputElement)try{e.checked=!1}catch{}if(w==="disabled")try{e.disabled=!1}catch{}}else{if(w==="value"){if(e instanceof HTMLInputElement||e instanceof HTMLTextAreaElement){try{e.value=d??""}catch{e.setAttribute(w,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(w==="checked"&&e instanceof HTMLInputElement){try{e.checked=!!d}catch{}continue}if(!(e.namespaceURI==="http://www.w3.org/2000/svg")&&w in e)try{e[w]=d}catch{e.setAttribute(w,String(d))}else e.setAttribute(w,String(d))}}if(h&&C)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 D(e,t,r){if(typeof e=="string")return document.createTextNode(e);if(e.tag==="#text"){const u=document.createTextNode(typeof e.children=="string"?e.children:"");return e.key!=null&&(u.key=e.key),u}if(e.tag==="#anchor"){const u=e,c=Array.isArray(u.children)?u.children:[],w=document.createTextNode(""),v=document.createTextNode("");u.key!=null&&(w.key=`${u.key}:start`,v.key=`${u.key}:end`),u._startNode=w,u._endNode=v;const d=document.createDocumentFragment();d.appendChild(w);for(const g of c){const m=D(g,t);d.appendChild(m)}return d.appendChild(v),d}const i=document.createElement(e.tag);e.key!=null&&(i.key=e.key);const{props:n={},attrs:o={},directives:s={}}=e.props??{},a=Be(s,t,i,o),f={...n,...a.props},p={...o,...a.attrs},h=i.namespaceURI==="http://www.w3.org/2000/svg";for(const u in p){const c=p[u];if(!(typeof u!="string"||/\[object Object\]/.test(u))){if(typeof c=="boolean")c&&i.setAttribute(u,"");else if(c!=null)if(!h&&u==="value"&&(i instanceof HTMLInputElement||i instanceof HTMLTextAreaElement||i instanceof HTMLSelectElement||i instanceof HTMLProgressElement))try{i instanceof HTMLProgressElement?i.value=Number(c):i.value=c??""}catch{i.setAttribute(u,String(c))}else if(!h&&u==="checked"&&i instanceof HTMLInputElement)try{i.checked=!!c}catch{i.setAttribute(u,String(c))}else if(!h&&u in i)try{i[u]=c}catch{i.setAttribute(u,String(c))}else i.setAttribute(u,String(c))}}for(const u in f){const c=f[u];if(!(typeof u!="string"||/\[object Object\]/.test(u)))if(u==="value"&&(i instanceof HTMLInputElement||i instanceof HTMLTextAreaElement||i instanceof HTMLSelectElement))i.value=c??"";else if(u==="checked"&&i instanceof HTMLInputElement)i.checked=!!c;else if(u.startsWith("on")&&typeof c=="function")i.addEventListener(Pe(u),c);else{if(u.startsWith("on")&&c===void 0)continue;if(c==null||c===!1)i.removeAttribute(u);else if((e.props?.isCustomElement??!1)||u in i)try{i[u]=c}catch{}}}for(const[u,c]of Object.entries(a.listeners||{}))i.addEventListener(u,c);const C=e.props?.ref??(e.props?.props&&e.props.props.ref);typeof e!="string"&&C&&r&&(r[C]=i);try{if(typeof i._applyProps=="function")try{i._applyProps(i._cfg)}catch{}typeof i.requestRender=="function"?i.requestRender():typeof i._render=="function"&&i._render(i._cfg)}catch{}if(Array.isArray(e.children))for(const u of e.children)i.appendChild(D(u,t,r));else typeof e.children=="string"&&(i.textContent=e.children);try{if(i instanceof HTMLSelectElement&&p&&p.hasOwnProperty("value"))try{i.value=p.value??""}catch{}}catch{}return i}function st(e,t,r,i,n){if(typeof r=="string"){e.textContent!==r&&(e.textContent=r);return}if(!Array.isArray(r))return;const o=Array.from(e.childNodes),s=Array.isArray(t)?t:[],a=new Map;for(const c of s)c&&c.key!=null&&a.set(c.key,c);const f=new Map;for(const c of o){const w=c.key;w!=null&&f.set(w,c)}const p=new Set;let h=e.firstChild;function C(c,w){let v=c;for(;v&&(p.add(v),v!==w);)v=v.nextSibling}function u(c,w,v,d){const g=[];let m=c.nextSibling;for(;m&&m!==w;)g.push(m),m=m.nextSibling;const x=Array.isArray(v)?v:[];if(d.some(b=>b&&b.key!=null)||x.some(b=>b&&b.key!=null)){const b=new Map,y=new Map;for(const $ of x)$&&$.key!=null&&b.set($.key,$);for(const $ of g){const A=$.key;A!=null&&y.set(A,$)}const S=new Set;let E=c.nextSibling;for(const $ of d){let A;if($.key!=null&&y.has($.key)){const _=b.get($.key);A=le(y.get($.key),_,$,i),S.add(A),A!==E&&e.contains(A)&&e.insertBefore(A,E)}else A=D($,i),e.insertBefore(A,E),S.add(A);E=A.nextSibling}for(const $ of g)!S.has($)&&e.contains($)&&e.removeChild($)}else{const b=Math.min(x.length,d.length);for(let y=0;y<b;y++){const S=x[y],E=d[y],$=le(g[y],S,E,i);$!==g[y]&&(e.insertBefore($,g[y]),e.removeChild(g[y]))}for(let y=b;y<d.length;y++)e.insertBefore(D(d[y],i),w);for(let y=b;y<g.length;y++)e.removeChild(g[y])}}for(const c of r){let w;if(c.tag==="#anchor"){const v=c.key,d=`${v}:start`,g=`${v}:end`;let m=f.get(d),x=f.get(g);const l=Array.isArray(c.children)?c.children:[];if(m||(m=document.createTextNode(""),m.key=d),x||(x=document.createTextNode(""),x.key=g),c._startNode=m,c._endNode=x,!e.contains(m)||!e.contains(x)){e.insertBefore(m,h);for(const b of l)e.insertBefore(D(b,i),h);e.insertBefore(x,h)}else u(m,x,a.get(v)?.children,l);C(m,x),h=x.nextSibling;continue}if(c.key!=null&&f.has(c.key)){const v=a.get(c.key);w=le(f.get(c.key),v,c,i,n),p.add(w),w!==h&&e.contains(w)&&(h&&!e.contains(h)&&(h=null),e.insertBefore(w,h))}else w=D(c,i,n),h&&!e.contains(h)&&(h=null),e.insertBefore(w,h),p.add(w);h=w.nextSibling}for(const c of o)!p.has(c)&&e.contains(c)&&(Y(c,n),e.removeChild(c))}function le(e,t,r,i,n){if(t&&typeof t!="string"&&t.props?.ref&&n&&Y(e,n),t===r)return e;if(typeof r=="string"){if(e.nodeType===Node.TEXT_NODE)return e.textContent!==r&&(e.textContent=r),e;{const s=document.createTextNode(r);return e.parentNode?.replaceChild(s,e),s}}if(r&&typeof r!="string"&&r.tag==="#anchor"){const s=r,a=Array.isArray(s.children)?s.children:[],f=s._startNode??document.createTextNode(""),p=s._endNode??document.createTextNode("");s.key!=null&&(f.key=`${s.key}:start`,p.key=`${s.key}:end`),s._startNode=f,s._endNode=p;const h=document.createDocumentFragment();h.appendChild(f);for(const C of a){const u=D(C,i);h.appendChild(u)}return h.appendChild(p),e.parentNode?.replaceChild(h,e),f}if(!r){Y(e,n);const s=document.createComment("removed");return e.parentNode?.replaceChild(s,e),s}if(!t||typeof t=="string"){Y(e,n);const s=D(r,i,n);return typeof r!="string"&&r.props?.ref&&n&&(n[r.props.ref]=s),e.parentNode?.replaceChild(s,e),s}if(r.tag==="#anchor"){const s=Array.isArray(r.children)?r.children:[],a=r._startNode??document.createTextNode(""),f=r._endNode??document.createTextNode("");r.key!=null&&(a.key=`${r.key}:start`,f.key=`${r.key}:end`),r._startNode=a,r._endNode=f;const p=document.createDocumentFragment();p.appendChild(a);for(const h of s)p.appendChild(D(h,i));return p.appendChild(f),e.parentNode?.replaceChild(p,e),a}if(typeof t!="string"&&typeof r!="string"&&t.tag===r.tag&&t.key===r.key){const s=e;return Ae(s,t.props||{},r.props||{},i),st(s,t.children,r.children,i,n),typeof r!="string"&&r.props?.ref&&n&&(n[r.props.ref]=s),s}if(typeof t!="string"&&typeof r!="string"&&t.tag===r.tag&&(t.tag&&String(t.tag).includes("-")||r.props&&r.props.isCustomElement||t.props&&t.props.isCustomElement))try{const a=e;return Ae(a,t.props||{},r.props||{},i),typeof r!="string"&&r.props?.ref&&n&&(n[r.props.ref]=a),a}catch{}Y(e,n);const o=D(r,i,n);return typeof r!="string"&&r.props?.ref&&n&&(n[r.props.ref]=o),e.parentNode?.replaceChild(o,e),o}function ot(e,t,r,i){let n;Array.isArray(t)?t.length===1?(n=t[0],n&&typeof n=="object"&&n.key==null&&(n={...n,key:"__root__"})):n={tag:"div",key:"__root__",children:t}:(n=t,n&&typeof n=="object"&&n.key==null&&(n={...n,key:"__root__"})),n&&typeof n=="object"&&n.tag==="#anchor"&&(n={tag:"div",key:"__anchor_root__",props:{attrs:{"data-anchor-block-root":"",key:"__anchor_root__"}},children:[n]}),n=_e(n,String(n.key??"root"));const o=e._prevVNode??null,s=e._prevDom??e.firstChild??null;let a;o&&s?typeof o!="string"&&typeof n!="string"&&o.tag===n.tag&&o.key===n.key?a=le(s,o,n,r,i):(a=D(n,r,i),e.replaceChild(a,s)):(a=D(n,r,i),e.firstChild?e.replaceChild(a,e.firstChild):e.appendChild(a));const f=[];for(let p=0;p<e.childNodes.length;p++){const h=e.childNodes[p];h!==a&&h.nodeName!=="STYLE"&&(Y(h,i),f.push(h))}f.forEach(p=>e.removeChild(p)),e._prevVNode=n,e._prevDom=a}function fe(e){if(typeof e=="string")return J(e);if(e.tag==="#text")return typeof e.children=="string"?J(e.children):"";if(e.tag==="#anchor")return(Array.isArray(e.children)?e.children.filter(Boolean):[]).map(fe).join("");let t="";e.props&&e.props.attrs&&(t=Object.entries(e.props.attrs).map(([n,o])=>` ${n}="${J(String(o))}"`).join(""));let r="";e.props&&(r=Object.entries(e.props).filter(([n])=>n!=="attrs"&&n!=="directives"&&n!=="ref"&&n!=="key").map(([n,o])=>` ${n}="${J(String(o))}"`).join(""));const i=Array.isArray(e.children)?e.children.filter(Boolean).map(fe).join(""):typeof e.children=="string"?J(e.children):e.children?fe(e.children):"";return`<${e.tag}${t}${r}>${i}</${e.tag}>`}function Ce(e,...t){let r="";for(let i=0;i<e.length;i++)r+=e[i],i<t.length&&(r+=t[i]);return r}function ze(e){return e.replace(/\/\*[\s\S]*?\*\//g,"").replace(/\s+/g," ").replace(/\s*([{}:;,>+~])\s*/g,"$1").replace(/;}/g,"}").trim()}let oe=null;function Te(){return oe||(oe=new CSSStyleSheet,oe.replaceSync(ze(ct))),oe}function at(e){return e.replace(/url\s*\(\s*['"]?javascript:[^)]*\)/gi,"").replace(/<script[\s\S]*?>[\s\S]*?<\/script>/gi,"").replace(/expression\s*\([^)]*\)/gi,"")}const ct=Ce`
|
|
2
2
|
:host, *, ::before, ::after {
|
|
3
3
|
all: isolate;
|
|
4
4
|
box-sizing: border-box;
|
|
@@ -56,33 +56,33 @@
|
|
|
56
56
|
sup { top: -.5em }
|
|
57
57
|
[disabled], [aria-disabled=true] { cursor: not-allowed }
|
|
58
58
|
[hidden] { display: none }
|
|
59
|
-
`,ct={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"}},lt=Object.fromEntries(Object.entries(ct).map(([e,t])=>[e,Object.fromEntries(Object.entries(t).map(([r,i])=>[r,`var(--color-${e}${r==="DEFAULT"?"":`-${r}`}, ${i})`]))])),ge={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%;","min-w-0":"min-width:0;","min-h-0":"min-height:0;","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;","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;","grid-cols-1":"grid-template-columns:repeat(1,minmax(0,1fr));","grid-cols-2":"grid-template-columns:repeat(2,minmax(0,1fr));","grid-cols-3":"grid-template-columns:repeat(3,minmax(0,1fr));","grid-cols-4":"grid-template-columns:repeat(4,minmax(0,1fr));","grid-cols-5":"grid-template-columns:repeat(5,minmax(0,1fr));","grid-cols-6":"grid-template-columns:repeat(6,minmax(0,1fr));","grid-cols-7":"grid-template-columns:repeat(7,minmax(0,1fr));","grid-cols-8":"grid-template-columns:repeat(8,minmax(0,1fr));","grid-cols-9":"grid-template-columns:repeat(9,minmax(0,1fr));","grid-cols-10":"grid-template-columns:repeat(10,minmax(0,1fr));","grid-cols-11":"grid-template-columns:repeat(11,minmax(0,1fr));","grid-cols-12":"grid-template-columns:repeat(12,minmax(0,1fr));","grid-rows-1":"grid-template-rows:repeat(1,minmax(0,1fr));","grid-rows-2":"grid-template-rows:repeat(2,minmax(0,1fr));","grid-rows-3":"grid-template-rows:repeat(3,minmax(0,1fr));","grid-rows-4":"grid-template-rows:repeat(4,minmax(0,1fr));","grid-rows-5":"grid-template-rows:repeat(5,minmax(0,1fr));","grid-rows-6":"grid-template-rows:repeat(6,minmax(0,1fr));","grid-rows-7":"grid-template-rows:repeat(7,minmax(0,1fr));","grid-rows-8":"grid-template-rows:repeat(8,minmax(0,1fr));","grid-rows-9":"grid-template-rows:repeat(9,minmax(0,1fr));","grid-rows-10":"grid-template-rows:repeat(10,minmax(0,1fr));","grid-rows-11":"grid-template-rows:repeat(11,minmax(0,1fr));","grid-rows-12":"grid-template-rows:repeat(12,minmax(0,1fr));","col-span-1":"grid-column:span 1 / span 1;","col-span-2":"grid-column:span 2 / span 2;","col-span-3":"grid-column:span 3 / span 3;","col-span-4":"grid-column:span 4 / span 4;","col-span-5":"grid-column:span 5 / span 5;","col-span-6":"grid-column:span 6 / span 6;","col-span-7":"grid-column:span 7 / span 7;","col-span-8":"grid-column:span 8 / span 8;","col-span-9":"grid-column:span 9 / span 9;","col-span-10":"grid-column:span 10 / span 10;","col-span-11":"grid-column:span 11 / span 11;","col-span-12":"grid-column:span 12 / span 12;","row-span-1":"grid-row:span 1 / span 1;","row-span-2":"grid-row:span 2 / span 2;","row-span-3":"grid-row:span 3 / span 3;","row-span-4":"grid-row:span 4 / span 4;","row-span-6":"grid-row:span 6 / span 6;","row-span-7":"grid-row:span 7 / span 7;","row-span-8":"grid-row:span 8 / span 8;","row-span-9":"grid-row:span 9 / span 9;","row-span-10":"grid-row:span 10 / span 10;","row-span-11":"grid-row:span 11 / span 11;","row-span-12":"grid-row:span 12 / span 12;",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",border:"border-width:1px;","border-2":"border-width:2px;","border-4":"border-width:4px;","border-6":"border-width:6px;","border-8":"border-width:8px;","rounded-none":"border-radius:0;","rounded-xs":"border-radius:0.125rem;","rounded-sm":"border-radius:0.25rem;","rounded-md":"border-radius:0.375rem;","rounded-lg":"border-radius:0.5rem;","rounded-full":"border-radius:9999px;","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:ui-sans-serif,system-ui,sans-serif;","font-serif":"font-family:ui-serif,Georgia,serif;","font-mono":"font-family: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;"},ft="0.25rem",Ae={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 N(e,t){let r=0,i=0;for(let n=0;n<e.length;n++){const s=e[n];if(s==="[")r++;else if(s==="]"&&r>0)r--;else if(s==="(")i++;else if(s===")"&&i>0)i--;else if(r===0&&i===0&&(s===">"||s==="+"||s==="~"||s===" "))return e.slice(0,n)+t+e.slice(n)}return e+t}const ut={before:(e,t)=>`${e}::before{${t}}`,after:(e,t)=>`${e}::after{${t}}`,hover:(e,t)=>`${N(e,":hover")}{${t}}`,focus:(e,t)=>`${N(e,":focus")}{${t}}`,active:(e,t)=>`${N(e,":active")}{${t}}`,disabled:(e,t)=>`${N(e,":disabled")}{${t}}`,visited:(e,t)=>`${N(e,":visited")}{${t}}`,checked:(e,t)=>`${N(e,":checked")}{${t}}`,first:(e,t)=>`${N(e,":first-child")}{${t}}`,last:(e,t)=>`${N(e,":last-child")}{${t}}`,odd:(e,t)=>`${N(e,":nth-child(odd)")}{${t}}`,even:(e,t)=>`${N(e,":nth-child(even)")}{${t}}`,"focus-within":(e,t)=>`${N(e,":focus-within")}{${t}}`,"focus-visible":(e,t)=>`${N(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}}`},me={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)"},ye=["sm","md","lg","xl","2xl"];function be(e){const t=e.startsWith("-"),i=(t?e.slice(1):e).split("-");if(i.length<2)return null;const n=i.slice(0,-1).join("-"),s=i[i.length-1],o=parseFloat(s);if(Number.isNaN(o)||!Ae[n])return null;const a=t?"-":"";return Ae[n].map(f=>`${f}:calc(${a}${ft} * ${o});`).join("")}function Te(e){const t=e.replace("#",""),r=parseInt(t,16),i=r>>16&255,n=r>>8&255,s=r&255;return`${i} ${n} ${s}`}function dt(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,i,n="DEFAULT"]=t,s=lt[i]?.[n];if(!s)return null;if(r==="shadow")return`--ce-shadow-color:${s};`;const a={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 a?`${a}:${s};`:null}function pt(e){const[t,r]=e.split("/");if(!r)return{base:t};const i=parseInt(r,10);return isNaN(i)||i<0||i>100?{base:t}:{base:t,opacity:i/100}}function we(e){const{base:t,opacity:r}=pt(e),i=dt(t);if(i){if(r!==void 0){const s=/#([0-9a-f]{6})/i.exec(i);if(s){const o=Te(s[0]);return i.replace(/#([0-9a-f]{6})/i,`rgb(${o} / ${r})`)}}return i}const n=le(t);if(n&&r!==void 0){const s=/#([0-9a-f]{6})/i.exec(n);if(s){const o=Te(s[0]);return n.replace(/#([0-9a-f]{6})/i,`rgb(${o} / ${r})`)}}return n}function xe(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 le(e){if(e.startsWith("[")&&e.endsWith("]")&&!e.includes("-[")){const n=e.slice(1,-1).trim().match(/^([a-zA-Z][a-zA-Z0-9-]*)\s*:(.*)$/);if(n){const s=n[1].trim();let o=n[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 i=e.slice(0,t);let n=e.slice(t+2,-1);n=n.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","border-b":"border-bottom","border-l":"border-left","border-r":"border-right","border-x":"border-inline","border-y":"border-block",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(i==="rotate")return`transform:rotate(${n});`;const o=s[i]??i.replace(/_/g,"-");if(o&&n)return`${o}:${n};`}return null}function ht(e){if(e.startsWith("[")&&e.endsWith("]")){const r=e.slice(1,-1);return r.includes("&")?r:e}const t=e.indexOf("-[");if(t>0&&e.endsWith("]")){const r=e.slice(t+2,-1).replace(/_/g,"-");return r.includes("&")?r:e.replace(/_/g,"-")}return null}function gt(e){return e.replace(/([!"#$%&'()*+,./:;<=>?@[\\\]^`{|}~])/g,"\\$1")}function mt(e){const t=/class\s*=\s*(['"])(.*?)\1/g,r=[];let i;for(;i=t.exec(e);){const n=i[2].split(/\s+/).filter(Boolean);n.length&&r.push(...n)}return r.filter(Boolean)}const je=new Map,yt=16;function bt(e){const t=Date.now(),r=je.get(e);if(r&&t-r.timestamp<yt)return r.css;const i=mt(e),n=new Set(i),s=[],o=[],a=[],f=[],u={};function d(w,b=!1){const m=(b?"dark|":"")+w;if(m in u)return u[m];const x=k(w,b);return u[m]=x,x}function y(w){const b=w.some(x=>ye.includes(x)),m=w.includes("dark");return w.length===0?1:!b&&!m?2:b&&!m?3:4}function c(w){const b=[];let m="",x=0,l=0;for(let g=0;g<w.length;g++){const p=w[g];p==="["?x++:p==="]"&&x>0?x--:p==="("?l++:p===")"&&l>0&&l--,p===":"&&x===0&&l===0?(b.push(m),m=""):m+=p}return m&&b.push(m),b}function h(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 k(w,b=!1){const m=c(w);let x=!1;const l=m.find(v=>(v.startsWith("!")&&(x=!0,v=v.slice(1)),ge[v]||be(v)||xe(v)||we(v)||le(v)));if(!l)return null;const g=l.replace(/^!/,""),p=ge[g]??be(g)??xe(g)??we(g)??le(g);if(!p)return null;const _=m.indexOf(l);let C=_>=0?m.slice(0,_):[];b&&(C=C.filter(v=>v!=="dark"));const E=`.${gt(w)}`,S="__SUBJECT__",A=x?p.replace(/;$/," !important;"):p;let T=S;const X=[];for(const v of C)v.startsWith("group-")?(T=`.group:${v.slice(6)} ${T}`,X.push(v)):v.startsWith("peer-")&&(T=T.replace(S,`.peer:${v.slice(5)}~${S}`),X.push(v));C=C.filter(v=>!X.includes(v));const ee=[],pe=[];let q=null;for(const v of C){if(v==="dark"||ye.includes(v))continue;const O=ht(v);if(O){q=O;continue}const B=h(v);if(B){q?pe.push(B):ee.push(B);continue}const P=ut[v];typeof P=="function"&&(T=P(T,A).split("{")[0])}function I(v,O){if(!O)return v;let B=0,P=0;if(v.length&&(v[0]===">"||v[0]==="+"||v[0]==="~"||v[0]===" ")){let j=1;for(;j<v.length&&v[j]===" ";)j++;for(;j<v.length;j++){const L=v[j];if(L==="["?B++:L==="]"&&B>0?B--:L==="("?P++:L===")"&&P>0&&P--,B===0&&P===0&&(v[j]===">"||v[j]==="+"||v[j]==="~"||v[j]===" "))return v.slice(0,j)+O+v.slice(j)}return v+O}for(let j=0;j<v.length;j++){const L=v[j];if(L==="["?B++:L==="]"&&B>0?B--:L==="("?P++:L===")"&&P>0&&P--,B===0&&P===0&&(L===">"||L==="+"||L==="~"||L===" "))return v.slice(0,j)+O+v.slice(j)}return v+O}const G=ee.join(""),K=pe.join("");if(q)if(q.includes("&")){const v=q.indexOf("&"),O=q.slice(0,v),B=q.slice(v+1),P=S+G,j=T;if(ee.length===0)T=j.replace(S,O+P+K+B);else{const L=I(B,K);T=j.replace(S,O+P+L)}}else T=T.replace(S,`${q}${S+G}`),K&&(T=T.replace(S,`${S}${K}`));else T=S+G+K;T=T.replace(new RegExp(S,"g"),E);let R=`${T}{${A}}`;const U=C.filter(v=>ye.includes(v)),D=U.length?U[U.length-1]:null,ne=C.includes("dark");return b&&D?R=`@media (prefers-color-scheme: dark) and ${me[D]}{${R}}`:b?R=`@media (prefers-color-scheme: dark){${R}}`:ne&&D?R=`@media (prefers-color-scheme: dark) and ${me[D]}{${R}}`:ne?R=`@media (prefers-color-scheme: dark){${R}}`:D&&(R=`@media ${me[D]}{${R}}`),R}for(const w of n){const b=c(w),m=b.find(p=>ge[p]||be(p)||xe(p)||we(p)||le(p));if(!m)continue;const x=b.indexOf(m),l=x>=0?b.slice(0,x):[],g=y(l);if(g===4){const p=d(w,!0);p&&f.push(p)}else{const p=d(w);p&&(g===1?s.push(p):g===2?o.push(p):g===3&&a.push(p))}}const $=[...s,...o,...a,...f].join("");return je.set(e,{css:$,timestamp:t}),$}const re=[];function wt(e,t,r,i,n,s,o,a){if(e){re.push(r);try{if(t.loadingTemplate&&r.isLoading){Y(e,t.loadingTemplate(r),r,i,n);return}if(t.errorTemplate&&r.hasError){r.error instanceof Error&&Y(e,t.errorTemplate(r.error,r),r,i,n);return}const f=t.render(r);if(f instanceof Promise){s(!0),f.then(u=>{s(!1),o(null),Y(e,u,r,i,n),a(e.innerHTML)}).catch(u=>{s(!1),o(u),t.errorTemplate&&Y(e,t.errorTemplate(u,r),r,i,n)}),t.loadingTemplate&&Y(e,t.loadingTemplate(r),r,i,n);return}Y(e,f,r,i,n),a(e.innerHTML)}finally{re.pop()}}}function Y(e,t,r,i,n){e&&(st(e,Array.isArray(t)?t:[t],r,i),n(e.innerHTML))}function xt(e,t,r,i,n,s,o){if(s!==null&&clearTimeout(s),Date.now()-t<16){if(n(r+1),r>10){o(null);return}}else n(0);const f=setTimeout(()=>{i(Date.now()),e(),o(null)},0);o(f)}function kt(e,t,r,i,n,s){if(!e)return;const o=bt(i);if(!t.style&&(!o||o.trim()==="")){s(null),e.adoptedStyleSheets=[Ce()];return}let a="";t.style&&(typeof t.style=="string"?a=t.style:typeof t.style=="function"&&(a=t.style(r)));let f=ot(`${a}
|
|
60
|
-
${
|
|
61
|
-
`);f=Pe(f);let u=n;u||(u=new CSSStyleSheet),(u.cssRules.length===0||u.toString()!==f)&&u.replaceSync(f),e.adoptedStyleSheets=[Ce(),u],s(u)}const de=new Map,Re=Symbol.for("cer.registry");if(typeof window<"u"){const e=globalThis;e[Re]||(e[Re]=de)}function _e(e,t,r){let i=Z(e);i.includes("-")||(i=`cer-${i}`);let n;typeof t=="function"?n={...r,render:t}:n=t,typeof n.onError!="function"&&(n.onError=(s,o)=>{console.error(`[${i}] Error:`,s,o)});try{const s=new Set(["refs","requestRender","error","hasError","isLoading","emit"]),o=[];if(n.state&&typeof n.state=="object"&&Object.keys(n.state).forEach(a=>{s.has(a)&&o.push(a)}),n.props&&typeof n.props=="object"&&Object.keys(n.props).forEach(a=>{s.has(a)&&o.push(a)}),n.computed&&typeof n.computed=="object"&&Object.keys(n.computed).forEach(a=>{s.has(a)&&o.push(a)}),o.length>0){const a=Array.from(new Set(o));console.warn(`[${i}] Reserved runtime context keys used in component config: ${a.join(", ")}. These names are provided by the runtime (for example: refs, error, emit). Rename your state/prop/computed keys (e.g. 'error' -> 'errorMessage') to avoid collisions and TypeScript type conflicts.`)}}catch{}if(de.set(i,n),typeof window<"u")if(!customElements.get(i))customElements.define(i,vt(i,n));else try{document.querySelectorAll(i).forEach(s=>{try{typeof s._cfg<"u"&&(s._cfg=n),typeof s._render=="function"&&s._render(n)}catch{}})}catch{}}function vt(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;_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=de.get(e)||t;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}),this.context=r,Object.defineProperty(this.context,"emit",{value:(n,s,o)=>{const a=new CustomEvent(n,{detail:s,bubbles:!0,composed:!0,...o||{}});return this.dispatchEvent(a),!a.defaultPrevented},writable:!1,enumerable:!1,configurable:!1});const i=de.get(e)||t;Object.keys(i).forEach(n=>{const s=i[n];typeof s=="function"&&(this.context[n]=(...o)=>s(...o,this.context))}),this._applyComputed(i),this._initializing=!1,this._initWatchers(i),this._render(i)}connectedCallback(){this._runLogicWithinErrorBoundary(t,()=>{this._applyProps(t),Ze(t,this.context,this._mounted,r=>{this._mounted=r})})}disconnectedCallback(){this._runLogicWithinErrorBoundary(t,()=>{Ge(t,this.context,this._listeners,()=>{this._listeners=[]},()=>{this._watchers.clear()},r=>{this._templateLoading=r},r=>{this._templateError=r},r=>{this._mounted=r})})}attributeChangedCallback(r,i,n){this._runLogicWithinErrorBoundary(t,()=>{this._applyProps(t),Ye(t,r,i,n,this.context)})}static get observedAttributes(){return t.props?Object.keys(t.props).map(Z):[]}_applyComputed(r){this._runLogicWithinErrorBoundary(t,()=>{r.computed&&Object.entries(r.computed).forEach(([i,n])=>{Object.defineProperty(this.context,i,{get:()=>{const s=n(this.context);return F(s)},enumerable:!0})})})}_render(r){this._runLogicWithinErrorBoundary(r,()=>{wt(this.shadowRoot,r,this.context,this._refs,i=>{this._lastHtmlStringForJitCSS=i,typeof this.onHtmlStringUpdate=="function"&&this.onHtmlStringUpdate(i)},i=>{this._templateLoading=i,typeof this.onLoadingStateChange=="function"&&this.onLoadingStateChange(i)},i=>{this._templateError=i,typeof this.onErrorStateChange=="function"&&this.onErrorStateChange(i)},i=>this._applyStyle(r,i))})}requestRender(){this._requestRender()}_requestRender(){this._runLogicWithinErrorBoundary(this._cfg,()=>{xt(()=>this._render(this._cfg),this._lastRenderTime,this._renderCount,r=>{this._lastRenderTime=r},r=>{this._renderCount=r},this._renderTimeoutId,r=>{this._renderTimeoutId=r})})}_applyStyle(r,i){this._runLogicWithinErrorBoundary(r,()=>{kt(this.shadowRoot,r,this.context,i,this._styleSheet,n=>{this._styleSheet=n})})}_runLogicWithinErrorBoundary(r,i){this._hasError&&(this._hasError=!1);try{i()}catch(n){this._hasError=!0,r.onError&&r.onError(n,this.context),r.errorFallback&&this.shadowRoot&&(this.shadowRoot.innerHTML=r.errorFallback(n,this.context))}}_initContext(r){try{let i=function(s,o=""){return Array.isArray(s)?new Proxy(s,{get(a,f,u){const d=Reflect.get(a,f,u);return typeof d=="function"&&typeof f=="string"&&["push","pop","shift","unshift","splice","sort","reverse"].includes(f)?function(...c){const h=d.apply(a,c);if(!n._initializing){const k=o||"root";n._triggerWatchers(k,a),n._render(r)}return h}:d},set(a,f,u){if(a[f]=u,!n._initializing){const d=o?`${o}.${String(f)}`:String(f);n._triggerWatchers(d,u),n._render(r)}return!0},deleteProperty(a,f){if(delete a[f],!n._initializing){const u=o?`${o}.${String(f)}`:String(f);n._triggerWatchers(u,void 0),n._render(r)}return!0}}):s&&typeof s=="object"?(Object.keys(s).forEach(a=>{const f=o?`${o}.${a}`:a;s[a]=i(s[a],f)}),new Proxy(s,{set(a,f,u){const d=o?`${o}.${String(f)}`:String(f);return a[f]=i(u,d),n._initializing||(n._triggerWatchers(d,a[f]),n._render(r)),!0},get(a,f,u){return Reflect.get(a,f,u)}})):s};const n=this;return i({...r.state})}catch{return{}}}_initWatchers(r){this._runLogicWithinErrorBoundary(r,()=>{Ue(this.context,this._watchers,r.watch||{})})}_triggerWatchers(r,i){Ve(this.context,this._watchers,r,i)}_applyProps(r){this._runLogicWithinErrorBoundary(r,()=>{try{Je(this,r,this.context)}catch(i){this._hasError=!0,r.onError&&r.onError(i,this.context),r.errorFallback&&this.shadowRoot&&(this.shadowRoot.innerHTML=r.errorFallback(i,this.context))}})}}}function te(e,t={},r,i){const n=i??t.key;return{tag:e,key:n,props:t,children:r}}function fe(e){return!!e&&typeof e=="object"&&(e.type==="AnchorBlock"||e.tag==="#anchor")}function se(e){return typeof e=="object"&&e!==null&&"tag"in e&&!fe(e)}function $t(e,t){return e.key!=null?e:{...e,key:t}}function _t(e,t=[],r={}){const i={},n={},s={},o=/([:@#]?)([a-zA-Z0-9-:\.]+)=("([^"\\]*(\\.[^"\\]*)*)"|'([^'\\]*(\\.[^'\\]*)*)')/g;let a;for(;a=o.exec(e);){const f=a[1],u=a[2],d=(a[4]||a[6])??"",y=d.match(/^{{(\d+)}}$/);let c=y?t[Number(y[1])]??null:d;y||(c==="true"?c=!0:c==="false"?c=!1:c==="null"?c=null:isNaN(Number(c))||(c=Number(c)));const h=["model","bind","show","class","style"];if(f===":"){const[k,$]=u.split(":"),[w,...b]=k.split(".");if(h.includes(w)){const m=[...b],x=w==="model"&&$?`model:${$}`:w;s[x]={value:c,modifiers:m,arg:$}}else n[u]=c}else if(f==="@"){const k="on"+u.charAt(0).toUpperCase()+u.slice(1);i[k]=typeof c=="function"?c:typeof r[c]=="function"?r[c]:void 0}else u==="ref"?i.ref=c:n[u]=c}return{props:i,attrs:n,directives:s}}function St(e,t,r){const i=re.length>0?re[re.length-1]:void 0,n=r??i;function s(l,g){return te("#text",{},l,g)}let o="";for(let l=0;l<e.length;l++)o+=e[l],l<t.length&&(o+=`{{${l}}}`);const a=/<\/?([a-zA-Z0-9-]+)((?:\s+[^\s=>/]+(?:\s*=\s*(?:"(?:\\.|[^"])*"|'(?:\\.|[^'])*'|[^\s>]+))?)*)\s*\/?>|{{(\d+)}}|([^<]+)/g,f=[];let u,d=[],y=null,c={},h,k=0,$=[];function w(l){!l||typeof l!="object"||fe(l)||(l.props||l.attrs?(l.props&&(c.props||(c.props={}),Object.assign(c.props,l.props)),l.attrs&&(c.attrs||(c.attrs={}),Object.keys(l.attrs).forEach(g=>{if(g==="style"&&c.attrs.style){const p=c.attrs.style.replace(/;?\s*$/,""),_=l.attrs.style.replace(/^;?\s*/,"");c.attrs.style=p+"; "+_}else if(g==="class"&&c.attrs.class){const p=c.attrs.class.trim().split(/\s+/).filter(Boolean),_=l.attrs.class.trim().split(/\s+/).filter(Boolean),C=[...new Set([...p,..._])];c.attrs.class=C.join(" ")}else c.attrs[g]=l.attrs[g]}))):(c.props||(c.props={}),Object.assign(c.props,l)))}function b(l,g){const p=y?d:$;if(fe(l)){const _=l.key??g;let C=l.children;p.push({...l,key:_,children:C});return}if(se(l)){p.push($t(l,void 0));return}if(Array.isArray(l)){if(l.length===0)return;for(let _=0;_<l.length;_++){const C=l[_];fe(C)||se(C)||Array.isArray(C)?b(C,`${g}-${_}`):C!==null&&typeof C=="object"?w(C):p.push(s(String(C),`${g}-${_}`))}return}if(l!==null&&typeof l=="object"){w(l);return}p.push(s(String(l),g))}const m=new Set(["area","base","br","col","embed","hr","img","input","link","meta","param","source","track","wbr"]);for(;u=a.exec(o);)if(u[1]){const l=u[1],g=u[0][1]==="/",p=u[0][u[0].length-2]==="/"||m.has(l),{props:_,attrs:C,directives:E}=_t(u[2]||"",t,n),S={props:{},attrs:{}};for(const A in _)S.props[A]=_[A];for(const A in C)S.attrs[A]=C[A];if(E&&Object.keys(E).some(A=>A==="model"||A.startsWith("model:")))try{const A=Symbol.for("cer.registry"),T=globalThis[A],X=!!(T&&typeof T.has=="function"&&T.has(l)),ee=!!(n&&(n.__customElements instanceof Set&&n.__customElements.has(l)||Array.isArray(n.__isCustomElements)&&n.__isCustomElements.includes(l)));if(!!(l.includes("-")||ee||X))for(const I of Object.keys(E)){if(I!=="model"&&!I.startsWith("model:"))continue;const G=E[I],K=G.arg??(I.includes(":")?I.split(":",2)[1]:void 0),R=G.value,U=K??"modelValue",D=z,ne=oe,v=n?n._state||n:void 0;let O;typeof R=="string"&&n?O=D(v,R):O=R,S.props[U]=O;try{const j=Z(U);S.attrs||(S.attrs={}),O!==void 0&&(S.attrs[j]=O)}catch{}S.isCustomElement=!0;const B=`update:${Z(U)}`,P="on"+B.charAt(0).toUpperCase()+B.slice(1);S.props[P]=function(j){const L=j.detail!==void 0?j.detail:j.target?j.target.value:void 0;if(!v)return;const he=D(v,typeof R=="string"?R:String(R));(Array.isArray(L)&&Array.isArray(he)?JSON.stringify([...L].sort())!==JSON.stringify([...he].sort()):L!==he)&&(ne(v,typeof R=="string"?R:String(R),L),n?.requestRender?n.requestRender():n?._requestRender&&n._requestRender())},delete E[I]}}catch{}if(Object.keys(E).length>0&&(S.directives={...E}),g){const A=te(y,c,d.length===1&&se(d[0])&&d[0].tag==="#text"?typeof d[0].children=="string"?d[0].children:"":d.length?d:void 0,h),T=f.pop();T?(y=T.tag,c=T.props,h=T.key,d=T.children,d.push(A)):($.push(A),y=null,c={},h=void 0,d=[])}else p?y?d.push(te(l,S,void 0,void 0)):$.push(te(l,S,void 0,void 0)):(y&&f.push({tag:y,props:c,children:d,key:h}),y=l,c=S,d=[])}else if(typeof u[3]<"u"){const l=Number(u[3]),g=t[l],p=`interp-${l}`;b(g,p)}else if(u[4]){const l=u[4],g=y?d:$,p=l.split(/({{\d+}})/);for(const _ of p){if(!_)continue;const C=_.match(/^{{(\d+)}}$/);if(C){const E=Number(C[1]),S=t[E],A=`interp-${E}`;b(S,A)}else{const E=`text-${k++}`;g.push(s(_,E))}}}const x=$.filter(l=>se(l)&&l.tag==="#text"?typeof l.children=="string"&&l.children.trim()!=="":!0);return x.length===1?x[0]:x.length>1?x:te("div",{},"","fallback-root")}function H(e,...t){const r=t[t.length-1],i=typeof r=="object"&&r&&!Array.isArray(r)?r:void 0;return St(e,t,i)}const Se=e=>e?typeof URLSearchParams>"u"?{}:Object.fromEntries(new URLSearchParams(e)):{},W=(e,t)=>{for(const r of e){const i=[],n=r.path.replace(/:[^/]+/g,a=>(i.push(a.slice(1)),"([^/]+)")),s=new RegExp(`^${n}$`),o=t.match(s);if(o){const a={};return i.forEach((f,u)=>{a[f]=o[u+1]}),{route:r,params:a}}}return{route:null,params:{}}},ke={};async function Ne(e){if(e.component)return e.component;if(e.load){if(ke[e.path])return ke[e.path];try{const t=await e.load();return ke[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 ze(e){const{routes:t,base:r="",initialUrl:i}=e;let n,s,o,a,f,u,d;const y=async($,w)=>{const b=t.find(m=>W([m],$.path).route!==null);if(b?.beforeEnter)try{const m=await b.beforeEnter($,w);return typeof m=="string"?(await k(m,!0),!1):m!==!1}catch(m){return console.error("beforeEnter error",m),!1}return!0},c=async($,w)=>{const b=t.find(m=>W([m],$.path).route!==null);if(b?.onEnter)try{const m=await b.onEnter($,w);return typeof m=="string"?(await k(m,!0),!1):m!==!1}catch(m){return console.error("onEnter error",m),!1}return!0},h=($,w)=>{const b=t.find(m=>W([m],$.path).route!==null);if(b?.afterEnter)try{b.afterEnter($,w)}catch(m){console.error("afterEnter error",m)}},k=async($,w=!1)=>{try{const b={path:$.replace(r,"")||"/",query:{}},m=W(t,b.path);if(!m)throw new Error(`No route found for ${b.path}`);const x=o.getState(),l={path:b.path,params:m.params,query:b.query};if(!await y(l,x)||!await c(l,x))return;typeof window<"u"&&typeof document<"u"&&(w?window.history.replaceState({},"",r+$):window.history.pushState({},"",r+$)),o.setState(l),h(l,x)}catch(b){console.error("Navigation error:",b)}};if(typeof window<"u"&&typeof document<"u"){n=()=>{const w=new URL(window.location.href),b=w.pathname.replace(r,"")||"/",m=Se(w.search);return{path:b,query:m}},s=n();const $=W(t,s.path);o=ve({path:s.path,params:$.params,query:s.query}),a=async(w=!1)=>{const b=n();await k(b.path,w)},window.addEventListener("popstate",()=>a(!0)),f=w=>k(w,!1),u=w=>k(w,!0),d=()=>window.history.back()}else{n=()=>{const b=new URL(i||"/","http://localhost"),m=b.pathname.replace(r,"")||"/",x=Se(b.search);return{path:m,query:x}},s=n();const $=W(t,s.path);o=ve({path:s.path,params:$.params,query:s.query}),a=async()=>{const b=n();await w(b.path)};const w=async b=>{try{const m={path:b.replace(r,"")||"/",query:{}},x=W(t,m.path);if(!x)throw new Error(`No route found for ${m.path}`);const l=o.getState(),g={path:m.path,params:x.params,query:m.query},p=t.find(_=>W([_],g.path).route!==null);if(p?.beforeEnter)try{const _=await p.beforeEnter(g,l);if(typeof _=="string"){await w(_);return}if(_===!1)return}catch{return}if(p?.onEnter)try{const _=await p.onEnter(g,l);if(typeof _=="string"){await w(_);return}if(_===!1)return}catch{return}if(o.setState(g),p?.afterEnter)try{p.afterEnter(g,l)}catch{}}catch{}};f=async b=>w(b),u=async b=>w(b),d=()=>{}}return{store:o,push:f,replace:u,back:d,subscribe:o.subscribe,matchRoute:$=>W(t,$),getCurrent:()=>o.getState(),resolveRouteComponent:Ne}}function Et(e,t){return W(e,t)}function Ct(e){const t=ze(e);return _e("router-view",{async render(){if(!t)return H`<div>Router not initialized.</div>`;const r=t.getCurrent(),{path:i}=r,n=t.matchRoute(i);if(!n.route)return H`<div>Not found</div>`;try{const s=await t.resolveRouteComponent(n.route);if(typeof s=="string")return{tag:s,props:{},children:[]};if(typeof s=="function"){const o=s(),a=o instanceof Promise?await o:o;return typeof a=="string"?{tag:a,props:{},children:[]}:a}return H`<div>Invalid route component</div>`}catch{return H`<div>Invalid route component</div>`}},onConnected(r){t&&typeof t.subscribe=="function"&&t.subscribe(()=>{typeof r.requestRender=="function"&&r.requestRender()})}}),_e("router-link",{state:{},props:{to:{type:String,default:""},tag:{type:String,default:"a"},replace:{type:Boolean,default:!1},exact:{type:Boolean,default:!1},activeClass:{type:String,default:"active"},exactActiveClass:{type:String,default:"exact-active"},ariaCurrentValue:{type:String,default:"page"},disabled:{type:Boolean,default:!1},external:{type:Boolean,default:!1},class:{type:String,default:""},style:{type:String,default:Ee`
|
|
59
|
+
`,lt={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"}},ft=Object.fromEntries(Object.entries(lt).map(([e,t])=>[e,Object.fromEntries(Object.entries(t).map(([r,i])=>[r,`var(--color-${e}${r==="DEFAULT"?"":`-${r}`}, ${i})`]))])),me={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%;","min-w-0":"min-width:0;","min-h-0":"min-height:0;","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;","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;","grid-cols-1":"grid-template-columns:repeat(1,minmax(0,1fr));","grid-cols-2":"grid-template-columns:repeat(2,minmax(0,1fr));","grid-cols-3":"grid-template-columns:repeat(3,minmax(0,1fr));","grid-cols-4":"grid-template-columns:repeat(4,minmax(0,1fr));","grid-cols-5":"grid-template-columns:repeat(5,minmax(0,1fr));","grid-cols-6":"grid-template-columns:repeat(6,minmax(0,1fr));","grid-cols-7":"grid-template-columns:repeat(7,minmax(0,1fr));","grid-cols-8":"grid-template-columns:repeat(8,minmax(0,1fr));","grid-cols-9":"grid-template-columns:repeat(9,minmax(0,1fr));","grid-cols-10":"grid-template-columns:repeat(10,minmax(0,1fr));","grid-cols-11":"grid-template-columns:repeat(11,minmax(0,1fr));","grid-cols-12":"grid-template-columns:repeat(12,minmax(0,1fr));","grid-rows-1":"grid-template-rows:repeat(1,minmax(0,1fr));","grid-rows-2":"grid-template-rows:repeat(2,minmax(0,1fr));","grid-rows-3":"grid-template-rows:repeat(3,minmax(0,1fr));","grid-rows-4":"grid-template-rows:repeat(4,minmax(0,1fr));","grid-rows-5":"grid-template-rows:repeat(5,minmax(0,1fr));","grid-rows-6":"grid-template-rows:repeat(6,minmax(0,1fr));","grid-rows-7":"grid-template-rows:repeat(7,minmax(0,1fr));","grid-rows-8":"grid-template-rows:repeat(8,minmax(0,1fr));","grid-rows-9":"grid-template-rows:repeat(9,minmax(0,1fr));","grid-rows-10":"grid-template-rows:repeat(10,minmax(0,1fr));","grid-rows-11":"grid-template-rows:repeat(11,minmax(0,1fr));","grid-rows-12":"grid-template-rows:repeat(12,minmax(0,1fr));","col-span-1":"grid-column:span 1 / span 1;","col-span-2":"grid-column:span 2 / span 2;","col-span-3":"grid-column:span 3 / span 3;","col-span-4":"grid-column:span 4 / span 4;","col-span-5":"grid-column:span 5 / span 5;","col-span-6":"grid-column:span 6 / span 6;","col-span-7":"grid-column:span 7 / span 7;","col-span-8":"grid-column:span 8 / span 8;","col-span-9":"grid-column:span 9 / span 9;","col-span-10":"grid-column:span 10 / span 10;","col-span-11":"grid-column:span 11 / span 11;","col-span-12":"grid-column:span 12 / span 12;","row-span-1":"grid-row:span 1 / span 1;","row-span-2":"grid-row:span 2 / span 2;","row-span-3":"grid-row:span 3 / span 3;","row-span-4":"grid-row:span 4 / span 4;","row-span-6":"grid-row:span 6 / span 6;","row-span-7":"grid-row:span 7 / span 7;","row-span-8":"grid-row:span 8 / span 8;","row-span-9":"grid-row:span 9 / span 9;","row-span-10":"grid-row:span 10 / span 10;","row-span-11":"grid-row:span 11 / span 11;","row-span-12":"grid-row:span 12 / span 12;",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",border:"border-width:1px;","border-2":"border-width:2px;","border-4":"border-width:4px;","border-6":"border-width:6px;","border-8":"border-width:8px;","rounded-none":"border-radius:0;","rounded-xs":"border-radius:0.125rem;","rounded-sm":"border-radius:0.25rem;","rounded-md":"border-radius:0.375rem;","rounded-lg":"border-radius:0.5rem;","rounded-xl":"border-radius:0.75rem;","rounded-2xl":"border-radius:1rem;","rounded-3xl":"border-radius:1.5rem;","rounded-4xl":"border-radius:2rem;","rounded-full":"border-radius:9999px;","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:ui-sans-serif,system-ui,sans-serif;","font-serif":"font-family:ui-serif,Georgia,serif;","font-mono":"font-family: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;"},ut="0.25rem",je={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 N(e,t){let r=0,i=0;for(let n=0;n<e.length;n++){const o=e[n];if(o==="[")r++;else if(o==="]"&&r>0)r--;else if(o==="(")i++;else if(o===")"&&i>0)i--;else if(r===0&&i===0&&(o===">"||o==="+"||o==="~"||o===" "))return e.slice(0,n)+t+e.slice(n)}return e+t}const pt={before:(e,t)=>`${e}::before{${t}}`,after:(e,t)=>`${e}::after{${t}}`,hover:(e,t)=>`${N(e,":hover")}{${t}}`,focus:(e,t)=>`${N(e,":focus")}{${t}}`,active:(e,t)=>`${N(e,":active")}{${t}}`,disabled:(e,t)=>`${N(e,":disabled")}{${t}}`,visited:(e,t)=>`${N(e,":visited")}{${t}}`,checked:(e,t)=>`${N(e,":checked")}{${t}}`,first:(e,t)=>`${N(e,":first-child")}{${t}}`,last:(e,t)=>`${N(e,":last-child")}{${t}}`,odd:(e,t)=>`${N(e,":nth-child(odd)")}{${t}}`,even:(e,t)=>`${N(e,":nth-child(even)")}{${t}}`,"focus-within":(e,t)=>`${N(e,":focus-within")}{${t}}`,"focus-visible":(e,t)=>`${N(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}}`},ye={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)"},be=["sm","md","lg","xl","2xl"];function we(e){const t=e.startsWith("-"),i=(t?e.slice(1):e).split("-");if(i.length<2)return null;const n=i.slice(0,-1).join("-"),o=i[i.length-1],s=parseFloat(o);if(Number.isNaN(s)||!je[n])return null;const a=t?"-":"";return je[n].map(f=>`${f}:calc(${a}${ut} * ${s});`).join("")}function Le(e){const t=e.replace("#",""),r=parseInt(t,16),i=r>>16&255,n=r>>8&255,o=r&255;return`${i} ${n} ${o}`}function dt(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,i,n="DEFAULT"]=t,o=ft[i]?.[n];if(!o)return null;if(r==="shadow")return`--ce-shadow-color:${o};`;const a={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 a?`${a}:${o};`:null}function ht(e){const[t,r]=e.split("/");if(!r)return{base:t};const i=parseInt(r,10);return isNaN(i)||i<0||i>100?{base:t}:{base:t,opacity:i/100}}function xe(e){const{base:t,opacity:r}=ht(e),i=dt(t);if(i){if(r!==void 0){const o=/#([0-9a-f]{6})/i.exec(i);if(o){const s=Le(o[0]);return i.replace(/#([0-9a-f]{6})/i,`rgb(${s} / ${r})`)}}return i}const n=ue(t);if(n&&r!==void 0){const o=/#([0-9a-f]{6})/i.exec(n);if(o){const s=Le(o[0]);return n.replace(/#([0-9a-f]{6})/i,`rgb(${s} / ${r})`)}}return n}function ve(e){const t=/^opacity-(\d{1,3})$/.exec(e);if(!t)return null;const r=parseInt(t[1],10);return r<0||r>100?null:`opacity:${r/100};`}function ue(e){if(e.startsWith("[")&&e.endsWith("]")&&!e.includes("-[")){const n=e.slice(1,-1).trim().match(/^([a-zA-Z][a-zA-Z0-9-]*)\s*:(.*)$/);if(n){const o=n[1].trim();let s=n[2].trim();return s=s.replace(/url\('\s*([^']*?)\s*'\)/g,'url("$1")'),s=s.replace(/^'([^']*)'$/g,'"$1"'),`${o}:${s};`}return null}const t=e.indexOf("-["),r=e.endsWith("]");if(t>0&&r){const i=e.slice(0,t);let n=e.slice(t+2,-1);n=n.replace(/_/g," ");const o={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","border-b":"border-bottom","border-l":"border-left","border-r":"border-right","border-x":"border-inline","border-y":"border-block",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(i==="rotate")return`transform:rotate(${n});`;const s=o[i]??i.replace(/_/g,"-");if(s&&n)return`${s}:${n};`}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 mt(e){return e.replace(/([!"#$%&'()*+,./:;<=>?@[\\\]^`{|}~])/g,"\\$1")}function yt(e){const t=/class\s*=\s*(['"])(.*?)\1/g,r=[];let i;for(;i=t.exec(e);){const n=i[2].split(/\s+/).filter(Boolean);n.length&&r.push(...n)}return r.filter(Boolean)}const Re=new Map,bt=16;function wt(e){const t=Date.now(),r=Re.get(e);if(r&&t-r.timestamp<bt)return r.css;const i=yt(e),n=new Set(i),o=[],s=[],a=[],f=[],p={};function h(d,g=!1){const m=(g?"dark|":"")+d;if(m in p)return p[m];const x=w(d,g);return p[m]=x,x}function C(d){const g=d.some(x=>be.includes(x)),m=d.includes("dark");return d.length===0?1:!g&&!m?2:g&&!m?3:4}function u(d){const g=[];let m="",x=0,l=0;for(let b=0;b<d.length;b++){const y=d[b];y==="["?x++:y==="]"&&x>0?x--:y==="("?l++:y===")"&&l>0&&l--,y===":"&&x===0&&l===0?(g.push(m),m=""):m+=y}return m&&g.push(m),g}function c(d){switch(d){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 w(d,g=!1){const m=u(d);let x=!1;const l=m.find(k=>(k.startsWith("!")&&(x=!0,k=k.slice(1)),me[k]||we(k)||ve(k)||xe(k)||ue(k)));if(!l)return null;const b=l.replace(/^!/,""),y=me[b]??we(b)??ve(b)??xe(b)??ue(b);if(!y)return null;const S=m.indexOf(l);let E=S>=0?m.slice(0,S):[];g&&(E=E.filter(k=>k!=="dark"));const $=`.${mt(d)}`,A="__SUBJECT__",_=x?y.replace(/;$/," !important;"):y;let T=A;const B=[];for(const k of E)k.startsWith("group-")?(T=`.group:${k.slice(6)} ${T}`,B.push(k)):k.startsWith("peer-")&&(T=T.replace(A,`.peer:${k.slice(5)}~${A}`),B.push(k));E=E.filter(k=>!B.includes(k));const Z=[],te=[];let M=null;for(const k of E){if(k==="dark"||be.includes(k))continue;const P=gt(k);if(P){M=P;continue}const R=c(k);if(R){M?te.push(R):Z.push(R);continue}const O=pt[k];typeof O=="function"&&(T=O(T,_).split("{")[0])}function U(k,P){if(!P)return k;let R=0,O=0;if(k.length&&(k[0]===">"||k[0]==="+"||k[0]==="~"||k[0]===" ")){let j=1;for(;j<k.length&&k[j]===" ";)j++;for(;j<k.length;j++){const L=k[j];if(L==="["?R++:L==="]"&&R>0?R--:L==="("?O++:L===")"&&O>0&&O--,R===0&&O===0&&(k[j]===">"||k[j]==="+"||k[j]==="~"||k[j]===" "))return k.slice(0,j)+P+k.slice(j)}return k+P}for(let j=0;j<k.length;j++){const L=k[j];if(L==="["?R++:L==="]"&&R>0?R--:L==="("?O++:L===")"&&O>0&&O--,R===0&&O===0&&(L===">"||L==="+"||L==="~"||L===" "))return k.slice(0,j)+P+k.slice(j)}return k+P}const q=Z.join(""),I=te.join("");if(M)if(M.includes("&")){const k=M.indexOf("&"),P=M.slice(0,k),R=M.slice(k+1),O=A+q,j=T;if(Z.length===0)T=j.replace(A,P+O+I+R);else{const L=U(R,I);T=j.replace(A,P+O+L)}}else T=T.replace(A,`${M}${A+q}`),I&&(T=T.replace(A,`${A}${I}`));else T=A+q+I;T=T.replace(new RegExp(A,"g"),$);let z=`${T}{${_}}`;const H=E.filter(k=>be.includes(k)),K=H.length?H[H.length-1]:null,re=E.includes("dark");return g&&K?z=`@media (prefers-color-scheme: dark) and ${ye[K]}{${z}}`:g?z=`@media (prefers-color-scheme: dark){${z}}`:re&&K?z=`@media (prefers-color-scheme: dark) and ${ye[K]}{${z}}`:re?z=`@media (prefers-color-scheme: dark){${z}}`:K&&(z=`@media ${ye[K]}{${z}}`),z}for(const d of n){const g=u(d),m=g.find(y=>me[y]||we(y)||ve(y)||xe(y)||ue(y));if(!m)continue;const x=g.indexOf(m),l=x>=0?g.slice(0,x):[],b=C(l);if(b===4){const y=h(d,!0);y&&f.push(y)}else{const y=h(d);y&&(b===1?o.push(y):b===2?s.push(y):b===3&&a.push(y))}}const v=[...o,...s,...a,...f].join("");return Re.set(e,{css:v,timestamp:t}),v}const ie=[];function xt(e,t,r,i,n,o,s,a){if(e){ie.push(r);try{if(t.loadingTemplate&&r.isLoading){X(e,t.loadingTemplate(r),r,i,n);return}if(t.errorTemplate&&r.hasError){r.error instanceof Error&&X(e,t.errorTemplate(r.error,r),r,i,n);return}const f=t.render(r);if(f instanceof Promise){o(!0),f.then(p=>{o(!1),s(null),X(e,p,r,i,n),a(e.innerHTML)}).catch(p=>{o(!1),s(p),t.errorTemplate&&X(e,t.errorTemplate(p,r),r,i,n)}),t.loadingTemplate&&X(e,t.loadingTemplate(r),r,i,n);return}X(e,f,r,i,n),a(e.innerHTML)}finally{ie.pop()}}}function X(e,t,r,i,n){e&&(ot(e,Array.isArray(t)?t:[t],r,i),n(e.innerHTML))}function vt(e,t,r,i,n,o,s){if(o!==null&&clearTimeout(o),Date.now()-t<16){if(n(r+1),r>10){s(null);return}}else n(0);const f=setTimeout(()=>{i(Date.now()),e(),s(null)},0);s(f)}function kt(e,t,r,i,n,o){if(!e)return;const s=wt(i);if(!t.style&&(!s||s.trim()==="")){o(null),e.adoptedStyleSheets=[Te()];return}let a="";t.style&&(typeof t.style=="string"?a=t.style:typeof t.style=="function"&&(a=t.style(r)));let f=at(`${a}
|
|
60
|
+
${s}
|
|
61
|
+
`);f=ze(f);let p=n;p||(p=new CSSStyleSheet),(p.cssRules.length===0||p.toString()!==f)&&p.replaceSync(f),e.adoptedStyleSheets=[Te(),p],o(p)}const he=new Map,Me=Symbol.for("cer.registry");if(typeof window<"u"){const e=globalThis;e[Me]||(e[Me]=he)}function $e(e,t,r){let i=Q(e);i.includes("-")||(i=`cer-${i}`);let n;typeof t=="function"?n={...r,render:t}:n=t,typeof n.onError!="function"&&(n.onError=(o,s)=>{console.error(`[${i}] Error:`,o,s)});try{const o=new Set(["refs","requestRender","error","hasError","isLoading","emit"]),s=[];if(n.state&&typeof n.state=="object"&&Object.keys(n.state).forEach(a=>{o.has(a)&&s.push(a)}),n.props&&typeof n.props=="object"&&Object.keys(n.props).forEach(a=>{o.has(a)&&s.push(a)}),n.computed&&typeof n.computed=="object"&&Object.keys(n.computed).forEach(a=>{o.has(a)&&s.push(a)}),s.length>0){const a=Array.from(new Set(s));console.warn(`[${i}] Reserved runtime context keys used in component config: ${a.join(", ")}. These names are provided by the runtime (for example: refs, error, emit). Rename your state/prop/computed keys (e.g. 'error' -> 'errorMessage') to avoid collisions and TypeScript type conflicts.`)}}catch{}if(he.set(i,n),typeof window<"u")if(!customElements.get(i))customElements.define(i,St(i,n));else try{document.querySelectorAll(i).forEach(o=>{try{typeof o._cfg<"u"&&(o._cfg=n),typeof o._render=="function"&&o._render(n)}catch{}})}catch{}}function St(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;_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=he.get(e)||t;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}),this.context=r,Object.defineProperty(this.context,"emit",{value:(n,o,s)=>{const a=new CustomEvent(n,{detail:o,bubbles:!0,composed:!0,...s||{}});return this.dispatchEvent(a),!a.defaultPrevented},writable:!1,enumerable:!1,configurable:!1});const i=he.get(e)||t;Object.keys(i).forEach(n=>{const o=i[n];typeof o=="function"&&(this.context[n]=(...s)=>o(...s,this.context))}),this._applyComputed(i),this._initializing=!1,this._initWatchers(i),this._render(i)}connectedCallback(){this._runLogicWithinErrorBoundary(t,()=>{this._applyProps(t),Ye(t,this.context,this._mounted,r=>{this._mounted=r})})}disconnectedCallback(){this._runLogicWithinErrorBoundary(t,()=>{Qe(t,this.context,this._listeners,()=>{this._listeners=[]},()=>{this._watchers.clear()},r=>{this._templateLoading=r},r=>{this._templateError=r},r=>{this._mounted=r})})}attributeChangedCallback(r,i,n){this._runLogicWithinErrorBoundary(t,()=>{this._applyProps(t),Xe(t,r,i,n,this.context)})}static get observedAttributes(){return t.props?Object.keys(t.props).map(Q):[]}_applyComputed(r){this._runLogicWithinErrorBoundary(t,()=>{r.computed&&Object.entries(r.computed).forEach(([i,n])=>{Object.defineProperty(this.context,i,{get:()=>{const o=n(this.context);return J(o)},enumerable:!0})})})}_render(r){this._runLogicWithinErrorBoundary(r,()=>{xt(this.shadowRoot,r,this.context,this._refs,i=>{this._lastHtmlStringForJitCSS=i,typeof this.onHtmlStringUpdate=="function"&&this.onHtmlStringUpdate(i)},i=>{this._templateLoading=i,typeof this.onLoadingStateChange=="function"&&this.onLoadingStateChange(i)},i=>{this._templateError=i,typeof this.onErrorStateChange=="function"&&this.onErrorStateChange(i)},i=>this._applyStyle(r,i))})}requestRender(){this._requestRender()}_requestRender(){this._runLogicWithinErrorBoundary(this._cfg,()=>{vt(()=>this._render(this._cfg),this._lastRenderTime,this._renderCount,r=>{this._lastRenderTime=r},r=>{this._renderCount=r},this._renderTimeoutId,r=>{this._renderTimeoutId=r})})}_applyStyle(r,i){this._runLogicWithinErrorBoundary(r,()=>{kt(this.shadowRoot,r,this.context,i,this._styleSheet,n=>{this._styleSheet=n})})}_runLogicWithinErrorBoundary(r,i){this._hasError&&(this._hasError=!1);try{i()}catch(n){this._hasError=!0,r.onError&&r.onError(n,this.context),r.errorFallback&&this.shadowRoot&&(this.shadowRoot.innerHTML=r.errorFallback(n,this.context))}}_initContext(r){try{let i=function(o,s=""){return Array.isArray(o)?new Proxy(o,{get(a,f,p){const h=Reflect.get(a,f,p);return typeof h=="function"&&typeof f=="string"&&["push","pop","shift","unshift","splice","sort","reverse"].includes(f)?function(...u){const c=h.apply(a,u);if(!n._initializing){const w=s||"root";n._triggerWatchers(w,a),n._render(r)}return c}:h},set(a,f,p){if(a[f]=p,!n._initializing){const h=s?`${s}.${String(f)}`:String(f);n._triggerWatchers(h,p),n._render(r)}return!0},deleteProperty(a,f){if(delete a[f],!n._initializing){const p=s?`${s}.${String(f)}`:String(f);n._triggerWatchers(p,void 0),n._render(r)}return!0}}):o&&typeof o=="object"?(Object.keys(o).forEach(a=>{const f=s?`${s}.${a}`:a;o[a]=i(o[a],f)}),new Proxy(o,{set(a,f,p){const h=s?`${s}.${String(f)}`:String(f);return a[f]=i(p,h),n._initializing||(n._triggerWatchers(h,a[f]),n._render(r)),!0},get(a,f,p){return Reflect.get(a,f,p)}})):o};const n=this;return i({...r.state})}catch{return{}}}_initWatchers(r){this._runLogicWithinErrorBoundary(r,()=>{Ge(this.context,this._watchers,r.watch||{})})}_triggerWatchers(r,i){Ze(this.context,this._watchers,r,i)}_applyProps(r){this._runLogicWithinErrorBoundary(r,()=>{try{Ve(this,r,this.context)}catch(i){this._hasError=!0,r.onError&&r.onError(i,this.context),r.errorFallback&&this.shadowRoot&&(this.shadowRoot.innerHTML=r.errorFallback(i,this.context))}})}}}function ne(e,t={},r,i){const n=i??t.key;return{tag:e,key:n,props:t,children:r}}function pe(e){return!!e&&typeof e=="object"&&(e.type==="AnchorBlock"||e.tag==="#anchor")}function ae(e){return typeof e=="object"&&e!==null&&"tag"in e&&!pe(e)}function _t(e,t){return e.key!=null?e:{...e,key:t}}function $t(e,t=[],r={}){const i={},n={},o={},s=[],a=/([:@#]?)([a-zA-Z0-9-:\.]+)=("([^"\\]*(\\.[^"\\]*)*)"|'([^'\\]*(\\.[^'\\]*)*)')/g;let f;for(;f=a.exec(e);){const p=f[1],h=f[2],C=(f[4]||f[6])??"",u=C.match(/^{{(\d+)}}$/);let c=u?t[Number(u[1])]??null:C;u||(c==="true"?c=!0:c==="false"?c=!1:c==="null"?c=null:isNaN(Number(c))||(c=Number(c)));const w=["model","bind","show","class","style"];if(p===":"){const[v,d]=h.split(":"),[g,...m]=v.split(".");if(w.includes(g)){const x=[...m],l=g==="model"&&d?`model:${d}`:g;o[l]={value:c,modifiers:x,arg:d}}else n[h]=c,s.push(h)}else if(p==="@"){const v="on"+h.charAt(0).toUpperCase()+h.slice(1);i[v]=typeof c=="function"?c:typeof r[c]=="function"?r[c]:void 0}else h==="ref"?i.ref=c:n[h]=c}return{props:i,attrs:n,directives:o,bound:s}}function Et(e,t,r){const i=ie.length>0?ie[ie.length-1]:void 0,n=r??i;function o(l,b){return ne("#text",{},l,b)}let s="";for(let l=0;l<e.length;l++)s+=e[l],l<t.length&&(s+=`{{${l}}}`);const a=/<\/?([a-zA-Z0-9-]+)((?:\s+[^\s=>/]+(?:\s*=\s*(?:"(?:\\.|[^"])*"|'(?:\\.|[^'])*'|[^\s>]+))?)*)\s*\/?>|{{(\d+)}}|([^<]+)/g,f=[];let p,h=[],C=null,u={},c,w=0,v=[];function d(l){!l||typeof l!="object"||pe(l)||(l.props||l.attrs?(l.props&&(u.props||(u.props={}),Object.assign(u.props,l.props)),l.attrs&&(u.attrs||(u.attrs={}),Object.keys(l.attrs).forEach(b=>{if(b==="style"&&u.attrs.style){const y=u.attrs.style.replace(/;?\s*$/,""),S=l.attrs.style.replace(/^;?\s*/,"");u.attrs.style=y+"; "+S}else if(b==="class"&&u.attrs.class){const y=u.attrs.class.trim().split(/\s+/).filter(Boolean),S=l.attrs.class.trim().split(/\s+/).filter(Boolean),E=[...new Set([...y,...S])];u.attrs.class=E.join(" ")}else u.attrs[b]=l.attrs[b]}))):(u.props||(u.props={}),Object.assign(u.props,l)))}function g(l,b){const y=C?h:v;if(pe(l)){const S=l.key??b;let E=l.children;y.push({...l,key:S,children:E});return}if(ae(l)){y.push(_t(l,void 0));return}if(Array.isArray(l)){if(l.length===0)return;for(let S=0;S<l.length;S++){const E=l[S];pe(E)||ae(E)||Array.isArray(E)?g(E,`${b}-${S}`):E!==null&&typeof E=="object"?d(E):y.push(o(String(E),`${b}-${S}`))}return}if(l!==null&&typeof l=="object"){d(l);return}y.push(o(String(l),b))}const m=new Set(["area","base","br","col","embed","hr","img","input","link","meta","param","source","track","wbr"]);for(;p=a.exec(s);)if(p[1]){const l=p[1],b=p[0][1]==="/",y=p[0][p[0].length-2]==="/"||m.has(l),{props:S,attrs:E,directives:$,bound:A}=$t(p[2]||"",t,n),_={props:{},attrs:{}};for(const T in S)_.props[T]=S[T];for(const T in E)_.attrs[T]=E[T];if(_.attrs&&Object.prototype.hasOwnProperty.call(_.attrs,"key")&&!(_.props&&Object.prototype.hasOwnProperty.call(_.props,"key")))try{_.props.key=_.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=l.toLowerCase(),Z=T[B]??[];if(_.attrs)for(const M of Z)A&&A.includes(M)&&M in _.attrs&&!(_.props&&M in _.props)&&(_.props[M]=_.attrs[M],delete _.attrs[M]);if((l.includes("-")||!!n?.__customElements?.has?.(l))&&A&&_.attrs){const M=new Set(["id","name","data-key","key"]);for(const U of A)if(U in _.attrs&&!(_.props&&U in _.props)){const q=U.includes("-")?U.split("-").map((I,z)=>z===0?I:I.charAt(0).toUpperCase()+I.slice(1)).join(""):U;_.props[q]=_.attrs[U],M.has(U)||delete _.attrs[U]}_.isCustomElement=!0}}catch{}if($&&Object.keys($).some(T=>T==="model"||T.startsWith("model:")))try{const T=Symbol.for("cer.registry"),B=globalThis[T],Z=!!(B&&typeof B.has=="function"&&B.has(l)),te=!!(n&&(n.__customElements instanceof Set&&n.__customElements.has(l)||Array.isArray(n.__isCustomElements)&&n.__isCustomElements.includes(l)));if(!!(l.includes("-")||te||Z))for(const q of Object.keys($)){if(q!=="model"&&!q.startsWith("model:"))continue;const I=$[q],z=I.arg??(q.includes(":")?q.split(":",2)[1]:void 0),H=I.value,K=z??"modelValue",re=W,k=ce,P=n?n._state||n:void 0;let R;typeof H=="string"&&n?R=re(P,H):R=H,_.props[K]=R;try{const L=Q(K);_.attrs||(_.attrs={}),R!==void 0&&(_.attrs[L]=R)}catch{}_.isCustomElement=!0;const O=`update:${Q(K)}`,j="on"+O.charAt(0).toUpperCase()+O.slice(1);_.props[j]=function(L){const se=L.detail!==void 0?L.detail:L.target?L.target.value:void 0;if(!P)return;const ge=re(P,typeof H=="string"?H:String(H));(Array.isArray(se)&&Array.isArray(ge)?JSON.stringify([...se].sort())!==JSON.stringify([...ge].sort()):se!==ge)&&(k(P,typeof H=="string"?H:String(H),se),n?.requestRender?n.requestRender():n?._requestRender&&n._requestRender())},delete $[q]}}catch{}if(Object.keys($).length>0&&(_.directives={...$}),b){const T=ne(C,u,h.length===1&&ae(h[0])&&h[0].tag==="#text"?typeof h[0].children=="string"?h[0].children:"":h.length?h:void 0,c),B=f.pop();B?(C=B.tag,u=B.props,c=B.key,h=B.children,h.push(T)):(v.push(T),C=null,u={},c=void 0,h=[])}else y?C?h.push(ne(l,_,void 0,void 0)):v.push(ne(l,_,void 0,void 0)):(C&&f.push({tag:C,props:u,children:h,key:c}),C=l,u=_,h=[])}else if(typeof p[3]<"u"){const l=Number(p[3]),b=t[l],y=`interp-${l}`;g(b,y)}else if(p[4]){const l=p[4],b=C?h:v,y=l.split(/({{\d+}})/);for(const S of y){if(!S)continue;const E=S.match(/^{{(\d+)}}$/);if(E){const $=Number(E[1]),A=t[$],_=`interp-${$}`;g(A,_)}else{const $=`text-${w++}`;b.push(o(S,$))}}}const x=v.filter(l=>ae(l)&&l.tag==="#text"?typeof l.children=="string"&&l.children.trim()!=="":!0);return x.length===1?x[0]:x.length>1?x:ne("div",{},"","fallback-root")}function G(e,...t){const r=t[t.length-1],i=typeof r=="object"&&r&&!Array.isArray(r)?r:void 0;return Et(e,t,i)}const Ee=e=>e?typeof URLSearchParams>"u"?{}:Object.fromEntries(new URLSearchParams(e)):{},F=(e,t)=>{for(const r of e){const i=[],n=r.path.replace(/:[^/]+/g,a=>(i.push(a.slice(1)),"([^/]+)")),o=new RegExp(`^${n}$`),s=t.match(o);if(s){const a={};return i.forEach((f,p)=>{a[f]=s[p+1]}),{route:r,params:a}}}return{route:null,params:{}}},ke={};async function He(e){if(e.component)return e.component;if(e.load){if(ke[e.path])return ke[e.path];try{const t=await e.load();return ke[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 qe(e){const{routes:t,base:r="",initialUrl:i}=e;let n,o,s,a,f,p,h;const C=async(v,d)=>{const g=t.find(m=>F([m],v.path).route!==null);if(g?.beforeEnter)try{const m=await g.beforeEnter(v,d);return typeof m=="string"?(await w(m,!0),!1):m!==!1}catch(m){return console.error("beforeEnter error",m),!1}return!0},u=async(v,d)=>{const g=t.find(m=>F([m],v.path).route!==null);if(g?.onEnter)try{const m=await g.onEnter(v,d);return typeof m=="string"?(await w(m,!0),!1):m!==!1}catch(m){return console.error("onEnter error",m),!1}return!0},c=(v,d)=>{const g=t.find(m=>F([m],v.path).route!==null);if(g?.afterEnter)try{g.afterEnter(v,d)}catch(m){console.error("afterEnter error",m)}},w=async(v,d=!1)=>{try{const g={path:v.replace(r,"")||"/",query:{}},m=F(t,g.path);if(!m)throw new Error(`No route found for ${g.path}`);const x=s.getState(),l={path:g.path,params:m.params,query:g.query};if(!await C(l,x)||!await u(l,x))return;typeof window<"u"&&typeof document<"u"&&(d?window.history.replaceState({},"",r+v):window.history.pushState({},"",r+v)),s.setState(l),c(l,x)}catch(g){console.error("Navigation error:",g)}};if(typeof window<"u"&&typeof document<"u"){n=()=>{const d=new URL(window.location.href),g=d.pathname.replace(r,"")||"/",m=Ee(d.search);return{path:g,query:m}},o=n();const v=F(t,o.path);s=Se({path:o.path,params:v.params,query:o.query}),a=async(d=!1)=>{const g=n();await w(g.path,d)},window.addEventListener("popstate",()=>a(!0)),f=d=>w(d,!1),p=d=>w(d,!0),h=()=>window.history.back()}else{n=()=>{const g=new URL(i||"/","http://localhost"),m=g.pathname.replace(r,"")||"/",x=Ee(g.search);return{path:m,query:x}},o=n();const v=F(t,o.path);s=Se({path:o.path,params:v.params,query:o.query}),a=async()=>{const g=n();await d(g.path)};const d=async g=>{try{const m={path:g.replace(r,"")||"/",query:{}},x=F(t,m.path);if(!x)throw new Error(`No route found for ${m.path}`);const l=s.getState(),b={path:m.path,params:x.params,query:m.query},y=t.find(S=>F([S],b.path).route!==null);if(y?.beforeEnter)try{const S=await y.beforeEnter(b,l);if(typeof S=="string"){await d(S);return}if(S===!1)return}catch{return}if(y?.onEnter)try{const S=await y.onEnter(b,l);if(typeof S=="string"){await d(S);return}if(S===!1)return}catch{return}if(s.setState(b),y?.afterEnter)try{y.afterEnter(b,l)}catch{}}catch{}};f=async g=>d(g),p=async g=>d(g),h=()=>{}}return{store:s,push:f,replace:p,back:h,subscribe:s.subscribe,matchRoute:v=>F(t,v),getCurrent:()=>s.getState(),resolveRouteComponent:He}}function Ct(e,t){return F(e,t)}function At(e){const t=qe(e);return $e("router-view",{async render(){if(!t)return G`<div>Router not initialized.</div>`;const r=t.getCurrent(),{path:i}=r,n=t.matchRoute(i);if(!n.route)return G`<div>Not found</div>`;try{const o=await t.resolveRouteComponent(n.route);if(typeof o=="string")return{tag:o,props:{},children:[]};if(typeof o=="function"){const s=o(),a=s instanceof Promise?await s:s;return typeof a=="string"?{tag:a,props:{},children:[]}:a}return G`<div>Invalid route component</div>`}catch{return G`<div>Invalid route component</div>`}},onConnected(r){t&&typeof t.subscribe=="function"&&t.subscribe(()=>{typeof r.requestRender=="function"&&r.requestRender()})}}),$e("router-link",{state:{},props:{to:{type:String,default:""},tag:{type:String,default:"a"},replace:{type:Boolean,default:!1},exact:{type:Boolean,default:!1},activeClass:{type:String,default:"active"},exactActiveClass:{type:String,default:"exact-active"},ariaCurrentValue:{type:String,default:"page"},disabled:{type:Boolean,default:!1},external:{type:Boolean,default:!1},class:{type:String,default:""},style:{type:String,default:Ce`
|
|
62
62
|
[aria-disabled="true"] {
|
|
63
63
|
pointer-events: none;
|
|
64
64
|
opacity: 0.5;
|
|
65
65
|
}
|
|
66
|
-
`}},style:r=>r.style,render:r=>{const i=t.getCurrent(),n=r.to,
|
|
67
|
-
${
|
|
66
|
+
`}},style:r=>r.style,render:r=>{const i=t.getCurrent(),n=r.to,o=r.exact,s=r.exactActiveClass,a=r.activeClass,f=r.ariaCurrentValue,p=r.tag,h=r.disabled,C=r.external,u=i.path===n,c=o?u:i&&typeof i.path=="string"?i.path.startsWith(n):!1,w=u?`aria-current="${f}"`:"",v=(r.class||"").split(/\s+/).filter(Boolean),d={};for(const b of v)d[b]=!0;const g={...d,[a]:c,[s]:u},m=p==="button",x=h?m?'disabled aria-disabled="true" tabindex="-1"':'aria-disabled="true" tabindex="-1"':"",l=C&&(p==="a"||!p)?'target="_blank" rel="noopener noreferrer"':"";return G`
|
|
67
|
+
${Oe().when(m,G`
|
|
68
68
|
<button
|
|
69
69
|
part="button"
|
|
70
|
-
:class="${
|
|
71
|
-
${
|
|
70
|
+
:class="${g}"
|
|
71
|
+
${w}
|
|
72
72
|
${x}
|
|
73
73
|
${l}
|
|
74
74
|
@click="navigate"
|
|
75
75
|
><slot></slot></button>
|
|
76
|
-
`).otherwise(
|
|
76
|
+
`).otherwise(G`
|
|
77
77
|
<a
|
|
78
78
|
part="link"
|
|
79
79
|
href="${n}"
|
|
80
|
-
:class="${
|
|
81
|
-
${
|
|
80
|
+
:class="${g}"
|
|
81
|
+
${w}
|
|
82
82
|
${x}
|
|
83
83
|
${l}
|
|
84
84
|
@click="navigate"
|
|
85
85
|
><slot></slot></a>
|
|
86
86
|
`).done()}
|
|
87
|
-
`},navigate:(r,i)=>{if(i.disabled){r.preventDefault();return}i.external&&(i.tag==="a"||!i.tag)||(r.preventDefault(),i.replace?t.replace(i.to):t.push(i.to))}}),t}exports.GlobalEventBus=V;exports.component
|
|
87
|
+
`},navigate:(r,i)=>{if(i.disabled){r.preventDefault();return}i.external&&(i.tag==="a"||!i.tag)||(r.preventDefault(),i.replace?t.replace(i.to):t.push(i.to))}}),t}exports.GlobalEventBus=V;exports.component=$e;exports.createStore=Se;exports.css=Ce;exports.each=Ne;exports.emit=De;exports.eventBus=ee;exports.html=G;exports.initRouter=At;exports.listen=Je;exports.match=Oe;exports.matchRoute=F;exports.matchRouteSSR=Ct;exports.off=Fe;exports.on=Ue;exports.once=Ke;exports.parseQuery=Ee;exports.renderToString=fe;exports.resolveRouteComponent=He;exports.useRouter=qe;exports.when=Ie;
|
|
88
88
|
//# sourceMappingURL=custom-elements-runtime.cjs.js.map
|