aptechka 0.8.4 → 0.10.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 (143) hide show
  1. package/lib/ElementConstructor-OK-6OPjh.cjs +1 -0
  2. package/lib/ElementConstructor-rValMo8f.js +372 -0
  3. package/lib/_createStore-C75y9luu.cjs +1 -0
  4. package/lib/_createStore-D3qHYaSz.js +12 -0
  5. package/lib/accordion/AccordionElement.d.ts +1 -2
  6. package/lib/accordion/index.cjs +1 -1
  7. package/lib/accordion/index.js +110 -122
  8. package/lib/canvas/index.cjs +1 -1
  9. package/lib/canvas/index.d.ts +4 -5
  10. package/lib/canvas/index.js +69 -75
  11. package/lib/checkbox/index.cjs +1 -1
  12. package/lib/checkbox/index.d.ts +1 -3
  13. package/lib/checkbox/index.js +42 -45
  14. package/lib/connector/index.cjs +1 -1
  15. package/lib/connector/index.d.ts +2 -2
  16. package/lib/connector/index.js +39 -34
  17. package/lib/counter/index.d.ts +1 -3
  18. package/lib/{createStylesheet-BsMSWX0q.cjs → createStylesheet-9nksoWW0.cjs} +1 -1
  19. package/lib/{createStylesheet-BxKITIVV.js → createStylesheet-BrFGJ8Q7.js} +1 -1
  20. package/lib/element-constructor/ElementConstructor.d.ts +6 -5
  21. package/lib/element-constructor/index.cjs +1 -1
  22. package/lib/element-constructor/index.js +114 -113
  23. package/lib/en3/objects/fluid/En3FluidElement.d.ts +1 -2
  24. package/lib/globals-DMjysUXI.js +8 -0
  25. package/lib/globals-bYKki-b9.cjs +1 -0
  26. package/lib/image/index.cjs +1 -1
  27. package/lib/image/index.js +7 -15
  28. package/lib/index-3R8YL-P3.js +266 -0
  29. package/lib/index-CyQAdqFu.cjs +9 -0
  30. package/lib/instantiate-BuVJ8pIJ.cjs +1 -0
  31. package/lib/instantiate-TYteKsII.js +134 -0
  32. package/lib/jsx/ComponentElement.d.ts +18 -0
  33. package/lib/jsx/globals.d.ts +13 -0
  34. package/lib/jsx/h.d.ts +6 -0
  35. package/lib/jsx/hooks/animation/createDamped.d.ts +3 -0
  36. package/lib/jsx/hooks/animation/createTweened.d.ts +3 -0
  37. package/lib/jsx/hooks/animation/index.cjs +1 -0
  38. package/lib/jsx/hooks/animation/index.d.ts +2 -0
  39. package/lib/jsx/hooks/animation/index.js +15 -0
  40. package/lib/jsx/hooks/basic/_createStore.d.ts +4 -0
  41. package/lib/jsx/hooks/basic/attachInternals.d.ts +1 -0
  42. package/lib/jsx/hooks/basic/attachShadow.d.ts +1 -0
  43. package/lib/jsx/hooks/basic/attachStylesheet.d.ts +3 -0
  44. package/lib/jsx/hooks/basic/createContext.d.ts +2 -0
  45. package/lib/jsx/hooks/basic/createRef.d.ts +3 -0
  46. package/lib/jsx/hooks/basic/onConnect.d.ts +3 -0
  47. package/lib/jsx/hooks/basic/onDisconnect.d.ts +3 -0
  48. package/lib/jsx/hooks/basic/onStoreChange.d.ts +3 -0
  49. package/lib/jsx/hooks/onAnimationFrame.cjs +1 -0
  50. package/lib/jsx/hooks/onAnimationFrame.d.ts +6 -0
  51. package/lib/jsx/hooks/onAnimationFrame.js +22 -0
  52. package/lib/jsx/hooks/onElementResize.cjs +1 -0
  53. package/lib/jsx/hooks/onElementResize.d.ts +5 -0
  54. package/lib/jsx/hooks/onElementResize.js +11 -0
  55. package/lib/jsx/hooks/onIntersection.cjs +1 -0
  56. package/lib/jsx/hooks/onIntersection.d.ts +5 -0
  57. package/lib/jsx/hooks/onIntersection.js +11 -0
  58. package/lib/jsx/hooks/onWindowResize.cjs +1 -0
  59. package/lib/jsx/hooks/onWindowResize.d.ts +3 -0
  60. package/lib/jsx/hooks/onWindowResize.js +8 -0
  61. package/lib/jsx/hooks/store/createCached.d.ts +3 -0
  62. package/lib/jsx/hooks/store/createComposed.d.ts +3 -0
  63. package/lib/jsx/hooks/store/createDerived.d.ts +3 -0
  64. package/lib/jsx/hooks/store/createDerivedArray.d.ts +3 -0
  65. package/lib/jsx/hooks/store/createResource.d.ts +3 -0
  66. package/lib/jsx/hooks/store/createStore.d.ts +3 -0
  67. package/lib/jsx/hooks/store/index.cjs +1 -0
  68. package/lib/jsx/hooks/store/index.d.ts +6 -0
  69. package/lib/jsx/hooks/store/index.js +31 -0
  70. package/lib/jsx/hooks/watchAttribute.cjs +1 -0
  71. package/lib/jsx/hooks/watchAttribute.d.ts +6 -0
  72. package/lib/jsx/hooks/watchAttribute.js +17 -0
  73. package/lib/jsx/hooks/watchCSSProperty.cjs +1 -0
  74. package/lib/jsx/hooks/watchCSSProperty.d.ts +7 -0
  75. package/lib/jsx/hooks/watchCSSProperty.js +17 -0
  76. package/lib/jsx/index.cjs +1 -0
  77. package/lib/jsx/index.d.ts +15 -0
  78. package/lib/jsx/index.js +106 -0
  79. package/lib/jsx/instantiate.d.ts +5 -0
  80. package/lib/jsx/register.d.ts +1 -0
  81. package/lib/jsx/render.d.ts +6 -0
  82. package/lib/jsx/type.d.ts +198 -0
  83. package/lib/modal/index.cjs +1 -1
  84. package/lib/modal/index.js +34 -36
  85. package/lib/onConnect-DGP866cj.cjs +1 -0
  86. package/lib/onConnect-y5DrxJ9P.js +7 -0
  87. package/lib/order/index.cjs +1 -1
  88. package/lib/order/index.d.ts +5 -4
  89. package/lib/order/index.js +1 -1
  90. package/lib/pointer/PointerElement.d.ts +1 -2
  91. package/lib/pointer/index.cjs +1 -1
  92. package/lib/pointer/index.js +105 -117
  93. package/lib/popover/PopoverButtonElement.d.ts +1 -2
  94. package/lib/popover/PopoverElement.d.ts +1 -2
  95. package/lib/popover/index.cjs +1 -1
  96. package/lib/popover/index.js +109 -124
  97. package/lib/router/index.cjs +1 -1
  98. package/lib/router/index.js +76 -73
  99. package/lib/scroll/ScrollElement.d.ts +1 -2
  100. package/lib/scroll/ScrollUserElement.d.ts +1 -2
  101. package/lib/scroll/index.cjs +1 -1
  102. package/lib/scroll/index.js +674 -753
  103. package/lib/select/SelectElement.d.ts +1 -3
  104. package/lib/select/SelectUserElement.d.ts +1 -2
  105. package/lib/select/index.cjs +1 -1
  106. package/lib/select/index.js +1 -1
  107. package/lib/sequence/index.cjs +1 -1
  108. package/lib/sequence/index.js +104 -107
  109. package/lib/slicer/SlicerElement.d.ts +1 -2
  110. package/lib/slicer/index.cjs +5 -5
  111. package/lib/slicer/index.js +88 -106
  112. package/lib/source/SourceElement.d.ts +1 -2
  113. package/lib/source/index.cjs +2 -2
  114. package/lib/source/index.js +19 -20
  115. package/lib/store/Cached.d.ts +13 -0
  116. package/lib/store/Derived.d.ts +3 -3
  117. package/lib/store/DerivedArray.d.ts +8 -0
  118. package/lib/store/index.cjs +1 -1
  119. package/lib/store/index.d.ts +2 -0
  120. package/lib/store/index.js +65 -31
  121. package/lib/tags-BosXYPYv.cjs +1 -0
  122. package/lib/tags-D0kLlFdQ.js +485 -0
  123. package/lib/theme/index.cjs +1 -1
  124. package/lib/theme/index.js +2 -1
  125. package/lib/tweaker/TweakerFieldElement.d.ts +1 -2
  126. package/lib/tweaker/TweakerFolderElement.d.ts +1 -2
  127. package/lib/tweaker/TweakerStoreManagerElement.d.ts +1 -2
  128. package/lib/tweaker/index.cjs +3 -3
  129. package/lib/tweaker/index.js +393 -472
  130. package/lib/utils/bytes.d.ts +1 -0
  131. package/lib/utils/index.cjs +1 -1
  132. package/lib/utils/index.d.ts +1 -0
  133. package/lib/utils/index.js +122 -105
  134. package/lib/video/index.cjs +1 -1
  135. package/lib/video/index.js +25 -29
  136. package/package.json +73 -9
  137. package/lib/custom-element/index.cjs +0 -1
  138. package/lib/custom-element/index.d.ts +0 -8
  139. package/lib/custom-element/index.js +0 -30
  140. package/lib/index-CzpP1Tg6.cjs +0 -9
  141. package/lib/index-Dwd_62sm.js +0 -301
  142. package/lib/tags-CAfasCGV.cjs +0 -1
  143. package/lib/tags-D9lNDPX8.js +0 -848
