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
@@ -0,0 +1,256 @@
1
+ var __defProp = Object.defineProperty;
2
+ var __name = (target, value) => __defProp(target, "name", { value, configurable: !0 });
3
+ var __async = (__this, __arguments, generator) => new Promise((resolve, reject) => {
4
+ var fulfilled = (value) => {
5
+ try {
6
+ step(generator.next(value));
7
+ } catch (e) {
8
+ reject(e);
9
+ }
10
+ }, rejected = (value) => {
11
+ try {
12
+ step(generator.throw(value));
13
+ } catch (e) {
14
+ reject(e);
15
+ }
16
+ }, step = (x) => x.done ? resolve(x.value) : Promise.resolve(x.value).then(fulfilled, rejected);
17
+ step((generator = generator.apply(__this, __arguments)).next());
18
+ });
19
+ const NODE_TYPE_ELEMENT = 1, NODE_TYPE_TEXT = 3, NODE_TYPE_COMMENT = 8, NODE_TYPE_DOCUMENT = 9, ACTION_CREATE = 0, ACTION_REMOVE = 1, ACTION_REPLACE = 2, ACTION_UPDATE = 3, ACTION_SET_ATTR = 4, ACTION_REMOVE_ATTR = 5, ACTION_SKIP = 6, ACTION_PRESERVE = 7, compare = /* @__PURE__ */ __name((attr) => (from, to) => from[`node${attr}`] === to[`node${attr}`], "compare"), same = {
20
+ name: compare("Name"),
21
+ type: compare("Type"),
22
+ value: compare("Value")
23
+ };
24
+ function hasPermanentParent(node) {
25
+ if (!node) return !1;
26
+ let current = node;
27
+ for (; current; ) {
28
+ if (current.nodeType === 1 && current.hasAttribute("data-preserve"))
29
+ return !0;
30
+ current = current.parentNode;
31
+ }
32
+ return !1;
33
+ }
34
+ __name(hasPermanentParent, "hasPermanentParent");
35
+ function attributes(from, to) {
36
+ if (from.attributes.length === 0 && to.attributes.length === 0)
37
+ return [];
38
+ const patches = [], remove = /* @__PURE__ */ new Map(), update = /* @__PURE__ */ new Map();
39
+ for (const attr of from.attributes)
40
+ remove.set(attr.name, attr.value);
41
+ for (const attr of to.attributes) {
42
+ const fromAttr = remove.get(attr.name);
43
+ attr.value === fromAttr ? remove.delete(attr.name) : (typeof fromAttr != "undefined" && remove.delete(attr.name), update.set(attr.name, attr.value));
44
+ }
45
+ for (const attr of remove.keys())
46
+ patches.push({ type: 5, name: attr });
47
+ for (const [attr, value] of update.entries())
48
+ patches.push({ type: 4, name: attr, value });
49
+ return patches;
50
+ }
51
+ __name(attributes, "attributes");
52
+ function serialize(el, data = !0) {
53
+ let key = `${el.localName}`;
54
+ for (const { name, value } of el.attributes)
55
+ data && name.startsWith("data-") || (key += `[${name}=${value}]`);
56
+ return key += el.innerHTML, key;
57
+ }
58
+ __name(serialize, "serialize");
59
+ function getKey(el) {
60
+ switch (el.tagName) {
61
+ case "BASE":
62
+ case "TITLE":
63
+ return el.localName;
64
+ case "META": {
65
+ if (el.hasAttribute("name"))
66
+ return `meta[name="${el.getAttribute("name")}"]`;
67
+ if (el.hasAttribute("property"))
68
+ return `meta[name="${el.getAttribute("property")}"]`;
69
+ break;
70
+ }
71
+ case "LINK": {
72
+ if (el.hasAttribute("rel") && el.hasAttribute("href"))
73
+ return `link[rel="${el.getAttribute("rel")}"][href="${el.getAttribute("href")}"]`;
74
+ if (el.hasAttribute("href"))
75
+ return `link[href="${el.getAttribute("href")}"]`;
76
+ break;
77
+ }
78
+ }
79
+ return serialize(el);
80
+ }
81
+ __name(getKey, "getKey");
82
+ function cachebust(src) {
83
+ const [base, query = ""] = src.split("?");
84
+ return `${base}?t=${Date.now()}&${query.replace(/t=\d+/g, "")}`;
85
+ }
86
+ __name(cachebust, "cachebust");
87
+ function clone(node) {
88
+ if (node.nodeType === 1 && node.hasAttribute("data-persist"))
89
+ return node;
90
+ if (node.nodeType === 1 && node.localName === "script") {
91
+ const script = document.createElement("script");
92
+ for (let { name, value } of node.attributes)
93
+ name === "src" && (value = cachebust(value)), script.setAttribute(name, value);
94
+ return script.innerHTML = node.innerHTML, script;
95
+ }
96
+ return node.cloneNode(!0);
97
+ }
98
+ __name(clone, "clone");
99
+ function uniqueChildren(from, to) {
100
+ if (from.children.length === 0 && to.children.length === 0)
101
+ return [];
102
+ const patches = [], remove = /* @__PURE__ */ new Map(), update = /* @__PURE__ */ new Map(), add = /* @__PURE__ */ new Map();
103
+ for (const child of from.children)
104
+ remove.set(getKey(child), child);
105
+ for (const child of to.children) {
106
+ const key = getKey(child), fromEl = remove.get(key);
107
+ fromEl ? serialize(child, !1) !== serialize(fromEl, !1) && update.set(key, clone(child)) : add.set(key, clone(child)), remove.delete(key);
108
+ }
109
+ for (const node of from.childNodes) {
110
+ if (node.nodeType === 1) {
111
+ const key = getKey(node);
112
+ if (remove.has(key)) {
113
+ patches.push({ type: 1 });
114
+ continue;
115
+ } else if (update.has(key)) {
116
+ const nodeTo = update.get(key);
117
+ patches.push({
118
+ type: 3,
119
+ attributes: attributes(node, nodeTo),
120
+ children: children(node, nodeTo)
121
+ });
122
+ continue;
123
+ }
124
+ }
125
+ patches.push(void 0);
126
+ }
127
+ for (const node of add.values())
128
+ patches.push({ type: 0, node: clone(node) });
129
+ return patches;
130
+ }
131
+ __name(uniqueChildren, "uniqueChildren");
132
+ function children(from, to) {
133
+ const patches = [], len = Math.max(from.childNodes.length, to.childNodes.length);
134
+ for (let i = 0; i < len; i++) {
135
+ const a = from.childNodes.item(i), b = to.childNodes.item(i);
136
+ hasPermanentParent(a) || hasPermanentParent(b) ? patches[i] = { type: 7 } : patches[i] = diff(a, b);
137
+ }
138
+ return patches;
139
+ }
140
+ __name(children, "children");
141
+ function diff(from, to) {
142
+ if (hasPermanentParent(from) || hasPermanentParent(to))
143
+ return { type: 7 };
144
+ if (!from)
145
+ return { type: 0, node: clone(to) };
146
+ if (!to)
147
+ return hasPermanentParent(from) ? { type: 7 } : { type: 1 };
148
+ if (same.type(from, to)) {
149
+ if (from.nodeType === 3) {
150
+ const a = from.nodeValue, b = to.nodeValue;
151
+ if ((a == null ? void 0 : a.trim().length) === 0 && (b == null ? void 0 : b.trim().length) === 0)
152
+ return { type: 6 };
153
+ }
154
+ if (from.nodeType === 1) {
155
+ if (same.name(from, to)) {
156
+ const childFn = from.tagName === "HEAD" ? uniqueChildren : children;
157
+ return {
158
+ type: 3,
159
+ attributes: attributes(from, to),
160
+ children: childFn(from, to)
161
+ };
162
+ }
163
+ return {
164
+ type: 2,
165
+ node: clone(to)
166
+ };
167
+ } else return from.nodeType === 9 ? diff(
168
+ from.documentElement,
169
+ to.documentElement
170
+ ) : same.value(from, to) ? { type: 6 } : {
171
+ type: 2,
172
+ value: to.nodeValue
173
+ };
174
+ }
175
+ return {
176
+ type: 2,
177
+ node: clone(to)
178
+ };
179
+ }
180
+ __name(diff, "diff");
181
+ function patchAttributes(el, patches) {
182
+ if (patches.length !== 0)
183
+ for (const { type, name, value } of patches)
184
+ type === 5 ? el.removeAttribute(name) : type === 4 && el.setAttribute(name, value);
185
+ }
186
+ __name(patchAttributes, "patchAttributes");
187
+ function patch(parent, PATCH, child) {
188
+ return __async(this, null, function* () {
189
+ if (!PATCH) return;
190
+ let el;
191
+ switch (parent.nodeType === 9 ? (parent = parent.documentElement, el = parent) : child ? el = child : el = parent, PATCH.type) {
192
+ case 7:
193
+ return;
194
+ case 0: {
195
+ const { node } = PATCH;
196
+ parent.appendChild(node);
197
+ return;
198
+ }
199
+ case 1: {
200
+ if (!el)
201
+ return;
202
+ parent.removeChild(el);
203
+ return;
204
+ }
205
+ case 2: {
206
+ if (!el)
207
+ return;
208
+ const { node, value } = PATCH;
209
+ if (typeof value == "string") {
210
+ el.nodeValue = value;
211
+ return;
212
+ }
213
+ node && (el instanceof Element && node instanceof Element ? el.replaceWith(node) : el.parentNode && el.parentNode.replaceChild(node, el));
214
+ return;
215
+ }
216
+ case 3: {
217
+ if (!el || el.nodeType !== 1)
218
+ return;
219
+ const { attributes: attributes2, children: children2 } = PATCH;
220
+ patchAttributes(el, attributes2);
221
+ const elements = Array.from(el.childNodes);
222
+ yield Promise.all(
223
+ children2.map((child2, index) => patch(el, child2, elements[index]))
224
+ );
225
+ return;
226
+ }
227
+ case 6:
228
+ return;
229
+ }
230
+ });
231
+ }
232
+ __name(patch, "patch");
233
+ function morph(from, to) {
234
+ return __async(this, null, function* () {
235
+ const patches = diff(from, to);
236
+ return patch(document, patches);
237
+ });
238
+ }
239
+ __name(morph, "morph");
240
+ export {
241
+ ACTION_CREATE as A,
242
+ NODE_TYPE_ELEMENT as N,
243
+ NODE_TYPE_TEXT as a,
244
+ NODE_TYPE_COMMENT as b,
245
+ NODE_TYPE_DOCUMENT as c,
246
+ ACTION_REMOVE as d,
247
+ ACTION_REPLACE as e,
248
+ ACTION_UPDATE as f,
249
+ ACTION_SET_ATTR as g,
250
+ ACTION_REMOVE_ATTR as h,
251
+ ACTION_SKIP as i,
252
+ ACTION_PRESERVE as j,
253
+ diff as k,
254
+ morph as m,
255
+ patch as p
256
+ };
@@ -0,0 +1 @@
1
+ "use strict";var __defProp=Object.defineProperty;var __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())});const compare=__name(attr=>(from,to)=>from[`node${attr}`]===to[`node${attr}`],"compare"),same={name:compare("Name"),type:compare("Type"),value:compare("Value")};function hasPermanentParent(node){if(!node)return!1;let current=node;for(;current;){if(current.nodeType===1&&current.hasAttribute("data-preserve"))return!0;current=current.parentNode}return!1}__name(hasPermanentParent,"hasPermanentParent");function attributes(from,to){if(from.attributes.length===0&&to.attributes.length===0)return[];const patches=[],remove=new Map,update=new Map;for(const attr of from.attributes)remove.set(attr.name,attr.value);for(const attr of to.attributes){const fromAttr=remove.get(attr.name);attr.value===fromAttr?remove.delete(attr.name):(typeof fromAttr!="undefined"&&remove.delete(attr.name),update.set(attr.name,attr.value))}for(const attr of remove.keys())patches.push({type:5,name:attr});for(const[attr,value]of update.entries())patches.push({type:4,name:attr,value});return patches}__name(attributes,"attributes");function serialize(el,data=!0){let key=`${el.localName}`;for(const{name,value}of el.attributes)data&&name.startsWith("data-")||(key+=`[${name}=${value}]`);return key+=el.innerHTML,key}__name(serialize,"serialize");function getKey(el){switch(el.tagName){case"BASE":case"TITLE":return el.localName;case"META":{if(el.hasAttribute("name"))return`meta[name="${el.getAttribute("name")}"]`;if(el.hasAttribute("property"))return`meta[name="${el.getAttribute("property")}"]`;break}case"LINK":{if(el.hasAttribute("rel")&&el.hasAttribute("href"))return`link[rel="${el.getAttribute("rel")}"][href="${el.getAttribute("href")}"]`;if(el.hasAttribute("href"))return`link[href="${el.getAttribute("href")}"]`;break}}return serialize(el)}__name(getKey,"getKey");function cachebust(src){const[base,query=""]=src.split("?");return`${base}?t=${Date.now()}&${query.replace(/t=\d+/g,"")}`}__name(cachebust,"cachebust");function clone(node){if(node.nodeType===1&&node.hasAttribute("data-persist"))return node;if(node.nodeType===1&&node.localName==="script"){const script=document.createElement("script");for(let{name,value}of node.attributes)name==="src"&&(value=cachebust(value)),script.setAttribute(name,value);return script.innerHTML=node.innerHTML,script}return node.cloneNode(!0)}__name(clone,"clone");function uniqueChildren(from,to){if(from.children.length===0&&to.children.length===0)return[];const patches=[],remove=new Map,update=new Map,add=new Map;for(const child of from.children)remove.set(getKey(child),child);for(const child of to.children){const key=getKey(child),fromEl=remove.get(key);fromEl?serialize(child,!1)!==serialize(fromEl,!1)&&update.set(key,clone(child)):add.set(key,clone(child)),remove.delete(key)}for(const node of from.childNodes){if(node.nodeType===1){const key=getKey(node);if(remove.has(key)){patches.push({type:1});continue}else if(update.has(key)){const nodeTo=update.get(key);patches.push({type:3,attributes:attributes(node,nodeTo),children:children(node,nodeTo)});continue}}patches.push(void 0)}for(const node of add.values())patches.push({type:0,node:clone(node)});return patches}__name(uniqueChildren,"uniqueChildren");function children(from,to){const patches=[],len=Math.max(from.childNodes.length,to.childNodes.length);for(let i=0;i<len;i++){const a=from.childNodes.item(i),b=to.childNodes.item(i);hasPermanentParent(a)||hasPermanentParent(b)?patches[i]={type:7}:patches[i]=diff(a,b)}return patches}__name(children,"children");function diff(from,to){if(hasPermanentParent(from)||hasPermanentParent(to))return{type:7};if(!from)return{type:0,node:clone(to)};if(!to)return hasPermanentParent(from)?{type:7}:{type:1};if(same.type(from,to)){if(from.nodeType===3){const a=from.nodeValue,b=to.nodeValue;if((a==null?void 0:a.trim().length)===0&&(b==null?void 0:b.trim().length)===0)return{type:6}}if(from.nodeType===1){if(same.name(from,to)){const childFn=from.tagName==="HEAD"?uniqueChildren:children;return{type:3,attributes:attributes(from,to),children:childFn(from,to)}}return{type:2,node:clone(to)}}else return from.nodeType===9?diff(from.documentElement,to.documentElement):same.value(from,to)?{type:6}:{type:2,value:to.nodeValue}}return{type:2,node:clone(to)}}__name(diff,"diff");function patchAttributes(el,patches){if(patches.length!==0)for(const{type,name,value}of patches)type===5?el.removeAttribute(name):type===4&&el.setAttribute(name,value)}__name(patchAttributes,"patchAttributes");function patch(parent,PATCH,child){return __async(this,null,function*(){if(!PATCH)return;let el;switch(parent.nodeType===9?(parent=parent.documentElement,el=parent):child?el=child:el=parent,PATCH.type){case 7:return;case 0:{const{node}=PATCH;parent.appendChild(node);return}case 1:{if(!el)return;parent.removeChild(el);return}case 2:{if(!el)return;const{node,value}=PATCH;if(typeof value=="string"){el.nodeValue=value;return}node&&(el instanceof Element&&node instanceof Element?el.replaceWith(node):el.parentNode&&el.parentNode.replaceChild(node,el));return}case 3:{if(!el||el.nodeType!==1)return;const{attributes:attributes2,children:children2}=PATCH;patchAttributes(el,attributes2);const elements=Array.from(el.childNodes);yield Promise.all(children2.map((child2,index)=>patch(el,child2,elements[index])));return}case 6:return}})}__name(patch,"patch");function morph(from,to){return __async(this,null,function*(){const patches=diff(from,to);return patch(document,patches)})}__name(morph,"morph");exports.ACTION_CREATE=0;exports.ACTION_PRESERVE=7;exports.ACTION_REMOVE=1;exports.ACTION_REMOVE_ATTR=5;exports.ACTION_REPLACE=2;exports.ACTION_SET_ATTR=4;exports.ACTION_SKIP=6;exports.ACTION_UPDATE=3;exports.NODE_TYPE_COMMENT=8;exports.NODE_TYPE_DOCUMENT=9;exports.NODE_TYPE_ELEMENT=1;exports.NODE_TYPE_TEXT=3;exports.diff=diff;exports.morph=morph;exports.patch=patch;
@@ -1,4 +1,4 @@
1
- "use strict";var wt=r=>{throw TypeError(r)};var Ge=(r,s,e)=>s.has(r)||wt("Cannot "+e);var t=(r,s,e)=>(Ge(r,s,"read from private field"),e?e.call(r):s.get(r)),o=(r,s,e)=>s.has(r)?wt("Cannot add the same private member more than once"):s instanceof WeakSet?s.add(r):s.set(r,e),c=(r,s,e,i)=>(Ge(r,s,"write to private field"),i?i.call(r,e):s.set(r,e),e),l=(r,s,e)=>(Ge(r,s,"access private method"),e);const p=require("../index-OE2INULi.cjs");require("construct-style-sheets-polyfill");require("../ticker/index.cjs");const m=require("../Store-Blf4msDz.cjs"),Yt=require("../file-DSpfWdd9.cjs"),Gt=require("../function-MthRj-GJ.cjs"),St=require("../gestures-C7gbKx11.cjs"),Ut=require("../connector/index.cjs"),pe=require("../string-DUXXtU8v.cjs"),bt=require("../object-baN9pgbU.cjs"),Xt=require("../Viewport-BxCr0GlB.cjs"),Qt=require("../math-GDWEqu7y.cjs"),jt=require("../number-ChAm68cm.cjs"),vt=require("../polyfills-Df4r-ETT.cjs"),yt=require("../element-resizer/index.cjs"),es=require("../style-At6aDoqG.cjs"),ts=new Set(["animate","animateMotion","animateTransform","circle","clipPath","defs","desc","ellipse","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","filter","foreignObject","g","image","line","linearGradient","listener","marker","mask","metadata","mpath","path","pattern","polygon","polyline","radialGradient","rect","set","solidColor","stop","svg","switch","symbol","text","textPath","title","tspan","view","use"]);var d,B,S,we,I,H,a,kt,Et,xt,Ue,Xe,Ct,Tt,Lt,zt,Qe,je,Rt,et,tt,Mt,st,qe,it,nt,ot,Ke,Oe;const Ze=class Ze{constructor(...s){o(this,a);o(this,d,null);o(this,B,new Set);o(this,S,new Set);o(this,we);o(this,I);o(this,H);o(this,Ke,s=>{t(this,B).forEach(e=>{e(s)}),t(this,B).clear()});o(this,Oe,(s,e)=>{t(this,S).forEach(i=>{i(s,e)}),t(this,S).clear(),l(this,a,tt).call(this)});if(p.isBrowser){const e=s[0],i=s[1];c(this,d,l(this,a,kt).call(this,e,i==null?void 0:i.forceSvg)),l(this,a,xt).call(this,i)}}get node(){return t(this,d)}set node(s){var e;l(this,a,tt).call(this),c(this,d,s),(e=t(this,we))==null||e.call(this),t(this,d)instanceof Element&&c(this,I,[...t(this,d).querySelectorAll("store-root")]),l(this,a,et).call(this),l(this,a,Ue).call(this)}};d=new WeakMap,B=new WeakMap,S=new WeakMap,we=new WeakMap,I=new WeakMap,H=new WeakMap,a=new WeakSet,kt=function(s,e){let i=null;if(s instanceof Node)i=s;else if(typeof s=="string")if(!s.includes("<")&&s.includes("-"))i=new(customElements.get(s));else if(s.includes("<")){const n=document.createElement("div");n.innerHTML=s,i=n.firstElementChild}else ts.has(s)||e?i=document.createElementNS("http://www.w3.org/2000/svg",s):i=document.createElement(s);else i=document.createElement("div");return i},Et=function(s){return s instanceof HTMLElement||s instanceof SVGElement},xt=function(s){if(!s)return;const e=l(this,a,Et).call(this,t(this,d)),i=s.ref;delete s.ref,s!=null&&s.onConnect&&(t(this,B).add(s.onConnect),delete s.onConnect),s!=null&&s.onDisconnect&&(t(this,S).add(s.onDisconnect),delete s.onDisconnect);let n,h;for(const u in s){const g=s[u];u==="class"&&e?l(this,a,Xe).call(this,g):u==="style"&&e?l(this,a,Lt).call(this,g):u==="lightChildren"?l(this,a,qe).call(this,t(this,d),g):u==="children"?l(this,a,qe).call(this,t(this,d)instanceof Element?t(this,d).shadowRoot||t(this,d):t(this,d),g):u==="connectedClass"?t(this,B).add(()=>{requestAnimationFrame(()=>{t(this,d).classList.add(typeof g=="boolean"?"connected":g)})}):u.startsWith("on")?(h||(h={}),h[u]=g):(n||(n={}),n[u]=g)}l(this,a,Mt).call(this,n),l(this,a,Rt).call(this,h),i&&(typeof i=="function"?i(t(this,d)):i.current=t(this,d)),l(this,a,Ue).call(this)},Ue=function(){if(p.isBrowser&&(t(this,S).size||t(this,B).size)){const s=t(this,d)instanceof DocumentFragment?t(this,d).firstChild:t(this,d);c(this,we,Ut.connector.subscribe(s,{connectCallback:t(this,Ke),disconnectCallback:t(this,Oe),unsubscribeAfterDisconnect:!0,maxWaitSec:20}))}},Xe=function(s){if(s){if(typeof s=="string")t(this,d).classList.add(s);else if(Array.isArray(s))s.forEach(e=>{e&&l(this,a,Xe).call(this,e)});else if(typeof s=="object")if(s instanceof m.Store)l(this,a,Ct).call(this,s);else for(const e in s){const i=s[e];i instanceof m.Store?l(this,a,Tt).call(this,e,i):i?t(this,d).classList.add(e):t(this,d).classList.remove(e)}}else return},Ct=function(s){t(this,S).add(s.subscribe(({current:e,previous:i})=>{i&&[i].flat().forEach(n=>{n&&t(this,d).classList.remove(n)}),e&&[e].flat().forEach(n=>{n&&t(this,d).classList.add(n)})}))},Tt=function(s,e){t(this,S).add(e.subscribe(({current:i})=>{i?t(this,d).classList.add(s):t(this,d).classList.remove(s)}))},Lt=function(s){if(!s)return;t(this,d).tagName==="style"||t(this,d).tagName==="STYLE"?l(this,a,Qe).call(this,s):l(this,a,zt).call(this,s)},zt=function(s){for(const e in s){const i=e,n=s[i];n instanceof m.Store?t(this,S).add(n.subscribe(({current:h})=>{l(this,a,je).call(this,i,h)})):l(this,a,je).call(this,i,n)}},Qe=function(s){for(const e in s){const i=s[e];if(typeof i=="object"&&!(i instanceof m.Store))t(this,d).appendChild(document.createTextNode(`${e} {`)),l(this,a,Qe).call(this,i),t(this,d).appendChild(document.createTextNode("}"));else if(i instanceof m.Store){const n=document.createTextNode("");t(this,S).add(i.subscribe(h=>{h.current?n.nodeValue=`${pe.camelToKebab(e)}: ${h.current};`:n.nodeValue=""})),t(this,d).appendChild(n)}else t(this,d).appendChild(document.createTextNode(`${pe.camelToKebab(e)}: ${i};`))}},je=function(s,e){s.includes("--")?e?t(this,d).style.setProperty(s,e.toString()):t(this,d).style.removeProperty(s):e?t(this,d).style[s]=e.toString():t(this,d).style[s]=""},Rt=function(s){if(s){t(this,H)||c(this,H,[]);for(const e in s){const i=e,n=pe.uncapitalize(i.split("on").slice(1).join("on")),h=s[i];typeof h=="object"?t(this,H).push({name:n,callback:h.callback,options:h.options}):typeof h=="function"&&t(this,H).push({name:n,callback:h})}l(this,a,et).call(this)}},et=function(){var s;(s=t(this,H))==null||s.forEach(e=>{t(this,d).addEventListener(e.name,e.callback,e.options)})},tt=function(){var s;(s=t(this,H))==null||s.forEach(e=>{t(this,d).removeEventListener(e.name,e.callback,e.options)})},Mt=function(s){for(const e in s){const i=s[e];i instanceof m.Store?t(this,S).add(i.subscribe(({current:n})=>{l(this,a,st).call(this,e,n)})):l(this,a,st).call(this,e,i)}},st=function(s,e){var n,h;const i=t(this,d);if(s in i&&!((h=(n=i.constructor)==null?void 0:n.observedAttributes)!=null&&h.includes(s)))e!=null&&(i[s]=e.toString());else if(e!=null){const u=e.toString();s.includes("xlink")?i.setAttributeNS("http://www.w3.org/1999/xlink",s,u):i.setAttribute(s,u)}},qe=function(s,e){e&&(e=[e].flat(),e.forEach(i=>{if(i instanceof m.Store){const n=document.createElement("div");n.style.display="contents",s.appendChild(n),t(this,I)||c(this,I,[]);const h=t(this,I).length;n.setAttribute("store-root",""),t(this,I).push(n),t(this,S).add(i.subscribe(({current:u,previous:g})=>{const E=t(this,I)[h];E.dispatchEvent(new CustomEvent("beforeChildrenChange",{bubbles:!0,composed:!0}));const L=Array.from(E.childNodes),y=Array.isArray(u)?u:[u],ge=Array.isArray(g)?g:[g],De=[],C=[];L.length&&ge.forEach((F,P)=>{y.includes(F)?C.push(F):De.push(L[P])}),y.forEach((F,P)=>{if(C[P]!=null){if(F!==C[P]){const V=l(this,a,nt).call(this,F),Z=L[P];V instanceof Node&&!Z.isEqualNode(V)?E.replaceChild(V,Z):E.removeChild(Z)}}else{const V=l(this,a,nt).call(this,F);V instanceof Node&&n.appendChild(V)}}),De.forEach(F=>{E.removeChild(F)}),E.dispatchEvent(new CustomEvent("afterChildrenChange",{bubbles:!0,composed:!0}))}))}else if(i instanceof Ze)l(this,a,it).call(this,s,i.node);else if(i instanceof Function)l(this,a,qe).call(this,s,bt.isESClass(i)?new i:i());else{const n=l(this,a,ot).call(this,i);n instanceof Node&&l(this,a,it).call(this,s,n)}}))},it=function(s,e){!(s instanceof ShadowRoot)&&e instanceof HTMLElement&&e.tagName==="STYLE"?(t(this,B).add(()=>{[...document.head.querySelectorAll("style")].find(n=>n.outerHTML===e.outerHTML)||document.head.appendChild(e)}),t(this,S).add(()=>{e.remove()})):s.appendChild(e)},nt=function(s){return s instanceof Ze?s.node:typeof s=="function"?bt.isESClass(s)?new s:s():l(this,a,ot).call(this,s)},ot=function(s){if(s instanceof Node)return s;if(s!=null){const e=String(s);if(e.trim().startsWith("<")&&e.trim().endsWith(">")){const i=document.createElement("div");return i.innerHTML=e,i.firstElementChild}else return document.createTextNode(e)}else return},Ke=new WeakMap,Oe=new WeakMap;let N=Ze;function w(...r){return new N(...r)}function ss(r){return new N("a",r)}function Q(r){return new N("button",r)}function v(r){return new N("div",r)}function He(r){return new N("input",r)}function At(r){return new N("label",r)}function ue(r){return new N("slot",r)}function rt(r){return new N("span",r)}function Nt(r){return new N("style",{style:r})}function x(r){const s=new CSSStyleSheet;return s.replaceSync(Nt(r).node.innerHTML),s}function is(r,s){const e=s==null?void 0:s.prefix,i={style:{}};for(const n in r)i[n]={var:`var(--${e}${pe.camelToKebab(n)})`,value:r[n]},i.style[`--${e}${pe.camelToKebab(n)}`]=r[n];return i}const f=is({colorMain:"#1c1c1c",colorMainAux:"#282828",colorFont:"#ffffff",colorActive:"#00E5B0",borderRadius:"12px",borderRadiusSmall:"4px"},{prefix:"aptechka-"});if(p.isBrowser){const r=Nt({":root":f.style}).node;r.setAttribute("data-permanent",""),document.head.appendChild(r)}const Ft='<svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 24 24"><path fill-rule="evenodd" d="M20.536 3.464C19.07 2 16.714 2 12 2C7.286 2 4.929 2 3.464 3.464C2 4.93 2 7.286 2 12c0 4.714 0 7.071 1.464 8.535C4.93 22 7.286 22 12 22c4.714 0 7.071 0 8.535-1.465C22 19.072 22 16.714 22 12s0-7.071-1.465-8.536M16.75 12a.75.75 0 0 1-.75.75H9.81l1.72 1.72a.75.75 0 1 1-1.06 1.06l-3-3a.75.75 0 0 1 0-1.06l3-3a.75.75 0 1 1 1.06 1.06l-1.72 1.72H16a.75.75 0 0 1 .75.75" clip-rule="evenodd"/></svg>',$t='<svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 24 24"><path d="M15.24 2h-3.894c-1.764 0-3.162 0-4.255.148c-1.126.152-2.037.472-2.755 1.193c-.719.721-1.038 1.636-1.189 2.766C3 7.205 3 8.608 3 10.379v5.838c0 1.508.92 2.8 2.227 3.342c-.067-.91-.067-2.185-.067-3.247v-5.01c0-1.281 0-2.386.118-3.27c.127-.948.413-1.856 1.147-2.593c.734-.737 1.639-1.024 2.583-1.152c.88-.118 1.98-.118 3.257-.118h3.07c1.276 0 2.374 0 3.255.118A3.601 3.601 0 0 0 15.24 2Z"/><path d="M6.6 11.397c0-2.726 0-4.089.844-4.936c.843-.847 2.2-.847 4.916-.847h2.88c2.715 0 4.073 0 4.917.847c.843.847.843 2.21.843 4.936v4.82c0 2.726 0 4.089-.843 4.936c-.844.847-2.202.847-4.917.847h-2.88c-2.715 0-4.073 0-4.916-.847c-.844-.847-.844-2.21-.844-4.936v-4.82Z"/></svg>',ns='<svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 24 24"><path fill-rule="evenodd" d="M2 12c0-4.714 0-7.071 1.464-8.536C4.93 2 7.286 2 12 2c4.714 0 7.071 0 8.535 1.464C22 4.93 22 7.286 22 12c0 4.714 0 7.071-1.465 8.535C19.072 22 16.714 22 12 22s-7.071 0-8.536-1.465C2 19.072 2 16.714 2 12Zm10-5.75a.75.75 0 0 1 .75.75v5.19l1.72-1.72a.75.75 0 1 1 1.06 1.06l-3 3a.75.75 0 0 1-1.06 0l-3-3a.75.75 0 1 1 1.06-1.06l1.72 1.72V7a.75.75 0 0 1 .75-.75Zm-4 10a.75.75 0 0 0 0 1.5h8a.75.75 0 0 0 0-1.5H8Z" clip-rule="evenodd"/></svg>',os='<svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 24 24"><path fill-rule="evenodd" d="M2 12c0-4.714 0-7.071 1.464-8.536C4.93 2 7.286 2 12 2c4.714 0 7.071 0 8.535 1.464C22 4.93 22 7.286 22 12c0 4.714 0 7.071-1.465 8.535C19.072 22 16.714 22 12 22s-7.071 0-8.536-1.465C2 19.072 2 16.714 2 12Zm10 5.75a.75.75 0 0 0 .75-.75v-5.19l1.72 1.72a.75.75 0 1 0 1.06-1.06l-3-3a.75.75 0 0 0-1.06 0l-3 3a.75.75 0 1 0 1.06 1.06l1.72-1.72V17c0 .414.336.75.75.75Zm-4-10a.75.75 0 0 1 0-1.5h8a.75.75 0 0 1 0 1.5H8Z" clip-rule="evenodd"/></svg>',Pt=`<svg
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);const intersector_index=require("../index-BpO2RJ__.cjs");require("construct-style-sheets-polyfill");require("../ticker/index.cjs");const Store=require("../Store-BCW70G3Z.cjs"),file=require("../file-RHfA3OS-.cjs"),_function=require("../function-H4b_gTg6.cjs"),gestures=require("../gestures-DtYbQr49.cjs"),connector_index=require("../connector/index.cjs"),string=require("../string-CbRNzmd9.cjs"),object=require("../object-DTY_W6xG.cjs"),Viewport=require("../Viewport-CXGKUyDy.cjs"),math=require("../math-C-knY2TL.cjs"),number=require("../number-Bu4sGvW7.cjs"),polyfills=require("../polyfills-DZCuDBkA.cjs"),elementResizer_index=require("../element-resizer/index.cjs"),style$1=require("../style-IDJ6db6n.cjs"),knownSvgTags=new Set(["animate","animateMotion","animateTransform","circle","clipPath","defs","desc","ellipse","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","filter","foreignObject","g","image","line","linearGradient","listener","marker","mask","metadata","mpath","path","pattern","polygon","polyline","radialGradient","rect","set","solidColor","stop","svg","switch","symbol","text","textPath","title","tspan","view","use"]);var _node,_connectCallbacks,_disconnectCallbacks,_connectorUnsubscribeCallback,_storeRootElements,_events,_ElementConstructor_instances,createNode_fn,isSvgOrHtmlElement_fn,applyProperties_fn,watchNode_fn,createClassList_fn,manageStringStoreClass_fn,manageBooleanStoreClass_fn,createStyle_fn,createAttributeStyle_fn,createJSSStyle_fn,setStyleProperty_fn,createEvents_fn,attachEvents_fn,detachEvents_fn,createAttributes_fn,setAttribute_fn,createChildren_fn,appendChild_fn,getNode_fn,getOrCreateNode_fn,_connect,_disconnect;const _ElementConstructor=class _ElementConstructor{constructor(...args){__privateAdd(this,_ElementConstructor_instances);__privateAdd(this,_node,null);__privateAdd(this,_connectCallbacks,new Set);__privateAdd(this,_disconnectCallbacks,new Set);__privateAdd(this,_connectorUnsubscribeCallback);__privateAdd(this,_storeRootElements);__privateAdd(this,_events);__privateAdd(this,_connect,__name(node=>{__privateGet(this,_connectCallbacks).forEach(callback=>{callback(node)}),__privateGet(this,_connectCallbacks).clear()},"#connect"));__privateAdd(this,_disconnect,__name((node,expired)=>{__privateGet(this,_disconnectCallbacks).forEach(callback=>{callback(node,expired)}),__privateGet(this,_disconnectCallbacks).clear(),__privateMethod(this,_ElementConstructor_instances,detachEvents_fn).call(this)},"#disconnect"));if(intersector_index.isBrowser){const p1=args[0],p2=args[1];__privateSet(this,_node,__privateMethod(this,_ElementConstructor_instances,createNode_fn).call(this,p1,p2==null?void 0:p2.forceSvg)),__privateMethod(this,_ElementConstructor_instances,applyProperties_fn).call(this,p2)}}get node(){return __privateGet(this,_node)}set node(v){var _a;__privateMethod(this,_ElementConstructor_instances,detachEvents_fn).call(this),__privateSet(this,_node,v),(_a=__privateGet(this,_connectorUnsubscribeCallback))==null||_a.call(this),__privateGet(this,_node)instanceof Element&&__privateSet(this,_storeRootElements,[...__privateGet(this,_node).querySelectorAll("store-root")]),__privateMethod(this,_ElementConstructor_instances,attachEvents_fn).call(this),__privateMethod(this,_ElementConstructor_instances,watchNode_fn).call(this)}};_node=new WeakMap,_connectCallbacks=new WeakMap,_disconnectCallbacks=new WeakMap,_connectorUnsubscribeCallback=new WeakMap,_storeRootElements=new WeakMap,_events=new WeakMap,_ElementConstructor_instances=new WeakSet,createNode_fn=__name(function(value,forceSvg){let node=null;if(value instanceof Node)node=value;else if(typeof value=="string")if(!value.includes("<")&&value.includes("-"))node=new(customElements.get(value));else if(value.includes("<")){const wrapper=document.createElement("div");wrapper.innerHTML=value,node=wrapper.firstElementChild}else knownSvgTags.has(value)||forceSvg?node=document.createElementNS("http://www.w3.org/2000/svg",value):node=document.createElement(value);else node=document.createElement("div");return node},"#createNode"),isSvgOrHtmlElement_fn=__name(function(node){return node instanceof HTMLElement||node instanceof SVGElement},"#isSvgOrHtmlElement"),applyProperties_fn=__name(function(properties){if(!properties)return;const isSvgOrHtml=__privateMethod(this,_ElementConstructor_instances,isSvgOrHtmlElement_fn).call(this,__privateGet(this,_node)),ref=properties.ref;delete properties.ref,properties!=null&&properties.onConnect&&(__privateGet(this,_connectCallbacks).add(properties.onConnect),delete properties.onConnect),properties!=null&&properties.onDisconnect&&(__privateGet(this,_disconnectCallbacks).add(properties.onDisconnect),delete properties.onDisconnect);let attributes,events;for(const propertyName in properties){const value=properties[propertyName];propertyName==="class"&&isSvgOrHtml?__privateMethod(this,_ElementConstructor_instances,createClassList_fn).call(this,value):propertyName==="style"&&isSvgOrHtml?__privateMethod(this,_ElementConstructor_instances,createStyle_fn).call(this,value):propertyName==="lightChildren"?__privateMethod(this,_ElementConstructor_instances,createChildren_fn).call(this,__privateGet(this,_node),value):propertyName==="children"?__privateMethod(this,_ElementConstructor_instances,createChildren_fn).call(this,__privateGet(this,_node)instanceof Element?__privateGet(this,_node).shadowRoot||__privateGet(this,_node):__privateGet(this,_node),value):propertyName==="connectedClass"?__privateGet(this,_connectCallbacks).add(()=>{requestAnimationFrame(()=>{__privateGet(this,_node).classList.add(typeof value=="boolean"?"connected":value)})}):propertyName.startsWith("on")?(events||(events={}),events[propertyName]=value):(attributes||(attributes={}),attributes[propertyName]=value)}__privateMethod(this,_ElementConstructor_instances,createAttributes_fn).call(this,attributes),__privateMethod(this,_ElementConstructor_instances,createEvents_fn).call(this,events),ref&&(typeof ref=="function"?ref(__privateGet(this,_node)):ref.current=__privateGet(this,_node)),__privateMethod(this,_ElementConstructor_instances,watchNode_fn).call(this)},"#applyProperties"),watchNode_fn=__name(function(){if(intersector_index.isBrowser&&(__privateGet(this,_disconnectCallbacks).size||__privateGet(this,_connectCallbacks).size)){const watchNode=__privateGet(this,_node)instanceof DocumentFragment?__privateGet(this,_node).firstChild:__privateGet(this,_node);__privateSet(this,_connectorUnsubscribeCallback,connector_index.connector.subscribe(watchNode,{connectCallback:__privateGet(this,_connect),disconnectCallback:__privateGet(this,_disconnect),unsubscribeAfterDisconnect:!0,maxWaitSec:20}))}},"#watchNode"),createClassList_fn=__name(function(classObject){if(classObject){if(typeof classObject=="string")__privateGet(this,_node).classList.add(classObject);else if(Array.isArray(classObject))classObject.forEach(v=>{v&&__privateMethod(this,_ElementConstructor_instances,createClassList_fn).call(this,v)});else if(typeof classObject=="object")if(classObject instanceof Store.Store)__privateMethod(this,_ElementConstructor_instances,manageStringStoreClass_fn).call(this,classObject);else for(const className in classObject){const isActive=classObject[className];isActive instanceof Store.Store?__privateMethod(this,_ElementConstructor_instances,manageBooleanStoreClass_fn).call(this,className,isActive):isActive?__privateGet(this,_node).classList.add(className):__privateGet(this,_node).classList.remove(className)}}else return},"#createClassList"),manageStringStoreClass_fn=__name(function(store){__privateGet(this,_disconnectCallbacks).add(store.subscribe(({current,previous})=>{previous&&[previous].flat().forEach(v=>{v&&__privateGet(this,_node).classList.remove(v)}),current&&[current].flat().forEach(v=>{v&&__privateGet(this,_node).classList.add(v)})}))},"#manageStringStoreClass"),manageBooleanStoreClass_fn=__name(function(className,store){__privateGet(this,_disconnectCallbacks).add(store.subscribe(({current})=>{current?__privateGet(this,_node).classList.add(className):__privateGet(this,_node).classList.remove(className)}))},"#manageBooleanStoreClass"),createStyle_fn=__name(function(object2){if(!object2)return;__privateGet(this,_node).tagName==="style"||__privateGet(this,_node).tagName==="STYLE"?__privateMethod(this,_ElementConstructor_instances,createJSSStyle_fn).call(this,object2):__privateMethod(this,_ElementConstructor_instances,createAttributeStyle_fn).call(this,object2)},"#createStyle"),createAttributeStyle_fn=__name(function(object2){for(const k in object2){const token=k,value=object2[token];value instanceof Store.Store?__privateGet(this,_disconnectCallbacks).add(value.subscribe(({current})=>{__privateMethod(this,_ElementConstructor_instances,setStyleProperty_fn).call(this,token,current)})):__privateMethod(this,_ElementConstructor_instances,setStyleProperty_fn).call(this,token,value)}},"#createAttributeStyle"),createJSSStyle_fn=__name(function(object2){for(const key in object2){const value=object2[key];if(typeof value=="object"&&!(value instanceof Store.Store))__privateGet(this,_node).appendChild(document.createTextNode(`${key} {`)),__privateMethod(this,_ElementConstructor_instances,createJSSStyle_fn).call(this,value),__privateGet(this,_node).appendChild(document.createTextNode("}"));else if(value instanceof Store.Store){const text=document.createTextNode("");__privateGet(this,_disconnectCallbacks).add(value.subscribe(e=>{e.current?text.nodeValue=`${string.camelToKebab(key)}: ${e.current};`:text.nodeValue=""})),__privateGet(this,_node).appendChild(text)}else __privateGet(this,_node).appendChild(document.createTextNode(`${string.camelToKebab(key)}: ${value};`))}},"#createJSSStyle"),setStyleProperty_fn=__name(function(token,value){token.includes("--")?value?__privateGet(this,_node).style.setProperty(token,value.toString()):__privateGet(this,_node).style.removeProperty(token):value?__privateGet(this,_node).style[token]=value.toString():__privateGet(this,_node).style[token]=""},"#setStyleProperty"),createEvents_fn=__name(function(events){if(events){__privateGet(this,_events)||__privateSet(this,_events,[]);for(const k in events){const eventName=k,readyEventName=string.uncapitalize(eventName.split("on").slice(1).join("on")),listener=events[eventName];typeof listener=="object"?__privateGet(this,_events).push({name:readyEventName,callback:listener.callback,options:listener.options}):typeof listener=="function"&&__privateGet(this,_events).push({name:readyEventName,callback:listener})}__privateMethod(this,_ElementConstructor_instances,attachEvents_fn).call(this)}},"#createEvents"),attachEvents_fn=__name(function(){var _a;(_a=__privateGet(this,_events))==null||_a.forEach(event=>{__privateGet(this,_node).addEventListener(event.name,event.callback,event.options)})},"#attachEvents"),detachEvents_fn=__name(function(){var _a;(_a=__privateGet(this,_events))==null||_a.forEach(event=>{__privateGet(this,_node).removeEventListener(event.name,event.callback,event.options)})},"#detachEvents"),createAttributes_fn=__name(function(attributes){for(const attributeName in attributes){const value=attributes[attributeName];value instanceof Store.Store?__privateGet(this,_disconnectCallbacks).add(value.subscribe(({current})=>{__privateMethod(this,_ElementConstructor_instances,setAttribute_fn).call(this,attributeName,current)})):__privateMethod(this,_ElementConstructor_instances,setAttribute_fn).call(this,attributeName,value)}},"#createAttributes"),setAttribute_fn=__name(function(name,value){var _a,_b;const element2=__privateGet(this,_node);if(name in element2&&!((_b=(_a=element2.constructor)==null?void 0:_a.observedAttributes)!=null&&_b.includes(name)))value!=null&&(element2[name]=value.toString());else if(value!=null){const str=value.toString();name.includes("xlink")?element2.setAttributeNS("http://www.w3.org/1999/xlink",name,str):element2.setAttribute(name,str)}},"#setAttribute"),createChildren_fn=__name(function(root,children){children&&(children=[children].flat(),children.forEach(child=>{if(child instanceof Store.Store){const storeRootElement=document.createElement("div");storeRootElement.style.display="contents",root.appendChild(storeRootElement),__privateGet(this,_storeRootElements)||__privateSet(this,_storeRootElements,[]);const storeRootElementIndex=__privateGet(this,_storeRootElements).length;storeRootElement.setAttribute("store-root",""),__privateGet(this,_storeRootElements).push(storeRootElement),__privateGet(this,_disconnectCallbacks).add(child.subscribe(({current,previous})=>{const rootElement=__privateGet(this,_storeRootElements)[storeRootElementIndex];rootElement.dispatchEvent(new CustomEvent("beforeChildrenChange",{bubbles:!0,composed:!0}));const currentNodes=Array.from(rootElement.childNodes),currentItems=Array.isArray(current)?current:[current],previousItems=Array.isArray(previous)?previous:[previous],nodesToDelete=[],similarPreviousItems=[];currentNodes.length&&previousItems.forEach((previousItem,index)=>{currentItems.includes(previousItem)?similarPreviousItems.push(previousItem):nodesToDelete.push(currentNodes[index])}),currentItems.forEach((currentItem,index)=>{if(similarPreviousItems[index]!=null){if(currentItem!==similarPreviousItems[index]){const newNode=__privateMethod(this,_ElementConstructor_instances,getNode_fn).call(this,currentItem),currentNode=currentNodes[index];newNode instanceof Node&&!currentNode.isEqualNode(newNode)?rootElement.replaceChild(newNode,currentNode):rootElement.removeChild(currentNode)}}else{const newNode=__privateMethod(this,_ElementConstructor_instances,getNode_fn).call(this,currentItem);newNode instanceof Node&&storeRootElement.appendChild(newNode)}}),nodesToDelete.forEach(node=>{rootElement.removeChild(node)}),rootElement.dispatchEvent(new CustomEvent("afterChildrenChange",{bubbles:!0,composed:!0}))}))}else if(child instanceof _ElementConstructor)__privateMethod(this,_ElementConstructor_instances,appendChild_fn).call(this,root,child.node);else if(child instanceof Function)__privateMethod(this,_ElementConstructor_instances,createChildren_fn).call(this,root,object.isESClass(child)?new child:child());else{const childNodeOrUndefined=__privateMethod(this,_ElementConstructor_instances,getOrCreateNode_fn).call(this,child);childNodeOrUndefined instanceof Node&&__privateMethod(this,_ElementConstructor_instances,appendChild_fn).call(this,root,childNodeOrUndefined)}}))},"#createChildren"),appendChild_fn=__name(function(root,node){!(root instanceof ShadowRoot)&&node instanceof HTMLElement&&node.tagName==="STYLE"?(__privateGet(this,_connectCallbacks).add(()=>{[...document.head.querySelectorAll("style")].find(s=>s.outerHTML===node.outerHTML)||document.head.appendChild(node)}),__privateGet(this,_disconnectCallbacks).add(()=>{node.remove()})):root.appendChild(node)},"#appendChild"),getNode_fn=__name(function(child){return child instanceof _ElementConstructor?child.node:typeof child=="function"?object.isESClass(child)?new child:child():__privateMethod(this,_ElementConstructor_instances,getOrCreateNode_fn).call(this,child)},"#getNode"),getOrCreateNode_fn=__name(function(child){if(child instanceof Node)return child;if(child!=null){const str=String(child);if(str.trim().startsWith("<")&&str.trim().endsWith(">")){const wrapper=document.createElement("div");return wrapper.innerHTML=str,wrapper.firstElementChild}else return document.createTextNode(str)}else return},"#getOrCreateNode"),_connect=new WeakMap,_disconnect=new WeakMap,__name(_ElementConstructor,"ElementConstructor");let ElementConstructor=_ElementConstructor;function element(...args){return new ElementConstructor(...args)}__name(element,"element");function a(object2){return new ElementConstructor("a",object2)}__name(a,"a");function button(object2){return new ElementConstructor("button",object2)}__name(button,"button");function div(object2){return new ElementConstructor("div",object2)}__name(div,"div");function input(object2){return new ElementConstructor("input",object2)}__name(input,"input");function label(object2){return new ElementConstructor("label",object2)}__name(label,"label");function slot(object2){return new ElementConstructor("slot",object2)}__name(slot,"slot");function span(object2){return new ElementConstructor("span",object2)}__name(span,"span");function style(object2){return new ElementConstructor("style",{style:object2})}__name(style,"style");function createStylesheet(object2){const sheet=new CSSStyleSheet;return sheet.replaceSync(style(object2).node.innerHTML),sheet}__name(createStylesheet,"createStylesheet");function createTheme(object2,options){const prefix=options==null?void 0:options.prefix,result={style:{}};for(const key in object2)result[key]={var:`var(--${prefix}${string.camelToKebab(key)})`,value:object2[key]},result.style[`--${prefix}${string.camelToKebab(key)}`]=object2[key];return result}__name(createTheme,"createTheme");const aptechkaTheme=createTheme({colorMain:"#1c1c1c",colorMainAux:"#282828",colorFont:"#ffffff",colorActive:"#00E5B0",borderRadius:"12px",borderRadiusSmall:"4px"},{prefix:"aptechka-"});if(intersector_index.isBrowser){const styleNode=style({":root":aptechkaTheme.style}).node;styleNode.setAttribute("data-permanent",""),document.head.appendChild(styleNode)}const resetIcon='<svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 24 24"><path fill-rule="evenodd" d="M20.536 3.464C19.07 2 16.714 2 12 2C7.286 2 4.929 2 3.464 3.464C2 4.93 2 7.286 2 12c0 4.714 0 7.071 1.464 8.535C4.93 22 7.286 22 12 22c4.714 0 7.071 0 8.535-1.465C22 19.072 22 16.714 22 12s0-7.071-1.465-8.536M16.75 12a.75.75 0 0 1-.75.75H9.81l1.72 1.72a.75.75 0 1 1-1.06 1.06l-3-3a.75.75 0 0 1 0-1.06l3-3a.75.75 0 1 1 1.06 1.06l-1.72 1.72H16a.75.75 0 0 1 .75.75" clip-rule="evenodd"/></svg>',copyIcon='<svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 24 24"><path d="M15.24 2h-3.894c-1.764 0-3.162 0-4.255.148c-1.126.152-2.037.472-2.755 1.193c-.719.721-1.038 1.636-1.189 2.766C3 7.205 3 8.608 3 10.379v5.838c0 1.508.92 2.8 2.227 3.342c-.067-.91-.067-2.185-.067-3.247v-5.01c0-1.281 0-2.386.118-3.27c.127-.948.413-1.856 1.147-2.593c.734-.737 1.639-1.024 2.583-1.152c.88-.118 1.98-.118 3.257-.118h3.07c1.276 0 2.374 0 3.255.118A3.601 3.601 0 0 0 15.24 2Z"/><path d="M6.6 11.397c0-2.726 0-4.089.844-4.936c.843-.847 2.2-.847 4.916-.847h2.88c2.715 0 4.073 0 4.917.847c.843.847.843 2.21.843 4.936v4.82c0 2.726 0 4.089-.843 4.936c-.844.847-2.202.847-4.917.847h-2.88c-2.715 0-4.073 0-4.916-.847c-.844-.847-.844-2.21-.844-4.936v-4.82Z"/></svg>',downloadIcon='<svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 24 24"><path fill-rule="evenodd" d="M2 12c0-4.714 0-7.071 1.464-8.536C4.93 2 7.286 2 12 2c4.714 0 7.071 0 8.535 1.464C22 4.93 22 7.286 22 12c0 4.714 0 7.071-1.465 8.535C19.072 22 16.714 22 12 22s-7.071 0-8.536-1.465C2 19.072 2 16.714 2 12Zm10-5.75a.75.75 0 0 1 .75.75v5.19l1.72-1.72a.75.75 0 1 1 1.06 1.06l-3 3a.75.75 0 0 1-1.06 0l-3-3a.75.75 0 1 1 1.06-1.06l1.72 1.72V7a.75.75 0 0 1 .75-.75Zm-4 10a.75.75 0 0 0 0 1.5h8a.75.75 0 0 0 0-1.5H8Z" clip-rule="evenodd"/></svg>',uploadIcon='<svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 24 24"><path fill-rule="evenodd" d="M2 12c0-4.714 0-7.071 1.464-8.536C4.93 2 7.286 2 12 2c4.714 0 7.071 0 8.535 1.464C22 4.93 22 7.286 22 12c0 4.714 0 7.071-1.465 8.535C19.072 22 16.714 22 12 22s-7.071 0-8.536-1.465C2 19.072 2 16.714 2 12Zm10 5.75a.75.75 0 0 0 .75-.75v-5.19l1.72 1.72a.75.75 0 1 0 1.06-1.06l-3-3a.75.75 0 0 0-1.06 0l-3 3a.75.75 0 1 0 1.06 1.06l1.72-1.72V17c0 .414.336.75.75.75Zm-4-10a.75.75 0 0 1 0-1.5h8a.75.75 0 0 1 0 1.5H8Z" clip-rule="evenodd"/></svg>',arrowIcon=`<svg
2
2
  xmlns="http://www.w3.org/2000/svg"
3
3
  width="32"
4
4
  height="32"
@@ -6,13 +6,13 @@
6
6
  >
7
7
  <path d="m12.37 15.835l6.43-6.63C19.201 8.79 18.958 8 18.43 8H5.57c-.528 0-.771.79-.37 1.205l6.43 6.63c.213.22.527.22.74 0Z" />
8
8
  </svg>
9
- `;var W,z,D;class rs{constructor(){o(this,W);o(this,z);o(this,D);this.scrollValue=0,c(this,W,""),c(this,z,[]),c(this,D,{}),c(this,W,m.storeRegistry.name+"-tweaker")}openPanel(s){t(this,z).includes(s)||t(this,z).push(s)}closePanel(s){c(this,z,t(this,z).filter(e=>e!==s))}isPanelOpened(s){return t(this,z).includes(s)}changedSizes(s){return t(this,D)[s]}changeSize(s,e){e?t(this,D)[s]=e:delete t(this,D)[s]}save(){const s={openedPanels:t(this,z),changedSizes:t(this,D),scrollValue:this.scrollValue};localStorage.setItem(t(this,W),JSON.stringify(s)),m.storeRegistry.saveState()}load(){m.storeRegistry.loadState();const s=localStorage.getItem(t(this,W));if(s)try{const e=JSON.parse(s);e.openedPanels&&c(this,z,e.openedPanels),e.changedSizes&&c(this,D,e.changedSizes),e.scrollValue&&(this.scrollValue=e.scrollValue)}catch(e){console.error(e)}}}W=new WeakMap,z=new WeakMap,D=new WeakMap;const T=new rs,as='<svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 256 256"><path d="m243.33 90.91l-128.41 128.4a16 16 0 0 1-22.63 0l-71.62-72a16 16 0 0 1 0-22.61l24-24a16 16 0 0 1 22.57-.06l36.64 35.27l.11.11l92.73-91.37a16 16 0 0 1 22.58 0l24 23.56a16 16 0 0 1 .03 22.7Z"/></svg>',ls=x({":host":{position:"relative",display:"inline-block",width:"30px",height:"30px",borderRadius:f.borderRadiusSmall.var,overflow:"hidden"},"label, .fake":{display:"block"},"label, .fake, .default":{width:"100%",height:"100%"},".real":{position:"absolute",top:"0",left:"0",width:"0px",height:"0px",visibility:"hidden",margin:"0"},".default":{display:"flex",alignItems:"center",justifyContent:"center",backgroundColor:f.colorMainAux.var},".default svg":{width:"60%",height:"60%",fill:f.colorFont.var,opacity:0,transition:"var(--duration-short)"},":host(.checked) .default svg":{opacity:1}});var _,j,J,me;const gt=class gt extends HTMLElement{constructor(){super();o(this,J);o(this,_,null);o(this,j);const e=this.attachShadow({mode:"open"});e.adoptedStyleSheets=[...e.adoptedStyleSheets,ls],c(this,j,this.attachInternals()),w(this,{children:At({children:[rt({class:"fake",children:ue({children:[rt({class:"default",children:[as]})]})}),He({ref:i=>{c(this,_,i),i.required=this.hasAttribute("required"),i.value=this.getAttribute("value")||"",i.checked=this.hasAttribute("checked"),i.name=this.getAttribute("name")||"",l(this,J,me).call(this)},class:"real",type:"checkbox",onChange:()=>{l(this,J,me).call(this),this.dispatchEvent(new Event("change",{composed:!0}))}})]})})}get checked(){return t(this,_).checked}set checked(e){t(this,_).checked=e,l(this,J,me).call(this)}get value(){return t(this,_).value}set value(e){t(this,_).value=e,l(this,J,me).call(this)}};_=new WeakMap,j=new WeakMap,J=new WeakSet,me=function(){this.checked?t(this,j).setFormValue(this.value):t(this,j).setFormValue(null),this.classList.toggle("checked",this.checked)},gt.formAssociated=!0;let at=gt;p.isBrowser&&!customElements.get("e-checkbox")&&customElements.define("e-checkbox",at);var K;class fe extends HTMLElement{constructor(...e){super();o(this,K);c(this,K,e)}addStore(e){t(this,K).push(e)}get firstStore(){return t(this,K)[0]}get stores(){return t(this,K)}updateStores(e){t(this,K).forEach(i=>{i.current=e})}}K=new WeakMap;const hs=x({":host":{width:"100%",display:"inline-flex",height:"max-content"},"e-checkbox":{"--size":"calc(var(--height-input) * 0.8)",width:"var(--size)",height:"var(--size)",borderRadius:f.borderRadiusSmall.var}});class Bt extends fe{constructor(...s){super(...s);const e=this.attachShadow({mode:"open"});e.adoptedStyleSheets=[...e.adoptedStyleSheets,hs],w(this,{children:[w("e-checkbox",{onChange:i=>{this.updateStores(i.currentTarget.checked)},ref:i=>{this.firstStore.subscribe(n=>{i.checked=n.current})}})]})}}p.isBrowser&&!customElements.get("e-tweaker-boolean-manager")&&customElements.define("e-tweaker-boolean-manager",Bt);const cs=x({":host":{width:"100%",display:"inline-flex",height:"max-content"},input:{width:"100%",height:"var(--height-input)",padding:"0",background:"none",borderRadius:f.borderRadius.var,border:"none",blockSize:"unset"},"input::-webkit-color-swatch, input::-webkit-color-swatch-wrapper":{boxSizing:"border-box",padding:"0px",border:"none",borderRadius:f.borderRadius.var,height:"calc(var(--height-input) * 0.93)"}});class It extends fe{constructor(...s){super(...s);const e=this.attachShadow({mode:"open"});e.adoptedStyleSheets=[...e.adoptedStyleSheets,cs],w(this,{children:[He({type:"color",value:this.firstStore,onInput:i=>{this.updateStores(i.currentTarget.value)}})]})}}p.isBrowser&&!customElements.get("e-tweaker-color-manager")&&customElements.define("e-tweaker-color-manager",It);const ds=x({a:{color:"inherit",fontSize:"var(--font-size-small)"}});class Ht extends fe{constructor(...s){var i;super(...s);const e=this.attachShadow({mode:"open"});e.adoptedStyleSheets=[...e.adoptedStyleSheets,ds],w(this,{children:[ss({href:this.firstStore,target:(i=this.firstStore.__manager)!=null&&i.sameWindow?"_self":"_blank",children:this.firstStore})]})}}p.isBrowser&&!customElements.get("e-tweaker-link-manager")&&customElements.define("e-tweaker-link-manager",Ht);const us=x({":host":{width:"100%",display:"flex",alignItems:"center",gap:"var(--gap-small)"},".inputs-wrapper":{display:"grid",gap:"var(--gap-small)",width:"100%"},input:{boxSizing:"border-box",outline:"none",fontVariantNumeric:"tabular-nums",fontFamily:"inherit",color:"inherit",border:"none",fontSize:"var(--font-size-small)",width:"100%",height:"var(--height-input)",margin:"0",padding:"0 var(--gap-small)",backgroundColor:"rgba(255, 255, 255, 0.1)",borderRadius:f.borderRadius.var},".drag":{position:"relative",width:"100%",height:"calc(var(--height-input) * 0.2)",display:"flex",alignItems:"center"},".drag::before":{content:'""',position:"absolute",left:"0",width:"100%",zIndex:"-1",height:"1px",borderBottom:`1px solid ${f.colorFont.var}`,transform:"translateY(-50%)",opacity:"0.3"},":host(.infinite) .drag::before":{borderBottom:`1px dashed ${f.colorFont.var}`},".drag-knob":{"--size":"calc(var(--height-input) * 0.4)",width:"var(--size)",height:"var(--size)"},".drag-knob-inner":{width:"100%",height:"100%",backgroundColor:f.colorFont.var,borderRadius:f.borderRadiusSmall.var,transition:"opacity var(--duration-short)"},":host(.infinite) .grabbing .drag-knob-inner":{opacity:.3}});var Y,ee,te,q,O,be,ve,$,G,ye,Se,b,X,lt,ht,Ve,ke;class Dt extends fe{constructor(...e){var n,h,u,g;super(...e);o(this,b);o(this,Y,[]);o(this,ee,[]);o(this,te);o(this,q);o(this,O);o(this,be);o(this,ve);o(this,$);o(this,G,!1);o(this,ye,e=>{const i=l(this,b,X).call(this,e);return i.map((n,h)=>{const u=typeof n=="string"?parseFloat(n)||t(this,q):n,g=Qt.clamp(u,t(this,q),t(this,O)),E=jt.toStep(g,t(this,te));i[h]=E}),t(this,ve)==="number"?i[0]:i});o(this,Se,()=>{l(this,b,X).call(this).map((e,i)=>{const n=t(this,Y)[i];n&&(n.value=(e||0).toString())}),l(this,b,lt).call(this)});o(this,ke,()=>{l(this,b,lt).call(this)});const i=this.attachShadow({mode:"open"});i.adoptedStyleSheets=[...i.adoptedStyleSheets,us],c(this,q,vt.nullishCoalescing((n=this.firstStore.__manager)==null?void 0:n.min,-1/0)),c(this,O,vt.nullishCoalescing((h=this.firstStore.__manager)==null?void 0:h.max,1/0)),c(this,te,((u=this.firstStore.__manager)==null?void 0:u.step)||.01),c(this,be,((g=this.firstStore.__manager)==null?void 0:g.ease)||1),c(this,ve,Array.isArray(this.firstStore.current)?"array":"number"),c(this,$,isFinite(t(this,O))&&isFinite(t(this,q))),w(this,{class:t(this,$)?"":"infinite",children:l(this,b,X).call(this).map((E,L)=>v({class:"inputs-wrapper",children:[He({type:"number",step:t(this,te),min:t(this,q),max:t(this,O),ref:y=>t(this,Y).push(y),value:E,onChange:()=>{this.updateStores(t(this,Y).map(y=>parseFloat(y.value)))}}),v({class:"drag",children:[v({class:"drag-knob",ref:y=>t(this,ee).push(y),onPointerdown:y=>{y.preventDefault(),c(this,G,!0);const ge=l(this,b,X).call(this),De=ge[L],C=t(this,ee)[L],F=t(this,Y)[L];if(C&&F){const P=C.parentElement,V=l(this,b,ht).call(this);P.classList.add("grabbing"),St.setupDrag(Z=>{const pt=Z.x-y.x,Zt=t(this,$)?P.offsetWidth/(V||1):1,Wt=De+pt/Zt*t(this,be);if(ge[L]=Wt,!t(this,$)){const Jt=l(this,b,Ve).call(this,C,0);C.style.transform=`translateX(${Jt+pt}px)`}this.updateStores([...ge])},()=>{if(c(this,G,!1),!t(this,$)){const Z=l(this,b,Ve).call(this,C,0);C.style.transition="transform 0.1s",C.style.transform=`translateX(${Z}px)`,P.classList.remove("grabbing"),setTimeout(()=>{C.style.transition=""},100)}})}},children:v({class:"drag-knob-inner"})})]})]}))})}connectedCallback(){this.firstStore.addMiddleware(t(this,ye)),this.firstStore.subscribe(t(this,Se)),yt.elementResizer.subscribe(this,t(this,ke))}disconnectedCallback(){this.firstStore.removeMiddleware(t(this,ye)),this.firstStore.unsubscribe(t(this,Se)),yt.elementResizer.unsubscribe(t(this,ke))}}Y=new WeakMap,ee=new WeakMap,te=new WeakMap,q=new WeakMap,O=new WeakMap,be=new WeakMap,ve=new WeakMap,$=new WeakMap,G=new WeakMap,ye=new WeakMap,Se=new WeakMap,b=new WeakSet,X=function(e=this.firstStore.current){return Array.isArray(e)?e:[e]},lt=function(){l(this,b,X).call(this).map((e,i)=>{const n=t(this,ee)[i];if(n&&(!t(this,G)||t(this,G)&&t(this,$))){const h=l(this,b,Ve).call(this,n,e);n.style.transform=`translateX(${h}px)`}})},ht=function(){return t(this,$)?t(this,O)-t(this,q):0},Ve=function(e,i){const n=e.parentElement,h=l(this,b,ht).call(this),u=h?i/h:.5;return(n.offsetWidth-e.offsetWidth)*u},ke=new WeakMap;p.isBrowser&&!customElements.get("e-tweaker-number-manager")&&customElements.define("e-tweaker-number-manager",Dt);function qt(r){r.dispatchEvent(new CustomEvent("sizeChange",{bubbles:!0,composed:!0}))}function fs(r){r.dispatchEvent(new CustomEvent("beforeSizeChange",{bubbles:!0,composed:!0}))}const gs=x({":host":{position:"relative"},".head":{width:"100%",cursor:"default",background:"none",border:"none",color:"inherit",fontFamily:"inherit",fontSize:"inherit",fontWeight:"inherit",textAlign:"start",padding:"0",margin:"0"},".body":{boxSizing:"border-box",position:"var(--position, unset)",top:"100%",left:"0",width:"100%",overflow:"hidden",transitionDuration:"var(--duration, var(--duration-short))",transitionProperty:"height",cursor:"default"},".body-inner":{display:"grid",gap:"var(--gap, 0px)",width:"100%",paddingTop:"var(--gap, 0px)"}});var se,ie,R,U,ne,oe,We,Ee,dt;const mt=class mt extends HTMLElement{constructor(){super();o(this,Ee);o(this,se,null);o(this,ie,"");o(this,R,null);o(this,U,!1);o(this,ne);o(this,oe,null);o(this,We,()=>{qt(this)});if(p.isBrowser){const e=this.attachShadow({mode:"open"});e.adoptedStyleSheets=[...e.adoptedStyleSheets,gs],c(this,se,this.attachInternals()),c(this,oe,new ResizeObserver(t(this,We))),w(this,{children:[Q({class:"head",children:ue({name:"head"}),onClick:()=>{this.opened?this.close():this.open()}}),v({class:"body",style:{height:"0px"},children:v({class:"body-inner",children:ue()}),ref:i=>{c(this,R,i)}})]})}}get value(){return t(this,ie)}set value(e){c(this,ie,e),this.dispatchEvent(new Event("change",{bubbles:!0,composed:!0})),t(this,se).setFormValue(t(this,ie))}get internals(){return t(this,se)}get opened(){return t(this,U)}open(){clearTimeout(t(this,ne)),c(this,U,!0),t(this,R).style.display="grid",this.classList.add("triggered"),setTimeout(()=>{this.classList.add("opened"),t(this,R).style.height=t(this,R).scrollHeight+"px",l(this,Ee,dt).call(this)},0)}close(){c(this,U,!1),t(this,R).style.height="0px",this.classList.remove("opened"),l(this,Ee,dt).call(this),c(this,ne,setTimeout(()=>{this.classList.remove("triggered"),t(this,R).style.display="none"},es.getElementTransitionDurationMS(t(this,R))))}connectedCallback(){t(this,oe).observe(t(this,R))}disconnectedCallback(){clearTimeout(t(this,ne)),t(this,oe).disconnect()}};se=new WeakMap,ie=new WeakMap,R=new WeakMap,U=new WeakMap,ne=new WeakMap,oe=new WeakMap,We=new WeakMap,Ee=new WeakSet,dt=function(){fs(this),this.dispatchEvent(new CustomEvent("selectToggle",{bubbles:!0,composed:!0,detail:{opened:t(this,U)}}))},mt.formAssociated=!0;let ct=mt;p.isBrowser&&!customElements.get("e-select")&&customElements.define("e-select",ct);var xe;class Vt extends HTMLElement{constructor(){super(...arguments);o(this,xe,null)}get selectElement(){return t(this,xe)}connectedCallback(){var i,n;const e=(n=(i=this.assignedSlot)==null?void 0:i.getRootNode())==null?void 0:n.host;e?c(this,xe,e):console.log(this,"e-select not found")}}xe=new WeakMap;const ms=x({":host":{width:"100%",height:"40px",display:"inline-flex",alignItems:"center"}});var re,Ce,ut;class ps extends Vt{constructor(){super();o(this,Ce);o(this,re,()=>{this.selectElement.value===this.value?this.style.display="none":this.style.display=""});if(p.isBrowser){const e=this.attachShadow({mode:"open"});e.adoptedStyleSheets=[...e.adoptedStyleSheets,ms],w(this,{tabindex:0,onClick:()=>{l(this,Ce,ut).call(this)},onKeydown:i=>{i.code==="Space"&&l(this,Ce,ut).call(this)},children:ue()})}}get value(){return(this.hasAttribute("value")?this.getAttribute("value"):this.innerText)||""}connectedCallback(){super.connectedCallback(),this.hasAttribute("default")&&(this.selectElement.value||(this.selectElement.value=this.value)),this.selectElement.addEventListener("change",t(this,re)),setTimeout(()=>{t(this,re).call(this)})}disconnectedCallback(){this.selectElement.removeEventListener("change",t(this,re))}}re=new WeakMap,Ce=new WeakSet,ut=function(){this.selectElement.value=this.value,this.selectElement.close()};p.isBrowser&&!customElements.get("e-select-option")&&customElements.define("e-select-option",ps);const ws=x({":host":{width:"100%",height:"40px",display:"inline-flex",alignItems:"center",justifyContent:"space-between"},".default-arrow":{flexShrink:"0",width:"var(--arrow-size, 1em)",height:"var(--arrow-size, 1em)",fill:`var(--arrow-color, ${f.colorMain.var})`,transitionProperty:"transform",transitionDuration:"var(--duration, var(--duration-short))"},":host(.opened) .default-arrow":{transform:"scaleY(-1)"}});var Te,ae,Le;class bs extends Vt{constructor(){super();o(this,Te,null);o(this,ae,()=>{const i=this.selectElement.shadowRoot.querySelector(".body slot").assignedElements().find(n=>n.value===this.selectElement.value);i&&(t(this,Te).innerHTML=i.innerHTML)});o(this,Le,()=>{this.classList.toggle("opened",this.selectElement.opened)});if(p.isBrowser){const e=this.attachShadow({mode:"open"});e.adoptedStyleSheets=[...e.adoptedStyleSheets,ws],w(this,{children:[ue(),ue({name:"arrow",children:w(Pt,{class:"default-arrow"})})]}),this.slot="head"}}connectedCallback(){super.connectedCallback(),c(this,Te,this.querySelector("[data-value-holder]")||this),this.selectElement.addEventListener("change",t(this,ae)),t(this,ae).call(this),this.selectElement.addEventListener("selectToggle",t(this,Le))}disconnectedCallback(){this.selectElement.removeEventListener("change",t(this,ae)),this.selectElement.removeEventListener("selectToggle",t(this,Le))}}Te=new WeakMap,ae=new WeakMap,Le=new WeakMap;p.isBrowser&&!customElements.get("e-select-head")&&customElements.define("e-select-head",bs);const vs=x({"e-select":{display:"block",width:"100%","--arrow-color":f.colorFont.var},"e-select-head":{width:"100%",height:"var(--height-input)",display:"flex",alignItems:"center",justifyContent:"space-between",fontSize:"var(--font-size-small)"},"e-select-option":{height:"var(--height-input)",transitionDuration:"var(--duration-short)",transitionProperty:"color",fontSize:"var(--font-size-small)"},"e-select-option:hover":{color:f.colorActive.var},svg:{width:"16px",height:"16px",fill:f.colorFont.var,transitionProperty:"transform",transitionDuration:"var(--duration-short)"},".opened svg":{transform:"scaleY(-1)"}});class _t extends fe{constructor(...s){var n;super(...s);const e=this.attachShadow({mode:"open"});e.adoptedStyleSheets=[...e.adoptedStyleSheets,vs];const i=((n=this.firstStore.__manager)==null?void 0:n.variants)||[];w(this,{children:w("e-select",{value:this.firstStore,onChange:h=>{this.updateStores(h.currentTarget.value)},lightChildren:[w("e-select-head",{lightChildren:[rt({"data-value-holder":""})]}),...i.map((h,u)=>w("e-select-option",{lightChildren:h,default:u===0?!0:null}))]})})}}p.isBrowser&&!customElements.get("e-tweaker-select-manager")&&customElements.define("e-tweaker-select-manager",_t);const ys=x({":host":{width:"100%",display:"flex",alignItems:"center"},input:{boxSizing:"border-box",outline:"none",fontVariantNumeric:"tabular-nums",fontFamily:"inherit",color:"inherit",border:"none",fontSize:"var(--font-size-small)",height:"var(--height-input)",width:"100%",margin:"0",padding:"0 var(--gap-small)",backgroundColor:"rgba(255, 255, 255, 0.1)",borderRadius:f.borderRadius.var}});class Kt extends fe{constructor(...s){super(...s);const e=this.attachShadow({mode:"open"});e.adoptedStyleSheets=[...e.adoptedStyleSheets,ys],w(this,{children:[He({class:"text-input",type:"string",value:this.firstStore,onChange:i=>{this.updateStores(i.currentTarget.value)}})]})}}p.isBrowser&&!customElements.get("e-tweaker-string-manager")&&customElements.define("e-tweaker-string-manager",Kt);const Ss={boolean:Bt,color:It,link:Ht,number:Dt,select:_t,string:Kt},ks=x({":host":{display:"grid",gridAutoFlow:"column",gridTemplateColumns:"0.5fr 1fr",alignItems:"center",color:f.colorFont.var,gap:"var(--gap-medium)"},":host(.disabled)":{pointerEvents:"none",opacity:.5},".head":{fontSize:"var(--font-size-medium)",display:"flex",alignItems:"center",gap:"var(--gap-extra-small)"},".head-buttons":{display:"flex"},".head-button":{width:"14px",height:"14px",padding:"0",margin:"0",border:"none",background:"none",fill:f.colorFont.var,transitionDuration:"var(--duration-short)",transitionProperty:"fill, opacity",opacity:"0"},":host(:hover) .head-button":{opacity:"1"},".head-button:hover":{fill:f.colorActive.var},".head-button svg":{width:"100%",height:"100%"}});var M,le,he,ce,de,ze,Re;class ft extends HTMLElement{constructor(e){var h,u;super();o(this,M,[]);o(this,le);o(this,he);o(this,ce,!1);o(this,de);o(this,ze,()=>{m.activeStores.current.find(e=>t(this,M).includes(e))||this.remove()});o(this,Re,e=>{t(this,ce)&&((e.metaKey||e.ctrlKey)&&e.code==="KeyC"?navigator.clipboard.writeText(t(this,M)[0].current):(e.metaKey||e.ctrlKey)&&e.code==="KeyR"&&(t(this,M).forEach(i=>{i.reset()}),e.preventDefault()))});c(this,M,[e.store]),c(this,le,e.store.name),c(this,he,t(this,le).split(".").slice(-1).toString());const i=((h=e.store.__manager)==null?void 0:h.type)||"string";c(this,de,new Ss[i](t(this,M)[0]));const n=this.attachShadow({mode:"open"});n.adoptedStyleSheets=[...n.adoptedStyleSheets,ks],w(this,{class:{disabled:((u=e.store.__manager)==null?void 0:u.disabled)||!1},onPointerleave:()=>{c(this,ce,!1)},onPointerenter:()=>{c(this,ce,!0)},children:[v({class:"head",children:[v({class:"name",children:t(this,he)+":"}),v({class:"head-buttons",children:[Q({class:"head-button",children:$t,onClick:()=>{navigator.clipboard.writeText(t(this,M)[0].current)}}),Q({class:"head-button",children:Ft,onClick:()=>{t(this,M).forEach(g=>{g.reset()})}})]})]}),t(this,de)]})}get key(){return t(this,le)}get name(){return t(this,he)}get stores(){return t(this,M)}addStore(e){t(this,de).addStore(e)}connectedCallback(){m.activeStores.subscribe(t(this,ze)),addEventListener("keydown",t(this,Re)),qt(this)}disconnectedCallback(){m.activeStores.unsubscribe(t(this,ze)),removeEventListener("keydown",t(this,Re))}}M=new WeakMap,le=new WeakMap,he=new WeakMap,ce=new WeakMap,de=new WeakMap,ze=new WeakMap,Re=new WeakMap;p.isBrowser&&!customElements.get("e-tweaker-field")&&customElements.define("e-tweaker-field",ft);const Es=x({".wrapper":{boxSizing:"border-box",backgroundColor:"rgba(255, 255, 255, 0.1)",borderRadius:f.borderRadius.var},".head":{boxSizing:"border-box",width:"100%",height:"var(--tweaker-folder-height)",paddingLeft:"var(--gap-medium)",paddingRight:"var(--gap-medium)",display:"flex",alignItems:"center",justifyContent:"space-between",backgroundColor:f.colorMainAux.var,borderRadius:f.borderRadius.var},".name":{fontSize:"var(--font-size-large)",color:f.colorFont.var},".body":{display:"none",overflow:"hidden","@supports (height: calc-size(auto))":{height:"0"}},":host(.transition-allowed) .body":{transition:"height var(--duration-short), display var(--duration-short) allow-discrete"},":host(.opened) .body":{height:"calc-size(auto)",display:"block","@starting-style":{height:"0"}},".body-content":{boxSizing:"border-box",padding:"var(--gap-large)",display:"grid",gap:"var(--gap-medium)"},".arrow":{width:"20px",height:"20px",fill:f.colorFont.var,transition:"transform var(--duration-short)"},".opened .arrow":{transform:"scaleY(-1)"}});var A,Me,k,Ae,Ne,Fe,$e,Je;const Ye=class Ye extends HTMLElement{constructor(e){super();o(this,A);o(this,Me,new m.Store(null));o(this,k,new m.Store([]));o(this,Ae);o(this,Ne,null);o(this,Fe,null);o(this,$e,null);o(this,Je,e=>{let i=[],n=[];e.forEach(h=>{i=[...i,...h.removedNodes],n=[...n,...h.addedNodes]}),t(this,k).current=t(this,k).current.filter(h=>!i.includes(h)),t(this,A)&&!t(this,k).current.length&&!n.length&&this.remove()});const i=this.attachShadow({mode:"open"});i.adoptedStyleSheets=[...i.adoptedStyleSheets,Es],c(this,A,e.key),c(this,Ae,new MutationObserver(t(this,Je))),w(this,{children:[v({class:"wrapper",children:[v({class:"head",onClick:n=>{this.classList.toggle("opened"),this.classList.contains("opened")?T.openPanel(t(this,A)):T.closePanel(t(this,A))},children:[t(this,A)?v({class:"name",children:[t(this,A).split(".").slice(-1).toString()]}):null,t(this,Me),w(Pt,{class:"arrow"})]}),v({class:"body",ref:n=>{c(this,Ne,n)},children:v({class:"body-content",children:t(this,k),ref:n=>{c(this,Fe,n),c(this,$e,n.firstElementChild)}})})]})]}),e!=null&&e.storeBox&&this.handleStore(e.storeBox)}get key(){return t(this,A)}get head(){return t(this,Me)}get content(){return t(this,k)}get bodyElement(){return t(this,Ne)}get contentElement(){return t(this,Fe)}connectedCallback(){T.isPanelOpened(t(this,A))&&this.classList.add("opened"),setTimeout(()=>{this.classList.add("transition-allowed")}),t(this,Ae).observe(t(this,$e),{childList:!0})}handleStore(e){if(e.remainingFolders.length){const n=e.store.name.split("."),h=n.slice(0,n.length-e.remainingFolders.length).join("."),u=t(this,k).current.find(g=>g.key===h);u instanceof Ye?u.handleStore({store:e.store,remainingFolders:e.remainingFolders.slice(1)}):t(this,k).current=[...t(this,k).current,new Ye({key:h,storeBox:{store:e.store,remainingFolders:e.remainingFolders.slice(1)}})]}else{const i=t(this,k).current.find(n=>n.key===e.store.name);i instanceof ft?i.addStore(e.store):t(this,k).current=[...t(this,k).current,new ft({store:e.store})]}}};A=new WeakMap,Me=new WeakMap,k=new WeakMap,Ae=new WeakMap,Ne=new WeakMap,Fe=new WeakMap,$e=new WeakMap,Je=new WeakMap;let _e=Ye;p.isBrowser&&!customElements.get("e-tweaker-folder")&&customElements.define("e-tweaker-folder",_e);const xs=x({":host":{"--tweaker-width":"550px","--tweaker-offset":"20px","--tweaker-folder-height":"35px","--height-input":"25px","--gap-large":"12px","--gap-medium":"10px","--gap-small":"8px","--gap-extra-small":"4px","--font-size-large":"16px","--font-size-medium":"14px","--font-size-small":"12px","--duration-short":"0.2s",fontFamily:"sans-serif",position:"absolute",top:"var(--tweaker-offset)",right:"var(--tweaker-offset)",width:"var(--tweaker-width)",backgroundColor:f.colorMain.var,borderRadius:f.borderRadius.var,transition:"opacity 0.1s",zIndex:"100",opacity:"0.1"},":host(:hover)":{opacity:"1 !important"},".resize":{position:"absolute",left:"0",top:"0",width:"calc(var(--tweaker-width) * 0.025)",height:"100%",zIndex:"1",cursor:"ew-resize"},".tweaker-buttons":{display:"flex",alignItems:"center",gap:"var(--gap-extra-small)"},".tweaker-button":{width:"18px",height:"18px",padding:"0",margin:"0",background:"none",border:"none",fill:f.colorFont.var,transitionProperty:"fill",transitionDuration:"var(--duration-short)"},".tweaker-button:hover":{fill:f.colorActive.var},".tweaker-button svg":{width:"100%",height:"100%"},":host .body-content":{maxHeight:`calc(
9
+ `;var _localStorageStudioName,_openedPanels,_changedSizes;const _TweakerStorage=class _TweakerStorage{constructor(){__privateAdd(this,_localStorageStudioName);__privateAdd(this,_openedPanels);__privateAdd(this,_changedSizes);this.scrollValue=0,__privateSet(this,_localStorageStudioName,""),__privateSet(this,_openedPanels,[]),__privateSet(this,_changedSizes,{}),__privateSet(this,_localStorageStudioName,Store.storeRegistry.name+"-tweaker")}openPanel(key){__privateGet(this,_openedPanels).includes(key)||__privateGet(this,_openedPanels).push(key)}closePanel(key){__privateSet(this,_openedPanels,__privateGet(this,_openedPanels).filter(v=>v!==key))}isPanelOpened(key){return __privateGet(this,_openedPanels).includes(key)}changedSizes(key){return __privateGet(this,_changedSizes)[key]}changeSize(key,value){value?__privateGet(this,_changedSizes)[key]=value:delete __privateGet(this,_changedSizes)[key]}save(){const state={openedPanels:__privateGet(this,_openedPanels),changedSizes:__privateGet(this,_changedSizes),scrollValue:this.scrollValue};localStorage.setItem(__privateGet(this,_localStorageStudioName),JSON.stringify(state)),Store.storeRegistry.saveState()}load(){Store.storeRegistry.loadState();const stringState=localStorage.getItem(__privateGet(this,_localStorageStudioName));if(stringState)try{const state=JSON.parse(stringState);state.openedPanels&&__privateSet(this,_openedPanels,state.openedPanels),state.changedSizes&&__privateSet(this,_changedSizes,state.changedSizes),state.scrollValue&&(this.scrollValue=state.scrollValue)}catch(e){console.error(e)}}};_localStorageStudioName=new WeakMap,_openedPanels=new WeakMap,_changedSizes=new WeakMap,__name(_TweakerStorage,"TweakerStorage");let TweakerStorage=_TweakerStorage;const tweakerStorage=new TweakerStorage,checkIcon='<svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 256 256"><path d="m243.33 90.91l-128.41 128.4a16 16 0 0 1-22.63 0l-71.62-72a16 16 0 0 1 0-22.61l24-24a16 16 0 0 1 22.57-.06l36.64 35.27l.11.11l92.73-91.37a16 16 0 0 1 22.58 0l24 23.56a16 16 0 0 1 .03 22.7Z"/></svg>',stylesheet$c=createStylesheet({":host":{position:"relative",display:"inline-block",width:"30px",height:"30px",borderRadius:aptechkaTheme.borderRadiusSmall.var,overflow:"hidden"},"label, .fake":{display:"block"},"label, .fake, .default":{width:"100%",height:"100%"},".real":{position:"absolute",top:"0",left:"0",width:"0px",height:"0px",visibility:"hidden",margin:"0"},".default":{display:"flex",alignItems:"center",justifyContent:"center",backgroundColor:aptechkaTheme.colorMainAux.var},".default svg":{width:"60%",height:"60%",fill:aptechkaTheme.colorFont.var,opacity:0,transition:"var(--duration-short)"},":host(.checked) .default svg":{opacity:1}});var _inputElement,_internals,_CheckboxElement_instances,setFormValue_fn;const _CheckboxElement=class _CheckboxElement extends HTMLElement{constructor(){super();__privateAdd(this,_CheckboxElement_instances);__privateAdd(this,_inputElement,null);__privateAdd(this,_internals);const shadow=this.attachShadow({mode:"open"});shadow.adoptedStyleSheets=[...shadow.adoptedStyleSheets,stylesheet$c],__privateSet(this,_internals,this.attachInternals()),element(this,{children:label({children:[span({class:"fake",children:slot({children:[span({class:"default",children:[checkIcon]})]})}),input({ref:__name(e=>{__privateSet(this,_inputElement,e),e.required=this.hasAttribute("required"),e.value=this.getAttribute("value")||"",e.checked=this.hasAttribute("checked"),e.name=this.getAttribute("name")||"",__privateMethod(this,_CheckboxElement_instances,setFormValue_fn).call(this)},"ref"),class:"real",type:"checkbox",onChange:__name(()=>{__privateMethod(this,_CheckboxElement_instances,setFormValue_fn).call(this),this.dispatchEvent(new Event("change",{composed:!0}))},"onChange")})]})})}get checked(){return __privateGet(this,_inputElement).checked}set checked(state){__privateGet(this,_inputElement).checked=state,__privateMethod(this,_CheckboxElement_instances,setFormValue_fn).call(this)}get value(){return __privateGet(this,_inputElement).value}set value(value){__privateGet(this,_inputElement).value=value,__privateMethod(this,_CheckboxElement_instances,setFormValue_fn).call(this)}};_inputElement=new WeakMap,_internals=new WeakMap,_CheckboxElement_instances=new WeakSet,setFormValue_fn=__name(function(){this.checked?__privateGet(this,_internals).setFormValue(this.value):__privateGet(this,_internals).setFormValue(null),this.classList.toggle("checked",this.checked)},"#setFormValue"),__name(_CheckboxElement,"CheckboxElement"),_CheckboxElement.formAssociated=!0;let CheckboxElement=_CheckboxElement;intersector_index.isBrowser&&!customElements.get("e-checkbox")&&customElements.define("e-checkbox",CheckboxElement);var _stores;const _TweakerStoreManagerElement=class _TweakerStoreManagerElement extends HTMLElement{constructor(...stores){super();__privateAdd(this,_stores);__privateSet(this,_stores,stores)}addStore(store){__privateGet(this,_stores).push(store)}get firstStore(){return __privateGet(this,_stores)[0]}get stores(){return __privateGet(this,_stores)}updateStores(value){__privateGet(this,_stores).forEach(store=>{store.current=value})}};_stores=new WeakMap,__name(_TweakerStoreManagerElement,"TweakerStoreManagerElement");let TweakerStoreManagerElement=_TweakerStoreManagerElement;const stylesheet$b=createStylesheet({":host":{width:"100%",display:"inline-flex",height:"max-content"},"e-checkbox":{"--size":"calc(var(--height-input) * 0.8)",width:"var(--size)",height:"var(--size)",borderRadius:aptechkaTheme.borderRadiusSmall.var}}),_TweakerBooleanManagerElement=class _TweakerBooleanManagerElement extends TweakerStoreManagerElement{constructor(...stores){super(...stores);const shadow=this.attachShadow({mode:"open"});shadow.adoptedStyleSheets=[...shadow.adoptedStyleSheets,stylesheet$b],element(this,{children:[element("e-checkbox",{onChange:__name(e=>{this.updateStores(e.currentTarget.checked)},"onChange"),ref:__name(e=>{this.firstStore.subscribe(d=>{e.checked=d.current})},"ref")})]})}};__name(_TweakerBooleanManagerElement,"TweakerBooleanManagerElement");let TweakerBooleanManagerElement=_TweakerBooleanManagerElement;intersector_index.isBrowser&&!customElements.get("e-tweaker-boolean-manager")&&customElements.define("e-tweaker-boolean-manager",TweakerBooleanManagerElement);const stylesheet$a=createStylesheet({":host":{width:"100%",display:"inline-flex",height:"max-content"},input:{width:"100%",height:"var(--height-input)",padding:"0",background:"none",borderRadius:aptechkaTheme.borderRadius.var,border:"none",blockSize:"unset"},"input::-webkit-color-swatch, input::-webkit-color-swatch-wrapper":{boxSizing:"border-box",padding:"0px",border:"none",borderRadius:aptechkaTheme.borderRadius.var,height:"calc(var(--height-input) * 0.93)"}}),_TweakerColorManagerElement=class _TweakerColorManagerElement extends TweakerStoreManagerElement{constructor(...stores){super(...stores);const shadow=this.attachShadow({mode:"open"});shadow.adoptedStyleSheets=[...shadow.adoptedStyleSheets,stylesheet$a],element(this,{children:[input({type:"color",value:this.firstStore,onInput:__name(e=>{this.updateStores(e.currentTarget.value)},"onInput")})]})}};__name(_TweakerColorManagerElement,"TweakerColorManagerElement");let TweakerColorManagerElement=_TweakerColorManagerElement;intersector_index.isBrowser&&!customElements.get("e-tweaker-color-manager")&&customElements.define("e-tweaker-color-manager",TweakerColorManagerElement);const stylesheet$9=createStylesheet({a:{color:"inherit",fontSize:"var(--font-size-small)"}}),_TweakerLinkManagerElement=class _TweakerLinkManagerElement extends TweakerStoreManagerElement{constructor(...stores){var _a;super(...stores);const shadow=this.attachShadow({mode:"open"});shadow.adoptedStyleSheets=[...shadow.adoptedStyleSheets,stylesheet$9],element(this,{children:[a({href:this.firstStore,target:(_a=this.firstStore.__manager)!=null&&_a.sameWindow?"_self":"_blank",children:this.firstStore})]})}};__name(_TweakerLinkManagerElement,"TweakerLinkManagerElement");let TweakerLinkManagerElement=_TweakerLinkManagerElement;intersector_index.isBrowser&&!customElements.get("e-tweaker-link-manager")&&customElements.define("e-tweaker-link-manager",TweakerLinkManagerElement);const stylesheet$8=createStylesheet({":host":{width:"100%",display:"flex",alignItems:"center",gap:"var(--gap-small)"},".inputs-wrapper":{display:"grid",gap:"var(--gap-small)",width:"100%"},input:{boxSizing:"border-box",outline:"none",fontVariantNumeric:"tabular-nums",fontFamily:"inherit",color:"inherit",border:"none",fontSize:"var(--font-size-small)",width:"100%",height:"var(--height-input)",margin:"0",padding:"0 var(--gap-small)",backgroundColor:"rgba(255, 255, 255, 0.1)",borderRadius:aptechkaTheme.borderRadius.var},".drag":{position:"relative",width:"100%",height:"calc(var(--height-input) * 0.2)",display:"flex",alignItems:"center"},".drag::before":{content:'""',position:"absolute",left:"0",width:"100%",zIndex:"-1",height:"1px",borderBottom:`1px solid ${aptechkaTheme.colorFont.var}`,transform:"translateY(-50%)",opacity:"0.3"},":host(.infinite) .drag::before":{borderBottom:`1px dashed ${aptechkaTheme.colorFont.var}`},".drag-knob":{"--size":"calc(var(--height-input) * 0.4)",width:"var(--size)",height:"var(--size)"},".drag-knob-inner":{width:"100%",height:"100%",backgroundColor:aptechkaTheme.colorFont.var,borderRadius:aptechkaTheme.borderRadiusSmall.var,transition:"opacity var(--duration-short)"},":host(.infinite) .grabbing .drag-knob-inner":{opacity:.3}});var _inputElements,_knobElements,_step,_min,_max,_ease,_type,_isFinite,_isDragging,_storeMiddleware,_storeChangeListener,_TweakerNumberManagerElement_instances,getArray_fn,updateKnobPositions_fn,getDistance_fn,getKnobPosition_fn,_resizeListener;const _TweakerNumberManagerElement=class _TweakerNumberManagerElement extends TweakerStoreManagerElement{constructor(...stores){var _a,_b,_c,_d;super(...stores);__privateAdd(this,_TweakerNumberManagerElement_instances);__privateAdd(this,_inputElements,[]);__privateAdd(this,_knobElements,[]);__privateAdd(this,_step);__privateAdd(this,_min);__privateAdd(this,_max);__privateAdd(this,_ease);__privateAdd(this,_type);__privateAdd(this,_isFinite);__privateAdd(this,_isDragging,!1);__privateAdd(this,_storeMiddleware,__name(value=>{const arr=__privateMethod(this,_TweakerNumberManagerElement_instances,getArray_fn).call(this,value);return arr.map((v,i)=>{const number$1=typeof v=="string"?parseFloat(v)||__privateGet(this,_min):v,clamped=math.clamp(number$1,__privateGet(this,_min),__privateGet(this,_max)),fixed=number.toStep(clamped,__privateGet(this,_step));arr[i]=fixed}),__privateGet(this,_type)==="number"?arr[0]:arr},"#storeMiddleware"));__privateAdd(this,_storeChangeListener,__name(()=>{__privateMethod(this,_TweakerNumberManagerElement_instances,getArray_fn).call(this).map((v,i)=>{const inputElement=__privateGet(this,_inputElements)[i];inputElement&&(inputElement.value=(v||0).toString())}),__privateMethod(this,_TweakerNumberManagerElement_instances,updateKnobPositions_fn).call(this)},"#storeChangeListener"));__privateAdd(this,_resizeListener,__name(()=>{__privateMethod(this,_TweakerNumberManagerElement_instances,updateKnobPositions_fn).call(this)},"#resizeListener"));const shadow=this.attachShadow({mode:"open"});shadow.adoptedStyleSheets=[...shadow.adoptedStyleSheets,stylesheet$8],__privateSet(this,_min,polyfills.nullishCoalescing((_a=this.firstStore.__manager)==null?void 0:_a.min,-1/0)),__privateSet(this,_max,polyfills.nullishCoalescing((_b=this.firstStore.__manager)==null?void 0:_b.max,1/0)),__privateSet(this,_step,((_c=this.firstStore.__manager)==null?void 0:_c.step)||.01),__privateSet(this,_ease,((_d=this.firstStore.__manager)==null?void 0:_d.ease)||1),__privateSet(this,_type,Array.isArray(this.firstStore.current)?"array":"number"),__privateSet(this,_isFinite,isFinite(__privateGet(this,_max))&&isFinite(__privateGet(this,_min))),element(this,{class:__privateGet(this,_isFinite)?"":"infinite",children:__privateMethod(this,_TweakerNumberManagerElement_instances,getArray_fn).call(this).map((v,i)=>div({class:"inputs-wrapper",children:[input({type:"number",step:__privateGet(this,_step),min:__privateGet(this,_min),max:__privateGet(this,_max),ref:__name(e=>__privateGet(this,_inputElements).push(e),"ref"),value:v,onChange:__name(()=>{this.updateStores(__privateGet(this,_inputElements).map(el=>parseFloat(el.value)))},"onChange")}),div({class:"drag",children:[div({class:"drag-knob",ref:__name(e=>__privateGet(this,_knobElements).push(e),"ref"),onPointerdown:__name(grabEvent=>{grabEvent.preventDefault(),__privateSet(this,_isDragging,!0);const arr=__privateMethod(this,_TweakerNumberManagerElement_instances,getArray_fn).call(this),startValue=arr[i],knobElement=__privateGet(this,_knobElements)[i],inputElement=__privateGet(this,_inputElements)[i];if(knobElement&&inputElement){const knobParentElement=knobElement.parentElement,distance=__privateMethod(this,_TweakerNumberManagerElement_instances,getDistance_fn).call(this);knobParentElement.classList.add("grabbing"),gestures.setupDrag(moveEvent=>{const delta=moveEvent.x-grabEvent.x,del=__privateGet(this,_isFinite)?knobParentElement.offsetWidth/(distance||1):1,newValue=startValue+delta/del*__privateGet(this,_ease);if(arr[i]=newValue,!__privateGet(this,_isFinite)){const pos=__privateMethod(this,_TweakerNumberManagerElement_instances,getKnobPosition_fn).call(this,knobElement,0);knobElement.style.transform=`translateX(${pos+delta}px)`}this.updateStores([...arr])},()=>{if(__privateSet(this,_isDragging,!1),!__privateGet(this,_isFinite)){const pos=__privateMethod(this,_TweakerNumberManagerElement_instances,getKnobPosition_fn).call(this,knobElement,0);knobElement.style.transition="transform 0.1s",knobElement.style.transform=`translateX(${pos}px)`,knobParentElement.classList.remove("grabbing"),setTimeout(()=>{knobElement.style.transition=""},100)}})}},"onPointerdown"),children:div({class:"drag-knob-inner"})})]})]}))})}connectedCallback(){this.firstStore.addMiddleware(__privateGet(this,_storeMiddleware)),this.firstStore.subscribe(__privateGet(this,_storeChangeListener)),elementResizer_index.elementResizer.subscribe(this,__privateGet(this,_resizeListener))}disconnectedCallback(){this.firstStore.removeMiddleware(__privateGet(this,_storeMiddleware)),this.firstStore.unsubscribe(__privateGet(this,_storeChangeListener)),elementResizer_index.elementResizer.unsubscribe(__privateGet(this,_resizeListener))}};_inputElements=new WeakMap,_knobElements=new WeakMap,_step=new WeakMap,_min=new WeakMap,_max=new WeakMap,_ease=new WeakMap,_type=new WeakMap,_isFinite=new WeakMap,_isDragging=new WeakMap,_storeMiddleware=new WeakMap,_storeChangeListener=new WeakMap,_TweakerNumberManagerElement_instances=new WeakSet,getArray_fn=__name(function(value=this.firstStore.current){return Array.isArray(value)?value:[value]},"#getArray"),updateKnobPositions_fn=__name(function(){__privateMethod(this,_TweakerNumberManagerElement_instances,getArray_fn).call(this).map((v,i)=>{const knobElement=__privateGet(this,_knobElements)[i];if(knobElement&&(!__privateGet(this,_isDragging)||__privateGet(this,_isDragging)&&__privateGet(this,_isFinite))){const position=__privateMethod(this,_TweakerNumberManagerElement_instances,getKnobPosition_fn).call(this,knobElement,v);knobElement.style.transform=`translateX(${position}px)`}})},"#updateKnobPositions"),getDistance_fn=__name(function(){return __privateGet(this,_isFinite)?__privateGet(this,_max)-__privateGet(this,_min):0},"#getDistance"),getKnobPosition_fn=__name(function(knobElement,inputValue){const parentElement=knobElement.parentElement,distance=__privateMethod(this,_TweakerNumberManagerElement_instances,getDistance_fn).call(this),progress=distance?inputValue/distance:.5;return(parentElement.offsetWidth-knobElement.offsetWidth)*progress},"#getKnobPosition"),_resizeListener=new WeakMap,__name(_TweakerNumberManagerElement,"TweakerNumberManagerElement");let TweakerNumberManagerElement=_TweakerNumberManagerElement;intersector_index.isBrowser&&!customElements.get("e-tweaker-number-manager")&&customElements.define("e-tweaker-number-manager",TweakerNumberManagerElement);function dispatchSizeChangeEvent(node){node.dispatchEvent(new CustomEvent("sizeChange",{bubbles:!0,composed:!0}))}__name(dispatchSizeChangeEvent,"dispatchSizeChangeEvent");function dispatchBeforeSizeChangeEvent(node){node.dispatchEvent(new CustomEvent("beforeSizeChange",{bubbles:!0,composed:!0}))}__name(dispatchBeforeSizeChangeEvent,"dispatchBeforeSizeChangeEvent");const stylesheet$7=createStylesheet({":host":{position:"relative"},".head":{width:"100%",cursor:"default",background:"none",border:"none",color:"inherit",fontFamily:"inherit",fontSize:"inherit",fontWeight:"inherit",textAlign:"start",padding:"0",margin:"0"},".body":{boxSizing:"border-box",position:"var(--position, unset)",top:"100%",left:"0",width:"100%",overflow:"hidden",transitionDuration:"var(--duration, var(--duration-short))",transitionProperty:"height",cursor:"default"},".body-inner":{display:"grid",gap:"var(--gap, 0px)",width:"100%",paddingTop:"var(--gap, 0px)"}});var _internals2,_value,_bodyElement,_opened,_timeoutId,_resizeObserver,_resizeObserverListener,_SelectElement_instances,dispatchToggleEvent_fn;const _SelectElement=class _SelectElement extends HTMLElement{constructor(){super();__privateAdd(this,_SelectElement_instances);__privateAdd(this,_internals2,null);__privateAdd(this,_value,"");__privateAdd(this,_bodyElement,null);__privateAdd(this,_opened,!1);__privateAdd(this,_timeoutId);__privateAdd(this,_resizeObserver,null);__privateAdd(this,_resizeObserverListener,__name(()=>{dispatchSizeChangeEvent(this)},"#resizeObserverListener"));if(intersector_index.isBrowser){const shadow=this.attachShadow({mode:"open"});shadow.adoptedStyleSheets=[...shadow.adoptedStyleSheets,stylesheet$7],__privateSet(this,_internals2,this.attachInternals()),__privateSet(this,_resizeObserver,new ResizeObserver(__privateGet(this,_resizeObserverListener))),element(this,{children:[button({class:"head",children:slot({name:"head"}),onClick:__name(()=>{this.opened?this.close():this.open()},"onClick")}),div({class:"body",style:{height:"0px"},children:div({class:"body-inner",children:slot()}),ref:__name(e=>{__privateSet(this,_bodyElement,e)},"ref")})]})}}get value(){return __privateGet(this,_value)}set value(value){__privateSet(this,_value,value),this.dispatchEvent(new Event("change",{bubbles:!0,composed:!0})),__privateGet(this,_internals2).setFormValue(__privateGet(this,_value))}get internals(){return __privateGet(this,_internals2)}get opened(){return __privateGet(this,_opened)}open(){clearTimeout(__privateGet(this,_timeoutId)),__privateSet(this,_opened,!0),__privateGet(this,_bodyElement).style.display="grid",this.classList.add("triggered"),setTimeout(()=>{this.classList.add("opened"),__privateGet(this,_bodyElement).style.height=__privateGet(this,_bodyElement).scrollHeight+"px",__privateMethod(this,_SelectElement_instances,dispatchToggleEvent_fn).call(this)},0)}close(){__privateSet(this,_opened,!1),__privateGet(this,_bodyElement).style.height="0px",this.classList.remove("opened"),__privateMethod(this,_SelectElement_instances,dispatchToggleEvent_fn).call(this),__privateSet(this,_timeoutId,setTimeout(()=>{this.classList.remove("triggered"),__privateGet(this,_bodyElement).style.display="none"},style$1.getElementTransitionDurationMS(__privateGet(this,_bodyElement))))}connectedCallback(){__privateGet(this,_resizeObserver).observe(__privateGet(this,_bodyElement))}disconnectedCallback(){clearTimeout(__privateGet(this,_timeoutId)),__privateGet(this,_resizeObserver).disconnect()}};_internals2=new WeakMap,_value=new WeakMap,_bodyElement=new WeakMap,_opened=new WeakMap,_timeoutId=new WeakMap,_resizeObserver=new WeakMap,_resizeObserverListener=new WeakMap,_SelectElement_instances=new WeakSet,dispatchToggleEvent_fn=__name(function(){dispatchBeforeSizeChangeEvent(this),this.dispatchEvent(new CustomEvent("selectToggle",{bubbles:!0,composed:!0,detail:{opened:__privateGet(this,_opened)}}))},"#dispatchToggleEvent"),__name(_SelectElement,"SelectElement"),_SelectElement.formAssociated=!0;let SelectElement=_SelectElement;intersector_index.isBrowser&&!customElements.get("e-select")&&customElements.define("e-select",SelectElement);var _selectElement;const _SelectUserElement=class _SelectUserElement extends HTMLElement{constructor(){super(...arguments);__privateAdd(this,_selectElement,null)}get selectElement(){return __privateGet(this,_selectElement)}connectedCallback(){var _a,_b;const selectElement=(_b=(_a=this.assignedSlot)==null?void 0:_a.getRootNode())==null?void 0:_b.host;selectElement?__privateSet(this,_selectElement,selectElement):console.log(this,"e-select not found")}};_selectElement=new WeakMap,__name(_SelectUserElement,"SelectUserElement");let SelectUserElement=_SelectUserElement;const stylesheet$6=createStylesheet({":host":{width:"100%",height:"40px",display:"inline-flex",alignItems:"center"}});var _changeListener,_SelectOptionElement_instances,pick_fn;const _SelectOptionElement=class _SelectOptionElement extends SelectUserElement{constructor(){super();__privateAdd(this,_SelectOptionElement_instances);__privateAdd(this,_changeListener,__name(()=>{this.selectElement.value===this.value?this.style.display="none":this.style.display=""},"#changeListener"));if(intersector_index.isBrowser){const shadow=this.attachShadow({mode:"open"});shadow.adoptedStyleSheets=[...shadow.adoptedStyleSheets,stylesheet$6],element(this,{tabindex:0,onClick:__name(()=>{__privateMethod(this,_SelectOptionElement_instances,pick_fn).call(this)},"onClick"),onKeydown:__name(e=>{e.code==="Space"&&__privateMethod(this,_SelectOptionElement_instances,pick_fn).call(this)},"onKeydown"),children:slot()})}}get value(){return(this.hasAttribute("value")?this.getAttribute("value"):this.innerText)||""}connectedCallback(){super.connectedCallback(),this.hasAttribute("default")&&(this.selectElement.value||(this.selectElement.value=this.value)),this.selectElement.addEventListener("change",__privateGet(this,_changeListener)),setTimeout(()=>{__privateGet(this,_changeListener).call(this)})}disconnectedCallback(){this.selectElement.removeEventListener("change",__privateGet(this,_changeListener))}};_changeListener=new WeakMap,_SelectOptionElement_instances=new WeakSet,pick_fn=__name(function(){this.selectElement.value=this.value,this.selectElement.close()},"#pick"),__name(_SelectOptionElement,"SelectOptionElement");let SelectOptionElement=_SelectOptionElement;intersector_index.isBrowser&&!customElements.get("e-select-option")&&customElements.define("e-select-option",SelectOptionElement);const stylesheet$5=createStylesheet({":host":{width:"100%",height:"40px",display:"inline-flex",alignItems:"center",justifyContent:"space-between"},".default-arrow":{flexShrink:"0",width:"var(--arrow-size, 1em)",height:"var(--arrow-size, 1em)",fill:`var(--arrow-color, ${aptechkaTheme.colorMain.var})`,transitionProperty:"transform",transitionDuration:"var(--duration, var(--duration-short))"},":host(.opened) .default-arrow":{transform:"scaleY(-1)"}});var _valueElement,_changeListener2,_toggleListener;const _SelectHeadElement=class _SelectHeadElement extends SelectUserElement{constructor(){super();__privateAdd(this,_valueElement,null);__privateAdd(this,_changeListener2,__name(()=>{const currentOption=this.selectElement.shadowRoot.querySelector(".body slot").assignedElements().find(e=>e.value===this.selectElement.value);currentOption&&(__privateGet(this,_valueElement).innerHTML=currentOption.innerHTML)},"#changeListener"));__privateAdd(this,_toggleListener,__name(()=>{this.classList.toggle("opened",this.selectElement.opened)},"#toggleListener"));if(intersector_index.isBrowser){const shadow=this.attachShadow({mode:"open"});shadow.adoptedStyleSheets=[...shadow.adoptedStyleSheets,stylesheet$5],element(this,{children:[slot(),slot({name:"arrow",children:element(arrowIcon,{class:"default-arrow"})})]}),this.slot="head"}}connectedCallback(){super.connectedCallback(),__privateSet(this,_valueElement,this.querySelector("[data-value-holder]")||this),this.selectElement.addEventListener("change",__privateGet(this,_changeListener2)),__privateGet(this,_changeListener2).call(this),this.selectElement.addEventListener("selectToggle",__privateGet(this,_toggleListener))}disconnectedCallback(){this.selectElement.removeEventListener("change",__privateGet(this,_changeListener2)),this.selectElement.removeEventListener("selectToggle",__privateGet(this,_toggleListener))}};_valueElement=new WeakMap,_changeListener2=new WeakMap,_toggleListener=new WeakMap,__name(_SelectHeadElement,"SelectHeadElement");let SelectHeadElement=_SelectHeadElement;intersector_index.isBrowser&&!customElements.get("e-select-head")&&customElements.define("e-select-head",SelectHeadElement);const stylesheet$4=createStylesheet({"e-select":{display:"block",width:"100%","--arrow-color":aptechkaTheme.colorFont.var},"e-select-head":{width:"100%",height:"var(--height-input)",display:"flex",alignItems:"center",justifyContent:"space-between",fontSize:"var(--font-size-small)"},"e-select-option":{height:"var(--height-input)",transitionDuration:"var(--duration-short)",transitionProperty:"color",fontSize:"var(--font-size-small)"},"e-select-option:hover":{color:aptechkaTheme.colorActive.var},svg:{width:"16px",height:"16px",fill:aptechkaTheme.colorFont.var,transitionProperty:"transform",transitionDuration:"var(--duration-short)"},".opened svg":{transform:"scaleY(-1)"}}),_TweakerSelectManagerElement=class _TweakerSelectManagerElement extends TweakerStoreManagerElement{constructor(...stores){var _a;super(...stores);const shadow=this.attachShadow({mode:"open"});shadow.adoptedStyleSheets=[...shadow.adoptedStyleSheets,stylesheet$4];const variants=((_a=this.firstStore.__manager)==null?void 0:_a.variants)||[];element(this,{children:element("e-select",{value:this.firstStore,onChange:__name(e=>{this.updateStores(e.currentTarget.value)},"onChange"),lightChildren:[element("e-select-head",{lightChildren:[span({"data-value-holder":""})]}),...variants.map((v,i)=>element("e-select-option",{lightChildren:v,default:i===0?!0:null}))]})})}};__name(_TweakerSelectManagerElement,"TweakerSelectManagerElement");let TweakerSelectManagerElement=_TweakerSelectManagerElement;intersector_index.isBrowser&&!customElements.get("e-tweaker-select-manager")&&customElements.define("e-tweaker-select-manager",TweakerSelectManagerElement);const stylesheet$3=createStylesheet({":host":{width:"100%",display:"flex",alignItems:"center"},input:{boxSizing:"border-box",outline:"none",fontVariantNumeric:"tabular-nums",fontFamily:"inherit",color:"inherit",border:"none",fontSize:"var(--font-size-small)",height:"var(--height-input)",width:"100%",margin:"0",padding:"0 var(--gap-small)",backgroundColor:"rgba(255, 255, 255, 0.1)",borderRadius:aptechkaTheme.borderRadius.var}}),_TweakerStringManagerElement=class _TweakerStringManagerElement extends TweakerStoreManagerElement{constructor(...stores){super(...stores);const shadow=this.attachShadow({mode:"open"});shadow.adoptedStyleSheets=[...shadow.adoptedStyleSheets,stylesheet$3],element(this,{children:[input({class:"text-input",type:"string",value:this.firstStore,onChange:__name(e=>{this.updateStores(e.currentTarget.value)},"onChange")})]})}};__name(_TweakerStringManagerElement,"TweakerStringManagerElement");let TweakerStringManagerElement=_TweakerStringManagerElement;intersector_index.isBrowser&&!customElements.get("e-tweaker-string-manager")&&customElements.define("e-tweaker-string-manager",TweakerStringManagerElement);const tweakerManagerConstructors={boolean:TweakerBooleanManagerElement,color:TweakerColorManagerElement,link:TweakerLinkManagerElement,number:TweakerNumberManagerElement,select:TweakerSelectManagerElement,string:TweakerStringManagerElement},stylesheet$2=createStylesheet({":host":{display:"grid",gridAutoFlow:"column",gridTemplateColumns:"0.5fr 1fr",alignItems:"center",color:aptechkaTheme.colorFont.var,gap:"var(--gap-medium)"},":host(.disabled)":{pointerEvents:"none",opacity:.5},".head":{fontSize:"var(--font-size-medium)",display:"flex",alignItems:"center",gap:"var(--gap-extra-small)"},".head-buttons":{display:"flex"},".head-button":{width:"14px",height:"14px",padding:"0",margin:"0",border:"none",background:"none",fill:aptechkaTheme.colorFont.var,transitionDuration:"var(--duration-short)",transitionProperty:"fill, opacity",opacity:"0"},":host(:hover) .head-button":{opacity:"1"},".head-button:hover":{fill:aptechkaTheme.colorActive.var},".head-button svg":{width:"100%",height:"100%"}});var _stores2,_key,_name,_pointerEnter,_storeManager,_storesChangeListener,_keydownListener;const _TweakerFieldElement=class _TweakerFieldElement extends HTMLElement{constructor(parameters){var _a,_b;super();__privateAdd(this,_stores2,[]);__privateAdd(this,_key);__privateAdd(this,_name);__privateAdd(this,_pointerEnter,!1);__privateAdd(this,_storeManager);__privateAdd(this,_storesChangeListener,__name(()=>{Store.activeStores.current.find(s=>__privateGet(this,_stores2).includes(s))||this.remove()},"#storesChangeListener"));__privateAdd(this,_keydownListener,__name(e=>{__privateGet(this,_pointerEnter)&&((e.metaKey||e.ctrlKey)&&e.code==="KeyC"?navigator.clipboard.writeText(__privateGet(this,_stores2)[0].current):(e.metaKey||e.ctrlKey)&&e.code==="KeyR"&&(__privateGet(this,_stores2).forEach(store=>{store.reset()}),e.preventDefault()))},"#keydownListener"));__privateSet(this,_stores2,[parameters.store]),__privateSet(this,_key,parameters.store.name),__privateSet(this,_name,__privateGet(this,_key).split(".").slice(-1).toString());const type=((_a=parameters.store.__manager)==null?void 0:_a.type)||"string";__privateSet(this,_storeManager,new tweakerManagerConstructors[type](__privateGet(this,_stores2)[0]));const shadow=this.attachShadow({mode:"open"});shadow.adoptedStyleSheets=[...shadow.adoptedStyleSheets,stylesheet$2],element(this,{class:{disabled:((_b=parameters.store.__manager)==null?void 0:_b.disabled)||!1},onPointerleave:__name(()=>{__privateSet(this,_pointerEnter,!1)},"onPointerleave"),onPointerenter:__name(()=>{__privateSet(this,_pointerEnter,!0)},"onPointerenter"),children:[div({class:"head",children:[div({class:"name",children:__privateGet(this,_name)+":"}),div({class:"head-buttons",children:[button({class:"head-button",children:copyIcon,onClick:__name(()=>{navigator.clipboard.writeText(__privateGet(this,_stores2)[0].current)},"onClick")}),button({class:"head-button",children:resetIcon,onClick:__name(()=>{__privateGet(this,_stores2).forEach(store=>{store.reset()})},"onClick")})]})]}),__privateGet(this,_storeManager)]})}get key(){return __privateGet(this,_key)}get name(){return __privateGet(this,_name)}get stores(){return __privateGet(this,_stores2)}addStore(store){__privateGet(this,_storeManager).addStore(store)}connectedCallback(){Store.activeStores.subscribe(__privateGet(this,_storesChangeListener)),addEventListener("keydown",__privateGet(this,_keydownListener)),dispatchSizeChangeEvent(this)}disconnectedCallback(){Store.activeStores.unsubscribe(__privateGet(this,_storesChangeListener)),removeEventListener("keydown",__privateGet(this,_keydownListener))}};_stores2=new WeakMap,_key=new WeakMap,_name=new WeakMap,_pointerEnter=new WeakMap,_storeManager=new WeakMap,_storesChangeListener=new WeakMap,_keydownListener=new WeakMap,__name(_TweakerFieldElement,"TweakerFieldElement");let TweakerFieldElement=_TweakerFieldElement;intersector_index.isBrowser&&!customElements.get("e-tweaker-field")&&customElements.define("e-tweaker-field",TweakerFieldElement);const stylesheet$1=createStylesheet({".wrapper":{boxSizing:"border-box",backgroundColor:"rgba(255, 255, 255, 0.1)",borderRadius:aptechkaTheme.borderRadius.var},".head":{boxSizing:"border-box",width:"100%",height:"var(--tweaker-folder-height)",paddingLeft:"var(--gap-medium)",paddingRight:"var(--gap-medium)",display:"flex",alignItems:"center",justifyContent:"space-between",backgroundColor:aptechkaTheme.colorMainAux.var,borderRadius:aptechkaTheme.borderRadius.var},".name":{fontSize:"var(--font-size-large)",color:aptechkaTheme.colorFont.var},".body":{display:"none",overflow:"hidden","@supports (height: calc-size(auto))":{height:"0"}},":host(.transition-allowed) .body":{transition:"height var(--duration-short), display var(--duration-short) allow-discrete"},":host(.opened) .body":{height:"calc-size(auto)",display:"block","@starting-style":{height:"0"}},".body-content":{boxSizing:"border-box",padding:"var(--gap-large)",display:"grid",gap:"var(--gap-medium)"},".arrow":{width:"20px",height:"20px",fill:aptechkaTheme.colorFont.var,transition:"transform var(--duration-short)"},".opened .arrow":{transform:"scaleY(-1)"}});var _key2,_head,_content,_mutationObserver,_bodyElement2,_contentElement,_contentRootElement,_mutationListener;const _TweakerFolderElement=class _TweakerFolderElement extends HTMLElement{constructor(parameters){super();__privateAdd(this,_key2);__privateAdd(this,_head,new Store.Store(null));__privateAdd(this,_content,new Store.Store([]));__privateAdd(this,_mutationObserver);__privateAdd(this,_bodyElement2,null);__privateAdd(this,_contentElement,null);__privateAdd(this,_contentRootElement,null);__privateAdd(this,_mutationListener,__name(mutations=>{let removedNodes=[],addedNodes=[];mutations.forEach(m=>{removedNodes=[...removedNodes,...m.removedNodes],addedNodes=[...addedNodes,...m.addedNodes]}),__privateGet(this,_content).current=__privateGet(this,_content).current.filter(v=>!removedNodes.includes(v)),__privateGet(this,_key2)&&!__privateGet(this,_content).current.length&&!addedNodes.length&&this.remove()},"#mutationListener"));const shadow=this.attachShadow({mode:"open"});shadow.adoptedStyleSheets=[...shadow.adoptedStyleSheets,stylesheet$1],__privateSet(this,_key2,parameters.key),__privateSet(this,_mutationObserver,new MutationObserver(__privateGet(this,_mutationListener))),element(this,{children:[div({class:"wrapper",children:[div({class:"head",onClick:__name(e=>{this.classList.toggle("opened"),this.classList.contains("opened")?tweakerStorage.openPanel(__privateGet(this,_key2)):tweakerStorage.closePanel(__privateGet(this,_key2))},"onClick"),children:[__privateGet(this,_key2)?div({class:"name",children:[__privateGet(this,_key2).split(".").slice(-1).toString()]}):null,__privateGet(this,_head),element(arrowIcon,{class:"arrow"})]}),div({class:"body",ref:__name(e=>{__privateSet(this,_bodyElement2,e)},"ref"),children:div({class:"body-content",children:__privateGet(this,_content),ref:__name(e=>{__privateSet(this,_contentElement,e),__privateSet(this,_contentRootElement,e.firstElementChild)},"ref")})})]})]}),parameters!=null&&parameters.storeBox&&this.handleStore(parameters.storeBox)}get key(){return __privateGet(this,_key2)}get head(){return __privateGet(this,_head)}get content(){return __privateGet(this,_content)}get bodyElement(){return __privateGet(this,_bodyElement2)}get contentElement(){return __privateGet(this,_contentElement)}connectedCallback(){tweakerStorage.isPanelOpened(__privateGet(this,_key2))&&this.classList.add("opened"),setTimeout(()=>{this.classList.add("transition-allowed")}),__privateGet(this,_mutationObserver).observe(__privateGet(this,_contentRootElement),{childList:!0})}handleStore(storeBox){if(storeBox.remainingFolders.length){const splittedName=storeBox.store.name.split("."),key=splittedName.slice(0,splittedName.length-storeBox.remainingFolders.length).join("."),found=__privateGet(this,_content).current.find(v=>v.key===key);found instanceof _TweakerFolderElement?found.handleStore({store:storeBox.store,remainingFolders:storeBox.remainingFolders.slice(1)}):__privateGet(this,_content).current=[...__privateGet(this,_content).current,new _TweakerFolderElement({key,storeBox:{store:storeBox.store,remainingFolders:storeBox.remainingFolders.slice(1)}})]}else{const found=__privateGet(this,_content).current.find(v=>v.key===storeBox.store.name);found instanceof TweakerFieldElement?found.addStore(storeBox.store):__privateGet(this,_content).current=[...__privateGet(this,_content).current,new TweakerFieldElement({store:storeBox.store})]}}};_key2=new WeakMap,_head=new WeakMap,_content=new WeakMap,_mutationObserver=new WeakMap,_bodyElement2=new WeakMap,_contentElement=new WeakMap,_contentRootElement=new WeakMap,_mutationListener=new WeakMap,__name(_TweakerFolderElement,"TweakerFolderElement");let TweakerFolderElement=_TweakerFolderElement;intersector_index.isBrowser&&!customElements.get("e-tweaker-folder")&&customElements.define("e-tweaker-folder",TweakerFolderElement);const stylesheet=createStylesheet({":host":{"--tweaker-width":"550px","--tweaker-offset":"20px","--tweaker-folder-height":"35px","--height-input":"25px","--gap-large":"12px","--gap-medium":"10px","--gap-small":"8px","--gap-extra-small":"4px","--font-size-large":"16px","--font-size-medium":"14px","--font-size-small":"12px","--duration-short":"0.2s",fontFamily:"sans-serif",position:"absolute",top:"var(--tweaker-offset)",right:"var(--tweaker-offset)",width:"var(--tweaker-width)",backgroundColor:aptechkaTheme.colorMain.var,borderRadius:aptechkaTheme.borderRadius.var,transition:"opacity 0.1s",zIndex:"100",opacity:"0.1"},":host(:hover)":{opacity:"1 !important"},".resize":{position:"absolute",left:"0",top:"0",width:"calc(var(--tweaker-width) * 0.025)",height:"100%",zIndex:"1",cursor:"ew-resize"},".tweaker-buttons":{display:"flex",alignItems:"center",gap:"var(--gap-extra-small)"},".tweaker-button":{width:"18px",height:"18px",padding:"0",margin:"0",background:"none",border:"none",fill:aptechkaTheme.colorFont.var,transitionProperty:"fill",transitionDuration:"var(--duration-short)"},".tweaker-button:hover":{fill:aptechkaTheme.colorActive.var},".tweaker-button svg":{width:"100%",height:"100%"},":host .body-content":{maxHeight:`calc(
10
10
  100dvh -
11
11
  (
12
12
  var(--tweaker-offset) * 2 +
13
13
  var(--tweaker-folder-height)
14
14
  )
15
- )`,overflow:"hidden auto","-ms-overflow-style":"none","scrollbar-width":"none"},":host .body-content::-webkit-scrollbar":{display:"none"},[`@media ${Xt.ViewportMediaRules["<=mobile"]}`]:{":host":{position:"absolute",top:"0",right:"0",width:"100% !important",borderTopLeftRadius:"0",borderTopRightRadius:"0"},":host .body-content":{maxHeight:`calc(
15
+ )`,overflow:"hidden auto","-ms-overflow-style":"none","scrollbar-width":"none"},":host .body-content::-webkit-scrollbar":{display:"none"},[`@media ${Viewport.ViewportMediaRules["<=mobile"]}`]:{":host":{position:"absolute",top:"0",right:"0",width:"100% !important",borderTopLeftRadius:"0",borderTopRightRadius:"0"},":host .body-content":{maxHeight:`calc(
16
16
  100dvh -
17
17
  var(--tweaker-folder-height)
18
- )`}}});var Pe,Be,Ie;class Ot extends _e{constructor(){super({key:""});o(this,Pe,!1);o(this,Be,()=>{T.save()});o(this,Ie,Gt.debounce(()=>{m.activeStores.current.forEach(e=>{if(e.name){const i=e.name.split(".");this.handleStore({store:e,remainingFolders:i.length>1?i.slice(0,-1):[]})}}),t(this,Pe)||(c(this,Pe,!0),this.contentElement.scroll({top:T.scrollValue}),this.contentElement.addEventListener("scroll",()=>{T.scrollValue=this.contentElement.scrollTop}))},10));T.load(),this.shadowRoot.adoptedStyleSheets=[...this.shadowRoot.adoptedStyleSheets,xs],this.head.current=[v({class:"tweaker-buttons",onClick:e=>{e.stopPropagation()},children:[Q({class:"tweaker-button",children:Ft,onClick:()=>{m.storeRegistry.resetState()}}),Q({class:["tweaker-button"],children:[$t],onClick:()=>{navigator.clipboard.writeText(JSON.stringify(m.storeRegistry.getState()))}}),Q({class:"tweaker-button",children:ns,onClick:()=>{Yt.createJSONAndSave(m.storeRegistry.name,m.storeRegistry.getState())}}),At({class:"tweaker-button",children:[os,He({type:"file",style:{display:"none"},onChange:e=>{var h;const n=(h=e.currentTarget.files)==null?void 0:h[0];if(n){const u=new FileReader;u.onload=g=>{var L,y;const E=(y=(L=g.target)==null?void 0:L.result)==null?void 0:y.toString();E&&m.storeRegistry.loadState(E)},u.readAsText(n)}}})]})]})],w(this.bodyElement,{children:[v({class:"resize",onPointerdown:e=>{e.preventDefault();const i=this.getBoundingClientRect(),n=this.contentElement.scrollTop;St.setupDrag(h=>{const u=e.x-h.x,g=Math.max(400,i.width+u);this.style.width=g+"px",T.changeSize("tweaker",g)},()=>{setTimeout(()=>{this.contentElement.scroll({top:n})},10)})},onDblclick:()=>{this.style.width="",T.changeSize("tweaker",null)}})]})}connectedCallback(){super.connectedCallback(),window.addEventListener("beforeunload",t(this,Be)),m.activeStores.subscribe(t(this,Ie)),T.changedSizes("tweaker")&&(this.style.width=T.changedSizes("tweaker")+"px")}disconnectedCallback(){window.removeEventListener("beforeunload",t(this,Be)),T.save(),m.activeStores.unsubscribe(t(this,Ie))}}Pe=new WeakMap,Be=new WeakMap,Ie=new WeakMap;p.isBrowser&&!customElements.get("e-tweaker")&&customElements.define("e-tweaker",Ot);p.isBrowser&&document.body.appendChild(new Ot);
18
+ )`}}});var _scrollRestored,_unloadListener,_storesChangeListener2;const _TweakerElement=class _TweakerElement extends TweakerFolderElement{constructor(){super({key:""});__privateAdd(this,_scrollRestored,!1);__privateAdd(this,_unloadListener,__name(()=>{tweakerStorage.save()},"#unloadListener"));__privateAdd(this,_storesChangeListener2,_function.debounce(()=>{Store.activeStores.current.forEach(store=>{if(store.name){const sname=store.name.split(".");this.handleStore({store,remainingFolders:sname.length>1?sname.slice(0,-1):[]})}}),__privateGet(this,_scrollRestored)||(__privateSet(this,_scrollRestored,!0),this.contentElement.scroll({top:tweakerStorage.scrollValue}),this.contentElement.addEventListener("scroll",()=>{tweakerStorage.scrollValue=this.contentElement.scrollTop}))},10));tweakerStorage.load(),this.shadowRoot.adoptedStyleSheets=[...this.shadowRoot.adoptedStyleSheets,stylesheet],this.head.current=[div({class:"tweaker-buttons",onClick:__name(e=>{e.stopPropagation()},"onClick"),children:[button({class:"tweaker-button",children:resetIcon,onClick:__name(()=>{Store.storeRegistry.resetState()},"onClick")}),button({class:["tweaker-button"],children:[copyIcon],onClick:__name(()=>{navigator.clipboard.writeText(JSON.stringify(Store.storeRegistry.getState()))},"onClick")}),button({class:"tweaker-button",children:downloadIcon,onClick:__name(()=>{file.createJSONAndSave(Store.storeRegistry.name,Store.storeRegistry.getState())},"onClick")}),label({class:"tweaker-button",children:[uploadIcon,input({type:"file",style:{display:"none"},onChange:__name(e=>{var _a;const file2=(_a=e.currentTarget.files)==null?void 0:_a[0];if(file2){const reader=new FileReader;reader.onload=e2=>{var _a2,_b;const result=(_b=(_a2=e2.target)==null?void 0:_a2.result)==null?void 0:_b.toString();result&&Store.storeRegistry.loadState(result)},reader.readAsText(file2)}},"onChange")})]})]})],element(this.bodyElement,{children:[div({class:"resize",onPointerdown:__name(grabEvent=>{grabEvent.preventDefault();const rect=this.getBoundingClientRect(),scrollValue=this.contentElement.scrollTop;gestures.setupDrag(moveEvent=>{const dx=grabEvent.x-moveEvent.x,newSize=Math.max(400,rect.width+dx);this.style.width=newSize+"px",tweakerStorage.changeSize("tweaker",newSize)},()=>{setTimeout(()=>{this.contentElement.scroll({top:scrollValue})},10)})},"onPointerdown"),onDblclick:__name(()=>{this.style.width="",tweakerStorage.changeSize("tweaker",null)},"onDblclick")})]})}connectedCallback(){super.connectedCallback(),window.addEventListener("beforeunload",__privateGet(this,_unloadListener)),Store.activeStores.subscribe(__privateGet(this,_storesChangeListener2)),tweakerStorage.changedSizes("tweaker")&&(this.style.width=tweakerStorage.changedSizes("tweaker")+"px")}disconnectedCallback(){window.removeEventListener("beforeunload",__privateGet(this,_unloadListener)),tweakerStorage.save(),Store.activeStores.unsubscribe(__privateGet(this,_storesChangeListener2))}};_scrollRestored=new WeakMap,_unloadListener=new WeakMap,_storesChangeListener2=new WeakMap,__name(_TweakerElement,"TweakerElement");let TweakerElement=_TweakerElement;intersector_index.isBrowser&&!customElements.get("e-tweaker")&&customElements.define("e-tweaker",TweakerElement);intersector_index.isBrowser&&document.body.appendChild(new TweakerElement);