@harbour-enterprises/superdoc 0.11.44 → 0.12.0-RC2
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/chunks/super-editor.es-VeFFgSyB.cjs +451 -0
- package/dist/chunks/{super-editor.es-B8d2FNzS.es.js → super-editor.es-jrBL9mdr.es.js} +9806 -9888
- package/dist/style.css +29 -29
- package/dist/super-editor/ai-writer.es.js +2 -2
- package/dist/super-editor/chunks/{converter-CDy1Msyw.js → converter-D1a6grDV.js} +3979 -4068
- package/dist/super-editor/chunks/{docx-zipper-QLwB_17K.js → docx-zipper-L7BeJRax.js} +1 -1
- package/dist/super-editor/chunks/{editor-Do07rOjy.js → editor-BY7pz5xQ.js} +3674 -3664
- package/dist/super-editor/chunks/{toolbar-SSL9IQya.js → toolbar-DEvjPuNj.js} +2 -2
- package/dist/super-editor/converter.es.js +1 -1
- package/dist/super-editor/core/Attribute.d.ts +2 -2
- package/dist/super-editor/core/Editor.d.ts +8 -1
- package/dist/super-editor/core/Editor.d.ts.map +1 -1
- package/dist/super-editor/core/Schema.d.ts +2 -2
- package/dist/super-editor/core/commands/splitListItem.d.ts +1 -1
- package/dist/super-editor/core/commands/splitListItem.d.ts.map +1 -1
- package/dist/super-editor/core/helpers/list-numbering-helpers.d.ts +235 -0
- package/dist/super-editor/core/helpers/list-numbering-helpers.d.ts.map +1 -0
- package/dist/super-editor/core/super-converter/SuperConverter.d.ts +1 -1
- package/dist/super-editor/core/super-converter/SuperConverter.d.ts.map +1 -1
- package/dist/super-editor/core/super-converter/exporter.d.ts.map +1 -1
- package/dist/super-editor/core/super-converter/v2/importer/listImporter.d.ts +32 -5
- package/dist/super-editor/core/super-converter/v2/importer/listImporter.d.ts.map +1 -1
- package/dist/super-editor/core/super-converter/v2/importer/paragraphNodeImporter.d.ts +3 -3
- package/dist/super-editor/core/super-converter/v2/importer/paragraphNodeImporter.d.ts.map +1 -1
- package/dist/super-editor/docx-zipper.es.js +2 -2
- package/dist/super-editor/editor.es.js +3 -3
- package/dist/super-editor/extensions/linked-styles/linked-styles.d.ts.map +1 -1
- package/dist/super-editor/extensions/list-item/ListItemNodeView.d.ts +56 -0
- package/dist/super-editor/extensions/list-item/ListItemNodeView.d.ts.map +1 -0
- package/dist/super-editor/extensions/list-item/list-item.d.ts.map +1 -1
- package/dist/super-editor/extensions/ordered-list/ordered-list.d.ts.map +1 -1
- package/dist/super-editor/extensions/paragraph/paragraph.d.ts.map +1 -1
- package/dist/super-editor/file-zipper.es.js +1 -1
- package/dist/super-editor/style.css +1 -1
- package/dist/super-editor/super-editor.es.js +6 -6
- package/dist/super-editor/tests/e2e/test-app/dist/assets/index-BTMvkUyI.d.ts +3 -0
- package/dist/super-editor/tests/e2e/test-app/dist/assets/index-BTMvkUyI.d.ts.map +1 -0
- package/dist/super-editor/tests/e2e/test-app/vite.config.d.ts +1 -1
- package/dist/super-editor/tests/editor/listItemHelpers.test.d.ts +2 -0
- package/dist/super-editor/tests/editor/listItemHelpers.test.d.ts.map +1 -0
- package/dist/super-editor/tests/export/export-helpers/export-helpers.d.ts.map +1 -1
- package/dist/super-editor/toolbar.es.js +2 -2
- package/dist/super-editor.cjs +1 -1
- package/dist/super-editor.es.js +4 -4
- package/dist/superdoc.cjs +17 -17
- package/dist/superdoc.es.js +280 -280
- package/dist/superdoc.umd.js +8338 -8424
- package/dist/superdoc.umd.js.map +1 -1
- package/package.json +1 -1
- package/dist/chunks/super-editor.es-BIJBEltX.cjs +0 -455
package/dist/superdoc.es.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { f as md, g as yd, c as bd, i as jo, Z as Wo, H as wd, x as Sd, D as Dd, M as vd, b as Fd } from "./chunks/super-editor.es-jrBL9mdr.es.js";
|
|
2
|
+
import { P as Ib, d as Cb, L as fb } from "./chunks/super-editor.es-jrBL9mdr.es.js";
|
|
3
3
|
import { Y as Vl, r as W, Z as ui, p as Ge, _ as Vn, a as ae, $ as zn, a0 as ua, D as dt, i as ht, q as ji, l as wt, y as Fe, a1 as kd, N as Zt, u as qt, a2 as xd, a3 as Rd, a4 as Xo, g as Ji, K as Us, O as jr, j as Ii, k as Di, h as da, U as Nd, s as Md, A as Wr, F as jt, R as GA, m as Ct, E as mi, I as ms, C as re, V as Ld, S as Gd, W as Td, J as qi, P as Es, G as ar, Q as Ud, H as Hd, T as Pd, b as ye, o as fe, t as yi, x as bi, z as zl, f as We, B as ri, e as Ze, v as hi, w as Qi, n as Xs, a5 as Zl, d as gn, c as $l, X as Od, a6 as Jd } from "./chunks/vue-DKS68Dra.es.js";
|
|
4
4
|
import { B as qn } from "./chunks/jszip-OpmRHhd4.es.js";
|
|
5
5
|
import { B as Yd } from "./chunks/blank-docx-BRvkcuiv.es.js";
|
|
@@ -1372,9 +1372,9 @@ function CA(n, t, i = {}, r, A, c) {
|
|
|
1372
1372
|
return L[Ya] = P, L;
|
|
1373
1373
|
const K = function() {
|
|
1374
1374
|
Vs(r);
|
|
1375
|
-
const V = Array.from(arguments),
|
|
1376
|
-
function
|
|
1377
|
-
|
|
1375
|
+
const V = Array.from(arguments), Z = [], q = [];
|
|
1376
|
+
function $(ne) {
|
|
1377
|
+
Z.push(ne);
|
|
1378
1378
|
}
|
|
1379
1379
|
function te(ne) {
|
|
1380
1380
|
q.push(ne);
|
|
@@ -1383,7 +1383,7 @@ function CA(n, t, i = {}, r, A, c) {
|
|
|
1383
1383
|
args: V,
|
|
1384
1384
|
name: K[Ya],
|
|
1385
1385
|
store: D,
|
|
1386
|
-
after:
|
|
1386
|
+
after: $,
|
|
1387
1387
|
onError: te
|
|
1388
1388
|
});
|
|
1389
1389
|
let se;
|
|
@@ -1392,7 +1392,7 @@ function CA(n, t, i = {}, r, A, c) {
|
|
|
1392
1392
|
} catch (ne) {
|
|
1393
1393
|
throw cs(q, ne), ne;
|
|
1394
1394
|
}
|
|
1395
|
-
return se instanceof Promise ? se.then((ne) => (cs(
|
|
1395
|
+
return se instanceof Promise ? se.then((ne) => (cs(Z, ne), ne)).catch((ne) => (cs(q, ne), Promise.reject(ne))) : (cs(Z, se), se);
|
|
1396
1396
|
};
|
|
1397
1397
|
return K[tc] = !0, K[Ya] = P, K;
|
|
1398
1398
|
}, H = /* @__PURE__ */ ui({
|
|
@@ -1408,12 +1408,12 @@ function CA(n, t, i = {}, r, A, c) {
|
|
|
1408
1408
|
$patch: F,
|
|
1409
1409
|
$reset: O,
|
|
1410
1410
|
$subscribe(L, P = {}) {
|
|
1411
|
-
const K = ec(m, L, P.detached, () => V()), V = g.run(() => wt(() => r.state.value[n], (
|
|
1411
|
+
const K = ec(m, L, P.detached, () => V()), V = g.run(() => wt(() => r.state.value[n], (Z) => {
|
|
1412
1412
|
(P.flush === "sync" ? Q : f) && L({
|
|
1413
1413
|
storeId: n,
|
|
1414
1414
|
type: Yi.direct,
|
|
1415
1415
|
events: S
|
|
1416
|
-
},
|
|
1416
|
+
}, Z);
|
|
1417
1417
|
}, pi({}, I, P)));
|
|
1418
1418
|
return K;
|
|
1419
1419
|
},
|
|
@@ -1817,14 +1817,14 @@ function Yn(n) {
|
|
|
1817
1817
|
const { activeEditor: Be } = ne;
|
|
1818
1818
|
Be?.commands.setActiveComment({ commentId: i, importedId: r });
|
|
1819
1819
|
}, V = ({ text: ne, superdoc: Be, suppressUpdate: xe }) => {
|
|
1820
|
-
if (M.value = ne, f.value =
|
|
1820
|
+
if (M.value = ne, f.value = Z(ne), xe) return;
|
|
1821
1821
|
const Me = {
|
|
1822
1822
|
type: Hs.UPDATE,
|
|
1823
1823
|
changes: [{ key: "text", value: ne }],
|
|
1824
1824
|
comment: se()
|
|
1825
1825
|
};
|
|
1826
1826
|
te(Be, Me);
|
|
1827
|
-
},
|
|
1827
|
+
}, Z = (ne) => {
|
|
1828
1828
|
const Me = [...new DOMParser().parseFromString(ne, "text/html").querySelectorAll('span[data-type="mention"]')], Xe = [];
|
|
1829
1829
|
return Me.forEach((at) => {
|
|
1830
1830
|
Xe.some((de) => {
|
|
@@ -1844,7 +1844,7 @@ function Yn(n) {
|
|
|
1844
1844
|
bottom: ne.bottom - xe
|
|
1845
1845
|
};
|
|
1846
1846
|
F.selectionBounds = Me;
|
|
1847
|
-
},
|
|
1847
|
+
}, $ = () => k.value ? { name: k.value.name || "(Imported)", email: k.value.email } : { name: S, email: b }, te = (ne, Be) => {
|
|
1848
1848
|
ne.emit("comments-update", Be), Jr(ne, Be);
|
|
1849
1849
|
}, se = () => ({
|
|
1850
1850
|
uid: t.value,
|
|
@@ -1902,13 +1902,13 @@ function Yn(n) {
|
|
|
1902
1902
|
setIsInternal: P,
|
|
1903
1903
|
setActive: K,
|
|
1904
1904
|
updatePosition: q,
|
|
1905
|
-
getCommentUser:
|
|
1905
|
+
getCommentUser: $
|
|
1906
1906
|
});
|
|
1907
1907
|
}
|
|
1908
1908
|
function _I(n, t) {
|
|
1909
1909
|
const i = n.id, r = T(n), A = n.data, c = t, g = n.state, u = n.role, I = n.html, f = W(null), Q = W([]), m = W(!1), b = W(t.rulers), S = Us(n.ydoc), w = Us(n.provider), k = Us(n.socket), M = W(n.isNewFile), F = Us(null), O = (q) => F.value = q, J = () => F.value;
|
|
1910
|
-
function T({ type: q, data:
|
|
1911
|
-
if (
|
|
1910
|
+
function T({ type: q, data: $ }) {
|
|
1911
|
+
if ($?.type) return $.type;
|
|
1912
1912
|
if (q) return q in Vo ? Vo[q] : null;
|
|
1913
1913
|
throw new Error("Document type not specified for doc:", n);
|
|
1914
1914
|
}
|
|
@@ -1950,8 +1950,8 @@ function _I(n, t) {
|
|
|
1950
1950
|
removeComments: H,
|
|
1951
1951
|
restoreComments: U,
|
|
1952
1952
|
removeConversation: (q) => {
|
|
1953
|
-
const
|
|
1954
|
-
|
|
1953
|
+
const $ = L.value.findIndex((te) => te.conversationId === q);
|
|
1954
|
+
$ > -1 && L.value.splice($, 1);
|
|
1955
1955
|
}
|
|
1956
1956
|
};
|
|
1957
1957
|
}
|
|
@@ -2037,7 +2037,7 @@ const Ri = /* @__PURE__ */ JA("superdoc", () => {
|
|
|
2037
2037
|
getPageBounds: (D, G) => {
|
|
2038
2038
|
const R = A[D];
|
|
2039
2039
|
if (!R) return;
|
|
2040
|
-
const L = R.find((
|
|
2040
|
+
const L = R.find((Z) => Z.page == G);
|
|
2041
2041
|
if (!L || !L.container) return;
|
|
2042
2042
|
const P = L.container.getBoundingClientRect(), { height: K } = P;
|
|
2043
2043
|
return {
|
|
@@ -2059,7 +2059,7 @@ const Ri = /* @__PURE__ */ JA("superdoc", () => {
|
|
|
2059
2059
|
return f.value = null;
|
|
2060
2060
|
const ce = K(he);
|
|
2061
2061
|
ce && (f.value = ce.commentId);
|
|
2062
|
-
},
|
|
2062
|
+
}, Z = ({ superdoc: he, params: ce }) => {
|
|
2063
2063
|
const {
|
|
2064
2064
|
event: De,
|
|
2065
2065
|
changeId: Te,
|
|
@@ -2104,7 +2104,7 @@ const Ri = /* @__PURE__ */ JA("superdoc", () => {
|
|
|
2104
2104
|
r[he] && clearTimeout(r[he]), r[he] = setTimeout(() => {
|
|
2105
2105
|
De && (console.debug("[debounceEmit] tracked change update emitting...", ce), De.emit("comments-update", ce)), delete r[he];
|
|
2106
2106
|
}, Te);
|
|
2107
|
-
},
|
|
2107
|
+
}, $ = (he) => {
|
|
2108
2108
|
const ce = { type: A.PENDING };
|
|
2109
2109
|
console.debug("[showAddComment] emitting...", ce), he.emit("comments-update", ce);
|
|
2110
2110
|
const De = { ...n.activeSelection };
|
|
@@ -2299,7 +2299,7 @@ const Ri = /* @__PURE__ */ JA("superdoc", () => {
|
|
|
2299
2299
|
hasOverlapId: se,
|
|
2300
2300
|
checkOverlaps: Me,
|
|
2301
2301
|
getPendingComment: Xe,
|
|
2302
|
-
showAddComment:
|
|
2302
|
+
showAddComment: $,
|
|
2303
2303
|
addComment: de,
|
|
2304
2304
|
cancelComment: ue,
|
|
2305
2305
|
deleteComment: z,
|
|
@@ -2307,7 +2307,7 @@ const Ri = /* @__PURE__ */ JA("superdoc", () => {
|
|
|
2307
2307
|
processLoadedDocxComments: X,
|
|
2308
2308
|
translateCommentsForExport: Qe,
|
|
2309
2309
|
handleEditorLocationsUpdate: Se,
|
|
2310
|
-
handleTrackedChangeUpdate:
|
|
2310
|
+
handleTrackedChangeUpdate: Z
|
|
2311
2311
|
};
|
|
2312
2312
|
});
|
|
2313
2313
|
function qI(n) {
|
|
@@ -3129,16 +3129,16 @@ function G0() {
|
|
|
3129
3129
|
if (L === 2)
|
|
3130
3130
|
return;
|
|
3131
3131
|
const V = L === 1 ? "capture" : "bubble";
|
|
3132
|
-
let
|
|
3132
|
+
let Z = K;
|
|
3133
3133
|
const q = [];
|
|
3134
|
-
for (;
|
|
3135
|
-
|
|
3136
|
-
const
|
|
3134
|
+
for (; Z === null && (Z = window), q.push(Z), Z !== window; )
|
|
3135
|
+
Z = Z.parentNode || null;
|
|
3136
|
+
const $ = Q.capture[R], te = Q.bubble[R];
|
|
3137
3137
|
if (A(G, "stopPropagation", i), A(G, "stopImmediatePropagation", r), f(G, I), V === "capture") {
|
|
3138
|
-
if (
|
|
3138
|
+
if ($ === void 0)
|
|
3139
3139
|
return;
|
|
3140
3140
|
for (let se = q.length - 1; se >= 0 && !n.has(G); --se) {
|
|
3141
|
-
const ne = q[se], Be =
|
|
3141
|
+
const ne = q[se], Be = $.get(ne);
|
|
3142
3142
|
if (Be !== void 0) {
|
|
3143
3143
|
g.set(G, ne);
|
|
3144
3144
|
for (const xe of Be) {
|
|
@@ -3213,25 +3213,25 @@ function G0() {
|
|
|
3213
3213
|
}
|
|
3214
3214
|
function H(D, G, R, L) {
|
|
3215
3215
|
let P;
|
|
3216
|
-
if (typeof L == "object" && L.once === !0 ? P = (
|
|
3217
|
-
U(D, G, P, L), R(
|
|
3216
|
+
if (typeof L == "object" && L.once === !0 ? P = ($) => {
|
|
3217
|
+
U(D, G, P, L), R($);
|
|
3218
3218
|
} : P = R, M0(D, G, P, L))
|
|
3219
3219
|
return;
|
|
3220
|
-
const V = L === !0 || typeof L == "object" && L.capture === !0 ? "capture" : "bubble",
|
|
3220
|
+
const V = L === !0 || typeof L == "object" && L.capture === !0 ? "capture" : "bubble", Z = M(V, D), q = O(Z, G);
|
|
3221
3221
|
if (q.has(P) || q.add(P), G === window) {
|
|
3222
|
-
const
|
|
3223
|
-
|
|
3222
|
+
const $ = F(D);
|
|
3223
|
+
$.has(P) || $.add(P);
|
|
3224
3224
|
}
|
|
3225
3225
|
}
|
|
3226
3226
|
function U(D, G, R, L) {
|
|
3227
3227
|
if (L0(D, G, R, L))
|
|
3228
3228
|
return;
|
|
3229
|
-
const K = L === !0 || typeof L == "object" && L.capture === !0, V = K ? "capture" : "bubble",
|
|
3229
|
+
const K = L === !0 || typeof L == "object" && L.capture === !0, V = K ? "capture" : "bubble", Z = M(V, D), q = O(Z, G);
|
|
3230
3230
|
if (G === window && !J(G, K ? "bubble" : "capture", D, R) && T(D, R)) {
|
|
3231
3231
|
const te = m[D];
|
|
3232
3232
|
te.delete(R), te.size === 0 && (window.removeEventListener(D, k), m[D] = void 0);
|
|
3233
3233
|
}
|
|
3234
|
-
q.has(R) && q.delete(R), q.size === 0 &&
|
|
3234
|
+
q.has(R) && q.delete(R), q.size === 0 && Z.delete(G), Z.size === 0 && (window.removeEventListener(D, w, V === "capture"), Q[V][D] = void 0);
|
|
3235
3235
|
}
|
|
3236
3236
|
return {
|
|
3237
3237
|
on: H,
|
|
@@ -4089,8 +4089,8 @@ const gC = Sr([
|
|
|
4089
4089
|
b.setAttribute("v-placement", T), M ? b.setAttribute("v-overlap", "") : b.removeAttribute("v-overlap");
|
|
4090
4090
|
const { style: D } = b;
|
|
4091
4091
|
O === "target" ? D.width = `${F.width}px` : O !== void 0 ? D.width = O : D.width = "", J === "target" ? D.minWidth = `${F.width}px` : J !== void 0 ? D.minWidth = J : D.minWidth = "";
|
|
4092
|
-
const G = _a(b), R = _a(A.value), { left: L, top: P, placement: K } = oC(T, F, G, H, U, M), V = cC(K, M), { left:
|
|
4093
|
-
b.setAttribute("v-placement", K), b.style.setProperty("--v-offset-left", `${Math.round(L)}px`), b.style.setProperty("--v-offset-top", `${Math.round(P)}px`), b.style.transform = `translateX(${
|
|
4092
|
+
const G = _a(b), R = _a(A.value), { left: L, top: P, placement: K } = oC(T, F, G, H, U, M), V = cC(K, M), { left: Z, top: q, transform: $ } = lC(K, R, F, P, L, M);
|
|
4093
|
+
b.setAttribute("v-placement", K), b.style.setProperty("--v-offset-left", `${Math.round(L)}px`), b.style.setProperty("--v-offset-top", `${Math.round(P)}px`), b.style.transform = `translateX(${Z}) translateY(${q}) ${$}`, b.style.setProperty("--v-transform-origin", V), b.style.transformOrigin = V;
|
|
4094
4094
|
};
|
|
4095
4095
|
wt(i, (b) => {
|
|
4096
4096
|
b ? (c(), f()) : g();
|
|
@@ -6459,7 +6459,7 @@ const VE = {
|
|
|
6459
6459
|
mergedRtlRef: r
|
|
6460
6460
|
} = ys(n), A = ph("Scrollbar", r, t), c = W(null), g = W(null), u = W(null), I = W(null), f = W(null), Q = W(null), m = W(null), b = W(null), S = W(null), w = W(null), k = W(null), M = W(0), F = W(0), O = W(!1), J = W(!1);
|
|
6461
6461
|
let T = !1, H = !1, U, D, G = 0, R = 0, L = 0, P = 0;
|
|
6462
|
-
const K = Y0(), V = ai("Scrollbar", "-scrollbar", zE, VE, n, t),
|
|
6462
|
+
const K = Y0(), V = ai("Scrollbar", "-scrollbar", zE, VE, n, t), Z = ae(() => {
|
|
6463
6463
|
const {
|
|
6464
6464
|
value: le
|
|
6465
6465
|
} = b, {
|
|
@@ -6468,7 +6468,7 @@ const VE = {
|
|
|
6468
6468
|
value: be
|
|
6469
6469
|
} = w;
|
|
6470
6470
|
return le === null || pe === null || be === null ? 0 : Math.min(le, be * le / pe + cc(V.value.self.width) * 1.5);
|
|
6471
|
-
}), q = ae(() => `${
|
|
6471
|
+
}), q = ae(() => `${Z.value}px`), $ = ae(() => {
|
|
6472
6472
|
const {
|
|
6473
6473
|
value: le
|
|
6474
6474
|
} = S, {
|
|
@@ -6477,7 +6477,7 @@ const VE = {
|
|
|
6477
6477
|
value: be
|
|
6478
6478
|
} = k;
|
|
6479
6479
|
return le === null || pe === null || be === null ? 0 : be * le / pe + cc(V.value.self.height) * 1.5;
|
|
6480
|
-
}), te = ae(() => `${
|
|
6480
|
+
}), te = ae(() => `${$.value}px`), se = ae(() => {
|
|
6481
6481
|
const {
|
|
6482
6482
|
value: le
|
|
6483
6483
|
} = b, {
|
|
@@ -6491,7 +6491,7 @@ const VE = {
|
|
|
6491
6491
|
return 0;
|
|
6492
6492
|
{
|
|
6493
6493
|
const lt = be - le;
|
|
6494
|
-
return lt ? pe / lt * (nt -
|
|
6494
|
+
return lt ? pe / lt * (nt - Z.value) : 0;
|
|
6495
6495
|
}
|
|
6496
6496
|
}), ne = ae(() => `${se.value}px`), Be = ae(() => {
|
|
6497
6497
|
const {
|
|
@@ -6507,7 +6507,7 @@ const VE = {
|
|
|
6507
6507
|
return 0;
|
|
6508
6508
|
{
|
|
6509
6509
|
const lt = be - le;
|
|
6510
|
-
return lt ? pe / lt * (nt -
|
|
6510
|
+
return lt ? pe / lt * (nt - $.value) : 0;
|
|
6511
6511
|
}
|
|
6512
6512
|
}), xe = ae(() => `${Be.value}px`), Me = ae(() => {
|
|
6513
6513
|
const {
|
|
@@ -6557,9 +6557,9 @@ const VE = {
|
|
|
6557
6557
|
position: Wt,
|
|
6558
6558
|
behavior: rt,
|
|
6559
6559
|
el: Ht,
|
|
6560
|
-
debounce:
|
|
6560
|
+
debounce: ee = !0
|
|
6561
6561
|
} = le;
|
|
6562
|
-
(be !== void 0 || nt !== void 0) && _e(be ?? 0, nt ?? 0, 0, !1, rt), Ht !== void 0 ? _e(0, Ht.offsetTop, Ht.offsetHeight,
|
|
6562
|
+
(be !== void 0 || nt !== void 0) && _e(be ?? 0, nt ?? 0, 0, !1, rt), Ht !== void 0 ? _e(0, Ht.offsetTop, Ht.offsetHeight, ee, rt) : lt !== void 0 && vt !== void 0 ? _e(0, lt * vt, vt, ee, rt) : Wt === "bottom" ? _e(0, Number.MAX_SAFE_INTEGER, 0, !1, rt) : Wt === "top" && _e(0, 0, 0, !1, rt);
|
|
6563
6563
|
}, X = j0(() => {
|
|
6564
6564
|
n.container || ue({
|
|
6565
6565
|
top: M.value,
|
|
@@ -6690,7 +6690,7 @@ const VE = {
|
|
|
6690
6690
|
value: be
|
|
6691
6691
|
} = m, {
|
|
6692
6692
|
value: nt
|
|
6693
|
-
} =
|
|
6693
|
+
} = $;
|
|
6694
6694
|
if (pe === null || be === null) return;
|
|
6695
6695
|
const vt = (A?.value ? window.innerWidth - le.clientX - L : le.clientX - L) * (be - pe) / (pe - nt), Wt = be - pe;
|
|
6696
6696
|
let rt = R + vt;
|
|
@@ -6701,9 +6701,9 @@ const VE = {
|
|
|
6701
6701
|
if (Ht) {
|
|
6702
6702
|
Ht.scrollLeft = rt * (A?.value ? -1 : 1);
|
|
6703
6703
|
const {
|
|
6704
|
-
internalOnUpdateScrollLeft:
|
|
6704
|
+
internalOnUpdateScrollLeft: ee
|
|
6705
6705
|
} = n;
|
|
6706
|
-
|
|
6706
|
+
ee && ee(rt);
|
|
6707
6707
|
}
|
|
6708
6708
|
}
|
|
6709
6709
|
function Lt(le) {
|
|
@@ -6721,7 +6721,7 @@ const VE = {
|
|
|
6721
6721
|
value: be
|
|
6722
6722
|
} = Q, {
|
|
6723
6723
|
value: nt
|
|
6724
|
-
} =
|
|
6724
|
+
} = Z;
|
|
6725
6725
|
if (pe === null || be === null) return;
|
|
6726
6726
|
const vt = (le.clientY - P) * (be - pe) / (pe - nt), Wt = be - pe;
|
|
6727
6727
|
let rt = G + vt;
|
|
@@ -6766,7 +6766,7 @@ const VE = {
|
|
|
6766
6766
|
railInsetHorizontalTop: Wt,
|
|
6767
6767
|
railInsetHorizontalBottom: rt,
|
|
6768
6768
|
railInsetVerticalRight: Ht,
|
|
6769
|
-
railInsetVerticalLeft:
|
|
6769
|
+
railInsetVerticalLeft: ee,
|
|
6770
6770
|
railColor: me
|
|
6771
6771
|
}
|
|
6772
6772
|
} = V.value, {
|
|
@@ -6789,7 +6789,7 @@ const VE = {
|
|
|
6789
6789
|
right: wa,
|
|
6790
6790
|
bottom: hr,
|
|
6791
6791
|
left: ei
|
|
6792
|
-
} = Os(A?.value ? kc(
|
|
6792
|
+
} = Os(A?.value ? kc(ee) : ee);
|
|
6793
6793
|
return {
|
|
6794
6794
|
"--n-scrollbar-bezier": le,
|
|
6795
6795
|
"--n-scrollbar-color": pe,
|
|
@@ -7650,9 +7650,9 @@ const Fp = Ct({
|
|
|
7650
7650
|
spaceArrow: P,
|
|
7651
7651
|
padding: K,
|
|
7652
7652
|
fontSize: V,
|
|
7653
|
-
textColor:
|
|
7653
|
+
textColor: Z,
|
|
7654
7654
|
dividerColor: q,
|
|
7655
|
-
color:
|
|
7655
|
+
color: $,
|
|
7656
7656
|
boxShadow: te,
|
|
7657
7657
|
borderRadius: se,
|
|
7658
7658
|
arrowHeight: ne,
|
|
@@ -7666,8 +7666,8 @@ const Fp = Ct({
|
|
|
7666
7666
|
"--n-bezier-ease-in": G,
|
|
7667
7667
|
"--n-bezier-ease-out": R,
|
|
7668
7668
|
"--n-font-size": V,
|
|
7669
|
-
"--n-text-color":
|
|
7670
|
-
"--n-color":
|
|
7669
|
+
"--n-text-color": Z,
|
|
7670
|
+
"--n-color": $,
|
|
7671
7671
|
"--n-divider-color": q,
|
|
7672
7672
|
"--n-border-radius": se,
|
|
7673
7673
|
"--n-arrow-height": ne,
|
|
@@ -7742,8 +7742,8 @@ const Fp = Ct({
|
|
|
7742
7742
|
value: P
|
|
7743
7743
|
} = I.extraClassRef, {
|
|
7744
7744
|
internalTrapFocus: K
|
|
7745
|
-
} = n, V = !Rc(t.header) || !Rc(t.footer),
|
|
7746
|
-
var q,
|
|
7745
|
+
} = n, V = !Rc(t.header) || !Rc(t.footer), Z = () => {
|
|
7746
|
+
var q, $;
|
|
7747
7747
|
const te = V ? re(jt, null, qr(t.header, (Be) => Be ? re("div", {
|
|
7748
7748
|
class: [`${L}-popover__header`, n.headerClass],
|
|
7749
7749
|
style: n.headerStyle
|
|
@@ -7757,7 +7757,7 @@ const Fp = Ct({
|
|
|
7757
7757
|
class: [`${L}-popover__content`, n.contentClass],
|
|
7758
7758
|
style: n.contentStyle
|
|
7759
7759
|
}, t), se = n.scrollable ? re(wh, {
|
|
7760
|
-
contentClass: V ? void 0 : `${L}-popover__content ${(
|
|
7760
|
+
contentClass: V ? void 0 : `${L}-popover__content ${($ = n.contentClass) !== null && $ !== void 0 ? $ : ""}`,
|
|
7761
7761
|
contentStyle: V ? void 0 : n.contentStyle
|
|
7762
7762
|
}, {
|
|
7763
7763
|
default: () => te
|
|
@@ -7788,8 +7788,8 @@ const Fp = Ct({
|
|
|
7788
7788
|
active: n.show,
|
|
7789
7789
|
autoFocus: !0
|
|
7790
7790
|
}, {
|
|
7791
|
-
default:
|
|
7792
|
-
}) :
|
|
7791
|
+
default: Z
|
|
7792
|
+
}) : Z());
|
|
7793
7793
|
}
|
|
7794
7794
|
return ms(G, b.value);
|
|
7795
7795
|
}
|
|
@@ -7968,12 +7968,12 @@ const oo = {
|
|
|
7968
7968
|
const b = W(null), S = W(null), w = Ki(() => n.x !== void 0 && n.y !== void 0);
|
|
7969
7969
|
function k(q) {
|
|
7970
7970
|
const {
|
|
7971
|
-
"onUpdate:show":
|
|
7971
|
+
"onUpdate:show": $,
|
|
7972
7972
|
onUpdateShow: te,
|
|
7973
7973
|
onShow: se,
|
|
7974
7974
|
onHide: ne
|
|
7975
7975
|
} = n;
|
|
7976
|
-
A.value = q,
|
|
7976
|
+
A.value = q, $ && xi($, q), te && xi(te, q), q && se && xi(se, !0), q && ne && xi(ne, !1);
|
|
7977
7977
|
}
|
|
7978
7978
|
function M() {
|
|
7979
7979
|
m && m.syncPosition();
|
|
@@ -8008,32 +8008,32 @@ const oo = {
|
|
|
8008
8008
|
const q = u();
|
|
8009
8009
|
if (n.trigger === "hover" && !q) {
|
|
8010
8010
|
if (O(), b.value !== null || I()) return;
|
|
8011
|
-
const
|
|
8011
|
+
const $ = () => {
|
|
8012
8012
|
k(!0), b.value = null;
|
|
8013
8013
|
}, {
|
|
8014
8014
|
delay: te
|
|
8015
8015
|
} = n;
|
|
8016
|
-
te === 0 ?
|
|
8016
|
+
te === 0 ? $() : b.value = window.setTimeout($, te);
|
|
8017
8017
|
}
|
|
8018
8018
|
}
|
|
8019
8019
|
function U() {
|
|
8020
8020
|
const q = u();
|
|
8021
8021
|
if (n.trigger === "hover" && !q) {
|
|
8022
8022
|
if (F(), S.value !== null || !I()) return;
|
|
8023
|
-
const
|
|
8023
|
+
const $ = () => {
|
|
8024
8024
|
k(!1), S.value = null;
|
|
8025
8025
|
}, {
|
|
8026
8026
|
duration: te
|
|
8027
8027
|
} = n;
|
|
8028
|
-
te === 0 ?
|
|
8028
|
+
te === 0 ? $() : S.value = window.setTimeout($, te);
|
|
8029
8029
|
}
|
|
8030
8030
|
}
|
|
8031
8031
|
function D() {
|
|
8032
8032
|
U();
|
|
8033
8033
|
}
|
|
8034
8034
|
function G(q) {
|
|
8035
|
-
var
|
|
8036
|
-
I() && (n.trigger === "click" && (F(), O(), k(!1)), (
|
|
8035
|
+
var $;
|
|
8036
|
+
I() && (n.trigger === "click" && (F(), O(), k(!1)), ($ = n.onClickoutside) === null || $ === void 0 || $.call(n, q));
|
|
8037
8037
|
}
|
|
8038
8038
|
function R() {
|
|
8039
8039
|
if (n.trigger === "click" && !u()) {
|
|
@@ -8530,9 +8530,9 @@ const Tp = {
|
|
|
8530
8530
|
colorDisabled: P,
|
|
8531
8531
|
colorTableHeader: K,
|
|
8532
8532
|
colorTableHeaderModal: V,
|
|
8533
|
-
colorTableHeaderPopover:
|
|
8533
|
+
colorTableHeaderPopover: Z,
|
|
8534
8534
|
checkMarkColor: q,
|
|
8535
|
-
checkMarkColorDisabled:
|
|
8535
|
+
checkMarkColorDisabled: $,
|
|
8536
8536
|
border: te,
|
|
8537
8537
|
borderFocus: se,
|
|
8538
8538
|
borderDisabled: ne,
|
|
@@ -8566,13 +8566,13 @@ const Tp = {
|
|
|
8566
8566
|
"--n-color-checked": L,
|
|
8567
8567
|
"--n-color-table": K,
|
|
8568
8568
|
"--n-color-table-modal": V,
|
|
8569
|
-
"--n-color-table-popover":
|
|
8569
|
+
"--n-color-table-popover": Z,
|
|
8570
8570
|
"--n-color-disabled": P,
|
|
8571
8571
|
"--n-color-disabled-checked": Et,
|
|
8572
8572
|
"--n-text-color": Me,
|
|
8573
8573
|
"--n-text-color-disabled": Xe,
|
|
8574
8574
|
"--n-check-mark-color": q,
|
|
8575
|
-
"--n-check-mark-color-disabled":
|
|
8575
|
+
"--n-check-mark-color-disabled": $,
|
|
8576
8576
|
"--n-check-mark-color-disabled-checked": at,
|
|
8577
8577
|
"--n-font-size": Qe,
|
|
8578
8578
|
"--n-label-padding": z
|
|
@@ -9025,7 +9025,7 @@ const Nh = Ct({
|
|
|
9025
9025
|
} = n;
|
|
9026
9026
|
se.disabled || I.value && (A.value = te, r.value = null, i.value = se.key);
|
|
9027
9027
|
}
|
|
9028
|
-
function
|
|
9028
|
+
function Z() {
|
|
9029
9029
|
const {
|
|
9030
9030
|
tmNode: te
|
|
9031
9031
|
} = n;
|
|
@@ -9042,7 +9042,7 @@ const Nh = Ct({
|
|
|
9042
9042
|
target: se
|
|
9043
9043
|
}, "scrollbarRail") && (i.value = null);
|
|
9044
9044
|
}
|
|
9045
|
-
function
|
|
9045
|
+
function $() {
|
|
9046
9046
|
const {
|
|
9047
9047
|
value: te
|
|
9048
9048
|
} = T, {
|
|
@@ -9089,8 +9089,8 @@ const Nh = Ct({
|
|
|
9089
9089
|
mergedDisabled: H,
|
|
9090
9090
|
renderOption: S,
|
|
9091
9091
|
nodeProps: w,
|
|
9092
|
-
handleClick:
|
|
9093
|
-
handleMouseMove:
|
|
9092
|
+
handleClick: $,
|
|
9093
|
+
handleMouseMove: Z,
|
|
9094
9094
|
handleMouseEnter: V,
|
|
9095
9095
|
handleMouseLeave: q,
|
|
9096
9096
|
handleSubmenuBeforeEnter: P,
|
|
@@ -9505,22 +9505,22 @@ const Nh = Ct({
|
|
|
9505
9505
|
childrenField: V
|
|
9506
9506
|
} = n;
|
|
9507
9507
|
return bp(n.options, {
|
|
9508
|
-
getKey(
|
|
9509
|
-
return
|
|
9508
|
+
getKey(Z) {
|
|
9509
|
+
return Z[K];
|
|
9510
9510
|
},
|
|
9511
|
-
getDisabled(
|
|
9512
|
-
return
|
|
9511
|
+
getDisabled(Z) {
|
|
9512
|
+
return Z.disabled === !0;
|
|
9513
9513
|
},
|
|
9514
|
-
getIgnored(
|
|
9515
|
-
return
|
|
9514
|
+
getIgnored(Z) {
|
|
9515
|
+
return Z.type === "divider" || Z.type === "render";
|
|
9516
9516
|
},
|
|
9517
|
-
getChildren(
|
|
9518
|
-
return
|
|
9517
|
+
getChildren(Z) {
|
|
9518
|
+
return Z[V];
|
|
9519
9519
|
}
|
|
9520
9520
|
});
|
|
9521
9521
|
}), A = ae(() => r.value.treeNodes), c = W(null), g = W(null), u = W(null), I = ae(() => {
|
|
9522
|
-
var K, V,
|
|
9523
|
-
return (
|
|
9522
|
+
var K, V, Z;
|
|
9523
|
+
return (Z = (V = (K = c.value) !== null && K !== void 0 ? K : g.value) !== null && V !== void 0 ? V : u.value) !== null && Z !== void 0 ? Z : null;
|
|
9524
9524
|
}), f = ae(() => r.value.getPath(I.value).keyPath), Q = ae(() => r.value.getPath(n.value).keyPath), m = Ki(() => n.keyboard && i.value);
|
|
9525
9525
|
K0({
|
|
9526
9526
|
keydown: {
|
|
@@ -9573,16 +9573,16 @@ const Nh = Ct({
|
|
|
9573
9573
|
});
|
|
9574
9574
|
function k(K, V) {
|
|
9575
9575
|
const {
|
|
9576
|
-
onSelect:
|
|
9576
|
+
onSelect: Z
|
|
9577
9577
|
} = n;
|
|
9578
|
-
|
|
9578
|
+
Z && xi(Z, K, V);
|
|
9579
9579
|
}
|
|
9580
9580
|
function M(K) {
|
|
9581
9581
|
const {
|
|
9582
9582
|
"onUpdate:show": V,
|
|
9583
|
-
onUpdateShow:
|
|
9583
|
+
onUpdateShow: Z
|
|
9584
9584
|
} = n;
|
|
9585
|
-
V && xi(V, K),
|
|
9585
|
+
V && xi(V, K), Z && xi(Z, K), t.value = K;
|
|
9586
9586
|
}
|
|
9587
9587
|
function F() {
|
|
9588
9588
|
c.value = null, g.value = null, u.value = null;
|
|
@@ -9611,38 +9611,38 @@ const Nh = Ct({
|
|
|
9611
9611
|
const {
|
|
9612
9612
|
value: V
|
|
9613
9613
|
} = r, {
|
|
9614
|
-
value:
|
|
9614
|
+
value: Z
|
|
9615
9615
|
} = I;
|
|
9616
|
-
return !V ||
|
|
9616
|
+
return !V || Z === null ? null : (K = V.getNode(Z)) !== null && K !== void 0 ? K : null;
|
|
9617
9617
|
}
|
|
9618
9618
|
function R(K) {
|
|
9619
9619
|
const {
|
|
9620
9620
|
value: V
|
|
9621
9621
|
} = I, {
|
|
9622
9622
|
value: {
|
|
9623
|
-
getFirstAvailableNode:
|
|
9623
|
+
getFirstAvailableNode: Z
|
|
9624
9624
|
}
|
|
9625
9625
|
} = r;
|
|
9626
9626
|
let q = null;
|
|
9627
9627
|
if (V === null) {
|
|
9628
|
-
const
|
|
9629
|
-
|
|
9628
|
+
const $ = Z();
|
|
9629
|
+
$ !== null && (q = $.key);
|
|
9630
9630
|
} else {
|
|
9631
|
-
const
|
|
9632
|
-
if (
|
|
9631
|
+
const $ = G();
|
|
9632
|
+
if ($) {
|
|
9633
9633
|
let te;
|
|
9634
9634
|
switch (K) {
|
|
9635
9635
|
case "down":
|
|
9636
|
-
te =
|
|
9636
|
+
te = $.getNext();
|
|
9637
9637
|
break;
|
|
9638
9638
|
case "up":
|
|
9639
|
-
te =
|
|
9639
|
+
te = $.getPrev();
|
|
9640
9640
|
break;
|
|
9641
9641
|
case "right":
|
|
9642
|
-
te =
|
|
9642
|
+
te = $.getChild();
|
|
9643
9643
|
break;
|
|
9644
9644
|
case "left":
|
|
9645
|
-
te =
|
|
9645
|
+
te = $.getParent();
|
|
9646
9646
|
break;
|
|
9647
9647
|
}
|
|
9648
9648
|
te && (q = te.key);
|
|
@@ -9656,11 +9656,11 @@ const Nh = Ct({
|
|
|
9656
9656
|
inverted: V
|
|
9657
9657
|
} = n, {
|
|
9658
9658
|
common: {
|
|
9659
|
-
cubicBezierEaseInOut:
|
|
9659
|
+
cubicBezierEaseInOut: Z
|
|
9660
9660
|
},
|
|
9661
9661
|
self: q
|
|
9662
9662
|
} = w.value, {
|
|
9663
|
-
padding:
|
|
9663
|
+
padding: $,
|
|
9664
9664
|
dividerColor: te,
|
|
9665
9665
|
borderRadius: se,
|
|
9666
9666
|
optionOpacityDisabled: ne,
|
|
@@ -9672,9 +9672,9 @@ const Nh = Ct({
|
|
|
9672
9672
|
[Pi("optionHeight", K)]: Et,
|
|
9673
9673
|
[Pi("optionIconSize", K)]: de
|
|
9674
9674
|
} = q, z = {
|
|
9675
|
-
"--n-bezier":
|
|
9675
|
+
"--n-bezier": Z,
|
|
9676
9676
|
"--n-font-size": at,
|
|
9677
|
-
"--n-padding":
|
|
9677
|
+
"--n-padding": $,
|
|
9678
9678
|
"--n-border-radius": se,
|
|
9679
9679
|
"--n-option-height": Et,
|
|
9680
9680
|
"--n-option-prefix-width": Xe,
|
|
@@ -10307,7 +10307,7 @@ const RQ = { class: "card-section comment-header" }, NQ = { class: "comment-head
|
|
|
10307
10307
|
const Ee = Qe.parentCommentId === X.commentId, Se = Qe.commentId === r.comment.commentId;
|
|
10308
10308
|
return Ee || Se;
|
|
10309
10309
|
}).sort((Qe, Ee) => Qe.commentId === r.comment.commentId && Qe.createdTime - Ee.createdTime);
|
|
10310
|
-
}), V = ae(() => r.comment.resolvedTime ? !0 : b.value.readOnly),
|
|
10310
|
+
}), V = ae(() => r.comment.resolvedTime ? !0 : b.value.readOnly), Z = ae(() => (X) => O.value === X.commentId), q = ae(() => A.$superdoc.config.isInternal ? !m.value && !r.comment.trackedChange : !1), $ = ae(() => M.value && M.value !== "<p></p>"), te = () => {
|
|
10311
10311
|
r.comment.resolvedTime || (S.value = r.comment.commentId, r.comment.setActive(A.$superdoc));
|
|
10312
10312
|
}, se = (X) => {
|
|
10313
10313
|
X.target.classList.contains("n-dropdown-option-body__label") || X.target.classList.contains("sd-editor-comment-highlight") || (S.value === r.comment.commentId && (w.value = 0, i("dialog-exit")), S.value = null);
|
|
@@ -10421,11 +10421,11 @@ const RQ = { class: "card-section comment-header" }, NQ = { class: "comment-head
|
|
|
10421
10421
|
])
|
|
10422
10422
|
])) : Ze("", !0),
|
|
10423
10423
|
Se.trackedChange ? Ze("", !0) : (fe(), ye("div", em, [
|
|
10424
|
-
!Fe(F) &&
|
|
10424
|
+
!Fe(F) && !Z.value(Se) ? (fe(), ye("div", {
|
|
10425
10425
|
key: 0,
|
|
10426
10426
|
class: "comment",
|
|
10427
10427
|
innerHTML: Se.commentText
|
|
10428
|
-
}, null, 8, tm)) : Fe(F) &&
|
|
10428
|
+
}, null, 8, tm)) : Fe(F) && !Z.value(Se) ? (fe(), ye("div", im, yi(Fe(J)[Se.importedId !== void 0 ? Se.importedId : Se.commentId]?.bounds), 1)) : (fe(), ye("div", nm, [
|
|
10429
10429
|
bi(ul, {
|
|
10430
10430
|
users: ue.value,
|
|
10431
10431
|
config: Fe(b),
|
|
@@ -10460,9 +10460,9 @@ const RQ = { class: "card-section comment-header" }, NQ = { class: "comment-head
|
|
|
10460
10460
|
onClick: Qe[1] || (Qe[1] = Qi((...Se) => Fe(I) && Fe(I)(...Se), ["stop", "prevent"]))
|
|
10461
10461
|
}, "Cancel"),
|
|
10462
10462
|
We("button", {
|
|
10463
|
-
class: Xs(["sd-button primary", { disabled:
|
|
10463
|
+
class: Xs(["sd-button primary", { disabled: !$.value }]),
|
|
10464
10464
|
onClick: Qi(ne, ["stop", "prevent"]),
|
|
10465
|
-
disabled:
|
|
10465
|
+
disabled: !$.value
|
|
10466
10466
|
}, " Comment ", 10, lm)
|
|
10467
10467
|
])) : Ze("", !0)
|
|
10468
10468
|
])) : Ze("", !0)
|
|
@@ -10627,9 +10627,9 @@ var pm = {
|
|
|
10627
10627
|
if (L >= P && (!R || K))
|
|
10628
10628
|
V = O(D, 0, P);
|
|
10629
10629
|
else {
|
|
10630
|
-
var
|
|
10631
|
-
V = new b(P,
|
|
10632
|
-
for (var q = new S(D),
|
|
10630
|
+
var Z = R && !K && T ? { maxByteLength: T(D) } : void 0;
|
|
10631
|
+
V = new b(P, Z);
|
|
10632
|
+
for (var q = new S(D), $ = new S(V), te = k(P, L), se = 0; se < te; se++) U($, se, H(q, se));
|
|
10633
10633
|
}
|
|
10634
10634
|
return Q || f(D), V;
|
|
10635
10635
|
};
|
|
@@ -10639,7 +10639,7 @@ var pm = {
|
|
|
10639
10639
|
4644: (
|
|
10640
10640
|
/***/
|
|
10641
10641
|
(n, t, i) => {
|
|
10642
|
-
var r = i(7811), A = i(3724), c = i(4475), g = i(4901), u = i(34), I = i(9297), f = i(6955), Q = i(6823), m = i(6699), b = i(6840), S = i(2106), w = i(1625), k = i(2787), M = i(2967), F = i(8227), O = i(3392), J = i(1181), T = J.enforce, H = J.get, U = c.Int8Array, D = U && U.prototype, G = c.Uint8ClampedArray, R = G && G.prototype, L = U && k(U), P = D && k(D), K = Object.prototype, V = c.TypeError,
|
|
10642
|
+
var r = i(7811), A = i(3724), c = i(4475), g = i(4901), u = i(34), I = i(9297), f = i(6955), Q = i(6823), m = i(6699), b = i(6840), S = i(2106), w = i(1625), k = i(2787), M = i(2967), F = i(8227), O = i(3392), J = i(1181), T = J.enforce, H = J.get, U = c.Int8Array, D = U && U.prototype, G = c.Uint8ClampedArray, R = G && G.prototype, L = U && k(U), P = D && k(D), K = Object.prototype, V = c.TypeError, Z = F("toStringTag"), q = O("TYPED_ARRAY_TAG"), $ = "TypedArrayConstructor", te = r && !!M && f(c.opera) !== "Opera", se = !1, ne, Be, xe, Me = {
|
|
10643
10643
|
Int8Array: 1,
|
|
10644
10644
|
Uint8Array: 1,
|
|
10645
10645
|
Uint8ClampedArray: 1,
|
|
@@ -10660,7 +10660,7 @@ var pm = {
|
|
|
10660
10660
|
var Se = k(Ee);
|
|
10661
10661
|
if (u(Se)) {
|
|
10662
10662
|
var _e = H(Se);
|
|
10663
|
-
return _e && I(_e,
|
|
10663
|
+
return _e && I(_e, $) ? _e[$] : Et(Se);
|
|
10664
10664
|
}
|
|
10665
10665
|
}, de = function(Ee) {
|
|
10666
10666
|
if (!u(Ee)) return !1;
|
|
@@ -10710,9 +10710,9 @@ var pm = {
|
|
|
10710
10710
|
}
|
|
10711
10711
|
};
|
|
10712
10712
|
for (ne in Me)
|
|
10713
|
-
Be = c[ne], xe = Be && Be.prototype, xe ? T(xe)[
|
|
10713
|
+
Be = c[ne], xe = Be && Be.prototype, xe ? T(xe)[$] = Be : te = !1;
|
|
10714
10714
|
for (ne in Xe)
|
|
10715
|
-
Be = c[ne], xe = Be && Be.prototype, xe && (T(xe)[
|
|
10715
|
+
Be = c[ne], xe = Be && Be.prototype, xe && (T(xe)[$] = Be);
|
|
10716
10716
|
if ((!te || !g(L) || L === Function.prototype) && (L = function() {
|
|
10717
10717
|
throw new V("Incorrect invocation");
|
|
10718
10718
|
}, te))
|
|
@@ -10721,8 +10721,8 @@ var pm = {
|
|
|
10721
10721
|
if ((!te || !P || P === K) && (P = L.prototype, te))
|
|
10722
10722
|
for (ne in Me)
|
|
10723
10723
|
c[ne] && M(c[ne].prototype, P);
|
|
10724
|
-
if (te && k(R) !== P && M(R, P), A && !I(P,
|
|
10725
|
-
se = !0, S(P,
|
|
10724
|
+
if (te && k(R) !== P && M(R, P), A && !I(P, Z)) {
|
|
10725
|
+
se = !0, S(P, Z, {
|
|
10726
10726
|
configurable: !0,
|
|
10727
10727
|
get: function() {
|
|
10728
10728
|
return u(this) ? this[q] : void 0;
|
|
@@ -11618,10 +11618,10 @@ var pm = {
|
|
|
11618
11618
|
this.stopped = M, this.result = F;
|
|
11619
11619
|
}, k = w.prototype;
|
|
11620
11620
|
n.exports = function(M, F, O) {
|
|
11621
|
-
var J = O && O.that, T = !!(O && O.AS_ENTRIES), H = !!(O && O.IS_RECORD), U = !!(O && O.IS_ITERATOR), D = !!(O && O.INTERRUPTED), G = r(F, J), R, L, P, K, V,
|
|
11621
|
+
var J = O && O.that, T = !!(O && O.AS_ENTRIES), H = !!(O && O.IS_RECORD), U = !!(O && O.IS_ITERATOR), D = !!(O && O.INTERRUPTED), G = r(F, J), R, L, P, K, V, Z, q, $ = function(se) {
|
|
11622
11622
|
return R && b(R, "normal", se), new w(!0, se);
|
|
11623
11623
|
}, te = function(se) {
|
|
11624
|
-
return T ? (c(se), D ? G(se[0], se[1],
|
|
11624
|
+
return T ? (c(se), D ? G(se[0], se[1], $) : G(se[0], se[1])) : D ? G(se, $) : G(se);
|
|
11625
11625
|
};
|
|
11626
11626
|
if (H)
|
|
11627
11627
|
R = M.iterator;
|
|
@@ -11636,7 +11636,7 @@ var pm = {
|
|
|
11636
11636
|
}
|
|
11637
11637
|
R = Q(M, L);
|
|
11638
11638
|
}
|
|
11639
|
-
for (
|
|
11639
|
+
for (Z = H ? M.next : R.next; !(q = A(Z, R)).done; ) {
|
|
11640
11640
|
try {
|
|
11641
11641
|
V = te(q.value);
|
|
11642
11642
|
} catch (se) {
|
|
@@ -12828,9 +12828,9 @@ var pm = {
|
|
|
12828
12828
|
8335: (
|
|
12829
12829
|
/***/
|
|
12830
12830
|
(n, t, i) => {
|
|
12831
|
-
var r = i(6518), A = i(3724), c = i(4475), g = i(7751), u = i(9504), I = i(9565), f = i(4901), Q = i(34), m = i(4376), b = i(9297), S = i(655), w = i(6198), k = i(4659), M = i(9039), F = i(8235), O = i(4495), J = c.JSON, T = c.Number, H = c.SyntaxError, U = J && J.parse, D = g("Object", "keys"), G = Object.getOwnPropertyDescriptor, R = u("".charAt), L = u("".slice), P = u(/./.exec), K = u([].push), V = /^\d$/,
|
|
12831
|
+
var r = i(6518), A = i(3724), c = i(4475), g = i(7751), u = i(9504), I = i(9565), f = i(4901), Q = i(34), m = i(4376), b = i(9297), S = i(655), w = i(6198), k = i(4659), M = i(9039), F = i(8235), O = i(4495), J = c.JSON, T = c.Number, H = c.SyntaxError, U = J && J.parse, D = g("Object", "keys"), G = Object.getOwnPropertyDescriptor, R = u("".charAt), L = u("".slice), P = u(/./.exec), K = u([].push), V = /^\d$/, Z = /^[1-9]$/, q = /^(?:-|\d)$/, $ = /^[\t\n\r ]$/, te = 0, se = 1, ne = function(de, z) {
|
|
12832
12832
|
de = S(de);
|
|
12833
|
-
var ue = new Xe(de, 0), X = ue.parse(), Qe = X.value, Ee = ue.skip(
|
|
12833
|
+
var ue = new Xe(de, 0), X = ue.parse(), Qe = X.value, Ee = ue.skip($, X.end);
|
|
12834
12834
|
if (Ee < de.length)
|
|
12835
12835
|
throw new H('Unexpected extra character: "' + R(de, Ee) + '" after the parsed data at: ' + Ee);
|
|
12836
12836
|
return f(z) ? Be({ "": Qe }, "", z, X) : Qe;
|
|
@@ -12862,7 +12862,7 @@ var pm = {
|
|
|
12862
12862
|
return new Xe(this.source, de);
|
|
12863
12863
|
},
|
|
12864
12864
|
parse: function() {
|
|
12865
|
-
var de = this.source, z = this.skip(
|
|
12865
|
+
var de = this.source, z = this.skip($, this.index), ue = this.fork(z), X = R(de, z);
|
|
12866
12866
|
if (P(q, X)) return ue.number();
|
|
12867
12867
|
switch (X) {
|
|
12868
12868
|
case "{":
|
|
@@ -12890,7 +12890,7 @@ var pm = {
|
|
|
12890
12890
|
break;
|
|
12891
12891
|
}
|
|
12892
12892
|
var Ee = this.fork(z).string(), Se = Ee.value;
|
|
12893
|
-
z = Ee.end, z = this.until([":"], z) + 1, z = this.skip(
|
|
12893
|
+
z = Ee.end, z = this.until([":"], z) + 1, z = this.skip($, z), Ee = this.fork(z).parse(), k(Qe, Se, Ee), k(X, Se, Ee.value), z = this.until([",", "}"], Ee.end);
|
|
12894
12894
|
var _e = R(de, z);
|
|
12895
12895
|
if (_e === ",")
|
|
12896
12896
|
ue = !0, z++;
|
|
@@ -12903,7 +12903,7 @@ var pm = {
|
|
|
12903
12903
|
},
|
|
12904
12904
|
array: function() {
|
|
12905
12905
|
for (var de = this.source, z = this.index + 1, ue = !1, X = [], Qe = []; z < de.length; ) {
|
|
12906
|
-
if (z = this.skip(
|
|
12906
|
+
if (z = this.skip($, z), R(de, z) === "]" && !ue) {
|
|
12907
12907
|
z++;
|
|
12908
12908
|
break;
|
|
12909
12909
|
}
|
|
@@ -12924,7 +12924,7 @@ var pm = {
|
|
|
12924
12924
|
number: function() {
|
|
12925
12925
|
var de = this.source, z = this.index, ue = z;
|
|
12926
12926
|
if (R(de, ue) === "-" && ue++, R(de, ue) === "0") ue++;
|
|
12927
|
-
else if (P(
|
|
12927
|
+
else if (P(Z, R(de, ue))) ue = this.skip(V, ++ue);
|
|
12928
12928
|
else throw new H("Failed to parse number at: " + ue);
|
|
12929
12929
|
if (R(de, ue) === "." && (ue = this.skip(V, ++ue)), R(de, ue) === "e" || R(de, ue) === "E") {
|
|
12930
12930
|
ue++, (R(de, ue) === "+" || R(de, ue) === "-") && ue++;
|
|
@@ -12943,7 +12943,7 @@ var pm = {
|
|
|
12943
12943
|
return z;
|
|
12944
12944
|
},
|
|
12945
12945
|
until: function(de, z) {
|
|
12946
|
-
z = this.skip(
|
|
12946
|
+
z = this.skip($, z);
|
|
12947
12947
|
for (var ue = R(this.source, z), X = 0; X < de.length; X++) if (de[X] === ue) return z;
|
|
12948
12948
|
throw new H('Unexpected character: "' + ue + '" at: ' + z);
|
|
12949
12949
|
}
|
|
@@ -13018,7 +13018,7 @@ var pm = {
|
|
|
13018
13018
|
(n, t, i) => {
|
|
13019
13019
|
var r = i(6518), A = i(4475), c = i(7751), g = i(6980), u = i(4913).f, I = i(9297), f = i(679), Q = i(3167), m = i(2603), b = i(5002), S = i(6193), w = i(3724), k = i(6395), M = "DOMException", F = c("Error"), O = c(M), J = function() {
|
|
13020
13020
|
f(this, T);
|
|
13021
|
-
var
|
|
13021
|
+
var $ = arguments.length, te = m($ < 1 ? void 0 : arguments[0]), se = m($ < 2 ? void 0 : arguments[1], "Error"), ne = new O(te, se), Be = new F(te);
|
|
13022
13022
|
return Be.name = M, u(ne, "stack", g(1, S(Be.stack, 1))), Q(ne, this, J), ne;
|
|
13023
13023
|
}, T = J.prototype = O.prototype, H = "stack" in new F(M), U = "stack" in new O(1, 2), D = O && w && Object.getOwnPropertyDescriptor(A, M), G = !!D && !(D.writable && D.configurable), R = H && !G && !U;
|
|
13024
13024
|
r({ global: !0, constructor: !0, forced: k || R }, {
|
|
@@ -13029,8 +13029,8 @@ var pm = {
|
|
|
13029
13029
|
if (P.constructor !== L) {
|
|
13030
13030
|
k || u(P, "constructor", g(1, L));
|
|
13031
13031
|
for (var K in b) if (I(b, K)) {
|
|
13032
|
-
var V = b[K],
|
|
13033
|
-
I(L,
|
|
13032
|
+
var V = b[K], Z = V.s;
|
|
13033
|
+
I(L, Z) || u(L, Z, g(6, V.c));
|
|
13034
13034
|
}
|
|
13035
13035
|
}
|
|
13036
13036
|
}
|
|
@@ -13170,7 +13170,7 @@ var Ue = globalThis.pdfjsLib = {};
|
|
|
13170
13170
|
),
|
|
13171
13171
|
InvalidPDFException: () => (
|
|
13172
13172
|
/* reexport */
|
|
13173
|
-
|
|
13173
|
+
$
|
|
13174
13174
|
),
|
|
13175
13175
|
MissingPDFException: () => (
|
|
13176
13176
|
/* reexport */
|
|
@@ -13537,7 +13537,7 @@ var Ue = globalThis.pdfjsLib = {};
|
|
|
13537
13537
|
}
|
|
13538
13538
|
return e.prototype = new Error(), e.constructor = e, e;
|
|
13539
13539
|
}();
|
|
13540
|
-
class
|
|
13540
|
+
class Z extends V {
|
|
13541
13541
|
constructor(e, s) {
|
|
13542
13542
|
super(e, "PasswordException"), this.code = s;
|
|
13543
13543
|
}
|
|
@@ -13547,7 +13547,7 @@ var Ue = globalThis.pdfjsLib = {};
|
|
|
13547
13547
|
super(e, "UnknownErrorException"), this.details = s;
|
|
13548
13548
|
}
|
|
13549
13549
|
}
|
|
13550
|
-
class
|
|
13550
|
+
class $ extends V {
|
|
13551
13551
|
constructor(e) {
|
|
13552
13552
|
super(e, "InvalidPDFException");
|
|
13553
13553
|
}
|
|
@@ -14285,7 +14285,7 @@ var Ue = globalThis.pdfjsLib = {};
|
|
|
14285
14285
|
}
|
|
14286
14286
|
e.remove();
|
|
14287
14287
|
}
|
|
14288
|
-
function
|
|
14288
|
+
function ee(p) {
|
|
14289
14289
|
const {
|
|
14290
14290
|
a: e,
|
|
14291
14291
|
b: s,
|
|
@@ -16896,7 +16896,7 @@ var Ue = globalThis.pdfjsLib = {};
|
|
|
16896
16896
|
getPattern(e, s, a, o) {
|
|
16897
16897
|
let l;
|
|
16898
16898
|
if (o === Vt.STROKE || o === Vt.FILL) {
|
|
16899
|
-
const h = s.current.getClippedPathBoundingBox(o,
|
|
16899
|
+
const h = s.current.getClippedPathBoundingBox(o, ee(e)) || [0, 0, 0, 0], d = Math.ceil(h[2] - h[0]) || 1, C = Math.ceil(h[3] - h[1]) || 1, E = s.cachedCanvases.getCanvas("pattern", d, C, !0), B = E.context;
|
|
16900
16900
|
B.clearRect(0, 0, B.canvas.width, B.canvas.height), B.beginPath(), B.rect(0, 0, B.canvas.width, B.canvas.height), B.translate(-h[0], -h[1]), a = X.transform(a, [1, 0, 0, 1, h[0], h[1]]), B.transform(...s.baseTransform), this.matrix && B.transform(...this.matrix), ka(B, this._bbox), B.fillStyle = this._createGradient(B), B.fill(), l = e.createPattern(E.canvas, "no-repeat");
|
|
16901
16901
|
const y = new DOMMatrix(a);
|
|
16902
16902
|
l.setTransform(y);
|
|
@@ -16982,7 +16982,7 @@ var Ue = globalThis.pdfjsLib = {};
|
|
|
16982
16982
|
ka(e, this._bbox);
|
|
16983
16983
|
let l;
|
|
16984
16984
|
if (o === Vt.SHADING)
|
|
16985
|
-
l = X.singularValueDecompose2dScale(
|
|
16985
|
+
l = X.singularValueDecompose2dScale(ee(e));
|
|
16986
16986
|
else if (l = X.singularValueDecompose2dScale(s.baseTransform), this.matrix) {
|
|
16987
16987
|
const d = X.singularValueDecompose2dScale(this.matrix);
|
|
16988
16988
|
l = [l[0] * d[0], l[1] * d[1]];
|
|
@@ -17022,7 +17022,7 @@ var Ue = globalThis.pdfjsLib = {};
|
|
|
17022
17022
|
const B = a[0], y = a[1], v = a[2], N = a[3], x = X.singularValueDecompose2dScale(this.matrix), _ = X.singularValueDecompose2dScale(this.baseTransform), j = [x[0] * _[0], x[1] * _[1]], Y = this.getSizeAndScale(o, this.ctx.canvas.width, j[0]), ie = this.getSizeAndScale(l, this.ctx.canvas.height, j[1]), oe = e.cachedCanvases.getCanvas("pattern", Y.size, ie.size, !0), Ae = oe.context, Ce = E.createCanvasGraphics(Ae);
|
|
17023
17023
|
Ce.groupLevel = e.groupLevel, this.setFillAndStrokeStyleToContext(Ce, h, C);
|
|
17024
17024
|
let Ie = B, we = y, Oe = v, He = N;
|
|
17025
|
-
return B < 0 && (Ie = 0, Oe += Math.abs(B)), y < 0 && (we = 0, He += Math.abs(y)), Ae.translate(-(Y.scale * Ie), -(ie.scale * we)), Ce.transform(Y.scale, 0, 0, ie.scale, 0, 0), Ae.save(), this.clipBbox(Ce, Ie, we, Oe, He), Ce.baseTransform =
|
|
17025
|
+
return B < 0 && (Ie = 0, Oe += Math.abs(B)), y < 0 && (we = 0, He += Math.abs(y)), Ae.translate(-(Y.scale * Ie), -(ie.scale * we)), Ce.transform(Y.scale, 0, 0, ie.scale, 0, 0), Ae.save(), this.clipBbox(Ce, Ie, we, Oe, He), Ce.baseTransform = ee(Ce.ctx), Ce.executeOperatorList(s), Ce.endDrawing(), {
|
|
17026
17026
|
canvas: oe.canvas,
|
|
17027
17027
|
scaleX: Y.scale,
|
|
17028
17028
|
scaleY: ie.scale,
|
|
@@ -17041,7 +17041,7 @@ var Ue = globalThis.pdfjsLib = {};
|
|
|
17041
17041
|
}
|
|
17042
17042
|
clipBbox(e, s, a, o, l) {
|
|
17043
17043
|
const h = o - s, d = l - a;
|
|
17044
|
-
e.ctx.rect(s, a, h, d), e.current.updateRectMinMax(
|
|
17044
|
+
e.ctx.rect(s, a, h, d), e.current.updateRectMinMax(ee(e.ctx), [s, a, o, l]), e.clip(), e.endPath();
|
|
17045
17045
|
}
|
|
17046
17046
|
setFillAndStrokeStyleToContext(e, s, a) {
|
|
17047
17047
|
const o = e.ctx, l = e.current;
|
|
@@ -17153,7 +17153,7 @@ var Ue = globalThis.pdfjsLib = {};
|
|
|
17153
17153
|
}
|
|
17154
17154
|
}
|
|
17155
17155
|
function ur(p, e, s, a, o, l, h, d, C, E) {
|
|
17156
|
-
const [B, y, v, N, x, _] =
|
|
17156
|
+
const [B, y, v, N, x, _] = ee(p);
|
|
17157
17157
|
if (y === 0 && v === 0) {
|
|
17158
17158
|
const ie = h * B + x, oe = Math.round(ie), Ae = d * N + _, Ce = Math.round(Ae), Ie = (h + C) * B + x, we = Math.abs(Math.round(Ie) - oe) || 1, Oe = (d + E) * N + _, He = Math.abs(Math.round(Oe) - Ce) || 1;
|
|
17159
17159
|
return p.setTransform(Math.sign(B), 0, 0, Math.sign(N), oe, Ce), p.drawImage(e, s, a, o, l, 0, 0, we, He), p.setTransform(B, y, v, N, x, _), [we, He];
|
|
@@ -17373,9 +17373,9 @@ var Ue = globalThis.pdfjsLib = {};
|
|
|
17373
17373
|
const l = this.ctx.canvas.width, h = this.ctx.canvas.height, d = this.ctx.fillStyle;
|
|
17374
17374
|
if (this.ctx.fillStyle = o || "#ffffff", this.ctx.fillRect(0, 0, l, h), this.ctx.fillStyle = d, a) {
|
|
17375
17375
|
const C = this.cachedCanvases.getCanvas("transparent", l, h);
|
|
17376
|
-
this.compositeCtx = this.ctx, this.transparentCanvas = C.canvas, this.ctx = C.context, this.ctx.save(), this.ctx.transform(...
|
|
17376
|
+
this.compositeCtx = this.ctx, this.transparentCanvas = C.canvas, this.ctx = C.context, this.ctx.save(), this.ctx.transform(...ee(this.compositeCtx));
|
|
17377
17377
|
}
|
|
17378
|
-
this.ctx.save(), dr(this.ctx), e && (this.ctx.transform(...e), this.outputScaleX = e[0], this.outputScaleY = e[0]), this.ctx.transform(...s.transform), this.viewportScale = s.scale, this.baseTransform =
|
|
17378
|
+
this.ctx.save(), dr(this.ctx), e && (this.ctx.transform(...e), this.outputScaleX = e[0], this.outputScaleY = e[0]), this.ctx.transform(...s.transform), this.viewportScale = s.scale, this.baseTransform = ee(this.ctx);
|
|
17379
17379
|
}
|
|
17380
17380
|
executeOperatorList(e, s, a, o) {
|
|
17381
17381
|
const l = e.argsArray, h = e.fnArray;
|
|
@@ -17447,7 +17447,7 @@ var Ue = globalThis.pdfjsLib = {};
|
|
|
17447
17447
|
const s = this.ctx, {
|
|
17448
17448
|
width: a,
|
|
17449
17449
|
height: o
|
|
17450
|
-
} = e, l = this.current.fillColor, h = this.current.patternFill, d =
|
|
17450
|
+
} = e, l = this.current.fillColor, h = this.current.patternFill, d = ee(s);
|
|
17451
17451
|
let C, E, B, y;
|
|
17452
17452
|
if ((e.bitmap || e.data) && e.count > 1) {
|
|
17453
17453
|
const Oe = e.bitmap || e.data.buffer;
|
|
@@ -17467,7 +17467,7 @@ var Ue = globalThis.pdfjsLib = {};
|
|
|
17467
17467
|
let v = X.transform(d, [1 / a, 0, 0, -1 / o, 0, 0]);
|
|
17468
17468
|
v = X.transform(v, [1, 0, 0, 1, 0, -o]);
|
|
17469
17469
|
const [N, x, _, j] = X.getAxialAlignedBoundingBox([0, 0, a, o], v), Y = Math.round(_ - N) || 1, ie = Math.round(j - x) || 1, oe = this.cachedCanvases.getCanvas("fillCanvas", Y, ie), Ae = oe.context, Ce = N, Ie = x;
|
|
17470
|
-
Ae.translate(-Ce, -Ie), Ae.transform(...v), B || (B = this._scaleImage(y.canvas, me(Ae)), B = B.img, C && h && C.set(E, B)), Ae.imageSmoothingEnabled = yo(
|
|
17470
|
+
Ae.translate(-Ce, -Ie), Ae.transform(...v), B || (B = this._scaleImage(y.canvas, me(Ae)), B = B.img, C && h && C.set(E, B)), Ae.imageSmoothingEnabled = yo(ee(Ae), e.interpolate), ur(Ae, B, 0, 0, B.width, B.height, 0, 0, a, o), Ae.globalCompositeOperation = "source-in";
|
|
17471
17471
|
const we = X.transform(me(Ae), [1, 0, 0, 1, -Ce, -Ie]);
|
|
17472
17472
|
return Ae.fillStyle = h ? l.getPattern(s, this, we, Vt.FILL) : l, Ae.fillRect(0, 0, a, o), C && !h && (this.cachedCanvases.delete("fillCanvas"), C.set(E, oe.canvas)), {
|
|
17473
17473
|
canvas: oe.canvas,
|
|
@@ -17552,7 +17552,7 @@ var Ue = globalThis.pdfjsLib = {};
|
|
|
17552
17552
|
const e = this.ctx.canvas.width, s = this.ctx.canvas.height, a = "smaskGroupAt" + this.groupLevel, o = this.cachedCanvases.getCanvas(a, e, s);
|
|
17553
17553
|
this.suspendedCtx = this.ctx, this.ctx = o.context;
|
|
17554
17554
|
const l = this.ctx;
|
|
17555
|
-
l.setTransform(...
|
|
17555
|
+
l.setTransform(...ee(this.suspendedCtx)), vs(this.suspendedCtx, l), ou(l, this.suspendedCtx), this.setGState([["BM", "source-over"], ["ca", 1], ["CA", 1]]);
|
|
17556
17556
|
}
|
|
17557
17557
|
endSMaskMode() {
|
|
17558
17558
|
if (!this.inSMaskMode)
|
|
@@ -17600,7 +17600,7 @@ var Ue = globalThis.pdfjsLib = {};
|
|
|
17600
17600
|
constructPath(e, s, a) {
|
|
17601
17601
|
const o = this.ctx, l = this.current;
|
|
17602
17602
|
let h = l.x, d = l.y, C, E;
|
|
17603
|
-
const B =
|
|
17603
|
+
const B = ee(o), y = B[0] === 0 && B[3] === 0 || B[1] === 0 && B[2] === 0, v = y ? a.slice(0) : null;
|
|
17604
17604
|
for (let N = 0, x = 0, _ = e.length; N < _; N++)
|
|
17605
17605
|
switch (e[N] | 0) {
|
|
17606
17606
|
case F.rectangle:
|
|
@@ -17731,7 +17731,7 @@ var Ue = globalThis.pdfjsLib = {};
|
|
|
17731
17731
|
const l = this.ctx, h = this.current, d = h.font, C = h.textRenderingMode, E = h.fontSize / h.fontSizeScale, B = C & m.FILL_STROKE_MASK, y = !!(C & m.ADD_TO_PATH_FLAG), v = h.patternFill && !d.missingFile;
|
|
17732
17732
|
let N;
|
|
17733
17733
|
(d.disableFontFace || y || v) && (N = d.getPathGenerator(this.commonObjs, e)), d.disableFontFace || v ? (l.save(), l.translate(s, a), l.beginPath(), N(l, E), o && l.setTransform(...o), (B === m.FILL || B === m.FILL_STROKE) && l.fill(), (B === m.STROKE || B === m.FILL_STROKE) && l.stroke(), l.restore()) : ((B === m.FILL || B === m.FILL_STROKE) && l.fillText(e, s, a), (B === m.STROKE || B === m.FILL_STROKE) && l.strokeText(e, s, a)), y && (this.pendingTextPaths ||= []).push({
|
|
17734
|
-
transform:
|
|
17734
|
+
transform: ee(l),
|
|
17735
17735
|
x: s,
|
|
17736
17736
|
y: a,
|
|
17737
17737
|
fontSize: E,
|
|
@@ -17765,7 +17765,7 @@ var Ue = globalThis.pdfjsLib = {};
|
|
|
17765
17765
|
if (s.patternFill) {
|
|
17766
17766
|
l.save();
|
|
17767
17767
|
const Ie = s.fillColor.getPattern(l, this, me(l), Vt.FILL);
|
|
17768
|
-
Y =
|
|
17768
|
+
Y = ee(l), l.restore(), l.fillStyle = Ie;
|
|
17769
17769
|
}
|
|
17770
17770
|
let ie = s.lineWidth;
|
|
17771
17771
|
const oe = s.textMatrixScale;
|
|
@@ -17844,7 +17844,7 @@ var Ue = globalThis.pdfjsLib = {};
|
|
|
17844
17844
|
getColorN_Pattern(e) {
|
|
17845
17845
|
let s;
|
|
17846
17846
|
if (e[0] === "TilingPattern") {
|
|
17847
|
-
const a = e[1], o = this.baseTransform ||
|
|
17847
|
+
const a = e[1], o = this.baseTransform || ee(this.ctx), l = {
|
|
17848
17848
|
createCanvasGraphics: (h) => new rs(h, this.commonObjs, this.objs, this.canvasFactory, this.filterFactory, {
|
|
17849
17849
|
optionalContentConfig: this.optionalContentConfig,
|
|
17850
17850
|
markedContentStack: this.markedContentStack
|
|
@@ -17898,9 +17898,9 @@ var Ue = globalThis.pdfjsLib = {};
|
|
|
17898
17898
|
G("Should not call beginImageData");
|
|
17899
17899
|
}
|
|
17900
17900
|
paintFormXObjectBegin(e, s) {
|
|
17901
|
-
if (this.contentVisible && (this.save(), this.baseTransformStack.push(this.baseTransform), e && this.transform(...e), this.baseTransform =
|
|
17901
|
+
if (this.contentVisible && (this.save(), this.baseTransformStack.push(this.baseTransform), e && this.transform(...e), this.baseTransform = ee(this.ctx), s)) {
|
|
17902
17902
|
const a = s[2] - s[0], o = s[3] - s[1];
|
|
17903
|
-
this.ctx.rect(s[0], s[1], a, o), this.current.updateRectMinMax(
|
|
17903
|
+
this.ctx.rect(s[0], s[1], a, o), this.current.updateRectMinMax(ee(this.ctx), s), this.clip(), this.endPath();
|
|
17904
17904
|
}
|
|
17905
17905
|
}
|
|
17906
17906
|
paintFormXObjectEnd() {
|
|
@@ -17912,10 +17912,10 @@ var Ue = globalThis.pdfjsLib = {};
|
|
|
17912
17912
|
this.save(), this.inSMaskMode && (this.endSMaskMode(), this.current.activeSMask = null);
|
|
17913
17913
|
const s = this.ctx;
|
|
17914
17914
|
e.isolated || U("TODO: Support non-isolated groups."), e.knockout && D("Knockout groups not supported.");
|
|
17915
|
-
const a =
|
|
17915
|
+
const a = ee(s);
|
|
17916
17916
|
if (e.matrix && s.transform(...e.matrix), !e.bbox)
|
|
17917
17917
|
throw new Error("Bounding box is required.");
|
|
17918
|
-
let o = X.getAxialAlignedBoundingBox(e.bbox,
|
|
17918
|
+
let o = X.getAxialAlignedBoundingBox(e.bbox, ee(s));
|
|
17919
17919
|
const l = [0, 0, s.canvas.width, s.canvas.height];
|
|
17920
17920
|
o = X.intersect(o, l) || [0, 0, 0, 0];
|
|
17921
17921
|
const h = Math.floor(o[0]), d = Math.floor(o[1]), C = Math.max(Math.ceil(o[2]) - h, 1), E = Math.max(Math.ceil(o[3]) - d, 1);
|
|
@@ -17943,7 +17943,7 @@ var Ue = globalThis.pdfjsLib = {};
|
|
|
17943
17943
|
this.tempSMask = this.smaskStack.pop(), this.restore();
|
|
17944
17944
|
else {
|
|
17945
17945
|
this.ctx.restore();
|
|
17946
|
-
const o =
|
|
17946
|
+
const o = ee(this.ctx);
|
|
17947
17947
|
this.restore(), this.ctx.save(), this.ctx.setTransform(...o);
|
|
17948
17948
|
const l = X.getAxialAlignedBoundingBox([0, 0, s.canvas.width, s.canvas.height], o);
|
|
17949
17949
|
this.ctx.drawImage(s.canvas, 0, 0), this.ctx.restore(), this.compose(l);
|
|
@@ -17954,7 +17954,7 @@ var Ue = globalThis.pdfjsLib = {};
|
|
|
17954
17954
|
const h = s[2] - s[0], d = s[3] - s[1];
|
|
17955
17955
|
if (l && this.annotationCanvasMap) {
|
|
17956
17956
|
a = a.slice(), a[4] -= s[0], a[5] -= s[1], s = s.slice(), s[0] = s[1] = 0, s[2] = h, s[3] = d;
|
|
17957
|
-
const [C, E] = X.singularValueDecompose2dScale(
|
|
17957
|
+
const [C, E] = X.singularValueDecompose2dScale(ee(this.ctx)), {
|
|
17958
17958
|
viewportScale: B
|
|
17959
17959
|
} = this, y = Math.ceil(h * this.outputScaleX * B), v = Math.ceil(d * this.outputScaleY * B);
|
|
17960
17960
|
this.annotationCanvas = this.canvasFactory.create(y, v);
|
|
@@ -17990,7 +17990,7 @@ var Ue = globalThis.pdfjsLib = {};
|
|
|
17990
17990
|
e = this.getObject(e.data, e);
|
|
17991
17991
|
const d = this.ctx;
|
|
17992
17992
|
d.save();
|
|
17993
|
-
const C =
|
|
17993
|
+
const C = ee(d);
|
|
17994
17994
|
d.transform(s, a, o, l, 0, 0);
|
|
17995
17995
|
const E = this._createMaskCanvas(e);
|
|
17996
17996
|
d.setTransform(1, 0, 0, 1, E.offsetX - C[4], E.offsetY - C[5]);
|
|
@@ -18080,7 +18080,7 @@ var Ue = globalThis.pdfjsLib = {};
|
|
|
18080
18080
|
Qo(C, e), l = this.applyTransferMapsToCanvas(C);
|
|
18081
18081
|
}
|
|
18082
18082
|
const h = this._scaleImage(l, me(o));
|
|
18083
|
-
o.imageSmoothingEnabled = yo(
|
|
18083
|
+
o.imageSmoothingEnabled = yo(ee(o), e.interpolate), ur(o, h.img, 0, 0, h.paintWidth, h.paintHeight, 0, -a, s, a), this.compose(), this.restore();
|
|
18084
18084
|
}
|
|
18085
18085
|
paintInlineImageXObjectGroup(e, s) {
|
|
18086
18086
|
if (!this.contentVisible)
|
|
@@ -18131,7 +18131,7 @@ var Ue = globalThis.pdfjsLib = {};
|
|
|
18131
18131
|
}
|
|
18132
18132
|
getSinglePixelWidth() {
|
|
18133
18133
|
if (!this._cachedGetSinglePixelWidth) {
|
|
18134
|
-
const e =
|
|
18134
|
+
const e = ee(this.ctx);
|
|
18135
18135
|
if (e[1] === 0 && e[2] === 0)
|
|
18136
18136
|
this._cachedGetSinglePixelWidth = 1 / Math.min(Math.abs(e[0]), Math.abs(e[3]));
|
|
18137
18137
|
else {
|
|
@@ -18246,7 +18246,7 @@ var Ue = globalThis.pdfjsLib = {};
|
|
|
18246
18246
|
case "MissingPDFException":
|
|
18247
18247
|
return new te(p.message);
|
|
18248
18248
|
case "PasswordException":
|
|
18249
|
-
return new
|
|
18249
|
+
return new Z(p.message, p.code);
|
|
18250
18250
|
case "UnexpectedResponseException":
|
|
18251
18251
|
return new se(p.message, p.status);
|
|
18252
18252
|
case "UnknownErrorException":
|
|
@@ -20883,10 +20883,10 @@ var Ue = globalThis.pdfjsLib = {};
|
|
|
20883
20883
|
let o;
|
|
20884
20884
|
switch (a.name) {
|
|
20885
20885
|
case "PasswordException":
|
|
20886
|
-
o = new
|
|
20886
|
+
o = new Z(a.message, a.code);
|
|
20887
20887
|
break;
|
|
20888
20888
|
case "InvalidPDFException":
|
|
20889
|
-
o = new
|
|
20889
|
+
o = new $(a.message);
|
|
20890
20890
|
break;
|
|
20891
20891
|
case "MissingPDFException":
|
|
20892
20892
|
o = new te(a.message);
|
|
@@ -20914,7 +20914,7 @@ var Ue = globalThis.pdfjsLib = {};
|
|
|
20914
20914
|
this.#r.reject(l);
|
|
20915
20915
|
}
|
|
20916
20916
|
} else
|
|
20917
|
-
this.#r.reject(new
|
|
20917
|
+
this.#r.reject(new Z(a.message, a.code));
|
|
20918
20918
|
return this.#r.promise;
|
|
20919
20919
|
}), e.on("DataLoaded", (a) => {
|
|
20920
20920
|
s.onProgress?.({
|
|
@@ -26114,14 +26114,14 @@ function km({
|
|
|
26114
26114
|
break;
|
|
26115
26115
|
if (L <= c || U >= g || R <= u || H >= I)
|
|
26116
26116
|
continue;
|
|
26117
|
-
const P = Math.max(0, c - U) + Math.max(0, L - g), K = Math.max(0, u - H) + Math.max(0, R - I), V = (G - P) / G,
|
|
26117
|
+
const P = Math.max(0, c - U) + Math.max(0, L - g), K = Math.max(0, u - H) + Math.max(0, R - I), V = (G - P) / G, Z = (D - K) / D, q = V * Z * 100 | 0;
|
|
26118
26118
|
m.push({
|
|
26119
26119
|
id: J.id,
|
|
26120
26120
|
x: H,
|
|
26121
26121
|
y: U,
|
|
26122
26122
|
view: J,
|
|
26123
26123
|
percent: q,
|
|
26124
|
-
widthPercent:
|
|
26124
|
+
widthPercent: Z * 100 | 0
|
|
26125
26125
|
}), b.add(J.id);
|
|
26126
26126
|
}
|
|
26127
26127
|
const M = m[0], F = m.at(-1);
|
|
@@ -27545,9 +27545,9 @@ class j2 {
|
|
|
27545
27545
|
}
|
|
27546
27546
|
if (t[i] === "}")
|
|
27547
27547
|
throw new SyntaxError("Unbalanced closing brace");
|
|
27548
|
-
let
|
|
27549
|
-
if (
|
|
27550
|
-
R.push(
|
|
27548
|
+
let Z = U();
|
|
27549
|
+
if (Z) {
|
|
27550
|
+
R.push(Z), L = Math.min(L, Z.length);
|
|
27551
27551
|
continue;
|
|
27552
27552
|
}
|
|
27553
27553
|
break;
|
|
@@ -27555,8 +27555,8 @@ class j2 {
|
|
|
27555
27555
|
let P = R.length - 1, K = R[P];
|
|
27556
27556
|
typeof K == "string" && (R[P] = D(K, Hl));
|
|
27557
27557
|
let V = [];
|
|
27558
|
-
for (let
|
|
27559
|
-
|
|
27558
|
+
for (let Z of R)
|
|
27559
|
+
Z instanceof Ol && (Z = Z.value.slice(0, Z.value.length - L)), Z && V.push(Z);
|
|
27560
27560
|
return V;
|
|
27561
27561
|
}
|
|
27562
27562
|
function b() {
|
|
@@ -31507,8 +31507,8 @@ const M9 = '/**\n * @licstart The following is the entire license notice for the
|
|
|
31507
31507
|
const r = t, A = Ri(), { proxy: c } = ji(), { activeZoom: g } = wi(A), u = W(null), I = W(null), f = W(!1), m = c.$superdoc.config.pdfViewer.textLayerMode ?? 0;
|
|
31508
31508
|
let b = null, S = [];
|
|
31509
31509
|
const w = n, k = w.documentData.id, M = w.documentData.data, F = (P) => {
|
|
31510
|
-
const K = P.getViewport({ scale: 1 }), V = K.width,
|
|
31511
|
-
return { width: V, height:
|
|
31510
|
+
const K = P.getViewport({ scale: 1 }), V = K.width, Z = K.height;
|
|
31511
|
+
return { width: V, height: Z };
|
|
31512
31512
|
};
|
|
31513
31513
|
async function O(P) {
|
|
31514
31514
|
const K = mm(P), V = await K.promise;
|
|
@@ -31517,7 +31517,7 @@ const M9 = '/**\n * @licstart The following is the entire license notice for the
|
|
|
31517
31517
|
async function J(P) {
|
|
31518
31518
|
const K = new FileReader();
|
|
31519
31519
|
K.onload = async function(V) {
|
|
31520
|
-
const { loadingTask:
|
|
31520
|
+
const { loadingTask: Z, document: q } = await O(V.target.result);
|
|
31521
31521
|
b = q, T(q);
|
|
31522
31522
|
}, K.readAsArrayBuffer(P);
|
|
31523
31523
|
}
|
|
@@ -31527,20 +31527,20 @@ const M9 = '/**\n * @licstart The following is the entire license notice for the
|
|
|
31527
31527
|
}, 150);
|
|
31528
31528
|
};
|
|
31529
31529
|
async function H(P, K, V) {
|
|
31530
|
-
const
|
|
31531
|
-
return await Promise.all(
|
|
31530
|
+
const Z = L9(K, V + 1).map((q) => P.getPage(q));
|
|
31531
|
+
return await Promise.all(Z);
|
|
31532
31532
|
}
|
|
31533
31533
|
async function U(P) {
|
|
31534
31534
|
try {
|
|
31535
31535
|
const K = P.numPages;
|
|
31536
31536
|
u.value = K;
|
|
31537
|
-
const
|
|
31538
|
-
for (const [
|
|
31537
|
+
const Z = await H(P, 1, K), q = [];
|
|
31538
|
+
for (const [$, te] of Z.entries()) {
|
|
31539
31539
|
const se = document.createElement("div");
|
|
31540
|
-
se.className = "pdf-page", se.dataset.pageNumber =
|
|
31540
|
+
se.className = "pdf-page", se.dataset.pageNumber = $ + 1, se.id = `${k}-page-${$ + 1}`, q.push(se);
|
|
31541
31541
|
const { width: ne, height: Be } = F(te), xe = 1, Me = new R9(), Xe = new N9({
|
|
31542
31542
|
container: se,
|
|
31543
|
-
id:
|
|
31543
|
+
id: $ + 1,
|
|
31544
31544
|
scale: xe,
|
|
31545
31545
|
defaultViewport: te.getViewport({ scale: xe }),
|
|
31546
31546
|
eventBus: Me,
|
|
@@ -31548,7 +31548,7 @@ const M9 = '/**\n * @licstart The following is the entire license notice for the
|
|
|
31548
31548
|
});
|
|
31549
31549
|
S.push(Xe);
|
|
31550
31550
|
const at = se.getBoundingClientRect();
|
|
31551
|
-
at.originalWidth = ne, at.originalHeight = Be, Xe.setPdfPage(te), await Xe.draw(), r("page-loaded", k,
|
|
31551
|
+
at.originalWidth = ne, at.originalHeight = Be, Xe.setPdfPage(te), await Xe.draw(), r("page-loaded", k, $, at);
|
|
31552
31552
|
}
|
|
31553
31553
|
I.value.append(...q), f.value = !0, r("ready", k, I);
|
|
31554
31554
|
} catch (K) {
|
|
@@ -31559,33 +31559,33 @@ const M9 = '/**\n * @licstart The following is the entire license notice for the
|
|
|
31559
31559
|
const K = window.getSelection();
|
|
31560
31560
|
if (K.rangeCount === 0)
|
|
31561
31561
|
return null;
|
|
31562
|
-
const
|
|
31563
|
-
if (
|
|
31562
|
+
const Z = K.getRangeAt(0).getClientRects();
|
|
31563
|
+
if (Z.length === 0)
|
|
31564
31564
|
return null;
|
|
31565
|
-
const q =
|
|
31566
|
-
let
|
|
31565
|
+
const q = Z[0];
|
|
31566
|
+
let $ = {
|
|
31567
31567
|
top: q.top,
|
|
31568
31568
|
left: q.left,
|
|
31569
31569
|
bottom: q.bottom,
|
|
31570
31570
|
right: q.right
|
|
31571
31571
|
};
|
|
31572
|
-
for (let se = 1; se <
|
|
31573
|
-
const ne =
|
|
31574
|
-
ne.width === 0 || ne.height === 0 || (
|
|
31572
|
+
for (let se = 1; se < Z.length; se++) {
|
|
31573
|
+
const ne = Z[se];
|
|
31574
|
+
ne.width === 0 || ne.height === 0 || ($.top = Math.min($.top, ne.top), $.left = Math.min($.left, ne.left), $.bottom = Math.max($.bottom, ne.bottom), $.right = Math.max($.right, ne.right));
|
|
31575
31575
|
}
|
|
31576
31576
|
const te = P.getBoundingClientRect();
|
|
31577
|
-
return I.value.getBoundingClientRect(),
|
|
31577
|
+
return I.value.getBoundingClientRect(), $.top = ($.top - te.top) / (g.value / 100) + P.scrollTop, $.left = ($.left - te.left) / (g.value / 100) + P.scrollLeft, $.bottom = ($.bottom - te.top) / (g.value / 100) + P.scrollTop, $.right = ($.right - te.left) / (g.value / 100) + P.scrollLeft, $;
|
|
31578
31578
|
}
|
|
31579
31579
|
const G = (P) => {
|
|
31580
31580
|
const { target: K } = P;
|
|
31581
31581
|
K.tagName !== "SPAN" && r("bypass-selection", P);
|
|
31582
31582
|
}, R = (P) => {
|
|
31583
31583
|
if (window.getSelection().toString().length > 0) {
|
|
31584
|
-
const V = D(I.value),
|
|
31584
|
+
const V = D(I.value), Z = zs({
|
|
31585
31585
|
selectionBounds: V,
|
|
31586
31586
|
documentId: k
|
|
31587
31587
|
});
|
|
31588
|
-
r("selection-change",
|
|
31588
|
+
r("selection-change", Z);
|
|
31589
31589
|
}
|
|
31590
31590
|
}, L = () => {
|
|
31591
31591
|
S.forEach((P) => P.destroy()), b.cleanup(), b.destroy(), S = [], b = null, URL.revokeObjectURL(i);
|
|
@@ -31994,7 +31994,7 @@ const M9 = '/**\n * @licstart The following is the entire license notice for the
|
|
|
31994
31994
|
k.itemfieldtype === "CHECKBOXINPUT" && (J = k.annotationid);
|
|
31995
31995
|
const { x1: T, y1: H, x2: U, y2: D } = k, G = { x1: T, y1: H, x2: U, y2: D }, R = document.getElementById(`${Q}-page-${F + 1}`);
|
|
31996
31996
|
if (!R) return;
|
|
31997
|
-
const L = R.getBoundingClientRect(), P = f.pageContainers.find((se) => se.page === F), K = L.height / P.containerBounds.originalHeight, V = L.bottom - S.top,
|
|
31997
|
+
const L = R.getBoundingClientRect(), P = f.pageContainers.find((se) => se.page === F), K = L.height / P.containerBounds.originalHeight, V = L.bottom - S.top, Z = L.left - S.left, q = u(G, K, V, Z), $ = {
|
|
31998
31998
|
fontSize: k.original_font_size + "px",
|
|
31999
31999
|
originalFontSize: k.original_font_size,
|
|
32000
32000
|
coordinates: q
|
|
@@ -32005,7 +32005,7 @@ const M9 = '/**\n * @licstart The following is the entire license notice for the
|
|
|
32005
32005
|
annotationId: J,
|
|
32006
32006
|
originalAnnotationId: k.originalannotationid,
|
|
32007
32007
|
coordinates: q,
|
|
32008
|
-
style:
|
|
32008
|
+
style: $,
|
|
32009
32009
|
nostyle: O ?? !1
|
|
32010
32010
|
};
|
|
32011
32011
|
I.push(te);
|
|
@@ -32283,9 +32283,9 @@ const yy = ["innerHTML"], by = { class: "superdoc__document document" }, wy = {
|
|
|
32283
32283
|
hasSyncedCollaborationComments: R,
|
|
32284
32284
|
editorCommentPositions: L,
|
|
32285
32285
|
hasInitializedLocations: P
|
|
32286
|
-
} = wi(r), { showAddComment: K, handleEditorLocationsUpdate: V, handleTrackedChangeUpdate:
|
|
32286
|
+
} = wi(r), { showAddComment: K, handleEditorLocationsUpdate: V, handleTrackedChangeUpdate: Z } = r, { proxy: q } = ji();
|
|
32287
32287
|
r.proxy = q;
|
|
32288
|
-
const
|
|
32288
|
+
const $ = W(null), te = W(null), se = Zt({ top: null, right: "-25px", zIndex: 101 }), ne = ae(() => q.$superdoc.activeEditor), { selectedText: Be } = Qy(ne), {
|
|
32289
32289
|
showAiLayer: xe,
|
|
32290
32290
|
showAiWriter: Me,
|
|
32291
32291
|
aiWriterPosition: Xe,
|
|
@@ -32295,51 +32295,51 @@ const yy = ["innerHTML"], by = { class: "superdoc__document document" }, wy = {
|
|
|
32295
32295
|
handleAiWriterClose: z,
|
|
32296
32296
|
handleAiToolClick: ue
|
|
32297
32297
|
} = my({
|
|
32298
|
-
emitAiHighlight: (
|
|
32298
|
+
emitAiHighlight: (ee) => q.$superdoc.emit("ai-highlight", ee),
|
|
32299
32299
|
activeEditorRef: ne
|
|
32300
|
-
}), X = W(null), Qe = (
|
|
32301
|
-
const Ke = S(
|
|
32300
|
+
}), X = W(null), Qe = (ee, me) => {
|
|
32301
|
+
const Ke = S(ee);
|
|
32302
32302
|
Ke.isReady = !0, Ke.container = me, g.value && (q.$superdoc.config.collaboration || (c.value = !0)), U.value = !0, P.value = !0, q.$superdoc.broadcastPdfDocumentReady();
|
|
32303
|
-
}, Ee = (
|
|
32303
|
+
}, Ee = (ee) => {
|
|
32304
32304
|
const me = {
|
|
32305
32305
|
comments: () => K(q.$superdoc),
|
|
32306
32306
|
ai: () => ue()
|
|
32307
32307
|
};
|
|
32308
|
-
|
|
32309
|
-
}, Se = (
|
|
32308
|
+
ee in me && me[ee](I.value, u.value), I.value = null, se.top = null;
|
|
32309
|
+
}, Se = (ee) => {
|
|
32310
32310
|
F.value;
|
|
32311
|
-
}, _e = () => se.top = null, ut = (
|
|
32312
|
-
|
|
32313
|
-
}, he = ({ editor:
|
|
32314
|
-
(
|
|
32311
|
+
}, _e = () => se.top = null, ut = (ee) => {
|
|
32312
|
+
ee.target.classList.contains("n-dropdown-option-body__label") || r.removePendingComment(q.$superdoc);
|
|
32313
|
+
}, he = ({ editor: ee, comments: me, replacedFile: Ke }) => {
|
|
32314
|
+
(ee.options.shouldLoadComments || Ke) && qt(() => {
|
|
32315
32315
|
r.processLoadedDocxComments({
|
|
32316
32316
|
superdoc: q.$superdoc,
|
|
32317
|
-
editor:
|
|
32317
|
+
editor: ee,
|
|
32318
32318
|
comments: me,
|
|
32319
|
-
documentId:
|
|
32319
|
+
documentId: ee.options.documentId
|
|
32320
32320
|
});
|
|
32321
32321
|
});
|
|
32322
|
-
}, ce = ({ editor:
|
|
32323
|
-
q.$superdoc?.broadcastEditorBeforeCreate(
|
|
32324
|
-
}, De = ({ editor:
|
|
32325
|
-
const { documentId: me } =
|
|
32326
|
-
S(me).setEditor(
|
|
32322
|
+
}, ce = ({ editor: ee }) => {
|
|
32323
|
+
q.$superdoc?.broadcastEditorBeforeCreate(ee);
|
|
32324
|
+
}, De = ({ editor: ee }) => {
|
|
32325
|
+
const { documentId: me } = ee.options;
|
|
32326
|
+
S(me).setEditor(ee), q.$superdoc.setActiveEditor(ee), q.$superdoc.broadcastEditorCreate(ee), Et(!0);
|
|
32327
32327
|
}, Te = () => {
|
|
32328
32328
|
q.$superdoc.broadcastEditorDestroy();
|
|
32329
|
-
}, Je = ({ editor:
|
|
32330
|
-
q.$superdoc.setActiveEditor(
|
|
32331
|
-
}, qe = ({ editor:
|
|
32329
|
+
}, Je = ({ editor: ee }) => {
|
|
32330
|
+
q.$superdoc.setActiveEditor(ee);
|
|
32331
|
+
}, qe = ({ editor: ee, isLocked: me, lockedBy: Ke }) => {
|
|
32332
32332
|
q.$superdoc.lockSuperdoc(me, Ke);
|
|
32333
|
-
}, Le = ({ editor:
|
|
32334
|
-
q.$superdoc.emit("editor-update", { editor:
|
|
32335
|
-
}, ot = ({ editor:
|
|
32333
|
+
}, Le = ({ editor: ee }) => {
|
|
32334
|
+
q.$superdoc.emit("editor-update", { editor: ee });
|
|
32335
|
+
}, ot = ({ editor: ee, transaction: me }) => {
|
|
32336
32336
|
if (J.value) {
|
|
32337
32337
|
J.value = !1;
|
|
32338
32338
|
return;
|
|
32339
32339
|
}
|
|
32340
|
-
const { documentId: Ke } =
|
|
32341
|
-
if (Ve.pos === Xt.pos && be({ x: null, y: null, source: "super-editor" }),
|
|
32342
|
-
const { view: Mi } =
|
|
32340
|
+
const { documentId: Ke } = ee.options, { $from: Ve, $to: Xt } = me.selection;
|
|
32341
|
+
if (Ve.pos === Xt.pos && be({ x: null, y: null, source: "super-editor" }), !$.value) return;
|
|
32342
|
+
const { view: Mi } = ee, Nn = Mi.coordsAtPos(Ve.pos), In = Mi.coordsAtPos(Xt.pos), { pageMargins: Cn } = ee.getPageStyles(), ss = $.value.getBoundingClientRect(), Mn = Math.max(96, Nn.top - ss.top), fi = In.bottom - ss.top, vi = {
|
|
32343
32343
|
top: Mn,
|
|
32344
32344
|
left: Nn.left,
|
|
32345
32345
|
right: In.left,
|
|
@@ -32351,26 +32351,26 @@ const yy = ["innerHTML"], by = { class: "superdoc__document document" }, wy = {
|
|
|
32351
32351
|
source: "super-editor"
|
|
32352
32352
|
});
|
|
32353
32353
|
le(Ne);
|
|
32354
|
-
}, it = ({ editor:
|
|
32355
|
-
q.$superdoc.emit("collaboration-ready", { editor:
|
|
32354
|
+
}, it = ({ editor: ee }) => {
|
|
32355
|
+
q.$superdoc.emit("collaboration-ready", { editor: ee }), qt(() => {
|
|
32356
32356
|
c.value = !0;
|
|
32357
32357
|
const Ke = new URLSearchParams(window.location.search).get("commentId");
|
|
32358
32358
|
Ke && Zi(Ke);
|
|
32359
32359
|
});
|
|
32360
|
-
}, $e = ({ error:
|
|
32361
|
-
q.$superdoc.emit("content-error", { error:
|
|
32362
|
-
}, Ut = ({ error:
|
|
32363
|
-
q.$superdoc.emit("exception", { error:
|
|
32364
|
-
}, $t = (
|
|
32360
|
+
}, $e = ({ error: ee, editor: me }) => {
|
|
32361
|
+
q.$superdoc.emit("content-error", { error: ee, editor: me });
|
|
32362
|
+
}, Ut = ({ error: ee, editor: me }) => {
|
|
32363
|
+
q.$superdoc.emit("exception", { error: ee, editor: me });
|
|
32364
|
+
}, $t = (ee) => ({
|
|
32365
32365
|
pagination: q.$superdoc.config.pagination,
|
|
32366
|
-
documentId:
|
|
32366
|
+
documentId: ee.id,
|
|
32367
32367
|
user: q.$superdoc.user,
|
|
32368
32368
|
users: q.$superdoc.users,
|
|
32369
32369
|
colors: q.$superdoc.colors,
|
|
32370
32370
|
role: q.$superdoc.config.role,
|
|
32371
|
-
html:
|
|
32371
|
+
html: ee.html,
|
|
32372
32372
|
documentMode: q.$superdoc.config.documentMode,
|
|
32373
|
-
rulers:
|
|
32373
|
+
rulers: ee.rulers,
|
|
32374
32374
|
isInternal: q.$superdoc.config.isInternal,
|
|
32375
32375
|
annotations: q.$superdoc.config.annotations,
|
|
32376
32376
|
isCommentsEnabled: q.$superdoc.config.modules?.comments,
|
|
@@ -32387,30 +32387,30 @@ const yy = ["innerHTML"], by = { class: "superdoc__document document" }, wy = {
|
|
|
32387
32387
|
onCommentsLoaded: he,
|
|
32388
32388
|
onCommentsUpdate: Ci,
|
|
32389
32389
|
onCommentLocationsUpdate: Ni,
|
|
32390
|
-
ydoc:
|
|
32391
|
-
collaborationProvider:
|
|
32392
|
-
isNewFile:
|
|
32390
|
+
ydoc: ee.ydoc,
|
|
32391
|
+
collaborationProvider: ee.provider || null,
|
|
32392
|
+
isNewFile: ee.isNewFile || !1,
|
|
32393
32393
|
handleImageUpload: q.$superdoc.config.handleImageUpload,
|
|
32394
32394
|
telemetry: q.$superdoc.telemetry,
|
|
32395
32395
|
externalExtensions: q.$superdoc.config.editorExtensions || []
|
|
32396
|
-
}), Ni = ({ allCommentIds:
|
|
32397
|
-
q.$superdoc.config.modules?.comments && V(me,
|
|
32398
|
-
}, Ci = (
|
|
32399
|
-
const { activeCommentId: me, type: Ke } =
|
|
32400
|
-
Ke === "trackedChange" &&
|
|
32396
|
+
}), Ni = ({ allCommentIds: ee, allCommentPositions: me }) => {
|
|
32397
|
+
q.$superdoc.config.modules?.comments && V(me, ee);
|
|
32398
|
+
}, Ci = (ee = {}) => {
|
|
32399
|
+
const { activeCommentId: me, type: Ke } = ee;
|
|
32400
|
+
Ke === "trackedChange" && Z({ superdoc: q.$superdoc, params: ee }), qt(() => {
|
|
32401
32401
|
F.value || r.setActiveComment(me);
|
|
32402
|
-
}), typeof q.$superdoc.config.onCommentsUpdate == "function" && q.$superdoc.config.onCommentsUpdate(
|
|
32403
|
-
}, Lt = ae(() => "comments" in m), Ai = ae(() => F.value || G.value?.length > 0 && c.value &&
|
|
32402
|
+
}), typeof q.$superdoc.config.onCommentsUpdate == "function" && q.$superdoc.config.onCommentsUpdate(ee);
|
|
32403
|
+
}, Lt = ae(() => "comments" in m), Ai = ae(() => F.value || G.value?.length > 0 && c.value && $.value && Lt.value && !H.value), zi = ae(() => Lt.value ? se.top && !w.value?.readOnly : !1);
|
|
32404
32404
|
ae(() => {
|
|
32405
32405
|
if (!Lt.value) return !1;
|
|
32406
32406
|
!w?.readOnly && u.value;
|
|
32407
|
-
}), wt(Ai, (
|
|
32408
|
-
q.$superdoc.broadcastSidebarToggle(
|
|
32407
|
+
}), wt(Ai, (ee) => {
|
|
32408
|
+
q.$superdoc.broadcastSidebarToggle(ee);
|
|
32409
32409
|
});
|
|
32410
|
-
const Zi = (
|
|
32410
|
+
const Zi = (ee) => {
|
|
32411
32411
|
if (!q.$superdoc.config?.modules?.comments) return;
|
|
32412
|
-
const me = document.querySelector(`[data-thread-id=${
|
|
32413
|
-
me && (me.scrollIntoView({ behavior: "smooth", block: "start" }), r.setActiveComment(
|
|
32412
|
+
const me = document.querySelector(`[data-thread-id=${ee}]`);
|
|
32413
|
+
me && (me.scrollIntoView({ behavior: "smooth", block: "start" }), r.setActiveComment(ee));
|
|
32414
32414
|
};
|
|
32415
32415
|
Ii(() => {
|
|
32416
32416
|
Lt.value && !m.comments.readOnly && document.addEventListener("mousedown", Se), q.$superdoc.on("ai-highlight", de);
|
|
@@ -32420,67 +32420,67 @@ const yy = ["innerHTML"], by = { class: "superdoc__document document" }, wy = {
|
|
|
32420
32420
|
const oi = W(null), ci = W(!1), gr = ae(() => {
|
|
32421
32421
|
if (!u.value || u.value.source === "super-editor")
|
|
32422
32422
|
return { x: null, y: null };
|
|
32423
|
-
const
|
|
32423
|
+
const ee = u.value.top, me = u.value.left, Ke = u.value.right, Ve = u.value.bottom;
|
|
32424
32424
|
return {
|
|
32425
32425
|
zIndex: 500,
|
|
32426
32426
|
borderRadius: "4px",
|
|
32427
|
-
top:
|
|
32427
|
+
top: ee + "px",
|
|
32428
32428
|
left: me + "px",
|
|
32429
|
-
height: Math.abs(
|
|
32429
|
+
height: Math.abs(ee - Ve) + "px",
|
|
32430
32430
|
width: Math.abs(me - Ke) + "px"
|
|
32431
32431
|
};
|
|
32432
|
-
}), le = (
|
|
32433
|
-
if (!
|
|
32432
|
+
}), le = (ee) => {
|
|
32433
|
+
if (!ee.selectionBounds || !Lt.value) return;
|
|
32434
32434
|
pe();
|
|
32435
32435
|
const me = window.matchMedia("(max-width: 768px)").matches;
|
|
32436
32436
|
if (be({
|
|
32437
|
-
startX:
|
|
32438
|
-
startY:
|
|
32439
|
-
x:
|
|
32440
|
-
y:
|
|
32441
|
-
source:
|
|
32437
|
+
startX: ee.selectionBounds.left,
|
|
32438
|
+
startY: ee.selectionBounds.top,
|
|
32439
|
+
x: ee.selectionBounds.right,
|
|
32440
|
+
y: ee.selectionBounds.bottom,
|
|
32441
|
+
source: ee.source
|
|
32442
32442
|
}), !u.value) return;
|
|
32443
32443
|
const Ke = Math.abs(u.value.left - u.value.right) > 5, Ve = Math.abs(u.value.top - u.value.bottom) > 5;
|
|
32444
32444
|
if (!Ke || !Ve) {
|
|
32445
32445
|
oi.value.style.pointerEvents = "none", pe();
|
|
32446
32446
|
return;
|
|
32447
32447
|
}
|
|
32448
|
-
I.value =
|
|
32449
|
-
let Xt =
|
|
32448
|
+
I.value = ee;
|
|
32449
|
+
let Xt = ee.selectionBounds.top;
|
|
32450
32450
|
se.top = Xt + "px", se.right = me ? "0" : "-25px";
|
|
32451
32451
|
}, pe = () => {
|
|
32452
32452
|
u.value = null;
|
|
32453
|
-
}, be = ({ startX:
|
|
32454
|
-
if (!(
|
|
32453
|
+
}, be = ({ startX: ee, startY: me, x: Ke, y: Ve, source: Xt }) => {
|
|
32454
|
+
if (!(ee || me) && !(Ke || Ve))
|
|
32455
32455
|
return u.value = null;
|
|
32456
32456
|
if (!u.value) {
|
|
32457
|
-
if (me <= 0 ||
|
|
32457
|
+
if (me <= 0 || ee <= 0) return;
|
|
32458
32458
|
u.value = {
|
|
32459
32459
|
top: me,
|
|
32460
|
-
left:
|
|
32461
|
-
right:
|
|
32460
|
+
left: ee,
|
|
32461
|
+
right: ee,
|
|
32462
32462
|
bottom: me,
|
|
32463
|
-
startX:
|
|
32463
|
+
startX: ee,
|
|
32464
32464
|
startY: me,
|
|
32465
32465
|
source: Xt
|
|
32466
32466
|
};
|
|
32467
32467
|
}
|
|
32468
|
-
|
|
32468
|
+
ee && (u.value.startX = ee), me && (u.value.startY = me);
|
|
32469
32469
|
const In = u.value.startY;
|
|
32470
32470
|
Ve < In ? u.value.top = Ve : u.value.bottom = Ve;
|
|
32471
32471
|
const Cn = u.value.startX;
|
|
32472
32472
|
Ke < Cn ? u.value.left = Ke : u.value.right = Ke;
|
|
32473
|
-
}, nt = (
|
|
32473
|
+
}, nt = (ee) => {
|
|
32474
32474
|
pe(), oi.value.style.pointerEvents = "auto", qt(() => {
|
|
32475
32475
|
ci.value = !0;
|
|
32476
|
-
const me =
|
|
32476
|
+
const me = ee.offsetY / (f.value / 100), Ke = ee.offsetX / (f.value / 100);
|
|
32477
32477
|
be({ startX: Ke, startY: me }), oi.value.addEventListener("mousemove", lt);
|
|
32478
32478
|
});
|
|
32479
|
-
}, lt = (
|
|
32479
|
+
}, lt = (ee) => {
|
|
32480
32480
|
if (!ci.value) return;
|
|
32481
|
-
const me =
|
|
32481
|
+
const me = ee.offsetY / (f.value / 100), Ke = ee.offsetX / (f.value / 100);
|
|
32482
32482
|
be({ x: Ke, y: me });
|
|
32483
|
-
}, vt = (
|
|
32483
|
+
}, vt = (ee) => {
|
|
32484
32484
|
if (!ci.value || (oi.value.removeEventListener("mousemove", lt), !u.value)) return;
|
|
32485
32485
|
const me = zs({
|
|
32486
32486
|
selectionBounds: {
|
|
@@ -32492,16 +32492,16 @@ const yy = ["innerHTML"], by = { class: "superdoc__document document" }, wy = {
|
|
|
32492
32492
|
documentId: A.value[0].id
|
|
32493
32493
|
});
|
|
32494
32494
|
le(me), oi.value.style.pointerEvents = "none";
|
|
32495
|
-
}, Wt = ae(() => !(q.$superdoc.config.modules?.comments).readOnly), rt = (
|
|
32496
|
-
|
|
32497
|
-
}, Ht = (
|
|
32498
|
-
Lt.value && (pe(), ci.value = !0, nt(
|
|
32495
|
+
}, Wt = ae(() => !(q.$superdoc.config.modules?.comments).readOnly), rt = (ee, me) => {
|
|
32496
|
+
ee.documentMarginsLastChange = me.pageMargins;
|
|
32497
|
+
}, Ht = (ee) => {
|
|
32498
|
+
Lt.value && (pe(), ci.value = !0, nt(ee));
|
|
32499
32499
|
};
|
|
32500
32500
|
return wt(G, () => {
|
|
32501
32501
|
P.value = !1, qt(() => {
|
|
32502
32502
|
P.value = !0;
|
|
32503
32503
|
});
|
|
32504
|
-
}), (
|
|
32504
|
+
}), (ee, me) => {
|
|
32505
32505
|
const Ke = Zl("click-outside");
|
|
32506
32506
|
return fe(), ye("div", {
|
|
32507
32507
|
class: Xs(["superdoc", { "superdoc--with-sidebar": Ai.value }])
|
|
@@ -32509,7 +32509,7 @@ const yy = ["innerHTML"], by = { class: "superdoc__document document" }, wy = {
|
|
|
32509
32509
|
We("div", {
|
|
32510
32510
|
class: "superdoc__layers layers",
|
|
32511
32511
|
ref_key: "layers",
|
|
32512
|
-
ref:
|
|
32512
|
+
ref: $
|
|
32513
32513
|
}, [
|
|
32514
32514
|
zi.value ? (fe(), ye("div", {
|
|
32515
32515
|
key: 0,
|
|
@@ -32550,7 +32550,7 @@ const yy = ["innerHTML"], by = { class: "superdoc__document document" }, wy = {
|
|
|
32550
32550
|
class: "superdoc__temp-selection temp-selection sd-highlight sd-initial-highlight"
|
|
32551
32551
|
}, null, 4)) : Ze("", !0)
|
|
32552
32552
|
], 544)) : Ze("", !0),
|
|
32553
|
-
"hrbr-fields" in Fe(m) &&
|
|
32553
|
+
"hrbr-fields" in Fe(m) && $.value ? (fe(), hi(hy, {
|
|
32554
32554
|
key: 1,
|
|
32555
32555
|
fields: Fe(m)["hrbr-fields"],
|
|
32556
32556
|
class: "superdoc__comments-layer comments-layer",
|
|
@@ -32558,13 +32558,13 @@ const yy = ["innerHTML"], by = { class: "superdoc__document document" }, wy = {
|
|
|
32558
32558
|
ref_key: "hrbrFieldsLayer",
|
|
32559
32559
|
ref: X
|
|
32560
32560
|
}, null, 8, ["fields"])) : Ze("", !0),
|
|
32561
|
-
|
|
32561
|
+
$.value ? (fe(), hi(Y9, {
|
|
32562
32562
|
key: 2,
|
|
32563
32563
|
class: "superdoc__comments-layer comments-layer",
|
|
32564
32564
|
style: { "z-index": "3" },
|
|
32565
32565
|
ref_key: "commentsLayer",
|
|
32566
32566
|
ref: te,
|
|
32567
|
-
parent:
|
|
32567
|
+
parent: $.value,
|
|
32568
32568
|
user: Fe(b),
|
|
32569
32569
|
onHighlightClick: _e
|
|
32570
32570
|
}, null, 8, ["parent", "user"])) : Ze("", !0),
|
|
@@ -32617,7 +32617,7 @@ const yy = ["innerHTML"], by = { class: "superdoc__document document" }, wy = {
|
|
|
32617
32617
|
]) : Ze("", !0),
|
|
32618
32618
|
We("div", Sy, [
|
|
32619
32619
|
Fe(P) && Fe(G).length > 0 ? (fe(!0), ye(jt, { key: 0 }, gn(Fe(k), (Ve) => (fe(), hi(j9, {
|
|
32620
|
-
parent:
|
|
32620
|
+
parent: $.value,
|
|
32621
32621
|
"current-document": Ve
|
|
32622
32622
|
}, null, 8, ["parent", "current-document"]))), 256)) : Ze("", !0)
|
|
32623
32623
|
])
|
|
@@ -32639,7 +32639,7 @@ const yy = ["innerHTML"], by = { class: "superdoc__document document" }, wy = {
|
|
|
32639
32639
|
], 2);
|
|
32640
32640
|
};
|
|
32641
32641
|
}
|
|
32642
|
-
}, vy = /* @__PURE__ */ Mt(Dy, [["__scopeId", "data-v-
|
|
32642
|
+
}, vy = /* @__PURE__ */ Mt(Dy, [["__scopeId", "data-v-08858e4d"]]), Fy = () => {
|
|
32643
32643
|
const n = $l(vy), t = yI();
|
|
32644
32644
|
n.use(t), n.directive("click-outside", ng);
|
|
32645
32645
|
const i = Ri(), r = hn();
|
|
@@ -32717,7 +32717,7 @@ class hb extends eg {
|
|
|
32717
32717
|
this.config = {
|
|
32718
32718
|
...this.config,
|
|
32719
32719
|
...t
|
|
32720
|
-
}, this.config.colors = NI(this.config.colors), this.userColorMap = /* @__PURE__ */ new Map(), this.colorIndex = 0, this.version = "0.
|
|
32720
|
+
}, this.config.colors = NI(this.config.colors), this.userColorMap = /* @__PURE__ */ new Map(), this.colorIndex = 0, this.version = "0.12.0-RC2", console.debug("🦋 [superdoc] Using SuperDoc version:", this.version), this.superdocId = t.superdocId || ig(), this.colors = this.config.colors, this.#t(), await this.#r(this.config.modules), this.#i(), this.#s(), this.user = this.config.user, this.users = this.config.users || [], this.socket = null, this.isDev = this.config.isDev || !1, this.activeEditor = null, this.comments = [], this.app.mount(this.config.selector), this.readyEditors = 0, this.isLocked = this.config.isLocked || !1, this.lockedBy = this.config.lockedBy || null, this.#a();
|
|
32721
32721
|
}
|
|
32722
32722
|
/**
|
|
32723
32723
|
* Get the number of editors that are required for this superdoc
|