aptechka 0.83.1 → 0.84.1

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 (286) hide show
  1. package/lib/Animation-BUD5w3AB.js +110 -0
  2. package/lib/Animation-BtUdarQ7.cjs +1 -0
  3. package/lib/Composed-BI5oe4Ij.cjs +1 -0
  4. package/lib/Composed-BaevH-MP.js +75 -0
  5. package/lib/Damped-BHm2IuyN.cjs +1 -0
  6. package/lib/Damped-Ds17AUU-.js +57 -0
  7. package/lib/DerivedArray-BePrxcLC.js +63 -0
  8. package/lib/DerivedArray-xYBpcTp8.cjs +1 -0
  9. package/lib/DragControls-BgTBgiue.js +233 -0
  10. package/lib/DragControls-FmiuZDKq.cjs +1 -0
  11. package/lib/LocalLinks-BdqYzt1b.js +65 -0
  12. package/lib/LocalLinks-D1mYcA-B.cjs +1 -0
  13. package/lib/PageAnnouncerElement-CJ-MfwJ8.cjs +1 -0
  14. package/lib/PageAnnouncerElement-HcphPbXZ.js +28 -0
  15. package/lib/PageScroll-CrfCwDA4.js +65 -0
  16. package/lib/PageScroll-IlOCUUte.cjs +1 -0
  17. package/lib/SourceElement-DC726HMy.js +265 -0
  18. package/lib/SourceElement-DNyrQby1.cjs +5 -0
  19. package/lib/Store-BRTHeZmO.js +158 -0
  20. package/lib/Store-DZnOrofs.cjs +1 -0
  21. package/lib/Tweened-3UYSwrvs.cjs +1 -0
  22. package/lib/Tweened-DabaFaHX.js +48 -0
  23. package/lib/Viewport-0n1C_IoN.js +113 -0
  24. package/lib/Viewport-D26fEJOk.cjs +1 -0
  25. package/lib/accordion/index.cjs +1 -1
  26. package/lib/accordion/index.js +97 -93
  27. package/lib/animation/index.cjs +1 -1
  28. package/lib/animation/index.js +6 -6
  29. package/lib/api-fetcher/index.cjs +1 -1
  30. package/lib/api-fetcher/index.js +67 -66
  31. package/lib/attribute/index.cjs +1 -1
  32. package/lib/attribute/index.js +37 -34
  33. package/lib/attributes-BADnRZpK.cjs +1 -0
  34. package/lib/attributes-FObgMNCf.js +36 -0
  35. package/lib/billboard/index.cjs +1 -1
  36. package/lib/billboard/index.js +240 -232
  37. package/lib/cache/index.cjs +1 -1
  38. package/lib/cache/index.js +26 -23
  39. package/lib/canvas/index.cjs +1 -1
  40. package/lib/canvas/index.js +61 -59
  41. package/lib/canvas-BP1ceie3.cjs +1 -0
  42. package/lib/canvas-DsglKco1.js +40 -0
  43. package/lib/connector/index.cjs +1 -1
  44. package/lib/connector/index.js +44 -41
  45. package/lib/controls/index.cjs +1 -1
  46. package/lib/controls/index.js +6 -6
  47. package/lib/coordinates--JG1U6kQ.js +29 -0
  48. package/lib/coordinates-DQ9XV9M1.cjs +1 -0
  49. package/lib/css-property/index.cjs +1 -1
  50. package/lib/css-property/index.d.ts +1 -1
  51. package/lib/css-property/index.js +40 -37
  52. package/lib/css-unit-parser/index.cjs +2 -2
  53. package/lib/css-unit-parser/index.js +22 -19
  54. package/lib/css-value-parser/index.cjs +1 -1
  55. package/lib/css-value-parser/index.js +13 -11
  56. package/lib/custom-elements-BfZCJde6.cjs +1 -0
  57. package/lib/custom-elements-HEMuF7yH.js +27 -0
  58. package/lib/dev/index.cjs +2 -1
  59. package/lib/dev/index.d.ts +1 -0
  60. package/lib/dev/index.js +24 -10
  61. package/lib/device/index.cjs +1 -1
  62. package/lib/device/index.js +5 -5
  63. package/lib/dom-B40i6NXw.cjs +1 -0
  64. package/lib/dom-D8D-_9ty.js +108 -0
  65. package/lib/easings-BSGJFMAo.js +40 -0
  66. package/lib/easings-BWq0pPLq.cjs +1 -0
  67. package/lib/element-CqD0jqBJ.cjs +1 -0
  68. package/lib/element-DKw5H-Tu.js +10 -0
  69. package/lib/element-linked-store/index.cjs +1 -1
  70. package/lib/element-linked-store/index.js +53 -52
  71. package/lib/element-resizer/index.cjs +1 -1
  72. package/lib/element-resizer/index.js +47 -44
  73. package/lib/en3/index.cjs +4 -4
  74. package/lib/en3/index.js +191 -185
  75. package/lib/events-Ds-TuvYW.js +9 -0
  76. package/lib/events-UlGk63iC.cjs +1 -0
  77. package/lib/file-DwQs6bB6.js +28 -0
  78. package/lib/file-RHfA3OS-.cjs +1 -0
  79. package/lib/function-H4b_gTg6.cjs +1 -0
  80. package/lib/function-UmbPrOHm.js +19 -0
  81. package/lib/gestures-DmKKNnh4.js +14 -0
  82. package/lib/gestures-DtYbQr49.cjs +1 -0
  83. package/lib/history/index.cjs +1 -1
  84. package/lib/history/index.js +24 -21
  85. package/lib/iframe/index.cjs +1 -1
  86. package/lib/iframe/index.js +27 -24
  87. package/lib/image/index.cjs +1 -1
  88. package/lib/image/index.js +17 -13
  89. package/lib/index-ClTMVKJp.js +183 -0
  90. package/lib/index-DZ44osDT.cjs +1 -0
  91. package/lib/intersector/index.cjs +1 -1
  92. package/lib/intersector/index.js +3 -3
  93. package/lib/jsx/ComponentElement.d.ts +4 -0
  94. package/lib/jsx/h.d.ts +7 -16
  95. package/lib/jsx/hooks/component/useStylesheet.d.ts +1 -1
  96. package/lib/jsx/hooks/cssProperty.d.ts +6 -0
  97. package/lib/jsx/hooks/resize.d.ts +4 -0
  98. package/lib/jsx/hooks/store.d.ts +1 -2
  99. package/lib/jsx/hooks/ticker.d.ts +5 -0
  100. package/lib/jsx/index.cjs +1 -1
  101. package/lib/jsx/index.d.ts +4 -4
  102. package/lib/jsx/index.js +170 -349
  103. package/lib/jsx/plugins/vite/index.cjs +49 -0
  104. package/lib/jsx/plugins/vite/index.d.ts +38 -0
  105. package/lib/jsx/plugins/vite/index.js +104 -0
  106. package/lib/jsx/render.d.ts +2 -0
  107. package/lib/jsx/type.d.ts +228 -190
  108. package/lib/ladder/index.cjs +1 -1
  109. package/lib/ladder/index.js +86 -84
  110. package/lib/layout-C26zkY7D.js +35 -0
  111. package/lib/layout-CnGLl7oe.cjs +1 -0
  112. package/lib/layout-box/index.cjs +1 -1
  113. package/lib/layout-box/index.js +220 -217
  114. package/lib/loading/index.cjs +1 -1
  115. package/lib/loading/index.js +48 -45
  116. package/lib/local-links/index.cjs +1 -1
  117. package/lib/local-links/index.js +2 -2
  118. package/lib/masonry-layout/index.cjs +1 -1
  119. package/lib/masonry-layout/index.js +48 -45
  120. package/lib/math-C-knY2TL.cjs +1 -0
  121. package/lib/math-r8V23YFe.js +57 -0
  122. package/lib/media/index.cjs +1 -1
  123. package/lib/media/index.js +28 -25
  124. package/lib/metadata-BNdkmeeD.js +15 -0
  125. package/lib/metadata-BrHUfpV9.cjs +1 -0
  126. package/lib/morph/index.cjs +1 -1
  127. package/lib/morph/index.js +561 -556
  128. package/lib/morph-BtgB1YQP.js +256 -0
  129. package/lib/morph-Buhxq-X0.cjs +1 -0
  130. package/lib/need_redo_tweaker/index.cjs +4 -4
  131. package/lib/need_redo_tweaker/index.js +862 -835
  132. package/lib/notifier/index.cjs +1 -1
  133. package/lib/notifier/index.js +29 -26
  134. package/lib/number-Bu4sGvW7.cjs +1 -0
  135. package/lib/number-DiVt2xnh.js +47 -0
  136. package/lib/object-CiIdEmJx.js +98 -0
  137. package/lib/object-DTY_W6xG.cjs +1 -0
  138. package/lib/order/index.cjs +1 -1
  139. package/lib/order/index.js +3 -3
  140. package/lib/page-announcer/index.cjs +1 -1
  141. package/lib/page-announcer/index.js +2 -2
  142. package/lib/page-scroll/index.cjs +1 -1
  143. package/lib/page-scroll/index.js +2 -2
  144. package/lib/pixel-perfect/index.cjs +4 -4
  145. package/lib/pixel-perfect/index.js +43 -40
  146. package/lib/pointer/index.cjs +1 -1
  147. package/lib/pointer/index.js +125 -123
  148. package/lib/polyfills-CG1XJNia.js +28 -0
  149. package/lib/polyfills-DZCuDBkA.cjs +1 -0
  150. package/lib/popover/index.cjs +1 -1
  151. package/lib/popover/index.js +249 -245
  152. package/lib/radio/index.cjs +1 -1
  153. package/lib/radio/index.js +58 -55
  154. package/lib/render-H9BjFLZ3.cjs +1 -0
  155. package/lib/render-LpimRXgl.js +354 -0
  156. package/lib/router/index.cjs +1 -1
  157. package/lib/router/index.js +196 -194
  158. package/lib/scroll/index.cjs +1 -1
  159. package/lib/scroll/index.js +890 -878
  160. package/lib/scroll-D2tOpCnP.cjs +1 -0
  161. package/lib/scroll-DoNeuIgT.js +41 -0
  162. package/lib/scroll-entries/index.cjs +1 -1
  163. package/lib/scroll-entries/index.js +37 -34
  164. package/lib/scroll-kit/index.cjs +1 -1
  165. package/lib/scroll-kit/index.js +213 -209
  166. package/lib/sequence/index.cjs +1 -1
  167. package/lib/sequence/index.js +102 -98
  168. package/lib/size-element/index.cjs +1 -1
  169. package/lib/size-element/index.js +29 -26
  170. package/lib/slicer/index.cjs +1 -1
  171. package/lib/slicer/index.js +118 -113
  172. package/lib/source/index.cjs +1 -1
  173. package/lib/source/index.js +5 -5
  174. package/lib/spa/index.cjs +1 -1
  175. package/lib/spa/index.js +94 -94
  176. package/lib/store/index.cjs +1 -1
  177. package/lib/store/index.d.ts +2 -2
  178. package/lib/store/index.js +10 -8
  179. package/lib/string-B3lm2b7v.js +84 -0
  180. package/lib/string-CbRNzmd9.cjs +1 -0
  181. package/lib/style-DBoQWK0d.js +14 -0
  182. package/lib/style-IDJ6db6n.cjs +1 -0
  183. package/lib/stylesheet-CBTuup4f.js +28 -0
  184. package/lib/stylesheet-xM7sMeuo.cjs +1 -0
  185. package/lib/ticker/index.cjs +1 -1
  186. package/lib/ticker/index.js +4 -120
  187. package/lib/url-CPCO10Sy.cjs +1 -0
  188. package/lib/url-CWCY_qe_.js +124 -0
  189. package/lib/utils/attributes.d.ts +2 -0
  190. package/lib/utils/dom.d.ts +1 -0
  191. package/lib/utils/index.cjs +1 -1
  192. package/lib/utils/index.js +260 -226
  193. package/lib/utils/polyfills.d.ts +1 -1
  194. package/lib/utils/timeouts.d.ts +6 -1
  195. package/lib/video/index.cjs +1 -1
  196. package/lib/video/index.js +35 -33
  197. package/lib/window-resizer/index.cjs +1 -1
  198. package/lib/window-resizer/index.js +27 -24
  199. package/lib/youtube/index.cjs +1 -1
  200. package/lib/youtube/index.js +56 -54
  201. package/package.json +11 -24
  202. package/lib/Animation-BzTjZIE-.js +0 -108
  203. package/lib/Animation-C39Ah-LM.cjs +0 -1
  204. package/lib/Composed-C-TV9te3.cjs +0 -1
  205. package/lib/Composed-DyAWjEXE.js +0 -121
  206. package/lib/Damped-CRusiRIV.js +0 -56
  207. package/lib/Damped-Prr0iKu1.cjs +0 -1
  208. package/lib/DragControls-8rNZwQrs.cjs +0 -1
  209. package/lib/DragControls-DBNdMBA4.js +0 -228
  210. package/lib/LocalLinks-BxhSFv_Q.cjs +0 -1
  211. package/lib/LocalLinks-DFZFpbjs.js +0 -62
  212. package/lib/PageAnnouncerElement-0LxZjtVH.js +0 -24
  213. package/lib/PageAnnouncerElement-AQ0Ja6HM.cjs +0 -1
  214. package/lib/PageScroll-0LxFblry.js +0 -62
  215. package/lib/PageScroll-BXJUQwG7.cjs +0 -1
  216. package/lib/SourceElement-BHqPFbna.cjs +0 -5
  217. package/lib/SourceElement-DjbHjynf.js +0 -260
  218. package/lib/Store-Blf4msDz.cjs +0 -1
  219. package/lib/Store-ZThXYBQd.js +0 -152
  220. package/lib/Tweened-Bw1Cn1PJ.js +0 -47
  221. package/lib/Tweened-DWtk9E-O.cjs +0 -1
  222. package/lib/Viewport-BxCr0GlB.cjs +0 -1
  223. package/lib/Viewport-Dt-d9DPi.js +0 -109
  224. package/lib/attributes-69we3byR.js +0 -10
  225. package/lib/attributes-Bf2svn4j.cjs +0 -1
  226. package/lib/canvas-CU5Xjahf.cjs +0 -1
  227. package/lib/canvas-DeZ0SLUJ.js +0 -34
  228. package/lib/coordinates-CgdGoSYs.js +0 -24
  229. package/lib/coordinates-D8Np3cPD.cjs +0 -1
  230. package/lib/custom-elements-DBnCK7Zx.js +0 -24
  231. package/lib/custom-elements-Dh4TWRDJ.cjs +0 -1
  232. package/lib/dom-BETkVSSZ.js +0 -82
  233. package/lib/dom-CBLlqORw.cjs +0 -1
  234. package/lib/easings-BEmRlrDd.js +0 -38
  235. package/lib/easings-GegIwET5.cjs +0 -1
  236. package/lib/element-CGVl1jA-.js +0 -7
  237. package/lib/element-yhcBhsho.cjs +0 -1
  238. package/lib/events-CsVF98U6.js +0 -6
  239. package/lib/events-KVanG9sR.cjs +0 -1
  240. package/lib/file-DSpfWdd9.cjs +0 -1
  241. package/lib/file-GHShUlue.js +0 -24
  242. package/lib/function-C10DGppn.js +0 -17
  243. package/lib/function-MthRj-GJ.cjs +0 -1
  244. package/lib/gestures-C7gbKx11.cjs +0 -1
  245. package/lib/gestures-CcXV6fCp.js +0 -11
  246. package/lib/index-OE2INULi.cjs +0 -1
  247. package/lib/index-e9eDuagL.js +0 -65
  248. package/lib/jsx/hydrate.d.ts +0 -1
  249. package/lib/jsx/integrations/astro/client.cjs +0 -1
  250. package/lib/jsx/integrations/astro/client.d.ts +0 -2
  251. package/lib/jsx/integrations/astro/client.js +0 -50
  252. package/lib/jsx/integrations/astro/index.cjs +0 -1
  253. package/lib/jsx/integrations/astro/index.d.ts +0 -2
  254. package/lib/jsx/integrations/astro/index.js +0 -54
  255. package/lib/jsx/integrations/astro/server.cjs +0 -1
  256. package/lib/jsx/integrations/astro/server.d.ts +0 -3
  257. package/lib/jsx/integrations/astro/server.js +0 -35
  258. package/lib/jsx/plugins/vite.d.ts +0 -21
  259. package/lib/layout-BSMtwCga.js +0 -29
  260. package/lib/layout-Ctc2p3uz.cjs +0 -1
  261. package/lib/math-BOBiC4TN.js +0 -45
  262. package/lib/math-GDWEqu7y.cjs +0 -1
  263. package/lib/metadata-BcYZ5w3T.cjs +0 -1
  264. package/lib/metadata-jfowcCyz.js +0 -12
  265. package/lib/morph-B6sGhLCi.cjs +0 -1
  266. package/lib/morph-BQErz7qP.js +0 -242
  267. package/lib/number-ChAm68cm.cjs +0 -1
  268. package/lib/number-CumqY64S.js +0 -40
  269. package/lib/object-CcMK4y_r.js +0 -87
  270. package/lib/object-baN9pgbU.cjs +0 -1
  271. package/lib/polyfills-DJrTJQky.js +0 -24
  272. package/lib/polyfills-Df4r-ETT.cjs +0 -1
  273. package/lib/render-DQs7rIoN.cjs +0 -1
  274. package/lib/render-D_0FCWEu.js +0 -18
  275. package/lib/scroll-BA2WnUrb.cjs +0 -1
  276. package/lib/scroll-DY5senkF.js +0 -37
  277. package/lib/string-BlMQbe8b.js +0 -70
  278. package/lib/string-DUXXtU8v.cjs +0 -1
  279. package/lib/style-At6aDoqG.cjs +0 -1
  280. package/lib/style-j2TwriJ_.js +0 -10
  281. package/lib/stylesheet-5_o7PFzM.cjs +0 -1
  282. package/lib/stylesheet-DdBzowZY.js +0 -24
  283. package/lib/url-CHgcNwJ1.cjs +0 -1
  284. package/lib/url-CYgo5vrG.js +0 -113
  285. package/lib/vite-C-i3hVDL.js +0 -75
  286. package/lib/vite-DzanPumM.cjs +0 -44
@@ -1,151 +1,152 @@
1
- var li = Object.defineProperty;
2
- var qs = Object.getOwnPropertySymbols, ci = Object.getPrototypeOf, ui = Object.prototype.hasOwnProperty, ai = Object.prototype.propertyIsEnumerable, di = Reflect.get;
3
- var Us = (d) => {
4
- throw TypeError(d);
1
+ var __defProp = Object.defineProperty;
2
+ var __getOwnPropSymbols = Object.getOwnPropertySymbols, __getProtoOf = Object.getPrototypeOf, __hasOwnProp = Object.prototype.hasOwnProperty, __propIsEnum = Object.prototype.propertyIsEnumerable, __reflectGet = Reflect.get;
3
+ var __typeError = (msg) => {
4
+ throw TypeError(msg);
5
5
  };
6
- var Gs = (d, n, e) => n in d ? li(d, n, { enumerable: !0, configurable: !0, writable: !0, value: e }) : d[n] = e, Ks = (d, n) => {
7
- for (var e in n || (n = {}))
8
- ui.call(n, e) && Gs(d, e, n[e]);
9
- if (qs)
10
- for (var e of qs(n))
11
- ai.call(n, e) && Gs(d, e, n[e]);
12
- return d;
6
+ var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: !0, configurable: !0, writable: !0, value }) : obj[key] = value, __spreadValues = (a, b) => {
7
+ for (var prop in b || (b = {}))
8
+ __hasOwnProp.call(b, prop) && __defNormalProp(a, prop, b[prop]);
9
+ if (__getOwnPropSymbols)
10
+ for (var prop of __getOwnPropSymbols(b))
11
+ __propIsEnum.call(b, prop) && __defNormalProp(a, prop, b[prop]);
12
+ return a;
13
13
  };
