@qwanyx/stack 0.2.76 → 0.2.77

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.
package/dist/index.esm.js CHANGED
@@ -3630,11 +3630,11 @@ class Hd {
3630
3630
  for (const p of c.messages)
3631
3631
  p.uid && d.set(p.uid, p);
3632
3632
  const f = a.map((p) => {
3633
- var v, C, E, w, b;
3633
+ var _, C, k, w, v;
3634
3634
  const g = d.get(p);
3635
3635
  if (!g) return null;
3636
- const m = ((v = g.flags) == null ? void 0 : v.some((k) => k.includes("Seen"))) || !1, x = ((E = (C = g.envelope) == null ? void 0 : C.from) == null ? void 0 : E.email) || "Unknown", _ = ((w = g.envelope) == null ? void 0 : w.subject) || "(No subject)", y = ((b = g.envelope) == null ? void 0 : b.date) || "";
3637
- return { uid: p, from: x, subject: _, date: y, seen: m };
3636
+ const m = ((_ = g.flags) == null ? void 0 : _.some((E) => E.includes("Seen"))) || !1, x = ((k = (C = g.envelope) == null ? void 0 : C.from) == null ? void 0 : k.email) || "Unknown", b = ((w = g.envelope) == null ? void 0 : w.subject) || "(No subject)", y = ((v = g.envelope) == null ? void 0 : v.date) || "";
3637
+ return { uid: p, from: x, subject: b, date: y, seen: m };
3638
3638
  }).filter(Boolean);
3639
3639
  return {
3640
3640
  account: { id: e, label: "", email: "" },
@@ -3682,7 +3682,7 @@ class Hd {
3682
3682
  * This handles CID embedded images by converting them to base64 data URIs
3683
3683
  */
3684
3684
  async getEmailParsed(e, t, n = "INBOX") {
3685
- var g, m, x, _, y, v;
3685
+ var g, m, x, b, y, _;
3686
3686
  const s = (await this.imapExec(e, [
3687
3687
  `SELECT "${n}"`,
3688
3688
  `UID FETCH ${t} (FLAGS BODY[])`
@@ -3697,15 +3697,15 @@ class Hd {
3697
3697
  const c = /* @__PURE__ */ new Map();
3698
3698
  for (const C of u.attachments || [])
3699
3699
  if (C.contentId) {
3700
- const E = this.contentToBase64(C.content), w = `data:${C.mimeType};base64,${E}`, b = C.contentId.replace(/^<|>$/g, "");
3701
- c.set(b, w), c.set(`<${b}>`, w);
3700
+ const k = this.contentToBase64(C.content), w = `data:${C.mimeType};base64,${k}`, v = C.contentId.replace(/^<|>$/g, "");
3701
+ c.set(v, w), c.set(`<${v}>`, w);
3702
3702
  }
3703
3703
  let d = u.html || "";
3704
- d && c.size > 0 && (d = d.replace(/src=["']cid:([^"']+)["']/gi, (C, E) => {
3705
- const w = c.get(E) || c.get(`<${E}>`);
3704
+ d && c.size > 0 && (d = d.replace(/src=["']cid:([^"']+)["']/gi, (C, k) => {
3705
+ const w = c.get(k) || c.get(`<${k}>`);
3706
3706
  return w ? `src="${w}"` : C;
3707
3707
  }));
3708
- const f = ((_ = o.flags) == null ? void 0 : _.some((C) => C.toLowerCase().includes("seen"))) || !1, p = ((y = u.from) == null ? void 0 : y.address) || ((v = u.from) == null ? void 0 : v.name) || "Unknown";
3708
+ const f = ((b = o.flags) == null ? void 0 : b.some((C) => C.toLowerCase().includes("seen"))) || !1, p = ((y = u.from) == null ? void 0 : y.address) || ((_ = u.from) == null ? void 0 : _.name) || "Unknown";
3709
3709
  return {
3710
3710
  uid: t,
3711
3711
  from: p,
@@ -4423,17 +4423,17 @@ function Kd() {
4423
4423
  var $ = g && S[g] || S[m];
4424
4424
  return typeof $ == "function" ? $ : null;
4425
4425
  }
4426
- var _ = r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
4426
+ var b = r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
4427
4427
  function y(S) {
4428
4428
  {
4429
4429
  for (var $ = arguments.length, te = new Array($ > 1 ? $ - 1 : 0), pe = 1; pe < $; pe++)
4430
4430
  te[pe - 1] = arguments[pe];
4431
- v("error", S, te);
4431
+ _("error", S, te);
4432
4432
  }
4433
4433
  }
4434
- function v(S, $, te) {
4434
+ function _(S, $, te) {
4435
4435
  {
4436
- var pe = _.ReactDebugCurrentFrame, je = pe.getStackAddendum();
4436
+ var pe = b.ReactDebugCurrentFrame, je = pe.getStackAddendum();
4437
4437
  je !== "" && ($ += "%s", te = te.concat([je]));
4438
4438
  var $e = te.map(function(Fe) {
4439
4439
  return String(Fe);
@@ -4441,10 +4441,10 @@ function Kd() {
4441
4441
  $e.unshift("Warning: " + $), Function.prototype.apply.call(console[S], console, $e);
4442
4442
  }
4443
4443
  }
4444
- var C = !1, E = !1, w = !1, b = !1, k = !1, B;
4444
+ var C = !1, k = !1, w = !1, v = !1, E = !1, B;
4445
4445
  B = Symbol.for("react.module.reference");
4446
4446
  function A(S) {
4447
- return !!(typeof S == "string" || typeof S == "function" || S === n || S === s || k || S === i || S === u || S === c || b || S === p || C || E || w || typeof S == "object" && S !== null && (S.$$typeof === f || S.$$typeof === d || S.$$typeof === o || S.$$typeof === l || S.$$typeof === a || // This needs to include all possible module reference object
4447
+ return !!(typeof S == "string" || typeof S == "function" || S === n || S === s || E || S === i || S === u || S === c || v || S === p || C || k || w || typeof S == "object" && S !== null && (S.$$typeof === f || S.$$typeof === d || S.$$typeof === o || S.$$typeof === l || S.$$typeof === a || // This needs to include all possible module reference object
4448
4448
  // types supported by any Flight configuration anywhere since
4449
4449
  // we don't know which Flight build this will end up being used
4450
4450
  // with.
@@ -4567,7 +4567,7 @@ function Kd() {
4567
4567
  N < 0 && y("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
4568
4568
  }
4569
4569
  }
4570
- var fe = _.ReactCurrentDispatcher, ge;
4570
+ var fe = b.ReactCurrentDispatcher, ge;
4571
4571
  function Ne(S, $, te) {
4572
4572
  {
4573
4573
  if (ge === void 0)
@@ -4693,7 +4693,7 @@ function Kd() {
4693
4693
  }
4694
4694
  return "";
4695
4695
  }
4696
- var qe = Object.prototype.hasOwnProperty, ze = {}, He = _.ReactDebugCurrentFrame;
4696
+ var qe = Object.prototype.hasOwnProperty, ze = {}, He = b.ReactDebugCurrentFrame;
4697
4697
  function Y(S) {
4698
4698
  if (S) {
4699
4699
  var $ = S._owner, te = Se(S.type, S._source, $ ? $.type : null);
@@ -4744,7 +4744,7 @@ function Kd() {
4744
4744
  if (le(S))
4745
4745
  return y("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", z(S)), ye(S);
4746
4746
  }
4747
- var Ge = _.ReactCurrentOwner, vt = {
4747
+ var Ge = b.ReactCurrentOwner, vt = {
4748
4748
  key: !0,
4749
4749
  ref: !0,
4750
4750
  __self: !0,
@@ -4838,7 +4838,7 @@ function Kd() {
4838
4838
  return ee(S, Me, yt, je, pe, Ge.current, Fe);
4839
4839
  }
4840
4840
  }
4841
- var ue = _.ReactCurrentOwner, he = _.ReactDebugCurrentFrame;
4841
+ var ue = b.ReactCurrentOwner, he = b.ReactDebugCurrentFrame;
4842
4842
  function G(S) {
4843
4843
  if (S) {
4844
4844
  var $ = S._owner, te = Se(S.type, S._source, $ ? $.type : null);
@@ -5007,26 +5007,26 @@ process.env.NODE_ENV === "production" ? eo.exports = Gd() : eo.exports = Kd();
5007
5007
  var h = eo.exports;
5008
5008
  const fu = su(void 0);
5009
5009
  function by({ apiUrl: r, systemId: e, children: t }) {
5010
- const [n, i] = O(null), [s, o] = O(null), [l, a] = O(!1), [u, c] = O(!0), [d] = O(() => new cu({ apiUrl: r, systemId: e })), f = Q(async (E) => {
5011
- const w = await d.isAdmin(E);
5010
+ const [n, i] = O(null), [s, o] = O(null), [l, a] = O(!1), [u, c] = O(!0), [d] = O(() => new cu({ apiUrl: r, systemId: e })), f = Q(async (k) => {
5011
+ const w = await d.isAdmin(k);
5012
5012
  a(w);
5013
5013
  }, [d]), p = Q(() => {
5014
- const E = Tt.getToken(), w = Tt.getUser();
5015
- E && w ? (o(E), i(w), f(w._id).finally(() => c(!1))) : c(!1);
5014
+ const k = Tt.getToken(), w = Tt.getUser();
5015
+ k && w ? (o(k), i(w), f(w._id).finally(() => c(!1))) : c(!1);
5016
5016
  }, [f]);
5017
5017
  Te(() => {
5018
5018
  p();
5019
5019
  }, [p]);
5020
- const g = Q(async (E, w) => {
5021
- const b = await d.login(E, w);
5022
- return b.success && b.user && b.token && (o(b.token), i(b.user), await f(b.user._id)), b;
5023
- }, [d, f]), m = Q(async (E, w, b) => d.register(E, w, b), [d]), x = Q(async (E, w) => {
5024
- const b = await d.verifyEmail(E, w);
5025
- return b.success && b.user && b.token && (o(b.token), i(b.user), await f(b.user._id)), b;
5026
- }, [d, f]), _ = Q(async (E) => d.requestPasswordReset(E), [d]), y = Q(async (E, w, b) => {
5027
- const k = await d.setPasswordWithCode(E, w, b);
5028
- return k.success && k.user && k.token && (o(k.token), i(k.user), await f(k.user._id)), k;
5029
- }, [d, f]), v = Q(async (E) => d.resendVerificationCode(E), [d]), C = Q(() => {
5020
+ const g = Q(async (k, w) => {
5021
+ const v = await d.login(k, w);
5022
+ return v.success && v.user && v.token && (o(v.token), i(v.user), await f(v.user._id)), v;
5023
+ }, [d, f]), m = Q(async (k, w, v) => d.register(k, w, v), [d]), x = Q(async (k, w) => {
5024
+ const v = await d.verifyEmail(k, w);
5025
+ return v.success && v.user && v.token && (o(v.token), i(v.user), await f(v.user._id)), v;
5026
+ }, [d, f]), b = Q(async (k) => d.requestPasswordReset(k), [d]), y = Q(async (k, w, v) => {
5027
+ const E = await d.setPasswordWithCode(k, w, v);
5028
+ return E.success && E.user && E.token && (o(E.token), i(E.user), await f(E.user._id)), E;
5029
+ }, [d, f]), _ = Q(async (k) => d.resendVerificationCode(k), [d]), C = Q(() => {
5030
5030
  d.logout(), i(null), o(null), a(!1);
5031
5031
  }, [d]);
5032
5032
  return /* @__PURE__ */ h.jsx(fu.Provider, { value: {
@@ -5037,9 +5037,9 @@ function by({ apiUrl: r, systemId: e, children: t }) {
5037
5037
  login: g,
5038
5038
  register: m,
5039
5039
  verifyEmail: x,
5040
- requestPasswordReset: _,
5040
+ requestPasswordReset: b,
5041
5041
  setPasswordWithCode: y,
5042
- resendVerificationCode: v,
5042
+ resendVerificationCode: _,
5043
5043
  logout: C,
5044
5044
  refreshUser: p
5045
5045
  }, children: t });
@@ -5075,15 +5075,15 @@ function hu({
5075
5075
  className: u = "",
5076
5076
  isModal: c = !1
5077
5077
  }) {
5078
- const [d, f] = O(""), [p, g] = O(""), [m, x] = O(""), [_, y] = O(!1), v = { ...Yd, ...a };
5078
+ const [d, f] = O(""), [p, g] = O(""), [m, x] = O(""), [b, y] = O(!1), _ = { ...Yd, ...a };
5079
5079
  async function C(A) {
5080
5080
  A.preventDefault(), y(!0), x("");
5081
5081
  const T = await r(d, p);
5082
5082
  T.success ? e == null || e() : x(T.error || "Connexion impossible"), y(!1);
5083
5083
  }
5084
- const E = {
5085
- backgroundColor: v.backgroundColor,
5086
- borderRadius: v.borderRadius,
5084
+ const k = {
5085
+ backgroundColor: _.backgroundColor,
5086
+ borderRadius: _.borderRadius,
5087
5087
  padding: "1.5rem",
5088
5088
  width: "100%",
5089
5089
  maxWidth: "24rem",
@@ -5093,49 +5093,49 @@ function hu({
5093
5093
  }, w = {
5094
5094
  width: "100%",
5095
5095
  padding: "0.5rem 1rem",
5096
- border: `1px solid ${v.borderColor}`,
5097
- borderRadius: v.borderRadius,
5098
- backgroundColor: v.inputBackground,
5099
- color: v.textColor,
5096
+ border: `1px solid ${_.borderColor}`,
5097
+ borderRadius: _.borderRadius,
5098
+ backgroundColor: _.inputBackground,
5099
+ color: _.textColor,
5100
5100
  fontSize: "1rem",
5101
5101
  outline: "none"
5102
- }, b = {
5102
+ }, v = {
5103
5103
  display: "block",
5104
5104
  fontSize: "0.875rem",
5105
5105
  fontWeight: 500,
5106
- color: v.textMutedColor,
5106
+ color: _.textMutedColor,
5107
5107
  marginBottom: "0.25rem"
5108
- }, k = {
5108
+ }, E = {
5109
5109
  width: "100%",
5110
5110
  padding: "0.75rem",
5111
- backgroundColor: _ ? v.textMutedColor : v.primaryColor,
5111
+ backgroundColor: b ? _.textMutedColor : _.primaryColor,
5112
5112
  color: "#ffffff",
5113
5113
  border: "none",
5114
- borderRadius: v.borderRadius,
5114
+ borderRadius: _.borderRadius,
5115
5115
  fontSize: "1rem",
5116
5116
  fontWeight: 500,
5117
- cursor: _ ? "not-allowed" : "pointer",
5117
+ cursor: b ? "not-allowed" : "pointer",
5118
5118
  transition: "background-color 0.2s"
5119
5119
  }, B = {
5120
5120
  padding: "0.75rem",
5121
- backgroundColor: v.errorBackgroundColor,
5122
- border: `1px solid ${v.errorColor}20`,
5123
- borderRadius: v.borderRadius,
5121
+ backgroundColor: _.errorBackgroundColor,
5122
+ border: `1px solid ${_.errorColor}20`,
5123
+ borderRadius: _.borderRadius,
5124
5124
  marginBottom: "1rem"
5125
5125
  };
5126
- return /* @__PURE__ */ h.jsxs("div", { style: E, className: u, children: [
5126
+ return /* @__PURE__ */ h.jsxs("div", { style: k, className: u, children: [
5127
5127
  t && /* @__PURE__ */ h.jsx("div", { style: { display: "flex", justifyContent: "center", marginBottom: "1.5rem" }, children: t }),
5128
5128
  /* @__PURE__ */ h.jsx("h2", { style: {
5129
5129
  fontSize: "1.25rem",
5130
5130
  fontWeight: 700,
5131
- color: v.textColor,
5131
+ color: _.textColor,
5132
5132
  marginBottom: "1rem",
5133
5133
  textAlign: t ? "center" : "left"
5134
5134
  }, children: n }),
5135
5135
  /* @__PURE__ */ h.jsxs("form", { onSubmit: C, children: [
5136
- m && /* @__PURE__ */ h.jsx("div", { style: B, children: /* @__PURE__ */ h.jsx("p", { style: { fontSize: "0.875rem", color: v.errorColor, margin: 0 }, children: m }) }),
5136
+ m && /* @__PURE__ */ h.jsx("div", { style: B, children: /* @__PURE__ */ h.jsx("p", { style: { fontSize: "0.875rem", color: _.errorColor, margin: 0 }, children: m }) }),
5137
5137
  /* @__PURE__ */ h.jsxs("div", { style: { marginBottom: "1rem" }, children: [
5138
- /* @__PURE__ */ h.jsx("label", { style: b, children: o }),
5138
+ /* @__PURE__ */ h.jsx("label", { style: v, children: o }),
5139
5139
  /* @__PURE__ */ h.jsx(
5140
5140
  "input",
5141
5141
  {
@@ -5145,16 +5145,16 @@ function hu({
5145
5145
  required: !0,
5146
5146
  style: w,
5147
5147
  onFocus: (A) => {
5148
- A.target.style.borderColor = v.primaryColor, A.target.style.boxShadow = `0 0 0 2px ${v.primaryColor}20`;
5148
+ A.target.style.borderColor = _.primaryColor, A.target.style.boxShadow = `0 0 0 2px ${_.primaryColor}20`;
5149
5149
  },
5150
5150
  onBlur: (A) => {
5151
- A.target.style.borderColor = v.borderColor, A.target.style.boxShadow = "none";
5151
+ A.target.style.borderColor = _.borderColor, A.target.style.boxShadow = "none";
5152
5152
  }
5153
5153
  }
5154
5154
  )
5155
5155
  ] }),
5156
5156
  /* @__PURE__ */ h.jsxs("div", { style: { marginBottom: "1.5rem" }, children: [
5157
- /* @__PURE__ */ h.jsx("label", { style: b, children: l }),
5157
+ /* @__PURE__ */ h.jsx("label", { style: v, children: l }),
5158
5158
  /* @__PURE__ */ h.jsx(
5159
5159
  "input",
5160
5160
  {
@@ -5164,10 +5164,10 @@ function hu({
5164
5164
  required: !0,
5165
5165
  style: w,
5166
5166
  onFocus: (A) => {
5167
- A.target.style.borderColor = v.primaryColor, A.target.style.boxShadow = `0 0 0 2px ${v.primaryColor}20`;
5167
+ A.target.style.borderColor = _.primaryColor, A.target.style.boxShadow = `0 0 0 2px ${_.primaryColor}20`;
5168
5168
  },
5169
5169
  onBlur: (A) => {
5170
- A.target.style.borderColor = v.borderColor, A.target.style.boxShadow = "none";
5170
+ A.target.style.borderColor = _.borderColor, A.target.style.boxShadow = "none";
5171
5171
  }
5172
5172
  }
5173
5173
  )
@@ -5176,15 +5176,15 @@ function hu({
5176
5176
  "button",
5177
5177
  {
5178
5178
  type: "submit",
5179
- disabled: _,
5180
- style: k,
5179
+ disabled: b,
5180
+ style: E,
5181
5181
  onMouseEnter: (A) => {
5182
- _ || (A.target.style.backgroundColor = v.primaryHoverColor);
5182
+ b || (A.target.style.backgroundColor = _.primaryHoverColor);
5183
5183
  },
5184
5184
  onMouseLeave: (A) => {
5185
- _ || (A.target.style.backgroundColor = v.primaryColor);
5185
+ b || (A.target.style.backgroundColor = _.primaryColor);
5186
5186
  },
5187
- children: _ ? s : i
5187
+ children: b ? s : i
5188
5188
  }
5189
5189
  )
5190
5190
  ] })
@@ -5290,19 +5290,19 @@ function Xd({
5290
5290
  className: m = "",
5291
5291
  isModal: x = !1
5292
5292
  }) {
5293
- const [_, y] = O(""), [v, C] = O(""), [E, w] = O(""), [b, k] = O(""), [B, A] = O(""), [T, F] = O(""), [R, D] = O(!1), N = { ...Qd, ...g };
5293
+ const [b, y] = O(""), [_, C] = O(""), [k, w] = O(""), [v, E] = O(""), [B, A] = O(""), [T, F] = O(""), [R, D] = O(!1), N = { ...Qd, ...g };
5294
5294
  async function M(W) {
5295
- if (W.preventDefault(), F(""), v !== E) {
5295
+ if (W.preventDefault(), F(""), _ !== k) {
5296
5296
  F("Les mots de passe ne correspondent pas");
5297
5297
  return;
5298
5298
  }
5299
- if (v.length < 8) {
5299
+ if (_.length < 8) {
5300
5300
  F("Le mot de passe doit contenir au moins 8 caractères");
5301
5301
  return;
5302
5302
  }
5303
5303
  D(!0);
5304
- const ce = await r(_, v, p ? { firstName: b, lastName: B } : void 0);
5305
- ce.success ? e == null || e(_) : F(ce.error || "Erreur lors de l'inscription"), D(!1);
5304
+ const ce = await r(b, _, p ? { firstName: v, lastName: B } : void 0);
5305
+ ce.success ? e == null || e(b) : F(ce.error || "Erreur lors de l'inscription"), D(!1);
5306
5306
  }
5307
5307
  const I = {
5308
5308
  backgroundColor: N.backgroundColor,
@@ -5370,8 +5370,8 @@ function Xd({
5370
5370
  "input",
5371
5371
  {
5372
5372
  type: "text",
5373
- value: b,
5374
- onChange: (W) => k(W.target.value),
5373
+ value: v,
5374
+ onChange: (W) => E(W.target.value),
5375
5375
  style: V
5376
5376
  }
5377
5377
  )
@@ -5395,7 +5395,7 @@ function Xd({
5395
5395
  "input",
5396
5396
  {
5397
5397
  type: "email",
5398
- value: _,
5398
+ value: b,
5399
5399
  onChange: (W) => y(W.target.value),
5400
5400
  required: !0,
5401
5401
  style: V
@@ -5408,7 +5408,7 @@ function Xd({
5408
5408
  "input",
5409
5409
  {
5410
5410
  type: "password",
5411
- value: v,
5411
+ value: _,
5412
5412
  onChange: (W) => C(W.target.value),
5413
5413
  required: !0,
5414
5414
  minLength: 8,
@@ -5422,7 +5422,7 @@ function Xd({
5422
5422
  "input",
5423
5423
  {
5424
5424
  type: "password",
5425
- value: E,
5425
+ value: k,
5426
5426
  onChange: (W) => w(W.target.value),
5427
5427
  required: !0,
5428
5428
  style: V
@@ -5479,7 +5479,7 @@ function Sa({
5479
5479
  className: g = "",
5480
5480
  isModal: m = !1
5481
5481
  }) {
5482
- const [x, _] = O(Array(f).fill("")), [y, v] = O(""), [C, E] = O(!1), [w, b] = O(!1), [k, B] = O(!1), A = me([]), T = { ...Jd, ...p };
5482
+ const [x, b] = O(Array(f).fill("")), [y, _] = O(""), [C, k] = O(!1), [w, v] = O(!1), [E, B] = O(!1), A = me([]), T = { ...Jd, ...p };
5483
5483
  Te(() => {
5484
5484
  var q;
5485
5485
  (q = A.current[0]) == null || q.focus();
@@ -5487,7 +5487,7 @@ function Sa({
5487
5487
  const F = (q, J) => {
5488
5488
  var ce;
5489
5489
  const W = J.replace(/\D/g, "").slice(-1), se = [...x];
5490
- if (se[q] = W, _(se), v(""), W && q < f - 1 && ((ce = A.current[q + 1]) == null || ce.focus()), W && q === f - 1) {
5490
+ if (se[q] = W, b(se), _(""), W && q < f - 1 && ((ce = A.current[q + 1]) == null || ce.focus()), W && q === f - 1) {
5491
5491
  const fe = se.join("");
5492
5492
  fe.length === f && N(fe);
5493
5493
  }
@@ -5500,7 +5500,7 @@ function Sa({
5500
5500
  const J = q.clipboardData.getData("text").replace(/\D/g, "").slice(0, f), W = [...x];
5501
5501
  J.split("").forEach((fe, ge) => {
5502
5502
  ge < f && (W[ge] = fe);
5503
- }), _(W);
5503
+ }), b(W);
5504
5504
  const se = Math.min(J.length, f) - 1;
5505
5505
  se >= 0 && ((ce = A.current[se]) == null || ce.focus()), J.length === f && N(J);
5506
5506
  };
@@ -5508,18 +5508,18 @@ function Sa({
5508
5508
  var se;
5509
5509
  const J = q || x.join("");
5510
5510
  if (J.length !== f) {
5511
- v("Veuillez entrer le code complet");
5511
+ _("Veuillez entrer le code complet");
5512
5512
  return;
5513
5513
  }
5514
- E(!0), v("");
5514
+ k(!0), _("");
5515
5515
  const W = await e(r, J);
5516
- W.success ? t == null || t() : (v(W.error || "Code invalide"), _(Array(f).fill("")), (se = A.current[0]) == null || se.focus()), E(!1);
5516
+ W.success ? t == null || t() : (_(W.error || "Code invalide"), b(Array(f).fill("")), (se = A.current[0]) == null || se.focus()), k(!1);
5517
5517
  }
5518
5518
  async function M() {
5519
5519
  if (!n) return;
5520
- b(!0), B(!1), v("");
5520
+ v(!0), B(!1), _("");
5521
5521
  const q = await n(r);
5522
- q.success ? (B(!0), setTimeout(() => B(!1), 3e3)) : v(q.error || "Erreur lors de l'envoi"), b(!1);
5522
+ q.success ? (B(!0), setTimeout(() => B(!1), 3e3)) : _(q.error || "Erreur lors de l'envoi"), v(!1);
5523
5523
  }
5524
5524
  const I = {
5525
5525
  backgroundColor: T.backgroundColor,
@@ -5583,7 +5583,7 @@ function Sa({
5583
5583
  borderRadius: T.borderRadius,
5584
5584
  marginBottom: "1rem"
5585
5585
  }, children: /* @__PURE__ */ h.jsx("p", { style: { fontSize: "0.875rem", color: T.errorColor, margin: 0, textAlign: "center" }, children: y }) }),
5586
- k && /* @__PURE__ */ h.jsx("div", { style: {
5586
+ E && /* @__PURE__ */ h.jsx("div", { style: {
5587
5587
  padding: "0.75rem",
5588
5588
  backgroundColor: "#ECFDF5",
5589
5589
  border: `1px solid ${T.successColor}20`,
@@ -5679,11 +5679,11 @@ function ef({
5679
5679
  className: c = "",
5680
5680
  isModal: d = !1
5681
5681
  }) {
5682
- const [f, p] = O(""), [g, m] = O(""), [x, _] = O(!1), y = { ...Zd, ...u };
5683
- async function v(B) {
5684
- B.preventDefault(), _(!0), m("");
5682
+ const [f, p] = O(""), [g, m] = O(""), [x, b] = O(!1), y = { ...Zd, ...u };
5683
+ async function _(B) {
5684
+ B.preventDefault(), b(!0), m("");
5685
5685
  const A = await r(f);
5686
- A.success ? e == null || e(f) : m(A.error || "Erreur lors de l'envoi"), _(!1);
5686
+ A.success ? e == null || e(f) : m(A.error || "Erreur lors de l'envoi"), b(!1);
5687
5687
  }
5688
5688
  const C = {
5689
5689
  backgroundColor: y.backgroundColor,
@@ -5694,7 +5694,7 @@ function ef({
5694
5694
  ...d && {
5695
5695
  boxShadow: "0 25px 50px -12px rgba(0, 0, 0, 0.25)"
5696
5696
  }
5697
- }, E = {
5697
+ }, k = {
5698
5698
  width: "100%",
5699
5699
  padding: "0.5rem 1rem",
5700
5700
  border: `1px solid ${y.borderColor}`,
@@ -5710,7 +5710,7 @@ function ef({
5710
5710
  fontWeight: 500,
5711
5711
  color: y.textMutedColor,
5712
5712
  marginBottom: "0.25rem"
5713
- }, b = {
5713
+ }, v = {
5714
5714
  width: "100%",
5715
5715
  padding: "0.75rem",
5716
5716
  backgroundColor: x ? y.textMutedColor : y.primaryColor,
@@ -5721,7 +5721,7 @@ function ef({
5721
5721
  fontWeight: 500,
5722
5722
  cursor: x ? "not-allowed" : "pointer",
5723
5723
  transition: "background-color 0.2s"
5724
- }, k = {
5724
+ }, E = {
5725
5725
  color: y.primaryColor,
5726
5726
  textDecoration: "none",
5727
5727
  fontSize: "0.875rem",
@@ -5744,7 +5744,7 @@ function ef({
5744
5744
  textAlign: "center",
5745
5745
  marginBottom: "1.5rem"
5746
5746
  }, children: i }),
5747
- /* @__PURE__ */ h.jsxs("form", { onSubmit: v, children: [
5747
+ /* @__PURE__ */ h.jsxs("form", { onSubmit: _, children: [
5748
5748
  g && /* @__PURE__ */ h.jsx("div", { style: {
5749
5749
  padding: "0.75rem",
5750
5750
  backgroundColor: y.errorBackgroundColor,
@@ -5761,7 +5761,7 @@ function ef({
5761
5761
  value: f,
5762
5762
  onChange: (B) => p(B.target.value),
5763
5763
  required: !0,
5764
- style: E
5764
+ style: k
5765
5765
  }
5766
5766
  )
5767
5767
  ] }),
@@ -5770,7 +5770,7 @@ function ef({
5770
5770
  {
5771
5771
  type: "submit",
5772
5772
  disabled: x,
5773
- style: b,
5773
+ style: v,
5774
5774
  onMouseEnter: (B) => {
5775
5775
  x || (B.target.style.backgroundColor = y.primaryHoverColor);
5776
5776
  },
@@ -5780,7 +5780,7 @@ function ef({
5780
5780
  children: x ? o : s
5781
5781
  }
5782
5782
  ),
5783
- t && /* @__PURE__ */ h.jsx("p", { style: { textAlign: "center", marginTop: "1rem", marginBottom: 0 }, children: /* @__PURE__ */ h.jsx("button", { type: "button", onClick: t, style: k, children: a }) })
5783
+ t && /* @__PURE__ */ h.jsx("p", { style: { textAlign: "center", marginTop: "1rem", marginBottom: 0 }, children: /* @__PURE__ */ h.jsx("button", { type: "button", onClick: t, style: E, children: a }) })
5784
5784
  ] })
5785
5785
  ] });
5786
5786
  }
@@ -5813,9 +5813,9 @@ function rf({
5813
5813
  className: p = "",
5814
5814
  isModal: g = !1
5815
5815
  }) {
5816
- const [m, x] = O(""), [_, y] = O(""), [v, C] = O(""), [E, w] = O(!1), b = { ...tf, ...f };
5817
- async function k(D) {
5818
- if (D.preventDefault(), C(""), m !== _) {
5816
+ const [m, x] = O(""), [b, y] = O(""), [_, C] = O(""), [k, w] = O(!1), v = { ...tf, ...f };
5817
+ async function E(D) {
5818
+ if (D.preventDefault(), C(""), m !== b) {
5819
5819
  C("Les mots de passe ne correspondent pas");
5820
5820
  return;
5821
5821
  }
@@ -5828,8 +5828,8 @@ function rf({
5828
5828
  N.success ? n == null || n() : C(N.error || "Erreur lors de la réinitialisation"), w(!1);
5829
5829
  }
5830
5830
  const B = {
5831
- backgroundColor: b.backgroundColor,
5832
- borderRadius: b.borderRadius,
5831
+ backgroundColor: v.backgroundColor,
5832
+ borderRadius: v.borderRadius,
5833
5833
  padding: "1.5rem",
5834
5834
  width: "100%",
5835
5835
  maxWidth: "24rem",
@@ -5839,10 +5839,10 @@ function rf({
5839
5839
  }, A = {
5840
5840
  width: "100%",
5841
5841
  padding: "0.5rem 1rem",
5842
- border: `1px solid ${b.borderColor}`,
5843
- borderRadius: b.borderRadius,
5844
- backgroundColor: b.inputBackground,
5845
- color: b.textColor,
5842
+ border: `1px solid ${v.borderColor}`,
5843
+ borderRadius: v.borderRadius,
5844
+ backgroundColor: v.inputBackground,
5845
+ color: v.textColor,
5846
5846
  fontSize: "1rem",
5847
5847
  outline: "none",
5848
5848
  boxSizing: "border-box"
@@ -5850,21 +5850,21 @@ function rf({
5850
5850
  display: "block",
5851
5851
  fontSize: "0.875rem",
5852
5852
  fontWeight: 500,
5853
- color: b.textMutedColor,
5853
+ color: v.textMutedColor,
5854
5854
  marginBottom: "0.25rem"
5855
5855
  }, F = {
5856
5856
  width: "100%",
5857
5857
  padding: "0.75rem",
5858
- backgroundColor: E ? b.textMutedColor : b.primaryColor,
5858
+ backgroundColor: k ? v.textMutedColor : v.primaryColor,
5859
5859
  color: "#ffffff",
5860
5860
  border: "none",
5861
- borderRadius: b.borderRadius,
5861
+ borderRadius: v.borderRadius,
5862
5862
  fontSize: "1rem",
5863
5863
  fontWeight: 500,
5864
- cursor: E ? "not-allowed" : "pointer",
5864
+ cursor: k ? "not-allowed" : "pointer",
5865
5865
  transition: "background-color 0.2s"
5866
5866
  }, R = {
5867
- color: b.primaryColor,
5867
+ color: v.primaryColor,
5868
5868
  textDecoration: "none",
5869
5869
  fontSize: "0.875rem",
5870
5870
  cursor: "pointer",
@@ -5876,24 +5876,24 @@ function rf({
5876
5876
  /* @__PURE__ */ h.jsx("h2", { style: {
5877
5877
  fontSize: "1.25rem",
5878
5878
  fontWeight: 700,
5879
- color: b.textColor,
5879
+ color: v.textColor,
5880
5880
  marginBottom: "0.5rem",
5881
5881
  textAlign: "center"
5882
5882
  }, children: s }),
5883
5883
  o && /* @__PURE__ */ h.jsx("p", { style: {
5884
5884
  fontSize: "0.875rem",
5885
- color: b.textMutedColor,
5885
+ color: v.textMutedColor,
5886
5886
  textAlign: "center",
5887
5887
  marginBottom: "1.5rem"
5888
5888
  }, children: o }),
5889
- /* @__PURE__ */ h.jsxs("form", { onSubmit: k, children: [
5890
- v && /* @__PURE__ */ h.jsx("div", { style: {
5889
+ /* @__PURE__ */ h.jsxs("form", { onSubmit: E, children: [
5890
+ _ && /* @__PURE__ */ h.jsx("div", { style: {
5891
5891
  padding: "0.75rem",
5892
- backgroundColor: b.errorBackgroundColor,
5893
- border: `1px solid ${b.errorColor}20`,
5894
- borderRadius: b.borderRadius,
5892
+ backgroundColor: v.errorBackgroundColor,
5893
+ border: `1px solid ${v.errorColor}20`,
5894
+ borderRadius: v.borderRadius,
5895
5895
  marginBottom: "1rem"
5896
- }, children: /* @__PURE__ */ h.jsx("p", { style: { fontSize: "0.875rem", color: b.errorColor, margin: 0 }, children: v }) }),
5896
+ }, children: /* @__PURE__ */ h.jsx("p", { style: { fontSize: "0.875rem", color: v.errorColor, margin: 0 }, children: _ }) }),
5897
5897
  /* @__PURE__ */ h.jsxs("div", { style: { marginBottom: "1rem" }, children: [
5898
5898
  /* @__PURE__ */ h.jsx("label", { style: T, children: u }),
5899
5899
  /* @__PURE__ */ h.jsx(
@@ -5914,7 +5914,7 @@ function rf({
5914
5914
  "input",
5915
5915
  {
5916
5916
  type: "password",
5917
- value: _,
5917
+ value: b,
5918
5918
  onChange: (D) => y(D.target.value),
5919
5919
  required: !0,
5920
5920
  style: A
@@ -5925,15 +5925,15 @@ function rf({
5925
5925
  "button",
5926
5926
  {
5927
5927
  type: "submit",
5928
- disabled: E,
5928
+ disabled: k,
5929
5929
  style: F,
5930
5930
  onMouseEnter: (D) => {
5931
- E || (D.target.style.backgroundColor = b.primaryHoverColor);
5931
+ k || (D.target.style.backgroundColor = v.primaryHoverColor);
5932
5932
  },
5933
5933
  onMouseLeave: (D) => {
5934
- E || (D.target.style.backgroundColor = b.primaryColor);
5934
+ k || (D.target.style.backgroundColor = v.primaryColor);
5935
5935
  },
5936
- children: E ? a : l
5936
+ children: k ? a : l
5937
5937
  }
5938
5938
  ),
5939
5939
  i && /* @__PURE__ */ h.jsx("p", { style: { textAlign: "center", marginTop: "1rem", marginBottom: 0 }, children: /* @__PURE__ */ h.jsx("button", { type: "button", onClick: i, style: R, children: d }) })
@@ -5956,23 +5956,23 @@ function nf({
5956
5956
  isModal: f = !1,
5957
5957
  labels: p = {}
5958
5958
  }) {
5959
- const [g, m] = O(l), [x, _] = O(""), [y, v] = O("");
5959
+ const [g, m] = O(l), [x, b] = O(""), [y, _] = O("");
5960
5960
  async function C(A, T) {
5961
5961
  const F = await r(A, T);
5962
- return F.requiresVerification ? (_(A), m("verify-email"), { success: !1, error: "Veuillez vérifier votre email" }) : F;
5962
+ return F.requiresVerification ? (b(A), m("verify-email"), { success: !1, error: "Veuillez vérifier votre email" }) : F;
5963
5963
  }
5964
- async function E(A, T, F) {
5964
+ async function k(A, T, F) {
5965
5965
  const R = await e(A, T, F);
5966
- return R.success && R.requiresVerification && (_(A), m("verify-email")), R;
5966
+ return R.success && R.requiresVerification && (b(A), m("verify-email")), R;
5967
5967
  }
5968
5968
  async function w(A) {
5969
5969
  const T = await n(A);
5970
- return T.success && (_(A), m("verify-reset-code")), T;
5970
+ return T.success && (b(A), m("verify-reset-code")), T;
5971
5971
  }
5972
- async function b(A, T) {
5973
- return v(T), m("reset-password"), { success: !0 };
5972
+ async function v(A, T) {
5973
+ return _(T), m("reset-password"), { success: !0 };
5974
5974
  }
5975
- const k = () => {
5975
+ const E = () => {
5976
5976
  switch (g) {
5977
5977
  case "login":
5978
5978
  return /* @__PURE__ */ h.jsx(
@@ -5991,7 +5991,7 @@ function nf({
5991
5991
  return /* @__PURE__ */ h.jsx(
5992
5992
  Xd,
5993
5993
  {
5994
- onRegister: E,
5994
+ onRegister: k,
5995
5995
  onSuccess: () => {
5996
5996
  },
5997
5997
  onLoginClick: () => m("login"),
@@ -6035,7 +6035,7 @@ function nf({
6035
6035
  Sa,
6036
6036
  {
6037
6037
  email: x,
6038
- onVerify: b,
6038
+ onVerify: v,
6039
6039
  onResendCode: s,
6040
6040
  onBackClick: () => m("forgot-password"),
6041
6041
  title: "Code de réinitialisation",
@@ -6088,7 +6088,7 @@ function nf({
6088
6088
  alignItems: "center",
6089
6089
  width: "100%"
6090
6090
  }, children: [
6091
- k(),
6091
+ E(),
6092
6092
  B()
6093
6093
  ] });
6094
6094
  }
@@ -6331,16 +6331,16 @@ function Dy({
6331
6331
  onRefresh: p,
6332
6332
  theme: g = {}
6333
6333
  }) {
6334
- const { data: m, loading: x, error: _, refetch: y } = sf(r, e), [v, C] = O(""), [E, w] = O({}), [b, k] = O(1), B = ot(() => {
6334
+ const { data: m, loading: x, error: b, refetch: y } = sf(r, e), [_, C] = O(""), [k, w] = O({}), [v, E] = O(1), B = ot(() => {
6335
6335
  if (!m) return { data: [], total: 0, totalPages: 0 };
6336
6336
  let D = m;
6337
- return l && v && a.length > 0 && (D = Is.search(D, v, a)), Object.keys(E).length > 0 && (D = Is.filterByFields(D, E)), Is.paginate(D, b, d);
6338
- }, [m, v, E, b, d, l, a]);
6337
+ return l && _ && a.length > 0 && (D = Is.search(D, _, a)), Object.keys(k).length > 0 && (D = Is.filterByFields(D, k)), Is.paginate(D, v, d);
6338
+ }, [m, _, k, v, d, l, a]);
6339
6339
  Te(() => {
6340
- k(1);
6341
- }, [v, E]);
6340
+ E(1);
6341
+ }, [_, k]);
6342
6342
  const A = () => {
6343
- C(""), w({}), k(1), y(), p == null || p();
6343
+ C(""), w({}), E(1), y(), p == null || p();
6344
6344
  }, T = {
6345
6345
  background: g.background || "#ffffff",
6346
6346
  cardBackground: g.cardBackground || "#f9fafb",
@@ -6361,13 +6361,13 @@ function Dy({
6361
6361
  justifyContent: "center",
6362
6362
  padding: "48px",
6363
6363
  color: T.textSecondary
6364
- }, children: "Loading..." }) : _ ? /* @__PURE__ */ h.jsxs("div", { style: {
6364
+ }, children: "Loading..." }) : b ? /* @__PURE__ */ h.jsxs("div", { style: {
6365
6365
  padding: "24px",
6366
6366
  textAlign: "center",
6367
6367
  color: "#ef4444"
6368
6368
  }, children: [
6369
6369
  /* @__PURE__ */ h.jsx("div", { style: { fontWeight: 500, marginBottom: "8px" }, children: "Error" }),
6370
- /* @__PURE__ */ h.jsx("div", { style: { fontSize: "14px" }, children: _.message }),
6370
+ /* @__PURE__ */ h.jsx("div", { style: { fontSize: "14px" }, children: b.message }),
6371
6371
  /* @__PURE__ */ h.jsx(
6372
6372
  "button",
6373
6373
  {
@@ -6427,7 +6427,7 @@ function Dy({
6427
6427
  {
6428
6428
  type: "text",
6429
6429
  placeholder: u,
6430
- value: v,
6430
+ value: _,
6431
6431
  onChange: (D) => C(D.target.value),
6432
6432
  style: {
6433
6433
  width: "100%",
@@ -6479,7 +6479,7 @@ function Dy({
6479
6479
  }, children: [
6480
6480
  /* @__PURE__ */ h.jsxs("div", { style: { fontSize: "13px", color: T.textSecondary }, children: [
6481
6481
  "Page ",
6482
- b,
6482
+ v,
6483
6483
  " of ",
6484
6484
  B.totalPages
6485
6485
  ] }),
@@ -6487,15 +6487,15 @@ function Dy({
6487
6487
  /* @__PURE__ */ h.jsx(
6488
6488
  "button",
6489
6489
  {
6490
- onClick: () => k((D) => Math.max(1, D - 1)),
6491
- disabled: b === 1,
6490
+ onClick: () => E((D) => Math.max(1, D - 1)),
6491
+ disabled: v === 1,
6492
6492
  style: {
6493
6493
  padding: "6px 12px",
6494
6494
  border: `1px solid ${T.border}`,
6495
6495
  borderRadius: "6px",
6496
6496
  background: "white",
6497
- cursor: b === 1 ? "not-allowed" : "pointer",
6498
- opacity: b === 1 ? 0.5 : 1
6497
+ cursor: v === 1 ? "not-allowed" : "pointer",
6498
+ opacity: v === 1 ? 0.5 : 1
6499
6499
  },
6500
6500
  children: "Previous"
6501
6501
  }
@@ -6503,15 +6503,15 @@ function Dy({
6503
6503
  /* @__PURE__ */ h.jsx(
6504
6504
  "button",
6505
6505
  {
6506
- onClick: () => k((D) => Math.min(B.totalPages, D + 1)),
6507
- disabled: b === B.totalPages,
6506
+ onClick: () => E((D) => Math.min(B.totalPages, D + 1)),
6507
+ disabled: v === B.totalPages,
6508
6508
  style: {
6509
6509
  padding: "6px 12px",
6510
6510
  border: `1px solid ${T.border}`,
6511
6511
  borderRadius: "6px",
6512
6512
  background: "white",
6513
- cursor: b === B.totalPages ? "not-allowed" : "pointer",
6514
- opacity: b === B.totalPages ? 0.5 : 1
6513
+ cursor: v === B.totalPages ? "not-allowed" : "pointer",
6514
+ opacity: v === B.totalPages ? 0.5 : 1
6515
6515
  },
6516
6516
  children: "Next"
6517
6517
  }
@@ -6622,33 +6622,33 @@ function Sy({
6622
6622
  cardSize: s = "medium",
6623
6623
  className: o = ""
6624
6624
  }) {
6625
- const l = Math.min(Math.max(e, 1), 5), [a, u] = O([]), [c, d] = O([]), [f, p] = O(Array(l).fill(!1)), [g, m] = O(Array(l).fill(!1)), x = me([]), _ = Q((w) => {
6626
- const b = r.filter((B) => !w.includes(B._id));
6627
- if (b.length === 0) return null;
6628
- const k = Math.floor(Math.random() * b.length);
6629
- return b[k];
6625
+ const l = Math.min(Math.max(e, 1), 5), [a, u] = O([]), [c, d] = O([]), [f, p] = O(Array(l).fill(!1)), [g, m] = O(Array(l).fill(!1)), x = me([]), b = Q((w) => {
6626
+ const v = r.filter((B) => !w.includes(B._id));
6627
+ if (v.length === 0) return null;
6628
+ const E = Math.floor(Math.random() * v.length);
6629
+ return v[E];
6630
6630
  }, [r]), y = Q(() => Math.random() * (n - t) + t, [t, n]);
6631
6631
  Te(() => {
6632
6632
  if (r.length === 0) {
6633
6633
  u([]), d([]);
6634
6634
  return;
6635
6635
  }
6636
- const w = [], b = [], k = [];
6636
+ const w = [], v = [], E = [];
6637
6637
  for (let B = 0; B < l && B < r.length; B++) {
6638
- const A = _(k);
6639
- A && (w.push(A), k.push(A._id));
6638
+ const A = b(E);
6639
+ A && (w.push(A), E.push(A._id));
6640
6640
  }
6641
6641
  for (let B = 0; B < w.length; B++) {
6642
6642
  const A = [
6643
6643
  w[B]._id,
6644
6644
  ...w.filter((F, R) => R !== B).map((F) => F._id)
6645
- ], T = _(A);
6646
- T ? b.push(T) : b.push(w[B]);
6645
+ ], T = b(A);
6646
+ T ? v.push(T) : v.push(w[B]);
6647
6647
  }
6648
- u(w), d(b);
6649
- }, [r, l, _]);
6650
- const v = Q((w) => {
6651
- const b = y(), k = setTimeout(() => {
6648
+ u(w), d(v);
6649
+ }, [r, l, b]);
6650
+ const _ = Q((w) => {
6651
+ const v = y(), E = setTimeout(() => {
6652
6652
  p((B) => {
6653
6653
  const A = [...B];
6654
6654
  return A[w] = !A[w], A;
@@ -6666,43 +6666,43 @@ function Sy({
6666
6666
  (B ? c[w] : a[w])._id,
6667
6667
  ...a.filter((N, M) => M !== w).map((N) => N._id),
6668
6668
  ...A.filter((N, M) => M !== w).map((N) => N._id)
6669
- ], D = _(R);
6669
+ ], D = b(R);
6670
6670
  return D && (T[w] = D), T;
6671
6671
  }), setTimeout(() => {
6672
- v(w);
6672
+ _(w);
6673
6673
  }, 150);
6674
6674
  }, 200);
6675
6675
  }, 150);
6676
- }, b);
6677
- x.current[w] = k;
6678
- }, [y, _, a, c, g]), C = me(!1);
6676
+ }, v);
6677
+ x.current[w] = E;
6678
+ }, [y, b, a, c, g]), C = me(!1);
6679
6679
  Te(() => {
6680
6680
  if (!(a.length === 0 || r.length <= 1) && !C.current) {
6681
6681
  C.current = !0;
6682
6682
  for (let w = 0; w < a.length; w++)
6683
- v(w);
6683
+ _(w);
6684
6684
  return () => {
6685
6685
  x.current.forEach((w) => clearTimeout(w)), x.current = [], C.current = !1;
6686
6686
  };
6687
6687
  }
6688
6688
  }, [a.length, r.length]);
6689
- const E = (w) => {
6689
+ const k = (w) => {
6690
6690
  i && i(w);
6691
6691
  };
6692
- return r.length === 0 ? /* @__PURE__ */ h.jsx("div", { className: `flex items-center justify-center p-8 ${o}`, children: /* @__PURE__ */ h.jsx("p", { className: "text-gray-500", children: "No nodes available" }) }) : a.length === 0 ? /* @__PURE__ */ h.jsx("div", { className: `flex items-center justify-center p-8 ${o}`, children: /* @__PURE__ */ h.jsx("p", { className: "text-gray-500", children: "Loading..." }) }) : /* @__PURE__ */ h.jsx("div", { className: `flex gap-4 justify-center items-center flex-wrap ${o}`, children: a.map((w, b) => {
6693
- const k = c[b], B = g[b];
6692
+ return r.length === 0 ? /* @__PURE__ */ h.jsx("div", { className: `flex items-center justify-center p-8 ${o}`, children: /* @__PURE__ */ h.jsx("p", { className: "text-gray-500", children: "No nodes available" }) }) : a.length === 0 ? /* @__PURE__ */ h.jsx("div", { className: `flex items-center justify-center p-8 ${o}`, children: /* @__PURE__ */ h.jsx("p", { className: "text-gray-500", children: "Loading..." }) }) : /* @__PURE__ */ h.jsx("div", { className: `flex gap-4 justify-center items-center flex-wrap ${o}`, children: a.map((w, v) => {
6693
+ const E = c[v], B = g[v];
6694
6694
  return /* @__PURE__ */ h.jsx(
6695
6695
  "div",
6696
6696
  {
6697
6697
  className: `relative ${of[s]}`,
6698
6698
  style: { perspective: "1000px" },
6699
- onClick: () => E(B ? k : w),
6699
+ onClick: () => k(B ? E : w),
6700
6700
  children: /* @__PURE__ */ h.jsxs(
6701
6701
  "div",
6702
6702
  {
6703
6703
  className: "w-full h-full rounded-lg shadow-lg overflow-hidden cursor-pointer hover:shadow-xl",
6704
6704
  style: {
6705
- transform: `rotateY(${f[b] ? 180 : 0}deg)`,
6705
+ transform: `rotateY(${f[v] ? 180 : 0}deg)`,
6706
6706
  transition: "transform 0.5s",
6707
6707
  transformStyle: "preserve-3d"
6708
6708
  },
@@ -6718,7 +6718,7 @@ function Sy({
6718
6718
  "div",
6719
6719
  {
6720
6720
  style: {
6721
- transform: f[b] ? "scaleX(-1)" : "scaleX(1)",
6721
+ transform: f[v] ? "scaleX(-1)" : "scaleX(1)",
6722
6722
  width: "100%",
6723
6723
  height: "100%"
6724
6724
  },
@@ -6737,7 +6737,7 @@ function Sy({
6737
6737
  )
6738
6738
  }
6739
6739
  ),
6740
- k && /* @__PURE__ */ h.jsx(
6740
+ E && /* @__PURE__ */ h.jsx(
6741
6741
  "div",
6742
6742
  {
6743
6743
  className: "absolute inset-0 transition-opacity duration-200",
@@ -6748,7 +6748,7 @@ function Sy({
6748
6748
  "div",
6749
6749
  {
6750
6750
  style: {
6751
- transform: f[b] ? "scaleX(-1)" : "scaleX(1)",
6751
+ transform: f[v] ? "scaleX(-1)" : "scaleX(1)",
6752
6752
  width: "100%",
6753
6753
  height: "100%"
6754
6754
  },
@@ -6756,12 +6756,12 @@ function Sy({
6756
6756
  /* @__PURE__ */ h.jsx(
6757
6757
  "img",
6758
6758
  {
6759
- src: k.data.image,
6760
- alt: k.title,
6759
+ src: E.data.image,
6760
+ alt: E.title,
6761
6761
  className: "w-full h-full object-cover"
6762
6762
  }
6763
6763
  ),
6764
- /* @__PURE__ */ h.jsx("div", { className: "absolute bottom-0 left-0 right-0 bg-gradient-to-t from-black/70 to-transparent p-2", children: /* @__PURE__ */ h.jsx("p", { className: "text-white text-sm font-medium truncate", children: k.title }) })
6764
+ /* @__PURE__ */ h.jsx("div", { className: "absolute bottom-0 left-0 right-0 bg-gradient-to-t from-black/70 to-transparent p-2", children: /* @__PURE__ */ h.jsx("p", { className: "text-white text-sm font-medium truncate", children: E.title }) })
6765
6765
  ]
6766
6766
  }
6767
6767
  )
@@ -6771,7 +6771,7 @@ function Sy({
6771
6771
  }
6772
6772
  )
6773
6773
  },
6774
- `slot-${b}`
6774
+ `slot-${v}`
6775
6775
  );
6776
6776
  }) });
6777
6777
  }
@@ -6825,22 +6825,22 @@ function Ay({
6825
6825
  onDelete: g,
6826
6826
  onError: m,
6827
6827
  onLoad: x,
6828
- renderItem: _,
6828
+ renderItem: b,
6829
6829
  renderDetail: y,
6830
- renderActions: v,
6830
+ renderActions: _,
6831
6831
  renderEmpty: C,
6832
- renderLoading: E,
6832
+ renderLoading: k,
6833
6833
  theme: w = {}
6834
6834
  }) {
6835
- const b = { ...af, ...w }, [k, B] = O([]), [A, T] = O(!1), [F, R] = O(null), [D, N] = O(/* @__PURE__ */ new Set()), [M, I] = O(null), [V, U] = O(null), [re, q] = O(null), [J, W] = O(!1), [se, ce] = O(""), fe = a !== void 0 ? a : se, ge = (oe) => {
6835
+ const v = { ...af, ...w }, [E, B] = O([]), [A, T] = O(!1), [F, R] = O(null), [D, N] = O(/* @__PURE__ */ new Set()), [M, I] = O(null), [V, U] = O(null), [re, q] = O(null), [J, W] = O(!1), [se, ce] = O(""), fe = a !== void 0 ? a : se, ge = (oe) => {
6836
6836
  u ? u(oe) : ce(oe);
6837
6837
  }, Ne = ot(() => {
6838
- if (!fe.trim()) return k;
6838
+ if (!fe.trim()) return E;
6839
6839
  const oe = fe.toLowerCase();
6840
- return k.filter(
6840
+ return E.filter(
6841
6841
  (de) => Vr(de.from).toLowerCase().includes(oe) || Vr(de.subject).toLowerCase().includes(oe)
6842
6842
  );
6843
- }, [k, fe]), _e = ot(() => e ? new Hd({ baseUrl: r, system_id: e }) : null, [r, e]), Z = Q(async () => {
6843
+ }, [E, fe]), _e = ot(() => e ? new Hd({ baseUrl: r, system_id: e }) : null, [r, e]), Z = Q(async () => {
6844
6844
  if (_e) {
6845
6845
  T(!0), R(null);
6846
6846
  try {
@@ -6876,7 +6876,7 @@ function Ay({
6876
6876
  }
6877
6877
  const tt = oe.uid;
6878
6878
  if (Ye.shiftKey && M !== null) {
6879
- const rt = Math.min(M, de), Lt = Math.max(M, de), ee = k.slice(rt, Lt + 1).map((ue) => ue.uid), j = new Set(ee);
6879
+ const rt = Math.min(M, de), Lt = Math.max(M, de), ee = E.slice(rt, Lt + 1).map((ue) => ue.uid), j = new Set(ee);
6880
6880
  N(j), p == null || p(Array.from(j));
6881
6881
  } else if (Ye.ctrlKey || Ye.metaKey)
6882
6882
  N((rt) => {
@@ -6887,7 +6887,7 @@ function Ay({
6887
6887
  const rt = /* @__PURE__ */ new Set([tt]);
6888
6888
  N(rt), I(de), p == null || p(Array.from(rt));
6889
6889
  }
6890
- }, [s, M, k, D, f, p, o]), ke = Q(async () => {
6890
+ }, [s, M, E, D, f, p, o]), ke = Q(async () => {
6891
6891
  if (!_e || D.size === 0) return;
6892
6892
  const oe = i || "INBOX";
6893
6893
  try {
@@ -6918,13 +6918,13 @@ function Ay({
6918
6918
  console.error("Archive error:", Ye), R(Ye.message), m == null || m(Ye);
6919
6919
  }
6920
6920
  }, [_e, t, D, i, g, m]), qe = Q(() => {
6921
- if (D.size === k.length)
6921
+ if (D.size === E.length)
6922
6922
  N(/* @__PURE__ */ new Set()), p == null || p([]);
6923
6923
  else {
6924
- const oe = new Set(k.map((de) => de.uid));
6924
+ const oe = new Set(E.map((de) => de.uid));
6925
6925
  N(oe), p == null || p(Array.from(oe));
6926
6926
  }
6927
- }, [k, D.size, p]), ze = Q(() => {
6927
+ }, [E, D.size, p]), ze = Q(() => {
6928
6928
  N(/* @__PURE__ */ new Set()), p == null || p([]);
6929
6929
  }, [p]), He = {
6930
6930
  delete: ke,
@@ -6938,8 +6938,8 @@ function Ay({
6938
6938
  return de.toDateString() === Ye.toDateString() ? de.toLocaleTimeString([], { hour: "2-digit", minute: "2-digit" }) : de.toLocaleDateString([], { month: "short", day: "numeric" });
6939
6939
  }, L = (oe, de) => /* @__PURE__ */ h.jsx("div", { style: {
6940
6940
  padding: "12px 16px",
6941
- background: de ? b.selectedBackground : oe.seen ? b.cardBackground : b.unreadBackground,
6942
- borderBottom: `1px solid ${b.border}`,
6941
+ background: de ? v.selectedBackground : oe.seen ? v.cardBackground : v.unreadBackground,
6942
+ borderBottom: `1px solid ${v.border}`,
6943
6943
  cursor: "pointer",
6944
6944
  transition: "background 0.15s ease"
6945
6945
  }, children: /* @__PURE__ */ h.jsxs("div", { style: { display: "flex", justifyContent: "space-between", alignItems: "flex-start", gap: "12px" }, children: [
@@ -6947,7 +6947,7 @@ function Ay({
6947
6947
  /* @__PURE__ */ h.jsx("div", { style: {
6948
6948
  fontSize: "14px",
6949
6949
  fontWeight: oe.seen ? 400 : 600,
6950
- color: b.text,
6950
+ color: v.text,
6951
6951
  whiteSpace: "nowrap",
6952
6952
  overflow: "hidden",
6953
6953
  textOverflow: "ellipsis"
@@ -6955,7 +6955,7 @@ function Ay({
6955
6955
  /* @__PURE__ */ h.jsx("div", { style: {
6956
6956
  fontSize: "14px",
6957
6957
  fontWeight: oe.seen ? 400 : 500,
6958
- color: oe.seen ? b.textSecondary : b.text,
6958
+ color: oe.seen ? v.textSecondary : v.text,
6959
6959
  marginTop: "2px",
6960
6960
  whiteSpace: "nowrap",
6961
6961
  overflow: "hidden",
@@ -6964,31 +6964,31 @@ function Ay({
6964
6964
  ] }),
6965
6965
  /* @__PURE__ */ h.jsx("div", { style: {
6966
6966
  fontSize: "12px",
6967
- color: b.textSecondary,
6967
+ color: v.textSecondary,
6968
6968
  flexShrink: 0
6969
6969
  }, children: Y(oe.date) })
6970
6970
  ] }) }), xe = (oe) => /* @__PURE__ */ h.jsxs("div", { style: { padding: "24px" }, children: [
6971
- /* @__PURE__ */ h.jsx("h2", { style: { margin: "0 0 8px", fontSize: "20px", color: b.text }, children: Vr(oe.subject) || "(No subject)" }),
6972
- /* @__PURE__ */ h.jsxs("div", { style: { fontSize: "14px", color: b.textSecondary, marginBottom: "16px" }, children: [
6971
+ /* @__PURE__ */ h.jsx("h2", { style: { margin: "0 0 8px", fontSize: "20px", color: v.text }, children: Vr(oe.subject) || "(No subject)" }),
6972
+ /* @__PURE__ */ h.jsxs("div", { style: { fontSize: "14px", color: v.textSecondary, marginBottom: "16px" }, children: [
6973
6973
  "From: ",
6974
6974
  Vr(oe.from),
6975
6975
  " • ",
6976
6976
  new Date(oe.date).toLocaleString()
6977
6977
  ] }),
6978
- J ? /* @__PURE__ */ h.jsx("div", { style: { fontSize: "14px", color: b.textSecondary }, children: "Loading..." }) : re ? /* @__PURE__ */ h.jsx(
6978
+ J ? /* @__PURE__ */ h.jsx("div", { style: { fontSize: "14px", color: v.textSecondary }, children: "Loading..." }) : re ? /* @__PURE__ */ h.jsx(
6979
6979
  "div",
6980
6980
  {
6981
- style: { fontSize: "14px", color: b.text },
6981
+ style: { fontSize: "14px", color: v.text },
6982
6982
  dangerouslySetInnerHTML: { __html: re }
6983
6983
  }
6984
- ) : /* @__PURE__ */ h.jsx("div", { style: { fontSize: "14px", color: b.textSecondary }, children: "No content available" })
6984
+ ) : /* @__PURE__ */ h.jsx("div", { style: { fontSize: "14px", color: v.textSecondary }, children: "No content available" })
6985
6985
  ] }), Ke = (oe, de) => /* @__PURE__ */ h.jsxs("div", { style: {
6986
6986
  display: "flex",
6987
6987
  alignItems: "center",
6988
6988
  gap: "8px",
6989
6989
  padding: "8px 16px",
6990
- background: b.cardBackground,
6991
- borderBottom: `1px solid ${b.border}`
6990
+ background: v.cardBackground,
6991
+ borderBottom: `1px solid ${v.border}`
6992
6992
  }, children: [
6993
6993
  /* @__PURE__ */ h.jsx(
6994
6994
  "button",
@@ -6997,17 +6997,17 @@ function Ay({
6997
6997
  style: {
6998
6998
  padding: "6px 12px",
6999
6999
  background: "transparent",
7000
- border: `1px solid ${b.border}`,
7000
+ border: `1px solid ${v.border}`,
7001
7001
  borderRadius: "6px",
7002
7002
  fontSize: "13px",
7003
7003
  cursor: "pointer",
7004
- color: b.text
7004
+ color: v.text
7005
7005
  },
7006
- children: oe.length === k.length ? "Deselect All" : "Select All"
7006
+ children: oe.length === E.length ? "Deselect All" : "Select All"
7007
7007
  }
7008
7008
  ),
7009
7009
  oe.length > 0 && /* @__PURE__ */ h.jsxs(h.Fragment, { children: [
7010
- /* @__PURE__ */ h.jsxs("span", { style: { fontSize: "13px", color: b.textSecondary }, children: [
7010
+ /* @__PURE__ */ h.jsxs("span", { style: { fontSize: "13px", color: v.textSecondary }, children: [
7011
7011
  oe.length,
7012
7012
  " selected"
7013
7013
  ] }),
@@ -7023,10 +7023,10 @@ function Ay({
7023
7023
  width: "32px",
7024
7024
  height: "32px",
7025
7025
  background: "transparent",
7026
- border: `1px solid ${b.border}`,
7026
+ border: `1px solid ${v.border}`,
7027
7027
  borderRadius: "6px",
7028
7028
  cursor: "pointer",
7029
- color: b.textSecondary
7029
+ color: v.textSecondary
7030
7030
  },
7031
7031
  children: /* @__PURE__ */ h.jsx("span", { className: "material-icons", style: { fontSize: "18px" }, children: "archive" })
7032
7032
  }
@@ -7043,10 +7043,10 @@ function Ay({
7043
7043
  width: "32px",
7044
7044
  height: "32px",
7045
7045
  background: "transparent",
7046
- border: `1px solid ${b.border}`,
7046
+ border: `1px solid ${v.border}`,
7047
7047
  borderRadius: "6px",
7048
7048
  cursor: "pointer",
7049
- color: b.textSecondary
7049
+ color: v.textSecondary
7050
7050
  },
7051
7051
  children: /* @__PURE__ */ h.jsx("span", { className: "material-icons", style: { fontSize: "18px" }, children: "delete" })
7052
7052
  }
@@ -7065,10 +7065,10 @@ function Ay({
7065
7065
  width: "32px",
7066
7066
  height: "32px",
7067
7067
  background: "transparent",
7068
- border: `1px solid ${b.border}`,
7068
+ border: `1px solid ${v.border}`,
7069
7069
  borderRadius: "6px",
7070
7070
  cursor: "pointer",
7071
- color: b.textSecondary
7071
+ color: v.textSecondary
7072
7072
  },
7073
7073
  children: /* @__PURE__ */ h.jsx("span", { className: "material-icons", style: { fontSize: "18px" }, children: "refresh" })
7074
7074
  }
@@ -7076,25 +7076,25 @@ function Ay({
7076
7076
  ] }), z = () => /* @__PURE__ */ h.jsx("div", { style: {
7077
7077
  padding: "48px",
7078
7078
  textAlign: "center",
7079
- color: b.textSecondary
7079
+ color: v.textSecondary
7080
7080
  }, children: c }), le = () => /* @__PURE__ */ h.jsx("div", { style: {
7081
7081
  padding: "48px",
7082
7082
  textAlign: "center",
7083
- color: b.textSecondary
7084
- }, children: "Loading..." }), ye = _ || L, be = y || xe, Ge = v || Ke, vt = C || z, wt = E || le;
7085
- return A && k.length === 0 ? /* @__PURE__ */ h.jsx("div", { style: { background: b.background, width: "100%", height: "100%" }, children: wt() }) : /* @__PURE__ */ h.jsxs("div", { style: { display: "flex", background: b.background, width: "100%", height: "100%" }, children: [
7083
+ color: v.textSecondary
7084
+ }, children: "Loading..." }), ye = b || L, be = y || xe, Ge = _ || Ke, vt = C || z, wt = k || le;
7085
+ return A && E.length === 0 ? /* @__PURE__ */ h.jsx("div", { style: { background: v.background, width: "100%", height: "100%" }, children: wt() }) : /* @__PURE__ */ h.jsxs("div", { style: { display: "flex", background: v.background, width: "100%", height: "100%" }, children: [
7086
7086
  /* @__PURE__ */ h.jsxs("div", { style: {
7087
7087
  flex: o && V ? "0 0 50%" : "1",
7088
7088
  display: "flex",
7089
7089
  flexDirection: "column",
7090
- borderRight: o && V ? `1px solid ${b.border}` : "none",
7090
+ borderRight: o && V ? `1px solid ${v.border}` : "none",
7091
7091
  overflow: "hidden"
7092
7092
  }, children: [
7093
7093
  s && Ge(Array.from(D), He),
7094
7094
  l && /* @__PURE__ */ h.jsx("div", { style: {
7095
7095
  padding: "8px 12px",
7096
- borderBottom: `1px solid ${b.border}`,
7097
- background: b.background
7096
+ borderBottom: `1px solid ${v.border}`,
7097
+ background: v.background
7098
7098
  }, children: /* @__PURE__ */ h.jsxs("div", { style: {
7099
7099
  display: "flex",
7100
7100
  alignItems: "center",
@@ -7103,7 +7103,7 @@ function Ay({
7103
7103
  background: "#f5f5f5",
7104
7104
  borderRadius: "6px"
7105
7105
  }, children: [
7106
- /* @__PURE__ */ h.jsxs("svg", { width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: b.textSecondary, strokeWidth: "2", children: [
7106
+ /* @__PURE__ */ h.jsxs("svg", { width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: v.textSecondary, strokeWidth: "2", children: [
7107
7107
  /* @__PURE__ */ h.jsx("circle", { cx: "11", cy: "11", r: "8" }),
7108
7108
  /* @__PURE__ */ h.jsx("path", { d: "M21 21l-4.35-4.35" })
7109
7109
  ] }),
@@ -7120,7 +7120,7 @@ function Ay({
7120
7120
  background: "transparent",
7121
7121
  outline: "none",
7122
7122
  fontSize: "13px",
7123
- color: b.text
7123
+ color: v.text
7124
7124
  }
7125
7125
  }
7126
7126
  ),
@@ -7137,16 +7137,16 @@ function Ay({
7137
7137
  alignItems: "center",
7138
7138
  justifyContent: "center"
7139
7139
  },
7140
- children: /* @__PURE__ */ h.jsx("svg", { width: "14", height: "14", viewBox: "0 0 24 24", fill: "none", stroke: b.textSecondary, strokeWidth: "2", children: /* @__PURE__ */ h.jsx("path", { d: "M18 6L6 18M6 6l12 12" }) })
7140
+ children: /* @__PURE__ */ h.jsx("svg", { width: "14", height: "14", viewBox: "0 0 24 24", fill: "none", stroke: v.textSecondary, strokeWidth: "2", children: /* @__PURE__ */ h.jsx("path", { d: "M18 6L6 18M6 6l12 12" }) })
7141
7141
  }
7142
7142
  )
7143
7143
  ] }) }),
7144
7144
  F && /* @__PURE__ */ h.jsx("div", { style: {
7145
7145
  padding: "12px 16px",
7146
7146
  background: "#fef2f2",
7147
- color: b.danger,
7147
+ color: v.danger,
7148
7148
  fontSize: "14px",
7149
- borderBottom: `1px solid ${b.border}`
7149
+ borderBottom: `1px solid ${v.border}`
7150
7150
  }, children: F }),
7151
7151
  /* @__PURE__ */ h.jsx("div", { style: { flex: 1, overflowY: "auto" }, children: Ne.length === 0 ? vt() : Ne.map((oe, de) => /* @__PURE__ */ h.jsx(
7152
7152
  "div",
@@ -7173,18 +7173,18 @@ function Ty({
7173
7173
  className: a = ""
7174
7174
  }) {
7175
7175
  const [u, c] = O(/* @__PURE__ */ new Set()), [d, f] = O(-1), p = r.filter((C) => u.has(C.id)), g = d >= 0 && d < p.length ? p[d] : null, m = Q((C) => {
7176
- c((E) => {
7177
- const w = new Set(E);
7176
+ c((k) => {
7177
+ const w = new Set(k);
7178
7178
  return w.has(C) ? w.delete(C) : w.add(C), t == null || t(Array.from(w)), w;
7179
7179
  });
7180
7180
  }, [t]), x = Q(() => {
7181
7181
  if (u.size === r.length)
7182
7182
  c(/* @__PURE__ */ new Set()), f(-1), t == null || t([]);
7183
7183
  else {
7184
- const C = new Set(r.map((E) => E.id));
7185
- c(C), r.length > 0 && (f(0), n == null || n(r[0], 0)), t == null || t(r.map((E) => E.id));
7184
+ const C = new Set(r.map((k) => k.id));
7185
+ c(C), r.length > 0 && (f(0), n == null || n(r[0], 0)), t == null || t(r.map((k) => k.id));
7186
7186
  }
7187
- }, [r, u.size, t, n]), _ = Q(() => {
7187
+ }, [r, u.size, t, n]), b = Q(() => {
7188
7188
  if (p.length === 0) return;
7189
7189
  const C = d <= 0 ? p.length - 1 : d - 1;
7190
7190
  f(C), n == null || n(p[C], C);
@@ -7192,7 +7192,7 @@ function Ty({
7192
7192
  if (p.length === 0) return;
7193
7193
  const C = d >= p.length - 1 ? 0 : d + 1;
7194
7194
  f(C), n == null || n(p[C], C);
7195
- }, [p, d, n]), v = Q((C) => {
7195
+ }, [p, d, n]), _ = Q((C) => {
7196
7196
  i == null || i(C, p, g);
7197
7197
  }, [i, p, g]);
7198
7198
  return Le.useEffect(() => {
@@ -7221,7 +7221,7 @@ function Ty({
7221
7221
  /* @__PURE__ */ h.jsx(
7222
7222
  "button",
7223
7223
  {
7224
- onClick: _,
7224
+ onClick: b,
7225
7225
  className: "p-1 hover:bg-neutral-100 rounded transition-colors",
7226
7226
  title: "Previous",
7227
7227
  children: /* @__PURE__ */ h.jsx("span", { className: "material-icons text-sm", children: "chevron_left" })
@@ -7244,15 +7244,15 @@ function Ty({
7244
7244
  ] })
7245
7245
  ] }),
7246
7246
  /* @__PURE__ */ h.jsx("div", { className: "space-y-1", children: r.map((C) => {
7247
- const E = u.has(C.id), w = (g == null ? void 0 : g.id) === C.id;
7247
+ const k = u.has(C.id), w = (g == null ? void 0 : g.id) === C.id;
7248
7248
  return /* @__PURE__ */ h.jsxs(
7249
7249
  "div",
7250
7250
  {
7251
- className: `flex items-center gap-2 p-2 rounded-lg cursor-pointer transition-colors ${w ? "bg-blue-50 ring-1 ring-blue-200" : E ? "bg-neutral-100" : "hover:bg-neutral-50"}`,
7251
+ className: `flex items-center gap-2 p-2 rounded-lg cursor-pointer transition-colors ${w ? "bg-blue-50 ring-1 ring-blue-200" : k ? "bg-neutral-100" : "hover:bg-neutral-50"}`,
7252
7252
  onClick: () => m(C.id),
7253
7253
  children: [
7254
- /* @__PURE__ */ h.jsx("span", { className: `material-icons text-lg ${E ? "text-blue-500" : "text-neutral-300"}`, children: E ? "check_box" : "check_box_outline_blank" }),
7255
- /* @__PURE__ */ h.jsx("div", { className: "flex-1 min-w-0", children: e(C, E, w) })
7254
+ /* @__PURE__ */ h.jsx("span", { className: `material-icons text-lg ${k ? "text-blue-500" : "text-neutral-300"}`, children: k ? "check_box" : "check_box_outline_blank" }),
7255
+ /* @__PURE__ */ h.jsx("div", { className: "flex-1 min-w-0", children: e(C, k, w) })
7256
7256
  ]
7257
7257
  },
7258
7258
  C.id
@@ -7260,13 +7260,13 @@ function Ty({
7260
7260
  }) }),
7261
7261
  s.length > 0 && u.size > 0 && /* @__PURE__ */ h.jsx("div", { className: "flex items-center gap-2 pt-2 border-t border-neutral-100", children: s.map((C) => {
7262
7262
  var w;
7263
- const E = ((w = C.disabled) == null ? void 0 : w.call(C, p)) ?? !1;
7263
+ const k = ((w = C.disabled) == null ? void 0 : w.call(C, p)) ?? !1;
7264
7264
  return /* @__PURE__ */ h.jsxs(
7265
7265
  "button",
7266
7266
  {
7267
- onClick: () => v(C.id),
7268
- disabled: E,
7269
- className: `flex items-center gap-1 px-3 py-1.5 text-xs rounded-lg transition-colors ${E ? "bg-neutral-100 text-neutral-400 cursor-not-allowed" : "bg-neutral-100 hover:bg-neutral-200 text-neutral-700"}`,
7267
+ onClick: () => _(C.id),
7268
+ disabled: k,
7269
+ className: `flex items-center gap-1 px-3 py-1.5 text-xs rounded-lg transition-colors ${k ? "bg-neutral-100 text-neutral-400 cursor-not-allowed" : "bg-neutral-100 hover:bg-neutral-200 text-neutral-700"}`,
7270
7270
  children: [
7271
7271
  C.icon && /* @__PURE__ */ h.jsx("span", { className: "material-icons text-sm", children: C.icon }),
7272
7272
  C.label
@@ -7363,29 +7363,29 @@ function Nu(r, e, t) {
7363
7363
  for (let f = 0; f < e.length; f++) {
7364
7364
  const p = e[f], g = p.type, m = p.target, x = Hf(m, r, l, o);
7365
7365
  if (!x) continue;
7366
- const [_, y] = x;
7366
+ const [b, y] = x;
7367
7367
  if (g === "characterData") n && X(y) && Wf(i, m, y) && Uf(m, y, r);
7368
7368
  else if (g === "childList") {
7369
7369
  u = !0;
7370
- const v = p.addedNodes;
7371
- for (let w = 0; w < v.length; w++) {
7372
- const b = v[w], k = Lu(b), B = b.parentNode;
7373
- if (B != null && b !== a && k === null && !Os(b, B, r)) {
7370
+ const _ = p.addedNodes;
7371
+ for (let w = 0; w < _.length; w++) {
7372
+ const v = _[w], E = Lu(v), B = v.parentNode;
7373
+ if (B != null && v !== a && E === null && !Os(v, B, r)) {
7374
7374
  if (vr) {
7375
- const A = b.innerText || b.nodeValue;
7375
+ const A = v.innerText || v.nodeValue;
7376
7376
  A && (c += A);
7377
7377
  }
7378
- B.removeChild(b);
7378
+ B.removeChild(v);
7379
7379
  }
7380
7380
  }
7381
- const C = p.removedNodes, E = C.length;
7382
- if (E > 0) {
7381
+ const C = p.removedNodes, k = C.length;
7382
+ if (k > 0) {
7383
7383
  let w = 0;
7384
- for (let b = 0; b < E; b++) {
7385
- const k = C[b];
7386
- (Os(k, m, r) || a === k) && (m.appendChild(k), w++);
7384
+ for (let v = 0; v < k; v++) {
7385
+ const E = C[v];
7386
+ (Os(E, m, r) || a === E) && (m.appendChild(E), w++);
7387
7387
  }
7388
- E !== w && s.set(_, y);
7388
+ k !== w && s.set(b, y);
7389
7389
  }
7390
7390
  }
7391
7391
  }
@@ -7395,8 +7395,8 @@ function Nu(r, e, t) {
7395
7395
  for (let f = 0; f < d.length; f++) {
7396
7396
  const p = d[f], g = p.addedNodes, m = p.target;
7397
7397
  for (let x = 0; x < g.length; x++) {
7398
- const _ = g[x], y = _.parentNode;
7399
- y == null || _.nodeName !== "BR" || Os(_, m, r) || y.removeChild(_);
7398
+ const b = g[x], y = b.parentNode;
7399
+ y == null || b.nodeName !== "BR" || Os(b, m, r) || y.removeChild(b);
7400
7400
  }
7401
7401
  }
7402
7402
  t.takeRecords();
@@ -8081,12 +8081,12 @@ function oh(r, e, t) {
8081
8081
  const m = co(f), x = Vi(p, null);
8082
8082
  try {
8083
8083
  d.replaceChild(x, m);
8084
- } catch (_) {
8085
- if (typeof _ == "object" && _ != null) {
8086
- const y = `${_.toString()} Parent: ${d.tagName}, new child: {tag: ${x.tagName} key: ${p}}, old child: {tag: ${m.tagName}, key: ${f}}.`;
8084
+ } catch (b) {
8085
+ if (typeof b == "object" && b != null) {
8086
+ const y = `${b.toString()} Parent: ${d.tagName}, new child: {tag: ${x.tagName} key: ${p}}, old child: {tag: ${m.tagName}, key: ${f}}.`;
8087
8087
  throw new Error(y);
8088
8088
  }
8089
- throw _;
8089
+ throw b;
8090
8090
  }
8091
8091
  Hi(f, null);
8092
8092
  }
@@ -8100,29 +8100,29 @@ function oh(r, e, t) {
8100
8100
  const g = l.after == null && l.before == null && l.element.__lexicalLineBreak == null;
8101
8101
  lo(f, 0, u - 1, g ? null : d), g && (d.textContent = "");
8102
8102
  }
8103
- } else (function(g, m, x, _, y, v) {
8104
- const C = _ - 1, E = y - 1;
8105
- let w, b, k = v.getFirstChild(), B = 0, A = 0;
8106
- for (; B <= C && A <= E; ) {
8103
+ } else (function(g, m, x, b, y, _) {
8104
+ const C = b - 1, k = y - 1;
8105
+ let w, v, E = _.getFirstChild(), B = 0, A = 0;
8106
+ for (; B <= C && A <= k; ) {
8107
8107
  const R = m[B], D = x[A];
8108
- if (R === D) k = qs(kn(D, v.element)), B++, A++;
8108
+ if (R === D) E = qs(kn(D, _.element)), B++, A++;
8109
8109
  else {
8110
- w === void 0 && (w = new Set(m)), b === void 0 && (b = new Set(x));
8111
- const M = b.has(R), I = w.has(D);
8110
+ w === void 0 && (w = new Set(m)), v === void 0 && (v = new Set(x));
8111
+ const M = v.has(R), I = w.has(D);
8112
8112
  if (M) if (I) {
8113
8113
  const V = Ui(_t, D);
8114
- V === k ? k = qs(kn(D, v.element)) : (v.withBefore(k).insertChild(V), kn(D, v.element)), B++, A++;
8115
- } else Vi(D, v.withBefore(k)), A++;
8116
- else k = qs(co(R)), Hi(R, v.element), B++;
8114
+ V === E ? E = qs(kn(D, _.element)) : (_.withBefore(E).insertChild(V), kn(D, _.element)), B++, A++;
8115
+ } else Vi(D, _.withBefore(E)), A++;
8116
+ else E = qs(co(R)), Hi(R, _.element), B++;
8117
8117
  }
8118
8118
  const N = Wt.get(D);
8119
8119
  N !== null && X(N) && (Kt === null && (Kt = N.getFormat()), Ot === "" && (Ot = N.getStyle()));
8120
8120
  }
8121
- const T = B > C, F = A > E;
8121
+ const T = B > C, F = A > k;
8122
8122
  if (T && !F) {
8123
- const R = x[E + 1], D = R === void 0 ? null : _t.getElementByKey(R);
8124
- uo(x, g, A, E, v.withBefore(D));
8125
- } else F && !T && lo(m, B, C, v.element);
8123
+ const R = x[k + 1], D = R === void 0 ? null : _t.getElementByKey(R);
8124
+ uo(x, g, A, k, _.withBefore(D));
8125
+ } else F && !T && lo(m, B, C, _.element);
8126
8126
  })(o, f, p, u, c, l);
8127
8127
  }
8128
8128
  ys(o) && (ct += ur), d.__lexicalTextContent = ct, ct = a + ct;
@@ -8363,8 +8363,8 @@ Li && ho.push(["beforeinput", (r, e) => function(t, n) {
8363
8363
  }
8364
8364
  } else {
8365
8365
  ht(null), t.preventDefault();
8366
- const g = o.anchor.getNode(), m = g.getTextContent(), x = g.canInsertTextAfter(), _ = o.anchor.offset === 0 && o.focus.offset === m.length;
8367
- Af && p && !_ && x || ne(n, Br, !0);
8366
+ const g = o.anchor.getNode(), m = g.getTextContent(), x = g.canInsertTextAfter(), b = o.anchor.offset === 0 && o.focus.offset === m.length;
8367
+ Af && p && !b && x || ne(n, Br, !0);
8368
8368
  }
8369
8369
  return;
8370
8370
  }
@@ -8470,21 +8470,21 @@ function Ha(r, e, t) {
8470
8470
  const a = l.anchor, u = a.getNode();
8471
8471
  if (l.isCollapsed()) {
8472
8472
  r.type === "Range" && r.anchorNode === r.focusNode && (l.dirty = !0);
8473
- const c = xs(e).event, d = c ? c.timeStamp : performance.now(), [f, p, g, m, x] = Ju, _ = Xe(), y = e.isComposing() === !1 && _.getTextContent() === "";
8473
+ const c = xs(e).event, d = c ? c.timeStamp : performance.now(), [f, p, g, m, x] = Ju, b = Xe(), y = e.isComposing() === !1 && b.getTextContent() === "";
8474
8474
  if (d < x + 200 && a.offset === g && a.key === m) l.format = f, l.style = p;
8475
8475
  else if (a.type === "text") X(u) || K(141), l.format = u.getFormat(), l.style = u.getStyle();
8476
8476
  else if (a.type === "element" && !y) {
8477
- const v = a.getNode();
8478
- l.style = "", v instanceof fn && v.getChildrenSize() === 0 ? (l.format = v.getTextFormat(), l.style = v.getTextStyle()) : l.format = 0;
8477
+ const _ = a.getNode();
8478
+ l.style = "", _ instanceof fn && _.getChildrenSize() === 0 ? (l.format = _.getTextFormat(), l.style = _.getTextStyle()) : l.format = 0;
8479
8479
  }
8480
8480
  } else {
8481
- const c = a.key, d = l.focus.key, f = l.getNodes(), p = f.length, g = l.isBackward(), m = g ? o : i, x = g ? i : o, _ = g ? d : c, y = g ? c : d;
8482
- let v = Ff, C = !1;
8483
- for (let E = 0; E < p; E++) {
8484
- const w = f[E], b = w.getTextContentSize();
8485
- if (X(w) && b !== 0 && !(E === 0 && w.__key === _ && m === b || E === p - 1 && w.__key === y && x === 0) && (C = !0, v &= w.getFormat(), v === 0)) break;
8481
+ const c = a.key, d = l.focus.key, f = l.getNodes(), p = f.length, g = l.isBackward(), m = g ? o : i, x = g ? i : o, b = g ? d : c, y = g ? c : d;
8482
+ let _ = Ff, C = !1;
8483
+ for (let k = 0; k < p; k++) {
8484
+ const w = f[k], v = w.getTextContentSize();
8485
+ if (X(w) && v !== 0 && !(k === 0 && w.__key === b && m === v || k === p - 1 && w.__key === y && x === 0) && (C = !0, _ &= w.getFormat(), _ === 0)) break;
8486
8486
  }
8487
- l.format = C ? v : 0;
8487
+ l.format = C ? _ : 0;
8488
8488
  }
8489
8489
  }
8490
8490
  ne(e, jo, void 0);
@@ -9176,7 +9176,7 @@ class dn extends _s {
9176
9176
  Et();
9177
9177
  const t = this.getLatest(), n = t.getTextContent(), i = t.__key, s = xr(), o = new Set(e), l = [], a = n.length;
9178
9178
  let u = "";
9179
- for (let E = 0; E < a; E++) u !== "" && o.has(E) && (l.push(u), u = ""), u += n[E];
9179
+ for (let k = 0; k < a; k++) u !== "" && o.has(k) && (l.push(u), u = ""), u += n[k];
9180
9180
  u !== "" && l.push(u);
9181
9181
  const c = l.length;
9182
9182
  if (c === 0) return [];
@@ -9184,29 +9184,29 @@ class dn extends _s {
9184
9184
  const d = l[0], f = t.getParent();
9185
9185
  let p;
9186
9186
  const g = t.getFormat(), m = t.getStyle(), x = t.__detail;
9187
- let _ = !1;
9188
- t.isSegmented() ? (p = ut(d), p.__format = g, p.__style = m, p.__detail = x, _ = !0) : (p = t.getWritable(), p.__text = d);
9189
- const y = ae(), v = [p];
9187
+ let b = !1;
9188
+ t.isSegmented() ? (p = ut(d), p.__format = g, p.__style = m, p.__detail = x, b = !0) : (p = t.getWritable(), p.__text = d);
9189
+ const y = ae(), _ = [p];
9190
9190
  let C = d.length;
9191
- for (let E = 1; E < c; E++) {
9192
- const w = l[E], b = w.length, k = ut(w).getWritable();
9193
- k.__format = g, k.__style = m, k.__detail = x;
9194
- const B = k.__key, A = C + b;
9191
+ for (let k = 1; k < c; k++) {
9192
+ const w = l[k], v = w.length, E = ut(w).getWritable();
9193
+ E.__format = g, E.__style = m, E.__detail = x;
9194
+ const B = E.__key, A = C + v;
9195
9195
  if (H(y)) {
9196
9196
  const T = y.anchor, F = y.focus;
9197
9197
  T.key === i && T.type === "text" && T.offset > C && T.offset <= A && (T.key = B, T.offset -= C, y.dirty = !0), F.key === i && F.type === "text" && F.offset > C && F.offset <= A && (F.key = B, F.offset -= C, y.dirty = !0);
9198
9198
  }
9199
- s === i && ht(B), C = A, v.push(k);
9199
+ s === i && ht(B), C = A, _.push(E);
9200
9200
  }
9201
9201
  if (f !== null) {
9202
- (function(b) {
9203
- const k = b.getPreviousSibling(), B = b.getNextSibling();
9204
- k !== null && qi(k), B !== null && qi(B);
9202
+ (function(v) {
9203
+ const E = v.getPreviousSibling(), B = v.getNextSibling();
9204
+ E !== null && qi(E), B !== null && qi(B);
9205
9205
  })(this);
9206
- const E = f.getWritable(), w = this.getIndexWithinParent();
9207
- _ ? (E.splice(w, 0, v), this.remove()) : E.splice(w, 1, v), H(y) && Yi(y, f, w, c - 1);
9206
+ const k = f.getWritable(), w = this.getIndexWithinParent();
9207
+ b ? (k.splice(w, 0, _), this.remove()) : k.splice(w, 1, _), H(y) && Yi(y, f, w, c - 1);
9208
9208
  }
9209
- return v;
9209
+ return _;
9210
9210
  }
9211
9211
  mergeWithSibling(e) {
9212
9212
  const t = e === this.getPreviousSibling();
@@ -9580,9 +9580,9 @@ class Dr {
9580
9580
  insertText(e) {
9581
9581
  const t = this.anchor, n = this.focus, i = this.format, s = this.style;
9582
9582
  let o = t, l = n;
9583
- !this.isCollapsed() && n.isBefore(t) && (o = n, l = t), o.type === "element" && function(x, _, y, v) {
9584
- const C = x.getNode(), E = C.getChildAtIndex(x.offset), w = ut(), b = bt(C) ? at().append(w) : w;
9585
- w.setFormat(y), w.setStyle(v), E === null ? C.append(b) : E.insertBefore(b), x.is(_) && _.set(w.__key, 0, "text"), x.set(w.__key, 0, "text");
9583
+ !this.isCollapsed() && n.isBefore(t) && (o = n, l = t), o.type === "element" && function(x, b, y, _) {
9584
+ const C = x.getNode(), k = C.getChildAtIndex(x.offset), w = ut(), v = bt(C) ? at().append(w) : w;
9585
+ w.setFormat(y), w.setStyle(_), k === null ? C.append(v) : k.insertBefore(v), x.is(b) && b.set(w.__key, 0, "text"), x.set(w.__key, 0, "text");
9586
9586
  }(o, l, i, s);
9587
9587
  const a = o.offset;
9588
9588
  let u = l.offset;
@@ -9606,67 +9606,67 @@ class Dr {
9606
9606
  }
9607
9607
  if (d === 1) {
9608
9608
  if (f.isToken()) {
9609
- const v = ut(e);
9610
- return v.select(), void f.replace(v);
9609
+ const _ = ut(e);
9610
+ return _.select(), void f.replace(_);
9611
9611
  }
9612
- const x = f.getFormat(), _ = f.getStyle();
9613
- if (a !== u || x === i && _ === s) {
9612
+ const x = f.getFormat(), b = f.getStyle();
9613
+ if (a !== u || x === i && b === s) {
9614
9614
  if (gh(f)) {
9615
- const v = ut(e);
9616
- return v.setFormat(i), v.setStyle(s), v.select(), void f.replace(v);
9615
+ const _ = ut(e);
9616
+ return _.setFormat(i), _.setStyle(s), _.select(), void f.replace(_);
9617
9617
  }
9618
9618
  } else {
9619
9619
  if (f.getTextContent() !== "") {
9620
- const v = ut(e);
9621
- if (v.setFormat(i), v.setStyle(s), v.select(), a === 0) f.insertBefore(v, !1);
9620
+ const _ = ut(e);
9621
+ if (_.setFormat(i), _.setStyle(s), _.select(), a === 0) f.insertBefore(_, !1);
9622
9622
  else {
9623
9623
  const [C] = f.splitText(a);
9624
- C.insertAfter(v, !1);
9624
+ C.insertAfter(_, !1);
9625
9625
  }
9626
- return void (v.isComposing() && this.anchor.type === "text" && (this.anchor.offset -= e.length));
9626
+ return void (_.isComposing() && this.anchor.type === "text" && (this.anchor.offset -= e.length));
9627
9627
  }
9628
9628
  f.setFormat(i), f.setStyle(s);
9629
9629
  }
9630
9630
  const y = u - a;
9631
- f = f.spliceText(a, y, e, !0), f.getTextContent() === "" ? f.remove() : this.anchor.type === "text" && (f.isComposing() ? this.anchor.offset -= e.length : (this.format = x, this.style = _));
9631
+ f = f.spliceText(a, y, e, !0), f.getTextContent() === "" ? f.remove() : this.anchor.type === "text" && (f.isComposing() ? this.anchor.offset -= e.length : (this.format = x, this.style = b));
9632
9632
  } else {
9633
- const x = /* @__PURE__ */ new Set([...f.getParentKeys(), ...m.getParentKeys()]), _ = P(f) ? f : f.getParentOrThrow();
9634
- let y = P(m) ? m : m.getParentOrThrow(), v = m;
9635
- if (!_.is(y) && y.isInline()) do
9636
- v = y, y = y.getParentOrThrow();
9633
+ const x = /* @__PURE__ */ new Set([...f.getParentKeys(), ...m.getParentKeys()]), b = P(f) ? f : f.getParentOrThrow();
9634
+ let y = P(m) ? m : m.getParentOrThrow(), _ = m;
9635
+ if (!b.is(y) && y.isInline()) do
9636
+ _ = y, y = y.getParentOrThrow();
9637
9637
  while (y.isInline());
9638
9638
  if (l.type === "text" && (u !== 0 || m.getTextContent() === "") || l.type === "element" && m.getIndexWithinParent() < u) if (X(m) && !m.isToken() && u !== m.getTextContentSize()) {
9639
9639
  if (m.isSegmented()) {
9640
- const k = ut(m.getTextContent());
9641
- m.replace(k), m = k;
9640
+ const E = ut(m.getTextContent());
9641
+ m.replace(E), m = E;
9642
9642
  }
9643
9643
  bt(l.getNode()) || l.type !== "text" || (m = m.spliceText(0, u, "")), x.add(m.__key);
9644
9644
  } else {
9645
- const k = m.getParentOrThrow();
9646
- k.canBeEmpty() || k.getChildrenSize() !== 1 ? m.remove() : k.remove();
9645
+ const E = m.getParentOrThrow();
9646
+ E.canBeEmpty() || E.getChildrenSize() !== 1 ? m.remove() : E.remove();
9647
9647
  }
9648
9648
  else x.add(m.__key);
9649
- const C = y.getChildren(), E = new Set(c), w = _.is(y), b = _.isInline() && f.getNextSibling() === null ? _ : f;
9650
- for (let k = C.length - 1; k >= 0; k--) {
9651
- const B = C[k];
9649
+ const C = y.getChildren(), k = new Set(c), w = b.is(y), v = b.isInline() && f.getNextSibling() === null ? b : f;
9650
+ for (let E = C.length - 1; E >= 0; E--) {
9651
+ const B = C[E];
9652
9652
  if (B.is(f) || P(B) && B.isParentOf(f)) break;
9653
- B.isAttached() && (!E.has(B) || B.is(v) ? w || b.insertAfter(B, !1) : B.remove());
9653
+ B.isAttached() && (!k.has(B) || B.is(_) ? w || v.insertAfter(B, !1) : B.remove());
9654
9654
  }
9655
9655
  if (!w) {
9656
- let k = y, B = null;
9657
- for (; k !== null; ) {
9658
- const A = k.getChildren(), T = A.length;
9659
- (T === 0 || A[T - 1].is(B)) && (x.delete(k.__key), B = k), k = k.getParent();
9656
+ let E = y, B = null;
9657
+ for (; E !== null; ) {
9658
+ const A = E.getChildren(), T = A.length;
9659
+ (T === 0 || A[T - 1].is(B)) && (x.delete(E.__key), B = E), E = E.getParent();
9660
9660
  }
9661
9661
  }
9662
9662
  if (f.isToken()) if (a === p) f.select();
9663
9663
  else {
9664
- const k = ut(e);
9665
- k.select(), f.replace(k);
9664
+ const E = ut(e);
9665
+ E.select(), f.replace(E);
9666
9666
  }
9667
9667
  else f = f.spliceText(a, p - a, e, !0), f.getTextContent() === "" ? f.remove() : f.isComposing() && this.anchor.type === "text" && (this.anchor.offset -= e.length);
9668
- for (let k = 1; k < d; k++) {
9669
- const B = c[k], A = B.__key;
9668
+ for (let E = 1; E < d; E++) {
9669
+ const B = c[E], A = B.__key;
9670
9670
  x.has(A) || B.remove();
9671
9671
  }
9672
9672
  }
@@ -9701,10 +9701,10 @@ class Dr {
9701
9701
  const n = this.getNodes(), i = [];
9702
9702
  for (const C of n) X(C) && i.push(C);
9703
9703
  const s = (C) => {
9704
- n.forEach((E) => {
9705
- if (an(E)) {
9706
- const w = E.getFormatFlags(e, C);
9707
- E.setTextFormat(w);
9704
+ n.forEach((k) => {
9705
+ if (an(k)) {
9706
+ const w = k.getFormatFlags(e, C);
9707
+ k.setTextFormat(w);
9708
9708
  }
9709
9709
  });
9710
9710
  }, o = i.length;
@@ -9715,25 +9715,25 @@ class Dr {
9715
9715
  const m = p.getFormatFlags(e, t);
9716
9716
  s(m);
9717
9717
  const x = o - 1;
9718
- let _ = i[x];
9719
- const y = d.type === "text" ? d.offset : _.getTextContentSize();
9720
- if (p.is(_)) {
9718
+ let b = i[x];
9719
+ const y = d.type === "text" ? d.offset : b.getTextContentSize();
9720
+ if (p.is(b)) {
9721
9721
  if (g === y) return;
9722
9722
  if (Ar(p) || g === 0 && y === p.getTextContentSize()) p.setFormat(m);
9723
9723
  else {
9724
- const C = p.splitText(g, y), E = g === 0 ? C[0] : C[1];
9725
- E.setFormat(m), c.type === "text" && c.set(E.__key, 0, "text"), d.type === "text" && d.set(E.__key, y - g, "text");
9724
+ const C = p.splitText(g, y), k = g === 0 ? C[0] : C[1];
9725
+ k.setFormat(m), c.type === "text" && c.set(k.__key, 0, "text"), d.type === "text" && d.set(k.__key, y - g, "text");
9726
9726
  }
9727
9727
  return void (this.format = m);
9728
9728
  }
9729
9729
  g === 0 || Ar(p) || ([, p] = p.splitText(g), g = 0), p.setFormat(m);
9730
- const v = _.getFormatFlags(e, m);
9731
- y > 0 && (y === _.getTextContentSize() || Ar(_) || ([_] = _.splitText(y)), _.setFormat(v));
9730
+ const _ = b.getFormatFlags(e, m);
9731
+ y > 0 && (y === b.getTextContentSize() || Ar(b) || ([b] = b.splitText(y)), b.setFormat(_));
9732
9732
  for (let C = f + 1; C < x; C++) {
9733
- const E = i[C], w = E.getFormatFlags(e, v);
9734
- E.setFormat(w);
9733
+ const k = i[C], w = k.getFormatFlags(e, _);
9734
+ k.setFormat(w);
9735
9735
  }
9736
- c.type === "text" && c.set(p.__key, g, "text"), d.type === "text" && d.set(_.__key, y, "text"), this.format = m | v;
9736
+ c.type === "text" && c.set(p.__key, g, "text"), d.type === "text" && d.set(b.__key, y, "text"), this.format = m | _;
9737
9737
  }
9738
9738
  insertNodes(e) {
9739
9739
  if (e.length === 0) return;
@@ -9759,10 +9759,10 @@ class Dr {
9759
9759
  const s = function(g) {
9760
9760
  const m = at();
9761
9761
  let x = null;
9762
- for (let _ = 0; _ < g.length; _++) {
9763
- const y = g[_], v = Mr(y);
9764
- if (v || We(y) && y.isInline() || P(y) && y.isInline() || X(y) || y.isParentRequired()) {
9765
- if (x === null && (x = y.createParentElementNode(), m.append(x), v)) continue;
9762
+ for (let b = 0; b < g.length; b++) {
9763
+ const y = g[b], _ = Mr(y);
9764
+ if (_ || We(y) && y.isInline() || P(y) && y.isInline() || X(y) || y.isParentRequired()) {
9765
+ if (x === null && (x = y.createParentElementNode(), m.append(x), _)) continue;
9766
9766
  x !== null && x.append(y);
9767
9767
  } else m.append(y), x = null;
9768
9768
  }
@@ -9771,12 +9771,12 @@ class Dr {
9771
9771
  let c = l[0];
9772
9772
  var d;
9773
9773
  P(d = c) && gr(d) && !d.isEmpty() && P(n) && (!n.isEmpty() || n.canMergeWhenEmpty()) && (P(n) || K(211, t.constructor.name, t.getType()), n.append(...c.getChildren()), c = l[1]), c && (n === null && K(212, t.constructor.name, t.getType()), function(g, m, x) {
9774
- const _ = m.getParentOrThrow().getLastChild();
9774
+ const b = m.getParentOrThrow().getLastChild();
9775
9775
  let y = m;
9776
- const v = [m];
9777
- for (; y !== _; ) y.getNextSibling() || K(140), y = y.getNextSibling(), v.push(y);
9776
+ const _ = [m];
9777
+ for (; y !== b; ) y.getNextSibling() || K(140), y = y.getNextSibling(), _.push(y);
9778
9778
  let C = g;
9779
- for (const E of v) C = C.insertAfter(E);
9779
+ for (const k of _) C = C.insertAfter(k);
9780
9780
  }(n, c));
9781
9781
  const f = bn(o, gr);
9782
9782
  a && P(f) && (a.canMergeWhenEmpty() || gr(u)) && (f.append(...a.getChildren()), a.remove()), P(n) && n.isEmpty() && n.remove(), o.selectEnd();
@@ -9850,12 +9850,12 @@ class Dr {
9850
9850
  const f = u.getRangeAt(0), p = this.anchor.getNode(), g = bt(p) ? p : Jf(p);
9851
9851
  if (this.applyDOMRange(f), this.dirty = !0, !o) {
9852
9852
  const m = this.getNodes(), x = [];
9853
- let _ = !1;
9853
+ let b = !1;
9854
9854
  for (let y = 0; y < m.length; y++) {
9855
- const v = m[y];
9856
- Rn(v, g) ? x.push(v) : _ = !0;
9855
+ const _ = m[y];
9856
+ Rn(_, g) ? x.push(_) : b = !0;
9857
9857
  }
9858
- if (_ && x.length > 0) if (t) {
9858
+ if (b && x.length > 0) if (t) {
9859
9859
  const y = x[0];
9860
9860
  P(y) ? y.selectStart() : y.getParentOrThrow().selectStart();
9861
9861
  } else {
@@ -9863,8 +9863,8 @@ class Dr {
9863
9863
  P(y) ? y.selectEnd() : y.getParentOrThrow().selectEnd();
9864
9864
  }
9865
9865
  u.anchorNode === f.startContainer && u.anchorOffset === f.startOffset || function(y) {
9866
- const v = y.focus, C = y.anchor, E = C.key, w = C.offset, b = C.type;
9867
- mr(C, v.key, v.offset, v.type), mr(v, E, w, b), y._cachedNodes = null;
9866
+ const _ = y.focus, C = y.anchor, k = C.key, w = C.offset, v = C.type;
9867
+ mr(C, _.key, _.offset, _.type), mr(_, k, w, v), y._cachedNodes = null;
9868
9868
  }(this);
9869
9869
  }
9870
9870
  }
@@ -9908,8 +9908,8 @@ class Dr {
9908
9908
  (function(a, u) {
9909
9909
  const c = a.anchor, d = a.focus, f = c.getNode(), p = d.getNode();
9910
9910
  if (f === p && c.type === "text" && d.type === "text") {
9911
- const g = c.offset, m = d.offset, x = g < m, _ = x ? g : m, y = x ? m : g, v = y - 1;
9912
- _ !== v && (Ou(f.getTextContent().slice(_, y)) || (u ? d.offset = v : c.offset = v));
9911
+ const g = c.offset, m = d.offset, x = g < m, b = x ? g : m, y = x ? m : g, _ = y - 1;
9912
+ b !== _ && (Ou(f.getTextContent().slice(b, y)) || (u ? d.offset = _ : c.offset = _));
9913
9913
  }
9914
9914
  })(this, e);
9915
9915
  }
@@ -9992,9 +9992,9 @@ function el(r, e, t, n) {
9992
9992
  const p = n.getElementByKey(f.getKey());
9993
9993
  p === null && K(214), [f, s] = f.getDOMSlot(p).resolveChildIndex(f, p, r, e), P(f) || K(215), o && s >= f.getChildrenSize() && (s = Math.max(0, f.getChildrenSize() - 1));
9994
9994
  let m = f.getChildAtIndex(s);
9995
- if (P(m) && function(x, _, y) {
9996
- const v = x.getParent();
9997
- return y === null || v === null || !v.canBeEmpty() || v !== y.getNode();
9995
+ if (P(m) && function(x, b, y) {
9996
+ const _ = x.getParent();
9997
+ return y === null || _ === null || !_.canBeEmpty() || _ !== y.getNode();
9998
9998
  }(m, 0, t)) {
9999
9999
  const x = o ? m.getLastDescendant() : m.getFirstDescendant();
10000
10000
  x === null ? f = m : (m = x, f = P(m) ? m : m.getParentOrThrow()), s = 0;
@@ -10144,21 +10144,21 @@ function xh(r, e, t, n, i, s, o) {
10144
10144
  const l = n.anchorNode, a = n.focusNode, u = n.anchorOffset, c = n.focusOffset, d = document.activeElement;
10145
10145
  if (i.has("collaboration") && d !== s || d !== null && Ko(d)) return;
10146
10146
  if (!H(e)) return void (r !== null && Zn(t, l, a) && n.removeAllRanges());
10147
- const f = e.anchor, p = e.focus, g = f.key, m = p.key, x = Ui(t, g), _ = Ui(t, m), y = f.offset, v = p.offset, C = e.format, E = e.style, w = e.isCollapsed();
10148
- let b = x, k = _, B = !1;
10147
+ const f = e.anchor, p = e.focus, g = f.key, m = p.key, x = Ui(t, g), b = Ui(t, m), y = f.offset, _ = p.offset, C = e.format, k = e.style, w = e.isCollapsed();
10148
+ let v = x, E = b, B = !1;
10149
10149
  if (f.type === "text") {
10150
- b = zi(x);
10150
+ v = zi(x);
10151
10151
  const N = f.getNode();
10152
- B = N.getFormat() !== C || N.getStyle() !== E;
10152
+ B = N.getFormat() !== C || N.getStyle() !== k;
10153
10153
  } else H(r) && r.anchor.type === "text" && (B = !0);
10154
10154
  var A, T, F, R, D;
10155
- if (p.type === "text" && (k = zi(_)), b !== null && k !== null && (w && (r === null || B || H(r) && (r.format !== C || r.style !== E)) && (A = C, T = E, F = y, R = g, D = performance.now(), Ju = [A, T, F, R, D]), u !== y || c !== v || l !== b || a !== k || n.type === "Range" && w || (d !== null && s.contains(d) || s.focus({ preventScroll: !0 }), f.type === "element"))) {
10155
+ if (p.type === "text" && (E = zi(b)), v !== null && E !== null && (w && (r === null || B || H(r) && (r.format !== C || r.style !== k)) && (A = C, T = k, F = y, R = g, D = performance.now(), Ju = [A, T, F, R, D]), u !== y || c !== _ || l !== v || a !== E || n.type === "Range" && w || (d !== null && s.contains(d) || s.focus({ preventScroll: !0 }), f.type === "element"))) {
10156
10156
  try {
10157
- n.setBaseAndExtent(b, y, k, v);
10157
+ n.setBaseAndExtent(v, y, E, _);
10158
10158
  } catch {
10159
10159
  }
10160
10160
  if (!i.has("skip-scroll-into-view") && e.isCollapsed() && s !== null && s === document.activeElement) {
10161
- const N = e instanceof Dr && e.anchor.type === "element" ? b.childNodes[y] || null : n.rangeCount > 0 ? n.getRangeAt(0) : null;
10161
+ const N = e instanceof Dr && e.anchor.type === "element" ? v.childNodes[y] || null : n.rangeCount > 0 ? n.getRangeAt(0) : null;
10162
10162
  if (N !== null) {
10163
10163
  let M;
10164
10164
  if (N instanceof Text) {
@@ -10313,8 +10313,8 @@ function br(r, e) {
10313
10313
  if (r._pendingEditorState = null, r._editorState = t, !i && a && p !== null) {
10314
10314
  ft = r, dt = t, St = !1, r._updating = !0;
10315
10315
  try {
10316
- const w = r._dirtyType, b = r._dirtyElements, k = r._dirtyLeaves;
10317
- p.disconnect(), g = ah(s, t, r, w, b, k);
10316
+ const w = r._dirtyType, v = r._dirtyElements, E = r._dirtyLeaves;
10317
+ p.disconnect(), g = ah(s, t, r, w, v, E);
10318
10318
  } catch (w) {
10319
10319
  if (w instanceof Error && r._onError(w), Ks) throw w;
10320
10320
  return mc(r, null, n, t), Fu(r), r._dirtyType = sn, Ks = !0, br(r, s), void (Ks = !1);
@@ -10323,13 +10323,13 @@ function br(r, e) {
10323
10323
  }
10324
10324
  }
10325
10325
  t._readOnly || (t._readOnly = !0);
10326
- const m = r._dirtyLeaves, x = r._dirtyElements, _ = r._normalizedNodes, y = r._updateTags, v = r._deferred;
10327
- a && (r._dirtyType = jr, r._cloneNotNeeded.clear(), r._dirtyLeaves = /* @__PURE__ */ new Set(), r._dirtyElements = /* @__PURE__ */ new Map(), r._normalizedNodes = /* @__PURE__ */ new Set(), r._updateTags = /* @__PURE__ */ new Set()), function(w, b) {
10328
- const k = w._decorators;
10329
- let B = w._pendingDecorators || k;
10330
- const A = b._nodeMap;
10326
+ const m = r._dirtyLeaves, x = r._dirtyElements, b = r._normalizedNodes, y = r._updateTags, _ = r._deferred;
10327
+ a && (r._dirtyType = jr, r._cloneNotNeeded.clear(), r._dirtyLeaves = /* @__PURE__ */ new Set(), r._dirtyElements = /* @__PURE__ */ new Map(), r._normalizedNodes = /* @__PURE__ */ new Set(), r._updateTags = /* @__PURE__ */ new Set()), function(w, v) {
10328
+ const E = w._decorators;
10329
+ let B = w._pendingDecorators || E;
10330
+ const A = v._nodeMap;
10331
10331
  let T;
10332
- for (T in B) A.has(T) || (B === k && (B = Pu(w)), delete B[T]);
10332
+ for (T in B) A.has(T) || (B === E && (B = Pu(w)), delete B[T]);
10333
10333
  }(r, t);
10334
10334
  const C = i ? null : jt(r._window);
10335
10335
  if (r._editable && C !== null && (a || l === null || l.dirty)) {
@@ -10344,33 +10344,33 @@ function br(r, e) {
10344
10344
  ft = d, dt = u;
10345
10345
  }
10346
10346
  }
10347
- g !== null && function(w, b, k, B, A) {
10347
+ g !== null && function(w, v, E, B, A) {
10348
10348
  const T = Array.from(w._listeners.mutation), F = T.length;
10349
10349
  for (let R = 0; R < F; R++) {
10350
- const [D, N] = T[R], M = b.get(N);
10351
- M !== void 0 && D(M, { dirtyLeaves: B, prevEditorState: A, updateTags: k });
10350
+ const [D, N] = T[R], M = v.get(N);
10351
+ M !== void 0 && D(M, { dirtyLeaves: B, prevEditorState: A, updateTags: E });
10352
10352
  }
10353
10353
  }(r, g, y, m, s), H(l) || l === null || o !== null && o.is(l) || r.dispatchCommand(jo, void 0);
10354
- const E = r._pendingDecorators;
10355
- E !== null && (r._decorators = E, r._pendingDecorators = null, Pn("decorator", r, !0, E)), function(w, b, k) {
10356
- const B = Ra(b), A = Ra(k);
10354
+ const k = r._pendingDecorators;
10355
+ k !== null && (r._decorators = k, r._pendingDecorators = null, Pn("decorator", r, !0, k)), function(w, v, E) {
10356
+ const B = Ra(v), A = Ra(E);
10357
10357
  B !== A && Pn("textcontent", w, !0, A);
10358
- }(r, e || s, t), Pn("update", r, !0, { dirtyElements: x, dirtyLeaves: m, editorState: t, normalizedNodes: _, prevEditorState: e || s, tags: y }), function(w, b) {
10359
- if (w._deferred = [], b.length !== 0) {
10360
- const k = w._updating;
10358
+ }(r, e || s, t), Pn("update", r, !0, { dirtyElements: x, dirtyLeaves: m, editorState: t, normalizedNodes: b, prevEditorState: e || s, tags: y }), function(w, v) {
10359
+ if (w._deferred = [], v.length !== 0) {
10360
+ const E = w._updating;
10361
10361
  w._updating = !0;
10362
10362
  try {
10363
- for (let B = 0; B < b.length; B++) b[B]();
10363
+ for (let B = 0; B < v.length; B++) v[B]();
10364
10364
  } finally {
10365
- w._updating = k;
10365
+ w._updating = E;
10366
10366
  }
10367
10367
  }
10368
- }(r, v), function(w) {
10369
- const b = w._updates;
10370
- if (b.length !== 0) {
10371
- const k = b.shift();
10372
- if (k) {
10373
- const [B, A] = k;
10368
+ }(r, _), function(w) {
10369
+ const v = w._updates;
10370
+ if (v.length !== 0) {
10371
+ const E = v.shift();
10372
+ if (E) {
10373
+ const [B, A] = E;
10374
10374
  hc(w, B, A);
10375
10375
  }
10376
10376
  }
@@ -10436,38 +10436,38 @@ function hc(r, e, t) {
10436
10436
  const c = dt, d = St, f = ft, p = r._updating;
10437
10437
  dt = a, St = !1, r._updating = !0, ft = r;
10438
10438
  try {
10439
- u && (r._headless ? l._selection !== null && (a._selection = l._selection.clone()) : a._selection = function(_) {
10440
- const y = _.getEditorState()._selection, v = jt(_._window);
10441
- return H(y) || y == null ? ia(y, v, _, null) : y.clone();
10439
+ u && (r._headless ? l._selection !== null && (a._selection = l._selection.clone()) : a._selection = function(b) {
10440
+ const y = b.getEditorState()._selection, _ = jt(b._window);
10441
+ return H(y) || y == null ? ia(y, _, b, null) : y.clone();
10442
10442
  }(r));
10443
10443
  const m = r._compositionKey;
10444
- e(), s = ul(r, s), function(_, y) {
10445
- const v = y.getEditorState()._selection, C = _._selection;
10444
+ e(), s = ul(r, s), function(b, y) {
10445
+ const _ = y.getEditorState()._selection, C = b._selection;
10446
10446
  if (H(C)) {
10447
- const E = C.anchor, w = C.focus;
10448
- let b;
10449
- if (E.type === "text" && (b = E.getNode(), b.selectionTransform(v, C)), w.type === "text") {
10450
- const k = w.getNode();
10451
- b !== k && k.selectionTransform(v, C);
10447
+ const k = C.anchor, w = C.focus;
10448
+ let v;
10449
+ if (k.type === "text" && (v = k.getNode(), v.selectionTransform(_, C)), w.type === "text") {
10450
+ const E = w.getNode();
10451
+ v !== E && E.selectionTransform(_, C);
10452
10452
  }
10453
10453
  }
10454
- }(a, r), r._dirtyType !== jr && (s ? function(_, y) {
10455
- const v = y._dirtyLeaves, C = _._nodeMap;
10456
- for (const E of v) {
10457
- const w = C.get(E);
10454
+ }(a, r), r._dirtyType !== jr && (s ? function(b, y) {
10455
+ const _ = y._dirtyLeaves, C = b._nodeMap;
10456
+ for (const k of _) {
10457
+ const w = C.get(k);
10458
10458
  X(w) && w.isAttached() && w.isSimpleText() && !w.isUnmergeable() && Fa(w);
10459
10459
  }
10460
- }(a, r) : function(_, y) {
10461
- const v = y._dirtyLeaves, C = y._dirtyElements, E = _._nodeMap, w = xr(), b = /* @__PURE__ */ new Map();
10462
- let k = v, B = k.size, A = C, T = A.size;
10460
+ }(a, r) : function(b, y) {
10461
+ const _ = y._dirtyLeaves, C = y._dirtyElements, k = b._nodeMap, w = xr(), v = /* @__PURE__ */ new Map();
10462
+ let E = _, B = E.size, A = C, T = A.size;
10463
10463
  for (; B > 0 || T > 0; ) {
10464
10464
  if (B > 0) {
10465
10465
  y._dirtyLeaves = /* @__PURE__ */ new Set();
10466
- for (const F of k) {
10467
- const R = E.get(F);
10468
- X(R) && R.isAttached() && R.isSimpleText() && !R.isUnmergeable() && Fa(R), R !== void 0 && al(R, w) && ol(y, R, b), v.add(F);
10466
+ for (const F of E) {
10467
+ const R = k.get(F);
10468
+ X(R) && R.isAttached() && R.isSimpleText() && !R.isUnmergeable() && Fa(R), R !== void 0 && al(R, w) && ol(y, R, v), _.add(F);
10469
10469
  }
10470
- if (k = y._dirtyLeaves, B = k.size, B > 0) {
10470
+ if (E = y._dirtyLeaves, B = E.size, B > 0) {
10471
10471
  Si++;
10472
10472
  continue;
10473
10473
  }
@@ -10476,28 +10476,28 @@ function hc(r, e, t) {
10476
10476
  for (const F of A) {
10477
10477
  const R = F[0], D = F[1];
10478
10478
  if (R !== "root" && !D) continue;
10479
- const N = E.get(R);
10480
- N !== void 0 && al(N, w) && ol(y, N, b), C.set(R, D);
10479
+ const N = k.get(R);
10480
+ N !== void 0 && al(N, w) && ol(y, N, v), C.set(R, D);
10481
10481
  }
10482
- k = y._dirtyLeaves, B = k.size, A = y._dirtyElements, T = A.size, Si++;
10482
+ E = y._dirtyLeaves, B = E.size, A = y._dirtyElements, T = A.size, Si++;
10483
10483
  }
10484
- y._dirtyLeaves = v, y._dirtyElements = C;
10485
- }(a, r), ul(r), function(_, y, v, C) {
10486
- const E = _._nodeMap, w = y._nodeMap, b = [];
10487
- for (const [k] of C) {
10488
- const B = w.get(k);
10489
- B !== void 0 && (B.isAttached() || (P(B) && Uu(B, k, E, w, b, C), E.has(k) || C.delete(k), b.push(k)));
10484
+ y._dirtyLeaves = _, y._dirtyElements = C;
10485
+ }(a, r), ul(r), function(b, y, _, C) {
10486
+ const k = b._nodeMap, w = y._nodeMap, v = [];
10487
+ for (const [E] of C) {
10488
+ const B = w.get(E);
10489
+ B !== void 0 && (B.isAttached() || (P(B) && Uu(B, E, k, w, v, C), k.has(E) || C.delete(E), v.push(E)));
10490
10490
  }
10491
- for (const k of b) w.delete(k);
10492
- for (const k of v) {
10493
- const B = w.get(k);
10494
- B === void 0 || B.isAttached() || (E.has(k) || v.delete(k), w.delete(k));
10491
+ for (const E of v) w.delete(E);
10492
+ for (const E of _) {
10493
+ const B = w.get(E);
10494
+ B === void 0 || B.isAttached() || (k.has(E) || _.delete(E), w.delete(E));
10495
10495
  }
10496
10496
  }(l, a, r._dirtyLeaves, r._dirtyElements)), m !== r._compositionKey && (a._flushSync = !0);
10497
10497
  const x = a._selection;
10498
10498
  if (H(x)) {
10499
- const _ = a._nodeMap, y = x.anchor.key, v = x.focus.key;
10500
- _.get(y) !== void 0 && _.get(v) !== void 0 || K(19);
10499
+ const b = a._nodeMap, y = x.anchor.key, _ = x.focus.key;
10500
+ b.get(y) !== void 0 && b.get(_) !== void 0 || K(19);
10501
10501
  } else Yt(x) && x._nodes.size === 0 && (a._selection = null);
10502
10502
  } catch (m) {
10503
10503
  return m instanceof Error && r._onError(m), r._pendingEditorState = l, r._dirtyType = sn, r._cloneNotNeeded.clear(), r._dirtyLeaves = /* @__PURE__ */ new Set(), r._dirtyElements.clear(), void br(r);
@@ -10505,10 +10505,10 @@ function hc(r, e, t) {
10505
10505
  dt = c, St = d, ft = f, r._updating = p, Si = 0;
10506
10506
  }
10507
10507
  r._dirtyType !== jr || function(m, x) {
10508
- const _ = x.getEditorState()._selection, y = m._selection;
10508
+ const b = x.getEditorState()._selection, y = m._selection;
10509
10509
  if (y !== null) {
10510
- if (y.dirty || !y.is(_)) return !0;
10511
- } else if (_ !== null) return !0;
10510
+ if (y.dirty || !y.is(b)) return !0;
10511
+ } else if (b !== null) return !0;
10512
10512
  return !1;
10513
10513
  }(a, r) ? a._flushSync ? (a._flushSync = !1, br(r)) : u && Gf(() => {
10514
10514
  br(r);
@@ -10813,8 +10813,8 @@ class hr extends _s {
10813
10813
  let g = d === null ? this.getFirstChild() : d.getNextSibling();
10814
10814
  for (let m = 0; m < t; m++) {
10815
10815
  g === null && K(100);
10816
- const x = g.getNextSibling(), _ = g.__key;
10817
- Fr(g.getWritable()), u.push(_), g = x;
10816
+ const x = g.getNextSibling(), b = g.__key;
10817
+ Fr(g.getWritable()), u.push(b), g = x;
10818
10818
  }
10819
10819
  }
10820
10820
  let p = d;
@@ -10823,13 +10823,13 @@ class hr extends _s {
10823
10823
  p !== null && m.is(p) && (d = p = p.getPreviousSibling());
10824
10824
  const x = m.getWritable();
10825
10825
  x.__parent === l && f--, Fr(x);
10826
- const _ = m.__key;
10827
- if (p === null) o.__first = _, x.__prev = null;
10826
+ const b = m.__key;
10827
+ if (p === null) o.__first = b, x.__prev = null;
10828
10828
  else {
10829
10829
  const y = p.getWritable();
10830
- y.__next = _, x.__prev = y.__key;
10830
+ y.__next = b, x.__prev = y.__key;
10831
10831
  }
10832
- m.__key === l && K(76), x.__parent = l, a.push(_), p = m;
10832
+ m.__key === l && K(76), x.__parent = l, a.push(b), p = m;
10833
10833
  }
10834
10834
  if (e + t === s)
10835
10835
  p !== null && (p.getWritable().__next = null, o.__last = p.__key);
@@ -10843,8 +10843,8 @@ class hr extends _s {
10843
10843
  if (o.__size = f, u.length) {
10844
10844
  const g = ae();
10845
10845
  if (H(g)) {
10846
- const m = new Set(u), x = new Set(a), { anchor: _, focus: y } = g;
10847
- dl(_, m, x) && Qi(_, _.getNode(), this, d, c), dl(y, m, x) && Qi(y, y.getNode(), this, d, c), f !== 0 || this.canBeEmpty() || er(this) || this.remove();
10846
+ const m = new Set(u), x = new Set(a), { anchor: b, focus: y } = g;
10847
+ dl(b, m, x) && Qi(b, b.getNode(), this, d, c), dl(y, m, x) && Qi(y, y.getNode(), this, d, c), f !== 0 || this.canBeEmpty() || er(this) || this.remove();
10848
10848
  }
10849
10849
  }
10850
10850
  return o;
@@ -11145,29 +11145,29 @@ function Dh(r) {
11145
11145
  else {
11146
11146
  p = /* @__PURE__ */ new Map();
11147
11147
  for (let m = 0; m < u.length; m++) {
11148
- let x = u[m], _ = null, y = null;
11148
+ let x = u[m], b = null, y = null;
11149
11149
  if (typeof x != "function") {
11150
11150
  const w = x;
11151
- x = w.replace, _ = w.with, y = w.withKlass || null;
11151
+ x = w.replace, b = w.with, y = w.withKlass || null;
11152
11152
  }
11153
- const v = x.getType(), C = x.transform(), E = /* @__PURE__ */ new Set();
11154
- C !== null && E.add(C), p.set(v, { exportDOM: d && d.export ? d.export.get(x) : void 0, klass: x, replace: _, replaceWithKlass: y, transforms: E });
11153
+ const _ = x.getType(), C = x.transform(), k = /* @__PURE__ */ new Set();
11154
+ C !== null && k.add(C), p.set(_, { exportDOM: d && d.export ? d.export.get(x) : void 0, klass: x, replace: b, replaceWithKlass: y, transforms: k });
11155
11155
  }
11156
11156
  }
11157
11157
  const g = new Cs(o, i, p, { disableEvents: s, namespace: l, theme: n }, c || console.error, function(m, x) {
11158
- const _ = /* @__PURE__ */ new Map(), y = /* @__PURE__ */ new Set(), v = (C) => {
11159
- Object.keys(C).forEach((E) => {
11160
- let w = _.get(E);
11161
- w === void 0 && (w = [], _.set(E, w)), w.push(C[E]);
11158
+ const b = /* @__PURE__ */ new Map(), y = /* @__PURE__ */ new Set(), _ = (C) => {
11159
+ Object.keys(C).forEach((k) => {
11160
+ let w = b.get(k);
11161
+ w === void 0 && (w = [], b.set(k, w)), w.push(C[k]);
11162
11162
  });
11163
11163
  };
11164
11164
  return m.forEach((C) => {
11165
- const E = C.klass.importDOM;
11166
- if (E == null || y.has(E)) return;
11167
- y.add(E);
11168
- const w = E.call(C.klass);
11169
- w !== null && v(w);
11170
- }), x && v(x), _;
11165
+ const k = C.klass.importDOM;
11166
+ if (k == null || y.has(k)) return;
11167
+ y.add(k);
11168
+ const w = k.call(C.klass);
11169
+ w !== null && _(w);
11170
+ }), x && _(x), b;
11171
11171
  }(p, d ? d.import : void 0), f);
11172
11172
  return a !== void 0 && (g._pendingEditorState = a, g._dirtyType = sn), g;
11173
11173
  }
@@ -11300,26 +11300,26 @@ class Cs {
11300
11300
  } : (x) => {
11301
11301
  if (Ga(x)) return;
11302
11302
  Va(x);
11303
- const _ = a.isEditable();
11303
+ const b = a.isEditable();
11304
11304
  switch (p) {
11305
11305
  case "cut":
11306
- return _ && ne(a, Io, x);
11306
+ return b && ne(a, Io, x);
11307
11307
  case "copy":
11308
11308
  return ne(a, fs, x);
11309
11309
  case "paste":
11310
- return _ && ne(a, ds, x);
11310
+ return b && ne(a, ds, x);
11311
11311
  case "dragstart":
11312
- return _ && ne(a, Du, x);
11312
+ return b && ne(a, Du, x);
11313
11313
  case "dragover":
11314
- return _ && ne(a, Eu, x);
11314
+ return b && ne(a, Eu, x);
11315
11315
  case "dragend":
11316
- return _ && ne(a, _f, x);
11316
+ return b && ne(a, _f, x);
11317
11317
  case "focus":
11318
- return _ && ne(a, Cf, x);
11318
+ return b && ne(a, Cf, x);
11319
11319
  case "blur":
11320
- return _ && ne(a, Df, x);
11320
+ return b && ne(a, Df, x);
11321
11321
  case "drop":
11322
- return _ && ne(a, Cu, x);
11322
+ return b && ne(a, Cu, x);
11323
11323
  }
11324
11324
  };
11325
11325
  l.addEventListener(p, m), d.push(() => {
@@ -11634,11 +11634,11 @@ function Gh(r) {
11634
11634
  const m = ae();
11635
11635
  if (H(m)) {
11636
11636
  const x = m.anchor;
11637
- let _ = x.getNode(), y = 0, v = 0;
11638
- if (X(_) && u >= 0 && c >= 0 && (y = u, v = u + c, m.setTextNodeRange(_, y, _, v)), y === v && d === "" || (m.insertRawText(d), _ = x.getNode()), X(_)) {
11639
- y = f, v = f + p;
11640
- const C = _.getTextContentSize();
11641
- y = y > C ? C : y, v = v > C ? C : v, m.setTextNodeRange(_, y, _, v);
11637
+ let b = x.getNode(), y = 0, _ = 0;
11638
+ if (X(b) && u >= 0 && c >= 0 && (y = u, _ = u + c, m.setTextNodeRange(b, y, b, _)), y === _ && d === "" || (m.insertRawText(d), b = x.getNode()), X(b)) {
11639
+ y = f, _ = f + p;
11640
+ const C = b.getTextContentSize();
11641
+ y = y > C ? C : y, _ = _ > C ? C : _, m.setTextNodeRange(b, y, b, _);
11642
11642
  }
11643
11643
  n.stopImmediatePropagation();
11644
11644
  }
@@ -11711,10 +11711,10 @@ function Sc(r, e, t, n, i = /* @__PURE__ */ new Map(), s) {
11711
11711
  if (kc.has(r.nodeName)) return o;
11712
11712
  let l = null;
11713
11713
  const a = function(g, m) {
11714
- const { nodeName: x } = g, _ = m._htmlConversions.get(x.toLowerCase());
11714
+ const { nodeName: x } = g, b = m._htmlConversions.get(x.toLowerCase());
11715
11715
  let y = null;
11716
- if (_ !== void 0) for (const v of _) {
11717
- const C = v(g);
11716
+ if (b !== void 0) for (const _ of b) {
11717
+ const C = _(g);
11718
11718
  C !== null && (y === null || (y.priority || 0) <= (C.priority || 0)) && (y = C);
11719
11719
  }
11720
11720
  return y !== null ? y.conversion : null;
@@ -12279,8 +12279,8 @@ function dp({ content: r }) {
12279
12279
  return t ? typeof r == "function" ? r(n) : r : null;
12280
12280
  }
12281
12281
  const Tc = typeof window < "u" && window.document !== void 0 && window.document.createElement !== void 0 ? cn : Te;
12282
- function fp({ editor: r, ariaActiveDescendant: e, ariaAutoComplete: t, ariaControls: n, ariaDescribedBy: i, ariaErrorMessage: s, ariaExpanded: o, ariaInvalid: l, ariaLabel: a, ariaLabelledBy: u, ariaMultiline: c, ariaOwns: d, ariaRequired: f, autoCapitalize: p, className: g, id: m, role: x = "textbox", spellCheck: _ = !0, style: y, tabIndex: v, "data-testid": C, ...E }, w) {
12283
- const [b, k] = O(r.isEditable()), B = Q((T) => {
12282
+ function fp({ editor: r, ariaActiveDescendant: e, ariaAutoComplete: t, ariaControls: n, ariaDescribedBy: i, ariaErrorMessage: s, ariaExpanded: o, ariaInvalid: l, ariaLabel: a, ariaLabelledBy: u, ariaMultiline: c, ariaOwns: d, ariaRequired: f, autoCapitalize: p, className: g, id: m, role: x = "textbox", spellCheck: b = !0, style: y, tabIndex: _, "data-testid": C, ...k }, w) {
12283
+ const [v, E] = O(r.isEditable()), B = Q((T) => {
12284
12284
  T && T.ownerDocument && T.ownerDocument.defaultView ? r.setRootElement(T) : r.setRootElement(null);
12285
12285
  }, [r]), A = ot(() => /* @__PURE__ */ function(...T) {
12286
12286
  return (F) => {
@@ -12289,9 +12289,9 @@ function fp({ editor: r, ariaActiveDescendant: e, ariaAutoComplete: t, ariaContr
12289
12289
  });
12290
12290
  };
12291
12291
  }(w, B), [B, w]);
12292
- return Tc(() => (k(r.isEditable()), r.registerEditableListener((T) => {
12293
- k(T);
12294
- })), [r]), h.jsx("div", { "aria-activedescendant": b ? e : void 0, "aria-autocomplete": b ? t : "none", "aria-controls": b ? n : void 0, "aria-describedby": i, ...s != null ? { "aria-errormessage": s } : {}, "aria-expanded": b && x === "combobox" ? !!o : void 0, ...l != null ? { "aria-invalid": l } : {}, "aria-label": a, "aria-labelledby": u, "aria-multiline": c, "aria-owns": b ? d : void 0, "aria-readonly": !b || void 0, "aria-required": f, autoCapitalize: p, className: g, contentEditable: b, "data-testid": C, id: m, ref: A, role: b ? x : void 0, spellCheck: _, style: y, tabIndex: v, ...E });
12292
+ return Tc(() => (E(r.isEditable()), r.registerEditableListener((T) => {
12293
+ E(T);
12294
+ })), [r]), h.jsx("div", { "aria-activedescendant": v ? e : void 0, "aria-autocomplete": v ? t : "none", "aria-controls": v ? n : void 0, "aria-describedby": i, ...s != null ? { "aria-errormessage": s } : {}, "aria-expanded": v && x === "combobox" ? !!o : void 0, ...l != null ? { "aria-invalid": l } : {}, "aria-label": a, "aria-labelledby": u, "aria-multiline": c, "aria-owns": v ? d : void 0, "aria-readonly": !v || void 0, "aria-required": f, autoCapitalize: p, className: g, contentEditable: v, "data-testid": C, id: m, ref: A, role: v ? x : void 0, spellCheck: b, style: y, tabIndex: _, ...k });
12295
12295
  }
12296
12296
  const hp = au(fp);
12297
12297
  function El(r) {
@@ -12329,23 +12329,23 @@ function _p(r, e, t, n, i) {
12329
12329
  const s = e._selection, o = r._selection;
12330
12330
  if (i) return yp;
12331
12331
  if (!(H(s) && H(o) && o.isCollapsed() && s.isCollapsed())) return zt;
12332
- const l = function(_, y, v) {
12333
- const C = _._nodeMap, E = [];
12332
+ const l = function(b, y, _) {
12333
+ const C = b._nodeMap, k = [];
12334
12334
  for (const w of y) {
12335
- const b = C.get(w);
12336
- b !== void 0 && E.push(b);
12335
+ const v = C.get(w);
12336
+ v !== void 0 && k.push(v);
12337
12337
  }
12338
- for (const [w, b] of v) {
12339
- if (!b) continue;
12340
- const k = C.get(w);
12341
- k === void 0 || bt(k) || E.push(k);
12338
+ for (const [w, v] of _) {
12339
+ if (!v) continue;
12340
+ const E = C.get(w);
12341
+ E === void 0 || bt(E) || k.push(E);
12342
12342
  }
12343
- return E;
12343
+ return k;
12344
12344
  }(e, t, n);
12345
12345
  if (l.length === 0) return zt;
12346
12346
  if (l.length > 1) {
12347
- const _ = e._nodeMap, y = _.get(s.anchor.key), v = _.get(o.anchor.key);
12348
- return y && v && !r._nodeMap.has(y.__key) && X(y) && y.__text.length === 1 && s.anchor.offset === 1 ? kl : zt;
12347
+ const b = e._nodeMap, y = b.get(s.anchor.key), _ = b.get(o.anchor.key);
12348
+ return y && _ && !r._nodeMap.has(y.__key) && X(y) && y.__text.length === 1 && s.anchor.offset === 1 ? kl : zt;
12349
12349
  }
12350
12350
  const a = l[0], u = r._nodeMap.get(a.__key);
12351
12351
  if (!X(u) || !X(a) || u.__mode !== a.__mode) return zt;
@@ -12366,9 +12366,9 @@ function vp(r, e) {
12366
12366
  if (!g && p && u.has("history-merge")) return _i;
12367
12367
  if (i === null) return _o;
12368
12368
  const m = s._selection;
12369
- return l.size > 0 || a.size > 0 ? g === !1 && d !== zt && d === n && c < t + e && p || l.size === 1 && function(x, _, y) {
12370
- const v = _._nodeMap.get(x), C = y._nodeMap.get(x), E = _._selection, w = y._selection;
12371
- return !(H(E) && H(w) && E.anchor.type === "element" && E.focus.type === "element" && w.anchor.type === "text" && w.focus.type === "text" || !X(v) || !X(C) || v.__parent !== C.__parent) && JSON.stringify(_.read(() => v.exportJSON())) === JSON.stringify(y.read(() => C.exportJSON()));
12369
+ return l.size > 0 || a.size > 0 ? g === !1 && d !== zt && d === n && c < t + e && p || l.size === 1 && function(x, b, y) {
12370
+ const _ = b._nodeMap.get(x), C = y._nodeMap.get(x), k = b._selection, w = y._selection;
12371
+ return !(H(k) && H(w) && k.anchor.type === "element" && k.focus.type === "element" && w.anchor.type === "text" && w.focus.type === "text" || !X(_) || !X(C) || _.__parent !== C.__parent) && JSON.stringify(b.read(() => _.exportJSON())) === JSON.stringify(y.read(() => C.exportJSON()));
12372
12372
  }(Array.from(l)[0], i, s) ? _i : _o : m !== null ? _i : vo;
12373
12373
  })();
12374
12374
  return t = c, n = d, f;
@@ -13433,31 +13433,31 @@ var zr;
13433
13433
  throw new RangeError("Invalid value");
13434
13434
  let g, m;
13435
13435
  for (g = c; ; g++) {
13436
- const v = Be.getNumDataCodewords(g, u) * 8, C = o.getTotalBits(a, g);
13437
- if (C <= v) {
13436
+ const _ = Be.getNumDataCodewords(g, u) * 8, C = o.getTotalBits(a, g);
13437
+ if (C <= _) {
13438
13438
  m = C;
13439
13439
  break;
13440
13440
  }
13441
13441
  if (g >= d)
13442
13442
  throw new RangeError("Data too long");
13443
13443
  }
13444
- for (const v of [Be.Ecc.MEDIUM, Be.Ecc.QUARTILE, Be.Ecc.HIGH])
13445
- p && m <= Be.getNumDataCodewords(g, v) * 8 && (u = v);
13444
+ for (const _ of [Be.Ecc.MEDIUM, Be.Ecc.QUARTILE, Be.Ecc.HIGH])
13445
+ p && m <= Be.getNumDataCodewords(g, _) * 8 && (u = _);
13446
13446
  let x = [];
13447
- for (const v of a) {
13448
- t(v.mode.modeBits, 4, x), t(v.numChars, v.mode.numCharCountBits(g), x);
13449
- for (const C of v.getData())
13447
+ for (const _ of a) {
13448
+ t(_.mode.modeBits, 4, x), t(_.numChars, _.mode.numCharCountBits(g), x);
13449
+ for (const C of _.getData())
13450
13450
  x.push(C);
13451
13451
  }
13452
13452
  i(x.length == m);
13453
- const _ = Be.getNumDataCodewords(g, u) * 8;
13454
- i(x.length <= _), t(0, Math.min(4, _ - x.length), x), t(0, (8 - x.length % 8) % 8, x), i(x.length % 8 == 0);
13455
- for (let v = 236; x.length < _; v ^= 253)
13456
- t(v, 8, x);
13453
+ const b = Be.getNumDataCodewords(g, u) * 8;
13454
+ i(x.length <= b), t(0, Math.min(4, b - x.length), x), t(0, (8 - x.length % 8) % 8, x), i(x.length % 8 == 0);
13455
+ for (let _ = 236; x.length < b; _ ^= 253)
13456
+ t(_, 8, x);
13457
13457
  let y = [];
13458
13458
  for (; y.length * 8 < x.length; )
13459
13459
  y.push(0);
13460
- return x.forEach((v, C) => y[C >>> 3] |= v << 7 - (C & 7)), new Be(g, u, y, f);
13460
+ return x.forEach((_, C) => y[C >>> 3] |= _ << 7 - (C & 7)), new Be(g, u, y, f);
13461
13461
  }
13462
13462
  /*-- Accessor methods --*/
13463
13463
  // Returns the color of the module (pixel) at the given coordinates, which is false
@@ -13547,17 +13547,17 @@ var zr;
13547
13547
  throw new RangeError("Invalid argument");
13548
13548
  const d = Be.NUM_ERROR_CORRECTION_BLOCKS[c.ordinal][u], f = Be.ECC_CODEWORDS_PER_BLOCK[c.ordinal][u], p = Math.floor(Be.getNumRawDataModules(u) / 8), g = d - p % d, m = Math.floor(p / d);
13549
13549
  let x = [];
13550
- const _ = Be.reedSolomonComputeDivisor(f);
13551
- for (let v = 0, C = 0; v < d; v++) {
13552
- let E = a.slice(C, C + m - f + (v < g ? 0 : 1));
13553
- C += E.length;
13554
- const w = Be.reedSolomonComputeRemainder(E, _);
13555
- v < g && E.push(0), x.push(E.concat(w));
13550
+ const b = Be.reedSolomonComputeDivisor(f);
13551
+ for (let _ = 0, C = 0; _ < d; _++) {
13552
+ let k = a.slice(C, C + m - f + (_ < g ? 0 : 1));
13553
+ C += k.length;
13554
+ const w = Be.reedSolomonComputeRemainder(k, b);
13555
+ _ < g && k.push(0), x.push(k.concat(w));
13556
13556
  }
13557
13557
  let y = [];
13558
- for (let v = 0; v < x[0].length; v++)
13559
- x.forEach((C, E) => {
13560
- (v != m - f || E >= g) && y.push(C[v]);
13558
+ for (let _ = 0; _ < x[0].length; _++)
13559
+ x.forEach((C, k) => {
13560
+ (_ != m - f || k >= g) && y.push(C[_]);
13561
13561
  });
13562
13562
  return i(y.length == p), y;
13563
13563
  }
@@ -13948,8 +13948,8 @@ function Jp(r, e, t, n) {
13948
13948
  const i = r.length + t * 2, s = Math.floor(e * Xp), o = i / e, l = (n.width || s) * o, a = (n.height || s) * o, u = n.x == null ? r.length / 2 - l / 2 : n.x * o, c = n.y == null ? r.length / 2 - a / 2 : n.y * o, d = n.opacity == null ? 1 : n.opacity;
13949
13949
  let f = null;
13950
13950
  if (n.excavate) {
13951
- let g = Math.floor(u), m = Math.floor(c), x = Math.ceil(l + u - g), _ = Math.ceil(a + c - m);
13952
- f = { x: g, y: m, w: x, h: _ };
13951
+ let g = Math.floor(u), m = Math.floor(c), x = Math.ceil(l + u - g), b = Math.ceil(a + c - m);
13952
+ f = { x: g, y: m, w: x, h: b };
13953
13953
  }
13954
13954
  const p = n.crossOrigin;
13955
13955
  return { x: u, y: c, h: a, w: l, excavation: f, opacity: d, crossOrigin: p };
@@ -14032,12 +14032,12 @@ var eg = function() {
14032
14032
  "boostLevel",
14033
14033
  "marginSize",
14034
14034
  "imageSettings"
14035
- ]), { style: x } = m, _ = Eo(m, ["style"]), y = p == null ? void 0 : p.src, v = Le.useRef(null), C = Le.useRef(null), E = Le.useCallback(
14035
+ ]), { style: x } = m, b = Eo(m, ["style"]), y = p == null ? void 0 : p.src, _ = Le.useRef(null), C = Le.useRef(null), k = Le.useCallback(
14036
14036
  (D) => {
14037
- v.current = D, typeof t == "function" ? t(D) : t && (t.current = D);
14037
+ _.current = D, typeof t == "function" ? t(D) : t && (t.current = D);
14038
14038
  },
14039
14039
  [t]
14040
- ), [w, b] = Le.useState(!1), { margin: k, cells: B, numCells: A, calculatedImageSettings: T } = Hc({
14040
+ ), [w, v] = Le.useState(!1), { margin: E, cells: B, numCells: A, calculatedImageSettings: T } = Hc({
14041
14041
  value: i,
14042
14042
  level: o,
14043
14043
  minVersion: c,
@@ -14048,8 +14048,8 @@ var eg = function() {
14048
14048
  size: s
14049
14049
  });
14050
14050
  Le.useEffect(() => {
14051
- if (v.current != null) {
14052
- const D = v.current, N = D.getContext("2d");
14051
+ if (_.current != null) {
14052
+ const D = _.current, N = D.getContext("2d");
14053
14053
  if (!N)
14054
14054
  return;
14055
14055
  let M = B;
@@ -14061,20 +14061,20 @@ var eg = function() {
14061
14061
  const U = window.devicePixelRatio || 1;
14062
14062
  D.height = D.width = s * U;
14063
14063
  const re = s / A * U;
14064
- N.scale(re, re), N.fillStyle = l, N.fillRect(0, 0, A, A), N.fillStyle = a, eg ? N.fill(new Path2D(Uc(M, k))) : B.forEach(function(q, J) {
14064
+ N.scale(re, re), N.fillStyle = l, N.fillRect(0, 0, A, A), N.fillStyle = a, eg ? N.fill(new Path2D(Uc(M, E))) : B.forEach(function(q, J) {
14065
14065
  q.forEach(function(W, se) {
14066
- W && N.fillRect(se + k, J + k, 1, 1);
14066
+ W && N.fillRect(se + E, J + E, 1, 1);
14067
14067
  });
14068
14068
  }), T && (N.globalAlpha = T.opacity), V && N.drawImage(
14069
14069
  I,
14070
- T.x + k,
14071
- T.y + k,
14070
+ T.x + E,
14071
+ T.y + E,
14072
14072
  T.w,
14073
14073
  T.h
14074
14074
  );
14075
14075
  }
14076
14076
  }), Le.useEffect(() => {
14077
- b(!1);
14077
+ v(!1);
14078
14078
  }, [y]);
14079
14079
  const F = Do({ height: s, width: s }, x);
14080
14080
  let R = null;
@@ -14085,7 +14085,7 @@ var eg = function() {
14085
14085
  key: y,
14086
14086
  style: { display: "none" },
14087
14087
  onLoad: () => {
14088
- b(!0);
14088
+ v(!0);
14089
14089
  },
14090
14090
  ref: C,
14091
14091
  crossOrigin: T == null ? void 0 : T.crossOrigin
@@ -14096,9 +14096,9 @@ var eg = function() {
14096
14096
  style: F,
14097
14097
  height: s,
14098
14098
  width: s,
14099
- ref: E,
14099
+ ref: k,
14100
14100
  role: "img"
14101
- }, _)
14101
+ }, b)
14102
14102
  ), R);
14103
14103
  }
14104
14104
  );
@@ -14129,7 +14129,7 @@ var Vc = Le.forwardRef(
14129
14129
  "title",
14130
14130
  "marginSize",
14131
14131
  "imageSettings"
14132
- ]), { margin: x, cells: _, numCells: y, calculatedImageSettings: v } = Hc({
14132
+ ]), { margin: x, cells: b, numCells: y, calculatedImageSettings: _ } = Hc({
14133
14133
  value: i,
14134
14134
  level: o,
14135
14135
  minVersion: c,
@@ -14139,21 +14139,21 @@ var Vc = Le.forwardRef(
14139
14139
  imageSettings: g,
14140
14140
  size: s
14141
14141
  });
14142
- let C = _, E = null;
14143
- g != null && v != null && (v.excavation != null && (C = Wc(
14144
- _,
14145
- v.excavation
14146
- )), E = /* @__PURE__ */ Le.createElement(
14142
+ let C = b, k = null;
14143
+ g != null && _ != null && (_.excavation != null && (C = Wc(
14144
+ b,
14145
+ _.excavation
14146
+ )), k = /* @__PURE__ */ Le.createElement(
14147
14147
  "image",
14148
14148
  {
14149
14149
  href: g.src,
14150
- height: v.h,
14151
- width: v.w,
14152
- x: v.x + x,
14153
- y: v.y + x,
14150
+ height: _.h,
14151
+ width: _.w,
14152
+ x: _.x + x,
14153
+ y: _.y + x,
14154
14154
  preserveAspectRatio: "none",
14155
- opacity: v.opacity,
14156
- crossOrigin: v.crossOrigin
14155
+ opacity: _.opacity,
14156
+ crossOrigin: _.crossOrigin
14157
14157
  }
14158
14158
  ));
14159
14159
  const w = Uc(C, x);
@@ -14176,7 +14176,7 @@ var Vc = Le.forwardRef(
14176
14176
  }
14177
14177
  ),
14178
14178
  /* @__PURE__ */ Le.createElement("path", { fill: a, d: w, shapeRendering: "crispEdges" }),
14179
- E
14179
+ k
14180
14180
  );
14181
14181
  }
14182
14182
  );
@@ -14293,14 +14293,14 @@ function og({ theme: r, disabled: e, onAiRestructure: t, onAiProofread: n, onAiR
14293
14293
  u.dispatchCommand(Ut, "italic");
14294
14294
  }, [u]), x = Q(() => {
14295
14295
  u.dispatchCommand(Ut, "underline");
14296
- }, [u]), _ = Q(() => {
14296
+ }, [u]), b = Q(() => {
14297
14297
  u.dispatchCommand(Fc, void 0);
14298
14298
  }, [u]), y = Q(() => {
14299
14299
  u.dispatchCommand(Mc, void 0);
14300
- }, [u]), v = Q(() => {
14300
+ }, [u]), _ = Q(() => {
14301
14301
  u.update(() => {
14302
- const b = ae();
14303
- H(b) && Oh(b, () => ua());
14302
+ const v = ae();
14303
+ H(v) && Oh(v, () => ua());
14304
14304
  });
14305
14305
  }, [u]), C = {
14306
14306
  display: "flex",
@@ -14316,14 +14316,14 @@ function og({ theme: r, disabled: e, onAiRestructure: t, onAiProofread: n, onAiR
14316
14316
  fontSize: "14px",
14317
14317
  fontWeight: 600,
14318
14318
  opacity: e ? 0.5 : 1
14319
- }, E = `
14319
+ }, k = `
14320
14320
  .mail-editor-toolbar-btn:hover:not(:disabled) {
14321
14321
  background: ${r.border};
14322
14322
  }
14323
14323
  `, w = () => {
14324
14324
  setTimeout(() => {
14325
- var b;
14326
- (b = f.current) != null && b.contains(document.activeElement) || d(!1);
14325
+ var v;
14326
+ (v = f.current) != null && v.contains(document.activeElement) || d(!1);
14327
14327
  }, 150);
14328
14328
  };
14329
14329
  return /* @__PURE__ */ h.jsxs(
@@ -14338,7 +14338,7 @@ function og({ theme: r, disabled: e, onAiRestructure: t, onAiProofread: n, onAiR
14338
14338
  background: r.toolbarBackground
14339
14339
  },
14340
14340
  children: [
14341
- /* @__PURE__ */ h.jsx("style", { children: E }),
14341
+ /* @__PURE__ */ h.jsx("style", { children: k }),
14342
14342
  /* @__PURE__ */ h.jsxs("div", { style: { display: "flex", alignItems: "center", gap: "2px" }, children: [
14343
14343
  /* @__PURE__ */ h.jsx(
14344
14344
  "button",
@@ -14392,7 +14392,7 @@ function og({ theme: r, disabled: e, onAiRestructure: t, onAiProofread: n, onAiR
14392
14392
  {
14393
14393
  type: "button",
14394
14394
  className: "mail-editor-toolbar-btn",
14395
- onClick: _,
14395
+ onClick: b,
14396
14396
  disabled: e,
14397
14397
  style: C,
14398
14398
  title: "Bullet List",
@@ -14441,7 +14441,7 @@ function og({ theme: r, disabled: e, onAiRestructure: t, onAiProofread: n, onAiR
14441
14441
  {
14442
14442
  type: "button",
14443
14443
  className: "mail-editor-toolbar-btn",
14444
- onClick: v,
14444
+ onClick: _,
14445
14445
  disabled: e,
14446
14446
  style: C,
14447
14447
  title: "Quote",
@@ -14518,8 +14518,8 @@ function og({ theme: r, disabled: e, onAiRestructure: t, onAiProofread: n, onAiR
14518
14518
  alignItems: "center",
14519
14519
  gap: "8px"
14520
14520
  },
14521
- onMouseEnter: (b) => b.currentTarget.style.background = "#f3f4f6",
14522
- onMouseLeave: (b) => b.currentTarget.style.background = "transparent",
14521
+ onMouseEnter: (v) => v.currentTarget.style.background = "#f3f4f6",
14522
+ onMouseLeave: (v) => v.currentTarget.style.background = "transparent",
14523
14523
  children: [
14524
14524
  /* @__PURE__ */ h.jsx("span", { className: "material-icons", style: { fontSize: "18px", color: "#3b82f6" }, children: "format_list_bulleted" }),
14525
14525
  /* @__PURE__ */ h.jsxs("div", { children: [
@@ -14548,8 +14548,8 @@ function og({ theme: r, disabled: e, onAiRestructure: t, onAiProofread: n, onAiR
14548
14548
  alignItems: "center",
14549
14549
  gap: "8px"
14550
14550
  },
14551
- onMouseEnter: (b) => b.currentTarget.style.background = "#f3f4f6",
14552
- onMouseLeave: (b) => b.currentTarget.style.background = "transparent",
14551
+ onMouseEnter: (v) => v.currentTarget.style.background = "#f3f4f6",
14552
+ onMouseLeave: (v) => v.currentTarget.style.background = "transparent",
14553
14553
  children: [
14554
14554
  /* @__PURE__ */ h.jsx("span", { className: "material-icons", style: { fontSize: "18px", color: "#22c55e" }, children: "spellcheck" }),
14555
14555
  /* @__PURE__ */ h.jsxs("div", { children: [
@@ -14578,8 +14578,8 @@ function og({ theme: r, disabled: e, onAiRestructure: t, onAiProofread: n, onAiR
14578
14578
  alignItems: "center",
14579
14579
  gap: "8px"
14580
14580
  },
14581
- onMouseEnter: (b) => b.currentTarget.style.background = "#f3f4f6",
14582
- onMouseLeave: (b) => b.currentTarget.style.background = "transparent",
14581
+ onMouseEnter: (v) => v.currentTarget.style.background = "#f3f4f6",
14582
+ onMouseLeave: (v) => v.currentTarget.style.background = "transparent",
14583
14583
  children: [
14584
14584
  /* @__PURE__ */ h.jsx("span", { className: "material-icons", style: { fontSize: "18px", color: "#9333ea" }, children: "brush" }),
14585
14585
  /* @__PURE__ */ h.jsxs("div", { children: [
@@ -14714,29 +14714,29 @@ function cg({
14714
14714
  aiProcessingAction: m,
14715
14715
  renderAboveToolbar: x
14716
14716
  }) {
14717
- const _ = { ...ig, ...i }, [y, v] = Le.useState(!1), C = Le.useRef(void 0), [E, w] = Le.useState(r), [b, k] = Le.useState(!1), [B, A] = Le.useState(null), T = g ?? b, F = m ?? B;
14717
+ const b = { ...ig, ...i }, [y, _] = Le.useState(!1), C = Le.useRef(void 0), [k, w] = Le.useState(r), [v, E] = Le.useState(!1), [B, A] = Le.useState(null), T = g ?? v, F = m ?? B;
14718
14718
  Le.useEffect(() => {
14719
- a !== void 0 && a !== C.current && (C.current = a, v(!0));
14719
+ a !== void 0 && a !== C.current && (C.current = a, _(!0));
14720
14720
  }, [a]);
14721
14721
  const R = Q(() => {
14722
- v(!1);
14722
+ _(!1);
14723
14723
  }, []), D = (q) => q.replace(/<[^>]*>/g, "").trim(), N = (q) => q.split(`
14724
14724
  `).map((J) => `<p>${J || "<br>"}</p>`).join(""), M = async (q) => {
14725
- const J = D(E);
14725
+ const J = D(k);
14726
14726
  if (!J) return;
14727
14727
  const W = q === "restructure" ? d : q === "proofread" ? f : p;
14728
14728
  if (W) {
14729
- k(!0), A(q);
14729
+ E(!0), A(q);
14730
14730
  try {
14731
14731
  const se = await W(J), ce = N(se);
14732
- w(ce), e == null || e(ce), C.current = Date.now(), v(!0);
14732
+ w(ce), e == null || e(ce), C.current = Date.now(), _(!0);
14733
14733
  } catch (se) {
14734
14734
  console.error(`AI ${q} failed:`, se);
14735
14735
  } finally {
14736
- k(!1), A(null);
14736
+ E(!1), A(null);
14737
14737
  }
14738
14738
  }
14739
- }, I = D(E).length > 0, V = {
14739
+ }, I = D(k).length > 0, V = {
14740
14740
  namespace: "MailEditor",
14741
14741
  theme: sg,
14742
14742
  onError: (q) => {
@@ -14774,15 +14774,15 @@ function cg({
14774
14774
  margin: 4px 0;
14775
14775
  }
14776
14776
  .mail-editor-link {
14777
- color: ${_.primary};
14777
+ color: ${b.primary};
14778
14778
  text-decoration: underline;
14779
14779
  }
14780
14780
  .mail-editor-quote {
14781
14781
  margin: 8px 0;
14782
14782
  padding: 8px 16px;
14783
- border-left: 3px solid ${_.quoteBorder};
14784
- background: ${_.quoteBackground};
14785
- color: ${_.textSecondary};
14783
+ border-left: 3px solid ${b.quoteBorder};
14784
+ background: ${b.quoteBackground};
14785
+ color: ${b.textSecondary};
14786
14786
  }
14787
14787
  .mail-editor-h1 {
14788
14788
  font-size: 24px;
@@ -14805,7 +14805,7 @@ function cg({
14805
14805
  padding: 16px;
14806
14806
  font-size: 14px;
14807
14807
  line-height: 1.6;
14808
- color: ${_.text};
14808
+ color: ${b.text};
14809
14809
  }
14810
14810
  .mail-editor-content:focus {
14811
14811
  outline: none;
@@ -14814,7 +14814,7 @@ function cg({
14814
14814
  position: absolute;
14815
14815
  top: 16px;
14816
14816
  left: 16px;
14817
- color: ${_.textSecondary};
14817
+ color: ${b.textSecondary};
14818
14818
  pointer-events: none;
14819
14819
  font-size: 14px;
14820
14820
  }
@@ -14828,9 +14828,9 @@ function cg({
14828
14828
  {
14829
14829
  className: o,
14830
14830
  style: {
14831
- border: `1px solid ${_.border}`,
14831
+ border: `1px solid ${b.border}`,
14832
14832
  borderRadius: "8px",
14833
- background: _.background,
14833
+ background: b.background,
14834
14834
  overflow: "hidden",
14835
14835
  display: "flex",
14836
14836
  flexDirection: "column",
@@ -14844,7 +14844,7 @@ function cg({
14844
14844
  /* @__PURE__ */ h.jsx(
14845
14845
  og,
14846
14846
  {
14847
- theme: _,
14847
+ theme: b,
14848
14848
  disabled: s,
14849
14849
  onAiRestructure: d,
14850
14850
  onAiProofread: f,
@@ -14869,7 +14869,7 @@ function cg({
14869
14869
  padding: "16px",
14870
14870
  fontSize: "14px",
14871
14871
  lineHeight: 1.6,
14872
- color: _.text
14872
+ color: b.text
14873
14873
  }
14874
14874
  }
14875
14875
  ),
@@ -14884,7 +14884,7 @@ function cg({
14884
14884
  /* @__PURE__ */ h.jsx(
14885
14885
  ag,
14886
14886
  {
14887
- html: y ? E : r,
14887
+ html: y ? k : r,
14888
14888
  isExternalUpdate: y,
14889
14889
  onImportComplete: R
14890
14890
  }
@@ -14897,7 +14897,7 @@ function cg({
14897
14897
  }
14898
14898
  )
14899
14899
  ] }),
14900
- n && /* @__PURE__ */ h.jsx(ug, { replyTo: n, theme: _ })
14900
+ n && /* @__PURE__ */ h.jsx(ug, { replyTo: n, theme: b })
14901
14901
  ]
14902
14902
  }
14903
14903
  );
@@ -14939,13 +14939,13 @@ function My({
14939
14939
  className: g = "",
14940
14940
  minHeight: m = "200px",
14941
14941
  sendButtonText: x = "Send",
14942
- hideCancelButton: _ = !1,
14942
+ hideCancelButton: b = !1,
14943
14943
  onAiRestructure: y,
14944
- onAiProofread: v,
14944
+ onAiProofread: _,
14945
14945
  onAiRewrite: C,
14946
- renderAboveToolbar: E
14946
+ renderAboveToolbar: k
14947
14947
  }) {
14948
- const w = { ...dg, ...c }, [b, k] = O(r), [B, A] = O(""), [T, F] = O(""), [R, D] = O(e), [N, M] = O(t), [I, V] = O([]), [U, re] = O(!1), [q, J] = O(""), [W, se] = O(f), [ce, fe] = O(!1), ge = Le.useRef(void 0);
14948
+ const w = { ...dg, ...c }, [v, E] = O(r), [B, A] = O(""), [T, F] = O(""), [R, D] = O(e), [N, M] = O(t), [I, V] = O([]), [U, re] = O(!1), [q, J] = O(""), [W, se] = O(f), [ce, fe] = O(!1), ge = Le.useRef(void 0);
14949
14949
  Le.useEffect(() => {
14950
14950
  l !== void 0 && l !== ge.current && (ge.current = l, M(t), fe(!0));
14951
14951
  }, [l, t]);
@@ -14971,7 +14971,7 @@ function My({
14971
14971
  }, qe = (z) => z.type.startsWith("image/") ? "image" : z.type === "application/pdf" ? "picture_as_pdf" : z.type.includes("spreadsheet") || z.type.includes("excel") ? "table_chart" : z.type.includes("document") || z.type.includes("word") ? "description" : "attach_file", ze = (z) => {
14972
14972
  V((le) => le.filter((ye, be) => be !== z));
14973
14973
  }, He = (z) => z < 1024 ? `${z} B` : z < 1024 * 1024 ? `${(z / 1024).toFixed(1)} KB` : `${(z / (1024 * 1024)).toFixed(1)} MB`, Y = async () => {
14974
- if (!b.trim()) {
14974
+ if (!v.trim()) {
14975
14975
  J("Recipient email is required");
14976
14976
  return;
14977
14977
  }
@@ -14994,7 +14994,7 @@ function My({
14994
14994
  };
14995
14995
  })
14996
14996
  ), le = N.replace(/>\n+</g, "><").replace(/<p class="[^"]*"><\/p>/g, "<br>").trim(), ye = {
14997
- to: b.trim(),
14997
+ to: v.trim(),
14998
14998
  cc: B.trim() || void 0,
14999
14999
  bcc: T.trim() || void 0,
15000
15000
  subject: R.trim(),
@@ -15005,7 +15005,7 @@ function My({
15005
15005
  console.log("[MailComposer] Sending email - to:", ye.to, "subject:", ye.subject, "attachmentsCount:", ye.attachments.length), ye.attachments.length > 0 && ye.attachments.forEach((be, Ge) => {
15006
15006
  var vt;
15007
15007
  console.log(`[MailComposer] Attachment ${Ge + 1}:`, be.filename, "size:", be.size, "type:", be.content_type, "data length:", ((vt = be.data) == null ? void 0 : vt.length) || 0);
15008
- }), await i(ye), k(""), A(""), F(""), D(""), M(""), V([]);
15008
+ }), await i(ye), E(""), A(""), F(""), D(""), M(""), V([]);
15009
15009
  } catch (z) {
15010
15010
  J(z instanceof Error ? z.message : "Failed to send email");
15011
15011
  } finally {
@@ -15073,8 +15073,8 @@ function My({
15073
15073
  "input",
15074
15074
  {
15075
15075
  type: "email",
15076
- value: b,
15077
- onChange: (z) => k(z.target.value),
15076
+ value: v,
15077
+ onChange: (z) => E(z.target.value),
15078
15078
  placeholder: "recipient@example.com",
15079
15079
  disabled: d || U,
15080
15080
  style: L
@@ -15157,9 +15157,9 @@ function My({
15157
15157
  insertText: a,
15158
15158
  insertTextTrigger: u,
15159
15159
  onAiRestructure: y,
15160
- onAiProofread: v,
15160
+ onAiProofread: _,
15161
15161
  onAiRewrite: C,
15162
- renderAboveToolbar: E
15162
+ renderAboveToolbar: k
15163
15163
  }
15164
15164
  ) }) }),
15165
15165
  /* @__PURE__ */ h.jsxs("div", { children: [
@@ -15247,7 +15247,7 @@ function My({
15247
15247
  )) })
15248
15248
  ] }),
15249
15249
  /* @__PURE__ */ h.jsxs("div", { style: { display: "flex", justifyContent: "flex-end", gap: "12px" }, children: [
15250
- !_ && s && /* @__PURE__ */ h.jsx(
15250
+ !b && s && /* @__PURE__ */ h.jsx(
15251
15251
  "button",
15252
15252
  {
15253
15253
  type: "button",
@@ -15262,8 +15262,8 @@ function My({
15262
15262
  {
15263
15263
  type: "button",
15264
15264
  onClick: Y,
15265
- disabled: d || U || !b.trim() || !R.trim(),
15266
- style: Ke(!0, d || U || !b.trim() || !R.trim()),
15265
+ disabled: d || U || !v.trim() || !R.trim(),
15266
+ style: Ke(!0, d || U || !v.trim() || !R.trim()),
15267
15267
  children: [
15268
15268
  /* @__PURE__ */ h.jsx(
15269
15269
  "span",
@@ -15316,10 +15316,10 @@ function Ry({
15316
15316
  theme: d = {},
15317
15317
  className: f = ""
15318
15318
  }) {
15319
- const p = { ...fg, ...d }, [g, m] = O(!1), [x, _] = O(""), y = me(null), v = me(null);
15319
+ const p = { ...fg, ...d }, [g, m] = O(!1), [x, b] = O(""), y = me(null), _ = me(null);
15320
15320
  Te(() => {
15321
15321
  function T(F) {
15322
- y.current && !y.current.contains(F.target) && (m(!1), _(""));
15322
+ y.current && !y.current.contains(F.target) && (m(!1), b(""));
15323
15323
  }
15324
15324
  return document.addEventListener("mousedown", T), () => document.removeEventListener("mousedown", T);
15325
15325
  }, []);
@@ -15328,21 +15328,21 @@ function Ry({
15328
15328
  var F;
15329
15329
  return ((F = T.label) == null ? void 0 : F.toLowerCase().includes(x.toLowerCase())) && !e.includes(T.id);
15330
15330
  }
15331
- ), E = i && x.trim() && !r.some((T) => {
15331
+ ), k = i && x.trim() && !r.some((T) => {
15332
15332
  var F;
15333
15333
  return ((F = T.label) == null ? void 0 : F.toLowerCase()) === x.toLowerCase();
15334
- }), w = e.map((T) => r.find((F) => F.id === T)).filter(Boolean), b = Q((T) => {
15334
+ }), w = e.map((T) => r.find((F) => F.id === T)).filter(Boolean), v = Q((T) => {
15335
15335
  var F;
15336
- c > 0 && e.length >= c || (t([...e, T]), _(""), c === 1 ? m(!1) : (F = v.current) == null || F.focus());
15337
- }, [e, t, c]), k = Q((T) => {
15336
+ c > 0 && e.length >= c || (t([...e, T]), b(""), c === 1 ? m(!1) : (F = _.current) == null || F.focus());
15337
+ }, [e, t, c]), E = Q((T) => {
15338
15338
  t(e.filter((F) => F !== T));
15339
15339
  }, [e, t]), B = Q(async () => {
15340
- if (!E) return;
15340
+ if (!k) return;
15341
15341
  const T = await (s == null ? void 0 : s(x.trim()));
15342
- T && b(T.id), _("");
15343
- }, [E, x, s, b]), A = Q((T) => {
15344
- T.key === "Enter" ? (T.preventDefault(), E ? B() : C.length > 0 && b(C[0].id)) : T.key === "Backspace" && !x && e.length > 0 ? k(e[e.length - 1]) : T.key === "Escape" && (m(!1), _(""));
15345
- }, [E, C, x, e, B, b, k]);
15342
+ T && v(T.id), b("");
15343
+ }, [k, x, s, v]), A = Q((T) => {
15344
+ T.key === "Enter" ? (T.preventDefault(), k ? B() : C.length > 0 && v(C[0].id)) : T.key === "Backspace" && !x && e.length > 0 ? E(e[e.length - 1]) : T.key === "Escape" && (m(!1), b(""));
15345
+ }, [k, C, x, e, B, v, E]);
15346
15346
  return /* @__PURE__ */ h.jsxs("div", { ref: y, className: f, style: { position: "relative" }, children: [
15347
15347
  a && /* @__PURE__ */ h.jsx(
15348
15348
  "label",
@@ -15394,7 +15394,7 @@ function Ry({
15394
15394
  {
15395
15395
  type: "button",
15396
15396
  onClick: (F) => {
15397
- F.stopPropagation(), k(T.id);
15397
+ F.stopPropagation(), E(T.id);
15398
15398
  },
15399
15399
  style: {
15400
15400
  border: "none",
@@ -15415,11 +15415,11 @@ function Ry({
15415
15415
  /* @__PURE__ */ h.jsx(
15416
15416
  "input",
15417
15417
  {
15418
- ref: v,
15418
+ ref: _,
15419
15419
  type: "text",
15420
15420
  value: x,
15421
15421
  onChange: (T) => {
15422
- _(T.target.value), g || m(!0);
15422
+ b(T.target.value), g || m(!0);
15423
15423
  },
15424
15424
  onFocus: () => m(!0),
15425
15425
  onKeyDown: A,
@@ -15456,7 +15456,7 @@ function Ry({
15456
15456
  overflowY: "auto",
15457
15457
  zIndex: 50
15458
15458
  },
15459
- children: C.length === 0 && !E ? /* @__PURE__ */ h.jsx(
15459
+ children: C.length === 0 && !k ? /* @__PURE__ */ h.jsx(
15460
15460
  "div",
15461
15461
  {
15462
15462
  style: {
@@ -15471,7 +15471,7 @@ function Ry({
15471
15471
  C.map((T) => /* @__PURE__ */ h.jsxs(
15472
15472
  "div",
15473
15473
  {
15474
- onClick: () => b(T.id),
15474
+ onClick: () => v(T.id),
15475
15475
  style: {
15476
15476
  padding: "10px 12px",
15477
15477
  fontSize: "14px",
@@ -15518,7 +15518,7 @@ function Ry({
15518
15518
  },
15519
15519
  T.id
15520
15520
  )),
15521
- E && /* @__PURE__ */ h.jsxs(
15521
+ k && /* @__PURE__ */ h.jsxs(
15522
15522
  "div",
15523
15523
  {
15524
15524
  onClick: B,
@@ -15568,30 +15568,32 @@ function jy({
15568
15568
  className: a = "",
15569
15569
  theme: u = {}
15570
15570
  }) {
15571
- const c = { ...hg, ...u }, [d, f] = O(""), [p, g] = O(!1), m = me(null), x = me(null), _ = ot(() => e && r.find((b) => b.id === e) || null, [e, r]), y = ot(() => {
15571
+ const c = { ...hg, ...u }, [d, f] = O(""), [p, g] = O(!1), m = me(null), x = me(null), b = ot(() => e && r.find((E) => E.id === e) || null, [e, r]), y = ot(() => {
15572
15572
  if (!d.trim()) return r;
15573
- const b = d.toLowerCase();
15573
+ const E = d.toLowerCase();
15574
15574
  return r.filter(
15575
- (k) => {
15576
- var B, A;
15577
- return ((B = k.label) == null ? void 0 : B.toLowerCase().includes(b)) || ((A = k.notes) == null ? void 0 : A.toLowerCase().includes(b));
15575
+ (B) => {
15576
+ var A, T;
15577
+ return ((A = B.label) == null ? void 0 : A.toLowerCase().includes(E)) || ((T = B.notes) == null ? void 0 : T.toLowerCase().includes(E));
15578
15578
  }
15579
15579
  );
15580
15580
  }, [r, d]);
15581
15581
  Te(() => {
15582
- const b = (k) => {
15583
- m.current && !m.current.contains(k.target) && g(!1);
15582
+ const E = (B) => {
15583
+ m.current && !m.current.contains(B.target) && g(!1);
15584
15584
  };
15585
- return document.addEventListener("mousedown", b), () => document.removeEventListener("mousedown", b);
15585
+ return document.addEventListener("mousedown", E), () => document.removeEventListener("mousedown", E);
15586
15586
  }, []);
15587
- const v = (b) => {
15588
- i && i(b), g(!1), f("");
15587
+ const _ = (E) => {
15588
+ i && i(E), g(!1), f("");
15589
15589
  }, C = () => {
15590
15590
  o && o(d.trim() || void 0), g(!1), f("");
15591
- }, E = () => {
15591
+ }, k = () => {
15592
15592
  g(!0);
15593
- }, w = (b) => {
15594
- f(b.target.value), p || g(!0);
15593
+ }, w = (E) => {
15594
+ f(E.target.value), p || g(!0);
15595
+ }, v = (E) => {
15596
+ E.key === "Enter" ? (E.preventDefault(), y.length > 0 && i ? (i(y[0]), g(!1), f("")) : o && d.trim() && (o(d.trim()), g(!1), f(""))) : E.key === "Escape" && (g(!1), f(""));
15595
15597
  };
15596
15598
  return /* @__PURE__ */ h.jsxs(
15597
15599
  "div",
@@ -15601,7 +15603,7 @@ function jy({
15601
15603
  style: { position: "relative", width: "100%" },
15602
15604
  children: [
15603
15605
  /* @__PURE__ */ h.jsxs("div", { style: { display: "flex", gap: "8px" }, children: [
15604
- /* @__PURE__ */ h.jsx("div", { style: { flex: 1, position: "relative" }, children: _ && !p ? (
15606
+ /* @__PURE__ */ h.jsx("div", { style: { flex: 1, position: "relative" }, children: b && !p ? (
15605
15607
  // Show selected value as a chip/tag
15606
15608
  /* @__PURE__ */ h.jsxs(
15607
15609
  "div",
@@ -15623,14 +15625,14 @@ function jy({
15623
15625
  onClick: () => g(!0),
15624
15626
  children: [
15625
15627
  /* @__PURE__ */ h.jsxs("div", { style: { overflow: "hidden" }, children: [
15626
- /* @__PURE__ */ h.jsx("div", { style: { fontWeight: 500, whiteSpace: "nowrap", overflow: "hidden", textOverflow: "ellipsis" }, children: _.label }),
15627
- _.notes && /* @__PURE__ */ h.jsx("div", { style: { fontSize: "11px", color: c.textSecondary, whiteSpace: "nowrap", overflow: "hidden", textOverflow: "ellipsis" }, children: _.notes })
15628
+ /* @__PURE__ */ h.jsx("div", { style: { fontWeight: 500, whiteSpace: "nowrap", overflow: "hidden", textOverflow: "ellipsis" }, children: b.label }),
15629
+ b.notes && /* @__PURE__ */ h.jsx("div", { style: { fontSize: "11px", color: c.textSecondary, whiteSpace: "nowrap", overflow: "hidden", textOverflow: "ellipsis" }, children: b.notes })
15628
15630
  ] }),
15629
15631
  s && /* @__PURE__ */ h.jsx(
15630
15632
  "button",
15631
15633
  {
15632
- onClick: (b) => {
15633
- b.stopPropagation(), s();
15634
+ onClick: (E) => {
15635
+ E.stopPropagation(), s();
15634
15636
  },
15635
15637
  style: {
15636
15638
  marginLeft: "8px",
@@ -15678,7 +15680,8 @@ function jy({
15678
15680
  type: "text",
15679
15681
  value: d,
15680
15682
  onChange: w,
15681
- onFocus: E,
15683
+ onFocus: k,
15684
+ onKeyDown: v,
15682
15685
  placeholder: n,
15683
15686
  style: {
15684
15687
  width: "100%",
@@ -15716,11 +15719,11 @@ function jy({
15716
15719
  transition: "background 0.15s",
15717
15720
  flexShrink: 0
15718
15721
  },
15719
- onMouseEnter: (b) => {
15720
- b.currentTarget.style.background = c.cardHover || "#f3f4f6";
15722
+ onMouseEnter: (E) => {
15723
+ E.currentTarget.style.background = c.cardHover || "#f3f4f6";
15721
15724
  },
15722
- onMouseLeave: (b) => {
15723
- b.currentTarget.style.background = c.background || "#ffffff";
15725
+ onMouseLeave: (E) => {
15726
+ E.currentTarget.style.background = c.background || "#ffffff";
15724
15727
  },
15725
15728
  title: `Create ${t || "item"}`,
15726
15729
  children: "+"
@@ -15745,40 +15748,40 @@ function jy({
15745
15748
  textAlign: "center",
15746
15749
  color: c.textSecondary,
15747
15750
  fontSize: "14px"
15748
- }, children: d ? `No results for "${d}"` : "No items" }) : y.map((b, k) => /* @__PURE__ */ h.jsxs(
15751
+ }, children: d ? `No results for "${d}"` : "No items" }) : y.map((E, B) => /* @__PURE__ */ h.jsxs(
15749
15752
  "div",
15750
15753
  {
15751
- onClick: () => v(b),
15754
+ onClick: () => _(E),
15752
15755
  style: {
15753
15756
  padding: "10px 14px",
15754
15757
  cursor: "pointer",
15755
- borderBottom: k < y.length - 1 ? `1px solid ${c.border}` : "none",
15758
+ borderBottom: B < y.length - 1 ? `1px solid ${c.border}` : "none",
15756
15759
  background: c.cardBackground,
15757
15760
  transition: "background 0.15s"
15758
15761
  },
15759
- onMouseEnter: (B) => {
15760
- B.currentTarget.style.background = c.cardHover || "#f3f4f6";
15762
+ onMouseEnter: (A) => {
15763
+ A.currentTarget.style.background = c.cardHover || "#f3f4f6";
15761
15764
  },
15762
- onMouseLeave: (B) => {
15763
- B.currentTarget.style.background = c.cardBackground || "#f9fafb";
15765
+ onMouseLeave: (A) => {
15766
+ A.currentTarget.style.background = c.cardBackground || "#f9fafb";
15764
15767
  },
15765
15768
  children: [
15766
15769
  /* @__PURE__ */ h.jsx("div", { style: {
15767
15770
  fontSize: "14px",
15768
15771
  fontWeight: 500,
15769
- color: b.color || c.text,
15770
- marginBottom: b.notes ? "2px" : 0
15771
- }, children: b.label }),
15772
- b.notes && /* @__PURE__ */ h.jsx("div", { style: {
15772
+ color: E.color || c.text,
15773
+ marginBottom: E.notes ? "2px" : 0
15774
+ }, children: E.label }),
15775
+ E.notes && /* @__PURE__ */ h.jsx("div", { style: {
15773
15776
  fontSize: "12px",
15774
15777
  color: c.textSecondary,
15775
15778
  whiteSpace: "nowrap",
15776
15779
  overflow: "hidden",
15777
15780
  textOverflow: "ellipsis"
15778
- }, children: b.notes })
15781
+ }, children: E.notes })
15779
15782
  ]
15780
15783
  },
15781
- b.id
15784
+ E.id
15782
15785
  )) })
15783
15786
  ]
15784
15787
  }
@@ -15800,7 +15803,7 @@ function Ly({
15800
15803
  columnClassName: f = "",
15801
15804
  itemClassName: p = ""
15802
15805
  }) {
15803
- const [g, m] = O(null), [x, _] = O(null), [y, v] = O(null), C = me(null), E = e.reduce((F, R) => {
15806
+ const [g, m] = O(null), [x, b] = O(null), [y, _] = O(null), C = me(null), k = e.reduce((F, R) => {
15804
15807
  let D = r.filter((N) => n(N) === R.id);
15805
15808
  return i && (D = D.sort((N, M) => i(N) - i(M))), F[R.id] = D, F;
15806
15809
  }, {}), w = Q((F, R) => {
@@ -15809,18 +15812,18 @@ function Ly({
15809
15812
  const M = F.target;
15810
15813
  M.style.opacity = "0.5";
15811
15814
  });
15812
- }, [t, n]), b = Q((F) => {
15815
+ }, [t, n]), v = Q((F) => {
15813
15816
  const R = F.target;
15814
- R.style.opacity = "1", m(null), _(null), v(null), C.current = null;
15815
- }, []), k = Q((F, R, D) => {
15816
- F.preventDefault(), F.dataTransfer.dropEffect = "move", _(R), v(D);
15817
+ R.style.opacity = "1", m(null), b(null), _(null), C.current = null;
15818
+ }, []), E = Q((F, R, D) => {
15819
+ F.preventDefault(), F.dataTransfer.dropEffect = "move", b(R), _(D);
15817
15820
  }, []), B = Q((F) => {
15818
15821
  const R = F.relatedTarget;
15819
- R != null && R.closest("[data-kanban-column]") || (_(null), v(null));
15822
+ R != null && R.closest("[data-kanban-column]") || (b(null), _(null));
15820
15823
  }, []), A = Q((F, R, D) => {
15821
15824
  if (F.preventDefault(), !g) return;
15822
15825
  const N = C.current;
15823
- N === R ? l == null || l(g, R, D) : N && o(g, N, R, D), m(null), _(null), v(null), C.current = null;
15826
+ N === R ? l == null || l(g, R, D) : N && o(g, N, R, D), m(null), b(null), _(null), C.current = null;
15824
15827
  }, [g, o, l]), T = (F, R) => /* @__PURE__ */ h.jsxs("div", { className: "flex items-center justify-between px-3 py-2", children: [
15825
15828
  /* @__PURE__ */ h.jsxs("div", { className: "flex items-center gap-2", children: [
15826
15829
  F.color && /* @__PURE__ */ h.jsx(
@@ -15840,14 +15843,14 @@ function Ly({
15840
15843
  className: `flex gap-4 overflow-x-auto pb-4 ${d}`,
15841
15844
  style: { minHeight: "400px" },
15842
15845
  children: e.map((F) => {
15843
- const R = E[F.id] || [], D = x === F.id;
15846
+ const R = k[F.id] || [], D = x === F.id;
15844
15847
  return /* @__PURE__ */ h.jsxs(
15845
15848
  "div",
15846
15849
  {
15847
15850
  "data-kanban-column": F.id,
15848
15851
  className: `flex-1 min-w-[180px] bg-neutral-50 rounded-xl flex flex-col ${f}`,
15849
15852
  onDragOver: (N) => {
15850
- N.preventDefault(), g && !D && _(F.id);
15853
+ N.preventDefault(), g && !D && b(F.id);
15851
15854
  },
15852
15855
  onDragLeave: B,
15853
15856
  onDrop: (N) => A(N, F.id, y ?? R.length),
@@ -15867,8 +15870,8 @@ function Ly({
15867
15870
  {
15868
15871
  draggable: !0,
15869
15872
  onDragStart: (re) => w(re, N),
15870
- onDragEnd: b,
15871
- onDragOver: (re) => k(re, F.id, M),
15873
+ onDragEnd: v,
15874
+ onDragOver: (re) => E(re, F.id, M),
15872
15875
  onClick: () => a == null ? void 0 : a(N),
15873
15876
  className: `cursor-grab active:cursor-grabbing transition-all ${V ? "opacity-50 scale-95" : ""} ${p}`,
15874
15877
  children: s(N, V)
@@ -15881,7 +15884,7 @@ function Ly({
15881
15884
  {
15882
15885
  className: "min-h-[40px] flex-1",
15883
15886
  onDragOver: (N) => {
15884
- N.preventDefault(), k(N, F.id, R.length);
15887
+ N.preventDefault(), E(N, F.id, R.length);
15885
15888
  },
15886
15889
  children: D && y === R.length && /* @__PURE__ */ h.jsx("div", { className: "h-1 bg-blue-500 rounded-full mx-1 mt-1" })
15887
15890
  }
@@ -15940,34 +15943,34 @@ function Py({
15940
15943
  className: p = "",
15941
15944
  theme: g = {}
15942
15945
  }) {
15943
- const m = { ...pg, ...g }, { allDayItems: x, timedItems: _ } = ot(() => {
15944
- const b = [], k = [];
15946
+ const m = { ...pg, ...g }, { allDayItems: x, timedItems: b } = ot(() => {
15947
+ const v = [], E = [];
15945
15948
  for (const B of r)
15946
- l(B) ? b.push(B) : k.push(B);
15947
- return { allDayItems: b, timedItems: k };
15949
+ l(B) ? v.push(B) : E.push(B);
15950
+ return { allDayItems: v, timedItems: E };
15948
15951
  }, [r, l]), y = ot(() => {
15949
- const b = [];
15950
- for (let k = t; k <= n; k++)
15951
- b.push(k);
15952
- return b;
15953
- }, [t, n]), v = (n - t + 1) * i, C = Q(
15954
- (b) => {
15955
- const k = s(b);
15956
- if (!k) return null;
15957
- const B = gg(k);
15952
+ const v = [];
15953
+ for (let E = t; E <= n; E++)
15954
+ v.push(E);
15955
+ return v;
15956
+ }, [t, n]), _ = (n - t + 1) * i, C = Q(
15957
+ (v) => {
15958
+ const E = s(v);
15959
+ if (!E) return null;
15960
+ const B = gg(E);
15958
15961
  if (!B) return null;
15959
- const { hours: A, minutes: T } = B, F = Math.max(t, Math.min(n, A)), R = A < t ? 0 : T, D = (F - t) * i + R / 60 * i, N = o(b), M = Math.max(20, N / 60 * i);
15962
+ const { hours: A, minutes: T } = B, F = Math.max(t, Math.min(n, A)), R = A < t ? 0 : T, D = (F - t) * i + R / 60 * i, N = o(v), M = Math.max(20, N / 60 * i);
15960
15963
  return { top: D, height: M };
15961
15964
  },
15962
15965
  [s, o, t, n, i]
15963
- ), E = ot(() => {
15966
+ ), k = ot(() => {
15964
15967
  if (!f || !yg(e)) return null;
15965
- const b = /* @__PURE__ */ new Date(), k = b.getHours(), B = b.getMinutes();
15966
- return k < t || k > n ? null : (k - t) * i + B / 60 * i;
15968
+ const v = /* @__PURE__ */ new Date(), E = v.getHours(), B = v.getMinutes();
15969
+ return E < t || E > n ? null : (E - t) * i + B / 60 * i;
15967
15970
  }, [e, f, t, n, i]), w = Q(
15968
- (b) => {
15971
+ (v) => {
15969
15972
  if (!d) return;
15970
- const k = b.currentTarget.getBoundingClientRect(), A = (b.clientY - k.top) / i * 60, T = Math.floor(A / 60) + t, F = Math.round(A % 60 / 15) * 15, R = Math.min(n, Math.max(t, T)), D = F >= 60 ? 0 : F, N = `${R.toString().padStart(2, "0")}:${D.toString().padStart(2, "0")}`;
15973
+ const E = v.currentTarget.getBoundingClientRect(), A = (v.clientY - E.top) / i * 60, T = Math.floor(A / 60) + t, F = Math.round(A % 60 / 15) * 15, R = Math.min(n, Math.max(t, T)), D = F >= 60 ? 0 : F, N = `${R.toString().padStart(2, "0")}:${D.toString().padStart(2, "0")}`;
15971
15974
  d(N);
15972
15975
  },
15973
15976
  [d, i, t, n]
@@ -15995,20 +15998,20 @@ function Py({
15995
15998
  children: "All Day"
15996
15999
  }
15997
16000
  ),
15998
- /* @__PURE__ */ h.jsx("div", { style: { display: "flex", flexWrap: "wrap", gap: "4px" }, children: x.map((b) => /* @__PURE__ */ h.jsx(
16001
+ /* @__PURE__ */ h.jsx("div", { style: { display: "flex", flexWrap: "wrap", gap: "4px" }, children: x.map((v) => /* @__PURE__ */ h.jsx(
15999
16002
  "div",
16000
16003
  {
16001
- onClick: () => c == null ? void 0 : c(b),
16004
+ onClick: () => c == null ? void 0 : c(v),
16002
16005
  style: { cursor: c ? "pointer" : "default" },
16003
- children: u(b)
16006
+ children: u(v)
16004
16007
  },
16005
- a(b)
16008
+ a(v)
16006
16009
  )) })
16007
16010
  ]
16008
16011
  }
16009
16012
  ),
16010
- /* @__PURE__ */ h.jsxs("div", { style: { position: "relative", height: v }, children: [
16011
- y.map((b, k) => /* @__PURE__ */ h.jsxs("div", { style: { position: "absolute", top: k * i, left: 0, right: 0 }, children: [
16013
+ /* @__PURE__ */ h.jsxs("div", { style: { position: "relative", height: _ }, children: [
16014
+ y.map((v, E) => /* @__PURE__ */ h.jsxs("div", { style: { position: "absolute", top: E * i, left: 0, right: 0 }, children: [
16012
16015
  /* @__PURE__ */ h.jsx(
16013
16016
  "div",
16014
16017
  {
@@ -16022,7 +16025,7 @@ function Py({
16022
16025
  fontSize: "11px",
16023
16026
  color: m.hourTextColor
16024
16027
  },
16025
- children: mg(b)
16028
+ children: mg(v)
16026
16029
  }
16027
16030
  ),
16028
16031
  /* @__PURE__ */ h.jsx(
@@ -16038,7 +16041,7 @@ function Py({
16038
16041
  }
16039
16042
  }
16040
16043
  ),
16041
- k < y.length - 1 && /* @__PURE__ */ h.jsx(
16044
+ E < y.length - 1 && /* @__PURE__ */ h.jsx(
16042
16045
  "div",
16043
16046
  {
16044
16047
  style: {
@@ -16051,7 +16054,7 @@ function Py({
16051
16054
  }
16052
16055
  }
16053
16056
  )
16054
- ] }, b)),
16057
+ ] }, v)),
16055
16058
  /* @__PURE__ */ h.jsx(
16056
16059
  "div",
16057
16060
  {
@@ -16066,14 +16069,14 @@ function Py({
16066
16069
  onClick: w
16067
16070
  }
16068
16071
  ),
16069
- E !== null && /* @__PURE__ */ h.jsxs(
16072
+ k !== null && /* @__PURE__ */ h.jsxs(
16070
16073
  "div",
16071
16074
  {
16072
16075
  style: {
16073
16076
  position: "absolute",
16074
16077
  left: "55px",
16075
16078
  right: 0,
16076
- top: E,
16079
+ top: k,
16077
16080
  zIndex: 20,
16078
16081
  pointerEvents: "none"
16079
16082
  },
@@ -16105,36 +16108,36 @@ function Py({
16105
16108
  ]
16106
16109
  }
16107
16110
  ),
16108
- _.map((b) => {
16109
- const k = C(b);
16110
- return k ? /* @__PURE__ */ h.jsx(
16111
+ b.map((v) => {
16112
+ const E = C(v);
16113
+ return E ? /* @__PURE__ */ h.jsx(
16111
16114
  "div",
16112
16115
  {
16113
16116
  style: {
16114
16117
  position: "absolute",
16115
16118
  left: "64px",
16116
16119
  right: "8px",
16117
- top: k.top,
16118
- height: k.height,
16120
+ top: E.top,
16121
+ height: E.height,
16119
16122
  zIndex: 10,
16120
16123
  cursor: c ? "pointer" : "default"
16121
16124
  },
16122
16125
  onClick: (B) => {
16123
- B.stopPropagation(), c == null || c(b);
16126
+ B.stopPropagation(), c == null || c(v);
16124
16127
  },
16125
- children: u(b)
16128
+ children: u(v)
16126
16129
  },
16127
- a(b)
16130
+ a(v)
16128
16131
  ) : null;
16129
16132
  })
16130
16133
  ] })
16131
16134
  ] });
16132
16135
  }
16133
16136
  function xg({ onComplete: r, onCancel: e, onTranscribe: t, onTranscriptionComplete: n, variant: i = "widget", hideSaveButton: s = !1, maxDuration: o = 180 }) {
16134
- const l = i === "widget", [a, u] = O("idle"), [c, d] = O(0), [f, p] = O(0), [g, m] = O(!1), [x, _] = O(0), [y, v] = O(null), [C, E] = O(!1), [w, b] = O(null), [k, B] = O(!0), [A, T] = O([]), [F, R] = O({ completed: 0, total: 0 }), D = me(!1), N = me(!0);
16137
+ const l = i === "widget", [a, u] = O("idle"), [c, d] = O(0), [f, p] = O(0), [g, m] = O(!1), [x, b] = O(0), [y, _] = O(null), [C, k] = O(!1), [w, v] = O(null), [E, B] = O(!0), [A, T] = O([]), [F, R] = O({ completed: 0, total: 0 }), D = me(!1), N = me(!0);
16135
16138
  Te(() => {
16136
- N.current = k;
16137
- }, [k]);
16139
+ N.current = E;
16140
+ }, [E]);
16138
16141
  const M = me(null), I = me(null), V = me(null), U = me(null), re = me(null), q = me([]), J = me(null), W = me(null), se = me(null), ce = me(null), fe = me(!1), ge = me([]), Ne = me(null), _e = me(null), Z = me([]), Ee = me([]), ie = me("insert"), Re = me(!1), ke = me(0), Se = me(0), qe = me(0), ze = (ee) => {
16139
16142
  const j = Math.floor(ee / 60), ue = Math.floor(ee % 60);
16140
16143
  return `${j.toString().padStart(2, "0")}:${ue.toString().padStart(2, "0")}`;
@@ -16219,7 +16222,7 @@ function xg({ onComplete: r, onCancel: e, onTranscribe: t, onTranscriptionComple
16219
16222
  ge.current.push(De), xe(), fe.current && (W.current = requestAnimationFrame(Ke));
16220
16223
  }, z = async () => {
16221
16224
  try {
16222
- v(null), E(!1), Ne.current === null && (ge.current = []);
16225
+ _(null), k(!1), Ne.current === null && (ge.current = []);
16223
16226
  const ee = await navigator.mediaDevices.getUserMedia({ audio: !0 });
16224
16227
  V.current = ee;
16225
16228
  const j = new AudioContext();
@@ -16232,7 +16235,7 @@ function xg({ onComplete: r, onCancel: e, onTranscribe: t, onTranscriptionComple
16232
16235
  }, G.onstop = async () => {
16233
16236
  try {
16234
16237
  if (fe.current = !1, q.current.length === 0) {
16235
- v("No audio was recorded. Please try again."), u("idle"), ee.getTracks().forEach((Ce) => Ce.stop());
16238
+ _("No audio was recorded. Please try again."), u("idle"), ee.getTracks().forEach((Ce) => Ce.stop());
16236
16239
  return;
16237
16240
  }
16238
16241
  const De = new Blob(q.current, { type: "audio/webm" });
@@ -16255,28 +16258,28 @@ function xg({ onComplete: r, onCancel: e, onTranscribe: t, onTranscriptionComple
16255
16258
  else
16256
16259
  ve = De, we = ke.current > 0 ? ke.current : 1;
16257
16260
  if (ce.current = ve, ee.getTracks().forEach((Ce) => Ce.stop()), N.current && t) {
16258
- T((Ce) => [...Ce, ve]), R((Ce) => ({ ...Ce, total: Ce.total + 1 })), ce.current = null, ge.current = [], _(0), p(0), d(0), u("idle");
16261
+ T((Ce) => [...Ce, ve]), R((Ce) => ({ ...Ce, total: Ce.total + 1 })), ce.current = null, ge.current = [], b(0), p(0), d(0), u("idle");
16259
16262
  return;
16260
16263
  }
16261
16264
  const Ie = URL.createObjectURL(ve), Ve = new Audio(Ie);
16262
16265
  Ve.ontimeupdate = () => {
16263
- _(Ve.currentTime);
16266
+ b(Ve.currentTime);
16264
16267
  }, Ve.onended = () => {
16265
16268
  m(!1);
16266
- }, se.current = Ve, p(we), _(we), u("editing");
16269
+ }, se.current = Ve, p(we), b(we), u("editing");
16267
16270
  } catch {
16268
- v("Failed to process recording"), u("idle");
16271
+ _("Failed to process recording"), u("idle");
16269
16272
  }
16270
16273
  }, G.start(100), fe.current = !0, u("recording"), d(0), ke.current = 0, J.current = setInterval(() => {
16271
- ke.current += 1, d(ke.current), ke.current >= o && (I.current && I.current.state !== "inactive" && I.current.stop(), fe.current = !1, b(null), J.current && (clearInterval(J.current), J.current = null), W.current && (cancelAnimationFrame(W.current), W.current = null), setTimeout(() => {
16274
+ ke.current += 1, d(ke.current), ke.current >= o && (I.current && I.current.state !== "inactive" && I.current.stop(), fe.current = !1, v(null), J.current && (clearInterval(J.current), J.current = null), W.current && (cancelAnimationFrame(W.current), W.current = null), setTimeout(() => {
16272
16275
  alert(`Maximum recording time of ${Math.floor(o / 60)} minutes reached.`);
16273
16276
  }, 100));
16274
16277
  }, 1e3);
16275
16278
  } catch {
16276
- v("Could not access microphone. Please allow microphone access.");
16279
+ _("Could not access microphone. Please allow microphone access.");
16277
16280
  }
16278
16281
  }, le = () => {
16279
- fe.current = !1, E(!1), b(null), W.current && (cancelAnimationFrame(W.current), W.current = null), J.current && (clearInterval(J.current), J.current = null), I.current && I.current.state !== "inactive" && I.current.stop();
16282
+ fe.current = !1, k(!1), v(null), W.current && (cancelAnimationFrame(W.current), W.current = null), J.current && (clearInterval(J.current), J.current = null), I.current && I.current.state !== "inactive" && I.current.stop();
16280
16283
  }, ye = (ee) => {
16281
16284
  const j = M.current;
16282
16285
  if (!j) return;
@@ -16285,15 +16288,15 @@ function xg({ onComplete: r, onCancel: e, onTranscribe: t, onTranscriptionComple
16285
16288
  const he = ge.current;
16286
16289
  if (he.length === 0) return;
16287
16290
  const G = j.getBoundingClientRect(), De = ee - Se.current, ve = 4, we = G.width / j.width, Ie = he.length / ue * ve, Ve = -De / (Ie * we), Ce = qe.current + Ve, Ae = Math.max(0, Math.min(Ce, ue));
16288
- se.current && (se.current.currentTime = Ae), _(Ae);
16291
+ se.current && (se.current.currentTime = Ae), b(Ae);
16289
16292
  }, be = () => {
16290
- se.current && (se.current.currentTime = 0), _(0);
16293
+ se.current && (se.current.currentTime = 0), b(0);
16291
16294
  }, Ge = () => {
16292
16295
  const ee = f || c;
16293
- se.current && (se.current.currentTime = ee), _(ee);
16296
+ se.current && (se.current.currentTime = ee), b(ee);
16294
16297
  }, vt = () => {
16295
16298
  const ee = se.current;
16296
- ee && (g ? (ee.pause(), _(ee.currentTime), m(!1)) : (ee.currentTime = x, ee.play().catch(() => {
16299
+ ee && (g ? (ee.pause(), b(ee.currentTime), m(!1)) : (ee.currentTime = x, ee.play().catch(() => {
16297
16300
  }), m(!0)));
16298
16301
  }, wt = async (ee) => {
16299
16302
  if (!ce.current) {
@@ -16307,10 +16310,10 @@ function xg({ onComplete: r, onCancel: e, onTranscribe: t, onTranscriptionComple
16307
16310
  const ue = j > 0 ? x / j : 0, he = Math.floor(ue * ge.current.length);
16308
16311
  Z.current = ge.current.slice(0, he), Ee.current = ge.current.slice(he), ge.current = [...Z.current], z();
16309
16312
  } catch {
16310
- v("Failed to prepare recording. Please try again.");
16313
+ _("Failed to prepare recording. Please try again.");
16311
16314
  }
16312
16315
  }, oe = () => {
16313
- se.current && (se.current.pause(), se.current = null), ce.current = null, _e.current = null, Ne.current = null, Z.current = [], m(!1), _(0), p(0), d(0), z();
16316
+ se.current && (se.current.pause(), se.current = null), ce.current = null, _e.current = null, Ne.current = null, Z.current = [], m(!1), b(0), p(0), d(0), z();
16314
16317
  }, de = () => {
16315
16318
  ce.current ? r(ce.current, f || c) : alert("No audio recorded yet!");
16316
16319
  };
@@ -16411,7 +16414,7 @@ function xg({ onComplete: r, onCancel: e, onTranscribe: t, onTranscriptionComple
16411
16414
  "button",
16412
16415
  {
16413
16416
  onClick: () => {
16414
- v(null), z();
16417
+ _(null), z();
16415
16418
  },
16416
16419
  style: { padding: "8px 16px", fontSize: "14px", background: "#171717", color: "white", borderRadius: "8px", border: "none", cursor: "pointer" },
16417
16420
  children: "Try Again"
@@ -16483,7 +16486,7 @@ function xg({ onComplete: r, onCancel: e, onTranscribe: t, onTranscriptionComple
16483
16486
  onClick: () => {
16484
16487
  if (a === "recording") {
16485
16488
  const ee = I.current;
16486
- ee && (ee.state === "recording" ? (ee.pause(), E(!0)) : ee.state === "paused" && (ee.resume(), E(!1)));
16489
+ ee && (ee.state === "recording" ? (ee.pause(), k(!0)) : ee.state === "paused" && (ee.resume(), k(!1)));
16487
16490
  } else
16488
16491
  vt();
16489
16492
  },
@@ -16508,7 +16511,7 @@ function xg({ onComplete: r, onCancel: e, onTranscribe: t, onTranscriptionComple
16508
16511
  "button",
16509
16512
  {
16510
16513
  onClick: () => {
16511
- w === "insert" ? le() : a === "idle" ? (b("insert"), z()) : a === "editing" && (b("insert"), wt("insert"));
16514
+ w === "insert" ? le() : a === "idle" ? (v("insert"), z()) : a === "editing" && (v("insert"), wt("insert"));
16512
16515
  },
16513
16516
  disabled: a === "recording" && w !== "insert" || g,
16514
16517
  style: a === "recording" && w !== "insert" || g ? rt : tt,
@@ -16520,10 +16523,10 @@ function xg({ onComplete: r, onCancel: e, onTranscribe: t, onTranscriptionComple
16520
16523
  "button",
16521
16524
  {
16522
16525
  onClick: () => {
16523
- N.current || (w === "mic" ? le() : a === "idle" ? (b("mic"), z()) : a === "editing" && (b("mic"), wt("replace")));
16526
+ N.current || (w === "mic" ? le() : a === "idle" ? (v("mic"), z()) : a === "editing" && (v("mic"), wt("replace")));
16524
16527
  },
16525
16528
  onMouseDown: () => {
16526
- N.current && a === "idle" && !g && (b("mic"), z());
16529
+ N.current && a === "idle" && !g && (v("mic"), z());
16527
16530
  },
16528
16531
  onMouseUp: () => {
16529
16532
  N.current && a === "recording" && w === "mic" && le();
@@ -16532,14 +16535,14 @@ function xg({ onComplete: r, onCancel: e, onTranscribe: t, onTranscriptionComple
16532
16535
  N.current && a === "recording" && w === "mic" && le();
16533
16536
  },
16534
16537
  onTouchStart: () => {
16535
- N.current && a === "idle" && !g && (b("mic"), z());
16538
+ N.current && a === "idle" && !g && (v("mic"), z());
16536
16539
  },
16537
16540
  onTouchEnd: () => {
16538
16541
  N.current && a === "recording" && w === "mic" && le();
16539
16542
  },
16540
16543
  disabled: a === "recording" && w !== "mic" || g,
16541
16544
  style: a === "recording" && w !== "mic" || g ? rt : tt,
16542
- title: k ? "Hold to record (walkie-talkie)" : w === "mic" ? "Stop recording" : "Record",
16545
+ title: E ? "Hold to record (walkie-talkie)" : w === "mic" ? "Stop recording" : "Record",
16543
16546
  children: /* @__PURE__ */ h.jsx("span", { className: "material-icons", style: { fontSize: "20px", color: w === "mic" ? "#ef4444" : "#171717" }, children: "mic" })
16544
16547
  }
16545
16548
  ),
@@ -16547,7 +16550,7 @@ function xg({ onComplete: r, onCancel: e, onTranscribe: t, onTranscriptionComple
16547
16550
  "button",
16548
16551
  {
16549
16552
  onClick: () => {
16550
- w === "startover" ? le() : a === "editing" && (b("startover"), oe());
16553
+ w === "startover" ? le() : a === "editing" && (v("startover"), oe());
16551
16554
  },
16552
16555
  disabled: a === "idle" || a === "recording" && w !== "startover" || g,
16553
16556
  style: a === "idle" || a === "recording" && w !== "startover" || g ? rt : tt,
@@ -16577,19 +16580,19 @@ function xg({ onComplete: r, onCancel: e, onTranscribe: t, onTranscriptionComple
16577
16580
  /* @__PURE__ */ h.jsx(
16578
16581
  "button",
16579
16582
  {
16580
- onClick: () => B(!k),
16583
+ onClick: () => B(!E),
16581
16584
  style: {
16582
16585
  width: "28px",
16583
16586
  height: "16px",
16584
16587
  borderRadius: "8px",
16585
16588
  border: "none",
16586
- background: k ? "#10b981" : "#9ca3af",
16589
+ background: E ? "#10b981" : "#9ca3af",
16587
16590
  cursor: "pointer",
16588
16591
  position: "relative",
16589
16592
  transition: "background 0.2s",
16590
16593
  padding: 0
16591
16594
  },
16592
- title: k ? "Auto-transcribe ON" : "Auto-transcribe OFF",
16595
+ title: E ? "Auto-transcribe ON" : "Auto-transcribe OFF",
16593
16596
  children: /* @__PURE__ */ h.jsx("div", { style: {
16594
16597
  width: "12px",
16595
16598
  height: "12px",
@@ -16597,7 +16600,7 @@ function xg({ onComplete: r, onCancel: e, onTranscribe: t, onTranscriptionComple
16597
16600
  background: "white",
16598
16601
  position: "absolute",
16599
16602
  top: "2px",
16600
- left: k ? "14px" : "2px",
16603
+ left: E ? "14px" : "2px",
16601
16604
  transition: "left 0.2s",
16602
16605
  boxShadow: "0 1px 2px rgba(0,0,0,0.2)"
16603
16606
  } })
@@ -16614,7 +16617,7 @@ function xg({ onComplete: r, onCancel: e, onTranscribe: t, onTranscriptionComple
16614
16617
  disabled: a !== "editing",
16615
16618
  style: a !== "editing" ? rt : tt,
16616
16619
  title: "Transcribe audio",
16617
- children: /* @__PURE__ */ h.jsx("span", { className: "material-icons", style: { fontSize: "20px", color: k ? "#10b981" : "#171717" }, children: "subtitles" })
16620
+ children: /* @__PURE__ */ h.jsx("span", { className: "material-icons", style: { fontSize: "20px", color: E ? "#10b981" : "#171717" }, children: "subtitles" })
16618
16621
  }
16619
16622
  )
16620
16623
  ] }),
@@ -16662,15 +16665,15 @@ ${y}` : y);
16662
16665
  if (!(!e.trim() || a || !i)) {
16663
16666
  u(!0), d(y), p(!1);
16664
16667
  try {
16665
- const v = await i(y, e);
16666
- t(v);
16667
- } catch (v) {
16668
- console.error(`${y} failed:`, v);
16668
+ const _ = await i(y, e);
16669
+ t(_);
16670
+ } catch (_) {
16671
+ console.error(`${y} failed:`, _);
16669
16672
  } finally {
16670
16673
  u(!1), d(null);
16671
16674
  }
16672
16675
  }
16673
- }, _ = () => {
16676
+ }, b = () => {
16674
16677
  setTimeout(() => {
16675
16678
  var y;
16676
16679
  (y = g.current) != null && y.contains(document.activeElement) || p(!1);
@@ -16725,7 +16728,7 @@ ${y}` : y);
16725
16728
  "div",
16726
16729
  {
16727
16730
  className: "absolute right-0 top-full mt-1 bg-white border border-neutral-200 rounded-lg shadow-lg z-50 min-w-[180px] py-1",
16728
- onBlur: _,
16731
+ onBlur: b,
16729
16732
  children: [
16730
16733
  /* @__PURE__ */ h.jsxs(
16731
16734
  "button",
@@ -16809,7 +16812,7 @@ function Oy({
16809
16812
  outputQuality: s = 0.9,
16810
16813
  theme: o = "dark"
16811
16814
  }) {
16812
- const l = me(null), a = me(null), u = me(null), [c, d] = O(!0), [f, p] = O(null), [g, m] = O(n), [x, _] = O(0), [y, v] = O({ x: 0, y: 0, width: 100, height: 100 }), [C, E] = O(!1), [w, b] = O(null), [k, B] = O({ x: 0, y: 0 }), [A, T] = O({ x: 0, y: 0, width: 100, height: 100 }), F = o === "dark", R = Q(() => {
16815
+ const l = me(null), a = me(null), u = me(null), [c, d] = O(!0), [f, p] = O(null), [g, m] = O(n), [x, b] = O(0), [y, _] = O({ x: 0, y: 0, width: 100, height: 100 }), [C, k] = O(!1), [w, v] = O(null), [E, B] = O({ x: 0, y: 0 }), [A, T] = O({ x: 0, y: 0, width: 100, height: 100 }), F = o === "dark", R = Q(() => {
16813
16816
  const Z = u.current;
16814
16817
  return Z ? x === 90 || x === 270 ? { width: Z.height, height: Z.width } : { width: Z.width, height: Z.height } : { width: 100, height: 100 };
16815
16818
  }, [x]), D = Q((Z, Ee) => {
@@ -16832,14 +16835,14 @@ function Oy({
16832
16835
  const N = Q(() => {
16833
16836
  const { width: Z, height: Ee } = R(), ie = vi[g];
16834
16837
  if (ie === null) {
16835
- v({ x: 0, y: 0, width: 100, height: 100 });
16838
+ _({ x: 0, y: 0, width: 100, height: 100 });
16836
16839
  return;
16837
16840
  }
16838
16841
  const Re = Z / Ee;
16839
16842
  let ke, Se;
16840
16843
  Re > ie ? (Se = 100, ke = ie / Re * 100) : (ke = 100, Se = Re / ie * 100);
16841
16844
  const qe = (100 - ke) / 2, ze = (100 - Se) / 2;
16842
- v({ x: qe, y: ze, width: ke, height: Se });
16845
+ _({ x: qe, y: ze, width: ke, height: Se });
16843
16846
  }, [g, R]);
16844
16847
  Te(() => {
16845
16848
  u.current && N();
@@ -16878,22 +16881,22 @@ function Oy({
16878
16881
  ];
16879
16882
  for (const ze of qe)
16880
16883
  if (Math.abs(Re - ze.x) < Se && Math.abs(ke - ze.y) < Se) {
16881
- b(ze.name), B({ x: Re, y: ke }), T({ ...y });
16884
+ v(ze.name), B({ x: Re, y: ke }), T({ ...y });
16882
16885
  return;
16883
16886
  }
16884
- Re >= y.x && Re <= y.x + y.width && ke >= y.y && ke <= y.y + y.height && (E(!0), B({ x: Re, y: ke }), T({ ...y }));
16887
+ Re >= y.x && Re <= y.x + y.width && ke >= y.y && ke <= y.y + y.height && (k(!0), B({ x: Re, y: ke }), T({ ...y }));
16885
16888
  }, I = (Z) => {
16886
16889
  const Ee = a.current;
16887
16890
  if (!Ee) return;
16888
16891
  const ie = Ee.getBoundingClientRect(), Re = (Z.clientX - ie.left) / ie.width * 100, ke = (Z.clientY - ie.top) / ie.height * 100;
16889
16892
  if (C) {
16890
- const Se = Re - k.x, qe = ke - k.y;
16893
+ const Se = Re - E.x, qe = ke - E.y;
16891
16894
  let ze = A.x + Se, He = A.y + qe;
16892
- ze = Math.max(0, Math.min(ze, 100 - A.width)), He = Math.max(0, Math.min(He, 100 - A.height)), v({ ...A, x: ze, y: He });
16895
+ ze = Math.max(0, Math.min(ze, 100 - A.width)), He = Math.max(0, Math.min(He, 100 - A.height)), _({ ...A, x: ze, y: He });
16893
16896
  } else if (w) {
16894
16897
  const Se = vi[g], { width: qe, height: ze } = R(), He = qe / ze, Y = Se ? Se / He : null;
16895
16898
  let L = { ...A };
16896
- const xe = Re - k.x, Ke = ke - k.y;
16899
+ const xe = Re - E.x, Ke = ke - E.y;
16897
16900
  if (w === "se")
16898
16901
  L.width = Math.max(10, Math.min(100 - L.x, A.width + xe)), Y ? (L.height = L.width / Y, L.y + L.height > 100 && (L.height = 100 - L.y, L.width = L.height * Y)) : L.height = Math.max(10, Math.min(100 - L.y, A.height + Ke));
16899
16902
  else if (w === "sw") {
@@ -16918,12 +16921,12 @@ function Oy({
16918
16921
  vt >= 0 && (L.height = Ge, L.y = vt);
16919
16922
  }
16920
16923
  }
16921
- L.x = Math.max(0, L.x), L.y = Math.max(0, L.y), L.width = Math.min(L.width, 100 - L.x), L.height = Math.min(L.height, 100 - L.y), v(L);
16924
+ L.x = Math.max(0, L.x), L.y = Math.max(0, L.y), L.width = Math.min(L.width, 100 - L.x), L.height = Math.min(L.height, 100 - L.y), _(L);
16922
16925
  }
16923
16926
  }, V = () => {
16924
- E(!1), b(null);
16927
+ k(!1), v(null);
16925
16928
  }, U = (Z) => {
16926
- _((Ee) => Z === "right" ? (Ee + 90) % 360 : (Ee - 90 + 360) % 360);
16929
+ b((Ee) => Z === "right" ? (Ee + 90) % 360 : (Ee - 90 + 360) % 360);
16927
16930
  }, re = () => {
16928
16931
  const Z = u.current;
16929
16932
  if (!Z) return;
@@ -17263,12 +17266,12 @@ function Wg(r, e) {
17263
17266
  var t = e ? qg : $g, n = this._parents, i = this._groups;
17264
17267
  typeof r != "function" && (r = zg(r));
17265
17268
  for (var s = i.length, o = new Array(s), l = new Array(s), a = new Array(s), u = 0; u < s; ++u) {
17266
- var c = n[u], d = i[u], f = d.length, p = Hg(r.call(c, c && c.__data__, u, n)), g = p.length, m = l[u] = new Array(g), x = o[u] = new Array(g), _ = a[u] = new Array(f);
17267
- t(c, d, m, x, _, p, e);
17268
- for (var y = 0, v = 0, C, E; y < g; ++y)
17269
+ var c = n[u], d = i[u], f = d.length, p = Hg(r.call(c, c && c.__data__, u, n)), g = p.length, m = l[u] = new Array(g), x = o[u] = new Array(g), b = a[u] = new Array(f);
17270
+ t(c, d, m, x, b, p, e);
17271
+ for (var y = 0, _ = 0, C, k; y < g; ++y)
17269
17272
  if (C = m[y]) {
17270
- for (y >= v && (v = y + 1); !(E = x[v]) && ++v < g; ) ;
17271
- C._next = E || null;
17273
+ for (y >= _ && (_ = y + 1); !(k = x[_]) && ++_ < g; ) ;
17274
+ C._next = k || null;
17272
17275
  }
17273
17276
  }
17274
17277
  return o = new Ft(o, n), o._enter = l, o._exit = a, o;
@@ -18138,27 +18141,27 @@ function Sm(r) {
18138
18141
  }
18139
18142
  const Am = function r(e, t, n) {
18140
18143
  function i(s, o) {
18141
- var l = s[0], a = s[1], u = s[2], c = o[0], d = o[1], f = o[2], p = c - l, g = d - a, m = p * p + g * g, x, _;
18144
+ var l = s[0], a = s[1], u = s[2], c = o[0], d = o[1], f = o[2], p = c - l, g = d - a, m = p * p + g * g, x, b;
18142
18145
  if (m < Em)
18143
- _ = Math.log(f / u) / e, x = function(b) {
18146
+ b = Math.log(f / u) / e, x = function(v) {
18144
18147
  return [
18145
- l + b * p,
18146
- a + b * g,
18147
- u * Math.exp(e * b * _)
18148
+ l + v * p,
18149
+ a + v * g,
18150
+ u * Math.exp(e * v * b)
18148
18151
  ];
18149
18152
  };
18150
18153
  else {
18151
- var y = Math.sqrt(m), v = (f * f - u * u + n * m) / (2 * u * t * y), C = (f * f - u * u - n * m) / (2 * f * t * y), E = Math.log(Math.sqrt(v * v + 1) - v), w = Math.log(Math.sqrt(C * C + 1) - C);
18152
- _ = (w - E) / e, x = function(b) {
18153
- var k = b * _, B = Jl(E), A = u / (t * y) * (B * Sm(e * k + E) - km(E));
18154
+ var y = Math.sqrt(m), _ = (f * f - u * u + n * m) / (2 * u * t * y), C = (f * f - u * u - n * m) / (2 * f * t * y), k = Math.log(Math.sqrt(_ * _ + 1) - _), w = Math.log(Math.sqrt(C * C + 1) - C);
18155
+ b = (w - k) / e, x = function(v) {
18156
+ var E = v * b, B = Jl(k), A = u / (t * y) * (B * Sm(e * E + k) - km(k));
18154
18157
  return [
18155
18158
  l + A * p,
18156
18159
  a + A * g,
18157
- u * B / Jl(e * k + E)
18160
+ u * B / Jl(e * E + k)
18158
18161
  ];
18159
18162
  };
18160
18163
  }
18161
- return x.duration = _ * 1e3 * e / Math.SQRT2, x;
18164
+ return x.duration = b * 1e3 * e / Math.SQRT2, x;
18162
18165
  }
18163
18166
  return i.rho = function(s) {
18164
18167
  var o = Math.max(1e-3, +s), l = o * o, a = l * l;
@@ -18832,33 +18835,33 @@ function H2(r, e, t) {
18832
18835
  }
18833
18836
  function V2() {
18834
18837
  var r = $2, e = q2, t = H2, n = U2, i = W2, s = [0, 1 / 0], o = [[-1 / 0, -1 / 0], [1 / 0, 1 / 0]], l = 250, a = Am, u = da("start", "zoom", "end"), c, d, f, p = 500, g = 150, m = 0, x = 10;
18835
- function _(D) {
18836
- D.property("__zoom", nu).on("wheel.zoom", k, { passive: !1 }).on("mousedown.zoom", B).on("dblclick.zoom", A).filter(i).on("touchstart.zoom", T).on("touchmove.zoom", F).on("touchend.zoom touchcancel.zoom", R).style("-webkit-tap-highlight-color", "rgba(0,0,0,0)");
18838
+ function b(D) {
18839
+ D.property("__zoom", nu).on("wheel.zoom", E, { passive: !1 }).on("mousedown.zoom", B).on("dblclick.zoom", A).filter(i).on("touchstart.zoom", T).on("touchmove.zoom", F).on("touchend.zoom touchcancel.zoom", R).style("-webkit-tap-highlight-color", "rgba(0,0,0,0)");
18837
18840
  }
18838
- _.transform = function(D, N, M, I) {
18841
+ b.transform = function(D, N, M, I) {
18839
18842
  var V = D.selection ? D.selection() : D;
18840
- V.property("__zoom", nu), D !== V ? E(D, N, M, I) : V.interrupt().each(function() {
18843
+ V.property("__zoom", nu), D !== V ? k(D, N, M, I) : V.interrupt().each(function() {
18841
18844
  w(this, arguments).event(I).start().zoom(null, typeof N == "function" ? N.apply(this, arguments) : N).end();
18842
18845
  });
18843
- }, _.scaleBy = function(D, N, M, I) {
18844
- _.scaleTo(D, function() {
18846
+ }, b.scaleBy = function(D, N, M, I) {
18847
+ b.scaleTo(D, function() {
18845
18848
  var V = this.__zoom.k, U = typeof N == "function" ? N.apply(this, arguments) : N;
18846
18849
  return V * U;
18847
18850
  }, M, I);
18848
- }, _.scaleTo = function(D, N, M, I) {
18849
- _.transform(D, function() {
18851
+ }, b.scaleTo = function(D, N, M, I) {
18852
+ b.transform(D, function() {
18850
18853
  var V = e.apply(this, arguments), U = this.__zoom, re = M == null ? C(V) : typeof M == "function" ? M.apply(this, arguments) : M, q = U.invert(re), J = typeof N == "function" ? N.apply(this, arguments) : N;
18851
- return t(v(y(U, J), re, q), V, o);
18854
+ return t(_(y(U, J), re, q), V, o);
18852
18855
  }, M, I);
18853
- }, _.translateBy = function(D, N, M, I) {
18854
- _.transform(D, function() {
18856
+ }, b.translateBy = function(D, N, M, I) {
18857
+ b.transform(D, function() {
18855
18858
  return t(this.__zoom.translate(
18856
18859
  typeof N == "function" ? N.apply(this, arguments) : N,
18857
18860
  typeof M == "function" ? M.apply(this, arguments) : M
18858
18861
  ), e.apply(this, arguments), o);
18859
18862
  }, null, I);
18860
- }, _.translateTo = function(D, N, M, I, V) {
18861
- _.transform(D, function() {
18863
+ }, b.translateTo = function(D, N, M, I, V) {
18864
+ b.transform(D, function() {
18862
18865
  var U = e.apply(this, arguments), re = this.__zoom, q = I == null ? C(U) : typeof I == "function" ? I.apply(this, arguments) : I;
18863
18866
  return t(as.translate(q[0], q[1]).scale(re.k).translate(
18864
18867
  typeof N == "function" ? -N.apply(this, arguments) : -N,
@@ -18869,14 +18872,14 @@ function V2() {
18869
18872
  function y(D, N) {
18870
18873
  return N = Math.max(s[0], Math.min(s[1], N)), N === D.k ? D : new lr(N, D.x, D.y);
18871
18874
  }
18872
- function v(D, N, M) {
18875
+ function _(D, N, M) {
18873
18876
  var I = N[0] - M[0] * D.k, V = N[1] - M[1] * D.k;
18874
18877
  return I === D.x && V === D.y ? D : new lr(D.k, I, V);
18875
18878
  }
18876
18879
  function C(D) {
18877
18880
  return [(+D[0][0] + +D[1][0]) / 2, (+D[0][1] + +D[1][1]) / 2];
18878
18881
  }
18879
- function E(D, N, M, I) {
18882
+ function k(D, N, M, I) {
18880
18883
  D.on("start.zoom", function() {
18881
18884
  w(this, arguments).event(I).start();
18882
18885
  }).on("interrupt.zoom end.zoom", function() {
@@ -18894,12 +18897,12 @@ function V2() {
18894
18897
  });
18895
18898
  }
18896
18899
  function w(D, N, M) {
18897
- return !M && D.__zooming || new b(D, N);
18900
+ return !M && D.__zooming || new v(D, N);
18898
18901
  }
18899
- function b(D, N) {
18902
+ function v(D, N) {
18900
18903
  this.that = D, this.args = N, this.active = 0, this.sourceEvent = null, this.extent = e.apply(D, N), this.taps = 0;
18901
18904
  }
18902
- b.prototype = {
18905
+ v.prototype = {
18903
18906
  event: function(D) {
18904
18907
  return D && (this.sourceEvent = D), this;
18905
18908
  },
@@ -18919,7 +18922,7 @@ function V2() {
18919
18922
  this.that,
18920
18923
  new z2(D, {
18921
18924
  sourceEvent: this.sourceEvent,
18922
- target: _,
18925
+ target: b,
18923
18926
  transform: this.that.__zoom,
18924
18927
  dispatch: u
18925
18928
  }),
@@ -18927,7 +18930,7 @@ function V2() {
18927
18930
  );
18928
18931
  }
18929
18932
  };
18930
- function k(D, ...N) {
18933
+ function E(D, ...N) {
18931
18934
  if (!r.apply(this, arguments)) return;
18932
18935
  var M = w(this, N).event(D), I = this.__zoom, V = Math.max(s[0], Math.min(s[1], I.k * Math.pow(2, n.apply(this, arguments)))), U = Sr(D);
18933
18936
  if (M.wheel)
@@ -18936,7 +18939,7 @@ function V2() {
18936
18939
  if (I.k === V) return;
18937
18940
  M.mouse = [U, I.invert(U)], Bi(this), M.start();
18938
18941
  }
18939
- Cn(D), M.wheel = setTimeout(re, g), M.zoom("mouse", t(v(y(I, V), M.mouse[0], M.mouse[1]), M.extent, o));
18942
+ Cn(D), M.wheel = setTimeout(re, g), M.zoom("mouse", t(_(y(I, V), M.mouse[0], M.mouse[1]), M.extent, o));
18940
18943
  function re() {
18941
18944
  M.wheel = null, M.end();
18942
18945
  }
@@ -18950,7 +18953,7 @@ function V2() {
18950
18953
  var ce = se.clientX - re, fe = se.clientY - q;
18951
18954
  I.moved = ce * ce + fe * fe > m;
18952
18955
  }
18953
- I.event(se).zoom("mouse", t(v(I.that.__zoom, I.mouse[0] = Sr(se, M), I.mouse[1]), I.extent, o));
18956
+ I.event(se).zoom("mouse", t(_(I.that.__zoom, I.mouse[0] = Sr(se, M), I.mouse[1]), I.extent, o));
18954
18957
  }
18955
18958
  function W(se) {
18956
18959
  V.on("mousemove.zoom mouseup.zoom", null), rm(se.view, I.moved), Cn(se), I.event(se).end();
@@ -18958,8 +18961,8 @@ function V2() {
18958
18961
  }
18959
18962
  function A(D, ...N) {
18960
18963
  if (r.apply(this, arguments)) {
18961
- var M = this.__zoom, I = Sr(D.changedTouches ? D.changedTouches[0] : D, this), V = M.invert(I), U = M.k * (D.shiftKey ? 0.5 : 2), re = t(v(y(M, U), I, V), e.apply(this, N), o);
18962
- Cn(D), l > 0 ? $t(this).transition().duration(l).call(E, re, I, D) : $t(this).call(_.transform, re, I, D);
18964
+ var M = this.__zoom, I = Sr(D.changedTouches ? D.changedTouches[0] : D, this), V = M.invert(I), U = M.k * (D.shiftKey ? 0.5 : 2), re = t(_(y(M, U), I, V), e.apply(this, N), o);
18965
+ Cn(D), l > 0 ? $t(this).transition().duration(l).call(k, re, I, D) : $t(this).call(b.transform, re, I, D);
18963
18966
  }
18964
18967
  }
18965
18968
  function T(D, ...N) {
@@ -18982,7 +18985,7 @@ function V2() {
18982
18985
  re = y(re, Math.sqrt(ge / Ne)), q = [(W[0] + ce[0]) / 2, (W[1] + ce[1]) / 2], J = [(se[0] + fe[0]) / 2, (se[1] + fe[1]) / 2];
18983
18986
  } else if (M.touch0) q = M.touch0[0], J = M.touch0[1];
18984
18987
  else return;
18985
- M.zoom("touch", t(v(re, q, J), M.extent, o));
18988
+ M.zoom("touch", t(_(re, q, J), M.extent, o));
18986
18989
  }
18987
18990
  }
18988
18991
  function R(D, ...N) {
@@ -18999,32 +19002,32 @@ function V2() {
18999
19002
  }
19000
19003
  }
19001
19004
  }
19002
- return _.wheelDelta = function(D) {
19003
- return arguments.length ? (n = typeof D == "function" ? D : Ei(+D), _) : n;
19004
- }, _.filter = function(D) {
19005
- return arguments.length ? (r = typeof D == "function" ? D : Ei(!!D), _) : r;
19006
- }, _.touchable = function(D) {
19007
- return arguments.length ? (i = typeof D == "function" ? D : Ei(!!D), _) : i;
19008
- }, _.extent = function(D) {
19009
- return arguments.length ? (e = typeof D == "function" ? D : Ei([[+D[0][0], +D[0][1]], [+D[1][0], +D[1][1]]]), _) : e;
19010
- }, _.scaleExtent = function(D) {
19011
- return arguments.length ? (s[0] = +D[0], s[1] = +D[1], _) : [s[0], s[1]];
19012
- }, _.translateExtent = function(D) {
19013
- return arguments.length ? (o[0][0] = +D[0][0], o[1][0] = +D[1][0], o[0][1] = +D[0][1], o[1][1] = +D[1][1], _) : [[o[0][0], o[0][1]], [o[1][0], o[1][1]]];
19014
- }, _.constrain = function(D) {
19015
- return arguments.length ? (t = D, _) : t;
19016
- }, _.duration = function(D) {
19017
- return arguments.length ? (l = +D, _) : l;
19018
- }, _.interpolate = function(D) {
19019
- return arguments.length ? (a = D, _) : a;
19020
- }, _.on = function() {
19005
+ return b.wheelDelta = function(D) {
19006
+ return arguments.length ? (n = typeof D == "function" ? D : Ei(+D), b) : n;
19007
+ }, b.filter = function(D) {
19008
+ return arguments.length ? (r = typeof D == "function" ? D : Ei(!!D), b) : r;
19009
+ }, b.touchable = function(D) {
19010
+ return arguments.length ? (i = typeof D == "function" ? D : Ei(!!D), b) : i;
19011
+ }, b.extent = function(D) {
19012
+ return arguments.length ? (e = typeof D == "function" ? D : Ei([[+D[0][0], +D[0][1]], [+D[1][0], +D[1][1]]]), b) : e;
19013
+ }, b.scaleExtent = function(D) {
19014
+ return arguments.length ? (s[0] = +D[0], s[1] = +D[1], b) : [s[0], s[1]];
19015
+ }, b.translateExtent = function(D) {
19016
+ return arguments.length ? (o[0][0] = +D[0][0], o[1][0] = +D[1][0], o[0][1] = +D[0][1], o[1][1] = +D[1][1], b) : [[o[0][0], o[0][1]], [o[1][0], o[1][1]]];
19017
+ }, b.constrain = function(D) {
19018
+ return arguments.length ? (t = D, b) : t;
19019
+ }, b.duration = function(D) {
19020
+ return arguments.length ? (l = +D, b) : l;
19021
+ }, b.interpolate = function(D) {
19022
+ return arguments.length ? (a = D, b) : a;
19023
+ }, b.on = function() {
19021
19024
  var D = u.on.apply(u, arguments);
19022
- return D === u ? _ : D;
19023
- }, _.clickDistance = function(D) {
19024
- return arguments.length ? (m = (D = +D) * D, _) : Math.sqrt(m);
19025
- }, _.tapDistance = function(D) {
19026
- return arguments.length ? (x = +D, _) : x;
19027
- }, _;
19025
+ return D === u ? b : D;
19026
+ }, b.clickDistance = function(D) {
19027
+ return arguments.length ? (m = (D = +D) * D, b) : Math.sqrt(m);
19028
+ }, b.tapDistance = function(D) {
19029
+ return arguments.length ? (x = +D, b) : x;
19030
+ }, b;
19028
19031
  }
19029
19032
  function G2(r = {}) {
19030
19033
  const {
@@ -19040,50 +19043,50 @@ function G2(r = {}) {
19040
19043
  Te(() => {
19041
19044
  if (!l.current) return;
19042
19045
  const x = V2().scaleExtent([e, t]).filter((y) => !i && y.type === "wheel" || !s && (y.type === "mousedown" || y.type === "touchstart") ? !1 : y.type === "wheel" ? i : y.type === "mousedown" || y.type === "touchstart" ? y.target.closest("[data-qmap-node]") ? !1 : s : !0).on("zoom", (y) => {
19043
- const v = {
19046
+ const _ = {
19044
19047
  x: y.transform.x,
19045
19048
  y: y.transform.y,
19046
19049
  k: y.transform.k
19047
19050
  };
19048
- c(v), o == null || o(v);
19051
+ c(_), o == null || o(_);
19049
19052
  });
19050
19053
  a.current = x;
19051
- const _ = $t(l.current);
19052
- return _.call(x), _.on("dblclick.zoom", null), n && _.call(
19054
+ const b = $t(l.current);
19055
+ return b.call(x), b.on("dblclick.zoom", null), n && b.call(
19053
19056
  x.transform,
19054
19057
  as.translate(n.x, n.y).scale(n.k)
19055
19058
  ), () => {
19056
- _.on(".zoom", null);
19059
+ b.on(".zoom", null);
19057
19060
  };
19058
19061
  }, [e, t, i, s]), Te(() => {
19059
19062
  a.current && a.current.on("zoom", (x) => {
19060
- const _ = {
19063
+ const b = {
19061
19064
  x: x.transform.x,
19062
19065
  y: x.transform.y,
19063
19066
  k: x.transform.k
19064
19067
  };
19065
- c(_), o == null || o(_);
19068
+ c(b), o == null || o(b);
19066
19069
  });
19067
19070
  }, [o]);
19068
- const d = Q((x, _, y, v = !0) => {
19071
+ const d = Q((x, b, y, _ = !0) => {
19069
19072
  if (!l.current || !a.current) return;
19070
- const C = $t(l.current), E = as.translate(x, _).scale(y);
19071
- C.call(a.current.transform, E);
19073
+ const C = $t(l.current), k = as.translate(x, b).scale(y);
19074
+ C.call(a.current.transform, k);
19072
19075
  }, []), f = Q(() => {
19073
19076
  !l.current || !a.current || $t(l.current).call(a.current.scaleBy, 1.3);
19074
19077
  }, []), p = Q(() => {
19075
19078
  !l.current || !a.current || $t(l.current).call(a.current.scaleBy, 0.7);
19076
19079
  }, []), g = Q(() => {
19077
19080
  d(0, 0, 1, !0);
19078
- }, [d]), m = Q((x, _ = 50) => {
19081
+ }, [d]), m = Q((x, b = 50) => {
19079
19082
  if (!l.current || !a.current || x.length === 0) return;
19080
- const v = l.current.getBoundingClientRect();
19081
- let C = 1 / 0, E = 1 / 0, w = -1 / 0, b = -1 / 0;
19083
+ const _ = l.current.getBoundingClientRect();
19084
+ let C = 1 / 0, k = 1 / 0, w = -1 / 0, v = -1 / 0;
19082
19085
  for (const I of x) {
19083
19086
  const V = I.width || 200, U = I.height || 100;
19084
- C = Math.min(C, I.x), E = Math.min(E, I.y), w = Math.max(w, I.x + V), b = Math.max(b, I.y + U);
19087
+ C = Math.min(C, I.x), k = Math.min(k, I.y), w = Math.max(w, I.x + V), v = Math.max(v, I.y + U);
19085
19088
  }
19086
- const k = w - C, B = b - E, A = (v.width - _ * 2) / k, T = (v.height - _ * 2) / B, F = Math.min(A, T, t), R = (C + w) / 2, D = (E + b) / 2, N = v.width / 2 - R * F, M = v.height / 2 - D * F;
19089
+ const E = w - C, B = v - k, A = (_.width - b * 2) / E, T = (_.height - b * 2) / B, F = Math.min(A, T, t), R = (C + w) / 2, D = (k + v) / 2, N = _.width / 2 - R * F, M = _.height / 2 - D * F;
19087
19090
  d(N, M, F, !0);
19088
19091
  }, [t, d]);
19089
19092
  return {
@@ -19107,47 +19110,47 @@ function K2(r) {
19107
19110
  Te(() => {
19108
19111
  g.current = e;
19109
19112
  }, [e]);
19110
- const m = Q((v, C) => {
19111
- const E = g.current;
19113
+ const m = Q((_, C) => {
19114
+ const k = g.current;
19112
19115
  return {
19113
- x: (v - E.x) / E.k,
19114
- y: (C - E.y) / E.k
19116
+ x: (_ - k.x) / k.k,
19117
+ y: (C - k.y) / k.k
19115
19118
  };
19116
- }, []), x = Q((v, C) => {
19119
+ }, []), x = Q((_, C) => {
19117
19120
  if (s) return;
19118
19121
  C.preventDefault(), C.stopPropagation();
19119
- const E = C.currentTarget, w = parseFloat(E.dataset.x || "0"), b = parseFloat(E.dataset.y || "0");
19122
+ const k = C.currentTarget, w = parseFloat(k.dataset.x || "0"), v = parseFloat(k.dataset.y || "0");
19120
19123
  f.current = {
19121
19124
  x: C.clientX,
19122
19125
  y: C.clientY,
19123
19126
  nodeX: w,
19124
- nodeY: b
19125
- }, p.current = { x: w, y: b }, l(v), u(!0), d({ x: 0, y: 0 }), t == null || t(v);
19126
- }, [s, m, t]), _ = Q((v) => {
19127
+ nodeY: v
19128
+ }, p.current = { x: w, y: v }, l(_), u(!0), d({ x: 0, y: 0 }), t == null || t(_);
19129
+ }, [s, m, t]), b = Q((_) => {
19127
19130
  if (!a || !o || !f.current) return;
19128
- const C = g.current, E = f.current, w = v.clientX - E.x, b = v.clientY - E.y, k = w / C.k, B = b / C.k, A = E.nodeX + k, T = E.nodeY + B;
19129
- p.current = { x: A, y: T }, d({ x: k, y: B }), n == null || n(o, A, T, k, B);
19131
+ const C = g.current, k = f.current, w = _.clientX - k.x, v = _.clientY - k.y, E = w / C.k, B = v / C.k, A = k.nodeX + E, T = k.nodeY + B;
19132
+ p.current = { x: A, y: T }, d({ x: E, y: B }), n == null || n(o, A, T, E, B);
19130
19133
  }, [a, o, n]), y = Q(() => {
19131
19134
  if (!a || !o) return;
19132
- const v = p.current;
19133
- i == null || i(o, v.x, v.y), l(null), u(!1), d({ x: 0, y: 0 }), f.current = null;
19135
+ const _ = p.current;
19136
+ i == null || i(o, _.x, _.y), l(null), u(!1), d({ x: 0, y: 0 }), f.current = null;
19134
19137
  }, [a, o, i]);
19135
19138
  return Te(() => {
19136
19139
  if (!a) return;
19137
- const v = (E) => {
19138
- _(E);
19140
+ const _ = (k) => {
19141
+ b(k);
19139
19142
  }, C = () => {
19140
19143
  y();
19141
19144
  };
19142
- return window.addEventListener("mousemove", v), window.addEventListener("mouseup", C), () => {
19143
- window.removeEventListener("mousemove", v), window.removeEventListener("mouseup", C);
19145
+ return window.addEventListener("mousemove", _), window.addEventListener("mouseup", C), () => {
19146
+ window.removeEventListener("mousemove", _), window.removeEventListener("mouseup", C);
19144
19147
  };
19145
- }, [a, _, y]), {
19148
+ }, [a, b, y]), {
19146
19149
  draggedNodeId: o,
19147
19150
  isDragging: a,
19148
19151
  dragOffset: c,
19149
19152
  startDrag: x,
19150
- updateDrag: _,
19153
+ updateDrag: b,
19151
19154
  endDrag: y
19152
19155
  };
19153
19156
  }
@@ -19161,11 +19164,11 @@ function Y2(r) {
19161
19164
  } = r, [o, l] = O(/* @__PURE__ */ new Set()), a = i !== void 0, u = a ? new Set(i) : o, c = a ? (A) => {
19162
19165
  const T = typeof A == "function" ? A(u) : A;
19163
19166
  s == null || s(Array.from(T));
19164
- } : l, [d, f] = O(null), [p, g] = O(!1), m = me(null), x = me(e), _ = me(t);
19167
+ } : l, [d, f] = O(null), [p, g] = O(!1), m = me(null), x = me(e), b = me(t);
19165
19168
  Te(() => {
19166
19169
  x.current = e;
19167
19170
  }, [e]), Te(() => {
19168
- _.current = t;
19171
+ b.current = t;
19169
19172
  }, [t]);
19170
19173
  const y = Q((A, T) => {
19171
19174
  const F = x.current;
@@ -19173,8 +19176,8 @@ function Y2(r) {
19173
19176
  x: (A - F.x) / F.k,
19174
19177
  y: (T - F.y) / F.k
19175
19178
  };
19176
- }, []), v = Q((A, T) => {
19177
- const F = _.current.get(A);
19179
+ }, []), _ = Q((A, T) => {
19180
+ const F = b.current.get(A);
19178
19181
  if (!F) return !1;
19179
19182
  const R = F.width || 200, D = F.height || 100;
19180
19183
  return F.x < T.x + T.width && F.x + R > T.x && F.y < T.y + T.height && F.y + D > T.y;
@@ -19188,7 +19191,7 @@ function Y2(r) {
19188
19191
  width: 0,
19189
19192
  height: 0
19190
19193
  }), g(!0), A.shiftKey || c(/* @__PURE__ */ new Set());
19191
- }, [n, y]), E = Q((A) => {
19194
+ }, [n, y]), k = Q((A) => {
19192
19195
  if (!p || !m.current) return;
19193
19196
  const T = m.current, F = y(A.clientX, A.clientY), R = {
19194
19197
  x: Math.min(T.x, F.x),
@@ -19198,30 +19201,30 @@ function Y2(r) {
19198
19201
  };
19199
19202
  f(R);
19200
19203
  const D = /* @__PURE__ */ new Set();
19201
- for (const [N] of _.current)
19202
- v(N, R) && D.add(N);
19204
+ for (const [N] of b.current)
19205
+ _(N, R) && D.add(N);
19203
19206
  c(D);
19204
- }, [p, y, v]), w = Q(() => {
19207
+ }, [p, y, _]), w = Q(() => {
19205
19208
  p && (s == null || s(Array.from(u)), g(!1), f(null), m.current = null);
19206
19209
  }, [p, u, s]);
19207
19210
  Te(() => {
19208
19211
  if (!p) return;
19209
19212
  const A = (F) => {
19210
- E(F);
19213
+ k(F);
19211
19214
  }, T = () => {
19212
19215
  w();
19213
19216
  };
19214
19217
  return window.addEventListener("mousemove", A), window.addEventListener("mouseup", T), () => {
19215
19218
  window.removeEventListener("mousemove", A), window.removeEventListener("mouseup", T);
19216
19219
  };
19217
- }, [p, E, w]);
19218
- const b = Q((A, T = !1) => {
19220
+ }, [p, k, w]);
19221
+ const v = Q((A, T = !1) => {
19219
19222
  c((F) => {
19220
19223
  const R = new Set(T ? F : []);
19221
19224
  return F.has(A) && T ? R.delete(A) : R.add(A), s == null || s(Array.from(R)), R;
19222
19225
  });
19223
- }, [s]), k = Q(() => {
19224
- const A = new Set(_.current.keys());
19226
+ }, [s]), E = Q(() => {
19227
+ const A = new Set(b.current.keys());
19225
19228
  c(A), s == null || s(Array.from(A));
19226
19229
  }, [s]), B = Q(() => {
19227
19230
  c(/* @__PURE__ */ new Set()), s == null || s([]);
@@ -19232,10 +19235,10 @@ function Y2(r) {
19232
19235
  selectionBox: d,
19233
19236
  isSelecting: p,
19234
19237
  startSelection: C,
19235
- updateSelection: E,
19238
+ updateSelection: k,
19236
19239
  endSelection: w,
19237
- toggleSelect: b,
19238
- selectAll: k,
19240
+ toggleSelect: v,
19241
+ selectAll: E,
19239
19242
  clearSelection: B
19240
19243
  };
19241
19244
  }
@@ -19259,7 +19262,7 @@ const Q2 = us(function({
19259
19262
  y.stopPropagation(), a == null || a(y);
19260
19263
  }, [a]), g = Q((y) => {
19261
19264
  y.preventDefault(), y.stopPropagation(), u == null || u(y);
19262
- }, [u]), m = t.width || 200, x = t.height || 100, _ = t.rotation || 0;
19265
+ }, [u]), m = t.width || 200, x = t.height || 100, b = t.rotation || 0;
19263
19266
  return /* @__PURE__ */ h.jsx(
19264
19267
  "div",
19265
19268
  {
@@ -19272,7 +19275,7 @@ const Q2 = us(function({
19272
19275
  top: t.y,
19273
19276
  width: m,
19274
19277
  height: x,
19275
- transform: _ !== 0 ? `rotate(${_}deg)` : void 0,
19278
+ transform: b !== 0 ? `rotate(${b}deg)` : void 0,
19276
19279
  transformOrigin: "center center",
19277
19280
  cursor: s ? i ? "grabbing" : "grab" : "pointer",
19278
19281
  userSelect: "none",
@@ -19555,14 +19558,14 @@ function Vy({
19555
19558
  onTransformChange: g,
19556
19559
  minZoom: m = uy,
19557
19560
  maxZoom: x = cy,
19558
- initialTransform: _,
19561
+ initialTransform: b,
19559
19562
  defaultEdgeStyle: y = oy,
19560
- defaultEdgeColor: v = ay,
19563
+ defaultEdgeColor: _ = ay,
19561
19564
  defaultEdgeWidth: C = ly,
19562
- draggable: E = !0,
19565
+ draggable: k = !0,
19563
19566
  selectable: w = !0,
19564
- zoomable: b = !0,
19565
- pannable: k = !0,
19567
+ zoomable: v = !0,
19568
+ pannable: E = !0,
19566
19569
  className: B = "",
19567
19570
  style: A,
19568
19571
  background: T = "#f8fafc",
@@ -19593,9 +19596,9 @@ function Vy({
19593
19596
  } = G2({
19594
19597
  minZoom: m,
19595
19598
  maxZoom: x,
19596
- initialTransform: _ || D.transform,
19597
- zoomable: b,
19598
- pannable: k,
19599
+ initialTransform: b || D.transform,
19600
+ zoomable: v,
19601
+ pannable: E,
19599
19602
  onTransformChange: (Y) => {
19600
19603
  g == null || g(Y);
19601
19604
  const L = {
@@ -19611,7 +19614,7 @@ function Vy({
19611
19614
  // endDrag - handled internally by hook
19612
19615
  } = K2({
19613
19616
  transform: I,
19614
- disabled: !E,
19617
+ disabled: !k,
19615
19618
  onDragStart: (Y) => {
19616
19619
  const L = M.get(Y);
19617
19620
  L && se(/* @__PURE__ */ new Map([[Y, { x: L.x, y: L.y }]]));
@@ -19667,7 +19670,7 @@ function Vy({
19667
19670
  background: T,
19668
19671
  backgroundImage: He,
19669
19672
  backgroundSize: F ? `${R}px ${R}px` : void 0,
19670
- cursor: _e ? "crosshair" : k ? "grab" : "default",
19673
+ cursor: _e ? "crosshair" : E ? "grab" : "default",
19671
19674
  ...A
19672
19675
  },
19673
19676
  onMouseDown: ze,
@@ -19690,7 +19693,7 @@ function Vy({
19690
19693
  edges: t,
19691
19694
  nodePositions: ke,
19692
19695
  defaultStyle: y,
19693
- defaultColor: v,
19696
+ defaultColor: _,
19694
19697
  defaultWidth: C,
19695
19698
  onEdgeClick: f
19696
19699
  }
@@ -19704,7 +19707,7 @@ function Vy({
19704
19707
  position: L,
19705
19708
  isSelected: xe,
19706
19709
  isDragging: Ke,
19707
- draggable: E,
19710
+ draggable: k,
19708
19711
  onDragStart: fe,
19709
19712
  onClick: (z) => Se(Y, z),
19710
19713
  onDoubleClick: (z) => a == null ? void 0 : a(Y, z),