aptechka 0.64.0 → 0.64.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (118) hide show
  1. package/lib/Animation-BRqj4VfN.cjs +1 -0
  2. package/lib/{Animation-Cb-klopb.js → Animation-D29tc5VS.js} +5 -4
  3. package/lib/Damped-BD1OQ1fH.cjs +1 -0
  4. package/lib/{Damped-ByZFbNSt.js → Damped-YrqW5V4w.js} +5 -4
  5. package/lib/DragControls-D8BXtKVu.cjs +1 -0
  6. package/lib/DragControls-DGDUw6bM.js +226 -0
  7. package/lib/ScrollSegmentElement-B6gp1q_z.js +459 -0
  8. package/lib/ScrollSegmentElement-DtMMAirz.cjs +1 -0
  9. package/lib/SourceElement-D_YeNqsI.cjs +5 -0
  10. package/lib/SourceElement-jbviggZp.js +217 -0
  11. package/lib/{Store-swP_0ymB.js → Store-0BVty6AZ.js} +2 -1
  12. package/lib/Store-Cd1GlEmZ.cjs +1 -0
  13. package/lib/Tweened-B-AHx93m.cjs +1 -0
  14. package/lib/{Tweened-DzZwfKNm.js → Tweened-_pF0zXXN.js} +9 -8
  15. package/lib/Viewport-DA10iWAO.js +109 -0
  16. package/lib/Viewport-DB0qAZPJ.cjs +1 -0
  17. package/lib/accordion/index.cjs +1 -1
  18. package/lib/accordion/index.js +2 -1
  19. package/lib/animation/index.cjs +1 -1
  20. package/lib/animation/index.js +3 -3
  21. package/lib/attribute/index.cjs +1 -1
  22. package/lib/attribute/index.js +5 -4
  23. package/lib/billboard/index.cjs +1 -1
  24. package/lib/billboard/index.js +2 -1
  25. package/lib/canvas/index.cjs +1 -1
  26. package/lib/canvas/index.js +5 -5
  27. package/lib/controls/index.cjs +1 -1
  28. package/lib/controls/index.js +6 -223
  29. package/lib/css-property/index.cjs +1 -1
  30. package/lib/css-property/index.js +15 -14
  31. package/lib/custom-scrollbar/index.cjs +1 -1
  32. package/lib/custom-scrollbar/index.js +25 -24
  33. package/lib/dev/index.cjs +1 -1
  34. package/lib/dev/index.js +7 -6
  35. package/lib/device/index.cjs +1 -1
  36. package/lib/device/index.js +5 -106
  37. package/lib/element-linked-store/index.cjs +1 -1
  38. package/lib/element-linked-store/index.js +5 -4
  39. package/lib/element-resizer/index.cjs +1 -1
  40. package/lib/element-resizer/index.js +22 -21
  41. package/lib/en3/En3View.d.ts +2 -2
  42. package/lib/en3/en3.d.ts +3 -2
  43. package/lib/en3/index.cjs +3 -3
  44. package/lib/en3/index.js +93 -91
  45. package/lib/iframe/index.cjs +1 -1
  46. package/lib/iframe/index.js +4 -3
  47. package/lib/image/index.cjs +1 -1
  48. package/lib/image/index.js +5 -4
  49. package/lib/{index-euf5anj6.js → index-Bv9zgfdb.js} +3 -2
  50. package/lib/index-DekP7OZe.cjs +1 -0
  51. package/lib/intersector/index.cjs +1 -1
  52. package/lib/intersector/index.js +4 -3
  53. package/lib/ladder/index.cjs +1 -1
  54. package/lib/ladder/index.js +41 -40
  55. package/lib/{layout-DpZo-I0y.js → layout-BSMtwCga.js} +2 -2
  56. package/lib/layout-box/index.cjs +1 -1
  57. package/lib/layout-box/index.js +18 -17
  58. package/lib/loading/index.cjs +1 -1
  59. package/lib/loading/index.js +4 -3
  60. package/lib/masonry-layout/index.cjs +1 -1
  61. package/lib/masonry-layout/index.js +2 -2
  62. package/lib/media/index.cjs +1 -1
  63. package/lib/media/index.js +12 -11
  64. package/lib/morph/index.cjs +1 -1
  65. package/lib/morph/index.js +3 -2
  66. package/lib/need_redo_tweaker/index.cjs +3 -3
  67. package/lib/need_redo_tweaker/index.js +368 -340
  68. package/lib/pixel-perfect/index.cjs +1 -1
  69. package/lib/pixel-perfect/index.js +2 -2
  70. package/lib/pointer/index.cjs +1 -1
  71. package/lib/pointer/index.js +19 -18
  72. package/lib/popover/index.cjs +1 -1
  73. package/lib/popover/index.js +3 -2
  74. package/lib/radio/index.cjs +1 -1
  75. package/lib/radio/index.js +2 -1
  76. package/lib/router/index.cjs +1 -1
  77. package/lib/router/index.js +11 -10
  78. package/lib/scroll/index.cjs +1 -1
  79. package/lib/scroll/index.js +66 -65
  80. package/lib/{scroll-Benkuq-t.js → scroll-BWF48oHS.js} +11 -10
  81. package/lib/scroll-CFDCeArT.cjs +1 -0
  82. package/lib/scroll-segment/index.cjs +1 -1
  83. package/lib/scroll-segment/index.js +3 -456
  84. package/lib/sequence/index.cjs +1 -1
  85. package/lib/sequence/index.js +4 -3
  86. package/lib/size-element/index.cjs +1 -1
  87. package/lib/size-element/index.js +2 -1
  88. package/lib/slicer/index.cjs +3 -3
  89. package/lib/slicer/index.js +31 -30
  90. package/lib/source/SourceElement.d.ts +1 -1
  91. package/lib/source/index.cjs +1 -5
  92. package/lib/source/index.js +5 -214
  93. package/lib/store/index.cjs +1 -1
  94. package/lib/store/index.js +14 -13
  95. package/lib/stylesheet-DpnWNVyD.js +24 -0
  96. package/lib/stylesheet-HWF2a3nr.cjs +1 -0
  97. package/lib/ticker/index.cjs +1 -1
  98. package/lib/ticker/index.js +14 -13
  99. package/lib/utils/index.cjs +1 -1
  100. package/lib/utils/index.d.ts +1 -0
  101. package/lib/utils/index.js +5 -5
  102. package/lib/utils/jss.d.ts +0 -1
  103. package/lib/utils/stylesheet.d.ts +2 -0
  104. package/lib/video/index.cjs +1 -1
  105. package/lib/video/index.js +11 -10
  106. package/lib/window-resizer/index.cjs +1 -1
  107. package/lib/window-resizer/index.js +9 -8
  108. package/lib/youtube/index.cjs +1 -1
  109. package/lib/youtube/index.js +12 -11
  110. package/package.json +4 -4
  111. package/lib/Animation-dD_idtTU.cjs +0 -1
  112. package/lib/Damped-B8bmTxAr.cjs +0 -1
  113. package/lib/Store-GokLe_g-.cjs +0 -1
  114. package/lib/Tweened-BsL9FamJ.cjs +0 -1
  115. package/lib/index-Cqw2NKev.cjs +0 -1
  116. package/lib/jss-CRBgdvJ3.cjs +0 -1
  117. package/lib/jss-DtnXPEnq.js +0 -23
  118. package/lib/scroll-DAhSpkhR.cjs +0 -1
