ezh 0.2.0 → 0.2.2

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/2.min.mjs ADDED
@@ -0,0 +1 @@
1
+ export const __webpack_esm_id__=2;export const __webpack_esm_ids__=[2];export const __webpack_esm_modules__={537:(t,s,_)=>{_.d(s,{ag:()=>c});class c{constructor(){this.c=[]}av(){return!this.c.length}pop(){const{c:t}=this,s=t.pop(),_=t[0];if(s){if(!_)return s;const{length:c}=t,e=c>>>1;let o,i,r,n=0;for(;n<e&&(r=2*n+1,o=t[r],r+1<c&&(i=t[r+1],i.id<o.id&&(o=i,r++)),o.id<s.id);)t[n]=o,n=r;t[n]=s}return _}O(t){const{c:s}=this;let _,c,e=s.push(t)-1;for(;e&&t.id<(_=s[c=e-1>>>1]).id;)s[e]=_,e=c;s[e]=t}c}}};
package/lib/3.min.mjs ADDED
@@ -0,0 +1 @@
1
+ export const __webpack_esm_id__=3;export const __webpack_esm_ids__=[3];export const __webpack_esm_modules__={707:(r,t,e)=>{e.d(t,{w:()=>v});var n=function(){return n=Object.assign||function(r){for(var t,e=1,n=arguments.length;e<n;e++)for(var a in t=arguments[e])Object.prototype.hasOwnProperty.call(t,a)&&(r[a]=t[a]);return r},n.apply(this,arguments)},a=function(r){return void 0===r&&(r={}),{arrayFormat:r.arrayFormat||"none",booleanFormat:r.booleanFormat||"none",nullFormat:r.nullFormat||"default"}},i=function(r){return encodeURIComponent(r)},o=function(r){return decodeURIComponent(r)},u=function(r,t){var e=a(t);return function(r){var t=r.indexOf("?");return-1===t?r:r.slice(t+1)}(r).split("&").reduce(function(r,t){var n=t.split("="),a=n[0],i=n[1],u=function(r){var t=r.indexOf("["),e=-1!==t;return{hasBrackets:e,name:e?r.slice(0,t):r}}(a),s=u.hasBrackets,c=u.name,l=r[c],f=function(r,t){if(void 0===r)return"empty-true"===t.booleanFormat||null;if("string"===t.booleanFormat){if("true"===r)return!0;if("false"===r)return!1}if("unicode"===t.booleanFormat){if("✓"===o(r))return!0;if("✗"===o(r))return!1}return"string"===t.nullFormat&&"null"===r?null:o(r)}(i,e);return r[c]=void 0===l?s?[f]:f:(Array.isArray(l)?l:[l]).concat(f),r},{})},s=/[^!$'()*+,;|:]/g,c=function(r){return r.replace(s,function(r){return encodeURIComponent(r)})},l={default:c,uri:encodeURI,uriComponent:encodeURIComponent,none:function(r){return r},legacy:encodeURI},f={default:decodeURIComponent,uri:decodeURI,uriComponent:decodeURIComponent,none:function(r){return r},legacy:decodeURIComponent},m=function(r,t,e){var n=l[t]||c;return e?String(r).split("/").map(n).join("/"):n(String(r))},p=function(r){return"("+(r?r.replace(/(^<|>$)/g,""):"[a-zA-Z0-9-_.~%':|=+\\*@$]+")+")"},h=[{name:"url-parameter",pattern:/^:([a-zA-Z0-9-_]*[a-zA-Z0-9]{1})(<(.+?)>)?/,regex:function(r){return new RegExp(p(r[2]))}},{name:"url-parameter-splat",pattern:/^\*([a-zA-Z0-9-_]*[a-zA-Z0-9]{1})/,regex:/([^?]*)/},{name:"url-parameter-matrix",pattern:/^;([a-zA-Z0-9-_]*[a-zA-Z0-9]{1})(<(.+?)>)?/,regex:function(r){return new RegExp(";"+r[1]+"="+p(r[2]))}},{name:"query-parameter",pattern:/^(?:\?|&)(?::)?([a-zA-Z0-9-_]*[a-zA-Z0-9]{1})/},{name:"delimiter",pattern:/^(\/|\?)/,regex:function(r){return new RegExp("\\"+r[0])}},{name:"sub-delimiter",pattern:/^(!|&|-|_|\.|;)/,regex:function(r){return new RegExp(r[0])}},{name:"fragment",pattern:/^([0-9a-zA-Z]+)/,regex:function(r){return new RegExp(r[0])}}],y=function r(t,e){if(void 0===e&&(e=[]),!h.some(function(n){var a=t.match(n.pattern);return!!a&&(e.push({type:n.name,match:a[0],val:a.slice(1,2),otherVal:a.slice(2),regex:n.regex instanceof Function?n.regex(a):n.regex}),a[0].length<t.length&&(e=r(t.substr(a[0].length),e)),!0)}))throw new Error("Could not parse path '"+t+"'");return e},d=function(r){return null!=r},g={urlParamsEncoding:"default"},v=function(){function r(r,t){if(!r)throw new Error("Missing path in Path constructor");this.path=r,this.options=n(n({},g),t),this.tokens=y(r),this.hasUrlParams=this.tokens.filter(function(r){return/^url-parameter/.test(r.type)}).length>0,this.hasSpatParam=this.tokens.filter(function(r){return/splat$/.test(r.type)}).length>0,this.hasMatrixParams=this.tokens.filter(function(r){return/matrix$/.test(r.type)}).length>0,this.hasQueryParams=this.tokens.filter(function(r){return/^query-parameter/.test(r.type)}).length>0,this.spatParams=this.getParams("url-parameter-splat"),this.urlParams=this.getParams(/^url-parameter/),this.queryParams=this.getParams("query-parameter"),this.params=this.urlParams.concat(this.queryParams),this.source=this.tokens.filter(function(r){return void 0!==r.regex}).map(function(r){return r.regex.source}).join("")}return r.createPath=function(t,e){return new r(t,e)},r.prototype.isQueryParam=function(r){return-1!==this.queryParams.indexOf(r)},r.prototype.isSpatParam=function(r){return-1!==this.spatParams.indexOf(r)},r.prototype.test=function(r,t){var e=this,a=n(n({caseSensitive:!1,strictTrailingSlash:!1},this.options),t),i=function(r,t){return t||"\\/"===r?r:r.replace(/\\\/$/,"")+"(?:\\/)?"}(this.source,a.strictTrailingSlash),o=this.urlTest(r,i+(this.hasQueryParams?"(\\?.*$|$)":"$"),a.caseSensitive,a.urlParamsEncoding);if(!o||!this.hasQueryParams)return o;var s=u(r,a.queryParams);return 0===Object.keys(s).filter(function(r){return!e.isQueryParam(r)}).length?(Object.keys(s).forEach(function(r){return o[r]=s[r]}),o):null},r.prototype.partialTest=function(r,t){var e=this,a=n(n({caseSensitive:!1,delimited:!0},this.options),t),i=function(r,t){return t?/(\/)$/.test(r)?r:r+"(\\/|\\?|\\.|;|$)":r}(this.source,a.delimited),o=this.urlTest(r,i,a.caseSensitive,a.urlParamsEncoding);if(!o)return o;if(!this.hasQueryParams)return o;var s=u(r,a.queryParams);return Object.keys(s).filter(function(r){return e.isQueryParam(r)}).forEach(function(r){return function(r,t,e){void 0===e&&(e="");var n=r[t];return r[t]=void 0===n?e:Array.isArray(n)?n.concat(e):[n,e],r}(o,r,s[r])}),o},r.prototype.build=function(r,t){var e=this;void 0===r&&(r={});var o=n(n({ignoreConstraints:!1,ignoreSearch:!1,queryParams:{}},this.options),t),u=Object.keys(r).filter(function(r){return!e.isQueryParam(r)}).reduce(function(t,n){if(!d(r[n]))return t;var a=r[n],i=e.isSpatParam(n);return"boolean"==typeof a?t[n]=a:Array.isArray(a)?t[n]=a.map(function(r){return m(r,o.urlParamsEncoding,i)}):t[n]=m(a,o.urlParamsEncoding,i),t},{});if(this.urlParams.some(function(t){return!d(r[t])})){var s=this.urlParams.filter(function(t){return!d(r[t])});throw new Error("Cannot build path: '"+this.path+"' requires missing parameters { "+s.join(", ")+" }")}if(!o.ignoreConstraints&&!this.tokens.filter(function(r){return/^url-parameter/.test(r.type)&&!/-splat$/.test(r.type)}).every(function(r){return new RegExp("^"+p(r.otherVal[0])+"$").test(u[r.val])}))throw new Error("Some parameters of '"+this.path+"' are of invalid format");var c=this.tokens.filter(function(r){return!1===/^query-parameter/.test(r.type)}).map(function(r){return"url-parameter-matrix"===r.type?";"+r.val+"="+u[r.val[0]]:/^url-parameter/.test(r.type)?u[r.val[0]]:r.match}).join("");if(o.ignoreSearch)return c;var l=function(r,t){var e=a(t);return Object.keys(r).filter(function(t){return void 0!==r[t]}).map(function(t){return function(r,t,e){return null===t?function(r,t){return"hidden"===t.nullFormat?"":"string"===t.nullFormat?r+"=null":r}(r,e):"boolean"==typeof t?function(r,t,e){return"empty-true"===e.booleanFormat&&t?r:r+"="+("unicode"===e.booleanFormat?t?"✓":"✗":t.toString())}(r,t,e):Array.isArray(t)?function(r,t,e){var n=function(r){return"index"===r.arrayFormat?function(r,t){return r+"["+t+"]"}:"brackets"===r.arrayFormat?function(r){return r+"[]"}:function(r){return r}}(e);return t.map(function(t,e){return n(r,e)+"="+i(t)}).join("&")}(r,t,e):r+"="+i(t)}(t,r[t],e)}).filter(Boolean).join("&")}(this.queryParams.filter(function(t){return-1!==Object.keys(r).indexOf(t)}).reduce(function(t,e){return t[e]=r[e],t},{}),o.queryParams);return l?c+"?"+l:c},r.prototype.getParams=function(r){var t=r instanceof RegExp?function(t){return r.test(t.type)}:function(t){return t.type===r};return this.tokens.filter(t).map(function(r){return r.val[0]})},r.prototype.urlTest=function(r,t,e,n){var a=this,i=new RegExp("^"+t,e?"":"i"),o=r.match(i);return o?this.urlParams.length?o.slice(1,this.urlParams.length+1).reduce(function(r,t,e){return r[a.urlParams[e]]=(f[n]||decodeURIComponent)(t),r},{}):{}:null},r}()}};
@@ -0,0 +1 @@
1
+ var e,t,i={513:(e,t,i)=>{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"},a={},s=[];Object.freeze(a),Object.freeze(s);const o=()=>!1,l=new Set,h=new Set,d=new r.ag,c=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="";const g=new Map;let v=p,w=1,b=(e,t)=>document.createElement(e);const x={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))},k=()=>{let e;do{for(;e=d.pop();){const{newChildren:t,parent:i}=e;t&&(i&&E(i)?(e.refresh(t),i.currentBefore=void 0):e.version&&e.watchMountChange("r",(e,t)=>{t&&(e.watchMountChange("r",void 0),d.O(e))}))}for(const[t,i]of c){const{parent:r}=t,n=!!r&&E(r);n!==i&&(c.set(t,n),t.onMountChange(n),e=a)}}while(e);w++;for(const e of l)e.parent||e.release();l.clear()},y=(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":y(r,t);break;case"function":r=r();continue;case"boolean":case"number":case"bigint":r=""+r;default:t.push(new O("",r))}if(!(++i<e.length))break;r=e[i]}return t},C=(e,t,i)=>{let r;const n=e.length;let a=t,s=0;for(;s<n;){const t=e[s];if(t!==a[s]){if(s===a.length)return a;const e=a[s];if(!e||void 0===e.id){a=y(a,a.slice(0,s),s);continue}if(r!==a)break}r||t.parent===i||(r=e),s++}return s===a.length?r:a===t?y(a,e.slice(0,s),s):a},E=e=>{let t=e;do{if(t.parent===t)return!0;t=t.parent}while(t);return!1},B=(e,t,i,r)=>{let n,a,s;if(t!==e&&e.length){const o=[];let l;for(a=t.length,n=1e7;--a>=0;)if(s=t[a],s.parent===i){const e=a-s.index;e===n?(l.size++,s.index=a):(l={from:s.index,to:a,size:1},n=e,s.index=-o.push(l))}else 1e7!==n&&(n=1e7);const h=[];for(a=e.length-1;a>=0;)s=e[a],s.index<0?(l=o[-s.index-1],h.push(l),a-=l.size):(s.detachFrom(i),a--);let d,c,f=0;for(a=t.length-1;a>=0;)if(s=t[a],s.parent!==i)s.index=a--,s.attachTo(i);else{if(l=o[-s.index-1],c=l.size,d=h[f],s.index=a,!r){if(d===l){f++,a-=l.size,i.currentBefore=void 0;continue}if(d.from>l.from){n=f;do{c-=d.size,d=h[++n]}while(d.from>l.from&&c>0);if(c>0){a-=l.size,i.currentBefore=void 0,f=n;continue}}}n=a-l.size;do{s.move()}while(--a>n&&(s=t[a]))}}else for(a=t.length-1;a>=0;a--)s=t[a],s.index=a,i!==s.parent&&s.attachTo(i);i.currentBefore=void 0};class O{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(),g.delete(this.id))}a5}class S{constructor(e,t,i){this.id=e,this.index=0,this.newChildren=this.d=i?y(t):t||s}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)B(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=C(this.d,t,this);if(e)return this.newChildren=e,!0}return!1}refresh(e){B(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)}g.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 z{constructor(e,t,i,r,n,o){if(this.id=e,this.index=0,this.firstElement=this.element=b(t,this),this.newChildren=this.d=o?y(r):r||s,i){if(this.l=a,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(B(this.d,n,this),this.d=n,this.newChildren=void 0,Array.isArray(r)){const t=r,[i,n,a]=t;e.value=a;const s=t[3]=e=>i[n]=e.target.value;e.addEventListener("change",s)}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 a=e.currentBefore;void 0===a&&(a=e.findNextSiblingElement(n)),e.element.insertBefore(i,a),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:s}=this;if(r&&s){this.l=e;let t=s;for(const s in e){const o=e[s],l=r[s];if(o!==l)if(null!=o)switch(typeof o){case"string":{const e=n[s];e?i.setAttribute(e,o):i[s]=o;break}case"number":case"boolean":case"function":i[s]=o;break;default:if(Array.isArray(o)){const[e,t,r]=o;if(l){const[n,a,h,d]=l;if(h!==r&&i[s]!==r&&(i[s]=r),n===e&&a===t)o[3]=d;else{const r=o[3]=i=>e[t]=i.target[s];i.removeEventListener("change",d),i.addEventListener("change",r)}}else{i[s]=r;const n=o[3]=i=>e[t]=i.target[s];i.addEventListener("change",n)}break}if("style"===s){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[s]=r,r.i=n;break}const t=i.style,r={};let n=0,a=l.i;for(const e in o){const i=o[e];r[e]=i,e in l&&a--,n++,i!==l[s]&&(t[e]=i)}if(e[s]=r,r.i=n,a)for(const e in l)if(!(e in o)&&(t[e]=null,! --a))break;break}i[s]=o}else switch(typeof l){case"string":{const e=n[s];e?this.element.removeAttribute(e):this.element[s]=o;break}case"object":l?Array.isArray(l)?i.removeEventListener("change",l[3]):l===a&&(i[s]=o):i[s]=o;break;default:i[s]=o}if(! --t)break}}if(t){const e=C(this.d,t,this);if(e)return this.newChildren=e,!0}return!1}refresh(e){B(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);g.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:a}=this;if(r&&a){this.l=e;let t=a;for(const a in e){const s=e[a],o=r[a];if(s!==o)if(null!=s)switch(typeof s){case"string":i.setAttribute(n[a]??a,s);break;case"number":case"boolean":i.setAttribute(n[a]??a,""+s);break;case"function":i[a]=s;break;default:if("style"===a){if(!o){const t=i.style,r={};let n=0;for(const e in s){const i=s[e];r[e]=i,n++,t[e]=i}e[a]=r,r.i=n;break}const t=i.style,r={};let n=0,l=o.i;for(const e in s){const i=s[e];r[e]=i,e in o&&l--,n++,i!==o[a]&&(t[e]=i)}if(e[a]=r,r.i=n,l)for(const e in o)if(!(e in s)&&(t[e]=null,! --l))break;break}i[a]=s}else switch(typeof o){case"string":case"number":case"boolean":i.removeAttribute(n[a]??a);break;default:i[a]=s}if(! --t)break}}if(t){const e=C(this.d,t,this);if(e)return this.newChildren=e,!0}return!1}l;d;q}class M{constructor(e,t,i,r,n,a){this.id=e,this.index=0,this.version=1,this.Y=t,this.l=i,this.newChildren=this.d=a?y(r):r||s,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=C(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=v;v=this;let s=this.Y(this.l||a,e);if(s!==i)switch(typeof s){case"boolean":case"number":case"bigint":s=""+s;case"string":s=new O("",s),this.h=s,s.index=r,s.attachTo(t),i?.detachFrom(t);break;default:s?(this.h=s,s.index=r,s.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,v=n}release(e){this.parent===e&&(this.h?.release(e),this.parent=void 0,g.delete(this.id),this.z&&(this.z=void 0,c.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 c.set(this,!!r&&E(r));i.set(e,t)}else i?.delete(e)&&(i.size||(this.z=void 0,c.delete(this)))}onMountChange(e){for(const[,t]of this.z)t(this,e)}Y;l;d;q;h;z}class ${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 M(this.id,e,null,s),g.set(this.id,this.a6),this.a6.attachTo(this),w++)}a6}let T=(e,t)=>{const i=e[t];if(i){for(const[e,t]of i){const i=g.get(e);i?.version===t&&i.markChanged()&&(d.av()&&queueMicrotask(k),d.O(i))}i.clear()}};h.delete,h.delete=o;const _=()=>{m=u.pop()};var F;!function(e){e.render=(e,t)=>{const i=(f.length||"")+"|",r=new $(i,e);f.push(r),r.render(t)},e.$=(e,t,i,r,n,a)=>{const s=`${v.id}${e}${m}`;let o=g.get(s);return o?((i||r)&&o.update(i,r)&&d.O(o),o):(o=new z(s,t,i,r,n,a),g.set(s,o),o)},e.$c=(e,t,i,r,n,a)=>{const s=`${v.id}${e}${m}`;let o=g.get(s);return o?((i||r)&&o.update(i,r)&&d.O(o),o):(o=new M(s,t,i,r,n,a),g.set(s,o),o)},e.$f=(e,t,i)=>{const r=`${v.id}${e}${m}`;let n=g.get(r);return n?(t&&n.update(null,t)&&d.O(n),n):(n=new S(r,t,i),g.set(r,n),n)},e.$k=e=>(u.push(m),m=`${m||"{"}${e}}`,_),e.$n=e=>{const t=b;return b=x[e],()=>{b=t}},e.$s=(e,t)=>(e(),t),e.$t=(e,t,i)=>{const r=`${v.id}${e}${m}`;let n=g.get(r);return n?(i&&n.update(t),n):(n=new O(r,t),g.set(n.id,n),n)}}(F||(F={}));const j=(e,t)=>{const i=new Error(e),r=i.stack;if(r){const e=r.indexOf("\n");let n=e;for(let e=0;e<t;e++)n=r.indexOf("\n",n+1);i.stack=r.substring(0,e)+r.substring(n)}return i},A=(e,t)=>{const{get:i,set:r}=e;e.get=function(e){const r=i.bind(this)(e);if(r)return v.id&&!L&&(r.g<w?r.g=w:t()),r.data},e.set=function(e,t){const i={g:w,data:t};return r.bind(this)(e,i)}},R=T;let q=!1,L=!1;const N=(e,t)=>{if(v.id&&!L)throw j("Models should not be modified while rendering",3);q=!0,R(e,t),q=!1};(()=>{T=N,A(g,()=>{throw j('This element already exists, "key" prop is required when it is in a loop',5)});const e=g.get.bind(g),t=g.set.bind(g);g.get=t=>{if(!q&&!v.id)throw j("All the elements must be in a closure that passed to h.render()",3);return e(t)},g.set=(e,i)=>{if(i.version){let e,t,r=0;const n=i,a=n.Y;n.Y=(e,t)=>{const i=a(e,t);return r=0,i},Object.defineProperty(i,"state",{get(){if(++r>1)throw j('The "useState" function can only be called once in the com function',3);return t},set(i){t=i,t&&(e=t.hook,e&&(t.hook=(t,i)=>{L=!0;const r=e(t,i);return L=!1,r}))}})}return t(e,i)}})()}},r={};function n(e){var t=r[e];if(void 0!==t)return t.exports;var a=r[e]={exports:{}};return i[e](a,a.exports,n),a.exports}n.m=i,e=[],n.O=(t,i,r,a)=>{if(!i){var s=1/0;for(d=0;d<e.length;d++){for(var[i,r,a]=e[d],o=!0,l=0;l<i.length;l++)(!1&a||s>=a)&&Object.keys(n.O).every(e=>n.O[e](i[l]))?i.splice(l--,1):(o=!1,a<s&&(s=a));if(o){e.splice(d--,1);var h=r();void 0!==h&&(t=h)}}return t}a=a||0;for(var d=e.length;d>0&&e[d-1][2]>a;d--)e[d]=e[d-1];e[d]=[i,r,a]},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={0:0},n.C=e=>{var i,r,{__webpack_esm_ids__:a,__webpack_esm_modules__:s,__webpack_esm_runtime__:o}=e,l=0;for(i in s)n.o(s,i)&&(n.m[i]=s[i]);for(o&&o(n);l<a.length;l++)r=a[l],n.o(t,r)&&t[r]&&t[r][0](),t[a[l]]=0;n.O()},n.O.j=e=>0===t[e];import*as a from"./2.min.mjs";n.C(a);var s=n.O(void 0,[2],()=>n(513));s=n.O(s);
package/lib/index.d.ts CHANGED
@@ -482,9 +482,9 @@ export type RouteLinkProp<ParamT extends object> = {
482
482
  children?: ChildElement[] | ChildElement;
483
483
  };
