aptechka 0.7.10 → 0.8.0

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.
Files changed (172) hide show
  1. package/lib/Animation-CwgyQH5y.js +110 -0
  2. package/lib/Animation-DBfrekcV.cjs +1 -0
  3. package/lib/{Composed-Dx2hs-va.cjs → Composed-CIXY_HwN.cjs} +1 -1
  4. package/lib/{Composed-DmLYTh1b.js → Composed-CgnR5oah.js} +1 -1
  5. package/lib/Damped-DmcKRSST.cjs +1 -0
  6. package/lib/Damped-vepIw9Ku.js +57 -0
  7. package/lib/{Derived-DlCvc0xQ.js → Derived-B4CxuebG.js} +1 -1
  8. package/lib/{Derived-a6MDQEPY.cjs → Derived-Xb4EzLLO.cjs} +1 -1
  9. package/lib/{SourceManager-kxr5eUyL.cjs → SourceManager-Ce49-NQe.cjs} +1 -1
  10. package/lib/{SourceManager-Bz329f90.js → SourceManager-U3KHUnNl.js} +1 -1
  11. package/lib/Store-CIs_NjhF.cjs +1 -0
  12. package/lib/Store-Dqcu1DnE.js +152 -0
  13. package/lib/{Tweened-B_mclQ61.cjs → Tweened-5Bj7ht3x.cjs} +1 -1
  14. package/lib/{Tweened-NE8M9onF.js → Tweened-DPi9pZ8Q.js} +1 -1
  15. package/lib/{Viewport-D9IL7kUQ.js → Viewport-4ZTWxLo_.js} +1 -1
  16. package/lib/{Viewport-CJeKnL5V.cjs → Viewport-CIBlSU2t.cjs} +1 -1
  17. package/lib/animation/Animation.d.ts +3 -18
  18. package/lib/animation/Damped.d.ts +2 -18
  19. package/lib/animation/Tweened.d.ts +2 -2
  20. package/lib/animation/index.cjs +1 -1
  21. package/lib/animation/index.d.ts +2 -2
  22. package/lib/animation/index.js +3 -3
  23. package/lib/attribute/index.cjs +1 -1
  24. package/lib/attribute/index.d.ts +3 -3
  25. package/lib/attribute/index.js +1 -1
  26. package/lib/canvas/index.cjs +1 -1
  27. package/lib/canvas/index.d.ts +1 -0
  28. package/lib/canvas/index.js +63 -54
  29. package/lib/checkbox/index.cjs +1 -1
  30. package/lib/checkbox/index.js +3 -3
  31. package/lib/class-linked-status/index.cjs +1 -1
  32. package/lib/class-linked-status/index.js +1 -1
  33. package/lib/controls/index.cjs +1 -1
  34. package/lib/controls/index.js +2 -2
  35. package/lib/{createStylesheet-p23sZ7Ey.cjs → createStylesheet-BX1RVTfW.cjs} +1 -1
  36. package/lib/{createStylesheet-CR_yi5tp.js → createStylesheet-CgWN4UhW.js} +1 -1
  37. package/lib/css-property/index.cjs +1 -1
  38. package/lib/css-property/index.d.ts +3 -3
  39. package/lib/css-property/index.js +1 -1
  40. package/lib/dev/index.cjs +1 -1
  41. package/lib/dev/index.js +1 -1
  42. package/lib/device/Viewport.d.ts +1 -1
  43. package/lib/device/index.cjs +1 -1
  44. package/lib/device/index.js +1 -1
  45. package/lib/element-constructor/ElementConstructor.d.ts +1 -1
  46. package/lib/element-constructor/index.cjs +1 -1
  47. package/lib/element-constructor/index.js +113 -114
  48. package/lib/en3/helpers/index.cjs +1 -1
  49. package/lib/en3/helpers/index.js +2 -2
  50. package/lib/en3/misc/En3SourceManager.d.ts +2 -2
  51. package/lib/en3/misc/index.cjs +1 -1
  52. package/lib/en3/misc/index.js +2 -2
  53. package/lib/en3/objects/fluid/En3Fluid.d.ts +5 -5
  54. package/lib/en3/objects/fluid/Simulation.d.ts +10 -10
  55. package/lib/image/index.cjs +1 -1
  56. package/lib/image/index.js +1 -1
  57. package/lib/{index-CoOTQk9H.js → index-C2xWAQFq.js} +3 -3
  58. package/lib/{index-DVUk3T-y.cjs → index-DfSyc2GT.cjs} +1 -1
  59. package/lib/ladder/index.cjs +1 -1
  60. package/lib/ladder/index.js +1 -1
  61. package/lib/layout-box/index.d.ts +2 -2
  62. package/lib/media/index.cjs +1 -1
  63. package/lib/media/index.js +1 -1
  64. package/lib/modal/index.cjs +1 -1
  65. package/lib/modal/index.js +7 -7
  66. package/lib/morph/index.cjs +1 -1
  67. package/lib/morph/index.js +140 -133
  68. package/lib/pointer/index.cjs +1 -1
  69. package/lib/pointer/index.js +2 -2
  70. package/lib/popover/PopoverElement.d.ts +1 -1
  71. package/lib/popover/index.cjs +1 -1
  72. package/lib/popover/index.js +2 -2
  73. package/lib/router/index.cjs +1 -1
  74. package/lib/router/index.js +73 -76
  75. package/lib/scroll/ScrollElement.d.ts +1 -1
  76. package/lib/scroll/ScrollSegmentElement.d.ts +6 -6
  77. package/lib/scroll/index.cjs +1 -1
  78. package/lib/scroll/index.js +7 -7
  79. package/lib/select/index.cjs +1 -1
  80. package/lib/select/index.js +1 -1
  81. package/lib/sequence/index.cjs +1 -1
  82. package/lib/sequence/index.js +1 -1
  83. package/lib/source/index.cjs +1 -1
  84. package/lib/source/index.js +2 -2
  85. package/lib/store/Derived.d.ts +1 -1
  86. package/lib/store/Resource.d.ts +1 -4
  87. package/lib/store/Store.d.ts +10 -10
  88. package/lib/store/StoreRegistry.d.ts +1 -1
  89. package/lib/store/index.cjs +1 -1
  90. package/lib/store/index.d.ts +1 -3
  91. package/lib/store/index.js +38 -68
  92. package/lib/tags-C-6uXIAT.js +848 -0
  93. package/lib/tags-yvEoM921.cjs +1 -0
  94. package/lib/theme/index.cjs +1 -1
  95. package/lib/theme/index.js +2 -2
  96. package/lib/tweaker/TweakerFieldElement.d.ts +3 -3
  97. package/lib/tweaker/TweakerFolderElement.d.ts +2 -2
  98. package/lib/tweaker/TweakerStoreManagerElement.d.ts +1 -1
  99. package/lib/tweaker/index.cjs +1 -1
  100. package/lib/tweaker/index.js +56 -56
  101. package/lib/tweaker/tweakerManagerConstructors.d.ts +1 -1
  102. package/lib/video/index.cjs +1 -1
  103. package/lib/video/index.js +1 -1
  104. package/package.json +1 -65
  105. package/lib/Animation-6Na1MCtM.cjs +0 -1
  106. package/lib/Animation-CELiTw3n.js +0 -132
  107. package/lib/Damped-Mx_FNNVz.js +0 -63
  108. package/lib/Damped-loFiBsBy.cjs +0 -1
  109. package/lib/ElementConstructor-CAZ2ra8m.cjs +0 -1
  110. package/lib/ElementConstructor-OYlPJf2L.js +0 -366
  111. package/lib/Resource-D3TQormz.cjs +0 -1
  112. package/lib/Resource-DIcoALGo.js +0 -64
  113. package/lib/Store-6s0YXK4o.cjs +0 -1
  114. package/lib/Store-BI2xxXOA.js +0 -156
  115. package/lib/_createStore-Cf1MyeHa.cjs +0 -1
  116. package/lib/_createStore-Ck9bHolX.js +0 -12
  117. package/lib/globals-DMjysUXI.js +0 -8
  118. package/lib/globals-bYKki-b9.cjs +0 -1
  119. package/lib/instantiate-Cx-JmH6m.cjs +0 -1
  120. package/lib/instantiate-D87JFF1W.js +0 -125
  121. package/lib/jsx/ComponentElement.d.ts +0 -18
  122. package/lib/jsx/globals.d.ts +0 -13
  123. package/lib/jsx/h.d.ts +0 -7
  124. package/lib/jsx/hooks/basic/_createStore.d.ts +0 -4
  125. package/lib/jsx/hooks/basic/attachInternals.d.ts +0 -1
  126. package/lib/jsx/hooks/basic/attachShadow.d.ts +0 -1
  127. package/lib/jsx/hooks/basic/attachStylesheet.d.ts +0 -3
  128. package/lib/jsx/hooks/basic/createContext.d.ts +0 -2
  129. package/lib/jsx/hooks/basic/onConnect.d.ts +0 -3
  130. package/lib/jsx/hooks/basic/onDisconnect.d.ts +0 -3
  131. package/lib/jsx/hooks/onAnimationFrame.cjs +0 -1
  132. package/lib/jsx/hooks/onAnimationFrame.d.ts +0 -6
  133. package/lib/jsx/hooks/onAnimationFrame.js +0 -22
  134. package/lib/jsx/hooks/onElementResize.cjs +0 -1
  135. package/lib/jsx/hooks/onElementResize.d.ts +0 -5
  136. package/lib/jsx/hooks/onElementResize.js +0 -11
  137. package/lib/jsx/hooks/onIntersection.cjs +0 -1
  138. package/lib/jsx/hooks/onIntersection.d.ts +0 -5
  139. package/lib/jsx/hooks/onIntersection.js +0 -11
  140. package/lib/jsx/hooks/onWindowResize.cjs +0 -1
  141. package/lib/jsx/hooks/onWindowResize.d.ts +0 -3
  142. package/lib/jsx/hooks/onWindowResize.js +0 -8
  143. package/lib/jsx/hooks/store/createArrayStore.d.ts +0 -3
  144. package/lib/jsx/hooks/store/createComposed.d.ts +0 -3
  145. package/lib/jsx/hooks/store/createDerived.d.ts +0 -3
  146. package/lib/jsx/hooks/store/createDerivedArray.d.ts +0 -3
  147. package/lib/jsx/hooks/store/createDerivedComponent.d.ts +0 -3
  148. package/lib/jsx/hooks/store/createDerivedComponents.d.ts +0 -3
  149. package/lib/jsx/hooks/store/createResource.d.ts +0 -3
  150. package/lib/jsx/hooks/store/createStore.d.ts +0 -3
  151. package/lib/jsx/hooks/store/index.cjs +0 -1
  152. package/lib/jsx/hooks/store/index.d.ts +0 -7
  153. package/lib/jsx/hooks/store/index.js +0 -49
  154. package/lib/jsx/hooks/watchAttribute.cjs +0 -1
  155. package/lib/jsx/hooks/watchAttribute.d.ts +0 -6
  156. package/lib/jsx/hooks/watchAttribute.js +0 -17
  157. package/lib/jsx/hooks/watchCSSProperty.cjs +0 -1
  158. package/lib/jsx/hooks/watchCSSProperty.d.ts +0 -7
  159. package/lib/jsx/hooks/watchCSSProperty.js +0 -17
  160. package/lib/jsx/index.cjs +0 -1
  161. package/lib/jsx/index.d.ts +0 -13
  162. package/lib/jsx/index.js +0 -91
  163. package/lib/jsx/instantiate.d.ts +0 -5
  164. package/lib/jsx/register.d.ts +0 -1
  165. package/lib/jsx/render.d.ts +0 -6
  166. package/lib/jsx/type.d.ts +0 -188
  167. package/lib/onConnect-DGP866cj.cjs +0 -1
  168. package/lib/onConnect-y5DrxJ9P.js +0 -7
  169. package/lib/store/ArrayStore.d.ts +0 -21
  170. package/lib/store/DerivedArray.d.ts +0 -8
  171. package/lib/tags-BqJKcIve.js +0 -485
  172. package/lib/tags-ld5jemJw.cjs +0 -1
