aptechka 0.83.1 → 0.84.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (285) hide show
  1. package/lib/Animation-BAiM6_n1.js +111 -0
  2. package/lib/Animation-DMWabSR0.cjs +1 -0
  3. package/lib/Composed-B0fvCtZz.cjs +1 -0
  4. package/lib/Composed-CgA9lLWA.js +75 -0
  5. package/lib/Damped-BLo-OAVb.cjs +1 -0
  6. package/lib/Damped-Dcz5UdMH.js +57 -0
  7. package/lib/DerivedArray-DFhxap_z.js +63 -0
  8. package/lib/DerivedArray-DYtWMW0n.cjs +1 -0
  9. package/lib/DragControls-BPHsDeH6.cjs +1 -0
  10. package/lib/DragControls-D2a1Cifp.js +234 -0
  11. package/lib/LocalLinks-BWFJYhGX.cjs +1 -0
  12. package/lib/LocalLinks-Dwgf3No6.js +65 -0
  13. package/lib/PageAnnouncerElement-DPMlVJZG.cjs +1 -0
  14. package/lib/PageAnnouncerElement-DV9pm_od.js +28 -0
  15. package/lib/PageScroll-BAatKJx6.cjs +1 -0
  16. package/lib/PageScroll-m3TsHnzR.js +65 -0
  17. package/lib/SourceElement-941MrYpq.js +265 -0
  18. package/lib/SourceElement-DBLZ7b5k.cjs +5 -0
  19. package/lib/Store-BCW70G3Z.cjs +1 -0
  20. package/lib/Store-uLDYY9ed.js +158 -0
  21. package/lib/Tweened-BvtjLCa3.js +48 -0
  22. package/lib/Tweened-DdXm1dbF.cjs +1 -0
  23. package/lib/Viewport-BiDoiU8M.js +113 -0
  24. package/lib/Viewport-CXGKUyDy.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 +62 -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 +25 -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 +192 -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-BpO2RJ__.cjs +1 -0
  90. package/lib/index-DpKsHe97.js +68 -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 +171 -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 +221 -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 -834
  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 -122
  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-DLcWVnuH.js +355 -0
  155. package/lib/render-DdomypCo.cjs +1 -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 -877
  160. package/lib/scroll-BvIWh1xB.js +41 -0
  161. package/lib/scroll-CT0lpyRZ.cjs +1 -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 +214 -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-CHvuef16.js +28 -0
  184. package/lib/stylesheet-CQdBaIAA.cjs +1 -0
  185. package/lib/ticker/index.cjs +1 -1
  186. package/lib/ticker/index.js +96 -92
  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 +245 -226
  193. package/lib/utils/polyfills.d.ts +1 -1
  194. package/lib/video/index.cjs +1 -1
  195. package/lib/video/index.js +36 -33
  196. package/lib/window-resizer/index.cjs +1 -1
  197. package/lib/window-resizer/index.js +27 -24
  198. package/lib/youtube/index.cjs +1 -1
  199. package/lib/youtube/index.js +56 -54
  200. package/package.json +11 -24
  201. package/lib/Animation-BzTjZIE-.js +0 -108
  202. package/lib/Animation-C39Ah-LM.cjs +0 -1
  203. package/lib/Composed-C-TV9te3.cjs +0 -1
  204. package/lib/Composed-DyAWjEXE.js +0 -121
  205. package/lib/Damped-CRusiRIV.js +0 -56
  206. package/lib/Damped-Prr0iKu1.cjs +0 -1
  207. package/lib/DragControls-8rNZwQrs.cjs +0 -1
  208. package/lib/DragControls-DBNdMBA4.js +0 -228
  209. package/lib/LocalLinks-BxhSFv_Q.cjs +0 -1
  210. package/lib/LocalLinks-DFZFpbjs.js +0 -62
  211. package/lib/PageAnnouncerElement-0LxZjtVH.js +0 -24
  212. package/lib/PageAnnouncerElement-AQ0Ja6HM.cjs +0 -1
  213. package/lib/PageScroll-0LxFblry.js +0 -62
  214. package/lib/PageScroll-BXJUQwG7.cjs +0 -1
  215. package/lib/SourceElement-BHqPFbna.cjs +0 -5
  216. package/lib/SourceElement-DjbHjynf.js +0 -260
  217. package/lib/Store-Blf4msDz.cjs +0 -1
  218. package/lib/Store-ZThXYBQd.js +0 -152
  219. package/lib/Tweened-Bw1Cn1PJ.js +0 -47
  220. package/lib/Tweened-DWtk9E-O.cjs +0 -1
  221. package/lib/Viewport-BxCr0GlB.cjs +0 -1
  222. package/lib/Viewport-Dt-d9DPi.js +0 -109
  223. package/lib/attributes-69we3byR.js +0 -10
  224. package/lib/attributes-Bf2svn4j.cjs +0 -1
  225. package/lib/canvas-CU5Xjahf.cjs +0 -1
  226. package/lib/canvas-DeZ0SLUJ.js +0 -34
  227. package/lib/coordinates-CgdGoSYs.js +0 -24
  228. package/lib/coordinates-D8Np3cPD.cjs +0 -1
  229. package/lib/custom-elements-DBnCK7Zx.js +0 -24
  230. package/lib/custom-elements-Dh4TWRDJ.cjs +0 -1
  231. package/lib/dom-BETkVSSZ.js +0 -82
  232. package/lib/dom-CBLlqORw.cjs +0 -1
  233. package/lib/easings-BEmRlrDd.js +0 -38
  234. package/lib/easings-GegIwET5.cjs +0 -1
  235. package/lib/element-CGVl1jA-.js +0 -7
  236. package/lib/element-yhcBhsho.cjs +0 -1
  237. package/lib/events-CsVF98U6.js +0 -6
  238. package/lib/events-KVanG9sR.cjs +0 -1
  239. package/lib/file-DSpfWdd9.cjs +0 -1
  240. package/lib/file-GHShUlue.js +0 -24
  241. package/lib/function-C10DGppn.js +0 -17
  242. package/lib/function-MthRj-GJ.cjs +0 -1
  243. package/lib/gestures-C7gbKx11.cjs +0 -1
  244. package/lib/gestures-CcXV6fCp.js +0 -11
  245. package/lib/index-OE2INULi.cjs +0 -1
  246. package/lib/index-e9eDuagL.js +0 -65
  247. package/lib/jsx/hydrate.d.ts +0 -1
  248. package/lib/jsx/integrations/astro/client.cjs +0 -1
  249. package/lib/jsx/integrations/astro/client.d.ts +0 -2
  250. package/lib/jsx/integrations/astro/client.js +0 -50
  251. package/lib/jsx/integrations/astro/index.cjs +0 -1
  252. package/lib/jsx/integrations/astro/index.d.ts +0 -2
  253. package/lib/jsx/integrations/astro/index.js +0 -54
  254. package/lib/jsx/integrations/astro/server.cjs +0 -1
  255. package/lib/jsx/integrations/astro/server.d.ts +0 -3
  256. package/lib/jsx/integrations/astro/server.js +0 -35
  257. package/lib/jsx/plugins/vite.d.ts +0 -21
  258. package/lib/layout-BSMtwCga.js +0 -29
  259. package/lib/layout-Ctc2p3uz.cjs +0 -1
  260. package/lib/math-BOBiC4TN.js +0 -45
  261. package/lib/math-GDWEqu7y.cjs +0 -1
  262. package/lib/metadata-BcYZ5w3T.cjs +0 -1
  263. package/lib/metadata-jfowcCyz.js +0 -12
  264. package/lib/morph-B6sGhLCi.cjs +0 -1
  265. package/lib/morph-BQErz7qP.js +0 -242
  266. package/lib/number-ChAm68cm.cjs +0 -1
  267. package/lib/number-CumqY64S.js +0 -40
  268. package/lib/object-CcMK4y_r.js +0 -87
  269. package/lib/object-baN9pgbU.cjs +0 -1
  270. package/lib/polyfills-DJrTJQky.js +0 -24
  271. package/lib/polyfills-Df4r-ETT.cjs +0 -1
  272. package/lib/render-DQs7rIoN.cjs +0 -1
  273. package/lib/render-D_0FCWEu.js +0 -18
  274. package/lib/scroll-BA2WnUrb.cjs +0 -1
  275. package/lib/scroll-DY5senkF.js +0 -37
  276. package/lib/string-BlMQbe8b.js +0 -70
  277. package/lib/string-DUXXtU8v.cjs +0 -1
  278. package/lib/style-At6aDoqG.cjs +0 -1
  279. package/lib/style-j2TwriJ_.js +0 -10
  280. package/lib/stylesheet-5_o7PFzM.cjs +0 -1
  281. package/lib/stylesheet-DdBzowZY.js +0 -24
  282. package/lib/url-CHgcNwJ1.cjs +0 -1
  283. package/lib/url-CYgo5vrG.js +0 -113
  284. package/lib/vite-C-i3hVDL.js +0 -75
  285. package/lib/vite-DzanPumM.cjs +0 -44
