aptechka 0.1.3 → 0.1.6

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 (210) hide show
  1. package/lib/Animated-CJcYqJzq.js +130 -0
  2. package/lib/Animated-DyZuTEQE.cjs +1 -0
  3. package/lib/Damped-AHRBHNEQ.cjs +1 -0
  4. package/lib/Damped-Csj-9_gH.js +36 -0
  5. package/lib/Derived-Bc88XJ8J.js +27 -0
  6. package/lib/Derived-SjPdLJiZ.cjs +1 -0
  7. package/lib/ElementConstructor-9f-12v7T.cjs +1 -0
  8. package/lib/ElementConstructor-CoKM2CTK.js +228 -0
  9. package/lib/{SourceManager-vXInLlh_.js → SourceManager-BoP9RAJr.js} +26 -26
  10. package/lib/SourceManager-CI6NfLzW.cjs +1 -0
  11. package/lib/Store-D0_rDIsE.cjs +1 -0
  12. package/lib/Store-JOKrNVEr.js +152 -0
  13. package/lib/Viewport-COsaberc.cjs +1 -0
  14. package/lib/Viewport-CXY5xcGJ.js +129 -0
  15. package/lib/WheelControls-CX9WUbBC.js +83 -0
  16. package/lib/WheelControls-CfDeGCOU.cjs +1 -0
  17. package/lib/abstract-elements/AbstractButtonElement.d.ts +5 -0
  18. package/lib/abstract-elements/index.cjs +1 -0
  19. package/lib/abstract-elements/index.d.ts +1 -0
  20. package/lib/abstract-elements/index.js +27 -0
  21. package/lib/accordion/AccordionElement.d.ts +24 -1
  22. package/lib/accordion/index.cjs +1 -0
  23. package/lib/accordion/index.js +166 -0
  24. package/lib/animation/Animated.d.ts +9 -12
  25. package/lib/animation/Tweened.d.ts +1 -1
  26. package/lib/animation/index.cjs +1 -1
  27. package/lib/animation/index.d.ts +1 -1
  28. package/lib/animation/index.js +11 -17
  29. package/lib/attribute/index.cjs +1 -1
  30. package/lib/attribute/index.d.ts +8 -4
  31. package/lib/attribute/index.js +44 -35
  32. package/lib/canvas/index.cjs +1 -0
  33. package/lib/{canvas-2d → canvas}/index.d.ts +4 -3
  34. package/lib/canvas/index.js +97 -0
  35. package/lib/connector/index.cjs +1 -0
  36. package/lib/connector/index.d.ts +15 -0
  37. package/lib/connector/index.js +54 -0
  38. package/lib/controls/WheelControls.d.ts +3 -2
  39. package/lib/controls/index.cjs +1 -1
  40. package/lib/controls/index.js +23 -27
  41. package/lib/createStylesheet-BON7aJYs.js +10 -0
  42. package/lib/createStylesheet-uicRVW05.cjs +1 -0
  43. package/lib/createTheme-BMH9cRrS.js +15 -0
  44. package/lib/createTheme-COo8IzPG.cjs +1 -0
  45. package/lib/custom-element/index.cjs +1 -1
  46. package/lib/custom-element/index.d.ts +3 -1
  47. package/lib/custom-element/index.js +19 -9
  48. package/lib/device/Viewport.d.ts +1 -1
  49. package/lib/device/index.cjs +1 -1
  50. package/lib/device/index.js +5 -121
  51. package/lib/element-constructor/ElementConstructor.d.ts +15 -17
  52. package/lib/element-constructor/createStylesheet.d.ts +2 -0
  53. package/lib/element-constructor/createTheme.d.ts +12 -0
  54. package/lib/element-constructor/htmlTags.d.ts +115 -113
  55. package/lib/element-constructor/index.cjs +1 -1
  56. package/lib/element-constructor/index.d.ts +2 -1
  57. package/lib/element-constructor/index.js +387 -1136
  58. package/lib/element-constructor/svgTags.d.ts +63 -63
  59. package/lib/element-resizer/index.cjs +1 -0
  60. package/lib/element-resizer/index.d.ts +9 -0
  61. package/lib/element-resizer/index.js +64 -0
  62. package/lib/en3/attachments/En3SourceManager.d.ts +2 -2
  63. package/lib/en3/index.cjs +7 -7
  64. package/lib/en3/index.js +252 -242
  65. package/lib/en3/objects/En3Clip.d.ts +2 -2
  66. package/lib/events-CoqmkUxo.js +11 -0
  67. package/lib/events-D68xg4dy.cjs +1 -0
  68. package/lib/file-EevnUtRj.cjs +1 -0
  69. package/lib/file-lxi_oXJf.js +13 -0
  70. package/lib/htmlTags-BCNUG7oK.js +683 -0
  71. package/lib/htmlTags-BSQys9wH.cjs +1 -0
  72. package/lib/image/index.cjs +1 -1
  73. package/lib/image/index.js +13 -20
  74. package/lib/index-DgtdcBEI.js +310 -0
  75. package/lib/index-i_Ki9M-w.cjs +9 -0
  76. package/lib/intersector/index.cjs +1 -1
  77. package/lib/intersector/index.d.ts +2 -1
  78. package/lib/intersector/index.js +33 -22
  79. package/lib/jsx/ComponentElement.d.ts +17 -0
  80. package/lib/jsx/h.d.ts +8 -0
  81. package/lib/jsx/hooks.d.ts +25 -0
  82. package/lib/jsx/index.cjs +1 -0
  83. package/lib/jsx/index.d.ts +4 -0
  84. package/lib/jsx/index.js +116 -0
  85. package/lib/jsx/render.d.ts +2 -0
  86. package/lib/jsx/type.d.ts +186 -0
  87. package/lib/ladder/index.cjs +1 -1
  88. package/lib/ladder/index.js +3 -4
  89. package/lib/layout-box/index.cjs +1 -1
  90. package/lib/layout-box/index.d.ts +1 -0
  91. package/lib/layout-box/index.js +113 -99
  92. package/lib/loading/index.cjs +1 -1
  93. package/lib/loading/index.js +1 -1
  94. package/lib/media/index.cjs +1 -1
  95. package/lib/media/index.js +17 -20
  96. package/lib/modal/ModalElement.d.ts +12 -0
  97. package/lib/modal/index.cjs +1 -0
  98. package/lib/modal/index.d.ts +1 -0
  99. package/lib/modal/index.js +144 -0
  100. package/lib/morph/index.cjs +1 -1
  101. package/lib/morph/index.js +1 -1
  102. package/lib/number-Bo5RdrA1.js +23 -0
  103. package/lib/number-yVpzMdbQ.cjs +1 -0
  104. package/lib/popover/PopoverButtonElement.d.ts +14 -0
  105. package/lib/popover/PopoverElement.d.ts +19 -0
  106. package/lib/popover/index.cjs +1 -0
  107. package/lib/popover/index.d.ts +2 -0
  108. package/lib/popover/index.js +122 -0
  109. package/lib/router/index.cjs +1 -1
  110. package/lib/router/index.js +2 -2
  111. package/lib/scroll/ScrollElement.d.ts +5 -3
  112. package/lib/scroll/index.cjs +1 -71
  113. package/lib/scroll/index.js +349 -314
  114. package/lib/scroll-entries/index.cjs +1 -1
  115. package/lib/scroll-entries/index.d.ts +1 -1
  116. package/lib/scroll-entries/index.js +4 -2
  117. package/lib/select/SelectElement.d.ts +25 -0
  118. package/lib/select/SelectHeadElement.d.ts +12 -0
  119. package/lib/select/SelectOptionElement.d.ts +13 -0
  120. package/lib/select/SelectUserElement.d.ts +7 -0
  121. package/lib/select/index.cjs +1 -0
  122. package/lib/select/index.d.ts +4 -0
  123. package/lib/select/index.js +7 -0
  124. package/lib/source/SourceClass.d.ts +1 -1
  125. package/lib/source/index.cjs +2 -2
  126. package/lib/source/index.js +13 -18
  127. package/lib/store/CumulativeResource.d.ts +2 -2
  128. package/lib/store/Resource.d.ts +1 -1
  129. package/lib/store/Store.d.ts +55 -9
  130. package/lib/store/StoreRegistry.d.ts +2 -2
  131. package/lib/store/index.cjs +1 -1
  132. package/lib/store/index.d.ts +2 -1
  133. package/lib/store/index.js +105 -66
  134. package/lib/string-BrDhnNUL.js +39 -0
  135. package/lib/string-DzUwFYSS.cjs +1 -0
  136. package/lib/studio/StudioElement.d.ts +3 -0
  137. package/lib/studio/index.cjs +10 -0
  138. package/lib/studio/index.js +1004 -0
  139. package/lib/studio/studioStorage.d.ts +14 -0
  140. package/lib/studio/tweaker/TweakerBooleanManagerElement.d.ts +10 -0
  141. package/lib/studio/tweaker/TweakerColorManagerElement.d.ts +10 -0
  142. package/lib/studio/tweaker/TweakerElement.d.ts +17 -0
  143. package/lib/studio/tweaker/TweakerFieldElement.d.ts +21 -0
  144. package/lib/studio/tweaker/TweakerFolderElement.d.ts +22 -0
  145. package/lib/studio/tweaker/TweakerLinkManagerElement.d.ts +10 -0
  146. package/lib/studio/tweaker/TweakerNumberManagerElement.d.ts +17 -0
  147. package/lib/studio/tweaker/TweakerRangeManagerElement.d.ts +10 -0
  148. package/lib/studio/tweaker/TweakerSelectManagerElement.d.ts +10 -0
  149. package/lib/studio/tweaker/TweakerStoreManagerElement.d.ts +10 -0
  150. package/lib/studio/tweaker/TweakerStringManagerElement.d.ts +12 -0
  151. package/lib/studio/tweaker/tweakerManagerConstructors.d.ts +5 -0
  152. package/lib/style-At6aDoqG.cjs +1 -0
  153. package/lib/style-j2TwriJ_.js +10 -0
  154. package/lib/theme/index.cjs +1 -0
  155. package/lib/theme/index.d.ts +90 -0
  156. package/lib/theme/index.js +34 -0
  157. package/lib/ticker/index.cjs +1 -1
  158. package/lib/ticker/index.js +1 -1
  159. package/lib/utils/events.d.ts +6 -0
  160. package/lib/utils/index.cjs +1 -1
  161. package/lib/utils/index.d.ts +8 -7
  162. package/lib/utils/index.js +95 -105
  163. package/lib/utils/number.d.ts +2 -3
  164. package/lib/utils/string.d.ts +1 -0
  165. package/lib/utils/style.d.ts +2 -0
  166. package/lib/utils/ts-utility.d.ts +2 -0
  167. package/lib/video/index.cjs +1 -1
  168. package/lib/video/index.js +13 -20
  169. package/lib/window-resizer/index.cjs +1 -0
  170. package/lib/window-resizer/index.d.ts +9 -0
  171. package/lib/window-resizer/index.js +46 -0
  172. package/package.json +91 -28
  173. package/lib/Damped-DdPj4Sho.cjs +0 -1
  174. package/lib/Damped-H3PuZwKV.js +0 -152
  175. package/lib/SourceManager-tmQlXkSD.cjs +0 -1
  176. package/lib/Store-qq7IjRLE.js +0 -136
  177. package/lib/Store-txkR3wXU.cjs +0 -1
  178. package/lib/WheelControls-9ZQKSYYq.js +0 -83
  179. package/lib/WheelControls-TYhGU6oA.cjs +0 -1
  180. package/lib/canvas-2d/index.cjs +0 -5
  181. package/lib/canvas-2d/index.js +0 -90
  182. package/lib/element-constructor/specialObjects.d.ts +0 -2
  183. package/lib/measurer/CumulativeOffsetLeft.d.ts +0 -4
  184. package/lib/measurer/CumulativeOffsetTop.d.ts +0 -4
  185. package/lib/measurer/Meaurer.d.ts +0 -8
  186. package/lib/measurer/index.cjs +0 -1
  187. package/lib/measurer/index.d.ts +0 -3
  188. package/lib/measurer/index.js +0 -48
  189. package/lib/number-2bR0KBcX.cjs +0 -1
  190. package/lib/number-bCHB2GAD.js +0 -31
  191. package/lib/resizer/index.cjs +0 -1
  192. package/lib/resizer/index.d.ts +0 -10
  193. package/lib/resizer/index.js +0 -45
  194. package/lib/string-GmxZA5Nq.js +0 -31
  195. package/lib/string-WmNOGq16.cjs +0 -1
  196. package/lib/utils/dev.d.ts +0 -3
  197. /package/lib/{attributes-w0u-KiIb.js → attributes-69we3byR.js} +0 -0
  198. /package/lib/{attributes-_2U65GDl.cjs → attributes-Bf2svn4j.cjs} +0 -0
  199. /package/lib/{browser-S4eq8AeN.js → browser-0zX67oeU.js} +0 -0
  200. /package/lib/{browser-QbF6EW-w.cjs → browser-CpzFX2xg.cjs} +0 -0
  201. /package/lib/{dom-bHEwc_xV.js → dom-BY7JhTx5.js} +0 -0
  202. /package/lib/{dom-QhWsdQS2.cjs → dom-qY2LdCVL.cjs} +0 -0
  203. /package/lib/{easings-uF-tgahf.js → easings-BKi40vHz.js} +0 -0
  204. /package/lib/{easings-_wFs9ZWc.cjs → easings-DsS5-Kqc.cjs} +0 -0
  205. /package/lib/{function-zwSFehNd.js → function-C10DGppn.js} +0 -0
  206. /package/lib/{function-QP7IreXR.cjs → function-MthRj-GJ.cjs} +0 -0
  207. /package/lib/{layout-rZzbsLPd.cjs → layout-8ryRAMGJ.cjs} +0 -0
  208. /package/lib/{layout-5SJlcXTY.js → layout-HoBT_Da2.js} +0 -0
  209. /package/lib/{math-_a3IpKOc.js → math-BOBiC4TN.js} +0 -0
  210. /package/lib/{math-FNUBmQPK.cjs → math-GDWEqu7y.cjs} +0 -0