@@ -1,458 +1,5 @@
1
- var St = (l) => {
2
- throw TypeError(l);
3
- };
4
- var lt = (l, u, r) => u.has(l) || St("Cannot " + r);
5
- var t = (l, u, r) => (lt(l, u, "read from private field"), r ? r.call(l) : u.get(l)), i = (l, u, r) => u.has(l) ? St("Cannot add the same private member more than once") : u instanceof WeakSet ? u.add(l) : u.set(l, r), e = (l, u, r, s) => (lt(l, u, "write to private field"), s ? s.call(l, r) : u.set(l, r), r), c = (l, u, r) => (lt(l, u, "access private method"), r);
6
- import { f as Rt } from "../dom-CVWzyXPH.js";
7
- import { i as Ot } from "../index-euf5anj6.js";
8
- import { elementResizer as dt } from "../element-resizer/index.js";
9
- import { windowResizer as ut } from "../window-resizer/index.js";
10
- import { CSSProperty as o } from "../css-property/index.js";
11
- import { TICK_ORDER as zt, RESIZE_ORDER as kt } from "../order/index.js";
12
- import { d as et } from "../events-CsVF98U6.js";
13
- import { d as At } from "../function-C10DGppn.js";
14
- import { a as Mt, g as Dt, c as Tt } from "../layout-DpZo-I0y.js";
15
- import { s as xt } from "../math-BOBiC4TN.js";
16
- import { S as rt } from "../Store-swP_0ymB.js";
17
- import { scrollEntries as It } from "../scroll-entries/index.js";
18
- import "../ticker/index.js";
19
- import { D as $t } from "../Damped-ByZFbNSt.js";
20
- var F, ot, it, G;
21
- class bt {
22
- constructor(u) {
23
- i(this, F, null);
24
- i(this, ot);
25
- i(this, it, !1);
26
- i(this, G, () => {
27
- e(this, it, !(t(this, F).scrollWidth > t(this, F).clientWidth));
28
- });
29
- e(this, ot, u), e(this, F, Rt(t(this, ot))), dt.subscribe(t(this, F), t(this, G)), ut.subscribe(t(this, G)), t(this, G).call(this);
30
- }
31
- get element() {
32
- return t(this, F);
33
- }
34
- get currentScrollValue() {
35
- return t(this, it) ? t(this, F).scrollTop : t(this, F).scrollLeft;
36
- }
37
- get vertical() {
38
- return t(this, it);
39
- }
40
- destroy() {
41
- dt.unsubscribe(t(this, G)), ut.unsubscribe(t(this, G));
42
- }
43
- onScroll(u) {
44
- t(this, F).addEventListener("scroll", u);
45
- }
46
- offScroll(u) {
47
- t(this, F).removeEventListener("scroll", u);
48
- }
49
- }
50
- F = new WeakMap(), ot = new WeakMap(), it = new WeakMap(), G = new WeakMap();
51
- var f, K, Z, j, J, x, I, $, H, d, v, C, y, W, S, z, k, E, N, Y, A, M, D, p, P, V, R, O, L, ht, n, _, Q, nt, m, T, g, b, w, tt, q, a, U, h, vt, ft, Ct, yt, Pt, Vt, Ft, Lt, ct, st, pt, X, wt, Et, mt, gt;
52
- let Ht = (gt = class extends HTMLElement {
53
- constructor() {
54
- super(...arguments);
55
- i(this, h);
56
- i(this, f);
57
- i(this, K);
58
- i(this, Z);
59
- i(this, j);
60
- i(this, J);
61
- i(this, x);
62
- i(this, I);
63
- i(this, $);
64
- i(this, H);
65
- i(this, d);
66
- i(this, v);
67
- i(this, C);
68
- i(this, y);
69
- i(this, W);
70
- i(this, S);
71
- i(this, z);
72
- i(this, k);
73
- i(this, E);
74
- i(this, N);
75
- i(this, Y);
76
- i(this, A);
77
- i(this, M);
78
- i(this, D);
79
- i(this, p);
80
- i(this, P);
81
- i(this, V);
82
- i(this, R);
83
- i(this, O);
84
- i(this, L);
85
- i(this, ht);
86
- i(this, n);
87
- i(this, _);
88
- i(this, Q);
89
- i(this, nt);
90
- i(this, m);
91
- i(this, T);
92
- i(this, g);
93
- i(this, b);
94
- i(this, w);
95
- i(this, tt);
96
- i(this, q);
97
- i(this, a);
98
- i(this, U);
99
- i(this, ct);
100
- i(this, st);
101
- e(this, f, null), e(this, K, new o(this, "--damping", 20)), e(this, Z, new o(this, "--mass", 0)), e(this, j, new o(this, "--stiffness", 0)), e(this, J, new o(this, "--target", "")), e(this, x, new o(this, "--disabled", !1)), e(this, I, new o(
102
- this,
103
- "--distance-offset",
104
- 0,
105
- { rawValueCheck: !1 }
106
- )), e(this, $, new o(this, "--start-offset", 0, {
107
- rawValueCheck: !1
108
- })), e(this, H, new o(
109
- this,
110
- "--capture-once",
111
- !1
112
- )), e(this, d, new o(this, "--captured", "")), e(this, v, new o(this, "--released", "")), e(this, C, new o(
113
- this,
114
- "--captured-from-start",
115
- ""
116
- )), e(this, y, new o(
117
- this,
118
- "--captured-from-finish",
119
- ""
120
- )), e(this, W, new o(
121
- this,
122
- "--released-from-start",
123
- ""
124
- )), e(this, S, new o(
125
- this,
126
- "--released-from-finish",
127
- ""
128
- )), e(this, z, new o(this, "--passed-var", "")), e(this, k, new o(this, "--progress-var", "")), e(this, E, new o(
129
- this,
130
- "--progress-arc-var",
131
- ""
132
- )), e(this, N, new o(
133
- this,
134
- "--progress-arc-mult",
135
- 1
136
- )), e(this, Y, new o(
137
- this,
138
- "--animation-var-type",
139
- "target"
140
- )), e(this, A, new o(this, "--distance-var", "")), e(this, M, new o(this, "--start-var", "")), e(this, D, new o(this, "--finish-var", "")), e(this, p, new rt(!1)), e(this, P, new rt(!1)), e(this, V, new rt(!1)), e(this, R, new rt(!1)), e(this, O, new rt(!1)), e(this, L, new rt(!1)), e(this, ht, []), e(this, n, this), e(this, _, 0), e(this, Q, 0), e(this, nt, 0), e(this, m, new $t(0, { order: zt.SEGMENT, min: 0, max: 1 })), e(this, T, 0), e(this, g, 0), e(this, b, 0), e(this, w, 0), e(this, tt, !1), e(this, q, !1), e(this, a, !0), e(this, U, !1), this.resize = () => {
141
- e(this, Q, t(this, f).vertical ? this.offsetHeight : this.offsetWidth);
142
- const r = t(this, f) instanceof HTMLElement ? t(this, f) : t(this, f).element;
143
- e(this, _, t(this, f).vertical ? Mt(this, r) : Dt(this, r));
144
- const s = Tt(
145
- this,
146
- t(this, f).vertical ? "top" : "left"
147
- );
148
- e(this, _, t(this, _) - s), e(this, g, this.getStart()), e(this, b, this.getDistance()), e(this, g, t(this, g) + t(this, $).current), e(this, b, t(this, b) + t(this, I).current), e(this, w, t(this, g) + t(this, b)), t(this, f).currentScrollValue > t(this, w) && !t(this, p).current && !t(this, P).current && (t(this, p).current = !0), this.setVar(t(this, M).current, t(this, g)), this.setVar(t(this, D).current, t(this, w)), this.setVar(t(this, A).current, t(this, b)), t(this, m).max = t(this, b), e(this, tt, !0), t(this, st).call(this);
149
- }, this.findAnotherScrollEntries = At(() => {
150
- const r = It.getAll(this).reverse();
151
- let s = 0;
152
- r.forEach((B, at) => {
153
- B.element === t(this, f) && (s = at);
154
- }), e(this, ht, r.slice(s + 1)), this.tick();
155
- }, 0), e(this, ct, () => {
156
- t(this, a) || this.resize();
157
- }), e(this, st, () => {
158
- !t(this, a) && t(this, tt) && this.tick();
159
- });
160
- }
161
- get scrollContainer() {
162
- return t(this, f);
163
- }
164
- set scrollContainer(r) {
165
- c(this, h, ft).call(this), e(this, f, r), c(this, h, vt).call(this);
166
- }
167
- get distanceOffsetCSSProperty() {
168
- return t(this, I);
169
- }
170
- get startOffsetCSSProperty() {
171
- return t(this, $);
172
- }
173
- get captureOnceCSSProperty() {
174
- return t(this, H);
175
- }
176
- get capturedCSSProperty() {
177
- return t(this, d);
178
- }
179
- get releasedCSSProperty() {
180
- return t(this, v);
181
- }
182
- get capturedFromStartCSSProperty() {
183
- return t(this, C);
184
- }
185
- get capturedFromFinishCSSProperty() {
186
- return t(this, y);
187
- }
188
- get releasedFromStartCSSProperty() {
189
- return t(this, W);
190
- }
191
- get releasedFromFinishCSSProperty() {
192
- return t(this, S);
193
- }
194
- get passedVarCSSProperty() {
195
- return t(this, z);
196
- }
197
- get progressVarCSSProperty() {
198
- return t(this, k);
199
- }
200
- get progressArcVarCSSProperty() {
201
- return t(this, E);
202
- }
203
- get progressArcMultCSSProperty() {
204
- return t(this, N);
205
- }
206
- get animationVarTypeCSSProperty() {
207
- return t(this, Y);
208
- }
209
- get distanceVarCSSProperty() {
210
- return t(this, A);
211
- }
212
- get startVarCSSProperty() {
213
- return t(this, M);
214
- }
215
- get finishVarCSSProperty() {
216
- return t(this, D);
217
- }
218
- get disabledCSSProperty() {
219
- return t(this, x);
220
- }
221
- get dampingCSSProperty() {
222
- return t(this, K);
223
- }
224
- get massCSSProperty() {
225
- return t(this, Z);
226
- }
227
- get stiffnessCSSProperty() {
228
- return t(this, j);
229
- }
230
- get targetCSSProperty() {
231
- return t(this, J);
232
- }
233
- get isCaptured() {
234
- return t(this, p);
235
- }
236
- get isReleased() {
237
- return t(this, P);
238
- }
239
- get isCapturedFromStart() {
240
- return t(this, V);
241
- }
242
- get isReleasedFromStart() {
243
- return t(this, R);
244
- }
245
- get isCapturedFromFinish() {
246
- return t(this, O);
247
- }
248
- get isReleasedFromFinish() {
249
- return t(this, L);
250
- }
251
- get directionPosition() {
252
- return t(this, _);
253
- }
254
- get directionSize() {
255
- return t(this, Q);
256
- }
257
- get passed() {
258
- return t(this, m);
259
- }
260
- get progress() {
261
- return t(this, T);
262
- }
263
- get progressArc() {
264
- return Math.abs(Math.cos(t(this, T) * Math.PI)) * t(this, N).current;
265
- }
266
- get start() {
267
- return t(this, g);
268
- }
269
- get finish() {
270
- return t(this, w);
271
- }
272
- get distance() {
273
- return t(this, b);
274
- }
275
- get isCapturedOnce() {
276
- return t(this, q);
277
- }
278
- get isDisabled() {
279
- return t(this, a);
280
- }
281
- tick() {
282
- let r = t(this, f).currentScrollValue;
283
- t(this, ht).forEach((at) => {
284
- r += at.value;
285
- });
286
- const s = r - t(this, g);
287
- t(this, U) || e(this, U, t(this, m).previous ? Math.abs(t(this, m).previous - s) > 1e3 : !1), t(this, m).set(s);
288
- const B = Math.round(r);
289
- t(this, p).current && (B >= t(this, g) ? t(this, V).current || c(this, h, Pt).call(this) : t(this, V).current && !t(this, R).current && c(this, h, Ft).call(this), B < t(this, w) ? t(this, L).current && !t(this, O).current && c(this, h, Vt).call(this) : t(this, V).current && !t(this, L).current && c(this, h, Lt).call(this)), B >= t(this, g) && B < t(this, w) ? t(this, p).current || c(this, h, Ct).call(this) : t(this, p).current && (t(this, m).set(
290
- xt(t(this, b) / 2, t(this, m).target, 0, t(this, b))
291
- ), c(this, h, yt).call(this)), t(this, q) && t(this, H).current && (t(this, d).current && t(this, n).classList.add(t(this, d).current), e(this, a, !0));
292
- }
293
- disable() {
294
- this.style.cssText = "", e(this, _, 0), e(this, Q, 0), t(this, m).reset(), e(this, T, 0), e(this, g, 0), e(this, b, 0), e(this, w, 0), e(this, tt, !1), t(this, p).current = !1, t(this, P).current = !1, t(this, V).current = !1, t(this, R).current = !1, t(this, O).current = !1, t(this, L).current = !1, e(this, q, !1), e(this, a, !0), c(this, h, mt).call(this);
295
- }
296
- enable() {
297
- e(this, a, !1);
298
- }
299
- connectedCallback() {
300
- this.scrollContainer = new bt(this);
301
- }
302
- disconnectedCallback() {
303
- t(this, f) instanceof bt && t(this, f).destroy(), c(this, h, ft).call(this);
304
- }
305
- removeVar(r) {
306
- r && t(this, n).style.removeProperty(`--${r}`);
307
- }
308
- setVar(r, s) {
309
- if (r) {
310
- const B = typeof s == "number" ? s.toFixed(6) : s;
311
- t(this, n).style.setProperty(`--${r}`, B);
312
- }
313
- }
314
- getDistance() {
315
- return t(this, Q) + t(this, nt);
316
- }
317
- getStart() {
318
- return t(this, _) - t(this, nt);
319
- }
320
- }, f = new WeakMap(), K = new WeakMap(), Z = new WeakMap(), j = new WeakMap(), J = new WeakMap(), x = new WeakMap(), I = new WeakMap(), $ = new WeakMap(), H = new WeakMap(), d = new WeakMap(), v = new WeakMap(), C = new WeakMap(), y = new WeakMap(), W = new WeakMap(), S = new WeakMap(), z = new WeakMap(), k = new WeakMap(), E = new WeakMap(), N = new WeakMap(), Y = new WeakMap(), A = new WeakMap(), M = new WeakMap(), D = new WeakMap(), p = new WeakMap(), P = new WeakMap(), V = new WeakMap(), R = new WeakMap(), O = new WeakMap(), L = new WeakMap(), ht = new WeakMap(), n = new WeakMap(), _ = new WeakMap(), Q = new WeakMap(), nt = new WeakMap(), m = new WeakMap(), T = new WeakMap(), g = new WeakMap(), b = new WeakMap(), w = new WeakMap(), tt = new WeakMap(), q = new WeakMap(), a = new WeakMap(), U = new WeakMap(), h = new WeakSet(), vt = function() {
321
- if (!t(this, f))
322
- return;
323
- t(this, p).subscribe((s) => {
324
- s.current && et(this, "scrollSegmentCapture", {
325
- composed: !0,
326
- custom: !0
327
- });
328
- }), t(this, V).subscribe((s) => {
329
- s.current && et(this, "scrollSegmentCaptureFromStart", {
330
- composed: !0,
331
- custom: !0
332
- });
333
- }), t(this, O).subscribe((s) => {
334
- s.current && et(this, "scrollSegmentCaptureFromFinish", {
335
- composed: !0,
336
- custom: !0
337
- });
338
- }), t(this, P).subscribe((s) => {
339
- s.current && et(this, "scrollSegmentRelease", {
340
- composed: !0,
341
- custom: !0
342
- });
343
- }), t(this, R).subscribe((s) => {
344
- s.current && et(this, "scrollSegmentReleaseFromStart", {
345
- composed: !0,
346
- custom: !0
347
- });
348
- }), t(this, L).subscribe((s) => {
349
- s.current && et(this, "scrollSegmentReleaseFromFinish", {
350
- composed: !0,
351
- custom: !0
352
- });
353
- }), t(this, K).observe(), t(this, Z).observe(), t(this, j).observe(), t(this, J).observe(), t(this, x).observe(), t(this, I).observe(), t(this, $).observe(), t(this, H).observe(), t(this, d).observe(), t(this, v).observe(), t(this, C).observe(), t(this, y).observe(), t(this, W).observe(), t(this, S).observe(), t(this, z).observe(), t(this, k).observe(), t(this, E).observe(), t(this, N).observe(), t(this, Y).observe(), t(this, A).observe(), t(this, M).observe(), t(this, D).observe();
354
- let r = !1;
355
- this.findAnotherScrollEntries(), t(this, x).current || this.enable(), t(this, K).subscribe((s) => {
356
- t(this, m).damping = s.current;
357
- }), t(this, Z).subscribe((s) => {
358
- t(this, m).mass = s.current;
359
- }), t(this, j).subscribe((s) => {
360
- t(this, m).stiffness = s.current;
361
- }), t(this, J).subscribe((s) => {
362
- s.previous && c(this, h, mt).call(this), s.current ? s.current === "parent" ? e(this, n, this.parentElement || this) : e(this, n, document.querySelector(s.current) || this) : e(this, n, this);
363
- }), t(this, x).subscribe((s) => {
364
- s.current && !s.previous ? this.disable() : !s.current && s.previous && (this.resize(), this.enable());
365
- }), t(this, $).subscribe(() => {
366
- r && !t(this, a) && this.resize();
367
- }), t(this, I).subscribe(() => {
368
- r && !t(this, a) && this.resize();
369
- }), t(this, d).subscribe((s) => {
370
- c(this, h, X).call(this, s);
371
- }), t(this, C).subscribe((s) => {
372
- c(this, h, X).call(this, s);
373
- }), t(this, y).subscribe((s) => {
374
- c(this, h, X).call(this, s);
375
- }), t(this, v).subscribe((s) => {
376
- c(this, h, X).call(this, s);
377
- }), t(this, W).subscribe((s) => {
378
- c(this, h, X).call(this, s);
379
- }), t(this, S).subscribe((s) => {
380
- c(this, h, X).call(this, s);
381
- }), t(this, H).subscribe((s) => {
382
- t(this, a) || !s.current && s.previous && (this.resize(), this.enable());
383
- }), t(this, z).subscribe((s) => {
384
- t(this, a) || (this.removeVar(s.previous), this.setVar(s.current, this.passed.current));
385
- }), t(this, k).subscribe((s) => {
386
- t(this, a) || (this.removeVar(s.previous), this.setVar(s.current, t(this, T)));
387
- }), t(this, E).subscribe((s) => {
388
- t(this, a) || (this.removeVar(s.previous), this.setVar(s.current, this.progressArc));
389
- }), t(this, N).subscribe((s) => {
390
- t(this, a) || c(this, h, pt).call(this);
391
- }), t(this, M).subscribe((s) => {
392
- t(this, a) || (this.removeVar(s.previous), this.setVar(s.current, t(this, g)));
393
- }), t(this, D).subscribe((s) => {
394
- t(this, a) || (this.removeVar(s.previous), this.setVar(s.current, t(this, w)));
395
- }), t(this, A).subscribe((s) => {
396
- t(this, a) || (this.removeVar(s.previous), this.setVar(s.current, t(this, b)));
397
- }), t(this, m).subscribe((s) => {
398
- if (t(this, U)) {
399
- e(this, U, !1);
400
- return;
401
- }
402
- c(this, h, pt).call(this);
403
- }), ut.subscribe(t(this, ct), kt.SCROLL + 1), this.scrollContainer.onScroll(t(this, st)), r = !0;
404
- }, ft = function() {
405
- t(this, f) && (ut.unsubscribe(t(this, ct)), this.scrollContainer.offScroll(t(this, st)), t(this, K).close(), t(this, Z).close(), t(this, j).close(), t(this, J).close(), t(this, x).close(), t(this, I).close(), t(this, $).close(), t(this, H).close(), t(this, d).close(), t(this, v).close(), t(this, C).close(), t(this, y).close(), t(this, W).close(), t(this, S).close(), t(this, z).close(), t(this, k).close(), t(this, E).close(), t(this, N).close(), t(this, A).close(), t(this, M).close(), t(this, D).close(), t(this, p).close(), t(this, P).close(), t(this, V).close(), t(this, R).close(), t(this, O).close(), t(this, L).close(), this.disable(), t(this, m).close());
406
- }, Ct = function() {
407
- t(this, p).current = !0, t(this, P).current = !1, e(this, q, !0), t(this, v).current && t(this, n).classList.remove(t(this, v).current), t(this, S).current && t(this, n).classList.remove(
408
- t(this, S).current
409
- ), t(this, S).current && t(this, n).classList.remove(
410
- t(this, S).current
411
- ), t(this, d).current && t(this, n).classList.add(t(this, d).current);
412
- }, yt = function() {
413
- t(this, P).current = !0, t(this, p).current = !1, e(this, q, !0), t(this, d).current && t(this, n).classList.remove(t(this, d).current), t(this, C).current && t(this, n).classList.remove(
414
- t(this, C).current
415
- ), t(this, y).current && t(this, n).classList.remove(
416
- t(this, y).current
417
- ), t(this, v).current && t(this, n).classList.add(t(this, v).current);
418
- }, Pt = function() {
419
- t(this, p).current = !0, t(this, V).current = !0, t(this, R).current = !1, t(this, C).current && t(this, n).classList.add(
420
- t(this, C).current
421
- );
422
- }, Vt = function() {
423
- t(this, p).current = !0, t(this, O).current = !0, t(this, L).current = !1, t(this, y).current && t(this, n).classList.add(
424
- t(this, y).current
425
- );
426
- }, Ft = function() {
427
- t(this, P).current = !0, t(this, R).current = !0, t(this, V).current = !1, t(this, S).current && t(this, n).classList.add(
428
- t(this, S).current
429
- );
430
- }, Lt = function() {
431
- t(this, P).current = !0, t(this, L).current = !0, t(this, O).current = !1, t(this, S).current && t(this, n).classList.add(
432
- t(this, S).current
433
- );
434
- }, ct = new WeakMap(), st = new WeakMap(), pt = function() {
435
- const r = t(this, m)[t(this, Y).current];
436
- this.setVar(t(this, z).current, r), e(this, T, r / t(this, b) || 0), this.setVar(t(this, k).current, t(this, T)), t(this, E).current && this.setVar(t(this, E).current, this.progressArc);
437
- }, X = function(r) {
438
- if (t(this, a)) {
439
- r.previous && t(this, n).classList.remove(r.previous), r.current && t(this, n).classList.remove(r.current);
440
- return;
441
- }
442
- r.current && t(this, p).current ? (r.previous && t(this, n).classList.remove(r.previous), t(this, n).classList.add(r.current)) : !r.current && r.previous && t(this, n).classList.remove(r.previous);
443
- }, wt = function(...r) {
444
- r.forEach((s) => {
445
- s && t(this, n).classList.remove(s);
446
- });
447
- }, Et = function(...r) {
448
- r.forEach((s) => {
449
- s && t(this, n).style.removeProperty(`--${s}`);
450
- });
451
- }, mt = function() {
452
- c(this, h, wt).call(this, t(this, d).current, t(this, C).current, t(this, y).current, t(this, v).current, t(this, W).current, t(this, S).current), c(this, h, Et).call(this, t(this, z).current, t(this, k).current, t(this, E).current, t(this, A).current, t(this, M).current, t(this, D).current);
453
- }, gt);
454
- Ot && !customElements.get("scroll-segment") && customElements.define("scroll-segment", Ht);
1
+ import { S as t, a } from "../ScrollSegmentElement-B6gp1q_z.js";
455
2
  export {
456
- bt as ScrollSegmentDefaultContainer,
457
- Ht as ScrollSegmentElement
3
+ t as ScrollSegmentDefaultContainer,
4
+ a as ScrollSegmentElement
458
5
  };
