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/RbTree.js +17 -17
- package/lib/bundle.min.js +1 -1
- package/lib/debugCheck.js +14 -14
- package/lib/elements.js +404 -459
- package/lib/router.js +5 -5
- package/lib/state.js +26 -26
- package/package.json +2 -1
package/lib/elements.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
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
|
|
96
|
-
const
|
|
97
|
-
Object.freeze(
|
|
98
|
-
Object.freeze(
|
|
99
|
-
const
|
|
100
|
-
const
|
|
101
|
-
const
|
|
102
|
-
const
|
|
103
|
-
const
|
|
104
|
-
const
|
|
105
|
-
const
|
|
106
|
-
const
|
|
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:
|
|
111
|
-
move:
|
|
112
|
-
detachFrom:
|
|
113
|
-
update:
|
|
114
|
-
refresh:
|
|
115
|
-
release:
|
|
116
|
-
version:
|
|
117
|
-
|
|
118
|
-
|
|
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
|
|
122
|
-
let
|
|
123
|
-
let
|
|
124
|
-
let
|
|
125
|
-
let
|
|
126
|
-
const
|
|
127
|
-
export const
|
|
128
|
-
export let
|
|
129
|
-
export let
|
|
130
|
-
const
|
|
131
|
-
return document.createElement(
|
|
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
|
|
134
|
-
const
|
|
135
|
-
'svg': (
|
|
136
|
-
|
|
137
|
-
return document.createElementNS('http://www.w3.org/2000/svg',
|
|
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': (
|
|
140
|
-
|
|
141
|
-
return document.createElementNS('http://www.w3.org/1998/Math/MathML',
|
|
138
|
+
'math': (x, M) => {
|
|
139
|
+
M.a5();
|
|
140
|
+
return document.createElementNS('http://www.w3.org/1998/Math/MathML', x);
|
|
142
141
|
},
|
|
143
|
-
'foreignObject': (
|
|
144
|
-
if (
|
|
145
|
-
return document.createElement(
|
|
142
|
+
'foreignObject': (x, M) => {
|
|
143
|
+
if (x !== 'foreignObject') {
|
|
144
|
+
return document.createElement(x);
|
|
146
145
|
}
|
|
147
|
-
|
|
148
|
-
return document.createElementNS('http://www.w3.org/2000/svg',
|
|
146
|
+
M.a5();
|
|
147
|
+
return document.createElementNS('http://www.w3.org/2000/svg', x);
|
|
149
148
|
},
|
|
150
149
|
};
|
|
151
|
-
const
|
|
152
|
-
if (++
|
|
153
|
-
for (const element of
|
|
154
|
-
|
|
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 (--
|
|
160
|
-
|
|
158
|
+
if (--av < J) {
|
|
159
|
+
y.add(element);
|
|
161
160
|
break;
|
|
162
161
|
}
|
|
163
162
|
}
|
|
164
163
|
}
|
|
165
164
|
}
|
|
166
165
|
else {
|
|
167
|
-
|
|
166
|
+
y.add(Object.create(au));
|
|
168
167
|
}
|
|
169
|
-
if (
|
|
170
|
-
|
|
168
|
+
if (K) {
|
|
169
|
+
K = setTimeout(aj, ai);
|
|
171
170
|
}
|
|
172
171
|
};
|
|
173
|
-
const
|
|
174
|
-
const
|
|
175
|
-
while (parent.constructor !==
|
|
176
|
-
|
|
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
|
|
178
|
+
return ay.reverse().join(',');
|
|
180
179
|
};
|
|
181
|
-
const
|
|
180
|
+
const aG = () => {
|
|
182
181
|
let element;
|
|
183
|
-
while (element =
|
|
182
|
+
while (element = G.aq(true)) {
|
|
184
183
|
const { id, newChildren, parent } = element;
|
|
185
184
|
if (newChildren) {
|
|
186
|
-
if (parent &&
|
|
185
|
+
if (parent && ak(parent)) {
|
|
187
186
|
element.refresh(newChildren);
|
|
188
187
|
parent.currentBefore = undefined;
|
|
189
188
|
}
|
|
190
|
-
else if (element.
|
|
191
|
-
|
|
189
|
+
else if (element.version) {
|
|
190
|
+
a4.A(id, element);
|
|
192
191
|
}
|
|
193
192
|
}
|
|
194
193
|
}
|
|
195
|
-
|
|
196
|
-
for (const { parent, element } of
|
|
197
|
-
element.detachFrom(X);
|
|
194
|
+
L++;
|
|
195
|
+
for (const { parent, element } of w) {
|
|
198
196
|
if (element.parent !== parent) {
|
|
199
|
-
if (!
|
|
200
|
-
const
|
|
201
|
-
const
|
|
202
|
-
|
|
203
|
-
if (key.startsWith(
|
|
204
|
-
value._(value.
|
|
205
|
-
return
|
|
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
|
|
208
|
-
},
|
|
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
|
-
|
|
218
|
+
w.length = 0;
|
|
213
219
|
};
|
|
214
|
-
const
|
|
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
|
-
|
|
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
|
|
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
|
|
251
|
+
const a8 = (z, children, parent) => {
|
|
246
252
|
let f;
|
|
247
|
-
const length =
|
|
253
|
+
const length = z.length;
|
|
248
254
|
let newChildren = children;
|
|
249
255
|
let b = 0;
|
|
250
256
|
while (b < length) {
|
|
251
|
-
const
|
|
252
|
-
if (
|
|
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 =
|
|
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 &&
|
|
266
|
-
f =
|
|
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 ?
|
|
279
|
+
return newChildren === children ? N(newChildren, z.slice(0, b), b) : newChildren;
|
|
274
280
|
};
|
|
275
|
-
const
|
|
281
|
+
const ak = (element) => {
|
|
276
282
|
let parent = element;
|
|
277
283
|
do {
|
|
278
|
-
if (parent.
|
|
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
|
|
291
|
+
const a9 = (z, newChildren, parent, aH) => {
|
|
286
292
|
let b, i;
|
|
287
293
|
let a;
|
|
288
|
-
if (newChildren !==
|
|
289
|
-
const
|
|
290
|
-
let
|
|
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
|
|
297
|
-
if (
|
|
298
|
-
|
|
302
|
+
const a$ = i - a.index;
|
|
303
|
+
if (a$ === b) {
|
|
304
|
+
s.E++;
|
|
299
305
|
a.index = i;
|
|
300
306
|
}
|
|
301
307
|
else {
|
|
302
|
-
|
|
308
|
+
s = {
|
|
303
309
|
from: a.index,
|
|
304
310
|
to: i,
|
|
305
|
-
|
|
311
|
+
E: 1,
|
|
306
312
|
};
|
|
307
|
-
b =
|
|
308
|
-
a.index = -
|
|
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
|
|
316
|
-
i =
|
|
321
|
+
const an = [];
|
|
322
|
+
i = z.length - 1;
|
|
317
323
|
while (i >= 0) {
|
|
318
|
-
a =
|
|
324
|
+
a = z[i];
|
|
319
325
|
if (a.index < 0) {
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
i -=
|
|
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
|
|
330
|
-
let
|
|
331
|
-
let
|
|
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
|
-
|
|
341
|
-
|
|
342
|
-
|
|
346
|
+
s = am[-a.index - 1];
|
|
347
|
+
aa = s.E;
|
|
348
|
+
O = an[ab];
|
|
343
349
|
a.index = i;
|
|
344
|
-
if (!
|
|
345
|
-
if (
|
|
346
|
-
|
|
347
|
-
i -=
|
|
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 (
|
|
352
|
-
b =
|
|
357
|
+
if (O.from > s.from) {
|
|
358
|
+
b = ab;
|
|
353
359
|
do {
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
} while (
|
|
357
|
-
if (
|
|
358
|
-
i -=
|
|
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
|
-
|
|
366
|
+
ab = b;
|
|
361
367
|
continue;
|
|
362
368
|
}
|
|
363
369
|
}
|
|
364
370
|
}
|
|
365
|
-
b = i -
|
|
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
|
|
389
|
+
class al {
|
|
384
390
|
constructor(id, text) {
|
|
385
391
|
this.id = id;
|
|
386
|
-
this.parent = undefined;
|
|
387
392
|
this.index = 0;
|
|
388
|
-
this.
|
|
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.
|
|
401
|
+
this.firstElement = document.createTextNode(this.ac);
|
|
398
402
|
}
|
|
399
403
|
const { parent, firstElement, index } = this;
|
|
400
404
|
if (this.id) {
|
|
401
|
-
if (!
|
|
402
|
-
|
|
405
|
+
if (!parent) {
|
|
406
|
+
y.delete(this);
|
|
403
407
|
}
|
|
404
|
-
|
|
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
|
|
411
|
-
if (
|
|
412
|
-
|
|
414
|
+
let q = target.currentBefore;
|
|
415
|
+
if (q === undefined) {
|
|
416
|
+
q = target.findNextSiblingElement(index);
|
|
413
417
|
}
|
|
414
|
-
target.element.insertBefore(firstElement,
|
|
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
|
|
420
|
-
if (
|
|
421
|
-
|
|
423
|
+
let q = parent.currentBefore;
|
|
424
|
+
if (q === undefined) {
|
|
425
|
+
q = parent.findNextSiblingElement(index);
|
|
422
426
|
}
|
|
423
|
-
parent.element.insertBefore(firstElement,
|
|
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
|
-
|
|
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.
|
|
447
|
-
this.
|
|
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 (
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
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
|
-
|
|
465
|
-
ae;
|
|
457
|
+
ac;
|
|
466
458
|
}
|
|
467
|
-
export class
|
|
468
|
-
constructor(id, children,
|
|
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.
|
|
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 (!
|
|
497
|
-
|
|
485
|
+
if (!parent) {
|
|
486
|
+
y.delete(this);
|
|
498
487
|
}
|
|
499
|
-
|
|
500
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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(
|
|
530
|
+
update(o, children) {
|
|
552
531
|
if (children) {
|
|
553
|
-
const newChildren =
|
|
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
|
-
|
|
541
|
+
a9(this.d, newChildren, this);
|
|
563
542
|
this.d = newChildren;
|
|
564
543
|
this.newChildren = undefined;
|
|
565
544
|
}
|
|
566
545
|
release(target) {
|
|
567
|
-
if (
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
a
|
|
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.
|
|
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
|
|
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.
|
|
602
|
-
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.
|
|
607
|
-
this.
|
|
580
|
+
this.o = a3;
|
|
581
|
+
this.t = -1;
|
|
608
582
|
if (tag === 'select') {
|
|
609
|
-
const
|
|
610
|
-
const
|
|
611
|
-
const c =
|
|
583
|
+
const ao = this.element;
|
|
584
|
+
const ap = props;
|
|
585
|
+
const c = ap.value;
|
|
612
586
|
if (c) {
|
|
613
|
-
|
|
614
|
-
const
|
|
587
|
+
ap.value = undefined;
|
|
588
|
+
const aL = this.refresh;
|
|
615
589
|
this.refresh = (newChildren) => {
|
|
616
|
-
|
|
590
|
+
a9(this.d, newChildren, this);
|
|
617
591
|
this.d = newChildren;
|
|
618
592
|
this.newChildren = undefined;
|
|
619
593
|
if (Array.isArray(c)) {
|
|
620
|
-
const
|
|
621
|
-
const [e,
|
|
622
|
-
|
|
623
|
-
const _ =
|
|
624
|
-
|
|
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
|
-
|
|
601
|
+
ao.value = c;
|
|
628
602
|
}
|
|
629
|
-
|
|
630
|
-
this.refresh =
|
|
603
|
+
ap.value = c;
|
|
604
|
+
this.refresh = aL;
|
|
631
605
|
};
|
|
632
606
|
}
|
|
633
607
|
}
|
|
634
608
|
this.update(props);
|
|
635
|
-
this.
|
|
609
|
+
this.t = check ?? 0;
|
|
636
610
|
}
|
|
637
611
|
else {
|
|
638
|
-
this.
|
|
639
|
-
this.
|
|
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 (!
|
|
652
|
-
|
|
625
|
+
if (!parent) {
|
|
626
|
+
y.delete(this);
|
|
653
627
|
}
|
|
654
|
-
|
|
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
|
|
663
|
-
if (
|
|
664
|
-
|
|
636
|
+
let q = target.currentBefore;
|
|
637
|
+
if (q === undefined) {
|
|
638
|
+
q = target.findNextSiblingElement(index);
|
|
665
639
|
}
|
|
666
|
-
target.element.insertBefore(element,
|
|
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
|
|
675
|
-
if (
|
|
676
|
-
|
|
648
|
+
let q = parent.currentBefore;
|
|
649
|
+
if (q === undefined) {
|
|
650
|
+
q = parent.findNextSiblingElement(index);
|
|
677
651
|
}
|
|
678
|
-
parent.element.insertBefore(element,
|
|
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
|
-
|
|
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,
|
|
700
|
-
if (
|
|
701
|
-
this.
|
|
702
|
-
let k =
|
|
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 =
|
|
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
|
|
711
|
-
if (!
|
|
674
|
+
const Y = V[key];
|
|
675
|
+
if (!Y) {
|
|
712
676
|
element[key] = c;
|
|
713
677
|
}
|
|
714
678
|
else {
|
|
715
|
-
element.setAttribute(
|
|
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,
|
|
691
|
+
const [e, X, Q] = c;
|
|
728
692
|
if (g) {
|
|
729
|
-
const [aN, aO,
|
|
730
|
-
if (
|
|
731
|
-
element[key] =
|
|
693
|
+
const [aM, aN, aO, aA] = g;
|
|
694
|
+
if (aO !== Q && element[key] !== Q) {
|
|
695
|
+
element[key] = Q;
|
|
732
696
|
}
|
|
733
|
-
if (
|
|
734
|
-
c[3] =
|
|
697
|
+
if (aM === e && aN === X) {
|
|
698
|
+
c[3] = aA;
|
|
735
699
|
}
|
|
736
700
|
else {
|
|
737
|
-
const _ = c[3] = (
|
|
738
|
-
element.removeEventListener('change',
|
|
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] =
|
|
744
|
-
const _ = c[3] = (
|
|
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
|
|
716
|
+
const r = {};
|
|
753
717
|
let k = 0;
|
|
754
718
|
for (const l in c) {
|
|
755
|
-
const
|
|
756
|
-
|
|
719
|
+
const Z = c[l];
|
|
720
|
+
r[l] = Z;
|
|
757
721
|
k++;
|
|
758
|
-
style[l] =
|
|
722
|
+
style[l] = Z;
|
|
759
723
|
}
|
|
760
|
-
props[key] =
|
|
761
|
-
|
|
724
|
+
props[key] = r;
|
|
725
|
+
r.k = k;
|
|
762
726
|
break;
|
|
763
727
|
}
|
|
764
728
|
const style = element.style;
|
|
765
|
-
const
|
|
729
|
+
const r = {};
|
|
766
730
|
let k = 0;
|
|
767
|
-
let
|
|
731
|
+
let H = g.k;
|
|
768
732
|
for (const l in c) {
|
|
769
|
-
const
|
|
770
|
-
|
|
733
|
+
const I = c[l];
|
|
734
|
+
r[l] = I;
|
|
771
735
|
if (l in g) {
|
|
772
|
-
|
|
736
|
+
H--;
|
|
773
737
|
}
|
|
774
738
|
k++;
|
|
775
|
-
if (
|
|
776
|
-
style[l] =
|
|
739
|
+
if (I !== g[key]) {
|
|
740
|
+
style[l] = I;
|
|
777
741
|
}
|
|
778
742
|
}
|
|
779
|
-
props[key] =
|
|
780
|
-
|
|
781
|
-
if (
|
|
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 (!--
|
|
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
|
|
801
|
-
if (!
|
|
764
|
+
const Y = V[key];
|
|
765
|
+
if (!Y) {
|
|
802
766
|
this.element[key] = c;
|
|
803
767
|
}
|
|
804
768
|
else {
|
|
805
|
-
this.element.removeAttribute(
|
|
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 ===
|
|
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 =
|
|
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
|
-
|
|
808
|
+
a9(this.d, newChildren, this);
|
|
845
809
|
this.d = newChildren;
|
|
846
810
|
this.newChildren = undefined;
|
|
847
811
|
}
|
|
848
812
|
release(target) {
|
|
849
|
-
if (
|
|
850
|
-
|
|
851
|
-
|
|
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
|
-
|
|
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
|
-
|
|
876
|
-
this.update = this.
|
|
838
|
+
a5() {
|
|
839
|
+
this.update = this.aP;
|
|
877
840
|
}
|
|
878
|
-
|
|
879
|
-
const { element,
|
|
880
|
-
if (
|
|
881
|
-
this.
|
|
882
|
-
let k =
|
|
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 =
|
|
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
|
|
869
|
+
const r = {};
|
|
907
870
|
let k = 0;
|
|
908
871
|
for (const l in c) {
|
|
909
|
-
const
|
|
910
|
-
|
|
872
|
+
const Z = c[l];
|
|
873
|
+
r[l] = Z;
|
|
911
874
|
k++;
|
|
912
|
-
style[l] =
|
|
875
|
+
style[l] = Z;
|
|
913
876
|
}
|
|
914
|
-
props[key] =
|
|
915
|
-
|
|
877
|
+
props[key] = r;
|
|
878
|
+
r.k = k;
|
|
916
879
|
break;
|
|
917
880
|
}
|
|
918
881
|
const style = element.style;
|
|
919
|
-
const
|
|
882
|
+
const r = {};
|
|
920
883
|
let k = 0;
|
|
921
|
-
let
|
|
884
|
+
let H = g.k;
|
|
922
885
|
for (const l in c) {
|
|
923
|
-
const
|
|
924
|
-
|
|
886
|
+
const I = c[l];
|
|
887
|
+
r[l] = I;
|
|
925
888
|
if (l in g) {
|
|
926
|
-
|
|
889
|
+
H--;
|
|
927
890
|
}
|
|
928
891
|
k++;
|
|
929
|
-
if (
|
|
930
|
-
style[l] =
|
|
892
|
+
if (I !== g[key]) {
|
|
893
|
+
style[l] = I;
|
|
931
894
|
}
|
|
932
895
|
}
|
|
933
|
-
props[key] =
|
|
934
|
-
|
|
935
|
-
if (
|
|
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 (!--
|
|
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
|
|
953
|
-
switch (
|
|
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 =
|
|
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
|
-
|
|
981
|
-
p;
|
|
943
|
+
o;
|
|
982
944
|
d;
|
|
983
|
-
|
|
945
|
+
t;
|
|
984
946
|
}
|
|
985
|
-
export class
|
|
986
|
-
constructor(id,
|
|
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 =
|
|
992
|
-
this.
|
|
993
|
-
this.
|
|
994
|
-
this.
|
|
995
|
-
this.
|
|
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 (!
|
|
1018
|
-
|
|
975
|
+
if (!parent) {
|
|
976
|
+
y.delete(this);
|
|
1019
977
|
}
|
|
1020
|
-
|
|
1021
|
-
|
|
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
|
-
|
|
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 {
|
|
1053
|
-
this.
|
|
1000
|
+
const { o, d, t } = this;
|
|
1001
|
+
this.o = props;
|
|
1054
1002
|
if (children) {
|
|
1055
|
-
const newChildren =
|
|
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 &&
|
|
1062
|
-
let k =
|
|
1063
|
-
for (const key in
|
|
1064
|
-
if (
|
|
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
|
|
1078
|
-
|
|
1079
|
-
let
|
|
1080
|
-
if (
|
|
1081
|
-
switch (typeof
|
|
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
|
-
|
|
1033
|
+
u = '' + u;
|
|
1086
1034
|
case 'string':
|
|
1087
|
-
|
|
1088
|
-
this.j =
|
|
1089
|
-
|
|
1090
|
-
|
|
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 (
|
|
1095
|
-
this.j =
|
|
1096
|
-
|
|
1097
|
-
|
|
1042
|
+
if (u) {
|
|
1043
|
+
this.j = u;
|
|
1044
|
+
u.index = index;
|
|
1045
|
+
u.attachTo(parent);
|
|
1098
1046
|
j?.detachFrom(parent);
|
|
1099
|
-
if (!
|
|
1100
|
-
|
|
1101
|
-
if (!
|
|
1102
|
-
return
|
|
1047
|
+
if (!a4.ae()) {
|
|
1048
|
+
a4.af((a0, com) => {
|
|
1049
|
+
if (!a0.startsWith(id)) {
|
|
1050
|
+
return R;
|
|
1103
1051
|
}
|
|
1104
|
-
if (com.parent &&
|
|
1105
|
-
|
|
1106
|
-
return
|
|
1052
|
+
if (com.parent && ak(com.parent)) {
|
|
1053
|
+
G.A(a0, com);
|
|
1054
|
+
return S;
|
|
1107
1055
|
}
|
|
1108
|
-
return
|
|
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
|
-
|
|
1078
|
+
p = aR;
|
|
1131
1079
|
}
|
|
1132
1080
|
release(target) {
|
|
1133
|
-
if (
|
|
1134
|
-
this.j?.
|
|
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
|
-
|
|
1085
|
+
a4.delete(this.id);
|
|
1140
1086
|
}
|
|
1141
|
-
|
|
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(
|
|
1152
|
-
const
|
|
1153
|
-
|
|
1097
|
+
watchMountChange(aS, _, B) {
|
|
1098
|
+
const a7 = ax(this.parent, this.id);
|
|
1099
|
+
ag.A(a7 + aS, { _, B }, true);
|
|
1154
1100
|
}
|
|
1155
|
-
|
|
1156
|
-
|
|
1157
|
-
p;
|
|
1101
|
+
aC;
|
|
1102
|
+
o;
|
|
1158
1103
|
d;
|
|
1159
|
-
|
|
1104
|
+
t;
|
|
1160
1105
|
j;
|
|
1161
1106
|
}
|
|
1162
|
-
class
|
|
1107
|
+
class ah {
|
|
1163
1108
|
constructor(id, rootElement) {
|
|
1164
1109
|
this.id = id;
|
|
1165
1110
|
this.element = rootElement;
|
|
1166
|
-
this.
|
|
1111
|
+
this.parent = this;
|
|
1167
1112
|
}
|
|
1168
1113
|
id;
|
|
1169
1114
|
element;
|
|
1170
1115
|
parent;
|
|
1171
1116
|
currentBefore;
|
|
1172
|
-
findNextSiblingElement(
|
|
1117
|
+
findNextSiblingElement(aY) {
|
|
1173
1118
|
return null;
|
|
1174
1119
|
}
|
|
1175
1120
|
render(entry) {
|
|
1176
|
-
if (!this.
|
|
1177
|
-
this.
|
|
1178
|
-
|
|
1179
|
-
this.
|
|
1180
|
-
|
|
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
|
-
|
|
1128
|
+
ad;
|
|
1184
1129
|
}
|
|
1185
1130
|
export const addComReader = (readerRecord, key) => {
|
|
1186
|
-
if (
|
|
1187
|
-
let
|
|
1188
|
-
if (!
|
|
1189
|
-
|
|
1190
|
-
readerRecord[key] =
|
|
1131
|
+
if (p.id) {
|
|
1132
|
+
let F = readerRecord[key];
|
|
1133
|
+
if (!F) {
|
|
1134
|
+
F = new Map();
|
|
1135
|
+
readerRecord[key] = F;
|
|
1191
1136
|
}
|
|
1192
|
-
|
|
1137
|
+
F.set(p.id, p.version);
|
|
1193
1138
|
}
|
|
1194
1139
|
};
|
|
1195
1140
|
export let refreshComReaders = (readerRecord, key) => {
|
|
1196
|
-
const
|
|
1197
|
-
if (
|
|
1198
|
-
for (const [
|
|
1199
|
-
const com =
|
|
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 (
|
|
1202
|
-
queueMicrotask(
|
|
1146
|
+
if (G.ae()) {
|
|
1147
|
+
queueMicrotask(aG);
|
|
1203
1148
|
}
|
|
1204
|
-
|
|
1149
|
+
G.A(a0, com);
|
|
1205
1150
|
}
|
|
1206
1151
|
}
|
|
1207
|
-
|
|
1152
|
+
F.clear();
|
|
1208
1153
|
}
|
|
1209
1154
|
};
|
|
1210
|
-
export const
|
|
1155
|
+
export const aD = (replace) => refreshComReaders = replace;
|
|
1211
1156
|
export const configGC = (waitIntervals, interval = 20000) => {
|
|
1212
1157
|
if (waitIntervals >= 0 && interval >= 1000) {
|
|
1213
|
-
|
|
1214
|
-
if (
|
|
1215
|
-
clearTimeout(
|
|
1158
|
+
ai = interval;
|
|
1159
|
+
if (J) {
|
|
1160
|
+
clearTimeout(K);
|
|
1216
1161
|
}
|
|
1217
1162
|
if (waitIntervals) {
|
|
1218
|
-
|
|
1163
|
+
K = setTimeout(aj, ai);
|
|
1219
1164
|
}
|
|
1220
|
-
else if (
|
|
1221
|
-
|
|
1222
|
-
for (let b = 0; b <
|
|
1223
|
-
|
|
1165
|
+
else if (K) {
|
|
1166
|
+
K = undefined;
|
|
1167
|
+
for (let b = 0; b < J; b++) {
|
|
1168
|
+
aj();
|
|
1224
1169
|
}
|
|
1225
1170
|
}
|
|
1226
|
-
|
|
1171
|
+
J = waitIntervals;
|
|
1227
1172
|
return true;
|
|
1228
1173
|
}
|
|
1229
1174
|
return false;
|
|
1230
1175
|
};
|
|
1231
|
-
const
|
|
1232
|
-
|
|
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 = (
|
|
1238
|
-
const
|
|
1239
|
-
|
|
1240
|
-
|
|
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 = `${
|
|
1244
|
-
let element =
|
|
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
|
-
|
|
1192
|
+
G.A(m, element);
|
|
1248
1193
|
}
|
|
1249
1194
|
return element;
|
|
1250
1195
|
}
|
|
1251
|
-
element = new
|
|
1252
|
-
|
|
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 = `${
|
|
1257
|
-
let element =
|
|
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
|
-
|
|
1205
|
+
G.A(m, element);
|
|
1261
1206
|
}
|
|
1262
1207
|
return element;
|
|
1263
1208
|
}
|
|
1264
|
-
element = new
|
|
1265
|
-
|
|
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 = `${
|
|
1270
|
-
let element =
|
|
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
|
-
|
|
1218
|
+
G.A(m, element);
|
|
1274
1219
|
}
|
|
1275
1220
|
return element;
|
|
1276
1221
|
}
|
|
1277
|
-
element = new
|
|
1278
|
-
|
|
1222
|
+
element = new aI(m, children, mutableChild);
|
|
1223
|
+
n.set(m, element);
|
|
1279
1224
|
return element;
|
|
1280
1225
|
};
|
|
1281
1226
|
$ezh.$k = (key) => {
|
|
1282
|
-
|
|
1283
|
-
|
|
1284
|
-
return
|
|
1227
|
+
at.push(D);
|
|
1228
|
+
D = `${D || '{'}${key}}`;
|
|
1229
|
+
return aT;
|
|
1285
1230
|
};
|
|
1286
1231
|
$ezh.$n = (ns) => {
|
|
1287
|
-
const
|
|
1288
|
-
|
|
1232
|
+
const aU = a6;
|
|
1233
|
+
a6 = aw[ns];
|
|
1289
1234
|
return () => {
|
|
1290
|
-
|
|
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 = `${
|
|
1299
|
-
let element =
|
|
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
|
|
1307
|
-
|
|
1251
|
+
element = new al(m, text);
|
|
1252
|
+
n.set(element.id, element);
|
|
1308
1253
|
return element;
|
|
1309
1254
|
};
|
|
1310
1255
|
})($ezh || ($ezh = {}));
|