@@ -1,228 +1,264 @@
1
- var _t = (s, e, i) => {
2
- if (!e.has(s))
3
- throw TypeError("Cannot " + i);
1
+ var yt = (i, s, e) => {
2
+ if (!s.has(i))
3
+ throw TypeError("Cannot " + e);
4
4
  };
5
- var h = (s, e, i) => (_t(s, e, "read from private field"), i ? i.call(s) : e.get(s)), D = (s, e, i) => {
6
- if (e.has(s))
5
+ var n = (i, s, e) => (yt(i, s, "read from private field"), e ? e.call(i) : s.get(i)), D = (i, s, e) => {
6
+ if (s.has(i))
7
7
  throw TypeError("Cannot add the same private member more than once");
8
- e instanceof WeakSet ? e.add(s) : e.set(s, i);
9
- }, $ = (s, e, i, o) => (_t(s, e, "write to private field"), o ? o.call(s, i) : e.set(s, i), i);
10
- import { S as Vt } from "../Store-qq7IjRLE.js";
11
- import { i as St } from "../browser-S4eq8AeN.js";
12
- import { a as xt, g as yt } from "../layout-5SJlcXTY.js";
13
- import { c as Wt } from "../math-_a3IpKOc.js";
8
+ s instanceof WeakSet ? s.add(i) : s.set(i, e);
9
+ }, $ = (i, s, e, r) => (yt(i, s, "write to private field"), r ? r.call(i, e) : s.set(i, e), e);
10
+ import { S as Ht } from "../Store-JOKrNVEr.js";
11
+ import { D as Ft } from "../Derived-Bc88XJ8J.js";
12
+ import { i as At } from "../browser-0zX67oeU.js";
13
+ import { a as gt, g as wt } from "../layout-HoBT_Da2.js";
14
+ import { c as zt } from "../math-BOBiC4TN.js";
14
15
  import "../ticker/index.js";
15
- import { D as $t } from "../Damped-H3PuZwKV.js";
16
- import { Attribute as k } from "../attribute/index.js";
17
- import { W as Pt, K as Tt } from "../WheelControls-9ZQKSYYq.js";
18
- import { CustomElement as kt, define as Ct } from "../custom-element/index.js";
19
- import { TICK_ORDER as Rt, RESIZE_ORDER as Mt } from "../order/index.js";
20
- import { resizer as lt } from "../resizer/index.js";
21
- import { scrollEnties as G } from "../scroll-entries/index.js";
22
- import { f as Dt } from "../dom-bHEwc_xV.js";
23
- import "../intersector/index.js";
24
- import "../number-bCHB2GAD.js";
25
- import "../attributes-w0u-KiIb.js";
26
- import "../notifier/index.js";
27
- import "../function-zwSFehNd.js";
28
- var Ht = Object.defineProperty, It = Object.getOwnPropertyDescriptor, Kt = (s, e, i, o) => {
29
- for (var u = o > 1 ? void 0 : o ? It(e, i) : e, n = s.length - 1, E; n >= 0; n--)
30
- (E = s[n]) && (u = (o ? E(e, i, u) : E(u)) || u);
31
- return o && u && Ht(e, i, u), u;
32
- }, vt = (s, e, i) => {
33
- if (!e.has(s))
34
- throw TypeError("Cannot " + i);
35
- }, t = (s, e, i) => (vt(s, e, "read from private field"), i ? i.call(s) : e.get(s)), l = (s, e, i) => {
36
- if (e.has(s))
16
+ import { D as Bt } from "../Damped-Csj-9_gH.js";
17
+ import { Attribute as E } from "../attribute/index.js";
18
+ import { W as Kt, K as Gt } from "../WheelControls-CX9WUbBC.js";
19
+ import { CustomElement as Lt, define as $t } from "../custom-element/index.js";
20
+ import { TICK_ORDER as Nt, RESIZE_ORDER as Pt } from "../order/index.js";
21
+ import { windowResizer as ot } from "../window-resizer/index.js";
22
+ import { scrollEntries as I } from "../scroll-entries/index.js";
23
+ import { e as Ot } from "../ElementConstructor-CoKM2CTK.js";
24
+ import { C as Mt, aw as bt } from "../htmlTags-BCNUG7oK.js";
25
+ import { c as Vt } from "../createStylesheet-BON7aJYs.js";
26
+ import { f as Ut } from "../dom-BY7JhTx5.js";
27
+ var Zt = Object.defineProperty, qt = Object.getOwnPropertyDescriptor, Jt = (i, s, e, r) => {
28
+ for (var a = r > 1 ? void 0 : r ? qt(s, e) : s, g = i.length - 1, x; g >= 0; g--)
29
+ (x = i[g]) && (a = (r ? x(s, e, a) : x(a)) || a);
30
+ return r && a && Zt(s, e, a), a;
31
+ }, Et = (i, s, e) => {
32
+ if (!s.has(i))
33
+ throw TypeError("Cannot " + e);
34
+ }, t = (i, s, e) => (Et(i, s, "read from private field"), e ? e.call(i) : s.get(i)), h = (i, s, e) => {
35
+ if (s.has(i))
37
36
  throw TypeError("Cannot add the same private member more than once");
38
- e instanceof WeakSet ? e.add(s) : e.set(s, i);
39
- }, g = (s, e, i, o) => (vt(s, e, "write to private field"), o ? o.call(s, i) : e.set(s, i), i), f = (s, e, i) => (vt(s, e, "access private method"), i), a, M, A, L, x, y, H, I, K, p, c, Y, w, d, V, q, m, J, P, N, ot, B, Q, at, gt, ct, wt, j, dt, tt, ft, R, pt, mt, At, et, st, bt, _, v, T, W;
40
- class Gt {
41
- constructor(e, i) {
37
+ s instanceof WeakSet ? s.add(i) : s.set(i, e);
38
+ }, d = (i, s, e, r) => (Et(i, s, "write to private field"), r ? r.call(i, e) : s.set(i, e), e), f = (i, s, e) => (Et(i, s, "access private method"), e), o, C, R, O, T, q, k, J, Q, X, u, ct, c, Y, j, v, p, W, H, m, B, P, N, ut, F, U, pt, kt, ft, Wt, tt, vt, et, _t, V, mt, xt, Dt, st, it, St, _, w, L, y;
39
+ class Qt {
40
+ constructor(s, e) {
42
41
  D(this, _, void 0);
43
- D(this, v, void 0);
44
- D(this, T, 0);
45
- D(this, W, 0);
46
- $(this, _, e), $(this, v, i), G.register(h(this, _));
42
+ D(this, w, void 0);
43
+ D(this, L, 0);
44
+ D(this, y, 0);
45
+ $(this, _, s), $(this, w, e), I.register(n(this, _));
47
46
  }
48
47
  get size() {
49
- return h(this, T);
48
+ return n(this, L);
50
49
  }
51
50
  get position() {
52
- return h(this, W);
51
+ return n(this, y);
53
52
  }
54
53
  destroy() {
55
- G.unregister(h(this, _)), h(this, _).style.transform = "";
54
+ I.unregister(n(this, _)), n(this, _).style.transform = "";
56
55
  }
57
56
  resize() {
58
- $(this, T, h(this, v).vertical ? h(this, _).offsetHeight : h(this, _).offsetWidth), $(this, W, h(this, v).vertical ? xt(h(this, _)) : yt(h(this, _))), $(this, W, h(this, W) - h(this, v).position);
57
+ $(this, L, n(this, w).vertical ? n(this, _).offsetHeight : n(this, _).offsetWidth), $(this, y, n(this, w).vertical ? gt(n(this, _)) : wt(n(this, _))), $(this, y, n(this, y) - n(this, w).contentPosition);
59
58
  }
60
59
  transform() {
61
- let e = 0;
62
- h(this, v).infiniteAttribute.current && h(this, v).overscroll && h(this, W) + h(this, T) < h(this, v).currentScrollValue && (e = h(this, v).distance * -1), G.update(h(this, _), h(this, v).axisAttibute.current, e);
63
- const i = Wt(
64
- h(this, v).currentScrollValue + e,
65
- h(this, W) - h(this, v).viewportSize,
66
- h(this, W) + h(this, T)
60
+ let s = 0;
61
+ n(this, w).infiniteAttribute.current && n(this, w).overscroll && n(this, y) + n(this, L) < n(this, w).currentScrollValue && (s = n(this, w).distance * -1), I.update(
62
+ n(this, _),
63
+ n(this, w).axisAttibute.current,
64
+ s
67
65
  );
68
- h(this, v).vertical ? h(this, _).style.transform = `translate3d(0px, ${i * -1}px, 0px)` : h(this, _).style.transform = `translate3d(${i * -1}px, 0px, 0px)`;
66
+ const e = n(this, w).viewportSize - n(this, L), r = zt(
67
+ n(this, w).currentScrollValue + s,
68
+ n(this, y) - n(this, w).viewportSize - e,
69
+ n(this, y) + n(this, L) + e
70
+ );
71
+ n(this, w).vertical ? n(this, _).style.transform = `translate3d(0px, ${r * -1}px, 0px)` : n(this, _).style.transform = `translate3d(${r * -1}px, 0px, 0px)`;
69
72
  }
70
73
  }
71
- _ = new WeakMap(), v = new WeakMap(), T = new WeakMap(), W = new WeakMap();
72
- let ut = class extends kt {
73
- constructor() {
74
- if (super(), l(this, N), l(this, B), l(this, at), l(this, ct), l(this, j), l(this, tt), l(this, mt), l(this, st), l(this, a, null), l(this, M, new k(this, "axis", "y")), l(this, A, new k(this, "pages", 0, {
74
+ _ = new WeakMap(), w = new WeakMap(), L = new WeakMap(), y = new WeakMap();
75
+ const Xt = Vt({
76
+ ":host": {
77
+ position: "relative",
78
+ width: "100%",
79
+ height: "100%",
80
+ display: "block",
81
+ outline: "none"
82
+ },
83
+ ':host([hibernated="true"])': {
84
+ display: "contents"
85
+ },
86
+ ".static": {
87
+ position: "absolute",
88
+ top: "0",
89
+ left: "0",
90
+ zIndex: "1",
91
+ width: "100%",
92
+ height: "100%"
93
+ },
94
+ ".content": {
95
+ position: "relative",
96
+ display: "flex",
97
+ width: "100%",
98
+ height: "100%",
99
+ gap: "var(--gap, 0px)"
100
+ },
101
+ ':host([hibernated="true"]) .content': {
102
+ display: "contents"
103
+ },
104
+ "::slotted(*)": {
105
+ flexShrink: "0"
106
+ }
107
+ });
108
+ let dt = class extends Lt {
109
+ constructor(i) {
110
+ if (super(), h(this, N), h(this, F), h(this, pt), h(this, ft), h(this, tt), h(this, et), h(this, xt), h(this, it), h(this, o, null), h(this, C, new E(this, "axis", "y")), h(this, R, new E(this, "pages", 0, {
75
111
  validate: (s) => Math.max(0, s - 1)
76
- })), l(this, L, new k(this, "sectional", !1)), l(this, x, new k(this, "infinite", !1)), l(this, y, new k(this, "split", !1)), l(this, H, new k(this, "damping", 0.03)), l(this, I, new k(this, "disabled", !1)), l(this, K, new k(this, "hibernated", !1)), l(this, p, null), l(this, c, []), l(this, Y, 0), l(this, w, 0), l(this, d, 0), l(this, V, null), l(this, q, null), l(this, m, new Vt(0)), l(this, J, 0), l(this, P, 0), l(this, R, () => {
77
- const s = this.currentScrollValue / t(this, d);
78
- if (g(this, Y, this.vertical ? xt(this) : yt(this)), g(this, w, this.vertical ? this.offsetHeight : this.offsetWidth), t(this, A).current) {
79
- g(this, d, t(this, w) * t(this, A).current);
80
- const e = t(this, d) + t(this, w);
81
- this.vertical ? (t(this, p).style.width = e + "px", t(this, p).style.height = "100%") : (t(this, p).style.height = e + "px", t(this, p).style.width = "100%");
112
+ })), h(this, O, new E(this, "split", !1)), h(this, T, new E(this, "sectional", !1)), h(this, q, new E(
113
+ this,
114
+ "wheel-max-delta",
115
+ !1
116
+ )), h(this, k, new E(this, "infinite", !1)), h(this, J, new E(this, "damping", 0.03)), h(this, Q, new E(this, "disabled", !1)), h(this, X, new E(this, "hibernated", !1)), h(this, u, null), h(this, ct, null), h(this, c, []), h(this, Y, 0), h(this, j, 0), h(this, v, 0), h(this, p, 0), h(this, W, null), h(this, H, null), h(this, m, new Ht(0)), h(this, B, 0), h(this, P, 0), h(this, V, () => {
117
+ const s = this.currentScrollValue / t(this, p);
118
+ if (d(this, Y, this.vertical ? gt(this) : wt(this)), d(this, j, this.vertical ? gt(t(this, u)) : wt(t(this, u))), d(this, v, this.vertical ? this.offsetHeight : this.offsetWidth), t(this, R).current) {
119
+ d(this, p, t(this, v) * t(this, R).current);
120
+ const e = t(this, p) + t(this, v);
121
+ this.vertical ? (t(this, u).style.width = e + "px", t(this, u).style.height = "100%") : (t(this, u).style.height = e + "px", t(this, u).style.width = "100%");
82
122
  } else
83
- this.vertical ? (t(this, p).style.width = "100%", t(this, p).style.height = "max-content", g(this, d, t(this, p).offsetHeight - t(this, w))) : (t(this, p).style.width = "max-content", t(this, p).style.height = "100%", g(this, d, t(this, p).offsetWidth - t(this, w)));
84
- if (t(this, x) || (t(this, a).max = t(this, d)), t(this, c).forEach((e) => {
123
+ this.vertical ? (t(this, u).style.width = "100%", t(this, u).style.height = "max-content", d(this, p, t(this, u).offsetHeight - t(this, v))) : (t(this, u).style.width = "max-content", t(this, u).style.height = "100%", d(this, p, t(this, u).offsetWidth - t(this, v)));
124
+ if (!t(this, k).current) {
125
+ const e = getComputedStyle(this);
126
+ d(this, p, t(this, p) + (this.vertical ? parseFloat(e.paddingBlockStart) + parseFloat(e.paddingBlockEnd) : parseFloat(e.paddingInlineStart) + parseFloat(e.paddingInlineEnd))), t(this, o).max.current = t(this, p);
127
+ }
128
+ if (t(this, c).forEach((e) => {
85
129
  e.resize(), e.transform();
86
- }), t(this, x).current && t(this, c).length) {
87
- const e = t(this, c)[t(this, c).length - 1], i = e.position + e.size - t(this, w), o = t(this, d) - i;
88
- g(this, P, e.position + e.size + o);
130
+ }), t(this, k).current && t(this, c).length) {
131
+ const e = t(this, c)[t(this, c).length - 1], r = e.position + e.size - t(this, v), a = t(this, p) - r;
132
+ d(this, P, e.position + e.size + a);
89
133
  } else
90
- g(this, P, t(this, d));
91
- if (t(this, L).current && t(this, c).length) {
134
+ d(this, P, t(this, p));
135
+ if (t(this, T).current && t(this, c).length) {
92
136
  const e = t(this, c)[t(this, m).current];
93
- t(this, a).set(e.position, !0);
137
+ t(this, o).set(e.position, !0);
94
138
  } else
95
- t(this, a).set(s * t(this, d), !0);
96
- }), l(this, pt, () => {
97
- if (t(this, c).length) {
98
- let s = 0;
99
- for (let e = 0; e < t(this, c).length; e++) {
100
- const i = t(this, c)[e];
101
- i.transform(), this.targetScrollValue >= i.position && (s = e);
139
+ t(this, o).set(s * t(this, p), !0);
140
+ }), h(this, mt, () => {
141
+ const s = this.currentScrollValue;
142
+ if (d(this, B, Math.max(0, s - t(this, p))), t(this, c).length) {
143
+ let e = 0;
144
+ for (let r = 0; r < t(this, c).length; r++) {
145
+ const a = t(this, c)[r];
146
+ a.transform(), this.targetScrollValue + this.viewportSize / 2 >= a.position && (e = r);
102
147
  }
103
- t(this, m).current = s;
148
+ t(this, m).current = e;
104
149
  } else
105
- this.vertical ? t(this, p).style.transform = `translate3d(0px, ${this.currentScrollValue * -1}px, 0px)` : t(this, p).style.transform = `translate3d(${this.currentScrollValue * -1}px, 0px, 0px)`;
106
- G.update(this, t(this, M).current, this.currentScrollValue);
107
- }), l(this, et, (s) => {
150
+ this.vertical ? t(this, u).style.transform = `translate3d(0px, ${s * -1}px, 0px)` : t(this, u).style.transform = `translate3d(${s * -1}px, 0px, 0px)`;
151
+ I.update(this, t(this, C).current, s);
152
+ }), h(this, st, (s) => {
108
153
  if (typeof s == "number")
109
- if (t(this, L).current) {
154
+ if (t(this, T).current) {
110
155
  const e = Math.sign(s);
111
- t(this, c).length ? this.shiftSections(e) : t(this, a).shift(e * t(this, w));
156
+ t(this, c).length ? this.shiftSections(e) : t(this, o).shift(e * t(this, v));
112
157
  } else
113
- t(this, a).shift(s);
158
+ t(this, o).shift(s);
114
159
  else
115
- s === "min" ? t(this, a).set(t(this, a).min) : s === "max" && t(this, a).set(t(this, a).delta);
116
- }), St) {
117
- g(this, a, new $t({ damping: 0.01, min: 0, order: Rt.SCROLL }));
118
- const s = this.attachShadow({ mode: "open" }), e = document.createElement("style");
119
- e.textContent = `
120
- :host {
121
- position: relative;
122
-
123
- width: 100%;
124
- height: 100%;
125
-
126
- display: block;
127
- outline: none;
128
- }
129
-
130
- :host([hibernated="true"]) {
131
- display: contents;
132
- }
133
-
134
- .static {
135
- position: absolute;
136
- top: 0;
137
- left: 0;
138
-
139
- z-index: 1;
140
-
141
- width: 100%;
142
- height: 100%;
143
-
144
- }
145
-
146
- .content {
147
- display: flex;
148
- }
149
-
150
- :host([hibernated="true"]) .content {
151
- display: contents;
152
- }
153
-
154
- ::slotted(*) {
155
- flex-shrink: 0;
156
- }
157
- `, s.appendChild(e), this.tabIndex = 0;
158
- const i = document.createElement("div");
159
- i.classList.add("static"), s.appendChild(i);
160
- const o = document.createElement("slot");
161
- o.setAttribute("name", "static"), i.appendChild(o), g(this, p, document.createElement("div")), t(this, p).classList.add("content"), s.appendChild(t(this, p));
162
- const u = document.createElement("slot");
163
- t(this, p).appendChild(u), g(this, V, new Pt({ element: this })), t(this, V).changeEvent.subscribe(t(this, et)), g(this, q, new Tt({ element: this })), t(this, q).changeEvent.subscribe(t(this, et)), t(this, M).subscribe(({ current: n }) => {
164
- t(this, p).style.flexDirection = n === "x" ? "row" : "column", t(this, V).axis = n, this.isConnected && t(this, R).call(this);
165
- }), t(this, A).subscribe(() => {
166
- this.isConnected && t(this, R).call(this);
167
- }), t(this, L).subscribe((n) => {
168
- t(this, m).current = 0, t(this, V).debounce = n.current, t(this, a).reset(), this.isConnected && (n.current && !n.previous ? f(this, N, ot).call(this) : !n.current && n.previous && f(this, B, Q).call(this));
169
- }), t(this, x).subscribe((n) => {
170
- n.current ? (this.isConnected && (t(this, c).length || (t(this, y).current = !0)), t(this, c).length && (t(this, a).max = 1 / 0, t(this, a).min = -1 / 0)) : (g(this, J, 0), t(this, a).max = t(this, d), t(this, a).min = 0);
171
- }), t(this, y).subscribe(({ current: n }) => {
172
- this.isConnected && (n ? f(this, N, ot).call(this) : f(this, B, Q).call(this));
173
- }), t(this, H).subscribe((n) => {
174
- t(this, a).damping = n.current;
175
- }), t(this, I).subscribe((n) => {
176
- n.current && !n.previous ? f(this, at, gt).call(this) : !n.current && n.previous && f(this, ct, wt).call(this);
177
- }), t(this, K).subscribe((n) => {
178
- n.current && !n.previous ? f(this, j, dt).call(this) : !n.current && n.previous && f(this, tt, ft).call(this);
160
+ s === "min" ? t(this, o).set(t(this, o).min.current) : s === "max" && t(this, o).set(t(this, o).delta);
161
+ }), At) {
162
+ let s, e = i || this.getAttribute("name");
163
+ e && (s = {
164
+ name: e
165
+ }), d(this, o, new Bt({
166
+ damping: 0.01,
167
+ min: 0,
168
+ order: Nt.SCROLL,
169
+ passport: s
170
+ })), this.openShadow(Xt), Ot(this, {
171
+ attributes: {
172
+ tabIndex: 0
173
+ },
174
+ shadowChildren: [
175
+ Mt({
176
+ class: "static",
177
+ children: [bt({ attributes: { name: "static" } })]
178
+ }),
179
+ Mt({
180
+ class: "content",
181
+ children: [bt({ ref: (r) => d(this, ct, r) })],
182
+ style: {
183
+ flexDirection: new Ft(
184
+ t(this, C),
185
+ (r) => r === "x" ? "row" : "column"
186
+ )
187
+ },
188
+ ref: (r) => d(this, u, r)
189
+ })
190
+ ]
191
+ }), d(this, W, new Kt({ element: this })), t(this, W).changeEvent.subscribe(t(this, st)), d(this, H, new Gt({ element: this })), t(this, H).changeEvent.subscribe(t(this, st)), t(this, C).subscribe(({ current: r }) => {
192
+ t(this, u).style.flexDirection = r === "x" ? "row" : "column", t(this, W).axis = t(this, q).current ? "max" : r, this.isConnected && t(this, V).call(this);
193
+ }), t(this, q).subscribe((r) => {
194
+ t(this, W).axis = r.current ? "max" : t(this, C).current;
195
+ }), t(this, R).subscribe(() => {
196
+ this.isConnected && t(this, V).call(this);
197
+ }), t(this, O).subscribe(({ current: r }) => {
198
+ this.isConnected && (r ? f(this, N, ut).call(this) : f(this, F, U).call(this));
199
+ }), t(this, T).subscribe((r) => {
200
+ t(this, m).current = 0, t(this, W).debounce = r.current, t(this, o).reset(), this.isConnected && (r.current && !r.previous ? f(this, N, ut).call(this) : !r.current && r.previous && f(this, F, U).call(this));
201
+ }), t(this, k).subscribe((r) => {
202
+ r.current ? (this.isConnected && (t(this, c).length || (t(this, O).current = !0)), t(this, c).length && (t(this, o).max.current = 1 / 0, t(this, o).min.current = -1 / 0)) : (d(this, B, 0), t(this, o).max.current = t(this, p), t(this, o).min.current = 0);
203
+ }), t(this, J).subscribe((r) => {
204
+ t(this, o).damping = r.current;
205
+ }), t(this, Q).subscribe((r) => {
206
+ r.current && !r.previous ? f(this, pt, kt).call(this) : !r.current && r.previous && f(this, ft, Wt).call(this);
207
+ }), t(this, X).subscribe((r) => {
208
+ r.current && !r.previous ? f(this, tt, vt).call(this) : !r.current && r.previous && f(this, et, _t).call(this);
179
209
  });
180
210
  }
181
211
  }
182
212
  get currentScrollValue() {
183
- return f(this, st, bt).call(this, "current");
213
+ return f(this, it, St).call(this, "current");
184
214
  }
185
215
  get targetScrollValue() {
186
- return f(this, st, bt).call(this, "target");
216
+ return f(this, it, St).call(this, "target");
187
217
  }
188
218
  get damped() {
189
- return t(this, a);
219
+ return t(this, o);
190
220
  }
191
221
  get dampedAttibute() {
192
- return t(this, a);
222
+ return t(this, o);
193
223
  }
194
224
  get axisAttibute() {
195
- return t(this, M);
225
+ return t(this, C);
196
226
  }
197
227
  get pagesAttibute() {
198
- return t(this, A);
228
+ return t(this, R);
229
+ }
230
+ get splitAttibute() {
231
+ return t(this, O);
199
232
  }
200
233
  get sectionalAttibute() {
201
- return t(this, L);
234
+ return t(this, T);
202
235
  }
203
236
  get infiniteAttribute() {
204
- return t(this, x);
205
- }
206
- get splitAttibute() {
207
- return t(this, y);
237
+ return t(this, k);
208
238
  }
209
239
  get dampingAttibute() {
210
- return t(this, H);
240
+ return t(this, J);
211
241
  }
212
242
  get disabledAttibute() {
213
- return t(this, I);
243
+ return t(this, Q);
214
244
  }
215
245
  get hibernatedAttibute() {
216
- return t(this, K);
246
+ return t(this, X);
247
+ }
248
+ get contentElement() {
249
+ return t(this, u);
217
250
  }
218
251
  get position() {
219
252
  return t(this, Y);
220
253
  }
254
+ get contentPosition() {
255
+ return t(this, j);
256
+ }
221
257
  get viewportSize() {
222
- return t(this, w);
258
+ return t(this, v);
223
259
  }
224
260
  get scrollSize() {
225
- return t(this, d);
261
+ return t(this, p);
226
262
  }
227
263
  get counter() {
228
264
  return t(this, m);
@@ -231,10 +267,10 @@ let ut = class extends kt {
231
267
  return t(this, P);
232
268
  }
233
269
  get overscroll() {
234
- return t(this, J);
270
+ return t(this, B);
235
271
  }
236
272
  get vertical() {
237
- return t(this, M).current === "y";
273
+ return t(this, C).current === "y";
238
274
  }
239
275
  get currentProgress() {
240
276
  return this.currentScrollValue / t(this, P);
@@ -243,202 +279,201 @@ let ut = class extends kt {
243
279
  return this.targetScrollValue / t(this, P);
244
280
  }
245
281
  // TODO: Поправить значение когда скролл не секционный ??
246
- scrollToSection(s, e = "smooth") {
282
+ scrollToSection(i, s = "smooth") {
247
283
  if (!t(this, c).length)
248
284
  return;
249
- const i = t(this, m).current;
250
- f(this, mt, At).call(this, s);
251
- const o = t(this, c)[i], u = t(this, c)[t(this, m).current];
252
- if (o && u) {
253
- let n = 0;
254
- const E = t(this, c).length - 1;
255
- t(this, m).current === 0 && i === E ? n = t(this, d) + t(this, w) - o.position : t(this, m).current === E && i === 0 ? n = u.position - (t(this, d) + t(this, w)) : n = u.position - o.position, t(this, a).shift(n, e === "instant");
285
+ const e = t(this, m).current;
286
+ f(this, xt, Dt).call(this, i);
287
+ const r = t(this, c)[e], a = t(this, c)[t(this, m).current];
288
+ if (r && a) {
289
+ let g = 0;
290
+ const x = t(this, c).length - 1;
291
+ t(this, k).current ? t(this, m).current === 0 && e === x ? g = t(this, p) + t(this, v) - r.position : t(this, m).current === x && e === 0 ? g = a.position - (t(this, p) + t(this, v)) : g = a.position - r.position : g = a.position - r.position, t(this, o).shift(g, s === "instant");
256
292
  }
257
293
  }
258
- shiftSections(s, e = "smooth") {
259
- t(this, c).length && this.scrollToSection(t(this, m).current + s, e);
294
+ shiftSections(i, s = "smooth") {
295
+ t(this, c).length && this.scrollToSection(t(this, m).current + i, s);
260
296
  }
261
297
  connectedCallback() {
262
- f(this, tt, ft).call(this), t(this, M).observe(), t(this, A).observe(), t(this, L).observe(), t(this, x).observe(), t(this, y).observe(), t(this, H).observe(), t(this, I).observe(), t(this, K).observe();
298
+ f(this, et, _t).call(this);
263
299
  }
264
300
  disconnectedCallback() {
265
- f(this, j, dt).call(this), t(this, M).unobserve(), t(this, A).unobserve(), t(this, L).unobserve(), t(this, x).unobserve(), t(this, y).unobserve(), t(this, H).unobserve(), t(this, I).unobserve(), t(this, K).unobserve();
301
+ f(this, tt, vt).call(this);
266
302
  }
267
303
  };
268
- a = /* @__PURE__ */ new WeakMap();
269
- M = /* @__PURE__ */ new WeakMap();
270
- A = /* @__PURE__ */ new WeakMap();
271
- L = /* @__PURE__ */ new WeakMap();
272
- x = /* @__PURE__ */ new WeakMap();
273
- y = /* @__PURE__ */ new WeakMap();
274
- H = /* @__PURE__ */ new WeakMap();
275
- I = /* @__PURE__ */ new WeakMap();
276
- K = /* @__PURE__ */ new WeakMap();
277
- p = /* @__PURE__ */ new WeakMap();
304
+ o = /* @__PURE__ */ new WeakMap();
305
+ C = /* @__PURE__ */ new WeakMap();
306
+ R = /* @__PURE__ */ new WeakMap();
307
+ O = /* @__PURE__ */ new WeakMap();
308
+ T = /* @__PURE__ */ new WeakMap();
309
+ q = /* @__PURE__ */ new WeakMap();
310
+ k = /* @__PURE__ */ new WeakMap();
311
+ J = /* @__PURE__ */ new WeakMap();
312
+ Q = /* @__PURE__ */ new WeakMap();
313
+ X = /* @__PURE__ */ new WeakMap();
314
+ u = /* @__PURE__ */ new WeakMap();
315
+ ct = /* @__PURE__ */ new WeakMap();
278
316
  c = /* @__PURE__ */ new WeakMap();
279
317
  Y = /* @__PURE__ */ new WeakMap();
280
- w = /* @__PURE__ */ new WeakMap();
281
- d = /* @__PURE__ */ new WeakMap();
282
- V = /* @__PURE__ */ new WeakMap();
283
- q = /* @__PURE__ */ new WeakMap();
318
+ j = /* @__PURE__ */ new WeakMap();
319
+ v = /* @__PURE__ */ new WeakMap();
320
+ p = /* @__PURE__ */ new WeakMap();
321
+ W = /* @__PURE__ */ new WeakMap();
322
+ H = /* @__PURE__ */ new WeakMap();
284
323
  m = /* @__PURE__ */ new WeakMap();
285
- J = /* @__PURE__ */ new WeakMap();
324
+ B = /* @__PURE__ */ new WeakMap();
286
325
  P = /* @__PURE__ */ new WeakMap();
287
326
  N = /* @__PURE__ */ new WeakSet();
288
- ot = function() {
289
- f(this, B, Q).call(this), t(this, p).querySelector("slot").assignedElements().forEach((e) => {
290
- e instanceof HTMLElement && t(this, c).push(new Gt(e, this));
291
- }), t(this, p).style.transform = "", t(this, R).call(this);
292
- };
293
- B = /* @__PURE__ */ new WeakSet();
294
- Q = function() {
295
- t(this, c).forEach((s) => {
296
- s.destroy();
297
- }), g(this, c, []);
327
+ ut = function() {
328
+ f(this, F, U).call(this), t(this, ct).assignedElements().forEach((i) => {
329
+ i instanceof HTMLElement && t(this, c).push(new Qt(i, this));
330
+ }), t(this, u).style.transform = "", t(this, V).call(this);
298
331
  };
299
- at = /* @__PURE__ */ new WeakSet();
300
- gt = function() {
301
- t(this, a).unsubscribe(t(this, pt)), t(this, a).unlistenAnimationFrame(), t(this, V).disconnect(), t(this, q).disconnect();
332
+ F = /* @__PURE__ */ new WeakSet();
333
+ U = function() {
334
+ t(this, c).forEach((i) => {
335
+ i.destroy();
336
+ }), d(this, c, []);
302
337
  };
303
- ct = /* @__PURE__ */ new WeakSet();
304
- wt = function() {
305
- t(this, a).subscribe(t(this, pt)), t(this, V).connect(), t(this, q).connect();
338
+ pt = /* @__PURE__ */ new WeakSet();
339
+ kt = function() {
340
+ t(this, o).unsubscribe(t(this, mt)), t(this, o).unlistenAnimationFrame(), t(this, W).disconnect(), t(this, H).disconnect();
306
341
  };
307
- j = /* @__PURE__ */ new WeakSet();
308
- dt = function() {
309
- lt.unsubscribe(t(this, R)), t(this, a).reset(), f(this, at, gt).call(this), t(this, p).style.transform = "", t(this, y).current && f(this, B, Q).call(this), G.unregister(this);
342
+ ft = /* @__PURE__ */ new WeakSet();
343
+ Wt = function() {
344
+ t(this, o).subscribe(t(this, mt)), t(this, W).connect(), t(this, H).connect();
310
345
  };
311
346
  tt = /* @__PURE__ */ new WeakSet();
312
- ft = function() {
313
- t(this, y).current && f(this, N, ot).call(this), G.register(this), lt.subscribe(t(this, R), Mt.SCROLL), f(this, ct, wt).call(this);
347
+ vt = function() {
348
+ ot.unsubscribe(t(this, V)), t(this, o).reset(), f(this, pt, kt).call(this), t(this, u).style.transform = "", t(this, O).current && f(this, F, U).call(this), I.unregister(this);
314
349
  };
315
- R = /* @__PURE__ */ new WeakMap();
316
- pt = /* @__PURE__ */ new WeakMap();
317
- mt = /* @__PURE__ */ new WeakSet();
318
- At = function(s) {
319
- t(this, x).current ? (t(this, m).current = s % t(this, c).length, t(this, m).current = t(this, m).current < 0 ? t(this, c).length + t(this, m).current : t(this, m).current) : t(this, m).current = Wt(s, 0, t(this, c).length - 1);
350
+ et = /* @__PURE__ */ new WeakSet();
351
+ _t = function() {
352
+ t(this, O).current && f(this, N, ut).call(this), I.register(this), ot.subscribe(t(this, V), Pt.SCROLL), f(this, ft, Wt).call(this);
353
+ };
354
+ V = /* @__PURE__ */ new WeakMap();
355
+ mt = /* @__PURE__ */ new WeakMap();
356
+ xt = /* @__PURE__ */ new WeakSet();
357
+ Dt = function(i) {
358
+ t(this, k).current ? (t(this, m).current = i % t(this, c).length, t(this, m).current = t(this, m).current < 0 ? t(this, c).length + t(this, m).current : t(this, m).current) : t(this, m).current = zt(i, 0, t(this, c).length - 1);
320
359
  };
321
- et = /* @__PURE__ */ new WeakMap();
322
- st = /* @__PURE__ */ new WeakSet();
323
- bt = function(s = "current") {
324
- if (t(this, x).current && t(this, c).length) {
325
- const e = t(this, a)[s] % (t(this, d) + t(this, w)), i = e < 0 ? t(this, d) + e + t(this, w) : e;
326
- return g(this, J, Math.max(0, i - t(this, d))), i;
360
+ st = /* @__PURE__ */ new WeakMap();
361
+ it = /* @__PURE__ */ new WeakSet();
362
+ St = function(i = "current") {
363
+ if (t(this, k).current && t(this, c).length) {
364
+ const s = t(this, o)[i] % (t(this, p) + t(this, v));
365
+ return s < 0 ? t(this, p) + s + t(this, v) : s;
327
366
  } else
328
- return t(this, a)[s];
367
+ return t(this, o)[i];
329
368
  };
330
- ut = Kt([
331
- Ct("e-scroll")
332
- ], ut);
333
- var X;
334
- class qt extends kt {
369
+ dt = Jt([
370
+ $t("e-scroll")
371
+ ], dt);
372
+ var Z;
373
+ class Yt extends Lt {
335
374
  constructor() {
336
375
  super(...arguments);
337
- D(this, X, null);
376
+ D(this, Z, null);
338
377
  }
339
378
  get scrollElement() {
340
- return h(this, X);
379
+ return n(this, Z);
341
380
  }
342
381
  connectedCallback() {
343
- const i = Dt(this, ut);
344
- i instanceof ut ? $(this, X, i) : console.error(this, "e-scroll not found");
382
+ const e = Ut(this, dt);
383
+ e instanceof dt ? $(this, Z, e) : console.error(this, "e-scroll not found");
345
384
  }
346
385
  }
347
- X = new WeakMap();
348
- var Bt = Object.defineProperty, Ft = Object.getOwnPropertyDescriptor, Ut = (s, e, i, o) => {
349
- for (var u = o > 1 ? void 0 : o ? Ft(e, i) : e, n = s.length - 1, E; n >= 0; n--)
350
- (E = s[n]) && (u = (o ? E(e, i, u) : E(u)) || u);
351
- return o && u && Bt(e, i, u), u;
352
- }, Lt = (s, e, i) => {
353
- if (!e.has(s))
354
- throw TypeError("Cannot " + i);
355
- }, r = (s, e, i) => (Lt(s, e, "read from private field"), i ? i.call(s) : e.get(s)), S = (s, e, i) => {
356
- if (e.has(s))
386
+ Z = new WeakMap();
387
+ var jt = Object.defineProperty, te = Object.getOwnPropertyDescriptor, ee = (i, s, e, r) => {
388
+ for (var a = r > 1 ? void 0 : r ? te(s, e) : s, g = i.length - 1, x; g >= 0; g--)
389
+ (x = i[g]) && (a = (r ? x(s, e, a) : x(a)) || a);
390
+ return r && a && jt(s, e, a), a;
391
+ }, Rt = (i, s, e) => {
392
+ if (!s.has(i))
393
+ throw TypeError("Cannot " + e);
394
+ }, l = (i, s, e) => (Rt(i, s, "read from private field"), e ? e.call(i) : s.get(i)), S = (i, s, e) => {
395
+ if (s.has(i))
357
396
  throw TypeError("Cannot add the same private member more than once");
358
- e instanceof WeakSet ? e.add(s) : e.set(s, i);
359
- }, C = (s, e, i, o) => (Lt(s, e, "write to private field"), o ? o.call(s, i) : e.set(s, i), i), F, b, z, O, U, Z, it, nt, rt, ht;
360
- let Et = class extends qt {
397
+ s instanceof WeakSet ? s.add(i) : s.set(i, e);
398
+ }, M = (i, s, e, r) => (Rt(i, s, "write to private field"), r ? r.call(i, e) : s.set(i, e), e), rt, b, A, z, K, G, nt, ht, lt, at;
399
+ const se = Vt({
400
+ ":host": {
401
+ display: "inline-block",
402
+ zIndex: "1",
403
+ backgroundColor: "#efefef"
404
+ },
405
+ ':host([axis="y"])': {
406
+ position: "absolute",
407
+ right: "0",
408
+ top: "0",
409
+ width: "1vmin",
410
+ height: "100%"
411
+ },
412
+ ':host([axis="x"])': {
413
+ position: "absolute",
414
+ left: "0",
415
+ bottom: "0",
416
+ width: "100%",
417
+ height: "1vmin"
418
+ },
419
+ ".default-thumb": {
420
+ backgroundColor: "#181818",
421
+ borderRadius: "1vmin",
422
+ touchAction: "none"
423
+ },
424
+ "::slotted(*)": {
425
+ touchAction: "none"
426
+ }
427
+ });
428
+ let Ct = class extends Yt {
361
429
  constructor() {
362
- if (super(), S(this, F, null), S(this, b, null), S(this, z, !1), S(this, O, 0), S(this, U, 0), S(this, Z, 0), S(this, it, () => {
363
- C(this, z, this.offsetWidth > this.offsetHeight);
364
- const s = r(this, z) ? this.offsetWidth : this.offsetHeight;
365
- C(this, O, s / ((this.scrollElement.scrollSize + this.scrollElement.viewportSize) / s)), C(this, O, Math.max(r(this, O), 30)), r(this, z) ? (r(this, b).style.width = r(this, O) + "px", r(this, b).style.height = "100%") : (r(this, b).style.width = "100%", r(this, b).style.height = r(this, O) + "px"), C(this, U, s - r(this, O)), this.scrollElement.scrollSize || (this.style.display = "none");
366
- }), S(this, nt, () => {
367
- C(this, Z, this.scrollElement.currentProgress * r(this, U)), r(this, z) ? r(this, b).style.transform = `translate3d(${r(this, Z)}px, 0px, 0px)` : r(this, b).style.transform = `translate3d(0px, ${r(this, Z)}px, 0px)`;
368
- }), S(this, rt, () => {
430
+ super(), S(this, rt, null), S(this, b, null), S(this, A, !1), S(this, z, 0), S(this, K, 0), S(this, G, 0), S(this, nt, () => {
431
+ M(this, A, this.offsetWidth > this.offsetHeight);
432
+ const i = l(this, A) ? this.offsetWidth : this.offsetHeight;
433
+ M(this, z, i / ((this.scrollElement.scrollSize + this.scrollElement.viewportSize) / i)), M(this, z, Math.max(l(this, z), 30)), l(this, A) ? (l(this, b).style.width = l(this, z) + "px", l(this, b).style.height = "100%") : (l(this, b).style.width = "100%", l(this, b).style.height = l(this, z) + "px"), M(this, K, i - l(this, z)), this.scrollElement.scrollSize || (this.style.display = "none");
434
+ }), S(this, ht, () => {
435
+ M(this, G, this.scrollElement.currentProgress * l(this, K)), l(this, A) ? l(this, b).style.transform = `translate3d(${l(this, G)}px, 0px, 0px)` : l(this, b).style.transform = `translate3d(0px, ${l(this, G)}px, 0px)`;
436
+ }), S(this, lt, () => {
369
437
  this.setAttribute("axis", this.scrollElement.axisAttibute.current);
370
- }), S(this, ht, (s) => {
371
- const e = (n) => {
372
- const E = r(this, z) ? n.x : n.y, zt = this.scrollElement.distance / r(this, U), Ot = (E - u) * zt;
373
- this.scrollElement.damped.set(o + Ot);
374
- }, i = () => {
375
- removeEventListener("pointermove", e), removeEventListener("pointerup", i), removeEventListener("touchend", i);
438
+ }), S(this, at, (i) => {
439
+ const s = (g) => {
440
+ const x = l(this, A) ? g.x : g.y, Tt = this.scrollElement.distance / l(this, K), It = (x - a) * Tt;
441
+ this.scrollElement.damped.set(r + It);
442
+ }, e = () => {
443
+ removeEventListener("pointermove", s), removeEventListener("pointerup", e), removeEventListener("touchend", e);
376
444
  };
377
- addEventListener("pointermove", e), addEventListener("pointerup", i), addEventListener("touchend", i);
378
- const o = this.scrollElement.damped.target, u = r(this, z) ? s.x : s.y;
379
- }), St) {
380
- const s = this.attachShadow({ mode: "open" }), e = document.createElement("style");
381
- e.textContent = `
382
- :host {
383
- display: inline-block;
384
- z-index: 1;
385
- background-color: #efefef;
386
- }
387
-
388
- :host([axis="y"]) {
389
- position: absolute;
390
- right: 0;
391
- top: 0;
392
- width: 1vmin;
393
- height: 100%;
394
- }
395
-
396
- :host([axis="x"]) {
397
- position: absolute;
398
- left: 0;
399
- bottom: 0;
400
- width: 100%;
401
- height: 1vmin;
402
- }
403
-
404
- .default-thumb {
405
- background-color: #181818;
406
- border-radius: 1vmin;
407
- touch-action: none;
408
- }
409
-
410
- ::slotted(*) {
411
- touch-action: none;
412
- }
413
- `, s.appendChild(e), C(this, F, document.createElement("slot")), s.appendChild(r(this, F));
414
- }
445
+ addEventListener("pointermove", s), addEventListener("pointerup", e), addEventListener("touchend", e);
446
+ const r = this.scrollElement.damped.target, a = l(this, A) ? i.x : i.y;
447
+ }), At && (this.openShadow(se), Ot(this, {
448
+ shadowChildren: [bt({ ref: (i) => M(this, rt, i) })]
449
+ }));
415
450
  }
416
451
  get thumbElement() {
417
- return r(this, b);
452
+ return l(this, b);
418
453
  }
419
454
  connectedCallback() {
420
455
  super.connectedCallback();
421
- const s = r(this, F).assignedElements()[0];
422
- s instanceof HTMLElement ? C(this, b, s) : (C(this, b, document.createElement("div")), r(this, b).classList.add("default-thumb"), this.shadowRoot.appendChild(r(this, b))), r(this, b).addEventListener("pointerdown", r(this, ht)), lt.subscribe(r(this, it), Mt.SCROLL + 1), this.scrollElement.damped.subscribe(r(this, nt)), this.scrollElement.axisAttibute.subscribe(r(this, rt));
456
+ const i = l(this, rt).assignedElements()[0];
457
+ i instanceof HTMLElement ? M(this, b, i) : (M(this, b, document.createElement("div")), l(this, b).classList.add("default-thumb"), this.shadowRoot.appendChild(l(this, b))), l(this, b).addEventListener("pointerdown", l(this, at)), ot.subscribe(l(this, nt), Pt.SCROLL + 1), this.scrollElement.damped.subscribe(l(this, ht)), this.scrollElement.axisAttibute.subscribe(l(this, lt));
423
458
  }
424
459
  disconnectedCallback() {
425
- r(this, b).removeEventListener("pointerdown", r(this, ht)), lt.unsubscribe(r(this, it)), this.scrollElement.damped.unsubscribe(r(this, nt)), this.scrollElement.axisAttibute.unsubscribe(r(this, rt));
460
+ l(this, b).removeEventListener("pointerdown", l(this, at)), ot.unsubscribe(l(this, nt)), this.scrollElement.damped.unsubscribe(l(this, ht)), this.scrollElement.axisAttibute.unsubscribe(l(this, lt));
426
461
  }
427
462
  };
428
- F = /* @__PURE__ */ new WeakMap();
463
+ rt = /* @__PURE__ */ new WeakMap();
429
464
  b = /* @__PURE__ */ new WeakMap();
465
+ A = /* @__PURE__ */ new WeakMap();
430
466
  z = /* @__PURE__ */ new WeakMap();
431
- O = /* @__PURE__ */ new WeakMap();
432
- U = /* @__PURE__ */ new WeakMap();
433
- Z = /* @__PURE__ */ new WeakMap();
434
- it = /* @__PURE__ */ new WeakMap();
467
+ K = /* @__PURE__ */ new WeakMap();
468
+ G = /* @__PURE__ */ new WeakMap();
435
469
  nt = /* @__PURE__ */ new WeakMap();
436
- rt = /* @__PURE__ */ new WeakMap();
437
470
  ht = /* @__PURE__ */ new WeakMap();
438
- Et = Ut([
439
- Ct("e-scrollbar")
440
- ], Et);
471
+ lt = /* @__PURE__ */ new WeakMap();
472
+ at = /* @__PURE__ */ new WeakMap();
473
+ Ct = ee([
474
+ $t("e-scrollbar")
475
+ ], Ct);
441
476
  export {
442
- ut as ScrollElement,
443
- Et as ScrollbarElement
477
+ dt as ScrollElement,
478
+ Ct as ScrollbarElement
444
479
  };