jaxs 0.9.2 → 0.9.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/jaxs.d.ts +41 -28
- package/dist/jaxs.js +382 -351
- package/dist/jaxs.umd.cjs +311 -298
- package/package.json +1 -1
package/dist/jaxs.js
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
const
|
|
1
|
+
const M = (e, t) => {
|
|
2
2
|
for (let s = e.length - 1; s >= 0; s--) e[s] === t && e.splice(s, 1)
|
|
3
3
|
return e
|
|
4
4
|
},
|
|
5
|
-
|
|
5
|
+
k = (e, t) => {
|
|
6
6
|
for (let s = e.length - 1; s >= 0; s--) t(e[s]) && e.splice(s, 1)
|
|
7
7
|
return e
|
|
8
8
|
},
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
remove:
|
|
13
|
-
removeBy:
|
|
14
|
-
insertAt:
|
|
15
|
-
appendIfUnique:
|
|
9
|
+
$ = (e, t, s) => (e.splice(t, 0, s), e),
|
|
10
|
+
B = (e, t) => (e.includes(t) || e.push(t), e),
|
|
11
|
+
Le = {
|
|
12
|
+
remove: M,
|
|
13
|
+
removeBy: k,
|
|
14
|
+
insertAt: $,
|
|
15
|
+
appendIfUnique: B,
|
|
16
16
|
push: (e, t) => e.push(t),
|
|
17
17
|
// mutates
|
|
18
18
|
pop: (e) => e.pop(),
|
|
@@ -26,7 +26,7 @@ const O = (e, t) => {
|
|
|
26
26
|
includes: (e, t) => e.includes(t),
|
|
27
27
|
// reader
|
|
28
28
|
}
|
|
29
|
-
class
|
|
29
|
+
class lt {
|
|
30
30
|
constructor(t) {
|
|
31
31
|
this.store = t
|
|
32
32
|
}
|
|
@@ -56,8 +56,8 @@ class ct {
|
|
|
56
56
|
return this.value === !1
|
|
57
57
|
}
|
|
58
58
|
}
|
|
59
|
-
const f = (e) => new
|
|
60
|
-
|
|
59
|
+
const f = (e) => new lt(e),
|
|
60
|
+
ze = {
|
|
61
61
|
toggle: (e) => f(e).toggle(),
|
|
62
62
|
setTrue: (e) => f(e).setTrue(),
|
|
63
63
|
setFalse: (e) => f(e).setFalse(),
|
|
@@ -102,14 +102,14 @@ class ht {
|
|
|
102
102
|
}
|
|
103
103
|
insertAt(t, s) {
|
|
104
104
|
const r = this.value
|
|
105
|
-
|
|
105
|
+
$(r, t, s), this.update(r)
|
|
106
106
|
}
|
|
107
107
|
remove(t) {
|
|
108
|
-
const s =
|
|
108
|
+
const s = M(this.value, t)
|
|
109
109
|
this.update(s)
|
|
110
110
|
}
|
|
111
111
|
removeBy(t) {
|
|
112
|
-
const s =
|
|
112
|
+
const s = k(this.value, t)
|
|
113
113
|
this.update(s)
|
|
114
114
|
}
|
|
115
115
|
includes(t) {
|
|
@@ -117,11 +117,19 @@ class ht {
|
|
|
117
117
|
}
|
|
118
118
|
appendIfUnique(t) {
|
|
119
119
|
const s = this.value
|
|
120
|
-
|
|
120
|
+
B(s, t), this.update(s)
|
|
121
|
+
}
|
|
122
|
+
findBy(t) {
|
|
123
|
+
return this.value.find(t)
|
|
124
|
+
}
|
|
125
|
+
replace(t, s) {
|
|
126
|
+
const r = this.value,
|
|
127
|
+
n = r.indexOf(t)
|
|
128
|
+
n !== -1 && ((r[n] = s), this.update(r))
|
|
121
129
|
}
|
|
122
130
|
}
|
|
123
131
|
const m = (e) => new ht(e),
|
|
124
|
-
|
|
132
|
+
Ke = {
|
|
125
133
|
push: (e, t) => m(e).push(t),
|
|
126
134
|
pop: (e) => m(e).pop(),
|
|
127
135
|
unshift: (e, t) => m(e).unshift(t),
|
|
@@ -133,8 +141,10 @@ const m = (e) => new ht(e),
|
|
|
133
141
|
reset: (e) => m(e).reset(),
|
|
134
142
|
includes: (e, t) => m(e).includes(t),
|
|
135
143
|
appendIfUnique: (e, t) => m(e).appendIfUnique(t),
|
|
144
|
+
findBy: (e, t) => m(e).findBy(t),
|
|
145
|
+
replace: (e, t, s) => m(e).replace(t, s),
|
|
136
146
|
}
|
|
137
|
-
class
|
|
147
|
+
class pt {
|
|
138
148
|
constructor(t) {
|
|
139
149
|
this.store = t
|
|
140
150
|
}
|
|
@@ -173,8 +183,8 @@ class lt {
|
|
|
173
183
|
return !!this.value[t]
|
|
174
184
|
}
|
|
175
185
|
}
|
|
176
|
-
const b = (e) => new
|
|
177
|
-
|
|
186
|
+
const b = (e) => new pt(e),
|
|
187
|
+
Re = {
|
|
178
188
|
reset: (e) => b(e).reset(),
|
|
179
189
|
resetAttribute: (e, t) => b(e).resetAttribute(t),
|
|
180
190
|
updateAttribute: (e, t, s) => b(e).updateAttribute(t, s),
|
|
@@ -182,19 +192,19 @@ const b = (e) => new lt(e),
|
|
|
182
192
|
attributeTruthy: (e, t) => b(e).attributeTruthy(t),
|
|
183
193
|
},
|
|
184
194
|
dt = (e) => typeof e == 'boolean',
|
|
185
|
-
|
|
195
|
+
mt = (e) => typeof e == 'number',
|
|
186
196
|
D = (e) => typeof e == 'string',
|
|
187
197
|
v = (e) => Array.isArray(e),
|
|
188
198
|
g = (e) => e !== null && !v(e) && typeof e == 'object',
|
|
189
|
-
|
|
199
|
+
Ue = {
|
|
190
200
|
boolean: dt,
|
|
191
|
-
number:
|
|
201
|
+
number: mt,
|
|
192
202
|
string: D,
|
|
193
203
|
array: v,
|
|
194
204
|
object: g,
|
|
195
205
|
},
|
|
196
|
-
|
|
197
|
-
|
|
206
|
+
ft = (e, t) => t.createElement(e),
|
|
207
|
+
bt = (e, t) => {
|
|
198
208
|
for (const s in t) {
|
|
199
209
|
if (s === '__self') continue
|
|
200
210
|
const r = t[s].toString()
|
|
@@ -205,26 +215,26 @@ const b = (e) => new lt(e),
|
|
|
205
215
|
D(r) && r.trim() === '' ? e.removeAttribute(s) : e.setAttribute(s, r)
|
|
206
216
|
}
|
|
207
217
|
},
|
|
208
|
-
|
|
218
|
+
vt = (e, t, s) => {
|
|
209
219
|
const r = {}
|
|
210
220
|
for (const n in t) {
|
|
211
221
|
const i = t[n],
|
|
212
|
-
|
|
213
|
-
e.addEventListener(n,
|
|
222
|
+
o = (a) => s(i, a)
|
|
223
|
+
e.addEventListener(n, o),
|
|
214
224
|
(r[n] = {
|
|
215
225
|
domEvent: n,
|
|
216
226
|
busEvent: i,
|
|
217
|
-
listener:
|
|
227
|
+
listener: o,
|
|
218
228
|
})
|
|
219
229
|
}
|
|
220
230
|
e.eventMaps = r
|
|
221
231
|
},
|
|
222
|
-
|
|
223
|
-
const n =
|
|
224
|
-
return
|
|
232
|
+
yt = (e, t, s, r) => {
|
|
233
|
+
const n = ft(e, r.document)
|
|
234
|
+
return bt(n, t), vt(n, s, r.publish), n
|
|
225
235
|
},
|
|
226
236
|
w = 'http://www.w3.org/2000/svg',
|
|
227
|
-
|
|
237
|
+
gt = {
|
|
228
238
|
animate: !0,
|
|
229
239
|
animateMotion: !0,
|
|
230
240
|
animateTransform: !0,
|
|
@@ -288,8 +298,8 @@ const b = (e) => new lt(e),
|
|
|
288
298
|
use: !0,
|
|
289
299
|
view: !0,
|
|
290
300
|
},
|
|
291
|
-
|
|
292
|
-
|
|
301
|
+
Et = (e, t) => !!(gt[e] || (e === 'a' && t === w)),
|
|
302
|
+
At = (e, t, s) => {
|
|
293
303
|
const r = s.createElementNS(w, e)
|
|
294
304
|
for (const n in t)
|
|
295
305
|
n === '__self' ||
|
|
@@ -297,34 +307,34 @@ const b = (e) => new lt(e),
|
|
|
297
307
|
r.setAttributeNS(null, n, t[n].toString())
|
|
298
308
|
return r
|
|
299
309
|
},
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
class
|
|
310
|
+
xt = (e) => e.namespaceURI === w,
|
|
311
|
+
wt = (e, t) => t.createTextNode(e)
|
|
312
|
+
class Nt {
|
|
303
313
|
constructor(t) {
|
|
304
314
|
this.value = t.toString()
|
|
305
315
|
}
|
|
306
316
|
render(t) {
|
|
307
|
-
const s =
|
|
317
|
+
const s = wt(this.value, t.document)
|
|
308
318
|
return (s.__jsx = 'TextNode'), [s]
|
|
309
319
|
}
|
|
310
320
|
}
|
|
311
|
-
const
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
P = (e) =>
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
321
|
+
const _t = (e) => typeof e == 'string' || typeof e == 'number',
|
|
322
|
+
St = (e) => new Nt(e),
|
|
323
|
+
Tt = (e) => (_t(e) ? St(e) : e),
|
|
324
|
+
P = (e) => jt(e).map(Tt).flat(),
|
|
325
|
+
jt = (e) => (Array.isArray(e) ? e.flat() : e ? [e] : []),
|
|
326
|
+
F = (e, t = {}) => P(e || t.children || []),
|
|
327
|
+
Ot = (e, t = '') => {
|
|
318
328
|
const s = {},
|
|
319
329
|
r = {}
|
|
320
330
|
for (const n in e) {
|
|
321
331
|
const i = e[n]
|
|
322
332
|
if (n.match(/^on.+/i)) {
|
|
323
|
-
const
|
|
324
|
-
r[
|
|
333
|
+
const o = n.slice(2).toLowerCase()
|
|
334
|
+
r[o] = i ? i.toString() : ''
|
|
325
335
|
} else {
|
|
326
336
|
if (i === !1) continue
|
|
327
|
-
n === '__source' ? (s.__source = e.__source) : (s[n] =
|
|
337
|
+
n === '__source' ? (s.__source = e.__source) : (s[n] = Mt(n, i, t))
|
|
328
338
|
}
|
|
329
339
|
}
|
|
330
340
|
return {
|
|
@@ -332,20 +342,20 @@ const Nt = (e) => typeof e == 'string' || typeof e == 'number',
|
|
|
332
342
|
events: r,
|
|
333
343
|
}
|
|
334
344
|
},
|
|
335
|
-
|
|
336
|
-
|
|
345
|
+
Mt = (e, t, s = '') => (t == null ? s : t.toString()),
|
|
346
|
+
kt = (e, t) => {
|
|
337
347
|
const s = e || {},
|
|
338
|
-
r =
|
|
348
|
+
r = F(t, s)
|
|
339
349
|
return (s.children = s.children || r), s
|
|
340
350
|
},
|
|
341
|
-
|
|
342
|
-
|
|
351
|
+
V = (e, t, s, r = []) => e.reduce($t(t, s), r).flat(),
|
|
352
|
+
$t = (e, t) => (s, r) =>
|
|
343
353
|
r
|
|
344
354
|
? Array.isArray(r)
|
|
345
|
-
?
|
|
355
|
+
? V(r, e, t, s)
|
|
346
356
|
: (r.render(e, t).forEach((n) => s.push(n)), s)
|
|
347
357
|
: s
|
|
348
|
-
class
|
|
358
|
+
class L {
|
|
349
359
|
constructor(t) {
|
|
350
360
|
this.collection = P(t)
|
|
351
361
|
}
|
|
@@ -355,7 +365,7 @@ class V {
|
|
|
355
365
|
return this.attachToParent(r), r
|
|
356
366
|
}
|
|
357
367
|
generateDom(t) {
|
|
358
|
-
return
|
|
368
|
+
return V(this.collection, t, this.parentElement)
|
|
359
369
|
}
|
|
360
370
|
attachToParent(t) {
|
|
361
371
|
if (this.parentElement === void 0) return
|
|
@@ -363,7 +373,7 @@ class V {
|
|
|
363
373
|
t.forEach((r) => s.appendChild(r))
|
|
364
374
|
}
|
|
365
375
|
}
|
|
366
|
-
class
|
|
376
|
+
class Bt {
|
|
367
377
|
constructor(t, s) {
|
|
368
378
|
;(this.type = t), (this.attributes = s)
|
|
369
379
|
}
|
|
@@ -392,11 +402,11 @@ class $t {
|
|
|
392
402
|
class Dt {
|
|
393
403
|
constructor(t, s, r = []) {
|
|
394
404
|
this.type = t
|
|
395
|
-
const { events: n, attributes: i } =
|
|
405
|
+
const { events: n, attributes: i } = Ot(s)
|
|
396
406
|
;(this.events = n),
|
|
397
407
|
(this.attributes = i),
|
|
398
|
-
(this.isSvg =
|
|
399
|
-
(this.children = new
|
|
408
|
+
(this.isSvg = Et(this.type, this.attributes.xmlns)),
|
|
409
|
+
(this.children = new L(r))
|
|
400
410
|
}
|
|
401
411
|
render(t) {
|
|
402
412
|
const s = this.generateDom(t)
|
|
@@ -406,24 +416,24 @@ class Dt {
|
|
|
406
416
|
return this.isSvg ? this.generateSvgDom(t) : this.generateHtmlDom(t)
|
|
407
417
|
}
|
|
408
418
|
generateHtmlDom(t) {
|
|
409
|
-
const s =
|
|
419
|
+
const s = yt(this.type, this.attributes, this.events, t)
|
|
410
420
|
return (s.__jsx = this.jsxKey()), s
|
|
411
421
|
}
|
|
412
422
|
generateSvgDom(t) {
|
|
413
|
-
const s =
|
|
423
|
+
const s = At(this.type, this.attributes, t.document)
|
|
414
424
|
return (s.__jsx = this.jsxKey()), s
|
|
415
425
|
}
|
|
416
426
|
jsxKey() {
|
|
417
|
-
return new
|
|
427
|
+
return new Bt(this.type, this.attributes).generate()
|
|
418
428
|
}
|
|
419
429
|
}
|
|
420
430
|
const Pt = (e, t, ...s) =>
|
|
421
|
-
typeof e == 'string' ? new Dt(e, t, s) : e(
|
|
431
|
+
typeof e == 'string' ? new Dt(e, t, s) : e(kt(t, s))
|
|
422
432
|
Pt.fragment = (e, t) => {
|
|
423
|
-
const s =
|
|
424
|
-
return new
|
|
433
|
+
const s = F(t, e)
|
|
434
|
+
return new L(s)
|
|
425
435
|
}
|
|
426
|
-
class
|
|
436
|
+
class Ft {
|
|
427
437
|
constructor(t, s, r) {
|
|
428
438
|
;(this.template = t),
|
|
429
439
|
(this.selector = s),
|
|
@@ -448,49 +458,49 @@ class Bt {
|
|
|
448
458
|
return this.renderKit.document.querySelector(this.selector)
|
|
449
459
|
}
|
|
450
460
|
}
|
|
451
|
-
const
|
|
452
|
-
const r = new
|
|
461
|
+
const Vt = (e, t, s) => {
|
|
462
|
+
const r = new Ft(e, t, s)
|
|
453
463
|
return r.renderAndAttach(s), r
|
|
454
464
|
},
|
|
455
|
-
|
|
456
|
-
|
|
465
|
+
z = 'go-to-href',
|
|
466
|
+
K = 'go-to',
|
|
457
467
|
y = 'navigation:location-change',
|
|
458
|
-
|
|
459
|
-
|
|
468
|
+
R = 'navigation:route-change',
|
|
469
|
+
Lt = /* @__PURE__ */ Object.freeze(
|
|
460
470
|
/* @__PURE__ */ Object.defineProperty(
|
|
461
471
|
{
|
|
462
472
|
__proto__: null,
|
|
463
|
-
linkNavigationEvent:
|
|
473
|
+
linkNavigationEvent: z,
|
|
464
474
|
locationChangeEvent: y,
|
|
465
|
-
navigationEvent:
|
|
466
|
-
routeChangeEvent:
|
|
475
|
+
navigationEvent: K,
|
|
476
|
+
routeChangeEvent: R,
|
|
467
477
|
},
|
|
468
478
|
Symbol.toStringTag,
|
|
469
479
|
{ value: 'Module' },
|
|
470
480
|
),
|
|
471
481
|
),
|
|
472
|
-
|
|
482
|
+
U = (e) => {
|
|
473
483
|
e.create('route', {
|
|
474
484
|
host: '',
|
|
475
485
|
path: '',
|
|
476
486
|
query: {},
|
|
477
487
|
})
|
|
478
488
|
},
|
|
479
|
-
|
|
489
|
+
q = (e) => {
|
|
480
490
|
const t = e.closest('[href]')
|
|
481
491
|
return (t && t.getAttribute('href')) || ''
|
|
482
492
|
},
|
|
483
493
|
N = ({ payload: e, publish: t, window: s }) => {
|
|
484
494
|
s.history.pushState(null, '', e), t(y, null)
|
|
485
495
|
},
|
|
486
|
-
|
|
496
|
+
I = (e) => {
|
|
487
497
|
const t = e.payload
|
|
488
498
|
if (!t || !t.target) return
|
|
489
499
|
t.preventDefault()
|
|
490
|
-
const s =
|
|
500
|
+
const s = q(t.target)
|
|
491
501
|
N({ ...e, payload: s })
|
|
492
502
|
},
|
|
493
|
-
|
|
503
|
+
J = (e) =>
|
|
494
504
|
e
|
|
495
505
|
.replace(/^\?/, '')
|
|
496
506
|
.split('&')
|
|
@@ -499,86 +509,86 @@ const Ft = (e, t, s) => {
|
|
|
499
509
|
const r = s.split('=')
|
|
500
510
|
return (t[r[0]] = r[1]), t
|
|
501
511
|
}, {}),
|
|
502
|
-
|
|
512
|
+
H = (e) => {
|
|
503
513
|
const { state: t, publish: s, window: r } = e,
|
|
504
|
-
{ host: n, pathname: i, search:
|
|
505
|
-
|
|
506
|
-
u =
|
|
507
|
-
|
|
514
|
+
{ host: n, pathname: i, search: o } = r.location,
|
|
515
|
+
a = i,
|
|
516
|
+
u = J(o),
|
|
517
|
+
h = {
|
|
508
518
|
host: n,
|
|
509
|
-
path:
|
|
519
|
+
path: a,
|
|
510
520
|
query: u,
|
|
511
521
|
}
|
|
512
|
-
t.store('route').update(
|
|
522
|
+
t.store('route').update(h), s(R, h)
|
|
513
523
|
},
|
|
514
524
|
G = (e) => {
|
|
515
525
|
const { subscribe: t } = e
|
|
516
|
-
t(
|
|
517
|
-
t(
|
|
526
|
+
t(z, I),
|
|
527
|
+
t(K, (s) => {
|
|
518
528
|
N(s)
|
|
519
529
|
})
|
|
520
530
|
},
|
|
521
|
-
|
|
531
|
+
W = (e) => {
|
|
522
532
|
const { publish: t, subscribe: s, state: r, window: n } = e
|
|
523
|
-
|
|
533
|
+
U(r), n.addEventListener('popstate', () => t(y, null)), s(y, H)
|
|
524
534
|
},
|
|
525
535
|
C = (e) => {
|
|
526
536
|
setTimeout(() => e.publish(y, null), 0)
|
|
527
537
|
},
|
|
528
538
|
Q = (e) => {
|
|
529
|
-
|
|
539
|
+
W(e), G(e), C(e)
|
|
530
540
|
},
|
|
531
|
-
|
|
541
|
+
zt = /* @__PURE__ */ Object.freeze(
|
|
532
542
|
/* @__PURE__ */ Object.defineProperty(
|
|
533
543
|
{
|
|
534
544
|
__proto__: null,
|
|
535
545
|
publishLocation: C,
|
|
536
546
|
startNavigation: Q,
|
|
537
|
-
subscribeToHistoryChange:
|
|
547
|
+
subscribeToHistoryChange: W,
|
|
538
548
|
subscribeToNavigation: G,
|
|
539
549
|
},
|
|
540
550
|
Symbol.toStringTag,
|
|
541
551
|
{ value: 'Module' },
|
|
542
552
|
),
|
|
543
553
|
)
|
|
544
|
-
class
|
|
554
|
+
class X {
|
|
545
555
|
constructor({
|
|
546
556
|
window: t,
|
|
547
557
|
document: s,
|
|
548
558
|
publish: r,
|
|
549
559
|
subscribe: n,
|
|
550
560
|
bus: i,
|
|
551
|
-
state:
|
|
552
|
-
renderKit:
|
|
561
|
+
state: o,
|
|
562
|
+
renderKit: a,
|
|
553
563
|
}) {
|
|
554
564
|
;(this.window = t),
|
|
555
565
|
(this.document = s),
|
|
556
566
|
(this.publish = r),
|
|
557
567
|
(this.subscribe = n),
|
|
558
568
|
(this.bus = i),
|
|
559
|
-
(this.state =
|
|
560
|
-
(this.renderKit =
|
|
569
|
+
(this.state = o),
|
|
570
|
+
(this.renderKit = a),
|
|
561
571
|
(this.roots = [])
|
|
562
572
|
}
|
|
563
573
|
render(t, s) {
|
|
564
|
-
const r =
|
|
574
|
+
const r = Vt(t, s, this.renderKit)
|
|
565
575
|
return this.roots.push(r), r
|
|
566
576
|
}
|
|
567
577
|
startNavigation() {
|
|
568
578
|
Q(this)
|
|
569
579
|
}
|
|
570
580
|
}
|
|
571
|
-
const
|
|
581
|
+
const qe = /* @__PURE__ */ Object.freeze(
|
|
572
582
|
/* @__PURE__ */ Object.defineProperty(
|
|
573
583
|
{
|
|
574
584
|
__proto__: null,
|
|
575
|
-
App:
|
|
585
|
+
App: X,
|
|
576
586
|
},
|
|
577
587
|
Symbol.toStringTag,
|
|
578
588
|
{ value: 'Module' },
|
|
579
589
|
),
|
|
580
590
|
)
|
|
581
|
-
class
|
|
591
|
+
class Y {
|
|
582
592
|
constructor() {
|
|
583
593
|
this.lookup = {}
|
|
584
594
|
}
|
|
@@ -605,7 +615,7 @@ class X {
|
|
|
605
615
|
this.lookup[t] || (this.lookup[t] = [])
|
|
606
616
|
}
|
|
607
617
|
}
|
|
608
|
-
class
|
|
618
|
+
class Z {
|
|
609
619
|
constructor() {
|
|
610
620
|
this.lookup = []
|
|
611
621
|
}
|
|
@@ -624,7 +634,7 @@ class Y {
|
|
|
624
634
|
return this.lookup.filter((s) => s.matcher.test(t))
|
|
625
635
|
}
|
|
626
636
|
}
|
|
627
|
-
class
|
|
637
|
+
class _ {
|
|
628
638
|
constructor({ publish: t, event: s, payload: r, timer: n }) {
|
|
629
639
|
;(this.setNewTimeout = () => {
|
|
630
640
|
this.stopped ||
|
|
@@ -661,26 +671,42 @@ class zt {
|
|
|
661
671
|
((this.callCount += 1), this.publish(this.event, this.payload))
|
|
662
672
|
}
|
|
663
673
|
}
|
|
664
|
-
const Kt = (e) => {
|
|
665
|
-
const { offset:
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
674
|
+
const Kt = (e) => (t, s) => {
|
|
675
|
+
const { offset: r, period: n, payload: i } = s,
|
|
676
|
+
o = ({ callCount: u }) => (r && u == 0 ? r : n),
|
|
677
|
+
a = new _({
|
|
678
|
+
payload: i,
|
|
679
|
+
event: t,
|
|
680
|
+
publish: e,
|
|
681
|
+
timer: o,
|
|
682
|
+
})
|
|
683
|
+
return a.start(), a.stop
|
|
673
684
|
},
|
|
674
|
-
Rt =
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
685
|
+
Rt =
|
|
686
|
+
(e) =>
|
|
687
|
+
(t, { timeout: s, payload: r }) => {
|
|
688
|
+
const n = ({ callCount: o, stop: a }) => (o > 1 && a(), s),
|
|
689
|
+
i = new _({
|
|
690
|
+
publish: e,
|
|
691
|
+
event: t,
|
|
692
|
+
payload: r,
|
|
693
|
+
timer: n,
|
|
694
|
+
})
|
|
695
|
+
return i.start(), i.stop
|
|
696
|
+
},
|
|
697
|
+
Ut = (e) => (t, s) => {
|
|
698
|
+
const r = {
|
|
699
|
+
...s,
|
|
700
|
+
event: t,
|
|
701
|
+
publish: e,
|
|
702
|
+
},
|
|
703
|
+
n = new _(r)
|
|
704
|
+
return n.start(), n.stop
|
|
679
705
|
}
|
|
680
|
-
class
|
|
706
|
+
class tt {
|
|
681
707
|
constructor() {
|
|
682
|
-
;(this.exactSubscriptions = new
|
|
683
|
-
(this.fuzzySubscriptions = new
|
|
708
|
+
;(this.exactSubscriptions = new Y()),
|
|
709
|
+
(this.fuzzySubscriptions = new Z()),
|
|
684
710
|
(this.currentIndex = 0)
|
|
685
711
|
}
|
|
686
712
|
subscribe(t, s) {
|
|
@@ -715,49 +741,54 @@ class Z {
|
|
|
715
741
|
}
|
|
716
742
|
}
|
|
717
743
|
}
|
|
718
|
-
const
|
|
719
|
-
const e = new
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
744
|
+
const et = () => {
|
|
745
|
+
const e = new tt(),
|
|
746
|
+
t = (r, n) => e.publish(r, n)
|
|
747
|
+
return (
|
|
748
|
+
(t.withTimeout = Rt(t)),
|
|
749
|
+
(t.periodically = Kt(t)),
|
|
750
|
+
(t.periodicallyWithCustomTimer = Ut(t)),
|
|
751
|
+
{
|
|
752
|
+
bus: e,
|
|
753
|
+
publish: t,
|
|
754
|
+
subscribe: (r, n) => e.subscribe(r, n),
|
|
755
|
+
}
|
|
756
|
+
)
|
|
725
757
|
},
|
|
726
|
-
|
|
758
|
+
Ie = /* @__PURE__ */ Object.freeze(
|
|
727
759
|
/* @__PURE__ */ Object.defineProperty(
|
|
728
760
|
{
|
|
729
761
|
__proto__: null,
|
|
730
|
-
ExactSubscriptions:
|
|
731
|
-
FuzzySubscriptions:
|
|
732
|
-
JaxsBus:
|
|
733
|
-
createBus:
|
|
734
|
-
publishPeriodically: Rt,
|
|
762
|
+
ExactSubscriptions: Y,
|
|
763
|
+
FuzzySubscriptions: Z,
|
|
764
|
+
JaxsBus: tt,
|
|
765
|
+
createBus: et,
|
|
735
766
|
},
|
|
736
767
|
Symbol.toStringTag,
|
|
737
768
|
{ value: 'Module' },
|
|
738
769
|
),
|
|
739
770
|
),
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
!(g(e) && g(t)) || !
|
|
771
|
+
qt = (e, t) => e === t,
|
|
772
|
+
It = (e, t) => Object.keys(e).length === Object.keys(t).length,
|
|
773
|
+
st = (e, t) =>
|
|
774
|
+
!(g(e) && g(t)) || !It(e, t)
|
|
744
775
|
? !1
|
|
745
776
|
: Object.keys(e).every((s) => {
|
|
746
777
|
const r = e[s],
|
|
747
778
|
n = t[s]
|
|
748
779
|
return E(r, n)
|
|
749
780
|
}),
|
|
750
|
-
|
|
781
|
+
rt = (e, t) =>
|
|
751
782
|
!(v(e) && v(t)) || e.length !== t.length
|
|
752
783
|
? !1
|
|
753
784
|
: e.every((s, r) => {
|
|
754
785
|
const n = t[r]
|
|
755
786
|
return E(s, n)
|
|
756
787
|
}),
|
|
757
|
-
E = (e, t) => (g(e) ?
|
|
758
|
-
|
|
759
|
-
objects:
|
|
760
|
-
arrays:
|
|
788
|
+
E = (e, t) => (g(e) ? st(e, t) : v(e) ? rt(e, t) : qt(e, t)),
|
|
789
|
+
Je = {
|
|
790
|
+
objects: st,
|
|
791
|
+
arrays: rt,
|
|
761
792
|
equal: E,
|
|
762
793
|
}
|
|
763
794
|
class x {
|
|
@@ -789,12 +820,12 @@ class x {
|
|
|
789
820
|
return t(this.value)
|
|
790
821
|
}
|
|
791
822
|
}
|
|
792
|
-
const
|
|
793
|
-
class
|
|
823
|
+
const S = 'state'
|
|
824
|
+
class nt {
|
|
794
825
|
constructor(t) {
|
|
795
826
|
;(this.publisher = t),
|
|
796
827
|
(this.stores = {}),
|
|
797
|
-
(this.eventNamePrefix =
|
|
828
|
+
(this.eventNamePrefix = S),
|
|
798
829
|
(this.notifications = /* @__PURE__ */ new Set()),
|
|
799
830
|
(this.inTransaction = !1)
|
|
800
831
|
}
|
|
@@ -850,21 +881,21 @@ class rt {
|
|
|
850
881
|
return `${this.eventNamePrefix}:${t}`
|
|
851
882
|
}
|
|
852
883
|
}
|
|
853
|
-
const
|
|
854
|
-
|
|
884
|
+
const it = (e) => new nt(e),
|
|
885
|
+
He = /* @__PURE__ */ Object.freeze(
|
|
855
886
|
/* @__PURE__ */ Object.defineProperty(
|
|
856
887
|
{
|
|
857
888
|
__proto__: null,
|
|
858
|
-
State:
|
|
889
|
+
State: nt,
|
|
859
890
|
Store: x,
|
|
860
|
-
createState:
|
|
861
|
-
eventName:
|
|
891
|
+
createState: it,
|
|
892
|
+
eventName: S,
|
|
862
893
|
},
|
|
863
894
|
Symbol.toStringTag,
|
|
864
895
|
{ value: 'Module' },
|
|
865
896
|
),
|
|
866
897
|
)
|
|
867
|
-
class
|
|
898
|
+
class Jt {
|
|
868
899
|
constructor(t) {
|
|
869
900
|
this.setupDomEnvironment(t)
|
|
870
901
|
}
|
|
@@ -874,7 +905,7 @@ class It {
|
|
|
874
905
|
this.setupState(),
|
|
875
906
|
this.addBusOptions(),
|
|
876
907
|
this.setRenderKit(),
|
|
877
|
-
new
|
|
908
|
+
new X({
|
|
878
909
|
window: this.window,
|
|
879
910
|
document: this.document,
|
|
880
911
|
publish: this.publish,
|
|
@@ -893,11 +924,11 @@ class It {
|
|
|
893
924
|
: ((this.window = window), (this.document = document))
|
|
894
925
|
}
|
|
895
926
|
setupBus() {
|
|
896
|
-
const { publish: t, subscribe: s, bus: r } =
|
|
927
|
+
const { publish: t, subscribe: s, bus: r } = et()
|
|
897
928
|
;(this.publish = t), (this.subscribe = s), (this.bus = r)
|
|
898
929
|
}
|
|
899
930
|
setupState() {
|
|
900
|
-
this.state =
|
|
931
|
+
this.state = it(this.publish)
|
|
901
932
|
}
|
|
902
933
|
addBusOptions() {
|
|
903
934
|
this.bus.addListenerOptions({
|
|
@@ -917,10 +948,10 @@ class It {
|
|
|
917
948
|
}
|
|
918
949
|
}
|
|
919
950
|
const Ge = (e = {}) => {
|
|
920
|
-
const s = new
|
|
951
|
+
const s = new Jt(e).setup()
|
|
921
952
|
return s.startNavigation(), s
|
|
922
953
|
}
|
|
923
|
-
var
|
|
954
|
+
var c = /* @__PURE__ */ ((e) => (
|
|
924
955
|
(e[(e.removeNode = 0)] = 'removeNode'),
|
|
925
956
|
(e[(e.insertNode = 1)] = 'insertNode'),
|
|
926
957
|
(e[(e.replaceNode = 2)] = 'replaceNode'),
|
|
@@ -933,88 +964,88 @@ var o = /* @__PURE__ */ ((e) => (
|
|
|
933
964
|
(e[(e.changeValue = 9)] = 'changeValue'),
|
|
934
965
|
(e[(e.changeText = 10)] = 'changeText'),
|
|
935
966
|
e
|
|
936
|
-
))(
|
|
937
|
-
const
|
|
967
|
+
))(c || {})
|
|
968
|
+
const We = /* @__PURE__ */ Object.freeze(
|
|
938
969
|
/* @__PURE__ */ Object.defineProperty(
|
|
939
970
|
{
|
|
940
971
|
__proto__: null,
|
|
941
|
-
ChangeInstructionTypes:
|
|
972
|
+
ChangeInstructionTypes: c,
|
|
942
973
|
},
|
|
943
974
|
Symbol.toStringTag,
|
|
944
975
|
{ value: 'Module' },
|
|
945
976
|
),
|
|
946
977
|
),
|
|
947
|
-
|
|
978
|
+
Ht = (e, t) => ({
|
|
948
979
|
source: e,
|
|
949
980
|
target: t,
|
|
950
|
-
type:
|
|
981
|
+
type: c.changeText,
|
|
951
982
|
data: {},
|
|
952
983
|
}),
|
|
953
984
|
Gt = (e, t) => ({
|
|
954
985
|
source: e,
|
|
955
986
|
target: t,
|
|
956
|
-
type:
|
|
987
|
+
type: c.replaceNode,
|
|
957
988
|
data: {},
|
|
958
989
|
}),
|
|
959
|
-
|
|
990
|
+
Wt = (e, t, s) => ({
|
|
960
991
|
source: e,
|
|
961
992
|
target: t,
|
|
962
993
|
data: s,
|
|
963
|
-
type:
|
|
994
|
+
type: c.removeAttribute,
|
|
964
995
|
}),
|
|
965
996
|
Ct = (e, t, s) => ({
|
|
966
997
|
source: e,
|
|
967
998
|
target: t,
|
|
968
999
|
data: s,
|
|
969
|
-
type:
|
|
1000
|
+
type: c.addAttribute,
|
|
970
1001
|
}),
|
|
971
1002
|
Qt = (e, t, s) => ({
|
|
972
1003
|
source: e,
|
|
973
1004
|
target: t,
|
|
974
1005
|
data: s,
|
|
975
|
-
type:
|
|
1006
|
+
type: c.updateAttribute,
|
|
976
1007
|
}),
|
|
977
|
-
|
|
1008
|
+
Xt = (e, t, s) => ({
|
|
978
1009
|
source: e,
|
|
979
1010
|
target: t,
|
|
980
1011
|
data: s,
|
|
981
|
-
type:
|
|
1012
|
+
type: c.removeEvent,
|
|
982
1013
|
}),
|
|
983
|
-
|
|
1014
|
+
Yt = (e, t, s) => ({
|
|
984
1015
|
source: e,
|
|
985
1016
|
target: t,
|
|
986
1017
|
data: s,
|
|
987
|
-
type:
|
|
1018
|
+
type: c.addEvent,
|
|
988
1019
|
}),
|
|
989
|
-
|
|
1020
|
+
Zt = (e, t, s) => ({
|
|
990
1021
|
source: e,
|
|
991
1022
|
target: t,
|
|
992
1023
|
data: s,
|
|
993
|
-
type:
|
|
1024
|
+
type: c.updateEvent,
|
|
994
1025
|
}),
|
|
995
|
-
|
|
1026
|
+
T = (e) => ({
|
|
996
1027
|
source: e,
|
|
997
1028
|
target: e,
|
|
998
1029
|
// for type crap only
|
|
999
|
-
type:
|
|
1030
|
+
type: c.removeNode,
|
|
1000
1031
|
data: {},
|
|
1001
1032
|
}),
|
|
1002
1033
|
A = (e, t) => ({
|
|
1003
1034
|
target: e,
|
|
1004
1035
|
source: e,
|
|
1005
1036
|
// for type crap only
|
|
1006
|
-
type:
|
|
1037
|
+
type: c.insertNode,
|
|
1007
1038
|
data: t,
|
|
1008
1039
|
}),
|
|
1009
|
-
|
|
1040
|
+
te = (e, t, s) => ({
|
|
1010
1041
|
source: e,
|
|
1011
1042
|
target: t,
|
|
1012
|
-
type:
|
|
1043
|
+
type: c.changeValue,
|
|
1013
1044
|
data: s,
|
|
1014
1045
|
}),
|
|
1015
|
-
|
|
1016
|
-
|
|
1017
|
-
class
|
|
1046
|
+
ee = (e, t) => (e.type > t.type ? 1 : e.type < t.type ? -1 : 0),
|
|
1047
|
+
j = { index: -1 }
|
|
1048
|
+
class se {
|
|
1018
1049
|
constructor() {
|
|
1019
1050
|
this.map = {}
|
|
1020
1051
|
}
|
|
@@ -1031,7 +1062,7 @@ class ee {
|
|
|
1031
1062
|
}
|
|
1032
1063
|
pullMatch(t) {
|
|
1033
1064
|
const s = t && t.__jsx
|
|
1034
|
-
return !s || !(this.map[s] && this.map[s].length) ?
|
|
1065
|
+
return !s || !(this.map[s] && this.map[s].length) ? j : this.map[s].shift()
|
|
1035
1066
|
}
|
|
1036
1067
|
clear(t) {
|
|
1037
1068
|
const s = t && t.__jsx
|
|
@@ -1047,56 +1078,56 @@ class ee {
|
|
|
1047
1078
|
return Object.values(this.map).flat()
|
|
1048
1079
|
}
|
|
1049
1080
|
}
|
|
1050
|
-
const
|
|
1051
|
-
const t = new
|
|
1081
|
+
const O = (e) => {
|
|
1082
|
+
const t = new se()
|
|
1052
1083
|
return t.populate(e), t
|
|
1053
1084
|
},
|
|
1054
|
-
|
|
1085
|
+
ot = (e, t, s = !1) => {
|
|
1055
1086
|
const r = [],
|
|
1056
1087
|
n = e.attributes,
|
|
1057
1088
|
i = n.length,
|
|
1058
|
-
|
|
1059
|
-
|
|
1060
|
-
let u,
|
|
1089
|
+
o = t.attributes,
|
|
1090
|
+
a = o.length
|
|
1091
|
+
let u, h, p
|
|
1061
1092
|
for (u = 0; u < i; u++) {
|
|
1062
|
-
|
|
1063
|
-
const
|
|
1064
|
-
if (
|
|
1065
|
-
for (
|
|
1066
|
-
const
|
|
1067
|
-
if (
|
|
1068
|
-
|
|
1093
|
+
p = null
|
|
1094
|
+
const l = n.item(u)
|
|
1095
|
+
if (l) {
|
|
1096
|
+
for (h = 0; h < a; h++) {
|
|
1097
|
+
const d = o.item(h)
|
|
1098
|
+
if (d && l.name == d.name) {
|
|
1099
|
+
p = d
|
|
1069
1100
|
break
|
|
1070
1101
|
}
|
|
1071
1102
|
}
|
|
1072
|
-
|
|
1073
|
-
?
|
|
1103
|
+
p
|
|
1104
|
+
? l.value !== p.value &&
|
|
1074
1105
|
r.push(
|
|
1075
1106
|
Qt(e, t, {
|
|
1076
|
-
name:
|
|
1077
|
-
value:
|
|
1107
|
+
name: l.name,
|
|
1108
|
+
value: p.value,
|
|
1078
1109
|
isSvg: s,
|
|
1079
1110
|
}),
|
|
1080
1111
|
)
|
|
1081
|
-
: r.push(
|
|
1112
|
+
: r.push(Wt(e, t, { name: l.name, isSvg: s }))
|
|
1082
1113
|
}
|
|
1083
1114
|
}
|
|
1084
|
-
for (u = 0; u <
|
|
1085
|
-
|
|
1086
|
-
const
|
|
1087
|
-
if (
|
|
1088
|
-
for (
|
|
1089
|
-
const
|
|
1090
|
-
if (
|
|
1091
|
-
|
|
1115
|
+
for (u = 0; u < a; u++) {
|
|
1116
|
+
p = null
|
|
1117
|
+
const l = o.item(u)
|
|
1118
|
+
if (l) {
|
|
1119
|
+
for (h = 0; h < i; h++) {
|
|
1120
|
+
const d = n.item(h)
|
|
1121
|
+
if (d && d.name == l.name) {
|
|
1122
|
+
p = d
|
|
1092
1123
|
break
|
|
1093
1124
|
}
|
|
1094
1125
|
}
|
|
1095
|
-
|
|
1126
|
+
p ||
|
|
1096
1127
|
r.push(
|
|
1097
1128
|
Ct(e, t, {
|
|
1098
|
-
name:
|
|
1099
|
-
value:
|
|
1129
|
+
name: l.name,
|
|
1130
|
+
value: l.value,
|
|
1100
1131
|
isSvg: s,
|
|
1101
1132
|
}),
|
|
1102
1133
|
)
|
|
@@ -1104,127 +1135,127 @@ const j = (e) => {
|
|
|
1104
1135
|
}
|
|
1105
1136
|
return r
|
|
1106
1137
|
},
|
|
1107
|
-
|
|
1138
|
+
re = (e, t) => {
|
|
1108
1139
|
const s = [],
|
|
1109
1140
|
r = e.eventMaps,
|
|
1110
1141
|
n = t.eventMaps,
|
|
1111
1142
|
i = Object.keys(r),
|
|
1112
|
-
|
|
1143
|
+
o = Object.keys(n)
|
|
1113
1144
|
return (
|
|
1114
|
-
i.forEach((
|
|
1115
|
-
const u = r[
|
|
1116
|
-
|
|
1117
|
-
|
|
1118
|
-
?
|
|
1145
|
+
i.forEach((a) => {
|
|
1146
|
+
const u = r[a],
|
|
1147
|
+
h = n[a]
|
|
1148
|
+
h
|
|
1149
|
+
? h.busEvent !== u.busEvent &&
|
|
1119
1150
|
s.push(
|
|
1120
|
-
|
|
1121
|
-
name:
|
|
1122
|
-
targetValue:
|
|
1151
|
+
Zt(e, t, {
|
|
1152
|
+
name: a,
|
|
1153
|
+
targetValue: h.listener,
|
|
1123
1154
|
sourceValue: u.listener,
|
|
1124
1155
|
}),
|
|
1125
1156
|
)
|
|
1126
1157
|
: s.push(
|
|
1127
|
-
|
|
1158
|
+
Xt(e, t, {
|
|
1128
1159
|
name: u.domEvent,
|
|
1129
1160
|
value: u.listener,
|
|
1130
1161
|
}),
|
|
1131
1162
|
)
|
|
1132
1163
|
}),
|
|
1133
|
-
|
|
1134
|
-
const u = r[
|
|
1135
|
-
|
|
1164
|
+
o.forEach((a) => {
|
|
1165
|
+
const u = r[a],
|
|
1166
|
+
h = n[a]
|
|
1136
1167
|
u ||
|
|
1137
1168
|
s.push(
|
|
1138
|
-
|
|
1139
|
-
name:
|
|
1140
|
-
value:
|
|
1169
|
+
Yt(e, t, {
|
|
1170
|
+
name: h.domEvent,
|
|
1171
|
+
value: h.listener,
|
|
1141
1172
|
}),
|
|
1142
1173
|
)
|
|
1143
1174
|
}),
|
|
1144
1175
|
s
|
|
1145
1176
|
)
|
|
1146
1177
|
},
|
|
1147
|
-
|
|
1148
|
-
|
|
1149
|
-
|
|
1150
|
-
if (
|
|
1178
|
+
ne = (e) => e.tagName !== 'INPUT',
|
|
1179
|
+
ie = (e, t) => e.value === t.value,
|
|
1180
|
+
oe = (e, t) => {
|
|
1181
|
+
if (ne(e) || ie(e, t)) return []
|
|
1151
1182
|
const s = e,
|
|
1152
1183
|
r = t
|
|
1153
|
-
return [
|
|
1184
|
+
return [te(s, r, { name: 'value', value: r.value })]
|
|
1154
1185
|
},
|
|
1155
|
-
|
|
1156
|
-
const s =
|
|
1157
|
-
r =
|
|
1158
|
-
n =
|
|
1186
|
+
ue = (e, t) => {
|
|
1187
|
+
const s = ot(e, t),
|
|
1188
|
+
r = re(e, t),
|
|
1189
|
+
n = oe(e, t)
|
|
1159
1190
|
return s.concat(r).concat(n)
|
|
1160
1191
|
},
|
|
1161
|
-
|
|
1162
|
-
|
|
1163
|
-
|
|
1192
|
+
ae = (e, t) => ot(e, t, !0),
|
|
1193
|
+
ce = (e, t) => (e.textContent !== t.textContent ? [Ht(e, t)] : []),
|
|
1194
|
+
le = (e, t, s) => {
|
|
1164
1195
|
let r = []
|
|
1165
|
-
if (e.nodeType === 1 &&
|
|
1196
|
+
if (e.nodeType === 1 && xt(e)) {
|
|
1166
1197
|
const n = e,
|
|
1167
1198
|
i = t,
|
|
1168
|
-
|
|
1169
|
-
|
|
1170
|
-
r =
|
|
1199
|
+
o = ae(n, i),
|
|
1200
|
+
a = s(n.childNodes, i.childNodes, n)
|
|
1201
|
+
r = o.concat(a)
|
|
1171
1202
|
} else if (e.nodeType === 1) {
|
|
1172
1203
|
const n = e,
|
|
1173
1204
|
i = t,
|
|
1174
|
-
|
|
1175
|
-
|
|
1176
|
-
r =
|
|
1177
|
-
} else e.nodeType === 3 && (r =
|
|
1205
|
+
o = ue(n, i),
|
|
1206
|
+
a = s(n.childNodes, i.childNodes, n)
|
|
1207
|
+
r = o.concat(a)
|
|
1208
|
+
} else e.nodeType === 3 && (r = ce(e, t))
|
|
1178
1209
|
return r
|
|
1179
1210
|
},
|
|
1180
|
-
|
|
1211
|
+
ut = (e, t, s) => {
|
|
1181
1212
|
const r = [],
|
|
1182
1213
|
n = he(e, t),
|
|
1183
|
-
i =
|
|
1184
|
-
|
|
1185
|
-
|
|
1214
|
+
i = O(e),
|
|
1215
|
+
o = O(t),
|
|
1216
|
+
a = []
|
|
1186
1217
|
let u = 0
|
|
1187
1218
|
for (; u < n; u++) {
|
|
1188
|
-
const
|
|
1189
|
-
|
|
1190
|
-
if (
|
|
1191
|
-
const
|
|
1192
|
-
|
|
1193
|
-
|
|
1194
|
-
? (
|
|
1219
|
+
const p = e[u],
|
|
1220
|
+
l = t[u]
|
|
1221
|
+
if (l && o.check(l)) {
|
|
1222
|
+
const d = i.pullMatch(l)
|
|
1223
|
+
o.clear(l),
|
|
1224
|
+
d.element
|
|
1225
|
+
? (d.index !== u &&
|
|
1195
1226
|
r.push(
|
|
1196
|
-
A(
|
|
1227
|
+
A(d.element, {
|
|
1197
1228
|
parent: s,
|
|
1198
1229
|
index: u,
|
|
1199
1230
|
}),
|
|
1200
1231
|
),
|
|
1201
|
-
|
|
1202
|
-
source:
|
|
1203
|
-
target:
|
|
1232
|
+
a.push({
|
|
1233
|
+
source: d.element,
|
|
1234
|
+
target: l,
|
|
1204
1235
|
}))
|
|
1205
|
-
:
|
|
1206
|
-
?
|
|
1207
|
-
? r.push(A(
|
|
1208
|
-
: (i.clear(
|
|
1209
|
-
: r.push(A(
|
|
1210
|
-
} else
|
|
1236
|
+
: p
|
|
1237
|
+
? o.check(p)
|
|
1238
|
+
? r.push(A(l, { parent: s, index: u }))
|
|
1239
|
+
: (i.clear(p), r.push(Gt(p, l)))
|
|
1240
|
+
: r.push(A(l, { parent: s, index: u }))
|
|
1241
|
+
} else p && i.pullMatch(p).element && r.push(T(p))
|
|
1211
1242
|
}
|
|
1212
|
-
i.remaining().forEach(({ element:
|
|
1213
|
-
r.push(
|
|
1243
|
+
i.remaining().forEach(({ element: p }) => {
|
|
1244
|
+
r.push(T(p))
|
|
1214
1245
|
})
|
|
1215
|
-
const
|
|
1216
|
-
(
|
|
1246
|
+
const h = a.reduce(
|
|
1247
|
+
(p, { source: l, target: d }) => p.concat(le(l, d, ut)),
|
|
1217
1248
|
[],
|
|
1218
1249
|
)
|
|
1219
|
-
return r.concat(
|
|
1250
|
+
return r.concat(h).sort(ee)
|
|
1220
1251
|
},
|
|
1221
1252
|
he = (e, t) => {
|
|
1222
1253
|
const s = e.length,
|
|
1223
1254
|
r = t.length
|
|
1224
1255
|
return s > r ? s : r
|
|
1225
1256
|
},
|
|
1226
|
-
|
|
1227
|
-
const r =
|
|
1257
|
+
pe = (e, t, s) => {
|
|
1258
|
+
const r = ut(e, t, s)
|
|
1228
1259
|
return (
|
|
1229
1260
|
r.forEach((n) => {
|
|
1230
1261
|
de(n)
|
|
@@ -1233,112 +1264,112 @@ const j = (e) => {
|
|
|
1233
1264
|
)
|
|
1234
1265
|
},
|
|
1235
1266
|
de = (e) => {
|
|
1236
|
-
;(
|
|
1267
|
+
;(_e[e.type] || me)(e)
|
|
1237
1268
|
},
|
|
1238
|
-
|
|
1239
|
-
|
|
1269
|
+
me = (e) => {},
|
|
1270
|
+
fe = (e) => {
|
|
1240
1271
|
const { source: t, target: s } = e
|
|
1241
1272
|
t.nodeValue = s.textContent
|
|
1242
1273
|
},
|
|
1243
|
-
|
|
1274
|
+
be = (e) => {
|
|
1244
1275
|
const { source: t } = e
|
|
1245
1276
|
t.remove()
|
|
1246
1277
|
},
|
|
1247
|
-
|
|
1278
|
+
ve = (e) => {
|
|
1248
1279
|
const { target: t, data: s } = e,
|
|
1249
1280
|
{ parent: r, index: n } = s,
|
|
1250
1281
|
i = r.childNodes[n]
|
|
1251
1282
|
i ? i && i !== t && r.insertBefore(t, i) : r.appendChild(t)
|
|
1252
1283
|
},
|
|
1253
|
-
|
|
1284
|
+
ye = (e) => {
|
|
1254
1285
|
const { source: t, target: s } = e
|
|
1255
1286
|
t.replaceWith(s)
|
|
1256
1287
|
},
|
|
1257
|
-
|
|
1288
|
+
ge = (e) => {
|
|
1258
1289
|
const { source: t, data: s } = e,
|
|
1259
1290
|
{ name: r, isSvg: n } = s
|
|
1260
1291
|
n ? t.removeAttributeNS(null, r) : t.removeAttribute(r)
|
|
1261
1292
|
},
|
|
1262
|
-
|
|
1293
|
+
at = (e) => {
|
|
1263
1294
|
const { source: t, data: s } = e,
|
|
1264
1295
|
{ name: r, value: n, isSvg: i } = s
|
|
1265
1296
|
i ? t.setAttributeNS(null, r, n) : t.setAttribute(r, n)
|
|
1266
1297
|
},
|
|
1267
|
-
ge = (e) => {
|
|
1268
|
-
ut(e)
|
|
1269
|
-
},
|
|
1270
1298
|
Ee = (e) => {
|
|
1299
|
+
at(e)
|
|
1300
|
+
},
|
|
1301
|
+
Ae = (e) => {
|
|
1271
1302
|
const t = e.data,
|
|
1272
1303
|
s = e.source,
|
|
1273
1304
|
{ name: r, value: n } = t
|
|
1274
1305
|
s.removeEventListener(r, n)
|
|
1275
1306
|
},
|
|
1276
|
-
|
|
1307
|
+
xe = (e) => {
|
|
1277
1308
|
const t = e.data,
|
|
1278
1309
|
s = e.source,
|
|
1279
1310
|
{ name: r, value: n } = t
|
|
1280
1311
|
s.addEventListener(r, n)
|
|
1281
1312
|
},
|
|
1282
|
-
|
|
1313
|
+
we = (e) => {
|
|
1283
1314
|
const t = e.data,
|
|
1284
1315
|
s = e.source,
|
|
1285
1316
|
{ name: r, sourceValue: n, targetValue: i } = t
|
|
1286
1317
|
s.removeEventListener(r, n), s.addEventListener(r, i)
|
|
1287
1318
|
},
|
|
1288
|
-
|
|
1319
|
+
Ne = (e) => {
|
|
1289
1320
|
const t = e.data,
|
|
1290
1321
|
s = e.source,
|
|
1291
1322
|
{ value: r } = t
|
|
1292
1323
|
s.value = r
|
|
1293
1324
|
},
|
|
1294
|
-
|
|
1295
|
-
[
|
|
1296
|
-
[
|
|
1297
|
-
[
|
|
1298
|
-
[
|
|
1299
|
-
[
|
|
1300
|
-
[
|
|
1301
|
-
[
|
|
1302
|
-
[
|
|
1303
|
-
[
|
|
1304
|
-
[
|
|
1305
|
-
[
|
|
1325
|
+
_e = {
|
|
1326
|
+
[c.changeText]: fe,
|
|
1327
|
+
[c.removeNode]: be,
|
|
1328
|
+
[c.insertNode]: ve,
|
|
1329
|
+
[c.replaceNode]: ye,
|
|
1330
|
+
[c.removeAttribute]: ge,
|
|
1331
|
+
[c.addAttribute]: at,
|
|
1332
|
+
[c.updateAttribute]: Ee,
|
|
1333
|
+
[c.removeEvent]: Ae,
|
|
1334
|
+
[c.addEvent]: xe,
|
|
1335
|
+
[c.updateEvent]: we,
|
|
1336
|
+
[c.changeValue]: Ne,
|
|
1306
1337
|
},
|
|
1307
|
-
|
|
1338
|
+
Se = (e, t, s) => {
|
|
1308
1339
|
const r = [...t]
|
|
1309
1340
|
return (
|
|
1310
1341
|
e.forEach((n) => {
|
|
1311
|
-
|
|
1342
|
+
Te(n, r, s)
|
|
1312
1343
|
}),
|
|
1313
1344
|
r
|
|
1314
1345
|
)
|
|
1315
1346
|
},
|
|
1316
|
-
|
|
1317
|
-
const r =
|
|
1347
|
+
Te = (e, t, s) => {
|
|
1348
|
+
const r = ke[e.type]
|
|
1318
1349
|
r && r(e, t, s)
|
|
1319
1350
|
},
|
|
1320
|
-
|
|
1351
|
+
je = (e, t) => {
|
|
1321
1352
|
const { source: s } = e,
|
|
1322
1353
|
r = t.indexOf(s)
|
|
1323
1354
|
r >= 0 && t.splice(r, 1)
|
|
1324
1355
|
},
|
|
1325
|
-
|
|
1356
|
+
Oe = (e, t, s) => {
|
|
1326
1357
|
const { target: r } = e,
|
|
1327
1358
|
n = e.data,
|
|
1328
|
-
{ index: i, parent:
|
|
1329
|
-
s ===
|
|
1359
|
+
{ index: i, parent: o } = n
|
|
1360
|
+
s === o && t.splice(i, 0, r)
|
|
1330
1361
|
},
|
|
1331
|
-
|
|
1362
|
+
Me = (e, t) => {
|
|
1332
1363
|
const { target: s, source: r } = e,
|
|
1333
1364
|
n = t.indexOf(r)
|
|
1334
1365
|
n >= 0 && (t[n] = s)
|
|
1335
1366
|
},
|
|
1336
|
-
|
|
1337
|
-
[
|
|
1338
|
-
[
|
|
1339
|
-
[
|
|
1367
|
+
ke = {
|
|
1368
|
+
[c.removeNode]: je,
|
|
1369
|
+
[c.insertNode]: Oe,
|
|
1370
|
+
[c.replaceNode]: Me,
|
|
1340
1371
|
}
|
|
1341
|
-
class
|
|
1372
|
+
class $e {
|
|
1342
1373
|
constructor({ Template: t, subscriptions: s, attributes: r, viewModel: n }) {
|
|
1343
1374
|
;(this.Template = t),
|
|
1344
1375
|
(this.viewModel = n),
|
|
@@ -1370,8 +1401,8 @@ class ke {
|
|
|
1370
1401
|
this.parentElement = r
|
|
1371
1402
|
}
|
|
1372
1403
|
const t = this.generateDom(this.renderKit),
|
|
1373
|
-
s =
|
|
1374
|
-
this.dom =
|
|
1404
|
+
s = pe(this.dom, t, this.parentElement)
|
|
1405
|
+
this.dom = Se(s, this.dom, this.parentElement)
|
|
1375
1406
|
}
|
|
1376
1407
|
subscribeForRerender() {
|
|
1377
1408
|
const { subscribe: t } = this.renderKit
|
|
@@ -1380,22 +1411,22 @@ class ke {
|
|
|
1380
1411
|
})
|
|
1381
1412
|
}
|
|
1382
1413
|
eventName(t) {
|
|
1383
|
-
return `${
|
|
1414
|
+
return `${S}:${t}`
|
|
1384
1415
|
}
|
|
1385
1416
|
}
|
|
1386
|
-
const
|
|
1417
|
+
const Be = (e) => e,
|
|
1387
1418
|
De = ({ Template: e, viewModel: t, subscriptions: s }) => (
|
|
1388
1419
|
(s = s || []),
|
|
1389
|
-
(t = t ||
|
|
1420
|
+
(t = t || Be),
|
|
1390
1421
|
(r) =>
|
|
1391
|
-
new
|
|
1422
|
+
new $e({ Template: e, viewModel: t, subscriptions: s, attributes: r })
|
|
1392
1423
|
),
|
|
1393
1424
|
Pe =
|
|
1394
1425
|
(e) =>
|
|
1395
1426
|
({ path: t }) =>
|
|
1396
1427
|
t === e,
|
|
1397
|
-
|
|
1398
|
-
|
|
1428
|
+
Fe = () => !0,
|
|
1429
|
+
ct =
|
|
1399
1430
|
(e) =>
|
|
1400
1431
|
({ route: t }) => {
|
|
1401
1432
|
const s = e.find((r) => r.match(t))
|
|
@@ -1405,56 +1436,56 @@ const $e = (e) => e,
|
|
|
1405
1436
|
/* @__PURE__ */ Object.defineProperty(
|
|
1406
1437
|
{
|
|
1407
1438
|
__proto__: null,
|
|
1408
|
-
buildRouter:
|
|
1409
|
-
catchAll:
|
|
1439
|
+
buildRouter: ct,
|
|
1440
|
+
catchAll: Fe,
|
|
1410
1441
|
exactPathMatch: Pe,
|
|
1411
1442
|
},
|
|
1412
1443
|
Symbol.toStringTag,
|
|
1413
1444
|
{ value: 'Module' },
|
|
1414
1445
|
),
|
|
1415
1446
|
),
|
|
1416
|
-
|
|
1447
|
+
Ve = () => ({
|
|
1417
1448
|
render: (e, t) => [],
|
|
1418
1449
|
}),
|
|
1419
1450
|
Qe = (e) => {
|
|
1420
|
-
const t =
|
|
1451
|
+
const t = ct(e)
|
|
1421
1452
|
return De({
|
|
1422
|
-
Template: ({ route: r }) => (t({ route: r }) ||
|
|
1453
|
+
Template: ({ route: r }) => (t({ route: r }) || Ve)(),
|
|
1423
1454
|
subscriptions: ['route'],
|
|
1424
1455
|
})
|
|
1425
1456
|
},
|
|
1426
|
-
|
|
1457
|
+
Xe = /* @__PURE__ */ Object.freeze(
|
|
1427
1458
|
/* @__PURE__ */ Object.defineProperty(
|
|
1428
1459
|
{
|
|
1429
1460
|
__proto__: null,
|
|
1430
|
-
createRouteState:
|
|
1431
|
-
events:
|
|
1432
|
-
extractQueryParams:
|
|
1433
|
-
findHref:
|
|
1461
|
+
createRouteState: U,
|
|
1462
|
+
events: Lt,
|
|
1463
|
+
extractQueryParams: J,
|
|
1464
|
+
findHref: q,
|
|
1434
1465
|
navigate: N,
|
|
1435
|
-
onLinkClick:
|
|
1436
|
-
onLocationChange:
|
|
1437
|
-
start:
|
|
1466
|
+
onLinkClick: I,
|
|
1467
|
+
onLocationChange: H,
|
|
1468
|
+
start: zt,
|
|
1438
1469
|
},
|
|
1439
1470
|
Symbol.toStringTag,
|
|
1440
1471
|
{ value: 'Module' },
|
|
1441
1472
|
),
|
|
1442
1473
|
)
|
|
1443
1474
|
export {
|
|
1444
|
-
|
|
1445
|
-
|
|
1446
|
-
|
|
1447
|
-
|
|
1448
|
-
|
|
1449
|
-
|
|
1450
|
-
|
|
1451
|
-
|
|
1475
|
+
Le as ArrayModifiers,
|
|
1476
|
+
ze as BooleanStore,
|
|
1477
|
+
Je as Equality,
|
|
1478
|
+
Ue as Is,
|
|
1479
|
+
We as JaxsTypes,
|
|
1480
|
+
Ke as ListStore,
|
|
1481
|
+
Re as RecordStore,
|
|
1482
|
+
qe as appBuilding,
|
|
1452
1483
|
De as bind,
|
|
1453
1484
|
Ge as createApp,
|
|
1454
1485
|
Pt as jsx,
|
|
1455
|
-
|
|
1456
|
-
|
|
1486
|
+
Ie as messageBus,
|
|
1487
|
+
Xe as navigation,
|
|
1457
1488
|
Qe as routedView,
|
|
1458
1489
|
Ce as routing,
|
|
1459
|
-
|
|
1490
|
+
He as state,
|
|
1460
1491
|
}
|