@fileverse-dev/ddoc 3.0.78-fix-1 → 3.0.78-fix-2
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.es.js +364 -360
- package/package.json +1 -1
package/dist/index.es.js
CHANGED
|
@@ -2,7 +2,7 @@ var fJ = Object.defineProperty;
|
|
|
2
2
|
var gJ = (e, t, n) => t in e ? fJ(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
|
|
3
3
|
var lt = (e, t, n) => gJ(e, typeof t != "symbol" ? t + "" : t, n);
|
|
4
4
|
import * as Cn from "react";
|
|
5
|
-
import Et, { createRef as mJ, memo as dh, createContext as yd, createElement as x2, useContext as xd, version as q7, useRef as Ve, useState as Be, useDebugValue as MD, useEffect as Re, forwardRef as sr, useLayoutEffect as ph, useCallback as
|
|
5
|
+
import Et, { createRef as mJ, memo as dh, createContext as yd, createElement as x2, useContext as xd, version as q7, useRef as Ve, useState as Be, useDebugValue as MD, useEffect as Re, forwardRef as sr, useLayoutEffect as ph, useCallback as Te, useMemo as Ft, Fragment as bJ, useReducer as yJ, cloneElement as IO, useImperativeHandle as LO } from "react";
|
|
6
6
|
import UO, { flushSync as xJ, createPortal as C1 } from "react-dom";
|
|
7
7
|
import { Drawer as PO, DrawerContent as vJ, DrawerHeader as FJ, DrawerTitle as wJ, DrawerClose as DJ, LucideIcon as Ue, useTheme as kJ, Button as qt, TextField as ea, DynamicDropdown as Zn, Tooltip as ln, IconButton as vn, Avatar as OD, cn as Ge, ButtonGroup as RD, Skeleton as rn, TextAreaFieldV2 as v2, DatePicker as EJ, TimePicker as CJ, Divider as uf, BottomDrawer as zO, DynamicModal as ID, Select as cf, SelectTrigger as df, SelectValue as F2, SelectContent as pf, SelectItem as hf, DynamicDropdownV2 as LD, Popover as ff, PopoverTrigger as gf, PopoverContent as mf, toast as UD, UltimateIcons as _J, PopoverClose as $O, SelectGroup as HO, SelectLabel as AJ, Checkbox as SJ, DrawerTrigger as V7, AnimatedLoader as TJ, Label as jJ, DynamicDrawer as BJ, DynamicDrawerV2 as NJ, Tag as w2, TagInput as WO } from "@fileverse/ui";
|
|
8
8
|
import { isAddress as MJ, createPublicClient as OJ, http as RJ } from "viem";
|
|
@@ -478,7 +478,7 @@ function JJ() {
|
|
|
478
478
|
value: Qt
|
|
479
479
|
}), Object.freeze && (Object.freeze(Ot.props), Object.freeze(Ot)), Ot;
|
|
480
480
|
};
|
|
481
|
-
function
|
|
481
|
+
function Ae(Fe, Ie, rt, dt, Qt) {
|
|
482
482
|
{
|
|
483
483
|
var tn, Rt = {}, Ot = null, br = null;
|
|
484
484
|
rt !== void 0 && (R(rt), Ot = "" + rt), Ee(Ie) && (R(Ie.key), Ot = "" + Ie.key), ve(Ie) && (br = Ie.ref, Ce(Ie, Qt));
|
|
@@ -506,7 +506,7 @@ function JJ() {
|
|
|
506
506
|
}
|
|
507
507
|
var wt;
|
|
508
508
|
wt = !1;
|
|
509
|
-
function
|
|
509
|
+
function Se(Fe) {
|
|
510
510
|
return typeof Fe == "object" && Fe !== null && Fe.$$typeof === t;
|
|
511
511
|
}
|
|
512
512
|
function Pe() {
|
|
@@ -557,15 +557,15 @@ Check the top-level render call using <` + rt + ">.");
|
|
|
557
557
|
if (be(Fe))
|
|
558
558
|
for (var rt = 0; rt < Fe.length; rt++) {
|
|
559
559
|
var dt = Fe[rt];
|
|
560
|
-
|
|
560
|
+
Se(dt) && ht(dt, Ie);
|
|
561
561
|
}
|
|
562
|
-
else if (
|
|
562
|
+
else if (Se(Fe))
|
|
563
563
|
Fe._store && (Fe._store.validated = !0);
|
|
564
564
|
else if (Fe) {
|
|
565
565
|
var Qt = m(Fe);
|
|
566
566
|
if (typeof Qt == "function" && Qt !== Fe.entries)
|
|
567
567
|
for (var tn = Qt.call(Fe), Rt; !(Rt = tn.next()).done; )
|
|
568
|
-
|
|
568
|
+
Se(Rt.value) && ht(Rt.value, Ie);
|
|
569
569
|
}
|
|
570
570
|
}
|
|
571
571
|
}
|
|
@@ -618,7 +618,7 @@ Check the top-level render call using <` + rt + ">.");
|
|
|
618
618
|
var Qe;
|
|
619
619
|
Fe === null ? Qe = "null" : be(Fe) ? Qe = "array" : Fe !== void 0 && Fe.$$typeof === t ? (Qe = "<" + (O(Fe.type) || "Unknown") + " />", Ot = " Did you accidentally export a JSX literal instead of a component?") : Qe = typeof Fe, y("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", Qe, Ot);
|
|
620
620
|
}
|
|
621
|
-
var fe =
|
|
621
|
+
var fe = Ae(Fe, Ie, rt, Qt, tn);
|
|
622
622
|
if (fe == null)
|
|
623
623
|
return fe;
|
|
624
624
|
if (Rt) {
|
|
@@ -19107,17 +19107,17 @@ function Jse(e, t, n, r, o, i, s) {
|
|
|
19107
19107
|
previousLocation: me,
|
|
19108
19108
|
scrollLooper: je,
|
|
19109
19109
|
slideLooper: Me,
|
|
19110
|
-
dragHandler:
|
|
19110
|
+
dragHandler: Ae,
|
|
19111
19111
|
animation: Ne,
|
|
19112
19112
|
eventHandler: Je,
|
|
19113
19113
|
scrollBounds: st,
|
|
19114
19114
|
options: {
|
|
19115
19115
|
loop: wt
|
|
19116
19116
|
}
|
|
19117
|
-
},
|
|
19118
|
-
const Pe = ye.settled(), nt = !st.shouldConstrain(), ct = wt ? Pe : Pe && nt, Ke = ct && !
|
|
19117
|
+
}, Se) => {
|
|
19118
|
+
const Pe = ye.settled(), nt = !st.shouldConstrain(), ct = wt ? Pe : Pe && nt, Ke = ct && !Ae.pointerDown();
|
|
19119
19119
|
Ke && Ne.stop();
|
|
19120
|
-
const ht = Ee.get() *
|
|
19120
|
+
const ht = Ee.get() * Se + me.get() * (1 - Se);
|
|
19121
19121
|
Ce.set(ht), wt && (je.loop(ye.direction()), Me.loop()), ve.to(Ce.get()), Ke && Je.emit("settle"), ct || Je.emit("scroll");
|
|
19122
19122
|
}, N = Sse(r, o, () => Q(pe), (ye) => ce(pe, ye)), te = 0.68, le = re[ae.get()], G = F0(le), V = F0(le), ie = F0(le), he = F0(le), De = Rse(G, ie, V, he, p, te), be = Wse(d, re, oe, J, he), de = qse(N, ae, B, De, be, he, s), ue = zse(J), ge = jf(), R = Yse(t, n, s, g), {
|
|
19123
19123
|
slideRegistry: W
|
|
@@ -19369,7 +19369,7 @@ function L2(e, t, n) {
|
|
|
19369
19369
|
}
|
|
19370
19370
|
L2.globalOptions = void 0;
|
|
19371
19371
|
function Sk(e = {}, t = []) {
|
|
19372
|
-
const n = Ve(e), r = Ve(t), [o, i] = Be(), [s, a] = Be(), l =
|
|
19372
|
+
const n = Ve(e), r = Ve(t), [o, i] = Be(), [s, a] = Be(), l = Te(() => {
|
|
19373
19373
|
o && o.reInit(n.current, r.current);
|
|
19374
19374
|
}, [o]);
|
|
19375
19375
|
return Re(() => {
|
|
@@ -19409,13 +19409,13 @@ const qL = sr(
|
|
|
19409
19409
|
axis: e === "horizontal" ? "x" : "y"
|
|
19410
19410
|
},
|
|
19411
19411
|
r
|
|
19412
|
-
), [c, d] = Be(!1), [p, h] = Be(!1), f =
|
|
19412
|
+
), [c, d] = Be(!1), [p, h] = Be(!1), f = Te((y) => {
|
|
19413
19413
|
y && (d(y.canScrollPrev()), h(y.canScrollNext()));
|
|
19414
|
-
}, []), g =
|
|
19414
|
+
}, []), g = Te(() => {
|
|
19415
19415
|
u == null || u.scrollPrev();
|
|
19416
|
-
}, [u]), m =
|
|
19416
|
+
}, [u]), m = Te(() => {
|
|
19417
19417
|
u == null || u.scrollNext();
|
|
19418
|
-
}, [u]), b =
|
|
19418
|
+
}, [u]), b = Te(
|
|
19419
19419
|
(y) => {
|
|
19420
19420
|
y.key === "ArrowLeft" ? (y.preventDefault(), g()) : y.key === "ArrowRight" && (y.preventDefault(), m());
|
|
19421
19421
|
},
|
|
@@ -19495,14 +19495,14 @@ const E5 = sr(
|
|
|
19495
19495
|
);
|
|
19496
19496
|
E5.displayName = "CarouselItem";
|
|
19497
19497
|
const GL = sr(({ index: e, className: t, ...n }, r) => {
|
|
19498
|
-
const { api: o } = M1(), [i, s] = Be(0), [, a] = Be([]), l =
|
|
19498
|
+
const { api: o } = M1(), [i, s] = Be(0), [, a] = Be([]), l = Te(
|
|
19499
19499
|
(p) => {
|
|
19500
19500
|
o && o.scrollTo(p);
|
|
19501
19501
|
},
|
|
19502
19502
|
[o]
|
|
19503
|
-
), u =
|
|
19503
|
+
), u = Te((p) => {
|
|
19504
19504
|
p && a(p.scrollSnapList());
|
|
19505
|
-
}, []), c =
|
|
19505
|
+
}, []), c = Te((p) => {
|
|
19506
19506
|
p && s(p.selectedScrollSnap());
|
|
19507
19507
|
}, []);
|
|
19508
19508
|
Re(() => {
|
|
@@ -28109,47 +28109,47 @@ const lP = yd(void 0), wce = ({
|
|
|
28109
28109
|
handleClick: !1
|
|
28110
28110
|
}), Q = localStorage.getItem("ensCache"), [ce, N] = Be(
|
|
28111
28111
|
Q ? JSON.parse(Q) : {}
|
|
28112
|
-
), [te, le] = Be([]), G =
|
|
28113
|
-
async (
|
|
28114
|
-
if (te.includes(
|
|
28112
|
+
), [te, le] = Be([]), G = Te(
|
|
28113
|
+
async (Se, Pe) => {
|
|
28114
|
+
if (te.includes(Se)) {
|
|
28115
28115
|
Pe({
|
|
28116
|
-
name:
|
|
28116
|
+
name: Se || "Anonymous",
|
|
28117
28117
|
isEns: !1
|
|
28118
28118
|
});
|
|
28119
28119
|
return;
|
|
28120
28120
|
}
|
|
28121
|
-
if (
|
|
28121
|
+
if (Se && ce[Se]) {
|
|
28122
28122
|
Pe({
|
|
28123
|
-
...ce[
|
|
28123
|
+
...ce[Se]
|
|
28124
28124
|
});
|
|
28125
28125
|
return;
|
|
28126
28126
|
}
|
|
28127
|
-
if (!
|
|
28127
|
+
if (!Se || !h) {
|
|
28128
28128
|
Pe({
|
|
28129
|
-
name:
|
|
28129
|
+
name: Se || "Anonymous",
|
|
28130
28130
|
isEns: !1
|
|
28131
28131
|
});
|
|
28132
28132
|
return;
|
|
28133
28133
|
}
|
|
28134
28134
|
try {
|
|
28135
|
-
le((ht) => [...ht,
|
|
28135
|
+
le((ht) => [...ht, Se]);
|
|
28136
28136
|
const { name: nt, isEns: ct, resolved: Ke } = await Cae(
|
|
28137
|
-
|
|
28137
|
+
Se,
|
|
28138
28138
|
h
|
|
28139
28139
|
// Add definite assignment assertion if ensResolutionUrl is guaranteed
|
|
28140
28140
|
);
|
|
28141
28141
|
Ke && N((ht) => {
|
|
28142
28142
|
const _t = {
|
|
28143
28143
|
...ht,
|
|
28144
|
-
[
|
|
28144
|
+
[Se]: { name: nt, isEns: ct }
|
|
28145
28145
|
};
|
|
28146
28146
|
return localStorage.setItem("ensCache", JSON.stringify(_t)), _t;
|
|
28147
28147
|
}), le(
|
|
28148
|
-
(ht) => ht.filter((_t) => _t !==
|
|
28148
|
+
(ht) => ht.filter((_t) => _t !== Se)
|
|
28149
28149
|
), Pe({ name: nt, isEns: ct });
|
|
28150
28150
|
} catch (nt) {
|
|
28151
28151
|
console.error("Error fetching ENS name:", nt), Pe({
|
|
28152
|
-
name:
|
|
28152
|
+
name: Se || "Anonymous",
|
|
28153
28153
|
isEns: !1
|
|
28154
28154
|
});
|
|
28155
28155
|
}
|
|
@@ -28157,49 +28157,49 @@ const lP = yd(void 0), wce = ({
|
|
|
28157
28157
|
[te, ce, h]
|
|
28158
28158
|
), V = Ft(
|
|
28159
28159
|
() => r.filter(
|
|
28160
|
-
(
|
|
28160
|
+
(Se) => (Se.tabId ?? _c) === u
|
|
28161
28161
|
),
|
|
28162
28162
|
[r, u]
|
|
28163
28163
|
), ie = Ft(
|
|
28164
|
-
() => V.find((
|
|
28164
|
+
() => V.find((Se) => Se.id === a),
|
|
28165
28165
|
[V, a]
|
|
28166
28166
|
);
|
|
28167
28167
|
O1([ee, K, re], () => {
|
|
28168
28168
|
z && (oe(!0), U(!1));
|
|
28169
28169
|
});
|
|
28170
|
-
const he =
|
|
28171
|
-
const { state:
|
|
28170
|
+
const he = Te(() => {
|
|
28171
|
+
const { state: Se } = t, { from: Pe, to: nt } = Se.selection, ct = Se.doc.textBetween(Pe, nt, " ");
|
|
28172
28172
|
J ? ie && q(ie.selectedContent || "") : q(ct), U(!0), w == null || w();
|
|
28173
|
-
}, [t, J, ie, w]), De =
|
|
28174
|
-
(
|
|
28173
|
+
}, [t, J, ie, w]), De = Te(
|
|
28174
|
+
(Se, Pe = "", nt) => ({
|
|
28175
28175
|
id: `comment-${Du()}`,
|
|
28176
28176
|
tabId: u,
|
|
28177
28177
|
username: nt,
|
|
28178
|
-
selectedContent:
|
|
28178
|
+
selectedContent: Se,
|
|
28179
28179
|
// Preserve line breaks in content
|
|
28180
28180
|
content: Pe || "",
|
|
28181
28181
|
replies: [],
|
|
28182
28182
|
createdAt: /* @__PURE__ */ new Date()
|
|
28183
28183
|
}),
|
|
28184
28184
|
[u]
|
|
28185
|
-
), be =
|
|
28186
|
-
(
|
|
28185
|
+
), be = Te(
|
|
28186
|
+
(Se, Pe) => {
|
|
28187
28187
|
const nt = sue(n);
|
|
28188
28188
|
if (!Pe()) return;
|
|
28189
28189
|
const Ke = Wo(n, nt);
|
|
28190
28190
|
if (!(!Ke || Ke.byteLength === 0))
|
|
28191
28191
|
return {
|
|
28192
|
-
type:
|
|
28192
|
+
type: Se,
|
|
28193
28193
|
updateChunk: Vr(Ke)
|
|
28194
28194
|
};
|
|
28195
28195
|
},
|
|
28196
28196
|
[n]
|
|
28197
|
-
), de =
|
|
28198
|
-
(
|
|
28197
|
+
), de = Te(
|
|
28198
|
+
(Se, Pe) => {
|
|
28199
28199
|
if (!t) return;
|
|
28200
28200
|
const { state: nt } = t, { from: ct, to: Ke } = nt.selection, ht = nt.doc.textBetween(ct, Ke, " "), _t = De(
|
|
28201
28201
|
ht,
|
|
28202
|
-
|
|
28202
|
+
Se,
|
|
28203
28203
|
Pe || i
|
|
28204
28204
|
), Gt = be(
|
|
28205
28205
|
"create",
|
|
@@ -28217,35 +28217,35 @@ const lP = yd(void 0), wce = ({
|
|
|
28217
28217
|
d,
|
|
28218
28218
|
be
|
|
28219
28219
|
]
|
|
28220
|
-
), ue =
|
|
28221
|
-
(
|
|
28220
|
+
), ue = Te(
|
|
28221
|
+
(Se) => {
|
|
28222
28222
|
const Pe = be(
|
|
28223
28223
|
"resolve",
|
|
28224
|
-
() => t.commands.resolveComment(
|
|
28224
|
+
() => t.commands.resolveComment(Se)
|
|
28225
28225
|
);
|
|
28226
|
-
f == null || f(
|
|
28226
|
+
f == null || f(Se, Pe);
|
|
28227
28227
|
},
|
|
28228
28228
|
[t, f, be]
|
|
28229
|
-
), ge =
|
|
28230
|
-
(
|
|
28229
|
+
), ge = Te(
|
|
28230
|
+
(Se) => {
|
|
28231
28231
|
const Pe = be(
|
|
28232
28232
|
"unresolve",
|
|
28233
|
-
() => t.commands.unresolveComment(
|
|
28233
|
+
() => t.commands.unresolveComment(Se)
|
|
28234
28234
|
);
|
|
28235
|
-
g == null || g(
|
|
28235
|
+
g == null || g(Se, Pe);
|
|
28236
28236
|
},
|
|
28237
28237
|
[t, g, be]
|
|
28238
|
-
), R =
|
|
28239
|
-
(
|
|
28238
|
+
), R = Te(
|
|
28239
|
+
(Se) => {
|
|
28240
28240
|
const Pe = be(
|
|
28241
28241
|
"delete",
|
|
28242
|
-
() => t.commands.unsetComment(
|
|
28242
|
+
() => t.commands.unsetComment(Se)
|
|
28243
28243
|
);
|
|
28244
|
-
m == null || m(
|
|
28244
|
+
m == null || m(Se, Pe);
|
|
28245
28245
|
},
|
|
28246
28246
|
[t, m, be]
|
|
28247
|
-
), W =
|
|
28248
|
-
(
|
|
28247
|
+
), W = Te(
|
|
28248
|
+
(Se, Pe, nt) => {
|
|
28249
28249
|
if (!Pe.trim()) return;
|
|
28250
28250
|
const ct = {
|
|
28251
28251
|
id: `reply-${Du()}`,
|
|
@@ -28256,18 +28256,18 @@ const lP = yd(void 0), wce = ({
|
|
|
28256
28256
|
createdAt: /* @__PURE__ */ new Date(),
|
|
28257
28257
|
selectedContent: ""
|
|
28258
28258
|
};
|
|
28259
|
-
nt == null || nt(
|
|
28259
|
+
nt == null || nt(Se, ct);
|
|
28260
28260
|
},
|
|
28261
28261
|
[u, i]
|
|
28262
|
-
), ne =
|
|
28263
|
-
(
|
|
28262
|
+
), ne = Te(
|
|
28263
|
+
(Se) => {
|
|
28264
28264
|
var nt, ct;
|
|
28265
28265
|
if (!t || !((nt = t.view) != null && nt.dom) || !V.length) return;
|
|
28266
|
-
const Pe = V.find((Ke) => Ke.id ===
|
|
28266
|
+
const Pe = V.find((Ke) => Ke.id === Se);
|
|
28267
28267
|
if (Pe) {
|
|
28268
28268
|
if (Pe.selectedContent) {
|
|
28269
28269
|
const Ke = t.view.dom.querySelector(
|
|
28270
|
-
`[data-comment-id="${
|
|
28270
|
+
`[data-comment-id="${Se}"]`
|
|
28271
28271
|
);
|
|
28272
28272
|
if (Ke) {
|
|
28273
28273
|
const ht = t.view.posAtDOM(Ke, 0), _t = ht + (((ct = Ke.textContent) == null ? void 0 : ct.length) ?? 0);
|
|
@@ -28290,25 +28290,25 @@ const lP = yd(void 0), wce = ({
|
|
|
28290
28290
|
});
|
|
28291
28291
|
}
|
|
28292
28292
|
}
|
|
28293
|
-
l(
|
|
28293
|
+
l(Se);
|
|
28294
28294
|
}
|
|
28295
28295
|
},
|
|
28296
28296
|
[t, V, l]
|
|
28297
|
-
), pe =
|
|
28298
|
-
(
|
|
28299
|
-
const Pe =
|
|
28300
|
-
_(Pe), Pe || (
|
|
28297
|
+
), pe = Te(
|
|
28298
|
+
(Se) => {
|
|
28299
|
+
const Pe = Se.target.value;
|
|
28300
|
+
_(Pe), Pe || (Se.target.style.height = "40px");
|
|
28301
28301
|
},
|
|
28302
28302
|
[]
|
|
28303
|
-
), ye =
|
|
28304
|
-
(
|
|
28305
|
-
const Pe =
|
|
28306
|
-
E(Pe), Pe || (
|
|
28303
|
+
), ye = Te(
|
|
28304
|
+
(Se) => {
|
|
28305
|
+
const Pe = Se.target.value;
|
|
28306
|
+
E(Pe), Pe || (Se.target.style.height = "40px");
|
|
28307
28307
|
},
|
|
28308
28308
|
[]
|
|
28309
|
-
), ve =
|
|
28309
|
+
), ve = Te(() => {
|
|
28310
28310
|
if (!O.trim() || !i) return;
|
|
28311
|
-
const
|
|
28311
|
+
const Se = {
|
|
28312
28312
|
id: `comment-${Du()}`,
|
|
28313
28313
|
tabId: u,
|
|
28314
28314
|
username: i,
|
|
@@ -28318,7 +28318,7 @@ const lP = yd(void 0), wce = ({
|
|
|
28318
28318
|
replies: [],
|
|
28319
28319
|
createdAt: /* @__PURE__ */ new Date()
|
|
28320
28320
|
};
|
|
28321
|
-
d == null || d(
|
|
28321
|
+
d == null || d(Se), l(Se.id), E(""), D == null || D(), requestAnimationFrame(() => {
|
|
28322
28322
|
L.current && L.current.scrollTo({
|
|
28323
28323
|
top: 0,
|
|
28324
28324
|
behavior: "smooth"
|
|
@@ -28332,43 +28332,43 @@ const lP = yd(void 0), wce = ({
|
|
|
28332
28332
|
l,
|
|
28333
28333
|
D,
|
|
28334
28334
|
L
|
|
28335
|
-
]), Ee =
|
|
28336
|
-
(
|
|
28337
|
-
|
|
28335
|
+
]), Ee = Te(
|
|
28336
|
+
(Se) => {
|
|
28337
|
+
Se.key === "Enter" && !Se.shiftKey && (Se.preventDefault(), ve());
|
|
28338
28338
|
},
|
|
28339
28339
|
[ve]
|
|
28340
|
-
), Ce =
|
|
28340
|
+
), Ce = Te(() => {
|
|
28341
28341
|
!a || !j.trim() || (W(a, j, p), _(""));
|
|
28342
|
-
}, [a, j, W, p]), me =
|
|
28343
|
-
(
|
|
28344
|
-
|
|
28342
|
+
}, [a, j, W, p]), me = Te(
|
|
28343
|
+
(Se) => {
|
|
28344
|
+
Se.key === "Enter" && !Se.shiftKey && (Se.preventDefault(), Ce());
|
|
28345
28345
|
},
|
|
28346
28346
|
[Ce]
|
|
28347
|
-
), je =
|
|
28348
|
-
M((
|
|
28349
|
-
}, []), Me =
|
|
28350
|
-
(
|
|
28351
|
-
|
|
28347
|
+
), je = Te(() => {
|
|
28348
|
+
M((Se) => !Se);
|
|
28349
|
+
}, []), Me = Te(
|
|
28350
|
+
(Se, Pe) => {
|
|
28351
|
+
Se.currentTarget.style.height = "auto";
|
|
28352
28352
|
const nt = Math.min(
|
|
28353
|
-
Math.max(40,
|
|
28353
|
+
Math.max(40, Se.currentTarget.scrollHeight),
|
|
28354
28354
|
Pe.length > 30 || Pe.includes(`
|
|
28355
28355
|
`) ? 96 : 40
|
|
28356
28356
|
);
|
|
28357
|
-
|
|
28357
|
+
Se.currentTarget.style.height = `${nt}px`;
|
|
28358
28358
|
},
|
|
28359
28359
|
[]
|
|
28360
|
-
),
|
|
28360
|
+
), Ae = Ft(
|
|
28361
28361
|
() => V.filter(
|
|
28362
|
-
(
|
|
28362
|
+
(Se) => !Se.resolved && Se.selectedContent && Se.selectedContent.length > 0 && !Se.deleted
|
|
28363
28363
|
),
|
|
28364
28364
|
[V]
|
|
28365
28365
|
), Ne = Ft(
|
|
28366
|
-
() =>
|
|
28367
|
-
[
|
|
28368
|
-
), Je =
|
|
28369
|
-
var
|
|
28370
|
-
if ((
|
|
28371
|
-
const nt =
|
|
28366
|
+
() => Ae.findIndex((Se) => Se.id === a),
|
|
28367
|
+
[Ae, a]
|
|
28368
|
+
), Je = Te(() => {
|
|
28369
|
+
var Se, Pe;
|
|
28370
|
+
if ((Se = t.view) != null && Se.dom && Ne > 0) {
|
|
28371
|
+
const nt = Ae[Ne - 1], ct = t.view.dom.querySelector(
|
|
28372
28372
|
`[data-comment-id="${nt.id}"]`
|
|
28373
28373
|
);
|
|
28374
28374
|
if (ct) {
|
|
@@ -28376,10 +28376,10 @@ const lP = yd(void 0), wce = ({
|
|
|
28376
28376
|
t.commands.setTextSelection({ from: Ke, to: ht }), ne(nt.id || "");
|
|
28377
28377
|
}
|
|
28378
28378
|
}
|
|
28379
|
-
}, [Ne,
|
|
28380
|
-
var
|
|
28381
|
-
if ((
|
|
28382
|
-
const nt =
|
|
28379
|
+
}, [Ne, Ae, t, ne]), st = Te(() => {
|
|
28380
|
+
var Se, Pe;
|
|
28381
|
+
if ((Se = t.view) != null && Se.dom && Ne < Ae.length - 1) {
|
|
28382
|
+
const nt = Ae[Ne + 1], ct = t.view.dom.querySelector(
|
|
28383
28383
|
`[data-comment-id="${nt.id}"]`
|
|
28384
28384
|
);
|
|
28385
28385
|
if (ct) {
|
|
@@ -28387,7 +28387,7 @@ const lP = yd(void 0), wce = ({
|
|
|
28387
28387
|
t.commands.setTextSelection({ from: Ke, to: ht }), ne(nt.id || "");
|
|
28388
28388
|
}
|
|
28389
28389
|
}
|
|
28390
|
-
}, [Ne,
|
|
28390
|
+
}, [Ne, Ae, t, ne]), wt = Ft(
|
|
28391
28391
|
() => ({
|
|
28392
28392
|
comments: V,
|
|
28393
28393
|
showResolved: A,
|
|
@@ -28429,7 +28429,7 @@ const lP = yd(void 0), wce = ({
|
|
|
28429
28429
|
buttonRef: K,
|
|
28430
28430
|
replySectionRef: P,
|
|
28431
28431
|
dropdownRef: re,
|
|
28432
|
-
activeComments:
|
|
28432
|
+
activeComments: Ae,
|
|
28433
28433
|
handleInput: Me,
|
|
28434
28434
|
isCommentActive: J,
|
|
28435
28435
|
isCommentResolved: ae,
|
|
@@ -28484,7 +28484,7 @@ const lP = yd(void 0), wce = ({
|
|
|
28484
28484
|
he,
|
|
28485
28485
|
X,
|
|
28486
28486
|
oe,
|
|
28487
|
-
|
|
28487
|
+
Ae,
|
|
28488
28488
|
Me,
|
|
28489
28489
|
J,
|
|
28490
28490
|
ae,
|
|
@@ -31829,10 +31829,10 @@ function IP() {
|
|
|
31829
31829
|
const ye = Kt({}, ["audio", "video", "img", "source", "image", "track"]);
|
|
31830
31830
|
let ve = null;
|
|
31831
31831
|
const Ee = Kt({}, ["alt", "class", "for", "id", "label", "name", "pattern", "placeholder", "role", "summary", "title", "value", "style", "xmlns"]), Ce = "http://www.w3.org/1998/Math/MathML", me = "http://www.w3.org/2000/svg", je = "http://www.w3.org/1999/xhtml";
|
|
31832
|
-
let Me = je,
|
|
31832
|
+
let Me = je, Ae = !1, Ne = null;
|
|
31833
31833
|
const Je = Kt({}, [Ce, me, je], Ov);
|
|
31834
31834
|
let st = Kt({}, ["mi", "mo", "mn", "ms", "mtext"]), wt = Kt({}, ["annotation-xml"]);
|
|
31835
|
-
const
|
|
31835
|
+
const Se = Kt({}, ["title", "style", "font", "a", "script"]);
|
|
31836
31836
|
let Pe = null;
|
|
31837
31837
|
const nt = ["application/xhtml+xml", "text/html"], ct = "text/html";
|
|
31838
31838
|
let Ke = null, ht = null;
|
|
@@ -31859,7 +31859,7 @@ function IP() {
|
|
|
31859
31859
|
tagName: "template"
|
|
31860
31860
|
});
|
|
31861
31861
|
const ot = e2(fe.tagName), $t = e2(Le.tagName);
|
|
31862
|
-
return Ne[fe.namespaceURI] ? fe.namespaceURI === me ? Le.namespaceURI === je ? ot === "svg" : Le.namespaceURI === Ce ? ot === "svg" && ($t === "annotation-xml" || st[$t]) : !!Xt[ot] : fe.namespaceURI === Ce ? Le.namespaceURI === je ? ot === "math" : Le.namespaceURI === me ? ot === "math" && wt[$t] : !!bn[ot] : fe.namespaceURI === je ? Le.namespaceURI === me && !wt[$t] || Le.namespaceURI === Ce && !st[$t] ? !1 : !bn[ot] && (
|
|
31862
|
+
return Ne[fe.namespaceURI] ? fe.namespaceURI === me ? Le.namespaceURI === je ? ot === "svg" : Le.namespaceURI === Ce ? ot === "svg" && ($t === "annotation-xml" || st[$t]) : !!Xt[ot] : fe.namespaceURI === Ce ? Le.namespaceURI === je ? ot === "math" : Le.namespaceURI === me ? ot === "math" && wt[$t] : !!bn[ot] : fe.namespaceURI === je ? Le.namespaceURI === me && !wt[$t] || Le.namespaceURI === Ce && !st[$t] ? !1 : !bn[ot] && (Se[ot] || !Xt[ot]) : !!(Pe === "application/xhtml+xml" && Ne[fe.namespaceURI]) : !1;
|
|
31863
31863
|
}, cn = function(fe) {
|
|
31864
31864
|
Gh(t.removed, {
|
|
31865
31865
|
element: fe
|
|
@@ -31910,7 +31910,7 @@ function IP() {
|
|
|
31910
31910
|
if (!Le || !Le.documentElement) {
|
|
31911
31911
|
Le = w.createDocument(Me, "template", null);
|
|
31912
31912
|
try {
|
|
31913
|
-
Le.documentElement.innerHTML =
|
|
31913
|
+
Le.documentElement.innerHTML = Ae ? k : $t;
|
|
31914
31914
|
} catch {
|
|
31915
31915
|
}
|
|
31916
31916
|
}
|
|
@@ -32071,7 +32071,7 @@ function IP() {
|
|
|
32071
32071
|
};
|
|
32072
32072
|
return t.sanitize = function(Qe) {
|
|
32073
32073
|
let fe = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, Le = null, ot = null, $t = null, Zt = null;
|
|
32074
|
-
if (
|
|
32074
|
+
if (Ae = !Qe, Ae && (Qe = "<!-->"), typeof Qe != "string" && !rt(Qe))
|
|
32075
32075
|
if (typeof Qe.toString == "function") {
|
|
32076
32076
|
if (Qe = Qe.toString(), typeof Qe != "string")
|
|
32077
32077
|
throw Yh("dirty is not a string, aborting");
|
|
@@ -36557,7 +36557,7 @@ const $0 = (e) => {
|
|
|
36557
36557
|
setIsLinkPopupOpen: o,
|
|
36558
36558
|
onError: i
|
|
36559
36559
|
}) => {
|
|
36560
|
-
const [s, a] = Be(t.getAttributes("link").href), l =
|
|
36560
|
+
const [s, a] = Be(t.getAttributes("link").href), l = Te(() => {
|
|
36561
36561
|
if (s === "" || s === void 0) {
|
|
36562
36562
|
t.chain().focus().extendMarkRange("link").unsetLink().run();
|
|
36563
36563
|
return;
|
|
@@ -37752,7 +37752,7 @@ const $0 = (e) => {
|
|
|
37752
37752
|
const S = m.current.closest('[role="dialog"]');
|
|
37753
37753
|
S && S.remove();
|
|
37754
37754
|
}
|
|
37755
|
-
}, E =
|
|
37755
|
+
}, E = Te(() => {
|
|
37756
37756
|
if (!(o != null && o.length)) return null;
|
|
37757
37757
|
let T = o.sort(
|
|
37758
37758
|
(S, L) => new Date(S.createdAt || /* @__PURE__ */ new Date()).getTime() - new Date(L.createdAt || /* @__PURE__ */ new Date()).getTime()
|
|
@@ -38619,12 +38619,12 @@ const E1e = /* @__PURE__ */ qu(k1e), t0 = () => {
|
|
|
38619
38619
|
});
|
|
38620
38620
|
}), !c;
|
|
38621
38621
|
}, Dz = (e) => {
|
|
38622
|
-
const t =
|
|
38622
|
+
const t = Te(
|
|
38623
38623
|
(o) => {
|
|
38624
38624
|
e && e.chain().focus().setFontSize(o).run();
|
|
38625
38625
|
},
|
|
38626
38626
|
[e]
|
|
38627
|
-
), n =
|
|
38627
|
+
), n = Te(
|
|
38628
38628
|
(o) => {
|
|
38629
38629
|
if (!e) return;
|
|
38630
38630
|
const { from: i, to: s } = e.state.selection;
|
|
@@ -39671,16 +39671,16 @@ R1e.displayName = "Toolbar.Divider";
|
|
|
39671
39671
|
const I1e = {
|
|
39672
39672
|
Wrapper: Sz
|
|
39673
39673
|
}, L1e = ({ editor: e, appendTo: t }) => {
|
|
39674
|
-
const n =
|
|
39674
|
+
const n = Te(() => O1e(e, "columns"), [e]), r = Te(() => {
|
|
39675
39675
|
const l = !e.isEditable;
|
|
39676
39676
|
return e.isActive("columns") && !l;
|
|
39677
|
-
}, [e]), o =
|
|
39677
|
+
}, [e]), o = Te(() => {
|
|
39678
39678
|
e.chain().focus().setLayout(gc.AlignLeft).run();
|
|
39679
|
-
}, [e]), i =
|
|
39679
|
+
}, [e]), i = Te(() => {
|
|
39680
39680
|
e.chain().focus().setLayout(gc.AlignRight).run();
|
|
39681
|
-
}, [e]), s =
|
|
39681
|
+
}, [e]), s = Te(() => {
|
|
39682
39682
|
e.chain().focus().setLayout(gc.AlignCenter).run();
|
|
39683
|
-
}, [e]), a =
|
|
39683
|
+
}, [e]), a = Te(() => {
|
|
39684
39684
|
e.chain().focus().deleteNode("columns").run();
|
|
39685
39685
|
}, [e]);
|
|
39686
39686
|
return /* @__PURE__ */ F.jsx(
|
|
@@ -40167,13 +40167,13 @@ const Nz = ({
|
|
|
40167
40167
|
ydoc: n,
|
|
40168
40168
|
exportOptions: r
|
|
40169
40169
|
}) => {
|
|
40170
|
-
const o =
|
|
40170
|
+
const o = Te(
|
|
40171
40171
|
(x) => (x || "Untitled").replace(/\s+/g, " ").trim(),
|
|
40172
40172
|
[]
|
|
40173
|
-
), i =
|
|
40173
|
+
), i = Te(
|
|
40174
40174
|
(x) => x.replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">").replace(/"/g, """).replace(/'/g, "'"),
|
|
40175
40175
|
[]
|
|
40176
|
-
), s =
|
|
40176
|
+
), s = Te((x) => x.includes("(.pdf)") ? "pdf" : x.includes("(.md)") ? "md" : x.includes("(.html)") ? "html" : x.includes("(.txt)") ? "txt" : "", []), a = Ft(
|
|
40177
40177
|
() => r.filter((x) => x !== null).reduce((x, v) => {
|
|
40178
40178
|
const k = s(v.title);
|
|
40179
40179
|
return k && (x[k] = v), x;
|
|
@@ -40185,26 +40185,26 @@ const Nz = ({
|
|
|
40185
40185
|
label: v.title
|
|
40186
40186
|
})),
|
|
40187
40187
|
[a]
|
|
40188
|
-
), u =
|
|
40188
|
+
), u = Te(() => {
|
|
40189
40189
|
if (!e) return "Untitled";
|
|
40190
40190
|
const x = e.getJSON();
|
|
40191
40191
|
return $0(
|
|
40192
40192
|
x
|
|
40193
40193
|
) || "Untitled";
|
|
40194
|
-
}, [e]), c =
|
|
40194
|
+
}, [e]), c = Te(
|
|
40195
40195
|
async (x, v) => {
|
|
40196
40196
|
const k = a[x];
|
|
40197
40197
|
!k || k.disabled || k.onClick(v);
|
|
40198
40198
|
},
|
|
40199
40199
|
[a]
|
|
40200
|
-
), d =
|
|
40200
|
+
), d = Te(
|
|
40201
40201
|
(x) => {
|
|
40202
40202
|
if (!e || !n) return null;
|
|
40203
40203
|
const v = n.getXmlFragment(x), k = Bz(v);
|
|
40204
40204
|
return kh(e, k);
|
|
40205
40205
|
},
|
|
40206
40206
|
[e, n]
|
|
40207
|
-
), p =
|
|
40207
|
+
), p = Te(async () => {
|
|
40208
40208
|
if (!e || !n || t.length === 0) return;
|
|
40209
40209
|
const x = [];
|
|
40210
40210
|
try {
|
|
@@ -40234,7 +40234,7 @@ const Nz = ({
|
|
|
40234
40234
|
o,
|
|
40235
40235
|
t,
|
|
40236
40236
|
n
|
|
40237
|
-
]), h =
|
|
40237
|
+
]), h = Te(
|
|
40238
40238
|
async (x) => {
|
|
40239
40239
|
if (!e || !n || t.length === 0) return;
|
|
40240
40240
|
const v = x || u(), k = [];
|
|
@@ -40263,7 +40263,7 @@ ${T}`.trim());
|
|
|
40263
40263
|
}
|
|
40264
40264
|
},
|
|
40265
40265
|
[d, e, u, o, t, n]
|
|
40266
|
-
), f =
|
|
40266
|
+
), f = Te(
|
|
40267
40267
|
async (x) => {
|
|
40268
40268
|
if (!e || !n || t.length === 0) return;
|
|
40269
40269
|
const v = x || u(), k = [];
|
|
@@ -40297,7 +40297,7 @@ ${O.getHTML()}`
|
|
|
40297
40297
|
t,
|
|
40298
40298
|
n
|
|
40299
40299
|
]
|
|
40300
|
-
), g =
|
|
40300
|
+
), g = Te(
|
|
40301
40301
|
async (x) => {
|
|
40302
40302
|
if (!e || !n || t.length === 0) return;
|
|
40303
40303
|
const v = x || u(), k = [];
|
|
@@ -40325,7 +40325,7 @@ ${O.getHTML()}`
|
|
|
40325
40325
|
}
|
|
40326
40326
|
},
|
|
40327
40327
|
[d, e, u, t, n]
|
|
40328
|
-
), m =
|
|
40328
|
+
), m = Te(
|
|
40329
40329
|
async ({
|
|
40330
40330
|
format: x,
|
|
40331
40331
|
tab: v,
|
|
@@ -40361,12 +40361,12 @@ ${O.getHTML()}`
|
|
|
40361
40361
|
g,
|
|
40362
40362
|
c
|
|
40363
40363
|
]
|
|
40364
|
-
), b =
|
|
40364
|
+
), b = Te(
|
|
40365
40365
|
({ format: x, tab: v, name: k }) => {
|
|
40366
40366
|
m({ format: x, tab: v, name: k });
|
|
40367
40367
|
},
|
|
40368
40368
|
[m]
|
|
40369
|
-
), y =
|
|
40369
|
+
), y = Te(
|
|
40370
40370
|
async ({
|
|
40371
40371
|
format: x,
|
|
40372
40372
|
tab: v,
|
|
@@ -40406,7 +40406,7 @@ ${O.getHTML()}`
|
|
|
40406
40406
|
{ id: "all", label: "All tabs" }
|
|
40407
40407
|
],
|
|
40408
40408
|
[]
|
|
40409
|
-
), A = s.length > 1, M =
|
|
40409
|
+
), A = s.length > 1, M = Te(
|
|
40410
40410
|
(j = "pdf", _) => {
|
|
40411
40411
|
if (k.find(
|
|
40412
40412
|
(E) => E.id === j
|
|
@@ -47992,7 +47992,7 @@ const f4 = Et.use || // This extra generic is to avoid TypeScript mixing up the
|
|
|
47992
47992
|
}, [
|
|
47993
47993
|
r,
|
|
47994
47994
|
b
|
|
47995
|
-
]), P = _1.useSyncExternalStore(
|
|
47995
|
+
]), P = _1.useSyncExternalStore(Te(
|
|
47996
47996
|
(ce) => _(b, (N, te) => {
|
|
47997
47997
|
S(te, N) || ce();
|
|
47998
47998
|
}),
|
|
@@ -48001,7 +48001,7 @@ const f4 = Et.use || // This extra generic is to avoid TypeScript mixing up the
|
|
|
48001
48001
|
r,
|
|
48002
48002
|
b
|
|
48003
48003
|
]
|
|
48004
|
-
), L[0], L[1]), $ = !x.current, q = h[b] && h[b].length > 0, z = P.data, U = nn(z) ? T && B$(T) ? f4(T) : T : z, X = P.error, oe = Ve(U), ee = p ? nn(z) ? nn(oe.current) ? U : oe.current : z : U, K = q && !nn(X) ? !1 : $ && !nn(a) ? a : C().isPaused() ? !1 : i ? nn(U) ? !1 : l : nn(U) || l, re = !!(b && t && $ && K), J = nn(P.isValidating) ? re : P.isValidating, ae = nn(P.isLoading) ? re : P.isLoading, B =
|
|
48004
|
+
), L[0], L[1]), $ = !x.current, q = h[b] && h[b].length > 0, z = P.data, U = nn(z) ? T && B$(T) ? f4(T) : T : z, X = P.error, oe = Ve(U), ee = p ? nn(z) ? nn(oe.current) ? U : oe.current : z : U, K = q && !nn(X) ? !1 : $ && !nn(a) ? a : C().isPaused() ? !1 : i ? nn(U) ? !1 : l : nn(U) || l, re = !!(b && t && $ && K), J = nn(P.isValidating) ? re : P.isValidating, ae = nn(P.isLoading) ? re : P.isLoading, B = Te(
|
|
48005
48005
|
async (ce) => {
|
|
48006
48006
|
const N = w.current;
|
|
48007
48007
|
if (!b || !N || v.current || C().isPaused())
|
|
@@ -48064,7 +48064,7 @@ const f4 = Et.use || // This extra generic is to avoid TypeScript mixing up the
|
|
|
48064
48064
|
b,
|
|
48065
48065
|
r
|
|
48066
48066
|
]
|
|
48067
|
-
), Y =
|
|
48067
|
+
), Y = Te(
|
|
48068
48068
|
// Use callback to make sure `keyRef.current` returns latest result every time
|
|
48069
48069
|
(...ce) => M$(r, k.current, ...ce),
|
|
48070
48070
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
@@ -48314,7 +48314,7 @@ const Mxe = ({
|
|
|
48314
48314
|
Dw.delete(y), l.current && (cancelAnimationFrame(l.current), l.current = null);
|
|
48315
48315
|
};
|
|
48316
48316
|
}, [n]);
|
|
48317
|
-
const u =
|
|
48317
|
+
const u = Te(() => {
|
|
48318
48318
|
const { doc: y } = n.state, x = y.content.content.filter(
|
|
48319
48319
|
(C) => {
|
|
48320
48320
|
var A, M, j;
|
|
@@ -48333,7 +48333,7 @@ const Mxe = ({
|
|
|
48333
48333
|
headingCount: x
|
|
48334
48334
|
};
|
|
48335
48335
|
return o.current = D, i.current = v, Ud = D, OS = k, D;
|
|
48336
|
-
}, [n]), c =
|
|
48336
|
+
}, [n]), c = Te((y) => {
|
|
48337
48337
|
var D;
|
|
48338
48338
|
const { doc: x } = y.state, v = /* @__PURE__ */ new Map(), k = [];
|
|
48339
48339
|
let w = 0;
|
|
@@ -48428,7 +48428,7 @@ const Mxe = ({
|
|
|
48428
48428
|
u,
|
|
48429
48429
|
e.content,
|
|
48430
48430
|
s
|
|
48431
|
-
]), m =
|
|
48431
|
+
]), m = Te(() => {
|
|
48432
48432
|
var C;
|
|
48433
48433
|
if (!h) return;
|
|
48434
48434
|
const y = t(), { headingMap: x } = u(), v = x.get(h);
|
|
@@ -48456,7 +48456,7 @@ const Mxe = ({
|
|
|
48456
48456
|
const A = t() + e.nodeSize;
|
|
48457
48457
|
n.chain().focus(A - 1).run();
|
|
48458
48458
|
});
|
|
48459
|
-
}, [n, h, u, t, e]), b =
|
|
48459
|
+
}, [n, h, u, t, e]), b = Te(() => {
|
|
48460
48460
|
var C, A;
|
|
48461
48461
|
if (!h) return t() + e.nodeSize;
|
|
48462
48462
|
const { headingMap: y } = u(), x = y.get(h);
|
|
@@ -48590,7 +48590,7 @@ const Mxe = ({
|
|
|
48590
48590
|
}
|
|
48591
48591
|
};
|
|
48592
48592
|
function Rxe(e) {
|
|
48593
|
-
const [t, n] = Be(!1), r = Ve(e), o = Ve(null), i =
|
|
48593
|
+
const [t, n] = Be(!1), r = Ve(e), o = Ve(null), i = Te(() => {
|
|
48594
48594
|
if (!r.current) {
|
|
48595
48595
|
n(!1);
|
|
48596
48596
|
return;
|
|
@@ -48621,10 +48621,10 @@ function Rxe(e) {
|
|
|
48621
48621
|
);
|
|
48622
48622
|
}
|
|
48623
48623
|
const Ixe = (e, t, n) => {
|
|
48624
|
-
const r = Rxe(e), o =
|
|
48624
|
+
const r = Rxe(e), o = Te(() => {
|
|
48625
48625
|
const l = e.chain();
|
|
48626
48626
|
l.setNodeSelection(n).unsetAllMarks(), (t == null ? void 0 : t.type.name) !== "paragraph" && l.setParagraph(), l.run();
|
|
48627
|
-
}, [e, n, t == null ? void 0 : t.type.name]), i =
|
|
48627
|
+
}, [e, n, t == null ? void 0 : t.type.name]), i = Te(() => {
|
|
48628
48628
|
if (r)
|
|
48629
48629
|
return;
|
|
48630
48630
|
e.commands.setNodeSelection(n);
|
|
@@ -48633,13 +48633,13 @@ const Ixe = (e, t, n) => {
|
|
|
48633
48633
|
n + ((t == null ? void 0 : t.nodeSize) || 0),
|
|
48634
48634
|
u.toJSON()
|
|
48635
48635
|
).run();
|
|
48636
|
-
}, [e, n, t == null ? void 0 : t.nodeSize]), s =
|
|
48636
|
+
}, [e, n, t == null ? void 0 : t.nodeSize]), s = Te(() => {
|
|
48637
48637
|
e.chain().setMeta("hideDragHandle", !0).setNodeSelection(n).run(), document.execCommand("copy"), UD({
|
|
48638
48638
|
title: "Copied to clipboard",
|
|
48639
48639
|
toastType: "mini",
|
|
48640
48640
|
variant: "success"
|
|
48641
48641
|
});
|
|
48642
|
-
}, [e, n]), a =
|
|
48642
|
+
}, [e, n]), a = Te(() => {
|
|
48643
48643
|
Oxe(e, n), e.chain().setMeta("hideDragHandle", !0).setNodeSelection(n).deleteSelection().run();
|
|
48644
48644
|
}, [e, n]);
|
|
48645
48645
|
return {
|
|
@@ -51971,7 +51971,7 @@ const g3e = Et.memo(
|
|
|
51971
51971
|
node: e,
|
|
51972
51972
|
getPos: t,
|
|
51973
51973
|
editor: n
|
|
51974
|
-
}), D =
|
|
51974
|
+
}), D = Te(() => {
|
|
51975
51975
|
const { content: B } = e.content, Y = B[0].attrs.id, Q = B[0].content.content[0].text, ce = B8(Q), N = Y.replace(/-/g, "").substring(0, 8), te = `heading=${ce}-${N}`;
|
|
51976
51976
|
i == null || i(te);
|
|
51977
51977
|
}, [e.content, i]), C = Ft(() => {
|
|
@@ -52037,31 +52037,31 @@ const g3e = Et.memo(
|
|
|
52037
52037
|
}, O = (B, Y) => {
|
|
52038
52038
|
const Q = t(), ce = Q + e.nodeSize;
|
|
52039
52039
|
B === "img" ? n == null || n.chain().focus(Q).deleteRange({ from: Q === 0 ? Q : Q + 1, to: ce }).setMedia({ src: Y, "media-type": "img" }).run() : B !== "secure-img" && (n == null || n.chain().focus(Q).deleteRange({ from: Q === 0 ? Q : Q + 1, to: ce }).setIframe({ src: Y, width: 640, height: 360 }).run());
|
|
52040
|
-
}, E =
|
|
52040
|
+
}, E = Te((B) => {
|
|
52041
52041
|
B.altKey ? S() : T();
|
|
52042
|
-
}, []), T =
|
|
52042
|
+
}, []), T = Te(() => {
|
|
52043
52043
|
const B = t() + e.nodeSize;
|
|
52044
52044
|
n.commands.insertContentAt(B, {
|
|
52045
52045
|
type: "dBlock",
|
|
52046
52046
|
content: [{ type: "paragraph" }]
|
|
52047
52047
|
});
|
|
52048
|
-
}, [t, n, e.nodeSize]), S =
|
|
52048
|
+
}, [t, n, e.nodeSize]), S = Te(() => {
|
|
52049
52049
|
const B = t();
|
|
52050
52050
|
n.commands.insertContentAt(B, {
|
|
52051
52051
|
type: "dBlock",
|
|
52052
52052
|
content: [{ type: "paragraph" }]
|
|
52053
52053
|
});
|
|
52054
|
-
}, [t, n]), L =
|
|
52054
|
+
}, [t, n]), L = Te(
|
|
52055
52055
|
(B) => {
|
|
52056
52056
|
B.altKey ? r() : l((Y) => !Y);
|
|
52057
52057
|
},
|
|
52058
52058
|
[r]
|
|
52059
|
-
), P =
|
|
52059
|
+
), P = Te(() => {
|
|
52060
52060
|
_();
|
|
52061
52061
|
}, [A, j]), $ = Ft(
|
|
52062
52062
|
() => I$(P, 1e3),
|
|
52063
52063
|
[P]
|
|
52064
|
-
), q =
|
|
52064
|
+
), q = Te(
|
|
52065
52065
|
(B) => {
|
|
52066
52066
|
const Y = t() + e.nodeSize;
|
|
52067
52067
|
n.commands.insertContentAt(Y - 4, B);
|
|
@@ -52073,7 +52073,7 @@ const g3e = Et.memo(
|
|
|
52073
52073
|
), U = Ft(
|
|
52074
52074
|
() => zxe(q),
|
|
52075
52075
|
[q]
|
|
52076
|
-
), X =
|
|
52076
|
+
), X = Te(() => {
|
|
52077
52077
|
c(!u), p(u ? 2 : U.length);
|
|
52078
52078
|
}, [u, U.length]), oe = Ft(() => {
|
|
52079
52079
|
switch (w) {
|
|
@@ -54279,15 +54279,15 @@ function e4e(e, t) {
|
|
|
54279
54279
|
if (Me === void 0 && (Me = !0), C.forEach(function(Ne) {
|
|
54280
54280
|
Ne[me] && Ne[me].apply(Ne, je);
|
|
54281
54281
|
}), Me) {
|
|
54282
|
-
var
|
|
54283
|
-
(
|
|
54282
|
+
var Ae;
|
|
54283
|
+
(Ae = v.props)[me].apply(Ae, je);
|
|
54284
54284
|
}
|
|
54285
54285
|
}
|
|
54286
54286
|
function $() {
|
|
54287
54287
|
var me = v.props.aria;
|
|
54288
54288
|
if (me.content) {
|
|
54289
|
-
var je = "aria-" + me.content, Me = w.id,
|
|
54290
|
-
|
|
54289
|
+
var je = "aria-" + me.content, Me = w.id, Ae = op(v.props.triggerTarget || e);
|
|
54290
|
+
Ae.forEach(function(Ne) {
|
|
54291
54291
|
var Je = Ne.getAttribute(je);
|
|
54292
54292
|
if (v.state.isVisible)
|
|
54293
54293
|
Ne.setAttribute(je, Je ? Je + " " + Me : Me);
|
|
@@ -54352,17 +54352,17 @@ function e4e(e, t) {
|
|
|
54352
54352
|
}
|
|
54353
54353
|
function ae(me, je) {
|
|
54354
54354
|
var Me = T().box;
|
|
54355
|
-
function
|
|
54356
|
-
Ne.target === Me && (F4(Me, "remove",
|
|
54355
|
+
function Ae(Ne) {
|
|
54356
|
+
Ne.target === Me && (F4(Me, "remove", Ae), je());
|
|
54357
54357
|
}
|
|
54358
54358
|
if (me === 0)
|
|
54359
54359
|
return je();
|
|
54360
|
-
F4(Me, "remove", d), F4(Me, "add",
|
|
54360
|
+
F4(Me, "remove", d), F4(Me, "add", Ae), d = Ae;
|
|
54361
54361
|
}
|
|
54362
54362
|
function B(me, je, Me) {
|
|
54363
54363
|
Me === void 0 && (Me = !1);
|
|
54364
|
-
var
|
|
54365
|
-
|
|
54364
|
+
var Ae = op(v.props.triggerTarget || e);
|
|
54365
|
+
Ae.forEach(function(Ne) {
|
|
54366
54366
|
Ne.addEventListener(me, je, Me), h.push({
|
|
54367
54367
|
node: Ne,
|
|
54368
54368
|
eventType: me,
|
|
@@ -54393,23 +54393,23 @@ function e4e(e, t) {
|
|
|
54393
54393
|
}
|
|
54394
54394
|
function Q() {
|
|
54395
54395
|
h.forEach(function(me) {
|
|
54396
|
-
var je = me.node, Me = me.eventType,
|
|
54397
|
-
je.removeEventListener(Me,
|
|
54396
|
+
var je = me.node, Me = me.eventType, Ae = me.handler, Ne = me.options;
|
|
54397
|
+
je.removeEventListener(Me, Ae, Ne);
|
|
54398
54398
|
}), h = [];
|
|
54399
54399
|
}
|
|
54400
54400
|
function ce(me) {
|
|
54401
54401
|
var je, Me = !1;
|
|
54402
54402
|
if (!(!v.state.isEnabled || G(me) || a)) {
|
|
54403
|
-
var
|
|
54403
|
+
var Ae = ((je = c) == null ? void 0 : je.type) === "focus";
|
|
54404
54404
|
c = me, g = me.currentTarget, q(), !v.state.isVisible && Ove(me) && tm.forEach(function(Ne) {
|
|
54405
54405
|
return Ne(me);
|
|
54406
|
-
}), me.type === "click" && (v.props.trigger.indexOf("mouseenter") < 0 || s) && v.props.hideOnClick !== !1 && v.state.isVisible ? Me = !0 : be(me), me.type === "click" && (s = !Me), Me && !
|
|
54406
|
+
}), me.type === "click" && (v.props.trigger.indexOf("mouseenter") < 0 || s) && v.props.hideOnClick !== !1 && v.state.isVisible ? Me = !0 : be(me), me.type === "click" && (s = !Me), Me && !Ae && de(me);
|
|
54407
54407
|
}
|
|
54408
54408
|
}
|
|
54409
54409
|
function N(me) {
|
|
54410
54410
|
var je = me.target, Me = O().contains(je) || w.contains(je);
|
|
54411
54411
|
if (!(me.type === "mousemove" && Me)) {
|
|
54412
|
-
var
|
|
54412
|
+
var Ae = De().concat(w).map(function(Ne) {
|
|
54413
54413
|
var Je, st = Ne._tippy, wt = (Je = st.popperInstance) == null ? void 0 : Je.state;
|
|
54414
54414
|
return wt ? {
|
|
54415
54415
|
popperRect: Ne.getBoundingClientRect(),
|
|
@@ -54417,7 +54417,7 @@ function e4e(e, t) {
|
|
|
54417
54417
|
props: n
|
|
54418
54418
|
} : null;
|
|
54419
54419
|
}).filter(Boolean);
|
|
54420
|
-
Uve(
|
|
54420
|
+
Uve(Ae, me) && (z(), de(me));
|
|
54421
54421
|
}
|
|
54422
54422
|
}
|
|
54423
54423
|
function te(me) {
|
|
@@ -54438,10 +54438,10 @@ function e4e(e, t) {
|
|
|
54438
54438
|
}
|
|
54439
54439
|
function V() {
|
|
54440
54440
|
ie();
|
|
54441
|
-
var me = v.props, je = me.popperOptions, Me = me.placement,
|
|
54441
|
+
var me = v.props, je = me.popperOptions, Me = me.placement, Ae = me.offset, Ne = me.getReferenceClientRect, Je = me.moveTransition, st = _() ? Sw(w).arrow : null, wt = Ne ? {
|
|
54442
54442
|
getBoundingClientRect: Ne,
|
|
54443
54443
|
contextElement: Ne.contextElement || O()
|
|
54444
|
-
} : e,
|
|
54444
|
+
} : e, Se = {
|
|
54445
54445
|
name: "$$tippy",
|
|
54446
54446
|
enabled: !0,
|
|
54447
54447
|
phase: "beforeWrite",
|
|
@@ -54458,7 +54458,7 @@ function e4e(e, t) {
|
|
|
54458
54458
|
}, Pe = [{
|
|
54459
54459
|
name: "offset",
|
|
54460
54460
|
options: {
|
|
54461
|
-
offset:
|
|
54461
|
+
offset: Ae
|
|
54462
54462
|
}
|
|
54463
54463
|
}, {
|
|
54464
54464
|
name: "preventOverflow",
|
|
@@ -54480,7 +54480,7 @@ function e4e(e, t) {
|
|
|
54480
54480
|
options: {
|
|
54481
54481
|
adaptive: !Je
|
|
54482
54482
|
}
|
|
54483
|
-
},
|
|
54483
|
+
}, Se];
|
|
54484
54484
|
_() && st && Pe.push({
|
|
54485
54485
|
name: "arrow",
|
|
54486
54486
|
options: {
|
|
@@ -54511,8 +54511,8 @@ function e4e(e, t) {
|
|
|
54511
54511
|
}
|
|
54512
54512
|
function be(me) {
|
|
54513
54513
|
v.clearDelayTimeouts(), me && P("onTrigger", [v, me]), ee();
|
|
54514
|
-
var je = S(!0), Me = M(),
|
|
54515
|
-
Ws.isTouch &&
|
|
54514
|
+
var je = S(!0), Me = M(), Ae = Me[0], Ne = Me[1];
|
|
54515
|
+
Ws.isTouch && Ae === "hold" && Ne && (je = Ne), je ? r = setTimeout(function() {
|
|
54516
54516
|
v.show();
|
|
54517
54517
|
}, je) : v.show();
|
|
54518
54518
|
}
|
|
@@ -54545,10 +54545,10 @@ function e4e(e, t) {
|
|
|
54545
54545
|
var je = v.props, Me = uT(e, Object.assign({}, je, oT(me), {
|
|
54546
54546
|
ignoreAttributes: !0
|
|
54547
54547
|
}));
|
|
54548
|
-
v.props = Me, Y(), je.interactiveDebounce !== Me.interactiveDebounce && (z(), f = nT(N, Me.interactiveDebounce)), je.triggerTarget && !Me.triggerTarget ? op(je.triggerTarget).forEach(function(
|
|
54549
|
-
|
|
54550
|
-
}) : Me.triggerTarget && e.removeAttribute("aria-expanded"), q(), L(), D && D(je, Me), v.popperInstance && (V(), De().forEach(function(
|
|
54551
|
-
requestAnimationFrame(
|
|
54548
|
+
v.props = Me, Y(), je.interactiveDebounce !== Me.interactiveDebounce && (z(), f = nT(N, Me.interactiveDebounce)), je.triggerTarget && !Me.triggerTarget ? op(je.triggerTarget).forEach(function(Ae) {
|
|
54549
|
+
Ae.removeAttribute("aria-expanded");
|
|
54550
|
+
}) : Me.triggerTarget && e.removeAttribute("aria-expanded"), q(), L(), D && D(je, Me), v.popperInstance && (V(), De().forEach(function(Ae) {
|
|
54551
|
+
requestAnimationFrame(Ae._tippy.popperInstance.forceUpdate);
|
|
54552
54552
|
})), P("onAfterUpdate", [v, me]);
|
|
54553
54553
|
}
|
|
54554
54554
|
}
|
|
@@ -54559,8 +54559,8 @@ function e4e(e, t) {
|
|
|
54559
54559
|
}
|
|
54560
54560
|
function pe() {
|
|
54561
54561
|
process.env.NODE_ENV !== "production" && qa(v.state.isDestroyed, Pd("show"));
|
|
54562
|
-
var me = v.state.isVisible, je = v.state.isDestroyed, Me = !v.state.isEnabled,
|
|
54563
|
-
if (!(me || je || Me ||
|
|
54562
|
+
var me = v.state.isVisible, je = v.state.isDestroyed, Me = !v.state.isEnabled, Ae = Ws.isTouch && !v.props.touch, Ne = x4(v.props.duration, 0, xi.duration);
|
|
54563
|
+
if (!(me || je || Me || Ae) && !O().hasAttribute("disabled") && (P("onShow", [v], !1), v.props.onShow(v) !== !1)) {
|
|
54564
54564
|
if (v.state.isVisible = !0, _() && (w.style.visibility = "visible"), L(), ee(), v.state.isMounted || (w.style.transition = "none"), _()) {
|
|
54565
54565
|
var Je = T(), st = Je.box, wt = Je.content;
|
|
54566
54566
|
v4([st, wt], 0);
|
|
@@ -54581,13 +54581,13 @@ function e4e(e, t) {
|
|
|
54581
54581
|
}
|
|
54582
54582
|
function ye() {
|
|
54583
54583
|
process.env.NODE_ENV !== "production" && qa(v.state.isDestroyed, Pd("hide"));
|
|
54584
|
-
var me = !v.state.isVisible, je = v.state.isDestroyed, Me = !v.state.isEnabled,
|
|
54584
|
+
var me = !v.state.isVisible, je = v.state.isDestroyed, Me = !v.state.isEnabled, Ae = x4(v.props.duration, 1, xi.duration);
|
|
54585
54585
|
if (!(me || je || Me) && (P("onHide", [v], !1), v.props.onHide(v) !== !1)) {
|
|
54586
54586
|
if (v.state.isVisible = !1, v.state.isShown = !1, u = !1, s = !1, _() && (w.style.visibility = "hidden"), z(), K(), L(!0), _()) {
|
|
54587
54587
|
var Ne = T(), Je = Ne.box, st = Ne.content;
|
|
54588
|
-
v.props.animation && (v4([Je, st],
|
|
54588
|
+
v.props.animation && (v4([Je, st], Ae), iT([Je, st], "hidden"));
|
|
54589
54589
|
}
|
|
54590
|
-
$(), q(), v.props.animation ? _() && re(
|
|
54590
|
+
$(), q(), v.props.animation ? _() && re(Ae, v.unmount) : v.unmount();
|
|
54591
54591
|
}
|
|
54592
54592
|
}
|
|
54593
54593
|
function ve(me) {
|
|
@@ -69149,15 +69149,15 @@ https://github.com/nodeca/pako/blob/main/LICENSE
|
|
|
69149
69149
|
for (ie.max_code = W, he = V.heap_len >> 1; 1 <= he; he--) Y(V, de, he);
|
|
69150
69150
|
for (be = R; he = V.heap[1], V.heap[1] = V.heap[V.heap_len--], Y(V, de, 1), De = V.heap[1], V.heap[--V.heap_max] = he, V.heap[--V.heap_max] = De, de[2 * be] = de[2 * he] + de[2 * De], V.depth[be] = (V.depth[he] >= V.depth[De] ? V.depth[he] : V.depth[De]) + 1, de[2 * he + 1] = de[2 * De + 1] = be, V.heap[1] = be++, Y(V, de, 1), 2 <= V.heap_len; ) ;
|
|
69151
69151
|
V.heap[--V.heap_max] = V.heap[1], function(ne, pe) {
|
|
69152
|
-
var ye, ve, Ee, Ce, me, je, Me = pe.dyn_tree,
|
|
69152
|
+
var ye, ve, Ee, Ce, me, je, Me = pe.dyn_tree, Ae = pe.max_code, Ne = pe.stat_desc.static_tree, Je = pe.stat_desc.has_stree, st = pe.stat_desc.extra_bits, wt = pe.stat_desc.extra_base, Se = pe.stat_desc.max_length, Pe = 0;
|
|
69153
69153
|
for (Ce = 0; Ce <= m; Ce++) ne.bl_count[Ce] = 0;
|
|
69154
|
-
for (Me[2 * ne.heap[ne.heap_max] + 1] = 0, ye = ne.heap_max + 1; ye < g; ye++)
|
|
69154
|
+
for (Me[2 * ne.heap[ne.heap_max] + 1] = 0, ye = ne.heap_max + 1; ye < g; ye++) Se < (Ce = Me[2 * Me[2 * (ve = ne.heap[ye]) + 1] + 1] + 1) && (Ce = Se, Pe++), Me[2 * ve + 1] = Ce, Ae < ve || (ne.bl_count[Ce]++, me = 0, wt <= ve && (me = st[ve - wt]), je = Me[2 * ve], ne.opt_len += je * (Ce + me), Je && (ne.static_len += je * (Ne[2 * ve + 1] + me)));
|
|
69155
69155
|
if (Pe !== 0) {
|
|
69156
69156
|
do {
|
|
69157
|
-
for (Ce =
|
|
69158
|
-
ne.bl_count[Ce]--, ne.bl_count[Ce + 1] += 2, ne.bl_count[
|
|
69157
|
+
for (Ce = Se - 1; ne.bl_count[Ce] === 0; ) Ce--;
|
|
69158
|
+
ne.bl_count[Ce]--, ne.bl_count[Ce + 1] += 2, ne.bl_count[Se]--, Pe -= 2;
|
|
69159
69159
|
} while (0 < Pe);
|
|
69160
|
-
for (Ce =
|
|
69160
|
+
for (Ce = Se; Ce !== 0; Ce--) for (ve = ne.bl_count[Ce]; ve !== 0; ) Ae < (Ee = ne.heap[--ye]) || (Me[2 * Ee + 1] !== Ce && (ne.opt_len += (Ce - Me[2 * Ee + 1]) * Me[2 * Ee], Me[2 * Ee + 1] = Ce), ve--);
|
|
69161
69161
|
}
|
|
69162
69162
|
}(V, ie), re(de, W, V.bl_count);
|
|
69163
69163
|
}
|
|
@@ -106739,19 +106739,19 @@ function jOe({
|
|
|
106739
106739
|
var sX = jOe;
|
|
106740
106740
|
const aX = sr(
|
|
106741
106741
|
(e, t) => {
|
|
106742
|
-
const [n, r] = Be(0), o =
|
|
106742
|
+
const [n, r] = Be(0), o = Te(
|
|
106743
106743
|
(l) => {
|
|
106744
106744
|
const u = e.items[l];
|
|
106745
106745
|
u && e.command(u);
|
|
106746
106746
|
},
|
|
106747
106747
|
[e]
|
|
106748
|
-
), i =
|
|
106748
|
+
), i = Te(() => {
|
|
106749
106749
|
r(
|
|
106750
106750
|
(l) => (l + e.items.length - 1) % e.items.length
|
|
106751
106751
|
);
|
|
106752
|
-
}, [e.items.length]), s =
|
|
106752
|
+
}, [e.items.length]), s = Te(() => {
|
|
106753
106753
|
r((l) => (l + 1) % e.items.length);
|
|
106754
|
-
}, [e.items.length]), a =
|
|
106754
|
+
}, [e.items.length]), a = Te(() => {
|
|
106755
106755
|
o(n);
|
|
106756
106756
|
}, [o, n]);
|
|
106757
106757
|
return Re(() => {
|
|
@@ -167425,7 +167425,7 @@ const qOe = ({
|
|
|
167425
167425
|
command: t,
|
|
167426
167426
|
editor: n
|
|
167427
167427
|
}) => {
|
|
167428
|
-
const [r, o] = Be(0), [i, s] = Be(e), a = Rn("(max-width: 640px)"), l = Om(n, "callout"), u = Om(n, "codeBlock"), c = Om(n, "column"), d = Om(n, "table"), p =
|
|
167428
|
+
const [r, o] = Be(0), [i, s] = Be(e), a = Rn("(max-width: 640px)"), l = Om(n, "callout"), u = Om(n, "codeBlock"), c = Om(n, "column"), d = Om(n, "table"), p = Te(
|
|
167429
167429
|
(f) => {
|
|
167430
167430
|
const g = i[f];
|
|
167431
167431
|
g && (g.title === "Continue writing" || t(g));
|
|
@@ -169118,7 +169118,7 @@ const PM = () => {
|
|
|
169118
169118
|
}, [u]), Re(() => {
|
|
169119
169119
|
c(A), p(!!M);
|
|
169120
169120
|
}, [A, M]);
|
|
169121
|
-
const U =
|
|
169121
|
+
const U = Te(() => {
|
|
169122
169122
|
var pe, ye;
|
|
169123
169123
|
if (!k) return "";
|
|
169124
169124
|
const V = t.getJSON();
|
|
@@ -169150,7 +169150,7 @@ const PM = () => {
|
|
|
169150
169150
|
}
|
|
169151
169151
|
return De = (de + R).trim(), De && (De = `Document context (${ue} chars before, ${W} chars after):
|
|
169152
169152
|
${De}`), De;
|
|
169153
|
-
}, [t, n, k]), X =
|
|
169153
|
+
}, [t, n, k]), X = Te(async () => {
|
|
169154
169154
|
var V;
|
|
169155
169155
|
if (u.trim())
|
|
169156
169156
|
try {
|
|
@@ -169207,7 +169207,7 @@ User prompt: ${u} /no_think` : `${u} /no_think`;
|
|
|
169207
169207
|
U,
|
|
169208
169208
|
k,
|
|
169209
169209
|
r
|
|
169210
|
-
]), oe =
|
|
169210
|
+
]), oe = Te(() => {
|
|
169211
169211
|
if (P.current) {
|
|
169212
169212
|
P.current.abort(), l(!1), s(!1);
|
|
169213
169213
|
const V = setTimeout(() => {
|
|
@@ -169219,7 +169219,7 @@ User prompt: ${u} /no_think` : `${u} /no_think`;
|
|
|
169219
169219
|
}, 0);
|
|
169220
169220
|
return () => clearTimeout(V);
|
|
169221
169221
|
}
|
|
169222
|
-
}, []), ee =
|
|
169222
|
+
}, []), ee = Te(() => {
|
|
169223
169223
|
if (typeof n == "function") {
|
|
169224
169224
|
m(!0);
|
|
169225
169225
|
const V = setTimeout(() => {
|
|
@@ -169238,7 +169238,7 @@ User prompt: ${u} /no_think` : `${u} /no_think`;
|
|
|
169238
169238
|
}, 150);
|
|
169239
169239
|
return () => clearTimeout(V);
|
|
169240
169240
|
}
|
|
169241
|
-
}, [n, t, e.nodeSize, M, o]), K =
|
|
169241
|
+
}, [n, t, e.nodeSize, M, o]), K = Te(() => {
|
|
169242
169242
|
if (typeof n == "function") {
|
|
169243
169243
|
m(!0);
|
|
169244
169244
|
const V = setTimeout(() => {
|
|
@@ -169257,14 +169257,14 @@ User prompt: ${u} /no_think` : `${u} /no_think`;
|
|
|
169257
169257
|
}, 150);
|
|
169258
169258
|
return () => clearTimeout(V);
|
|
169259
169259
|
}
|
|
169260
|
-
}, [n, t, e.nodeSize, o]), re =
|
|
169260
|
+
}, [n, t, e.nodeSize, o]), re = Te(
|
|
169261
169261
|
(V) => {
|
|
169262
169262
|
c(V.target.value);
|
|
169263
169263
|
},
|
|
169264
169264
|
[]
|
|
169265
|
-
), J =
|
|
169265
|
+
), J = Te(() => {
|
|
169266
169266
|
r && u !== A && r({ prompt: u });
|
|
169267
|
-
}, [r, u, A]), ae =
|
|
169267
|
+
}, [r, u, A]), ae = Te(
|
|
169268
169268
|
(V) => {
|
|
169269
169269
|
r == null || r({ model: V });
|
|
169270
169270
|
const ie = L == null ? void 0 : L.defaultModels.find(
|
|
@@ -169273,22 +169273,22 @@ User prompt: ${u} /no_think` : `${u} /no_think`;
|
|
|
169273
169273
|
ie && (L != null && L.setActiveModel) && L.setActiveModel(ie);
|
|
169274
169274
|
},
|
|
169275
169275
|
[r, L]
|
|
169276
|
-
), B =
|
|
169276
|
+
), B = Te(() => {
|
|
169277
169277
|
var ie, he;
|
|
169278
169278
|
if (r == null || r({ content: "" }), p(!1), f(""), !j.current) return;
|
|
169279
169279
|
(ie = j.current) == null || ie.focus();
|
|
169280
169280
|
const V = j.current.value.length;
|
|
169281
169281
|
(he = j.current) == null || he.setSelectionRange(V, V), j.current.scrollTop = j.current.scrollHeight;
|
|
169282
|
-
}, [r]), Y =
|
|
169282
|
+
}, [r]), Y = Te(() => {
|
|
169283
169283
|
y(!0);
|
|
169284
|
-
}, []), Q =
|
|
169284
|
+
}, []), Q = Te(() => {
|
|
169285
169285
|
if (z) {
|
|
169286
169286
|
const V = z.getHTML();
|
|
169287
169287
|
y(!1), r == null || r({ content: V }), f(V);
|
|
169288
169288
|
}
|
|
169289
|
-
}, [z, r]), ce =
|
|
169289
|
+
}, [z, r]), ce = Te(() => {
|
|
169290
169290
|
y(!1), z && z.commands.setContent(h || M || "");
|
|
169291
|
-
}, [z, h, M]), N =
|
|
169291
|
+
}, [z, h, M]), N = Te(
|
|
169292
169292
|
(V) => {
|
|
169293
169293
|
V.key === "Enter" && (V.ctrlKey || V.metaKey) && !V.shiftKey ? (V.preventDefault(), d && ee()) : V.key === "Enter" && !V.shiftKey && !b ? (V.preventDefault(), u.trim() && X()) : V.key === "Escape" ? (V.preventDefault(), a ? oe() : K()) : V.key === " " && !u.trim() ? (V.preventDefault(), K()) : V.key === "r" && (V.ctrlKey || V.metaKey) ? (V.preventDefault(), B()) : V.key === "e" && (V.ctrlKey || V.metaKey) && (V.preventDefault(), Y());
|
|
169294
169294
|
},
|
|
@@ -169304,7 +169304,7 @@ User prompt: ${u} /no_think` : `${u} /no_think`;
|
|
|
169304
169304
|
a,
|
|
169305
169305
|
oe
|
|
169306
169306
|
]
|
|
169307
|
-
), te =
|
|
169307
|
+
), te = Te((V) => {
|
|
169308
169308
|
V ? localStorage.setItem("include-ddoc-context", "true") : localStorage.removeItem("include-ddoc-context");
|
|
169309
169309
|
}, []);
|
|
169310
169310
|
Re(() => {
|
|
@@ -169338,7 +169338,7 @@ User prompt: ${u} /no_think` : `${u} /no_think`;
|
|
|
169338
169338
|
return () => clearInterval(V);
|
|
169339
169339
|
}
|
|
169340
169340
|
}, [i]);
|
|
169341
|
-
const le =
|
|
169341
|
+
const le = Te(
|
|
169342
169342
|
() => /* @__PURE__ */ F.jsx("span", { className: "text-body-sm color-text-secondary pt-1 flex items-center gap-1", children: /* @__PURE__ */ F.jsx(fh, { mode: "wait", children: /* @__PURE__ */ F.jsxs(
|
|
169343
169343
|
"span",
|
|
169344
169344
|
{
|
|
@@ -169701,8 +169701,8 @@ User prompt: ${u} /no_think` : `${u} /no_think`;
|
|
|
169701
169701
|
maxTokens: v,
|
|
169702
169702
|
isAIAgentEnabled: k,
|
|
169703
169703
|
hasAvailableModels: J,
|
|
169704
|
-
onCommentActivated: (
|
|
169705
|
-
K(
|
|
169704
|
+
onCommentActivated: (Ae) => {
|
|
169705
|
+
K(Ae), Ae && setTimeout(() => re(Ae));
|
|
169706
169706
|
},
|
|
169707
169707
|
onTocUpdate: Y,
|
|
169708
169708
|
externalExtensions: P,
|
|
@@ -169713,12 +169713,12 @@ User prompt: ${u} /no_think` : `${u} /no_think`;
|
|
|
169713
169713
|
Re(() => {
|
|
169714
169714
|
q && K(null);
|
|
169715
169715
|
}, [q, K]);
|
|
169716
|
-
const ie = (
|
|
169717
|
-
const { state: Je } =
|
|
169716
|
+
const ie = (Ae, Ne) => {
|
|
169717
|
+
const { state: Je } = Ae, { selection: st } = Je, { from: wt, to: Se, empty: Pe } = st;
|
|
169718
169718
|
if (Ne.key === "Backspace" || Ne.key === "Delete") {
|
|
169719
169719
|
let nt = !1;
|
|
169720
169720
|
if (!Pe)
|
|
169721
|
-
Je.doc.nodesBetween(wt,
|
|
169721
|
+
Je.doc.nodesBetween(wt, Se, (ct) => {
|
|
169722
169722
|
ct.type.name === "reminderBlock" && (nt = !0);
|
|
169723
169723
|
});
|
|
169724
169724
|
else {
|
|
@@ -169732,16 +169732,16 @@ User prompt: ${u} /no_think` : `${u} /no_think`;
|
|
|
169732
169732
|
{
|
|
169733
169733
|
extensions: V,
|
|
169734
169734
|
editorProps: {
|
|
169735
|
-
clipboardTextSerializer(
|
|
169736
|
-
return
|
|
169735
|
+
clipboardTextSerializer(Ae) {
|
|
169736
|
+
return Ae.content.textBetween(0, Ae.content.size, `
|
|
169737
169737
|
|
|
169738
169738
|
`);
|
|
169739
169739
|
},
|
|
169740
169740
|
...uge,
|
|
169741
169741
|
handleDOMEvents: {
|
|
169742
169742
|
mouseover: ce,
|
|
169743
|
-
keydown: (
|
|
169744
|
-
if (ie(
|
|
169743
|
+
keydown: (Ae, Ne) => {
|
|
169744
|
+
if (ie(Ae, Ne), ["ArrowUp", "ArrowDown", "Enter"].includes(Ne.key)) {
|
|
169745
169745
|
const Je = document.querySelector("#slash-command"), st = document.querySelector("#emoji-list");
|
|
169746
169746
|
if (Je || st)
|
|
169747
169747
|
return !0;
|
|
@@ -169751,18 +169751,18 @@ User prompt: ${u} /no_think` : `${u} /no_think`;
|
|
|
169751
169751
|
he == null || he.commands.unsetCommentActive();
|
|
169752
169752
|
}
|
|
169753
169753
|
},
|
|
169754
|
-
handleClick: (
|
|
169755
|
-
const st = Je.metaKey || Je.ctrlKey,
|
|
169756
|
-
if (
|
|
169754
|
+
handleClick: (Ae, Ne, Je) => {
|
|
169755
|
+
const st = Je.metaKey || Je.ctrlKey, Se = Je.target.closest("a");
|
|
169756
|
+
if (Se && Se.href) {
|
|
169757
169757
|
if (o)
|
|
169758
169758
|
return !1;
|
|
169759
|
-
if (
|
|
169759
|
+
if (Se.textContent.match(E7)) {
|
|
169760
169760
|
if (st)
|
|
169761
|
-
return Je.preventDefault(), window.open(
|
|
169761
|
+
return Je.preventDefault(), window.open(Se.href, "_blank"), !0;
|
|
169762
169762
|
} else
|
|
169763
|
-
return Je.preventDefault(), window.open(
|
|
169763
|
+
return Je.preventDefault(), window.open(Se.href, "_blank"), !0;
|
|
169764
169764
|
}
|
|
169765
|
-
return N ? N(
|
|
169765
|
+
return N ? N(Ae, Ne, Je) : !1;
|
|
169766
169766
|
},
|
|
169767
169767
|
attributes: {
|
|
169768
169768
|
spellCheck: "true"
|
|
@@ -169784,29 +169784,33 @@ User prompt: ${u} /no_think` : `${u} /no_think`;
|
|
|
169784
169784
|
const be = Ve(null);
|
|
169785
169785
|
Re(() => {
|
|
169786
169786
|
if (!he) return;
|
|
169787
|
-
const
|
|
169787
|
+
const Ae = () => {
|
|
169788
169788
|
he && !he.isDestroyed && (be.current && clearTimeout(be.current), be.current = setTimeout(() => {
|
|
169789
169789
|
be.current = null, he.isDestroyed || he.commands.updateTableOfContents();
|
|
169790
169790
|
}, 300));
|
|
169791
169791
|
};
|
|
169792
|
-
return he.on("update",
|
|
169793
|
-
he.off("update",
|
|
169792
|
+
return he.on("update", Ae), () => {
|
|
169793
|
+
he.off("update", Ae), be.current && clearTimeout(be.current);
|
|
169794
169794
|
};
|
|
169795
169795
|
}, [he]);
|
|
169796
169796
|
const de = Ft(() => o ? !1 : De ? !l : !0, [o, De, l]);
|
|
169797
169797
|
Re(() => {
|
|
169798
|
-
|
|
169798
|
+
if (!he) return;
|
|
169799
|
+
const Ae = document.getElementById("editor-canvas"), Ne = (Ae == null ? void 0 : Ae.scrollTop) ?? 0;
|
|
169800
|
+
he.setEditable(de), Ae && Ne > 0 && requestAnimationFrame(() => {
|
|
169801
|
+
Ae.scrollTop = Ne;
|
|
169802
|
+
});
|
|
169799
169803
|
}, [he, de]), Re(() => {
|
|
169800
169804
|
De && A(!a);
|
|
169801
169805
|
}, [De, a]);
|
|
169802
|
-
const ue = Ve(!1), ge = Ve(null), R =
|
|
169803
|
-
(
|
|
169804
|
-
const Ne =
|
|
169806
|
+
const ue = Ve(!1), ge = Ve(null), R = Te(
|
|
169807
|
+
(Ae) => {
|
|
169808
|
+
const Ne = Ae.map((Je) => io(Je));
|
|
169805
169809
|
na(e, ku(Ne), "self");
|
|
169806
169810
|
},
|
|
169807
169811
|
[e]
|
|
169808
|
-
), W =
|
|
169809
|
-
(
|
|
169812
|
+
), W = Te(
|
|
169813
|
+
(Ae) => Array.isArray(Ae) || typeof Ae == "string" && !hX(Ae),
|
|
169810
169814
|
[]
|
|
169811
169815
|
);
|
|
169812
169816
|
Re(() => {
|
|
@@ -169877,36 +169881,36 @@ User prompt: ${u} /no_think` : `${u} /no_think`;
|
|
|
169877
169881
|
}), Re(() => {
|
|
169878
169882
|
if (!j) return;
|
|
169879
169883
|
b6.setZoom(j);
|
|
169880
|
-
const
|
|
169884
|
+
const Ae = window.setTimeout(() => {
|
|
169881
169885
|
b6.setZoom(j);
|
|
169882
169886
|
}, 100);
|
|
169883
|
-
return () => clearTimeout(
|
|
169887
|
+
return () => clearTimeout(Ae);
|
|
169884
169888
|
}, [j, $, i, he == null ? void 0 : he.isEmpty]), Re(() => {
|
|
169885
169889
|
if (!he) return;
|
|
169886
|
-
const
|
|
169890
|
+
const Ae = ({ editor: Ne }) => {
|
|
169887
169891
|
const Je = Ne.state.selection.from;
|
|
169888
169892
|
setTimeout(() => {
|
|
169889
169893
|
const st = Ne.state.selection.from, wt = [];
|
|
169890
169894
|
Ne.state.doc.nodesBetween(
|
|
169891
169895
|
Je,
|
|
169892
169896
|
st,
|
|
169893
|
-
(
|
|
169894
|
-
|
|
169897
|
+
(Se, Pe) => {
|
|
169898
|
+
Se.marks && Se.marks.forEach((nt) => {
|
|
169895
169899
|
nt.type.name === "textStyle" && nt.attrs.color && wt.push({
|
|
169896
169900
|
from: Pe,
|
|
169897
|
-
to: Pe +
|
|
169901
|
+
to: Pe + Se.nodeSize,
|
|
169898
169902
|
mark: nt
|
|
169899
169903
|
});
|
|
169900
169904
|
});
|
|
169901
169905
|
}
|
|
169902
|
-
), Ne.chain().setTextSelection({ from: Je, to: st }).setColor("").run(), wt.forEach(({ from:
|
|
169906
|
+
), Ne.chain().setTextSelection({ from: Je, to: st }).setColor("").run(), wt.forEach(({ from: Se, to: Pe, mark: nt }) => {
|
|
169903
169907
|
const ct = nt.attrs.color;
|
|
169904
|
-
lz(ct) || Ne.chain().setTextSelection({ from:
|
|
169908
|
+
lz(ct) || Ne.chain().setTextSelection({ from: Se, to: Pe }).setColor(ct).run();
|
|
169905
169909
|
}), Ne.commands.setTextSelection(st);
|
|
169906
169910
|
}, 0);
|
|
169907
169911
|
};
|
|
169908
|
-
return he.on("paste",
|
|
169909
|
-
he.off("paste",
|
|
169912
|
+
return he.on("paste", Ae), () => {
|
|
169913
|
+
he.off("paste", Ae);
|
|
169910
169914
|
};
|
|
169911
169915
|
}, [he]);
|
|
169912
169916
|
const ye = Ve(
|
|
@@ -169914,20 +169918,20 @@ User prompt: ${u} /no_think` : `${u} /no_think`;
|
|
|
169914
169918
|
);
|
|
169915
169919
|
Re(() => {
|
|
169916
169920
|
if (!he) return;
|
|
169917
|
-
const
|
|
169921
|
+
const Ae = () => {
|
|
169918
169922
|
ye.current && clearTimeout(ye.current), ye.current = setTimeout(() => {
|
|
169919
169923
|
ye.current = null, he && !he.isDestroyed && (w == null || w(he.storage.characterCount.characters() ?? 0), D == null || D(he.storage.characterCount.words() ?? 0));
|
|
169920
169924
|
}, 500);
|
|
169921
169925
|
};
|
|
169922
|
-
return
|
|
169923
|
-
he.off("update",
|
|
169926
|
+
return Ae(), he.on("update", Ae), () => {
|
|
169927
|
+
he.off("update", Ae), ye.current && clearTimeout(ye.current);
|
|
169924
169928
|
};
|
|
169925
169929
|
}, [he]), Re(() => {
|
|
169926
|
-
const
|
|
169930
|
+
const Ae = (Ne) => {
|
|
169927
169931
|
(Ne.ctrlKey || Ne.metaKey) && Ne.key === "p" && (Ne.preventDefault(), he && (_ ? QL(le) : tx(he.getHTML())));
|
|
169928
169932
|
};
|
|
169929
|
-
return window.addEventListener("keydown",
|
|
169930
|
-
window.removeEventListener("keydown",
|
|
169933
|
+
return window.addEventListener("keydown", Ae), () => {
|
|
169934
|
+
window.removeEventListener("keydown", Ae);
|
|
169931
169935
|
};
|
|
169932
169936
|
}, [he, _, le]), Re(() => (X && oe && S(oe), () => {
|
|
169933
169937
|
ne.current();
|
|
@@ -169937,23 +169941,23 @@ User prompt: ${u} /no_think` : `${u} /no_think`;
|
|
|
169937
169941
|
oe == null ? void 0 : oe.roomId,
|
|
169938
169942
|
oe == null ? void 0 : oe.wsUrl
|
|
169939
169943
|
]);
|
|
169940
|
-
const ve = window.location.hash.startsWith("#") ? window.location.hash.substring(1) : window.location.hash, { isNativeMobile: Ee } = _l(), Ce = new URLSearchParams(ve), me = Ce.get("heading"), je = me == null ? void 0 : me.split("-").pop(), Me =
|
|
169941
|
-
(
|
|
169944
|
+
const ve = window.location.hash.startsWith("#") ? window.location.hash.substring(1) : window.location.hash, { isNativeMobile: Ee } = _l(), Ce = new URLSearchParams(ve), me = Ce.get("heading"), je = me == null ? void 0 : me.split("-").pop(), Me = Te(
|
|
169945
|
+
(Ae) => {
|
|
169942
169946
|
if (he)
|
|
169943
169947
|
try {
|
|
169944
169948
|
const Ne = he.view.dom.querySelectorAll("[data-toc-id]"), Je = Array.from(Ne).find(
|
|
169945
169949
|
(ht) => {
|
|
169946
169950
|
var _t;
|
|
169947
|
-
return (_t = ht.dataset.tocId) == null ? void 0 : _t.includes(
|
|
169951
|
+
return (_t = ht.dataset.tocId) == null ? void 0 : _t.includes(Ae);
|
|
169948
169952
|
}
|
|
169949
169953
|
);
|
|
169950
169954
|
if (!Je) return;
|
|
169951
169955
|
const st = B8(
|
|
169952
169956
|
Je == null ? void 0 : Je.textContent
|
|
169953
169957
|
), wt = me == null ? void 0 : me.split("-").slice(0, -1).join("-");
|
|
169954
|
-
st !== wt && (Ce.set("heading", `${st}-${
|
|
169955
|
-
const
|
|
169956
|
-
Pe.setSelection(new ut(Pe.doc.resolve(
|
|
169958
|
+
st !== wt && (Ce.set("heading", `${st}-${Ae}`), window.location.hash = Ce.toString());
|
|
169959
|
+
const Se = he.view.posAtDOM(Je, 0), Pe = he.view.state.tr;
|
|
169960
|
+
Pe.setSelection(new ut(Pe.doc.resolve(Se))), he.view.dispatch(Pe);
|
|
169957
169961
|
const Ke = [
|
|
169958
169962
|
document.getElementById("editor-canvas"),
|
|
169959
169963
|
document.querySelector(".ProseMirror"),
|
|
@@ -169990,10 +169994,10 @@ User prompt: ${u} /no_think` : `${u} /no_think`;
|
|
|
169990
169994
|
]), Re(() => {
|
|
169991
169995
|
if (!he || $ || !i)
|
|
169992
169996
|
return;
|
|
169993
|
-
const
|
|
169997
|
+
const Ae = setTimeout(() => {
|
|
169994
169998
|
const { tr: Ne, doc: Je } = he.state;
|
|
169995
169999
|
let st = !1;
|
|
169996
|
-
Je.descendants((wt,
|
|
170000
|
+
Je.descendants((wt, Se) => {
|
|
169997
170001
|
if (!wt.marks || wt.marks.length === 0) return;
|
|
169998
170002
|
const Pe = wt.marks.find(
|
|
169999
170003
|
(Ke) => Ke.type.name === "textStyle" && Ke.attrs.color
|
|
@@ -170010,11 +170014,11 @@ User prompt: ${u} /no_think` : `${u} /no_think`;
|
|
|
170010
170014
|
color: ct,
|
|
170011
170015
|
"data-original-color": nt
|
|
170012
170016
|
});
|
|
170013
|
-
Ne.removeMark(
|
|
170017
|
+
Ne.removeMark(Se, Se + wt.nodeSize, Pe), Ne.addMark(Se, Se + wt.nodeSize, Ke);
|
|
170014
170018
|
}
|
|
170015
170019
|
}), st && (Ne.setMeta("addToHistory", !1), he.view.dispatch(Ne));
|
|
170016
170020
|
}, 0);
|
|
170017
|
-
return () => clearTimeout(
|
|
170021
|
+
return () => clearTimeout(Ae);
|
|
170018
170022
|
}, [he, i, $, z]), Re(() => () => {
|
|
170019
170023
|
he && he.destroy();
|
|
170020
170024
|
}, [he]), LRe(he, i, !1), {
|
|
@@ -170030,7 +170034,7 @@ User prompt: ${u} /no_think` : `${u} /no_think`;
|
|
|
170030
170034
|
isContentLoading: $
|
|
170031
170035
|
};
|
|
170032
170036
|
}, NRe = () => {
|
|
170033
|
-
const [e, t] = Be(null), n = Ve(null), r =
|
|
170037
|
+
const [e, t] = Be(null), n = Ve(null), r = Te((o) => {
|
|
170034
170038
|
if (!n.current) return;
|
|
170035
170039
|
const i = n.current.querySelector(`input#${o}`);
|
|
170036
170040
|
i && i.scrollIntoView({
|
|
@@ -170053,7 +170057,7 @@ User prompt: ${u} /no_think` : `${u} /no_think`;
|
|
|
170053
170057
|
const a = o.current[e];
|
|
170054
170058
|
a && n(a);
|
|
170055
170059
|
}, [e]);
|
|
170056
|
-
const s =
|
|
170060
|
+
const s = Te(
|
|
170057
170061
|
(a, l) => {
|
|
170058
170062
|
const u = e, c = () => {
|
|
170059
170063
|
o.current = {
|
|
@@ -170110,7 +170114,7 @@ User prompt: ${u} /no_think` : `${u} /no_think`;
|
|
|
170110
170114
|
disableInlineComment: l
|
|
170111
170115
|
};
|
|
170112
170116
|
}, [u, a, l]);
|
|
170113
|
-
const x =
|
|
170117
|
+
const x = Te(
|
|
170114
170118
|
() => JOe(
|
|
170115
170119
|
(C) => t == null ? void 0 : t(C),
|
|
170116
170120
|
n,
|
|
@@ -170125,7 +170129,7 @@ User prompt: ${u} /no_think` : `${u} /no_think`;
|
|
|
170125
170129
|
onCommentActivated: f
|
|
170126
170130
|
}),
|
|
170127
170131
|
[f]
|
|
170128
|
-
), k =
|
|
170132
|
+
), k = Te(() => [
|
|
170129
170133
|
...lX({
|
|
170130
170134
|
onError: (A) => t == null ? void 0 : t(A),
|
|
170131
170135
|
ipfsImageUploadFn: n,
|
|
@@ -170187,7 +170191,7 @@ User prompt: ${u} /no_think` : `${u} /no_think`;
|
|
|
170187
170191
|
}, RRe = ({
|
|
170188
170192
|
onCommentInteraction: e
|
|
170189
170193
|
}) => {
|
|
170190
|
-
const t =
|
|
170194
|
+
const t = Te(
|
|
170191
170195
|
(o, i, s) => {
|
|
170192
170196
|
let a = !1;
|
|
170193
170197
|
return o.doc.nodesBetween(i, s, (l) => {
|
|
@@ -170197,7 +170201,7 @@ User prompt: ${u} /no_think` : `${u} /no_think`;
|
|
|
170197
170201
|
}), a;
|
|
170198
170202
|
},
|
|
170199
170203
|
[]
|
|
170200
|
-
), n =
|
|
170204
|
+
), n = Te(
|
|
170201
170205
|
(o, i) => {
|
|
170202
170206
|
const s = i.target;
|
|
170203
170207
|
if (!s || s.nodeName !== "MARK" || s.dataset.color !== "yellow")
|
|
@@ -170220,7 +170224,7 @@ User prompt: ${u} /no_think` : `${u} /no_think`;
|
|
|
170220
170224
|
e == null || e(p);
|
|
170221
170225
|
},
|
|
170222
170226
|
[t, e]
|
|
170223
|
-
), r =
|
|
170227
|
+
), r = Te(
|
|
170224
170228
|
(o, i, s) => n(o, s),
|
|
170225
170229
|
[n]
|
|
170226
170230
|
);
|
|
@@ -170301,7 +170305,7 @@ User prompt: ${u} /no_think` : `${u} /no_think`;
|
|
|
170301
170305
|
return () => window.clearTimeout(i);
|
|
170302
170306
|
}, [e, t, n]);
|
|
170303
170307
|
}, URe = (e) => {
|
|
170304
|
-
const t = Ve([]), n = Ve([]), r = Ve(!1), o =
|
|
170308
|
+
const t = Ve([]), n = Ve([]), r = Ve(!1), o = Te(
|
|
170305
170309
|
(l, u) => {
|
|
170306
170310
|
const { tabs: c } = Zl(e), d = c.get(l.tabId);
|
|
170307
170311
|
if (!(d instanceof qr))
|
|
@@ -170318,15 +170322,15 @@ User prompt: ${u} /no_think` : `${u} /no_think`;
|
|
|
170318
170322
|
return !0;
|
|
170319
170323
|
},
|
|
170320
170324
|
[e]
|
|
170321
|
-
), i =
|
|
170325
|
+
), i = Te(() => {
|
|
170322
170326
|
const l = t.current.length > 0 ? t.current[t.current.length - 1] : void 0;
|
|
170323
170327
|
return !l || !o(l, "undo") ? !1 : (t.current.pop(), n.current.push(l), !0);
|
|
170324
|
-
}, [o]), s =
|
|
170328
|
+
}, [o]), s = Te(() => {
|
|
170325
170329
|
const l = n.current, u = l.length ? l[l.length - 1] : void 0;
|
|
170326
170330
|
return !u || !o(u, "redo") ? !1 : (l.pop(), t.current.push(u), !0);
|
|
170327
170331
|
}, [o]);
|
|
170328
170332
|
return {
|
|
170329
|
-
applyRename:
|
|
170333
|
+
applyRename: Te(
|
|
170330
170334
|
({ tabId: l, newName: u, emoji: c }) => {
|
|
170331
170335
|
const { tabs: d } = Zl(e), p = d.get(l);
|
|
170332
170336
|
if (!(p instanceof qr))
|
|
@@ -170388,7 +170392,7 @@ User prompt: ${u} /no_think` : `${u} /no_think`;
|
|
|
170388
170392
|
const T = p || null;
|
|
170389
170393
|
a == null || a(T);
|
|
170390
170394
|
}, [p, a]);
|
|
170391
|
-
const D =
|
|
170395
|
+
const D = Te(
|
|
170392
170396
|
(T) => {
|
|
170393
170397
|
if (!e || T === p) return;
|
|
170394
170398
|
if (!i || !c) {
|
|
@@ -170442,7 +170446,7 @@ User prompt: ${u} /no_think` : `${u} /no_think`;
|
|
|
170442
170446
|
T.unobserveDeep(S);
|
|
170443
170447
|
};
|
|
170444
170448
|
}, [e, s, i, c]);
|
|
170445
|
-
const C =
|
|
170449
|
+
const C = Te(() => {
|
|
170446
170450
|
const T = e.getMap("ddocTabs"), S = T.get("order"), L = T.get("tabs"), P = T.get("activeTabId");
|
|
170447
170451
|
if (!(S instanceof il))
|
|
170448
170452
|
throw new Error("Invalid ddocTabs.order");
|
|
@@ -170457,7 +170461,7 @@ User prompt: ${u} /no_think` : `${u} /no_think`;
|
|
|
170457
170461
|
const z = new qr();
|
|
170458
170462
|
z.set("name", q.name), z.set("emoji", q.emoji), L.set(q.id, z), e.getXmlFragment(q.id), i && P instanceof Ko && (P.delete(0, P.length), P.insert(0, $)), S.push([q.id]);
|
|
170459
170463
|
}), h($), l == null || l(), $;
|
|
170460
|
-
}, [i, e, l]), A =
|
|
170464
|
+
}, [i, e, l]), A = Te(
|
|
170461
170465
|
(T) => {
|
|
170462
170466
|
const { order: S, tabs: L, activeTab: P } = Zl(e);
|
|
170463
170467
|
if (S.length <= 1)
|
|
@@ -170479,7 +170483,7 @@ User prompt: ${u} /no_think` : `${u} /no_think`;
|
|
|
170479
170483
|
}), U && X && h(X), l == null || l();
|
|
170480
170484
|
},
|
|
170481
170485
|
[e, i, l]
|
|
170482
|
-
), M =
|
|
170486
|
+
), M = Te(() => {
|
|
170483
170487
|
const T = b.current;
|
|
170484
170488
|
if (!T) return !1;
|
|
170485
170489
|
if (Date.now() - T.timestamp > HM)
|
|
@@ -170491,7 +170495,7 @@ User prompt: ${u} /no_think` : `${u} /no_think`;
|
|
|
170491
170495
|
const q = Math.min(T.orderIndex, S.length);
|
|
170492
170496
|
S.insert(q, [T.tabId]), i && P instanceof Ko && (P.delete(0, P.length), P.insert(0, T.tabId));
|
|
170493
170497
|
}), h(T.tabId), b.current = null, l == null || l(), !0);
|
|
170494
|
-
}, [e, i, l]), j =
|
|
170498
|
+
}, [e, i, l]), j = Te(() => {
|
|
170495
170499
|
const T = u == null ? void 0 : u();
|
|
170496
170500
|
if (!T || T.isDestroyed)
|
|
170497
170501
|
return !0;
|
|
@@ -170517,7 +170521,7 @@ User prompt: ${u} /no_think` : `${u} /no_think`;
|
|
|
170517
170521
|
M,
|
|
170518
170522
|
k
|
|
170519
170523
|
]);
|
|
170520
|
-
const _ =
|
|
170524
|
+
const _ = Te(
|
|
170521
170525
|
(T, { newName: S, emoji: L }) => {
|
|
170522
170526
|
v({ tabId: T, newName: S, emoji: L }).tabNotFound && UD({
|
|
170523
170527
|
title: "Rename tab error",
|
|
@@ -170525,7 +170529,7 @@ User prompt: ${u} /no_think` : `${u} /no_think`;
|
|
|
170525
170529
|
}), l == null || l();
|
|
170526
170530
|
},
|
|
170527
170531
|
[v, l]
|
|
170528
|
-
), O =
|
|
170532
|
+
), O = Te(
|
|
170529
170533
|
(T) => {
|
|
170530
170534
|
const { tabs: S, order: L, activeTab: P } = Zl(e), $ = S.get(T);
|
|
170531
170535
|
if (!$ || !($ instanceof qr)) {
|
|
@@ -170543,7 +170547,7 @@ User prompt: ${u} /no_think` : `${u} /no_think`;
|
|
|
170543
170547
|
}), h(q), l == null || l(), q;
|
|
170544
170548
|
},
|
|
170545
170549
|
[e, i, l]
|
|
170546
|
-
), E =
|
|
170550
|
+
), E = Te(
|
|
170547
170551
|
(T, S) => {
|
|
170548
170552
|
const { order: L } = Zl(e), P = L.toArray(), $ = P.indexOf(S), q = P.indexOf(T);
|
|
170549
170553
|
$ === -1 || q === -1 || (e.transact(() => {
|
|
@@ -174179,8 +174183,8 @@ var eZ = {};
|
|
|
174179
174183
|
re[B] = J[B] - ae[B];
|
|
174180
174184
|
}
|
|
174181
174185
|
function D(re, J, ae) {
|
|
174182
|
-
let B, Y, Q = 0, ce = 0, N = 0, te = 0, le = 0, G = 0, V = 0, ie = 0, he = 0, De = 0, be = 0, de = 0, ue = 0, ge = 0, R = 0, W = 0, ne = 0, pe = 0, ye = 0, ve = 0, Ee = 0, Ce = 0, me = 0, je = 0, Me = 0,
|
|
174183
|
-
B = J[0], Q += B * Pe, ce += B * nt, N += B * ct, te += B * Ke, le += B * ht, G += B * _t, V += B * Gt, ie += B * En, he += B * Xt, De += B * bn, be += B * Ln, de += B * cn, ue += B * wn, ge += B * $n, R += B * Fe, W += B * Ie, B = J[1], ce += B * Pe, N += B * nt, te += B * ct, le += B * Ke, G += B * ht, V += B * _t, ie += B * Gt, he += B * En, De += B * Xt, be += B * bn, de += B * Ln, ue += B * cn, ge += B * wn, R += B * $n, W += B * Fe, ne += B * Ie, B = J[2], N += B * Pe, te += B * nt, le += B * ct, G += B * Ke, V += B * ht, ie += B * _t, he += B * Gt, De += B * En, be += B * Xt, de += B * bn, ue += B * Ln, ge += B * cn, R += B * wn, W += B * $n, ne += B * Fe, pe += B * Ie, B = J[3], te += B * Pe, le += B * nt, G += B * ct, V += B * Ke, ie += B * ht, he += B * _t, De += B * Gt, be += B * En, de += B * Xt, ue += B * bn, ge += B * Ln, R += B * cn, W += B * wn, ne += B * $n, pe += B * Fe, ye += B * Ie, B = J[4], le += B * Pe, G += B * nt, V += B * ct, ie += B * Ke, he += B * ht, De += B * _t, be += B * Gt, de += B * En, ue += B * Xt, ge += B * bn, R += B * Ln, W += B * cn, ne += B * wn, pe += B * $n, ye += B * Fe, ve += B * Ie, B = J[5], G += B * Pe, V += B * nt, ie += B * ct, he += B * Ke, De += B * ht, be += B * _t, de += B * Gt, ue += B * En, ge += B * Xt, R += B * bn, W += B * Ln, ne += B * cn, pe += B * wn, ye += B * $n, ve += B * Fe, Ee += B * Ie, B = J[6], V += B * Pe, ie += B * nt, he += B * ct, De += B * Ke, be += B * ht, de += B * _t, ue += B * Gt, ge += B * En, R += B * Xt, W += B * bn, ne += B * Ln, pe += B * cn, ye += B * wn, ve += B * $n, Ee += B * Fe, Ce += B * Ie, B = J[7], ie += B * Pe, he += B * nt, De += B * ct, be += B * Ke, de += B * ht, ue += B * _t, ge += B * Gt, R += B * En, W += B * Xt, ne += B * bn, pe += B * Ln, ye += B * cn, ve += B * wn, Ee += B * $n, Ce += B * Fe, me += B * Ie, B = J[8], he += B * Pe, De += B * nt, be += B * ct, de += B * Ke, ue += B * ht, ge += B * _t, R += B * Gt, W += B * En, ne += B * Xt, pe += B * bn, ye += B * Ln, ve += B * cn, Ee += B * wn, Ce += B * $n, me += B * Fe, je += B * Ie, B = J[9], De += B * Pe, be += B * nt, de += B * ct, ue += B * Ke, ge += B * ht, R += B * _t, W += B * Gt, ne += B * En, pe += B * Xt, ye += B * bn, ve += B * Ln, Ee += B * cn, Ce += B * wn, me += B * $n, je += B * Fe, Me += B * Ie, B = J[10], be += B * Pe, de += B * nt, ue += B * ct, ge += B * Ke, R += B * ht, W += B * _t, ne += B * Gt, pe += B * En, ye += B * Xt, ve += B * bn, Ee += B * Ln, Ce += B * cn, me += B * wn, je += B * $n, Me += B * Fe,
|
|
174186
|
+
let B, Y, Q = 0, ce = 0, N = 0, te = 0, le = 0, G = 0, V = 0, ie = 0, he = 0, De = 0, be = 0, de = 0, ue = 0, ge = 0, R = 0, W = 0, ne = 0, pe = 0, ye = 0, ve = 0, Ee = 0, Ce = 0, me = 0, je = 0, Me = 0, Ae = 0, Ne = 0, Je = 0, st = 0, wt = 0, Se = 0, Pe = ae[0], nt = ae[1], ct = ae[2], Ke = ae[3], ht = ae[4], _t = ae[5], Gt = ae[6], En = ae[7], Xt = ae[8], bn = ae[9], Ln = ae[10], cn = ae[11], wn = ae[12], $n = ae[13], Fe = ae[14], Ie = ae[15];
|
|
174187
|
+
B = J[0], Q += B * Pe, ce += B * nt, N += B * ct, te += B * Ke, le += B * ht, G += B * _t, V += B * Gt, ie += B * En, he += B * Xt, De += B * bn, be += B * Ln, de += B * cn, ue += B * wn, ge += B * $n, R += B * Fe, W += B * Ie, B = J[1], ce += B * Pe, N += B * nt, te += B * ct, le += B * Ke, G += B * ht, V += B * _t, ie += B * Gt, he += B * En, De += B * Xt, be += B * bn, de += B * Ln, ue += B * cn, ge += B * wn, R += B * $n, W += B * Fe, ne += B * Ie, B = J[2], N += B * Pe, te += B * nt, le += B * ct, G += B * Ke, V += B * ht, ie += B * _t, he += B * Gt, De += B * En, be += B * Xt, de += B * bn, ue += B * Ln, ge += B * cn, R += B * wn, W += B * $n, ne += B * Fe, pe += B * Ie, B = J[3], te += B * Pe, le += B * nt, G += B * ct, V += B * Ke, ie += B * ht, he += B * _t, De += B * Gt, be += B * En, de += B * Xt, ue += B * bn, ge += B * Ln, R += B * cn, W += B * wn, ne += B * $n, pe += B * Fe, ye += B * Ie, B = J[4], le += B * Pe, G += B * nt, V += B * ct, ie += B * Ke, he += B * ht, De += B * _t, be += B * Gt, de += B * En, ue += B * Xt, ge += B * bn, R += B * Ln, W += B * cn, ne += B * wn, pe += B * $n, ye += B * Fe, ve += B * Ie, B = J[5], G += B * Pe, V += B * nt, ie += B * ct, he += B * Ke, De += B * ht, be += B * _t, de += B * Gt, ue += B * En, ge += B * Xt, R += B * bn, W += B * Ln, ne += B * cn, pe += B * wn, ye += B * $n, ve += B * Fe, Ee += B * Ie, B = J[6], V += B * Pe, ie += B * nt, he += B * ct, De += B * Ke, be += B * ht, de += B * _t, ue += B * Gt, ge += B * En, R += B * Xt, W += B * bn, ne += B * Ln, pe += B * cn, ye += B * wn, ve += B * $n, Ee += B * Fe, Ce += B * Ie, B = J[7], ie += B * Pe, he += B * nt, De += B * ct, be += B * Ke, de += B * ht, ue += B * _t, ge += B * Gt, R += B * En, W += B * Xt, ne += B * bn, pe += B * Ln, ye += B * cn, ve += B * wn, Ee += B * $n, Ce += B * Fe, me += B * Ie, B = J[8], he += B * Pe, De += B * nt, be += B * ct, de += B * Ke, ue += B * ht, ge += B * _t, R += B * Gt, W += B * En, ne += B * Xt, pe += B * bn, ye += B * Ln, ve += B * cn, Ee += B * wn, Ce += B * $n, me += B * Fe, je += B * Ie, B = J[9], De += B * Pe, be += B * nt, de += B * ct, ue += B * Ke, ge += B * ht, R += B * _t, W += B * Gt, ne += B * En, pe += B * Xt, ye += B * bn, ve += B * Ln, Ee += B * cn, Ce += B * wn, me += B * $n, je += B * Fe, Me += B * Ie, B = J[10], be += B * Pe, de += B * nt, ue += B * ct, ge += B * Ke, R += B * ht, W += B * _t, ne += B * Gt, pe += B * En, ye += B * Xt, ve += B * bn, Ee += B * Ln, Ce += B * cn, me += B * wn, je += B * $n, Me += B * Fe, Ae += B * Ie, B = J[11], de += B * Pe, ue += B * nt, ge += B * ct, R += B * Ke, W += B * ht, ne += B * _t, pe += B * Gt, ye += B * En, ve += B * Xt, Ee += B * bn, Ce += B * Ln, me += B * cn, je += B * wn, Me += B * $n, Ae += B * Fe, Ne += B * Ie, B = J[12], ue += B * Pe, ge += B * nt, R += B * ct, W += B * Ke, ne += B * ht, pe += B * _t, ye += B * Gt, ve += B * En, Ee += B * Xt, Ce += B * bn, me += B * Ln, je += B * cn, Me += B * wn, Ae += B * $n, Ne += B * Fe, Je += B * Ie, B = J[13], ge += B * Pe, R += B * nt, W += B * ct, ne += B * Ke, pe += B * ht, ye += B * _t, ve += B * Gt, Ee += B * En, Ce += B * Xt, me += B * bn, je += B * Ln, Me += B * cn, Ae += B * wn, Ne += B * $n, Je += B * Fe, st += B * Ie, B = J[14], R += B * Pe, W += B * nt, ne += B * ct, pe += B * Ke, ye += B * ht, ve += B * _t, Ee += B * Gt, Ce += B * En, me += B * Xt, je += B * bn, Me += B * Ln, Ae += B * cn, Ne += B * wn, Je += B * $n, st += B * Fe, wt += B * Ie, B = J[15], W += B * Pe, ne += B * nt, pe += B * ct, ye += B * Ke, ve += B * ht, Ee += B * _t, Ce += B * Gt, me += B * En, je += B * Xt, Me += B * bn, Ae += B * Ln, Ne += B * cn, Je += B * wn, st += B * $n, wt += B * Fe, Se += B * Ie, Q += 38 * ne, ce += 38 * pe, N += 38 * ye, te += 38 * ve, le += 38 * Ee, G += 38 * Ce, V += 38 * me, ie += 38 * je, he += 38 * Me, De += 38 * Ae, be += 38 * Ne, de += 38 * Je, ue += 38 * st, ge += 38 * wt, R += 38 * Se, Y = 1, B = Q + Y + 65535, Y = Math.floor(B / 65536), Q = B - Y * 65536, B = ce + Y + 65535, Y = Math.floor(B / 65536), ce = B - Y * 65536, B = N + Y + 65535, Y = Math.floor(B / 65536), N = B - Y * 65536, B = te + Y + 65535, Y = Math.floor(B / 65536), te = B - Y * 65536, B = le + Y + 65535, Y = Math.floor(B / 65536), le = B - Y * 65536, B = G + Y + 65535, Y = Math.floor(B / 65536), G = B - Y * 65536, B = V + Y + 65535, Y = Math.floor(B / 65536), V = B - Y * 65536, B = ie + Y + 65535, Y = Math.floor(B / 65536), ie = B - Y * 65536, B = he + Y + 65535, Y = Math.floor(B / 65536), he = B - Y * 65536, B = De + Y + 65535, Y = Math.floor(B / 65536), De = B - Y * 65536, B = be + Y + 65535, Y = Math.floor(B / 65536), be = B - Y * 65536, B = de + Y + 65535, Y = Math.floor(B / 65536), de = B - Y * 65536, B = ue + Y + 65535, Y = Math.floor(B / 65536), ue = B - Y * 65536, B = ge + Y + 65535, Y = Math.floor(B / 65536), ge = B - Y * 65536, B = R + Y + 65535, Y = Math.floor(B / 65536), R = B - Y * 65536, B = W + Y + 65535, Y = Math.floor(B / 65536), W = B - Y * 65536, Q += Y - 1 + 37 * (Y - 1), Y = 1, B = Q + Y + 65535, Y = Math.floor(B / 65536), Q = B - Y * 65536, B = ce + Y + 65535, Y = Math.floor(B / 65536), ce = B - Y * 65536, B = N + Y + 65535, Y = Math.floor(B / 65536), N = B - Y * 65536, B = te + Y + 65535, Y = Math.floor(B / 65536), te = B - Y * 65536, B = le + Y + 65535, Y = Math.floor(B / 65536), le = B - Y * 65536, B = G + Y + 65535, Y = Math.floor(B / 65536), G = B - Y * 65536, B = V + Y + 65535, Y = Math.floor(B / 65536), V = B - Y * 65536, B = ie + Y + 65535, Y = Math.floor(B / 65536), ie = B - Y * 65536, B = he + Y + 65535, Y = Math.floor(B / 65536), he = B - Y * 65536, B = De + Y + 65535, Y = Math.floor(B / 65536), De = B - Y * 65536, B = be + Y + 65535, Y = Math.floor(B / 65536), be = B - Y * 65536, B = de + Y + 65535, Y = Math.floor(B / 65536), de = B - Y * 65536, B = ue + Y + 65535, Y = Math.floor(B / 65536), ue = B - Y * 65536, B = ge + Y + 65535, Y = Math.floor(B / 65536), ge = B - Y * 65536, B = R + Y + 65535, Y = Math.floor(B / 65536), R = B - Y * 65536, B = W + Y + 65535, Y = Math.floor(B / 65536), W = B - Y * 65536, Q += Y - 1 + 37 * (Y - 1), re[0] = Q, re[1] = ce, re[2] = N, re[3] = te, re[4] = le, re[5] = G, re[6] = V, re[7] = ie, re[8] = he, re[9] = De, re[10] = be, re[11] = de, re[12] = ue, re[13] = ge, re[14] = R, re[15] = W;
|
|
174184
174188
|
}
|
|
174185
174189
|
function C(re, J) {
|
|
174186
174190
|
D(re, J, J);
|
|
@@ -174638,11 +174642,11 @@ var aZ = { exports: {} };
|
|
|
174638
174642
|
return new p(this.value >= 0 ? this.value : -this.value);
|
|
174639
174643
|
};
|
|
174640
174644
|
function A(R, W) {
|
|
174641
|
-
var ne = R.length, pe = W.length, ye = ne + pe, ve = b(ye), Ee = r, Ce, me, je, Me,
|
|
174645
|
+
var ne = R.length, pe = W.length, ye = ne + pe, ve = b(ye), Ee = r, Ce, me, je, Me, Ae;
|
|
174642
174646
|
for (je = 0; je < ne; ++je) {
|
|
174643
174647
|
Me = R[je];
|
|
174644
174648
|
for (var Ne = 0; Ne < pe; ++Ne)
|
|
174645
|
-
|
|
174649
|
+
Ae = W[Ne], Ce = Me * Ae + ve[je + Ne], me = Math.floor(Ce / Ee), ve[je + Ne] = Ce - me * Ee, ve[je + Ne + 1] += me;
|
|
174646
174650
|
}
|
|
174647
174651
|
return m(ve), ve;
|
|
174648
174652
|
}
|
|
@@ -174711,31 +174715,31 @@ var aZ = { exports: {} };
|
|
|
174711
174715
|
return new p(this.value * this.value);
|
|
174712
174716
|
};
|
|
174713
174717
|
function S(R, W) {
|
|
174714
|
-
var ne = R.length, pe = W.length, ye = r, ve = b(W.length), Ee = W[pe - 1], Ce = Math.ceil(ye / (2 * Ee)), me = M(R, Ce), je = M(W, Ce), Me,
|
|
174715
|
-
for (me.length <= ne && me.push(0), je.push(0), Ee = je[pe - 1],
|
|
174716
|
-
for (Me = ye - 1, me[
|
|
174717
|
-
Ne += Me * je[st],
|
|
174718
|
+
var ne = R.length, pe = W.length, ye = r, ve = b(W.length), Ee = W[pe - 1], Ce = Math.ceil(ye / (2 * Ee)), me = M(R, Ce), je = M(W, Ce), Me, Ae, Ne, Je, st, wt, Se;
|
|
174719
|
+
for (me.length <= ne && me.push(0), je.push(0), Ee = je[pe - 1], Ae = ne - pe; Ae >= 0; Ae--) {
|
|
174720
|
+
for (Me = ye - 1, me[Ae + pe] !== Ee && (Me = Math.floor((me[Ae + pe] * ye + me[Ae + pe - 1]) / Ee)), Ne = 0, Je = 0, wt = je.length, st = 0; st < wt; st++)
|
|
174721
|
+
Ne += Me * je[st], Se = Math.floor(Ne / ye), Je += me[Ae + st] - (Ne - Se * ye), Ne = Se, Je < 0 ? (me[Ae + st] = Je + ye, Je = -1) : (me[Ae + st] = Je, Je = 0);
|
|
174718
174722
|
for (; Je !== 0; ) {
|
|
174719
174723
|
for (Me -= 1, Ne = 0, st = 0; st < wt; st++)
|
|
174720
|
-
Ne += me[
|
|
174724
|
+
Ne += me[Ae + st] - ye + je[st], Ne < 0 ? (me[Ae + st] = Ne + ye, Ne = 0) : (me[Ae + st] = Ne, Ne = 1);
|
|
174721
174725
|
Je += Ne;
|
|
174722
174726
|
}
|
|
174723
|
-
ve[
|
|
174727
|
+
ve[Ae] = Me;
|
|
174724
174728
|
}
|
|
174725
174729
|
return me = P(me, Ce)[0], [g(ve), g(me)];
|
|
174726
174730
|
}
|
|
174727
174731
|
function L(R, W) {
|
|
174728
|
-
for (var ne = R.length, pe = W.length, ye = [], ve = [], Ee = r, Ce, me, je, Me,
|
|
174732
|
+
for (var ne = R.length, pe = W.length, ye = [], ve = [], Ee = r, Ce, me, je, Me, Ae; ne; ) {
|
|
174729
174733
|
if (ve.unshift(R[--ne]), m(ve), q(ve, W) < 0) {
|
|
174730
174734
|
ye.push(0);
|
|
174731
174735
|
continue;
|
|
174732
174736
|
}
|
|
174733
174737
|
me = ve.length, je = ve[me - 1] * Ee + ve[me - 2], Me = W[pe - 1] * Ee + W[pe - 2], me > pe && (je = (je + 1) * Ee), Ce = Math.ceil(je / Me);
|
|
174734
174738
|
do {
|
|
174735
|
-
if (
|
|
174739
|
+
if (Ae = M(W, Ce), q(Ae, ve) <= 0) break;
|
|
174736
174740
|
Ce--;
|
|
174737
174741
|
} while (Ce);
|
|
174738
|
-
ye.push(Ce), ve = w(ve,
|
|
174742
|
+
ye.push(Ce), ve = w(ve, Ae);
|
|
174739
174743
|
}
|
|
174740
174744
|
return ye.reverse(), [g(ye), g(ve)];
|
|
174741
174745
|
}
|
|
@@ -174768,8 +174772,8 @@ var aZ = { exports: {} };
|
|
|
174768
174772
|
if (je === -1) return [u[0], R];
|
|
174769
174773
|
if (je === 0) return [u[R.sign === pe.sign ? 1 : -1], u[0]];
|
|
174770
174774
|
ye.length + ve.length <= 200 ? ne = S(ye, ve) : ne = L(ye, ve), Ee = ne[0];
|
|
174771
|
-
var Me = R.sign !== pe.sign,
|
|
174772
|
-
return typeof Ee == "number" ? (Me && (Ee = -Ee), Ee = new d(Ee)) : Ee = new c(Ee, Me), typeof
|
|
174775
|
+
var Me = R.sign !== pe.sign, Ae = ne[1], Ne = R.sign;
|
|
174776
|
+
return typeof Ee == "number" ? (Me && (Ee = -Ee), Ee = new d(Ee)) : Ee = new c(Ee, Me), typeof Ae == "number" ? (Ne && (Ae = -Ae), Ae = new d(Ae)) : Ae = new c(Ae, Ne), [Ee, Ae];
|
|
174773
174777
|
}
|
|
174774
174778
|
c.prototype.divmod = function(R) {
|
|
174775
174779
|
var W = $(this, R);
|
|
@@ -174987,10 +174991,10 @@ var aZ = { exports: {} };
|
|
|
174987
174991
|
}, p.prototype.shiftRight = d.prototype.shiftRight = c.prototype.shiftRight;
|
|
174988
174992
|
function re(R, W, ne) {
|
|
174989
174993
|
W = ue(W);
|
|
174990
|
-
for (var pe = R.isNegative(), ye = W.isNegative(), ve = pe ? R.not() : R, Ee = ye ? W.not() : W, Ce = 0, me = 0, je = null, Me = null,
|
|
174991
|
-
je = $(ve, ee), Ce = je[1].toJSNumber(), pe && (Ce = ee - 1 - Ce), Me = $(Ee, ee), me = Me[1].toJSNumber(), ye && (me = ee - 1 - me), ve = je[0], Ee = Me[0],
|
|
174992
|
-
for (var Ne = ne(pe ? 1 : 0, ye ? 1 : 0) !== 0 ? t(-1) : t(0), Je =
|
|
174993
|
-
Ne = Ne.multiply(ee).add(t(
|
|
174994
|
+
for (var pe = R.isNegative(), ye = W.isNegative(), ve = pe ? R.not() : R, Ee = ye ? W.not() : W, Ce = 0, me = 0, je = null, Me = null, Ae = []; !ve.isZero() || !Ee.isZero(); )
|
|
174995
|
+
je = $(ve, ee), Ce = je[1].toJSNumber(), pe && (Ce = ee - 1 - Ce), Me = $(Ee, ee), me = Me[1].toJSNumber(), ye && (me = ee - 1 - me), ve = je[0], Ee = Me[0], Ae.push(ne(Ce, me));
|
|
174996
|
+
for (var Ne = ne(pe ? 1 : 0, ye ? 1 : 0) !== 0 ? t(-1) : t(0), Je = Ae.length - 1; Je >= 0; Je -= 1)
|
|
174997
|
+
Ne = Ne.multiply(ee).add(t(Ae[Je]));
|
|
174994
174998
|
return Ne;
|
|
174995
174999
|
}
|
|
174996
175000
|
c.prototype.not = function() {
|
|
@@ -175053,7 +175057,7 @@ var aZ = { exports: {} };
|
|
|
175053
175057
|
var pe = ne || Math.random, ye = ce(R, W), ve = Q(R, W), Ee = ve.subtract(ye).add(1);
|
|
175054
175058
|
if (Ee.isSmall) return ye.add(Math.floor(pe() * Ee));
|
|
175055
175059
|
for (var Ce = he(Ee, r).value, me = [], je = !0, Me = 0; Me < Ce.length; Me++) {
|
|
175056
|
-
var
|
|
175060
|
+
var Ae = je ? Ce[Me] + (Me + 1 < Ce.length ? Ce[Me + 1] / r : 0) : r, Ne = y(pe() * Ae);
|
|
175057
175061
|
me.push(Ne), Ne < Ce[Me] && (je = !1);
|
|
175058
175062
|
}
|
|
175059
175063
|
return ye.add(u.fromArray(me, r, !1));
|
|
@@ -175076,11 +175080,11 @@ var aZ = { exports: {} };
|
|
|
175076
175080
|
var me = R[ve];
|
|
175077
175081
|
if (me in Ce) je.push(ue(Ce[me]));
|
|
175078
175082
|
else if (me === "<") {
|
|
175079
|
-
var
|
|
175083
|
+
var Ae = ve;
|
|
175080
175084
|
do
|
|
175081
175085
|
ve++;
|
|
175082
175086
|
while (R[ve] !== ">" && ve < R.length);
|
|
175083
|
-
je.push(ue(R.slice(
|
|
175087
|
+
je.push(ue(R.slice(Ae + 1, ve)));
|
|
175084
175088
|
} else throw new Error(me + " is not a valid character");
|
|
175085
175089
|
}
|
|
175086
175090
|
return V(je, W, Me);
|
|
@@ -175179,8 +175183,8 @@ var aZ = { exports: {} };
|
|
|
175179
175183
|
if (!Ce) throw new Error("Invalid integer: " + R);
|
|
175180
175184
|
if (l)
|
|
175181
175185
|
return new p(BigInt(ne ? "-" + R : R));
|
|
175182
|
-
for (var me = [], je = R.length, Me = o,
|
|
175183
|
-
me.push(+R.slice(
|
|
175186
|
+
for (var me = [], je = R.length, Me = o, Ae = je - Me; je > 0; )
|
|
175187
|
+
me.push(+R.slice(Ae, je)), Ae -= Me, Ae < 0 && (Ae = 0), je -= Me;
|
|
175184
175188
|
return m(me), new c(me, ne);
|
|
175185
175189
|
}
|
|
175186
175190
|
function de(R) {
|
|
@@ -179780,7 +179784,7 @@ const l$e = { status: "idle" }, u$e = (e) => {
|
|
|
179780
179784
|
var h;
|
|
179781
179785
|
(h = r.current) == null || h.forceCleanup();
|
|
179782
179786
|
}, []);
|
|
179783
|
-
const a =
|
|
179787
|
+
const a = Te(
|
|
179784
179788
|
(h) => {
|
|
179785
179789
|
o.connect(h).catch((f) => {
|
|
179786
179790
|
console.error("useSyncManager: connect failed", f);
|
|
@@ -179788,9 +179792,9 @@ const l$e = { status: "idle" }, u$e = (e) => {
|
|
|
179788
179792
|
},
|
|
179789
179793
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
179790
179794
|
[e.ydoc]
|
|
179791
|
-
), l =
|
|
179795
|
+
), l = Te(() => {
|
|
179792
179796
|
o.disconnect();
|
|
179793
|
-
}, [o]), u =
|
|
179797
|
+
}, [o]), u = Te(() => {
|
|
179794
179798
|
o.terminateSession();
|
|
179795
179799
|
}, [o]), c = t.status === "syncing", d = t.status === "ready" && !!s, p = t.status === "ready" || t.status === "reconnecting";
|
|
179796
179800
|
return {
|
|
@@ -179823,7 +179827,7 @@ const l$e = { status: "idle" }, u$e = (e) => {
|
|
|
179823
179827
|
services: a,
|
|
179824
179828
|
callbacks: l,
|
|
179825
179829
|
onLocalUpdate: e
|
|
179826
|
-
}), m = Ve(null), b =
|
|
179830
|
+
}), m = Ve(null), b = Te(async () => {
|
|
179827
179831
|
const v = m.current;
|
|
179828
179832
|
if (v && await v.destroy(), t && n)
|
|
179829
179833
|
try {
|
|
@@ -179836,7 +179840,7 @@ const l$e = { status: "idle" }, u$e = (e) => {
|
|
|
179836
179840
|
}
|
|
179837
179841
|
}, [t, n, i, o]), y = Ve(
|
|
179838
179842
|
null
|
|
179839
|
-
), x =
|
|
179843
|
+
), x = Te(() => {
|
|
179840
179844
|
y.current && (clearTimeout(y.current), y.current = null), e == null || e(Vr(Wo(i)), "");
|
|
179841
179845
|
}, [i, e]);
|
|
179842
179846
|
return Re(() => {
|
|
@@ -180829,7 +180833,7 @@ const C$e = ({
|
|
|
180829
180833
|
].includes(ee.name)
|
|
180830
180834
|
),
|
|
180831
180835
|
editable: !a
|
|
180832
|
-
}), [a]), P =
|
|
180836
|
+
}), [a]), P = Te(async () => {
|
|
180833
180837
|
var B;
|
|
180834
180838
|
if (!e || !((B = e.view) != null && B.dom)) return;
|
|
180835
180839
|
if (!a && e.view.dom.querySelector(".is-editor-empty")) {
|
|
@@ -180872,13 +180876,13 @@ const C$e = ({
|
|
|
180872
180876
|
Re(() => {
|
|
180873
180877
|
P();
|
|
180874
180878
|
}, [e.state.doc]);
|
|
180875
|
-
const $ =
|
|
180879
|
+
const $ = Te(() => {
|
|
180876
180880
|
C ? r((ee) => !ee) : document.fullscreenElement ? document.exitFullscreen ? document.exitFullscreen().then(() => r(!1)).catch(() => {
|
|
180877
180881
|
r(!1);
|
|
180878
180882
|
}) : r(!1) : document.documentElement.requestFullscreen ? document.documentElement.requestFullscreen().then(() => r(!0)).catch(() => {
|
|
180879
180883
|
r(!0);
|
|
180880
180884
|
}) : r(!0);
|
|
180881
|
-
}, [C]), q =
|
|
180885
|
+
}, [C]), q = Te(
|
|
180882
180886
|
(ee) => {
|
|
180883
180887
|
ee.key === "ArrowRight" || ee.key === "ArrowDown" || ee.code === "Space" ? (ee.preventDefault(), ee.stopPropagation(), T("forward"), k((K) => Math.min(K + 1, c.length - 1))) : ee.key === "ArrowLeft" || ee.key === "ArrowUp" ? (T("backward"), k((K) => Math.max(K - 1, 0))) : ee.key === "Escape" ? !a && t() : (ee.key === "f" || ee.key === "F") && $();
|
|
180884
180888
|
},
|
|
@@ -180896,7 +180900,7 @@ const C$e = ({
|
|
|
180896
180900
|
_(null), M(ee.targetTouches[0].clientX);
|
|
180897
180901
|
}, U = (ee) => {
|
|
180898
180902
|
_(ee.targetTouches[0].clientX);
|
|
180899
|
-
}, X =
|
|
180903
|
+
}, X = Te(() => {
|
|
180900
180904
|
if (!A || !j) return;
|
|
180901
180905
|
const ee = A - j, K = ee > O, re = ee < -O;
|
|
180902
180906
|
K && (T("forward"), k((J) => Math.min(J + 1, c.length - 1))), re && (T("backward"), k((J) => Math.max(J - 1, 0)));
|
|
@@ -181667,7 +181671,7 @@ const C$e = ({
|
|
|
181667
181671
|
orientation: r
|
|
181668
181672
|
// onItemRemove,
|
|
181669
181673
|
}) => {
|
|
181670
|
-
const o =
|
|
181674
|
+
const o = Te(
|
|
181671
181675
|
(a) => {
|
|
181672
181676
|
a.preventDefault(), a.stopPropagation(), t(a, e.id);
|
|
181673
181677
|
},
|
|
@@ -181709,7 +181713,7 @@ const YZ = dh(
|
|
|
181709
181713
|
const [o, i] = Be(null), s = Rn("(max-width: 1280px)"), a = Ve(null), l = Ve(0), u = Ve(null), c = Ft(() => e.map((m) => ({
|
|
181710
181714
|
...m,
|
|
181711
181715
|
isActive: m.id === o
|
|
181712
|
-
})), [e, o]), d =
|
|
181716
|
+
})), [e, o]), d = Te(() => {
|
|
181713
181717
|
var m;
|
|
181714
181718
|
if (t && ((m = t.view) != null && m.dom) && (!a.current || Date.now() - l.current > 250)) {
|
|
181715
181719
|
const b = /* @__PURE__ */ new Map();
|
|
@@ -181731,7 +181735,7 @@ const YZ = dh(
|
|
|
181731
181735
|
t.off("update", m), t.off("selectionUpdate", m), u.current && cancelAnimationFrame(u.current);
|
|
181732
181736
|
};
|
|
181733
181737
|
}, [t, d]);
|
|
181734
|
-
const p =
|
|
181738
|
+
const p = Te(
|
|
181735
181739
|
(m) => {
|
|
181736
181740
|
if (!t) return;
|
|
181737
181741
|
const { doc: b } = t.state;
|
|
@@ -181746,7 +181750,7 @@ const YZ = dh(
|
|
|
181746
181750
|
}), y !== -1 && t.chain().setNodeSelection(y).updateAttributes("heading", { isCollapsed: !1 }).run();
|
|
181747
181751
|
},
|
|
181748
181752
|
[t]
|
|
181749
|
-
), h =
|
|
181753
|
+
), h = Te(
|
|
181750
181754
|
(m) => {
|
|
181751
181755
|
if (!t) return;
|
|
181752
181756
|
p(m);
|
|
@@ -181774,7 +181778,7 @@ const YZ = dh(
|
|
|
181774
181778
|
}
|
|
181775
181779
|
},
|
|
181776
181780
|
[e, t, p]
|
|
181777
|
-
), f =
|
|
181781
|
+
), f = Te(
|
|
181778
181782
|
(m, b) => {
|
|
181779
181783
|
var y;
|
|
181780
181784
|
if (m.preventDefault(), m.stopPropagation(), i(b), t && ((y = t.view) != null && y.dom)) {
|
|
@@ -181809,7 +181813,7 @@ const YZ = dh(
|
|
|
181809
181813
|
}
|
|
181810
181814
|
},
|
|
181811
181815
|
[t, h, d, s]
|
|
181812
|
-
), g =
|
|
181816
|
+
), g = Te(
|
|
181813
181817
|
(m, b) => {
|
|
181814
181818
|
m.preventDefault(), m.stopPropagation(), n((y) => {
|
|
181815
181819
|
var k;
|
|
@@ -181947,7 +181951,7 @@ const U$e = [
|
|
|
181947
181951
|
// @ts-ignore
|
|
181948
181952
|
!a.current.contains(g.target) && s(!1);
|
|
181949
181953
|
});
|
|
181950
|
-
const f =
|
|
181954
|
+
const f = Te(() => {
|
|
181951
181955
|
var m;
|
|
181952
181956
|
const g = (m = l.current) == null ? void 0 : m.getBoundingClientRect();
|
|
181953
181957
|
if (g) {
|
|
@@ -182651,10 +182655,10 @@ const K$e = "space-xsm gap-xsm hover:color-bg-default-hover cursor-pointer h-[30
|
|
|
182651
182655
|
), M = Ft(
|
|
182652
182656
|
() => e.find((z) => z.id === D),
|
|
182653
182657
|
[e, D]
|
|
182654
|
-
), [j, _] = Be(null), [O, E] = Be(!1), [T, S] = Be({}), L =
|
|
182658
|
+
), [j, _] = Be(null), [O, E] = Be(!1), [T, S] = Be({}), L = Te(
|
|
182655
182659
|
(z) => z === t ? T[z] ?? !1 : !1,
|
|
182656
182660
|
[t, T]
|
|
182657
|
-
), P =
|
|
182661
|
+
), P = Te(
|
|
182658
182662
|
(z, U) => {
|
|
182659
182663
|
if (z !== t) {
|
|
182660
182664
|
n(z), S((X) => ({
|
|
@@ -182670,7 +182674,7 @@ const K$e = "space-xsm gap-xsm hover:color-bg-default-hover cursor-pointer h-[30
|
|
|
182670
182674
|
}));
|
|
182671
182675
|
},
|
|
182672
182676
|
[t, n]
|
|
182673
|
-
), $ =
|
|
182677
|
+
), $ = Te(
|
|
182674
182678
|
(z) => {
|
|
182675
182679
|
if (z !== t) {
|
|
182676
182680
|
n(z), S((U) => ({
|
|
@@ -183532,15 +183536,15 @@ const K$e = "space-xsm gap-xsm hover:color-bg-default-hover cursor-pointer h-[30
|
|
|
183532
183536
|
)) return !1;
|
|
183533
183537
|
const { state: p } = u, { selection: h } = p, f = Iy(h.$from, u.schema.marks.link);
|
|
183534
183538
|
return f ? p.doc.textBetween(f.from, f.to) === c : !1;
|
|
183535
|
-
}, i =
|
|
183539
|
+
}, i = Te(() => {
|
|
183536
183540
|
const u = e.state.selection.to, c = e.getAttributes("link").href;
|
|
183537
183541
|
e.commands.extendMarkRange("link", { href: c }), e.chain().focus().setTextSelection(u).unsetMark("link").insertContent(" ").run();
|
|
183538
|
-
}, [e]), s =
|
|
183542
|
+
}, [e]), s = Te(
|
|
183539
183543
|
(u) => {
|
|
183540
183544
|
r.current && r.current.contains(u.target) || i();
|
|
183541
183545
|
},
|
|
183542
183546
|
[i]
|
|
183543
|
-
), a =
|
|
183547
|
+
), a = Te(
|
|
183544
183548
|
(u) => {
|
|
183545
183549
|
var f, g;
|
|
183546
183550
|
const { key: c } = u, d = document.activeElement;
|
|
@@ -183734,36 +183738,36 @@ const K$e = "space-xsm gap-xsm hover:color-bg-default-hover cursor-pointer h-[30
|
|
|
183734
183738
|
onCopyHeadingLink: me,
|
|
183735
183739
|
tabConfig: je,
|
|
183736
183740
|
footerHeight: Me,
|
|
183737
|
-
ipfsImageFetchFn:
|
|
183741
|
+
ipfsImageFetchFn: Ae,
|
|
183738
183742
|
fetchV1ImageFn: Ne,
|
|
183739
183743
|
activeModel: Je,
|
|
183740
183744
|
maxTokens: st,
|
|
183741
183745
|
isAIAgentEnabled: wt,
|
|
183742
183746
|
// Document styling object
|
|
183743
|
-
documentStyling:
|
|
183747
|
+
documentStyling: Se,
|
|
183744
183748
|
...Pe
|
|
183745
183749
|
}, nt) => {
|
|
183746
183750
|
const [ct, Ke] = Be(!1), [ht, _t] = Be(!1), Gt = Ve(null), Xt = (() => {
|
|
183747
|
-
if (!
|
|
183751
|
+
if (!Se)
|
|
183748
183752
|
return { canvas: void 0, background: void 0 };
|
|
183749
183753
|
const At = {}, Dt = {}, St = De ?? "light";
|
|
183750
|
-
if (
|
|
183754
|
+
if (Se.canvasBackground) {
|
|
183751
183755
|
const sn = md(
|
|
183752
|
-
|
|
183756
|
+
Se.canvasBackground,
|
|
183753
183757
|
St
|
|
183754
183758
|
);
|
|
183755
183759
|
At.backgroundColor = sn;
|
|
183756
183760
|
}
|
|
183757
|
-
if (
|
|
183761
|
+
if (Se.textColor) {
|
|
183758
183762
|
const sn = x7(
|
|
183759
|
-
|
|
183763
|
+
Se.textColor,
|
|
183760
183764
|
St
|
|
183761
183765
|
);
|
|
183762
183766
|
sn && (At.color = sn);
|
|
183763
183767
|
}
|
|
183764
|
-
if (
|
|
183768
|
+
if (Se.fontFamily && (At.fontFamily = Se.fontFamily), Se.background) {
|
|
183765
183769
|
const sn = md(
|
|
183766
|
-
|
|
183770
|
+
Se.background,
|
|
183767
183771
|
St
|
|
183768
183772
|
);
|
|
183769
183773
|
Dt.background = sn;
|
|
@@ -183777,7 +183781,7 @@ const K$e = "space-xsm gap-xsm hover:color-bg-default-hover cursor-pointer h-[30
|
|
|
183777
183781
|
return {
|
|
183778
183782
|
minHeight: "100vh"
|
|
183779
183783
|
};
|
|
183780
|
-
const At = (
|
|
183784
|
+
const At = (Se == null ? void 0 : Se.orientation) === "landscape" ? "landscape" : "portrait", Dt = rHe[At][_];
|
|
183781
183785
|
if (!Dt) return {};
|
|
183782
183786
|
const St = {}, sn = nHe[At];
|
|
183783
183787
|
return typeof Dt.width == "number" ? (St.width = `${Dt.width}px`, St.maxWidth = `${Dt.width}px`) : (St.width = sn.zoomFitWidth, St.maxWidth = `${sn.zoomFitMaxWidth}px`), Dt.minHeight && (St.minHeight = Dt.minHeight), St;
|
|
@@ -183812,8 +183816,8 @@ const K$e = "space-xsm gap-xsm hover:color-bg-default-hover cursor-pointer h-[30
|
|
|
183812
183816
|
orderTab: uJ,
|
|
183813
183817
|
deleteTab: cJ
|
|
183814
183818
|
} = qZ({
|
|
183815
|
-
documentStyling:
|
|
183816
|
-
ipfsImageFetchFn:
|
|
183819
|
+
documentStyling: Se,
|
|
183820
|
+
ipfsImageFetchFn: Ae,
|
|
183817
183821
|
fetchV1ImageFn: Ne,
|
|
183818
183822
|
enableIndexeddbSync: M,
|
|
183819
183823
|
ddocId: j,
|
|
@@ -183992,7 +183996,7 @@ const K$e = "space-xsm gap-xsm hover:color-bg-default-hover cursor-pointer h-[30
|
|
|
183992
183996
|
{}
|
|
183993
183997
|
), [ce]), W7 = () => {
|
|
183994
183998
|
var St, sn, Rs;
|
|
183995
|
-
const At = Dg.length > 0 || Hh.length > 0 && !((St = Pe.versionHistoryState) != null && St.enabled), Dt = be && !dt && _ === "1" && (
|
|
183999
|
+
const At = Dg.length > 0 || Hh.length > 0 && !((St = Pe.versionHistoryState) != null && St.enabled), Dt = be && !dt && _ === "1" && (Se == null ? void 0 : Se.orientation) === "landscape" && rt && !Ie;
|
|
183996
184000
|
return /* @__PURE__ */ F.jsx(fh, { children: /* @__PURE__ */ F.jsxs(F.Fragment, { children: [
|
|
183997
184001
|
!e && /* @__PURE__ */ F.jsx(
|
|
183998
184002
|
"div",
|
|
@@ -184022,7 +184026,7 @@ const K$e = "space-xsm gap-xsm hover:color-bg-default-hover cursor-pointer h-[30
|
|
|
184022
184026
|
onTxtExport: oe,
|
|
184023
184027
|
onDocxImport: ee,
|
|
184024
184028
|
isLoading: !fe || ot,
|
|
184025
|
-
ipfsImageFetchFn:
|
|
184029
|
+
ipfsImageFetchFn: Ae,
|
|
184026
184030
|
fetchV1ImageFn: Ne,
|
|
184027
184031
|
isConnected: ue,
|
|
184028
184032
|
tabs: Dg,
|
|
@@ -184050,7 +184054,7 @@ const K$e = "space-xsm gap-xsm hover:color-bg-default-hover cursor-pointer h-[30
|
|
|
184050
184054
|
onPdfExport: U,
|
|
184051
184055
|
onHtmlExport: X,
|
|
184052
184056
|
onTxtExport: oe,
|
|
184053
|
-
ipfsImageFetchFn:
|
|
184057
|
+
ipfsImageFetchFn: Ae,
|
|
184054
184058
|
onDocxImport: ee,
|
|
184055
184059
|
fetchV1ImageFn: Ne,
|
|
184056
184060
|
isConnected: ue
|
|
@@ -184073,8 +184077,8 @@ const K$e = "space-xsm gap-xsm hover:color-bg-default-hover cursor-pointer h-[30
|
|
|
184073
184077
|
setSlides: yr,
|
|
184074
184078
|
renderThemeToggle: ve,
|
|
184075
184079
|
isContentLoading: ot,
|
|
184076
|
-
ipfsImageFetchFn:
|
|
184077
|
-
documentStyling:
|
|
184080
|
+
ipfsImageFetchFn: Ae,
|
|
184081
|
+
documentStyling: Se,
|
|
184078
184082
|
fetchV1ImageFn: Ne,
|
|
184079
184083
|
theme: De ?? "light"
|
|
184080
184084
|
}
|
|
@@ -184089,7 +184093,7 @@ const K$e = "space-xsm gap-xsm hover:color-bg-default-hover cursor-pointer h-[30
|
|
|
184089
184093
|
showTOC: be,
|
|
184090
184094
|
setShowTOC: de,
|
|
184091
184095
|
isPreviewMode: e || !S,
|
|
184092
|
-
orientation:
|
|
184096
|
+
orientation: Se == null ? void 0 : Se.orientation,
|
|
184093
184097
|
tabs: Dg,
|
|
184094
184098
|
setTabs: oJ,
|
|
184095
184099
|
activeTabId: z7,
|
|
@@ -184111,7 +184115,7 @@ const K$e = "space-xsm gap-xsm hover:color-bg-default-hover cursor-pointer h-[30
|
|
|
184111
184115
|
id: "editor-wrapper",
|
|
184112
184116
|
className: tt(
|
|
184113
184117
|
"w-full mx-auto rounded transition-all duration-300 ease-in-out",
|
|
184114
|
-
!(
|
|
184118
|
+
!(Se != null && Se.canvasBackground) && "color-bg-default",
|
|
184115
184119
|
!e && (S ? "-mt-[1.5rem] md:!mt-[0.8rem] pt-0 md:pt-[5rem]" : "pt-0 md:pt-[1.5rem]"),
|
|
184116
184120
|
e && "md:!mt-[1rem] pt-0 md:!pt-[5rem]",
|
|
184117
184121
|
{ "md:!mt-[0.7rem]": !e },
|
|
@@ -184149,7 +184153,7 @@ const K$e = "space-xsm gap-xsm hover:color-bg-default-hover cursor-pointer h-[30
|
|
|
184149
184153
|
"w-full h-full pt-8 md:pt-0",
|
|
184150
184154
|
{ "custom-ios-padding": Qt },
|
|
184151
184155
|
{
|
|
184152
|
-
"color-bg-default": !(
|
|
184156
|
+
"color-bg-default": !(Se != null && Se.canvasBackground) && (_ === "1.4" || _ === "1.5")
|
|
184153
184157
|
}
|
|
184154
184158
|
),
|
|
184155
184159
|
style: {
|
|
@@ -184175,7 +184179,7 @@ const K$e = "space-xsm gap-xsm hover:color-bg-default-hover cursor-pointer h-[30
|
|
|
184175
184179
|
onInlineComment: $,
|
|
184176
184180
|
activeCommentId: er,
|
|
184177
184181
|
isCollabDocumentPublished: pe,
|
|
184178
|
-
ipfsImageFetchFn:
|
|
184182
|
+
ipfsImageFetchFn: Ae,
|
|
184179
184183
|
fetchV1ImageFn: Ne,
|
|
184180
184184
|
ipfsImageUploadFn: f,
|
|
184181
184185
|
onReminderCreate: (Rs = (sn = Ce == null ? void 0 : Ce.find(
|
|
@@ -184331,7 +184335,7 @@ const K$e = "space-xsm gap-xsm hover:color-bg-default-hover cursor-pointer h-[30
|
|
|
184331
184335
|
setIsNavbarVisible: L,
|
|
184332
184336
|
ipfsImageUploadFn: f,
|
|
184333
184337
|
isLoading: !fe || ot,
|
|
184334
|
-
ipfsImageFetchFn:
|
|
184338
|
+
ipfsImageFetchFn: Ae,
|
|
184335
184339
|
fetchV1ImageFn: Ne
|
|
184336
184340
|
}
|
|
184337
184341
|
)
|
|
@@ -184363,7 +184367,7 @@ const K$e = "space-xsm gap-xsm hover:color-bg-default-hover cursor-pointer h-[30
|
|
|
184363
184367
|
return /* @__PURE__ */ F.jsx(
|
|
184364
184368
|
dX,
|
|
184365
184369
|
{
|
|
184366
|
-
documentStyling:
|
|
184370
|
+
documentStyling: Se,
|
|
184367
184371
|
theme: De ?? "light",
|
|
184368
184372
|
children: /* @__PURE__ */ F.jsx(
|
|
184369
184373
|
"div",
|
|
@@ -184828,20 +184832,20 @@ const K$e = "space-xsm gap-xsm hover:color-bg-default-hover cursor-pointer h-[30
|
|
|
184828
184832
|
"html",
|
|
184829
184833
|
"txt"
|
|
184830
184834
|
], uHe = (e) => e !== void 0 && lHe.includes(e), nWe = (e) => {
|
|
184831
|
-
const t = Ve(null), n = Ve(!1), [r, o] = Be(null), [i, s] = Be(!1), a = aHe(e), { getEditor: l, setContent: u } = a, c =
|
|
184835
|
+
const t = Ve(null), n = Ve(!1), [r, o] = Be(null), [i, s] = Be(!1), a = aHe(e), { getEditor: l, setContent: u } = a, c = Te(
|
|
184832
184836
|
(A, M) => {
|
|
184833
184837
|
A && !A.isDestroyed && A.destroy(), M && !M.isDestroyed && M.destroy();
|
|
184834
184838
|
},
|
|
184835
184839
|
[]
|
|
184836
|
-
), d =
|
|
184840
|
+
), d = Te(
|
|
184837
184841
|
(A) => {
|
|
184838
184842
|
const M = t.current;
|
|
184839
184843
|
M && c(M.editor, M.ydoc), t.current = A, o(A);
|
|
184840
184844
|
},
|
|
184841
184845
|
[c]
|
|
184842
|
-
), p =
|
|
184846
|
+
), p = Te(() => {
|
|
184843
184847
|
s(!1), d(null);
|
|
184844
|
-
}, [d]), h =
|
|
184848
|
+
}, [d]), h = Te(
|
|
184845
184849
|
(A) => {
|
|
184846
184850
|
s(A), !A && (n.current || d(null));
|
|
184847
184851
|
},
|
|
@@ -184853,15 +184857,15 @@ const K$e = "space-xsm gap-xsm hover:color-bg-default-hover cursor-pointer h-[30
|
|
|
184853
184857
|
t.current.ydoc
|
|
184854
184858
|
), t.current = null);
|
|
184855
184859
|
}, [c]);
|
|
184856
|
-
const f =
|
|
184860
|
+
const f = Te((A, M) => {
|
|
184857
184861
|
const j = A.getXmlFragment(M);
|
|
184858
184862
|
return Bz(j);
|
|
184859
|
-
}, []), g =
|
|
184863
|
+
}, []), g = Te((A) => $0(
|
|
184860
184864
|
A
|
|
184861
|
-
) || null, []), m =
|
|
184865
|
+
) || null, []), m = Te((A, M) => {
|
|
184862
184866
|
const j = document.createElement("a");
|
|
184863
184867
|
j.href = A, j.download = M, document.body.appendChild(j), j.click(), document.body.removeChild(j), URL.revokeObjectURL(A);
|
|
184864
|
-
}, []), b =
|
|
184868
|
+
}, []), b = Te(() => {
|
|
184865
184869
|
if (!r) return null;
|
|
184866
184870
|
const A = r.activeTabId, M = f(r.ydoc, A);
|
|
184867
184871
|
return kh(r.editor, M);
|
|
@@ -184950,7 +184954,7 @@ const K$e = "space-xsm gap-xsm hover:color-bg-default-hover cursor-pointer h-[30
|
|
|
184950
184954
|
}), k = Ft(() => !r || r.tabs.length <= 1 ? [{ id: "current", label: "Current tab" }] : [
|
|
184951
184955
|
{ id: "current", label: "Current tab" },
|
|
184952
184956
|
{ id: "all", label: "All tabs" }
|
|
184953
|
-
], [r]), w =
|
|
184957
|
+
], [r]), w = Te(
|
|
184954
184958
|
(A) => {
|
|
184955
184959
|
var _;
|
|
184956
184960
|
if (n.current) return;
|
|
@@ -184981,7 +184985,7 @@ const K$e = "space-xsm gap-xsm hover:color-bg-default-hover cursor-pointer h-[30
|
|
|
184981
184985
|
d,
|
|
184982
184986
|
s
|
|
184983
184987
|
]
|
|
184984
|
-
), D =
|
|
184988
|
+
), D = Te(
|
|
184985
184989
|
async ({ format: A, tab: M }) => {
|
|
184986
184990
|
r && (n.current = !0, v({
|
|
184987
184991
|
format: A,
|
|
@@ -185030,7 +185034,7 @@ const K$e = "space-xsm gap-xsm hover:color-bg-default-hover cursor-pointer h-[30
|
|
|
185030
185034
|
({ node: e, editor: t, deleteNode: n }) => {
|
|
185031
185035
|
const r = e.attrs.reminder, [o, i] = Be(
|
|
185032
185036
|
r != null && r.timestamp ? new Date(r.timestamp).getTime() < Date.now() : !1
|
|
185033
|
-
), s = t.isEditable === !1, a =
|
|
185037
|
+
), s = t.isEditable === !1, a = Te(() => {
|
|
185034
185038
|
const c = [];
|
|
185035
185039
|
return t.state.doc.descendants((d) => {
|
|
185036
185040
|
d.type.name === "reminderBlock" && c.push({
|
|
@@ -185040,7 +185044,7 @@ const K$e = "space-xsm gap-xsm hover:color-bg-default-hover cursor-pointer h-[30
|
|
|
185040
185044
|
}), c.sort(
|
|
185041
185045
|
(d, p) => new Date(d.timestamp).getTime() - new Date(p.timestamp).getTime()
|
|
185042
185046
|
);
|
|
185043
|
-
}, [t]), l =
|
|
185047
|
+
}, [t]), l = Te(
|
|
185044
185048
|
(c) => {
|
|
185045
185049
|
const d = a(), p = d.findIndex((g) => g.id === r.id);
|
|
185046
185050
|
if (p === -1) return;
|
|
@@ -185073,7 +185077,7 @@ const K$e = "space-xsm gap-xsm hover:color-bg-default-hover cursor-pointer h-[30
|
|
|
185073
185077
|
return () => clearTimeout(h);
|
|
185074
185078
|
}
|
|
185075
185079
|
}, [o, r.timestamp]);
|
|
185076
|
-
const u =
|
|
185080
|
+
const u = Te(() => {
|
|
185077
185081
|
var d;
|
|
185078
185082
|
const c = (d = t.extensionManager.extensions.find(
|
|
185079
185083
|
(p) => p.name === "reminderBlock"
|