jaxs 0.8.0 → 0.9.1

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.js CHANGED
@@ -1,8 +1,182 @@
1
- const tt = (e) => typeof e == 'string',
2
- f = (e) => Array.isArray(e),
3
- v = (e) => e !== null && !f(e) && typeof e == 'object',
4
- et = (e, t) => t.createElement(e),
5
- st = (e, t) => {
1
+ const O = (e, t) => e.reduce((s, r) => (r !== t && s.push(r), s), []),
2
+ M = (e, t) => e.reduce((s, r) => (t(r) || s.push(r), s), []),
3
+ k = (e, t, s) => (e.splice(t, 0, s), e),
4
+ $ = (e, t) => (e.includes(t) || e.push(t), e),
5
+ Ve = {
6
+ remove: O,
7
+ removeBy: M,
8
+ insertAt: k,
9
+ appendIfUnique: $,
10
+ }
11
+ class ct {
12
+ constructor(t) {
13
+ this.store = t
14
+ }
15
+ update(t) {
16
+ this.store.update(t)
17
+ }
18
+ get value() {
19
+ return this.store.value
20
+ }
21
+ reset() {
22
+ this.store.update(this.store.initialValue)
23
+ }
24
+ toggle() {
25
+ const t = !this.value
26
+ this.update(t)
27
+ }
28
+ setTrue() {
29
+ this.update(!0)
30
+ }
31
+ setFalse() {
32
+ this.update(!1)
33
+ }
34
+ isTrue() {
35
+ return this.value === !0
36
+ }
37
+ isFalse() {
38
+ return this.value === !1
39
+ }
40
+ }
41
+ const f = (e) => new ct(e),
42
+ Le = {
43
+ toggle: (e) => f(e).toggle(),
44
+ setTrue: (e) => f(e).setTrue(),
45
+ setFalse: (e) => f(e).setFalse(),
46
+ reset: (e) => f(e).reset(),
47
+ isTrue: (e) => f(e).isTrue(),
48
+ isFalse: (e) => f(e).isFalse(),
49
+ }
50
+ class lt {
51
+ constructor(t) {
52
+ this.store = t
53
+ }
54
+ update(t) {
55
+ this.store.update(t)
56
+ }
57
+ get value() {
58
+ return this.store.value
59
+ }
60
+ reset() {
61
+ this.store.update(this.store.initialValue)
62
+ }
63
+ push(t) {
64
+ const s = this.value
65
+ s.push(t), this.update(s)
66
+ }
67
+ pop() {
68
+ const t = this.value,
69
+ s = t.pop()
70
+ return this.update(t), s
71
+ }
72
+ unshift(t) {
73
+ const s = this.value
74
+ s.unshift(t), this.update(s)
75
+ }
76
+ shift() {
77
+ const t = this.value,
78
+ s = t.shift()
79
+ return this.update(t), s
80
+ }
81
+ sortBy(t) {
82
+ const s = this.value
83
+ s.sort(t), this.update(s)
84
+ }
85
+ insertAt(t, s) {
86
+ const r = this.value
87
+ k(r, t, s), this.update(r)
88
+ }
89
+ remove(t) {
90
+ const s = O(this.value, t)
91
+ this.update(s)
92
+ }
93
+ removeBy(t) {
94
+ const s = M(this.value, t)
95
+ this.update(s)
96
+ }
97
+ includes(t) {
98
+ return this.value.includes(t)
99
+ }
100
+ appendIfUnique(t) {
101
+ const s = this.value
102
+ $(s, t), this.update(s)
103
+ }
104
+ }
105
+ const m = (e) => new lt(e),
106
+ ze = {
107
+ push: (e, t) => m(e).push(t),
108
+ pop: (e) => m(e).pop(),
109
+ unshift: (e, t) => m(e).unshift(t),
110
+ shift: (e) => m(e).shift(),
111
+ sortBy: (e, t) => m(e).sortBy(t),
112
+ insertAt: (e, t, s) => m(e).insertAt(t, s),
113
+ remove: (e, t) => m(e).remove(t),
114
+ removeBy: (e, t) => m(e).removeBy(t),
115
+ reset: (e) => m(e).reset(),
116
+ includes: (e, t) => m(e).includes(t),
117
+ appendIfUnique: (e, t) => m(e).appendIfUnique(t),
118
+ }
119
+ class ht {
120
+ constructor(t) {
121
+ this.store = t
122
+ }
123
+ update(t) {
124
+ this.store.update(t)
125
+ }
126
+ get value() {
127
+ return this.store.value
128
+ }
129
+ reset() {
130
+ this.store.update(this.store.initialValue)
131
+ }
132
+ updateAttribute(t, s) {
133
+ const r = { ...this.value }
134
+ ;(r[t] = s), this.update(r)
135
+ }
136
+ updateDynamicAttribute(t, s) {
137
+ this.isKey(t) && this.isValueType(t, s) && this.updateAttribute(t, s)
138
+ }
139
+ isKey(t) {
140
+ return t in this.store.initialValue
141
+ }
142
+ isValueType(t, s) {
143
+ return typeof this.store.initialValue[t] == typeof s
144
+ }
145
+ resetAttribute(t) {
146
+ const s = { ...this.value },
147
+ r = this.store.initialValue[t]
148
+ ;(s[t] = r), this.update(s)
149
+ }
150
+ updateAttributes(t) {
151
+ const s = { ...this.value, ...t }
152
+ this.update(s)
153
+ }
154
+ attributeTruthy(t) {
155
+ return !!this.value[t]
156
+ }
157
+ }
158
+ const b = (e) => new ht(e),
159
+ Ke = {
160
+ reset: (e) => b(e).reset(),
161
+ resetAttribute: (e, t) => b(e).resetAttribute(t),
162
+ updateAttribute: (e, t, s) => b(e).updateAttribute(t, s),
163
+ updateAttributes: (e, t) => b(e).updateAttributes(t),
164
+ attributeTruthy: (e, t) => b(e).attributeTruthy(t),
165
+ },
166
+ dt = (e) => typeof e == 'boolean',
167
+ pt = (e) => typeof e == 'number',
168
+ D = (e) => typeof e == 'string',
169
+ v = (e) => Array.isArray(e),
170
+ y = (e) => e !== null && !v(e) && typeof e == 'object',
171
+ Re = {
172
+ boolean: dt,
173
+ number: pt,
174
+ string: D,
175
+ array: v,
176
+ object: y,
177
+ },
178
+ mt = (e, t) => t.createElement(e),
179
+ ft = (e, t) => {
6
180
  for (const s in t) {
7
181
  if (s === '__self') continue
8
182
  const r = t[s].toString()
@@ -10,10 +184,10 @@ const tt = (e) => typeof e == 'string',
10
184
  const n = e
11
185
  n.value !== r && (n.value = r)
12
186
  } else
13
- tt(r) && r.trim() === '' ? e.removeAttribute(s) : e.setAttribute(s, r)
187
+ D(r) && r.trim() === '' ? e.removeAttribute(s) : e.setAttribute(s, r)
14
188
  }
15
189
  },