@@ -1,89 +1,96 @@
1
- var nt = (n, t) => (t = Symbol[n]) ? t : Symbol.for("Symbol." + n);
2
- var U = (n, t, i) => {
1
+ var at = (n, t) => (t = Symbol[n]) ? t : Symbol.for("Symbol." + n);
2
+ var V = (n, t, i) => {
3
3
  if (!t.has(n))
4
4
  throw TypeError("Cannot " + i);
5
5
  };
6
- var e = (n, t, i) => (U(n, t, "read from private field"), i ? i.call(n) : t.get(n)), r = (n, t, i) => {
6
+ var e = (n, t, i) => (V(n, t, "read from private field"), i ? i.call(n) : t.get(n)), a = (n, t, i) => {
7
7
  if (t.has(n))
8
8
  throw TypeError("Cannot add the same private member more than once");
9
9
  t instanceof WeakSet ? t.add(n) : t.set(n, i);
10
- }, c = (n, t, i, a) => (U(n, t, "write to private field"), a ? a.call(n, i) : t.set(n, i), i);
11
- var f = (n, t, i) => (U(n, t, "access private method"), i);
12
- var T = (n, t, i) => new Promise((a, s) => {
13
- var l = (u) => {
10
+ }, c = (n, t, i, r) => (V(n, t, "write to private field"), r ? r.call(n, i) : t.set(n, i), i);
11
+ var d = (n, t, i) => (V(n, t, "access private method"), i);
12
+ var T = (n, t, i) => new Promise((r, s) => {
13
+ var u = (l) => {
14
14
  try {
15
- d(i.next(u));
16
- } catch (m) {
17
- s(m);
15
+ f(i.next(l));
16
+ } catch (E) {
17
+ s(E);
18
18
  }
19
- }, g = (u) => {
19
+ }, p = (l) => {
20
20
  try {
21
- d(i.throw(u));
22
- } catch (m) {
23
- s(m);
21
+ f(i.throw(l));
22
+ } catch (E) {
23
+ s(E);
24
24
  }
25
- }, d = (u) => u.done ? a(u.value) : Promise.resolve(u.value).then(l, g);
26
- d((i = i.apply(n, t)).next());
25
+ }, f = (l) => l.done ? r(l.value) : Promise.resolve(l.value).then(u, p);
26
+ f((i = i.apply(n, t)).next());
27
27
  });
28
- var rt = (n, t, i) => (t = n[nt("asyncIterator")]) ? t.call(n) : (n = n[nt("iterator")](), t = {}, i = (a, s) => (s = n[a]) && (t[a] = (l) => new Promise((g, d, u) => (l = s.call(n, l), u = l.done, Promise.resolve(l.value).then((m) => g({ value: m, done: u }), d)))), i("next"), i("return"), t);
29
- import { Notifier as at } from "../notifier/index.js";
30
- import { i as ut } from "../browser-0zX67oeU.js";
31
- import { n as dt, s as mt, c as ft } from "../url-DMNfW7uN.js";
32
- var w, o, p, k, P, C, A;
33
- class pt {
28
+ var rt = (n, t, i) => (t = n[at("asyncIterator")]) ? t.call(n) : (n = n[at("iterator")](), t = {}, i = (r, s) => (s = n[r]) && (t[r] = (u) => new Promise((p, f, l) => (u = s.call(n, u), l = u.done, Promise.resolve(u.value).then((E) => p({ value: E, done: l }), f)))), i("next"), i("return"), t);
29
+ import { Notifier as ot } from "../notifier/index.js";
30
+ import { i as dt } from "../browser-0zX67oeU.js";
31
+ import { n as mt, s as ft, c as pt } from "../url-DMNfW7uN.js";
32
+ var w, h, m, k, y, C, A;
33
+ class Et {
34
34
  constructor(t, i) {
35
- r(this, w, void 0);
36
- r(this, o, void 0);
37
- r(this, p, void 0);
38
- r(this, k, void 0);
39
- r(this, P, void 0);
40
- r(this, C, (t) => {
35
+ a(this, w, void 0);
36
+ a(this, h, void 0);
37
+ a(this, m, void 0);
38
+ a(this, k, void 0);
39
+ a(this, y, void 0);
40
+ a(this, C, (t) => {
41
41
  t.preventDefault(), e(this, w).links.forEach((i) => {
42
- var a;
43
- e(this, p) === e(i, p) || (a = e(i, P)) != null && a.includes(e(this, p)) ? e(i, o).classList.add("clicked") : e(i, o).classList.remove("clicked");
44
- }), e(this, w).navigate(e(this, p), e(this, k));
42
+ var r;
43
+ e(this, m) === e(i, m) || (r = e(i, y)) != null && r.includes(e(this, m)) ? e(i, h).classList.add("clicked") : e(i, h).classList.remove("clicked");
44
+ }), e(this, w).navigate(e(this, m), e(this, k));
45
45
  });
46
- r(this, A, () => {
47
- e(this, w).prefetch(e(this, p)), e(this, o).removeEventListener("pointerenter", e(this, A));
46
+ a(this, A, () => {
47
+ e(this, w).prefetch(e(this, m)), e(this, h).removeEventListener("pointerenter", e(this, A));
48
48
  });
49
- var l, g;
50
- c(this, w, i), c(this, o, t), c(this, p, e(this, o).getAttribute("href") || "/"), c(this, k, e(this, o).getAttribute(
49
+ var u, p;
50
+ c(this, w, i), c(this, h, t), c(this, m, e(this, h).getAttribute("href") || "/"), c(this, k, e(this, h).getAttribute(
51
51
  "data-history-action"
52
- ) || "push"), e(this, o).addEventListener("click", e(this, C));
53
- const a = i.normalizePath(e(this, p)), s = i.normalizePath(location.pathname);
54
- c(this, P, (l = e(this, o).getAttribute("data-match-paths")) == null ? void 0 : l.split(",").map((d) => i.normalizePath(d.trim()).pathname)), e(this, o).hasAttribute("data-include") ? s.pathname.includes(a.pathname) && e(this, o).classList.add("current") : a.pathname === s.pathname || (g = e(this, P)) != null && g.includes(s.pathname) ? (e(this, o).classList.add("current"), e(this, o).classList.add("clicked")) : e(this, o).classList.remove("clicked"), e(this, o).hasAttribute("data-prefetch") && e(this, o).addEventListener("pointerenter", e(this, A));
52
+ ) || "push"), e(this, h).addEventListener("click", e(this, C));
53
+ const r = i.normalizePath(e(this, m)), s = i.normalizePath(location.pathname);
54
+ c(this, y, (u = e(this, h).getAttribute("data-match-paths")) == null ? void 0 : u.split(",").map((f) => i.normalizePath(f.trim()).pathname)), e(this, h).hasAttribute("data-include") ? s.pathname.includes(r.pathname) && e(this, h).classList.add("current") : r.pathname === s.pathname || (p = e(this, y)) != null && p.includes(s.pathname) ? (e(this, h).classList.add("current"), e(this, h).classList.add("clicked")) : e(this, h).classList.remove("clicked"), e(this, h).hasAttribute("data-prefetch") && e(this, h).addEventListener("pointerenter", e(this, A));
55
55
  }
56
56
  destroy() {
57
- e(this, o).removeEventListener("click", e(this, C)), e(this, o).removeEventListener("pointerenter", e(this, A)), e(this, o).classList.remove("current");
57
+ e(this, h).removeEventListener("click", e(this, C)), e(this, h).removeEventListener("pointerenter", e(this, A)), e(this, h).classList.remove("current");
58
58
  }
59
59
  }
60
- w = new WeakMap(), o = new WeakMap(), p = new WeakMap(), k = new WeakMap(), P = new WeakMap(), C = new WeakMap(), A = new WeakMap();
61
- var H, S, z, x, M, K, y, v, b, D, R, F, V, I, X, q, Z, Y, ht, B, _, j;
62
- class bt {
60
+ w = new WeakMap(), h = new WeakMap(), m = new WeakMap(), k = new WeakMap(), y = new WeakMap(), C = new WeakMap(), A = new WeakMap();
61
+ var H, z, S, x, M, Y, P, v, b, D, R, F, X, I, Z, q, _, j, ht, B, $, G;
62
+ class wt {
63
63
  constructor(t) {
64
- r(this, F);
65
- r(this, I);
66
- r(this, q);
67
- r(this, Y);
68
- r(this, B);
69
- r(this, H, null);
70
- r(this, S, null);
71
- r(this, z, null);
72
- r(this, x, null);
73
- r(this, M, []);
74
- r(this, K, new DOMParser());
75
- r(this, y, /* @__PURE__ */ new Map());
76
- r(this, v, void 0);
77
- r(this, b, null);
78
- r(this, D, new at());
79
- r(this, R, new at());
80
- r(this, j, (t) => {
64
+ a(this, F);
65
+ a(this, I);
66
+ a(this, q);
67
+ a(this, j);
68
+ a(this, B);
69
+ a(this, H, null);
70
+ a(this, z, null);
71
+ a(this, S, null);
72
+ a(this, x, null);
73
+ a(this, M, []);
74
+ a(this, Y, new DOMParser());
75
+ a(this, P, /* @__PURE__ */ new Map());
76
+ a(this, v, void 0);
77
+ a(this, b, null);
78
+ a(this, D, new ot());
79
+ a(this, R, new ot());
80
+ a(this, G, (t) => {
81
81
  t.state && this.navigate(t.state, "none");
82
82
  });
83
- ut && (t != null && t.base ? c(this, H, dt(t.base)) : c(this, H, "/"), c(this, S, (t == null ? void 0 : t.waitForHeadToLoad) !== !1), c(this, z, (t == null ? void 0 : t.cachePages) !== !1), c(this, x, f(this, q, Z).call(this, document.body)), c(this, b, this.normalizePath(location.pathname).pathname), document.documentElement.setAttribute(
84
- "data-current-pathname",
85
- e(this, b)
86
- ), f(this, I, X).call(this), addEventListener("popstate", e(this, j)));
83
+ if (dt) {
84
+ t != null && t.base ? c(this, H, mt(t.base)) : c(this, H, "/"), c(this, z, (t == null ? void 0 : t.waitForHeadToLoad) !== !1), c(this, S, (t == null ? void 0 : t.cachePages) !== !1), c(this, x, d(this, q, _).call(this, document.body));
85
+ const i = this.normalizePath(location.pathname);
86
+ c(this, b, i.pathname), document.documentElement.setAttribute(
87
+ "data-current-pathname",
88
+ e(this, b)
89
+ ), document.documentElement.setAttribute(
90
+ "data-current-leaf",
91
+ i.leaf
92
+ ), d(this, I, Z).call(this), addEventListener("popstate", e(this, G));
93
+ }
87
94
  }
88
95
  get currentPathname() {
89
96
  return e(this, b);
@@ -92,7 +99,7 @@ class bt {
92
99
  return e(this, M);
93
100
  }
94
101
  normalizePath(t) {
95
- return mt(t, e(this, H));
102
+ return ft(t, e(this, H));
96
103
  }
97
104
  beforeNavigationEvent(t) {
98
105
  return e(this, D).subscribe(t);
@@ -103,126 +110,126 @@ class bt {
103
110
  prefetch(t) {
104
111
  return T(this, null, function* () {
105
112
  const i = this.normalizePath(t);
106
- return f(this, F, V).call(this, i.pathname);
113
+ return d(this, F, X).call(this, i.pathname);
107
114
  });
108
115
  }
109
116
  navigate(t, i = "push") {
110
117
  return T(this, null, function* () {
111
- var u;
112
- const a = this.normalizePath(t);
113
- let { pathname: s, hash: l, parameters: g } = a;
118
+ var E;
119
+ const r = this.normalizePath(t);
120
+ let { pathname: s, hash: u, parameters: p, leaf: f } = r;
114
121
  if (e(this, v) === s || e(this, b) === s)
115
122
  return;
116
123
  c(this, v, s);
117
- const d = e(this, y).has(s);
124
+ const l = e(this, P).has(s);
118
125
  try {
119
- let m = !0;
126
+ let O = !0;
120
127
  if (e(this, D).notify({
121
128
  pathname: s,
122
- isCached: d
129
+ isCached: l
123
130
  }), this.preprocessor)
124
131
  try {
125
- yield new Promise((h, E) => {
132
+ yield new Promise((o, g) => {
126
133
  var L;
127
- (L = this.preprocessor) == null || L.call(this, { pathname: s, resolve: h, reject: E, isCached: d });
134
+ (L = this.preprocessor) == null || L.call(this, { pathname: s, resolve: o, reject: g, isCached: l });
128
135
  });
129
- } catch (h) {
130
- h ? console.error(h) : console.log("Route change canceled"), m = !1;
136
+ } catch (o) {
137
+ o ? console.error(o) : console.log("Route change canceled"), O = !1;
131
138
  }
132
- if (!m || e(this, v) !== s)
139
+ if (!O || e(this, v) !== s)
133
140
  return;
134
- const $ = e(this, y).get(s) || (yield f(this, F, V).call(this, s));
141
+ const tt = e(this, P).get(s) || (yield d(this, F, X).call(this, s));
135
142
  if (e(this, v) !== s)
136
143
  return;
137
- const tt = Array.from(document.head.children), et = Array.from(
138
- $.head.cloneNode(!0).children
139
- ), it = f(this, Y, ht).call(this, tt, et), ot = f(this, B, _).call(this, tt, it), O = f(this, B, _).call(this, et, it);
140
- O.forEach((h, E) => {
141
- if (h.tagName === "SCRIPT" && h.getAttribute("src")) {
144
+ const et = Array.from(document.head.children), it = Array.from(
145
+ tt.head.cloneNode(!0).children
146
+ ), st = d(this, j, ht).call(this, et, it), ct = d(this, B, $).call(this, et, st), W = d(this, B, $).call(this, it, st);
147
+ W.forEach((o, g) => {
148
+ if (o.tagName === "SCRIPT" && o.getAttribute("src")) {
142
149
  const L = document.createElement("script");
143
- L.type = "module", L.src = h.getAttribute("src"), O[E] = L;
150
+ L.type = "module", L.src = o.getAttribute("src"), W[g] = L;
144
151
  }
145
- }), O.forEach((h) => {
146
- document.head.appendChild(h);
152
+ }), W.forEach((o) => {
153
+ document.head.appendChild(o);
147
154
  });
148
- const G = O.filter(
149
- (h) => h.tagName === "STYLE" || h.tagName === "SCRIPT" || h.tagName === "LINK"
155
+ const J = W.filter(
156
+ (o) => o.tagName === "STYLE" || o.tagName === "SCRIPT" || o.tagName === "LINK"
150
157
  );
151
- e(this, S) && G.length && (yield new Promise((h) => T(this, null, function* () {
152
- let E = 0;
158
+ e(this, z) && J.length && (yield new Promise((o) => T(this, null, function* () {
159
+ let g = 0;
153
160
  try {
154
- for (var L = rt(G), lt, J, W; lt = !(J = yield L.next()).done; lt = !1) {
155
- const N = J.value;
161
+ for (var L = rt(J), ut, Q, K; ut = !(Q = yield L.next()).done; ut = !1) {
162
+ const N = Q.value;
156
163
  N.onload = () => {
157
- E++, E === G.length && h();
164
+ g++, g === J.length && o();
158
165
  };
159
166
  }
160
- } catch (J) {
161
- W = [J];
167
+ } catch (Q) {
168
+ K = [Q];
162
169
  } finally {
163
170
  try {
164
- lt && (J = L.return) && (yield J.call(L));
171
+ ut && (Q = L.return) && (yield Q.call(L));
165
172
  } finally {
166
- if (W)
167
- throw W[0];
173
+ if (K)
174
+ throw K[0];
168
175
  }
169
176
  }
170
- }))), ot.forEach((h) => {
171
- h.hasAttribute("data-permanent") || h.remove();
172
- }), c(this, b, s), ft(i, s, g, l);
173
- const ct = f(this, q, Z).call(this, $.body.cloneNode(!0));
174
- e(this, x).forEach((h, E) => {
175
- const L = ct[E];
176
- let lt = [...h.childNodes], J = [...L.childNodes];
177
- lt.forEach((W) => {
178
- if (W instanceof HTMLElement) {
179
- const N = W.getAttribute("data-remain");
180
- let st;
181
- J = J.filter(
182
- (Q) => Q instanceof HTMLElement && N && Q.getAttribute("data-remain") === N ? (st = Q, !1) : !0
183
- ), N && st || W.remove();
177
+ }))), ct.forEach((o) => {
178
+ o.hasAttribute("data-permanent") || o.remove();
179
+ }), c(this, b, s), pt(i, s, p, u);
180
+ const lt = d(this, q, _).call(this, tt.body.cloneNode(!0));
181
+ e(this, x).forEach((o, g) => {
182
+ const L = lt[g];
183
+ let ut = [...o.childNodes], Q = [...L.childNodes];
184
+ ut.forEach((K) => {
185
+ if (K instanceof HTMLElement) {
186
+ const N = K.getAttribute("data-remain");
187
+ let nt;
188
+ Q = Q.filter(
189
+ (U) => U instanceof HTMLElement && N && U.getAttribute("data-remain") === N ? (nt = U, !1) : !0
190
+ ), N && nt || K.remove();
184
191
  } else
185
- W.remove();
186
- }), h.append(...J);
187
- }), f(this, I, X).call(this), document.documentElement.setAttribute("data-current-pathname", s), (u = this.postprocessor) == null || u.call(this, { pathname: s, isCached: d }), e(this, R).notify({ pathname: s, isCached: d });
188
- } catch (m) {
189
- console.error(m);
192
+ K.remove();
193
+ }), o.append(...Q);
194
+ }), d(this, I, Z).call(this), document.documentElement.setAttribute("data-current-pathname", s), document.documentElement.setAttribute("data-current-leaf", f), (E = this.postprocessor) == null || E.call(this, { pathname: s, isCached: l }), e(this, R).notify({ pathname: s, isCached: l });
195
+ } catch (O) {
196
+ console.error(O);
190
197
  }
191
198
  c(this, v, void 0);
192
199
  });
193
200
  }
194
201
  }
195
- H = new WeakMap(), S = new WeakMap(), z = new WeakMap(), x = new WeakMap(), M = new WeakMap(), K = new WeakMap(), y = new WeakMap(), v = new WeakMap(), b = new WeakMap(), D = new WeakMap(), R = new WeakMap(), F = new WeakSet(), V = function(t) {
202
+ H = new WeakMap(), z = new WeakMap(), S = new WeakMap(), x = new WeakMap(), M = new WeakMap(), Y = new WeakMap(), P = new WeakMap(), v = new WeakMap(), b = new WeakMap(), D = new WeakMap(), R = new WeakMap(), F = new WeakSet(), X = function(t) {
196
203
  return T(this, null, function* () {
197
- const i = e(this, y).get(t);
204
+ const i = e(this, P).get(t);
198
205
  if (i)
199
206
  return i;
200
- const s = yield (yield fetch(t)).text(), l = e(this, K).parseFromString(s, "text/html");
201
- return e(this, z) && e(this, y).set(t, l), l;
207
+ const s = yield (yield fetch(t)).text(), u = e(this, Y).parseFromString(s, "text/html");
208
+ return e(this, S) && e(this, P).set(t, u), u;
202
209
  });
203
- }, I = new WeakSet(), X = function() {
210
+ }, I = new WeakSet(), Z = function() {
204
211
  const t = [
205
212
  ...document.documentElement.querySelectorAll("a")
206
213
  ].filter((i) => {
207
- var a;
208
- return (a = i.getAttribute("href")) == null ? void 0 : a.startsWith("/");
214
+ var r;
215
+ return (r = i.getAttribute("href")) == null ? void 0 : r.startsWith("/");
209
216
  });
210
- e(this, M).forEach((i) => i.destroy()), c(this, M, t.map((i) => new pt(i, this)));
211
- }, q = new WeakSet(), Z = function(t) {
217
+ e(this, M).forEach((i) => i.destroy()), c(this, M, t.map((i) => new Et(i, this)));
218
+ }, q = new WeakSet(), _ = function(t) {
212
219
  return [...t.querySelectorAll("[data-morph]")];
213
- }, Y = new WeakSet(), ht = function(t, i) {
220
+ }, j = new WeakSet(), ht = function(t, i) {
214
221
  return t.filter(
215
- (a) => i.find(
216
- (s) => s.outerHTML === a.outerHTML
222
+ (r) => i.find(
223
+ (s) => s.outerHTML === r.outerHTML
217
224
  )
218
225
  );
219
- }, B = new WeakSet(), _ = function(t, i) {
226
+ }, B = new WeakSet(), $ = function(t, i) {
220
227
  return t.filter(
221
- (a) => !i.find(
222
- (s) => s.outerHTML === a.outerHTML
228
+ (r) => !i.find(
229
+ (s) => s.outerHTML === r.outerHTML
223
230
  )
224
231
  );
225
- }, j = new WeakMap();
232
+ }, G = new WeakMap();
226
233
  export {
227
- bt as Morph
234
+ wt as Morph
228
235
  };
@@ -1 +1 @@
1
- "use strict";var J=Object.defineProperty;var D=Object.getOwnPropertySymbols;var K=Object.prototype.hasOwnProperty,N=Object.prototype.propertyIsEnumerable;var k=(i,e,s)=>e in i?J(i,e,{enumerable:!0,configurable:!0,writable:!0,value:s}):i[e]=s,O=(i,e)=>{for(var s in e||(e={}))K.call(e,s)&&k(i,s,e[s]);if(D)for(var s of D(e))N.call(e,s)&&k(i,s,e[s]);return i};var T=(i,e,s)=>{if(!e.has(i))throw TypeError("Cannot "+s)};var t=(i,e,s)=>(T(i,e,"read from private field"),s?s.call(i):e.get(i)),a=(i,e,s)=>{if(e.has(i))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(i):e.set(i,s)},l=(i,e,s,o)=>(T(i,e,"write to private field"),o?o.call(i,s):e.set(i,s),s);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require("../Store-6s0YXK4o.cjs");const q=require("../coordinates-D8Np3cPD.cjs"),Q=require("../dom-JBOkFLTh.cjs"),A=require("../math-GDWEqu7y.cjs");require("../ticker/index.cjs");const M=require("../Damped-loFiBsBy.cjs"),B=require("../element-resizer/index.cjs"),G=require("../window-resizer/index.cjs"),H=require("../custom-element/index.cjs"),x=require("../css-property/index.cjs");var c,u,m,v,f,d,P,w,_,C,E,y;class F{constructor(e){a(this,c,void 0);a(this,u,void 0);a(this,m,void 0);a(this,v,void 0);a(this,f,void 0);a(this,d,void 0);a(this,P,0);a(this,w,0);a(this,_,e=>{t(this,v).set(1)});a(this,C,e=>{t(this,v).set(0)});a(this,E,e=>{const s=q.getPointerPosition(e,t(this,c).getBoundingClientRect()),o={width:t(this,P),height:t(this,w)},n={x:s.x,y:s.y};if(t(this,f)){const p=q.screenToCartesian(n,o);n.x=p.x,n.y=p.y}if(t(this,d)){const p=q.normalize(n,o);n.x=A.clamp(p.x*2,-1,1),n.y=A.clamp(p.y*2,-1,1)}t(this,u).set(n.x),t(this,m).set(n.y)});a(this,y,()=>{l(this,P,this.element.clientWidth),l(this,w,this.element.clientHeight);let e=0,s=0,o=0,n=0;t(this,f)?t(this,d)?(e=-1,s=1,o=-1,n=1):(e=t(this,P)/2*-1,s=t(this,P)/2*1,o=t(this,w)/2*-1,n=t(this,w)/2*1):t(this,d)?(e=0,s=1,o=0,n=1):(e=0,s=t(this,P),o=0,n=t(this,w)),t(this,u).min=e,t(this,u).max=s,t(this,m).min=o,t(this,m).max=n});l(this,c,Q.getElement(e.element)),l(this,u,new M.Damped(0,e.damped)),l(this,m,new M.Damped(0,e.damped)),l(this,v,new M.Damped(0,O({min:0,max:1},e.damped))),l(this,f,e.cartesian||!1),l(this,d,e.normalize||!1)}get element(){return t(this,c)}get x(){return t(this,u)}get y(){return t(this,m)}get z(){return t(this,v)}get cartesian(){return t(this,f)}set cartesian(e){l(this,f,e),t(this,y).call(this)}get normalize(){return t(this,d)}set normalize(e){l(this,d,e),t(this,y).call(this)}connect(){t(this,c).addEventListener("pointerenter",t(this,_)),t(this,c).addEventListener("pointerleave",t(this,C)),t(this,c).addEventListener("pointermove",t(this,E)),B.elementResizer.subscribe(t(this,c),t(this,y)),G.windowResizer.subscribe(t(this,y))}disconnect(){t(this,c).removeEventListener("pointerenter",t(this,_)),t(this,c).removeEventListener("pointerleave",t(this,C)),t(this,c).removeEventListener("pointermove",t(this,E)),B.elementResizer.unsubscribe(t(this,y)),G.windowResizer.unsubscribe(t(this,y)),t(this,u).reset(),t(this,m).reset(),t(this,v).reset()}}c=new WeakMap,u=new WeakMap,m=new WeakMap,v=new WeakMap,f=new WeakMap,d=new WeakMap,P=new WeakMap,w=new WeakMap,_=new WeakMap,C=new WeakMap,E=new WeakMap,y=new WeakMap;var U=Object.defineProperty,V=Object.getOwnPropertyDescriptor,X=(i,e,s,o)=>{for(var n=o>1?void 0:o?V(e,s):e,p=i.length-1,L;p>=0;p--)(L=i[p])&&(n=(o?L(e,s,n):L(n))||n);return o&&n&&U(e,s,n),n},I=(i,e,s)=>{if(!e.has(i))throw TypeError("Cannot "+s)},r=(i,e,s)=>(I(i,e,"read from private field"),s?s.call(i):e.get(i)),b=(i,e,s)=>{if(e.has(i))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(i):e.set(i,s)},Y=(i,e,s,o)=>(I(i,e,"write to private field"),e.set(i,s),s),h,S,g,z,W,R;exports.PointerElement=class extends H.CustomElement{constructor(){super(),b(this,h,void 0),b(this,S,new x.CSSProperty(this,"--damping",20)),b(this,g,new x.CSSProperty(this,"--mass",0)),b(this,z,new x.CSSProperty(this,"--stiffness",0)),b(this,W,new x.CSSProperty(this,"--cartesian",!1)),b(this,R,new x.CSSProperty(this,"--normalize",!1)),Y(this,h,new F({element:this})),r(this,S).subscribe(e=>{r(this,h).x.damping=e.current,r(this,h).y.damping=e.current,r(this,h).z.damping=e.current}),r(this,W).subscribe(e=>{r(this,h).cartesian=e.current}),r(this,R).subscribe(e=>{r(this,h).normalize=e.current}),r(this,g).subscribe(e=>{r(this,h).x.mass=e.current,r(this,h).y.mass=e.current,r(this,h).z.mass=e.current}),r(this,z).subscribe(e=>{r(this,h).x.stiffness=e.current,r(this,h).y.stiffness=e.current,r(this,h).z.stiffness=e.current}),r(this,h).x.subscribe(e=>{this.style.setProperty("--x",e.current.toString())}),r(this,h).y.subscribe(e=>{this.style.setProperty("--y",e.current.toString())}),r(this,h).z.subscribe(e=>{this.style.setProperty("--z",e.current.toString())})}get pointer(){return r(this,h)}connectedCallback(){r(this,h).connect(),r(this,S).observe(),r(this,g).observe(),r(this,z).observe()}disconnectedCallback(){r(this,h).disconnect(),r(this,S).unobserve(),r(this,g).unobserve(),r(this,z).unobserve(),this.style.removeProperty("--x"),this.style.removeProperty("--y"),this.style.removeProperty("--z")}};h=new WeakMap;S=new WeakMap;g=new WeakMap;z=new WeakMap;W=new WeakMap;R=new WeakMap;exports.PointerElement=X([H.define("e-pointer")],exports.PointerElement);exports.Pointer=F;
1
+ "use strict";var J=Object.defineProperty;var D=Object.getOwnPropertySymbols;var K=Object.prototype.hasOwnProperty,N=Object.prototype.propertyIsEnumerable;var k=(i,e,s)=>e in i?J(i,e,{enumerable:!0,configurable:!0,writable:!0,value:s}):i[e]=s,O=(i,e)=>{for(var s in e||(e={}))K.call(e,s)&&k(i,s,e[s]);if(D)for(var s of D(e))N.call(e,s)&&k(i,s,e[s]);return i};var T=(i,e,s)=>{if(!e.has(i))throw TypeError("Cannot "+s)};var t=(i,e,s)=>(T(i,e,"read from private field"),s?s.call(i):e.get(i)),a=(i,e,s)=>{if(e.has(i))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(i):e.set(i,s)},l=(i,e,s,o)=>(T(i,e,"write to private field"),o?o.call(i,s):e.set(i,s),s);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require("../Store-CIs_NjhF.cjs");const q=require("../coordinates-D8Np3cPD.cjs"),Q=require("../dom-JBOkFLTh.cjs"),A=require("../math-GDWEqu7y.cjs");require("../ticker/index.cjs");const M=require("../Damped-DmcKRSST.cjs"),B=require("../element-resizer/index.cjs"),G=require("../window-resizer/index.cjs"),H=require("../custom-element/index.cjs"),x=require("../css-property/index.cjs");var c,u,m,v,f,d,P,w,_,C,E,y;class F{constructor(e){a(this,c,void 0);a(this,u,void 0);a(this,m,void 0);a(this,v,void 0);a(this,f,void 0);a(this,d,void 0);a(this,P,0);a(this,w,0);a(this,_,e=>{t(this,v).set(1)});a(this,C,e=>{t(this,v).set(0)});a(this,E,e=>{const s=q.getPointerPosition(e,t(this,c).getBoundingClientRect()),o={width:t(this,P),height:t(this,w)},n={x:s.x,y:s.y};if(t(this,f)){const p=q.screenToCartesian(n,o);n.x=p.x,n.y=p.y}if(t(this,d)){const p=q.normalize(n,o);n.x=A.clamp(p.x*2,-1,1),n.y=A.clamp(p.y*2,-1,1)}t(this,u).set(n.x),t(this,m).set(n.y)});a(this,y,()=>{l(this,P,this.element.clientWidth),l(this,w,this.element.clientHeight);let e=0,s=0,o=0,n=0;t(this,f)?t(this,d)?(e=-1,s=1,o=-1,n=1):(e=t(this,P)/2*-1,s=t(this,P)/2*1,o=t(this,w)/2*-1,n=t(this,w)/2*1):t(this,d)?(e=0,s=1,o=0,n=1):(e=0,s=t(this,P),o=0,n=t(this,w)),t(this,u).min=e,t(this,u).max=s,t(this,m).min=o,t(this,m).max=n});l(this,c,Q.getElement(e.element)),l(this,u,new M.Damped(0,e.damped)),l(this,m,new M.Damped(0,e.damped)),l(this,v,new M.Damped(0,O({min:0,max:1},e.damped))),l(this,f,e.cartesian||!1),l(this,d,e.normalize||!1)}get element(){return t(this,c)}get x(){return t(this,u)}get y(){return t(this,m)}get z(){return t(this,v)}get cartesian(){return t(this,f)}set cartesian(e){l(this,f,e),t(this,y).call(this)}get normalize(){return t(this,d)}set normalize(e){l(this,d,e),t(this,y).call(this)}connect(){t(this,c).addEventListener("pointerenter",t(this,_)),t(this,c).addEventListener("pointerleave",t(this,C)),t(this,c).addEventListener("pointermove",t(this,E)),B.elementResizer.subscribe(t(this,c),t(this,y)),G.windowResizer.subscribe(t(this,y))}disconnect(){t(this,c).removeEventListener("pointerenter",t(this,_)),t(this,c).removeEventListener("pointerleave",t(this,C)),t(this,c).removeEventListener("pointermove",t(this,E)),B.elementResizer.unsubscribe(t(this,y)),G.windowResizer.unsubscribe(t(this,y)),t(this,u).reset(),t(this,m).reset(),t(this,v).reset()}}c=new WeakMap,u=new WeakMap,m=new WeakMap,v=new WeakMap,f=new WeakMap,d=new WeakMap,P=new WeakMap,w=new WeakMap,_=new WeakMap,C=new WeakMap,E=new WeakMap,y=new WeakMap;var U=Object.defineProperty,V=Object.getOwnPropertyDescriptor,X=(i,e,s,o)=>{for(var n=o>1?void 0:o?V(e,s):e,p=i.length-1,L;p>=0;p--)(L=i[p])&&(n=(o?L(e,s,n):L(n))||n);return o&&n&&U(e,s,n),n},I=(i,e,s)=>{if(!e.has(i))throw TypeError("Cannot "+s)},r=(i,e,s)=>(I(i,e,"read from private field"),s?s.call(i):e.get(i)),b=(i,e,s)=>{if(e.has(i))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(i):e.set(i,s)},Y=(i,e,s,o)=>(I(i,e,"write to private field"),e.set(i,s),s),h,S,g,z,W,R;exports.PointerElement=class extends H.CustomElement{constructor(){super(),b(this,h,void 0),b(this,S,new x.CSSProperty(this,"--damping",20)),b(this,g,new x.CSSProperty(this,"--mass",0)),b(this,z,new x.CSSProperty(this,"--stiffness",0)),b(this,W,new x.CSSProperty(this,"--cartesian",!1)),b(this,R,new x.CSSProperty(this,"--normalize",!1)),Y(this,h,new F({element:this})),r(this,S).subscribe(e=>{r(this,h).x.damping=e.current,r(this,h).y.damping=e.current,r(this,h).z.damping=e.current}),r(this,W).subscribe(e=>{r(this,h).cartesian=e.current}),r(this,R).subscribe(e=>{r(this,h).normalize=e.current}),r(this,g).subscribe(e=>{r(this,h).x.mass=e.current,r(this,h).y.mass=e.current,r(this,h).z.mass=e.current}),r(this,z).subscribe(e=>{r(this,h).x.stiffness=e.current,r(this,h).y.stiffness=e.current,r(this,h).z.stiffness=e.current}),r(this,h).x.subscribe(e=>{this.style.setProperty("--x",e.current.toString())}),r(this,h).y.subscribe(e=>{this.style.setProperty("--y",e.current.toString())}),r(this,h).z.subscribe(e=>{this.style.setProperty("--z",e.current.toString())})}get pointer(){return r(this,h)}connectedCallback(){r(this,h).connect(),r(this,S).observe(),r(this,g).observe(),r(this,z).observe()}disconnectedCallback(){r(this,h).disconnect(),r(this,S).unobserve(),r(this,g).unobserve(),r(this,z).unobserve(),this.style.removeProperty("--x"),this.style.removeProperty("--y"),this.style.removeProperty("--z")}};h=new WeakMap;S=new WeakMap;g=new WeakMap;z=new WeakMap;W=new WeakMap;R=new WeakMap;exports.PointerElement=X([H.define("e-pointer")],exports.PointerElement);exports.Pointer=F;
@@ -18,12 +18,12 @@ var s = (e, t, i) => (T(e, t, "read from private field"), i ? i.call(e) : t.get(
18
18
  throw TypeError("Cannot add the same private member more than once");
19
19
  t instanceof WeakSet ? t.add(e) : t.set(e, i);
20
20
  }, p = (e, t, i, o) => (T(e, t, "write to private field"), o ? o.call(e, i) : t.set(e, i), i);
21
- import "../Store-BI2xxXOA.js";
21
+ import "../Store-Dqcu1DnE.js";
22
22
  import { g as K, s as N, n as Q } from "../coordinates-CgdGoSYs.js";
23
23
  import { g as U } from "../dom-0S_WDL4g.js";
24
24
  import { c as A } from "../math-BOBiC4TN.js";
25
25
  import "../ticker/index.js";
26
- import { D as W } from "../Damped-Mx_FNNVz.js";
26
+ import { D as W } from "../Damped-vepIw9Ku.js";
27
27
  import { elementResizer as B } from "../element-resizer/index.js";
28
28
  import { windowResizer as G } from "../window-resizer/index.js";
29
29
  import { CustomElement as V, define as X } from "../custom-element/index.js";
@@ -8,7 +8,7 @@ export declare class PopoverElement extends CustomElement {
8
8
  constructor();
9
9
  get history(): Attribute<false>;
10
10
  get single(): Attribute<false>;
11
- get opened(): Store<boolean, keyof import('../store').StoreManagers, import('../store').StoreEntry<boolean>>;
11
+ get opened(): Store<boolean, keyof import('../store').StoreManagers>;
12
12
  open: (useTransition?: boolean) => void;
13
13
  close: () => void;
14
14
  protected connectedCallback(): void;
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const A=require("../attribute/index.cjs"),S=require("../custom-element/index.cjs"),D=require("../Store-6s0YXK4o.cjs"),H=require("../style-At6aDoqG.cjs"),I=require("../browser-CpzFX2xg.cjs"),N=require("../tags-ld5jemJw.cjs");var R=Object.defineProperty,G=Object.getOwnPropertyDescriptor,K=(t,e,s,r)=>{for(var a=r>1?void 0:r?G(e,s):e,l=t.length-1,p;l>=0;l--)(p=t[l])&&(a=(r?p(e,s,a):p(a))||a);return r&&a&&R(e,s,a),a},b=(t,e,s)=>{if(!e.has(t))throw TypeError("Cannot "+s)},i=(t,e,s)=>(b(t,e,"read from private field"),s?s.call(t):e.get(t)),h=(t,e,s)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,s)},W=(t,e,s,r)=>(b(t,e,"write to private field"),e.set(t,s),s),q=(t,e,s)=>(b(t,e,"access private method"),s),M,c,m,d,v,f,O,x,u,g,w,y,L,$,E;exports.PopoverElement=class extends S.CustomElement{constructor(){super(),h(this,O),h(this,u),h(this,L),h(this,M,-1),h(this,c,new D.Store(!1)),h(this,m,void 0),h(this,d,new A.Attribute(this,"history",!1)),h(this,v,new A.Attribute(this,"single",!1)),h(this,f,!1),this.open=(e=!0)=>{if(i(this,c).current)return;i(this,c).current=!0,i(this,v).current&&(exports.PopoverElement.__opened.forEach(r=>r.close()),exports.PopoverElement.__opened=[]),exports.PopoverElement.__opened.push(this),W(this,M,exports.PopoverElement.__opened.length-1),i(this,d).current&&i(this,f)&&history.pushState("","",i(this,O,x)),clearTimeout(i(this,m)),this.classList.add("triggered"),this.style.display="block",this.dispatchEvent(new CustomEvent("popoverTriggered"));const s=()=>{addEventListener("click",i(this,w)),addEventListener("keydown",i(this,y)),this.style.opacity="1",this.classList.add("opened"),this.dispatchEvent(new CustomEvent("popoverOpened"))};e?setTimeout(s):s()},this.close=()=>{if(i(this,c).current){if(i(this,c).current=!1,exports.PopoverElement.__opened=exports.PopoverElement.__opened.filter(e=>e!==this),i(this,d).current){const e=new URL(location.href);e.searchParams.delete(i(this,u,g)),history.replaceState(null,"",e.href)}this.classList.remove("opened"),this.style.opacity="0",this.dispatchEvent(new CustomEvent("popoverClosing")),removeEventListener("click",i(this,w)),removeEventListener("keydown",i(this,y)),setTimeout(()=>{this.classList.remove("triggered"),this.style.display="none",this.dispatchEvent(new CustomEvent("popoverClosed"))},H.getElementTransitionDurationMS(this)+10)}},h(this,w,e=>{q(this,L,$).call(this,()=>{var p;const r=e.composedPath()[0],a=r instanceof HTMLElement&&(this.contains(r)||((p=this.shadowRoot)==null?void 0:p.contains(r))),l=r instanceof HTMLElement&&r.hasAttribute("outside");(!a||l)&&this.close()})}),h(this,y,e=>{q(this,L,$).call(this,()=>{e.code==="Escape"&&this.close()})}),h(this,E,()=>{W(this,f,!1),i(this,c).current&&i(this,d).current&&!location.search.includes(i(this,u,g))?this.close():!i(this,c).current&&i(this,d).current&&location.search.includes(i(this,u,g))&&this.open(),W(this,f,!0)}),this.setAttribute("popover-target","")}get history(){return i(this,d)}get single(){return i(this,v)}get opened(){return i(this,c)}connectedCallback(){i(this,d).observe(),i(this,v).observe(),this.style.opacity="0",this.style.display="none",addEventListener("popstate",i(this,E)),setTimeout(()=>{i(this,E).call(this)},0)}disconnectedCallback(){i(this,d).unobserve(),i(this,v).unobserve(),exports.PopoverElement.__opened=exports.PopoverElement.__opened.filter(e=>e!==this),clearTimeout(i(this,m)),removeEventListener("popstate",i(this,E))}};M=new WeakMap;c=new WeakMap;m=new WeakMap;d=new WeakMap;v=new WeakMap;f=new WeakMap;O=new WeakSet;x=function(){return`${location.pathname}${location.search?location.search+"&":"?"}${i(this,u,g)}`};u=new WeakSet;g=function(){return`modal-${this.id}`};w=new WeakMap;y=new WeakMap;L=new WeakSet;$=function(t){(exports.PopoverElement.__opened[i(this,M)-1]||exports.PopoverElement.__opened.length===1)&&t()};E=new WeakMap;exports.PopoverElement.__opened=[];exports.PopoverElement=K([S.define("e-popover")],exports.PopoverElement);var U=Object.defineProperty,z=Object.getOwnPropertyDescriptor,F=(t,e,s,r)=>{for(var a=r>1?void 0:r?z(e,s):e,l=t.length-1,p;l>=0;l--)(p=t[l])&&(a=(r?p(e,s,a):p(a))||a);return r&&a&&U(e,s,a),a},B=(t,e,s)=>{if(!e.has(t))throw TypeError("Cannot "+s)},o=(t,e,s)=>(B(t,e,"read from private field"),s?s.call(t):e.get(t)),_=(t,e,s)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,s)},J=(t,e,s,r)=>(B(t,e,"write to private field"),e.set(t,s),s),n,P,C,k,T;exports.PopoverButtonElement=class extends S.CustomElement{constructor(){super(),_(this,n,void 0),_(this,P,()=>{this.classList.add("triggered")}),_(this,C,()=>{this.classList.add("opened")}),_(this,k,()=>{this.classList.remove("opened")}),_(this,T,()=>{this.classList.remove("triggered")}),I.isBrowser&&N.element(this,{tabindex:this.getAttribute("tabindex")||"0",onClick:()=>{if(o(this,n)){const e=this.getAttribute("type")||"open";e==="open"||e==="toggle"&&!o(this,n).opened.current?o(this,n).open():(e==="close"||e==="toggle"&&o(this,n).opened.current)&&o(this,n).close()}},onKeydown:e=>{e.code==="Space"&&e.currentTarget.click()}})}get popoverElement(){return o(this,n)}connectedCallback(){var s;const e=this.getAttribute("target");if(e){let r=null;e==="parent"?r=this.closest("[popover-target]"):e==="sibling"?r=(s=this.parentElement)==null?void 0:s.querySelector("[popover-target]"):r=document.querySelector(`#${e}`)||this.getRootNode().querySelector(`#${e}`),r instanceof HTMLElement?(J(this,n,r),o(this,n).addEventListener("popoverTriggered",o(this,P)),o(this,n).addEventListener("popoverOpened",o(this,C)),o(this,n).addEventListener("popoverClosing",o(this,k)),o(this,n).addEventListener("popoverClosed",o(this,T))):console.warn(this,`target ${e} not found`)}}disconnectedCallback(){o(this,n)&&(o(this,n).removeEventListener("popoverTriggered",o(this,P)),o(this,n).removeEventListener("popoverOpened",o(this,C)),o(this,n).removeEventListener("popoverClosing",o(this,k)),o(this,n).removeEventListener("popoverClosed",o(this,T)))}};n=new WeakMap;P=new WeakMap;C=new WeakMap;k=new WeakMap;T=new WeakMap;exports.PopoverButtonElement=F([S.define("e-popover-button")],exports.PopoverButtonElement);
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const A=require("../attribute/index.cjs"),S=require("../custom-element/index.cjs"),D=require("../Store-CIs_NjhF.cjs"),H=require("../style-At6aDoqG.cjs"),I=require("../browser-CpzFX2xg.cjs"),N=require("../tags-yvEoM921.cjs");var R=Object.defineProperty,G=Object.getOwnPropertyDescriptor,K=(t,e,s,r)=>{for(var a=r>1?void 0:r?G(e,s):e,l=t.length-1,p;l>=0;l--)(p=t[l])&&(a=(r?p(e,s,a):p(a))||a);return r&&a&&R(e,s,a),a},b=(t,e,s)=>{if(!e.has(t))throw TypeError("Cannot "+s)},i=(t,e,s)=>(b(t,e,"read from private field"),s?s.call(t):e.get(t)),h=(t,e,s)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,s)},W=(t,e,s,r)=>(b(t,e,"write to private field"),e.set(t,s),s),q=(t,e,s)=>(b(t,e,"access private method"),s),M,c,m,d,v,f,O,x,u,g,w,y,L,$,E;exports.PopoverElement=class extends S.CustomElement{constructor(){super(),h(this,O),h(this,u),h(this,L),h(this,M,-1),h(this,c,new D.Store(!1)),h(this,m,void 0),h(this,d,new A.Attribute(this,"history",!1)),h(this,v,new A.Attribute(this,"single",!1)),h(this,f,!1),this.open=(e=!0)=>{if(i(this,c).current)return;i(this,c).current=!0,i(this,v).current&&(exports.PopoverElement.__opened.forEach(r=>r.close()),exports.PopoverElement.__opened=[]),exports.PopoverElement.__opened.push(this),W(this,M,exports.PopoverElement.__opened.length-1),i(this,d).current&&i(this,f)&&history.pushState("","",i(this,O,x)),clearTimeout(i(this,m)),this.classList.add("triggered"),this.style.display="block",this.dispatchEvent(new CustomEvent("popoverTriggered"));const s=()=>{addEventListener("click",i(this,w)),addEventListener("keydown",i(this,y)),this.style.opacity="1",this.classList.add("opened"),this.dispatchEvent(new CustomEvent("popoverOpened"))};e?setTimeout(s):s()},this.close=()=>{if(i(this,c).current){if(i(this,c).current=!1,exports.PopoverElement.__opened=exports.PopoverElement.__opened.filter(e=>e!==this),i(this,d).current){const e=new URL(location.href);e.searchParams.delete(i(this,u,g)),history.replaceState(null,"",e.href)}this.classList.remove("opened"),this.style.opacity="0",this.dispatchEvent(new CustomEvent("popoverClosing")),removeEventListener("click",i(this,w)),removeEventListener("keydown",i(this,y)),setTimeout(()=>{this.classList.remove("triggered"),this.style.display="none",this.dispatchEvent(new CustomEvent("popoverClosed"))},H.getElementTransitionDurationMS(this)+10)}},h(this,w,e=>{q(this,L,$).call(this,()=>{var p;const r=e.composedPath()[0],a=r instanceof HTMLElement&&(this.contains(r)||((p=this.shadowRoot)==null?void 0:p.contains(r))),l=r instanceof HTMLElement&&r.hasAttribute("outside");(!a||l)&&this.close()})}),h(this,y,e=>{q(this,L,$).call(this,()=>{e.code==="Escape"&&this.close()})}),h(this,E,()=>{W(this,f,!1),i(this,c).current&&i(this,d).current&&!location.search.includes(i(this,u,g))?this.close():!i(this,c).current&&i(this,d).current&&location.search.includes(i(this,u,g))&&this.open(),W(this,f,!0)}),this.setAttribute("popover-target","")}get history(){return i(this,d)}get single(){return i(this,v)}get opened(){return i(this,c)}connectedCallback(){i(this,d).observe(),i(this,v).observe(),this.style.opacity="0",this.style.display="none",addEventListener("popstate",i(this,E)),setTimeout(()=>{i(this,E).call(this)},0)}disconnectedCallback(){i(this,d).unobserve(),i(this,v).unobserve(),exports.PopoverElement.__opened=exports.PopoverElement.__opened.filter(e=>e!==this),clearTimeout(i(this,m)),removeEventListener("popstate",i(this,E))}};M=new WeakMap;c=new WeakMap;m=new WeakMap;d=new WeakMap;v=new WeakMap;f=new WeakMap;O=new WeakSet;x=function(){return`${location.pathname}${location.search?location.search+"&":"?"}${i(this,u,g)}`};u=new WeakSet;g=function(){return`modal-${this.id}`};w=new WeakMap;y=new WeakMap;L=new WeakSet;$=function(t){(exports.PopoverElement.__opened[i(this,M)-1]||exports.PopoverElement.__opened.length===1)&&t()};E=new WeakMap;exports.PopoverElement.__opened=[];exports.PopoverElement=K([S.define("e-popover")],exports.PopoverElement);var U=Object.defineProperty,z=Object.getOwnPropertyDescriptor,F=(t,e,s,r)=>{for(var a=r>1?void 0:r?z(e,s):e,l=t.length-1,p;l>=0;l--)(p=t[l])&&(a=(r?p(e,s,a):p(a))||a);return r&&a&&U(e,s,a),a},B=(t,e,s)=>{if(!e.has(t))throw TypeError("Cannot "+s)},o=(t,e,s)=>(B(t,e,"read from private field"),s?s.call(t):e.get(t)),_=(t,e,s)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,s)},J=(t,e,s,r)=>(B(t,e,"write to private field"),e.set(t,s),s),n,P,C,k,T;exports.PopoverButtonElement=class extends S.CustomElement{constructor(){super(),_(this,n,void 0),_(this,P,()=>{this.classList.add("triggered")}),_(this,C,()=>{this.classList.add("opened")}),_(this,k,()=>{this.classList.remove("opened")}),_(this,T,()=>{this.classList.remove("triggered")}),I.isBrowser&&N.element(this,{tabindex:this.getAttribute("tabindex")||"0",onClick:()=>{if(o(this,n)){const e=this.getAttribute("type")||"open";e==="open"||e==="toggle"&&!o(this,n).opened.current?o(this,n).open():(e==="close"||e==="toggle"&&o(this,n).opened.current)&&o(this,n).close()}},onKeydown:e=>{e.code==="Space"&&e.currentTarget.click()}})}get popoverElement(){return o(this,n)}connectedCallback(){var s;const e=this.getAttribute("target");if(e){let r=null;e==="parent"?r=this.closest("[popover-target]"):e==="sibling"?r=(s=this.parentElement)==null?void 0:s.querySelector("[popover-target]"):r=document.querySelector(`#${e}`)||this.getRootNode().querySelector(`#${e}`),r instanceof HTMLElement?(J(this,n,r),o(this,n).addEventListener("popoverTriggered",o(this,P)),o(this,n).addEventListener("popoverOpened",o(this,C)),o(this,n).addEventListener("popoverClosing",o(this,k)),o(this,n).addEventListener("popoverClosed",o(this,T))):console.warn(this,`target ${e} not found`)}}disconnectedCallback(){o(this,n)&&(o(this,n).removeEventListener("popoverTriggered",o(this,P)),o(this,n).removeEventListener("popoverOpened",o(this,C)),o(this,n).removeEventListener("popoverClosing",o(this,k)),o(this,n).removeEventListener("popoverClosed",o(this,T)))}};n=new WeakMap;P=new WeakMap;C=new WeakMap;k=new WeakMap;T=new WeakMap;exports.PopoverButtonElement=F([S.define("e-popover-button")],exports.PopoverButtonElement);
@@ -1,9 +1,9 @@
1
1
  import { Attribute as x } from "../attribute/index.js";
2
2
  import { CustomElement as q, define as H } from "../custom-element/index.js";
3
- import { S as R } from "../Store-BI2xxXOA.js";
3
+ import { S as R } from "../Store-Dqcu1DnE.js";
4
4
  import { a as B } from "../style-CklEF62D.js";
5
5
  import { i as G } from "../browser-0zX67oeU.js";
6
- import { e as K } from "../tags-BqJKcIve.js";
6
+ import { e as K } from "../tags-C-6uXIAT.js";
7
7
  var U = Object.defineProperty, z = Object.getOwnPropertyDescriptor, F = (e, t, s, a) => {
8
8
  for (var o = a > 1 ? void 0 : a ? z(t, s) : t, c = e.length - 1, v; c >= 0; c--)
9
9
  (v = e[c]) && (o = (a ? v(t, s, o) : v(o)) || o);
@@ -1 +1 @@
1
- "use strict";var Z=(a,e)=>(e=Symbol[a])?e:Symbol.for("Symbol."+a);var K=(a,e,s)=>{if(!e.has(a))throw TypeError("Cannot "+s)};var t=(a,e,s)=>(K(a,e,"read from private field"),s?s.call(a):e.get(a)),r=(a,e,s)=>{if(e.has(a))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(a):e.set(a,s)},n=(a,e,s,i)=>(K(a,e,"write to private field"),i?i.call(a,s):e.set(a,s),s);var W=(a,e,s)=>(K(a,e,"access private method"),s);var M=(a,e,s)=>new Promise((i,h)=>{var o=u=>{try{f(s.next(u))}catch(w){h(w)}},c=u=>{try{f(s.throw(u))}catch(w){h(w)}},f=u=>u.done?i(u.value):Promise.resolve(u.value).then(o,c);f((s=s.apply(a,e)).next())});var Y=(a,e,s)=>(e=a[Z("asyncIterator")])?e.call(a):(a=a[Z("iterator")](),e={},s=(i,h)=>(h=a[i])&&(e[i]=o=>new Promise((c,f,u)=>(o=h.call(a,o),u=o.done,Promise.resolve(o.value).then(w=>c({value:w,done:u}),f)))),s("next"),s("return"),e);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const at=require("urlpattern-polyfill"),rt=require("../notifier/index.cjs"),tt=require("../browser-CpzFX2xg.cjs"),ht=require("../function-MthRj-GJ.cjs"),F=require("../url-C3dWnJQg.cjs"),ot=require("../instantiate-Cx-JmH6m.cjs"),$=require("../object-CCiXnER2.cjs");var R,O,A,p,d,v,S,L,b,E,x,et;class ct{constructor(e,s){r(this,x);r(this,R,void 0);r(this,O,void 0);r(this,A,void 0);r(this,p,void 0);r(this,d,void 0);r(this,v,void 0);r(this,S,void 0);r(this,L,null);r(this,b,[]);r(this,E,[]);n(this,R,e),n(this,O,s),n(this,A,new URLPattern({pathname:t(this,R)})),n(this,p,null),n(this,d,null),n(this,v,!1),n(this,S,null),tt.isBrowser&&n(this,L,new MutationObserver(i=>{i[0].addedNodes.forEach(o=>{t(this,p)?t(this,E).push(o):t(this,b).push(o)})}))}get pattern(){return t(this,R)}get urlPattern(){return t(this,A)}get isActive(){return t(this,v)}get element(){return t(this,d)}get nest(){return t(this,S)}testPathname(e){return this.urlPattern.test({pathname:e})}render(e,s){return M(this,null,function*(){var i,h;if(t(this,L).observe(document.head,{childList:!0,subtree:!0}),t(this,p))t(this,b).forEach(o=>{document.head.appendChild(o)});else{const o=yield t(this,O).call(this);if(n(this,E,[...t(this,b)]),typeof o.default=="function"&&(n(this,p,o.default),$.isESClass(o.default))){const c="e-"+((i=t(this,p))==null?void 0:i.name.toLowerCase());customElements.get(c)||customElements.define(c,o.default)}}if(yield W(this,x,et).call(this),t(this,p)){const o=t(this,A).exec({pathname:s}),c=(o==null?void 0:o.pathname.groups)||{},f=Object.fromEntries(new URLSearchParams(location.search)),u={pathnameParams:c,searchParams:f};$.isESClass(t(this,p))?n(this,d,new(t(this,p))(u)):n(this,d,ot.instantiate(t(this,p),{attributes:u})),e.appendChild(t(this,d)),n(this,S,t(this,d).querySelector("[data-nest]")||((h=t(this,d).shadowRoot)==null?void 0:h.querySelector("[data-nest]"))||t(this,d).shadowRoot||t(this,d)),n(this,v,!0)}t(this,L).disconnect()})}close(){var e;t(this,L).disconnect(),(e=t(this,d))==null||e.remove(),n(this,v,!1),t(this,E).forEach(s=>document.head.removeChild(s)),n(this,E,[])}getAnchorElements(){var s;let e=[];return t(this,d)&&(e=[...t(this,d).querySelectorAll("a")]),(s=t(this,d))!=null&&s.shadowRoot&&(e=[...e,...t(this,d).shadowRoot.querySelectorAll("a")]),e}}R=new WeakMap,O=new WeakMap,A=new WeakMap,p=new WeakMap,d=new WeakMap,v=new WeakMap,S=new WeakMap,L=new WeakMap,b=new WeakMap,E=new WeakMap,x=new WeakSet,et=function(){return M(this,null,function*(){const e=t(this,b).filter(c=>c instanceof HTMLElement?c.tagName==="STYLE"||c.tagName==="SCRIPT"||c.tagName==="LINK":!1);try{for(var s=Y(e),i,h,o;i=!(h=yield s.next()).done;i=!1){const c=h.value;yield new Promise(f=>{c.onload=()=>{f()}})}}catch(h){o=[h]}finally{try{i&&(h=s.return)&&(yield h.call(s))}finally{if(o)throw o[0]}}})};var k,m,P,U,q,j;class lt{constructor(e,s){r(this,k,void 0);r(this,m,void 0);r(this,P,void 0);r(this,U,void 0);r(this,q,void 0);r(this,j,e=>{e.preventDefault(),t(this,k).links.forEach(s=>{var i;t(this,P)===t(s,P)||(i=t(s,q))!=null&&i.includes(t(this,P))?t(s,m).classList.add("clicked"):t(s,m).classList.remove("clicked")}),t(this,k).navigate(t(this,P),t(this,U))});var o,c;n(this,k,e),n(this,m,s),n(this,P,t(this,m).getAttribute("href")||"/"),n(this,U,t(this,m).getAttribute("data-history-action")||"push"),t(this,m).addEventListener("click",t(this,j));const i=e.normalizePath(t(this,P)),h=e.normalizePath(location.pathname);n(this,q,(o=t(this,m).getAttribute("data-match-paths"))==null?void 0:o.split(",").map(f=>e.normalizePath(f.trim()).pathname)),t(this,m).hasAttribute("data-include")?h.pathname.includes(i.pathname)&&t(this,m).classList.add("current"):i.pathname===h.pathname||(c=t(this,q))!=null&&c.includes(h.pathname)?(t(this,m).classList.add("current"),t(this,m).classList.add("clicked")):t(this,m).classList.remove("clicked")}destroy(){t(this,m).removeEventListener("click",t(this,j)),t(this,m).classList.remove("current")}}k=new WeakMap,m=new WeakMap,P=new WeakMap,U=new WeakMap,q=new WeakMap,j=new WeakMap;globalThis.URLPattern=at.URLPattern;var C,N,g,z,T,y,H,B,I,_,st,D;class ut{constructor(e){r(this,_);r(this,C,null);r(this,N,null);r(this,g,[]);r(this,z,null);r(this,T,[]);r(this,y,void 0);r(this,H,null);r(this,B,new rt.Notifier);r(this,I,ht.debounce(()=>{const e=s=>s.split("/").length;n(this,g,t(this,g).sort((s,i)=>e(s.pattern)-e(i.pattern))),this.navigate(location.pathname)},0));r(this,D,e=>{e.state&&this.navigate(e.state,"none")});tt.isBrowser&&(e!=null&&e.base?n(this,N,F.normalizeBase(e.base)):n(this,N,"/"),n(this,C,(e==null?void 0:e.rootElement)||document.body),addEventListener("popstate",t(this,D)))}get currentPathname(){return t(this,H)}get candidatePathname(){return t(this,y)}get routes(){return t(this,g)}get links(){return t(this,T)}navigationEvent(e){return t(this,B).subscribe(e)}defineRoute(e,s){const i=new ct(e,s);t(this,g).push(i),t(this,I).call(this)}navigate(e,s="push"){return M(this,null,function*(){var Q,V;const i=this.normalizePath(e);let{pathname:h,hash:o,parameters:c,leaf:f}=i;if(t(this,y)===h||t(this,H)===h)return;n(this,y,h);const u=t(this,g).filter(l=>l.isActive),w=t(this,g).filter(l=>!u.includes(l)&&l.testPathname(f)),it=u.filter(l=>!l.testPathname(f)),G=u.filter(l=>l.testPathname(f));let J=!0;if(this.preprocessor)try{yield new Promise((l,nt)=>{var X;(X=this.preprocessor)==null||X.call(this,{path:i,resolve:l,reject:nt})})}catch(l){l?console.error(l):console.log("Route change canceled"),J=!1}if(J&&t(this,y)===h){n(this,z,G[G.length-1]),it.forEach(l=>{l.close()}),n(this,H,h),F.changeHistory(s,h,c,o);try{for(var ft=Y(w),pt,gt,Pt;pt=!(gt=yield ft.next()).done;pt=!1){const l=gt.value;yield l.render(((Q=t(this,z))==null?void 0:Q.nest)||t(this,C),h),n(this,z,l)}}catch(gt){Pt=[gt]}finally{try{pt&&(gt=ft.return)&&(yield gt.call(ft))}finally{if(Pt)throw Pt[0]}}W(this,_,st).call(this),(V=this.postprocessor)==null||V.call(this,{pathname:h}),t(this,B).notify({pathname:h})}})}normalizePath(e){return F.splitPath(e,t(this,N))}}C=new WeakMap,N=new WeakMap,g=new WeakMap,z=new WeakMap,T=new WeakMap,y=new WeakMap,H=new WeakMap,B=new WeakMap,I=new WeakMap,_=new WeakSet,st=function(){const e=t(this,g).filter(i=>i.isActive),s=Array.from(new Set([...t(this,C).querySelectorAll("a"),...e.map(i=>i.getAnchorElements()).flat()].filter(i=>{var h;return(h=i.getAttribute("href"))==null?void 0:h.startsWith("/")})));t(this,T).forEach(i=>{i.destroy()}),n(this,T,s.map(i=>new lt(this,i)))},D=new WeakMap;exports.Router=ut;
1
+ "use strict";var Z=(n,e)=>(e=Symbol[n])?e:Symbol.for("Symbol."+n);var K=(n,e,s)=>{if(!e.has(n))throw TypeError("Cannot "+s)};var t=(n,e,s)=>(K(n,e,"read from private field"),s?s.call(n):e.get(n)),r=(n,e,s)=>{if(e.has(n))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(n):e.set(n,s)},a=(n,e,s,i)=>(K(n,e,"write to private field"),i?i.call(n,s):e.set(n,s),s);var W=(n,e,s)=>(K(n,e,"access private method"),s);var M=(n,e,s)=>new Promise((i,h)=>{var o=d=>{try{f(s.next(d))}catch(w){h(w)}},c=d=>{try{f(s.throw(d))}catch(w){h(w)}},f=d=>d.done?i(d.value):Promise.resolve(d.value).then(o,c);f((s=s.apply(n,e)).next())});var Y=(n,e,s)=>(e=n[Z("asyncIterator")])?e.call(n):(n=n[Z("iterator")](),e={},s=(i,h)=>(h=n[i])&&(e[i]=o=>new Promise((c,f,d)=>(o=h.call(n,o),d=o.done,Promise.resolve(o.value).then(w=>c({value:w,done:d}),f)))),s("next"),s("return"),e);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const nt=require("urlpattern-polyfill"),at=require("../notifier/index.cjs"),$=require("../browser-CpzFX2xg.cjs"),rt=require("../function-MthRj-GJ.cjs"),F=require("../url-C3dWnJQg.cjs"),ht=require("../object-CCiXnER2.cjs");var R,O,A,p,m,v,k,L,b,E,x,tt;class ot{constructor(e,s){r(this,x);r(this,R,void 0);r(this,O,void 0);r(this,A,void 0);r(this,p,void 0);r(this,m,void 0);r(this,v,void 0);r(this,k,void 0);r(this,L,null);r(this,b,[]);r(this,E,[]);a(this,R,e),a(this,O,s),a(this,A,new URLPattern({pathname:t(this,R)})),a(this,p,null),a(this,m,null),a(this,v,!1),a(this,k,null),$.isBrowser&&a(this,L,new MutationObserver(i=>{i[0].addedNodes.forEach(o=>{t(this,p)?t(this,E).push(o):t(this,b).push(o)})}))}get pattern(){return t(this,R)}get urlPattern(){return t(this,A)}get isActive(){return t(this,v)}get element(){return t(this,m)}get nest(){return t(this,k)}testPathname(e){return this.urlPattern.test({pathname:e})}render(e,s){return M(this,null,function*(){var i,h;if(t(this,L).observe(document.head,{childList:!0,subtree:!0}),t(this,p))t(this,b).forEach(o=>{document.head.appendChild(o)});else{const o=yield t(this,O).call(this);if(a(this,E,[...t(this,b)]),typeof o.default=="function"&&(a(this,p,o.default),ht.isESClass(o.default))){const c="e-"+((i=t(this,p))==null?void 0:i.name.toLowerCase());customElements.get(c)||customElements.define(c,o.default)}}if(yield W(this,x,tt).call(this),t(this,p)){const o=t(this,A).exec({pathname:s}),c=(o==null?void 0:o.pathname.groups)||{},f=Object.fromEntries(new URLSearchParams(location.search)),d={pathnameParams:c,searchParams:f};a(this,m,new(t(this,p))(d)),e.appendChild(t(this,m)),a(this,k,t(this,m).querySelector("[data-nest]")||((h=t(this,m).shadowRoot)==null?void 0:h.querySelector("[data-nest]"))||t(this,m).shadowRoot||t(this,m)),a(this,v,!0)}t(this,L).disconnect()})}close(){var e;t(this,L).disconnect(),(e=t(this,m))==null||e.remove(),a(this,v,!1),t(this,E).forEach(s=>document.head.removeChild(s)),a(this,E,[])}getAnchorElements(){var s;let e=[];return t(this,m)&&(e=[...t(this,m).querySelectorAll("a")]),(s=t(this,m))!=null&&s.shadowRoot&&(e=[...e,...t(this,m).shadowRoot.querySelectorAll("a")]),e}}R=new WeakMap,O=new WeakMap,A=new WeakMap,p=new WeakMap,m=new WeakMap,v=new WeakMap,k=new WeakMap,L=new WeakMap,b=new WeakMap,E=new WeakMap,x=new WeakSet,tt=function(){return M(this,null,function*(){const e=t(this,b).filter(c=>c instanceof HTMLElement?c.tagName==="STYLE"||c.tagName==="SCRIPT"||c.tagName==="LINK":!1);try{for(var s=Y(e),i,h,o;i=!(h=yield s.next()).done;i=!1){const c=h.value;yield new Promise(f=>{c.onload=()=>{f()}})}}catch(h){o=[h]}finally{try{i&&(h=s.return)&&(yield h.call(s))}finally{if(o)throw o[0]}}})};var S,u,P,U,q,j;class ct{constructor(e,s){r(this,S,void 0);r(this,u,void 0);r(this,P,void 0);r(this,U,void 0);r(this,q,void 0);r(this,j,e=>{e.preventDefault(),t(this,S).links.forEach(s=>{var i;t(this,P)===t(s,P)||(i=t(s,q))!=null&&i.includes(t(this,P))?t(s,u).classList.add("clicked"):t(s,u).classList.remove("clicked")}),t(this,S).navigate(t(this,P),t(this,U))});var o,c;a(this,S,e),a(this,u,s),a(this,P,t(this,u).getAttribute("href")||"/"),a(this,U,t(this,u).getAttribute("data-history-action")||"push"),t(this,u).addEventListener("click",t(this,j));const i=e.normalizePath(t(this,P)),h=e.normalizePath(location.pathname);a(this,q,(o=t(this,u).getAttribute("data-match-paths"))==null?void 0:o.split(",").map(f=>e.normalizePath(f.trim()).pathname)),t(this,u).hasAttribute("data-include")?h.pathname.includes(i.pathname)&&t(this,u).classList.add("current"):i.pathname===h.pathname||(c=t(this,q))!=null&&c.includes(h.pathname)?(t(this,u).classList.add("current"),t(this,u).classList.add("clicked")):t(this,u).classList.remove("clicked")}destroy(){t(this,u).removeEventListener("click",t(this,j)),t(this,u).classList.remove("current")}}S=new WeakMap,u=new WeakMap,P=new WeakMap,U=new WeakMap,q=new WeakMap,j=new WeakMap;globalThis.URLPattern=nt.URLPattern;var N,C,g,z,T,y,H,B,I,_,et,D;class lt{constructor(e){r(this,_);r(this,N,null);r(this,C,null);r(this,g,[]);r(this,z,null);r(this,T,[]);r(this,y,void 0);r(this,H,null);r(this,B,new at.Notifier);r(this,I,rt.debounce(()=>{const e=s=>s.split("/").length;a(this,g,t(this,g).sort((s,i)=>e(s.pattern)-e(i.pattern))),this.navigate(location.pathname)},0));r(this,D,e=>{e.state&&this.navigate(e.state,"none")});$.isBrowser&&(e!=null&&e.base?a(this,C,F.normalizeBase(e.base)):a(this,C,"/"),a(this,N,(e==null?void 0:e.rootElement)||document.body),addEventListener("popstate",t(this,D)))}get currentPathname(){return t(this,H)}get candidatePathname(){return t(this,y)}get routes(){return t(this,g)}get links(){return t(this,T)}navigationEvent(e){return t(this,B).subscribe(e)}defineRoute(e,s){const i=new ot(e,s);t(this,g).push(i),t(this,I).call(this)}navigate(e,s="push"){return M(this,null,function*(){var Q,V;const i=this.normalizePath(e);let{pathname:h,hash:o,parameters:c,leaf:f}=i;if(t(this,y)===h||t(this,H)===h)return;a(this,y,h);const d=t(this,g).filter(l=>l.isActive),w=t(this,g).filter(l=>!d.includes(l)&&l.testPathname(f)),st=d.filter(l=>!l.testPathname(f)),G=d.filter(l=>l.testPathname(f));let J=!0;if(this.preprocessor)try{yield new Promise((l,it)=>{var X;(X=this.preprocessor)==null||X.call(this,{path:i,resolve:l,reject:it})})}catch(l){l?console.error(l):console.log("Route change canceled"),J=!1}if(J&&t(this,y)===h){a(this,z,G[G.length-1]),st.forEach(l=>{l.close()}),a(this,H,h),F.changeHistory(s,h,c,o);try{for(var mt=Y(w),ft,pt,gt;ft=!(pt=yield mt.next()).done;ft=!1){const l=pt.value;yield l.render(((Q=t(this,z))==null?void 0:Q.nest)||t(this,N),h),a(this,z,l)}}catch(pt){gt=[pt]}finally{try{ft&&(pt=mt.return)&&(yield pt.call(mt))}finally{if(gt)throw gt[0]}}W(this,_,et).call(this),(V=this.postprocessor)==null||V.call(this,{pathname:h}),t(this,B).notify({pathname:h})}})}normalizePath(e){return F.splitPath(e,t(this,C))}}N=new WeakMap,C=new WeakMap,g=new WeakMap,z=new WeakMap,T=new WeakMap,y=new WeakMap,H=new WeakMap,B=new WeakMap,I=new WeakMap,_=new WeakSet,et=function(){const e=t(this,g).filter(i=>i.isActive),s=Array.from(new Set([...t(this,N).querySelectorAll("a"),...e.map(i=>i.getAnchorElements()).flat()].filter(i=>{var h;return(h=i.getAttribute("href"))==null?void 0:h.startsWith("/")})));t(this,T).forEach(i=>{i.destroy()}),a(this,T,s.map(i=>new ct(this,i)))},D=new WeakMap;exports.Router=lt;