builder-settings-types 0.0.325 → 0.0.329

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.
@@ -1,35 +1,35 @@
1
- const bt = "useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict";
2
- let mt = (h = 21) => {
3
- let t = "", e = crypto.getRandomValues(new Uint8Array(h |= 0));
4
- for (; h--; )
5
- t += bt[e[h] & 63];
1
+ const xt = "useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict";
2
+ let ft = (p = 21) => {
3
+ let t = "", e = crypto.getRandomValues(new Uint8Array(p |= 0));
4
+ for (; p--; )
5
+ t += xt[e[p] & 63];
6
6
  return t;
7
7
  };
8
- function wt(h) {
9
- let t = 0, e = h.parentElement;
8
+ function Lt(p) {
9
+ let t = 0, e = p.parentElement;
10
10
  for (; e; )
11
- e.classList.contains("setting-group") && e !== h && t++, e = e.parentElement;
11
+ e.classList.contains("setting-group") && e !== p && t++, e = e.parentElement;
12
12
  return t;
13
13
  }
14
- function Z(h, t) {
14
+ function _(p, t) {
15
15
  const e = Math.min(Math.max(t, 0), 5);
16
- h.setAttribute("data-nesting-level", e.toString()), e > 0 ? h.style.setProperty("--visual-indent", `${e * 2}px`) : (h.style.removeProperty("--visual-indent"), h.style.marginLeft = "");
16
+ p.setAttribute("data-nesting-level", e.toString()), e > 0 ? p.style.setProperty("--visual-indent", `${e * 2}px`) : (p.style.removeProperty("--visual-indent"), p.style.marginLeft = "");
17
17
  }
18
- function et(h, t = 0) {
19
- h.querySelectorAll(":scope > .setting-group-content > .setting-group").forEach((i) => {
18
+ function et(p, t = 0) {
19
+ p.querySelectorAll(":scope > .setting-group-content > .setting-group").forEach((i) => {
20
20
  const s = i, n = t + 1;
21
- Z(s, n), et(s, n);
21
+ _(s, n), et(s, n);
22
22
  });
23
23
  }
24
- const xt = {
24
+ const kt = {
25
25
  maxLevel: 5,
26
26
  spacingMultiplier: 1,
27
27
  visualIndentMultiplier: 2,
28
28
  enableAutoDetection: !0
29
29
  };
30
- class Lt {
30
+ class Mt {
31
31
  constructor(t = {}) {
32
- this.observedElements = /* @__PURE__ */ new Set(), this.config = { ...xt, ...t }, this.config.enableAutoDetection && this.setupAutoDetection();
32
+ this.observedElements = /* @__PURE__ */ new Set(), this.config = { ...kt, ...t }, this.config.enableAutoDetection && this.setupAutoDetection();
33
33
  }
34
34
  /**
35
35
  * Setup automatic detection using MutationObserver
@@ -63,7 +63,7 @@ class Lt {
63
63
  * Update nesting for a specific element
64
64
  */
65
65
  updateElementNesting(t) {
66
- const e = wt(t);
66
+ const e = Lt(t);
67
67
  this.applyNestingWithConfig(t, e);
68
68
  }
69
69
  /**
@@ -111,21 +111,21 @@ class Lt {
111
111
  this.observer && (this.observer.disconnect(), this.observer = void 0), this.observedElements.clear();
112
112
  }
113
113
  }
114
- const rt = new Lt();
115
- function Y(h) {
116
- if (h === null || typeof h != "object") return h;
117
- if (h instanceof Date) return new Date(h.getTime());
118
- if (h instanceof Array) return h.map((t) => Y(t));
119
- if (typeof h == "object") {
114
+ const rt = new Mt();
115
+ function Y(p) {
116
+ if (p === null || typeof p != "object") return p;
117
+ if (p instanceof Date) return new Date(p.getTime());
118
+ if (p instanceof Array) return p.map((t) => Y(t));
119
+ if (typeof p == "object") {
120
120
  const t = {};
121
- for (const e in h)
122
- Object.prototype.hasOwnProperty.call(h, e) && (t[e] = Y(h[e]));
121
+ for (const e in p)
122
+ Object.prototype.hasOwnProperty.call(p, e) && (t[e] = Y(p[e]));
123
123
  return t;
124
124
  }
125
- return h;
125
+ return p;
126
126
  }
127
- function kt(h) {
128
- switch (h) {
127
+ function It(p) {
128
+ switch (p) {
129
129
  case "number":
130
130
  return 0;
131
131
  case "text":
@@ -144,7 +144,7 @@ function kt(h) {
144
144
  }
145
145
  const M = class M {
146
146
  constructor(t = {}) {
147
- this.props = t, this.dataPropsPath = "", this.id = t.id || mt(), this.value = this.props.default, this.desktop = this.props.default, this.title = t.title || "", this.includeGetJson = t.includeGetJson !== void 0 ? t.includeGetJson : !0;
147
+ this.props = t, this.dataPropsPath = "", this.id = t.id || ft(), this.value = this.props.default, this.desktop = this.props.default, this.title = t.title || "", this.includeGetJson = t.includeGetJson !== void 0 ? t.includeGetJson : !0;
148
148
  }
149
149
  static SetUploadUrl(t) {
150
150
  globalThis.DefaultUploadUrl = t, M.DefaultUploadUrl = t;
@@ -206,7 +206,7 @@ const M = class M {
206
206
  const i = document.createElement("div");
207
207
  i.className = t.wrapperClassName || "";
208
208
  const s = document.createElement("input");
209
- this.inputEl = s, s.value = String(t.value || kt(t.inputType)), s.type = t.inputType, s.placeholder = t.placeholder || "", s.className = t.inputClassName || "", this.dataPropsPath && s.setAttribute("data-test-id", this.dataPropsPath);
209
+ this.inputEl = s, s.value = String(t.value || It(t.inputType)), s.type = t.inputType, s.placeholder = t.placeholder || "", s.className = t.inputClassName || "", this.dataPropsPath && s.setAttribute("data-test-id", this.dataPropsPath);
210
210
  const n = (a) => {
211
211
  const l = a.target;
212
212
  let r = l.value;
@@ -261,80 +261,80 @@ M.currentLanguageExplicitlySet = !1, M.languageChangeCallbacks = /* @__PURE__ */
261
261
  },
262
262
  { title: "Text Color", keys: ["text-dark", "text-light"] }
263
263
  ];
264
- let x = M;
265
- function G(h) {
266
- return h instanceof x;
264
+ let w = M;
265
+ function F(p) {
266
+ return p instanceof w;
267
267
  }
268
- function k(h) {
269
- return h instanceof $;
268
+ function L(p) {
269
+ return p instanceof H;
270
270
  }
271
- function ct(h) {
272
- return G(h) || k(h);
271
+ function ct(p) {
272
+ return F(p) || L(p);
273
273
  }
274
- const ot = (h, t, e) => {
274
+ const ot = (p, t, e) => {
275
275
  let i = !1, s = 0, n = 0, o = 0, a = 0;
276
- const l = (p) => {
277
- if (p.target.closest("button")) return;
278
- i = !0, s = p.clientX, n = p.clientY;
279
- const d = t.getBoundingClientRect();
280
- o = d.left, a = d.top, document.addEventListener("mousemove", r), document.addEventListener("mouseup", c), document.body.style.userSelect = "none";
281
- }, r = (p) => {
276
+ const l = (d) => {
277
+ if (d.target.closest("button")) return;
278
+ i = !0, s = d.clientX, n = d.clientY;
279
+ const h = t.getBoundingClientRect();
280
+ o = h.left, a = h.top, document.addEventListener("mousemove", r), document.addEventListener("mouseup", c), document.body.style.userSelect = "none";
281
+ }, r = (d) => {
282
282
  if (!i) return;
283
- const d = p.clientX - s, g = p.clientY - n, C = window.innerWidth, m = window.innerHeight, u = t.offsetWidth, v = t.offsetHeight;
284
- let f = o + d, y = a + g;
285
- f = Math.max(8, Math.min(C - u - 8, f)), y = Math.max(8, Math.min(m - v - 8, y)), t.style.left = `${f}px`, t.style.top = `${y}px`, e == null || e(f, y);
283
+ const h = d.clientX - s, g = d.clientY - n, f = window.innerWidth, m = window.innerHeight, u = t.offsetWidth, C = t.offsetHeight;
284
+ let v = o + h, y = a + g;
285
+ v = Math.max(8, Math.min(f - u - 8, v)), y = Math.max(8, Math.min(m - C - 8, y)), t.style.left = `${v}px`, t.style.top = `${y}px`, e == null || e(v, y);
286
286
  }, c = () => {
287
287
  i = !1, document.removeEventListener("mousemove", r), document.removeEventListener("mouseup", c), document.body.style.userSelect = "";
288
288
  };
289
- h.addEventListener("mousedown", l);
290
- }, F = (h) => {
291
- if (!h) return null;
292
- let t = h.trim();
289
+ p.addEventListener("mousedown", l);
290
+ }, G = (p) => {
291
+ if (!p) return null;
292
+ let t = p.trim();
293
293
  return !t.startsWith("#") || (t = t.slice(1), t.length === 3 && (t = t.split("").map((e) => e + e).join("")), !/^[0-9a-fA-F]{6}$/.test(t)) ? null : `#${t.toUpperCase()}`;
294
- }, X = (h, t, e) => `#${[h, t, e].map((i) => Math.max(0, Math.min(255, i)).toString(16).padStart(2, "0")).join("")}`, P = (h) => {
295
- const t = h.replace("#", ""), e = t.length === 3 ? t.split("").map((i) => i + i).join("") : t;
294
+ }, X = (p, t, e) => `#${[p, t, e].map((i) => Math.max(0, Math.min(255, i)).toString(16).padStart(2, "0")).join("")}`, P = (p) => {
295
+ const t = p.replace("#", ""), e = t.length === 3 ? t.split("").map((i) => i + i).join("") : t;
296
296
  return {
297
297
  r: parseInt(e.slice(0, 2), 16),
298
298
  g: parseInt(e.slice(2, 4), 16),
299
299
  b: parseInt(e.slice(4, 6), 16)
300
300
  };
301
- }, U = (h) => {
302
- const { r: t, g: e, b: i } = P(h), s = t / 255, n = e / 255, o = i / 255, a = Math.max(s, n, o), l = Math.min(s, n, o), r = a - l;
301
+ }, U = (p) => {
302
+ const { r: t, g: e, b: i } = P(p), s = t / 255, n = e / 255, o = i / 255, a = Math.max(s, n, o), l = Math.min(s, n, o), r = a - l;
303
303
  let c = 0;
304
304
  r !== 0 && (a === s ? c = (n - o) / r % 6 : a === n ? c = (o - s) / r + 2 : c = (s - n) / r + 4), c < 0 && (c += 6);
305
- const p = a === 0 ? 0 : r / a, d = a;
306
- return { h: c * 60, s: p, v: d };
307
- }, W = (h, t, e) => {
308
- const i = (h % 360 + 360) % 360, s = e * t, n = s * (1 - Math.abs(i / 60 % 2 - 1)), o = e - s;
305
+ const d = a === 0 ? 0 : r / a, h = a;
306
+ return { h: c * 60, s: d, v: h };
307
+ }, W = (p, t, e) => {
308
+ const i = (p % 360 + 360) % 360, s = e * t, n = s * (1 - Math.abs(i / 60 % 2 - 1)), o = e - s;
309
309
  let a = 0, l = 0, r = 0;
310
310
  return i < 60 ? (a = s, l = n, r = 0) : i < 120 ? (a = n, l = s, r = 0) : i < 180 ? (a = 0, l = s, r = n) : i < 240 ? (a = 0, l = n, r = s) : i < 300 ? (a = n, l = 0, r = s) : (a = s, l = 0, r = n), X(
311
311
  Math.round((a + o) * 255),
312
312
  Math.round((l + o) * 255),
313
313
  Math.round((r + o) * 255)
314
314
  );
315
- }, vt = (h, t, e) => {
315
+ }, Ct = (p, t, e) => {
316
316
  const i = e * (1 - t / 2), s = i === 0 || i === 1 ? 0 : (e - i) / Math.min(i, 1 - i);
317
- return { hue: h, sat: s, lightness: i };
318
- }, it = (h, t, e) => {
319
- const i = (1 - Math.abs(2 * e - 1)) * t, s = i * (1 - Math.abs(h / 60 % 2 - 1)), n = e - i / 2;
317
+ return { hue: p, sat: s, lightness: i };
318
+ }, it = (p, t, e) => {
319
+ const i = (1 - Math.abs(2 * e - 1)) * t, s = i * (1 - Math.abs(p / 60 % 2 - 1)), n = e - i / 2;
320
320
  let o = 0, a = 0, l = 0;
321
- return h < 60 ? (o = i, a = s, l = 0) : h < 120 ? (o = s, a = i, l = 0) : h < 180 ? (o = 0, a = i, l = s) : h < 240 ? (o = 0, a = s, l = i) : h < 300 ? (o = s, a = 0, l = i) : (o = i, a = 0, l = s), {
321
+ return p < 60 ? (o = i, a = s, l = 0) : p < 120 ? (o = s, a = i, l = 0) : p < 180 ? (o = 0, a = i, l = s) : p < 240 ? (o = 0, a = s, l = i) : p < 300 ? (o = s, a = 0, l = i) : (o = i, a = 0, l = s), {
322
322
  r: Math.round((o + n) * 255),
323
323
  g: Math.round((a + n) * 255),
324
324
  b: Math.round((l + n) * 255)
325
325
  };
326
- }, st = (h, t) => {
326
+ }, st = (p, t) => {
327
327
  const e = Math.max(0, Math.min(100, t)) / 100;
328
- if (h.startsWith("#")) {
329
- const { r: s, g: n, b: o } = P(h);
328
+ if (p.startsWith("#")) {
329
+ const { r: s, g: n, b: o } = P(p);
330
330
  return `rgba(${s}, ${n}, ${o}, ${e})`;
331
331
  }
332
- if (h.startsWith("rgba("))
333
- return h.replace(/,\s*[\d.]+\)$/, `, ${e})`);
334
- if (h.startsWith("rgb("))
335
- return h.replace("rgb(", "rgba(").replace(")", `, ${e})`);
336
- if (h.startsWith("hsl(")) {
337
- const s = h.match(/hsl\((\d+),\s*(\d+)%,\s*(\d+)%\)/);
332
+ if (p.startsWith("rgba("))
333
+ return p.replace(/,\s*[\d.]+\)$/, `, ${e})`);
334
+ if (p.startsWith("rgb("))
335
+ return p.replace("rgb(", "rgba(").replace(")", `, ${e})`);
336
+ if (p.startsWith("hsl(")) {
337
+ const s = p.match(/hsl\((\d+),\s*(\d+)%,\s*(\d+)%\)/);
338
338
  if (s) {
339
339
  const { r: n, g: o, b: a } = it(
340
340
  parseInt(s[1]),
@@ -344,8 +344,8 @@ const ot = (h, t, e) => {
344
344
  return `rgba(${n}, ${o}, ${a}, ${e})`;
345
345
  }
346
346
  }
347
- if (h.startsWith("hsla(")) {
348
- const s = h.match(/hsla\((\d+),\s*(\d+)%,\s*(\d+)%,\s*[\d.]+\)/);
347
+ if (p.startsWith("hsla(")) {
348
+ const s = p.match(/hsla\((\d+),\s*(\d+)%,\s*(\d+)%,\s*[\d.]+\)/);
349
349
  if (s) {
350
350
  const { r: n, g: o, b: a } = it(
351
351
  parseInt(s[1]),
@@ -355,13 +355,13 @@ const ot = (h, t, e) => {
355
355
  return `rgba(${n}, ${o}, ${a}, ${e})`;
356
356
  }
357
357
  }
358
- const i = F(h);
358
+ const i = G(p);
359
359
  if (i) {
360
360
  const { r: s, g: n, b: o } = P(i);
361
361
  return `rgba(${s}, ${n}, ${o}, ${e})`;
362
362
  }
363
- return h;
364
- }, Mt = (h) => [
363
+ return p;
364
+ }, Nt = (p) => [
365
365
  "red",
366
366
  "green",
367
367
  "blue",
@@ -385,18 +385,18 @@ const ot = (h, t, e) => {
385
385
  "teal",
386
386
  "fuchsia",
387
387
  "transparent"
388
- ].includes(h.toLowerCase()), ft = (h) => [
388
+ ].includes(p.toLowerCase()), yt = (p) => [
389
389
  /^#[0-9a-fA-F]{3,8}$/,
390
390
  /^rgba?\s*\([^)]+\)$/,
391
391
  /^hsla?\s*\([^)]+\)$/,
392
392
  /^[a-zA-Z]+$/
393
- ].some((e) => e.test(h.trim())), Nt = (h) => {
393
+ ].some((e) => e.test(p.trim())), St = (p) => {
394
394
  if (typeof document > "u")
395
- return ft(h) || !!F(h);
395
+ return yt(p) || !!G(p);
396
396
  const t = document.createElement("div");
397
- return t.style.color = h, t.style.color !== "";
398
- }, Ct = (h) => {
399
- const t = h.trim();
397
+ return t.style.color = p, t.style.color !== "";
398
+ }, Et = (p) => {
399
+ const t = p.trim();
400
400
  if (/^#[0-9A-Fa-f]{8}$/.test(t)) {
401
401
  const n = t.slice(1), o = parseInt(n.slice(0, 2), 16), a = parseInt(n.slice(2, 4), 16), l = parseInt(n.slice(4, 6), 16), r = parseInt(n.slice(6, 8), 16);
402
402
  return {
@@ -431,12 +431,12 @@ const ot = (h, t, e) => {
431
431
  opacity: Math.round(l * 100)
432
432
  };
433
433
  }
434
- return { color: F(t) || t, position: 0, opacity: 100 };
435
- }, ht = (h) => {
434
+ return { color: G(t) || t, position: 0, opacity: 100 };
435
+ }, ht = (p) => {
436
436
  const t = [];
437
437
  let e = "", i = 0;
438
- for (let s = 0; s < h.length; s++) {
439
- const n = h[s];
438
+ for (let s = 0; s < p.length; s++) {
439
+ const n = p[s];
440
440
  if (n === "(") i++;
441
441
  else if (n === ")") i--;
442
442
  else if (n === "," && i === 0) {
@@ -446,16 +446,16 @@ const ot = (h, t, e) => {
446
446
  e += n;
447
447
  }
448
448
  return e.trim() && t.push(e.trim()), t;
449
- }, dt = (h, t) => {
450
- const e = new RegExp(`${t}\\s*\\(`, "i"), i = h.match(e);
449
+ }, dt = (p, t) => {
450
+ const e = new RegExp(`${t}\\s*\\(`, "i"), i = p.match(e);
451
451
  if (!i) return null;
452
452
  const s = i.index + i[0].length;
453
453
  let n = 1, o = s;
454
- for (let a = s; a < h.length && n > 0; a++)
455
- h[a] === "(" ? n++ : h[a] === ")" && n--, o = a;
456
- return n === 0 ? h.substring(s, o) : null;
457
- }, It = (h) => {
458
- const t = h.split(" ")[0].toLowerCase();
454
+ for (let a = s; a < p.length && n > 0; a++)
455
+ p[a] === "(" ? n++ : p[a] === ")" && n--, o = a;
456
+ return n === 0 ? p.substring(s, o) : null;
457
+ }, Vt = (p) => {
458
+ const t = p.split(" ")[0].toLowerCase();
459
459
  return [
460
460
  "circle",
461
461
  "ellipse",
@@ -466,33 +466,33 @@ const ot = (h, t, e) => {
466
466
  "at",
467
467
  "contain",
468
468
  "cover"
469
- ].includes(t) ? !1 : /^#[0-9a-f]{3,8}$/i.test(t) || /^rgb/i.test(h) || /^hsl/i.test(h) || Mt(t);
470
- }, pt = (h) => {
469
+ ].includes(t) ? !1 : /^#[0-9a-f]{3,8}$/i.test(t) || /^rgb/i.test(p) || /^hsl/i.test(p) || Nt(t);
470
+ }, pt = (p) => {
471
471
  const t = [];
472
- return h.forEach((e, i) => {
472
+ return p.forEach((e, i) => {
473
473
  const s = e.trim();
474
474
  if (!s) return;
475
475
  let n = "", o = 0;
476
476
  const a = s.match(/^(.+?)\s+(\d+(?:\.\d+)?)%?\s*$/);
477
- a && ft(a[1].trim()) ? (n = a[1].trim(), o = parseFloat(a[2])) : (n = s, o = h.length === 1 ? 0 : i / (h.length - 1) * 100);
478
- const l = Ct(n);
477
+ a && yt(a[1].trim()) ? (n = a[1].trim(), o = parseFloat(a[2])) : (n = s, o = p.length === 1 ? 0 : i / (p.length - 1) * 100);
478
+ const l = Et(n);
479
479
  l.position = Math.max(0, Math.min(100, Math.round(o))), t.push(l);
480
480
  }), t;
481
- }, A = (h) => {
482
- const t = h.stops && h.stops.length ? h.stops : [{ color: "#000000", position: 0, opacity: 100 }];
481
+ }, A = (p) => {
482
+ const t = p.stops && p.stops.length ? p.stops : [{ color: "#000000", position: 0, opacity: 100 }];
483
483
  return {
484
- type: h.type && ["linear", "radial", "solid"].includes(h.type) ? h.type : "linear",
485
- angle: typeof h.angle == "number" ? h.angle : 90,
484
+ type: p.type && ["linear", "radial", "solid"].includes(p.type) ? p.type : "linear",
485
+ angle: typeof p.angle == "number" ? p.angle : 90,
486
486
  stops: t.map((e, i) => ({
487
487
  color: e.color || "#000000",
488
488
  position: typeof e.position == "number" ? e.position : t.length === 1 ? 0 : Math.round(i / (t.length - 1) * 100),
489
489
  opacity: e.opacity === void 0 || Number.isNaN(e.opacity) ? 100 : e.opacity
490
490
  }))
491
491
  };
492
- }, T = (h) => {
493
- const t = h.replace(/;$/, "").trim();
494
- if (Nt(t)) {
495
- const s = Ct(t);
492
+ }, T = (p) => {
493
+ const t = p.replace(/;$/, "").trim();
494
+ if (St(t)) {
495
+ const s = Et(t);
496
496
  return A({ type: "solid", angle: 0, stops: [s] });
497
497
  }
498
498
  const e = dt(t, "linear-gradient");
@@ -518,25 +518,25 @@ const ot = (h, t, e) => {
518
518
  }
519
519
  const i = dt(t, "radial-gradient");
520
520
  if (i) {
521
- const s = ht(i), n = s[0] && !It(s[0]) ? s.slice(1) : s, o = pt(n);
521
+ const s = ht(i), n = s[0] && !Vt(s[0]) ? s.slice(1) : s, o = pt(n);
522
522
  return o.length ? A({ type: "radial", angle: 0, stops: o }) : null;
523
523
  }
524
524
  return null;
525
- }, S = (h) => {
526
- if (h.type === "solid") {
527
- const e = h.stops[0], i = e.color;
525
+ }, S = (p) => {
526
+ if (p.type === "solid") {
527
+ const e = p.stops[0], i = e.color;
528
528
  if (i.startsWith("var(--"))
529
529
  return i;
530
530
  const s = e.opacity ?? 100, n = i.replace("#", ""), o = Math.round(s / 100 * 255).toString(16).toUpperCase().padStart(2, "0");
531
531
  return `#${n}${o}`;
532
532
  }
533
- const t = h.stops.map(
533
+ const t = p.stops.map(
534
534
  (e) => `${st(e.color, e.opacity ?? 100)} ${e.position}%`
535
535
  ).join(", ");
536
- return h.type === "radial" ? `radial-gradient(circle, ${t})` : `linear-gradient(${h.angle}deg, ${t})`;
537
- }, St = (h) => Math.round(h / 100 * 255).toString(16).toUpperCase().padStart(2, "0"), K = (h) => {
538
- if (h.type === "solid") {
539
- const t = h.stops[0];
536
+ return p.type === "radial" ? `radial-gradient(circle, ${t})` : `linear-gradient(${p.angle}deg, ${t})`;
537
+ }, Tt = (p) => Math.round(p / 100 * 255).toString(16).toUpperCase().padStart(2, "0"), K = (p) => {
538
+ if (p.type === "solid") {
539
+ const t = p.stops[0];
540
540
  if (t) {
541
541
  const e = t.color;
542
542
  if (e.startsWith("var(--"))
@@ -546,13 +546,13 @@ const ot = (h, t, e) => {
546
546
  if (i === 100)
547
547
  return e;
548
548
  {
549
- const s = St(i);
549
+ const s = Tt(i);
550
550
  return `${e}${s}`;
551
551
  }
552
552
  }
553
553
  return "#000000";
554
554
  }
555
- return h.type === "linear" ? `Linear ${h.angle}°` : "Radial Gradient";
555
+ return p.type === "linear" ? `Linear ${p.angle}°` : "Radial Gradient";
556
556
  }, q = class q {
557
557
  static defaults() {
558
558
  return {
@@ -563,7 +563,7 @@ const ot = (h, t, e) => {
563
563
  static normalizeList(t) {
564
564
  const e = /* @__PURE__ */ new Set(), i = [];
565
565
  return t.forEach((s) => {
566
- let n = F(s);
566
+ let n = G(s);
567
567
  n || T(s) && (n = s), n && (e.has(n) || (e.add(n), i.push(n)));
568
568
  }), i.slice(0, this.MAX_COLORS);
569
569
  }
@@ -609,7 +609,7 @@ const ot = (h, t, e) => {
609
609
  }
610
610
  static addColor(t, e) {
611
611
  if (!t) return;
612
- let i = F(t), s = "solid";
612
+ let i = G(t), s = "solid";
613
613
  if (i)
614
614
  s = "solid";
615
615
  else {
@@ -623,7 +623,7 @@ const ot = (h, t, e) => {
623
623
  };
624
624
  q.STORAGE_KEY = "settingsLib_recentColors", q.MAX_COLORS = 12, q.colors = null;
625
625
  let R = q;
626
- const at = (h, t) => {
626
+ const at = (p, t) => {
627
627
  const e = document.createElement("div");
628
628
  e.className = "color-picker-recent-section";
629
629
  const i = document.createElement("div");
@@ -632,9 +632,9 @@ const at = (h, t) => {
632
632
  s.className = "color-picker-tooltip", s.style.display = "none", e.appendChild(s);
633
633
  const n = () => {
634
634
  s.style.display = "none";
635
- }, o = (c, p) => {
636
- const d = c.getBoundingClientRect();
637
- s.textContent = p, s.style.left = `${d.left + d.width / 2}px`, s.style.top = `${d.bottom + 8}px`, s.style.display = "block";
635
+ }, o = (c, d) => {
636
+ const h = c.getBoundingClientRect();
637
+ s.textContent = d, s.style.left = `${h.left + h.width / 2}px`, s.style.top = `${h.bottom + 8}px`, s.style.display = "block";
638
638
  }, a = document.createElement("div");
639
639
  a.className = "color-picker-recent-grid";
640
640
  const l = document.createElement("div");
@@ -646,51 +646,51 @@ const at = (h, t) => {
646
646
  a.style.display = "none", l.style.display = "block";
647
647
  return;
648
648
  }
649
- a.style.display = "grid", l.style.display = "none", c.forEach((p) => {
650
- const d = document.createElement("button");
651
- d.type = "button", d.className = "color-picker-recent-swatch";
652
- const g = Vt(p);
653
- if (d.title = g, d.setAttribute("aria-label", `Use color: ${g}`), p.includes("gradient(")) {
654
- d.style.backgroundImage = p, d.style.backgroundColor = "transparent";
655
- const m = T(p);
656
- m && m.stops && m.stops.length > 0 && (d.style.borderColor = m.stops[0].color);
649
+ a.style.display = "grid", l.style.display = "none", c.forEach((d) => {
650
+ const h = document.createElement("button");
651
+ h.type = "button", h.className = "color-picker-recent-swatch";
652
+ const g = Pt(d);
653
+ if (h.title = g, h.setAttribute("aria-label", `Use color: ${g}`), d.includes("gradient(")) {
654
+ h.style.backgroundImage = d, h.style.backgroundColor = "transparent";
655
+ const m = T(d);
656
+ m && m.stops && m.stops.length > 0 && (h.style.borderColor = m.stops[0].color);
657
657
  } else
658
- d.style.backgroundColor = p, d.style.borderColor = p;
659
- d.addEventListener("mouseenter", () => o(d, g)), d.addEventListener("mouseleave", () => {
660
- n(), d.style.boxShadow = "";
661
- }), d.addEventListener("mousedown", () => {
662
- d.style.boxShadow = "0px 0px 0px 2px var(--grey40)";
663
- }), d.addEventListener("mouseup", () => {
658
+ h.style.backgroundColor = d, h.style.borderColor = d;
659
+ h.addEventListener("mouseenter", () => o(h, g)), h.addEventListener("mouseleave", () => {
660
+ n(), h.style.boxShadow = "";
661
+ }), h.addEventListener("mousedown", () => {
662
+ h.style.boxShadow = "0px 0px 0px 2px var(--grey40)";
663
+ }), h.addEventListener("mouseup", () => {
664
664
  setTimeout(() => {
665
- d.style.boxShadow = "";
665
+ h.style.boxShadow = "";
666
666
  }, 150);
667
- }), d.addEventListener("click", () => {
668
- n(), h(p);
669
- }), a.appendChild(d);
667
+ }), h.addEventListener("click", () => {
668
+ n(), p(d);
669
+ }), a.appendChild(h);
670
670
  });
671
671
  };
672
672
  return r(), { container: e, refresh: r };
673
- }, Vt = (h) => {
674
- const t = T(h);
673
+ }, Pt = (p) => {
674
+ const t = T(p);
675
675
  if (t)
676
676
  return K(t);
677
- const e = F(h);
677
+ const e = G(p);
678
678
  if (e) {
679
679
  const i = P(e);
680
680
  return `${e} (RGB: ${i.r}, ${i.g}, ${i.b})`;
681
681
  }
682
- return h;
683
- }, yt = `<svg width="13" height="13" viewBox="0 0 13 13" fill="none" xmlns="http://www.w3.org/2000/svg">
682
+ return p;
683
+ }, bt = `<svg width="13" height="13" viewBox="0 0 13 13" fill="none" xmlns="http://www.w3.org/2000/svg">
684
684
  <path fill-rule="evenodd" clip-rule="evenodd"
685
685
  d="M6.12347 4.96653L1.41158 0.254304C1.25449 0.102568 1.04409 0.0186071 0.825694 0.0205049C0.607302 0.0224037 0.398393 0.110007 0.24396 0.26445C0.0895282 0.418893 0.0019303 0.627818 3.24698e-05 0.846225C-0.00186536 1.06463 0.0820894 1.27505 0.233815 1.43215L4.9457 6.14438L0.233814 10.8566C0.0820886 11.0137 -0.00186625 11.2241 3.15434e-05 11.4425C0.00192934 11.6609 0.0895272 11.8699 0.243959 12.0243C0.398392 12.1787 0.607301 12.2663 0.825693 12.2682C1.04408 12.2701 1.25449 12.1862 1.41158 12.0344L6.12347 7.32222L10.8354 12.0344C10.9932 12.1824 11.2023 12.2632 11.4186 12.2597C11.6349 12.2562 11.8414 12.1687 11.9943 12.0156C12.1472 11.8626 12.2346 11.6561 12.2379 11.4398C12.2413 11.2234 12.1604 11.0143 12.0123 10.8566L7.30123 6.14438L12.0131 1.43215C12.0927 1.35531 12.1561 1.2634 12.1998 1.16177C12.2434 1.06014 12.2664 0.950833 12.2674 0.84023C12.2683 0.729626 12.2473 0.61994 12.2054 0.517568C12.1635 0.415196 12.1017 0.322191 12.0234 0.243979C11.9452 0.165768 11.8522 0.103916 11.7499 0.0620327C11.6475 0.0201492 11.5378 -0.000927989 11.4272 3.33052e-05C11.3166 0.000993646 11.2073 0.0239743 11.1057 0.0676297C11.0041 0.111286 10.9122 0.174745 10.8354 0.254305L6.12347 4.96653Z"
686
686
  fill="#919EAB"/>
687
- </svg>`, Et = `<svg width="23" height="23" viewBox="0 0 23 23" fill="none" xmlns="http://www.w3.org/2000/svg">
687
+ </svg>`, wt = `<svg width="23" height="23" viewBox="0 0 23 23" fill="none" xmlns="http://www.w3.org/2000/svg">
688
688
  <path fill-rule="evenodd" clip-rule="evenodd" d="M19.1972 3.29156C18.936 3.03034 18.6259 2.82313 18.2847 2.68176C17.9434 2.54039 17.5777 2.46763 17.2083 2.46763C16.8389 2.46763 16.4731 2.54039 16.1319 2.68176C15.7906 2.82313 15.4805 3.03034 15.2194 3.29156L13.7822 4.72875C13.2585 4.4772 12.6697 4.39449 12.097 4.49207C11.5243 4.58964 10.9961 4.86267 10.5853 5.27343L9.91687 5.94281C9.74268 6.11693 9.6045 6.32366 9.51023 6.5512C9.41595 6.77873 9.36743 7.02261 9.36743 7.2689C9.36743 7.5152 9.41595 7.75907 9.51023 7.98661C9.6045 8.21414 9.74268 8.42088 9.91687 8.595L3.83625 14.6747C3.57512 14.936 3.36803 15.2462 3.2268 15.5875C3.08556 15.9288 3.01296 16.2947 3.01312 16.6641V18.3516C3.01312 18.6499 3.13165 18.9361 3.34263 19.1471C3.55361 19.358 3.83975 19.4766 4.13812 19.4766H5.82562C6.57129 19.4759 7.28618 19.1792 7.81312 18.6516L13.8937 12.5728C14.0679 12.747 14.2746 12.8852 14.5021 12.9795C14.7297 13.0737 14.9735 13.1223 15.2198 13.1223C15.4661 13.1223 15.71 13.0737 15.9375 12.9795C16.1651 12.8852 16.3718 12.747 16.5459 12.5728L17.2153 11.9025C17.6261 11.4917 17.8991 10.9635 17.9967 10.3908C18.0942 9.81811 18.0115 9.22926 17.76 8.70562L19.1972 7.26937C19.4584 7.0082 19.6656 6.69813 19.807 6.35687C19.9484 6.01561 20.0211 5.64985 20.0211 5.28047C20.0211 4.91108 19.9484 4.54532 19.807 4.20406C19.6656 3.8628 19.4584 3.55273 19.1972 3.29156ZM5.16281 16.0012L11.2425 9.92062L12.5681 11.2462L6.48844 17.3269C6.31266 17.5027 6.07424 17.6015 5.82562 17.6016H4.88812V16.6641C4.88818 16.4154 4.98698 16.177 5.16281 16.0012Z" fill="#353C47"/>
689
- </svg>`, Tt = `<svg width="15" height="17" viewBox="0 0 15 17" fill="none" xmlns="http://www.w3.org/2000/svg">
689
+ </svg>`, Ot = `<svg width="15" height="17" viewBox="0 0 15 17" fill="none" xmlns="http://www.w3.org/2000/svg">
690
690
  <path d="M14.1333 12.4667H0.8M0.8 12.4667L4.13333 9.13332M0.8 12.4667L4.13333 15.8M0.8 4.13332H14.1333M14.1333 4.13332L10.8 0.799988M14.1333 4.13332L10.8 7.46665" stroke="#919EAB" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round"/>
691
- </svg>`, Pt = `<svg width="14" height="2" viewBox="0 0 14 2" fill="none" xmlns="http://www.w3.org/2000/svg">
691
+ </svg>`, Ht = `<svg width="14" height="2" viewBox="0 0 14 2" fill="none" xmlns="http://www.w3.org/2000/svg">
692
692
  <path d="M0.8 0.800003H12.4667" stroke="#919EAB" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round"/>
693
- </svg>`, Ot = `<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
693
+ </svg>`, Bt = `<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
694
694
  <rect x="21.25" y="21.333" width="18" height="18" rx="1" transform="rotate(-180 21.25 21.333)" stroke="#637381"/>
695
695
  <rect x="18.5835" y="18.667" width="12.6667" height="12.6667" rx="1" transform="rotate(-180 18.5835 18.667)" fill="#637381"/>
696
696
  </svg>
@@ -700,7 +700,7 @@ const at = (h, t) => {
700
700
  <path d="M13.5 16.5L10.5 16.5L10.5 13.5L13.5 13.5L13.5 16.5ZM13.5 10.5L10.5 10.5L10.5 7.5L13.5 7.5L13.5 10.5ZM10.5 13.5L7.5 13.5L7.5 10.5L10.5 10.5L10.5 13.5Z" fill="#637381"/>
701
701
  </svg>
702
702
 
703
- `, Ht = `<svg width="26" height="26" viewBox="0 0 26 26" fill="none" xmlns="http://www.w3.org/2000/svg">
703
+ `, At = `<svg width="26" height="26" viewBox="0 0 26 26" fill="none" xmlns="http://www.w3.org/2000/svg">
704
704
  <path d="M20.6106 19.5062C20.6887 19.5843 20.6887 19.711 20.6106 19.7891L19.7896 20.6101C19.7115 20.6882 19.5848 20.6882 19.5067 20.6101L5.98957 7.09298C5.91146 7.01488 5.91146 6.88825 5.98957 6.81014L6.81063 5.98908C6.88873 5.91097 7.01537 5.91097 7.09347 5.98908L20.6106 19.5062Z" fill="#46525C"/>
705
705
  <path d="M9.69583 12.2146C9.81298 12.3318 9.81298 12.5217 9.69583 12.6389L7.80151 14.5332C6.72071 15.614 6.6062 17.4365 7.80151 18.6318C8.99473 19.8267 10.8184 19.7123 11.8992 18.6318L13.7935 16.7366C13.9106 16.6194 14.1006 16.6194 14.2178 16.7366L14.816 17.3348C14.9331 17.4519 14.9332 17.6418 14.816 17.759L12.9216 19.6543C11.2241 21.3536 8.47364 21.3518 6.77417 19.6543C5.07483 17.9568 5.0749 15.2064 6.77417 13.5068L8.66848 11.6116C8.78563 11.4944 8.97562 11.4944 9.0928 11.6116L9.69583 12.2146ZM13.5085 6.77441C15.2061 5.07514 17.9565 5.07509 19.656 6.77441C21.3535 8.47388 21.3533 11.2243 19.656 12.9238L17.7607 14.8182C17.6436 14.9354 17.4536 14.9353 17.3365 14.8182L16.7344 14.2161C16.6172 14.0989 16.6172 13.9089 16.7344 13.7918L18.6296 11.8975C19.7101 10.8167 19.8245 8.99503 18.6296 7.7998C17.4363 6.60449 15.6118 6.719 14.531 7.7998L12.6367 9.69412C12.5195 9.81128 12.3296 9.81128 12.2124 9.69412L11.6123 9.09402C11.4952 8.97684 11.4952 8.78685 11.6124 8.6697L13.5085 6.77441Z" fill="#46525C"/>
706
706
  </svg>
@@ -747,7 +747,7 @@ class ut {
747
747
  const i = document.createElement("span");
748
748
  i.textContent = "Color";
749
749
  const s = document.createElement("button");
750
- s.className = "color-picker-close", s.innerHTML = yt, s.addEventListener("click", () => this.close(!0)), e.appendChild(i), e.appendChild(s), ot(e, t);
750
+ s.className = "color-picker-close", s.innerHTML = bt, s.addEventListener("click", () => this.close(!0)), e.appendChild(i), e.appendChild(s), ot(e, t);
751
751
  const n = document.createElement("div");
752
752
  n.className = "color-picker-area", this.colorArea = n;
753
753
  const o = document.createElement("div");
@@ -755,82 +755,82 @@ class ut {
755
755
  const a = document.createElement("div");
756
756
  a.className = "color-picker-sliders-container";
757
757
  const l = document.createElement("button");
758
- l.className = "color-picker-eyedropper", l.type = "button", l.innerHTML = Et;
758
+ l.className = "color-picker-eyedropper", l.type = "button", l.innerHTML = wt;
759
759
  const r = document.createElement("div");
760
760
  r.className = "color-picker-sliders-group";
761
761
  const c = document.createElement("div");
762
762
  c.className = "color-picker-hue", this.hueSlider = c;
763
- const p = document.createElement("div");
764
- p.className = "color-picker-hue-marker", this.hueMarker = p, c.appendChild(p);
765
763
  const d = document.createElement("div");
766
- d.className = "color-picker-opacity", this.opacitySlider = d;
764
+ d.className = "color-picker-hue-marker", this.hueMarker = d, c.appendChild(d);
765
+ const h = document.createElement("div");
766
+ h.className = "color-picker-opacity", this.opacitySlider = h;
767
767
  const g = document.createElement("div");
768
- g.className = "color-picker-opacity-marker", this.opacityMarker = g, d.appendChild(g), r.appendChild(c), r.appendChild(d), a.appendChild(l), a.appendChild(r);
769
- const C = at((E) => {
770
- var w;
771
- this.setColor(E), (w = this.onChange) == null || w.call(this, E, this.currentOpacity);
768
+ g.className = "color-picker-opacity-marker", this.opacityMarker = g, h.appendChild(g), r.appendChild(c), r.appendChild(h), a.appendChild(l), a.appendChild(r);
769
+ const f = at((E) => {
770
+ var b;
771
+ this.setColor(E), (b = this.onChange) == null || b.call(this, E, this.currentOpacity);
772
772
  }, this.recentScope);
773
- this.recentSectionRefresh = C.refresh;
773
+ this.recentSectionRefresh = f.refresh;
774
774
  const m = document.createElement("div");
775
775
  m.className = "color-picker-format-section";
776
776
  const u = document.createElement("select");
777
777
  u.className = "color-picker-format-select", this.select = u;
778
+ const C = document.createElement("option");
779
+ C.value = "hex", C.textContent = "HEX";
778
780
  const v = document.createElement("option");
779
- v.value = "hex", v.textContent = "HEX";
780
- const f = document.createElement("option");
781
- f.value = "rgb", f.textContent = "RGB";
781
+ v.value = "rgb", v.textContent = "RGB";
782
782
  const y = document.createElement("option");
783
- y.value = "hsl", y.textContent = "HSL", u.appendChild(v), u.appendChild(f), u.appendChild(y);
784
- const b = document.createElement("input");
785
- b.type = "text", b.className = "color-picker-color-input", b.value = this.currentColor, this.input = b;
786
- const L = document.createElement("div");
787
- L.className = "color-picker-input-container";
788
- const I = document.createElement("button");
789
- return I.className = "color-picker-copy-inside", I.textContent = "Copy", L.appendChild(b), L.appendChild(I), m.appendChild(u), m.appendChild(L), t.appendChild(e), t.appendChild(n), t.appendChild(a), t.appendChild(C.container), t.appendChild(m), t.addEventListener("click", (E) => E.stopPropagation()), this.bind(n, c, d, b, u, I, l), t;
783
+ y.value = "hsl", y.textContent = "HSL", u.appendChild(C), u.appendChild(v), u.appendChild(y);
784
+ const x = document.createElement("input");
785
+ x.type = "text", x.className = "color-picker-color-input", x.value = this.currentColor, this.input = x;
786
+ const k = document.createElement("div");
787
+ k.className = "color-picker-input-container";
788
+ const N = document.createElement("button");
789
+ return N.className = "color-picker-copy-inside", N.textContent = "Copy", k.appendChild(x), k.appendChild(N), m.appendChild(u), m.appendChild(k), t.appendChild(e), t.appendChild(n), t.appendChild(a), t.appendChild(f.container), t.appendChild(m), t.addEventListener("click", (E) => E.stopPropagation()), this.bind(n, c, h, x, u, N, l), t;
790
790
  }
791
791
  createBackdrop() {
792
792
  const t = document.createElement("div");
793
793
  return t.className = "color-picker-backdrop", t.style.display = "none", t.style.pointerEvents = "none", t;
794
794
  }
795
795
  bind(t, e, i, s, n, o, a) {
796
- const l = (p) => {
797
- var f;
798
- const d = t.getBoundingClientRect(), g = Math.max(0, Math.min(1, (p.clientX - d.left) / d.width)), C = Math.max(0, Math.min(1, (p.clientY - d.top) / d.height));
799
- this.colorMarker.style.left = `${g * 100}%`, this.colorMarker.style.top = `${C * 100}%`;
800
- const u = this.parsePercentage(this.hueMarker.style.left || "0%") * 360, v = W(u, g, 1 - C);
801
- this.currentColor = v, this.syncInput(), this.updateOpacityBg(), (f = this.onChange) == null || f.call(this, v, this.currentOpacity);
802
- }, r = (p) => {
803
- var f;
804
- const d = e.getBoundingClientRect();
805
- let g = Math.max(0, Math.min(1, (p.clientX - d.left) / d.width));
796
+ const l = (d) => {
797
+ var v;
798
+ const h = t.getBoundingClientRect(), g = Math.max(0, Math.min(1, (d.clientX - h.left) / h.width)), f = Math.max(0, Math.min(1, (d.clientY - h.top) / h.height));
799
+ this.colorMarker.style.left = `${g * 100}%`, this.colorMarker.style.top = `${f * 100}%`;
800
+ const u = this.parsePercentage(this.hueMarker.style.left || "0%") * 360, C = W(u, g, 1 - f);
801
+ this.currentColor = C, this.syncInput(), this.updateOpacityBg(), (v = this.onChange) == null || v.call(this, C, this.currentOpacity);
802
+ }, r = (d) => {
803
+ var v;
804
+ const h = e.getBoundingClientRect();
805
+ let g = Math.max(0, Math.min(1, (d.clientX - h.left) / h.width));
806
806
  this.hueMarker.style.left = `${g * 100}%`;
807
- const C = g * 360, m = this.parsePercentage(this.colorMarker.style.left || "0%"), u = this.parsePercentage(this.colorMarker.style.top || "0%"), v = W(C, m, 1 - u);
808
- this.currentColor = v, this.colorArea.style.background = `linear-gradient(to top, #000, transparent), linear-gradient(to right, #fff, hsl(${C}, 100%, 50%))`, this.syncInput(), this.updateOpacityBg(), (f = this.onChange) == null || f.call(this, v, this.currentOpacity);
809
- }, c = (p) => {
810
- var C;
811
- const d = i.getBoundingClientRect(), g = Math.max(0, Math.min(1, (p.clientX - d.left) / d.width));
812
- this.opacityMarker.style.left = `${g * 100}%`, this.currentOpacity = Math.round(g * 100), (C = this.onChange) == null || C.call(this, this.currentColor, this.currentOpacity);
807
+ const f = g * 360, m = this.parsePercentage(this.colorMarker.style.left || "0%"), u = this.parsePercentage(this.colorMarker.style.top || "0%"), C = W(f, m, 1 - u);
808
+ this.currentColor = C, this.colorArea.style.background = `linear-gradient(to top, #000, transparent), linear-gradient(to right, #fff, hsl(${f}, 100%, 50%))`, this.syncInput(), this.updateOpacityBg(), (v = this.onChange) == null || v.call(this, C, this.currentOpacity);
809
+ }, c = (d) => {
810
+ var f;
811
+ const h = i.getBoundingClientRect(), g = Math.max(0, Math.min(1, (d.clientX - h.left) / h.width));
812
+ this.opacityMarker.style.left = `${g * 100}%`, this.currentOpacity = Math.round(g * 100), (f = this.onChange) == null || f.call(this, this.currentColor, this.currentOpacity);
813
813
  };
814
- t.addEventListener("mousedown", (p) => {
815
- p.preventDefault(), l(p);
816
- const d = (C) => l(C), g = () => {
817
- document.removeEventListener("mousemove", d), document.removeEventListener("mouseup", g);
814
+ t.addEventListener("mousedown", (d) => {
815
+ d.preventDefault(), l(d);
816
+ const h = (f) => l(f), g = () => {
817
+ document.removeEventListener("mousemove", h), document.removeEventListener("mouseup", g);
818
818
  };
819
- document.addEventListener("mousemove", d), document.addEventListener("mouseup", g);
820
- }), e.addEventListener("mousedown", (p) => {
821
- p.preventDefault(), r(p);
822
- const d = (C) => r(C), g = () => {
823
- document.removeEventListener("mousemove", d), document.removeEventListener("mouseup", g);
819
+ document.addEventListener("mousemove", h), document.addEventListener("mouseup", g);
820
+ }), e.addEventListener("mousedown", (d) => {
821
+ d.preventDefault(), r(d);
822
+ const h = (f) => r(f), g = () => {
823
+ document.removeEventListener("mousemove", h), document.removeEventListener("mouseup", g);
824
824
  };
825
- document.addEventListener("mousemove", d), document.addEventListener("mouseup", g);
826
- }), i.addEventListener("mousedown", (p) => {
827
- p.preventDefault(), c(p);
828
- const d = (C) => c(C), g = () => {
829
- document.removeEventListener("mousemove", d), document.removeEventListener("mouseup", g);
825
+ document.addEventListener("mousemove", h), document.addEventListener("mouseup", g);
826
+ }), i.addEventListener("mousedown", (d) => {
827
+ d.preventDefault(), c(d);
828
+ const h = (f) => c(f), g = () => {
829
+ document.removeEventListener("mousemove", h), document.removeEventListener("mouseup", g);
830
830
  };
831
- document.addEventListener("mousemove", d), document.addEventListener("mouseup", g);
832
- }), n.addEventListener("change", () => this.syncInput()), s.addEventListener("input", () => this.applyFromInput()), s.addEventListener("blur", () => this.syncInput()), s.addEventListener("keydown", (p) => {
833
- p.key === "Enter" && (p.preventDefault(), this.syncInput(), s.blur());
831
+ document.addEventListener("mousemove", h), document.addEventListener("mouseup", g);
832
+ }), n.addEventListener("change", () => this.syncInput()), s.addEventListener("input", () => this.applyFromInput()), s.addEventListener("blur", () => this.syncInput()), s.addEventListener("keydown", (d) => {
833
+ d.key === "Enter" && (d.preventDefault(), this.syncInput(), s.blur());
834
834
  }), o.addEventListener("click", async () => {
835
835
  try {
836
836
  await navigator.clipboard.writeText(s.value);
@@ -838,14 +838,14 @@ class ut {
838
838
  s.select(), document.execCommand("copy");
839
839
  }
840
840
  }), a.addEventListener("click", async () => {
841
- var p;
841
+ var d;
842
842
  if (!("EyeDropper" in window)) {
843
843
  alert("EyeDropper API is not supported in this browser.");
844
844
  return;
845
845
  }
846
846
  try {
847
- const d = new window.EyeDropper(), { sRGBHex: g } = await d.open();
848
- this.setColor(g), (p = this.onChange) == null || p.call(this, g, this.currentOpacity);
847
+ const h = new window.EyeDropper(), { sRGBHex: g } = await h.open();
848
+ this.setColor(g), (d = this.onChange) == null || d.call(this, g, this.currentOpacity);
849
849
  } catch {
850
850
  }
851
851
  }), document.addEventListener("keydown", this.keyDown, !0), setTimeout(
@@ -866,7 +866,7 @@ class ut {
866
866
  const { r: n, g: o, b: a } = P(this.currentColor);
867
867
  this.input.value = `rgb(${n}, ${o}, ${a})`;
868
868
  } else {
869
- const { hue: n, sat: o, lightness: a } = vt(e, i, s);
869
+ const { hue: n, sat: o, lightness: a } = Ct(e, i, s);
870
870
  this.input.value = `hsl(${Math.round(n)}, ${Math.round(
871
871
  o * 100
872
872
  )}%, ${Math.round(a * 100)}%)`;
@@ -903,12 +903,12 @@ class ut {
903
903
  this.currentColor = t, this.currentOpacity = i ?? 100, this.syncInput();
904
904
  const { h: s, s: n, v: o } = U(t);
905
905
  this.hueMarker.style.left = `${s / 360 * 100}%`, this.colorMarker.style.left = `${n * 100}%`, this.colorMarker.style.top = `${(1 - o) * 100}%`, this.colorArea.style.background = `linear-gradient(to top, #000, transparent), linear-gradient(to right, #fff, hsl(${s}, 100%, 50%))`, this.updateOpacityBg(), this.opacityMarker.style.left = `${this.currentOpacity}%`, (y = this.recentSectionRefresh) == null || y.call(this), this.isOpen = !0, this.backdrop.style.display = "block", this.backdrop.parentElement || document.body.appendChild(this.backdrop), this.element.style.display = "block", this.element.style.position = "fixed", this.element.style.zIndex = "10002", this.element.style.left = "-9999px", this.element.style.top = "0px", this.element.parentElement || document.body.appendChild(this.element);
906
- const a = this.element.offsetWidth, l = this.element.offsetHeight, r = e.getBoundingClientRect(), c = window.innerWidth, p = window.innerHeight, d = 16;
907
- let g = r.right + 8, C = r.top;
906
+ const a = this.element.offsetWidth, l = this.element.offsetHeight, r = e.getBoundingClientRect(), c = window.innerWidth, d = window.innerHeight, h = 16;
907
+ let g = r.right + 8, f = r.top;
908
908
  const m = c - r.right, u = r.left;
909
- m >= a + d ? g = r.right + 8 : u >= a + d ? g = r.left - a - 8 : g = Math.max(d, (c - a) / 2);
910
- const v = p - r.bottom, f = r.top;
911
- v >= l + d ? C = r.bottom + 8 : f >= l + d ? C = r.top - l - 8 : v > f ? (C = r.bottom + 8, C + l > p - d && (C = p - l - d)) : (C = r.top - l - 8, C < d && (C = d)), this.element.style.left = `${g}px`, this.element.style.top = `${C}px`;
909
+ m >= a + h ? g = r.right + 8 : u >= a + h ? g = r.left - a - 8 : g = Math.max(h, (c - a) / 2);
910
+ const C = d - r.bottom, v = r.top;
911
+ C >= l + h ? f = r.bottom + 8 : v >= l + h ? f = r.top - l - 8 : C > v ? (f = r.bottom + 8, f + l > d - h && (f = d - l - h)) : (f = r.top - l - 8, f < h && (f = h)), this.element.style.left = `${g}px`, this.element.style.top = `${f}px`;
912
912
  }
913
913
  close(t) {
914
914
  var e;
@@ -918,7 +918,7 @@ class ut {
918
918
  return this.element;
919
919
  }
920
920
  }
921
- class Bt {
921
+ class Dt {
922
922
  constructor(t) {
923
923
  this.isDragging = !1, this.currentColor = "#FFFFFF", this.currentColor = this.sanitizeColor(t.initialColor), this.currentOpacity = this.clampOpacity(t.initialOpacity), this.onColorChange = t.onColorChange, this.recentScope = t.scope ?? "solid", this.element = this.build(), this.initFromColor(this.currentColor, this.currentOpacity);
924
924
  }
@@ -928,7 +928,7 @@ class Bt {
928
928
  }
929
929
  sanitizeColor(t) {
930
930
  const e = this.currentColor || "#FFFFFF";
931
- return F(t) ?? e;
931
+ return G(t) ?? e;
932
932
  }
933
933
  clampOpacity(t) {
934
934
  return Number.isFinite(t) ? Math.min(100, Math.max(0, Math.round(t))) : 100;
@@ -943,7 +943,7 @@ class Bt {
943
943
  const s = document.createElement("div");
944
944
  s.className = "color-picker-sliders-container embedded";
945
945
  const n = document.createElement("button");
946
- n.className = "color-picker-eyedropper", n.type = "button", n.innerHTML = Et;
946
+ n.className = "color-picker-eyedropper", n.type = "button", n.innerHTML = wt;
947
947
  const o = document.createElement("div");
948
948
  o.className = "color-picker-sliders-group";
949
949
  const a = document.createElement("div");
@@ -954,71 +954,75 @@ class Bt {
954
954
  r.className = "color-picker-opacity embedded", this.opacitySlider = r;
955
955
  const c = document.createElement("div");
956
956
  c.className = "color-picker-opacity-marker", this.opacityMarker = c, r.appendChild(c), o.appendChild(a), o.appendChild(r), s.appendChild(n), s.appendChild(o);
957
- const p = at((b) => {
958
- const L = T(b);
959
- L && L.type !== "solid" ? this.onColorChange(b, this.currentOpacity) : (this.setColor(b), this.onColorChange(this.currentColor, this.currentOpacity));
957
+ const d = at((x) => {
958
+ const k = T(x);
959
+ k && k.type !== "solid" ? this.onColorChange(x, this.currentOpacity) : (this.setColor(x), this.onColorChange(this.currentColor, this.currentOpacity));
960
960
  }, "all");
961
- this.recentSectionRefresh = p.refresh;
962
- const d = document.createElement("div");
963
- d.className = "color-picker-format-section embedded";
961
+ this.recentSectionRefresh = d.refresh;
962
+ const h = document.createElement("div");
963
+ h.className = "color-picker-format-section embedded";
964
964
  const g = document.createElement("select");
965
965
  g.className = "color-picker-format-select", this.select = g;
966
- const C = document.createElement("option");
967
- C.value = "hex", C.textContent = "HEX";
966
+ const f = document.createElement("option");
967
+ f.value = "hex", f.textContent = "HEX";
968
968
  const m = document.createElement("option");
969
969
  m.value = "rgb", m.textContent = "RGB";
970
970
  const u = document.createElement("option");
971
- u.value = "hsl", u.textContent = "HSL", g.appendChild(C), g.appendChild(m), g.appendChild(u);
972
- const v = document.createElement("input");
973
- v.type = "text", v.className = "color-picker-color-input", this.input = v;
974
- const f = document.createElement("div");
975
- f.className = "color-picker-input-container";
971
+ u.value = "hsl", u.textContent = "HSL", g.appendChild(f), g.appendChild(m), g.appendChild(u);
972
+ const C = document.createElement("input");
973
+ C.type = "text", C.className = "color-picker-color-input", this.input = C;
974
+ const v = document.createElement("div");
975
+ v.className = "color-picker-input-container";
976
976
  const y = document.createElement("button");
977
- return y.className = "color-picker-copy-inside", y.textContent = "Copy", f.appendChild(v), f.appendChild(y), d.appendChild(g), d.appendChild(f), t.appendChild(e), t.appendChild(s), t.appendChild(d), t.appendChild(p.container), this.bind(e, a, r, v, g, y, n), t;
977
+ return y.className = "color-picker-copy-inside", y.textContent = "Copy", v.appendChild(C), v.appendChild(y), h.appendChild(g), h.appendChild(v), t.appendChild(e), t.appendChild(s), t.appendChild(h), t.appendChild(d.container), this.bind(e, a, r, C, g, y, n), t;
978
978
  }
979
979
  bind(t, e, i, s, n, o, a) {
980
- const l = (d) => {
981
- const g = t.getBoundingClientRect(), C = Math.max(0, Math.min(1, (d.clientX - g.left) / g.width)), m = Math.max(0, Math.min(1, (d.clientY - g.top) / g.height));
982
- this.colorMarker.style.left = `${C * 100}%`, this.colorMarker.style.top = `${m * 100}%`;
983
- const v = this.parsePercentage(this.hueMarker.style.left || "0%") * 360, f = W(v, C, 1 - m);
984
- this.currentColor = f, this.syncInput(), this.updateOpacityBg(), this.queueChange();
985
- }, r = (d) => {
986
- const g = e.getBoundingClientRect(), C = Math.max(0, Math.min(1, (d.clientX - g.left) / g.width));
987
- this.hueMarker.style.left = `${C * 100}%`;
988
- const m = C * 360, u = this.parsePercentage(this.colorMarker.style.left || "0%"), v = this.parsePercentage(this.colorMarker.style.top || "0%"), f = W(m, u, 1 - v);
989
- this.currentColor = f, this.colorArea.style.background = `linear-gradient(to top, #000, transparent),
990
- linear-gradient(to right, #fff, hsl(${m}, 100%, 50%))`, this.syncInput(), this.updateOpacityBg(), this.queueChange();
991
- }, c = (d) => {
992
- const g = i.getBoundingClientRect(), C = Math.max(0, Math.min(1, (d.clientX - g.left) / g.width));
993
- this.opacityMarker.style.left = `${C * 100}%`, this.currentOpacity = this.clampOpacity(C * 100), this.queueChange();
994
- }, p = (d, g) => {
995
- d.preventDefault(), this.isDragging = !0, g(d);
996
- let C;
997
- const m = () => {
998
- this.isDragging && (this.isDragging = !1, this.flushChange(), document.removeEventListener("mousemove", C), document.removeEventListener("mouseup", m), window.removeEventListener("blur", m), this.applyPendingExternal());
980
+ const l = (h, g) => {
981
+ const f = g || t.getBoundingClientRect(), m = Math.max(0, Math.min(1, (h.clientX - f.left) / f.width)), u = Math.max(0, Math.min(1, (h.clientY - f.top) / f.height));
982
+ this.colorMarker.style.left = `${m * 100}%`, this.colorMarker.style.top = `${u * 100}%`;
983
+ const v = this.parsePercentage(this.hueMarker.style.left || "0%") * 360, y = W(v, m, 1 - u);
984
+ this.currentColor = y, this.syncInput(), this.updateOpacityBg(), this.queueChange();
985
+ }, r = (h, g) => {
986
+ const f = g || e.getBoundingClientRect(), m = Math.max(0, Math.min(1, (h.clientX - f.left) / f.width));
987
+ this.hueMarker.style.left = `${m * 100}%`;
988
+ const u = m * 360, C = this.parsePercentage(this.colorMarker.style.left || "0%"), v = this.parsePercentage(this.colorMarker.style.top || "0%"), y = W(u, C, 1 - v);
989
+ this.currentColor = y, this.colorArea.style.background = `linear-gradient(to top, #000, transparent),
990
+ linear-gradient(to right, #fff, hsl(${u}, 100%, 50%))`, this.syncInput(), this.updateOpacityBg(), this.queueChange();
991
+ }, c = (h, g) => {
992
+ const f = g || i.getBoundingClientRect(), m = Math.max(0, Math.min(1, (h.clientX - f.left) / f.width));
993
+ this.opacityMarker.style.left = `${m * 100}%`, this.currentOpacity = this.clampOpacity(m * 100), this.queueChange();
994
+ }, d = (h, g, f) => {
995
+ h.preventDefault(), this.isDragging = !0, this.cachedRect = f.getBoundingClientRect(), g(h, this.cachedRect);
996
+ let m = null, u;
997
+ const C = () => {
998
+ this.dragRafId === void 0 && (this.dragRafId = window.requestAnimationFrame(() => {
999
+ this.dragRafId = void 0, m && this.cachedRect && g(m, this.cachedRect);
1000
+ }));
1001
+ }, v = () => {
1002
+ this.isDragging && (this.isDragging = !1, this.dragRafId !== void 0 && (cancelAnimationFrame(this.dragRafId), this.dragRafId = void 0), this.cachedRect = void 0, m = null, this.flushChange(), document.removeEventListener("mousemove", u), document.removeEventListener("mouseup", v), window.removeEventListener("blur", v), this.applyPendingExternal());
999
1003
  };
1000
- C = (u) => {
1001
- if (!u.buttons) {
1002
- m();
1004
+ u = (y) => {
1005
+ if (!y.buttons) {
1006
+ v();
1003
1007
  return;
1004
1008
  }
1005
- g(u);
1006
- }, document.addEventListener("mousemove", C), document.addEventListener("mouseup", m), window.addEventListener("blur", m);
1009
+ m = y, C();
1010
+ }, document.addEventListener("mousemove", u), document.addEventListener("mouseup", v), window.addEventListener("blur", v);
1007
1011
  };
1008
- t.addEventListener("mousedown", (d) => {
1009
- p(d, l);
1010
- }), e.addEventListener("mousedown", (d) => {
1011
- p(d, r);
1012
- }), i.addEventListener("mousedown", (d) => {
1013
- p(d, c);
1012
+ t.addEventListener("mousedown", (h) => {
1013
+ d(h, l, t);
1014
+ }), e.addEventListener("mousedown", (h) => {
1015
+ d(h, r, e);
1016
+ }), i.addEventListener("mousedown", (h) => {
1017
+ d(h, c, i);
1014
1018
  }), n.addEventListener("change", () => {
1015
1019
  this.syncInput();
1016
1020
  }), s.addEventListener("input", () => {
1017
1021
  this.applyFromInput();
1018
1022
  }), s.addEventListener("blur", () => {
1019
1023
  this.syncInput();
1020
- }), s.addEventListener("keydown", (d) => {
1021
- d.key === "Enter" && (d.preventDefault(), this.syncInput(), s.blur());
1024
+ }), s.addEventListener("keydown", (h) => {
1025
+ h.key === "Enter" && (h.preventDefault(), this.syncInput(), s.blur());
1022
1026
  }), o.addEventListener("click", async () => {
1023
1027
  try {
1024
1028
  await navigator.clipboard.writeText(s.value);
@@ -1031,7 +1035,7 @@ class Bt {
1031
1035
  return;
1032
1036
  }
1033
1037
  try {
1034
- const d = new window.EyeDropper(), { sRGBHex: g } = await d.open();
1038
+ const h = new window.EyeDropper(), { sRGBHex: g } = await h.open();
1035
1039
  this.setColor(g), this.onColorChange(this.currentColor, this.currentOpacity);
1036
1040
  } catch {
1037
1041
  }
@@ -1052,7 +1056,7 @@ class Bt {
1052
1056
  const { r: n, g: o, b: a } = P(this.currentColor);
1053
1057
  this.input.value = `rgb(${n}, ${o}, ${a})`;
1054
1058
  } else {
1055
- const { hue: n, sat: o, lightness: a } = vt(e, i, s);
1059
+ const { hue: n, sat: o, lightness: a } = Ct(e, i, s);
1056
1060
  this.input.value = `hsl(${Math.round(n)}, ${Math.round(
1057
1061
  o * 100
1058
1062
  )}%, ${Math.round(a * 100)}%)`;
@@ -1121,7 +1125,7 @@ class Bt {
1121
1125
  this.initFromColor(t, e);
1122
1126
  }
1123
1127
  }
1124
- const V = class V extends x {
1128
+ const V = class V extends w {
1125
1129
  constructor(t = {}) {
1126
1130
  const e = typeof t.default == "string" ? void 0 : t.default;
1127
1131
  super({
@@ -1133,10 +1137,10 @@ const V = class V extends x {
1133
1137
  angle: "number",
1134
1138
  stops: "text"
1135
1139
  }, this.element = null, this.previewEl = null, this.inputEl = void 0, this.popoverEl = null, this.backdropEl = null, this.isPopoverOpen = !1, this.isEditing = !1, this.popoverPosition = null, this.previewUpdateTimeout = null, this.changeDebounceTimeout = null, this.solidPicker = null, this.pendingSolidColor = null, this.variant = "default", this.globalLayoutMode = "list", this.globalSearchQuery = "", this.currentMode = "custom", this.linkedGlobalVariable = null, this.unlinkButton = null, this.onBackgroundClick = (i) => {
1136
- var d;
1140
+ var h;
1137
1141
  if (!this.popoverEl || !this.isPopoverOpen) return;
1138
- const s = i.target, n = this.popoverEl.contains(s), o = (d = this.element) == null ? void 0 : d.contains(s), a = document.querySelectorAll(".custom-color-picker"), l = Array.from(a).some((g) => g.contains(s)), r = s.closest(".gstop-color-input, .gradient-mini-preview, .gstop-color-preview"), c = s.classList.contains("color-picker-backdrop"), p = s.classList.contains("gradient-popover-backdrop");
1139
- !n && !o && !l && !r && !c && !p && this.closePopover();
1142
+ const s = i.target, n = this.popoverEl.contains(s), o = (h = this.element) == null ? void 0 : h.contains(s), a = document.querySelectorAll(".custom-color-picker"), l = Array.from(a).some((g) => g.contains(s)), r = s.closest(".gstop-color-input, .gradient-mini-preview, .gstop-color-preview"), c = s.classList.contains("color-picker-backdrop"), d = s.classList.contains("gradient-popover-backdrop");
1143
+ !n && !o && !l && !r && !c && !d && this.closePopover();
1140
1144
  }, this.handlePopoverKeydown = (i) => {
1141
1145
  if (this.isPopoverOpen) {
1142
1146
  if (i.key === "Escape") {
@@ -1154,7 +1158,7 @@ const V = class V extends x {
1154
1158
  resolveGlobalVarColor(t) {
1155
1159
  if (t.startsWith("var(--")) {
1156
1160
  const e = t.replace("var(--", "").replace(")", "");
1157
- return (x.GlobalVariables || {})[e] || t;
1161
+ return (w.GlobalVariables || {})[e] || t;
1158
1162
  }
1159
1163
  return t;
1160
1164
  }
@@ -1284,7 +1288,7 @@ const V = class V extends x {
1284
1288
  this.isEditing = !1, this.value && (this.inputEl.value = K(this.value));
1285
1289
  }), this.inputEl.addEventListener("paste", (i) => this.handlePaste(i)), this.inputEl.addEventListener("input", (i) => this.handleTextInput(i)), this.inputEl.addEventListener("keydown", (i) => {
1286
1290
  i.key === "Enter" && (this.handleTextInput(i), this.inputEl.blur()), i.key === "Escape" && (this.value && (this.inputEl.value = S(this.value)), this.inputEl.blur());
1287
- }), e.appendChild(this.previewEl), this.unlinkButton = document.createElement("button"), this.unlinkButton.type = "button", this.unlinkButton.className = "gradient-unlink-button", this.unlinkButton.innerHTML = Ht, this.unlinkButton.title = "Break global color binding", this.unlinkButton.addEventListener("click", (i) => {
1291
+ }), e.appendChild(this.previewEl), this.unlinkButton = document.createElement("button"), this.unlinkButton.type = "button", this.unlinkButton.className = "gradient-unlink-button", this.unlinkButton.innerHTML = At, this.unlinkButton.title = "Break global color binding", this.unlinkButton.addEventListener("click", (i) => {
1288
1292
  i.preventDefault(), i.stopPropagation(), this.breakGlobalBinding();
1289
1293
  }), e.appendChild(this.unlinkButton), e.appendChild(this.inputEl), t.appendChild(e), this.createPopover(), this.element = t, this.updateUnlinkButtonVisibility(), t;
1290
1294
  }
@@ -1307,7 +1311,7 @@ const V = class V extends x {
1307
1311
  t.appendChild(l);
1308
1312
  }
1309
1313
  const i = document.createElement("button");
1310
- i.type = "button", i.className = "gradient-popover-close", i.innerHTML = yt, i.addEventListener("click", () => this.closePopover()), t.appendChild(i), ot(t, this.popoverEl, (l, r) => {
1314
+ i.type = "button", i.className = "gradient-popover-close", i.innerHTML = bt, i.addEventListener("click", () => this.closePopover()), t.appendChild(i), ot(t, this.popoverEl, (l, r) => {
1311
1315
  this.popoverPosition = { left: l, top: r };
1312
1316
  });
1313
1317
  const s = document.createElement("div");
@@ -1318,8 +1322,8 @@ const V = class V extends x {
1318
1322
  n.appendChild(o), s.appendChild(n);
1319
1323
  const a = document.createElement("div");
1320
1324
  if (a.className = "gradient-editor-content", this.updatePopoverContent(a), s.appendChild(a), this.variant !== "global" && e) {
1321
- const l = e.children[0], r = e.children[1], c = (p) => {
1322
- this.currentMode = p, p === "custom" ? (l.classList.add("active"), r.classList.remove("active"), n.style.display = "block") : (r.classList.add("active"), l.classList.remove("active"), n.style.display = "none"), this.updatePopoverContent(a);
1325
+ const l = e.children[0], r = e.children[1], c = (d) => {
1326
+ this.currentMode = d, d === "custom" ? (l.classList.add("active"), r.classList.remove("active"), n.style.display = "block") : (r.classList.add("active"), l.classList.remove("active"), n.style.display = "none"), this.updatePopoverContent(a);
1323
1327
  };
1324
1328
  l.addEventListener("click", () => c("custom")), r.addEventListener("click", () => c("global")), this.isBoundToGlobal() ? (this.currentMode = "global", c("global")) : (this.currentMode = "custom", c("custom"));
1325
1329
  }
@@ -1330,7 +1334,7 @@ const V = class V extends x {
1330
1334
  const t = document.createElement("div");
1331
1335
  t.className = "gradient-type-tabs";
1332
1336
  const e = document.createElement("button");
1333
- e.type = "button", e.className = `gradient-type-tab ${((s = this.value) == null ? void 0 : s.type) === "solid" ? "active" : ""}`, e.innerHTML = Ot, e.style.minWidth = "32px", e.addEventListener("click", () => this.switchType("solid"));
1337
+ e.type = "button", e.className = `gradient-type-tab ${((s = this.value) == null ? void 0 : s.type) === "solid" ? "active" : ""}`, e.innerHTML = Bt, e.style.minWidth = "32px", e.addEventListener("click", () => this.switchType("solid"));
1334
1338
  const i = document.createElement("button");
1335
1339
  return i.type = "button", i.className = `gradient-type-tab ${((n = this.value) == null ? void 0 : n.type) !== "solid" ? "active" : ""}`, i.innerHTML = $t, i.style.minWidth = "32px", i.addEventListener("click", () => {
1336
1340
  var a, l;
@@ -1386,49 +1390,49 @@ const V = class V extends x {
1386
1390
  }
1387
1391
  renderGlobalColors(t) {
1388
1392
  (!this.value || !this.value.stops || !this.value.stops.length) && (this.value || (this.value = this.defaultValue()), this.value.stops = [{ color: "#000000", position: 0, opacity: 100 }]);
1389
- const e = this.value.stops[0], i = (p) => {
1390
- p.innerHTML = "";
1391
- let d = {};
1393
+ const e = this.value.stops[0], i = (d) => {
1394
+ d.innerHTML = "";
1395
+ let h = {};
1392
1396
  try {
1393
- d = x.GlobalVariables || {};
1397
+ h = w.GlobalVariables || {};
1394
1398
  } catch (u) {
1395
1399
  console.warn("Could not access Setting.GlobalVariables", u);
1396
1400
  }
1397
- if (!d || Object.keys(d).length === 0) {
1401
+ if (!h || Object.keys(h).length === 0) {
1398
1402
  const u = document.createElement("div");
1399
- u.textContent = "No global colors defined", u.style.fontSize = "12px", u.style.color = "#666", u.style.padding = "8px", p.appendChild(u);
1403
+ u.textContent = "No global colors defined", u.style.fontSize = "12px", u.style.color = "#666", u.style.padding = "8px", d.appendChild(u);
1400
1404
  return;
1401
1405
  }
1402
- const g = x.GlobalVariableGroups || [
1406
+ const g = w.GlobalVariableGroups || [
1403
1407
  { title: "Global Colors", keys: ["primary", "secondary", "tertiary", "accent"] },
1404
1408
  { title: "Text Color", keys: ["text-dark", "text-light"] }
1405
- ], C = this.globalSearchQuery.toLowerCase();
1409
+ ], f = this.globalSearchQuery.toLowerCase();
1406
1410
  let m;
1407
- this.globalLayoutMode === "list" ? (m = document.createElement("div"), m.className = "global-colors-list") : (m = document.createElement("div"), m.className = "global-colors-grid"), p.appendChild(m), g.forEach((u) => {
1408
- const v = Object.entries(d).filter(([f]) => !u.keys.includes(f) && u.title !== "Global Colors" ? !1 : u.keys.includes(f) && f.toLowerCase().includes(C));
1409
- v.length !== 0 && v.forEach(([f, y]) => {
1411
+ this.globalLayoutMode === "list" ? (m = document.createElement("div"), m.className = "global-colors-list") : (m = document.createElement("div"), m.className = "global-colors-grid"), d.appendChild(m), g.forEach((u) => {
1412
+ const C = Object.entries(h).filter(([v]) => !u.keys.includes(v) && u.title !== "Global Colors" ? !1 : u.keys.includes(v) && v.toLowerCase().includes(f));
1413
+ C.length !== 0 && C.forEach(([v, y]) => {
1410
1414
  if (this.globalLayoutMode === "list") {
1411
- const b = document.createElement("div");
1412
- b.className = "global-color-row";
1413
- const L = document.createElement("div");
1414
- L.className = "global-color-circle";
1415
- const I = this.resolveGlobalVarColor(y);
1416
- L.style.background = I, (this.linkedGlobalVariable === `var(--${f})` || e.color === `var(--${f})`) && L.classList.add("selected");
1417
- const w = document.createElement("span");
1418
- w.className = "global-color-label", w.textContent = f.split("-").map((N) => N.charAt(0).toUpperCase() + N.slice(1)).join(" "), b.appendChild(L), b.appendChild(w), b.addEventListener("click", (N) => {
1419
- N.preventDefault();
1420
- const D = `var(--${f})`;
1421
- this.setValue(D), this.pendingSolidColor = D, i(p);
1422
- }), m.appendChild(b);
1415
+ const x = document.createElement("div");
1416
+ x.className = "global-color-row";
1417
+ const k = document.createElement("div");
1418
+ k.className = "global-color-circle";
1419
+ const N = this.resolveGlobalVarColor(y);
1420
+ k.style.background = N, (this.linkedGlobalVariable === `var(--${v})` || e.color === `var(--${v})`) && k.classList.add("selected");
1421
+ const b = document.createElement("span");
1422
+ b.className = "global-color-label", b.textContent = v.split("-").map((I) => I.charAt(0).toUpperCase() + I.slice(1)).join(" "), x.appendChild(k), x.appendChild(b), x.addEventListener("click", (I) => {
1423
+ I.preventDefault();
1424
+ const D = `var(--${v})`;
1425
+ this.setValue(D), this.pendingSolidColor = D, i(d);
1426
+ }), m.appendChild(x);
1423
1427
  } else {
1424
- const b = document.createElement("div");
1425
- b.className = "global-color-circle";
1426
- const L = this.resolveGlobalVarColor(y);
1427
- b.style.background = L, b.title = f.split("-").map((E) => E.charAt(0).toUpperCase() + E.slice(1)).join(" "), (this.linkedGlobalVariable === `var(--${f})` || e.color === `var(--${f})`) && b.classList.add("selected"), b.addEventListener("click", (E) => {
1428
+ const x = document.createElement("div");
1429
+ x.className = "global-color-circle";
1430
+ const k = this.resolveGlobalVarColor(y);
1431
+ x.style.background = k, x.title = v.split("-").map((E) => E.charAt(0).toUpperCase() + E.slice(1)).join(" "), (this.linkedGlobalVariable === `var(--${v})` || e.color === `var(--${v})`) && x.classList.add("selected"), x.addEventListener("click", (E) => {
1428
1432
  E.preventDefault();
1429
- const w = `var(--${f})`;
1430
- this.setValue(w), this.pendingSolidColor = w, i(p);
1431
- }), m.appendChild(b);
1433
+ const b = `var(--${v})`;
1434
+ this.setValue(b), this.pendingSolidColor = b, i(d);
1435
+ }), m.appendChild(x);
1432
1436
  }
1433
1437
  });
1434
1438
  });
@@ -1441,8 +1445,8 @@ const V = class V extends x {
1441
1445
  const a = document.createElement("input");
1442
1446
  a.type = "text", a.className = "global-search-input", a.placeholder = "Search", a.value = this.globalSearchQuery;
1443
1447
  const l = document.createElement("div");
1444
- a.addEventListener("input", (p) => {
1445
- this.globalSearchQuery = p.target.value, i(l);
1448
+ a.addEventListener("input", (d) => {
1449
+ this.globalSearchQuery = d.target.value, i(l);
1446
1450
  }), n.appendChild(o), n.appendChild(a);
1447
1451
  const r = document.createElement("button");
1448
1452
  r.className = "global-layout-toggle", r.type = "button";
@@ -1455,7 +1459,7 @@ const V = class V extends x {
1455
1459
  }
1456
1460
  renderSolid(t) {
1457
1461
  (!this.value || !this.value.stops || !this.value.stops.length) && (this.value || (this.value = this.defaultValue()), this.value.stops = [{ color: "#000000", position: 0, opacity: 100 }]);
1458
- const e = this.value.stops[0], i = new Bt({
1462
+ const e = this.value.stops[0], i = new Dt({
1459
1463
  initialColor: e.color.startsWith("var(--") ? this.resolveGlobalVarColor(e.color) : e.color,
1460
1464
  initialOpacity: e.opacity ?? 100,
1461
1465
  onColorChange: (s, n) => {
@@ -1477,15 +1481,15 @@ const V = class V extends x {
1477
1481
  {
1478
1482
  const c = document.createElement("div");
1479
1483
  c.className = "gradient-subtype-inline";
1480
- const p = document.createElement("select");
1481
- p.className = "gradient-subtype-select";
1482
- const d = document.createElement("option");
1483
- d.value = "linear", d.textContent = "Linear";
1484
+ const d = document.createElement("select");
1485
+ d.className = "gradient-subtype-select";
1486
+ const h = document.createElement("option");
1487
+ h.value = "linear", h.textContent = "Linear";
1484
1488
  const g = document.createElement("option");
1485
- g.value = "radial", g.textContent = "Radial", p.appendChild(d), p.appendChild(g), p.value = this.value.type === "radial" ? "radial" : "linear", e = document.createElement("input"), e.type = "text", e.inputMode = "numeric", e.className = "gradient-degree-input", e.value = `${this.value.angle ?? 90}°`, e.style.width = "75px", e.style.textAlign = "center", (!this.value.angle || this.value.stops.length < 2) && (this.value.angle = 90, e.value = "90°");
1486
- const C = document.createElement("button");
1487
- C.type = "button", C.className = "gradient-flip-btn", C.innerHTML = Tt, p.addEventListener("change", () => {
1488
- this.clearGlobalBindingForCustomChange(), this.switchType(p.value === "radial" ? "radial" : "linear", !0), e && this.updateDegreeVisibility(e);
1489
+ g.value = "radial", g.textContent = "Radial", d.appendChild(h), d.appendChild(g), d.value = this.value.type === "radial" ? "radial" : "linear", e = document.createElement("input"), e.type = "text", e.inputMode = "numeric", e.className = "gradient-degree-input", e.value = `${this.value.angle ?? 90}°`, e.style.width = "75px", e.style.textAlign = "center", (!this.value.angle || this.value.stops.length < 2) && (this.value.angle = 90, e.value = "90°");
1490
+ const f = document.createElement("button");
1491
+ f.type = "button", f.className = "gradient-flip-btn", f.innerHTML = Ot, d.addEventListener("change", () => {
1492
+ this.clearGlobalBindingForCustomChange(), this.switchType(d.value === "radial" ? "radial" : "linear", !0), e && this.updateDegreeVisibility(e);
1489
1493
  }), e.addEventListener("focus", (m) => {
1490
1494
  const u = m.target;
1491
1495
  u.value = u.value.replace(/[^0-9-]/g, ""), setTimeout(() => u.select(), 0);
@@ -1494,16 +1498,16 @@ const V = class V extends x {
1494
1498
  const u = parseInt(m.target.value);
1495
1499
  !Number.isNaN(u) && this.value && (this.value.angle = Math.max(0, Math.min(360, u)), this.debouncedPreviewUpdate());
1496
1500
  }), e.addEventListener("blur", (m) => {
1497
- var f;
1501
+ var v;
1498
1502
  this.previewUpdateTimeout && (clearTimeout(this.previewUpdateTimeout), this.previewUpdateTimeout = null);
1499
1503
  const u = m.target;
1500
- let v = parseInt(u.value);
1501
- Number.isNaN(v) && (v = ((f = this.value) == null ? void 0 : f.angle) ?? 0), v = Math.max(0, Math.min(360, v)), this.value && (this.value.angle = v), u.value = `${v}°`, this.updateGradientPreview(), this.updateUI(), this.triggerChange();
1502
- }), C.addEventListener("click", () => {
1504
+ let C = parseInt(u.value);
1505
+ Number.isNaN(C) && (C = ((v = this.value) == null ? void 0 : v.angle) ?? 0), C = Math.max(0, Math.min(360, C)), this.value && (this.value.angle = C), u.value = `${C}°`, this.updateGradientPreview(), this.updateUI(), this.triggerChange();
1506
+ }), f.addEventListener("click", () => {
1503
1507
  this.clearGlobalBindingForCustomChange(), !(!this.value || !this.value.stops) && (this.value.stops.forEach((m) => {
1504
1508
  m.position = 100 - m.position;
1505
1509
  }), this.value.stops.sort((m, u) => m.position - u.position), this.updateGradientPreview(i), this.createHandles(s, i), this.updateStopsList(l), this.updateUI(), this.triggerChange());
1506
- }), c.appendChild(p), c.appendChild(e), c.appendChild(C), t.appendChild(c), this.updateDegreeVisibility(e);
1510
+ }), c.appendChild(d), c.appendChild(e), c.appendChild(f), t.appendChild(c), this.updateDegreeVisibility(e);
1507
1511
  }
1508
1512
  const i = document.createElement("div");
1509
1513
  i.className = "gradient-preview", this.updateGradientPreview(i);
@@ -1518,8 +1522,8 @@ const V = class V extends x {
1518
1522
  const l = document.createElement("div");
1519
1523
  l.className = "gradient-stops", t.appendChild(n), t.appendChild(l), this.updateStopsList(l);
1520
1524
  const r = at((c) => {
1521
- const p = T(c);
1522
- p && (this.clearGlobalBindingForCustomChange(), this.value = p, this.switchType(p.type, !0), this.updateUI(), this.triggerChange());
1525
+ const d = T(c);
1526
+ d && (this.clearGlobalBindingForCustomChange(), this.value = d, this.switchType(d.type, !0), this.updateUI(), this.triggerChange());
1523
1527
  }, "all");
1524
1528
  this.recentGradientRefresh = r.refresh, t.appendChild(r.container), a.addEventListener("click", () => {
1525
1529
  var c;
@@ -1554,32 +1558,32 @@ const V = class V extends x {
1554
1558
  o.className = "gstop-chip";
1555
1559
  const a = this.resolveGlobalVarColor(i.color);
1556
1560
  o.style.backgroundColor = a, n.appendChild(o);
1557
- const l = new ut((u, v) => {
1558
- this.clearGlobalBindingForCustomChange(), this.value && this.value.stops[s] && (this.value.stops[s].color = u, v !== void 0 && (this.value.stops[s].opacity = v), o.style.backgroundColor = u, this.updateGradientPreview(), this.updateStopsList(), this.updateUI(), this.triggerChange());
1561
+ const l = new ut((u, C) => {
1562
+ this.clearGlobalBindingForCustomChange(), this.value && this.value.stops[s] && (this.value.stops[s].color = u, C !== void 0 && (this.value.stops[s].opacity = C), o.style.backgroundColor = u, this.updateGradientPreview(), this.updateStopsList(), this.updateUI(), this.triggerChange());
1559
1563
  }, "solid");
1560
- let r = !1, c = !1, p = 0, d = 0;
1564
+ let r = !1, c = !1, d = 0, h = 0;
1561
1565
  const g = (u) => {
1562
- r = !0, c = !1, p = u.clientX, d = this.value.stops[s].position, n.classList.add("selected"), document.addEventListener("mousemove", C), document.addEventListener("mouseup", m), u.preventDefault(), u.stopPropagation();
1563
- }, C = (u) => {
1566
+ r = !0, c = !1, d = u.clientX, h = this.value.stops[s].position, n.classList.add("selected"), document.addEventListener("mousemove", f), document.addEventListener("mouseup", m), u.preventDefault(), u.stopPropagation();
1567
+ }, f = (u) => {
1564
1568
  if (!r || !this.value) return;
1565
- const v = u.clientX - p;
1566
- if (Math.abs(v) > 3 && (c = !0), c) {
1569
+ const C = u.clientX - d;
1570
+ if (Math.abs(C) > 3 && (c = !0), c) {
1567
1571
  this.clearGlobalBindingForCustomChange();
1568
- const f = e.getBoundingClientRect();
1569
- let y = d + v / f.width * 100;
1572
+ const v = e.getBoundingClientRect();
1573
+ let y = h + C / v.width * 100;
1570
1574
  y = Math.max(0, Math.min(100, y)), this.value.stops[s].position = Math.round(y), n.style.left = `${y}%`, this.updateGradientPreview();
1571
1575
  }
1572
1576
  }, m = (u) => {
1573
- var v;
1577
+ var C;
1574
1578
  if (r)
1575
- if (r = !1, n.classList.remove("selected"), document.removeEventListener("mousemove", C), document.removeEventListener("mouseup", m), c)
1576
- this.value && (this.value.stops.sort((f, y) => f.position - y.position), this.createHandles(t, e), this.updateStopsList()), this.updateUI(), this.triggerChange();
1579
+ if (r = !1, n.classList.remove("selected"), document.removeEventListener("mousemove", f), document.removeEventListener("mouseup", m), c)
1580
+ this.value && (this.value.stops.sort((v, y) => v.position - y.position), this.createHandles(t, e), this.updateStopsList()), this.updateUI(), this.triggerChange();
1577
1581
  else {
1578
1582
  u.stopPropagation();
1579
- const f = (v = this.value) == null ? void 0 : v.stops[s];
1580
- f && setTimeout(() => {
1581
- const y = this.resolveGlobalVarColor(f.color);
1582
- l.open(y, o, f.opacity ?? 100);
1583
+ const v = (C = this.value) == null ? void 0 : C.stops[s];
1584
+ v && setTimeout(() => {
1585
+ const y = this.resolveGlobalVarColor(v.color);
1586
+ l.open(y, o, v.opacity ?? 100);
1583
1587
  }, 0);
1584
1588
  }
1585
1589
  };
@@ -1590,7 +1594,7 @@ const V = class V extends x {
1590
1594
  var i;
1591
1595
  const e = t || ((i = this.popoverEl) == null ? void 0 : i.querySelector(".gradient-stops"));
1592
1596
  !e || !this.value || this.value.type === "solid" || !this.value.stops || (e.innerHTML = "", this.value.stops.forEach((s, n) => {
1593
- var L, I;
1597
+ var k, N;
1594
1598
  const o = document.createElement("div");
1595
1599
  o.className = "gstop-row";
1596
1600
  const a = document.createElement("div");
@@ -1599,86 +1603,86 @@ const V = class V extends x {
1599
1603
  l.type = "text", l.className = "gstop-position-input", l.value = `${s.position}%`, l.style.width = "60px", a.appendChild(l);
1600
1604
  const r = document.createElement("div");
1601
1605
  r.className = "gstop-color-container";
1602
- const c = this.resolveGlobalVarColor(s.color), p = document.createElement("div");
1603
- p.className = "gstop-color-preview", p.style.backgroundColor = c;
1604
- const d = document.createElement("input");
1605
- d.type = "text", d.className = "gstop-color-input", d.value = c.replace("#", "").toUpperCase();
1606
+ const c = this.resolveGlobalVarColor(s.color), d = document.createElement("div");
1607
+ d.className = "gstop-color-preview", d.style.backgroundColor = c;
1608
+ const h = document.createElement("input");
1609
+ h.type = "text", h.className = "gstop-color-input", h.value = c.replace("#", "").toUpperCase();
1606
1610
  const g = document.createElement("button");
1607
- g.type = "button", g.className = "gstop-color-copy", g.textContent = "Copy", r.appendChild(p), r.appendChild(d), r.appendChild(g);
1608
- const C = document.createElement("button");
1609
- C.type = "button", C.className = "gstop-del", C.innerHTML = Pt, C.disabled = (((I = (L = this.value) == null ? void 0 : L.stops) == null ? void 0 : I.length) || 0) <= 2, o.appendChild(a), o.appendChild(r), o.appendChild(C), e.appendChild(o);
1611
+ g.type = "button", g.className = "gstop-color-copy", g.textContent = "Copy", r.appendChild(d), r.appendChild(h), r.appendChild(g);
1612
+ const f = document.createElement("button");
1613
+ f.type = "button", f.className = "gstop-del", f.innerHTML = Ht, f.disabled = (((N = (k = this.value) == null ? void 0 : k.stops) == null ? void 0 : N.length) || 0) <= 2, o.appendChild(a), o.appendChild(r), o.appendChild(f), e.appendChild(o);
1610
1614
  const m = document.createElement("span");
1611
1615
  m.className = "gstop-opacity-label", m.textContent = "Opacity";
1612
1616
  const u = document.createElement("div");
1613
1617
  u.className = "gstop-opacity-group";
1614
- const v = document.createElement("input");
1615
- v.type = "range", v.className = "gstop-opacity-slider", v.min = "0", v.max = "100", v.value = String(s.opacity ?? 100);
1616
- const f = P(c);
1617
- v.style.setProperty("--slider-color", `rgb(${f.r}, ${f.g}, ${f.b})`);
1618
+ const C = document.createElement("input");
1619
+ C.type = "range", C.className = "gstop-opacity-slider", C.min = "0", C.max = "100", C.value = String(s.opacity ?? 100);
1620
+ const v = P(c);
1621
+ C.style.setProperty("--slider-color", `rgb(${v.r}, ${v.g}, ${v.b})`);
1618
1622
  const y = document.createElement("span");
1619
- y.className = "gstop-opacity-value", y.textContent = `${s.opacity ?? 100}%`, u.appendChild(v), u.appendChild(y);
1620
- const b = new ut((E, w) => {
1621
- this.clearGlobalBindingForCustomChange(), d.value = E.replace("#", "").toUpperCase(), p.style.backgroundColor = E, this.value.stops[n].color = E, w !== void 0 && (this.value.stops[n].opacity = w, v.value = String(w), y.textContent = `${w}%`);
1622
- const N = P(E);
1623
- v.style.setProperty("--slider-color", `rgb(${N.r}, ${N.g}, ${N.b})`), this.updateGradientPreview(), this.createHandles(
1623
+ y.className = "gstop-opacity-value", y.textContent = `${s.opacity ?? 100}%`, u.appendChild(C), u.appendChild(y);
1624
+ const x = new ut((E, b) => {
1625
+ this.clearGlobalBindingForCustomChange(), h.value = E.replace("#", "").toUpperCase(), d.style.backgroundColor = E, this.value.stops[n].color = E, b !== void 0 && (this.value.stops[n].opacity = b, C.value = String(b), y.textContent = `${b}%`);
1626
+ const I = P(E);
1627
+ C.style.setProperty("--slider-color", `rgb(${I.r}, ${I.g}, ${I.b})`), this.updateGradientPreview(), this.createHandles(
1624
1628
  this.popoverEl.querySelector(".gradient-handles"),
1625
1629
  this.popoverEl.querySelector(".gradient-preview")
1626
1630
  ), this.updateUI(), this.triggerChange();
1627
1631
  }, "solid");
1628
- d.addEventListener("click", (E) => {
1632
+ h.addEventListener("click", (E) => {
1629
1633
  E.preventDefault(), E.stopPropagation();
1630
- const w = this.resolveGlobalVarColor(s.color);
1631
- b.open(w, d, s.opacity ?? 100);
1632
- }), d.addEventListener("input", () => {
1634
+ const b = this.resolveGlobalVarColor(s.color);
1635
+ x.open(b, h, s.opacity ?? 100);
1636
+ }), h.addEventListener("input", () => {
1633
1637
  this.clearGlobalBindingForCustomChange();
1634
- const E = d.value.trim(), w = E.startsWith("#") ? E : `#${E}`;
1635
- if (/^#[0-9A-Fa-f]{6}$/.test(w)) {
1636
- this.value.stops[n].color = w, p.style.backgroundColor = w;
1637
- const N = P(w);
1638
- v.style.setProperty("--slider-color", `rgb(${N.r}, ${N.g}, ${N.b})`), this.debouncedPreviewUpdate();
1638
+ const E = h.value.trim(), b = E.startsWith("#") ? E : `#${E}`;
1639
+ if (/^#[0-9A-Fa-f]{6}$/.test(b)) {
1640
+ this.value.stops[n].color = b, d.style.backgroundColor = b;
1641
+ const I = P(b);
1642
+ C.style.setProperty("--slider-color", `rgb(${I.r}, ${I.g}, ${I.b})`), this.debouncedPreviewUpdate();
1639
1643
  }
1640
- }), d.addEventListener("blur", () => {
1644
+ }), h.addEventListener("blur", () => {
1641
1645
  this.previewUpdateTimeout && (clearTimeout(this.previewUpdateTimeout), this.previewUpdateTimeout = null), this.updateGradientPreview(), this.updateUI(), this.triggerChange();
1642
1646
  }), g.addEventListener("click", async (E) => {
1643
1647
  E.stopPropagation();
1644
1648
  try {
1645
- await navigator.clipboard.writeText(`#${d.value}`);
1649
+ await navigator.clipboard.writeText(`#${h.value}`);
1646
1650
  } catch {
1647
1651
  }
1648
1652
  }), l.addEventListener("focus", (E) => {
1649
- const w = E.target;
1650
- w.value = w.value.replace("%", ""), w.select();
1653
+ const b = E.target;
1654
+ b.value = b.value.replace("%", ""), b.select();
1651
1655
  }), l.addEventListener("input", (E) => {
1652
1656
  this.clearGlobalBindingForCustomChange();
1653
- const w = E.target, N = parseInt(w.value.replace(/[^\d]/g, ""), 10);
1654
- if (!Number.isNaN(N)) {
1655
- const D = Math.max(0, Math.min(100, N));
1656
- this.value.stops[n].position = D, w.value = `${D}%`, this.debouncedPreviewUpdate();
1657
+ const b = E.target, I = parseInt(b.value.replace(/[^\d]/g, ""), 10);
1658
+ if (!Number.isNaN(I)) {
1659
+ const D = Math.max(0, Math.min(100, I));
1660
+ this.value.stops[n].position = D, b.value = `${D}%`, this.debouncedPreviewUpdate();
1657
1661
  }
1658
1662
  }), l.addEventListener("blur", (E) => {
1659
1663
  this.previewUpdateTimeout && (clearTimeout(this.previewUpdateTimeout), this.previewUpdateTimeout = null);
1660
- const w = E.target, N = parseInt(w.value.replace(/[^\d]/g, ""), 10);
1661
- if (Number.isNaN(N))
1662
- w.value = `${this.value.stops[n].position}%`;
1664
+ const b = E.target, I = parseInt(b.value.replace(/[^\d]/g, ""), 10);
1665
+ if (Number.isNaN(I))
1666
+ b.value = `${this.value.stops[n].position}%`;
1663
1667
  else {
1664
- const D = Math.max(0, Math.min(100, N));
1665
- this.value.stops[n].position = D, w.value = `${D}%`;
1668
+ const D = Math.max(0, Math.min(100, I));
1669
+ this.value.stops[n].position = D, b.value = `${D}%`;
1666
1670
  }
1667
1671
  this.updateGradientPreview(), this.createHandles(
1668
1672
  this.popoverEl.querySelector(".gradient-handles"),
1669
1673
  this.popoverEl.querySelector(".gradient-preview")
1670
1674
  ), this.updateStopsList(), this.updateUI(), this.triggerChange();
1671
- }), C.addEventListener("click", () => {
1675
+ }), f.addEventListener("click", () => {
1672
1676
  var E;
1673
1677
  (this.value.stops.length || 0) <= 2 || (this.clearGlobalBindingForCustomChange(), this.value.stops.splice(n, 1), this.createHandles(
1674
1678
  this.popoverEl.querySelector(".gradient-handles"),
1675
1679
  this.popoverEl.querySelector(".gradient-preview")
1676
1680
  ), this.updateStopsList(), this.updateGradientPreview(), this.updateUI(), ((E = document.activeElement) == null ? void 0 : E.tagName) !== "INPUT" && this.repositionPopover(), this.triggerChange());
1677
- }), v.addEventListener("input", () => {
1681
+ }), C.addEventListener("input", () => {
1678
1682
  this.clearGlobalBindingForCustomChange();
1679
- const E = parseInt(v.value, 10);
1683
+ const E = parseInt(C.value, 10);
1680
1684
  this.value.stops[n].opacity = Math.max(0, Math.min(100, E)), y.textContent = `${this.value.stops[n].opacity}%`, this.debouncedPreviewUpdate();
1681
- }), v.addEventListener("change", () => {
1685
+ }), C.addEventListener("change", () => {
1682
1686
  this.clearGlobalBindingForCustomChange(), this.previewUpdateTimeout && (clearTimeout(this.previewUpdateTimeout), this.previewUpdateTimeout = null), this.updateGradientPreview(), this.updateUI(), this.triggerChange();
1683
1687
  });
1684
1688
  }));
@@ -1707,10 +1711,10 @@ const V = class V extends x {
1707
1711
  this.popoverEl.style.position = "fixed", this.popoverEl.style.zIndex = "10000", this.popoverEl.style.left = "-9999px", this.popoverEl.style.top = "0px";
1708
1712
  const o = this.popoverEl.offsetHeight;
1709
1713
  let a = t.right + 8, l = t.top;
1710
- const r = i - t.right, c = t.left, p = e + n;
1711
- r < p && c > r + 100 && (a = t.left - e - 8);
1712
- const d = s - t.bottom, g = t.top;
1713
- g >= o + n ? l = t.top - o - 8 : d >= o + n ? l = t.bottom + 8 : g > d ? (l = t.top - o - 8, l < n && (l = n)) : (l = t.bottom + 8, l + o > s - n && (l = s - o - n)), this.popoverEl.style.left = `${a}px`, this.popoverEl.style.top = `${l}px`, this.popoverPosition = { left: a, top: l };
1714
+ const r = i - t.right, c = t.left, d = e + n;
1715
+ r < d && c > r + 100 && (a = t.left - e - 8);
1716
+ const h = s - t.bottom, g = t.top;
1717
+ g >= o + n ? l = t.top - o - 8 : h >= o + n ? l = t.bottom + 8 : g > h ? (l = t.top - o - 8, l < n && (l = n)) : (l = t.bottom + 8, l + o > s - n && (l = s - o - n)), this.popoverEl.style.left = `${a}px`, this.popoverEl.style.top = `${l}px`, this.popoverPosition = { left: a, top: l };
1714
1718
  }
1715
1719
  setTimeout(() => document.addEventListener("click", this.onBackgroundClick, !0), 200), document.addEventListener("keydown", this.handlePopoverKeydown, !0);
1716
1720
  }
@@ -1728,10 +1732,10 @@ const V = class V extends x {
1728
1732
  this.popoverEl.style.left, this.popoverEl.style.top, this.popoverEl.style.left = "-9999px", this.popoverEl.style.top = "0px";
1729
1733
  const a = this.popoverEl.offsetHeight;
1730
1734
  let l = e.right + 8, r = e.top;
1731
- const c = s - e.right, p = e.left, d = i + o;
1732
- c < d && p > c + 100 && (l = e.left - i - 8);
1733
- const g = n - e.bottom, C = e.top;
1734
- C >= a + o ? r = e.top - a - 8 : g >= a + o ? r = e.bottom + 8 : C > g ? (r = e.top - a - 8, r < o && (r = o)) : (r = e.bottom + 8, r + a > n - o && (r = n - a - o)), this.popoverEl.style.left = `${l}px`, this.popoverEl.style.top = `${r}px`;
1735
+ const c = s - e.right, d = e.left, h = i + o;
1736
+ c < h && d > c + 100 && (l = e.left - i - 8);
1737
+ const g = n - e.bottom, f = e.top;
1738
+ f >= a + o ? r = e.top - a - 8 : g >= a + o ? r = e.bottom + 8 : f > g ? (r = e.top - a - 8, r < o && (r = o)) : (r = e.bottom + 8, r + a > n - o && (r = n - a - o)), this.popoverEl.style.left = `${l}px`, this.popoverEl.style.top = `${r}px`;
1735
1739
  });
1736
1740
  }
1737
1741
  }
@@ -1806,22 +1810,22 @@ const V = class V extends x {
1806
1810
  };
1807
1811
  V.openInstance = null, V.CHANGE_DEBOUNCE_DELAY = 150;
1808
1812
  let j = V;
1809
- function J(h, t) {
1810
- for (const e in h)
1811
- if (Object.prototype.hasOwnProperty.call(h, e)) {
1812
- const i = h[e];
1813
+ function J(p, t) {
1814
+ for (const e in p)
1815
+ if (Object.prototype.hasOwnProperty.call(p, e)) {
1816
+ const i = p[e];
1813
1817
  t(e, i);
1814
1818
  }
1815
1819
  }
1816
1820
  const Q = class Q {
1817
1821
  constructor(t) {
1818
1822
  this.elementRef = null, this.isHidden = !1, this.custom = !1, this.initialValues = {}, this.changeTimeout = null, this.isHandlingChange = !1, this.changeHandlers = /* @__PURE__ */ new Set(), this.blurTimeout = null, this.lastChangeTime = 0, this.handleBlur = () => {
1819
- }, this.pendingBlurHandler = null, this.originalDefaultValues = {}, this.nestingLevel = 0, this.dataPropsPath = "", this.hide = !1, this.id = t.id || mt(), this.title = t.title, this.settings = t.settings, this.isCollapsed = t.collapsed ?? !1, this.isMain = t.main ?? !1, this.custom = t.custom ?? !1, this.nestingLevel = 0, this.includeGetJson = t.includeGetJson ?? !0, this.addItemCfg = t.addItem, this.deleteItemCfg = t.deleteItem, this.dataProps = t.dataProps, this.dataPropsPath = t.dataProps || "", this.hide = t.hide ?? !1, Object.assign(this, t.settings), this.initialValues = this.getValues(), this.originalDefaultValues = this.getDefaultValues(), this.propagateNestingLevel(), this.propagateDataPropsPath();
1823
+ }, this.pendingBlurHandler = null, this.originalDefaultValues = {}, this.nestingLevel = 0, this.dataPropsPath = "", this.hide = !1, this.id = t.id || ft(), this.title = t.title, this.settings = t.settings, this.isCollapsed = t.collapsed ?? !1, this.isMain = t.main ?? !1, this.custom = t.custom ?? !1, this.nestingLevel = 0, this.includeGetJson = t.includeGetJson ?? !0, this.addItemCfg = t.addItem, this.deleteItemCfg = t.deleteItem, this.dataProps = t.dataProps, this.dataPropsPath = t.dataProps || "", this.hide = t.hide ?? !1, Object.assign(this, t.settings), this.initialValues = this.getValues(), this.originalDefaultValues = this.getDefaultValues(), this.propagateNestingLevel(), this.propagateDataPropsPath();
1820
1824
  }
1821
1825
  propagateNestingLevel() {
1822
1826
  const t = this.nestingLevel + 1;
1823
1827
  J(this.settings, (e, i) => {
1824
- k(i) && (i.nestingLevel = t, i.propagateNestingLevel());
1828
+ L(i) && (i.nestingLevel = t, i.propagateNestingLevel());
1825
1829
  });
1826
1830
  }
1827
1831
  getNestingLevel() {
@@ -1847,16 +1851,16 @@ const Q = class Q {
1847
1851
  propagateDataPropsPath() {
1848
1852
  J(this.settings, (t, e) => {
1849
1853
  const i = String(t), s = this.dataPropsPath ? `${this.dataPropsPath}_${i}` : i;
1850
- (k(e) || G(e) && typeof e.setDataPropsPath == "function") && e.setDataPropsPath(s);
1854
+ (L(e) || F(e) && typeof e.setDataPropsPath == "function") && e.setDataPropsPath(s);
1851
1855
  });
1852
1856
  }
1853
1857
  updateNestingStyles() {
1854
- this.elementRef && (Z(this.elementRef, this.nestingLevel), et(this.elementRef, this.nestingLevel));
1858
+ this.elementRef && (_(this.elementRef, this.nestingLevel), et(this.elementRef, this.nestingLevel));
1855
1859
  }
1856
1860
  forceChildUIRefresh() {
1857
1861
  Object.entries(this.settings).forEach(([t, e]) => {
1858
1862
  try {
1859
- if (k(e)) {
1863
+ if (L(e)) {
1860
1864
  const i = e.getValues();
1861
1865
  e.setValue(i);
1862
1866
  } else if (typeof e.setValue == "function") {
@@ -1911,20 +1915,20 @@ const Q = class Q {
1911
1915
  const i = (e == null ? void 0 : e.preserveValues) ?? !0, s = new Set(Object.keys(this.settings)), n = Object.keys(t), o = {};
1912
1916
  i && n.forEach((r) => {
1913
1917
  const c = this.settings[r];
1914
- c && (k(c) ? o[r] = c.getValues() : G(c) ? o[r] = c.value : typeof c.getValues == "function" ? o[r] = c.getValues() : c.value !== void 0 && (o[r] = c.value));
1918
+ c && (L(c) ? o[r] = c.getValues() : F(c) ? o[r] = c.value : typeof c.getValues == "function" ? o[r] = c.getValues() : c.value !== void 0 && (o[r] = c.value));
1915
1919
  }), s.forEach((r) => {
1916
1920
  n.includes(r) || this.removeSetting(r);
1917
1921
  }), n.forEach((r) => {
1918
- var d;
1919
- const c = t[r], p = this.settings[r];
1920
- if (p !== c && (p && this.removeSetting(r), this.addSetting(r, c), i && r in o)) {
1922
+ var h;
1923
+ const c = t[r], d = this.settings[r];
1924
+ if (d !== c && (d && this.removeSetting(r), this.addSetting(r, c), i && r in o)) {
1921
1925
  const g = o[r];
1922
1926
  try {
1923
- k(c) ? c.setValue(
1927
+ L(c) ? c.setValue(
1924
1928
  g
1925
- ) : G(c) ? (d = c.setValue) == null || d.call(c, g) : c.setValue && c.setValue(g);
1926
- } catch (C) {
1927
- console.warn(`Could not preserve value for setting ${r}:`, C);
1929
+ ) : F(c) ? (h = c.setValue) == null || h.call(c, g) : c.setValue && c.setValue(g);
1930
+ } catch (f) {
1931
+ console.warn(`Could not preserve value for setting ${r}:`, f);
1928
1932
  }
1929
1933
  }
1930
1934
  }), this.settings = t, this.propagateNestingLevel(), this.propagateDataPropsPath();
@@ -1950,7 +1954,7 @@ const Q = class Q {
1950
1954
  deleteItem: this.deleteItemCfg,
1951
1955
  dataProps: this.dataProps,
1952
1956
  hide: this.hide
1953
- }, i = Dt(e);
1957
+ }, i = Gt(e);
1954
1958
  return i.initialValues = this.getValues(), i;
1955
1959
  }
1956
1960
  resetDefault() {
@@ -1960,7 +1964,7 @@ const Q = class Q {
1960
1964
  setMobileValues(t) {
1961
1965
  !t || typeof t != "object" || (Object.entries(t).forEach(([e, i]) => {
1962
1966
  const s = this.settings[e];
1963
- s && (k(s) || G(s)) && typeof s.setMobileValue == "function" && s.setMobileValue(i);
1967
+ s && (L(s) || F(s)) && typeof s.setMobileValue == "function" && s.setMobileValue(i);
1964
1968
  }), this.setValue(t), this.onChange && this.onChange(this.getValues()));
1965
1969
  }
1966
1970
  getMobileValues(t) {
@@ -1969,7 +1973,7 @@ const Q = class Q {
1969
1973
  for (const i in this.settings)
1970
1974
  if (Object.prototype.hasOwnProperty.call(this.settings, i)) {
1971
1975
  const s = this.settings[i];
1972
- if (k(s))
1976
+ if (L(s))
1973
1977
  e[i] = s.getMobileValues();
1974
1978
  else {
1975
1979
  const n = s;
@@ -1980,7 +1984,7 @@ const Q = class Q {
1980
1984
  } else {
1981
1985
  const e = this.settings[t];
1982
1986
  if (!e) return;
1983
- if (k(e)) return e.getMobileValues();
1987
+ if (L(e)) return e.getMobileValues();
1984
1988
  const i = e;
1985
1989
  return i.mobileValue !== void 0 ? i.mobileValue : i.value;
1986
1990
  }
@@ -1998,12 +2002,12 @@ const Q = class Q {
1998
2002
  };
1999
2003
  return this.changeHandlers.clear(), J(this.settings, (i, s) => {
2000
2004
  var n;
2001
- if (k(s))
2005
+ if (L(s))
2002
2006
  s.setOnChange(() => {
2003
2007
  const o = this.getValues();
2004
2008
  this.initialValues = o, t(o);
2005
2009
  }), this.changeHandlers.add(() => t(this.getValues()));
2006
- else if (G(s)) {
2010
+ else if (F(s)) {
2007
2011
  const o = () => e();
2008
2012
  this.changeHandlers.add(o), s.setOnChange(o);
2009
2013
  } else {
@@ -2029,7 +2033,7 @@ const Q = class Q {
2029
2033
  ct(l) && (this.addSetting(i, l), n = l);
2030
2034
  }
2031
2035
  }
2032
- n && (k(n) || G(n)) && typeof n.setValue == "function" && n.setValue(s);
2036
+ n && (L(n) || F(n)) && typeof n.setValue == "function" && n.setValue(s);
2033
2037
  }), setTimeout(() => {
2034
2038
  this.forceChildUIRefresh();
2035
2039
  }, 0);
@@ -2043,7 +2047,7 @@ const Q = class Q {
2043
2047
  const s = this.getValues();
2044
2048
  this.initialValues = s, (n = this.onChange) == null || n.call(this, s), this.updateVisibility();
2045
2049
  };
2046
- k(t) ? t.setOnChange(() => e()) : G(t) ? t.setOnChange(() => e()) : (i = t.setOnChange) == null || i.call(t, () => e());
2050
+ L(t) ? t.setOnChange(() => e()) : F(t) ? t.setOnChange(() => e()) : (i = t.setOnChange) == null || i.call(t, () => e());
2047
2051
  }
2048
2052
  addSetting(t, e) {
2049
2053
  var s, n;
@@ -2052,14 +2056,14 @@ const Q = class Q {
2052
2056
  ".setting-group-content"
2053
2057
  );
2054
2058
  if (o) {
2055
- k(e) && typeof e.setNestingLevel == "function" && e.setNestingLevel(this.nestingLevel + 1);
2059
+ L(e) && typeof e.setNestingLevel == "function" && e.setNestingLevel(this.nestingLevel + 1);
2056
2060
  const a = e.draw(), l = this.deleteItemCfg ?? this.addItemCfg;
2057
2061
  if (l) {
2058
- const p = l.keyPrefix ?? ((s = this.addItemCfg) == null ? void 0 : s.keyPrefix);
2059
- p && t.startsWith(p) && this.addDeleteButtonToElement(a, t);
2062
+ const d = l.keyPrefix ?? ((s = this.addItemCfg) == null ? void 0 : s.keyPrefix);
2063
+ d && t.startsWith(d) && this.addDeleteButtonToElement(a, t);
2060
2064
  }
2061
2065
  const r = o.querySelector(".sg-add-button-bottom");
2062
- r ? o.insertBefore(a, r) : o.appendChild(a), rt.trackElement(a), Z(a, this.nestingLevel + 1), et(a, this.nestingLevel + 1);
2066
+ r ? o.insertBefore(a, r) : o.appendChild(a), rt.trackElement(a), _(a, this.nestingLevel + 1), et(a, this.nestingLevel + 1);
2063
2067
  const c = a.style.display;
2064
2068
  a.style.display = "none", a.offsetHeight, a.style.display = c, this.updateNestingStyles();
2065
2069
  }
@@ -2208,11 +2212,11 @@ const Q = class Q {
2208
2212
  r(), t(!1);
2209
2213
  }), l.addEventListener("click", () => {
2210
2214
  r(), t(!0);
2211
- }), e.addEventListener("click", (p) => {
2212
- p.target === e && (r(), t(!1));
2215
+ }), e.addEventListener("click", (d) => {
2216
+ d.target === e && (r(), t(!1));
2213
2217
  });
2214
- const c = (p) => {
2215
- p.key === "Escape" && (r(), t(!1), document.removeEventListener("keydown", c));
2218
+ const c = (d) => {
2219
+ d.key === "Escape" && (r(), t(!1), document.removeEventListener("keydown", c));
2216
2220
  };
2217
2221
  document.addEventListener("keydown", c), o.appendChild(a), o.appendChild(l), i.appendChild(s), i.appendChild(n), i.appendChild(o), e.appendChild(i), document.body.appendChild(e), requestAnimationFrame(() => {
2218
2222
  e.style.opacity = "1", i.style.transform = "scale(1)";
@@ -2247,7 +2251,7 @@ const Q = class Q {
2247
2251
  for (const i in this.settings)
2248
2252
  if (Object.prototype.hasOwnProperty.call(this.settings, i)) {
2249
2253
  const s = this.settings[i];
2250
- if (k(s))
2254
+ if (L(s))
2251
2255
  e[i] = s.getValues();
2252
2256
  else {
2253
2257
  const n = s;
@@ -2258,7 +2262,7 @@ const Q = class Q {
2258
2262
  } else {
2259
2263
  const e = this.settings[t];
2260
2264
  if (!e) return;
2261
- if (k(e)) return e.getValues();
2265
+ if (L(e)) return e.getValues();
2262
2266
  const i = e;
2263
2267
  return i.getValue ? i.getValue() : i.value;
2264
2268
  }
@@ -2271,7 +2275,7 @@ const Q = class Q {
2271
2275
  for (const s in this.settings)
2272
2276
  if (Object.prototype.hasOwnProperty.call(this.settings, s)) {
2273
2277
  const n = this.settings[s];
2274
- if (k(n)) {
2278
+ if (L(n)) {
2275
2279
  const o = n.getValuesForJson();
2276
2280
  o !== null && (i[s] = o);
2277
2281
  } else {
@@ -2288,7 +2292,7 @@ const Q = class Q {
2288
2292
  } else {
2289
2293
  const i = this.settings[t];
2290
2294
  if (!i) return;
2291
- if (k(i))
2295
+ if (L(i))
2292
2296
  return i.includeGetJson === !1 ? null : i.getValuesForJson();
2293
2297
  {
2294
2298
  const s = i;
@@ -2307,7 +2311,7 @@ const Q = class Q {
2307
2311
  for (const i in this.settings)
2308
2312
  if (Object.prototype.hasOwnProperty.call(this.settings, i)) {
2309
2313
  const s = this.settings[i];
2310
- if (k(s))
2314
+ if (L(s))
2311
2315
  e[i] = s.getDefaultValues();
2312
2316
  else {
2313
2317
  const n = s;
@@ -2318,14 +2322,14 @@ const Q = class Q {
2318
2322
  } else {
2319
2323
  const e = this.settings[t];
2320
2324
  if (!e) return;
2321
- if (k(e)) return e.getDefaultValues();
2325
+ if (L(e)) return e.getDefaultValues();
2322
2326
  const i = e;
2323
2327
  return i.default !== void 0 ? i.default : i.value;
2324
2328
  }
2325
2329
  }
2326
2330
  draw() {
2327
2331
  const t = document.createElement("div");
2328
- t.className = "setting-group", t.id = `setting-group-${this.id}`, Q.hiddenElements.add(t), this.hide && (t.style.display = "none"), this.isMain && t.classList.add("main-group"), this.custom && t.classList.add("custom_class"), Z(t, this.nestingLevel);
2332
+ t.className = "setting-group", t.id = `setting-group-${this.id}`, Q.hiddenElements.add(t), this.hide && (t.style.display = "none"), this.isMain && t.classList.add("main-group"), this.custom && t.classList.add("custom_class"), _(t, this.nestingLevel);
2329
2333
  const e = document.createElement("div");
2330
2334
  e.className = "setting-group-title", this.isCollapsed && e.classList.add("collapsed-view"), e.setAttribute("role", "button"), e.setAttribute(
2331
2335
  "aria-expanded",
@@ -2356,14 +2360,14 @@ const Q = class Q {
2356
2360
  }, Object.keys(this.settings).length > 0) {
2357
2361
  for (const c in this.settings)
2358
2362
  if (Object.prototype.hasOwnProperty.call(this.settings, c)) {
2359
- const p = this.settings[c];
2360
- k(p) && typeof p.setNestingLevel == "function" && p.setNestingLevel(this.nestingLevel + 1);
2361
- const d = p.draw();
2362
- k(p) && p.deleteItemCfg && this.addDeleteButtonToElement(
2363
- d,
2363
+ const d = this.settings[c];
2364
+ L(d) && typeof d.setNestingLevel == "function" && d.setNestingLevel(this.nestingLevel + 1);
2365
+ const h = d.draw();
2366
+ L(d) && d.deleteItemCfg && this.addDeleteButtonToElement(
2367
+ h,
2364
2368
  c,
2365
- p
2366
- ), a.appendChild(d);
2369
+ d
2370
+ ), a.appendChild(h);
2367
2371
  }
2368
2372
  } else {
2369
2373
  const c = document.createElement("div");
@@ -2372,18 +2376,18 @@ const Q = class Q {
2372
2376
  if (this.addItemCfg) {
2373
2377
  const c = document.createElement("button");
2374
2378
  c.type = "button", c.className = "sg-add-button-bottom", c.style.marginTop = "8px";
2375
- const p = `
2379
+ const d = `
2376
2380
  <svg width="16" height="16" viewBox="0 0 16 16" fill="none"
2377
2381
  xmlns="http://www.w3.org/2000/svg">
2378
2382
  <path d="M8 3.333v9.334M3.333 8h9.334" stroke="currentColor"
2379
2383
  stroke-width="1.5" stroke-linecap="round"/>
2380
2384
  </svg>`;
2381
- c.innerHTML = `${p}<span style="margin-left:4px;">${this.addItemCfg.buttonLabel ?? "Add"}</span>`, c.addEventListener("click", (d) => {
2382
- d.stopPropagation(), d.preventDefault();
2383
- const g = this.getNextIndexFromPrefix(this.addItemCfg.keyPrefix), C = this.addItemCfg.createItem(g);
2384
- if (ct(C)) {
2385
+ c.innerHTML = `${d}<span style="margin-left:4px;">${this.addItemCfg.buttonLabel ?? "Add"}</span>`, c.addEventListener("click", (h) => {
2386
+ h.stopPropagation(), h.preventDefault();
2387
+ const g = this.getNextIndexFromPrefix(this.addItemCfg.keyPrefix), f = this.addItemCfg.createItem(g);
2388
+ if (ct(f)) {
2385
2389
  const m = `${this.addItemCfg.keyPrefix}${g}`;
2386
- this.addSetting(m, C);
2390
+ this.addSetting(m, f);
2387
2391
  }
2388
2392
  }), a.appendChild(c);
2389
2393
  }
@@ -2430,11 +2434,11 @@ const Q = class Q {
2430
2434
  }
2431
2435
  };
2432
2436
  Q.hiddenElements = /* @__PURE__ */ new Set();
2433
- let $ = Q;
2434
- function be(h) {
2435
- return new At(h);
2437
+ let H = Q;
2438
+ function Me(p) {
2439
+ return new Ft(p);
2436
2440
  }
2437
- class At extends $ {
2441
+ class Ft extends H {
2438
2442
  constructor(t) {
2439
2443
  super(t);
2440
2444
  const e = Object.keys(this.settings)[0];
@@ -2484,9 +2488,9 @@ class At extends $ {
2484
2488
  r.className = "tab-button", r.type = "button", r.setAttribute("data-tab-id", a), r.textContent = a, r.addEventListener("click", () => this.switchToTab(a)), n.appendChild(r);
2485
2489
  const c = document.createElement("div");
2486
2490
  c.className = "tab-panel", this.contentContainers[a] = c;
2487
- const p = this.settings[a];
2488
- p && (k(p) && typeof p.setNestingLevel == "function" && p.setNestingLevel(this.getNestingLevel() + 1), c.appendChild(
2489
- p.draw()
2491
+ const d = this.settings[a];
2492
+ d && (L(d) && typeof d.setNestingLevel == "function" && d.setNestingLevel(this.getNestingLevel() + 1), c.appendChild(
2493
+ d.draw()
2490
2494
  )), o.appendChild(c), l === 0 && !this.activeTabId && (this.activeTabId = a);
2491
2495
  }), e.appendChild(i), e.appendChild(n), e.appendChild(o), !this.activeTabId) {
2492
2496
  const a = Object.keys(this.settings)[0];
@@ -2495,13 +2499,13 @@ class At extends $ {
2495
2499
  return this.updateTabUI(), t;
2496
2500
  }
2497
2501
  }
2498
- function Dt(h) {
2499
- return new $(h);
2502
+ function Gt(p) {
2503
+ return new H(p);
2500
2504
  }
2501
- function we(h) {
2502
- return h;
2505
+ function Ie(p) {
2506
+ return p;
2503
2507
  }
2504
- class Gt extends x {
2508
+ class Rt extends w {
2505
2509
  constructor(t = {}) {
2506
2510
  super(t), this.inputType = "text", t.onChange && this.setOnChange(t.onChange);
2507
2511
  }
@@ -2521,12 +2525,12 @@ class Gt extends x {
2521
2525
  });
2522
2526
  }
2523
2527
  }
2524
- const Ft = "<svg xmlns='http://www.w3.org/2000/svg' width='18' height='19' viewBox='0 0 18 19' fill='none'><path d='M8.99999 15.8542C9.79613 16.5667 10.8475 17 12 17C14.4853 17 16.5 14.9853 16.5 12.5C16.5 10.4248 15.0953 8.67769 13.1849 8.15763M4.81513 8.15762C2.9047 8.67768 1.5 10.4248 1.5 12.5C1.5 14.9853 3.51472 17 6 17C8.48528 17 10.5 14.9853 10.5 12.5C10.5 11.9146 10.3882 11.3554 10.1849 10.8424M13.5 6.5C13.5 8.98528 11.4853 11 9 11C6.51472 11 4.5 8.98528 4.5 6.5C4.5 4.01472 6.51472 2 9 2C11.4853 2 13.5 4.01472 13.5 6.5Z' stroke='#667085' stroke-linecap='round' stroke-linejoin='round'/></svg>";
2525
- class O extends Gt {
2528
+ const zt = "<svg xmlns='http://www.w3.org/2000/svg' width='18' height='19' viewBox='0 0 18 19' fill='none'><path d='M8.99999 15.8542C9.79613 16.5667 10.8475 17 12 17C14.4853 17 16.5 14.9853 16.5 12.5C16.5 10.4248 15.0953 8.67769 13.1849 8.15763M4.81513 8.15762C2.9047 8.67768 1.5 10.4248 1.5 12.5C1.5 14.9853 3.51472 17 6 17C8.48528 17 10.5 14.9853 10.5 12.5C10.5 11.9146 10.3882 11.3554 10.1849 10.8424M13.5 6.5C13.5 8.98528 11.4853 11 9 11C6.51472 11 4.5 8.98528 4.5 6.5C4.5 4.01472 6.51472 2 9 2C11.4853 2 13.5 4.01472 13.5 6.5Z' stroke='#667085' stroke-linecap='round' stroke-linejoin='round'/></svg>";
2529
+ class O extends Rt {
2526
2530
  constructor(t) {
2527
2531
  super({
2528
2532
  ...t,
2529
- icon: t.icon || Ft,
2533
+ icon: t.icon || zt,
2530
2534
  title: t.title || "Color",
2531
2535
  default: t.default ? O.normalizeColorValue(t.default) : "#000000"
2532
2536
  }), this.inputType = "color", this.element = null, this.colorInputEl = null, this.textInputEl = null, this.detectChange = t.detectChange;
@@ -2542,8 +2546,8 @@ class O extends Gt {
2542
2546
  if (e.length !== 3 || e.some(isNaN))
2543
2547
  return console.warn(`Invalid RGB value "${t}", using default "#000000"`), "#000000";
2544
2548
  const [i, s, n] = e, o = Math.max(0, Math.min(255, i)), a = Math.max(0, Math.min(255, s)), l = Math.max(0, Math.min(255, n)), r = (c) => {
2545
- const p = c.toString(16);
2546
- return p.length === 1 ? "0" + p : p;
2549
+ const d = c.toString(16);
2550
+ return d.length === 1 ? "0" + d : d;
2547
2551
  };
2548
2552
  return `#${r(o)}${r(a)}${r(l)}`;
2549
2553
  }
@@ -2591,28 +2595,28 @@ class O extends Gt {
2591
2595
  a.className = "color-content-global", a.style.display = "none", a.style.display = "grid", a.style.gridTemplateColumns = "repeat(auto-fill, minmax(30px, 1fr))", a.style.gap = "8px";
2592
2596
  const l = () => {
2593
2597
  try {
2594
- if (console.log("ColorSetting: renderGlobalOptions called"), a.innerHTML = "", !x) {
2598
+ if (console.log("ColorSetting: renderGlobalOptions called"), a.innerHTML = "", !w) {
2595
2599
  console.error("ColorSetting: Setting class is undefined");
2596
2600
  const u = document.createElement("div");
2597
2601
  u.textContent = "Error: System error (Setting undefined)", a.appendChild(u);
2598
2602
  return;
2599
2603
  }
2600
- const m = x.GlobalVariables || {};
2604
+ const m = w.GlobalVariables || {};
2601
2605
  if (console.log("ColorSetting: GlobalVariables:", m), !m || Object.keys(m).length === 0) {
2602
2606
  const u = document.createElement("div");
2603
2607
  u.textContent = "No global colors defined", u.style.gridColumn = "1 / -1", u.style.fontSize = "12px", u.style.color = "#666", a.appendChild(u);
2604
2608
  return;
2605
2609
  }
2606
- Object.entries(m).forEach(([u, v]) => {
2607
- const f = document.createElement("button");
2608
- f.className = "global-color-btn", f.title = u, f.style.width = "30px", f.style.height = "30px", f.style.borderRadius = "50%", f.style.border = "1px solid #ddd", f.style.backgroundColor = v, f.style.cursor = "pointer", this.value === `var(--${u})` && (f.style.border = "2px solid #2196f3"), f.addEventListener("click", (y) => {
2609
- var L, I;
2610
+ Object.entries(m).forEach(([u, C]) => {
2611
+ const v = document.createElement("button");
2612
+ v.className = "global-color-btn", v.title = u, v.style.width = "30px", v.style.height = "30px", v.style.borderRadius = "50%", v.style.border = "1px solid #ddd", v.style.backgroundColor = C, v.style.cursor = "pointer", this.value === `var(--${u})` && (v.style.border = "2px solid #2196f3"), v.addEventListener("click", (y) => {
2613
+ var k, N;
2610
2614
  y.preventDefault();
2611
- const b = `var(--${u})`;
2612
- this.value = b, (L = this.onChange) == null || L.call(this, b), (I = this.detectChange) == null || I.call(this, b), Array.from(a.children).forEach((E) => {
2615
+ const x = `var(--${u})`;
2616
+ this.value = x, (k = this.onChange) == null || k.call(this, x), (N = this.detectChange) == null || N.call(this, x), Array.from(a.children).forEach((E) => {
2613
2617
  E.style.border = "1px solid #ddd";
2614
- }), f.style.border = "2px solid #2196f3", p.style.backgroundColor = v;
2615
- }), a.appendChild(f);
2618
+ }), v.style.border = "2px solid #2196f3", d.style.backgroundColor = C;
2619
+ }), a.appendChild(v);
2616
2620
  });
2617
2621
  } catch (m) {
2618
2622
  console.error("ColorSetting: Error in renderGlobalOptions", m), a.innerHTML = "Error loading global options";
@@ -2627,48 +2631,48 @@ class O extends Gt {
2627
2631
  const u = m.value.trim();
2628
2632
  if (!u)
2629
2633
  return e.classList.remove("error"), !0;
2630
- const f = /^#([0-9A-Fa-f]{3}|[0-9A-Fa-f]{6})$/.test(u);
2631
- return f ? e.classList.remove("error") : e.classList.add("error"), f;
2634
+ const v = /^#([0-9A-Fa-f]{3}|[0-9A-Fa-f]{6})$/.test(u);
2635
+ return v ? e.classList.remove("error") : e.classList.add("error"), v;
2632
2636
  }, c = document.createElement("input");
2633
2637
  c.type = "color", c.className = "color-picker", c.value = this.value && !this.value.startsWith("var(--") ? this.value : "#000000", c.setAttribute("aria-label", "Choose color"), c.setAttribute("title", "Click to open color picker"), this.getDataPropsPath() && c.setAttribute("data-test-id", this.getDataPropsPath()), this.colorInputEl = c;
2634
- const p = document.createElement("div");
2635
- p.className = "color-preview";
2636
- let d = this.value || "#000000";
2637
- if (d.startsWith("var(--")) {
2638
- const m = d.replace("var(--", "").replace(")", "");
2639
- d = (x.GlobalVariables || {})[m] || "#000000";
2638
+ const d = document.createElement("div");
2639
+ d.className = "color-preview";
2640
+ let h = this.value || "#000000";
2641
+ if (h.startsWith("var(--")) {
2642
+ const m = h.replace("var(--", "").replace(")", "");
2643
+ h = (w.GlobalVariables || {})[m] || "#000000";
2640
2644
  }
2641
- p.style.backgroundColor = d;
2645
+ d.style.backgroundColor = h;
2642
2646
  const g = document.createElement("input");
2643
2647
  g.type = "text", g.className = "color-text-input", g.value = this.value || "", g.placeholder = "#000000", g.setAttribute("pattern", "#[0-9A-Fa-f]{6}"), g.setAttribute("title", "Enter a hex color value (e.g., #ff0000)"), g.setAttribute("aria-label", "Hex color value"), g.setAttribute("maxlength", "7"), this.getDataPropsPath() && g.setAttribute("data-test-id", `${this.getDataPropsPath()}_text`), this.textInputEl = g;
2644
- const C = (m) => {
2645
- var v, f;
2648
+ const f = (m) => {
2649
+ var C, v;
2646
2650
  let u = m.trim();
2647
2651
  if (u && !u.startsWith("#") && !u.startsWith("var(") && /^[0-9A-Fa-f]{3}$|^[0-9A-Fa-f]{6}$/.test(u) && (u = "#" + u, this.textInputEl && (this.textInputEl.value = u)), this.textInputEl && r(this.textInputEl)) {
2648
2652
  const y = O.normalizeColorValue(u);
2649
- this.value = y, (v = this.onChange) == null || v.call(this, y), (f = this.detectChange) == null || f.call(this, y), this.colorInputEl && (this.colorInputEl.value = y), p.style.backgroundColor = y;
2653
+ this.value = y, (C = this.onChange) == null || C.call(this, y), (v = this.detectChange) == null || v.call(this, y), this.colorInputEl && (this.colorInputEl.value = y), d.style.backgroundColor = y;
2650
2654
  }
2651
2655
  };
2652
2656
  return this.textInputEl.addEventListener("input", (m) => {
2653
2657
  const u = m.target.value;
2654
- C(u);
2658
+ f(u);
2655
2659
  }), this.textInputEl.addEventListener("paste", (m) => {
2656
- var v;
2660
+ var C;
2657
2661
  m.preventDefault();
2658
- const u = ((v = m.clipboardData) == null ? void 0 : v.getData("text")) || "";
2659
- this.textInputEl && (this.textInputEl.value = u.trim(), C(u));
2662
+ const u = ((C = m.clipboardData) == null ? void 0 : C.getData("text")) || "";
2663
+ this.textInputEl && (this.textInputEl.value = u.trim(), f(u));
2660
2664
  }), this.textInputEl.addEventListener("keydown", (m) => {
2661
- var u, v, f;
2662
- m.key === "Enter" && (m.preventDefault(), C(((u = this.textInputEl) == null ? void 0 : u.value) || ""), (v = this.textInputEl) == null || v.blur()), m.key === "Escape" && (this.textInputEl && this.value && (this.textInputEl.value = this.value), (f = this.textInputEl) == null || f.blur(), e.classList.remove("error"));
2665
+ var u, C, v;
2666
+ m.key === "Enter" && (m.preventDefault(), f(((u = this.textInputEl) == null ? void 0 : u.value) || ""), (C = this.textInputEl) == null || C.blur()), m.key === "Escape" && (this.textInputEl && this.value && (this.textInputEl.value = this.value), (v = this.textInputEl) == null || v.blur(), e.classList.remove("error"));
2663
2667
  }), this.colorInputEl.addEventListener("input", (m) => {
2664
- var f, y;
2665
- const u = m.target.value, v = O.normalizeColorValue(u);
2666
- this.value = v, (f = this.onChange) == null || f.call(this, v), (y = this.detectChange) == null || y.call(this, v), this.textInputEl && (this.textInputEl.value = v), p.style.backgroundColor = v, e.classList.remove("error");
2668
+ var v, y;
2669
+ const u = m.target.value, C = O.normalizeColorValue(u);
2670
+ this.value = C, (v = this.onChange) == null || v.call(this, C), (y = this.detectChange) == null || y.call(this, C), this.textInputEl && (this.textInputEl.value = C), d.style.backgroundColor = C, e.classList.remove("error");
2667
2671
  }), this.colorInputEl.addEventListener("change", (m) => {
2668
- var f, y;
2669
- const u = m.target.value, v = O.normalizeColorValue(u);
2670
- this.value = v, (f = this.onChange) == null || f.call(this, v), (y = this.detectChange) == null || y.call(this, v), this.textInputEl && (this.textInputEl.value = v), p.style.backgroundColor = v;
2671
- }), o.appendChild(c), o.appendChild(p), o.appendChild(g), e.appendChild(i), e.appendChild(o), e.appendChild(a), t.appendChild(e), this.element = t, t;
2672
+ var v, y;
2673
+ const u = m.target.value, C = O.normalizeColorValue(u);
2674
+ this.value = C, (v = this.onChange) == null || v.call(this, C), (y = this.detectChange) == null || y.call(this, C), this.textInputEl && (this.textInputEl.value = C), d.style.backgroundColor = C;
2675
+ }), o.appendChild(c), o.appendChild(d), o.appendChild(g), e.appendChild(i), e.appendChild(o), e.appendChild(a), t.appendChild(e), this.element = t, t;
2672
2676
  }
2673
2677
  getElement() {
2674
2678
  return this.element;
@@ -2686,17 +2690,17 @@ class O extends Gt {
2686
2690
  return this.isValidHex() ? this.hexToRgb(this.value) : "0, 0, 0";
2687
2691
  }
2688
2692
  }
2689
- const Rt = `
2693
+ const Ut = `
2690
2694
  <svg xmlns="http://www.w3.org/2000/svg" width="18" height="19" viewBox="0 0 18 19" fill="none">
2691
2695
  <path d="M8.99999 15.8542C9.79613 16.5667 10.8475 17 12 17C14.4853 17 16.5 14.9853 16.5 12.5C16.5 10.4248 15.0953 8.67769 13.1849 8.15763M4.81513 8.15762C2.9047 8.67768 1.5 10.4248 1.5 12.5C1.5 14.9853 3.51472 17 6 17C8.48528 17 10.5 14.9853 10.5 12.5C10.5 11.9146 10.3882 11.3554 10.1849 10.8424M13.5 6.5C13.5 8.98528 11.4853 11 9 11C6.51472 11 4.5 8.98528 4.5 6.5C4.5 4.01472 6.51472 2 9 2C11.4853 2 13.5 4.01472 13.5 6.5Z" stroke="#667085" stroke-linecap="round" stroke-linejoin="round"/>
2692
2696
  <path d="M9 17C13.4183 17 17 13.4183 17 9C17 4.58172 13.4183 1 9 1C4.58172 1 1 4.58172 1 9C1 13.4183 4.58172 17 9 17Z" stroke="#667085" stroke-width="0.5" stroke-linecap="round" stroke-linejoin="round" opacity="0.5"/>
2693
2697
  <path d="M9 1V17C4.58172 17 1 13.4183 1 9C1 4.58172 4.58172 1 9 1Z" fill="#667085" stroke="#667085" stroke-width="0.5" stroke-linecap="round" stroke-linejoin="round" opacity="0.5"/>
2694
2698
  </svg>`;
2695
- class z extends x {
2699
+ class z extends w {
2696
2700
  constructor(t = {}) {
2697
2701
  super({
2698
2702
  ...t,
2699
- icon: t.icon || Rt,
2703
+ icon: t.icon || Ut,
2700
2704
  title: t.title || "Color & Opacity",
2701
2705
  default: t.default || "#000000FF"
2702
2706
  }), this.inputType = "color", this.element = null, this.colorInputEl = null, this.textInputEl = null, this.opacityInputEl = null, this.colorPreviewEl = null, this.detectChange = t.detectChange, this.value && (this.value = z.normalizeHexWithOpacity(this.value));
@@ -2829,7 +2833,7 @@ class z extends x {
2829
2833
  };
2830
2834
  }
2831
2835
  }
2832
- class xe extends x {
2836
+ class Ne extends w {
2833
2837
  constructor(t = {}) {
2834
2838
  super(t), this.inputType = "text", t.onChange && this.setOnChange(t.onChange);
2835
2839
  }
@@ -2861,7 +2865,7 @@ class xe extends x {
2861
2865
  return e.addEventListener("input", i), e.addEventListener("change", i), e.addEventListener("blur", s), t.appendChild(e), t;
2862
2866
  }
2863
2867
  }
2864
- class H extends x {
2868
+ class B extends w {
2865
2869
  constructor(t) {
2866
2870
  super(t), this.inputType = "number", this.inputElement = null, this.mobileValue = t.mobile, this.validateProps(), this.value = this.validateValue(this.value);
2867
2871
  }
@@ -2920,12 +2924,12 @@ class H extends x {
2920
2924
  );
2921
2925
  }
2922
2926
  }
2923
- const zt = `
2927
+ const Wt = `
2924
2928
  <svg xmlns="http://www.w3.org/2000/svg" width="18" height="19" viewBox="0 0 18 19" fill="none">
2925
2929
  <path d="M9 17C13.4183 17 17 13.4183 17 9C17 4.58172 13.4183 1 9 1C4.58172 1 1 4.58172 1 9C1 13.4183 4.58172 17 9 17Z" stroke="#667085" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
2926
2930
  <path d="M9 1V17C4.58172 17 1 13.4183 1 9C1 4.58172 4.58172 1 9 1Z" fill="#667085" stroke="#667085" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
2927
2931
  </svg>`;
2928
- class Ut extends H {
2932
+ class jt extends B {
2929
2933
  constructor(t = {}) {
2930
2934
  const e = {
2931
2935
  title: "Opacity",
@@ -2934,7 +2938,7 @@ class Ut extends H {
2934
2938
  maxValue: 100,
2935
2939
  step: 1,
2936
2940
  default: t.default ?? 100,
2937
- icon: zt,
2941
+ icon: Wt,
2938
2942
  ...t
2939
2943
  };
2940
2944
  super(e), this.inputType = "number", this.mobileValue = t.mobile;
@@ -2946,12 +2950,12 @@ class Ut extends H {
2946
2950
  this.mobileValue = t, t !== void 0 && this.setValue(t);
2947
2951
  }
2948
2952
  }
2949
- const Wt = `
2953
+ const qt = `
2950
2954
  <svg xmlns="http://www.w3.org/2000/svg" class="svg-select" width="12" height="12" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-chevron-down">
2951
2955
  <polyline points="6 9 12 15 18 9"></polyline>
2952
2956
  </svg>
2953
2957
  `;
2954
- class nt extends x {
2958
+ class nt extends w {
2955
2959
  constructor(t = {}) {
2956
2960
  if (super(t), this.inputType = "select", this._options = [], this.isOpen = !1, this.selectedOptionIndex = null, this.optionsListEl = null, this.svgContainer = null, this.buttonEl = null, this.isLoading = !1, this.container = null, this.clickOutsideListener = null, this.resizeListener = null, t.options && (this._options = [...t.options]), t.getOptions && this._options.push(...t.getOptions()), t.getOptionsAsync && (this.isLoading = !0), this.value !== void 0) {
2957
2961
  const e = this._options.findIndex((i) => i.value === this.value);
@@ -2995,7 +2999,7 @@ class nt extends x {
2995
2999
  a.onclick = (l) => this.selectOption(l, o, e), i.appendChild(a);
2996
3000
  }), document.body.appendChild(i);
2997
3001
  const s = document.createElement("div");
2998
- return s.classList.add("svg-container"), s.innerHTML = Wt, t.appendChild(s), this.optionsListEl = i, this.svgContainer = s, this.props.getOptionsAsync && (this.isLoading = !0, this.updateButtonText(), this.props.getOptionsAsync().then((n) => {
3002
+ return s.classList.add("svg-container"), s.innerHTML = qt, t.appendChild(s), this.optionsListEl = i, this.svgContainer = s, this.props.getOptionsAsync && (this.isLoading = !0, this.updateButtonText(), this.props.getOptionsAsync().then((n) => {
2999
3003
  this._options.push(...n), this.isLoading = !1, this.updateOptionsList(), this.updateButtonText();
3000
3004
  }).catch((n) => {
3001
3005
  console.error("Failed to fetch async options:", n), this.isLoading = !1, this.updateButtonText("Failed to load options");
@@ -3058,7 +3062,7 @@ class nt extends x {
3058
3062
  this.clickOutsideListener && (document.removeEventListener("click", this.clickOutsideListener), this.clickOutsideListener = null), this.resizeListener && (window.removeEventListener("resize", this.resizeListener), this.resizeListener = null), this.cleanupDropdownPosition(), this.optionsListEl && this.optionsListEl.parentNode && this.optionsListEl.parentNode.removeChild(this.optionsListEl), super.destroy();
3059
3063
  }
3060
3064
  }
3061
- class jt extends x {
3065
+ class Jt extends w {
3062
3066
  constructor(t = {}) {
3063
3067
  super(t), this.inputType = "button", this.value || (this.value = "center");
3064
3068
  }
@@ -3114,7 +3118,7 @@ class jt extends x {
3114
3118
  }), t.appendChild(i), t;
3115
3119
  }
3116
3120
  }
3117
- class Le extends x {
3121
+ class Se extends w {
3118
3122
  constructor(t) {
3119
3123
  super(t), this.inputType = "button", this.bgWithAlpha = "rgba(145, 158, 171, 0.08)";
3120
3124
  }
@@ -3143,27 +3147,27 @@ class Le extends x {
3143
3147
  return o.className = "button-setting-wrapper " + (this.props.wrapperClassName || ""), o.appendChild(t), o;
3144
3148
  }
3145
3149
  }
3146
- class ke extends x {
3150
+ class Ve extends w {
3147
3151
  constructor(t = {}) {
3148
3152
  super(t), this.inputType = { width: "number", height: "number" }, this.aspectRatio = 1, this.isUpdating = !1;
3149
3153
  const e = t.width || 0, i = t.height || 0;
3150
3154
  this.value || (this.value = {
3151
3155
  width: e,
3152
3156
  height: i
3153
- }), this.minWidth = t.minWidth ?? 0, this.maxWidth = t.maxWidth, this.minHeight = t.minHeight ?? 0, this.maxHeight = t.maxHeight, this.locked = t.locked ?? !1, this.value.height > 0 && (this.aspectRatio = this.value.width / this.value.height), this.widthSetting = new H({
3157
+ }), this.minWidth = t.minWidth ?? 0, this.maxWidth = t.maxWidth, this.minHeight = t.minHeight ?? 0, this.maxHeight = t.maxHeight, this.locked = t.locked ?? !1, this.value.height > 0 && (this.aspectRatio = this.value.width / this.value.height), this.widthSetting = new B({
3154
3158
  title: "Width",
3155
3159
  default: this.value.width,
3156
3160
  suffix: "px",
3157
3161
  minValue: this.minWidth,
3158
3162
  maxValue: this.maxWidth,
3159
- icon: qt
3160
- }), this.heightSetting = new H({
3163
+ icon: Zt
3164
+ }), this.heightSetting = new B({
3161
3165
  title: "Height",
3162
3166
  default: this.value.height,
3163
3167
  suffix: "px",
3164
3168
  minValue: this.minHeight,
3165
3169
  maxValue: this.maxHeight,
3166
- icon: Jt
3170
+ icon: _t
3167
3171
  }), this.widthSetting.setOnChange(this.handleWidthChange.bind(this)), this.heightSetting.setOnChange(this.handleHeightChange.bind(this));
3168
3172
  }
3169
3173
  handleWidthChange(t) {
@@ -3257,24 +3261,24 @@ class ke extends x {
3257
3261
  }
3258
3262
  }
3259
3263
  }
3260
- const qt = `<svg xmlns="http://www.w3.org/2000/svg" width="18" height="19" viewBox="0 0 18 19" fill="none">
3264
+ const Zt = `<svg xmlns="http://www.w3.org/2000/svg" width="18" height="19" viewBox="0 0 18 19" fill="none">
3261
3265
  <path d="M4.5 9.5H13.5M4.5 9.5L6 7.25M4.5 9.5L6 11.75M13.5 9.5L12 7.25M13.5 9.5L12 11.75M15.75 16.25V2.75M2.25 16.25V2.75" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"/>
3262
- </svg>`, Jt = `<svg xmlns="http://www.w3.org/2000/svg" width="18" height="19" viewBox="0 0 18 19" fill="none">
3266
+ </svg>`, _t = `<svg xmlns="http://www.w3.org/2000/svg" width="18" height="19" viewBox="0 0 18 19" fill="none">
3263
3267
  <path d="M9 14L9 5M9 14L6.75 12.5M9 14L11.25 12.5M9 5L6.75 6.5M9 5L11.25 6.5M15.75 2.75H2.25M15.75 16.25H2.25" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"/>
3264
3268
  </svg>`, tt = `
3265
3269
  <svg xmlns="http://www.w3.org/2000/svg" width="15" height="16" viewBox="0 0 15 16" fill="none">
3266
3270
  <path d="M5 10.5L7.5 8M7.5 8L10 10.5M7.5 8V13.625M12.5 10.9643C13.2634 10.3338 13.75 9.37996 13.75 8.3125C13.75 6.41402 12.211 4.875 10.3125 4.875C10.1759 4.875 10.0482 4.80375 9.97882 4.68609C9.16379 3.30302 7.65902 2.375 5.9375 2.375C3.34867 2.375 1.25 4.47367 1.25 7.0625C1.25 8.35381 1.77215 9.52317 2.61684 10.371" stroke="#475467" stroke-linecap="round" stroke-linejoin="round"/>
3267
3271
  </svg>
3268
- `, _t = `
3272
+ `, Xt = `
3269
3273
  <svg width="91" height="71" viewBox="0 0 91 71" fill="none" xmlns="http://www.w3.org/2000/svg">
3270
3274
  <rect width="91" height="71" rx="4" fill="#F2F4F7"/>
3271
3275
  <path d="M37 31.5L39.5 29M39.5 29L42 31.5M39.5 29V34.625M44.5 31.9643C45.2634 31.3338 45.75 30.38 45.75 29.3125C45.75 27.414 44.211 25.875 42.3125 25.875C42.1759 25.875 42.0482 25.8037 41.9788 25.6861C41.1638 24.303 39.659 23.375 37.9375 23.375C35.3487 23.375 33.25 25.4737 33.25 28.0625C33.25 29.3538 33.7721 30.5232 34.6168 31.371" stroke="#475467" stroke-linecap="round" stroke-linejoin="round"/>
3272
3276
  </svg>
3273
- `, Zt = `
3277
+ `, Kt = `
3274
3278
  <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 12 12" fill="none">
3275
3279
  <path d="M8 3V2.6C8 2.03995 8 1.75992 7.89101 1.54601C7.79513 1.35785 7.64215 1.20487 7.45399 1.10899C7.24008 1 6.96005 1 6.4 1H5.6C5.03995 1 4.75992 1 4.54601 1.10899C4.35785 1.20487 4.20487 1.35785 4.10899 1.54601C4 1.75992 4 2.03995 4 2.6V3M5 5.75V8.25M7 5.75V8.25M1.5 3H10.5M9.5 3V8.6C9.5 9.44008 9.5 9.86012 9.33651 10.181C9.1927 10.4632 8.96323 10.6927 8.68099 10.8365C8.36012 11 7.94008 11 7.1 11H4.9C4.05992 11 3.63988 11 3.31901 10.8365C3.03677 10.6927 2.8073 10.4632 2.66349 10.181C2.5 9.86012 2.5 9.44008 2.5 8.6V3" stroke="#667085" stroke-linecap="round" stroke-linejoin="round"/>
3276
3280
  </svg>
3277
- `, Xt = `
3281
+ `, Yt = `
3278
3282
  <svg xmlns="http://www.w3.org/2000/svg" width="29" height="29" viewBox="0 0 29 29" fill="none">
3279
3283
  <!-- Top dot -->
3280
3284
  <circle cx="14.5" cy="3" r="1.5" fill="#02CC59" opacity="1"/>
@@ -3294,7 +3298,7 @@ const qt = `<svg xmlns="http://www.w3.org/2000/svg" width="18" height="19" viewB
3294
3298
  <circle cx="6.7" cy="6.7" r="1.5" fill="#02CC59" opacity="0.3"/>
3295
3299
  </svg>
3296
3300
  `;
3297
- class lt extends x {
3301
+ class lt extends w {
3298
3302
  constructor(t = {}) {
3299
3303
  super(t), this.inputType = "button", this.previewWrapper = null, this.previewEl = null, this.emptyStateEl = null, this.errorContainer = null, this.messageListener = null, this.loadingSpinner = null, this.props.delete === void 0 && (this.props.delete = !0), this.props.maxFileSizeMB === void 0 && (this.props.maxFileSizeMB = 5), !this.value && t.defaultUrl && t.defaultUrl !== "" && (this.value = t.defaultUrl), this.setupMessageListener();
3300
3304
  }
@@ -3391,9 +3395,9 @@ class lt extends x {
3391
3395
  const s = this.value && this.value !== "";
3392
3396
  s || i.classList.add("no-image");
3393
3397
  const n = document.createElement("div");
3394
- if (n.className = "preview-placeholder", n.innerHTML = _t, this.previewWrapper = document.createElement("div"), this.previewWrapper.className = "preview-wrapper", this.loadingSpinner = document.createElement("div"), this.loadingSpinner.className = "loading-spinner", this.loadingSpinner.innerHTML = Xt, this.loadingSpinner.style.display = "none", this.previewWrapper.appendChild(this.loadingSpinner), this.previewEl = document.createElement("img"), this.previewEl.className = "upload-preview", this.props.delete) {
3398
+ if (n.className = "preview-placeholder", n.innerHTML = Xt, this.previewWrapper = document.createElement("div"), this.previewWrapper.className = "preview-wrapper", this.loadingSpinner = document.createElement("div"), this.loadingSpinner.className = "loading-spinner", this.loadingSpinner.innerHTML = Yt, this.loadingSpinner.style.display = "none", this.previewWrapper.appendChild(this.loadingSpinner), this.previewEl = document.createElement("img"), this.previewEl.className = "upload-preview", this.props.delete) {
3395
3399
  const a = document.createElement("button");
3396
- a.className = "delete-button", a.type = "button", a.title = "Delete image", a.innerHTML = Zt, this.previewWrapper.appendChild(a), a.onclick = (l) => {
3400
+ a.className = "delete-button", a.type = "button", a.title = "Delete image", a.innerHTML = Kt, this.previewWrapper.appendChild(a), a.onclick = (l) => {
3397
3401
  var r;
3398
3402
  l.stopPropagation(), this.value = "", this.updatePreviewState(null), (r = this.onChange) == null || r.call(this, ""), this.hideError();
3399
3403
  };
@@ -3414,51 +3418,77 @@ class lt extends x {
3414
3418
  }, t;
3415
3419
  }
3416
3420
  }
3417
- const Kt = `
3421
+ const gt = `
3418
3422
  <svg xmlns="http://www.w3.org/2000/svg" width="15" height="16" viewBox="0 0 15 16" fill="none">
3419
3423
  <path d="M5 10.5L7.5 8M7.5 8L10 10.5M7.5 8V13.625M12.5 10.9643C13.2634 10.3338 13.75 9.37996 13.75 8.3125C13.75 6.41402 12.211 4.875 10.3125 4.875C10.1759 4.875 10.0482 4.80375 9.97882 4.68609C9.16379 3.30302 7.65902 2.375 5.9375 2.375C3.34867 2.375 1.25 4.47367 1.25 7.0625C1.25 8.35381 1.77215 9.52317 2.61684 10.371" stroke="#475467" stroke-linecap="round" stroke-linejoin="round"/>
3420
3424
  </svg>
3421
- `, Yt = `
3422
- <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16" fill="none">
3423
- <path d="M12 4L4 12M4 4L12 12" stroke="#667085" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
3424
- </svg>
3425
3425
  `, Qt = `
3426
- <svg xmlns="http://www.w3.org/2000/svg" width="12" height="12" viewBox="0 0 12 12" fill="none">
3427
- <path d="M8 3V2.6C8 2.03995 8 1.75992 7.89101 1.54601C7.79513 1.35785 7.64215 1.20487 7.45399 1.10899C7.24008 1 6.96005 1 6.4 1H5.6C5.03995 1 4.75992 1 4.54601 1.10899C4.35785 1.20487 4.20487 1.35785 4.10899 1.54601C4 1.75992 4 2.03995 4 2.6V3M5 5.75V8.25M7 5.75V8.25M1.5 3H10.5M9.5 3V8.6C9.5 9.44008 9.5 9.86012 9.33651 10.181C9.1927 10.4632 8.96323 10.6927 8.68099 10.8365C8.36012 11 7.94008 11 7.1 11H4.9C4.05992 11 3.63988 11 3.31901 10.8365C3.03677 10.6927 2.8073 10.4632 2.66349 10.181C2.5 9.86012 2.5 9.44008 2.5 8.6V3" stroke="#667085" stroke-linecap="round" stroke-linejoin="round"/>
3426
+ <svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 18 18" fill="none">
3427
+ <path d="M1.5 7.5C1.5 7.5 3.00374 5.45116 4.22538 4.22868C5.44702 3.0062 7.1352 2.25 9 2.25C12.7279 2.25 15.75 5.27208 15.75 9C15.75 12.7279 12.7279 15.75 9 15.75C5.92268 15.75 3.32633 13.6907 2.51382 10.875M1.5 7.5V3M1.5 7.5H6" stroke="#637381" stroke-linecap="round" stroke-linejoin="round"/>
3428
3428
  </svg>
3429
3429
  `, te = `
3430
- <svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewBox="0 0 14 14" fill="none">
3431
- <path d="M4.66667 3.5H9.91667C11.5275 3.5 12.8333 4.80584 12.8333 6.41667C12.8333 8.0275 11.5275 9.33333 9.91667 9.33333H3.5M3.5 9.33333L5.83333 7M3.5 9.33333L5.83333 11.6667" stroke="#667085" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
3430
+ <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none">
3431
+ <path fill-rule="evenodd" clip-rule="evenodd" d="M11.9943 13.4085L17.6486 19.0631C17.8371 19.2452 18.0896 19.346 18.3516 19.3437C18.6137 19.3414 18.8644 19.2363 19.0497 19.051C19.235 18.8656 19.3402 18.6149 19.3424 18.3528C19.3447 18.0908 19.244 17.8383 19.0619 17.6497L13.4076 11.9951L19.0619 6.34039C19.244 6.15187 19.3447 5.89937 19.3424 5.63728C19.3402 5.37519 19.235 5.12448 19.0497 4.93915C18.8644 4.75382 18.6137 4.64869 18.3516 4.64642C18.0896 4.64414 17.8371 4.74489 17.6486 4.92697L11.9943 10.5816L6.34004 4.92697C6.15068 4.74939 5.89967 4.65245 5.64011 4.65667C5.38055 4.66088 5.13282 4.76592 4.94932 4.94956C4.76583 5.1332 4.66097 5.38102 4.65694 5.6406C4.65291 5.90018 4.75002 6.15114 4.92772 6.34039L10.581 11.9951L4.92672 17.6497C4.83126 17.7419 4.75511 17.8522 4.70273 17.9742C4.65035 18.0961 4.62277 18.2273 4.62162 18.36C4.62047 18.4928 4.64576 18.6244 4.69601 18.7472C4.74627 18.8701 4.82049 18.9817 4.91433 19.0755C5.00818 19.1694 5.11978 19.2436 5.24262 19.2939C5.36545 19.3441 5.49707 19.3694 5.62978 19.3683C5.7625 19.3671 5.89366 19.3395 6.0156 19.2872C6.13755 19.2348 6.24784 19.1586 6.34004 19.0631L11.9943 13.4085Z" fill="#637381"/>
3432
3432
  </svg>
3433
3433
  `, ee = `
3434
- <svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewBox="0 0 14 14" fill="none">
3435
- <path d="M9.33333 3.5H4.08333C2.47249 3.5 1.16667 4.80584 1.16667 6.41667C1.16667 8.0275 2.47249 9.33333 4.08333 9.33333H10.5M10.5 9.33333L8.16667 7M10.5 9.33333L8.16667 11.6667" stroke="#667085" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
3434
+ <svg width="28" height="28" viewBox="0 0 28 28" fill="none" xmlns="http://www.w3.org/2000/svg">
3435
+ <path d="M14 0.5C21.4558 0.5 27.5 6.54416 27.5 14C27.5 21.4558 21.4558 27.5 14 27.5C6.54416 27.5 0.5 21.4558 0.5 14C0.5 6.54416 6.54416 0.5 14 0.5Z" fill="#EFF1F2"/>
3436
+ <path d="M14 0.5C21.4558 0.5 27.5 6.54416 27.5 14C27.5 21.4558 21.4558 27.5 14 27.5C6.54416 27.5 0.5 21.4558 0.5 14C0.5 6.54416 6.54416 0.5 14 0.5Z" stroke="#FF5630"/>
3437
+ <path d="M7.25 9.7895C7.25 9.4265 7.50875 9.13175 7.82825 9.13175L9.827 9.13175C10.2237 9.11975 10.574 8.8325 10.709 8.408L10.7315 8.333L10.8177 8.03975C10.8702 7.85975 10.916 7.70225 10.9805 7.562C11.234 7.00775 11.7035 6.623 12.2458 6.52475C12.3837 6.5 12.5292 6.5 12.6957 6.5L15.3043 6.5C15.4715 6.5 15.617 6.5 15.7542 6.52475C16.2965 6.623 16.7667 7.00775 17.0195 7.562C17.084 7.70225 17.1297 7.859 17.183 8.03975L17.2685 8.333L17.291 8.408C17.426 8.8325 17.846 9.1205 18.2435 9.13175L20.171 9.13175C20.4912 9.13175 20.75 9.4265 20.75 9.7895C20.75 10.1525 20.4912 10.4473 20.1717 10.4473L7.8275 10.4473C7.50875 10.4473 7.25 10.1525 7.25 9.7895Z" fill="#FF5630"/>
3438
+ <path fill-rule="evenodd" clip-rule="evenodd" d="M13.697 21.5L14.303 21.5C16.3902 21.5 17.4335 21.5 18.113 20.8355C18.791 20.171 18.86 19.0813 18.9987 16.9018L19.199 13.7608C19.274 12.578 19.3115 11.9863 18.9717 11.612C18.6312 11.237 18.0567 11.237 16.907 11.237L11.093 11.237C9.94325 11.237 9.368 11.237 9.02825 11.612C8.68775 11.987 8.72525 12.578 8.801 13.7608L9.00125 16.9018C9.14 19.0813 9.209 20.1718 9.88775 20.8355C10.5665 21.5 11.6097 21.5 13.697 21.5ZM12.6845 14.1418C12.6545 13.8163 12.3785 13.5793 12.0695 13.6115C11.7597 13.6438 11.5347 13.934 11.5655 14.2595L11.9405 18.2068C11.9705 18.5323 12.2465 18.7693 12.5555 18.737C12.8652 18.7048 13.0902 18.4145 13.0595 18.089L12.6845 14.1418ZM15.9312 13.6115C16.2402 13.6438 16.466 13.934 16.4345 14.2595L16.0595 18.2068C16.0295 18.5323 15.7527 18.7693 15.4445 18.737C15.1347 18.7048 14.9097 18.4145 14.9405 18.089L15.3155 14.1418C15.3455 13.8163 15.623 13.5793 15.9312 13.6115Z" fill="#FF5630"/>
3436
3439
  </svg>
3437
3440
  `, ie = `
3438
- <svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewBox="0 0 14 14" fill="none">
3439
- <path d="M7 1.5C3.96243 1.5 1.5 3.96243 1.5 7C1.5 10.0376 3.96243 12.5 7 12.5C10.0376 12.5 12.5 10.0376 12.5 7C12.5 3.96243 10.0376 1.5 7 1.5Z" stroke="#12B76A" stroke-width="1.2"/>
3440
- <path d="M4.75 7L6.25 8.5L9.25 5.5" stroke="#12B76A" stroke-width="1.2" stroke-linecap="round" stroke-linejoin="round"/>
3441
+ <svg xmlns="http://www.w3.org/2000/svg" width="11" height="12" viewBox="0 0 11 12" fill="none">
3442
+ <path d="M-4.47342e-07 2.5585C-3.97978e-07 2.27617 0.20125 2.04692 0.44975 2.04692L2.00433 2.04692C2.31292 2.03758 2.58533 1.81417 2.69033 1.484L2.70783 1.42567L2.77492 1.19758C2.81575 1.05758 2.85133 0.935084 2.9015 0.826C3.09867 0.394917 3.46383 0.0956673 3.88558 0.0192507C3.99292 6.93798e-07 4.10608 7.1793e-07 4.23558 7.40573e-07L6.26442 1.09531e-06C6.3945 1.11805e-06 6.50767 1.13349e-06 6.61442 0.0192512C7.03617 0.0956679 7.40192 0.394918 7.5985 0.826001C7.64867 0.935085 7.68425 1.057 7.72567 1.19758L7.79217 1.42567L7.80967 1.484C7.91467 1.81417 8.24133 2.03817 8.5505 2.04692L10.0497 2.04692C10.2987 2.04692 10.5 2.27617 10.5 2.5585C10.5 2.84084 10.2987 3.07009 10.0502 3.07009L0.449166 3.07008C0.201249 3.07008 -4.96707e-07 2.84083 -4.47342e-07 2.5585Z" fill="#F04438"/>
3443
+ <path fill-rule="evenodd" clip-rule="evenodd" d="M5.01433 11.6667L5.48566 11.6667C7.10908 11.6667 7.9205 11.6667 8.449 11.1498C8.97633 10.633 9.03 9.78542 9.13792 8.09025L9.29366 5.64725C9.352 4.72734 9.38117 4.26709 9.11692 3.976C8.85208 3.68434 8.40525 3.68434 7.511 3.68433L2.989 3.68433C2.09475 3.68433 1.64733 3.68433 1.38308 3.976C1.11825 4.26767 1.14742 4.72733 1.20633 5.64725L1.36208 8.09025C1.47 9.78542 1.52366 10.6336 2.05158 11.1498C2.5795 11.6667 3.39091 11.6667 5.01433 11.6667ZM4.22683 5.94358C4.2035 5.69042 3.98883 5.50608 3.7485 5.53117C3.50758 5.55625 3.33258 5.782 3.3565 6.03517L3.64816 9.10525C3.6715 9.35842 3.88617 9.54275 4.1265 9.51767C4.36742 9.49258 4.54242 9.26683 4.5185 9.01367L4.22683 5.94358ZM6.75208 5.53117C6.99242 5.55625 7.168 5.782 7.1435 6.03517L6.85183 9.10525C6.8285 9.35842 6.61325 9.54275 6.3735 9.51767C6.13258 9.49259 5.95758 9.26683 5.9815 9.01367L6.27317 5.94358C6.2965 5.69042 6.51233 5.50609 6.75208 5.53117Z" fill="#F04438"/>
3441
3444
  </svg>
3442
3445
  `, se = `
3443
- <svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewBox="0 0 14 14" fill="none">
3444
- <path d="M7 1.5C3.96243 1.5 1.5 3.96243 1.5 7C1.5 10.0376 3.96243 12.5 7 12.5C10.0376 12.5 12.5 10.0376 12.5 7C12.5 3.96243 10.0376 1.5 7 1.5Z" stroke="#F04438" stroke-width="1.2"/>
3445
- <path d="M8.25 5.75L5.75 8.25M5.75 5.75L8.25 8.25" stroke="#F04438" stroke-width="1.2" stroke-linecap="round"/>
3446
+ <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none">
3447
+ <path fill-rule="evenodd" clip-rule="evenodd" d="M10.279 5.55268C10.1384 5.41223 9.94777 5.33334 9.74902 5.33334C9.55027 5.33334 9.35965 5.41223 9.21902 5.55268L4.21902 10.5527C4.07857 10.6933 3.99968 10.8839 3.99968 11.0827C3.99968 11.2814 4.07857 11.4721 4.21902 11.6127L9.21902 16.6127C9.28769 16.6864 9.37049 16.7455 9.46249 16.7865C9.55448 16.8275 9.6538 16.8495 9.7545 16.8513C9.8552 16.8531 9.95523 16.8345 10.0486 16.7968C10.142 16.7591 10.2268 16.7029 10.2981 16.6317C10.3693 16.5605 10.4254 16.4757 10.4631 16.3823C10.5009 16.2889 10.5194 16.1889 10.5176 16.0882C10.5158 15.9875 10.4938 15.8881 10.4528 15.7961C10.4118 15.7041 10.3527 15.6213 10.279 15.5527L6.55902 11.8327H14.749C15.462 11.8327 16.549 12.0527 17.436 12.6917C18.284 13.3017 18.999 14.3267 18.999 16.0827C18.999 16.2816 19.078 16.4724 19.2187 16.613C19.3593 16.7537 19.5501 16.8327 19.749 16.8327C19.9479 16.8327 20.1387 16.7537 20.2794 16.613C20.42 16.4724 20.499 16.2816 20.499 16.0827C20.499 13.8387 19.547 12.3627 18.312 11.4737C17.116 10.6127 15.702 10.3327 14.749 10.3327H6.55902L10.279 6.61268C10.4195 6.47206 10.4984 6.28143 10.4984 6.08268C10.4984 5.88393 10.4195 5.69331 10.279 5.55268Z" fill="#454F5B"/>
3448
+ </svg>
3449
+ `, ne = `
3450
+ <svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
3451
+ <path fill-rule="evenodd" clip-rule="evenodd" d="M14.2198 5.55268C14.3604 5.41223 14.551 5.33334 14.7498 5.33334C14.9485 5.33334 15.1391 5.41223 15.2798 5.55268L20.2798 10.5527C20.4202 10.6933 20.4991 10.8839 20.4991 11.0827C20.4991 11.2814 20.4202 11.4721 20.2798 11.6127L15.2798 16.6127C15.2111 16.6864 15.1283 16.7455 15.0363 16.7865C14.9443 16.8275 14.845 16.8495 14.7443 16.8513C14.6436 16.8531 14.5435 16.8345 14.4502 16.7968C14.3568 16.7591 14.2719 16.7029 14.2007 16.6317C14.1295 16.5605 14.0734 16.4757 14.0356 16.3823C13.9979 16.2889 13.9794 16.1889 13.9812 16.0882C13.9829 15.9875 14.005 15.8881 14.046 15.7961C14.087 15.7041 14.1461 15.6213 14.2198 15.5527L17.9398 11.8327H9.74976C9.03676 11.8327 7.94976 12.0527 7.06276 12.6917C6.21476 13.3017 5.49976 14.3267 5.49976 16.0827C5.49976 16.2816 5.42074 16.4724 5.28009 16.613C5.13943 16.7537 4.94867 16.8327 4.74976 16.8327C4.55084 16.8327 4.36008 16.7537 4.21943 16.613C4.07877 16.4724 3.99976 16.2816 3.99976 16.0827C3.99976 13.8387 4.95176 12.3627 6.18676 11.4737C7.38276 10.6127 8.79676 10.3327 9.74976 10.3327H17.9398L14.2198 6.61268C14.0793 6.47206 14.0004 6.28143 14.0004 6.08268C14.0004 5.88393 14.0793 5.69331 14.2198 5.55268Z" fill="#454F5B"/>
3452
+ </svg>
3453
+
3454
+ `, oe = `
3455
+ <svg xmlns="http://www.w3.org/2000/svg" width="15" height="15" viewBox="0 0 15 15" fill="none">
3456
+ <path fill-rule="evenodd" clip-rule="evenodd" d="M15 7.5C15 11.6423 11.6423 15 7.5 15C3.35775 15 0 11.6423 0 7.5C0 3.35775 3.35775 0 7.5 0C11.6423 0 15 3.35775 15 7.5ZM10.5225 5.2275C10.6278 5.33297 10.687 5.47594 10.687 5.625C10.687 5.77406 10.6278 5.91703 10.5225 6.0225L6.7725 9.7725C6.66703 9.87784 6.52406 9.93701 6.375 9.93701C6.22594 9.93701 6.08297 9.87784 5.9775 9.7725L4.4775 8.2725C4.42224 8.221 4.37791 8.1589 4.34716 8.0899C4.31642 8.0209 4.29989 7.94642 4.29856 7.87089C4.29722 7.79536 4.31112 7.72034 4.33941 7.6503C4.3677 7.58026 4.40981 7.51664 4.46322 7.46322C4.51664 7.40981 4.58026 7.3677 4.6503 7.33941C4.72034 7.31112 4.79536 7.29722 4.87089 7.29856C4.94642 7.29989 5.0209 7.31642 5.0899 7.34716C5.1589 7.37791 5.221 7.42224 5.2725 7.4775L6.375 8.58L8.05125 6.90375L9.7275 5.2275C9.83297 5.12216 9.97594 5.063 10.125 5.063C10.2741 5.063 10.417 5.12216 10.5225 5.2275Z" fill="#06CD5C"/>
3457
+ </svg>
3458
+ `, mt = `
3459
+ <svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 18 18" fill="none">
3460
+ <path d="M8.99998 13.5L5.57436 8.6625C5.01365 8.00048 4.65256 7.19277 4.53315 6.33346C4.41373 5.47415 4.54091 4.5986 4.89987 3.80877C5.25883 3.01895 5.83479 2.34736 6.56068 1.87222C7.28657 1.39708 8.13251 1.13795 8.99998 1.125C10.2025 1.13688 11.3512 1.62483 12.1947 2.48198C13.0381 3.33913 13.5075 4.49561 13.5 5.69812C13.5004 6.74715 13.1433 7.765 12.4875 8.58375L8.99998 13.5ZM8.99998 2.25C8.0954 2.26039 7.23191 2.62934 6.59913 3.27583C5.96634 3.92233 5.61598 4.79353 5.62498 5.69812C5.62924 6.52369 5.92623 7.32097 6.46311 7.94812L8.99998 11.5425L11.6044 7.875C12.0994 7.25706 12.371 6.4899 12.375 5.69812C12.384 4.79353 12.0336 3.92233 11.4008 3.27583C10.7681 2.62934 9.90457 2.26039 8.99998 2.25Z" fill="#637381"/>
3461
+ <path d="M9 6.1875C9.62132 6.1875 10.125 5.68382 10.125 5.0625C10.125 4.44118 9.62132 3.9375 9 3.9375C8.37868 3.9375 7.875 4.44118 7.875 5.0625C7.875 5.68382 8.37868 6.1875 9 6.1875Z" fill="#637381"/>
3462
+ <path d="M15.75 6.75H14.625V7.875H15.75V15.75H2.25V7.875H3.375V6.75H2.25C1.95163 6.75 1.66548 6.86853 1.4545 7.07951C1.24353 7.29048 1.125 7.57663 1.125 7.875V15.75C1.125 16.0484 1.24353 16.3345 1.4545 16.5455C1.66548 16.7565 1.95163 16.875 2.25 16.875H15.75C16.0484 16.875 16.3345 16.7565 16.5455 16.5455C16.7565 16.3345 16.875 16.0484 16.875 15.75V7.875C16.875 7.57663 16.7565 7.29048 16.5455 7.07951C16.3345 6.86853 16.0484 6.75 15.75 6.75Z" fill="#637381"/>
3463
+ </svg>
3464
+ `, ae = `
3465
+ <svg width="27" height="34" viewBox="0 0 27 34" fill="none" xmlns="http://www.w3.org/2000/svg">
3466
+ <path d="M13.2217 0.25C20.3738 0.25 26.1942 6.06962 26.1943 13.2217V13.2227C26.2179 18.4466 22.9671 23.3445 19.666 26.9609C18.0203 28.7638 16.3726 30.2373 15.1357 31.2598C14.5176 31.7708 14.0026 32.1695 13.6426 32.4395C13.4628 32.5743 13.3215 32.6771 13.2256 32.7461L13.2227 32.7471C12.5085 32.2389 9.52009 30.06 6.58984 26.8271C3.35339 23.2564 0.226466 18.445 0.25 13.2148V13.2139C0.25 6.07018 6.06958 0.25024 13.2217 0.25Z" fill="#F04438" stroke="#A82A21" stroke-width="0.5"/>
3446
3467
  </svg>
3447
- `, B = class B extends x {
3468
+ `, le = `
3469
+ <svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 18 18" fill="none">
3470
+ <path d="M14.4132 4.80441C14.7371 4.80441 15 5.06731 15 5.39119C15 5.71507 14.7371 5.97797 14.4132 5.97797H13.7595L13.3736 11.7568C13.3426 12.2221 13.3179 12.6056 13.2722 12.9163C13.2256 13.234 13.1515 13.523 12.9982 13.7921C12.7591 14.2119 12.3978 14.5496 11.963 14.7604C11.6845 14.8953 11.3913 14.9499 11.0714 14.9753C10.7584 15.0002 10.3738 15 9.90749 15H8.09251C7.62617 15 7.24164 15.0002 6.92863 14.9753C6.6087 14.9499 6.31554 14.8953 6.037 14.7604C5.60221 14.5496 5.24093 14.2119 5.00176 13.7921C4.84855 13.523 4.77439 13.234 4.72775 12.9163C4.68215 12.6056 4.65745 12.2221 4.62643 11.7568L4.24053 5.97797H3.58678C3.26291 5.97797 3 5.71507 3 5.39119C3 5.06731 3.26291 4.80441 3.58678 4.80441H14.4132ZM5.79648 11.6793C5.82874 12.1632 5.8517 12.4923 5.88899 12.7463C5.9252 12.9927 5.96948 13.1207 6.02115 13.2115C6.14297 13.4253 6.32656 13.5975 6.54802 13.7048C6.64205 13.7504 6.7733 13.7864 7.02203 13.8062C7.27784 13.8265 7.6077 13.8264 8.09251 13.8264H9.90749C10.3923 13.8264 10.7222 13.8265 10.978 13.8062C11.2267 13.7864 11.358 13.7504 11.452 13.7048C11.6734 13.5975 11.857 13.4253 11.9789 13.2115C12.0305 13.1207 12.0748 12.9927 12.111 12.7463C12.1483 12.4923 12.1713 12.1632 12.2035 11.6793L12.5841 5.97797H5.41586L5.79648 11.6793ZM7.21057 11.1048V8.0978C7.21057 7.77392 7.47348 7.51101 7.79736 7.51101C8.1211 7.51117 8.38326 7.77402 8.38326 8.0978V11.1048C8.38326 11.4286 8.1211 11.6915 7.79736 11.6916C7.47348 11.6916 7.21057 11.4287 7.21057 11.1048ZM9.61674 11.1048V8.0978C9.61674 7.77402 9.8789 7.51117 10.2026 7.51101C10.5265 7.51101 10.7894 7.77392 10.7894 8.0978V11.1048C10.7894 11.4287 10.5265 11.6916 10.2026 11.6916C9.8789 11.6915 9.61674 11.4286 9.61674 11.1048ZM10.8044 3C11.1283 3 11.3912 3.26291 11.3912 3.58678C11.3912 3.91066 11.1283 4.17357 10.8044 4.17357H7.19559C6.87172 4.17357 6.60881 3.91066 6.60881 3.58678C6.60881 3.26291 6.87172 3 7.19559 3H10.8044Z" fill="#46525C"/>
3471
+ </svg>
3472
+ `, re = `
3473
+ <svg xmlns="http://www.w3.org/2000/svg" width="8" height="4" viewBox="0 0 8 4" fill="none">
3474
+ <path fill-rule="evenodd" clip-rule="evenodd" d="M0 0L2.58579 2.58579C3.36684 3.36684 4.63317 3.36683 5.41421 2.58579L8 0L0 0Z" fill="#1C252E"/>
3475
+ </svg>
3476
+ `, $ = class $ extends w {
3448
3477
  constructor(t = {}) {
3478
+ var e;
3449
3479
  super(t), this.inputType = {
3450
3480
  imageUrl: "text",
3451
3481
  markers: "text"
3452
- }, this.mainButton = null, this.thumbnailEl = null, this.markerCountEl = null, this.popoverEl = null, this.backdropEl = null, this.imageElement = null, this.cursorTooltip = null, this.popoverPosition = null, this.isPopoverOpen = !1, this.confirmOverlayEl = null, this.confirmPromise = null, this.lastImageNaturalSize = null, this.draggingMarkerId = null, this.history = [], this.historyIndex = -1, this.isUndoRedoOperation = !1, this.initialValue = null, this.messageListener = null, this.props.maxMarkers = this.props.maxMarkers ?? 10, this.props.maxFileSizeMB = this.props.maxFileSizeMB ?? 5, this.props.markerSize = this.props.markerSize ?? 24, this.value || (this.value = { imageUrl: "", markers: [] }), this.setupMessageListener(), this.onBackgroundClick = (e) => {
3453
- if (this.isPopoverOpen && this.popoverEl && !this.popoverEl.contains(e.target)) {
3454
- if (e.target.closest(
3482
+ }, this.mainButton = null, this.thumbnailEl = null, this.markerCountEl = null, this.mapIconEl = null, this.popoverEl = null, this.backdropEl = null, this.imageElement = null, this.cursorTooltip = null, this.popoverPosition = null, this.isPopoverOpen = !1, this.confirmOverlayEl = null, this.confirmPromise = null, this.lastImageNaturalSize = null, this.draggingMarkerId = null, this.history = [], this.historyIndex = -1, this.isUndoRedoOperation = !1, this.initialValue = null, this.messageListener = null, this.props.maxMarkers = this.props.maxMarkers ?? ((e = this.props.prizeMap) == null ? void 0 : e.length) ?? 10, this.props.maxFileSizeMB = this.props.maxFileSizeMB ?? 5e3, this.props.markerSize = this.props.markerSize ?? 24, this.value || (this.value = { imageUrl: "", markers: [] }), this.setupMessageListener(), this.onBackgroundClick = (i) => {
3483
+ if (this.isPopoverOpen && this.popoverEl && !this.popoverEl.contains(i.target)) {
3484
+ if (i.target.closest(
3455
3485
  '[class*="modal"], [class*="Modal"], [class*="dialog"], [class*="Dialog"], [class*="overlay"], [class*="Overlay"]'
3456
3486
  ))
3457
3487
  return;
3458
3488
  this.closePopover();
3459
3489
  }
3460
- }, this.handlePopoverKeydown = (e) => {
3461
- this.isPopoverOpen && (e.key === "Escape" ? this.closePopover() : (e.ctrlKey || e.metaKey) && (e.key === "z" || e.key === "Z" ? e.shiftKey ? (e.preventDefault(), this.redo()) : (e.preventDefault(), this.undo()) : (e.key === "y" || e.key === "Y") && (e.preventDefault(), this.redo())));
3490
+ }, this.handlePopoverKeydown = (i) => {
3491
+ this.isPopoverOpen && (i.key === "Escape" ? this.closePopover() : (i.ctrlKey || i.metaKey) && (i.key === "z" || i.key === "Z" ? i.shiftKey ? (i.preventDefault(), this.redo()) : (i.preventDefault(), this.undo()) : (i.key === "y" || i.key === "Y") && (i.preventDefault(), this.redo())));
3462
3492
  }, this.boundHandleMarkerDrag = this.handleMarkerDrag.bind(this), this.boundStopDragging = this.stopDragging.bind(this);
3463
3493
  }
3464
3494
  setupMessageListener() {
@@ -3484,7 +3514,7 @@ const Kt = `
3484
3514
  JSON.parse(
3485
3515
  JSON.stringify(o)
3486
3516
  )
3487
- ], this.historyIndex = 0, this.updateUndoRedoButtons(), this.updateButtonDisplay(), this.refreshPopoverContent(), this.triggerChange();
3517
+ ], this.historyIndex = 0, this.updateUndoRedoButtons(), this.updateMainDisplay(), this.isPopoverOpen && this.refreshPopoverContent(), this.triggerChange();
3488
3518
  }, s.onerror = () => {
3489
3519
  this.showError("Failed to load image from file manager.");
3490
3520
  }, s.src = e;
@@ -3498,47 +3528,76 @@ const Kt = `
3498
3528
  draw() {
3499
3529
  const t = document.createElement("div");
3500
3530
  if (t.className = "image-map-setting-wrapper", this.props.title || this.props.icon) {
3501
- const e = document.createElement("div");
3502
- if (e.className = "icon-container", this.props.icon) {
3503
- const i = this.createIcon(this.props.icon);
3504
- e.appendChild(i);
3531
+ const h = document.createElement("div");
3532
+ if (h.className = "icon-container", this.props.icon) {
3533
+ const g = this.createIcon(this.props.icon);
3534
+ h.appendChild(g);
3505
3535
  }
3506
3536
  if (this.props.title) {
3507
- const i = this.createLabel(this.props.title);
3508
- e.appendChild(i);
3537
+ const g = this.createLabel(this.props.title);
3538
+ h.appendChild(g);
3509
3539
  }
3510
- t.appendChild(e);
3540
+ t.appendChild(h);
3511
3541
  }
3512
- return this.mainButton = document.createElement("button"), this.mainButton.type = "button", this.mainButton.className = "image-map-button", this.thumbnailEl = document.createElement("img"), this.thumbnailEl.className = "image-map-thumbnail", this.mainButton.appendChild(this.thumbnailEl), this.markerCountEl = document.createElement("span"), this.markerCountEl.className = "image-map-marker-count", this.mainButton.appendChild(this.markerCountEl), this.mainButton.addEventListener("click", () => this.openPopover()), t.appendChild(this.mainButton), this.createPopover(), this.updateButtonDisplay(), t;
3513
- }
3514
- updateButtonDisplay() {
3515
- if (!this.mainButton || !this.thumbnailEl || !this.markerCountEl) return;
3516
- if (this.value && this.value.imageUrl && this.value.imageUrl !== "") {
3517
- this.mainButton.classList.add("has-image"), this.thumbnailEl.src = this.value.imageUrl;
3518
- const e = this.value.markers.length;
3519
- this.markerCountEl.textContent = `${e} marker${e !== 1 ? "s" : ""}`;
3520
- } else
3521
- this.mainButton.classList.remove("has-image"), this.thumbnailEl.src = "", this.markerCountEl.textContent = "Add Image Map";
3542
+ const e = document.createElement("div");
3543
+ e.className = "image-map-sections-container";
3544
+ const i = document.createElement("div");
3545
+ i.className = "image-map-section";
3546
+ const s = document.createElement("h4");
3547
+ s.className = "image-map-section-title", s.textContent = "Upload/Replace Map Image", i.appendChild(s);
3548
+ const n = document.createElement("div");
3549
+ n.className = "image-map-upload-box";
3550
+ const o = document.createElement("div");
3551
+ o.className = "image-map-thumbnail-wrapper", this.thumbnailEl = document.createElement("img"), this.thumbnailEl.className = "image-map-thumbnail-main", o.appendChild(this.thumbnailEl);
3552
+ const a = document.createElement("button");
3553
+ a.type = "button", a.className = "image-map-delete-btn", a.innerHTML = ie, a.addEventListener("click", (h) => {
3554
+ h.stopPropagation(), this.value = { imageUrl: "", markers: [] }, this.updateMainDisplay(), this.triggerChange();
3555
+ }), o.appendChild(a), n.appendChild(o);
3556
+ const l = document.createElement("label");
3557
+ l.className = "image-map-upload-label", l.innerHTML = `
3558
+ <div class="upload-icon upload-icon-default">${gt}</div>
3559
+ <div class="upload-icon upload-icon-replace">${Qt}</div>
3560
+ <span class="upload-text">Upload Image</span>
3561
+ `;
3562
+ const r = document.createElement("input");
3563
+ r.type = "file", r.accept = "image/jpeg,image/jpg,image/png,image/gif,image/webp", r.style.display = "none", r.addEventListener("change", (h) => {
3564
+ var f;
3565
+ const g = (f = h.target.files) == null ? void 0 : f[0];
3566
+ g && this.handleImageUpload(g);
3567
+ }), l.appendChild(r), n.appendChild(l), i.appendChild(n), e.appendChild(i);
3568
+ const c = document.createElement("div");
3569
+ c.className = "image-map-section";
3570
+ const d = document.createElement("h4");
3571
+ return d.className = "image-map-section-title", d.textContent = "Map Setup", c.appendChild(d), this.mainButton = document.createElement("button"), this.mainButton.type = "button", this.mainButton.className = "image-map-button", this.mapIconEl = document.createElement("span"), this.mapIconEl.className = "image-map-icon", this.mapIconEl.innerHTML = mt, this.mainButton.appendChild(this.mapIconEl), this.markerCountEl = document.createElement("span"), this.markerCountEl.className = "image-map-marker-count", this.mainButton.appendChild(this.markerCountEl), this.mainButton.addEventListener("click", () => {
3572
+ var h;
3573
+ (h = this.mainButton) != null && h.disabled || this.openPopover();
3574
+ }), c.appendChild(this.mainButton), e.appendChild(c), t.appendChild(e), this.createPopover(), this.updateMainDisplay(), t;
3575
+ }
3576
+ updateMainDisplay() {
3577
+ var s;
3578
+ if (!this.thumbnailEl || !this.markerCountEl) return;
3579
+ const t = this.value && this.value.imageUrl && this.value.imageUrl !== "", e = this.thumbnailEl.parentElement, i = e == null ? void 0 : e.parentElement;
3580
+ i && (t ? (i.classList.add("has-image"), this.thumbnailEl.src = this.value.imageUrl) : (i.classList.remove("has-image"), this.thumbnailEl.src = "")), (s = this.value) != null && s.markers.length, this.markerCountEl.textContent = "Configure Map", this.mainButton && (this.mainButton.disabled = !t);
3522
3581
  }
3523
3582
  createPopover() {
3524
3583
  this.backdropEl = document.createElement("div"), this.backdropEl.className = "image-map-backdrop", this.backdropEl.style.display = "none", this.popoverEl = document.createElement("div"), this.popoverEl.className = "image-map-popover", this.popoverEl.style.display = "none";
3525
3584
  const t = document.createElement("div");
3526
3585
  t.className = "image-map-header", t.style.cursor = "move";
3527
3586
  const e = document.createElement("h3");
3528
- e.className = "image-map-title", e.textContent = "Configure Image Map", t.appendChild(e);
3587
+ e.className = "image-map-title", e.textContent = "Prize Map", t.appendChild(e);
3529
3588
  const i = document.createElement("button");
3530
- i.type = "button", i.className = "image-map-close-btn", i.innerHTML = Yt, i.addEventListener("click", () => void this.closePopover()), t.appendChild(i), ot(t, this.popoverEl, (n, o) => {
3589
+ i.type = "button", i.className = "image-map-close-btn", i.innerHTML = te, i.addEventListener("click", () => void this.closePopover()), t.appendChild(i), ot(t, this.popoverEl, (n, o) => {
3531
3590
  this.popoverPosition = { left: n, top: o };
3532
3591
  }), this.popoverEl.appendChild(t);
3533
3592
  const s = document.createElement("div");
3534
3593
  s.className = "image-map-content", this.popoverEl.appendChild(s), document.body.appendChild(this.backdropEl), document.body.appendChild(this.popoverEl);
3535
3594
  }
3536
3595
  openPopover() {
3537
- B.openInstance && B.openInstance !== this && B.openInstance.closePopover(), this.isPopoverOpen = !0, B.openInstance = this, this.value ? this.initialValue = JSON.parse(
3596
+ $.openInstance && $.openInstance !== this && $.openInstance.closePopover(), this.isPopoverOpen = !0, $.openInstance = this, this.value ? this.initialValue = JSON.parse(
3538
3597
  JSON.stringify(this.value)
3539
3598
  ) : this.initialValue = { imageUrl: "", markers: [] }, this.value && (this.history = [
3540
3599
  JSON.parse(JSON.stringify(this.value.markers))
3541
- ], this.historyIndex = 0), this.backdropEl && (this.backdropEl.style.display = "block"), this.popoverEl && (this.popoverEl.style.display = "flex"), this.positionPopover(), this.refreshPopoverContent(), setTimeout(() => {
3600
+ ], this.historyIndex = 0), this.backdropEl && (this.backdropEl.style.display = "block"), this.popoverEl && (this.popoverEl.style.display = "flex"), this.positionPopover(), this.refreshPopoverContentAndScrollToBottom(), setTimeout(() => {
3542
3601
  document.addEventListener("click", this.onBackgroundClick, !0);
3543
3602
  }, 200), document.addEventListener("keydown", this.handlePopoverKeydown, !0);
3544
3603
  }
@@ -3560,9 +3619,9 @@ const Kt = `
3560
3619
  return;
3561
3620
  this.initialValue && (this.value = JSON.parse(
3562
3621
  JSON.stringify(this.initialValue)
3563
- ), this.updateButtonDisplay(), this.triggerChange());
3622
+ ), this.updateMainDisplay(), this.triggerChange());
3564
3623
  }
3565
- this.isPopoverOpen = !1, this.draggingMarkerId = null, this.backdropEl && (this.backdropEl.style.display = "none"), this.popoverEl && (this.popoverEl.style.display = "none"), document.removeEventListener("click", this.onBackgroundClick, !0), document.removeEventListener("keydown", this.handlePopoverKeydown, !0), B.openInstance === this && (B.openInstance = null);
3624
+ this.isPopoverOpen = !1, this.draggingMarkerId = null, this.backdropEl && (this.backdropEl.style.display = "none"), this.popoverEl && (this.popoverEl.style.display = "none"), document.removeEventListener("click", this.onBackgroundClick, !0), document.removeEventListener("keydown", this.handlePopoverKeydown, !0), $.openInstance === this && ($.openInstance = null);
3566
3625
  }
3567
3626
  }
3568
3627
  positionPopover() {
@@ -3580,32 +3639,74 @@ const Kt = `
3580
3639
  if (!t) return;
3581
3640
  const e = t.querySelector(
3582
3641
  ".image-map-container"
3583
- ), i = (e == null ? void 0 : e.scrollTop) || 0;
3642
+ ), i = t.querySelector(
3643
+ ".simple-prize-list"
3644
+ ), s = (e == null ? void 0 : e.scrollTop) || 0, n = (i == null ? void 0 : i.scrollTop) || 0;
3584
3645
  if (t.innerHTML = "", this.value && this.value.imageUrl && this.value.imageUrl !== "") {
3585
- const n = document.createElement("div");
3586
- n.className = "image-map-main-layout";
3587
- const o = document.createElement("div");
3588
- o.className = "image-map-image-section", this.renderImageMapSection(o);
3589
- const a = document.createElement("div");
3590
- a.className = "image-map-sidebar", this.renderSidebar(a), n.appendChild(o), n.appendChild(a), t.appendChild(n), requestAnimationFrame(() => {
3591
- const l = o.querySelector(
3592
- ".image-map-container"
3593
- );
3594
- l && (l.scrollTop = i);
3595
- });
3646
+ const a = this.renderControlsRow();
3647
+ t.appendChild(a);
3648
+ const l = document.createElement("div");
3649
+ l.className = "image-map-main-layout";
3650
+ const r = document.createElement("div");
3651
+ r.className = "image-map-image-section", this.renderImageMapSection(r);
3652
+ const c = document.createElement("div");
3653
+ c.className = "prize-list-section", this.renderPrizeList(c), l.appendChild(r), l.appendChild(c), t.appendChild(l);
3654
+ const d = this.renderBottomButtons();
3655
+ t.appendChild(d);
3656
+ const h = r.querySelector(
3657
+ ".image-map-container"
3658
+ ), g = c.querySelector(
3659
+ ".simple-prize-list"
3660
+ );
3661
+ h && (h.scrollTop = s), g && (g.scrollTop = n);
3596
3662
  } else
3597
3663
  this.renderUploadSection(t);
3598
3664
  }
3665
+ refreshPopoverContentAndScrollToBottom() {
3666
+ this.refreshPopoverContent(), requestAnimationFrame(() => {
3667
+ this.scrollPrizeListToBottom();
3668
+ });
3669
+ }
3670
+ scrollPrizeListToBottom() {
3671
+ if (!this.popoverEl) return;
3672
+ const t = this.popoverEl.querySelector(
3673
+ ".simple-prize-list"
3674
+ );
3675
+ t && requestAnimationFrame(() => {
3676
+ t.scrollTop = t.scrollHeight;
3677
+ });
3678
+ }
3599
3679
  renderUploadSection(t) {
3600
3680
  const e = document.createElement("div");
3601
- e.className = "upload-section";
3602
- const i = document.createElement("button");
3603
- i.type = "button", i.className = "upload-label", i.innerHTML = `
3681
+ e.className = "upload-section-wrapper";
3682
+ const i = document.createElement("h4");
3683
+ i.className = "upload-section-title", i.textContent = "Upload/Replace Map Image", e.appendChild(i);
3684
+ const s = document.createElement("div");
3685
+ s.className = "upload-section";
3686
+ const n = document.createElement("label");
3687
+ n.className = "upload-label", n.innerHTML = `
3604
3688
  <div class="upload-placeholder">
3605
- ${Kt}
3689
+ ${gt}
3606
3690
  <span>Click to upload image</span>
3607
3691
  </div>
3608
- `, i.addEventListener("click", () => {
3692
+ `;
3693
+ const o = document.createElement("input");
3694
+ o.type = "file", o.accept = "image/jpeg,image/jpg,image/png,image/gif,image/webp", o.style.display = "none", o.addEventListener("change", (c) => {
3695
+ var h;
3696
+ const d = (h = c.target.files) == null ? void 0 : h[0];
3697
+ d && this.handleImageUpload(d);
3698
+ }), n.appendChild(o), s.appendChild(n), e.appendChild(s);
3699
+ const a = document.createElement("h4");
3700
+ a.className = "upload-section-title", a.textContent = "Map Setup", e.appendChild(a);
3701
+ const l = document.createElement("div");
3702
+ l.className = "upload-section";
3703
+ const r = document.createElement("button");
3704
+ r.type = "button", r.className = "upload-label map-config-btn", r.innerHTML = `
3705
+ <div class="upload-placeholder">
3706
+ ${mt}
3707
+ <span>Configure Map</span>
3708
+ </div>
3709
+ `, r.addEventListener("click", () => {
3609
3710
  window.postMessage(
3610
3711
  {
3611
3712
  type: "OPEN_FILE_MANAGER_MODAL",
@@ -3613,39 +3714,34 @@ const Kt = `
3613
3714
  },
3614
3715
  "*"
3615
3716
  );
3616
- }), e.appendChild(i), t.appendChild(e);
3717
+ }), l.appendChild(r), e.appendChild(l), t.appendChild(e);
3617
3718
  }
3618
- renderImageMapSection(t) {
3719
+ renderControlsRow() {
3720
+ var c;
3721
+ const t = document.createElement("div");
3722
+ t.className = "controls-row";
3619
3723
  const e = document.createElement("div");
3620
- e.className = "image-map-actions";
3724
+ e.className = "place-prize-text", e.textContent = "Place Prize", t.appendChild(e);
3621
3725
  const i = document.createElement("div");
3622
3726
  i.className = "undo-redo-group";
3623
3727
  const s = document.createElement("button");
3624
- s.type = "button", s.className = "undo-btn action-btn", s.innerHTML = te, s.title = "Undo (Ctrl+Z)", s.disabled = !this.canUndo(), s.addEventListener("click", () => this.undo()), i.appendChild(s);
3728
+ s.type = "button", s.className = "undo-btn action-btn", s.innerHTML = se, s.title = "Undo (Ctrl+Z)", s.disabled = !this.canUndo(), s.addEventListener("click", () => this.undo()), i.appendChild(s);
3625
3729
  const n = document.createElement("button");
3626
- n.type = "button", n.className = "redo-btn action-btn", n.innerHTML = ee, n.title = "Redo (Ctrl+Y)", n.disabled = !this.canRedo(), n.addEventListener("click", () => this.redo()), i.appendChild(n), e.appendChild(i);
3627
- const o = document.createElement("button");
3628
- o.type = "button", o.className = "replace-btn", o.textContent = "Replace Image", o.addEventListener("click", () => {
3629
- window.postMessage(
3630
- {
3631
- type: "OPEN_FILE_MANAGER_MODAL",
3632
- settingId: this.id
3633
- },
3634
- "*"
3635
- );
3636
- }), e.appendChild(o);
3637
- const a = document.createElement("button");
3638
- a.type = "button", a.className = "clear-all-btn", a.textContent = "Clear All Markers", a.addEventListener("click", () => this.handleClearAllMarkers()), e.appendChild(a), t.appendChild(e);
3639
- const l = document.createElement("div");
3640
- l.className = "image-map-container";
3641
- const r = document.createElement("div");
3642
- r.className = "image-map-wrapper", r.addEventListener("mousemove", this.boundHandleMarkerDrag), r.addEventListener("mouseup", this.boundStopDragging), r.addEventListener("mouseleave", this.boundStopDragging), this.imageElement = document.createElement("img"), this.imageElement.className = "image-map-image", this.imageElement.src = this.value.imageUrl, this.imageElement.addEventListener(
3730
+ n.type = "button", n.className = "redo-btn action-btn", n.innerHTML = ne, n.title = "Redo (Ctrl+Y)", n.disabled = !this.canRedo(), n.addEventListener("click", () => this.redo()), i.appendChild(n), t.appendChild(i);
3731
+ const o = this.props.maxMarkers || 10, a = ((c = this.value) == null ? void 0 : c.markers.length) || 0, l = a === o, r = document.createElement("div");
3732
+ return r.className = "prize-counter-inline", r.textContent = `${a}/${o}`, l && r.classList.add("complete"), t.appendChild(r), t;
3733
+ }
3734
+ renderImageMapSection(t) {
3735
+ const e = document.createElement("div");
3736
+ e.className = "image-map-container";
3737
+ const i = document.createElement("div");
3738
+ i.className = "image-map-wrapper", i.addEventListener("mousemove", this.boundHandleMarkerDrag), i.addEventListener("mouseup", this.boundStopDragging), i.addEventListener("mouseleave", this.boundStopDragging), this.imageElement = document.createElement("img"), this.imageElement.className = "image-map-image", this.imageElement.src = this.value.imageUrl, this.imageElement.addEventListener(
3643
3739
  "load",
3644
3740
  () => this.recordImageNaturalSize()
3645
3741
  ), this.imageElement.addEventListener(
3646
3742
  "click",
3647
- (c) => this.handleImageClick(c)
3648
- ), r.appendChild(this.imageElement), this.cursorTooltip = document.createElement("div"), this.cursorTooltip.className = "marker-cursor-tooltip", r.appendChild(this.cursorTooltip), this.imageElement.addEventListener(
3743
+ (s) => this.handleImageClick(s)
3744
+ ), i.appendChild(this.imageElement), this.cursorTooltip = document.createElement("div"), this.cursorTooltip.className = "marker-cursor-tooltip", i.appendChild(this.cursorTooltip), this.imageElement.addEventListener(
3649
3745
  "mouseenter",
3650
3746
  () => this.showCursorTooltip()
3651
3747
  ), this.imageElement.addEventListener(
@@ -3653,56 +3749,65 @@ const Kt = `
3653
3749
  () => this.hideCursorTooltip()
3654
3750
  ), this.imageElement.addEventListener(
3655
3751
  "mousemove",
3656
- (c) => this.updateCursorTooltip(c)
3657
- ), this.value && this.value.markers && this.value.markers.forEach((c) => {
3658
- const p = this.createMarkerElement(c);
3659
- r.appendChild(p);
3660
- }), l.appendChild(r), t.appendChild(l);
3661
- }
3662
- renderSidebar(t) {
3663
- var c, p;
3664
- const e = document.createElement("div");
3665
- e.className = "prize-counter";
3666
- const i = this.props.maxMarkers || 10, s = ((c = this.value) == null ? void 0 : c.markers.length) || 0, n = s === i;
3667
- e.textContent = `Prizes ${s}/${i}`, n && e.classList.add("complete"), t.appendChild(e);
3752
+ (s) => this.updateCursorTooltip(s)
3753
+ ), this.value && this.value.markers && this.value.markers.forEach((s) => {
3754
+ const n = this.createMarkerElement(s);
3755
+ i.appendChild(n);
3756
+ }), e.appendChild(i), t.appendChild(e);
3757
+ }
3758
+ renderBottomButtons() {
3759
+ var l;
3760
+ const t = this.props.maxMarkers || 10, i = (((l = this.value) == null ? void 0 : l.markers.length) || 0) === t, s = document.createElement("div");
3761
+ s.className = "bottom-buttons";
3762
+ const n = document.createElement("button");
3763
+ n.type = "button", n.className = "clear-all-btn", n.innerHTML = le + "<span>Remove All</span>", n.addEventListener("click", () => this.handleClearAllMarkers()), s.appendChild(n);
3668
3764
  const o = document.createElement("div");
3669
- o.className = "prize-list";
3670
- const a = ((p = this.value) == null ? void 0 : p.markers) || [], l = /* @__PURE__ */ new Map();
3671
- a.forEach((d) => l.set(d.index, d));
3672
- for (let d = 1; d <= i; d++) {
3673
- const g = l.get(d), C = !!g, m = (g == null ? void 0 : g.prizeName) || this.props.prizeMap && this.props.prizeMap[d - 1] || `Prize #${d}`, u = document.createElement("div");
3674
- u.className = `prize-item ${C ? "placed" : "missing"}`;
3675
- const v = document.createElement("div");
3676
- v.className = "prize-index", v.textContent = String(d);
3677
- const f = document.createElement("div");
3678
- f.className = "prize-label";
3679
- const y = document.createElement("div");
3680
- y.className = "prize-title", y.textContent = `Prize #${d}`;
3681
- const b = document.createElement("div");
3682
- b.className = "prize-subtitle", b.textContent = C ? m : "Not Placed", f.appendChild(y), f.appendChild(b);
3683
- const L = document.createElement("div");
3684
- L.className = `prize-status ${C ? "placed" : "missing"}`, L.innerHTML = C ? ie : se, u.appendChild(v), u.appendChild(f), u.appendChild(L), o.appendChild(u);
3765
+ o.className = "done-btn-wrapper";
3766
+ const a = document.createElement("button");
3767
+ if (a.type = "button", a.className = "done-btn", a.textContent = "Done", i || (a.disabled = !0, o.classList.add("has-tooltip")), a.addEventListener("click", () => {
3768
+ i && (this.triggerChange(), this.closePopover(!0));
3769
+ }), o.appendChild(a), !i) {
3770
+ const r = document.createElement("div");
3771
+ r.className = "done-btn-tooltip";
3772
+ const c = document.createElement("div");
3773
+ c.className = "done-btn-tooltip-content", c.textContent = "Map all prizes";
3774
+ const d = document.createElement("div");
3775
+ d.className = "done-btn-tooltip-tail", d.innerHTML = re, r.appendChild(c), r.appendChild(d), o.appendChild(r);
3685
3776
  }
3686
- t.appendChild(o);
3687
- const r = document.createElement("button");
3688
- r.type = "button", r.className = "sidebar-save-btn", r.textContent = "Save", n ? r.title = "Save and close" : (r.disabled = !0, r.title = `Add ${i - s} more prize(s) to save`), r.addEventListener("click", () => {
3689
- n && (this.triggerChange(), this.closePopover(!0));
3690
- }), t.appendChild(r);
3777
+ return s.appendChild(o), s;
3778
+ }
3779
+ renderPrizeList(t) {
3780
+ var o;
3781
+ const e = this.props.maxMarkers || 10, i = ((o = this.value) == null ? void 0 : o.markers) || [], s = /* @__PURE__ */ new Map();
3782
+ i.forEach((a) => s.set(a.index, a));
3783
+ const n = document.createElement("div");
3784
+ n.className = "simple-prize-list";
3785
+ for (let a = e; a >= 1; a--) {
3786
+ const l = s.get(a), r = !!l, c = (l == null ? void 0 : l.prizeName) || this.props.prizeMap && this.props.prizeMap[a - 1] || "Prize Name", d = document.createElement("div");
3787
+ d.className = `simple-prize-item ${r ? "placed" : ""}`;
3788
+ const h = document.createElement("div");
3789
+ h.className = "simple-prize-number", h.textContent = `#${a}`, d.appendChild(h);
3790
+ const g = document.createElement("div");
3791
+ if (g.className = "simple-prize-text", g.textContent = `${c}`, d.appendChild(g), r) {
3792
+ const f = document.createElement("div");
3793
+ f.className = "simple-prize-check", f.innerHTML = oe, d.appendChild(f);
3794
+ }
3795
+ n.appendChild(d);
3796
+ }
3797
+ t.appendChild(n);
3691
3798
  }
3692
3799
  createMarkerElement(t) {
3693
3800
  const e = document.createElement("div");
3694
3801
  e.className = "marker-container", e.style.left = `${t.x}%`, e.style.top = `${t.y}%`, e.setAttribute("data-marker-id", String(t.id));
3695
3802
  const i = document.createElement("div");
3696
- i.className = "image-map-marker";
3803
+ i.className = "image-map-marker", i.innerHTML = ae;
3697
3804
  const s = document.createElement("span");
3698
- s.className = "marker-number", s.textContent = String(t.index), i.appendChild(s);
3805
+ s.className = "marker-number", s.textContent = String(t.index), i.appendChild(s), e.appendChild(i);
3699
3806
  const n = document.createElement("button");
3700
- n.type = "button", n.className = "marker-delete-btn", n.innerHTML = Qt, n.addEventListener("click", (a) => {
3701
- a.stopPropagation(), this.handleDeleteMarker(t.id);
3702
- }), i.appendChild(n), e.appendChild(i);
3703
- const o = document.createElement("div");
3704
- return o.className = "marker-label", t.prizeName ? o.textContent = t.prizeName : o.textContent = `Prize ${t.index}`, e.appendChild(o), e.addEventListener("mousedown", (a) => {
3705
- a.stopPropagation(), a.preventDefault(), this.draggingMarkerId = t.id, e.classList.add("dragging");
3807
+ return n.type = "button", n.className = "marker-delete-btn", n.innerHTML = ee, n.addEventListener("click", (o) => {
3808
+ o.stopPropagation(), this.handleDeleteMarker(t.id);
3809
+ }), e.appendChild(n), e.addEventListener("mousedown", (o) => {
3810
+ o.stopPropagation(), o.preventDefault(), this.draggingMarkerId = t.id, e.classList.add("dragging");
3706
3811
  }), e;
3707
3812
  }
3708
3813
  handleImageUpload(t) {
@@ -3734,21 +3839,21 @@ const Kt = `
3734
3839
  if (typeof a == "string") {
3735
3840
  const r = new Image();
3736
3841
  r.onload = () => {
3737
- var d;
3842
+ var h;
3738
3843
  const c = {
3739
3844
  width: r.naturalWidth || 0,
3740
3845
  height: r.naturalHeight || 0
3741
- }, p = this.scaleMarkersForNewImage(
3742
- ((d = this.value) == null ? void 0 : d.markers) || [],
3846
+ }, d = this.scaleMarkersForNewImage(
3847
+ ((h = this.value) == null ? void 0 : h.markers) || [],
3743
3848
  e,
3744
3849
  c
3745
3850
  );
3746
3851
  this.value = {
3747
3852
  imageUrl: a,
3748
- markers: p
3853
+ markers: d
3749
3854
  }, this.lastImageNaturalSize = c, this.history = [
3750
- JSON.parse(JSON.stringify(p))
3751
- ], this.historyIndex = 0, this.updateUndoRedoButtons(), this.updateButtonDisplay(), this.refreshPopoverContent(), this.triggerChange();
3855
+ JSON.parse(JSON.stringify(d))
3856
+ ], this.historyIndex = 0, this.updateUndoRedoButtons(), this.updateMainDisplay(), this.isPopoverOpen && this.refreshPopoverContent(), this.triggerChange();
3752
3857
  }, r.onerror = () => {
3753
3858
  this.showError("Failed to read image file.");
3754
3859
  }, r.src = a;
@@ -3765,7 +3870,7 @@ const Kt = `
3765
3870
  );
3766
3871
  return;
3767
3872
  }
3768
- const e = this.imageElement.getBoundingClientRect(), i = (t.clientX - e.left) / e.width * 100, s = (t.clientY - e.top) / e.height * 100, n = this.value.markers.map((c) => c.index).sort((c, p) => c - p);
3873
+ const e = this.imageElement.getBoundingClientRect(), i = (t.clientX - e.left) / e.width * 100, s = (t.clientY - e.top) / e.height * 100, n = this.value.markers.map((c) => c.index).sort((c, d) => c - d);
3769
3874
  let o = 1;
3770
3875
  for (const c of n)
3771
3876
  if (c === o)
@@ -3781,7 +3886,7 @@ const Kt = `
3781
3886
  y: Math.min(100, Math.max(0, s)),
3782
3887
  prizeName: a
3783
3888
  }, r = [...this.value.markers, l];
3784
- this.setMarkers(r), this.saveState(), this.refreshPopoverContent(), this.updateButtonDisplay(), this.triggerChange();
3889
+ this.setMarkers(r), this.saveState(), this.refreshPopoverContent(), this.updateMainDisplay(), this.triggerChange();
3785
3890
  }
3786
3891
  handleMarkerDrag(t) {
3787
3892
  var r;
@@ -3806,10 +3911,10 @@ const Kt = `
3806
3911
  handleDeleteMarker(t) {
3807
3912
  if (!this.value || this.value.markers.findIndex((s) => s.id === t) === -1) return;
3808
3913
  const i = this.value.markers.filter((s) => s.id !== t);
3809
- this.setMarkers(i), this.saveState(), this.refreshPopoverContent(), this.updateButtonDisplay(), this.triggerChange();
3914
+ this.setMarkers(i), this.saveState(), this.refreshPopoverContent(), this.updateMainDisplay(), this.triggerChange();
3810
3915
  }
3811
3916
  handleClearAllMarkers() {
3812
- this.value && (this.setMarkers([]), this.saveState(), this.refreshPopoverContent(), this.updateButtonDisplay(), this.triggerChange());
3917
+ this.value && (this.setMarkers([]), this.saveState(), this.refreshPopoverContent(), this.updateMainDisplay(), this.triggerChange());
3813
3918
  }
3814
3919
  getNextPrizeInfo() {
3815
3920
  if (!this.value) return { index: 1, name: "Prize 1" };
@@ -3831,7 +3936,7 @@ const Kt = `
3831
3936
  if (!this.cursorTooltip || !this.value || this.value.markers.length >= (this.props.maxMarkers || 10))
3832
3937
  return;
3833
3938
  const t = this.getNextPrizeInfo();
3834
- this.cursorTooltip.textContent = `Add: ${t.name}`, this.cursorTooltip.classList.add("visible");
3939
+ this.cursorTooltip.textContent = String(t.index), this.cursorTooltip.classList.add("visible");
3835
3940
  }
3836
3941
  hideCursorTooltip() {
3837
3942
  this.cursorTooltip && this.cursorTooltip.classList.remove("visible");
@@ -3865,7 +3970,7 @@ const Kt = `
3865
3970
  const t = JSON.parse(
3866
3971
  JSON.stringify(this.history[this.historyIndex])
3867
3972
  );
3868
- this.setMarkers(t), this.refreshPopoverContent(), this.updateButtonDisplay(), this.triggerChange(), this.isUndoRedoOperation = !1, this.updateUndoRedoButtons();
3973
+ this.setMarkers(t), this.refreshPopoverContent(), this.updateMainDisplay(), this.triggerChange(), this.isUndoRedoOperation = !1, this.updateUndoRedoButtons();
3869
3974
  }
3870
3975
  redo() {
3871
3976
  if (!this.canRedo() || !this.value) return;
@@ -3873,7 +3978,7 @@ const Kt = `
3873
3978
  const t = JSON.parse(
3874
3979
  JSON.stringify(this.history[this.historyIndex])
3875
3980
  );
3876
- this.setMarkers(t), this.refreshPopoverContent(), this.updateButtonDisplay(), this.triggerChange(), this.isUndoRedoOperation = !1, this.updateUndoRedoButtons();
3981
+ this.setMarkers(t), this.refreshPopoverContent(), this.updateMainDisplay(), this.triggerChange(), this.isUndoRedoOperation = !1, this.updateUndoRedoButtons();
3877
3982
  }
3878
3983
  updateUndoRedoButtons() {
3879
3984
  if (!this.popoverEl) return;
@@ -3973,11 +4078,11 @@ const Kt = `
3973
4078
  r.type = "button", r.className = "confirm-btn ghost", r.textContent = "Cancel";
3974
4079
  const c = document.createElement("button");
3975
4080
  c.type = "button", c.className = "confirm-btn danger", c.textContent = "Discard";
3976
- const p = (d) => {
3977
- s.remove(), this.confirmOverlayEl = null, this.confirmPromise = null, i(d);
4081
+ const d = (h) => {
4082
+ s.remove(), this.confirmOverlayEl = null, this.confirmPromise = null, i(h);
3978
4083
  };
3979
- r.addEventListener("click", () => p(!1)), c.addEventListener("click", () => p(!0)), s.addEventListener("click", (d) => {
3980
- d.target === s && p(!1);
4084
+ r.addEventListener("click", () => d(!1)), c.addEventListener("click", () => d(!0)), s.addEventListener("click", (h) => {
4085
+ h.target === s && d(!1);
3981
4086
  }), l.appendChild(r), l.appendChild(c), n.appendChild(o), n.appendChild(a), n.appendChild(l), s.appendChild(n), document.body.appendChild(s), setTimeout(() => {
3982
4087
  n.classList.add("visible");
3983
4088
  }, 10);
@@ -3991,16 +4096,16 @@ const Kt = `
3991
4096
  this.closePopover(), (t = this.backdropEl) != null && t.parentElement && this.backdropEl.parentElement.removeChild(this.backdropEl), (e = this.popoverEl) != null && e.parentElement && this.popoverEl.parentElement.removeChild(this.popoverEl), document.removeEventListener("click", this.onBackgroundClick, !0), document.removeEventListener("keydown", this.handlePopoverKeydown, !0), this.cleanupMessageListener();
3992
4097
  }
3993
4098
  };
3994
- B.openInstance = null;
3995
- let gt = B;
3996
- class ne extends H {
4099
+ $.openInstance = null;
4100
+ let vt = $;
4101
+ class ce extends B {
3997
4102
  constructor(t = {}) {
3998
4103
  super({
3999
4104
  ...t,
4000
4105
  title: t.title || "Height",
4001
4106
  suffix: t.suffix || "px",
4002
4107
  minValue: t.minValue ?? 0,
4003
- icon: t.icon || oe,
4108
+ icon: t.icon || he,
4004
4109
  default: t.default ?? 100
4005
4110
  }), this.inputType = "number", this.mobileValue = t.mobile;
4006
4111
  }
@@ -4011,17 +4116,17 @@ class ne extends H {
4011
4116
  this.mobileValue = t, t !== void 0 && this.setValue(t);
4012
4117
  }
4013
4118
  }
4014
- const oe = `<svg xmlns="http://www.w3.org/2000/svg" width="18" height="19" viewBox="0 0 18 19" fill="none">
4119
+ const he = `<svg xmlns="http://www.w3.org/2000/svg" width="18" height="19" viewBox="0 0 18 19" fill="none">
4015
4120
  <path d="M9 14L9 5M9 14L6.75 12.5M9 14L11.25 12.5M9 5L6.75 6.5M9 5L11.25 6.5M15.75 2.75H2.25M15.75 16.25H2.25" stroke="#667085" stroke-linecap="round" stroke-linejoin="round"/>
4016
4121
  </svg>`;
4017
- class ae extends H {
4122
+ class de extends B {
4018
4123
  constructor(t = {}) {
4019
4124
  super({
4020
4125
  ...t,
4021
4126
  title: t.title || "Width",
4022
4127
  suffix: t.suffix || "px",
4023
4128
  minValue: t.minValue ?? 0,
4024
- icon: t.icon || le,
4129
+ icon: t.icon || pe,
4025
4130
  default: t.default ?? 100
4026
4131
  }), this.inputType = "number", this.mobileValue = t.mobile;
4027
4132
  }
@@ -4032,14 +4137,14 @@ class ae extends H {
4032
4137
  this.mobileValue = t, t !== void 0 && this.setValue(t);
4033
4138
  }
4034
4139
  }
4035
- const le = `<svg xmlns="http://www.w3.org/2000/svg" width="18" height="19" viewBox="0 0 18 19" fill="none">
4140
+ const pe = `<svg xmlns="http://www.w3.org/2000/svg" width="18" height="19" viewBox="0 0 18 19" fill="none">
4036
4141
  <path d="M4.5 9.5H13.5M4.5 9.5L6 7.25M4.5 9.5L6 11.75M13.5 9.5L12 7.25M13.5 9.5L12 11.75M15.75 16.25V2.75M2.25 16.25V2.75" stroke="#667085" stroke-linecap="round" stroke-linejoin="round"/>
4037
- </svg>`, re = `
4142
+ </svg>`, ue = `
4038
4143
  <svg xmlns="http://www.w3.org/2000/svg" class="svg-select-api" width="12" height="12" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-chevron-down">
4039
4144
  <polyline points="6 9 12 15 18 9"></polyline>
4040
4145
  </svg>
4041
4146
  `;
4042
- class Me extends x {
4147
+ class Te extends w {
4043
4148
  constructor(t = {}) {
4044
4149
  if (super(t), this.inputType = "select", this._options = [], this.isOpen = !1, this.selectedOptionIndex = null, this.optionsListEl = null, this.svgContainer = null, this.buttonEl = null, this.isLoading = !1, this.container = null, this.hasInitializedOptions = !1, this.selectedOptionIndex = null, t.default !== void 0 && (this.value = t.default), this.initializeOptions(t), !t.getOptionsAsync && this.value !== void 0) {
4045
4150
  const e = this._options.findIndex(
@@ -4094,7 +4199,7 @@ class Me extends x {
4094
4199
  a.onclick = (l) => this.selectApiOption(l, o, e), i.appendChild(a);
4095
4200
  }), t.appendChild(i);
4096
4201
  const s = document.createElement("div");
4097
- return s.classList.add("svg-container"), s.innerHTML = re, t.appendChild(s), s.onclick = () => {
4202
+ return s.classList.add("svg-container"), s.innerHTML = ue, t.appendChild(s), s.onclick = () => {
4098
4203
  var n, o;
4099
4204
  this.isLoading || (this.isOpen = !this.isOpen, (n = this.optionsListEl) == null || n.classList.toggle("open", this.isOpen), (o = this.svgContainer) == null || o.classList.toggle("open", this.isOpen));
4100
4205
  }, this.optionsListEl = i, this.svgContainer = s, this.props.getOptionsAsync && !this.hasInitializedOptions ? (this.isLoading = !0, this.updateButtonText(), this.props.getOptionsAsync().then((n) => {
@@ -4188,7 +4293,7 @@ class Me extends x {
4188
4293
  ), this.updateButtonText(), this.updateOptionsList(), this.detectChangeCallback && this.detectChangeCallback !== this.props.detectChange && this.detectChangeCallback(t);
4189
4294
  }
4190
4295
  }
4191
- class Ne extends x {
4296
+ class Pe extends w {
4192
4297
  constructor(t) {
4193
4298
  var e, i;
4194
4299
  super(t), this.inputType = "text", this.value = t.default ?? ((i = (e = t.options) == null ? void 0 : e[0]) == null ? void 0 : i.value) ?? "", this.detectChangeCallback = t.detectChange;
@@ -4212,7 +4317,7 @@ class Ne extends x {
4212
4317
  const s = document.createElement("input");
4213
4318
  s.type = "checkbox", s.checked = ((a = (o = this.props.options) == null ? void 0 : o.find((l) => l.value === this.value)) == null ? void 0 : a.status) ?? !1, this.getDataPropsPath() && s.setAttribute("data-test-id", this.getDataPropsPath()), s.addEventListener("change", () => {
4214
4319
  var r, c;
4215
- const l = ((c = (r = this.props.options) == null ? void 0 : r.find((p) => p.status === s.checked)) == null ? void 0 : c.value) ?? "";
4320
+ const l = ((c = (r = this.props.options) == null ? void 0 : r.find((d) => d.status === s.checked)) == null ? void 0 : c.value) ?? "";
4216
4321
  this.value = l, this.onChange && this.onChange(this.value), this.detectChangeCallback && this.detectChangeCallback(this.value);
4217
4322
  });
4218
4323
  const n = document.createElement("span");
@@ -4238,13 +4343,13 @@ class Ne extends x {
4238
4343
  this.detectChangeCallback = t;
4239
4344
  }
4240
4345
  }
4241
- const ce = `<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
4346
+ const ge = `<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
4242
4347
  <path d="M13.3334 5.99996H2.66675M13.3334 9.99996H2.66675M5.33341 12.6666V3.33329M10.6667 12.6666V3.33329" stroke="#667085" stroke-width="1.33333" stroke-linecap="round" stroke-linejoin="round"/>
4243
4348
  </svg>`;
4244
- class Ie extends x {
4349
+ class Oe extends w {
4245
4350
  // Store mobile value
4246
4351
  constructor(t = {}) {
4247
- t.rowGap = t.rowGap ?? !0, t.columnGap = t.columnGap ?? !0, t.title = t.title ?? "Gap", t.icon = t.icon ?? ce, t.suffix = t.suffix ?? "px", t.minValue = t.minValue ?? 0, super(t), this.inputType = "number", this.inputValues = {}, this.mobileValue = t.mobile, this.value = this.validateValue(t.default ?? 0), t.rowGap && (this.inputValues.row = this.value), t.columnGap && (this.inputValues.column = this.value);
4352
+ t.rowGap = t.rowGap ?? !0, t.columnGap = t.columnGap ?? !0, t.title = t.title ?? "Gap", t.icon = t.icon ?? ge, t.suffix = t.suffix ?? "px", t.minValue = t.minValue ?? 0, super(t), this.inputType = "number", this.inputValues = {}, this.mobileValue = t.mobile, this.value = this.validateValue(t.default ?? 0), t.rowGap && (this.inputValues.row = this.value), t.columnGap && (this.inputValues.column = this.value);
4248
4353
  }
4249
4354
  draw() {
4250
4355
  const t = document.createElement("div");
@@ -4295,43 +4400,43 @@ class Ie extends x {
4295
4400
  this.mobileValue = t, t !== void 0 && this.setValue(t);
4296
4401
  }
4297
4402
  }
4298
- const he = `<svg xmlns="http://www.w3.org/2000/svg" width="18" height="19" viewBox="0 0 18 19" fill="none">
4403
+ const me = `<svg xmlns="http://www.w3.org/2000/svg" width="18" height="19" viewBox="0 0 18 19" fill="none">
4299
4404
  <path d="M2.25 11.75H15.75M5.85 2.75H12.15C13.4101 2.75 14.0402 2.75 14.5215 2.99524C14.9448 3.21095 15.289 3.55516 15.5048 3.97852C15.75 4.45982 15.75 5.08988 15.75 6.35V12.65C15.75 13.9101 15.75 14.5402 15.5048 15.0215C15.289 15.4448 14.9448 15.789 14.5215 16.0048C14.0402 16.25 13.4101 16.25 12.15 16.25H5.85C4.58988 16.25 3.95982 16.25 3.47852 16.0048C3.05516 15.789 2.71095 15.4448 2.49524 15.0215C2.25 14.5402 2.25 13.9101 2.25 12.65V6.35C2.25 5.08988 2.25 4.45982 2.49524 3.97852C2.71095 3.55516 3.05516 3.21095 3.47852 2.99524C3.95982 2.75 4.58988 2.75 5.85 2.75Z" stroke="#667085" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
4300
4405
  </svg>`;
4301
- class Se extends H {
4406
+ class He extends B {
4302
4407
  constructor(t = {}) {
4303
4408
  super({
4304
4409
  ...t,
4305
4410
  minValue: t.minValue ?? 0,
4306
4411
  maxValue: t.maxValue ?? 1e3,
4307
- icon: t.icon || he,
4412
+ icon: t.icon || me,
4308
4413
  title: t.title || "Margin Bottom",
4309
4414
  default: t.default ?? 20,
4310
4415
  wrapperClassName: "margin-bottom-wrapper " + (t.wrapperClassName || "")
4311
4416
  }), this.inputType = "number";
4312
4417
  }
4313
4418
  }
4314
- const de = `<svg xmlns="http://www.w3.org/2000/svg" width="18" height="19" viewBox="0 0 18 19" fill="none">
4419
+ const ve = `<svg xmlns="http://www.w3.org/2000/svg" width="18" height="19" viewBox="0 0 18 19" fill="none">
4315
4420
  <path d="M15.75 7.25H2.25m9.9 9h-6.3c-1.26 0-1.89 0-2.371-.245a2.25 2.25 0 0 1-.984-.983c-.245-.482-.245-1.112-.245-2.372v-6.3c0-1.26 0-1.89.245-2.371a2.25 2.25 0 0 1 .984-.984c.48-.245 1.11-.245 2.371-.245h6.3c1.26 0 1.89 0 2.371.245.424.216.768.56.984.984.245.48.245 1.11.245 2.371v6.3c0 1.26 0 1.89-.245 2.371-.216.424-.56.768-.984.984-.48.245-1.11.245-2.371.245"
4316
4421
  stroke="#667085" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
4317
4422
  </svg>`;
4318
- class Ve extends H {
4423
+ class Be extends B {
4319
4424
  constructor(t = {}) {
4320
4425
  super({
4321
4426
  ...t,
4322
4427
  minValue: t.minValue ?? 0,
4323
4428
  maxValue: t.maxValue ?? 1e3,
4324
- icon: t.icon || de,
4429
+ icon: t.icon || ve,
4325
4430
  title: t.title || "Margin Top",
4326
4431
  default: t.default ?? 20,
4327
4432
  wrapperClassName: "margin-top-wrapper " + (t.wrapperClassName || "")
4328
4433
  }), this.inputType = "number";
4329
4434
  }
4330
4435
  }
4331
- class Te extends x {
4436
+ class $e extends w {
4332
4437
  constructor(t) {
4333
4438
  super(t), this.inputType = {}, this.container = null, this.defaultLanguage = "", this.uploadSettings = /* @__PURE__ */ new Map(), this.popup = null, t.default ? this.value = { ...t.default } : this.value || (this.value = {});
4334
- const e = x.HasExplicitCurrentLanguage(), i = e ? x.CurrentLanguage() : "", s = x.DefaultLanguage;
4439
+ const e = w.HasExplicitCurrentLanguage(), i = e ? w.CurrentLanguage() : "", s = w.DefaultLanguage;
4335
4440
  this.defaultLanguage = e && i && t.languages.includes(i) ? i : s && t.languages.includes(s) ? s : t.languages[0];
4336
4441
  const n = t.defaultValue || `Enter text in ${this.capitalizeFirstLetter(this.defaultLanguage)}`;
4337
4442
  t.languages.forEach((o) => {
@@ -4363,13 +4468,13 @@ class Te extends x {
4363
4468
  return;
4364
4469
  }
4365
4470
  const c = "...";
4366
- let p = 0, d = e.length, g = 0;
4367
- for (; p <= d; ) {
4368
- const m = Math.floor((p + d) / 2), u = e.slice(0, m).trimEnd() + c;
4369
- this.measureTextWidth(u, i) <= l ? (g = m, p = m + 1) : d = m - 1;
4471
+ let d = 0, h = e.length, g = 0;
4472
+ for (; d <= h; ) {
4473
+ const m = Math.floor((d + h) / 2), u = e.slice(0, m).trimEnd() + c;
4474
+ this.measureTextWidth(u, i) <= l ? (g = m, d = m + 1) : h = m - 1;
4370
4475
  }
4371
- const C = e.slice(0, g).trimEnd() + c;
4372
- t.placeholder = C;
4476
+ const f = e.slice(0, g).trimEnd() + c;
4477
+ t.placeholder = f;
4373
4478
  }
4374
4479
  autosizeTextarea(t, e = 3) {
4375
4480
  t.style.height = "auto";
@@ -4442,7 +4547,7 @@ class Te extends x {
4442
4547
  );
4443
4548
  if (!e) return;
4444
4549
  e.innerHTML = "";
4445
- const i = x.HasExplicitCurrentLanguage(), s = x.CurrentLanguage();
4550
+ const i = w.HasExplicitCurrentLanguage(), s = w.CurrentLanguage();
4446
4551
  if (!i || !s || !this.props.languages.includes(s))
4447
4552
  this.props.languages.forEach((o) => {
4448
4553
  var r;
@@ -4564,7 +4669,7 @@ class Te extends x {
4564
4669
  a.preventDefault(), this.showPopup();
4565
4670
  }), e.appendChild(i), e.appendChild(s), t.appendChild(e);
4566
4671
  const n = document.createElement("div");
4567
- n.classList.add("simple-multi-language-content"), t.appendChild(n), this.container = t, this.renderContent(t), this.languageChangeUnsubscribe = x.onLanguageChange((a) => {
4672
+ n.classList.add("simple-multi-language-content"), t.appendChild(n), this.container = t, this.renderContent(t), this.languageChangeUnsubscribe = w.onLanguageChange((a) => {
4568
4673
  a && this.props.languages.includes(a) && (this.defaultLanguage = a), this.container && this.renderContent(this.container);
4569
4674
  });
4570
4675
  const o = () => {
@@ -4597,7 +4702,7 @@ class Te extends x {
4597
4702
  });
4598
4703
  }
4599
4704
  }
4600
- class Pe extends x {
4705
+ class Ae extends w {
4601
4706
  constructor(t = {}) {
4602
4707
  super(t), this.inputType = "select";
4603
4708
  const e = [
@@ -4624,24 +4729,24 @@ class Pe extends x {
4624
4729
  this.selectSetting.destroy(), super.destroy();
4625
4730
  }
4626
4731
  }
4627
- const pe = `
4732
+ const fe = `
4628
4733
  <svg xmlns="http://www.w3.org/2000/svg" width="18" height="19" viewBox="0 0 18 19" fill="none">
4629
4734
  <path d="M5.625 9.5H5.6325M12.375 9.5H12.3825M9 9.5H9.0075M9 12.875H9.0075M9 6.125H9.0075M2.25 6.35L2.25 12.65C2.25 13.9101 2.25 14.5402 2.49524 15.0215C2.71095 15.4448 3.05516 15.789 3.47852 16.0048C3.95982 16.25 4.58988 16.25 5.85 16.25H12.15C13.4101 16.25 14.0402 16.25 14.5215 16.0048C14.9448 15.789 15.289 15.4448 15.5048 15.0215C15.75 14.5402 15.75 13.9101 15.75 12.65V6.35C15.75 5.08988 15.75 4.45982 15.5048 3.97852C15.289 3.55516 14.9448 3.21095 14.5215 2.99524C14.0402 2.75 13.4101 2.75 12.15 2.75L5.85 2.75C4.58988 2.75 3.95982 2.75 3.47852 2.99524C3.05516 3.21095 2.71095 3.55516 2.49524 3.97852C2.25 4.45982 2.25 5.08988 2.25 6.35Z" stroke="#667085" stroke-linecap="round" stroke-linejoin="round"/>
4630
4735
  </svg>
4631
- `, ue = `
4736
+ `, Ce = `
4632
4737
  <svg xmlns="http://www.w3.org/2000/svg" width="18" height="19" viewBox="0 0 18 19" fill="none">
4633
4738
  <path d="M6 2.75H5.85C4.58988 2.75 3.95982 2.75 3.47852 2.99524C3.05516 3.21095 2.71095 3.55516 2.49524 3.97852C2.25 4.45982 2.25 5.08988 2.25 6.35V6.5M6 16.25H5.85C4.58988 16.25 3.95982 16.25 3.47852 16.0048C3.05516 15.789 2.71095 15.4448 2.49524 15.0215C2.25 14.5402 2.25 13.9101 2.25 12.65V12.5M15.75 6.5V6.35C15.75 5.08988 15.75 4.45982 15.5048 3.97852C15.289 3.55516 14.9448 3.21095 14.5215 2.99524C14.0402 2.75 13.4101 2.75 12.15 2.75H12M15.75 12.5V12.65C15.75 13.9101 15.75 14.5402 15.5048 15.0215C15.289 15.4448 14.9448 15.789 14.5215 16.0048C14.0402 16.25 13.4101 16.25 12.15 16.25H12" stroke="#667085" stroke-linecap="round" stroke-linejoin="round"/>
4634
4739
  </svg>
4635
4740
  `;
4636
- class Oe extends $ {
4741
+ class De extends H {
4637
4742
  constructor(t) {
4638
4743
  super({
4639
4744
  title: "Border",
4640
4745
  collapsed: t == null ? void 0 : t.collapsed,
4641
4746
  settings: {
4642
- size: new H({
4747
+ size: new B({
4643
4748
  title: "Size",
4644
- icon: ue,
4749
+ icon: Ce,
4645
4750
  default: (t == null ? void 0 : t.size) ?? 0,
4646
4751
  suffix: "px"
4647
4752
  }),
@@ -4649,9 +4754,9 @@ class Oe extends $ {
4649
4754
  title: "Border Color",
4650
4755
  default: (t == null ? void 0 : t.color) || "#000000"
4651
4756
  }),
4652
- radius: new H({
4757
+ radius: new B({
4653
4758
  title: "Radius",
4654
- icon: pe,
4759
+ icon: fe,
4655
4760
  default: (t == null ? void 0 : t.radius) ?? 12,
4656
4761
  suffix: "px"
4657
4762
  })
@@ -4675,20 +4780,20 @@ class Oe extends $ {
4675
4780
  `;
4676
4781
  }
4677
4782
  }
4678
- const ge = `
4783
+ const ye = `
4679
4784
  <svg xmlns="http://www.w3.org/2000/svg" width="14" height="13" viewBox="0 0 14 13" fill="none">
4680
4785
  <path d="M1 2.75C1 2.05109 1 1.70163 1.11418 1.42597C1.26642 1.05843 1.55843 0.766422 1.92597 0.614181C2.20163 0.5 2.55109 0.5 3.25 0.5H10.75C11.4489 0.5 11.7984 0.5 12.074 0.614181C12.4416 0.766422 12.7336 1.05843 12.8858 1.42597C13 1.70163 13 2.05109 13 2.75M4.75 12.5H9.25M7 0.5V12.5" stroke="#667085" stroke-linecap="round" stroke-linejoin="round"/>
4681
4786
  </svg>
4682
- `, me = `
4787
+ `, Ee = `
4683
4788
  <svg xmlns="http://www.w3.org/2000/svg" width="18" height="19" viewBox="0 0 18 19" fill="none">
4684
4789
  <path d="M3 5.75C3 5.05109 3 4.70163 3.11418 4.42597C3.26642 4.05843 3.55843 3.76642 3.92597 3.61418C4.20163 3.5 4.55109 3.5 5.25 3.5H12.75C13.4489 3.5 13.7984 3.5 14.074 3.61418C14.4416 3.76642 14.7336 4.05843 14.8858 4.42597C15 4.70163 15 5.05109 15 5.75M6 15.5H12M7.6875 3.5V15.5M10.3125 3.5V15.5" stroke="#667085" stroke-linecap="round" stroke-linejoin="round"/>
4685
4790
  </svg>
4686
- `, ve = `
4791
+ `, be = `
4687
4792
  <svg xmlns="http://www.w3.org/2000/svg" width="18" height="19" viewBox="0 0 18 19" fill="none">
4688
4793
  <path d="M6 5.75H12M9 5.75V13.25M5.85 16.25H12.15C13.4101 16.25 14.0402 16.25 14.5215 16.0048C14.9448 15.789 15.289 15.4448 15.5048 15.0215C15.75 14.5402 15.75 13.9101 15.75 12.65V6.35C15.75 5.08988 15.75 4.45982 15.5048 3.97852C15.289 3.55516 14.9448 3.21095 14.5215 2.99524C14.0402 2.75 13.4101 2.75 12.15 2.75H5.85C4.58988 2.75 3.95982 2.75 3.47852 2.99524C3.05516 3.21095 2.71095 3.55516 2.49524 3.97852C2.25 4.45982 2.25 5.08988 2.25 6.35V12.65C2.25 13.9101 2.25 14.5402 2.49524 15.0215C2.71095 15.4448 3.05516 15.789 3.47852 16.0048C3.95982 16.25 4.58988 16.25 5.85 16.25Z" stroke="#667085" stroke-linecap="round" stroke-linejoin="round"/>
4689
4794
  </svg>
4690
4795
  `;
4691
- class $e extends $ {
4796
+ class Fe extends H {
4692
4797
  constructor(t = {}) {
4693
4798
  const { showAlign: e = t.showAlign ?? !0, ...i } = t;
4694
4799
  super({
@@ -4702,7 +4807,7 @@ class $e extends $ {
4702
4807
  }),
4703
4808
  fontFamily: new nt({
4704
4809
  title: "Font",
4705
- icon: ge,
4810
+ icon: ye,
4706
4811
  default: i.fontFamilyDefault ?? "Satoshi",
4707
4812
  options: i.fontFamilyOptions ?? [
4708
4813
  { name: "Alt", value: "Croco Sans Black Caps Alt" },
@@ -4715,7 +4820,7 @@ class $e extends $ {
4715
4820
  }),
4716
4821
  fontWeight: new nt({
4717
4822
  title: "Weight",
4718
- icon: me,
4823
+ icon: Ee,
4719
4824
  default: i.fontWeightDefault ?? "400",
4720
4825
  options: i.fontWeightOptions ?? [
4721
4826
  { name: "Regular", value: "400" },
@@ -4725,9 +4830,9 @@ class $e extends $ {
4725
4830
  getOptions: i.fontWeightGetOptions,
4726
4831
  getOptionsAsync: i.fontWeightGetOptionsAsync
4727
4832
  }),
4728
- fontSize: new H({
4833
+ fontSize: new B({
4729
4834
  title: "Size",
4730
- icon: ve,
4835
+ icon: be,
4731
4836
  default: i.fontSizeDefault ?? 12,
4732
4837
  suffix: "px",
4733
4838
  mobile: i.fontSizeMobileDefault
@@ -4735,7 +4840,7 @@ class $e extends $ {
4735
4840
  };
4736
4841
  return e ? {
4737
4842
  ...s,
4738
- align: new jt({
4843
+ align: new Jt({
4739
4844
  title: "Align",
4740
4845
  default: i.alignDefault ?? "center"
4741
4846
  })
@@ -4767,7 +4872,7 @@ class $e extends $ {
4767
4872
  `;
4768
4873
  }
4769
4874
  }
4770
- class _ extends x {
4875
+ class Z extends w {
4771
4876
  constructor(t) {
4772
4877
  super({
4773
4878
  ...t,
@@ -4813,33 +4918,33 @@ class _ extends x {
4813
4918
  }), i;
4814
4919
  }
4815
4920
  }
4816
- class He extends $ {
4921
+ class Ge extends H {
4817
4922
  constructor(t) {
4818
4923
  super({
4819
4924
  title: "Margins",
4820
4925
  collapsed: t == null ? void 0 : t.collapsed,
4821
4926
  settings: {
4822
- marginTop: new _({
4927
+ marginTop: new Z({
4823
4928
  title: "Top",
4824
- icon: fe,
4929
+ icon: we,
4825
4930
  suffix: "px",
4826
4931
  default: (t == null ? void 0 : t.marginTop) ?? "auto"
4827
4932
  }),
4828
- marginRight: new _({
4933
+ marginRight: new Z({
4829
4934
  title: "Right",
4830
- icon: Ce,
4935
+ icon: xe,
4831
4936
  suffix: "px",
4832
4937
  default: (t == null ? void 0 : t.marginRight) ?? 0
4833
4938
  }),
4834
- marginBottom: new _({
4939
+ marginBottom: new Z({
4835
4940
  title: "Bottom",
4836
- icon: ye,
4941
+ icon: Le,
4837
4942
  suffix: "px",
4838
4943
  default: (t == null ? void 0 : t.marginBottom) ?? 0
4839
4944
  }),
4840
- marginLeft: new _({
4945
+ marginLeft: new Z({
4841
4946
  title: "Left",
4842
- icon: Ee,
4947
+ icon: ke,
4843
4948
  suffix: "px",
4844
4949
  default: (t == null ? void 0 : t.marginLeft) ?? 0
4845
4950
  })
@@ -4856,16 +4961,16 @@ class He extends $ {
4856
4961
  `;
4857
4962
  }
4858
4963
  }
4859
- const fe = `<svg xmlns="http://www.w3.org/2000/svg" width="18" height="19" viewBox="0 0 18 19" fill="none">
4964
+ const we = `<svg xmlns="http://www.w3.org/2000/svg" width="18" height="19" viewBox="0 0 18 19" fill="none">
4860
4965
  <path d="M2.25 16.25H2.2575M2.25 9.5H2.2575M2.25 12.875H2.2575M2.25 6.125H2.2575M5.625 16.25H5.6325M5.625 9.5H5.6325M12.375 16.25H12.3825M12.375 9.5H12.3825M9 16.25H9.0075M9 9.5H9.0075M9 12.875H9.0075M9 6.125H9.0075M15.75 16.25H15.7575M15.75 9.5H15.7575M15.75 12.875H15.7575M15.75 6.125H15.7575M15.75 2.75H2.25" stroke="#667085" stroke-linecap="round" stroke-linejoin="round"/>
4861
- </svg>`, Ce = `<svg xmlns="http://www.w3.org/2000/svg" width="18" height="19" viewBox="0 0 18 19" fill="none">
4966
+ </svg>`, xe = `<svg xmlns="http://www.w3.org/2000/svg" width="18" height="19" viewBox="0 0 18 19" fill="none">
4862
4967
  <path d="M5.625 2.75H5.6325M5.625 9.5H5.6325M5.625 16.25H5.6325M12.375 2.75H12.3825M12.375 9.5H12.3825M12.375 16.25H12.3825M9 2.75H9.0075M9 9.5H9.0075M9 16.25H9.0075M9 12.875H9.0075M9 6.125H9.0075M2.25 2.75H2.2575M2.25 9.5H2.2575M2.25 16.25H2.2575M2.25 12.875H2.2575M2.25 6.125H2.2575M15.75 16.25V2.75" stroke="#667085" stroke-linecap="round" stroke-linejoin="round"/>
4863
- </svg>`, ye = `<svg xmlns="http://www.w3.org/2000/svg" width="18" height="19" viewBox="0 0 18 19" fill="none">
4968
+ </svg>`, Le = `<svg xmlns="http://www.w3.org/2000/svg" width="18" height="19" viewBox="0 0 18 19" fill="none">
4864
4969
  <path d="M2.25 2.75H2.2575M2.25 9.5H2.2575M2.25 12.875H2.2575M2.25 6.125H2.2575M5.625 2.75H5.6325M5.625 9.5H5.6325M12.375 2.75H12.3825M12.375 9.5H12.3825M9 2.75H9.0075M9 9.5H9.0075M9 12.875H9.0075M9 6.125H9.0075M15.75 2.75H15.7575M15.75 9.5H15.7575M15.75 12.875H15.7575M15.75 6.125H15.7575M15.75 16.25H2.25" stroke="#667085" stroke-linecap="round" stroke-linejoin="round"/>
4865
- </svg>`, Ee = `<svg xmlns="http://www.w3.org/2000/svg" width="18" height="19" viewBox="0 0 18 19" fill="none">
4970
+ </svg>`, ke = `<svg xmlns="http://www.w3.org/2000/svg" width="18" height="19" viewBox="0 0 18 19" fill="none">
4866
4971
  <path d="M5.625 2.75H5.6325M5.625 9.5H5.6325M5.625 16.25H5.6325M12.375 2.75H12.3825M12.375 9.5H12.3825M12.375 16.25H12.3825M9 2.75H9.0075M9 9.5H9.0075M9 16.25H9.0075M9 12.875H9.0075M9 6.125H9.0075M15.75 2.75H15.7575M15.75 9.5H15.7575M15.75 16.25H15.7575M15.75 12.875H15.7575M15.75 6.125H15.7575M2.25 16.25V2.75" stroke="#667085" stroke-linecap="round" stroke-linejoin="round"/>
4867
4972
  </svg>`;
4868
- class Be extends $ {
4973
+ class Re extends H {
4869
4974
  constructor(t) {
4870
4975
  super({
4871
4976
  title: "Background Image",
@@ -4875,7 +4980,7 @@ class Be extends $ {
4875
4980
  ...t == null ? void 0 : t.uploadProps,
4876
4981
  default: (t == null ? void 0 : t.backgroundImage) ?? ""
4877
4982
  }),
4878
- opacity: new Ut({
4983
+ opacity: new jt({
4879
4984
  default: (t == null ? void 0 : t.opacity) ?? 100
4880
4985
  }),
4881
4986
  backgroundColor: new z({
@@ -4904,7 +5009,7 @@ class Be extends $ {
4904
5009
  `;
4905
5010
  }
4906
5011
  }
4907
- class Ae extends $ {
5012
+ class ze extends H {
4908
5013
  constructor(t) {
4909
5014
  super({
4910
5015
  title: (t == null ? void 0 : t.title) ?? "Image",
@@ -4914,11 +5019,11 @@ class Ae extends $ {
4914
5019
  ...t == null ? void 0 : t.uploadProps,
4915
5020
  default: (t == null ? void 0 : t.image) ?? ""
4916
5021
  }),
4917
- width: new ae({
5022
+ width: new de({
4918
5023
  default: (t == null ? void 0 : t.width) ?? 1e3,
4919
5024
  mobile: t == null ? void 0 : t.widthMobile
4920
5025
  }),
4921
- height: new ne({
5026
+ height: new ce({
4922
5027
  default: (t == null ? void 0 : t.height) ?? 300,
4923
5028
  mobile: t == null ? void 0 : t.heightMobile
4924
5029
  })
@@ -4927,42 +5032,42 @@ class Ae extends $ {
4927
5032
  }
4928
5033
  }
4929
5034
  export {
4930
- jt as AlignSetting,
4931
- Pe as AnimationSetting,
4932
- Be as BackgroundSettingSet,
4933
- Oe as BorderSettingSet,
4934
- Le as ButtonSetting,
5035
+ Jt as AlignSetting,
5036
+ Ae as AnimationSetting,
5037
+ Re as BackgroundSettingSet,
5038
+ De as BorderSettingSet,
5039
+ Se as ButtonSetting,
4935
5040
  O as ColorSetting,
4936
5041
  z as ColorWithOpacitySetting,
4937
- ke as DimensionSetting,
4938
- Ie as GapSetting,
5042
+ Ve as DimensionSetting,
5043
+ Oe as GapSetting,
4939
5044
  j as GradientSetting,
4940
- $e as HeaderTypographySettingSet,
4941
- ne as HeightSetting,
4942
- xe as HtmlSetting,
4943
- gt as ImageMapSetting,
4944
- Ae as ImageSettingSet,
4945
- Se as MarginBottomSetting,
4946
- He as MarginSettingGroup,
4947
- Ve as MarginTopSetting,
4948
- Te as MultiLanguageSetting,
4949
- H as NumberSetting,
4950
- Ut as OpacitySetting,
4951
- Me as SelectApiSettings,
5045
+ Fe as HeaderTypographySettingSet,
5046
+ ce as HeightSetting,
5047
+ Ne as HtmlSetting,
5048
+ vt as ImageMapSetting,
5049
+ ze as ImageSettingSet,
5050
+ He as MarginBottomSetting,
5051
+ Ge as MarginSettingGroup,
5052
+ Be as MarginTopSetting,
5053
+ $e as MultiLanguageSetting,
5054
+ B as NumberSetting,
5055
+ jt as OpacitySetting,
5056
+ Te as SelectApiSettings,
4952
5057
  nt as SelectSetting,
4953
- x as Setting,
4954
- $ as SettingGroup,
4955
- Gt as StringSetting,
4956
- At as TabSettingGroup,
4957
- At as TabsSettingGroup,
4958
- Ne as Toggle,
5058
+ w as Setting,
5059
+ H as SettingGroup,
5060
+ Rt as StringSetting,
5061
+ Ft as TabSettingGroup,
5062
+ Ft as TabsSettingGroup,
5063
+ Pe as Toggle,
4959
5064
  lt as UploadSetting,
4960
- ae as WidthSetting,
4961
- we as asSettingGroupWithSettings,
4962
- Dt as createSettingGroup,
4963
- be as createTabSettingGroup,
4964
- G as isSetting,
5065
+ de as WidthSetting,
5066
+ Ie as asSettingGroupWithSettings,
5067
+ Gt as createSettingGroup,
5068
+ Me as createTabSettingGroup,
5069
+ F as isSetting,
4965
5070
  ct as isSettingChild,
4966
- k as isSettingGroup,
5071
+ L as isSettingGroup,
4967
5072
  J as iterateSettings
4968
5073
  };