@gendive/slide 0.1.4 → 0.1.5

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.
@@ -45,7 +45,7 @@ const k6 = [
45
45
  // 8: text color
46
46
  "#0f172a"
47
47
  // 9: darkest
48
- ], j7 = y6({
48
+ ], q7 = y6({
49
49
  /* @Todo vibecode - 기본 컬러 설정 */
50
50
  primaryColor: "devdive",
51
51
  colors: {
@@ -85,7 +85,7 @@ const k6 = [
85
85
  }
86
86
  }
87
87
  }
88
- }), q7 = {
88
+ }), K7 = {
89
89
  /* 색상 */
90
90
  primary: "#5B6EF7",
91
91
  bgMain: "#f4f4f5",
@@ -6645,10 +6645,17 @@ ${t.language === "ko" ? "한국어로 작성하세요." : "Write in English."}`,
6645
6645
  keyPoints: i(),
6646
6646
  keywords: o("키워드").split(",").map((c) => c.trim()).filter(Boolean)
6647
6647
  };
6648
- }, Mr = () => `el-${Date.now()}-${Math.random().toString(36).slice(2, 9)}`, ow = (t) => {
6648
+ }, Mr = () => `el-${Date.now()}-${Math.random().toString(36).slice(2, 9)}`, ow = (t, e) => {
6649
+ let n = 0;
6650
+ for (const o of t) {
6651
+ const i = /[가-힣ㄱ-ㅎㅏ-ㅣ]/.test(o);
6652
+ n += i ? e * 1 : e * 0.6;
6653
+ }
6654
+ return Math.ceil(n);
6655
+ }, sw = (t) => {
6649
6656
  const e = t.recommendedLayout.toLowerCase(), n = t.visualElements.toLowerCase(), o = ["image", "graph", "chart", "infographic", "diagram", "icon", "그래프", "차트", "이미지", "아이콘", "다이어그램"], i = e.includes("image") || e.includes("graph") || e.includes("chart"), c = o.some((d) => n.includes(d));
6650
6657
  return i || c;
6651
- }, sw = (t) => {
6658
+ }, lw = (t) => {
6652
6659
  const e = t.recommendedLayout.toLowerCase();
6653
6660
  return e.includes("image_left") || e.includes("left") ? "left" : e.includes("image_right") || e.includes("right") ? "right" : e.includes("bottom") || e.includes("graph") ? "bottom" : "right";
6654
6661
  }, N2 = (t, e, n, o, i, c = "이미지") => [
@@ -6701,7 +6708,7 @@ ${t.language === "ko" ? "한국어로 작성하세요." : "Write in English."}`,
6701
6708
  lineHeight: 1
6702
6709
  }
