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