@@ -1 +1 @@
1
- "use strict";var x=s=>{throw TypeError(s)};var I=(s,n,e)=>n.has(s)||x("Cannot "+e);var t=(s,n,e)=>(I(s,n,"read from private field"),e?e.call(s):n.get(s)),c=(s,n,e)=>n.has(s)?x("Cannot add the same private member more than once"):n instanceof WeakSet?n.add(s):n.set(s,e),l=(s,n,e,i)=>(I(s,n,"write to private field"),i?i.call(s,e):n.set(s,e),e);var L=(s,n,e)=>new Promise((i,f)=>{var w=o=>{try{u(e.next(o))}catch(r){f(r)}},y=o=>{try{u(e.throw(o))}catch(r){f(r)}},u=o=>o.done?i(o.value):Promise.resolve(o.value).then(w,y);u((e=e.apply(s,n)).next())});Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const P=require("../css-property/index.cjs"),R=require("../element-resizer/index.cjs"),_=require("../index-Cqw2NKev.cjs"),z=require("../canvas-CU5Xjahf.cjs"),H=require("../source/index.cjs");require("../window-resizer/index.cjs");require("../Store-GokLe_g-.cjs");const M=require("../canvas/index.cjs");function W(s){const n=s.match(/\{([\d-]+)\}/);if(n){const e=n[1].split("-");if(e.length===2){const i=parseInt(e[0],10),f=parseInt(e[1],10);return{start:i,end:f}}}return null}var h,b,S,d,m,g,E,p,a,v;class k extends H.SourceElement{constructor(e){super();c(this,h,[]);c(this,b,new P.CSSProperty(this,"--fit","contain"));c(this,S,new P.CSSProperty(this,"--autoplay",!1));c(this,d,new P.CSSProperty(this,"--offset-x",.5));c(this,m,new P.CSSProperty(this,"--offset-y",.5));c(this,g,null);c(this,E,0);c(this,p,1);c(this,a,()=>{if(t(this,h).length){const e=t(this,h)[0];t(this,b).current==="cover"?l(this,g,z.cover(e.naturalWidth,e.naturalHeight,this.consumerElement.width,this.consumerElement.height,t(this,d).current,t(this,m).current)):l(this,g,z.contain(e.naturalWidth,e.naturalHeight,this.consumerElement.width,this.consumerElement.height,t(this,d).current,t(this,m).current))}});c(this,v,e=>{if(this.status.isFalse("loaded")||!t(this,g))return;e.detail.context.clearRect(0,0,e.detail.width,e.detail.height);const i=t(this,h)[t(this,E)];i&&e.detail.context.drawImage(i,...t(this,g)),t(this,S).current&&l(this,E,(t(this,E)+1)%t(this,h).length)});_.isBrowser&&(l(this,p,parseInt(((e==null?void 0:e.pad)||this.getAttribute("pad")||"1").toString())),t(this,b).subscribe(t(this,a)),t(this,d).subscribe(t(this,a)),t(this,m).subscribe(t(this,a)),this.addEventListener("sourceCapture",i=>{this.consumerElement.addEventListener("canvasRender",t(this,v))}),this.addEventListener("sourceRelease",i=>{this.consumerElement.removeEventListener("canvasRender",t(this,v))}))}setProgress(e){t(this,h).length&&l(this,E,Math.floor((t(this,h).length-1)*e))}connectedCallback(){super.connectedCallback(),t(this,S).observe(),t(this,b).observe(),t(this,d).observe(),t(this,m).observe(),R.elementResizer.subscribe(this,t(this,a))}disconnectedCallback(){super.disconnectedCallback(),t(this,S).unobserve(),t(this,b).unobserve(),t(this,d).unobserve(),t(this,m).unobserve(),l(this,h,[]),R.elementResizer.unsubscribe(t(this,a)),this.consumerElement.removeEventListener("canvasRender",t(this,v))}createConsumer(){return new M.CanvasElement}consumeSource(e){return L(this,null,function*(){var i,f,w,y;if(e){this.consumerElement.removeEventListener("canvasRender",t(this,v));const u=[],o=W(e);if(o)for(let r=o.start;r<=o.end;r++){const q=e.replace(/\{([^}]+)\}/,r.toString().padStart(t(this,p),"0")),C=new Image;C.src=q,u.push(C)}else{const r=new Image;r.src=e,u.push(r)}try{yield Promise.all(u.map((r,q)=>new Promise((C,B)=>{r.onload=()=>{C()},r.onerror=j=>{B(`${r.src} Image not found`)}}))),l(this,h,u),t(this,a).call(this),(f=(i=this.consumerElement).onload)==null||f.call(i,new Event("load")),this.isLazy||this.consumerElement.addEventListener("canvasRender",t(this,v))}catch(r){console.error(r),(y=(w=this.consumerElement).onerror)==null||y.call(w,new Event("error"))}}})}}h=new WeakMap,b=new WeakMap,S=new WeakMap,d=new WeakMap,m=new WeakMap,g=new WeakMap,E=new WeakMap,p=new WeakMap,a=new WeakMap,v=new WeakMap;_.isBrowser&&!customElements.get("e-sequence")&&customElements.define("e-sequence",k);exports.SequenceElement=k;
1
+ "use strict";var x=s=>{throw TypeError(s)};var I=(s,n,e)=>n.has(s)||x("Cannot "+e);var t=(s,n,e)=>(I(s,n,"read from private field"),e?e.call(s):n.get(s)),c=(s,n,e)=>n.has(s)?x("Cannot add the same private member more than once"):n instanceof WeakSet?n.add(s):n.set(s,e),l=(s,n,e,i)=>(I(s,n,"write to private field"),i?i.call(s,e):n.set(s,e),e);var L=(s,n,e)=>new Promise((i,f)=>{var w=o=>{try{u(e.next(o))}catch(r){f(r)}},y=o=>{try{u(e.throw(o))}catch(r){f(r)}},u=o=>o.done?i(o.value):Promise.resolve(o.value).then(w,y);u((e=e.apply(s,n)).next())});Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const q=require("../css-property/index.cjs"),R=require("../element-resizer/index.cjs"),k=require("../index-DekP7OZe.cjs"),z=require("../canvas-CU5Xjahf.cjs");require("construct-style-sheets-polyfill");const H=require("../SourceElement-D_YeNqsI.cjs");require("../window-resizer/index.cjs");require("../Store-Cd1GlEmZ.cjs");const M=require("../canvas/index.cjs");function W(s){const n=s.match(/\{([\d-]+)\}/);if(n){const e=n[1].split("-");if(e.length===2){const i=parseInt(e[0],10),f=parseInt(e[1],10);return{start:i,end:f}}}return null}var h,E,S,m,d,b,g,p,a,v;class B extends H.SourceElement{constructor(e){super();c(this,h,[]);c(this,E,new q.CSSProperty(this,"--fit","contain"));c(this,S,new q.CSSProperty(this,"--autoplay",!1));c(this,m,new q.CSSProperty(this,"--offset-x",.5));c(this,d,new q.CSSProperty(this,"--offset-y",.5));c(this,b,null);c(this,g,0);c(this,p,1);c(this,a,()=>{if(t(this,h).length){const e=t(this,h)[0];t(this,E).current==="cover"?l(this,b,z.cover(e.naturalWidth,e.naturalHeight,this.consumerElement.width,this.consumerElement.height,t(this,m).current,t(this,d).current)):l(this,b,z.contain(e.naturalWidth,e.naturalHeight,this.consumerElement.width,this.consumerElement.height,t(this,m).current,t(this,d).current))}});c(this,v,e=>{if(this.status.isFalse("loaded")||!t(this,b))return;e.detail.context.clearRect(0,0,e.detail.width,e.detail.height);const i=t(this,h)[t(this,g)];i&&e.detail.context.drawImage(i,...t(this,b)),t(this,S).current&&l(this,g,(t(this,g)+1)%t(this,h).length)});k.isBrowser&&(l(this,p,parseInt(((e==null?void 0:e.pad)||this.getAttribute("pad")||"1").toString())),t(this,E).subscribe(t(this,a)),t(this,m).subscribe(t(this,a)),t(this,d).subscribe(t(this,a)),this.addEventListener("sourceCapture",i=>{this.consumerElement.addEventListener("canvasRender",t(this,v))}),this.addEventListener("sourceRelease",i=>{this.consumerElement.removeEventListener("canvasRender",t(this,v))}))}setProgress(e){t(this,h).length&&l(this,g,Math.floor((t(this,h).length-1)*e))}connectedCallback(){super.connectedCallback(),t(this,S).observe(),t(this,E).observe(),t(this,m).observe(),t(this,d).observe(),R.elementResizer.subscribe(this,t(this,a))}disconnectedCallback(){super.disconnectedCallback(),t(this,S).unobserve(),t(this,E).unobserve(),t(this,m).unobserve(),t(this,d).unobserve(),l(this,h,[]),R.elementResizer.unsubscribe(t(this,a)),this.consumerElement.removeEventListener("canvasRender",t(this,v))}createConsumer(){return new M.CanvasElement}consumeSource(e){return L(this,null,function*(){var i,f,w,y;if(e){this.consumerElement.removeEventListener("canvasRender",t(this,v));const u=[],o=W(e);if(o)for(let r=o.start;r<=o.end;r++){const P=e.replace(/\{([^}]+)\}/,r.toString().padStart(t(this,p),"0")),C=new Image;C.src=P,u.push(C)}else{const r=new Image;r.src=e,u.push(r)}try{yield Promise.all(u.map((r,P)=>new Promise((C,_)=>{r.onload=()=>{C()},r.onerror=j=>{_(`${r.src} Image not found`)}}))),l(this,h,u),t(this,a).call(this),(f=(i=this.consumerElement).onload)==null||f.call(i,new Event("load")),this.isLazy||this.consumerElement.addEventListener("canvasRender",t(this,v))}catch(r){console.error(r),(y=(w=this.consumerElement).onerror)==null||y.call(w,new Event("error"))}}})}}h=new WeakMap,E=new WeakMap,S=new WeakMap,m=new WeakMap,d=new WeakMap,b=new WeakMap,g=new WeakMap,p=new WeakMap,a=new WeakMap,v=new WeakMap;k.isBrowser&&!customElements.get("e-sequence")&&customElements.define("e-sequence",B);exports.SequenceElement=B;
@@ -21,11 +21,12 @@ var R = (s, n, e) => new Promise((i, p) => {
21
21
  });