484
484
  export interface INameSpaceChecker {
485
- markNameSpace(): void;
485
+ Z(): void;
486
486
  }
487
- declare const nsCreateElMap: Record<string, (tagName: string, nsChecker: INameSpaceChecker) => Element>;
487
+ declare const am: Record<string, (y: string, K: INameSpaceChecker) => Element>;
488
488
  export declare const addComReader: (readerRecord: ReaderRecord, key: string | symbol | number) => void;
489
489
  export declare let refreshComReaders: (readerRecord: ReaderRecord, key: string | symbol | number) => void;
490
490
  export declare const configGC: (waitIntervals: number, interval?: number) => boolean;
@@ -495,7 +495,7 @@ export declare namespace $ezh {
495
495
  const $c: <P extends object>(id: string, entry: Com<P>, props: P | null, children?: ChildElement[], check?: number, mutableChild?: 1) => IEzElement;
496
496
  const $f: (id: string, children?: ChildElement[], mutableChild?: 1) => IEzElement;
497
497
  const $k: (key: string | number) => (() => void);
498
- const $n: (ns: keyof typeof nsCreateElMap) => (() => void);
498
+ const $n: (ns: keyof typeof am) => (() => void);
499
499
  const $s: (cb: () => void, element: IEzElement) => IEzElement;
500
500
  const $t: (id: string, text: string, mayChange?: 1) => IEzElement;
501
501
  namespace JSX {
@@ -517,7 +517,7 @@ export declare const bindData: <T extends State<T>, K extends keyof T>(data: T,
517
517
  K,
518
518
  T[K]
519
519
  ];
520
- export declare const useState: <T extends State<T>>(initial: T, hook?: (ver: number, state: T) => void) => T;
520
+ export declare const useState: <T extends State<T>>(initial: T, hookFunc?: (ver: number, state: T) => void) => T;
521
521
  export declare const navigate: (to: string, replace?: true) => void;
522
522
  export declare const route: <ParamT extends object>(com: Com<ParamT>, path: string, needAuth?: boolean) => IRoute<ParamT>;
523
523
  export declare const Router: Com<RouterProp>;
@@ -0,0 +1 @@
1
+ var e,t,i={441:(e,t,i)=>{i.d(t,{ye:()=>q,N_:()=>le,Wt:()=>he,Ix:()=>ae,On:()=>T,er:()=>G,te:()=>L,oo:()=>te,LU:()=>R,wE:()=>se,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)};var X=i(707);let Q=0;const ee=K({ver:0});window.addEventListener("popstate",()=>{ee.ver=++Q});const te=(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(()=>{ee.ver=++Q}))},ie="ezhEZH";class re{constructor(e,t,i){this.com=e,this.b=X.w.createPath(t+ie),this.needAuth=i}com;needAuth;parseParam(e){const t=this.b.test(e);if(t)return delete t[ie],t}buildUrl(e){throw new Error("WildcardRoute does not support buildUrl")}b}class ne{constructor(e,t,i){this.com=e,this.b=X.w.createPath(t),this.needAuth=i}com;needAuth;parseParam(e){return this.b.test(e)}buildUrl(e){return this.b.build(e)}b}const se=(e,t,i=!0)=>t.endsWith("*")?new re(e,t,i):new ne(e,t,i),ae=({routes:e,notFound:t,checkAuth:i})=>{Q=ee.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 te(e)}return o(l(t),h("_",r.com,n,void 0,-1))}}return t?o(l("404"),h("_",t,{})):void 0},oe=(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),ee.ver=++Q)},le=(e,t)=>{const{href:i,className:r,style:n,title:s,replace:a}=e,o=i?e=>oe(e,i,a):void 0;return q.$("_","a",{className:r,style:n,title:s,href:i,onclick:o},t,-1,1)},he=(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=>oe(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.N_,c=o.Wt,d=o.Ix,f=o.On,u=o.er,p=o.te,m=o.oo,v=o.LU,b=o.wE,w=o.J0;export{l as $ezh,h as Link,c as RouteLink,d as Router,f as addComReader,u as bindData,p as configGC,m as navigate,v as refreshComReaders,b as route,w as useState};
package/package.json CHANGED
@@ -1,22 +1,21 @@
1
1
  {
2
2
  "name": "ezh",
3
- "version": "0.2.0",
3
+ "version": "0.2.2",
4
4
  "scripts": {
5
5
  "start": "webpack serve"
6
6
  },
7
7
  "files": [
8
8
  "./lib/*"
9
9
  ],
10
- "module": "./lib/index.js",
10
+ "module": "./lib/index.min.mjs",
11
11
  "typings": "./lib/index.d.ts",
12
12
  "exports": {
13
13
  ".": {
14
- "default": "./lib/index.js",
14
+ "default": "./lib/index.min.mjs",
15
15
  "types": "./lib/index.d.ts"
16
16
  },
17
17
  "./debug-check": {
18
- "default": "./lib/debugCheck.js",
19
- "types": "./lib/debugCheck.d.ts"
18
+ "default": "./lib/debugCheck.min.mjs"
20
19
  }
21
20
  },
22
21
  "keywords": [
@@ -33,10 +32,10 @@
33
32
  "dts-bundle-generator": "^9.5.1",
34
33
  "eslint": "^9.21.0",
35
34
  "eslint-plugin-import": "^2.31.0",
36
- "ezh-trans": "^0.2.0",
35
+ "ezh-trans": "^0.2.1",
37
36
  "globals": "^16.5.0",
38
- "log-class": "^1.0.2",
39
- "minify-ts": "^1.2.4",
37
+ "log-class": "^1.0.3",
38
+ "minify-ts": "^1.2.5",
40
39
  "sass": "^1.86.0",
41
40
  "sass-loader": "^16.0.5",
42
41
  "style-loader": "^4.0.0",