ezh 0.1.4 → 0.1.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/elements.js CHANGED
@@ -1,4 +1,4 @@
1
- import { a3, U, S, W } from './RbTree';
1
+ import { a1, S, R, U } from './RbTree';
2
2
  const V = {
3
3
  'ariaAtomic': 'aria-atomic',
4
4
  'ariaAutoComplete': 'aria-autocomplete',
@@ -92,126 +92,132 @@ const V = {
92
92
  'wordSpacing': 'word-spacing',
93
93
  'writingMode': 'writing-mode',
94
94
  };
95
- const X = {};
96
- const Y = [];
97
- Object.freeze(X);
98
- Object.freeze(Y);
99
- const E = () => false;
100
- const y = [];
101
- const w = new Set();
102
- const a5 = new W();
103
- const ai = new W();
104
- const av = [];
105
- const aw = [];
106
- const aj = {
95
+ const a3 = {};
96
+ const W = [];
97
+ Object.freeze(a3);
98
+ Object.freeze(W);
99
+ const C = () => false;
100
+ const w = [];
101
+ const y = new Set();
102
+ const a4 = new U();
103
+ const ag = new U();
104
+ const ar = [];
105
+ const at = [];
106
+ const au = {
107
107
  id: '',
108
108
  index: 0,
109
109
  firstElement: null,
110
- attachTo: E,
111
- move: E,
112
- detachFrom: E,
113
- update: E,
114
- refresh: E,
115
- release: E,
116
- version: 0,
117
- parentCom: {},
118
- markChanged: E,
119
- watchMountChange: E,
110
+ attachTo: C,
111
+ move: C,
112
+ detachFrom: C,
113
+ update: C,
114
+ refresh: C,
115
+ release: C,
116
+ version: 1,
117
+ markChanged: C,
118
+ watchMountChange: C,
120
119
  };
121
- let F = '';
122
- let ak = 20000;
123
- let A = 0;
124
- let ax = 0;
125
- let L = undefined;
126
- const I = new W();
127
- export const o = new Map();
128
- export let q = aj;
129
- export let M = 0;
130
- const aG = (z, aW) => {
131
- return document.createElement(z);
120
+ let D = '';
121
+ let ai = 20000;
122
+ let J = 0;
123
+ let av = 0;
124
+ let K = undefined;
125
+ const G = new U();
126
+ export const n = new Map();
127
+ export let p = au;
128
+ export let L = 1;
129
+ const aF = (x, aV) => {
130
+ return document.createElement(x);
132
131
  };
133
- let a8 = aG;
134
- const ay = {
135
- 'svg': (z, N) => {
136
- N.a7();
137
- return document.createElementNS('http://www.w3.org/2000/svg', z);
132
+ let a6 = aF;
133
+ const aw = {
134
+ 'svg': (x, M) => {
135
+ M.a5();
136
+ return document.createElementNS('http://www.w3.org/2000/svg', x);
138
137
  },
139
- 'math': (z, N) => {
140
- N.a7();
141
- return document.createElementNS('http://www.w3.org/1998/Math/MathML', z);
138
+ 'math': (x, M) => {
139
+ M.a5();
140
+ return document.createElementNS('http://www.w3.org/1998/Math/MathML', x);
142
141
  },
143
- 'foreignObject': (z, N) => {
144
- if (z !== 'foreignObject') {
145
- return document.createElement(z);
142
+ 'foreignObject': (x, M) => {
143
+ if (x !== 'foreignObject') {
144
+ return document.createElement(x);
146
145
  }
147
- N.a7();
148
- return document.createElementNS('http://www.w3.org/2000/svg', z);
146
+ M.a5();
147
+ return document.createElementNS('http://www.w3.org/2000/svg', x);
149
148
  },
150
149
  };
151
- const al = () => {
152
- if (++ax >= A) {
153
- for (const element of w) {
154
- w.delete(element);
150
+ const aj = () => {
151
+ if (++av >= J) {
152
+ for (const element of y) {
153
+ y.delete(element);
155
154
  if (element.id) {
156
155
  element.release();
157
156
  }
158
157
  else {
159
- if (--ax < A) {
160
- w.add(element);
158
+ if (--av < J) {
159
+ y.add(element);
161
160
  break;
162
161
  }
163
162
  }
164
163
  }
165
164
  }
166
165
  else {
167
- w.add(Object.create(aj));
166
+ y.add(Object.create(au));
168
167
  }
169
- if (L) {
170
- L = setTimeout(al, ak);
168
+ if (K) {
169
+ K = setTimeout(aj, ai);
171
170
  }
172
171
  };
173
- const az = (parent, m) => {
174
- const a$ = ['', m];
175
- while (parent.constructor !== a6) {
176
- a$.push(parent.id);
172
+ const ax = (parent, m) => {
173
+ const ay = ['', m];
174
+ while (parent.constructor !== ah) {
175
+ ay.push(parent.id);
177
176
  parent = parent.parent;
178
177
  }
179
- return a$.reverse().join(',');
178
+ return ay.reverse().join(',');
180
179
  };
181
- const aH = () => {
180
+ const aG = () => {
182
181
  let element;
183
- while (element = I.au(true)) {
182
+ while (element = G.aq(true)) {
184
183
  const { id, newChildren, parent } = element;
185
184
  if (newChildren) {
186
- if (parent && am(parent)) {
185
+ if (parent && ak(parent)) {
187
186
  element.refresh(newChildren);
188
187
  parent.currentBefore = undefined;
189
188
  }
190
- else if (element.constructor === an) {
191
- a5.C(id, element);
189
+ else if (element.version) {
190
+ a4.A(id, element);
192
191
  }
193
192
  }
194
193
  }
195
- M++;
196
- for (const { parent, element } of y) {
197
- element.detachFrom(X);
194
+ L++;
195
+ for (const { parent, element } of w) {
198
196
  if (element.parent !== parent) {
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;
197
+ if (!ag.ae() && ak(parent)) {
198
+ const a2 = !element.parent;
199
+ const a7 = ax(parent, element.id);
200
+ ag.af((key, value) => {
201
+ if (key.startsWith(a7)) {
202
+ value._(value.B, a2);
203
+ return S;
206
204
  }
207
- return S;
208
- }, a9);
205
+ return R;
206
+ }, a7);
207
+ }
208
+ }
209
+ if (!element.parent) {
210
+ if (J) {
211
+ y.add(element);
212
+ }
213
+ else {
214
+ element.release();
209
215
  }
210
216
  }
211
217
  }
212
- y.length = 0;
218
+ w.length = 0;
213
219
  };
214
- const O = (children, f = [], from = 0) => {
220
+ const N = (children, f = [], from = 0) => {
215
221
  let a = children[from];
216
222
  for (;;) {
217
223
  if (a && a.id !== undefined) {
@@ -220,7 +226,7 @@ const O = (children, f = [], from = 0) => {
220
226
  else if (a !== null && a !== undefined) {
221
227
  switch (typeof a) {
222
228
  case 'object':
223
- O(a, f);
229
+ N(a, f);
224
230
  break;
225
231
  case 'function':
226
232
  a = a();
@@ -230,7 +236,7 @@ const O = (children, f = [], from = 0) => {
230
236
  case 'bigint':
231
237
  a = '' + a;
232
238
  default:
233
- f.push(new ao('', a));
239
+ f.push(new al('', a));
234
240
  }
235
241
  }
236
242
  if (++from < children.length) {
@@ -242,93 +248,93 @@ const O = (children, f = [], from = 0) => {
242
248
  }
243
249
  return f;
244
250
  };
245
- const aa = (B, children, parent) => {
251
+ const a8 = (z, children, parent) => {
246
252
  let f;
247
- const length = B.length;
253
+ const length = z.length;
248
254
  let newChildren = children;
249
255
  let b = 0;
250
256
  while (b < length) {
251
- const a_ = B[b];
252
- if (a_ !== newChildren[b]) {
257
+ const az = z[b];
258
+ if (az !== newChildren[b]) {
253
259
  if (b === newChildren.length) {
254
260
  return newChildren;
255
261
  }
256
262
  const a = newChildren[b];
257
263
  if (!a || a.id === undefined) {
258
- newChildren = O(newChildren, newChildren.slice(0, b), b);
264
+ newChildren = N(newChildren, newChildren.slice(0, b), b);
259
265
  continue;
260
266
  }
261
267
  else if (f !== newChildren) {
262
268
  break;
263
269
  }
264
270
  }
265
- if (!f && a_.parent !== parent) {
266
- f = B;
271
+ if (!f && az.parent !== parent) {
272
+ f = z;
267
273
  }
268
274
  b++;
269
275
  }
270
276
  if (b === newChildren.length) {
271
277
  return f;
272
278
  }
273
- return newChildren === children ? O(newChildren, B.slice(0, b), b) : newChildren;
279
+ return newChildren === children ? N(newChildren, z.slice(0, b), b) : newChildren;
274
280
  };
275
- const am = (element) => {
281
+ const ak = (element) => {
276
282
  let parent = element;
277
283
  do {
278
- if (parent.constructor === a6) {
284
+ if (parent.parent === parent) {
279
285
  return true;
280
286
  }
281
287
  parent = parent.parent;
282
288
  } while (parent);
283
289
  return false;
284
290
  };
285
- const ab = (B, newChildren, parent, aI) => {
291
+ const a9 = (z, newChildren, parent, aH) => {
286
292
  let b, i;
287
293
  let a;
288
- if (newChildren !== B && B.length) {
289
- const ap = [];
290
- let t;
294
+ if (newChildren !== z && z.length) {
295
+ const am = [];
296
+ let s;
291
297
  i = newChildren.length;
292
298
  b = 10000000;
293
299
  while (--i >= 0) {
294
300
  a = newChildren[i];
295
301
  if (a.parent === parent) {
296
- const aA = i - a.index;
297
- if (aA === b) {
298
- t.G++;
302
+ const a$ = i - a.index;
303
+ if (a$ === b) {
304
+ s.E++;
299
305
  a.index = i;
300
306
  }
301
307
  else {
302
- t = {
308
+ s = {
303
309
  from: a.index,
304
310
  to: i,
305
- G: 1,
311
+ E: 1,
306
312
  };
307
- b = aA;
308
- a.index = -ap.push(t);
313
+ b = a$;
314
+ a.index = -am.push(s);
309
315
  }
310
316
  }
311
317
  else if (b !== 10000000) {
312
318
  b = 10000000;
313
319
  }
314
320
  }
315
- const aq = [];
316
- i = B.length - 1;
321
+ const an = [];
322
+ i = z.length - 1;
317
323
  while (i >= 0) {
318
- a = B[i];
324
+ a = z[i];
319
325
  if (a.index < 0) {
320
- t = ap[-a.index - 1];
321
- aq.push(t);
322
- i -= t.G;
326
+ s = am[-a.index - 1];
327
+ an.push(s);
328
+ i -= s.E;
323
329
  }
324
330
  else {
325
331
  a.detachFrom(parent);
326
332
  i--;
327
333
  }
328
334
  }
329
- let Q;
330
- let ac;
331
- let ad = 0;
335
+ let O;
336
+ let aa;
337
+ let ab = 0;
332
338
  i = newChildren.length - 1;
333
339
  while (i >= 0) {
334
340
  a = newChildren[i];
@@ -337,32 +343,32 @@ const ab = (B, newChildren, parent, aI) => {
337
343
  a.attachTo(parent);
338
344
  }
339
345
  else {
340
- t = ap[-a.index - 1];
341
- ac = t.G;
342
- Q = aq[ad];
346
+ s = am[-a.index - 1];
347
+ aa = s.E;
348
+ O = an[ab];
343
349
  a.index = i;
344
- if (!aI) {
345
- if (Q === t) {
346
- ad++;
347
- i -= t.G;
350
+ if (!aH) {
351
+ if (O === s) {
352
+ ab++;
353
+ i -= s.E;
348
354
  parent.currentBefore = undefined;
349
355
  continue;
350
356
  }
351
- if (Q.from > t.from) {
352
- b = ad;
357
+ if (O.from > s.from) {
358
+ b = ab;
353
359
  do {
354
- ac -= Q.G;
355
- Q = aq[++b];
356
- } while (Q.from > t.from && ac > 0);
357
- if (ac > 0) {
358
- i -= t.G;
360
+ aa -= O.E;
361
+ O = an[++b];
362
+ } while (O.from > s.from && aa > 0);
363
+ if (aa > 0) {
364
+ i -= s.E;
359
365
  parent.currentBefore = undefined;
360
- ad = b;
366
+ ab = b;
361
367
  continue;
362
368
  }
363
369
  }
364
370
  }
365
- b = i - t.G;
371
+ b = i - s.E;
366
372
  do {
367
373
  a.move();
368
374
  } while (--i > b && (a = newChildren[i]));
@@ -380,13 +386,11 @@ const ab = (B, newChildren, parent, aI) => {
380
386
  }
381
387
  parent.currentBefore = undefined;
382
388
  };
383
- class ao {
389
+ class al {
384
390
  constructor(id, text) {
385
391
  this.id = id;
386
- this.parent = undefined;
387
392
  this.index = 0;
388
- this.n = 0;
389
- this.ae = text;
393
+ this.ac = text;
390
394
  }
391
395
  id;
392
396
  parent;
@@ -394,33 +398,33 @@ class ao {
394
398
  firstElement;
395
399
  attachTo(target) {
396
400
  if (!this.firstElement) {
397
- this.firstElement = document.createTextNode(this.ae);
401
+ this.firstElement = document.createTextNode(this.ac);
398
402
  }
399
403
  const { parent, firstElement, index } = this;
400
404
  if (this.id) {
401
- if (!this.n++) {
402
- w.delete(this);
405
+ if (!parent) {
406
+ y.delete(this);
403
407
  }
404
- if (parent) {
408
+ else {
409
+ w.push({ parent, element: this });
405
410
  firstElement.remove();
406
- y.push({ parent, element: this });
407
411
  }
408
412
  }
409
413
  this.parent = target;
410
- let r = target.currentBefore;
411
- if (r === undefined) {
412
- r = target.findNextSiblingElement(index);
414
+ let q = target.currentBefore;
415
+ if (q === undefined) {
416
+ q = target.findNextSiblingElement(index);
413
417
  }
414
- target.element.insertBefore(firstElement, r);
418
+ target.element.insertBefore(firstElement, q);
415
419
  target.currentBefore = firstElement;
416
420
  }
417
421
  move() {
418
422
  const { parent, index, firstElement } = this;
419
- let r = parent.currentBefore;
420
- if (r === undefined) {
421
- r = parent.findNextSiblingElement(index);
423
+ let q = parent.currentBefore;
424
+ if (q === undefined) {
425
+ q = parent.findNextSiblingElement(index);
422
426
  }
423
- parent.element.insertBefore(firstElement, r);
427
+ parent.element.insertBefore(firstElement, q);
424
428
  parent.currentBefore = firstElement;
425
429
  }
426
430
  detachFrom(target) {
@@ -428,23 +432,13 @@ class ao {
428
432
  this.firstElement.remove();
429
433
  this.parent = undefined;
430
434
  if (this.id) {
431
- y.push({ parent: target, element: this });
432
- }
433
- }
434
- else {
435
- if (this.id && !--this.n) {
436
- if (A) {
437
- w.add(this);
438
- }
439
- else {
440
- this.release();
441
- }
435
+ w.push({ parent: target, element: this });
442
436
  }
443
437
  }
444
438
  }
445
439
  update(text) {
446
- if (this.ae !== text) {
447
- this.ae = text;
440
+ if (this.ac !== text) {
441
+ this.ac = text;
448
442
  if (this.firstElement) {
449
443
  this.firstElement.nodeValue = text;
450
444
  }
@@ -453,25 +447,20 @@ class ao {
453
447
  }
454
448
  refresh() { }
455
449
  release(target) {
456
- if (target && this.parent === target) {
457
- this.firstElement.remove();
458
- this.parent = undefined;
459
- }
460
- if (this.id && --this.n <= 0) {
461
- o.delete(this.id);
450
+ if (this.parent === target) {
451
+ if (target) {
452
+ this.firstElement.remove();
453
+ }
454
+ n.delete(this.id);
462
455
  }
463
456
  }
464
- n;
465
- ae;
457
+ ac;
466
458
  }
467
- export class aJ {
468
- constructor(id, children, aK) {
459
+ export class aI {
460
+ constructor(id, children, aJ) {
469
461
  this.id = id;
470
- this.parent = undefined;
471
462
  this.index = 0;
472
- this.n = 0;
473
- this.newChildren = this.d = aK ? O(children) : (children || Y);
474
- this.currentBefore = undefined;
463
+ this.newChildren = this.d = aJ ? N(children) : (children || W);
475
464
  }
476
465
  id;
477
466
  parent;
@@ -493,11 +482,11 @@ export class aJ {
493
482
  }
494
483
  attachTo(target) {
495
484
  const { parent, d, newChildren } = this;
496
- if (!this.n++) {
497
- w.delete(this);
485
+ if (!parent) {
486
+ y.delete(this);
498
487
  }
499
- if (parent) {
500
- y.push({ parent, element: this });
488
+ else {
489
+ w.push({ parent, element: this });
501
490
  for (let b = d.length - 1; b >= 0; b--) {
502
491
  d[b].detachFrom(this);
503
492
  }
@@ -517,7 +506,7 @@ export class aJ {
517
506
  move() {
518
507
  const { d, newChildren } = this;
519
508
  if (newChildren) {
520
- ab(d, newChildren, this, true);
509
+ a9(d, newChildren, this, true);
521
510
  this.d = newChildren;
522
511
  this.newChildren = undefined;
523
512
  }
@@ -535,22 +524,12 @@ export class aJ {
535
524
  a.detachFrom(this);
536
525
  }
537
526
  this.parent = undefined;
538
- y.push({ parent: target, element: this });
539
- }
540
- else {
541
- if (!--this.n) {
542
- if (A) {
543
- w.add(this);
544
- }
545
- else {
546
- this.release();
547
- }
548
- }
527
+ w.push({ parent: target, element: this });
549
528
  }
550
529
  }
551
- update(p, children) {
530
+ update(o, children) {
552
531
  if (children) {
553
- const newChildren = aa(this.d, children, this);
532
+ const newChildren = a8(this.d, children, this);
554
533
  if (newChildren) {
555
534
  this.newChildren = newChildren;
556
535
  return true;
@@ -559,20 +538,19 @@ export class aJ {
559
538
  return false;
560
539
  }
561
540
  refresh(newChildren) {
562
- ab(this.d, newChildren, this);
541
+ a9(this.d, newChildren, this);
563
542
  this.d = newChildren;
564
543
  this.newChildren = undefined;
565
544
  }
566
545
  release(target) {
567
- if (target && this.parent === target) {
568
- const { d } = this;
569
- for (const a of d) {
570
- a.detachFrom(this);
546
+ if (this.parent === target) {
547
+ if (target) {
548
+ const { d } = this;
549
+ for (const a of d) {
550
+ a.detachFrom(this);
551
+ }
571
552
  }
572
- this.parent = undefined;
573
- }
574
- if (--this.n <= 0) {
575
- o.delete(this.id);
553
+ n.delete(this.id);
576
554
  }
577
555
  }
578
556
  findNextSiblingElement(index) {
@@ -590,53 +568,49 @@ export class aJ {
590
568
  h = this.parent.currentBefore;
591
569
  return h !== undefined ? h : this.parent.findNextSiblingElement(this.index);
592
570
  }
593
- n;
594
571
  d;
595
572
  }
596
- export class aL {
573
+ export class aK {
597
574
  constructor(id, tag, props, children, check, mutableChild) {
598
575
  this.id = id;
599
- this.parent = undefined;
600
576
  this.index = 0;
601
- this.n = 0;
602
- this.firstElement = this.element = a8(tag, this);
603
- this.newChildren = this.d = mutableChild ? O(children) : (children || Y);
604
- this.currentBefore = undefined;
577
+ this.firstElement = this.element = a6(tag, this);
578
+ this.newChildren = this.d = mutableChild ? N(children) : (children || W);
605
579
  if (props) {
606
- this.p = X;
607
- this.u = -1;
580
+ this.o = a3;
581
+ this.t = -1;
608
582
  if (tag === 'select') {
609
- const ar = this.element;
610
- const at = props;
611
- const c = at.value;
583
+ const ao = this.element;
584
+ const ap = props;
585
+ const c = ap.value;
612
586
  if (c) {
613
- at.value = undefined;
614
- const aM = this.refresh;
587
+ ap.value = undefined;
588
+ const aL = this.refresh;
615
589
  this.refresh = (newChildren) => {
616
- ab(this.d, newChildren, this);
590
+ a9(this.d, newChildren, this);
617
591
  this.d = newChildren;
618
592
  this.newChildren = undefined;
619
593
  if (Array.isArray(c)) {
620
- const aB = c;
621
- const [e, Z, R] = aB;
622
- ar.value = R;
623
- const _ = aB[3] = (x) => e[Z] = x.target.value;
624
- ar.addEventListener('change', _);
594
+ const a_ = c;
595
+ const [e, X, Q] = a_;
596
+ ao.value = Q;
597
+ const _ = a_[3] = (v) => e[X] = v.target.value;
598
+ ao.addEventListener('change', _);
625
599
  }
626
600
  else {
627
- ar.value = c;
601
+ ao.value = c;
628
602
  }
629
- at.value = c;
630
- this.refresh = aM;
603
+ ap.value = c;
604
+ this.refresh = aL;
631
605
  };
632
606
  }
633
607
  }
634
608
  this.update(props);
635
- this.u = check ?? 0;
609
+ this.t = check ?? 0;
636
610
  }
637
611
  else {
638
- this.p = props;
639
- this.u = 0;
612
+ this.o = props;
613
+ this.t = 0;
640
614
  }
641
615
  }
642
616
  id;
@@ -648,22 +622,22 @@ export class aL {
648
622
  firstElement;
649
623
  attachTo(target) {
650
624
  const { parent, element, newChildren, index } = this;
651
- if (!this.n++) {
652
- w.delete(this);
625
+ if (!parent) {
626
+ y.delete(this);
653
627
  }
654
- if (parent) {
628
+ else {
629
+ w.push({ parent, element: this });
655
630
  element.remove();
656
- y.push({ parent, element: this });
657
631
  }
658
632
  this.parent = target;
659
633
  if (newChildren) {
660
634
  this.refresh(newChildren);
661
635
  }
662
- let r = target.currentBefore;
663
- if (r === undefined) {
664
- r = target.findNextSiblingElement(index);
636
+ let q = target.currentBefore;
637
+ if (q === undefined) {
638
+ q = target.findNextSiblingElement(index);
665
639
  }
666
- target.element.insertBefore(element, r);
640
+ target.element.insertBefore(element, q);
667
641
  target.currentBefore = element;
668
642
  }
669
643
  move() {
@@ -671,48 +645,38 @@ export class aL {
671
645
  if (newChildren) {
672
646
  this.refresh(newChildren);
673
647
  }
674
- let r = parent.currentBefore;
675
- if (r === undefined) {
676
- r = parent.findNextSiblingElement(index);
648
+ let q = parent.currentBefore;
649
+ if (q === undefined) {
650
+ q = parent.findNextSiblingElement(index);
677
651
  }
678
- parent.element.insertBefore(element, r);
652
+ parent.element.insertBefore(element, q);
679
653
  parent.currentBefore = element;
680
654
  }
681
655
  detachFrom(target) {
682
656
  if (this.parent === target) {
683
657
  this.element.remove();
684
658
  this.parent = undefined;
685
- y.push({ parent: target, element: this });
686
- }
687
- else {
688
- if (!--this.n) {
689
- if (A) {
690
- w.add(this);
691
- }
692
- else {
693
- this.release();
694
- }
695
- }
659
+ w.push({ parent: target, element: this });
696
660
  }
697
661
  }
698
662
  update(props, children) {
699
- const { element, p, u } = this;
700
- if (p && u) {
701
- this.p = props;
702
- let k = u;
663
+ const { element, o, t } = this;
664
+ if (o && t) {
665
+ this.o = props;
666
+ let k = t;
703
667
  for (const key in props) {
704
668
  const c = props[key];
705
- const g = p[key];
669
+ const g = o[key];
706
670
  if (c !== g) {
707
671
  if (c !== null && c !== undefined) {
708
672
  switch (typeof c) {
709
673
  case 'string': {
710
- const a0 = V[key];
711
- if (!a0) {
674
+ const Y = V[key];
675
+ if (!Y) {
712
676
  element[key] = c;
713
677
  }
714
678
  else {
715
- element.setAttribute(a0, c);
679
+ element.setAttribute(Y, c);
716
680
  }
717
681
  break;
718
682
  }
@@ -724,24 +688,24 @@ export class aL {
724
688
  }
725
689
  default: {
726
690
  if (Array.isArray(c)) {
727
- const [e, Z, R] = c;
691
+ const [e, X, Q] = c;
728
692
  if (g) {
729
- const [aN, aO, aP, aC] = g;
730
- if (aP !== R && element[key] !== R) {
731
- element[key] = R;
693
+ const [aM, aN, aO, aA] = g;
694
+ if (aO !== Q && element[key] !== Q) {
695
+ element[key] = Q;
732
696
  }
733
- if (aN === e && aO === Z) {
734
- c[3] = aC;
697
+ if (aM === e && aN === X) {
698
+ c[3] = aA;
735
699
  }
736
700
  else {
737
- const _ = c[3] = (x) => e[Z] = x.target[key];
738
- element.removeEventListener('change', aC);
701
+ const _ = c[3] = (v) => e[X] = v.target[key];
702
+ element.removeEventListener('change', aA);
739
703
  element.addEventListener('change', _);
740
704
  }
741
705
  }
742
706
  else {
743
- element[key] = R;
744
- const _ = c[3] = (x) => e[Z] = x.target[key];
707
+ element[key] = Q;
708
+ const _ = c[3] = (v) => e[X] = v.target[key];
745
709
  element.addEventListener('change', _);
746
710
  }
747
711
  break;
@@ -749,40 +713,40 @@ export class aL {
749
713
  if (key === 'style') {
750
714
  if (!g) {
751
715
  const style = element.style;
752
- const s = {};
716
+ const r = {};
753
717
  let k = 0;
754
718
  for (const l in c) {
755
- const a1 = c[l];
756
- s[l] = a1;
719
+ const Z = c[l];
720
+ r[l] = Z;
757
721
  k++;
758
- style[l] = a1;
722
+ style[l] = Z;
759
723
  }
760
- props[key] = s;
761
- s.k = k;
724
+ props[key] = r;
725
+ r.k = k;
762
726
  break;
763
727
  }
764
728
  const style = element.style;
765
- const s = {};
729
+ const r = {};
766
730
  let k = 0;
767
- let J = g.k;
731
+ let H = g.k;
768
732
  for (const l in c) {
769
- const K = c[l];
770
- s[l] = K;
733
+ const I = c[l];
734
+ r[l] = I;
771
735
  if (l in g) {
772
- J--;
736
+ H--;
773
737
  }
774
738
  k++;
775
- if (K !== g[key]) {
776
- style[l] = K;
739
+ if (I !== g[key]) {
740
+ style[l] = I;
777
741
  }
778
742
  }
779
- props[key] = s;
780
- s.k = k;
781
- if (J) {
743
+ props[key] = r;
744
+ r.k = k;
745
+ if (H) {
782
746
  for (const l in g) {
783
747
  if (!(l in c)) {
784
748
  style[l] = null;
785
- if (!--J) {
749
+ if (!--H) {
786
750
  break;
787
751
  }
788
752
  }
@@ -797,12 +761,12 @@ export class aL {
797
761
  else {
798
762
  switch (typeof g) {
799
763
  case 'string': {
800
- const a0 = V[key];
801
- if (!a0) {
764
+ const Y = V[key];
765
+ if (!Y) {
802
766
  this.element[key] = c;
803
767
  }
804
768
  else {
805
- this.element.removeAttribute(a0);
769
+ this.element.removeAttribute(Y);
806
770
  }
807
771
  break;
808
772
  }
@@ -811,7 +775,7 @@ export class aL {
811
775
  if (Array.isArray(g)) {
812
776
  element.removeEventListener('change', g[3]);
813
777
  }
814
- else if (g === X) {
778
+ else if (g === a3) {
815
779
  element[key] = c;
816
780
  }
817
781
  }
@@ -832,7 +796,7 @@ export class aL {
832
796
  }
833
797
  }
834
798
  if (children) {
835
- const newChildren = aa(this.d, children, this);
799
+ const newChildren = a8(this.d, children, this);
836
800
  if (newChildren) {
837
801
  this.newChildren = newChildren;
838
802
  return true;
@@ -841,21 +805,20 @@ export class aL {
841
805
  return false;
842
806
  }
843
807
  refresh(newChildren) {
844
- ab(this.d, newChildren, this);
808
+ a9(this.d, newChildren, this);
845
809
  this.d = newChildren;
846
810
  this.newChildren = undefined;
847
811
  }
848
812
  release(target) {
849
- if (target && this.parent === target) {
850
- this.element.remove();
851
- this.parent = undefined;
852
- }
853
- if (--this.n <= 0) {
813
+ if (this.parent === target) {
814
+ if (target) {
815
+ this.element.remove();
816
+ }
854
817
  const { d } = this;
855
818
  for (const a of d) {
856
819
  a.release(this);
857
820
  }
858
- o.delete(this.id);
821
+ n.delete(this.id);
859
822
  }
860
823
  }
861
824
  findNextSiblingElement(index) {
@@ -872,17 +835,17 @@ export class aL {
872
835
  }
873
836
  return null;
874
837
  }
875
- a7() {
876
- this.update = this.aQ;
838
+ a5() {
839
+ this.update = this.aP;
877
840
  }
878
- aQ(props, children) {
879
- const { element, p, u } = this;
880
- if (p && u) {
881
- this.p = props;
882
- let k = u;
841
+ aP(props, children) {
842
+ const { element, o, t } = this;
843
+ if (o && t) {
844
+ this.o = props;
845
+ let k = t;
883
846
  for (const key in props) {
884
847
  const c = props[key];
885
- const g = p[key];
848
+ const g = o[key];
886
849
  if (c !== g) {
887
850
  if (c !== null && c !== undefined) {
888
851
  switch (typeof c) {
@@ -903,40 +866,40 @@ export class aL {
903
866
  if (key === 'style') {
904
867
  if (!g) {
905
868
  const style = element.style;
906
- const s = {};
869
+ const r = {};
907
870
  let k = 0;
908
871
  for (const l in c) {
909
- const a1 = c[l];
910
- s[l] = a1;
872
+ const Z = c[l];
873
+ r[l] = Z;
911
874
  k++;
912
- style[l] = a1;
875
+ style[l] = Z;
913
876
  }
914
- props[key] = s;
915
- s.k = k;
877
+ props[key] = r;
878
+ r.k = k;
916
879
  break;
917
880
  }
918
881
  const style = element.style;
919
- const s = {};
882
+ const r = {};
920
883
  let k = 0;
921
- let J = g.k;
884
+ let H = g.k;
922
885
  for (const l in c) {
923
- const K = c[l];
924
- s[l] = K;
886
+ const I = c[l];
887
+ r[l] = I;
925
888
  if (l in g) {
926
- J--;
889
+ H--;
927
890
  }
928
891
  k++;
929
- if (K !== g[key]) {
930
- style[l] = K;
892
+ if (I !== g[key]) {
893
+ style[l] = I;
931
894
  }
932
895
  }
933
- props[key] = s;
934
- s.k = k;
935
- if (J) {
896
+ props[key] = r;
897
+ r.k = k;
898
+ if (H) {
936
899
  for (const l in g) {
937
900
  if (!(l in c)) {
938
901
  style[l] = null;
939
- if (!--J) {
902
+ if (!--H) {
940
903
  break;
941
904
  }
942
905
  }
@@ -949,8 +912,8 @@ export class aL {
949
912
  }
950
913
  }
951
914
  else {
952
- const aR = typeof g;
953
- switch (aR) {
915
+ const aQ = typeof g;
916
+ switch (aQ) {
954
917
  case 'string':
955
918
  case 'number':
956
919
  case 'boolean': {
@@ -969,7 +932,7 @@ export class aL {
969
932
  }
970
933
  }
971
934
  if (children) {
972
- const newChildren = aa(this.d, children, this);
935
+ const newChildren = a8(this.d, children, this);
973
936
  if (newChildren) {
974
937
  this.newChildren = newChildren;
975
938
  return true;
@@ -977,26 +940,21 @@ export class aL {
977
940
  }
978
941
  return false;
979
942
  }
980
- n;
981
- p;
943
+ o;
982
944
  d;
983
- u;
945
+ t;
984
946
  }
985
- export class an {
986
- constructor(id, parentCom, entry, props, children, check, mutableChild) {
947
+ export class aB {
948
+ constructor(id, entry, props, children, check, mutableChild) {
987
949
  this.id = id;
988
- this.parentCom = parentCom;
989
- this.parent = undefined;
990
950
  this.index = 0;
991
- this.version = 0;
992
- this.n = 0;
993
- this.aD = entry;
994
- this.p = props;
995
- this.newChildren = this.d = mutableChild ? O(children) : (children || Y);
996
- this.u = check ?? 0;
951
+ this.version = 1;
952
+ this.aC = entry;
953
+ this.o = props;
954
+ this.newChildren = this.d = mutableChild ? N(children) : (children || W);
955
+ this.t = check ?? 0;
997
956
  }
998
957
  id;
999
- parentCom;
1000
958
  parent;
1001
959
  newChildren;
1002
960
  index;
@@ -1014,11 +972,11 @@ export class an {
1014
972
  j.index = this.index;
1015
973
  j.attachTo(target);
1016
974
  }
1017
- if (!this.n++) {
1018
- w.delete(this);
975
+ if (!parent) {
976
+ y.delete(this);
1019
977
  }
1020
- if (parent) {
1021
- y.push({ parent, element: this });
978
+ else {
979
+ w.push({ parent, element: this });
1022
980
  }
1023
981
  }
1024
982
  move() {
@@ -1035,33 +993,23 @@ export class an {
1035
993
  if (this.parent === target) {
1036
994
  this.j?.detachFrom(target);
1037
995
  this.parent = undefined;
1038
- y.push({ parent: target, element: this });
1039
- }
1040
- else {
1041
- if (!--this.n) {
1042
- if (A) {
1043
- w.add(this);
1044
- }
1045
- else {
1046
- this.release();
1047
- }
1048
- }
996
+ w.push({ parent: target, element: this });
1049
997
  }
1050
998
  }
1051
999
  update(props, children) {
1052
- const { p, d, u } = this;
1053
- this.p = props;
1000
+ const { o, d, t } = this;
1001
+ this.o = props;
1054
1002
  if (children) {
1055
- const newChildren = aa(d, children, this.parent);
1003
+ const newChildren = a8(d, children, this.parent);
1056
1004
  if (newChildren) {
1057
1005
  this.newChildren = newChildren;
1058
1006
  return true;
1059
1007
  }
1060
1008
  }
1061
- if (!this.newChildren && u) {
1062
- let k = u;
1063
- for (const key in p) {
1064
- if (p[key] !== props[key]) {
1009
+ if (!this.newChildren && t) {
1010
+ let k = t;
1011
+ for (const key in o) {
1012
+ if (o[key] !== props[key]) {
1065
1013
  this.newChildren = d;
1066
1014
  return true;
1067
1015
  }
@@ -1074,38 +1022,38 @@ export class an {
1074
1022
  }
1075
1023
  refresh(newChildren) {
1076
1024
  const { id, parent, j, index } = this;
1077
- const aS = q;
1078
- q = this;
1079
- let v = this.aD(this.p || X, newChildren);
1080
- if (v !== j) {
1081
- switch (typeof v) {
1025
+ const aR = p;
1026
+ p = this;
1027
+ let u = this.aC(this.o || a3, newChildren);
1028
+ if (u !== j) {
1029
+ switch (typeof u) {
1082
1030
  case 'boolean':
1083
1031
  case 'number':
1084
1032
  case 'bigint':
1085
- v = '' + v;
1033
+ u = '' + u;
1086
1034
  case 'string':
1087
- v = new ao('', v);
1088
- this.j = v;
1089
- v.index = index;
1090
- v.attachTo(parent);
1035
+ u = new al('', u);
1036
+ this.j = u;
1037
+ u.index = index;
1038
+ u.attachTo(parent);
1091
1039
  j?.detachFrom(parent);
1092
1040
  break;
1093
1041
  default:
1094
- if (v) {
1095
- this.j = v;
1096
- v.index = index;
1097
- v.attachTo(parent);
1042
+ if (u) {
1043
+ this.j = u;
1044
+ u.index = index;
1045
+ u.attachTo(parent);
1098
1046
  j?.detachFrom(parent);
1099
- if (!a5.ag()) {
1100
- a5.ah((a2, com) => {
1101
- if (!a2.startsWith(id)) {
1102
- return S;
1047
+ if (!a4.ae()) {
1048
+ a4.af((a0, com) => {
1049
+ if (!a0.startsWith(id)) {
1050
+ return R;
1103
1051
  }
1104
- if (com.parent && am(com.parent)) {
1105
- I.C(a2, com);
1106
- return U;
1052
+ if (com.parent && ak(com.parent)) {
1053
+ G.A(a0, com);
1054
+ return S;
1107
1055
  }
1108
- return a3;
1056
+ return a1;
1109
1057
  }, id);
1110
1058
  }
1111
1059
  }
@@ -1127,18 +1075,16 @@ export class an {
1127
1075
  }
1128
1076
  this.d = newChildren;
1129
1077
  this.newChildren = undefined;
1130
- q = aS;
1078
+ p = aR;
1131
1079
  }
1132
1080
  release(target) {
1133
- if (target && this.parent === target) {
1134
- this.j?.detachFrom(target);
1081
+ if (this.parent === target) {
1082
+ this.j?.release(target);
1135
1083
  this.parent = undefined;
1136
- }
1137
- if (--this.n <= 0) {
1138
1084
  if (this.newChildren) {
1139
- a5.delete(this.id);
1085
+ a4.delete(this.id);
1140
1086
  }
1141
- o.delete(this.id);
1087
+ n.delete(this.id);
1142
1088
  }
1143
1089
  }
1144
1090
  markChanged() {
@@ -1148,146 +1094,145 @@ export class an {
1148
1094
  }
1149
1095
  return false;
1150
1096
  }
1151
- watchMountChange(aT, _, D) {
1152
- const a9 = az(this.parent, this.id);
1153
- ai.C(a9 + aT, { _, D }, true);
1097
+ watchMountChange(aS, _, B) {
1098
+ const a7 = ax(this.parent, this.id);
1099
+ ag.A(a7 + aS, { _, B }, true);
1154
1100
  }
1155
- n;
1156
- aD;
1157
- p;
1101
+ aC;
1102
+ o;
1158
1103
  d;
1159
- u;
1104
+ t;
1160
1105
  j;
1161
1106
  }
1162
- class a6 {
1107
+ class ah {
1163
1108
  constructor(id, rootElement) {
1164
1109
  this.id = id;
1165
1110
  this.element = rootElement;
1166
- this.currentBefore = undefined;
1111
+ this.parent = this;
1167
1112
  }
1168
1113
  id;
1169
1114
  element;
1170
1115
  parent;
1171
1116
  currentBefore;
1172
- findNextSiblingElement(aZ) {
1117
+ findNextSiblingElement(aY) {
1173
1118
  return null;
1174
1119
  }
1175
1120
  render(entry) {
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++;
1121
+ if (!this.ad) {
1122
+ this.ad = new aB(this.id, entry, null, W);
1123
+ n.set(this.id, this.ad);
1124
+ this.ad.attachTo(this);
1125
+ L++;
1181
1126
  }
1182
1127
  }
1183
- af;
1128
+ ad;
1184
1129
  }
1185
1130
  export const addComReader = (readerRecord, key) => {
1186
- if (q.id) {
1187
- let H = readerRecord[key];
1188
- if (!H) {
1189
- H = new Map();
1190
- readerRecord[key] = H;
1131
+ if (p.id) {
1132
+ let F = readerRecord[key];
1133
+ if (!F) {
1134
+ F = new Map();
1135
+ readerRecord[key] = F;
1191
1136
  }
1192
- H.set(q.id, q.version);
1137
+ F.set(p.id, p.version);
1193
1138
  }
1194
1139
  };
1195
1140
  export let refreshComReaders = (readerRecord, key) => {
1196
- const H = readerRecord[key];
1197
- if (H) {
1198
- for (const [a2, version] of H) {
1199
- const com = o.get(a2);
1141
+ const F = readerRecord[key];
1142
+ if (F) {
1143
+ for (const [a0, version] of F) {
1144
+ const com = n.get(a0);
1200
1145
  if (com?.version === version && com.markChanged()) {
1201
- if (I.ag()) {
1202
- queueMicrotask(aH);
1146
+ if (G.ae()) {
1147
+ queueMicrotask(aG);
1203
1148
  }
1204
- I.C(a2, com);
1149
+ G.A(a0, com);
1205
1150
  }
1206
1151
  }
1207
- H.clear();
1152
+ F.clear();
1208
1153
  }
1209
1154
  };
1210
- export const aE = (replace) => refreshComReaders = replace;
1155
+ export const aD = (replace) => refreshComReaders = replace;
1211
1156
  export const configGC = (waitIntervals, interval = 20000) => {
1212
1157
  if (waitIntervals >= 0 && interval >= 1000) {
1213
- ak = interval;
1214
- if (A) {
1215
- clearTimeout(L);
1158
+ ai = interval;
1159
+ if (J) {
1160
+ clearTimeout(K);
1216
1161
  }
1217
1162
  if (waitIntervals) {
1218
- L = setTimeout(al, ak);
1163
+ K = setTimeout(aj, ai);
1219
1164
  }
1220
- else if (L) {
1221
- L = undefined;
1222
- for (let b = 0; b < A; b++) {
1223
- al();
1165
+ else if (K) {
1166
+ K = undefined;
1167
+ for (let b = 0; b < J; b++) {
1168
+ aj();
1224
1169
  }
1225
1170
  }
1226
- A = waitIntervals;
1171
+ J = waitIntervals;
1227
1172
  return true;
1228
1173
  }
1229
1174
  return false;
1230
1175
  };
1231
- const aU = () => {
1232
- F = aw.pop();
1176
+ const aT = () => {
1177
+ D = at.pop();
1233
1178
  };
1234
1179
  export var $ezh;
1235
1180
  (function ($ezh) {
1236
1181
  $ezh.render = (rootElement, entry) => {
1237
- const id = (av.length || '') + '|';
1238
- const aF = new a6(id, rootElement);
1239
- av.push(aF);
1240
- aF.render(entry);
1182
+ const id = (ar.length || '') + '|';
1183
+ const aE = new ah(id, rootElement);
1184
+ ar.push(aE);
1185
+ aE.render(entry);
1241
1186
  };
1242
1187
  $ezh.$ = (id, tag, props, children, check, mutableChild) => {
1243
- const m = `${q.id}${id}${F}`;
1244
- let element = o.get(m);
1188
+ const m = `${p.id}${id}${D}`;
1189
+ let element = n.get(m);
1245
1190
  if (element) {
1246
1191
  if ((props || children) && element.update(props, children)) {
1247
- I.C(m, element);
1192
+ G.A(m, element);
1248
1193
  }
1249
1194
  return element;
1250
1195
  }
1251
- element = new aL(m, tag, props, children, check, mutableChild);
1252
- o.set(m, element);
1196
+ element = new aK(m, tag, props, children, check, mutableChild);
1197
+ n.set(m, element);
1253
1198
  return element;
1254
1199
  };
1255
1200
  $ezh.$c = (id, entry, props, children, check, mutableChild) => {
1256
- const m = `${q.id}${id}${F}`;
1257
- let element = o.get(m);
1201
+ const m = `${p.id}${id}${D}`;
1202
+ let element = n.get(m);
1258
1203
  if (element) {
1259
1204
  if ((props || children) && element.update(props, children)) {
1260
- I.C(m, element);
1205
+ G.A(m, element);
1261
1206
  }
1262
1207
  return element;
1263
1208
  }
1264
- element = new an(m, q, entry, props, children, check, mutableChild);
1265
- o.set(m, element);
1209
+ element = new aB(m, entry, props, children, check, mutableChild);
1210
+ n.set(m, element);
1266
1211
  return element;
1267
1212
  };
1268
1213
  $ezh.$f = (id, children, mutableChild) => {
1269
- const m = `${q.id}${id}${F}`;
1270
- let element = o.get(m);
1214
+ const m = `${p.id}${id}${D}`;
1215
+ let element = n.get(m);
1271
1216
  if (element) {
1272
1217
  if (children && element.update(null, children)) {
1273
- I.C(m, element);
1218
+ G.A(m, element);
1274
1219
  }
1275
1220
  return element;
1276
1221
  }
1277
- element = new aJ(m, children, mutableChild);
1278
- o.set(m, element);
1222
+ element = new aI(m, children, mutableChild);
1223
+ n.set(m, element);
1279
1224
  return element;
1280
1225
  };
1281
1226
  $ezh.$k = (key) => {
1282
- aw.push(F);
1283
- F = `${F || '{'}${key}}`;
1284
- return aU;
1227
+ at.push(D);
1228
+ D = `${D || '{'}${key}}`;
1229
+ return aT;
1285
1230
  };
1286
1231
  $ezh.$n = (ns) => {
1287
- const aV = a8;
1288
- a8 = ay[ns];
1232
+ const aU = a6;
1233
+ a6 = aw[ns];
1289
1234
  return () => {
1290
- a8 = aV;
1235
+ a6 = aU;
1291
1236
  };
1292
1237
  };
1293
1238
  $ezh.$s = (cb, element) => {
@@ -1295,16 +1240,16 @@ export var $ezh;
1295
1240
  return element;
1296
1241
  };
1297
1242
  $ezh.$t = (id, text, mayChange) => {
1298
- const m = `${q.id}${id}${F}`;
1299
- let element = o.get(m);
1243
+ const m = `${p.id}${id}${D}`;
1244
+ let element = n.get(m);
1300
1245
  if (element) {
1301
1246
  if (mayChange) {
1302
1247
  element.update(text);
1303
1248
  }
1304
1249
  return element;
1305
1250
  }
1306
- element = new ao(m, text);
1307
- o.set(element.id, element);
1251
+ element = new al(m, text);
1252
+ n.set(element.id, element);
1308
1253
  return element;
1309
1254
  };
1310
1255
  })($ezh || ($ezh = {}));