aptechka 0.11.11 → 0.12.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.
- package/client-lib/canvas/index.cjs +1 -1
- package/client-lib/canvas/index.js +2 -2
- package/client-lib/checkbox/index.cjs +1 -1
- package/client-lib/checkbox/index.js +4 -4
- package/client-lib/{createStylesheet-BBBiyAsF.cjs → createStylesheet-BqjaCUhm.cjs} +1 -1
- package/client-lib/{createStylesheet-CE1yXWS_.js → createStylesheet-DNG2b5X4.js} +1 -1
- package/client-lib/element-constructor/index.cjs +1 -1
- package/client-lib/element-constructor/index.js +113 -114
- package/client-lib/{index-D-RA8KFB.js → index-BuvwT3dS.js} +2 -2
- package/client-lib/{index-PReYu1AQ.cjs → index-Ctct2GyP.cjs} +1 -1
- package/client-lib/modal/index.cjs +1 -1
- package/client-lib/modal/index.js +2 -2
- package/client-lib/popover/index.cjs +1 -1
- package/client-lib/popover/index.js +1 -1
- package/client-lib/router/index.cjs +1 -1
- package/client-lib/router/index.js +73 -76
- package/client-lib/scroll/index.cjs +1 -1
- package/client-lib/scroll/index.js +2 -2
- package/client-lib/select/index.cjs +1 -1
- package/client-lib/select/index.js +1 -1
- package/client-lib/tags-B0do5eeb.cjs +1 -0
- package/client-lib/tags-wG5k157g.js +860 -0
- package/client-lib/theme/index.cjs +1 -1
- package/client-lib/theme/index.js +1 -1
- package/client-lib/tweaker/index.cjs +1 -1
- package/client-lib/tweaker/index.js +43 -43
- package/package.json +1 -73
- package/client-lib/ElementConstructor-Be8H1POO.js +0 -378
- package/client-lib/ElementConstructor-khLPmQ9V.cjs +0 -1
- package/client-lib/_createStore-C75y9luu.cjs +0 -1
- package/client-lib/_createStore-D3qHYaSz.js +0 -12
- package/client-lib/globals-DMjysUXI.js +0 -8
- package/client-lib/globals-bYKki-b9.cjs +0 -1
- package/client-lib/instantiate-CfK7LHHy.js +0 -152
- package/client-lib/instantiate-DfsD19EH.cjs +0 -1
- package/client-lib/jsx/ComponentElement.d.ts +0 -17
- package/client-lib/jsx/globals.d.ts +0 -13
- package/client-lib/jsx/h.d.ts +0 -6
- package/client-lib/jsx/hooks/animation/createDamped.d.ts +0 -3
- package/client-lib/jsx/hooks/animation/createTweened.d.ts +0 -3
- package/client-lib/jsx/hooks/animation/index.cjs +0 -1
- package/client-lib/jsx/hooks/animation/index.d.ts +0 -2
- package/client-lib/jsx/hooks/animation/index.js +0 -15
- package/client-lib/jsx/hooks/basic/_createStore.d.ts +0 -4
- package/client-lib/jsx/hooks/basic/attachInternals.d.ts +0 -1
- package/client-lib/jsx/hooks/basic/attachShadow.d.ts +0 -1
- package/client-lib/jsx/hooks/basic/attachStylesheet.d.ts +0 -3
- package/client-lib/jsx/hooks/basic/createContext.d.ts +0 -2
- package/client-lib/jsx/hooks/basic/createRef.d.ts +0 -3
- package/client-lib/jsx/hooks/basic/onConnect.d.ts +0 -3
- package/client-lib/jsx/hooks/basic/onDisconnect.d.ts +0 -3
- package/client-lib/jsx/hooks/basic/onStoreChange.d.ts +0 -3
- package/client-lib/jsx/hooks/onAnimationFrame.cjs +0 -1
- package/client-lib/jsx/hooks/onAnimationFrame.d.ts +0 -6
- package/client-lib/jsx/hooks/onAnimationFrame.js +0 -22
- package/client-lib/jsx/hooks/onElementResize.cjs +0 -1
- package/client-lib/jsx/hooks/onElementResize.d.ts +0 -5
- package/client-lib/jsx/hooks/onElementResize.js +0 -11
- package/client-lib/jsx/hooks/onIntersection.cjs +0 -1
- package/client-lib/jsx/hooks/onIntersection.d.ts +0 -5
- package/client-lib/jsx/hooks/onIntersection.js +0 -11
- package/client-lib/jsx/hooks/onWindowResize.cjs +0 -1
- package/client-lib/jsx/hooks/onWindowResize.d.ts +0 -3
- package/client-lib/jsx/hooks/onWindowResize.js +0 -8
- package/client-lib/jsx/hooks/store/createCached.d.ts +0 -4
- package/client-lib/jsx/hooks/store/createComposed.d.ts +0 -3
- package/client-lib/jsx/hooks/store/createDerived.d.ts +0 -4
- package/client-lib/jsx/hooks/store/createDerivedArray.d.ts +0 -4
- package/client-lib/jsx/hooks/store/createResource.d.ts +0 -3
- package/client-lib/jsx/hooks/store/createStore.d.ts +0 -3
- package/client-lib/jsx/hooks/store/index.cjs +0 -1
- package/client-lib/jsx/hooks/store/index.d.ts +0 -6
- package/client-lib/jsx/hooks/store/index.js +0 -45
- package/client-lib/jsx/hooks/watchAttribute.cjs +0 -1
- package/client-lib/jsx/hooks/watchAttribute.d.ts +0 -6
- package/client-lib/jsx/hooks/watchAttribute.js +0 -17
- package/client-lib/jsx/hooks/watchCSSProperty.cjs +0 -1
- package/client-lib/jsx/hooks/watchCSSProperty.d.ts +0 -7
- package/client-lib/jsx/hooks/watchCSSProperty.js +0 -17
- package/client-lib/jsx/index.cjs +0 -1
- package/client-lib/jsx/index.d.ts +0 -15
- package/client-lib/jsx/index.js +0 -106
- package/client-lib/jsx/instantiate.d.ts +0 -5
- package/client-lib/jsx/register.d.ts +0 -1
- package/client-lib/jsx/render.d.ts +0 -6
- package/client-lib/jsx/type.d.ts +0 -195
- package/client-lib/onConnect-DGP866cj.cjs +0 -1
- package/client-lib/onConnect-y5DrxJ9P.js +0 -7
- package/client-lib/tags-BdW7ATzD.cjs +0 -1
- package/client-lib/tags-C75owfOo.js +0 -485
|
@@ -1,53 +1,52 @@
|
|
|
1
|
-
var X = (
|
|
2
|
-
var W = (
|
|
3
|
-
if (!e.has(
|
|
1
|
+
var X = (a, e) => (e = Symbol[a]) ? e : Symbol.for("Symbol." + a);
|
|
2
|
+
var W = (a, e, s) => {
|
|
3
|
+
if (!e.has(a))
|
|
4
4
|
throw TypeError("Cannot " + s);
|
|
5
5
|
};
|
|
6
|
-
var t = (
|
|
7
|
-
if (e.has(
|
|
6
|
+
var t = (a, e, s) => (W(a, e, "read from private field"), s ? s.call(a) : e.get(a)), h = (a, e, s) => {
|
|
7
|
+
if (e.has(a))
|
|
8
8
|
throw TypeError("Cannot add the same private member more than once");
|
|
9
|
-
e instanceof WeakSet ? e.add(
|
|
10
|
-
},
|
|
11
|
-
var Y = (
|
|
12
|
-
var I = (
|
|
13
|
-
var o = (
|
|
9
|
+
e instanceof WeakSet ? e.add(a) : e.set(a, s);
|
|
10
|
+
}, n = (a, e, s, i) => (W(a, e, "write to private field"), i ? i.call(a, s) : e.set(a, s), s);
|
|
11
|
+
var Y = (a, e, s) => (W(a, e, "access private method"), s);
|
|
12
|
+
var I = (a, e, s) => new Promise((i, r) => {
|
|
13
|
+
var o = (m) => {
|
|
14
14
|
try {
|
|
15
|
-
f(s.next(
|
|
15
|
+
f(s.next(m));
|
|
16
16
|
} catch (w) {
|
|
17
17
|
r(w);
|
|
18
18
|
}
|
|
19
|
-
}, c = (
|
|
19
|
+
}, c = (m) => {
|
|
20
20
|
try {
|
|
21
|
-
f(s.throw(
|
|
21
|
+
f(s.throw(m));
|
|
22
22
|
} catch (w) {
|
|
23
23
|
r(w);
|
|
24
24
|
}
|
|
25
|
-
}, f = (
|
|
26
|
-
f((s = s.apply(
|
|
25
|
+
}, f = (m) => m.done ? i(m.value) : Promise.resolve(m.value).then(o, c);
|
|
26
|
+
f((s = s.apply(a, e)).next());
|
|
27
27
|
});
|
|
28
|
-
var $ = (
|
|
29
|
-
import { URLPattern as
|
|
30
|
-
import { Notifier as
|
|
31
|
-
import { i as
|
|
32
|
-
import { d as
|
|
33
|
-
import { n as
|
|
34
|
-
import { i as
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
class ut {
|
|
28
|
+
var $ = (a, e, s) => (e = a[X("asyncIterator")]) ? e.call(a) : (a = a[X("iterator")](), e = {}, s = (i, r) => (r = a[i]) && (e[i] = (o) => new Promise((c, f, m) => (o = r.call(a, o), m = o.done, Promise.resolve(o.value).then((w) => c({ value: w, done: m }), f)))), s("next"), s("return"), e);
|
|
29
|
+
import { URLPattern as it } from "urlpattern-polyfill";
|
|
30
|
+
import { Notifier as at } from "../notifier/index.js";
|
|
31
|
+
import { i as Z } from "../browser-0zX67oeU.js";
|
|
32
|
+
import { d as nt } from "../function-C10DGppn.js";
|
|
33
|
+
import { n as ht, c as rt, s as ot } from "../url-DMNfW7uN.js";
|
|
34
|
+
import { i as ct } from "../object-D6MVWB4l.js";
|
|
35
|
+
var y, U, A, p, d, L, k, v, E, R, M, _;
|
|
36
|
+
class lt {
|
|
38
37
|
constructor(e, s) {
|
|
39
38
|
h(this, M);
|
|
40
39
|
h(this, y, void 0);
|
|
41
40
|
h(this, U, void 0);
|
|
42
41
|
h(this, A, void 0);
|
|
43
42
|
h(this, p, void 0);
|
|
44
|
-
h(this,
|
|
43
|
+
h(this, d, void 0);
|
|
45
44
|
h(this, L, void 0);
|
|
46
45
|
h(this, k, void 0);
|
|
47
46
|
h(this, v, null);
|
|
48
47
|
h(this, E, []);
|
|
49
48
|
h(this, R, []);
|
|
50
|
-
|
|
49
|
+
n(this, y, e), n(this, U, s), n(this, A, new URLPattern({ pathname: t(this, y) })), n(this, p, null), n(this, d, null), n(this, L, !1), n(this, k, null), Z && n(this, v, new MutationObserver((i) => {
|
|
51
50
|
i[0].addedNodes.forEach((o) => {
|
|
52
51
|
t(this, p) ? t(this, R).push(o) : t(this, E).push(o);
|
|
53
52
|
});
|
|
@@ -63,7 +62,7 @@ class ut {
|
|
|
63
62
|
return t(this, L);
|
|
64
63
|
}
|
|
65
64
|
get element() {
|
|
66
|
-
return t(this,
|
|
65
|
+
return t(this, d);
|
|
67
66
|
}
|
|
68
67
|
get nest() {
|
|
69
68
|
return t(this, k);
|
|
@@ -83,39 +82,37 @@ class ut {
|
|
|
83
82
|
});
|
|
84
83
|
else {
|
|
85
84
|
const o = yield t(this, U).call(this);
|
|
86
|
-
if (
|
|
85
|
+
if (n(this, R, [...t(this, E)]), typeof o.default == "function" && (n(this, p, o.default), ct(o.default))) {
|
|
87
86
|
const c = "e-" + ((i = t(this, p)) == null ? void 0 : i.name.toLowerCase());
|
|
88
87
|
customElements.get(c) || customElements.define(c, o.default);
|
|
89
88
|
}
|
|
90
89
|
}
|
|
91
|
-
if (yield Y(this, M,
|
|
90
|
+
if (yield Y(this, M, _).call(this), t(this, p)) {
|
|
92
91
|
const o = t(this, A).exec({ pathname: s }), c = (o == null ? void 0 : o.pathname.groups) || {}, f = Object.fromEntries(
|
|
93
92
|
new URLSearchParams(location.search)
|
|
94
|
-
),
|
|
93
|
+
), m = {
|
|
95
94
|
pathnameParams: c,
|
|
96
95
|
searchParams: f
|
|
97
96
|
};
|
|
98
|
-
|
|
99
|
-
attributes: u
|
|
100
|
-
})), e.appendChild(t(this, m)), a(this, k, t(this, m).querySelector("[data-nest]") || ((r = t(this, m).shadowRoot) == null ? void 0 : r.querySelector("[data-nest]")) || t(this, m).shadowRoot || t(this, m)), a(this, L, !0);
|
|
97
|
+
n(this, d, new (t(this, p))(m)), e.appendChild(t(this, d)), n(this, k, t(this, d).querySelector("[data-nest]") || ((r = t(this, d).shadowRoot) == null ? void 0 : r.querySelector("[data-nest]")) || t(this, d).shadowRoot || t(this, d)), n(this, L, !0);
|
|
101
98
|
}
|
|
102
99
|
t(this, v).disconnect();
|
|
103
100
|
});
|
|
104
101
|
}
|
|
105
102
|
close() {
|
|
106
103
|
var e;
|
|
107
|
-
t(this, v).disconnect(), (e = t(this,
|
|
104
|
+
t(this, v).disconnect(), (e = t(this, d)) == null || e.remove(), n(this, L, !1), t(this, R).forEach((s) => document.head.removeChild(s)), n(this, R, []);
|
|
108
105
|
}
|
|
109
106
|
getAnchorElements() {
|
|
110
107
|
var s;
|
|
111
108
|
let e = [];
|
|
112
|
-
return t(this,
|
|
109
|
+
return t(this, d) && (e = [...t(this, d).querySelectorAll("a")]), (s = t(this, d)) != null && s.shadowRoot && (e = [
|
|
113
110
|
...e,
|
|
114
|
-
...t(this,
|
|
111
|
+
...t(this, d).shadowRoot.querySelectorAll("a")
|
|
115
112
|
]), e;
|
|
116
113
|
}
|
|
117
114
|
}
|
|
118
|
-
y = new WeakMap(), U = new WeakMap(), A = new WeakMap(), p = new WeakMap(),
|
|
115
|
+
y = new WeakMap(), U = new WeakMap(), A = new WeakMap(), p = new WeakMap(), d = new WeakMap(), L = new WeakMap(), k = new WeakMap(), v = new WeakMap(), E = new WeakMap(), R = new WeakMap(), M = new WeakSet(), _ = function() {
|
|
119
116
|
return I(this, null, function* () {
|
|
120
117
|
const e = t(this, E).filter((c) => c instanceof HTMLElement ? c.tagName === "STYLE" || c.tagName === "SCRIPT" || c.tagName === "LINK" : !1);
|
|
121
118
|
try {
|
|
@@ -139,35 +136,35 @@ y = new WeakMap(), U = new WeakMap(), A = new WeakMap(), p = new WeakMap(), m =
|
|
|
139
136
|
}
|
|
140
137
|
});
|
|
141
138
|
};
|
|
142
|
-
var S,
|
|
143
|
-
class
|
|
139
|
+
var S, u, P, O, N, x;
|
|
140
|
+
class ut {
|
|
144
141
|
constructor(e, s) {
|
|
145
142
|
h(this, S, void 0);
|
|
146
|
-
h(this,
|
|
143
|
+
h(this, u, void 0);
|
|
147
144
|
h(this, P, void 0);
|
|
148
145
|
h(this, O, void 0);
|
|
149
146
|
h(this, N, void 0);
|
|
150
147
|
h(this, x, (e) => {
|
|
151
148
|
e.preventDefault(), t(this, S).links.forEach((s) => {
|
|
152
149
|
var i;
|
|
153
|
-
t(this, P) === t(s, P) || (i = t(s, N)) != null && i.includes(t(this, P)) ? t(s,
|
|
150
|
+
t(this, P) === t(s, P) || (i = t(s, N)) != null && i.includes(t(this, P)) ? t(s, u).classList.add("clicked") : t(s, u).classList.remove("clicked");
|
|
154
151
|
}), t(this, S).navigate(t(this, P), t(this, O));
|
|
155
152
|
});
|
|
156
153
|
var o, c;
|
|
157
|
-
|
|
154
|
+
n(this, S, e), n(this, u, s), n(this, P, t(this, u).getAttribute("href") || "/"), n(this, O, t(this, u).getAttribute(
|
|
158
155
|
"data-history-action"
|
|
159
|
-
) || "push"), t(this,
|
|
156
|
+
) || "push"), t(this, u).addEventListener("click", t(this, x));
|
|
160
157
|
const i = e.normalizePath(t(this, P)), r = e.normalizePath(location.pathname);
|
|
161
|
-
|
|
158
|
+
n(this, N, (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") ? r.pathname.includes(i.pathname) && t(this, u).classList.add("current") : i.pathname === r.pathname || (c = t(this, N)) != null && c.includes(r.pathname) ? (t(this, u).classList.add("current"), t(this, u).classList.add("clicked")) : t(this, u).classList.remove("clicked");
|
|
162
159
|
}
|
|
163
160
|
destroy() {
|
|
164
|
-
t(this,
|
|
161
|
+
t(this, u).removeEventListener("click", t(this, x)), t(this, u).classList.remove("current");
|
|
165
162
|
}
|
|
166
163
|
}
|
|
167
|
-
S = new WeakMap(),
|
|
168
|
-
globalThis.URLPattern =
|
|
169
|
-
var C, z, g, q, H, b, T, B, j, D,
|
|
170
|
-
class
|
|
164
|
+
S = new WeakMap(), u = new WeakMap(), P = new WeakMap(), O = new WeakMap(), N = new WeakMap(), x = new WeakMap();
|
|
165
|
+
globalThis.URLPattern = it;
|
|
166
|
+
var C, z, g, q, H, b, T, B, j, D, tt, K;
|
|
167
|
+
class Lt {
|
|
171
168
|
constructor(e) {
|
|
172
169
|
h(this, D);
|
|
173
170
|
h(this, C, null);
|
|
@@ -177,15 +174,15 @@ class Et {
|
|
|
177
174
|
h(this, H, []);
|
|
178
175
|
h(this, b, void 0);
|
|
179
176
|
h(this, T, null);
|
|
180
|
-
h(this, B, new
|
|
181
|
-
h(this, j,
|
|
177
|
+
h(this, B, new at());
|
|
178
|
+
h(this, j, nt(() => {
|
|
182
179
|
const e = (s) => s.split("/").length;
|
|
183
|
-
|
|
180
|
+
n(this, g, t(this, g).sort((s, i) => e(s.pattern) - e(i.pattern))), this.navigate(location.pathname);
|
|
184
181
|
}, 0));
|
|
185
182
|
h(this, K, (e) => {
|
|
186
183
|
e.state && this.navigate(e.state, "none");
|
|
187
184
|
});
|
|
188
|
-
|
|
185
|
+
Z && (e != null && e.base ? n(this, z, ht(e.base)) : n(this, z, "/"), n(this, C, (e == null ? void 0 : e.rootElement) || document.body), addEventListener("popstate", t(this, K)));
|
|
189
186
|
}
|
|
190
187
|
get currentPathname() {
|
|
191
188
|
return t(this, T);
|
|
@@ -203,7 +200,7 @@ class Et {
|
|
|
203
200
|
return t(this, B).subscribe(e);
|
|
204
201
|
}
|
|
205
202
|
defineRoute(e, s) {
|
|
206
|
-
const i = new
|
|
203
|
+
const i = new lt(e, s);
|
|
207
204
|
t(this, g).push(i), t(this, j).call(this);
|
|
208
205
|
}
|
|
209
206
|
navigate(e, s = "push") {
|
|
@@ -213,48 +210,48 @@ class Et {
|
|
|
213
210
|
let { pathname: r, hash: o, parameters: c, leaf: f } = i;
|
|
214
211
|
if (t(this, b) === r || t(this, T) === r)
|
|
215
212
|
return;
|
|
216
|
-
|
|
217
|
-
const
|
|
218
|
-
(l) => !
|
|
219
|
-
),
|
|
213
|
+
n(this, b, r);
|
|
214
|
+
const m = t(this, g).filter((l) => l.isActive), w = t(this, g).filter(
|
|
215
|
+
(l) => !m.includes(l) && l.testPathname(f)
|
|
216
|
+
), et = m.filter((l) => !l.testPathname(f)), F = m.filter((l) => l.testPathname(f));
|
|
220
217
|
let G = !0;
|
|
221
218
|
if (this.preprocessor)
|
|
222
219
|
try {
|
|
223
|
-
yield new Promise((l,
|
|
220
|
+
yield new Promise((l, st) => {
|
|
224
221
|
var V;
|
|
225
|
-
(V = this.preprocessor) == null || V.call(this, { path: i, resolve: l, reject:
|
|
222
|
+
(V = this.preprocessor) == null || V.call(this, { path: i, resolve: l, reject: st });
|
|
226
223
|
});
|
|
227
224
|
} catch (l) {
|
|
228
225
|
l ? console.error(l) : console.log("Route change canceled"), G = !1;
|
|
229
226
|
}
|
|
230
227
|
if (G && t(this, b) === r) {
|
|
231
|
-
|
|
228
|
+
n(this, q, F[F.length - 1]), et.forEach((l) => {
|
|
232
229
|
l.close();
|
|
233
|
-
}),
|
|
230
|
+
}), n(this, T, r), rt(s, r, c, o);
|
|
234
231
|
try {
|
|
235
|
-
for (var
|
|
236
|
-
const l =
|
|
237
|
-
yield l.render(((J = t(this, q)) == null ? void 0 : J.nest) || t(this, C), r),
|
|
232
|
+
for (var Rt = $(w), bt, yt, At; bt = !(yt = yield Rt.next()).done; bt = !1) {
|
|
233
|
+
const l = yt.value;
|
|
234
|
+
yield l.render(((J = t(this, q)) == null ? void 0 : J.nest) || t(this, C), r), n(this, q, l);
|
|
238
235
|
}
|
|
239
|
-
} catch (
|
|
240
|
-
|
|
236
|
+
} catch (yt) {
|
|
237
|
+
At = [yt];
|
|
241
238
|
} finally {
|
|
242
239
|
try {
|
|
243
|
-
|
|
240
|
+
bt && (yt = Rt.return) && (yield yt.call(Rt));
|
|
244
241
|
} finally {
|
|
245
|
-
if (
|
|
246
|
-
throw
|
|
242
|
+
if (At)
|
|
243
|
+
throw At[0];
|
|
247
244
|
}
|
|
248
245
|
}
|
|
249
|
-
Y(this, D,
|
|
246
|
+
Y(this, D, tt).call(this), (Q = this.postprocessor) == null || Q.call(this, { pathname: r }), t(this, B).notify({ pathname: r });
|
|
250
247
|
}
|
|
251
248
|
});
|
|
252
249
|
}
|
|
253
250
|
normalizePath(e) {
|
|
254
|
-
return
|
|
251
|
+
return ot(e, t(this, z));
|
|
255
252
|
}
|
|
256
253
|
}
|
|
257
|
-
C = new WeakMap(), z = new WeakMap(), g = new WeakMap(), q = new WeakMap(), H = new WeakMap(), b = new WeakMap(), T = new WeakMap(), B = new WeakMap(), j = new WeakMap(), D = new WeakSet(),
|
|
254
|
+
C = new WeakMap(), z = new WeakMap(), g = new WeakMap(), q = new WeakMap(), H = new WeakMap(), b = new WeakMap(), T = new WeakMap(), B = new WeakMap(), j = new WeakMap(), D = new WeakSet(), tt = function() {
|
|
258
255
|
const e = t(this, g).filter((i) => i.isActive), s = Array.from(
|
|
259
256
|
new Set(
|
|
260
257
|
[
|
|
@@ -268,8 +265,8 @@ C = new WeakMap(), z = new WeakMap(), g = new WeakMap(), q = new WeakMap(), H =
|
|
|
268
265
|
);
|
|
269
266
|
t(this, H).forEach((i) => {
|
|
270
267
|
i.destroy();
|
|
271
|
-
}),
|
|
268
|
+
}), n(this, H, s.map((i) => new ut(this, i)));
|
|
272
269
|
}, K = new WeakMap();
|
|
273
270
|
export {
|
|
274
|
-
|
|
271
|
+
Lt as Router
|
|
275
272
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var Is=Object.defineProperty;var Ss=Object.getOwnPropertySymbols;var Ts=Object.prototype.hasOwnProperty,Ms=Object.prototype.propertyIsEnumerable;var ds=(S,n,s)=>n in S?Is(S,n,{enumerable:!0,configurable:!0,writable:!0,value:s}):S[n]=s,ps=(S,n)=>{for(var s in n||(n={}))Ts.call(n,s)&&ds(S,s,n[s]);if(Ss)for(var s of Ss(n))Ms.call(n,s)&&ds(S,s,n[s]);return S};var es=(S,n,s)=>{if(!n.has(S))throw TypeError("Cannot "+s)};var t=(S,n,s)=>(es(S,n,"read from private field"),s?s.call(S):n.get(S)),i=(S,n,s)=>{if(n.has(S))throw TypeError("Cannot add the same private member more than once");n instanceof WeakSet?n.add(S):n.set(S,s)},r=(S,n,s,e)=>(es(S,n,"write to private field"),e?e.call(S,s):n.set(S,s),s);var o=(S,n,s)=>(es(S,n,"access private method"),s);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const Dt=require("../Store-Cr3VaD9G.cjs"),As=require("../Derived-CNbsNMn_.cjs"),ls=require("../browser-CpzFX2xg.cjs"),Bs=require("../easings-DsS5-Kqc.cjs"),Rt=require("../layout-8ryRAMGJ.cjs"),us=require("../math-GDWEqu7y.cjs");require("../ticker/index.cjs");const ge=require("../order/index.cjs"),ms=require("../Damped-Da3EnNN4.cjs"),_s=require("../Tweened-DksN-Rz6.cjs"),$e=require("../controls/index.cjs"),be=require("../window-resizer/index.cjs"),ee=require("../scroll-entries/index.cjs"),H=require("../tags-BdW7ATzD.cjs"),as=require("../createStylesheet-BBBiyAsF.cjs"),fs=require("../css-unit-parser/index.cjs"),c=require("../css-property/index.cjs"),Hs=require("../Viewport-BBYt1Ivy.cjs"),We=require("../element-resizer/index.cjs"),$s=require("../gestures-DHLrn6Q8.cjs"),bs=require("../theme/index.cjs"),Ws=require("../dom-JBOkFLTh.cjs"),gs=require("../function-MthRj-GJ.cjs");var f,ye,y,It,Z,dt;class Us{constructor(n,s,e){i(this,f,void 0);i(this,ye,void 0);i(this,y,void 0);i(this,It,0);i(this,Z,0);i(this,dt,null);r(this,f,n),r(this,ye,s),r(this,y,e),ee.scrollEntries.register(t(this,f))}get index(){return t(this,ye)}get size(){return t(this,It)}get position(){return t(this,Z)}destroy(){ee.scrollEntries.unregister(t(this,f)),t(this,f).style.transform="",this.mark(null)}setSize(n){n?(t(this,f).style.setProperty("--size",n+"px"),t(this,y).axisCSSProperty.current==="x"?(t(this,f).style.width=n+"px",t(this,f).style.height=""):(t(this,f).style.height=n+"px",t(this,f).style.width="")):(t(this,f).style.width="",t(this,f).style.height="",t(this,f).style.removeProperty("--size"))}resize(){r(this,It,t(this,y).vertical?t(this,f).offsetHeight:t(this,f).offsetWidth),r(this,Z,t(this,y).vertical?Rt.getCumulativeOffsetTop(t(this,f)):Rt.getCumulativeOffsetLeft(t(this,f))),r(this,Z,t(this,Z)-t(this,y).contentPosition)}transform(){let n=0;const s=t(this,y).viewportSize*t(this,y).sectionDistanceScaleCSSProperty.current;t(this,y).loopCSSProperty.current&&t(this,y).overscroll&&t(this,Z)+t(this,It)<t(this,y).currentScrollValue&&(n=t(this,y).distance*-1-t(this,y).gap),ee.scrollEntries.update(t(this,f),t(this,y).axisCSSProperty.current,n);const e=t(this,y).currentScrollValue+n,h=t(this,Z)-t(this,y).viewportSize-s,u=t(this,Z)+t(this,It)+s,b=us.clamp(e,h,u);t(this,y).vertical?t(this,f).style.transform=`translate3d(0px, ${b*-1}px, 0px)`:t(this,f).style.transform=`translate3d(${b*-1}px, 0px, 0px)`}mark(n){t(this,dt)!==n&&(t(this,dt)&&t(this,f).classList.remove(t(this,dt)),n&&t(this,f).classList.add(n),r(this,dt,n),t(this,f).dispatchEvent(new CustomEvent("sectionsChange",{composed:!0,detail:{mark:t(this,dt)}})))}}f=new WeakMap,ye=new WeakMap,y=new WeakMap,It=new WeakMap,Z=new WeakMap,dt=new WeakMap;const Gs=as.createStylesheet({":host":{position:"relative",width:"100%",height:"100%",display:"block",outline:"none"},':host([hibernated="true"])':{display:"contents"},".static":{position:"var(--static-position, absolute)",top:"var(--static-top, 0)",left:"var(--static-left, 0)",width:"var(--static-width, 100%)",height:"var(--static-height, 100%)"},".content":{position:"relative",display:"flex",width:"100%",height:"100%",gap:"var(--gap, 0px)",willChange:"var(--will-change, transform)"},':host([hibernated="true"]) .content':{display:"contents"},"::slotted(*)":{flexShrink:"0"}});var a,Tt,V,j,J,$,Q,pt,ft,W,F,Mt,At,Bt,_t,re,U,Ht,bt,G,mt,X,gt,$t,Wt,Ut,p,Ce,l,ve,Pe,v,m,O,K,yt,Y,x,g,he,Ct,Gt,Kt,ne,tt,Nt,me,vt,ie,we,ss,Ee,is,xe,rs,Le,hs,q,ze,Ge,ys,oe,Ve,Fe,ns,et,Ot,ke,os;class Ue extends HTMLElement{constructor(){super();i(this,Nt);i(this,vt);i(this,we);i(this,Ee);i(this,xe);i(this,Le);i(this,Ge);i(this,Fe);i(this,et);i(this,ke);i(this,a,null);i(this,Tt,new c.CSSProperty(this,"--controls",!0));i(this,V,new c.CSSProperty(this,"--axis","y"));i(this,j,new c.CSSProperty(this,"--direction",0));i(this,J,new c.CSSProperty(this,"--pages",0,{validate:s=>Math.max(0,s-1)}));i(this,$,new c.CSSProperty(this,"--split",!1));i(this,Q,new c.CSSProperty(this,"--sectional",!1));i(this,pt,new c.CSSProperty(this,"--auto-size",!1));i(this,ft,new c.CSSProperty(this,"--wheel-max-delta",!1));i(this,W,new c.CSSProperty(this,"--sections-in-view",1));i(this,F,new c.CSSProperty(this,"--loop",!1));i(this,Mt,new c.CSSProperty(this,"--damping",20));i(this,At,new c.CSSProperty(this,"--mass",0));i(this,Bt,new c.CSSProperty(this,"--stiffness",0));i(this,_t,new c.CSSProperty(this,"--mouse-drag",!1));i(this,re,new c.CSSProperty(this,"--section-distance-scale",.5));i(this,U,new c.CSSProperty(this,"--autoplay",0));i(this,Ht,new c.CSSProperty(this,"--autoplay-pause-duration",0));i(this,bt,new c.CSSProperty(this,"--autoplay-user-direction",!1));i(this,G,new c.CSSProperty(this,"--classes",0));i(this,mt,new c.CSSProperty(this,"--current-index-start-offset",0));i(this,X,new c.CSSProperty(this,"--current-index-end-offset",0));i(this,gt,new c.CSSProperty(this,"--focus-delay",0));i(this,$t,new c.CSSProperty(this,"--focus-duration",3e3));i(this,Wt,new c.CSSProperty(this,"--disabled",!1));i(this,Ut,new c.CSSProperty(this,"--hibernated",!1));i(this,p,null);i(this,Ce,null);i(this,l,[]);i(this,ve,0);i(this,Pe,0);i(this,v,0);i(this,m,0);i(this,O,0);i(this,K,null);i(this,yt,null);i(this,Y,null);i(this,x,null);i(this,g,new Dt.Store(0));i(this,he,0);i(this,Ct,0);i(this,Gt,!0);i(this,Kt,!0);i(this,ne,void 0);i(this,tt,new _s.Tweened);i(this,q,()=>{t(this,a).unlistenAnimationFrame();const s=this.currentScrollValue/t(this,m)||0,e=t(this,g).current;if(r(this,ve,this.vertical?Rt.getCumulativeOffsetTop(this):Rt.getCumulativeOffsetLeft(this)),r(this,Pe,this.vertical?Rt.getCumulativeOffsetTop(t(this,p)):Rt.getCumulativeOffsetLeft(t(this,p))),r(this,v,this.vertical?this.offsetHeight:this.offsetWidth),this.vertical?r(this,O,fs.cssUnitParser.parse(getComputedStyle(t(this,p)).rowGap)):r(this,O,fs.cssUnitParser.parse(getComputedStyle(t(this,p)).columnGap)),t(this,pt).current&&t(this,l).length){const h=t(this,W).current,u=(t(this,v)-t(this,O)*(h-1))/h;t(this,l).forEach(b=>{b.setSize(u)})}else t(this,l).forEach(h=>{h.setSize()});if(t(this,l).forEach(h=>{h.resize()}),t(this,J).current){r(this,m,t(this,v)*t(this,J).current);const h=t(this,m)+t(this,v);this.vertical?(t(this,p).style.width=h+"px",t(this,p).style.height="100%"):(t(this,p).style.height=h+"px",t(this,p).style.width="100%")}else this.vertical?(t(this,p).style.width="100%",t(this,p).style.height="max-content",r(this,m,t(this,p).offsetHeight-t(this,v))):(t(this,p).style.width="max-content",t(this,p).style.height="100%",r(this,m,t(this,p).offsetWidth-t(this,v)));if(!t(this,F).current){const h=getComputedStyle(this),u=this.vertical?parseFloat(h.paddingBlockStart)+parseFloat(h.paddingBlockEnd):parseFloat(h.paddingInlineStart)+parseFloat(h.paddingInlineEnd);r(this,m,t(this,m)+u),t(this,a).max=t(this,m)}if(t(this,F).current&&t(this,l).length){const h=t(this,l)[t(this,l).length-1],u=h.position+h.size-t(this,v),b=t(this,m)-u;r(this,Ct,h.position+h.size+b)}else r(this,Ct,t(this,m));if(t(this,Q).current&&t(this,l).length){const h=t(this,l)[e];t(this,a).set(h.position,{equalize:!0})}else t(this,a).set(s*t(this,m),{equalize:!0})});i(this,ze,()=>{const s=this.currentScrollValue;if(r(this,he,Math.max(0,s-t(this,m))),t(this,l).length){let e=0;for(let h=0;h<t(this,l).length;h++){const u=t(this,l)[h];u.transform(),this.targetScrollValue+u.size/2>=u.position&&(e=h)}t(this,g).current=e}else this.vertical?t(this,p).style.transform=`translate3d(0px, ${s*-1}px, 0px)`:t(this,p).style.transform=`translate3d(${s*-1}px, 0px, 0px)`;ee.scrollEntries.update(this,t(this,V).current,s)});i(this,oe,(s,e)=>{t(this,Tt).current&&(t(this,bt).current&&(t(this,x).pauseAndContinue(t(this,Ht).current),t(this,x).direction=Math.sign(e)||1),t(this,Ve).call(this,s,e))});i(this,Ve,(s,e)=>{if(t(this,j).current){if(t(this,j).current<0&&e>0)return;if(t(this,j).current>0&&e<0)return}if(t(this,tt).unlistenAnimationFrame(),!t(this,U).current&&t(this,gt).current&&(clearInterval(t(this,ne)),r(this,ne,setTimeout(()=>{const h=o(this,ke,os).call(this);h&&this.scrollToSection(h.index,{tween:{duration:t(this,$t).current,easing:Bs.easeInOutExpo}})},t(this,gt).current))),!(s==="drag"&&!Hs.device.isMobile&&!t(this,_t).current))if(t(this,Q).current){const h=Math.sign(e);t(this,l).length?this.shiftSections(h):t(this,a).shift(h*t(this,v))}else t(this,a).shift(e)});ls.isBrowser&&(r(this,a,new ms.Damped(0,{damping:.01,min:0,order:ge.TICK_ORDER.SCROLL})),this.attachShadow({mode:"open"}).adoptedStyleSheets.push(Gs),H.element(this,{tabIndex:0,children:[H.div({class:"static",children:[H.slot({name:"static"})]}),H.div({class:"content",children:[H.slot({ref:e=>r(this,Ce,e)})],style:{flexDirection:new As.Derived(t(this,V),e=>e==="x"?"row":"column")},ref:e=>r(this,p,e)})]}),r(this,K,new $e.WheelControls({element:t(this,p)})),t(this,K).changeEvent.subscribe(t(this,oe)),r(this,yt,new $e.KeyboardControls({element:this})),t(this,yt).changeEvent.subscribe(t(this,oe)),r(this,Y,new $e.DragControls({element:t(this,p)})),t(this,Y).changeEvent.subscribe(t(this,oe)),r(this,x,new $e.AutoplayControls({culling:this})),t(this,x).changeEvent.subscribe(t(this,Ve)),t(this,V).subscribe(({current:e})=>{t(this,p).style.flexDirection=e==="x"?"row":"column",t(this,K).axis=t(this,ft).current?"max":e,t(this,yt).dimension=e==="x"?"width":"height",t(this,Y).axis=e,e==="x"?this.style.touchAction="pan-y":e==="y"&&(this.style.touchAction="pan-x"),this.isConnected&&t(this,q).call(this)}),t(this,ft).subscribe(e=>{t(this,K).axis=e.current?"max":t(this,V).current}),t(this,J).subscribe(()=>{this.isConnected&&t(this,q).call(this)}),t(this,$).subscribe(({current:e})=>{this.isConnected&&(e?o(this,Nt,me).call(this):o(this,vt,ie).call(this))}),t(this,Q).subscribe(e=>{t(this,K).debounce=e.current,t(this,Y).swipe=e.current,t(this,x).interval=e.current,this.isConnected&&(e.current&&!e.previous&&!t(this,l).length?o(this,Nt,me).call(this):!e.current&&e.previous&&t(this,l).length&&o(this,vt,ie).call(this))}),t(this,pt).subscribe(e=>{this.isConnected&&(t(this,q).call(this),e.current&&!e.previous&&!t(this,l).length?o(this,Nt,me).call(this):!e.current&&e.previous&&t(this,l).length&&o(this,vt,ie).call(this))}),t(this,W).subscribe(e=>{this.isConnected&&(t(this,q).call(this),o(this,et,Ot).call(this))}),t(this,F).subscribe(e=>{e.current?(this.isConnected&&(t(this,l).length||(t(this,$).current=!0)),t(this,l).length&&(t(this,a).max=1/0,t(this,a).min=-1/0)):(r(this,he,0),t(this,a).max=t(this,m),t(this,a).min=0)}),t(this,Mt).subscribe(e=>{t(this,a).damping=e.current}),t(this,At).subscribe(e=>{t(this,a).mass=e.current}),t(this,Bt).subscribe(e=>{t(this,a).stiffness=e.current}),t(this,Wt).subscribe(e=>{e.current&&!e.previous?o(this,we,ss).call(this):!e.current&&e.previous&&o(this,Ee,is).call(this)}),t(this,Ut).subscribe(e=>{e.current&&!e.previous?o(this,xe,rs).call(this):!e.current&&e.previous&&o(this,Le,hs).call(this)}),t(this,U).subscribe(e=>{t(this,x).speed=e.current,e.current&&!e.previous?t(this,x).connect():!e.current&&e.previous&&t(this,x).disconnect()}),t(this,bt).subscribe(e=>{e.current||(t(this,x).direction=1)}),t(this,G).subscribe(e=>{this.isConnected&&o(this,et,Ot).call(this)}),t(this,mt).subscribe(e=>{this.isConnected&&t(this,G).current&&o(this,et,Ot).call(this)}),t(this,X).subscribe(e=>{this.isConnected&&t(this,G).current&&o(this,et,Ot).call(this)}),t(this,a).isRunning.subscribe(e=>{this.classList.toggle("active",e.current)}),t(this,g).subscribe(e=>{t(this,l).length&&o(this,et,Ot).call(this)}),t(this,tt).subscribe(e=>{t(this,tt).isRunning.current&&t(this,a).set(e.current)}))}get damped(){return t(this,a)}get controlsCSSProperty(){return t(this,Tt)}get axisCSSProperty(){return t(this,V)}get directionCSSProperty(){return t(this,j)}get pagesCSSProperty(){return t(this,J)}get splitCSSProperty(){return t(this,$)}get sectionalCSSProperty(){return t(this,Q)}get autoSizeCSSProperty(){return t(this,pt)}get wheelMaxDeltaCSSProperty(){return t(this,ft)}get sectionsInViewCSSProperty(){return t(this,W)}get loopCSSProperty(){return t(this,F)}get dampingCSSProperty(){return t(this,Mt)}get massCSSProperty(){return t(this,At)}get stiffnessCSSProperty(){return t(this,Bt)}get mouseDragCSSProperty(){return t(this,_t)}get sectionDistanceScaleCSSProperty(){return t(this,re)}get autoplayCSSProperty(){return t(this,U)}get autoplayPauseDurationCSSProperty(){return t(this,Ht)}get autoplayUserDirectionCSSProperty(){return t(this,bt)}get classesCSSProperty(){return t(this,G)}get currentIndexStartOffsetCSSProperty(){return t(this,mt)}get currentIndexEndOffsetCSSProperty(){return t(this,X)}get focusDelayCSSProperty(){return t(this,gt)}get focusDurationCSSProperty(){return t(this,$t)}get disabledCSSProperty(){return t(this,Wt)}get hibernatedCSSProperty(){return t(this,Ut)}get currentScrollValue(){return o(this,Fe,ns).call(this,"current")}get targetScrollValue(){return o(this,Fe,ns).call(this,"target")}get contentElement(){return t(this,p)}get sections(){return t(this,l)}get position(){return t(this,ve)}get contentPosition(){return t(this,Pe)}get viewportSize(){return t(this,v)}get scrollSize(){return t(this,m)}get gap(){return t(this,O)}get counter(){return t(this,g)}get limit(){return t(this,l).length-t(this,W).current}get distance(){return t(this,Ct)}get loopDistance(){return t(this,F).current?t(this,Ct)+t(this,O):t(this,Ct)}get overscroll(){return t(this,he)}get vertical(){return t(this,V).current==="y"}get currentProgress(){return this.currentScrollValue/this.loopDistance||0}get targetProgress(){return this.targetScrollValue/this.loopDistance||0}get scrollWidth(){return t(this,V).current==="y"?0:t(this,a).distance}get scrollHeight(){return t(this,V).current==="x"?0:t(this,a).distance}onScroll(...s){return t(this,a).subscribe(...s)}offScroll(...s){t(this,a).unsubscribe(...s)}range(s,e,h=0){const u=s-h,b=u+e+h*2;return this.currentProgress<u?0:this.currentProgress>b?1:(this.currentProgress-u)/(b-u)}curve(s,e,h=0){return Math.sin(this.range(s,e,h)*Math.PI)}visible(s,e,h=0){const u=s-h,b=u+e+h*2;return this.currentProgress>=u&&this.currentProgress<=b}scrollToSection(s,e){if(!t(this,l).length)return;const h=t(this,g).current;o(this,Ge,ys).call(this,s);const u=t(this,l)[h],b=t(this,l)[t(this,g).current];if(u&&b){let D=0;const se=o(this,ke,os).call(this),qs=se?this.targetScrollValue-se.position:0;t(this,F).current?t(this,g).current===0&&h===t(this,l).length-1?D=t(this,m)+t(this,v)-u.position+t(this,O):t(this,g).current===t(this,l).length-1&&h===0?D=b.position-(t(this,m)+t(this,v)+t(this,O)):D=b.position-u.position:D=b.position-u.position,this.shiftPosition(D-qs,e)}}shiftSections(s,e){t(this,l).length&&this.scrollToSection(t(this,g).current+s,e)}setPosition(s,e){e!=null&&e.tween?(t(this,tt).set(t(this,a).current,{equalize:!0}),t(this,tt).set(s,ps({},e.tween))):t(this,a).set(s,{equalize:(e==null?void 0:e.behaviour)==="instant"})}shiftPosition(s,e){this.setPosition(t(this,a).target+s,e)}connectedCallback(){t(this,Tt).observe(),t(this,V).observe(),t(this,j).observe(),t(this,J).observe(),t(this,$).observe(),t(this,Q).observe(),t(this,pt).observe(),t(this,ft).observe(),t(this,W).observe(),t(this,F).observe(),t(this,Mt).observe(),t(this,At).observe(),t(this,Bt).observe(),t(this,_t).observe(),t(this,re).observe(),t(this,U).observe(),t(this,U).observe(),t(this,Ht).observe(),t(this,bt).observe(),t(this,G).observe(),t(this,mt).observe(),t(this,X).observe(),t(this,gt).observe(),t(this,$t).observe(),t(this,Wt).observe(),t(this,Ut).observe(),o(this,Le,hs).call(this)}disconnectedCallback(){t(this,Tt).unobserve(),t(this,V).unobserve(),t(this,j).unobserve(),t(this,J).unobserve(),t(this,$).unobserve(),t(this,Q).unobserve(),t(this,pt).unobserve(),t(this,ft).unobserve(),t(this,W).unobserve(),t(this,F).unobserve(),t(this,Mt).unobserve(),t(this,At).unobserve(),t(this,Bt).unobserve(),t(this,_t).unobserve(),t(this,re).unobserve(),t(this,U).unobserve(),t(this,Ht).unobserve(),t(this,bt).unobserve(),t(this,G).unobserve(),t(this,mt).unobserve(),t(this,X).unobserve(),t(this,gt).unobserve(),t(this,$t).unobserve(),t(this,Wt).unobserve(),t(this,Ut).unobserve(),o(this,xe,rs).call(this)}}a=new WeakMap,Tt=new WeakMap,V=new WeakMap,j=new WeakMap,J=new WeakMap,$=new WeakMap,Q=new WeakMap,pt=new WeakMap,ft=new WeakMap,W=new WeakMap,F=new WeakMap,Mt=new WeakMap,At=new WeakMap,Bt=new WeakMap,_t=new WeakMap,re=new WeakMap,U=new WeakMap,Ht=new WeakMap,bt=new WeakMap,G=new WeakMap,mt=new WeakMap,X=new WeakMap,gt=new WeakMap,$t=new WeakMap,Wt=new WeakMap,Ut=new WeakMap,p=new WeakMap,Ce=new WeakMap,l=new WeakMap,ve=new WeakMap,Pe=new WeakMap,v=new WeakMap,m=new WeakMap,O=new WeakMap,K=new WeakMap,yt=new WeakMap,Y=new WeakMap,x=new WeakMap,g=new WeakMap,he=new WeakMap,Ct=new WeakMap,Gt=new WeakMap,Kt=new WeakMap,ne=new WeakMap,tt=new WeakMap,Nt=new WeakSet,me=function(){o(this,vt,ie).call(this),t(this,Ce).assignedElements().forEach((s,e)=>{s instanceof HTMLElement&&t(this,l).push(new Us(s,e,this))}),t(this,p).style.transform="",this.dispatchEvent(new CustomEvent("sectionsChange",{composed:!0})),t(this,q).call(this),o(this,et,Ot).call(this)},vt=new WeakSet,ie=function(){t(this,l).forEach(s=>{s.destroy()}),r(this,l,[]),t(this,g).current=0,t(this,a).reset(),this.dispatchEvent(new CustomEvent("sectionsChange",{composed:!0}))},we=new WeakSet,ss=function(){t(this,Gt)||(r(this,Gt,!0),t(this,a).unsubscribe(t(this,ze)),t(this,a).unlistenAnimationFrame(),t(this,K).disconnect(),t(this,yt).disconnect(),t(this,Y).disconnect(),t(this,x).disconnect(),clearInterval(t(this,ne)),t(this,tt).unlistenAnimationFrame())},Ee=new WeakSet,is=function(){t(this,Gt)&&(r(this,Gt,!1),t(this,a).subscribe(t(this,ze)),t(this,K).connect(),t(this,yt).connect(),t(this,Y).connect(),t(this,U).current&&t(this,x).connect())},xe=new WeakSet,rs=function(){t(this,Kt)||(r(this,Kt,!0),be.windowResizer.unsubscribe(t(this,q)),We.elementResizer.unsubscribe(t(this,q)),t(this,a).reset(),o(this,we,ss).call(this),t(this,p).style.transform="",t(this,$).current&&o(this,vt,ie).call(this),ee.scrollEntries.unregister(this))},Le=new WeakSet,hs=function(){t(this,Kt)&&(r(this,Kt,!1),t(this,$).current&&o(this,Nt,me).call(this),ee.scrollEntries.register(this),be.windowResizer.subscribe(t(this,q),ge.RESIZE_ORDER.SCROLL),We.elementResizer.subscribe(this,t(this,q)),o(this,Ee,is).call(this))},q=new WeakMap,ze=new WeakMap,Ge=new WeakSet,ys=function(s){t(this,F).current?(t(this,g).current=s%t(this,l).length,t(this,g).current=t(this,g).current<0?t(this,l).length+t(this,g).current:t(this,g).current):t(this,g).current=us.clamp(s,0,this.limit)},oe=new WeakMap,Ve=new WeakMap,Fe=new WeakSet,ns=function(s="current"){if(t(this,F).current&&t(this,l).length){const e=t(this,a)[s]%(t(this,m)+t(this,v)+t(this,O));return e<0?t(this,m)+e+t(this,v)+t(this,O):e}else return t(this,a)[s]},et=new WeakSet,Ot=function(){if(t(this,G).current&&t(this,l).length){const s=t(this,g).current+t(this,mt).current;s===0?this.classList.add("start"):this.classList.remove("start"),s===this.limit?this.classList.add("end"):this.classList.remove("end");const e=t(this,W).current+t(this,X).current;t(this,l).forEach((h,u)=>{const b=s-this.limit-1+t(this,X).current,D=s+e,se=this.sections.length-D;u>=s&&u<D||u<=b?h.mark("current"):u>=D&&u<D+se/2||u<=b+e?h.mark("next"):h.mark("previous")})}},ke=new WeakSet,os=function(){let s=null,e=1/0;for(let h=0;h<t(this,l).length;h++){const u=Math.abs(t(this,l)[h].position-this.targetScrollValue);u<e&&(e=u,s=h)}return s!==null?t(this,l)[s]:null};customElements.get("e-scroll")||customElements.define("e-scroll",Ue);var Re;class ts extends HTMLElement{constructor(){super(...arguments);i(this,Re,null)}get scrollElement(){return t(this,Re)}connectedCallback(){const s=Ws.findParentElement(this,Ue);s instanceof Ue?r(this,Re,s):console.error(this,"e-scroll not found")}}Re=new WeakMap;const Ks=as.createStylesheet({":host":{display:"inline-block",zIndex:"1",backgroundColor:bs.aptechkaTheme.colorFont.var},':host([axis="y"])':{position:"absolute",right:"0",top:"0",width:"1vmin",height:"100%"},':host([axis="x"])':{position:"absolute",left:"0",bottom:"0",width:"100%",height:"1vmin"},".default-thumb":{backgroundColor:bs.aptechkaTheme.colorMain.var,borderRadius:"1vmin",touchAction:"none"},"::slotted(*)":{touchAction:"none"}});var ce,k,st,it,le,ue,Zt,De,Oe,qe;class Cs extends ts{constructor(){super();i(this,ce,null);i(this,k,null);i(this,st,!1);i(this,it,0);i(this,le,0);i(this,ue,0);i(this,Zt,()=>{r(this,st,this.offsetWidth>this.offsetHeight);const s=t(this,st)?this.offsetWidth:this.offsetHeight;r(this,it,s/((this.scrollElement.scrollSize+this.scrollElement.viewportSize)/s)),r(this,it,Math.max(t(this,it),30)),t(this,st)?(t(this,k).style.width=t(this,it)+"px",t(this,k).style.height="100%"):(t(this,k).style.width="100%",t(this,k).style.height=t(this,it)+"px"),r(this,le,s-t(this,it)),this.scrollElement.scrollSize||(this.style.display="none")});i(this,De,()=>{r(this,ue,this.scrollElement.currentProgress*t(this,le)),t(this,st)?t(this,k).style.transform=`translate3d(${t(this,ue)}px, 0px, 0px)`:t(this,k).style.transform=`translate3d(0px, ${t(this,ue)}px, 0px)`});i(this,Oe,()=>{this.setAttribute("axis",this.scrollElement.axisCSSProperty.current)});i(this,qe,s=>{document.documentElement.classList.add("grabbing"),$s.setupDrag(u=>{const b=t(this,st)?u.x:u.y,D=this.scrollElement.distance/t(this,le),se=(b-h)*D;this.scrollElement.setPosition(e+se)},()=>{document.documentElement.classList.remove("grabbing")});const e=this.scrollElement.targetScrollValue,h=t(this,st)?s.x:s.y});ls.isBrowser&&(this.attachShadow({mode:"open"}).adoptedStyleSheets.push(Ks),H.element(this,{slot:"static","drag-dead-zone":"",children:[H.slot({ref:e=>r(this,ce,e),children:H.div({class:"default-thumb"})})]}))}get thumbElement(){return t(this,k)}connectedCallback(){super.connectedCallback();const s=t(this,ce).assignedElements()[0]||t(this,ce).firstElementChild;r(this,k,s),t(this,k).addEventListener("pointerdown",t(this,qe)),be.windowResizer.subscribe(t(this,Zt),ge.RESIZE_ORDER.SCROLL+1),We.elementResizer.subscribe(this,t(this,Zt)),this.scrollElement.onScroll(t(this,De)),this.scrollElement.axisCSSProperty.subscribe(t(this,Oe))}disconnectedCallback(){t(this,k).removeEventListener("pointerdown",t(this,qe)),be.windowResizer.unsubscribe(t(this,Zt)),We.elementResizer.unsubscribe(t(this,Zt)),this.scrollElement.offScroll(t(this,De)),this.scrollElement.axisCSSProperty.unsubscribe(t(this,Oe))}}ce=new WeakMap,k=new WeakMap,st=new WeakMap,it=new WeakMap,le=new WeakMap,ue=new WeakMap,Zt=new WeakMap,De=new WeakMap,Oe=new WeakMap,qe=new WeakMap;customElements.get("e-scrollbar")||customElements.define("e-scrollbar",Cs);const Ns=as.createStylesheet({button:{all:"inherit"}});class vs extends ts{constructor(){super(),this.attachShadow({mode:"open"}).adoptedStyleSheets.push(Ns),ls.isBrowser&&H.element(this,{children:[H.button({onClick:()=>{this.handleClick()},children:[H.slot()]})]})}}class Ps extends vs{handleClick(){const n=this.getAttribute("index"),s=this.getAttribute("behaviour");this.scrollElement.scrollToSection(parseInt(n||"0"),{behaviour:s})}}customElements.get("e-scroll-set-button")||customElements.define("e-scroll-set-button",Ps);class ws extends vs{handleClick(){const n=this.getAttribute("step"),s=this.getAttribute("behaviour");this.scrollElement.shiftSections(parseInt(n||"1"),{behaviour:s})}}customElements.get("e-scroll-step-button")||customElements.define("e-scroll-step-button",ws);var rt,Pt,ae,Ie,Te,Se;class Zs{constructor(n,s,e){i(this,rt,void 0);i(this,Pt,void 0);i(this,ae,void 0);i(this,Ie,void 0);i(this,Te,()=>{t(this,Pt).scrollToSection(t(this,ae),{behaviour:t(this,Ie)})});i(this,Se,()=>{t(this,rt).classList.toggle("current",t(this,Pt).counter.current===t(this,ae))});r(this,rt,document.createElement("button")),r(this,Pt,n),r(this,Ie,e),r(this,ae,s),t(this,rt).addEventListener("click",t(this,Te)),t(this,Pt).counter.subscribe(t(this,Se)),t(this,Se).call(this)}get element(){return t(this,rt)}destroy(){t(this,rt).removeEventListener("click",t(this,Te)),t(this,Pt).counter.unsubscribe(t(this,Se)),t(this,rt).remove()}}rt=new WeakMap,Pt=new WeakMap,ae=new WeakMap,Ie=new WeakMap,Te=new WeakMap,Se=new WeakMap;var wt,de;class Es extends ts{constructor(){super(...arguments);i(this,wt,[]);i(this,de,gs.debounce(()=>{t(this,wt).forEach(s=>s.destroy()),r(this,wt,[]);for(let s=0;s<this.scrollElement.sections.length;s++){const e=new Zs(this.scrollElement,s,this.getAttribute("behaviour")||"smooth");this.appendChild(e.element),t(this,wt).push(e)}},0))}connectedCallback(){super.connectedCallback(),this.scrollElement.addEventListener("sectionsChange",t(this,de)),t(this,de).call(this)}disconnectedCallback(){this.scrollElement.removeEventListener("sectionsChange",t(this,de)),t(this,wt).forEach(s=>s.destroy()),r(this,wt,[])}}wt=new WeakMap,de=new WeakMap;customElements.get("e-scroll-bullet-buttons")||customElements.define("e-scroll-bullet-buttons",Es);var jt,Jt,Qt,Xt,Et,xt,Lt,zt,L,I,T,M,Vt,P,ht,nt,ot,ct,lt,w,A,B,ut,at,N,Me,d,Yt,te,Ae,E,Ft,R,z,_,pe,kt,C,Ke,Ls,Ne,zs,Ze,Vs,je,Fs,Je,ks,Qe,Rs,Be,fe,St,qt,Xe,Ds,Ye,Os,_e,cs,He;class xs extends ts{constructor(){super();i(this,Ke);i(this,Ne);i(this,Ze);i(this,je);i(this,Je);i(this,Qe);i(this,St);i(this,Xe);i(this,Ye);i(this,_e);i(this,jt,new c.CSSProperty(this,"--damping",20));i(this,Jt,new c.CSSProperty(this,"--mass",0));i(this,Qt,new c.CSSProperty(this,"--stiffness",0));i(this,Xt,new c.CSSProperty(this,"--target",""));i(this,Et,new c.CSSProperty(this,"--disabled",!1));i(this,xt,new c.CSSProperty(this,"--distance-offset",0,{rawValueCheck:!1}));i(this,Lt,new c.CSSProperty(this,"--start-offset",0,{rawValueCheck:!1}));i(this,zt,new c.CSSProperty(this,"--capture-once",!1));i(this,L,new c.CSSProperty(this,"--captured",""));i(this,I,new c.CSSProperty(this,"--released",""));i(this,T,new c.CSSProperty(this,"--captured-from-start",""));i(this,M,new c.CSSProperty(this,"--captured-from-finish",""));i(this,Vt,new c.CSSProperty(this,"--released-from-start",""));i(this,P,new c.CSSProperty(this,"--released-from-finish",""));i(this,ht,new c.CSSProperty(this,"--passed-var",""));i(this,nt,new c.CSSProperty(this,"--progress-var",""));i(this,ot,new c.CSSProperty(this,"--distance-var",""));i(this,ct,new c.CSSProperty(this,"--start-var",""));i(this,lt,new c.CSSProperty(this,"--finish-var",""));i(this,w,new Dt.Store(!1));i(this,A,new Dt.Store(!1));i(this,B,new Dt.Store(!1));i(this,ut,new Dt.Store(!1));i(this,at,new Dt.Store(!1));i(this,N,new Dt.Store(!1));i(this,Me,[]);i(this,d,this);i(this,Yt,0);i(this,te,0);i(this,Ae,0);i(this,E,new ms.Damped(0,{order:ge.TICK_ORDER.SCROLL-1,min:0,max:1}));i(this,Ft,0);i(this,R,0);i(this,z,0);i(this,_,0);i(this,pe,!1);i(this,kt,!1);i(this,C,!0);i(this,Be,()=>{t(this,C)||(this.resize(),t(this,fe).call(this))});i(this,fe,()=>{!t(this,C)&&t(this,pe)&&this.tick()});i(this,He,gs.debounce(()=>{const s=ee.scrollEntries.getAll(this).reverse();let e=0;s.forEach((h,u)=>{h.element===this.scrollElement&&(e=u)}),r(this,Me,s.slice(e+1))},0))}get distanceOffsetCSSProperty(){return t(this,xt)}get startOffsetCSSProperty(){return t(this,Lt)}get captureOnceCSSProperty(){return t(this,zt)}get capturedCSSProperty(){return t(this,L)}get releasedCSSProperty(){return t(this,I)}get capturedFromStartCSSProperty(){return t(this,T)}get capturedFromFinishCSSProperty(){return t(this,M)}get releasedFromStartCSSProperty(){return t(this,Vt)}get releasedFromFinishCSSProperty(){return t(this,P)}get passedVarCSSProperty(){return t(this,ht)}get progressVarCSSProperty(){return t(this,nt)}get distanceVarCSSProperty(){return t(this,ot)}get startVarCSSProperty(){return t(this,ct)}get finishVarCSSProperty(){return t(this,lt)}get disabledCSSProperty(){return t(this,Et)}get dampingCSSProperty(){return t(this,jt)}get massCSSProperty(){return t(this,Jt)}get stiffnessCSSProperty(){return t(this,Qt)}get targetCSSProperty(){return t(this,Xt)}get isCaptured(){return t(this,w)}get isReleased(){return t(this,A)}get isCapturedFromStart(){return t(this,B)}get isReleasedFromStart(){return t(this,ut)}get isCapturedFromFinish(){return t(this,at)}get isReleasedFromFinish(){return t(this,N)}get directionPosition(){return t(this,Yt)}get directionSize(){return t(this,te)}get passed(){return t(this,E)}get progress(){return t(this,Ft)}get start(){return t(this,R)}get finish(){return t(this,_)}get distance(){return t(this,z)}get isCapturedOnce(){return t(this,kt)}get isDisabled(){return t(this,C)}resize(){r(this,te,this.scrollElement.vertical?this.offsetHeight:this.offsetWidth),r(this,Yt,this.scrollElement.vertical?Rt.getCumulativeOffsetTop(this,this.scrollElement):Rt.getCumulativeOffsetLeft(this,this.scrollElement)),r(this,R,this.getStart()),r(this,z,this.getDistance()),r(this,R,t(this,R)+t(this,Lt).current),r(this,z,t(this,z)+t(this,xt).current),r(this,_,t(this,R)+t(this,z)),this.scrollElement.currentScrollValue>t(this,_)&&!t(this,w).current&&!t(this,A).current&&(t(this,w).current=!0),this.setVar(t(this,ct).current,t(this,R)),this.setVar(t(this,lt).current,t(this,_)),this.setVar(t(this,ot).current,t(this,z)),t(this,E).max=t(this,z),r(this,pe,!0)}tick(){let s=this.scrollElement.currentScrollValue;t(this,Me).forEach(h=>{s+=h.value}),t(this,E).set(s-t(this,R));const e=Math.round(s);t(this,w).current&&(e>t(this,R)?t(this,B).current||o(this,Ze,Vs).call(this):t(this,B).current&&!t(this,ut).current&&o(this,Je,ks).call(this),e<t(this,_)?t(this,N).current&&!t(this,at).current&&o(this,je,Fs).call(this):t(this,B).current&&!t(this,N).current&&o(this,Qe,Rs).call(this)),e>t(this,R)&&e<t(this,_)?t(this,w).current||o(this,Ke,Ls).call(this):t(this,w).current&&(t(this,E).set(us.step(t(this,z)/2,t(this,E).current,0,t(this,z))),o(this,Ne,zs).call(this)),t(this,kt)&&t(this,zt).current&&(t(this,L).current&&t(this,d).classList.add(t(this,L).current),r(this,C,!0))}disable(){this.style.cssText="",r(this,Yt,0),r(this,te,0),t(this,E).reset(),r(this,Ft,0),r(this,R,0),r(this,z,0),r(this,_,0),r(this,pe,!1),t(this,w).current=!1,t(this,A).current=!1,t(this,B).current=!1,t(this,ut).current=!1,t(this,at).current=!1,t(this,N).current=!1,r(this,kt,!1),r(this,C,!0),o(this,_e,cs).call(this)}enable(){r(this,C,!1)}connectedCallback(){super.connectedCallback(),t(this,jt).observe(),t(this,Jt).observe(),t(this,Qt).observe(),t(this,Xt).observe(),t(this,Et).observe(),t(this,xt).observe(),t(this,Lt).observe(),t(this,zt).observe(),t(this,L).observe(),t(this,I).observe(),t(this,T).observe(),t(this,M).observe(),t(this,Vt).observe(),t(this,P).observe(),t(this,ht).observe(),t(this,nt).observe(),t(this,ot).observe(),t(this,ct).observe(),t(this,lt).observe();let s=!1;this.scrollElement.addEventListener("sectionsChange",t(this,He)),t(this,He).call(this),t(this,Et).current||this.enable(),t(this,jt).subscribe(e=>{t(this,E).damping=e.current}),t(this,Jt).subscribe(e=>{t(this,E).mass=e.current}),t(this,Qt).subscribe(e=>{t(this,E).stiffness=e.current}),t(this,Xt).subscribe(e=>{e.previous&&o(this,_e,cs).call(this),e.current?e.current==="parent"?r(this,d,this.parentElement||this):r(this,d,document.querySelector(e.current)||this):r(this,d,this)}),t(this,Et).subscribe(e=>{e.current&&!e.previous?this.disable():!e.current&&e.previous&&(this.resize(),this.enable())}),t(this,Lt).subscribe(()=>{s&&!t(this,C)&&this.resize()}),t(this,xt).subscribe(()=>{s&&!t(this,C)&&this.resize()}),t(this,L).subscribe(e=>{o(this,St,qt).call(this,e)}),t(this,T).subscribe(e=>{o(this,St,qt).call(this,e)}),t(this,M).subscribe(e=>{o(this,St,qt).call(this,e)}),t(this,I).subscribe(e=>{o(this,St,qt).call(this,e)}),t(this,Vt).subscribe(e=>{o(this,St,qt).call(this,e)}),t(this,P).subscribe(e=>{o(this,St,qt).call(this,e)}),t(this,zt).subscribe(e=>{t(this,C)||!e.current&&e.previous&&(this.resize(),this.enable())}),t(this,ht).subscribe(e=>{t(this,C)||(this.removeVar(e.previous),this.setVar(e.current,this.passed.current))}),t(this,nt).subscribe(e=>{t(this,C)||(this.removeVar(e.previous),this.setVar(e.current,t(this,Ft)))}),t(this,ct).subscribe(e=>{t(this,C)||(this.removeVar(e.previous),this.setVar(e.current,t(this,R)))}),t(this,lt).subscribe(e=>{t(this,C)||(this.removeVar(e.previous),this.setVar(e.current,t(this,_)))}),t(this,ot).subscribe(e=>{t(this,C)||(this.removeVar(e.previous),this.setVar(e.current,t(this,z)))}),t(this,E).subscribe(e=>{r(this,Ft,t(this,E).current/t(this,z)||0),this.setVar(t(this,ht).current,t(this,E).current.toFixed(6)),this.setVar(t(this,nt).current,t(this,Ft).toFixed(6))}),be.windowResizer.subscribe(t(this,Be),ge.RESIZE_ORDER.SEGMENT),this.scrollElement.onScroll(t(this,fe)),s=!0}disconnectedCallback(){be.windowResizer.unsubscribe(t(this,Be)),this.scrollElement.offScroll(t(this,fe)),t(this,jt).close(),t(this,Jt).close(),t(this,Qt).close(),t(this,Xt).close(),t(this,Et).close(),t(this,xt).close(),t(this,Lt).close(),t(this,zt).close(),t(this,L).close(),t(this,I).close(),t(this,T).close(),t(this,M).close(),t(this,Vt).close(),t(this,P).close(),t(this,ht).close(),t(this,nt).close(),t(this,ot).close(),t(this,ct).close(),t(this,lt).close(),t(this,w).close(),t(this,A).close(),t(this,B).close(),t(this,ut).close(),t(this,at).close(),t(this,N).close(),this.disable()}removeVar(s){s&&t(this,d).style.removeProperty(`--${s}`)}setVar(s,e){s&&t(this,d).style.setProperty(`--${s}`,e.toString())}getDistance(){return t(this,te)+t(this,Ae)}getStart(){return t(this,Yt)-t(this,Ae)}}jt=new WeakMap,Jt=new WeakMap,Qt=new WeakMap,Xt=new WeakMap,Et=new WeakMap,xt=new WeakMap,Lt=new WeakMap,zt=new WeakMap,L=new WeakMap,I=new WeakMap,T=new WeakMap,M=new WeakMap,Vt=new WeakMap,P=new WeakMap,ht=new WeakMap,nt=new WeakMap,ot=new WeakMap,ct=new WeakMap,lt=new WeakMap,w=new WeakMap,A=new WeakMap,B=new WeakMap,ut=new WeakMap,at=new WeakMap,N=new WeakMap,Me=new WeakMap,d=new WeakMap,Yt=new WeakMap,te=new WeakMap,Ae=new WeakMap,E=new WeakMap,Ft=new WeakMap,R=new WeakMap,z=new WeakMap,_=new WeakMap,pe=new WeakMap,kt=new WeakMap,C=new WeakMap,Ke=new WeakSet,Ls=function(){t(this,w).current=!0,t(this,A).current=!1,r(this,kt,!0),t(this,I).current&&t(this,d).classList.remove(t(this,I).current),t(this,P).current&&t(this,d).classList.remove(t(this,P).current),t(this,P).current&&t(this,d).classList.remove(t(this,P).current),t(this,L).current&&t(this,d).classList.add(t(this,L).current)},Ne=new WeakSet,zs=function(){t(this,A).current=!0,t(this,w).current=!1,r(this,kt,!0),t(this,L).current&&t(this,d).classList.remove(t(this,L).current),t(this,T).current&&t(this,d).classList.remove(t(this,T).current),t(this,M).current&&t(this,d).classList.remove(t(this,M).current),t(this,I).current&&t(this,d).classList.add(t(this,I).current)},Ze=new WeakSet,Vs=function(){t(this,w).current=!0,t(this,B).current=!0,t(this,ut).current=!1,t(this,T).current&&t(this,d).classList.add(t(this,T).current)},je=new WeakSet,Fs=function(){t(this,w).current=!0,t(this,at).current=!0,t(this,N).current=!1,t(this,M).current&&t(this,d).classList.add(t(this,M).current)},Je=new WeakSet,ks=function(){t(this,A).current=!0,t(this,ut).current=!0,t(this,B).current=!1,t(this,P).current&&t(this,d).classList.add(t(this,P).current)},Qe=new WeakSet,Rs=function(){t(this,A).current=!0,t(this,N).current=!0,t(this,at).current=!1,t(this,P).current&&t(this,d).classList.add(t(this,P).current)},Be=new WeakMap,fe=new WeakMap,St=new WeakSet,qt=function(s){if(t(this,C)){s.previous&&t(this,d).classList.remove(s.previous),s.current&&t(this,d).classList.remove(s.current);return}s.current&&t(this,w).current?(s.previous&&t(this,d).classList.remove(s.previous),t(this,d).classList.add(s.current)):!s.current&&s.previous&&t(this,d).classList.remove(s.previous)},Xe=new WeakSet,Ds=function(...s){s.forEach(e=>{e&&t(this,d).classList.remove(e)})},Ye=new WeakSet,Os=function(...s){s.forEach(e=>{e&&t(this,d).style.removeProperty(`--${e}`)})},_e=new WeakSet,cs=function(){o(this,Xe,Ds).call(this,t(this,L).current,t(this,T).current,t(this,M).current,t(this,I).current,t(this,Vt).current,t(this,P).current),o(this,Ye,Os).call(this,t(this,ht).current,t(this,nt).current,t(this,ot).current,t(this,ct).current,t(this,lt).current)},He=new WeakMap;customElements.get("e-scroll-segment")||customElements.define("e-scroll-segment",xs);exports.ScrollBulletButtonsElement=Es;exports.ScrollElement=Ue;exports.ScrollSegmentElement=xs;exports.ScrollSetButtonElement=Ps;exports.ScrollStepButtonElement=ws;exports.ScrollbarElement=Cs;
|
|
1
|
+
"use strict";var Is=Object.defineProperty;var Ss=Object.getOwnPropertySymbols;var Ts=Object.prototype.hasOwnProperty,Ms=Object.prototype.propertyIsEnumerable;var ds=(S,n,s)=>n in S?Is(S,n,{enumerable:!0,configurable:!0,writable:!0,value:s}):S[n]=s,ps=(S,n)=>{for(var s in n||(n={}))Ts.call(n,s)&&ds(S,s,n[s]);if(Ss)for(var s of Ss(n))Ms.call(n,s)&&ds(S,s,n[s]);return S};var es=(S,n,s)=>{if(!n.has(S))throw TypeError("Cannot "+s)};var t=(S,n,s)=>(es(S,n,"read from private field"),s?s.call(S):n.get(S)),i=(S,n,s)=>{if(n.has(S))throw TypeError("Cannot add the same private member more than once");n instanceof WeakSet?n.add(S):n.set(S,s)},r=(S,n,s,e)=>(es(S,n,"write to private field"),e?e.call(S,s):n.set(S,s),s);var o=(S,n,s)=>(es(S,n,"access private method"),s);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const Dt=require("../Store-Cr3VaD9G.cjs"),As=require("../Derived-CNbsNMn_.cjs"),ls=require("../browser-CpzFX2xg.cjs"),Bs=require("../easings-DsS5-Kqc.cjs"),Rt=require("../layout-8ryRAMGJ.cjs"),us=require("../math-GDWEqu7y.cjs");require("../ticker/index.cjs");const ge=require("../order/index.cjs"),ms=require("../Damped-Da3EnNN4.cjs"),_s=require("../Tweened-DksN-Rz6.cjs"),$e=require("../controls/index.cjs"),be=require("../window-resizer/index.cjs"),ee=require("../scroll-entries/index.cjs"),H=require("../tags-B0do5eeb.cjs"),as=require("../createStylesheet-BqjaCUhm.cjs"),fs=require("../css-unit-parser/index.cjs"),c=require("../css-property/index.cjs"),Hs=require("../Viewport-BBYt1Ivy.cjs"),We=require("../element-resizer/index.cjs"),$s=require("../gestures-DHLrn6Q8.cjs"),bs=require("../theme/index.cjs"),Ws=require("../dom-JBOkFLTh.cjs"),gs=require("../function-MthRj-GJ.cjs");var f,ye,y,It,Z,dt;class Us{constructor(n,s,e){i(this,f,void 0);i(this,ye,void 0);i(this,y,void 0);i(this,It,0);i(this,Z,0);i(this,dt,null);r(this,f,n),r(this,ye,s),r(this,y,e),ee.scrollEntries.register(t(this,f))}get index(){return t(this,ye)}get size(){return t(this,It)}get position(){return t(this,Z)}destroy(){ee.scrollEntries.unregister(t(this,f)),t(this,f).style.transform="",this.mark(null)}setSize(n){n?(t(this,f).style.setProperty("--size",n+"px"),t(this,y).axisCSSProperty.current==="x"?(t(this,f).style.width=n+"px",t(this,f).style.height=""):(t(this,f).style.height=n+"px",t(this,f).style.width="")):(t(this,f).style.width="",t(this,f).style.height="",t(this,f).style.removeProperty("--size"))}resize(){r(this,It,t(this,y).vertical?t(this,f).offsetHeight:t(this,f).offsetWidth),r(this,Z,t(this,y).vertical?Rt.getCumulativeOffsetTop(t(this,f)):Rt.getCumulativeOffsetLeft(t(this,f))),r(this,Z,t(this,Z)-t(this,y).contentPosition)}transform(){let n=0;const s=t(this,y).viewportSize*t(this,y).sectionDistanceScaleCSSProperty.current;t(this,y).loopCSSProperty.current&&t(this,y).overscroll&&t(this,Z)+t(this,It)<t(this,y).currentScrollValue&&(n=t(this,y).distance*-1-t(this,y).gap),ee.scrollEntries.update(t(this,f),t(this,y).axisCSSProperty.current,n);const e=t(this,y).currentScrollValue+n,h=t(this,Z)-t(this,y).viewportSize-s,u=t(this,Z)+t(this,It)+s,b=us.clamp(e,h,u);t(this,y).vertical?t(this,f).style.transform=`translate3d(0px, ${b*-1}px, 0px)`:t(this,f).style.transform=`translate3d(${b*-1}px, 0px, 0px)`}mark(n){t(this,dt)!==n&&(t(this,dt)&&t(this,f).classList.remove(t(this,dt)),n&&t(this,f).classList.add(n),r(this,dt,n),t(this,f).dispatchEvent(new CustomEvent("sectionsChange",{composed:!0,detail:{mark:t(this,dt)}})))}}f=new WeakMap,ye=new WeakMap,y=new WeakMap,It=new WeakMap,Z=new WeakMap,dt=new WeakMap;const Gs=as.createStylesheet({":host":{position:"relative",width:"100%",height:"100%",display:"block",outline:"none"},':host([hibernated="true"])':{display:"contents"},".static":{position:"var(--static-position, absolute)",top:"var(--static-top, 0)",left:"var(--static-left, 0)",width:"var(--static-width, 100%)",height:"var(--static-height, 100%)"},".content":{position:"relative",display:"flex",width:"100%",height:"100%",gap:"var(--gap, 0px)",willChange:"var(--will-change, transform)"},':host([hibernated="true"]) .content':{display:"contents"},"::slotted(*)":{flexShrink:"0"}});var a,Tt,V,j,J,$,Q,pt,ft,W,F,Mt,At,Bt,_t,re,U,Ht,bt,G,mt,X,gt,$t,Wt,Ut,p,Ce,l,ve,Pe,v,m,O,K,yt,Y,x,g,he,Ct,Gt,Kt,ne,tt,Nt,me,vt,ie,we,ss,Ee,is,xe,rs,Le,hs,q,ze,Ge,ys,oe,Ve,Fe,ns,et,Ot,ke,os;class Ue extends HTMLElement{constructor(){super();i(this,Nt);i(this,vt);i(this,we);i(this,Ee);i(this,xe);i(this,Le);i(this,Ge);i(this,Fe);i(this,et);i(this,ke);i(this,a,null);i(this,Tt,new c.CSSProperty(this,"--controls",!0));i(this,V,new c.CSSProperty(this,"--axis","y"));i(this,j,new c.CSSProperty(this,"--direction",0));i(this,J,new c.CSSProperty(this,"--pages",0,{validate:s=>Math.max(0,s-1)}));i(this,$,new c.CSSProperty(this,"--split",!1));i(this,Q,new c.CSSProperty(this,"--sectional",!1));i(this,pt,new c.CSSProperty(this,"--auto-size",!1));i(this,ft,new c.CSSProperty(this,"--wheel-max-delta",!1));i(this,W,new c.CSSProperty(this,"--sections-in-view",1));i(this,F,new c.CSSProperty(this,"--loop",!1));i(this,Mt,new c.CSSProperty(this,"--damping",20));i(this,At,new c.CSSProperty(this,"--mass",0));i(this,Bt,new c.CSSProperty(this,"--stiffness",0));i(this,_t,new c.CSSProperty(this,"--mouse-drag",!1));i(this,re,new c.CSSProperty(this,"--section-distance-scale",.5));i(this,U,new c.CSSProperty(this,"--autoplay",0));i(this,Ht,new c.CSSProperty(this,"--autoplay-pause-duration",0));i(this,bt,new c.CSSProperty(this,"--autoplay-user-direction",!1));i(this,G,new c.CSSProperty(this,"--classes",0));i(this,mt,new c.CSSProperty(this,"--current-index-start-offset",0));i(this,X,new c.CSSProperty(this,"--current-index-end-offset",0));i(this,gt,new c.CSSProperty(this,"--focus-delay",0));i(this,$t,new c.CSSProperty(this,"--focus-duration",3e3));i(this,Wt,new c.CSSProperty(this,"--disabled",!1));i(this,Ut,new c.CSSProperty(this,"--hibernated",!1));i(this,p,null);i(this,Ce,null);i(this,l,[]);i(this,ve,0);i(this,Pe,0);i(this,v,0);i(this,m,0);i(this,O,0);i(this,K,null);i(this,yt,null);i(this,Y,null);i(this,x,null);i(this,g,new Dt.Store(0));i(this,he,0);i(this,Ct,0);i(this,Gt,!0);i(this,Kt,!0);i(this,ne,void 0);i(this,tt,new _s.Tweened);i(this,q,()=>{t(this,a).unlistenAnimationFrame();const s=this.currentScrollValue/t(this,m)||0,e=t(this,g).current;if(r(this,ve,this.vertical?Rt.getCumulativeOffsetTop(this):Rt.getCumulativeOffsetLeft(this)),r(this,Pe,this.vertical?Rt.getCumulativeOffsetTop(t(this,p)):Rt.getCumulativeOffsetLeft(t(this,p))),r(this,v,this.vertical?this.offsetHeight:this.offsetWidth),this.vertical?r(this,O,fs.cssUnitParser.parse(getComputedStyle(t(this,p)).rowGap)):r(this,O,fs.cssUnitParser.parse(getComputedStyle(t(this,p)).columnGap)),t(this,pt).current&&t(this,l).length){const h=t(this,W).current,u=(t(this,v)-t(this,O)*(h-1))/h;t(this,l).forEach(b=>{b.setSize(u)})}else t(this,l).forEach(h=>{h.setSize()});if(t(this,l).forEach(h=>{h.resize()}),t(this,J).current){r(this,m,t(this,v)*t(this,J).current);const h=t(this,m)+t(this,v);this.vertical?(t(this,p).style.width=h+"px",t(this,p).style.height="100%"):(t(this,p).style.height=h+"px",t(this,p).style.width="100%")}else this.vertical?(t(this,p).style.width="100%",t(this,p).style.height="max-content",r(this,m,t(this,p).offsetHeight-t(this,v))):(t(this,p).style.width="max-content",t(this,p).style.height="100%",r(this,m,t(this,p).offsetWidth-t(this,v)));if(!t(this,F).current){const h=getComputedStyle(this),u=this.vertical?parseFloat(h.paddingBlockStart)+parseFloat(h.paddingBlockEnd):parseFloat(h.paddingInlineStart)+parseFloat(h.paddingInlineEnd);r(this,m,t(this,m)+u),t(this,a).max=t(this,m)}if(t(this,F).current&&t(this,l).length){const h=t(this,l)[t(this,l).length-1],u=h.position+h.size-t(this,v),b=t(this,m)-u;r(this,Ct,h.position+h.size+b)}else r(this,Ct,t(this,m));if(t(this,Q).current&&t(this,l).length){const h=t(this,l)[e];t(this,a).set(h.position,{equalize:!0})}else t(this,a).set(s*t(this,m),{equalize:!0})});i(this,ze,()=>{const s=this.currentScrollValue;if(r(this,he,Math.max(0,s-t(this,m))),t(this,l).length){let e=0;for(let h=0;h<t(this,l).length;h++){const u=t(this,l)[h];u.transform(),this.targetScrollValue+u.size/2>=u.position&&(e=h)}t(this,g).current=e}else this.vertical?t(this,p).style.transform=`translate3d(0px, ${s*-1}px, 0px)`:t(this,p).style.transform=`translate3d(${s*-1}px, 0px, 0px)`;ee.scrollEntries.update(this,t(this,V).current,s)});i(this,oe,(s,e)=>{t(this,Tt).current&&(t(this,bt).current&&(t(this,x).pauseAndContinue(t(this,Ht).current),t(this,x).direction=Math.sign(e)||1),t(this,Ve).call(this,s,e))});i(this,Ve,(s,e)=>{if(t(this,j).current){if(t(this,j).current<0&&e>0)return;if(t(this,j).current>0&&e<0)return}if(t(this,tt).unlistenAnimationFrame(),!t(this,U).current&&t(this,gt).current&&(clearInterval(t(this,ne)),r(this,ne,setTimeout(()=>{const h=o(this,ke,os).call(this);h&&this.scrollToSection(h.index,{tween:{duration:t(this,$t).current,easing:Bs.easeInOutExpo}})},t(this,gt).current))),!(s==="drag"&&!Hs.device.isMobile&&!t(this,_t).current))if(t(this,Q).current){const h=Math.sign(e);t(this,l).length?this.shiftSections(h):t(this,a).shift(h*t(this,v))}else t(this,a).shift(e)});ls.isBrowser&&(r(this,a,new ms.Damped(0,{damping:.01,min:0,order:ge.TICK_ORDER.SCROLL})),this.attachShadow({mode:"open"}).adoptedStyleSheets.push(Gs),H.element(this,{tabIndex:0,children:[H.div({class:"static",children:[H.slot({name:"static"})]}),H.div({class:"content",children:[H.slot({ref:e=>r(this,Ce,e)})],style:{flexDirection:new As.Derived(t(this,V),e=>e==="x"?"row":"column")},ref:e=>r(this,p,e)})]}),r(this,K,new $e.WheelControls({element:t(this,p)})),t(this,K).changeEvent.subscribe(t(this,oe)),r(this,yt,new $e.KeyboardControls({element:this})),t(this,yt).changeEvent.subscribe(t(this,oe)),r(this,Y,new $e.DragControls({element:t(this,p)})),t(this,Y).changeEvent.subscribe(t(this,oe)),r(this,x,new $e.AutoplayControls({culling:this})),t(this,x).changeEvent.subscribe(t(this,Ve)),t(this,V).subscribe(({current:e})=>{t(this,p).style.flexDirection=e==="x"?"row":"column",t(this,K).axis=t(this,ft).current?"max":e,t(this,yt).dimension=e==="x"?"width":"height",t(this,Y).axis=e,e==="x"?this.style.touchAction="pan-y":e==="y"&&(this.style.touchAction="pan-x"),this.isConnected&&t(this,q).call(this)}),t(this,ft).subscribe(e=>{t(this,K).axis=e.current?"max":t(this,V).current}),t(this,J).subscribe(()=>{this.isConnected&&t(this,q).call(this)}),t(this,$).subscribe(({current:e})=>{this.isConnected&&(e?o(this,Nt,me).call(this):o(this,vt,ie).call(this))}),t(this,Q).subscribe(e=>{t(this,K).debounce=e.current,t(this,Y).swipe=e.current,t(this,x).interval=e.current,this.isConnected&&(e.current&&!e.previous&&!t(this,l).length?o(this,Nt,me).call(this):!e.current&&e.previous&&t(this,l).length&&o(this,vt,ie).call(this))}),t(this,pt).subscribe(e=>{this.isConnected&&(t(this,q).call(this),e.current&&!e.previous&&!t(this,l).length?o(this,Nt,me).call(this):!e.current&&e.previous&&t(this,l).length&&o(this,vt,ie).call(this))}),t(this,W).subscribe(e=>{this.isConnected&&(t(this,q).call(this),o(this,et,Ot).call(this))}),t(this,F).subscribe(e=>{e.current?(this.isConnected&&(t(this,l).length||(t(this,$).current=!0)),t(this,l).length&&(t(this,a).max=1/0,t(this,a).min=-1/0)):(r(this,he,0),t(this,a).max=t(this,m),t(this,a).min=0)}),t(this,Mt).subscribe(e=>{t(this,a).damping=e.current}),t(this,At).subscribe(e=>{t(this,a).mass=e.current}),t(this,Bt).subscribe(e=>{t(this,a).stiffness=e.current}),t(this,Wt).subscribe(e=>{e.current&&!e.previous?o(this,we,ss).call(this):!e.current&&e.previous&&o(this,Ee,is).call(this)}),t(this,Ut).subscribe(e=>{e.current&&!e.previous?o(this,xe,rs).call(this):!e.current&&e.previous&&o(this,Le,hs).call(this)}),t(this,U).subscribe(e=>{t(this,x).speed=e.current,e.current&&!e.previous?t(this,x).connect():!e.current&&e.previous&&t(this,x).disconnect()}),t(this,bt).subscribe(e=>{e.current||(t(this,x).direction=1)}),t(this,G).subscribe(e=>{this.isConnected&&o(this,et,Ot).call(this)}),t(this,mt).subscribe(e=>{this.isConnected&&t(this,G).current&&o(this,et,Ot).call(this)}),t(this,X).subscribe(e=>{this.isConnected&&t(this,G).current&&o(this,et,Ot).call(this)}),t(this,a).isRunning.subscribe(e=>{this.classList.toggle("active",e.current)}),t(this,g).subscribe(e=>{t(this,l).length&&o(this,et,Ot).call(this)}),t(this,tt).subscribe(e=>{t(this,tt).isRunning.current&&t(this,a).set(e.current)}))}get damped(){return t(this,a)}get controlsCSSProperty(){return t(this,Tt)}get axisCSSProperty(){return t(this,V)}get directionCSSProperty(){return t(this,j)}get pagesCSSProperty(){return t(this,J)}get splitCSSProperty(){return t(this,$)}get sectionalCSSProperty(){return t(this,Q)}get autoSizeCSSProperty(){return t(this,pt)}get wheelMaxDeltaCSSProperty(){return t(this,ft)}get sectionsInViewCSSProperty(){return t(this,W)}get loopCSSProperty(){return t(this,F)}get dampingCSSProperty(){return t(this,Mt)}get massCSSProperty(){return t(this,At)}get stiffnessCSSProperty(){return t(this,Bt)}get mouseDragCSSProperty(){return t(this,_t)}get sectionDistanceScaleCSSProperty(){return t(this,re)}get autoplayCSSProperty(){return t(this,U)}get autoplayPauseDurationCSSProperty(){return t(this,Ht)}get autoplayUserDirectionCSSProperty(){return t(this,bt)}get classesCSSProperty(){return t(this,G)}get currentIndexStartOffsetCSSProperty(){return t(this,mt)}get currentIndexEndOffsetCSSProperty(){return t(this,X)}get focusDelayCSSProperty(){return t(this,gt)}get focusDurationCSSProperty(){return t(this,$t)}get disabledCSSProperty(){return t(this,Wt)}get hibernatedCSSProperty(){return t(this,Ut)}get currentScrollValue(){return o(this,Fe,ns).call(this,"current")}get targetScrollValue(){return o(this,Fe,ns).call(this,"target")}get contentElement(){return t(this,p)}get sections(){return t(this,l)}get position(){return t(this,ve)}get contentPosition(){return t(this,Pe)}get viewportSize(){return t(this,v)}get scrollSize(){return t(this,m)}get gap(){return t(this,O)}get counter(){return t(this,g)}get limit(){return t(this,l).length-t(this,W).current}get distance(){return t(this,Ct)}get loopDistance(){return t(this,F).current?t(this,Ct)+t(this,O):t(this,Ct)}get overscroll(){return t(this,he)}get vertical(){return t(this,V).current==="y"}get currentProgress(){return this.currentScrollValue/this.loopDistance||0}get targetProgress(){return this.targetScrollValue/this.loopDistance||0}get scrollWidth(){return t(this,V).current==="y"?0:t(this,a).distance}get scrollHeight(){return t(this,V).current==="x"?0:t(this,a).distance}onScroll(...s){return t(this,a).subscribe(...s)}offScroll(...s){t(this,a).unsubscribe(...s)}range(s,e,h=0){const u=s-h,b=u+e+h*2;return this.currentProgress<u?0:this.currentProgress>b?1:(this.currentProgress-u)/(b-u)}curve(s,e,h=0){return Math.sin(this.range(s,e,h)*Math.PI)}visible(s,e,h=0){const u=s-h,b=u+e+h*2;return this.currentProgress>=u&&this.currentProgress<=b}scrollToSection(s,e){if(!t(this,l).length)return;const h=t(this,g).current;o(this,Ge,ys).call(this,s);const u=t(this,l)[h],b=t(this,l)[t(this,g).current];if(u&&b){let D=0;const se=o(this,ke,os).call(this),qs=se?this.targetScrollValue-se.position:0;t(this,F).current?t(this,g).current===0&&h===t(this,l).length-1?D=t(this,m)+t(this,v)-u.position+t(this,O):t(this,g).current===t(this,l).length-1&&h===0?D=b.position-(t(this,m)+t(this,v)+t(this,O)):D=b.position-u.position:D=b.position-u.position,this.shiftPosition(D-qs,e)}}shiftSections(s,e){t(this,l).length&&this.scrollToSection(t(this,g).current+s,e)}setPosition(s,e){e!=null&&e.tween?(t(this,tt).set(t(this,a).current,{equalize:!0}),t(this,tt).set(s,ps({},e.tween))):t(this,a).set(s,{equalize:(e==null?void 0:e.behaviour)==="instant"})}shiftPosition(s,e){this.setPosition(t(this,a).target+s,e)}connectedCallback(){t(this,Tt).observe(),t(this,V).observe(),t(this,j).observe(),t(this,J).observe(),t(this,$).observe(),t(this,Q).observe(),t(this,pt).observe(),t(this,ft).observe(),t(this,W).observe(),t(this,F).observe(),t(this,Mt).observe(),t(this,At).observe(),t(this,Bt).observe(),t(this,_t).observe(),t(this,re).observe(),t(this,U).observe(),t(this,U).observe(),t(this,Ht).observe(),t(this,bt).observe(),t(this,G).observe(),t(this,mt).observe(),t(this,X).observe(),t(this,gt).observe(),t(this,$t).observe(),t(this,Wt).observe(),t(this,Ut).observe(),o(this,Le,hs).call(this)}disconnectedCallback(){t(this,Tt).unobserve(),t(this,V).unobserve(),t(this,j).unobserve(),t(this,J).unobserve(),t(this,$).unobserve(),t(this,Q).unobserve(),t(this,pt).unobserve(),t(this,ft).unobserve(),t(this,W).unobserve(),t(this,F).unobserve(),t(this,Mt).unobserve(),t(this,At).unobserve(),t(this,Bt).unobserve(),t(this,_t).unobserve(),t(this,re).unobserve(),t(this,U).unobserve(),t(this,Ht).unobserve(),t(this,bt).unobserve(),t(this,G).unobserve(),t(this,mt).unobserve(),t(this,X).unobserve(),t(this,gt).unobserve(),t(this,$t).unobserve(),t(this,Wt).unobserve(),t(this,Ut).unobserve(),o(this,xe,rs).call(this)}}a=new WeakMap,Tt=new WeakMap,V=new WeakMap,j=new WeakMap,J=new WeakMap,$=new WeakMap,Q=new WeakMap,pt=new WeakMap,ft=new WeakMap,W=new WeakMap,F=new WeakMap,Mt=new WeakMap,At=new WeakMap,Bt=new WeakMap,_t=new WeakMap,re=new WeakMap,U=new WeakMap,Ht=new WeakMap,bt=new WeakMap,G=new WeakMap,mt=new WeakMap,X=new WeakMap,gt=new WeakMap,$t=new WeakMap,Wt=new WeakMap,Ut=new WeakMap,p=new WeakMap,Ce=new WeakMap,l=new WeakMap,ve=new WeakMap,Pe=new WeakMap,v=new WeakMap,m=new WeakMap,O=new WeakMap,K=new WeakMap,yt=new WeakMap,Y=new WeakMap,x=new WeakMap,g=new WeakMap,he=new WeakMap,Ct=new WeakMap,Gt=new WeakMap,Kt=new WeakMap,ne=new WeakMap,tt=new WeakMap,Nt=new WeakSet,me=function(){o(this,vt,ie).call(this),t(this,Ce).assignedElements().forEach((s,e)=>{s instanceof HTMLElement&&t(this,l).push(new Us(s,e,this))}),t(this,p).style.transform="",this.dispatchEvent(new CustomEvent("sectionsChange",{composed:!0})),t(this,q).call(this),o(this,et,Ot).call(this)},vt=new WeakSet,ie=function(){t(this,l).forEach(s=>{s.destroy()}),r(this,l,[]),t(this,g).current=0,t(this,a).reset(),this.dispatchEvent(new CustomEvent("sectionsChange",{composed:!0}))},we=new WeakSet,ss=function(){t(this,Gt)||(r(this,Gt,!0),t(this,a).unsubscribe(t(this,ze)),t(this,a).unlistenAnimationFrame(),t(this,K).disconnect(),t(this,yt).disconnect(),t(this,Y).disconnect(),t(this,x).disconnect(),clearInterval(t(this,ne)),t(this,tt).unlistenAnimationFrame())},Ee=new WeakSet,is=function(){t(this,Gt)&&(r(this,Gt,!1),t(this,a).subscribe(t(this,ze)),t(this,K).connect(),t(this,yt).connect(),t(this,Y).connect(),t(this,U).current&&t(this,x).connect())},xe=new WeakSet,rs=function(){t(this,Kt)||(r(this,Kt,!0),be.windowResizer.unsubscribe(t(this,q)),We.elementResizer.unsubscribe(t(this,q)),t(this,a).reset(),o(this,we,ss).call(this),t(this,p).style.transform="",t(this,$).current&&o(this,vt,ie).call(this),ee.scrollEntries.unregister(this))},Le=new WeakSet,hs=function(){t(this,Kt)&&(r(this,Kt,!1),t(this,$).current&&o(this,Nt,me).call(this),ee.scrollEntries.register(this),be.windowResizer.subscribe(t(this,q),ge.RESIZE_ORDER.SCROLL),We.elementResizer.subscribe(this,t(this,q)),o(this,Ee,is).call(this))},q=new WeakMap,ze=new WeakMap,Ge=new WeakSet,ys=function(s){t(this,F).current?(t(this,g).current=s%t(this,l).length,t(this,g).current=t(this,g).current<0?t(this,l).length+t(this,g).current:t(this,g).current):t(this,g).current=us.clamp(s,0,this.limit)},oe=new WeakMap,Ve=new WeakMap,Fe=new WeakSet,ns=function(s="current"){if(t(this,F).current&&t(this,l).length){const e=t(this,a)[s]%(t(this,m)+t(this,v)+t(this,O));return e<0?t(this,m)+e+t(this,v)+t(this,O):e}else return t(this,a)[s]},et=new WeakSet,Ot=function(){if(t(this,G).current&&t(this,l).length){const s=t(this,g).current+t(this,mt).current;s===0?this.classList.add("start"):this.classList.remove("start"),s===this.limit?this.classList.add("end"):this.classList.remove("end");const e=t(this,W).current+t(this,X).current;t(this,l).forEach((h,u)=>{const b=s-this.limit-1+t(this,X).current,D=s+e,se=this.sections.length-D;u>=s&&u<D||u<=b?h.mark("current"):u>=D&&u<D+se/2||u<=b+e?h.mark("next"):h.mark("previous")})}},ke=new WeakSet,os=function(){let s=null,e=1/0;for(let h=0;h<t(this,l).length;h++){const u=Math.abs(t(this,l)[h].position-this.targetScrollValue);u<e&&(e=u,s=h)}return s!==null?t(this,l)[s]:null};customElements.get("e-scroll")||customElements.define("e-scroll",Ue);var Re;class ts extends HTMLElement{constructor(){super(...arguments);i(this,Re,null)}get scrollElement(){return t(this,Re)}connectedCallback(){const s=Ws.findParentElement(this,Ue);s instanceof Ue?r(this,Re,s):console.error(this,"e-scroll not found")}}Re=new WeakMap;const Ks=as.createStylesheet({":host":{display:"inline-block",zIndex:"1",backgroundColor:bs.aptechkaTheme.colorFont.var},':host([axis="y"])':{position:"absolute",right:"0",top:"0",width:"1vmin",height:"100%"},':host([axis="x"])':{position:"absolute",left:"0",bottom:"0",width:"100%",height:"1vmin"},".default-thumb":{backgroundColor:bs.aptechkaTheme.colorMain.var,borderRadius:"1vmin",touchAction:"none"},"::slotted(*)":{touchAction:"none"}});var ce,k,st,it,le,ue,Zt,De,Oe,qe;class Cs extends ts{constructor(){super();i(this,ce,null);i(this,k,null);i(this,st,!1);i(this,it,0);i(this,le,0);i(this,ue,0);i(this,Zt,()=>{r(this,st,this.offsetWidth>this.offsetHeight);const s=t(this,st)?this.offsetWidth:this.offsetHeight;r(this,it,s/((this.scrollElement.scrollSize+this.scrollElement.viewportSize)/s)),r(this,it,Math.max(t(this,it),30)),t(this,st)?(t(this,k).style.width=t(this,it)+"px",t(this,k).style.height="100%"):(t(this,k).style.width="100%",t(this,k).style.height=t(this,it)+"px"),r(this,le,s-t(this,it)),this.scrollElement.scrollSize||(this.style.display="none")});i(this,De,()=>{r(this,ue,this.scrollElement.currentProgress*t(this,le)),t(this,st)?t(this,k).style.transform=`translate3d(${t(this,ue)}px, 0px, 0px)`:t(this,k).style.transform=`translate3d(0px, ${t(this,ue)}px, 0px)`});i(this,Oe,()=>{this.setAttribute("axis",this.scrollElement.axisCSSProperty.current)});i(this,qe,s=>{document.documentElement.classList.add("grabbing"),$s.setupDrag(u=>{const b=t(this,st)?u.x:u.y,D=this.scrollElement.distance/t(this,le),se=(b-h)*D;this.scrollElement.setPosition(e+se)},()=>{document.documentElement.classList.remove("grabbing")});const e=this.scrollElement.targetScrollValue,h=t(this,st)?s.x:s.y});ls.isBrowser&&(this.attachShadow({mode:"open"}).adoptedStyleSheets.push(Ks),H.element(this,{slot:"static","drag-dead-zone":"",children:[H.slot({ref:e=>r(this,ce,e),children:H.div({class:"default-thumb"})})]}))}get thumbElement(){return t(this,k)}connectedCallback(){super.connectedCallback();const s=t(this,ce).assignedElements()[0]||t(this,ce).firstElementChild;r(this,k,s),t(this,k).addEventListener("pointerdown",t(this,qe)),be.windowResizer.subscribe(t(this,Zt),ge.RESIZE_ORDER.SCROLL+1),We.elementResizer.subscribe(this,t(this,Zt)),this.scrollElement.onScroll(t(this,De)),this.scrollElement.axisCSSProperty.subscribe(t(this,Oe))}disconnectedCallback(){t(this,k).removeEventListener("pointerdown",t(this,qe)),be.windowResizer.unsubscribe(t(this,Zt)),We.elementResizer.unsubscribe(t(this,Zt)),this.scrollElement.offScroll(t(this,De)),this.scrollElement.axisCSSProperty.unsubscribe(t(this,Oe))}}ce=new WeakMap,k=new WeakMap,st=new WeakMap,it=new WeakMap,le=new WeakMap,ue=new WeakMap,Zt=new WeakMap,De=new WeakMap,Oe=new WeakMap,qe=new WeakMap;customElements.get("e-scrollbar")||customElements.define("e-scrollbar",Cs);const Ns=as.createStylesheet({button:{all:"inherit"}});class vs extends ts{constructor(){super(),this.attachShadow({mode:"open"}).adoptedStyleSheets.push(Ns),ls.isBrowser&&H.element(this,{children:[H.button({onClick:()=>{this.handleClick()},children:[H.slot()]})]})}}class Ps extends vs{handleClick(){const n=this.getAttribute("index"),s=this.getAttribute("behaviour");this.scrollElement.scrollToSection(parseInt(n||"0"),{behaviour:s})}}customElements.get("e-scroll-set-button")||customElements.define("e-scroll-set-button",Ps);class ws extends vs{handleClick(){const n=this.getAttribute("step"),s=this.getAttribute("behaviour");this.scrollElement.shiftSections(parseInt(n||"1"),{behaviour:s})}}customElements.get("e-scroll-step-button")||customElements.define("e-scroll-step-button",ws);var rt,Pt,ae,Ie,Te,Se;class Zs{constructor(n,s,e){i(this,rt,void 0);i(this,Pt,void 0);i(this,ae,void 0);i(this,Ie,void 0);i(this,Te,()=>{t(this,Pt).scrollToSection(t(this,ae),{behaviour:t(this,Ie)})});i(this,Se,()=>{t(this,rt).classList.toggle("current",t(this,Pt).counter.current===t(this,ae))});r(this,rt,document.createElement("button")),r(this,Pt,n),r(this,Ie,e),r(this,ae,s),t(this,rt).addEventListener("click",t(this,Te)),t(this,Pt).counter.subscribe(t(this,Se)),t(this,Se).call(this)}get element(){return t(this,rt)}destroy(){t(this,rt).removeEventListener("click",t(this,Te)),t(this,Pt).counter.unsubscribe(t(this,Se)),t(this,rt).remove()}}rt=new WeakMap,Pt=new WeakMap,ae=new WeakMap,Ie=new WeakMap,Te=new WeakMap,Se=new WeakMap;var wt,de;class Es extends ts{constructor(){super(...arguments);i(this,wt,[]);i(this,de,gs.debounce(()=>{t(this,wt).forEach(s=>s.destroy()),r(this,wt,[]);for(let s=0;s<this.scrollElement.sections.length;s++){const e=new Zs(this.scrollElement,s,this.getAttribute("behaviour")||"smooth");this.appendChild(e.element),t(this,wt).push(e)}},0))}connectedCallback(){super.connectedCallback(),this.scrollElement.addEventListener("sectionsChange",t(this,de)),t(this,de).call(this)}disconnectedCallback(){this.scrollElement.removeEventListener("sectionsChange",t(this,de)),t(this,wt).forEach(s=>s.destroy()),r(this,wt,[])}}wt=new WeakMap,de=new WeakMap;customElements.get("e-scroll-bullet-buttons")||customElements.define("e-scroll-bullet-buttons",Es);var jt,Jt,Qt,Xt,Et,xt,Lt,zt,L,I,T,M,Vt,P,ht,nt,ot,ct,lt,w,A,B,ut,at,N,Me,d,Yt,te,Ae,E,Ft,R,z,_,pe,kt,C,Ke,Ls,Ne,zs,Ze,Vs,je,Fs,Je,ks,Qe,Rs,Be,fe,St,qt,Xe,Ds,Ye,Os,_e,cs,He;class xs extends ts{constructor(){super();i(this,Ke);i(this,Ne);i(this,Ze);i(this,je);i(this,Je);i(this,Qe);i(this,St);i(this,Xe);i(this,Ye);i(this,_e);i(this,jt,new c.CSSProperty(this,"--damping",20));i(this,Jt,new c.CSSProperty(this,"--mass",0));i(this,Qt,new c.CSSProperty(this,"--stiffness",0));i(this,Xt,new c.CSSProperty(this,"--target",""));i(this,Et,new c.CSSProperty(this,"--disabled",!1));i(this,xt,new c.CSSProperty(this,"--distance-offset",0,{rawValueCheck:!1}));i(this,Lt,new c.CSSProperty(this,"--start-offset",0,{rawValueCheck:!1}));i(this,zt,new c.CSSProperty(this,"--capture-once",!1));i(this,L,new c.CSSProperty(this,"--captured",""));i(this,I,new c.CSSProperty(this,"--released",""));i(this,T,new c.CSSProperty(this,"--captured-from-start",""));i(this,M,new c.CSSProperty(this,"--captured-from-finish",""));i(this,Vt,new c.CSSProperty(this,"--released-from-start",""));i(this,P,new c.CSSProperty(this,"--released-from-finish",""));i(this,ht,new c.CSSProperty(this,"--passed-var",""));i(this,nt,new c.CSSProperty(this,"--progress-var",""));i(this,ot,new c.CSSProperty(this,"--distance-var",""));i(this,ct,new c.CSSProperty(this,"--start-var",""));i(this,lt,new c.CSSProperty(this,"--finish-var",""));i(this,w,new Dt.Store(!1));i(this,A,new Dt.Store(!1));i(this,B,new Dt.Store(!1));i(this,ut,new Dt.Store(!1));i(this,at,new Dt.Store(!1));i(this,N,new Dt.Store(!1));i(this,Me,[]);i(this,d,this);i(this,Yt,0);i(this,te,0);i(this,Ae,0);i(this,E,new ms.Damped(0,{order:ge.TICK_ORDER.SCROLL-1,min:0,max:1}));i(this,Ft,0);i(this,R,0);i(this,z,0);i(this,_,0);i(this,pe,!1);i(this,kt,!1);i(this,C,!0);i(this,Be,()=>{t(this,C)||(this.resize(),t(this,fe).call(this))});i(this,fe,()=>{!t(this,C)&&t(this,pe)&&this.tick()});i(this,He,gs.debounce(()=>{const s=ee.scrollEntries.getAll(this).reverse();let e=0;s.forEach((h,u)=>{h.element===this.scrollElement&&(e=u)}),r(this,Me,s.slice(e+1))},0))}get distanceOffsetCSSProperty(){return t(this,xt)}get startOffsetCSSProperty(){return t(this,Lt)}get captureOnceCSSProperty(){return t(this,zt)}get capturedCSSProperty(){return t(this,L)}get releasedCSSProperty(){return t(this,I)}get capturedFromStartCSSProperty(){return t(this,T)}get capturedFromFinishCSSProperty(){return t(this,M)}get releasedFromStartCSSProperty(){return t(this,Vt)}get releasedFromFinishCSSProperty(){return t(this,P)}get passedVarCSSProperty(){return t(this,ht)}get progressVarCSSProperty(){return t(this,nt)}get distanceVarCSSProperty(){return t(this,ot)}get startVarCSSProperty(){return t(this,ct)}get finishVarCSSProperty(){return t(this,lt)}get disabledCSSProperty(){return t(this,Et)}get dampingCSSProperty(){return t(this,jt)}get massCSSProperty(){return t(this,Jt)}get stiffnessCSSProperty(){return t(this,Qt)}get targetCSSProperty(){return t(this,Xt)}get isCaptured(){return t(this,w)}get isReleased(){return t(this,A)}get isCapturedFromStart(){return t(this,B)}get isReleasedFromStart(){return t(this,ut)}get isCapturedFromFinish(){return t(this,at)}get isReleasedFromFinish(){return t(this,N)}get directionPosition(){return t(this,Yt)}get directionSize(){return t(this,te)}get passed(){return t(this,E)}get progress(){return t(this,Ft)}get start(){return t(this,R)}get finish(){return t(this,_)}get distance(){return t(this,z)}get isCapturedOnce(){return t(this,kt)}get isDisabled(){return t(this,C)}resize(){r(this,te,this.scrollElement.vertical?this.offsetHeight:this.offsetWidth),r(this,Yt,this.scrollElement.vertical?Rt.getCumulativeOffsetTop(this,this.scrollElement):Rt.getCumulativeOffsetLeft(this,this.scrollElement)),r(this,R,this.getStart()),r(this,z,this.getDistance()),r(this,R,t(this,R)+t(this,Lt).current),r(this,z,t(this,z)+t(this,xt).current),r(this,_,t(this,R)+t(this,z)),this.scrollElement.currentScrollValue>t(this,_)&&!t(this,w).current&&!t(this,A).current&&(t(this,w).current=!0),this.setVar(t(this,ct).current,t(this,R)),this.setVar(t(this,lt).current,t(this,_)),this.setVar(t(this,ot).current,t(this,z)),t(this,E).max=t(this,z),r(this,pe,!0)}tick(){let s=this.scrollElement.currentScrollValue;t(this,Me).forEach(h=>{s+=h.value}),t(this,E).set(s-t(this,R));const e=Math.round(s);t(this,w).current&&(e>t(this,R)?t(this,B).current||o(this,Ze,Vs).call(this):t(this,B).current&&!t(this,ut).current&&o(this,Je,ks).call(this),e<t(this,_)?t(this,N).current&&!t(this,at).current&&o(this,je,Fs).call(this):t(this,B).current&&!t(this,N).current&&o(this,Qe,Rs).call(this)),e>t(this,R)&&e<t(this,_)?t(this,w).current||o(this,Ke,Ls).call(this):t(this,w).current&&(t(this,E).set(us.step(t(this,z)/2,t(this,E).current,0,t(this,z))),o(this,Ne,zs).call(this)),t(this,kt)&&t(this,zt).current&&(t(this,L).current&&t(this,d).classList.add(t(this,L).current),r(this,C,!0))}disable(){this.style.cssText="",r(this,Yt,0),r(this,te,0),t(this,E).reset(),r(this,Ft,0),r(this,R,0),r(this,z,0),r(this,_,0),r(this,pe,!1),t(this,w).current=!1,t(this,A).current=!1,t(this,B).current=!1,t(this,ut).current=!1,t(this,at).current=!1,t(this,N).current=!1,r(this,kt,!1),r(this,C,!0),o(this,_e,cs).call(this)}enable(){r(this,C,!1)}connectedCallback(){super.connectedCallback(),t(this,jt).observe(),t(this,Jt).observe(),t(this,Qt).observe(),t(this,Xt).observe(),t(this,Et).observe(),t(this,xt).observe(),t(this,Lt).observe(),t(this,zt).observe(),t(this,L).observe(),t(this,I).observe(),t(this,T).observe(),t(this,M).observe(),t(this,Vt).observe(),t(this,P).observe(),t(this,ht).observe(),t(this,nt).observe(),t(this,ot).observe(),t(this,ct).observe(),t(this,lt).observe();let s=!1;this.scrollElement.addEventListener("sectionsChange",t(this,He)),t(this,He).call(this),t(this,Et).current||this.enable(),t(this,jt).subscribe(e=>{t(this,E).damping=e.current}),t(this,Jt).subscribe(e=>{t(this,E).mass=e.current}),t(this,Qt).subscribe(e=>{t(this,E).stiffness=e.current}),t(this,Xt).subscribe(e=>{e.previous&&o(this,_e,cs).call(this),e.current?e.current==="parent"?r(this,d,this.parentElement||this):r(this,d,document.querySelector(e.current)||this):r(this,d,this)}),t(this,Et).subscribe(e=>{e.current&&!e.previous?this.disable():!e.current&&e.previous&&(this.resize(),this.enable())}),t(this,Lt).subscribe(()=>{s&&!t(this,C)&&this.resize()}),t(this,xt).subscribe(()=>{s&&!t(this,C)&&this.resize()}),t(this,L).subscribe(e=>{o(this,St,qt).call(this,e)}),t(this,T).subscribe(e=>{o(this,St,qt).call(this,e)}),t(this,M).subscribe(e=>{o(this,St,qt).call(this,e)}),t(this,I).subscribe(e=>{o(this,St,qt).call(this,e)}),t(this,Vt).subscribe(e=>{o(this,St,qt).call(this,e)}),t(this,P).subscribe(e=>{o(this,St,qt).call(this,e)}),t(this,zt).subscribe(e=>{t(this,C)||!e.current&&e.previous&&(this.resize(),this.enable())}),t(this,ht).subscribe(e=>{t(this,C)||(this.removeVar(e.previous),this.setVar(e.current,this.passed.current))}),t(this,nt).subscribe(e=>{t(this,C)||(this.removeVar(e.previous),this.setVar(e.current,t(this,Ft)))}),t(this,ct).subscribe(e=>{t(this,C)||(this.removeVar(e.previous),this.setVar(e.current,t(this,R)))}),t(this,lt).subscribe(e=>{t(this,C)||(this.removeVar(e.previous),this.setVar(e.current,t(this,_)))}),t(this,ot).subscribe(e=>{t(this,C)||(this.removeVar(e.previous),this.setVar(e.current,t(this,z)))}),t(this,E).subscribe(e=>{r(this,Ft,t(this,E).current/t(this,z)||0),this.setVar(t(this,ht).current,t(this,E).current.toFixed(6)),this.setVar(t(this,nt).current,t(this,Ft).toFixed(6))}),be.windowResizer.subscribe(t(this,Be),ge.RESIZE_ORDER.SEGMENT),this.scrollElement.onScroll(t(this,fe)),s=!0}disconnectedCallback(){be.windowResizer.unsubscribe(t(this,Be)),this.scrollElement.offScroll(t(this,fe)),t(this,jt).close(),t(this,Jt).close(),t(this,Qt).close(),t(this,Xt).close(),t(this,Et).close(),t(this,xt).close(),t(this,Lt).close(),t(this,zt).close(),t(this,L).close(),t(this,I).close(),t(this,T).close(),t(this,M).close(),t(this,Vt).close(),t(this,P).close(),t(this,ht).close(),t(this,nt).close(),t(this,ot).close(),t(this,ct).close(),t(this,lt).close(),t(this,w).close(),t(this,A).close(),t(this,B).close(),t(this,ut).close(),t(this,at).close(),t(this,N).close(),this.disable()}removeVar(s){s&&t(this,d).style.removeProperty(`--${s}`)}setVar(s,e){s&&t(this,d).style.setProperty(`--${s}`,e.toString())}getDistance(){return t(this,te)+t(this,Ae)}getStart(){return t(this,Yt)-t(this,Ae)}}jt=new WeakMap,Jt=new WeakMap,Qt=new WeakMap,Xt=new WeakMap,Et=new WeakMap,xt=new WeakMap,Lt=new WeakMap,zt=new WeakMap,L=new WeakMap,I=new WeakMap,T=new WeakMap,M=new WeakMap,Vt=new WeakMap,P=new WeakMap,ht=new WeakMap,nt=new WeakMap,ot=new WeakMap,ct=new WeakMap,lt=new WeakMap,w=new WeakMap,A=new WeakMap,B=new WeakMap,ut=new WeakMap,at=new WeakMap,N=new WeakMap,Me=new WeakMap,d=new WeakMap,Yt=new WeakMap,te=new WeakMap,Ae=new WeakMap,E=new WeakMap,Ft=new WeakMap,R=new WeakMap,z=new WeakMap,_=new WeakMap,pe=new WeakMap,kt=new WeakMap,C=new WeakMap,Ke=new WeakSet,Ls=function(){t(this,w).current=!0,t(this,A).current=!1,r(this,kt,!0),t(this,I).current&&t(this,d).classList.remove(t(this,I).current),t(this,P).current&&t(this,d).classList.remove(t(this,P).current),t(this,P).current&&t(this,d).classList.remove(t(this,P).current),t(this,L).current&&t(this,d).classList.add(t(this,L).current)},Ne=new WeakSet,zs=function(){t(this,A).current=!0,t(this,w).current=!1,r(this,kt,!0),t(this,L).current&&t(this,d).classList.remove(t(this,L).current),t(this,T).current&&t(this,d).classList.remove(t(this,T).current),t(this,M).current&&t(this,d).classList.remove(t(this,M).current),t(this,I).current&&t(this,d).classList.add(t(this,I).current)},Ze=new WeakSet,Vs=function(){t(this,w).current=!0,t(this,B).current=!0,t(this,ut).current=!1,t(this,T).current&&t(this,d).classList.add(t(this,T).current)},je=new WeakSet,Fs=function(){t(this,w).current=!0,t(this,at).current=!0,t(this,N).current=!1,t(this,M).current&&t(this,d).classList.add(t(this,M).current)},Je=new WeakSet,ks=function(){t(this,A).current=!0,t(this,ut).current=!0,t(this,B).current=!1,t(this,P).current&&t(this,d).classList.add(t(this,P).current)},Qe=new WeakSet,Rs=function(){t(this,A).current=!0,t(this,N).current=!0,t(this,at).current=!1,t(this,P).current&&t(this,d).classList.add(t(this,P).current)},Be=new WeakMap,fe=new WeakMap,St=new WeakSet,qt=function(s){if(t(this,C)){s.previous&&t(this,d).classList.remove(s.previous),s.current&&t(this,d).classList.remove(s.current);return}s.current&&t(this,w).current?(s.previous&&t(this,d).classList.remove(s.previous),t(this,d).classList.add(s.current)):!s.current&&s.previous&&t(this,d).classList.remove(s.previous)},Xe=new WeakSet,Ds=function(...s){s.forEach(e=>{e&&t(this,d).classList.remove(e)})},Ye=new WeakSet,Os=function(...s){s.forEach(e=>{e&&t(this,d).style.removeProperty(`--${e}`)})},_e=new WeakSet,cs=function(){o(this,Xe,Ds).call(this,t(this,L).current,t(this,T).current,t(this,M).current,t(this,I).current,t(this,Vt).current,t(this,P).current),o(this,Ye,Os).call(this,t(this,ht).current,t(this,nt).current,t(this,ot).current,t(this,ct).current,t(this,lt).current)},He=new WeakMap;customElements.get("e-scroll-segment")||customElements.define("e-scroll-segment",xs);exports.ScrollBulletButtonsElement=Es;exports.ScrollElement=Ue;exports.ScrollSegmentElement=xs;exports.ScrollSetButtonElement=Ps;exports.ScrollStepButtonElement=ws;exports.ScrollbarElement=Cs;
|
|
@@ -32,8 +32,8 @@ import { T as $e } from "../Tweened-CjgvoOwL.js";
|
|
|
32
32
|
import { WheelControls as Be, KeyboardControls as We, DragControls as qe, AutoplayControls as Ue } from "../controls/index.js";
|
|
33
33
|
import { windowResizer as ps } from "../window-resizer/index.js";
|
|
34
34
|
import { scrollEntries as Yt } from "../scroll-entries/index.js";
|
|
35
|
-
import { e as ae, D as te,
|
|
36
|
-
import { c as fe } from "../createStylesheet-
|
|
35
|
+
import { e as ae, D as te, ay as Ws, p as Ge } from "../tags-wG5k157g.js";
|
|
36
|
+
import { c as fe } from "../createStylesheet-DNG2b5X4.js";
|
|
37
37
|
import { cssUnitParser as me } from "../css-unit-parser/index.js";
|
|
38
38
|
import { CSSProperty as c } from "../css-property/index.js";
|
|
39
39
|
import { d as Ne } from "../Viewport-Cgtq2I_K.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../index-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../index-Ctct2GyP.cjs");exports.SelectElement=e.SelectElement;exports.SelectHeadElement=e.SelectHeadElement;exports.SelectOptionElement=e.SelectOptionElement;exports.SelectUserElement=e.SelectUserElement;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";var Te=Object.defineProperty,Ae=Object.defineProperties;var xe=Object.getOwnPropertyDescriptors;var de=Object.getOwnPropertySymbols;var qe=Object.prototype.hasOwnProperty,Me=Object.prototype.propertyIsEnumerable;var he=(e,t,i)=>t in e?Te(e,t,{enumerable:!0,configurable:!0,writable:!0,value:i}):e[t]=i,_=(e,t)=>{for(var i in t||(t={}))qe.call(t,i)&&he(e,i,t[i]);if(de)for(var i of de(t))Me.call(t,i)&&he(e,i,t[i]);return e},we=(e,t)=>Ae(e,xe(t));var O=(e,t,i)=>{if(!t.has(e))throw TypeError("Cannot "+i)};var o=(e,t,i)=>(O(e,t,"read from private field"),i?i.call(e):t.get(e)),a=(e,t,i)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,i)},g=(e,t,i,r)=>(O(e,t,"write to private field"),r?r.call(e,i):t.set(e,i),i);var c=(e,t,i)=>(O(e,t,"access private method"),i);const y=require("./Store-Cr3VaD9G.cjs"),me=require("./browser-CpzFX2xg.cjs"),pe=require("./object-CCiXnER2.cjs"),j=require("./string-DhgS_iFl.cjs"),De=require("./connector/index.cjs"),Fe=new Set(["animate","animateMotion","animateTransform","circle","clipPath","defs","desc","ellipse","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","filter","foreignObject","g","image","line","linearGradient","listener","marker","mask","metadata","mpath","path","pattern","polygon","polyline","radialGradient","rect","set","solidColor","stop","svg","switch","symbol","text","textPath","title","tspan","view","use"]);var u,w,d,v,m,p,B,be,R,ge,$,ye,k,ee,L,te,G,Se,V,Ee,W,Ce,z,Ne,T,ne,A,ie,J,ve,x,re,q,oe,I,ke,M,se,C,P,D,ue,F,ce,H,ae,K,U;const Y=class Y{constructor(...t){a(this,B);a(this,R);a(this,$);a(this,k);a(this,L);a(this,G);a(this,V);a(this,W);a(this,z);a(this,T);a(this,A);a(this,J);a(this,x);a(this,q);a(this,I);a(this,M);a(this,C);a(this,D);a(this,F);a(this,H);a(this,u,null);a(this,w,new Set);a(this,d,new Set);a(this,v,void 0);a(this,m,void 0);a(this,p,void 0);a(this,K,t=>{o(this,w).forEach(i=>{i(t)}),o(this,w).clear()});a(this,U,(t,i)=>{o(this,d).forEach(r=>{r(t,i)}),o(this,d).clear(),c(this,q,oe).call(this)});if(me.isBrowser){const i=t[0],r=t[1];g(this,u,c(this,B,be).call(this,i,r==null?void 0:r.forceSvg)),c(this,$,ye).call(this,r)}}get node(){return o(this,u)}set node(t){var i;c(this,q,oe).call(this),g(this,u,t),(i=o(this,v))==null||i.call(this),o(this,u)instanceof Element&&g(this,m,[...o(this,u).querySelectorAll("store-root")]),c(this,x,re).call(this),c(this,k,ee).call(this)}};u=new WeakMap,w=new WeakMap,d=new WeakMap,v=new WeakMap,m=new WeakMap,p=new WeakMap,B=new WeakSet,be=function(t,i){let r=null;if(t instanceof Node)r=t;else if(typeof t=="string")if(!t.includes("<")&&t.includes("-"))r=new(customElements.get(t));else if(t.includes("<")){const s=document.createElement("div");s.innerHTML=t,r=s.firstElementChild}else Fe.has(t)||i?r=document.createElementNS("http://www.w3.org/2000/svg",t):r=document.createElement(t);else r=document.createElement("div");return r},R=new WeakSet,ge=function(t){return t instanceof HTMLElement||t instanceof SVGElement},$=new WeakSet,ye=function(t){if(!t)return;const i=c(this,R,ge).call(this,o(this,u)),r=t.ref;delete t.ref,t!=null&&t.onConnect&&(o(this,w).add(t.onConnect),delete t.onConnect),t!=null&&t.onDisconnect&&(o(this,d).add(t.onDisconnect),delete t.onDisconnect);let s,f;for(const l in t){const h=t[l];l==="class"&&i?c(this,L,te).call(this,h):l==="style"&&i?c(this,W,Ce).call(this,h):l==="lightChildren"?c(this,C,P).call(this,o(this,u),h):l==="children"?c(this,C,P).call(this,o(this,u)instanceof Element?o(this,u).shadowRoot||o(this,u):o(this,u),h):l==="connectedClass"?o(this,w).add(()=>{requestAnimationFrame(()=>{o(this,u).classList.add(typeof h=="boolean"?"connected":h)})}):l.startsWith("on")?(f||(f={}),f[l]=h):(s||(s={}),s[l]=h)}c(this,I,ke).call(this,s),c(this,J,ve).call(this,f),r&&(typeof r=="function"?r(o(this,u)):r.current=o(this,u)),c(this,k,ee).call(this)},k=new WeakSet,ee=function(){if(me.isBrowser&&(o(this,d).size||o(this,w).size)){const t=o(this,u)instanceof DocumentFragment?o(this,u).firstChild:o(this,u);g(this,v,De.connector.subscribe(t,{connectCallback:o(this,K),disconnectCallback:o(this,U),unsubscribeAfterDisconnect:!0,maxWaitSec:20}))}},L=new WeakSet,te=function(t){if(t){if(typeof t=="string")o(this,u).classList.add(t);else if(Array.isArray(t))t.forEach(i=>{i&&c(this,L,te).call(this,i)});else if(typeof t=="object")if(t instanceof y.Store)c(this,G,Se).call(this,t);else for(const i in t){const r=t[i];r instanceof y.Store?c(this,V,Ee).call(this,i,r):r?o(this,u).classList.add(i):o(this,u).classList.remove(i)}}else return},G=new WeakSet,Se=function(t){o(this,d).add(t.subscribe(({current:i,previous:r})=>{r&&[r].flat().forEach(s=>{s&&o(this,u).classList.remove(s)}),i&&[i].flat().forEach(s=>{s&&o(this,u).classList.add(s)})}))},V=new WeakSet,Ee=function(t,i){o(this,d).add(i.subscribe(({current:r})=>{r?o(this,u).classList.add(t):o(this,u).classList.remove(t)}))},W=new WeakSet,Ce=function(t){if(!t)return;o(this,u).tagName==="style"||o(this,u).tagName==="STYLE"?c(this,T,ne).call(this,t):c(this,z,Ne).call(this,t)},z=new WeakSet,Ne=function(t){for(const i in t){const r=i,s=t[r];s instanceof y.Store?o(this,d).add(s.subscribe(({current:f})=>{c(this,A,ie).call(this,r,f)})):c(this,A,ie).call(this,r,s)}},T=new WeakSet,ne=function(t){for(const i in t){const r=t[i];if(typeof r=="object"&&!(r instanceof y.Store))o(this,u).appendChild(document.createTextNode(`${i} {`)),c(this,T,ne).call(this,r),o(this,u).appendChild(document.createTextNode("}"));else if(r instanceof y.Store){const s=document.createTextNode("");o(this,d).add(r.subscribe(f=>{f.current?s.nodeValue=`${j.camelToKebab(i)}: ${f.current};`:s.nodeValue=""})),o(this,u).appendChild(s)}else o(this,u).appendChild(document.createTextNode(`${j.camelToKebab(i)}: ${r};`))}},A=new WeakSet,ie=function(t,i){t.includes("--")?i?o(this,u).style.setProperty(t,i.toString()):o(this,u).style.removeProperty(t):i?o(this,u).style[t]=i.toString():o(this,u).style[t]=""},J=new WeakSet,ve=function(t){if(t){o(this,p)||g(this,p,[]);for(const i in t){const r=i,s=j.uncapitalize(r.split("on").slice(1).join("on")),f=t[r];typeof f=="object"?o(this,p).push({name:s,callback:f.callback,options:f.options}):typeof f=="function"&&o(this,p).push({name:s,callback:f})}c(this,x,re).call(this)}},x=new WeakSet,re=function(){var t;(t=o(this,p))==null||t.forEach(i=>{o(this,u).addEventListener(i.name,i.callback,i.options)})},q=new WeakSet,oe=function(){var t;(t=o(this,p))==null||t.forEach(i=>{o(this,u).removeEventListener(i.name,i.callback,i.options)})},I=new WeakSet,ke=function(t){for(const i in t){const r=t[i];r instanceof y.Store?o(this,d).add(r.subscribe(({current:s})=>{c(this,M,se).call(this,i,s)})):c(this,M,se).call(this,i,r)}},M=new WeakSet,se=function(t,i){var s,f;const r=o(this,u);if(t in r&&!((f=(s=r.constructor)==null?void 0:s.observedAttributes)!=null&&f.includes(t)))i!=null&&(r[t]=i.toString());else if(i!=null){const l=i.toString();t.includes("xlink")?r.setAttributeNS("http://www.w3.org/1999/xlink",t,l):r.setAttribute(t,l)}},C=new WeakSet,P=function(t,i){i&&(i=[i].flat(),i.forEach(r=>{if(r instanceof y.Store){const s=document.createElement("div");s.style.display="contents",t.appendChild(s),o(this,m)||g(this,m,[]);const f=o(this,m).length;s.setAttribute("store-root",""),o(this,m).push(s),o(this,d).add(r.subscribe(({current:l,previous:h})=>{const S=o(this,m)[f];S.dispatchEvent(new CustomEvent("beforeChildrenChange",{bubbles:!0,composed:!0}));const Q=Array.from(S.childNodes),fe=Array.isArray(l)?l:[l],Le=Array.isArray(h)?h:[h],le=[],X=[];Q.length&&Le.forEach((b,N)=>{fe.includes(b)?X.push(b):le.push(Q[N])}),fe.forEach((b,N)=>{if(X[N]!=null){if(b!==X[N]){const E=c(this,F,ce).call(this,b),Z=Q[N];E instanceof Node&&!Z.isEqualNode(E)?S.replaceChild(E,Z):S.removeChild(Z)}}else{const E=c(this,F,ce).call(this,b);E instanceof Node&&s.appendChild(E)}}),le.forEach(b=>{S.removeChild(b)}),S.dispatchEvent(new CustomEvent("afterChildrenChange",{bubbles:!0,composed:!0}))}))}else if(r instanceof Y)c(this,D,ue).call(this,t,r.node);else if(r instanceof Function)c(this,C,P).call(this,t,pe.isESClass(r)?new r:r());else{const s=c(this,H,ae).call(this,r);s instanceof Node&&c(this,D,ue).call(this,t,s)}}))},D=new WeakSet,ue=function(t,i){!(t instanceof ShadowRoot)&&i instanceof HTMLElement&&i.tagName==="STYLE"?(o(this,w).add(()=>{[...document.head.querySelectorAll("style")].find(s=>s.outerHTML===i.outerHTML)||document.head.appendChild(i)}),o(this,d).add(()=>{i.remove()})):t.appendChild(i)},F=new WeakSet,ce=function(t){return t instanceof Y?t.node:typeof t=="function"?pe.isESClass(t)?new t:t():c(this,H,ae).call(this,t)},H=new WeakSet,ae=function(t){if(t instanceof Node)return t;if(t!=null){const i=String(t);if(i.trim().startsWith("<")&&i.trim().endsWith(">")){const r=document.createElement("div");return r.innerHTML=i,r.firstElementChild}else return document.createTextNode(i)}else return},K=new WeakMap,U=new WeakMap;let n=Y;function He(...e){return new n(...e)}function Pe(e){return new n("a",e)}function Be(e){return new n("abbr",e)}function Re(e){return new n("address",e)}function $e(e){return new n("area",e)}function Ge(e){return new n("article",e)}function Ve(e){return new n("aside",e)}function We(e){return new n("audio",e)}function ze(e){return new n("b",e)}function Je(e){return new n("base",e)}function Ie(e){return new n("bdi",e)}function Ke(e){return new n("bdo",e)}function Ue(e){return new n("blockquote",e)}function Ye(e){return new n("body",e)}function Qe(e){return new n("br",e)}function Xe(e){return new n("button",e)}function Ze(e){return new n("canvas",e)}function _e(e){return new n("caption",e)}function Oe(e){return new n("cite",e)}function je(e){return new n("code",e)}function et(e){return new n("col",e)}function tt(e){return new n("colgroup",e)}function nt(e){return new n("data",e)}function it(e){return new n("datalist",e)}function rt(e){return new n("dd",e)}function ot(e){return new n("del",e)}function st(e){return new n("details",e)}function ut(e){return new n("dfn",e)}function ct(e){return new n("dialog",e)}function at(e){return new n("div",e)}function ft(e){return new n("dl",e)}function lt(e){return new n("dt",e)}function dt(e){return new n("em",e)}function ht(e){return new n("embed",e)}function wt(e){return new n("fieldset",e)}function mt(e){return new n("figcaption",e)}function pt(e){return new n("figure",e)}function bt(e){return new n("footer",e)}function gt(e){return new n("form",e)}function yt(e){return new n("h1",e)}function St(e){return new n("h2",e)}function Et(e){return new n("h3",e)}function Ct(e){return new n("h4",e)}function Nt(e){return new n("h5",e)}function vt(e){return new n("h6",e)}function kt(e){return new n("head",e)}function Lt(e){return new n("header",e)}function Tt(e){return new n("hgroup",e)}function At(e){return new n("hr",e)}function xt(e){return new n("html",e)}function qt(e){return new n("i",e)}function Mt(e){return new n("iframe",e)}function Dt(e){return new n("img",e)}function Ft(e){return new n("input",e)}function Ht(e){return new n("ins",e)}function Pt(e){return new n("kbd",e)}function Bt(e){return new n("label",e)}function Rt(e){return new n("legend",e)}function $t(e){return new n("li",e)}function Gt(e){return new n("link",e)}function Vt(e){return new n("main",e)}function Wt(e){return new n("map",e)}function zt(e){return new n("mark",e)}function Jt(e){return new n("menu",e)}function It(e){return new n("meta",e)}function Kt(e){return new n("meter",e)}function Ut(e){return new n("nav",e)}function Yt(e){return new n("noscript",e)}function Qt(e){return new n("object",e)}function Xt(e){return new n("ol",e)}function Zt(e){return new n("optgroup",e)}function _t(e){return new n("option",e)}function Ot(e){return new n("output",e)}function jt(e){return new n("p",e)}function en(e){return new n("picture",e)}function tn(e){return new n("pre",e)}function nn(e){return new n("progress",e)}function rn(e){return new n("q",e)}function on(e){return new n("rp",e)}function sn(e){return new n("rt",e)}function un(e){return new n("ruby",e)}function cn(e){return new n("s",e)}function an(e){return new n("samp",e)}function fn(e){return new n("script",e)}function ln(e){return new n("search",e)}function dn(e){return new n("section",e)}function hn(e){return new n("select",e)}function wn(e){return new n("slot",e)}function mn(e){return new n("small",e)}function pn(e){return new n("source",e)}function bn(e){return new n("span",e)}function gn(e){return new n("strong",e)}function yn(e){return new n("style",{style:e})}function Sn(e){return new n("sub",e)}function En(e){return new n("summary",e)}function Cn(e){return new n("sup",e)}function Nn(e){return new n("table",e)}function vn(e){return new n("tbody",e)}function kn(e){return new n("td",e)}function Ln(e){return new n("template",e)}function Tn(e){return new n("textarea",e)}function An(e){return new n("tfoot",e)}function xn(e){return new n("th",e)}function qn(e){return new n("thead",e)}function Mn(e){return new n("time",e)}function Dn(e){return new n("title",e)}function Fn(e){return new n("tr",e)}function Hn(e){return new n("track",e)}function Pn(e){return new n("u",e)}function Bn(e){return new n("ul",e)}function Rn(e){return new n("var",e)}function $n(e){return new n("video",e)}function Gn(e){return new n("wbr",e)}function Vn(e){return new n(document.createDocumentFragment(),e)}function Wn(e){return new n(document.createTextNode(""),e)}function zn(e){return new n("div",we(_({},e),{style:_({display:"contents"},e==null?void 0:e.style)}))}exports.ElementConstructor=n;exports.a=Pe;exports.abbr=Be;exports.address=Re;exports.area=$e;exports.article=Ge;exports.aside=Ve;exports.audio=We;exports.b=ze;exports.base=Je;exports.bdi=Ie;exports.bdo=Ke;exports.blockquote=Ue;exports.body=Ye;exports.br=Qe;exports.button=Xe;exports.canvas=Ze;exports.caption=_e;exports.cite=Oe;exports.code=je;exports.col=et;exports.colgroup=tt;exports.contents=zn;exports.data=nt;exports.datalist=it;exports.dd=rt;exports.del=ot;exports.details=st;exports.dfn=ut;exports.dialog=ct;exports.div=at;exports.dl=ft;exports.dt=lt;exports.element=He;exports.em=dt;exports.embed=ht;exports.empty=Wn;exports.fieldset=wt;exports.figcaption=mt;exports.figure=pt;exports.footer=bt;exports.form=gt;exports.fragment=Vn;exports.h1=yt;exports.h2=St;exports.h3=Et;exports.h4=Ct;exports.h5=Nt;exports.h6=vt;exports.head=kt;exports.header=Lt;exports.hgroup=Tt;exports.hr=At;exports.html=xt;exports.htmlVar=Rn;exports.i=qt;exports.iframe=Mt;exports.img=Dt;exports.input=Ft;exports.ins=Ht;exports.kbd=Pt;exports.label=Bt;exports.legend=Rt;exports.li=$t;exports.link=Gt;exports.main=Vt;exports.map=Wt;exports.mark=zt;exports.menu=Jt;exports.meta=It;exports.meter=Kt;exports.nav=Ut;exports.noscript=Yt;exports.object=Qt;exports.ol=Xt;exports.optgroup=Zt;exports.option=_t;exports.output=Ot;exports.p=jt;exports.picture=en;exports.pre=tn;exports.progress=nn;exports.q=rn;exports.rp=on;exports.rt=sn;exports.ruby=un;exports.s=cn;exports.samp=an;exports.script=fn;exports.search=ln;exports.section=dn;exports.select=hn;exports.slot=wn;exports.small=mn;exports.source=pn;exports.span=bn;exports.strong=gn;exports.style=yn;exports.sub=Sn;exports.summary=En;exports.sup=Cn;exports.table=Nn;exports.tbody=vn;exports.td=kn;exports.template=Ln;exports.textarea=Tn;exports.tfoot=An;exports.th=xn;exports.thead=qn;exports.time=Mn;exports.title=Dn;exports.tr=Fn;exports.track=Hn;exports.u=Pn;exports.ul=Bn;exports.video=$n;exports.wbr=Gn;
|