16
- rt = (e, t, s) => {
190
+ bt = (e, t, s) => {
17
191
  const r = {}
18
192
  for (const n in t) {
19
193
  const i = t[n],
@@ -27,12 +201,12 @@ const tt = (e) => typeof e == 'string',
27
201
  }
28
202
  e.eventMaps = r
29
203
  },
30
- nt = (e, t, s, r) => {
31
- const n = et(e, r.document)
32
- return st(n, t), rt(n, s, r.publish), n
204
+ vt = (e, t, s, r) => {
205
+ const n = mt(e, r.document)
206
+ return ft(n, t), bt(n, s, r.publish), n
33
207
  },
34
- y = 'http://www.w3.org/2000/svg',
35
- it = {
208
+ w = 'http://www.w3.org/2000/svg',
209
+ gt = {
36
210
  animate: !0,
37
211
  animateMotion: !0,
38
212
  animateTransform: !0,
@@ -96,33 +270,33 @@ const tt = (e) => typeof e == 'string',
96
270
  use: !0,
97
271
  view: !0,
98
272
  },
99
- ot = (e, t) => !!(it[e] || (e === 'a' && t === y)),
100
- ut = (e, t, s) => {
101
- const r = s.createElementNS(y, e)
273
+ yt = (e, t) => !!(gt[e] || (e === 'a' && t === w)),
274
+ Et = (e, t, s) => {
275
+ const r = s.createElementNS(w, e)
102
276
  for (const n in t)
103
277
  n === '__self' ||
104
278
  n === 'xmlns' ||
105
279
  r.setAttributeNS(null, n, t[n].toString())
106
280
  return r
107
281
  },
108
- at = (e) => e.namespaceURI === y,
109
- ct = (e, t) => t.createTextNode(e)
110
- class lt {
282
+ At = (e) => e.namespaceURI === w,
283
+ xt = (e, t) => t.createTextNode(e)
284
+ class wt {
111
285
  constructor(t) {
112
286
  this.value = t.toString()
113
287
  }
114
288
  render(t) {
115
- const s = ct(this.value, t.document)
289
+ const s = xt(this.value, t.document)
116
290
  return (s.__jsx = 'TextNode'), [s]
117
291
  }
118
292
  }
119
- const ht = (e) => typeof e == 'string' || typeof e == 'number',
120
- dt = (e) => new lt(e),
121
- pt = (e) => (ht(e) ? dt(e) : e),
122
- T = (e) => mt(e).map(pt).flat(),
123
- mt = (e) => (Array.isArray(e) ? e.flat() : e ? [e] : []),
124
- j = (e, t = {}) => T(e || t.children || []),
125
- ft = (e, t = '') => {
293
+ const Nt = (e) => typeof e == 'string' || typeof e == 'number',
294
+ _t = (e) => new wt(e),
295
+ St = (e) => (Nt(e) ? _t(e) : e),
296
+ P = (e) => Tt(e).map(St).flat(),
297
+ Tt = (e) => (Array.isArray(e) ? e.flat() : e ? [e] : []),
298
+ F = (e, t = {}) => P(e || t.children || []),
299
+ jt = (e, t = '') => {
126
300
  const s = {},
127
301
  r = {}
128
302
  for (const n in e) {
@@ -132,7 +306,7 @@ const ht = (e) => typeof e == 'string' || typeof e == 'number',
132
306
  r[a] = i ? i.toString() : ''
133
307
  } else {
134
308
  if (i === !1) continue
135
- n === '__source' ? (s.__source = e.__source) : (s[n] = bt(n, i, t))
309
+ n === '__source' ? (s.__source = e.__source) : (s[n] = Ot(n, i, t))
136
310
  }
137
311
  }
138
312
  return {
@@ -140,22 +314,22 @@ const ht = (e) => typeof e == 'string' || typeof e == 'number',
140
314
  events: r,
141
315
  }
142
316
  },
143
- bt = (e, t, s = '') => (t == null ? s : t.toString()),
144
- vt = (e, t) => {
317
+ Ot = (e, t, s = '') => (t == null ? s : t.toString()),
318
+ Mt = (e, t) => {
145
319
  const s = e || {},
146
- r = j(t, s)
320
+ r = F(t, s)
147
321
  return (s.children = s.children || r), s
148
322
  },
149
- O = (e, t, s, r = []) => e.reduce(gt(t, s), r).flat(),
150
- gt = (e, t) => (s, r) =>
323
+ B = (e, t, s, r = []) => e.reduce(kt(t, s), r).flat(),
324
+ kt = (e, t) => (s, r) =>
151
325
  r
152
326
  ? Array.isArray(r)
153
- ? O(r, e, t, s)
327
+ ? B(r, e, t, s)
154
328
  : (r.render(e, t).forEach((n) => s.push(n)), s)
155
329
  : s
156
- class M {
330
+ class V {
157
331
  constructor(t) {
158
- this.collection = T(t)
332
+ this.collection = P(t)
159
333
  }
160
334
  render(t, s) {
161
335
  this.parentElement = s
@@ -163,7 +337,7 @@ class M {
163
337
  return this.attachToParent(r), r
164
338
  }
165
339
  generateDom(t) {
166
- return O(this.collection, t, this.parentElement)
340
+ return B(this.collection, t, this.parentElement)
167
341
  }
168
342
  attachToParent(t) {
169
343
  if (this.parentElement === void 0) return
@@ -171,7 +345,7 @@ class M {
171
345
  t.forEach((r) => s.appendChild(r))
172
346
  }
173
347
  }
174
- class yt {
348
+ class $t {
175
349
  constructor(t, s) {
176
350
  ;(this.type = t), (this.attributes = s)
177
351
  }
@@ -197,14 +371,14 @@ class yt {
197
371
  return `${this.type}${t}${s}${r}`
198
372
  }
199
373
  }
200
- class Et {
374
+ class Dt {
201
375
  constructor(t, s, r = []) {
202
376
  this.type = t
203
- const { events: n, attributes: i } = ft(s)
377
+ const { events: n, attributes: i } = jt(s)
204
378
  ;(this.events = n),
205
379
  (this.attributes = i),
206
- (this.isSvg = ot(this.type, this.attributes.xmlns)),
207
- (this.children = new M(r))
380
+ (this.isSvg = yt(this.type, this.attributes.xmlns)),
381
+ (this.children = new V(r))
208
382
  }
209
383
  render(t) {
210
384
  const s = this.generateDom(t)
@@ -214,24 +388,24 @@ class Et {
214
388
  return this.isSvg ? this.generateSvgDom(t) : this.generateHtmlDom(t)
215
389
  }
216
390
  generateHtmlDom(t) {
217
- const s = nt(this.type, this.attributes, this.events, t)
391
+ const s = vt(this.type, this.attributes, this.events, t)
218
392
  return (s.__jsx = this.jsxKey()), s
219
393
  }
220
394
  generateSvgDom(t) {
221
- const s = ut(this.type, this.attributes, t.document)
395
+ const s = Et(this.type, this.attributes, t.document)
222
396
  return (s.__jsx = this.jsxKey()), s
223
397
  }
224
398
  jsxKey() {
225
- return new yt(this.type, this.attributes).generate()
399
+ return new $t(this.type, this.attributes).generate()
226
400
  }
227
401
  }
228
- const xt = (e, t, ...s) =>
229
- typeof e == 'string' ? new Et(e, t, s) : e(vt(t, s))
230
- xt.fragment = (e, t) => {
231
- const s = j(t, e)
232
- return new M(s)
402
+ const Pt = (e, t, ...s) =>
403
+ typeof e == 'string' ? new Dt(e, t, s) : e(Mt(t, s))
404
+ Pt.fragment = (e, t) => {
405
+ const s = F(t, e)
406
+ return new V(s)
233
407
  }
234
- class At {
408
+ class Ft {
235
409
  constructor(t, s, r) {
236
410
  ;(this.template = t),
237
411
  (this.selector = s),
@@ -256,49 +430,49 @@ class At {
256
430
  return this.renderKit.document.querySelector(this.selector)
257
431
  }
258
432
  }
259
- const wt = (e, t, s) => {
260
- const r = new At(e, t, s)
433
+ const Bt = (e, t, s) => {
434
+ const r = new Ft(e, t, s)
261
435
  return r.renderAndAttach(s), r
262
436
  },
263
- k = 'go-to-href',
264
- $ = 'go-to',
265
- m = 'navigation:location-change',
266
- D = 'navigation:route-change',
267
- Nt = /* @__PURE__ */ Object.freeze(
437
+ L = 'go-to-href',
438
+ z = 'go-to',
439
+ g = 'navigation:location-change',
440
+ K = 'navigation:route-change',
441
+ Vt = /* @__PURE__ */ Object.freeze(
268
442
  /* @__PURE__ */ Object.defineProperty(
269
443
  {
270
444
  __proto__: null,
271
- linkNavigationEvent: k,
272
- locationChangeEvent: m,
273
- navigationEvent: $,
274
- routeChangeEvent: D,
445
+ linkNavigationEvent: L,
446
+ locationChangeEvent: g,
447
+ navigationEvent: z,
448
+ routeChangeEvent: K,
275
449
  },
276
450
  Symbol.toStringTag,
277
451
  { value: 'Module' },
278
452
  ),
279
453
  ),
280
- P = (e) => {
454
+ R = (e) => {
281
455
  e.create('route', {
282
456
  host: '',
283
457
  path: '',
284
458
  query: {},
285
459
  })
286
460
  },
287
- V = (e) => {
461
+ U = (e) => {
288
462
  const t = e.closest('[href]')
289
463
  return (t && t.getAttribute('href')) || ''
290
464
  },
291
- E = ({ payload: e, publish: t, window: s }) => {
292
- s.history.pushState(null, '', e), t(m, null)
465
+ N = ({ payload: e, publish: t, window: s }) => {
466
+ s.history.pushState(null, '', e), t(g, null)
293
467
  },
294
- F = (e) => {
468
+ q = (e) => {
295
469
  const t = e.payload
296
470
  if (!t || !t.target) return
297
471
  t.preventDefault()
298
- const s = V(t.target)
299
- E({ ...e, payload: s })
472
+ const s = U(t.target)
473
+ N({ ...e, payload: s })
300
474
  },
301
- L = (e) =>
475
+ I = (e) =>
302
476
  e
303
477
  .replace(/^\?/, '')
304
478
  .split('&')
@@ -307,49 +481,49 @@ const wt = (e, t, s) => {
307
481
  const r = s.split('=')
308
482
  return (t[r[0]] = r[1]), t
309
483
  }, {}),
310
- z = (e) => {
484
+ C = (e) => {
311
485
  const { state: t, publish: s, window: r } = e,
312
486
  { host: n, pathname: i, search: a } = r.location,
313
487
  c = i,
314
- u = L(a),
488
+ u = I(a),
315
489
  h = {
316
490
  host: n,
317
491
  path: c,
318
492
  query: u,
319
493
  }
320
- t.store('route').update(h), s(D, h)
494
+ t.store('route').update(h), s(K, h)
321
495
  },
322
- B = (e) => {
496
+ J = (e) => {
323
497
  const { subscribe: t } = e
324
- t(k, F),
325
- t($, (s) => {
326
- E(s)
498
+ t(L, q),
499
+ t(z, (s) => {
500
+ N(s)
327
501
  })
328
502
  },
329
- K = (e) => {
503
+ G = (e) => {
330
504
  const { publish: t, subscribe: s, state: r, window: n } = e
331
- P(r), n.addEventListener('popstate', () => t(m, null)), s(m, z)
505
+ R(r), n.addEventListener('popstate', () => t(g, null)), s(g, C)
332
506
  },
333
- R = (e) => {
334
- setTimeout(() => e.publish(m, null), 0)
507
+ H = (e) => {
508
+ setTimeout(() => e.publish(g, null), 0)
335
509
  },
336
- U = (e) => {
337
- K(e), B(e), R(e)
510
+ Q = (e) => {
511
+ G(e), J(e), H(e)
338
512
  },
339
- _t = /* @__PURE__ */ Object.freeze(
513
+ Lt = /* @__PURE__ */ Object.freeze(
340
514
  /* @__PURE__ */ Object.defineProperty(
341
515
  {
342
516
  __proto__: null,
343
- publishLocation: R,
344
- startNavigation: U,
345
- subscribeToHistoryChange: K,
346
- subscribeToNavigation: B,
517
+ publishLocation: H,
518
+ startNavigation: Q,
519
+ subscribeToHistoryChange: G,
520
+ subscribeToNavigation: J,
347
521
  },
348
522
  Symbol.toStringTag,
349
523
  { value: 'Module' },
350
524
  ),
351
525
  )
352
- class C {
526
+ class W {
353
527
  constructor({
354
528
  window: t,
355
529
  document: s,
@@ -369,24 +543,24 @@ class C {
369
543
  (this.roots = [])
370
544
  }
371
545
  render(t, s) {
372
- const r = wt(t, s, this.renderKit)
546
+ const r = Bt(t, s, this.renderKit)
373
547
  return this.roots.push(r), r
374
548
  }
375
549
  startNavigation() {
376
- U(this)
550
+ Q(this)
377
551
  }
378
552
  }
379
- const De = /* @__PURE__ */ Object.freeze(
553
+ const Ue = /* @__PURE__ */ Object.freeze(
380
554
  /* @__PURE__ */ Object.defineProperty(
381
555
  {
382
556
  __proto__: null,
383
- App: C,
557
+ App: W,
384
558
  },
385
559
  Symbol.toStringTag,
386
560
  { value: 'Module' },
387
561
  ),
388
562
  )
389
- class I {
563
+ class X {
390
564
  constructor() {
391
565
  this.lookup = {}
392
566
  }
@@ -413,7 +587,7 @@ class I {
413
587
  this.lookup[t] || (this.lookup[t] = [])
414
588
  }
415
589
  }
416
- class q {
590
+ class Y {
417
591
  constructor() {
418
592
  this.lookup = []
419
593
  }
@@ -432,7 +606,7 @@ class q {
432
606
  return this.lookup.filter((s) => s.matcher.test(t))
433
607
  }
434
608
  }
435
- class St {
609
+ class zt {
436
610
  constructor({ publish: t, event: s, payload: r, timer: n }) {
437
611
  ;(this.setNewTimeout = () => {
438
612
  this.stopped ||
@@ -469,7 +643,7 @@ class St {
469
643
  ((this.callCount += 1), this.publish(this.event, this.payload))
470
644
  }
471
645
  }
472
- const Tt = (e) => {
646
+ const Kt = (e) => {
473
647
  const { offset: t, period: s } = e,
474
648
  r = ({ callCount: n }) => (t && n == 0 ? t : s)
475
649
  return {
@@ -479,16 +653,16 @@ const Tt = (e) => {
479
653
  timer: r,
480
654
  }
481
655
  },
482
- jt = (e) => {
656
+ Rt = (e) => {
483
657
  let t
484
- 'timer' in e ? (t = e) : (t = Tt(e))
485
- const s = new St(t)
658
+ 'timer' in e ? (t = e) : (t = Kt(e))
659
+ const s = new zt(t)
486
660
  return s.start(), s.stop
487
661
  }
488
- class J {
662
+ class Z {
489
663
  constructor() {
490
- ;(this.exactSubscriptions = new I()),
491
- (this.fuzzySubscriptions = new q()),
664
+ ;(this.exactSubscriptions = new X()),
665
+ (this.fuzzySubscriptions = new Y()),
492
666
  (this.currentIndex = 0)
493
667
  }
494
668
  subscribe(t, s) {
@@ -523,47 +697,52 @@ class J {
523
697
  }
524
698
  }
525
699
  }
526
- const G = () => {
527
- const e = new J()
700
+ const tt = () => {
701
+ const e = new Z()
528
702
  return {
529
703
  bus: e,
530
704
  publish: (r, n) => e.publish(r, n),
531
705
  subscribe: (r, n) => e.subscribe(r, n),
532
706
  }
533
707
  },
534
- Pe = /* @__PURE__ */ Object.freeze(
708
+ qe = /* @__PURE__ */ Object.freeze(
535
709
  /* @__PURE__ */ Object.defineProperty(
536
710
  {
537
711
  __proto__: null,
538
- ExactSubscriptions: I,
539
- FuzzySubscriptions: q,
540
- JaxsBus: J,
541
- createBus: G,
542
- publishPeriodically: jt,
712
+ ExactSubscriptions: X,
713
+ FuzzySubscriptions: Y,
714
+ JaxsBus: Z,
715
+ createBus: tt,
716
+ publishPeriodically: Rt,
543
717
  },
544
718
  Symbol.toStringTag,
545
719
  { value: 'Module' },
546
720
  ),
547
721
  ),
548
- Ot = (e, t) => e === t,
549
- Mt = (e, t) => Object.keys(e).length === Object.keys(t).length,
550
- kt = (e, t) =>
551
- !(v(e) && v(t)) || !Mt(e, t)
722
+ Ut = (e, t) => e === t,
723
+ qt = (e, t) => Object.keys(e).length === Object.keys(t).length,
724
+ et = (e, t) =>
725
+ !(y(e) && y(t)) || !qt(e, t)
552
726
  ? !1
553
727
  : Object.keys(e).every((s) => {
554
728
  const r = e[s],
555
729
  n = t[s]
556
- return x(r, n)
730
+ return E(r, n)
557
731
  }),
558
- $t = (e, t) =>
559
- !(f(e) && f(t)) || e.length !== t.length
732
+ st = (e, t) =>
733
+ !(v(e) && v(t)) || e.length !== t.length
560
734
  ? !1
561
735
  : e.every((s, r) => {
562
736
  const n = t[r]
563
- return x(s, n)
737
+ return E(s, n)
564
738
  }),
565
- x = (e, t) => (v(e) ? kt(e, t) : f(e) ? $t(e, t) : Ot(e, t))
566
- class g {
739
+ E = (e, t) => (y(e) ? et(e, t) : v(e) ? st(e, t) : Ut(e, t)),
740
+ Ie = {
741
+ objects: et,
742
+ arrays: st,
743
+ equal: E,
744
+ }
745
+ class x {
567
746
  constructor(t) {
568
747
  ;(this.name = t.name),
569
748
  (this.parent = t.parent),
@@ -571,7 +750,7 @@ class g {
571
750
  (this.initialValue = structuredClone(t.value))
572
751
  }
573
752
  get value() {
574
- return this._value
753
+ return structuredClone(this._value)
575
754
  }
576
755
  set value(t) {
577
756
  throw new Error('Cannot set value directly. Use an updater!')
@@ -586,118 +765,23 @@ class g {
586
765
  } else this.updateValue(t)
587
766
  }
588
767
  updateValue(t) {
589
- x(this._value, t) || ((this._value = t), this.parent.notify(this.name))
768
+ E(this._value, t) || ((this._value = t), this.parent.notify(this.name))
590
769
  }
591
770
  getUpdatedValue(t) {
592
- return t(structuredClone(this.value))
771
+ return t(this.value)
593
772
  }
594
773
  }
595
- class A {
596
- constructor(t) {
597
- this.store = t
598
- }
599
- update(t) {
600
- this.store.update(t)
601
- }
602
- reset() {
603
- this.store.update(this.store.initialValue)
604
- }
605
- get value() {
606
- return this.store.value
607
- }
608
- }
609
- class Dt extends A {
610
- updateAttribute(t, s) {
611
- const r = { ...this.value }
612
- ;(r[t] = s), this.update(r)
613
- }
614
- updateDynamicAttribute(t, s) {
615
- this.isKey(t) && this.isValueType(t, s) && this.updateAttribute(t, s)
616
- }
617
- isKey(t) {
618
- return t in this.store.initialValue
619
- }
620
- isValueType(t, s) {
621
- return typeof this.store.initialValue[t] == typeof s
622
- }
623
- resetAttribute(t) {
624
- const s = { ...this.value },
625
- r = this.store.initialValue[t]
626
- ;(s[t] = r), this.update(s)
627
- }
628
- }
629
- const Pt = (e) => new Dt(e)
630
- class Vt extends A {
631
- push(t) {
632
- const s = [...this.value, t]
633
- this.update(s)
634
- }
635
- pop() {
636
- const t = [...this.value],
637
- s = t.pop()
638
- return this.update(t), s
639
- }
640
- unshift(t) {
641
- const s = [t, ...this.value]
642
- this.update(s)
643
- }
644
- shift() {
645
- const t = [...this.value],
646
- s = t.shift()
647
- return this.update(t), s
648
- }
649
- addSorter(t, s) {
650
- this[t] = () => {
651
- this.sortBy(s)
652
- }
653
- }
654
- sortBy(t) {
655
- const s = [...this.value]
656
- s.sort(t), this.update(s)
657
- }
658
- insertAt(t, s) {
659
- const r = [...this.value]
660
- r.splice(t, 0, s), this.update(r)
661
- }
662
- remove(t) {
663
- const s = this.value.reduce((r, n) => (n !== t && r.push(n), r), [])
664
- this.update(s)
665
- }
666
- removeBy(t) {
667
- const s = this.value.reduce((r, n) => (t(n) || r.push(n), r), [])
668
- this.update(s)
669
- }
670
- }
671
- const Ft = (e) => new Vt(e)
672
- class Lt extends A {
673
- toggle() {
674
- const t = !this.value
675
- this.update(t)
676
- }
677
- setTrue() {
678
- this.update(!0)
679
- }
680
- setFalse() {
681
- this.update(!1)
682
- }
683
- }
684
- const zt = (e) => new Lt(e),
685
- Bt = {
686
- object: Pt,
687
- list: Ft,
688
- boolean: zt,
689
- },
690
- w = 'state'
691
- class H {
774
+ const _ = 'state'
775
+ class rt {
692
776
  constructor(t) {
693
777
  ;(this.publisher = t),
694
778
  (this.stores = {}),
695
- (this.eventNamePrefix = w),
779
+ (this.eventNamePrefix = _),
696
780
  (this.notifications = /* @__PURE__ */ new Set()),
697
781
  (this.inTransaction = !1)
698
782
  }
699
783
  create(t, s) {
700
- const r = new g({
784
+ const r = new x({
701
785
  name: t,
702
786
  parent: this,
703
787
  value: s,
@@ -707,7 +791,7 @@ class H {
707
791
  store(t) {
708
792
  return (
709
793
  this.stores[t] ||
710
- new g({
794
+ new x({
711
795
  name: t,
712
796
  parent: this,
713
797
  value: void 0,
@@ -748,22 +832,21 @@ class H {
748
832
  return `${this.eventNamePrefix}:${t}`
749
833
  }
750
834
  }
751
- const Q = (e) => new H(e),
752
- Ve = /* @__PURE__ */ Object.freeze(
835
+ const nt = (e) => new rt(e),
836
+ Ce = /* @__PURE__ */ Object.freeze(
753
837
  /* @__PURE__ */ Object.defineProperty(
754
838
  {
755
839
  __proto__: null,
756
- State: H,
757
- Store: g,
758
- createState: Q,
759
- eventName: w,
760
- updaters: Bt,
840
+ State: rt,
841
+ Store: x,
842
+ createState: nt,
843
+ eventName: _,
761
844
  },
762
845
  Symbol.toStringTag,
763
846
  { value: 'Module' },
764
847
  ),
765
848
  )
766
- class Kt {
849
+ class It {
767
850
  constructor(t) {
768
851
  this.setupDomEnvironment(t)
769
852
  }
@@ -773,7 +856,7 @@ class Kt {
773
856
  this.setupState(),
774
857
  this.addBusOptions(),
775
858
  this.setRenderKit(),
776
- new C({
859
+ new W({
777
860
  window: this.window,
778
861
  document: this.document,
779
862
  publish: this.publish,
@@ -792,11 +875,11 @@ class Kt {
792
875
  : ((this.window = window), (this.document = document))
793
876
  }
794
877
  setupBus() {
795
- const { publish: t, subscribe: s, bus: r } = G()
878
+ const { publish: t, subscribe: s, bus: r } = tt()
796
879
  ;(this.publish = t), (this.subscribe = s), (this.bus = r)
797
880
  }
798
881
  setupState() {
799
- this.state = Q(this.publish)
882
+ this.state = nt(this.publish)
800
883
  }
801
884
  addBusOptions() {
802
885
  this.bus.addListenerOptions({
@@ -815,8 +898,8 @@ class Kt {
815
898
  }
816
899
  }
817
900
  }
818
- const Fe = (e = {}) => {
819
- const s = new Kt(e).setup()
901
+ const Je = (e = {}) => {
902
+ const s = new It(e).setup()
820
903
  return s.startNavigation(), s
821
904
  }
822
905
  var o = /* @__PURE__ */ ((e) => (
@@ -833,7 +916,7 @@ var o = /* @__PURE__ */ ((e) => (
833
916
  (e[(e.changeText = 10)] = 'changeText'),
834
917
  e
835
918
  ))(o || {})
836
- const Le = /* @__PURE__ */ Object.freeze(
919
+ const Ge = /* @__PURE__ */ Object.freeze(
837
920
  /* @__PURE__ */ Object.defineProperty(
838
921
  {
839
922
  __proto__: null,
@@ -843,77 +926,77 @@ const Le = /* @__PURE__ */ Object.freeze(
843
926
  { value: 'Module' },
844
927
  ),
845
928
  ),
846
- Rt = (e, t) => ({
929
+ Ct = (e, t) => ({
847
930
  source: e,
848
931
  target: t,
849
932
  type: o.changeText,
850
933
  data: {},
851
934
  }),
852
- Ut = (e, t) => ({
935
+ Jt = (e, t) => ({
853
936
  source: e,
854
937
  target: t,
855
938
  type: o.replaceNode,
856
939
  data: {},
857
940
  }),
858
- Ct = (e, t, s) => ({
941
+ Gt = (e, t, s) => ({
859
942
  source: e,
860
943
  target: t,
861
944
  data: s,
862
945
  type: o.removeAttribute,
863
946
  }),
864
- It = (e, t, s) => ({
947
+ Ht = (e, t, s) => ({
865
948
  source: e,
866
949
  target: t,
867
950
  data: s,
868
951
  type: o.addAttribute,
869
952
  }),
870
- qt = (e, t, s) => ({
953
+ Qt = (e, t, s) => ({
871
954
  source: e,
872
955
  target: t,
873
956
  data: s,
874
957
  type: o.updateAttribute,
875
958
  }),
876
- Jt = (e, t, s) => ({
959
+ Wt = (e, t, s) => ({
877
960
  source: e,
878
961
  target: t,
879
962
  data: s,
880
963
  type: o.removeEvent,
881
964
  }),
882
- Gt = (e, t, s) => ({
965
+ Xt = (e, t, s) => ({
883
966
  source: e,
884
967
  target: t,
885
968
  data: s,
886
969
  type: o.addEvent,
887
970
  }),
888
- Ht = (e, t, s) => ({
971
+ Yt = (e, t, s) => ({
889
972
  source: e,
890
973
  target: t,
891
974
  data: s,
892
975
  type: o.updateEvent,
893
976
  }),
894
- N = (e) => ({
977
+ S = (e) => ({
895
978
  source: e,
896
979
  target: e,
897
980
  // for type crap only
898
981
  type: o.removeNode,
899
982
  data: {},
900
983
  }),
901
- b = (e, t) => ({
984
+ A = (e, t) => ({
902
985
  target: e,
903
986
  source: e,
904
987
  // for type crap only
905
988
  type: o.insertNode,
906
989
  data: t,
907
990
  }),
908
- Qt = (e, t, s) => ({
991
+ Zt = (e, t, s) => ({
909
992
  source: e,
910
993
  target: t,
911
994
  type: o.changeValue,
912
995
  data: s,
913
996
  }),
914
- Wt = (e, t) => (e.type > t.type ? 1 : e.type < t.type ? -1 : 0),
915
- _ = { index: -1 }
916
- class Xt {
997
+ te = (e, t) => (e.type > t.type ? 1 : e.type < t.type ? -1 : 0),
998
+ T = { index: -1 }
999
+ class ee {
917
1000
  constructor() {
918
1001
  this.map = {}
919
1002
  }
@@ -930,7 +1013,7 @@ class Xt {
930
1013
  }
931
1014
  pullMatch(t) {
932
1015
  const s = t && t.__jsx
933
- return !s || !(this.map[s] && this.map[s].length) ? _ : this.map[s].shift()
1016
+ return !s || !(this.map[s] && this.map[s].length) ? T : this.map[s].shift()
934
1017
  }
935
1018
  clear(t) {
936
1019
  const s = t && t.__jsx
@@ -946,11 +1029,11 @@ class Xt {
946
1029
  return Object.values(this.map).flat()
947
1030
  }
948
1031
  }
949
- const S = (e) => {
950
- const t = new Xt()
1032
+ const j = (e) => {
1033
+ const t = new ee()
951
1034
  return t.populate(e), t
952
1035
  },
953
- W = (e, t, s = !1) => {
1036
+ it = (e, t, s = !1) => {
954
1037
  const r = [],
955
1038
  n = e.attributes,
956
1039
  i = n.length,
@@ -971,13 +1054,13 @@ const S = (e) => {
971
1054
  d
972
1055
  ? l.value !== d.value &&
973
1056
  r.push(
974
- qt(e, t, {
1057
+ Qt(e, t, {
975
1058
  name: l.name,
976
1059
  value: d.value,
977
1060
  isSvg: s,
978
1061
  }),
979
1062
  )
980
- : r.push(Ct(e, t, { name: l.name, isSvg: s }))
1063
+ : r.push(Gt(e, t, { name: l.name, isSvg: s }))
981
1064
  }
982
1065
  }
983
1066
  for (u = 0; u < c; u++) {
@@ -993,7 +1076,7 @@ const S = (e) => {
993
1076
  }
994
1077
  d ||
995
1078
  r.push(
996
- It(e, t, {
1079
+ Ht(e, t, {
997
1080
  name: l.name,
998
1081
  value: l.value,
999
1082
  isSvg: s,
@@ -1003,7 +1086,7 @@ const S = (e) => {
1003
1086
  }
1004
1087
  return r
1005
1088
  },
1006
- Yt = (e, t) => {
1089
+ se = (e, t) => {
1007
1090
  const s = [],
1008
1091
  r = e.eventMaps,
1009
1092
  n = t.eventMaps,
@@ -1016,14 +1099,14 @@ const S = (e) => {
1016
1099
  h
1017
1100
  ? h.busEvent !== u.busEvent &&
1018
1101
  s.push(
1019
- Ht(e, t, {
1102
+ Yt(e, t, {
1020
1103
  name: c,
1021
1104
  targetValue: h.listener,
1022
1105
  sourceValue: u.listener,
1023
1106
  }),
1024
1107
  )
1025
1108
  : s.push(
1026
- Jt(e, t, {
1109
+ Wt(e, t, {
1027
1110
  name: u.domEvent,
1028
1111
  value: u.listener,
1029
1112
  }),
@@ -1034,7 +1117,7 @@ const S = (e) => {
1034
1117
  h = n[c]
1035
1118
  u ||
1036
1119
  s.push(
1037
- Gt(e, t, {
1120
+ Xt(e, t, {
1038
1121
  name: h.domEvent,
1039
1122
  value: h.listener,
1040
1123
  }),
@@ -1043,44 +1126,44 @@ const S = (e) => {
1043
1126
  s
1044
1127
  )
1045
1128
  },
1046
- Zt = (e) => e.tagName !== 'INPUT',
1047
- te = (e, t) => e.value === t.value,
1048
- ee = (e, t) => {
1049
- if (Zt(e) || te(e, t)) return []
1129
+ re = (e) => e.tagName !== 'INPUT',
1130
+ ne = (e, t) => e.value === t.value,
1131
+ ie = (e, t) => {
1132
+ if (re(e) || ne(e, t)) return []
1050
1133
  const s = e,
1051
1134
  r = t
1052
- return [Qt(s, r, { name: 'value', value: r.value })]
1135
+ return [Zt(s, r, { name: 'value', value: r.value })]
1053
1136
  },
1054
- se = (e, t) => {
1055
- const s = W(e, t),
1056
- r = Yt(e, t),
1057
- n = ee(e, t)
1137
+ oe = (e, t) => {
1138
+ const s = it(e, t),
1139
+ r = se(e, t),
1140
+ n = ie(e, t)
1058
1141
  return s.concat(r).concat(n)
1059
1142
  },
1060
- re = (e, t) => W(e, t, !0),
1061
- ne = (e, t) => (e.textContent !== t.textContent ? [Rt(e, t)] : []),
1062
- ie = (e, t, s) => {
1143
+ ue = (e, t) => it(e, t, !0),
1144
+ ae = (e, t) => (e.textContent !== t.textContent ? [Ct(e, t)] : []),
1145
+ ce = (e, t, s) => {
1063
1146
  let r = []
1064
- if (e.nodeType === 1 && at(e)) {
1147
+ if (e.nodeType === 1 && At(e)) {
1065
1148
  const n = e,
1066
1149
  i = t,
1067
- a = re(n, i),
1150
+ a = ue(n, i),
1068
1151
  c = s(n.childNodes, i.childNodes, n)
1069
1152
  r = a.concat(c)
1070
1153
  } else if (e.nodeType === 1) {
1071
1154
  const n = e,
1072
1155
  i = t,
1073
- a = se(n, i),
1156
+ a = oe(n, i),
1074
1157
  c = s(n.childNodes, i.childNodes, n)
1075
1158
  r = a.concat(c)
1076
- } else e.nodeType === 3 && (r = ne(e, t))
1159
+ } else e.nodeType === 3 && (r = ae(e, t))
1077
1160
  return r
1078
1161
  },
1079
- X = (e, t, s) => {
1162
+ ot = (e, t, s) => {
1080
1163
  const r = [],
1081
- n = oe(e, t),
1082
- i = S(e),
1083
- a = S(t),
1164
+ n = le(e, t),
1165
+ i = j(e),
1166
+ a = j(t),
1084
1167
  c = []
1085
1168
  let u = 0
1086
1169
  for (; u < n; u++) {
@@ -1092,7 +1175,7 @@ const S = (e) => {
1092
1175
  p.element
1093
1176
  ? (p.index !== u &&
1094
1177
  r.push(
1095
- b(p.element, {
1178
+ A(p.element, {
1096
1179
  parent: s,
1097
1180
  index: u,
1098
1181
  }),
@@ -1103,141 +1186,141 @@ const S = (e) => {
1103
1186
  }))
1104
1187
  : d
1105
1188
  ? a.check(d)
1106
- ? r.push(b(l, { parent: s, index: u }))
1107
- : (i.clear(d), r.push(Ut(d, l)))
1108
- : r.push(b(l, { parent: s, index: u }))
1109
- } else d && i.pullMatch(d).element && r.push(N(d))
1189
+ ? r.push(A(l, { parent: s, index: u }))
1190
+ : (i.clear(d), r.push(Jt(d, l)))
1191
+ : r.push(A(l, { parent: s, index: u }))
1192
+ } else d && i.pullMatch(d).element && r.push(S(d))
1110
1193
  }
1111
1194
  i.remaining().forEach(({ element: d }) => {
1112
- r.push(N(d))
1195
+ r.push(S(d))
1113
1196
  })
1114
1197
  const h = c.reduce(
1115
- (d, { source: l, target: p }) => d.concat(ie(l, p, X)),
1198
+ (d, { source: l, target: p }) => d.concat(ce(l, p, ot)),
1116
1199
  [],
1117
1200
  )
1118
- return r.concat(h).sort(Wt)
1201
+ return r.concat(h).sort(te)
1119
1202
  },
1120
- oe = (e, t) => {
1203
+ le = (e, t) => {
1121
1204
  const s = e.length,
1122
1205
  r = t.length
1123
1206
  return s > r ? s : r
1124
1207
  },
1125
- ue = (e, t, s) => {
1126
- const r = X(e, t, s)
1208
+ he = (e, t, s) => {
1209
+ const r = ot(e, t, s)
1127
1210
  return (
1128
1211
  r.forEach((n) => {
1129
- ae(n)
1212
+ de(n)
1130
1213
  }),
1131
1214
  r
1132
1215
  )
1133
1216
  },
1134
- ae = (e) => {
1135
- ;(Ee[e.type] || ce)(e)
1217
+ de = (e) => {
1218
+ ;(Ne[e.type] || pe)(e)
1136
1219
  },
1137
- ce = (e) => {},
1138
- le = (e) => {
1220
+ pe = (e) => {},
1221
+ me = (e) => {
1139
1222
  const { source: t, target: s } = e
1140
1223
  t.nodeValue = s.textContent
1141
1224
  },
1142
- he = (e) => {
1225
+ fe = (e) => {
1143
1226
  const { source: t } = e
1144
1227
  t.remove()
1145
1228
  },
1146
- de = (e) => {
1229
+ be = (e) => {
1147
1230
  const { target: t, data: s } = e,
1148
1231
  { parent: r, index: n } = s,
1149
1232
  i = r.childNodes[n]
1150
1233
  i ? i && i !== t && r.insertBefore(t, i) : r.appendChild(t)
1151
1234
  },
1152
- pe = (e) => {
1235
+ ve = (e) => {
1153
1236
  const { source: t, target: s } = e
1154
1237
  t.replaceWith(s)
1155
1238
  },
1156
- me = (e) => {
1239
+ ge = (e) => {
1157
1240
  const { source: t, data: s } = e,
1158
1241
  { name: r, isSvg: n } = s
1159
1242
  n ? t.removeAttributeNS(null, r) : t.removeAttribute(r)
1160
1243
  },
1161
- Y = (e) => {
1244
+ ut = (e) => {
1162
1245
  const { source: t, data: s } = e,
1163
1246
  { name: r, value: n, isSvg: i } = s
1164
1247
  i ? t.setAttributeNS(null, r, n) : t.setAttribute(r, n)
1165
1248
  },
1166
- fe = (e) => {
1167
- Y(e)
1249
+ ye = (e) => {
1250
+ ut(e)
1168
1251
  },
1169
- be = (e) => {
1252
+ Ee = (e) => {
1170
1253
  const t = e.data,
1171
1254
  s = e.source,
1172
1255
  { name: r, value: n } = t
1173
1256
  s.removeEventListener(r, n)
1174
1257
  },
1175
- ve = (e) => {
1258
+ Ae = (e) => {
1176
1259
  const t = e.data,
1177
1260
  s = e.source,
1178
1261
  { name: r, value: n } = t
1179
1262
  s.addEventListener(r, n)
1180
1263
  },
1181
- ge = (e) => {
1264
+ xe = (e) => {
1182
1265
  const t = e.data,
1183
1266
  s = e.source,
1184
1267
  { name: r, sourceValue: n, targetValue: i } = t
1185
1268
  s.removeEventListener(r, n), s.addEventListener(r, i)
1186
1269
  },
1187
- ye = (e) => {
1270
+ we = (e) => {
1188
1271
  const t = e.data,
1189
1272
  s = e.source,
1190
1273
  { value: r } = t
1191
1274
  s.value = r
1192
1275
  },
1193
- Ee = {
1194
- [o.changeText]: le,
1195
- [o.removeNode]: he,
1196
- [o.insertNode]: de,
1197
- [o.replaceNode]: pe,
1198
- [o.removeAttribute]: me,
1199
- [o.addAttribute]: Y,
1200
- [o.updateAttribute]: fe,
1201
- [o.removeEvent]: be,
1202
- [o.addEvent]: ve,
1203
- [o.updateEvent]: ge,
1204
- [o.changeValue]: ye,
1276
+ Ne = {
1277
+ [o.changeText]: me,
1278
+ [o.removeNode]: fe,
1279
+ [o.insertNode]: be,
1280
+ [o.replaceNode]: ve,
1281
+ [o.removeAttribute]: ge,
1282
+ [o.addAttribute]: ut,
1283
+ [o.updateAttribute]: ye,
1284
+ [o.removeEvent]: Ee,
1285
+ [o.addEvent]: Ae,
1286
+ [o.updateEvent]: xe,
1287
+ [o.changeValue]: we,
1205
1288
  },
1206
- xe = (e, t, s) => {
1289
+ _e = (e, t, s) => {
1207
1290
  const r = [...t]
1208
1291
  return (
1209
1292
  e.forEach((n) => {
1210
- Ae(n, r, s)
1293
+ Se(n, r, s)
1211
1294
  }),
1212
1295
  r
1213
1296
  )
1214
1297
  },
1215
- Ae = (e, t, s) => {
1216
- const r = Se[e.type]
1298
+ Se = (e, t, s) => {
1299
+ const r = Me[e.type]
1217
1300
  r && r(e, t, s)
1218
1301
  },
1219
- we = (e, t) => {
1302
+ Te = (e, t) => {
1220
1303
  const { source: s } = e,
1221
1304
  r = t.indexOf(s)
1222
1305
  r >= 0 && t.splice(r, 1)
1223
1306
  },
1224
- Ne = (e, t, s) => {
1307
+ je = (e, t, s) => {
1225
1308
  const { target: r } = e,
1226
1309
  n = e.data,
1227
1310
  { index: i, parent: a } = n
1228
1311
  s === a && t.splice(i, 0, r)
1229
1312
  },
1230
- _e = (e, t) => {
1313
+ Oe = (e, t) => {
1231
1314
  const { target: s, source: r } = e,
1232
1315
  n = t.indexOf(r)
1233
1316
  n >= 0 && (t[n] = s)
1234
1317
  },
1235
- Se = {
1236
- [o.removeNode]: we,
1237
- [o.insertNode]: Ne,
1238
- [o.replaceNode]: _e,
1318
+ Me = {
1319
+ [o.removeNode]: Te,
1320
+ [o.insertNode]: je,
1321
+ [o.replaceNode]: Oe,
1239
1322
  }
1240
- class Te {
1323
+ class ke {
1241
1324
  constructor({ Template: t, subscriptions: s, attributes: r, viewModel: n }) {
1242
1325
  ;(this.Template = t),
1243
1326
  (this.viewModel = n),
@@ -1269,8 +1352,8 @@ class Te {
1269
1352
  this.parentElement = r
1270
1353
  }
1271
1354
  const t = this.generateDom(this.renderKit),
1272
- s = ue(this.dom, t, this.parentElement)
1273
- this.dom = xe(s, this.dom, this.parentElement)
1355
+ s = he(this.dom, t, this.parentElement)
1356
+ this.dom = _e(s, this.dom, this.parentElement)
1274
1357
  }
1275
1358
  subscribeForRerender() {
1276
1359
  const { subscribe: t } = this.renderKit
@@ -1279,75 +1362,81 @@ class Te {
1279
1362
  })
1280
1363
  }
1281
1364
  eventName(t) {
1282
- return `${w}:${t}`
1365
+ return `${_}:${t}`
1283
1366
  }
1284
1367
  }
1285
- const je = (e) => e,
1286
- Oe = ({ Template: e, viewModel: t, subscriptions: s }) => (
1368
+ const $e = (e) => e,
1369
+ De = ({ Template: e, viewModel: t, subscriptions: s }) => (
1287
1370
  (s = s || []),
1288
- (t = t || je),
1371
+ (t = t || $e),
1289
1372
  (r) =>
1290
- new Te({ Template: e, viewModel: t, subscriptions: s, attributes: r })
1373
+ new ke({ Template: e, viewModel: t, subscriptions: s, attributes: r })
1291
1374
  ),
1292
- Me =
1375
+ Pe =
1293
1376
  (e) =>
1294
1377
  ({ path: t }) =>
1295
1378
  t === e,
1296
- ke = () => !0,
1297
- Z =
1379
+ Fe = () => !0,
1380
+ at =
1298
1381
  (e) =>
1299
1382
  ({ route: t }) => {
1300
1383
  const s = e.find((r) => r.match(t))
1301
1384
  return s && s.Partial
1302
1385
  },
1303
- ze = /* @__PURE__ */ Object.freeze(
1386
+ He = /* @__PURE__ */ Object.freeze(
1304
1387
  /* @__PURE__ */ Object.defineProperty(
1305
1388
  {
1306
1389
  __proto__: null,
1307
- buildRouter: Z,
1308
- catchAll: ke,
1309
- exactPathMatch: Me,
1390
+ buildRouter: at,
1391
+ catchAll: Fe,
1392
+ exactPathMatch: Pe,
1310
1393
  },
1311
1394
  Symbol.toStringTag,
1312
1395
  { value: 'Module' },
1313
1396
  ),
1314
1397
  ),
1315
- $e = () => ({
1398
+ Be = () => ({
1316
1399
  render: (e, t) => [],
1317
1400
  }),
1318
- Be = (e) => {
1319
- const t = Z(e)
1320
- return Oe({
1321
- Template: ({ route: r }) => (t({ route: r }) || $e)(),
1401
+ Qe = (e) => {
1402
+ const t = at(e)
1403
+ return De({
1404
+ Template: ({ route: r }) => (t({ route: r }) || Be)(),
1322
1405
  subscriptions: ['route'],
1323
1406
  })
1324
1407
  },
1325
- Ke = /* @__PURE__ */ Object.freeze(
1408
+ We = /* @__PURE__ */ Object.freeze(
1326
1409
  /* @__PURE__ */ Object.defineProperty(
1327
1410
  {
1328
1411
  __proto__: null,
1329
- createRouteState: P,
1330
- events: Nt,
1331
- extractQueryParams: L,
1332
- findHref: V,
1333
- navigate: E,
1334
- onLinkClick: F,
1335
- onLocationChange: z,
1336
- start: _t,
1412
+ createRouteState: R,
1413
+ events: Vt,
1414
+ extractQueryParams: I,
1415
+ findHref: U,
1416
+ navigate: N,
1417
+ onLinkClick: q,
1418
+ onLocationChange: C,
1419
+ start: Lt,
1337
1420
  },
1338
1421
  Symbol.toStringTag,
1339
1422
  { value: 'Module' },
1340
1423
  ),
1341
1424
  )
1342
1425
  export {
1343
- Le as JaxsTypes,
1344
- De as appBuilding,
1345
- Oe as bind,
1346
- Fe as createApp,
1347
- xt as jsx,
1348
- Pe as messageBus,
1349
- Ke as navigation,
1350
- Be as routedView,
1351
- ze as routing,
1352
- Ve as state,
1426
+ Ve as ArrayModifiers,
1427
+ Le as BooleanStore,
1428
+ Ie as Equality,
1429
+ Re as Is,
1430
+ Ge as JaxsTypes,
1431
+ ze as ListStore,
1432
+ Ke as RecordStore,
1433
+ Ue as appBuilding,
1434
+ De as bind,
1435
+ Je as createApp,
1436
+ Pt as jsx,
1437
+ qe as messageBus,
1438
+ We as navigation,
1439
+ Qe as routedView,
1440
+ He as routing,
1441
+ Ce as state,
1353
1442
  }