@fileverse-dev/ddoc 2.4.16-patch-1 → 2.4.17-html-export-patch-1

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.
@@ -2,7 +2,7 @@ var p7e = Object.defineProperty;
2
2
  var g7e = (e, t, n) => t in e ? p7e(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
3
3
  var ct = (e, t, n) => g7e(e, typeof t != "symbol" ? t + "" : t, n);
4
4
  import * as $ from "react";
5
- import Ne, { createContext as qn, useContext as At, useRef as rt, useState as Re, useDebugValue as Y_, useEffect as He, forwardRef as Rn, createElement as Qe, memo as Kd, useCallback as We, useLayoutEffect as Rs, useMemo as It, useId as Dg, Children as soe, isValidElement as loe, useInsertionEffect as Jw, createRef as x1, Fragment as Yd, Suspense as m7e, Component as X_, cloneElement as uoe, useImperativeHandle as coe } from "react";
5
+ import Ne, { createContext as qn, useContext as At, useRef as rt, useState as Re, useDebugValue as Y_, useEffect as He, forwardRef as Rn, createElement as Qe, memo as Kd, useCallback as We, useLayoutEffect as Rs, useMemo as Nt, useId as Dg, Children as soe, isValidElement as loe, useInsertionEffect as Jw, createRef as x1, Fragment as Yd, Suspense as m7e, Component as X_, cloneElement as uoe, useImperativeHandle as coe } from "react";
6
6
  import * as Nb from "react-dom";
7
7
  import J_, { flushSync as y7e, createPortal as doe } from "react-dom";
8
8
  var Jt = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
@@ -12703,7 +12703,7 @@ function _T(e) {
12703
12703
  }
12704
12704
  });
12705
12705
  }
