eddyter 1.3.69 → 1.3.70

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
1
  import { jsx as i, jsxs as b, Fragment as Ce } from "react/jsx-runtime";
2
2
  import * as C from "react";
3
- import ae, { createContext as oc, useContext as cs, useState as S, useRef as oe, useEffect as G, useCallback as V, Suspense as cu, forwardRef as nc, createElement as $h, useImperativeHandle as hm, useMemo as zr, useLayoutEffect as pm, Component as Fv } from "react";
3
+ import ae, { createContext as oc, useContext as cs, useState as S, useRef as re, useEffect as q, useCallback as V, Suspense as cu, forwardRef as nc, createElement as $h, useImperativeHandle as hm, useMemo as zr, useLayoutEffect as pm, Component as Fv } from "react";
4
4
  import lu, { AxiosError as fm } from "axios";
5
5
  import * as ii from "react-dom";
6
6
  import mm, { createPortal as sr } from "react-dom";
@@ -169,8 +169,8 @@ function Dm({
169
169
  hideDelay: n = 300,
170
170
  enabled: s = !0
171
171
  }) {
172
- const a = oe(null), [c, l] = S(null), d = t || a;
173
- return G(() => {
172
+ const a = re(null), [c, l] = S(null), d = t || a;
173
+ return q(() => {
174
174
  if (!s)
175
175
  return;
176
176
  const h = d.current;
@@ -242,12 +242,12 @@ function Dm({
242
242
  }
243
243
  const Hs = 320;
244
244
  function Wh({ url: t, rect: e, apiKey: r, onClose: o }) {
245
- const [n, s] = S({ top: 0, left: 0 }), [a, c] = S(null), [l, d] = S(!0), [h, u] = S(!1), p = oe(!1);
246
- G(() => {
245
+ const [n, s] = S({ top: 0, left: 0 }), [a, c] = S(null), [l, d] = S(!0), [h, u] = S(!1), p = re(!1);
246
+ q(() => {
247
247
  p.current || (p.current = !0, d(!0), u(!1), Om({ url: t, apiKey: r }).then((x) => {
248
248
  x ? c(x) : u(!0);
249
249
  }).catch(() => u(!0)).finally(() => d(!1)));
250
- }, [t, r]), G(() => {
250
+ }, [t, r]), q(() => {
251
251
  const x = a?.image ? 280 : 160;
252
252
  let _ = e.top + window.scrollY - x - 10;
253
253
  e.top - x - 10 < 0 && (_ = e.bottom + window.scrollY + 10);
@@ -623,8 +623,8 @@ const Uh = (t) => {
623
623
  }) => {
624
624
  const [a, c] = S(!1), [l, d] = S(!1), [h, u] = S(null), [p, g] = S(
625
625
  null
626
- ), [m, y] = S(null), [f, v] = S(null), [x, _] = S(!1), [N, k] = S(null), [w, E] = S(null), T = oe(!1);
627
- G(() => {
626
+ ), [m, y] = S(null), [f, v] = S(null), [x, _] = S(!1), [N, k] = S(null), [w, E] = S(null), T = re(!1);
627
+ q(() => {
628
628
  s && !a && !l && !T.current && (T.current = !0, M(s));
629
629
  }, [s, a, l]);
630
630
  const M = async (U) => {
@@ -776,7 +776,7 @@ const Uh = (t) => {
776
776
  onFocus: a,
777
777
  onBlur: c,
778
778
  onHeightChange: l
779
- } = t, d = e && Fm(), h = oe(!1), u = oe(0), p = V(
779
+ } = t, d = e && Fm(), h = re(!1), u = re(0), p = V(
780
780
  (k, w) => {
781
781
  if (!d)
782
782
  return;
@@ -817,7 +817,7 @@ const Uh = (t) => {
817
817
  },
818
818
  [p]
819
819
  );
820
- return G(() => {
820
+ return q(() => {
821
821
  if (!d)
822
822
  return;
823
823
  const k = (w) => {
@@ -1147,7 +1147,7 @@ function vw(t) {
1147
1147
  }
1148
1148
  const xw = (t) => {
1149
1149
  var e, r, o, n, s, a, c, l, d;
1150
- const { invert: h, toast: u, unstyled: p, interacting: g, setHeights: m, visibleToasts: y, heights: f, index: v, toasts: x, expanded: _, removeToast: N, defaultRichColors: k, closeButton: w, style: E, cancelButtonStyle: T, actionButtonStyle: M, className: j = "", descriptionClassName: W = "", duration: $, position: U, gap: I, expandByDefault: D, classNames: P, icons: R, closeButtonAriaLabel: H = "Close toast" } = t, [z, Q] = ae.useState(null), [le, fe] = ae.useState(null), [re, ie] = ae.useState(!1), [A, O] = ae.useState(!1), [L, F] = ae.useState(!1), [ee, X] = ae.useState(!1), [te, se] = ae.useState(!1), [Le, Ee] = ae.useState(0), [we, ke] = ae.useState(0), ge = ae.useRef(u.duration || $ || Vh), ve = ae.useRef(null), B = ae.useRef(null), q = v === 0, J = v + 1 <= y, K = u.type, Y = u.dismissible !== !1, Z = u.className || "", ne = u.descriptionClassName || "", de = ae.useMemo(() => f.findIndex(($e) => $e.toastId === u.id) || 0, [
1150
+ const { invert: h, toast: u, unstyled: p, interacting: g, setHeights: m, visibleToasts: y, heights: f, index: v, toasts: x, expanded: _, removeToast: N, defaultRichColors: k, closeButton: w, style: E, cancelButtonStyle: T, actionButtonStyle: M, className: j = "", descriptionClassName: W = "", duration: $, position: U, gap: I, expandByDefault: D, classNames: P, icons: R, closeButtonAriaLabel: H = "Close toast" } = t, [z, Q] = ae.useState(null), [le, fe] = ae.useState(null), [oe, ie] = ae.useState(!1), [A, O] = ae.useState(!1), [L, F] = ae.useState(!1), [ee, X] = ae.useState(!1), [te, se] = ae.useState(!1), [Le, Ee] = ae.useState(0), [we, ke] = ae.useState(0), ge = ae.useRef(u.duration || $ || Vh), ve = ae.useRef(null), B = ae.useRef(null), G = v === 0, J = v + 1 <= y, K = u.type, Y = u.dismissible !== !1, Z = u.className || "", ne = u.descriptionClassName || "", de = ae.useMemo(() => f.findIndex(($e) => $e.toastId === u.id) || 0, [
1151
1151
  f,
1152
1152
  u.id
1153
1153
  ]), be = ae.useMemo(() => {
@@ -1189,7 +1189,7 @@ const xw = (t) => {
1189
1189
  m,
1190
1190
  u.id
1191
1191
  ]), ae.useLayoutEffect(() => {
1192
- if (!re)
1192
+ if (!oe)
1193
1193
  return;
1194
1194
  const $e = B.current, Ge = $e.style.height;
1195
1195
  $e.style.height = "auto";
@@ -1206,7 +1206,7 @@ const xw = (t) => {
1206
1206
  ...Lt
1207
1207
  ]);
1208
1208
  }, [
1209
- re,
1209
+ oe,
1210
1210
  u.title,
1211
1211
  u.description,
1212
1212
  m,
@@ -1276,7 +1276,7 @@ const xw = (t) => {
1276
1276
  "data-sonner-toast": "",
1277
1277
  "data-rich-colors": (Mr = u.richColors) != null ? Mr : k,
1278
1278
  "data-styled": !(u.jsx || u.unstyled || p),
1279
- "data-mounted": re,
1279
+ "data-mounted": oe,
1280
1280
  "data-promise": !!u.promise,
1281
1281
  "data-swiped": te,
1282
1282
  "data-removed": A,
@@ -1284,14 +1284,14 @@ const xw = (t) => {
1284
1284
  "data-y-position": cr,
1285
1285
  "data-x-position": At,
1286
1286
  "data-index": v,
1287
- "data-front": q,
1287
+ "data-front": G,
1288
1288
  "data-swiping": L,
1289
1289
  "data-dismissible": Y,
1290
1290
  "data-type": K,
1291
1291
  "data-invert": Ar,
1292
1292
  "data-swipe-out": ee,
1293
1293
  "data-swipe-direction": le,
1294
- "data-expanded": !!(_ || D && re),
1294
+ "data-expanded": !!(_ || D && oe),
1295
1295
  "data-testid": u.testId,
1296
1296
  style: {
1297
1297
  "--index": v,
@@ -1432,24 +1432,24 @@ const Cw = /* @__PURE__ */ ae.forwardRef(function(e, r) {
1432
1432
  const { id: o, invert: n, position: s = "bottom-right", hotkey: a = [
1433
1433
  "altKey",
1434
1434
  "KeyT"
1435
- ], expand: c, closeButton: l, className: d, offset: h, mobileOffset: u, theme: p = "light", richColors: g, duration: m, style: y, visibleToasts: f = hw, toastOptions: v, dir: x = qh(), gap: _ = gw, icons: N, containerAriaLabel: k = "Notifications" } = e, [w, E] = ae.useState([]), T = ae.useMemo(() => o ? w.filter((re) => re.toasterId === o) : w.filter((re) => !re.toasterId), [
1435
+ ], expand: c, closeButton: l, className: d, offset: h, mobileOffset: u, theme: p = "light", richColors: g, duration: m, style: y, visibleToasts: f = hw, toastOptions: v, dir: x = qh(), gap: _ = gw, icons: N, containerAriaLabel: k = "Notifications" } = e, [w, E] = ae.useState([]), T = ae.useMemo(() => o ? w.filter((oe) => oe.toasterId === o) : w.filter((oe) => !oe.toasterId), [
1436
1436
  w,
1437
1437
  o
1438
1438
  ]), M = ae.useMemo(() => Array.from(new Set([
1439
1439
  s
1440
- ].concat(T.filter((re) => re.position).map((re) => re.position)))), [
1440
+ ].concat(T.filter((oe) => oe.position).map((oe) => oe.position)))), [
1441
1441
  T,
1442
1442
  s
1443
- ]), [j, W] = ae.useState([]), [$, U] = ae.useState(!1), [I, D] = ae.useState(!1), [P, R] = ae.useState(p !== "system" ? p : typeof window < "u" && window.matchMedia && window.matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "light"), H = ae.useRef(null), z = a.join("+").replace(/Key/g, "").replace(/Digit/g, ""), Q = ae.useRef(null), le = ae.useRef(!1), fe = ae.useCallback((re) => {
1443
+ ]), [j, W] = ae.useState([]), [$, U] = ae.useState(!1), [I, D] = ae.useState(!1), [P, R] = ae.useState(p !== "system" ? p : typeof window < "u" && window.matchMedia && window.matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "light"), H = ae.useRef(null), z = a.join("+").replace(/Key/g, "").replace(/Digit/g, ""), Q = ae.useRef(null), le = ae.useRef(!1), fe = ae.useCallback((oe) => {
1444
1444
  E((ie) => {
1445
1445
  var A;
1446
- return (A = ie.find((O) => O.id === re.id)) != null && A.delete || nr.dismiss(re.id), ie.filter(({ id: O }) => O !== re.id);
1446
+ return (A = ie.find((O) => O.id === oe.id)) != null && A.delete || nr.dismiss(oe.id), ie.filter(({ id: O }) => O !== oe.id);
1447
1447
  });
1448
1448
  }, []);
1449
- return ae.useEffect(() => nr.subscribe((re) => {
1450
- if (re.dismiss) {
1449
+ return ae.useEffect(() => nr.subscribe((oe) => {
1450
+ if (oe.dismiss) {
1451
1451
  requestAnimationFrame(() => {
1452
- E((ie) => ie.map((A) => A.id === re.id ? {
1452
+ E((ie) => ie.map((A) => A.id === oe.id ? {
1453
1453
  ...A,
1454
1454
  delete: !0
1455
1455
  } : A));
@@ -1459,16 +1459,16 @@ const Cw = /* @__PURE__ */ ae.forwardRef(function(e, r) {
1459
1459
  setTimeout(() => {
1460
1460
  mm.flushSync(() => {
1461
1461
  E((ie) => {
1462
- const A = ie.findIndex((O) => O.id === re.id);
1462
+ const A = ie.findIndex((O) => O.id === oe.id);
1463
1463
  return A !== -1 ? [
1464
1464
  ...ie.slice(0, A),
1465
1465
  {
1466
1466
  ...ie[A],
1467
- ...re
1467
+ ...oe
1468
1468
  },
1469
1469
  ...ie.slice(A + 1)
1470
1470
  ] : [
1471
- re,
1471
+ oe,
1472
1472
  ...ie
1473
1473
  ];
1474
1474
  });
@@ -1483,13 +1483,13 @@ const Cw = /* @__PURE__ */ ae.forwardRef(function(e, r) {
1483
1483
  }
1484
1484
  if (p === "system" && (window.matchMedia && window.matchMedia("(prefers-color-scheme: dark)").matches ? R("dark") : R("light")), typeof window > "u")
1485
1485
  return;
1486
- const re = window.matchMedia("(prefers-color-scheme: dark)");
1486
+ const oe = window.matchMedia("(prefers-color-scheme: dark)");
1487
1487
  try {
1488
- re.addEventListener("change", ({ matches: ie }) => {
1488
+ oe.addEventListener("change", ({ matches: ie }) => {
1489
1489
  R(ie ? "dark" : "light");
1490
1490
  });
1491
1491
  } catch {
1492
- re.addListener(({ matches: A }) => {
1492
+ oe.addListener(({ matches: A }) => {
1493
1493
  try {
1494
1494
  R(A ? "dark" : "light");
1495
1495
  } catch (O) {
@@ -1504,7 +1504,7 @@ const Cw = /* @__PURE__ */ ae.forwardRef(function(e, r) {
1504
1504
  }, [
1505
1505
  w
1506
1506
  ]), ae.useEffect(() => {
1507
- const re = (ie) => {
1507
+ const oe = (ie) => {
1508
1508
  var A;
1509
1509
  if (a.every((F) => ie[F] || ie.code === F)) {
1510
1510
  var L;
@@ -1512,7 +1512,7 @@ const Cw = /* @__PURE__ */ ae.forwardRef(function(e, r) {
1512
1512
  }
1513
1513
  ie.code === "Escape" && (document.activeElement === H.current || (A = H.current) != null && A.contains(document.activeElement)) && U(!1);
1514
1514
  };
1515
- return document.addEventListener("keydown", re), () => document.removeEventListener("keydown", re);
1515
+ return document.addEventListener("keydown", oe), () => document.removeEventListener("keydown", oe);
1516
1516
  }, [
1517
1517
  a
1518
1518
  ]), ae.useEffect(() => {
@@ -1533,11 +1533,11 @@ const Cw = /* @__PURE__ */ ae.forwardRef(function(e, r) {
1533
1533
  "aria-relevant": "additions text",
1534
1534
  "aria-atomic": "false",
1535
1535
  suppressHydrationWarning: !0
1536
- }, M.map((re, ie) => {
1536
+ }, M.map((oe, ie) => {
1537
1537
  var A;
1538
- const [O, L] = re.split("-");
1538
+ const [O, L] = oe.split("-");
1539
1539
  return T.length ? /* @__PURE__ */ ae.createElement("ol", {
1540
- key: re,
1540
+ key: oe,
1541
1541
  dir: x === "auto" ? qh() : x,
1542
1542
  tabIndex: -1,
1543
1543
  ref: H,
@@ -1571,7 +1571,7 @@ const Cw = /* @__PURE__ */ ae.forwardRef(function(e, r) {
1571
1571
  F.target instanceof HTMLElement && F.target.dataset.dismissible === "false" || D(!0);
1572
1572
  },
1573
1573
  onPointerUp: () => D(!1)
1574
- }, T.filter((F) => !F.position && ie === 0 || F.position === re).map((F, ee) => {
1574
+ }, T.filter((F) => !F.position && ie === 0 || F.position === oe).map((F, ee) => {
1575
1575
  var X, te;
1576
1576
  return /* @__PURE__ */ ae.createElement(xw, {
1577
1577
  key: F.id,
@@ -1586,7 +1586,7 @@ const Cw = /* @__PURE__ */ ae.forwardRef(function(e, r) {
1586
1586
  visibleToasts: f,
1587
1587
  closeButton: (te = v?.closeButton) != null ? te : l,
1588
1588
  interacting: I,
1589
- position: re,
1589
+ position: oe,
1590
1590
  style: v?.style,
1591
1591
  unstyled: v?.unstyled,
1592
1592
  classNames: v?.classNames,
@@ -1675,7 +1675,7 @@ const _w = async ({ content: t, apiKey: e, userTextLength: r }) => {
1675
1675
  }
1676
1676
  }, Tt = Rt(
1677
1677
  "AI_ACTION_COMMAND"
1678
- ), Sw = ae.lazy(() => import("./index-BUcy5Ctv.js"));
1678
+ ), Sw = ae.lazy(() => import("./index-BJBbBVqE.js"));
1679
1679
  function Tw(t) {
1680
1680
  return t.parentElement != null && t.parentElement.tagName === "LI" && t.previousSibling === null && t.getAttribute("aria-roledescription") === "checkbox";
1681
1681
  }
@@ -1940,7 +1940,7 @@ const Gi = Rt("INSERT_IMAGE_COMMAND"), Aw = ({
1940
1940
  captionsEnabled: t
1941
1941
  }) => {
1942
1942
  const [e] = Se();
1943
- return G(() => {
1943
+ return q(() => {
1944
1944
  if (!e.hasNodes([li]))
1945
1945
  throw new Error("ImagesPlugin: ImageNode not registered on editor");
1946
1946
  return Nr(
@@ -2395,7 +2395,7 @@ const Kh = (t) => typeof t == "boolean" ? `${t}` : t === 0 ? "0" : t, Zh = zm, d
2395
2395
  repeat: ["", "x", "y", "space", "round"]
2396
2396
  }], le = () => ["auto", "cover", "contain", C2, v2, {
2397
2397
  size: [Ae, Re]
2398
- }], fe = () => [al, ki, rn], re = () => [
2398
+ }], fe = () => [al, ki, rn], oe = () => [
2399
2399
  // Deprecated since Tailwind CSS v4.0.0
2400
2400
  "",
2401
2401
  "none",
@@ -3448,105 +3448,105 @@ const Kh = (t) => typeof t == "boolean" ? `${t}` : t === 0 ? "0" : t, Zh = zm, d
3448
3448
  * @see https://tailwindcss.com/docs/border-radius
3449
3449
  */
3450
3450
  rounded: [{
3451
- rounded: re()
3451
+ rounded: oe()
3452
3452
  }],
3453
3453
  /**
3454
3454
  * Border Radius Start
3455
3455
  * @see https://tailwindcss.com/docs/border-radius
3456
3456
  */
3457
3457
  "rounded-s": [{
3458
- "rounded-s": re()
3458
+ "rounded-s": oe()
3459
3459
  }],
3460
3460
  /**
3461
3461
  * Border Radius End
3462
3462
  * @see https://tailwindcss.com/docs/border-radius
3463
3463
  */
3464
3464
  "rounded-e": [{
3465
- "rounded-e": re()
3465
+ "rounded-e": oe()
3466
3466
  }],
3467
3467
  /**
3468
3468
  * Border Radius Top
3469
3469
  * @see https://tailwindcss.com/docs/border-radius
3470
3470
  */
3471
3471
  "rounded-t": [{
3472
- "rounded-t": re()
3472
+ "rounded-t": oe()
3473
3473
  }],
3474
3474
  /**
3475
3475
  * Border Radius Right
3476
3476
  * @see https://tailwindcss.com/docs/border-radius
3477
3477
  */
3478
3478
  "rounded-r": [{
3479
- "rounded-r": re()
3479
+ "rounded-r": oe()
3480
3480
  }],
3481
3481
  /**
3482
3482
  * Border Radius Bottom
3483
3483
  * @see https://tailwindcss.com/docs/border-radius
3484
3484
  */
3485
3485
  "rounded-b": [{
3486
- "rounded-b": re()
3486
+ "rounded-b": oe()
3487
3487
  }],
3488
3488
  /**
3489
3489
  * Border Radius Left
3490
3490
  * @see https://tailwindcss.com/docs/border-radius
3491
3491
  */
3492
3492
  "rounded-l": [{
3493
- "rounded-l": re()
3493
+ "rounded-l": oe()
3494
3494
  }],
3495
3495
  /**
3496
3496
  * Border Radius Start Start
3497
3497
  * @see https://tailwindcss.com/docs/border-radius
3498
3498
  */
3499
3499
  "rounded-ss": [{
3500
- "rounded-ss": re()
3500
+ "rounded-ss": oe()
3501
3501
  }],
3502
3502
  /**
3503
3503
  * Border Radius Start End
3504
3504
  * @see https://tailwindcss.com/docs/border-radius
3505
3505
  */
3506
3506
  "rounded-se": [{
3507
- "rounded-se": re()
3507
+ "rounded-se": oe()
3508
3508
  }],
3509
3509
  /**
3510
3510
  * Border Radius End End
3511
3511
  * @see https://tailwindcss.com/docs/border-radius
3512
3512
  */
3513
3513
  "rounded-ee": [{
3514
- "rounded-ee": re()
3514
+ "rounded-ee": oe()
3515
3515
  }],
3516
3516
  /**
3517
3517
  * Border Radius End Start
3518
3518
  * @see https://tailwindcss.com/docs/border-radius
3519
3519
  */
3520
3520
  "rounded-es": [{
3521
- "rounded-es": re()
3521
+ "rounded-es": oe()
3522
3522
  }],
3523
3523
  /**
3524
3524
  * Border Radius Top Left
3525
3525
  * @see https://tailwindcss.com/docs/border-radius
3526
3526
  */
3527
3527
  "rounded-tl": [{
3528
- "rounded-tl": re()
3528
+ "rounded-tl": oe()
3529
3529
  }],
3530
3530
  /**
3531
3531
  * Border Radius Top Right
3532
3532
  * @see https://tailwindcss.com/docs/border-radius
3533
3533
  */
3534
3534
  "rounded-tr": [{
3535
- "rounded-tr": re()
3535
+ "rounded-tr": oe()
3536
3536
  }],
3537
3537
  /**
3538
3538
  * Border Radius Bottom Right
3539
3539
  * @see https://tailwindcss.com/docs/border-radius
3540
3540
  */
3541
3541
  "rounded-br": [{
3542
- "rounded-br": re()
3542
+ "rounded-br": oe()
3543
3543
  }],
3544
3544
  /**
3545
3545
  * Border Radius Bottom Left
3546
3546
  * @see https://tailwindcss.com/docs/border-radius
3547
3547
  */
3548
3548
  "rounded-bl": [{
3549
- "rounded-bl": re()
3549
+ "rounded-bl": oe()
3550
3550
  }],
3551
3551
  /**
3552
3552
  * Border Width
@@ -8477,7 +8477,7 @@ const Yi = Rt(
8477
8477
  ), Ra = Rt(
8478
8478
  "AI_ADJUST_TONE_COMMAND"
8479
8479
  ), F5 = () => {
8480
- const [t] = Se(), e = oe(null), { apiKey: r } = Jt(), [o, n] = S(!1), [s, a] = S(!1), [c, l] = S(""), [d, h] = S(""), u = oe(null), p = oe(null), g = oe(void 0), m = async (k) => {
8480
+ const [t] = Se(), e = re(null), { apiKey: r } = Jt(), [o, n] = S(!1), [s, a] = S(!1), [c, l] = S(""), [d, h] = S(""), u = re(null), p = re(null), g = re(void 0), m = async (k) => {
8481
8481
  let w, E = "";
8482
8482
  if (t.getEditorState().read(() => {
8483
8483
  w = ce(), he(w) && (E = w.getTextContent().trim());
@@ -8655,7 +8655,7 @@ const Yi = Rt(
8655
8655
  throw console.error("Error inserting image into editor:", E), E;
8656
8656
  }
8657
8657
  };
8658
- return G(() => t.registerCommand(
8658
+ return q(() => t.registerCommand(
8659
8659
  Tt,
8660
8660
  ({ type: k }) => ((async () => {
8661
8661
  try {
@@ -8665,7 +8665,7 @@ const Yi = Rt(
8665
8665
  }
8666
8666
  })(), !0),
8667
8667
  Nt
8668
- ), [t]), G(() => t.registerCommand(
8668
+ ), [t]), q(() => t.registerCommand(
8669
8669
  Yi,
8670
8670
  (k) => ((async () => {
8671
8671
  try {
@@ -8675,7 +8675,7 @@ const Yi = Rt(
8675
8675
  }
8676
8676
  })(), !0),
8677
8677
  Nt
8678
- ), [t]), G(() => t.registerCommand(
8678
+ ), [t]), q(() => t.registerCommand(
8679
8679
  Ta,
8680
8680
  () => (t.getEditorState().read(() => {
8681
8681
  const k = ce();
@@ -8702,7 +8702,7 @@ const Yi = Rt(
8702
8702
  }
8703
8703
  }), !0),
8704
8704
  Nt
8705
- ), [t]), G(() => t.registerCommand(
8705
+ ), [t]), q(() => t.registerCommand(
8706
8706
  Ra,
8707
8707
  () => (t.getEditorState().read(() => {
8708
8708
  const k = ce();
@@ -8863,7 +8863,7 @@ function n0(t, e, r) {
8863
8863
  return k.cancel = _, k.flush = N, k;
8864
8864
  }
8865
8865
  function i0(t, e, r) {
8866
- const o = oe(null);
8866
+ const o = re(null);
8867
8867
  return o.current = t, zr(
8868
8868
  () => n0(
8869
8869
  (...n) => {
@@ -9016,7 +9016,7 @@ function g4({
9016
9016
  const [e] = Se(), [r, o] = S(""), [n, s] = S(!1), [a, c] = S(!1), [l, d] = S({
9017
9017
  right: "0",
9018
9018
  top: "0"
9019
- }), h = oe(/* @__PURE__ */ new Set()), u = oe(null);
9019
+ }), h = re(/* @__PURE__ */ new Set()), u = re(null);
9020
9020
  function p() {
9021
9021
  return u.current;
9022
9022
  }
@@ -9045,12 +9045,12 @@ function g4({
9045
9045
  50,
9046
9046
  1e3
9047
9047
  );
9048
- G(() => {
9048
+ q(() => {
9049
9049
  if (a)
9050
9050
  return document.addEventListener("mousemove", g), () => {
9051
9051
  s(!1), g.cancel(), document.removeEventListener("mousemove", g);
9052
9052
  };
9053
- }, [a, g]), G(() => e.registerMutationListener(
9053
+ }, [a, g]), q(() => e.registerMutationListener(
9054
9054
  gu,
9055
9055
  (f) => {
9056
9056
  e.getEditorState().read(() => {
@@ -10244,7 +10244,7 @@ const _6 = ({
10244
10244
  const [o] = Se(), { comments: n, currentUser: s, updateComment: a, deleteComment: c, addReply: l, resolveComment: d } = Fu(), h = s?.name || "Anonymous", u = s?.id, p = s?.avatar, [g, m] = S("open"), [y, f] = S(null), [v, x] = S(null), [_, N] = S(""), [k, w] = S(""), [E, T] = S(
10245
10245
  /* @__PURE__ */ new Set()
10246
10246
  );
10247
- G(() => {
10247
+ q(() => {
10248
10248
  const R = n.filter((H) => H.status === "open").length;
10249
10249
  r?.(R);
10250
10250
  }, [n, r]);
@@ -10294,8 +10294,8 @@ const _6 = ({
10294
10294
  },
10295
10295
  [o]
10296
10296
  ), U = (R) => {
10297
- const H = new Date(R), Q = (/* @__PURE__ */ new Date()).getTime() - H.getTime(), le = Math.floor(Q / (1e3 * 60)), fe = Math.floor(Q / (1e3 * 60 * 60)), re = Math.floor(Q / (1e3 * 60 * 60 * 24));
10298
- return le < 1 ? "Just now" : le < 60 ? `${le}m ago` : fe < 24 ? `${fe}h ago` : re < 7 ? `${re}d ago` : H.toLocaleDateString();
10297
+ const H = new Date(R), Q = (/* @__PURE__ */ new Date()).getTime() - H.getTime(), le = Math.floor(Q / (1e3 * 60)), fe = Math.floor(Q / (1e3 * 60 * 60)), oe = Math.floor(Q / (1e3 * 60 * 60 * 24));
10298
+ return le < 1 ? "Just now" : le < 60 ? `${le}m ago` : fe < 24 ? `${fe}h ago` : oe < 7 ? `${oe}d ago` : H.toLocaleDateString();
10299
10299
  }, I = n.filter(
10300
10300
  (R) => R.status === g
10301
10301
  ), D = (R) => {
@@ -10303,8 +10303,8 @@ const _6 = ({
10303
10303
  const z = new Set(H);
10304
10304
  return z.has(R) ? z.delete(R) : z.add(R), z;
10305
10305
  });
10306
- }, P = oe(null);
10307
- return G(() => {
10306
+ }, P = re(null);
10307
+ return q(() => {
10308
10308
  if (!P.current)
10309
10309
  return;
10310
10310
  const R = P.current;
@@ -12024,7 +12024,7 @@ var Yu = "PopperContent", [z_, B_] = c1(Yu), p1 = C.forwardRef(
12024
12024
  Ot(() => {
12025
12025
  R && le?.();
12026
12026
  }, [R, le]);
12027
- const fe = H.arrow?.x, re = H.arrow?.y, ie = H.arrow?.centerOffset !== 0, [A, O] = C.useState();
12027
+ const fe = H.arrow?.x, oe = H.arrow?.y, ie = H.arrow?.centerOffset !== 0, [A, O] = C.useState();
12028
12028
  return Ot(() => {
12029
12029
  v && O(window.getComputedStyle(v).zIndex);
12030
12030
  }, [v]), /* @__PURE__ */ i(
@@ -12058,7 +12058,7 @@ var Yu = "PopperContent", [z_, B_] = c1(Yu), p1 = C.forwardRef(
12058
12058
  placedSide: z,
12059
12059
  onArrowChange: k,
12060
12060
  arrowX: fe,
12061
- arrowY: re,
12061
+ arrowY: oe,
12062
12062
  shouldHideArrow: ie,
12063
12063
  children: /* @__PURE__ */ i(
12064
12064
  Xe.div,
@@ -13861,7 +13861,7 @@ function Wa(t, e, r) {
13861
13861
  }
13862
13862
  function KN() {
13863
13863
  const [t] = Se();
13864
- return G(() => t.registerCommand(
13864
+ return q(() => t.registerCommand(
13865
13865
  wm,
13866
13866
  (e) => {
13867
13867
  const r = e.clipboardData;
@@ -13970,7 +13970,7 @@ function KN() {
13970
13970
  const ZN = ({
13971
13971
  onBackToCode: t
13972
13972
  }) => {
13973
- const { htmlContent: e, originalHtml: r } = ci(), o = oe(null), [n, s] = S(400), [a, c] = S(!0), [l, d] = S(100), [h, u] = S("desktop"), p = r || e, g = () => {
13973
+ const { htmlContent: e, originalHtml: r } = ci(), o = re(null), [n, s] = S(400), [a, c] = S(!0), [l, d] = S(100), [h, u] = S("desktop"), p = r || e, g = () => {
13974
13974
  const f = /<html[\s>]/i.test(p), v = /<body[\s>]/i.test(p);
13975
13975
  return f && v ? p.replace(
13976
13976
  /<head>/i,
@@ -14009,7 +14009,7 @@ const ZN = ({
14009
14009
  </body>
14010
14010
  </html>`;
14011
14011
  };
14012
- G(() => {
14012
+ q(() => {
14013
14013
  if (o.current) {
14014
14014
  c(!0);
14015
14015
  const f = o.current;
@@ -14214,10 +14214,10 @@ const ZN = ({
14214
14214
  viewMode: l,
14215
14215
  setViewMode: d,
14216
14216
  setOriginalHtml: h
14217
- } = ci(), [u] = Se(), p = oe(null), g = oe({ start: 0, end: 0 }), [m, y] = S("idle");
14218
- G(() => {
14217
+ } = ci(), [u] = Se(), p = re(null), g = re({ start: 0, end: 0 }), [m, y] = S("idle");
14218
+ q(() => {
14219
14219
  t || (s(!1), c(!0), d("code"), h(""));
14220
- }, [t, s, c, d, h]), G(() => {
14220
+ }, [t, s, c, d, h]), q(() => {
14221
14221
  if (t && p.current && a && !n) {
14222
14222
  const W = {
14223
14223
  start: p.current.selectionStart,
@@ -14864,10 +14864,10 @@ const Ys = (t) => {
14864
14864
  return console.error("Error rendering file icon:", o), r;
14865
14865
  }
14866
14866
  }, eE = ({ url: t, displayType: e, alignment: r, width: o, height: n, nodeKey: s }) => {
14867
- const [a, c] = S({ width: o, height: n }), l = oe(null), [d] = Se(), [h, u] = S(""), [p, g] = S("");
14868
- G(() => {
14867
+ const [a, c] = S({ width: o, height: n }), l = re(null), [d] = Se(), [h, u] = S(""), [p, g] = S("");
14868
+ q(() => {
14869
14869
  c({ width: o, height: n });
14870
- }, [o, n]), G(() => {
14870
+ }, [o, n]), q(() => {
14871
14871
  (async () => {
14872
14872
  try {
14873
14873
  if (t.includes("youtube.com") || t.includes("youtu.be")) {
@@ -15445,7 +15445,7 @@ const Ys = (t) => {
15445
15445
  )
15446
15446
  }
15447
15447
  );
15448
- }, tE = C.lazy(() => import("./index-B14-X4aC.js"));
15448
+ }, tE = C.lazy(() => import("./index-aG2ca7vV.js"));
15449
15449
  function rE(t) {
15450
15450
  if (t instanceof HTMLDivElement) {
15451
15451
  const e = t.getAttribute("data-lexical-file-src"), r = t.getAttribute("data-lexical-file-name");
@@ -15609,7 +15609,7 @@ const oE = ({
15609
15609
  height: r,
15610
15610
  nodeKey: o
15611
15611
  }) => {
15612
- const [n] = Se(), [s, a, c] = Tx(o), [l, d] = S(!1), [h, u] = S(t), [p, g] = S(300), [m, y] = S(!1), f = oe(null), v = oe(null), x = oe(null), _ = ($) => {
15612
+ const [n] = Se(), [s, a, c] = Tx(o), [l, d] = S(!1), [h, u] = S(t), [p, g] = S(300), [m, y] = S(!1), f = re(null), v = re(null), x = re(null), _ = ($) => {
15613
15613
  const U = /<html[\s>]/i.test($), I = /<body[\s>]/i.test($);
15614
15614
  return U && I ? $.replace(
15615
15615
  /<head>/i,
@@ -15656,7 +15656,7 @@ const oE = ({
15656
15656
  } catch {
15657
15657
  }
15658
15658
  }, []);
15659
- G(() => {
15659
+ q(() => {
15660
15660
  f.current && !l && (f.current.srcdoc = _(t));
15661
15661
  }, [t, l]);
15662
15662
  const k = V(
@@ -15669,7 +15669,7 @@ const oE = ({
15669
15669
  }), !0) : !1,
15670
15670
  [n, s, o]
15671
15671
  );
15672
- return G(() => Nr(
15672
+ return q(() => Nr(
15673
15673
  n.registerCommand(km, k, Nt),
15674
15674
  n.registerCommand(
15675
15675
  nx,
@@ -16586,7 +16586,7 @@ var Pr = 10, [iy, Zo] = gi(pn), vE = "SelectContentImpl", xE = /* @__PURE__ */ c
16586
16586
  (x.value !== void 0 && x.value === F || X) && (M(L), X && (D.current = !0));
16587
16587
  },
16588
16588
  [x.value]
16589
- ), re = C.useCallback(() => _?.focus(), [_]), ie = C.useCallback(
16589
+ ), oe = C.useCallback(() => _?.focus(), [_]), ie = C.useCallback(
16590
16590
  (L, F, ee) => {
16591
16591
  const X = !D.current && !ee;
16592
16592
  (x.value !== void 0 && x.value === F || X) && W(L);
@@ -16613,7 +16613,7 @@ var Pr = 10, [iy, Zo] = gi(pn), vE = "SelectContentImpl", xE = /* @__PURE__ */ c
16613
16613
  onViewportChange: w,
16614
16614
  itemRefCallback: fe,
16615
16615
  selectedItem: T,
16616
- onItemLeave: re,
16616
+ onItemLeave: oe,
16617
16617
  itemTextRefCallback: ie,
16618
16618
  focusSelectedItem: R,
16619
16619
  selectedItemText: j,
@@ -16704,14 +16704,14 @@ var wE = "SelectItemAlignedPosition", ay = C.forwardRef((t, e) => {
16704
16704
  ]);
16705
16705
  c.style.minWidth = Ee + "px", c.style.right = ge + "px";
16706
16706
  }
16707
- const W = p(), $ = window.innerHeight - Pr * 2, U = y.scrollHeight, I = window.getComputedStyle(d), D = parseInt(I.borderTopWidth, 10), P = parseInt(I.paddingTop, 10), R = parseInt(I.borderBottomWidth, 10), H = parseInt(I.paddingBottom, 10), z = D + P + U + H + R, Q = Math.min(f.offsetHeight * 5, z), le = window.getComputedStyle(y), fe = parseInt(le.paddingTop, 10), re = parseInt(le.paddingBottom, 10), ie = E.top + E.height / 2 - Pr, A = $ - ie, O = f.offsetHeight / 2, L = f.offsetTop + O, F = D + P + L, ee = z - F;
16707
+ const W = p(), $ = window.innerHeight - Pr * 2, U = y.scrollHeight, I = window.getComputedStyle(d), D = parseInt(I.borderTopWidth, 10), P = parseInt(I.paddingTop, 10), R = parseInt(I.borderBottomWidth, 10), H = parseInt(I.paddingBottom, 10), z = D + P + U + H + R, Q = Math.min(f.offsetHeight * 5, z), le = window.getComputedStyle(y), fe = parseInt(le.paddingTop, 10), oe = parseInt(le.paddingBottom, 10), ie = E.top + E.height / 2 - Pr, A = $ - ie, O = f.offsetHeight / 2, L = f.offsetTop + O, F = D + P + L, ee = z - F;
16708
16708
  if (F <= ie) {
16709
16709
  const te = W.length > 0 && f === W[W.length - 1].ref.current;
16710
16710
  c.style.bottom = "0px";
16711
16711
  const se = d.clientHeight - y.offsetTop - y.offsetHeight, Le = Math.max(
16712
16712
  A,
16713
16713
  O + // viewport might have padding bottom, include it to avoid a scrollable viewport
16714
- (te ? re : 0) + se + R
16714
+ (te ? oe : 0) + se + R
16715
16715
  ), Ee = F + Le;
16716
16716
  c.style.height = Ee + "px";
16717
16717
  } else {
@@ -17737,7 +17737,7 @@ function Vc(t, e) {
17737
17737
  }
17738
17738
  const UE = () => {
17739
17739
  const [t] = Se();
17740
- return G(() => {
17740
+ return q(() => {
17741
17741
  if (!t.hasNodes([Ts]))
17742
17742
  throw new Error(
17743
17743
  "CustomHorizontalRulePlugin: CustomHorizontalRuleNode not registered on editor"
@@ -18312,7 +18312,7 @@ function JE({
18312
18312
  function Al(t) {
18313
18313
  return t instanceof Zn;
18314
18314
  }
18315
- const QE = ae.lazy(() => import("./index-BKSigTX1.js"));
18315
+ const QE = ae.lazy(() => import("./index-7sHS7FZi.js"));
18316
18316
  function eS(t) {
18317
18317
  const e = t;
18318
18318
  if (e.src.startsWith("file:///"))
@@ -18794,7 +18794,7 @@ const nS = [
18794
18794
  },
18795
18795
  []
18796
18796
  );
18797
- G(() => {
18797
+ q(() => {
18798
18798
  n("fontSizeInputValue", o.slice(0, -2));
18799
18799
  }, [o, n]);
18800
18800
  const s = zr(() => ({
@@ -18883,7 +18883,7 @@ const nS = [
18883
18883
  strokeWidth: 2
18884
18884
  });
18885
18885
  };
18886
- G(() => Nr(
18886
+ q(() => Nr(
18887
18887
  t.registerUpdateListener(({ editorState: x }) => {
18888
18888
  x.read(() => {
18889
18889
  g();
@@ -19052,8 +19052,8 @@ const By = async (t, e) => {
19052
19052
  throw r;
19053
19053
  }
19054
19054
  }, jy = ({ onTranscriptUpdate: t, onSessionEnd: e, apiKey: r }) => {
19055
- const [o, n] = S(!1), [s, a] = S(!1), [c, l] = S(!1), [d, h] = S(null), [u, p] = S(!1), [g, m] = S(0), y = oe(null), f = oe(null), v = oe(null), x = oe(null), _ = oe(-1), N = oe(""), k = oe(""), w = oe(!1), E = oe(null), T = oe(0), M = oe(0);
19056
- G(() => {
19055
+ const [o, n] = S(!1), [s, a] = S(!1), [c, l] = S(!1), [d, h] = S(null), [u, p] = S(!1), [g, m] = S(0), y = re(null), f = re(null), v = re(null), x = re(null), _ = re(-1), N = re(""), k = re(""), w = re(!1), E = re(null), T = re(0), M = re(0);
19056
+ q(() => {
19057
19057
  if (o && !s)
19058
19058
  return T.current === 0 && (T.current = Date.now() - M.current), E.current = setInterval(() => {
19059
19059
  const P = Math.floor((Date.now() - T.current) / 1e3);
@@ -19084,21 +19084,21 @@ const By = async (t, e) => {
19084
19084
  p(!0), l(!1);
19085
19085
  }, z.onmessage = (fe) => {
19086
19086
  try {
19087
- const re = JSON.parse(fe.data);
19088
- if (re.type === "Turn") {
19089
- if (re.transcript !== void 0) {
19090
- re.turn_order !== _.current && (_.current !== -1 && N.current && (k.current += N.current + " "), _.current = re.turn_order, N.current = ""), N.current = re.transcript;
19087
+ const oe = JSON.parse(fe.data);
19088
+ if (oe.type === "Turn") {
19089
+ if (oe.transcript !== void 0) {
19090
+ oe.turn_order !== _.current && (_.current !== -1 && N.current && (k.current += N.current + " "), _.current = oe.turn_order, N.current = ""), N.current = oe.transcript;
19091
19091
  const ie = k.current + N.current;
19092
- if (t(ie), re.end_of_turn) {
19092
+ if (t(ie), oe.end_of_turn) {
19093
19093
  k.current += N.current + " ", N.current = "";
19094
19094
  const A = k.current.trim();
19095
19095
  t(A);
19096
19096
  }
19097
19097
  }
19098
19098
  } else
19099
- re.type === "error" && h("Transcription error: " + (re.message || ""));
19100
- } catch (re) {
19101
- console.error("WebSocket message error:", re);
19099
+ oe.type === "error" && h("Transcription error: " + (oe.message || ""));
19100
+ } catch (oe) {
19101
+ console.error("WebSocket message error:", oe);
19102
19102
  }
19103
19103
  }, z.onerror = () => {
19104
19104
  h("WebSocket connection error"), p(!1);
@@ -19115,8 +19115,8 @@ const By = async (t, e) => {
19115
19115
  Q,
19116
19116
  "pcm-processor"
19117
19117
  );
19118
- x.current = fe, fe.port.onmessage = (re) => {
19119
- z.readyState === WebSocket.OPEN && z.send(re.data);
19118
+ x.current = fe, fe.port.onmessage = (oe) => {
19119
+ z.readyState === WebSocket.OPEN && z.send(oe.data);
19120
19120
  }, le.connect(fe);
19121
19121
  } catch {
19122
19122
  W(Q, le, z);
@@ -19144,9 +19144,9 @@ const By = async (t, e) => {
19144
19144
  x.current = z;
19145
19145
  let Q = [], le = 0;
19146
19146
  const fe = 1600;
19147
- z.onaudioprocess = (re) => {
19147
+ z.onaudioprocess = (oe) => {
19148
19148
  if (H.readyState === WebSocket.OPEN) {
19149
- const A = re.inputBuffer.getChannelData(0), O = new Int16Array(A.length);
19149
+ const A = oe.inputBuffer.getChannelData(0), O = new Int16Array(A.length);
19150
19150
  for (let L = 0; L < A.length; L++) {
19151
19151
  const F = Math.max(-1, Math.min(1, A[L]));
19152
19152
  O[L] = F < 0 ? F * 32768 : F * 32767;
@@ -19205,10 +19205,10 @@ function gS({
19205
19205
  selectedTextForInline: a,
19206
19206
  savedSelection: c
19207
19207
  }) {
19208
- const [l, d] = S(""), [h, u] = S(""), [p, g] = S(!1), [m, y] = S(null), [f, v] = S("chatgpt"), [x, _] = S(1), [N, k] = S(0), [w, E] = S(0), [T, M] = S("idle"), [j, W] = S(!1), $ = oe(c ?? null);
19209
- G(() => {
19208
+ const [l, d] = S(""), [h, u] = S(""), [p, g] = S(!1), [m, y] = S(null), [f, v] = S("chatgpt"), [x, _] = S(1), [N, k] = S(0), [w, E] = S(0), [T, M] = S("idle"), [j, W] = S(!1), $ = re(c ?? null);
19209
+ q(() => {
19210
19210
  $.current = c ?? null;
19211
- }, [c]), G(() => {
19211
+ }, [c]), q(() => {
19212
19212
  t && n ? (u(n), d("")) : t || (u(""), d(""));
19213
19213
  }, [t, n]);
19214
19214
  const {
@@ -19229,7 +19229,7 @@ function gS({
19229
19229
  const F = Math.floor(L / 60), ee = L % 60;
19230
19230
  return `${F.toString().padStart(2, "0")}:${ee.toString().padStart(2, "0")}`;
19231
19231
  };
19232
- G(() => {
19232
+ q(() => {
19233
19233
  let L = !0;
19234
19234
  return (async () => {
19235
19235
  try {
@@ -19263,7 +19263,7 @@ function gS({
19263
19263
  "design image",
19264
19264
  "produce image"
19265
19265
  ].some((X) => F.includes(X));
19266
- }, re = async () => {
19266
+ }, oe = async () => {
19267
19267
  if (!l.trim() || p)
19268
19268
  return;
19269
19269
  const L = h && h.trim() !== "";
@@ -19309,8 +19309,8 @@ function gS({
19309
19309
  default:
19310
19310
  return "OpenAI ChatGPT";
19311
19311
  }
19312
- }, O = oe(null);
19313
- return G(() => {
19312
+ }, O = re(null);
19313
+ return q(() => {
19314
19314
  if (O.current) {
19315
19315
  const L = O.current;
19316
19316
  L.style.height = "auto", L.style.height = `${L.scrollHeight}px`;
@@ -19447,7 +19447,7 @@ function gS({
19447
19447
  F.style.height = "auto", F.style.height = `${F.scrollHeight}px`;
19448
19448
  },
19449
19449
  onKeyDown: (L) => {
19450
- L.key === "Enter" && !L.shiftKey && !p && l.trim() && (L.preventDefault(), re());
19450
+ L.key === "Enter" && !L.shiftKey && !p && l.trim() && (L.preventDefault(), oe());
19451
19451
  },
19452
19452
  className: `cteditor-w-full cteditor-block cteditor-transition-all cteditor-bg-background cteditor-rounded-md cteditor-resize-none cteditor-border cteditor-border-foreground/15 cteditor-outline-0 cteditor-p-2 cteditor-min-h-16 cteditor-text-xs cteditor-overflow-clip
19453
19453
  ${U ? "" : "cteditor-max-h-[57vh] cteditor-overflow-y-auto"}
@@ -19588,7 +19588,7 @@ function gS({
19588
19588
  /* @__PURE__ */ i(
19589
19589
  ye,
19590
19590
  {
19591
- onClick: re,
19591
+ onClick: oe,
19592
19592
  disabled: p || !l.trim(),
19593
19593
  className: "[&>svg]:!cteditor-size-4",
19594
19594
  children: p ? /* @__PURE__ */ b(Ce, { children: [
@@ -19611,13 +19611,13 @@ function yS({
19611
19611
  onClose: n,
19612
19612
  anchorElem: s
19613
19613
  }) {
19614
- const [a, c] = S(r), [l, d] = S(""), [h, u] = S(!1), [p, g] = S("idle"), [m, y] = S(!0), f = oe(null), v = oe(null), [x, _] = S(o);
19615
- G(() => {
19614
+ const [a, c] = S(r), [l, d] = S(""), [h, u] = S(!1), [p, g] = S("idle"), [m, y] = S(!0), f = re(null), v = re(null), [x, _] = S(o);
19615
+ q(() => {
19616
19616
  t.getEditorState().read(() => {
19617
19617
  const M = ce();
19618
19618
  M && (v.current = M.clone());
19619
19619
  });
19620
- }, [t]), G(() => {
19620
+ }, [t]), q(() => {
19621
19621
  const M = t.registerUpdateListener(({ editorState: j }) => {
19622
19622
  j.read(() => {
19623
19623
  const W = ce();
@@ -19630,7 +19630,7 @@ function yS({
19630
19630
  return () => {
19631
19631
  M();
19632
19632
  };
19633
- }, [t]), G(() => {
19633
+ }, [t]), q(() => {
19634
19634
  f.current && f.current.focus();
19635
19635
  }, []);
19636
19636
  const N = (M) => {
@@ -19699,7 +19699,7 @@ function yS({
19699
19699
  for (const fe of le)
19700
19700
  if (fe.trim() !== "")
19701
19701
  try {
19702
- const re = fe.startsWith("data: ") ? fe.slice(6) : fe, ie = JSON.parse(re);
19702
+ const oe = fe.startsWith("data: ") ? fe.slice(6) : fe, ie = JSON.parse(oe);
19703
19703
  if (ie.type === "content" && ie.content) {
19704
19704
  if (D += ie.content, D.length - P.length > 50 || ie.content.includes(`
19705
19705
  `)) {
@@ -19758,8 +19758,8 @@ function yS({
19758
19758
  }), console.log("Stream completed");
19759
19759
  } else if (ie.type === "error")
19760
19760
  throw new Error(ie.error || "Stream error occurred");
19761
- } catch (re) {
19762
- console.warn("Failed to parse chunk:", fe, re);
19761
+ } catch (oe) {
19762
+ console.warn("Failed to parse chunk:", fe, oe);
19763
19763
  }
19764
19764
  }
19765
19765
  d(""), _(""), g("success"), y(!0), u(!1), t.focus();
@@ -19858,7 +19858,7 @@ function yS({
19858
19858
  function bS(t, e, r) {
19859
19859
  const [o, n] = S(!1), [s, a] = S(
19860
19860
  void 0
19861
- ), c = oe(null), [l, d] = S(!1), [h, u] = S("chatgpt"), [p, g] = S(""), m = V(
19861
+ ), c = re(null), [l, d] = S(!1), [h, u] = S("chatgpt"), [p, g] = S(""), m = V(
19862
19862
  (x) => {
19863
19863
  t.getEditorState().read(() => {
19864
19864
  const _ = ce();
@@ -19874,7 +19874,7 @@ function bS(t, e, r) {
19874
19874
  ), f = V(() => {
19875
19875
  d(!1), g("");
19876
19876
  }, []);
19877
- G(() => {
19877
+ q(() => {
19878
19878
  const x = t.registerCommand(
19879
19879
  Xn,
19880
19880
  (N) => (m(N), !0),
@@ -19973,7 +19973,7 @@ function cf({ isActive: t }) {
19973
19973
  }
19974
19974
  });
19975
19975
  }, [e]);
19976
- return G(() => e.registerCommand(
19976
+ return q(() => e.registerCommand(
19977
19977
  uh,
19978
19978
  () => (r(), !0),
19979
19979
  vn
@@ -20135,7 +20135,7 @@ const xS = () => /* @__PURE__ */ b(
20135
20135
  Rt();
20136
20136
  const kS = Rt(), _S = () => {
20137
20137
  const [t] = Se();
20138
- return G(() => t.registerCommand(
20138
+ return q(() => t.registerCommand(
20139
20139
  kS,
20140
20140
  ({ text: e }) => (console.log("Received INSERT_TRANSCRIPT_COMMAND:", e), t.update(() => {
20141
20141
  const r = ce();
@@ -20148,8 +20148,8 @@ const kS = Rt(), _S = () => {
20148
20148
  Nt
20149
20149
  ), [t]), null;
20150
20150
  }, NS = ({ isRecording: t, editor: e }) => {
20151
- const [r, o] = S({ x: 0, y: 0 }), [n, s] = S(!1), a = oe(null);
20152
- return G(() => {
20151
+ const [r, o] = S({ x: 0, y: 0 }), [n, s] = S(!1), a = re(null);
20152
+ return q(() => {
20153
20153
  if (!t || !e) {
20154
20154
  s(!1);
20155
20155
  return;
@@ -20211,16 +20211,16 @@ const kS = Rt(), _S = () => {
20211
20211
  }
20212
20212
  );
20213
20213
  }, ES = (t, e = "en") => {
20214
- const [r, o] = S(!1), [n, s] = S(!1), [a, c] = S(!1), [l, d] = S(!1), [h, u] = S(""), [p, g] = S(null), [m, y] = S(!1), [f, v] = S(0), x = Ml(e), _ = oe(null), N = oe(null), k = oe(null), w = oe(null), E = oe(-1), T = oe(null), M = oe(""), j = oe(""), W = oe(null), $ = oe(0), U = oe(0), I = oe(t), D = oe(e), P = oe(null), R = oe([]);
20215
- G(() => {
20214
+ const [r, o] = S(!1), [n, s] = S(!1), [a, c] = S(!1), [l, d] = S(!1), [h, u] = S(""), [p, g] = S(null), [m, y] = S(!1), [f, v] = S(0), x = Ml(e), _ = re(null), N = re(null), k = re(null), w = re(null), E = re(-1), T = re(null), M = re(""), j = re(""), W = re(null), $ = re(0), U = re(0), I = re(t), D = re(e), P = re(null), R = re([]);
20215
+ q(() => {
20216
20216
  I.current = t;
20217
- }, [t]), G(() => {
20217
+ }, [t]), q(() => {
20218
20218
  D.current = e;
20219
20219
  }, [e]);
20220
20220
  const H = V((O) => {
20221
20221
  T.current = O;
20222
20222
  }, []);
20223
- G(() => {
20223
+ q(() => {
20224
20224
  if (r && !n)
20225
20225
  return $.current === 0 && ($.current = Date.now() - U.current), W.current = window.setInterval(() => {
20226
20226
  const O = Math.floor((Date.now() - $.current) / 1e3);
@@ -20281,15 +20281,15 @@ const kS = Rt(), _S = () => {
20281
20281
  ve && T.current && (T.current.update(() => {
20282
20282
  const B = ce();
20283
20283
  if (he(B)) {
20284
- const q = rt(ve);
20285
- B.insertNodes([q]);
20284
+ const G = rt(ve);
20285
+ B.insertNodes([G]);
20286
20286
  }
20287
20287
  }), M.current = ke);
20288
20288
  } else
20289
20289
  T.current && ge ? (T.current.update(() => {
20290
20290
  const ve = ce();
20291
20291
  if (he(ve)) {
20292
- for (let q = 0; q < ge.length; q++)
20292
+ for (let G = 0; G < ge.length; G++)
20293
20293
  ve.deleteCharacter(!0);
20294
20294
  const B = rt(ke);
20295
20295
  ve.insertNodes([B]);
@@ -20377,7 +20377,7 @@ const kS = Rt(), _S = () => {
20377
20377
  }, L.connect(ee), ee.connect(O.destination);
20378
20378
  }, fe = V(() => {
20379
20379
  !r || n || (s(!0), k.current && k.current.state === "running" && k.current.suspend());
20380
- }, [r, n]), re = V(() => {
20380
+ }, [r, n]), oe = V(() => {
20381
20381
  !r || !n || (s(!1), $.current = Date.now() - U.current, k.current && k.current.state === "suspended" && k.current.resume());
20382
20382
  }, [r, n]), ie = V(async () => {
20383
20383
  const O = $.current > 0 ? Math.floor((Date.now() - $.current) / 1e3) : 0, L = D.current, F = Ml(L);
@@ -20422,7 +20422,7 @@ const kS = Rt(), _S = () => {
20422
20422
  }, [z]), A = V(async () => {
20423
20423
  r ? await ie() : await Q();
20424
20424
  }, [r, Q, ie]);
20425
- return G(() => () => {
20425
+ return q(() => () => {
20426
20426
  ie();
20427
20427
  }, [ie]), {
20428
20428
  isRecording: r,
@@ -20436,7 +20436,7 @@ const kS = Rt(), _S = () => {
20436
20436
  elapsedTime: f,
20437
20437
  toggleRecording: A,
20438
20438
  pauseRecording: fe,
20439
- resumeRecording: re,
20439
+ resumeRecording: oe,
20440
20440
  setEditor: H
20441
20441
  };
20442
20442
  }, lf = ({ editor: t, apiKey: e }) => {
@@ -20453,7 +20453,7 @@ const kS = Rt(), _S = () => {
20453
20453
  resumeRecording: g,
20454
20454
  setEditor: m
20455
20455
  } = ES(e, r);
20456
- G(() => {
20456
+ q(() => {
20457
20457
  m(t);
20458
20458
  }, [t, m]);
20459
20459
  const y = (f) => {
@@ -20586,10 +20586,10 @@ const Jr = {
20586
20586
  }
20587
20587
  }, AS = async () => {
20588
20588
  try {
20589
- const t = await import("./html2pdf.bundle.min-B7vlR-6w.js").then((e) => e.h);
20589
+ const t = await import("./html2pdf.bundle.min-D6BlTaug.js").then((e) => e.h);
20590
20590
  return t?.default || t;
20591
20591
  } catch {
20592
- const t = await import("./html2pdf.bundle-B7OdYlTX.js").then((e) => e.h);
20592
+ const t = await import("./html2pdf.bundle-ZbgrRtz0.js").then((e) => e.h);
20593
20593
  return t?.default || t;
20594
20594
  }
20595
20595
  };
@@ -21738,7 +21738,7 @@ class Uy {
21738
21738
  const GS = 50, KS = 10, Ol = "cteditor_feedback_dismissed_at";
21739
21739
  function ZS(t) {
21740
21740
  const [e, r] = S(!1), [o, n] = S(0), [s, a] = S(!0);
21741
- return G(() => {
21741
+ return q(() => {
21742
21742
  if (!t) {
21743
21743
  a(!1);
21744
21744
  return;
@@ -21937,7 +21937,7 @@ var _r = "MenuContent", [s3, mh] = _n(_r), Jy = C.forwardRef(
21937
21937
  disableOutsideScroll: m,
21938
21938
  ...y
21939
21939
  } = t, f = Nn(_r, r), v = As(_r, r), x = Zc(r), _ = Ky(r), N = e3(r), [k, w] = C.useState(null), E = C.useRef(null), T = lt(e, E, f.onContentChange), M = C.useRef(0), j = C.useRef(""), W = C.useRef(0), $ = C.useRef(null), U = C.useRef("right"), I = C.useRef(0), D = m ? ps : C.Fragment, P = m ? { as: l3, allowPinchZoom: !0 } : void 0, R = (z) => {
21940
- const Q = j.current + z, le = N().filter((L) => !L.disabled), fe = document.activeElement, re = le.find((L) => L.ref.current === fe)?.textValue, ie = le.map((L) => L.textValue), A = w3(ie, Q, re), O = le.find((L) => L.textValue === A)?.ref.current;
21940
+ const Q = j.current + z, le = N().filter((L) => !L.disabled), fe = document.activeElement, oe = le.find((L) => L.ref.current === fe)?.textValue, ie = le.map((L) => L.textValue), A = w3(ie, Q, oe), O = le.find((L) => L.textValue === A)?.ref.current;
21941
21941
  (function L(F) {
21942
21942
  j.current = F, window.clearTimeout(M.current), F !== "" && (M.current = window.setTimeout(() => L(""), 1e3));
21943
21943
  })(Q), O && setTimeout(() => O.focus());
@@ -22017,8 +22017,8 @@ var _r = "MenuContent", [s3, mh] = _n(_r), Jy = C.forwardRef(
22017
22017
  ref: T,
22018
22018
  style: { outline: "none", ...y.style },
22019
22019
  onKeyDown: Ne(y.onKeyDown, (z) => {
22020
- const le = z.target.closest("[data-radix-menu-content]") === z.currentTarget, fe = z.ctrlKey || z.altKey || z.metaKey, re = z.key.length === 1;
22021
- le && (z.key === "Tab" && z.preventDefault(), !fe && re && R(z.key));
22020
+ const le = z.target.closest("[data-radix-menu-content]") === z.currentTarget, fe = z.ctrlKey || z.altKey || z.metaKey, oe = z.key.length === 1;
22021
+ le && (z.key === "Tab" && z.preventDefault(), !fe && oe && R(z.key));
22022
22022
  const ie = E.current;
22023
22023
  if (z.target !== ie || !XS.includes(z.key))
22024
22024
  return;
@@ -22531,12 +22531,12 @@ var J3 = "DropdownMenuArrow", Q3 = C.forwardRef(
22531
22531
  }
22532
22532
  );
22533
22533
  Q3.displayName = J3;
22534
- var e9 = "DropdownMenuSubTrigger", Tb = C.forwardRef((t, e) => {
22534
+ var eT = "DropdownMenuSubTrigger", Tb = C.forwardRef((t, e) => {
22535
22535
  const { __scopeDropdownMenu: r, ...o } = t, n = or(r);
22536
22536
  return /* @__PURE__ */ i(F3, { ...n, ...o, ref: e });
22537
22537
  });
22538
- Tb.displayName = e9;
22539
- var t9 = "DropdownMenuSubContent", Rb = C.forwardRef((t, e) => {
22538
+ Tb.displayName = eT;
22539
+ var tT = "DropdownMenuSubContent", Rb = C.forwardRef((t, e) => {
22540
22540
  const { __scopeDropdownMenu: r, ...o } = t, n = or(r);
22541
22541
  return /* @__PURE__ */ i(
22542
22542
  $3,
@@ -22555,9 +22555,9 @@ var t9 = "DropdownMenuSubContent", Rb = C.forwardRef((t, e) => {
22555
22555
  }
22556
22556
  );
22557
22557
  });
22558
- Rb.displayName = t9;
22559
- var r9 = gb, o9 = bb, n9 = vb, Ab = wb, Lb = Cb, Mb = kb, Ib = _b, Pb = Nb, Ob = Eb, Db = Sb, Fb = Tb, $b = Rb;
22560
- const fn = r9, mn = o9, i9 = C.forwardRef(({ className: t, inset: e, children: r, ...o }, n) => /* @__PURE__ */ b(
22558
+ Rb.displayName = tT;
22559
+ var rT = gb, oT = bb, nT = vb, Ab = wb, Lb = Cb, Mb = kb, Ib = _b, Pb = Nb, Ob = Eb, Db = Sb, Fb = Tb, $b = Rb;
22560
+ const fn = rT, mn = oT, iT = C.forwardRef(({ className: t, inset: e, children: r, ...o }, n) => /* @__PURE__ */ b(
22561
22561
  Fb,
22562
22562
  {
22563
22563
  ref: n,
@@ -22573,8 +22573,8 @@ const fn = r9, mn = o9, i9 = C.forwardRef(({ className: t, inset: e, children: r
22573
22573
  ]
22574
22574
  }
22575
22575
  ));
22576
- i9.displayName = Fb.displayName;
22577
- const s9 = C.forwardRef(({ className: t, ...e }, r) => /* @__PURE__ */ i(
22576
+ iT.displayName = Fb.displayName;
22577
+ const sT = C.forwardRef(({ className: t, ...e }, r) => /* @__PURE__ */ i(
22578
22578
  $b,
22579
22579
  {
22580
22580
  ref: r,
@@ -22585,10 +22585,10 @@ const s9 = C.forwardRef(({ className: t, ...e }, r) => /* @__PURE__ */ i(
22585
22585
  ...e
22586
22586
  }
22587
22587
  ));
22588
- s9.displayName = $b.displayName;
22588
+ sT.displayName = $b.displayName;
22589
22589
  const jo = C.forwardRef(({ className: t, sideOffset: e = 4, ...r }, o) => {
22590
22590
  const n = qo();
22591
- return /* @__PURE__ */ i(n9, { container: n, children: /* @__PURE__ */ i(
22591
+ return /* @__PURE__ */ i(nT, { container: n, children: /* @__PURE__ */ i(
22592
22592
  Ab,
22593
22593
  {
22594
22594
  ref: o,
@@ -22616,7 +22616,7 @@ const Je = C.forwardRef(({ className: t, inset: e, ...r }, o) => /* @__PURE__ */
22616
22616
  }
22617
22617
  ));
22618
22618
  Je.displayName = Mb.displayName;
22619
- const a9 = C.forwardRef(({ className: t, children: e, checked: r, ...o }, n) => /* @__PURE__ */ b(
22619
+ const aT = C.forwardRef(({ className: t, children: e, checked: r, ...o }, n) => /* @__PURE__ */ b(
22620
22620
  Ib,
22621
22621
  {
22622
22622
  ref: n,
@@ -22632,8 +22632,8 @@ const a9 = C.forwardRef(({ className: t, children: e, checked: r, ...o }, n) =>
22632
22632
  ]
22633
22633
  }
22634
22634
  ));
22635
- a9.displayName = Ib.displayName;
22636
- const c9 = C.forwardRef(({ className: t, children: e, ...r }, o) => /* @__PURE__ */ b(
22635
+ aT.displayName = Ib.displayName;
22636
+ const cT = C.forwardRef(({ className: t, children: e, ...r }, o) => /* @__PURE__ */ b(
22637
22637
  Pb,
22638
22638
  {
22639
22639
  ref: o,
@@ -22648,8 +22648,8 @@ const c9 = C.forwardRef(({ className: t, children: e, ...r }, o) => /* @__PURE__
22648
22648
  ]
22649
22649
  }
22650
22650
  ));
22651
- c9.displayName = Pb.displayName;
22652
- const l9 = C.forwardRef(({ className: t, inset: e, ...r }, o) => /* @__PURE__ */ i(
22651
+ cT.displayName = Pb.displayName;
22652
+ const lT = C.forwardRef(({ className: t, inset: e, ...r }, o) => /* @__PURE__ */ i(
22653
22653
  Lb,
22654
22654
  {
22655
22655
  ref: o,
@@ -22661,7 +22661,7 @@ const l9 = C.forwardRef(({ className: t, inset: e, ...r }, o) => /* @__PURE__ */
22661
22661
  ...r
22662
22662
  }
22663
22663
  ));
22664
- l9.displayName = Lb.displayName;
22664
+ lT.displayName = Lb.displayName;
22665
22665
  const Hn = C.forwardRef(({ className: t, ...e }, r) => /* @__PURE__ */ i(
22666
22666
  Db,
22667
22667
  {
@@ -22674,11 +22674,11 @@ const Hn = C.forwardRef(({ className: t, ...e }, r) => /* @__PURE__ */ i(
22674
22674
  }
22675
22675
  ));
22676
22676
  Hn.displayName = Db.displayName;
22677
- const d9 = () => {
22677
+ const dT = () => {
22678
22678
  const [t, e] = S(!1);
22679
22679
  return { show: () => e(!0), hide: () => e(!1), isOpen: t };
22680
- }, u9 = () => {
22681
- const [t] = Se(), e = d9(), { toolbarState: r } = xi(), o = r.elementFormat;
22680
+ }, uT = () => {
22681
+ const [t] = Se(), e = dT(), { toolbarState: r } = xi(), o = r.elementFormat;
22682
22682
  return /* @__PURE__ */ b(
22683
22683
  fn,
22684
22684
  {
@@ -22724,7 +22724,7 @@ const d9 = () => {
22724
22724
  ]
22725
22725
  }
22726
22726
  );
22727
- }, h9 = () => {
22727
+ }, hT = () => {
22728
22728
  const [t] = Se(), { toolbarState: e } = xi(), r = e.elementFormat;
22729
22729
  return /* @__PURE__ */ i("div", { className: "cteditor-flex cteditor-flex-col cteditor-gap-1", children: Bi.map((o, n) => /* @__PURE__ */ b(
22730
22730
  "button",
@@ -22744,7 +22744,7 @@ const d9 = () => {
22744
22744
  },
22745
22745
  n
22746
22746
  )) });
22747
- }, p9 = (t) => {
22747
+ }, pT = (t) => {
22748
22748
  const {
22749
22749
  blockType: e,
22750
22750
  enableHeadings: r = !0,
@@ -22859,9 +22859,9 @@ const d9 = () => {
22859
22859
  formatNumberedList: h,
22860
22860
  formatQuote: u
22861
22861
  };
22862
- }, f9 = (t) => {
22862
+ }, fT = (t) => {
22863
22863
  const [e, r] = S(!1);
22864
- return G(() => {
22864
+ return q(() => {
22865
22865
  const o = window.matchMedia(t), n = () => r(o.matches);
22866
22866
  return n(), o.addEventListener("change", n), () => {
22867
22867
  o.removeEventListener("change", n);
@@ -22874,8 +22874,8 @@ const d9 = () => {
22874
22874
  enableBlockquote: o = !0
22875
22875
  }) => {
22876
22876
  const [n, s] = S(null), a = !!n;
22877
- f9("(min-width:960px)");
22878
- const c = (u) => s(u.currentTarget), l = () => s(null), { blocks: d } = p9({
22877
+ fT("(min-width:960px)");
22878
+ const c = (u) => s(u.currentTarget), l = () => s(null), { blocks: d } = pT({
22879
22879
  blockType: t,
22880
22880
  enableHeadings: e,
22881
22881
  enableLists: r,
@@ -22938,13 +22938,13 @@ const d9 = () => {
22938
22938
  ]
22939
22939
  }
22940
22940
  ) });
22941
- }, m9 = [
22941
+ }, mT = [
22942
22942
  { value: "bar", label: "Bar Chart", icon: "📊", description: "Vertical bars for comparing values" },
22943
22943
  { value: "horizontal-bar", label: "Horizontal Bar", icon: "📈", description: "Horizontal bars for categories" },
22944
22944
  { value: "line", label: "Line Chart", icon: "📉", description: "Connected points showing trends" },
22945
22945
  { value: "pie", label: "Pie Chart", icon: "🥧", description: "Circular chart for proportions" },
22946
22946
  { value: "donut", label: "Donut Chart", icon: "🍩", description: "Hollow circle showing proportions" }
22947
- ], g9 = [
22947
+ ], gT = [
22948
22948
  "#4285f4",
22949
22949
  // Blue
22950
22950
  "#ea4335",
@@ -22967,7 +22967,7 @@ function Hb({
22967
22967
  values: [10, 20, 15, 25, 30],
22968
22968
  labels: ["Item 1", "Item 2", "Item 3", "Item 4", "Item 5"],
22969
22969
  title: "Sample Chart",
22970
- colors: g9
22970
+ colors: gT
22971
22971
  }), e(!1);
22972
22972
  };
22973
22973
  return /* @__PURE__ */ i(Gt, { open: t, onOpenChange: e, children: /* @__PURE__ */ b(Bt, { className: "sm:cteditor-max-w-[500px] cteditor-max-w-[calc(100%-2rem)] cteditor-rounded-lg", children: [
@@ -22980,7 +22980,7 @@ function Hb({
22980
22980
  ] }),
22981
22981
  /* @__PURE__ */ b("div", { className: "cteditor-space-y-4 ", children: [
22982
22982
  /* @__PURE__ */ i(vt, { className: "cteditor-text-sm cteditor-font-medium", children: "Chart Type" }),
22983
- /* @__PURE__ */ i("div", { className: "cteditor-grid cteditor-gap-3", children: m9.map((a) => /* @__PURE__ */ b(
22983
+ /* @__PURE__ */ i("div", { className: "cteditor-grid cteditor-gap-3", children: mT.map((a) => /* @__PURE__ */ b(
22984
22984
  "button",
22985
22985
  {
22986
22986
  onClick: () => n(a.value),
@@ -23014,9 +23014,9 @@ function Hb({
23014
23014
  ] })
23015
23015
  ] }) });
23016
23016
  }
23017
- const zb = Rt("INSERT_HTML_CANVAS_COMMAND"), y9 = () => {
23017
+ const zb = Rt("INSERT_HTML_CANVAS_COMMAND"), yT = () => {
23018
23018
  const [t] = Se();
23019
- return G(() => t.registerCommand(
23019
+ return q(() => t.registerCommand(
23020
23020
  zb,
23021
23021
  (e) => {
23022
23022
  const { htmlContent: r, width: o, height: n } = e;
@@ -23040,7 +23040,7 @@ const zb = Rt("INSERT_HTML_CANVAS_COMMAND"), y9 = () => {
23040
23040
  open: t,
23041
23041
  onOpenChange: e
23042
23042
  }) => {
23043
- const [r] = Se(), [o, n] = S(""), s = oe(null), a = () => {
23043
+ const [r] = Se(), [o, n] = S(""), s = re(null), a = () => {
23044
23044
  o.trim() && (r.dispatchCommand(zb, {
23045
23045
  htmlContent: o.trim(),
23046
23046
  width: "100%",
@@ -23207,7 +23207,7 @@ function jb(t, e) {
23207
23207
  return n;
23208
23208
  }
23209
23209
  function Vd(t) {
23210
- var e = oe(t), r = oe(function(o) {
23210
+ var e = re(t), r = re(function(o) {
23211
23211
  e.current && e.current(o);
23212
23212
  });
23213
23213
  return e.current = t, r.current;
@@ -23229,7 +23229,7 @@ var is = function(t, e, r) {
23229
23229
  }, pf = function(t) {
23230
23230
  !ji(t) && t.preventDefault();
23231
23231
  }, Wb = ae.memo(function(t) {
23232
- var e = t.onMove, r = t.onKey, o = jb(t, ["onMove", "onKey"]), n = oe(null), s = Vd(e), a = Vd(r), c = oe(null), l = oe(!1), d = zr(function() {
23232
+ var e = t.onMove, r = t.onKey, o = jb(t, ["onMove", "onKey"]), n = re(null), s = Vd(e), a = Vd(r), c = re(null), l = re(!1), d = zr(function() {
23233
23233
  var g = function(f) {
23234
23234
  pf(f), (ji(f) ? f.touches.length > 0 : f.buttons > 0) && n.current ? s(hf(n.current, f, c.current)) : y(!1);
23235
23235
  }, m = function() {
@@ -23256,7 +23256,7 @@ var is = function(t, e, r) {
23256
23256
  v < 37 || v > 40 || (f.preventDefault(), a({ left: v === 39 ? 0.05 : v === 37 ? -0.05 : 0, top: v === 40 ? 0.05 : v === 38 ? -0.05 : 0 }));
23257
23257
  }, y];
23258
23258
  }, [a, s]), h = d[0], u = d[1], p = d[2];
23259
- return G(function() {
23259
+ return q(function() {
23260
23260
  return p;
23261
23261
  }, [p]), ae.createElement("div", Jc({}, o, { onTouchStart: h, onMouseDown: h, className: "react-colorful__interactive", ref: n, onKeyDown: u, tabIndex: 0, role: "slider" }));
23262
23262
  }), xh = function(t) {
@@ -23266,19 +23266,19 @@ var is = function(t, e, r) {
23266
23266
  return ae.createElement("div", { className: s, style: { top: 100 * n + "%", left: 100 * r + "%" } }, ae.createElement("div", { className: "react-colorful__pointer-fill", style: { backgroundColor: e } }));
23267
23267
  }, qt = function(t, e, r) {
23268
23268
  return e === void 0 && (e = 0), r === void 0 && (r = Math.pow(10, e)), Math.round(r * t) / r;
23269
- }, b9 = function(t) {
23270
- return k9(Gd(t));
23269
+ }, bT = function(t) {
23270
+ return kT(Gd(t));
23271
23271
  }, Gd = function(t) {
23272
23272
  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 ? qt(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 ? qt(parseInt(t.substring(6, 8), 16) / 255, 2) : 1 };
23273
- }, v9 = function(t) {
23274
- return C9(w9(t));
23275
- }, x9 = function(t) {
23273
+ }, vT = function(t) {
23274
+ return CT(wT(t));
23275
+ }, xT = function(t) {
23276
23276
  var e = t.s, r = t.v, o = t.a, n = (200 - e) * r / 100;
23277
23277
  return { h: qt(t.h), s: qt(n > 0 && n < 200 ? e * r / 100 / (n <= 100 ? n : 200 - n) * 100 : 0), l: qt(n / 2), a: qt(o, 2) };
23278
23278
  }, Kd = function(t) {
23279
- var e = x9(t);
23279
+ var e = xT(t);
23280
23280
  return "hsl(" + e.h + ", " + e.s + "%, " + e.l + "%)";
23281
- }, w9 = function(t) {
23281
+ }, wT = function(t) {
23282
23282
  var e = t.h, r = t.s, o = t.v, n = t.a;
23283
23283
  e = e / 360 * 6, r /= 100, o /= 100;
23284
23284
  var s = Math.floor(e), a = o * (1 - r), c = o * (1 - (e - s) * r), l = o * (1 - (1 - e + s) * r), d = s % 6;
@@ -23286,20 +23286,20 @@ var is = function(t, e, r) {
23286
23286
  }, Js = function(t) {
23287
23287
  var e = t.toString(16);
23288
23288
  return e.length < 2 ? "0" + e : e;
23289
- }, C9 = function(t) {
23289
+ }, CT = function(t) {
23290
23290
  var e = t.r, r = t.g, o = t.b, n = t.a, s = n < 1 ? Js(qt(255 * n)) : "";
23291
23291
  return "#" + Js(e) + Js(r) + Js(o) + s;
23292
- }, k9 = function(t) {
23292
+ }, kT = function(t) {
23293
23293
  var e = t.r, r = t.g, o = t.b, n = t.a, s = Math.max(e, r, o), a = s - Math.min(e, r, o), c = a ? s === e ? (r - o) / a : s === r ? 2 + (o - e) / a : 4 + (e - r) / a : 0;
23294
23294
  return { h: qt(60 * (c < 0 ? c + 6 : c)), s: qt(s ? a / s * 100 : 0), v: qt(s / 255 * 100), a: n };
23295
- }, _9 = ae.memo(function(t) {
23295
+ }, _T = ae.memo(function(t) {
23296
23296
  var e = t.hue, r = t.onChange, o = xh(["react-colorful__hue", t.className]);
23297
23297
  return ae.createElement("div", { className: o }, ae.createElement(Wb, { onMove: function(n) {
23298
23298
  r({ h: 360 * n.left });
23299
23299
  }, onKey: function(n) {
23300
23300
  r({ h: is(e + 360 * n.left, 0, 360) });
23301
23301
  }, "aria-label": "Hue", "aria-valuenow": qt(e), "aria-valuemax": "360", "aria-valuemin": "0" }, ae.createElement(Ub, { className: "react-colorful__hue-pointer", left: e / 360, color: Kd({ h: e, s: 100, v: 100, a: 1 }) })));
23302
- }), N9 = ae.memo(function(t) {
23302
+ }), NT = ae.memo(function(t) {
23303
23303
  var e = t.hsva, r = t.onChange, o = { backgroundColor: Kd({ h: e.h, s: 100, v: 100, a: 1 }) };
23304
23304
  return ae.createElement("div", { className: "react-colorful__saturation", style: o }, ae.createElement(Wb, { onMove: function(n) {
23305
23305
  r({ s: 100 * n.left, v: 100 - 100 * n.top });
@@ -23313,19 +23313,19 @@ var is = function(t, e, r) {
23313
23313
  if (t[r] !== e[r])
23314
23314
  return !1;
23315
23315
  return !0;
23316
- }, E9 = function(t, e) {
23316
+ }, ET = function(t, e) {
23317
23317
  return t.toLowerCase() === e.toLowerCase() || Vb(Gd(t), Gd(e));
23318
23318
  };
23319
- function S9(t, e, r) {
23319
+ function ST(t, e, r) {
23320
23320
  var o = Vd(r), n = S(function() {
23321
23321
  return t.toHsva(e);
23322
- }), s = n[0], a = n[1], c = oe({ color: e, hsva: s });
23323
- G(function() {
23322
+ }), s = n[0], a = n[1], c = re({ color: e, hsva: s });
23323
+ q(function() {
23324
23324
  if (!t.equal(e, c.current.color)) {
23325
23325
  var d = t.toHsva(e);
23326
23326
  c.current = { hsva: d, color: e }, a(d);
23327
23327
  }
23328
- }, [e, t]), G(function() {
23328
+ }, [e, t]), q(function() {
23329
23329
  var d;
23330
23330
  Vb(s, c.current.hsva) || t.equal(d = t.fromHsva(s), c.current.color) || (c.current = { hsva: s, color: d }, o(d));
23331
23331
  }, [s, t, o]);
@@ -23336,30 +23336,30 @@ function S9(t, e, r) {
23336
23336
  }, []);
23337
23337
  return [s, l];
23338
23338
  }
23339
- var T9 = typeof window < "u" ? pm : G, R9 = function() {
23339
+ var TT = typeof window < "u" ? pm : q, RT = function() {
23340
23340
  return typeof __webpack_nonce__ < "u" ? __webpack_nonce__ : void 0;
23341
- }, ff = /* @__PURE__ */ new Map(), A9 = function(t) {
23342
- T9(function() {
23341
+ }, ff = /* @__PURE__ */ new Map(), AT = function(t) {
23342
+ TT(function() {
23343
23343
  var e = t.current ? t.current.ownerDocument : document;
23344
23344
  if (e !== void 0 && !ff.has(e)) {
23345
23345
  var r = e.createElement("style");
23346
23346
  r.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}`, ff.set(e, r);
23347
- var o = R9();
23347
+ var o = RT();
23348
23348
  o && r.setAttribute("nonce", o), e.head.appendChild(r);
23349
23349
  }
23350
23350
  }, []);
23351
- }, L9 = function(t) {
23352
- var e = t.className, r = t.colorModel, o = t.color, n = o === void 0 ? r.defaultColor : o, s = t.onChange, a = jb(t, ["className", "colorModel", "color", "onChange"]), c = oe(null);
23353
- A9(c);
23354
- var l = S9(r, n, s), d = l[0], h = l[1], u = xh(["react-colorful", e]);
23355
- return ae.createElement("div", Jc({}, a, { ref: c, className: u }), ae.createElement(N9, { hsva: d, onChange: h }), ae.createElement(_9, { hue: d.h, onChange: h, className: "react-colorful__last-control" }));
23356
- }, M9 = { defaultColor: "000", toHsva: b9, fromHsva: function(t) {
23357
- return v9({ h: t.h, s: t.s, v: t.v, a: 1 });
23358
- }, equal: E9 }, qb = function(t) {
23359
- return ae.createElement(L9, Jc({}, t, { colorModel: M9 }));
23351
+ }, LT = function(t) {
23352
+ var e = t.className, r = t.colorModel, o = t.color, n = o === void 0 ? r.defaultColor : o, s = t.onChange, a = jb(t, ["className", "colorModel", "color", "onChange"]), c = re(null);
23353
+ AT(c);
23354
+ var l = ST(r, n, s), d = l[0], h = l[1], u = xh(["react-colorful", e]);
23355
+ return ae.createElement("div", Jc({}, a, { ref: c, className: u }), ae.createElement(NT, { hsva: d, onChange: h }), ae.createElement(_T, { hue: d.h, onChange: h, className: "react-colorful__last-control" }));
23356
+ }, MT = { defaultColor: "000", toHsva: bT, fromHsva: function(t) {
23357
+ return vT({ h: t.h, s: t.s, v: t.v, a: 1 });
23358
+ }, equal: ET }, qb = function(t) {
23359
+ return ae.createElement(LT, Jc({}, t, { colorModel: MT }));
23360
23360
  }, Qc = "Popover", [Gb] = co(Qc, [
23361
23361
  Go
23362
- ]), Ls = Go(), [I9, Yo] = Gb(Qc), Kb = (t) => {
23362
+ ]), Ls = Go(), [IT, Yo] = Gb(Qc), Kb = (t) => {
23363
23363
  const {
23364
23364
  __scopePopover: e,
23365
23365
  children: r,
@@ -23374,7 +23374,7 @@ var T9 = typeof window < "u" ? pm : G, R9 = function() {
23374
23374
  caller: Qc
23375
23375
  });
23376
23376
  return /* @__PURE__ */ i(Rc, { ...c, children: /* @__PURE__ */ i(
23377
- I9,
23377
+ IT,
23378
23378
  {
23379
23379
  scope: e,
23380
23380
  contentId: kr(),
@@ -23391,13 +23391,13 @@ var T9 = typeof window < "u" ? pm : G, R9 = function() {
23391
23391
  ) });
23392
23392
  };
23393
23393
  Kb.displayName = Qc;
23394
- var Zb = "PopoverAnchor", P9 = C.forwardRef(
23394
+ var Zb = "PopoverAnchor", PT = C.forwardRef(
23395
23395
  (t, e) => {
23396
23396
  const { __scopePopover: r, ...o } = t, n = Yo(Zb, r), s = Ls(r), { onCustomAnchorAdd: a, onCustomAnchorRemove: c } = n;
23397
23397
  return C.useEffect(() => (a(), () => c()), [a, c]), /* @__PURE__ */ i(vs, { ...s, ...o, ref: e });
23398
23398
  }
23399
23399
  );
23400
- P9.displayName = Zb;
23400
+ PT.displayName = Zb;
23401
23401
  var Yb = "PopoverTrigger", Xb = C.forwardRef(
23402
23402
  (t, e) => {
23403
23403
  const { __scopePopover: r, ...o } = t, n = Yo(Yb, r), s = Ls(r), a = lt(e, n.triggerRef), c = /* @__PURE__ */ i(
@@ -23417,28 +23417,28 @@ var Yb = "PopoverTrigger", Xb = C.forwardRef(
23417
23417
  }
23418
23418
  );
23419
23419
  Xb.displayName = Yb;
23420
- var wh = "PopoverPortal", [O9, D9] = Gb(wh, {
23420
+ var wh = "PopoverPortal", [OT, DT] = Gb(wh, {
23421
23421
  forceMount: void 0
23422
23422
  }), Jb = (t) => {
23423
23423
  const { __scopePopover: e, forceMount: r, children: o, container: n } = t, s = Yo(wh, e);
23424
- return /* @__PURE__ */ i(O9, { scope: e, forceMount: r, children: /* @__PURE__ */ i(yr, { present: r || s.open, children: /* @__PURE__ */ i(pi, { asChild: !0, container: n, children: o }) }) });
23424
+ return /* @__PURE__ */ i(OT, { scope: e, forceMount: r, children: /* @__PURE__ */ i(yr, { present: r || s.open, children: /* @__PURE__ */ i(pi, { asChild: !0, container: n, children: o }) }) });
23425
23425
  };
23426
23426
  Jb.displayName = wh;
23427
23427
  var Jn = "PopoverContent", Qb = C.forwardRef(
23428
23428
  (t, e) => {
23429
- const r = D9(Jn, t.__scopePopover), { forceMount: o = r.forceMount, ...n } = t, s = Yo(Jn, t.__scopePopover);
23430
- return /* @__PURE__ */ i(yr, { present: o || s.open, children: s.modal ? /* @__PURE__ */ i($9, { ...n, ref: e }) : /* @__PURE__ */ i(H9, { ...n, ref: e }) });
23429
+ const r = DT(Jn, t.__scopePopover), { forceMount: o = r.forceMount, ...n } = t, s = Yo(Jn, t.__scopePopover);
23430
+ return /* @__PURE__ */ i(yr, { present: o || s.open, children: s.modal ? /* @__PURE__ */ i($T, { ...n, ref: e }) : /* @__PURE__ */ i(HT, { ...n, ref: e }) });
23431
23431
  }
23432
23432
  );
23433
23433
  Qb.displayName = Jn;
23434
- var F9 = /* @__PURE__ */ cn("PopoverContent.RemoveScroll"), $9 = C.forwardRef(
23434
+ var FT = /* @__PURE__ */ cn("PopoverContent.RemoveScroll"), $T = C.forwardRef(
23435
23435
  (t, e) => {
23436
23436
  const r = Yo(Jn, t.__scopePopover), o = C.useRef(null), n = lt(e, o), s = C.useRef(!1);
23437
23437
  return C.useEffect(() => {
23438
23438
  const a = o.current;
23439
23439
  if (a)
23440
23440
  return pc(a);
23441
- }, []), /* @__PURE__ */ i(ps, { as: F9, allowPinchZoom: !0, children: /* @__PURE__ */ i(
23441
+ }, []), /* @__PURE__ */ i(ps, { as: FT, allowPinchZoom: !0, children: /* @__PURE__ */ i(
23442
23442
  ev,
23443
23443
  {
23444
23444
  ...t,
@@ -23464,7 +23464,7 @@ var F9 = /* @__PURE__ */ cn("PopoverContent.RemoveScroll"), $9 = C.forwardRef(
23464
23464
  }
23465
23465
  ) });
23466
23466
  }
23467
- ), H9 = C.forwardRef(
23467
+ ), HT = C.forwardRef(
23468
23468
  (t, e) => {
23469
23469
  const r = Yo(Jn, t.__scopePopover), o = C.useRef(!1), n = C.useRef(!1);
23470
23470
  return /* @__PURE__ */ i(
@@ -23541,7 +23541,7 @@ var F9 = /* @__PURE__ */ cn("PopoverContent.RemoveScroll"), $9 = C.forwardRef(
23541
23541
  }
23542
23542
  );
23543
23543
  }
23544
- ), tv = "PopoverClose", z9 = C.forwardRef(
23544
+ ), tv = "PopoverClose", zT = C.forwardRef(
23545
23545
  (t, e) => {
23546
23546
  const { __scopePopover: r, ...o } = t, n = Yo(tv, r);
23547
23547
  return /* @__PURE__ */ i(
@@ -23555,21 +23555,21 @@ var F9 = /* @__PURE__ */ cn("PopoverContent.RemoveScroll"), $9 = C.forwardRef(
23555
23555
  );
23556
23556
  }
23557
23557
  );
23558
- z9.displayName = tv;
23559
- var B9 = "PopoverArrow", j9 = C.forwardRef(
23558
+ zT.displayName = tv;
23559
+ var BT = "PopoverArrow", jT = C.forwardRef(
23560
23560
  (t, e) => {
23561
23561
  const { __scopePopover: r, ...o } = t, n = Ls(r);
23562
23562
  return /* @__PURE__ */ i(Lc, { ...n, ...o, ref: e });
23563
23563
  }
23564
23564
  );
23565
- j9.displayName = B9;
23565
+ jT.displayName = BT;
23566
23566
  function rv(t) {
23567
23567
  return t ? "open" : "closed";
23568
23568
  }
23569
- var W9 = Kb, U9 = Xb, V9 = Jb, ov = Qb;
23570
- const el = W9, tl = U9, Ms = C.forwardRef(({ className: t, align: e = "center", sideOffset: r = 4, ...o }, n) => {
23569
+ var WT = Kb, UT = Xb, VT = Jb, ov = Qb;
23570
+ const el = WT, tl = UT, Ms = C.forwardRef(({ className: t, align: e = "center", sideOffset: r = 4, ...o }, n) => {
23571
23571
  const s = qo();
23572
- return /* @__PURE__ */ i(V9, { container: s, children: /* @__PURE__ */ i(
23572
+ return /* @__PURE__ */ i(VT, { container: s, children: /* @__PURE__ */ i(
23573
23573
  ov,
23574
23574
  {
23575
23575
  ref: n,
@@ -23584,7 +23584,7 @@ const el = W9, tl = U9, Ms = C.forwardRef(({ className: t, align: e = "center",
23584
23584
  ) });
23585
23585
  });
23586
23586
  Ms.displayName = ov.displayName;
23587
- const q9 = [
23587
+ const qT = [
23588
23588
  "#FFFFFF",
23589
23589
  "#4A90E2",
23590
23590
  "#7ED3F7",
@@ -23606,7 +23606,7 @@ const q9 = [
23606
23606
  "#8B572A",
23607
23607
  "#7F0000",
23608
23608
  "#50327C"
23609
- ], G9 = [
23609
+ ], GT = [
23610
23610
  { color: "#ffeb3b", label: "Yellow" },
23611
23611
  { color: "#a5d6a7", label: "Green" },
23612
23612
  { color: "#90caf9", label: "Blue" },
@@ -23634,16 +23634,16 @@ const q9 = [
23634
23634
  showTextColorTab: c = !0,
23635
23635
  showBackgroundColorTab: l = !0
23636
23636
  }) => {
23637
- const [d, h] = S(!1), u = c ? "text" : "background", [p, g] = S(u), [m, y] = S("#000000"), [f, v] = S("#ffeb3b"), [x, _] = S(!1), [N, k] = S([]), w = oe(!1), E = oe(0);
23638
- G(() => {
23637
+ const [d, h] = S(!1), u = c ? "text" : "background", [p, g] = S(u), [m, y] = S("#000000"), [f, v] = S("#ffeb3b"), [x, _] = S(!1), [N, k] = S([]), w = re(!1), E = re(0);
23638
+ q(() => {
23639
23639
  try {
23640
23640
  const R = localStorage.getItem(mf);
23641
23641
  R && k(JSON.parse(R));
23642
23642
  } catch {
23643
23643
  }
23644
- }, []), G(() => {
23644
+ }, []), q(() => {
23645
23645
  d || (_(!1), w.current = !1, E.current = 0);
23646
- }, [d]), G(() => {
23646
+ }, [d]), q(() => {
23647
23647
  const R = () => {
23648
23648
  w.current = !1;
23649
23649
  };
@@ -23778,7 +23778,7 @@ const q9 = [
23778
23778
  }
23779
23779
  )
23780
23780
  ] }),
23781
- p === "text" && c && /* @__PURE__ */ i("div", { children: /* @__PURE__ */ i("div", { className: "cteditor-grid cteditor-grid-cols-7 cteditor-gap-1.5 cteditor-mb-3", children: q9.map((R) => /* @__PURE__ */ i(
23781
+ p === "text" && c && /* @__PURE__ */ i("div", { children: /* @__PURE__ */ i("div", { className: "cteditor-grid cteditor-grid-cols-7 cteditor-gap-1.5 cteditor-mb-3", children: qT.map((R) => /* @__PURE__ */ i(
23782
23782
  "button",
23783
23783
  {
23784
23784
  className: pe(
@@ -23793,7 +23793,7 @@ const q9 = [
23793
23793
  R
23794
23794
  )) }) }),
23795
23795
  p === "background" && l && /* @__PURE__ */ i("div", { children: /* @__PURE__ */ b("div", { className: "cteditor-grid cteditor-grid-cols-4 cteditor-gap-1.5 cteditor-mb-3", children: [
23796
- G9.map(({ color: R, label: H }) => /* @__PURE__ */ i(
23796
+ GT.map(({ color: R, label: H }) => /* @__PURE__ */ i(
23797
23797
  "button",
23798
23798
  {
23799
23799
  className: pe(
@@ -23919,7 +23919,7 @@ const q9 = [
23919
23919
  }
23920
23920
  );
23921
23921
  Zd.displayName = "EmojiPickerWidget";
23922
- class K9 {
23922
+ class KT {
23923
23923
  static async createSuggestion(e, r) {
23924
23924
  return (await St.post(
23925
23925
  "/api/feature-suggestions",
@@ -23928,7 +23928,7 @@ class K9 {
23928
23928
  )).data;
23929
23929
  }
23930
23930
  }
23931
- function Z9({
23931
+ function ZT({
23932
23932
  open: t,
23933
23933
  onOpenChange: e
23934
23934
  }) {
@@ -23945,7 +23945,7 @@ function Z9({
23945
23945
  if (f.preventDefault(), !!g()) {
23946
23946
  h(!0);
23947
23947
  try {
23948
- await K9.createSuggestion(
23948
+ await KT.createSuggestion(
23949
23949
  {
23950
23950
  title: o.trim(),
23951
23951
  description: s.trim(),
@@ -24285,11 +24285,11 @@ const Yd = (t, e) => {
24285
24285
  }
24286
24286
  return { message: r };
24287
24287
  };
24288
- let Y9 = Yd;
24289
- function X9() {
24290
- return Y9;
24288
+ let YT = Yd;
24289
+ function XT() {
24290
+ return YT;
24291
24291
  }
24292
- const J9 = (t) => {
24292
+ const JT = (t) => {
24293
24293
  const { data: e, path: r, errorMaps: o, issueData: n } = t, s = [...r, ...n.path || []], a = {
24294
24294
  ...n,
24295
24295
  path: s
@@ -24311,7 +24311,7 @@ const J9 = (t) => {
24311
24311
  };
24312
24312
  };
24313
24313
  function _e(t, e) {
24314
- const r = X9(), o = J9({
24314
+ const r = XT(), o = JT({
24315
24315
  issueData: e,
24316
24316
  data: t.data,
24317
24317
  path: t.path,
@@ -24593,7 +24593,7 @@ class nt {
24593
24593
  });
24594
24594
  }
24595
24595
  brand() {
24596
- return new wT({
24596
+ return new w9({
24597
24597
  typeName: qe.ZodBranded,
24598
24598
  type: this,
24599
24599
  ...tt(this._def)
@@ -24628,28 +24628,28 @@ class nt {
24628
24628
  return this.safeParse(null).success;
24629
24629
  }
24630
24630
  }
24631
- const Q9 = /^c[^\s-]{8,}$/i, eT = /^[0-9a-z]+$/, tT = /^[0-9A-HJKMNP-TV-Z]{26}$/i, rT = /^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i, oT = /^[a-z0-9_-]{21}$/i, nT = /^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/, iT = /^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/, sT = /^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i, aT = "^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";
24631
+ const QT = /^c[^\s-]{8,}$/i, e9 = /^[0-9a-z]+$/, t9 = /^[0-9A-HJKMNP-TV-Z]{26}$/i, r9 = /^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i, o9 = /^[a-z0-9_-]{21}$/i, n9 = /^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/, i9 = /^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/, s9 = /^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i, a9 = "^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";
24632
24632
  let Dl;
24633
- const cT = /^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/, lT = /^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/, dT = /^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/, uT = /^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/, hT = /^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/, pT = /^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/, nv = "((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))", fT = new RegExp(`^${nv}$`);
24633
+ const c9 = /^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/, l9 = /^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/, d9 = /^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/, u9 = /^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/, h9 = /^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/, p9 = /^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/, nv = "((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))", f9 = new RegExp(`^${nv}$`);
24634
24634
  function iv(t) {
24635
24635
  let e = "[0-5]\\d";
24636
24636
  t.precision ? e = `${e}\\.\\d{${t.precision}}` : t.precision == null && (e = `${e}(\\.\\d+)?`);
24637
24637
  const r = t.precision ? "+" : "?";
24638
24638
  return `([01]\\d|2[0-3]):[0-5]\\d(:${e})${r}`;
24639
24639
  }
24640
- function mT(t) {
24640
+ function m9(t) {
24641
24641
  return new RegExp(`^${iv(t)}$`);
24642
24642
  }
24643
- function gT(t) {
24643
+ function g9(t) {
24644
24644
  let e = `${nv}T${iv(t)}`;
24645
24645
  const r = [];
24646
24646
  return r.push(t.local ? "Z?" : "Z"), t.offset && r.push("([+-]\\d{2}:?\\d{2})"), e = `${e}(${r.join("|")})`, new RegExp(`^${e}$`);
24647
24647
  }
24648
- function yT(t, e) {
24649
- return !!((e === "v4" || !e) && cT.test(t) || (e === "v6" || !e) && dT.test(t));
24648
+ function y9(t, e) {
24649
+ return !!((e === "v4" || !e) && c9.test(t) || (e === "v6" || !e) && d9.test(t));
24650
24650
  }
24651
- function bT(t, e) {
24652
- if (!nT.test(t))
24651
+ function b9(t, e) {
24652
+ if (!n9.test(t))
24653
24653
  return !1;
24654
24654
  try {
24655
24655
  const [r] = t.split(".");
@@ -24661,8 +24661,8 @@ function bT(t, e) {
24661
24661
  return !1;
24662
24662
  }
24663
24663
  }
24664
- function vT(t, e) {
24665
- return !!((e === "v4" || !e) && lT.test(t) || (e === "v6" || !e) && uT.test(t));
24664
+ function v9(t, e) {
24665
+ return !!((e === "v4" || !e) && l9.test(t) || (e === "v6" || !e) && u9.test(t));
24666
24666
  }
24667
24667
  class Lo extends nt {
24668
24668
  _parse(e) {
@@ -24713,43 +24713,43 @@ class Lo extends nt {
24713
24713
  message: s.message
24714
24714
  }), o.dirty());
24715
24715
  } else if (s.kind === "email")
24716
- sT.test(e.data) || (n = this._getOrReturnCtx(e, n), _e(n, {
24716
+ s9.test(e.data) || (n = this._getOrReturnCtx(e, n), _e(n, {
24717
24717
  validation: "email",
24718
24718
  code: me.invalid_string,
24719
24719
  message: s.message
24720
24720
  }), o.dirty());
24721
24721
  else if (s.kind === "emoji")
24722
- Dl || (Dl = new RegExp(aT, "u")), Dl.test(e.data) || (n = this._getOrReturnCtx(e, n), _e(n, {
24722
+ Dl || (Dl = new RegExp(a9, "u")), Dl.test(e.data) || (n = this._getOrReturnCtx(e, n), _e(n, {
24723
24723
  validation: "emoji",
24724
24724
  code: me.invalid_string,
24725
24725
  message: s.message
24726
24726
  }), o.dirty());
24727
24727
  else if (s.kind === "uuid")
24728
- rT.test(e.data) || (n = this._getOrReturnCtx(e, n), _e(n, {
24728
+ r9.test(e.data) || (n = this._getOrReturnCtx(e, n), _e(n, {
24729
24729
  validation: "uuid",
24730
24730
  code: me.invalid_string,
24731
24731
  message: s.message
24732
24732
  }), o.dirty());
24733
24733
  else if (s.kind === "nanoid")
24734
- oT.test(e.data) || (n = this._getOrReturnCtx(e, n), _e(n, {
24734
+ o9.test(e.data) || (n = this._getOrReturnCtx(e, n), _e(n, {
24735
24735
  validation: "nanoid",
24736
24736
  code: me.invalid_string,
24737
24737
  message: s.message
24738
24738
  }), o.dirty());
24739
24739
  else if (s.kind === "cuid")
24740
- Q9.test(e.data) || (n = this._getOrReturnCtx(e, n), _e(n, {
24740
+ QT.test(e.data) || (n = this._getOrReturnCtx(e, n), _e(n, {
24741
24741
  validation: "cuid",
24742
24742
  code: me.invalid_string,
24743
24743
  message: s.message
24744
24744
  }), o.dirty());
24745
24745
  else if (s.kind === "cuid2")
24746
- eT.test(e.data) || (n = this._getOrReturnCtx(e, n), _e(n, {
24746
+ e9.test(e.data) || (n = this._getOrReturnCtx(e, n), _e(n, {
24747
24747
  validation: "cuid2",
24748
24748
  code: me.invalid_string,
24749
24749
  message: s.message
24750
24750
  }), o.dirty());
24751
24751
  else if (s.kind === "ulid")
24752
- tT.test(e.data) || (n = this._getOrReturnCtx(e, n), _e(n, {
24752
+ t9.test(e.data) || (n = this._getOrReturnCtx(e, n), _e(n, {
24753
24753
  validation: "ulid",
24754
24754
  code: me.invalid_string,
24755
24755
  message: s.message
@@ -24781,39 +24781,39 @@ class Lo extends nt {
24781
24781
  code: me.invalid_string,
24782
24782
  validation: { endsWith: s.value },
24783
24783
  message: s.message
24784
- }), o.dirty()) : s.kind === "datetime" ? gT(s).test(e.data) || (n = this._getOrReturnCtx(e, n), _e(n, {
24784
+ }), o.dirty()) : s.kind === "datetime" ? g9(s).test(e.data) || (n = this._getOrReturnCtx(e, n), _e(n, {
24785
24785
  code: me.invalid_string,
24786
24786
  validation: "datetime",
24787
24787
  message: s.message
24788
- }), o.dirty()) : s.kind === "date" ? fT.test(e.data) || (n = this._getOrReturnCtx(e, n), _e(n, {
24788
+ }), o.dirty()) : s.kind === "date" ? f9.test(e.data) || (n = this._getOrReturnCtx(e, n), _e(n, {
24789
24789
  code: me.invalid_string,
24790
24790
  validation: "date",
24791
24791
  message: s.message
24792
- }), o.dirty()) : s.kind === "time" ? mT(s).test(e.data) || (n = this._getOrReturnCtx(e, n), _e(n, {
24792
+ }), o.dirty()) : s.kind === "time" ? m9(s).test(e.data) || (n = this._getOrReturnCtx(e, n), _e(n, {
24793
24793
  code: me.invalid_string,
24794
24794
  validation: "time",
24795
24795
  message: s.message
24796
- }), o.dirty()) : s.kind === "duration" ? iT.test(e.data) || (n = this._getOrReturnCtx(e, n), _e(n, {
24796
+ }), o.dirty()) : s.kind === "duration" ? i9.test(e.data) || (n = this._getOrReturnCtx(e, n), _e(n, {
24797
24797
  validation: "duration",
24798
24798
  code: me.invalid_string,
24799
24799
  message: s.message
24800
- }), o.dirty()) : s.kind === "ip" ? yT(e.data, s.version) || (n = this._getOrReturnCtx(e, n), _e(n, {
24800
+ }), o.dirty()) : s.kind === "ip" ? y9(e.data, s.version) || (n = this._getOrReturnCtx(e, n), _e(n, {
24801
24801
  validation: "ip",
24802
24802
  code: me.invalid_string,
24803
24803
  message: s.message
24804
- }), o.dirty()) : s.kind === "jwt" ? bT(e.data, s.alg) || (n = this._getOrReturnCtx(e, n), _e(n, {
24804
+ }), o.dirty()) : s.kind === "jwt" ? b9(e.data, s.alg) || (n = this._getOrReturnCtx(e, n), _e(n, {
24805
24805
  validation: "jwt",
24806
24806
  code: me.invalid_string,
24807
24807
  message: s.message
24808
- }), o.dirty()) : s.kind === "cidr" ? vT(e.data, s.version) || (n = this._getOrReturnCtx(e, n), _e(n, {
24808
+ }), o.dirty()) : s.kind === "cidr" ? v9(e.data, s.version) || (n = this._getOrReturnCtx(e, n), _e(n, {
24809
24809
  validation: "cidr",
24810
24810
  code: me.invalid_string,
24811
24811
  message: s.message
24812
- }), o.dirty()) : s.kind === "base64" ? hT.test(e.data) || (n = this._getOrReturnCtx(e, n), _e(n, {
24812
+ }), o.dirty()) : s.kind === "base64" ? h9.test(e.data) || (n = this._getOrReturnCtx(e, n), _e(n, {
24813
24813
  validation: "base64",
24814
24814
  code: me.invalid_string,
24815
24815
  message: s.message
24816
- }), o.dirty()) : s.kind === "base64url" ? pT.test(e.data) || (n = this._getOrReturnCtx(e, n), _e(n, {
24816
+ }), o.dirty()) : s.kind === "base64url" ? p9.test(e.data) || (n = this._getOrReturnCtx(e, n), _e(n, {
24817
24817
  validation: "base64url",
24818
24818
  code: me.invalid_string,
24819
24819
  message: s.message
@@ -25048,7 +25048,7 @@ Lo.create = (t) => new Lo({
25048
25048
  coerce: t?.coerce ?? !1,
25049
25049
  ...tt(t)
25050
25050
  });
25051
- function xT(t, e) {
25051
+ function x9(t, e) {
25052
25052
  const r = (t.toString().split(".")[1] || "").length, o = (e.toString().split(".")[1] || "").length, n = r > o ? r : o, s = Number.parseInt(t.toFixed(n).replace(".", "")), a = Number.parseInt(e.toFixed(n).replace(".", ""));
25053
25053
  return s % a / 10 ** n;
25054
25054
  }
@@ -25087,7 +25087,7 @@ class ei extends nt {
25087
25087
  inclusive: s.inclusive,
25088
25088
  exact: !1,
25089
25089
  message: s.message
25090
- }), n.dirty()) : s.kind === "multipleOf" ? xT(e.data, s.value) !== 0 && (o = this._getOrReturnCtx(e, o), _e(o, {
25090
+ }), n.dirty()) : s.kind === "multipleOf" ? x9(e.data, s.value) !== 0 && (o = this._getOrReturnCtx(e, o), _e(o, {
25091
25091
  code: me.not_multiple_of,
25092
25092
  multipleOf: s.value,
25093
25093
  message: s.message
@@ -26586,7 +26586,7 @@ Mf.create = (t) => new Mf({
26586
26586
  typeName: qe.ZodNaN,
26587
26587
  ...tt(t)
26588
26588
  });
26589
- class wT extends nt {
26589
+ class w9 extends nt {
26590
26590
  _parse(e) {
26591
26591
  const { ctx: r } = this._processInputParams(e), o = r.data;
26592
26592
  return this._def.type._parse({
@@ -26657,7 +26657,7 @@ var qe;
26657
26657
  (function(t) {
26658
26658
  t.ZodString = "ZodString", t.ZodNumber = "ZodNumber", t.ZodNaN = "ZodNaN", t.ZodBigInt = "ZodBigInt", t.ZodBoolean = "ZodBoolean", t.ZodDate = "ZodDate", t.ZodSymbol = "ZodSymbol", t.ZodUndefined = "ZodUndefined", t.ZodNull = "ZodNull", t.ZodAny = "ZodAny", t.ZodUnknown = "ZodUnknown", t.ZodNever = "ZodNever", t.ZodVoid = "ZodVoid", t.ZodArray = "ZodArray", t.ZodObject = "ZodObject", t.ZodUnion = "ZodUnion", t.ZodDiscriminatedUnion = "ZodDiscriminatedUnion", t.ZodIntersection = "ZodIntersection", t.ZodTuple = "ZodTuple", t.ZodRecord = "ZodRecord", t.ZodMap = "ZodMap", t.ZodSet = "ZodSet", t.ZodFunction = "ZodFunction", t.ZodLazy = "ZodLazy", t.ZodLiteral = "ZodLiteral", t.ZodEnum = "ZodEnum", t.ZodEffects = "ZodEffects", t.ZodNativeEnum = "ZodNativeEnum", t.ZodOptional = "ZodOptional", t.ZodNullable = "ZodNullable", t.ZodDefault = "ZodDefault", t.ZodCatch = "ZodCatch", t.ZodPromise = "ZodPromise", t.ZodBranded = "ZodBranded", t.ZodPipeline = "ZodPipeline", t.ZodReadonly = "ZodReadonly";
26659
26659
  })(qe || (qe = {}));
26660
- const ca = Lo.create, CT = ei.create;
26660
+ const ca = Lo.create, C9 = ei.create;
26661
26661
  Uo.create;
26662
26662
  so.create;
26663
26663
  const av = Mt.create;
@@ -26668,7 +26668,7 @@ ti.create;
26668
26668
  tc.create;
26669
26669
  Fo.create;
26670
26670
  oi.create;
26671
- class kT {
26671
+ class k9 {
26672
26672
  static async createBugReport(e, r) {
26673
26673
  return (await St.post(
26674
26674
  "/api/bug-reports",
@@ -26694,7 +26694,7 @@ const If = av({
26694
26694
  description: ca().min(10, "Description must be at least 10 characters").max(5e3, "Description must be less than 5000 characters"),
26695
26695
  errorMessage: ca().max(1e4, "Error message must be less than 10000 characters").optional()
26696
26696
  });
26697
- function _T({
26697
+ function _9({
26698
26698
  open: t,
26699
26699
  onOpenChange: e
26700
26700
  }) {
@@ -26774,7 +26774,7 @@ function _T({
26774
26774
  p(!0);
26775
26775
  try {
26776
26776
  let D = [];
26777
- d.length > 0 && (m("Uploading attachments..."), D = await M(d)), m("Submitting bug report..."), await kT.createBugReport(
26777
+ d.length > 0 && (m("Uploading attachments..."), D = await M(d)), m("Submitting bug report..."), await k9.createBugReport(
26778
26778
  {
26779
26779
  title: o.trim(),
26780
26780
  description: s.trim(),
@@ -26923,10 +26923,10 @@ function _T({
26923
26923
  ] }) });
26924
26924
  }
26925
26925
  const Fl = av({
26926
- rating: CT().min(1, "Please select a rating").max(5, "Rating must be between 1 and 5"),
26926
+ rating: C9().min(1, "Please select a rating").max(5, "Rating must be between 1 and 5"),
26927
26927
  comment: ca().max(500, "Comment must be less than 500 characters").optional()
26928
- }), NT = ["", "Poor", "Fair", "Good", "Very Good", "Excellent"], $l = 500;
26929
- function ET({ open: t, onOpenChange: e, onFeedbackSubmitted: r }) {
26928
+ }), N9 = ["", "Poor", "Fair", "Good", "Very Good", "Excellent"], $l = 500;
26929
+ function E9({ open: t, onOpenChange: e, onFeedbackSubmitted: r }) {
26930
26930
  const { apiKey: o } = Jt(), [n, s] = S(0), [a, c] = S(0), [l, d] = S(""), [h, u] = S(!1), [p, g] = S({}), [m, y] = S({}), f = a || n, v = (j, W) => {
26931
26931
  try {
26932
26932
  j === "rating" ? Fl.shape.rating.parse(W) : j === "comment" && Fl.shape.comment.parse(W);
@@ -27025,7 +27025,7 @@ function ET({ open: t, onOpenChange: e, onFeedbackSubmitted: r }) {
27025
27025
  "cteditor-text-sm cteditor-font-medium cteditor-transition-colors",
27026
27026
  f <= 2 ? "cteditor-text-red-500" : f === 3 ? "cteditor-text-yellow-600" : "cteditor-text-green-500"
27027
27027
  ),
27028
- children: NT[f]
27028
+ children: N9[f]
27029
27029
  }
27030
27030
  ) }),
27031
27031
  w("rating") && /* @__PURE__ */ i("p", { className: "cteditor-text-sm cteditor-text-red-500", children: p.rating })
@@ -27146,7 +27146,7 @@ const cv = ({
27146
27146
  const y = new Set(t);
27147
27147
  return Array.from(n).filter((f) => !y.has(f));
27148
27148
  }, [t, n]);
27149
- G(() => e.registerUpdateListener(({ editorState: y }) => {
27149
+ q(() => e.registerUpdateListener(({ editorState: y }) => {
27150
27150
  y.read(() => {
27151
27151
  const f = ce();
27152
27152
  if (he(f)) {
@@ -27169,7 +27169,7 @@ const cv = ({
27169
27169
  }));
27170
27170
  }
27171
27171
  });
27172
- }), [e, t]), G(() => e.registerCommand(
27172
+ }), [e, t]), q(() => e.registerCommand(
27173
27173
  fu,
27174
27174
  (y) => {
27175
27175
  if (a.current !== null && y.key.length === 1 && !y.ctrlKey && !y.metaKey) {
@@ -27179,7 +27179,7 @@ const cv = ({
27179
27179
  return !1;
27180
27180
  },
27181
27181
  wn
27182
- ), [e]), G(() => {
27182
+ ), [e]), q(() => {
27183
27183
  const y = e.getRootElement();
27184
27184
  if (!y)
27185
27185
  return;
@@ -27253,7 +27253,7 @@ const cv = ({
27253
27253
  }), e;
27254
27254
  }, tu = () => {
27255
27255
  const [t] = Se(), [e, r] = S(() => Hf(t)), [o, n] = S(() => Hf(t).toString()), s = ae.useRef(null), a = ae.useRef(!1);
27256
- G(() => t.registerUpdateListener(({ editorState: m }) => {
27256
+ q(() => t.registerUpdateListener(({ editorState: m }) => {
27257
27257
  m.read(() => {
27258
27258
  const y = ce();
27259
27259
  if (he(y)) {
@@ -27269,7 +27269,7 @@ const cv = ({
27269
27269
  !y.isCollapsed() && s.current !== null && (s.current = null), s.current !== null && v !== s.current && v !== Qr && (s.current = null), s.current === null && (r(v), n(v.toString()));
27270
27270
  }
27271
27271
  });
27272
- }), [t]), G(() => t.registerCommand(
27272
+ }), [t]), q(() => t.registerCommand(
27273
27273
  fu,
27274
27274
  (m) => {
27275
27275
  if (s.current !== null && m.key.length === 1 && !m.ctrlKey && !m.metaKey) {
@@ -27279,7 +27279,7 @@ const cv = ({
27279
27279
  return !1;
27280
27280
  },
27281
27281
  wn
27282
- ), [t]), G(() => {
27282
+ ), [t]), q(() => {
27283
27283
  const m = t.getRootElement();
27284
27284
  if (!m)
27285
27285
  return;
@@ -27392,7 +27392,7 @@ const cv = ({
27392
27392
  /* @__PURE__ */ i(Ue, { children: /* @__PURE__ */ i("p", { children: "Increase Font Size" }) })
27393
27393
  ] }) })
27394
27394
  ] });
27395
- }, ST = ({ hasFormat: t, blockType: e }) => {
27395
+ }, S9 = ({ hasFormat: t, blockType: e }) => {
27396
27396
  const [r] = Se(), { editorConfig: o } = Jt(), n = o?.toolbarOptions, s = o?.hideLockedFeatures ?? !1, a = n?.enableCodeFormat ?? !0, c = n?.enableLists ?? !0, l = n?.enableBlockquote ?? !0, d = [
27397
27397
  "bold",
27398
27398
  "italic",
@@ -27521,7 +27521,7 @@ const cv = ({
27521
27521
  })
27522
27522
  ] })
27523
27523
  ] });
27524
- }, TT = ({ hasFormat: t, blockType: e }) => {
27524
+ }, T9 = ({ hasFormat: t, blockType: e }) => {
27525
27525
  const [r] = Se(), { editorConfig: o, planConfig: n } = Jt(), s = o?.toolbarOptions, a = o?.hideLockedFeatures ?? !1, c = s?.enableCodeFormat ?? !0, l = s?.enableLists ?? !0, d = s?.enableBlockquote ?? !0, h = [
27526
27526
  "bold",
27527
27527
  "italic",
@@ -27719,7 +27719,7 @@ const kh = (t) => {
27719
27719
  });
27720
27720
  }, []);
27721
27721
  return { ...e, uploadFileToS3: o, resetUpload: n };
27722
- }, RT = ({
27722
+ }, R9 = ({
27723
27723
  onClick: t
27724
27724
  }) => {
27725
27725
  const [e, r] = S(""), { apiKey: o } = Jt(), { uploadFileToS3: n, progress: s, uploading: a, error: c } = kh(o || void 0), [l, d] = S(""), [h, u] = S(null), [p, g] = S(null), [m, y] = S(null), f = c || m, v = async (_) => {
@@ -27827,7 +27827,7 @@ const kh = (t) => {
27827
27827
  }
27828
27828
  )
27829
27829
  ] });
27830
- }, AT = ({
27830
+ }, A9 = ({
27831
27831
  onClick: t
27832
27832
  }) => {
27833
27833
  const [e, r] = S(""), [o, n] = S(""), [s, a] = S(!1), [c, l] = S(null), [d, h] = S(null), [u, p] = S(null), [g, m] = S(!1), { apiKey: y } = Jt(), f = u, v = (k) => {
@@ -28003,8 +28003,8 @@ const kh = (t) => {
28003
28003
  )
28004
28004
  ] });
28005
28005
  }, _h = ({ activeEditor: t, onClose: e }) => {
28006
- const [r, o] = S(null), n = oe(!1);
28007
- console.log("InsertImageDialog rendered, mode:", r), G(() => {
28006
+ const [r, o] = S(null), n = re(!1);
28007
+ console.log("InsertImageDialog rendered, mode:", r), q(() => {
28008
28008
  n.current = !1;
28009
28009
  const a = (c) => {
28010
28010
  n.current = c.altKey;
@@ -28018,7 +28018,7 @@ const kh = (t) => {
28018
28018
  };
28019
28019
  return /* @__PURE__ */ i(Gt, { open: !0, onOpenChange: e, children: /* @__PURE__ */ b(Bt, { className: "cteditor-w-full sm:cteditor-max-w-md", children: [
28020
28020
  /* @__PURE__ */ i(Kt, { children: /* @__PURE__ */ i(Zt, { children: "Insert Image" }) }),
28021
- r ? r === "file" ? /* @__PURE__ */ i(RT, { onClick: s }) : /* @__PURE__ */ i(AT, { onClick: s }) : /* @__PURE__ */ b("div", { className: "cteditor-flex cteditor-flex-col cteditor-gap-4 cteditor-mt-3", children: [
28021
+ r ? r === "file" ? /* @__PURE__ */ i(R9, { onClick: s }) : /* @__PURE__ */ i(A9, { onClick: s }) : /* @__PURE__ */ b("div", { className: "cteditor-flex cteditor-flex-col cteditor-gap-4 cteditor-mt-3", children: [
28022
28022
  /* @__PURE__ */ b(
28023
28023
  ye,
28024
28024
  {
@@ -28045,9 +28045,9 @@ const kh = (t) => {
28045
28045
  )
28046
28046
  ] })
28047
28047
  ] }) });
28048
- }, dv = Rt(), LT = () => {
28048
+ }, dv = Rt(), L9 = () => {
28049
28049
  const [t] = Se();
28050
- return G(() => t.registerCommand(
28050
+ return q(() => t.registerCommand(
28051
28051
  dv,
28052
28052
  ({ src: e, linkText: r, fileSize: o }) => {
28053
28053
  console.log("Received INSERT_FILE_COMMAND with:", { src: e, linkText: r, fileSize: o });
@@ -28071,7 +28071,7 @@ const kh = (t) => {
28071
28071
  }
28072
28072
  },
28073
28073
  0
28074
- ), [t]), G(() => {
28074
+ ), [t]), q(() => {
28075
28075
  const e = (r) => {
28076
28076
  const n = r.target.closest("a");
28077
28077
  if (n) {
@@ -28094,7 +28094,7 @@ const kh = (t) => {
28094
28094
  "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
28095
28095
  "application/vnd.ms-powerpoint",
28096
28096
  "application/vnd.openxmlformats-officedocument.presentationml.presentation"
28097
- ], MT = ({ onClick: t }) => {
28097
+ ], M9 = ({ onClick: t }) => {
28098
28098
  const [e, r] = S(""), { apiKey: o } = Jt(), { uploadFileToS3: n, progress: s, uploading: a, error: c } = kh(o || void 0), [l, d] = S(null), [h, u] = S(null), p = async (m) => {
28099
28099
  const y = m.target.files;
28100
28100
  if (!y || y.length === 0)
@@ -28174,7 +28174,7 @@ const kh = (t) => {
28174
28174
  onClose: e
28175
28175
  }) => /* @__PURE__ */ i(Gt, { open: !0, onOpenChange: (o) => !o && e(), children: /* @__PURE__ */ b(Bt, { className: "sm:cteditor-max-w-md", children: [
28176
28176
  /* @__PURE__ */ i(Kt, { children: /* @__PURE__ */ i(Zt, { children: "Insert File" }) }),
28177
- /* @__PURE__ */ i("div", { className: "cteditor-py-2", children: /* @__PURE__ */ i(MT, { onClick: (o) => {
28177
+ /* @__PURE__ */ i("div", { className: "cteditor-py-2", children: /* @__PURE__ */ i(M9, { onClick: (o) => {
28178
28178
  t.dispatchCommand(dv, o), e();
28179
28179
  } }) })
28180
28180
  ] }) });
@@ -28188,7 +28188,7 @@ function ru() {
28188
28188
  return t;
28189
28189
  }, ru.apply(null, arguments);
28190
28190
  }
28191
- function IT(t, e) {
28191
+ function I9(t, e) {
28192
28192
  if (t == null)
28193
28193
  return {};
28194
28194
  var r = {};
@@ -28200,10 +28200,10 @@ function IT(t, e) {
28200
28200
  }
28201
28201
  return r;
28202
28202
  }
28203
- function PT(t, e) {
28203
+ function P9(t, e) {
28204
28204
  if (t == null)
28205
28205
  return {};
28206
- var r, o, n = IT(t, e);
28206
+ var r, o, n = I9(t, e);
28207
28207
  if (Object.getOwnPropertySymbols) {
28208
28208
  var s = Object.getOwnPropertySymbols(t);
28209
28209
  for (o = 0; o < s.length; o++)
@@ -28219,12 +28219,12 @@ function ou(t) {
28219
28219
  return e && typeof Symbol == "function" && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e;
28220
28220
  }, ou(t);
28221
28221
  }
28222
- function OT(t, e, r) {
28222
+ function O9(t, e, r) {
28223
28223
  return Object.defineProperty(t, "prototype", {
28224
28224
  writable: !1
28225
28225
  }), t;
28226
28226
  }
28227
- function DT(t, e) {
28227
+ function D9(t, e) {
28228
28228
  if (!(t instanceof e))
28229
28229
  throw new TypeError("Cannot call a class as a function");
28230
28230
  }
@@ -28233,7 +28233,7 @@ function nu(t, e) {
28233
28233
  return r.__proto__ = o, r;
28234
28234
  }, nu(t, e);
28235
28235
  }
28236
- function FT(t, e) {
28236
+ function F9(t, e) {
28237
28237
  if (typeof e != "function" && e !== null)
28238
28238
  throw new TypeError("Super expression must either be null or a function");
28239
28239
  t.prototype = Object.create(e && e.prototype, {
@@ -28261,19 +28261,19 @@ function hv() {
28261
28261
  return !!t;
28262
28262
  })();
28263
28263
  }
28264
- function $T(t) {
28264
+ function $9(t) {
28265
28265
  if (t === void 0)
28266
28266
  throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
28267
28267
  return t;
28268
28268
  }
28269
- function HT(t, e) {
28269
+ function H9(t, e) {
28270
28270
  if (e && (ou(e) == "object" || typeof e == "function"))
28271
28271
  return e;
28272
28272
  if (e !== void 0)
28273
28273
  throw new TypeError("Derived constructors may only return object or undefined");
28274
- return $T(t);
28274
+ return $9(t);
28275
28275
  }
28276
- function zT(t) {
28276
+ function z9(t) {
28277
28277
  var e = hv();
28278
28278
  return function() {
28279
28279
  var r, o = rc(t);
@@ -28282,11 +28282,11 @@ function zT(t) {
28282
28282
  r = Reflect.construct(o, arguments, n);
28283
28283
  } else
28284
28284
  r = o.apply(this, arguments);
28285
- return HT(this, r);
28285
+ return H9(this, r);
28286
28286
  };
28287
28287
  }
28288
28288
  var Hl = { exports: {} }, zl, jf;
28289
- function BT() {
28289
+ function B9() {
28290
28290
  if (jf)
28291
28291
  return zl;
28292
28292
  jf = 1;
@@ -28294,11 +28294,11 @@ function BT() {
28294
28294
  return zl = t, zl;
28295
28295
  }
28296
28296
  var Bl, Wf;
28297
- function jT() {
28297
+ function j9() {
28298
28298
  if (Wf)
28299
28299
  return Bl;
28300
28300
  Wf = 1;
28301
- var t = /* @__PURE__ */ BT();
28301
+ var t = /* @__PURE__ */ B9();
28302
28302
  function e() {
28303
28303
  }
28304
28304
  function r() {
@@ -28343,11 +28343,11 @@ function jT() {
28343
28343
  }, Bl;
28344
28344
  }
28345
28345
  var Uf;
28346
- function WT() {
28347
- return Uf || (Uf = 1, Hl.exports = /* @__PURE__ */ jT()()), Hl.exports;
28346
+ function W9() {
28347
+ return Uf || (Uf = 1, Hl.exports = /* @__PURE__ */ j9()()), Hl.exports;
28348
28348
  }
28349
- var UT = /* @__PURE__ */ WT();
28350
- const dr = /* @__PURE__ */ l0(UT);
28349
+ var U9 = /* @__PURE__ */ W9();
28350
+ const dr = /* @__PURE__ */ l0(U9);
28351
28351
  function yn(t, e, r) {
28352
28352
  this.x = t, this.y = e, this.time = r || (/* @__PURE__ */ new Date()).getTime();
28353
28353
  }
@@ -28377,7 +28377,7 @@ Nh.prototype.length = function() {
28377
28377
  Nh.prototype._point = function(t, e, r, o, n) {
28378
28378
  return e * (1 - t) * (1 - t) * (1 - t) + 3 * r * (1 - t) * (1 - t) * t + 3 * o * (1 - t) * t * t + n * t * t * t;
28379
28379
  };
28380
- function VT(t, e, r) {
28380
+ function V9(t, e, r) {
28381
28381
  var o, n, s, a = null, c = 0;
28382
28382
  r || (r = {});
28383
28383
  var l = function() {
@@ -28392,7 +28392,7 @@ function VT(t, e, r) {
28392
28392
  }
28393
28393
  function gt(t, e) {
28394
28394
  var r = this, o = e || {};
28395
- this.velocityFilterWeight = o.velocityFilterWeight || 0.7, this.minWidth = o.minWidth || 0.5, this.maxWidth = o.maxWidth || 2.5, this.throttle = "throttle" in o ? o.throttle : 16, this.minDistance = "minDistance" in o ? o.minDistance : 5, this.throttle ? this._strokeMoveUpdate = VT(gt.prototype._strokeUpdate, this.throttle) : this._strokeMoveUpdate = gt.prototype._strokeUpdate, this.dotSize = o.dotSize || function() {
28395
+ this.velocityFilterWeight = o.velocityFilterWeight || 0.7, this.minWidth = o.minWidth || 0.5, this.maxWidth = o.maxWidth || 2.5, this.throttle = "throttle" in o ? o.throttle : 16, this.minDistance = "minDistance" in o ? o.minDistance : 5, this.throttle ? this._strokeMoveUpdate = V9(gt.prototype._strokeUpdate, this.throttle) : this._strokeMoveUpdate = gt.prototype._strokeUpdate, this.dotSize = o.dotSize || function() {
28396
28396
  return (this.minWidth + this.maxWidth) / 2;
28397
28397
  }, this.penColor = o.penColor || "black", this.backgroundColor = o.backgroundColor || "rgba(0,0,0,0)", this.onBegin = o.onBegin, this.onEnd = o.onEnd, this._canvas = t, this._ctx = t.getContext("2d"), this.clear(), this._handleMouseDown = function(n) {
28398
28398
  n.which === 1 && (r._mouseButtonDown = !0, r._strokeBegin(n));
@@ -28585,12 +28585,12 @@ gt.prototype.fromData = function(t) {
28585
28585
  gt.prototype.toData = function() {
28586
28586
  return this._data;
28587
28587
  };
28588
- var la = { exports: {} }, qT = la.exports, Vf;
28589
- function GT() {
28588
+ var la = { exports: {} }, q9 = la.exports, Vf;
28589
+ function G9() {
28590
28590
  return Vf || (Vf = 1, function(t, e) {
28591
28591
  (function(r, o) {
28592
28592
  t.exports = o();
28593
- })(qT, function() {
28593
+ })(q9, function() {
28594
28594
  return function(r) {
28595
28595
  function o(s) {
28596
28596
  if (n[s])
@@ -28630,14 +28630,14 @@ function GT() {
28630
28630
  });
28631
28631
  }(la)), la.exports;
28632
28632
  }
28633
- var KT = GT();
28634
- const ZT = /* @__PURE__ */ l0(KT);
28635
- var YT = ["canvasProps", "clearOnResize"], rl = /* @__PURE__ */ function(t) {
28636
- FT(r, t);
28637
- var e = zT(r);
28633
+ var K9 = G9();
28634
+ const Z9 = /* @__PURE__ */ l0(K9);
28635
+ var Y9 = ["canvasProps", "clearOnResize"], rl = /* @__PURE__ */ function(t) {
28636
+ F9(r, t);
28637
+ var e = z9(r);
28638
28638
  function r() {
28639
28639
  var o;
28640
- DT(this, r);
28640
+ D9(this, r);
28641
28641
  for (var n = arguments.length, s = new Array(n), a = 0; a < n; a++)
28642
28642
  s[a] = arguments[a];
28643
28643
  return o = e.call.apply(e, [this].concat(s)), o.staticThis = o.constructor, o._sigPad = null, o._canvas = null, o.setRef = function(c) {
@@ -28645,7 +28645,7 @@ var YT = ["canvasProps", "clearOnResize"], rl = /* @__PURE__ */ function(t) {
28645
28645
  }, o._excludeOurProps = function() {
28646
28646
  var c = o.props;
28647
28647
  c.canvasProps, c.clearOnResize;
28648
- var l = PT(c, YT);
28648
+ var l = P9(c, Y9);
28649
28649
  return l;
28650
28650
  }, o.componentDidMount = function() {
28651
28651
  var c = o.getCanvas();
@@ -28660,7 +28660,7 @@ var YT = ["canvasProps", "clearOnResize"], rl = /* @__PURE__ */ function(t) {
28660
28660
  return o._canvas;
28661
28661
  }, o.getTrimmedCanvas = function() {
28662
28662
  var c = o.getCanvas(), l = document.createElement("canvas");
28663
- return l.width = c.width, l.height = c.height, l.getContext("2d").drawImage(c, 0, 0), ZT(l);
28663
+ return l.width = c.width, l.height = c.height, l.getContext("2d").drawImage(c, 0, 0), Z9(l);
28664
28664
  }, o.getSignaturePad = function() {
28665
28665
  if (o._sigPad === null)
28666
28666
  throw o.staticThis.refNullError;
@@ -28696,7 +28696,7 @@ var YT = ["canvasProps", "clearOnResize"], rl = /* @__PURE__ */ function(t) {
28696
28696
  return o.getSignaturePad().toData();
28697
28697
  }, o;
28698
28698
  }
28699
- return OT(r);
28699
+ return O9(r);
28700
28700
  }(Fv);
28701
28701
  rl.propTypes = {
28702
28702
  // signature_pad's props
@@ -28717,7 +28717,7 @@ rl.defaultProps = {
28717
28717
  clearOnResize: !0
28718
28718
  };
28719
28719
  rl.refNullError = new Error("react-signature-canvas is currently mounting or unmounting: React refs are null during this phase.");
28720
- const XT = [
28720
+ const X9 = [
28721
28721
  // Row 1
28722
28722
  "#FFFFFF",
28723
28723
  "#4A90E2",
@@ -28742,7 +28742,7 @@ const XT = [
28742
28742
  "#8B572A",
28743
28743
  "#7F0000",
28744
28744
  "#50327C"
28745
- ], JT = ({
28745
+ ], J9 = ({
28746
28746
  title: t,
28747
28747
  icon: e,
28748
28748
  onChange: r,
@@ -28750,7 +28750,7 @@ const XT = [
28750
28750
  onOpenChange: n,
28751
28751
  isActive: s = !1
28752
28752
  }) => {
28753
- const [a, c] = S("#FFFFFF"), [l, d] = S(!1), [h, u] = S(!1), p = oe(!1), g = oe(0), m = (k) => {
28753
+ const [a, c] = S("#FFFFFF"), [l, d] = S(!1), [h, u] = S(!1), p = re(!1), g = re(0), m = (k) => {
28754
28754
  c(k), r(k);
28755
28755
  }, y = (k) => {
28756
28756
  m(k), d(!1);
@@ -28759,14 +28759,14 @@ const XT = [
28759
28759
  }, v = () => {
28760
28760
  p.current = !1;
28761
28761
  };
28762
- G(() => {
28762
+ q(() => {
28763
28763
  const k = () => {
28764
28764
  p.current = !1;
28765
28765
  };
28766
28766
  return document.addEventListener("pointerup", k), document.addEventListener("pointercancel", k), () => {
28767
28767
  document.removeEventListener("pointerup", k), document.removeEventListener("pointercancel", k);
28768
28768
  };
28769
- }, []), G(() => {
28769
+ }, []), q(() => {
28770
28770
  l || (u(!1), p.current = !1, g.current = 0);
28771
28771
  }, [l]);
28772
28772
  const x = (k) => /^#[0-9A-Fa-f]{6}$/.test(k), _ = (k) => {
@@ -28830,7 +28830,7 @@ const XT = [
28830
28830
  k.preventDefault();
28831
28831
  },
28832
28832
  children: [
28833
- /* @__PURE__ */ i("div", { className: "cteditor-grid cteditor-grid-cols-7 cteditor-gap-2 cteditor-mb-4", children: XT.map((k, w) => /* @__PURE__ */ i(
28833
+ /* @__PURE__ */ i("div", { className: "cteditor-grid cteditor-grid-cols-7 cteditor-gap-2 cteditor-mb-4", children: X9.map((k, w) => /* @__PURE__ */ i(
28834
28834
  "button",
28835
28835
  {
28836
28836
  className: `cteditor-w-7 cteditor-h-7 cteditor-rounded cteditor-border-2 hover:cteditor-border-white cteditor-transition-all cteditor-duration-200 cteditor-cursor-pointer hover:cteditor-scale-105 ${a.toUpperCase() === k.toUpperCase() ? "cteditor-border-white cteditor-shadow-lg" : "cteditor-border-gray-500"}`,
@@ -28916,9 +28916,9 @@ const XT = [
28916
28916
  }, pv = Rt(
28917
28917
  "INSERT_SIGNATURE_COMMAND"
28918
28918
  );
28919
- function QT() {
28919
+ function Q9() {
28920
28920
  const [t] = Se();
28921
- return G(() => t.registerCommand(
28921
+ return q(() => t.registerCommand(
28922
28922
  pv,
28923
28923
  (e) => {
28924
28924
  let r;
@@ -28951,8 +28951,8 @@ function QT() {
28951
28951
  const ol = ({
28952
28952
  onClose: t
28953
28953
  }) => {
28954
- const [e] = Se(), r = oe(null), [o, n] = S(!0), [s, a] = S("#000000"), [c, l] = S(null), [d, h] = S(""), { apiKey: u } = Jt(), { uploadFileToS3: p } = kh(u || void 0);
28955
- G(() => {
28954
+ const [e] = Se(), r = re(null), [o, n] = S(!0), [s, a] = S("#000000"), [c, l] = S(null), [d, h] = S(""), { apiKey: u } = Jt(), { uploadFileToS3: p } = kh(u || void 0);
28955
+ q(() => {
28956
28956
  (async () => {
28957
28957
  if (u) {
28958
28958
  const N = await Ew({ apiKey: u });
@@ -28971,7 +28971,7 @@ const ol = ({
28971
28971
  M[T] = E.charCodeAt(T);
28972
28972
  return new File([M], N, { type: w });
28973
28973
  }
28974
- return G(() => {
28974
+ return q(() => {
28975
28975
  if (c && r.current) {
28976
28976
  const _ = r.current, N = new Image();
28977
28977
  N.onload = () => {
@@ -28985,7 +28985,7 @@ const ol = ({
28985
28985
  /* @__PURE__ */ b("div", { className: "cteditor-flex cteditor-gap-2 cteditor-items-center", children: [
28986
28986
  /* @__PURE__ */ i("label", { children: "Choose Color:" }),
28987
28987
  /* @__PURE__ */ i(
28988
- JT,
28988
+ J9,
28989
28989
  {
28990
28990
  title: "Pen Color",
28991
28991
  onChange: (_) => {
@@ -29320,7 +29320,7 @@ const ol = ({
29320
29320
  );
29321
29321
  function n8() {
29322
29322
  const [t] = Se();
29323
- return G(() => {
29323
+ return q(() => {
29324
29324
  if (!t.hasNode(_s))
29325
29325
  throw console.error("NotePanelPlugin: NotePanelNode not registered on editor"), new Error(
29326
29326
  "NotePanelPlugin: NotePanelNode not registered on editor"
@@ -29464,7 +29464,7 @@ const i8 = [
29464
29464
  enableFormatPainter: Q = !0,
29465
29465
  enableFeatureSuggestion: le = !0,
29466
29466
  enableBugReport: fe = !0,
29467
- enablePreview: re = !0,
29467
+ enablePreview: oe = !0,
29468
29468
  fonts: ie,
29469
29469
  editor: A,
29470
29470
  activeEditor: O,
@@ -29475,7 +29475,7 @@ const i8 = [
29475
29475
  redo: !0
29476
29476
  }), [X, te] = S(!1), [se, Le] = S(
29477
29477
  null
29478
- ), [Ee, we] = S(!1), [ke, ge] = S(!1), [ve, B] = S(!1), [q, J] = S(0), K = oe(null), Y = oe(null), [Z, ne] = S(/* @__PURE__ */ new Set()), [de, be] = S(!1), [De, ze] = S(!1), [Be, ht] = S(!1), [pt, cr] = S(!1), [At, Rr] = S(!1), [uo, Ar] = S(!1), [br, jt] = S(!1), [vr, Lr] = S(!1), [Mr, xr] = S(!1), [$e, Ge] = S(""), [yt, Lt] = S(""), ho = oe(null), kt = s8(), { hasFormat: Dt, isEditorEmpty: Kr, blockType: Ft, clearFormatting: Wt } = dS(), { clearEditorContent: Xo } = lS(), { toolbarState: xt, updateToolbarState: dt } = xi(), Jo = {
29478
+ ), [Ee, we] = S(!1), [ke, ge] = S(!1), [ve, B] = S(!1), [G, J] = S(0), K = re(null), Y = re(null), [Z, ne] = S(/* @__PURE__ */ new Set()), [de, be] = S(!1), [De, ze] = S(!1), [Be, ht] = S(!1), [pt, cr] = S(!1), [At, Rr] = S(!1), [uo, Ar] = S(!1), [br, jt] = S(!1), [vr, Lr] = S(!1), [Mr, xr] = S(!1), [$e, Ge] = S(""), [yt, Lt] = S(""), ho = re(null), kt = s8(), { hasFormat: Dt, isEditorEmpty: Kr, blockType: Ft, clearFormatting: Wt } = dS(), { clearEditorContent: Xo } = lS(), { toolbarState: xt, updateToolbarState: dt } = xi(), Jo = {
29479
29479
  blockFormat: {
29480
29480
  label: "Block Format",
29481
29481
  keywords: ["paragraph", "heading", "quote", "code", "block"]
@@ -29587,13 +29587,13 @@ const i8 = [
29587
29587
  markFeedbackDismissed: Os,
29588
29588
  totalLoads: Ds
29589
29589
  } = ZS(Ct);
29590
- G(() => {
29590
+ q(() => {
29591
29591
  En && !br && jt(!0);
29592
29592
  }, [En]);
29593
29593
  const nl = (ue) => {
29594
29594
  jt(ue), !ue && En && Os(Ds);
29595
29595
  };
29596
- G(() => {
29596
+ q(() => {
29597
29597
  const ue = () => {
29598
29598
  if (!K.current || !Y.current)
29599
29599
  return;
@@ -29644,7 +29644,7 @@ const i8 = [
29644
29644
  duration: 8e3
29645
29645
  });
29646
29646
  }, { onFontColorSelect: Ci, onHighlightColorSelect: tn } = Vy(), [Eo, Mv] = S(!1);
29647
- G(() => A.registerUpdateListener(({ editorState: ue }) => {
29647
+ q(() => A.registerUpdateListener(({ editorState: ue }) => {
29648
29648
  ue.read(() => {
29649
29649
  const Te = ce();
29650
29650
  Mv(
@@ -29654,7 +29654,7 @@ const i8 = [
29654
29654
  )
29655
29655
  );
29656
29656
  });
29657
- }), [A]), G(() => Nr(
29657
+ }), [A]), q(() => Nr(
29658
29658
  A.registerCommand(
29659
29659
  ix,
29660
29660
  (ue) => (ee((Te) => ({
@@ -29748,11 +29748,11 @@ const i8 = [
29748
29748
  oo(ue, "font-size", "15px")
29749
29749
  ));
29750
29750
  }, [O, A, dt]);
29751
- G(() => A.registerCommand(
29751
+ q(() => A.registerCommand(
29752
29752
  ai,
29753
29753
  (ue, Te) => (L(Te), Fs(), !1),
29754
29754
  wn
29755
- ), [A, Fs, L]), G(() => {
29755
+ ), [A, Fs, L]), q(() => {
29756
29756
  O.getEditorState().read(() => {
29757
29757
  Fs();
29758
29758
  });
@@ -29987,7 +29987,7 @@ const i8 = [
29987
29987
  "data-toolbar-item": "alignMenu",
29988
29988
  className: "cteditor-flex cteditor-items-center cteditor-gap-1.5",
29989
29989
  children: [
29990
- /* @__PURE__ */ i(u9, {}),
29990
+ /* @__PURE__ */ i(uT, {}),
29991
29991
  /* @__PURE__ */ i(Yt, { orientation: "vertical", className: "!cteditor-h-7" })
29992
29992
  ]
29993
29993
  }
@@ -30042,7 +30042,7 @@ const i8 = [
30042
30042
  }
30043
30043
  ) }),
30044
30044
  g && O === A && /* @__PURE__ */ b("div", { "data-toolbar-item": "formatTextMenu", className: "cteditor-size-6", children: [
30045
- /* @__PURE__ */ i(ST, { hasFormat: Dt, blockType: Ft }),
30045
+ /* @__PURE__ */ i(S9, { hasFormat: Dt, blockType: Ft }),
30046
30046
  /* @__PURE__ */ i(Yt, { orientation: "vertical", className: "!cteditor-h-7" })
30047
30047
  ] }),
30048
30048
  O === A && /* @__PURE__ */ i(Ie, { isEnabled: a, planAllows: Fe?.enableImageUpload ?? !0, featureName: "Image Options", children: /* @__PURE__ */ b(
@@ -30280,7 +30280,7 @@ const i8 = [
30280
30280
  children: ve ? /* @__PURE__ */ i(Co, { className: "!cteditor-size-4 cteditor-animate-spin" }) : /* @__PURE__ */ i(uk, { className: "!cteditor-size-4" })
30281
30281
  }
30282
30282
  ) }),
30283
- /* @__PURE__ */ i(Ue, { children: /* @__PURE__ */ i("p", { children: ve ? `Exporting... ${q}%` : "Export PDF" }) })
30283
+ /* @__PURE__ */ i(Ue, { children: /* @__PURE__ */ i("p", { children: ve ? `Exporting... ${G}%` : "Export PDF" }) })
30284
30284
  ] }) }) }),
30285
30285
  /* @__PURE__ */ i(Ie, { isEnabled: y === !0, planAllows: Fe?.enableAIChat ?? !0, featureName: "AI Chat", className: "[&>[data-lock-icon]]:cteditor-absolute [&>[data-lock-icon]]:cteditor-top-2.5 [&>[data-lock-icon]]:cteditor-right-auto [&>[data-lock-icon]]:cteditor-left-1", children: /* @__PURE__ */ i("div", { "data-toolbar-item": "aiOptions", className: pe("cteditor-aiOption", !y && "[&>button>svg:first-child]:cteditor-opacity-0"), children: /* @__PURE__ */ b(fn, { modal: !1, children: [
30286
30286
  /* @__PURE__ */ i(mn, { asChild: !0, children: /* @__PURE__ */ b(
@@ -30418,7 +30418,7 @@ const i8 = [
30418
30418
  )
30419
30419
  ] })
30420
30420
  ] }) }) }),
30421
- /* @__PURE__ */ i(Ie, { isEnabled: re, planAllows: Fe?.enablePreview ?? !0, featureName: "Preview", children: /* @__PURE__ */ i("div", { "data-toolbar-item": "preview", className: "cteditor-flex cteditor-items-center", children: /* @__PURE__ */ i(et, { delayDuration: 200, children: /* @__PURE__ */ b(Ke, { children: [
30421
+ /* @__PURE__ */ i(Ie, { isEnabled: oe, planAllows: Fe?.enablePreview ?? !0, featureName: "Preview", children: /* @__PURE__ */ i("div", { "data-toolbar-item": "preview", className: "cteditor-flex cteditor-items-center", children: /* @__PURE__ */ i(et, { delayDuration: 200, children: /* @__PURE__ */ b(Ke, { children: [
30422
30422
  /* @__PURE__ */ i(Ze, { asChild: !0, children: /* @__PURE__ */ i(
30423
30423
  ye,
30424
30424
  {
@@ -30765,7 +30765,7 @@ const i8 = [
30765
30765
  /* @__PURE__ */ i(kd, {}),
30766
30766
  "Insert Chart"
30767
30767
  ] }) }),
30768
- Z.has("preview") && wt("preview") && /* @__PURE__ */ i(Ie, { isEnabled: re, planAllows: Fe?.enablePreview ?? !0, featureName: "Preview", variant: "inline", children: /* @__PURE__ */ b(Je, { onClick: Lh, children: [
30768
+ Z.has("preview") && wt("preview") && /* @__PURE__ */ i(Ie, { isEnabled: oe, planAllows: Fe?.enablePreview ?? !0, featureName: "Preview", variant: "inline", children: /* @__PURE__ */ b(Je, { onClick: Lh, children: [
30769
30769
  /* @__PURE__ */ i("div", { className: "cteditor-size-6 cteditor-flex cteditor-items-center cteditor-justify-center", children: /* @__PURE__ */ i(cd, { className: "!cteditor-size-3.5" }) }),
30770
30770
  "Preview"
30771
30771
  ] }) }),
@@ -30789,7 +30789,7 @@ const i8 = [
30789
30789
  O === A && Z.has("formatTextMenu") && wt("formatTextMenu") && /* @__PURE__ */ i(Ie, { isEnabled: g, planAllows: Fe?.enableFormatTextMenu ?? !0, featureName: "Format Text Menu", variant: "inline", children: /* @__PURE__ */ b("div", { className: "cteditor-w-full cteditor-pt-1", children: [
30790
30790
  /* @__PURE__ */ i("div", { className: "cteditor-text-xs cteditor-font-medium cteditor-mb-1 cteditor-opacity-60 cteditor-px-2", children: "Format" }),
30791
30791
  /* @__PURE__ */ i(
30792
- TT,
30792
+ T9,
30793
30793
  {
30794
30794
  hasFormat: Dt,
30795
30795
  blockType: Ft
@@ -30884,7 +30884,7 @@ const i8 = [
30884
30884
  ) }),
30885
30885
  o && O === A && Z.has("alignMenu") && wt("alignMenu") && /* @__PURE__ */ i(Ie, { isEnabled: o, planAllows: Fe?.enableAlignment ?? !0, featureName: "Alignment", variant: "inline", children: /* @__PURE__ */ i(Ce, { children: /* @__PURE__ */ b("div", { className: "cteditor-w-full cteditor-pt-2", children: [
30886
30886
  /* @__PURE__ */ i("div", { className: "cteditor-text-xs cteditor-font-medium cteditor-mb-1 cteditor-opacity-60 cteditor-px-2", children: "Align Menu" }),
30887
- /* @__PURE__ */ i(h9, {})
30887
+ /* @__PURE__ */ i(hT, {})
30888
30888
  ] }) }) }),
30889
30889
  Z.has("aiOptions") && wt("aiOptions") && /* @__PURE__ */ i(Ce, { children: /* @__PURE__ */ b("div", { className: "cteditor-w-full", children: [
30890
30890
  /* @__PURE__ */ i("div", { className: "cteditor-text-xs cteditor-font-medium cteditor-mb-1 cteditor-opacity-60 cteditor-px-2 cteditor-pt-2", children: "Go with AI" }),
@@ -31115,21 +31115,21 @@ const i8 = [
31115
31115
  }
31116
31116
  ),
31117
31117
  /* @__PURE__ */ i(
31118
- Z9,
31118
+ ZT,
31119
31119
  {
31120
31120
  open: At,
31121
31121
  onOpenChange: Rr
31122
31122
  }
31123
31123
  ),
31124
31124
  /* @__PURE__ */ i(
31125
- _T,
31125
+ _9,
31126
31126
  {
31127
31127
  open: uo,
31128
31128
  onOpenChange: Ar
31129
31129
  }
31130
31130
  ),
31131
31131
  /* @__PURE__ */ i(
31132
- ET,
31132
+ E9,
31133
31133
  {
31134
31134
  open: br,
31135
31135
  onOpenChange: nl,
@@ -31149,7 +31149,7 @@ const i8 = [
31149
31149
  }, c8 = typeof navigator < "u" && /Android/i.test(navigator.userAgent);
31150
31150
  function l8() {
31151
31151
  const [t] = Se();
31152
- return G(() => {
31152
+ return q(() => {
31153
31153
  if (!c8)
31154
31154
  return;
31155
31155
  const e = t.getRootElement();
@@ -31216,7 +31216,7 @@ function d8(t) {
31216
31216
  }
31217
31217
  function u8() {
31218
31218
  const [t] = Se();
31219
- return G(() => {
31219
+ return q(() => {
31220
31220
  const e = t.registerMutationListener(
31221
31221
  gu,
31222
31222
  (r) => {
@@ -31238,7 +31238,7 @@ function u8() {
31238
31238
  }
31239
31239
  function h8() {
31240
31240
  const [t] = Se();
31241
- return G(() => {
31241
+ return q(() => {
31242
31242
  const e = t.registerCommand(
31243
31243
  fu,
31244
31244
  (r) => {
@@ -31276,7 +31276,7 @@ function h8() {
31276
31276
  }
31277
31277
  const p8 = () => {
31278
31278
  const [t] = Se();
31279
- return G(() => bx(t), [t]), null;
31279
+ return q(() => bx(t), [t]), null;
31280
31280
  };
31281
31281
  Rt(
31282
31282
  "AUTOCOMPLETE_COMMAND"
@@ -31497,15 +31497,15 @@ function _8({
31497
31497
  enableAI: s = !0,
31498
31498
  debounceDelay: a = 800
31499
31499
  }) {
31500
- const [c] = Se(), { toolbarState: l, updateToolbarState: d } = xi(), h = oe([]), u = oe(new k8(n)), p = oe(), g = oe(""), m = oe(null), y = oe(null), f = oe(null), v = oe(!1), x = oe(null), _ = oe(null), N = oe(() => {
31501
- }), k = oe(0), w = oe(/* @__PURE__ */ new Set()), [E, T] = S(null), [M, j] = S([]), [W, $] = S(0), [U, I] = S(
31500
+ const [c] = Se(), { toolbarState: l, updateToolbarState: d } = xi(), h = re([]), u = re(new k8(n)), p = re(), g = re(""), m = re(null), y = re(null), f = re(null), v = re(!1), x = re(null), _ = re(null), N = re(() => {
31501
+ }), k = re(0), w = re(/* @__PURE__ */ new Set()), [E, T] = S(null), [M, j] = S([]), [W, $] = S(0), [U, I] = S(
31502
31502
  null
31503
31503
  ), [D, P] = S([]), [R, H] = S(/* @__PURE__ */ new Map()), [z, Q] = S(
31504
31504
  /* @__PURE__ */ new Set()
31505
- ), [le, fe] = S(/* @__PURE__ */ new Set()), [re, ie] = S(
31505
+ ), [le, fe] = S(/* @__PURE__ */ new Set()), [oe, ie] = S(
31506
31506
  /* @__PURE__ */ new Set()
31507
31507
  ), [A, O] = S(null);
31508
- G(() => {
31508
+ q(() => {
31509
31509
  w.current = mv();
31510
31510
  }, []);
31511
31511
  const L = V(() => {
@@ -31518,10 +31518,10 @@ function _8({
31518
31518
  }), Array.from(B);
31519
31519
  }, [c, r]), F = V(
31520
31520
  (B) => !B || B.length < r ? [] : L().filter(
31521
- (q) => q.toLowerCase().startsWith(B.toLowerCase()) && q.toLowerCase() !== B.toLowerCase()
31522
- ).slice(0, o).map((q) => ({
31523
- displayText: q,
31524
- key: `traditional-${q}`,
31521
+ (G) => G.toLowerCase().startsWith(B.toLowerCase()) && G.toLowerCase() !== B.toLowerCase()
31522
+ ).slice(0, o).map((G) => ({
31523
+ displayText: G,
31524
+ key: `traditional-${G}`,
31525
31525
  queryWordStart: 0,
31526
31526
  queryWordEnd: B.length,
31527
31527
  type: "suggestion",
@@ -31535,10 +31535,10 @@ function _8({
31535
31535
  P([]), H(/* @__PURE__ */ new Map()), Q(/* @__PURE__ */ new Set());
31536
31536
  return;
31537
31537
  }
31538
- const { fullText: B, nodeMap: q } = Gf(c.getEditorState());
31538
+ const { fullText: B, nodeMap: G } = Gf(c.getEditorState());
31539
31539
  if (!B)
31540
31540
  return;
31541
- if (h.current = q, B.trim().length < 3) {
31541
+ if (h.current = G, B.trim().length < 3) {
31542
31542
  P([]), H(/* @__PURE__ */ new Map()), Q(/* @__PURE__ */ new Set());
31543
31543
  return;
31544
31544
  }
@@ -31583,11 +31583,11 @@ function _8({
31583
31583
  }
31584
31584
  }, [c, l, s, o, le]), te = V(
31585
31585
  (B) => {
31586
- j((q) => q.filter((J) => J.key !== B.key)), $(0), v.current = !0, c.update(() => {
31587
- const q = ce();
31588
- if (!he(q))
31586
+ j((G) => G.filter((J) => J.key !== B.key)), $(0), v.current = !0, c.update(() => {
31587
+ const G = ce();
31588
+ if (!he(G))
31589
31589
  return;
31590
- const J = q.anchor, K = J.getNode(), Y = K.getTextContent(), Z = J.offset;
31590
+ const J = G.anchor, K = J.getNode(), Y = K.getTextContent(), Z = J.offset;
31591
31591
  let ne = Z;
31592
31592
  for (; ne > 0 && /[a-zA-Z0-9_']/.test(Y[ne - 1]); )
31593
31593
  ne--;
@@ -31595,28 +31595,28 @@ function _8({
31595
31595
  const de = Y.slice(0, ne) + B.displayText + Y.slice(Z);
31596
31596
  K.setTextContent(de);
31597
31597
  const be = ne + B.displayText.length;
31598
- q.anchor.set(K.getKey(), be, "text"), q.focus.set(K.getKey(), be, "text");
31598
+ G.anchor.set(K.getKey(), be, "text"), G.focus.set(K.getKey(), be, "text");
31599
31599
  }
31600
31600
  }), g.current = "", T(null), j([]), e?.(B, null, () => T(null)), setTimeout(X, 500);
31601
31601
  },
31602
31602
  [c, e, X]
31603
31603
  ), se = V(
31604
- (B, q) => {
31605
- const J = q.sentenceId || "";
31604
+ (B, G) => {
31605
+ const J = G.sentenceId || "";
31606
31606
  H((K) => {
31607
- const Y = new Map(K), ne = (Y.get(J) || []).filter((de) => de !== q);
31607
+ const Y = new Map(K), ne = (Y.get(J) || []).filter((de) => de !== G);
31608
31608
  return ne.length > 0 ? Y.set(J, ne) : Y.delete(J), Y;
31609
- }), P((K) => K.filter((Y) => Y !== q)), O(null), c.update(() => {
31609
+ }), P((K) => K.filter((Y) => Y !== G)), O(null), c.update(() => {
31610
31610
  const { fullText: K, nodeMap: Y } = Gf(
31611
31611
  c.getEditorState()
31612
31612
  );
31613
- let Z = K.indexOf(q.originalSentence || "");
31614
- if (Z === -1 && (Z = K.indexOf(q.original)), Z === -1)
31613
+ let Z = K.indexOf(G.originalSentence || "");
31614
+ if (Z === -1 && (Z = K.indexOf(G.original)), Z === -1)
31615
31615
  return;
31616
- const ne = K.substring(Z).indexOf(q.original);
31616
+ const ne = K.substring(Z).indexOf(G.original);
31617
31617
  if (ne === -1)
31618
31618
  return;
31619
- const de = Z + ne, be = de + q.original.length, De = Y.find(
31619
+ const de = Z + ne, be = de + G.original.length, De = Y.find(
31620
31620
  (Be) => de >= Be.start && de < Be.end
31621
31621
  ), ze = Y.find(
31622
31622
  (Be) => be > Be.start && be <= Be.end
@@ -31629,10 +31629,10 @@ function _8({
31629
31629
  }
31630
31630
  }
31631
31631
  }), P(
31632
- (K) => K.map((Y) => Y.sentenceId === J && Y !== q ? {
31632
+ (K) => K.map((Y) => Y.sentenceId === J && Y !== G ? {
31633
31633
  ...Y,
31634
31634
  originalSentence: Y.originalSentence?.replace(
31635
- q.original,
31635
+ G.original,
31636
31636
  B
31637
31637
  )
31638
31638
  } : Y)
@@ -31640,7 +31640,7 @@ function _8({
31640
31640
  },
31641
31641
  [c]
31642
31642
  ), Le = V(
31643
- (B, q, J) => {
31643
+ (B, G, J) => {
31644
31644
  ie((K) => new Set(K).add(J)), H((K) => {
31645
31645
  const Y = new Map(K);
31646
31646
  return Y.delete(J), Y;
@@ -31651,9 +31651,9 @@ function _8({
31651
31651
  if (Y)
31652
31652
  return !0;
31653
31653
  if (mt(ne)) {
31654
- const be = ne.getTextContent(), De = be.toLowerCase().indexOf(q.toLowerCase());
31654
+ const be = ne.getTextContent(), De = be.toLowerCase().indexOf(G.toLowerCase());
31655
31655
  if (De !== -1) {
31656
- const ze = be.substring(0, De) + B + be.substring(De + q.length);
31656
+ const ze = be.substring(0, De) + B + be.substring(De + G.length);
31657
31657
  return ne.setTextContent(ze), Y = !0, !0;
31658
31658
  }
31659
31659
  }
@@ -31668,16 +31668,16 @@ function _8({
31668
31668
  },
31669
31669
  [c]
31670
31670
  ), Ee = V((B) => {
31671
- const q = `${B.sentenceId}-${B.original.toLowerCase()}`, J = B.sentenceId || "";
31672
- fe((K) => new Set(K).add(q)), H((K) => {
31671
+ const G = `${B.sentenceId}-${B.original.toLowerCase()}`, J = B.sentenceId || "";
31672
+ fe((K) => new Set(K).add(G)), H((K) => {
31673
31673
  const Y = new Map(K), ne = (Y.get(J) || []).filter(
31674
31674
  (de) => de.original !== B.original
31675
31675
  );
31676
31676
  return ne.length > 0 ? Y.set(J, ne) : Y.delete(J), Y;
31677
31677
  }), P((K) => K.filter((Y) => Y.original !== B.original)), O(null);
31678
31678
  }, []), we = V((B) => {
31679
- const q = x8(B.original);
31680
- w.current = q;
31679
+ const G = x8(B.original);
31680
+ w.current = G;
31681
31681
  const J = B.sentenceId || "";
31682
31682
  H((K) => {
31683
31683
  const Y = new Map(K), ne = (Y.get(J) || []).filter(
@@ -31694,32 +31694,32 @@ function _8({
31694
31694
  const B = ce();
31695
31695
  if (!he(B))
31696
31696
  return;
31697
- const q = window.getSelection()?.getRangeAt(0);
31698
- if (!q)
31697
+ const G = window.getSelection()?.getRangeAt(0);
31698
+ if (!G)
31699
31699
  return;
31700
- const J = q.getBoundingClientRect(), K = y.current;
31700
+ const J = G.getBoundingClientRect(), K = y.current;
31701
31701
  if (!K)
31702
31702
  return;
31703
31703
  const Y = J.bottom + window.scrollY + b8.padding, Z = J.left + window.scrollX;
31704
31704
  K.style.top = `${Y}px`, K.style.left = `${Z}px`;
31705
31705
  });
31706
31706
  }, [c]);
31707
- G(() => {
31707
+ q(() => {
31708
31708
  g.current = "";
31709
- }, []), G(() => {
31709
+ }, []), q(() => {
31710
31710
  l.isAutocompleteEnabled ? X() : (T(null), j([]), P([]), H(/* @__PURE__ */ new Map()), Q(/* @__PURE__ */ new Set()));
31711
- }, [l.isAutocompleteEnabled]), G(() => (f.current && clearTimeout(f.current), E && !v.current ? f.current = window.setTimeout(() => {
31711
+ }, [l.isAutocompleteEnabled]), q(() => (f.current && clearTimeout(f.current), E && !v.current ? f.current = window.setTimeout(() => {
31712
31712
  j(F(E)), $(0), t?.(E);
31713
31713
  }, a) : (j([]), $(0), t?.(null)), () => {
31714
31714
  f.current && clearTimeout(f.current);
31715
- }), [E, F, t, a]), G(() => {
31715
+ }), [E, F, t, a]), q(() => {
31716
31716
  if (!E || M.length === 0)
31717
31717
  return;
31718
31718
  const B = c.registerCommand(
31719
31719
  cx,
31720
31720
  (Z) => (Z?.preventDefault(), $((ne) => (ne + 1) % M.length), !0),
31721
31721
  Nt
31722
- ), q = c.registerCommand(
31722
+ ), G = c.registerCommand(
31723
31723
  lx,
31724
31724
  (Z) => (Z?.preventDefault(), $(
31725
31725
  (ne) => (ne - 1 + M.length) % M.length
@@ -31739,18 +31739,18 @@ function _8({
31739
31739
  Nt
31740
31740
  );
31741
31741
  return () => {
31742
- B(), q(), J(), K(), Y();
31742
+ B(), G(), J(), K(), Y();
31743
31743
  };
31744
- }, [c, E, M, W, te]), G(() => c.registerUpdateListener(({ editorState: B }) => {
31744
+ }, [c, E, M, W, te]), q(() => c.registerUpdateListener(({ editorState: B }) => {
31745
31745
  B.read(() => setTimeout(ee, 0));
31746
- }), [c, ee]), G(() => {
31746
+ }), [c, ee]), q(() => {
31747
31747
  E && M.length > 0 && ke();
31748
- }, [E, M, ke]), G(() => {
31748
+ }, [E, M, ke]), q(() => {
31749
31749
  const B = document.createElement("div");
31750
31750
  return B.style.position = "absolute", B.style.zIndex = "1000", document.body.appendChild(B), y.current = B, I(B), () => {
31751
31751
  y.current && document.body.removeChild(y.current);
31752
31752
  };
31753
- }, []), G(() => {
31753
+ }, []), q(() => {
31754
31754
  if (!l.isAutocompleteEnabled)
31755
31755
  return;
31756
31756
  const B = c.registerUpdateListener(() => {
@@ -31759,7 +31759,7 @@ function _8({
31759
31759
  return () => {
31760
31760
  B(), clearTimeout(p.current);
31761
31761
  };
31762
- }, [c]), G(() => {
31762
+ }, [c]), q(() => {
31763
31763
  const B = () => {
31764
31764
  if (!c.getRootElement() || (document.querySelectorAll(".grammar-error-highlight").forEach((Y) => Y.remove()), D.length === 0))
31765
31765
  return;
@@ -31821,12 +31821,12 @@ function _8({
31821
31821
  });
31822
31822
  };
31823
31823
  return N.current = B, window.addEventListener("scroll", B, !0), window.addEventListener("resize", B), window.addEventListener("customUpdateHighlights", B), requestAnimationFrame(B), () => {
31824
- window.removeEventListener("scroll", B, !0), window.removeEventListener("resize", B), window.removeEventListener("customUpdateHighlights", B), document.querySelectorAll(".grammar-error-highlight").forEach((q) => q.remove()), N.current = () => {
31824
+ window.removeEventListener("scroll", B, !0), window.removeEventListener("resize", B), window.removeEventListener("customUpdateHighlights", B), document.querySelectorAll(".grammar-error-highlight").forEach((G) => G.remove()), N.current = () => {
31825
31825
  };
31826
31826
  };
31827
- }, [D, c]), G(() => {
31828
- const B = (q) => {
31829
- const J = q.target;
31827
+ }, [D, c]), q(() => {
31828
+ const B = (G) => {
31829
+ const J = G.target;
31830
31830
  m.current?.contains(J) || document.querySelector(".grammar-tooltip-card")?.contains(J) || (T(null), j([]), O(null));
31831
31831
  };
31832
31832
  return document.addEventListener("mousedown", B), () => document.removeEventListener("mousedown", B);
@@ -31834,8 +31834,8 @@ function _8({
31834
31834
  const ge = () => {
31835
31835
  if (!A || !A.isVisible)
31836
31836
  return null;
31837
- const { error: B, x: q, y: J } = A, { left: K, top: Y } = C8(
31838
- q,
31837
+ const { error: B, x: G, y: J } = A, { left: K, top: Y } = C8(
31838
+ G,
31839
31839
  J,
31840
31840
  Ti.width,
31841
31841
  Ti.maxHeight,
@@ -32022,15 +32022,15 @@ function _8({
32022
32022
  {
32023
32023
  ref: m,
32024
32024
  className: "cteditor-w-80 cteditor-max-h-64 cteditor-overflow-hidden cteditor-shadow-xl cteditor-border-2 cteditor-bg-white dark:cteditor-bg-gray-900 autocomplete-menu",
32025
- children: /* @__PURE__ */ i(Ji, { className: "!cteditor-p-2", children: /* @__PURE__ */ i("div", { className: "cteditor-max-h-56 cteditor-overflow-y-auto cteditor-space-y-1", children: M.map((B, q) => /* @__PURE__ */ b(
32025
+ children: /* @__PURE__ */ i(Ji, { className: "!cteditor-p-2", children: /* @__PURE__ */ i("div", { className: "cteditor-max-h-56 cteditor-overflow-y-auto cteditor-space-y-1", children: M.map((B, G) => /* @__PURE__ */ b(
32026
32026
  "button",
32027
32027
  {
32028
32028
  className: pe(
32029
32029
  "cteditor-w-full cteditor-flex cteditor-items-center cteditor-gap-3 cteditor-px-3 cteditor-py-2.5 cteditor-rounded-md cteditor-text-left",
32030
- q === W ? "cteditor-bg-blue-100" : "hover:cteditor-bg-gray-100"
32030
+ G === W ? "cteditor-bg-blue-100" : "hover:cteditor-bg-gray-100"
32031
32031
  ),
32032
32032
  onClick: () => te(B),
32033
- onMouseEnter: () => $(q),
32033
+ onMouseEnter: () => $(G),
32034
32034
  children: [
32035
32035
  /* @__PURE__ */ i(Oo, { className: "cteditor-w-4 cteditor-h-4" }),
32036
32036
  /* @__PURE__ */ i("span", { className: "cteditor-text-sm cteditor-font-medium", children: B.displayText })
@@ -32048,8 +32048,8 @@ function _8({
32048
32048
  ] });
32049
32049
  }
32050
32050
  const N8 = () => {
32051
- const [t] = Se(), { getCommentById: e } = Fu(), r = oe(null);
32052
- return G(() => {
32051
+ const [t] = Se(), { getCommentById: e } = Fu(), r = re(null);
32052
+ return q(() => {
32053
32053
  if (!t.getRootElement())
32054
32054
  return;
32055
32055
  const n = document.createElement("div");
@@ -32091,11 +32091,11 @@ const N8 = () => {
32091
32091
  },
32092
32092
  [d, e]
32093
32093
  );
32094
- G(() => {
32094
+ q(() => {
32095
32095
  t && s("");
32096
32096
  }, [t]);
32097
- const u = oe(null);
32098
- return G(() => {
32097
+ const u = re(null);
32098
+ return q(() => {
32099
32099
  if (!u.current)
32100
32100
  return;
32101
32101
  const p = u.current;
@@ -32189,11 +32189,11 @@ const N8 = () => {
32189
32189
  }, [t]), p = V(() => {
32190
32190
  r(!1), n("");
32191
32191
  }, []);
32192
- return G(() => t.registerCommand(
32192
+ return q(() => t.registerCommand(
32193
32193
  E8,
32194
32194
  ({ text: g }) => (h(g), !0),
32195
32195
  Nt
32196
- ), [t, h]), G(() => {
32196
+ ), [t, h]), q(() => {
32197
32197
  const g = () => (u(), !0);
32198
32198
  return t.registerCommand(
32199
32199
  gv,
@@ -32233,13 +32233,13 @@ const N8 = () => {
32233
32233
  o.onload = () => e(o.result), o.onerror = r, o.readAsDataURL(t);
32234
32234
  });
32235
32235
  function L8() {
32236
- const [t] = Se(), e = oe(/* @__PURE__ */ new Set()), { apiKey: r } = Jt();
32237
- return G(() => {
32236
+ const [t] = Se(), e = re(/* @__PURE__ */ new Set()), { apiKey: r } = Jt();
32237
+ return q(() => {
32238
32238
  const o = setInterval(() => {
32239
32239
  e.current.clear();
32240
32240
  }, 1e3);
32241
32241
  return () => clearInterval(o);
32242
- }, []), G(() => {
32242
+ }, []), q(() => {
32243
32243
  const o = (l) => {
32244
32244
  l.preventDefault(), l.stopPropagation();
32245
32245
  const d = l.dataTransfer?.types.includes("Files"), h = l.dataTransfer?.types.some(
@@ -32288,7 +32288,7 @@ function L8() {
32288
32288
  return c.addEventListener("dragenter", o), c.addEventListener("dragover", n), c.addEventListener("dragleave", s), c.addEventListener("drop", a), () => {
32289
32289
  c.removeEventListener("dragenter", o), c.removeEventListener("dragover", n), c.removeEventListener("dragleave", s), c.removeEventListener("drop", a);
32290
32290
  };
32291
- }, [t]), G(() => t.registerCommand(
32291
+ }, [t]), q(() => t.registerCommand(
32292
32292
  _x,
32293
32293
  (o) => ((async () => {
32294
32294
  const n = await rx(o, [
@@ -32432,7 +32432,7 @@ function M8({
32432
32432
  url: o,
32433
32433
  onClose: n
32434
32434
  }) {
32435
- const s = oe(null), a = oe(), [c, l] = S(
32435
+ const s = re(null), a = re(), [c, l] = S(
32436
32436
  "embed"
32437
32437
  ), [d, h] = S(
32438
32438
  "left"
@@ -32457,9 +32457,9 @@ function M8({
32457
32457
  }, [g]), y = V(() => {
32458
32458
  a.current && (cancelAnimationFrame(a.current), a.current = void 0);
32459
32459
  }, []);
32460
- G(() => (m(), () => {
32460
+ q(() => (m(), () => {
32461
32461
  y();
32462
- }), [m, y]), G(() => {
32462
+ }), [m, y]), q(() => {
32463
32463
  const w = s.current;
32464
32464
  if (w) {
32465
32465
  const E = setTimeout(() => {
@@ -32467,7 +32467,7 @@ function M8({
32467
32467
  }, 100);
32468
32468
  return () => clearTimeout(E);
32469
32469
  }
32470
- }, []), G(() => {
32470
+ }, []), q(() => {
32471
32471
  const w = (E) => {
32472
32472
  const T = E, { nodeKey: M } = T.detail;
32473
32473
  M === r && (console.log("Handling embedNodeSelected event for this node"), p(!0));
@@ -32478,7 +32478,7 @@ function M8({
32478
32478
  w
32479
32479
  );
32480
32480
  };
32481
- }, [r]), G(() => {
32481
+ }, [r]), q(() => {
32482
32482
  t.getEditorState().read(() => {
32483
32483
  const w = ut(r);
32484
32484
  w instanceof fr && (typeof w.getDisplayType == "function" && l(w.getDisplayType()), typeof w.getAlignment == "function" && h(w.getAlignment()));
@@ -32506,7 +32506,7 @@ function M8({
32506
32506
  console.log("URL copied to clipboard");
32507
32507
  });
32508
32508
  };
32509
- return G(() => {
32509
+ return q(() => {
32510
32510
  const w = (E) => {
32511
32511
  s.current && !s.current.contains(E.target) && (E.target.closest("[data-embed-type]") || n());
32512
32512
  };
@@ -32658,7 +32658,7 @@ function M8({
32658
32658
  }
32659
32659
  function I8(t, e) {
32660
32660
  const [r, o] = S(null), [n, s] = S(""), a = (h) => h.includes("youtube.com") || h.includes("youtu.be") || h.includes("loom.com") || h.includes("vimeo.com");
32661
- G(() => {
32661
+ q(() => {
32662
32662
  const h = (u) => {
32663
32663
  const p = u, { nodeKey: g, url: m } = p.detail;
32664
32664
  console.log("Received embedNodeSelected event in useFloatingEmbedMenu:", {
@@ -32719,7 +32719,7 @@ function I8(t, e) {
32719
32719
  o(null);
32720
32720
  });
32721
32721
  }, [t, a]);
32722
- G(() => {
32722
+ q(() => {
32723
32723
  const h = (u) => {
32724
32724
  console.log("Document click detected");
32725
32725
  const p = u.target, g = p.closest(
@@ -32746,7 +32746,7 @@ function I8(t, e) {
32746
32746
  return document.addEventListener("mousedown", h), () => {
32747
32747
  document.removeEventListener("mousedown", h);
32748
32748
  };
32749
- }, [t, c]), G(() => Nr(
32749
+ }, [t, c]), q(() => Nr(
32750
32750
  t.registerUpdateListener(() => {
32751
32751
  l();
32752
32752
  }),
@@ -32790,7 +32790,7 @@ const O8 = [
32790
32790
  floatingAnchorElem: t = document.body
32791
32791
  }) => {
32792
32792
  const [e] = Se();
32793
- return G(() => {
32793
+ return q(() => {
32794
32794
  const r = (o) => {
32795
32795
  const n = o.target;
32796
32796
  if (n.closest('a[download], a[href*=".mp4"], a[href*=".webm"], a[href*=".ogg"], a[href*=".pdf"], a[href*=".doc"], a[href*=".docx"], a[href*=".xls"], a[href*=".xlsx"], a[href*=".ppt"], a[href*=".pptx"], a[href*=".zip"], a[href*=".rar"], a[href*=".txt"], a[href*=".csv"], a[href*=".json"], a[href*=".png"], a[href*=".jpg"], a[href*=".jpeg"], a[href*=".gif"], a[href*=".webp"], a[href*=".svg"]')) {
@@ -32825,7 +32825,7 @@ const O8 = [
32825
32825
  return document.addEventListener("click", r, !0), () => {
32826
32826
  document.removeEventListener("click", r, !0);
32827
32827
  };
32828
- }, [e]), G(() => e.registerCommand(
32828
+ }, [e]), q(() => e.registerCommand(
32829
32829
  wm,
32830
32830
  (r) => {
32831
32831
  const o = r.clipboardData;
@@ -32879,7 +32879,7 @@ function H8({
32879
32879
  isLinkEditMode: n,
32880
32880
  setIsLinkEditMode: s
32881
32881
  }) {
32882
- const a = oe(null), c = oe(null), [l, d] = S(""), [h, u] = S(""), [p, g] = S("https://"), [m, y] = S(!1), [f, v] = S(null), x = V(() => {
32882
+ const a = re(null), c = re(null), [l, d] = S(""), [h, u] = S(""), [p, g] = S("https://"), [m, y] = S(!1), [f, v] = S(null), x = V(() => {
32883
32883
  const w = ce();
32884
32884
  if (he(w)) {
32885
32885
  const $ = bo(w), U = It($, Ht);
@@ -32903,7 +32903,7 @@ function H8({
32903
32903
  (!M || M.className !== "link-input") && (W || (j !== null && Jf(null, E, o), v(null), s(!1), y(!1), d(""), u("")));
32904
32904
  return !0;
32905
32905
  }, [o, t, s, n, l]);
32906
- G(() => {
32906
+ q(() => {
32907
32907
  const w = o.parentElement, E = () => {
32908
32908
  t.getEditorState().read(() => {
32909
32909
  x();
@@ -32912,7 +32912,7 @@ function H8({
32912
32912
  return window.addEventListener("resize", E), w && w.addEventListener("scroll", E), () => {
32913
32913
  window.removeEventListener("resize", E), w && w.removeEventListener("scroll", E);
32914
32914
  };
32915
- }, [o.parentElement, t, x]), G(() => Nr(
32915
+ }, [o.parentElement, t, x]), q(() => Nr(
32916
32916
  t.registerUpdateListener(({ editorState: w }) => {
32917
32917
  w.read(() => {
32918
32918
  x();
@@ -32934,11 +32934,11 @@ function H8({
32934
32934
  }), r(!1), y(!1), s(!1), !0) : !1,
32935
32935
  Un
32936
32936
  )
32937
- ), [t, x, r, e]), G(() => {
32937
+ ), [t, x, r, e]), q(() => {
32938
32938
  t.getEditorState().read(() => {
32939
32939
  x();
32940
32940
  });
32941
- }, [t, x]), G(() => {
32941
+ }, [t, x]), q(() => {
32942
32942
  n && c.current && c.current.focus();
32943
32943
  }, [n, e]);
32944
32944
  const _ = () => {
@@ -33082,7 +33082,7 @@ function H8({
33082
33082
  }
33083
33083
  function z8(t, e, r, o) {
33084
33084
  const [n, s] = S(t), [a, c] = S(!1);
33085
- return G(() => {
33085
+ return q(() => {
33086
33086
  function l() {
33087
33087
  const d = ce();
33088
33088
  if (he(d)) {
@@ -33217,7 +33217,7 @@ const q8 = [
33217
33217
  currentHighlightColor: o
33218
33218
  }) => {
33219
33219
  const [n, s] = S(!1), [a, c] = S([]);
33220
- G(() => {
33220
+ q(() => {
33221
33221
  try {
33222
33222
  const p = localStorage.getItem(Qf);
33223
33223
  p && c(JSON.parse(p));
@@ -33462,7 +33462,7 @@ yv.displayName = "TextEnhanceDialog";
33462
33462
  const iu = Rt(
33463
33463
  "TEXT_ENHANCE_COMMAND"
33464
33464
  ), Z8 = ({ apiKey: t }) => {
33465
- const [e] = Se(), r = oe(null), o = oe(void 0), n = async (a, c) => {
33465
+ const [e] = Se(), r = re(null), o = re(void 0), n = async (a, c) => {
33466
33466
  let l = null;
33467
33467
  e.getEditorState().read(() => {
33468
33468
  const d = ce();
@@ -33528,7 +33528,7 @@ const iu = Rt(
33528
33528
  await n(l, d);
33529
33529
  });
33530
33530
  }), !0);
33531
- return G(() => e.registerCommand(
33531
+ return q(() => e.registerCommand(
33532
33532
  iu,
33533
33533
  (a) => (s(a), !0),
33534
33534
  Nt
@@ -33543,8 +33543,8 @@ const iu = Rt(
33543
33543
  children: t,
33544
33544
  trigger: e
33545
33545
  }) => {
33546
- const [r, o] = S(!1), n = oe(null);
33547
- return G(() => {
33546
+ const [r, o] = S(!1), n = re(null);
33547
+ return q(() => {
33548
33548
  const s = (a) => {
33549
33549
  n.current && !n.current.contains(a.target) && o(!1);
33550
33550
  };
@@ -33587,7 +33587,7 @@ function Y8({
33587
33587
  highlightColor: f,
33588
33588
  features: v
33589
33589
  }) {
33590
- const x = oe(null), { isHtmlView: _, setIsHtmlView: N, setHtmlContent: k } = ci(), { onFontColorSelect: w } = Vy(), { planConfig: E } = Jt(), T = E?.floatingMenuOptions;
33590
+ const x = re(null), { isHtmlView: _, setIsHtmlView: N, setHtmlContent: k } = ci(), { onFontColorSelect: w } = Vy(), { planConfig: E } = Jt(), T = E?.floatingMenuOptions;
33591
33591
  V(() => {
33592
33592
  t.update(() => {
33593
33593
  const D = ce();
@@ -33637,7 +33637,7 @@ function Y8({
33637
33637
  function W(D) {
33638
33638
  x?.current && x.current.style.pointerEvents !== "auto" && (x.current.style.pointerEvents = "auto");
33639
33639
  }
33640
- G(() => {
33640
+ q(() => {
33641
33641
  if (x?.current)
33642
33642
  return document.addEventListener("mousemove", j), document.addEventListener("mouseup", W), () => {
33643
33643
  document.removeEventListener("mousemove", j), document.removeEventListener("mouseup", W);
@@ -33658,7 +33658,7 @@ function Y8({
33658
33658
  );
33659
33659
  }
33660
33660
  }, [t, e, r]);
33661
- G(() => {
33661
+ q(() => {
33662
33662
  const D = e.parentElement, P = () => {
33663
33663
  t.getEditorState().read(() => {
33664
33664
  $();
@@ -33667,7 +33667,7 @@ function Y8({
33667
33667
  return window.addEventListener("resize", P), D && D.addEventListener("scroll", P), () => {
33668
33668
  window.removeEventListener("resize", P), D && D.removeEventListener("scroll", P);
33669
33669
  };
33670
- }, [t, $, e]), G(() => (t.getEditorState().read(() => {
33670
+ }, [t, $, e]), q(() => (t.getEditorState().read(() => {
33671
33671
  $();
33672
33672
  }), Nr(
33673
33673
  t.registerUpdateListener(({ editorState: D }) => {
@@ -34043,12 +34043,12 @@ function X8(t, e, r, o) {
34043
34043
  return;
34044
34044
  const fe = bo(z);
34045
34045
  d(z.hasFormat("bold")), u(z.hasFormat("italic")), g(z.hasFormat("underline")), y(z.hasFormat("uppercase")), v(z.hasFormat("lowercase")), _(z.hasFormat("capitalize")), k(z.hasFormat("strikethrough")), E(z.hasFormat("subscript")), M(z.hasFormat("superscript")), W(z.hasFormat("code")), U(z.hasFormat("highlight"));
34046
- const re = oo(
34046
+ const oe = oo(
34047
34047
  z,
34048
34048
  "background-color",
34049
34049
  ""
34050
34050
  );
34051
- D(re && re !== "transparent" ? re : null);
34051
+ D(oe && oe !== "transparent" ? oe : null);
34052
34052
  const ie = fe.getParent();
34053
34053
  Ht(ie) || Ht(fe) ? c(!0) : c(!1);
34054
34054
  let A = null;
@@ -34065,9 +34065,9 @@ function X8(t, e, r, o) {
34065
34065
  }
34066
34066
  });
34067
34067
  }, [t]);
34068
- return G(() => (document.addEventListener("selectionchange", H), () => {
34068
+ return q(() => (document.addEventListener("selectionchange", H), () => {
34069
34069
  document.removeEventListener("selectionchange", H);
34070
- }), [H]), G(() => Nr(
34070
+ }), [H]), q(() => Nr(
34071
34071
  t.registerUpdateListener(() => {
34072
34072
  H();
34073
34073
  }),
@@ -34131,13 +34131,13 @@ function J8({
34131
34131
  );
34132
34132
  }
34133
34133
  const Q8 = () => {
34134
- const [t] = Se(), { isHtmlView: e, setHtmlContent: r, canUpdateFromEditor: o } = ci(), n = oe(""), s = oe(null), a = oe(!1), c = oe(!1);
34135
- return G(() => {
34134
+ const [t] = Se(), { isHtmlView: e, setHtmlContent: r, canUpdateFromEditor: o } = ci(), n = re(""), s = re(null), a = re(!1), c = re(!1);
34135
+ return q(() => {
34136
34136
  e && !c.current && t.getEditorState().read(() => {
34137
34137
  const l = Vi(t, null);
34138
34138
  n.current = l, r(l);
34139
34139
  }), c.current = e;
34140
- }, [e, t, r]), G(() => {
34140
+ }, [e, t, r]), q(() => {
34141
34141
  if (e)
34142
34142
  return t.registerUpdateListener(
34143
34143
  ({ editorState: l, dirtyElements: d, dirtyLeaves: h }) => {
@@ -34153,21 +34153,21 @@ const Q8 = () => {
34153
34153
  }, 100));
34154
34154
  }
34155
34155
  );
34156
- }, [t, e, r, o]), G(() => {
34156
+ }, [t, e, r, o]), q(() => {
34157
34157
  const l = () => {
34158
34158
  a.current = !0;
34159
34159
  };
34160
34160
  return t._markAsHtmlUpdate = l, () => {
34161
34161
  delete t._markAsHtmlUpdate;
34162
34162
  };
34163
- }, [t]), G(() => () => {
34163
+ }, [t]), q(() => () => {
34164
34164
  s.current && clearTimeout(s.current);
34165
34165
  }, []), null;
34166
34166
  }, e7 = Rt("INSERT_VIDEO_COMMAND"), t7 = ({
34167
34167
  captionsEnabled: t
34168
34168
  }) => {
34169
34169
  const [e] = Se();
34170
- return G(() => {
34170
+ return q(() => {
34171
34171
  if (!e.hasNodes([vi]))
34172
34172
  throw new Error("VideoPlugin: VideoNode not registered on editor");
34173
34173
  return Nr(
@@ -34201,7 +34201,7 @@ function r7({
34201
34201
  }
34202
34202
  function o7({ apiKey: t }) {
34203
34203
  const [e] = Se(), [r, o] = S(null);
34204
- return G(() => {
34204
+ return q(() => {
34205
34205
  const n = e.getRootElement();
34206
34206
  if (!n)
34207
34207
  return;
@@ -34257,12 +34257,12 @@ function o7({ apiKey: t }) {
34257
34257
  }
34258
34258
  const Qs = 320;
34259
34259
  function n7({ url: t, rect: e, apiKey: r, onClose: o }) {
34260
- const [n, s] = S({ top: 0, left: 0 }), [a, c] = S(null), [l, d] = S(!0), [h, u] = S(!1), p = oe(!1);
34261
- G(() => {
34260
+ const [n, s] = S({ top: 0, left: 0 }), [a, c] = S(null), [l, d] = S(!0), [h, u] = S(!1), p = re(!1);
34261
+ q(() => {
34262
34262
  p.current || (p.current = !0, d(!0), u(!1), Om({ url: t, apiKey: r }).then((_) => {
34263
34263
  _ ? c(_) : u(!0);
34264
34264
  }).catch(() => u(!0)).finally(() => d(!1)));
34265
- }, [t, r]), G(() => {
34265
+ }, [t, r]), q(() => {
34266
34266
  const _ = a?.image ? 280 : 160;
34267
34267
  let N = e.top + window.scrollY - _ - 10;
34268
34268
  e.top - _ - 10 < 0 && (N = e.bottom + window.scrollY + 10);
@@ -34451,7 +34451,7 @@ const i7 = (t, e) => {
34451
34451
  },
34452
34452
  [t]
34453
34453
  ), o = i7(r, 500);
34454
- return G(() => e.registerUpdateListener(
34454
+ return q(() => e.registerUpdateListener(
34455
34455
  ({ editorState: n, dirtyElements: s, dirtyLeaves: a }) => {
34456
34456
  if (s.size === 0 && a.size === 0)
34457
34457
  return;
@@ -34703,7 +34703,7 @@ function a7(t) {
34703
34703
  }
34704
34704
  function c7() {
34705
34705
  const [t] = Se();
34706
- return G(() => {
34706
+ return q(() => {
34707
34707
  const e = t.registerTextContentListener(() => {
34708
34708
  const s = No(t);
34709
34709
  s && bv.test(s) && setTimeout(() => {
@@ -34831,7 +34831,7 @@ const l7 = `\\.,\\+\\*\\?\\$\\@\\|#{}\\(\\)\\^\\-\\[\\]\\\\/!%'"~=<>_:;`, d7 = {
34831
34831
  };
34832
34832
  function y7(t = [], e) {
34833
34833
  const [r, o] = S([]);
34834
- return G(() => {
34834
+ return q(() => {
34835
34835
  const n = Ul.get(e);
34836
34836
  if (e == null) {
34837
34837
  o([]);
@@ -34958,10 +34958,10 @@ function _7({
34958
34958
  onClose: o,
34959
34959
  hasHtml: n
34960
34960
  }) {
34961
- const s = oe(null), [a, c] = S(t);
34962
- G(() => {
34961
+ const s = re(null), [a, c] = S(t);
34962
+ q(() => {
34963
34963
  c(t);
34964
- }, [t]), G(() => {
34964
+ }, [t]), q(() => {
34965
34965
  const m = (y) => {
34966
34966
  s.current && !s.current.contains(y.target) && o();
34967
34967
  };
@@ -35265,7 +35265,7 @@ function S7(t) {
35265
35265
  }
35266
35266
  function T7() {
35267
35267
  const [t] = Se(), [e, r] = S(null), [o, n] = S("rich"), [s, a] = S(!1), [c, l] = S({ x: 0, y: 0 });
35268
- G(() => {
35268
+ q(() => {
35269
35269
  if (!s)
35270
35270
  return;
35271
35271
  const u = () => {
@@ -35275,15 +35275,15 @@ function T7() {
35275
35275
  ));
35276
35276
  };
35277
35277
  return window.addEventListener("scroll", u, !0), () => window.removeEventListener("scroll", u, !0);
35278
- }, [t, s]), G(() => t.registerCommand(
35278
+ }, [t, s]), q(() => t.registerCommand(
35279
35279
  mu,
35280
35280
  () => s ? (a(!1), r(null), !0) : !1,
35281
35281
  wn
35282
- ), [t, s]), G(() => s ? t.registerUpdateListener(
35282
+ ), [t, s]), q(() => s ? t.registerUpdateListener(
35283
35283
  ({ tags: p, dirtyElements: g, dirtyLeaves: m }) => {
35284
35284
  !p.has("paste") && !p.has("history-merge") && !p.has("paste-options") && (g.size > 0 || m.size > 0) && (a(!1), r(null));
35285
35285
  }
35286
- ) : void 0, [t, s]), G(() => {
35286
+ ) : void 0, [t, s]), q(() => {
35287
35287
  const u = (g) => {
35288
35288
  const m = g.clipboardData;
35289
35289
  if (!m)
@@ -35452,15 +35452,15 @@ function A7({
35452
35452
  );
35453
35453
  }
35454
35454
  function L7() {
35455
- const [t] = Se(), { toolbarState: e, updateToolbarState: r } = xi(), { isHtmlView: o, setIsHtmlView: n } = ci(), { apiKey: s, editorConfig: a, planConfig: c } = Jt(), l = c?.toolbarOptions, d = a?.toolbarOptions, h = d?.enableHeadings ?? !0, u = d?.enableLists ?? !0, p = d?.enableBlockquote ?? !0, g = d?.enableCodeFormat ?? !0, m = d?.enableHorizontalLine ?? !0, y = d?.enableImageUpload ?? !0, f = d?.enableImageOptions ?? !0, v = d?.enableEmbeds ?? !0, x = d?.enableTableOptions ?? !0, _ = d?.enableCharts ?? !0, N = d?.enableSignature ?? !0, k = d?.enableNotePanels ?? !0, w = d?.enableAlignment ?? !0, E = d?.enableTextFormatting ?? !0, T = d?.enableUndoRedo ?? !0, M = d?.enableAIChat ?? !0, j = d?.enablePreview ?? !0, W = d?.enableAutocompleteToggle ?? !0, $ = d?.enableHtmlViewToggle ?? !0, U = d?.enableTodoList ?? !0, [I, D] = S(null), [P, R] = S(""), H = oe(null), z = oe(null), [Q, le] = S({ top: 0, left: 0 }), [fe, re] = S(!1), ie = oe(null), [A, O] = S(!1), [L, F] = S(null), [ee, X] = S(!1), [te, se] = S(!1), [Le, Ee] = S(!1), [we, ke] = S(!1), [ge, ve] = S(!1), [B, q] = S(""), J = Lm("/", { minLength: 0 });
35456
- G(() => {
35455
+ const [t] = Se(), { toolbarState: e, updateToolbarState: r } = xi(), { isHtmlView: o, setIsHtmlView: n } = ci(), { apiKey: s, editorConfig: a, planConfig: c } = Jt(), l = c?.toolbarOptions, d = a?.toolbarOptions, h = d?.enableHeadings ?? !0, u = d?.enableLists ?? !0, p = d?.enableBlockquote ?? !0, g = d?.enableCodeFormat ?? !0, m = d?.enableHorizontalLine ?? !0, y = d?.enableImageUpload ?? !0, f = d?.enableImageOptions ?? !0, v = d?.enableEmbeds ?? !0, x = d?.enableTableOptions ?? !0, _ = d?.enableCharts ?? !0, N = d?.enableSignature ?? !0, k = d?.enableNotePanels ?? !0, w = d?.enableAlignment ?? !0, E = d?.enableTextFormatting ?? !0, T = d?.enableUndoRedo ?? !0, M = d?.enableAIChat ?? !0, j = d?.enablePreview ?? !0, W = d?.enableAutocompleteToggle ?? !0, $ = d?.enableHtmlViewToggle ?? !0, U = d?.enableTodoList ?? !0, [I, D] = S(null), [P, R] = S(""), H = re(null), z = re(null), [Q, le] = S({ top: 0, left: 0 }), [fe, oe] = S(!1), ie = re(null), [A, O] = S(!1), [L, F] = S(null), [ee, X] = S(!1), [te, se] = S(!1), [Le, Ee] = S(!1), [we, ke] = S(!1), [ge, ve] = S(!1), [B, G] = S(""), J = Lm("/", { minLength: 0 });
35456
+ q(() => {
35457
35457
  const We = t.getRootElement();
35458
35458
  if (We) {
35459
35459
  const ft = We.closest(".editor-scroller") || We.parentElement || document.body;
35460
35460
  F(ft);
35461
35461
  }
35462
- }, [t]), G(() => {
35463
- A || (R(""), re(!1));
35462
+ }, [t]), q(() => {
35463
+ A || (R(""), oe(!1));
35464
35464
  }, [A]);
35465
35465
  const K = V((We) => {
35466
35466
  t.update(() => {
@@ -35570,7 +35570,7 @@ function L7() {
35570
35570
  n(!o);
35571
35571
  }, [o, n]), xt = V(() => {
35572
35572
  const We = hh(t);
35573
- q(We), ve(!0);
35573
+ G(We), ve(!0);
35574
35574
  }, [t]), dt = zr(() => [
35575
35575
  // Block types
35576
35576
  new He("__label__BLOCKS", () => {
@@ -35707,7 +35707,7 @@ function L7() {
35707
35707
  },
35708
35708
  [t]
35709
35709
  );
35710
- return G(() => {
35710
+ return q(() => {
35711
35711
  if (!A || !L)
35712
35712
  return;
35713
35713
  const We = z.current, ft = ie.current;
@@ -35724,7 +35724,7 @@ function L7() {
35724
35724
  }
35725
35725
  const Ci = Ct.width;
35726
35726
  let tn;
35727
- En + Os > Ci ? tn = Math.max(8, Ci - Os - 8) : tn = Math.max(8, En), le((Eo) => Eo.top === en && Eo.left === tn ? (fe || re(!0), Eo) : { top: en, left: tn }), fe || re(!0);
35727
+ En + Os > Ci ? tn = Math.max(8, Ci - Os - 8) : tn = Math.max(8, En), le((Eo) => Eo.top === en && Eo.left === tn ? (fe || oe(!0), Eo) : { top: en, left: tn }), fe || oe(!0);
35728
35728
  };
35729
35729
  return _t(), window.addEventListener("scroll", _t, !0), window.addEventListener("resize", _t), L.addEventListener("scroll", _t), () => {
35730
35730
  window.removeEventListener("scroll", _t, !0), window.removeEventListener("resize", _t), L.removeEventListener("scroll", _t);
@@ -35928,7 +35928,7 @@ function fa({
35928
35928
  onChange: e,
35929
35929
  onApply: r
35930
35930
  }) {
35931
- const [o, n] = S(Pn("hex", t)), [s, a] = S(t), c = oe(null), l = (u) => {
35931
+ const [o, n] = S(Pn("hex", t)), [s, a] = S(t), c = re(null), l = (u) => {
35932
35932
  if (a(u), /^#[0-9A-Fa-f]{6}$/i.test(u)) {
35933
35933
  const p = Pn("hex", u);
35934
35934
  n(p);
@@ -35946,9 +35946,9 @@ function fa({
35946
35946
  const p = { ...o.hsv, h: u / 100 * 360 }, g = Pn("hsv", p);
35947
35947
  n(g), a(g.hex);
35948
35948
  };
35949
- return G(() => {
35949
+ return q(() => {
35950
35950
  c.current !== null && e && (e(o.hex, au), a(o.hex));
35951
- }, [o, e]), G(() => {
35951
+ }, [o, e]), q(() => {
35952
35952
  if (t === void 0)
35953
35953
  return;
35954
35954
  const u = Pn("hex", t);
@@ -36022,8 +36022,8 @@ function om({
36022
36022
  onChange: r,
36023
36023
  children: o
36024
36024
  }) {
36025
- const n = oe(null), s = oe(!1), a = oe(r);
36026
- G(() => {
36025
+ const n = re(null), s = re(!1), a = re(r);
36026
+ q(() => {
36027
36027
  a.current = r;
36028
36028
  }, [r]);
36029
36029
  const c = (d) => {
@@ -36222,13 +36222,13 @@ function z7({
36222
36222
  chevronPositionRef: l,
36223
36223
  portalContainer: d
36224
36224
  }) {
36225
- const [h] = Se(), u = oe(null), [p, g] = S(e), [m, y] = S({
36225
+ const [h] = Se(), u = re(null), [p, g] = S(e), [m, y] = S({
36226
36226
  columns: 1,
36227
36227
  rows: 1
36228
36228
  }), [f, v] = S(null), [x, _] = S(!1), [N, k] = S(!1), [w, E] = S(""), [T, M] = S(""), [j, W] = S(""), [$, U] = S(!1), [I, D] = S(!0), [P, R] = S("#bbb"), [H, z] = S("thin");
36229
- G(() => {
36229
+ q(() => {
36230
36230
  g(e);
36231
- }, [e]), G(() => h.registerMutationListener(
36231
+ }, [e]), q(() => h.registerMutationListener(
36232
36232
  gm,
36233
36233
  (B) => {
36234
36234
  B.get(p.getKey()) === "updated" && (h.getEditorState().read(() => {
@@ -36236,11 +36236,11 @@ function z7({
36236
36236
  }), E($7(h) || ""));
36237
36237
  },
36238
36238
  { skipInitialization: !0 }
36239
- ), [h, p]), G(() => {
36239
+ ), [h, p]), q(() => {
36240
36240
  h.getEditorState().read(() => {
36241
36241
  const B = ce();
36242
36242
  try {
36243
- const q = nn(p), K = Et(p).getFirstChild();
36243
+ const G = nn(p), K = Et(p).getFirstChild();
36244
36244
  let Y = !1;
36245
36245
  if (K && $t(K)) {
36246
36246
  const ne = K.getFirstChild();
@@ -36248,21 +36248,21 @@ function z7({
36248
36248
  }
36249
36249
  let Z;
36250
36250
  if (Y) {
36251
- if (q === 0) {
36251
+ if (G === 0) {
36252
36252
  D(!0);
36253
36253
  return;
36254
36254
  }
36255
- Z = q;
36255
+ Z = G;
36256
36256
  } else
36257
- Z = q + 1;
36257
+ Z = G + 1;
36258
36258
  D(Z % 2 === 1);
36259
36259
  } catch {
36260
36260
  D(!0);
36261
36261
  }
36262
36262
  if (Or(B)) {
36263
- const q = Gl(B);
36263
+ const G = Gl(B);
36264
36264
  y(Gl(B)), _(
36265
- q.columns > 1 || q.rows > 1
36265
+ G.columns > 1 || G.rows > 1
36266
36266
  );
36267
36267
  const J = ma(
36268
36268
  B.anchor.getNode()
@@ -36275,9 +36275,9 @@ function z7({
36275
36275
  ze && Ye(ze) && (de = (ze.getHeaderStyles() & bt.COLUMN) === bt.COLUMN);
36276
36276
  }
36277
36277
  const De = B.getNodes().some((ze) => Ye(ze) ? ze.getHeaderStyles() !== 0 : !1);
36278
- if (U(De), q.rows === Y && q.columns < ne)
36278
+ if (U(De), G.rows === Y && G.columns < ne)
36279
36279
  v("column");
36280
- else if (q.columns === ne && q.rows < Y) {
36280
+ else if (G.columns === ne && G.rows < Y) {
36281
36281
  v("row");
36282
36282
  try {
36283
36283
  const ze = nn(J);
@@ -36291,37 +36291,37 @@ function z7({
36291
36291
  v(null), U(!1);
36292
36292
  } else {
36293
36293
  v(null);
36294
- const q = ma(p);
36295
- q && Ye(q) ? U(q.getHeaderStyles() !== 0) : U(!1);
36294
+ const G = ma(p);
36295
+ G && Ye(G) ? U(G.getHeaderStyles() !== 0) : U(!1);
36296
36296
  }
36297
36297
  k(D7());
36298
36298
  });
36299
- }, [h, p]), G(() => {
36300
- const B = o.current, q = u.current, J = h.getRootElement();
36301
- if (q != null && J != null) {
36302
- q.style.opacity = "1";
36303
- const K = q.getBoundingClientRect(), Y = 8, Z = window.innerHeight;
36299
+ }, [h, p]), q(() => {
36300
+ const B = o.current, G = u.current, J = h.getRootElement();
36301
+ if (G != null && J != null) {
36302
+ G.style.opacity = "1";
36303
+ const K = G.getBoundingClientRect(), Y = 8, Z = window.innerHeight;
36304
36304
  if (a) {
36305
36305
  let ne = a.x + Y, de = a.y + Y;
36306
36306
  ne + K.width > window.innerWidth && (ne = a.x - K.width - Y), ne < Y && (ne = Y), de + K.height > window.innerHeight && (de = a.y - K.height - Y), de < Y && (de = Y);
36307
36307
  const be = Z - de - Y;
36308
- be < K.height ? q.style.maxHeight = `${be}px` : q.style.maxHeight = "none", q.style.left = `${ne}px`, q.style.top = `${de}px`;
36308
+ be < K.height ? G.style.maxHeight = `${be}px` : G.style.maxHeight = "none", G.style.left = `${ne}px`, G.style.top = `${de}px`;
36309
36309
  } else if (l.current != null) {
36310
36310
  const ne = l.current;
36311
36311
  let de = ne.right + Y;
36312
- de + K.width > window.innerWidth && (de = ne.left - K.width - Y), de < Y && (de = Y), q.style.left = `${de}px`;
36312
+ de + K.width > window.innerWidth && (de = ne.left - K.width - Y), de < Y && (de = Y), G.style.left = `${de}px`;
36313
36313
  let be = ne.top;
36314
36314
  be + K.height > window.innerHeight && (be = ne.bottom - K.height), be < Y && (be = Y);
36315
36315
  const De = Z - be - Y;
36316
- De < K.height ? q.style.maxHeight = `${De}px` : q.style.maxHeight = "none", q.style.top = `${be}px`;
36316
+ De < K.height ? G.style.maxHeight = `${De}px` : G.style.maxHeight = "none", G.style.top = `${be}px`;
36317
36317
  } else if (B != null) {
36318
36318
  const ne = B.getBoundingClientRect();
36319
36319
  let de = ne.right + Y;
36320
- de + K.width > window.innerWidth && (de = ne.left - K.width - Y), de < Y && (de = Y), q.style.left = `${de}px`;
36320
+ de + K.width > window.innerWidth && (de = ne.left - K.width - Y), de < Y && (de = Y), G.style.left = `${de}px`;
36321
36321
  let be = ne.top;
36322
36322
  be + K.height > window.innerHeight && (be = ne.bottom - K.height), be < Y && (be = Y);
36323
36323
  const De = Z - be - Y;
36324
- De < K.height ? q.style.maxHeight = `${De}px` : q.style.maxHeight = "none", q.style.top = `${be}px`;
36324
+ De < K.height ? G.style.maxHeight = `${De}px` : G.style.maxHeight = "none", G.style.top = `${be}px`;
36325
36325
  }
36326
36326
  }
36327
36327
  }, [
@@ -36330,59 +36330,59 @@ function z7({
36330
36330
  h,
36331
36331
  a,
36332
36332
  l
36333
- ]), G(() => {
36334
- function B(q) {
36335
- if (q.button !== 2) {
36333
+ ]), q(() => {
36334
+ function B(G) {
36335
+ if (G.button !== 2) {
36336
36336
  if (c.current) {
36337
36337
  c.current = !1;
36338
36338
  return;
36339
36339
  }
36340
- u.current != null && o.current != null && ux(q.target) && !u.current.contains(q.target) && !o.current.contains(q.target) && r(!1);
36340
+ u.current != null && o.current != null && ux(G.target) && !u.current.contains(G.target) && !o.current.contains(G.target) && r(!1);
36341
36341
  }
36342
36342
  }
36343
36343
  return window.addEventListener("mousedown", B), () => window.removeEventListener("mousedown", B);
36344
36344
  }, [r, o, c]), V(() => {
36345
36345
  h.update(() => {
36346
36346
  if (p.isAttached()) {
36347
- const q = Et(p), J = Wn(
36348
- q,
36349
- h.getElementByKey(q.getKey())
36347
+ const G = Et(p), J = Wn(
36348
+ G,
36349
+ h.getElementByKey(G.getKey())
36350
36350
  );
36351
36351
  Ui(
36352
36352
  J !== null,
36353
36353
  "TableActionMenu: Expected to find tableElement in DOM"
36354
36354
  );
36355
36355
  const K = ga(J);
36356
- K !== null && K.$clearHighlight(), q.markDirty(), g(p.getLatest());
36356
+ K !== null && K.$clearHighlight(), G.markDirty(), g(p.getLatest());
36357
36357
  }
36358
36358
  ct().selectStart();
36359
36359
  });
36360
36360
  }, [h, p]);
36361
36361
  const Q = V(() => {
36362
36362
  if (p.isAttached()) {
36363
- const q = Et(p), J = Wn(
36364
- q,
36365
- h.getElementByKey(q.getKey())
36363
+ const G = Et(p), J = Wn(
36364
+ G,
36365
+ h.getElementByKey(G.getKey())
36366
36366
  );
36367
36367
  Ui(
36368
36368
  J !== null,
36369
36369
  "TableActionMenu: Expected to find tableElement in DOM"
36370
36370
  );
36371
36371
  const K = ga(J);
36372
- K !== null && K.$clearHighlight(), q.markDirty(), g(p.getLatest());
36372
+ K !== null && K.$clearHighlight(), G.markDirty(), g(p.getLatest());
36373
36373
  }
36374
36374
  ct().selectStart();
36375
36375
  }, [h, p]), le = () => {
36376
36376
  h.update(() => {
36377
36377
  const B = ce();
36378
36378
  if (Or(B)) {
36379
- const { columns: q, rows: J } = Gl(B), K = B.getNodes();
36379
+ const { columns: G, rows: J } = Gl(B), K = B.getNodes();
36380
36380
  let Y = null;
36381
36381
  for (let Z = 0; Z < K.length; Z++) {
36382
36382
  const ne = K[Z];
36383
36383
  if (Ye(ne))
36384
36384
  if (Y === null) {
36385
- ne.setColSpan(q).setRowSpan(J), Y = ne;
36385
+ ne.setColSpan(G).setRowSpan(J), Y = ne;
36386
36386
  const de = cm(ne);
36387
36387
  let be;
36388
36388
  de && xn(be = ne.getFirstChild()) && be.remove();
@@ -36396,15 +36396,15 @@ function z7({
36396
36396
  h.update(() => {
36397
36397
  Jv();
36398
36398
  });
36399
- }, re = V(
36399
+ }, oe = V(
36400
36400
  (B) => {
36401
36401
  h.update(() => {
36402
- const q = ce();
36403
- if (!(he(q) || Or(q))) {
36402
+ const G = ce();
36403
+ if (!(he(G) || Or(G))) {
36404
36404
  t();
36405
36405
  return;
36406
36406
  }
36407
- const [J] = ya(q.anchor), K = Et(J), Y = nn(J);
36407
+ const [J] = ya(G.anchor), K = Et(J), Y = nn(J);
36408
36408
  for (let Z = 0; Z < m.rows; Z++) {
36409
36409
  ym(B);
36410
36410
  const ne = B ? Y + Z + 1 : Y - Z, de = K.getChildren();
@@ -36422,12 +36422,12 @@ function z7({
36422
36422
  ), ie = V(
36423
36423
  (B) => {
36424
36424
  h.update(() => {
36425
- const q = ce();
36426
- if (!(he(q) || Or(q))) {
36425
+ const G = ce();
36426
+ if (!(he(G) || Or(G))) {
36427
36427
  t();
36428
36428
  return;
36429
36429
  }
36430
- const [J] = ya(q.anchor);
36430
+ const [J] = ya(G.anchor);
36431
36431
  if (!Ye(J)) {
36432
36432
  t();
36433
36433
  return;
@@ -36506,7 +36506,7 @@ function z7({
36506
36506
  }, [h, t]), F = V(() => {
36507
36507
  const B = [];
36508
36508
  h.update(() => {
36509
- const q = Et(p), J = nn(p), K = q.getChildren();
36509
+ const G = Et(p), J = nn(p), K = G.getChildren();
36510
36510
  if (J >= K.length || J < 0)
36511
36511
  throw new Error("Expected table cell to be inside of table row.");
36512
36512
  const Y = K[J];
@@ -36520,9 +36520,9 @@ function z7({
36520
36520
  ne.setHeaderStyles(Z, bt.ROW), B.push({ key: ne.getKey(), bgColor: de });
36521
36521
  }), Q(), t();
36522
36522
  }), requestAnimationFrame(() => {
36523
- B.forEach(({ key: q, bgColor: J }) => {
36523
+ B.forEach(({ key: G, bgColor: J }) => {
36524
36524
  if (J) {
36525
- const K = h.getElementByKey(q);
36525
+ const K = h.getElementByKey(G);
36526
36526
  if (K instanceof HTMLElement) {
36527
36527
  const Y = J.replace("#", ""), Z = parseInt(Y.substr(0, 2), 16), ne = parseInt(Y.substr(2, 2), 16), de = parseInt(Y.substr(4, 2), 16), De = (0.299 * Z + 0.587 * ne + 0.114 * de) / 255 > 0.5 ? "#000000" : "#FFFFFF";
36528
36528
  K.style.setProperty("color", De, "important"), K.querySelectorAll("*").forEach((Be) => {
@@ -36535,7 +36535,7 @@ function z7({
36535
36535
  }, [h, p, Q, t]), ee = V(() => {
36536
36536
  const B = [];
36537
36537
  h.update(() => {
36538
- const q = Et(p), J = Zl(p), K = q.getChildren(), Y = Math.max(
36538
+ const G = Et(p), J = Zl(p), K = G.getChildren(), Y = Math.max(
36539
36539
  ...K.map((ne) => ne.getChildren().length)
36540
36540
  );
36541
36541
  if (J >= Y || J < 0)
@@ -36556,9 +36556,9 @@ function z7({
36556
36556
  }
36557
36557
  Q(), t();
36558
36558
  }), requestAnimationFrame(() => {
36559
- B.forEach(({ key: q, bgColor: J }) => {
36559
+ B.forEach(({ key: G, bgColor: J }) => {
36560
36560
  if (J) {
36561
- const K = h.getElementByKey(q);
36561
+ const K = h.getElementByKey(G);
36562
36562
  if (K instanceof HTMLElement) {
36563
36563
  const Y = J.replace("#", ""), Z = parseInt(Y.substr(0, 2), 16), ne = parseInt(Y.substr(2, 2), 16), de = parseInt(Y.substr(4, 2), 16), De = (0.299 * Z + 0.587 * ne + 0.114 * de) / 255 > 0.5 ? "#000000" : "#FFFFFF";
36564
36564
  K.style.setProperty("color", De, "important"), K.querySelectorAll("*").forEach((Be) => {
@@ -36569,20 +36569,20 @@ function z7({
36569
36569
  });
36570
36570
  });
36571
36571
  }, [h, p, Q, t]), X = (B) => {
36572
- const q = B.getParent();
36573
- if ($t(q)) {
36574
- const J = q.getFirstChild();
36572
+ const G = B.getParent();
36573
+ if ($t(G)) {
36574
+ const J = G.getFirstChild();
36575
36575
  Ye(J) && J.selectEnd();
36576
36576
  }
36577
36577
  }, te = V(
36578
36578
  (B) => {
36579
36579
  h.update(() => {
36580
36580
  if (p.isAttached()) {
36581
- const q = Et(p);
36582
- if (q) {
36583
- const J = h.getElementByKey(q.getKey());
36581
+ const G = Et(p);
36582
+ if (G) {
36583
+ const J = h.getElementByKey(G.getKey());
36584
36584
  if (J instanceof HTMLElement) {
36585
- const K = q.getFirstChild();
36585
+ const K = G.getFirstChild();
36586
36586
  let Y = !1;
36587
36587
  if (K && $t(K)) {
36588
36588
  const de = K.getFirstChild();
@@ -36607,11 +36607,11 @@ function z7({
36607
36607
  (B) => {
36608
36608
  h.update(() => {
36609
36609
  if (p.isAttached()) {
36610
- const q = Et(p);
36611
- if (q) {
36612
- const J = h.getElementByKey(q.getKey());
36610
+ const G = Et(p);
36611
+ if (G) {
36612
+ const J = h.getElementByKey(G.getKey());
36613
36613
  if (J instanceof HTMLElement) {
36614
- const K = q.getFirstChild();
36614
+ const K = G.getFirstChild();
36615
36615
  let Y = !1;
36616
36616
  if (K && $t(K)) {
36617
36617
  const de = K.getFirstChild();
@@ -36665,25 +36665,25 @@ function z7({
36665
36665
  },
36666
36666
  [h, p]
36667
36667
  ), Ee = V(
36668
- (B, q) => {
36668
+ (B, G) => {
36669
36669
  const K = {
36670
36670
  none: "0px",
36671
36671
  thin: "1px",
36672
36672
  medium: "2px",
36673
36673
  thick: "3px"
36674
- }[q];
36674
+ }[G];
36675
36675
  h.update(() => {
36676
36676
  if (p.isAttached()) {
36677
36677
  const Y = Et(p), Z = h.getElementByKey(Y.getKey());
36678
- Z instanceof HTMLElement && (Z.style.setProperty("--table-border-color", B), Z.style.setProperty("--table-border-size", K), Z.classList.add("table-custom-border"), q === "none" ? Z.classList.add("table-border-none") : Z.classList.remove("table-border-none"), Z.querySelectorAll("td, th").forEach((de) => {
36679
- de instanceof HTMLElement && (q === "none" ? de.style.setProperty("border", "none", "important") : (de.style.setProperty("border-width", K, "important"), de.style.setProperty("border-color", B, "important"), de.style.setProperty("border-style", "solid", "important")));
36678
+ Z instanceof HTMLElement && (Z.style.setProperty("--table-border-color", B), Z.style.setProperty("--table-border-size", K), Z.classList.add("table-custom-border"), G === "none" ? Z.classList.add("table-border-none") : Z.classList.remove("table-border-none"), Z.querySelectorAll("td, th").forEach((de) => {
36679
+ de instanceof HTMLElement && (G === "none" ? de.style.setProperty("border", "none", "important") : (de.style.setProperty("border-width", K, "important"), de.style.setProperty("border-color", B, "important"), de.style.setProperty("border-style", "solid", "important")));
36680
36680
  }), Z.style.setProperty("border", "none"), Z.style.setProperty("border-collapse", "collapse")), Y.markDirty();
36681
36681
  }
36682
- }), R(B), z(q), r(!1);
36682
+ }), R(B), z(G), r(!1);
36683
36683
  },
36684
36684
  [h, p, r]
36685
36685
  ), we = V(
36686
- (B, q, J = !0) => {
36686
+ (B, G, J = !0) => {
36687
36687
  const K = [];
36688
36688
  h.update(() => {
36689
36689
  if (p.isAttached()) {
@@ -36700,21 +36700,21 @@ function z7({
36700
36700
  const ne = h.getElementByKey(Z);
36701
36701
  ne instanceof HTMLElement && (B && (ne.style.setProperty("text-align", B, "important"), ne.querySelectorAll("p").forEach((be) => {
36702
36702
  be instanceof HTMLElement && be.style.setProperty("text-align", B, "important");
36703
- })), q && ne.style.setProperty("vertical-align", q, "important"));
36703
+ })), G && ne.style.setProperty("vertical-align", G, "important"));
36704
36704
  });
36705
36705
  }), J && r(!1);
36706
36706
  },
36707
36707
  [h, p, r]
36708
36708
  ), ke = V(
36709
- (B, q) => {
36709
+ (B, G) => {
36710
36710
  h.update(() => {
36711
36711
  if (p.isAttached()) {
36712
36712
  const J = Et(p), K = h.getElementByKey(J.getKey());
36713
36713
  K instanceof HTMLElement && (K.querySelectorAll("td, th").forEach((Z) => {
36714
36714
  Z instanceof HTMLElement && (B && (Z.style.setProperty("text-align", B, "important"), Z.querySelectorAll("p").forEach((de) => {
36715
36715
  de instanceof HTMLElement && de.style.setProperty("text-align", B, "important");
36716
- })), q && Z.style.setProperty("vertical-align", q, "important"));
36717
- }), B && K.style.setProperty("--table-default-text-align", B), q && K.style.setProperty("--table-default-vertical-align", q), K.classList.add("table-custom-alignment")), J.markDirty();
36716
+ })), G && Z.style.setProperty("vertical-align", G, "important"));
36717
+ }), B && K.style.setProperty("--table-default-text-align", B), G && K.style.setProperty("--table-default-vertical-align", G), K.classList.add("table-custom-alignment")), J.markDirty();
36718
36718
  }
36719
36719
  }), r(!1);
36720
36720
  },
@@ -36777,12 +36777,12 @@ function z7({
36777
36777
  onClick: (B) => {
36778
36778
  B.stopPropagation(), s(
36779
36779
  "Cell Background Color",
36780
- (q) => /* @__PURE__ */ i(
36780
+ (G) => /* @__PURE__ */ i(
36781
36781
  fa,
36782
36782
  {
36783
36783
  color: w,
36784
36784
  onApply: (J) => {
36785
- Le(J), q(), r(!1);
36785
+ Le(J), G(), r(!1);
36786
36786
  }
36787
36787
  }
36788
36788
  ),
@@ -36801,13 +36801,13 @@ function z7({
36801
36801
  onClick: (B) => {
36802
36802
  B.stopPropagation(), s(
36803
36803
  "Table Border",
36804
- (q) => /* @__PURE__ */ i(
36804
+ (G) => /* @__PURE__ */ i(
36805
36805
  H7,
36806
36806
  {
36807
36807
  currentColor: P,
36808
36808
  currentSize: H,
36809
36809
  onApply: (J, K) => {
36810
- Ee(J, K), q();
36810
+ Ee(J, K), G();
36811
36811
  }
36812
36812
  }
36813
36813
  ),
@@ -36826,7 +36826,7 @@ function z7({
36826
36826
  onClick: (B) => {
36827
36827
  B.stopPropagation(), s(
36828
36828
  "Table Alignment",
36829
- (q) => /* @__PURE__ */ b("div", { className: "cteditor-space-y-4", children: [
36829
+ (G) => /* @__PURE__ */ b("div", { className: "cteditor-space-y-4", children: [
36830
36830
  /* @__PURE__ */ b("div", { children: [
36831
36831
  /* @__PURE__ */ i("label", { className: "cteditor-text-sm cteditor-font-medium cteditor-mb-2 cteditor-block cteditor-text-foreground", children: "Horizontal Alignment" }),
36832
36832
  /* @__PURE__ */ i("div", { className: "cteditor-flex cteditor-gap-2", children: lm.map((J) => /* @__PURE__ */ b(
@@ -36834,7 +36834,7 @@ function z7({
36834
36834
  {
36835
36835
  type: "button",
36836
36836
  onClick: () => {
36837
- ke(J.value, void 0), q();
36837
+ ke(J.value, void 0), G();
36838
36838
  },
36839
36839
  className: "cteditor-flex-1 cteditor-flex cteditor-flex-col cteditor-items-center cteditor-gap-1 cteditor-px-3 cteditor-py-2 cteditor-rounded-md cteditor-border cteditor-border-border cteditor-bg-background cteditor-text-xs cteditor-transition-all hover:cteditor-bg-foreground/5",
36840
36840
  children: [
@@ -36852,7 +36852,7 @@ function z7({
36852
36852
  {
36853
36853
  type: "button",
36854
36854
  onClick: () => {
36855
- ke(void 0, J.value), q();
36855
+ ke(void 0, J.value), G();
36856
36856
  },
36857
36857
  className: "cteditor-flex-1 cteditor-flex cteditor-flex-col cteditor-items-center cteditor-gap-1 cteditor-px-3 cteditor-py-2 cteditor-rounded-md cteditor-border cteditor-border-border cteditor-bg-background cteditor-text-xs cteditor-transition-all hover:cteditor-bg-foreground/5",
36858
36858
  children: [
@@ -36879,7 +36879,7 @@ function z7({
36879
36879
  onClick: (B) => {
36880
36880
  B.stopPropagation(), s(
36881
36881
  "Cell Alignment",
36882
- (q) => /* @__PURE__ */ b("div", { className: "cteditor-space-y-4", children: [
36882
+ (G) => /* @__PURE__ */ b("div", { className: "cteditor-space-y-4", children: [
36883
36883
  /* @__PURE__ */ b("div", { children: [
36884
36884
  /* @__PURE__ */ i("label", { className: "cteditor-text-sm cteditor-font-medium cteditor-mb-2 cteditor-block cteditor-text-foreground", children: "Horizontal Alignment" }),
36885
36885
  /* @__PURE__ */ i("div", { className: "cteditor-flex cteditor-gap-2", children: lm.map((J) => /* @__PURE__ */ b(
@@ -36887,7 +36887,7 @@ function z7({
36887
36887
  {
36888
36888
  type: "button",
36889
36889
  onClick: () => {
36890
- we(J.value, void 0), q();
36890
+ we(J.value, void 0), G();
36891
36891
  },
36892
36892
  className: "cteditor-flex-1 cteditor-flex cteditor-flex-col cteditor-items-center cteditor-gap-1 cteditor-px-3 cteditor-py-2 cteditor-rounded-md cteditor-border cteditor-border-border cteditor-bg-background cteditor-text-xs cteditor-transition-all hover:cteditor-bg-foreground/5",
36893
36893
  children: [
@@ -36905,7 +36905,7 @@ function z7({
36905
36905
  {
36906
36906
  type: "button",
36907
36907
  onClick: () => {
36908
- we(void 0, J.value), q();
36908
+ we(void 0, J.value), G();
36909
36909
  },
36910
36910
  className: "cteditor-flex-1 cteditor-flex cteditor-flex-col cteditor-items-center cteditor-gap-1 cteditor-px-3 cteditor-py-2 cteditor-rounded-md cteditor-border cteditor-border-border cteditor-bg-background cteditor-text-xs cteditor-transition-all hover:cteditor-bg-foreground/5",
36911
36911
  children: [
@@ -36933,12 +36933,12 @@ function z7({
36933
36933
  onClick: (B) => {
36934
36934
  B.stopPropagation(), s(
36935
36935
  "Even Row Striping Color",
36936
- (q) => /* @__PURE__ */ i(
36936
+ (G) => /* @__PURE__ */ i(
36937
36937
  fa,
36938
36938
  {
36939
36939
  color: j,
36940
36940
  onApply: (J) => {
36941
- W(J), se(J), q(), r(!1);
36941
+ W(J), se(J), G(), r(!1);
36942
36942
  }
36943
36943
  }
36944
36944
  ),
@@ -36958,12 +36958,12 @@ function z7({
36958
36958
  onClick: (B) => {
36959
36959
  B.stopPropagation(), s(
36960
36960
  "Odd Row Striping Color",
36961
- (q) => /* @__PURE__ */ i(
36961
+ (G) => /* @__PURE__ */ i(
36962
36962
  fa,
36963
36963
  {
36964
36964
  color: T,
36965
36965
  onApply: (J) => {
36966
- M(J), te(J), q(), r(!1);
36966
+ M(J), te(J), G(), r(!1);
36967
36967
  }
36968
36968
  }
36969
36969
  ),
@@ -36981,7 +36981,7 @@ function z7({
36981
36981
  {
36982
36982
  type: "button",
36983
36983
  className: ge,
36984
- onClick: () => re(!1),
36984
+ onClick: () => oe(!1),
36985
36985
  "data-test-id": "table-insert-row-above",
36986
36986
  children: /* @__PURE__ */ b("span", { className: "text", children: [
36987
36987
  "Insert",
@@ -36997,7 +36997,7 @@ function z7({
36997
36997
  {
36998
36998
  type: "button",
36999
36999
  className: ge,
37000
- onClick: () => re(!0),
37000
+ onClick: () => oe(!0),
37001
37001
  "data-test-id": "table-insert-row-below",
37002
37002
  children: /* @__PURE__ */ b("span", { className: "text", children: [
37003
37003
  "Insert",
@@ -37113,7 +37113,7 @@ function B7({
37113
37113
  anchorElem: t,
37114
37114
  cellMerge: e
37115
37115
  }) {
37116
- const [r] = Se(), o = qo(), n = oe(null), s = oe(null), a = oe(null), [c, l] = S(!1), [d, h] = S(null), u = oe(!1), [p, g] = S(
37116
+ const [r] = Se(), o = qo(), n = re(null), s = re(null), a = re(null), [c, l] = S(!1), [d, h] = S(null), u = re(!1), [p, g] = S(
37117
37117
  null
37118
37118
  ), [m, y] = M7(), f = V(() => {
37119
37119
  const x = n.current, _ = ce(), N = ic(r._window), k = document.activeElement;
@@ -37176,7 +37176,7 @@ function B7({
37176
37176
  x.style.top = `${D}px`, x.style.left = `${P}px`;
37177
37177
  }
37178
37178
  }, [r, t, c]);
37179
- G(() => {
37179
+ q(() => {
37180
37180
  let x;
37181
37181
  const _ = () => {
37182
37182
  x = void 0, r.getEditorState().read(f);
@@ -37239,12 +37239,12 @@ function B7({
37239
37239
  }
37240
37240
  );
37241
37241
  });
37242
- const v = oe(p);
37243
- return G(() => {
37242
+ const v = re(p);
37243
+ return q(() => {
37244
37244
  v.current !== p && (u.current || (l(!1), h(null)), u.current && v.current !== null && setTimeout(() => {
37245
37245
  u.current = !1;
37246
37246
  }, 0)), v.current = p;
37247
- }, [v, p]), G(() => {
37247
+ }, [v, p]), q(() => {
37248
37248
  if (m === null) {
37249
37249
  const x = setTimeout(() => {
37250
37250
  l(!1);
@@ -37315,25 +37315,25 @@ function j7({
37315
37315
  }
37316
37316
  const Kl = 33, Ri = 50, W7 = 80;
37317
37317
  function U7({ editor: t }) {
37318
- const e = oe(null), r = oe(null), o = oe(null), n = oe(null), [s, a] = S(null), [c, l] = S(null), [d, h] = S(!1), [u, p] = S(null), [g, m] = S(null), [y, f] = S(null), [v, x] = S(null), _ = oe(null), N = oe(null), k = V(() => {
37318
+ const e = re(null), r = re(null), o = re(null), n = re(null), [s, a] = S(null), [c, l] = S(null), [d, h] = S(!1), [u, p] = S(null), [g, m] = S(null), [y, f] = S(null), [v, x] = S(null), _ = re(null), N = re(null), k = V(() => {
37319
37319
  l(null), e.current = null, p(null), n.current = null, o.current = null, m(null), f(null), x(null);
37320
37320
  }, []), w = (z) => (z.buttons & 1) === 1;
37321
- G(() => t.registerNodeTransform(du, (z) => {
37321
+ q(() => t.registerNodeTransform(du, (z) => {
37322
37322
  if (z.getColWidths())
37323
37323
  return z;
37324
37324
  const le = z.getColumnCount(), fe = Array(le).fill(W7);
37325
37325
  return z.setColWidths(fe), z;
37326
- }), [t]), G(() => {
37327
- const z = (re) => {
37328
- const ie = re.target;
37326
+ }), [t]), q(() => {
37327
+ const z = (oe) => {
37328
+ const ie = oe.target;
37329
37329
  if (pu(ie)) {
37330
37330
  if (u && n.current && v !== null) {
37331
37331
  const A = {
37332
- x: re.clientX,
37333
- y: re.clientY
37332
+ x: oe.clientX,
37333
+ y: oe.clientY
37334
37334
  };
37335
37335
  a(A);
37336
- const O = Yl(re.target), { x: L, y: F } = n.current;
37336
+ const O = Yl(oe.target), { x: L, y: F } = n.current;
37337
37337
  if (E(u)) {
37338
37338
  const ee = (A.y - F) / O, X = Math.max(v + ee, Kl);
37339
37339
  m(X), N.current?.(X);
@@ -37343,7 +37343,7 @@ function U7({ editor: t }) {
37343
37343
  }
37344
37344
  return;
37345
37345
  }
37346
- if (h(w(re)), !(r.current && r.current.contains(ie)) && e.current !== ie) {
37346
+ if (h(w(oe)), !(r.current && r.current.contains(ie)) && e.current !== ie) {
37347
37347
  e.current = ie;
37348
37348
  const A = Qv(ie);
37349
37349
  A && c !== A ? t.getEditorState().read(
@@ -37363,13 +37363,13 @@ function U7({ editor: t }) {
37363
37363
  ) : A == null && k();
37364
37364
  }
37365
37365
  }
37366
- }, Q = (re) => {
37366
+ }, Q = (oe) => {
37367
37367
  h(!0);
37368
- }, le = (re) => {
37368
+ }, le = (oe) => {
37369
37369
  h(!1), u && (p(null), a(null), m(null));
37370
37370
  }, fe = t.registerRootListener(
37371
- (re, ie) => {
37372
- ie?.removeEventListener("mousemove", z), ie?.removeEventListener("mousedown", Q), ie?.removeEventListener("mouseup", le), re?.addEventListener("mousemove", z), re?.addEventListener("mousedown", Q), re?.addEventListener("mouseup", le);
37371
+ (oe, ie) => {
37372
+ ie?.removeEventListener("mousemove", z), ie?.removeEventListener("mousedown", Q), ie?.removeEventListener("mouseup", le), oe?.addEventListener("mousemove", z), oe?.addEventListener("mousedown", Q), oe?.addEventListener("mouseup", le);
37373
37373
  }
37374
37374
  );
37375
37375
  return () => {
@@ -37383,10 +37383,10 @@ function U7({ editor: t }) {
37383
37383
  const Q = eo(c.elem);
37384
37384
  if (!Ye(Q))
37385
37385
  return;
37386
- const le = Et(Q), fe = nn(Q) + Q.getRowSpan() - 1, re = le.getChildren();
37387
- if (fe >= re.length || fe < 0)
37386
+ const le = Et(Q), fe = nn(Q) + Q.getRowSpan() - 1, oe = le.getChildren();
37387
+ if (fe >= oe.length || fe < 0)
37388
37388
  return;
37389
- const ie = re[fe];
37389
+ const ie = oe[fe];
37390
37390
  $t(ie) && ie.setHeight(Math.max(z, Kl));
37391
37391
  },
37392
37392
  { tag: "skip-scroll-into-view" }
@@ -37394,7 +37394,7 @@ function U7({ editor: t }) {
37394
37394
  },
37395
37395
  [c, t]
37396
37396
  );
37397
- G(() => {
37397
+ q(() => {
37398
37398
  N.current = T;
37399
37399
  }, [T]);
37400
37400
  const M = V(() => {
@@ -37406,8 +37406,8 @@ function U7({ editor: t }) {
37406
37406
  const Q = Et(z), le = nn(z) + z.getRowSpan() - 1, fe = Q.getChildren();
37407
37407
  if (le >= fe.length || le < 0)
37408
37408
  return;
37409
- const re = fe[le];
37410
- $t(re) && re.setHeight(void 0);
37409
+ const oe = fe[le];
37410
+ $t(oe) && oe.setHeight(void 0);
37411
37411
  },
37412
37412
  { tag: "skip-scroll-into-view" }
37413
37413
  );
@@ -37427,15 +37427,15 @@ function U7({ editor: t }) {
37427
37427
  le,
37428
37428
  null,
37429
37429
  null
37430
- ), re = W(Q, fe);
37431
- if (re === void 0)
37430
+ ), oe = W(Q, fe);
37431
+ if (oe === void 0)
37432
37432
  return;
37433
37433
  const ie = le.getColWidths();
37434
37434
  if (!ie || !t.getElementByKey(le.getKey()))
37435
37435
  return;
37436
- const O = c.elem.getBoundingClientRect(), L = Math.max(z, Ri), F = O.width, ee = ie[re], X = L / F, te = ee * X, se = [...ie], Le = te - ee;
37437
- se[re] = te;
37438
- let Ee = re + 1;
37436
+ const O = c.elem.getBoundingClientRect(), L = Math.max(z, Ri), F = O.width, ee = ie[oe], X = L / F, te = ee * X, se = [...ie], Le = te - ee;
37437
+ se[oe] = te;
37438
+ let Ee = oe + 1;
37439
37439
  for (; Ee < ie.length; ) {
37440
37440
  const we = ie[Ee];
37441
37441
  if (we !== void 0 && we > 0) {
@@ -37451,8 +37451,8 @@ function U7({ editor: t }) {
37451
37451
  if (ge) {
37452
37452
  const ve = t.getElementByKey(ge.getKey());
37453
37453
  if (ve) {
37454
- const B = ve.getBoundingClientRect(), q = ke / we;
37455
- if (B.width * q >= Ri) {
37454
+ const B = ve.getBoundingClientRect(), G = ke / we;
37455
+ if (B.width * G >= Ri) {
37456
37456
  se[Ee] = ke;
37457
37457
  break;
37458
37458
  }
@@ -37468,7 +37468,7 @@ function U7({ editor: t }) {
37468
37468
  },
37469
37469
  [c, t]
37470
37470
  );
37471
- G(() => {
37471
+ q(() => {
37472
37472
  _.current = $;
37473
37473
  }, [$]);
37474
37474
  const U = V(() => {
@@ -37480,8 +37480,8 @@ function U7({ editor: t }) {
37480
37480
  const Q = Et(z), [le] = Hh(Q, null, null), fe = W(z, le);
37481
37481
  if (fe === void 0)
37482
37482
  return;
37483
- const re = Q.getColWidths();
37484
- if (!re)
37483
+ const oe = Q.getColWidths();
37484
+ if (!oe)
37485
37485
  return;
37486
37486
  let ie = Ri;
37487
37487
  for (let O = 0; O < le.length; O++) {
@@ -37494,7 +37494,7 @@ function U7({ editor: t }) {
37494
37494
  }
37495
37495
  }
37496
37496
  }
37497
- const A = [...re];
37497
+ const A = [...oe];
37498
37498
  A[fe] = Math.max(ie, Ri), Q.setColWidths(A);
37499
37499
  },
37500
37500
  { tag: "skip-scroll-into-view" }
@@ -37517,9 +37517,9 @@ function U7({ editor: t }) {
37517
37517
  return;
37518
37518
  const fe = Et(le);
37519
37519
  if (E(z)) {
37520
- const re = nn(le) + le.getRowSpan() - 1, ie = fe.getChildren();
37521
- if (re >= 0 && re < ie.length) {
37522
- const A = ie[re];
37520
+ const oe = nn(le) + le.getRowSpan() - 1, ie = fe.getChildren();
37521
+ if (oe >= 0 && oe < ie.length) {
37522
+ const A = ie[oe];
37523
37523
  if ($t(A)) {
37524
37524
  let O = A.getHeight();
37525
37525
  if (O === void 0) {
@@ -37550,7 +37550,7 @@ function U7({ editor: t }) {
37550
37550
  [U, M]
37551
37551
  ), H = V(() => {
37552
37552
  if (c) {
37553
- const { height: z, width: Q, top: le, left: fe } = c.elem.getBoundingClientRect(), re = Yl(c.elem), ie = 10, A = {
37553
+ const { height: z, width: Q, top: le, left: fe } = c.elem.getBoundingClientRect(), oe = Yl(c.elem), ie = 10, A = {
37554
37554
  bottom: {
37555
37555
  backgroundColor: "none",
37556
37556
  cursor: "row-resize",
@@ -37572,7 +37572,7 @@ function U7({ editor: t }) {
37572
37572
  }, O = o.current;
37573
37573
  if (u && s && O && g !== null) {
37574
37574
  if (E(u))
37575
- A[u].left = `${window.pageXOffset + O.left}px`, A[u].top = `${window.pageYOffset + s.y / re}px`, A[u].height = "3px", A[u].width = `${O.width}px`;
37575
+ A[u].left = `${window.pageXOffset + O.left}px`, A[u].top = `${window.pageYOffset + s.y / oe}px`, A[u].height = "3px", A[u].width = `${O.width}px`;
37576
37576
  else {
37577
37577
  const L = window.pageXOffset + fe + g;
37578
37578
  A[u].top = `${window.pageYOffset + O.top}px`, A[u].left = `${L}px`, A[u].width = "3px", A[u].height = `${O.height}px`;
@@ -37645,7 +37645,7 @@ function V7() {
37645
37645
  );
37646
37646
  }
37647
37647
  function q7(t, e, r) {
37648
- const o = oe(null);
37648
+ const o = re(null);
37649
37649
  return o.current = t, zr(
37650
37650
  () => n0(
37651
37651
  (...n) => {
@@ -37661,7 +37661,7 @@ const Ai = 8, Li = 16, go = 12;
37661
37661
  function G7({
37662
37662
  anchorElem: t
37663
37663
  }) {
37664
- const [e] = Se(), r = cc(), [o, n] = S(!1), [s, a] = S([]), [c, l] = S([]), [d, h] = S(null), [u, p] = S(null), [g, m] = S({ row: null, column: null }), [y, f] = S(null), [v, x] = S(null), [_, N] = S(null), [k, w] = S(null), [E, T] = S(null), [M, j] = S(null), [W, $] = S(null), U = oe(/* @__PURE__ */ new Set()), I = oe(null), D = oe(null), P = V((A) => {
37664
+ const [e] = Se(), r = cc(), [o, n] = S(!1), [s, a] = S([]), [c, l] = S([]), [d, h] = S(null), [u, p] = S(null), [g, m] = S({ row: null, column: null }), [y, f] = S(null), [v, x] = S(null), [_, N] = S(null), [k, w] = S(null), [E, T] = S(null), [M, j] = S(null), [W, $] = S(null), U = re(/* @__PURE__ */ new Set()), I = re(null), D = re(null), P = V((A) => {
37665
37665
  const O = A.getBoundingClientRect(), { left: L, top: F, width: ee } = t.getBoundingClientRect(), X = A.querySelectorAll("tr"), te = [], se = [];
37666
37666
  X.forEach((Ee, we) => {
37667
37667
  const ge = Ee.getBoundingClientRect().bottom - F - Ai / 2, ve = O.left - L - 20;
@@ -37687,9 +37687,9 @@ function G7({
37687
37687
  if (X.length > 0) {
37688
37688
  const we = X[0].querySelectorAll("td, th");
37689
37689
  we.forEach((ge, ve) => {
37690
- const q = ge.getBoundingClientRect().right - L - Ai / 2, J = O.top - F - 12;
37691
- q + Li + 16 <= ee + 20 && te.push({
37692
- left: q,
37690
+ const G = ge.getBoundingClientRect().right - L - Ai / 2, J = O.top - F - 12;
37691
+ G + Li + 16 <= ee + 20 && te.push({
37692
+ left: G,
37693
37693
  top: J,
37694
37694
  type: "column",
37695
37695
  index: ve + 1,
@@ -37718,10 +37718,10 @@ function G7({
37718
37718
  isHovered: !1
37719
37719
  });
37720
37720
  }), X.length > 0 && X[0].querySelectorAll("td, th").forEach((ke, ge) => {
37721
- const ve = ke.getBoundingClientRect(), B = ve.left - L + (ve.width - go) / 2, q = O.top - F - go / 2;
37721
+ const ve = ke.getBoundingClientRect(), B = ve.left - L + (ve.width - go) / 2, G = O.top - F - go / 2;
37722
37722
  B + go + 10 <= ee + 20 && se.push({
37723
37723
  left: B,
37724
- top: q,
37724
+ top: G,
37725
37725
  type: "column",
37726
37726
  index: ge,
37727
37727
  isHovered: !1
@@ -38008,19 +38008,19 @@ function G7({
38008
38008
  }), x(null), N(null), w(null), T(null), j(null), $(null), setTimeout(() => {
38009
38009
  I.current && P(I.current);
38010
38010
  }, 50);
38011
- }, re = (A) => {
38011
+ }, oe = (A) => {
38012
38012
  setTimeout(() => {
38013
38013
  x(null), N(null), w(null), T(null), j(null), $(null);
38014
38014
  }, 50);
38015
38015
  }, ie = zr(() => new ResizeObserver(() => {
38016
38016
  I.current && P(I.current);
38017
38017
  }), [P]);
38018
- return G(() => {
38018
+ return q(() => {
38019
38019
  if (o)
38020
38020
  return document.addEventListener("mousemove", R), () => {
38021
38021
  a([]), l([]), h(null), R.cancel(), document.removeEventListener("mousemove", R);
38022
38022
  };
38023
- }, [o, R]), G(() => {
38023
+ }, [o, R]), q(() => {
38024
38024
  if (!y)
38025
38025
  return;
38026
38026
  const A = () => {
@@ -38031,7 +38031,7 @@ function G7({
38031
38031
  return window.addEventListener("scroll", A, { capture: !0, passive: !0 }), window.addEventListener("resize", A), () => {
38032
38032
  window.removeEventListener("scroll", A, { capture: !0 }), window.removeEventListener("resize", A);
38033
38033
  };
38034
- }, [y, P]), G(() => Nr(
38034
+ }, [y, P]), q(() => Nr(
38035
38035
  e.registerUpdateListener(({ editorState: A }) => {
38036
38036
  A.read(() => {
38037
38037
  const O = A._selection;
@@ -38187,7 +38187,7 @@ function G7({
38187
38187
  }
38188
38188
  Q(se, A.type, A.index);
38189
38189
  },
38190
- onDragEnd: re,
38190
+ onDragEnd: oe,
38191
38191
  style: {
38192
38192
  width: "100%",
38193
38193
  height: "100%",
@@ -38440,7 +38440,7 @@ function Z7({
38440
38440
  }
38441
38441
  function Y7() {
38442
38442
  const [t] = Se();
38443
- return G(() => {
38443
+ return q(() => {
38444
38444
  const e = /* @__PURE__ */ new Set(), r = (s) => {
38445
38445
  e.has(s) || t.getEditorState().read(() => {
38446
38446
  const a = ut(s);
@@ -38527,7 +38527,7 @@ const X7 = 2 * 60 * 1e3, J7 = ({
38527
38527
  licenseKey: t,
38528
38528
  syncIntervalMs: e = X7
38529
38529
  }) => {
38530
- const [r] = Se(), o = oe({ characters: 0, words: 0 }), n = oe({ characters: 0, words: 0 }), s = oe(!1), a = V(async () => {
38530
+ const [r] = Se(), o = re({ characters: 0, words: 0 }), n = re({ characters: 0, words: 0 }), s = re(!1), a = V(async () => {
38531
38531
  if (!t || s.current)
38532
38532
  return;
38533
38533
  const { characters: c, words: l } = n.current;
@@ -38546,7 +38546,7 @@ const X7 = 2 * 60 * 1e3, J7 = ({
38546
38546
  }
38547
38547
  }
38548
38548
  }, [t]);
38549
- return G(() => {
38549
+ return q(() => {
38550
38550
  if (!t)
38551
38551
  return;
38552
38552
  const c = r.registerUpdateListener(({ editorState: u }) => {
@@ -38588,7 +38588,7 @@ const X7 = 2 * 60 * 1e3, J7 = ({
38588
38588
  words: 0,
38589
38589
  characters: 0
38590
38590
  });
38591
- return G(() => t.registerUpdateListener(({ editorState: o }) => {
38591
+ return q(() => t.registerUpdateListener(({ editorState: o }) => {
38592
38592
  o.read(() => {
38593
38593
  const s = ct().getTextContent(), a = s.trim().split(/\s+/).filter((l) => l.length > 0).length, c = s.replace(/\s/g, "").length;
38594
38594
  r({ words: a, characters: c });
@@ -38606,7 +38606,7 @@ const X7 = 2 * 60 * 1e3, J7 = ({
38606
38606
  ] }),
38607
38607
  /* @__PURE__ */ b("span", { className: "cteditor-text-[10px] cteditor-text-gray-400", children: [
38608
38608
  "v",
38609
- "1.3.69"
38609
+ "1.3.70"
38610
38610
  ] })
38611
38611
  ] });
38612
38612
  }, Av = "draggable-block-menu";
@@ -38616,7 +38616,7 @@ function eR(t) {
38616
38616
  function tR({
38617
38617
  anchorElem: t = document.body
38618
38618
  }) {
38619
- const e = oe(null), r = oe(null);
38619
+ const e = re(null), r = re(null);
38620
38620
  return /* @__PURE__ */ i(
38621
38621
  Mx,
38622
38622
  {
@@ -38641,8 +38641,8 @@ const rR = ({
38641
38641
  maxHeight: e = 800,
38642
38642
  transitionDuration: r = 200
38643
38643
  } = {}) => {
38644
- const [o, n] = S(t), s = oe(null), a = oe(null);
38645
- return G(() => {
38644
+ const [o, n] = S(t), s = re(null), a = re(null);
38645
+ return q(() => {
38646
38646
  const c = s.current;
38647
38647
  if (!c)
38648
38648
  return;
@@ -38721,11 +38721,17 @@ const rR = ({
38721
38721
  }, sR = ({
38722
38722
  onChange: t
38723
38723
  }) => {
38724
- const [e] = Se();
38725
- return /* @__PURE__ */ i(Vv, { onChange: () => {
38726
- const o = hh(e);
38727
- t && t(o);
38728
- } });
38724
+ const [e] = Se(), r = re(t), o = re(null);
38725
+ r.current = t;
38726
+ const n = V(() => {
38727
+ r.current && (o.current && clearTimeout(o.current), o.current = setTimeout(() => {
38728
+ const s = hh(e);
38729
+ r.current?.(s);
38730
+ }, 300));
38731
+ }, [e]);
38732
+ return q(() => () => {
38733
+ o.current && clearTimeout(o.current);
38734
+ }, []), /* @__PURE__ */ i(Vv, { onChange: n });
38729
38735
  };
38730
38736
  function aR(t) {
38731
38737
  const e = [], r = t.style;
@@ -38835,7 +38841,7 @@ const hR = ({
38835
38841
  initialContent: t
38836
38842
  }) => {
38837
38843
  const [e] = Se(), [r, o] = S(!1);
38838
- return G(() => {
38844
+ return q(() => {
38839
38845
  if (r || !t)
38840
38846
  return;
38841
38847
  o(!0);
@@ -38960,7 +38966,7 @@ const hR = ({
38960
38966
  }, [e, t, r]), null;
38961
38967
  }, pR = () => {
38962
38968
  const [t] = Se();
38963
- return G(() => {
38969
+ return q(() => {
38964
38970
  const e = () => {
38965
38971
  const o = t.getRootElement();
38966
38972
  o && t.getEditorState().read(() => {
@@ -39021,7 +39027,7 @@ const hR = ({
39021
39027
  }), [p, g] = S(null), [m, y] = S(null), [f, v] = S(null), [x, _] = S(!1), [N, k] = S(!1), [w, E] = S(0), T = (j) => {
39022
39028
  j !== null && v(j);
39023
39029
  };
39024
- G(() => {
39030
+ q(() => {
39025
39031
  const j = () => {
39026
39032
  const W = ox && window.matchMedia("(max-width: 1025px)").matches;
39027
39033
  W !== x && _(W);
@@ -39092,7 +39098,7 @@ const hR = ({
39092
39098
  /* @__PURE__ */ i(Z8, { apiKey: a })
39093
39099
  ] }),
39094
39100
  /* @__PURE__ */ i(Q8, {}),
39095
- /* @__PURE__ */ i(y9, {}),
39101
+ /* @__PURE__ */ i(yT, {}),
39096
39102
  /* @__PURE__ */ i(l8, {}),
39097
39103
  t.toolbarOptions.enableCodeFormat !== !1 && /* @__PURE__ */ b(Ce, { children: [
39098
39104
  /* @__PURE__ */ i(p8, {}),
@@ -39114,7 +39120,7 @@ const hR = ({
39114
39120
  /* @__PURE__ */ i(L8, {}),
39115
39121
  /* @__PURE__ */ i(KN, {}),
39116
39122
  /* @__PURE__ */ i(T7, {}),
39117
- t.toolbarOptions.enableFileAttachments !== !1 && /* @__PURE__ */ i(LT, {}),
39123
+ t.toolbarOptions.enableFileAttachments !== !1 && /* @__PURE__ */ i(L9, {}),
39118
39124
  t.toolbarOptions.enableHorizontalLine !== !1 && /* @__PURE__ */ b(Ce, { children: [
39119
39125
  /* @__PURE__ */ i(Wv, {}),
39120
39126
  /* @__PURE__ */ i(UE, {})
@@ -39122,7 +39128,7 @@ const hR = ({
39122
39128
  t.toolbarOptions.enableTodoList !== !1 && /* @__PURE__ */ i($v, {}),
39123
39129
  (t.toolbarOptions.enableImageUpload !== !1 || t.toolbarOptions.enableImageOptions !== !1) && /* @__PURE__ */ i(Aw, {}),
39124
39130
  /* @__PURE__ */ i(t7, { captionsEnabled: !0 }),
39125
- t.toolbarOptions.enableSignature !== !1 && /* @__PURE__ */ i(QT, {}),
39131
+ t.toolbarOptions.enableSignature !== !1 && /* @__PURE__ */ i(Q9, {}),
39126
39132
  t.toolbarOptions.enableTableOptions !== !1 && /* @__PURE__ */ b(Ce, { children: [
39127
39133
  /* @__PURE__ */ i(
39128
39134
  Gv,
@@ -39248,10 +39254,10 @@ const Mi = ({
39248
39254
  className: e = "",
39249
39255
  darkMode: r
39250
39256
  }) => {
39251
- const [o, n] = S(() => r !== void 0 ? r : document.documentElement.classList.contains("dark") || document.body.classList.contains("dark") || window.matchMedia("(prefers-color-scheme: dark)").matches), [s, a] = S(null), c = oe(null);
39252
- return G(() => {
39257
+ const [o, n] = S(() => r !== void 0 ? r : document.documentElement.classList.contains("dark") || document.body.classList.contains("dark") || window.matchMedia("(prefers-color-scheme: dark)").matches), [s, a] = S(null), c = re(null);
39258
+ return q(() => {
39253
39259
  c.current && a(c.current), gR(rd.defaultFontFamilies);
39254
- }, []), G(() => {
39260
+ }, []), q(() => {
39255
39261
  if (r !== void 0) {
39256
39262
  n(r);
39257
39263
  return;
@@ -39347,16 +39353,16 @@ const Mi = ({
39347
39353
  previewStyle: y,
39348
39354
  onPreviewClick: f
39349
39355
  }) => {
39350
- const { isAuthenticated: v, isLoading: x, error: _, editorConfig: N, currentUser: k, verifyKey: w, paymentWarning: E } = Jt(), T = oe(s), M = oe(a), j = oe(!1), W = oe(!1), $ = oe(!1), [U, I] = S(!1), D = Zx({
39356
+ const { isAuthenticated: v, isLoading: x, error: _, editorConfig: N, currentUser: k, verifyKey: w, paymentWarning: E } = Jt(), T = re(s), M = re(a), j = re(!1), W = re(!1), $ = re(!1), [U, I] = S(!1), D = Zx({
39351
39357
  enabled: l,
39352
39358
  onReady: d,
39353
39359
  onFocus: h,
39354
39360
  onBlur: u,
39355
39361
  onHeightChange: p
39356
39362
  });
39357
- G(() => {
39363
+ q(() => {
39358
39364
  T.current = s, M.current = a;
39359
- }, [s, a]), G(() => {
39365
+ }, [s, a]), q(() => {
39360
39366
  if (!t || j.current)
39361
39367
  return;
39362
39368
  j.current = !0, (async () => {
@@ -39370,9 +39376,9 @@ const Mi = ({
39370
39376
  M.current?.(H.message || "Failed to verify API key");
39371
39377
  }
39372
39378
  })();
39373
- }, [t, c, w]), G(() => {
39379
+ }, [t, c, w]), q(() => {
39374
39380
  v && (T.current?.(), D.notifyAuthSuccess()), _ && (M.current?.(_), D.notifyAuthError(_));
39375
- }, [v, _, D]), G(() => {
39381
+ }, [v, _, D]), q(() => {
39376
39382
  console.log("isAuthenticated:", v), v && !W.current && t && (W.current = !0, yR(t)), v && !$.current && ($.current = !0, setTimeout(() => {
39377
39383
  D.notifyReady();
39378
39384
  }, 100));