aptechka 0.13.1 → 0.15.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 (113) hide show
  1. package/lib/{Animation-De9aUv3b.cjs → Animation-DI864E0i.cjs} +1 -1
  2. package/lib/{Animation-NAGXiFv5.js → Animation-w6BLTCum.js} +1 -1
  3. package/lib/{Damped-DbJKrUIf.js → Damped-DEHDEq-b.js} +1 -1
  4. package/lib/{Damped-DYJ6Z0xo.cjs → Damped-ipnDc0iX.cjs} +1 -1
  5. package/lib/Store-CDb6RMce.cjs +1 -0
  6. package/lib/Store-OTdcl6SX.js +134 -0
  7. package/lib/{Tweened-BkkD9s4n.cjs → Tweened-B1TfANfR.cjs} +1 -1
  8. package/lib/{Tweened-DOSHLCZa.js → Tweened-C52xXDLY.js} +1 -1
  9. package/lib/{Viewport-Cv4TRGiv.cjs → Viewport-BDPsnAF4.cjs} +1 -1
  10. package/lib/{Viewport-B55BvLsV.js → Viewport-taEXS8Uv.js} +1 -1
  11. package/lib/animation/index.cjs +1 -1
  12. package/lib/animation/index.js +3 -3
  13. package/lib/attribute/index.cjs +1 -1
  14. package/lib/attribute/index.js +13 -13
  15. package/lib/canvas/index.cjs +1 -1
  16. package/lib/canvas/index.js +36 -39
  17. package/lib/class-linked-status/index.cjs +1 -1
  18. package/lib/class-linked-status/index.js +1 -1
  19. package/lib/controls/index.cjs +1 -1
  20. package/lib/controls/index.js +3 -3
  21. package/lib/css-property/index.cjs +1 -1
  22. package/lib/css-property/index.js +4 -4
  23. package/lib/dev/index.cjs +1 -1
  24. package/lib/dev/index.js +1 -1
  25. package/lib/device/index.cjs +1 -1
  26. package/lib/device/index.js +1 -1
  27. package/lib/{dom-P5QbAASX.js → dom-0S_WDL4g.js} +2 -2
  28. package/lib/element-constructor/index.cjs +1 -1
  29. package/lib/element-constructor/index.js +848 -122
  30. package/lib/element-resizer/index.js +8 -8
  31. package/lib/en3/index.cjs +8 -1
  32. package/lib/en3/index.js +372 -4
  33. package/lib/file-BEr-o55N.js +31 -0
  34. package/lib/file-C9BbxzVU.cjs +1 -0
  35. package/lib/image/index.cjs +1 -1
  36. package/lib/image/index.js +1 -1
  37. package/lib/intersector/index.js +7 -7
  38. package/lib/jss-CjccJC-K.js +21 -0
  39. package/lib/jss-GJLvaNfT.cjs +1 -0
  40. package/lib/ladder/index.cjs +1 -1
  41. package/lib/ladder/index.js +1 -1
  42. package/lib/layout-box/index.js +14 -14
  43. package/lib/media/index.cjs +1 -1
  44. package/lib/media/index.js +1 -1
  45. package/lib/need_redo_tweaker/index.cjs +18 -0
  46. package/lib/need_redo_tweaker/index.js +1337 -0
  47. package/lib/pointer/index.cjs +1 -1
  48. package/lib/pointer/index.js +3 -3
  49. package/lib/popover/index.cjs +1 -1
  50. package/lib/popover/index.js +68 -76
  51. package/lib/scroll/index.cjs +1 -1
  52. package/lib/scroll/index.js +577 -610
  53. package/lib/scroll-entries/index.js +15 -15
  54. package/lib/sequence/index.cjs +1 -1
  55. package/lib/sequence/index.js +1 -1
  56. package/lib/slicer/index.cjs +5 -5
  57. package/lib/slicer/index.js +55 -86
  58. package/lib/source/index.cjs +2 -2
  59. package/lib/source/index.js +154 -62
  60. package/lib/store/index.cjs +1 -1
  61. package/lib/store/index.js +71 -37
  62. package/lib/ticker/index.js +1 -1
  63. package/lib/utils/index.cjs +1 -1
  64. package/lib/utils/index.js +67 -65
  65. package/lib/video/index.cjs +1 -1
  66. package/lib/video/index.js +1 -1
  67. package/package.json +7 -72
  68. package/lib/Composed-C_4slJQ6.cjs +0 -1
  69. package/lib/Composed-CfWa-69I.js +0 -31
  70. package/lib/Derived-BIBU-y7Z.cjs +0 -1
  71. package/lib/Derived-Vo_RsJfi.js +0 -23
  72. package/lib/SourceManager-B6wZpXUZ.js +0 -104
  73. package/lib/SourceManager-CfHcGLUa.cjs +0 -1
  74. package/lib/Store-C46i0nvr.js +0 -137
  75. package/lib/Store-npaZHvX4.cjs +0 -1
  76. package/lib/accordion/index.cjs +0 -1
  77. package/lib/accordion/index.js +0 -167
  78. package/lib/checkbox/index.cjs +0 -1
  79. package/lib/checkbox/index.js +0 -112
  80. package/lib/createStylesheet-COAZH1Mw.js +0 -8
  81. package/lib/createStylesheet-Csfmh-MH.cjs +0 -1
  82. package/lib/createTheme-CHnsCgAr.js +0 -15
  83. package/lib/createTheme-Cfaw9UmV.cjs +0 -1
  84. package/lib/en3/helpers/index.cjs +0 -1
  85. package/lib/en3/helpers/index.js +0 -1870
  86. package/lib/en3/libs/index.cjs +0 -1
  87. package/lib/en3/libs/index.js +0 -200
  88. package/lib/en3/loaders/index.cjs +0 -1
  89. package/lib/en3/loaders/index.js +0 -1742
  90. package/lib/en3/misc/index.cjs +0 -10
  91. package/lib/en3/misc/index.js +0 -110
  92. package/lib/en3/utils/index.cjs +0 -1
  93. package/lib/en3/utils/index.js +0 -20
  94. package/lib/en3-C1fLmsjs.cjs +0 -8
  95. package/lib/en3-x-Ki30MY.js +0 -344
  96. package/lib/events-BGwqaxVW.cjs +0 -1
  97. package/lib/events-CJTUMSLU.js +0 -20
  98. package/lib/file-EevnUtRj.cjs +0 -1
  99. package/lib/file-lxi_oXJf.js +0 -13
  100. package/lib/index-BuAuBz2_.cjs +0 -9
  101. package/lib/index-CenF0JbH.js +0 -261
  102. package/lib/modal/index.cjs +0 -1
  103. package/lib/modal/index.js +0 -133
  104. package/lib/select/index.cjs +0 -1
  105. package/lib/select/index.js +0 -7
  106. package/lib/tags-6_ETuR75.cjs +0 -1
  107. package/lib/tags-BL3kQp9o.js +0 -833
  108. package/lib/theme/index.cjs +0 -1
  109. package/lib/theme/index.js +0 -25
  110. package/lib/traverseMaterials-CD_3_56D.cjs +0 -1
  111. package/lib/traverseMaterials-mGC2_FkG.js +0 -29
  112. package/lib/tweaker/index.cjs +0 -10
  113. package/lib/tweaker/index.js +0 -989