12706
- function _t(e) {
12706
+ function It(e) {
12707
12707
  return new Sa({
12708
12708
  find: e.find,
12709
12709
  handler: ({ state: t, range: n, match: r }) => {
@@ -46899,7 +46899,7 @@ const ADt = ({ children: e, initial: t, isPresent: n, onExitComplete: r, custom:
46899
46899
  if (!f)
46900
46900
  return;
46901
46901
  r && r();
46902
- }, [s, r]), c = It(
46902
+ }, [s, r]), c = Nt(
46903
46903
  () => ({
46904
46904
  id: l,
46905
46905
  initial: t,
@@ -46915,7 +46915,7 @@ const ADt = ({ children: e, initial: t, isPresent: n, onExitComplete: r, custom:
46915
46915
  */
46916
46916
  i ? [Math.random(), u] : [n, u]
46917
46917
  );
46918
- return It(() => {
46918
+ return Nt(() => {
46919
46919
  s.forEach((d, f) => s.set(f, !1));
46920
46920
  }, [n]), $.useEffect(() => {
46921
46921
  !n && !s.size && r && r();
@@ -46943,7 +46943,7 @@ function DW(e) {
46943
46943
  }), t;
46944
46944
  }
46945
46945
  const tB = typeof window < "u", Cse = tB ? Rs : He, TDt = ({ children: e, custom: t, initial: n = !0, onExitComplete: r, presenceAffectsLayout: o = !0, mode: i = "sync", propagate: a = !1 }) => {
46946
- const [s, l] = Dse(a), u = It(() => DW(e), [e]), c = a && !s ? [] : u.map(x5), d = rt(!0), f = rt(u), h = QI(() => /* @__PURE__ */ new Map()), [p, g] = Re(u), [m, y] = Re(u);
46946
+ const [s, l] = Dse(a), u = Nt(() => DW(e), [e]), c = a && !s ? [] : u.map(x5), d = rt(!0), f = rt(u), h = QI(() => /* @__PURE__ */ new Map()), [p, g] = Re(u), [m, y] = Re(u);
46947
46947
  Cse(() => {
46948
46948
  d.current = !1, f.current = u;
46949
46949
  for (let x = 0; x < m.length; x++) {
@@ -47199,7 +47199,7 @@ function PDt(e, t) {
47199
47199
  }
47200
47200
  function zDt(e) {
47201
47201
  const { initial: t, animate: n } = PDt(e, At(T7));
47202
- return It(() => ({ initial: t, animate: n }), [EW(t), EW(n)]);
47202
+ return Nt(() => ({ initial: t, animate: n }), [EW(t), EW(n)]);
47203
47203
  }
47204
47204
  function EW(e) {
47205
47205
  return Array.isArray(e) ? e.join(" ") : e;
@@ -47742,7 +47742,7 @@ function qse(e, t, n) {
47742
47742
  !ii(t[r]) && !Use(r, n) && (e[r] = t[r]);
47743
47743
  }
47744
47744
  function bCt({ transformTemplate: e }, t) {
47745
- return It(() => {
47745
+ return Nt(() => {
47746
47746
  const n = hB();
47747
47747
  return dB(n, t, e), Object.assign({}, n.vars, n.style);
47748
47748
  }, [t]);
@@ -47756,7 +47756,7 @@ function xCt(e, t) {
47756
47756
  return e.drag && e.dragListener !== !1 && (n.draggable = !1, r.userSelect = r.WebkitUserSelect = r.WebkitTouchCallout = "none", r.touchAction = e.drag === !0 ? "none" : `pan-${e.drag === "x" ? "y" : "x"}`), e.tabIndex === void 0 && (e.onTap || e.onTapStart || e.whileTap) && (n.tabIndex = 0), n.style = r, n;
47757
47757
  }
47758
47758
  function wCt(e, t, n, r) {
47759
- const o = It(() => {
47759
+ const o = Nt(() => {
47760
47760
  const i = Ose();
47761
47761
  return fB(i, t, pB(r), e.transformTemplate), {
47762
47762
  ...i.attrs,
@@ -47771,7 +47771,7 @@ function wCt(e, t, n, r) {
47771
47771
  }
47772
47772
  function kCt(e = !1) {
47773
47773
  return (t, n, r, { latestValues: o }, i) => {
47774
- const a = (sB(t) ? wCt : xCt)(n, o, i, t), s = ODt(n, typeof t == "string", e), l = t !== Yd ? { ...s, ...a, ref: r } : {}, { children: u } = n, c = It(() => ii(u) ? u.get() : u, [u]);
47774
+ const a = (sB(t) ? wCt : xCt)(n, o, i, t), s = ODt(n, typeof t == "string", e), l = t !== Yd ? { ...s, ...a, ref: r } : {}, { children: u } = n, c = Nt(() => ii(u) ? u.get() : u, [u]);
47775
47775
  return Qe(t, {
47776
47776
  ...l,
47777
47777
  children: c
@@ -57991,7 +57991,7 @@ function ENt({ activeSnapPointProp: e, setActiveSnapPointProp: t, snapPoints: n,
57991
57991
  const ANt = () => () => {
57992
57992
  };
57993
57993
  function SNt() {
57994
- const { direction: e, isOpen: t, shouldScaleBackground: n, setBackgroundColorOnScale: r, noBodyStyles: o } = Qb(), i = Ne.useRef(null), a = It(() => document.body.style.backgroundColor, []);
57994
+ const { direction: e, isOpen: t, shouldScaleBackground: n, setBackgroundColorOnScale: r, noBodyStyles: o } = Qb(), i = Ne.useRef(null), a = Nt(() => document.body.style.backgroundColor, []);
57995
57995
  function s() {
57996
57996
  return (window.innerWidth - Tj) / window.innerWidth;
57997
57997
  }
@@ -76773,7 +76773,7 @@ function FIt() {
76773
76773
  }
76774
76774
  function s0e() {
76775
76775
  var e = rt({}), t = vIt();
76776
- return It(function() {
76776
+ return Nt(function() {
76777
76777
  var n = parseFloat("" + t);
76778
76778
  return !t || Number.isNaN(n) ? e.current : rk.reduce(function(r, o) {
76779
76779
  return CIt(o, n) && (r[Mi(o)] = !0), r;
@@ -77258,7 +77258,7 @@ function tBt() {
77258
77258
  nBt(), rBt(), oBt(), iBt(), aBt();
77259
77259
  }
77260
77260
  function nBt() {
77261
- var e = o6(), t = x0e(), n = _It(), r = s0(), o = kh(), i = m0e(), a = qIt(), s = wh(), l = It(function() {
77261
+ var e = o6(), t = x0e(), n = _It(), r = s0(), o = kh(), i = m0e(), a = qIt(), s = wh(), l = Nt(function() {
77262
77262
  return function(u) {
77263
77263
  var c = u.key;
77264
77264
  switch (a(), c) {
@@ -77281,7 +77281,7 @@ function nBt() {
77281
77281
  }, [e, r, n, l]);
77282
77282
  }
77283
77283
  function rBt() {
77284
- var e = WIt(), t = o6(), n = Us(), r = s0(), o = r6(), i = o[1], a = F0e(), s = kO(), l = It(function() {
77284
+ var e = WIt(), t = o6(), n = Us(), r = s0(), o = r6(), i = o[1], a = F0e(), s = kO(), l = Nt(function() {
77285
77285
  return function(u) {
77286
77286
  var c = u.key;
77287
77287
  switch (c) {
@@ -77308,7 +77308,7 @@ function rBt() {
77308
77308
  }, [t, r, l]);
77309
77309
  }
77310
77310
  function oBt() {
77311
- var e = vO(), t = kh(), n = s0(), r = F0e(), o = r6(), i = o[0], a = o[1], s = k0e(), l = kO(), u = FO(), c = It(function() {
77311
+ var e = vO(), t = kh(), n = s0(), r = F0e(), o = r6(), i = o[0], a = o[1], s = k0e(), l = kO(), u = FO(), c = Nt(function() {
77312
77312
  return (
77313
77313
  // eslint-disable-next-line complexity
77314
77314
  function(d) {
@@ -77360,7 +77360,7 @@ function oBt() {
77360
77360
  }, [e, n, i, c]);
77361
77361
  }
77362
77362
  function iBt() {
77363
- var e = kh(), t = xO(), n = Us(), r = FO(), o = It(function() {
77363
+ var e = kh(), t = xO(), n = Us(), r = FO(), o = Nt(function() {
77364
77364
  return function(i) {
77365
77365
  var a = i.key;
77366
77366
  switch (a) {
@@ -77391,7 +77391,7 @@ function iBt() {
77391
77391
  }, [t, n, o]);
77392
77392
  }
77393
77393
  function aBt() {
77394
- var e = Us(), t = sBt(), n = w0e(), r = m0e(), o = wh(), i = FO(), a = It(function() {
77394
+ var e = Us(), t = sBt(), n = w0e(), r = m0e(), o = wh(), i = FO(), a = Nt(function() {
77395
77395
  return (
77396
77396
  // eslint-disable-next-line complexity
77397
77397
  function(s) {
@@ -78349,7 +78349,7 @@ function qBt() {
78349
78349
  }, []), t || ZC;
78350
78350
  }
78351
78351
  function VBt(e) {
78352
- var t = e.categoryConfig, n = u0e(), r = n[0], o = qBt(), i = pIt(), a = xh(), s = It(
78352
+ var t = e.categoryConfig, n = u0e(), r = n[0], o = qBt(), i = pIt(), a = xh(), s = Nt(
78353
78353
  function() {
78354
78354
  var u;
78355
78355
  return (u = U0e(i)) != null ? u : [];
@@ -89868,7 +89868,7 @@ async function Sk(e, t) {
89868
89868
  });
89869
89869
  return V === "0x" ? { data: void 0 } : { data: V };
89870
89870
  } catch (B) {
89871
- const L = OWt(B), { offchainLookup: j, offchainLookupSignature: N } = await import("./ccip-CCzKwLTp.mjs");
89871
+ const L = OWt(B), { offchainLookup: j, offchainLookupSignature: N } = await import("./ccip-BbP4r45C.mjs");
89872
89872
  if (e.ccipRead !== !1 && (L == null ? void 0 : L.slice(0, 10)) === N && b)
89873
89873
  return { data: await j(e, { data: L, to: b }) };
89874
89874
  throw S && (L == null ? void 0 : L.slice(0, 10)) === "0x101bb98d" ? new qVt({ factory: c }) : cpe(B, {
@@ -95132,7 +95132,7 @@ const h2e = qn(void 0), QZt = ({
95132
95132
  }
95133
95133
  },
95134
95134
  [Z, se, d]
95135
- ), I = It(
95135
+ ), I = Nt(
95136
95136
  () => n.find((Se) => Se.id === a),
95137
95137
  [n, a]
95138
95138
  );
@@ -95297,12 +95297,12 @@ const h2e = qn(void 0), QZt = ({
95297
95297
  Se.currentTarget.style.height = `${qe}px`;
95298
95298
  },
95299
95299
  []
95300
- ), ke = It(
95300
+ ), ke = Nt(
95301
95301
  () => n.filter(
95302
95302
  (Se) => !Se.resolved && Se.selectedContent && Se.selectedContent.length > 0 && !Se.deleted
95303
95303
  ),
95304
95304
  [n]
95305
- ), Ae = It(
95305
+ ), Ae = Nt(
95306
95306
  () => ke.findIndex((Se) => Se.id === a),
95307
95307
  [ke, a]
95308
95308
  ), Le = We(() => {
@@ -95327,7 +95327,7 @@ const h2e = qn(void 0), QZt = ({
95327
95327
  t.commands.setTextSelection({ from: Ue, to: Je }), he(Pe.id || "");
95328
95328
  }
95329
95329
  }
95330
- }, [Ae, ke, t, he]), Oe = It(
95330
+ }, [Ae, ke, t, he]), Oe = Nt(
95331
95331
  () => ({
95332
95332
  comments: n,
95333
95333
  showResolved: D,
@@ -105802,7 +105802,7 @@ const Pen = {
105802
105802
  isPresentationMode: n,
105803
105803
  isCollaboratorsDoc: r
105804
105804
  }) => {
105805
- const o = It(
105805
+ const o = Nt(
105806
105806
  () => ({ isPreviewMode: t, isPresentationMode: n, isCollaboratorsDoc: r }),
105807
105807
  [t, n, r]
105808
105808
  );
@@ -105868,7 +105868,7 @@ const qen = ({ children: e, initial: t, isPresent: n, onExitComplete: r, custom:
105868
105868
  if (!f)
105869
105869
  return;
105870
105870
  r && r();
105871
- }, [s, r]), c = It(
105871
+ }, [s, r]), c = Nt(
105872
105872
  () => ({
105873
105873
  id: l,
105874
105874
  initial: t,
@@ -105884,7 +105884,7 @@ const qen = ({ children: e, initial: t, isPresent: n, onExitComplete: r, custom:
105884
105884
  */
105885
105885
  i ? [Math.random(), u] : [n, u]
105886
105886
  );
105887
- return It(() => {
105887
+ return Nt(() => {
105888
105888
  s.forEach((d, f) => s.set(f, !1));
105889
105889
  }, [n]), $.useEffect(() => {
105890
105890
  !n && !s.size && r && r();
@@ -105912,7 +105912,7 @@ function SK(e) {
105912
105912
  }), t;
105913
105913
  }
105914
105914
  const rP = typeof window < "u", Cge = rP ? Rs : He, Wg = ({ children: e, custom: t, initial: n = !0, onExitComplete: r, presenceAffectsLayout: o = !0, mode: i = "sync", propagate: a = !1 }) => {
105915
- const [s, l] = Dge(a), u = It(() => SK(e), [e]), c = a && !s ? [] : u.map(G5), d = rt(!0), f = rt(u), h = tP(() => /* @__PURE__ */ new Map()), [p, g] = Re(u), [m, y] = Re(u);
105915
+ const [s, l] = Dge(a), u = Nt(() => SK(e), [e]), c = a && !s ? [] : u.map(G5), d = rt(!0), f = rt(u), h = tP(() => /* @__PURE__ */ new Map()), [p, g] = Re(u), [m, y] = Re(u);
105916
105916
  Cge(() => {
105917
105917
  d.current = !1, f.current = u;
105918
105918
  for (let x = 0; x < m.length; x++) {
@@ -106168,7 +106168,7 @@ function Qen(e, t) {
106168
106168
  }
106169
106169
  function etn(e) {
106170
106170
  const { initial: t, animate: n } = Qen(e, At(Zk));
106171
- return It(() => ({ initial: t, animate: n }), [LK(t), LK(n)]);
106171
+ return Nt(() => ({ initial: t, animate: n }), [LK(t), LK(n)]);
106172
106172
  }
106173
106173
  function LK(e) {
106174
106174
  return Array.isArray(e) ? e.join(" ") : e;
@@ -106711,7 +106711,7 @@ function qge(e, t, n) {
106711
106711
  !ai(t[r]) && !Uge(r, n) && (e[r] = t[r]);
106712
106712
  }
106713
106713
  function Ltn({ transformTemplate: e }, t) {
106714
- return It(() => {
106714
+ return Nt(() => {
106715
106715
  const n = gP();
106716
106716
  return hP(n, t, e), Object.assign({}, n.vars, n.style);
106717
106717
  }, [t]);
@@ -106725,7 +106725,7 @@ function _tn(e, t) {
106725
106725
  return e.drag && e.dragListener !== !1 && (n.draggable = !1, r.userSelect = r.WebkitUserSelect = r.WebkitTouchCallout = "none", r.touchAction = e.drag === !0 ? "none" : `pan-${e.drag === "x" ? "y" : "x"}`), e.tabIndex === void 0 && (e.onTap || e.onTapStart || e.whileTap) && (n.tabIndex = 0), n.style = r, n;
106726
106726
  }
106727
106727
  function Itn(e, t, n, r) {
106728
- const o = It(() => {
106728
+ const o = Nt(() => {
106729
106729
  const i = Oge();
106730
106730
  return pP(i, t, mP(r), e.transformTemplate), {
106731
106731
  ...i.attrs,
@@ -106740,7 +106740,7 @@ function Itn(e, t, n, r) {
106740
106740
  }
106741
106741
  function Btn(e = !1) {
106742
106742
  return (n, r, o, { latestValues: i }, a) => {
106743
- const l = (uP(n) ? Itn : _tn)(r, i, a, n), u = Xen(r, typeof n == "string", e), c = n !== Yd ? { ...u, ...l, ref: o } : {}, { children: d } = r, f = It(() => ai(d) ? d.get() : d, [d]);
106743
+ const l = (uP(n) ? Itn : _tn)(r, i, a, n), u = Xen(r, typeof n == "string", e), c = n !== Yd ? { ...u, ...l, ref: o } : {}, { children: d } = r, f = Nt(() => ai(d) ? d.get() : d, [d]);
106744
106744
  return Qe(n, {
106745
106745
  ...c,
106746
106746
  children: f
@@ -122688,7 +122688,7 @@ const g1n = (e) => ({
122688
122688
  });
122689
122689
  }, Lye = ({ tweet: e, components: t }) => {
122690
122690
  var n;
122691
- const r = It(() => g1n(e), [
122691
+ const r = Nt(() => g1n(e), [
122692
122692
  e
122693
122693
  ]);
122694
122694
  return /* @__PURE__ */ E.jsxs(pz, {
@@ -123232,7 +123232,7 @@ const _E = Ne.use || // This extra generic is to avoid TypeScript mixing up the
123232
123232
  return !1;
123233
123233
  }
123234
123234
  return !0;
123235
- }, j = It(() => {
123235
+ }, j = Nt(() => {
123236
123236
  const ye = !y || !t ? !1 : En(s) ? C().isPaused() || i ? !1 : l !== !1 : s, I = (Fe) => {
123237
123237
  const Me = Ud(Fe);
123238
123238
  return delete Me._k, ye ? {
@@ -123585,20 +123585,20 @@ const m0n = ({
123585
123585
  x += (k == null ? void 0 : k.nodeSize) || 1;
123586
123586
  }
123587
123587
  return b;
123588
- }, []), c = It(() => {
123588
+ }, []), c = Nt(() => {
123589
123589
  var y, b;
123590
123590
  const { content: m } = e.content;
123591
123591
  return ((b = (y = m == null ? void 0 : m[0]) == null ? void 0 : y.type) == null ? void 0 : b.name) === "heading";
123592
- }, [e.content]), d = It(() => {
123592
+ }, [e.content]), d = Nt(() => {
123593
123593
  var y;
123594
123594
  const { content: m } = e.content;
123595
123595
  return (y = m == null ? void 0 : m[0]) == null ? void 0 : y.attrs.textAlign;
123596
- }, [e.content]), f = It(() => {
123596
+ }, [e.content]), f = Nt(() => {
123597
123597
  var b;
123598
123598
  if (!c) return null;
123599
123599
  const { content: m } = e.content, y = m == null ? void 0 : m[0];
123600
123600
  return ((b = y == null ? void 0 : y.attrs) == null ? void 0 : b.id) || `heading-${t()}`;
123601
- }, [c, e.content, t]), h = It(() => f ? r.has(f) : !1, [f, r]), p = It(() => {
123601
+ }, [c, e.content, t]), h = Nt(() => f ? r.has(f) : !1, [f, r]), p = Nt(() => {
123602
123602
  if (!e || !n) return !1;
123603
123603
  const m = t(), { headingMap: y } = l();
123604
123604
  if (c && f) {
@@ -123789,7 +123789,7 @@ function y0n(e) {
123789
123789
  return e.on("update", o), () => {
123790
123790
  e.off("update", o);
123791
123791
  };
123792
- }, [e, r]), It(
123792
+ }, [e, r]), Nt(
123793
123793
  () => ({
123794
123794
  hasAIWriter: t.current,
123795
123795
  canCreateAIWriter: !t.current
@@ -123840,7 +123840,7 @@ const b0n = (e, t, n, r) => {
123840
123840
  const u = new Set(l);
123841
123841
  return s.forEach((c) => u.delete(c)), u;
123842
123842
  });
123843
- }, []), a = It(
123843
+ }, []), a = Nt(
123844
123844
  () => ({
123845
123845
  collapsedHeadings: n,
123846
123846
  setCollapsedHeadings: r,
@@ -127170,18 +127170,18 @@ const G0n = Ne.memo(
127170
127170
  }), D = We(() => {
127171
127171
  const { content: le } = e.content, ye = le[0].attrs.id, I = le[0].content.content[0].text, ce = Hye(I), ue = ye.replace(/-/g, "").substring(0, 8), Y = `heading=${ce}-${ue}`;
127172
127172
  i == null || i(Y);
127173
- }, [e.content, i]), C = It(() => {
127173
+ }, [e.content, i]), C = Nt(() => {
127174
127174
  const { content: le } = e.content;
127175
127175
  return le[0].type.name === "table";
127176
- }, [e.content]), S = It(() => {
127176
+ }, [e.content]), S = Nt(() => {
127177
127177
  var ye;
127178
127178
  const { content: le } = e.content;
127179
127179
  return (ye = le[0].content.content[0]) == null ? void 0 : ye.text;
127180
- }, [e.content]), z = It(() => {
127180
+ }, [e.content]), z = Nt(() => {
127181
127181
  var ye;
127182
127182
  const { content: le } = e.content;
127183
127183
  return (ye = le[0].content.content[1]) == null ? void 0 : ye.text;
127184
- }, [e.content]), P = It(() => {
127184
+ }, [e.content]), P = Nt(() => {
127185
127185
  const { content: le } = e.content;
127186
127186
  return le[0].content.content.find(
127187
127187
  (ye) => {
@@ -127268,7 +127268,7 @@ const G0n = Ne.memo(
127268
127268
  [r]
127269
127269
  ), G = We(() => {
127270
127270
  M(S) || P && M(P.text) ? B() : T();
127271
- }, [S, P]), V = It(
127271
+ }, [S, P]), V = Nt(
127272
127272
  () => bz(G, 1e3),
127273
127273
  [G]
127274
127274
  ), O = We(
@@ -127277,15 +127277,15 @@ const G0n = Ne.memo(
127277
127277
  n.commands.insertContentAt(ye - 4, le);
127278
127278
  },
127279
127279
  [t, n, e.nodeSize]
127280
- ), X = It(
127280
+ ), X = Nt(
127281
127281
  () => D0n(O),
127282
127282
  [O]
127283
- ), ae = It(
127283
+ ), ae = Nt(
127284
127284
  () => F0n(O),
127285
127285
  [O]
127286
127286
  ), ne = We(() => {
127287
127287
  u(!l), d(l ? 2 : ae.length);
127288
- }, [l, ae.length]), te = It(() => {
127288
+ }, [l, ae.length]), te = Nt(() => {
127289
127289
  switch (k) {
127290
127290
  case "center":
127291
127291
  return "justify-center";
@@ -127300,7 +127300,7 @@ const G0n = Ne.memo(
127300
127300
  He(() => {
127301
127301
  S && V();
127302
127302
  }, [S]);
127303
- const ie = It(() => {
127303
+ const ie = Nt(() => {
127304
127304
  const { doc: le, selection: ye } = n.state, I = t(), ce = le.nodeAt(I);
127305
127305
  if (!ce || ce.type.name !== "dBlock") return !1;
127306
127306
  const ue = ce === le.firstChild, Y = ce.content.firstChild;
@@ -132046,70 +132046,70 @@ const Npn = an.create({
132046
132046
  transformCopiedText: this.options.transformCopiedText
132047
132047
  })];
132048
132048
  }
132049
- }), Ipn = (e) => _t({
132049
+ }), Ipn = (e) => It({
132050
132050
  find: /--$/,
132051
132051
  replace: e ?? "—"
132052
- }), Bpn = (e) => _t({
132052
+ }), Bpn = (e) => It({
132053
132053
  find: /\.\.\.$/,
132054
132054
  replace: e ?? "…"
132055
- }), Opn = (e) => _t({
132055
+ }), Opn = (e) => It({
132056
132056
  find: /(?:^|[\s{[(<'"\u2018\u201C])(")$/,
132057
132057
  replace: e ?? "“"
132058
- }), Rpn = (e) => _t({
132058
+ }), Rpn = (e) => It({
132059
132059
  find: /"$/,
132060
132060
  replace: e ?? "”"
132061
- }), Ppn = (e) => _t({
132061
+ }), Ppn = (e) => It({
132062
132062
  find: /(?:^|[\s{[(<'"\u2018\u201C])(')$/,
132063
132063
  replace: e ?? "‘"
132064
- }), zpn = (e) => _t({
132064
+ }), zpn = (e) => It({
132065
132065
  find: /'$/,
132066
132066
  replace: e ?? "’"
132067
- }), Upn = (e) => _t({
132067
+ }), Upn = (e) => It({
132068
132068
  find: /<-$/,
132069
132069
  replace: e ?? "←"
132070
- }), Hpn = (e) => _t({
132070
+ }), Hpn = (e) => It({
132071
132071
  find: /->$/,
132072
132072
  replace: e ?? "→"
132073
- }), qpn = (e) => _t({
132073
+ }), qpn = (e) => It({
132074
132074
  find: /\(c\)$/,
132075
132075
  replace: e ?? "©"
132076
- }), Vpn = (e) => _t({
132076
+ }), Vpn = (e) => It({
132077
132077
  find: /\(tm\)$/,
132078
132078
  replace: e ?? "™"
132079
- }), Wpn = (e) => _t({
132079
+ }), Wpn = (e) => It({
132080
132080
  find: /\(sm\)$/,
132081
132081
  replace: e ?? "℠"
132082
- }), $pn = (e) => _t({
132082
+ }), $pn = (e) => It({
132083
132083
  find: /\(r\)$/,
132084
132084
  replace: e ?? "®"
132085
- }), Gpn = (e) => _t({
132085
+ }), Gpn = (e) => It({
132086
132086
  find: /(?:^|\s)(1\/2)\s$/,
132087
132087
  replace: e ?? "½"
132088
- }), Zpn = (e) => _t({
132088
+ }), Zpn = (e) => It({
132089
132089
  find: /\+\/-$/,
132090
132090
  replace: e ?? "±"
132091
- }), Kpn = (e) => _t({
132091
+ }), Kpn = (e) => It({
132092
132092
  find: /!=$/,
132093
132093
  replace: e ?? "≠"
132094
- }), Ypn = (e) => _t({
132094
+ }), Ypn = (e) => It({
132095
132095
  find: /<<$/,
132096
132096
  replace: e ?? "«"
132097
- }), Xpn = (e) => _t({
132097
+ }), Xpn = (e) => It({
132098
132098
  find: />>$/,
132099
132099
  replace: e ?? "»"
132100
- }), Jpn = (e) => _t({
132100
+ }), Jpn = (e) => It({
132101
132101
  find: /\d+\s?([*x])\s?\d+$/,
132102
132102
  replace: e ?? "×"
132103
- }), Qpn = (e) => _t({
132103
+ }), Qpn = (e) => It({
132104
132104
  find: /\^2$/,
132105
132105
  replace: e ?? "²"
132106
- }), e2n = (e) => _t({
132106
+ }), e2n = (e) => It({
132107
132107
  find: /\^3$/,
132108
132108
  replace: e ?? "³"
132109
- }), t2n = (e) => _t({
132109
+ }), t2n = (e) => It({
132110
132110
  find: /(?:^|\s)(1\/4)\s$/,
132111
132111
  replace: e ?? "¼"
132112
- }), n2n = (e) => _t({
132112
+ }), n2n = (e) => It({
132113
132113
  find: /(?:^|\s)(3\/4)\s$/,
132114
132114
  replace: e ?? "¾"
132115
132115
  }), r2n = an.create({
@@ -137140,7 +137140,10 @@ const m6n = async (e) => await x3n.format(e, {
137140
137140
  ${d}
137141
137141
  </body>
137142
137142
  </html>
137143
- `, p = await m6n(h), g = new Blob([p], {
137143
+ `, p = await m6n(h);
137144
+ if (n != null && n.returnHtmlFile)
137145
+ return u.destroy(), i(a), p;
137146
+ const g = new Blob([p], {
137144
137147
  type: "text/html;charset=utf-8"
137145
137148
  }), m = URL.createObjectURL(g);
137146
137149
  return u.destroy(), i(a), m;
@@ -153689,7 +153692,7 @@ var vxe = function e(t) {
153689
153692
  }, C9n = function(t) {
153690
153693
  var n = /^[\x00-\x20]*([^\\/#?]*?)(:|&#0*58|&#x0*3a|&colon)/i.exec(t);
153691
153694
  return n ? n[2] !== ":" || !/^[a-zA-Z][a-zA-Z0-9+\-.]*$/.test(n[1]) ? null : n[1].toLowerCase() : "_relative";
153692
- }, Nt = {
153695
+ }, _t = {
153693
153696
  contains: m9n,
153694
153697
  deflt: y9n,
153695
153698
  escape: k9n,
@@ -153850,7 +153853,7 @@ class FH {
153850
153853
  */
153851
153854
  isTrusted(t) {
153852
153855
  if (t.url && !t.protocol) {
153853
- var n = Nt.protocolFromUrl(t.url);
153856
+ var n = _t.protocolFromUrl(t.url);
153854
153857
  if (n == null)
153855
153858
  return !1;
153856
153859
  t.protocol = n;
@@ -154416,7 +154419,7 @@ let Q6 = class {
154416
154419
  this.children = void 0, this.classes = void 0, this.height = void 0, this.depth = void 0, this.maxFontSize = void 0, this.style = void 0, this.children = t, this.classes = [], this.height = 0, this.depth = 0, this.maxFontSize = 0, this.style = {};
154417
154420
  }
154418
154421
  hasClass(t) {
154419
- return Nt.contains(this.classes, t);
154422
+ return _t.contains(this.classes, t);
154420
154423
  }
154421
154424
  /** Convert the fragment into a node. */
154422
154425
  toNode() {
@@ -156988,16 +156991,16 @@ var g_ = {
156988
156991
  return n;
156989
156992
  }, Z9n = /[\s"'>/=\x00-\x1f]/, Dxe = function(t) {
156990
156993
  var n = "<" + t;
156991
- this.classes.length && (n += ' class="' + Nt.escape(Wd(this.classes)) + '"');
156994
+ this.classes.length && (n += ' class="' + _t.escape(Wd(this.classes)) + '"');
156992
156995
  var r = "";
156993
156996
  for (var o in this.style)
156994
- this.style.hasOwnProperty(o) && (r += Nt.hyphenate(o) + ":" + this.style[o] + ";");
156995
- r && (n += ' style="' + Nt.escape(r) + '"');
156997
+ this.style.hasOwnProperty(o) && (r += _t.hyphenate(o) + ":" + this.style[o] + ";");
156998
+ r && (n += ' style="' + _t.escape(r) + '"');
156996
156999
  for (var i in this.attributes)
156997
157000
  if (this.attributes.hasOwnProperty(i)) {
156998
157001
  if (Z9n.test(i))
156999
157002
  throw new it("Invalid attribute name '" + i + "'");
157000
- n += " " + i + '="' + Nt.escape(this.attributes[i]) + '"';
157003
+ n += " " + i + '="' + _t.escape(this.attributes[i]) + '"';
157001
157004
  }
157002
157005
  n += ">";
157003
157006
  for (var a = 0; a < this.children.length; a++)
@@ -157017,7 +157020,7 @@ class e5 {
157017
157020
  this.attributes[t] = n;
157018
157021
  }
157019
157022
  hasClass(t) {
157020
- return Nt.contains(this.classes, t);
157023
+ return _t.contains(this.classes, t);
157021
157024
  }
157022
157025
  toNode() {
157023
157026
  return Fxe.call(this, "span");
@@ -157034,7 +157037,7 @@ class MH {
157034
157037
  this.attributes[t] = n;
157035
157038
  }
157036
157039
  hasClass(t) {
157037
- return Nt.contains(this.classes, t);
157040
+ return _t.contains(this.classes, t);
157038
157041
  }
157039
157042
  toNode() {
157040
157043
  return Fxe.call(this, "a");
@@ -157048,7 +157051,7 @@ class K9n {
157048
157051
  this.src = void 0, this.alt = void 0, this.classes = void 0, this.height = void 0, this.depth = void 0, this.maxFontSize = void 0, this.style = void 0, this.alt = n, this.src = t, this.classes = ["mord"], this.style = r;
157049
157052
  }
157050
157053
  hasClass(t) {
157051
- return Nt.contains(this.classes, t);
157054
+ return _t.contains(this.classes, t);
157052
157055
  }
157053
157056
  toNode() {
157054
157057
  var t = document.createElement("img");
@@ -157058,10 +157061,10 @@ class K9n {
157058
157061
  return t;
157059
157062
  }
157060
157063
  toMarkup() {
157061
- var t = '<img src="' + Nt.escape(this.src) + '"' + (' alt="' + Nt.escape(this.alt) + '"'), n = "";
157064
+ var t = '<img src="' + _t.escape(this.src) + '"' + (' alt="' + _t.escape(this.alt) + '"'), n = "";
157062
157065
  for (var r in this.style)
157063
- this.style.hasOwnProperty(r) && (n += Nt.hyphenate(r) + ":" + this.style[r] + ";");
157064
- return n && (t += ' style="' + Nt.escape(n) + '"'), t += "'/>", t;
157066
+ this.style.hasOwnProperty(r) && (n += _t.hyphenate(r) + ":" + this.style[r] + ";");
157067
+ return n && (t += ' style="' + _t.escape(n) + '"'), t += "'/>", t;
157065
157068
  }
157066
157069
  }
157067
157070
  var Y9n = {
@@ -157078,7 +157081,7 @@ class Bs {
157078
157081
  u && this.classes.push(u + "_fallback"), /[îïíì]/.test(this.text) && (this.text = Y9n[this.text]);
157079
157082
  }
157080
157083
  hasClass(t) {
157081
- return Nt.contains(this.classes, t);
157084
+ return _t.contains(this.classes, t);
157082
157085
  }
157083
157086
  /**
157084
157087
  * Creates a text node or span from a symbol node. Note that a span is only
@@ -157096,13 +157099,13 @@ class Bs {
157096
157099
  */
157097
157100
  toMarkup() {
157098
157101
  var t = !1, n = "<span";
157099
- this.classes.length && (t = !0, n += ' class="', n += Nt.escape(Wd(this.classes)), n += '"');
157102
+ this.classes.length && (t = !0, n += ' class="', n += _t.escape(Wd(this.classes)), n += '"');
157100
157103
  var r = "";
157101
157104
  this.italic > 0 && (r += "margin-right:" + this.italic + "em;");
157102
157105
  for (var o in this.style)
157103
- this.style.hasOwnProperty(o) && (r += Nt.hyphenate(o) + ":" + this.style[o] + ";");
157104
- r && (t = !0, n += ' style="' + Nt.escape(r) + '"');
157105
- var i = Nt.escape(this.text);
157106
+ this.style.hasOwnProperty(o) && (r += _t.hyphenate(o) + ":" + this.style[o] + ";");
157107
+ r && (t = !0, n += ' style="' + _t.escape(r) + '"');
157108
+ var i = _t.escape(this.text);
157106
157109
  return t ? (n += ">", n += i, n += "</span>", n) : i;
157107
157110
  }
157108
157111
  }
@@ -157121,7 +157124,7 @@ class n1 {
157121
157124
  toMarkup() {
157122
157125
  var t = '<svg xmlns="http://www.w3.org/2000/svg"';
157123
157126
  for (var n in this.attributes)
157124
- Object.prototype.hasOwnProperty.call(this.attributes, n) && (t += " " + n + '="' + Nt.escape(this.attributes[n]) + '"');
157127
+ Object.prototype.hasOwnProperty.call(this.attributes, n) && (t += " " + n + '="' + _t.escape(this.attributes[n]) + '"');
157125
157128
  t += ">";
157126
157129
  for (var r = 0; r < this.children.length; r++)
157127
157130
  t += this.children[r].toMarkup();
@@ -157137,7 +157140,7 @@ class $d {
157137
157140
  return this.alternate ? n.setAttribute("d", this.alternate) : n.setAttribute("d", Ute[this.pathName]), n;
157138
157141
  }
157139
157142
  toMarkup() {
157140
- return this.alternate ? '<path d="' + Nt.escape(this.alternate) + '"/>' : '<path d="' + Nt.escape(Ute[this.pathName]) + '"/>';
157143
+ return this.alternate ? '<path d="' + _t.escape(this.alternate) + '"/>' : '<path d="' + _t.escape(Ute[this.pathName]) + '"/>';
157141
157144
  }
157142
157145
  }
157143
157146
  class m_ {
@@ -157153,7 +157156,7 @@ class m_ {
157153
157156
  toMarkup() {
157154
157157
  var t = "<line";
157155
157158
  for (var n in this.attributes)
157156
- Object.prototype.hasOwnProperty.call(this.attributes, n) && (t += " " + n + '="' + Nt.escape(this.attributes[n]) + '"');
157159
+ Object.prototype.hasOwnProperty.call(this.attributes, n) && (t += " " + n + '="' + _t.escape(this.attributes[n]) + '"');
157157
157160
  return t += "/>", t;
157158
157161
  }
157159
157162
  }
@@ -158369,7 +158372,7 @@ var Iw = function(t) {
158369
158372
  var d = r1([o[0] || "leftmost"], [], n), f = r1([o[1] || "rightmost"], [], n), h = r === "root";
158370
158373
  return Xte(i, (p, g) => {
158371
158374
  var m = g.classes[0], y = p.classes[0];
158372
- m === "mbin" && Nt.contains(mwn, y) ? g.classes[0] = "mord" : y === "mbin" && Nt.contains(gwn, m) && (p.classes[0] = "mord");
158375
+ m === "mbin" && _t.contains(mwn, y) ? g.classes[0] = "mord" : y === "mbin" && _t.contains(gwn, m) && (p.classes[0] = "mord");
158373
158376
  }, {
158374
158377
  node: d
158375
158378
  }, f, h), Xte(i, (p, g) => {
@@ -158498,8 +158501,8 @@ class _a {
158498
158501
  toMarkup() {
158499
158502
  var t = "<" + this.type;
158500
158503
  for (var n in this.attributes)
158501
- Object.prototype.hasOwnProperty.call(this.attributes, n) && (t += " " + n + '="', t += Nt.escape(this.attributes[n]), t += '"');
158502
- this.classes.length > 0 && (t += ' class ="' + Nt.escape(Wd(this.classes)) + '"'), t += ">";
158504
+ Object.prototype.hasOwnProperty.call(this.attributes, n) && (t += " " + n + '="', t += _t.escape(this.attributes[n]), t += '"');
158505
+ this.classes.length > 0 && (t += ' class ="' + _t.escape(Wd(this.classes)) + '"'), t += ">";
158503
158506
  for (var r = 0; r < this.children.length; r++)
158504
158507
  t += this.children[r].toMarkup();
158505
158508
  return t += "</" + this.type + ">", t;
@@ -158526,7 +158529,7 @@ class au {
158526
158529
  * (representing the text itself).
158527
158530
  */
158528
158531
  toMarkup() {
158529
- return Nt.escape(this.toText());
158532
+ return _t.escape(this.toText());
158530
158533
  }
158531
158534
  /**
158532
158535
  * Converts the text node into a string
@@ -158608,7 +158611,7 @@ var nt = {
158608
158611
  if (r === "mathtt")
158609
158612
  return "monospace";
158610
158613
  var i = t.text;
158611
- if (Nt.contains(["\\imath", "\\jmath"], i))
158614
+ if (_t.contains(["\\imath", "\\jmath"], i))
158612
158615
  return null;
158613
158616
  or[o][i] && or[o][i].replace && (i = or[o][i].replace);
158614
158617
  var a = _e.fontMap[r].fontName;
@@ -158672,7 +158675,7 @@ var wa = function(t, n, r) {
158672
158675
  };
158673
158676
  function Jte(e, t, n, r, o) {
158674
158677
  var i = wa(e, n), a;
158675
- i.length === 1 && i[0] instanceof _a && Nt.contains(["mrow", "mtable"], i[0].type) ? a = i[0] : a = new nt.MathNode("mrow", i);
158678
+ i.length === 1 && i[0] instanceof _a && _t.contains(["mrow", "mtable"], i[0].type) ? a = i[0] : a = new nt.MathNode("mrow", i);
158676
158679
  var s = new nt.MathNode("annotation", [new nt.TextNode(t)]);
158677
158680
  s.setAttribute("encoding", "application/x-tex");
158678
158681
  var l = new nt.MathNode("semantics", [a, s]), u = new nt.MathNode("math", [l]);
@@ -158807,7 +158810,7 @@ var Nxe = function(t) {
158807
158810
  }, Ewn = function(t, n) {
158808
158811
  function r() {
158809
158812
  var s = 4e5, l = t.label.slice(1);
158810
- if (Nt.contains(["widehat", "widecheck", "widetilde", "utilde"], l)) {
158813
+ if (_t.contains(["widehat", "widecheck", "widetilde", "utilde"], l)) {
158811
158814
  var u = t, c = Mwn(u.base), d, f, h;
158812
158815
  if (c > 5)
158813
158816
  l === "widehat" || l === "widecheck" ? (d = 420, s = 2364, h = 0.42, f = l + "4") : (d = 312, s = 2340, h = 0.34, f = "tilde4");
@@ -158917,9 +158920,9 @@ function bD(e) {
158917
158920
  var jH = (e, t) => {
158918
158921
  var n, r, o;
158919
158922
  e && e.type === "supsub" ? (r = rn(e.base, "accent"), n = r.base, e.base = n, o = X9n(An(e, t)), e.base = r) : (r = rn(e, "accent"), n = r.base);
158920
- var i = An(n, t.havingCrampedStyle()), a = r.isShifty && Nt.isCharacterBox(n), s = 0;
158923
+ var i = An(n, t.havingCrampedStyle()), a = r.isShifty && _t.isCharacterBox(n), s = 0;
158921
158924
  if (a) {
158922
- var l = Nt.getBaseElem(n), u = An(l, t.havingCrampedStyle());
158925
+ var l = _t.getBaseElem(n), u = An(l, t.havingCrampedStyle());
158923
158926
  s = Wte(u).skew;
158924
158927
  }
158925
158928
  var c = r.label === "\\c", d = c ? i.height + i.depth : Math.min(i.height, t.fontMetrics().xHeight), f;
@@ -159195,7 +159198,7 @@ mt({
159195
159198
  mclass: "m" + r.slice(5),
159196
159199
  // TODO(kevinb): don't prefix with 'm'
159197
159200
  body: Kr(o),
159198
- isCharacterBox: Nt.isCharacterBox(o)
159201
+ isCharacterBox: _t.isCharacterBox(o)
159199
159202
  };
159200
159203
  },
159201
159204
  htmlBuilder: Bxe,
@@ -159220,7 +159223,7 @@ mt({
159220
159223
  mode: n.mode,
159221
159224
  mclass: vD(t[0]),
159222
159225
  body: Kr(t[1]),
159223
- isCharacterBox: Nt.isCharacterBox(t[1])
159226
+ isCharacterBox: _t.isCharacterBox(t[1])
159224
159227
  };
159225
159228
  }
159226
159229
  });
@@ -159257,7 +159260,7 @@ mt({
159257
159260
  mode: n.mode,
159258
159261
  mclass: a,
159259
159262
  body: [l],
159260
- isCharacterBox: Nt.isCharacterBox(l)
159263
+ isCharacterBox: _t.isCharacterBox(l)
159261
159264
  };
159262
159265
  },
159263
159266
  htmlBuilder: Bxe,
@@ -159769,7 +159772,7 @@ var A3 = function(t, n, r) {
159769
159772
  var s, l, u, c, d = "", f = 0;
159770
159773
  s = u = c = t, l = null;
159771
159774
  var h = "Size1-Regular";
159772
- t === "\\uparrow" ? u = c = "⏐" : t === "\\Uparrow" ? u = c = "‖" : t === "\\downarrow" ? s = u = "⏐" : t === "\\Downarrow" ? s = u = "‖" : t === "\\updownarrow" ? (s = "\\uparrow", u = "⏐", c = "\\downarrow") : t === "\\Updownarrow" ? (s = "\\Uparrow", u = "‖", c = "\\Downarrow") : Nt.contains(Rwn, t) ? (u = "∣", d = "vert", f = 333) : Nt.contains(Pwn, t) ? (u = "∥", d = "doublevert", f = 556) : t === "[" || t === "\\lbrack" ? (s = "⎡", u = "⎢", c = "⎣", h = "Size4-Regular", d = "lbrack", f = 667) : t === "]" || t === "\\rbrack" ? (s = "⎤", u = "⎥", c = "⎦", h = "Size4-Regular", d = "rbrack", f = 667) : t === "\\lfloor" || t === "⌊" ? (u = s = "⎢", c = "⎣", h = "Size4-Regular", d = "lfloor", f = 667) : t === "\\lceil" || t === "⌈" ? (s = "⎡", u = c = "⎢", h = "Size4-Regular", d = "lceil", f = 667) : t === "\\rfloor" || t === "⌋" ? (u = s = "⎥", c = "⎦", h = "Size4-Regular", d = "rfloor", f = 667) : t === "\\rceil" || t === "⌉" ? (s = "⎤", u = c = "⎥", h = "Size4-Regular", d = "rceil", f = 667) : t === "(" || t === "\\lparen" ? (s = "⎛", u = "⎜", c = "⎝", h = "Size4-Regular", d = "lparen", f = 875) : t === ")" || t === "\\rparen" ? (s = "⎞", u = "⎟", c = "⎠", h = "Size4-Regular", d = "rparen", f = 875) : t === "\\{" || t === "\\lbrace" ? (s = "⎧", l = "⎨", c = "⎩", u = "⎪", h = "Size4-Regular") : t === "\\}" || t === "\\rbrace" ? (s = "⎫", l = "⎬", c = "⎭", u = "⎪", h = "Size4-Regular") : t === "\\lgroup" || t === "⟮" ? (s = "⎧", c = "⎩", u = "⎪", h = "Size4-Regular") : t === "\\rgroup" || t === "⟯" ? (s = "⎫", c = "⎭", u = "⎪", h = "Size4-Regular") : t === "\\lmoustache" || t === "⎰" ? (s = "⎧", c = "⎭", u = "⎪", h = "Size4-Regular") : (t === "\\rmoustache" || t === "⎱") && (s = "⎫", c = "⎩", u = "⎪", h = "Size4-Regular");
159775
+ t === "\\uparrow" ? u = c = "⏐" : t === "\\Uparrow" ? u = c = "‖" : t === "\\downarrow" ? s = u = "⏐" : t === "\\Downarrow" ? s = u = "‖" : t === "\\updownarrow" ? (s = "\\uparrow", u = "⏐", c = "\\downarrow") : t === "\\Updownarrow" ? (s = "\\Uparrow", u = "‖", c = "\\Downarrow") : _t.contains(Rwn, t) ? (u = "∣", d = "vert", f = 333) : _t.contains(Pwn, t) ? (u = "∥", d = "doublevert", f = 556) : t === "[" || t === "\\lbrack" ? (s = "⎡", u = "⎢", c = "⎣", h = "Size4-Regular", d = "lbrack", f = 667) : t === "]" || t === "\\rbrack" ? (s = "⎤", u = "⎥", c = "⎦", h = "Size4-Regular", d = "rbrack", f = 667) : t === "\\lfloor" || t === "⌊" ? (u = s = "⎢", c = "⎣", h = "Size4-Regular", d = "lfloor", f = 667) : t === "\\lceil" || t === "⌈" ? (s = "⎡", u = c = "⎢", h = "Size4-Regular", d = "lceil", f = 667) : t === "\\rfloor" || t === "⌋" ? (u = s = "⎥", c = "⎦", h = "Size4-Regular", d = "rfloor", f = 667) : t === "\\rceil" || t === "⌉" ? (s = "⎤", u = c = "⎥", h = "Size4-Regular", d = "rceil", f = 667) : t === "(" || t === "\\lparen" ? (s = "⎛", u = "⎜", c = "⎝", h = "Size4-Regular", d = "lparen", f = 875) : t === ")" || t === "\\rparen" ? (s = "⎞", u = "⎟", c = "⎠", h = "Size4-Regular", d = "rparen", f = 875) : t === "\\{" || t === "\\lbrace" ? (s = "⎧", l = "⎨", c = "⎩", u = "⎪", h = "Size4-Regular") : t === "\\}" || t === "\\rbrace" ? (s = "⎫", l = "⎬", c = "⎭", u = "⎪", h = "Size4-Regular") : t === "\\lgroup" || t === "⟮" ? (s = "⎧", c = "⎩", u = "⎪", h = "Size4-Regular") : t === "\\rgroup" || t === "⟯" ? (s = "⎫", c = "⎭", u = "⎪", h = "Size4-Regular") : t === "\\lmoustache" || t === "⎰" ? (s = "⎧", c = "⎭", u = "⎪", h = "Size4-Regular") : (t === "\\rmoustache" || t === "⎱") && (s = "⎫", c = "⎩", u = "⎪", h = "Size4-Regular");
159773
159776
  var p = A3(s, h, i), g = p.height + p.depth, m = A3(u, h, i), y = m.height + m.depth, b = A3(c, h, i), v = b.height + b.depth, x = 0, F = 1;
159774
159777
  if (l !== null) {
159775
159778
  var k = A3(l, h, i);
@@ -159825,9 +159828,9 @@ var A3 = function(t, n, r) {
159825
159828
  ruleWidth: (n.fontMetrics().sqrtRuleThickness + a) * i
159826
159829
  };
159827
159830
  }, Wxe = ["(", "\\lparen", ")", "\\rparen", "[", "\\lbrack", "]", "\\rbrack", "\\{", "\\lbrace", "\\}", "\\rbrace", "\\lfloor", "\\rfloor", "⌊", "⌋", "\\lceil", "\\rceil", "⌈", "⌉", "\\surd"], Uwn = ["\\uparrow", "\\downarrow", "\\updownarrow", "\\Uparrow", "\\Downarrow", "\\Updownarrow", "|", "\\|", "\\vert", "\\Vert", "\\lvert", "\\rvert", "\\lVert", "\\rVert", "\\lgroup", "\\rgroup", "⟮", "⟯", "\\lmoustache", "\\rmoustache", "⎰", "⎱"], $xe = ["<", ">", "\\langle", "\\rangle", "/", "\\backslash", "\\lt", "\\gt"], my = [0, 1.2, 1.8, 2.4, 3], Hwn = function(t, n, r, o, i) {
159828
- if (t === "<" || t === "\\lt" || t === "⟨" ? t = "\\langle" : (t === ">" || t === "\\gt" || t === "⟩") && (t = "\\rangle"), Nt.contains(Wxe, t) || Nt.contains($xe, t))
159831
+ if (t === "<" || t === "\\lt" || t === "⟨" ? t = "\\langle" : (t === ">" || t === "\\gt" || t === "⟩") && (t = "\\rangle"), _t.contains(Wxe, t) || _t.contains($xe, t))
159829
159832
  return qxe(t, n, !1, r, o, i);
159830
- if (Nt.contains(Uwn, t))
159833
+ if (_t.contains(Uwn, t))
159831
159834
  return Vxe(t, my[n], !1, r, o, i);
159832
159835
  throw new it("Illegal delimiter: '" + t + "'");
159833
159836
  }, qwn = [{
@@ -159907,7 +159910,7 @@ var A3 = function(t, n, r) {
159907
159910
  }, Kxe = function(t, n, r, o, i, a) {
159908
159911
  t === "<" || t === "\\lt" || t === "⟨" ? t = "\\langle" : (t === ">" || t === "\\gt" || t === "⟩") && (t = "\\rangle");
159909
159912
  var s;
159910
- Nt.contains($xe, t) ? s = qwn : Nt.contains(Wxe, t) ? s = Gxe : s = Vwn;
159913
+ _t.contains($xe, t) ? s = qwn : _t.contains(Wxe, t) ? s = Gxe : s = Vwn;
159911
159914
  var l = Zxe(t, n, s, o);
159912
159915
  return l.type === "small" ? Bwn(t, l.style, r, o, i, a) : l.type === "large" ? qxe(t, l.size, r, o, i, a) : Vxe(t, n, r, o, i, a);
159913
159916
  }, $wn = function(t, n, r, o, i, a) {
@@ -159999,7 +160002,7 @@ var A3 = function(t, n, r) {
159999
160002
  }, Gwn = ["(", "\\lparen", ")", "\\rparen", "[", "\\lbrack", "]", "\\rbrack", "\\{", "\\lbrace", "\\}", "\\rbrace", "\\lfloor", "\\rfloor", "⌊", "⌋", "\\lceil", "\\rceil", "⌈", "⌉", "<", ">", "\\langle", "⟨", "\\rangle", "⟩", "\\lt", "\\gt", "\\lvert", "\\rvert", "\\lVert", "\\rVert", "\\lgroup", "\\rgroup", "⟮", "⟯", "\\lmoustache", "\\rmoustache", "⎰", "⎱", "/", "\\backslash", "|", "\\vert", "\\|", "\\Vert", "\\uparrow", "\\Uparrow", "\\downarrow", "\\Downarrow", "\\updownarrow", "\\Updownarrow", "."];
160000
160003
  function xD(e, t) {
160001
160004
  var n = bD(e);
160002
- if (n && Nt.contains(Gwn, n.text))
160005
+ if (n && _t.contains(Gwn, n.text))
160003
160006
  return n;
160004
160007
  throw n ? new it("Invalid delimiter '" + n.text + "' after '" + t.funcName + "'", e) : new it("Invalid delimiter type '" + e.type + "'", e);
160005
160008
  }
@@ -160147,7 +160150,7 @@ mt({
160147
160150
  }
160148
160151
  });
160149
160152
  var NH = (e, t) => {
160150
- var n = _e.wrapFragment(An(e.body, t), t), r = e.label.slice(1), o = t.sizeMultiplier, i, a = 0, s = Nt.isCharacterBox(e.body);
160153
+ var n = _e.wrapFragment(An(e.body, t), t), r = e.label.slice(1), o = t.sizeMultiplier, i, a = 0, s = _t.isCharacterBox(e.body);
160151
160154
  if (r === "sout")
160152
160155
  i = _e.makeSpan(["stretchy", "sout"]), i.height = t.fontMetrics().defaultRuleThickness / o, a = -0.5 * t.fontMetrics().xHeight;
160153
160156
  else if (r === "phase") {
@@ -160544,7 +160547,7 @@ var $u = function(t, n) {
160544
160547
  }
160545
160548
  if (!(o >= s)) {
160546
160549
  var ie = void 0;
160547
- (o > 0 || t.hskipBeforeAndAfter) && (ie = Nt.deflt(O.pregap, f), ie !== 0 && (B = _e.makeSpan(["arraycolsep"], []), B.style.width = ut(ie), M.push(B)));
160550
+ (o > 0 || t.hskipBeforeAndAfter) && (ie = _t.deflt(O.pregap, f), ie !== 0 && (B = _e.makeSpan(["arraycolsep"], []), B.style.width = ut(ie), M.push(B)));
160548
160551
  var oe = [];
160549
160552
  for (r = 0; r < i; ++r) {
160550
160553
  var se = l[r], H = se[o];
@@ -160560,7 +160563,7 @@ var $u = function(t, n) {
160560
160563
  oe = _e.makeVList({
160561
160564
  positionType: "individualShift",
160562
160565
  children: oe
160563
- }, n), oe = _e.makeSpan(["col-align-" + (O.align || "c")], [oe]), M.push(oe), (o < s - 1 || t.hskipBeforeAndAfter) && (ie = Nt.deflt(O.postgap, f), ie !== 0 && (B = _e.makeSpan(["arraycolsep"], []), B.style.width = ut(ie), M.push(B)));
160566
+ }, n), oe = _e.makeSpan(["col-align-" + (O.align || "c")], [oe]), M.push(oe), (o < s - 1 || t.hskipBeforeAndAfter) && (ie = _t.deflt(O.postgap, f), ie !== 0 && (B = _e.makeSpan(["arraycolsep"], []), B.style.width = ut(ie), M.push(B)));
160564
160567
  }
160565
160568
  }
160566
160569
  if (l = _e.makeSpan(["mtable"], M), u.length > 0) {
@@ -160854,7 +160857,7 @@ Wu({
160854
160857
  numArgs: 0
160855
160858
  },
160856
160859
  handler(e) {
160857
- Nt.contains(["gather", "gather*"], e.envName) && wD(e);
160860
+ _t.contains(["gather", "gather*"], e.envName) && wD(e);
160858
160861
  var t = {
160859
160862
  cols: [{
160860
160863
  type: "align",
@@ -161031,7 +161034,7 @@ mt({
161031
161034
  handler: (e, t) => {
161032
161035
  var {
161033
161036
  parser: n
161034
- } = e, r = t[0], o = Nt.isCharacterBox(r);
161037
+ } = e, r = t[0], o = _t.isCharacterBox(r);
161035
161038
  return {
161036
161039
  type: "mclass",
161037
161040
  mode: n.mode,
@@ -161911,7 +161914,7 @@ mt({
161911
161914
  });
161912
161915
  var r8e = (e, t, n, r, o, i, a) => {
161913
161916
  e = _e.makeSpan([], [e]);
161914
- var s = n && Nt.isCharacterBox(n), l, u;
161917
+ var s = n && _t.isCharacterBox(n), l, u;
161915
161918
  if (t) {
161916
161919
  var c = An(t, r.havingStyle(o.sup()), r);
161917
161920
  u = {
@@ -162009,7 +162012,7 @@ var r8e = (e, t, n, r, o, i, a) => {
162009
162012
  var n, r, o = !1, i;
162010
162013
  e.type === "supsub" ? (n = e.sup, r = e.sub, i = rn(e.base, "op"), o = !0) : i = rn(e, "op");
162011
162014
  var a = t.style, s = !1;
162012
- a.size === Rt.DISPLAY.size && i.symbol && !Nt.contains(o8e, i.name) && (s = !0);
162015
+ a.size === Rt.DISPLAY.size && i.symbol && !_t.contains(o8e, i.name) && (s = !0);
162013
162016
  var l;
162014
162017
  if (i.symbol) {
162015
162018
  var u = s ? "Size2-Regular" : "Size1-Regular", c = "";
@@ -162041,7 +162044,7 @@ var r8e = (e, t, n, r, o, i, a) => {
162041
162044
  }, t5 = (e, t) => {
162042
162045
  var n;
162043
162046
  if (e.symbol)
162044
- n = new _a("mo", [Os(e.name, e.mode)]), Nt.contains(o8e, e.name) && n.setAttribute("largeop", "false");
162047
+ n = new _a("mo", [Os(e.name, e.mode)]), _t.contains(o8e, e.name) && n.setAttribute("largeop", "false");
162045
162048
  else if (e.body)
162046
162049
  n = new _a("mo", wa(e.body, t));
162047
162050
  else {
@@ -162706,7 +162709,7 @@ var e7n = function(t, n) {
162706
162709
  return i ? i8e : null;
162707
162710
  } else {
162708
162711
  if (r.type === "accent")
162709
- return Nt.isCharacterBox(r.base) ? jH : null;
162712
+ return _t.isCharacterBox(r.base) ? jH : null;
162710
162713
  if (r.type === "horizBrace") {
162711
162714
  var a = !t.sub;
162712
162715
  return a === r.isOver ? n8e : null;
@@ -162725,7 +162728,7 @@ Ih({
162725
162728
  base: r,
162726
162729
  sup: o,
162727
162730
  sub: i
162728
- } = e, a = An(r, t), s, l, u = t.fontMetrics(), c = 0, d = 0, f = r && Nt.isCharacterBox(r);
162731
+ } = e, a = An(r, t), s, l, u = t.fontMetrics(), c = 0, d = 0, f = r && _t.isCharacterBox(r);
162729
162732
  if (o) {
162730
162733
  var h = t.havingStyle(t.style.sup());
162731
162734
  s = An(o, h, t), f || (c = a.height - h.fontMetrics().supDrop * h.sizeMultiplier / t.sizeMultiplier);
@@ -163463,7 +163466,7 @@ var bne = {
163463
163466
  };
163464
163467
  pe("\\dots", function(e) {
163465
163468
  var t = "\\dotso", n = e.expandAfterFuture().text;
163466
- return n in bne ? t = bne[n] : (n.slice(0, 4) === "\\not" || n in or.math && Nt.contains(["bin", "rel"], or.math[n].group)) && (t = "\\dotsb"), t;
163469
+ return n in bne ? t = bne[n] : (n.slice(0, 4) === "\\not" || n in or.math && _t.contains(["bin", "rel"], or.math[n].group)) && (t = "\\dotsb"), t;
163467
163470
  });
163468
163471
  var zH = {
163469
163472
  // \rightdelim@ checks for the following:
@@ -168129,7 +168132,7 @@ function SFn({
168129
168132
  editor: n,
168130
168133
  deleteNode: r
168131
168134
  }) {
168132
- const o = rt(null), [i, a] = Re("Copy"), s = e.attrs.language || "plaintext", l = !n.isEditable, u = e.attrs.lineNumbers && !l, c = e.attrs.wordWrap && !l, d = e.attrs.tabSize ?? 2, f = e.attrs.shouldFocus, { isMobile: h } = Bu(), p = e.attrs.code || e.textContent || "", g = It(() => {
168135
+ const o = rt(null), [i, a] = Re("Copy"), s = e.attrs.language || "plaintext", l = !n.isEditable, u = e.attrs.lineNumbers && !l, c = e.attrs.wordWrap && !l, d = e.attrs.tabSize ?? 2, f = e.attrs.shouldFocus, { isMobile: h } = Bu(), p = e.attrs.code || e.textContent || "", g = Nt(() => {
168133
168136
  const b = p.split(`
168134
168137
  `), v = [];
168135
168138
  let x = 0;
@@ -243190,127 +243193,127 @@ const lMn = ({
243190
243193
  name: "customTextInputRules",
243191
243194
  addInputRules() {
243192
243195
  return [
243193
- _t({
243196
+ It({
243194
243197
  find: /1st\s$/,
243195
243198
  replace: "1ˢᵗ "
243196
243199
  }),
243197
- _t({
243200
+ It({
243198
243201
  find: /2nd\s$/,
243199
243202
  replace: "2ⁿᵈ "
243200
243203
  }),
243201
- _t({
243204
+ It({
243202
243205
  find: /3rd\s$/,
243203
243206
  replace: "3ʳᵈ "
243204
243207
  }),
243205
- _t({
243208
+ It({
243206
243209
  find: /4th\s$/,
243207
243210
  replace: "4ᵗʰ "
243208
243211
  }),
243209
- _t({
243212
+ It({
243210
243213
  find: /5th\s$/,
243211
243214
  replace: "5ᵗʰ "
243212
243215
  }),
243213
- _t({
243216
+ It({
243214
243217
  find: /6th\s$/,
243215
243218
  replace: "6ᵗʰ "
243216
243219
  }),
243217
- _t({
243220
+ It({
243218
243221
  find: /7th\s$/,
243219
243222
  replace: "7ᵗʰ "
243220
243223
  }),
243221
- _t({
243224
+ It({
243222
243225
  find: /8th\s$/,
243223
243226
  replace: "8ᵗʰ "
243224
243227
  }),
243225
- _t({
243228
+ It({
243226
243229
  find: /9th\s$/,
243227
243230
  replace: "9ᵗʰ "
243228
243231
  }),
243229
- _t({
243232
+ It({
243230
243233
  find: /10th\s$/,
243231
243234
  replace: "10ᵗʰ "
243232
243235
  }),
243233
- _t({
243236
+ It({
243234
243237
  find: /11th\s$/,
243235
243238
  replace: "11ᵗʰ "
243236
243239
  }),
243237
- _t({
243240
+ It({
243238
243241
  find: /12th\s$/,
243239
243242
  replace: "12ᵗʰ "
243240
243243
  }),
243241
- _t({
243244
+ It({
243242
243245
  find: /13th\s$/,
243243
243246
  replace: "13ᵗʰ "
243244
243247
  }),
243245
- _t({
243248
+ It({
243246
243249
  find: /14th\s$/,
243247
243250
  replace: "14ᵗʰ "
243248
243251
  }),
243249
- _t({
243252
+ It({
243250
243253
  find: /15th\s$/,
243251
243254
  replace: "15ᵗʰ "
243252
243255
  }),
243253
- _t({
243256
+ It({
243254
243257
  find: /16th\s$/,
243255
243258
  replace: "16ᵗʰ "
243256
243259
  }),
243257
- _t({
243260
+ It({
243258
243261
  find: /17th\s$/,
243259
243262
  replace: "17ᵗʰ "
243260
243263
  }),
243261
- _t({
243264
+ It({
243262
243265
  find: /18th\s$/,
243263
243266
  replace: "18ᵗʰ "
243264
243267
  }),
243265
- _t({
243268
+ It({
243266
243269
  find: /19th\s$/,
243267
243270
  replace: "19ᵗʰ "
243268
243271
  }),
243269
- _t({
243272
+ It({
243270
243273
  find: /20th\s$/,
243271
243274
  replace: "20ᵗʰ "
243272
243275
  }),
243273
- _t({
243276
+ It({
243274
243277
  find: /21st\s$/,
243275
243278
  replace: "21ˢᵗ "
243276
243279
  }),
243277
- _t({
243280
+ It({
243278
243281
  find: /22nd\s$/,
243279
243282
  replace: "22ⁿᵈ "
243280
243283
  }),
243281
- _t({
243284
+ It({
243282
243285
  find: /23rd\s$/,
243283
243286
  replace: "23ʳᵈ "
243284
243287
  }),
243285
- _t({
243288
+ It({
243286
243289
  find: /24th\s$/,
243287
243290
  replace: "24ᵗʰ "
243288
243291
  }),
243289
- _t({
243292
+ It({
243290
243293
  find: /25th\s$/,
243291
243294
  replace: "25ᵗʰ "
243292
243295
  }),
243293
- _t({
243296
+ It({
243294
243297
  find: /26th\s$/,
243295
243298
  replace: "26ᵗʰ "
243296
243299
  }),
243297
- _t({
243300
+ It({
243298
243301
  find: /27th\s$/,
243299
243302
  replace: "27ᵗʰ "
243300
243303
  }),
243301
- _t({
243304
+ It({
243302
243305
  find: /28th\s$/,
243303
243306
  replace: "28ᵗʰ "
243304
243307
  }),
243305
- _t({
243308
+ It({
243306
243309
  find: /29th\s$/,
243307
243310
  replace: "29ᵗʰ "
243308
243311
  }),
243309
- _t({
243312
+ It({
243310
243313
  find: /30th\s$/,
243311
243314
  replace: "30ᵗʰ "
243312
243315
  }),
243313
- _t({
243316
+ It({
243314
243317
  find: /31st\s$/,
243315
243318
  replace: "31ˢᵗ "
243316
243319
  })
@@ -256302,7 +256305,7 @@ const e_n = (e) => e.context.awareness, t_n = (e) => !!(e.context.isReady && e.c
256302
256305
  onSessionTerminated: T.onCollabSessionTermination,
256303
256306
  onUnMergedUpdates: T.onUnMergedUpdates,
256304
256307
  onLocalUpdate: r
256305
- }), X = It(() => n, [n]), [ae, ne] = Re(null), te = rt(null), ie = (Ie) => {
256308
+ }), X = Nt(() => n, [n]), [ae, ne] = Re(null), te = rt(null), ie = (Ie) => {
256306
256309
  if (!te.current) return;
256307
256310
  const $e = te.current.querySelector(`input#${Ie}`);
256308
256311
  $e && $e.scrollIntoView({
@@ -256394,7 +256397,7 @@ const e_n = (e) => e.context.awareness, t_n = (e) => !!(e.context.isReady && e.c
256394
256397
  }
256395
256398
  }, J = (Ie, $e, Ke) => {
256396
256399
  Y(Ie, Ke);
256397
- }, fe = It(() => Z, [Z]), Fe = rt(null), Me = (Ie, $e) => {
256400
+ }, fe = Nt(() => Z, [Z]), Fe = rt(null), Me = (Ie, $e) => {
256398
256401
  const { state: Ke } = Ie, { selection: Ze } = Ke, { from: vt, to: kt, empty: Ct } = Ze;
256399
256402
  if ($e.key === "Backspace" || $e.key === "Delete") {
256400
256403
  let Mt = !1;
@@ -256499,7 +256502,7 @@ const e_n = (e) => e.context.awareness, t_n = (e) => !!(e.context.isReady && e.c
256499
256502
  isEns: P.isEns
256500
256503
  });
256501
256504
  }, [R, n, P == null ? void 0 : P.isEns]);
256502
- const ge = It(() => !R || !V || !j ? null : { ydoc: j, awareness: V }, [R]);
256505
+ const ge = Nt(() => !R || !V || !j ? null : { ydoc: j, awareness: V }, [R]);
256503
256506
  He(() => R ? ((async () => {
256504
256507
  le([
256505
256508
  ...Z.filter(($e) => $e.name !== "history"),
@@ -256518,7 +256521,7 @@ const e_n = (e) => e.context.awareness, t_n = (e) => !!(e.context.isReady && e.c
256518
256521
  }, () => {
256519
256522
  me.current();
256520
256523
  }) : void 0, [R]);
256521
- const xe = rt(null), U = It(() => X ? O && R : !e, [
256524
+ const xe = rt(null), U = Nt(() => X ? O && R : !e, [
256522
256525
  X,
256523
256526
  O,
256524
256527
  e,
@@ -257532,7 +257535,7 @@ const w_n = ({
257532
257535
  }) => {
257533
257536
  const [y, b] = Re(!1), [v, x] = Re(0), [F, k] = Re(!0), { isNativeMobile: D } = Bu(), [C, S] = Re(null), [z, P] = Re(null), T = 50, [_, M] = Re(
257534
257537
  "forward"
257535
- ), B = It(() => new p7({
257538
+ ), B = Nt(() => new p7({
257536
257539
  extensions: e.extensionManager.extensions.filter(
257537
257540
  (X) => ![
257538
257541
  "collaboration",
@@ -258281,26 +258284,31 @@ const w_n = ({
258281
258284
  editor: e,
258282
258285
  activeCommentId: t,
258283
258286
  commentDrawerOpen: n,
258284
- isCollabDocumentPublished: r
258287
+ isCollabDocumentPublished: r,
258288
+ disableInlineComment: o
258285
258289
  }) => {
258286
- const { comments: o, username: i } = $c(), { isNativeMobile: a } = Bu(), s = o == null ? void 0 : o.find(
258287
- (u) => u.id === t
258288
- ), l = {
258289
- shouldShow: ({ editor: u }) => {
258290
- var f, h;
258291
- const c = (f = u.getAttributes("comment")) == null ? void 0 : f.resolved, d = u.isActive("comment") && !c && r;
258292
- if (d) {
258293
- const p = (h = u.getAttributes("comment")) == null ? void 0 : h.commentId;
258294
- u.commands.setCommentActive(p);
258290
+ const { comments: i, username: a } = $c(), { isNativeMobile: s } = Bu(), l = rt(o || !1);
258291
+ He(() => {
258292
+ l.current = o || !1;
258293
+ }, [o]);
258294
+ const u = i == null ? void 0 : i.find(
258295
+ (d) => d.id === t
258296
+ ), c = Nt(() => ({
258297
+ shouldShow: ({ editor: d }) => {
258298
+ var g, m;
258299
+ const f = (g = d.getAttributes("comment")) == null ? void 0 : g.resolved, h = l.current, p = d.isActive("comment") && !f && r && !h;
258300
+ if (p) {
258301
+ const y = (m = d.getAttributes("comment")) == null ? void 0 : m.commentId;
258302
+ d.commands.setCommentActive(y);
258295
258303
  } else
258296
- u.commands.unsetCommentActive();
258297
- return d;
258304
+ d.commands.unsetCommentActive();
258305
+ return p;
258298
258306
  },
258299
- onHide: ({ editor: u }) => {
258300
- u.commands.unsetCommentActive();
258307
+ onHide: ({ editor: d }) => {
258308
+ d.commands.unsetCommentActive();
258301
258309
  },
258302
258310
  tippyOptions: {
258303
- moveTransition: a ? "transform 0.2s ease-in" : "none",
258311
+ moveTransition: s ? "transform 0.2s ease-in" : "none",
258304
258312
  duration: 200,
258305
258313
  animation: "shift-toward-subtle",
258306
258314
  zIndex: 40,
@@ -258332,11 +258340,11 @@ const w_n = ({
258332
258340
  ]
258333
258341
  }
258334
258342
  }
258335
- };
258343
+ }), [s, r]);
258336
258344
  return /* @__PURE__ */ E.jsx(
258337
258345
  II,
258338
258346
  {
258339
- ...l,
258347
+ ...c,
258340
258348
  editor: e,
258341
258349
  className: je(
258342
258350
  "shadow-elevation-4 rounded-lg color-bg-default border color-border-default",
@@ -258347,10 +258355,10 @@ const w_n = ({
258347
258355
  {
258348
258356
  activeCommentId: t,
258349
258357
  isBubbleMenu: !0,
258350
- initialComment: s == null ? void 0 : s.content,
258351
- selectedContent: s == null ? void 0 : s.selectedContent,
258352
- isDisabled: s && !Object.hasOwn(s, "commentIndex"),
258353
- isCommentOwner: (s == null ? void 0 : s.username) === i
258358
+ initialComment: u == null ? void 0 : u.content,
258359
+ selectedContent: u == null ? void 0 : u.selectedContent,
258360
+ isDisabled: u && !Object.hasOwn(u, "commentIndex"),
258361
+ isCommentOwner: (u == null ? void 0 : u.username) === a
258354
258362
  }
258355
258363
  )
258356
258364
  }
@@ -258367,7 +258375,7 @@ const w_n = ({
258367
258375
  i.preventDefault(), i.stopPropagation(), t(i, e.id);
258368
258376
  },
258369
258377
  [t, e.id]
258370
- ), o = It(() => je(
258378
+ ), o = Nt(() => je(
258371
258379
  "flex items-center transition-all text-body-sm-bold max-[1280px]:h-[32px] max-[1280px]:px-2 max-[1280px]:py-1 h-5 max-[1280px]:max-w-full xl:!max-w-[200px] min-[1440px]:!max-w-[280px] min-[1600px]:!max-w-[320px] xl:border-l-2",
258372
258380
  e.isActive ? "color-border-active color-text-default max-[1280px]:border-none max-[1280px]:bg-[#F8F9FA] max-[1280px]:rounded max-[1280px]:text-[#363B3F]" : "color-text-secondary border-transparent lg:hover:!brightness-90"
258373
258381
  ), [e.isActive]);
@@ -258397,7 +258405,7 @@ l7e.displayName = "ToCItem";
258397
258405
  const u7e = Kd(() => /* @__PURE__ */ E.jsx("div", { className: "p-4 text-center text-body-sm color-text-secondary select-none", children: /* @__PURE__ */ E.jsx("p", { children: "Start editing your document to see the outline." }) }));
258398
258406
  u7e.displayName = "ToCEmptyState";
258399
258407
  const c7e = Kd(({ items: e = [], editor: t, setItems: n }) => {
258400
- const [r, o] = Re(null), i = Qi("(max-width: 1280px)"), a = rt(null), s = rt(0), l = rt(null), { collapsedHeadings: u, setCollapsedHeadings: c, expandMultipleHeadings: d } = vz(), f = It(() => e.map((y) => ({
258408
+ const [r, o] = Re(null), i = Qi("(max-width: 1280px)"), a = rt(null), s = rt(0), l = rt(null), { collapsedHeadings: u, setCollapsedHeadings: c, expandMultipleHeadings: d } = vz(), f = Nt(() => e.map((y) => ({
258401
258409
  ...y,
258402
258410
  isActive: y.id === r
258403
258411
  })), [e, r]), h = We(() => {
@@ -259184,13 +259192,14 @@ const ioe = Ne.memo(c7e), S_n = ({
259184
259192
  isPreviewMode: e
259185
259193
  }
259186
259194
  ),
259187
- /* @__PURE__ */ E.jsx("div", { children: ve && !be && /* @__PURE__ */ E.jsx(
259195
+ /* @__PURE__ */ E.jsx("div", { children: ve && /* @__PURE__ */ E.jsx(
259188
259196
  A_n,
259189
259197
  {
259190
259198
  editor: ve,
259191
259199
  activeCommentId: Bt,
259192
259200
  commentDrawerOpen: le,
259193
- isCollabDocumentPublished: de
259201
+ isCollabDocumentPublished: de,
259202
+ disableInlineComment: be
259194
259203
  }
259195
259204
  ) })
259196
259205
  ] }) });
@@ -259441,127 +259450,139 @@ const ioe = Ne.memo(c7e), S_n = ({
259441
259450
  }
259442
259451
  ), YIn = (e) => {
259443
259452
  const t = () => {
259444
- const f = new Ou(), h = () => {
259445
- var y;
259446
- const m = [];
259447
- if ((y = e == null ? void 0 : e.optionalExtensions) != null && y.includes("comment")) {
259448
- const b = D9e.configure({
259453
+ const h = new Ou(), p = () => {
259454
+ var b;
259455
+ const y = [];
259456
+ if ((b = e == null ? void 0 : e.optionalExtensions) != null && b.includes("comment")) {
259457
+ const v = D9e.configure({
259449
259458
  HTMLAttributes: {
259450
259459
  class: "inline-comment"
259451
259460
  }
259452
259461
  });
259453
- m.push(b);
259462
+ y.push(v);
259454
259463
  }
259455
- return m;
259456
- }, p = [
259464
+ return y;
259465
+ }, g = [
259457
259466
  ...h9e({ onError: () => null }).filter(
259458
- (m) => m.name !== "characterCount"
259467
+ (y) => y.name !== "characterCount"
259459
259468
  ),
259460
259469
  p9e,
259461
259470
  g9e,
259462
- rye.configure({ document: f }),
259463
- ...h()
259471
+ rye.configure({ document: h }),
259472
+ ...p()
259464
259473
  ];
259465
- return { editor: new p7({ extensions: p, autofocus: !1 }), ydoc: f };
259466
- }, n = (f) => Array.isArray(f) || typeof f == "string" && !k9e(f), r = (f, h) => {
259467
- const p = f.map((g) => er(g));
259468
- Kc(h, ou(p));
259469
- }, o = (f) => {
259470
- const h = f.map((p) => er(p));
259471
- return qo(ou(h));
259472
- }, i = (f, h, p) => {
259473
- if (!h) throw new Error("cannot set content without Editor");
259474
- n(f) ? Array.isArray(f) ? r(f, p) : Kc(p, er(f)) : h.commands.setContent(
259475
- F9e({ data: f })
259474
+ return { editor: new p7({ extensions: g, autofocus: !1 }), ydoc: h };
259475
+ }, n = (h) => Array.isArray(h) || typeof h == "string" && !k9e(h), r = (h, p) => {
259476
+ const g = h.map((m) => er(m));
259477
+ Kc(p, ou(g));
259478
+ }, o = (h) => {
259479
+ const p = h.map((g) => er(g));
259480
+ return qo(ou(p));
259481
+ }, i = (h, p, g) => {
259482
+ if (!p) throw new Error("cannot set content without Editor");
259483
+ n(h) ? Array.isArray(h) ? r(h, g) : Kc(g, er(h)) : p.commands.setContent(
259484
+ F9e({ data: h })
259476
259485
  );
259477
259486
  }, a = () => {
259478
- const { editor: f, ydoc: h } = t();
259487
+ const { editor: h, ydoc: p } = t();
259479
259488
  return {
259480
- convertJSONContentToYjsEncodedString: (p) => (i(p, f, h), qo(Es(h))),
259489
+ convertJSONContentToYjsEncodedString: (g) => (i(g, h, p), qo(Es(p))),
259481
259490
  cleanup: () => {
259482
- f && f.destroy(), h && h.destroy();
259491
+ h && h.destroy(), p && p.destroy();
259483
259492
  }
259484
259493
  };
259485
- }, s = async (f, h) => {
259486
- const { editor: p, ydoc: g } = t();
259487
- if (i(f, p, g), p) {
259488
- const m = await p.commands.exportMarkdownFile();
259489
- if (m) {
259490
- const y = m, b = document.createElement("a");
259491
- b.href = y, b.download = h + ".md", document.body.appendChild(b), b.click(), document.body.removeChild(b), URL.revokeObjectURL(y), p.destroy();
259494
+ }, s = async (h, p) => {
259495
+ const { editor: g, ydoc: m } = t();
259496
+ if (i(h, g, m), g) {
259497
+ const y = await g.commands.exportMarkdownFile();
259498
+ if (y) {
259499
+ const b = y, v = document.createElement("a");
259500
+ v.href = b, v.download = p + ".md", document.body.appendChild(v), v.click(), document.body.removeChild(v), URL.revokeObjectURL(b), g.destroy();
259492
259501
  } else
259493
259502
  throw new Error("Failed to generate download url");
259494
259503
  } else
259495
259504
  throw new Error("Editor is not available");
259496
- }, l = async (f, h) => {
259497
- const { editor: p, ydoc: g } = t();
259498
- if (i(f, p, g), p) {
259499
- const m = await p.commands.exportHtmlFile({
259500
- title: h
259505
+ }, l = async (h, p) => {
259506
+ const { editor: g, ydoc: m } = t();
259507
+ if (i(h, g, m), g) {
259508
+ const y = await g.commands.exportHtmlFile({
259509
+ title: p
259501
259510
  });
259502
- if (m) {
259503
- const y = m, b = document.createElement("a");
259504
- b.href = y, b.download = h + ".html", document.body.appendChild(b), b.click(), document.body.removeChild(b), URL.revokeObjectURL(y), p.destroy();
259511
+ if (y) {
259512
+ const b = y, v = document.createElement("a");
259513
+ v.href = b, v.download = p + ".html", document.body.appendChild(v), v.click(), document.body.removeChild(v), URL.revokeObjectURL(b), g.destroy();
259505
259514
  } else
259506
259515
  throw new Error("Failed to generate download url");
259507
259516
  } else
259508
259517
  throw new Error("Editor is not available");
259509
- }, u = async (f, h) => {
259510
- const { editor: p, ydoc: g } = t();
259511
- if (i(f, p, g), p) {
259512
- const m = await p.commands.exportTxtFile({
259513
- title: h
259518
+ }, u = async (h, p) => {
259519
+ const { editor: g, ydoc: m } = t();
259520
+ if (i(h, g, m), g) {
259521
+ const y = await g.commands.exportHtmlFile({
259522
+ title: p,
259523
+ returnHtmlFile: !0
259514
259524
  });
259515
- if (m) {
259516
- const y = m, b = document.createElement("a");
259517
- b.href = y, b.download = h + ".txt", document.body.appendChild(b), b.click(), document.body.removeChild(b), URL.revokeObjectURL(y), p.destroy();
259525
+ if (y)
259526
+ return y;
259527
+ throw new Error("Failed to generate html string");
259528
+ } else
259529
+ throw new Error("Editor is not available");
259530
+ }, c = async (h, p) => {
259531
+ const { editor: g, ydoc: m } = t();
259532
+ if (i(h, g, m), g) {
259533
+ const y = await g.commands.exportTxtFile({
259534
+ title: p
259535
+ });
259536
+ if (y) {
259537
+ const b = y, v = document.createElement("a");
259538
+ v.href = b, v.download = p + ".txt", document.body.appendChild(v), v.click(), document.body.removeChild(v), URL.revokeObjectURL(b), g.destroy();
259518
259539
  } else
259519
259540
  throw new Error("Failed to generate download url");
259520
259541
  } else
259521
259542
  throw new Error("Editor is not available");
259522
259543
  };
259523
- async function c(f, h) {
259524
- if (f.type === "text/markdown" || f.name.endsWith(".md")) {
259525
- const p = await new Promise((v, x) => {
259526
- const F = new FileReader();
259527
- F.onload = (k) => {
259528
- var D;
259529
- return v((D = k.target) == null ? void 0 : D.result);
259530
- }, F.onerror = (k) => x(k), F.readAsText(f);
259531
- }), { editor: g, ydoc: m } = t();
259532
- await f2(g.view, p, h);
259533
- const y = Es(m), b = qo(y);
259534
- return g.destroy(), !m.isDestroyed && m.destroy(), b;
259544
+ async function d(h, p) {
259545
+ if (h.type === "text/markdown" || h.name.endsWith(".md")) {
259546
+ const g = await new Promise((x, F) => {
259547
+ const k = new FileReader();
259548
+ k.onload = (D) => {
259549
+ var C;
259550
+ return x((C = D.target) == null ? void 0 : C.result);
259551
+ }, k.onerror = (D) => F(D), k.readAsText(h);
259552
+ }), { editor: m, ydoc: y } = t();
259553
+ await f2(m.view, g, p);
259554
+ const b = Es(y), v = qo(b);
259555
+ return m.destroy(), !y.isDestroyed && y.destroy(), v;
259535
259556
  }
259536
259557
  return null;
259537
259558
  }
259538
- async function d(f, h) {
259539
- if (f.type === "application/vnd.openxmlformats-officedocument.wordprocessingml.document" || f.name.endsWith(".docx"))
259559
+ async function f(h, p) {
259560
+ if (h.type === "application/vnd.openxmlformats-officedocument.wordprocessingml.document" || h.name.endsWith(".docx"))
259540
259561
  try {
259541
- const p = await f.arrayBuffer(), { value: g } = await fa.convertToHtml(
259542
- { arrayBuffer: p },
259562
+ const g = await h.arrayBuffer(), { value: m } = await fa.convertToHtml(
259563
+ { arrayBuffer: g },
259543
259564
  {
259544
259565
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
259545
259566
  convertImage: fa.images.inline(
259546
259567
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
259547
- async (x) => {
259548
- const F = await x.read("base64");
259568
+ async (F) => {
259569
+ const k = await F.read("base64");
259549
259570
  return {
259550
- src: `data:${x.contentType};base64,${F}`
259571
+ src: `data:${F.contentType};base64,${k}`
259551
259572
  };
259552
259573
  }
259553
259574
  )
259554
259575
  }
259555
- ), { editor: m, ydoc: y } = t();
259576
+ ), { editor: y, ydoc: b } = t();
259556
259577
  await f2(
259557
- m.view,
259558
- g,
259559
- h
259578
+ y.view,
259579
+ m,
259580
+ p
259560
259581
  );
259561
- const b = Es(y), v = qo(b);
259562
- return m.destroy(), !y.isDestroyed && y.destroy(), v;
259563
- } catch (p) {
259564
- return console.error("Error processing DOCX file:", p), null;
259582
+ const v = Es(b), x = qo(v);
259583
+ return y.destroy(), !b.isDestroyed && b.destroy(), x;
259584
+ } catch (g) {
259585
+ return console.error("Error processing DOCX file:", g), null;
259565
259586
  }
259566
259587
  return null;
259567
259588
  }
@@ -259571,11 +259592,12 @@ const ioe = Ne.memo(c7e), S_n = ({
259571
259592
  getYjsConvertor: a,
259572
259593
  downloadContentAsMd: s,
259573
259594
  downloadContentAsHtml: l,
259574
- downloadContentAsTxt: u,
259595
+ generateHtmlFile: u,
259596
+ downloadContentAsTxt: c,
259575
259597
  mergeYjsUpdates: o,
259576
259598
  handleMarkdownContent: f2,
259577
- getYjsContentFromMarkdown: c,
259578
- getYjsContentFromDocx: d
259599
+ getYjsContentFromMarkdown: d,
259600
+ getYjsContentFromDocx: f
259579
259601
  };
259580
259602
  }, aoe = (e) => {
259581
259603
  const t = new Date(e), n = /* @__PURE__ */ new Date(), r = new Date(n);