@@ -1,181 +1,166 @@
1
- import { Attribute as x } from "../attribute/index.js";
2
- import { CustomElement as q, define as H } from "../custom-element/index.js";
1
+ var S = (o, n, t) => {
2
+ if (!n.has(o))
3
+ throw TypeError("Cannot " + t);
4
+ };
5
+ var e = (o, n, t) => (S(o, n, "read from private field"), t ? t.call(o) : n.get(o)), i = (o, n, t) => {
6
+ if (n.has(o))
7
+ throw TypeError("Cannot add the same private member more than once");
8
+ n instanceof WeakSet ? n.add(o) : n.set(o, t);
9
+ }, h = (o, n, t, a) => (S(o, n, "write to private field"), a ? a.call(o, t) : n.set(o, t), t);
10
+ var A = (o, n, t) => (S(o, n, "access private method"), t);
11
+ import { Attribute as O } from "../attribute/index.js";
3
12
  import { S as R } from "../Store-Qr3SNOSf.js";
4
13
  import { g as B } from "../style-j2TwriJ_.js";
5
- import { i as G } from "../browser-0zX67oeU.js";
6
- import { e as K } from "../tags-D9lNDPX8.js";
7
- var U = Object.defineProperty, z = Object.getOwnPropertyDescriptor, F = (e, t, s, a) => {
8
- for (var o = a > 1 ? void 0 : a ? z(t, s) : t, c = e.length - 1, v; c >= 0; c--)
9
- (v = e[c]) && (o = (a ? v(t, s, o) : v(o)) || o);
10
- return a && o && U(t, s, o), o;
11
- }, A = (e, t, s) => {
12
- if (!t.has(e))
13
- throw TypeError("Cannot " + s);
14
- }, i = (e, t, s) => (A(e, t, "read from private field"), s ? s.call(e) : t.get(e)), p = (e, t, s) => {
15
- if (t.has(e))
16
- throw TypeError("Cannot add the same private member more than once");
17
- t instanceof WeakSet ? t.add(e) : t.set(e, s);
18
- }, O = (e, t, s, a) => (A(e, t, "write to private field"), t.set(e, s), s), b = (e, t, s) => (A(e, t, "access private method"), s), S, l, E, d, u, g, $, I, _, m, L, y, C, P, w;
19
- let h = class extends q {
14
+ import { i as N } from "../browser-0zX67oeU.js";
15
+ import "../ticker/index.js";
16
+ import { e as D } from "../tags-D0kLlFdQ.js";
17
+ var g, c, y, l, d, u, _, H, v, L, f, E, b, x, m;
18
+ const p = class p extends HTMLElement {
20
19
  constructor() {
21
- super(), p(this, $), p(this, _), p(this, C), p(this, S, -1), p(this, l, new R(!1)), p(this, E, void 0), p(this, d, new x(this, "history", !1)), p(this, u, new x(this, "single", !1)), p(this, g, !1), this.open = (e = !0) => {
22
- if (i(this, l).current)
20
+ super();
21
+ i(this, _);
22
+ i(this, v);
23
+ i(this, b);
24
+ i(this, g, void 0);
25
+ i(this, c, void 0);
26
+ i(this, y, void 0);
27
+ i(this, l, void 0);
28
+ i(this, d, void 0);
29
+ i(this, u, void 0);
30
+ i(this, f, void 0);
31
+ i(this, E, void 0);
32
+ i(this, m, void 0);
33
+ h(this, g, -1), h(this, c, new R(!1)), h(this, l, new O(this, "history", !1)), h(this, d, new O(this, "single", !1)), h(this, u, !1), this.open = (t = !0) => {
34
+ if (e(this, c).current)
23
35
  return;
24
- i(this, l).current = !0, i(this, u).current && (h.__opened.forEach((s) => s.close()), h.__opened = []), h.__opened.push(this), O(this, S, h.__opened.length - 1), i(this, d).current && i(this, g) && history.pushState("", "", i(this, $, I)), clearTimeout(i(this, E)), this.classList.add("triggered"), this.style.display = "block", this.dispatchEvent(new CustomEvent("popoverTriggered"));
25
- const t = () => {
26
- addEventListener("click", i(this, L)), addEventListener("keydown", i(this, y)), this.style.opacity = "1", this.classList.add("opened"), this.dispatchEvent(new CustomEvent("popoverOpened"));
36
+ e(this, c).current = !0, e(this, d).current && (p.__opened.forEach((r) => r.close()), p.__opened = []), p.__opened.push(this), h(this, g, p.__opened.length - 1), e(this, l).current && e(this, u) && history.pushState("", "", e(this, _, H)), clearTimeout(e(this, y)), this.classList.add("triggered"), this.style.display = "block", this.dispatchEvent(new CustomEvent("popoverTriggered"));
37
+ const a = () => {
38
+ addEventListener("click", e(this, f)), addEventListener("keydown", e(this, E)), this.style.opacity = "1", this.classList.add("opened"), this.dispatchEvent(new CustomEvent("popoverOpened"));
27
39
  };
28
- e ? setTimeout(t) : t();
40
+ t ? setTimeout(a) : a();
29
41
  }, this.close = () => {
30
- if (i(this, l).current) {
31
- if (i(this, l).current = !1, h.__opened = h.__opened.filter((e) => e !== this), i(this, d).current) {
32
- const e = new URL(location.href);
33
- e.searchParams.delete(i(this, _, m)), history.replaceState(null, "", e.href);
42
+ if (e(this, c).current) {
43
+ if (e(this, c).current = !1, p.__opened = p.__opened.filter((t) => t !== this), e(this, l).current) {
44
+ const t = new URL(location.href);
45
+ t.searchParams.delete(e(this, v, L)), history.replaceState(null, "", t.href);
34
46
  }
35
- this.classList.remove("opened"), this.style.opacity = "0", this.dispatchEvent(new CustomEvent("popoverClosing")), removeEventListener("click", i(this, L)), removeEventListener("keydown", i(this, y)), setTimeout(() => {
47
+ this.classList.remove("opened"), this.style.opacity = "0", this.dispatchEvent(new CustomEvent("popoverClosing")), removeEventListener("click", e(this, f)), removeEventListener("keydown", e(this, E)), setTimeout(() => {
36
48
  this.classList.remove("triggered"), this.style.display = "none", this.dispatchEvent(new CustomEvent("popoverClosed"));
37
49
  }, B(this) + 10);
38
50
  }
39
- }, p(this, L, (e) => {
40
- b(this, C, P).call(this, () => {
41
- var c;
42
- const s = e.composedPath()[0], a = s instanceof HTMLElement && (this.contains(s) || ((c = this.shadowRoot) == null ? void 0 : c.contains(s))), o = s instanceof HTMLElement && s.hasAttribute("outside");
43
- (!a || o) && this.close();
51
+ }, h(this, f, (t) => {
52
+ A(this, b, x).call(this, () => {
53
+ var M;
54
+ const r = t.composedPath()[0], q = r instanceof HTMLElement && (this.contains(r) || ((M = this.shadowRoot) == null ? void 0 : M.contains(r))), I = r instanceof HTMLElement && r.hasAttribute("outside");
55
+ (!q || I) && this.close();
44
56
  });
45
- }), p(this, y, (e) => {
46
- b(this, C, P).call(this, () => {
47
- e.code === "Escape" && this.close();
57
+ }), h(this, E, (t) => {
58
+ A(this, b, x).call(this, () => {
59
+ t.code === "Escape" && this.close();
48
60
  });
49
- }), p(this, w, () => {
50
- O(this, g, !1), i(this, l).current && i(this, d).current && !location.search.includes(i(this, _, m)) ? this.close() : !i(this, l).current && i(this, d).current && location.search.includes(i(this, _, m)) && this.open(), O(this, g, !0);
61
+ }), h(this, m, () => {
62
+ h(this, u, !1), e(this, c).current && e(this, l).current && !location.search.includes(e(this, v, L)) ? this.close() : !e(this, c).current && e(this, l).current && location.search.includes(e(this, v, L)) && this.open(), h(this, u, !0);
51
63
  }), this.setAttribute("popover-target", "");
52
64
  }
53
65
  get history() {
54
- return i(this, d);
66
+ return e(this, l);
55
67
  }
56
68
  get single() {
57
- return i(this, u);
69
+ return e(this, d);
58
70
  }
59
71
  get opened() {
60
- return i(this, l);
72
+ return e(this, c);
61
73
  }
62
74
  connectedCallback() {
63
- i(this, d).observe(), i(this, u).observe(), this.style.opacity = "0", this.style.display = "none", addEventListener("popstate", i(this, w)), setTimeout(() => {
64
- i(this, w).call(this);
75
+ e(this, l).observe(), e(this, d).observe(), this.style.opacity = "0", this.style.display = "none", addEventListener("popstate", e(this, m)), setTimeout(() => {
76
+ e(this, m).call(this);
65
77
  }, 0);
66
78
  }
67
79
  disconnectedCallback() {
68
- i(this, d).unobserve(), i(this, u).unobserve(), h.__opened = h.__opened.filter((e) => e !== this), clearTimeout(i(this, E)), removeEventListener("popstate", i(this, w));
80
+ e(this, l).unobserve(), e(this, d).unobserve(), p.__opened = p.__opened.filter((t) => t !== this), clearTimeout(e(this, y)), removeEventListener("popstate", e(this, m));
69
81
  }
70
82
  };
71
- S = /* @__PURE__ */ new WeakMap();
72
- l = /* @__PURE__ */ new WeakMap();
73
- E = /* @__PURE__ */ new WeakMap();
74
- d = /* @__PURE__ */ new WeakMap();
75
- u = /* @__PURE__ */ new WeakMap();
76
- g = /* @__PURE__ */ new WeakMap();
77
- $ = /* @__PURE__ */ new WeakSet();
78
- I = function() {
79
- return `${location.pathname}${location.search ? location.search + "&" : "?"}${i(this, _, m)}`;
80
- };
81
- _ = /* @__PURE__ */ new WeakSet();
82
- m = function() {
83
+ g = new WeakMap(), c = new WeakMap(), y = new WeakMap(), l = new WeakMap(), d = new WeakMap(), u = new WeakMap(), _ = new WeakSet(), H = function() {
84
+ return `${location.pathname}${location.search ? location.search + "&" : "?"}${e(this, v, L)}`;
85
+ }, v = new WeakSet(), L = function() {
83
86
  return `modal-${this.id}`;
84
- };
85
- L = /* @__PURE__ */ new WeakMap();
86
- y = /* @__PURE__ */ new WeakMap();
87
- C = /* @__PURE__ */ new WeakSet();
88
- P = function(e) {
89
- (h.__opened[i(this, S) - 1] || h.__opened.length === 1) && e();
90
- };
91
- w = /* @__PURE__ */ new WeakMap();
92
- h.__opened = [];
93
- h = F([
94
- H("e-popover")
95
- ], h);
96
- var J = Object.defineProperty, Q = Object.getOwnPropertyDescriptor, V = (e, t, s, a) => {
97
- for (var o = a > 1 ? void 0 : a ? Q(t, s) : t, c = e.length - 1, v; c >= 0; c--)
98
- (v = e[c]) && (o = (a ? v(t, s, o) : v(o)) || o);
99
- return a && o && J(t, s, o), o;
100
- }, N = (e, t, s) => {
101
- if (!t.has(e))
102
- throw TypeError("Cannot " + s);
103
- }, r = (e, t, s) => (N(e, t, "read from private field"), s ? s.call(e) : t.get(e)), f = (e, t, s) => {
104
- if (t.has(e))
105
- throw TypeError("Cannot add the same private member more than once");
106
- t instanceof WeakSet ? t.add(e) : t.set(e, s);
107
- }, X = (e, t, s, a) => (N(e, t, "write to private field"), t.set(e, s), s), n, k, T, M, W;
108
- let D = class extends q {
87
+ }, f = new WeakMap(), E = new WeakMap(), b = new WeakSet(), x = function(t) {
88
+ (p.__opened[e(this, g) - 1] || p.__opened.length === 1) && t();
89
+ }, m = new WeakMap(), p.__opened = [];
90
+ let $ = p;
91
+ customElements.get("e-popover") || customElements.define("e-popover", $);
92
+ var s, T, w, C, k;
93
+ class K extends HTMLElement {
109
94
  constructor() {
110
- super(), f(this, n, void 0), f(this, k, () => {
95
+ super();
96
+ i(this, s, void 0);
97
+ i(this, T, () => {
111
98
  this.classList.add("triggered");
112
- }), f(this, T, () => {
99
+ });
100
+ i(this, w, () => {
113
101
  this.classList.add("opened");
114
- }), f(this, M, () => {
102
+ });
103
+ i(this, C, () => {
115
104
  this.classList.remove("opened");
116
- }), f(this, W, () => {
105
+ });
106
+ i(this, k, () => {
117
107
  this.classList.remove("triggered");
118
- }), G && K(this, {
108
+ });
109
+ N && D(this, {
119
110
  tabindex: this.getAttribute("tabindex") || "0",
120
111
  onClick: () => {
121
- if (r(this, n)) {
122
- const e = this.getAttribute("type") || "open";
123
- e === "open" || e === "toggle" && !r(this, n).opened.current ? r(this, n).open() : (e === "close" || e === "toggle" && r(this, n).opened.current) && r(this, n).close();
112
+ if (e(this, s)) {
113
+ const t = this.getAttribute("type") || "open";
114
+ t === "open" || t === "toggle" && !e(this, s).opened.current ? e(this, s).open() : (t === "close" || t === "toggle" && e(this, s).opened.current) && e(this, s).close();
124
115
  }
125
116
  },
126
- onKeydown: (e) => {
127
- e.code === "Space" && e.currentTarget.click();
117
+ onKeydown: (t) => {
118
+ t.code === "Space" && t.currentTarget.click();
128
119
  }
129
120
  });
130
121
  }
131
122
  get popoverElement() {
132
- return r(this, n);
123
+ return e(this, s);
133
124
  }
134
125
  connectedCallback() {
135
- var t;
136
- const e = this.getAttribute("target");
137
- if (e) {
138
- let s = null;
139
- e === "parent" ? s = this.closest("[popover-target]") : e === "sibling" ? s = (t = this.parentElement) == null ? void 0 : t.querySelector("[popover-target]") : s = document.querySelector(`#${e}`) || this.getRootNode().querySelector(`#${e}`), s instanceof HTMLElement ? (X(this, n, s), r(this, n).addEventListener(
126
+ var a;
127
+ const t = this.getAttribute("target");
128
+ if (t) {
129
+ let r = null;
130
+ t === "parent" ? r = this.closest("[popover-target]") : t === "sibling" ? r = (a = this.parentElement) == null ? void 0 : a.querySelector("[popover-target]") : r = document.querySelector(`#${t}`) || this.getRootNode().querySelector(`#${t}`), r instanceof HTMLElement ? (h(this, s, r), e(this, s).addEventListener(
140
131
  "popoverTriggered",
141
- r(this, k)
142
- ), r(this, n).addEventListener(
132
+ e(this, T)
133
+ ), e(this, s).addEventListener(
143
134
  "popoverOpened",
144
- r(this, T)
145
- ), r(this, n).addEventListener(
135
+ e(this, w)
136
+ ), e(this, s).addEventListener(
146
137
  "popoverClosing",
147
- r(this, M)
148
- ), r(this, n).addEventListener(
138
+ e(this, C)
139
+ ), e(this, s).addEventListener(
149
140
  "popoverClosed",
150
- r(this, W)
151
- )) : console.warn(this, `target ${e} not found`);
141
+ e(this, k)
142
+ )) : console.warn(this, `target ${t} not found`);
152
143
  }
153
144
  }
154
145
  disconnectedCallback() {
155
- r(this, n) && (r(this, n).removeEventListener(
146
+ e(this, s) && (e(this, s).removeEventListener(
156
147
  "popoverTriggered",
157
- r(this, k)
158
- ), r(this, n).removeEventListener(
148
+ e(this, T)
149
+ ), e(this, s).removeEventListener(
159
150
  "popoverOpened",
160
- r(this, T)
161
- ), r(this, n).removeEventListener(
151
+ e(this, w)
152
+ ), e(this, s).removeEventListener(
162
153
  "popoverClosing",
163
- r(this, M)
164
- ), r(this, n).removeEventListener(
154
+ e(this, C)
155
+ ), e(this, s).removeEventListener(
165
156
  "popoverClosed",
166
- r(this, W)
157
+ e(this, k)
167
158
  ));
168
159
  }
169
- };
170
- n = /* @__PURE__ */ new WeakMap();
171
- k = /* @__PURE__ */ new WeakMap();
172
- T = /* @__PURE__ */ new WeakMap();
173
- M = /* @__PURE__ */ new WeakMap();
174
- W = /* @__PURE__ */ new WeakMap();
175
- D = V([
176
- H("e-popover-button")
177
- ], D);
160
+ }
161
+ s = new WeakMap(), T = new WeakMap(), w = new WeakMap(), C = new WeakMap(), k = new WeakMap();
162
+ customElements.get("e-popover-button") || customElements.define("e-popover-button", K);
178
163
  export {
179
- D as PopoverButtonElement,
180
- h as PopoverElement
164
+ K as PopoverButtonElement,
165
+ $ as PopoverElement
181
166
  };
@@ -1 +1 @@
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;
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-BuVJ8pIJ.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;