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,140 +1,144 @@
1
- var M = (s) => {
2
- throw TypeError(s);
1
+ var __defProp = Object.defineProperty;
2
+ var __typeError = (msg) => {
3
+ throw TypeError(msg);
3
4
  };
4
- var x = (s, i, t) => i.has(s) || M("Cannot " + t);
5
- var e = (s, i, t) => (x(s, i, "read from private field"), t ? t.call(s) : i.get(s)), o = (s, i, t) => i.has(s) ? M("Cannot add the same private member more than once") : i instanceof WeakSet ? i.add(s) : i.set(s, t), a = (s, i, t, r) => (x(s, i, "write to private field"), r ? r.call(s, t) : i.set(s, t), t), d = (s, i, t) => (x(s, i, "access private method"), t);
6
- import { Attribute as H } from "../attribute/index.js";
7
- import { i as S } from "../index-e9eDuagL.js";
8
- import { d as k } from "../events-CsVF98U6.js";
9
- import { g as D } from "../style-j2TwriJ_.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 { Attribute } from "../attribute/index.js";
9
+ import { i as isBrowser } from "../index-DpKsHe97.js";
10
+ import { d as dispatchEvent } from "../events-Ds-TuvYW.js";
11
+ import { g as getElementTransitionDurationMS } from "../style-DBoQWK0d.js";
10
12
  import "construct-style-sheets-polyfill";
11
- var c, h, f, l, E, m, n, y, w, A, v, C, I;
12
- class R {
13
- constructor(i, t) {
14
- o(this, n);
15
- o(this, c, null);
16
- o(this, h, null);
17
- o(this, f, null);
18
- o(this, l, null);
19
- o(this, E);
20
- o(this, m, !1);
21
- o(this, w, () => {
22
- e(this, m) ? this.close() : this.open();
23
- });
24
- o(this, A, (i) => {
25
- e(this, m) && !(i instanceof CustomEvent) && (d(this, n, v).call(this, 0, !0), d(this, n, v).call(this, e(this, n, y)));
26
- });
27
- t.firstElementChild instanceof HTMLElement && t.lastElementChild instanceof HTMLElement ? (a(this, c, i), a(this, h, t), a(this, f, t.firstElementChild), a(this, l, t.lastElementChild), e(this, l).style.overflow = "hidden", e(this, c).axisAttribute.current === "y" ? e(this, l).style.height = "0px" : e(this, l).style.width = "0px", addEventListener("resize", e(this, A)), e(this, f).addEventListener("click", e(this, w)), e(this, h).hasAttribute("data-opened") && this.open({ skipTransition: !0 })) : i.removeItem(e(this, h));
13
+ var _accordionElement, _element, _headElement, _bodyElement, _activeTimeoutId, _opened, _AccordionItem_instances, scrollSize_get, _headClickListener, _windowResizeListener, setScrollSize_fn, skipTransition_fn, tryDispatchResizeEvent_fn;
14
+ const _AccordionItem = class _AccordionItem {
15
+ constructor(accordionElement, element) {
16
+ __privateAdd(this, _AccordionItem_instances);
17
+ __privateAdd(this, _accordionElement, null);
18
+ __privateAdd(this, _element, null);
19
+ __privateAdd(this, _headElement, null);
20
+ __privateAdd(this, _bodyElement, null);
21
+ __privateAdd(this, _activeTimeoutId);
22
+ __privateAdd(this, _opened, !1);
23
+ __privateAdd(this, _headClickListener, /* @__PURE__ */ __name(() => {
24
+ __privateGet(this, _opened) ? this.close() : this.open();
25
+ }, "#headClickListener"));
26
+ __privateAdd(this, _windowResizeListener, /* @__PURE__ */ __name((event) => {
27
+ __privateGet(this, _opened) && !(event instanceof CustomEvent) && (__privateMethod(this, _AccordionItem_instances, setScrollSize_fn).call(this, 0, !0), __privateMethod(this, _AccordionItem_instances, setScrollSize_fn).call(this, __privateGet(this, _AccordionItem_instances, scrollSize_get)));
28
+ }, "#windowResizeListener"));
29
+ element.firstElementChild instanceof HTMLElement && element.lastElementChild instanceof HTMLElement ? (__privateSet(this, _accordionElement, accordionElement), __privateSet(this, _element, element), __privateSet(this, _headElement, element.firstElementChild), __privateSet(this, _bodyElement, element.lastElementChild), __privateGet(this, _bodyElement).style.overflow = "hidden", __privateGet(this, _accordionElement).axisAttribute.current === "y" ? __privateGet(this, _bodyElement).style.height = "0px" : __privateGet(this, _bodyElement).style.width = "0px", addEventListener("resize", __privateGet(this, _windowResizeListener)), __privateGet(this, _headElement).addEventListener("click", __privateGet(this, _headClickListener)), __privateGet(this, _element).hasAttribute("data-opened") && this.open({ skipTransition: !0 })) : accordionElement.removeItem(__privateGet(this, _element));
28
30
  }
29
31
  get element() {
30
- return e(this, h);
32
+ return __privateGet(this, _element);
31
33
  }
32
34
  destroy() {
33
- e(this, f) && (e(this, h).classList.remove("opened", "triggered"), e(this, h).removeAttribute("data-opened"), e(this, f).style.cursor = "", d(this, n, v).call(this, void 0), removeEventListener("resize", e(this, A)), e(this, f).removeEventListener("click", e(this, w)), clearTimeout(e(this, E)));
35
+ __privateGet(this, _headElement) && (__privateGet(this, _element).classList.remove("opened", "triggered"), __privateGet(this, _element).removeAttribute("data-opened"), __privateGet(this, _headElement).style.cursor = "", __privateMethod(this, _AccordionItem_instances, setScrollSize_fn).call(this, void 0), removeEventListener("resize", __privateGet(this, _windowResizeListener)), __privateGet(this, _headElement).removeEventListener("click", __privateGet(this, _headClickListener)), clearTimeout(__privateGet(this, _activeTimeoutId)));
34
36
  }
35
- open(i) {
36
- i != null && i.skipTransition && d(this, n, C).call(this), e(this, c).multipleAttribute.current || e(this, c).closeAll({ exclude: e(this, h) }), a(this, m, !0), clearTimeout(e(this, E)), e(this, h).classList.add("triggered"), d(this, n, v).call(this, e(this, n, y)), setTimeout(() => {
37
- e(this, h).classList.add("opened"), e(this, h).setAttribute("data-opened", ""), d(this, n, I).call(this);
38
- }, 0), k(this.element, "accordionItemToggle", {
37
+ open(options) {
38
+ options != null && options.skipTransition && __privateMethod(this, _AccordionItem_instances, skipTransition_fn).call(this), __privateGet(this, _accordionElement).multipleAttribute.current || __privateGet(this, _accordionElement).closeAll({ exclude: __privateGet(this, _element) }), __privateSet(this, _opened, !0), clearTimeout(__privateGet(this, _activeTimeoutId)), __privateGet(this, _element).classList.add("triggered"), __privateMethod(this, _AccordionItem_instances, setScrollSize_fn).call(this, __privateGet(this, _AccordionItem_instances, scrollSize_get)), setTimeout(() => {
39
+ __privateGet(this, _element).classList.add("opened"), __privateGet(this, _element).setAttribute("data-opened", ""), __privateMethod(this, _AccordionItem_instances, tryDispatchResizeEvent_fn).call(this);
40
+ }, 0), dispatchEvent(this.element, "accordionItemToggle", {
39
41
  bubbles: !0,
40
42
  composed: !0,
41
43
  detail: {
42
- opened: e(this, m),
43
- element: e(this, h)
44
+ opened: __privateGet(this, _opened),
45
+ element: __privateGet(this, _element)
44
46
  }
45
47
  });
46
48
  }
47
- close(i) {
48
- i != null && i.skipTransition && d(this, n, C).call(this), clearTimeout(e(this, E)), a(this, m, !1), e(this, h).classList.remove("opened"), d(this, n, v).call(this, 0), d(this, n, I).call(this, () => {
49
- e(this, h).classList.remove("triggered");
50
- }), k(this.element, "accordionItemToggle", {
49
+ close(options) {
50
+ options != null && options.skipTransition && __privateMethod(this, _AccordionItem_instances, skipTransition_fn).call(this), clearTimeout(__privateGet(this, _activeTimeoutId)), __privateSet(this, _opened, !1), __privateGet(this, _element).classList.remove("opened"), __privateMethod(this, _AccordionItem_instances, setScrollSize_fn).call(this, 0), __privateMethod(this, _AccordionItem_instances, tryDispatchResizeEvent_fn).call(this, () => {
51
+ __privateGet(this, _element).classList.remove("triggered");
52
+ }), dispatchEvent(this.element, "accordionItemToggle", {
51
53
  bubbles: !0,
52
54
  composed: !0,
53
55
  detail: {
54
- opened: e(this, m),
55
- element: e(this, h)
56
+ opened: __privateGet(this, _opened),
57
+ element: __privateGet(this, _element)
56
58
  }
57
59
  });
58
60
  }
59
- }
60
- c = new WeakMap(), h = new WeakMap(), f = new WeakMap(), l = new WeakMap(), E = new WeakMap(), m = new WeakMap(), n = new WeakSet(), y = function() {
61
- return e(this, c).axisAttribute.current === "x" ? e(this, l).scrollWidth : e(this, l).scrollHeight;
62
- }, w = new WeakMap(), A = new WeakMap(), v = function(i, t = !1) {
63
- t && (e(this, l).style.transition = "all 0s", setTimeout(() => {
64
- e(this, l).style.transition = "";
61
+ };
62
+ _accordionElement = new WeakMap(), _element = new WeakMap(), _headElement = new WeakMap(), _bodyElement = new WeakMap(), _activeTimeoutId = new WeakMap(), _opened = new WeakMap(), _AccordionItem_instances = new WeakSet(), scrollSize_get = /* @__PURE__ */ __name(function() {
63
+ return __privateGet(this, _accordionElement).axisAttribute.current === "x" ? __privateGet(this, _bodyElement).scrollWidth : __privateGet(this, _bodyElement).scrollHeight;
64
+ }, "#scrollSize"), _headClickListener = new WeakMap(), _windowResizeListener = new WeakMap(), setScrollSize_fn = /* @__PURE__ */ __name(function(value, skipDuration = !1) {
65
+ skipDuration && (__privateGet(this, _bodyElement).style.transition = "all 0s", setTimeout(() => {
66
+ __privateGet(this, _bodyElement).style.transition = "";
65
67
  }));
66
- const r = e(this, c).axisAttribute.current === "x" ? "width" : "height";
67
- i != null ? e(this, l).style[r] = `${i}px` : e(this, l).style[r] = "";
68
- }, C = function() {
69
- e(this, l).style.transition = "all 0s", setTimeout(() => {
70
- e(this, l).style.transition = "";
68
+ const dim = __privateGet(this, _accordionElement).axisAttribute.current === "x" ? "width" : "height";
69
+ value != null ? __privateGet(this, _bodyElement).style[dim] = `${value}px` : __privateGet(this, _bodyElement).style[dim] = "";
70
+ }, "#setScrollSize"), skipTransition_fn = /* @__PURE__ */ __name(function() {
71
+ __privateGet(this, _bodyElement).style.transition = "all 0s", setTimeout(() => {
72
+ __privateGet(this, _bodyElement).style.transition = "";
71
73
  }, 50);
72
- }, I = function(i) {
73
- e(this, c).hasAttribute("no-window-resize") || a(this, E, setTimeout(() => {
74
- i == null || i(), window.dispatchEvent(new CustomEvent("resize"));
75
- }, D(e(this, l))));
76
- };
77
- var b, g, u, p, L, z;
78
- class N extends HTMLElement {
74
+ }, "#skipTransition"), tryDispatchResizeEvent_fn = /* @__PURE__ */ __name(function(callback) {
75
+ __privateGet(this, _accordionElement).hasAttribute("no-window-resize") || __privateSet(this, _activeTimeoutId, setTimeout(() => {
76
+ callback == null || callback(), window.dispatchEvent(new CustomEvent("resize"));
77
+ }, getElementTransitionDurationMS(__privateGet(this, _bodyElement))));
78
+ }, "#tryDispatchResizeEvent"), __name(_AccordionItem, "AccordionItem");
79
+ let AccordionItem = _AccordionItem;
80
+ var _axisAttribute, _multipleAttribute, _items, _mutationObserver, _AccordionElement_instances, root_get;
81
+ const _AccordionElement = class _AccordionElement extends HTMLElement {
79
82
  constructor() {
80
83
  super();
81
- o(this, L);
82
- o(this, b, new H(this, "axis", "y"));
83
- o(this, g, new H(this, "multiple", !1));
84
- o(this, u, []);
85
- o(this, p, null);
86
- S && a(this, p, new MutationObserver((t) => {
87
- t.forEach((r) => {
88
- r.removedNodes.forEach((T) => {
89
- T instanceof HTMLElement && this.removeItem(T);
90
- }), r.addedNodes.forEach((T) => {
91
- T instanceof HTMLElement && this.createItem(T);
84
+ __privateAdd(this, _AccordionElement_instances);
85
+ __privateAdd(this, _axisAttribute, new Attribute(this, "axis", "y"));
86
+ __privateAdd(this, _multipleAttribute, new Attribute(this, "multiple", !1));
87
+ __privateAdd(this, _items, []);
88
+ __privateAdd(this, _mutationObserver, null);
89
+ isBrowser && __privateSet(this, _mutationObserver, new MutationObserver((records) => {
90
+ records.forEach((record) => {
91
+ record.removedNodes.forEach((node) => {
92
+ node instanceof HTMLElement && this.removeItem(node);
93
+ }), record.addedNodes.forEach((node) => {
94
+ node instanceof HTMLElement && this.createItem(node);
92
95
  });
93
96
  });
94
97
  }));
95
98
  }
96
99
  get axisAttribute() {
97
- return e(this, b);
100
+ return __privateGet(this, _axisAttribute);
98
101
  }
99
102
  get multipleAttribute() {
100
- return e(this, g);
103
+ return __privateGet(this, _multipleAttribute);
101
104
  }
102
- createItem(t) {
103
- e(this, u).find((r) => r.element === t) || e(this, u).push(new R(this, t));
105
+ createItem(element) {
106
+ __privateGet(this, _items).find((item) => item.element === element) || __privateGet(this, _items).push(new AccordionItem(this, element));
104
107
  }
105
- removeItem(t) {
106
- a(this, u, e(this, u).filter((r) => {
107
- if (r.element !== t)
108
+ removeItem(element) {
109
+ __privateSet(this, _items, __privateGet(this, _items).filter((item) => {
110
+ if (item.element !== element)
108
111
  return !0;
109
- r.destroy();
112
+ item.destroy();
110
113
  }));
111
114
  }
112
- closeAll(t) {
113
- e(this, u).forEach((r) => {
114
- (t == null ? void 0 : t.exclude) !== r.element && r.close(t);
115
+ closeAll(options) {
116
+ __privateGet(this, _items).forEach((item) => {
117
+ (options == null ? void 0 : options.exclude) !== item.element && item.close(options);
115
118
  });
116
119
  }
117
- openAll(t) {
118
- e(this, u).forEach((r) => {
119
- (t == null ? void 0 : t.exclude) !== r.element && r.open(t);
120
+ openAll(options) {
121
+ __privateGet(this, _items).forEach((item) => {
122
+ (options == null ? void 0 : options.exclude) !== item.element && item.open(options);
120
123
  });
121
124
  }
122
125
  connectedCallback() {
123
- e(this, b).observe(), e(this, g).observe(), e(this, p).observe(e(this, L, z), {
126
+ __privateGet(this, _axisAttribute).observe(), __privateGet(this, _multipleAttribute).observe(), __privateGet(this, _mutationObserver).observe(__privateGet(this, _AccordionElement_instances, root_get), {
124
127
  childList: !0
125
- }), a(this, u, [...e(this, L, z).children].map((t) => {
126
- if (t instanceof HTMLElement)
127
- return new R(this, t);
128
- }).filter((t) => !!t));
128
+ }), __privateSet(this, _items, [...__privateGet(this, _AccordionElement_instances, root_get).children].map((element) => {
129
+ if (element instanceof HTMLElement)
130
+ return new AccordionItem(this, element);
131
+ }).filter((e) => !!e));
129
132
  }
130
133
  disconnectedCallback() {
131
- e(this, b).unobserve(), e(this, g).unobserve(), e(this, p).disconnect();
134
+ __privateGet(this, _axisAttribute).unobserve(), __privateGet(this, _multipleAttribute).unobserve(), __privateGet(this, _mutationObserver).disconnect();
132
135
  }
133
- }
134
- b = new WeakMap(), g = new WeakMap(), u = new WeakMap(), p = new WeakMap(), L = new WeakSet(), z = function() {
135
- return this.shadowRoot ? this.shadowRoot : this;
136
136
  };
137
- S && !customElements.get("e-accordion") && customElements.define("e-accordion", N);
137
+ _axisAttribute = new WeakMap(), _multipleAttribute = new WeakMap(), _items = new WeakMap(), _mutationObserver = new WeakMap(), _AccordionElement_instances = new WeakSet(), root_get = /* @__PURE__ */ __name(function() {
138
+ return this.shadowRoot ? this.shadowRoot : this;
139
+ }, "#root"), __name(_AccordionElement, "AccordionElement");
140
+ let AccordionElement = _AccordionElement;
141
+ isBrowser && !customElements.get("e-accordion") && customElements.define("e-accordion", AccordionElement);
138
142
  export {
139
- N as AccordionElement
143
+ AccordionElement
140
144
  };
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../Animation-C39Ah-LM.cjs"),n=require("../Damped-Prr0iKu1.cjs"),i=require("../Tweened-DWtk9E-O.cjs");exports.Animation=e.Animation;exports.Damped=n.Damped;exports.Tweened=i.Tweened;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const Animation=require("../Animation-DMWabSR0.cjs"),Damped=require("../Damped-BLo-OAVb.cjs"),Tweened=require("../Tweened-DdXm1dbF.cjs");exports.Animation=Animation.Animation;exports.Damped=Damped.Damped;exports.Tweened=Tweened.Tweened;
@@ -1,8 +1,8 @@
1
- import { A as r } from "../Animation-BzTjZIE-.js";
2
- import { D as m } from "../Damped-CRusiRIV.js";
3
- import { T as t } from "../Tweened-Bw1Cn1PJ.js";
1
+ import { A } from "../Animation-BAiM6_n1.js";
2
+ import { D } from "../Damped-Dcz5UdMH.js";
3
+ import { T } from "../Tweened-BvtjLCa3.js";
4
4
  export {
5
- r as Animation,
6
- m as Damped,
7
- t as Tweened
5
+ A as Animation,
6
+ D as Damped,
7
+ T as Tweened
8
8
  };
@@ -1 +1 @@
1
- "use strict";var C=Object.defineProperty,S=Object.defineProperties;var o=Object.getOwnPropertyDescriptors;var D=Object.getOwnPropertySymbols;var q=Object.prototype.hasOwnProperty,x=Object.prototype.propertyIsEnumerable;var y=(a,e,r)=>e in a?C(a,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):a[e]=r,l=(a,e)=>{for(var r in e||(e={}))q.call(e,r)&&y(a,r,e[r]);if(D)for(var r of D(e))x.call(e,r)&&y(a,r,e[r]);return a},i=(a,e)=>S(a,o(e));var b=(a,e,r)=>new Promise((n,f)=>{var w=c=>{try{s(r.next(c))}catch(d){f(d)}},t=c=>{try{s(r.throw(c))}catch(d){f(d)}},s=c=>c.done?n(c.value):Promise.resolve(c.value).then(w,t);s((r=r.apply(a,e)).next())});Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const M=require("../cache/index.cjs");require("construct-style-sheets-polyfill");require("../index-OE2INULi.cjs");const O=require("../url-CHgcNwJ1.cjs"),g=new M.Cache;function $(a,e){return b(this,null,function*(){var f,w;const r=Date.now(),n={data:null,error:null,status:"unknown",headers:new Headers};try{let t=a;if(e!=null&&e.params){const h=O.searchParamsObjectToString(e.params);if(h){const j=t.includes("?")?"&":"?";t+=`${j}${h}`}}const s=(f=e==null?void 0:e.cacheKey)!=null?f:t,c=(w=e==null?void 0:e.cacheTTLMinutes)!=null?w:0,d=c>0;if((e!=null&&e.forceClearCache||globalThis.forceClearCache)&&g.delete(s),d){const h=g.get(s);if(h)return i(l({},n),{data:h,cached:!0,status:"success",time:Date.now()-r})}const u=yield fetch(t,e==null?void 0:e.init);if(!u.ok){const h=yield u.text();return i(l({},n),{error:h,status:"error",time:Date.now()-r,headers:u.headers})}const m=u.headers.get("content-type");if(!(m!=null&&m.includes("application/json")))return i(l({},n),{error:"Endpoint did not return JSON",status:"error",time:Date.now()-r,headers:u.headers});const T=yield u.json();return d&&g.set(s,T,c),i(l({},n),{data:T,status:"success",time:Date.now()-r,headers:u.headers})}catch(t){const s=t instanceof Error?t.message:String(t);return i(l({},n),{error:s,status:"error",time:Date.now()-r})}})}exports.apiFetcher=$;
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});var __async=(__this,__arguments,generator)=>new Promise((resolve,reject)=>{var fulfilled=value=>{try{step(generator.next(value))}catch(e){reject(e)}},rejected=value=>{try{step(generator.throw(value))}catch(e){reject(e)}},step=x=>x.done?resolve(x.value):Promise.resolve(x.value).then(fulfilled,rejected);step((generator=generator.apply(__this,__arguments)).next())});Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const cache_index=require("../cache/index.cjs");require("construct-style-sheets-polyfill");require("../index-BpO2RJ__.cjs");const url=require("../url-CPCO10Sy.cjs"),cache=new cache_index.Cache;function apiFetcher(input,options){return __async(this,null,function*(){var _a,_b;const startTime=Date.now(),baseResult={data:null,error:null,status:"unknown",headers:new Headers};try{let url$1=input;if(options!=null&&options.params){const params=url.searchParamsObjectToString(options.params);if(params){const separator=url$1.includes("?")?"&":"?";url$1+=`${separator}${params}`}}const cacheKey=(_a=options==null?void 0:options.cacheKey)!=null?_a:url$1,cacheTTL=(_b=options==null?void 0:options.cacheTTLMinutes)!=null?_b:0,cacheAllowed=cacheTTL>0;if((options!=null&&options.forceClearCache||globalThis.forceClearCache)&&cache.delete(cacheKey),cacheAllowed){const cached=cache.get(cacheKey);if(cached)return __spreadProps(__spreadValues({},baseResult),{data:cached,cached:!0,status:"success",time:Date.now()-startTime})}const response=yield fetch(url$1,options==null?void 0:options.init);if(!response.ok){const errorText=yield response.text();return __spreadProps(__spreadValues({},baseResult),{error:errorText,status:"error",time:Date.now()-startTime,headers:response.headers})}const contentType=response.headers.get("content-type");if(!(contentType!=null&&contentType.includes("application/json")))return __spreadProps(__spreadValues({},baseResult),{error:"Endpoint did not return JSON",status:"error",time:Date.now()-startTime,headers:response.headers});const jsonData=yield response.json();return cacheAllowed&&cache.set(cacheKey,jsonData,cacheTTL),__spreadProps(__spreadValues({},baseResult),{data:jsonData,status:"success",time:Date.now()-startTime,headers:response.headers})}catch(error){const errorMessage=error instanceof Error?error.message:String(error);return __spreadProps(__spreadValues({},baseResult),{error:errorMessage,status:"error",time:Date.now()-startTime})}})}__name(apiFetcher,"apiFetcher");exports.apiFetcher=apiFetcher;
@@ -1,100 +1,101 @@
1
- var y = Object.defineProperty, b = Object.defineProperties;
2
- var x = Object.getOwnPropertyDescriptors;
3
- var T = Object.getOwnPropertySymbols;
4
- var S = Object.prototype.hasOwnProperty, k = Object.prototype.propertyIsEnumerable;
5
- var o = (a, e, r) => e in a ? y(a, e, { enumerable: !0, configurable: !0, writable: !0, value: r }) : a[e] = r, l = (a, e) => {
6
- for (var r in e || (e = {}))
7
- S.call(e, r) && o(a, r, e[r]);
8
- if (T)
9
- for (var r of T(e))
10
- k.call(e, r) && o(a, r, e[r]);
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
11
  return a;
12
- }, m = (a, e) => b(a, x(e));
13
- var C = (a, e, r) => new Promise((n, f) => {
14
- var w = (c) => {
12
+ }, __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b)), __name = (target, value) => __defProp(target, "name", { value, configurable: !0 });
13
+ var __async = (__this, __arguments, generator) => new Promise((resolve, reject) => {
14
+ var fulfilled = (value) => {
15
15
  try {
16
- s(r.next(c));
17
- } catch (d) {
18
- f(d);
16
+ step(generator.next(value));
17
+ } catch (e) {
18
+ reject(e);
19
19
  }
20
- }, t = (c) => {
20
+ }, rejected = (value) => {
21
21
  try {
22
- s(r.throw(c));
23
- } catch (d) {
24
- f(d);
22
+ step(generator.throw(value));
23
+ } catch (e) {
24
+ reject(e);
25
25
  }
26
- }, s = (c) => c.done ? n(c.value) : Promise.resolve(c.value).then(w, t);
27
- s((r = r.apply(a, e)).next());
26
+ }, step = (x) => x.done ? resolve(x.value) : Promise.resolve(x.value).then(fulfilled, rejected);
27
+ step((generator = generator.apply(__this, __arguments)).next());
28
28
  });
29
- import { Cache as E } from "../cache/index.js";
29
+ import { Cache } from "../cache/index.js";
30
30
  import "construct-style-sheets-polyfill";
31
- import "../index-e9eDuagL.js";
32
- import { s as K } from "../url-CYgo5vrG.js";
33
- const g = new E();
34
- function F(a, e) {
35
- return C(this, null, function* () {
36
- var f, w;
37
- const r = Date.now(), n = {
31
+ import "../index-DpKsHe97.js";
32
+ import { s as searchParamsObjectToString } from "../url-CWCY_qe_.js";
33
+ const cache = new Cache();
34
+ function apiFetcher(input, options) {
35
+ return __async(this, null, function* () {
36
+ var _a, _b;
37
+ const startTime = Date.now(), baseResult = {
38
38
  data: null,
39
39
  error: null,
40
40
  status: "unknown",
41
41
  headers: new Headers()
42
42
  };
43
43
  try {
44
- let t = a;
45
- if (e != null && e.params) {
46
- const u = K(e.params);
47
- if (u) {
48
- const j = t.includes("?") ? "&" : "?";
49
- t += `${j}${u}`;
44
+ let url = input;
45
+ if (options != null && options.params) {
46
+ const params = searchParamsObjectToString(options.params);
47
+ if (params) {
48
+ const separator = url.includes("?") ? "&" : "?";
49
+ url += `${separator}${params}`;
50
50
  }
51
51
  }
52
- const s = (f = e == null ? void 0 : e.cacheKey) != null ? f : t, c = (w = e == null ? void 0 : e.cacheTTLMinutes) != null ? w : 0, d = c > 0;
53
- if ((e != null && e.forceClearCache || globalThis.forceClearCache) && g.delete(s), d) {
54
- const u = g.get(s);
55
- if (u)
56
- return m(l({}, n), {
57
- data: u,
52
+ const cacheKey = (_a = options == null ? void 0 : options.cacheKey) != null ? _a : url, cacheTTL = (_b = options == null ? void 0 : options.cacheTTLMinutes) != null ? _b : 0, cacheAllowed = cacheTTL > 0;
53
+ if ((options != null && options.forceClearCache || globalThis.forceClearCache) && cache.delete(cacheKey), cacheAllowed) {
54
+ const cached = cache.get(cacheKey);
55
+ if (cached)
56
+ return __spreadProps(__spreadValues({}, baseResult), {
57
+ data: cached,
58
58
  cached: !0,
59
59
  status: "success",
60
- time: Date.now() - r
60
+ time: Date.now() - startTime
61
61
  });
62
62
  }
63
- const h = yield fetch(t, e == null ? void 0 : e.init);
64
- if (!h.ok) {
65
- const u = yield h.text();
66
- return m(l({}, n), {
67
- error: u,
63
+ const response = yield fetch(url, options == null ? void 0 : options.init);
64
+ if (!response.ok) {
65
+ const errorText = yield response.text();
66
+ return __spreadProps(__spreadValues({}, baseResult), {
67
+ error: errorText,
68
68
  status: "error",
69
- time: Date.now() - r,
70
- headers: h.headers
69
+ time: Date.now() - startTime,
70
+ headers: response.headers
71
71
  });
72
72
  }
73
- const i = h.headers.get("content-type");
74
- if (!(i != null && i.includes("application/json")))
75
- return m(l({}, n), {
73
+ const contentType = response.headers.get("content-type");
74
+ if (!(contentType != null && contentType.includes("application/json")))
75
+ return __spreadProps(__spreadValues({}, baseResult), {
76
76
  error: "Endpoint did not return JSON",
77
77
  status: "error",
78
- time: Date.now() - r,
79
- headers: h.headers
78
+ time: Date.now() - startTime,
79
+ headers: response.headers
80
80
  });
81
- const D = yield h.json();
82
- return d && g.set(s, D, c), m(l({}, n), {
83
- data: D,
81
+ const jsonData = yield response.json();
82
+ return cacheAllowed && cache.set(cacheKey, jsonData, cacheTTL), __spreadProps(__spreadValues({}, baseResult), {
83
+ data: jsonData,
84
84
  status: "success",
85
- time: Date.now() - r,
86
- headers: h.headers
85
+ time: Date.now() - startTime,
86
+ headers: response.headers
87
87
  });
88
- } catch (t) {
89
- const s = t instanceof Error ? t.message : String(t);
90
- return m(l({}, n), {
91
- error: s,
88
+ } catch (error) {
89
+ const errorMessage = error instanceof Error ? error.message : String(error);
90
+ return __spreadProps(__spreadValues({}, baseResult), {
91
+ error: errorMessage,
92
92
  status: "error",
93
- time: Date.now() - r
93
+ time: Date.now() - startTime
94
94
  });
95
95
  }
96
96
  });
97
97
  }
98
+ __name(apiFetcher, "apiFetcher");
98
99
  export {
99
- F as apiFetcher
100
+ apiFetcher
100
101
  };
@@ -1 +1 @@
1
- "use strict";var q=t=>{throw TypeError(t)};var v=(t,s,e)=>s.has(t)||q("Cannot "+e);var r=(t,s,e)=>(v(t,s,"read from private field"),e?e.call(t):s.get(t)),h=(t,s,e)=>s.has(t)?q("Cannot add the same private member more than once"):s instanceof WeakSet?s.add(t):s.set(t,e),n=(t,s,e,c)=>(v(t,s,"write to private field"),c?c.call(t,e):s.set(t,e),e),d=(t,s,e)=>(v(t,s,"access private method"),e);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const A=require("../Store-Blf4msDz.cjs"),S=require("../attributes-Bf2svn4j.cjs"),p=require("../index-OE2INULi.cjs"),O=require("../dom-CBLlqORw.cjs");require("construct-style-sheets-polyfill");var i,u,o,b,a,g;class w extends A.Store{constructor(e,c,y,l){super(y,l);h(this,a);h(this,i,null);h(this,u);h(this,o,null);h(this,b,!1);n(this,u,c),p.isBrowser&&(n(this,i,O.getElement(e)),n(this,o,new MutationObserver(f=>{f.forEach(m=>{m.type==="attributes"&&m.attributeName===r(this,u)&&d(this,a,g).call(this)})})),l!=null&&l.sync&&this.subscribe(f=>{r(this,i).setAttribute(r(this,u),f.current.toString())}))}subscribe(e,c){return this.subscribers.length||this.observe(),super.subscribe(e,c)}unsubscribe(e){super.unsubscribe(e),this.subscribers.length||this.unobserve()}observe(){r(this,b)||(n(this,b,!0),r(this,o).observe(r(this,i),{attributes:!0}),d(this,a,g).call(this))}unobserve(){r(this,b)&&(n(this,b,!1),r(this,o).disconnect())}close(){super.close(),this.unobserve()}}i=new WeakMap,u=new WeakMap,o=new WeakMap,b=new WeakMap,a=new WeakSet,g=function(){const e=r(this,i).getAttribute(r(this,u));e!=null&&(this.current=S.parseAttributeValue(e))};exports.Attribute=w;
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 Store=require("../Store-BCW70G3Z.cjs"),attributes=require("../attributes-BADnRZpK.cjs"),intersector_index=require("../index-BpO2RJ__.cjs"),dom=require("../dom-B40i6NXw.cjs");require("construct-style-sheets-polyfill");var _element,_name,_mutationObserver,_active,_Attribute_instances,tryUpdate_fn;const _Attribute=class _Attribute extends Store.Store{constructor(elementOrSelector,name,defaultValue,options){super(defaultValue,options);__privateAdd(this,_Attribute_instances);__privateAdd(this,_element,null);__privateAdd(this,_name);__privateAdd(this,_mutationObserver,null);__privateAdd(this,_active,!1);__privateSet(this,_name,name),intersector_index.isBrowser&&(__privateSet(this,_element,dom.getElement(elementOrSelector)),__privateSet(this,_mutationObserver,new MutationObserver(mutations=>{mutations.forEach(mutation=>{mutation.type==="attributes"&&mutation.attributeName===__privateGet(this,_name)&&__privateMethod(this,_Attribute_instances,tryUpdate_fn).call(this)})})),options!=null&&options.sync&&this.subscribe(e=>{__privateGet(this,_element).setAttribute(__privateGet(this,_name),e.current.toString())}))}subscribe(callback,order){return this.subscribers.length||this.observe(),super.subscribe(callback,order)}unsubscribe(callback){super.unsubscribe(callback),this.subscribers.length||this.unobserve()}observe(){__privateGet(this,_active)||(__privateSet(this,_active,!0),__privateGet(this,_mutationObserver).observe(__privateGet(this,_element),{attributes:!0}),__privateMethod(this,_Attribute_instances,tryUpdate_fn).call(this))}unobserve(){__privateGet(this,_active)&&(__privateSet(this,_active,!1),__privateGet(this,_mutationObserver).disconnect())}close(){super.close(),this.unobserve()}};_element=new WeakMap,_name=new WeakMap,_mutationObserver=new WeakMap,_active=new WeakMap,_Attribute_instances=new WeakSet,tryUpdate_fn=__name(function(){const value=__privateGet(this,_element).getAttribute(__privateGet(this,_name));value!=null&&(this.current=attributes.parseAttributeValue(value))},"#tryUpdate"),__name(_Attribute,"Attribute");let Attribute=_Attribute;exports.Attribute=Attribute;
@@ -1,52 +1,55 @@
1
- var d = (e) => {
2
- throw TypeError(e);
1
+ var __defProp = Object.defineProperty;
2
+ var __typeError = (msg) => {
3
+ throw TypeError(msg);
3
4
  };
4
- var m = (e, s, t) => s.has(e) || d("Cannot " + t);
5
- var r = (e, s, t) => (m(e, s, "read from private field"), t ? t.call(e) : s.get(e)), c = (e, s, t) => s.has(e) ? d("Cannot add the same private member more than once") : s instanceof WeakSet ? s.add(e) : s.set(e, t), a = (e, s, t, h) => (m(e, s, "write to private field"), h ? h.call(e, t) : s.set(e, t), t), v = (e, s, t) => (m(e, s, "access private method"), t);
6
- import { S as y } from "../Store-ZThXYBQd.js";
7
- import { p as S } from "../attributes-69we3byR.js";
8
- import { i as w } from "../index-e9eDuagL.js";
9
- import { g as x } 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 { S as Store } from "../Store-uLDYY9ed.js";
9
+ import { p as parseAttributeValue } from "../attributes-FObgMNCf.js";
10
+ import { i as isBrowser } from "../index-DpKsHe97.js";
11
+ import { g as getElement } from "../dom-D8D-_9ty.js";
10
12
  import "construct-style-sheets-polyfill";
11
- var i, u, n, b, o, p;
12
- class V extends y {
13
- constructor(t, h, A, f) {
14
- super(A, f);
15
- c(this, o);
16
- c(this, i, null);
17
- c(this, u);
18
- c(this, n, null);
19
- c(this, b, !1);
20
- a(this, u, h), w && (a(this, i, x(t)), a(this, n, new MutationObserver((l) => {
21
- l.forEach((g) => {
22
- g.type === "attributes" && g.attributeName === r(this, u) && v(this, o, p).call(this);
13
+ var _element, _name, _mutationObserver, _active, _Attribute_instances, tryUpdate_fn;
14
+ const _Attribute = class _Attribute extends Store {
15
+ constructor(elementOrSelector, name, defaultValue, options) {
16
+ super(defaultValue, options);
17
+ __privateAdd(this, _Attribute_instances);
18
+ __privateAdd(this, _element, null);
19
+ __privateAdd(this, _name);
20
+ __privateAdd(this, _mutationObserver, null);
21
+ __privateAdd(this, _active, !1);
22
+ __privateSet(this, _name, name), isBrowser && (__privateSet(this, _element, getElement(elementOrSelector)), __privateSet(this, _mutationObserver, new MutationObserver((mutations) => {
23
+ mutations.forEach((mutation) => {
24
+ mutation.type === "attributes" && mutation.attributeName === __privateGet(this, _name) && __privateMethod(this, _Attribute_instances, tryUpdate_fn).call(this);
23
25
  });
24
- })), f != null && f.sync && this.subscribe((l) => {
25
- r(this, i).setAttribute(r(this, u), l.current.toString());
26
+ })), options != null && options.sync && this.subscribe((e) => {
27
+ __privateGet(this, _element).setAttribute(__privateGet(this, _name), e.current.toString());
26
28
  }));
27
29
  }
28
- subscribe(t, h) {
29
- return this.subscribers.length || this.observe(), super.subscribe(t, h);
30
+ subscribe(callback, order) {
31
+ return this.subscribers.length || this.observe(), super.subscribe(callback, order);
30
32
  }
31
- unsubscribe(t) {
32
- super.unsubscribe(t), this.subscribers.length || this.unobserve();
33
+ unsubscribe(callback) {
34
+ super.unsubscribe(callback), this.subscribers.length || this.unobserve();
33
35
  }
34
36
  observe() {
35
- r(this, b) || (a(this, b, !0), r(this, n).observe(r(this, i), {
37
+ __privateGet(this, _active) || (__privateSet(this, _active, !0), __privateGet(this, _mutationObserver).observe(__privateGet(this, _element), {
36
38
  attributes: !0
37
- }), v(this, o, p).call(this));
39
+ }), __privateMethod(this, _Attribute_instances, tryUpdate_fn).call(this));
38
40
  }
39
41
  unobserve() {
40
- r(this, b) && (a(this, b, !1), r(this, n).disconnect());
42
+ __privateGet(this, _active) && (__privateSet(this, _active, !1), __privateGet(this, _mutationObserver).disconnect());
41
43
  }
42
44
  close() {
43
45
  super.close(), this.unobserve();
44
46
  }
45
- }
46
- i = new WeakMap(), u = new WeakMap(), n = new WeakMap(), b = new WeakMap(), o = new WeakSet(), p = function() {
47
- const t = r(this, i).getAttribute(r(this, u));
48
- t != null && (this.current = S(t));
49
47
  };
48
+ _element = new WeakMap(), _name = new WeakMap(), _mutationObserver = new WeakMap(), _active = new WeakMap(), _Attribute_instances = new WeakSet(), tryUpdate_fn = /* @__PURE__ */ __name(function() {
49
+ const value = __privateGet(this, _element).getAttribute(__privateGet(this, _name));
50
+ value != null && (this.current = parseAttributeValue(value));
51
+ }, "#tryUpdate"), __name(_Attribute, "Attribute");
52
+ let Attribute = _Attribute;
50
53
  export {
51
- V as Attribute
54
+ Attribute
52
55
  };
@@ -0,0 +1 @@
1
+ "use strict";var __defProp=Object.defineProperty;var __name=(target,value)=>__defProp(target,"name",{value,configurable:!0});function parseAttribute(element,attributeName){return parseAttributeValue(element.getAttribute(attributeName))}__name(parseAttribute,"parseAttribute");function parseAttributeValue(value){return value==null?null:value?isNaN(Number(value))?value==="true"?!0:value==="false"?!1:value:Number(value):!0}__name(parseAttributeValue,"parseAttributeValue");function parseAttributeValueAdvanced(value){if(value==="true")return!0;if(value==="false")return!1;const num=Number(value);if(!isNaN(num)&&value.trim()!=="")return num;try{if(value.startsWith("{")&&value.endsWith("}")||value.startsWith("[")&&value.endsWith("]"))return JSON.parse(value)}catch(e){}return value}__name(parseAttributeValueAdvanced,"parseAttributeValueAdvanced");function getElementAttributesAdvanced(element){const attributes={};return Array.from(element.attributes).forEach(attr=>{attributes[attr.name]=parseAttributeValue(attr.value)}),attributes}__name(getElementAttributesAdvanced,"getElementAttributesAdvanced");exports.getElementAttributesAdvanced=getElementAttributesAdvanced;exports.parseAttribute=parseAttribute;exports.parseAttributeValue=parseAttributeValue;exports.parseAttributeValueAdvanced=parseAttributeValueAdvanced;