6703
6710
  ], P2 = (t, e = fs.devdive) => {
6704
- const n = [], o = t.sectionType === "cover" || t.sectionType === "closing", i = ow(t), c = i ? sw(t) : "none";
6711
+ const n = [], o = t.sectionType === "cover" || t.sectionType === "closing", i = sw(t), c = i ? lw(t) : "none";
6705
6712
  if (o)
6706
6713
  n.push({
6707
6714
  id: Mr(),
@@ -6906,14 +6913,14 @@ ${t.language === "ko" ? "한국어로 작성하세요." : "Write in English."}`,
6906
6913
  x = 480;
6907
6914
  let S = d;
6908
6915
  t.keywords.forEach((w) => {
6909
- const E = w.length * 12 + 24;
6916
+ const E = `#${w}`, R = ow(E, 12) + 24;
6910
6917
  n.push({
6911
6918
  id: Mr(),
6912
6919
  type: "shape",
6913
6920
  shapeType: "rect",
6914
6921
  x: S,
6915
6922
  y: x,
6916
- width: E,
6923
+ width: R,
6917
6924
  height: 28,
6918
6925
  rotation: 0,
6919
6926
  fill: e.primary + "15",
@@ -6926,7 +6933,7 @@ ${t.language === "ko" ? "한국어로 작성하세요." : "Write in English."}`,
6926
6933
  content: `#${w}`,
6927
6934
  x: S,
6928
6935
  y: x + 5,
6929
- width: E,
6936
+ width: R,
6930
6937
  height: 20,
6931
6938
  rotation: 0,
6932
6939
  fontSize: 12,
@@ -6936,17 +6943,17 @@ ${t.language === "ko" ? "한국어로 작성하세요." : "Write in English."}`,
6936
6943
  textStyle: "caption",
6937
6944
  fontWeight: "500",
6938
6945
  lineHeight: 1
6939
- }), S += E + 8;
6946
+ }), S += R + 8;
6940
6947
  });
6941
6948
  }
6942
6949
  }
6943
6950
  return n;
6944
- }, lw = {
6951
+ }, cw = {
6945
6952
  title: "제목",
6946
6953
  subtitle: "소제목",
6947
6954
  body: "본문",
6948
6955
  caption: "캡션"
6949
- }, cw = ({ isOpen: t, onClose: e, onBack: n }) => {
6956
+ }, uw = ({ isOpen: t, onClose: e, onBack: n }) => {
6950
6957
  const [o, i] = at(""), [c, d] = at("body"), [h, p] = at(null), { generateText: u, isLoading: A, error: y, reset: x } = IA(), { addElement: S } = Ve(), w = () => `text-${Date.now()}-${Math.random().toString(36).slice(2, 9)}`, E = async () => {
6951
6958
  if (o.trim())
6952
6959
  try {
@@ -7015,7 +7022,7 @@ ${t.language === "ko" ? "한국어로 작성하세요." : "Write in English."}`,
7015
7022
  {
7016
7023
  value: c,
7017
7024
  onChange: (B) => d(B),
7018
- data: Object.entries(lw).map(([B, I]) => ({
7025
+ data: Object.entries(cw).map(([B, I]) => ({
7019
7026
  value: B,
7020
7027
  label: I
7021
7028
  })),
@@ -7067,12 +7074,12 @@ ${t.language === "ko" ? "한국어로 작성하세요." : "Write in English."}`,
7067
7074
  ] })
7068
7075
  }
7069
7076
  );
7070
- }, uw = [
7077
+ }, dw = [
7071
7078
  { value: "cover", label: "커버" },
7072
7079
  { value: "content", label: "콘텐츠" },
7073
7080
  { value: "data", label: "데이터/차트" },
7074
7081
  { value: "closing", label: "클로징" }
7075
- ], dw = ({
7082
+ ], fw = ({
7076
7083
  isOpen: t,
7077
7084
  onClose: e,
7078
7085
  slide: n,
@@ -7110,7 +7117,7 @@ ${t.language === "ko" ? "한국어로 작성하세요." : "Write in English."}`,
7110
7117
  pv,
7111
7118
  {
7112
7119
  label: "섹션 타입",
7113
- data: uw,
7120
+ data: dw,
7114
7121
  value: d.sectionType,
7115
7122
  onChange: (S) => p("sectionType", S || "content")
7116
7123
  }
@@ -7169,12 +7176,12 @@ ${t.language === "ko" ? "한국어로 작성하세요." : "Write in English."}`,
7169
7176
  ] })
7170
7177
  }
7171
7178
  );
7172
- }, fw = [
7179
+ }, hw = [
7173
7180
  { value: "business", label: "비즈니스" },
7174
7181
  { value: "creative", label: "크리에이티브" },
7175
7182
  { value: "minimal", label: "미니멀" },
7176
7183
  { value: "educational", label: "교육" }
7177
- ], hw = [
7184
+ ], pw = [
7178
7185
  { value: "title", label: "표지", icon: "title" },
7179
7186
  { value: "content", label: "본문", icon: "article" },
7180
7187
  { value: "bullets", label: "불릿", icon: "format_list_bulleted" },
@@ -7182,7 +7189,7 @@ ${t.language === "ko" ? "한국어로 작성하세요." : "Write in English."}`,
7182
7189
  { value: "image-left", label: "이미지 좌", icon: "image" },
7183
7190
  { value: "image-right", label: "이미지 우", icon: "image" },
7184
7191
  { value: "graph", label: "차트", icon: "insert_chart" }
7185
- ], pw = ({ isOpen: t, onClose: e, onBack: n }) => {
7192
+ ], Aw = ({ isOpen: t, onClose: e, onBack: n }) => {
7186
7193
  const [o, i] = at("ai"), [c, d] = at("input"), [h, p] = at(0), [u, A] = at(!1), [y, x] = at(""), [S, w] = at(5), [E, R] = at("business"), [T, M] = at(!0), [B, I] = at([]), [F, Y] = at(null), [q, j] = at(""), [Q, V] = at(null), [me, X] = at(null), [ie, D] = at(null), [te, oe] = at("devdive"), { generateSlides: he, generateSlideContent: K, isLoading: re, error: ne, reset: O } = IA(), $ = async () => {
7187
7194
  if (!(!y.trim() || u)) {
7188
7195
  A(!0);
@@ -7437,7 +7444,7 @@ ${t.language === "ko" ? "한국어로 작성하세요." : "Write in English."}`,
7437
7444
  {
7438
7445
  value: E,
7439
7446
  onChange: (G) => R(G),
7440
- data: fw,
7447
+ data: hw,
7441
7448
  fullWidth: !0,
7442
7449
  color: "devdive"
7443
7450
  }
@@ -7462,7 +7469,7 @@ ${t.language === "ko" ? "한국어로 작성하세요." : "Write in English."}`,
7462
7469
  size: "xs",
7463
7470
  value: G.layout,
7464
7471
  onChange: (Z) => Ee(U, Z || "content"),
7465
- data: hw.map((Z) => ({ value: Z.value, label: Z.label })),
7472
+ data: pw.map((Z) => ({ value: Z.value, label: Z.label })),
7466
7473
  w: 100
7467
7474
  }
7468
7475
  ),
@@ -7667,7 +7674,7 @@ ${t.language === "ko" ? "한국어로 작성하세요." : "Write in English."}`,
7667
7674
  ] })
7668
7675
  ] }),
7669
7676
  Q && ie !== null && /* @__PURE__ */ P(
7670
- dw,
7677
+ fw,
7671
7678
  {
7672
7679
  isOpen: ie !== null,
7673
7680
  onClose: () => D(null),
@@ -7680,16 +7687,16 @@ ${t.language === "ko" ? "한국어로 작성하세요." : "Write in English."}`,
7680
7687
  ]
7681
7688
  }
7682
7689
  );
7683
- }, Aw = [
7690
+ }, mw = [
7684
7691
  { value: "realistic", label: "사실적" },
7685
7692
  { value: "illustration", label: "일러스트" },
7686
7693
  { value: "abstract", label: "추상" },
7687
7694
  { value: "3d", label: "3D" },
7688
7695
  { value: "minimalist", label: "미니멀" }
7689
- ], mw = [
7696
+ ], gw = [
7690
7697
  { value: "512x512", label: "512×512" },
7691
7698
  { value: "1024x1024", label: "1024×1024" }
7692
- ], gw = ({ isOpen: t, onClose: e, onBack: n }) => {
7699
+ ], vw = ({ isOpen: t, onClose: e, onBack: n }) => {
7693
7700
  const [o, i] = at(""), [c, d] = at("illustration"), [h, p] = at("512x512"), [u, A] = at(null), { generateImage: y, isLoading: x, error: S, reset: w } = IA(), { addElement: E } = Ve(), R = () => `image-${Date.now()}-${Math.random().toString(36).slice(2, 9)}`, T = async () => {
7694
7701
  if (o.trim())
7695
7702
  try {
@@ -7749,7 +7756,7 @@ ${t.language === "ko" ? "한국어로 작성하세요." : "Write in English."}`,
7749
7756
  {
7750
7757
  value: c,
7751
7758
  onChange: (F) => d(F),
7752
- data: Aw,
7759
+ data: mw,
7753
7760
  fullWidth: !0,
7754
7761
  color: "devdive"
7755
7762
  }
@@ -7762,7 +7769,7 @@ ${t.language === "ko" ? "한국어로 작성하세요." : "Write in English."}`,
7762
7769
  {
7763
7770
  value: h,
7764
7771
  onChange: (F) => p(F),
7765
- data: mw,
7772
+ data: gw,
7766
7773
  color: "devdive"
7767
7774
  }
7768
7775
  )
@@ -7807,7 +7814,7 @@ ${t.language === "ko" ? "한국어로 작성하세요." : "Write in English."}`,
7807
7814
  ] })
7808
7815
  }
7809
7816
  );
7810
- }, vw = [
7817
+ }, yw = [
7811
7818
  {
7812
7819
  type: "text",
7813
7820
  icon: "edit_note",
@@ -7836,7 +7843,7 @@ ${t.language === "ko" ? "한국어로 작성하세요." : "Write in English."}`,
7836
7843
  description: "레이아웃과 색상을 자동 추천",
7837
7844
  color: "teal"
7838
7845
  }
7839
- ], yw = ({ isOpen: t, onClose: e }) => {
7846
+ ], xw = ({ isOpen: t, onClose: e }) => {
7840
7847
  const [n, o] = at(null), i = (h) => {
7841
7848
  o(h);
7842
7849
  }, c = () => {
@@ -7868,7 +7875,7 @@ ${t.language === "ko" ? "한국어로 작성하세요." : "Write in English."}`,
7868
7875
  size: "lg",
7869
7876
  children: /* @__PURE__ */ de(dr, { gap: "md", children: [
7870
7877
  /* @__PURE__ */ P(pt, { size: "sm", c: "dimmed", children: "AI를 활용하여 프레젠테이션을 더 빠르고 쉽게 만들어보세요." }),
7871
- /* @__PURE__ */ P(nh, { cols: 2, spacing: "md", children: vw.map((h) => /* @__PURE__ */ P(
7878
+ /* @__PURE__ */ P(nh, { cols: 2, spacing: "md", children: yw.map((h) => /* @__PURE__ */ P(
7872
7879
  E6,
7873
7880
  {
7874
7881
  padding: "lg",
@@ -7908,7 +7915,7 @@ ${t.language === "ko" ? "한국어로 작성하세요." : "Write in English."}`,
7908
7915
  }
7909
7916
  ),
7910
7917
  /* @__PURE__ */ P(
7911
- cw,
7918
+ uw,
7912
7919
  {
7913
7920
  isOpen: n === "text",
7914
7921
  onClose: c,
@@ -7916,7 +7923,7 @@ ${t.language === "ko" ? "한국어로 작성하세요." : "Write in English."}`,
7916
7923
  }
7917
7924
  ),
7918
7925
  /* @__PURE__ */ P(
7919
- pw,
7926
+ Aw,
7920
7927
  {
7921
7928
  isOpen: n === "slide",
7922
7929
  onClose: c,
@@ -7924,7 +7931,7 @@ ${t.language === "ko" ? "한국어로 작성하세요." : "Write in English."}`,
7924
7931
  }
7925
7932
  ),
7926
7933
  /* @__PURE__ */ P(
7927
- gw,
7934
+ vw,
7928
7935
  {
7929
7936
  isOpen: n === "image",
7930
7937
  onClose: c,
@@ -7932,7 +7939,7 @@ ${t.language === "ko" ? "한국어로 작성하세요." : "Write in English."}`,
7932
7939
  }
7933
7940
  )
7934
7941
  ] });
7935
- }, xw = () => {
7942
+ }, bw = () => {
7936
7943
  const [t, e] = at("Untitled Presentation"), [n, o] = at(!1), [i, c] = at(!1), [d, h] = at("new"), [p, u] = at(!1), [A, y] = at(!1), x = Ve((F) => F.slides), S = Ve((F) => F.defaultBackground), w = Ve((F) => F.resetPresentation), E = Ve((F) => F.loadSlides), R = Rn(null), T = async () => {
7937
7944
  if (!n) {
7938
7945
  o(!0);
@@ -8156,7 +8163,7 @@ ${t.language === "ko" ? "한국어로 작성하세요." : "Write in English."}`,
8156
8163
  mode: d
8157
8164
  }
8158
8165
  ),
8159
- /* @__PURE__ */ P(yw, { isOpen: p, onClose: () => u(!1) }),
8166
+ /* @__PURE__ */ P(xw, { isOpen: p, onClose: () => u(!1) }),
8160
8167
  /* @__PURE__ */ P(
8161
8168
  $l,
8162
8169
  {
@@ -8258,19 +8265,19 @@ var eh = function(t, e, n) {
8258
8265
  return Dt.createElement("div", { className: c, style: { top: 100 * i + "%", left: 100 * n + "%" } }, Dt.createElement("div", { className: "react-colorful__pointer-fill", style: { backgroundColor: e } }));
8259
8266
  }, Qr = function(t, e, n) {
8260
8267
  return e === void 0 && (e = 0), n === void 0 && (n = Math.pow(10, e)), Math.round(n * t) / n;
8261
- }, bw = function(t) {
8262
- return Ew($g(t));
8268
+ }, Sw = function(t) {
8269
+ return Rw($g(t));
8263
8270
  }, $g = function(t) {
8264
8271
  return t[0] === "#" && (t = t.substring(1)), t.length < 6 ? { r: parseInt(t[0] + t[0], 16), g: parseInt(t[1] + t[1], 16), b: parseInt(t[2] + t[2], 16), a: t.length === 4 ? Qr(parseInt(t[3] + t[3], 16) / 255, 2) : 1 } : { r: parseInt(t.substring(0, 2), 16), g: parseInt(t.substring(2, 4), 16), b: parseInt(t.substring(4, 6), 16), a: t.length === 8 ? Qr(parseInt(t.substring(6, 8), 16) / 255, 2) : 1 };
8265
- }, Sw = function(t) {
8266
- return _w(Cw(t));
8267
8272
  }, ww = function(t) {
8273
+ return Ew(_w(t));
8274
+ }, Cw = function(t) {
8268
8275
  var e = t.s, n = t.v, o = t.a, i = (200 - e) * n / 100;
8269
8276
  return { h: Qr(t.h), s: Qr(i > 0 && i < 200 ? e * n / 100 / (i <= 100 ? i : 200 - i) * 100 : 0), l: Qr(i / 2), a: Qr(o, 2) };
8270
8277
  }, ev = function(t) {
8271
- var e = ww(t);
8278
+ var e = Cw(t);
8272
8279
  return "hsl(" + e.h + ", " + e.s + "%, " + e.l + "%)";
8273
- }, Cw = function(t) {
8280
+ }, _w = function(t) {
8274
8281
  var e = t.h, n = t.s, o = t.v, i = t.a;
8275
8282
  e = e / 360 * 6, n /= 100, o /= 100;
8276
8283
  var c = Math.floor(e), d = o * (1 - n), h = o * (1 - (e - c) * n), p = o * (1 - (1 - e + c) * n), u = c % 6;
@@ -8278,20 +8285,20 @@ var eh = function(t, e, n) {
8278
8285
  }, sA = function(t) {
8279
8286
  var e = t.toString(16);
8280
8287
  return e.length < 2 ? "0" + e : e;
8281
- }, _w = function(t) {
8288
+ }, Ew = function(t) {
8282
8289
  var e = t.r, n = t.g, o = t.b, i = t.a, c = i < 1 ? sA(Qr(255 * i)) : "";
8283
8290
  return "#" + sA(e) + sA(n) + sA(o) + c;
8284
- }, Ew = function(t) {
8291
+ }, Rw = function(t) {
8285
8292
  var e = t.r, n = t.g, o = t.b, i = t.a, c = Math.max(e, n, o), d = c - Math.min(e, n, o), h = d ? c === e ? (n - o) / d : c === n ? 2 + (o - e) / d : 4 + (e - n) / d : 0;
8286
8293
  return { h: Qr(60 * (h < 0 ? h + 6 : h)), s: Qr(c ? d / c * 100 : 0), v: Qr(c / 255 * 100), a: i };
8287
- }, Rw = Dt.memo(function(t) {
8294
+ }, Tw = Dt.memo(function(t) {
8288
8295
  var e = t.hue, n = t.onChange, o = xv(["react-colorful__hue", t.className]);
8289
8296
  return Dt.createElement("div", { className: o }, Dt.createElement(jx, { onMove: function(i) {
8290
8297
  n({ h: 360 * i.left });
8291
8298
  }, onKey: function(i) {
8292
8299
  n({ h: eh(e + 360 * i.left, 0, 360) });
8293
8300
  }, "aria-label": "Hue", "aria-valuenow": Qr(e), "aria-valuemax": "360", "aria-valuemin": "0" }, Dt.createElement(qx, { className: "react-colorful__hue-pointer", left: e / 360, color: ev({ h: e, s: 100, v: 100, a: 1 }) })));
8294
- }), Tw = Dt.memo(function(t) {
8301
+ }), Dw = Dt.memo(function(t) {
8295
8302
  var e = t.hsva, n = t.onChange, o = { backgroundColor: ev({ h: e.h, s: 100, v: 100, a: 1 }) };
8296
8303
  return Dt.createElement("div", { className: "react-colorful__saturation", style: o }, Dt.createElement(jx, { onMove: function(i) {
8297
8304
  n({ s: 100 * i.left, v: 100 - 100 * i.top });
@@ -8302,10 +8309,10 @@ var eh = function(t, e, n) {
8302
8309
  if (t === e) return !0;
8303
8310
  for (var n in t) if (t[n] !== e[n]) return !1;
8304
8311
  return !0;
8305
- }, Dw = function(t, e) {
8312
+ }, Lw = function(t, e) {
8306
8313
  return t.toLowerCase() === e.toLowerCase() || Kx($g(t), $g(e));
8307
8314
  };
8308
- function Lw(t, e, n) {
8315
+ function kw(t, e, n) {
8309
8316
  var o = Jg(n), i = at(function() {
8310
8317
  return t.toHsva(e);
8311
8318
  }), c = i[0], d = i[1], h = Rn({ color: e, hsva: c });
@@ -8325,29 +8332,29 @@ function Lw(t, e, n) {
8325
8332
  }, []);
8326
8333
  return [c, p];
8327
8334
  }
8328
- var kw = typeof window < "u" ? T6 : er, Nw = function() {
8335
+ var Nw = typeof window < "u" ? T6 : er, Pw = function() {
8329
8336
  return typeof __webpack_nonce__ < "u" ? __webpack_nonce__ : void 0;
8330
- }, z2 = /* @__PURE__ */ new Map(), Pw = function(t) {
8331
- kw(function() {
8337
+ }, z2 = /* @__PURE__ */ new Map(), Mw = function(t) {
8338
+ Nw(function() {
8332
8339
  var e = t.current ? t.current.ownerDocument : document;
8333
8340
  if (e !== void 0 && !z2.has(e)) {
8334
8341
  var n = e.createElement("style");
8335
8342
  n.innerHTML = `.react-colorful{position:relative;display:flex;flex-direction:column;width:200px;height:200px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:default}.react-colorful__saturation{position:relative;flex-grow:1;border-color:transparent;border-bottom:12px solid #000;border-radius:8px 8px 0 0;background-image:linear-gradient(0deg,#000,transparent),linear-gradient(90deg,#fff,hsla(0,0%,100%,0))}.react-colorful__alpha-gradient,.react-colorful__pointer-fill{content:"";position:absolute;left:0;top:0;right:0;bottom:0;pointer-events:none;border-radius:inherit}.react-colorful__alpha-gradient,.react-colorful__saturation{box-shadow:inset 0 0 0 1px rgba(0,0,0,.05)}.react-colorful__alpha,.react-colorful__hue{position:relative;height:24px}.react-colorful__hue{background:linear-gradient(90deg,red 0,#ff0 17%,#0f0 33%,#0ff 50%,#00f 67%,#f0f 83%,red)}.react-colorful__last-control{border-radius:0 0 8px 8px}.react-colorful__interactive{position:absolute;left:0;top:0;right:0;bottom:0;border-radius:inherit;outline:none;touch-action:none}.react-colorful__pointer{position:absolute;z-index:1;box-sizing:border-box;width:28px;height:28px;transform:translate(-50%,-50%);background-color:#fff;border:2px solid #fff;border-radius:50%;box-shadow:0 2px 4px rgba(0,0,0,.2)}.react-colorful__interactive:focus .react-colorful__pointer{transform:translate(-50%,-50%) scale(1.1)}.react-colorful__alpha,.react-colorful__alpha-pointer{background-color:#fff;background-image:url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill-opacity=".05"><path d="M8 0h8v8H8zM0 8h8v8H0z"/></svg>')}.react-colorful__saturation-pointer{z-index:3}.react-colorful__hue-pointer{z-index:2}`, z2.set(e, n);
8336
- var o = Nw();
8343
+ var o = Pw();
8337
8344
  o && n.setAttribute("nonce", o), e.head.appendChild(n);
8338
8345
  }
8339
8346
  }, []);
8340
- }, Mw = function(t) {
8347
+ }, Bw = function(t) {
8341
8348
  var e = t.className, n = t.colorModel, o = t.color, i = o === void 0 ? n.defaultColor : o, c = t.onChange, d = Vx(t, ["className", "colorModel", "color", "onChange"]), h = Rn(null);
8342
- Pw(h);
8343
- var p = Lw(n, i, c), u = p[0], A = p[1], y = xv(["react-colorful", e]);
8344
- return Dt.createElement("div", OA({}, d, { ref: h, className: y }), Dt.createElement(Tw, { hsva: u, onChange: A }), Dt.createElement(Rw, { hue: u.h, onChange: A, className: "react-colorful__last-control" }));
8345
- }, Bw = { defaultColor: "000", toHsva: bw, fromHsva: function(t) {
8346
- return Sw({ h: t.h, s: t.s, v: t.v, a: 1 });
8347
- }, equal: Dw }, Jx = function(t) {
8348
- return Dt.createElement(Mw, OA({}, t, { colorModel: Bw }));
8349
+ Mw(h);
8350
+ var p = kw(n, i, c), u = p[0], A = p[1], y = xv(["react-colorful", e]);
8351
+ return Dt.createElement("div", OA({}, d, { ref: h, className: y }), Dt.createElement(Dw, { hsva: u, onChange: A }), Dt.createElement(Tw, { hue: u.h, onChange: A, className: "react-colorful__last-control" }));
8352
+ }, zw = { defaultColor: "000", toHsva: Sw, fromHsva: function(t) {
8353
+ return ww({ h: t.h, s: t.s, v: t.v, a: 1 });
8354
+ }, equal: Lw }, Jx = function(t) {
8355
+ return Dt.createElement(Bw, OA({}, t, { colorModel: zw }));
8349
8356
  };
8350
- const zw = () => {
8357
+ const Fw = () => {
8351
8358
  var ne;
8352
8359
  const t = Ve((O) => O.mode), e = Ve((O) => O.currentShapeType), n = Ve((O) => O.currentTextStyle), o = Ve((O) => O.currentFontFamily), i = Ve((O) => O.selectedElementId), c = Ve((O) => O.slides), d = Ve((O) => O.currentSlideIndex), h = Ve((O) => O.setMode), p = Ve((O) => O.setShapeType), u = Ve((O) => O.setTextStyle), A = Ve((O) => O.setFontFamily), y = Ve((O) => O.deleteElement), x = Ve((O) => O.addElement), S = Ve((O) => O.updateSlideBackground), w = Ve((O) => O.updateAllSlidesBackground), E = Ve((O) => O.snapSettings), R = Ve((O) => O.toggleSnap), [T, M] = at(!1), B = Rn(null), I = Rn(null), [F, Y] = at({ x: 0, y: 0 }), [q, j] = at({
8353
8360
  isDragging: !1,
@@ -8705,19 +8712,19 @@ const zw = () => {
8705
8712
  )
8706
8713
  }
8707
8714
  );
8708
- }, Fw = Math.PI / 180;
8709
- function Iw() {
8715
+ }, Iw = Math.PI / 180;
8716
+ function Ow() {
8710
8717
  return typeof window < "u" && ({}.toString.call(window) === "[object Window]" || {}.toString.call(window) === "[object global]");
8711
8718
  }
8712
8719
  const ql = typeof global < "u" ? global : typeof window < "u" ? window : typeof WorkerGlobalScope < "u" ? self : {}, Qe = {
8713
8720
  _global: ql,
8714
8721
  version: "10.2.0",
8715
- isBrowser: Iw(),
8722
+ isBrowser: Ow(),
8716
8723
  isUnminified: /param/.test((function(t) {
8717
8724
  }).toString()),
8718
8725
  dblClickWindow: 400,
8719
8726
  getAngle(t) {
8720
- return Qe.angleDeg ? t * Fw : t;
8727
+ return Qe.angleDeg ? t * Iw : t;
8721
8728
  },
8722
8729
  enableTrace: !1,
8723
8730
  pointerEventsEnabled: !0,
@@ -8759,7 +8766,7 @@ const ql = typeof global < "u" ? global : typeof window < "u" ? window : typeof
8759
8766
  Qe[t.prototype.getClassName()] = t;
8760
8767
  };
8761
8768
  Qe._injectGlobal(Qe);
8762
- const Ow = `Konva.js unsupported environment.
8769
+ const Uw = `Konva.js unsupported environment.
8763
8770
 
8764
8771
  Looks like you are trying to use Konva.js in Node.js environment. because "document" object is undefined.
8765
8772
 
@@ -8774,7 +8781,7 @@ bash: npm install skia-canvas
8774
8781
  js: import "konva/skia-backend";
8775
8782
  `, F2 = () => {
8776
8783
  if (typeof document > "u")
8777
- throw new Error(Ow);
8784
+ throw new Error(Uw);
8778
8785
  };
8779
8786
  class ai {
8780
8787
  constructor(e = [1, 0, 0, 1, 0, 0]) {
@@ -8847,7 +8854,7 @@ class ai {
8847
8854
  return p.rotation = fe._getRotation(p.rotation), p;
8848
8855
  }
8849
8856
  }
8850
- const Uw = "[object Array]", Gw = "[object Number]", Hw = "[object String]", Xw = "[object Boolean]", Ww = Math.PI / 180, Qw = 180 / Math.PI, Rf = "#", Yw = "", Vw = "0", jw = "Konva warning: ", I2 = "Konva error: ", qw = "rgb(", Eg = {
8857
+ const Gw = "[object Array]", Hw = "[object Number]", Xw = "[object String]", Ww = "[object Boolean]", Qw = Math.PI / 180, Yw = 180 / Math.PI, Rf = "#", Vw = "", jw = "0", qw = "Konva warning: ", I2 = "Konva error: ", Kw = "rgb(", Eg = {
8851
8858
  aliceblue: [240, 248, 255],
8852
8859
  antiquewhite: [250, 235, 215],
8853
8860
  aqua: [0, 255, 255],
@@ -8997,9 +9004,9 @@ const Uw = "[object Array]", Gw = "[object Number]", Hw = "[object String]", Xw
8997
9004
  whitesmoke: [245, 245, 245],
8998
9005
  yellow: [255, 255, 0],
8999
9006
  yellowgreen: [154, 205, 5]
9000
- }, Kw = /rgb\((\d{1,3}),(\d{1,3}),(\d{1,3})\)/;
9007
+ }, Jw = /rgb\((\d{1,3}),(\d{1,3}),(\d{1,3})\)/;
9001
9008
  let lA = [], Tf = null;
9002
- const Jw = typeof requestAnimationFrame < "u" && requestAnimationFrame || function(t) {
9009
+ const Zw = typeof requestAnimationFrame < "u" && requestAnimationFrame || function(t) {
9003
9010
  setTimeout(t, 16);
9004
9011
  }, fe = {
9005
9012
  _isElement(t) {
@@ -9012,16 +9019,16 @@ const Jw = typeof requestAnimationFrame < "u" && requestAnimationFrame || functi
9012
9019
  return !!t && t.constructor === Object;
9013
9020
  },
9014
9021
  _isArray(t) {
9015
- return Object.prototype.toString.call(t) === Uw;
9022
+ return Object.prototype.toString.call(t) === Gw;
9016
9023
  },
9017
9024
  _isNumber(t) {
9018
- return Object.prototype.toString.call(t) === Gw && !isNaN(t) && isFinite(t);
9025
+ return Object.prototype.toString.call(t) === Hw && !isNaN(t) && isFinite(t);
9019
9026
  },
9020
9027
  _isString(t) {
9021
- return Object.prototype.toString.call(t) === Hw;
9028
+ return Object.prototype.toString.call(t) === Xw;
9022
9029
  },
9023
9030
  _isBoolean(t) {
9024
- return Object.prototype.toString.call(t) === Xw;
9031
+ return Object.prototype.toString.call(t) === Ww;
9025
9032
  },
9026
9033
  isObject(t) {
9027
9034
  return t instanceof Object;
@@ -9036,7 +9043,7 @@ const Jw = typeof requestAnimationFrame < "u" && requestAnimationFrame || functi
9036
9043
  return t === 0 || t > 0 ? 1 : -1;
9037
9044
  },
9038
9045
  requestAnimFrame(t) {
9039
- lA.push(t), lA.length === 1 && Jw(function() {
9046
+ lA.push(t), lA.length === 1 && Zw(function() {
9040
9047
  const e = lA;
9041
9048
  lA = [], e.forEach(function(n) {
9042
9049
  n();
@@ -9071,7 +9078,7 @@ const Jw = typeof requestAnimationFrame < "u" && requestAnimationFrame || functi
9071
9078
  return ((1 << 24) + (t << 16) + (e << 8) + n).toString(16).slice(1);
9072
9079
  },
9073
9080
  _hexToRgb(t) {
9074
- t = t.replace(Rf, Yw);
9081
+ t = t.replace(Rf, Vw);
9075
9082
  const e = parseInt(t, 16);
9076
9083
  return {
9077
9084
  r: e >> 16 & 255,
@@ -9082,7 +9089,7 @@ const Jw = typeof requestAnimationFrame < "u" && requestAnimationFrame || functi
9082
9089
  getRandomColor() {
9083
9090
  let t = (Math.random() * 16777215 << 0).toString(16);
9084
9091
  for (; t.length < 6; )
9085
- t = Vw + t;
9092
+ t = jw + t;
9086
9093
  return Rf + t;
9087
9094
  },
9088
9095
  isCanvasFarblingActive() {
@@ -9122,7 +9129,7 @@ const Jw = typeof requestAnimationFrame < "u" && requestAnimationFrame || functi
9122
9129
  r: e[0],
9123
9130
  g: e[1],
9124
9131
  b: e[2]
9125
- }) : t[0] === Rf ? this._hexToRgb(t.substring(1)) : t.substr(0, 4) === qw ? (e = Kw.exec(t.replace(/ /g, "")), {
9132
+ }) : t[0] === Rf ? this._hexToRgb(t.substring(1)) : t.substr(0, 4) === Kw ? (e = Jw.exec(t.replace(/ /g, "")), {
9126
9133
  r: parseInt(e[1], 10),
9127
9134
  g: parseInt(e[2], 10),
9128
9135
  b: parseInt(e[3], 10)
@@ -9240,10 +9247,10 @@ const Jw = typeof requestAnimationFrame < "u" && requestAnimationFrame || functi
9240
9247
  return t.slice(0);
9241
9248
  },
9242
9249
  degToRad(t) {
9243
- return t * Ww;
9250
+ return t * Qw;
9244
9251
  },
9245
9252
  radToDeg(t) {
9246
- return t * Qw;
9253
+ return t * Yw;
9247
9254
  },
9248
9255
  _degToRad(t) {
9249
9256
  return fe.warn("Util._degToRad is removed. Please use public Util.degToRad instead."), fe.degToRad(t);
@@ -9264,7 +9271,7 @@ const Jw = typeof requestAnimationFrame < "u" && requestAnimationFrame || functi
9264
9271
  console.error(I2 + t);
9265
9272
  },
9266
9273
  warn(t) {
9267
- Qe.showWarnings && console.warn(jw + t);
9274
+ Qe.showWarnings && console.warn(qw + t);
9268
9275
  },
9269
9276
  each(t, e) {
9270
9277
  for (const n in t)
@@ -9370,7 +9377,7 @@ const Jw = typeof requestAnimationFrame < "u" && requestAnimationFrame || functi
9370
9377
  }
9371
9378
  }
9372
9379
  };
9373
- function Zw(t) {
9380
+ function $w(t) {
9374
9381
  const e = [], n = t.length, o = fe;
9375
9382
  for (let i = 0; i < n; i++) {
9376
9383
  let c = t[i];
@@ -9378,7 +9385,7 @@ function Zw(t) {
9378
9385
  }
9379
9386
  return e;
9380
9387
  }
9381
- const O2 = ",", $w = "(", eC = ")", tC = "([", nC = "])", rC = ";", aC = "()", iC = "=", U2 = [
9388
+ const O2 = ",", eC = "(", tC = ")", nC = "([", rC = "])", aC = ";", iC = "()", oC = "=", U2 = [
9382
9389
  "arc",
9383
9390
  "arcTo",
9384
9391
  "beginPath",
@@ -9411,7 +9418,7 @@ const O2 = ",", $w = "(", eC = ")", tC = "([", nC = "])", rC = ";", aC = "()", i
9411
9418
  "strokeText",
9412
9419
  "transform",
9413
9420
  "translate"
9414
- ], oC = [
9421
+ ], sC = [
9415
9422
  "fillStyle",
9416
9423
  "strokeStyle",
9417
9424
  "shadowColor",
@@ -9432,7 +9439,7 @@ const O2 = ",", $w = "(", eC = ")", tC = "([", nC = "])", rC = ";", aC = "()", i
9432
9439
  "globalCompositeOperation",
9433
9440
  "imageSmoothingEnabled",
9434
9441
  "filter"
9435
- ], sC = 100;
9442
+ ], lC = 100;
9436
9443
  let cA = null;
9437
9444
  function G2() {
9438
9445
  if (cA !== null)
@@ -9464,7 +9471,7 @@ class UA {
9464
9471
  getTrace(e, n) {
9465
9472
  let o = this.traceArr, i = o.length, c = "", d, h, p, u;
9466
9473
  for (d = 0; d < i; d++)
9467
- h = o[d], p = h.method, p ? (u = h.args, c += p, e ? c += aC : fe._isArray(u[0]) ? c += tC + u.join(O2) + nC : (n && (u = u.map((A) => typeof A == "number" ? Math.floor(A) : A)), c += $w + u.join(O2) + eC)) : (c += h.property, e || (c += iC + h.val)), c += rC;
9474
+ h = o[d], p = h.method, p ? (u = h.args, c += p, e ? c += iC : fe._isArray(u[0]) ? c += nC + u.join(O2) + rC : (n && (u = u.map((A) => typeof A == "number" ? Math.floor(A) : A)), c += eC + u.join(O2) + tC)) : (c += h.property, e || (c += oC + h.val)), c += aC;
9468
9475
  return c;
9469
9476
  }
9470
9477
  clearTrace() {
@@ -9472,7 +9479,7 @@ class UA {
9472
9479
  }
9473
9480
  _trace(e) {
9474
9481
  let n = this.traceArr, o;
9475
- n.push(e), o = n.length, o >= sC && n.shift();
9482
+ n.push(e), o = n.length, o >= lC && n.shift();
9476
9483
  }
9477
9484
  reset() {
9478
9485
  const e = this.getCanvas().getPixelRatio();
@@ -9625,7 +9632,7 @@ class UA {
9625
9632
  const d = function(h) {
9626
9633
  let p = e[h], u;
9627
9634
  e[h] = function() {
9628
- return c = Zw(Array.prototype.slice.call(arguments, 0)), u = p.apply(e, arguments), e._trace({
9635
+ return c = $w(Array.prototype.slice.call(arguments, 0)), u = p.apply(e, arguments), e._trace({
9629
9636
  method: h,
9630
9637
  args: c
9631
9638
  }), u;
@@ -9648,7 +9655,7 @@ class UA {
9648
9655
  !n || n === "source-over" || this.setAttr("globalCompositeOperation", n);
9649
9656
  }
9650
9657
  }
9651
- oC.forEach(function(t) {
9658
+ sC.forEach(function(t) {
9652
9659
  Object.defineProperty(UA.prototype, t, {
9653
9660
  get() {
9654
9661
  return this._context[t];
@@ -9658,7 +9665,7 @@ oC.forEach(function(t) {
9658
9665
  }
9659
9666
  });
9660
9667
  });
9661
- class lC extends UA {
9668
+ class cC extends UA {
9662
9669
  constructor(e, { willReadFrequently: n = !1 } = {}) {
9663
9670
  super(e), this._context = e._canvas.getContext("2d", {
9664
9671
  willReadFrequently: n
@@ -9730,7 +9737,7 @@ class lC extends UA {
9730
9737
  this.setAttr("shadowColor", c), this.setAttr("shadowBlur", d * Math.min(Math.abs(A), Math.abs(y))), this.setAttr("shadowOffsetX", h.x * A), this.setAttr("shadowOffsetY", h.y * y);
9731
9738
  }
9732
9739
  }
9733
- class cC extends UA {
9740
+ class uC extends UA {
9734
9741
  constructor(e) {
9735
9742
  super(e), this._context = e._canvas.getContext("2d", {
9736
9743
  willReadFrequently: !0
@@ -9757,7 +9764,7 @@ class cC extends UA {
9757
9764
  }
9758
9765
  }
9759
9766
  let uA;
9760
- function uC() {
9767
+ function dC() {
9761
9768
  if (uA)
9762
9769
  return uA;
9763
9770
  const t = fe.createCanvasElement(), e = t.getContext("2d");
@@ -9769,7 +9776,7 @@ function uC() {
9769
9776
  class bv {
9770
9777
  constructor(e) {
9771
9778
  this.pixelRatio = 1, this.width = 0, this.height = 0, this.isCache = !1;
9772
- const o = (e || {}).pixelRatio || Qe.pixelRatio || uC();
9779
+ const o = (e || {}).pixelRatio || Qe.pixelRatio || dC();
9773
9780
  this.pixelRatio = o, this._canvas = fe.createCanvasElement(), this._canvas.style.padding = "0", this._canvas.style.margin = "0", this._canvas.style.border = "0", this._canvas.style.background = "transparent", this._canvas.style.position = "absolute", this._canvas.style.top = "0", this._canvas.style.left = "0";
9774
9781
  }
9775
9782
  getContext() {
@@ -9815,14 +9822,14 @@ class bv {
9815
9822
  }
9816
9823
  class el extends bv {
9817
9824
  constructor(e = { width: 0, height: 0, willReadFrequently: !1 }) {
9818
- super(e), this.context = new lC(this, {
9825
+ super(e), this.context = new cC(this, {
9819
9826
  willReadFrequently: e.willReadFrequently
9820
9827
  }), this.setSize(e.width, e.height);
9821
9828
  }
9822
9829
  }
9823
9830
  class Sv extends bv {
9824
9831
  constructor(e = { width: 0, height: 0 }) {
9825
- super(e), this.hitCanvas = !0, this.context = new cC(this), this.setSize(e.width, e.height);
9832
+ super(e), this.hitCanvas = !0, this.context = new uC(this), this.setSize(e.width, e.height);
9826
9833
  }
9827
9834
  }
9828
9835
  const hn = {
@@ -9924,7 +9931,7 @@ function $x() {
9924
9931
  return n || o || fe.warn(rl(t) + ' is a not valid value for "' + e + '" attribute. The value should be a string or a native gradient.'), t;
9925
9932
  };
9926
9933
  }
9927
- function dC() {
9934
+ function fC() {
9928
9935
  if (Qe.isUnminified)
9929
9936
  return function(t, e) {
9930
9937
  const n = Int8Array ? Object.getPrototypeOf(Int8Array) : null;
@@ -9939,7 +9946,7 @@ function qi() {
9939
9946
  return t === !0 || t === !1 || fe.warn(rl(t) + ' is a not valid value for "' + e + '" attribute. The value should be a boolean.'), t;
9940
9947
  };
9941
9948
  }
9942
- function fC(t) {
9949
+ function hC(t) {
9943
9950
  if (Qe.isUnminified)
9944
9951
  return function(e, n) {
9945
9952
  return e == null || fe.isObject(e) || fe.warn(rl(e) + ' is a not valid value for "' + n + '" attribute. The value should be an object with properties ' + t), e;
@@ -9976,7 +9983,7 @@ const Df = "get", Lf = "set", ee = {
9976
9983
  }
9977
9984
  return A;
9978
9985
  };
9979
- const u = fC(n);
9986
+ const u = hC(n);
9980
9987
  t.prototype[p] = function(A) {
9981
9988
  const y = this.attrs[e];
9982
9989
  o && (A = o.call(this, A, e)), u && u.call(this, A, e);
@@ -10017,7 +10024,7 @@ const Df = "get", Lf = "set", ee = {
10017
10024
  this._filterUpToDate = !1;
10018
10025
  }
10019
10026
  };
10020
- function hC(t) {
10027
+ function pC(t) {
10021
10028
  const e = /(\w+)\(([^)]+)\)/g;
10022
10029
  let n;
10023
10030
  for (; (n = e.exec(t)) !== null; ) {
@@ -10071,7 +10078,7 @@ function hC(t) {
10071
10078
  return () => {
10072
10079
  };
10073
10080
  }
10074
- const RA = "absoluteOpacity", H2 = "allEventListeners", ss = "absoluteTransform", X2 = "absoluteScale", Yl = "canvas", pC = "Change", AC = "children", mC = "konva", tv = "listening", gC = "mouseenter", vC = "mouseleave", yC = "pointerenter", xC = "pointerleave", bC = "touchenter", SC = "touchleave", W2 = "set", Q2 = "Shape", TA = " ", Y2 = "stage", Ks = "transform", wC = "Stage", nv = "visible", CC = [
10081
+ const RA = "absoluteOpacity", H2 = "allEventListeners", ss = "absoluteTransform", X2 = "absoluteScale", Yl = "canvas", AC = "Change", mC = "children", gC = "konva", tv = "listening", vC = "mouseenter", yC = "mouseleave", xC = "pointerenter", bC = "pointerleave", SC = "touchenter", wC = "touchleave", W2 = "set", Q2 = "Shape", TA = " ", Y2 = "stage", Ks = "transform", CC = "Stage", nv = "visible", _C = [
10075
10082
  "xChange.konva",
10076
10083
  "yChange.konva",
10077
10084
  "scaleXChange.konva",
@@ -10083,10 +10090,10 @@ const RA = "absoluteOpacity", H2 = "allEventListeners", ss = "absoluteTransform"
10083
10090
  "offsetYChange.konva",
10084
10091
  "transformsEnabledChange.konva"
10085
10092
  ].join(TA);
10086
- let _C = 1;
10093
+ let EC = 1;
10087
10094
  class Ge {
10088
10095
  constructor(e) {
10089
- this._id = _C++, this.eventListeners = {}, this.attrs = {}, this.index = 0, this._allEventListeners = null, this.parent = null, this._cache = /* @__PURE__ */ new Map(), this._attachedDepsListeners = /* @__PURE__ */ new Map(), this._lastPos = null, this._batchingTransformChange = !1, this._needClearTransformCache = !1, this._filterUpToDate = !1, this._isUnderCache = !1, this._dragEventId = null, this._shouldFireChangeEvents = !1, this.setAttrs(e), this._shouldFireChangeEvents = !0;
10096
+ this._id = EC++, this.eventListeners = {}, this.attrs = {}, this.index = 0, this._allEventListeners = null, this.parent = null, this._cache = /* @__PURE__ */ new Map(), this._attachedDepsListeners = /* @__PURE__ */ new Map(), this._lastPos = null, this._batchingTransformChange = !1, this._needClearTransformCache = !1, this._filterUpToDate = !1, this._isUnderCache = !1, this._dragEventId = null, this._shouldFireChangeEvents = !1, this.setAttrs(e), this._shouldFireChangeEvents = !0;
10090
10097
  }
10091
10098
  hasChildren() {
10092
10099
  return !1;
@@ -10215,7 +10222,7 @@ class Ge {
10215
10222
  }
10216
10223
  try {
10217
10224
  for (d = e.length, c.clear(), c.drawImage(o._canvas, 0, 0, o.getWidth() / y, o.getHeight() / y), h = c.getImageData(0, 0, i.getWidth(), i.getHeight()), p = 0; p < d; p++)
10218
- u = e[p], typeof u == "string" && (u = hC(u)), u.call(this, h), c.putImageData(h, 0, 0);
10225
+ u = e[p], typeof u == "string" && (u = pC(u)), u.call(this, h), c.putImageData(h, 0, 0);
10219
10226
  } catch (x) {
10220
10227
  fe.error("Unable to apply filter. " + x.message + " This post my help you https://konvajs.org/docs/posts/Tainted_Canvas.html.");
10221
10228
  }
@@ -10301,7 +10308,7 @@ class Ge {
10301
10308
  if (!e)
10302
10309
  return this;
10303
10310
  for (n in e)
10304
- n !== AC && (o = W2 + fe._capitalize(n), fe._isFunction(this[o]) ? this[o](e[n]) : this._setAttr(n, e[n]));
10311
+ n !== mC && (o = W2 + fe._capitalize(n), fe._isFunction(this[o]) ? this[o](e[n]) : this._setAttr(n, e[n]));
10305
10312
  }), this;
10306
10313
  }
10307
10314
  isListening() {
@@ -10350,7 +10357,7 @@ class Ge {
10350
10357
  i.length > 0 && i[0].getDepth() <= e && p(i);
10351
10358
  }
10352
10359
  const u = this.getStage();
10353
- return n.nodeType !== wC && u && p(u.getChildren()), o;
10360
+ return n.nodeType !== CC && u && p(u.getChildren()), o;
10354
10361
  }
10355
10362
  getDepth() {
10356
10363
  let e = 0, n = this.parent;
@@ -10597,7 +10604,7 @@ class Ge {
10597
10604
  const p = new this.constructor(n);
10598
10605
  for (o in this.eventListeners)
10599
10606
  for (i = this.eventListeners[o], c = i.length, d = 0; d < c; d++)
10600
- h = i[d], h.name.indexOf(mC) < 0 && (p.eventListeners[o] || (p.eventListeners[o] = []), p.eventListeners[o].push(h));
10607
+ h = i[d], h.name.indexOf(gC) < 0 && (p.eventListeners[o] || (p.eventListeners[o] = []), p.eventListeners[o].push(h));
10601
10608
  return p;
10602
10609
  }
10603
10610
  _toKonvaCanvas(e) {
@@ -10675,7 +10682,7 @@ class Ge {
10675
10682
  }
10676
10683
  }
10677
10684
  _fireChangeEvent(e, n, o) {
10678
- this._fire(e + pC, {
10685
+ this._fire(e + AC, {
10679
10686
  oldVal: n,
10680
10687
  newVal: o
10681
10688
  });
@@ -10718,12 +10725,12 @@ class Ge {
10718
10725
  _fireAndBubble(e, n, o) {
10719
10726
  n && this.nodeType === Q2 && (n.target = this);
10720
10727
  const i = [
10721
- gC,
10722
10728
  vC,
10723
10729
  yC,
10724
10730
  xC,
10725
10731
  bC,
10726
- SC
10732
+ SC,
10733
+ wC
10727
10734
  ];
10728
10735
  if (!(i.indexOf(e) !== -1 && (o && (this === o || this.isAncestorOf && this.isAncestorOf(o)) || this.nodeType === "Stage" && !o))) {
10729
10736
  this._fire(e, n);
@@ -10863,7 +10870,7 @@ Ge.protoListenerMap = /* @__PURE__ */ new Map();
10863
10870
  Ge.prototype.nodeType = "Node";
10864
10871
  Ge.prototype._attrsAffectingSize = [];
10865
10872
  Ge.prototype.eventListeners = {};
10866
- Ge.prototype.on.call(Ge.prototype, CC, function() {
10873
+ Ge.prototype.on.call(Ge.prototype, _C, function() {
10867
10874
  if (this._batchingTransformChange) {
10868
10875
  this._needClearTransformCache = !0;
10869
10876
  return;
@@ -11138,7 +11145,7 @@ function Qf(t, e) {
11138
11145
  const o = n.getStage();
11139
11146
  o && o.content, th.delete(t), e5 && n._fire("lostpointercapture", Cv(new PointerEvent("lostpointercapture")));
11140
11147
  }
11141
- const EC = "Stage", RC = "string", V2 = "px", TC = "mouseout", r5 = "mouseleave", a5 = "mouseover", i5 = "mouseenter", o5 = "mousemove", s5 = "mousedown", l5 = "mouseup", Bf = "pointermove", zf = "pointerdown", Wu = "pointerup", Ff = "pointercancel", DC = "lostpointercapture", dA = "pointerout", If = "pointerleave", fA = "pointerover", hA = "pointerenter", rv = "contextmenu", c5 = "touchstart", u5 = "touchend", d5 = "touchmove", f5 = "touchcancel", av = "wheel", LC = 5, kC = [
11148
+ const RC = "Stage", TC = "string", V2 = "px", DC = "mouseout", r5 = "mouseleave", a5 = "mouseover", i5 = "mouseenter", o5 = "mousemove", s5 = "mousedown", l5 = "mouseup", Bf = "pointermove", zf = "pointerdown", Wu = "pointerup", Ff = "pointercancel", LC = "lostpointercapture", dA = "pointerout", If = "pointerleave", fA = "pointerover", hA = "pointerenter", rv = "contextmenu", c5 = "touchstart", u5 = "touchend", d5 = "touchmove", f5 = "touchcancel", av = "wheel", kC = 5, NC = [
11142
11149
  [i5, "_pointerenter"],
11143
11150
  [s5, "_pointerdown"],
11144
11151
  [o5, "_pointermove"],
@@ -11156,10 +11163,10 @@ const EC = "Stage", RC = "string", V2 = "px", TC = "mouseout", r5 = "mouseleave"
11156
11163
  [Wu, "_pointerup"],
11157
11164
  [Ff, "_pointercancel"],
11158
11165
  [If, "_pointerleave"],
11159
- [DC, "_lostpointercapture"]
11166
+ [LC, "_lostpointercapture"]
11160
11167
  ], Tg = {
11161
11168
  mouse: {
11162
- [dA]: TC,
11169
+ [dA]: DC,
11163
11170
  [If]: r5,
11164
11171
  [fA]: a5,
11165
11172
  [hA]: i5,
@@ -11206,7 +11213,7 @@ const EC = "Stage", RC = "string", V2 = "px", TC = "mouseout", r5 = "mouseleave"
11206
11213
  function j2(t = {}) {
11207
11214
  return (t.clipFunc || t.clipWidth || t.clipHeight) && fe.warn("Stage does not support clipping. Please use clip for Layers or Groups."), t;
11208
11215
  }
11209
- const NC = "Pointer position is missing and not registered by the stage. Looks like it is outside of the stage container. You can set it manually from event: stage.setPointersPositions(event);", Yf = [];
11216
+ const PC = "Pointer position is missing and not registered by the stage. Looks like it is outside of the stage container. You can set it manually from event: stage.setPointersPositions(event);", Yf = [];
11210
11217
  let HA = class extends ii {
11211
11218
  constructor(e) {
11212
11219
  super(j2(e)), this._pointerPositions = [], this._changedPointerPositions = [], this._buildDOM(), this._bindContentEvents(), Yf.push(this), this.on("widthChange.konva heightChange.konva", this._resizeDOM), this.on("visibleChange.konva", this._checkVisibility), this.on("clipWidthChange.konva clipHeightChange.konva clipFuncChange.konva", () => {
@@ -11224,7 +11231,7 @@ let HA = class extends ii {
11224
11231
  this.content.style.display = e;
11225
11232
  }
11226
11233
  setContainer(e) {
11227
- if (typeof e === RC) {
11234
+ if (typeof e === TC) {
11228
11235
  let n;
11229
11236
  if (e.charAt(0) === ".") {
11230
11237
  const o = e.slice(1);
@@ -11260,7 +11267,7 @@ let HA = class extends ii {
11260
11267
  return e ? {
11261
11268
  x: e.x,
11262
11269
  y: e.y
11263
- } : (fe.warn(NC), null);
11270
+ } : (fe.warn(PC), null);
11264
11271
  }
11265
11272
  _getPointerById(e) {
11266
11273
  return this._pointerPositions.find((n) => n.id === e);
@@ -11313,7 +11320,7 @@ let HA = class extends ii {
11313
11320
  }
11314
11321
  super.add(e);
11315
11322
  const o = this.children.length;
11316
- return o > LC && fe.warn("The stage has " + o + " layers. Recommended maximum number of layers is 3-5. Adding more layers into the stage may drop the performance. Rethink your tree structure, you can use Konva.Group."), e.setSize({ width: this.width(), height: this.height() }), e.draw(), Qe.isBrowser && this.content.appendChild(e.canvas._canvas), this;
11323
+ return o > kC && fe.warn("The stage has " + o + " layers. Recommended maximum number of layers is 3-5. Adding more layers into the stage may drop the performance. Rethink your tree structure, you can use Konva.Group."), e.setSize({ width: this.width(), height: this.height() }), e.draw(), Qe.isBrowser && this.content.appendChild(e.canvas._canvas), this;
11317
11324
  }
11318
11325
  getParent() {
11319
11326
  return null;
@@ -11334,7 +11341,7 @@ let HA = class extends ii {
11334
11341
  return this.children;
11335
11342
  }
11336
11343
  _bindContentEvents() {
11337
- Qe.isBrowser && kC.forEach(([e, n]) => {
11344
+ Qe.isBrowser && NC.forEach(([e, n]) => {
11338
11345
  this.content.addEventListener(e, (o) => {
11339
11346
  this[n](o);
11340
11347
  }, { passive: !1 });
@@ -11572,7 +11579,7 @@ let HA = class extends ii {
11572
11579
  }), this;
11573
11580
  }
11574
11581
  };
11575
- HA.prototype.nodeType = EC;
11582
+ HA.prototype.nodeType = RC;
11576
11583
  Xn(HA);
11577
11584
  ee.addGetterSetter(HA, "container");
11578
11585
  Qe.isBrowser && document.addEventListener("visibilitychange", () => {
@@ -11586,33 +11593,33 @@ function Dg() {
11586
11593
  return pA || (pA = fe.createCanvasElement().getContext("2d"), pA);
11587
11594
  }
11588
11595
  const Vf = {};
11589
- function PC(t) {
11596
+ function MC(t) {
11590
11597
  const e = this.attrs.fillRule;
11591
11598
  e ? t.fill(e) : t.fill();
11592
11599
  }
11593
- function MC(t) {
11600
+ function BC(t) {
11594
11601
  t.stroke();
11595
11602
  }
11596
- function BC(t) {
11603
+ function zC(t) {
11597
11604
  const e = this.attrs.fillRule;
11598
11605
  e ? t.fill(e) : t.fill();
11599
11606
  }
11600
- function zC(t) {
11607
+ function FC(t) {
11601
11608
  t.stroke();
11602
11609
  }
11603
- function FC() {
11610
+ function IC() {
11604
11611
  this._clearCache(h5);
11605
11612
  }
11606
- function IC() {
11613
+ function OC() {
11607
11614
  this._clearCache(p5);
11608
11615
  }
11609
- function OC() {
11616
+ function UC() {
11610
11617
  this._clearCache(A5);
11611
11618
  }
11612
- function UC() {
11619
+ function GC() {
11613
11620
  this._clearCache(m5);
11614
11621
  }
11615
- function GC() {
11622
+ function HC() {
11616
11623
  this._clearCache(g5);
11617
11624
  }
11618
11625
  class ze extends Ge {
@@ -11843,19 +11850,19 @@ class ze extends Ge {
11843
11850
  Qf(e);
11844
11851
  }
11845
11852
  }
11846
- ze.prototype._fillFunc = PC;
11847
- ze.prototype._strokeFunc = MC;
11848
- ze.prototype._fillFuncHit = BC;
11849
- ze.prototype._strokeFuncHit = zC;
11853
+ ze.prototype._fillFunc = MC;
11854
+ ze.prototype._strokeFunc = BC;
11855
+ ze.prototype._fillFuncHit = zC;
11856
+ ze.prototype._strokeFuncHit = FC;
11850
11857
  ze.prototype._centroid = !1;
11851
11858
  ze.prototype.nodeType = "Shape";
11852
11859
  Xn(ze);
11853
11860
  ze.prototype.eventListeners = {};
11854
- ze.prototype.on.call(ze.prototype, "shadowColorChange.konva shadowBlurChange.konva shadowOffsetChange.konva shadowOpacityChange.konva shadowEnabledChange.konva", FC);
11855
- ze.prototype.on.call(ze.prototype, "shadowColorChange.konva shadowOpacityChange.konva shadowEnabledChange.konva", IC);
11856
- ze.prototype.on.call(ze.prototype, "fillPriorityChange.konva fillPatternImageChange.konva fillPatternRepeatChange.konva fillPatternScaleXChange.konva fillPatternScaleYChange.konva fillPatternOffsetXChange.konva fillPatternOffsetYChange.konva fillPatternXChange.konva fillPatternYChange.konva fillPatternRotationChange.konva", OC);
11857
- ze.prototype.on.call(ze.prototype, "fillPriorityChange.konva fillLinearGradientColorStopsChange.konva fillLinearGradientStartPointXChange.konva fillLinearGradientStartPointYChange.konva fillLinearGradientEndPointXChange.konva fillLinearGradientEndPointYChange.konva", UC);
11858
- ze.prototype.on.call(ze.prototype, "fillPriorityChange.konva fillRadialGradientColorStopsChange.konva fillRadialGradientStartPointXChange.konva fillRadialGradientStartPointYChange.konva fillRadialGradientEndPointXChange.konva fillRadialGradientEndPointYChange.konva fillRadialGradientStartRadiusChange.konva fillRadialGradientEndRadiusChange.konva", GC);
11861
+ ze.prototype.on.call(ze.prototype, "shadowColorChange.konva shadowBlurChange.konva shadowOffsetChange.konva shadowOpacityChange.konva shadowEnabledChange.konva", IC);
11862
+ ze.prototype.on.call(ze.prototype, "shadowColorChange.konva shadowOpacityChange.konva shadowEnabledChange.konva", OC);
11863
+ ze.prototype.on.call(ze.prototype, "fillPriorityChange.konva fillPatternImageChange.konva fillPatternRepeatChange.konva fillPatternScaleXChange.konva fillPatternScaleYChange.konva fillPatternOffsetXChange.konva fillPatternOffsetYChange.konva fillPatternXChange.konva fillPatternYChange.konva fillPatternRotationChange.konva", UC);
11864
+ ze.prototype.on.call(ze.prototype, "fillPriorityChange.konva fillLinearGradientColorStopsChange.konva fillLinearGradientStartPointXChange.konva fillLinearGradientStartPointYChange.konva fillLinearGradientEndPointXChange.konva fillLinearGradientEndPointYChange.konva", GC);
11865
+ ze.prototype.on.call(ze.prototype, "fillPriorityChange.konva fillRadialGradientColorStopsChange.konva fillRadialGradientStartPointXChange.konva fillRadialGradientStartPointYChange.konva fillRadialGradientEndPointXChange.konva fillRadialGradientEndPointYChange.konva fillRadialGradientStartRadiusChange.konva fillRadialGradientEndRadiusChange.konva", HC);
11859
11866
  ee.addGetterSetter(ze, "stroke", void 0, $x());
11860
11867
  ee.addGetterSetter(ze, "strokeWidth", 2, Xe());
11861
11868
  ee.addGetterSetter(ze, "fillAfterStrokeEnabled", !1);
@@ -11947,13 +11954,13 @@ ee.backCompat(ze, {
11947
11954
  getDrawHitFunc: "getHitFunc",
11948
11955
  setDrawHitFunc: "setHitFunc"
11949
11956
  });
11950
- const HC = "beforeDraw", XC = "draw", v5 = [
11957
+ const XC = "beforeDraw", WC = "draw", v5 = [
11951
11958
  { x: 0, y: 0 },
11952
11959
  { x: -1, y: -1 },
11953
11960
  { x: 1, y: -1 },
11954
11961
  { x: 1, y: 1 },
11955
11962
  { x: -1, y: 1 }
11956
- ], WC = v5.length;
11963
+ ], QC = v5.length;
11957
11964
  let tc = class extends ii {
11958
11965
  constructor(e) {
11959
11966
  super(e), this.canvas = new el(), this.hitCanvas = new Sv({
@@ -12066,7 +12073,7 @@ let tc = class extends ii {
12066
12073
  return null;
12067
12074
  let n = 1, o = !1;
12068
12075
  for (; ; ) {
12069
- for (let i = 0; i < WC; i++) {
12076
+ for (let i = 0; i < QC; i++) {
12070
12077
  const c = v5[i], d = this._getIntersection({
12071
12078
  x: e.x + c.x * n,
12072
12079
  y: e.y + c.y * n
@@ -12099,9 +12106,9 @@ let tc = class extends ii {
12099
12106
  }
12100
12107
  drawScene(e, n, o) {
12101
12108
  const i = this.getLayer(), c = e || i && i.getCanvas();
12102
- return this._fire(HC, {
12109
+ return this._fire(XC, {
12103
12110
  node: this
12104
- }), this.clearBeforeDraw() && c.getContext().clear(), ii.prototype.drawScene.call(this, c, n, o), this._fire(XC, {
12111
+ }), this.clearBeforeDraw() && c.getContext().clear(), ii.prototype.drawScene.call(this, c, n, o), this._fire(WC, {
12105
12112
  node: this
12106
12113
  }), this;
12107
12114
  }
@@ -12235,15 +12242,15 @@ class _i {
12235
12242
  _i.animations = [];
12236
12243
  _i.animIdCounter = 0;
12237
12244
  _i.animRunning = !1;
12238
- const QC = {
12245
+ const YC = {
12239
12246
  node: 1,
12240
12247
  duration: 1,
12241
12248
  easing: 1,
12242
12249
  onFinish: 1,
12243
12250
  yoyo: 1
12244
- }, YC = 1, q2 = 2, K2 = 3, J2 = ["fill", "stroke", "shadowColor"];
12245
- let VC = 0;
12246
- class jC {
12251
+ }, VC = 1, q2 = 2, K2 = 3, J2 = ["fill", "stroke", "shadowColor"];
12252
+ let jC = 0;
12253
+ class qC {
12247
12254
  constructor(e, n, o, i, c, d, h) {
12248
12255
  this.prop = e, this.propFunc = n, this.begin = i, this._pos = i, this.duration = d, this._change = 0, this.prevPos = 0, this.yoyo = h, this._time = 0, this._position = 0, this._startTime = 0, this._finish = 0, this.func = o, this._change = c - this.begin, this.pause();
12249
12256
  }
@@ -12286,7 +12293,7 @@ class jC {
12286
12293
  this.state === q2 ? this.setTime(e) : this.state === K2 && this.setTime(this.duration - e);
12287
12294
  }
12288
12295
  pause() {
12289
- this.state = YC, this.fire("onPause");
12296
+ this.state = VC, this.fire("onPause");
12290
12297
  }
12291
12298
  getTimer() {
12292
12299
  return (/* @__PURE__ */ new Date()).getTime();
@@ -12296,15 +12303,15 @@ class kn {
12296
12303
  constructor(e) {
12297
12304
  const n = this, o = e.node, i = o._id, c = e.easing || jf.Linear, d = !!e.yoyo;
12298
12305
  let h, p;
12299
- typeof e.duration > "u" ? h = 0.3 : e.duration === 0 ? h = 1e-3 : h = e.duration, this.node = o, this._id = VC++;
12306
+ typeof e.duration > "u" ? h = 0.3 : e.duration === 0 ? h = 1e-3 : h = e.duration, this.node = o, this._id = jC++;
12300
12307
  const u = o.getLayer() || (o instanceof Qe.Stage ? o.getLayers() : null);
12301
12308
  u || fe.error("Tween constructor have `node` that is not in a layer. Please add node into layer first."), this.anim = new _i(function() {
12302
12309
  n.tween.onEnterFrame();
12303
- }, u), this.tween = new jC(p, function(A) {
12310
+ }, u), this.tween = new qC(p, function(A) {
12304
12311
  n._tweenFunc(A);
12305
12312
  }, c, 0, 1, h * 1e3, d), this._addListeners(), kn.attrs[i] || (kn.attrs[i] = {}), kn.attrs[i][this._id] || (kn.attrs[i][this._id] = {}), kn.tweens[i] || (kn.tweens[i] = {});
12306
12313
  for (p in e)
12307
- QC[p] === void 0 && this._addAttr(p, e[p]);
12314
+ YC[p] === void 0 && this._addAttr(p, e[p]);
12308
12315
  this.reset(), this.onFinish = e.onFinish, this.onReset = e.onReset, this.onUpdate = e.onUpdate;
12309
12316
  }
12310
12317
  _addAttr(e, n) {
@@ -12534,7 +12541,7 @@ function Z2(t, e) {
12534
12541
  }
12535
12542
  return o;
12536
12543
  }
12537
- function qC(t) {
12544
+ function KC(t) {
12538
12545
  const e = [
12539
12546
  [t[0], t[2], t[4], t[6]],
12540
12547
  [t[1], t[3], t[5], t[7]]
@@ -12623,7 +12630,7 @@ let ps = class extends ze {
12623
12630
  ] : this.bezier() ? e = [
12624
12631
  e[0],
12625
12632
  e[1],
12626
- ...qC(this.points()),
12633
+ ...KC(this.points()),
12627
12634
  e[e.length - 2],
12628
12635
  e[e.length - 1]
12629
12636
  ] : e = this.points();
@@ -12644,8 +12651,8 @@ Xn(ps);
12644
12651
  ee.addGetterSetter(ps, "closed", !1);
12645
12652
  ee.addGetterSetter(ps, "bezier", !1);
12646
12653
  ee.addGetterSetter(ps, "tension", 0, Xe());
12647
- ee.addGetterSetter(ps, "points", [], dC());
12648
- const KC = [
12654
+ ee.addGetterSetter(ps, "points", [], fC());
12655
+ const JC = [
12649
12656
  [],
12650
12657
  [],
12651
12658
  [
@@ -12993,7 +13000,7 @@ const KC = [
12993
13000
  -0.9951872199970213,
12994
13001
  0.9951872199970213
12995
13002
  ]
12996
- ], JC = [
13003
+ ], ZC = [
12997
13004
  [],
12998
13005
  [],
12999
13006
  [1, 1],
@@ -13338,12 +13345,12 @@ const KC = [
13338
13345
  0.0123412297999872,
13339
13346
  0.0123412297999872
13340
13347
  ]
13341
- ], ZC = [[1], [1, 1], [1, 2, 1], [1, 3, 3, 1]], $2 = (t, e, n) => {
13348
+ ], $C = [[1], [1, 1], [1, 2, 1], [1, 3, 3, 1]], $2 = (t, e, n) => {
13342
13349
  let o, i;
13343
13350
  const d = n / 2;
13344
13351
  o = 0;
13345
13352
  for (let h = 0; h < 20; h++)
13346
- i = d * KC[20][h] + d, o += JC[20][h] * $C(t, e, i);
13353
+ i = d * JC[20][h] + d, o += ZC[20][h] * e8(t, e, i);
13347
13354
  return d * o;
13348
13355
  }, ex = (t, e, n) => {
13349
13356
  n === void 0 && (n = 1);
@@ -13353,7 +13360,7 @@ const KC = [
13353
13360
  const A = p / (2 * h), y = u / h, x = n + A, S = y - A * A, w = x * x + S > 0 ? Math.sqrt(x * x + S) : 0, E = A * A + S > 0 ? Math.sqrt(A * A + S) : 0, R = A + Math.sqrt(A * A + S) !== 0 ? S * Math.log(Math.abs((x + w) / (A + E))) : 0;
13354
13361
  return Math.sqrt(h) / 2 * (x * w - A * E + R);
13355
13362
  };
13356
- function $C(t, e, n) {
13363
+ function e8(t, e, n) {
13357
13364
  const o = ov(1, n, t), i = ov(1, n, e), c = o * o + i * i;
13358
13365
  return Math.sqrt(c);
13359
13366
  }
@@ -13365,7 +13372,7 @@ const ov = (t, e, n) => {
13365
13372
  if (t === 0) {
13366
13373
  c = 0;
13367
13374
  for (let d = 0; d <= o; d++)
13368
- c += ZC[o][d] * Math.pow(1 - e, o - d) * Math.pow(e, d) * n[d];
13375
+ c += $C[o][d] * Math.pow(1 - e, o - d) * Math.pow(e, d) * n[d];
13369
13376
  return c;
13370
13377
  } else {
13371
13378
  i = new Array(o);
@@ -13944,7 +13951,7 @@ const x5 = [
13944
13951
  "pointerDirection",
13945
13952
  "pointerWidth",
13946
13953
  "pointerHeight"
13947
- ], e8 = "Change.konva", t8 = "none", sv = "up", lv = "right", cv = "down", uv = "left", n8 = x5.length;
13954
+ ], t8 = "Change.konva", n8 = "none", sv = "up", lv = "right", cv = "down", uv = "left", r8 = x5.length;
13948
13955
  class Ev extends qu {
13949
13956
  constructor(e) {
13950
13957
  super(e), this.on("add.konva", function(n) {
@@ -13962,8 +13969,8 @@ class Ev extends qu {
13962
13969
  const i = function() {
13963
13970
  n._sync();
13964
13971
  };
13965
- for (o = 0; o < n8; o++)
13966
- e.on(x5[o] + e8, i);
13972
+ for (o = 0; o < r8; o++)
13973
+ e.on(x5[o] + t8, i);
13967
13974
  }
13968
13975
  getWidth() {
13969
13976
  return this.getText().width();
@@ -14020,7 +14027,7 @@ class rc extends ze {
14020
14027
  }
14021
14028
  rc.prototype.className = "Tag";
14022
14029
  Xn(rc);
14023
- ee.addGetterSetter(rc, "pointerDirection", t8);
14030
+ ee.addGetterSetter(rc, "pointerDirection", n8);
14024
14031
  ee.addGetterSetter(rc, "pointerWidth", 0, Xe());
14025
14032
  ee.addGetterSetter(rc, "pointerHeight", 0, Xe());
14026
14033
  ee.addGetterSetter(rc, "cornerRadius", 0, GA(4));
@@ -14219,7 +14226,7 @@ function Js(t) {
14219
14226
  return e;
14220
14227
  }, []);
14221
14228
  }
14222
- const zu = "auto", r8 = "center", b5 = "inherit", kf = "justify", a8 = "Change.konva", i8 = "2d", rx = "-", S5 = "left", o8 = "text", s8 = "Text", l8 = "top", c8 = "bottom", ax = "middle", w5 = "normal", u8 = "px ", AA = " ", d8 = "right", ix = "rtl", f8 = "word", h8 = "char", ox = "none", kg = "…", C5 = [
14229
+ const zu = "auto", a8 = "center", b5 = "inherit", kf = "justify", i8 = "Change.konva", o8 = "2d", rx = "-", S5 = "left", s8 = "text", l8 = "Text", c8 = "top", u8 = "bottom", ax = "middle", w5 = "normal", d8 = "px ", AA = " ", f8 = "right", ix = "rtl", h8 = "word", p8 = "char", ox = "none", kg = "…", C5 = [
14223
14230
  "direction",
14224
14231
  "fontFamily",
14225
14232
  "fontSize",
@@ -14235,8 +14242,8 @@ const zu = "auto", r8 = "center", b5 = "inherit", kf = "justify", a8 = "Change.k
14235
14242
  "wrap",
14236
14243
  "ellipsis",
14237
14244
  "letterSpacing"
14238
- ], p8 = C5.length;
14239
- function A8(t) {
14245
+ ], A8 = C5.length;
14246
+ function m8(t) {
14240
14247
  return t.split(",").map((e) => {
14241
14248
  e = e.trim();
14242
14249
  const n = e.indexOf(" ") >= 0, o = e.indexOf('"') >= 0 || e.indexOf("'") >= 0;
@@ -14245,22 +14252,22 @@ function A8(t) {
14245
14252
  }
14246
14253
  let mA;
14247
14254
  function Ng() {
14248
- return mA || (mA = fe.createCanvasElement().getContext(i8), mA);
14255
+ return mA || (mA = fe.createCanvasElement().getContext(o8), mA);
14249
14256
  }
14250
- function m8(t) {
14257
+ function g8(t) {
14251
14258
  t.fillText(this._partialText, this._partialTextX, this._partialTextY);
14252
14259
  }
14253
- function g8(t) {
14260
+ function v8(t) {
14254
14261
  t.setAttr("miterLimit", 2), t.strokeText(this._partialText, this._partialTextX, this._partialTextY);
14255
14262
  }
14256
- function v8(t) {
14263
+ function y8(t) {
14257
14264
  return t = t || {}, !t.fillLinearGradientColorStops && !t.fillRadialGradientColorStops && !t.fillPatternImage && (t.fill = t.fill || "black"), t;
14258
14265
  }
14259
14266
  let Pn = class extends ze {
14260
14267
  constructor(e) {
14261
- super(v8(e)), this._partialTextX = 0, this._partialTextY = 0;
14262
- for (let n = 0; n < p8; n++)
14263
- this.on(C5[n] + a8, this._setTextData);
14268
+ super(y8(e)), this._partialTextX = 0, this._partialTextY = 0;
14269
+ for (let n = 0; n < A8; n++)
14270
+ this.on(C5[n] + i8, this._setTextData);
14264
14271
  this._setTextData();
14265
14272
  }
14266
14273
  _sceneFunc(e) {
@@ -14277,10 +14284,10 @@ let Pn = class extends ze {
14277
14284
  const Q = (n = j.fontBoundingBoxAscent) !== null && n !== void 0 ? n : j.actualBoundingBoxAscent, V = (o = j.fontBoundingBoxDescent) !== null && o !== void 0 ? o : j.actualBoundingBoxDescent;
14278
14285
  Y = (Q - V) / 2 + p / 2;
14279
14286
  }
14280
- for (A === ix && e.setAttr("direction", A), e.setAttr("font", this._getContextFont()), e.setAttr("textBaseline", q), e.setAttr("textAlign", S5), u === ax ? y = (this.getHeight() - c * p - d * 2) / 2 : u === c8 && (y = this.getHeight() - c * p - d * 2), e.translate(d, y + d), F = 0; F < c; F++) {
14287
+ for (A === ix && e.setAttr("direction", A), e.setAttr("font", this._getContextFont()), e.setAttr("textBaseline", q), e.setAttr("textAlign", S5), u === ax ? y = (this.getHeight() - c * p - d * 2) / 2 : u === u8 && (y = this.getHeight() - c * p - d * 2), e.translate(d, y + d), F = 0; F < c; F++) {
14281
14288
  let j = 0, Q = 0;
14282
14289
  const V = i[F], me = V.text, X = V.width, ie = V.lastInParagraph;
14283
- if (e.save(), x === d8 ? j += S - X - d * 2 : x === r8 && (j += (S - X - d * 2) / 2), B) {
14290
+ if (e.save(), x === f8 ? j += S - X - d * 2 : x === a8 && (j += (S - X - d * 2) / 2), B) {
14284
14291
  e.save(), e.beginPath();
14285
14292
  const te = M ?? (Qe.legacyTextRendering ? Math.round(h / 2) : Math.round(h / 4)), oe = j, he = Y + Q + te;
14286
14293
  e.moveTo(oe, he);
@@ -14331,7 +14338,7 @@ let Pn = class extends ze {
14331
14338
  }
14332
14339
  setText(e) {
14333
14340
  const n = fe._isString(e) ? e : e == null ? "" : e + "";
14334
- return this._setAttr(o8, n), this;
14341
+ return this._setAttr(s8, n), this;
14335
14342
  }
14336
14343
  getWidth() {
14337
14344
  return this.attrs.width === zu || this.attrs.width === void 0 ? this.getTextWidth() + this.padding() * 2 : this.attrs.width;
@@ -14367,7 +14374,7 @@ let Pn = class extends ze {
14367
14374
  };
14368
14375
  }
14369
14376
  _getContextFont() {
14370
- return this.fontStyle() + AA + this.fontVariant() + AA + (this.fontSize() + u8) + A8(this.fontFamily());
14377
+ return this.fontStyle() + AA + this.fontVariant() + AA + (this.fontSize() + d8) + m8(this.fontFamily());
14371
14378
  }
14372
14379
  _addTextLine(e) {
14373
14380
  this.align() === kf && (e = e.trim());
@@ -14384,7 +14391,7 @@ let Pn = class extends ze {
14384
14391
  }
14385
14392
  _setTextData() {
14386
14393
  let e = this.text().split(`
14387
- `), n = +this.fontSize(), o = 0, i = this.lineHeight() * n, c = this.attrs.width, d = this.attrs.height, h = c !== zu && c !== void 0, p = d !== zu && d !== void 0, u = this.padding(), A = c - u * 2, y = d - u * 2, x = 0, S = this.wrap(), w = S !== ox, E = S !== h8 && w, R = this.ellipsis();
14394
+ `), n = +this.fontSize(), o = 0, i = this.lineHeight() * n, c = this.attrs.width, d = this.attrs.height, h = c !== zu && c !== void 0, p = d !== zu && d !== void 0, u = this.padding(), A = c - u * 2, y = d - u * 2, x = 0, S = this.wrap(), w = S !== ox, E = S !== p8 && w, R = this.ellipsis();
14388
14395
  this.textArr = [], Ng().font = this._getContextFont();
14389
14396
  const T = R ? this._getTextWidth(kg) : 0;
14390
14397
  for (let M = 0, B = e.length; M < B; ++M) {
@@ -14442,9 +14449,9 @@ let Pn = class extends ze {
14442
14449
  return e && n ? !0 : super._useBufferCanvas();
14443
14450
  }
14444
14451
  };
14445
- Pn.prototype._fillFunc = m8;
14446
- Pn.prototype._strokeFunc = g8;
14447
- Pn.prototype.className = s8;
14452
+ Pn.prototype._fillFunc = g8;
14453
+ Pn.prototype._strokeFunc = v8;
14454
+ Pn.prototype.className = l8;
14448
14455
  Pn.prototype._attrsAffectingSize = [
14449
14456
  "text",
14450
14457
  "fontSize",
@@ -14463,16 +14470,16 @@ ee.addGetterSetter(Pn, "fontStyle", w5);
14463
14470
  ee.addGetterSetter(Pn, "fontVariant", w5);
14464
14471
  ee.addGetterSetter(Pn, "padding", 0, Xe());
14465
14472
  ee.addGetterSetter(Pn, "align", S5);
14466
- ee.addGetterSetter(Pn, "verticalAlign", l8);
14473
+ ee.addGetterSetter(Pn, "verticalAlign", c8);
14467
14474
  ee.addGetterSetter(Pn, "lineHeight", 1, Xe());
14468
- ee.addGetterSetter(Pn, "wrap", f8);
14475
+ ee.addGetterSetter(Pn, "wrap", h8);
14469
14476
  ee.addGetterSetter(Pn, "ellipsis", !1, qi());
14470
14477
  ee.addGetterSetter(Pn, "letterSpacing", 0, Xe());
14471
14478
  ee.addGetterSetter(Pn, "text", "", ec());
14472
14479
  ee.addGetterSetter(Pn, "textDecoration", "");
14473
14480
  ee.addGetterSetter(Pn, "underlineOffset", void 0, Xe());
14474
14481
  ee.addGetterSetter(Pn, "charRenderFunc", void 0);
14475
- const y8 = "", _5 = "normal";
14482
+ const x8 = "", _5 = "normal";
14476
14483
  function E5(t) {
14477
14484
  t.fillText(this.partialText, 0, 0);
14478
14485
  }
@@ -14642,10 +14649,10 @@ ee.addGetterSetter(_r, "align", "left");
14642
14649
  ee.addGetterSetter(_r, "letterSpacing", 0, Xe());
14643
14650
  ee.addGetterSetter(_r, "textBaseline", "middle");
14644
14651
  ee.addGetterSetter(_r, "fontVariant", _5);
14645
- ee.addGetterSetter(_r, "text", y8);
14652
+ ee.addGetterSetter(_r, "text", x8);
14646
14653
  ee.addGetterSetter(_r, "textDecoration", "");
14647
14654
  ee.addGetterSetter(_r, "kerningFunc", void 0);
14648
- const T5 = "tr-konva", x8 = [
14655
+ const T5 = "tr-konva", b8 = [
14649
14656
  "resizeEnabledChange",
14650
14657
  "rotateAnchorOffsetChange",
14651
14658
  "rotateAnchorAngleChange",
@@ -14662,7 +14669,7 @@ const T5 = "tr-konva", x8 = [
14662
14669
  "anchorCornerRadiusChange",
14663
14670
  "ignoreStrokeChange",
14664
14671
  "anchorStyleFuncChange"
14665
- ].map((t) => t + `.${T5}`).join(" "), sx = "nodesRect", b8 = [
14672
+ ].map((t) => t + `.${T5}`).join(" "), sx = "nodesRect", S8 = [
14666
14673
  "widthChange",
14667
14674
  "heightChange",
14668
14675
  "scaleXChange",
@@ -14675,7 +14682,7 @@ const T5 = "tr-konva", x8 = [
14675
14682
  "transformsEnabledChange",
14676
14683
  "strokeWidthChange",
14677
14684
  "draggableChange"
14678
- ], S8 = {
14685
+ ], w8 = {
14679
14686
  "top-left": -45,
14680
14687
  "top-center": 0,
14681
14688
  "top-right": 45,
@@ -14684,11 +14691,11 @@ const T5 = "tr-konva", x8 = [
14684
14691
  "bottom-left": -135,
14685
14692
  "bottom-center": 180,
14686
14693
  "bottom-right": 135
14687
- }, w8 = "ontouchstart" in Qe._global;
14688
- function C8(t, e, n) {
14694
+ }, C8 = "ontouchstart" in Qe._global;
14695
+ function _8(t, e, n) {
14689
14696
  if (t === "rotater")
14690
14697
  return n;
14691
- e += fe.degToRad(S8[t] || 0);
14698
+ e += fe.degToRad(w8[t] || 0);
14692
14699
  const o = (fe.radToDeg(e) % 360 + 360) % 360;
14693
14700
  return fe._inRange(o, 315 + 22.5, 360) || fe._inRange(o, 0, 22.5) ? "ns-resize" : fe._inRange(o, 45 - 22.5, 45 + 22.5) ? "nesw-resize" : fe._inRange(o, 90 - 22.5, 90 + 22.5) ? "ew-resize" : fe._inRange(o, 135 - 22.5, 135 + 22.5) ? "nwse-resize" : fe._inRange(o, 180 - 22.5, 180 + 22.5) ? "ns-resize" : fe._inRange(o, 225 - 22.5, 225 + 22.5) ? "nesw-resize" : fe._inRange(o, 270 - 22.5, 270 + 22.5) ? "ew-resize" : fe._inRange(o, 315 - 22.5, 315 + 22.5) ? "nwse-resize" : (fe.error("Transformer has unknown angle for cursor detection: " + o), "pointer");
14694
14701
  }
@@ -14702,7 +14709,7 @@ const MA = [
14702
14709
  "bottom-center",
14703
14710
  "bottom-right"
14704
14711
  ];
14705
- function _8(t) {
14712
+ function E8(t) {
14706
14713
  return {
14707
14714
  x: t.x + t.width / 2 * Math.cos(t.rotation) + t.height / 2 * Math.sin(-t.rotation),
14708
14715
  y: t.y + t.height / 2 * Math.cos(t.rotation) + t.width / 2 * Math.sin(t.rotation)
@@ -14717,11 +14724,11 @@ function D5(t, e, n) {
14717
14724
  y: i
14718
14725
  };
14719
14726
  }
14720
- function E8(t, e) {
14721
- const n = _8(t);
14727
+ function R8(t, e) {
14728
+ const n = E8(t);
14722
14729
  return D5(t, e, n);
14723
14730
  }
14724
- function R8(t, e, n) {
14731
+ function T8(t, e, n) {
14725
14732
  let o = e;
14726
14733
  for (let i = 0; i < t.length; i++) {
14727
14734
  const c = Qe.getAngle(t[i]), d = Math.abs(c - e) % (Math.PI * 2);
@@ -14731,7 +14738,7 @@ function R8(t, e, n) {
14731
14738
  }
14732
14739
  let dv = 0, en = class extends qu {
14733
14740
  constructor(e) {
14734
- super(e), this._movingAnchorName = null, this._transforming = !1, this._createElements(), this._handleMouseMove = this._handleMouseMove.bind(this), this._handleMouseUp = this._handleMouseUp.bind(this), this.update = this.update.bind(this), this.on(x8, this.update), this.getNode() && this.update();
14741
+ super(e), this._movingAnchorName = null, this._transforming = !1, this._createElements(), this._handleMouseMove = this._handleMouseMove.bind(this), this._handleMouseUp = this._handleMouseUp.bind(this), this.update = this.update.bind(this), this.on(b8, this.update), this.getNode() && this.update();
14735
14742
  }
14736
14743
  attachTo(e) {
14737
14744
  return this.setNode(e), this;
@@ -14756,7 +14763,7 @@ let dv = 0, en = class extends qu {
14756
14763
  const d = i._attrsAffectingSize.map((h) => h + "Change." + this._getEventNamespace()).join(" ");
14757
14764
  i.on(d, c);
14758
14765
  }
14759
- i.on(b8.map((d) => d + `.${this._getEventNamespace()}`).join(" "), c), i.on(`absoluteTransformChange.${this._getEventNamespace()}`, c), this._proxyDrag(i);
14766
+ i.on(S8.map((d) => d + `.${this._getEventNamespace()}`).join(" "), c), i.on(`absoluteTransformChange.${this._getEventNamespace()}`, c), this._proxyDrag(i);
14760
14767
  }), this._resetTransformCache(), !!this.findOne(".top-left") && this.update(), this;
14761
14768
  }
14762
14769
  _proxyDrag(e) {
@@ -14879,7 +14886,7 @@ let dv = 0, en = class extends qu {
14879
14886
  name: e + " _anchor",
14880
14887
  dragDistance: 0,
14881
14888
  draggable: !0,
14882
- hitStrokeWidth: w8 ? 10 : "auto"
14889
+ hitStrokeWidth: C8 ? 10 : "auto"
14883
14890
  }), o = this;
14884
14891
  n.on("mousedown touchstart", function(i) {
14885
14892
  o._handleMouseDown(i);
@@ -14888,7 +14895,7 @@ let dv = 0, en = class extends qu {
14888
14895
  }), n.on("dragend", (i) => {
14889
14896
  i.cancelBubble = !0;
14890
14897
  }), n.on("mouseenter", () => {
14891
- const i = Qe.getAngle(this.rotation()), c = this.rotateAnchorCursor(), d = C8(e, i, c);
14898
+ const i = Qe.getAngle(this.rotation()), c = this.rotateAnchorCursor(), d = _8(e, i, c);
14892
14899
  n.getStage().content && (n.getStage().content.style.cursor = d), this._cursorChange = !0;
14893
14900
  }), n.on("mouseout", () => {
14894
14901
  n.getStage().content && (n.getStage().content.style.cursor = ""), this._cursorChange = !1;
@@ -14961,7 +14968,7 @@ let dv = 0, en = class extends qu {
14961
14968
  const B = Qe.getAngle(this.rotateAnchorAngle());
14962
14969
  let I = Math.atan2(-o, n) + Math.PI / 2 - B;
14963
14970
  M.height < 0 && (I -= Math.PI);
14964
- const Y = Qe.getAngle(this.rotation()) + I, q = Qe.getAngle(this.rotationSnapTolerance()), Q = R8(this.rotationSnaps(), Y, q) - M.rotation, V = E8(M, Q);
14971
+ const Y = Qe.getAngle(this.rotation()) + I, q = Qe.getAngle(this.rotationSnapTolerance()), Q = T8(this.rotationSnaps(), Y, q) - M.rotation, V = R8(M, Q);
14965
14972
  this._fitNodesInto(V, e);
14966
14973
  return;
14967
14974
  }
@@ -15247,14 +15254,14 @@ let dv = 0, en = class extends qu {
15247
15254
  }
15248
15255
  };
15249
15256
  en.isTransforming = () => dv > 0;
15250
- function T8(t) {
15257
+ function D8(t) {
15251
15258
  return t instanceof Array || fe.warn("enabledAnchors value should be an array"), t instanceof Array && t.forEach(function(e) {
15252
15259
  MA.indexOf(e) === -1 && fe.warn("Unknown anchor name: " + e + ". Available names are: " + MA.join(", "));
15253
15260
  }), t || [];
15254
15261
  }
15255
15262
  en.prototype.className = "Transformer";
15256
15263
  Xn(en);
15257
- ee.addGetterSetter(en, "enabledAnchors", MA, T8);
15264
+ ee.addGetterSetter(en, "enabledAnchors", MA, D8);
15258
15265
  ee.addGetterSetter(en, "flipEnabled", !0, qi());
15259
15266
  ee.addGetterSetter(en, "resizeEnabled", !0);
15260
15267
  ee.addGetterSetter(en, "anchorSize", 10, Xe());
@@ -15322,7 +15329,7 @@ ee.backCompat(As, {
15322
15329
  function lx() {
15323
15330
  this.r = 0, this.g = 0, this.b = 0, this.a = 0, this.next = null;
15324
15331
  }
15325
- const D8 = [
15332
+ const L8 = [
15326
15333
  512,
15327
15334
  512,
15328
15335
  456,
@@ -15578,7 +15585,7 @@ const D8 = [
15578
15585
  263,
15579
15586
  261,
15580
15587
  259
15581
- ], L8 = [
15588
+ ], k8 = [
15582
15589
  9,
15583
15590
  11,
15584
15591
  12,
@@ -15835,10 +15842,10 @@ const D8 = [
15835
15842
  24,
15836
15843
  24
15837
15844
  ];
15838
- function k8(t, e) {
15845
+ function N8(t, e) {
15839
15846
  const n = t.data, o = t.width, i = t.height;
15840
15847
  let c, d, h, p, u, A, y, x, S, w, E, R, T, M, B, I, F, Y, q, j;
15841
- const Q = e + e + 1, V = o - 1, me = i - 1, X = e + 1, ie = X * (X + 1) / 2, D = new lx(), te = D8[e], oe = L8[e];
15848
+ const Q = e + e + 1, V = o - 1, me = i - 1, X = e + 1, ie = X * (X + 1) / 2, D = new lx(), te = L8[e], oe = k8[e];
15842
15849
  let he = null, K = D, re = null, ne = null;
15843
15850
  for (let O = 1; O < Q; O++)
15844
15851
  K = K.next = new lx(), O === X && (he = K);
@@ -15866,29 +15873,29 @@ function k8(t, e) {
15866
15873
  c = d << 2, n[c + 3] = q = y * te >> oe, q > 0 ? (q = 255 / q, n[c] = (p * te >> oe) * q, n[c + 1] = (u * te >> oe) * q, n[c + 2] = (A * te >> oe) * q) : n[c] = n[c + 1] = n[c + 2] = 0, p -= x, u -= S, A -= w, y -= E, x -= re.r, S -= re.g, w -= re.b, E -= re.a, c = O + ((c = _e + X) < me ? c : me) * o << 2, p += R += re.r = n[c], u += T += re.g = n[c + 1], A += M += re.b = n[c + 2], y += B += re.a = n[c + 3], re = re.next, x += I = ne.r, S += F = ne.g, w += Y = ne.b, E += q = ne.a, R -= I, T -= F, M -= Y, B -= q, ne = ne.next, d += o;
15867
15874
  }
15868
15875
  }
15869
- const N8 = function(e) {
15876
+ const P8 = function(e) {
15870
15877
  const n = Math.round(this.blurRadius());
15871
- n > 0 && k8(e, n);
15878
+ n > 0 && N8(e, n);
15872
15879
  };
15873
15880
  ee.addGetterSetter(Ge, "blurRadius", 0, Xe(), ee.afterSetFilter);
15874
- const P8 = function(t) {
15881
+ const M8 = function(t) {
15875
15882
  const e = this.brightness() * 255, n = t.data, o = n.length;
15876
15883
  for (let i = 0; i < o; i += 4)
15877
15884
  n[i] += e, n[i + 1] += e, n[i + 2] += e;
15878
15885
  };
15879
15886
  ee.addGetterSetter(Ge, "brightness", 0, Xe(), ee.afterSetFilter);
15880
- const M8 = function(t) {
15887
+ const B8 = function(t) {
15881
15888
  const e = this.brightness(), n = t.data, o = n.length;
15882
15889
  for (let i = 0; i < o; i += 4)
15883
15890
  n[i] = Math.min(255, n[i] * e), n[i + 1] = Math.min(255, n[i + 1] * e), n[i + 2] = Math.min(255, n[i + 2] * e);
15884
- }, B8 = function(t) {
15891
+ }, z8 = function(t) {
15885
15892
  const e = Math.pow((this.contrast() + 100) / 100, 2), n = t.data, o = n.length;
15886
15893
  let i = 150, c = 150, d = 150;
15887
15894
  for (let h = 0; h < o; h += 4)
15888
15895
  i = n[h], c = n[h + 1], d = n[h + 2], i /= 255, i -= 0.5, i *= e, i += 0.5, i *= 255, c /= 255, c -= 0.5, c *= e, c += 0.5, c *= 255, d /= 255, d -= 0.5, d *= e, d += 0.5, d *= 255, i = i < 0 ? 0 : i > 255 ? 255 : i, c = c < 0 ? 0 : c > 255 ? 255 : c, d = d < 0 ? 0 : d > 255 ? 255 : d, n[h] = i, n[h + 1] = c, n[h + 2] = d;
15889
15896
  };
15890
15897
  ee.addGetterSetter(Ge, "contrast", 0, Xe(), ee.afterSetFilter);
15891
- const z8 = function(t) {
15898
+ const F8 = function(t) {
15892
15899
  var e, n, o, i, c, d, h, p, u;
15893
15900
  const A = t.data, y = t.width, x = t.height, S = Math.min(1, Math.max(0, (n = (e = this.embossStrength) === null || e === void 0 ? void 0 : e.call(this)) !== null && n !== void 0 ? n : 0.5)), w = Math.min(1, Math.max(0, (i = (o = this.embossWhiteLevel) === null || o === void 0 ? void 0 : o.call(this)) !== null && i !== void 0 ? i : 0.5)), R = (h = {
15894
15901
  "top-left": 315,
@@ -15938,7 +15945,7 @@ function Pg(t, e, n, o, i) {
15938
15945
  let h = (t - e) / c;
15939
15946
  return h = d * h + o, h;
15940
15947
  }
15941
- const F8 = function(t) {
15948
+ const I8 = function(t) {
15942
15949
  const e = t.data, n = e.length;
15943
15950
  let o = e[0], i = o, c, d = e[1], h = d, p, u = e[2], A = u, y;
15944
15951
  const x = this.enhance();
@@ -15962,7 +15969,7 @@ const F8 = function(t) {
15962
15969
  e[B + 0] = Pg(e[B + 0], o, i, w, S), e[B + 1] = Pg(e[B + 1], d, h, R, E), e[B + 2] = Pg(e[B + 2], u, A, M, T);
15963
15970
  };
15964
15971
  ee.addGetterSetter(Ge, "enhance", 0, Xe(), ee.afterSetFilter);
15965
- const I8 = function(t) {
15972
+ const O8 = function(t) {
15966
15973
  const e = t.data, n = e.length;
15967
15974
  for (let o = 0; o < n; o += 4) {
15968
15975
  const i = 0.34 * e[o] + 0.5 * e[o + 1] + 0.16 * e[o + 2];
@@ -15972,12 +15979,12 @@ const I8 = function(t) {
15972
15979
  ee.addGetterSetter(Ge, "hue", 0, Xe(), ee.afterSetFilter);
15973
15980
  ee.addGetterSetter(Ge, "saturation", 0, Xe(), ee.afterSetFilter);
15974
15981
  ee.addGetterSetter(Ge, "luminance", 0, Xe(), ee.afterSetFilter);
15975
- const O8 = function(t) {
15982
+ const U8 = function(t) {
15976
15983
  const e = t.data, n = e.length, o = 1, i = Math.pow(2, this.saturation()), c = Math.abs(this.hue() + 360) % 360, d = this.luminance() * 127, h = o * i * Math.cos(c * Math.PI / 180), p = o * i * Math.sin(c * Math.PI / 180), u = 0.299 * o + 0.701 * h + 0.167 * p, A = 0.587 * o - 0.587 * h + 0.33 * p, y = 0.114 * o - 0.114 * h - 0.497 * p, x = 0.299 * o - 0.299 * h - 0.328 * p, S = 0.587 * o + 0.413 * h + 0.035 * p, w = 0.114 * o - 0.114 * h + 0.293 * p, E = 0.299 * o - 0.3 * h + 1.25 * p, R = 0.587 * o - 0.586 * h - 1.05 * p, T = 0.114 * o + 0.886 * h - 0.2 * p;
15977
15984
  let M, B, I, F;
15978
15985
  for (let Y = 0; Y < n; Y += 4)
15979
15986
  M = e[Y + 0], B = e[Y + 1], I = e[Y + 2], F = e[Y + 3], e[Y + 0] = u * M + A * B + y * I + d, e[Y + 1] = x * M + S * B + w * I + d, e[Y + 2] = E * M + R * B + T * I + d, e[Y + 3] = F;
15980
- }, U8 = function(t) {
15987
+ }, G8 = function(t) {
15981
15988
  const e = t.data, n = e.length, o = Math.pow(2, this.value()), i = Math.pow(2, this.saturation()), c = Math.abs(this.hue() + 360) % 360, d = o * i * Math.cos(c * Math.PI / 180), h = o * i * Math.sin(c * Math.PI / 180), p = 0.299 * o + 0.701 * d + 0.167 * h, u = 0.587 * o - 0.587 * d + 0.33 * h, A = 0.114 * o - 0.114 * d - 0.497 * h, y = 0.299 * o - 0.299 * d - 0.328 * h, x = 0.587 * o + 0.413 * d + 0.035 * h, S = 0.114 * o - 0.114 * d + 0.293 * h, w = 0.299 * o - 0.3 * d + 1.25 * h, E = 0.587 * o - 0.586 * d - 1.05 * h, R = 0.114 * o + 0.886 * d - 0.2 * h;
15982
15989
  for (let T = 0; T < n; T += 4) {
15983
15990
  const M = e[T + 0], B = e[T + 1], I = e[T + 2], F = e[T + 3];
@@ -15987,11 +15994,11 @@ const O8 = function(t) {
15987
15994
  ee.addGetterSetter(Ge, "hue", 0, Xe(), ee.afterSetFilter);
15988
15995
  ee.addGetterSetter(Ge, "saturation", 0, Xe(), ee.afterSetFilter);
15989
15996
  ee.addGetterSetter(Ge, "value", 0, Xe(), ee.afterSetFilter);
15990
- const G8 = function(t) {
15997
+ const H8 = function(t) {
15991
15998
  const e = t.data, n = e.length;
15992
15999
  for (let o = 0; o < n; o += 4)
15993
16000
  e[o] = 255 - e[o], e[o + 1] = 255 - e[o + 1], e[o + 2] = 255 - e[o + 2];
15994
- }, H8 = function(t, e, n) {
16001
+ }, X8 = function(t, e, n) {
15995
16002
  const o = t.data, i = e.data, c = t.width, d = t.height, h = n.polarCenterX || c / 2, p = n.polarCenterY || d / 2;
15996
16003
  let u = Math.sqrt(h * h + p * p), A = c - h, y = d - p;
15997
16004
  const x = Math.sqrt(A * A + y * y);
@@ -16006,7 +16013,7 @@ const G8 = function(t) {
16006
16013
  I = (R + B * c) * 4, i[I + 0] = F, i[I + 1] = Y, i[I + 2] = q, i[I + 3] = j;
16007
16014
  }
16008
16015
  }
16009
- }, X8 = function(t, e, n) {
16016
+ }, W8 = function(t, e, n) {
16010
16017
  const o = t.data, i = e.data, c = t.width, d = t.height, h = n.polarCenterX || c / 2, p = n.polarCenterY || d / 2;
16011
16018
  let u = Math.sqrt(h * h + p * p), A = c - h, y = d - p;
16012
16019
  const x = Math.sqrt(A * A + y * y);
@@ -16022,7 +16029,7 @@ const G8 = function(t) {
16022
16029
  const q = o[Y + 0], j = o[Y + 1], Q = o[Y + 2], V = o[Y + 3];
16023
16030
  Y = (y * c + A) * 4, i[Y + 0] = q, i[Y + 1] = j, i[Y + 2] = Q, i[Y + 3] = V;
16024
16031
  }
16025
- }, W8 = function(t) {
16032
+ }, Q8 = function(t) {
16026
16033
  const e = t.width, n = t.height;
16027
16034
  let o, i, c, d, h, p, u, A, y, x, S = Math.round(this.kaleidoscopePower());
16028
16035
  const w = Math.round(this.kaleidoscopeAngle()), E = Math.floor(e * (w % 360) / 360);
@@ -16031,7 +16038,7 @@ const G8 = function(t) {
16031
16038
  const R = fe.createCanvasElement();
16032
16039
  R.width = e, R.height = n;
16033
16040
  const T = R.getContext("2d").getImageData(0, 0, e, n);
16034
- fe.releaseCanvas(R), H8(t, T, {
16041
+ fe.releaseCanvas(R), X8(t, T, {
16035
16042
  polarCenterX: e / 2,
16036
16043
  polarCenterY: n / 2
16037
16044
  });
@@ -16049,7 +16056,7 @@ const G8 = function(t) {
16049
16056
  y = (e * i + o) * 4, h = T.data[y + 0], p = T.data[y + 1], u = T.data[y + 2], A = T.data[y + 3], x = (e * i + B * 2 - o - 1) * 4, T.data[x + 0] = h, T.data[x + 1] = p, T.data[x + 2] = u, T.data[x + 3] = A;
16050
16057
  B *= 2;
16051
16058
  }
16052
- X8(T, t, {});
16059
+ W8(T, t, {});
16053
16060
  };
16054
16061
  ee.addGetterSetter(Ge, "kaleidoscopePower", 2, Xe(), ee.afterSetFilter);
16055
16062
  ee.addGetterSetter(Ge, "kaleidoscopeAngle", 0, Xe(), ee.afterSetFilter);
@@ -16061,16 +16068,16 @@ function gA(t, e, n) {
16061
16068
  function Nf(t, e) {
16062
16069
  return Math.sqrt(Math.pow(t[0] - e[0], 2) + Math.pow(t[1] - e[1], 2) + Math.pow(t[2] - e[2], 2));
16063
16070
  }
16064
- function Q8(t) {
16071
+ function Y8(t) {
16065
16072
  const e = [0, 0, 0];
16066
16073
  for (let n = 0; n < t.length; n++)
16067
16074
  e[0] += t[n][0], e[1] += t[n][1], e[2] += t[n][2];
16068
16075
  return e[0] /= t.length, e[1] /= t.length, e[2] /= t.length, e;
16069
16076
  }
16070
- function Y8(t, e) {
16077
+ function V8(t, e) {
16071
16078
  const n = gA(t, 0, 0), o = gA(t, t.width - 1, 0), i = gA(t, 0, t.height - 1), c = gA(t, t.width - 1, t.height - 1), d = e || 10;
16072
16079
  if (Nf(n, o) < d && Nf(o, c) < d && Nf(c, i) < d && Nf(i, n) < d) {
16073
- const h = Q8([o, n, c, i]), p = [];
16080
+ const h = Y8([o, n, c, i]), p = [];
16074
16081
  for (let u = 0; u < t.width * t.height; u++) {
16075
16082
  const A = Nf(h, [
16076
16083
  t.data[u * 4],
@@ -16082,11 +16089,11 @@ function Y8(t, e) {
16082
16089
  return p;
16083
16090
  }
16084
16091
  }
16085
- function V8(t, e) {
16092
+ function j8(t, e) {
16086
16093
  for (let n = 0; n < t.width * t.height; n++)
16087
16094
  t.data[4 * n + 3] = e[n];
16088
16095
  }
16089
- function j8(t, e, n) {
16096
+ function q8(t, e, n) {
16090
16097
  const o = [1, 1, 1, 1, 0, 1, 1, 1, 1], i = Math.round(Math.sqrt(o.length)), c = Math.floor(i / 2), d = [];
16091
16098
  for (let h = 0; h < n; h++)
16092
16099
  for (let p = 0; p < e; p++) {
@@ -16104,7 +16111,7 @@ function j8(t, e, n) {
16104
16111
  }
16105
16112
  return d;
16106
16113
  }
16107
- function q8(t, e, n) {
16114
+ function K8(t, e, n) {
16108
16115
  const o = [1, 1, 1, 1, 1, 1, 1, 1, 1], i = Math.round(Math.sqrt(o.length)), c = Math.floor(i / 2), d = [];
16109
16116
  for (let h = 0; h < n; h++)
16110
16117
  for (let p = 0; p < e; p++) {
@@ -16122,7 +16129,7 @@ function q8(t, e, n) {
16122
16129
  }
16123
16130
  return d;
16124
16131
  }
16125
- function K8(t, e, n) {
16132
+ function J8(t, e, n) {
16126
16133
  const o = [
16127
16134
  0.1111111111111111,
16128
16135
  0.1111111111111111,
@@ -16150,19 +16157,19 @@ function K8(t, e, n) {
16150
16157
  }
16151
16158
  return d;
16152
16159
  }
16153
- const J8 = function(t) {
16160
+ const Z8 = function(t) {
16154
16161
  const e = this.threshold();
16155
- let n = Y8(t, e);
16156
- return n && (n = j8(n, t.width, t.height), n = q8(n, t.width, t.height), n = K8(n, t.width, t.height), V8(t, n)), t;
16162
+ let n = V8(t, e);
16163
+ return n && (n = q8(n, t.width, t.height), n = K8(n, t.width, t.height), n = J8(n, t.width, t.height), j8(t, n)), t;
16157
16164
  };
16158
16165
  ee.addGetterSetter(Ge, "threshold", 0, Xe(), ee.afterSetFilter);
16159
- const Z8 = function(t) {
16166
+ const $8 = function(t) {
16160
16167
  const e = this.noise() * 255, n = t.data, o = n.length, i = e / 2;
16161
16168
  for (let c = 0; c < o; c += 4)
16162
16169
  n[c + 0] += i - 2 * i * Math.random(), n[c + 1] += i - 2 * i * Math.random(), n[c + 2] += i - 2 * i * Math.random();
16163
16170
  };
16164
16171
  ee.addGetterSetter(Ge, "noise", 0.2, Xe(), ee.afterSetFilter);
16165
- const $8 = function(t) {
16172
+ const e9 = function(t) {
16166
16173
  let e = Math.ceil(this.pixelSize()), n = t.width, o = t.height, i = Math.ceil(n / e), c = Math.ceil(o / e), d = t.data;
16167
16174
  if (e <= 0) {
16168
16175
  fe.error("pixelSize value can not be <= 0");
@@ -16193,13 +16200,13 @@ const $8 = function(t) {
16193
16200
  }
16194
16201
  };
16195
16202
  ee.addGetterSetter(Ge, "pixelSize", 8, Xe(), ee.afterSetFilter);
16196
- const e9 = function(t) {
16203
+ const t9 = function(t) {
16197
16204
  const e = Math.round(this.levels() * 254) + 1, n = t.data, o = n.length, i = 255 / e;
16198
16205
  for (let c = 0; c < o; c += 1)
16199
16206
  n[c] = Math.floor(n[c] / i) * i;
16200
16207
  };
16201
16208
  ee.addGetterSetter(Ge, "levels", 0.5, Xe(), ee.afterSetFilter);
16202
- const t9 = function(t) {
16209
+ const n9 = function(t) {
16203
16210
  const e = t.data, n = e.length, o = this.red(), i = this.green(), c = this.blue();
16204
16211
  for (let d = 0; d < n; d += 4) {
16205
16212
  const h = (0.34 * e[d] + 0.5 * e[d + 1] + 0.16 * e[d + 2]) / 255;
@@ -16213,7 +16220,7 @@ ee.addGetterSetter(Ge, "green", 0, function(t) {
16213
16220
  return this._filterUpToDate = !1, t > 255 ? 255 : t < 0 ? 0 : Math.round(t);
16214
16221
  });
16215
16222
  ee.addGetterSetter(Ge, "blue", 0, Zx, ee.afterSetFilter);
16216
- const n9 = function(t) {
16223
+ const r9 = function(t) {
16217
16224
  const e = t.data, n = e.length, o = this.red(), i = this.green(), c = this.blue(), d = this.alpha();
16218
16225
  for (let h = 0; h < n; h += 4) {
16219
16226
  const p = 1 - d;
@@ -16230,20 +16237,20 @@ ee.addGetterSetter(Ge, "blue", 0, Zx, ee.afterSetFilter);
16230
16237
  ee.addGetterSetter(Ge, "alpha", 1, function(t) {
16231
16238
  return this._filterUpToDate = !1, t > 1 ? 1 : t < 0 ? 0 : t;
16232
16239
  });
16233
- const r9 = function(t) {
16240
+ const a9 = function(t) {
16234
16241
  const e = t.data, n = e.length;
16235
16242
  for (let o = 0; o < n; o += 4) {
16236
16243
  const i = e[o + 0], c = e[o + 1], d = e[o + 2];
16237
16244
  e[o + 0] = Math.min(255, i * 0.393 + c * 0.769 + d * 0.189), e[o + 1] = Math.min(255, i * 0.349 + c * 0.686 + d * 0.168), e[o + 2] = Math.min(255, i * 0.272 + c * 0.534 + d * 0.131);
16238
16245
  }
16239
- }, a9 = function(t) {
16246
+ }, i9 = function(t) {
16240
16247
  const n = t.data;
16241
16248
  for (let o = 0; o < n.length; o += 4) {
16242
16249
  const i = n[o], c = n[o + 1], d = n[o + 2];
16243
16250
  0.2126 * i + 0.7152 * c + 0.0722 * d >= 128 && (n[o] = 255 - i, n[o + 1] = 255 - c, n[o + 2] = 255 - d);
16244
16251
  }
16245
16252
  return t;
16246
- }, i9 = function(t) {
16253
+ }, o9 = function(t) {
16247
16254
  const e = this.threshold() * 255, n = t.data, o = n.length;
16248
16255
  for (let i = 0; i < o; i += 1)
16249
16256
  n[i] = n[i] < e ? 0 : 255;
@@ -16269,26 +16276,26 @@ Zl.Util._assign(Zl, {
16269
16276
  Transformer: en,
16270
16277
  Wedge: As,
16271
16278
  Filters: {
16272
- Blur: N8,
16273
- Brightness: M8,
16274
- Brighten: P8,
16275
- Contrast: B8,
16276
- Emboss: z8,
16277
- Enhance: F8,
16278
- Grayscale: I8,
16279
- HSL: O8,
16280
- HSV: U8,
16281
- Invert: G8,
16282
- Kaleidoscope: W8,
16283
- Mask: J8,
16284
- Noise: Z8,
16285
- Pixelate: $8,
16286
- Posterize: e9,
16287
- RGB: t9,
16288
- RGBA: n9,
16289
- Sepia: r9,
16290
- Solarize: a9,
16291
- Threshold: i9
16279
+ Blur: P8,
16280
+ Brightness: B8,
16281
+ Brighten: M8,
16282
+ Contrast: z8,
16283
+ Emboss: F8,
16284
+ Enhance: I8,
16285
+ Grayscale: O8,
16286
+ HSL: U8,
16287
+ HSV: G8,
16288
+ Invert: H8,
16289
+ Kaleidoscope: Q8,
16290
+ Mask: Z8,
16291
+ Noise: $8,
16292
+ Pixelate: e9,
16293
+ Posterize: t9,
16294
+ RGB: n9,
16295
+ RGBA: r9,
16296
+ Sepia: a9,
16297
+ Solarize: i9,
16298
+ Threshold: o9
16292
16299
  }
16293
16300
  });
16294
16301
  var vA = { exports: {} }, yA = { exports: {} }, Mg = {};
@@ -16302,7 +16309,7 @@ var vA = { exports: {} }, yA = { exports: {} }, Mg = {};
16302
16309
  * LICENSE file in the root directory of this source tree.
16303
16310
  */
16304
16311
  var cx;
16305
- function o9() {
16312
+ function s9() {
16306
16313
  return cx || (cx = 1, (function(t) {
16307
16314
  function e(K, re) {
16308
16315
  var ne = K.length;
@@ -16512,7 +16519,7 @@ var Bg = {};
16512
16519
  * LICENSE file in the root directory of this source tree.
16513
16520
  */
16514
16521
  var ux;
16515
- function s9() {
16522
+ function l9() {
16516
16523
  return ux || (ux = 1, (function(t) {
16517
16524
  process.env.NODE_ENV !== "production" && (function() {
16518
16525
  typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ < "u" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart == "function" && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(new Error());
@@ -16777,7 +16784,7 @@ function s9() {
16777
16784
  }
16778
16785
  var dx;
16779
16786
  function Rv() {
16780
- return dx || (dx = 1, process.env.NODE_ENV === "production" ? yA.exports = o9() : yA.exports = s9()), yA.exports;
16787
+ return dx || (dx = 1, process.env.NODE_ENV === "production" ? yA.exports = s9() : yA.exports = l9()), yA.exports;
16781
16788
  }
16782
16789
  /**
16783
16790
  * @license React
@@ -16789,7 +16796,7 @@ function Rv() {
16789
16796
  * LICENSE file in the root directory of this source tree.
16790
16797
  */
16791
16798
  var zg, fx;
16792
- function l9() {
16799
+ function c9() {
16793
16800
  return fx || (fx = 1, zg = function(e) {
16794
16801
  var n = {}, o = Dt, i = Rv(), c = Object.assign;
16795
16802
  function d(s) {
@@ -20549,7 +20556,7 @@ var Fg = { exports: {} };
20549
20556
  * LICENSE file in the root directory of this source tree.
20550
20557
  */
20551
20558
  var hx;
20552
- function c9() {
20559
+ function u9() {
20553
20560
  return hx || (hx = 1, process.env.NODE_ENV !== "production" && (Fg.exports = function(e) {
20554
20561
  var n = {}, o = Dt, i = Rv(), c = o.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED, d = !1;
20555
20562
  function h(r) {
@@ -23772,10 +23779,10 @@ Incoming: %s`, De, "[" + a.join(", ") + "]", "[" + r.join(", ") + "]");
23772
23779
  }
23773
23780
  return [z, C];
23774
23781
  }
23775
- function H7(r, a, f) {
23776
- }
23777
23782
  function X7(r, a, f) {
23778
23783
  }
23784
+ function W7(r, a, f) {
23785
+ }
23779
23786
  function U0(r, a, f) {
23780
23787
  var m = An, v = mo(), C, N = l();
23781
23788
  if (N) {
@@ -29737,11 +29744,11 @@ Check the render method of %s.`, it(Ke) || "Unknown"));
29737
29744
  })), Fg.exports;
29738
29745
  }
29739
29746
  var px;
29740
- function u9() {
29741
- return px || (px = 1, process.env.NODE_ENV === "production" ? vA.exports = l9() : vA.exports = c9()), vA.exports;
29747
+ function d9() {
29748
+ return px || (px = 1, process.env.NODE_ENV === "production" ? vA.exports = c9() : vA.exports = u9()), vA.exports;
29742
29749
  }
29743
- var d9 = u9();
29744
- const f9 = /* @__PURE__ */ zA(d9);
29750
+ var f9 = d9();
29751
+ const h9 = /* @__PURE__ */ zA(f9);
29745
29752
  var xA = { exports: {} }, js = {};
29746
29753
  /**
29747
29754
  * @license React
@@ -29753,7 +29760,7 @@ var xA = { exports: {} }, js = {};
29753
29760
  * LICENSE file in the root directory of this source tree.
29754
29761
  */
29755
29762
  var Ax;
29756
- function h9() {
29763
+ function p9() {
29757
29764
  return Ax || (Ax = 1, js.ConcurrentRoot = 1, js.ContinuousEventPriority = 4, js.DefaultEventPriority = 16, js.DiscreteEventPriority = 1, js.IdleEventPriority = 536870912, js.LegacyRoot = 0), js;
29758
29765
  }
29759
29766
  var qs = {};
@@ -29767,7 +29774,7 @@ var qs = {};
29767
29774
  * LICENSE file in the root directory of this source tree.
29768
29775
  */
29769
29776
  var mx;
29770
- function p9() {
29777
+ function A9() {
29771
29778
  return mx || (mx = 1, process.env.NODE_ENV !== "production" && (function() {
29772
29779
  var t = (
29773
29780
  /* */
@@ -29786,10 +29793,10 @@ function p9() {
29786
29793
  })()), qs;
29787
29794
  }
29788
29795
  var gx;
29789
- function A9() {
29790
- return gx || (gx = 1, process.env.NODE_ENV === "production" ? xA.exports = h9() : xA.exports = p9()), xA.exports;
29796
+ function m9() {
29797
+ return gx || (gx = 1, process.env.NODE_ENV === "production" ? xA.exports = p9() : xA.exports = A9()), xA.exports;
29791
29798
  }
29792
- var L5 = A9();
29799
+ var L5 = m9();
29793
29800
  const vx = {
29794
29801
  children: !0,
29795
29802
  ref: !0,
@@ -29800,18 +29807,18 @@ const vx = {
29800
29807
  unstable_applyDrawHitFromCache: !0
29801
29808
  };
29802
29809
  let yx = !1, xx = !1;
29803
- const Tv = ".react-konva-event", m9 = `ReactKonva: You have a Konva node with draggable = true and position defined but no onDragMove or onDragEnd events are handled.
29810
+ const Tv = ".react-konva-event", g9 = `ReactKonva: You have a Konva node with draggable = true and position defined but no onDragMove or onDragEnd events are handled.
29804
29811
  Position of a node will be changed during drag&drop, so you should update state of the react app as well.
29805
29812
  Consider to add onDragMove or onDragEnd events.
29806
29813
  For more info see: https://github.com/konvajs/react-konva/issues/256
29807
- `, g9 = `ReactKonva: You are using "zIndex" attribute for a Konva node.
29814
+ `, v9 = `ReactKonva: You are using "zIndex" attribute for a Konva node.
29808
29815
  react-konva may get confused with ordering. Just define correct order of elements in your render function of a component.
29809
29816
  For more info see: https://github.com/konvajs/react-konva/issues/194
29810
- `, v9 = {};
29811
- function XA(t, e, n = v9) {
29812
- if (!yx && "zIndex" in e && (console.warn(g9), yx = !0), !xx && e.draggable) {
29817
+ `, y9 = {};
29818
+ function XA(t, e, n = y9) {
29819
+ if (!yx && "zIndex" in e && (console.warn(v9), yx = !0), !xx && e.draggable) {
29813
29820
  var o = e.x !== void 0 || e.y !== void 0, i = e.onDragEnd || e.onDragMove;
29814
- o && !i && (console.warn(m9), xx = !0);
29821
+ o && !i && (console.warn(g9), xx = !0);
29815
29822
  }
29816
29823
  for (var c in n)
29817
29824
  if (!vx[c]) {
@@ -29845,16 +29852,16 @@ function sl(t) {
29845
29852
  }
29846
29853
  }
29847
29854
  var Ig = Rv();
29848
- const k5 = {}, y9 = {};
29855
+ const k5 = {}, x9 = {};
29849
29856
  Zl.Node.prototype._applyProps = XA;
29850
- function x9(t, e) {
29857
+ function b9(t, e) {
29851
29858
  if (typeof e == "string") {
29852
29859
  console.error(`Do not use plain text as child of Konva.Node. You are using text: ${e}`);
29853
29860
  return;
29854
29861
  }
29855
29862
  t.add(e), sl(t);
29856
29863
  }
29857
- function b9(t, e, n) {
29864
+ function S9(t, e, n) {
29858
29865
  let o = Zl[t];
29859
29866
  o || (console.error(`Konva has no node with the type ${t}. Group will be used instead. If you use minimal version of react-konva, just import required nodes into Konva: "import "konva/lib/shapes/${t}" If you want to render DOM elements as part of canvas tree take a look into this demo: https://konvajs.github.io/docs/react/DOM_Portal.html`), o = Zl.Group);
29860
29867
  const i = {}, c = {};
@@ -29865,132 +29872,132 @@ function b9(t, e, n) {
29865
29872
  const p = new o(i);
29866
29873
  return XA(p, c), p;
29867
29874
  }
29868
- function S9(t, e, n) {
29875
+ function w9(t, e, n) {
29869
29876
  console.error(`Text components are not supported for now in ReactKonva. Your text is: "${t}"`);
29870
29877
  }
29871
- function w9(t, e, n) {
29878
+ function C9(t, e, n) {
29872
29879
  return !1;
29873
29880
  }
29874
- function C9(t) {
29881
+ function _9(t) {
29875
29882
  return t;
29876
29883
  }
29877
- function _9() {
29884
+ function E9() {
29878
29885
  return null;
29879
29886
  }
29880
- function E9() {
29887
+ function R9() {
29881
29888
  return null;
29882
29889
  }
29883
- function R9(t, e, n, o) {
29884
- return y9;
29890
+ function T9(t, e, n, o) {
29891
+ return x9;
29885
29892
  }
29886
- function T9() {
29893
+ function D9() {
29887
29894
  }
29888
- function D9(t) {
29895
+ function L9(t) {
29889
29896
  }
29890
- function L9(t, e) {
29897
+ function k9(t, e) {
29891
29898
  return !1;
29892
29899
  }
29893
- function k9() {
29900
+ function N9() {
29894
29901
  return k5;
29895
29902
  }
29896
- function N9() {
29903
+ function P9() {
29897
29904
  return k5;
29898
29905
  }
29899
- const P9 = setTimeout, M9 = clearTimeout, B9 = -1;
29900
- function z9(t, e) {
29906
+ const M9 = setTimeout, B9 = clearTimeout, z9 = -1;
29907
+ function F9(t, e) {
29901
29908
  return !1;
29902
29909
  }
29903
- const F9 = !1, I9 = !0, O9 = !0;
29904
- function U9(t, e) {
29910
+ const I9 = !1, O9 = !0, U9 = !0;
29911
+ function G9(t, e) {
29905
29912
  e.parent === t ? e.moveToTop() : t.add(e), sl(t);
29906
29913
  }
29907
- function G9(t, e) {
29914
+ function H9(t, e) {
29908
29915
  e.parent === t ? e.moveToTop() : t.add(e), sl(t);
29909
29916
  }
29910
29917
  function N5(t, e, n) {
29911
29918
  e._remove(), t.add(e), e.setZIndex(n.getZIndex()), sl(t);
29912
29919
  }
29913
- function H9(t, e, n) {
29920
+ function X9(t, e, n) {
29914
29921
  N5(t, e, n);
29915
29922
  }
29916
- function X9(t, e) {
29923
+ function W9(t, e) {
29917
29924
  e.destroy(), e.off(Tv), sl(t);
29918
29925
  }
29919
- function W9(t, e) {
29926
+ function Q9(t, e) {
29920
29927
  e.destroy(), e.off(Tv), sl(t);
29921
29928
  }
29922
- function Q9(t, e, n) {
29929
+ function Y9(t, e, n) {
29923
29930
  console.error(`Text components are not yet supported in ReactKonva. You text is: "${n}"`);
29924
29931
  }
29925
- function Y9(t, e, n) {
29932
+ function V9(t, e, n) {
29926
29933
  }
29927
- function V9(t, e, n, o, i) {
29934
+ function j9(t, e, n, o, i) {
29928
29935
  XA(t, i, o);
29929
29936
  }
29930
- function j9(t) {
29937
+ function q9(t) {
29931
29938
  t.hide(), sl(t);
29932
29939
  }
29933
- function q9(t) {
29940
+ function K9(t) {
29934
29941
  }
29935
- function K9(t, e) {
29942
+ function J9(t, e) {
29936
29943
  (e.visible == null || e.visible) && t.show();
29937
29944
  }
29938
- function J9(t, e) {
29945
+ function Z9(t, e) {
29939
29946
  }
29940
- function Z9(t) {
29947
+ function $9(t) {
29941
29948
  }
29942
- function $9() {
29949
+ function e7() {
29943
29950
  }
29944
- const e7 = () => L5.DefaultEventPriority, t7 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
29951
+ const t7 = () => L5.DefaultEventPriority, n7 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
29945
29952
  __proto__: null,
29946
- appendChild: U9,
29947
- appendChildToContainer: G9,
29948
- appendInitialChild: x9,
29949
- cancelTimeout: M9,
29950
- clearContainer: Z9,
29951
- commitMount: Y9,
29952
- commitTextUpdate: Q9,
29953
- commitUpdate: V9,
29954
- createInstance: b9,
29955
- createTextInstance: S9,
29956
- detachDeletedInstance: $9,
29957
- finalizeInitialChildren: w9,
29958
- getChildHostContext: N9,
29959
- getCurrentEventPriority: e7,
29960
- getPublicInstance: C9,
29961
- getRootHostContext: k9,
29962
- hideInstance: j9,
29963
- hideTextInstance: q9,
29953
+ appendChild: G9,
29954
+ appendChildToContainer: H9,
29955
+ appendInitialChild: b9,
29956
+ cancelTimeout: B9,
29957
+ clearContainer: $9,
29958
+ commitMount: V9,
29959
+ commitTextUpdate: Y9,
29960
+ commitUpdate: j9,
29961
+ createInstance: S9,
29962
+ createTextInstance: w9,
29963
+ detachDeletedInstance: e7,
29964
+ finalizeInitialChildren: C9,
29965
+ getChildHostContext: P9,
29966
+ getCurrentEventPriority: t7,
29967
+ getPublicInstance: _9,
29968
+ getRootHostContext: N9,
29969
+ hideInstance: q9,
29970
+ hideTextInstance: K9,
29964
29971
  idlePriority: Ig.unstable_IdlePriority,
29965
29972
  insertBefore: N5,
29966
- insertInContainerBefore: H9,
29967
- isPrimaryRenderer: F9,
29968
- noTimeout: B9,
29973
+ insertInContainerBefore: X9,
29974
+ isPrimaryRenderer: I9,
29975
+ noTimeout: z9,
29969
29976
  now: Ig.unstable_now,
29970
- prepareForCommit: _9,
29971
- preparePortalMount: E9,
29972
- prepareUpdate: R9,
29973
- removeChild: X9,
29974
- removeChildFromContainer: W9,
29975
- resetAfterCommit: T9,
29976
- resetTextContent: D9,
29977
+ prepareForCommit: E9,
29978
+ preparePortalMount: R9,
29979
+ prepareUpdate: T9,
29980
+ removeChild: W9,
29981
+ removeChildFromContainer: Q9,
29982
+ resetAfterCommit: D9,
29983
+ resetTextContent: L9,
29977
29984
  run: Ig.unstable_runWithPriority,
29978
- scheduleTimeout: P9,
29979
- shouldDeprioritizeSubtree: L9,
29980
- shouldSetTextContent: z9,
29981
- supportsMutation: O9,
29982
- unhideInstance: K9,
29983
- unhideTextInstance: J9,
29984
- warnsIfNotActing: I9
29985
+ scheduleTimeout: M9,
29986
+ shouldDeprioritizeSubtree: k9,
29987
+ shouldSetTextContent: F9,
29988
+ supportsMutation: U9,
29989
+ unhideInstance: J9,
29990
+ unhideTextInstance: Z9,
29991
+ warnsIfNotActing: O9
29985
29992
  }, Symbol.toStringTag, { value: "Module" }));
29986
- var n7 = Object.defineProperty, r7 = Object.defineProperties, a7 = Object.getOwnPropertyDescriptors, bx = Object.getOwnPropertySymbols, i7 = Object.prototype.hasOwnProperty, o7 = Object.prototype.propertyIsEnumerable, Sx = (t, e, n) => e in t ? n7(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n, wx = (t, e) => {
29993
+ var r7 = Object.defineProperty, a7 = Object.defineProperties, i7 = Object.getOwnPropertyDescriptors, bx = Object.getOwnPropertySymbols, o7 = Object.prototype.hasOwnProperty, s7 = Object.prototype.propertyIsEnumerable, Sx = (t, e, n) => e in t ? r7(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n, wx = (t, e) => {
29987
29994
  for (var n in e || (e = {}))
29988
- i7.call(e, n) && Sx(t, n, e[n]);
29995
+ o7.call(e, n) && Sx(t, n, e[n]);
29989
29996
  if (bx)
29990
29997
  for (var n of bx(e))
29991
- o7.call(e, n) && Sx(t, n, e[n]);
29998
+ s7.call(e, n) && Sx(t, n, e[n]);
29992
29999
  return t;
29993
- }, s7 = (t, e) => r7(t, a7(e)), Cx, _x;
30000
+ }, l7 = (t, e) => a7(t, i7(e)), Cx, _x;
29994
30001
  typeof window < "u" && ((Cx = window.document) != null && Cx.createElement || ((_x = window.navigator) == null ? void 0 : _x.product) === "ReactNative") ? Fa.useLayoutEffect : Fa.useEffect;
29995
30002
  function P5(t, e, n) {
29996
30003
  if (!t)
@@ -30044,7 +30051,7 @@ class B5 extends Fa.Component {
30044
30051
  }, this.props.children);
30045
30052
  }
30046
30053
  }
30047
- function l7() {
30054
+ function c7() {
30048
30055
  const t = Fa.useContext(Dv);
30049
30056
  if (t === null)
30050
30057
  throw new Error("its-fine: useFiber must be called within a <FiberProvider />!");
@@ -30066,8 +30073,8 @@ function l7() {
30066
30073
  }
30067
30074
  }, [t, e]);
30068
30075
  }
30069
- function c7() {
30070
- const t = l7(), [e] = Fa.useState(() => /* @__PURE__ */ new Map());
30076
+ function u7() {
30077
+ const t = c7(), [e] = Fa.useState(() => /* @__PURE__ */ new Map());
30071
30078
  e.clear();
30072
30079
  let n = t;
30073
30080
  for (; n; ) {
@@ -30080,10 +30087,10 @@ function c7() {
30080
30087
  return e;
30081
30088
  }
30082
30089
  function z5() {
30083
- const t = c7();
30090
+ const t = u7();
30084
30091
  return Fa.useMemo(
30085
30092
  () => Array.from(t.keys()).reduce(
30086
- (e, n) => (o) => /* @__PURE__ */ Fa.createElement(e, null, /* @__PURE__ */ Fa.createElement(n.Provider, s7(wx({}, o), {
30093
+ (e, n) => (o) => /* @__PURE__ */ Fa.createElement(e, null, /* @__PURE__ */ Fa.createElement(n.Provider, l7(wx({}, o), {
30087
30094
  value: t.get(n)
30088
30095
  }))),
30089
30096
  (e) => /* @__PURE__ */ Fa.createElement(B5, wx({}, e))
@@ -30091,7 +30098,7 @@ function z5() {
30091
30098
  [t]
30092
30099
  );
30093
30100
  }
30094
- function u7(t) {
30101
+ function d7(t) {
30095
30102
  const e = Dt.useRef({});
30096
30103
  return Dt.useLayoutEffect(() => {
30097
30104
  e.current = t;
@@ -30099,8 +30106,8 @@ function u7(t) {
30099
30106
  e.current = {};
30100
30107
  }, []), e.current;
30101
30108
  }
30102
- const d7 = (t) => {
30103
- const e = Dt.useRef(null), n = Dt.useRef(null), o = Dt.useRef(null), i = u7(t), c = z5(), d = (h) => {
30109
+ const f7 = (t) => {
30110
+ const e = Dt.useRef(null), n = Dt.useRef(null), o = Dt.useRef(null), i = d7(t), c = z5(), d = (h) => {
30104
30111
  const { forwardedRef: p } = t;
30105
30112
  p && (typeof p == "function" ? p(h) : p.current = h);
30106
30113
  };
@@ -30122,7 +30129,7 @@ const d7 = (t) => {
30122
30129
  tabIndex: t.tabIndex,
30123
30130
  title: t.title
30124
30131
  });
30125
- }, F5 = "Layer", wi = "Group", oa = "Rect", Lv = "Ellipse", tl = "Line", DA = "Image", us = "Text", kv = "Arrow", Nv = "Transformer", Uf = f9(t7);
30132
+ }, F5 = "Layer", wi = "Group", oa = "Rect", Lv = "Ellipse", tl = "Line", DA = "Image", us = "Text", kv = "Arrow", Nv = "Transformer", Uf = h9(n7);
30126
30133
  Uf.injectIntoDevTools({
30127
30134
  // @ts-ignore
30128
30135
  findHostInstanceByFiber: () => null,
@@ -30130,7 +30137,7 @@ Uf.injectIntoDevTools({
30130
30137
  version: Dt.version,
30131
30138
  rendererPackageName: "react-konva"
30132
30139
  });
30133
- const I5 = Dt.forwardRef((t, e) => Dt.createElement(B5, {}, Dt.createElement(d7, { ...t, forwardedRef: e }))), bA = 960, SA = 540, f7 = (t, e, n) => {
30140
+ const I5 = Dt.forwardRef((t, e) => Dt.createElement(B5, {}, Dt.createElement(f7, { ...t, forwardedRef: e }))), bA = 960, SA = 540, h7 = (t, e, n) => {
30134
30141
  if (!n.enabled)
30135
30142
  return { x: t.x, y: t.y, guides: [] };
30136
30143
  let o = t.x, i = t.y;
@@ -30143,7 +30150,7 @@ const I5 = Dt.forwardRef((t, e) => Dt.createElement(B5, {}, Dt.createElement(d7,
30143
30150
  return { x: o, y: i, guides: c };
30144
30151
  };
30145
30152
  var Fu = {}, Rx;
30146
- function h7() {
30153
+ function p7() {
30147
30154
  if (Rx) return Fu;
30148
30155
  Rx = 1;
30149
30156
  var t = D6;
@@ -30169,9 +30176,9 @@ function h7() {
30169
30176
  }
30170
30177
  return Fu;
30171
30178
  }
30172
- var p7 = h7();
30173
- const A7 = /* @__PURE__ */ zA(p7);
30174
- var m7 = function(t, e) {
30179
+ var A7 = p7();
30180
+ const m7 = /* @__PURE__ */ zA(A7);
30181
+ var g7 = function(t, e) {
30175
30182
  var n = {};
30176
30183
  for (var o in t) Object.prototype.hasOwnProperty.call(t, o) && e.indexOf(o) < 0 && (n[o] = t[o]);
30177
30184
  if (t != null && typeof Object.getOwnPropertySymbols == "function")
@@ -30179,23 +30186,23 @@ var m7 = function(t, e) {
30179
30186
  e.indexOf(o[i]) < 0 && Object.prototype.propertyIsEnumerable.call(t, o[i]) && (n[o[i]] = t[o[i]]);
30180
30187
  return n;
30181
30188
  };
30182
- const g7 = (t) => {
30189
+ const v7 = (t) => {
30183
30190
  const e = window.getComputedStyle(t).position;
30184
30191
  return !(e === "absolute" || e === "relative");
30185
30192
  };
30186
- function v7(t = () => {
30193
+ function y7(t = () => {
30187
30194
  }) {
30188
30195
  const e = Dt.useRef(t);
30189
30196
  return e.current = t, Dt.useCallback((...n) => e.current.apply(null, n), []);
30190
30197
  }
30191
30198
  const fv = ({ children: t, groupProps: e, divProps: n, transform: o, transformFunc: i, parentNodeFunc: c }) => {
30192
- const d = z5(), h = Dt.useRef(null), [p] = Dt.useState(() => document.createElement("div")), u = Dt.useMemo(() => A7.createRoot(p), [p]), A = o ?? !0, y = v7(() => {
30199
+ const d = z5(), h = Dt.useRef(null), [p] = Dt.useState(() => document.createElement("div")), u = Dt.useMemo(() => m7.createRoot(p), [p]), A = o ?? !0, y = y7(() => {
30193
30200
  if (A && h.current) {
30194
30201
  let R = h.current.getAbsoluteTransform().decompose();
30195
30202
  i && (R = i(R)), p.style.position = "absolute", p.style.zIndex = "10", p.style.top = "0px", p.style.left = "0px", p.style.transform = `translate(${R.x}px, ${R.y}px) rotate(${R.rotation}deg) scaleX(${R.scaleX}) scaleY(${R.scaleY})`, p.style.transformOrigin = "top left";
30196
30203
  } else
30197
30204
  p.style.position = "", p.style.zIndex = "", p.style.top = "", p.style.left = "", p.style.transform = "", p.style.transformOrigin = "";
30198
- const x = n || {}, { style: S } = x, w = m7(x, ["style"]);
30205
+ const x = n || {}, { style: S } = x, w = g7(x, ["style"]);
30199
30206
  Object.assign(p.style, S), Object.assign(p, w);
30200
30207
  });
30201
30208
  return Dt.useLayoutEffect(() => {
@@ -30205,7 +30212,7 @@ const fv = ({ children: t, groupProps: e, divProps: n, transform: o, transformFu
30205
30212
  return;
30206
30213
  const w = c ? c({ stage: S.getStage() }) : (x = S.getStage()) === null || x === void 0 ? void 0 : x.container();
30207
30214
  if (w)
30208
- return w.appendChild(p), A && g7(w) && (w.style.position = "relative"), S.on("absoluteTransformChange", y), y(), () => {
30215
+ return w.appendChild(p), A && v7(w) && (w.style.position = "relative"), S.on("absoluteTransformChange", y), y(), () => {
30209
30216
  var E;
30210
30217
  S.off("absoluteTransformChange", y), (E = p.parentNode) === null || E === void 0 || E.removeChild(p);
30211
30218
  };
@@ -30224,7 +30231,7 @@ const fv = ({ children: t, groupProps: e, divProps: n, transform: o, transformFu
30224
30231
  }, []), Dt.createElement(wi, Object.assign({ ref: h }, e));
30225
30232
  };
30226
30233
  var Og, Tx;
30227
- function y7() {
30234
+ function x7() {
30228
30235
  if (Tx) return Og;
30229
30236
  Tx = 1;
30230
30237
  var t = Dt;
@@ -30251,8 +30258,8 @@ function y7() {
30251
30258
  ), [d.current, c.current];
30252
30259
  }, Og;
30253
30260
  }
30254
- var x7 = y7();
30255
- const b7 = /* @__PURE__ */ zA(x7), S7 = ({ element: t, isSelected: e, onSelect: n, onChange: o, onDragStart: i, onDragEnd: c }) => {
30261
+ var b7 = x7();
30262
+ const S7 = /* @__PURE__ */ zA(b7), w7 = ({ element: t, isSelected: e, onSelect: n, onChange: o, onDragStart: i, onDragEnd: c }) => {
30256
30263
  const d = Rn(null), h = Rn(null), p = Rn(null), [u, A] = at(!1), [y, x] = at(t.fontSize * 2);
30257
30264
  er(() => {
30258
30265
  var M;
@@ -30359,7 +30366,7 @@ const b7 = /* @__PURE__ */ zA(x7), S7 = ({ element: t, isSelected: e, onSelect:
30359
30366
  groupProps: { x: t.x, y: t.y },
30360
30367
  divProps: { style: { opacity: 1 } },
30361
30368
  children: /* @__PURE__ */ P(
30362
- C7,
30369
+ _7,
30363
30370
  {
30364
30371
  element: t,
30365
30372
  onComplete: w,
@@ -30369,13 +30376,13 @@ const b7 = /* @__PURE__ */ zA(x7), S7 = ({ element: t, isSelected: e, onSelect:
30369
30376
  }
30370
30377
  )
30371
30378
  ] });
30372
- }, w7 = (t) => {
30379
+ }, C7 = (t) => {
30373
30380
  let e = t.replace("#", "");
30374
30381
  e.length === 3 && (e = e[0] + e[0] + e[1] + e[1] + e[2] + e[2]);
30375
30382
  const n = parseInt(e.substring(0, 2), 16), o = parseInt(e.substring(2, 4), 16), i = parseInt(e.substring(4, 6), 16);
30376
30383
  return (n * 299 + o * 587 + i * 114) / 1e3 > 180;
30377
- }, C7 = ({ element: t, onComplete: e, onCancel: n }) => {
30378
- const o = Rn(null), [i, c] = at(t.content), d = w7(t.fill) ? "#1e293b" : t.fill;
30384
+ }, _7 = ({ element: t, onComplete: e, onCancel: n }) => {
30385
+ const o = Rn(null), [i, c] = at(t.content), d = C7(t.fill) ? "#1e293b" : t.fill;
30379
30386
  return er(() => {
30380
30387
  const u = o.current;
30381
30388
  u && requestAnimationFrame(() => {
@@ -30414,7 +30421,7 @@ const b7 = /* @__PURE__ */ zA(x7), S7 = ({ element: t, isSelected: e, onSelect:
30414
30421
  placeholder: "텍스트를 입력하세요... (마크다운 지원: **굵게**, *기울임*)"
30415
30422
  }
30416
30423
  );
30417
- }, _7 = ({ element: t, isSelected: e, onSelect: n, onChange: o, onDragStart: i, onDragEnd: c, onReplaceWithImage: d }) => {
30424
+ }, E7 = ({ element: t, isSelected: e, onSelect: n, onChange: o, onDragStart: i, onDragEnd: c, onReplaceWithImage: d }) => {
30418
30425
  const h = Rn(null), p = Rn(null), u = Rn(null), [A, y] = at(!1);
30419
30426
  er(() => {
30420
30427
  var j;
@@ -30580,7 +30587,7 @@ const b7 = /* @__PURE__ */ zA(x7), S7 = ({ element: t, isSelected: e, onSelect:
30580
30587
  }
30581
30588
  ),
30582
30589
  A && /* @__PURE__ */ P(fv, { groupProps: { x: 0, y: 0 }, divProps: { style: { opacity: 1 } }, children: /* @__PURE__ */ P(
30583
- R7,
30590
+ T7,
30584
30591
  {
30585
30592
  element: t,
30586
30593
  onComplete: M,
@@ -30611,13 +30618,13 @@ const b7 = /* @__PURE__ */ zA(x7), S7 = ({ element: t, isSelected: e, onSelect:
30611
30618
  }
30612
30619
  )
30613
30620
  ] });
30614
- }, E7 = (t) => {
30621
+ }, R7 = (t) => {
30615
30622
  let e = t.replace("#", "");
30616
30623
  e.length === 3 && (e = e[0] + e[0] + e[1] + e[1] + e[2] + e[2]);
30617
30624
  const n = parseInt(e.substring(0, 2), 16), o = parseInt(e.substring(2, 4), 16), i = parseInt(e.substring(4, 6), 16);
30618
30625
  return (n * 299 + o * 587 + i * 114) / 1e3 > 180;
30619
- }, R7 = ({ element: t, onComplete: e, onCancel: n }) => {
30620
- const o = Rn(null), [i, c] = at(t.text || ""), d = t.textColor || "#1e293b", h = E7(d) ? "#1e293b" : d;
30626
+ }, T7 = ({ element: t, onComplete: e, onCancel: n }) => {
30627
+ const o = Rn(null), [i, c] = at(t.text || ""), d = t.textColor || "#1e293b", h = R7(d) ? "#1e293b" : d;
30621
30628
  return er(() => {
30622
30629
  o.current && requestAnimationFrame(() => {
30623
30630
  var A, y;
@@ -30654,7 +30661,7 @@ const b7 = /* @__PURE__ */ zA(x7), S7 = ({ element: t, isSelected: e, onSelect:
30654
30661
  placeholder: "텍스트 입력..."
30655
30662
  }
30656
30663
  );
30657
- }, T7 = ({ element: t, isSelected: e, onSelect: n, onChange: o, onDragStart: i, onDragEnd: c }) => {
30664
+ }, D7 = ({ element: t, isSelected: e, onSelect: n, onChange: o, onDragStart: i, onDragEnd: c }) => {
30658
30665
  const d = Rn(null), h = Rn(null), p = Rn(null), [u, A] = at(null), [y, x] = at(!1), [S, w] = at({ x: 0, y: 0 }), [E, R] = at(1);
30659
30666
  er(() => {
30660
30667
  const ne = new window.Image();
@@ -31081,7 +31088,7 @@ const b7 = /* @__PURE__ */ zA(x7), S7 = ({ element: t, isSelected: e, onSelect:
31081
31088
  }
31082
31089
  )
31083
31090
  ] });
31084
- }, Iu = 960, Ou = 540, D7 = () => {
31091
+ }, Iu = 960, Ou = 540, L7 = () => {
31085
31092
  const t = Rn(null), e = Rn(null), [n, o] = at(1);
31086
31093
  er(() => {
31087
31094
  const Ae = () => {
@@ -31343,7 +31350,7 @@ const b7 = /* @__PURE__ */ zA(x7), S7 = ({ element: t, isSelected: e, onSelect:
31343
31350
  if (se && R.enabled && "x" in L && "y" in L) {
31344
31351
  const ce = F.elements.find((G) => G.id === Ae);
31345
31352
  if (ce) {
31346
- const G = "width" in L ? L.width : ce.width, U = "height" in L ? L.height : ce.height, Z = F.elements.filter((Se) => Se.id !== Ae), ve = f7(
31353
+ const G = "width" in L ? L.width : ce.width, U = "height" in L ? L.height : ce.height, Z = F.elements.filter((Se) => Se.id !== Ae), ve = h7(
31347
31354
  { x: L.x, y: L.y, width: G, height: U },
31348
31355
  Z,
31349
31356
  R
@@ -31443,7 +31450,7 @@ const b7 = /* @__PURE__ */ zA(x7), S7 = ({ element: t, isSelected: e, onSelect:
31443
31450
  F.elements.map((Ae) => {
31444
31451
  const L = d === Ae.id || M.includes(Ae.id);
31445
31452
  return Ae.type === "text" ? /* @__PURE__ */ P(
31446
- S7,
31453
+ w7,
31447
31454
  {
31448
31455
  element: Ae,
31449
31456
  isSelected: L,
@@ -31454,7 +31461,7 @@ const b7 = /* @__PURE__ */ zA(x7), S7 = ({ element: t, isSelected: e, onSelect:
31454
31461
  },
31455
31462
  Ae.id
31456
31463
  ) : Ae.type === "shape" ? /* @__PURE__ */ P(
31457
- _7,
31464
+ E7,
31458
31465
  {
31459
31466
  element: Ae,
31460
31467
  isSelected: L,
@@ -31466,7 +31473,7 @@ const b7 = /* @__PURE__ */ zA(x7), S7 = ({ element: t, isSelected: e, onSelect:
31466
31473
  },
31467
31474
  Ae.id
31468
31475
  ) : Ae.type === "image" ? /* @__PURE__ */ P(
31469
- T7,
31476
+ D7,
31470
31477
  {
31471
31478
  element: Ae,
31472
31479
  isSelected: L,
@@ -31488,8 +31495,8 @@ const b7 = /* @__PURE__ */ zA(x7), S7 = ({ element: t, isSelected: e, onSelect:
31488
31495
  )
31489
31496
  }
31490
31497
  ) });
31491
- }, BA = 142, hv = 80, L7 = 960, ln = BA / L7, k7 = ({ element: t, scale: e }) => {
31492
- const [n] = b7(t.src);
31498
+ }, BA = 142, hv = 80, k7 = 960, ln = BA / k7, N7 = ({ element: t, scale: e }) => {
31499
+ const [n] = S7(t.src);
31493
31500
  return n ? /* @__PURE__ */ P(
31494
31501
  DA,
31495
31502
  {
@@ -31501,7 +31508,7 @@ const b7 = /* @__PURE__ */ zA(x7), S7 = ({ element: t, isSelected: e, onSelect:
31501
31508
  rotation: t.rotation
31502
31509
  }
31503
31510
  ) : null;
31504
- }, N7 = ({ slide: t }) => {
31511
+ }, P7 = ({ slide: t }) => {
31505
31512
  const e = Lx(() => t.elements.map((n) => {
31506
31513
  if (n.type === "text") {
31507
31514
  const o = n;
@@ -31612,14 +31619,14 @@ const b7 = /* @__PURE__ */ zA(x7), S7 = ({ element: t, isSelected: e, onSelect:
31612
31619
  return null;
31613
31620
  }
31614
31621
  } else if (n.type === "image")
31615
- return /* @__PURE__ */ P(k7, { element: n, scale: ln }, n.id);
31622
+ return /* @__PURE__ */ P(N7, { element: n, scale: ln }, n.id);
31616
31623
  return null;
31617
31624
  }), [t.elements]);
31618
31625
  return /* @__PURE__ */ P(I5, { width: BA, height: hv, children: /* @__PURE__ */ de(F5, { children: [
31619
31626
  /* @__PURE__ */ P(oa, { x: 0, y: 0, width: BA, height: hv, fill: t.background }),
31620
31627
  e
31621
31628
  ] }) });
31622
- }, P7 = () => {
31629
+ }, M7 = () => {
31623
31630
  const t = Ve((p) => p.slides), e = Ve((p) => p.currentSlideIndex), n = Ve((p) => p.selectSlide), o = Ve((p) => p.addSlide), i = Ve((p) => p.deleteSlide), [c, d] = at(null), h = (p, u) => {
31624
31631
  p.stopPropagation(), t.length > 1 && i(u);
31625
31632
  };
@@ -31680,7 +31687,7 @@ const b7 = /* @__PURE__ */ zA(x7), S7 = ({ element: t, isSelected: e, onSelect:
31680
31687
  boxShadow: e === u ? "0 0 0 4px rgba(91, 110, 247, 0.1), 0 4px 6px rgba(0, 0, 0, 0.1)" : void 0,
31681
31688
  transition: "all 150ms ease"
31682
31689
  },
31683
- children: /* @__PURE__ */ P(N7, { slide: p })
31690
+ children: /* @__PURE__ */ P(P7, { slide: p })
31684
31691
  }
31685
31692
  )
31686
31693
  ]
@@ -31710,7 +31717,7 @@ const b7 = /* @__PURE__ */ zA(x7), S7 = ({ element: t, isSelected: e, onSelect:
31710
31717
  ] }) })
31711
31718
  }
31712
31719
  );
31713
- }, M7 = () => {
31720
+ }, B7 = () => {
31714
31721
  const [t, e] = at(!1), n = Ve((R) => R.slides), o = Ve((R) => R.currentSlideIndex), i = Ve((R) => R.selectedElementId), c = Ve((R) => R.updateElement), d = Ve((R) => R.updateSlideBackground), h = Ve((R) => R.bringToFront), p = Ve((R) => R.sendToBack), u = Ve((R) => R.bringForward), A = Ve((R) => R.sendBackward), y = Ve((R) => R.copyElement), x = Ve((R) => R.commitElementUpdate), S = n[o], w = i ? S.elements.find((R) => R.id === i) : null;
31715
31722
  if (t)
31716
31723
  return /* @__PURE__ */ P(At, { w: 40, bg: "white", py: "md", style: { borderLeft: "1px solid var(--devdive-border-light)" }, children: /* @__PURE__ */ P(dr, { align: "center", children: /* @__PURE__ */ P($n, { label: "속성 패널 펼치기", position: "left", children: /* @__PURE__ */ P(cn, { variant: "subtle", color: "gray", onClick: () => e(!1), children: /* @__PURE__ */ P("span", { className: "material-symbols-outlined", children: "chevron_left" }) }) }) }) });
@@ -31778,12 +31785,12 @@ const b7 = /* @__PURE__ */ zA(x7), S7 = ({ element: t, isSelected: e, onSelect:
31778
31785
  }
31779
31786
  )
31780
31787
  ] }),
31781
- /* @__PURE__ */ P(B7, { element: w, onUpdate: E, onStartEdit: x }),
31782
- w.type === "text" && /* @__PURE__ */ P(z7, { element: w, onUpdate: E, onStartEdit: x }),
31783
- w.type === "shape" && /* @__PURE__ */ P(F7, { element: w, onUpdate: E, onStartEdit: x }),
31784
- w.type === "image" && /* @__PURE__ */ P(I7, { element: w, onUpdate: E, onStartEdit: x })
31788
+ /* @__PURE__ */ P(z7, { element: w, onUpdate: E, onStartEdit: x }),
31789
+ w.type === "text" && /* @__PURE__ */ P(F7, { element: w, onUpdate: E, onStartEdit: x }),
31790
+ w.type === "shape" && /* @__PURE__ */ P(I7, { element: w, onUpdate: E, onStartEdit: x }),
31791
+ w.type === "image" && /* @__PURE__ */ P(O7, { element: w, onUpdate: E, onStartEdit: x })
31785
31792
  ] });
31786
- }, B7 = ({
31793
+ }, z7 = ({
31787
31794
  element: t,
31788
31795
  onUpdate: e,
31789
31796
  onStartEdit: n
@@ -31930,7 +31937,7 @@ const b7 = /* @__PURE__ */ zA(x7), S7 = ({ element: t, isSelected: e, onSelect:
31930
31937
  )
31931
31938
  ] })
31932
31939
  ] });
31933
- }, z7 = ({
31940
+ }, F7 = ({
31934
31941
  element: t,
31935
31942
  onUpdate: e,
31936
31943
  onStartEdit: n
@@ -31977,7 +31984,7 @@ const b7 = /* @__PURE__ */ zA(x7), S7 = ({ element: t, isSelected: e, onSelect:
31977
31984
  }
31978
31985
  )
31979
31986
  ] })
31980
- ] }), F7 = ({
31987
+ ] }), I7 = ({
31981
31988
  element: t,
31982
31989
  onUpdate: e,
31983
31990
  onStartEdit: n
@@ -32090,7 +32097,7 @@ const b7 = /* @__PURE__ */ zA(x7), S7 = ({ element: t, isSelected: e, onSelect:
32090
32097
  ] })
32091
32098
  ] })
32092
32099
  ] });
32093
- }, I7 = ({
32100
+ }, O7 = ({
32094
32101
  element: t,
32095
32102
  onUpdate: e,
32096
32103
  onStartEdit: n
@@ -32218,7 +32225,7 @@ const b7 = /* @__PURE__ */ zA(x7), S7 = ({ element: t, isSelected: e, onSelect:
32218
32225
  )
32219
32226
  ] })
32220
32227
  ] });
32221
- }, O7 = () => {
32228
+ }, U7 = () => {
32222
32229
  const [t, e] = at(!1), [n, o] = at([]), [i, c] = at(""), [d, h] = at(!1), [p, u] = at([]), [A, y] = at(-1), [x, S] = at({ x: 0, y: 0 }), [w, E] = at(!1), R = Rn({ x: 0, y: 0, posX: 0, posY: 0 }), T = Rn(null), M = Rn(null), B = Rn(null), { generateSlideContent: I } = IA(), F = Ve((K) => K.slides), Y = Ve((K) => K.currentSlideIndex), q = Ve((K) => K.updateElement), j = F[Y];
32223
32230
  er(() => {
32224
32231
  T.current && t && T.current.scrollTo({ top: T.current.scrollHeight, behavior: "smooth" });
@@ -32404,7 +32411,7 @@ ${Ee.join(`
32404
32411
  ] })
32405
32412
  ] }) }),
32406
32413
  /* @__PURE__ */ P(Kl, { h: 200, px: "sm", py: "xs", viewportRef: T, children: /* @__PURE__ */ de(dr, { gap: "xs", children: [
32407
- n.map((K) => /* @__PURE__ */ P(U7, { message: K }, K.id)),
32414
+ n.map((K) => /* @__PURE__ */ P(G7, { message: K }, K.id)),
32408
32415
  d && /* @__PURE__ */ P(At, { children: /* @__PURE__ */ P(ji, { px: "xs", py: 4, radius: "md", bg: "gray.1", style: { display: "inline-block" }, children: /* @__PURE__ */ de(wt, { gap: "xs", children: [
32409
32416
  /* @__PURE__ */ P(
32410
32417
  "span",
@@ -32523,7 +32530,7 @@ ${Ee.join(`
32523
32530
  ]
32524
32531
  }
32525
32532
  );
32526
- }, U7 = ({ message: t }) => {
32533
+ }, G7 = ({ message: t }) => {
32527
32534
  const e = t.role === "user";
32528
32535
  return /* @__PURE__ */ P(At, { style: { textAlign: e ? "right" : "left" }, children: /* @__PURE__ */ P(
32529
32536
  ji,
@@ -32540,7 +32547,7 @@ ${Ee.join(`
32540
32547
  children: /* @__PURE__ */ P(pt, { size: "xs", style: { whiteSpace: "pre-wrap", lineHeight: 1.4 }, children: t.content })
32541
32548
  }
32542
32549
  ) });
32543
- }, G7 = () => {
32550
+ }, H7 = () => {
32544
32551
  const t = Ve((p) => p.copyElement), e = Ve((p) => p.pasteElement), n = Ve((p) => p.deleteElement), o = Ve((p) => p.selectedElementId), i = Ve((p) => p.bringToFront), c = Ve((p) => p.sendToBack), d = Ve((p) => p.undo), h = Ve((p) => p.redo);
32545
32552
  er(() => {
32546
32553
  const p = (u) => {
@@ -32552,8 +32559,8 @@ ${Ee.join(`
32552
32559
  };
32553
32560
  return window.addEventListener("keydown", p), () => window.removeEventListener("keydown", p);
32554
32561
  }, [t, e, n, o, i, c, d, h]);
32555
- }, i_ = () => (G7(), /* @__PURE__ */ de(v2, { direction: "column", h: "100%", c: "slate.8", children: [
32556
- /* @__PURE__ */ P(xw, {}),
32562
+ }, o_ = () => (H7(), /* @__PURE__ */ de(v2, { direction: "column", h: "100%", c: "slate.8", children: [
32563
+ /* @__PURE__ */ P(bw, {}),
32557
32564
  /* @__PURE__ */ de(v2, { flex: 1, style: { overflow: "hidden" }, children: [
32558
32565
  /* @__PURE__ */ de(
32559
32566
  At,
@@ -32564,15 +32571,15 @@ ${Ee.join(`
32564
32571
  className: "dot-grid",
32565
32572
  style: { display: "flex", flexDirection: "column", overflow: "hidden" },
32566
32573
  children: [
32567
- /* @__PURE__ */ P(zw, {}),
32568
- /* @__PURE__ */ P(At, { flex: 1, style: { overflow: "hidden" }, children: /* @__PURE__ */ P(D7, {}) }),
32569
- /* @__PURE__ */ P(O7, {})
32574
+ /* @__PURE__ */ P(Fw, {}),
32575
+ /* @__PURE__ */ P(At, { flex: 1, style: { overflow: "hidden" }, children: /* @__PURE__ */ P(L7, {}) }),
32576
+ /* @__PURE__ */ P(U7, {})
32570
32577
  ]
32571
32578
  }
32572
32579
  ),
32573
- /* @__PURE__ */ P(M7, {})
32580
+ /* @__PURE__ */ P(B7, {})
32574
32581
  ] }),
32575
- /* @__PURE__ */ P(P7, {})
32582
+ /* @__PURE__ */ P(M7, {})
32576
32583
  ] })), Dx = {
32577
32584
  position: "fixed",
32578
32585
  top: "50%",
@@ -32585,7 +32592,7 @@ ${Ee.join(`
32585
32592
  backdropFilter: "blur(12px)",
32586
32593
  border: "1px solid var(--devdive-border-light)",
32587
32594
  boxShadow: "0 10px 25px rgba(0, 0, 0, 0.1)"
32588
- }, o_ = () => {
32595
+ }, s_ = () => {
32589
32596
  const t = Ve((h) => h.slides), e = Ve((h) => h.currentSlideIndex), n = Ve((h) => h.selectSlide), o = e > 0, i = e < t.length - 1, c = () => {
32590
32597
  o && n(e - 1);
32591
32598
  }, d = () => {
@@ -32619,26 +32626,26 @@ ${Ee.join(`
32619
32626
  ] });
32620
32627
  };
32621
32628
  export {
32622
- i_ as Editor,
32623
- zw as FloatingToolbar,
32624
- xw as Header,
32625
- T7 as ImageNode,
32629
+ o_ as Editor,
32630
+ Fw as FloatingToolbar,
32631
+ bw as Header,
32632
+ D7 as ImageNode,
32626
32633
  Px as LAYOUT_TEMPLATES,
32627
- M7 as PropertiesPanel,
32628
- _7 as ShapeNode,
32629
- D7 as SlideCanvas,
32630
- o_ as SlideNavigation,
32631
- P7 as SlideThumbnails,
32634
+ B7 as PropertiesPanel,
32635
+ E7 as ShapeNode,
32636
+ L7 as SlideCanvas,
32637
+ s_ as SlideNavigation,
32638
+ M7 as SlideThumbnails,
32632
32639
  Xf as TEXT_STYLE_PRESETS,
32633
32640
  fs as THEME_PRESETS,
32634
32641
  QS as TemplateGallery,
32635
- S7 as TextNode,
32636
- f7 as calculateSnap,
32637
- j7 as devdiveTheme,
32642
+ w7 as TextNode,
32643
+ h7 as calculateSnap,
32644
+ q7 as devdiveTheme,
32638
32645
  Vi as generateId,
32639
32646
  XS as generatePptx,
32640
32647
  b2 as getLayoutTemplate,
32641
- q7 as themeVars,
32648
+ K7 as themeVars,
32642
32649
  Ve as useEditorStore
32643
32650
  };
32644
32651
  //# sourceMappingURL=devdive-slide.es.js.map