ezh 0.2.4 → 0.2.5

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/lib/index.min.mjs CHANGED
@@ -1 +1 @@
1
- var e,t,i={441(e,t,i){i.d(t,{ye:()=>q,Mj:()=>X,N_:()=>he,Wt:()=>ce,Ix:()=>oe,On:()=>T,er:()=>G,te:()=>L,oo:()=>ie,LU:()=>R,wE:()=>ae,J0:()=>K});var r=i(537);const n={ariaAtomic:"aria-atomic",ariaAutoComplete:"aria-autocomplete",ariaBrailleLabel:"aria-braillelabel",ariaBrailleRoleDescription:"aria-brailleroledescription",ariaBusy:"aria-busy",ariaChecked:"aria-checked",ariaColCount:"aria-colcount",ariaColIndex:"aria-colindex",ariaColIndexText:"aria-colindextext",ariaColSpan:"aria-colspan",ariaCurrent:"aria-current",ariaDescription:"aria-description",ariaDisabled:"aria-disabled",ariaExpanded:"aria-expanded",ariaHasPopup:"aria-haspopup",ariaHidden:"aria-hidden",ariaInvalid:"aria-invalid",ariaKeyShortcuts:"aria-keyshortcuts",ariaLabel:"aria-label",ariaLevel:"aria-level",ariaLive:"aria-live",ariaModal:"aria-modal",ariaMultiLine:"aria-multiline",ariaMultiSelectable:"aria-multiselectable",ariaOrientation:"aria-orientation",ariaPlaceholder:"aria-placeholder",ariaPosInSet:"aria-posinset",ariaPressed:"aria-pressed",ariaReadOnly:"aria-readonly",ariaRequired:"aria-required",ariaRoleDescription:"aria-roledescription",ariaRowCount:"aria-rowcount",ariaRowIndex:"aria-rowindex",ariaRowIndexText:"aria-rowindextext",ariaRowSpan:"aria-rowspan",ariaSelected:"aria-selected",ariaSetSize:"aria-setsize",ariaSort:"aria-sort",ariaValueMax:"aria-valuemax",ariaValueMin:"aria-valuemin",ariaValueNow:"aria-valuenow",ariaValueText:"aria-valuetext",alignmentBaseline:"alignment-baseline",annotationXml:"annotation-xml",baselineShift:"baseline-shift",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",pointerEvents:"pointer-events",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strokeDasharray:"stroke-dasharray",strokeDashoffset:"stroke-dashoffset",strokeLinecap:"stroke-linecap",strokeLinejoin:"stroke-linejoin",strokeMiterlimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",style:"style",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",unicodeBidi:"unicode-bidi",vectorEffect:"vector-effect",wordSpacing:"word-spacing",writingMode:"writing-mode"},s={},a=[];Object.freeze(s),Object.freeze(a);const o=()=>!1,l=new Set,h=new Set,c=new r.ag,d=new Map,f=[],u=[],p={id:"",index:0,firstElement:null,attachTo:o,move:o,detachFrom:o,update:o,refresh:o,release:o,version:1,markChanged:o,watchMountChange:o,onMountChange:o};let m,v="",b=2e4,w=0,g=0;const y=new Map;let k=p,x=(e,t)=>document.createElement(e);const C={svg:(e,t)=>(t.Z(),document.createElementNS("http://www.w3.org/2000/svg",e)),math:(e,t)=>(t.Z(),document.createElementNS("http://www.w3.org/1998/Math/MathML",e)),foreignObject:(e,t)=>"foreignObject"!==e?document.createElement(e):(t.Z(),document.createElementNS("http://www.w3.org/2000/svg",e))},E=()=>{if(++g>=w){for(const e of h)if(h.delete(e),e.id)e.release();else if(--g<w){h.add(e);break}}else h.add(Object.create(p));m&&(m=setTimeout(E,b))},S=()=>{let e;do{for(;e=c.pop();){const{newChildren:t,parent:i}=e;t&&(i&&O(i)?(e.refresh(t),i.currentBefore=void 0):e.version&&e.watchMountChange("r",(e,t)=>{t&&(e.watchMountChange("r",void 0),c.O(e))}))}for(const[t,i]of d){const{parent:r}=t,n=!!r&&O(r);n!==i&&(d.set(t,n),t.onMountChange(n),e=s)}}while(e);if(w)for(const e of l)e.parent||h.add(e);else for(const e of l)e.parent||e.release();l.clear()},$=(e,t=[],i=0)=>{let r=e[i];for(;;){if(r&&void 0!==r.id)t.push(r);else if(null!=r)switch(typeof r){case"object":$(r,t);break;case"function":r=r();continue;case"boolean":case"number":case"bigint":r=""+r;default:t.push(new M("",r))}if(!(++i<e.length))break;r=e[i]}return t},B=(e,t,i)=>{let r;const n=e.length;let s=t,a=0;for(;a<n;){const t=e[a];if(t!==s[a]){if(a===s.length)return s;const e=s[a];if(!e||void 0===e.id){s=$(s,s.slice(0,a),a);continue}if(r!==s)break}r||t.parent===i||(r=e),a++}return a===s.length?r:s===t?$(s,e.slice(0,a),a):s},O=e=>{let t=e;do{if(t.parent===t)return!0;t=t.parent}while(t);return!1},z=(e,t,i,r)=>{let n,s,a;if(t!==e&&e.length){const o=[];let l;for(s=t.length,n=1e7;--s>=0;)if(a=t[s],a.parent===i){const e=s-a.index;e===n?(l.size++,a.index=s):(l={from:a.index,to:s,size:1},n=e,a.index=-o.push(l))}else 1e7!==n&&(n=1e7);const h=[];for(s=e.length-1;s>=0;)a=e[s],a.index<0?(l=o[-a.index-1],h.push(l),s-=l.size):(a.detachFrom(i),s--);let c,d,f=0;for(s=t.length-1;s>=0;)if(a=t[s],a.parent!==i)a.index=s--,a.attachTo(i);else{if(l=o[-a.index-1],d=l.size,c=h[f],a.index=s,!r){if(c===l){f++,s-=l.size,i.currentBefore=void 0;continue}if(c.from>l.from){n=f;do{d-=c.size,c=h[++n]}while(c.from>l.from&&d>0);if(d>0){s-=l.size,i.currentBefore=void 0,f=n;continue}}}n=s-l.size;do{a.move()}while(--s>n&&(a=t[s]))}}else for(s=t.length-1;s>=0;s--)a=t[s],a.index=s,i!==a.parent&&a.attachTo(i);i.currentBefore=void 0};class M{constructor(e,t){this.id=e,this.index=0,this.a5=t}id;parent;index;firstElement;attachTo(e){this.firstElement||(this.firstElement=document.createTextNode(this.a5));const{parent:t,firstElement:i,index:r}=this;this.id&&(t?(l.add(this),i.remove()):h.delete(this)),this.parent=e;let n=e.currentBefore;void 0===n&&(n=e.findNextSiblingElement(r)),e.element.insertBefore(i,n),e.currentBefore=i}move(){const{parent:e,index:t,firstElement:i}=this;let r=e.currentBefore;void 0===r&&(r=e.findNextSiblingElement(t)),e.element.insertBefore(i,r),e.currentBefore=i}detachFrom(e){this.parent===e&&(this.firstElement.remove(),this.parent=void 0,this.id&&l.add(this))}update(e){return this.a5!==e&&(this.a5=e,this.firstElement&&(this.firstElement.nodeValue=e)),!1}refresh(){}release(e){this.parent===e&&(e&&this.firstElement.remove(),y.delete(this.id))}a5}class j{constructor(e,t,i){this.id=e,this.index=0,this.newChildren=this.d=i?$(t):t||a}id;parent;index;newChildren;currentBefore;get element(){return this.parent.element}get firstElement(){const{d:e}=this;for(let t=0;t<e.length;t++){const i=e[t].firstElement;if(i)return i}return null}attachTo(e){const{parent:t,d:i,newChildren:r}=this;if(t){l.add(this);for(let e=i.length-1;e>=0;e--)i[e].detachFrom(this)}else h.delete(this);this.parent=e;const n=r||i;for(let e=n.length-1;e>=0;e--){const t=n[e];t.index=e,t.attachTo(this)}e.currentBefore=this.currentBefore,this.currentBefore=void 0,this.d=n,this.newChildren=void 0}move(){const{d:e,newChildren:t}=this;if(t)z(e,t,this,!0),this.d=t,this.newChildren=void 0;else{for(let t=e.length-1;t>=0;t--)e[t].move();this.currentBefore=void 0}}detachFrom(e){if(this.parent===e){const{d:e}=this;for(const t of e)t.detachFrom(this);this.parent=void 0,l.add(this)}}update(e,t){if(t){const e=B(this.d,t,this);if(e)return this.newChildren=e,!0}return!1}refresh(e){z(this.d,e,this),this.d=e,this.newChildren=void 0}release(e){if(this.parent===e){if(e){const{d:e}=this;for(const t of e)t.detachFrom(this)}y.delete(this.id)}}findNextSiblingElement(e){const t=this.newChildren||this.d;let i,r=e+1,n=t[r];for(;n;){if(i=n.firstElement,i)return i;n=t[++r]}return i=this.parent.currentBefore,void 0!==i?i:this.parent.findNextSiblingElement(this.index)}d}class A{constructor(e,t,i,r,n,o){if(this.id=e,this.index=0,this.firstElement=this.element=x(t,this),this.newChildren=this.d=o?$(r):r||a,i){if(this.l=s,this.q=-1,"select"===t){const e=this.element,t=i,r=t.value;if(r){t.value=void 0;const i=this.refresh;this.refresh=n=>{if(z(this.d,n,this),this.d=n,this.newChildren=void 0,Array.isArray(r)){const t=r,[i,n,s]=t;e.value=s;const a=t[3]=e=>i[n]=e.target.value;e.addEventListener("change",a)}else e.value=r;t.value=r,this.refresh=i}}}this.update(i),this.q=n??0}else this.l=i,this.q=0}id;element;parent;newChildren;index;currentBefore;firstElement;attachTo(e){const{parent:t,element:i,newChildren:r,index:n}=this;t?i.remove():h.delete(this),this.parent=e,r&&this.refresh(r);let s=e.currentBefore;void 0===s&&(s=e.findNextSiblingElement(n)),e.element.insertBefore(i,s),e.currentBefore=i}move(){const{parent:e,newChildren:t,index:i,element:r}=this;t&&this.refresh(t);let n=e.currentBefore;void 0===n&&(n=e.findNextSiblingElement(i)),e.element.insertBefore(r,n),e.currentBefore=r}detachFrom(e){this.parent===e&&(this.element.remove(),this.parent=void 0,l.add(this))}update(e,t){const{element:i,l:r,q:a}=this;if(r&&a){this.l=e;let t=a;for(const a in e){const o=e[a],l=r[a];if(o!==l)if(null!=o)switch(typeof o){case"string":{const e=n[a];e?i.setAttribute(e,o):i[a]=o;break}case"number":case"boolean":case"function":i[a]=o;break;default:if(Array.isArray(o)){const[e,t,r]=o;if(l){const[n,s,h,c]=l;if(h!==r&&i[a]!==r&&(i[a]=r),n===e&&s===t)o[3]=c;else{const r=o[3]=i=>e[t]=i.target[a];i.removeEventListener("change",c),i.addEventListener("change",r)}}else{i[a]=r;const n=o[3]=i=>e[t]=i.target[a];i.addEventListener("change",n)}break}if("style"===a){if(!l){const t=i.style,r={};let n=0;for(const e in o){const i=o[e];r[e]=i,n++,t[e]=i}e[a]=r,r.i=n;break}const t=i.style,r={};let n=0,s=l.i;for(const e in o){const i=o[e];r[e]=i,e in l&&s--,n++,i!==l[a]&&(t[e]=i)}if(e[a]=r,r.i=n,s)for(const e in l)if(!(e in o)&&(t[e]=null,! --s))break;break}i[a]=o}else switch(typeof l){case"string":{const e=n[a];e?this.element.removeAttribute(e):this.element[a]=o;break}case"object":l?Array.isArray(l)?i.removeEventListener("change",l[3]):l===s&&(i[a]=o):i[a]=o;break;default:i[a]=o}if(! --t)break}}if(t){const e=B(this.d,t,this);if(e)return this.newChildren=e,!0}return!1}refresh(e){z(this.d,e,this),this.d=e,this.newChildren=void 0}release(e){if(this.parent===e){e&&this.element.remove();const{d:t}=this;for(const e of t)e.release(this);y.delete(this.id)}}findNextSiblingElement(e){const t=this.newChildren||this.d;let i,r=e+1,n=t[r];for(;n;){if(i=n.firstElement,i)return i;n=t[++r]}return null}Z(){this.update=this.aF}aF(e,t){const{element:i,l:r,q:s}=this;if(r&&s){this.l=e;let t=s;for(const s in e){const a=e[s],o=r[s];if(a!==o)if(null!=a)switch(typeof a){case"string":i.setAttribute(n[s]??s,a);break;case"number":case"boolean":i.setAttribute(n[s]??s,""+a);break;case"function":i[s]=a;break;default:if("style"===s){if(!o){const t=i.style,r={};let n=0;for(const e in a){const i=a[e];r[e]=i,n++,t[e]=i}e[s]=r,r.i=n;break}const t=i.style,r={};let n=0,l=o.i;for(const e in a){const i=a[e];r[e]=i,e in o&&l--,n++,i!==o[s]&&(t[e]=i)}if(e[s]=r,r.i=n,l)for(const e in o)if(!(e in a)&&(t[e]=null,! --l))break;break}i[s]=a}else switch(typeof o){case"string":case"number":case"boolean":i.removeAttribute(n[s]??s);break;default:i[s]=a}if(! --t)break}}if(t){const e=B(this.d,t,this);if(e)return this.newChildren=e,!0}return!1}l;d;q}class _{constructor(e,t,i,r,n,s){this.id=e,this.index=0,this.version=1,this.Y=t,this.l=i,this.newChildren=this.d=s?$(r):r||a,this.q=n??0}id;parent;newChildren;index;version;state;get firstElement(){return this.h?.firstElement||null}attachTo(e){const{parent:t,newChildren:i,h:r}=this;this.parent=e,i?this.refresh(i):r&&(r.index=this.index,r.attachTo(e)),t||h.delete(this)}move(){const{newChildren:e,h:t}=this;e?this.refresh(e):t&&(t.index=this.index,t.move())}detachFrom(e){this.parent===e&&(this.h?.detachFrom(e),this.parent=void 0,l.add(this))}update(e,t){const{l:i,d:r,q:n}=this;if(this.l=e,t){const e=B(r,t,this.parent);if(e)return this.newChildren=e,!0}if(!this.newChildren&&n){let t=n;for(const n in i){if(i[n]!==e[n])return this.newChildren=r,!0;if(! --t)break}}return!1}refresh(e){const{parent:t,h:i,index:r}=this,n=k;k=this;let a=this.Y(this.l||s,e);if(a!==i)switch(typeof a){case"boolean":case"number":case"bigint":a=""+a;case"string":a=new M("",a),this.h=a,a.index=r,a.attachTo(t),i?.detachFrom(t);break;default:a?(this.h=a,a.index=r,a.attachTo(t),i?.detachFrom(t)):(this.h=void 0,i?.detachFrom(t))}else i&&(i.parent!==t?(i.index=r,i.attachTo(t)):i.index!==r&&(i.index=r,i.move()));this.d=e,this.newChildren=void 0,k=n}release(e){this.parent===e&&(this.h?.release(e),this.parent=void 0,y.delete(this.id),this.z&&(this.z=void 0,d.delete(this)))}markChanged(){return!this.newChildren&&(this.newChildren=this.d,!0)}watchMountChange(e,t){const{z:i,parent:r}=this;if(t){if(!i)return this.z=(new Map).set(e,t),void d.set(this,!!r&&O(r));i.set(e,t)}else i?.delete(e)&&(i.size||(this.z=void 0,d.delete(this)))}onMountChange(e){for(const[,t]of this.z)t(this,e)}Y;l;d;q;h;z}class N{constructor(e,t){this.id=e,this.element=t,this.parent=this}id;element;parent;currentBefore;findNextSiblingElement(e){return null}render(e){this.a6||(this.a6=new _(this.id,e,null,a),y.set(this.id,this.a6),this.a6.attachTo(this))}a6}const T=(e,t)=>{if(k.id){let i=e[t];i||(i=new Map,e[t]=i),i.set(k.id,k.version)}};let R=(e,t)=>{const i=e[t];if(i){for(const[e,t]of i){const i=y.get(e);i?.version===t&&i.markChanged()&&(c.av()&&queueMicrotask(S),c.O(i))}i.clear()}};const F=h.delete;h.delete=o;const L=(e,t=2e4)=>{if(e>=0&&t>=1e3){if(b=t,w&&clearTimeout(m),e)h.delete=F,m=setTimeout(E,b);else if(m){m=void 0;for(let e=0;e<w;e++)E();h.delete=o}return w=e,!0}return!1},P=()=>{v=u.pop()};var q;!function(e){e.render=(e,t)=>{const i=(f.length||"")+"|",r=new N(i,e);f.push(r),r.render(t)},e.$=(e,t,i,r,n,s)=>{const a=`${k.id}${e}${v}`;let o=y.get(a);return o?((i||r)&&o.update(i,r)&&c.O(o),o):(o=new A(a,t,i,r,n,s),y.set(a,o),o)},e.$c=(e,t,i,r,n,s)=>{const a=`${k.id}${e}${v}`;let o=y.get(a);return o?((i||r)&&o.update(i,r)&&c.O(o),o):(o=new _(a,t,i,r,n,s),y.set(a,o),o)},e.$f=(e,t,i)=>{const r=`${k.id}${e}${v}`;let n=y.get(r);return n?(t&&n.update(null,t)&&c.O(n),n):(n=new j(r,t,i),y.set(r,n),n)},e.$k=e=>(u.push(v),v=`${v||"{"}${e}}`,P),e.$n=e=>{const t=x;return x=C[e],()=>{x=t}},e.$s=(e,t)=>(e(),t),e.$t=(e,t,i)=>{const r=`${k.id}${e}${v}`;let n=y.get(r);return n?(i&&n.update(t),n):(n=new M(r,t),y.set(n.id,n),n)}}(q||(q={}));const I=Symbol(),D=Array.prototype,V=T;let U=(e,t)=>{U=R,U(e,t)};const W=e=>function(...t){const i=this.length;let r,n,s;switch(e){case D.push:r=i,n=r+t.length,s=i;break;case D.unshift:r=0,n=t.length,s=i;break;case D.fill:r=t[1],void 0===r||r<=-i?r=0:r<0&&(r=i+r),n=t[2],void 0===n||n>i?n=i:n<=-i?n=0:n<0&&(n=i+n),s=n;break;case D.sort:case D.reverse:r=n=0,s=i;break;case D.pop:r=n=i-1,s=i;break;case D.shift:r=n=0,s=i;break;default:r=t[0],r<0&&(r=i+r),n=t.length>2?t.length-2:0,s=t[1],void 0===s&&(s=i-r),s=s>0?s!==n?i:r+n:n?i:r,n+=r}const a=e.bind(this)(...t),o=this[I];let l;for(let e=r;e<n;e++){switch(l=this[e],typeof l){case"object":if(l){for(;e<n;)l=this[e],l&&!l[I]&&(this[e]=J(l)),e++;break}case"undefined":continue}break}return i!==this.length&&U(o,"length"),U(o,Symbol.iterator),a},Z={push:W(D.push),unshift:W(D.unshift),fill:W(D.fill),sort:W(D.sort),reverse:W(D.reverse),pop:W(D.pop),shift:W(D.shift),splice:W(D.splice)},H={get(e,t){if(t!==I){let i=e[t];if(i&&i===D[t]){const r=Z[t];if(r)return r.bind(e);i=i.bind(e)}return V(e[I],"length"!==t?Symbol.iterator:t),i}return e},set(e,t,i){if(t!==I){if(e[t]===i)return!0;const r=e[I];return i&&"object"==typeof i&&(i=J(i)),e[t]=i,"length"===t&&U(r,t),U(r,Symbol.iterator),!0}return((e,t)=>{const i=t.length,r=e.length;let n;for(let r=0;r<i;r++){let s=t[r];if(s&&"object"==typeof s){do{s=t[r],n=e[r],s?n?n!==s&&(n[I]=s):e[r]=J(s):e[r]=s}while(++r<i);break}if(null!=s){do{e[r]=t[r]}while(++r<i);break}e[r]=s}const s=e[I];r!==i&&(r>i&&(e.length=i),U(s,"length")),U(s,Symbol.iterator)})(e,i),!0},has:(e,t)=>(V(e[I],isNaN(parseInt(t))?t:Symbol.iterator),t in e),deleteProperty:(e,t)=>(isNaN(parseInt(t))||(t=Symbol.iterator),void 0!==e[t]&&U(e[I],t),delete e[t])},Y={get(e,t){if(t!==I){const i=e[t];return"id"!==t&&V(e[I],t),i}return e},set(e,t,i,r){if(t!==I){if(e[t]===i)return!0;const r=e[I];return i&&"object"==typeof i&&(i=J(i)),e[t]=i,U(r,t),!0}return((e,t,i)=>{const r={...e};let n;for(const s in i){delete r[s];const a=i[s];a&&"object"==typeof a&&(n=e[s],n)?n[I]=a:e[s]!==a&&(t[s]=a)}for(const e in r)delete t[e]})(e,r,i),!0},has:(e,t)=>(V(e[I],t),t in e),deleteProperty:(e,t)=>(void 0!==e[t]&&U(e[I],t),delete e[t])},J=e=>{let t;if(Array.isArray(e)){t=[];const i=e.length;for(let r=0;r<i;r++){let n=e[r];if(n&&"object"==typeof n){do{t[r]=(n=e[r])&&J(n)}while(++r<i);break}if(null!=n){do{t[r]=e[r]}while(++r<i);break}t[r]=n}e=new Proxy(t,H)}else{t={};for(const i in e){const r=e[i];t[i]=r&&"object"==typeof r?J(r):r}e=new Proxy(t,Y)}return t[I]={},e},G=(e,t)=>[e,t,e[t]],K=(e,t)=>{const i=k;if(i.id){let r=i.state;if(r){const{state:e,hook:t}=r;return t?.(++r.ver,e),e}const{state:n,hook:s}=r=i.state={state:J(e),ver:1,hook:t};return s&&(i.watchMountChange("s",(e,t)=>((e,t)=>{if(!t){const{state:t,hook:i}=e;e.ver=0,i(0,t)}})(r,t)),s(1,n)),n}return J(e)},X=({on:e,off:t})=>(K({},i=>{e&&1===i?e():t&&!i&&t()}),null);var Q=i(707);let ee=0;const te=K({ver:0});window.addEventListener("popstate",()=>{te.ver=++ee});const ie=(e,t)=>{const{pathname:i,search:r,hash:n}=window.location;e!==`${i}${r}${n}`&&(t?window.history.replaceState(void 0,"",e):window.history.pushState(void 0,"",e),queueMicrotask(()=>{te.ver=++ee}))},re="ezhEZH";class ne{constructor(e,t,i){this.com=e,this.b=Q.w.createPath(t+re),this.needAuth=i}com;needAuth;parseParam(e){const t=this.b.test(e);if(t)return delete t[re],t}buildUrl(e){throw new Error("WildcardRoute does not support buildUrl")}b}class se{constructor(e,t,i){this.com=e,this.b=Q.w.createPath(t),this.needAuth=i}com;needAuth;parseParam(e){return this.b.test(e)}buildUrl(e){return this.b.build(e)}b}const ae=(e,t,i=!0)=>t.endsWith("*")?new ne(e,t,i):new se(e,t,i),oe=({routes:e,notFound:t,checkAuth:i})=>{ee=te.ver;const{pathname:r,search:n,hash:s}=window.location,a=`${r}${n}${s}`,{$s:o,$k:l,$c:h}=q;for(const t in e){const r=e[t],n=r.parseParam(a);if(n){if(i&&r.needAuth){const e=i(a);if(e)return void ie(e)}return o(l(t),h("_",r.com,n,void 0,-1))}}return t?o(l("404"),h("_",t,{})):void 0},le=(e,t,i)=>{e.preventDefault();const{pathname:r,search:n,hash:s}=window.location;t!==`${r}${n}${s}`&&(i?window.history.replaceState(void 0,"",t):window.history.pushState(void 0,"",t),te.ver=++ee)},he=(e,t)=>{const{href:i,className:r,style:n,title:s,replace:a}=e,o=i?e=>le(e,i,a):void 0;return q.$("_","a",{className:r,style:n,title:s,href:i,onclick:o},t,-1,1)},ce=(e,t)=>{const{route:i,params:r,className:n,style:s,title:a,replace:o}=e,l=i.buildUrl(r);return q.$("_","a",{className:n,style:s,title:a,href:l,onclick:e=>le(e,l,o)},t,-1,1)}}},r={};function n(e){var t=r[e];if(void 0!==t)return t.exports;var s=r[e]={exports:{}};return i[e](s,s.exports,n),s.exports}n.m=i,e=[],n.O=(t,i,r,s)=>{if(!i){var a=1/0;for(c=0;c<e.length;c++){for(var[i,r,s]=e[c],o=!0,l=0;l<i.length;l++)(!1&s||a>=s)&&Object.keys(n.O).every(e=>n.O[e](i[l]))?i.splice(l--,1):(o=!1,s<a&&(a=s));if(o){e.splice(c--,1);var h=r();void 0!==h&&(t=h)}}return t}s=s||0;for(var c=e.length;c>0&&e[c-1][2]>s;c--)e[c]=e[c-1];e[c]=[i,r,s]},n.d=(e,t)=>{for(var i in t)n.o(t,i)&&!n.o(e,i)&&Object.defineProperty(e,i,{enumerable:!0,get:t[i]})},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t);export{n as __webpack_require__};t={1:0},n.C=e=>{var i,r,{__webpack_esm_ids__:s,__webpack_esm_modules__:a,__webpack_esm_runtime__:o}=e,l=0;for(i in a)n.o(a,i)&&(n.m[i]=a[i]);for(o&&o(n);l<s.length;l++)r=s[l],n.o(t,r)&&t[r]&&t[r][0](),t[s[l]]=0;n.O()},n.O.j=e=>0===t[e];import*as s from"./3.min.mjs";n.C(s);import*as a from"./2.min.mjs";n.C(a);var o=n.O(void 0,[3,2],()=>n(441));const l=(o=n.O(o)).ye,h=o.Mj,c=o.N_,d=o.Wt,f=o.Ix,u=o.On,p=o.er,m=o.te,v=o.oo,b=o.LU,w=o.wE,g=o.J0;export{l as $ezh,h as Effect,c as Link,d as RouteLink,f as Router,u as addComReader,p as bindData,m as configGC,v as navigate,b as refreshComReaders,w as route,g as useState};
1
+ var e,t,i={441(e,t,i){i.d(t,{ye:()=>q,Mj:()=>Q,N_:()=>ce,Wt:()=>de,Ix:()=>le,On:()=>T,er:()=>G,te:()=>L,oo:()=>re,LU:()=>R,wE:()=>oe,J0:()=>K});var r=i(537);const n={ariaAtomic:"aria-atomic",ariaAutoComplete:"aria-autocomplete",ariaBrailleLabel:"aria-braillelabel",ariaBrailleRoleDescription:"aria-brailleroledescription",ariaBusy:"aria-busy",ariaChecked:"aria-checked",ariaColCount:"aria-colcount",ariaColIndex:"aria-colindex",ariaColIndexText:"aria-colindextext",ariaColSpan:"aria-colspan",ariaCurrent:"aria-current",ariaDescription:"aria-description",ariaDisabled:"aria-disabled",ariaExpanded:"aria-expanded",ariaHasPopup:"aria-haspopup",ariaHidden:"aria-hidden",ariaInvalid:"aria-invalid",ariaKeyShortcuts:"aria-keyshortcuts",ariaLabel:"aria-label",ariaLevel:"aria-level",ariaLive:"aria-live",ariaModal:"aria-modal",ariaMultiLine:"aria-multiline",ariaMultiSelectable:"aria-multiselectable",ariaOrientation:"aria-orientation",ariaPlaceholder:"aria-placeholder",ariaPosInSet:"aria-posinset",ariaPressed:"aria-pressed",ariaReadOnly:"aria-readonly",ariaRequired:"aria-required",ariaRoleDescription:"aria-roledescription",ariaRowCount:"aria-rowcount",ariaRowIndex:"aria-rowindex",ariaRowIndexText:"aria-rowindextext",ariaRowSpan:"aria-rowspan",ariaSelected:"aria-selected",ariaSetSize:"aria-setsize",ariaSort:"aria-sort",ariaValueMax:"aria-valuemax",ariaValueMin:"aria-valuemin",ariaValueNow:"aria-valuenow",ariaValueText:"aria-valuetext",alignmentBaseline:"alignment-baseline",annotationXml:"annotation-xml",baselineShift:"baseline-shift",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",pointerEvents:"pointer-events",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strokeDasharray:"stroke-dasharray",strokeDashoffset:"stroke-dashoffset",strokeLinecap:"stroke-linecap",strokeLinejoin:"stroke-linejoin",strokeMiterlimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",style:"style",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",unicodeBidi:"unicode-bidi",vectorEffect:"vector-effect",wordSpacing:"word-spacing",writingMode:"writing-mode"},s={},a=[];Object.freeze(s),Object.freeze(a);const o=()=>!1,l=new Set,h=new Set,c=new r.ag,d=new Map,f=[],u=[],p={id:"",index:0,firstElement:null,attachTo:o,move:o,detachFrom:o,update:o,refresh:o,release:o,version:1,markChanged:o,watchMountChange:o,onMountChange:o};let m,v="",b=2e4,w=0,g=0;const y=new Map;let k=p,x=(e,t)=>document.createElement(e);const C={svg:(e,t)=>(t.Z(),document.createElementNS("http://www.w3.org/2000/svg",e)),math:(e,t)=>(t.Z(),document.createElementNS("http://www.w3.org/1998/Math/MathML",e)),foreignObject:(e,t)=>"foreignObject"!==e?document.createElement(e):(t.Z(),document.createElementNS("http://www.w3.org/2000/svg",e))},E=()=>{if(++g>=w){for(const e of h)if(h.delete(e),e.id)e.release();else if(--g<w){h.add(e);break}}else h.add(Object.create(p));m&&(m=setTimeout(E,b))},S=()=>{let e;do{for(;e=c.pop();){const{newChildren:t,parent:i}=e;t&&(i&&O(i)?(e.refresh(t),i.currentBefore=void 0):e.version&&e.watchMountChange("r",(e,t)=>{t&&(e.watchMountChange("r",void 0),c.O(e))}))}for(const[t,i]of d){const{parent:r}=t,n=!!r&&O(r);n!==i&&(d.set(t,n),t.onMountChange(n),e=s)}}while(e);if(w)for(const e of l)e.parent||h.add(e);else for(const e of l)e.parent||e.release();l.clear()},$=(e,t=[],i=0)=>{let r=e[i];for(;;){if(r&&void 0!==r.id)t.push(r);else if(null!=r)switch(typeof r){case"object":$(r,t);break;case"function":r=r();continue;case"boolean":case"number":case"bigint":r=""+r;default:t.push(new M("",r))}if(!(++i<e.length))break;r=e[i]}return t},B=(e,t,i)=>{let r;const n=e.length;let s=t,a=0;for(;a<n;){const t=e[a];if(t!==s[a]){if(a===s.length)return s;const e=s[a];if(!e||void 0===e.id){s=$(s,s.slice(0,a),a);continue}if(r!==s)break}r||t.parent===i||(r=e),a++}return a===s.length?r:s===t?$(s,e.slice(0,a),a):s},O=e=>{let t=e;do{if(t.parent===t)return!0;t=t.parent}while(t);return!1},z=(e,t,i,r)=>{let n,s,a;if(t!==e&&e.length){const o=[];let l;for(s=t.length,n=1e7;--s>=0;)if(a=t[s],a.parent===i){const e=s-a.index;e===n?(l.size++,a.index=s):(l={from:a.index,to:s,size:1},n=e,a.index=-o.push(l))}else 1e7!==n&&(n=1e7);const h=[];for(s=e.length-1;s>=0;)a=e[s],a.index<0?(l=o[-a.index-1],h.push(l),s-=l.size):(a.detachFrom(i),s--);let c,d,f=0;for(s=t.length-1;s>=0;)if(a=t[s],a.parent!==i)a.index=s--,a.attachTo(i);else{if(l=o[-a.index-1],d=l.size,c=h[f],a.index=s,!r){if(c===l){f++,s-=l.size,i.currentBefore=void 0;continue}if(c.from>l.from){n=f;do{d-=c.size,c=h[++n]}while(c.from>l.from&&d>0);if(d>0){s-=l.size,i.currentBefore=void 0,f=n;continue}}}n=s-l.size;do{a.move()}while(--s>n&&(a=t[s]))}}else for(s=t.length-1;s>=0;s--)a=t[s],a.index=s,i!==a.parent&&a.attachTo(i);i.currentBefore=void 0};class M{constructor(e,t){this.id=e,this.index=0,this.a5=t}id;parent;index;firstElement;attachTo(e){this.firstElement||(this.firstElement=document.createTextNode(this.a5));const{parent:t,firstElement:i,index:r}=this;this.id&&(t?(l.add(this),i.remove()):h.delete(this)),this.parent=e;let n=e.currentBefore;void 0===n&&(n=e.findNextSiblingElement(r)),e.element.insertBefore(i,n),e.currentBefore=i}move(){const{parent:e,index:t,firstElement:i}=this;let r=e.currentBefore;void 0===r&&(r=e.findNextSiblingElement(t)),e.element.insertBefore(i,r),e.currentBefore=i}detachFrom(e){this.parent===e&&(this.firstElement.remove(),this.parent=void 0,this.id&&l.add(this))}update(e){return this.a5!==e&&(this.a5=e,this.firstElement&&(this.firstElement.nodeValue=e)),!1}refresh(){}release(e){this.parent===e&&(e&&this.firstElement.remove(),y.delete(this.id))}a5}class j{constructor(e,t,i){this.id=e,this.index=0,this.newChildren=this.d=i?$(t):t||a}id;parent;index;newChildren;currentBefore;get element(){return this.parent.element}get firstElement(){const{d:e}=this;for(let t=0;t<e.length;t++){const i=e[t].firstElement;if(i)return i}return null}attachTo(e){const{parent:t,d:i,newChildren:r}=this;if(t){l.add(this);for(let e=i.length-1;e>=0;e--)i[e].detachFrom(this)}else h.delete(this);this.parent=e;const n=r||i;for(let e=n.length-1;e>=0;e--){const t=n[e];t.index=e,t.attachTo(this)}e.currentBefore=this.currentBefore,this.currentBefore=void 0,this.d=n,this.newChildren=void 0}move(){const{d:e,newChildren:t}=this;if(t)z(e,t,this,!0),this.d=t,this.newChildren=void 0;else{for(let t=e.length-1;t>=0;t--)e[t].move();this.currentBefore=void 0}}detachFrom(e){if(this.parent===e){const{d:e}=this;for(const t of e)t.detachFrom(this);this.parent=void 0,l.add(this)}}update(e,t){if(t){const e=B(this.d,t,this);if(e)return this.newChildren=e,!0}return!1}refresh(e){z(this.d,e,this),this.d=e,this.newChildren=void 0}release(e){if(this.parent===e){if(e){const{d:e}=this;for(const t of e)t.detachFrom(this)}y.delete(this.id)}}findNextSiblingElement(e){const t=this.newChildren||this.d;let i,r=e+1,n=t[r];for(;n;){if(i=n.firstElement,i)return i;n=t[++r]}return i=this.parent.currentBefore,void 0!==i?i:this.parent.findNextSiblingElement(this.index)}d}class A{constructor(e,t,i,r,n,o){if(this.id=e,this.index=0,this.firstElement=this.element=x(t,this),this.newChildren=this.d=o?$(r):r||a,i){if(this.l=s,this.q=-1,"select"===t){const e=this.element,t=i,r=t.value;if(r){t.value=void 0;const i=this.refresh;this.refresh=n=>{if(z(this.d,n,this),this.d=n,this.newChildren=void 0,Array.isArray(r)){const t=r,[i,n,s]=t;e.value=s;const a=t[3]=e=>i[n]=e.target.value;e.addEventListener("change",a)}else e.value=r;t.value=r,this.refresh=i}}}this.update(i),this.q=n??0}else this.l=i,this.q=0}id;element;parent;newChildren;index;currentBefore;firstElement;attachTo(e){const{parent:t,element:i,newChildren:r,index:n}=this;t?i.remove():h.delete(this),this.parent=e,r&&this.refresh(r);let s=e.currentBefore;void 0===s&&(s=e.findNextSiblingElement(n)),e.element.insertBefore(i,s),e.currentBefore=i}move(){const{parent:e,newChildren:t,index:i,element:r}=this;t&&this.refresh(t);let n=e.currentBefore;void 0===n&&(n=e.findNextSiblingElement(i)),e.element.insertBefore(r,n),e.currentBefore=r}detachFrom(e){this.parent===e&&(this.element.remove(),this.parent=void 0,l.add(this))}update(e,t){const{element:i,l:r,q:a}=this;if(r&&a){this.l=e;let t=a;for(const a in e){const o=e[a],l=r[a];if(o!==l)if(null!=o)switch(typeof o){case"string":{const e=n[a];e?i.setAttribute(e,o):i[a]=o;break}case"number":case"boolean":case"function":i[a]=o;break;default:if(Array.isArray(o)){const[e,t,r]=o;if(l){const[n,s,h,c]=l;if(h!==r&&i[a]!==r&&(i[a]=r),n===e&&s===t)o[3]=c;else{const r=o[3]=i=>e[t]=i.target[a];i.removeEventListener("change",c),i.addEventListener("change",r)}}else{i[a]=r;const n=o[3]=i=>e[t]=i.target[a];i.addEventListener("change",n)}break}if("style"===a){if(!l){const t=i.style,r={};let n=0;for(const e in o){const i=o[e];r[e]=i,n++,t[e]=i}e[a]=r,r.i=n;break}const t=i.style,r={};let n=0,s=l.i;for(const e in o){const i=o[e];r[e]=i,e in l&&s--,n++,i!==l[a]&&(t[e]=i)}if(e[a]=r,r.i=n,s)for(const e in l)if(!(e in o)&&(t[e]=null,! --s))break;break}i[a]=o}else switch(typeof l){case"string":{const e=n[a];e?this.element.removeAttribute(e):this.element[a]=o;break}case"object":l?Array.isArray(l)?i.removeEventListener("change",l[3]):l===s&&(i[a]=o):i[a]=o;break;default:i[a]=o}if(! --t)break}}if(t){const e=B(this.d,t,this);if(e)return this.newChildren=e,!0}return!1}refresh(e){z(this.d,e,this),this.d=e,this.newChildren=void 0}release(e){if(this.parent===e){e&&this.element.remove();const{d:t}=this;for(const e of t)e.release(this);y.delete(this.id)}}findNextSiblingElement(e){const t=this.newChildren||this.d;let i,r=e+1,n=t[r];for(;n;){if(i=n.firstElement,i)return i;n=t[++r]}return null}Z(){this.update=this.aF}aF(e,t){const{element:i,l:r,q:s}=this;if(r&&s){this.l=e;let t=s;for(const s in e){const a=e[s],o=r[s];if(a!==o)if(null!=a)switch(typeof a){case"string":i.setAttribute(n[s]??s,a);break;case"number":case"boolean":i.setAttribute(n[s]??s,""+a);break;case"function":i[s]=a;break;default:if("style"===s){if(!o){const t=i.style,r={};let n=0;for(const e in a){const i=a[e];r[e]=i,n++,t[e]=i}e[s]=r,r.i=n;break}const t=i.style,r={};let n=0,l=o.i;for(const e in a){const i=a[e];r[e]=i,e in o&&l--,n++,i!==o[s]&&(t[e]=i)}if(e[s]=r,r.i=n,l)for(const e in o)if(!(e in a)&&(t[e]=null,! --l))break;break}i[s]=a}else switch(typeof o){case"string":case"number":case"boolean":i.removeAttribute(n[s]??s);break;default:i[s]=a}if(! --t)break}}if(t){const e=B(this.d,t,this);if(e)return this.newChildren=e,!0}return!1}l;d;q}class _{constructor(e,t,i,r,n,s){this.id=e,this.index=0,this.version=1,this.Y=t,this.l=i,this.newChildren=this.d=s?$(r):r||a,this.q=n??0}id;parent;newChildren;index;version;state;get firstElement(){return this.h?.firstElement||null}attachTo(e){const{parent:t,newChildren:i,h:r}=this;this.parent=e,i?this.refresh(i):r&&(r.index=this.index,r.attachTo(e)),t||h.delete(this)}move(){const{newChildren:e,h:t}=this;e?this.refresh(e):t&&(t.index=this.index,t.move())}detachFrom(e){this.parent===e&&(this.h?.detachFrom(e),this.parent=void 0,l.add(this))}update(e,t){const{l:i,d:r,q:n}=this;if(this.l=e,t){const e=B(r,t,this.parent);if(e)return this.newChildren=e,!0}if(!this.newChildren&&n){let t=n;for(const n in i){if(i[n]!==e[n])return this.newChildren=r,!0;if(! --t)break}}return!1}refresh(e){const{parent:t,h:i,index:r}=this,n=k;k=this;let a=this.Y(this.l||s,e);if(a!==i)switch(typeof a){case"boolean":case"number":case"bigint":a=""+a;case"string":a=new M("",a),this.h=a,a.index=r,a.attachTo(t),i?.detachFrom(t);break;default:a?(this.h=a,a.index=r,a.attachTo(t),i?.detachFrom(t)):(this.h=void 0,i?.detachFrom(t))}else i&&(i.parent!==t?(i.index=r,i.attachTo(t)):i.index!==r&&(i.index=r,i.move()));this.d=e,this.newChildren=void 0,k=n}release(e){this.parent===e&&(this.h?.release(e),this.parent=void 0,y.delete(this.id),this.z&&(this.z=void 0,d.delete(this)))}markChanged(){return!this.newChildren&&(this.newChildren=this.d,!0)}watchMountChange(e,t){const{z:i,parent:r}=this;if(t){if(!i)return this.z=(new Map).set(e,t),void d.set(this,!!r&&O(r));i.set(e,t)}else i?.delete(e)&&(i.size||(this.z=void 0,d.delete(this)))}onMountChange(e){for(const[,t]of this.z)t(this,e)}Y;l;d;q;h;z}class N{constructor(e,t){this.id=e,this.element=t,this.parent=this}id;element;parent;currentBefore;findNextSiblingElement(e){return null}render(e){this.a6||(this.a6=new _(this.id,e,null,a),y.set(this.id,this.a6),this.a6.attachTo(this))}a6}const T=(e,t)=>{if(k.id){let i=e[t];i||(i=new Map,e[t]=i),i.set(k.id,k.version)}};let R=(e,t)=>{const i=e[t];if(i){for(const[e,t]of i){const i=y.get(e);i?.version===t&&i.markChanged()&&(c.av()&&queueMicrotask(S),c.O(i))}i.clear()}};const F=h.delete;h.delete=o;const L=(e,t=2e4)=>{if(e>=0&&t>=1e3){if(b=t,w&&clearTimeout(m),e)h.delete=F,m=setTimeout(E,b);else if(m){m=void 0;for(let e=0;e<w;e++)E();h.delete=o}return w=e,!0}return!1},P=()=>{v=u.pop()};var q;!function(e){e.render=(e,t)=>{const i=(f.length||"")+"|",r=new N(i,e);f.push(r),r.render(t)},e.$=(e,t,i,r,n,s)=>{const a=`${k.id}${e}${v}`;let o=y.get(a);return o?((i||r)&&o.update(i,r)&&c.O(o),o):(o=new A(a,t,i,r,n,s),y.set(a,o),o)},e.$c=(e,t,i,r,n,s)=>{const a=`${k.id}${e}${v}`;let o=y.get(a);return o?((i||r)&&o.update(i,r)&&c.O(o),o):(o=new _(a,t,i,r,n,s),y.set(a,o),o)},e.$f=(e,t,i)=>{const r=`${k.id}${e}${v}`;let n=y.get(r);return n?(t&&n.update(null,t)&&c.O(n),n):(n=new j(r,t,i),y.set(r,n),n)},e.$k=e=>(u.push(v),v=`${v||"{"}${e}}`,P),e.$n=e=>{const t=x;return x=C[e],()=>{x=t}},e.$s=(e,t)=>(e(),t),e.$t=(e,t,i)=>{const r=`${k.id}${e}${v}`;let n=y.get(r);return n?(i&&n.update(t),n):(n=new M(r,t),y.set(n.id,n),n)}}(q||(q={}));const I=Symbol(),D=Array.prototype,V=T;let U=(e,t)=>{U=R,U(e,t)};const W=e=>function(...t){const i=this.length;let r,n,s;switch(e){case D.push:r=i,n=r+t.length,s=i;break;case D.unshift:r=0,n=t.length,s=i;break;case D.fill:r=t[1],void 0===r||r<=-i?r=0:r<0&&(r=i+r),n=t[2],void 0===n||n>i?n=i:n<=-i?n=0:n<0&&(n=i+n),s=n;break;case D.sort:case D.reverse:r=n=0,s=i;break;case D.pop:r=n=i-1,s=i;break;case D.shift:r=n=0,s=i;break;default:r=t[0],r<0&&(r=i+r),n=t.length>2?t.length-2:0,s=t[1],void 0===s&&(s=i-r),s=s>0?s!==n?i:r+n:n?i:r,n+=r}const a=e.bind(this)(...t),o=this[I];let l;for(let e=r;e<n;e++){switch(l=this[e],typeof l){case"object":if(l){for(;e<n;)l=this[e],l&&!l[I]&&(this[e]=J(l)),e++;break}case"undefined":continue}break}return i!==this.length&&U(o,"length"),U(o,Symbol.iterator),a},Z={push:W(D.push),unshift:W(D.unshift),fill:W(D.fill),sort:W(D.sort),reverse:W(D.reverse),pop:W(D.pop),shift:W(D.shift),splice:W(D.splice)},H={get(e,t){if(t!==I){let i=e[t];if(i&&i===D[t]){const r=Z[t];if(r)return r.bind(e);i=i.bind(e)}return V(e[I],"length"!==t?Symbol.iterator:t),i}return e},set(e,t,i){if(t!==I){if(e[t]===i)return!0;const r=e[I];return i&&"object"==typeof i&&(i=J(i)),e[t]=i,"length"===t&&U(r,t),U(r,Symbol.iterator),!0}return((e,t)=>{const i=t.length,r=e.length;let n;for(let r=0;r<i;r++){let s=t[r];if(s&&"object"==typeof s){do{s=t[r],n=e[r],s?n?n!==s&&(n[I]=s):e[r]=J(s):e[r]=s}while(++r<i);break}if(null!=s){do{e[r]=t[r]}while(++r<i);break}e[r]=s}const s=e[I];r!==i&&(r>i&&(e.length=i),U(s,"length")),U(s,Symbol.iterator)})(e,i),!0},has:(e,t)=>(V(e[I],isNaN(parseInt(t))?t:Symbol.iterator),t in e),deleteProperty:(e,t)=>(isNaN(parseInt(t))||(t=Symbol.iterator),void 0!==e[t]&&U(e[I],t),delete e[t])},Y={get(e,t){if(t!==I){const i=e[t];return"id"!==t&&V(e[I],t),i}return e},set(e,t,i,r){if(t!==I){if(e[t]===i)return!0;const r=e[I];return i&&"object"==typeof i&&(i=J(i)),e[t]=i,U(r,t),!0}return((e,t,i)=>{const r={...e};let n;for(const s in i){delete r[s];const a=i[s];a&&"object"==typeof a&&(n=e[s],n)?n[I]=a:e[s]!==a&&(t[s]=a)}for(const e in r)delete t[e]})(e,r,i),!0},has:(e,t)=>(V(e[I],t),t in e),deleteProperty:(e,t)=>(void 0!==e[t]&&U(e[I],t),delete e[t])},J=e=>{let t;if(Array.isArray(e)){t=[];const i=e.length;for(let r=0;r<i;r++){let n=e[r];if(n&&"object"==typeof n){do{t[r]=(n=e[r])&&J(n)}while(++r<i);break}if(null!=n){do{t[r]=e[r]}while(++r<i);break}t[r]=n}e=new Proxy(t,H)}else{t={};for(const i in e){const r=e[i];t[i]=r&&"object"==typeof r?J(r):r}e=new Proxy(t,Y)}return t[I]={},e},G=(e,t)=>[e,t,e[t]],K=(e,t)=>{const i=k;if(i.id){let r=i.state;if(r){const{state:e,hook:t}=r;return t?.(++r.ver,e),e}const{state:n,hook:s}=r=i.state={state:J(e),ver:1,hook:t};return s&&(i.watchMountChange("s",(e,t)=>((e,t)=>{if(!t){const{state:t,hook:i}=e;e.ver=0,i(0,t)}})(r,t)),s(1,n)),n}return J(e)},X={},Q=({on:e,off:t})=>(K(X,i=>i?e?.():t?.()),null);var ee=i(707);let te=0;const ie=K({ver:0});window.addEventListener("popstate",()=>{ie.ver=++te});const re=(e,t)=>{const{pathname:i,search:r,hash:n}=window.location;e!==`${i}${r}${n}`&&(t?window.history.replaceState(void 0,"",e):window.history.pushState(void 0,"",e),queueMicrotask(()=>{ie.ver=++te}))},ne="ezhEZH";class se{constructor(e,t,i){this.com=e,this.b=ee.w.createPath(t+ne),this.needAuth=i}com;needAuth;parseParam(e){const t=this.b.test(e);if(t)return delete t[ne],t}buildUrl(e){throw new Error("WildcardRoute does not support buildUrl")}b}class ae{constructor(e,t,i){this.com=e,this.b=ee.w.createPath(t),this.needAuth=i}com;needAuth;parseParam(e){return this.b.test(e)}buildUrl(e){return this.b.build(e)}b}const oe=(e,t,i=!0)=>t.endsWith("*")?new se(e,t,i):new ae(e,t,i),le=({routes:e,notFound:t,checkAuth:i})=>{te=ie.ver;const{pathname:r,search:n,hash:s}=window.location,a=`${r}${n}${s}`,{$s:o,$k:l,$c:h}=q;for(const t in e){const r=e[t],n=r.parseParam(a);if(n){if(i&&r.needAuth){const e=i(a);if(e)return void re(e)}return o(l(t),h("_",r.com,n,void 0,-1))}}return t?o(l("404"),h("_",t,{})):void 0},he=(e,t,i)=>{e.preventDefault();const{pathname:r,search:n,hash:s}=window.location;t!==`${r}${n}${s}`&&(i?window.history.replaceState(void 0,"",t):window.history.pushState(void 0,"",t),ie.ver=++te)},ce=(e,t)=>{const{href:i,className:r,style:n,title:s,replace:a}=e,o=i?e=>he(e,i,a):void 0;return q.$("_","a",{className:r,style:n,title:s,href:i,onclick:o},t,-1,1)},de=(e,t)=>{const{route:i,params:r,className:n,style:s,title:a,replace:o}=e,l=i.buildUrl(r);return q.$("_","a",{className:n,style:s,title:a,href:l,onclick:e=>he(e,l,o)},t,-1,1)}}},r={};function n(e){var t=r[e];if(void 0!==t)return t.exports;var s=r[e]={exports:{}};return i[e](s,s.exports,n),s.exports}n.m=i,e=[],n.O=(t,i,r,s)=>{if(!i){var a=1/0;for(c=0;c<e.length;c++){for(var[i,r,s]=e[c],o=!0,l=0;l<i.length;l++)(!1&s||a>=s)&&Object.keys(n.O).every(e=>n.O[e](i[l]))?i.splice(l--,1):(o=!1,s<a&&(a=s));if(o){e.splice(c--,1);var h=r();void 0!==h&&(t=h)}}return t}s=s||0;for(var c=e.length;c>0&&e[c-1][2]>s;c--)e[c]=e[c-1];e[c]=[i,r,s]},n.d=(e,t)=>{for(var i in t)n.o(t,i)&&!n.o(e,i)&&Object.defineProperty(e,i,{enumerable:!0,get:t[i]})},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t);export{n as __webpack_require__};t={1:0},n.C=e=>{var i,r,{__webpack_esm_ids__:s,__webpack_esm_modules__:a,__webpack_esm_runtime__:o}=e,l=0;for(i in a)n.o(a,i)&&(n.m[i]=a[i]);for(o&&o(n);l<s.length;l++)r=s[l],n.o(t,r)&&t[r]&&t[r][0](),t[s[l]]=0;n.O()},n.O.j=e=>0===t[e];import*as s from"./3.min.mjs";n.C(s);import*as a from"./2.min.mjs";n.C(a);var o=n.O(void 0,[3,2],()=>n(441));const l=(o=n.O(o)).ye,h=o.Mj,c=o.N_,d=o.Wt,f=o.Ix,u=o.On,p=o.er,m=o.te,v=o.oo,b=o.LU,w=o.wE,g=o.J0;export{l as $ezh,h as Effect,c as Link,d as RouteLink,f as Router,u as addComReader,p as bindData,m as configGC,v as navigate,b as refreshComReaders,w as route,g as useState};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ezh",
3
- "version": "0.2.4",
3
+ "version": "0.2.5",
4
4
  "scripts": {
5
5
  "start": "webpack serve"
6
6
  },