@@ -0,0 +1,1337 @@
1
+ var We = (a) => {
2
+ throw TypeError(a);
3
+ };
4
+ var Pe = (a, n, t) => n.has(a) || We("Cannot " + t);
5
+ var e = (a, n, t) => (Pe(a, n, "read from private field"), t ? t.call(a) : n.get(a)), i = (a, n, t) => n.has(a) ? We("Cannot add the same private member more than once") : n instanceof WeakSet ? n.add(a) : n.set(a, t), o = (a, n, t, s) => (Pe(a, n, "write to private field"), s ? s.call(a, t) : n.set(a, t), t), c = (a, n, t) => (Pe(a, n, "access private method"), t);
6
+ import { i as Ee } from "../browser-0zX67oeU.js";
7
+ import { s as L, a as _, S as qe } from "../Store-OTdcl6SX.js";
8
+ import { d as Xe, a as ft, c as wt } from "../file-BEr-o55N.js";
9
+ import { d as vt } from "../function-C10DGppn.js";
10
+ import { s as Ue } from "../gestures-D2Fdra_G.js";
11
+ import "../ticker/index.js";
12
+ import { createTheme as bt, style as yt, createStylesheet as w, element as u, label as Ge, span as $e, slot as te, input as Ce, a as kt, div as g, button as O } from "../element-constructor/index.js";
13
+ import { a as St } from "../Viewport-taEXS8Uv.js";
14
+ import { c as xt } from "../math-BOBiC4TN.js";
15
+ import { n as Je, t as Et } from "../polyfills-X6KXuHg-.js";
16
+ import { elementResizer as Ye } from "../element-resizer/index.js";
17
+ import { g as Ct } from "../style-j2TwriJ_.js";
18
+ const h = bt(
19
+ {
20
+ colorMain: "#1c1c1c",
21
+ colorMainAux: "#282828",
22
+ colorFont: "#ffffff",
23
+ colorActive: "#00E5B0",
24
+ borderRadius: "12px",
25
+ borderRadiusSmall: "4px"
26
+ },
27
+ { prefix: "aptechka-" }
28
+ );
29
+ if (Ee) {
30
+ const a = yt({
31
+ ":root": h.style
32
+ }).node;
33
+ a.setAttribute("data-permanent", ""), document.head.appendChild(a);
34
+ }
35
+ const Qe = '<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>', et = '<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>', zt = '<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>', Tt = '<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>', tt = `<svg
36
+ xmlns="http://www.w3.org/2000/svg"
37
+ width="32"
38
+ height="32"
39
+ viewBox="0 0 24 24"
40
+ >
41
+ <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" />
42
+ </svg>
43
+ `;
44
+ var A, y, C;
45
+ class Lt {
46
+ constructor() {
47
+ i(this, A);
48
+ i(this, y);
49
+ i(this, C);
50
+ this.scrollValue = 0, o(this, A, ""), o(this, y, []), o(this, C, {}), o(this, A, L.name + "-tweaker");
51
+ }
52
+ openPanel(n) {
53
+ e(this, y).includes(n) || e(this, y).push(n);
54
+ }
55
+ closePanel(n) {
56
+ o(this, y, e(this, y).filter((t) => t !== n));
57
+ }
58
+ isPanelOpened(n) {
59
+ return e(this, y).includes(n);
60
+ }
61
+ changedSizes(n) {
62
+ return e(this, C)[n];
63
+ }
64
+ changeSize(n, t) {
65
+ t ? e(this, C)[n] = t : delete e(this, C)[n];
66
+ }
67
+ save() {
68
+ const n = {
69
+ openedPanels: e(this, y),
70
+ changedSizes: e(this, C),
71
+ scrollValue: this.scrollValue
72
+ };
73
+ localStorage.setItem(e(this, A), JSON.stringify(n)), L.saveState();
74
+ }
75
+ load() {
76
+ L.loadState();
77
+ const n = localStorage.getItem(e(this, A));
78
+ if (n)
79
+ try {
80
+ const t = JSON.parse(n);
81
+ t.openedPanels && o(this, y, t.openedPanels), t.changedSizes && o(this, C, t.changedSizes), t.scrollValue && (this.scrollValue = t.scrollValue);
82
+ } catch (t) {
83
+ console.error(t);
84
+ }
85
+ }
86
+ }
87
+ A = new WeakMap(), y = new WeakMap(), C = new WeakMap();
88
+ const v = new Lt(), Rt = '<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>', Mt = w({
89
+ ":host": {
90
+ position: "relative",
91
+ display: "inline-block",
92
+ width: "30px",
93
+ height: "30px",
94
+ borderRadius: h.borderRadiusSmall.var,
95
+ overflow: "hidden"
96
+ },
97
+ "label, .fake": {
98
+ display: "block"
99
+ },
100
+ "label, .fake, .default": {
101
+ width: "100%",
102
+ height: "100%"
103
+ },
104
+ ".real": {
105
+ position: "absolute",
106
+ top: "0",
107
+ left: "0",
108
+ width: "0px",
109
+ height: "0px",
110
+ visibility: "hidden",
111
+ margin: "0"
112
+ },
113
+ ".default": {
114
+ display: "flex",
115
+ alignItems: "center",
116
+ justifyContent: "center",
117
+ backgroundColor: h.colorMainAux.var
118
+ },
119
+ ".default svg": {
120
+ width: "60%",
121
+ height: "60%",
122
+ fill: h.colorFont.var,
123
+ opacity: 0,
124
+ transition: "var(--duration-short)"
125
+ },
126
+ ":host(.checked) .default svg": {
127
+ opacity: 1
128
+ }
129
+ });
130
+ var R, Z, P, ie;
131
+ const Ke = class Ke extends HTMLElement {
132
+ constructor() {
133
+ super();
134
+ i(this, P);
135
+ i(this, R, null);
136
+ i(this, Z);
137
+ this.attachShadow({ mode: "open" }).adoptedStyleSheets.push(Mt), o(this, Z, this.attachInternals()), u(this, {
138
+ children: Ge({
139
+ children: [
140
+ $e({
141
+ class: "fake",
142
+ children: te({
143
+ children: [
144
+ $e({
145
+ class: "default",
146
+ children: [Rt]
147
+ })
148
+ ]
149
+ })
150
+ }),
151
+ Ce({
152
+ ref: (s) => {
153
+ o(this, R, s), s.required = this.hasAttribute("required"), s.value = this.getAttribute("value") || "", s.checked = this.hasAttribute("checked"), s.name = this.getAttribute("name") || "", c(this, P, ie).call(this);
154
+ },
155
+ class: "real",
156
+ type: "checkbox",
157
+ onChange: () => {
158
+ c(this, P, ie).call(this), this.dispatchEvent(
159
+ new Event("change", {
160
+ composed: !0
161
+ })
162
+ );
163
+ }
164
+ })
165
+ ]
166
+ })
167
+ });
168
+ }
169
+ get checked() {
170
+ return e(this, R).checked;
171
+ }
172
+ set checked(t) {
173
+ e(this, R).checked = t, c(this, P, ie).call(this);
174
+ }
175
+ get value() {
176
+ return e(this, R).value;
177
+ }
178
+ set value(t) {
179
+ e(this, R).value = t, c(this, P, ie).call(this);
180
+ }
181
+ };
182
+ R = new WeakMap(), Z = new WeakMap(), P = new WeakSet(), ie = function() {
183
+ this.checked ? e(this, Z).setFormValue(this.value) : e(this, Z).setFormValue(null), this.classList.toggle("checked", this.checked);
184
+ }, Ke.formAssociated = !0;
185
+ let Ve = Ke;
186
+ customElements.get("e-checkbox") || customElements.define("e-checkbox", Ve);
187
+ var M;
188
+ class se extends HTMLElement {
189
+ constructor(...t) {
190
+ super();
191
+ i(this, M);
192
+ o(this, M, t);
193
+ }
194
+ addStore(t) {
195
+ e(this, M).push(t);
196
+ }
197
+ get firstStore() {
198
+ return e(this, M)[0];
199
+ }
200
+ get stores() {
201
+ return e(this, M);
202
+ }
203
+ updateStores(t) {
204
+ e(this, M).forEach((s) => {
205
+ s.current = t;
206
+ });
207
+ }
208
+ }
209
+ M = new WeakMap();
210
+ const Ft = w({
211
+ ":host": {
212
+ width: "100%",
213
+ display: "inline-flex",
214
+ height: "max-content"
215
+ },
216
+ "e-checkbox": {
217
+ "--size": "calc(var(--height-input) * 0.8)",
218
+ width: "var(--size)",
219
+ height: "var(--size)",
220
+ borderRadius: h.borderRadiusSmall.var
221
+ }
222
+ });
223
+ class st extends se {
224
+ constructor(...n) {
225
+ super(...n), this.attachShadow({ mode: "open" }).adoptedStyleSheets.push(Ft), u(this, {
226
+ children: [
227
+ u("e-checkbox", {
228
+ onChange: (s) => {
229
+ this.updateStores(s.currentTarget.checked);
230
+ },
231
+ ref: (s) => {
232
+ this.firstStore.subscribe((r) => {
233
+ s.checked = r.current;
234
+ });
235
+ }
236
+ })
237
+ ]
238
+ });
239
+ }
240
+ }
241
+ customElements.get("e-tweaker-boolean-manager") || customElements.define(
242
+ "e-tweaker-boolean-manager",
243
+ st
244
+ );
245
+ const It = w({
246
+ ":host": {
247
+ width: "100%",
248
+ display: "inline-flex",
249
+ height: "max-content"
250
+ },
251
+ input: {
252
+ width: "100%",
253
+ height: "var(--height-input)",
254
+ padding: "0",
255
+ background: "none",
256
+ borderRadius: h.borderRadius.var,
257
+ border: "none",
258
+ blockSize: "unset"
259
+ },
260
+ "input::-webkit-color-swatch, input::-webkit-color-swatch-wrapper": {
261
+ boxSizing: "border-box",
262
+ padding: "0px",
263
+ border: "none",
264
+ borderRadius: h.borderRadius.var,
265
+ height: "calc(var(--height-input) * 0.93)"
266
+ }
267
+ });
268
+ class it extends se {
269
+ constructor(...n) {
270
+ super(...n), this.attachShadow({ mode: "open" }).adoptedStyleSheets.push(It), u(this, {
271
+ children: [
272
+ Ce({
273
+ type: "color",
274
+ value: this.firstStore,
275
+ onInput: (s) => {
276
+ this.updateStores(s.currentTarget.value);
277
+ }
278
+ })
279
+ ]
280
+ });
281
+ }
282
+ }
283
+ customElements.get("e-tweaker-color-manager") || customElements.define("e-tweaker-color-manager", it);
284
+ const At = w({
285
+ a: {
286
+ color: "inherit",
287
+ fontSize: "var(--font-size-small)"
288
+ }
289
+ });
290
+ class nt extends se {
291
+ constructor(...n) {
292
+ var s;
293
+ super(...n), this.attachShadow({ mode: "open" }).adoptedStyleSheets.push(At), u(this, {
294
+ children: [
295
+ kt({
296
+ href: this.firstStore,
297
+ target: (s = this.firstStore.__manager) != null && s.sameWindow ? "_self" : "_blank",
298
+ children: this.firstStore
299
+ })
300
+ ]
301
+ });
302
+ }
303
+ }
304
+ customElements.get("e-tweaker-link-manager") || customElements.define("e-tweaker-link-manager", nt);
305
+ const Pt = w({
306
+ ":host": {
307
+ width: "100%",
308
+ display: "flex",
309
+ alignItems: "center",
310
+ gap: "var(--gap-small)"
311
+ },
312
+ ".inputs-wrapper": {
313
+ display: "grid",
314
+ gap: "var(--gap-small)",
315
+ width: "100%"
316
+ },
317
+ input: {
318
+ boxSizing: "border-box",
319
+ outline: "none",
320
+ fontVariantNumeric: "tabular-nums",
321
+ fontFamily: "inherit",
322
+ color: "inherit",
323
+ border: "none",
324
+ fontSize: "var(--font-size-small)",
325
+ width: "100%",
326
+ height: "var(--height-input)",
327
+ margin: "0",
328
+ padding: "0 var(--gap-small)",
329
+ backgroundColor: "rgba(255, 255, 255, 0.1)",
330
+ borderRadius: h.borderRadius.var
331
+ },
332
+ ".drag": {
333
+ position: "relative",
334
+ width: "100%",
335
+ height: "calc(var(--height-input) * 0.2)",
336
+ display: "flex",
337
+ alignItems: "center"
338
+ },
339
+ ".drag::before": {
340
+ content: '""',
341
+ position: "absolute",
342
+ left: "0",
343
+ width: "100%",
344
+ zIndex: "-1",
345
+ height: "1px",
346
+ borderBottom: `1px solid ${h.colorFont.var}`,
347
+ transform: "translateY(-50%)",
348
+ opacity: "0.3"
349
+ },
350
+ ":host(.infinite) .drag::before": {
351
+ borderBottom: `1px dashed ${h.colorFont.var}`
352
+ },
353
+ ".drag-knob": {
354
+ "--size": "calc(var(--height-input) * 0.4)",
355
+ width: "var(--size)",
356
+ height: "var(--size)"
357
+ },
358
+ ".drag-knob-inner": {
359
+ width: "100%",
360
+ height: "100%",
361
+ backgroundColor: h.colorFont.var,
362
+ borderRadius: h.borderRadiusSmall.var,
363
+ transition: "opacity var(--duration-short)"
364
+ },
365
+ ":host(.infinite) .grabbing .drag-knob-inner": {
366
+ opacity: 0.3
367
+ }
368
+ });
369
+ var $, K, B, z, F, ne, re, E, V, oe, ae, p, D, He, Ne, ze, le;
370
+ class rt extends se {
371
+ constructor(...t) {
372
+ var r, l, d, m;
373
+ super(...t);
374
+ i(this, p);
375
+ i(this, $, []);
376
+ i(this, K, []);
377
+ i(this, B);
378
+ i(this, z);
379
+ i(this, F);
380
+ i(this, ne);
381
+ i(this, re);
382
+ i(this, E);
383
+ i(this, V, !1);
384
+ i(this, oe, (t) => {
385
+ const s = c(this, p, D).call(this, t);
386
+ return s.map((r, l) => {
387
+ const d = typeof r == "string" ? parseFloat(r) || e(this, z) : r, m = xt(d, e(this, z), e(this, F)), N = Et(m, e(this, B));
388
+ s[l] = N;
389
+ }), e(this, re) === "number" ? s[0] : s;
390
+ });
391
+ i(this, ae, () => {
392
+ c(this, p, D).call(this).map((t, s) => {
393
+ const r = e(this, $)[s];
394
+ r && (r.value = (t || 0).toString());
395
+ }), c(this, p, He).call(this);
396
+ });
397
+ i(this, le, () => {
398
+ c(this, p, He).call(this);
399
+ });
400
+ this.attachShadow({ mode: "open" }).adoptedStyleSheets.push(Pt), o(this, z, Je((r = this.firstStore.__manager) == null ? void 0 : r.min, -1 / 0)), o(this, F, Je((l = this.firstStore.__manager) == null ? void 0 : l.max, 1 / 0)), o(this, B, ((d = this.firstStore.__manager) == null ? void 0 : d.step) || 0.01), o(this, ne, ((m = this.firstStore.__manager) == null ? void 0 : m.ease) || 1), o(this, re, Array.isArray(this.firstStore.current) ? "array" : "number"), o(this, E, isFinite(e(this, F)) && isFinite(e(this, z))), u(this, {
401
+ class: e(this, E) ? "" : "infinite",
402
+ children: c(this, p, D).call(this).map((N, I) => g({
403
+ class: "inputs-wrapper",
404
+ children: [
405
+ Ce({
406
+ type: "number",
407
+ step: e(this, B),
408
+ min: e(this, z),
409
+ max: e(this, F),
410
+ ref: (b) => e(this, $).push(b),
411
+ value: N,
412
+ onChange: () => {
413
+ this.updateStores(
414
+ e(this, $).map((b) => parseFloat(b.value))
415
+ );
416
+ }
417
+ }),
418
+ g({
419
+ class: "drag",
420
+ children: [
421
+ g({
422
+ class: "drag-knob",
423
+ ref: (b) => e(this, K).push(b),
424
+ onPointerdown: (b) => {
425
+ b.preventDefault(), o(this, V, !0);
426
+ const Fe = c(this, p, D).call(this), ct = Fe[I], T = e(this, K)[I], dt = e(this, $)[I];
427
+ if (T && dt) {
428
+ const Ie = T.parentElement, ut = c(this, p, Ne).call(this);
429
+ Ie.classList.add("grabbing"), Ue(
430
+ (Ae) => {
431
+ const je = Ae.x - b.x, pt = e(this, E) ? Ie.offsetWidth / (ut || 1) : 1, gt = ct + je / pt * e(this, ne);
432
+ if (Fe[I] = gt, !e(this, E)) {
433
+ const mt = c(this, p, ze).call(this, T, 0);
434
+ T.style.transform = `translateX(${mt + je}px)`;
435
+ }
436
+ this.updateStores([...Fe]);
437
+ },
438
+ () => {
439
+ if (o(this, V, !1), !e(this, E)) {
440
+ const Ae = c(this, p, ze).call(this, T, 0);
441
+ T.style.transition = "transform 0.1s", T.style.transform = `translateX(${Ae}px)`, Ie.classList.remove("grabbing"), setTimeout(() => {
442
+ T.style.transition = "";
443
+ }, 100);
444
+ }
445
+ }
446
+ );
447
+ }
448
+ },
449
+ children: g({
450
+ class: "drag-knob-inner"
451
+ })
452
+ })
453
+ ]
454
+ })
455
+ ]
456
+ }))
457
+ });
458
+ }
459
+ connectedCallback() {
460
+ this.firstStore.addMiddleware(e(this, oe)), this.firstStore.subscribe(e(this, ae)), Ye.subscribe(this, e(this, le));
461
+ }
462
+ disconnectedCallback() {
463
+ this.firstStore.removeMiddleware(e(this, oe)), this.firstStore.unsubscribe(e(this, ae)), Ye.unsubscribe(e(this, le));
464
+ }
465
+ }
466
+ $ = new WeakMap(), K = new WeakMap(), B = new WeakMap(), z = new WeakMap(), F = new WeakMap(), ne = new WeakMap(), re = new WeakMap(), E = new WeakMap(), V = new WeakMap(), oe = new WeakMap(), ae = new WeakMap(), p = new WeakSet(), D = function(t = this.firstStore.current) {
467
+ return Array.isArray(t) ? t : [t];
468
+ }, He = function() {
469
+ c(this, p, D).call(this).map((t, s) => {
470
+ const r = e(this, K)[s];
471
+ if (r && (!e(this, V) || e(this, V) && e(this, E))) {
472
+ const l = c(this, p, ze).call(this, r, t);
473
+ r.style.transform = `translateX(${l}px)`;
474
+ }
475
+ });
476
+ }, Ne = function() {
477
+ return e(this, E) ? e(this, F) - e(this, z) : 0;
478
+ }, ze = function(t, s) {
479
+ const r = t.parentElement, l = c(this, p, Ne).call(this), d = l ? s / l : 0.5;
480
+ return (r.offsetWidth - t.offsetWidth) * d;
481
+ }, le = new WeakMap();
482
+ customElements.get("e-tweaker-number-manager") || customElements.define("e-tweaker-number-manager", rt);
483
+ const $t = w({
484
+ ":host": {
485
+ position: "relative"
486
+ },
487
+ ".head": {
488
+ width: "100%",
489
+ cursor: "default",
490
+ background: "none",
491
+ border: "none",
492
+ color: "inherit",
493
+ fontFamily: "inherit",
494
+ fontSize: "inherit",
495
+ fontWeight: "inherit",
496
+ textAlign: "start",
497
+ padding: "0",
498
+ margin: "0"
499
+ },
500
+ ".body": {
501
+ boxSizing: "border-box",
502
+ position: "var(--position, unset)",
503
+ top: "100%",
504
+ left: "0",
505
+ width: "100%",
506
+ overflow: "hidden",
507
+ transitionDuration: "var(--duration, var(--duration-short))",
508
+ transitionProperty: "height",
509
+ cursor: "default"
510
+ },
511
+ ".body-inner": {
512
+ display: "grid",
513
+ gap: "var(--gap, 0px)",
514
+ width: "100%",
515
+ paddingTop: "var(--gap, 0px)"
516
+ }
517
+ });
518
+ var j, W, k, H, q, J, Le, he, _e;
519
+ const Be = class Be extends HTMLElement {
520
+ constructor() {
521
+ super();
522
+ i(this, he);
523
+ i(this, j, null);
524
+ i(this, W, "");
525
+ i(this, k, null);
526
+ i(this, H, !1);
527
+ i(this, q);
528
+ i(this, J, null);
529
+ i(this, Le, () => {
530
+ Xe(this);
531
+ });
532
+ Ee && (this.attachShadow({ mode: "open" }).adoptedStyleSheets.push($t), o(this, j, this.attachInternals()), o(this, J, new ResizeObserver(e(this, Le))), u(this, {
533
+ children: [
534
+ O({
535
+ class: "head",
536
+ children: te({ name: "head" }),
537
+ onClick: () => {
538
+ this.opened ? this.close() : this.open();
539
+ }
540
+ }),
541
+ g({
542
+ class: "body",
543
+ style: {
544
+ height: "0px"
545
+ },
546
+ children: g({
547
+ class: "body-inner",
548
+ children: te()
549
+ }),
550
+ ref: (s) => {
551
+ o(this, k, s);
552
+ }
553
+ })
554
+ ]
555
+ }));
556
+ }
557
+ get value() {
558
+ return e(this, W);
559
+ }
560
+ set value(t) {
561
+ o(this, W, t), this.dispatchEvent(
562
+ new Event("change", {
563
+ bubbles: !0,
564
+ composed: !0
565
+ })
566
+ ), e(this, j).setFormValue(e(this, W));
567
+ }
568
+ get internals() {
569
+ return e(this, j);
570
+ }
571
+ get opened() {
572
+ return e(this, H);
573
+ }
574
+ open() {
575
+ clearTimeout(e(this, q)), o(this, H, !0), e(this, k).style.display = "grid", this.classList.add("triggered"), setTimeout(() => {
576
+ this.classList.add("opened"), e(this, k).style.height = e(this, k).scrollHeight + "px", c(this, he, _e).call(this);
577
+ }, 0);
578
+ }
579
+ close() {
580
+ o(this, H, !1), e(this, k).style.height = "0px", this.classList.remove("opened"), c(this, he, _e).call(this), o(this, q, setTimeout(() => {
581
+ this.classList.remove("triggered"), e(this, k).style.display = "none";
582
+ }, Ct(e(this, k))));
583
+ }
584
+ connectedCallback() {
585
+ e(this, J).observe(e(this, k));
586
+ }
587
+ disconnectedCallback() {
588
+ clearTimeout(e(this, q)), e(this, J).disconnect();
589
+ }
590
+ };
591
+ j = new WeakMap(), W = new WeakMap(), k = new WeakMap(), H = new WeakMap(), q = new WeakMap(), J = new WeakMap(), Le = new WeakMap(), he = new WeakSet(), _e = function() {
592
+ ft(this), this.dispatchEvent(
593
+ new CustomEvent("selectToggle", {
594
+ bubbles: !0,
595
+ composed: !0,
596
+ detail: {
597
+ opened: e(this, H)
598
+ }
599
+ })
600
+ );
601
+ }, Be.formAssociated = !0;
602
+ let De = Be;
603
+ customElements.get("e-select") || customElements.define("e-select", De);
604
+ var ce;
605
+ class ot extends HTMLElement {
606
+ constructor() {
607
+ super(...arguments);
608
+ i(this, ce, null);
609
+ }
610
+ get selectElement() {
611
+ return e(this, ce);
612
+ }
613
+ connectedCallback() {
614
+ var s, r;
615
+ const t = (r = (s = this.assignedSlot) == null ? void 0 : s.getRootNode()) == null ? void 0 : r.host;
616
+ t ? o(this, ce, t) : console.log(this, "e-select not found");
617
+ }
618
+ }
619
+ ce = new WeakMap();
620
+ const Vt = w({
621
+ ":host": {
622
+ width: "100%",
623
+ height: "40px",
624
+ display: "inline-flex",
625
+ alignItems: "center"
626
+ }
627
+ });
628
+ var Y, de, Oe;
629
+ class Ht extends ot {
630
+ constructor() {
631
+ super();
632
+ i(this, de);
633
+ i(this, Y, () => {
634
+ this.selectElement.value === this.value ? this.style.display = "none" : this.style.display = "";
635
+ });
636
+ Ee && (this.attachShadow({ mode: "open" }).adoptedStyleSheets.push(Vt), u(this, {
637
+ tabindex: 0,
638
+ onClick: () => {
639
+ c(this, de, Oe).call(this);
640
+ },
641
+ onKeydown: (s) => {
642
+ s.code === "Space" && c(this, de, Oe).call(this);
643
+ },
644
+ children: te()
645
+ }));
646
+ }
647
+ get value() {
648
+ return (this.hasAttribute("value") ? this.getAttribute("value") : this.innerText) || "";
649
+ }
650
+ connectedCallback() {
651
+ super.connectedCallback(), this.hasAttribute("default") && (this.selectElement.value || (this.selectElement.value = this.value)), this.selectElement.addEventListener("change", e(this, Y)), setTimeout(() => {
652
+ e(this, Y).call(this);
653
+ });
654
+ }
655
+ disconnectedCallback() {
656
+ this.selectElement.removeEventListener("change", e(this, Y));
657
+ }
658
+ }
659
+ Y = new WeakMap(), de = new WeakSet(), Oe = function() {
660
+ this.selectElement.value = this.value, this.selectElement.close();
661
+ };
662
+ customElements.get("e-select-option") || customElements.define("e-select-option", Ht);
663
+ const Nt = w({
664
+ ":host": {
665
+ width: "100%",
666
+ height: "40px",
667
+ display: "inline-flex",
668
+ alignItems: "center",
669
+ justifyContent: "space-between"
670
+ },
671
+ ".default-arrow": {
672
+ flexShrink: "0",
673
+ width: "var(--arrow-size, 1em)",
674
+ height: "var(--arrow-size, 1em)",
675
+ fill: `var(--arrow-color, ${h.colorMain.var})`,
676
+ transitionProperty: "transform",
677
+ transitionDuration: "var(--duration, var(--duration-short))"
678
+ },
679
+ ":host(.opened) .default-arrow": {
680
+ transform: "scaleY(-1)"
681
+ }
682
+ });
683
+ var ue, X, pe;
684
+ class Dt extends ot {
685
+ constructor() {
686
+ super();
687
+ i(this, ue, null);
688
+ i(this, X, () => {
689
+ const s = this.selectElement.shadowRoot.querySelector(
690
+ ".body slot"
691
+ ).assignedElements().find((r) => r.value === this.selectElement.value);
692
+ s && (e(this, ue).innerHTML = s.innerHTML);
693
+ });
694
+ i(this, pe, () => {
695
+ this.classList.toggle("opened", this.selectElement.opened);
696
+ });
697
+ Ee && (this.attachShadow({ mode: "open" }).adoptedStyleSheets.push(Nt), u(this, {
698
+ children: [
699
+ te(),
700
+ te({
701
+ name: "arrow",
702
+ children: u(tt, { class: "default-arrow" })
703
+ })
704
+ ]
705
+ }), this.slot = "head");
706
+ }
707
+ connectedCallback() {
708
+ super.connectedCallback(), o(this, ue, this.querySelector("[data-value-holder]") || this), this.selectElement.addEventListener("change", e(this, X)), e(this, X).call(this), this.selectElement.addEventListener("selectToggle", e(this, pe));
709
+ }
710
+ disconnectedCallback() {
711
+ this.selectElement.removeEventListener("change", e(this, X)), this.selectElement.removeEventListener("selectToggle", e(this, pe));
712
+ }
713
+ }
714
+ ue = new WeakMap(), X = new WeakMap(), pe = new WeakMap();
715
+ customElements.get("e-select-head") || customElements.define("e-select-head", Dt);
716
+ const _t = w({
717
+ "e-select": {
718
+ display: "block",
719
+ width: "100%",
720
+ "--arrow-color": h.colorFont.var
721
+ },
722
+ "e-select-head": {
723
+ width: "100%",
724
+ height: "var(--height-input)",
725
+ display: "flex",
726
+ alignItems: "center",
727
+ justifyContent: "space-between",
728
+ fontSize: "var(--font-size-small)"
729
+ },
730
+ "e-select-option": {
731
+ height: "var(--height-input)",
732
+ transitionDuration: "var(--duration-short)",
733
+ transitionProperty: "color",
734
+ fontSize: "var(--font-size-small)"
735
+ },
736
+ "e-select-option:hover": {
737
+ color: h.colorActive.var
738
+ },
739
+ svg: {
740
+ width: "16px",
741
+ height: "16px",
742
+ fill: h.colorFont.var,
743
+ transitionProperty: "transform",
744
+ transitionDuration: "var(--duration-short)"
745
+ },
746
+ ".opened svg": {
747
+ transform: "scaleY(-1)"
748
+ }
749
+ });
750
+ class at extends se {
751
+ constructor(...n) {
752
+ var r;
753
+ super(...n), this.attachShadow({ mode: "open" }).adoptedStyleSheets.push(_t);
754
+ const s = ((r = this.firstStore.__manager) == null ? void 0 : r.variants) || [];
755
+ u(this, {
756
+ children: u("e-select", {
757
+ value: this.firstStore,
758
+ onChange: (l) => {
759
+ this.updateStores(l.currentTarget.value);
760
+ },
761
+ lightChildren: [
762
+ u("e-select-head", {
763
+ lightChildren: [
764
+ $e({
765
+ "data-value-holder": ""
766
+ })
767
+ ]
768
+ }),
769
+ // @ts-ignore
770
+ ...s.map(
771
+ (l, d) => u("e-select-option", {
772
+ lightChildren: l,
773
+ default: d === 0 ? !0 : null
774
+ })
775
+ )
776
+ ]
777
+ })
778
+ });
779
+ }
780
+ }
781
+ customElements.get("e-tweaker-select-manager") || customElements.define("e-tweaker-select-manager", at);
782
+ const Ot = w({
783
+ ":host": {
784
+ width: "100%",
785
+ display: "flex",
786
+ alignItems: "center"
787
+ },
788
+ input: {
789
+ boxSizing: "border-box",
790
+ outline: "none",
791
+ fontVariantNumeric: "tabular-nums",
792
+ fontFamily: "inherit",
793
+ color: "inherit",
794
+ border: "none",
795
+ fontSize: "var(--font-size-small)",
796
+ height: "var(--height-input)",
797
+ width: "100%",
798
+ margin: "0",
799
+ padding: "0 var(--gap-small)",
800
+ backgroundColor: "rgba(255, 255, 255, 0.1)",
801
+ borderRadius: h.borderRadius.var
802
+ }
803
+ });
804
+ class lt extends se {
805
+ constructor(...n) {
806
+ super(...n), this.attachShadow({ mode: "open" }).adoptedStyleSheets.push(Ot), u(this, {
807
+ children: [
808
+ Ce({
809
+ class: "text-input",
810
+ type: "string",
811
+ value: this.firstStore,
812
+ onChange: (s) => {
813
+ this.updateStores(
814
+ s.currentTarget.value
815
+ );
816
+ }
817
+ })
818
+ ]
819
+ });
820
+ }
821
+ }
822
+ customElements.get("e-tweaker-string-manager") || customElements.define("e-tweaker-string-manager", lt);
823
+ const Zt = {
824
+ boolean: st,
825
+ color: it,
826
+ link: nt,
827
+ number: rt,
828
+ select: at,
829
+ string: lt
830
+ }, Kt = w({
831
+ ":host": {
832
+ display: "grid",
833
+ gridAutoFlow: "column",
834
+ gridTemplateColumns: "0.5fr 1fr",
835
+ alignItems: "center",
836
+ color: h.colorFont.var,
837
+ gap: "var(--gap-medium)"
838
+ },
839
+ ":host(.disabled)": {
840
+ pointerEvents: "none",
841
+ opacity: 0.5
842
+ },
843
+ ".head": {
844
+ fontSize: "var(--font-size-medium)",
845
+ display: "flex",
846
+ alignItems: "center",
847
+ gap: "var(--gap-extra-small)"
848
+ },
849
+ ".head-buttons": {
850
+ display: "flex"
851
+ },
852
+ ".head-button": {
853
+ width: "14px",
854
+ height: "14px",
855
+ padding: "0",
856
+ margin: "0",
857
+ border: "none",
858
+ background: "none",
859
+ fill: h.colorFont.var,
860
+ transitionDuration: "var(--duration-short)",
861
+ transitionProperty: "fill, opacity",
862
+ opacity: "0"
863
+ },
864
+ ":host(:hover) .head-button": {
865
+ opacity: "1"
866
+ },
867
+ ".head-button:hover": {
868
+ fill: h.colorActive.var
869
+ },
870
+ ".head-button svg": {
871
+ width: "100%",
872
+ height: "100%"
873
+ }
874
+ });
875
+ var S, U, G, Q, ee, ge, me;
876
+ class Ze extends HTMLElement {
877
+ constructor(t) {
878
+ var l, d;
879
+ super();
880
+ i(this, S, []);
881
+ i(this, U);
882
+ i(this, G);
883
+ i(this, Q, !1);
884
+ i(this, ee);
885
+ i(this, ge, () => {
886
+ _.current.find((t) => e(this, S).includes(t)) || this.remove();
887
+ });
888
+ i(this, me, (t) => {
889
+ e(this, Q) && ((t.metaKey || t.ctrlKey) && t.code === "KeyC" ? navigator.clipboard.writeText(e(this, S)[0].current) : (t.metaKey || t.ctrlKey) && t.code === "KeyR" && (e(this, S).forEach((s) => {
890
+ s.reset();
891
+ }), t.preventDefault()));
892
+ });
893
+ o(this, S, [t.store]), o(this, U, t.store.name), o(this, G, e(this, U).split(".").slice(-1).toString());
894
+ const s = ((l = t.store.__manager) == null ? void 0 : l.type) || "string";
895
+ o(this, ee, new Zt[s](
896
+ e(this, S)[0]
897
+ )), this.attachShadow({ mode: "open" }).adoptedStyleSheets.push(Kt), u(this, {
898
+ class: {
899
+ disabled: ((d = t.store.__manager) == null ? void 0 : d.disabled) || !1
900
+ },
901
+ onPointerleave: () => {
902
+ o(this, Q, !1);
903
+ },
904
+ onPointerenter: () => {
905
+ o(this, Q, !0);
906
+ },
907
+ children: [
908
+ g({
909
+ class: "head",
910
+ children: [
911
+ g({ class: "name", children: e(this, G) + ":" }),
912
+ g({
913
+ class: "head-buttons",
914
+ children: [
915
+ O({
916
+ class: "head-button",
917
+ children: et,
918
+ onClick: () => {
919
+ navigator.clipboard.writeText(e(this, S)[0].current);
920
+ }
921
+ }),
922
+ O({
923
+ class: "head-button",
924
+ children: Qe,
925
+ onClick: () => {
926
+ e(this, S).forEach((m) => {
927
+ m.reset();
928
+ });
929
+ }
930
+ })
931
+ ]
932
+ })
933
+ ]
934
+ }),
935
+ e(this, ee)
936
+ ]
937
+ });
938
+ }
939
+ get key() {
940
+ return e(this, U);
941
+ }
942
+ get name() {
943
+ return e(this, G);
944
+ }
945
+ get stores() {
946
+ return e(this, S);
947
+ }
948
+ addStore(t) {
949
+ e(this, ee).addStore(t);
950
+ }
951
+ connectedCallback() {
952
+ _.subscribe(e(this, ge)), addEventListener("keydown", e(this, me)), Xe(this);
953
+ }
954
+ disconnectedCallback() {
955
+ _.unsubscribe(e(this, ge)), removeEventListener("keydown", e(this, me));
956
+ }
957
+ }
958
+ S = new WeakMap(), U = new WeakMap(), G = new WeakMap(), Q = new WeakMap(), ee = new WeakMap(), ge = new WeakMap(), me = new WeakMap();
959
+ customElements.get("e-tweaker-field") || customElements.define("e-tweaker-field", Ze);
960
+ const Bt = w({
961
+ ".wrapper": {
962
+ boxSizing: "border-box",
963
+ backgroundColor: "rgba(255, 255, 255, 0.1)",
964
+ borderRadius: h.borderRadius.var
965
+ },
966
+ ".head": {
967
+ boxSizing: "border-box",
968
+ width: "100%",
969
+ height: "var(--tweaker-folder-height)",
970
+ paddingLeft: "var(--gap-medium)",
971
+ paddingRight: "var(--gap-medium)",
972
+ display: "flex",
973
+ alignItems: "center",
974
+ justifyContent: "space-between",
975
+ backgroundColor: h.colorMainAux.var,
976
+ borderRadius: h.borderRadius.var
977
+ },
978
+ ".name": {
979
+ fontSize: "var(--font-size-large)",
980
+ color: h.colorFont.var
981
+ },
982
+ ".body": {
983
+ display: "none",
984
+ overflow: "hidden",
985
+ "@supports (height: calc-size(auto))": {
986
+ height: "0"
987
+ }
988
+ },
989
+ ":host(.transition-allowed) .body": {
990
+ transition: "height var(--duration-short), display var(--duration-short) allow-discrete"
991
+ },
992
+ ":host(.opened) .body": {
993
+ height: "calc-size(auto)",
994
+ display: "block",
995
+ "@starting-style": {
996
+ height: "0"
997
+ }
998
+ },
999
+ ".body-content": {
1000
+ boxSizing: "border-box",
1001
+ padding: "var(--gap-large)",
1002
+ display: "grid",
1003
+ gap: "var(--gap-medium)"
1004
+ },
1005
+ ".arrow": {
1006
+ width: "20px",
1007
+ height: "20px",
1008
+ fill: h.colorFont.var,
1009
+ transition: "transform var(--duration-short)"
1010
+ },
1011
+ ".opened .arrow": {
1012
+ transform: "scaleY(-1)"
1013
+ }
1014
+ });
1015
+ var x, fe, f, we, ve, be, ye, Re;
1016
+ const Me = class Me extends HTMLElement {
1017
+ constructor(t) {
1018
+ super();
1019
+ i(this, x);
1020
+ i(this, fe, new qe(null));
1021
+ i(this, f, new qe([]));
1022
+ i(this, we);
1023
+ i(this, ve, null);
1024
+ i(this, be, null);
1025
+ i(this, ye, null);
1026
+ i(this, Re, (t) => {
1027
+ let s = [], r = [];
1028
+ t.forEach((l) => {
1029
+ s = [...s, ...l.removedNodes], r = [...r, ...l.addedNodes];
1030
+ }), e(this, f).current = e(this, f).current.filter(
1031
+ (l) => !s.includes(l)
1032
+ ), e(this, x) && !e(this, f).current.length && !r.length && this.remove();
1033
+ });
1034
+ this.attachShadow({ mode: "open" }).adoptedStyleSheets.push(Bt), o(this, x, t.key), o(this, we, new MutationObserver(e(this, Re))), u(this, {
1035
+ children: [
1036
+ g({
1037
+ class: "wrapper",
1038
+ children: [
1039
+ g({
1040
+ class: "head",
1041
+ onClick: (r) => {
1042
+ this.classList.toggle("opened"), this.classList.contains("opened") ? v.openPanel(e(this, x)) : v.closePanel(e(this, x));
1043
+ },
1044
+ children: [
1045
+ e(this, x) ? g({
1046
+ class: "name",
1047
+ children: [e(this, x).split(".").slice(-1).toString()]
1048
+ }) : null,
1049
+ e(this, fe),
1050
+ u(tt, {
1051
+ class: "arrow"
1052
+ })
1053
+ ]
1054
+ }),
1055
+ g({
1056
+ class: "body",
1057
+ ref: (r) => {
1058
+ o(this, ve, r);
1059
+ },
1060
+ children: g({
1061
+ class: "body-content",
1062
+ children: e(this, f),
1063
+ ref: (r) => {
1064
+ o(this, be, r), o(this, ye, r.firstElementChild);
1065
+ }
1066
+ })
1067
+ })
1068
+ ]
1069
+ })
1070
+ ]
1071
+ }), t != null && t.storeBox && this.handleStore(t.storeBox);
1072
+ }
1073
+ get key() {
1074
+ return e(this, x);
1075
+ }
1076
+ get head() {
1077
+ return e(this, fe);
1078
+ }
1079
+ get content() {
1080
+ return e(this, f);
1081
+ }
1082
+ get bodyElement() {
1083
+ return e(this, ve);
1084
+ }
1085
+ get contentElement() {
1086
+ return e(this, be);
1087
+ }
1088
+ connectedCallback() {
1089
+ v.isPanelOpened(e(this, x)) && this.classList.add("opened"), setTimeout(() => {
1090
+ this.classList.add("transition-allowed");
1091
+ }), e(this, we).observe(e(this, ye), {
1092
+ childList: !0
1093
+ });
1094
+ }
1095
+ handleStore(t) {
1096
+ if (t.remainingFolders.length) {
1097
+ const r = t.store.name.split("."), l = r.slice(0, r.length - t.remainingFolders.length).join("."), d = e(this, f).current.find((m) => m.key === l);
1098
+ d instanceof Me ? d.handleStore({
1099
+ store: t.store,
1100
+ remainingFolders: t.remainingFolders.slice(1)
1101
+ }) : e(this, f).current = [
1102
+ ...e(this, f).current,
1103
+ new Me({
1104
+ key: l,
1105
+ storeBox: {
1106
+ store: t.store,
1107
+ remainingFolders: t.remainingFolders.slice(1)
1108
+ }
1109
+ })
1110
+ ];
1111
+ } else {
1112
+ const s = e(this, f).current.find(
1113
+ (r) => r.key === t.store.name
1114
+ );
1115
+ s instanceof Ze ? s.addStore(t.store) : e(this, f).current = [
1116
+ ...e(this, f).current,
1117
+ new Ze({
1118
+ store: t.store
1119
+ })
1120
+ ];
1121
+ }
1122
+ }
1123
+ };
1124
+ x = new WeakMap(), fe = new WeakMap(), f = new WeakMap(), we = new WeakMap(), ve = new WeakMap(), be = new WeakMap(), ye = new WeakMap(), Re = new WeakMap();
1125
+ let Te = Me;
1126
+ customElements.get("e-tweaker-folder") || customElements.define("e-tweaker-folder", Te);
1127
+ const jt = w({
1128
+ ":host": {
1129
+ "--tweaker-width": "550px",
1130
+ "--tweaker-offset": "20px",
1131
+ "--tweaker-folder-height": "35px",
1132
+ "--height-input": "25px",
1133
+ "--gap-large": "12px",
1134
+ "--gap-medium": "10px",
1135
+ "--gap-small": "8px",
1136
+ "--gap-extra-small": "4px",
1137
+ "--font-size-large": "16px",
1138
+ "--font-size-medium": "14px",
1139
+ "--font-size-small": "12px",
1140
+ "--duration-short": "0.2s",
1141
+ fontFamily: "sans-serif",
1142
+ position: "absolute",
1143
+ top: "var(--tweaker-offset)",
1144
+ right: "var(--tweaker-offset)",
1145
+ width: "var(--tweaker-width)",
1146
+ backgroundColor: h.colorMain.var,
1147
+ borderRadius: h.borderRadius.var,
1148
+ transition: "opacity 0.1s",
1149
+ zIndex: "100",
1150
+ opacity: "0.1"
1151
+ },
1152
+ ":host(:hover)": {
1153
+ opacity: "1 !important"
1154
+ },
1155
+ ".resize": {
1156
+ position: "absolute",
1157
+ left: "0",
1158
+ top: "0",
1159
+ width: "calc(var(--tweaker-width) * 0.025)",
1160
+ height: "100%",
1161
+ zIndex: "1",
1162
+ cursor: "ew-resize"
1163
+ },
1164
+ ".tweaker-buttons": {
1165
+ display: "flex",
1166
+ alignItems: "center",
1167
+ gap: "var(--gap-extra-small)"
1168
+ },
1169
+ ".tweaker-button": {
1170
+ width: "18px",
1171
+ height: "18px",
1172
+ padding: "0",
1173
+ margin: "0",
1174
+ background: "none",
1175
+ border: "none",
1176
+ fill: h.colorFont.var,
1177
+ transitionProperty: "fill",
1178
+ transitionDuration: "var(--duration-short)"
1179
+ },
1180
+ ".tweaker-button:hover": {
1181
+ fill: h.colorActive.var
1182
+ },
1183
+ ".tweaker-button svg": {
1184
+ width: "100%",
1185
+ height: "100%"
1186
+ },
1187
+ ":host .body-content": {
1188
+ maxHeight: `calc(
1189
+ 100dvh -
1190
+ (
1191
+ var(--tweaker-offset) * 2 +
1192
+ var(--tweaker-folder-height)
1193
+ )
1194
+ )`,
1195
+ overflow: "hidden auto",
1196
+ "-ms-overflow-style": "none",
1197
+ "scrollbar-width": "none"
1198
+ },
1199
+ ":host .body-content::-webkit-scrollbar": {
1200
+ display: "none"
1201
+ },
1202
+ [`@media ${St["<=mobile"]}`]: {
1203
+ ":host": {
1204
+ position: "absolute",
1205
+ top: "0",
1206
+ right: "0",
1207
+ width: "100% !important",
1208
+ borderTopLeftRadius: "0",
1209
+ borderTopRightRadius: "0"
1210
+ },
1211
+ ":host .body-content": {
1212
+ maxHeight: `calc(
1213
+ 100dvh -
1214
+ var(--tweaker-folder-height)
1215
+ )`
1216
+ }
1217
+ }
1218
+ });
1219
+ var ke, Se, xe;
1220
+ class ht extends Te {
1221
+ constructor() {
1222
+ super({
1223
+ key: ""
1224
+ });
1225
+ i(this, ke, !1);
1226
+ i(this, Se, () => {
1227
+ v.save();
1228
+ });
1229
+ i(this, xe, vt(() => {
1230
+ _.current.forEach((t) => {
1231
+ if (t.name) {
1232
+ const s = t.name.split(".");
1233
+ this.handleStore({
1234
+ store: t,
1235
+ remainingFolders: s.length > 1 ? s.slice(0, -1) : []
1236
+ });
1237
+ }
1238
+ }), e(this, ke) || (o(this, ke, !0), this.contentElement.scroll({
1239
+ top: v.scrollValue
1240
+ }), this.contentElement.addEventListener("scroll", () => {
1241
+ v.scrollValue = this.contentElement.scrollTop;
1242
+ }));
1243
+ }, 10));
1244
+ v.load(), this.shadowRoot.adoptedStyleSheets.push(jt), this.head.current = [
1245
+ g({
1246
+ class: "tweaker-buttons",
1247
+ onClick: (t) => {
1248
+ t.stopPropagation();
1249
+ },
1250
+ children: [
1251
+ O({
1252
+ class: "tweaker-button",
1253
+ children: Qe,
1254
+ onClick: () => {
1255
+ L.resetState();
1256
+ }
1257
+ }),
1258
+ O({
1259
+ class: ["tweaker-button"],
1260
+ children: [et],
1261
+ onClick: () => {
1262
+ navigator.clipboard.writeText(
1263
+ JSON.stringify(L.getState())
1264
+ );
1265
+ }
1266
+ }),
1267
+ O({
1268
+ class: "tweaker-button",
1269
+ children: zt,
1270
+ onClick: () => {
1271
+ wt(L.name, L.getState());
1272
+ }
1273
+ }),
1274
+ Ge({
1275
+ class: "tweaker-button",
1276
+ children: [
1277
+ Tt,
1278
+ Ce({
1279
+ type: "file",
1280
+ style: {
1281
+ display: "none"
1282
+ },
1283
+ onChange: (t) => {
1284
+ var l;
1285
+ const r = (l = t.currentTarget.files) == null ? void 0 : l[0];
1286
+ if (r) {
1287
+ const d = new FileReader();
1288
+ d.onload = (m) => {
1289
+ var I, b;
1290
+ const N = (b = (I = m.target) == null ? void 0 : I.result) == null ? void 0 : b.toString();
1291
+ N && L.loadState(N);
1292
+ }, d.readAsText(r);
1293
+ }
1294
+ }
1295
+ })
1296
+ ]
1297
+ })
1298
+ ]
1299
+ })
1300
+ ], u(this.bodyElement, {
1301
+ children: [
1302
+ g({
1303
+ class: "resize",
1304
+ onPointerdown: (t) => {
1305
+ t.preventDefault();
1306
+ const s = this.getBoundingClientRect(), r = this.contentElement.scrollTop;
1307
+ Ue(
1308
+ (l) => {
1309
+ const d = t.x - l.x, m = Math.max(400, s.width + d);
1310
+ this.style.width = m + "px", v.changeSize("tweaker", m);
1311
+ },
1312
+ () => {
1313
+ setTimeout(() => {
1314
+ this.contentElement.scroll({
1315
+ top: r
1316
+ });
1317
+ }, 10);
1318
+ }
1319
+ );
1320
+ },
1321
+ onDblclick: () => {
1322
+ this.style.width = "", v.changeSize("tweaker", null);
1323
+ }
1324
+ })
1325
+ ]
1326
+ });
1327
+ }
1328
+ connectedCallback() {
1329
+ super.connectedCallback(), window.addEventListener("beforeunload", e(this, Se)), _.subscribe(e(this, xe)), v.changedSizes("tweaker") && (this.style.width = v.changedSizes("tweaker") + "px");
1330
+ }
1331
+ disconnectedCallback() {
1332
+ window.removeEventListener("beforeunload", e(this, Se)), v.save(), _.unsubscribe(e(this, xe));
1333
+ }
1334
+ }
1335
+ ke = new WeakMap(), Se = new WeakMap(), xe = new WeakMap();
1336
+ customElements.get("e-tweaker") || customElements.define("e-tweaker", ht);
1337
+ Ee && document.body.appendChild(new ht());