@@ -1,11 +1,13 @@
1
- import { S as s, a, s as o } from "../Store-ZThXYBQd.js";
2
- import { C as i, D as d, a as m, R as p } from "../Composed-DyAWjEXE.js";
1
+ import { S, a, s } from "../Store-uLDYY9ed.js";
2
+ import { C, D, R } from "../Composed-CgA9lLWA.js";
3
+ import { D as D2, a as a2 } from "../DerivedArray-DFhxap_z.js";
3
4
  export {
4
- i as Composed,
5
- d as Derived,
6
- m as DerivedArray,
7
- p as Resource,
8
- s as Store,
5
+ C as Composed,
6
+ D as Derived,
7
+ D2 as DerivedArray,
8
+ a2 as DerivedKeyedArray,
9
+ R as Resource,
10
+ S as Store,
9
11
  a as activeStores,
10
- o as storeRegistry
12
+ s as storeRegistry
11
13
  };
@@ -0,0 +1,84 @@
1
+ var __defProp = Object.defineProperty;
2
+ var __name = (target, value) => __defProp(target, "name", { value, configurable: !0 });
3
+ function kebabToCamel(kebab, capitalize2 = !1) {
4
+ let camel = "";
5
+ return kebab.split("-").forEach((part, i) => {
6
+ if (i === 0 && !capitalize2)
7
+ camel += part;
8
+ else {
9
+ const firstLetter = part[0], restLetters = part.slice(1), capitalized = firstLetter.toUpperCase() + restLetters;
10
+ camel += capitalized;
11
+ }
12
+ }), camel;
13
+ }
14
+ __name(kebabToCamel, "kebabToCamel");
15
+ function camelToKebab(camelCaseString) {
16
+ return camelCaseString.replace(/([a-z])([A-Z])/g, "$1-$2").toLowerCase();
17
+ }
18
+ __name(camelToKebab, "camelToKebab");
19
+ function snakeToDotted(snake) {
20
+ return snake.split("_").join(".");
21
+ }
22
+ __name(snakeToDotted, "snakeToDotted");
23
+ function toPascalCase(str) {
24
+ return /^[a-z\d]+$/i.test(str) ? str.charAt(0).toUpperCase() + str.slice(1) : str.replace(
25
+ /([a-z\d])([a-z\d]*)/gi,
26
+ (_, g1, g2) => g1.toUpperCase() + g2.toLowerCase()
27
+ ).replace(/[^a-z\d]/gi, "");
28
+ }
29
+ __name(toPascalCase, "toPascalCase");
30
+ function sliceAndModifyFirst(string, method) {
31
+ return string.slice(0, 1)[method]() + string.slice(1);
32
+ }
33
+ __name(sliceAndModifyFirst, "sliceAndModifyFirst");
34
+ function sliceAndModify(string, everyWord = !1, method) {
35
+ return everyWord ? string.split(" ").map((v) => sliceAndModifyFirst(v, method)).join(" ") : sliceAndModifyFirst(string, method);
36
+ }
37
+ __name(sliceAndModify, "sliceAndModify");
38
+ function capitalize(string, everyWord = !1) {
39
+ return sliceAndModify(string, everyWord, "toUpperCase");
40
+ }
41
+ __name(capitalize, "capitalize");
42
+ function uncapitalize(string, everyWord = !1) {
43
+ return sliceAndModify(string, everyWord, "toLowerCase");
44
+ }
45
+ __name(uncapitalize, "uncapitalize");
46
+ function generateId(length, characters = "abcdefghijklmnopqrstuvwxyz0123456789") {
47
+ const charactersLength = characters.length, key = crypto.getRandomValues(new Uint8Array(length));
48
+ let generatedKey = "";
49
+ for (let i = 0; i < length; i++)
50
+ generatedKey += characters.charAt(key[i] % charactersLength);
51
+ return generatedKey;
52
+ }
53
+ __name(generateId, "generateId");
54
+ function isUppercase(string) {
55
+ return new RegExp("^\\p{Lu}", "u").test(string);
56
+ }
57
+ __name(isUppercase, "isUppercase");
58
+ let textarea;
59
+ function decodeHtmlEntities(html) {
60
+ return textarea || (textarea = document.createElement("textarea")), textarea.innerHTML = html, textarea.value;
61
+ }
62
+ __name(decodeHtmlEntities, "decodeHtmlEntities");
63
+ function declension(number, one, few, many) {
64
+ const n = typeof number == "string" ? parseInt(number) : number;
65
+ if (n === 1)
66
+ return one;
67
+ if (n % 100 >= 11 && n % 100 <= 14)
68
+ return many;
69
+ const remainder = n % 10;
70
+ return remainder === 1 ? one : remainder >= 2 && remainder <= 4 ? few : many;
71
+ }
72
+ __name(declension, "declension");
73
+ export {
74
+ capitalize as a,
75
+ declension as b,
76
+ camelToKebab as c,
77
+ decodeHtmlEntities as d,
78
+ generateId as g,
79
+ isUppercase as i,
80
+ kebabToCamel as k,
81
+ snakeToDotted as s,
82
+ toPascalCase as t,
83
+ uncapitalize as u
84
+ };
@@ -0,0 +1 @@
1
+ "use strict";var __defProp=Object.defineProperty;var __name=(target,value)=>__defProp(target,"name",{value,configurable:!0});function kebabToCamel(kebab,capitalize2=!1){let camel="";return kebab.split("-").forEach((part,i)=>{if(i===0&&!capitalize2)camel+=part;else{const firstLetter=part[0],restLetters=part.slice(1),capitalized=firstLetter.toUpperCase()+restLetters;camel+=capitalized}}),camel}__name(kebabToCamel,"kebabToCamel");function camelToKebab(camelCaseString){return camelCaseString.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase()}__name(camelToKebab,"camelToKebab");function snakeToDotted(snake){return snake.split("_").join(".")}__name(snakeToDotted,"snakeToDotted");function toPascalCase(str){return/^[a-z\d]+$/i.test(str)?str.charAt(0).toUpperCase()+str.slice(1):str.replace(/([a-z\d])([a-z\d]*)/gi,(_,g1,g2)=>g1.toUpperCase()+g2.toLowerCase()).replace(/[^a-z\d]/gi,"")}__name(toPascalCase,"toPascalCase");function sliceAndModifyFirst(string,method){return string.slice(0,1)[method]()+string.slice(1)}__name(sliceAndModifyFirst,"sliceAndModifyFirst");function sliceAndModify(string,everyWord=!1,method){return everyWord?string.split(" ").map(v=>sliceAndModifyFirst(v,method)).join(" "):sliceAndModifyFirst(string,method)}__name(sliceAndModify,"sliceAndModify");function capitalize(string,everyWord=!1){return sliceAndModify(string,everyWord,"toUpperCase")}__name(capitalize,"capitalize");function uncapitalize(string,everyWord=!1){return sliceAndModify(string,everyWord,"toLowerCase")}__name(uncapitalize,"uncapitalize");function generateId(length,characters="abcdefghijklmnopqrstuvwxyz0123456789"){const charactersLength=characters.length,key=crypto.getRandomValues(new Uint8Array(length));let generatedKey="";for(let i=0;i<length;i++)generatedKey+=characters.charAt(key[i]%charactersLength);return generatedKey}__name(generateId,"generateId");function isUppercase(string){return new RegExp("^\\p{Lu}","u").test(string)}__name(isUppercase,"isUppercase");let textarea;function decodeHtmlEntities(html){return textarea||(textarea=document.createElement("textarea")),textarea.innerHTML=html,textarea.value}__name(decodeHtmlEntities,"decodeHtmlEntities");function declension(number,one,few,many){const n=typeof number=="string"?parseInt(number):number;if(n===1)return one;if(n%100>=11&&n%100<=14)return many;const remainder=n%10;return remainder===1?one:remainder>=2&&remainder<=4?few:many}__name(declension,"declension");exports.camelToKebab=camelToKebab;exports.capitalize=capitalize;exports.declension=declension;exports.decodeHtmlEntities=decodeHtmlEntities;exports.generateId=generateId;exports.isUppercase=isUppercase;exports.kebabToCamel=kebabToCamel;exports.snakeToDotted=snakeToDotted;exports.toPascalCase=toPascalCase;exports.uncapitalize=uncapitalize;
@@ -0,0 +1,14 @@
1
+ var __defProp = Object.defineProperty;
2
+ var __name = (target, value) => __defProp(target, "name", { value, configurable: !0 });
3
+ function getElementTransitionDurationS(element) {
4
+ return parseFloat(getComputedStyle(element).transitionDuration || "");
5
+ }
6
+ __name(getElementTransitionDurationS, "getElementTransitionDurationS");
7
+ function getElementTransitionDurationMS(element) {
8
+ return getElementTransitionDurationS(element) * 1e3;
9
+ }
10
+ __name(getElementTransitionDurationMS, "getElementTransitionDurationMS");
11
+ export {
12
+ getElementTransitionDurationS as a,
13
+ getElementTransitionDurationMS as g
14
+ };
@@ -0,0 +1 @@
1
+ "use strict";var __defProp=Object.defineProperty;var __name=(target,value)=>__defProp(target,"name",{value,configurable:!0});function getElementTransitionDurationS(element){return parseFloat(getComputedStyle(element).transitionDuration||"")}__name(getElementTransitionDurationS,"getElementTransitionDurationS");function getElementTransitionDurationMS(element){return getElementTransitionDurationS(element)*1e3}__name(getElementTransitionDurationMS,"getElementTransitionDurationMS");exports.getElementTransitionDurationMS=getElementTransitionDurationMS;exports.getElementTransitionDurationS=getElementTransitionDurationS;
@@ -0,0 +1,28 @@
1
+ var __defProp = Object.defineProperty;
2
+ var __name = (target, value) => __defProp(target, "name", { value, configurable: !0 });
3
+ import "construct-style-sheets-polyfill";
4
+ import { i as isBrowser } from "./index-DpKsHe97.js";
5
+ import { c as camelToKebab } from "./string-B3lm2b7v.js";
6
+ function styleToString(object) {
7
+ let text = "";
8
+ for (const key in object) {
9
+ const value = object[key];
10
+ typeof value == "object" ? (text += `${key} {`, text += styleToString(value), text += "}") : text += `${camelToKebab(key)}: ${value};`;
11
+ }
12
+ return text;
13
+ }
14
+ __name(styleToString, "styleToString");
15
+ function createStylesheet(value) {
16
+ if (isBrowser) {
17
+ const styleSheet = new CSSStyleSheet();
18
+ return styleSheet.replaceSync(
19
+ typeof value == "string" ? value : styleToString(value)
20
+ ), styleSheet;
21
+ }
22
+ return null;
23
+ }
24
+ __name(createStylesheet, "createStylesheet");
25
+ export {
26
+ createStylesheet as c,
27
+ styleToString as s
28
+ };
@@ -0,0 +1 @@
1
+ "use strict";var __defProp=Object.defineProperty;var __name=(target,value)=>__defProp(target,"name",{value,configurable:!0});require("construct-style-sheets-polyfill");const intersector_index=require("./index-BpO2RJ__.cjs"),string=require("./string-CbRNzmd9.cjs");function styleToString(object){let text="";for(const key in object){const value=object[key];typeof value=="object"?(text+=`${key} {`,text+=styleToString(value),text+="}"):text+=`${string.camelToKebab(key)}: ${value};`}return text}__name(styleToString,"styleToString");function createStylesheet(value){if(intersector_index.isBrowser){const styleSheet=new CSSStyleSheet;return styleSheet.replaceSync(typeof value=="string"?value:styleToString(value)),styleSheet}return null}__name(createStylesheet,"createStylesheet");exports.createStylesheet=createStylesheet;exports.styleToString=styleToString;
@@ -1 +1 @@
1
- "use strict";var I=h=>{throw TypeError(h)};var B=(h,e,s)=>e.has(h)||I("Cannot "+s);var i=(h,e,s)=>(B(h,e,"read from private field"),s?s.call(h):e.get(h)),r=(h,e,s)=>e.has(h)?I("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(h):e.set(h,s),t=(h,e,s,n)=>(B(h,e,"write to private field"),n?n.call(h,s):e.set(h,s),s),E=(h,e,s)=>(B(h,e,"access private method"),s);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const L=require("../index-OE2INULi.cjs"),j=require("../dom-CBLlqORw.cjs");require("construct-style-sheets-polyfill");var g,u,v,k,b,m,w,l,d,y,A;class C{constructor(e,s){r(this,g);r(this,u);r(this,v);r(this,k,0);r(this,b,0);r(this,m,0);r(this,w,0);r(this,l,0);r(this,d,!1);r(this,y,null);r(this,A,e=>{const s=e[0];t(this,d,s.isIntersecting),i(this,d)&&t(this,w,i(this,k))});if(t(this,g,e),t(this,u,s==null?void 0:s.maxFPS),t(this,v,(s==null?void 0:s.order)||0),s!=null&&s.culling&&L.isBrowser){const n=j.getElement(s.culling);n&&(t(this,y,new IntersectionObserver(i(this,A))),i(this,y).observe(n))}else t(this,d,!0)}get callback(){return i(this,g)}get order(){return i(this,v)}sync(e){t(this,b,e-i(this,l))}tick(e){if(t(this,k,e),t(this,l,Math.max(0,e-i(this,b))),i(this,m)||t(this,m,e),i(this,u))if(i(this,l)>=1e3/i(this,u))t(this,b,e-i(this,l)%i(this,u));else return;else t(this,b,e);i(this,d)&&i(this,g).call(this,{timeBetweenFrames:i(this,l),timestamp:e,subscribeTimestamp:i(this,m),timeElapsedSinceSubscription:e-i(this,m),timeElapsedSinceIntersection:e-i(this,w)})}destroy(){var e;(e=i(this,y))==null||e.disconnect()}}g=new WeakMap,u=new WeakMap,v=new WeakMap,k=new WeakMap,b=new WeakMap,m=new WeakMap,w=new WeakMap,l=new WeakMap,d=new WeakMap,y=new WeakMap,A=new WeakMap;var T,f,a,F,c,o,P,x,S,q;class O{constructor(){r(this,o);r(this,T,0);r(this,f,0);r(this,a);r(this,F,!1);r(this,c,[]);r(this,S,e=>{if(i(this,F)){t(this,F,!1),t(this,T,e-i(this,f));for(const s of i(this,c))s.sync(i(this,f))}t(this,a,requestAnimationFrame(i(this,S))),t(this,f,e-i(this,T));for(const s of i(this,c))s.tick(i(this,f))});r(this,q,()=>{document.hidden&&t(this,F,!0)});L.isBrowser&&document.addEventListener("visibilitychange",i(this,q))}subscribe(e,s){if(!i(this,c).find(n=>n.callback===e)){const n=new C(e,s);n.sync(performance.now()),i(this,c).push(n),t(this,c,i(this,c).sort((M,V)=>M.order-V.order))}return E(this,o,P).call(this),()=>this.unsubscribe(e)}unsubscribe(e){const s=i(this,c).filter(n=>n.callback===e);s.length&&(s.forEach(n=>n.destroy()),t(this,c,i(this,c).filter(n=>n.callback!==e)),i(this,c).length||E(this,o,x).call(this))}destroy(){L.isBrowser&&(E(this,o,x).call(this),document.removeEventListener("visibilitychange",i(this,q)))}}T=new WeakMap,f=new WeakMap,a=new WeakMap,F=new WeakMap,c=new WeakMap,o=new WeakSet,P=function(){i(this,c).length&&!i(this,a)&&t(this,a,requestAnimationFrame(i(this,S)))},x=function(){i(this,a)&&(cancelAnimationFrame(i(this,a)),t(this,a,void 0))},S=new WeakMap,q=new WeakMap;const D=new O;exports.Ticker=O;exports.ticker=D;
1
+ "use strict";var __defProp=Object.defineProperty;var __typeError=msg=>{throw TypeError(msg)};var __name=(target,value)=>__defProp(target,"name",{value,configurable:!0});var __accessCheck=(obj,member,msg)=>member.has(obj)||__typeError("Cannot "+msg);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);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const intersector_index=require("../index-BpO2RJ__.cjs"),dom=require("../dom-B40i6NXw.cjs");require("construct-style-sheets-polyfill");var _callback,_maxFPS,_order,_timestamp,_lastTimestamp,_subscribeTimestamp,_intersectionTimestamp,_timeBetweenFrames,_isVisible,_intersectionObserver,_intersectionListener;const _TickerSubscriber=class _TickerSubscriber{constructor(callback,options){__privateAdd(this,_callback);__privateAdd(this,_maxFPS);__privateAdd(this,_order);__privateAdd(this,_timestamp,0);__privateAdd(this,_lastTimestamp,0);__privateAdd(this,_subscribeTimestamp,0);__privateAdd(this,_intersectionTimestamp,0);__privateAdd(this,_timeBetweenFrames,0);__privateAdd(this,_isVisible,!1);__privateAdd(this,_intersectionObserver,null);__privateAdd(this,_intersectionListener,__name(entries=>{const entry=entries[0];__privateSet(this,_isVisible,entry.isIntersecting),__privateGet(this,_isVisible)&&__privateSet(this,_intersectionTimestamp,__privateGet(this,_timestamp))},"#intersectionListener"));if(__privateSet(this,_callback,callback),__privateSet(this,_maxFPS,options==null?void 0:options.maxFPS),__privateSet(this,_order,(options==null?void 0:options.order)||0),options!=null&&options.culling&&intersector_index.isBrowser){const element=dom.getElement(options.culling);element&&(__privateSet(this,_intersectionObserver,new IntersectionObserver(__privateGet(this,_intersectionListener))),__privateGet(this,_intersectionObserver).observe(element))}else __privateSet(this,_isVisible,!0)}get callback(){return __privateGet(this,_callback)}get order(){return __privateGet(this,_order)}sync(timestamp){__privateSet(this,_lastTimestamp,timestamp-__privateGet(this,_timeBetweenFrames))}tick(timestamp){if(__privateSet(this,_timestamp,timestamp),__privateSet(this,_timeBetweenFrames,Math.max(0,timestamp-__privateGet(this,_lastTimestamp))),__privateGet(this,_subscribeTimestamp)||__privateSet(this,_subscribeTimestamp,timestamp),__privateGet(this,_maxFPS))if(__privateGet(this,_timeBetweenFrames)>=1e3/__privateGet(this,_maxFPS))__privateSet(this,_lastTimestamp,timestamp-__privateGet(this,_timeBetweenFrames)%__privateGet(this,_maxFPS));else return;else __privateSet(this,_lastTimestamp,timestamp);__privateGet(this,_isVisible)&&__privateGet(this,_callback).call(this,{timeBetweenFrames:__privateGet(this,_timeBetweenFrames),timestamp,subscribeTimestamp:__privateGet(this,_subscribeTimestamp),timeElapsedSinceSubscription:timestamp-__privateGet(this,_subscribeTimestamp),timeElapsedSinceIntersection:timestamp-__privateGet(this,_intersectionTimestamp)})}destroy(){var _a;(_a=__privateGet(this,_intersectionObserver))==null||_a.disconnect()}};_callback=new WeakMap,_maxFPS=new WeakMap,_order=new WeakMap,_timestamp=new WeakMap,_lastTimestamp=new WeakMap,_subscribeTimestamp=new WeakMap,_intersectionTimestamp=new WeakMap,_timeBetweenFrames=new WeakMap,_isVisible=new WeakMap,_intersectionObserver=new WeakMap,_intersectionListener=new WeakMap,__name(_TickerSubscriber,"TickerSubscriber");let TickerSubscriber=_TickerSubscriber;var _idleTime,_timestamp2,_lastFrameId,_isDocumentHidden,_subscribers,_Ticker_instances,requestAnimationFrame_fn,cancelAnimationFrame_fn,_animationFrameListener,_documentVisibilityChangeListener;const _Ticker=class _Ticker{constructor(){__privateAdd(this,_Ticker_instances);__privateAdd(this,_idleTime,0);__privateAdd(this,_timestamp2,0);__privateAdd(this,_lastFrameId);__privateAdd(this,_isDocumentHidden,!1);__privateAdd(this,_subscribers,[]);__privateAdd(this,_animationFrameListener,__name(timestamp=>{if(__privateGet(this,_isDocumentHidden)){__privateSet(this,_isDocumentHidden,!1),__privateSet(this,_idleTime,timestamp-__privateGet(this,_timestamp2));for(const subscriber of __privateGet(this,_subscribers))subscriber.sync(__privateGet(this,_timestamp2))}__privateSet(this,_lastFrameId,requestAnimationFrame(__privateGet(this,_animationFrameListener))),__privateSet(this,_timestamp2,timestamp-__privateGet(this,_idleTime));for(const subscriber of __privateGet(this,_subscribers))subscriber.tick(__privateGet(this,_timestamp2))},"#animationFrameListener"));__privateAdd(this,_documentVisibilityChangeListener,__name(()=>{document.hidden&&__privateSet(this,_isDocumentHidden,!0)},"#documentVisibilityChangeListener"));intersector_index.isBrowser&&document.addEventListener("visibilitychange",__privateGet(this,_documentVisibilityChangeListener))}subscribe(callback,options){if(!__privateGet(this,_subscribers).find(s=>s.callback===callback)){const subscriber=new TickerSubscriber(callback,options);subscriber.sync(performance.now()),__privateGet(this,_subscribers).push(subscriber),__privateSet(this,_subscribers,__privateGet(this,_subscribers).sort((a,b)=>a.order-b.order))}return __privateMethod(this,_Ticker_instances,requestAnimationFrame_fn).call(this),()=>this.unsubscribe(callback)}unsubscribe(callback){const matches=__privateGet(this,_subscribers).filter(subscriber=>subscriber.callback===callback);matches.length&&(matches.forEach(m=>m.destroy()),__privateSet(this,_subscribers,__privateGet(this,_subscribers).filter(subscriber=>subscriber.callback!==callback)),__privateGet(this,_subscribers).length||__privateMethod(this,_Ticker_instances,cancelAnimationFrame_fn).call(this))}destroy(){intersector_index.isBrowser&&(__privateMethod(this,_Ticker_instances,cancelAnimationFrame_fn).call(this),document.removeEventListener("visibilitychange",__privateGet(this,_documentVisibilityChangeListener)))}};_idleTime=new WeakMap,_timestamp2=new WeakMap,_lastFrameId=new WeakMap,_isDocumentHidden=new WeakMap,_subscribers=new WeakMap,_Ticker_instances=new WeakSet,requestAnimationFrame_fn=__name(function(){__privateGet(this,_subscribers).length&&!__privateGet(this,_lastFrameId)&&__privateSet(this,_lastFrameId,requestAnimationFrame(__privateGet(this,_animationFrameListener)))},"#requestAnimationFrame"),cancelAnimationFrame_fn=__name(function(){__privateGet(this,_lastFrameId)&&(cancelAnimationFrame(__privateGet(this,_lastFrameId)),__privateSet(this,_lastFrameId,void 0))},"#cancelAnimationFrame"),_animationFrameListener=new WeakMap,_documentVisibilityChangeListener=new WeakMap,__name(_Ticker,"Ticker");let Ticker=_Ticker;const ticker=new Ticker;exports.Ticker=Ticker;exports.ticker=ticker;
@@ -1,123 +1,127 @@
1
- var B = (h) => {
2
- throw TypeError(h);
1
+ var __defProp = Object.defineProperty;
2
+ var __typeError = (msg) => {
3
+ throw TypeError(msg);
3
4
  };
4
- var x = (h, s, e) => s.has(h) || B("Cannot " + e);
5
- var i = (h, s, e) => (x(h, s, "read from private field"), e ? e.call(h) : s.get(h)), r = (h, s, e) => s.has(h) ? B("Cannot add the same private member more than once") : s instanceof WeakSet ? s.add(h) : s.set(h, e), t = (h, s, e, n) => (x(h, s, "write to private field"), n ? n.call(h, e) : s.set(h, e), e), A = (h, s, e) => (x(h, s, "access private method"), e);
6
- import { i as I } from "../index-e9eDuagL.js";
7
- import { g as C } from "../dom-BETkVSSZ.js";
5
+ var __name = (target, value) => __defProp(target, "name", { value, configurable: !0 });
6
+ var __accessCheck = (obj, member, msg) => member.has(obj) || __typeError("Cannot " + msg);
7
+ 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);
8
+ import { i as isBrowser } from "../index-DpKsHe97.js";
9
+ import { g as getElement } from "../dom-D8D-_9ty.js";
8
10
  import "construct-style-sheets-polyfill";
