essor 0.0.11 → 0.0.12

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/essor.cjs.js CHANGED
@@ -1,55 +1,58 @@
1
1
  'use strict';
2
2
 
3
3
  /**
4
- * essor v0.0.11
4
+ * essor v0.0.12
5
5
  * (c) 2023-Present jiangxd <jiangxd2016@gmail.com>
6
6
  * @license MIT
7
7
  **/
8
- var nt="0.0.11";var rt=t=>t!==null&&typeof t=="object";var D=Array.isArray;function K(t){return typeof t=="string"}function st(t){return t==null}var d=t=>typeof t=="function";function B(t){return t===!1||t===null||t===void 0}function q(t){return Array.isArray(t)?t.flat():[t]}function g(t,e){return K(t)?t.indexOf(e)===0:!1}var ot=t=>t.replaceAll(/[A-Z]+/g,(e,n)=>`${n>0?"-":""}${e.toLocaleLowerCase()}`);var it=t=>t.charAt(0).toUpperCase()+t.slice(1);var Tt=Object.defineProperty,ct=Object.getOwnPropertySymbols,Ot=Object.prototype.hasOwnProperty,At=Object.prototype.propertyIsEnumerable,at=(t,e,n)=>e in t?Tt(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,A=(t,e)=>{for(var n in e||(e={}))Ot.call(e,n)&&at(t,n,e[n]);if(ct)for(var n of ct(e))At.call(e,n)&&at(t,n,e[n]);return t},j=t=>t!==null&&typeof t=="object",pt=Array.isArray;function jt(t){return typeof t=="string"}function xt(t){return t===null}function Pt(t){return $.call(t)==="[object Set]"}function $t(t){return $.call(t)==="[object WeakMap]"}function Lt(t){return $.call(t)==="[object WeakSet]"}function Rt(t){return $.call(t)==="[object Map]"}var J=t=>typeof t=="function",ut=t=>["string","number","boolean","symbol","undefined"].includes(typeof t)||xt(t);function lt(t){return t?t&&typeof t=="object"&&t.nodeType===1&&typeof t.nodeName=="string":!1}var $=Object.prototype.toString,Wt=Object.prototype.hasOwnProperty,Ht=(t,e)=>Wt.call(t,e),L=(t,e)=>t!==e&&(t===t||e===e),Ft=Function.prototype;function It(t,e){return jt(t)?t.indexOf(e)===0:!1}function x(t,e){return Array.isArray(e)?e.includes(t):J(e)?e(t):!1}function ft(t,...e){console.warn.apply(console,[`[Essor warn]: ${t}`].concat(e));}var b=null,_=null,U=new WeakMap,G=new WeakMap,Z=new Set,z=new WeakMap,Dt=["push","pop","shift","unshift","splice","sort","reverse"];function R(t,e){if(!b&&!_)return;let n=G.get(t);n||(n=new Map,G.set(t,n));let r=n.get(e);r||(r=new Set,n.set(e,r)),b&&r.add(b);let o=U.get(t);o||(o=new Map,U.set(t,o));let s=o.get(e);s||(s=new Set,o.set(e,s)),_&&s.add(_);}function E(t,e){let n=G.get(t);if(!n)return;let r=n.get(e);r&&r.forEach(s=>Z.has(s)&&s());let o=U.get(t);if(o){let s=o.get(e);s&&s.forEach(c=>c.run());}}var X=class{constructor(t,e=!1){this._value=t,this._shallow=e;}get value(){return R(this,"_sv"),this.__triggerObject(),this._value}__triggerObject(){!ut(this._value)&&!lt(this._value)&&!this._shallow&&k(this._value);}set value(t){h(t)&&(console.warn("Signal cannot be set to another signal, use .peek() instead"),t=t.peek()),L(t,this._value)&&(this._value=t,!ut(this._value)&&!lt(this._value)&&this.__triggerObject(),E(this,"_sv"));}peek(){return this._value}};function W(t){return h(t)?t:new X(t)}function le(t){return new X(t,!0)}function h(t){return t instanceof X}var dt=class{constructor(t){this.fn=t;let e=_;_=this,this._value=this.fn(),_=e;}peek(){return this._value}run(){let t=this.fn();L(t,this._value)&&(this._value=t,E(this,"_cv"));}get value(){return R(this,"_cv"),this._value}};function Kt(t){return new dt(t)}function ht(t){return t instanceof dt}function M(t){function e(){let n=b;b=e,t(),b=n;}return Z.add(e),e(),()=>{Z.delete(e),b=null;}}function mt(t,e){return Object.entries(t).reduce((r,[o,s])=>(r[o]=x(o,e)||h(s)?s:W(s),r),{})}function Bt(t,e){return t?h(t)?t.peek():pt(t)?t.map(n=>Bt(n,e)):j(t)?Object.entries(t).reduce((n,[r,o])=>(x(r,e)?n[r]=o:n[r]=h(o)?o.peek():w(o)?gt(o):o,n),{}):t:{}}var vt=Symbol("useReactive");function w(t){return t&&t[vt]===!0}function qt(t){Dt.forEach(e=>{let n=Array.prototype[e];R(t,"length"),Object.defineProperty(t,e,{value(...r){let o=n.apply(this,r);return ["push","pop","shift","unshift","splice","sort","reverse"].includes(e)&&E(t,"length"),o},enumerable:!1,writable:!0,configurable:!0});});}function k(t,e){return bt(t,e,!1)}function fe(t,e){return bt(t,e,!0)}function gt(t){if(!j(t)||!w(t))return t;let e=Array.isArray(t)?[]:{};for(let n in t)if(Ht(t,n)){let r=t[n];w(r)?e[n]=gt(r):h(r)?e[n]=r.peek():e[n]=r;}return e}function bt(t,e,n=!1){if(!j(t)||w(t))return t;if(z.has(t))return z.get(t);if(Array.isArray(t)&&qt(t),Pt(t)||Rt(t)||Lt(t)||$t(t))return t;let r={get(s,c,i){if(c===vt||It(c,"_"))return !0;let a=Reflect.get(s,c,i),l=h(a)?a.value:a;return x(c,e)?l:(R(s,c),j(l)&&!n?k(l):l)},set(s,c,i,a){if(x(c,e))return Reflect.set(s,c,i,a),!0;let l=Reflect.get(s,c,a);h(l)&&(l=l.value),h(i)&&(i=i.value);let u=Reflect.set(s,c,i,a);return L(i,l)&&E(s,c),u},deleteProperty(s,c){let i=Reflect.get(s,c),a=Reflect.deleteProperty(s,c);return i!==void 0&&E(s,c),a}},o=new Proxy(t,r);return z.set(t,o),o}function zt(t,e,n){return Jt(t,e,n)}function Jt(t,e,n){let r;h(t)||ht(t)?r=()=>t.value:w(t)?r=()=>A({},t):pt(t)?r=()=>t.map(i=>h(i)||ht(i)?i.value:w(i)?A({},i):J(i)?i():ft("Invalid source",i)):J(t)?r=t:(ft("Invalid source type",t),r=Ft);let o,s=()=>{let i=r();(n!=null&&n.deep||L(i,o))&&(e&&e(i,o),o=i);},c=M(s);return n!=null&&n.immediate&&s(),c}var P=0,Q=new Map;function Ut(t){let{state:e,getters:n,actions:r}=t,o=A({},e!=null?e:{}),s=k(e!=null?e:{}),c=[],i=[],l=A({state:s},{patch$(u){Object.assign(s,u),c.forEach(f=>f(s)),i.forEach(f=>f(s));},subscribe$(u){c.push(u);},unsubscribe$(u){let f=c.indexOf(u);f!==-1&&c.splice(f,1);},onAction$(u){i.push(u);},reset$(){Object.assign(s,o);}});for(let u in n){let f=n[u];f&&zt(Kt(f.bind(s,s)),p=>{l[u]=p;});}for(let u in r){let f=r[u];f&&(l[u]=f.bind(s));}return Q.set(P,l),++P,l}function he(t){return function(){return Q.has(P)?Q.get(P):Ut(t)}}var Y=class S{constructor(e,n){this.template=e,this.props=n,this.proxyProps={},this.context={},this.emitter=new Set,this.mounted=!1,this.rootNode=null,this.hooks={mounted:new Set,destroy:new Set},this.trackMap=new Map,this.proxyProps=mt(n,r=>g(r,"on")||g(r,"update"));}addEventListener(){}removeEventListener(){}get firstChild(){var e,n;return (n=(e=this.rootNode)==null?void 0:e.firstChild)!=null?n:null}get isConnected(){var e,n;return (n=(e=this.rootNode)==null?void 0:e.isConnected)!=null?n:!1}addHook(e,n){var r;(r=this.hooks[e])==null||r.add(n);}getContext(e){return S.context[e]}setContext(e,n){S.context[e]=n;}inheritNode(e){this.context=e.context,this.hooks=e.hooks,Object.assign(this.proxyProps,e.proxyProps),this.rootNode=e.rootNode,this.trackMap=e.trackMap;let n=this.props;this.props=e.props,this.patchProps(n);}mount(e,n){var r,o,s,c;if(!d(this.template))throw new Error("Template must be a function");if(this.isConnected)return (o=(r=this.rootNode)==null?void 0:r.mount(e,n))!=null?o:[];S.ref=this,this.rootNode=this.template(k(this.proxyProps,["children"])),S.ref=null,this.mounted=!0;let i=(c=(s=this.rootNode)==null?void 0:s.mount(e,n))!=null?c:[];return this.hooks.mounted.forEach(a=>a()),this.patchProps(this.props),i}unmount(){var e;this.hooks.destroy.forEach(n=>n()),Object.values(this.hooks).forEach(n=>n.clear()),(e=this.rootNode)==null||e.unmount(),this.rootNode=null,this.proxyProps={},this.mounted=!1,this.emitter.forEach(n=>n());}getNodeTrack(e,n){let r=this.trackMap.get(e);return r||(r={cleanup:()=>{}},this.trackMap.set(e,r)),n||r.cleanup(),r}patchProps(e){var n,r,o,s,c;for(let[i,a]of Object.entries(e))if(g(i,"on")&&((n=this.rootNode)!=null&&n.nodes)){let l=i.slice(2).toLowerCase(),u=a,f=m(this.rootNode.nodes[0],l,u);this.emitter.add(f);}else if(i==="ref")h(a)?e[i].value=(r=this.rootNode)==null?void 0:r.nodes[0]:d(a)&&e[i]((o=this.rootNode)==null?void 0:o.nodes[0]);else if(g(i,"update"))e[i]=h(a)?a.value:a;else if(i!=="children"){let l=(c=(s=this.proxyProps)[i])!=null?c:s[i]=W(a),u=this.getNodeTrack(i);u.cleanup=M(()=>{l.value=d(a)?a():a;});}this.props=e;}};Y.ref=null;Y.context={};var N=Y;function ye(t,e){return K(t)&&(Yt(t)&&(t=Vt(t),e={1:e}),t===""&&(e={0:e}),t=Gt(t)),d(t)?new N(t,e):new kt(t,e)}function v(t){return t instanceof N||t instanceof kt}function Gt(t){t=Xt(t);let e=document.createElement("template");return e.innerHTML=t,e}function Ne(t){return t.children}var Ct="area,base,br,col,embed,hr,img,input,link,meta,param,source,track,wbr",Zt="a,abbr,acronym,address,applet,area,article,aside,audio,b,base,basefont,bdi,bdo,bgsound,big,blink,blockquote,body,br,button,canvas,caption,center,cite,code,col,colgroup,command,content,data,datalist,dd,del,details,dfn,dialog,dir,div,dl,dt,em,embed,fieldset,figcaption,figure,font,footer,form,frame,frameset,h1,h2,h3,h4,h5,h6,head,header,hgroup,hr,html,i,iframe,image,img,input,ins,kbd,keygen,label,legend,li,link,listing,main,map,mark,marquee,menu,menuitem,meta,meter,nav,nobr,noframes,noscript,object,ol,optgroup,option,output,p,param,picture,plaintext,pre,progress,q,rb,rp,rt,rtc,ruby,s,samp,script,section,select,shadow,small,source,spacer,span,strike,strong,style,sub,summary,sup,table,tbody,td,template,textarea,tfoot,th,thead,time,title,tr,track,tt,u,ul,var,video,wbr,xmp";function yt(t){if(v(t)||t instanceof Node)return t;let e=B(t)?"":String(t);return document.createTextNode(e)}function y(t,e,n=null){let r=v(n)?n.firstChild:n;v(e)?e.mount(t,r):r?r.before(e):t.append(e);}function T(t){v(t)?t.unmount():t.parentNode&&t.remove();}function Et(t,e,n){y(t,e,n),T(n);}function Nt(t,e,n){if(e==="class"){typeof n=="string"?t.className=n:Array.isArray(n)?t.className=n.join(" "):n&&typeof n=="object"&&(t.className=Object.entries(n).reduce((r,[o,s])=>r+(s?` ${o}`:""),"").trim());return}if(e==="style"){if(typeof n=="string")t.style.cssText=n;else if(n&&typeof n=="object"){let r=n;Object.keys(r).forEach(o=>{t.style.setProperty(ot(o),String(r[o]));});}return}B(n)?t.removeAttribute(e):n===!0?t.setAttribute(e,""):t instanceof HTMLInputElement?t.value=String(n):t.setAttribute(e,String(n));}function Qt(t,e){if(t instanceof HTMLInputElement)switch(t.type){case"checkbox":return m(t,"change",()=>{e(!!t.checked);});case"date":return m(t,"change",()=>{e(t.value?t.value:"");});case"file":return m(t,"change",()=>{t.files&&e(t.files);});case"number":return m(t,"input",()=>{let n=Number.parseFloat(t.value);e(Number.isNaN(n)?"":String(n));});case"radio":return m(t,"change",()=>{e(t.checked?t.value:"");});case"text":return m(t,"input",()=>{e(t.value);})}if(t instanceof HTMLSelectElement)return m(t,"change",()=>{e(t.value);});if(t instanceof HTMLTextAreaElement)return m(t,"input",()=>{e(t.value);})}var _t=Promise.resolve();function _e(t){return t?_t.then(t):_t}function m(t,e,n){return t.addEventListener(e,n),()=>t.removeEventListener(e,n)}function Xt(t){let e=Ct.split(","),n=[],r=[],o=/<\/?([\da-z-]+)([^>]*)>/gi,s=0;for(;;){let c=o.exec(t);if(!c)break;let[i,a]=c,l=i[1]==="/";if(r.push(t.slice(s,c.index)),s=c.index+i.length,l){for(;n.length>0&&n[n.length-1]!==a;){let u=n.pop();u&&r.push(`</${u}>`);}n.length>0&&n.pop();}else e.includes(a)||n.push(a);r.push(i);}for(r.push(t.slice(s));n.length>0;){let c=n.pop();c&&r.push(`</${c}>`);}return r.join("")}function Yt(t){return Zt.split(",").includes(t)}function Vt(t){return Ct.split(",").includes(t)?`<${t}/>`:`<${t}></${t}>`}function te(){let t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",e="",n=t.length;for(let r=0;r<8;r++)e+=t.charAt(Math.floor(Math.random()*n));return e}function ee(t,e,n,r){let o=new Map,s=Array.from(e.values()),c=s.length;if(e.size>0&&n.length===0){if(t.childNodes.length===c+(r?1:0))t.innerHTML="",r&&y(t,r);else {let u=document.createRange(),f=s[0],p=v(f)?f.firstChild:f;u.setStartBefore(p),r?u.setEndBefore(r):u.setEndAfter(t),u.deleteContents();}return s.forEach(u=>{v(u)&&u.unmount();}),o}let i=[],a=re(n),l=0;for(let[u,f]of n.entries()){let p=s[l],C=H(p,u);for(;p&&!a.has(C);)T(p),e.delete(C),p=s[++l],C=H(p,u);let tt=H(f,u),I=e.get(tt);if(I&&(f=ne(t,I,f)),p)if(p===I)l++;else {let et=document.createComment("");y(t,et,p),i.push([et,f]);}else y(t,f,r);o.set(tt,f);}return i.forEach(([u,f])=>Et(t,f,u)),e.forEach((u,f)=>{u.isConnected&&!o.has(f)&&T(u);}),o}function ne(t,e,n){return e===n?e:v(e)&&v(n)&&e.template===n.template?(n.inheritNode(e),n):e instanceof Text&&n instanceof Text?(e.textContent!==n.textContent&&(e.textContent=n.textContent),e):(Et(t,n,e),n)}function re(t){let e=new Map;for(let[n,r]of t.entries()){let o=H(r,n);e.set(o,r);}return e}function H(t,e){if(v(t)){let n=t.key;if(n!=null)return String(n)}return `_$${e}$`}var kt=class St{constructor(e,n,r){this.template=e,this.props=n,this.key=r,this.treeMap=new Map,this.mounted=!1,this.nodes=[],this.provides={},this.trackMap=new Map,this.parent=null;}get firstChild(){var e;return (e=this.nodes[0])!=null?e:null}get isConnected(){return this.mounted}addEventListener(){}removeEventListener(){}mount(e,n){var r;if(this.parent=e,this.isConnected)return this.nodes.forEach(c=>y(e,c,n)),this.nodes;this.key=this.key||te();let o=this.template.content.cloneNode(!0),s=o.firstChild;return (r=s==null?void 0:s.hasAttribute)!=null&&r.call(s,"_svg_")&&(s.remove(),s==null||s.childNodes.forEach(c=>{o.append(c);})),this.nodes=Array.from(o.childNodes),this.mapNodeTree(e,o),y(e,o,n),this.patchNodes(this.props),this.mounted=!0,this.nodes}unmount(){this.trackMap.forEach(e=>{var n,r;(n=e.cleanup)==null||n.call(e),(r=e.lastNodes)==null||r.forEach(o=>{e.isRoot?T(o):o instanceof St&&o.unmount();});}),this.trackMap.clear(),this.treeMap.clear(),this.nodes.forEach(e=>T(e)),this.nodes=[],this.mounted=!1;}mapNodeTree(e,n){let r=1;this.treeMap.set(0,e);let o=s=>{s.nodeType!==Node.DOCUMENT_FRAGMENT_NODE&&this.treeMap.set(r++,s);let c=s.firstChild;for(;c;)o(c),c=c.nextSibling;};o(n);}patchNodes(e){for(let n in e){let r=Number(n),o=this.treeMap.get(r);if(o){let s=this.props[n];this.patchNode(n,o,s,r===0);}}this.props=e;}getNodeTrack(e,n,r){var o;let s=this.trackMap.get(e);return s||(s={cleanup:()=>{}},n&&(s.lastNodes=new Map),r&&(s.isRoot=!0),this.trackMap.set(e,s)),(o=s.cleanup)==null||o.call(s),s}inheritNode(e){this.mounted=e.mounted,this.nodes=e.nodes,this.trackMap=e.trackMap,this.treeMap=e.treeMap;let n=this.props;this.props=e.props,this.patchNodes(n);}patchNode(e,n,r,o){for(let s in r)if(s==="children"&&r.children)if(D(r.children))r.children.filter(Boolean).forEach((c,i)=>{var a;let[l,u]=D(c)?c:[c,null],f=st(u)?null:(a=this.treeMap.get(u))!=null?a:null,p=`${e}:${s}:${i}`,C=this.getNodeTrack(p,!0,o);Mt(C,n,l,f);});else {let c=`${e}:${s}:0`,i=this.getNodeTrack(c,!0,o);Mt(i,n,r.children,null);}else if(s==="ref")h(r[s])?r[s].value=n:d(r[s])&&r[s](n);else if(g(s,"on")){let c=s.slice(2).toLocaleLowerCase(),i=this.getNodeTrack(`${e}:${s}`),a=r[s];i.cleanup=m(n,c,a);}else if(!g(s,"update")){let c=this.getNodeTrack(`${e}:${s}`),i=r[s],a=h(i)?i:W(i);wt(c,n,s,a.value);let l=M(()=>{a.value=h(i)?i.value:i,wt(c,n,s,a.value);}),u,f=`update${it(s)}`;r[f]&&(u=Qt(n,p=>{r[f](p);})),c.cleanup=()=>{l&&l(),u&&u();};}}};function wt(t,e,n,r){let o=e;o.setAttribute&&(d(r)?t.cleanup=M(()=>{Nt(o,n,r());}):Nt(o,n,r));}function Mt(t,e,n,r){d(n)?t.cleanup=M(()=>{let o=q(n()).map(yt);t.lastNodes=ee(e,t.lastNodes,o,r);}):q(n).forEach((o,s)=>{let c=yt(o);t.lastNodes.set(String(s),c),y(e,c,r);});}function we(t){var e;F("onMounted"),(e=N.ref)==null||e.addHook("mounted",t);}function Me(t){var e;F("onDestroy"),(e=N.ref)==null||e.addHook("destroy",t);}function F(t){N.ref||console.error(`"${t}" can only be called within the component function body
9
- and cannot be used in asynchronous or deferred calls.`);}function Ce(t,e){var n;F("useProvide"),(n=N.ref)==null||n.setContext(t,e);}function Ee(t,e){var n;return F("useInject"),((n=N.ref)==null?void 0:n.getContext(t))||e}function se(t){return Object.entries(t).map(([e,n])=>`${e}=${JSON.stringify(escape(String(n)))}`).join(" ")}function V(t,e){if(d(t))return t(e);let n=Array.isArray(t)?t.reduce((s,c,i)=>(s[i+1]={template:c},s),{}):t,r={},o={};if(rt(n))for(let[s,c]of Object.entries(n)){let i=e[s];if(i){for(let a in i)g(a,"on")&&d(i[a])&&delete i[a];if(i.children){for(let[a,l]of i.children)r[l]||(r[l]=[]),r[l].push(a);delete i.children;}}o[s]={template:c.template,props:i};}return Object.entries(o).map(([s,{template:c,props:i}])=>{let a=c;return i&&(a+=` ${se(i)}`),r[s]&&(a+=r[s].map(l=>V(l,i)).join("")),a}).join("")}function ke(t,e){return V(t,e)}function Se(t,e,n={}){e.innerHTML=V(t,n);}globalThis&&(globalThis.__essor_version__=nt);/**
10
- * @estjs/shared v0.0.11
8
+ var bt="0.0.12";var yt=t=>t!==null&&typeof t=="object";var q=Array.isArray;function X(t){return typeof t=="string"}function Nt(t){return typeof t=="symbol"}function St(t){return t==null}var b=t=>typeof t=="function";function Y(t){return t===!1||t===null||t===void 0}function z(t){return Array.isArray(t)?t.flat():[t]}function w(t,e){return X(t)?t.indexOf(e)===0:!1}function _t(t){return t.replaceAll(/["&'<>]/g,e=>{switch(e){case"&":return "&amp;";case"<":return "&lt;";case">":return "&gt;";case'"':return "&quot;";case"'":return "&#039;";default:return e}})}var wt=t=>t.replaceAll(/[A-Z]+/g,(e,r)=>`${r>0?"-":""}${e.toLocaleLowerCase()}`);var Ct=t=>t.charAt(0).toUpperCase()+t.slice(1);var re=Object.defineProperty,Et=Object.getOwnPropertySymbols,ne=Object.prototype.hasOwnProperty,se=Object.prototype.propertyIsEnumerable,Mt=(t,e,r)=>e in t?re(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,D=(t,e)=>{for(var r in e||(e={}))ne.call(e,r)&&Mt(t,r,e[r]);if(Et)for(var r of Et(e))se.call(e,r)&&Mt(t,r,e[r]);return t},_=t=>t!==null&&typeof t=="object",k=Array.isArray;function ie(t){return typeof t=="string"}function ct(t){return R.call(t)==="[object Set]"}function $t(t){return R.call(t)==="[object WeakMap]"}function Lt(t){return R.call(t)==="[object WeakSet]"}function at(t){return R.call(t)==="[object Map]"}var ut=t=>typeof t=="function",It=t=>R.call(t)==="[object Object]";function Tt(t){return ie(t)?!Number.isNaN(Number(t)):!1}var R=Object.prototype.toString,oe=Object.prototype.hasOwnProperty,lt=(t,e)=>oe.call(t,e),$=(t,e)=>t!==e&&(t===t||e===e),Wt=Function.prototype;function A(t,e){return Array.isArray(e)?e.includes(t):ut(e)?e(t):!1}function x(t,...e){console.warn.apply(console,[`[Essor warn]: ${t}`].concat(e));}var tt=[],et=[],Ot=Promise.resolve(),rt=!1;function ft(t){return t?Ot.then(t):Ot}function ce(t){tt.includes(t)||(tt.push(t),Ht());}function Ht(){rt||(rt=!0,ft(le));}function ae(t){ue(t,et);}function ue(t,e){e.includes(t)||(e.push(t),Ht());}function le(){rt=!1,fe();let t;for(;t=tt.shift();)t&&t();}function fe(){for(;et.length>0;){let t=et.shift();t&&t();}}var y=null,he=null,nt=new WeakMap,V=new WeakMap,L=Symbol("ReactiveSymbol"),I=Symbol("__raw"),Pt=Symbol("SignalValueKey"),jt=Symbol("ComputedValueKey"),st=Symbol("ReactiveArrayKey"),g=Symbol("ReactiveCollectionKey"),M=Symbol("ReactiveWeakCollectionKey"),it=!1,B=new Set;function f(t,e){if(!y&&!he)return;let r=nt.get(t);r||(r=new Map,nt.set(t,r));let n=r.get(e);n||(n=new Set,r.set(e,n)),y&&n.add(y);}function v(t,e){let r=nt.get(t);if(!r)return;let n=r.get(e);n&&n.forEach(s=>{if(lt(s,"active")&&!s.active){n.delete(s);return}it?B.add(s):s();});}var Ft=class{constructor(t,e=!1){this.__signal=!0,this._shallow=e,this._value=t;}get value(){return f(this,Pt),_(this._value)&&!this._shallow?W(this._value):this._value}set value(t){p(t)&&(t=t.peek()),$(t,this._value)&&(this._value=t,v(this,Pt));}peek(){return this._value}};function J(t){return p(t)?t:new Ft(t)}function Kt(t){return new Ft(t,!0)}function p(t){return !!(t&&(t!=null&&t.__signal))}var pe=class{constructor(t){this.fn=t,this.__computed=!0;let e=y;y=this.run.bind(this),this._value=this.fn(),y=e;}peek(){return this._value}run(){let t=this.fn();$(t,this._value)&&(this._value=t,v(this,jt));}get value(){return f(this,jt),this._value}};function de(t){return new pe(t)}function qt(t){return !!(t&&t.__computed)}function me(t,e){return e==="sync"?()=>t():e==="pre"?()=>ae(t):()=>{ft(()=>ce(t));}}function T(t,e={}){let{flush:r="pre",onTrack:n,onTrigger:s}=e;function i(){let a=y;y=i.init?i:i.scheduler,t(),s&&s(),y=a;}let o=me(i,r);return i.scheduler=o,i.init=!0,i.active=!0,n&&n(),i(),()=>{i.active=!1,y=null;}}function zt(t,e){return !t||!_(t)?(x("initialValues must be an object,will return initial value!",t),t):Object.entries(t).reduce((n,[s,i])=>(n[s]=A(s,e)||p(i)?i:J(i),n),{})}function ge(t,e){return t?p(t)?t.peek():k(t)?t.map(r=>ge(r,e)):It(t)?Object.entries(t).reduce((r,[n,s])=>(A(n,e)?r[n]=s:r[n]=p(s)?s.peek():O(s)?h(s):s,r),{}):t:{}}function O(t){return !!(t&&typeof t=="object"&&t[L])}function W(t,e){return ht(t,!1,e)}function Xe(t,e){return ht(t,!0,e)}function h(t){return !_(t)||!O(t)?t:t[I]}var ve=(t,e)=>({get(r,n,s){if(n===L)return !0;if(n===I)return r;let i=Reflect.get(r,n,s),o=p(i)?i.value:i;return A(n,e)?o:(f(r,n),_(o)&&!t?W(o):o)},set(r,n,s,i){if(A(n,e))return Reflect.set(r,n,s,i),!0;let o=Reflect.get(r,n,i);p(o)&&(o=o.value),p(s)&&(s=s.value);let a=Reflect.set(r,n,s,i);return $(s,o)&&v(r,n),a},deleteProperty(r,n){let s=Reflect.get(r,n),i=Reflect.deleteProperty(r,n);return s!==void 0&&v(r,n),i}}),At=be();function be(){let t={};return ["includes","indexOf","lastIndexOf"].forEach(e=>{t[e]=function(...r){let n=this;for(let i=0,o=this.length;i<o;i++)f(n,`${i}`);let s=n[e](...r);return s===-1||s===!1?n[e](...r):s};}),["push","pop","shift","unshift","splice","sort","reverse","fill","copyWithin"].forEach(e=>{t[e]=function(...r){let n=h(this),s=n[e].apply(this,r);return v(n,st),s};}),["forEach","map","filter","reduce","reduceRight","some","every","find","findIndex","findLast","findLastIndex","entries","keys","values"].forEach(e=>{t[e]=function(...r){let n=h(this);return f(n,st),n[e].apply(this,r)};}),t}var ye=(t,e)=>({get(r,n,s){if(n===L)return !0;if(n===I)return r;if(At.hasOwnProperty(n))return Reflect.get(At,n,s);let i=Reflect.get(r,n,s);return A(n,e)?i:(Tt(n)&&f(r,n),f(r,"length"),_(i)&&!t?ht(i):i)},set(r,n,s,i){let o=Reflect.get(r,n,i),a=Reflect.set(r,n,s,i);return $(s,o)&&(Tt(n)&&v(r,n),n==="length"&&v(r,"length")),a}}),Ne={get(t,e){return e===L?!0:e===I?t:((e===Symbol.iterator||e==="size")&&f(t,g),Reflect.get(lt(xt,e)&&e in t?xt:t,e,t))}},Se={get(t,e){return e===L?!0:e===I?t:Reflect.get(lt(kt,e)&&e in t?kt:t,e,t)}},xt={get(t){let e=h(this);return f(e,g),e.get(t)},set(t,e){let r=h(this),n=r.set(t,e);return v(r,g),n},add(t){let e=h(this),r=e.add(t);return v(e,g),r},has(t){let e=h(this);return f(e,g),e.has(t)},delete(t){let e=h(this),r=e.has(t),n=e.delete(t);return r&&v(e,g),n},clear(){let t=h(this),e=t.size>0,r=t.clear();return e&&v(t,g),r},forEach(t,e){let r=h(this);f(r,g),r.forEach((n,s)=>{t.call(e,n,s,r);});},get size(){let t=h(this);return f(t,g),t.size},keys(){let t=h(this);return f(t,g),t.keys()},values(){let t=h(this);return f(t,g),t.values()},entries(){let t=h(this);return f(t,g),t.entries()},[Symbol.iterator](){let t=h(this);return f(t,g),t[Symbol.iterator]()}},kt={get(t){let e=h(this);return f(e,M),e.get(t)},set(t,e){let r=h(this),n=r.set(t,e);return v(r,M),n},add(t){let e=h(this),r=e.add(t);return v(e,M),r},has(t){let e=h(this);return f(e,M),e.has(t)},delete(t){let e=h(this),r=e.delete(t);return v(e,M),r}};function ht(t,e=!1,r){if(!_(t)||O(t))return t;if(V.has(t))return V.get(t);let n;k(t)?(f(t,st),n=ye(e,r)):ct(t)||at(t)?(f(t,g),n=Ne):Lt(t)||$t(t)?(f(t,M),n=Se):n=ve(e,r);let s=new Proxy(t,n);return V.set(t,s),s}function Ye(t){if(!O(t)){x("clearReactive: argument must be a reactive object");return}if($t(t)||Lt(t)){x("clearReactive: WeakMap and WeakSet are not clearable");return}_e(()=>{k(t)?t.length=0:ct(t)||at(t)?t.clear():_(t)&&Object.keys(t).forEach(e=>{delete t[e];});});}function _e(t){try{it=!0,t();}finally{it=!1,we();}}function we(){B.size>0&&(B.forEach(t=>t()),B.clear());}function Ve(t,e,r){return Me(t,e,r)}var Rt=void 0,U,ot=!1;function Ce(t){U=t,ot||(ot=!0,ft(Ee));}function Ee(){U==null||U(),U=null,ot=!1;}function Me(t,e,{deep:r,immediate:n}={}){let s,i=k(t);if(p(t)||qt(t))s=()=>t.value;else if(O(t))s=()=>D({},t);else if(i)s=()=>t.map(c=>Te(c));else if(ut(t))s=t;else return x("Invalid source type",t),Wt;if(e&&r){let c=s,u=r===!0?1/0:r;s=()=>j(c(),u);}let o=i?Array.from({length:t.length}).fill(Rt):Rt,a=!1,l=()=>{let c=s();$(c,o)&&(n&&e&&(e(c,o),o=c),a&&e&&Ce(()=>{e(c,o),o=c;}),!a&&(o=c));},d=T(l,{flush:"sync"});return a=!0,n&&l(),d}function Te(t){return p(t)||qt(t)?t.value:O(t)?D({},t):ut(t)?t():(x("Invalid source",t),Wt)}function j(t,e=1/0,r){if(e<=0||!_(t)||(r=r||new Set,r.has(t)))return t;if(r.add(t),e--,p(t))j(t.value,e,r);else if(k(t))for(let n of t)j(n,e,r);else if(ct(t)||at(t))t.forEach(n=>{j(n,e,r);});else if(It(t))for(let n in t)j(t[n],e,r);return t}function Oe(t){let{state:e,getters:r,actions:n}=t,s=D({},e!=null?e:{}),i=W(e!=null?e:{}),o=[],a=[],d=D({state:i},{patch$(c){Object.assign(i,c),o.forEach(u=>u(i)),a.forEach(u=>u(i));},subscribe$(c){o.push(c);},unsubscribe$(c){let u=o.indexOf(c);u!==-1&&o.splice(u,1);},onAction$(c){a.push(c);},reset$(){Object.assign(i,s);}});for(let c in r){let u=r[c];u&&Object.defineProperty(d,c,{get(){return de(u.bind(i,i)).value},enumerable:!0,configurable:!0});}for(let c in n){let u=n[c];u&&(d[c]=u.bind(i));}return d}function tr(t){return function(){return Oe(t)}}var Pe=Object.defineProperty,Bt=Object.getOwnPropertySymbols,je=Object.prototype.hasOwnProperty,Ae=Object.prototype.propertyIsEnumerable,Ut=(t,e,r)=>e in t?Pe(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,xe=(t,e)=>{for(var r in e||(e={}))je.call(e,r)&&Ut(t,r,e[r]);if(Bt)for(var r of Bt(e))Ae.call(e,r)&&Ut(t,r,e[r]);return t},dt=class H{constructor(){this.hooks={mounted:new Set,destroy:new Set};}addEventListener(){}removeEventListener(){}addHook(e,r){var n;(n=this.hooks[e])==null||n.add(r);}getContext(e){return H.context[e]}setContext(e,r){H.context[e]=r;}initRef(){H.ref=this;}removeRef(){H.ref=null;}};dt.ref=null;dt.context={};var E=dt,mt=class extends E{constructor(t,e,r){super(),this.template=t,this.props=e,this.key=r,this.proxyProps={},this.emitter=new Set,this.mounted=!1,this.rootNode=null,this.context={},this.trackMap=new Map,this.proxyProps=zt(e,n=>w(n,"on")||w(n,"update")),this.key=this.key||e.key;}get firstChild(){var t,e;return (e=(t=this.rootNode)==null?void 0:t.firstChild)!=null?e:null}get isConnected(){var t,e;return (e=(t=this.rootNode)==null?void 0:t.isConnected)!=null?e:!1}inheritNode(t){this.context=t.context,this.hooks=t.hooks,Object.assign(this.proxyProps,t.proxyProps),this.rootNode=t.rootNode,this.trackMap=t.trackMap;let e=this.props;this.props=t.props,this.patchProps(e);}mount(t,e){var r,n,s,i;if(!b(this.template))throw new Error("Template must be a function");if(this.isConnected)return (n=(r=this.rootNode)==null?void 0:r.mount(t,e))!=null?n:[];this.initRef(),this.rootNode=this.template(W(this.proxyProps,["children"])),this.removeRef(),this.mounted=!0;let o=(i=(s=this.rootNode)==null?void 0:s.mount(t,e))!=null?i:[];return this.hooks.mounted.forEach(a=>a()),this.patchProps(this.props),o}unmount(){var t;this.hooks.destroy.forEach(e=>e()),Object.values(this.hooks).forEach(e=>e.clear()),(t=this.rootNode)==null||t.unmount(),this.rootNode=null,this.proxyProps={},this.mounted=!1,this.emitter.forEach(e=>e());}getNodeTrack(t,e){let r=this.trackMap.get(t);return r||(r={cleanup:()=>{}},this.trackMap.set(t,r)),e||r.cleanup(),r}patchProps(t){var e,r,n,s;for(let[i,o]of Object.entries(t))if(w(i,"on")&&((e=this.rootNode)!=null&&e.nodes)){let a=i.slice(2).toLowerCase(),l=o,d=N(this.rootNode.nodes[0],a,l);this.emitter.add(d);}else if(i==="ref")t[i].value=(r=this.rootNode)==null?void 0:r.nodes[0];else if(w(i,"update"))t[i]=p(o)?o.value:o;else if(i!=="children"){let a=(s=(n=this.proxyProps)[i])!=null?s:n[i]=J(o),l=this.getNodeTrack(i);l.cleanup=T(()=>{a.value=b(o)?o():o;});}this.props=t;}};function cr(t,e,r){return X(t)&&(Ie(t)&&(t=We(t),e={1:e}),t===""&&(e={0:e}),t=ke(t)),b(t)?new mt(t,e,r):new Vt(t,e,r)}function ar(t){return t instanceof mt}function S(t){return t instanceof mt||t instanceof Vt}function ke(t){let e=document.createElement("template");return e.innerHTML=Le(t),e}function ur(t){return t.children}var Xt="area,base,br,col,embed,hr,img,input,link,meta,param,source,track,wbr",Re="a,abbr,acronym,address,applet,area,article,aside,audio,b,base,basefont,bdi,bdo,bgsound,big,blink,blockquote,body,br,button,canvas,caption,center,cite,code,col,colgroup,command,content,data,datalist,dd,del,details,dfn,dialog,dir,div,dl,dt,em,embed,fieldset,figcaption,figure,font,footer,form,frame,frameset,h1,h2,h3,h4,h5,h6,head,header,hgroup,hr,html,i,iframe,image,img,input,ins,kbd,keygen,label,legend,li,link,listing,main,map,mark,marquee,menu,menuitem,meta,meter,nav,nobr,noframes,noscript,object,ol,optgroup,option,output,p,param,picture,plaintext,pre,progress,q,rb,rp,rt,rtc,ruby,s,samp,script,section,select,shadow,small,source,spacer,span,strike,strong,style,sub,summary,sup,table,tbody,td,template,textarea,tfoot,th,thead,time,title,tr,track,tt,u,ul,var,video,wbr,xmp";function Dt(t){if(S(t)||t instanceof Node)return t;let e=Y(t)?"":String(t);return document.createTextNode(e)}function C(t,e,r=null){let n=S(r)?r.firstChild:r;S(e)?e.mount(t,n):n?n.before(e):t.append(e);}function F(t){S(t)?t.unmount():t.parentNode&&t.remove();}function Yt(t,e,r){C(t,e,r),F(r);}function Jt(t,e,r){if(e==="class"){typeof r=="string"?t.className=r:Array.isArray(r)?t.className=r.join(" "):r&&typeof r=="object"&&(t.className=Object.entries(r).reduce((n,[s,i])=>n+(i?` ${s}`:""),"").trim());return}if(e==="style"){if(typeof r=="string")t.style.cssText=r;else if(r&&typeof r=="object"){let n=r;Object.keys(n).forEach(s=>{t.style.setProperty(wt(s),String(n[s]));});}return}Y(r)?t.removeAttribute(e):r===!0?t.setAttribute(e,""):t instanceof HTMLInputElement?t.value=String(r):t.setAttribute(e,String(r));}function $e(t,e){if(t instanceof HTMLInputElement)switch(t.type){case"checkbox":return N(t,"change",()=>{e(!!t.checked);});case"date":return N(t,"change",()=>{e(t.value?t.value:"");});case"file":return N(t,"change",()=>{t.files&&e(t.files);});case"number":return N(t,"input",()=>{let r=Number.parseFloat(t.value);e(Number.isNaN(r)?"":String(r));});case"radio":return N(t,"change",()=>{e(t.checked?t.value:"");});case"text":return N(t,"input",()=>{e(t.value);})}if(t instanceof HTMLSelectElement)return N(t,"change",()=>{e(t.value);});if(t instanceof HTMLTextAreaElement)return N(t,"input",()=>{e(t.value);})}var Gt=Promise.resolve();function lr(t){return t?Gt.then(t):Gt}function N(t,e,r){return t.addEventListener(e,r),()=>t.removeEventListener(e,r)}function Le(t){let e=Xt.split(","),r=[],n=[],s=/<\/?([\da-z-]+)([^>]*)>/gi,i=0;for(;;){let o=s.exec(t);if(!o)break;let[a,l]=o,d=a[1]==="/";if(n.push(t.slice(i,o.index)),i=o.index+a.length,d){for(;r.length>0&&r[r.length-1]!==l;){let c=r.pop();c&&n.push(`</${c}>`);}r.length>0&&r.pop();}else e.includes(l)||r.push(l);n.push(a);}for(n.push(t.slice(i));r.length>0;){let o=r.pop();o&&n.push(`</${o}>`);}return n.join("")}function Ie(t){return Re.split(",").includes(t)}function We(t){return Xt.split(",").includes(t)?`<${t}/>`:`<${t}></${t}>`}function He(t,e,r,n){let s=new Map,i=Array.from(e.values()),o=i.length;if(e.size>0&&r.length===0){if(t.childNodes.length===o+(n?1:0))t.innerHTML="",n&&C(t,n);else {let c=document.createRange(),u=i[0],m=S(u)?u.firstChild:u;c.setStartBefore(m),n?c.setEndBefore(n):c.setEndAfter(t),c.deleteContents();}return i.forEach(c=>{S(c)&&c.unmount();}),s}let a=[],l=Ke(r),d=0;for(let[c,u]of r.entries()){let m=i[d],P=G(m,c);for(;m&&!l.has(P);)F(m),e.delete(P),m=i[++d],P=G(m,c);let gt=G(u,c),Q=e.get(gt);if(Q&&(u=Fe(t,Q,u)),m)if(m===Q)d++;else {let vt=document.createComment("");C(t,vt,m),a.push([vt,u]);}else C(t,u,n);s.set(gt,u);}return a.forEach(([c,u])=>Yt(t,u,c)),e.forEach((c,u)=>{c.isConnected&&!s.has(u)&&F(c);}),s}function Fe(t,e,r){return e===r?e:S(e)&&S(r)&&e.template===r.template?(r.inheritNode(e),r):e instanceof Text&&r instanceof Text?(e.textContent!==r.textContent&&(e.textContent=r.textContent),e):(Yt(t,r,e),r)}function Ke(t){let e=new Map;for(let[r,n]of t.entries()){let s=G(n,r);e.set(s,n);}return e}function G(t,e){if(S(t)){let r=t.key;if(r!=null)return String(r)}return `_$${e}$`}var Vt=class te{constructor(e,r,n){this.template=e,this.props=r,this.key=n,this.treeMap=new Map,this.mounted=!1,this.nodes=[],this.provides={},this.trackMap=new Map,this.parent=null,this.key=this.key||r.key;}get firstChild(){var e;return (e=this.nodes[0])!=null?e:null}get isConnected(){return this.mounted}addEventListener(){}removeEventListener(){}mount(e,r){var n;if(this.parent=e,this.isConnected)return this.nodes.forEach(o=>C(e,o,r)),this.nodes;let s=this.template.content.cloneNode(!0),i=s.firstChild;return (n=i==null?void 0:i.hasAttribute)!=null&&n.call(i,"_svg_")&&(i.remove(),i==null||i.childNodes.forEach(o=>{s.append(o);})),this.nodes=Array.from(s.childNodes),this.mapNodeTree(e,s),C(e,s,r),this.patchNodes(this.props),this.mounted=!0,this.nodes}unmount(){this.trackMap.forEach(e=>{var r,n;(r=e.cleanup)==null||r.call(e),(n=e.lastNodes)==null||n.forEach(s=>{e.isRoot?F(s):s instanceof te&&s.unmount();});}),this.trackMap.clear(),this.treeMap.clear(),this.nodes.forEach(e=>F(e)),this.nodes=[],this.mounted=!1;}mapNodeTree(e,r){let n=1;this.treeMap.set(0,e);let s=i=>{i.nodeType!==Node.DOCUMENT_FRAGMENT_NODE&&this.treeMap.set(n++,i);let o=i.firstChild;for(;o;)s(o),o=o.nextSibling;};s(r);}patchNodes(e){for(let r in e){let n=Number(r),s=this.treeMap.get(n);if(s){let i=this.props[r];this.patchNode(r,s,i,n===0);}}this.props=e;}getNodeTrack(e,r,n){var s;let i=this.trackMap.get(e);return i||(i={cleanup:()=>{}},r&&(i.lastNodes=new Map),n&&(i.isRoot=!0),this.trackMap.set(e,i)),(s=i.cleanup)==null||s.call(i),i}inheritNode(e){this.mounted=e.mounted,this.nodes=e.nodes,this.trackMap=e.trackMap,this.treeMap=e.treeMap;let r=this.props;this.props=e.props,this.patchNodes(r);}patchNode(e,r,n,s){for(let i in n)if(i==="children"&&n.children)if(q(n.children))n.children.filter(Boolean).forEach((o,a)=>{var l;let[d,c]=q(o)?o:[o,null],u=St(c)?null:(l=this.treeMap.get(c))!=null?l:null,m=`${e}:${i}:${a}`,P=this.getNodeTrack(m,!0,s);Qt(P,r,d,u);});else {let o=`${e}:${i}:0`,a=this.getNodeTrack(o,!0,s);Qt(a,r,n.children,null);}else if(i==="ref")n[i].value=r;else if(w(i,"on")){let o=i.slice(2).toLocaleLowerCase(),a=this.getNodeTrack(`${e}:${i}`),l=n[i];a.cleanup=N(r,o,l);}else if(!w(i,"update")){let o=this.getNodeTrack(`${e}:${i}`),a=n[i],l=p(a)?a:J(a);Zt(o,r,i,l.value);let d=T(()=>{l.value=p(a)?a.value:a,Zt(o,r,i,l.value);}),c,u=`update${Ct(i)}`;n[u]&&(c=$e(r,m=>{n[u](m);})),o.cleanup=()=>{d&&d(),c&&c();};}}};function Zt(t,e,r,n){let s=e;s.setAttribute&&(b(n)?t.cleanup=T(()=>{Jt(s,r,n());}):Jt(s,r,n));}function Qt(t,e,r,n){b(r)?t.cleanup=T(()=>{let s=z(r()).map(Dt);t.lastNodes=He(e,t.lastNodes,s,n);}):z(r).forEach((s,i)=>{let o=Dt(s);t.lastNodes.set(String(i),o),C(e,o,n);});}function fr(t){var e;Z("onMounted"),(e=E.ref)==null||e.addHook("mounted",t);}function hr(t){var e;Z("onDestroy"),(e=E.ref)==null||e.addHook("destroy",t);}function Z(t,e){E.ref||console.error(`"${t}"(key: ${Nt(e)?e.toString():e}) can only be called within the component function body
9
+ and cannot be used in asynchronous or deferred calls.`);}function pr(t,e){var r;Z("useProvide",t),(r=E.ref)==null||r.setContext(t,e);}function dr(t,e){var r;return Z("useInject",t),((r=E.ref)==null?void 0:r.getContext(t))||e}function mr(){return Kt(null)}function qe(t){return Object.entries(t).map(([e,r])=>e==="children"||b(r)?"":`${e}="${_t(String(r))}"`).filter(Boolean).join(" ")}function ze(t){Object.keys(t).forEach(e=>{b(t[e])&&delete t[e],p(t[e])&&(t[e]=t[e].value);});}function Be(t,e,r,n,s,i){if(p(t))n.template+=t.value;else if(t instanceof ee){let o=i?String(i):`${r}`;s[o]||(s[o]=[]);let a=t.mount();s[o].push(b(a)?a(e):p(a)?a.value:a);}else n.template+=b(t)?t(e):String(t);}var ee=class pt extends E{constructor(e,r={},n){super(),this.template=e,this.props=r,this.key=n,this.childNodesMap={},this.processedTemplates={};}mount(){this.initRef();let e=this.render();return this.removeRef(),e}initTemplates(){let e=Array.isArray(this.template)?this.template.reduce((r,n,s)=>(r[s+1]={template:n},r),{}):this.template;yt(e)&&Object.entries(e).forEach(([r,n])=>{let s=xe({},this.props[r]);ze(s),s.children&&s.children.forEach(i=>{let[o,a]=q(i)?i:[i,null];if(b(o)){let l=o(s);Be(l,s,r,n,this.childNodesMap,a);}else n.template+=p(o)?o.value:String(o);}),this.processedTemplates[r]={template:n.template,props:s};});}render(){if(b(this.template)){let e=this.template(this.props);return e instanceof pt?e.mount():String(e)}return this.template instanceof pt?this.template.mount():(this.initTemplates(),Object.entries(this.processedTemplates).map(([e,{template:r,props:n}])=>{let s=r;return n&&Object.keys(n).length>0&&(s+=` ${qe(n)}`),this.childNodesMap[e]&&(s=s.replace("<!>",this.renderChildren(this.childNodesMap[e]))),s}).join(""))}renderChildren(e){return z(e).map(String).join("")}};function Ue(t,e){return new ee(t,e)}function gr(t,e){return Ue(t,e).mount()}globalThis&&(globalThis.__essor_version__=bt);/**
10
+ * @estjs/shared v0.0.12
11
11
  * (c) 2023-Present jiangxd <jiangxd2016@gmail.com>
12
12
  * @license MIT
13
13
  **/
14
14
  /**
15
- * @estjs/signal v0.0.11
15
+ * @estjs/signal v0.0.12
16
16
  * (c) 2023-Present jiangxd <jiangxd2016@gmail.com>
17
17
  * @license MIT
18
18
  **/
19
19
  /**
20
- * @estjs/template v0.0.11
20
+ * @estjs/template v0.0.12
21
21
  * (c) 2023-Present jiangxd <jiangxd2016@gmail.com>
22
22
  * @license MIT
23
23
  **/
24
24
 
25
- exports.ComponentNode = N;
26
- exports.Fragment = Ne;
27
- exports.TemplateNode = kt;
28
- exports.createStore = he;
29
- exports.essor_version = nt;
30
- exports.h = ye;
31
- exports.isComputed = ht;
32
- exports.isJsxElement = v;
33
- exports.isReactive = w;
34
- exports.isSignal = h;
35
- exports.nextTick = _e;
36
- exports.onDestroy = Me;
37
- exports.onMount = we;
38
- exports.renderSSG = Se;
39
- exports.renderTemplate = V;
40
- exports.renderToString = ke;
41
- exports.shallowReactive = fe;
42
- exports.shallowSignal = le;
43
- exports.signalObject = mt;
44
- exports.template = Gt;
45
- exports.unReactive = gt;
46
- exports.unSignal = Bt;
47
- exports.useComputed = Kt;
48
- exports.useEffect = M;
49
- exports.useInject = Ee;
50
- exports.useProvide = Ce;
51
- exports.useReactive = k;
52
- exports.useSignal = W;
53
- exports.useWatch = zt;
25
+ exports.ComponentNode = mt;
26
+ exports.Fragment = ur;
27
+ exports.TemplateNode = Vt;
28
+ exports.clearReactive = Ye;
29
+ exports.createStore = tr;
30
+ exports.essor_version = bt;
31
+ exports.h = cr;
32
+ exports.isComponent = ar;
33
+ exports.isComputed = qt;
34
+ exports.isJsxElement = S;
35
+ exports.isReactive = O;
36
+ exports.isSignal = p;
37
+ exports.nextTick = lr;
38
+ exports.onDestroy = hr;
39
+ exports.onMount = fr;
40
+ exports.renderToString = gr;
41
+ exports.shallowReactive = Xe;
42
+ exports.shallowSignal = Kt;
43
+ exports.signalObject = zt;
44
+ exports.ssg = Ue;
45
+ exports.template = ke;
46
+ exports.unReactive = h;
47
+ exports.unSignal = ge;
48
+ exports.useBatch = _e;
49
+ exports.useComputed = de;
50
+ exports.useEffect = T;
51
+ exports.useInject = dr;
52
+ exports.useProvide = pr;
53
+ exports.useReactive = W;
54
+ exports.useRef = mr;
55
+ exports.useSignal = J;
56
+ exports.useWatch = Ve;
54
57
  //# sourceMappingURL=essor.cjs.js.map
55
58
  //# sourceMappingURL=essor.cjs.js.map