@codingfactory/mediables-vue 2.4.16 → 2.4.17

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,10 +1,10 @@
1
- var xe = Object.defineProperty;
2
- var Ce = (s, e, t) => e in s ? xe(s, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : s[e] = t;
3
- var j = (s, e, t) => Ce(s, typeof e != "symbol" ? e + "" : e, t);
1
+ var Ce = Object.defineProperty;
2
+ var we = (s, e, t) => e in s ? Ce(s, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : s[e] = t;
3
+ var W = (s, e, t) => we(s, typeof e != "symbol" ? e + "" : e, t);
4
4
  import * as b from "pixi-filters";
5
- import * as S from "pixi.js";
6
- import { GlProgram as we } from "pixi.js";
7
- class O {
5
+ import * as w from "pixi.js";
6
+ import { GlProgram as Se } from "pixi.js";
7
+ class U {
8
8
  constructor() {
9
9
  this._events = /* @__PURE__ */ new Map();
10
10
  }
@@ -34,7 +34,7 @@ class O {
34
34
  e ? this._events.delete(e) : this._events.clear();
35
35
  }
36
36
  }
37
- class Se extends O {
37
+ class ve extends U {
38
38
  constructor() {
39
39
  super(), this._state = {
40
40
  // Image state
@@ -189,10 +189,10 @@ class Se extends O {
189
189
  this.set("isDarkMode", this._state.theme === "dark");
190
190
  }
191
191
  }
192
- function ve() {
193
- return new Se();
192
+ function ke() {
193
+ return new ve();
194
194
  }
195
- class ke extends O {
195
+ class Pe extends U {
196
196
  constructor() {
197
197
  super(), this.app = null, this.sprite = null, this.originalTexture = null, this.baseTexture = null, this.fitScale = 1, this.zoom = 1, this._container = null, this._mountPromise = null;
198
198
  }
@@ -313,47 +313,47 @@ class ke extends O {
313
313
  * @returns {string|null} Data URL
314
314
  */
315
315
  exportImage(e = "png", t = 0.92, i = 0, r = !0) {
316
- var y;
317
- if (!((y = this.app) != null && y.renderer) || !this.originalTexture || !this.sprite)
316
+ var S;
317
+ if (!((S = this.app) != null && S.renderer) || !this.originalTexture || !this.sprite)
318
318
  return null;
319
319
  const a = window.PIXI, o = Math.round(this.originalTexture.width), n = Math.round(this.originalTexture.height);
320
320
  if (o <= 0 || n <= 0)
321
321
  return null;
322
- let l = o;
322
+ let l = o, c = n;
323
323
  if (i > 0) {
324
- const _ = Math.max(o, n);
325
- let v = i / _;
326
- r && (v = Math.min(1, v)), l = Math.round(o * v);
324
+ const M = Math.max(o, n);
325
+ let F = i / M;
326
+ r && (F = Math.min(1, F)), l = Math.round(o * F), c = Math.round(n * F);
327
327
  }
328
- const c = this.sprite, d = c.x, h = c.y, p = c.width, m = c.height;
329
- if (p <= 0 || m <= 0)
328
+ const d = this.sprite, h = d.x, p = d.y, m = d.scale.x, _ = d.scale.y, g = d.width, y = d.height;
329
+ if (g <= 0 || y <= 0)
330
330
  return null;
331
- const x = l / p;
332
- let g = null;
331
+ const v = l / g, x = c / y;
332
+ let P = null;
333
333
  try {
334
- if (c.x = 0, c.y = 0, g = a.RenderTexture.create({
335
- width: Math.ceil(p),
336
- height: Math.ceil(m),
337
- resolution: x
338
- }), this.app.renderer.render({ container: this.app.stage, target: g }), !this.app.renderer.extract)
334
+ if (d.x = 0, d.y = 0, d.scale.x = m * v, d.scale.y = _ * x, P = a.RenderTexture.create({
335
+ width: Math.ceil(l),
336
+ height: Math.ceil(c),
337
+ resolution: 1
338
+ }), this.app.renderer.render({ container: this.app.stage, target: P }), !this.app.renderer.extract)
339
339
  return null;
340
- const _ = this.app.renderer.extract.canvas(g);
341
- if (!_)
340
+ const M = this.app.renderer.extract.canvas(P);
341
+ if (!M)
342
342
  return null;
343
- let v = null;
344
- if (typeof _.toDataURL == "function")
345
- v = _.toDataURL(`image/${e}`, t);
346
- else if (typeof _.getContext == "function") {
347
- const C = document.createElement("canvas");
348
- C.width = _.width, C.height = _.height;
349
- const M = C.getContext("2d");
350
- M && (M.drawImage(_, 0, 0), v = C.toDataURL(`image/${e}`, t));
343
+ let F = null;
344
+ if (typeof M.toDataURL == "function")
345
+ F = M.toDataURL(`image/${e}`, t);
346
+ else if (typeof M.getContext == "function") {
347
+ const B = document.createElement("canvas");
348
+ B.width = M.width, B.height = M.height;
349
+ const V = B.getContext("2d");
350
+ V && (V.drawImage(M, 0, 0), F = B.toDataURL(`image/${e}`, t));
351
351
  }
352
- return v || null;
352
+ return F || null;
353
353
  } catch {
354
354
  return null;
355
355
  } finally {
356
- c.x = d, c.y = h, g && g.destroy(!0);
356
+ d.x = h, d.y = p, d.scale.x = m, d.scale.y = _, P && P.destroy(!0);
357
357
  }
358
358
  }
359
359
  /**
@@ -431,7 +431,7 @@ class ke extends O {
431
431
  this.sprite = null, this.originalTexture = null, this.baseTexture = null, this._container = null, this.removeAllListeners();
432
432
  }
433
433
  }
434
- const Pe = {
434
+ const Me = {
435
435
  adjust: ["adjust", "advanced"],
436
436
  // adjustment, adjustmentAdvanced, alpha, colorMatrix
437
437
  blur: ["blur"],
@@ -447,7 +447,7 @@ const Pe = {
447
447
  stylize: ["stylize"]
448
448
  // ascii, crt, crossHatch, dot, emboss
449
449
  };
450
- class Me extends O {
450
+ class Fe extends U {
451
451
  constructor(e, t) {
452
452
  super(), this.state = e, this.renderer = t, this.instances = {}, this._filterRegistry = null;
453
453
  }
@@ -482,7 +482,7 @@ class Me extends O {
482
482
  */
483
483
  getFiltersByCategory(e) {
484
484
  if (!this._filterRegistry) return [];
485
- const t = Pe[e] || [e], i = [], r = /* @__PURE__ */ new Set();
485
+ const t = Me[e] || [e], i = [], r = /* @__PURE__ */ new Set();
486
486
  for (const a of t) {
487
487
  const o = this._filterRegistry.getFiltersByCategory(a) || [];
488
488
  for (const n of o)
@@ -624,7 +624,7 @@ class Me extends O {
624
624
  return this.instances[e] || null;
625
625
  }
626
626
  }
627
- const I = class I extends O {
627
+ const X = class X extends U {
628
628
  constructor(e, t) {
629
629
  super(), this.state = e, this.renderer = t, this._overlayCanvas = null, this._isDragging = !1, this._dragStart = null, this._dragMode = null, this._startRect = null, this._hoverMode = null, this._lastAutoZoomCheck = 0, this.HANDLE_SIZE = 14, this.EDGE_HIT_PAD = 10, this._onPointerDown = this._handlePointerDown.bind(this), this._onPointerMove = this._handlePointerMove.bind(this), this._onPointerUp = this._handlePointerUp.bind(this);
630
630
  }
@@ -701,7 +701,7 @@ const I = class I extends O {
701
701
  if (!e || !r || !a || !o) return null;
702
702
  const l = e.width > t, c = e.height > i;
703
703
  if (!l && !c) return null;
704
- const d = I.AUTO_ZOOM_PADDING;
704
+ const d = X.AUTO_ZOOM_PADDING;
705
705
  let h = n;
706
706
  if (l) {
707
707
  const p = e.width / (d * r * o);
@@ -720,11 +720,11 @@ const I = class I extends O {
720
720
  _checkAutoZoom() {
721
721
  if (!this.state.get("autoZoomOnCropOverflow")) return;
722
722
  const e = Date.now();
723
- if (e - this._lastAutoZoomCheck < I.AUTO_ZOOM_THROTTLE_MS) return;
723
+ if (e - this._lastAutoZoomCheck < X.AUTO_ZOOM_THROTTLE_MS) return;
724
724
  this._lastAutoZoomCheck = e;
725
725
  const t = this.state.get("crop.rect"), i = this.renderer.sprite, r = this.renderer.originalTexture;
726
726
  if (!t || !i || !r) return;
727
- const a = I.calcAutoZoom(
727
+ const a = X.calcAutoZoom(
728
728
  t,
729
729
  i.width,
730
730
  i.height,
@@ -752,8 +752,8 @@ const I = class I extends O {
752
752
  if (!l) return;
753
753
  const c = this.state.get("crop.shape");
754
754
  if (n.save(), c === "circle") {
755
- const y = l.x + l.width / 2, P = l.y + l.height / 2, _ = Math.min(l.width, l.height) / 2;
756
- n.beginPath(), n.arc(y, P, _, 0, Math.PI * 2), n.clip();
755
+ const y = l.x + l.width / 2, v = l.y + l.height / 2, x = Math.min(l.width, l.height) / 2;
756
+ n.beginPath(), n.arc(y, v, x, 0, Math.PI * 2), n.clip();
757
757
  } else
758
758
  n.beginPath(), n.rect(l.x, l.y, l.width, l.height), n.clip();
759
759
  n.clearRect(l.x, l.y, l.width, l.height), n.restore(), n.strokeStyle = "#ffffff", n.lineWidth = 2, n.setLineDash([5, 5]), c === "circle" ? (n.beginPath(), n.arc(
@@ -771,15 +771,15 @@ const I = class I extends O {
771
771
  { x: l.x + l.width, y: l.y, m: "resize-ne" },
772
772
  { x: l.x, y: l.y + l.height, m: "resize-sw" },
773
773
  { x: l.x + l.width, y: l.y + l.height, m: "resize-se" }
774
- ], x = [
774
+ ], _ = [
775
775
  { x: l.x + l.width / 2, y: l.y, m: "n" },
776
776
  { x: l.x + l.width / 2, y: l.y + l.height, m: "s" },
777
777
  { x: l.x, y: l.y + l.height / 2, m: "w" },
778
778
  { x: l.x + l.width, y: l.y + l.height / 2, m: "e" }
779
- ], g = [...m, ...x];
779
+ ], g = [...m, ..._];
780
780
  for (const y of g) {
781
- const P = this._hoverMode === y.m, _ = P ? p + 4 : p;
782
- n.beginPath(), n.rect(y.x - _ / 2, y.y - _ / 2, _, _), n.fillStyle = P ? "#4da3ff" : "#ffffff", n.strokeStyle = "rgba(0,0,0,0.6)", n.lineWidth = 1, n.fill(), n.stroke();
781
+ const v = this._hoverMode === y.m, x = v ? p + 4 : p;
782
+ n.beginPath(), n.rect(y.x - x / 2, y.y - x / 2, x, x), n.fillStyle = v ? "#4da3ff" : "#ffffff", n.strokeStyle = "rgba(0,0,0,0.6)", n.lineWidth = 1, n.fill(), n.stroke();
783
783
  }
784
784
  }
785
785
  /**
@@ -890,33 +890,33 @@ const I = class I extends O {
890
890
  const e = this.renderer.app, t = this.renderer.sprite, i = this.renderer.originalTexture, r = this.state.get("crop.rect");
891
891
  if (!r || !t || !e || !i) return null;
892
892
  const a = window.PIXI, o = this.renderer.zoom, n = i.width / t.width, l = i.height / t.height, c = (r.x - t.x) * n, d = (r.y - t.y) * l;
893
- let h = Math.round(Math.max(1, r.width * n)), p = Math.round(Math.max(1, r.height * l)), m = Math.round(c), x = Math.round(d);
893
+ let h = Math.round(Math.max(1, r.width * n)), p = Math.round(Math.max(1, r.height * l)), m = Math.round(c), _ = Math.round(d);
894
894
  if (h <= 0 || p <= 0) return null;
895
895
  const g = new a.Container(), y = new a.Sprite(i);
896
896
  if (this.state.get("crop.shape") === "circle") {
897
- const V = Math.round(Math.max(h, p)), ye = m + h / 2, _e = x + p / 2;
898
- m = Math.round(ye - V / 2), x = Math.round(_e - V / 2), h = p = V;
899
- const z = new a.Graphics();
900
- typeof z.circle == "function" && typeof z.fill == "function" ? z.circle(h / 2, p / 2, h / 2).fill(16777215) : (z.beginFill(16777215, 1), z.drawCircle(h / 2, p / 2, h / 2), z.endFill()), y.mask = z, g.addChild(z);
897
+ const $ = Math.round(Math.max(h, p)), _e = m + h / 2, xe = _ + p / 2;
898
+ m = Math.round(_e - $ / 2), _ = Math.round(xe - $ / 2), h = p = $;
899
+ const R = new a.Graphics();
900
+ typeof R.circle == "function" && typeof R.fill == "function" ? R.circle(h / 2, p / 2, h / 2).fill(16777215) : (R.beginFill(16777215, 1), R.drawCircle(h / 2, p / 2, h / 2), R.endFill()), y.mask = R, g.addChild(R);
901
901
  }
902
- y.x = -m, y.y = -x, g.addChild(y);
903
- const _ = a.RenderTexture.create({ width: h, height: p });
902
+ y.x = -m, y.y = -_, g.addChild(y);
903
+ const x = a.RenderTexture.create({ width: h, height: p });
904
904
  e.renderer.render({
905
905
  container: g,
906
- target: _,
906
+ target: x,
907
907
  clear: !0
908
908
  }), g.destroy({ children: !0 });
909
- const v = this.renderer.originalTexture;
910
- v && v !== this.renderer.baseTexture && v.destroy(!0), this.renderer.originalTexture = _, e.stage.removeChild(t), t.destroy();
911
- const C = new a.Sprite(_);
912
- e.stage.addChild(C), this.renderer.sprite = C, this.renderer.fitScale = this.renderer.getFitScaleFor(_), this.renderer.setZoom(o, { keepCenter: !1 }), this.renderer.applyViewTransform(), this.renderer.render();
913
- const M = this.state.get("crop.appliedRect"), me = M && Number.isFinite(M.x) && Number.isFinite(M.y) && Number.isFinite(M.width) && Number.isFinite(M.height) ? {
914
- x: Math.round(M.x + m),
915
- y: Math.round(M.y + x),
909
+ const P = this.renderer.originalTexture;
910
+ P && P !== this.renderer.baseTexture && P.destroy(!0), this.renderer.originalTexture = x, e.stage.removeChild(t), t.destroy();
911
+ const S = new a.Sprite(x);
912
+ e.stage.addChild(S), this.renderer.sprite = S, this.renderer.fitScale = this.renderer.getFitScaleFor(x), this.renderer.setZoom(o, { keepCenter: !1 }), this.renderer.applyViewTransform(), this.renderer.render();
913
+ const T = this.state.get("crop.appliedRect"), F = T && Number.isFinite(T.x) && Number.isFinite(T.y) && Number.isFinite(T.width) && Number.isFinite(T.height) ? {
914
+ x: Math.round(T.x + m),
915
+ y: Math.round(T.y + _),
916
916
  width: h,
917
917
  height: p
918
- } : { x: m, y: x, width: h, height: p }, ge = this.state.get("crop.shape") || "free", be = this.state.get("crop.aspect") || "free";
919
- return this.disable(), this.state.set("crop.appliedRect", me), this.state.set("crop.appliedShape", ge), this.state.set("crop.appliedAspect", be), this.emit("applied", { width: h, height: p }), { texture: _, preservedZoom: o };
918
+ } : { x: m, y: _, width: h, height: p }, B = this.state.get("crop.shape") || "free", V = this.state.get("crop.aspect") || "free";
919
+ return this.disable(), this.state.set("crop.appliedRect", F), this.state.set("crop.appliedShape", B), this.state.set("crop.appliedAspect", V), this.emit("applied", { width: h, height: p }), { texture: x, preservedZoom: o };
920
920
  }
921
921
  /**
922
922
  * Apply a crop from saved texture-pixel coordinates (for state rehydration).
@@ -933,18 +933,18 @@ const I = class I extends O {
933
933
  if (l <= 0 || c <= 0) return null;
934
934
  const p = new o.Container(), m = new o.Sprite(a);
935
935
  if (t === "circle") {
936
- const P = Math.round(Math.max(l, c)), _ = d + l / 2, v = h + c / 2;
937
- d = Math.round(_ - P / 2), h = Math.round(v - P / 2), l = c = P;
938
- const C = new o.Graphics();
939
- typeof C.circle == "function" && typeof C.fill == "function" ? C.circle(l / 2, c / 2, l / 2).fill(16777215) : (C.beginFill(16777215, 1), C.drawCircle(l / 2, c / 2, l / 2), C.endFill()), m.mask = C, p.addChild(C);
936
+ const v = Math.round(Math.max(l, c)), x = d + l / 2, P = h + c / 2;
937
+ d = Math.round(x - v / 2), h = Math.round(P - v / 2), l = c = v;
938
+ const S = new o.Graphics();
939
+ typeof S.circle == "function" && typeof S.fill == "function" ? S.circle(l / 2, c / 2, l / 2).fill(16777215) : (S.beginFill(16777215, 1), S.drawCircle(l / 2, c / 2, l / 2), S.endFill()), m.mask = S, p.addChild(S);
940
940
  }
941
941
  m.x = -d, m.y = -h, p.addChild(m);
942
- const x = o.RenderTexture.create({ width: l, height: c });
943
- i.renderer.render({ container: p, target: x, clear: !0 }), p.destroy({ children: !0 });
942
+ const _ = o.RenderTexture.create({ width: l, height: c });
943
+ i.renderer.render({ container: p, target: _, clear: !0 }), p.destroy({ children: !0 });
944
944
  const g = this.renderer.originalTexture;
945
- g && g !== this.renderer.baseTexture && g.destroy(!0), this.renderer.originalTexture = x, i.stage.removeChild(r), r.destroy();
946
- const y = new o.Sprite(x);
947
- return i.stage.addChild(y), this.renderer.sprite = y, this.renderer.fitScale = this.renderer.getFitScaleFor(x), this.renderer.setZoom(n, { keepCenter: !1 }), this.renderer.applyViewTransform(), this.renderer.render(), { texture: x, preservedZoom: n };
945
+ g && g !== this.renderer.baseTexture && g.destroy(!0), this.renderer.originalTexture = _, i.stage.removeChild(r), r.destroy();
946
+ const y = new o.Sprite(_);
947
+ return i.stage.addChild(y), this.renderer.sprite = y, this.renderer.fitScale = this.renderer.getFitScaleFor(_), this.renderer.setZoom(n, { keepCenter: !1 }), this.renderer.applyViewTransform(), this.renderer.render(), { texture: _, preservedZoom: n };
948
948
  }
949
949
  /**
950
950
  * Cancel crop
@@ -971,12 +971,12 @@ const I = class I extends O {
971
971
  * Padding factor for auto-zoom: image will be ~91% of crop size (1/1.1).
972
972
  * Higher values = more aggressive zoom-out, more padding around image.
973
973
  */
974
- j(I, "AUTO_ZOOM_PADDING", 1.1), /**
974
+ W(X, "AUTO_ZOOM_PADDING", 1.1), /**
975
975
  * Minimum interval (ms) between auto-zoom adjustments during drag.
976
976
  */
977
- j(I, "AUTO_ZOOM_THROTTLE_MS", 100);
978
- let W = I;
979
- class Fe {
977
+ W(X, "AUTO_ZOOM_THROTTLE_MS", 100);
978
+ let Q = X;
979
+ class Ae {
980
980
  /**
981
981
  * Create a new RemoveBgManager
982
982
  * @param {Object} options
@@ -1102,7 +1102,7 @@ function u(s, e = {}, ...t) {
1102
1102
  typeof r == "string" ? i.appendChild(document.createTextNode(r)) : r instanceof HTMLElement && i.appendChild(r);
1103
1103
  return i;
1104
1104
  }
1105
- function oe({ id: s, label: e, min: t = 0, max: i = 1, step: r = 0.01, value: a = 0.5, onChange: o }) {
1105
+ function he({ id: s, label: e, min: t = 0, max: i = 1, step: r = 0.01, value: a = 0.5, onChange: o }) {
1106
1106
  const n = s.includes("-") ? s.split("-").slice(1).join("-") : s, l = u("div", {
1107
1107
  className: "slider-control slider-wrapper",
1108
1108
  "data-control": n,
@@ -1111,7 +1111,7 @@ function oe({ id: s, label: e, min: t = 0, max: i = 1, step: r = 0.01, value: a
1111
1111
  "div",
1112
1112
  { className: "slider-header" },
1113
1113
  u("label", { for: s, className: "slider-label" }, e),
1114
- u("span", { className: "slider-value", id: `${s}-value` }, q(a))
1114
+ u("span", { className: "slider-value", id: `${s}-value` }, Z(a))
1115
1115
  ), d = u("input", {
1116
1116
  type: "range",
1117
1117
  id: s,
@@ -1122,19 +1122,19 @@ function oe({ id: s, label: e, min: t = 0, max: i = 1, step: r = 0.01, value: a
1122
1122
  value: String(a),
1123
1123
  onInput: (h) => {
1124
1124
  const p = parseFloat(h.target.value), m = l.querySelector(".slider-value");
1125
- m && (m.textContent = q(p)), o == null || o(p);
1125
+ m && (m.textContent = Z(p)), o == null || o(p);
1126
1126
  }
1127
1127
  });
1128
1128
  return l.appendChild(c), l.appendChild(d), l.setValue = (h) => {
1129
1129
  d.value = String(h);
1130
1130
  const p = l.querySelector(".slider-value");
1131
- p && (p.textContent = q(h));
1131
+ p && (p.textContent = Z(h));
1132
1132
  }, l;
1133
1133
  }
1134
- function q(s) {
1134
+ function Z(s) {
1135
1135
  return Number.isInteger(s) ? String(s) : s.toFixed(2);
1136
1136
  }
1137
- function ne({ id: s, label: e, checked: t = !1, onChange: i }) {
1137
+ function de({ id: s, label: e, checked: t = !1, onChange: i }) {
1138
1138
  const r = u("div", { className: "toggle-control" }), a = u("label", { className: "toggle-label", for: s }, e), o = u("input", {
1139
1139
  type: "checkbox",
1140
1140
  id: s,
@@ -1151,7 +1151,7 @@ function ne({ id: s, label: e, checked: t = !1, onChange: i }) {
1151
1151
  o.checked = c;
1152
1152
  }, r;
1153
1153
  }
1154
- function le({ id: s, label: e, value: t = "#000000", onChange: i }) {
1154
+ function ue({ id: s, label: e, value: t = "#000000", onChange: i }) {
1155
1155
  const r = u("div", { className: "color-control" }), a = u("label", { className: "color-label", for: s }, e), o = u("input", {
1156
1156
  type: "color",
1157
1157
  id: s,
@@ -1163,7 +1163,7 @@ function le({ id: s, label: e, value: t = "#000000", onChange: i }) {
1163
1163
  o.value = n;
1164
1164
  }, r;
1165
1165
  }
1166
- function ce({ id: s, label: e, options: t = [], value: i, onChange: r }) {
1166
+ function pe({ id: s, label: e, options: t = [], value: i, onChange: r }) {
1167
1167
  const a = u("div", { className: "select-control" }), o = u("label", { className: "select-label", for: s }, e), n = u("select", {
1168
1168
  id: s,
1169
1169
  className: "select-input",
@@ -1177,7 +1177,7 @@ function ce({ id: s, label: e, options: t = [], value: i, onChange: r }) {
1177
1177
  n.value = l;
1178
1178
  }, a;
1179
1179
  }
1180
- function R({ label: s, className: e = "", onClick: t, icon: i = null, disabled: r = !1 }) {
1180
+ function N({ label: s, className: e = "", onClick: t, icon: i = null, disabled: r = !1 }) {
1181
1181
  const a = u("button", {
1182
1182
  type: "button",
1183
1183
  className: `btn ${e}`.trim(),
@@ -1192,7 +1192,7 @@ function R({ label: s, className: e = "", onClick: t, icon: i = null, disabled:
1192
1192
  }
1193
1193
  return s && a.appendChild(document.createTextNode(s)), a;
1194
1194
  }
1195
- function w({ icon: s, title: e, className: t = "", onClick: i, disabled: r = !1, testId: a = null, ariaLabel: o = null }) {
1195
+ function C({ icon: s, title: e, className: t = "", onClick: i, disabled: r = !1, testId: a = null, ariaLabel: o = null }) {
1196
1196
  const n = {
1197
1197
  type: "button",
1198
1198
  className: `icon-btn ${t}`.trim(),
@@ -1207,7 +1207,7 @@ function w({ icon: s, title: e, className: t = "", onClick: i, disabled: r = !1,
1207
1207
  const c = l.querySelector("svg");
1208
1208
  return c && c.setAttribute("aria-hidden", "true"), l;
1209
1209
  }
1210
- function Z({ label: s, icon: e, active: t = !1, onClick: i }) {
1210
+ function J({ label: s, icon: e, active: t = !1, onClick: i }) {
1211
1211
  const r = u("button", {
1212
1212
  type: "button",
1213
1213
  className: `chip ${t ? "active" : ""}`.trim(),
@@ -1223,8 +1223,8 @@ function Z({ label: s, icon: e, active: t = !1, onClick: i }) {
1223
1223
  r.classList.toggle("active", a);
1224
1224
  }, r;
1225
1225
  }
1226
- const he = '<svg viewBox="0 0 512 512" width="20" height="20"><path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="48" d="M328 112L184 256l144 144"/></svg>', de = '<svg viewBox="0 0 512 512" width="20" height="20"><path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="48" d="M184 112l144 144-144 144"/></svg>', Ae = '<svg viewBox="0 0 512 512" width="20" height="20"><path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="32" d="M221.09 64a157.09 157.09 0 10157.09 157.09A157.1 157.1 0 00221.09 64z"/><path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="32" d="M338.29 338.29L448 448M256 184v74m-37-37h74"/></svg>', ze = '<svg viewBox="0 0 512 512" width="20" height="20"><path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="32" d="M221.09 64a157.09 157.09 0 10157.09 157.09A157.1 157.1 0 00221.09 64z"/><path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="32" d="M338.29 338.29L448 448M184 221h74"/></svg>', Re = '<svg viewBox="0 0 512 512" width="20" height="20"><path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="32" d="M432 320v112H320M80 192V80h112M320 80h112v112M192 432H80V320"/></svg>', Ne = '<svg viewBox="0 0 512 512" width="20" height="20"><path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="32" d="M262.29 192.31a64 64 0 1057.4 57.4 64.13 64.13 0 00-57.4-57.4z"/><path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="32" d="M416.39 256a154.34 154.34 0 01-1.53 20.79l45.21 35.46a10.81 10.81 0 012.45 13.75l-42.77 74a10.81 10.81 0 01-13.14 4.59l-44.9-18.08a16.11 16.11 0 00-15.17 1.75A164.48 164.48 0 01325 400.8a15.94 15.94 0 00-8.82 12.14l-6.73 47.89a11.08 11.08 0 01-10.68 9.17h-85.54a11.11 11.11 0 01-10.69-8.87l-6.72-47.82a16.07 16.07 0 00-9-12.22 155.3 155.3 0 01-21.46-12.57 16 16 0 00-15.11-1.71l-44.89 18.07a10.81 10.81 0 01-13.14-4.58l-42.77-74a10.8 10.8 0 012.45-13.75l38.21-30a16.05 16.05 0 006-14.08c-.36-4.17-.58-8.33-.58-12.5s.21-8.27.58-12.35a16 16 0 00-6.07-13.94l-38.19-30A10.81 10.81 0 0149.48 186l42.77-74a10.81 10.81 0 0113.14-4.59l44.9 18.08a16.11 16.11 0 0015.17-1.75A164.48 164.48 0 01187 111.2a15.94 15.94 0 008.82-12.14l6.73-47.89A11.08 11.08 0 01213.23 42h85.54a11.11 11.11 0 0110.69 8.87l6.72 47.82a16.07 16.07 0 009 12.22 155.3 155.3 0 0121.46 12.57 16 16 0 0015.11 1.71l44.89-18.07a10.81 10.81 0 0113.14 4.58l42.77 74a10.8 10.8 0 01-2.45 13.75l-38.21 30a16.05 16.05 0 00-6.05 14.08c.33 4.14.55 8.3.55 12.47z"/></svg>', Te = '<svg viewBox="0 0 512 512" width="20" height="20"><path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="32" d="M400 320c0 88.37-55.63 144-144 144s-144-55.63-144-144c0-94.83 103.23-222.85 134.89-259.88a12 12 0 0118.23 0C296.77 97.15 400 225.17 400 320z"/><path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="32" d="M344 328a72 72 0 01-72 72"/></svg>', Ie = '<svg viewBox="0 0 512 512" width="20" height="20"><path fill="none" stroke="currentColor" stroke-miterlimit="10" stroke-width="32" d="M430.11 347.9c-6.6-6.1-16.3-7.6-24.6-9-11.5-1.9-15.9-4-22.6-10-14.3-12.7-14.3-31.1 0-43.8l30.3-26.9c46.4-41 46.4-108.2 0-149.2-34.2-30.1-80.1-45-127.8-45-55.7 0-113.9 20.3-158.8 60.1-83.5 73.8-83.5 194.7 0 268.5 41.5 36.7 97.5 55 152.9 55.4h1.7c55.4 0 110-17.9 148.8-52.4 14.4-12.7 11.99-36.6.1-47.7z"/><circle cx="144" cy="208" r="32"/><circle cx="152" cy="311" r="32"/><circle cx="224" cy="144" r="32"/><circle cx="256" cy="367" r="32"/><circle cx="328" cy="144" r="32"/></svg>', Ee = '<svg viewBox="0 0 512 512" width="20" height="20"><path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="32" d="M259.92 262.91L216.4 149.77a9 9 0 00-16.8 0l-43.52 113.14a9 9 0 01-5.17 5.17L37.77 311.6a9 9 0 000 16.8l113.14 43.52a9 9 0 015.17 5.17l43.52 113.14a9 9 0 0016.8 0l43.52-113.14a9 9 0 015.17-5.17l113.14-43.52a9 9 0 000-16.8l-113.14-43.52a9 9 0 01-5.17-5.17zM108 68L88 16 68 68 16 88l52 20 20 52 20-52 52-20-52-20zM426.67 117.33L400 48l-26.67 69.33L304 144l69.33 26.67L400 240l26.67-69.33L496 144l-69.33-26.67z"/></svg>', Xe = '<svg viewBox="0 0 512 512" width="20" height="20"><path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="32" d="M176 112l80-80 80 80M255.98 32l.02 448M176 400l80 80 80-80M400 176l80 80-80 80M112 176l-80 80 80 80M32 256h448"/></svg>', Ye = '<svg viewBox="0 0 512 512" width="20" height="20"><path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="32" d="M315.27 33L96 304h128l-31.51 173.23a2.36 2.36 0 002.33 2.77h0a2.36 2.36 0 001.89-.95L416 208H288l31.66-173.25a2.45 2.45 0 00-2.44-2.75h0a2.42 2.42 0 00-1.95 1z"/></svg>', ue = '<svg viewBox="0 0 512 512" width="20" height="20"><path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="32" d="M144 48v272a48 48 0 0048 48h272"/><path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="32" d="M368 464V192a48 48 0 00-48-48H48"/></svg>', Be = '<svg viewBox="0 0 512 512" width="20" height="20"><path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="32" d="M380.93 57.37A32 32 0 00358.3 48H94.22A46.21 46.21 0 0048 94.22v323.56A46.21 46.21 0 0094.22 464h323.56A46.36 46.36 0 00464 417.78V153.7a32 32 0 00-9.37-22.63zM256 416a64 64 0 1164-64 63.92 63.92 0 01-64 64zm48-224H112a16 16 0 01-16-16v-64a16 16 0 0116-16h192a16 16 0 0116 16v64a16 16 0 01-16 16z"/></svg>', K = '<svg viewBox="0 0 512 512" width="20" height="20"><path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="32" d="M368 368L144 144M368 144L144 368"/></svg>', pe = '<svg viewBox="0 0 512 512" width="20" height="20"><path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="32" d="M320 146s24.36-12-64-12a160 160 0 10160 160"/><path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="32" d="M256 58l80 80-80 80"/></svg>', Oe = '<svg viewBox="0 0 512 512" width="20" height="20"><path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="32" d="M112 112l20 320c.95 18.49 14.4 32 32 32h184c17.67 0 30.87-13.51 32-32l20-320"/><path fill="none" stroke="currentColor" stroke-linecap="round" stroke-miterlimit="10" stroke-width="32" d="M80 112h352"/><path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="32" d="M192 112V72h0a23.93 23.93 0 0124-24h80a23.93 23.93 0 0124 24h0v40M256 176v224M184 176l8 224M328 176l-8 224"/></svg>', Le = '<svg viewBox="0 0 512 512" width="20" height="20"><path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="32" d="M64 192v-72a40 40 0 0140-40h75.89a40 40 0 0122.19 6.72l27.84 18.56a40 40 0 0022.19 6.72H408a40 40 0 0140 40v40"/><path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="32" d="M479.9 226.55L463.68 392a40 40 0 01-39.93 40H88.25a40 40 0 01-39.93-40L32.1 226.55A32 32 0 0164 192h384.1a32 32 0 0131.8 34.55z"/></svg>', G = '<svg viewBox="0 0 512 512" width="20" height="20"><path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="32" d="M416 128L192 384l-96-96"/></svg>', De = '<svg viewBox="0 0 512 512" width="20" height="20"><rect x="64" y="64" width="384" height="384" rx="48" fill="none" stroke="currentColor" stroke-linejoin="round" stroke-width="32"/></svg>', Ue = '<svg viewBox="0 0 512 512" width="20" height="20"><circle cx="256" cy="256" r="208" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="32"/></svg>', Ve = '<svg viewBox="0 0 512 512" width="20" height="20"><path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="32" d="M80 96h64l64 320h64l64-160h96"/></svg>', Q = '<svg viewBox="0 0 512 512" width="20" height="20"><path fill="none" stroke="currentColor" stroke-linecap="round" stroke-miterlimit="10" stroke-width="32" d="M256 48v48M256 416v48M403.08 108.92l-33.94 33.94M142.86 369.14l-33.94 33.94M464 256h-48M96 256H48M403.08 403.08l-33.94-33.94M142.86 142.86l-33.94-33.94"/><circle cx="256" cy="256" r="80" fill="none" stroke="currentColor" stroke-linecap="round" stroke-miterlimit="10" stroke-width="32"/></svg>', J = '<svg viewBox="0 0 512 512" width="20" height="20"><path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="32" d="M160 136c0-30.62 4.51-61.61 16-88C99.57 81.27 48 159.32 48 248c0 119.29 96.71 216 216 216 88.68 0 166.73-51.57 200-128-26.39 11.49-57.38 16-88 16-119.29 0-216-96.71-216-216z"/></svg>', je = '<svg viewBox="0 0 512 512" width="20" height="20"><path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="32" d="M436 80H76a44.05 44.05 0 00-44 44v264a44.05 44.05 0 0044 44h360a44.05 44.05 0 0044-44V124a44.05 44.05 0 00-44-44z"/><circle cx="256" cy="256" r="80" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="32"/><path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="32" d="M220 80v56M292 80v56M220 376v56M292 376v56M80 144h56M80 224h56M80 304h56M376 144h56M376 224h56M376 304h56"/></svg>';
1227
- class qe {
1226
+ const fe = '<svg viewBox="0 0 512 512" width="20" height="20"><path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="48" d="M328 112L184 256l144 144"/></svg>', me = '<svg viewBox="0 0 512 512" width="20" height="20"><path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="48" d="M184 112l144 144-144 144"/></svg>', ze = '<svg viewBox="0 0 512 512" width="20" height="20"><path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="32" d="M221.09 64a157.09 157.09 0 10157.09 157.09A157.1 157.1 0 00221.09 64z"/><path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="32" d="M338.29 338.29L448 448M256 184v74m-37-37h74"/></svg>', Re = '<svg viewBox="0 0 512 512" width="20" height="20"><path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="32" d="M221.09 64a157.09 157.09 0 10157.09 157.09A157.1 157.1 0 00221.09 64z"/><path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="32" d="M338.29 338.29L448 448M184 221h74"/></svg>', Ne = '<svg viewBox="0 0 512 512" width="20" height="20"><path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="32" d="M432 320v112H320M80 192V80h112M320 80h112v112M192 432H80V320"/></svg>', Te = '<svg viewBox="0 0 512 512" width="20" height="20"><path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="32" d="M262.29 192.31a64 64 0 1057.4 57.4 64.13 64.13 0 00-57.4-57.4z"/><path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="32" d="M416.39 256a154.34 154.34 0 01-1.53 20.79l45.21 35.46a10.81 10.81 0 012.45 13.75l-42.77 74a10.81 10.81 0 01-13.14 4.59l-44.9-18.08a16.11 16.11 0 00-15.17 1.75A164.48 164.48 0 01325 400.8a15.94 15.94 0 00-8.82 12.14l-6.73 47.89a11.08 11.08 0 01-10.68 9.17h-85.54a11.11 11.11 0 01-10.69-8.87l-6.72-47.82a16.07 16.07 0 00-9-12.22 155.3 155.3 0 01-21.46-12.57 16 16 0 00-15.11-1.71l-44.89 18.07a10.81 10.81 0 01-13.14-4.58l-42.77-74a10.8 10.8 0 012.45-13.75l38.21-30a16.05 16.05 0 006-14.08c-.36-4.17-.58-8.33-.58-12.5s.21-8.27.58-12.35a16 16 0 00-6.07-13.94l-38.19-30A10.81 10.81 0 0149.48 186l42.77-74a10.81 10.81 0 0113.14-4.59l44.9 18.08a16.11 16.11 0 0015.17-1.75A164.48 164.48 0 01187 111.2a15.94 15.94 0 008.82-12.14l6.73-47.89A11.08 11.08 0 01213.23 42h85.54a11.11 11.11 0 0110.69 8.87l6.72 47.82a16.07 16.07 0 009 12.22 155.3 155.3 0 0121.46 12.57 16 16 0 0015.11 1.71l44.89-18.07a10.81 10.81 0 0113.14 4.58l42.77 74a10.8 10.8 0 01-2.45 13.75l-38.21 30a16.05 16.05 0 00-6.05 14.08c.33 4.14.55 8.3.55 12.47z"/></svg>', Ie = '<svg viewBox="0 0 512 512" width="20" height="20"><path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="32" d="M400 320c0 88.37-55.63 144-144 144s-144-55.63-144-144c0-94.83 103.23-222.85 134.89-259.88a12 12 0 0118.23 0C296.77 97.15 400 225.17 400 320z"/><path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="32" d="M344 328a72 72 0 01-72 72"/></svg>', Ee = '<svg viewBox="0 0 512 512" width="20" height="20"><path fill="none" stroke="currentColor" stroke-miterlimit="10" stroke-width="32" d="M430.11 347.9c-6.6-6.1-16.3-7.6-24.6-9-11.5-1.9-15.9-4-22.6-10-14.3-12.7-14.3-31.1 0-43.8l30.3-26.9c46.4-41 46.4-108.2 0-149.2-34.2-30.1-80.1-45-127.8-45-55.7 0-113.9 20.3-158.8 60.1-83.5 73.8-83.5 194.7 0 268.5 41.5 36.7 97.5 55 152.9 55.4h1.7c55.4 0 110-17.9 148.8-52.4 14.4-12.7 11.99-36.6.1-47.7z"/><circle cx="144" cy="208" r="32"/><circle cx="152" cy="311" r="32"/><circle cx="224" cy="144" r="32"/><circle cx="256" cy="367" r="32"/><circle cx="328" cy="144" r="32"/></svg>', Xe = '<svg viewBox="0 0 512 512" width="20" height="20"><path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="32" d="M259.92 262.91L216.4 149.77a9 9 0 00-16.8 0l-43.52 113.14a9 9 0 01-5.17 5.17L37.77 311.6a9 9 0 000 16.8l113.14 43.52a9 9 0 015.17 5.17l43.52 113.14a9 9 0 0016.8 0l43.52-113.14a9 9 0 015.17-5.17l113.14-43.52a9 9 0 000-16.8l-113.14-43.52a9 9 0 01-5.17-5.17zM108 68L88 16 68 68 16 88l52 20 20 52 20-52 52-20-52-20zM426.67 117.33L400 48l-26.67 69.33L304 144l69.33 26.67L400 240l26.67-69.33L496 144l-69.33-26.67z"/></svg>', Ye = '<svg viewBox="0 0 512 512" width="20" height="20"><path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="32" d="M176 112l80-80 80 80M255.98 32l.02 448M176 400l80 80 80-80M400 176l80 80-80 80M112 176l-80 80 80 80M32 256h448"/></svg>', Be = '<svg viewBox="0 0 512 512" width="20" height="20"><path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="32" d="M315.27 33L96 304h128l-31.51 173.23a2.36 2.36 0 002.33 2.77h0a2.36 2.36 0 001.89-.95L416 208H288l31.66-173.25a2.45 2.45 0 00-2.44-2.75h0a2.42 2.42 0 00-1.95 1z"/></svg>', ge = '<svg viewBox="0 0 512 512" width="20" height="20"><path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="32" d="M144 48v272a48 48 0 0048 48h272"/><path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="32" d="M368 464V192a48 48 0 00-48-48H48"/></svg>', Oe = '<svg viewBox="0 0 512 512" width="20" height="20"><path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="32" d="M380.93 57.37A32 32 0 00358.3 48H94.22A46.21 46.21 0 0048 94.22v323.56A46.21 46.21 0 0094.22 464h323.56A46.36 46.36 0 00464 417.78V153.7a32 32 0 00-9.37-22.63zM256 416a64 64 0 1164-64 63.92 63.92 0 01-64 64zm48-224H112a16 16 0 01-16-16v-64a16 16 0 0116-16h192a16 16 0 0116 16v64a16 16 0 01-16 16z"/></svg>', te = '<svg viewBox="0 0 512 512" width="20" height="20"><path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="32" d="M368 368L144 144M368 144L144 368"/></svg>', be = '<svg viewBox="0 0 512 512" width="20" height="20"><path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="32" d="M320 146s24.36-12-64-12a160 160 0 10160 160"/><path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="32" d="M256 58l80 80-80 80"/></svg>', Le = '<svg viewBox="0 0 512 512" width="20" height="20"><path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="32" d="M112 112l20 320c.95 18.49 14.4 32 32 32h184c17.67 0 30.87-13.51 32-32l20-320"/><path fill="none" stroke="currentColor" stroke-linecap="round" stroke-miterlimit="10" stroke-width="32" d="M80 112h352"/><path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="32" d="M192 112V72h0a23.93 23.93 0 0124-24h80a23.93 23.93 0 0124 24h0v40M256 176v224M184 176l8 224M328 176l-8 224"/></svg>', De = '<svg viewBox="0 0 512 512" width="20" height="20"><path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="32" d="M64 192v-72a40 40 0 0140-40h75.89a40 40 0 0122.19 6.72l27.84 18.56a40 40 0 0022.19 6.72H408a40 40 0 0140 40v40"/><path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="32" d="M479.9 226.55L463.68 392a40 40 0 01-39.93 40H88.25a40 40 0 01-39.93-40L32.1 226.55A32 32 0 0164 192h384.1a32 32 0 0131.8 34.55z"/></svg>', ee = '<svg viewBox="0 0 512 512" width="20" height="20"><path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="32" d="M416 128L192 384l-96-96"/></svg>', Ue = '<svg viewBox="0 0 512 512" width="20" height="20"><rect x="64" y="64" width="384" height="384" rx="48" fill="none" stroke="currentColor" stroke-linejoin="round" stroke-width="32"/></svg>', Ve = '<svg viewBox="0 0 512 512" width="20" height="20"><circle cx="256" cy="256" r="208" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="32"/></svg>', je = '<svg viewBox="0 0 512 512" width="20" height="20"><path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="32" d="M80 96h64l64 320h64l64-160h96"/></svg>', ie = '<svg viewBox="0 0 512 512" width="20" height="20"><path fill="none" stroke="currentColor" stroke-linecap="round" stroke-miterlimit="10" stroke-width="32" d="M256 48v48M256 416v48M403.08 108.92l-33.94 33.94M142.86 369.14l-33.94 33.94M464 256h-48M96 256H48M403.08 403.08l-33.94-33.94M142.86 142.86l-33.94-33.94"/><circle cx="256" cy="256" r="80" fill="none" stroke="currentColor" stroke-linecap="round" stroke-miterlimit="10" stroke-width="32"/></svg>', re = '<svg viewBox="0 0 512 512" width="20" height="20"><path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="32" d="M160 136c0-30.62 4.51-61.61 16-88C99.57 81.27 48 159.32 48 248c0 119.29 96.71 216 216 216 88.68 0 166.73-51.57 200-128-26.39 11.49-57.38 16-88 16-119.29 0-216-96.71-216-216z"/></svg>', qe = '<svg viewBox="0 0 512 512" width="20" height="20"><path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="32" d="M436 80H76a44.05 44.05 0 00-44 44v264a44.05 44.05 0 0044 44h360a44.05 44.05 0 0044-44V124a44.05 44.05 0 00-44-44z"/><circle cx="256" cy="256" r="80" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="32"/><path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="32" d="M220 80v56M292 80v56M220 376v56M292 376v56M80 144h56M80 224h56M80 304h56M376 144h56M376 224h56M376 304h56"/></svg>';
1227
+ class He {
1228
1228
  constructor(e, t) {
1229
1229
  this.state = e, this.editor = t, this.element = null, this._unsubscribers = [];
1230
1230
  }
@@ -1234,8 +1234,8 @@ class qe {
1234
1234
  */
1235
1235
  render() {
1236
1236
  this.element = u("div", { className: "editor-toolbar" });
1237
- const e = u("div", { className: "toolbar-section toolbar-left" }), t = w({
1238
- icon: Le,
1237
+ const e = u("div", { className: "toolbar-section toolbar-left" }), t = C({
1238
+ icon: De,
1239
1239
  title: "Open Image",
1240
1240
  className: "toolbar-btn",
1241
1241
  testId: "btn-open-image",
@@ -1243,8 +1243,8 @@ class qe {
1243
1243
  onClick: () => this.editor.openFilePicker()
1244
1244
  });
1245
1245
  e.appendChild(t);
1246
- const i = u("div", { className: "toolbar-section toolbar-center" }), r = w({
1247
- icon: ze,
1246
+ const i = u("div", { className: "toolbar-section toolbar-center" }), r = C({
1247
+ icon: Re,
1248
1248
  title: "Zoom Out",
1249
1249
  className: "toolbar-btn",
1250
1250
  testId: "btn-zoom-out",
@@ -1260,8 +1260,8 @@ class qe {
1260
1260
  "aria-atomic": "true",
1261
1261
  role: "status"
1262
1262
  }, "100%");
1263
- const a = w({
1264
- icon: Ae,
1263
+ const a = C({
1264
+ icon: ze,
1265
1265
  title: "Zoom In",
1266
1266
  className: "toolbar-btn",
1267
1267
  testId: "btn-zoom-in",
@@ -1270,8 +1270,8 @@ class qe {
1270
1270
  const h = this.state.get("zoom");
1271
1271
  this.editor.setZoom(h + 0.25);
1272
1272
  }
1273
- }), o = w({
1274
- icon: Re,
1273
+ }), o = C({
1274
+ icon: Ne,
1275
1275
  title: "Fit to Screen",
1276
1276
  className: "toolbar-btn",
1277
1277
  testId: "btn-fit-screen",
@@ -1280,15 +1280,15 @@ class qe {
1280
1280
  });
1281
1281
  i.appendChild(r), i.appendChild(this._zoomLabel), i.appendChild(a), i.appendChild(o);
1282
1282
  const n = u("div", { className: "toolbar-section toolbar-right" });
1283
- this._themeBtn = w({
1284
- icon: this.state.get("isDarkMode") ? Q : J,
1283
+ this._themeBtn = C({
1284
+ icon: this.state.get("isDarkMode") ? ie : re,
1285
1285
  title: "Toggle Theme",
1286
1286
  className: "toolbar-btn toolbar-btn-theme",
1287
1287
  testId: "btn-toggle-theme",
1288
1288
  ariaLabel: "Toggle theme",
1289
1289
  onClick: () => this.editor.toggleTheme()
1290
- }), this._cropBtn = w({
1291
- icon: ue,
1290
+ }), this._cropBtn = C({
1291
+ icon: ge,
1292
1292
  title: "Crop",
1293
1293
  className: "toolbar-btn toolbar-btn-crop",
1294
1294
  testId: "btn-crop",
@@ -1297,22 +1297,22 @@ class qe {
1297
1297
  this.state.get("mode") === "crop" ? this.editor.setMode("filters") : this.editor.setMode("crop");
1298
1298
  }
1299
1299
  });
1300
- const l = w({
1301
- icon: pe,
1300
+ const l = C({
1301
+ icon: be,
1302
1302
  title: "Reset All",
1303
1303
  className: "toolbar-btn",
1304
1304
  testId: "btn-reset-all",
1305
1305
  ariaLabel: "Reset all changes",
1306
1306
  onClick: () => this.editor.resetAll()
1307
- }), c = w({
1308
- icon: Be,
1307
+ }), c = C({
1308
+ icon: Oe,
1309
1309
  title: "Save Image",
1310
1310
  className: "toolbar-btn toolbar-btn-primary",
1311
1311
  testId: "btn-save-edit",
1312
1312
  ariaLabel: "Save image",
1313
1313
  onClick: () => this.editor.save()
1314
- }), d = w({
1315
- icon: K,
1314
+ }), d = C({
1315
+ icon: te,
1316
1316
  title: "Close",
1317
1317
  className: "toolbar-btn",
1318
1318
  testId: "btn-cancel-edit",
@@ -1330,7 +1330,7 @@ class qe {
1330
1330
  });
1331
1331
  this._unsubscribers.push(e);
1332
1332
  const t = this.state.on("change:isDarkMode", ({ value: r }) => {
1333
- this._themeBtn.innerHTML = r ? Q : J;
1333
+ this._themeBtn.innerHTML = r ? ie : re;
1334
1334
  });
1335
1335
  this._unsubscribers.push(t);
1336
1336
  const i = this.state.on("change:mode", ({ value: r }) => {
@@ -1353,24 +1353,24 @@ class qe {
1353
1353
  this._unsubscribers.forEach((t) => t()), this._unsubscribers = [], (e = this.element) == null || e.remove(), this.element = null;
1354
1354
  }
1355
1355
  }
1356
- const L = [
1357
- { id: "adjust", name: "Adjust", icon: Ne },
1356
+ const j = [
1357
+ { id: "adjust", name: "Adjust", icon: Te },
1358
1358
  // adjustment, adjustmentAdvanced, alpha
1359
- { id: "blur", name: "Blur", icon: Te },
1359
+ { id: "blur", name: "Blur", icon: Ie },
1360
1360
  // blur, kawaseBlur, motionBlur, radialBlur, etc.
1361
- { id: "color", name: "Color", icon: Ie },
1361
+ { id: "color", name: "Color", icon: Ee },
1362
1362
  // colorOverlay, grayscale, hslAdjustment, etc.
1363
- { id: "effects", name: "Effects", icon: Ee },
1363
+ { id: "effects", name: "Effects", icon: Xe },
1364
1364
  // noise, vignette, pixelate, dropShadow, etc.
1365
- { id: "distortion", name: "Distortion", icon: Xe },
1365
+ { id: "distortion", name: "Distortion", icon: Ye },
1366
1366
  // twist, bulgePinch, displacement, etc.
1367
- { id: "light", name: "Light", icon: Ye },
1367
+ { id: "light", name: "Light", icon: Be },
1368
1368
  // bloom, glow, godray, advancedBloom
1369
- { id: "stylize", name: "Stylize", icon: je },
1369
+ { id: "stylize", name: "Stylize", icon: qe },
1370
1370
  // ascii, crt, crossHatch, dot, emboss
1371
- { id: "crop", name: "Crop", icon: ue }
1371
+ { id: "crop", name: "Crop", icon: ge }
1372
1372
  ];
1373
- class He {
1373
+ class $e {
1374
1374
  constructor(e, t) {
1375
1375
  this.state = e, this.editor = t, this.element = null, this._chips = /* @__PURE__ */ new Map(), this._scrollIndex = 0, this._unsubscribers = [];
1376
1376
  }
@@ -1383,21 +1383,21 @@ class He {
1383
1383
  this._onSelect = e, this.element = u("div", {
1384
1384
  className: "category-carousel-container",
1385
1385
  "data-testid": "category-carousel"
1386
- }), this._leftBtn = w({
1387
- icon: he,
1386
+ }), this._leftBtn = C({
1387
+ icon: fe,
1388
1388
  title: "Previous categories",
1389
1389
  className: "carousel-nav carousel-nav-left",
1390
1390
  onClick: () => this._scrollLeft()
1391
- }), this._carousel = u("div", { className: "category-carousel" }), L.forEach((i) => {
1392
- const r = Z({
1391
+ }), this._carousel = u("div", { className: "category-carousel" }), j.forEach((i) => {
1392
+ const r = J({
1393
1393
  label: i.name,
1394
1394
  icon: i.icon,
1395
1395
  active: this.state.get("selectedCategory") === i.id,
1396
1396
  onClick: () => this._selectCategory(i.id)
1397
1397
  });
1398
1398
  r.dataset.categoryId = i.id, r.dataset.category = i.id, r.dataset.testid = `category-${i.id}`, this._chips.set(i.id, r), this._carousel.appendChild(r);
1399
- }), this._rightBtn = w({
1400
- icon: de,
1399
+ }), this._rightBtn = C({
1400
+ icon: me,
1401
1401
  title: "Next categories",
1402
1402
  className: "carousel-nav carousel-nav-right",
1403
1403
  onClick: () => this._scrollRight()
@@ -1406,7 +1406,7 @@ class He {
1406
1406
  role: "tablist",
1407
1407
  "aria-label": "Category pages"
1408
1408
  });
1409
- const t = Math.ceil(L.length / 3);
1409
+ const t = Math.ceil(j.length / 3);
1410
1410
  for (let i = 0; i < t; i++) {
1411
1411
  const r = u("button", {
1412
1412
  type: "button",
@@ -1453,7 +1453,7 @@ class He {
1453
1453
  * Scroll carousel right
1454
1454
  */
1455
1455
  _scrollRight() {
1456
- this._scrollIndex < L.length - 3 && (this._scrollIndex++, this._scrollCarousel());
1456
+ this._scrollIndex < j.length - 3 && (this._scrollIndex++, this._scrollCarousel());
1457
1457
  }
1458
1458
  /**
1459
1459
  * Scroll to a specific page
@@ -1480,7 +1480,7 @@ class He {
1480
1480
  * Update navigation button states
1481
1481
  */
1482
1482
  _updateNavButtons() {
1483
- this._leftBtn && (this._leftBtn.disabled = this._scrollIndex === 0), this._rightBtn && (this._rightBtn.disabled = this._scrollIndex >= L.length - 3);
1483
+ this._leftBtn && (this._leftBtn.disabled = this._scrollIndex === 0), this._rightBtn && (this._rightBtn.disabled = this._scrollIndex >= j.length - 3);
1484
1484
  }
1485
1485
  /**
1486
1486
  * Update pagination dot states
@@ -1509,7 +1509,7 @@ class He {
1509
1509
  this._unsubscribers.forEach((t) => t()), this._unsubscribers = [], this._chips.clear(), (e = this.element) == null || e.remove(), this.element = null;
1510
1510
  }
1511
1511
  }
1512
- class $e {
1512
+ class We {
1513
1513
  constructor(e, t) {
1514
1514
  this.state = e, this.filterManager = t, this.element = null, this._filterCards = /* @__PURE__ */ new Map(), this._scrollIndex = 0, this._unsubscribers = [], this._onToggle = null, this._onSelect = null;
1515
1515
  }
@@ -1519,13 +1519,13 @@ class $e {
1519
1519
  * @returns {HTMLElement}
1520
1520
  */
1521
1521
  render({ onToggle: e, onSelect: t }) {
1522
- return this._onToggle = e, this._onSelect = t, this.element = u("div", { className: "filter-carousel-container" }), this._leftBtn = w({
1523
- icon: he,
1522
+ return this._onToggle = e, this._onSelect = t, this.element = u("div", { className: "filter-carousel-container" }), this._leftBtn = C({
1523
+ icon: fe,
1524
1524
  title: "Previous filters",
1525
1525
  className: "carousel-nav carousel-nav-left",
1526
1526
  onClick: () => this._scrollLeft()
1527
- }), this._carousel = u("div", { className: "filter-carousel" }), this._rightBtn = w({
1528
- icon: de,
1527
+ }), this._carousel = u("div", { className: "filter-carousel" }), this._rightBtn = C({
1528
+ icon: me,
1529
1529
  title: "Next filters",
1530
1530
  className: "carousel-nav carousel-nav-right",
1531
1531
  onClick: () => this._scrollRight()
@@ -1587,7 +1587,7 @@ class $e {
1587
1587
  this._handleToggle(e.id, h), h && (this.state.set("selectedFilter", e.id), (p = this._onSelect) == null || p.call(this, e.id));
1588
1588
  }
1589
1589
  });
1590
- return l.innerHTML = t ? G : "", r.appendChild(a), r.appendChild(n), r.appendChild(l), r._toggle = l, r._isActive = t, r;
1590
+ return l.innerHTML = t ? ee : "", r.appendChild(a), r.appendChild(n), r.appendChild(l), r._toggle = l, r._isActive = t, r;
1591
1591
  }
1592
1592
  /**
1593
1593
  * Handle filter card click (select)
@@ -1613,7 +1613,7 @@ class $e {
1613
1613
  const e = this.state.get("activeFilters");
1614
1614
  this._filterCards.forEach((t, i) => {
1615
1615
  const r = e.has(i);
1616
- t.classList.toggle("active", r), t._toggle.classList.toggle("active", r), t._toggle.innerHTML = r ? G : "", t._isActive = r;
1616
+ t.classList.toggle("active", r), t._toggle.classList.toggle("active", r), t._toggle.innerHTML = r ? ee : "", t._isActive = r;
1617
1617
  });
1618
1618
  }
1619
1619
  /**
@@ -1666,7 +1666,7 @@ class $e {
1666
1666
  this._unsubscribers.forEach((t) => t()), this._unsubscribers = [], this._filterCards.clear(), (e = this.element) == null || e.remove(), this.element = null;
1667
1667
  }
1668
1668
  }
1669
- class We {
1669
+ class Ze {
1670
1670
  constructor(e, t) {
1671
1671
  this.state = e, this.filterManager = t, this.element = null, this._controls = /* @__PURE__ */ new Map(), this._onChange = null, this._onReset = null, this._onAction = null, this._unsubscribers = [];
1672
1672
  }
@@ -1711,7 +1711,7 @@ class We {
1711
1711
  return;
1712
1712
  }
1713
1713
  const i = u("div", { className: "adjustments-header" });
1714
- i.appendChild(u("span", { className: "adjustments-title" }, t.name)), i.appendChild(R({
1714
+ i.appendChild(u("span", { className: "adjustments-title" }, t.name)), i.appendChild(N({
1715
1715
  label: "Reset",
1716
1716
  className: "btn-text",
1717
1717
  onClick: () => this._handleReset(e)
@@ -1734,7 +1734,7 @@ class We {
1734
1734
  const r = t.label || t.id;
1735
1735
  switch (this._normalizeControlType(t.type)) {
1736
1736
  case "slider":
1737
- return oe({
1737
+ return he({
1738
1738
  id: `${e}-${t.id}`,
1739
1739
  label: r,
1740
1740
  min: t.min ?? 0,
@@ -1744,14 +1744,14 @@ class We {
1744
1744
  onChange: (l) => this._handleChange(e, t.id, l)
1745
1745
  });
1746
1746
  case "toggle":
1747
- return ne({
1747
+ return de({
1748
1748
  id: `${e}-${t.id}`,
1749
1749
  label: r,
1750
1750
  checked: !!i,
1751
1751
  onChange: (l) => this._handleChange(e, t.id, l)
1752
1752
  });
1753
1753
  case "color":
1754
- return le({
1754
+ return ue({
1755
1755
  id: `${e}-${t.id}`,
1756
1756
  label: r,
1757
1757
  value: typeof i == "string" && i.startsWith("#") ? i : t.default || "#000000",
@@ -1759,7 +1759,7 @@ class We {
1759
1759
  });
1760
1760
  case "select":
1761
1761
  const o = this._normalizeOptions(t.options);
1762
- return ce({
1762
+ return pe({
1763
1763
  id: `${e}-${t.id}`,
1764
1764
  label: r,
1765
1765
  options: o,
@@ -1768,7 +1768,7 @@ class We {
1768
1768
  });
1769
1769
  case "button":
1770
1770
  const n = u("div", { className: "button-control" });
1771
- return n.appendChild(R({
1771
+ return n.appendChild(N({
1772
1772
  label: r,
1773
1773
  className: "btn-secondary",
1774
1774
  onClick: () => this._handleAction(e, t.action || t.id)
@@ -1869,7 +1869,7 @@ class We {
1869
1869
  this._unsubscribers.forEach((t) => t()), this._unsubscribers = [], this._controls.clear(), (e = this.element) == null || e.remove(), this.element = null;
1870
1870
  }
1871
1871
  }
1872
- class Ze {
1872
+ class Ge {
1873
1873
  constructor(e, t) {
1874
1874
  this.state = e, this.filterManager = t, this._drawer = null, this._body = null, this._titleEl = null, this._isOpen = !1, this._currentFilterId = null, this._controls = /* @__PURE__ */ new Map(), this._onChange = null, this._onReset = null, this._onRemove = null, this._onAction = null, this._container = null;
1875
1875
  }
@@ -1882,22 +1882,22 @@ class Ze {
1882
1882
  this._onChange = t, this._onReset = i, this._onRemove = r, this._onAction = a, this._container = e, this._drawer = u("div", { className: "mobile-filter-drawer" });
1883
1883
  const o = u("div", { className: "drawer-header" });
1884
1884
  this._titleEl = u("span", { className: "drawer-title" }, "Filter");
1885
- const n = u("div", { className: "drawer-header-actions" }), l = R({
1885
+ const n = u("div", { className: "drawer-header-actions" }), l = N({
1886
1886
  label: "Reset",
1887
1887
  className: "btn-text",
1888
1888
  onClick: () => {
1889
1889
  var h;
1890
1890
  this._currentFilterId && ((h = this._onReset) == null || h.call(this, this._currentFilterId), this._renderControls());
1891
1891
  }
1892
- }), c = R({
1892
+ }), c = N({
1893
1893
  label: "Remove",
1894
1894
  className: "btn-text btn-danger",
1895
1895
  onClick: () => {
1896
1896
  var h;
1897
1897
  this._currentFilterId && ((h = this._onRemove) == null || h.call(this, this._currentFilterId), this.close());
1898
1898
  }
1899
- }), d = w({
1900
- icon: K,
1899
+ }), d = C({
1900
+ icon: te,
1901
1901
  title: "Close",
1902
1902
  className: "btn-icon-sm",
1903
1903
  ariaLabel: "Close drawer",
@@ -1971,7 +1971,7 @@ class Ze {
1971
1971
  const r = t.label || t.id;
1972
1972
  switch (this._normalizeControlType(t.type)) {
1973
1973
  case "slider":
1974
- return oe({
1974
+ return he({
1975
1975
  id: `drawer-${e}-${t.id}`,
1976
1976
  label: r,
1977
1977
  min: t.min ?? 0,
@@ -1984,7 +1984,7 @@ class Ze {
1984
1984
  }
1985
1985
  });
1986
1986
  case "toggle":
1987
- return ne({
1987
+ return de({
1988
1988
  id: `drawer-${e}-${t.id}`,
1989
1989
  label: r,
1990
1990
  checked: !!i,
@@ -1994,7 +1994,7 @@ class Ze {
1994
1994
  }
1995
1995
  });
1996
1996
  case "color":
1997
- return le({
1997
+ return ue({
1998
1998
  id: `drawer-${e}-${t.id}`,
1999
1999
  label: r,
2000
2000
  value: typeof i == "string" && i.startsWith("#") ? i : t.default || "#000000",
@@ -2005,7 +2005,7 @@ class Ze {
2005
2005
  });
2006
2006
  case "select": {
2007
2007
  const o = this._normalizeOptions(t.options);
2008
- return ce({
2008
+ return pe({
2009
2009
  id: `drawer-${e}-${t.id}`,
2010
2010
  label: r,
2011
2011
  options: o,
@@ -2018,7 +2018,7 @@ class Ze {
2018
2018
  }
2019
2019
  case "button": {
2020
2020
  const o = u("div", { className: "button-control" });
2021
- return o.appendChild(R({
2021
+ return o.appendChild(N({
2022
2022
  label: r,
2023
2023
  className: "btn-secondary",
2024
2024
  onClick: () => {
@@ -2065,7 +2065,7 @@ class Ze {
2065
2065
  this._controls.clear(), (e = this._drawer) == null || e.remove(), this._drawer = null, this._isOpen = !1, this._currentFilterId = null, this._container = null;
2066
2066
  }
2067
2067
  }
2068
- class Ge {
2068
+ class Ke {
2069
2069
  constructor(e, t) {
2070
2070
  this.state = e, this.filterManager = t, this.element = null, this._scrollContainer = null, this._chips = /* @__PURE__ */ new Map(), this._unsubscribers = [], this._onToggle = null, this._onSelect = null;
2071
2071
  }
@@ -2138,11 +2138,11 @@ class Ge {
2138
2138
  this._unsubscribers.forEach((t) => t()), this._unsubscribers = [], this._chips.clear(), (e = this.element) == null || e.remove(), this.element = null;
2139
2139
  }
2140
2140
  }
2141
- const Ke = [
2142
- { id: "free", name: "Free", icon: Ve },
2143
- { id: "square", name: "Square", icon: De },
2144
- { id: "circle", name: "Circle", icon: Ue }
2145
- ], Qe = [
2141
+ const Qe = [
2142
+ { id: "free", name: "Free", icon: je },
2143
+ { id: "square", name: "Square", icon: Ue },
2144
+ { id: "circle", name: "Circle", icon: Ve }
2145
+ ], Je = [
2146
2146
  { id: "free", name: "Free" },
2147
2147
  { id: "1:1", name: "1:1" },
2148
2148
  { id: "4:3", name: "4:3" },
@@ -2150,7 +2150,7 @@ const Ke = [
2150
2150
  { id: "3:2", name: "3:2" },
2151
2151
  { id: "2:3", name: "2:3" }
2152
2152
  ];
2153
- class Je {
2153
+ class et {
2154
2154
  constructor(e, t) {
2155
2155
  this.state = e, this.cropManager = t, this.element = null, this._shapeChips = /* @__PURE__ */ new Map(), this._aspectChips = /* @__PURE__ */ new Map(), this._unsubscribers = [];
2156
2156
  }
@@ -2174,8 +2174,8 @@ class Je {
2174
2174
  const e = u("div", { className: "crop-section" });
2175
2175
  e.appendChild(u("label", { className: "section-label" }, "Shape"));
2176
2176
  const t = u("div", { className: "chip-row" }), i = this.state.get("crop.shape");
2177
- Ke.forEach((c) => {
2178
- const d = Z({
2177
+ Qe.forEach((c) => {
2178
+ const d = J({
2179
2179
  label: c.name,
2180
2180
  icon: c.icon,
2181
2181
  active: i === c.id,
@@ -2184,25 +2184,25 @@ class Je {
2184
2184
  d.dataset.shape = c.id, d.dataset.testid = `crop-shape-${c.id}`, this._shapeChips.set(c.id, d), t.appendChild(d);
2185
2185
  }), e.appendChild(t), this.element.appendChild(e), this.state.get("lockCropShape") && (e.style.display = "none"), this._shapeSection = e, this._aspectSection = u("div", { className: "crop-section" }), this._aspectSection.appendChild(u("label", { className: "section-label" }, "Aspect Ratio"));
2186
2186
  const r = u("div", { className: "chip-row aspect-row" }), a = this.state.get("crop.aspect");
2187
- Qe.forEach((c) => {
2188
- const d = Z({
2187
+ Je.forEach((c) => {
2188
+ const d = J({
2189
2189
  label: c.name,
2190
2190
  active: a === c.id,
2191
2191
  onClick: () => this._selectAspect(c.id)
2192
2192
  });
2193
2193
  d.dataset.ratio = c.id, d.dataset.testid = `crop-ratio-${c.id}`, this._aspectChips.set(c.id, d), r.appendChild(d);
2194
2194
  }), this._aspectSection.appendChild(r), this.element.appendChild(this._aspectSection), this._updateAspectVisibility();
2195
- const o = u("div", { className: "crop-actions" }), n = R({
2195
+ const o = u("div", { className: "crop-actions" }), n = N({
2196
2196
  label: "Cancel",
2197
2197
  className: "btn-secondary crop-cancel-btn",
2198
- icon: K,
2198
+ icon: te,
2199
2199
  onClick: () => this.cropManager.cancel()
2200
2200
  });
2201
2201
  n.dataset.testid = "cancel-crop";
2202
- const l = R({
2202
+ const l = N({
2203
2203
  label: "Apply Crop",
2204
2204
  className: "btn-primary crop-apply-btn",
2205
- icon: G,
2205
+ icon: ee,
2206
2206
  onClick: () => this._applyCropAndReturnToFilters()
2207
2207
  });
2208
2208
  return l.dataset.testid = "apply-crop", o.appendChild(n), o.appendChild(l), this.element.appendChild(o), this._subscribeToState(), this.element;
@@ -2265,7 +2265,7 @@ class Je {
2265
2265
  this._unsubscribers.forEach((t) => t()), this._unsubscribers = [], this._shapeChips.clear(), this._aspectChips.clear(), (e = this.element) == null || e.remove(), this.element = null;
2266
2266
  }
2267
2267
  }
2268
- class et {
2268
+ class tt {
2269
2269
  constructor(e, t) {
2270
2270
  this.state = e, this.filterManager = t, this.element = null, this._filterItems = /* @__PURE__ */ new Map(), this._unsubscribers = [], this._onRemove = null, this._onReset = null, this._onClearAll = null, this._onUpdateValue = null, this._onSelect = null;
2271
2271
  }
@@ -2281,7 +2281,7 @@ class et {
2281
2281
  });
2282
2282
  const o = u("div", { className: "panel-header" });
2283
2283
  o.appendChild(u("h3", { className: "panel-title" }, "Active Filters"));
2284
- const n = R({
2284
+ const n = N({
2285
2285
  label: "Clear All",
2286
2286
  className: "btn-text btn-danger",
2287
2287
  onClick: () => this._handleClearAll()
@@ -2347,13 +2347,13 @@ class et {
2347
2347
  onClick: (m) => {
2348
2348
  m.target.closest(".filter-item-actions") || this._handleSelect(e);
2349
2349
  }
2350
- }), o = u("div", { className: "filter-item-header" }), n = u("span", { className: "filter-item-name" }, t.name), l = u("div", { className: "filter-item-actions" }), c = w({
2351
- icon: pe,
2350
+ }), o = u("div", { className: "filter-item-header" }), n = u("span", { className: "filter-item-name" }, t.name), l = u("div", { className: "filter-item-actions" }), c = C({
2351
+ icon: be,
2352
2352
  title: "Reset filter",
2353
2353
  className: "btn-icon-sm",
2354
2354
  onClick: () => this._handleReset(e)
2355
- }), d = w({
2356
- icon: Oe,
2355
+ }), d = C({
2356
+ icon: Le,
2357
2357
  title: "Remove filter",
2358
2358
  className: "btn-icon-sm btn-danger",
2359
2359
  onClick: () => this._handleRemove(e)
@@ -2466,7 +2466,7 @@ class et {
2466
2466
  this._unsubscribers.forEach((t) => t()), this._unsubscribers = [], this._filterItems.clear(), (e = this.element) == null || e.remove(), this.element = null;
2467
2467
  }
2468
2468
  }
2469
- const B = {
2469
+ const D = {
2470
2470
  name: "free",
2471
2471
  initialMode: "filters",
2472
2472
  cropShape: "free",
@@ -2478,12 +2478,12 @@ const B = {
2478
2478
  showCropControls: !0,
2479
2479
  maxExportWidth: void 0,
2480
2480
  maxExportHeight: void 0
2481
- }, H = {
2481
+ }, G = {
2482
2482
  free: {
2483
- ...B
2483
+ ...D
2484
2484
  },
2485
2485
  avatar: {
2486
- ...B,
2486
+ ...D,
2487
2487
  name: "avatar",
2488
2488
  initialMode: "crop",
2489
2489
  cropShape: "circle",
@@ -2493,7 +2493,7 @@ const B = {
2493
2493
  lockAspectRatio: !0
2494
2494
  },
2495
2495
  banner: {
2496
- ...B,
2496
+ ...D,
2497
2497
  name: "banner",
2498
2498
  initialMode: "crop",
2499
2499
  cropShape: "square",
@@ -2503,7 +2503,7 @@ const B = {
2503
2503
  lockAspectRatio: !0
2504
2504
  },
2505
2505
  product: {
2506
- ...B,
2506
+ ...D,
2507
2507
  name: "product",
2508
2508
  initialMode: "filters",
2509
2509
  cropShape: "square",
@@ -2513,15 +2513,15 @@ const B = {
2513
2513
  lockAspectRatio: !1
2514
2514
  }
2515
2515
  };
2516
- function tt(s) {
2516
+ function it(s) {
2517
2517
  if (!s)
2518
- return { ...H.free };
2518
+ return { ...G.free };
2519
2519
  if (typeof s == "object" && s !== null)
2520
- return { ...B, ...s };
2521
- const e = H[s];
2522
- return e ? { ...e } : { ...H.free };
2520
+ return { ...D, ...s };
2521
+ const e = G[s];
2522
+ return e ? { ...e } : { ...G.free };
2523
2523
  }
2524
- class ii extends O {
2524
+ class ii extends U {
2525
2525
  /**
2526
2526
  * Create a new VanillaImageEditor
2527
2527
  * @param {HTMLElement} container - Container element to mount the editor
@@ -2532,7 +2532,7 @@ class ii extends O {
2532
2532
  if (super(), !e)
2533
2533
  throw new Error("VanillaImageEditor: container element is required");
2534
2534
  this._container = e, this._destroyed = !1, this._loadVersion = 0, this._objectUrls = /* @__PURE__ */ new Set();
2535
- const i = t.preset ? tt(t.preset) : null, r = i ? {
2535
+ const i = t.preset ? it(t.preset) : null, r = i ? {
2536
2536
  initialMode: i.initialMode === "crop" ? "crop" : "adjust",
2537
2537
  cropShape: i.cropShape,
2538
2538
  initialAspectRatio: i.aspectRatio
@@ -2550,7 +2550,7 @@ class ii extends O {
2550
2550
  },
2551
2551
  ...r,
2552
2552
  ...t
2553
- }, this._preset = i, this._state = ve(), this._state.set("theme", this._options.theme), this._state.set("crop.shape", this._options.cropShape), this._state.set("crop.aspect", this._options.initialAspectRatio), this._preset && (this._state.set("lockCropShape", !!this._preset.lockCropShape), this._state.set("lockAspectRatio", !!this._preset.lockAspectRatio), this._state.set("showFilters", this._preset.showFilters !== !1), this._state.set("showCropControls", this._preset.showCropControls !== !1), this._state.set("autoZoomOnCropOverflow", !!this._preset.autoZoomOnCropOverflow)), this._renderer = new ke(), this._filterManager = new Me(this._state, this._renderer), this._cropManager = new W(this._state, this._renderer), this._removeBgManager = null, ((a = this._options.backgroundRemoval) == null ? void 0 : a.enabled) !== !1 && (this._removeBgManager = new Fe({
2553
+ }, this._preset = i, this._state = ke(), this._state.set("theme", this._options.theme), this._state.set("crop.shape", this._options.cropShape), this._state.set("crop.aspect", this._options.initialAspectRatio), this._preset && (this._state.set("lockCropShape", !!this._preset.lockCropShape), this._state.set("lockAspectRatio", !!this._preset.lockAspectRatio), this._state.set("showFilters", this._preset.showFilters !== !1), this._state.set("showCropControls", this._preset.showCropControls !== !1), this._state.set("autoZoomOnCropOverflow", !!this._preset.autoZoomOnCropOverflow)), this._renderer = new Pe(), this._filterManager = new Fe(this._state, this._renderer), this._cropManager = new Q(this._state, this._renderer), this._removeBgManager = null, ((a = this._options.backgroundRemoval) == null ? void 0 : a.enabled) !== !1 && (this._removeBgManager = new Ae({
2554
2554
  endpoint: (o = this._options.backgroundRemoval) == null ? void 0 : o.endpoint,
2555
2555
  fallbackEndpoint: (n = this._options.backgroundRemoval) == null ? void 0 : n.fallbackEndpoint
2556
2556
  })), this._loadingOverlay = null, this._isMobile = typeof window < "u" ? window.innerWidth <= 768 : !1, this._toolbar = null, this._categoryCarousel = null, this._filterCarousel = null, this._filterAdjustments = null, this._mobileFilterDrawer = null, this._mobileActiveFilters = null, this._cropControls = null, this._activeFiltersPanel = null, this._editorEl = null, this._canvasContainer = null, this._cropOverlay = null, this._controlsSection = null, this._filterControlsEl = null, this._fileInput = null, this._resizeObserver = null, this._init();
@@ -2586,31 +2586,31 @@ class ii extends O {
2586
2586
  * Initialize UI components
2587
2587
  */
2588
2588
  _initUI() {
2589
- this._toolbar = new qe(this._state, this), this._toolbarContainer.appendChild(this._toolbar.render()), this._filterControlsEl = u("div", { className: "filter-controls-container" }), this._categoryCarousel = new He(this._state, this), this._filterControlsEl.appendChild(this._categoryCarousel.render((r) => {
2589
+ this._toolbar = new He(this._state, this), this._toolbarContainer.appendChild(this._toolbar.render()), this._filterControlsEl = u("div", { className: "filter-controls-container" }), this._categoryCarousel = new $e(this._state, this), this._filterControlsEl.appendChild(this._categoryCarousel.render((r) => {
2590
2590
  }));
2591
2591
  const e = u("div", { className: "filter-layout" }), t = u("div", { className: "filter-left-column" });
2592
- this._filterCarousel = new $e(this._state, this._filterManager), t.appendChild(this._filterCarousel.render({
2592
+ this._filterCarousel = new We(this._state, this._filterManager), t.appendChild(this._filterCarousel.render({
2593
2593
  onToggle: (r, a) => this._handleFilterToggle(r, a),
2594
2594
  onSelect: (r) => {
2595
2595
  this._handleFilterSelect(r), this._isMobile && this._mobileFilterDrawer && this._mobileFilterDrawer.open(r);
2596
2596
  }
2597
- })), this._filterAdjustments = new We(this._state, this._filterManager), t.appendChild(this._filterAdjustments.render({
2597
+ })), this._filterAdjustments = new Ze(this._state, this._filterManager), t.appendChild(this._filterAdjustments.render({
2598
2598
  onChange: (r, a, o) => this._handleFilterChange(r, a, o),
2599
2599
  onReset: (r) => this._handleFilterReset(r),
2600
2600
  onAction: (r, a) => this._handleFilterAction(r, a)
2601
2601
  })), e.appendChild(t);
2602
2602
  const i = u("div", { className: "filter-right-column" });
2603
- this._activeFiltersPanel = new et(this._state, this._filterManager), i.appendChild(this._activeFiltersPanel.render({
2603
+ this._activeFiltersPanel = new tt(this._state, this._filterManager), i.appendChild(this._activeFiltersPanel.render({
2604
2604
  onRemove: (r) => this._handleFilterToggle(r, !1),
2605
2605
  onReset: (r) => this._handleFilterReset(r),
2606
2606
  onClearAll: () => this.resetAll(),
2607
2607
  onSelect: (r) => this._handleFilterSelect(r)
2608
- })), e.appendChild(i), this._filterControlsEl.appendChild(e), this._mobileActiveFilters = new Ge(this._state, this._filterManager), this._filterControlsEl.appendChild(this._mobileActiveFilters.render({
2608
+ })), e.appendChild(i), this._filterControlsEl.appendChild(e), this._mobileActiveFilters = new Ke(this._state, this._filterManager), this._filterControlsEl.appendChild(this._mobileActiveFilters.render({
2609
2609
  onToggle: (r, a) => this._handleFilterToggle(r, a),
2610
2610
  onSelect: (r) => {
2611
2611
  this._handleFilterSelect(r), this._isMobile && this._mobileFilterDrawer && this._mobileFilterDrawer.open(r);
2612
2612
  }
2613
- })), this._cropControls = new Je(this._state, this._cropManager), this._cropControlsEl = this._cropControls.render(), this._cropControlsEl.style.display = "none", this._controlsSection.appendChild(this._filterControlsEl), this._controlsSection.appendChild(this._cropControlsEl), this._mobileFilterDrawer = new Ze(this._state, this._filterManager), this._mobileFilterDrawer.build(this._controlsSection, {
2613
+ })), this._cropControls = new et(this._state, this._cropManager), this._cropControlsEl = this._cropControls.render(), this._cropControlsEl.style.display = "none", this._controlsSection.appendChild(this._filterControlsEl), this._controlsSection.appendChild(this._cropControlsEl), this._mobileFilterDrawer = new Ge(this._state, this._filterManager), this._mobileFilterDrawer.build(this._controlsSection, {
2614
2614
  onChange: (r, a, o) => this._handleFilterChange(r, a, o),
2615
2615
  onReset: (r) => this._handleFilterReset(r),
2616
2616
  onRemove: (r) => {
@@ -2967,22 +2967,22 @@ class ii extends O {
2967
2967
  this._objectUrls.clear(), (e = this._resizeObserver) == null || e.disconnect(), this._renderer.destroy(), this._cropManager.disable(), this._handleWindowResize && window.removeEventListener("resize", this._handleWindowResize), (t = this._toolbar) == null || t.destroy(), (i = this._categoryCarousel) == null || i.destroy(), (r = this._filterCarousel) == null || r.destroy(), (a = this._filterAdjustments) == null || a.destroy(), (o = this._mobileFilterDrawer) == null || o.destroy(), (n = this._mobileActiveFilters) == null || n.destroy(), (l = this._cropControls) == null || l.destroy(), (c = this._activeFiltersPanel) == null || c.destroy(), (d = this._editorEl) == null || d.remove(), this._container = null, this._state = null, this.emit("destroyed"), this.removeAllListeners();
2968
2968
  }
2969
2969
  }
2970
- const k = /* @__PURE__ */ new Map(), E = /* @__PURE__ */ new Map();
2971
- function it(s, e) {
2970
+ const k = /* @__PURE__ */ new Map(), Y = /* @__PURE__ */ new Map();
2971
+ function rt(s, e) {
2972
2972
  return !Array.isArray(s.mediaTargets) || s.mediaTargets.length === 0 ? !0 : s.mediaTargets.includes(e);
2973
2973
  }
2974
2974
  function f(s) {
2975
2975
  var e;
2976
- return k.has(s.id), k.set(s.id, s), E.has(s.category) || E.set(s.category, []), (e = E.get(s.category)) == null || e.push(s.id), s;
2976
+ return k.has(s.id), k.set(s.id, s), Y.has(s.category) || Y.set(s.category, []), (e = Y.get(s.category)) == null || e.push(s.id), s;
2977
2977
  }
2978
- function rt(s) {
2978
+ function st(s) {
2979
2979
  return k.get(s);
2980
2980
  }
2981
- function U() {
2981
+ function H() {
2982
2982
  return Array.from(k.values());
2983
2983
  }
2984
- function st() {
2985
- U().map((t) => t.id), Object.entries(b).filter(
2984
+ function at() {
2985
+ H().map((t) => t.id), Object.entries(b).filter(
2986
2986
  (t) => /Filter$/.test(t[0]) && typeof t[1] == "function"
2987
2987
  ).forEach(([t, i]) => {
2988
2988
  const r = t.replace(/Filter$/, "").replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase();
@@ -3005,32 +3005,32 @@ function st() {
3005
3005
  });
3006
3006
  });
3007
3007
  }
3008
- function at(s) {
3009
- return (E.get(s) || []).map((t) => k.get(t)).filter(Boolean);
3008
+ function ot(s) {
3009
+ return (Y.get(s) || []).map((t) => k.get(t)).filter(Boolean);
3010
3010
  }
3011
- function ot() {
3012
- return Array.from(E.keys());
3011
+ function nt() {
3012
+ return Array.from(Y.keys());
3013
3013
  }
3014
3014
  function ri(s) {
3015
3015
  return k.has(s);
3016
3016
  }
3017
- function nt(s) {
3017
+ function lt(s) {
3018
3018
  const e = k.get(s);
3019
3019
  if (!e)
3020
3020
  return !1;
3021
3021
  k.delete(s);
3022
- const t = E.get(e.category);
3022
+ const t = Y.get(e.category);
3023
3023
  if (t) {
3024
3024
  const i = t.indexOf(s);
3025
- i !== -1 && t.splice(i, 1), t.length === 0 && E.delete(e.category);
3025
+ i !== -1 && t.splice(i, 1), t.length === 0 && Y.delete(e.category);
3026
3026
  }
3027
3027
  return !0;
3028
3028
  }
3029
3029
  function si(s, e) {
3030
3030
  const t = k.get(s);
3031
- return t ? it(t, e) : !1;
3031
+ return t ? rt(t, e) : !1;
3032
3032
  }
3033
- function lt() {
3033
+ function ct() {
3034
3034
  return Array.from(k.values()).map((s) => ({
3035
3035
  id: s.id,
3036
3036
  name: s.name,
@@ -3039,7 +3039,7 @@ function lt() {
3039
3039
  }));
3040
3040
  }
3041
3041
  if (typeof window < "u") {
3042
- window.__DEBUG_FILTERS_LIST = Array.from(k.keys()), window.getAllFilters = U, window.getFilter = rt, window.getFiltersByCategory = at, window.getRegisteredFilters = lt;
3042
+ window.__DEBUG_FILTERS_LIST = Array.from(k.keys()), window.getAllFilters = H, window.getFilter = st, window.getFiltersByCategory = ot, window.getRegisteredFilters = ct;
3043
3043
  const s = f;
3044
3044
  window.registerFilter = (e) => {
3045
3045
  const t = s(e);
@@ -3049,7 +3049,7 @@ if (typeof window < "u") {
3049
3049
  typeof window < "u" && (window.initializeFilterRegistry = window.initializeFilterRegistry || function() {
3050
3050
  return [];
3051
3051
  });
3052
- const { AdjustmentFilter: ct } = b, { ColorMatrixFilter: ht } = S, F = {
3052
+ const { AdjustmentFilter: ht } = b, { ColorMatrixFilter: dt } = w, A = {
3053
3053
  gamma: 1,
3054
3054
  saturation: 1,
3055
3055
  contrast: 1,
@@ -3058,7 +3058,7 @@ const { AdjustmentFilter: ct } = b, { ColorMatrixFilter: ht } = S, F = {
3058
3058
  green: 1,
3059
3059
  blue: 1,
3060
3060
  alpha: 1
3061
- }, dt = /* @__PURE__ */ new Set([
3061
+ }, ut = /* @__PURE__ */ new Set([
3062
3062
  "gamma",
3063
3063
  "saturation",
3064
3064
  "contrast",
@@ -3068,7 +3068,7 @@ const { AdjustmentFilter: ct } = b, { ColorMatrixFilter: ht } = S, F = {
3068
3068
  "blue",
3069
3069
  "alpha"
3070
3070
  ]);
3071
- function A(s, e) {
3071
+ function z(s, e) {
3072
3072
  if (typeof s == "number" && Number.isFinite(s))
3073
3073
  return s;
3074
3074
  if (typeof s == "string") {
@@ -3078,22 +3078,22 @@ function A(s, e) {
3078
3078
  }
3079
3079
  return e;
3080
3080
  }
3081
- function ee(s) {
3082
- return dt.has(s);
3081
+ function se(s) {
3082
+ return ut.has(s);
3083
3083
  }
3084
- function ut(s) {
3084
+ function pt(s) {
3085
3085
  return {
3086
- gamma: A(s.gamma, F.gamma),
3087
- saturation: A(s.saturation, F.saturation),
3088
- contrast: A(s.contrast, F.contrast),
3089
- brightness: A(s.brightness, F.brightness),
3090
- red: A(s.red, F.red),
3091
- green: A(s.green, F.green),
3092
- blue: A(s.blue, F.blue),
3093
- alpha: A(s.alpha, F.alpha)
3086
+ gamma: z(s.gamma, A.gamma),
3087
+ saturation: z(s.saturation, A.saturation),
3088
+ contrast: z(s.contrast, A.contrast),
3089
+ brightness: z(s.brightness, A.brightness),
3090
+ red: z(s.red, A.red),
3091
+ green: z(s.green, A.green),
3092
+ blue: z(s.blue, A.blue),
3093
+ alpha: z(s.alpha, A.alpha)
3094
3094
  };
3095
3095
  }
3096
- function te(s, e) {
3096
+ function ae(s, e) {
3097
3097
  s.reset(), s.brightness(e.brightness, !0), s.contrast(e.contrast, !0), s.saturate(e.saturation, !0);
3098
3098
  }
3099
3099
  f({
@@ -3104,14 +3104,14 @@ f({
3104
3104
  // Create an instance of the AdjustmentFilter with the provided parameters
3105
3105
  createFilter: (s) => {
3106
3106
  try {
3107
- const e = ut(s ?? {}), t = { ...e };
3107
+ const e = pt(s ?? {}), t = { ...e };
3108
3108
  try {
3109
- const i = new ct(t), r = i;
3109
+ const i = new ht(t), r = i;
3110
3110
  return r._customParams = { ...e }, r.updateUIParam = function(o, n) {
3111
3111
  try {
3112
- if (!ee(o))
3112
+ if (!se(o))
3113
3113
  return;
3114
- const l = this._customParams ?? { ...F }, c = A(n, l[o]);
3114
+ const l = this._customParams ?? { ...A }, c = z(n, l[o]);
3115
3115
  l[o] = c, this._customParams = l;
3116
3116
  const d = this;
3117
3117
  o in d && (d[o] = c);
@@ -3119,13 +3119,13 @@ f({
3119
3119
  }
3120
3120
  }, i;
3121
3121
  } catch {
3122
- const r = new ht(), a = r;
3123
- return a._customParams = { ...e }, te(r, e), a.updateUIParam = function(n, l) {
3122
+ const r = new dt(), a = r;
3123
+ return a._customParams = { ...e }, ae(r, e), a.updateUIParam = function(n, l) {
3124
3124
  try {
3125
- if (!ee(n))
3125
+ if (!se(n))
3126
3126
  return;
3127
- const c = this._customParams ?? { ...F }, d = A(l, c[n]);
3128
- c[n] = d, this._customParams = c, te(this, c);
3127
+ const c = this._customParams ?? { ...A }, d = z(l, c[n]);
3128
+ c[n] = d, this._customParams = c, ae(this, c);
3129
3129
  } catch {
3130
3130
  }
3131
3131
  }, r;
@@ -3229,14 +3229,14 @@ f({
3229
3229
  }
3230
3230
  ]
3231
3231
  });
3232
- const { ColorMatrixFilter: pt } = S, T = {
3232
+ const { ColorMatrixFilter: ft } = w, E = {
3233
3233
  brightness: 1,
3234
3234
  contrast: 1,
3235
3235
  saturation: 1,
3236
3236
  hue: 0,
3237
3237
  sepia: 0,
3238
3238
  negative: !1
3239
- }, ft = /* @__PURE__ */ new Set([
3239
+ }, mt = /* @__PURE__ */ new Set([
3240
3240
  "brightness",
3241
3241
  "contrast",
3242
3242
  "saturation",
@@ -3244,10 +3244,10 @@ const { ColorMatrixFilter: pt } = S, T = {
3244
3244
  "sepia",
3245
3245
  "negative"
3246
3246
  ]);
3247
- function mt(s) {
3248
- return ft.has(s);
3247
+ function gt(s) {
3248
+ return mt.has(s);
3249
3249
  }
3250
- function Y(s, e) {
3250
+ function L(s, e) {
3251
3251
  if (typeof s == "number" && Number.isFinite(s))
3252
3252
  return s;
3253
3253
  if (typeof s == "string") {
@@ -3257,7 +3257,7 @@ function Y(s, e) {
3257
3257
  }
3258
3258
  return e;
3259
3259
  }
3260
- function fe(s, e) {
3260
+ function ye(s, e) {
3261
3261
  if (typeof s == "boolean")
3262
3262
  return s;
3263
3263
  if (typeof s == "string") {
@@ -3268,17 +3268,17 @@ function fe(s, e) {
3268
3268
  }
3269
3269
  return e;
3270
3270
  }
3271
- function gt(s) {
3271
+ function bt(s) {
3272
3272
  return {
3273
- brightness: Y(s.brightness, T.brightness),
3274
- contrast: Y(s.contrast, T.contrast),
3275
- saturation: Y(s.saturation, T.saturation),
3276
- hue: Y(s.hue, T.hue),
3277
- sepia: Y(s.sepia, T.sepia),
3278
- negative: fe(s.negative, T.negative)
3273
+ brightness: L(s.brightness, E.brightness),
3274
+ contrast: L(s.contrast, E.contrast),
3275
+ saturation: L(s.saturation, E.saturation),
3276
+ hue: L(s.hue, E.hue),
3277
+ sepia: L(s.sepia, E.sepia),
3278
+ negative: ye(s.negative, E.negative)
3279
3279
  };
3280
3280
  }
3281
- function ie(s, e) {
3281
+ function oe(s, e) {
3282
3282
  s.reset(), e.brightness !== 1 && s.brightness(e.brightness, !0), e.contrast !== 1 && s.contrast(e.contrast, !0), e.saturation !== 1 && s.saturate(e.saturation, !0), e.hue !== 0 && s.hue(e.hue, !0), e.sepia > 0 && s.sepia(!0), e.negative && s.negative(!0);
3283
3283
  }
3284
3284
  f({
@@ -3289,19 +3289,19 @@ f({
3289
3289
  // Create an instance of the ColorMatrixFilter with the provided parameters
3290
3290
  createFilter: (s) => {
3291
3291
  try {
3292
- const e = gt(s ?? {}), t = new pt(), i = t;
3293
- return i._customParams = { ...e }, ie(t, e), i.updateUIParam = function(a, o) {
3292
+ const e = bt(s ?? {}), t = new ft(), i = t;
3293
+ return i._customParams = { ...e }, oe(t, e), i.updateUIParam = function(a, o) {
3294
3294
  try {
3295
- if (!mt(a))
3295
+ if (!gt(a))
3296
3296
  return;
3297
- const n = this._customParams ?? { ...T };
3297
+ const n = this._customParams ?? { ...E };
3298
3298
  if (a === "negative")
3299
- n.negative = fe(o, n.negative);
3299
+ n.negative = ye(o, n.negative);
3300
3300
  else {
3301
3301
  const l = a;
3302
- n[l] = Y(o, n[l]);
3302
+ n[l] = L(o, n[l]);
3303
3303
  }
3304
- this._customParams = n, ie(this, n);
3304
+ this._customParams = n, oe(this, n);
3305
3305
  } catch {
3306
3306
  }
3307
3307
  }, t;
@@ -3387,7 +3387,7 @@ f({
3387
3387
  // Create an instance of the ColorMatrixFilter with alpha adjustment
3388
3388
  createFilter: (s) => {
3389
3389
  try {
3390
- const e = s.alpha !== void 0 ? s.alpha : 1, t = new S.ColorMatrixFilter();
3390
+ const e = s.alpha !== void 0 ? s.alpha : 1, t = new w.ColorMatrixFilter();
3391
3391
  return t.alpha = e, t._customParams = {
3392
3392
  alpha: e
3393
3393
  }, t.updateUIParam = function(i, r) {
@@ -3434,7 +3434,7 @@ f({
3434
3434
  */
3435
3435
  createFilter: (s) => {
3436
3436
  try {
3437
- const e = new S.BlurFilter({
3437
+ const e = new w.BlurFilter({
3438
3438
  strength: s.blur || 8,
3439
3439
  quality: s.quality || 4
3440
3440
  });
@@ -3493,7 +3493,7 @@ f({
3493
3493
  description: "Advanced color adjustments including sepia, hue rotation, and more",
3494
3494
  // Create an instance of the ColorMatrixFilter with the provided parameters
3495
3495
  createFilter: (s) => {
3496
- const e = S.ColorMatrixFilter;
3496
+ const e = w.ColorMatrixFilter;
3497
3497
  if (!e)
3498
3498
  return null;
3499
3499
  const t = new e();
@@ -3573,7 +3573,7 @@ f({
3573
3573
  }
3574
3574
  ]
3575
3575
  });
3576
- const { ColorOverlayFilter: bt } = b;
3576
+ const { ColorOverlayFilter: yt } = b;
3577
3577
  f({
3578
3578
  id: "colorOverlay",
3579
3579
  name: "Color Overlay",
@@ -3588,7 +3588,7 @@ f({
3588
3588
  try {
3589
3589
  let e = 16711680;
3590
3590
  s.color && (typeof s.color == "string" ? e = parseInt(s.color.replace("#", "0x"), 16) : typeof s.color == "number" && (e = s.color));
3591
- const t = new bt({
3591
+ const t = new yt({
3592
3592
  color: e,
3593
3593
  alpha: s.alpha || 0.5
3594
3594
  });
@@ -3820,7 +3820,7 @@ f({
3820
3820
  }
3821
3821
  ]
3822
3822
  });
3823
- const { ColorMatrixFilter: yt } = S;
3823
+ const { ColorMatrixFilter: _t } = w;
3824
3824
  f({
3825
3825
  id: "grayscale",
3826
3826
  name: "Grayscale",
@@ -3833,14 +3833,14 @@ f({
3833
3833
  */
3834
3834
  createFilter: (s) => {
3835
3835
  try {
3836
- const e = new yt();
3836
+ const e = new _t();
3837
3837
  e._customParams = { ...s };
3838
3838
  const t = s.intensity !== void 0 ? s.intensity : 1;
3839
- return re(e, t), e.updateUIParam = function(i, r) {
3839
+ return ne(e, t), e.updateUIParam = function(i, r) {
3840
3840
  const a = this._customParams || {};
3841
3841
  switch (this._customParams = a, a[i] = r, i) {
3842
3842
  case "intensity":
3843
- re(this, r);
3843
+ ne(this, r);
3844
3844
  break;
3845
3845
  default:
3846
3846
  i in this && (this[i] = r);
@@ -3870,10 +3870,10 @@ f({
3870
3870
  }
3871
3871
  ]
3872
3872
  });
3873
- function re(s, e) {
3873
+ function ne(s, e) {
3874
3874
  s.reset(), s.greyscale(e);
3875
3875
  }
3876
- const { HslAdjustmentFilter: _t } = b;
3876
+ const { HslAdjustmentFilter: xt } = b;
3877
3877
  f({
3878
3878
  id: "hsl-adjustment",
3879
3879
  name: "HSL Adjustment",
@@ -3885,7 +3885,7 @@ f({
3885
3885
  */
3886
3886
  createFilter: (s) => {
3887
3887
  try {
3888
- const e = new _t({
3888
+ const e = new xt({
3889
3889
  hue: s.hue !== void 0 ? s.hue : 0,
3890
3890
  saturation: s.saturation !== void 0 ? s.saturation : 0,
3891
3891
  lightness: s.lightness !== void 0 ? s.lightness : 0,
@@ -3983,7 +3983,7 @@ f({
3983
3983
  }
3984
3984
  ]
3985
3985
  });
3986
- const { KawaseBlurFilter: xt } = b;
3986
+ const { KawaseBlurFilter: Ct } = b;
3987
3987
  f({
3988
3988
  id: "kawase-blur",
3989
3989
  name: "Kawase Blur",
@@ -3996,7 +3996,7 @@ f({
3996
3996
  */
3997
3997
  createFilter: (s) => {
3998
3998
  try {
3999
- const e = new xt({
3999
+ const e = new Ct({
4000
4000
  strength: s.strength || 4,
4001
4001
  quality: s.quality || 3,
4002
4002
  clamp: s.clamp || !1,
@@ -4101,7 +4101,7 @@ f({
4101
4101
  }
4102
4102
  ]
4103
4103
  });
4104
- const { MotionBlurFilter: Ct } = b;
4104
+ const { MotionBlurFilter: wt } = b;
4105
4105
  f({
4106
4106
  id: "motion-blur",
4107
4107
  name: "Motion Blur",
@@ -4114,7 +4114,7 @@ f({
4114
4114
  */
4115
4115
  createFilter: (s) => {
4116
4116
  try {
4117
- const e = new Ct({
4117
+ const e = new wt({
4118
4118
  velocity: {
4119
4119
  x: s.velocityX !== void 0 ? s.velocityX : 0,
4120
4120
  y: s.velocityY !== void 0 ? s.velocityY : 0
@@ -4209,7 +4209,7 @@ f({
4209
4209
  }
4210
4210
  ]
4211
4211
  });
4212
- const { RadialBlurFilter: wt } = b;
4212
+ const { RadialBlurFilter: St } = b;
4213
4213
  f({
4214
4214
  id: "radial-blur",
4215
4215
  name: "Radial Blur",
@@ -4218,7 +4218,7 @@ f({
4218
4218
  // Create an instance of the RadialBlurFilter with the provided parameters
4219
4219
  createFilter: (s) => {
4220
4220
  try {
4221
- const e = new wt({
4221
+ const e = new St({
4222
4222
  angle: s.angle ?? 20,
4223
4223
  center: { x: s.centerX ?? 0, y: s.centerY ?? 0 },
4224
4224
  kernelSize: s.kernelSize ?? 15,
@@ -4333,7 +4333,7 @@ f({
4333
4333
  }
4334
4334
  ]
4335
4335
  });
4336
- const { TiltShiftFilter: St } = b;
4336
+ const { TiltShiftFilter: vt } = b;
4337
4337
  f({
4338
4338
  id: "tilt-shift",
4339
4339
  name: "Tilt Shift",
@@ -4342,7 +4342,7 @@ f({
4342
4342
  // Create an instance of the TiltShiftFilter with the provided parameters
4343
4343
  createFilter: (s) => {
4344
4344
  try {
4345
- const e = typeof s.blur == "number" ? s.blur : 100, t = typeof s.gradientBlur == "number" ? s.gradientBlur : 600, i = typeof s.startX == "number" ? s.startX : 0, r = typeof s.startY == "number" ? s.startY : 0.5, a = typeof s.endX == "number" ? s.endX : 1, o = typeof s.endY == "number" ? s.endY : 0.5, n = new St({
4345
+ const e = typeof s.blur == "number" ? s.blur : 100, t = typeof s.gradientBlur == "number" ? s.gradientBlur : 600, i = typeof s.startX == "number" ? s.startX : 0, r = typeof s.startY == "number" ? s.startY : 0.5, a = typeof s.endX == "number" ? s.endX : 1, o = typeof s.endY == "number" ? s.endY : 0.5, n = new vt({
4346
4346
  blur: Number(e),
4347
4347
  gradientBlur: Number(t),
4348
4348
  start: { x: Number(i), y: Number(r) },
@@ -4461,7 +4461,7 @@ f({
4461
4461
  }
4462
4462
  ]
4463
4463
  });
4464
- const { ZoomBlurFilter: vt } = b;
4464
+ const { ZoomBlurFilter: kt } = b;
4465
4465
  f({
4466
4466
  id: "zoom-blur",
4467
4467
  name: "Zoom Blur",
@@ -4474,7 +4474,7 @@ f({
4474
4474
  */
4475
4475
  createFilter: (s) => {
4476
4476
  try {
4477
- const e = new vt({
4477
+ const e = new kt({
4478
4478
  strength: s.strength || 0.1,
4479
4479
  center: {
4480
4480
  x: s.centerX !== void 0 ? s.centerX : 0.5,
@@ -4588,7 +4588,7 @@ f({
4588
4588
  }
4589
4589
  ]
4590
4590
  });
4591
- const { ColorGradientFilter: se } = b;
4591
+ const { ColorGradientFilter: le } = b;
4592
4592
  f({
4593
4593
  id: "color-gradient",
4594
4594
  name: "Color Gradient",
@@ -4612,7 +4612,7 @@ f({
4612
4612
  { offset: 0, color: 16711680, alpha: 1 },
4613
4613
  { offset: 1, color: 255, alpha: 1 }
4614
4614
  ]), e.sort((i, r) => i.offset - r.offset);
4615
- const t = new se({
4615
+ const t = new le({
4616
4616
  type: s.gradientType,
4617
4617
  // 0: linear, 1: radial, 2: conic
4618
4618
  stops: e,
@@ -4702,7 +4702,7 @@ f({
4702
4702
  case "cssGradient":
4703
4703
  if (r && typeof r == "string" && r.trim() !== "")
4704
4704
  try {
4705
- const h = new se({ css: r });
4705
+ const h = new le({ css: r });
4706
4706
  this.type = h.type, this.angle = h.angle, this.stops = [...h.stops], a.colorStops = this.stops.map((p) => ({
4707
4707
  offset: p.offset,
4708
4708
  color: typeof p.color == "number" ? "#" + p.color.toString(16).padStart(6, "0") : p.color,
@@ -4725,9 +4725,9 @@ f({
4725
4725
  if (/colorStops\[\d+\]\..*/.test(i)) {
4726
4726
  const h = i.match(/colorStops\[(\d+)\]\.(.*)/);
4727
4727
  if (h) {
4728
- const [p, m, x] = h, g = parseInt(m), y = [...this.stops];
4728
+ const [p, m, _] = h, g = parseInt(m), y = [...this.stops];
4729
4729
  if (g >= 0 && g < y.length)
4730
- return x === "color" && typeof r == "string" ? y[g].color = parseInt(r.replace("#", "0x")) : (x === "offset" || x === "alpha") && (y[g][x] = r), this.stops = y, this.stops.sort((P, _) => P.offset - _.offset), a.colorStops = this.getColorStopsForUI(), !0;
4730
+ return _ === "color" && typeof r == "string" ? y[g].color = parseInt(r.replace("#", "0x")) : (_ === "offset" || _ === "alpha") && (y[g][_] = r), this.stops = y, this.stops.sort((v, x) => v.offset - x.offset), a.colorStops = this.getColorStopsForUI(), !0;
4731
4731
  }
4732
4732
  } else i in this && (this[i] = r);
4733
4733
  break;
@@ -4844,7 +4844,7 @@ f({
4844
4844
  if (!e)
4845
4845
  return null;
4846
4846
  let t = null;
4847
- s.texturePath ? t = S.Texture.from(s.texturePath) : t = S.Texture.from("/examples/filters-main/examples/images/colormap.png");
4847
+ s.texturePath ? t = w.Texture.from(s.texturePath) : t = w.Texture.from("/examples/filters-main/examples/images/colormap.png");
4848
4848
  const i = new e({
4849
4849
  colorMap: t,
4850
4850
  nearest: s.nearest,
@@ -4854,7 +4854,7 @@ f({
4854
4854
  const o = this._customParams || {};
4855
4855
  switch (this._customParams = o, o[r] = a, r) {
4856
4856
  case "texturePath":
4857
- a && (this.colorMap = S.Texture.from(a));
4857
+ a && (this.colorMap = w.Texture.from(a));
4858
4858
  break;
4859
4859
  case "mix":
4860
4860
  this.mix = a;
@@ -4915,7 +4915,7 @@ f({
4915
4915
  }
4916
4916
  ]
4917
4917
  });
4918
- const kt = b.ColorReplaceFilter;
4918
+ const Pt = b.ColorReplaceFilter;
4919
4919
  f({
4920
4920
  id: "color-replace",
4921
4921
  name: "Color Replace",
@@ -4932,7 +4932,7 @@ f({
4932
4932
  s.originalColor && (typeof s.originalColor == "string" ? e = parseInt(s.originalColor.replace("#", "0x"), 16) : typeof s.originalColor == "number" && (e = s.originalColor));
4933
4933
  let t = 255;
4934
4934
  s.targetColor && (typeof s.targetColor == "string" ? t = parseInt(s.targetColor.replace("#", "0x"), 16) : typeof s.targetColor == "number" && (t = s.targetColor));
4935
- const i = new kt({
4935
+ const i = new Pt({
4936
4936
  originalColor: e,
4937
4937
  targetColor: t,
4938
4938
  tolerance: s.tolerance || 0.4
@@ -4996,7 +4996,7 @@ f({
4996
4996
  }
4997
4997
  ]
4998
4998
  });
4999
- const Pt = b.MultiColorReplaceFilter;
4999
+ const Mt = b.MultiColorReplaceFilter;
5000
5000
  f({
5001
5001
  id: "multi-color-replace",
5002
5002
  name: "Multi-Color Replace",
@@ -5022,7 +5022,7 @@ f({
5022
5022
  const i = typeof s.originalColor3 == "string" ? parseInt(s.originalColor3.replace("#", "0x"), 16) : s.originalColor3, r = typeof s.targetColor3 == "string" ? parseInt(s.targetColor3.replace("#", "0x"), 16) : s.targetColor3;
5023
5023
  e.push([i, r]);
5024
5024
  }
5025
- const t = new Pt(
5025
+ const t = new Mt(
5026
5026
  e,
5027
5027
  s.tolerance || 0.05,
5028
5028
  3
@@ -5133,7 +5133,7 @@ f({
5133
5133
  }
5134
5134
  ]
5135
5135
  });
5136
- const { RGBSplitFilter: Mt } = b;
5136
+ const { RGBSplitFilter: Ft } = b;
5137
5137
  f({
5138
5138
  id: "rgb-split",
5139
5139
  name: "RGB Split",
@@ -5154,7 +5154,7 @@ f({
5154
5154
  }, i = {
5155
5155
  x: s.blueX !== void 0 ? s.blueX : 0,
5156
5156
  y: s.blueY !== void 0 ? s.blueY : 0
5157
- }, r = new Mt({
5157
+ }, r = new Ft({
5158
5158
  red: e,
5159
5159
  green: t,
5160
5160
  blue: i
@@ -5267,7 +5267,7 @@ f({
5267
5267
  }
5268
5268
  ]
5269
5269
  });
5270
- const { AdvancedBloomFilter: Ft } = b;
5270
+ const { AdvancedBloomFilter: At } = b;
5271
5271
  f({
5272
5272
  id: "advanced-bloom",
5273
5273
  name: "Advanced Bloom",
@@ -5276,7 +5276,7 @@ f({
5276
5276
  // Create an instance of the AdvancedBloomFilter with the provided parameters
5277
5277
  createFilter: (s) => {
5278
5278
  try {
5279
- const e = new Ft({
5279
+ const e = new At({
5280
5280
  threshold: s.threshold || 0.5,
5281
5281
  bloomScale: s.bloomScale || 1,
5282
5282
  brightness: s.brightness || 1,
@@ -5423,7 +5423,7 @@ f({
5423
5423
  }
5424
5424
  ]
5425
5425
  });
5426
- const At = b.AsciiFilter;
5426
+ const zt = b.AsciiFilter;
5427
5427
  f({
5428
5428
  id: "ascii",
5429
5429
  name: "ASCII",
@@ -5435,7 +5435,7 @@ f({
5435
5435
  const e = typeof s.size == "number" ? s.size : 8;
5436
5436
  let t = s.color;
5437
5437
  typeof t == "string" && t.startsWith("#") && (t = parseInt(t.replace("#", "0x"), 16));
5438
- const i = s.replaceColor === !0, r = new At({
5438
+ const i = s.replaceColor === !0, r = new zt({
5439
5439
  size: e,
5440
5440
  color: t,
5441
5441
  replaceColor: i
@@ -5502,7 +5502,7 @@ f({
5502
5502
  }
5503
5503
  ]
5504
5504
  });
5505
- const zt = b.BackdropBlurFilter;
5505
+ const Rt = b.BackdropBlurFilter;
5506
5506
  f({
5507
5507
  id: "backdrop-blur",
5508
5508
  name: "Backdrop Blur",
@@ -5511,7 +5511,7 @@ f({
5511
5511
  // Create an instance of the BackdropBlurFilter with the provided parameters
5512
5512
  createFilter: (s) => {
5513
5513
  try {
5514
- const e = new zt({
5514
+ const e = new Rt({
5515
5515
  // Higher strength values (20-50) make the effect more noticeable
5516
5516
  strength: s.strength || 20,
5517
5517
  quality: s.quality || 4,
@@ -5609,7 +5609,7 @@ f({
5609
5609
  }
5610
5610
  ]
5611
5611
  });
5612
- const { BevelFilter: Rt } = b;
5612
+ const { BevelFilter: Nt } = b;
5613
5613
  f({
5614
5614
  id: "bevel",
5615
5615
  name: "Bevel",
@@ -5621,7 +5621,7 @@ f({
5621
5621
  */
5622
5622
  createFilter: (s) => {
5623
5623
  try {
5624
- const e = s.lightColor ? s.lightColor.replace("#", "0x") : "0xffffff", t = s.shadowColor ? s.shadowColor.replace("#", "0x") : "0x000000", i = new Rt({
5624
+ const e = s.lightColor ? s.lightColor.replace("#", "0x") : "0xffffff", t = s.shadowColor ? s.shadowColor.replace("#", "0x") : "0x000000", i = new Nt({
5625
5625
  rotation: s.rotation !== void 0 ? s.rotation : 45,
5626
5626
  thickness: s.thickness !== void 0 ? s.thickness : 2,
5627
5627
  lightColor: parseInt(e, 16),
@@ -5737,7 +5737,7 @@ f({
5737
5737
  }
5738
5738
  ]
5739
5739
  });
5740
- const { BloomFilter: Nt } = b;
5740
+ const { BloomFilter: Tt } = b;
5741
5741
  f({
5742
5742
  id: "bloom",
5743
5743
  name: "Bloom/Glow",
@@ -5746,7 +5746,7 @@ f({
5746
5746
  // Create an instance of the BloomFilter with the provided parameters
5747
5747
  createFilter: (s) => {
5748
5748
  try {
5749
- const e = typeof s.strengthX == "number" ? s.strengthX : 2, t = typeof s.strengthY == "number" ? s.strengthY : 2, i = typeof s.quality == "number" ? s.quality : 4, r = typeof s.resolution == "number" ? s.resolution : 1, a = typeof s.kernelSize == "number" ? s.kernelSize : 5, o = new Nt({
5749
+ const e = typeof s.strengthX == "number" ? s.strengthX : 2, t = typeof s.strengthY == "number" ? s.strengthY : 2, i = typeof s.quality == "number" ? s.quality : 4, r = typeof s.resolution == "number" ? s.resolution : 1, a = typeof s.kernelSize == "number" ? s.kernelSize : 5, o = new Tt({
5750
5750
  strength: {
5751
5751
  x: Number(e),
5752
5752
  y: Number(t)
@@ -5849,7 +5849,7 @@ f({
5849
5849
  }
5850
5850
  ]
5851
5851
  });
5852
- const { BulgePinchFilter: Tt } = b;
5852
+ const { BulgePinchFilter: It } = b;
5853
5853
  f({
5854
5854
  id: "bulge-pinch",
5855
5855
  // ID must match what the application expects
@@ -5859,7 +5859,7 @@ f({
5859
5859
  // Create an instance of the BulgePinchFilter with the provided parameters
5860
5860
  createFilter: (s) => {
5861
5861
  try {
5862
- const e = s.centerX ?? 0.5, t = s.centerY ?? 0.5, i = s.radius ?? 100, r = s.strength ?? 1, a = new Tt({
5862
+ const e = s.centerX ?? 0.5, t = s.centerY ?? 0.5, i = s.radius ?? 100, r = s.strength ?? 1, a = new It({
5863
5863
  center: {
5864
5864
  x: e,
5865
5865
  y: t
@@ -5941,7 +5941,7 @@ f({
5941
5941
  }
5942
5942
  ]
5943
5943
  });
5944
- const { ConvolutionFilter: It } = b, X = {
5944
+ const { ConvolutionFilter: Et } = b, O = {
5945
5945
  normal: [0, 0, 0, 0, 1, 0, 0, 0, 0],
5946
5946
  gaussianBlur: [0.045, 0.122, 0.045, 0.122, 0.332, 0.122, 0.045, 0.122, 0.045],
5947
5947
  boxBlur: [1 / 9, 1 / 9, 1 / 9, 1 / 9, 1 / 9, 1 / 9, 1 / 9, 1 / 9, 1 / 9],
@@ -5974,16 +5974,16 @@ f({
5974
5974
  ];
5975
5975
  else {
5976
5976
  const i = s.preset;
5977
- e = X[i] || X.normal;
5977
+ e = O[i] || O.normal;
5978
5978
  }
5979
- const t = new It(e, s.width || 200, s.height || 200);
5979
+ const t = new Et(e, s.width || 200, s.height || 200);
5980
5980
  return t._customParams = { ...s }, t.updateUIParam = function(i, r) {
5981
5981
  const a = this._customParams || {};
5982
5982
  switch (this._customParams = a, a[i] = r, i) {
5983
5983
  case "preset":
5984
5984
  if (!a.customMatrix) {
5985
5985
  const o = r;
5986
- X[o] && (this.matrix = X[o]);
5986
+ O[o] && (this.matrix = O[o]);
5987
5987
  }
5988
5988
  break;
5989
5989
  case "customMatrix":
@@ -5992,7 +5992,7 @@ f({
5992
5992
  a.m00 = o[0], a.m01 = o[1], a.m02 = o[2], a.m10 = o[3], a.m11 = o[4], a.m12 = o[5], a.m20 = o[6], a.m21 = o[7], a.m22 = o[8];
5993
5993
  } else {
5994
5994
  const o = a.preset;
5995
- this.matrix = X[o] || X.normal;
5995
+ this.matrix = O[o] || O.normal;
5996
5996
  }
5997
5997
  break;
5998
5998
  case "m00":
@@ -6187,7 +6187,7 @@ f({
6187
6187
  }
6188
6188
  ]
6189
6189
  });
6190
- const { CrossHatchFilter: Et } = b;
6190
+ const { CrossHatchFilter: Xt } = b;
6191
6191
  f({
6192
6192
  id: "cross-hatch",
6193
6193
  name: "Cross Hatch",
@@ -6197,7 +6197,7 @@ f({
6197
6197
  // Note: CrossHatchFilter has NO parameters according to PixiJS examples
6198
6198
  createFilter: (s) => {
6199
6199
  try {
6200
- const e = new Et();
6200
+ const e = new Xt();
6201
6201
  return e.updateUIParam = function(t, i) {
6202
6202
  return !0;
6203
6203
  }, e;
@@ -6394,7 +6394,7 @@ f({
6394
6394
  }
6395
6395
  ]
6396
6396
  });
6397
- const Xt = S.DisplacementFilter, Yt = S.Sprite, $ = S.Texture;
6397
+ const Yt = w.DisplacementFilter, Bt = w.Sprite, K = w.Texture;
6398
6398
  f({
6399
6399
  id: "displacement",
6400
6400
  // ID must match what the application expects
@@ -6407,7 +6407,7 @@ f({
6407
6407
  const e = s.mapTexture || "/assets/images/displacement_map.png";
6408
6408
  let t;
6409
6409
  try {
6410
- t = $.from(e), t.source.addressMode = "repeat";
6410
+ t = K.from(e), t.source.addressMode = "repeat";
6411
6411
  } catch {
6412
6412
  const o = document.createElement("canvas");
6413
6413
  o.width = 256, o.height = 256;
@@ -6418,9 +6418,9 @@ f({
6418
6418
  for (let c = 0; c < 10; c++)
6419
6419
  (l + c) % 2 === 0 && n.fillRect(l * 25, c * 25, 25, 25);
6420
6420
  }
6421
- t = $.from(o);
6421
+ t = K.from(o);
6422
6422
  }
6423
- const i = new Yt(t), r = new Xt(i, s.scale || 50);
6423
+ const i = new Bt(t), r = new Yt(i, s.scale || 50);
6424
6424
  return r.scale.x = s.scaleX || 50, r.scale.y = s.scaleY || 50, r._customParams = { ...s }, r._displacementSprite = i, r.updateUIParam = function(a, o) {
6425
6425
  const n = this._customParams || {};
6426
6426
  switch (this._customParams = n, n[a] = o, a) {
@@ -6434,7 +6434,7 @@ f({
6434
6434
  try {
6435
6435
  const l = this._displacementSprite;
6436
6436
  if (l) {
6437
- const c = $.from(o);
6437
+ const c = K.from(o);
6438
6438
  c.source.addressMode = "repeat", l.texture = c;
6439
6439
  }
6440
6440
  } catch {
@@ -6567,7 +6567,7 @@ f({
6567
6567
  }
6568
6568
  ]
6569
6569
  });
6570
- const { EmbossFilter: Bt } = b;
6570
+ const { EmbossFilter: Ot } = b;
6571
6571
  f({
6572
6572
  id: "emboss",
6573
6573
  name: "Emboss",
@@ -6576,7 +6576,7 @@ f({
6576
6576
  // Create an instance of the Emboss filter with the provided parameters
6577
6577
  createFilter: (s) => {
6578
6578
  try {
6579
- const e = typeof s.strength == "number" ? s.strength : 5, t = new Bt(e);
6579
+ const e = typeof s.strength == "number" ? s.strength : 5, t = new Ot(e);
6580
6580
  return t._customParams = {
6581
6581
  strength: e
6582
6582
  }, t.updateUIParam = function(i, r) {
@@ -6616,7 +6616,7 @@ f({
6616
6616
  }
6617
6617
  ]
6618
6618
  });
6619
- const { GlitchFilter: Ot } = b, N = {
6619
+ const { GlitchFilter: Lt } = b, I = {
6620
6620
  TRANSPARENT: 0,
6621
6621
  ORIGINAL: 1,
6622
6622
  LOOP: 2,
@@ -6630,7 +6630,7 @@ f({
6630
6630
  description: "Apply digital distortion and glitch effects",
6631
6631
  createFilter: (s) => {
6632
6632
  try {
6633
- const e = { x: s.redX, y: s.redY }, t = { x: s.greenX, y: s.greenY }, i = { x: s.blueX, y: s.blueY }, r = new Ot({
6633
+ const e = { x: s.redX, y: s.redY }, t = { x: s.greenX, y: s.greenY }, i = { x: s.blueX, y: s.blueY }, r = new Lt({
6634
6634
  slices: s.slices,
6635
6635
  offset: s.offset,
6636
6636
  direction: s.direction,
@@ -6708,7 +6708,7 @@ f({
6708
6708
  slices: 10,
6709
6709
  offset: 100,
6710
6710
  direction: 0,
6711
- fillMode: N.LOOP,
6711
+ fillMode: I.LOOP,
6712
6712
  // LOOP mode looks better for the demo
6713
6713
  seed: 0.5,
6714
6714
  average: !1,
@@ -6771,13 +6771,13 @@ f({
6771
6771
  label: "Fill Mode",
6772
6772
  property: "fillMode",
6773
6773
  options: [
6774
- { value: N.TRANSPARENT, label: "Transparent" },
6775
- { value: N.ORIGINAL, label: "Original" },
6776
- { value: N.LOOP, label: "Loop" },
6777
- { value: N.CLAMP, label: "Clamp" },
6778
- { value: N.MIRROR, label: "Mirror" }
6774
+ { value: I.TRANSPARENT, label: "Transparent" },
6775
+ { value: I.ORIGINAL, label: "Original" },
6776
+ { value: I.LOOP, label: "Loop" },
6777
+ { value: I.CLAMP, label: "Clamp" },
6778
+ { value: I.MIRROR, label: "Mirror" }
6779
6779
  ],
6780
- default: N.LOOP
6780
+ default: I.LOOP
6781
6781
  },
6782
6782
  {
6783
6783
  id: "seed",
@@ -6871,7 +6871,7 @@ f({
6871
6871
  }
6872
6872
  ]
6873
6873
  });
6874
- const { GlowFilter: Lt } = b;
6874
+ const { GlowFilter: Dt } = b;
6875
6875
  f({
6876
6876
  id: "glow",
6877
6877
  name: "Glow",
@@ -6880,7 +6880,7 @@ f({
6880
6880
  // Create an instance of the GlowFilter with the provided parameters
6881
6881
  createFilter: (s) => {
6882
6882
  try {
6883
- const e = parseInt(s.color.replace("#", "0x"), 16), t = new Lt({
6883
+ const e = parseInt(s.color.replace("#", "0x"), 16), t = new Dt({
6884
6884
  distance: s.distance || 10,
6885
6885
  outerStrength: s.outerStrength || 4,
6886
6886
  innerStrength: s.innerStrength || 0,
@@ -7006,7 +7006,7 @@ f({
7006
7006
  }
7007
7007
  ]
7008
7008
  });
7009
- const { GodrayFilter: Dt } = b;
7009
+ const { GodrayFilter: Ut } = b;
7010
7010
  f({
7011
7011
  id: "godray",
7012
7012
  name: "Godray",
@@ -7015,7 +7015,7 @@ f({
7015
7015
  // Create an instance of the GodrayFilter with the provided parameters
7016
7016
  createFilter: (s) => {
7017
7017
  try {
7018
- const e = new Dt({
7018
+ const e = new Ut({
7019
7019
  angle: s.angle || 30,
7020
7020
  parallel: s.parallel ?? !0,
7021
7021
  center: {
@@ -7168,7 +7168,7 @@ f({
7168
7168
  }
7169
7169
  ]
7170
7170
  });
7171
- const Ut = b.SimpleLightmapFilter, ae = S.Texture;
7171
+ const Vt = b.SimpleLightmapFilter, ce = w.Texture;
7172
7172
  f({
7173
7173
  id: "lightmap",
7174
7174
  name: "Lightmap",
@@ -7193,14 +7193,14 @@ f({
7193
7193
  const c = a.createRadialGradient(128, 128, 10, 128, 128, 160);
7194
7194
  c.addColorStop(0, "white"), c.addColorStop(0.3, "rgba(220, 220, 220, 1)"), c.addColorStop(0.6, "rgba(150, 150, 150, 1)"), c.addColorStop(1, "black"), a.fillStyle = c, a.fillRect(0, 0, 256, 256);
7195
7195
  }
7196
- const o = ae.from(r);
7196
+ const o = ce.from(r);
7197
7197
  let n;
7198
7198
  try {
7199
7199
  typeof t == "string" && t.startsWith("#") ? n = parseInt(t.replace("#", "0x"), 16) : n = 0;
7200
7200
  } catch {
7201
7201
  n = 0;
7202
7202
  }
7203
- const l = new Ut(o, n, i);
7203
+ const l = new Vt(o, n, i);
7204
7204
  return l._customParams = {
7205
7205
  textureType: e,
7206
7206
  color: t,
@@ -7226,8 +7226,8 @@ f({
7226
7226
  const g = m.createRadialGradient(128, 128, 10, 128, 128, 160);
7227
7227
  g.addColorStop(0, "white"), g.addColorStop(0.3, "rgba(220, 220, 220, 1)"), g.addColorStop(0.6, "rgba(150, 150, 150, 1)"), g.addColorStop(1, "black"), m.fillStyle = g, m.fillRect(0, 0, 256, 256);
7228
7228
  }
7229
- const x = ae.from(p);
7230
- if (this.lightMap = x, this.enabled !== void 0) {
7229
+ const _ = ce.from(p);
7230
+ if (this.lightMap = _, this.enabled !== void 0) {
7231
7231
  const g = this.enabled;
7232
7232
  this.enabled = !1, setTimeout(() => {
7233
7233
  this.enabled = g;
@@ -7299,7 +7299,7 @@ f({
7299
7299
  }
7300
7300
  ]
7301
7301
  });
7302
- const { NoiseFilter: Vt } = S;
7302
+ const { NoiseFilter: jt } = w;
7303
7303
  f({
7304
7304
  id: "noise",
7305
7305
  name: "Noise",
@@ -7307,7 +7307,7 @@ f({
7307
7307
  description: "Add random noise to the image",
7308
7308
  createFilter: (s) => {
7309
7309
  try {
7310
- const e = new Vt({
7310
+ const e = new jt({
7311
7311
  noise: s.noise || 0.5,
7312
7312
  seed: s.seed || Math.random()
7313
7313
  });
@@ -7384,7 +7384,7 @@ f({
7384
7384
  }
7385
7385
  ]
7386
7386
  });
7387
- const { OldFilmFilter: jt } = b;
7387
+ const { OldFilmFilter: qt } = b;
7388
7388
  f({
7389
7389
  id: "old-film",
7390
7390
  name: "Old Film",
@@ -7392,7 +7392,7 @@ f({
7392
7392
  description: "Apply a vintage film effect with scratches and grain",
7393
7393
  createFilter: (s) => {
7394
7394
  try {
7395
- const e = new jt({
7395
+ const e = new qt({
7396
7396
  sepia: s.sepia,
7397
7397
  noise: s.noise,
7398
7398
  noiseSize: s.noiseSize,
@@ -7573,7 +7573,7 @@ f({
7573
7573
  }
7574
7574
  ]
7575
7575
  });
7576
- const { OutlineFilter: qt } = b;
7576
+ const { OutlineFilter: Ht } = b;
7577
7577
  f({
7578
7578
  id: "outline",
7579
7579
  name: "Outline",
@@ -7583,7 +7583,7 @@ f({
7583
7583
  try {
7584
7584
  let e = s.color;
7585
7585
  typeof e == "string" && (e = parseInt(e.replace("#", "0x"), 16));
7586
- const t = new qt({
7586
+ const t = new Ht({
7587
7587
  thickness: s.thickness || 4,
7588
7588
  color: e,
7589
7589
  alpha: s.alpha || 1,
@@ -7673,7 +7673,7 @@ f({
7673
7673
  }
7674
7674
  ]
7675
7675
  });
7676
- const { PixelateFilter: Ht } = b;
7676
+ const { PixelateFilter: $t } = b;
7677
7677
  f({
7678
7678
  id: "pixelate",
7679
7679
  name: "Pixelate",
@@ -7681,7 +7681,7 @@ f({
7681
7681
  description: "Create a pixelated or mosaic effect",
7682
7682
  createFilter: (s) => {
7683
7683
  try {
7684
- const e = new Ht(
7684
+ const e = new $t(
7685
7685
  s.useUniform ? Math.max(4, s.size || 10) : [Math.max(4, s.sizeX || 10), Math.max(4, s.sizeY || 10)]
7686
7686
  );
7687
7687
  return e._customParams = { ...s }, e.updateUIParam = function(t, i) {
@@ -7764,7 +7764,7 @@ f({
7764
7764
  }
7765
7765
  ]
7766
7766
  });
7767
- const { ReflectionFilter: $t } = b;
7767
+ const { ReflectionFilter: Wt } = b;
7768
7768
  f({
7769
7769
  id: "reflection",
7770
7770
  // ID must match what the application expects
@@ -7781,7 +7781,7 @@ f({
7781
7781
  waveLength: new Float32Array([s.wavelengthStart ?? 30, s.wavelengthEnd ?? 100]),
7782
7782
  alpha: new Float32Array([s.alphaStart ?? 1, s.alphaEnd ?? 1]),
7783
7783
  time: s.time ?? 0
7784
- }, t = new $t(e);
7784
+ }, t = new Wt(e);
7785
7785
  return t._customParams = { ...s }, t.animating = s.animating ?? !1, t.updateUIParam = function(i, r) {
7786
7786
  const a = this._customParams || {};
7787
7787
  switch (this._customParams = a, a[i] = r, i) {
@@ -7932,7 +7932,7 @@ f({
7932
7932
  }
7933
7933
  ]
7934
7934
  });
7935
- const { ShockwaveFilter: Wt } = b;
7935
+ const { ShockwaveFilter: Zt } = b;
7936
7936
  f({
7937
7937
  id: "shockwave",
7938
7938
  // ID must match what the application expects
@@ -7942,7 +7942,7 @@ f({
7942
7942
  // Create an instance of the ShockwaveFilter with the provided parameters
7943
7943
  createFilter: (s) => {
7944
7944
  try {
7945
- const e = s.centerX ?? 0.5, t = s.centerY ?? 0.5, i = { x: e, y: t }, r = s.amplitude ?? 30, a = s.wavelength ?? 160, o = s.speed ?? 500, n = s.brightness ?? 1, l = s.radius ?? -1, c = s.time ?? 0, d = new Wt({
7945
+ const e = s.centerX ?? 0.5, t = s.centerY ?? 0.5, i = { x: e, y: t }, r = s.amplitude ?? 30, a = s.wavelength ?? 160, o = s.speed ?? 500, n = s.brightness ?? 1, l = s.radius ?? -1, c = s.time ?? 0, d = new Zt({
7946
7946
  center: i,
7947
7947
  amplitude: r,
7948
7948
  wavelength: a,
@@ -8084,7 +8084,7 @@ f({
8084
8084
  }
8085
8085
  ]
8086
8086
  });
8087
- const { SimplexNoiseFilter: Zt } = b;
8087
+ const { SimplexNoiseFilter: Gt } = b;
8088
8088
  f({
8089
8089
  id: "simplex-noise",
8090
8090
  name: "Simplex Noise",
@@ -8092,7 +8092,7 @@ f({
8092
8092
  description: "Apply procedural noise to create texture effects",
8093
8093
  createFilter: (s) => {
8094
8094
  try {
8095
- const e = s.animating ? 0 : s.offsetZ || 0, t = new Zt({
8095
+ const e = s.animating ? 0 : s.offsetZ || 0, t = new Gt({
8096
8096
  strength: s.strength,
8097
8097
  noiseScale: s.noiseScale,
8098
8098
  offsetX: s.offsetX,
@@ -8239,9 +8239,9 @@ f({
8239
8239
  }
8240
8240
  ]
8241
8241
  });
8242
- class Gt extends S.Filter {
8242
+ class Kt extends w.Filter {
8243
8243
  constructor(e) {
8244
- const t = we.from({
8244
+ const t = Se.from({
8245
8245
  vertex: `
8246
8246
  attribute vec2 aPosition;
8247
8247
  varying vec2 vTextureCoord;
@@ -8350,7 +8350,7 @@ f({
8350
8350
  description: "Creates a twisting distortion effect around a central point",
8351
8351
  createFilter: (s) => {
8352
8352
  try {
8353
- const e = new Gt({
8353
+ const e = new Kt({
8354
8354
  centerX: s.centerX ?? 0.5,
8355
8355
  centerY: s.centerY ?? 0.5,
8356
8356
  radius: s.radius ?? 0.25,
@@ -8420,8 +8420,8 @@ f({
8420
8420
  }
8421
8421
  ]
8422
8422
  });
8423
- const { AdjustmentFilter: Kt } = b;
8424
- function D(s) {
8423
+ const { AdjustmentFilter: Qt } = b;
8424
+ function q(s) {
8425
8425
  const e = typeof s == "string" ? parseInt(s.replace("#", "0x"), 16) : s;
8426
8426
  return [
8427
8427
  (e >> 16 & 255) / 255,
@@ -8429,14 +8429,14 @@ function D(s) {
8429
8429
  (e & 255) / 255
8430
8430
  ];
8431
8431
  }
8432
- class Qt extends Kt {
8432
+ class Jt extends Qt {
8433
8433
  constructor(e = {}) {
8434
8434
  super({
8435
8435
  brightness: 1,
8436
8436
  contrast: 1,
8437
8437
  saturation: 1,
8438
8438
  alpha: 1
8439
- }), this._radius = 0.8, this._strength = 1, this._colorRgb = [0, 0, 0], this._colorValue = "#000000", this._radius = e.radius ?? 0.8, this._strength = e.strength ?? 1, e.color !== void 0 && (typeof e.color == "string" ? (this._colorValue = e.color, this._colorRgb = D(e.color)) : (this._colorValue = "#" + e.color.toString(16).padStart(6, "0"), this._colorRgb = D(e.color))), this.updateVignette();
8439
+ }), this._radius = 0.8, this._strength = 1, this._colorRgb = [0, 0, 0], this._colorValue = "#000000", this._radius = e.radius ?? 0.8, this._strength = e.strength ?? 1, e.color !== void 0 && (typeof e.color == "string" ? (this._colorValue = e.color, this._colorRgb = q(e.color)) : (this._colorValue = "#" + e.color.toString(16).padStart(6, "0"), this._colorRgb = q(e.color))), this.updateVignette();
8440
8440
  }
8441
8441
  /**
8442
8442
  * Updates the filter parameters to simulate a vignette effect
@@ -8462,7 +8462,7 @@ class Qt extends Kt {
8462
8462
  return this._colorValue;
8463
8463
  }
8464
8464
  set color(e) {
8465
- typeof e == "string" ? (this._colorValue = e, this._colorRgb = D(e)) : (this._colorValue = "#" + e.toString(16).padStart(6, "0"), this._colorRgb = D(e)), this.updateVignette();
8465
+ typeof e == "string" ? (this._colorValue = e, this._colorRgb = q(e)) : (this._colorValue = "#" + e.toString(16).padStart(6, "0"), this._colorRgb = q(e)), this.updateVignette();
8466
8466
  }
8467
8467
  }
8468
8468
  f({
@@ -8472,7 +8472,7 @@ f({
8472
8472
  description: "Add a classic darkened border effect to the image",
8473
8473
  createFilter: (s) => {
8474
8474
  try {
8475
- const e = new Qt({
8475
+ const e = new Jt({
8476
8476
  radius: s.radius || 0.8,
8477
8477
  strength: s.strength || 1,
8478
8478
  color: s.color || "#000000"
@@ -8540,18 +8540,18 @@ function ai(s) {
8540
8540
  try {
8541
8541
  let e = [], t = [];
8542
8542
  try {
8543
- e = U(), e.length === 0 && st();
8543
+ e = H(), e.length === 0 && at();
8544
8544
  } catch {
8545
8545
  }
8546
8546
  const i = s == null ? void 0 : s.disabled;
8547
8547
  if (Array.isArray(i) && i.length > 0) {
8548
8548
  let r = 0;
8549
8549
  for (const a of i)
8550
- nt(a) && r++;
8550
+ lt(a) && r++;
8551
8551
  r > 0;
8552
8552
  }
8553
8553
  try {
8554
- e = U(), t = ot();
8554
+ e = H(), t = nt();
8555
8555
  } catch {
8556
8556
  e || (e = []), t || (t = []);
8557
8557
  }
@@ -8562,15 +8562,15 @@ function ai(s) {
8562
8562
  }
8563
8563
  export {
8564
8564
  ii as V,
8565
- rt as a,
8566
- at as b,
8567
- ot as c,
8568
- st as d,
8565
+ st as a,
8566
+ ot as b,
8567
+ nt as c,
8568
+ at as d,
8569
8569
  si as e,
8570
- lt as f,
8571
- U as g,
8570
+ ct as f,
8571
+ H as g,
8572
8572
  ri as h,
8573
8573
  ai as i,
8574
8574
  f as r
8575
8575
  };
8576
- //# sourceMappingURL=editor-BQNym0-5.js.map
8576
+ //# sourceMappingURL=editor-COzKP3ld.js.map