9
- var g, m, v, k, u, b, w, l, f, F, L;
10
- class D {
11
- constructor(s, e) {
12
- r(this, g);
13
- r(this, m);
14
- r(this, v);
15
- r(this, k, 0);
16
- r(this, u, 0);
17
- r(this, b, 0);
18
- r(this, w, 0);
19
- r(this, l, 0);
20
- r(this, f, !1);
21
- r(this, F, null);
22
- r(this, L, (s) => {
23
- const e = s[0];
24
- t(this, f, e.isIntersecting), i(this, f) && t(this, w, i(this, k));
25
- });
26
- if (t(this, g, s), t(this, m, e == null ? void 0 : e.maxFPS), t(this, v, (e == null ? void 0 : e.order) || 0), e != null && e.culling && I) {
27
- const n = C(e.culling);
28
- n && (t(this, F, new IntersectionObserver(
29
- i(this, L)
30
- )), i(this, F).observe(n));
11
+ var _callback, _maxFPS, _order, _timestamp, _lastTimestamp, _subscribeTimestamp, _intersectionTimestamp, _timeBetweenFrames, _isVisible, _intersectionObserver, _intersectionListener;
12
+ const _TickerSubscriber = class _TickerSubscriber {
13
+ constructor(callback, options) {
14
+ __privateAdd(this, _callback);
15
+ __privateAdd(this, _maxFPS);
16
+ __privateAdd(this, _order);
17
+ __privateAdd(this, _timestamp, 0);
18
+ __privateAdd(this, _lastTimestamp, 0);
19
+ __privateAdd(this, _subscribeTimestamp, 0);
20
+ __privateAdd(this, _intersectionTimestamp, 0);
21
+ __privateAdd(this, _timeBetweenFrames, 0);
22
+ __privateAdd(this, _isVisible, !1);
23
+ __privateAdd(this, _intersectionObserver, null);
24
+ __privateAdd(this, _intersectionListener, /* @__PURE__ */ __name((entries) => {
25
+ const entry = entries[0];
26
+ __privateSet(this, _isVisible, entry.isIntersecting), __privateGet(this, _isVisible) && __privateSet(this, _intersectionTimestamp, __privateGet(this, _timestamp));
27
+ }, "#intersectionListener"));
28
+ if (__privateSet(this, _callback, callback), __privateSet(this, _maxFPS, options == null ? void 0 : options.maxFPS), __privateSet(this, _order, (options == null ? void 0 : options.order) || 0), options != null && options.culling && isBrowser) {
29
+ const element = getElement(options.culling);
30
+ element && (__privateSet(this, _intersectionObserver, new IntersectionObserver(
31
+ __privateGet(this, _intersectionListener)
32
+ )), __privateGet(this, _intersectionObserver).observe(element));
31
33
  } else
32
- t(this, f, !0);
34
+ __privateSet(this, _isVisible, !0);
33
35
  }
34
36
  get callback() {
35
- return i(this, g);
37
+ return __privateGet(this, _callback);
36
38
  }
37
39
  get order() {
38
- return i(this, v);
40
+ return __privateGet(this, _order);
39
41
  }
40
- sync(s) {
41
- t(this, u, s - i(this, l));
42
+ sync(timestamp) {
43
+ __privateSet(this, _lastTimestamp, timestamp - __privateGet(this, _timeBetweenFrames));
42
44
  }
43
- tick(s) {
44
- if (t(this, k, s), t(this, l, Math.max(0, s - i(this, u))), i(this, b) || t(this, b, s), i(this, m))
45
- if (i(this, l) >= 1e3 / i(this, m))
46
- t(this, u, s - i(this, l) % i(this, m));
45
+ tick(timestamp) {
46
+ if (__privateSet(this, _timestamp, timestamp), __privateSet(this, _timeBetweenFrames, Math.max(0, timestamp - __privateGet(this, _lastTimestamp))), __privateGet(this, _subscribeTimestamp) || __privateSet(this, _subscribeTimestamp, timestamp), __privateGet(this, _maxFPS))
47
+ if (__privateGet(this, _timeBetweenFrames) >= 1e3 / __privateGet(this, _maxFPS))
48
+ __privateSet(this, _lastTimestamp, timestamp - __privateGet(this, _timeBetweenFrames) % __privateGet(this, _maxFPS));
47
49
  else
48
50
  return;
49
51
  else
50
- t(this, u, s);
51
- i(this, f) && i(this, g).call(this, {
52
- timeBetweenFrames: i(this, l),
53
- timestamp: s,
54
- subscribeTimestamp: i(this, b),
55
- timeElapsedSinceSubscription: s - i(this, b),
56
- timeElapsedSinceIntersection: s - i(this, w)
52
+ __privateSet(this, _lastTimestamp, timestamp);
53
+ __privateGet(this, _isVisible) && __privateGet(this, _callback).call(this, {
54
+ timeBetweenFrames: __privateGet(this, _timeBetweenFrames),
55
+ timestamp,
56
+ subscribeTimestamp: __privateGet(this, _subscribeTimestamp),
57
+ timeElapsedSinceSubscription: timestamp - __privateGet(this, _subscribeTimestamp),
58
+ timeElapsedSinceIntersection: timestamp - __privateGet(this, _intersectionTimestamp)
57
59
  });
58
60
  }
59
61
  destroy() {
60
- var s;
61
- (s = i(this, F)) == null || s.disconnect();
62
+ var _a;
63
+ (_a = __privateGet(this, _intersectionObserver)) == null || _a.disconnect();
62
64
  }
63
- }
64
- g = new WeakMap(), m = new WeakMap(), v = new WeakMap(), k = new WeakMap(), u = new WeakMap(), b = new WeakMap(), w = new WeakMap(), l = new WeakMap(), f = new WeakMap(), F = new WeakMap(), L = new WeakMap();
65
- var T, d, a, y, c, o, O, q, E, S;
66
- class H {
65
+ };
66
+ _callback = new WeakMap(), _maxFPS = new WeakMap(), _order = new WeakMap(), _timestamp = new WeakMap(), _lastTimestamp = new WeakMap(), _subscribeTimestamp = new WeakMap(), _intersectionTimestamp = new WeakMap(), _timeBetweenFrames = new WeakMap(), _isVisible = new WeakMap(), _intersectionObserver = new WeakMap(), _intersectionListener = new WeakMap(), __name(_TickerSubscriber, "TickerSubscriber");
67
+ let TickerSubscriber = _TickerSubscriber;
68
+ var _idleTime, _timestamp2, _lastFrameId, _isDocumentHidden, _subscribers, _Ticker_instances, requestAnimationFrame_fn, cancelAnimationFrame_fn, _animationFrameListener, _documentVisibilityChangeListener;
69
+ const _Ticker = class _Ticker {
67
70
  constructor() {
68
- r(this, o);
69
- r(this, T, 0);
70
- r(this, d, 0);
71
- r(this, a);
72
- r(this, y, !1);
73
- r(this, c, []);
74
- r(this, E, (s) => {
75
- if (i(this, y)) {
76
- t(this, y, !1), t(this, T, s - i(this, d));
77
- for (const e of i(this, c))
78
- e.sync(i(this, d));
71
+ __privateAdd(this, _Ticker_instances);
72
+ __privateAdd(this, _idleTime, 0);
73
+ __privateAdd(this, _timestamp2, 0);
74
+ __privateAdd(this, _lastFrameId);
75
+ __privateAdd(this, _isDocumentHidden, !1);
76
+ __privateAdd(this, _subscribers, []);
77
+ __privateAdd(this, _animationFrameListener, /* @__PURE__ */ __name((timestamp) => {
78
+ if (__privateGet(this, _isDocumentHidden)) {
79
+ __privateSet(this, _isDocumentHidden, !1), __privateSet(this, _idleTime, timestamp - __privateGet(this, _timestamp2));
80
+ for (const subscriber of __privateGet(this, _subscribers))
81
+ subscriber.sync(__privateGet(this, _timestamp2));
79
82
  }
80
- t(this, a, requestAnimationFrame(i(this, E))), t(this, d, s - i(this, T));
81
- for (const e of i(this, c))
82
- e.tick(i(this, d));
83
- });
84
- r(this, S, () => {
85
- document.hidden && t(this, y, !0);
86
- });
87
- I && document.addEventListener(
83
+ __privateSet(this, _lastFrameId, requestAnimationFrame(__privateGet(this, _animationFrameListener))), __privateSet(this, _timestamp2, timestamp - __privateGet(this, _idleTime));
84
+ for (const subscriber of __privateGet(this, _subscribers))
85
+ subscriber.tick(__privateGet(this, _timestamp2));
86
+ }, "#animationFrameListener"));
87
+ __privateAdd(this, _documentVisibilityChangeListener, /* @__PURE__ */ __name(() => {
88
+ document.hidden && __privateSet(this, _isDocumentHidden, !0);
89
+ }, "#documentVisibilityChangeListener"));
90
+ isBrowser && document.addEventListener(
88
91
  "visibilitychange",
89
- i(this, S)
92
+ __privateGet(this, _documentVisibilityChangeListener)
90
93
  );
91
94
  }
92
- subscribe(s, e) {
93
- if (!i(this, c).find((n) => n.callback === s)) {
94
- const n = new D(s, e);
95
- n.sync(performance.now()), i(this, c).push(n), t(this, c, i(this, c).sort((P, V) => P.order - V.order));
95
+ subscribe(callback, options) {
96
+ if (!__privateGet(this, _subscribers).find((s) => s.callback === callback)) {
97
+ const subscriber = new TickerSubscriber(callback, options);
98
+ subscriber.sync(performance.now()), __privateGet(this, _subscribers).push(subscriber), __privateSet(this, _subscribers, __privateGet(this, _subscribers).sort((a, b) => a.order - b.order));
96
99
  }
97
- return A(this, o, O).call(this), () => this.unsubscribe(s);
100
+ return __privateMethod(this, _Ticker_instances, requestAnimationFrame_fn).call(this), () => this.unsubscribe(callback);
98
101
  }
99
- unsubscribe(s) {
100
- const e = i(this, c).filter(
101
- (n) => n.callback === s
102
+ unsubscribe(callback) {
103
+ const matches = __privateGet(this, _subscribers).filter(
104
+ (subscriber) => subscriber.callback === callback
102
105
  );
103
- e.length && (e.forEach((n) => n.destroy()), t(this, c, i(this, c).filter(
104
- (n) => n.callback !== s
105
- )), i(this, c).length || A(this, o, q).call(this));
106
+ matches.length && (matches.forEach((m) => m.destroy()), __privateSet(this, _subscribers, __privateGet(this, _subscribers).filter(
107
+ (subscriber) => subscriber.callback !== callback
108
+ )), __privateGet(this, _subscribers).length || __privateMethod(this, _Ticker_instances, cancelAnimationFrame_fn).call(this));
106
109
  }
107
110
  destroy() {
108
- I && (A(this, o, q).call(this), document.removeEventListener(
111
+ isBrowser && (__privateMethod(this, _Ticker_instances, cancelAnimationFrame_fn).call(this), document.removeEventListener(
109
112
  "visibilitychange",
110
- i(this, S)
113
+ __privateGet(this, _documentVisibilityChangeListener)
111
114
  ));
112
115
  }
113
- }
114
- T = new WeakMap(), d = new WeakMap(), a = new WeakMap(), y = new WeakMap(), c = new WeakMap(), o = new WeakSet(), O = function() {
115
- i(this, c).length && !i(this, a) && t(this, a, requestAnimationFrame(i(this, E)));
116
- }, q = function() {
117
- i(this, a) && (cancelAnimationFrame(i(this, a)), t(this, a, void 0));
118
- }, E = new WeakMap(), S = new WeakMap();
119
- const J = new H();
116
+ };
117
+ _idleTime = new WeakMap(), _timestamp2 = new WeakMap(), _lastFrameId = new WeakMap(), _isDocumentHidden = new WeakMap(), _subscribers = new WeakMap(), _Ticker_instances = new WeakSet(), requestAnimationFrame_fn = /* @__PURE__ */ __name(function() {
118
+ __privateGet(this, _subscribers).length && !__privateGet(this, _lastFrameId) && __privateSet(this, _lastFrameId, requestAnimationFrame(__privateGet(this, _animationFrameListener)));
119
+ }, "#requestAnimationFrame"), cancelAnimationFrame_fn = /* @__PURE__ */ __name(function() {
120
+ __privateGet(this, _lastFrameId) && (cancelAnimationFrame(__privateGet(this, _lastFrameId)), __privateSet(this, _lastFrameId, void 0));
121
+ }, "#cancelAnimationFrame"), _animationFrameListener = new WeakMap(), _documentVisibilityChangeListener = new WeakMap(), __name(_Ticker, "Ticker");
122
+ let Ticker = _Ticker;
123
+ const ticker = new Ticker();
120
124
  export {
121
- H as Ticker,
122
- J as ticker
125
+ Ticker,
126
+ ticker
123
127
  };
@@ -0,0 +1 @@
1
+ "use strict";var __defProp=Object.defineProperty,__defProps=Object.defineProperties;var __getOwnPropDescs=Object.getOwnPropertyDescriptors;var __getOwnPropSymbols=Object.getOwnPropertySymbols;var __hasOwnProp=Object.prototype.hasOwnProperty,__propIsEnum=Object.prototype.propertyIsEnumerable;var __defNormalProp=(obj,key,value)=>key in obj?__defProp(obj,key,{enumerable:!0,configurable:!0,writable:!0,value}):obj[key]=value,__spreadValues=(a,b)=>{for(var prop in b||(b={}))__hasOwnProp.call(b,prop)&&__defNormalProp(a,prop,b[prop]);if(__getOwnPropSymbols)for(var prop of __getOwnPropSymbols(b))__propIsEnum.call(b,prop)&&__defNormalProp(a,prop,b[prop]);return a},__spreadProps=(a,b)=>__defProps(a,__getOwnPropDescs(b)),__name=(target,value)=>__defProp(target,"name",{value,configurable:!0});function splitPath(value,{base="",trailingSlash=!1,mergeParams,removeParams}={}){base=base.endsWith("/")?base.slice(0,-1):base,value=value.replace(base,""),value.startsWith("/")&&(value=value.slice(1));const split1=value.split("#"),split2=split1[0].split("?");let leaf=split2[0].startsWith("/")?split2[0]:"/"+split2[0];trailingSlash?leaf=!leaf.endsWith("/")&&leaf!=="/"?leaf+"/":leaf:leaf=leaf.endsWith("/")&&leaf!=="/"?leaf.slice(0,-1):leaf;let parameters=split2[1]||"";if(mergeParams){const existingParams=new URLSearchParams(parameters),mergeParamsObj=new URLSearchParams(mergeParams);for(const[key,value2]of mergeParamsObj)existingParams.has(key)||existingParams.set(key,value2);removeParams==null||removeParams.split(",").forEach(param=>{existingParams.has(param)&&existingParams.delete(param)}),parameters=existingParams.toString()}const pathname=base+leaf,hash=split1[1],path=`${pathname}${parameters?"?"+parameters:""}${hash?"#"+hash:""}`;return{leaf,pathname,parameters,hash,path}}__name(splitPath,"splitPath");function normalizeBase(base="/"){return base.endsWith("/")||(base+="/"),base.startsWith("/")||(base+="/"),base}__name(normalizeBase,"normalizeBase");function changeHistory(p){if(p.action==="none")return;const por=p==null?void 0:p.searchParameters,hash=p.hash?p.hash.startsWith("#")?p.hash:"#"+p.hash:"",searhParameters=por?por.startsWith("?")?por:"?"+por:"",pathPlus=`${p.pathname}${searhParameters}${hash}`,hstate=__spreadProps(__spreadValues({},p.state),{path:pathPlus});p.action==="push"?history.pushState(hstate,"",pathPlus):p.action==="replace"&&history.replaceState(hstate,"",pathPlus)}__name(changeHistory,"changeHistory");function parseSearchParameters(search){const params=new URLSearchParams(search),values={};for(const[key,value]of params)values[key]=value;return values}__name(parseSearchParameters,"parseSearchParameters");function updateSearchParameter(parameterName,value){const url=new URL(location.href),v=(value==null?void 0:value.toString())||"";url.searchParams.set(parameterName,v),history.replaceState(history.state,"",url.href)}__name(updateSearchParameter,"updateSearchParameter");function updateURLAttr(el,attr,base){el.setAttribute(attr,new URL(el.getAttribute(attr),base).pathname)}__name(updateURLAttr,"updateURLAttr");function normalizeRelativeURLs(el,base){el.querySelectorAll('[href^="./"], [href^="../"]').forEach(item=>updateURLAttr(item,"href",base)),el.querySelectorAll('[src^="./"], [src^="../"]').forEach(item=>updateURLAttr(item,"src",base))}__name(normalizeRelativeURLs,"normalizeRelativeURLs");function normalizeURL(url,{base="",trailingSlash=!1}={}){base=base.replace(/^\/|\/$/g,"");const path=typeof url=="string"?url.replace(/^\/|\/$/g,""):url.pathname.replace(/^\/|\/$/g,"");let urlString="";return path.includes(base)?urlString=`/${path}`:urlString=`${base}/${path}`,trailingSlash&&!urlString.endsWith("/")&&(urlString+="/"),new URL(urlString,location.origin)}__name(normalizeURL,"normalizeURL");function isLocalUrl(href){try{const url=new URL(href);if(window.location.origin===url.origin)return url.pathname===window.location.pathname?!url.hash:!0}catch(e){}return!1}__name(isLocalUrl,"isLocalUrl");function searchParamsObjectToString(parameters){if(!parameters)return"";const params=new URLSearchParams;for(const[key,value]of Object.entries(parameters))value!=null&&value!==!1&&value!==""&&params.append(key,String(value));return params.toString()}__name(searchParamsObjectToString,"searchParamsObjectToString");function searchParamsToObject(params){const object={};for(const[key,value]of params.entries())value!=null&&(object[key]=value);return object}__name(searchParamsToObject,"searchParamsToObject");exports.changeHistory=changeHistory;exports.isLocalUrl=isLocalUrl;exports.normalizeBase=normalizeBase;exports.normalizeRelativeURLs=normalizeRelativeURLs;exports.normalizeURL=normalizeURL;exports.parseSearchParameters=parseSearchParameters;exports.searchParamsObjectToString=searchParamsObjectToString;exports.searchParamsToObject=searchParamsToObject;exports.splitPath=splitPath;exports.updateSearchParameter=updateSearchParameter;
@@ -0,0 +1,124 @@
1
+ var __defProp = Object.defineProperty, __defProps = Object.defineProperties;
2
+ var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
3
+ var __getOwnPropSymbols = Object.getOwnPropertySymbols;
4
+ var __hasOwnProp = Object.prototype.hasOwnProperty, __propIsEnum = Object.prototype.propertyIsEnumerable;
5
+ var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: !0, configurable: !0, writable: !0, value }) : obj[key] = value, __spreadValues = (a, b) => {
6
+ for (var prop in b || (b = {}))
7
+ __hasOwnProp.call(b, prop) && __defNormalProp(a, prop, b[prop]);
8
+ if (__getOwnPropSymbols)
9
+ for (var prop of __getOwnPropSymbols(b))
10
+ __propIsEnum.call(b, prop) && __defNormalProp(a, prop, b[prop]);
11
+ return a;
12
+ }, __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b)), __name = (target, value) => __defProp(target, "name", { value, configurable: !0 });
13
+ function splitPath(value, {
14
+ base = "",
15
+ trailingSlash = !1,
16
+ mergeParams,
17
+ removeParams
18
+ } = {}) {
19
+ base = base.endsWith("/") ? base.slice(0, -1) : base, value = value.replace(base, ""), value.startsWith("/") && (value = value.slice(1));
20
+ const split1 = value.split("#"), split2 = split1[0].split("?");
21
+ let leaf = split2[0].startsWith("/") ? split2[0] : "/" + split2[0];
22
+ trailingSlash ? leaf = !leaf.endsWith("/") && leaf !== "/" ? leaf + "/" : leaf : leaf = leaf.endsWith("/") && leaf !== "/" ? leaf.slice(0, -1) : leaf;
23
+ let parameters = split2[1] || "";
24
+ if (mergeParams) {
25
+ const existingParams = new URLSearchParams(parameters), mergeParamsObj = new URLSearchParams(mergeParams);
26
+ for (const [key, value2] of mergeParamsObj)
27
+ existingParams.has(key) || existingParams.set(key, value2);
28
+ removeParams == null || removeParams.split(",").forEach((param) => {
29
+ existingParams.has(param) && existingParams.delete(param);
30
+ }), parameters = existingParams.toString();
31
+ }
32
+ const pathname = base + leaf, hash = split1[1], path = `${pathname}${parameters ? "?" + parameters : ""}${hash ? "#" + hash : ""}`;
33
+ return {
34
+ leaf,
35
+ pathname,
36
+ parameters,
37
+ hash,
38
+ path
39
+ };
40
+ }
41
+ __name(splitPath, "splitPath");
42
+ function normalizeBase(base = "/") {
43
+ return base.endsWith("/") || (base += "/"), base.startsWith("/") || (base += "/"), base;
44
+ }
45
+ __name(normalizeBase, "normalizeBase");
46
+ function changeHistory(p) {
47
+ if (p.action === "none")
48
+ return;
49
+ const por = p == null ? void 0 : p.searchParameters, hash = p.hash ? p.hash.startsWith("#") ? p.hash : "#" + p.hash : "", searhParameters = por ? por.startsWith("?") ? por : "?" + por : "", pathPlus = `${p.pathname}${searhParameters}${hash}`, hstate = __spreadProps(__spreadValues({}, p.state), { path: pathPlus });
50
+ p.action === "push" ? history.pushState(hstate, "", pathPlus) : p.action === "replace" && history.replaceState(hstate, "", pathPlus);
51
+ }
52
+ __name(changeHistory, "changeHistory");
53
+ function parseSearchParameters(search) {
54
+ const params = new URLSearchParams(search), values = {};
55
+ for (const [key, value] of params)
56
+ values[key] = value;
57
+ return values;
58
+ }
59
+ __name(parseSearchParameters, "parseSearchParameters");
60
+ function updateSearchParameter(parameterName, value) {
61
+ const url = new URL(location.href), v = (value == null ? void 0 : value.toString()) || "";
62
+ url.searchParams.set(parameterName, v), history.replaceState(history.state, "", url.href);
63
+ }
64
+ __name(updateSearchParameter, "updateSearchParameter");
65
+ function updateURLAttr(el, attr, base) {
66
+ el.setAttribute(attr, new URL(el.getAttribute(attr), base).pathname);
67
+ }
68
+ __name(updateURLAttr, "updateURLAttr");
69
+ function normalizeRelativeURLs(el, base) {
70
+ el.querySelectorAll('[href^="./"], [href^="../"]').forEach(
71
+ (item) => updateURLAttr(item, "href", base)
72
+ ), el.querySelectorAll('[src^="./"], [src^="../"]').forEach(
73
+ (item) => updateURLAttr(item, "src", base)
74
+ );
75
+ }
76
+ __name(normalizeRelativeURLs, "normalizeRelativeURLs");
77
+ function normalizeURL(url, {
78
+ base = "",
79
+ trailingSlash = !1
80
+ } = {}) {
81
+ base = base.replace(/^\/|\/$/g, "");
82
+ const path = typeof url == "string" ? url.replace(/^\/|\/$/g, "") : url.pathname.replace(/^\/|\/$/g, "");
83
+ let urlString = "";
84
+ return path.includes(base) ? urlString = `/${path}` : urlString = `${base}/${path}`, trailingSlash && !urlString.endsWith("/") && (urlString += "/"), new URL(urlString, location.origin);
85
+ }
86
+ __name(normalizeURL, "normalizeURL");
87
+ function isLocalUrl(href) {
88
+ try {
89
+ const url = new URL(href);
90
+ if (window.location.origin === url.origin)
91
+ return url.pathname === window.location.pathname ? !url.hash : !0;
92
+ } catch (e) {
93
+ }
94
+ return !1;
95
+ }
96
+ __name(isLocalUrl, "isLocalUrl");
97
+ function searchParamsObjectToString(parameters) {
98
+ if (!parameters)
99
+ return "";
100
+ const params = new URLSearchParams();
101
+ for (const [key, value] of Object.entries(parameters))
102
+ value != null && value !== !1 && value !== "" && params.append(key, String(value));
103
+ return params.toString();
104
+ }
105
+ __name(searchParamsObjectToString, "searchParamsObjectToString");
106
+ function searchParamsToObject(params) {
107
+ const object = {};
108
+ for (const [key, value] of params.entries())
109
+ value != null && (object[key] = value);
110
+ return object;
111
+ }
112
+ __name(searchParamsToObject, "searchParamsToObject");
113
+ export {
114
+ normalizeBase as a,
115
+ normalizeRelativeURLs as b,
116
+ changeHistory as c,
117
+ splitPath as d,
118
+ searchParamsToObject as e,
119
+ isLocalUrl as i,
120
+ normalizeURL as n,
121
+ parseSearchParameters as p,
122
+ searchParamsObjectToString as s,
123
+ updateSearchParameter as u
124
+ };
@@ -1,2 +1,4 @@
1
1
  export declare function parseAttribute(element: HTMLElement, attributeName: string): string | number | boolean | null;
2
2
  export declare function parseAttributeValue(value: string | null | undefined): string | number | boolean | null;
3
+ export declare function parseAttributeValueAdvanced(value: string): any;
4
+ export declare function getElementAttributesAdvanced(element: HTMLElement): Record<string, any>;
@@ -8,3 +8,4 @@ export declare function traverseShadowRoots(root: Element, callback: (element: E
8
8
  export declare function intersectElements(elements: Array<Element>, elementsToIntersect: Array<Element>): Element[];
9
9
  export declare function excludeElements(elements: Array<Element>, elementsToExclude: Array<Element>): Element[];
10
10
  export declare function createScriptElement(element: HTMLScriptElement): HTMLScriptElement;
11
+ export declare function deepQuerySelectorAll(selector: string, root?: Document): Element[];