14
- var ks = (d, n, e) => n.has(d) || Us("Cannot " + e);
15
- var t = (d, n, e) => (ks(d, n, "read from private field"), e ? e.call(d) : n.get(d)), i = (d, n, e) => n.has(d) ? Us("Cannot add the same private member more than once") : n instanceof WeakSet ? n.add(d) : n.set(d, e), r = (d, n, e, s) => (ks(d, n, "write to private field"), s ? s.call(d, e) : n.set(d, e), e), o = (d, n, e) => (ks(d, n, "access private method"), e);
16
- var Vs = (d, n, e) => di(ci(d), e, n);
17
- var zs = (d, n, e) => new Promise((s, h) => {
18
- var u = (C) => {
14
+ var __name = (target, value) => __defProp(target, "name", { value, configurable: !0 });
15
+ var __accessCheck = (obj, member, msg) => member.has(obj) || __typeError("Cannot " + msg);
16
+ var __privateGet = (obj, member, getter) => (__accessCheck(obj, member, "read from private field"), getter ? getter.call(obj) : member.get(obj)), __privateAdd = (obj, member, value) => member.has(obj) ? __typeError("Cannot add the same private member more than once") : member instanceof WeakSet ? member.add(obj) : member.set(obj, value), __privateSet = (obj, member, value, setter) => (__accessCheck(obj, member, "write to private field"), setter ? setter.call(obj, value) : member.set(obj, value), value), __privateMethod = (obj, member, method) => (__accessCheck(obj, member, "access private method"), method);
17
+ var __superGet = (cls, obj, key) => __reflectGet(__getProtoOf(cls), key, obj);
18
+ var __async = (__this, __arguments, generator) => new Promise((resolve, reject) => {
19
+ var fulfilled = (value) => {
19
20
  try {
20
- v(e.next(C));
21
- } catch (ue) {
22
- h(ue);
21
+ step2(generator.next(value));
22
+ } catch (e) {
23
+ reject(e);
23
24
  }
24
- }, g = (C) => {
25
+ }, rejected = (value) => {
25
26
  try {
26
- v(e.throw(C));
27
- } catch (ue) {
28
- h(ue);
27
+ step2(generator.throw(value));
28
+ } catch (e) {
29
+ reject(e);
29
30
  }
30
- }, v = (C) => C.done ? s(C.value) : Promise.resolve(C.value).then(u, g);
31
- v((e = e.apply(d, n)).next());
31
+ }, step2 = (x) => x.done ? resolve(x.value) : Promise.resolve(x.value).then(fulfilled, rejected);
32
+ step2((generator = generator.apply(__this, __arguments)).next());
32
33
  });
33
- import { S as ae } from "../Store-ZThXYBQd.js";
34
- import { i as q } from "../index-e9eDuagL.js";
35
- import { q as fi } from "../easings-BEmRlrDd.js";
36
- import { i as pi } from "../element-CGVl1jA-.js";
37
- import { d as st } from "../events-CsVF98U6.js";
38
- import { d as xs } from "../function-C10DGppn.js";
39
- import { a as ls, g as cs, b as bi } from "../layout-BSMtwCga.js";
40
- import { c as js, s as mi } from "../math-BOBiC4TN.js";
41
- import { p as Si, l as gi } from "../number-CumqY64S.js";
42
- import { c as Js } from "../stylesheet-DdBzowZY.js";
43
- import "../ticker/index.js";
44
- import { TICK_ORDER as Qs, RESIZE_ORDER as Ls } from "../order/index.js";
45
- import { D as Xs } from "../Damped-CRusiRIV.js";
46
- import { T as vi } from "../Tweened-Bw1Cn1PJ.js";
47
- import { W as yi, K as Ci, D as Pi, A as Ei } from "../DragControls-DBNdMBA4.js";
48
- import { windowResizer as pt } from "../window-resizer/index.js";
49
- import { scrollEntries as ce } from "../scroll-entries/index.js";
50
- import { cssUnitParser as Zs } from "../css-unit-parser/index.js";
51
- import { CSSProperty as l } from "../css-property/index.js";
52
- import { d as wi } from "../Viewport-Dt-d9DPi.js";
34
+ import { S as Store } from "../Store-BRTHeZmO.js";
35
+ import { i as isBrowser } from "../index-ClTMVKJp.js";
36
+ import { q as easeInOutExpo } from "../easings-BSGJFMAo.js";
37
+ import { i as isElementVisible } from "../element-DKw5H-Tu.js";
38
+ import { d as dispatchEvent } from "../events-Ds-TuvYW.js";
39
+ import { d as debounce } from "../function-UmbPrOHm.js";
40
+ import { a as getCumulativeOffsetTop, g as getCumulativeOffsetLeft, b as getStickyOffset } from "../layout-C26zkY7D.js";
41
+ import { c as clamp, s as step } from "../math-r8V23YFe.js";
42
+ import { p as preciseNumber, l as loopNumber } from "../number-DiVt2xnh.js";
43
+ import { c as createStylesheet } from "../stylesheet-CBTuup4f.js";
44
+ import { TICK_ORDER, RESIZE_ORDER } from "../order/index.js";
45
+ import { D as Damped } from "../Damped-Ds17AUU-.js";
46
+ import { T as Tweened } from "../Tweened-DabaFaHX.js";
47
+ import { W as WheelControls, K as KeyboardControls, D as DragControls, A as AutoplayControls } from "../DragControls-BgTBgiue.js";
48
+ import { windowResizer } from "../window-resizer/index.js";
49
+ import { scrollEntries } from "../scroll-entries/index.js";
50
+ import { cssUnitParser } from "../css-unit-parser/index.js";
51
+ import { CSSProperty } from "../css-property/index.js";
52
+ import { d as device } from "../Viewport-0n1C_IoN.js";
53
53
  import "construct-style-sheets-polyfill";
54
- import { elementResizer as os } from "../element-resizer/index.js";
55
- import { s as xi } from "../gestures-CcXV6fCp.js";
56
- import { b as Li } from "../dom-BETkVSSZ.js";
57
- var p, Re, E, us, as, pe, bt, $t, be, Bt, Fe;
58
- class ki {
59
- constructor(n, e, s) {
60
- i(this, Bt);
61
- i(this, p);
62
- i(this, Re);
63
- i(this, E);
64
- i(this, us, 0);
65
- i(this, as, 0);
66
- i(this, pe, 0);
67
- i(this, bt, 0);
68
- i(this, $t, null);
69
- i(this, be, 0);
70
- r(this, p, n), r(this, Re, e), r(this, E, s), ce.register(t(this, p)), this.setIndex(t(this, Re));
54
+ import { elementResizer } from "../element-resizer/index.js";
55
+ import { s as setupDrag } from "../gestures-DmKKNnh4.js";
56
+ import { b as findParentElement } from "../dom-D8D-_9ty.js";
57
+ var _element, _index, _scrollElement, _width, _height, _size, _position, _currentMark, _transformPosition, _ScrollSection_instances, setVar_fn;
58
+ const _ScrollSection = class _ScrollSection {
59
+ constructor(element, index, scrollElement) {
60
+ __privateAdd(this, _ScrollSection_instances);
61
+ __privateAdd(this, _element);
62
+ __privateAdd(this, _index);
63
+ __privateAdd(this, _scrollElement);
64
+ __privateAdd(this, _width, 0);
65
+ __privateAdd(this, _height, 0);
66
+ __privateAdd(this, _size, 0);
67
+ __privateAdd(this, _position, 0);
68
+ __privateAdd(this, _currentMark, null);
69
+ __privateAdd(this, _transformPosition, 0);
70
+ __privateSet(this, _element, element), __privateSet(this, _index, index), __privateSet(this, _scrollElement, scrollElement), scrollEntries.register(__privateGet(this, _element)), this.setIndex(__privateGet(this, _index));
71
71
  }
72
72
  get element() {
73
- return t(this, p);
73
+ return __privateGet(this, _element);
74
74
  }
75
75
  get index() {
76
- return t(this, Re);
76
+ return __privateGet(this, _index);
77
77
  }
78
78
  get size() {
79
- return t(this, pe);
79
+ return __privateGet(this, _size);
80
80
  }
81
81
  get width() {
82
- return t(this, us);
82
+ return __privateGet(this, _width);
83
83
  }
84
84
  get height() {
85
- return t(this, as);
85
+ return __privateGet(this, _height);
86
86
  }
87
87
  get position() {
88
- return t(this, bt);
88
+ return __privateGet(this, _position);
89
89
  }
90
90
  get transformPosition() {
91
- return t(this, be);
91
+ return __privateGet(this, _transformPosition);
92
92
  }
93
93
  destroy() {
94
- ce.unregister(t(this, p)), this.unsetTransform();
94
+ scrollEntries.unregister(__privateGet(this, _element)), this.unsetTransform();
95
95
  }
96
96
  unsetTransform() {
97
- t(this, p).style.transform = "", this.setMark(null), this.setIndex(null), this.setCurrentIndex(null), this.setCurrentIndexArc(null), this.setCurrentIndexArcAbs(null), this.setOffsetIndex(null), this.setMiddle(!1), this.setSize();
97
+ __privateGet(this, _element).style.transform = "", this.setMark(null), this.setIndex(null), this.setCurrentIndex(null), this.setCurrentIndexArc(null), this.setCurrentIndexArcAbs(null), this.setOffsetIndex(null), this.setMiddle(!1), this.setSize();
98
98
  }
99
- setSize(n) {
100
- n ? (t(this, p).style.setProperty("--size", n + "px"), t(this, E).axisCSSProperty.current === "x" ? (t(this, p).style.width = n + "px", t(this, p).style.height = "") : (t(this, p).style.height = n + "px", t(this, p).style.width = "")) : (t(this, p).style.width = "", t(this, p).style.height = "", t(this, p).style.removeProperty("--size"));
99
+ setSize(value) {
100
+ value ? (__privateGet(this, _element).style.setProperty("--size", value + "px"), __privateGet(this, _scrollElement).axisCSSProperty.current === "x" ? (__privateGet(this, _element).style.width = value + "px", __privateGet(this, _element).style.height = "") : (__privateGet(this, _element).style.height = value + "px", __privateGet(this, _element).style.width = "")) : (__privateGet(this, _element).style.width = "", __privateGet(this, _element).style.height = "", __privateGet(this, _element).style.removeProperty("--size"));
101
101
  }
102
102
  resize() {
103
- r(this, us, t(this, p).offsetWidth), r(this, as, t(this, p).offsetHeight), r(this, pe, t(this, E).vertical ? t(this, p).offsetHeight : t(this, p).offsetWidth), r(this, bt, t(this, E).vertical ? ls(t(this, p)) : cs(t(this, p))), r(this, bt, t(this, bt) - t(this, E).contentPosition);
103
+ __privateSet(this, _width, __privateGet(this, _element).offsetWidth), __privateSet(this, _height, __privateGet(this, _element).offsetHeight), __privateSet(this, _size, __privateGet(this, _scrollElement).vertical ? __privateGet(this, _element).offsetHeight : __privateGet(this, _element).offsetWidth), __privateSet(this, _position, __privateGet(this, _scrollElement).vertical ? getCumulativeOffsetTop(__privateGet(this, _element)) : getCumulativeOffsetLeft(__privateGet(this, _element))), __privateSet(this, _position, __privateGet(this, _position) - __privateGet(this, _scrollElement).contentPosition);
104
104
  }
105
105
  transform() {
106
- const n = t(this, E).shiftSectionPositionCSSProperty.current;
107
- let e = n;
108
- const s = t(this, E).viewportSize * t(this, E).sectionDistanceScaleCSSProperty.current;
109
- t(this, E).loopCSSProperty.current && t(this, bt) + t(this, pe) <= t(this, E).currentScrollValue - n / 2 && (e = (t(this, E).distance - n) * -1 - t(this, E).gap), ce.update(
110
- t(this, p),
111
- t(this, E).axisCSSProperty.current,
112
- e
106
+ const cssOffset = __privateGet(this, _scrollElement).shiftSectionPositionCSSProperty.current;
107
+ let offset = cssOffset;
108
+ const distanceAddition = __privateGet(this, _scrollElement).viewportSize * __privateGet(this, _scrollElement).sectionDistanceScaleCSSProperty.current;
109
+ __privateGet(this, _scrollElement).loopCSSProperty.current && __privateGet(this, _position) + __privateGet(this, _size) <= __privateGet(this, _scrollElement).currentScrollValue - cssOffset / 2 && (offset = (__privateGet(this, _scrollElement).distance - cssOffset) * -1 - __privateGet(this, _scrollElement).gap), scrollEntries.update(
110
+ __privateGet(this, _element),
111
+ __privateGet(this, _scrollElement).axisCSSProperty.current,
112
+ offset
113
113
  );
114
- const h = t(this, E).currentScrollValue + e, u = t(this, bt) - t(this, E).viewportSize - s, g = t(this, bt) + t(this, pe) + s, v = Si(js(h, u, g), 3);
115
- r(this, be, v * -1), t(this, E).vertical ? t(this, p).style.transform = `translate3d(0px, ${t(this, be)}px, 0px)` : t(this, p).style.transform = `translate3d(${t(this, be)}px, 0px, 0px)`;
114
+ const valueToClamp = __privateGet(this, _scrollElement).currentScrollValue + offset, min = __privateGet(this, _position) - __privateGet(this, _scrollElement).viewportSize - distanceAddition, max = __privateGet(this, _position) + __privateGet(this, _size) + distanceAddition, value = preciseNumber(clamp(valueToClamp, min, max), 3);
115
+ __privateSet(this, _transformPosition, value * -1), __privateGet(this, _scrollElement).vertical ? __privateGet(this, _element).style.transform = `translate3d(0px, ${__privateGet(this, _transformPosition)}px, 0px)` : __privateGet(this, _element).style.transform = `translate3d(${__privateGet(this, _transformPosition)}px, 0px, 0px)`;
116
116
  }
117
- setMark(n) {
118
- t(this, $t) !== n && (t(this, $t) && t(this, p).classList.remove(t(this, $t)), n && t(this, p).classList.add(n), r(this, $t, n), st(t(this, p), "scrollSectionMarkChange", {
117
+ setMark(mark) {
118
+ __privateGet(this, _currentMark) !== mark && (__privateGet(this, _currentMark) && __privateGet(this, _element).classList.remove(__privateGet(this, _currentMark)), mark && __privateGet(this, _element).classList.add(mark), __privateSet(this, _currentMark, mark), dispatchEvent(__privateGet(this, _element), "scrollSectionMarkChange", {
119
119
  composed: !0,
120
120
  detail: {
121
- mark: t(this, $t)
121
+ mark: __privateGet(this, _currentMark)
122
122
  },
123
123
  custom: !0
124
124
  }));
125
125
  }
126
- setMiddle(n) {
127
- t(this, p).classList.toggle("middle", n);
126
+ setMiddle(bool) {
127
+ __privateGet(this, _element).classList.toggle("middle", bool);
128
128
  }
129
- setIndex(n) {
130
- o(this, Bt, Fe).call(this, "index", n);
129
+ setIndex(value) {
130
+ __privateMethod(this, _ScrollSection_instances, setVar_fn).call(this, "index", value);
131
131
  }
132
- setCurrentIndex(n) {
133
- o(this, Bt, Fe).call(this, "current-index", n);
132
+ setCurrentIndex(value) {
133
+ __privateMethod(this, _ScrollSection_instances, setVar_fn).call(this, "current-index", value);
134
134
  }
135
- setCurrentIndexArc(n) {
136
- o(this, Bt, Fe).call(this, "current-index-arc", n);
135
+ setCurrentIndexArc(value) {
136
+ __privateMethod(this, _ScrollSection_instances, setVar_fn).call(this, "current-index-arc", value);
137
137
  }
138
- setOffsetIndex(n) {
139
- o(this, Bt, Fe).call(this, "offset-index", n);
138
+ setOffsetIndex(value) {
139
+ __privateMethod(this, _ScrollSection_instances, setVar_fn).call(this, "offset-index", value);
140
140
  }
141
- setCurrentIndexArcAbs(n) {
142
- o(this, Bt, Fe).call(this, "current-index-arc-abs", n);
141
+ setCurrentIndexArcAbs(value) {
142
+ __privateMethod(this, _ScrollSection_instances, setVar_fn).call(this, "current-index-arc-abs", value);
143
143
  }
144
- }
145
- p = new WeakMap(), Re = new WeakMap(), E = new WeakMap(), us = new WeakMap(), as = new WeakMap(), pe = new WeakMap(), bt = new WeakMap(), $t = new WeakMap(), be = new WeakMap(), Bt = new WeakSet(), Fe = function(n, e) {
146
- e !== null ? (t(this, p).style.setProperty(`--${n}`, e.toString()), t(this, p).setAttribute(`data-${n}`, e.toString())) : (t(this, p).style.removeProperty(`--${n}`), t(this, p).removeAttribute(`data-${n}`));
147
144
  };
148
- const Vi = Js({
145
+ _element = new WeakMap(), _index = new WeakMap(), _scrollElement = new WeakMap(), _width = new WeakMap(), _height = new WeakMap(), _size = new WeakMap(), _position = new WeakMap(), _currentMark = new WeakMap(), _transformPosition = new WeakMap(), _ScrollSection_instances = new WeakSet(), setVar_fn = /* @__PURE__ */ __name(function(name, value) {
146
+ value !== null ? (__privateGet(this, _element).style.setProperty(`--${name}`, value.toString()), __privateGet(this, _element).setAttribute(`data-${name}`, value.toString())) : (__privateGet(this, _element).style.removeProperty(`--${name}`), __privateGet(this, _element).removeAttribute(`data-${name}`));
147
+ }, "#setVar"), __name(_ScrollSection, "ScrollSection");
148
+ let ScrollSection = _ScrollSection;
149
+ const stylesheet = createStylesheet({
149
150
  ":host": {
150
151
  position: "relative",
151
152
  width: "100%",
@@ -184,358 +185,358 @@ const Vi = Js({
184
185
  flexShrink: "0"
185
186
  }
186
187
  });
187
- var f, me, D, Wt, mt, St, gt, J, Nt, qt, vt, Gt, Se, Q, V, ge, ve, ye, Ce, De, Pe, X, Ee, Ut, Y, yt, Ct, we, Kt, xe, Le, Zt, jt, Jt, b, Oe, G, a, ds, fs, L, P, U, it, Qt, rt, F, z, He, Pt, Et, wt, K, $e, xt, Xt, Lt, ht, A, Be, kt, ke, We, c, Is, hs, Te, Es, ws, Ms, Fs, T, ps, Ys, Ne, bs, Ts, Rs, de, _s, ms, ns, qe;
188
- class As extends HTMLElement {
188
+ var _damped, _controlsCSSProperty, _axisCSSProperty, _reverseCSSProperty, _directionCSSProperty, _pagesCSSProperty, _splitCSSProperty, _sectionalCSSProperty, _easingCSSProperty, _durationCSSProperty, _autoSizeCSSProperty, _wheelMaxDeltaCSSProperty, _dragInertionCSSProperty, _sectionsInViewCSSProperty, _loopCSSProperty, _dampingCSSProperty, _massCSSProperty, _stiffnessCSSProperty, _mouseDragCSSProperty, _sectionDistanceScaleCSSProperty, _startSectionCSSProperty, _autoplayCSSProperty, _autoplayPauseDurationCSSProperty, _autoplayUserDirectionCSSProperty, _classesCSSProperty, _currentIndexStartOffsetCSSProperty, _currentIndexEndOffsetCSSProperty, _shiftSectionPositionCSSProperty, _focusDelayCSSProperty, _focusDurationCSSProperty, _shiftLimitCSSProperty, _disabledCSSProperty, _hibernatedCSSProperty, _contentWrapperElement, _contentElement, _slotElement, _sections, _visibleSections, _position2, _contentPosition, _viewportSize, _scrollSize, _gap, _wheelControls, _keyboardControls, _dragControls, _autoplayControls, _counter, _overscroll, _distance, _hasOverflow, _disabled, _hibernated, _focusTimeoutId, _tweenTimeoutId, _setTween, _isGrabbing, _scrollLine, _isConnected, _mutationObserver, _currentSections, _skipNextResize, _maxSectionSizeTimeoutId, _ScrollElement_instances, updateAxis_fn, split_fn, unsplit_fn, disable_fn, enable_fn, hibernate_fn, awake_fn, _resizeListener, _animatedChangeListener, clampCounter_fn, _notAutoplayControlListener, _controlsListener, processAutoplay_fn, getScrollValue_fn, updateMarks_fn, updateIndexes_fn, _updateMaxSectionsSize, getNearestSectionIndex_fn, _connectListener;
189
+ const _ScrollElement = class _ScrollElement extends HTMLElement {
189
190
  constructor() {
190
191
  super();
191
- i(this, c);
192
- i(this, f, null);
193
- i(this, me, new l(this, "--controls", !0));
194
- i(this, D, new l(this, "--axis", "y"));
195
- i(this, Wt, new l(this, "--reverse", !1));
196
- i(this, mt, new l(this, "--direction", 0));
197
- i(this, St, new l(this, "--pages", 0, {
198
- validate: (e) => Math.max(0, e - 1)
192
+ __privateAdd(this, _ScrollElement_instances);
193
+ __privateAdd(this, _damped, null);
194
+ __privateAdd(this, _controlsCSSProperty, new CSSProperty(this, "--controls", !0));
195
+ __privateAdd(this, _axisCSSProperty, new CSSProperty(this, "--axis", "y"));
196
+ __privateAdd(this, _reverseCSSProperty, new CSSProperty(this, "--reverse", !1));
197
+ __privateAdd(this, _directionCSSProperty, new CSSProperty(this, "--direction", 0));
198
+ __privateAdd(this, _pagesCSSProperty, new CSSProperty(this, "--pages", 0, {
199
+ validate: /* @__PURE__ */ __name((v) => Math.max(0, v - 1), "validate")
199
200
  }));
200
- i(this, gt, new l(this, "--split", !1));
201
- i(this, J, new l(this, "--sectional", !1));
202
- i(this, Nt, new l(
201
+ __privateAdd(this, _splitCSSProperty, new CSSProperty(this, "--split", !1));
202
+ __privateAdd(this, _sectionalCSSProperty, new CSSProperty(this, "--sectional", !1));
203
+ __privateAdd(this, _easingCSSProperty, new CSSProperty(
203
204
  this,
204
205
  "--tween-easing",
205
206
  !1
206
207
  ));
207
- i(this, qt, new l(
208
+ __privateAdd(this, _durationCSSProperty, new CSSProperty(
208
209
  this,
209
210
  "--tween-duration",
210
211
  !1
211
212
  ));
212
- i(this, vt, new l(this, "--auto-size", !1));
213
- i(this, Gt, new l(
213
+ __privateAdd(this, _autoSizeCSSProperty, new CSSProperty(this, "--auto-size", !1));
214
+ __privateAdd(this, _wheelMaxDeltaCSSProperty, new CSSProperty(
214
215
  this,
215
216
  "--wheel-max-delta",
216
217
  !1
217
218
  ));
218
- i(this, Se, new l(this, "--drag-inertion", 1));
219
- i(this, Q, new l(
219
+ __privateAdd(this, _dragInertionCSSProperty, new CSSProperty(this, "--drag-inertion", 1));
220
+ __privateAdd(this, _sectionsInViewCSSProperty, new CSSProperty(
220
221
  this,
221
222
  "--sections-in-view",
222
223
  1
223
224
  ));
224
- i(this, V, new l(this, "--loop", !1));
225
- i(this, ge, new l(this, "--damping", 20));
226
- i(this, ve, new l(this, "--mass", 0));
227
- i(this, ye, new l(this, "--stiffness", 0));
228
- i(this, Ce, new l(this, "--mouse-drag", !1));
229
- i(this, De, new l(
225
+ __privateAdd(this, _loopCSSProperty, new CSSProperty(this, "--loop", !1));
226
+ __privateAdd(this, _dampingCSSProperty, new CSSProperty(this, "--damping", 20));
227
+ __privateAdd(this, _massCSSProperty, new CSSProperty(this, "--mass", 0));
228
+ __privateAdd(this, _stiffnessCSSProperty, new CSSProperty(this, "--stiffness", 0));
229
+ __privateAdd(this, _mouseDragCSSProperty, new CSSProperty(this, "--mouse-drag", !1));
230
+ __privateAdd(this, _sectionDistanceScaleCSSProperty, new CSSProperty(
230
231
  this,
231
232
  "--section-distance-scale",
232
233
  0.5
233
234
  ));
234
- i(this, Pe, new l(this, "--start-section", 0));
235
- i(this, X, new l(this, "--autoplay", 0));
236
- i(this, Ee, new l(
235
+ __privateAdd(this, _startSectionCSSProperty, new CSSProperty(this, "--start-section", 0));
236
+ __privateAdd(this, _autoplayCSSProperty, new CSSProperty(this, "--autoplay", 0));
237
+ __privateAdd(this, _autoplayPauseDurationCSSProperty, new CSSProperty(
237
238
  this,
238
239
  "--autoplay-pause-duration",
239
240
  0
240
241
  ));
241
- i(this, Ut, new l(
242
+ __privateAdd(this, _autoplayUserDirectionCSSProperty, new CSSProperty(
242
243
  this,
243
244
  "--autoplay-user-direction",
244
245
  !1
245
246
  ));
246
- i(this, Y, new l(this, "--classes", !1));
247
- i(this, yt, new l(
247
+ __privateAdd(this, _classesCSSProperty, new CSSProperty(this, "--classes", !1));
248
+ __privateAdd(this, _currentIndexStartOffsetCSSProperty, new CSSProperty(
248
249
  this,
249
250
  "--current-index-start-offset",
250
251
  0
251
252
  ));
252
- i(this, Ct, new l(
253
+ __privateAdd(this, _currentIndexEndOffsetCSSProperty, new CSSProperty(
253
254
  this,
254
255
  "--current-index-end-offset",
255
256
  0
256
257
  ));
257
- i(this, we, new l(
258
+ __privateAdd(this, _shiftSectionPositionCSSProperty, new CSSProperty(
258
259
  this,
259
260
  "--shift-section-position",
260
261
  0,
261
262
  { rawValueCheck: !1 }
262
263
  ));
263
- i(this, Kt, new l(this, "--focus-delay", 0));
264
- i(this, xe, new l(
264
+ __privateAdd(this, _focusDelayCSSProperty, new CSSProperty(this, "--focus-delay", 0));
265
+ __privateAdd(this, _focusDurationCSSProperty, new CSSProperty(
265
266
  this,
266
267
  "--focus-duration",
267
268
  3e3
268
269
  ));
269
- i(this, Le, new l(this, "--shift-limit", 0));
270
- i(this, Zt, new l(this, "--disabled", !1));
271
- i(this, jt, new l(this, "--hibernate", !1));
272
- i(this, Jt, null);
273
- i(this, b, null);
274
- i(this, Oe, null);
275
- i(this, G, []);
276
- i(this, a, []);
277
- i(this, ds, 0);
278
- i(this, fs, 0);
279
- i(this, L, 0);
280
- i(this, P, 0);
281
- i(this, U, 0);
282
- i(this, it, null);
283
- i(this, Qt, null);
284
- i(this, rt, null);
285
- i(this, F, null);
286
- i(this, z, new ae(0));
287
- i(this, He, 0);
288
- i(this, Pt, 0);
289
- i(this, Et, !1);
290
- i(this, wt, !0);
291
- i(this, K, !0);
292
- i(this, $e);
293
- i(this, xt);
294
- i(this, Xt, new vi());
295
- i(this, Lt, !1);
296
- i(this, ht, null);
297
- i(this, A, !1);
298
- i(this, Be, null);
299
- i(this, kt, []);
300
- i(this, ke, !1);
301
- i(this, We);
302
- i(this, T, (e) => {
303
- if (e && t(this, ke)) {
304
- r(this, ke, !1);
270
+ __privateAdd(this, _shiftLimitCSSProperty, new CSSProperty(this, "--shift-limit", 0));
271
+ __privateAdd(this, _disabledCSSProperty, new CSSProperty(this, "--disabled", !1));
272
+ __privateAdd(this, _hibernatedCSSProperty, new CSSProperty(this, "--hibernate", !1));
273
+ __privateAdd(this, _contentWrapperElement, null);
274
+ __privateAdd(this, _contentElement, null);
275
+ __privateAdd(this, _slotElement, null);
276
+ __privateAdd(this, _sections, []);
277
+ __privateAdd(this, _visibleSections, []);
278
+ __privateAdd(this, _position2, 0);
279
+ __privateAdd(this, _contentPosition, 0);
280
+ __privateAdd(this, _viewportSize, 0);
281
+ __privateAdd(this, _scrollSize, 0);
282
+ __privateAdd(this, _gap, 0);
283
+ __privateAdd(this, _wheelControls, null);
284
+ __privateAdd(this, _keyboardControls, null);
285
+ __privateAdd(this, _dragControls, null);
286
+ __privateAdd(this, _autoplayControls, null);
287
+ __privateAdd(this, _counter, new Store(0));
288
+ __privateAdd(this, _overscroll, 0);
289
+ __privateAdd(this, _distance, 0);
290
+ __privateAdd(this, _hasOverflow, !1);
291
+ __privateAdd(this, _disabled, !0);
292
+ __privateAdd(this, _hibernated, !0);
293
+ __privateAdd(this, _focusTimeoutId);
294
+ __privateAdd(this, _tweenTimeoutId);
295
+ __privateAdd(this, _setTween, new Tweened());
296
+ __privateAdd(this, _isGrabbing, !1);
297
+ __privateAdd(this, _scrollLine, null);
298
+ __privateAdd(this, _isConnected, !1);
299
+ __privateAdd(this, _mutationObserver, null);
300
+ __privateAdd(this, _currentSections, []);
301
+ __privateAdd(this, _skipNextResize, !1);
302
+ __privateAdd(this, _maxSectionSizeTimeoutId);
303
+ __privateAdd(this, _resizeListener, /* @__PURE__ */ __name((e) => {
304
+ if (e && __privateGet(this, _skipNextResize)) {
305
+ __privateSet(this, _skipNextResize, !1);
305
306
  return;
306
307
  }
307
308
  this.resize();
308
- });
309
- i(this, ps, () => {
310
- if (!t(this, Et) || t(this, K) || t(this, wt))
309
+ }, "#resizeListener"));
310
+ __privateAdd(this, _animatedChangeListener, /* @__PURE__ */ __name(() => {
311
+ if (!__privateGet(this, _hasOverflow) || __privateGet(this, _hibernated) || __privateGet(this, _disabled))
311
312
  return;
312
- const e = this.currentScrollValue;
313
- if (r(this, He, Math.max(0, e - t(this, P))), t(this, a).length) {
314
- for (let s = 0; s < t(this, G).length; s++)
315
- t(this, G)[s].transform();
316
- (t(this, Lt) || !t(this, J).current) && (t(this, z).current = o(this, c, ns).call(this));
313
+ const currentScrollValue = this.currentScrollValue;
314
+ if (__privateSet(this, _overscroll, Math.max(0, currentScrollValue - __privateGet(this, _scrollSize))), __privateGet(this, _visibleSections).length) {
315
+ for (let i = 0; i < __privateGet(this, _sections).length; i++)
316
+ __privateGet(this, _sections)[i].transform();
317
+ (__privateGet(this, _isGrabbing) || !__privateGet(this, _sectionalCSSProperty).current) && (__privateGet(this, _counter).current = __privateMethod(this, _ScrollElement_instances, getNearestSectionIndex_fn).call(this));
317
318
  } else
318
- this.vertical ? t(this, b).style.transform = `translate3d(0px, ${e * -1}px, 0px)` : t(this, b).style.transform = `translate3d(${e * -1}px, 0px, 0px)`;
319
- o(this, c, _s).call(this), ce.update(
319
+ this.vertical ? __privateGet(this, _contentElement).style.transform = `translate3d(0px, ${currentScrollValue * -1}px, 0px)` : __privateGet(this, _contentElement).style.transform = `translate3d(${currentScrollValue * -1}px, 0px, 0px)`;
320
+ __privateMethod(this, _ScrollElement_instances, updateIndexes_fn).call(this), scrollEntries.update(
320
321
  this,
321
- t(this, D).current,
322
- e
322
+ __privateGet(this, _axisCSSProperty).current,
323
+ currentScrollValue
323
324
  );
324
- });
325
- i(this, Ne, (e, s) => {
326
- t(this, me).current && (o(this, c, Ts).call(this, Math.sign(s) || 1), t(this, bs).call(this, e, s));
327
- });
328
- i(this, bs, (e, s) => {
329
- if (!t(this, xt)) {
330
- if (t(this, mt).current) {
331
- if (t(this, mt).current < 0 && s > 0)
325
+ }, "#animatedChangeListener"));
326
+ __privateAdd(this, _notAutoplayControlListener, /* @__PURE__ */ __name((type, value) => {
327
+ __privateGet(this, _controlsCSSProperty).current && (__privateMethod(this, _ScrollElement_instances, processAutoplay_fn).call(this, Math.sign(value) || 1), __privateGet(this, _controlsListener).call(this, type, value));
328
+ }, "#notAutoplayControlListener"));
329
+ __privateAdd(this, _controlsListener, /* @__PURE__ */ __name((type, value) => {
330
+ if (!__privateGet(this, _tweenTimeoutId)) {
331
+ if (__privateGet(this, _directionCSSProperty).current) {
332
+ if (__privateGet(this, _directionCSSProperty).current < 0 && value > 0)
332
333
  return;
333
- if (t(this, mt).current > 0 && s < 0)
334
+ if (__privateGet(this, _directionCSSProperty).current > 0 && value < 0)
334
335
  return;
335
336
  }
336
- if (!t(this, X).current && t(this, Kt).current && (clearInterval(t(this, $e)), r(this, $e, setTimeout(() => {
337
- const h = t(this, a)[o(this, c, ns).call(this)];
338
- h && this.scrollToSection(h.index, {
337
+ if (!__privateGet(this, _autoplayCSSProperty).current && __privateGet(this, _focusDelayCSSProperty).current && (clearInterval(__privateGet(this, _focusTimeoutId)), __privateSet(this, _focusTimeoutId, setTimeout(() => {
338
+ const section = __privateGet(this, _visibleSections)[__privateMethod(this, _ScrollElement_instances, getNearestSectionIndex_fn).call(this)];
339
+ section && this.scrollToSection(section.index, {
339
340
  tween: {
340
- duration: t(this, xe).current,
341
- easing: fi
341
+ duration: __privateGet(this, _focusDurationCSSProperty).current,
342
+ easing: easeInOutExpo
342
343
  }
343
344
  });
344
- }, t(this, Kt).current))), !(e.includes("drag") && !wi.isTouch && !t(this, Ce).current)) {
345
- if (t(this, J).current && e !== "drag") {
346
- const h = Math.sign(s);
347
- t(this, a).length ? t(this, Lt) ? this.scrollToSection(o(this, c, ns).call(this, !0)) : this.shiftSections(h, {
348
- tween: t(this, Nt).current || t(this, qt).current ? {
349
- easing: t(this, Nt).current || "easeInOutCubic",
350
- duration: t(this, qt).current || 500
345
+ }, __privateGet(this, _focusDelayCSSProperty).current))), !(type.includes("drag") && !device.isTouch && !__privateGet(this, _mouseDragCSSProperty).current)) {
346
+ if (__privateGet(this, _sectionalCSSProperty).current && type !== "drag") {
347
+ const direction = Math.sign(value);
348
+ __privateGet(this, _visibleSections).length ? __privateGet(this, _isGrabbing) ? this.scrollToSection(__privateMethod(this, _ScrollElement_instances, getNearestSectionIndex_fn).call(this, !0)) : this.shiftSections(direction, {
349
+ tween: __privateGet(this, _easingCSSProperty).current || __privateGet(this, _durationCSSProperty).current ? {
350
+ easing: __privateGet(this, _easingCSSProperty).current || "easeInOutCubic",
351
+ duration: __privateGet(this, _durationCSSProperty).current || 500
351
352
  } : void 0
352
- }) : t(this, f).shift(h * t(this, L));
353
+ }) : __privateGet(this, _damped).shift(direction * __privateGet(this, _viewportSize));
353
354
  } else
354
- t(this, f).shift(s);
355
- r(this, Lt, e === "drag");
355
+ __privateGet(this, _damped).shift(value);
356
+ __privateSet(this, _isGrabbing, type === "drag");
356
357
  }
357
358
  }
358
- });
359
- i(this, ms, xs(() => {
360
- const e = t(this, kt).reduce((s, h) => {
361
- const u = this.vertical ? h.width : h.height;
362
- return u > s ? u : s;
359
+ }, "#controlsListener"));
360
+ __privateAdd(this, _updateMaxSectionsSize, debounce(() => {
361
+ const maxSectionSize = __privateGet(this, _currentSections).reduce((p, c) => {
362
+ const s = this.vertical ? c.width : c.height;
363
+ return s > p ? s : p;
363
364
  }, 0);
364
- clearTimeout(t(this, We)), r(this, ke, !0), this.style.setProperty("--max-section-size", ""), r(this, We, setTimeout(() => {
365
- r(this, ke, !0), this.style.setProperty("--max-section-size", e + "px");
365
+ clearTimeout(__privateGet(this, _maxSectionSizeTimeoutId)), __privateSet(this, _skipNextResize, !0), this.style.setProperty("--max-section-size", ""), __privateSet(this, _maxSectionSizeTimeoutId, setTimeout(() => {
366
+ __privateSet(this, _skipNextResize, !0), this.style.setProperty("--max-section-size", maxSectionSize + "px");
366
367
  }, 10));
367
368
  }, 20));
368
- i(this, qe, () => {
369
- r(this, A, !0), this.hibernatedCSSProperty.current || o(this, c, Fs).call(this), os.subscribe(this, t(this, T)), pt.unsubscribe(t(this, qe));
370
- });
371
- if (q) {
372
- const e = this.attachShadow({ mode: "open" });
373
- e.adoptedStyleSheets = [Vi];
374
- const s = document.createElement("div");
375
- s.className = "static", s.innerHTML = '<slot name="static"></slot>', e.appendChild(s), r(this, Jt, document.createElement("div")), t(this, Jt).className = "content-wrapper", r(this, b, document.createElement("div")), t(this, b).className = "content", r(this, Oe, document.createElement("slot")), t(this, b).appendChild(t(this, Oe)), t(this, Jt).appendChild(t(this, b)), e.appendChild(t(this, Jt)), r(this, Be, new MutationObserver(
376
- xs(() => {
369
+ __privateAdd(this, _connectListener, /* @__PURE__ */ __name(() => {
370
+ __privateSet(this, _isConnected, !0), this.hibernatedCSSProperty.current || __privateMethod(this, _ScrollElement_instances, awake_fn).call(this), elementResizer.subscribe(this, __privateGet(this, _resizeListener)), windowResizer.unsubscribe(__privateGet(this, _connectListener));
371
+ }, "#connectListener"));
372
+ if (isBrowser) {
373
+ const shadow = this.attachShadow({ mode: "open" });
374
+ shadow.adoptedStyleSheets = [stylesheet];
375
+ const staticElement = document.createElement("div");
376
+ staticElement.className = "static", staticElement.innerHTML = '<slot name="static"></slot>', shadow.appendChild(staticElement), __privateSet(this, _contentWrapperElement, document.createElement("div")), __privateGet(this, _contentWrapperElement).className = "content-wrapper", __privateSet(this, _contentElement, document.createElement("div")), __privateGet(this, _contentElement).className = "content", __privateSet(this, _slotElement, document.createElement("slot")), __privateGet(this, _contentElement).appendChild(__privateGet(this, _slotElement)), __privateGet(this, _contentWrapperElement).appendChild(__privateGet(this, _contentElement)), shadow.appendChild(__privateGet(this, _contentWrapperElement)), __privateSet(this, _mutationObserver, new MutationObserver(
377
+ debounce(() => {
377
378
  this.tryResplit();
378
379
  }, 10)
379
380
  ));
380
381
  }
381
382
  }
382
383
  get damped() {
383
- return t(this, f);
384
+ return __privateGet(this, _damped);
384
385
  }
385
386
  get controlsCSSProperty() {
386
- return t(this, me);
387
+ return __privateGet(this, _controlsCSSProperty);
387
388
  }
388
389
  get axisCSSProperty() {
389
- return t(this, D);
390
+ return __privateGet(this, _axisCSSProperty);
390
391
  }
391
392
  get reverseCSSProperty() {
392
- return t(this, Wt);
393
+ return __privateGet(this, _reverseCSSProperty);
393
394
  }
394
395
  get directionCSSProperty() {
395
- return t(this, mt);
396
+ return __privateGet(this, _directionCSSProperty);
396
397
  }
397
398
  get pagesCSSProperty() {
398
- return t(this, St);
399
+ return __privateGet(this, _pagesCSSProperty);
399
400
  }
400
401
  get splitCSSProperty() {
401
- return t(this, gt);
402
+ return __privateGet(this, _splitCSSProperty);
402
403
  }
403
404
  get sectionalCSSProperty() {
404
- return t(this, J);
405
+ return __privateGet(this, _sectionalCSSProperty);
405
406
  }
406
407
  get easingCSSProperty() {
407
- return t(this, Nt);
408
+ return __privateGet(this, _easingCSSProperty);
408
409
  }
409
410
  get durationCSSProperty() {
410
- return t(this, qt);
411
+ return __privateGet(this, _durationCSSProperty);
411
412
  }
412
413
  get autoSizeCSSProperty() {
413
- return t(this, vt);
414
+ return __privateGet(this, _autoSizeCSSProperty);
414
415
  }
415
416
  get wheelMaxDeltaCSSProperty() {
416
- return t(this, Gt);
417
+ return __privateGet(this, _wheelMaxDeltaCSSProperty);
417
418
  }
418
419
  get dragInertionCSSProperty() {
419
- return t(this, Se);
420
+ return __privateGet(this, _dragInertionCSSProperty);
420
421
  }
421
422
  get sectionsInViewCSSProperty() {
422
- return t(this, Q);
423
+ return __privateGet(this, _sectionsInViewCSSProperty);
423
424
  }
424
425
  get loopCSSProperty() {
425
- return t(this, V);
426
+ return __privateGet(this, _loopCSSProperty);
426
427
  }
427
428
  get dampingCSSProperty() {
428
- return t(this, ge);
429
+ return __privateGet(this, _dampingCSSProperty);
429
430
  }
430
431
  get massCSSProperty() {
431
- return t(this, ve);
432
+ return __privateGet(this, _massCSSProperty);
432
433
  }
433
434
  get stiffnessCSSProperty() {
434
- return t(this, ye);
435
+ return __privateGet(this, _stiffnessCSSProperty);
435
436
  }
436
437
  get mouseDragCSSProperty() {
437
- return t(this, Ce);
438
+ return __privateGet(this, _mouseDragCSSProperty);
438
439
  }
439
440
  get sectionDistanceScaleCSSProperty() {
440
- return t(this, De);
441
+ return __privateGet(this, _sectionDistanceScaleCSSProperty);
441
442
  }
442
443
  get startSectionCSSProperty() {
443
- return t(this, Pe);
444
+ return __privateGet(this, _startSectionCSSProperty);
444
445
  }
445
446
  get autoplayCSSProperty() {
446
- return t(this, X);
447
+ return __privateGet(this, _autoplayCSSProperty);
447
448
  }
448
449
  get autoplayPauseDurationCSSProperty() {
449
- return t(this, Ee);
450
+ return __privateGet(this, _autoplayPauseDurationCSSProperty);
450
451
  }
451
452
  get autoplayUserDirectionCSSProperty() {
452
- return t(this, Ut);
453
+ return __privateGet(this, _autoplayUserDirectionCSSProperty);
453
454
  }
454
455
  get classesCSSProperty() {
455
- return t(this, Y);
456
+ return __privateGet(this, _classesCSSProperty);
456
457
  }
457
458
  get currentIndexStartOffsetCSSProperty() {
458
- return t(this, yt);
459
+ return __privateGet(this, _currentIndexStartOffsetCSSProperty);
459
460
  }
460
461
  get currentIndexEndOffsetCSSProperty() {
461
- return t(this, Ct);
462
+ return __privateGet(this, _currentIndexEndOffsetCSSProperty);
462
463
  }
463
464
  get shiftSectionPositionCSSProperty() {
464
- return t(this, we);
465
+ return __privateGet(this, _shiftSectionPositionCSSProperty);
465
466
  }
466
467
  get focusDelayCSSProperty() {
467
- return t(this, Kt);
468
+ return __privateGet(this, _focusDelayCSSProperty);
468
469
  }
469
470
  get focusDurationCSSProperty() {
470
- return t(this, xe);
471
+ return __privateGet(this, _focusDurationCSSProperty);
471
472
  }
472
473
  get shiftLimitCSSProperty() {
473
- return t(this, Le);
474
+ return __privateGet(this, _shiftLimitCSSProperty);
474
475
  }
475
476
  get disabledCSSProperty() {
476
- return t(this, Zt);
477
+ return __privateGet(this, _disabledCSSProperty);
477
478
  }
478
479
  get hibernatedCSSProperty() {
479
- return t(this, jt);
480
+ return __privateGet(this, _hibernatedCSSProperty);
480
481
  }
481
482
  get currentScrollValue() {
482
- return o(this, c, Rs).call(this, "current");
483
+ return __privateMethod(this, _ScrollElement_instances, getScrollValue_fn).call(this, "current");
483
484
  }
484
485
  get targetScrollValue() {
485
- return o(this, c, Rs).call(this, "target");
486
+ return __privateMethod(this, _ScrollElement_instances, getScrollValue_fn).call(this, "target");
486
487
  }
487
488
  get contentWrapperElement() {
488
- return t(this, Jt);
489
+ return __privateGet(this, _contentWrapperElement);
489
490
  }
490
491
  get contentElement() {
491
- return t(this, b);
492
+ return __privateGet(this, _contentElement);
492
493
  }
493
494
  get sections() {
494
- return t(this, G);
495
+ return __privateGet(this, _sections);
495
496
  }
496
497
  get visibleSections() {
497
- return t(this, a);
498
+ return __privateGet(this, _visibleSections);
498
499
  }
499
500
  get position() {
500
- return t(this, ds);
501
+ return __privateGet(this, _position2);
501
502
  }
502
503
  get contentPosition() {
503
- return t(this, fs);
504
+ return __privateGet(this, _contentPosition);
504
505
  }
505
506
  get viewportSize() {
506
- return t(this, L);
507
+ return __privateGet(this, _viewportSize);
507
508
  }
508
509
  get scrollSize() {
509
- return t(this, P);
510
+ return __privateGet(this, _scrollSize);
510
511
  }
511
512
  get gap() {
512
- return t(this, U);
513
+ return __privateGet(this, _gap);
513
514
  }
514
515
  get counter() {
515
- return t(this, z);
516
+ return __privateGet(this, _counter);
516
517
  }
517
518
  get limit() {
518
519
  return Math.ceil(
519
- t(this, a).length - t(this, Q).current + t(this, Le).current
520
+ __privateGet(this, _visibleSections).length - __privateGet(this, _sectionsInViewCSSProperty).current + __privateGet(this, _shiftLimitCSSProperty).current
520
521
  );
521
522
  }
522
523
  get distance() {
523
- return t(this, Pt);
524
+ return __privateGet(this, _distance);
524
525
  }
525
526
  get loopDistance() {
526
- return t(this, V).current ? t(this, Pt) + t(this, U) : t(this, Pt);
527
+ return __privateGet(this, _loopCSSProperty).current ? __privateGet(this, _distance) + __privateGet(this, _gap) : __privateGet(this, _distance);
527
528
  }
528
529
  get hasOverflow() {
529
- return t(this, Et);
530
+ return __privateGet(this, _hasOverflow);
530
531
  }
531
532
  get overscroll() {
532
- return t(this, He);
533
+ return __privateGet(this, _overscroll);
533
534
  }
534
535
  get scrollLine() {
535
- return t(this, ht);
536
+ return __privateGet(this, _scrollLine);
536
537
  }
537
538
  get vertical() {
538
- return t(this, D).current === "y";
539
+ return __privateGet(this, _axisCSSProperty).current === "y";
539
540
  }
540
541
  get currentProgress() {
541
542
  return this.currentScrollValue / this.loopDistance || 0;
@@ -544,307 +545,309 @@ class As extends HTMLElement {
544
545
  return this.targetScrollValue / this.loopDistance || 0;
545
546
  }
546
547
  get scrollWidth() {
547
- return t(this, D).current === "y" ? 0 : t(this, f).distance;
548
+ return __privateGet(this, _axisCSSProperty).current === "y" ? 0 : __privateGet(this, _damped).distance;
548
549
  }
549
550
  get scrollHeight() {
550
- return t(this, D).current === "x" ? 0 : t(this, f).distance;
551
+ return __privateGet(this, _axisCSSProperty).current === "x" ? 0 : __privateGet(this, _damped).distance;
551
552
  }
552
553
  tryResplit() {
553
- !t(this, K) && (t(this, V).current || t(this, gt).current || t(this, V).current || t(this, vt).current || t(this, J).current) && o(this, c, hs).call(this);
554
+ !__privateGet(this, _hibernated) && (__privateGet(this, _loopCSSProperty).current || __privateGet(this, _splitCSSProperty).current || __privateGet(this, _loopCSSProperty).current || __privateGet(this, _autoSizeCSSProperty).current || __privateGet(this, _sectionalCSSProperty).current) && __privateMethod(this, _ScrollElement_instances, split_fn).call(this);
554
555
  }
555
- onScroll(...e) {
556
- return t(this, f).subscribe(...e);
556
+ onScroll(...parameters) {
557
+ return __privateGet(this, _damped).subscribe(...parameters);
557
558
  }
558
- offScroll(...e) {
559
- t(this, f).unsubscribe(...e);
559
+ offScroll(...parameters) {
560
+ __privateGet(this, _damped).unsubscribe(...parameters);
560
561
  }
561
562
  //https://github.com/pmndrs/drei/blob/d3282cdd02d170ef603a5e096505d83dc93cd57a/src/web/ScrollControls.tsx#L85C7-L100C9
562
- range(e, s, h = 0) {
563
- const u = e - h, g = u + s + h * 2;
564
- return this.currentProgress < u ? 0 : this.currentProgress > g ? 1 : (this.currentProgress - u) / (g - u);
563
+ range(from, distance, margin = 0) {
564
+ const start = from - margin, end = start + distance + margin * 2;
565
+ return this.currentProgress < start ? 0 : this.currentProgress > end ? 1 : (this.currentProgress - start) / (end - start);
565
566
  }
566
- curve(e, s, h = 0) {
567
- return Math.sin(this.range(e, s, h) * Math.PI);
567
+ curve(from, distance, margin = 0) {
568
+ return Math.sin(this.range(from, distance, margin) * Math.PI);
568
569
  }
569
- visible(e, s, h = 0) {
570
- const u = e - h, g = u + s + h * 2;
571
- return this.currentProgress >= u && this.currentProgress <= g;
570
+ visible(from, distance, margin = 0) {
571
+ const start = from - margin, end = start + distance + margin * 2;
572
+ return this.currentProgress >= start && this.currentProgress <= end;
572
573
  }
573
- scrollToSection(e, s) {
574
- if (!t(this, a).length || t(this, K) || t(this, xt))
574
+ scrollToSection(sectionIndex, options) {
575
+ if (!__privateGet(this, _visibleSections).length || __privateGet(this, _hibernated) || __privateGet(this, _tweenTimeoutId))
575
576
  return;
576
- const h = t(this, z).current, u = o(this, c, Ys).call(this, e);
577
- t(this, Lt) || (t(this, z).current = u);
578
- const g = t(this, a)[h], v = t(this, a)[u];
579
- if (g && v) {
580
- let C = 0;
581
- const ue = o(this, c, ns).call(this), Me = t(this, a)[ue];
582
- let rs = Me ? this.targetScrollValue - Me.position : 0;
583
- t(this, V).current ? u === 0 && h === t(this, a).length - 1 ? (C = t(this, P) + t(this, L) - g.position + t(this, U), t(this, Lt) || (rs = 0)) : u === t(this, a).length - 1 && h === 0 ? C = v.position - (t(this, P) + t(this, L) + t(this, U)) : C = v.position - g.position : C = v.position - g.position, this.shiftPosition(C - rs, s);
577
+ const previousCounter = __privateGet(this, _counter).current, newCounterValue = __privateMethod(this, _ScrollElement_instances, clampCounter_fn).call(this, sectionIndex);
578
+ __privateGet(this, _isGrabbing) || (__privateGet(this, _counter).current = newCounterValue);
579
+ const previousSection = __privateGet(this, _visibleSections)[previousCounter], currentSection = __privateGet(this, _visibleSections)[newCounterValue];
580
+ if (previousSection && currentSection) {
581
+ let shiftValue = 0;
582
+ const nearestSectionIndex = __privateMethod(this, _ScrollElement_instances, getNearestSectionIndex_fn).call(this), nearestSection = __privateGet(this, _visibleSections)[nearestSectionIndex];
583
+ let scrolledFromNearestSection = nearestSection ? this.targetScrollValue - nearestSection.position : 0;
584
+ __privateGet(this, _loopCSSProperty).current ? newCounterValue === 0 && previousCounter === __privateGet(this, _visibleSections).length - 1 ? (shiftValue = __privateGet(this, _scrollSize) + __privateGet(this, _viewportSize) - previousSection.position + __privateGet(this, _gap), __privateGet(this, _isGrabbing) || (scrolledFromNearestSection = 0)) : newCounterValue === __privateGet(this, _visibleSections).length - 1 && previousCounter === 0 ? shiftValue = currentSection.position - (__privateGet(this, _scrollSize) + __privateGet(this, _viewportSize) + __privateGet(this, _gap)) : shiftValue = currentSection.position - previousSection.position : shiftValue = currentSection.position - previousSection.position, this.shiftPosition(shiftValue - scrolledFromNearestSection, options);
584
585
  }
585
586
  }
586
- shiftSections(e, s) {
587
- t(this, a).length && this.scrollToSection(t(this, z).current + e, s);
587
+ shiftSections(step2, options) {
588
+ __privateGet(this, _visibleSections).length && this.scrollToSection(__privateGet(this, _counter).current + step2, options);
588
589
  }
589
- setPosition(e, s) {
590
- t(this, K) || (o(this, c, Ts).call(this, Math.sign(e) || 1), s != null && s.tween ? (clearTimeout(t(this, xt)), t(this, Xt).set(t(this, f).current, { equalize: !0 }), t(this, Xt).set(e, Ks({}, s.tween)), r(this, xt, setTimeout(() => {
591
- r(this, xt, void 0);
592
- }, s.tween.duration || 0))) : t(this, f).set(e, {
593
- equalize: (s == null ? void 0 : s.behaviour) === "instant"
590
+ setPosition(value, options) {
591
+ __privateGet(this, _hibernated) || (__privateMethod(this, _ScrollElement_instances, processAutoplay_fn).call(this, Math.sign(value) || 1), options != null && options.tween ? (clearTimeout(__privateGet(this, _tweenTimeoutId)), __privateGet(this, _setTween).set(__privateGet(this, _damped).current, { equalize: !0 }), __privateGet(this, _setTween).set(value, __spreadValues({}, options.tween)), __privateSet(this, _tweenTimeoutId, setTimeout(() => {
592
+ __privateSet(this, _tweenTimeoutId, void 0);
593
+ }, options.tween.duration || 0))) : __privateGet(this, _damped).set(value, {
594
+ equalize: (options == null ? void 0 : options.behaviour) === "instant"
594
595
  }));
595
596
  }
596
- shiftPosition(e, s) {
597
- this.setPosition(t(this, f).target + e, s);
597
+ shiftPosition(value, options) {
598
+ this.setPosition(__privateGet(this, _damped).target + value, options);
598
599
  }
599
600
  resize() {
600
- if (t(this, jt).current)
601
+ if (__privateGet(this, _hibernatedCSSProperty).current)
601
602
  return;
602
- r(this, a, t(this, G).filter(
603
- (h) => pi(h.element)
603
+ __privateSet(this, _visibleSections, __privateGet(this, _sections).filter(
604
+ (s) => isElementVisible(s.element)
604
605
  )), this.style.setProperty(
605
606
  "--sections",
606
- t(this, a).length.toString()
607
- ), t(this, f).unlistenAnimationFrame();
608
- const e = this.currentScrollValue / t(this, P) || 0, s = t(this, z).current;
609
- if (r(this, ds, this.vertical ? ls(this) : cs(this)), r(this, fs, this.vertical ? ls(t(this, b)) : cs(t(this, b))), r(this, L, this.vertical ? this.offsetHeight : this.offsetWidth), this.vertical ? r(this, U, Zs.parse(
610
- getComputedStyle(t(this, b)).rowGap
611
- )) : r(this, U, Zs.parse(
612
- getComputedStyle(t(this, b)).columnGap
613
- )), t(this, vt).current && t(this, a).length) {
614
- const h = t(this, Q).current, u = (t(this, L) - t(this, U) * (h - 1)) / h;
615
- t(this, a).forEach((g) => {
616
- g.setSize(u);
607
+ __privateGet(this, _visibleSections).length.toString()
608
+ ), __privateGet(this, _damped).unlistenAnimationFrame();
609
+ const prevProgress = this.currentScrollValue / __privateGet(this, _scrollSize) || 0, prevCounter = __privateGet(this, _counter).current;
610
+ if (__privateSet(this, _position2, this.vertical ? getCumulativeOffsetTop(this) : getCumulativeOffsetLeft(this)), __privateSet(this, _contentPosition, this.vertical ? getCumulativeOffsetTop(__privateGet(this, _contentElement)) : getCumulativeOffsetLeft(__privateGet(this, _contentElement))), __privateSet(this, _viewportSize, this.vertical ? this.offsetHeight : this.offsetWidth), this.vertical ? __privateSet(this, _gap, cssUnitParser.parse(
611
+ getComputedStyle(__privateGet(this, _contentElement)).rowGap
612
+ )) : __privateSet(this, _gap, cssUnitParser.parse(
613
+ getComputedStyle(__privateGet(this, _contentElement)).columnGap
614
+ )), __privateGet(this, _autoSizeCSSProperty).current && __privateGet(this, _visibleSections).length) {
615
+ const ivc = __privateGet(this, _sectionsInViewCSSProperty).current, sectionSize = (__privateGet(this, _viewportSize) - __privateGet(this, _gap) * (ivc - 1)) / ivc;
616
+ __privateGet(this, _visibleSections).forEach((section) => {
617
+ section.setSize(sectionSize);
617
618
  });
618
619
  } else
619
- t(this, a).forEach((h) => {
620
- h.setSize();
620
+ __privateGet(this, _visibleSections).forEach((section) => {
621
+ section.setSize();
621
622
  });
622
- if (t(this, a).forEach((h) => {
623
- h.resize();
624
- }), t(this, St).current) {
625
- r(this, P, t(this, L) * t(this, St).current);
626
- const h = t(this, P) + t(this, L);
627
- this.vertical ? (t(this, b).style.width = h + "px", t(this, b).style.height = "100%") : (t(this, b).style.height = h + "px", t(this, b).style.width = "100%");
623
+ if (__privateGet(this, _visibleSections).forEach((section) => {
624
+ section.resize();
625
+ }), __privateGet(this, _pagesCSSProperty).current) {
626
+ __privateSet(this, _scrollSize, __privateGet(this, _viewportSize) * __privateGet(this, _pagesCSSProperty).current);
627
+ const contentSize = __privateGet(this, _scrollSize) + __privateGet(this, _viewportSize);
628
+ this.vertical ? (__privateGet(this, _contentElement).style.width = contentSize + "px", __privateGet(this, _contentElement).style.height = "100%") : (__privateGet(this, _contentElement).style.height = contentSize + "px", __privateGet(this, _contentElement).style.width = "100%");
628
629
  } else
629
- this.vertical ? (t(this, b).style.width = "100%", t(this, b).style.height = "max-content", r(this, P, t(this, b).offsetHeight - t(this, L))) : (t(this, b).style.width = "max-content", t(this, b).style.height = "100%", r(this, P, t(this, b).offsetWidth - t(this, L)));
630
- if (!t(this, V).current) {
631
- const h = getComputedStyle(this), u = this.vertical ? parseFloat(h.paddingBlockStart) + parseFloat(h.paddingBlockEnd) : parseFloat(h.paddingInlineStart) + parseFloat(h.paddingInlineEnd);
632
- r(this, P, t(this, P) + u), t(this, f).max = t(this, P);
630
+ this.vertical ? (__privateGet(this, _contentElement).style.width = "100%", __privateGet(this, _contentElement).style.height = "max-content", __privateSet(this, _scrollSize, __privateGet(this, _contentElement).offsetHeight - __privateGet(this, _viewportSize))) : (__privateGet(this, _contentElement).style.width = "max-content", __privateGet(this, _contentElement).style.height = "100%", __privateSet(this, _scrollSize, __privateGet(this, _contentElement).offsetWidth - __privateGet(this, _viewportSize)));
631
+ if (!__privateGet(this, _loopCSSProperty).current) {
632
+ const cs = getComputedStyle(this), padding = this.vertical ? parseFloat(cs.paddingBlockStart) + parseFloat(cs.paddingBlockEnd) : parseFloat(cs.paddingInlineStart) + parseFloat(cs.paddingInlineEnd);
633
+ __privateSet(this, _scrollSize, __privateGet(this, _scrollSize) + padding), __privateGet(this, _damped).max = __privateGet(this, _scrollSize);
633
634
  }
634
- if (t(this, V).current && t(this, a).length) {
635
- const h = t(this, a)[t(this, a).length - 1], u = h.position + h.size - t(this, L), g = t(this, P) - u;
636
- r(this, Pt, h.position + h.size + g);
635
+ if (__privateGet(this, _loopCSSProperty).current && __privateGet(this, _visibleSections).length) {
636
+ const lastSection = __privateGet(this, _visibleSections)[__privateGet(this, _visibleSections).length - 1], lastSectionMax = lastSection.position + lastSection.size - __privateGet(this, _viewportSize), lastSectionMargin = __privateGet(this, _scrollSize) - lastSectionMax;
637
+ __privateSet(this, _distance, lastSection.position + lastSection.size + lastSectionMargin);
637
638
  } else
638
- r(this, Pt, t(this, P));
639
- if (t(this, J).current && t(this, a).length) {
640
- const h = t(this, a)[s];
641
- t(this, f).set(h.position, {
639
+ __privateSet(this, _distance, __privateGet(this, _scrollSize));
640
+ if (__privateGet(this, _sectionalCSSProperty).current && __privateGet(this, _visibleSections).length) {
641
+ const section = __privateGet(this, _visibleSections)[prevCounter];
642
+ __privateGet(this, _damped).set(section.position, {
642
643
  equalize: !0
643
644
  });
644
645
  } else
645
- t(this, f).set(e * t(this, P), {
646
+ __privateGet(this, _damped).set(prevProgress * __privateGet(this, _scrollSize), {
646
647
  equalize: !0
647
648
  });
648
- r(this, Et, (this.vertical ? t(this, b).offsetHeight : t(this, b).offsetWidth) > t(this, L)), this.classList.toggle("has-overflow", t(this, Et)), t(this, Et) ? t(this, Zt).current || o(this, c, ws).call(this) : o(this, c, Es).call(this), t(this, ms).call(this), st(this, "scrollResize", { custom: !0 }), t(this, f).notify();
649
+ __privateSet(this, _hasOverflow, (this.vertical ? __privateGet(this, _contentElement).offsetHeight : __privateGet(this, _contentElement).offsetWidth) > __privateGet(this, _viewportSize)), this.classList.toggle("has-overflow", __privateGet(this, _hasOverflow)), __privateGet(this, _hasOverflow) ? __privateGet(this, _disabledCSSProperty).current || __privateMethod(this, _ScrollElement_instances, enable_fn).call(this) : __privateMethod(this, _ScrollElement_instances, disable_fn).call(this), __privateGet(this, _updateMaxSectionsSize).call(this), dispatchEvent(this, "scrollResize", { custom: !0 }), __privateGet(this, _damped).notify();
649
650
  }
650
651
  connectedCallback() {
651
- ce.register(this), r(this, f, new Xs(0, {
652
+ scrollEntries.register(this), __privateSet(this, _damped, new Damped(0, {
652
653
  damping: 0.01,
653
654
  min: 0,
654
- order: Qs.SCROLL
655
- })), this.setAttribute("tabindex", "0"), r(this, it, new yi({ element: t(this, b) })), t(this, it).changeEvent.subscribe(t(this, Ne)), r(this, Qt, new Ci({
655
+ order: TICK_ORDER.SCROLL
656
+ })), this.setAttribute("tabindex", "0"), __privateSet(this, _wheelControls, new WheelControls({ element: __privateGet(this, _contentElement) })), __privateGet(this, _wheelControls).changeEvent.subscribe(__privateGet(this, _notAutoplayControlListener)), __privateSet(this, _keyboardControls, new KeyboardControls({
656
657
  element: this
657
- })), t(this, Qt).changeEvent.subscribe(
658
- t(this, Ne)
659
- ), r(this, rt, new Pi({
660
- element: t(this, b),
658
+ })), __privateGet(this, _keyboardControls).changeEvent.subscribe(
659
+ __privateGet(this, _notAutoplayControlListener)
660
+ ), __privateSet(this, _dragControls, new DragControls({
661
+ element: __privateGet(this, _contentElement),
661
662
  rootElement: this
662
- })), t(this, rt).changeEvent.subscribe(t(this, Ne)), r(this, F, new Ei({
663
+ })), __privateGet(this, _dragControls).changeEvent.subscribe(__privateGet(this, _notAutoplayControlListener)), __privateSet(this, _autoplayControls, new AutoplayControls({
663
664
  culling: this
664
- })), t(this, F).changeEvent.subscribe(t(this, bs)), t(this, D).subscribe(() => {
665
- o(this, c, Is).call(this);
666
- }), t(this, Wt).subscribe(() => {
667
- o(this, c, Is).call(this);
668
- }), t(this, Gt).subscribe((e) => {
669
- t(this, it).axis = e.current ? "max" : t(this, D).current;
670
- }), t(this, Se).subscribe((e) => {
671
- t(this, rt).inertion = typeof e.current == "number" ? e.current : 1;
672
- }), t(this, St).subscribe(() => {
673
- t(this, A) && t(this, T).call(this);
674
- }), t(this, gt).subscribe(({ current: e }) => {
675
- t(this, A) && (e ? o(this, c, hs).call(this) : o(this, c, Te).call(this));
676
- }), t(this, J).subscribe((e) => {
677
- t(this, it).debounce = e.current, t(this, rt).swipe = e.current, t(this, F).interval = e.current, t(this, A) && (e.current && !e.previous && !t(this, a).length ? o(this, c, hs).call(this) : !e.current && e.previous && t(this, a).length && o(this, c, Te).call(this));
678
- }), t(this, vt).subscribe((e) => {
679
- t(this, A) && (t(this, T).call(this), e.current && !e.previous && !t(this, a).length ? o(this, c, hs).call(this) : !e.current && e.previous && t(this, a).length && o(this, c, Te).call(this));
680
- }), t(this, Q).subscribe((e) => {
681
- t(this, A) && (t(this, T).call(this), o(this, c, de).call(this));
682
- }), t(this, V).subscribe((e) => {
683
- e.current ? (t(this, A) && (t(this, a).length || (t(this, gt).current = !0)), t(this, f).max = 1 / 0, t(this, f).min = -1 / 0) : (r(this, He, 0), t(this, f).max = t(this, P), t(this, f).min = 0), this.classList.toggle("loop", !!e.current);
684
- }), t(this, ge).subscribe((e) => {
685
- t(this, f).damping = e.current;
686
- }), t(this, ve).subscribe((e) => {
687
- t(this, f).mass = e.current;
688
- }), t(this, ye).subscribe((e) => {
689
- t(this, f).stiffness = e.current;
690
- }), t(this, X).subscribe((e) => {
691
- t(this, F).speed = e.current, !t(this, wt) && e.current && !e.previous ? t(this, F).connect() : !e.current && e.previous && t(this, F).disconnect();
692
- }), t(this, Ut).subscribe((e) => {
693
- e.current || (t(this, F).direction = 1);
694
- }), t(this, Y).subscribe((e) => {
695
- t(this, A) && o(this, c, de).call(this);
696
- }), t(this, yt).subscribe((e) => {
697
- t(this, A) && t(this, Y).current && o(this, c, de).call(this);
698
- }), t(this, Ct).subscribe((e) => {
699
- t(this, A) && t(this, Y).current && o(this, c, de).call(this);
700
- }), t(this, we).subscribe((e) => {
701
- t(this, A) && t(this, f).notify();
702
- }), t(this, f).isRunning.subscribe((e) => {
665
+ })), __privateGet(this, _autoplayControls).changeEvent.subscribe(__privateGet(this, _controlsListener)), __privateGet(this, _axisCSSProperty).subscribe(() => {
666
+ __privateMethod(this, _ScrollElement_instances, updateAxis_fn).call(this);
667
+ }), __privateGet(this, _reverseCSSProperty).subscribe(() => {
668
+ __privateMethod(this, _ScrollElement_instances, updateAxis_fn).call(this);
669
+ }), __privateGet(this, _wheelMaxDeltaCSSProperty).subscribe((e) => {
670
+ __privateGet(this, _wheelControls).axis = e.current ? "max" : __privateGet(this, _axisCSSProperty).current;
671
+ }), __privateGet(this, _dragInertionCSSProperty).subscribe((e) => {
672
+ __privateGet(this, _dragControls).inertion = typeof e.current == "number" ? e.current : 1;
673
+ }), __privateGet(this, _pagesCSSProperty).subscribe(() => {
674
+ __privateGet(this, _isConnected) && __privateGet(this, _resizeListener).call(this);
675
+ }), __privateGet(this, _splitCSSProperty).subscribe(({ current }) => {
676
+ __privateGet(this, _isConnected) && (current ? __privateMethod(this, _ScrollElement_instances, split_fn).call(this) : __privateMethod(this, _ScrollElement_instances, unsplit_fn).call(this));
677
+ }), __privateGet(this, _sectionalCSSProperty).subscribe((e) => {
678
+ __privateGet(this, _wheelControls).debounce = e.current, __privateGet(this, _dragControls).swipe = e.current, __privateGet(this, _autoplayControls).interval = e.current, __privateGet(this, _isConnected) && (e.current && !e.previous && !__privateGet(this, _visibleSections).length ? __privateMethod(this, _ScrollElement_instances, split_fn).call(this) : !e.current && e.previous && __privateGet(this, _visibleSections).length && __privateMethod(this, _ScrollElement_instances, unsplit_fn).call(this));
679
+ }), __privateGet(this, _autoSizeCSSProperty).subscribe((e) => {
680
+ __privateGet(this, _isConnected) && (__privateGet(this, _resizeListener).call(this), e.current && !e.previous && !__privateGet(this, _visibleSections).length ? __privateMethod(this, _ScrollElement_instances, split_fn).call(this) : !e.current && e.previous && __privateGet(this, _visibleSections).length && __privateMethod(this, _ScrollElement_instances, unsplit_fn).call(this));
681
+ }), __privateGet(this, _sectionsInViewCSSProperty).subscribe((e) => {
682
+ __privateGet(this, _isConnected) && (__privateGet(this, _resizeListener).call(this), __privateMethod(this, _ScrollElement_instances, updateMarks_fn).call(this));
683
+ }), __privateGet(this, _loopCSSProperty).subscribe((e) => {
684
+ e.current ? (__privateGet(this, _isConnected) && (__privateGet(this, _visibleSections).length || (__privateGet(this, _splitCSSProperty).current = !0)), __privateGet(this, _damped).max = 1 / 0, __privateGet(this, _damped).min = -1 / 0) : (__privateSet(this, _overscroll, 0), __privateGet(this, _damped).max = __privateGet(this, _scrollSize), __privateGet(this, _damped).min = 0), this.classList.toggle("loop", !!e.current);
685
+ }), __privateGet(this, _dampingCSSProperty).subscribe((e) => {
686
+ __privateGet(this, _damped).damping = e.current;
687
+ }), __privateGet(this, _massCSSProperty).subscribe((e) => {
688
+ __privateGet(this, _damped).mass = e.current;
689
+ }), __privateGet(this, _stiffnessCSSProperty).subscribe((e) => {
690
+ __privateGet(this, _damped).stiffness = e.current;
691
+ }), __privateGet(this, _autoplayCSSProperty).subscribe((e) => {
692
+ __privateGet(this, _autoplayControls).speed = e.current, !__privateGet(this, _disabled) && e.current && !e.previous ? __privateGet(this, _autoplayControls).connect() : !e.current && e.previous && __privateGet(this, _autoplayControls).disconnect();
693
+ }), __privateGet(this, _autoplayUserDirectionCSSProperty).subscribe((e) => {
694
+ e.current || (__privateGet(this, _autoplayControls).direction = 1);
695
+ }), __privateGet(this, _classesCSSProperty).subscribe((e) => {
696
+ __privateGet(this, _isConnected) && __privateMethod(this, _ScrollElement_instances, updateMarks_fn).call(this);
697
+ }), __privateGet(this, _currentIndexStartOffsetCSSProperty).subscribe((e) => {
698
+ __privateGet(this, _isConnected) && __privateGet(this, _classesCSSProperty).current && __privateMethod(this, _ScrollElement_instances, updateMarks_fn).call(this);
699
+ }), __privateGet(this, _currentIndexEndOffsetCSSProperty).subscribe((e) => {
700
+ __privateGet(this, _isConnected) && __privateGet(this, _classesCSSProperty).current && __privateMethod(this, _ScrollElement_instances, updateMarks_fn).call(this);
701
+ }), __privateGet(this, _shiftSectionPositionCSSProperty).subscribe((e) => {
702
+ __privateGet(this, _isConnected) && __privateGet(this, _damped).notify();
703
+ }), __privateGet(this, _damped).isRunning.subscribe((e) => {
703
704
  this.classList.toggle("active", e.current);
704
- }), t(this, z).subscribe((e) => {
705
- t(this, K) || (t(this, a).length && o(this, c, de).call(this), this.style.setProperty("--counter", e.current + ""));
706
- }), t(this, Xt).subscribe((e) => {
707
- t(this, Xt).isRunning.current && t(this, f).set(e.current, { equalize: !0 });
708
- }), t(this, Zt).subscribe((e) => {
709
- e.current && !e.previous ? (this.classList.add("disabled"), o(this, c, Es).call(this)) : !e.current && e.previous && (this.classList.remove("disabled"), o(this, c, ws).call(this));
710
- }), t(this, jt).subscribe((e) => {
711
- e.current && !e.previous ? (this.classList.add("hibernated"), o(this, c, Ms).call(this)) : !e.current && e.previous && (this.classList.remove("hibernated"), o(this, c, Fs).call(this));
712
- }), t(this, me).observe(), t(this, D).observe(), t(this, Wt).observe(), t(this, mt).observe(), t(this, St).observe(), t(this, gt).observe(), t(this, J).observe(), t(this, Nt).observe(), t(this, qt).observe(), t(this, vt).observe(), t(this, Gt).observe(), t(this, Se).observe(), t(this, Q).observe(), t(this, V).observe(), t(this, ge).observe(), t(this, ve).observe(), t(this, ye).observe(), t(this, Ce).observe(), t(this, De).observe(), t(this, Pe).observe(), t(this, X).observe(), t(this, X).observe(), t(this, Ee).observe(), t(this, Ut).observe(), t(this, Y).observe(), t(this, yt).observe(), t(this, Ct).observe(), t(this, we).observe(), t(this, Kt).observe(), t(this, xe).observe(), t(this, Le).observe(), t(this, Zt).observe(), t(this, jt).observe(), pt.subscribe(t(this, qe), Ls.LAST), t(this, Be).observe(this, { childList: !0 });
705
+ }), __privateGet(this, _counter).subscribe((e) => {
706
+ __privateGet(this, _hibernated) || (__privateGet(this, _visibleSections).length && __privateMethod(this, _ScrollElement_instances, updateMarks_fn).call(this), this.style.setProperty("--counter", e.current + ""));
707
+ }), __privateGet(this, _setTween).subscribe((e) => {
708
+ __privateGet(this, _setTween).isRunning.current && __privateGet(this, _damped).set(e.current, { equalize: !0 });
709
+ }), __privateGet(this, _disabledCSSProperty).subscribe((e) => {
710
+ e.current && !e.previous ? (this.classList.add("disabled"), __privateMethod(this, _ScrollElement_instances, disable_fn).call(this)) : !e.current && e.previous && (this.classList.remove("disabled"), __privateMethod(this, _ScrollElement_instances, enable_fn).call(this));
711
+ }), __privateGet(this, _hibernatedCSSProperty).subscribe((e) => {
712
+ e.current && !e.previous ? (this.classList.add("hibernated"), __privateMethod(this, _ScrollElement_instances, hibernate_fn).call(this)) : !e.current && e.previous && (this.classList.remove("hibernated"), __privateMethod(this, _ScrollElement_instances, awake_fn).call(this));
713
+ }), __privateGet(this, _controlsCSSProperty).observe(), __privateGet(this, _axisCSSProperty).observe(), __privateGet(this, _reverseCSSProperty).observe(), __privateGet(this, _directionCSSProperty).observe(), __privateGet(this, _pagesCSSProperty).observe(), __privateGet(this, _splitCSSProperty).observe(), __privateGet(this, _sectionalCSSProperty).observe(), __privateGet(this, _easingCSSProperty).observe(), __privateGet(this, _durationCSSProperty).observe(), __privateGet(this, _autoSizeCSSProperty).observe(), __privateGet(this, _wheelMaxDeltaCSSProperty).observe(), __privateGet(this, _dragInertionCSSProperty).observe(), __privateGet(this, _sectionsInViewCSSProperty).observe(), __privateGet(this, _loopCSSProperty).observe(), __privateGet(this, _dampingCSSProperty).observe(), __privateGet(this, _massCSSProperty).observe(), __privateGet(this, _stiffnessCSSProperty).observe(), __privateGet(this, _mouseDragCSSProperty).observe(), __privateGet(this, _sectionDistanceScaleCSSProperty).observe(), __privateGet(this, _startSectionCSSProperty).observe(), __privateGet(this, _autoplayCSSProperty).observe(), __privateGet(this, _autoplayCSSProperty).observe(), __privateGet(this, _autoplayPauseDurationCSSProperty).observe(), __privateGet(this, _autoplayUserDirectionCSSProperty).observe(), __privateGet(this, _classesCSSProperty).observe(), __privateGet(this, _currentIndexStartOffsetCSSProperty).observe(), __privateGet(this, _currentIndexEndOffsetCSSProperty).observe(), __privateGet(this, _shiftSectionPositionCSSProperty).observe(), __privateGet(this, _focusDelayCSSProperty).observe(), __privateGet(this, _focusDurationCSSProperty).observe(), __privateGet(this, _shiftLimitCSSProperty).observe(), __privateGet(this, _disabledCSSProperty).observe(), __privateGet(this, _hibernatedCSSProperty).observe(), windowResizer.subscribe(__privateGet(this, _connectListener), RESIZE_ORDER.LAST), __privateGet(this, _mutationObserver).observe(this, { childList: !0 });
713
714
  }
714
715
  disconnectedCallback() {
715
- this.removeAttribute("tabindex"), this.classList.remove("disabled"), this.classList.remove("hibernated"), t(this, me).unobserve(), t(this, D).unobserve(), t(this, Wt).unobserve(), t(this, mt).unobserve(), t(this, St).unobserve(), t(this, gt).unobserve(), t(this, J).unobserve(), t(this, Nt).unobserve(), t(this, qt).unobserve(), t(this, vt).unobserve(), t(this, Gt).unobserve(), t(this, Se).unobserve(), t(this, Q).unobserve(), t(this, V).unobserve(), t(this, ge).unobserve(), t(this, ve).unobserve(), t(this, ye).unobserve(), t(this, Ce).unobserve(), t(this, De).unobserve(), t(this, Pe).unobserve(), t(this, X).unobserve(), t(this, Ee).unobserve(), t(this, Ut).unobserve(), t(this, Y).unobserve(), t(this, yt).unobserve(), t(this, Ct).unobserve(), t(this, we).unobserve(), t(this, Kt).unobserve(), t(this, xe).unobserve(), t(this, Le).unobserve(), t(this, Zt).unobserve(), t(this, jt).unobserve(), pt.unsubscribe(t(this, qe)), pt.unsubscribe(t(this, T)), os.unsubscribe(t(this, T)), o(this, c, Ms).call(this), t(this, Be).disconnect();
716
- }
717
- }
718
- f = new WeakMap(), me = new WeakMap(), D = new WeakMap(), Wt = new WeakMap(), mt = new WeakMap(), St = new WeakMap(), gt = new WeakMap(), J = new WeakMap(), Nt = new WeakMap(), qt = new WeakMap(), vt = new WeakMap(), Gt = new WeakMap(), Se = new WeakMap(), Q = new WeakMap(), V = new WeakMap(), ge = new WeakMap(), ve = new WeakMap(), ye = new WeakMap(), Ce = new WeakMap(), De = new WeakMap(), Pe = new WeakMap(), X = new WeakMap(), Ee = new WeakMap(), Ut = new WeakMap(), Y = new WeakMap(), yt = new WeakMap(), Ct = new WeakMap(), we = new WeakMap(), Kt = new WeakMap(), xe = new WeakMap(), Le = new WeakMap(), Zt = new WeakMap(), jt = new WeakMap(), Jt = new WeakMap(), b = new WeakMap(), Oe = new WeakMap(), G = new WeakMap(), a = new WeakMap(), ds = new WeakMap(), fs = new WeakMap(), L = new WeakMap(), P = new WeakMap(), U = new WeakMap(), it = new WeakMap(), Qt = new WeakMap(), rt = new WeakMap(), F = new WeakMap(), z = new WeakMap(), He = new WeakMap(), Pt = new WeakMap(), Et = new WeakMap(), wt = new WeakMap(), K = new WeakMap(), $e = new WeakMap(), xt = new WeakMap(), Xt = new WeakMap(), Lt = new WeakMap(), ht = new WeakMap(), A = new WeakMap(), Be = new WeakMap(), kt = new WeakMap(), ke = new WeakMap(), We = new WeakMap(), c = new WeakSet(), Is = function() {
719
- const e = t(this, D).current, s = t(this, Wt).current ? "-reverse" : "";
720
- t(this, b).style.flexDirection = e === "x" ? `row${s}` : `column${s}`, t(this, it).axis = t(this, Gt).current ? "max" : e, t(this, Qt).dimension = e === "x" ? "width" : "height", t(this, rt).axis = e, e === "x" ? this.style.touchAction = "pan-y" : e === "y" && (this.style.touchAction = "pan-x"), t(this, A) && t(this, T).call(this);
721
- }, hs = function() {
722
- o(this, c, Te).call(this), t(this, Oe).assignedElements().forEach((e, s) => {
723
- e instanceof HTMLElement && e.tagName !== "SCRIPT" && t(this, G).push(new ki(e, s, this));
724
- }), r(this, a, [...t(this, G)]), t(this, b).style.transform = "", st(this, "scrollSectionsChange", {
716
+ this.removeAttribute("tabindex"), this.classList.remove("disabled"), this.classList.remove("hibernated"), __privateGet(this, _controlsCSSProperty).unobserve(), __privateGet(this, _axisCSSProperty).unobserve(), __privateGet(this, _reverseCSSProperty).unobserve(), __privateGet(this, _directionCSSProperty).unobserve(), __privateGet(this, _pagesCSSProperty).unobserve(), __privateGet(this, _splitCSSProperty).unobserve(), __privateGet(this, _sectionalCSSProperty).unobserve(), __privateGet(this, _easingCSSProperty).unobserve(), __privateGet(this, _durationCSSProperty).unobserve(), __privateGet(this, _autoSizeCSSProperty).unobserve(), __privateGet(this, _wheelMaxDeltaCSSProperty).unobserve(), __privateGet(this, _dragInertionCSSProperty).unobserve(), __privateGet(this, _sectionsInViewCSSProperty).unobserve(), __privateGet(this, _loopCSSProperty).unobserve(), __privateGet(this, _dampingCSSProperty).unobserve(), __privateGet(this, _massCSSProperty).unobserve(), __privateGet(this, _stiffnessCSSProperty).unobserve(), __privateGet(this, _mouseDragCSSProperty).unobserve(), __privateGet(this, _sectionDistanceScaleCSSProperty).unobserve(), __privateGet(this, _startSectionCSSProperty).unobserve(), __privateGet(this, _autoplayCSSProperty).unobserve(), __privateGet(this, _autoplayPauseDurationCSSProperty).unobserve(), __privateGet(this, _autoplayUserDirectionCSSProperty).unobserve(), __privateGet(this, _classesCSSProperty).unobserve(), __privateGet(this, _currentIndexStartOffsetCSSProperty).unobserve(), __privateGet(this, _currentIndexEndOffsetCSSProperty).unobserve(), __privateGet(this, _shiftSectionPositionCSSProperty).unobserve(), __privateGet(this, _focusDelayCSSProperty).unobserve(), __privateGet(this, _focusDurationCSSProperty).unobserve(), __privateGet(this, _shiftLimitCSSProperty).unobserve(), __privateGet(this, _disabledCSSProperty).unobserve(), __privateGet(this, _hibernatedCSSProperty).unobserve(), windowResizer.unsubscribe(__privateGet(this, _connectListener)), windowResizer.unsubscribe(__privateGet(this, _resizeListener)), elementResizer.unsubscribe(__privateGet(this, _resizeListener)), __privateMethod(this, _ScrollElement_instances, hibernate_fn).call(this), __privateGet(this, _mutationObserver).disconnect();
717
+ }
718
+ };
719
+ _damped = new WeakMap(), _controlsCSSProperty = new WeakMap(), _axisCSSProperty = new WeakMap(), _reverseCSSProperty = new WeakMap(), _directionCSSProperty = new WeakMap(), _pagesCSSProperty = new WeakMap(), _splitCSSProperty = new WeakMap(), _sectionalCSSProperty = new WeakMap(), _easingCSSProperty = new WeakMap(), _durationCSSProperty = new WeakMap(), _autoSizeCSSProperty = new WeakMap(), _wheelMaxDeltaCSSProperty = new WeakMap(), _dragInertionCSSProperty = new WeakMap(), _sectionsInViewCSSProperty = new WeakMap(), _loopCSSProperty = new WeakMap(), _dampingCSSProperty = new WeakMap(), _massCSSProperty = new WeakMap(), _stiffnessCSSProperty = new WeakMap(), _mouseDragCSSProperty = new WeakMap(), _sectionDistanceScaleCSSProperty = new WeakMap(), _startSectionCSSProperty = new WeakMap(), _autoplayCSSProperty = new WeakMap(), _autoplayPauseDurationCSSProperty = new WeakMap(), _autoplayUserDirectionCSSProperty = new WeakMap(), _classesCSSProperty = new WeakMap(), _currentIndexStartOffsetCSSProperty = new WeakMap(), _currentIndexEndOffsetCSSProperty = new WeakMap(), _shiftSectionPositionCSSProperty = new WeakMap(), _focusDelayCSSProperty = new WeakMap(), _focusDurationCSSProperty = new WeakMap(), _shiftLimitCSSProperty = new WeakMap(), _disabledCSSProperty = new WeakMap(), _hibernatedCSSProperty = new WeakMap(), _contentWrapperElement = new WeakMap(), _contentElement = new WeakMap(), _slotElement = new WeakMap(), _sections = new WeakMap(), _visibleSections = new WeakMap(), _position2 = new WeakMap(), _contentPosition = new WeakMap(), _viewportSize = new WeakMap(), _scrollSize = new WeakMap(), _gap = new WeakMap(), _wheelControls = new WeakMap(), _keyboardControls = new WeakMap(), _dragControls = new WeakMap(), _autoplayControls = new WeakMap(), _counter = new WeakMap(), _overscroll = new WeakMap(), _distance = new WeakMap(), _hasOverflow = new WeakMap(), _disabled = new WeakMap(), _hibernated = new WeakMap(), _focusTimeoutId = new WeakMap(), _tweenTimeoutId = new WeakMap(), _setTween = new WeakMap(), _isGrabbing = new WeakMap(), _scrollLine = new WeakMap(), _isConnected = new WeakMap(), _mutationObserver = new WeakMap(), _currentSections = new WeakMap(), _skipNextResize = new WeakMap(), _maxSectionSizeTimeoutId = new WeakMap(), _ScrollElement_instances = new WeakSet(), updateAxis_fn = /* @__PURE__ */ __name(function() {
720
+ const axis = __privateGet(this, _axisCSSProperty).current, reverse = __privateGet(this, _reverseCSSProperty).current ? "-reverse" : "";
721
+ __privateGet(this, _contentElement).style.flexDirection = axis === "x" ? `row${reverse}` : `column${reverse}`, __privateGet(this, _wheelControls).axis = __privateGet(this, _wheelMaxDeltaCSSProperty).current ? "max" : axis, __privateGet(this, _keyboardControls).dimension = axis === "x" ? "width" : "height", __privateGet(this, _dragControls).axis = axis, axis === "x" ? this.style.touchAction = "pan-y" : axis === "y" && (this.style.touchAction = "pan-x"), __privateGet(this, _isConnected) && __privateGet(this, _resizeListener).call(this);
722
+ }, "#updateAxis"), split_fn = /* @__PURE__ */ __name(function() {
723
+ __privateMethod(this, _ScrollElement_instances, unsplit_fn).call(this), __privateGet(this, _slotElement).assignedElements().forEach((element, i) => {
724
+ element instanceof HTMLElement && element.tagName !== "SCRIPT" && __privateGet(this, _sections).push(new ScrollSection(element, i, this));
725
+ }), __privateSet(this, _visibleSections, [...__privateGet(this, _sections)]), __privateGet(this, _contentElement).style.transform = "", dispatchEvent(this, "scrollSectionsChange", {
725
726
  custom: !0,
726
727
  composed: !0
727
- }), t(this, T).call(this), o(this, c, de).call(this);
728
- }, Te = function() {
729
- t(this, G).forEach((e) => {
730
- e.destroy();
731
- }), r(this, G, []), r(this, a, []), t(this, z).reset(), t(this, f).reset(), this.style.removeProperty("--max-section-size"), st(this, "scrollSectionsChange", {
728
+ }), __privateGet(this, _resizeListener).call(this), __privateMethod(this, _ScrollElement_instances, updateMarks_fn).call(this);
729
+ }, "#split"), unsplit_fn = /* @__PURE__ */ __name(function() {
730
+ __privateGet(this, _sections).forEach((section) => {
731
+ section.destroy();
732
+ }), __privateSet(this, _sections, []), __privateSet(this, _visibleSections, []), __privateGet(this, _counter).reset(), __privateGet(this, _damped).reset(), this.style.removeProperty("--max-section-size"), dispatchEvent(this, "scrollSectionsChange", {
732
733
  custom: !0,
733
734
  composed: !0
734
735
  });
735
- }, Es = function() {
736
- t(this, wt) || (r(this, wt, !0), t(this, f).unsubscribe(t(this, ps)), t(this, f).unlistenAnimationFrame(), clearInterval(t(this, $e)), clearInterval(t(this, xt)), t(this, Xt).unlistenAnimationFrame(), t(this, it).disconnect(), t(this, Qt).disconnect(), t(this, rt).disconnect(), t(this, F).disconnect(), t(this, Et) || (this.sections.forEach((e) => {
737
- e.unsetTransform();
738
- }), t(this, T).call(this)));
739
- }, ws = function() {
740
- t(this, wt) && (r(this, wt, !1), t(this, f).subscribe(t(this, ps), -1e4), t(this, f).notify(), t(this, it).connect(), t(this, Qt).connect(), t(this, rt).connect(), t(this, X).current && t(this, F).connect());
741
- }, Ms = function() {
742
- t(this, K) || (r(this, K, !0), clearTimeout(t(this, We)), pt.unsubscribe(t(this, T)), o(this, c, Es).call(this), t(this, b).style.transform = "", t(this, b).style.height = "", t(this, b).style.width = "", this.classList.remove("has-overflow", "start", "end"), this.style.removeProperty("--counter"), t(this, G).length ? o(this, c, Te).call(this) : (t(this, z).reset(), t(this, f).reset()), ce.unregister(this));
743
- }, Fs = function() {
744
- t(this, K) && (r(this, K, !1), ce.register(this), this.tryResplit(), o(this, c, ws).call(this), this.scrollToSection(t(this, Pe).current, {
736
+ }, "#unsplit"), disable_fn = /* @__PURE__ */ __name(function() {
737
+ __privateGet(this, _disabled) || (__privateSet(this, _disabled, !0), __privateGet(this, _damped).unsubscribe(__privateGet(this, _animatedChangeListener)), __privateGet(this, _damped).unlistenAnimationFrame(), clearInterval(__privateGet(this, _focusTimeoutId)), clearInterval(__privateGet(this, _tweenTimeoutId)), __privateGet(this, _setTween).unlistenAnimationFrame(), __privateGet(this, _wheelControls).disconnect(), __privateGet(this, _keyboardControls).disconnect(), __privateGet(this, _dragControls).disconnect(), __privateGet(this, _autoplayControls).disconnect(), __privateGet(this, _hasOverflow) || (this.sections.forEach((section) => {
738
+ section.unsetTransform();
739
+ }), __privateGet(this, _resizeListener).call(this)));
740
+ }, "#disable"), enable_fn = /* @__PURE__ */ __name(function() {
741
+ __privateGet(this, _disabled) && (__privateSet(this, _disabled, !1), __privateGet(this, _damped).subscribe(__privateGet(this, _animatedChangeListener), -1e4), __privateGet(this, _damped).notify(), __privateGet(this, _wheelControls).connect(), __privateGet(this, _keyboardControls).connect(), __privateGet(this, _dragControls).connect(), __privateGet(this, _autoplayCSSProperty).current && __privateGet(this, _autoplayControls).connect());
742
+ }, "#enable"), hibernate_fn = /* @__PURE__ */ __name(function() {
743
+ __privateGet(this, _hibernated) || (__privateSet(this, _hibernated, !0), clearTimeout(__privateGet(this, _maxSectionSizeTimeoutId)), windowResizer.unsubscribe(__privateGet(this, _resizeListener)), __privateMethod(this, _ScrollElement_instances, disable_fn).call(this), __privateGet(this, _contentElement).style.transform = "", __privateGet(this, _contentElement).style.height = "", __privateGet(this, _contentElement).style.width = "", this.classList.remove("has-overflow", "start", "end"), this.style.removeProperty("--counter"), __privateGet(this, _sections).length ? __privateMethod(this, _ScrollElement_instances, unsplit_fn).call(this) : (__privateGet(this, _counter).reset(), __privateGet(this, _damped).reset()), scrollEntries.unregister(this));
744
+ }, "#hibernate"), awake_fn = /* @__PURE__ */ __name(function() {
745
+ __privateGet(this, _hibernated) && (__privateSet(this, _hibernated, !1), scrollEntries.register(this), this.tryResplit(), __privateMethod(this, _ScrollElement_instances, enable_fn).call(this), this.scrollToSection(__privateGet(this, _startSectionCSSProperty).current, {
745
746
  behaviour: "instant"
746
- }), pt.subscribe(t(this, T), Ls.SCROLL));
747
- }, T = new WeakMap(), ps = new WeakMap(), Ys = function(e) {
748
- let s = t(this, z).current;
749
- return t(this, V).current ? s = gi(e, t(this, a).length) : s = js(e, 0, this.limit), s;
750
- }, Ne = new WeakMap(), bs = new WeakMap(), Ts = function(e = 1) {
751
- t(this, Ut).current && (t(this, F).direction = e), t(this, X).current && t(this, F).pauseAndContinue(
752
- t(this, Ee).current,
747
+ }), windowResizer.subscribe(__privateGet(this, _resizeListener), RESIZE_ORDER.SCROLL));
748
+ }, "#awake"), _resizeListener = new WeakMap(), _animatedChangeListener = new WeakMap(), clampCounter_fn = /* @__PURE__ */ __name(function(value) {
749
+ let counter = __privateGet(this, _counter).current;
750
+ return __privateGet(this, _loopCSSProperty).current ? counter = loopNumber(value, __privateGet(this, _visibleSections).length) : counter = clamp(value, 0, this.limit), counter;
751
+ }, "#clampCounter"), _notAutoplayControlListener = new WeakMap(), _controlsListener = new WeakMap(), processAutoplay_fn = /* @__PURE__ */ __name(function(direction = 1) {
752
+ __privateGet(this, _autoplayUserDirectionCSSProperty).current && (__privateGet(this, _autoplayControls).direction = direction), __privateGet(this, _autoplayCSSProperty).current && __privateGet(this, _autoplayControls).pauseAndContinue(
753
+ __privateGet(this, _autoplayPauseDurationCSSProperty).current,
753
754
  this.sectionalCSSProperty.current
754
755
  );
755
- }, Rs = function(e = "current") {
756
- if (t(this, V).current && t(this, a).length) {
757
- const s = Math.floor(t(this, f)[e]) % Math.floor(t(this, P) + t(this, L) + t(this, U));
758
- return s < 0 ? t(this, P) + s + t(this, L) + t(this, U) : s;
756
+ }, "#processAutoplay"), getScrollValue_fn = /* @__PURE__ */ __name(function(type = "current") {
757
+ if (__privateGet(this, _loopCSSProperty).current && __privateGet(this, _visibleSections).length) {
758
+ const mod = Math.floor(__privateGet(this, _damped)[type]) % Math.floor(__privateGet(this, _scrollSize) + __privateGet(this, _viewportSize) + __privateGet(this, _gap));
759
+ return mod < 0 ? __privateGet(this, _scrollSize) + mod + __privateGet(this, _viewportSize) + __privateGet(this, _gap) : mod;
759
760
  } else
760
- return t(this, f)[e];
761
- }, de = function() {
762
- if (t(this, a).length) {
763
- const e = t(this, z).current + t(this, yt).current;
764
- if (e === t(this, yt).current ? r(this, ht, "start") : e === this.limit ? r(this, ht, "end") : r(this, ht, null), st(this, "scrollLine", {
765
- detail: { line: t(this, ht) }
766
- }), t(this, Y).current) {
767
- this.classList.remove("end", "start"), t(this, ht) && this.classList.add(t(this, ht));
768
- const s = t(this, Q).current + t(this, Ct).current;
769
- r(this, kt, []), t(this, a).forEach((h, u) => {
770
- h.setCurrentIndex(null), h.setCurrentIndexArc(null), h.setCurrentIndexArcAbs(null), h.setMiddle(!1);
771
- const g = e - this.limit - 1 + t(this, Ct).current, v = e + s, C = this.sections.length - v;
772
- u >= e && u < v || u <= g ? (h.setMark("current"), t(this, kt).push(h)) : u >= v && u < v + C / 2 || u <= g + s ? h.setMark("next") : h.setMark("previous");
773
- }), t(this, ms).call(this);
761
+ return __privateGet(this, _damped)[type];
762
+ }, "#getScrollValue"), updateMarks_fn = /* @__PURE__ */ __name(function() {
763
+ if (__privateGet(this, _visibleSections).length) {
764
+ const counter = __privateGet(this, _counter).current + __privateGet(this, _currentIndexStartOffsetCSSProperty).current;
765
+ if (counter === __privateGet(this, _currentIndexStartOffsetCSSProperty).current ? __privateSet(this, _scrollLine, "start") : counter === this.limit ? __privateSet(this, _scrollLine, "end") : __privateSet(this, _scrollLine, null), dispatchEvent(this, "scrollLine", {
766
+ detail: { line: __privateGet(this, _scrollLine) }
767
+ }), __privateGet(this, _classesCSSProperty).current) {
768
+ this.classList.remove("end", "start"), __privateGet(this, _scrollLine) && this.classList.add(__privateGet(this, _scrollLine));
769
+ const sectionsInView = __privateGet(this, _sectionsInViewCSSProperty).current + __privateGet(this, _currentIndexEndOffsetCSSProperty).current;
770
+ __privateSet(this, _currentSections, []), __privateGet(this, _visibleSections).forEach((section, index) => {
771
+ section.setCurrentIndex(null), section.setCurrentIndexArc(null), section.setCurrentIndexArcAbs(null), section.setMiddle(!1);
772
+ const overflow = counter - this.limit - 1 + __privateGet(this, _currentIndexEndOffsetCSSProperty).current, currentRange = counter + sectionsInView, vv = this.sections.length - currentRange;
773
+ index >= counter && index < currentRange || index <= overflow ? (section.setMark("current"), __privateGet(this, _currentSections).push(section)) : index >= currentRange && index < currentRange + vv / 2 || index <= overflow + sectionsInView ? section.setMark("next") : section.setMark("previous");
774
+ }), __privateGet(this, _updateMaxSectionsSize).call(this);
774
775
  }
775
776
  }
776
- }, _s = function() {
777
- if (t(this, Y).current) {
778
- const e = Math.floor(t(this, kt).length / 2);
779
- t(this, kt).sort((s, h) => s.element.getBoundingClientRect().left - h.element.getBoundingClientRect().left), t(this, kt).forEach((s, h) => {
780
- const u = h - e;
781
- s.setCurrentIndex(h), s.setCurrentIndexArc(u), s.setCurrentIndexArcAbs(Math.abs(u)), s.setMiddle(h === e);
782
- }), t(this, a).forEach((s, h) => {
783
- s.setOffsetIndex(
784
- h - (t(this, z).current + t(this, Q).current)
777
+ }, "#updateMarks"), updateIndexes_fn = /* @__PURE__ */ __name(function() {
778
+ if (__privateGet(this, _classesCSSProperty).current) {
779
+ const middle = Math.floor(__privateGet(this, _currentSections).length / 2);
780
+ __privateGet(this, _currentSections).sort((a, b) => a.element.getBoundingClientRect().left - b.element.getBoundingClientRect().left), __privateGet(this, _currentSections).forEach((section, i) => {
781
+ const arcIndex = i - middle;
782
+ section.setCurrentIndex(i), section.setCurrentIndexArc(arcIndex), section.setCurrentIndexArcAbs(Math.abs(arcIndex)), section.setMiddle(i === middle);
783
+ }), __privateGet(this, _visibleSections).forEach((section, i) => {
784
+ section.setOffsetIndex(
785
+ i - (__privateGet(this, _counter).current + __privateGet(this, _sectionsInViewCSSProperty).current)
785
786
  );
786
787
  });
787
788
  }
788
- }, ms = new WeakMap(), ns = function(e = !1) {
789
- let s = this.targetScrollValue, h = 1 / 0, u = 0;
790
- const g = t(this, f).direction;
791
- for (let v = 0; v < t(this, a).length; v++) {
792
- const C = t(this, a)[v];
793
- let ue = t(this, Lt) ? C.size * g * -1 * 0.4 : 0, Me = C.position;
794
- this.overscroll && Me === 0 && e && (Me = t(this, Pt));
795
- let rs = Math.abs(Me + ue - s);
796
- rs <= h && (h = rs, u = v);
797
- }
798
- return u;
799
- }, qe = new WeakMap();
800
- q && !customElements.get("e-scroll") && customElements.define("e-scroll", As);
801
- var Ss;
802
- class is extends HTMLElement {
789
+ }, "#updateIndexes"), _updateMaxSectionsSize = new WeakMap(), getNearestSectionIndex_fn = /* @__PURE__ */ __name(function(NAMEIT = !1) {
790
+ let scrollValue = this.targetScrollValue, minDiff = 1 / 0, nearestIndex = 0;
791
+ const dir = __privateGet(this, _damped).direction;
792
+ for (let i = 0; i < __privateGet(this, _visibleSections).length; i++) {
793
+ const section = __privateGet(this, _visibleSections)[i];
794
+ let offset = __privateGet(this, _isGrabbing) ? section.size * dir * -1 * 0.4 : 0, position = section.position;
795
+ this.overscroll && position === 0 && NAMEIT && (position = __privateGet(this, _distance));
796
+ let diff = Math.abs(position + offset - scrollValue);
797
+ diff <= minDiff && (minDiff = diff, nearestIndex = i);
798
+ }
799
+ return nearestIndex;
800
+ }, "#getNearestSectionIndex"), _connectListener = new WeakMap(), __name(_ScrollElement, "ScrollElement");
801
+ let ScrollElement = _ScrollElement;
802
+ isBrowser && !customElements.get("e-scroll") && customElements.define("e-scroll", ScrollElement);
803
+ var _scrollElement2;
804
+ const _ScrollUserElement = class _ScrollUserElement extends HTMLElement {
803
805
  constructor() {
804
806
  super(...arguments);
805
- i(this, Ss, null);
807
+ __privateAdd(this, _scrollElement2, null);
806
808
  }
807
809
  get scrollElement() {
808
- return t(this, Ss);
810
+ return __privateGet(this, _scrollElement2);
809
811
  }
810
812
  connectedCallback() {
811
- const e = Li(this, As);
812
- e instanceof As ? r(this, Ss, e) : console.error(this, "e-scroll not found");
813
+ const scrollElement = findParentElement(this, ScrollElement);
814
+ scrollElement instanceof ScrollElement ? __privateSet(this, _scrollElement2, scrollElement) : console.error(this, "e-scroll not found");
813
815
  }
814
- }
815
- Ss = new WeakMap();
816
- var Yt, O, Vt, zt, Ge, Ue, _t, Ke, gs, vs;
817
- class zi extends is {
816
+ };
817
+ _scrollElement2 = new WeakMap(), __name(_ScrollUserElement, "ScrollUserElement");
818
+ let ScrollUserElement = _ScrollUserElement;
819
+ var _slotElement2, _thumbElement, _isHorisontal, _thumbSize, _thumbScrollSize, _position3, _resizeListener2, _scrollListener, _axisListener, _grabListener;
820
+ const _ScrollScrollbarElement = class _ScrollScrollbarElement extends ScrollUserElement {
818
821
  constructor() {
819
822
  super();
820
- i(this, Yt, null);
821
- i(this, O, null);
822
- i(this, Vt, !1);
823
- i(this, zt, 0);
824
- i(this, Ge, 0);
825
- i(this, Ue, 0);
826
- i(this, _t, () => {
827
- r(this, Vt, this.offsetWidth > this.offsetHeight);
828
- const e = t(this, Vt) ? this.offsetWidth : this.offsetHeight;
829
- r(this, zt, e / ((this.scrollElement.scrollSize + this.scrollElement.viewportSize) / e)), r(this, zt, Math.max(t(this, zt), 30)), t(this, Vt) ? (t(this, O).style.width = t(this, zt) + "px", t(this, O).style.height = "100%") : (t(this, O).style.width = "100%", t(this, O).style.height = t(this, zt) + "px"), r(this, Ge, e - t(this, zt)), this.scrollElement.scrollSize <= 0 ? this.style.display = "none" : this.style.display = "", t(this, Ke).call(this);
830
- });
831
- i(this, Ke, () => {
832
- r(this, Ue, this.scrollElement.currentProgress * t(this, Ge)), t(this, Vt) ? t(this, O).style.transform = `translate3d(${t(this, Ue)}px, 0px, 0px)` : t(this, O).style.transform = `translate3d(0px, ${t(this, Ue)}px, 0px)`;
833
- });
834
- i(this, gs, () => {
823
+ __privateAdd(this, _slotElement2, null);
824
+ __privateAdd(this, _thumbElement, null);
825
+ __privateAdd(this, _isHorisontal, !1);
826
+ __privateAdd(this, _thumbSize, 0);
827
+ __privateAdd(this, _thumbScrollSize, 0);
828
+ __privateAdd(this, _position3, 0);
829
+ __privateAdd(this, _resizeListener2, /* @__PURE__ */ __name(() => {
830
+ __privateSet(this, _isHorisontal, this.offsetWidth > this.offsetHeight);
831
+ const barSize = __privateGet(this, _isHorisontal) ? this.offsetWidth : this.offsetHeight;
832
+ __privateSet(this, _thumbSize, barSize / ((this.scrollElement.scrollSize + this.scrollElement.viewportSize) / barSize)), __privateSet(this, _thumbSize, Math.max(__privateGet(this, _thumbSize), 30)), __privateGet(this, _isHorisontal) ? (__privateGet(this, _thumbElement).style.width = __privateGet(this, _thumbSize) + "px", __privateGet(this, _thumbElement).style.height = "100%") : (__privateGet(this, _thumbElement).style.width = "100%", __privateGet(this, _thumbElement).style.height = __privateGet(this, _thumbSize) + "px"), __privateSet(this, _thumbScrollSize, barSize - __privateGet(this, _thumbSize)), this.scrollElement.scrollSize <= 0 ? this.style.display = "none" : this.style.display = "", __privateGet(this, _scrollListener).call(this);
833
+ }, "#resizeListener"));
834
+ __privateAdd(this, _scrollListener, /* @__PURE__ */ __name(() => {
835
+ __privateSet(this, _position3, this.scrollElement.currentProgress * __privateGet(this, _thumbScrollSize)), __privateGet(this, _isHorisontal) ? __privateGet(this, _thumbElement).style.transform = `translate3d(${__privateGet(this, _position3)}px, 0px, 0px)` : __privateGet(this, _thumbElement).style.transform = `translate3d(0px, ${__privateGet(this, _position3)}px, 0px)`;
836
+ }, "#scrollListener"));
837
+ __privateAdd(this, _axisListener, /* @__PURE__ */ __name(() => {
835
838
  this.setAttribute("axis", this.scrollElement.axisCSSProperty.current);
836
- });
837
- i(this, vs, (e) => {
838
- xi((u) => {
839
- const g = t(this, Vt) ? u.x : u.y, v = this.scrollElement.distance / t(this, Ge), C = (g - h) * v;
840
- this.scrollElement.setPosition(s + C);
839
+ }, "#axisListener"));
840
+ __privateAdd(this, _grabListener, /* @__PURE__ */ __name((grabEvent) => {
841
+ setupDrag((moveEvent) => {
842
+ const moveCursor = __privateGet(this, _isHorisontal) ? moveEvent.x : moveEvent.y, mult = this.scrollElement.distance / __privateGet(this, _thumbScrollSize), delta = (moveCursor - grabCursor) * mult;
843
+ this.scrollElement.setPosition(startValue + delta);
841
844
  });
842
- const s = this.scrollElement.damped.target, h = t(this, Vt) ? e.x : e.y;
843
- });
844
- if (q) {
845
- const e = this.attachShadow({ mode: "open" });
846
- e.adoptedStyleSheets = [
847
- Js({
845
+ const startValue = this.scrollElement.damped.target, grabCursor = __privateGet(this, _isHorisontal) ? grabEvent.x : grabEvent.y;
846
+ }, "#grabListener"));
847
+ if (isBrowser) {
848
+ const shadow = this.attachShadow({ mode: "open" });
849
+ shadow.adoptedStyleSheets = [
850
+ createStylesheet({
848
851
  ":host": {
849
852
  display: "inline-block",
850
853
  zIndex: "1",
@@ -873,562 +876,569 @@ class zi extends is {
873
876
  touchAction: "none"
874
877
  }
875
878
  })
876
- ], r(this, Yt, document.createElement("slot")), t(this, Yt).innerHTML = '<div class="default-thumb"></div>', e.appendChild(t(this, Yt));
879
+ ], __privateSet(this, _slotElement2, document.createElement("slot")), __privateGet(this, _slotElement2).innerHTML = '<div class="default-thumb"></div>', shadow.appendChild(__privateGet(this, _slotElement2));
877
880
  }
878
881
  }
879
882
  get thumbElement() {
880
- return t(this, O);
883
+ return __privateGet(this, _thumbElement);
881
884
  }
882
885
  connectedCallback() {
883
886
  super.connectedCallback(), this.setAttribute("drag-dead-zone", "");
884
- const e = t(this, Yt).assignedElements()[0] || t(this, Yt).firstElementChild;
885
- r(this, O, e), t(this, O).addEventListener("pointerdown", t(this, vs)), pt.subscribe(t(this, _t), Ls.SCROLL), os.subscribe(this, t(this, _t)), os.subscribe(this.scrollElement, t(this, _t)), this.scrollElement.onScroll(t(this, Ke)), this.scrollElement.axisCSSProperty.subscribe(t(this, gs));
887
+ const slottedThumb = __privateGet(this, _slotElement2).assignedElements()[0] || __privateGet(this, _slotElement2).firstElementChild;
888
+ __privateSet(this, _thumbElement, slottedThumb), __privateGet(this, _thumbElement).addEventListener("pointerdown", __privateGet(this, _grabListener)), windowResizer.subscribe(__privateGet(this, _resizeListener2), RESIZE_ORDER.SCROLL), elementResizer.subscribe(this, __privateGet(this, _resizeListener2)), elementResizer.subscribe(this.scrollElement, __privateGet(this, _resizeListener2)), this.scrollElement.onScroll(__privateGet(this, _scrollListener)), this.scrollElement.axisCSSProperty.subscribe(__privateGet(this, _axisListener));
886
889
  }
887
890
  disconnectedCallback() {
888
- this.removeAttribute("drag-dead-zone"), this.style.display = "", t(this, O).removeEventListener("pointerdown", t(this, vs)), pt.unsubscribe(t(this, _t)), os.unsubscribe(t(this, _t)), this.scrollElement.offScroll(t(this, Ke)), this.scrollElement.axisCSSProperty.unsubscribe(t(this, gs));
891
+ this.removeAttribute("drag-dead-zone"), this.style.display = "", __privateGet(this, _thumbElement).removeEventListener("pointerdown", __privateGet(this, _grabListener)), windowResizer.unsubscribe(__privateGet(this, _resizeListener2)), elementResizer.unsubscribe(__privateGet(this, _resizeListener2)), this.scrollElement.offScroll(__privateGet(this, _scrollListener)), this.scrollElement.axisCSSProperty.unsubscribe(__privateGet(this, _axisListener));
889
892
  }
890
- }
891
- Yt = new WeakMap(), O = new WeakMap(), Vt = new WeakMap(), zt = new WeakMap(), Ge = new WeakMap(), Ue = new WeakMap(), _t = new WeakMap(), Ke = new WeakMap(), gs = new WeakMap(), vs = new WeakMap();
892
- q && !customElements.get("e-scroll-scrollbar") && customElements.define("e-scroll-scrollbar", zi);
893
- var Ze, je, Je;
894
- class Bs extends is {
893
+ };
894
+ _slotElement2 = new WeakMap(), _thumbElement = new WeakMap(), _isHorisontal = new WeakMap(), _thumbSize = new WeakMap(), _thumbScrollSize = new WeakMap(), _position3 = new WeakMap(), _resizeListener2 = new WeakMap(), _scrollListener = new WeakMap(), _axisListener = new WeakMap(), _grabListener = new WeakMap(), __name(_ScrollScrollbarElement, "ScrollScrollbarElement");
895
+ let ScrollScrollbarElement = _ScrollScrollbarElement;
896
+ isBrowser && !customElements.get("e-scroll-scrollbar") && customElements.define("e-scroll-scrollbar", ScrollScrollbarElement);
897
+ var _behaviour, _easing, _duration;
898
+ const _ScrollButtonElement = class _ScrollButtonElement extends ScrollUserElement {
895
899
  constructor() {
896
900
  super();
897
- i(this, Ze, new l(this, "--behaviour", "smooth"));
898
- i(this, je, new l(
901
+ __privateAdd(this, _behaviour, new CSSProperty(this, "--behaviour", "smooth"));
902
+ __privateAdd(this, _easing, new CSSProperty(
899
903
  this,
900
904
  "--tween-easing",
901
905
  !1
902
906
  ));
903
- i(this, Je, new l(this, "--tween-duration", 0));
904
- q && this.addEventListener("click", () => {
905
- const e = t(this, Ze).current, s = t(this, je).current, h = t(this, Je).current;
907
+ __privateAdd(this, _duration, new CSSProperty(this, "--tween-duration", 0));
908
+ isBrowser && this.addEventListener("click", () => {
909
+ const behaviour = __privateGet(this, _behaviour).current, easing = __privateGet(this, _easing).current, duration = __privateGet(this, _duration).current;
906
910
  this.handleClick({
907
- behaviour: e,
908
- tween: s || h ? { easing: s, duration: h } : void 0
911
+ behaviour,
912
+ tween: easing || duration ? { easing, duration } : void 0
909
913
  });
910
914
  });
911
915
  }
912
916
  connectedCallback() {
913
- super.connectedCallback(), this.hasAttribute("tabindex") || this.setAttribute("tabindex", "0"), this.hasAttribute("role") || this.setAttribute("role", "button"), t(this, Ze).observe(), t(this, je).observe(), t(this, Je).observe();
917
+ super.connectedCallback(), this.hasAttribute("tabindex") || this.setAttribute("tabindex", "0"), this.hasAttribute("role") || this.setAttribute("role", "button"), __privateGet(this, _behaviour).observe(), __privateGet(this, _easing).observe(), __privateGet(this, _duration).observe();
914
918
  }
915
919
  disconnectedCallback() {
916
- this.removeAttribute("tabindex"), this.removeAttribute("role"), t(this, Ze).close(), t(this, je).close(), t(this, Je).close();
920
+ this.removeAttribute("tabindex"), this.removeAttribute("role"), __privateGet(this, _behaviour).close(), __privateGet(this, _easing).close(), __privateGet(this, _duration).close();
917
921
  }
918
- }
919
- Ze = new WeakMap(), je = new WeakMap(), Je = new WeakMap();
920
- var Qe;
921
- class Ai extends Bs {
922
+ };
923
+ _behaviour = new WeakMap(), _easing = new WeakMap(), _duration = new WeakMap(), __name(_ScrollButtonElement, "ScrollButtonElement");
924
+ let ScrollButtonElement = _ScrollButtonElement;
925
+ var _set;
926
+ const _ScrollSetButtonElement = class _ScrollSetButtonElement extends ScrollButtonElement {
922
927
  constructor() {
923
928
  super(...arguments);
924
- i(this, Qe, new l(this, "--set", 1));
929
+ __privateAdd(this, _set, new CSSProperty(this, "--set", 1));
925
930
  }
926
- handleClick(e) {
927
- this.scrollElement.scrollToSection(t(this, Qe).current, e);
931
+ handleClick(options) {
932
+ this.scrollElement.scrollToSection(__privateGet(this, _set).current, options);
928
933
  }
929
934
  connectedCallback() {
930
- super.connectedCallback(), t(this, Qe).observe();
935
+ super.connectedCallback(), __privateGet(this, _set).observe();
931
936
  }
932
937
  disconnectedCallback() {
933
- super.disconnectedCallback(), t(this, Qe).close();
938
+ super.disconnectedCallback(), __privateGet(this, _set).close();
934
939
  }
935
- }
936
- Qe = new WeakMap();
937
- q && !customElements.get("e-scroll-set-button") && customElements.define("e-scroll-set-button", Ai);
938
- var At, Xe;
939
- class Ii extends Bs {
940
+ };
941
+ _set = new WeakMap(), __name(_ScrollSetButtonElement, "ScrollSetButtonElement");
942
+ let ScrollSetButtonElement = _ScrollSetButtonElement;
943
+ isBrowser && !customElements.get("e-scroll-set-button") && customElements.define("e-scroll-set-button", ScrollSetButtonElement);
944
+ var _step, _scrollLineListener;
945
+ const _ScrollStepButtonElement = class _ScrollStepButtonElement extends ScrollButtonElement {
940
946
  constructor() {
941
947
  super(...arguments);
942
- i(this, At, new l(this, "--step", 1));
943
- i(this, Xe, () => {
944
- this.scrollElement.loopCSSProperty.current ? this.removeAttribute("disabled") : t(this, At).current > 0 && this.scrollElement.scrollLine === "end" || t(this, At).current < 0 && this.scrollElement.scrollLine === "start" ? this.setAttribute("disabled", "") : this.removeAttribute("disabled");
945
- });
948
+ __privateAdd(this, _step, new CSSProperty(this, "--step", 1));
949
+ __privateAdd(this, _scrollLineListener, /* @__PURE__ */ __name(() => {
950
+ this.scrollElement.loopCSSProperty.current ? this.removeAttribute("disabled") : __privateGet(this, _step).current > 0 && this.scrollElement.scrollLine === "end" || __privateGet(this, _step).current < 0 && this.scrollElement.scrollLine === "start" ? this.setAttribute("disabled", "") : this.removeAttribute("disabled");
951
+ }, "#scrollLineListener"));
946
952
  }
947
- handleClick(e) {
948
- this.scrollElement.shiftSections(t(this, At).current, e);
953
+ handleClick(options) {
954
+ this.scrollElement.shiftSections(__privateGet(this, _step).current, options);
949
955
  }
950
956
  connectedCallback() {
951
- super.connectedCallback(), this.scrollElement && (t(this, At).subscribe(() => {
952
- t(this, Xe).call(this);
953
- }), t(this, At).observe(), this.scrollElement.addEventListener(
957
+ super.connectedCallback(), this.scrollElement && (__privateGet(this, _step).subscribe(() => {
958
+ __privateGet(this, _scrollLineListener).call(this);
959
+ }), __privateGet(this, _step).observe(), this.scrollElement.addEventListener(
954
960
  "scrollLine",
955
- t(this, Xe)
956
- ), t(this, Xe).call(this));
961
+ __privateGet(this, _scrollLineListener)
962
+ ), __privateGet(this, _scrollLineListener).call(this));
957
963
  }
958
964
  disconnectedCallback() {
959
- super.disconnectedCallback(), t(this, At).close(), this.removeAttribute("disabled");
960
- }
961
- }
962
- At = new WeakMap(), Xe = new WeakMap();
963
- q && !customElements.get("e-scroll-step-button") && customElements.define("e-scroll-step-button", Ii);
964
- var nt, te, Ye, ys, Cs, _e;
965
- class Mi {
966
- constructor(n, e, s) {
967
- i(this, nt, null);
968
- i(this, te, null);
969
- i(this, Ye, null);
970
- i(this, ys, null);
971
- i(this, Cs, () => {
972
- t(this, te).scrollToSection(t(this, Ye), {
973
- behaviour: t(this, ys)
965
+ super.disconnectedCallback(), __privateGet(this, _step).close(), this.removeAttribute("disabled");
966
+ }
967
+ };
968
+ _step = new WeakMap(), _scrollLineListener = new WeakMap(), __name(_ScrollStepButtonElement, "ScrollStepButtonElement");
969
+ let ScrollStepButtonElement = _ScrollStepButtonElement;
970
+ isBrowser && !customElements.get("e-scroll-step-button") && customElements.define("e-scroll-step-button", ScrollStepButtonElement);
971
+ var _element2, _scrollElement3, _index2, _behaviour2, _clickListener, _counterChangeListener;
972
+ const _BulletButton = class _BulletButton {
973
+ constructor(scrollElement, index, behaviour) {
974
+ __privateAdd(this, _element2, null);
975
+ __privateAdd(this, _scrollElement3, null);
976
+ __privateAdd(this, _index2, null);
977
+ __privateAdd(this, _behaviour2, null);
978
+ __privateAdd(this, _clickListener, /* @__PURE__ */ __name(() => {
979
+ __privateGet(this, _scrollElement3).scrollToSection(__privateGet(this, _index2), {
980
+ behaviour: __privateGet(this, _behaviour2)
974
981
  });
975
- });
976
- i(this, _e, () => {
977
- t(this, nt).classList.toggle(
982
+ }, "#clickListener"));
983
+ __privateAdd(this, _counterChangeListener, /* @__PURE__ */ __name(() => {
984
+ __privateGet(this, _element2).classList.toggle(
978
985
  "current",
979
- t(this, te).counter.current === t(this, Ye)
986
+ __privateGet(this, _scrollElement3).counter.current === __privateGet(this, _index2)
980
987
  );
981
- });
982
- q && (r(this, nt, document.createElement("button")), t(this, nt).setAttribute("aria-label", `Go to section ${e + 1}`), r(this, te, n), r(this, ys, s), r(this, Ye, e), t(this, nt).addEventListener("click", t(this, Cs)), t(this, te).counter.subscribe(t(this, _e)), t(this, _e).call(this));
988
+ }, "#counterChangeListener"));
989
+ isBrowser && (__privateSet(this, _element2, document.createElement("button")), __privateGet(this, _element2).setAttribute("aria-label", `Go to section ${index + 1}`), __privateSet(this, _scrollElement3, scrollElement), __privateSet(this, _behaviour2, behaviour), __privateSet(this, _index2, index), __privateGet(this, _element2).addEventListener("click", __privateGet(this, _clickListener)), __privateGet(this, _scrollElement3).counter.subscribe(__privateGet(this, _counterChangeListener)), __privateGet(this, _counterChangeListener).call(this));
983
990
  }
984
991
  get element() {
985
- return t(this, nt);
992
+ return __privateGet(this, _element2);
986
993
  }
987
994
  destroy() {
988
- t(this, nt).removeEventListener("click", t(this, Cs)), t(this, te).counter.unsubscribe(t(this, _e)), t(this, nt).remove();
995
+ __privateGet(this, _element2).removeEventListener("click", __privateGet(this, _clickListener)), __privateGet(this, _scrollElement3).counter.unsubscribe(__privateGet(this, _counterChangeListener)), __privateGet(this, _element2).remove();
989
996
  }
990
- }
991
- nt = new WeakMap(), te = new WeakMap(), Ye = new WeakMap(), ys = new WeakMap(), Cs = new WeakMap(), _e = new WeakMap();
992
- var Ve, ee, ot;
993
- class Fi extends is {
997
+ };
998
+ _element2 = new WeakMap(), _scrollElement3 = new WeakMap(), _index2 = new WeakMap(), _behaviour2 = new WeakMap(), _clickListener = new WeakMap(), _counterChangeListener = new WeakMap(), __name(_BulletButton, "BulletButton");
999
+ let BulletButton = _BulletButton;
1000
+ var _contentElement2, _buttons, _sectionsChangeListener;
1001
+ const _ScrollBulletButtonsElement = class _ScrollBulletButtonsElement extends ScrollUserElement {
994
1002
  constructor() {
995
1003
  super(...arguments);
996
- i(this, Ve, null);
997
- i(this, ee, []);
998
- i(this, ot, xs(() => {
999
- t(this, ee).forEach((s) => s.destroy()), r(this, ee, []);
1000
- let e = 0;
1001
- this.scrollElement.loopCSSProperty.current ? e = this.scrollElement.visibleSections.length : e = this.scrollElement.visibleSections.length - Math.max(this.scrollElement.sectionsInViewCSSProperty.current - 1, 0);
1002
- for (let s = 0; s < e; s++) {
1003
- const h = new Mi(
1004
+ __privateAdd(this, _contentElement2, null);
1005
+ __privateAdd(this, _buttons, []);
1006
+ __privateAdd(this, _sectionsChangeListener, debounce(() => {
1007
+ __privateGet(this, _buttons).forEach((b) => b.destroy()), __privateSet(this, _buttons, []);
1008
+ let length = 0;
1009
+ this.scrollElement.loopCSSProperty.current ? length = this.scrollElement.visibleSections.length : length = this.scrollElement.visibleSections.length - Math.max(this.scrollElement.sectionsInViewCSSProperty.current - 1, 0);
1010
+ for (let index = 0; index < length; index++) {
1011
+ const button = new BulletButton(
1004
1012
  this.scrollElement,
1005
- s,
1013
+ index,
1006
1014
  this.getAttribute("behaviour") || "smooth"
1007
1015
  );
1008
- t(this, Ve).appendChild(h.element), t(this, ee).push(h);
1016
+ __privateGet(this, _contentElement2).appendChild(button.element), __privateGet(this, _buttons).push(button);
1009
1017
  }
1010
1018
  }, 0));
1011
1019
  }
1012
1020
  connectedCallback() {
1013
- super.connectedCallback(), this.innerHTML = "", r(this, Ve, document.createElement("div")), this.appendChild(t(this, Ve)), this.scrollElement.addEventListener(
1021
+ super.connectedCallback(), this.innerHTML = "", __privateSet(this, _contentElement2, document.createElement("div")), this.appendChild(__privateGet(this, _contentElement2)), this.scrollElement.addEventListener(
1014
1022
  "scrollSectionsChange",
1015
- t(this, ot)
1023
+ __privateGet(this, _sectionsChangeListener)
1016
1024
  ), this.scrollElement.sectionsInViewCSSProperty.subscribe(
1017
- t(this, ot)
1018
- ), this.scrollElement.loopCSSProperty.subscribe(t(this, ot)), t(this, ot).call(this);
1025
+ __privateGet(this, _sectionsChangeListener)
1026
+ ), this.scrollElement.loopCSSProperty.subscribe(__privateGet(this, _sectionsChangeListener)), __privateGet(this, _sectionsChangeListener).call(this);
1019
1027
  }
1020
1028
  disconnectedCallback() {
1021
1029
  this.scrollElement.removeEventListener(
1022
1030
  "scrollSectionsChange",
1023
- t(this, ot)
1031
+ __privateGet(this, _sectionsChangeListener)
1024
1032
  ), this.scrollElement.sectionsInViewCSSProperty.unsubscribe(
1025
- t(this, ot)
1026
- ), this.scrollElement.loopCSSProperty.unsubscribe(t(this, ot)), t(this, ee).forEach((e) => e.destroy()), r(this, ee, []), t(this, Ve).remove();
1027
- }
1028
- }
1029
- Ve = new WeakMap(), ee = new WeakMap(), ot = new WeakMap();
1030
- q && !customElements.get("e-scroll-bullet-buttons") && customElements.define("e-scroll-bullet-buttons", Fi);
1031
- var se, ie, re, he, It, Mt, Ft, Tt, I, H, $, B, Rt, k, lt, ct, _, Dt, ze, ut, at, dt, w, W, N, tt, et, Z, ts, S, Ot, ne, es, x, ft, R, M, j, Ae, Ht, y, oe, m, ti, ei, si, ii, ri, hi, ss, Ie, Ds, fe, ni, oi, Os;
1032
- class Ti extends is {
1033
+ __privateGet(this, _sectionsChangeListener)
1034
+ ), this.scrollElement.loopCSSProperty.unsubscribe(__privateGet(this, _sectionsChangeListener)), __privateGet(this, _buttons).forEach((b) => b.destroy()), __privateSet(this, _buttons, []), __privateGet(this, _contentElement2).remove();
1035
+ }
1036
+ };
1037
+ _contentElement2 = new WeakMap(), _buttons = new WeakMap(), _sectionsChangeListener = new WeakMap(), __name(_ScrollBulletButtonsElement, "ScrollBulletButtonsElement");
1038
+ let ScrollBulletButtonsElement = _ScrollBulletButtonsElement;
1039
+ isBrowser && !customElements.get("e-scroll-bullet-buttons") && customElements.define("e-scroll-bullet-buttons", ScrollBulletButtonsElement);
1040
+ var _dampingCSSProperty2, _massCSSProperty2, _stiffnessCSSProperty2, _targetCSSProperty, _disabledCSSProperty2, _distanceOffsetCSSProperty, _startOffsetCSSProperty, _captureOnceCSSProperty, _capturedCSSProperty, _releasedCSSProperty, _capturedFromStartCSSProperty, _capturedFromFinishCSSProperty, _releasedFromStartCSSProperty, _releasedFromFinishCSSProperty, _passedVarCSSProperty, _progressVarCSSProperty, _progressArcVarCSSProperty, _progressArcMultCSSProperty, _animationVarTypeCSSProperty, _distanceVarCSSProperty, _startVarCSSProperty, _finishVarCSSProperty, _isCaptured, _isReleased, _isCapturedFromStart, _isReleasedFromStart, _isCapturedFromFinish, _isReleasedFromFinish, _anotherScrollEntries, _targetElement, _directionPosition, _directionSize, _moverDirectionSize, _passed, _progress, _start, _distance2, _finish, _isResized, _isCapturedOnce, _isDisabled, _skipPassNotification, _ScrollSegmentElement_instances, captureListener_fn, releaseListener_fn, captureFromStartListener_fn, captureFromFinishListener_fn, releaseFromStartListener_fn, releaseFromFinishListener_fn, _resizeListener3, _tickListener, updateProgress_fn, handleClassSetting_fn, removeClasses_fn, removeVars_fn, removeCurrentMarks_fn;
1041
+ const _ScrollSegmentElement = class _ScrollSegmentElement extends ScrollUserElement {
1033
1042
  constructor() {
1034
1043
  super(...arguments);
1035
- i(this, m);
1036
- i(this, se);
1037
- i(this, ie);
1038
- i(this, re);
1039
- i(this, he);
1040
- i(this, It);
1041
- i(this, Mt);
1042
- i(this, Ft);
1043
- i(this, Tt);
1044
- i(this, I);
1045
- i(this, H);
1046
- i(this, $);
1047
- i(this, B);
1048
- i(this, Rt);
1049
- i(this, k);
1050
- i(this, lt);
1051
- i(this, ct);
1052
- i(this, _);
1053
- i(this, Dt);
1054
- i(this, ze);
1055
- i(this, ut);
1056
- i(this, at);
1057
- i(this, dt);
1058
- i(this, w);
1059
- i(this, W);
1060
- i(this, N);
1061
- i(this, tt);
1062
- i(this, et);
1063
- i(this, Z);
1064
- i(this, ts);
1065
- i(this, S);
1066
- i(this, Ot);
1067
- i(this, ne);
1068
- i(this, es);
1069
- i(this, x);
1070
- i(this, ft);
1071
- i(this, R);
1072
- i(this, M);
1073
- i(this, j);
1074
- i(this, Ae);
1075
- i(this, Ht);
1076
- i(this, y);
1077
- i(this, oe);
1078
- i(this, ss);
1079
- i(this, Ie);
1080
- r(this, se, new l(this, "--damping", 20)), r(this, ie, new l(this, "--mass", 0)), r(this, re, new l(this, "--stiffness", 0)), r(this, he, new l(this, "--target", "")), r(this, It, new l(this, "--disabled", !1)), r(this, Mt, new l(
1044
+ __privateAdd(this, _ScrollSegmentElement_instances);
1045
+ __privateAdd(this, _dampingCSSProperty2);
1046
+ __privateAdd(this, _massCSSProperty2);
1047
+ __privateAdd(this, _stiffnessCSSProperty2);
1048
+ __privateAdd(this, _targetCSSProperty);
1049
+ __privateAdd(this, _disabledCSSProperty2);
1050
+ __privateAdd(this, _distanceOffsetCSSProperty);
1051
+ __privateAdd(this, _startOffsetCSSProperty);
1052
+ __privateAdd(this, _captureOnceCSSProperty);
1053
+ __privateAdd(this, _capturedCSSProperty);
1054
+ __privateAdd(this, _releasedCSSProperty);
1055
+ __privateAdd(this, _capturedFromStartCSSProperty);
1056
+ __privateAdd(this, _capturedFromFinishCSSProperty);
1057
+ __privateAdd(this, _releasedFromStartCSSProperty);
1058
+ __privateAdd(this, _releasedFromFinishCSSProperty);
1059
+ __privateAdd(this, _passedVarCSSProperty);
1060
+ __privateAdd(this, _progressVarCSSProperty);
1061
+ __privateAdd(this, _progressArcVarCSSProperty);
1062
+ __privateAdd(this, _progressArcMultCSSProperty);
1063
+ __privateAdd(this, _animationVarTypeCSSProperty);
1064
+ __privateAdd(this, _distanceVarCSSProperty);
1065
+ __privateAdd(this, _startVarCSSProperty);
1066
+ __privateAdd(this, _finishVarCSSProperty);
1067
+ __privateAdd(this, _isCaptured);
1068
+ __privateAdd(this, _isReleased);
1069
+ __privateAdd(this, _isCapturedFromStart);
1070
+ __privateAdd(this, _isReleasedFromStart);
1071
+ __privateAdd(this, _isCapturedFromFinish);
1072
+ __privateAdd(this, _isReleasedFromFinish);
1073
+ __privateAdd(this, _anotherScrollEntries);
1074
+ __privateAdd(this, _targetElement);
1075
+ __privateAdd(this, _directionPosition);
1076
+ __privateAdd(this, _directionSize);
1077
+ __privateAdd(this, _moverDirectionSize);
1078
+ __privateAdd(this, _passed);
1079
+ __privateAdd(this, _progress);
1080
+ __privateAdd(this, _start);
1081
+ __privateAdd(this, _distance2);
1082
+ __privateAdd(this, _finish);
1083
+ __privateAdd(this, _isResized);
1084
+ __privateAdd(this, _isCapturedOnce);
1085
+ __privateAdd(this, _isDisabled);
1086
+ __privateAdd(this, _skipPassNotification);
1087
+ __privateAdd(this, _resizeListener3);
1088
+ __privateAdd(this, _tickListener);
1089
+ __privateSet(this, _dampingCSSProperty2, new CSSProperty(this, "--damping", 20)), __privateSet(this, _massCSSProperty2, new CSSProperty(this, "--mass", 0)), __privateSet(this, _stiffnessCSSProperty2, new CSSProperty(this, "--stiffness", 0)), __privateSet(this, _targetCSSProperty, new CSSProperty(this, "--target", "")), __privateSet(this, _disabledCSSProperty2, new CSSProperty(this, "--disabled", !1)), __privateSet(this, _distanceOffsetCSSProperty, new CSSProperty(
1081
1090
  this,
1082
1091
  "--distance-offset",
1083
1092
  0,
1084
1093
  { rawValueCheck: !1 }
1085
- )), r(this, Ft, new l(this, "--start-offset", 0, {
1094
+ )), __privateSet(this, _startOffsetCSSProperty, new CSSProperty(this, "--start-offset", 0, {
1086
1095
  rawValueCheck: !1
1087
- })), r(this, Tt, new l(
1096
+ })), __privateSet(this, _captureOnceCSSProperty, new CSSProperty(
1088
1097
  this,
1089
1098
  "--capture-once",
1090
1099
  !1
1091
- )), r(this, I, new l(this, "--captured", "")), r(this, H, new l(this, "--released", "")), r(this, $, new l(
1100
+ )), __privateSet(this, _capturedCSSProperty, new CSSProperty(this, "--captured", "")), __privateSet(this, _releasedCSSProperty, new CSSProperty(this, "--released", "")), __privateSet(this, _capturedFromStartCSSProperty, new CSSProperty(
1092
1101
  this,
1093
1102
  "--captured-from-start",
1094
1103
  ""
1095
- )), r(this, B, new l(
1104
+ )), __privateSet(this, _capturedFromFinishCSSProperty, new CSSProperty(
1096
1105
  this,
1097
1106
  "--captured-from-finish",
1098
1107
  ""
1099
- )), r(this, Rt, new l(
1108
+ )), __privateSet(this, _releasedFromStartCSSProperty, new CSSProperty(
1100
1109
  this,
1101
1110
  "--released-from-start",
1102
1111
  ""
1103
- )), r(this, k, new l(
1112
+ )), __privateSet(this, _releasedFromFinishCSSProperty, new CSSProperty(
1104
1113
  this,
1105
1114
  "--released-from-finish",
1106
1115
  ""
1107
- )), r(this, lt, new l(this, "--passed-var", "")), r(this, ct, new l(this, "--progress-var", "")), r(this, _, new l(
1116
+ )), __privateSet(this, _passedVarCSSProperty, new CSSProperty(this, "--passed-var", "")), __privateSet(this, _progressVarCSSProperty, new CSSProperty(this, "--progress-var", "")), __privateSet(this, _progressArcVarCSSProperty, new CSSProperty(
1108
1117
  this,
1109
1118
  "--progress-arc-var",
1110
1119
  ""
1111
- )), r(this, Dt, new l(
1120
+ )), __privateSet(this, _progressArcMultCSSProperty, new CSSProperty(
1112
1121
  this,
1113
1122
  "--progress-arc-mult",
1114
1123
  1
1115
- )), r(this, ze, new l(
1124
+ )), __privateSet(this, _animationVarTypeCSSProperty, new CSSProperty(
1116
1125
  this,
1117
1126
  "--animation-var-type",
1118
1127
  "target"
1119
- )), r(this, ut, new l(this, "--distance-var", "")), r(this, at, new l(this, "--start-var", "")), r(this, dt, new l(this, "--finish-var", "")), r(this, w, new ae(!1)), r(this, W, new ae(!1)), r(this, N, new ae(!1)), r(this, tt, new ae(!1)), r(this, et, new ae(!1)), r(this, Z, new ae(!1)), r(this, ts, []), r(this, S, this), r(this, Ot, 0), r(this, ne, 0), r(this, es, 0), r(this, x, new Xs(0, { order: Qs.SEGMENT, min: 0, max: 1 })), r(this, ft, 0), r(this, R, 0), r(this, M, 0), r(this, j, 0), r(this, Ae, !1), r(this, Ht, !1), r(this, y, !0), r(this, oe, !1), this.resize = () => {
1120
- r(this, ne, this.scrollElement.vertical ? this.offsetHeight : this.offsetWidth), r(this, Ot, this.scrollElement.vertical ? ls(this, this.scrollElement) : cs(this, this.scrollElement));
1121
- const e = bi(
1128
+ )), __privateSet(this, _distanceVarCSSProperty, new CSSProperty(this, "--distance-var", "")), __privateSet(this, _startVarCSSProperty, new CSSProperty(this, "--start-var", "")), __privateSet(this, _finishVarCSSProperty, new CSSProperty(this, "--finish-var", "")), __privateSet(this, _isCaptured, new Store(!1)), __privateSet(this, _isReleased, new Store(!1)), __privateSet(this, _isCapturedFromStart, new Store(!1)), __privateSet(this, _isReleasedFromStart, new Store(!1)), __privateSet(this, _isCapturedFromFinish, new Store(!1)), __privateSet(this, _isReleasedFromFinish, new Store(!1)), __privateSet(this, _anotherScrollEntries, []), __privateSet(this, _targetElement, this), __privateSet(this, _directionPosition, 0), __privateSet(this, _directionSize, 0), __privateSet(this, _moverDirectionSize, 0), __privateSet(this, _passed, new Damped(0, { order: TICK_ORDER.SEGMENT, min: 0, max: 1 })), __privateSet(this, _progress, 0), __privateSet(this, _start, 0), __privateSet(this, _distance2, 0), __privateSet(this, _finish, 0), __privateSet(this, _isResized, !1), __privateSet(this, _isCapturedOnce, !1), __privateSet(this, _isDisabled, !0), __privateSet(this, _skipPassNotification, !1), this.resize = () => {
1129
+ __privateSet(this, _directionSize, this.scrollElement.vertical ? this.offsetHeight : this.offsetWidth), __privateSet(this, _directionPosition, this.scrollElement.vertical ? getCumulativeOffsetTop(this, this.scrollElement) : getCumulativeOffsetLeft(this, this.scrollElement));
1130
+ const stickyOffset = getStickyOffset(
1122
1131
  this,
1123
1132
  this.scrollElement.vertical ? "top" : "left"
1124
1133
  );
1125
- r(this, Ot, t(this, Ot) - e), r(this, R, this.getStart()), r(this, M, this.getDistance()), r(this, R, t(this, R) + t(this, Ft).current), r(this, M, t(this, M) + t(this, Mt).current), r(this, j, t(this, R) + t(this, M)), this.scrollElement.currentScrollValue > t(this, j) && !t(this, w).current && !t(this, W).current && (t(this, w).current = !0), this.setVar(t(this, at).current, t(this, R)), this.setVar(t(this, dt).current, t(this, j)), this.setVar(t(this, ut).current, t(this, M)), t(this, x).max = t(this, M), r(this, Ae, !0), t(this, Ie).call(this);
1126
- }, this.findAnotherScrollEntries = xs(() => {
1127
- const e = ce.getAll(this).reverse();
1128
- let s = 0;
1129
- e.forEach((h, u) => {
1130
- h.element === this.scrollElement && (s = u);
1131
- }), r(this, ts, e.slice(s + 1)), this.tick();
1132
- }, 0), r(this, ss, () => {
1133
- t(this, y) || this.resize();
1134
- }), r(this, Ie, () => {
1135
- !t(this, y) && t(this, Ae) && this.tick();
1134
+ __privateSet(this, _directionPosition, __privateGet(this, _directionPosition) - stickyOffset), __privateSet(this, _start, this.getStart()), __privateSet(this, _distance2, this.getDistance()), __privateSet(this, _start, __privateGet(this, _start) + __privateGet(this, _startOffsetCSSProperty).current), __privateSet(this, _distance2, __privateGet(this, _distance2) + __privateGet(this, _distanceOffsetCSSProperty).current), __privateSet(this, _finish, __privateGet(this, _start) + __privateGet(this, _distance2)), this.scrollElement.currentScrollValue > __privateGet(this, _finish) && !__privateGet(this, _isCaptured).current && !__privateGet(this, _isReleased).current && (__privateGet(this, _isCaptured).current = !0), this.setVar(__privateGet(this, _startVarCSSProperty).current, __privateGet(this, _start)), this.setVar(__privateGet(this, _finishVarCSSProperty).current, __privateGet(this, _finish)), this.setVar(__privateGet(this, _distanceVarCSSProperty).current, __privateGet(this, _distance2)), __privateGet(this, _passed).max = __privateGet(this, _distance2), __privateSet(this, _isResized, !0), __privateGet(this, _tickListener).call(this);
1135
+ }, this.findAnotherScrollEntries = debounce(() => {
1136
+ const allScrollEntriesAbove = scrollEntries.getAll(this).reverse();
1137
+ let scrollIndex = 0;
1138
+ allScrollEntriesAbove.forEach((entry, i) => {
1139
+ entry.element === this.scrollElement && (scrollIndex = i);
1140
+ }), __privateSet(this, _anotherScrollEntries, allScrollEntriesAbove.slice(scrollIndex + 1)), this.tick();
1141
+ }, 0), __privateSet(this, _resizeListener3, () => {
1142
+ __privateGet(this, _isDisabled) || this.resize();
1143
+ }), __privateSet(this, _tickListener, () => {
1144
+ !__privateGet(this, _isDisabled) && __privateGet(this, _isResized) && this.tick();
1136
1145
  });
1137
1146
  }
1138
1147
  get distanceOffsetCSSProperty() {
1139
- return t(this, Mt);
1148
+ return __privateGet(this, _distanceOffsetCSSProperty);
1140
1149
  }
1141
1150
  get startOffsetCSSProperty() {
1142
- return t(this, Ft);
1151
+ return __privateGet(this, _startOffsetCSSProperty);
1143
1152
  }
1144
1153
  get captureOnceCSSProperty() {
1145
- return t(this, Tt);
1154
+ return __privateGet(this, _captureOnceCSSProperty);
1146
1155
  }
1147
1156
  get capturedCSSProperty() {
1148
- return t(this, I);
1157
+ return __privateGet(this, _capturedCSSProperty);
1149
1158
  }
1150
1159
  get releasedCSSProperty() {
1151
- return t(this, H);
1160
+ return __privateGet(this, _releasedCSSProperty);
1152
1161
  }
1153
1162
  get capturedFromStartCSSProperty() {
1154
- return t(this, $);
1163
+ return __privateGet(this, _capturedFromStartCSSProperty);
1155
1164
  }
1156
1165
  get capturedFromFinishCSSProperty() {
1157
- return t(this, B);
1166
+ return __privateGet(this, _capturedFromFinishCSSProperty);
1158
1167
  }
1159
1168
  get releasedFromStartCSSProperty() {
1160
- return t(this, Rt);
1169
+ return __privateGet(this, _releasedFromStartCSSProperty);
1161
1170
  }
1162
1171
  get releasedFromFinishCSSProperty() {
1163
- return t(this, k);
1172
+ return __privateGet(this, _releasedFromFinishCSSProperty);
1164
1173
  }
1165
1174
  get passedVarCSSProperty() {
1166
- return t(this, lt);
1175
+ return __privateGet(this, _passedVarCSSProperty);
1167
1176
  }
1168
1177
  get progressVarCSSProperty() {
1169
- return t(this, ct);
1178
+ return __privateGet(this, _progressVarCSSProperty);
1170
1179
  }
1171
1180
  get progressArcVarCSSProperty() {
1172
- return t(this, _);
1181
+ return __privateGet(this, _progressArcVarCSSProperty);
1173
1182
  }
1174
1183
  get progressArcMultCSSProperty() {
1175
- return t(this, Dt);
1184
+ return __privateGet(this, _progressArcMultCSSProperty);
1176
1185
  }
1177
1186
  get animationVarTypeCSSProperty() {
1178
- return t(this, ze);
1187
+ return __privateGet(this, _animationVarTypeCSSProperty);
1179
1188
  }
1180
1189
  get distanceVarCSSProperty() {
1181
- return t(this, ut);
1190
+ return __privateGet(this, _distanceVarCSSProperty);
1182
1191
  }
1183
1192
  get startVarCSSProperty() {
1184
- return t(this, at);
1193
+ return __privateGet(this, _startVarCSSProperty);
1185
1194
  }
1186
1195
  get finishVarCSSProperty() {
1187
- return t(this, dt);
1196
+ return __privateGet(this, _finishVarCSSProperty);
1188
1197
  }
1189
1198
  get disabledCSSProperty() {
1190
- return t(this, It);
1199
+ return __privateGet(this, _disabledCSSProperty2);
1191
1200
  }
1192
1201
  get dampingCSSProperty() {
1193
- return t(this, se);
1202
+ return __privateGet(this, _dampingCSSProperty2);
1194
1203
  }
1195
1204
  get massCSSProperty() {
1196
- return t(this, ie);
1205
+ return __privateGet(this, _massCSSProperty2);
1197
1206
  }
1198
1207
  get stiffnessCSSProperty() {
1199
- return t(this, re);
1208
+ return __privateGet(this, _stiffnessCSSProperty2);
1200
1209
  }
1201
1210
  get targetCSSProperty() {
1202
- return t(this, he);
1211
+ return __privateGet(this, _targetCSSProperty);
1203
1212
  }
1204
1213
  get isCaptured() {
1205
- return t(this, w);
1214
+ return __privateGet(this, _isCaptured);
1206
1215
  }
1207
1216
  get isReleased() {
1208
- return t(this, W);
1217
+ return __privateGet(this, _isReleased);
1209
1218
  }
1210
1219
  get isCapturedFromStart() {
1211
- return t(this, N);
1220
+ return __privateGet(this, _isCapturedFromStart);
1212
1221
  }
1213
1222
  get isReleasedFromStart() {
1214
- return t(this, tt);
1223
+ return __privateGet(this, _isReleasedFromStart);
1215
1224
  }
1216
1225
  get isCapturedFromFinish() {
1217
- return t(this, et);
1226
+ return __privateGet(this, _isCapturedFromFinish);
1218
1227
  }
1219
1228
  get isReleasedFromFinish() {
1220
- return t(this, Z);
1229
+ return __privateGet(this, _isReleasedFromFinish);
1221
1230
  }
1222
1231
  get directionPosition() {
1223
- return t(this, Ot);
1232
+ return __privateGet(this, _directionPosition);
1224
1233
  }
1225
1234
  get directionSize() {
1226
- return t(this, ne);
1235
+ return __privateGet(this, _directionSize);
1227
1236
  }
1228
1237
  get passed() {
1229
- return t(this, x);
1238
+ return __privateGet(this, _passed);
1230
1239
  }
1231
1240
  get progress() {
1232
- return t(this, ft);
1241
+ return __privateGet(this, _progress);
1233
1242
  }
1234
1243
  get progressArc() {
1235
- return Math.abs(Math.cos(t(this, ft) * Math.PI)) * t(this, Dt).current;
1244
+ return Math.abs(Math.cos(__privateGet(this, _progress) * Math.PI)) * __privateGet(this, _progressArcMultCSSProperty).current;
1236
1245
  }
1237
1246
  get start() {
1238
- return t(this, R);
1247
+ return __privateGet(this, _start);
1239
1248
  }
1240
1249
  get finish() {
1241
- return t(this, j);
1250
+ return __privateGet(this, _finish);
1242
1251
  }
1243
1252
  get distance() {
1244
- return t(this, M);
1253
+ return __privateGet(this, _distance2);
1245
1254
  }
1246
1255
  get isCapturedOnce() {
1247
- return t(this, Ht);
1256
+ return __privateGet(this, _isCapturedOnce);
1248
1257
  }
1249
1258
  get isDisabled() {
1250
- return t(this, y);
1259
+ return __privateGet(this, _isDisabled);
1251
1260
  }
1252
1261
  tick() {
1253
- let e = this.scrollElement.currentScrollValue;
1254
- t(this, ts).forEach((u) => {
1255
- e += u.value;
1262
+ let scrollValue = this.scrollElement.currentScrollValue;
1263
+ __privateGet(this, _anotherScrollEntries).forEach((se) => {
1264
+ scrollValue += se.value;
1256
1265
  });
1257
- const s = e - t(this, R);
1258
- t(this, oe) || r(this, oe, t(this, x).previous ? Math.abs(t(this, x).previous - s) > 1e3 : !1), t(this, x).set(s);
1259
- const h = Math.round(e);
1260
- t(this, w).current && (h >= t(this, R) ? t(this, N).current || o(this, m, si).call(this) : t(this, N).current && !t(this, tt).current && o(this, m, ri).call(this), h < t(this, j) ? t(this, Z).current && !t(this, et).current && o(this, m, ii).call(this) : t(this, N).current && !t(this, Z).current && o(this, m, hi).call(this)), h >= t(this, R) && h < t(this, j) ? t(this, w).current || o(this, m, ti).call(this) : t(this, w).current && (t(this, x).set(
1261
- mi(t(this, M) / 2, t(this, x).target, 0, t(this, M))
1262
- ), o(this, m, ei).call(this)), t(this, Ht) && t(this, Tt).current && (t(this, I).current && t(this, S).classList.add(t(this, I).current), r(this, y, !0));
1266
+ const delta = scrollValue - __privateGet(this, _start);
1267
+ __privateGet(this, _skipPassNotification) || __privateSet(this, _skipPassNotification, __privateGet(this, _passed).previous ? Math.abs(__privateGet(this, _passed).previous - delta) > 1e3 : !1), __privateGet(this, _passed).set(delta);
1268
+ const fscrollValue = Math.round(scrollValue);
1269
+ __privateGet(this, _isCaptured).current && (fscrollValue >= __privateGet(this, _start) ? __privateGet(this, _isCapturedFromStart).current || __privateMethod(this, _ScrollSegmentElement_instances, captureFromStartListener_fn).call(this) : __privateGet(this, _isCapturedFromStart).current && !__privateGet(this, _isReleasedFromStart).current && __privateMethod(this, _ScrollSegmentElement_instances, releaseFromStartListener_fn).call(this), fscrollValue < __privateGet(this, _finish) ? __privateGet(this, _isReleasedFromFinish).current && !__privateGet(this, _isCapturedFromFinish).current && __privateMethod(this, _ScrollSegmentElement_instances, captureFromFinishListener_fn).call(this) : __privateGet(this, _isCapturedFromStart).current && !__privateGet(this, _isReleasedFromFinish).current && __privateMethod(this, _ScrollSegmentElement_instances, releaseFromFinishListener_fn).call(this)), fscrollValue >= __privateGet(this, _start) && fscrollValue < __privateGet(this, _finish) ? __privateGet(this, _isCaptured).current || __privateMethod(this, _ScrollSegmentElement_instances, captureListener_fn).call(this) : __privateGet(this, _isCaptured).current && (__privateGet(this, _passed).set(
1270
+ step(__privateGet(this, _distance2) / 2, __privateGet(this, _passed).target, 0, __privateGet(this, _distance2))
1271
+ ), __privateMethod(this, _ScrollSegmentElement_instances, releaseListener_fn).call(this)), __privateGet(this, _isCapturedOnce) && __privateGet(this, _captureOnceCSSProperty).current && (__privateGet(this, _capturedCSSProperty).current && __privateGet(this, _targetElement).classList.add(__privateGet(this, _capturedCSSProperty).current), __privateSet(this, _isDisabled, !0));
1263
1272
  }
1264
1273
  disable() {
1265
- this.style.cssText = "", r(this, Ot, 0), r(this, ne, 0), t(this, x).reset(), r(this, ft, 0), r(this, R, 0), r(this, M, 0), r(this, j, 0), r(this, Ae, !1), t(this, w).current = !1, t(this, W).current = !1, t(this, N).current = !1, t(this, tt).current = !1, t(this, et).current = !1, t(this, Z).current = !1, r(this, Ht, !1), r(this, y, !0), o(this, m, Os).call(this);
1274
+ this.style.cssText = "", __privateSet(this, _directionPosition, 0), __privateSet(this, _directionSize, 0), __privateGet(this, _passed).reset(), __privateSet(this, _progress, 0), __privateSet(this, _start, 0), __privateSet(this, _distance2, 0), __privateSet(this, _finish, 0), __privateSet(this, _isResized, !1), __privateGet(this, _isCaptured).current = !1, __privateGet(this, _isReleased).current = !1, __privateGet(this, _isCapturedFromStart).current = !1, __privateGet(this, _isReleasedFromStart).current = !1, __privateGet(this, _isCapturedFromFinish).current = !1, __privateGet(this, _isReleasedFromFinish).current = !1, __privateSet(this, _isCapturedOnce, !1), __privateSet(this, _isDisabled, !0), __privateMethod(this, _ScrollSegmentElement_instances, removeCurrentMarks_fn).call(this);
1266
1275
  }
1267
1276
  enable() {
1268
- r(this, y, !1);
1277
+ __privateSet(this, _isDisabled, !1);
1269
1278
  }
1270
1279
  connectedCallback() {
1271
- super.connectedCallback(), t(this, w).subscribe((s) => {
1272
- s.current && st(this, "scrollSegmentCapture", {
1280
+ super.connectedCallback(), __privateGet(this, _isCaptured).subscribe((state) => {
1281
+ state.current && dispatchEvent(this, "scrollSegmentCapture", {
1273
1282
  composed: !0,
1274
1283
  custom: !0
1275
1284
  });
1276
- }), t(this, N).subscribe((s) => {
1277
- s.current && st(this, "scrollSegmentCaptureFromStart", {
1285
+ }), __privateGet(this, _isCapturedFromStart).subscribe((state) => {
1286
+ state.current && dispatchEvent(this, "scrollSegmentCaptureFromStart", {
1278
1287
  composed: !0,
1279
1288
  custom: !0
1280
1289
  });
1281
- }), t(this, et).subscribe((s) => {
1282
- s.current && st(this, "scrollSegmentCaptureFromFinish", {
1290
+ }), __privateGet(this, _isCapturedFromFinish).subscribe((state) => {
1291
+ state.current && dispatchEvent(this, "scrollSegmentCaptureFromFinish", {
1283
1292
  composed: !0,
1284
1293
  custom: !0
1285
1294
  });
1286
- }), t(this, W).subscribe((s) => {
1287
- s.current && st(this, "scrollSegmentRelease", {
1295
+ }), __privateGet(this, _isReleased).subscribe((state) => {
1296
+ state.current && dispatchEvent(this, "scrollSegmentRelease", {
1288
1297
  composed: !0,
1289
1298
  custom: !0
1290
1299
  });
1291
- }), t(this, tt).subscribe((s) => {
1292
- s.current && st(this, "scrollSegmentReleaseFromStart", {
1300
+ }), __privateGet(this, _isReleasedFromStart).subscribe((state) => {
1301
+ state.current && dispatchEvent(this, "scrollSegmentReleaseFromStart", {
1293
1302
  composed: !0,
1294
1303
  custom: !0
1295
1304
  });
1296
- }), t(this, Z).subscribe((s) => {
1297
- s.current && st(this, "scrollSegmentReleaseFromFinish", {
1305
+ }), __privateGet(this, _isReleasedFromFinish).subscribe((state) => {
1306
+ state.current && dispatchEvent(this, "scrollSegmentReleaseFromFinish", {
1298
1307
  composed: !0,
1299
1308
  custom: !0
1300
1309
  });
1301
- }), t(this, se).observe(), t(this, ie).observe(), t(this, re).observe(), t(this, he).observe(), t(this, It).observe(), t(this, Mt).observe(), t(this, Ft).observe(), t(this, Tt).observe(), t(this, I).observe(), t(this, H).observe(), t(this, $).observe(), t(this, B).observe(), t(this, Rt).observe(), t(this, k).observe(), t(this, lt).observe(), t(this, ct).observe(), t(this, _).observe(), t(this, Dt).observe(), t(this, ze).observe(), t(this, ut).observe(), t(this, at).observe(), t(this, dt).observe();
1302
- let e = !1;
1303
- this.findAnotherScrollEntries(), t(this, It).current || this.enable(), t(this, se).subscribe((s) => {
1304
- t(this, x).damping = s.current;
1305
- }), t(this, ie).subscribe((s) => {
1306
- t(this, x).mass = s.current;
1307
- }), t(this, re).subscribe((s) => {
1308
- t(this, x).stiffness = s.current;
1309
- }), t(this, he).subscribe((s) => {
1310
- s.previous && o(this, m, Os).call(this), s.current ? s.current === "parent" ? r(this, S, this.parentElement || this) : r(this, S, document.querySelector(s.current) || this) : r(this, S, this);
1311
- }), t(this, It).subscribe((s) => {
1312
- s.current && !s.previous ? this.disable() : !s.current && s.previous && (this.resize(), this.enable());
1313
- }), t(this, Ft).subscribe(() => {
1314
- e && !t(this, y) && this.resize();
1315
- }), t(this, Mt).subscribe(() => {
1316
- e && !t(this, y) && this.resize();
1317
- }), t(this, I).subscribe((s) => {
1318
- o(this, m, fe).call(this, s);
1319
- }), t(this, $).subscribe((s) => {
1320
- o(this, m, fe).call(this, s);
1321
- }), t(this, B).subscribe((s) => {
1322
- o(this, m, fe).call(this, s);
1323
- }), t(this, H).subscribe((s) => {
1324
- o(this, m, fe).call(this, s);
1325
- }), t(this, Rt).subscribe((s) => {
1326
- o(this, m, fe).call(this, s);
1327
- }), t(this, k).subscribe((s) => {
1328
- o(this, m, fe).call(this, s);
1329
- }), t(this, Tt).subscribe((s) => {
1330
- t(this, y) || !s.current && s.previous && (this.resize(), this.enable());
1331
- }), t(this, lt).subscribe((s) => {
1332
- t(this, y) || (this.removeVar(s.previous), this.setVar(s.current, this.passed.current));
1333
- }), t(this, ct).subscribe((s) => {
1334
- t(this, y) || (this.removeVar(s.previous), this.setVar(s.current, t(this, ft)));
1335
- }), t(this, _).subscribe((s) => {
1336
- t(this, y) || (this.removeVar(s.previous), this.setVar(s.current, this.progressArc));
1337
- }), t(this, Dt).subscribe((s) => {
1338
- t(this, y) || o(this, m, Ds).call(this);
1339
- }), t(this, at).subscribe((s) => {
1340
- t(this, y) || (this.removeVar(s.previous), this.setVar(s.current, t(this, R)));
1341
- }), t(this, dt).subscribe((s) => {
1342
- t(this, y) || (this.removeVar(s.previous), this.setVar(s.current, t(this, j)));
1343
- }), t(this, ut).subscribe((s) => {
1344
- t(this, y) || (this.removeVar(s.previous), this.setVar(s.current, t(this, M)));
1345
- }), t(this, x).subscribe((s) => {
1346
- if (t(this, oe)) {
1347
- r(this, oe, !1);
1310
+ }), __privateGet(this, _dampingCSSProperty2).observe(), __privateGet(this, _massCSSProperty2).observe(), __privateGet(this, _stiffnessCSSProperty2).observe(), __privateGet(this, _targetCSSProperty).observe(), __privateGet(this, _disabledCSSProperty2).observe(), __privateGet(this, _distanceOffsetCSSProperty).observe(), __privateGet(this, _startOffsetCSSProperty).observe(), __privateGet(this, _captureOnceCSSProperty).observe(), __privateGet(this, _capturedCSSProperty).observe(), __privateGet(this, _releasedCSSProperty).observe(), __privateGet(this, _capturedFromStartCSSProperty).observe(), __privateGet(this, _capturedFromFinishCSSProperty).observe(), __privateGet(this, _releasedFromStartCSSProperty).observe(), __privateGet(this, _releasedFromFinishCSSProperty).observe(), __privateGet(this, _passedVarCSSProperty).observe(), __privateGet(this, _progressVarCSSProperty).observe(), __privateGet(this, _progressArcVarCSSProperty).observe(), __privateGet(this, _progressArcMultCSSProperty).observe(), __privateGet(this, _animationVarTypeCSSProperty).observe(), __privateGet(this, _distanceVarCSSProperty).observe(), __privateGet(this, _startVarCSSProperty).observe(), __privateGet(this, _finishVarCSSProperty).observe();
1311
+ let isConnected = !1;
1312
+ this.findAnotherScrollEntries(), __privateGet(this, _disabledCSSProperty2).current || this.enable(), __privateGet(this, _dampingCSSProperty2).subscribe((e) => {
1313
+ __privateGet(this, _passed).damping = e.current;
1314
+ }), __privateGet(this, _massCSSProperty2).subscribe((e) => {
1315
+ __privateGet(this, _passed).mass = e.current;
1316
+ }), __privateGet(this, _stiffnessCSSProperty2).subscribe((e) => {
1317
+ __privateGet(this, _passed).stiffness = e.current;
1318
+ }), __privateGet(this, _targetCSSProperty).subscribe((e) => {
1319
+ e.previous && __privateMethod(this, _ScrollSegmentElement_instances, removeCurrentMarks_fn).call(this), e.current ? e.current === "parent" ? __privateSet(this, _targetElement, this.parentElement || this) : __privateSet(this, _targetElement, document.querySelector(e.current) || this) : __privateSet(this, _targetElement, this);
1320
+ }), __privateGet(this, _disabledCSSProperty2).subscribe((e) => {
1321
+ e.current && !e.previous ? this.disable() : !e.current && e.previous && (this.resize(), this.enable());
1322
+ }), __privateGet(this, _startOffsetCSSProperty).subscribe(() => {
1323
+ isConnected && !__privateGet(this, _isDisabled) && this.resize();
1324
+ }), __privateGet(this, _distanceOffsetCSSProperty).subscribe(() => {
1325
+ isConnected && !__privateGet(this, _isDisabled) && this.resize();
1326
+ }), __privateGet(this, _capturedCSSProperty).subscribe((e) => {
1327
+ __privateMethod(this, _ScrollSegmentElement_instances, handleClassSetting_fn).call(this, e);
1328
+ }), __privateGet(this, _capturedFromStartCSSProperty).subscribe((e) => {
1329
+ __privateMethod(this, _ScrollSegmentElement_instances, handleClassSetting_fn).call(this, e);
1330
+ }), __privateGet(this, _capturedFromFinishCSSProperty).subscribe((e) => {
1331
+ __privateMethod(this, _ScrollSegmentElement_instances, handleClassSetting_fn).call(this, e);
1332
+ }), __privateGet(this, _releasedCSSProperty).subscribe((e) => {
1333
+ __privateMethod(this, _ScrollSegmentElement_instances, handleClassSetting_fn).call(this, e);
1334
+ }), __privateGet(this, _releasedFromStartCSSProperty).subscribe((e) => {
1335
+ __privateMethod(this, _ScrollSegmentElement_instances, handleClassSetting_fn).call(this, e);
1336
+ }), __privateGet(this, _releasedFromFinishCSSProperty).subscribe((e) => {
1337
+ __privateMethod(this, _ScrollSegmentElement_instances, handleClassSetting_fn).call(this, e);
1338
+ }), __privateGet(this, _captureOnceCSSProperty).subscribe((v) => {
1339
+ __privateGet(this, _isDisabled) || !v.current && v.previous && (this.resize(), this.enable());
1340
+ }), __privateGet(this, _passedVarCSSProperty).subscribe((v) => {
1341
+ __privateGet(this, _isDisabled) || (this.removeVar(v.previous), this.setVar(v.current, this.passed.current));
1342
+ }), __privateGet(this, _progressVarCSSProperty).subscribe((v) => {
1343
+ __privateGet(this, _isDisabled) || (this.removeVar(v.previous), this.setVar(v.current, __privateGet(this, _progress)));
1344
+ }), __privateGet(this, _progressArcVarCSSProperty).subscribe((v) => {
1345
+ __privateGet(this, _isDisabled) || (this.removeVar(v.previous), this.setVar(v.current, this.progressArc));
1346
+ }), __privateGet(this, _progressArcMultCSSProperty).subscribe((v) => {
1347
+ __privateGet(this, _isDisabled) || __privateMethod(this, _ScrollSegmentElement_instances, updateProgress_fn).call(this);
1348
+ }), __privateGet(this, _startVarCSSProperty).subscribe((v) => {
1349
+ __privateGet(this, _isDisabled) || (this.removeVar(v.previous), this.setVar(v.current, __privateGet(this, _start)));
1350
+ }), __privateGet(this, _finishVarCSSProperty).subscribe((v) => {
1351
+ __privateGet(this, _isDisabled) || (this.removeVar(v.previous), this.setVar(v.current, __privateGet(this, _finish)));
1352
+ }), __privateGet(this, _distanceVarCSSProperty).subscribe((v) => {
1353
+ __privateGet(this, _isDisabled) || (this.removeVar(v.previous), this.setVar(v.current, __privateGet(this, _distance2)));
1354
+ }), __privateGet(this, _passed).subscribe((e) => {
1355
+ if (__privateGet(this, _skipPassNotification)) {
1356
+ __privateSet(this, _skipPassNotification, !1);
1348
1357
  return;
1349
1358
  }
1350
- o(this, m, Ds).call(this);
1359
+ __privateMethod(this, _ScrollSegmentElement_instances, updateProgress_fn).call(this);
1351
1360
  }), this.scrollElement.addEventListener(
1352
1361
  "scrollSectionsChange",
1353
1362
  this.findAnotherScrollEntries
1354
- ), this.scrollElement.addEventListener("scrollResize", this.resize), pt.subscribe(t(this, ss), Ls.SCROLL + 1), this.scrollElement.onScroll(t(this, Ie)), e = !0;
1363
+ ), this.scrollElement.addEventListener("scrollResize", this.resize), windowResizer.subscribe(__privateGet(this, _resizeListener3), RESIZE_ORDER.SCROLL + 1), this.scrollElement.onScroll(__privateGet(this, _tickListener)), isConnected = !0;
1355
1364
  }
1356
1365
  disconnectedCallback() {
1357
- pt.unsubscribe(t(this, ss)), this.scrollElement.offScroll(t(this, Ie)), this.scrollElement.removeEventListener(
1366
+ windowResizer.unsubscribe(__privateGet(this, _resizeListener3)), this.scrollElement.offScroll(__privateGet(this, _tickListener)), this.scrollElement.removeEventListener(
1358
1367
  "scrollSectionsChange",
1359
1368
  this.findAnotherScrollEntries
1360
- ), this.scrollElement.removeEventListener("scrollResize", this.resize), t(this, se).close(), t(this, ie).close(), t(this, re).close(), t(this, he).close(), t(this, It).close(), t(this, Mt).close(), t(this, Ft).close(), t(this, Tt).close(), t(this, I).close(), t(this, H).close(), t(this, $).close(), t(this, B).close(), t(this, Rt).close(), t(this, k).close(), t(this, lt).close(), t(this, ct).close(), t(this, _).close(), t(this, Dt).close(), t(this, ut).close(), t(this, at).close(), t(this, dt).close(), t(this, w).close(), t(this, W).close(), t(this, N).close(), t(this, tt).close(), t(this, et).close(), t(this, Z).close(), this.disable(), t(this, x).close();
1369
+ ), this.scrollElement.removeEventListener("scrollResize", this.resize), __privateGet(this, _dampingCSSProperty2).close(), __privateGet(this, _massCSSProperty2).close(), __privateGet(this, _stiffnessCSSProperty2).close(), __privateGet(this, _targetCSSProperty).close(), __privateGet(this, _disabledCSSProperty2).close(), __privateGet(this, _distanceOffsetCSSProperty).close(), __privateGet(this, _startOffsetCSSProperty).close(), __privateGet(this, _captureOnceCSSProperty).close(), __privateGet(this, _capturedCSSProperty).close(), __privateGet(this, _releasedCSSProperty).close(), __privateGet(this, _capturedFromStartCSSProperty).close(), __privateGet(this, _capturedFromFinishCSSProperty).close(), __privateGet(this, _releasedFromStartCSSProperty).close(), __privateGet(this, _releasedFromFinishCSSProperty).close(), __privateGet(this, _passedVarCSSProperty).close(), __privateGet(this, _progressVarCSSProperty).close(), __privateGet(this, _progressArcVarCSSProperty).close(), __privateGet(this, _progressArcMultCSSProperty).close(), __privateGet(this, _distanceVarCSSProperty).close(), __privateGet(this, _startVarCSSProperty).close(), __privateGet(this, _finishVarCSSProperty).close(), __privateGet(this, _isCaptured).close(), __privateGet(this, _isReleased).close(), __privateGet(this, _isCapturedFromStart).close(), __privateGet(this, _isReleasedFromStart).close(), __privateGet(this, _isCapturedFromFinish).close(), __privateGet(this, _isReleasedFromFinish).close(), this.disable(), __privateGet(this, _passed).close();
1361
1370
  }
1362
- removeVar(e) {
1363
- e && t(this, S).style.removeProperty(`--${e}`);
1371
+ removeVar(name) {
1372
+ name && __privateGet(this, _targetElement).style.removeProperty(`--${name}`);
1364
1373
  }
1365
- setVar(e, s) {
1366
- if (e) {
1367
- const h = typeof s == "number" ? s.toFixed(6) : s;
1368
- t(this, S).style.setProperty(`--${e}`, h);
1374
+ setVar(name, value) {
1375
+ if (name) {
1376
+ const v = typeof value == "number" ? value.toFixed(6) : value;
1377
+ __privateGet(this, _targetElement).style.setProperty(`--${name}`, v);
1369
1378
  }
1370
1379
  }
1371
1380
  getDistance() {
1372
- return t(this, ne) + t(this, es);
1381
+ return __privateGet(this, _directionSize) + __privateGet(this, _moverDirectionSize);
1373
1382
  }
1374
1383
  getStart() {
1375
- return t(this, Ot) - t(this, es);
1376
- }
1377
- }
1378
- se = new WeakMap(), ie = new WeakMap(), re = new WeakMap(), he = new WeakMap(), It = new WeakMap(), Mt = new WeakMap(), Ft = new WeakMap(), Tt = new WeakMap(), I = new WeakMap(), H = new WeakMap(), $ = new WeakMap(), B = new WeakMap(), Rt = new WeakMap(), k = new WeakMap(), lt = new WeakMap(), ct = new WeakMap(), _ = new WeakMap(), Dt = new WeakMap(), ze = new WeakMap(), ut = new WeakMap(), at = new WeakMap(), dt = new WeakMap(), w = new WeakMap(), W = new WeakMap(), N = new WeakMap(), tt = new WeakMap(), et = new WeakMap(), Z = new WeakMap(), ts = new WeakMap(), S = new WeakMap(), Ot = new WeakMap(), ne = new WeakMap(), es = new WeakMap(), x = new WeakMap(), ft = new WeakMap(), R = new WeakMap(), M = new WeakMap(), j = new WeakMap(), Ae = new WeakMap(), Ht = new WeakMap(), y = new WeakMap(), oe = new WeakMap(), m = new WeakSet(), ti = function() {
1379
- t(this, w).current = !0, t(this, W).current = !1, r(this, Ht, !0), t(this, H).current && t(this, S).classList.remove(t(this, H).current), t(this, k).current && t(this, S).classList.remove(
1380
- t(this, k).current
1381
- ), t(this, k).current && t(this, S).classList.remove(
1382
- t(this, k).current
1383
- ), t(this, I).current && t(this, S).classList.add(t(this, I).current);
1384
- }, ei = function() {
1385
- t(this, W).current = !0, t(this, w).current = !1, r(this, Ht, !0), t(this, I).current && t(this, S).classList.remove(t(this, I).current), t(this, $).current && t(this, S).classList.remove(
1386
- t(this, $).current
1387
- ), t(this, B).current && t(this, S).classList.remove(
1388
- t(this, B).current
1389
- ), t(this, H).current && t(this, S).classList.add(t(this, H).current);
1390
- }, si = function() {
1391
- t(this, w).current = !0, t(this, N).current = !0, t(this, tt).current = !1, t(this, $).current && t(this, S).classList.add(
1392
- t(this, $).current
1384
+ return __privateGet(this, _directionPosition) - __privateGet(this, _moverDirectionSize);
1385
+ }
1386
+ };
1387
+ _dampingCSSProperty2 = new WeakMap(), _massCSSProperty2 = new WeakMap(), _stiffnessCSSProperty2 = new WeakMap(), _targetCSSProperty = new WeakMap(), _disabledCSSProperty2 = new WeakMap(), _distanceOffsetCSSProperty = new WeakMap(), _startOffsetCSSProperty = new WeakMap(), _captureOnceCSSProperty = new WeakMap(), _capturedCSSProperty = new WeakMap(), _releasedCSSProperty = new WeakMap(), _capturedFromStartCSSProperty = new WeakMap(), _capturedFromFinishCSSProperty = new WeakMap(), _releasedFromStartCSSProperty = new WeakMap(), _releasedFromFinishCSSProperty = new WeakMap(), _passedVarCSSProperty = new WeakMap(), _progressVarCSSProperty = new WeakMap(), _progressArcVarCSSProperty = new WeakMap(), _progressArcMultCSSProperty = new WeakMap(), _animationVarTypeCSSProperty = new WeakMap(), _distanceVarCSSProperty = new WeakMap(), _startVarCSSProperty = new WeakMap(), _finishVarCSSProperty = new WeakMap(), _isCaptured = new WeakMap(), _isReleased = new WeakMap(), _isCapturedFromStart = new WeakMap(), _isReleasedFromStart = new WeakMap(), _isCapturedFromFinish = new WeakMap(), _isReleasedFromFinish = new WeakMap(), _anotherScrollEntries = new WeakMap(), _targetElement = new WeakMap(), _directionPosition = new WeakMap(), _directionSize = new WeakMap(), _moverDirectionSize = new WeakMap(), _passed = new WeakMap(), _progress = new WeakMap(), _start = new WeakMap(), _distance2 = new WeakMap(), _finish = new WeakMap(), _isResized = new WeakMap(), _isCapturedOnce = new WeakMap(), _isDisabled = new WeakMap(), _skipPassNotification = new WeakMap(), _ScrollSegmentElement_instances = new WeakSet(), captureListener_fn = /* @__PURE__ */ __name(function() {
1388
+ __privateGet(this, _isCaptured).current = !0, __privateGet(this, _isReleased).current = !1, __privateSet(this, _isCapturedOnce, !0), __privateGet(this, _releasedCSSProperty).current && __privateGet(this, _targetElement).classList.remove(__privateGet(this, _releasedCSSProperty).current), __privateGet(this, _releasedFromFinishCSSProperty).current && __privateGet(this, _targetElement).classList.remove(
1389
+ __privateGet(this, _releasedFromFinishCSSProperty).current
1390
+ ), __privateGet(this, _releasedFromFinishCSSProperty).current && __privateGet(this, _targetElement).classList.remove(
1391
+ __privateGet(this, _releasedFromFinishCSSProperty).current
1392
+ ), __privateGet(this, _capturedCSSProperty).current && __privateGet(this, _targetElement).classList.add(__privateGet(this, _capturedCSSProperty).current);
1393
+ }, "#captureListener"), releaseListener_fn = /* @__PURE__ */ __name(function() {
1394
+ __privateGet(this, _isReleased).current = !0, __privateGet(this, _isCaptured).current = !1, __privateSet(this, _isCapturedOnce, !0), __privateGet(this, _capturedCSSProperty).current && __privateGet(this, _targetElement).classList.remove(__privateGet(this, _capturedCSSProperty).current), __privateGet(this, _capturedFromStartCSSProperty).current && __privateGet(this, _targetElement).classList.remove(
1395
+ __privateGet(this, _capturedFromStartCSSProperty).current
1396
+ ), __privateGet(this, _capturedFromFinishCSSProperty).current && __privateGet(this, _targetElement).classList.remove(
1397
+ __privateGet(this, _capturedFromFinishCSSProperty).current
1398
+ ), __privateGet(this, _releasedCSSProperty).current && __privateGet(this, _targetElement).classList.add(__privateGet(this, _releasedCSSProperty).current);
1399
+ }, "#releaseListener"), captureFromStartListener_fn = /* @__PURE__ */ __name(function() {
1400
+ __privateGet(this, _isCaptured).current = !0, __privateGet(this, _isCapturedFromStart).current = !0, __privateGet(this, _isReleasedFromStart).current = !1, __privateGet(this, _capturedFromStartCSSProperty).current && __privateGet(this, _targetElement).classList.add(
1401
+ __privateGet(this, _capturedFromStartCSSProperty).current
1393
1402
  );
1394
- }, ii = function() {
1395
- t(this, w).current = !0, t(this, et).current = !0, t(this, Z).current = !1, t(this, B).current && t(this, S).classList.add(
1396
- t(this, B).current
1403
+ }, "#captureFromStartListener"), captureFromFinishListener_fn = /* @__PURE__ */ __name(function() {
1404
+ __privateGet(this, _isCaptured).current = !0, __privateGet(this, _isCapturedFromFinish).current = !0, __privateGet(this, _isReleasedFromFinish).current = !1, __privateGet(this, _capturedFromFinishCSSProperty).current && __privateGet(this, _targetElement).classList.add(
1405
+ __privateGet(this, _capturedFromFinishCSSProperty).current
1397
1406
  );
1398
- }, ri = function() {
1399
- t(this, W).current = !0, t(this, tt).current = !0, t(this, N).current = !1, t(this, k).current && t(this, S).classList.add(
1400
- t(this, k).current
1407
+ }, "#captureFromFinishListener"), releaseFromStartListener_fn = /* @__PURE__ */ __name(function() {
1408
+ __privateGet(this, _isReleased).current = !0, __privateGet(this, _isReleasedFromStart).current = !0, __privateGet(this, _isCapturedFromStart).current = !1, __privateGet(this, _releasedFromFinishCSSProperty).current && __privateGet(this, _targetElement).classList.add(
1409
+ __privateGet(this, _releasedFromFinishCSSProperty).current
1401
1410
  );
1402
- }, hi = function() {
1403
- t(this, W).current = !0, t(this, Z).current = !0, t(this, et).current = !1, t(this, k).current && t(this, S).classList.add(
1404
- t(this, k).current
1411
+ }, "#releaseFromStartListener"), releaseFromFinishListener_fn = /* @__PURE__ */ __name(function() {
1412
+ __privateGet(this, _isReleased).current = !0, __privateGet(this, _isReleasedFromFinish).current = !0, __privateGet(this, _isCapturedFromFinish).current = !1, __privateGet(this, _releasedFromFinishCSSProperty).current && __privateGet(this, _targetElement).classList.add(
1413
+ __privateGet(this, _releasedFromFinishCSSProperty).current
1405
1414
  );
1406
- }, ss = new WeakMap(), Ie = new WeakMap(), Ds = function() {
1407
- const e = t(this, x)[t(this, ze).current];
1408
- this.setVar(t(this, lt).current, e), r(this, ft, e / t(this, M) || 0), this.setVar(t(this, ct).current, t(this, ft)), t(this, _).current && this.setVar(t(this, _).current, this.progressArc);
1409
- }, fe = function(e) {
1410
- if (t(this, y)) {
1411
- e.previous && t(this, S).classList.remove(e.previous), e.current && t(this, S).classList.remove(e.current);
1415
+ }, "#releaseFromFinishListener"), _resizeListener3 = new WeakMap(), _tickListener = new WeakMap(), updateProgress_fn = /* @__PURE__ */ __name(function() {
1416
+ const passedValue = __privateGet(this, _passed)[__privateGet(this, _animationVarTypeCSSProperty).current];
1417
+ this.setVar(__privateGet(this, _passedVarCSSProperty).current, passedValue), __privateSet(this, _progress, passedValue / __privateGet(this, _distance2) || 0), this.setVar(__privateGet(this, _progressVarCSSProperty).current, __privateGet(this, _progress)), __privateGet(this, _progressArcVarCSSProperty).current && this.setVar(__privateGet(this, _progressArcVarCSSProperty).current, this.progressArc);
1418
+ }, "#updateProgress"), handleClassSetting_fn = /* @__PURE__ */ __name(function(e) {
1419
+ if (__privateGet(this, _isDisabled)) {
1420
+ e.previous && __privateGet(this, _targetElement).classList.remove(e.previous), e.current && __privateGet(this, _targetElement).classList.remove(e.current);
1412
1421
  return;
1413
1422
  }
1414
- e.current && t(this, w).current ? (e.previous && t(this, S).classList.remove(e.previous), t(this, S).classList.add(e.current)) : !e.current && e.previous && t(this, S).classList.remove(e.previous);
1415
- }, ni = function(...e) {
1416
- e.forEach((s) => {
1417
- s && t(this, S).classList.remove(s);
1423
+ e.current && __privateGet(this, _isCaptured).current ? (e.previous && __privateGet(this, _targetElement).classList.remove(e.previous), __privateGet(this, _targetElement).classList.add(e.current)) : !e.current && e.previous && __privateGet(this, _targetElement).classList.remove(e.previous);
1424
+ }, "#handleClassSetting"), removeClasses_fn = /* @__PURE__ */ __name(function(...className) {
1425
+ className.forEach((c) => {
1426
+ c && __privateGet(this, _targetElement).classList.remove(c);
1418
1427
  });
1419
- }, oi = function(...e) {
1420
- e.forEach((s) => {
1421
- s && t(this, S).style.removeProperty(`--${s}`);
1428
+ }, "#removeClasses"), removeVars_fn = /* @__PURE__ */ __name(function(...vars) {
1429
+ vars.forEach((v) => {
1430
+ v && __privateGet(this, _targetElement).style.removeProperty(`--${v}`);
1422
1431
  });
1423
- }, Os = function() {
1424
- o(this, m, ni).call(this, t(this, I).current, t(this, $).current, t(this, B).current, t(this, H).current, t(this, Rt).current, t(this, k).current), o(this, m, oi).call(this, t(this, lt).current, t(this, ct).current, t(this, _).current, t(this, ut).current, t(this, at).current, t(this, dt).current);
1425
- };
1426
- q && !customElements.get("e-scroll-segment") && customElements.define("e-scroll-segment", Ti);
1427
- class Ri extends Bs {
1428
- handleClick(n) {
1432
+ }, "#removeVars"), removeCurrentMarks_fn = /* @__PURE__ */ __name(function() {
1433
+ __privateMethod(this, _ScrollSegmentElement_instances, removeClasses_fn).call(this, __privateGet(this, _capturedCSSProperty).current, __privateGet(this, _capturedFromStartCSSProperty).current, __privateGet(this, _capturedFromFinishCSSProperty).current, __privateGet(this, _releasedCSSProperty).current, __privateGet(this, _releasedFromStartCSSProperty).current, __privateGet(this, _releasedFromFinishCSSProperty).current), __privateMethod(this, _ScrollSegmentElement_instances, removeVars_fn).call(this, __privateGet(this, _passedVarCSSProperty).current, __privateGet(this, _progressVarCSSProperty).current, __privateGet(this, _progressArcVarCSSProperty).current, __privateGet(this, _distanceVarCSSProperty).current, __privateGet(this, _startVarCSSProperty).current, __privateGet(this, _finishVarCSSProperty).current);
1434
+ }, "#removeCurrentMarks"), __name(_ScrollSegmentElement, "ScrollSegmentElement");
1435
+ let ScrollSegmentElement = _ScrollSegmentElement;
1436
+ isBrowser && !customElements.get("e-scroll-segment") && customElements.define("e-scroll-segment", ScrollSegmentElement);
1437
+ const _ScrollSectionButtonElement = class _ScrollSectionButtonElement extends ScrollButtonElement {
1438
+ handleClick(options) {
1429
1439
  this.scrollElement.setPosition(
1430
- this.scrollElement.vertical ? ls(this) : cs(this),
1431
- n
1440
+ this.scrollElement.vertical ? getCumulativeOffsetTop(this) : getCumulativeOffsetLeft(this),
1441
+ options
1432
1442
  );
1433
1443
  }
1434
1444
  connectedCallback() {
@@ -1437,68 +1447,70 @@ class Ri extends Bs {
1437
1447
  disconnectedCallback() {
1438
1448
  super.disconnectedCallback();
1439
1449
  }
1440
- }
1441
- q && !customElements.get("e-scroll-section-button") && customElements.define("e-scroll-section-button", Ri);
1442
- var Ps;
1443
- const Ws = class Ws extends is {
1450
+ };
1451
+ __name(_ScrollSectionButtonElement, "ScrollSectionButtonElement");
1452
+ let ScrollSectionButtonElement = _ScrollSectionButtonElement;
1453
+ isBrowser && !customElements.get("e-scroll-section-button") && customElements.define("e-scroll-section-button", ScrollSectionButtonElement);
1454
+ var _counterChangeListener2;
1455
+ const _ScrollCounterElement = class _ScrollCounterElement extends ScrollUserElement {
1444
1456
  constructor() {
1445
1457
  super(...arguments);
1446
- i(this, Ps, () => {
1447
- const e = this.scrollElement.counter.current + 1, s = parseInt(this.getAttribute("pad") || "0");
1448
- this.textContent = e.toString().padStart(s, "0");
1449
- });
1458
+ __privateAdd(this, _counterChangeListener2, /* @__PURE__ */ __name(() => {
1459
+ const value = this.scrollElement.counter.current + 1, pad = parseInt(this.getAttribute("pad") || "0");
1460
+ this.textContent = value.toString().padStart(pad, "0");
1461
+ }, "#counterChangeListener"));
1450
1462
  }
1451
1463
  connectedCallback() {
1452
- return zs(this, null, function* () {
1453
- Vs(Ws.prototype, this, "connectedCallback").call(this), this.scrollElement.counter.subscribe(t(this, Ps));
1464
+ return __async(this, null, function* () {
1465
+ __superGet(_ScrollCounterElement.prototype, this, "connectedCallback").call(this), this.scrollElement.counter.subscribe(__privateGet(this, _counterChangeListener2));
1454
1466
  });
1455
1467
  }
1456
1468
  disconnectedCallback() {
1457
- this.scrollElement.counter.unsubscribe(t(this, Ps));
1469
+ this.scrollElement.counter.unsubscribe(__privateGet(this, _counterChangeListener2));
1458
1470
  }
1459
1471
  };
1460
- Ps = new WeakMap();
1461
- let Hs = Ws;
1462
- q && !customElements.get("e-scroll-counter") && customElements.define("e-scroll-counter", Hs);
1463
- var le;
1464
- const Ns = class Ns extends is {
1472
+ _counterChangeListener2 = new WeakMap(), __name(_ScrollCounterElement, "ScrollCounterElement");
1473
+ let ScrollCounterElement = _ScrollCounterElement;
1474
+ isBrowser && !customElements.get("e-scroll-counter") && customElements.define("e-scroll-counter", ScrollCounterElement);
1475
+ var _sectionsChangeListener2;
1476
+ const _ScrollTotalElement = class _ScrollTotalElement extends ScrollUserElement {
1465
1477
  constructor() {
1466
1478
  super(...arguments);
1467
- i(this, le, () => {
1468
- const e = this.scrollElement.limit + 1, s = parseInt(this.getAttribute("pad") || "0");
1469
- this.textContent = e.toString().padStart(s, "0");
1470
- });
1479
+ __privateAdd(this, _sectionsChangeListener2, /* @__PURE__ */ __name(() => {
1480
+ const value = this.scrollElement.limit + 1, pad = parseInt(this.getAttribute("pad") || "0");
1481
+ this.textContent = value.toString().padStart(pad, "0");
1482
+ }, "#sectionsChangeListener"));
1471
1483
  }
1472
1484
  connectedCallback() {
1473
- return zs(this, null, function* () {
1474
- Vs(Ns.prototype, this, "connectedCallback").call(this), this.scrollElement.sectionsInViewCSSProperty.subscribe(
1475
- t(this, le)
1485
+ return __async(this, null, function* () {
1486
+ __superGet(_ScrollTotalElement.prototype, this, "connectedCallback").call(this), this.scrollElement.sectionsInViewCSSProperty.subscribe(
1487
+ __privateGet(this, _sectionsChangeListener2)
1476
1488
  ), this.scrollElement.addEventListener(
1477
1489
  "scrollSectionsChange",
1478
- t(this, le)
1479
- ), t(this, le).call(this);
1490
+ __privateGet(this, _sectionsChangeListener2)
1491
+ ), __privateGet(this, _sectionsChangeListener2).call(this);
1480
1492
  });
1481
1493
  }
1482
1494
  disconnectedCallback() {
1483
1495
  this.scrollElement.sectionsInViewCSSProperty.unsubscribe(
1484
- t(this, le)
1496
+ __privateGet(this, _sectionsChangeListener2)
1485
1497
  ), this.scrollElement.removeEventListener(
1486
1498
  "scrollSectionsChange",
1487
- t(this, le)
1499
+ __privateGet(this, _sectionsChangeListener2)
1488
1500
  );
1489
1501
  }
1490
1502
  };
1491
- le = new WeakMap();
1492
- let $s = Ns;
1493
- q && !customElements.get("e-scroll-total") && customElements.define("e-scroll-total", $s);
1503
+ _sectionsChangeListener2 = new WeakMap(), __name(_ScrollTotalElement, "ScrollTotalElement");
1504
+ let ScrollTotalElement = _ScrollTotalElement;
1505
+ isBrowser && !customElements.get("e-scroll-total") && customElements.define("e-scroll-total", ScrollTotalElement);
1494
1506
  export {
1495
- Fi as ScrollBulletButtonsElement,
1496
- Hs as ScrollCounterElement,
1497
- As as ScrollElement,
1498
- zi as ScrollScrollbarElement,
1499
- Ri as ScrollSectionButtonElement,
1500
- Ti as ScrollSegmentElement,
1501
- Ai as ScrollSetButtonElement,
1502
- Ii as ScrollStepButtonElement,
1503
- $s as ScrollTotalElement
1507
+ ScrollBulletButtonsElement,
1508
+ ScrollCounterElement,
1509
+ ScrollElement,
1510
+ ScrollScrollbarElement,
1511
+ ScrollSectionButtonElement,
1512
+ ScrollSegmentElement,
1513
+ ScrollSetButtonElement,
1514
+ ScrollStepButtonElement,
1515
+ ScrollTotalElement
1504
1516
  };