ezh 0.1.3 → 0.1.4

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/RbTree.js CHANGED
@@ -1,6 +1,6 @@
1
- export { a3, U, L, E, W, J, };
1
+ export { a3, S, U, E, W, J, };
2
2
  class F {
3
- a4() {
3
+ ag() {
4
4
  return !this.k;
5
5
  }
6
6
  G(a) {
@@ -50,7 +50,7 @@ class F {
50
50
  }
51
51
  this.k.e = false;
52
52
  }
53
- v(a) {
53
+ r(a) {
54
54
  const { c, d, parent } = a;
55
55
  if (!c) {
56
56
  if (!parent) {
@@ -93,11 +93,11 @@ class F {
93
93
  c.e = false;
94
94
  return;
95
95
  }
96
- let t;
96
+ let u;
97
97
  let replace;
98
98
  let target = d;
99
99
  if (!target.c) {
100
- t = target;
100
+ u = target;
101
101
  replace = target.d;
102
102
  }
103
103
  else {
@@ -105,15 +105,15 @@ class F {
105
105
  target = target.c;
106
106
  } while (target.c);
107
107
  replace = target.d;
108
- t = target.parent;
109
- if (t.c === target) {
110
- t.c = replace;
108
+ u = target.parent;
109
+ if (u.c === target) {
110
+ u.c = replace;
111
111
  }
112
112
  else {
113
- t.d = replace;
113
+ u.d = replace;
114
114
  }
115
115
  if (replace) {
116
- replace.parent = t;
116
+ replace.parent = u;
117
117
  }
118
118
  target.d = d;
119
119
  d.parent = target;
@@ -132,14 +132,14 @@ class F {
132
132
  target.parent = parent;
133
133
  target.c = c;
134
134
  c.parent = target;
135
- const M = target.e;
135
+ const L = target.e;
136
136
  target.e = a.e;
137
137
  if (replace) {
138
138
  replace.e = false;
139
139
  return;
140
140
  }
141
- if (!M) {
142
- this.H(t);
141
+ if (!L) {
142
+ this.H(u);
143
143
  }
144
144
  }
145
145
  H(parent) {
@@ -208,50 +208,50 @@ class F {
208
208
  }
209
209
  }
210
210
  y(a) {
211
- const r = a.d;
212
- a.d = r?.c;
213
- if (r?.c) {
214
- r.c.parent = a;
211
+ const s = a.d;
212
+ a.d = s?.c;
213
+ if (s?.c) {
214
+ s.c.parent = a;
215
215
  }
216
- r.parent = a.parent;
216
+ s.parent = a.parent;
217
217
  if (!a.parent) {
218
- this.k = r;
218
+ this.k = s;
219
219
  }
220
220
  else if (a === a.parent.c) {
221
- a.parent.c = r;
221
+ a.parent.c = s;
222
222
  }
223
223
  else {
224
- a.parent.d = r;
224
+ a.parent.d = s;
225
225
  }
226
- r.c = a;
227
- a.parent = r;
226
+ s.c = a;
227
+ a.parent = s;
228
228
  }
229
229
  z(a) {
230
- const s = a.c;
231
- a.c = s?.d;
232
- if (s?.d) {
233
- s.d.parent = a;
230
+ const t = a.c;
231
+ a.c = t?.d;
232
+ if (t?.d) {
233
+ t.d.parent = a;
234
234
  }
235
- s.parent = a.parent;
235
+ t.parent = a.parent;
236
236
  if (!a.parent) {
237
- this.k = s;
237
+ this.k = t;
238
238
  }
239
239
  else if (a === a.parent.d) {
240
- a.parent.d = s;
240
+ a.parent.d = t;
241
241
  }
242
242
  else {
243
- a.parent.c = s;
243
+ a.parent.c = t;
244
244
  }
245
- s.d = a;
246
- a.parent = s;
245
+ t.d = a;
246
+ a.parent = t;
247
247
  }
248
248
  k;
249
249
  }
250
250
  const _ = 1;
251
251
  const A = 2;
252
252
  const a3 = 0;
253
- const U = 1;
254
- const L = 2;
253
+ const S = 1;
254
+ const U = 2;
255
255
  const E = 3;
256
256
  class W extends F {
257
257
  search(key) {
@@ -260,7 +260,33 @@ class W extends F {
260
260
  delete(key) {
261
261
  const a = this.I(key);
262
262
  if (a) {
263
- this.v(a);
263
+ this.r(a);
264
+ return a.value;
265
+ }
266
+ return;
267
+ }
268
+ au(pop) {
269
+ let a = this.k;
270
+ if (a) {
271
+ while (a.c) {
272
+ a = a.c;
273
+ }
274
+ if (pop) {
275
+ this.r(a);
276
+ }
277
+ return a.value;
278
+ }
279
+ return;
280
+ }
281
+ M(pop) {
282
+ let a = this.k;
283
+ if (a) {
284
+ while (a.d) {
285
+ a = a.d;
286
+ }
287
+ if (pop) {
288
+ this.r(a);
289
+ }
264
290
  return a.value;
265
291
  }
266
292
  return;
@@ -298,7 +324,7 @@ class W extends F {
298
324
  this.k = { key, value, e: false, parent: undefined, c: undefined, d: undefined };
299
325
  return;
300
326
  }
301
- a5(o, n) {
327
+ ah(o, n) {
302
328
  let f = 0;
303
329
  let a = this.k;
304
330
  if (a) {
@@ -356,7 +382,7 @@ class W extends F {
356
382
  if (j) {
357
383
  let b = j.length;
358
384
  while (b > 0) {
359
- this.v(j[--b]);
385
+ this.r(j[--b]);
360
386
  }
361
387
  }
362
388
  }
@@ -420,7 +446,7 @@ class W extends F {
420
446
  if (j) {
421
447
  let b = j.length;
422
448
  while (b > 0) {
423
- this.v(j[--b]);
449
+ this.r(j[--b]);
424
450
  }
425
451
  }
426
452
  }
@@ -452,7 +478,7 @@ class J extends F {
452
478
  search(key) {
453
479
  let a = this.k;
454
480
  if (a) {
455
- const { w: D } = this;
481
+ const { v: D } = this;
456
482
  let q;
457
483
  while ((q = D(key, a)) !== 0) {
458
484
  if (q < 0) {
@@ -475,19 +501,45 @@ class J extends F {
475
501
  delete(key) {
476
502
  const a = this.search(key);
477
503
  if (a) {
478
- this.v(a);
504
+ this.r(a);
479
505
  a.e = undefined;
480
506
  return a;
481
507
  }
482
508
  return;
483
509
  }
510
+ au(pop) {
511
+ let a = this.k;
512
+ if (a) {
513
+ while (a.c) {
514
+ a = a.c;
515
+ }
516
+ if (pop) {
517
+ this.r(a);
518
+ }
519
+ return a;
520
+ }
521
+ return;
522
+ }
523
+ M(pop) {
524
+ let a = this.k;
525
+ if (a) {
526
+ while (a.d) {
527
+ a = a.d;
528
+ }
529
+ if (pop) {
530
+ this.r(a);
531
+ }
532
+ return a;
533
+ }
534
+ return;
535
+ }
484
536
  C(i, $) {
485
537
  if (i.e !== undefined) {
486
538
  throw new Error('Cannot insert a node which is already in an ObjRbTree');
487
539
  }
488
540
  let a = this.k;
489
541
  if (a) {
490
- const { w: D } = this;
542
+ const { v: D } = this;
491
543
  let q;
492
544
  while ((q = D(i, a)) !== 0) {
493
545
  if (q < 0) {
@@ -539,15 +591,15 @@ class J extends F {
539
591
  this.k = i;
540
592
  return;
541
593
  }
542
- a5(o, n) {
594
+ ah(o, n) {
543
595
  let f = 0;
544
596
  let a = this.k;
545
597
  if (a) {
546
598
  const stack = [];
547
599
  if (n) {
548
- const { w } = this;
600
+ const { v } = this;
549
601
  for (;;) {
550
- const q = w(n, a);
602
+ const q = v(n, a);
551
603
  if (q < 0) {
552
604
  if (a.c) {
553
605
  stack.push(a);
@@ -599,7 +651,7 @@ class J extends F {
599
651
  if (j) {
600
652
  let b = j.length;
601
653
  while (b > 0) {
602
- this.v(j[--b]);
654
+ this.r(j[--b]);
603
655
  }
604
656
  }
605
657
  }
@@ -611,9 +663,9 @@ class J extends F {
611
663
  if (a) {
612
664
  const stack = [];
613
665
  if (n) {
614
- const { w } = this;
666
+ const { v } = this;
615
667
  for (;;) {
616
- const q = w(n, a);
668
+ const q = v(n, a);
617
669
  if (q > 0) {
618
670
  if (a.d) {
619
671
  stack.push(a);
@@ -665,7 +717,7 @@ class J extends F {
665
717
  if (j) {
666
718
  let b = j.length;
667
719
  while (b > 0) {
668
- this.v(j[--b]);
720
+ this.r(j[--b]);
669
721
  }
670
722
  }
671
723
  }
package/lib/bundle.min.js CHANGED
@@ -1 +1 @@
1
- var e={d:(t,r)=>{for(var n in r)e.o(r,n)&&!e.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:r[n]})},o:(e,t)=>Object.prototype.hasOwnProperty.call(e,t)},t={};e.d(t,{ye:()=>q,N_:()=>$e,Wt:()=>je,Ix:()=>Pe,On:()=>M,er:()=>ee,te:()=>L,oo:()=>we,LU:()=>N,wE:()=>Ee,J0:()=>te});class r{a4(){return!this.k}G(e){for(;e.parent?.e;){let t=e.parent,r=t.parent;if(t===r.c){const n=r.d;n?.e?(t.e=!1,n.e=!1,r.e=!0,e=r):(e===t.d&&(e=t,this.y(e),t=e.parent,r=t.parent),t.e=!1,r.e=!0,this.z(r))}else{const n=r.c;!0===n?.e?(t.e=!1,n.e=!1,r.e=!0,e=r):(e===t.c&&(e=t,this.z(e),t=e.parent,r=t.parent),t.e=!1,r.e=!0,this.y(r))}}this.k.e=!1}v(e){const{c:t,d:r,parent:n}=e;if(!t)return n?(n.c===e?n.c=r:n.d=r,r?(r.parent=n,void(r.e=!1)):void(e.e||this.H(n))):(this.k=r,void(r&&(r.parent=void 0,r.e=!1)));if(!r)return n?n.c===e?n.c=t:n.d=t:this.k=t,t.parent=n,void(t.e=!1);let i,a,s=r;if(s.c){do{s=s.c}while(s.c);a=s.d,i=s.parent,i.c===s?i.c=a:i.d=a,a&&(a.parent=i),s.d=r,r.parent=s}else i=s,a=s.d;n?n.c===e?n.c=s:n.d=s:this.k=s,s.parent=n,s.c=t,t.parent=s;const o=s.e;s.e=e.e,a?a.e=!1:o||this.H(i)}H(e){let t,r;for(;;){if(t===e.c){if(r=e.d,r.e){this.y(e),r.e=!1,e.e=!0,r=e.d;continue}if(r.d?.e)return this.y(e),r.e=e.e,e.e=!1,void(r.d.e=!1);if(r.c?.e){r.c.e=!1,this.z(r),r.e=!0,r=e.d;continue}}else{if(r=e.c,r.e){this.z(e),r.e=!1,e.e=!0,r=e.c;continue}if(r.c?.e)return this.z(e),r.e=e.e,e.e=!1,void(r.c.e=!1);if(r.d?.e){r.d.e=!1,this.y(r),r.e=!0,r=e.c;continue}}if(e.e)return e.e=!1,void(r.e=!0);if(r.e=!0,t=e,!t.parent)return;e=t.parent}}y(e){const t=e.d;e.d=t?.c,t?.c&&(t.c.parent=e),t.parent=e.parent,e.parent?e===e.parent.c?e.parent.c=t:e.parent.d=t:this.k=t,t.c=e,e.parent=t}z(e){const t=e.c;e.c=t?.d,t?.d&&(t.d.parent=e),t.parent=e.parent,e.parent?e===e.parent.d?e.parent.d=t:e.parent.c=t:this.k=t,t.d=e,e.parent=t}k}class n extends r{search(e){return this.I(e)?.value}delete(e){const t=this.I(e);if(t)return this.v(t),t.value}C(e,t,r){let n=this.k;if(n){let i;for(;e!==n.key;){if(e<n.key){if(n.c){n=n.c;continue}i={key:e,value:t,e:!0,parent:n,c:void 0,d:void 0},n.c=i}else{if(n.d){n=n.d;continue}i={key:e,value:t,e:!0,parent:n,c:void 0,d:void 0},n.d=i}return void this.G(i)}const a=n.value;return r&&(n.value=t),a}this.k={key:e,value:t,e:!1,parent:void 0,c:void 0,d:void 0}}a5(e,t){let r=0,n=this.k;if(n){const i=[];if(void 0!==t)for(;;){if(t<n.key){if(n.c){i.push(n),n=n.c;continue}}else if(t>n.key){if(n.d){n=n.d;continue}return r}break}else for(;n.c;)i.push(n),n=n.c;let a;for(;;){const t=e(n.key,n.value);if(r++,2&t&&(a??(a=[])).push(n),1&t){r=-r;break}if(n.d)for(n=n.d;n.c;)i.push(n),n=n.c;else if(n=i.pop(),!n)break}if(a){let e=a.length;for(;e>0;)this.v(a[--e])}}return r}O(e,t){let r=0,n=this.k;if(n){const i=[];if(void 0!==t)for(;;){if(t>n.key){if(n.d){i.push(n),n=n.d;continue}}else if(t<n.key){if(n.c){n=n.c;continue}return r}break}else for(;n.d;)i.push(n),n=n.d;let a;for(;;){const t=e(n.key,n.value);if(r++,2&t&&(a??(a=[])).push(n),1&t){r=-r;break}if(n.c)for(n=n.c;n.d;)i.push(n),n=n.d;else if(n=i.pop(),!n)break}if(a){let e=a.length;for(;e>0;)this.v(a[--e])}}return r}I(e){let t=this.k;if(t)for(;e!==t.key;){if(e<t.key){if(t.c){t=t.c;continue}}else if(t.d){t=t.d;continue}return}return t}}const i={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=[],c=new Set,h=new n,u=new n,d=[],f=[],p={id:"",index:0,firstElement:null,attachTo:o,move:o,detachFrom:o,update:o,refresh:o,release:o,version:0,parentCom:{},markChanged:o,watchMountChange:o};let m,v="",g=2e4,y=0,b=0;const w=new n,k=new Map;let x=p,C=(e,t)=>document.createElement(e);const E={svg:(e,t)=>(t.a9(),document.createElementNS("http://www.w3.org/2000/svg",e)),math:(e,t)=>(t.a9(),document.createElementNS("http://www.w3.org/1998/Math/MathML",e)),foreignObject:(e,t)=>"foreignObject"!==e?document.createElement(e):(t.a9(),document.createElementNS("http://www.w3.org/2000/svg",e))},P=()=>{if(++b>=y){for(const e of c)if(c.delete(e),e.id)e.release();else if(--b<y){c.add(e);break}}else c.add(Object.create(p));m&&(m=setTimeout(P,g))},S=(e,t)=>{const r=["",t];for(;e.constructor!==T;)r.push(e.id),e=e.parent;return r.reverse().join(",")},$=()=>{do{w.a5(((e,t)=>{const{newChildren:r,parent:n}=t;return r&&(n&&R(n)?(t.refresh(r),n.currentBefore=void 0):t.constructor===I&&h.C(e,t)),2}))}while(!w.a4());for(const{parent:e,element:t}of l)if(t.detachFrom(a),t.parent!==e&&!u.a4()&&R(e)){const r=!t.parent,n=S(e,t.id);u.a5(((e,t)=>e.startsWith(n)?(t._(t.D,r),2):1),n)}l.length=0},j=(e,t=[],r=0)=>{let n=e[r];for(;;){if(n&&void 0!==n.id)t.push(n);else if(null!=n)switch(typeof n){case"object":j(n,t);break;case"function":n=n();continue;case"boolean":case"number":case"bigint":n=""+n;default:t.push(new F("",n))}if(!(++r<e.length))break;n=e[r]}return t},A=(e,t,r)=>{let n;const i=e.length;let a=t,s=0;for(;s<i;){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=j(a,a.slice(0,s),s);continue}if(n!==a)break}n||t.parent===r||(n=e),s++}return s===a.length?n:a===t?j(a,e.slice(0,s),s):a},R=e=>{let t=e;do{if(t.constructor===T)return!0;t=t.parent}while(t);return!1},B=(e,t,r,n)=>{let i,a,s;if(t!==e&&e.length){const o=[];let l;for(a=t.length,i=1e7;--a>=0;)if(s=t[a],s.parent===r){const e=a-s.index;e===i?(l.H++,s.index=a):(l={from:s.index,to:a,H:1},i=e,s.index=-o.push(l))}else 1e7!==i&&(i=1e7);const c=[];for(a=e.length-1;a>=0;)s=e[a],s.index<0?(l=o[-s.index-1],c.push(l),a-=l.H):(s.detachFrom(r),a--);let h,u,d=0;for(a=t.length-1;a>=0;)if(s=t[a],s.parent!==r)s.index=a--,s.attachTo(r);else{if(l=o[-s.index-1],u=l.H,h=c[d],s.index=a,!n){if(h===l){d++,a-=l.H,r.currentBefore=void 0;continue}if(h.from>l.from){i=d;do{u-=h.H,h=c[++i]}while(h.from>l.from&&u>0);if(u>0){a-=l.H,r.currentBefore=void 0,d=i;continue}}}i=a-l.H;do{s.move()}while(--a>i&&(s=t[a]))}}else for(a=t.length-1;a>=0;a--)s=t[a],s.index=a,r!==s.parent&&s.attachTo(r);r.currentBefore=void 0};class F{constructor(e,t){this.id=e,this.parent=void 0,this.index=0,this.n=0,this.ag=t}id;parent;index;firstElement;attachTo(e){this.firstElement||(this.firstElement=document.createTextNode(this.ag));const{parent:t,firstElement:r,index:n}=this;this.id&&(this.n++||c.delete(this),t&&(r.remove(),l.push({parent:t,element:this}))),this.parent=e;let i=e.currentBefore;void 0===i&&(i=e.findNextSiblingElement(n)),e.element.insertBefore(r,i),e.currentBefore=r}move(){const{parent:e,index:t,firstElement:r}=this;let n=e.currentBefore;void 0===n&&(n=e.findNextSiblingElement(t)),e.element.insertBefore(r,n),e.currentBefore=r}detachFrom(e){this.parent===e?(this.firstElement.remove(),this.parent=void 0,this.id&&l.push({parent:e,element:this})):this.id&&! --this.n&&(y?c.add(this):this.release())}update(e){return this.ag!==e&&(this.ag=e,this.firstElement&&(this.firstElement.nodeValue=e)),!1}refresh(){}release(e){e&&this.parent===e&&(this.firstElement.remove(),this.parent=void 0),this.id&&--this.n<=0&&k.delete(this.id)}n;ag}class O{constructor(e,t,r){this.id=e,this.parent=void 0,this.index=0,this.n=0,this.newChildren=this.d=r?j(t):t||s,this.currentBefore=void 0}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 r=e[t].firstElement;if(r)return r}return null}attachTo(e){const{parent:t,d:r,newChildren:n}=this;if(this.n++||c.delete(this),t){l.push({parent:t,element:this});for(let e=r.length-1;e>=0;e--)r[e].detachFrom(this)}this.parent=e;const i=n||r;for(let e=i.length-1;e>=0;e--){const t=i[e];t.index=e,t.attachTo(this)}e.currentBefore=this.currentBefore,this.currentBefore=void 0,this.d=i,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:t}=this;for(const e of t)e.detachFrom(this);this.parent=void 0,l.push({parent:e,element:this})}else--this.n||(y?c.add(this):this.release())}update(e,t){if(t){const e=A(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(e&&this.parent===e){const{d:e}=this;for(const t of e)t.detachFrom(this);this.parent=void 0}--this.n<=0&&k.delete(this.id)}findNextSiblingElement(e){const t=this.newChildren||this.d;let r,n=e+1,i=t[n];for(;i;){if(r=i.firstElement,r)return r;i=t[++n]}return r=this.parent.currentBefore,void 0!==r?r:this.parent.findNextSiblingElement(this.index)}n;d}class z{constructor(e,t,r,n,i,o){if(this.id=e,this.parent=void 0,this.index=0,this.n=0,this.firstElement=this.element=C(t,this),this.newChildren=this.d=o?j(n):n||s,this.currentBefore=void 0,r){if(this.p=a,this.u=-1,"select"===t){const e=this.element,t=r,n=t.value;if(n){t.value=void 0;const r=this.refresh;this.refresh=i=>{if(B(this.d,i,this),this.d=i,this.newChildren=void 0,Array.isArray(n)){const t=n,[r,i,a]=t;e.value=a;const s=t[3]=e=>r[i]=e.target.value;e.addEventListener("change",s)}else e.value=n;t.value=n,this.refresh=r}}}this.update(r),this.u=i??0}else this.p=r,this.u=0}id;element;parent;newChildren;index;currentBefore;firstElement;attachTo(e){const{parent:t,element:r,newChildren:n,index:i}=this;this.n++||c.delete(this),t&&(r.remove(),l.push({parent:t,element:this})),this.parent=e,n&&this.refresh(n);let a=e.currentBefore;void 0===a&&(a=e.findNextSiblingElement(i)),e.element.insertBefore(r,a),e.currentBefore=r}move(){const{parent:e,newChildren:t,index:r,element:n}=this;t&&this.refresh(t);let i=e.currentBefore;void 0===i&&(i=e.findNextSiblingElement(r)),e.element.insertBefore(n,i),e.currentBefore=n}detachFrom(e){this.parent===e?(this.element.remove(),this.parent=void 0,l.push({parent:e,element:this})):--this.n||(y?c.add(this):this.release())}update(e,t){const{element:r,p:n,u:s}=this;if(n&&s){this.p=e;let t=s;for(const s in e){const o=e[s],l=n[s];if(o!==l)if(null!=o)switch(typeof o){case"string":{const e=i[s];e?r.setAttribute(e,o):r[s]=o;break}case"number":case"boolean":case"function":r[s]=o;break;default:if(Array.isArray(o)){const[e,t,n]=o;if(l){const[i,a,c,h]=l;if(c!==n&&r[s]!==n&&(r[s]=n),i===e&&a===t)o[3]=h;else{const n=o[3]=r=>e[t]=r.target[s];r.removeEventListener("change",h),r.addEventListener("change",n)}}else{r[s]=n;const i=o[3]=r=>e[t]=r.target[s];r.addEventListener("change",i)}break}if("style"===s){if(!l){const t=r.style,n={};let i=0;for(const e in o){const r=o[e];n[e]=r,i++,t[e]=r}e[s]=n,n.k=i;break}const t=r.style,n={};let i=0,a=l.k;for(const e in o){const r=o[e];n[e]=r,e in l&&a--,i++,r!==l[s]&&(t[e]=r)}if(e[s]=n,n.k=i,a)for(const e in l)if(!(e in o)&&(t[e]=null,! --a))break;break}r[s]=o}else switch(typeof l){case"string":{const e=i[s];e?this.element.removeAttribute(e):this.element[s]=o;break}case"object":l?Array.isArray(l)?r.removeEventListener("change",l[3]):l===a&&(r[s]=o):r[s]=o;break;default:r[s]=o}if(! --t)break}}if(t){const e=A(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(e&&this.parent===e&&(this.element.remove(),this.parent=void 0),--this.n<=0){const{d:e}=this;for(const t of e)t.release(this);k.delete(this.id)}}findNextSiblingElement(e){const t=this.newChildren||this.d;let r,n=e+1,i=t[n];for(;i;){if(r=i.firstElement,r)return r;i=t[++n]}return null}a9(){this.update=this.aP}aP(e,t){const{element:r,p:n,u:a}=this;if(n&&a){this.p=e;let t=a;for(const a in e){const s=e[a],o=n[a];if(s!==o)if(null!=s)switch(typeof s){case"string":r.setAttribute(i[a]??a,s);break;case"number":case"boolean":r.setAttribute(i[a]??a,""+s);break;case"function":r[a]=s;break;default:if("style"===a){if(!o){const t=r.style,n={};let i=0;for(const e in s){const r=s[e];n[e]=r,i++,t[e]=r}e[a]=n,n.k=i;break}const t=r.style,n={};let i=0,l=o.k;for(const e in s){const r=s[e];n[e]=r,e in o&&l--,i++,r!==o[a]&&(t[e]=r)}if(e[a]=n,n.k=i,l)for(const e in o)if(!(e in s)&&(t[e]=null,! --l))break;break}r[a]=s}else switch(typeof o){case"string":case"number":case"boolean":r.removeAttribute(i[a]??a);break;default:r[a]=s}if(! --t)break}}if(t){const e=A(this.d,t,this);if(e)return this.newChildren=e,!0}return!1}n;p;d;u}class I{constructor(e,t,r,n,i,a,o){this.id=e,this.parentCom=t,this.parent=void 0,this.index=0,this.version=0,this.n=0,this.aC=r,this.p=n,this.newChildren=this.d=o?j(i):i||s,this.u=a??0}id;parentCom;parent;newChildren;index;version;get firstElement(){return this.j?.firstElement||null}attachTo(e){const{parent:t,newChildren:r,j:n}=this;this.parent=e,r?this.refresh(r):n&&(n.index=this.index,n.attachTo(e)),this.n++||c.delete(this),t&&l.push({parent:t,element:this})}move(){const{newChildren:e,j:t}=this;e?this.refresh(e):t&&(t.index=this.index,t.move())}detachFrom(e){this.parent===e?(this.j?.detachFrom(e),this.parent=void 0,l.push({parent:e,element:this})):--this.n||(y?c.add(this):this.release())}update(e,t){const{p:r,d:n,u:i}=this;if(this.p=e,t){const e=A(n,t,this.parent);if(e)return this.newChildren=e,!0}if(!this.newChildren&&i){let t=i;for(const i in r){if(r[i]!==e[i])return this.newChildren=n,!0;if(! --t)break}}return!1}refresh(e){const{id:t,parent:r,j:n,index:i}=this,s=x;x=this;let o=this.aC(this.p||a,e);if(o!==n)switch(typeof o){case"boolean":case"number":case"bigint":o=""+o;case"string":o=new F("",o),this.j=o,o.index=i,o.attachTo(r),n?.detachFrom(r);break;default:o?(this.j=o,o.index=i,o.attachTo(r),n?.detachFrom(r),h.a4()||h.a5(((e,r)=>e.startsWith(t)?r.parent&&R(r.parent)?(w.C(e,r),2):0:1),t)):(this.j=void 0,n?.detachFrom(r))}else n&&(n.parent!==r?(n.index=i,n.attachTo(r)):n.index!==i&&(n.index=i,n.move()));this.d=e,this.newChildren=void 0,x=s}release(e){e&&this.parent===e&&(this.j?.detachFrom(e),this.parent=void 0),--this.n<=0&&(this.newChildren&&h.delete(this.id),k.delete(this.id))}markChanged(){return!this.newChildren&&(this.newChildren=this.d,!0)}watchMountChange(e,t,r){const n=S(this.parent,this.id);u.C(n+e,{_:t,D:r},!0)}n;aC;p;d;u;j}class T{constructor(e,t){this.id=e,this.element=t,this.currentBefore=void 0}id;element;parent;currentBefore;findNextSiblingElement(e){return null}render(e){this.ah||(this.ah=new I(this.id,p,e,null,s),k.set(this.id,this.ah),this.ah.attachTo(this))}ah}const M=(e,t)=>{if(x.id){let r=e[t];r||(r=new Map,e[t]=r),r.set(x.id,x.version)}};let N=(e,t)=>{const r=e[t];if(r){for(const[e,t]of r){const r=k.get(e);r?.version===t&&r.markChanged()&&(w.a4()&&queueMicrotask($),w.C(e,r))}r.clear()}};const L=(e,t=2e4)=>{if(e>=0&&t>=1e3){if(g=t,y&&clearTimeout(m),e)m=setTimeout(P,g);else if(m){m=void 0;for(let e=0;e<y;e++)P()}return y=e,!0}return!1},U=()=>{v=f.pop()};var q;!function(e){e.render=(e,t)=>{const r=(d.length||"")+"|",n=new T(r,e);d.push(n),n.render(t)},e.$=(e,t,r,n,i,a)=>{const s=`${x.id}${e}${v}`;let o=k.get(s);return o?((r||n)&&o.update(r,n)&&w.C(s,o),o):(o=new z(s,t,r,n,i,a),k.set(s,o),o)},e.$c=(e,t,r,n,i,a)=>{const s=`${x.id}${e}${v}`;let o=k.get(s);return o?((r||n)&&o.update(r,n)&&w.C(s,o),o):(o=new I(s,x,t,r,n,i,a),k.set(s,o),o)},e.$f=(e,t,r)=>{const n=`${x.id}${e}${v}`;let i=k.get(n);return i?(t&&i.update(null,t)&&w.C(n,i),i):(i=new O(n,t,r),k.set(n,i),i)},e.$k=e=>(f.push(v),v=`${v||"{"}${e}}`,U),e.$n=e=>{const t=C;return C=E[e],()=>{C=t}},e.$s=(e,t)=>(e(),t),e.$t=(e,t,r)=>{const n=`${x.id}${e}${v}`;let i=k.get(n);return i?(r&&i.update(t),i):(i=new F(n,t),k.set(i.id,i),i)}}(q||(q={}));const H=Symbol(),_=Array.prototype,D=M;let Z=(e,t)=>{Z=N,Z(e,t)},V=!1;const W=new WeakMap,Q=e=>function(...t){const r=this.length;let n,i,a;switch(e){case _.push:n=r,i=n+t.length,a=r;break;case _.unshift:n=0,i=t.length,a=r;break;case _.fill:n=t[1],void 0===n||n<=-r?n=0:n<0&&(n=r+n),i=t[2],void 0===i||i>r?i=r:i<=-r?i=0:i<0&&(i=r+i),a=i;break;case _.sort:case _.reverse:n=i=0,a=r;break;case _.pop:n=i=r-1,a=r;break;case _.shift:n=i=0,a=r;break;default:n=t[0],n<0&&(n=r+n),i=t.length>2?t.length-2:0,a=t[1],void 0===a&&(a=r-n),a=a>0?a!==i?r:n+i:i?r:n,i+=n}const s=e.bind(this)(...t),o=this[H];let l;for(let e=n;e<i;e++){switch(l=this[e],typeof l){case"object":if(l){for(;e<i;)l=this[e],l&&!l[H]&&(this[e]=X(l)),e++;break}case"undefined":continue}break}return r!==this.length&&Z(o,"length"),Z(o,Symbol.iterator),s},G={push:Q(_.push),unshift:Q(_.unshift),fill:Q(_.fill),sort:Q(_.sort),reverse:Q(_.reverse),pop:Q(_.pop),shift:Q(_.shift),splice:Q(_.splice)},J={get(e,t){if(t!==H){let r=e[t];if(r&&r===_[t]){const n=G[t];if(n)return n.bind(e);r=r.bind(e)}return D(e[H],"length"!==t?Symbol.iterator:t),r}return e},set(e,t,r){if(t!==H){if(e[t]===r)return!0;const n=e[H];return r&&"object"==typeof r&&(r=X(r)),e[t]=r,"length"===t&&Z(n,t),Z(n,Symbol.iterator),!0}return((e,t)=>{const r=t.length,n=e.length;let i;for(let n=0;n<r;n++){let a=t[n];if(a&&"object"==typeof a){do{a=t[n],i=e[n],a?i?i!==a&&(i[H]=a):e[n]=X(a):e[n]=a}while(++n<r);break}if(null!=a){do{e[n]=t[n]}while(++n<r);break}e[n]=a}const a=e[H];n!==r&&(n>r&&(e.length=r),Z(a,"length")),Z(a,Symbol.iterator)})(e,r),!0},has:(e,t)=>(D(e[H],isNaN(parseInt(t))?t:Symbol.iterator),t in e),deleteProperty:(e,t)=>(isNaN(parseInt(t))||(t=Symbol.iterator),void 0!==e[t]&&Z(e[H],t),delete e[t])},K={get(e,t){if(t!==H){const r=e[t];return"id"!==t&&D(e[H],t),r}return e},set(e,t,r,n){if(t!==H){if(e[t]===r)return!0;const n=e[H];return r&&"object"==typeof r&&(r=X(r)),e[t]=r,Z(n,t),!0}return((e,t,r)=>{const n={...e};let i;for(const a in r){delete n[a];const s=r[a];s&&"object"==typeof s&&(i=e[a],i)?i[H]=s:e[a]!==s&&(t[a]=s)}for(const e in n)delete t[e]})(e,n,r),!0},has:(e,t)=>(D(e[H],t),t in e),deleteProperty:(e,t)=>(void 0!==e[t]&&Z(e[H],t),delete e[t])},X=e=>{let t;if(Array.isArray(e)){t=[];const r=e.length;for(let n=0;n<r;n++){let i=e[n];if(i&&"object"==typeof i){do{t[n]=(i=e[n])&&X(i)}while(++n<r);break}if(null!=i){do{t[n]=e[n]}while(++n<r);break}t[n]=i}e=new Proxy(t,J)}else{t={};for(const r in e){const n=e[r];t[r]=n&&"object"==typeof n?X(n):n}e=new Proxy(t,K)}return t[H]={},e},Y=(e,t)=>{t?e.w=!0:e.com.watchMountChange("s",Y,e)},ee=(e,t)=>[e,t,e[t]],te=(e,t)=>{const r=x;if(r.id){let n=W.get(r);if(n){const t=n.e;return n.w?(V=!0,"function"==typeof e&&(e=e()),t[H]=e,V=!1,n.w=!1,r.watchMountChange("s",Y,n)):"function"==typeof e&&(V=!0,(e=e(t))!==t&&(t[H]=e),V=!1),t}"function"==typeof e&&(e=e());const i=X(e);return n={com:r,e:i,w:!1},W.set(r,n),t&&r.watchMountChange("s",Y,n),i}return"function"==typeof e&&(e=e()),X(e)};var re=function(){return re=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var i in t=arguments[r])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},re.apply(this,arguments)},ne=function(e){return void 0===e&&(e={}),{arrayFormat:e.arrayFormat||"none",booleanFormat:e.booleanFormat||"none",nullFormat:e.nullFormat||"default"}},ie=function(e){return encodeURIComponent(e)},ae=function(e){return decodeURIComponent(e)},se=function(e,t){var r=ne(t);return function(e){var t=e.indexOf("?");return-1===t?e:e.slice(t+1)}(e).split("&").reduce((function(e,t){var n=t.split("="),i=n[0],a=n[1],s=function(e){var t=e.indexOf("["),r=-1!==t;return{hasBrackets:r,name:r?e.slice(0,t):e}}(i),o=s.hasBrackets,l=s.name,c=e[l],h=function(e,t){if(void 0===e)return"empty-true"===t.booleanFormat||null;if("string"===t.booleanFormat){if("true"===e)return!0;if("false"===e)return!1}if("unicode"===t.booleanFormat){if("✓"===ae(e))return!0;if("✗"===ae(e))return!1}return"string"===t.nullFormat&&"null"===e?null:ae(e)}(a,r);return e[l]=void 0===c?o?[h]:h:(Array.isArray(c)?c:[c]).concat(h),e}),{})},oe=/[^!$'()*+,;|:]/g,le=function(e){return e.replace(oe,(function(e){return encodeURIComponent(e)}))},ce={default:le,uri:encodeURI,uriComponent:encodeURIComponent,none:function(e){return e},legacy:encodeURI},he={default:decodeURIComponent,uri:decodeURI,uriComponent:decodeURIComponent,none:function(e){return e},legacy:decodeURIComponent},ue=function(e,t,r){var n=ce[t]||le;return r?String(e).split("/").map(n).join("/"):n(String(e))},de=function(e){return"("+(e?e.replace(/(^<|>$)/g,""):"[a-zA-Z0-9-_.~%':|=+\\*@$]+")+")"},fe=[{name:"url-parameter",pattern:/^:([a-zA-Z0-9-_]*[a-zA-Z0-9]{1})(<(.+?)>)?/,regex:function(e){return new RegExp(de(e[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(e){return new RegExp(";"+e[1]+"="+de(e[2]))}},{name:"query-parameter",pattern:/^(?:\?|&)(?::)?([a-zA-Z0-9-_]*[a-zA-Z0-9]{1})/},{name:"delimiter",pattern:/^(\/|\?)/,regex:function(e){return new RegExp("\\"+e[0])}},{name:"sub-delimiter",pattern:/^(!|&|-|_|\.|;)/,regex:function(e){return new RegExp(e[0])}},{name:"fragment",pattern:/^([0-9a-zA-Z]+)/,regex:function(e){return new RegExp(e[0])}}],pe=function e(t,r){if(void 0===r&&(r=[]),!fe.some((function(n){var i=t.match(n.pattern);return!!i&&(r.push({type:n.name,match:i[0],val:i.slice(1,2),otherVal:i.slice(2),regex:n.regex instanceof Function?n.regex(i):n.regex}),i[0].length<t.length&&(r=e(t.substr(i[0].length),r)),!0)})))throw new Error("Could not parse path '"+t+"'");return r},me=function(e){return null!=e},ve={urlParamsEncoding:"default"},ge=function(){function e(e,t){if(!e)throw new Error("Missing path in Path constructor");this.path=e,this.options=re(re({},ve),t),this.tokens=pe(e),this.hasUrlParams=this.tokens.filter((function(e){return/^url-parameter/.test(e.type)})).length>0,this.hasSpatParam=this.tokens.filter((function(e){return/splat$/.test(e.type)})).length>0,this.hasMatrixParams=this.tokens.filter((function(e){return/matrix$/.test(e.type)})).length>0,this.hasQueryParams=this.tokens.filter((function(e){return/^query-parameter/.test(e.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(e){return void 0!==e.regex})).map((function(e){return e.regex.source})).join("")}return e.createPath=function(t,r){return new e(t,r)},e.prototype.isQueryParam=function(e){return-1!==this.queryParams.indexOf(e)},e.prototype.isSpatParam=function(e){return-1!==this.spatParams.indexOf(e)},e.prototype.test=function(e,t){var r=this,n=re(re({caseSensitive:!1,strictTrailingSlash:!1},this.options),t),i=function(e,t){return t||"\\/"===e?e:e.replace(/\\\/$/,"")+"(?:\\/)?"}(this.source,n.strictTrailingSlash),a=this.urlTest(e,i+(this.hasQueryParams?"(\\?.*$|$)":"$"),n.caseSensitive,n.urlParamsEncoding);if(!a||!this.hasQueryParams)return a;var s=se(e,n.queryParams);return 0===Object.keys(s).filter((function(e){return!r.isQueryParam(e)})).length?(Object.keys(s).forEach((function(e){return a[e]=s[e]})),a):null},e.prototype.partialTest=function(e,t){var r=this,n=re(re({caseSensitive:!1,delimited:!0},this.options),t),i=function(e,t){return t?/(\/)$/.test(e)?e:e+"(\\/|\\?|\\.|;|$)":e}(this.source,n.delimited),a=this.urlTest(e,i,n.caseSensitive,n.urlParamsEncoding);if(!a)return a;if(!this.hasQueryParams)return a;var s=se(e,n.queryParams);return Object.keys(s).filter((function(e){return r.isQueryParam(e)})).forEach((function(e){return function(e,t,r){void 0===r&&(r="");var n=e[t];return e[t]=void 0===n?r:Array.isArray(n)?n.concat(r):[n,r],e}(a,e,s[e])})),a},e.prototype.build=function(e,t){var r=this;void 0===e&&(e={});var n=re(re({ignoreConstraints:!1,ignoreSearch:!1,queryParams:{}},this.options),t),i=Object.keys(e).filter((function(e){return!r.isQueryParam(e)})).reduce((function(t,i){if(!me(e[i]))return t;var a=e[i],s=r.isSpatParam(i);return"boolean"==typeof a?t[i]=a:Array.isArray(a)?t[i]=a.map((function(e){return ue(e,n.urlParamsEncoding,s)})):t[i]=ue(a,n.urlParamsEncoding,s),t}),{});if(this.urlParams.some((function(t){return!me(e[t])}))){var a=this.urlParams.filter((function(t){return!me(e[t])}));throw new Error("Cannot build path: '"+this.path+"' requires missing parameters { "+a.join(", ")+" }")}if(!n.ignoreConstraints){var s=this.tokens.filter((function(e){return/^url-parameter/.test(e.type)&&!/-splat$/.test(e.type)})).every((function(e){return new RegExp("^"+de(e.otherVal[0])+"$").test(i[e.val])}));if(!s)throw new Error("Some parameters of '"+this.path+"' are of invalid format")}var o=this.tokens.filter((function(e){return!1===/^query-parameter/.test(e.type)})).map((function(e){return"url-parameter-matrix"===e.type?";"+e.val+"="+i[e.val[0]]:/^url-parameter/.test(e.type)?i[e.val[0]]:e.match})).join("");if(n.ignoreSearch)return o;var l=function(e,t){var r=ne(t);return Object.keys(e).filter((function(t){return void 0!==e[t]})).map((function(t){return function(e,t,r){return null===t?function(e,t){return"hidden"===t.nullFormat?"":"string"===t.nullFormat?e+"=null":e}(e,r):"boolean"==typeof t?function(e,t,r){return"empty-true"===r.booleanFormat&&t?e:e+"="+("unicode"===r.booleanFormat?t?"✓":"✗":t.toString())}(e,t,r):Array.isArray(t)?function(e,t,r){var n=function(e){return"index"===e.arrayFormat?function(e,t){return e+"["+t+"]"}:"brackets"===e.arrayFormat?function(e){return e+"[]"}:function(e){return e}}(r);return t.map((function(t,r){return n(e,r)+"="+ie(t)})).join("&")}(e,t,r):e+"="+ie(t)}(t,e[t],r)})).filter(Boolean).join("&")}(this.queryParams.filter((function(t){return-1!==Object.keys(e).indexOf(t)})).reduce((function(t,r){return t[r]=e[r],t}),{}),n.queryParams);return l?o+"?"+l:o},e.prototype.getParams=function(e){var t=e instanceof RegExp?function(t){return e.test(t.type)}:function(t){return t.type===e};return this.tokens.filter(t).map((function(e){return e.val[0]}))},e.prototype.urlTest=function(e,t,r,n){var i=this,a=new RegExp("^"+t,r?"":"i"),s=e.match(a);return s?this.urlParams.length?s.slice(1,this.urlParams.length+1).reduce((function(e,t,r){return e[i.urlParams[r]]=(he[n]||decodeURIComponent)(t),e}),{}):{}:null},e}();let ye=0;const be=te({c:0});window.addEventListener("popstate",(()=>{be.c=++ye}));const we=(e,t)=>{const{pathname:r,search:n,hash:i}=window.location;e!==`${r}${n}${i}`&&(t?window.history.replaceState(void 0,"",e):window.history.pushState(void 0,"",e),queueMicrotask((()=>{be.c=++ye})))},ke="ezhEZH";class xe{constructor(e,t,r){this.com=e,this.b=ge.createPath(t+ke),this.needAuth=r}com;needAuth;parseParam(e){const t=this.b.test(e);if(t)return delete t[ke],t}buildUrl(e){throw new Error("WildcardRoute does not support buildUrl")}b}class Ce{constructor(e,t,r){this.com=e,this.b=ge.createPath(t),this.needAuth=r}com;needAuth;parseParam(e){return this.b.test(e)}buildUrl(e){return this.b.build(e)}b}const Ee=(e,t,r=!0)=>t.endsWith("*")?new xe(e,t,r):new Ce(e,t,r),Pe=({routes:e,notFound:t,checkAuth:r})=>{ye=be.c;const{pathname:n,search:i,hash:a}=window.location,s=`${n}${i}${a}`,{$s:o,$k:l,$c:c}=q;for(const t in e){const n=e[t],i=n.parseParam(s);if(i){if(r&&n.needAuth){const e=r(s);if(e)return void we(e)}return o(l(t),c("_",n.com,i,void 0,i))}}return t?o(l("404"),c("_",t,{})):void 0},Se=(e,t,r)=>{e.preventDefault();const{pathname:n,search:i,hash:a}=window.location;t!==`${n}${i}${a}`&&(r?window.history.replaceState(void 0,"",t):window.history.pushState(void 0,"",t),be.c=++ye)},$e=(e,t)=>{const{href:r,className:n,style:i,title:a,replace:s}=e,o=r?e=>Se(e,r,s):void 0;return q.$("_","a",{className:n,style:i,title:a,href:r,onclick:o},t,-1,1)},je=(e,t)=>{const{route:r,params:n,className:i,style:a,title:s,replace:o}=e,l=r.buildUrl(n);return q.$("_","a",{className:i,style:a,title:s,href:l,onclick:e=>Se(e,l,o)},t,-1,1)};var Ae=t.ye,Re=t.N_,Be=t.Wt,Fe=t.Ix,Oe=t.On,ze=t.er,Ie=t.te,Te=t.oo,Me=t.LU,Ne=t.wE,Le=t.J0;export{Ae as $ezh,Re as Link,Be as RouteLink,Fe as Router,Oe as addComReader,ze as bindData,Ie as configGC,Te as navigate,Me as refreshComReaders,Ne as route,Le as useState};
1
+ var e={d:(t,r)=>{for(var n in r)e.o(r,n)&&!e.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:r[n]})},o:(e,t)=>Object.prototype.hasOwnProperty.call(e,t)},t={};e.d(t,{ye:()=>q,N_:()=>$e,Wt:()=>je,Ix:()=>Pe,On:()=>M,er:()=>ee,te:()=>L,oo:()=>we,LU:()=>N,wE:()=>Ee,J0:()=>te});class r{ag(){return!this.k}G(e){for(;e.parent?.e;){let t=e.parent,r=t.parent;if(t===r.c){const n=r.d;n?.e?(t.e=!1,n.e=!1,r.e=!0,e=r):(e===t.d&&(e=t,this.y(e),t=e.parent,r=t.parent),t.e=!1,r.e=!0,this.z(r))}else{const n=r.c;!0===n?.e?(t.e=!1,n.e=!1,r.e=!0,e=r):(e===t.c&&(e=t,this.z(e),t=e.parent,r=t.parent),t.e=!1,r.e=!0,this.y(r))}}this.k.e=!1}r(e){const{c:t,d:r,parent:n}=e;if(!t)return n?(n.c===e?n.c=r:n.d=r,r?(r.parent=n,void(r.e=!1)):void(e.e||this.H(n))):(this.k=r,void(r&&(r.parent=void 0,r.e=!1)));if(!r)return n?n.c===e?n.c=t:n.d=t:this.k=t,t.parent=n,void(t.e=!1);let i,a,s=r;if(s.c){do{s=s.c}while(s.c);a=s.d,i=s.parent,i.c===s?i.c=a:i.d=a,a&&(a.parent=i),s.d=r,r.parent=s}else i=s,a=s.d;n?n.c===e?n.c=s:n.d=s:this.k=s,s.parent=n,s.c=t,t.parent=s;const o=s.e;s.e=e.e,a?a.e=!1:o||this.H(i)}H(e){let t,r;for(;;){if(t===e.c){if(r=e.d,r.e){this.y(e),r.e=!1,e.e=!0,r=e.d;continue}if(r.d?.e)return this.y(e),r.e=e.e,e.e=!1,void(r.d.e=!1);if(r.c?.e){r.c.e=!1,this.z(r),r.e=!0,r=e.d;continue}}else{if(r=e.c,r.e){this.z(e),r.e=!1,e.e=!0,r=e.c;continue}if(r.c?.e)return this.z(e),r.e=e.e,e.e=!1,void(r.c.e=!1);if(r.d?.e){r.d.e=!1,this.y(r),r.e=!0,r=e.c;continue}}if(e.e)return e.e=!1,void(r.e=!0);if(r.e=!0,t=e,!t.parent)return;e=t.parent}}y(e){const t=e.d;e.d=t?.c,t?.c&&(t.c.parent=e),t.parent=e.parent,e.parent?e===e.parent.c?e.parent.c=t:e.parent.d=t:this.k=t,t.c=e,e.parent=t}z(e){const t=e.c;e.c=t?.d,t?.d&&(t.d.parent=e),t.parent=e.parent,e.parent?e===e.parent.d?e.parent.d=t:e.parent.c=t:this.k=t,t.d=e,e.parent=t}k}class n extends r{search(e){return this.I(e)?.value}delete(e){const t=this.I(e);if(t)return this.r(t),t.value}au(e){let t=this.k;if(t){for(;t.c;)t=t.c;return e&&this.r(t),t.value}}M(e){let t=this.k;if(t){for(;t.d;)t=t.d;return e&&this.r(t),t.value}}C(e,t,r){let n=this.k;if(n){let i;for(;e!==n.key;){if(e<n.key){if(n.c){n=n.c;continue}i={key:e,value:t,e:!0,parent:n,c:void 0,d:void 0},n.c=i}else{if(n.d){n=n.d;continue}i={key:e,value:t,e:!0,parent:n,c:void 0,d:void 0},n.d=i}return void this.G(i)}const a=n.value;return r&&(n.value=t),a}this.k={key:e,value:t,e:!1,parent:void 0,c:void 0,d:void 0}}ah(e,t){let r=0,n=this.k;if(n){const i=[];if(void 0!==t)for(;;){if(t<n.key){if(n.c){i.push(n),n=n.c;continue}}else if(t>n.key){if(n.d){n=n.d;continue}return r}break}else for(;n.c;)i.push(n),n=n.c;let a;for(;;){const t=e(n.key,n.value);if(r++,2&t&&(a??(a=[])).push(n),1&t){r=-r;break}if(n.d)for(n=n.d;n.c;)i.push(n),n=n.c;else if(n=i.pop(),!n)break}if(a){let e=a.length;for(;e>0;)this.r(a[--e])}}return r}O(e,t){let r=0,n=this.k;if(n){const i=[];if(void 0!==t)for(;;){if(t>n.key){if(n.d){i.push(n),n=n.d;continue}}else if(t<n.key){if(n.c){n=n.c;continue}return r}break}else for(;n.d;)i.push(n),n=n.d;let a;for(;;){const t=e(n.key,n.value);if(r++,2&t&&(a??(a=[])).push(n),1&t){r=-r;break}if(n.c)for(n=n.c;n.d;)i.push(n),n=n.d;else if(n=i.pop(),!n)break}if(a){let e=a.length;for(;e>0;)this.r(a[--e])}}return r}I(e){let t=this.k;if(t)for(;e!==t.key;){if(e<t.key){if(t.c){t=t.c;continue}}else if(t.d){t=t.d;continue}return}return t}}const i={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=[],c=new Set,h=new n,u=new n,d=[],f=[],p={id:"",index:0,firstElement:null,attachTo:o,move:o,detachFrom:o,update:o,refresh:o,release:o,version:0,parentCom:{},markChanged:o,watchMountChange:o};let m,v="",g=2e4,y=0,b=0;const w=new n,k=new Map;let x=p,C=(e,t)=>document.createElement(e);const E={svg:(e,t)=>(t.a7(),document.createElementNS("http://www.w3.org/2000/svg",e)),math:(e,t)=>(t.a7(),document.createElementNS("http://www.w3.org/1998/Math/MathML",e)),foreignObject:(e,t)=>"foreignObject"!==e?document.createElement(e):(t.a7(),document.createElementNS("http://www.w3.org/2000/svg",e))},P=()=>{if(++b>=y){for(const e of c)if(c.delete(e),e.id)e.release();else if(--b<y){c.add(e);break}}else c.add(Object.create(p));m&&(m=setTimeout(P,g))},S=(e,t)=>{const r=["",t];for(;e.constructor!==T;)r.push(e.id),e=e.parent;return r.reverse().join(",")},$=()=>{let e;for(;e=w.au(!0);){const{id:t,newChildren:r,parent:n}=e;r&&(n&&R(n)?(e.refresh(r),n.currentBefore=void 0):e.constructor===I&&h.C(t,e))}for(const{parent:e,element:t}of l)if(t.detachFrom(a),t.parent!==e&&!u.ag()&&R(e)){const r=!t.parent,n=S(e,t.id);u.ah(((e,t)=>e.startsWith(n)?(t._(t.D,r),2):1),n)}l.length=0},j=(e,t=[],r=0)=>{let n=e[r];for(;;){if(n&&void 0!==n.id)t.push(n);else if(null!=n)switch(typeof n){case"object":j(n,t);break;case"function":n=n();continue;case"boolean":case"number":case"bigint":n=""+n;default:t.push(new F("",n))}if(!(++r<e.length))break;n=e[r]}return t},A=(e,t,r)=>{let n;const i=e.length;let a=t,s=0;for(;s<i;){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=j(a,a.slice(0,s),s);continue}if(n!==a)break}n||t.parent===r||(n=e),s++}return s===a.length?n:a===t?j(a,e.slice(0,s),s):a},R=e=>{let t=e;do{if(t.constructor===T)return!0;t=t.parent}while(t);return!1},B=(e,t,r,n)=>{let i,a,s;if(t!==e&&e.length){const o=[];let l;for(a=t.length,i=1e7;--a>=0;)if(s=t[a],s.parent===r){const e=a-s.index;e===i?(l.G++,s.index=a):(l={from:s.index,to:a,G:1},i=e,s.index=-o.push(l))}else 1e7!==i&&(i=1e7);const c=[];for(a=e.length-1;a>=0;)s=e[a],s.index<0?(l=o[-s.index-1],c.push(l),a-=l.G):(s.detachFrom(r),a--);let h,u,d=0;for(a=t.length-1;a>=0;)if(s=t[a],s.parent!==r)s.index=a--,s.attachTo(r);else{if(l=o[-s.index-1],u=l.G,h=c[d],s.index=a,!n){if(h===l){d++,a-=l.G,r.currentBefore=void 0;continue}if(h.from>l.from){i=d;do{u-=h.G,h=c[++i]}while(h.from>l.from&&u>0);if(u>0){a-=l.G,r.currentBefore=void 0,d=i;continue}}}i=a-l.G;do{s.move()}while(--a>i&&(s=t[a]))}}else for(a=t.length-1;a>=0;a--)s=t[a],s.index=a,r!==s.parent&&s.attachTo(r);r.currentBefore=void 0};class F{constructor(e,t){this.id=e,this.parent=void 0,this.index=0,this.n=0,this.ae=t}id;parent;index;firstElement;attachTo(e){this.firstElement||(this.firstElement=document.createTextNode(this.ae));const{parent:t,firstElement:r,index:n}=this;this.id&&(this.n++||c.delete(this),t&&(r.remove(),l.push({parent:t,element:this}))),this.parent=e;let i=e.currentBefore;void 0===i&&(i=e.findNextSiblingElement(n)),e.element.insertBefore(r,i),e.currentBefore=r}move(){const{parent:e,index:t,firstElement:r}=this;let n=e.currentBefore;void 0===n&&(n=e.findNextSiblingElement(t)),e.element.insertBefore(r,n),e.currentBefore=r}detachFrom(e){this.parent===e?(this.firstElement.remove(),this.parent=void 0,this.id&&l.push({parent:e,element:this})):this.id&&! --this.n&&(y?c.add(this):this.release())}update(e){return this.ae!==e&&(this.ae=e,this.firstElement&&(this.firstElement.nodeValue=e)),!1}refresh(){}release(e){e&&this.parent===e&&(this.firstElement.remove(),this.parent=void 0),this.id&&--this.n<=0&&k.delete(this.id)}n;ae}class O{constructor(e,t,r){this.id=e,this.parent=void 0,this.index=0,this.n=0,this.newChildren=this.d=r?j(t):t||s,this.currentBefore=void 0}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 r=e[t].firstElement;if(r)return r}return null}attachTo(e){const{parent:t,d:r,newChildren:n}=this;if(this.n++||c.delete(this),t){l.push({parent:t,element:this});for(let e=r.length-1;e>=0;e--)r[e].detachFrom(this)}this.parent=e;const i=n||r;for(let e=i.length-1;e>=0;e--){const t=i[e];t.index=e,t.attachTo(this)}e.currentBefore=this.currentBefore,this.currentBefore=void 0,this.d=i,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:t}=this;for(const e of t)e.detachFrom(this);this.parent=void 0,l.push({parent:e,element:this})}else--this.n||(y?c.add(this):this.release())}update(e,t){if(t){const e=A(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(e&&this.parent===e){const{d:e}=this;for(const t of e)t.detachFrom(this);this.parent=void 0}--this.n<=0&&k.delete(this.id)}findNextSiblingElement(e){const t=this.newChildren||this.d;let r,n=e+1,i=t[n];for(;i;){if(r=i.firstElement,r)return r;i=t[++n]}return r=this.parent.currentBefore,void 0!==r?r:this.parent.findNextSiblingElement(this.index)}n;d}class z{constructor(e,t,r,n,i,o){if(this.id=e,this.parent=void 0,this.index=0,this.n=0,this.firstElement=this.element=C(t,this),this.newChildren=this.d=o?j(n):n||s,this.currentBefore=void 0,r){if(this.p=a,this.u=-1,"select"===t){const e=this.element,t=r,n=t.value;if(n){t.value=void 0;const r=this.refresh;this.refresh=i=>{if(B(this.d,i,this),this.d=i,this.newChildren=void 0,Array.isArray(n)){const t=n,[r,i,a]=t;e.value=a;const s=t[3]=e=>r[i]=e.target.value;e.addEventListener("change",s)}else e.value=n;t.value=n,this.refresh=r}}}this.update(r),this.u=i??0}else this.p=r,this.u=0}id;element;parent;newChildren;index;currentBefore;firstElement;attachTo(e){const{parent:t,element:r,newChildren:n,index:i}=this;this.n++||c.delete(this),t&&(r.remove(),l.push({parent:t,element:this})),this.parent=e,n&&this.refresh(n);let a=e.currentBefore;void 0===a&&(a=e.findNextSiblingElement(i)),e.element.insertBefore(r,a),e.currentBefore=r}move(){const{parent:e,newChildren:t,index:r,element:n}=this;t&&this.refresh(t);let i=e.currentBefore;void 0===i&&(i=e.findNextSiblingElement(r)),e.element.insertBefore(n,i),e.currentBefore=n}detachFrom(e){this.parent===e?(this.element.remove(),this.parent=void 0,l.push({parent:e,element:this})):--this.n||(y?c.add(this):this.release())}update(e,t){const{element:r,p:n,u:s}=this;if(n&&s){this.p=e;let t=s;for(const s in e){const o=e[s],l=n[s];if(o!==l)if(null!=o)switch(typeof o){case"string":{const e=i[s];e?r.setAttribute(e,o):r[s]=o;break}case"number":case"boolean":case"function":r[s]=o;break;default:if(Array.isArray(o)){const[e,t,n]=o;if(l){const[i,a,c,h]=l;if(c!==n&&r[s]!==n&&(r[s]=n),i===e&&a===t)o[3]=h;else{const n=o[3]=r=>e[t]=r.target[s];r.removeEventListener("change",h),r.addEventListener("change",n)}}else{r[s]=n;const i=o[3]=r=>e[t]=r.target[s];r.addEventListener("change",i)}break}if("style"===s){if(!l){const t=r.style,n={};let i=0;for(const e in o){const r=o[e];n[e]=r,i++,t[e]=r}e[s]=n,n.k=i;break}const t=r.style,n={};let i=0,a=l.k;for(const e in o){const r=o[e];n[e]=r,e in l&&a--,i++,r!==l[s]&&(t[e]=r)}if(e[s]=n,n.k=i,a)for(const e in l)if(!(e in o)&&(t[e]=null,! --a))break;break}r[s]=o}else switch(typeof l){case"string":{const e=i[s];e?this.element.removeAttribute(e):this.element[s]=o;break}case"object":l?Array.isArray(l)?r.removeEventListener("change",l[3]):l===a&&(r[s]=o):r[s]=o;break;default:r[s]=o}if(! --t)break}}if(t){const e=A(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(e&&this.parent===e&&(this.element.remove(),this.parent=void 0),--this.n<=0){const{d:e}=this;for(const t of e)t.release(this);k.delete(this.id)}}findNextSiblingElement(e){const t=this.newChildren||this.d;let r,n=e+1,i=t[n];for(;i;){if(r=i.firstElement,r)return r;i=t[++n]}return null}a7(){this.update=this.aQ}aQ(e,t){const{element:r,p:n,u:a}=this;if(n&&a){this.p=e;let t=a;for(const a in e){const s=e[a],o=n[a];if(s!==o)if(null!=s)switch(typeof s){case"string":r.setAttribute(i[a]??a,s);break;case"number":case"boolean":r.setAttribute(i[a]??a,""+s);break;case"function":r[a]=s;break;default:if("style"===a){if(!o){const t=r.style,n={};let i=0;for(const e in s){const r=s[e];n[e]=r,i++,t[e]=r}e[a]=n,n.k=i;break}const t=r.style,n={};let i=0,l=o.k;for(const e in s){const r=s[e];n[e]=r,e in o&&l--,i++,r!==o[a]&&(t[e]=r)}if(e[a]=n,n.k=i,l)for(const e in o)if(!(e in s)&&(t[e]=null,! --l))break;break}r[a]=s}else switch(typeof o){case"string":case"number":case"boolean":r.removeAttribute(i[a]??a);break;default:r[a]=s}if(! --t)break}}if(t){const e=A(this.d,t,this);if(e)return this.newChildren=e,!0}return!1}n;p;d;u}class I{constructor(e,t,r,n,i,a,o){this.id=e,this.parentCom=t,this.parent=void 0,this.index=0,this.version=0,this.n=0,this.aD=r,this.p=n,this.newChildren=this.d=o?j(i):i||s,this.u=a??0}id;parentCom;parent;newChildren;index;version;get firstElement(){return this.j?.firstElement||null}attachTo(e){const{parent:t,newChildren:r,j:n}=this;this.parent=e,r?this.refresh(r):n&&(n.index=this.index,n.attachTo(e)),this.n++||c.delete(this),t&&l.push({parent:t,element:this})}move(){const{newChildren:e,j:t}=this;e?this.refresh(e):t&&(t.index=this.index,t.move())}detachFrom(e){this.parent===e?(this.j?.detachFrom(e),this.parent=void 0,l.push({parent:e,element:this})):--this.n||(y?c.add(this):this.release())}update(e,t){const{p:r,d:n,u:i}=this;if(this.p=e,t){const e=A(n,t,this.parent);if(e)return this.newChildren=e,!0}if(!this.newChildren&&i){let t=i;for(const i in r){if(r[i]!==e[i])return this.newChildren=n,!0;if(! --t)break}}return!1}refresh(e){const{id:t,parent:r,j:n,index:i}=this,s=x;x=this;let o=this.aD(this.p||a,e);if(o!==n)switch(typeof o){case"boolean":case"number":case"bigint":o=""+o;case"string":o=new F("",o),this.j=o,o.index=i,o.attachTo(r),n?.detachFrom(r);break;default:o?(this.j=o,o.index=i,o.attachTo(r),n?.detachFrom(r),h.ag()||h.ah(((e,r)=>e.startsWith(t)?r.parent&&R(r.parent)?(w.C(e,r),2):0:1),t)):(this.j=void 0,n?.detachFrom(r))}else n&&(n.parent!==r?(n.index=i,n.attachTo(r)):n.index!==i&&(n.index=i,n.move()));this.d=e,this.newChildren=void 0,x=s}release(e){e&&this.parent===e&&(this.j?.detachFrom(e),this.parent=void 0),--this.n<=0&&(this.newChildren&&h.delete(this.id),k.delete(this.id))}markChanged(){return!this.newChildren&&(this.newChildren=this.d,!0)}watchMountChange(e,t,r){const n=S(this.parent,this.id);u.C(n+e,{_:t,D:r},!0)}n;aD;p;d;u;j}class T{constructor(e,t){this.id=e,this.element=t,this.currentBefore=void 0}id;element;parent;currentBefore;findNextSiblingElement(e){return null}render(e){this.af||(this.af=new I(this.id,p,e,null,s),k.set(this.id,this.af),this.af.attachTo(this))}af}const M=(e,t)=>{if(x.id){let r=e[t];r||(r=new Map,e[t]=r),r.set(x.id,x.version)}};let N=(e,t)=>{const r=e[t];if(r){for(const[e,t]of r){const r=k.get(e);r?.version===t&&r.markChanged()&&(w.ag()&&queueMicrotask($),w.C(e,r))}r.clear()}};const L=(e,t=2e4)=>{if(e>=0&&t>=1e3){if(g=t,y&&clearTimeout(m),e)m=setTimeout(P,g);else if(m){m=void 0;for(let e=0;e<y;e++)P()}return y=e,!0}return!1},U=()=>{v=f.pop()};var q;!function(e){e.render=(e,t)=>{const r=(d.length||"")+"|",n=new T(r,e);d.push(n),n.render(t)},e.$=(e,t,r,n,i,a)=>{const s=`${x.id}${e}${v}`;let o=k.get(s);return o?((r||n)&&o.update(r,n)&&w.C(s,o),o):(o=new z(s,t,r,n,i,a),k.set(s,o),o)},e.$c=(e,t,r,n,i,a)=>{const s=`${x.id}${e}${v}`;let o=k.get(s);return o?((r||n)&&o.update(r,n)&&w.C(s,o),o):(o=new I(s,x,t,r,n,i,a),k.set(s,o),o)},e.$f=(e,t,r)=>{const n=`${x.id}${e}${v}`;let i=k.get(n);return i?(t&&i.update(null,t)&&w.C(n,i),i):(i=new O(n,t,r),k.set(n,i),i)},e.$k=e=>(f.push(v),v=`${v||"{"}${e}}`,U),e.$n=e=>{const t=C;return C=E[e],()=>{C=t}},e.$s=(e,t)=>(e(),t),e.$t=(e,t,r)=>{const n=`${x.id}${e}${v}`;let i=k.get(n);return i?(r&&i.update(t),i):(i=new F(n,t),k.set(i.id,i),i)}}(q||(q={}));const D=Symbol(),_=Array.prototype,G=M;let Z=(e,t)=>{Z=N,Z(e,t)},Q=!1;const V=new WeakMap,W=e=>function(...t){const r=this.length;let n,i,a;switch(e){case _.push:n=r,i=n+t.length,a=r;break;case _.unshift:n=0,i=t.length,a=r;break;case _.fill:n=t[1],void 0===n||n<=-r?n=0:n<0&&(n=r+n),i=t[2],void 0===i||i>r?i=r:i<=-r?i=0:i<0&&(i=r+i),a=i;break;case _.sort:case _.reverse:n=i=0,a=r;break;case _.pop:n=i=r-1,a=r;break;case _.shift:n=i=0,a=r;break;default:n=t[0],n<0&&(n=r+n),i=t.length>2?t.length-2:0,a=t[1],void 0===a&&(a=r-n),a=a>0?a!==i?r:n+i:i?r:n,i+=n}const s=e.bind(this)(...t),o=this[D];let l;for(let e=n;e<i;e++){switch(l=this[e],typeof l){case"object":if(l){for(;e<i;)l=this[e],l&&!l[D]&&(this[e]=X(l)),e++;break}case"undefined":continue}break}return r!==this.length&&Z(o,"length"),Z(o,Symbol.iterator),s},H={push:W(_.push),unshift:W(_.unshift),fill:W(_.fill),sort:W(_.sort),reverse:W(_.reverse),pop:W(_.pop),shift:W(_.shift),splice:W(_.splice)},J={get(e,t){if(t!==D){let r=e[t];if(r&&r===_[t]){const n=H[t];if(n)return n.bind(e);r=r.bind(e)}return G(e[D],"length"!==t?Symbol.iterator:t),r}return e},set(e,t,r){if(t!==D){if(e[t]===r)return!0;const n=e[D];return r&&"object"==typeof r&&(r=X(r)),e[t]=r,"length"===t&&Z(n,t),Z(n,Symbol.iterator),!0}return((e,t)=>{const r=t.length,n=e.length;let i;for(let n=0;n<r;n++){let a=t[n];if(a&&"object"==typeof a){do{a=t[n],i=e[n],a?i?i!==a&&(i[D]=a):e[n]=X(a):e[n]=a}while(++n<r);break}if(null!=a){do{e[n]=t[n]}while(++n<r);break}e[n]=a}const a=e[D];n!==r&&(n>r&&(e.length=r),Z(a,"length")),Z(a,Symbol.iterator)})(e,r),!0},has:(e,t)=>(G(e[D],isNaN(parseInt(t))?t:Symbol.iterator),t in e),deleteProperty:(e,t)=>(isNaN(parseInt(t))||(t=Symbol.iterator),void 0!==e[t]&&Z(e[D],t),delete e[t])},K={get(e,t){if(t!==D){const r=e[t];return"id"!==t&&G(e[D],t),r}return e},set(e,t,r,n){if(t!==D){if(e[t]===r)return!0;const n=e[D];return r&&"object"==typeof r&&(r=X(r)),e[t]=r,Z(n,t),!0}return((e,t,r)=>{const n={...e};let i;for(const a in r){delete n[a];const s=r[a];s&&"object"==typeof s&&(i=e[a],i)?i[D]=s:e[a]!==s&&(t[a]=s)}for(const e in n)delete t[e]})(e,n,r),!0},has:(e,t)=>(G(e[D],t),t in e),deleteProperty:(e,t)=>(void 0!==e[t]&&Z(e[D],t),delete e[t])},X=e=>{let t;if(Array.isArray(e)){t=[];const r=e.length;for(let n=0;n<r;n++){let i=e[n];if(i&&"object"==typeof i){do{t[n]=(i=e[n])&&X(i)}while(++n<r);break}if(null!=i){do{t[n]=e[n]}while(++n<r);break}t[n]=i}e=new Proxy(t,J)}else{t={};for(const r in e){const n=e[r];t[r]=n&&"object"==typeof n?X(n):n}e=new Proxy(t,K)}return t[D]={},e},Y=(e,t)=>{t?e.w=!0:e.com.watchMountChange("s",Y,e)},ee=(e,t)=>[e,t,e[t]],te=(e,t)=>{const r=x;if(r.id){let n=V.get(r);if(n){const t=n.e;return n.w?(Q=!0,"function"==typeof e&&(e=e()),t[D]=e,Q=!1,n.w=!1,r.watchMountChange("s",Y,n)):"function"==typeof e&&(Q=!0,(e=e(t))!==t&&(t[D]=e),Q=!1),t}"function"==typeof e&&(e=e());const i=X(e);return n={com:r,e:i,w:!1},V.set(r,n),t&&r.watchMountChange("s",Y,n),i}return"function"==typeof e&&(e=e()),X(e)};var re=function(){return re=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var i in t=arguments[r])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},re.apply(this,arguments)},ne=function(e){return void 0===e&&(e={}),{arrayFormat:e.arrayFormat||"none",booleanFormat:e.booleanFormat||"none",nullFormat:e.nullFormat||"default"}},ie=function(e){return encodeURIComponent(e)},ae=function(e){return decodeURIComponent(e)},se=function(e,t){var r=ne(t);return function(e){var t=e.indexOf("?");return-1===t?e:e.slice(t+1)}(e).split("&").reduce((function(e,t){var n=t.split("="),i=n[0],a=n[1],s=function(e){var t=e.indexOf("["),r=-1!==t;return{hasBrackets:r,name:r?e.slice(0,t):e}}(i),o=s.hasBrackets,l=s.name,c=e[l],h=function(e,t){if(void 0===e)return"empty-true"===t.booleanFormat||null;if("string"===t.booleanFormat){if("true"===e)return!0;if("false"===e)return!1}if("unicode"===t.booleanFormat){if("✓"===ae(e))return!0;if("✗"===ae(e))return!1}return"string"===t.nullFormat&&"null"===e?null:ae(e)}(a,r);return e[l]=void 0===c?o?[h]:h:(Array.isArray(c)?c:[c]).concat(h),e}),{})},oe=/[^!$'()*+,;|:]/g,le=function(e){return e.replace(oe,(function(e){return encodeURIComponent(e)}))},ce={default:le,uri:encodeURI,uriComponent:encodeURIComponent,none:function(e){return e},legacy:encodeURI},he={default:decodeURIComponent,uri:decodeURI,uriComponent:decodeURIComponent,none:function(e){return e},legacy:decodeURIComponent},ue=function(e,t,r){var n=ce[t]||le;return r?String(e).split("/").map(n).join("/"):n(String(e))},de=function(e){return"("+(e?e.replace(/(^<|>$)/g,""):"[a-zA-Z0-9-_.~%':|=+\\*@$]+")+")"},fe=[{name:"url-parameter",pattern:/^:([a-zA-Z0-9-_]*[a-zA-Z0-9]{1})(<(.+?)>)?/,regex:function(e){return new RegExp(de(e[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(e){return new RegExp(";"+e[1]+"="+de(e[2]))}},{name:"query-parameter",pattern:/^(?:\?|&)(?::)?([a-zA-Z0-9-_]*[a-zA-Z0-9]{1})/},{name:"delimiter",pattern:/^(\/|\?)/,regex:function(e){return new RegExp("\\"+e[0])}},{name:"sub-delimiter",pattern:/^(!|&|-|_|\.|;)/,regex:function(e){return new RegExp(e[0])}},{name:"fragment",pattern:/^([0-9a-zA-Z]+)/,regex:function(e){return new RegExp(e[0])}}],pe=function e(t,r){if(void 0===r&&(r=[]),!fe.some((function(n){var i=t.match(n.pattern);return!!i&&(r.push({type:n.name,match:i[0],val:i.slice(1,2),otherVal:i.slice(2),regex:n.regex instanceof Function?n.regex(i):n.regex}),i[0].length<t.length&&(r=e(t.substr(i[0].length),r)),!0)})))throw new Error("Could not parse path '"+t+"'");return r},me=function(e){return null!=e},ve={urlParamsEncoding:"default"},ge=function(){function e(e,t){if(!e)throw new Error("Missing path in Path constructor");this.path=e,this.options=re(re({},ve),t),this.tokens=pe(e),this.hasUrlParams=this.tokens.filter((function(e){return/^url-parameter/.test(e.type)})).length>0,this.hasSpatParam=this.tokens.filter((function(e){return/splat$/.test(e.type)})).length>0,this.hasMatrixParams=this.tokens.filter((function(e){return/matrix$/.test(e.type)})).length>0,this.hasQueryParams=this.tokens.filter((function(e){return/^query-parameter/.test(e.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(e){return void 0!==e.regex})).map((function(e){return e.regex.source})).join("")}return e.createPath=function(t,r){return new e(t,r)},e.prototype.isQueryParam=function(e){return-1!==this.queryParams.indexOf(e)},e.prototype.isSpatParam=function(e){return-1!==this.spatParams.indexOf(e)},e.prototype.test=function(e,t){var r=this,n=re(re({caseSensitive:!1,strictTrailingSlash:!1},this.options),t),i=function(e,t){return t||"\\/"===e?e:e.replace(/\\\/$/,"")+"(?:\\/)?"}(this.source,n.strictTrailingSlash),a=this.urlTest(e,i+(this.hasQueryParams?"(\\?.*$|$)":"$"),n.caseSensitive,n.urlParamsEncoding);if(!a||!this.hasQueryParams)return a;var s=se(e,n.queryParams);return 0===Object.keys(s).filter((function(e){return!r.isQueryParam(e)})).length?(Object.keys(s).forEach((function(e){return a[e]=s[e]})),a):null},e.prototype.partialTest=function(e,t){var r=this,n=re(re({caseSensitive:!1,delimited:!0},this.options),t),i=function(e,t){return t?/(\/)$/.test(e)?e:e+"(\\/|\\?|\\.|;|$)":e}(this.source,n.delimited),a=this.urlTest(e,i,n.caseSensitive,n.urlParamsEncoding);if(!a)return a;if(!this.hasQueryParams)return a;var s=se(e,n.queryParams);return Object.keys(s).filter((function(e){return r.isQueryParam(e)})).forEach((function(e){return function(e,t,r){void 0===r&&(r="");var n=e[t];return e[t]=void 0===n?r:Array.isArray(n)?n.concat(r):[n,r],e}(a,e,s[e])})),a},e.prototype.build=function(e,t){var r=this;void 0===e&&(e={});var n=re(re({ignoreConstraints:!1,ignoreSearch:!1,queryParams:{}},this.options),t),i=Object.keys(e).filter((function(e){return!r.isQueryParam(e)})).reduce((function(t,i){if(!me(e[i]))return t;var a=e[i],s=r.isSpatParam(i);return"boolean"==typeof a?t[i]=a:Array.isArray(a)?t[i]=a.map((function(e){return ue(e,n.urlParamsEncoding,s)})):t[i]=ue(a,n.urlParamsEncoding,s),t}),{});if(this.urlParams.some((function(t){return!me(e[t])}))){var a=this.urlParams.filter((function(t){return!me(e[t])}));throw new Error("Cannot build path: '"+this.path+"' requires missing parameters { "+a.join(", ")+" }")}if(!n.ignoreConstraints){var s=this.tokens.filter((function(e){return/^url-parameter/.test(e.type)&&!/-splat$/.test(e.type)})).every((function(e){return new RegExp("^"+de(e.otherVal[0])+"$").test(i[e.val])}));if(!s)throw new Error("Some parameters of '"+this.path+"' are of invalid format")}var o=this.tokens.filter((function(e){return!1===/^query-parameter/.test(e.type)})).map((function(e){return"url-parameter-matrix"===e.type?";"+e.val+"="+i[e.val[0]]:/^url-parameter/.test(e.type)?i[e.val[0]]:e.match})).join("");if(n.ignoreSearch)return o;var l=function(e,t){var r=ne(t);return Object.keys(e).filter((function(t){return void 0!==e[t]})).map((function(t){return function(e,t,r){return null===t?function(e,t){return"hidden"===t.nullFormat?"":"string"===t.nullFormat?e+"=null":e}(e,r):"boolean"==typeof t?function(e,t,r){return"empty-true"===r.booleanFormat&&t?e:e+"="+("unicode"===r.booleanFormat?t?"✓":"✗":t.toString())}(e,t,r):Array.isArray(t)?function(e,t,r){var n=function(e){return"index"===e.arrayFormat?function(e,t){return e+"["+t+"]"}:"brackets"===e.arrayFormat?function(e){return e+"[]"}:function(e){return e}}(r);return t.map((function(t,r){return n(e,r)+"="+ie(t)})).join("&")}(e,t,r):e+"="+ie(t)}(t,e[t],r)})).filter(Boolean).join("&")}(this.queryParams.filter((function(t){return-1!==Object.keys(e).indexOf(t)})).reduce((function(t,r){return t[r]=e[r],t}),{}),n.queryParams);return l?o+"?"+l:o},e.prototype.getParams=function(e){var t=e instanceof RegExp?function(t){return e.test(t.type)}:function(t){return t.type===e};return this.tokens.filter(t).map((function(e){return e.val[0]}))},e.prototype.urlTest=function(e,t,r,n){var i=this,a=new RegExp("^"+t,r?"":"i"),s=e.match(a);return s?this.urlParams.length?s.slice(1,this.urlParams.length+1).reduce((function(e,t,r){return e[i.urlParams[r]]=(he[n]||decodeURIComponent)(t),e}),{}):{}:null},e}();let ye=0;const be=te({c:0});window.addEventListener("popstate",(()=>{be.c=++ye}));const we=(e,t)=>{const{pathname:r,search:n,hash:i}=window.location;e!==`${r}${n}${i}`&&(t?window.history.replaceState(void 0,"",e):window.history.pushState(void 0,"",e),queueMicrotask((()=>{be.c=++ye})))},ke="ezhEZH";class xe{constructor(e,t,r){this.com=e,this.b=ge.createPath(t+ke),this.needAuth=r}com;needAuth;parseParam(e){const t=this.b.test(e);if(t)return delete t[ke],t}buildUrl(e){throw new Error("WildcardRoute does not support buildUrl")}b}class Ce{constructor(e,t,r){this.com=e,this.b=ge.createPath(t),this.needAuth=r}com;needAuth;parseParam(e){return this.b.test(e)}buildUrl(e){return this.b.build(e)}b}const Ee=(e,t,r=!0)=>t.endsWith("*")?new xe(e,t,r):new Ce(e,t,r),Pe=({routes:e,notFound:t,checkAuth:r})=>{ye=be.c;const{pathname:n,search:i,hash:a}=window.location,s=`${n}${i}${a}`,{$s:o,$k:l,$c:c}=q;for(const t in e){const n=e[t],i=n.parseParam(s);if(i){if(r&&n.needAuth){const e=r(s);if(e)return void we(e)}return o(l(t),c("_",n.com,i,void 0,i))}}return t?o(l("404"),c("_",t,{})):void 0},Se=(e,t,r)=>{e.preventDefault();const{pathname:n,search:i,hash:a}=window.location;t!==`${n}${i}${a}`&&(r?window.history.replaceState(void 0,"",t):window.history.pushState(void 0,"",t),be.c=++ye)},$e=(e,t)=>{const{href:r,className:n,style:i,title:a,replace:s}=e,o=r?e=>Se(e,r,s):void 0;return q.$("_","a",{className:n,style:i,title:a,href:r,onclick:o},t,-1,1)},je=(e,t)=>{const{route:r,params:n,className:i,style:a,title:s,replace:o}=e,l=r.buildUrl(n);return q.$("_","a",{className:i,style:a,title:s,href:l,onclick:e=>Se(e,l,o)},t,-1,1)};var Ae=t.ye,Re=t.N_,Be=t.Wt,Fe=t.Ix,Oe=t.On,ze=t.er,Ie=t.te,Te=t.oo,Me=t.LU,Ne=t.wE,Le=t.J0;export{Ae as $ezh,Re as Link,Be as RouteLink,Fe as Router,Oe as addComReader,ze as bindData,Ie as configGC,Te as navigate,Me as refreshComReaders,Ne as route,Le as useState};
package/lib/debugCheck.js CHANGED
@@ -1,4 +1,4 @@
1
- import { q, N, o, refreshComReaders, aD } from './elements';
1
+ import { q, M, o, refreshComReaders, aE } from './elements';
2
2
  import { t, y } from './state';
3
3
  const d = (text, k) => {
4
4
  const f = new Error(text);
@@ -19,8 +19,8 @@ const j = (target, l) => {
19
19
  const h = get.bind(this)(key);
20
20
  if (h) {
21
21
  if (q.id && !t) {
22
- if (h.e < N) {
23
- h.e = N;
22
+ if (h.e < M) {
23
+ h.e = M;
24
24
  }
25
25
  else {
26
26
  l();
@@ -31,7 +31,7 @@ const j = (target, l) => {
31
31
  };
32
32
  target.set = function (key, a) {
33
33
  const p = {
34
- e: N,
34
+ e: M,
35
35
  data: a,
36
36
  };
37
37
  return set.bind(this)(key, p);
@@ -50,7 +50,7 @@ const n = (readerRecord, key) => {
50
50
  g = false;
51
51
  };
52
52
  const r = () => {
53
- aD(n);
53
+ aE(n);
54
54
  j(o, () => {
55
55
  throw d('This element already exists, "key" prop is required when it is in a loop', 5);
56
56
  });
package/lib/elements.js CHANGED
@@ -1,4 +1,4 @@
1
- import { a3, L, U, W } from './RbTree';
1
+ import { a3, U, S, W } from './RbTree';
2
2
  const V = {
3
3
  'ariaAtomic': 'aria-atomic',
4
4
  'ariaAutoComplete': 'aria-autocomplete',
@@ -99,10 +99,10 @@ Object.freeze(Y);
99
99
  const E = () => false;
100
100
  const y = [];
101
101
  const w = new Set();
102
- const a7 = new W();
102
+ const a5 = new W();
103
103
  const ai = new W();
104
- const au = [];
105
104
  const av = [];
105
+ const aw = [];
106
106
  const aj = {
107
107
  id: '',
108
108
  index: 0,
@@ -121,42 +121,42 @@ const aj = {
121
121
  let F = '';
122
122
  let ak = 20000;
123
123
  let A = 0;
124
- let aw = 0;
125
- let M = undefined;
126
- const G = new W();
124
+ let ax = 0;
125
+ let L = undefined;
126
+ const I = new W();
127
127
  export const o = new Map();
128
128
  export let q = aj;
129
- export let N = 0;
130
- const aF = (z, aV) => {
129
+ export let M = 0;
130
+ const aG = (z, aW) => {
131
131
  return document.createElement(z);
132
132
  };
133
- let aa = aF;
134
- const ax = {
135
- 'svg': (z, O) => {
136
- O.a9();
133
+ let a8 = aG;
134
+ const ay = {
135
+ 'svg': (z, N) => {
136
+ N.a7();
137
137
  return document.createElementNS('http://www.w3.org/2000/svg', z);
138
138
  },
139
- 'math': (z, O) => {
140
- O.a9();
139
+ 'math': (z, N) => {
140
+ N.a7();
141
141
  return document.createElementNS('http://www.w3.org/1998/Math/MathML', z);
142
142
  },
143
- 'foreignObject': (z, O) => {
143
+ 'foreignObject': (z, N) => {
144
144
  if (z !== 'foreignObject') {
145
145
  return document.createElement(z);
146
146
  }
147
- O.a9();
147
+ N.a7();
148
148
  return document.createElementNS('http://www.w3.org/2000/svg', z);
149
149
  },
150
150
  };
151
151
  const al = () => {
152
- if (++aw >= A) {
152
+ if (++ax >= A) {
153
153
  for (const element of w) {
154
154
  w.delete(element);
155
155
  if (element.id) {
156
156
  element.release();
157
157
  }
158
158
  else {
159
- if (--aw < A) {
159
+ if (--ax < A) {
160
160
  w.add(element);
161
161
  break;
162
162
  }
@@ -166,54 +166,52 @@ const al = () => {
166
166
  else {
167
167
  w.add(Object.create(aj));
168
168
  }
169
- if (M) {
170
- M = setTimeout(al, ak);
169
+ if (L) {
170
+ L = setTimeout(al, ak);
171
171
  }
172
172
  };
173
- const ay = (parent, m) => {
174
- const az = ['', m];
175
- while (parent.constructor !== a8) {
176
- az.push(parent.id);
173
+ const az = (parent, m) => {
174
+ const a$ = ['', m];
175
+ while (parent.constructor !== a6) {
176
+ a$.push(parent.id);
177
177
  parent = parent.parent;
178
178
  }
179
- return az.reverse().join(',');
179
+ return a$.reverse().join(',');
180
180
  };
181
- const aG = () => {
182
- do {
183
- G.a5((id, element) => {
184
- const { newChildren, parent } = element;
185
- if (newChildren) {
186
- if (parent && am(parent)) {
187
- element.refresh(newChildren);
188
- parent.currentBefore = undefined;
189
- }
190
- else if (element.constructor === an) {
191
- a7.C(id, element);
192
- }
181
+ const aH = () => {
182
+ let element;
183
+ while (element = I.au(true)) {
184
+ const { id, newChildren, parent } = element;
185
+ if (newChildren) {
186
+ if (parent && am(parent)) {
187
+ element.refresh(newChildren);
188
+ parent.currentBefore = undefined;
193
189
  }
194
- return L;
195
- });
196
- } while (!G.a4());
197
- N++;
190
+ else if (element.constructor === an) {
191
+ a5.C(id, element);
192
+ }
193
+ }
194
+ }
195
+ M++;
198
196
  for (const { parent, element } of y) {
199
197
  element.detachFrom(X);
200
198
  if (element.parent !== parent) {
201
- if (!ai.a4() && am(parent)) {
202
- const a6 = !element.parent;
203
- const ab = ay(parent, element.id);
204
- ai.a5((key, value) => {
205
- if (key.startsWith(ab)) {
206
- value._(value.D, a6);
207
- return L;
199
+ if (!ai.ag() && am(parent)) {
200
+ const a4 = !element.parent;
201
+ const a9 = az(parent, element.id);
202
+ ai.ah((key, value) => {
203
+ if (key.startsWith(a9)) {
204
+ value._(value.D, a4);
205
+ return U;
208
206
  }
209
- return U;
210
- }, ab);
207
+ return S;
208
+ }, a9);
211
209
  }
212
210
  }
213
211
  }
214
212
  y.length = 0;
215
213
  };
216
- const Q = (children, f = [], from = 0) => {
214
+ const O = (children, f = [], from = 0) => {
217
215
  let a = children[from];
218
216
  for (;;) {
219
217
  if (a && a.id !== undefined) {
@@ -222,7 +220,7 @@ const Q = (children, f = [], from = 0) => {
222
220
  else if (a !== null && a !== undefined) {
223
221
  switch (typeof a) {
224
222
  case 'object':
225
- Q(a, f);
223
+ O(a, f);
226
224
  break;
227
225
  case 'function':
228
226
  a = a();
@@ -244,27 +242,27 @@ const Q = (children, f = [], from = 0) => {
244
242
  }
245
243
  return f;
246
244
  };
247
- const ac = (B, children, parent) => {
245
+ const aa = (B, children, parent) => {
248
246
  let f;
249
247
  const length = B.length;
250
248
  let newChildren = children;
251
249
  let b = 0;
252
250
  while (b < length) {
253
- const a$ = B[b];
254
- if (a$ !== newChildren[b]) {
251
+ const a_ = B[b];
252
+ if (a_ !== newChildren[b]) {
255
253
  if (b === newChildren.length) {
256
254
  return newChildren;
257
255
  }
258
256
  const a = newChildren[b];
259
257
  if (!a || a.id === undefined) {
260
- newChildren = Q(newChildren, newChildren.slice(0, b), b);
258
+ newChildren = O(newChildren, newChildren.slice(0, b), b);
261
259
  continue;
262
260
  }
263
261
  else if (f !== newChildren) {
264
262
  break;
265
263
  }
266
264
  }
267
- if (!f && a$.parent !== parent) {
265
+ if (!f && a_.parent !== parent) {
268
266
  f = B;
269
267
  }
270
268
  b++;
@@ -272,19 +270,19 @@ const ac = (B, children, parent) => {
272
270
  if (b === newChildren.length) {
273
271
  return f;
274
272
  }
275
- return newChildren === children ? Q(newChildren, B.slice(0, b), b) : newChildren;
273
+ return newChildren === children ? O(newChildren, B.slice(0, b), b) : newChildren;
276
274
  };
277
275
  const am = (element) => {
278
276
  let parent = element;
279
277
  do {
280
- if (parent.constructor === a8) {
278
+ if (parent.constructor === a6) {
281
279
  return true;
282
280
  }
283
281
  parent = parent.parent;
284
282
  } while (parent);
285
283
  return false;
286
284
  };
287
- const ad = (B, newChildren, parent, aH) => {
285
+ const ab = (B, newChildren, parent, aI) => {
288
286
  let b, i;
289
287
  let a;
290
288
  if (newChildren !== B && B.length) {
@@ -295,18 +293,18 @@ const ad = (B, newChildren, parent, aH) => {
295
293
  while (--i >= 0) {
296
294
  a = newChildren[i];
297
295
  if (a.parent === parent) {
298
- const a_ = i - a.index;
299
- if (a_ === b) {
300
- t.H++;
296
+ const aA = i - a.index;
297
+ if (aA === b) {
298
+ t.G++;
301
299
  a.index = i;
302
300
  }
303
301
  else {
304
302
  t = {
305
303
  from: a.index,
306
304
  to: i,
307
- H: 1,
305
+ G: 1,
308
306
  };
309
- b = a_;
307
+ b = aA;
310
308
  a.index = -ap.push(t);
311
309
  }
312
310
  }
@@ -321,16 +319,16 @@ const ad = (B, newChildren, parent, aH) => {
321
319
  if (a.index < 0) {
322
320
  t = ap[-a.index - 1];
323
321
  aq.push(t);
324
- i -= t.H;
322
+ i -= t.G;
325
323
  }
326
324
  else {
327
325
  a.detachFrom(parent);
328
326
  i--;
329
327
  }
330
328
  }
331
- let R;
332
- let ae;
333
- let af = 0;
329
+ let Q;
330
+ let ac;
331
+ let ad = 0;
334
332
  i = newChildren.length - 1;
335
333
  while (i >= 0) {
336
334
  a = newChildren[i];
@@ -340,31 +338,31 @@ const ad = (B, newChildren, parent, aH) => {
340
338
  }
341
339
  else {
342
340
  t = ap[-a.index - 1];
343
- ae = t.H;
344
- R = aq[af];
341
+ ac = t.G;
342
+ Q = aq[ad];
345
343
  a.index = i;
346
- if (!aH) {
347
- if (R === t) {
348
- af++;
349
- i -= t.H;
344
+ if (!aI) {
345
+ if (Q === t) {
346
+ ad++;
347
+ i -= t.G;
350
348
  parent.currentBefore = undefined;
351
349
  continue;
352
350
  }
353
- if (R.from > t.from) {
354
- b = af;
351
+ if (Q.from > t.from) {
352
+ b = ad;
355
353
  do {
356
- ae -= R.H;
357
- R = aq[++b];
358
- } while (R.from > t.from && ae > 0);
359
- if (ae > 0) {
360
- i -= t.H;
354
+ ac -= Q.G;
355
+ Q = aq[++b];
356
+ } while (Q.from > t.from && ac > 0);
357
+ if (ac > 0) {
358
+ i -= t.G;
361
359
  parent.currentBefore = undefined;
362
- af = b;
360
+ ad = b;
363
361
  continue;
364
362
  }
365
363
  }
366
364
  }
367
- b = i - t.H;
365
+ b = i - t.G;
368
366
  do {
369
367
  a.move();
370
368
  } while (--i > b && (a = newChildren[i]));
@@ -388,7 +386,7 @@ class ao {
388
386
  this.parent = undefined;
389
387
  this.index = 0;
390
388
  this.n = 0;
391
- this.ag = text;
389
+ this.ae = text;
392
390
  }
393
391
  id;
394
392
  parent;
@@ -396,7 +394,7 @@ class ao {
396
394
  firstElement;
397
395
  attachTo(target) {
398
396
  if (!this.firstElement) {
399
- this.firstElement = document.createTextNode(this.ag);
397
+ this.firstElement = document.createTextNode(this.ae);
400
398
  }
401
399
  const { parent, firstElement, index } = this;
402
400
  if (this.id) {
@@ -445,8 +443,8 @@ class ao {
445
443
  }
446
444
  }
447
445
  update(text) {
448
- if (this.ag !== text) {
449
- this.ag = text;
446
+ if (this.ae !== text) {
447
+ this.ae = text;
450
448
  if (this.firstElement) {
451
449
  this.firstElement.nodeValue = text;
452
450
  }
@@ -464,15 +462,15 @@ class ao {
464
462
  }
465
463
  }
466
464
  n;
467
- ag;
465
+ ae;
468
466
  }
469
- export class aI {
470
- constructor(id, children, aJ) {
467
+ export class aJ {
468
+ constructor(id, children, aK) {
471
469
  this.id = id;
472
470
  this.parent = undefined;
473
471
  this.index = 0;
474
472
  this.n = 0;
475
- this.newChildren = this.d = aJ ? Q(children) : (children || Y);
473
+ this.newChildren = this.d = aK ? O(children) : (children || Y);
476
474
  this.currentBefore = undefined;
477
475
  }
478
476
  id;
@@ -519,7 +517,7 @@ export class aI {
519
517
  move() {
520
518
  const { d, newChildren } = this;
521
519
  if (newChildren) {
522
- ad(d, newChildren, this, true);
520
+ ab(d, newChildren, this, true);
523
521
  this.d = newChildren;
524
522
  this.newChildren = undefined;
525
523
  }
@@ -552,7 +550,7 @@ export class aI {
552
550
  }
553
551
  update(p, children) {
554
552
  if (children) {
555
- const newChildren = ac(this.d, children, this);
553
+ const newChildren = aa(this.d, children, this);
556
554
  if (newChildren) {
557
555
  this.newChildren = newChildren;
558
556
  return true;
@@ -561,7 +559,7 @@ export class aI {
561
559
  return false;
562
560
  }
563
561
  refresh(newChildren) {
564
- ad(this.d, newChildren, this);
562
+ ab(this.d, newChildren, this);
565
563
  this.d = newChildren;
566
564
  this.newChildren = undefined;
567
565
  }
@@ -595,14 +593,14 @@ export class aI {
595
593
  n;
596
594
  d;
597
595
  }
598
- export class aK {
596
+ export class aL {
599
597
  constructor(id, tag, props, children, check, mutableChild) {
600
598
  this.id = id;
601
599
  this.parent = undefined;
602
600
  this.index = 0;
603
601
  this.n = 0;
604
- this.firstElement = this.element = aa(tag, this);
605
- this.newChildren = this.d = mutableChild ? Q(children) : (children || Y);
602
+ this.firstElement = this.element = a8(tag, this);
603
+ this.newChildren = this.d = mutableChild ? O(children) : (children || Y);
606
604
  this.currentBefore = undefined;
607
605
  if (props) {
608
606
  this.p = X;
@@ -613,23 +611,23 @@ export class aK {
613
611
  const c = at.value;
614
612
  if (c) {
615
613
  at.value = undefined;
616
- const aL = this.refresh;
614
+ const aM = this.refresh;
617
615
  this.refresh = (newChildren) => {
618
- ad(this.d, newChildren, this);
616
+ ab(this.d, newChildren, this);
619
617
  this.d = newChildren;
620
618
  this.newChildren = undefined;
621
619
  if (Array.isArray(c)) {
622
- const aA = c;
623
- const [e, Z, S] = aA;
624
- ar.value = S;
625
- const _ = aA[3] = (x) => e[Z] = x.target.value;
620
+ const aB = c;
621
+ const [e, Z, R] = aB;
622
+ ar.value = R;
623
+ const _ = aB[3] = (x) => e[Z] = x.target.value;
626
624
  ar.addEventListener('change', _);
627
625
  }
628
626
  else {
629
627
  ar.value = c;
630
628
  }
631
629
  at.value = c;
632
- this.refresh = aL;
630
+ this.refresh = aM;
633
631
  };
634
632
  }
635
633
  }
@@ -726,23 +724,23 @@ export class aK {
726
724
  }
727
725
  default: {
728
726
  if (Array.isArray(c)) {
729
- const [e, Z, S] = c;
727
+ const [e, Z, R] = c;
730
728
  if (g) {
731
- const [aM, aN, aO, aB] = g;
732
- if (aO !== S && element[key] !== S) {
733
- element[key] = S;
729
+ const [aN, aO, aP, aC] = g;
730
+ if (aP !== R && element[key] !== R) {
731
+ element[key] = R;
734
732
  }
735
- if (aM === e && aN === Z) {
736
- c[3] = aB;
733
+ if (aN === e && aO === Z) {
734
+ c[3] = aC;
737
735
  }
738
736
  else {
739
737
  const _ = c[3] = (x) => e[Z] = x.target[key];
740
- element.removeEventListener('change', aB);
738
+ element.removeEventListener('change', aC);
741
739
  element.addEventListener('change', _);
742
740
  }
743
741
  }
744
742
  else {
745
- element[key] = S;
743
+ element[key] = R;
746
744
  const _ = c[3] = (x) => e[Z] = x.target[key];
747
745
  element.addEventListener('change', _);
748
746
  }
@@ -834,7 +832,7 @@ export class aK {
834
832
  }
835
833
  }
836
834
  if (children) {
837
- const newChildren = ac(this.d, children, this);
835
+ const newChildren = aa(this.d, children, this);
838
836
  if (newChildren) {
839
837
  this.newChildren = newChildren;
840
838
  return true;
@@ -843,7 +841,7 @@ export class aK {
843
841
  return false;
844
842
  }
845
843
  refresh(newChildren) {
846
- ad(this.d, newChildren, this);
844
+ ab(this.d, newChildren, this);
847
845
  this.d = newChildren;
848
846
  this.newChildren = undefined;
849
847
  }
@@ -874,10 +872,10 @@ export class aK {
874
872
  }
875
873
  return null;
876
874
  }
877
- a9() {
878
- this.update = this.aP;
875
+ a7() {
876
+ this.update = this.aQ;
879
877
  }
880
- aP(props, children) {
878
+ aQ(props, children) {
881
879
  const { element, p, u } = this;
882
880
  if (p && u) {
883
881
  this.p = props;
@@ -951,8 +949,8 @@ export class aK {
951
949
  }
952
950
  }
953
951
  else {
954
- const aQ = typeof g;
955
- switch (aQ) {
952
+ const aR = typeof g;
953
+ switch (aR) {
956
954
  case 'string':
957
955
  case 'number':
958
956
  case 'boolean': {
@@ -971,7 +969,7 @@ export class aK {
971
969
  }
972
970
  }
973
971
  if (children) {
974
- const newChildren = ac(this.d, children, this);
972
+ const newChildren = aa(this.d, children, this);
975
973
  if (newChildren) {
976
974
  this.newChildren = newChildren;
977
975
  return true;
@@ -992,9 +990,9 @@ export class an {
992
990
  this.index = 0;
993
991
  this.version = 0;
994
992
  this.n = 0;
995
- this.aC = entry;
993
+ this.aD = entry;
996
994
  this.p = props;
997
- this.newChildren = this.d = mutableChild ? Q(children) : (children || Y);
995
+ this.newChildren = this.d = mutableChild ? O(children) : (children || Y);
998
996
  this.u = check ?? 0;
999
997
  }
1000
998
  id;
@@ -1054,7 +1052,7 @@ export class an {
1054
1052
  const { p, d, u } = this;
1055
1053
  this.p = props;
1056
1054
  if (children) {
1057
- const newChildren = ac(d, children, this.parent);
1055
+ const newChildren = aa(d, children, this.parent);
1058
1056
  if (newChildren) {
1059
1057
  this.newChildren = newChildren;
1060
1058
  return true;
@@ -1076,9 +1074,9 @@ export class an {
1076
1074
  }
1077
1075
  refresh(newChildren) {
1078
1076
  const { id, parent, j, index } = this;
1079
- const aR = q;
1077
+ const aS = q;
1080
1078
  q = this;
1081
- let v = this.aC(this.p || X, newChildren);
1079
+ let v = this.aD(this.p || X, newChildren);
1082
1080
  if (v !== j) {
1083
1081
  switch (typeof v) {
1084
1082
  case 'boolean':
@@ -1098,14 +1096,14 @@ export class an {
1098
1096
  v.index = index;
1099
1097
  v.attachTo(parent);
1100
1098
  j?.detachFrom(parent);
1101
- if (!a7.a4()) {
1102
- a7.a5((a2, com) => {
1099
+ if (!a5.ag()) {
1100
+ a5.ah((a2, com) => {
1103
1101
  if (!a2.startsWith(id)) {
1104
- return U;
1102
+ return S;
1105
1103
  }
1106
1104
  if (com.parent && am(com.parent)) {
1107
- G.C(a2, com);
1108
- return L;
1105
+ I.C(a2, com);
1106
+ return U;
1109
1107
  }
1110
1108
  return a3;
1111
1109
  }, id);
@@ -1129,7 +1127,7 @@ export class an {
1129
1127
  }
1130
1128
  this.d = newChildren;
1131
1129
  this.newChildren = undefined;
1132
- q = aR;
1130
+ q = aS;
1133
1131
  }
1134
1132
  release(target) {
1135
1133
  if (target && this.parent === target) {
@@ -1138,7 +1136,7 @@ export class an {
1138
1136
  }
1139
1137
  if (--this.n <= 0) {
1140
1138
  if (this.newChildren) {
1141
- a7.delete(this.id);
1139
+ a5.delete(this.id);
1142
1140
  }
1143
1141
  o.delete(this.id);
1144
1142
  }
@@ -1150,18 +1148,18 @@ export class an {
1150
1148
  }
1151
1149
  return false;
1152
1150
  }
1153
- watchMountChange(aS, _, D) {
1154
- const ab = ay(this.parent, this.id);
1155
- ai.C(ab + aS, { _, D }, true);
1151
+ watchMountChange(aT, _, D) {
1152
+ const a9 = az(this.parent, this.id);
1153
+ ai.C(a9 + aT, { _, D }, true);
1156
1154
  }
1157
1155
  n;
1158
- aC;
1156
+ aD;
1159
1157
  p;
1160
1158
  d;
1161
1159
  u;
1162
1160
  j;
1163
1161
  }
1164
- class a8 {
1162
+ class a6 {
1165
1163
  constructor(id, rootElement) {
1166
1164
  this.id = id;
1167
1165
  this.element = rootElement;
@@ -1171,56 +1169,56 @@ class a8 {
1171
1169
  element;
1172
1170
  parent;
1173
1171
  currentBefore;
1174
- findNextSiblingElement(aY) {
1172
+ findNextSiblingElement(aZ) {
1175
1173
  return null;
1176
1174
  }
1177
1175
  render(entry) {
1178
- if (!this.ah) {
1179
- this.ah = new an(this.id, aj, entry, null, Y);
1180
- o.set(this.id, this.ah);
1181
- this.ah.attachTo(this);
1182
- N++;
1176
+ if (!this.af) {
1177
+ this.af = new an(this.id, aj, entry, null, Y);
1178
+ o.set(this.id, this.af);
1179
+ this.af.attachTo(this);
1180
+ M++;
1183
1181
  }
1184
1182
  }
1185
- ah;
1183
+ af;
1186
1184
  }
1187
1185
  export const addComReader = (readerRecord, key) => {
1188
1186
  if (q.id) {
1189
- let I = readerRecord[key];
1190
- if (!I) {
1191
- I = new Map();
1192
- readerRecord[key] = I;
1187
+ let H = readerRecord[key];
1188
+ if (!H) {
1189
+ H = new Map();
1190
+ readerRecord[key] = H;
1193
1191
  }
1194
- I.set(q.id, q.version);
1192
+ H.set(q.id, q.version);
1195
1193
  }
1196
1194
  };
1197
1195
  export let refreshComReaders = (readerRecord, key) => {
1198
- const I = readerRecord[key];
1199
- if (I) {
1200
- for (const [a2, version] of I) {
1196
+ const H = readerRecord[key];
1197
+ if (H) {
1198
+ for (const [a2, version] of H) {
1201
1199
  const com = o.get(a2);
1202
1200
  if (com?.version === version && com.markChanged()) {
1203
- if (G.a4()) {
1204
- queueMicrotask(aG);
1201
+ if (I.ag()) {
1202
+ queueMicrotask(aH);
1205
1203
  }
1206
- G.C(a2, com);
1204
+ I.C(a2, com);
1207
1205
  }
1208
1206
  }
1209
- I.clear();
1207
+ H.clear();
1210
1208
  }
1211
1209
  };
1212
- export const aD = (replace) => refreshComReaders = replace;
1210
+ export const aE = (replace) => refreshComReaders = replace;
1213
1211
  export const configGC = (waitIntervals, interval = 20000) => {
1214
1212
  if (waitIntervals >= 0 && interval >= 1000) {
1215
1213
  ak = interval;
1216
1214
  if (A) {
1217
- clearTimeout(M);
1215
+ clearTimeout(L);
1218
1216
  }
1219
1217
  if (waitIntervals) {
1220
- M = setTimeout(al, ak);
1218
+ L = setTimeout(al, ak);
1221
1219
  }
1222
- else if (M) {
1223
- M = undefined;
1220
+ else if (L) {
1221
+ L = undefined;
1224
1222
  for (let b = 0; b < A; b++) {
1225
1223
  al();
1226
1224
  }
@@ -1230,27 +1228,27 @@ export const configGC = (waitIntervals, interval = 20000) => {
1230
1228
  }
1231
1229
  return false;
1232
1230
  };
1233
- const aT = () => {
1234
- F = av.pop();
1231
+ const aU = () => {
1232
+ F = aw.pop();
1235
1233
  };
1236
1234
  export var $ezh;
1237
1235
  (function ($ezh) {
1238
1236
  $ezh.render = (rootElement, entry) => {
1239
- const id = (au.length || '') + '|';
1240
- const aE = new a8(id, rootElement);
1241
- au.push(aE);
1242
- aE.render(entry);
1237
+ const id = (av.length || '') + '|';
1238
+ const aF = new a6(id, rootElement);
1239
+ av.push(aF);
1240
+ aF.render(entry);
1243
1241
  };
1244
1242
  $ezh.$ = (id, tag, props, children, check, mutableChild) => {
1245
1243
  const m = `${q.id}${id}${F}`;
1246
1244
  let element = o.get(m);
1247
1245
  if (element) {
1248
1246
  if ((props || children) && element.update(props, children)) {
1249
- G.C(m, element);
1247
+ I.C(m, element);
1250
1248
  }
1251
1249
  return element;
1252
1250
  }
1253
- element = new aK(m, tag, props, children, check, mutableChild);
1251
+ element = new aL(m, tag, props, children, check, mutableChild);
1254
1252
  o.set(m, element);
1255
1253
  return element;
1256
1254
  };
@@ -1259,7 +1257,7 @@ export var $ezh;
1259
1257
  let element = o.get(m);
1260
1258
  if (element) {
1261
1259
  if ((props || children) && element.update(props, children)) {
1262
- G.C(m, element);
1260
+ I.C(m, element);
1263
1261
  }
1264
1262
  return element;
1265
1263
  }
@@ -1272,24 +1270,24 @@ export var $ezh;
1272
1270
  let element = o.get(m);
1273
1271
  if (element) {
1274
1272
  if (children && element.update(null, children)) {
1275
- G.C(m, element);
1273
+ I.C(m, element);
1276
1274
  }
1277
1275
  return element;
1278
1276
  }
1279
- element = new aI(m, children, mutableChild);
1277
+ element = new aJ(m, children, mutableChild);
1280
1278
  o.set(m, element);
1281
1279
  return element;
1282
1280
  };
1283
1281
  $ezh.$k = (key) => {
1284
- av.push(F);
1282
+ aw.push(F);
1285
1283
  F = `${F || '{'}${key}}`;
1286
- return aT;
1284
+ return aU;
1287
1285
  };
1288
1286
  $ezh.$n = (ns) => {
1289
- const aU = aa;
1290
- aa = ax[ns];
1287
+ const aV = a8;
1288
+ a8 = ay[ns];
1291
1289
  return () => {
1292
- aa = aU;
1290
+ a8 = aV;
1293
1291
  };
1294
1292
  };
1295
1293
  $ezh.$s = (cb, element) => {
package/lib/state.js CHANGED
@@ -295,8 +295,8 @@ const r = (e) => {
295
295
  target[f] = {};
296
296
  return e;
297
297
  };
298
- const $ = (D, a6) => {
299
- if (a6) {
298
+ const $ = (D, a4) => {
299
+ if (a4) {
300
300
  D.w = true;
301
301
  }
302
302
  else {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ezh",
3
- "version": "0.1.3",
3
+ "version": "0.1.4",
4
4
  "scripts": {
5
5
  "start": "webpack serve"
6
6
  },
@@ -36,7 +36,7 @@
36
36
  "eslint-plugin-import": "^2.31.0",
37
37
  "ezh-trans": "^0.2.0",
38
38
  "globals": "^15.14.0",
39
- "minify-ts": "^1.2.3",
39
+ "minify-ts": "^1.2.4",
40
40
  "sass": "^1.86.0",
41
41
  "sass-loader": "^16.0.5",
42
42
  "style-loader": "^4.0.0",
@@ -49,4 +49,4 @@
49
49
  "dependencies": {
50
50
  "path-parser": "^6.1.0"
51
51
  }
52
- }
52
+ }