jaxs 0.9.4 → 0.9.6

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
@@ -8,7 +8,7 @@ const M = (e, t) => {
8
8
  },
9
9
  $ = (e, t, s) => (e.splice(t, 0, s), e),
10
10
  B = (e, t) => (e.includes(t) || e.push(t), e),
11
- Le = {
11
+ ze = {
12
12
  remove: M,
13
13
  removeBy: k,
14
14
  insertAt: $,
@@ -26,7 +26,7 @@ const M = (e, t) => {
26
26
  includes: (e, t) => e.includes(t),
27
27
  // reader
28
28
  }
29
- class lt {
29
+ class ht {
30
30
  constructor(t) {
31
31
  this.store = t
32
32
  }
@@ -56,8 +56,8 @@ class lt {
56
56
  return this.value === !1
57
57
  }
58
58
  }
59
- const f = (e) => new lt(e),
60
- ze = {
59
+ const f = (e) => new ht(e),
60
+ Ke = {
61
61
  toggle: (e) => f(e).toggle(),
62
62
  setTrue: (e) => f(e).setTrue(),
63
63
  setFalse: (e) => f(e).setFalse(),
@@ -65,7 +65,7 @@ const f = (e) => new lt(e),
65
65
  isTrue: (e) => f(e).isTrue(),
66
66
  isFalse: (e) => f(e).isFalse(),
67
67
  }
68
- class ht {
68
+ class dt {
69
69
  constructor(t) {
70
70
  this.store = t
71
71
  }
@@ -128,8 +128,8 @@ class ht {
128
128
  n !== -1 && ((r[n] = s), this.update(r))
129
129
  }
130
130
  }
131
- const m = (e) => new ht(e),
132
- Ke = {
131
+ const m = (e) => new dt(e),
132
+ Re = {
133
133
  push: (e, t) => m(e).push(t),
134
134
  pop: (e) => m(e).pop(),
135
135
  unshift: (e, t) => m(e).unshift(t),
@@ -184,27 +184,27 @@ class pt {
184
184
  }
185
185
  }
186
186
  const b = (e) => new pt(e),
187
- Re = {
187
+ Ue = {
188
188
  reset: (e) => b(e).reset(),
189
189
  resetAttribute: (e, t) => b(e).resetAttribute(t),
190
190
  updateAttribute: (e, t, s) => b(e).updateAttribute(t, s),
191
191
  updateAttributes: (e, t) => b(e).updateAttributes(t),
192
192
  attributeTruthy: (e, t) => b(e).attributeTruthy(t),
193
193
  },
194
- dt = (e) => typeof e == 'boolean',
195
- mt = (e) => typeof e == 'number',
194
+ mt = (e) => typeof e == 'boolean',
195
+ ft = (e) => typeof e == 'number',
196
196
  D = (e) => typeof e == 'string',
197
197
  v = (e) => Array.isArray(e),
198
198
  g = (e) => e !== null && !v(e) && typeof e == 'object',
199
- Ue = {
200
- boolean: dt,
201
- number: mt,
199
+ qe = {
200
+ boolean: mt,
201
+ number: ft,
202
202
  string: D,
203
203
  array: v,
204
204
  object: g,
205
205
  },
206
- ft = (e, t) => t.createElement(e),
207
- bt = (e, t) => {
206
+ bt = (e, t) => t.createElement(e),
207
+ vt = (e, t) => {
208
208
  for (const s in t) {
209
209
  if (s === '__self') continue
210
210
  const r = t[s].toString()
@@ -215,7 +215,7 @@ const b = (e) => new pt(e),
215
215
  D(r) && r.trim() === '' ? e.removeAttribute(s) : e.setAttribute(s, r)
216
216
  }
217
217
  },
218
- vt = (e, t, s) => {
218
+ yt = (e, t, s) => {
219
219
  const r = {}
220
220
  for (const n in t) {
221
221
  const i = t[n],
@@ -229,12 +229,12 @@ const b = (e) => new pt(e),
229
229
  }
230
230
  e.eventMaps = r
231
231
  },
232
- yt = (e, t, s, r) => {
233
- const n = ft(e, r.document)
234
- return bt(n, t), vt(n, s, r.publish), n
232
+ gt = (e, t, s, r) => {
233
+ const n = bt(e, r.document)
234
+ return vt(n, t), yt(n, s, r.publish), n
235
235
  },
236
236
  w = 'http://www.w3.org/2000/svg',
237
- gt = {
237
+ Et = {
238
238
  animate: !0,
239
239
  animateMotion: !0,
240
240
  animateTransform: !0,
@@ -298,8 +298,8 @@ const b = (e) => new pt(e),
298
298
  use: !0,
299
299
  view: !0,
300
300
  },
301
- Et = (e, t) => !!(gt[e] || (e === 'a' && t === w)),
302
- At = (e, t, s) => {
301
+ At = (e, t) => !!(Et[e] || (e === 'a' && t === w)),
302
+ xt = (e, t, s) => {
303
303
  const r = s.createElementNS(w, e)
304
304
  for (const n in t)
305
305
  n === '__self' ||
@@ -307,24 +307,24 @@ const b = (e) => new pt(e),
307
307
  r.setAttributeNS(null, n, t[n].toString())
308
308
  return r
309
309
  },
310
- xt = (e) => e.namespaceURI === w,
311
- wt = (e, t) => t.createTextNode(e)
312
- class Nt {
310
+ wt = (e) => e.namespaceURI === w,
311
+ Nt = (e, t) => t.createTextNode(e)
312
+ class _t {
313
313
  constructor(t) {
314
314
  this.value = t.toString()
315
315
  }
316
316
  render(t) {
317
- const s = wt(this.value, t.document)
317
+ const s = Nt(this.value, t.document)
318
318
  return (s.__jsx = 'TextNode'), [s]
319
319
  }
320
320
  }
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] : []),
321
+ const St = (e) => typeof e == 'string' || typeof e == 'number',
322
+ Tt = (e) => new _t(e),
323
+ jt = (e) => (St(e) ? Tt(e) : e),
324
+ P = (e) => Ot(e).map(jt).flat(),
325
+ Ot = (e) => (Array.isArray(e) ? e.flat() : e ? [e] : []),
326
326
  F = (e, t = {}) => P(e || t.children || []),
327
- Ot = (e, t = '') => {
327
+ Mt = (e, t = '') => {
328
328
  const s = {},
329
329
  r = {}
330
330
  for (const n in e) {
@@ -334,7 +334,7 @@ const _t = (e) => typeof e == 'string' || typeof e == 'number',
334
334
  r[o] = i ? i.toString() : ''
335
335
  } else {
336
336
  if (i === !1) continue
337
- n === '__source' ? (s.__source = e.__source) : (s[n] = Mt(n, i, t))
337
+ n === '__source' ? (s.__source = e.__source) : (s[n] = kt(n, i, t))
338
338
  }
339
339
  }
340
340
  return {
@@ -342,14 +342,14 @@ const _t = (e) => typeof e == 'string' || typeof e == 'number',
342
342
  events: r,
343
343
  }
344
344
  },
345
- Mt = (e, t, s = '') => (t == null ? s : t.toString()),
346
- kt = (e, t) => {
345
+ kt = (e, t, s = '') => (t == null ? s : t.toString()),
346
+ $t = (e, t) => {
347
347
  const s = e || {},
348
348
  r = F(t, s)
349
349
  return (s.children = s.children || r), s
350
350
  },
351
- V = (e, t, s, r = []) => e.reduce($t(t, s), r).flat(),
352
- $t = (e, t) => (s, r) =>
351
+ V = (e, t, s, r = []) => e.reduce(Bt(t, s), r).flat(),
352
+ Bt = (e, t) => (s, r) =>
353
353
  r
354
354
  ? Array.isArray(r)
355
355
  ? V(r, e, t, s)
@@ -373,7 +373,7 @@ class L {
373
373
  t.forEach((r) => s.appendChild(r))
374
374
  }
375
375
  }
376
- class Bt {
376
+ class Dt {
377
377
  constructor(t, s) {
378
378
  ;(this.type = t), (this.attributes = s)
379
379
  }
@@ -399,13 +399,13 @@ class Bt {
399
399
  return `${this.type}${t}${s}${r}`
400
400
  }
401
401
  }
402
- class Dt {
402
+ class Pt {
403
403
  constructor(t, s, r = []) {
404
404
  this.type = t
405
- const { events: n, attributes: i } = Ot(s)
405
+ const { events: n, attributes: i } = Mt(s)
406
406
  ;(this.events = n),
407
407
  (this.attributes = i),
408
- (this.isSvg = Et(this.type, this.attributes.xmlns)),
408
+ (this.isSvg = At(this.type, this.attributes.xmlns)),
409
409
  (this.children = new L(r))
410
410
  }
411
411
  render(t) {
@@ -416,24 +416,24 @@ class Dt {
416
416
  return this.isSvg ? this.generateSvgDom(t) : this.generateHtmlDom(t)
417
417
  }
418
418
  generateHtmlDom(t) {
419
- const s = yt(this.type, this.attributes, this.events, t)
419
+ const s = gt(this.type, this.attributes, this.events, t)
420
420
  return (s.__jsx = this.jsxKey()), s
421
421
  }
422
422
  generateSvgDom(t) {
423
- const s = At(this.type, this.attributes, t.document)
423
+ const s = xt(this.type, this.attributes, t.document)
424
424
  return (s.__jsx = this.jsxKey()), s
425
425
  }
426
426
  jsxKey() {
427
- return new Bt(this.type, this.attributes).generate()
427
+ return new Dt(this.type, this.attributes).generate()
428
428
  }
429
429
  }
430
- const Pt = (e, t, ...s) =>
431
- typeof e == 'string' ? new Dt(e, t, s) : e(kt(t, s))
432
- Pt.fragment = (e, t) => {
430
+ const Ft = (e, t, ...s) =>
431
+ typeof e == 'string' ? new Pt(e, t, s) : e($t(t, s))
432
+ Ft.fragment = (e, t) => {
433
433
  const s = F(t, e)
434
434
  return new L(s)
435
435
  }
436
- class Ft {
436
+ class Vt {
437
437
  constructor(t, s, r) {
438
438
  ;(this.template = t),
439
439
  (this.selector = s),
@@ -458,15 +458,15 @@ class Ft {
458
458
  return this.renderKit.document.querySelector(this.selector)
459
459
  }
460
460
  }
461
- const Vt = (e, t, s) => {
462
- const r = new Ft(e, t, s)
461
+ const Lt = (e, t, s) => {
462
+ const r = new Vt(e, t, s)
463
463
  return r.renderAndAttach(s), r
464
464
  },
465
465
  z = 'go-to-href',
466
466
  K = 'go-to',
467
467
  y = 'navigation:location-change',
468
468
  R = 'navigation:route-change',
469
- Lt = /* @__PURE__ */ Object.freeze(
469
+ zt = /* @__PURE__ */ Object.freeze(
470
470
  /* @__PURE__ */ Object.defineProperty(
471
471
  {
472
472
  __proto__: null,
@@ -538,7 +538,7 @@ const Vt = (e, t, s) => {
538
538
  Q = (e) => {
539
539
  W(e), G(e), C(e)
540
540
  },
541
- zt = /* @__PURE__ */ Object.freeze(
541
+ Kt = /* @__PURE__ */ Object.freeze(
542
542
  /* @__PURE__ */ Object.defineProperty(
543
543
  {
544
544
  __proto__: null,
@@ -571,14 +571,14 @@ class X {
571
571
  (this.roots = [])
572
572
  }
573
573
  render(t, s) {
574
- const r = Vt(t, s, this.renderKit)
574
+ const r = Lt(t, s, this.renderKit)
575
575
  return this.roots.push(r), r
576
576
  }
577
577
  startNavigation() {
578
578
  Q(this)
579
579
  }
580
580
  }
581
- const qe = /* @__PURE__ */ Object.freeze(
581
+ const Ie = /* @__PURE__ */ Object.freeze(
582
582
  /* @__PURE__ */ Object.defineProperty(
583
583
  {
584
584
  __proto__: null,
@@ -671,7 +671,7 @@ class _ {
671
671
  ((this.callCount += 1), this.publish(this.event, this.payload))
672
672
  }
673
673
  }
674
- const Kt = (e) => (t, s) => {
674
+ const Rt = (e) => (t, s) => {
675
675
  const { offset: r, period: n, payload: i } = s,
676
676
  o = ({ callCount: u }) => (r && u == 0 ? r : n),
677
677
  a = new _({
@@ -682,7 +682,7 @@ const Kt = (e) => (t, s) => {
682
682
  })
683
683
  return a.start(), a.stop
684
684
  },
685
- Rt =
685
+ Ut =
686
686
  (e) =>
687
687
  (t, { timeout: s, payload: r }) => {
688
688
  const n = ({ callCount: o, stop: a }) => (o > 1 && a(), s),
@@ -694,7 +694,7 @@ const Kt = (e) => (t, s) => {
694
694
  })
695
695
  return i.start(), i.stop
696
696
  },
697
- Ut = (e) => (t, s) => {
697
+ qt = (e) => (t, s) => {
698
698
  const r = {
699
699
  ...s,
700
700
  event: t,
@@ -736,59 +736,64 @@ class tt {
736
736
  return {
737
737
  eventName: t,
738
738
  ...this.options,
739
- publish: this.publish.bind(this),
739
+ publish: et(this.publish.bind(this)),
740
740
  payload: s,
741
741
  }
742
742
  }
743
743
  }
744
- const et = () => {
745
- const e = new tt(),
746
- t = (r, n) => e.publish(r, n)
744
+ const et = (e) => {
745
+ const t = e
747
746
  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
- }
747
+ (t.withTimeout = Ut(e)),
748
+ (t.periodically = Rt(e)),
749
+ (t.periodicallyWithCustomTimer = qt(e)),
750
+ t
756
751
  )
757
752
  },
758
- Ie = /* @__PURE__ */ Object.freeze(
753
+ st = () => {
754
+ const e = new tt(),
755
+ t = (r, n) => e.publish(r, n),
756
+ s = (r, n) => e.subscribe(r, n)
757
+ return {
758
+ bus: e,
759
+ publish: et(t),
760
+ subscribe: s,
761
+ }
762
+ },
763
+ Je = /* @__PURE__ */ Object.freeze(
759
764
  /* @__PURE__ */ Object.defineProperty(
760
765
  {
761
766
  __proto__: null,
762
767
  ExactSubscriptions: Y,
763
768
  FuzzySubscriptions: Z,
764
769
  JaxsBus: tt,
765
- createBus: et,
770
+ createBus: st,
766
771
  },
767
772
  Symbol.toStringTag,
768
773
  { value: 'Module' },
769
774
  ),
770
775
  ),
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)
776
+ It = (e, t) => e === t,
777
+ Jt = (e, t) => Object.keys(e).length === Object.keys(t).length,
778
+ rt = (e, t) =>
779
+ !(g(e) && g(t)) || !Jt(e, t)
775
780
  ? !1
776
781
  : Object.keys(e).every((s) => {
777
782
  const r = e[s],
778
783
  n = t[s]
779
784
  return E(r, n)
780
785
  }),
781
- rt = (e, t) =>
786
+ nt = (e, t) =>
782
787
  !(v(e) && v(t)) || e.length !== t.length
783
788
  ? !1
784
789
  : e.every((s, r) => {
785
790
  const n = t[r]
786
791
  return E(s, n)
787
792
  }),
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,
793
+ E = (e, t) => (g(e) ? rt(e, t) : v(e) ? nt(e, t) : It(e, t)),
794
+ He = {
795
+ objects: rt,
796
+ arrays: nt,
792
797
  equal: E,
793
798
  }
794
799
  class x {
@@ -821,7 +826,7 @@ class x {
821
826
  }
822
827
  }
823
828
  const S = 'state'
824
- class nt {
829
+ class it {
825
830
  constructor(t) {
826
831
  ;(this.publisher = t),
827
832
  (this.stores = {}),
@@ -881,21 +886,21 @@ class nt {
881
886
  return `${this.eventNamePrefix}:${t}`
882
887
  }
883
888
  }
884
- const it = (e) => new nt(e),
885
- He = /* @__PURE__ */ Object.freeze(
889
+ const ot = (e) => new it(e),
890
+ Ge = /* @__PURE__ */ Object.freeze(
886
891
  /* @__PURE__ */ Object.defineProperty(
887
892
  {
888
893
  __proto__: null,
889
- State: nt,
894
+ State: it,
890
895
  Store: x,
891
- createState: it,
896
+ createState: ot,
892
897
  eventName: S,
893
898
  },
894
899
  Symbol.toStringTag,
895
900
  { value: 'Module' },
896
901
  ),
897
902
  )
898
- class Jt {
903
+ class Ht {
899
904
  constructor(t) {
900
905
  this.setupDomEnvironment(t)
901
906
  }
@@ -924,11 +929,11 @@ class Jt {
924
929
  : ((this.window = window), (this.document = document))
925
930
  }
926
931
  setupBus() {
927
- const { publish: t, subscribe: s, bus: r } = et()
932
+ const { publish: t, subscribe: s, bus: r } = st()
928
933
  ;(this.publish = t), (this.subscribe = s), (this.bus = r)
929
934
  }
930
935
  setupState() {
931
- this.state = it(this.publish)
936
+ this.state = ot(this.publish)
932
937
  }
933
938
  addBusOptions() {
934
939
  this.bus.addListenerOptions({
@@ -947,8 +952,8 @@ class Jt {
947
952
  }
948
953
  }
949
954
  }
950
- const Ge = (e = {}) => {
951
- const s = new Jt(e).setup()
955
+ const We = (e = {}) => {
956
+ const s = new Ht(e).setup()
952
957
  return s.startNavigation(), s
953
958
  }
954
959
  var c = /* @__PURE__ */ ((e) => (
@@ -965,7 +970,7 @@ var c = /* @__PURE__ */ ((e) => (
965
970
  (e[(e.changeText = 10)] = 'changeText'),
966
971
  e
967
972
  ))(c || {})
968
- const We = /* @__PURE__ */ Object.freeze(
973
+ const Ce = /* @__PURE__ */ Object.freeze(
969
974
  /* @__PURE__ */ Object.defineProperty(
970
975
  {
971
976
  __proto__: null,
@@ -975,49 +980,49 @@ const We = /* @__PURE__ */ Object.freeze(
975
980
  { value: 'Module' },
976
981
  ),
977
982
  ),
978
- Ht = (e, t) => ({
983
+ Gt = (e, t) => ({
979
984
  source: e,
980
985
  target: t,
981
986
  type: c.changeText,
982
987
  data: {},
983
988
  }),
984
- Gt = (e, t) => ({
989
+ Wt = (e, t) => ({
985
990
  source: e,
986
991
  target: t,
987
992
  type: c.replaceNode,
988
993
  data: {},
989
994
  }),
990
- Wt = (e, t, s) => ({
995
+ Ct = (e, t, s) => ({
991
996
  source: e,
992
997
  target: t,
993
998
  data: s,
994
999
  type: c.removeAttribute,
995
1000
  }),
996
- Ct = (e, t, s) => ({
1001
+ Qt = (e, t, s) => ({
997
1002
  source: e,
998
1003
  target: t,
999
1004
  data: s,
1000
1005
  type: c.addAttribute,
1001
1006
  }),
1002
- Qt = (e, t, s) => ({
1007
+ Xt = (e, t, s) => ({
1003
1008
  source: e,
1004
1009
  target: t,
1005
1010
  data: s,
1006
1011
  type: c.updateAttribute,
1007
1012
  }),
1008
- Xt = (e, t, s) => ({
1013
+ Yt = (e, t, s) => ({
1009
1014
  source: e,
1010
1015
  target: t,
1011
1016
  data: s,
1012
1017
  type: c.removeEvent,
1013
1018
  }),
1014
- Yt = (e, t, s) => ({
1019
+ Zt = (e, t, s) => ({
1015
1020
  source: e,
1016
1021
  target: t,
1017
1022
  data: s,
1018
1023
  type: c.addEvent,
1019
1024
  }),
1020
- Zt = (e, t, s) => ({
1025
+ te = (e, t, s) => ({
1021
1026
  source: e,
1022
1027
  target: t,
1023
1028
  data: s,
@@ -1037,15 +1042,15 @@ const We = /* @__PURE__ */ Object.freeze(
1037
1042
  type: c.insertNode,
1038
1043
  data: t,
1039
1044
  }),
1040
- te = (e, t, s) => ({
1045
+ ee = (e, t, s) => ({
1041
1046
  source: e,
1042
1047
  target: t,
1043
1048
  type: c.changeValue,
1044
1049
  data: s,
1045
1050
  }),
1046
- ee = (e, t) => (e.type > t.type ? 1 : e.type < t.type ? -1 : 0),
1051
+ se = (e, t) => (e.type > t.type ? 1 : e.type < t.type ? -1 : 0),
1047
1052
  j = { index: -1 }
1048
- class se {
1053
+ class re {
1049
1054
  constructor() {
1050
1055
  this.map = {}
1051
1056
  }
@@ -1079,53 +1084,53 @@ class se {
1079
1084
  }
1080
1085
  }
1081
1086
  const O = (e) => {
1082
- const t = new se()
1087
+ const t = new re()
1083
1088
  return t.populate(e), t
1084
1089
  },
1085
- ot = (e, t, s = !1) => {
1090
+ ut = (e, t, s = !1) => {
1086
1091
  const r = [],
1087
1092
  n = e.attributes,
1088
1093
  i = n.length,
1089
1094
  o = t.attributes,
1090
1095
  a = o.length
1091
- let u, h, p
1096
+ let u, h, d
1092
1097
  for (u = 0; u < i; u++) {
1093
- p = null
1098
+ d = null
1094
1099
  const l = n.item(u)
1095
1100
  if (l) {
1096
1101
  for (h = 0; h < a; h++) {
1097
- const d = o.item(h)
1098
- if (d && l.name == d.name) {
1099
- p = d
1102
+ const p = o.item(h)
1103
+ if (p && l.name == p.name) {
1104
+ d = p
1100
1105
  break
1101
1106
  }
1102
1107
  }
1103
- p
1104
- ? l.value !== p.value &&
1108
+ d
1109
+ ? l.value !== d.value &&
1105
1110
  r.push(
1106
- Qt(e, t, {
1111
+ Xt(e, t, {
1107
1112
  name: l.name,
1108
- value: p.value,
1113
+ value: d.value,
1109
1114
  isSvg: s,
1110
1115
  }),
1111
1116
  )
1112
- : r.push(Wt(e, t, { name: l.name, isSvg: s }))
1117
+ : r.push(Ct(e, t, { name: l.name, isSvg: s }))
1113
1118
  }
1114
1119
  }
1115
1120
  for (u = 0; u < a; u++) {
1116
- p = null
1121
+ d = null
1117
1122
  const l = o.item(u)
1118
1123
  if (l) {
1119
1124
  for (h = 0; h < i; h++) {
1120
- const d = n.item(h)
1121
- if (d && d.name == l.name) {
1122
- p = d
1125
+ const p = n.item(h)
1126
+ if (p && p.name == l.name) {
1127
+ d = p
1123
1128
  break
1124
1129
  }
1125
1130
  }
1126
- p ||
1131
+ d ||
1127
1132
  r.push(
1128
- Ct(e, t, {
1133
+ Qt(e, t, {
1129
1134
  name: l.name,
1130
1135
  value: l.value,
1131
1136
  isSvg: s,
@@ -1135,7 +1140,7 @@ const O = (e) => {
1135
1140
  }
1136
1141
  return r
1137
1142
  },
1138
- re = (e, t) => {
1143
+ ne = (e, t) => {
1139
1144
  const s = [],
1140
1145
  r = e.eventMaps,
1141
1146
  n = t.eventMaps,
@@ -1148,14 +1153,14 @@ const O = (e) => {
1148
1153
  h
1149
1154
  ? h.busEvent !== u.busEvent &&
1150
1155
  s.push(
1151
- Zt(e, t, {
1156
+ te(e, t, {
1152
1157
  name: a,
1153
1158
  targetValue: h.listener,
1154
1159
  sourceValue: u.listener,
1155
1160
  }),
1156
1161
  )
1157
1162
  : s.push(
1158
- Xt(e, t, {
1163
+ Yt(e, t, {
1159
1164
  name: u.domEvent,
1160
1165
  value: u.listener,
1161
1166
  }),
@@ -1166,7 +1171,7 @@ const O = (e) => {
1166
1171
  h = n[a]
1167
1172
  u ||
1168
1173
  s.push(
1169
- Yt(e, t, {
1174
+ Zt(e, t, {
1170
1175
  name: h.domEvent,
1171
1176
  value: h.listener,
1172
1177
  }),
@@ -1175,201 +1180,201 @@ const O = (e) => {
1175
1180
  s
1176
1181
  )
1177
1182
  },
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 []
1183
+ ie = (e) => e.tagName !== 'INPUT',
1184
+ oe = (e, t) => e.value === t.value,
1185
+ ue = (e, t) => {
1186
+ if (ie(e) || oe(e, t)) return []
1182
1187
  const s = e,
1183
1188
  r = t
1184
- return [te(s, r, { name: 'value', value: r.value })]
1189
+ return [ee(s, r, { name: 'value', value: r.value })]
1185
1190
  },
1186
- ue = (e, t) => {
1187
- const s = ot(e, t),
1188
- r = re(e, t),
1189
- n = oe(e, t)
1191
+ ae = (e, t) => {
1192
+ const s = ut(e, t),
1193
+ r = ne(e, t),
1194
+ n = ue(e, t)
1190
1195
  return s.concat(r).concat(n)
1191
1196
  },
1192
- ae = (e, t) => ot(e, t, !0),
1193
- ce = (e, t) => (e.textContent !== t.textContent ? [Ht(e, t)] : []),
1194
- le = (e, t, s) => {
1197
+ ce = (e, t) => ut(e, t, !0),
1198
+ le = (e, t) => (e.textContent !== t.textContent ? [Gt(e, t)] : []),
1199
+ he = (e, t, s) => {
1195
1200
  let r = []
1196
- if (e.nodeType === 1 && xt(e)) {
1201
+ if (e.nodeType === 1 && wt(e)) {
1197
1202
  const n = e,
1198
1203
  i = t,
1199
- o = ae(n, i),
1204
+ o = ce(n, i),
1200
1205
  a = s(n.childNodes, i.childNodes, n)
1201
1206
  r = o.concat(a)
1202
1207
  } else if (e.nodeType === 1) {
1203
1208
  const n = e,
1204
1209
  i = t,
1205
- o = ue(n, i),
1210
+ o = ae(n, i),
1206
1211
  a = s(n.childNodes, i.childNodes, n)
1207
1212
  r = o.concat(a)
1208
- } else e.nodeType === 3 && (r = ce(e, t))
1213
+ } else e.nodeType === 3 && (r = le(e, t))
1209
1214
  return r
1210
1215
  },
1211
- ut = (e, t, s) => {
1216
+ at = (e, t, s) => {
1212
1217
  const r = [],
1213
- n = he(e, t),
1218
+ n = de(e, t),
1214
1219
  i = O(e),
1215
1220
  o = O(t),
1216
1221
  a = []
1217
1222
  let u = 0
1218
1223
  for (; u < n; u++) {
1219
- const p = e[u],
1224
+ const d = e[u],
1220
1225
  l = t[u]
1221
1226
  if (l && o.check(l)) {
1222
- const d = i.pullMatch(l)
1227
+ const p = i.pullMatch(l)
1223
1228
  o.clear(l),
1224
- d.element
1225
- ? (d.index !== u &&
1229
+ p.element
1230
+ ? (p.index !== u &&
1226
1231
  r.push(
1227
- A(d.element, {
1232
+ A(p.element, {
1228
1233
  parent: s,
1229
1234
  index: u,
1230
1235
  }),
1231
1236
  ),
1232
1237
  a.push({
1233
- source: d.element,
1238
+ source: p.element,
1234
1239
  target: l,
1235
1240
  }))
1236
- : p
1237
- ? o.check(p)
1241
+ : d
1242
+ ? o.check(d)
1238
1243
  ? r.push(A(l, { parent: s, index: u }))
1239
- : (i.clear(p), r.push(Gt(p, l)))
1244
+ : (i.clear(d), r.push(Wt(d, l)))
1240
1245
  : r.push(A(l, { parent: s, index: u }))
1241
- } else p && i.pullMatch(p).element && r.push(T(p))
1246
+ } else d && i.pullMatch(d).element && r.push(T(d))
1242
1247
  }
1243
- i.remaining().forEach(({ element: p }) => {
1244
- r.push(T(p))
1248
+ i.remaining().forEach(({ element: d }) => {
1249
+ r.push(T(d))
1245
1250
  })
1246
1251
  const h = a.reduce(
1247
- (p, { source: l, target: d }) => p.concat(le(l, d, ut)),
1252
+ (d, { source: l, target: p }) => d.concat(he(l, p, at)),
1248
1253
  [],
1249
1254
  )
1250
- return r.concat(h).sort(ee)
1255
+ return r.concat(h).sort(se)
1251
1256
  },
1252
- he = (e, t) => {
1257
+ de = (e, t) => {
1253
1258
  const s = e.length,
1254
1259
  r = t.length
1255
1260
  return s > r ? s : r
1256
1261
  },
1257
1262
  pe = (e, t, s) => {
1258
- const r = ut(e, t, s)
1263
+ const r = at(e, t, s)
1259
1264
  return (
1260
1265
  r.forEach((n) => {
1261
- de(n)
1266
+ me(n)
1262
1267
  }),
1263
1268
  r
1264
1269
  )
1265
1270
  },
1266
- de = (e) => {
1267
- ;(_e[e.type] || me)(e)
1271
+ me = (e) => {
1272
+ ;(Se[e.type] || fe)(e)
1268
1273
  },
1269
- me = (e) => {},
1270
- fe = (e) => {
1274
+ fe = (e) => {},
1275
+ be = (e) => {
1271
1276
  const { source: t, target: s } = e
1272
1277
  t.nodeValue = s.textContent
1273
1278
  },
1274
- be = (e) => {
1279
+ ve = (e) => {
1275
1280
  const { source: t } = e
1276
1281
  t.remove()
1277
1282
  },
1278
- ve = (e) => {
1283
+ ye = (e) => {
1279
1284
  const { target: t, data: s } = e,
1280
1285
  { parent: r, index: n } = s,
1281
1286
  i = r.childNodes[n]
1282
1287
  i ? i && i !== t && r.insertBefore(t, i) : r.appendChild(t)
1283
1288
  },
1284
- ye = (e) => {
1289
+ ge = (e) => {
1285
1290
  const { source: t, target: s } = e
1286
1291
  t.replaceWith(s)
1287
1292
  },
1288
- ge = (e) => {
1293
+ Ee = (e) => {
1289
1294
  const { source: t, data: s } = e,
1290
1295
  { name: r, isSvg: n } = s
1291
1296
  n ? t.removeAttributeNS(null, r) : t.removeAttribute(r)
1292
1297
  },
1293
- at = (e) => {
1298
+ ct = (e) => {
1294
1299
  const { source: t, data: s } = e,
1295
1300
  { name: r, value: n, isSvg: i } = s
1296
1301
  i ? t.setAttributeNS(null, r, n) : t.setAttribute(r, n)
1297
1302
  },
1298
- Ee = (e) => {
1299
- at(e)
1300
- },
1301
1303
  Ae = (e) => {
1304
+ ct(e)
1305
+ },
1306
+ xe = (e) => {
1302
1307
  const t = e.data,
1303
1308
  s = e.source,
1304
1309
  { name: r, value: n } = t
1305
1310
  s.removeEventListener(r, n)
1306
1311
  },
1307
- xe = (e) => {
1312
+ we = (e) => {
1308
1313
  const t = e.data,
1309
1314
  s = e.source,
1310
1315
  { name: r, value: n } = t
1311
1316
  s.addEventListener(r, n)
1312
1317
  },
1313
- we = (e) => {
1318
+ Ne = (e) => {
1314
1319
  const t = e.data,
1315
1320
  s = e.source,
1316
1321
  { name: r, sourceValue: n, targetValue: i } = t
1317
1322
  s.removeEventListener(r, n), s.addEventListener(r, i)
1318
1323
  },
1319
- Ne = (e) => {
1324
+ _e = (e) => {
1320
1325
  const t = e.data,
1321
1326
  s = e.source,
1322
1327
  { value: r } = t
1323
1328
  s.value = r
1324
1329
  },
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,
1330
+ Se = {
1331
+ [c.changeText]: be,
1332
+ [c.removeNode]: ve,
1333
+ [c.insertNode]: ye,
1334
+ [c.replaceNode]: ge,
1335
+ [c.removeAttribute]: Ee,
1336
+ [c.addAttribute]: ct,
1337
+ [c.updateAttribute]: Ae,
1338
+ [c.removeEvent]: xe,
1339
+ [c.addEvent]: we,
1340
+ [c.updateEvent]: Ne,
1341
+ [c.changeValue]: _e,
1337
1342
  },
1338
- Se = (e, t, s) => {
1343
+ Te = (e, t, s) => {
1339
1344
  const r = [...t]
1340
1345
  return (
1341
1346
  e.forEach((n) => {
1342
- Te(n, r, s)
1347
+ je(n, r, s)
1343
1348
  }),
1344
1349
  r
1345
1350
  )
1346
1351
  },
1347
- Te = (e, t, s) => {
1348
- const r = ke[e.type]
1352
+ je = (e, t, s) => {
1353
+ const r = $e[e.type]
1349
1354
  r && r(e, t, s)
1350
1355
  },
1351
- je = (e, t) => {
1356
+ Oe = (e, t) => {
1352
1357
  const { source: s } = e,
1353
1358
  r = t.indexOf(s)
1354
1359
  r >= 0 && t.splice(r, 1)
1355
1360
  },
1356
- Oe = (e, t, s) => {
1361
+ Me = (e, t, s) => {
1357
1362
  const { target: r } = e,
1358
1363
  n = e.data,
1359
1364
  { index: i, parent: o } = n
1360
1365
  s === o && t.splice(i, 0, r)
1361
1366
  },
1362
- Me = (e, t) => {
1367
+ ke = (e, t) => {
1363
1368
  const { target: s, source: r } = e,
1364
1369
  n = t.indexOf(r)
1365
1370
  n >= 0 && (t[n] = s)
1366
1371
  },
1367
- ke = {
1368
- [c.removeNode]: je,
1369
- [c.insertNode]: Oe,
1370
- [c.replaceNode]: Me,
1372
+ $e = {
1373
+ [c.removeNode]: Oe,
1374
+ [c.insertNode]: Me,
1375
+ [c.replaceNode]: ke,
1371
1376
  }
1372
- class $e {
1377
+ class Be {
1373
1378
  constructor({ Template: t, subscriptions: s, attributes: r, viewModel: n }) {
1374
1379
  ;(this.Template = t),
1375
1380
  (this.viewModel = n),
@@ -1402,7 +1407,7 @@ class $e {
1402
1407
  }
1403
1408
  const t = this.generateDom(this.renderKit),
1404
1409
  s = pe(this.dom, t, this.parentElement)
1405
- this.dom = Se(s, this.dom, this.parentElement)
1410
+ this.dom = Te(s, this.dom, this.parentElement)
1406
1411
  }
1407
1412
  subscribeForRerender() {
1408
1413
  const { subscribe: t } = this.renderKit
@@ -1414,78 +1419,78 @@ class $e {
1414
1419
  return `${S}:${t}`
1415
1420
  }
1416
1421
  }
1417
- const Be = (e) => e,
1418
- De = ({ Template: e, viewModel: t, subscriptions: s }) => (
1422
+ const De = (e) => e,
1423
+ Pe = ({ Template: e, viewModel: t, subscriptions: s }) => (
1419
1424
  (s = s || []),
1420
- (t = t || Be),
1425
+ (t = t || De),
1421
1426
  (r) =>
1422
- new $e({ Template: e, viewModel: t, subscriptions: s, attributes: r })
1427
+ new Be({ Template: e, viewModel: t, subscriptions: s, attributes: r })
1423
1428
  ),
1424
- Pe =
1429
+ Fe =
1425
1430
  (e) =>
1426
1431
  ({ path: t }) =>
1427
1432
  t === e,
1428
- Fe = () => !0,
1429
- ct =
1433
+ Ve = () => !0,
1434
+ lt =
1430
1435
  (e) =>
1431
1436
  ({ route: t }) => {
1432
1437
  const s = e.find((r) => r.match(t))
1433
1438
  return s && s.Partial
1434
1439
  },
1435
- Ce = /* @__PURE__ */ Object.freeze(
1440
+ Qe = /* @__PURE__ */ Object.freeze(
1436
1441
  /* @__PURE__ */ Object.defineProperty(
1437
1442
  {
1438
1443
  __proto__: null,
1439
- buildRouter: ct,
1440
- catchAll: Fe,
1441
- exactPathMatch: Pe,
1444
+ buildRouter: lt,
1445
+ catchAll: Ve,
1446
+ exactPathMatch: Fe,
1442
1447
  },
1443
1448
  Symbol.toStringTag,
1444
1449
  { value: 'Module' },
1445
1450
  ),
1446
1451
  ),
1447
- Ve = () => ({
1452
+ Le = () => ({
1448
1453
  render: (e, t) => [],
1449
1454
  }),
1450
- Qe = (e) => {
1451
- const t = ct(e)
1452
- return De({
1453
- Template: ({ route: r }) => (t({ route: r }) || Ve)(),
1455
+ Xe = (e) => {
1456
+ const t = lt(e)
1457
+ return Pe({
1458
+ Template: ({ route: r }) => (t({ route: r }) || Le)(),
1454
1459
  subscriptions: ['route'],
1455
1460
  })
1456
1461
  },
1457
- Xe = /* @__PURE__ */ Object.freeze(
1462
+ Ye = /* @__PURE__ */ Object.freeze(
1458
1463
  /* @__PURE__ */ Object.defineProperty(
1459
1464
  {
1460
1465
  __proto__: null,
1461
1466
  createRouteState: U,
1462
- events: Lt,
1467
+ events: zt,
1463
1468
  extractQueryParams: J,
1464
1469
  findHref: q,
1465
1470
  navigate: N,
1466
1471
  onLinkClick: I,
1467
1472
  onLocationChange: H,
1468
- start: zt,
1473
+ start: Kt,
1469
1474
  },
1470
1475
  Symbol.toStringTag,
1471
1476
  { value: 'Module' },
1472
1477
  ),
1473
1478
  )
1474
1479
  export {
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,
1483
- De as bind,
1484
- Ge as createApp,
1485
- Pt as jsx,
1486
- Ie as messageBus,
1487
- Xe as navigation,
1488
- Qe as routedView,
1489
- Ce as routing,
1490
- He as state,
1480
+ ze as ArrayModifiers,
1481
+ Ke as BooleanStore,
1482
+ He as Equality,
1483
+ qe as Is,
1484
+ Ce as JaxsTypes,
1485
+ Re as ListStore,
1486
+ Ue as RecordStore,
1487
+ Ie as appBuilding,
1488
+ Pe as bind,
1489
+ We as createApp,
1490
+ Ft as jsx,
1491
+ Je as messageBus,
1492
+ Ye as navigation,
1493
+ Xe as routedView,
1494
+ Qe as routing,
1495
+ Ge as state,
1491
1496
  }