22
22
  import { CSSProperty as I } from "../css-property/index.js";
23
23
  import { elementResizer as k } from "../element-resizer/index.js";
24
- import { i as q } from "../index-euf5anj6.js";
24
+ import { i as q } from "../index-Bv9zgfdb.js";
25
25
  import { c as B, a as H } from "../canvas-DeZ0SLUJ.js";
26
- import { SourceElement as W } from "../source/index.js";
26
+ import "construct-style-sheets-polyfill";
27
+ import { a as W } from "../SourceElement-jbviggZp.js";
27
28
  import "../window-resizer/index.js";
28
- import "../Store-swP_0ymB.js";
29
+ import "../Store-0BVty6AZ.js";
29
30
  import { CanvasElement as A } from "../canvas/index.js";
30
31
  function D(s) {
31
32
  const n = s.match(/\{([\d-]+)\}/);
@@ -1 +1 @@
1
- "use strict";var m=e=>{throw TypeError(e)};var c=(e,s,t)=>s.has(e)||m("Cannot "+t);var r=(e,s,t)=>(c(e,s,"read from private field"),t?t.call(e):s.get(e)),o=(e,s,t)=>s.has(e)?m("Cannot add the same private member more than once"):s instanceof WeakSet?s.add(e):s.set(e,t),l=(e,s,t,n)=>(c(e,s,"write to private field"),n?n.call(e,t):s.set(e,t),t);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const d=require("../element-resizer/index.cjs"),u=require("../index-Cqw2NKev.cjs");var i,h;class y extends HTMLElement{constructor(){super(...arguments);o(this,i,this);o(this,h,()=>{r(this,i).style.removeProperty("--width"),r(this,i).style.removeProperty("--height"),setTimeout(()=>{const t=this.offsetWidth,n=this.offsetHeight;r(this,i).style.setProperty("--width",t+"px"),r(this,i).style.setProperty("--height",n+"px")},0)})}connectedCallback(){var n;const t=(n=this.getAttribute("target"))==null?void 0:n.trim();t&&(t==="parent"?l(this,i,this.parentElement||this):l(this,i,document.querySelector(t)||this)),d.elementResizer.subscribe(this,r(this,h))}disconnectedCallback(){d.elementResizer.unsubscribe(r(this,h)),r(this,i).style.removeProperty("--width"),r(this,i).style.removeProperty("--height")}}i=new WeakMap,h=new WeakMap;u.isBrowser&&!customElements.get("e-size-element")&&customElements.define("e-size-element",y);exports.SizeElement=y;
1
+ "use strict";var m=e=>{throw TypeError(e)};var c=(e,s,t)=>s.has(e)||m("Cannot "+t);var r=(e,s,t)=>(c(e,s,"read from private field"),t?t.call(e):s.get(e)),o=(e,s,t)=>s.has(e)?m("Cannot add the same private member more than once"):s instanceof WeakSet?s.add(e):s.set(e,t),l=(e,s,t,n)=>(c(e,s,"write to private field"),n?n.call(e,t):s.set(e,t),t);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const d=require("../element-resizer/index.cjs"),y=require("../index-DekP7OZe.cjs");require("construct-style-sheets-polyfill");var i,h;class u extends HTMLElement{constructor(){super(...arguments);o(this,i,this);o(this,h,()=>{r(this,i).style.removeProperty("--width"),r(this,i).style.removeProperty("--height"),setTimeout(()=>{const t=this.offsetWidth,n=this.offsetHeight;r(this,i).style.setProperty("--width",t+"px"),r(this,i).style.setProperty("--height",n+"px")},0)})}connectedCallback(){var n;const t=(n=this.getAttribute("target"))==null?void 0:n.trim();t&&(t==="parent"?l(this,i,this.parentElement||this):l(this,i,document.querySelector(t)||this)),d.elementResizer.subscribe(this,r(this,h))}disconnectedCallback(){d.elementResizer.unsubscribe(r(this,h)),r(this,i).style.removeProperty("--width"),r(this,i).style.removeProperty("--height")}}i=new WeakMap,h=new WeakMap;y.isBrowser&&!customElements.get("e-size-element")&&customElements.define("e-size-element",u);exports.SizeElement=u;
@@ -4,7 +4,8 @@ var l = (e) => {
4
4
  var c = (e, s, t) => s.has(e) || l("Cannot " + t);
5
5
  var r = (e, s, t) => (c(e, s, "read from private field"), t ? t.call(e) : s.get(e)), m = (e, s, t) => s.has(e) ? l("Cannot add the same private member more than once") : s instanceof WeakSet ? s.add(e) : s.set(e, t), n = (e, s, t, h) => (c(e, s, "write to private field"), h ? h.call(e, t) : s.set(e, t), t);
6
6
  import { elementResizer as p } from "../element-resizer/index.js";
7
- import { i as y } from "../index-euf5anj6.js";
7
+ import { i as y } from "../index-Bv9zgfdb.js";
8
+ import "construct-style-sheets-polyfill";
8
9
  var i, o;
9
10
  class a extends HTMLElement {
10
11
  constructor() {
@@ -1,11 +1,11 @@
1
- "use strict";var T=i=>{throw TypeError(i)};var M=(i,t,s)=>t.has(i)||T("Cannot "+s);var e=(i,t,s)=>(M(i,t,"read from private field"),s?s.call(i):t.get(i)),l=(i,t,s)=>t.has(i)?T("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(i):t.set(i,s),r=(i,t,s,a)=>(M(i,t,"write to private field"),a?a.call(i,s):t.set(i,s),s),m=(i,t,s)=>(M(i,t,"access private method"),s);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const $=require("../media/index.cjs"),C=require("../index-Cqw2NKev.cjs");var y,o;class H{constructor(t){l(this,y);l(this,o);r(this,y,t.index),r(this,o,document.createElement("span")),e(this,o).classList.add("letter"),t.clone?e(this,o).innerHTML=`
1
+ "use strict";var T=i=>{throw TypeError(i)};var M=(i,t,s)=>t.has(i)||T("Cannot "+s);var e=(i,t,s)=>(M(i,t,"read from private field"),s?s.call(i):t.get(i)),l=(i,t,s)=>t.has(i)?T("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(i):t.set(i,s),r=(i,t,s,u)=>(M(i,t,"write to private field"),u?u.call(i,s):t.set(i,s),s),m=(i,t,s)=>(M(i,t,"access private method"),s);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const $=require("../media/index.cjs"),C=require("../index-DekP7OZe.cjs");require("construct-style-sheets-polyfill");var y,o;class H{constructor(t){l(this,y);l(this,o);r(this,y,t.index),r(this,o,document.createElement("span")),e(this,o).classList.add("letter"),t.clone?e(this,o).innerHTML=`
2
2
  <span class="original">${t.text}</span>
3
3
  <span class="clone" aria-hidden>${t.text}</span>
4
4
  `:e(this,o).innerHTML=`
5
5
  <span class="value">${t.text}</span>
6
- `}get index(){return e(this,y)}get element(){return e(this,o)}}y=new WeakMap,o=new WeakMap;var L,h,u,g;class S{constructor(t){l(this,L);l(this,h);l(this,u);l(this,g);r(this,L,t.index),r(this,h,document.createElement("span")),r(this,u,[]),r(this,g,t.text.endsWith("\\n")),e(this,g)&&(t.text=t.text.replace("\\n","")),t.letters&&t.lettersAcc!==void 0?(r(this,u,t.text.split("").map((s,a)=>new H({index:t.lettersAcc+a,text:s,clone:t.clone}))),e(this,h).append(...e(this,u).map(s=>s.element))):t.clone?e(this,h).innerHTML=`
6
+ `}get index(){return e(this,y)}get element(){return e(this,o)}}y=new WeakMap,o=new WeakMap;var L,h,a,g;class S{constructor(t){l(this,L);l(this,h);l(this,a);l(this,g);r(this,L,t.index),r(this,h,document.createElement("span")),r(this,a,[]),r(this,g,t.text.endsWith("\\n")),e(this,g)&&(t.text=t.text.replace("\\n","")),t.letters&&t.lettersAcc!==void 0?(r(this,a,t.text.split("").map((s,u)=>new H({index:t.lettersAcc+u,text:s,clone:t.clone}))),e(this,h).append(...e(this,a).map(s=>s.element))):t.clone?e(this,h).innerHTML=`
7
7
  <span class="original">${t.text}</span>
8
8
  <span class="clone" aria-hidden>${t.text}</span>
9
9
  `:e(this,h).innerHTML=`
10
10
  <span class="value">${t.text}</span>
11
- `,e(this,h).classList.add("word")}get index(){return e(this,L)}get element(){return e(this,h)}get letters(){return e(this,u)}get hasNewLine(){return e(this,g)}}L=new WeakMap,h=new WeakMap,u=new WeakMap,g=new WeakMap;var p,c,x,f,d,b,A;class v extends HTMLElement{constructor(){super(...arguments);l(this,d);l(this,p,"");l(this,c,[]);l(this,x,[]);l(this,f,null)}get wordsArray(){return e(this,c)}get lettersArray(){return e(this,x)}get originalHTML(){return e(this,p)}connectedCallback(){r(this,p,this.innerHTML.trim()),this.hasAttribute("media")?(r(this,f,new $.Media(this.getAttribute("media"))),e(this,f).subscribe(s=>{s.current?m(this,d,b).call(this):!s.current&&s.previous&&m(this,d,A).call(this)})):m(this,d,b).call(this)}disconnectedCallback(){var s;m(this,d,A).call(this),(s=e(this,f))==null||s.close()}}p=new WeakMap,c=new WeakMap,x=new WeakMap,f=new WeakMap,d=new WeakSet,b=function(){const s=[];r(this,c,[]);let a=0,E=0;this.childNodes.forEach(n=>{n.nodeName==="#text"&&n.textContent?n.textContent.trim().replace(/ +/g," ").split(" ").map(P=>{const w=new S({index:a,text:P+" ",letters:this.hasAttribute("letters"),lettersAcc:E,clone:this.hasAttribute("clone")});E+=w.letters.length,a+=1,e(this,x).push(...w.letters),e(this,c).push(w),s.push(w.element)}):s.push(n)}),this.hasAttribute("index")&&(e(this,c).forEach(n=>{n.element.style.setProperty("--word-index",n.index.toString())}),e(this,x).forEach(n=>{n.element.style.setProperty("--letter-index",n.index.toString())})),this.innerHTML="",s.forEach(n=>{this.appendChild(n)}),this.style.setProperty("--words-length",e(this,c).length.toString()),this.style.setProperty("--letters-length",e(this,x).length.toString())},A=function(){r(this,c,[]),this.innerHTML=e(this,p),this.style.removeProperty("--words-length"),this.style.removeProperty("--letters-length")};C.isBrowser&&!customElements.get("e-slicer")&&customElements.define("e-slicer",v);exports.Letter=H;exports.SlicerElement=v;exports.Word=S;
11
+ `,e(this,h).classList.add("word")}get index(){return e(this,L)}get element(){return e(this,h)}get letters(){return e(this,a)}get hasNewLine(){return e(this,g)}}L=new WeakMap,h=new WeakMap,a=new WeakMap,g=new WeakMap;var p,c,x,f,d,b,A;class v extends HTMLElement{constructor(){super(...arguments);l(this,d);l(this,p,"");l(this,c,[]);l(this,x,[]);l(this,f,null)}get wordsArray(){return e(this,c)}get lettersArray(){return e(this,x)}get originalHTML(){return e(this,p)}connectedCallback(){r(this,p,this.innerHTML.trim()),this.hasAttribute("media")?(r(this,f,new $.Media(this.getAttribute("media"))),e(this,f).subscribe(s=>{s.current?m(this,d,b).call(this):!s.current&&s.previous&&m(this,d,A).call(this)})):m(this,d,b).call(this)}disconnectedCallback(){var s;m(this,d,A).call(this),(s=e(this,f))==null||s.close()}}p=new WeakMap,c=new WeakMap,x=new WeakMap,f=new WeakMap,d=new WeakSet,b=function(){const s=[];r(this,c,[]);let u=0,E=0;this.childNodes.forEach(n=>{n.nodeName==="#text"&&n.textContent?n.textContent.trim().replace(/ +/g," ").split(" ").map(P=>{const w=new S({index:u,text:P+" ",letters:this.hasAttribute("letters"),lettersAcc:E,clone:this.hasAttribute("clone")});E+=w.letters.length,u+=1,e(this,x).push(...w.letters),e(this,c).push(w),s.push(w.element)}):s.push(n)}),this.hasAttribute("index")&&(e(this,c).forEach(n=>{n.element.style.setProperty("--word-index",n.index.toString())}),e(this,x).forEach(n=>{n.element.style.setProperty("--letter-index",n.index.toString())})),this.innerHTML="",s.forEach(n=>{this.appendChild(n)}),this.style.setProperty("--words-length",e(this,c).length.toString()),this.style.setProperty("--letters-length",e(this,x).length.toString())},A=function(){r(this,c,[]),this.innerHTML=e(this,p),this.style.removeProperty("--words-length"),this.style.removeProperty("--letters-length")};C.isBrowser&&!customElements.get("e-slicer")&&customElements.define("e-slicer",v);exports.Letter=H;exports.SlicerElement=v;exports.Word=S;