@lateralus-ai/shipping-ui 1.4.12 → 1.4.13
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.cjs +1 -1
- package/dist/index.esm.js +609 -592
- package/package.json +1 -1
- package/src/components/PdfViewer/PdfViewer.tsx +25 -2
package/dist/index.esm.js
CHANGED
|
@@ -5,7 +5,7 @@ var Zv = (i) => {
|
|
|
5
5
|
var zE = (i, e, t) => e in i ? BE(i, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : i[e] = t;
|
|
6
6
|
var Re = (i, e, t) => zE(i, typeof e != "symbol" ? e + "" : e, t), gm = (i, e, t) => e.has(i) || Zv("Cannot " + t);
|
|
7
7
|
var u = (i, e, t) => (gm(i, e, "read from private field"), t ? t.call(i) : e.get(i)), N = (i, e, t) => e.has(i) ? Zv("Cannot add the same private member more than once") : e instanceof WeakSet ? e.add(i) : e.set(i, t), T = (i, e, t, r) => (gm(i, e, "write to private field"), r ? r.call(i, t) : e.set(i, t), t), L = (i, e, t) => (gm(i, e, "access private method"), t);
|
|
8
|
-
var
|
|
8
|
+
var yn = (i, e, t, r) => ({
|
|
9
9
|
set _(n) {
|
|
10
10
|
T(i, e, n, t);
|
|
11
11
|
},
|
|
@@ -13,7 +13,7 @@ var vn = (i, e, t, r) => ({
|
|
|
13
13
|
return u(i, e, r);
|
|
14
14
|
}
|
|
15
15
|
});
|
|
16
|
-
import Z2, { useState as
|
|
16
|
+
import Z2, { useState as gn, createContext as Mb, useContext as wo, useCallback as gr, useEffect as Ut, useReducer as jE, forwardRef as UE, useRef as Wi, useImperativeHandle as HE, useMemo as Zi, useLayoutEffect as $E } from "react";
|
|
17
17
|
import { Tooltip as Lb, IconButton as fn, ButtonGroup as Eu, Tabs as VE, TabsHeader as qE, Tab as Kv, TabsBody as GE, TabPanel as Qv } from "@material-tailwind/react";
|
|
18
18
|
import WE from "react-textarea-autosize";
|
|
19
19
|
import { Icon as Gi } from "@iconify/react";
|
|
@@ -1243,7 +1243,7 @@ Check the top-level render call using <` + Ue + ">.");
|
|
|
1243
1243
|
}
|
|
1244
1244
|
}
|
|
1245
1245
|
}
|
|
1246
|
-
function
|
|
1246
|
+
function vn(Q) {
|
|
1247
1247
|
{
|
|
1248
1248
|
var Pe = Q.type;
|
|
1249
1249
|
if (Pe == null || typeof Pe == "string")
|
|
@@ -1268,7 +1268,7 @@ Check the top-level render call using <` + Ue + ">.");
|
|
|
1268
1268
|
typeof Pe.getDefaultProps == "function" && !Pe.getDefaultProps.isReactClassApproved && A("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
|
|
1269
1269
|
}
|
|
1270
1270
|
}
|
|
1271
|
-
function
|
|
1271
|
+
function es(Q) {
|
|
1272
1272
|
{
|
|
1273
1273
|
for (var Pe = Object.keys(Q.props), Ue = 0; Ue < Pe.length; Ue++) {
|
|
1274
1274
|
var Qe = Pe[Ue];
|
|
@@ -1322,7 +1322,7 @@ React keys must be passed directly to JSX without using spread:
|
|
|
1322
1322
|
<%s key={someKey} {...props} />`, au, ks, im, ks), $n[ks + au] = !0;
|
|
1323
1323
|
}
|
|
1324
1324
|
}
|
|
1325
|
-
return Q === r ?
|
|
1325
|
+
return Q === r ? es(zt) : vn(zt), zt;
|
|
1326
1326
|
}
|
|
1327
1327
|
}
|
|
1328
1328
|
function Wr(Q, Pe, Ue) {
|
|
@@ -3498,7 +3498,7 @@ const S_ = ({
|
|
|
3498
3498
|
className: e,
|
|
3499
3499
|
...t
|
|
3500
3500
|
}) => {
|
|
3501
|
-
const [r, n] =
|
|
3501
|
+
const [r, n] = gn(!1);
|
|
3502
3502
|
return /* @__PURE__ */ ve.jsx(Lb, { content: i, children: /* @__PURE__ */ ve.jsx(
|
|
3503
3503
|
fn,
|
|
3504
3504
|
{
|
|
@@ -3559,7 +3559,7 @@ const S_ = ({
|
|
|
3559
3559
|
isCollapsed: e,
|
|
3560
3560
|
onSwitchLayout: t
|
|
3561
3561
|
}) => {
|
|
3562
|
-
const [r, n] =
|
|
3562
|
+
const [r, n] = gn(!1), [s, a] = gn(!1), o = e !== void 0 ? e : r, l = (c) => {
|
|
3563
3563
|
const h = c ?? !o;
|
|
3564
3564
|
e === void 0 && n(h), t == null || t(h);
|
|
3565
3565
|
};
|
|
@@ -3802,7 +3802,7 @@ const I_ = () => {
|
|
|
3802
3802
|
)
|
|
3803
3803
|
}
|
|
3804
3804
|
), u1 = (i = 100, e = 50, t = 990, r = 10) => {
|
|
3805
|
-
const [n, s] =
|
|
3805
|
+
const [n, s] = gn(i);
|
|
3806
3806
|
return [n, { ...{
|
|
3807
3807
|
zoomIn: () => s((l) => Math.min(l + r, t)),
|
|
3808
3808
|
zoomOut: () => s((l) => Math.max(l - r, e)),
|
|
@@ -3814,13 +3814,13 @@ const I_ = () => {
|
|
|
3814
3814
|
s((h) => Math.max(e, Math.min(h + c, t)));
|
|
3815
3815
|
} }];
|
|
3816
3816
|
}, c1 = () => {
|
|
3817
|
-
const [i, e] =
|
|
3817
|
+
const [i, e] = gn(0);
|
|
3818
3818
|
return [i, {
|
|
3819
3819
|
rotateClockwise: () => e((r) => (r + 90) % 360),
|
|
3820
3820
|
rotateCounterClockwise: () => e((r) => (r - 90 + 360) % 360)
|
|
3821
3821
|
}];
|
|
3822
3822
|
}, h1 = () => {
|
|
3823
|
-
const [i, e] =
|
|
3823
|
+
const [i, e] = gn({ x: 0, y: 0 }), [t, r] = gn(!1), [n, s] = gn({ x: 0, y: 0 });
|
|
3824
3824
|
return [{ pan: i, isDragging: t }, {
|
|
3825
3825
|
handleMouseDown: (h) => {
|
|
3826
3826
|
r(!0), s({
|
|
@@ -3840,7 +3840,7 @@ const I_ = () => {
|
|
|
3840
3840
|
reset: () => e({ x: 0, y: 0 })
|
|
3841
3841
|
}];
|
|
3842
3842
|
}, d1 = (i = 0, e = 1) => {
|
|
3843
|
-
const [t, r] =
|
|
3843
|
+
const [t, r] = gn(e), [n, s] = gn(i), a = {
|
|
3844
3844
|
nextPage: gr(() => {
|
|
3845
3845
|
r((o) => o < n ? o + 1 : o);
|
|
3846
3846
|
}, [n]),
|
|
@@ -3872,11 +3872,11 @@ const I_ = () => {
|
|
|
3872
3872
|
const [c, h] = u1(), [d, p] = c1(), [{ pan: g, isDragging: w }, b] = h1(), [{ currentPage: y }, v] = d1(
|
|
3873
3873
|
s,
|
|
3874
3874
|
r
|
|
3875
|
-
), [A, E] =
|
|
3875
|
+
), [A, E] = gn(() => {
|
|
3876
3876
|
const C = a(y);
|
|
3877
3877
|
return typeof C == "string" ? C : "";
|
|
3878
3878
|
});
|
|
3879
|
-
|
|
3879
|
+
Ut(() => {
|
|
3880
3880
|
let C = !0;
|
|
3881
3881
|
return (async () => {
|
|
3882
3882
|
const k = a(y), D = await Promise.resolve(k);
|
|
@@ -4041,7 +4041,7 @@ const I_ = () => {
|
|
|
4041
4041
|
)
|
|
4042
4042
|
] }) })
|
|
4043
4043
|
] });
|
|
4044
|
-
},
|
|
4044
|
+
}, Sn = typeof process == "object" && process + "" == "[object process]" && !process.versions.nw && !(process.versions.electron && process.type && process.type !== "browser"), u0 = [1e-3, 0, 0, 1e-3, 0, 0], bm = 1.35, ai = {
|
|
4045
4045
|
ANY: 1,
|
|
4046
4046
|
DISPLAY: 2,
|
|
4047
4047
|
PRINT: 4,
|
|
@@ -4845,7 +4845,7 @@ function cr(i) {
|
|
|
4845
4845
|
} = i.getTransform();
|
|
4846
4846
|
return [e, t, r, n, s, a];
|
|
4847
4847
|
}
|
|
4848
|
-
function
|
|
4848
|
+
function ts(i) {
|
|
4849
4849
|
const {
|
|
4850
4850
|
a: e,
|
|
4851
4851
|
b: t,
|
|
@@ -4868,11 +4868,11 @@ function co(i, e, t = !1, r = !0) {
|
|
|
4868
4868
|
}
|
|
4869
4869
|
r && i.setAttribute("data-main-rotation", e.rotation);
|
|
4870
4870
|
}
|
|
4871
|
-
class
|
|
4871
|
+
class Ki {
|
|
4872
4872
|
constructor() {
|
|
4873
4873
|
const {
|
|
4874
4874
|
pixelRatio: e
|
|
4875
|
-
} =
|
|
4875
|
+
} = Ki;
|
|
4876
4876
|
this.sx = e, this.sy = e;
|
|
4877
4877
|
}
|
|
4878
4878
|
get scaled() {
|
|
@@ -4883,7 +4883,7 @@ class Zi {
|
|
|
4883
4883
|
}
|
|
4884
4884
|
limitCanvas(e, t, r, n, s = -1) {
|
|
4885
4885
|
let a = 1 / 0, o = 1 / 0, l = 1 / 0;
|
|
4886
|
-
r =
|
|
4886
|
+
r = Ki.capPixels(r, s), r > 0 && (a = Math.sqrt(r / (e * t))), n !== -1 && (o = n / e, l = n / t);
|
|
4887
4887
|
const c = Math.min(a, o, l);
|
|
4888
4888
|
return this.sx > c || this.sy > c ? (this.sx = c, this.sy = c, !0) : !1;
|
|
4889
4889
|
}
|
|
@@ -5082,7 +5082,7 @@ class Z_ {
|
|
|
5082
5082
|
N(this, fg, 0);
|
|
5083
5083
|
}
|
|
5084
5084
|
get id() {
|
|
5085
|
-
return `${f1}${
|
|
5085
|
+
return `${f1}${yn(this, fg)._++}`;
|
|
5086
5086
|
}
|
|
5087
5087
|
}
|
|
5088
5088
|
fg = new WeakMap();
|
|
@@ -5143,7 +5143,7 @@ const _v = class _v {
|
|
|
5143
5143
|
const n = new OffscreenCanvas(t.width, t.height);
|
|
5144
5144
|
return n.getContext("2d").drawImage(t, 0, 0), r = {
|
|
5145
5145
|
bitmap: n.transferToImageBitmap(),
|
|
5146
|
-
id: `image_${u(this, Du)}_${
|
|
5146
|
+
id: `image_${u(this, Du)}_${yn(this, ad)._++}`,
|
|
5147
5147
|
refCounter: 1,
|
|
5148
5148
|
isSvg: !1
|
|
5149
5149
|
}, u(this, un).set(e, r), u(this, un).set(r.id, r), r;
|
|
@@ -5181,7 +5181,7 @@ Du = new WeakMap(), ad = new WeakMap(), un = new WeakMap(), Pu = new WeakSet(),
|
|
|
5181
5181
|
try {
|
|
5182
5182
|
r || (r = {
|
|
5183
5183
|
bitmap: null,
|
|
5184
|
-
id: `image_${u(this, Du)}_${
|
|
5184
|
+
id: `image_${u(this, Du)}_${yn(this, ad)._++}`,
|
|
5185
5185
|
refCounter: 0,
|
|
5186
5186
|
isSvg: !1
|
|
5187
5187
|
});
|
|
@@ -5346,7 +5346,7 @@ const gg = class gg {
|
|
|
5346
5346
|
};
|
|
5347
5347
|
Re(gg, "_colorsMapping", /* @__PURE__ */ new Map([["CanvasText", [0, 0, 0]], ["Canvas", [255, 255, 255]]]));
|
|
5348
5348
|
let f0 = gg;
|
|
5349
|
-
var Ru, Gn, Ir, Yr, Iu, Os, Nu, pi, ka, Da, Mu, jo,
|
|
5349
|
+
var Ru, Gn, Ir, Yr, Iu, Os, Nu, pi, ka, Da, Mu, jo, ss, Mi, Uo, ld, ud, Lu, cd, as, Pa, Ou, Ra, os, mg, Ia, hd, Na, Ho, $o, Ma, dd, zr, jt, Fs, La, Vo, fd, pd, Oa, ls, Bs, gd, md, gi, Be, _p, p0, P1, R1, Cp, I1, N1, M1, g0, L1, m0, b0, O1, xn, Is, F1, B1, v0, z1, ph, y0;
|
|
5350
5350
|
const xu = class xu {
|
|
5351
5351
|
constructor(e, t, r, n, s, a, o, l, c, h, d, p, g, w, b) {
|
|
5352
5352
|
N(this, Be);
|
|
@@ -5362,7 +5362,7 @@ const xu = class xu {
|
|
|
5362
5362
|
N(this, Da, null);
|
|
5363
5363
|
N(this, Mu, 0);
|
|
5364
5364
|
N(this, jo, /* @__PURE__ */ new Set());
|
|
5365
|
-
N(this,
|
|
5365
|
+
N(this, ss, null);
|
|
5366
5366
|
N(this, Mi, null);
|
|
5367
5367
|
N(this, Uo, /* @__PURE__ */ new Set());
|
|
5368
5368
|
Re(this, "_editorUndoBar", null);
|
|
@@ -5370,11 +5370,11 @@ const xu = class xu {
|
|
|
5370
5370
|
N(this, ud, !1);
|
|
5371
5371
|
N(this, Lu, !1);
|
|
5372
5372
|
N(this, cd, null);
|
|
5373
|
-
N(this,
|
|
5373
|
+
N(this, as, null);
|
|
5374
5374
|
N(this, Pa, null);
|
|
5375
5375
|
N(this, Ou, null);
|
|
5376
5376
|
N(this, Ra, !1);
|
|
5377
|
-
N(this,
|
|
5377
|
+
N(this, os, null);
|
|
5378
5378
|
N(this, mg, new Z_());
|
|
5379
5379
|
N(this, Ia, !1);
|
|
5380
5380
|
N(this, hd, !1);
|
|
@@ -5398,7 +5398,7 @@ const xu = class xu {
|
|
|
5398
5398
|
hasSelectedText: !1
|
|
5399
5399
|
});
|
|
5400
5400
|
N(this, Oa, [0, 0]);
|
|
5401
|
-
N(this,
|
|
5401
|
+
N(this, ls, null);
|
|
5402
5402
|
N(this, Bs, null);
|
|
5403
5403
|
N(this, gd, null);
|
|
5404
5404
|
N(this, md, null);
|
|
@@ -5480,7 +5480,7 @@ const xu = class xu {
|
|
|
5480
5480
|
(e = u(this, gi)) == null || e.resolve(), T(this, gi, null), (t = u(this, Ru)) == null || t.abort(), T(this, Ru, null), this._signal = null;
|
|
5481
5481
|
for (const c of u(this, Yr).values())
|
|
5482
5482
|
c.destroy();
|
|
5483
|
-
u(this, Yr).clear(), u(this, Ir).clear(), u(this, Uo).clear(), (r = u(this, Ma)) == null || r.clear(), T(this, Gn, null), u(this, jt).clear(), u(this, pi).destroy(), (n = u(this, Iu)) == null || n.destroy(), (s = u(this, La)) == null || s.destroy(), (a = u(this,
|
|
5483
|
+
u(this, Yr).clear(), u(this, Ir).clear(), u(this, Uo).clear(), (r = u(this, Ma)) == null || r.clear(), T(this, Gn, null), u(this, jt).clear(), u(this, pi).destroy(), (n = u(this, Iu)) == null || n.destroy(), (s = u(this, La)) == null || s.destroy(), (a = u(this, os)) == null || a.hide(), T(this, os, null), (o = u(this, $o)) == null || o.destroy(), T(this, $o, null), u(this, as) && (clearTimeout(u(this, as)), T(this, as, null)), u(this, ls) && (clearTimeout(u(this, ls)), T(this, ls, null)), (l = this._editorUndoBar) == null || l.destroy();
|
|
5484
5484
|
}
|
|
5485
5485
|
combinedSignal(e) {
|
|
5486
5486
|
return AbortSignal.any([this._signal, e.signal]);
|
|
@@ -5768,13 +5768,13 @@ const xu = class xu {
|
|
|
5768
5768
|
}
|
|
5769
5769
|
}
|
|
5770
5770
|
setEditingState(e) {
|
|
5771
|
-
e ? (L(this, Be, N1).call(this), L(this, Be, m0).call(this), L(this, Be,
|
|
5771
|
+
e ? (L(this, Be, N1).call(this), L(this, Be, m0).call(this), L(this, Be, xn).call(this, {
|
|
5772
5772
|
isEditing: u(this, zr) !== at.NONE,
|
|
5773
5773
|
isEmpty: L(this, Be, ph).call(this),
|
|
5774
5774
|
hasSomethingToUndo: u(this, pi).hasSomethingToUndo(),
|
|
5775
5775
|
hasSomethingToRedo: u(this, pi).hasSomethingToRedo(),
|
|
5776
5776
|
hasSelectedEditor: !1
|
|
5777
|
-
})) : (L(this, Be, M1).call(this), L(this, Be, b0).call(this), L(this, Be,
|
|
5777
|
+
})) : (L(this, Be, M1).call(this), L(this, Be, b0).call(this), L(this, Be, xn).call(this, {
|
|
5778
5778
|
isEditing: !1
|
|
5779
5779
|
}), this.disableUserSelect(!1));
|
|
5780
5780
|
}
|
|
@@ -5887,8 +5887,8 @@ const xu = class xu {
|
|
|
5887
5887
|
}
|
|
5888
5888
|
removeEditor(e) {
|
|
5889
5889
|
var t, r;
|
|
5890
|
-
e.div.contains(document.activeElement) && (u(this,
|
|
5891
|
-
this.focusMainContainer(), T(this,
|
|
5890
|
+
e.div.contains(document.activeElement) && (u(this, as) && clearTimeout(u(this, as)), T(this, as, setTimeout(() => {
|
|
5891
|
+
this.focusMainContainer(), T(this, as, null);
|
|
5892
5892
|
}, 0))), u(this, Ir).delete(e.id), e.annotationElementId && ((t = u(this, Ma)) == null || t.delete(e.annotationElementId)), this.unselect(e), (!e.annotationElementId || !u(this, jo).has(e.annotationElementId)) && ((r = u(this, Os)) == null || r.remove(e.id));
|
|
5893
5893
|
}
|
|
5894
5894
|
addDeletedAnnotationElement(e) {
|
|
@@ -5911,12 +5911,12 @@ const xu = class xu {
|
|
|
5911
5911
|
}
|
|
5912
5912
|
toggleSelected(e) {
|
|
5913
5913
|
if (u(this, jt).has(e)) {
|
|
5914
|
-
u(this, jt).delete(e), e.unselect(), L(this, Be,
|
|
5914
|
+
u(this, jt).delete(e), e.unselect(), L(this, Be, xn).call(this, {
|
|
5915
5915
|
hasSelectedEditor: this.hasSelection
|
|
5916
5916
|
});
|
|
5917
5917
|
return;
|
|
5918
5918
|
}
|
|
5919
|
-
u(this, jt).add(e), e.select(), L(this, Be, Is).call(this, e.propertiesToUpdate), L(this, Be,
|
|
5919
|
+
u(this, jt).add(e), e.select(), L(this, Be, Is).call(this, e.propertiesToUpdate), L(this, Be, xn).call(this, {
|
|
5920
5920
|
hasSelectedEditor: !0
|
|
5921
5921
|
});
|
|
5922
5922
|
}
|
|
@@ -5928,7 +5928,7 @@ const xu = class xu {
|
|
|
5928
5928
|
}), (t = u(this, Da)) == null || t.commitOrRemove();
|
|
5929
5929
|
for (const r of u(this, jt))
|
|
5930
5930
|
r !== e && r.unselect();
|
|
5931
|
-
u(this, jt).clear(), u(this, jt).add(e), e.select(), L(this, Be, Is).call(this, e.propertiesToUpdate), L(this, Be,
|
|
5931
|
+
u(this, jt).clear(), u(this, jt).add(e), e.select(), L(this, Be, Is).call(this, e.propertiesToUpdate), L(this, Be, xn).call(this, {
|
|
5932
5932
|
hasSelectedEditor: !0
|
|
5933
5933
|
});
|
|
5934
5934
|
}
|
|
@@ -5939,7 +5939,7 @@ const xu = class xu {
|
|
|
5939
5939
|
return u(this, jt).values().next().value;
|
|
5940
5940
|
}
|
|
5941
5941
|
unselect(e) {
|
|
5942
|
-
e.unselect(), u(this, jt).delete(e), L(this, Be,
|
|
5942
|
+
e.unselect(), u(this, jt).delete(e), L(this, Be, xn).call(this, {
|
|
5943
5943
|
hasSelectedEditor: this.hasSelection
|
|
5944
5944
|
});
|
|
5945
5945
|
}
|
|
@@ -5951,21 +5951,21 @@ const xu = class xu {
|
|
|
5951
5951
|
}
|
|
5952
5952
|
undo() {
|
|
5953
5953
|
var e;
|
|
5954
|
-
u(this, pi).undo(), L(this, Be,
|
|
5954
|
+
u(this, pi).undo(), L(this, Be, xn).call(this, {
|
|
5955
5955
|
hasSomethingToUndo: u(this, pi).hasSomethingToUndo(),
|
|
5956
5956
|
hasSomethingToRedo: !0,
|
|
5957
5957
|
isEmpty: L(this, Be, ph).call(this)
|
|
5958
5958
|
}), (e = this._editorUndoBar) == null || e.hide();
|
|
5959
5959
|
}
|
|
5960
5960
|
redo() {
|
|
5961
|
-
u(this, pi).redo(), L(this, Be,
|
|
5961
|
+
u(this, pi).redo(), L(this, Be, xn).call(this, {
|
|
5962
5962
|
hasSomethingToUndo: !0,
|
|
5963
5963
|
hasSomethingToRedo: u(this, pi).hasSomethingToRedo(),
|
|
5964
5964
|
isEmpty: L(this, Be, ph).call(this)
|
|
5965
5965
|
});
|
|
5966
5966
|
}
|
|
5967
5967
|
addCommands(e) {
|
|
5968
|
-
u(this, pi).add(e), L(this, Be,
|
|
5968
|
+
u(this, pi).add(e), L(this, Be, xn).call(this, {
|
|
5969
5969
|
hasSomethingToUndo: !0,
|
|
5970
5970
|
hasSomethingToRedo: !1,
|
|
5971
5971
|
isEmpty: L(this, Be, ph).call(this)
|
|
@@ -6012,7 +6012,7 @@ const xu = class xu {
|
|
|
6012
6012
|
if (!(u(this, Gn) && (u(this, Gn).commitOrRemove(), u(this, zr) !== at.NONE)) && !((e = u(this, Da)) != null && e.commitOrRemove()) && this.hasSelection) {
|
|
6013
6013
|
for (const t of u(this, jt))
|
|
6014
6014
|
t.unselect();
|
|
6015
|
-
u(this, jt).clear(), L(this, Be,
|
|
6015
|
+
u(this, jt).clear(), L(this, Be, xn).call(this, {
|
|
6016
6016
|
hasSelectedEditor: !1
|
|
6017
6017
|
});
|
|
6018
6018
|
}
|
|
@@ -6022,8 +6022,8 @@ const xu = class xu {
|
|
|
6022
6022
|
return;
|
|
6023
6023
|
u(this, Oa)[0] += e, u(this, Oa)[1] += t;
|
|
6024
6024
|
const [n, s] = u(this, Oa), a = [...u(this, jt)], o = 1e3;
|
|
6025
|
-
u(this,
|
|
6026
|
-
T(this,
|
|
6025
|
+
u(this, ls) && clearTimeout(u(this, ls)), T(this, ls, setTimeout(() => {
|
|
6026
|
+
T(this, ls, null), u(this, Oa)[0] = u(this, Oa)[1] = 0, this.addCommands({
|
|
6027
6027
|
cmd: () => {
|
|
6028
6028
|
for (const l of a)
|
|
6029
6029
|
u(this, Ir).has(l.id) && (l.translateInPage(n, s), l.translationDone());
|
|
@@ -6040,9 +6040,9 @@ const xu = class xu {
|
|
|
6040
6040
|
}
|
|
6041
6041
|
setUpDragSession() {
|
|
6042
6042
|
if (this.hasSelection) {
|
|
6043
|
-
this.disableUserSelect(!0), T(this,
|
|
6043
|
+
this.disableUserSelect(!0), T(this, ss, /* @__PURE__ */ new Map());
|
|
6044
6044
|
for (const e of u(this, jt))
|
|
6045
|
-
u(this,
|
|
6045
|
+
u(this, ss).set(e, {
|
|
6046
6046
|
savedX: e.x,
|
|
6047
6047
|
savedY: e.y,
|
|
6048
6048
|
savedPageIndex: e.pageIndex,
|
|
@@ -6053,11 +6053,11 @@ const xu = class xu {
|
|
|
6053
6053
|
}
|
|
6054
6054
|
}
|
|
6055
6055
|
endDragSession() {
|
|
6056
|
-
if (!u(this,
|
|
6056
|
+
if (!u(this, ss))
|
|
6057
6057
|
return !1;
|
|
6058
6058
|
this.disableUserSelect(!1);
|
|
6059
|
-
const e = u(this,
|
|
6060
|
-
T(this,
|
|
6059
|
+
const e = u(this, ss);
|
|
6060
|
+
T(this, ss, null);
|
|
6061
6061
|
let t = !1;
|
|
6062
6062
|
for (const [{
|
|
6063
6063
|
x: n,
|
|
@@ -6094,8 +6094,8 @@ const xu = class xu {
|
|
|
6094
6094
|
}), !0;
|
|
6095
6095
|
}
|
|
6096
6096
|
dragSelectedEditors(e, t) {
|
|
6097
|
-
if (u(this,
|
|
6098
|
-
for (const r of u(this,
|
|
6097
|
+
if (u(this, ss))
|
|
6098
|
+
for (const r of u(this, ss).keys())
|
|
6099
6099
|
r.drag(e, t);
|
|
6100
6100
|
}
|
|
6101
6101
|
rebuild(e) {
|
|
@@ -6212,7 +6212,7 @@ const xu = class xu {
|
|
|
6212
6212
|
(u(this, Ma) || T(this, Ma, /* @__PURE__ */ new Map())).set(e, t);
|
|
6213
6213
|
}
|
|
6214
6214
|
};
|
|
6215
|
-
Ru = new WeakMap(), Gn = new WeakMap(), Ir = new WeakMap(), Yr = new WeakMap(), Iu = new WeakMap(), Os = new WeakMap(), Nu = new WeakMap(), pi = new WeakMap(), ka = new WeakMap(), Da = new WeakMap(), Mu = new WeakMap(), jo = new WeakMap(),
|
|
6215
|
+
Ru = new WeakMap(), Gn = new WeakMap(), Ir = new WeakMap(), Yr = new WeakMap(), Iu = new WeakMap(), Os = new WeakMap(), Nu = new WeakMap(), pi = new WeakMap(), ka = new WeakMap(), Da = new WeakMap(), Mu = new WeakMap(), jo = new WeakMap(), ss = new WeakMap(), Mi = new WeakMap(), Uo = new WeakMap(), ld = new WeakMap(), ud = new WeakMap(), Lu = new WeakMap(), cd = new WeakMap(), as = new WeakMap(), Pa = new WeakMap(), Ou = new WeakMap(), Ra = new WeakMap(), os = new WeakMap(), mg = new WeakMap(), Ia = new WeakMap(), hd = new WeakMap(), Na = new WeakMap(), Ho = new WeakMap(), $o = new WeakMap(), Ma = new WeakMap(), dd = new WeakMap(), zr = new WeakMap(), jt = new WeakMap(), Fs = new WeakMap(), La = new WeakMap(), Vo = new WeakMap(), fd = new WeakMap(), pd = new WeakMap(), Oa = new WeakMap(), ls = new WeakMap(), Bs = new WeakMap(), gd = new WeakMap(), md = new WeakMap(), gi = new WeakMap(), Be = new WeakSet(), _p = function({
|
|
6216
6216
|
anchorNode: e
|
|
6217
6217
|
}) {
|
|
6218
6218
|
return e.nodeType === Node.TEXT_NODE ? e.parentElement : e;
|
|
@@ -6231,12 +6231,12 @@ Ru = new WeakMap(), Gn = new WeakMap(), Ir = new WeakMap(), Yr = new WeakMap(),
|
|
|
6231
6231
|
if (!e || e.isCollapsed)
|
|
6232
6232
|
return;
|
|
6233
6233
|
const r = L(this, Be, _p).call(this, e).closest(".textLayer"), n = this.getSelectionBoxes(r);
|
|
6234
|
-
n && (u(this,
|
|
6234
|
+
n && (u(this, os) || T(this, os, new Y_(this)), u(this, os).show(r, n, this.direction === "ltr"));
|
|
6235
6235
|
}, R1 = function() {
|
|
6236
6236
|
var s, a, o;
|
|
6237
6237
|
const e = document.getSelection();
|
|
6238
6238
|
if (!e || e.isCollapsed) {
|
|
6239
|
-
u(this, Fs) && ((s = u(this,
|
|
6239
|
+
u(this, Fs) && ((s = u(this, os)) == null || s.hide(), T(this, Fs, null), L(this, Be, xn).call(this, {
|
|
6240
6240
|
hasSelectedText: !1
|
|
6241
6241
|
}));
|
|
6242
6242
|
return;
|
|
@@ -6248,12 +6248,12 @@ Ru = new WeakMap(), Gn = new WeakMap(), Ir = new WeakMap(), Yr = new WeakMap(),
|
|
|
6248
6248
|
return;
|
|
6249
6249
|
const n = L(this, Be, _p).call(this, e).closest(".textLayer");
|
|
6250
6250
|
if (!n) {
|
|
6251
|
-
u(this, Fs) && ((a = u(this,
|
|
6251
|
+
u(this, Fs) && ((a = u(this, os)) == null || a.hide(), T(this, Fs, null), L(this, Be, xn).call(this, {
|
|
6252
6252
|
hasSelectedText: !1
|
|
6253
6253
|
}));
|
|
6254
6254
|
return;
|
|
6255
6255
|
}
|
|
6256
|
-
if ((o = u(this,
|
|
6256
|
+
if ((o = u(this, os)) == null || o.hide(), T(this, Fs, t), L(this, Be, xn).call(this, {
|
|
6257
6257
|
hasSelectedText: !0
|
|
6258
6258
|
}), !(u(this, zr) !== at.HIGHLIGHT && u(this, zr) !== at.NONE) && (u(this, zr) === at.HIGHLIGHT && this.showAllEditors("highlight", !0, !0), T(this, Ra, this.isShiftKeyDown), !this.isShiftKeyDown)) {
|
|
6259
6259
|
const l = u(this, zr) === at.HIGHLIGHT ? L(this, Be, p0).call(this, n) : null;
|
|
@@ -6321,7 +6321,7 @@ Ru = new WeakMap(), Gn = new WeakMap(), Ir = new WeakMap(), Yr = new WeakMap(),
|
|
|
6321
6321
|
}), document.addEventListener("drop", this.drop.bind(this), {
|
|
6322
6322
|
signal: e
|
|
6323
6323
|
});
|
|
6324
|
-
},
|
|
6324
|
+
}, xn = function(e) {
|
|
6325
6325
|
Object.entries(e).some(([r, n]) => u(this, pd)[r] !== n) && (this._eventBus.dispatch("annotationeditorstateschanged", {
|
|
6326
6326
|
source: this,
|
|
6327
6327
|
details: Object.assign(u(this, pd), e)
|
|
@@ -6370,28 +6370,28 @@ Ru = new WeakMap(), Gn = new WeakMap(), Ir = new WeakMap(), Yr = new WeakMap(),
|
|
|
6370
6370
|
u(this, jt).clear();
|
|
6371
6371
|
for (const t of e)
|
|
6372
6372
|
t.isEmpty() || (u(this, jt).add(t), t.select());
|
|
6373
|
-
L(this, Be,
|
|
6373
|
+
L(this, Be, xn).call(this, {
|
|
6374
6374
|
hasSelectedEditor: this.hasSelection
|
|
6375
6375
|
});
|
|
6376
6376
|
}, Re(xu, "TRANSLATE_SMALL", 1), Re(xu, "TRANSLATE_BIG", 10);
|
|
6377
6377
|
let ho = xu;
|
|
6378
|
-
var jr,
|
|
6379
|
-
const
|
|
6378
|
+
var jr, us, Li, Fu, cs, Wn, Bu, hs, Nn, zs, qo, ds, Fa, Yi, gh, Sp;
|
|
6379
|
+
const An = class An {
|
|
6380
6380
|
constructor(e) {
|
|
6381
|
-
N(this,
|
|
6381
|
+
N(this, Yi);
|
|
6382
6382
|
N(this, jr, null);
|
|
6383
|
-
N(this,
|
|
6383
|
+
N(this, us, !1);
|
|
6384
6384
|
N(this, Li, null);
|
|
6385
6385
|
N(this, Fu, null);
|
|
6386
|
-
N(this,
|
|
6386
|
+
N(this, cs, null);
|
|
6387
6387
|
N(this, Wn, null);
|
|
6388
6388
|
N(this, Bu, !1);
|
|
6389
|
-
N(this,
|
|
6389
|
+
N(this, hs, null);
|
|
6390
6390
|
N(this, Nn, null);
|
|
6391
6391
|
N(this, zs, null);
|
|
6392
6392
|
N(this, qo, null);
|
|
6393
|
-
N(this,
|
|
6394
|
-
T(this, Nn, e), T(this,
|
|
6393
|
+
N(this, ds, !1);
|
|
6394
|
+
T(this, Nn, e), T(this, ds, e._uiManager.useNewAltTextFlow), u(An, Fa) || T(An, Fa, Object.freeze({
|
|
6395
6395
|
added: "pdfjs-editor-new-alt-text-added-button",
|
|
6396
6396
|
"added-label": "pdfjs-editor-new-alt-text-added-button-label",
|
|
6397
6397
|
missing: "pdfjs-editor-new-alt-text-missing-button",
|
|
@@ -6401,13 +6401,13 @@ const xn = class xn {
|
|
|
6401
6401
|
}));
|
|
6402
6402
|
}
|
|
6403
6403
|
static initialize(e) {
|
|
6404
|
-
|
|
6404
|
+
An._l10n ?? (An._l10n = e);
|
|
6405
6405
|
}
|
|
6406
6406
|
async render() {
|
|
6407
6407
|
const e = T(this, Li, document.createElement("button"));
|
|
6408
6408
|
e.className = "altText", e.tabIndex = "0";
|
|
6409
6409
|
const t = T(this, Fu, document.createElement("span"));
|
|
6410
|
-
e.append(t), u(this,
|
|
6410
|
+
e.append(t), u(this, ds) ? (e.classList.add("new"), e.setAttribute("data-l10n-id", u(An, Fa).missing), t.setAttribute("data-l10n-id", u(An, Fa)["missing-label"])) : (e.setAttribute("data-l10n-id", "pdfjs-editor-alt-text-button"), t.setAttribute("data-l10n-id", "pdfjs-editor-alt-text-button-label"));
|
|
6411
6411
|
const r = u(this, Nn)._uiManager._signal;
|
|
6412
6412
|
e.addEventListener("contextmenu", _i, {
|
|
6413
6413
|
signal: r
|
|
@@ -6415,10 +6415,10 @@ const xn = class xn {
|
|
|
6415
6415
|
signal: r
|
|
6416
6416
|
});
|
|
6417
6417
|
const n = (s) => {
|
|
6418
|
-
s.preventDefault(), u(this, Nn)._uiManager.editAltText(u(this, Nn)), u(this,
|
|
6418
|
+
s.preventDefault(), u(this, Nn)._uiManager.editAltText(u(this, Nn)), u(this, ds) && u(this, Nn)._reportTelemetry({
|
|
6419
6419
|
action: "pdfjs.image.alt_text.image_status_label_clicked",
|
|
6420
6420
|
data: {
|
|
6421
|
-
label: u(this,
|
|
6421
|
+
label: u(this, Yi, gh)
|
|
6422
6422
|
}
|
|
6423
6423
|
});
|
|
6424
6424
|
};
|
|
@@ -6429,7 +6429,7 @@ const xn = class xn {
|
|
|
6429
6429
|
s.target === e && s.key === "Enter" && (T(this, Bu, !0), n(s));
|
|
6430
6430
|
}, {
|
|
6431
6431
|
signal: r
|
|
6432
|
-
}), await L(this,
|
|
6432
|
+
}), await L(this, Yi, Sp).call(this), e;
|
|
6433
6433
|
}
|
|
6434
6434
|
finish() {
|
|
6435
6435
|
u(this, Li) && (u(this, Li).focus({
|
|
@@ -6437,36 +6437,36 @@ const xn = class xn {
|
|
|
6437
6437
|
}), T(this, Bu, !1));
|
|
6438
6438
|
}
|
|
6439
6439
|
isEmpty() {
|
|
6440
|
-
return u(this,
|
|
6440
|
+
return u(this, ds) ? u(this, jr) === null : !u(this, jr) && !u(this, us);
|
|
6441
6441
|
}
|
|
6442
6442
|
hasData() {
|
|
6443
|
-
return u(this,
|
|
6443
|
+
return u(this, ds) ? u(this, jr) !== null || !!u(this, zs) : this.isEmpty();
|
|
6444
6444
|
}
|
|
6445
6445
|
get guessedText() {
|
|
6446
6446
|
return u(this, zs);
|
|
6447
6447
|
}
|
|
6448
6448
|
async setGuessedText(e) {
|
|
6449
|
-
u(this, jr) === null && (T(this, zs, e), T(this, qo, await
|
|
6449
|
+
u(this, jr) === null && (T(this, zs, e), T(this, qo, await An._l10n.get("pdfjs-editor-new-alt-text-generated-alt-text-with-disclaimer", {
|
|
6450
6450
|
generatedAltText: e
|
|
6451
|
-
})), L(this,
|
|
6451
|
+
})), L(this, Yi, Sp).call(this));
|
|
6452
6452
|
}
|
|
6453
6453
|
toggleAltTextBadge(e = !1) {
|
|
6454
6454
|
var t;
|
|
6455
|
-
if (!u(this,
|
|
6456
|
-
(t = u(this,
|
|
6455
|
+
if (!u(this, ds) || u(this, jr)) {
|
|
6456
|
+
(t = u(this, hs)) == null || t.remove(), T(this, hs, null);
|
|
6457
6457
|
return;
|
|
6458
6458
|
}
|
|
6459
|
-
if (!u(this,
|
|
6460
|
-
const r = T(this,
|
|
6459
|
+
if (!u(this, hs)) {
|
|
6460
|
+
const r = T(this, hs, document.createElement("div"));
|
|
6461
6461
|
r.className = "noAltTextBadge", u(this, Nn).div.append(r);
|
|
6462
6462
|
}
|
|
6463
|
-
u(this,
|
|
6463
|
+
u(this, hs).classList.toggle("hidden", !e);
|
|
6464
6464
|
}
|
|
6465
6465
|
serialize(e) {
|
|
6466
6466
|
let t = u(this, jr);
|
|
6467
6467
|
return !e && u(this, zs) === t && (t = u(this, qo)), {
|
|
6468
6468
|
altText: t,
|
|
6469
|
-
decorative: u(this,
|
|
6469
|
+
decorative: u(this, us),
|
|
6470
6470
|
guessedText: u(this, zs),
|
|
6471
6471
|
textWithDisclaimer: u(this, qo)
|
|
6472
6472
|
};
|
|
@@ -6474,7 +6474,7 @@ const xn = class xn {
|
|
|
6474
6474
|
get data() {
|
|
6475
6475
|
return {
|
|
6476
6476
|
altText: u(this, jr),
|
|
6477
|
-
decorative: u(this,
|
|
6477
|
+
decorative: u(this, us)
|
|
6478
6478
|
};
|
|
6479
6479
|
}
|
|
6480
6480
|
set data({
|
|
@@ -6484,7 +6484,7 @@ const xn = class xn {
|
|
|
6484
6484
|
textWithDisclaimer: n,
|
|
6485
6485
|
cancel: s = !1
|
|
6486
6486
|
}) {
|
|
6487
|
-
r && (T(this, zs, r), T(this, qo, n)), !(u(this, jr) === e && u(this,
|
|
6487
|
+
r && (T(this, zs, r), T(this, qo, n)), !(u(this, jr) === e && u(this, us) === t) && (s || (T(this, jr, e), T(this, us, t)), L(this, Yi, Sp).call(this));
|
|
6488
6488
|
}
|
|
6489
6489
|
toggle(e = !1) {
|
|
6490
6490
|
u(this, Li) && (!e && u(this, Wn) && (clearTimeout(u(this, Wn)), T(this, Wn, null)), u(this, Li).disabled = !e);
|
|
@@ -6493,37 +6493,37 @@ const xn = class xn {
|
|
|
6493
6493
|
u(this, Nn)._reportTelemetry({
|
|
6494
6494
|
action: "pdfjs.image.alt_text.image_status_label_displayed",
|
|
6495
6495
|
data: {
|
|
6496
|
-
label: u(this,
|
|
6496
|
+
label: u(this, Yi, gh)
|
|
6497
6497
|
}
|
|
6498
6498
|
});
|
|
6499
6499
|
}
|
|
6500
6500
|
destroy() {
|
|
6501
6501
|
var e, t;
|
|
6502
|
-
(e = u(this, Li)) == null || e.remove(), T(this, Li, null), T(this, Fu, null), T(this,
|
|
6502
|
+
(e = u(this, Li)) == null || e.remove(), T(this, Li, null), T(this, Fu, null), T(this, cs, null), (t = u(this, hs)) == null || t.remove(), T(this, hs, null);
|
|
6503
6503
|
}
|
|
6504
6504
|
};
|
|
6505
|
-
jr = new WeakMap(),
|
|
6505
|
+
jr = new WeakMap(), us = new WeakMap(), Li = new WeakMap(), Fu = new WeakMap(), cs = new WeakMap(), Wn = new WeakMap(), Bu = new WeakMap(), hs = new WeakMap(), Nn = new WeakMap(), zs = new WeakMap(), qo = new WeakMap(), ds = new WeakMap(), Fa = new WeakMap(), Yi = new WeakSet(), gh = function() {
|
|
6506
6506
|
return u(this, jr) && "added" || u(this, jr) === null && this.guessedText && "review" || "missing";
|
|
6507
6507
|
}, Sp = async function() {
|
|
6508
6508
|
var n, s, a;
|
|
6509
6509
|
const e = u(this, Li);
|
|
6510
6510
|
if (!e)
|
|
6511
6511
|
return;
|
|
6512
|
-
if (u(this,
|
|
6513
|
-
if (e.classList.toggle("done", !!u(this, jr)), e.setAttribute("data-l10n-id", u(
|
|
6514
|
-
(s = u(this,
|
|
6512
|
+
if (u(this, ds)) {
|
|
6513
|
+
if (e.classList.toggle("done", !!u(this, jr)), e.setAttribute("data-l10n-id", u(An, Fa)[u(this, Yi, gh)]), (n = u(this, Fu)) == null || n.setAttribute("data-l10n-id", u(An, Fa)[`${u(this, Yi, gh)}-label`]), !u(this, jr)) {
|
|
6514
|
+
(s = u(this, cs)) == null || s.remove();
|
|
6515
6515
|
return;
|
|
6516
6516
|
}
|
|
6517
6517
|
} else {
|
|
6518
|
-
if (!u(this, jr) && !u(this,
|
|
6519
|
-
e.classList.remove("done"), (a = u(this,
|
|
6518
|
+
if (!u(this, jr) && !u(this, us)) {
|
|
6519
|
+
e.classList.remove("done"), (a = u(this, cs)) == null || a.remove();
|
|
6520
6520
|
return;
|
|
6521
6521
|
}
|
|
6522
6522
|
e.classList.add("done"), e.setAttribute("data-l10n-id", "pdfjs-editor-alt-text-edit-button");
|
|
6523
6523
|
}
|
|
6524
|
-
let t = u(this,
|
|
6524
|
+
let t = u(this, cs);
|
|
6525
6525
|
if (!t) {
|
|
6526
|
-
T(this,
|
|
6526
|
+
T(this, cs, t = document.createElement("span")), t.className = "tooltip", t.setAttribute("role", "tooltip"), t.id = `alt-text-tooltip-${u(this, Nn).id}`;
|
|
6527
6527
|
const o = 100, l = u(this, Nn)._uiManager._signal;
|
|
6528
6528
|
l.addEventListener("abort", () => {
|
|
6529
6529
|
clearTimeout(u(this, Wn)), T(this, Wn, null);
|
|
@@ -6531,7 +6531,7 @@ jr = new WeakMap(), ls = new WeakMap(), Li = new WeakMap(), Fu = new WeakMap(),
|
|
|
6531
6531
|
once: !0
|
|
6532
6532
|
}), e.addEventListener("mouseenter", () => {
|
|
6533
6533
|
T(this, Wn, setTimeout(() => {
|
|
6534
|
-
T(this, Wn, null), u(this,
|
|
6534
|
+
T(this, Wn, null), u(this, cs).classList.add("show"), u(this, Nn)._reportTelemetry({
|
|
6535
6535
|
action: "alt_text_tooltip"
|
|
6536
6536
|
});
|
|
6537
6537
|
}, o));
|
|
@@ -6539,16 +6539,16 @@ jr = new WeakMap(), ls = new WeakMap(), Li = new WeakMap(), Fu = new WeakMap(),
|
|
|
6539
6539
|
signal: l
|
|
6540
6540
|
}), e.addEventListener("mouseleave", () => {
|
|
6541
6541
|
var c;
|
|
6542
|
-
u(this, Wn) && (clearTimeout(u(this, Wn)), T(this, Wn, null)), (c = u(this,
|
|
6542
|
+
u(this, Wn) && (clearTimeout(u(this, Wn)), T(this, Wn, null)), (c = u(this, cs)) == null || c.classList.remove("show");
|
|
6543
6543
|
}, {
|
|
6544
6544
|
signal: l
|
|
6545
6545
|
});
|
|
6546
6546
|
}
|
|
6547
|
-
u(this,
|
|
6547
|
+
u(this, us) ? t.setAttribute("data-l10n-id", "pdfjs-editor-alt-text-decorative-tooltip") : (t.removeAttribute("data-l10n-id"), t.textContent = u(this, jr)), t.parentNode || e.append(t);
|
|
6548
6548
|
const r = u(this, Nn).getElementForAltText();
|
|
6549
6549
|
r == null || r.setAttribute("aria-describedby", t.id);
|
|
6550
|
-
}, N(
|
|
6551
|
-
let rg =
|
|
6550
|
+
}, N(An, Fa, null), Re(An, "_l10n", null);
|
|
6551
|
+
let rg = An;
|
|
6552
6552
|
var zu, Go, bd, vd, yd, wd, xd, js, Wo, Us, Xo, Hs, vo, j1, U1, H1;
|
|
6553
6553
|
const Cv = class Cv {
|
|
6554
6554
|
constructor({
|
|
@@ -6579,7 +6579,7 @@ const Cv = class Cv {
|
|
|
6579
6579
|
});
|
|
6580
6580
|
}
|
|
6581
6581
|
get MIN_TOUCH_DISTANCE_TO_PINCH() {
|
|
6582
|
-
return 35 /
|
|
6582
|
+
return 35 / Ki.pixelRatio;
|
|
6583
6583
|
}
|
|
6584
6584
|
destroy() {
|
|
6585
6585
|
var e, t;
|
|
@@ -6660,7 +6660,7 @@ zu = new WeakMap(), Go = new WeakMap(), bd = new WeakMap(), vd = new WeakMap(),
|
|
|
6660
6660
|
e.touches.length >= 2 || (u(this, Hs) && (u(this, Hs).abort(), T(this, Hs, null), (t = u(this, xd)) == null || t.call(this)), u(this, Us) && (_r(e), T(this, Us, null), T(this, Go, !1)));
|
|
6661
6661
|
};
|
|
6662
6662
|
let Bh = Cv;
|
|
6663
|
-
var Yo, Oi, ar, ju, Ba, Ad, Zo, Zr, Ko, $s, za, Ed, Qo, Xn, _d, Jo, Vs,
|
|
6663
|
+
var Yo, Oi, ar, ju, Ba, Ad, Zo, Zr, Ko, $s, za, Ed, Qo, Xn, _d, Jo, Vs, fs, Uu, Hu, mi, el, Cd, bg, et, w0, Sd, x0, Tp, $1, V1, A0, kp, E0, q1, G1, W1, _0, X1, C0, Y1, Z1, K1, S0, mh;
|
|
6664
6664
|
const bt = class bt {
|
|
6665
6665
|
constructor(e) {
|
|
6666
6666
|
N(this, et);
|
|
@@ -6681,7 +6681,7 @@ const bt = class bt {
|
|
|
6681
6681
|
N(this, _d, !1);
|
|
6682
6682
|
N(this, Jo, !1);
|
|
6683
6683
|
N(this, Vs, !1);
|
|
6684
|
-
N(this,
|
|
6684
|
+
N(this, fs, null);
|
|
6685
6685
|
N(this, Uu, 0);
|
|
6686
6686
|
N(this, Hu, 0);
|
|
6687
6687
|
N(this, mi, null);
|
|
@@ -7090,9 +7090,9 @@ const bt = class bt {
|
|
|
7090
7090
|
_onStopDragging() {
|
|
7091
7091
|
}
|
|
7092
7092
|
moveInDOM() {
|
|
7093
|
-
u(this,
|
|
7093
|
+
u(this, fs) && clearTimeout(u(this, fs)), T(this, fs, setTimeout(() => {
|
|
7094
7094
|
var e;
|
|
7095
|
-
T(this,
|
|
7095
|
+
T(this, fs, null), (e = this.parent) == null || e.moveEditorInDOM(this);
|
|
7096
7096
|
}, 0));
|
|
7097
7097
|
}
|
|
7098
7098
|
_setParentAndPosition(e, t, r) {
|
|
@@ -7195,7 +7195,7 @@ const bt = class bt {
|
|
|
7195
7195
|
}
|
|
7196
7196
|
remove() {
|
|
7197
7197
|
var e, t;
|
|
7198
|
-
if ((e = u(this, za)) == null || e.abort(), T(this, za, null), this.isEmpty() || this.commit(), this.parent ? this.parent.remove(this) : this._uiManager.removeEditor(this), u(this,
|
|
7198
|
+
if ((e = u(this, za)) == null || e.abort(), T(this, za, null), this.isEmpty() || this.commit(), this.parent ? this.parent.remove(this) : this._uiManager.removeEditor(this), u(this, fs) && (clearTimeout(u(this, fs)), T(this, fs, null)), L(this, et, mh).call(this), this.removeEditToolbar(), u(this, mi)) {
|
|
7199
7199
|
for (const r of u(this, mi).values())
|
|
7200
7200
|
clearTimeout(r);
|
|
7201
7201
|
T(this, mi, null);
|
|
@@ -7386,7 +7386,7 @@ const bt = class bt {
|
|
|
7386
7386
|
(t == null ? void 0 : t.nodeName) === "DIV" && t.classList.contains("annotationContent") && t.remove();
|
|
7387
7387
|
}
|
|
7388
7388
|
};
|
|
7389
|
-
Yo = new WeakMap(), Oi = new WeakMap(), ar = new WeakMap(), ju = new WeakMap(), Ba = new WeakMap(), Ad = new WeakMap(), Zo = new WeakMap(), Zr = new WeakMap(), Ko = new WeakMap(), $s = new WeakMap(), za = new WeakMap(), Ed = new WeakMap(), Qo = new WeakMap(), Xn = new WeakMap(), _d = new WeakMap(), Jo = new WeakMap(), Vs = new WeakMap(),
|
|
7389
|
+
Yo = new WeakMap(), Oi = new WeakMap(), ar = new WeakMap(), ju = new WeakMap(), Ba = new WeakMap(), Ad = new WeakMap(), Zo = new WeakMap(), Zr = new WeakMap(), Ko = new WeakMap(), $s = new WeakMap(), za = new WeakMap(), Ed = new WeakMap(), Qo = new WeakMap(), Xn = new WeakMap(), _d = new WeakMap(), Jo = new WeakMap(), Vs = new WeakMap(), fs = new WeakMap(), Uu = new WeakMap(), Hu = new WeakMap(), mi = new WeakMap(), el = new WeakMap(), Cd = new WeakMap(), bg = new WeakMap(), et = new WeakSet(), w0 = function([e, t], r, n) {
|
|
7390
7390
|
[r, n] = this.screenToPageTranslation(r, n), this.x += r / e, this.y += n / t, this._onTranslating(this.x, this.y), this.fixAndSetPosition();
|
|
7391
7391
|
}, Sd = new WeakSet(), x0 = function(e, t, r) {
|
|
7392
7392
|
switch (r) {
|
|
@@ -7641,7 +7641,7 @@ class Q_ extends er {
|
|
|
7641
7641
|
return this.serializeDeleted();
|
|
7642
7642
|
}
|
|
7643
7643
|
}
|
|
7644
|
-
const oy = 3285377520, di = 4294901760,
|
|
7644
|
+
const oy = 3285377520, di = 4294901760, rs = 65535;
|
|
7645
7645
|
class Q1 {
|
|
7646
7646
|
constructor(e) {
|
|
7647
7647
|
this.h1 = e ? e & 4294967295 : oy, this.h2 = e ? e & 4294967295 : oy;
|
|
@@ -7660,22 +7660,22 @@ class Q1 {
|
|
|
7660
7660
|
throw new Error("Invalid data format, must be a string or TypedArray.");
|
|
7661
7661
|
const n = r >> 2, s = r - n * 4, a = new Uint32Array(t.buffer, 0, n);
|
|
7662
7662
|
let o = 0, l = 0, c = this.h1, h = this.h2;
|
|
7663
|
-
const d = 3432918353, p = 461845907, g = d &
|
|
7663
|
+
const d = 3432918353, p = 461845907, g = d & rs, w = p & rs;
|
|
7664
7664
|
for (let b = 0; b < n; b++)
|
|
7665
|
-
b & 1 ? (o = a[b], o = o * d & di | o * g &
|
|
7665
|
+
b & 1 ? (o = a[b], o = o * d & di | o * g & rs, o = o << 15 | o >>> 17, o = o * p & di | o * w & rs, c ^= o, c = c << 13 | c >>> 19, c = c * 5 + 3864292196) : (l = a[b], l = l * d & di | l * g & rs, l = l << 15 | l >>> 17, l = l * p & di | l * w & rs, h ^= l, h = h << 13 | h >>> 19, h = h * 5 + 3864292196);
|
|
7666
7666
|
switch (o = 0, s) {
|
|
7667
7667
|
case 3:
|
|
7668
7668
|
o ^= t[n * 4 + 2] << 16;
|
|
7669
7669
|
case 2:
|
|
7670
7670
|
o ^= t[n * 4 + 1] << 8;
|
|
7671
7671
|
case 1:
|
|
7672
|
-
o ^= t[n * 4], o = o * d & di | o * g &
|
|
7672
|
+
o ^= t[n * 4], o = o * d & di | o * g & rs, o = o << 15 | o >>> 17, o = o * p & di | o * w & rs, n & 1 ? c ^= o : h ^= o;
|
|
7673
7673
|
}
|
|
7674
7674
|
this.h1 = c, this.h2 = h;
|
|
7675
7675
|
}
|
|
7676
7676
|
hexdigest() {
|
|
7677
7677
|
let e = this.h1, t = this.h2;
|
|
7678
|
-
return e ^= t >>> 1, e = e * 3981806797 & di | e * 36045 &
|
|
7678
|
+
return e ^= t >>> 1, e = e * 3981806797 & di | e * 36045 & rs, t = t * 4283543511 & di | ((t << 16 | e >>> 16) * 2950163797 & di) >>> 16, e ^= t >>> 1, e = e * 444984403 & di | e * 60499 & rs, t = t * 3301882366 & di | ((t << 16 | e >>> 16) * 3120437893 & di) >>> 16, e ^= t >>> 1, (e >>> 0).toString(16).padStart(8, "0") + (t >>> 0).toString(16).padStart(8, "0");
|
|
7679
7679
|
}
|
|
7680
7680
|
}
|
|
7681
7681
|
const T0 = Object.freeze({
|
|
@@ -7910,7 +7910,7 @@ class J_ {
|
|
|
7910
7910
|
return _t(this, "isFontLoadingAPISupported", e);
|
|
7911
7911
|
}
|
|
7912
7912
|
get isSyncFontLoadingSupported() {
|
|
7913
|
-
return _t(this, "isSyncFontLoadingSupported",
|
|
7913
|
+
return _t(this, "isSyncFontLoadingSupported", Sn || Gr.platform.isFirefox);
|
|
7914
7914
|
}
|
|
7915
7915
|
_queueLoadingCallback(e) {
|
|
7916
7916
|
function t() {
|
|
@@ -8032,7 +8032,7 @@ function tC(i) {
|
|
|
8032
8032
|
if (i instanceof URL)
|
|
8033
8033
|
return i.href;
|
|
8034
8034
|
if (typeof i == "string") {
|
|
8035
|
-
if (
|
|
8035
|
+
if (Sn)
|
|
8036
8036
|
return i;
|
|
8037
8037
|
const e = URL.parse(i, window.location);
|
|
8038
8038
|
if (e)
|
|
@@ -8041,7 +8041,7 @@ function tC(i) {
|
|
|
8041
8041
|
throw new Error("Invalid PDF url data: either string or URL-object is expected in the url property.");
|
|
8042
8042
|
}
|
|
8043
8043
|
function rC(i) {
|
|
8044
|
-
if (
|
|
8044
|
+
if (Sn && typeof Buffer < "u" && i instanceof Buffer)
|
|
8045
8045
|
throw new Error("Please provide binary data as `Uint8Array`, rather than `Buffer`.");
|
|
8046
8046
|
if (i instanceof Uint8Array && i.byteLength === i.buffer.byteLength)
|
|
8047
8047
|
return i;
|
|
@@ -8536,7 +8536,7 @@ class aC extends ow {
|
|
|
8536
8536
|
const [n, s, a] = L(this, Ve, Pp).call(this, t), o = t.length === 1 ? n : `${n}${s}${a}`;
|
|
8537
8537
|
if (r = u(this, Ve, ln).get(o), r)
|
|
8538
8538
|
return u(this, Ve, ln).set(t, r), r;
|
|
8539
|
-
const l = `g_${u(this, Ws)}_transfer_map_${
|
|
8539
|
+
const l = `g_${u(this, Ws)}_transfer_map_${yn(this, sl)._++}`, c = L(this, Ve, fu).call(this, l);
|
|
8540
8540
|
u(this, Ve, ln).set(t, c), u(this, Ve, ln).set(o, c);
|
|
8541
8541
|
const h = L(this, Ve, pu).call(this, l);
|
|
8542
8542
|
return L(this, Ve, wh).call(this, n, s, a, h), c;
|
|
@@ -8578,7 +8578,7 @@ class aC extends ow {
|
|
|
8578
8578
|
const [n] = L(this, Ve, Pp).call(this, [t]), s = `alpha_${n}`;
|
|
8579
8579
|
if (r = u(this, Ve, ln).get(s), r)
|
|
8580
8580
|
return u(this, Ve, ln).set(t, r), r;
|
|
8581
|
-
const a = `g_${u(this, Ws)}_alpha_map_${
|
|
8581
|
+
const a = `g_${u(this, Ws)}_alpha_map_${yn(this, sl)._++}`, o = L(this, Ve, fu).call(this, a);
|
|
8582
8582
|
u(this, Ve, ln).set(t, o), u(this, Ve, ln).set(s, o);
|
|
8583
8583
|
const l = L(this, Ve, pu).call(this, a);
|
|
8584
8584
|
return L(this, Ve, P0).call(this, n, l), o;
|
|
@@ -8590,7 +8590,7 @@ class aC extends ow {
|
|
|
8590
8590
|
let n, s;
|
|
8591
8591
|
if (t ? ([n] = L(this, Ve, Pp).call(this, [t]), s = `luminosity_${n}`) : s = "luminosity", r = u(this, Ve, ln).get(s), r)
|
|
8592
8592
|
return u(this, Ve, ln).set(t, r), r;
|
|
8593
|
-
const a = `g_${u(this, Ws)}_luminosity_map_${
|
|
8593
|
+
const a = `g_${u(this, Ws)}_luminosity_map_${yn(this, sl)._++}`, o = L(this, Ve, fu).call(this, a);
|
|
8594
8594
|
u(this, Ve, ln).set(t, o), u(this, Ve, ln).set(s, o);
|
|
8595
8595
|
const l = L(this, Ve, pu).call(this, a);
|
|
8596
8596
|
return L(this, Ve, lw).call(this, l), t && L(this, Ve, P0).call(this, n, l), o;
|
|
@@ -8738,7 +8738,7 @@ class hy extends cw {
|
|
|
8738
8738
|
return new Uint8Array(t);
|
|
8739
8739
|
}
|
|
8740
8740
|
}
|
|
8741
|
-
|
|
8741
|
+
Sn && lt("Please use the `legacy` build in Node.js environments.");
|
|
8742
8742
|
async function $b(i) {
|
|
8743
8743
|
const t = await process.getBuiltinModule("fs").promises.readFile(i);
|
|
8744
8744
|
return new Uint8Array(t);
|
|
@@ -9243,17 +9243,17 @@ function yy(i, e) {
|
|
|
9243
9243
|
if (e)
|
|
9244
9244
|
return !0;
|
|
9245
9245
|
Ke.singularValueDecompose2dScale(i, oi);
|
|
9246
|
-
const t = Math.fround(
|
|
9246
|
+
const t = Math.fround(Ki.pixelRatio * ma.PDF_TO_CSS_UNITS);
|
|
9247
9247
|
return oi[0] <= t && oi[1] <= t;
|
|
9248
9248
|
}
|
|
9249
9249
|
const xC = ["butt", "round", "square"], AC = ["miter", "round", "bevel"], EC = {}, wy = {};
|
|
9250
|
-
var
|
|
9250
|
+
var Ji, N0, M0, L0;
|
|
9251
9251
|
const Sv = class Sv {
|
|
9252
9252
|
constructor(e, t, r, n, s, {
|
|
9253
9253
|
optionalContentConfig: a,
|
|
9254
9254
|
markedContentStack: o = null
|
|
9255
9255
|
}, l, c) {
|
|
9256
|
-
N(this,
|
|
9256
|
+
N(this, Ji);
|
|
9257
9257
|
this.ctx = e, this.current = new my(this.ctx.canvas.width, this.ctx.canvas.height), this.stateStack = [], this.pendingClip = null, this.pendingEOFill = !1, this.res = null, this.xobjs = null, this.commonObjs = t, this.objs = r, this.canvasFactory = n, this.filterFactory = s, this.groupStack = [], this.baseTransform = null, this.baseTransformStack = [], this.groupLevel = 0, this.smaskStack = [], this.smaskCounter = 0, this.tempSMask = null, this.suspendedCtx = null, this.contentVisible = !0, this.markedContentStack = o || [], this.optionalContentConfig = a, this.cachedCanvases = new wC(this.canvasFactory), this.cachedPatterns = /* @__PURE__ */ new Map(), this.annotationCanvasMap = l, this.viewportScale = 1, this.outputScaleX = 1, this.outputScaleY = 1, this.pageColors = c, this._cachedScaleForStroking = [-1, 0], this._cachedGetSinglePixelWidth = null, this._cachedBitmapsMap = /* @__PURE__ */ new Map();
|
|
9258
9258
|
}
|
|
9259
9259
|
getObject(e, t = null) {
|
|
@@ -9303,13 +9303,13 @@ const Sv = class Sv {
|
|
|
9303
9303
|
}
|
|
9304
9304
|
}
|
|
9305
9305
|
endDrawing() {
|
|
9306
|
-
L(this,
|
|
9306
|
+
L(this, Ji, N0).call(this), this.cachedCanvases.clear(), this.cachedPatterns.clear();
|
|
9307
9307
|
for (const e of this._cachedBitmapsMap.values()) {
|
|
9308
9308
|
for (const t of e.values())
|
|
9309
9309
|
typeof HTMLCanvasElement < "u" && t instanceof HTMLCanvasElement && (t.width = t.height = 0);
|
|
9310
9310
|
e.clear();
|
|
9311
9311
|
}
|
|
9312
|
-
this._cachedBitmapsMap.clear(), L(this,
|
|
9312
|
+
this._cachedBitmapsMap.clear(), L(this, Ji, M0).call(this);
|
|
9313
9313
|
}
|
|
9314
9314
|
_scaleImage(e, t) {
|
|
9315
9315
|
const r = e.width ?? e.displayWidth, n = e.height ?? e.displayHeight;
|
|
@@ -9350,8 +9350,8 @@ const Sv = class Sv {
|
|
|
9350
9350
|
const g = yu.slice();
|
|
9351
9351
|
Ke.axialAlignedBoundingBox([0, 0, r, n], p, g);
|
|
9352
9352
|
const [w, b, y, v] = g, A = Math.round(y - w) || 1, E = Math.round(v - b) || 1, _ = this.cachedCanvases.getCanvas("fillCanvas", A, E), C = _.context, I = w, k = b;
|
|
9353
|
-
C.translate(-I, -k), C.transform(...p), h || (h = this._scaleImage(d.canvas,
|
|
9354
|
-
const D = Ke.transform(
|
|
9353
|
+
C.translate(-I, -k), C.transform(...p), h || (h = this._scaleImage(d.canvas, ts(C)), h = h.img, l && a && l.set(c, h)), C.imageSmoothingEnabled = yy(cr(C), e.interpolate), lp(C, h, 0, 0, h.width, h.height, 0, 0, r, n), C.globalCompositeOperation = "source-in";
|
|
9354
|
+
const D = Ke.transform(ts(C), [1, 0, 0, 1, -I, -k]);
|
|
9355
9355
|
return C.fillStyle = a ? s.getPattern(t, this, D, tn.FILL) : s, C.fillRect(0, 0, r, n), l && !a && (this.cachedCanvases.delete("fillCanvas"), l.set(c, _.canvas)), {
|
|
9356
9356
|
canvas: _.canvas,
|
|
9357
9357
|
offsetX: Math.round(I),
|
|
@@ -9521,7 +9521,7 @@ const Sv = class Sv {
|
|
|
9521
9521
|
if (r.globalAlpha = this.current.strokeAlpha, this.contentVisible)
|
|
9522
9522
|
if (typeof n == "object" && (n != null && n.getPattern)) {
|
|
9523
9523
|
const s = n.isModifyingCurrentTransform() ? r.getTransform() : null;
|
|
9524
|
-
if (r.save(), r.strokeStyle = n.getPattern(r, this,
|
|
9524
|
+
if (r.save(), r.strokeStyle = n.getPattern(r, this, ts(r), tn.STROKE), s) {
|
|
9525
9525
|
const a = new Path2D();
|
|
9526
9526
|
a.addPath(e, r.getTransform().invertSelf().multiplySelf(s)), e = a;
|
|
9527
9527
|
}
|
|
@@ -9538,7 +9538,7 @@ const Sv = class Sv {
|
|
|
9538
9538
|
let a = !1;
|
|
9539
9539
|
if (s) {
|
|
9540
9540
|
const l = n.isModifyingCurrentTransform() ? r.getTransform() : null;
|
|
9541
|
-
if (r.save(), r.fillStyle = n.getPattern(r, this,
|
|
9541
|
+
if (r.save(), r.fillStyle = n.getPattern(r, this, ts(r), tn.FILL), l) {
|
|
9542
9542
|
const c = new Path2D();
|
|
9543
9543
|
c.addPath(e, r.getTransform().invertSelf().multiplySelf(l)), e = c;
|
|
9544
9544
|
}
|
|
@@ -9645,7 +9645,7 @@ const Sv = class Sv {
|
|
|
9645
9645
|
if ((l.disableFontFace || p || g || w) && (b = l.getPathGenerator(this.commonObjs, e)), l.disableFontFace || g || w) {
|
|
9646
9646
|
a.save(), a.translate(t, r), a.scale(h, -h);
|
|
9647
9647
|
let y;
|
|
9648
|
-
if ((d === on.FILL || d === on.FILL_STROKE) && (n ? (y = a.getTransform(), a.setTransform(...n), a.fill(L(this,
|
|
9648
|
+
if ((d === on.FILL || d === on.FILL_STROKE) && (n ? (y = a.getTransform(), a.setTransform(...n), a.fill(L(this, Ji, L0).call(this, b, y, n))) : a.fill(b)), d === on.STROKE || d === on.FILL_STROKE)
|
|
9649
9649
|
if (s) {
|
|
9650
9650
|
y || (y = a.getTransform()), a.setTransform(...s);
|
|
9651
9651
|
const {
|
|
@@ -9654,7 +9654,7 @@ const Sv = class Sv {
|
|
|
9654
9654
|
c: E,
|
|
9655
9655
|
d: _
|
|
9656
9656
|
} = y, C = Ke.inverseTransform(s), I = Ke.transform([v, A, E, _, 0, 0], C);
|
|
9657
|
-
Ke.singularValueDecompose2dScale(I, oi), a.lineWidth *= Math.max(oi[0], oi[1]) / h, a.stroke(L(this,
|
|
9657
|
+
Ke.singularValueDecompose2dScale(I, oi), a.lineWidth *= Math.max(oi[0], oi[1]) / h, a.stroke(L(this, Ji, L0).call(this, b, y, s));
|
|
9658
9658
|
} else
|
|
9659
9659
|
a.lineWidth /= h, a.stroke(b);
|
|
9660
9660
|
a.restore();
|
|
@@ -9694,12 +9694,12 @@ const Sv = class Sv {
|
|
|
9694
9694
|
let v, A;
|
|
9695
9695
|
if (t.patternFill) {
|
|
9696
9696
|
s.save();
|
|
9697
|
-
const k = t.fillColor.getPattern(s, this,
|
|
9697
|
+
const k = t.fillColor.getPattern(s, this, ts(s), tn.FILL);
|
|
9698
9698
|
v = cr(s), s.restore(), s.fillStyle = k;
|
|
9699
9699
|
}
|
|
9700
9700
|
if (t.patternStroke) {
|
|
9701
9701
|
s.save();
|
|
9702
|
-
const k = t.strokeColor.getPattern(s, this,
|
|
9702
|
+
const k = t.strokeColor.getPattern(s, this, ts(s), tn.STROKE);
|
|
9703
9703
|
A = cr(s), s.restore(), s.strokeStyle = k;
|
|
9704
9704
|
}
|
|
9705
9705
|
let E = t.lineWidth;
|
|
@@ -9817,8 +9817,8 @@ const Sv = class Sv {
|
|
|
9817
9817
|
const t = this.ctx;
|
|
9818
9818
|
this.save();
|
|
9819
9819
|
const r = this._getPattern(e);
|
|
9820
|
-
t.fillStyle = r.getPattern(t, this,
|
|
9821
|
-
const n =
|
|
9820
|
+
t.fillStyle = r.getPattern(t, this, ts(t), tn.SHADING);
|
|
9821
|
+
const n = ts(t);
|
|
9822
9822
|
if (n) {
|
|
9823
9823
|
const {
|
|
9824
9824
|
width: s,
|
|
@@ -9899,7 +9899,7 @@ const Sv = class Sv {
|
|
|
9899
9899
|
}
|
|
9900
9900
|
}
|
|
9901
9901
|
beginAnnotation(e, t, r, n, s) {
|
|
9902
|
-
if (L(this,
|
|
9902
|
+
if (L(this, Ji, N0).call(this), up(this.ctx), this.ctx.save(), this.save(), this.baseTransform && this.ctx.setTransform(...this.baseTransform), t) {
|
|
9903
9903
|
const a = t[2] - t[0], o = t[3] - t[1];
|
|
9904
9904
|
if (s && this.annotationCanvasMap) {
|
|
9905
9905
|
r = r.slice(), r[4] -= t[0], r[5] -= t[1], t = t.slice(), t[0] = t[1] = 0, t[2] = a, t[3] = o, Ke.singularValueDecompose2dScale(cr(this.ctx), oi);
|
|
@@ -9921,7 +9921,7 @@ const Sv = class Sv {
|
|
|
9921
9921
|
this.current = new my(this.ctx.canvas.width, this.ctx.canvas.height), this.transform(...r), this.transform(...n);
|
|
9922
9922
|
}
|
|
9923
9923
|
endAnnotation() {
|
|
9924
|
-
this.annotationCanvas && (this.ctx.restore(), L(this,
|
|
9924
|
+
this.annotationCanvas && (this.ctx.restore(), L(this, Ji, M0).call(this), this.ctx = this.annotationCanvas.savedCtx, delete this.annotationCanvas.savedCtx, delete this.annotationCanvas);
|
|
9925
9925
|
}
|
|
9926
9926
|
paintImageMaskXObject(e) {
|
|
9927
9927
|
if (!this.contentVisible)
|
|
@@ -9960,7 +9960,7 @@ const Sv = class Sv {
|
|
|
9960
9960
|
} = s, h = this.cachedCanvases.getCanvas("maskCanvas", o, l), d = h.context;
|
|
9961
9961
|
d.save();
|
|
9962
9962
|
const p = this.getObject(a, s);
|
|
9963
|
-
vy(d, p), d.globalCompositeOperation = "source-in", d.fillStyle = n ? r.getPattern(d, this,
|
|
9963
|
+
vy(d, p), d.globalCompositeOperation = "source-in", d.fillStyle = n ? r.getPattern(d, this, ts(t), tn.FILL) : r, d.fillRect(0, 0, o, l), d.restore(), t.save(), t.transform(...c), t.scale(1, -1), lp(t, h.canvas, 0, 0, o, l, 0, -1, 1, 1), t.restore();
|
|
9964
9964
|
}
|
|
9965
9965
|
this.compose();
|
|
9966
9966
|
}
|
|
@@ -10024,7 +10024,7 @@ const Sv = class Sv {
|
|
|
10024
10024
|
const c = this.cachedCanvases.getCanvas("inlineImage", t, r).context;
|
|
10025
10025
|
by(c, e), a = this.applyTransferMapsToCanvas(c);
|
|
10026
10026
|
}
|
|
10027
|
-
const o = this._scaleImage(a,
|
|
10027
|
+
const o = this._scaleImage(a, ts(n));
|
|
10028
10028
|
n.imageSmoothingEnabled = yy(cr(n), e.interpolate), lp(n, o.img, 0, 0, o.paintWidth, o.paintHeight, 0, -r, t, r), this.compose(), this.restore();
|
|
10029
10029
|
}
|
|
10030
10030
|
paintInlineImageXObjectGroup(e, t) {
|
|
@@ -10152,7 +10152,7 @@ const Sv = class Sv {
|
|
|
10152
10152
|
return !0;
|
|
10153
10153
|
}
|
|
10154
10154
|
};
|
|
10155
|
-
|
|
10155
|
+
Ji = new WeakSet(), N0 = function() {
|
|
10156
10156
|
for (; this.stateStack.length || this.inSMaskMode; )
|
|
10157
10157
|
this.restore();
|
|
10158
10158
|
this.current.activeSMask = null, this.ctx.restore(), this.transparentCanvas && (this.ctx = this.compositeCtx, this.ctx.save(), this.ctx.setTransform(1, 0, 0, 1, 0, 0), this.ctx.drawImage(this.transparentCanvas, 0, 0), this.ctx.restore(), this.transparentCanvas = null);
|
|
@@ -10243,67 +10243,67 @@ class CC {
|
|
|
10243
10243
|
}
|
|
10244
10244
|
}
|
|
10245
10245
|
Id = new WeakMap(), Nd = new WeakMap(), Md = new WeakMap(), Wu = new WeakMap();
|
|
10246
|
-
var ja,
|
|
10246
|
+
var ja, Vt, Xu, Yu, Ld, O0;
|
|
10247
10247
|
class SC {
|
|
10248
10248
|
constructor(e, t = ai.DISPLAY) {
|
|
10249
10249
|
N(this, Ld);
|
|
10250
10250
|
N(this, ja, null);
|
|
10251
|
-
N(this,
|
|
10251
|
+
N(this, Vt, /* @__PURE__ */ new Map());
|
|
10252
10252
|
N(this, Xu, null);
|
|
10253
10253
|
N(this, Yu, null);
|
|
10254
10254
|
if (this.renderingIntent = t, this.name = null, this.creator = null, e !== null) {
|
|
10255
10255
|
this.name = e.name, this.creator = e.creator, T(this, Yu, e.order);
|
|
10256
10256
|
for (const r of e.groups)
|
|
10257
|
-
u(this,
|
|
10257
|
+
u(this, Vt).set(r.id, new CC(t, r));
|
|
10258
10258
|
if (e.baseState === "OFF")
|
|
10259
|
-
for (const r of u(this,
|
|
10259
|
+
for (const r of u(this, Vt).values())
|
|
10260
10260
|
r._setVisible(gu, !1);
|
|
10261
10261
|
for (const r of e.on)
|
|
10262
|
-
u(this,
|
|
10262
|
+
u(this, Vt).get(r)._setVisible(gu, !0);
|
|
10263
10263
|
for (const r of e.off)
|
|
10264
|
-
u(this,
|
|
10264
|
+
u(this, Vt).get(r)._setVisible(gu, !1);
|
|
10265
10265
|
T(this, Xu, this.getHash());
|
|
10266
10266
|
}
|
|
10267
10267
|
}
|
|
10268
10268
|
isVisible(e) {
|
|
10269
|
-
if (u(this,
|
|
10269
|
+
if (u(this, Vt).size === 0)
|
|
10270
10270
|
return !0;
|
|
10271
10271
|
if (!e)
|
|
10272
10272
|
return Ng("Optional content group not defined."), !0;
|
|
10273
10273
|
if (e.type === "OCG")
|
|
10274
|
-
return u(this,
|
|
10274
|
+
return u(this, Vt).has(e.id) ? u(this, Vt).get(e.id).visible : (lt(`Optional content group not found: ${e.id}`), !0);
|
|
10275
10275
|
if (e.type === "OCMD") {
|
|
10276
10276
|
if (e.expression)
|
|
10277
10277
|
return L(this, Ld, O0).call(this, e.expression);
|
|
10278
10278
|
if (!e.policy || e.policy === "AnyOn") {
|
|
10279
10279
|
for (const t of e.ids) {
|
|
10280
|
-
if (!u(this,
|
|
10280
|
+
if (!u(this, Vt).has(t))
|
|
10281
10281
|
return lt(`Optional content group not found: ${t}`), !0;
|
|
10282
|
-
if (u(this,
|
|
10282
|
+
if (u(this, Vt).get(t).visible)
|
|
10283
10283
|
return !0;
|
|
10284
10284
|
}
|
|
10285
10285
|
return !1;
|
|
10286
10286
|
} else if (e.policy === "AllOn") {
|
|
10287
10287
|
for (const t of e.ids) {
|
|
10288
|
-
if (!u(this,
|
|
10288
|
+
if (!u(this, Vt).has(t))
|
|
10289
10289
|
return lt(`Optional content group not found: ${t}`), !0;
|
|
10290
|
-
if (!u(this,
|
|
10290
|
+
if (!u(this, Vt).get(t).visible)
|
|
10291
10291
|
return !1;
|
|
10292
10292
|
}
|
|
10293
10293
|
return !0;
|
|
10294
10294
|
} else if (e.policy === "AnyOff") {
|
|
10295
10295
|
for (const t of e.ids) {
|
|
10296
|
-
if (!u(this,
|
|
10296
|
+
if (!u(this, Vt).has(t))
|
|
10297
10297
|
return lt(`Optional content group not found: ${t}`), !0;
|
|
10298
|
-
if (!u(this,
|
|
10298
|
+
if (!u(this, Vt).get(t).visible)
|
|
10299
10299
|
return !0;
|
|
10300
10300
|
}
|
|
10301
10301
|
return !1;
|
|
10302
10302
|
} else if (e.policy === "AllOff") {
|
|
10303
10303
|
for (const t of e.ids) {
|
|
10304
|
-
if (!u(this,
|
|
10304
|
+
if (!u(this, Vt).has(t))
|
|
10305
10305
|
return lt(`Optional content group not found: ${t}`), !0;
|
|
10306
|
-
if (u(this,
|
|
10306
|
+
if (u(this, Vt).get(t).visible)
|
|
10307
10307
|
return !1;
|
|
10308
10308
|
}
|
|
10309
10309
|
return !0;
|
|
@@ -10314,7 +10314,7 @@ class SC {
|
|
|
10314
10314
|
}
|
|
10315
10315
|
setVisibility(e, t = !0, r = !0) {
|
|
10316
10316
|
var s;
|
|
10317
|
-
const n = u(this,
|
|
10317
|
+
const n = u(this, Vt).get(e);
|
|
10318
10318
|
if (!n) {
|
|
10319
10319
|
lt(`Optional content group not found: ${e}`);
|
|
10320
10320
|
return;
|
|
@@ -10322,7 +10322,7 @@ class SC {
|
|
|
10322
10322
|
if (r && t && n.rbGroups.length)
|
|
10323
10323
|
for (const a of n.rbGroups)
|
|
10324
10324
|
for (const o of a)
|
|
10325
|
-
o !== e && ((s = u(this,
|
|
10325
|
+
o !== e && ((s = u(this, Vt).get(o)) == null || s._setVisible(gu, !1, !0));
|
|
10326
10326
|
n._setVisible(gu, !!t, !0), T(this, ja, null);
|
|
10327
10327
|
}
|
|
10328
10328
|
setOCGState({
|
|
@@ -10338,7 +10338,7 @@ class SC {
|
|
|
10338
10338
|
r = n;
|
|
10339
10339
|
continue;
|
|
10340
10340
|
}
|
|
10341
|
-
const s = u(this,
|
|
10341
|
+
const s = u(this, Vt).get(n);
|
|
10342
10342
|
if (s)
|
|
10343
10343
|
switch (r) {
|
|
10344
10344
|
case "ON":
|
|
@@ -10358,24 +10358,24 @@ class SC {
|
|
|
10358
10358
|
return u(this, Xu) === null || this.getHash() === u(this, Xu);
|
|
10359
10359
|
}
|
|
10360
10360
|
getOrder() {
|
|
10361
|
-
return u(this,
|
|
10361
|
+
return u(this, Vt).size ? u(this, Yu) ? u(this, Yu).slice() : [...u(this, Vt).keys()] : null;
|
|
10362
10362
|
}
|
|
10363
10363
|
getGroup(e) {
|
|
10364
|
-
return u(this,
|
|
10364
|
+
return u(this, Vt).get(e) || null;
|
|
10365
10365
|
}
|
|
10366
10366
|
getHash() {
|
|
10367
10367
|
if (u(this, ja) !== null)
|
|
10368
10368
|
return u(this, ja);
|
|
10369
10369
|
const e = new Q1();
|
|
10370
|
-
for (const [t, r] of u(this,
|
|
10370
|
+
for (const [t, r] of u(this, Vt))
|
|
10371
10371
|
e.update(`${t}:${r.visible}`);
|
|
10372
10372
|
return T(this, ja, e.hexdigest());
|
|
10373
10373
|
}
|
|
10374
10374
|
[Symbol.iterator]() {
|
|
10375
|
-
return u(this,
|
|
10375
|
+
return u(this, Vt).entries();
|
|
10376
10376
|
}
|
|
10377
10377
|
}
|
|
10378
|
-
ja = new WeakMap(),
|
|
10378
|
+
ja = new WeakMap(), Vt = new WeakMap(), Xu = new WeakMap(), Yu = new WeakMap(), Ld = new WeakSet(), O0 = function(e) {
|
|
10379
10379
|
const t = e.length;
|
|
10380
10380
|
if (t < 2)
|
|
10381
10381
|
return !0;
|
|
@@ -10385,8 +10385,8 @@ ja = new WeakMap(), $t = new WeakMap(), Xu = new WeakMap(), Yu = new WeakMap(),
|
|
|
10385
10385
|
let a;
|
|
10386
10386
|
if (Array.isArray(s))
|
|
10387
10387
|
a = L(this, Ld, O0).call(this, s);
|
|
10388
|
-
else if (u(this,
|
|
10389
|
-
a = u(this,
|
|
10388
|
+
else if (u(this, Vt).has(s))
|
|
10389
|
+
a = u(this, Vt).get(s).visible;
|
|
10390
10390
|
else
|
|
10391
10391
|
return lt(`Optional content group not found: ${s}`), !0;
|
|
10392
10392
|
switch (r) {
|
|
@@ -11376,7 +11376,7 @@ let zh = (mr = class {
|
|
|
11376
11376
|
}));
|
|
11377
11377
|
else
|
|
11378
11378
|
throw new Error('No "textContentSource" parameter specified.');
|
|
11379
|
-
T(this, Mn, T(this, Zu, t)), T(this, Ha, r.scale *
|
|
11379
|
+
T(this, Mn, T(this, Zu, t)), T(this, Ha, r.scale * Ki.pixelRatio), T(this, Ku, r.rotation), T(this, Xs, {
|
|
11380
11380
|
div: null,
|
|
11381
11381
|
properties: null,
|
|
11382
11382
|
ctx: null
|
|
@@ -11419,7 +11419,7 @@ let zh = (mr = class {
|
|
|
11419
11419
|
onBefore: t = null
|
|
11420
11420
|
}) {
|
|
11421
11421
|
var s;
|
|
11422
|
-
const r = e.scale *
|
|
11422
|
+
const r = e.scale * Ki.pixelRatio, n = e.rotation;
|
|
11423
11423
|
if (n !== u(this, Ku) && (t == null || t(), T(this, Ku, n), co(u(this, Zu), {
|
|
11424
11424
|
rotation: n
|
|
11425
11425
|
})), r !== u(this, Ha)) {
|
|
@@ -11603,7 +11603,7 @@ function qb(i = {}) {
|
|
|
11603
11603
|
docId: t
|
|
11604
11604
|
} = e, r = i.url ? tC(i.url) : null, n = i.data ? rC(i.data) : null, s = i.httpHeaders || null, a = i.withCredentials === !0, o = i.password ?? null, l = i.range instanceof Gb ? i.range : null, c = Number.isInteger(i.rangeChunkSize) && i.rangeChunkSize > 0 ? i.rangeChunkSize : 2 ** 16;
|
|
11605
11605
|
let h = i.worker instanceof Mc ? i.worker : null;
|
|
11606
|
-
const d = i.verbosity, p = typeof i.docBaseUrl == "string" && !Mf(i.docBaseUrl) ? i.docBaseUrl : null, g = ap(i.cMapUrl), w = i.cMapPacked !== !1, b = i.CMapReaderFactory || (
|
|
11606
|
+
const d = i.verbosity, p = typeof i.docBaseUrl == "string" && !Mf(i.docBaseUrl) ? i.docBaseUrl : null, g = ap(i.cMapUrl), w = i.cMapPacked !== !1, b = i.CMapReaderFactory || (Sn ? uC : uy), y = ap(i.iccUrl), v = ap(i.standardFontDataUrl), A = i.StandardFontDataFactory || (Sn ? cC : cy), E = ap(i.wasmUrl), _ = i.WasmFactory || (Sn ? hC : hy), C = i.stopAtErrors !== !0, I = Number.isInteger(i.maxImageSize) && i.maxImageSize > -1 ? i.maxImageSize : -1, k = i.isEvalSupported !== !1, D = typeof i.isOffscreenCanvasSupported == "boolean" ? i.isOffscreenCanvasSupported : !Sn, R = typeof i.isImageDecoderSupported == "boolean" ? i.isImageDecoderSupported : !Sn && (Gr.platform.isFirefox || !globalThis.chrome), z = Number.isInteger(i.canvasMaxAreaInBytes) ? i.canvasMaxAreaInBytes : -1, q = typeof i.disableFontFace == "boolean" ? i.disableFontFace : Sn, O = i.fontExtraProperties === !0, X = i.enableXfa === !0, S = i.ownerDocument || globalThis.document, J = i.disableRange === !0, Y = i.disableStream === !0, W = i.disableAutoFetch === !0, fe = i.pdfBug === !0, K = i.CanvasFactory || (Sn ? lC : sC), be = i.FilterFactory || (Sn ? oC : aC), te = i.enableHWA === !0, j = i.useWasm !== !1, ie = l ? l.length : i.length ?? NaN, ae = typeof i.useSystemFonts == "boolean" ? i.useSystemFonts : !Sn && !q, H = typeof i.useWorkerFetch == "boolean" ? i.useWorkerFetch : !!(b === uy && A === cy && _ === hy && g && v && E && dh(g, document.baseURI) && dh(v, document.baseURI) && dh(E, document.baseURI)), se = null;
|
|
11607
11607
|
F_(d);
|
|
11608
11608
|
const le = {
|
|
11609
11609
|
canvasFactory: new K({
|
|
@@ -11680,7 +11680,7 @@ function qb(i = {}) {
|
|
|
11680
11680
|
else if (!n) {
|
|
11681
11681
|
if (!r)
|
|
11682
11682
|
throw new Error("getDocument - no `url` parameter provided.");
|
|
11683
|
-
const Ie = dh(r) ? RC :
|
|
11683
|
+
const Ie = dh(r) ? RC : Sn ? UC : OC;
|
|
11684
11684
|
Se = new Ie({
|
|
11685
11685
|
url: r,
|
|
11686
11686
|
length: ie,
|
|
@@ -11707,7 +11707,7 @@ const Ag = class Ag {
|
|
|
11707
11707
|
Re(this, "_capability", Promise.withResolvers());
|
|
11708
11708
|
Re(this, "_transport", null);
|
|
11709
11709
|
Re(this, "_worker", null);
|
|
11710
|
-
Re(this, "docId", `d${
|
|
11710
|
+
Re(this, "docId", `d${yn(Ag, xg)._++}`);
|
|
11711
11711
|
Re(this, "destroyed", !1);
|
|
11712
11712
|
Re(this, "onPassword", null);
|
|
11713
11713
|
Re(this, "onProgress", null);
|
|
@@ -12329,7 +12329,7 @@ Va = new WeakMap(), Fi = new WeakMap(), Zs = new WeakMap(), dl = new WeakMap(),
|
|
|
12329
12329
|
}
|
|
12330
12330
|
const t = new iC();
|
|
12331
12331
|
T(this, Zs, t);
|
|
12332
|
-
const r = `fake${
|
|
12332
|
+
const r = `fake${yn(sr, Eg)._++}`, n = new bh(r + "_worker", r, t);
|
|
12333
12333
|
e.setup(n, t), T(this, Fi, new bh(r, r + "_worker", t)), L(this, Dn, Ip).call(this);
|
|
12334
12334
|
}).catch((e) => {
|
|
12335
12335
|
u(this, Va).reject(new Error(`Setting up fake worker failed: "${e.message}".`));
|
|
@@ -12341,7 +12341,7 @@ Va = new WeakMap(), Fi = new WeakMap(), Zs = new WeakMap(), dl = new WeakMap(),
|
|
|
12341
12341
|
} catch {
|
|
12342
12342
|
return null;
|
|
12343
12343
|
}
|
|
12344
|
-
}, N(sr, rc), N(sr, Eg, 0), N(sr, fl, !1), N(sr, pl, /* @__PURE__ */ new WeakMap()),
|
|
12344
|
+
}, N(sr, rc), N(sr, Eg, 0), N(sr, fl, !1), N(sr, pl, /* @__PURE__ */ new WeakMap()), Sn && (T(sr, fl, !0), wi.workerSrc || (wi.workerSrc = "./pdf.worker.mjs")), sr._isSameOrigin = (e, t) => {
|
|
12345
12345
|
const r = URL.parse(e);
|
|
12346
12346
|
if (!(r != null && r.origin) || r.origin === "null")
|
|
12347
12347
|
return !1;
|
|
@@ -12358,12 +12358,12 @@ Va = new WeakMap(), Fi = new WeakMap(), Zs = new WeakMap(), dl = new WeakMap(),
|
|
|
12358
12358
|
return sr.create(e);
|
|
12359
12359
|
};
|
|
12360
12360
|
let Mc = sr;
|
|
12361
|
-
var Ks,
|
|
12361
|
+
var Ks, ps, nc, ic, Qs, gl, _h;
|
|
12362
12362
|
class XC {
|
|
12363
12363
|
constructor(e, t, r, n, s) {
|
|
12364
12364
|
N(this, gl);
|
|
12365
12365
|
N(this, Ks, /* @__PURE__ */ new Map());
|
|
12366
|
-
N(this,
|
|
12366
|
+
N(this, ps, /* @__PURE__ */ new Map());
|
|
12367
12367
|
N(this, nc, /* @__PURE__ */ new Map());
|
|
12368
12368
|
N(this, ic, /* @__PURE__ */ new Map());
|
|
12369
12369
|
N(this, Qs, null);
|
|
@@ -12423,9 +12423,9 @@ class XC {
|
|
|
12423
12423
|
return this.destroyCapability.promise;
|
|
12424
12424
|
this.destroyed = !0, this.destroyCapability = Promise.withResolvers(), (r = u(this, Qs)) == null || r.reject(new Error("Worker was destroyed during onPassword callback"));
|
|
12425
12425
|
const e = [];
|
|
12426
|
-
for (const n of u(this,
|
|
12426
|
+
for (const n of u(this, ps).values())
|
|
12427
12427
|
e.push(n._destroy());
|
|
12428
|
-
u(this,
|
|
12428
|
+
u(this, ps).clear(), u(this, nc).clear(), u(this, ic).clear(), this.hasOwnProperty("annotationStorage") && this.annotationStorage.resetModified();
|
|
12429
12429
|
const t = this.messageHandler.sendWithPromise("Terminate", null);
|
|
12430
12430
|
return e.push(t), Promise.all(e).then(() => {
|
|
12431
12431
|
var n, s;
|
|
@@ -12537,7 +12537,7 @@ class XC {
|
|
|
12537
12537
|
}), e.on("StartRenderPage", (r) => {
|
|
12538
12538
|
if (this.destroyed)
|
|
12539
12539
|
return;
|
|
12540
|
-
u(this,
|
|
12540
|
+
u(this, ps).get(r.pageIndex)._startRenderPage(r.transparency, r.cacheKey);
|
|
12541
12541
|
}), e.on("commonobj", ([r, n, s]) => {
|
|
12542
12542
|
var a;
|
|
12543
12543
|
if (this.destroyed || this.commonObjs.has(r))
|
|
@@ -12561,7 +12561,7 @@ class XC {
|
|
|
12561
12561
|
imageRef: c
|
|
12562
12562
|
} = s;
|
|
12563
12563
|
Dr(c, "The imageRef must be defined.");
|
|
12564
|
-
for (const h of u(this,
|
|
12564
|
+
for (const h of u(this, ps).values())
|
|
12565
12565
|
for (const [, d] of h.objs)
|
|
12566
12566
|
if ((d == null ? void 0 : d.ref) === c)
|
|
12567
12567
|
return d.dataLen ? (this.commonObjs.resolve(r, structuredClone(d)), d.dataLen) : null;
|
|
@@ -12579,7 +12579,7 @@ class XC {
|
|
|
12579
12579
|
var l;
|
|
12580
12580
|
if (this.destroyed)
|
|
12581
12581
|
return;
|
|
12582
|
-
const o = u(this,
|
|
12582
|
+
const o = u(this, ps).get(n);
|
|
12583
12583
|
if (!o.objs.has(r)) {
|
|
12584
12584
|
if (o._intentStates.size === 0) {
|
|
12585
12585
|
(l = a == null ? void 0 : a.bitmap) == null || l.close();
|
|
@@ -12641,7 +12641,7 @@ class XC {
|
|
|
12641
12641
|
throw new Error("Transport destroyed");
|
|
12642
12642
|
s.refStr && u(this, ic).set(s.refStr, e);
|
|
12643
12643
|
const a = new WC(t, s, this, this._params.pdfBug);
|
|
12644
|
-
return u(this,
|
|
12644
|
+
return u(this, ps).set(t, a), a;
|
|
12645
12645
|
});
|
|
12646
12646
|
return u(this, nc).set(t, n), n;
|
|
12647
12647
|
}
|
|
@@ -12735,7 +12735,7 @@ class XC {
|
|
|
12735
12735
|
async startCleanup(e = !1) {
|
|
12736
12736
|
if (!this.destroyed) {
|
|
12737
12737
|
await this.messageHandler.sendWithPromise("Cleanup", null);
|
|
12738
|
-
for (const t of u(this,
|
|
12738
|
+
for (const t of u(this, ps).values())
|
|
12739
12739
|
if (!t.cleanup())
|
|
12740
12740
|
throw new Error(`startCleanup: Page ${t.pageNumber} is currently rendering.`);
|
|
12741
12741
|
this.commonObjs.clear(), e || this.fontLoader.clear(), u(this, Ks).clear(), this.filterFactory.destroy(!0), zh.cleanup();
|
|
@@ -12748,7 +12748,7 @@ class XC {
|
|
|
12748
12748
|
return u(this, ic).get(t) ?? null;
|
|
12749
12749
|
}
|
|
12750
12750
|
}
|
|
12751
|
-
Ks = new WeakMap(),
|
|
12751
|
+
Ks = new WeakMap(), ps = new WeakMap(), nc = new WeakMap(), ic = new WeakMap(), Qs = new WeakMap(), gl = new WeakSet(), _h = function(e, t = null) {
|
|
12752
12752
|
const r = u(this, Ks).get(e);
|
|
12753
12753
|
if (r)
|
|
12754
12754
|
return r;
|
|
@@ -14351,8 +14351,8 @@ class iS {
|
|
|
14351
14351
|
resetEdited() {
|
|
14352
14352
|
var e;
|
|
14353
14353
|
u(this, yl) && ({
|
|
14354
|
-
contentsObj:
|
|
14355
|
-
richText:
|
|
14354
|
+
contentsObj: yn(this, Js)._,
|
|
14355
|
+
richText: yn(this, ra)._
|
|
14356
14356
|
} = u(this, yl), T(this, yl, null), (e = u(this, Bi)) == null || e.remove(), T(this, Bi, null), T(this, ta, null));
|
|
14357
14357
|
}
|
|
14358
14358
|
forceHide() {
|
|
@@ -15454,7 +15454,7 @@ class qe {
|
|
|
15454
15454
|
}
|
|
15455
15455
|
}
|
|
15456
15456
|
Re(qe, "PRECISION", 1e-4);
|
|
15457
|
-
var Qn, ji, dc, fc,
|
|
15457
|
+
var Qn, ji, dc, fc, gs, wt, _l, Cl, df, ff, pc, gc, Xa, pf, Sg, Tg, Lr, Ch, Hw, $w, Vw, qw, Gw, Ww;
|
|
15458
15458
|
const Ls = class Ls {
|
|
15459
15459
|
constructor({
|
|
15460
15460
|
x: e,
|
|
@@ -15465,7 +15465,7 @@ const Ls = class Ls {
|
|
|
15465
15465
|
N(this, ji, []);
|
|
15466
15466
|
N(this, dc);
|
|
15467
15467
|
N(this, fc);
|
|
15468
|
-
N(this,
|
|
15468
|
+
N(this, gs, []);
|
|
15469
15469
|
N(this, wt, new Float32Array(18));
|
|
15470
15470
|
N(this, _l);
|
|
15471
15471
|
N(this, Cl);
|
|
@@ -15494,12 +15494,12 @@ const Ls = class Ls {
|
|
|
15494
15494
|
let A = o, E = l;
|
|
15495
15495
|
o = c, l = h, c += y, h += v, (R = u(this, Xa)) == null || R.push(e, t);
|
|
15496
15496
|
const _ = -v / w, C = y / w, I = _ * u(this, gc), k = C * u(this, gc);
|
|
15497
|
-
return u(this, wt).set(u(this, wt).subarray(2, 8), 0), u(this, wt).set([c + I, h + k], 4), u(this, wt).set(u(this, wt).subarray(14, 18), 12), u(this, wt).set([c - I, h - k], 16), isNaN(u(this, wt)[6]) ? (u(this,
|
|
15497
|
+
return u(this, wt).set(u(this, wt).subarray(2, 8), 0), u(this, wt).set([c + I, h + k], 4), u(this, wt).set(u(this, wt).subarray(14, 18), 12), u(this, wt).set([c - I, h - k], 16), isNaN(u(this, wt)[6]) ? (u(this, gs).length === 0 && (u(this, wt).set([o + I, l + k], 2), u(this, gs).push(NaN, NaN, NaN, NaN, (o + I - r) / s, (l + k - n) / a), u(this, wt).set([o - I, l - k], 14), u(this, ji).push(NaN, NaN, NaN, NaN, (o - I - r) / s, (l - k - n) / a)), u(this, wt).set([A, E, o, l, c, h], 6), !this.isEmpty()) : (u(this, wt).set([A, E, o, l, c, h], 6), Math.abs(Math.atan2(E - l, A - o) - Math.atan2(v, y)) < Math.PI / 2 ? ([o, l, c, h] = u(this, wt).subarray(2, 6), u(this, gs).push(NaN, NaN, NaN, NaN, ((o + c) / 2 - r) / s, ((l + h) / 2 - n) / a), [o, l, A, E] = u(this, wt).subarray(14, 18), u(this, ji).push(NaN, NaN, NaN, NaN, ((A + o) / 2 - r) / s, ((E + l) / 2 - n) / a), !0) : ([A, E, o, l, c, h] = u(this, wt).subarray(0, 6), u(this, gs).push(((A + 5 * o) / 6 - r) / s, ((E + 5 * l) / 6 - n) / a, ((5 * o + c) / 6 - r) / s, ((5 * l + h) / 6 - n) / a, ((o + c) / 2 - r) / s, ((l + h) / 2 - n) / a), [c, h, o, l, A, E] = u(this, wt).subarray(12, 18), u(this, ji).push(((A + 5 * o) / 6 - r) / s, ((E + 5 * l) / 6 - n) / a, ((5 * o + c) / 6 - r) / s, ((5 * l + h) / 6 - n) / a, ((o + c) / 2 - r) / s, ((l + h) / 2 - n) / a), !0));
|
|
15498
15498
|
}
|
|
15499
15499
|
toSVGPath() {
|
|
15500
15500
|
if (this.isEmpty())
|
|
15501
15501
|
return "";
|
|
15502
|
-
const e = u(this,
|
|
15502
|
+
const e = u(this, gs), t = u(this, ji);
|
|
15503
15503
|
if (isNaN(u(this, wt)[6]) && !this.isEmpty())
|
|
15504
15504
|
return L(this, Lr, Hw).call(this);
|
|
15505
15505
|
const r = [];
|
|
@@ -15516,12 +15516,12 @@ const Ls = class Ls {
|
|
|
15516
15516
|
}
|
|
15517
15517
|
getOutlines() {
|
|
15518
15518
|
var d;
|
|
15519
|
-
const e = u(this,
|
|
15519
|
+
const e = u(this, gs), t = u(this, ji), r = u(this, wt), [n, s, a, o] = u(this, Qn), l = new Float32Array((((d = u(this, Xa)) == null ? void 0 : d.length) ?? 0) + 2);
|
|
15520
15520
|
for (let p = 0, g = l.length - 2; p < g; p += 2)
|
|
15521
15521
|
l[p] = (u(this, Xa)[p] - n) / a, l[p + 1] = (u(this, Xa)[p + 1] - s) / o;
|
|
15522
15522
|
if (l[l.length - 2] = (u(this, _l) - n) / a, l[l.length - 1] = (u(this, Cl) - s) / o, isNaN(r[6]) && !this.isEmpty())
|
|
15523
15523
|
return L(this, Lr, qw).call(this, l);
|
|
15524
|
-
const c = new Float32Array(u(this,
|
|
15524
|
+
const c = new Float32Array(u(this, gs).length + 24 + u(this, ji).length);
|
|
15525
15525
|
let h = e.length;
|
|
15526
15526
|
for (let p = 0; p < h; p += 2) {
|
|
15527
15527
|
if (isNaN(e[p])) {
|
|
@@ -15542,7 +15542,7 @@ const Ls = class Ls {
|
|
|
15542
15542
|
return L(this, Lr, Gw).call(this, c, h), this.newFreeDrawOutline(c, l, u(this, Qn), u(this, pc), u(this, dc), u(this, fc));
|
|
15543
15543
|
}
|
|
15544
15544
|
};
|
|
15545
|
-
Qn = new WeakMap(), ji = new WeakMap(), dc = new WeakMap(), fc = new WeakMap(),
|
|
15545
|
+
Qn = new WeakMap(), ji = new WeakMap(), dc = new WeakMap(), fc = new WeakMap(), gs = new WeakMap(), wt = new WeakMap(), _l = new WeakMap(), Cl = new WeakMap(), df = new WeakMap(), ff = new WeakMap(), pc = new WeakMap(), gc = new WeakMap(), Xa = new WeakMap(), pf = new WeakMap(), Sg = new WeakMap(), Tg = new WeakMap(), Lr = new WeakSet(), Ch = function() {
|
|
15546
15546
|
const e = u(this, wt).subarray(4, 6), t = u(this, wt).subarray(16, 18), [r, n, s, a] = u(this, Qn);
|
|
15547
15547
|
return [(u(this, _l) + (e[0] - t[0]) / 2 - r) / s, (u(this, Cl) + (e[1] - t[1]) / 2 - n) / a, (u(this, _l) + (t[0] - e[0]) / 2 - r) / s, (u(this, Cl) + (t[1] - e[1]) / 2 - n) / a];
|
|
15548
15548
|
}, Hw = function() {
|
|
@@ -16520,8 +16520,8 @@ xc = new WeakMap(), Ef = new WeakMap(), sa = new WeakMap(), kl = new WeakMap(),
|
|
|
16520
16520
|
u(this, ti) === null || !this.parent || (this.parent.drawLayer.remove(u(this, ti)), T(this, ti, null), this.parent.drawLayer.remove(u(this, hn)), T(this, hn, null));
|
|
16521
16521
|
}, No = function(t = this.parent) {
|
|
16522
16522
|
u(this, ti) === null && ({
|
|
16523
|
-
id:
|
|
16524
|
-
clipPathId:
|
|
16523
|
+
id: yn(this, ti)._,
|
|
16524
|
+
clipPathId: yn(this, kl)._
|
|
16525
16525
|
} = t.drawLayer.draw({
|
|
16526
16526
|
bbox: u(this, bi).box,
|
|
16527
16527
|
root: {
|
|
@@ -17051,16 +17051,16 @@ ri = new WeakMap(), _c = new WeakMap(), Ur = new WeakMap(), Rl = new WeakMap(),
|
|
|
17051
17051
|
}
|
|
17052
17052
|
}, Re(Ge, "_currentDrawId", -1), Re(Ge, "_currentParent", null), N(Ge, Ur, null), N(Ge, Rl, null), N(Ge, Il, null), N(Ge, Ka, NaN), N(Ge, Qa, null), N(Ge, Ja, null), N(Ge, Nl, NaN), Re(Ge, "_INNER_MARGIN", 3);
|
|
17053
17053
|
let sg = Ge;
|
|
17054
|
-
var
|
|
17054
|
+
var ms, Hr, $r, Ml, Cc, En, Jr, yi, Ll, Ol, Fl, Sc, Vp;
|
|
17055
17055
|
class mS {
|
|
17056
17056
|
constructor(e, t, r, n, s, a) {
|
|
17057
17057
|
N(this, Sc);
|
|
17058
|
-
N(this,
|
|
17058
|
+
N(this, ms, new Float64Array(6));
|
|
17059
17059
|
N(this, Hr);
|
|
17060
17060
|
N(this, $r);
|
|
17061
17061
|
N(this, Ml);
|
|
17062
17062
|
N(this, Cc);
|
|
17063
|
-
N(this,
|
|
17063
|
+
N(this, En);
|
|
17064
17064
|
N(this, Jr, "");
|
|
17065
17065
|
N(this, yi, 0);
|
|
17066
17066
|
N(this, Ll, new Ff());
|
|
@@ -17068,10 +17068,10 @@ class mS {
|
|
|
17068
17068
|
N(this, Fl);
|
|
17069
17069
|
T(this, Ol, r), T(this, Fl, n), T(this, Ml, s), T(this, Cc, a), [e, t] = L(this, Sc, Vp).call(this, e, t);
|
|
17070
17070
|
const o = T(this, Hr, [NaN, NaN, NaN, NaN, e, t]);
|
|
17071
|
-
T(this,
|
|
17071
|
+
T(this, En, [e, t]), T(this, $r, [{
|
|
17072
17072
|
line: o,
|
|
17073
|
-
points: u(this,
|
|
17074
|
-
}]), u(this,
|
|
17073
|
+
points: u(this, En)
|
|
17074
|
+
}]), u(this, ms).set(o, 0);
|
|
17075
17075
|
}
|
|
17076
17076
|
updateProperty(e, t) {
|
|
17077
17077
|
e === "stroke-width" && T(this, Cc, t);
|
|
@@ -17080,16 +17080,16 @@ class mS {
|
|
|
17080
17080
|
return !u(this, $r) || u(this, $r).length === 0;
|
|
17081
17081
|
}
|
|
17082
17082
|
isCancellable() {
|
|
17083
|
-
return u(this,
|
|
17083
|
+
return u(this, En).length <= 10;
|
|
17084
17084
|
}
|
|
17085
17085
|
add(e, t) {
|
|
17086
17086
|
[e, t] = L(this, Sc, Vp).call(this, e, t);
|
|
17087
|
-
const [r, n, s, a] = u(this,
|
|
17088
|
-
return Math.hypot(u(this, Ol) * o, u(this, Fl) * l) <= 2 ? null : (u(this,
|
|
17087
|
+
const [r, n, s, a] = u(this, ms).subarray(2, 6), o = e - s, l = t - a;
|
|
17088
|
+
return Math.hypot(u(this, Ol) * o, u(this, Fl) * l) <= 2 ? null : (u(this, En).push(e, t), isNaN(r) ? (u(this, ms).set([s, a, e, t], 2), u(this, Hr).push(NaN, NaN, NaN, NaN, e, t), {
|
|
17089
17089
|
path: {
|
|
17090
17090
|
d: this.toSVGPath()
|
|
17091
17091
|
}
|
|
17092
|
-
}) : (isNaN(u(this,
|
|
17092
|
+
}) : (isNaN(u(this, ms)[0]) && u(this, Hr).splice(6, 6), u(this, ms).set([r, n, s, a, e, t], 0), u(this, Hr).push(...qe.createBezierPoints(r, n, s, a, e, t)), {
|
|
17093
17093
|
path: {
|
|
17094
17094
|
d: this.toSVGPath()
|
|
17095
17095
|
}
|
|
@@ -17097,7 +17097,7 @@ class mS {
|
|
|
17097
17097
|
}
|
|
17098
17098
|
end(e, t) {
|
|
17099
17099
|
const r = this.add(e, t);
|
|
17100
|
-
return r || (u(this,
|
|
17100
|
+
return r || (u(this, En).length === 2 ? {
|
|
17101
17101
|
path: {
|
|
17102
17102
|
d: this.toSVGPath()
|
|
17103
17103
|
}
|
|
@@ -17106,18 +17106,18 @@ class mS {
|
|
|
17106
17106
|
startNew(e, t, r, n, s) {
|
|
17107
17107
|
T(this, Ol, r), T(this, Fl, n), T(this, Ml, s), [e, t] = L(this, Sc, Vp).call(this, e, t);
|
|
17108
17108
|
const a = T(this, Hr, [NaN, NaN, NaN, NaN, e, t]);
|
|
17109
|
-
T(this,
|
|
17109
|
+
T(this, En, [e, t]);
|
|
17110
17110
|
const o = u(this, $r).at(-1);
|
|
17111
17111
|
return o && (o.line = new Float32Array(o.line), o.points = new Float32Array(o.points)), u(this, $r).push({
|
|
17112
17112
|
line: a,
|
|
17113
|
-
points: u(this,
|
|
17114
|
-
}), u(this,
|
|
17113
|
+
points: u(this, En)
|
|
17114
|
+
}), u(this, ms).set(a, 0), T(this, yi, 0), this.toSVGPath(), null;
|
|
17115
17115
|
}
|
|
17116
17116
|
getLastElement() {
|
|
17117
17117
|
return u(this, $r).at(-1);
|
|
17118
17118
|
}
|
|
17119
17119
|
setLastElement(e) {
|
|
17120
|
-
return u(this, $r) ? (u(this, $r).push(e), T(this, Hr, e.line), T(this,
|
|
17120
|
+
return u(this, $r) ? (u(this, $r).push(e), T(this, Hr, e.line), T(this, En, e.points), T(this, yi, 0), {
|
|
17121
17121
|
path: {
|
|
17122
17122
|
d: this.toSVGPath()
|
|
17123
17123
|
}
|
|
@@ -17132,7 +17132,7 @@ class mS {
|
|
|
17132
17132
|
line: r,
|
|
17133
17133
|
points: n
|
|
17134
17134
|
} = u(this, $r)[e];
|
|
17135
|
-
T(this, Hr, r), T(this,
|
|
17135
|
+
T(this, Hr, r), T(this, En, n), T(this, yi, 0), this.toSVGPath();
|
|
17136
17136
|
}
|
|
17137
17137
|
return {
|
|
17138
17138
|
path: {
|
|
@@ -17142,13 +17142,13 @@ class mS {
|
|
|
17142
17142
|
}
|
|
17143
17143
|
toSVGPath() {
|
|
17144
17144
|
const e = qe.svgRound(u(this, Hr)[4]), t = qe.svgRound(u(this, Hr)[5]);
|
|
17145
|
-
if (u(this,
|
|
17145
|
+
if (u(this, En).length === 2)
|
|
17146
17146
|
return T(this, Jr, `${u(this, Jr)} M ${e} ${t} Z`), u(this, Jr);
|
|
17147
|
-
if (u(this,
|
|
17147
|
+
if (u(this, En).length <= 6) {
|
|
17148
17148
|
const n = u(this, Jr).lastIndexOf("M");
|
|
17149
17149
|
T(this, Jr, `${u(this, Jr).slice(0, n)} M ${e} ${t}`), T(this, yi, 6);
|
|
17150
17150
|
}
|
|
17151
|
-
if (u(this,
|
|
17151
|
+
if (u(this, En).length === 4) {
|
|
17152
17152
|
const n = qe.svgRound(u(this, Hr)[10]), s = qe.svgRound(u(this, Hr)[11]);
|
|
17153
17153
|
return T(this, Jr, `${u(this, Jr)} L ${n} ${s}`), T(this, yi, 12), u(this, Jr);
|
|
17154
17154
|
}
|
|
@@ -17162,7 +17162,7 @@ class mS {
|
|
|
17162
17162
|
}
|
|
17163
17163
|
getOutlines(e, t, r, n) {
|
|
17164
17164
|
const s = u(this, $r).at(-1);
|
|
17165
|
-
return s.line = new Float32Array(s.line), s.points = new Float32Array(s.points), u(this, Ll).build(u(this, $r), e, t, r, u(this, Ml), u(this, Cc), n), T(this,
|
|
17165
|
+
return s.line = new Float32Array(s.line), s.points = new Float32Array(s.points), u(this, Ll).build(u(this, $r), e, t, r, u(this, Ml), u(this, Cc), n), T(this, ms, null), T(this, Hr, null), T(this, $r, null), T(this, Jr, null), u(this, Ll);
|
|
17166
17166
|
}
|
|
17167
17167
|
get defaultSVGProperties() {
|
|
17168
17168
|
return {
|
|
@@ -17176,26 +17176,26 @@ class mS {
|
|
|
17176
17176
|
};
|
|
17177
17177
|
}
|
|
17178
17178
|
}
|
|
17179
|
-
|
|
17179
|
+
ms = new WeakMap(), Hr = new WeakMap(), $r = new WeakMap(), Ml = new WeakMap(), Cc = new WeakMap(), En = new WeakMap(), Jr = new WeakMap(), yi = new WeakMap(), Ll = new WeakMap(), Ol = new WeakMap(), Fl = new WeakMap(), Sc = new WeakSet(), Vp = function(e, t) {
|
|
17180
17180
|
return qe._normalizePoint(e, t, u(this, Ol), u(this, Fl), u(this, Ml));
|
|
17181
17181
|
};
|
|
17182
|
-
var
|
|
17182
|
+
var _n, kf, Df, ni, bs, vs, Tc, kc, Bl, rn, Ns, hx, dx, fx;
|
|
17183
17183
|
class Ff extends qe {
|
|
17184
17184
|
constructor() {
|
|
17185
17185
|
super(...arguments);
|
|
17186
17186
|
N(this, rn);
|
|
17187
|
-
N(this,
|
|
17187
|
+
N(this, _n);
|
|
17188
17188
|
N(this, kf, 0);
|
|
17189
17189
|
N(this, Df);
|
|
17190
17190
|
N(this, ni);
|
|
17191
|
-
N(this, ms);
|
|
17192
17191
|
N(this, bs);
|
|
17192
|
+
N(this, vs);
|
|
17193
17193
|
N(this, Tc);
|
|
17194
17194
|
N(this, kc);
|
|
17195
17195
|
N(this, Bl);
|
|
17196
17196
|
}
|
|
17197
17197
|
build(t, r, n, s, a, o, l) {
|
|
17198
|
-
T(this,
|
|
17198
|
+
T(this, bs, r), T(this, vs, n), T(this, Tc, s), T(this, kc, a), T(this, Bl, o), T(this, Df, l ?? 0), T(this, ni, t), L(this, rn, dx).call(this);
|
|
17199
17199
|
}
|
|
17200
17200
|
get thickness() {
|
|
17201
17201
|
return u(this, Bl);
|
|
@@ -17317,15 +17317,15 @@ class Ff extends qe {
|
|
|
17317
17317
|
return v.build(d, n, s, 1, c, h, a), v;
|
|
17318
17318
|
}
|
|
17319
17319
|
get box() {
|
|
17320
|
-
return u(this,
|
|
17320
|
+
return u(this, _n);
|
|
17321
17321
|
}
|
|
17322
17322
|
updateProperty(t, r) {
|
|
17323
17323
|
return t === "stroke-width" ? L(this, rn, fx).call(this, r) : null;
|
|
17324
17324
|
}
|
|
17325
17325
|
updateParentDimensions([t, r], n) {
|
|
17326
17326
|
const [s, a] = L(this, rn, Ns).call(this);
|
|
17327
|
-
T(this,
|
|
17328
|
-
const [o, l] = L(this, rn, Ns).call(this), c = o - s, h = l - a, d = u(this,
|
|
17327
|
+
T(this, bs, t), T(this, vs, r), T(this, Tc, n);
|
|
17328
|
+
const [o, l] = L(this, rn, Ns).call(this), c = o - s, h = l - a, d = u(this, _n);
|
|
17329
17329
|
return d[0] -= c, d[1] -= h, d[2] += 2 * c, d[3] += 2 * h, d;
|
|
17330
17330
|
}
|
|
17331
17331
|
updateRotation(t) {
|
|
@@ -17336,10 +17336,10 @@ class Ff extends qe {
|
|
|
17336
17336
|
};
|
|
17337
17337
|
}
|
|
17338
17338
|
get viewBox() {
|
|
17339
|
-
return u(this,
|
|
17339
|
+
return u(this, _n).map(qe.svgRound).join(" ");
|
|
17340
17340
|
}
|
|
17341
17341
|
get defaultProperties() {
|
|
17342
|
-
const [t, r] = u(this,
|
|
17342
|
+
const [t, r] = u(this, _n);
|
|
17343
17343
|
return {
|
|
17344
17344
|
root: {
|
|
17345
17345
|
viewBox: this.viewBox
|
|
@@ -17350,7 +17350,7 @@ class Ff extends qe {
|
|
|
17350
17350
|
};
|
|
17351
17351
|
}
|
|
17352
17352
|
get rotationTransform() {
|
|
17353
|
-
const [, , t, r] = u(this,
|
|
17353
|
+
const [, , t, r] = u(this, _n);
|
|
17354
17354
|
let n = 0, s = 0, a = 0, o = 0, l = 0, c = 0;
|
|
17355
17355
|
switch (u(this, kf)) {
|
|
17356
17356
|
case 90:
|
|
@@ -17368,7 +17368,7 @@ class Ff extends qe {
|
|
|
17368
17368
|
return `matrix(${n} ${s} ${a} ${o} ${qe.svgRound(l)} ${qe.svgRound(c)})`;
|
|
17369
17369
|
}
|
|
17370
17370
|
getPathResizingSVGProperties([t, r, n, s]) {
|
|
17371
|
-
const [a, o] = L(this, rn, Ns).call(this), [l, c, h, d] = u(this,
|
|
17371
|
+
const [a, o] = L(this, rn, Ns).call(this), [l, c, h, d] = u(this, _n);
|
|
17372
17372
|
if (Math.abs(h - a) <= qe.PRECISION || Math.abs(d - o) <= qe.PRECISION) {
|
|
17373
17373
|
const y = t + n / 2 - (l + h / 2), v = r + s / 2 - (c + d / 2);
|
|
17374
17374
|
return {
|
|
@@ -17387,7 +17387,7 @@ class Ff extends qe {
|
|
|
17387
17387
|
};
|
|
17388
17388
|
}
|
|
17389
17389
|
getPathResizedSVGProperties([t, r, n, s]) {
|
|
17390
|
-
const [a, o] = L(this, rn, Ns).call(this), l = u(this,
|
|
17390
|
+
const [a, o] = L(this, rn, Ns).call(this), l = u(this, _n), [c, h, d, p] = l;
|
|
17391
17391
|
if (l[0] = t, l[1] = r, l[2] = n, l[3] = s, Math.abs(d - a) <= qe.PRECISION || Math.abs(p - o) <= qe.PRECISION) {
|
|
17392
17392
|
const v = t + n / 2 - (c + d / 2), A = r + s / 2 - (h + p / 2);
|
|
17393
17393
|
for (const {
|
|
@@ -17425,16 +17425,16 @@ class Ff extends qe {
|
|
|
17425
17425
|
};
|
|
17426
17426
|
}
|
|
17427
17427
|
getPathTranslatedSVGProperties([t, r], n) {
|
|
17428
|
-
const [s, a] = n, o = u(this,
|
|
17429
|
-
if (u(this,
|
|
17428
|
+
const [s, a] = n, o = u(this, _n), l = t - o[0], c = r - o[1];
|
|
17429
|
+
if (u(this, bs) === s && u(this, vs) === a)
|
|
17430
17430
|
for (const {
|
|
17431
17431
|
line: h,
|
|
17432
17432
|
points: d
|
|
17433
17433
|
} of u(this, ni))
|
|
17434
17434
|
qe._translate(h, l, c, h), qe._translate(d, l, c, d);
|
|
17435
17435
|
else {
|
|
17436
|
-
const h = u(this,
|
|
17437
|
-
T(this,
|
|
17436
|
+
const h = u(this, bs) / s, d = u(this, vs) / a;
|
|
17437
|
+
T(this, bs, s), T(this, vs, a);
|
|
17438
17438
|
for (const {
|
|
17439
17439
|
line: p,
|
|
17440
17440
|
points: g
|
|
@@ -17453,7 +17453,7 @@ class Ff extends qe {
|
|
|
17453
17453
|
};
|
|
17454
17454
|
}
|
|
17455
17455
|
get defaultSVGProperties() {
|
|
17456
|
-
const t = u(this,
|
|
17456
|
+
const t = u(this, _n);
|
|
17457
17457
|
return {
|
|
17458
17458
|
root: {
|
|
17459
17459
|
viewBox: this.viewBox
|
|
@@ -17470,14 +17470,14 @@ class Ff extends qe {
|
|
|
17470
17470
|
};
|
|
17471
17471
|
}
|
|
17472
17472
|
}
|
|
17473
|
-
|
|
17473
|
+
_n = new WeakMap(), kf = new WeakMap(), Df = new WeakMap(), ni = new WeakMap(), bs = new WeakMap(), vs = new WeakMap(), Tc = new WeakMap(), kc = new WeakMap(), Bl = new WeakMap(), rn = new WeakSet(), Ns = function(t = u(this, Bl)) {
|
|
17474
17474
|
const r = u(this, Df) + t / 2 * u(this, Tc);
|
|
17475
|
-
return u(this, kc) % 180 === 0 ? [r / u(this,
|
|
17475
|
+
return u(this, kc) % 180 === 0 ? [r / u(this, bs), r / u(this, vs)] : [r / u(this, vs), r / u(this, bs)];
|
|
17476
17476
|
}, hx = function() {
|
|
17477
|
-
const [t, r, n, s] = u(this,
|
|
17477
|
+
const [t, r, n, s] = u(this, _n), [a, o] = L(this, rn, Ns).call(this, 0);
|
|
17478
17478
|
return [t + a, r + o, n - 2 * a, s - 2 * o];
|
|
17479
17479
|
}, dx = function() {
|
|
17480
|
-
const t = T(this,
|
|
17480
|
+
const t = T(this, _n, new Float32Array([1 / 0, 1 / 0, -1 / 0, -1 / 0]));
|
|
17481
17481
|
for (const {
|
|
17482
17482
|
line: s
|
|
17483
17483
|
} of u(this, ni)) {
|
|
@@ -17497,7 +17497,7 @@ En = new WeakMap(), kf = new WeakMap(), Df = new WeakMap(), ni = new WeakMap(),
|
|
|
17497
17497
|
}, fx = function(t) {
|
|
17498
17498
|
const [r, n] = L(this, rn, Ns).call(this);
|
|
17499
17499
|
T(this, Bl, t);
|
|
17500
|
-
const [s, a] = L(this, rn, Ns).call(this), [o, l] = [s - r, a - n], c = u(this,
|
|
17500
|
+
const [s, a] = L(this, rn, Ns).call(this), [o, l] = [s - r, a - n], c = u(this, _n);
|
|
17501
17501
|
return c[0] -= o, c[1] -= l, c[2] += 2 * o, c[3] += 2 * l, c;
|
|
17502
17502
|
};
|
|
17503
17503
|
class Bg extends ux {
|
|
@@ -18080,7 +18080,7 @@ class Qb extends Bg {
|
|
|
18080
18080
|
return e.updateAll(this), e;
|
|
18081
18081
|
}
|
|
18082
18082
|
}
|
|
18083
|
-
var eo,
|
|
18083
|
+
var eo, ys, to, jl;
|
|
18084
18084
|
const qn = class qn extends sg {
|
|
18085
18085
|
constructor(t) {
|
|
18086
18086
|
super({
|
|
@@ -18089,10 +18089,10 @@ const qn = class qn extends sg {
|
|
|
18089
18089
|
name: "signatureEditor"
|
|
18090
18090
|
});
|
|
18091
18091
|
N(this, eo, !1);
|
|
18092
|
-
N(this,
|
|
18092
|
+
N(this, ys, null);
|
|
18093
18093
|
N(this, to, null);
|
|
18094
18094
|
N(this, jl, null);
|
|
18095
|
-
this._willKeepAspectRatio = !0, T(this, to, t.signatureData || null), T(this,
|
|
18095
|
+
this._willKeepAspectRatio = !0, T(this, to, t.signatureData || null), T(this, ys, null), this.defaultL10nId = "pdfjs-editor-signature-editor1";
|
|
18096
18096
|
}
|
|
18097
18097
|
static initialize(t, r) {
|
|
18098
18098
|
er.initialize(t, r), this._defaultDrawingOptions = new Kb(), this._defaultDrawnSignatureOptions = new Qb(r.viewParameters);
|
|
@@ -18113,7 +18113,7 @@ const qn = class qn extends sg {
|
|
|
18113
18113
|
get telemetryFinalData() {
|
|
18114
18114
|
return {
|
|
18115
18115
|
type: "signature",
|
|
18116
|
-
hasDescription: !!u(this,
|
|
18116
|
+
hasDescription: !!u(this, ys)
|
|
18117
18117
|
};
|
|
18118
18118
|
}
|
|
18119
18119
|
static computeTelemetryFinalData(t) {
|
|
@@ -18174,10 +18174,10 @@ const qn = class qn extends sg {
|
|
|
18174
18174
|
return u(this, jl);
|
|
18175
18175
|
}
|
|
18176
18176
|
get description() {
|
|
18177
|
-
return u(this,
|
|
18177
|
+
return u(this, ys);
|
|
18178
18178
|
}
|
|
18179
18179
|
set description(t) {
|
|
18180
|
-
T(this,
|
|
18180
|
+
T(this, ys, t), super.addEditToolbar().then((r) => {
|
|
18181
18181
|
r == null || r.updateEditSignatureButton(t);
|
|
18182
18182
|
});
|
|
18183
18183
|
}
|
|
@@ -18310,9 +18310,9 @@ const qn = class qn extends sg {
|
|
|
18310
18310
|
return t ? (o.paths = {
|
|
18311
18311
|
lines: r,
|
|
18312
18312
|
points: n
|
|
18313
|
-
}, o.uuid = u(this, jl), o.isCopy = !0) : o.lines = r, u(this,
|
|
18313
|
+
}, o.uuid = u(this, jl), o.isCopy = !0) : o.lines = r, u(this, ys) && (o.accessibilityData = {
|
|
18314
18314
|
type: "Figure",
|
|
18315
|
-
alt: u(this,
|
|
18315
|
+
alt: u(this, ys)
|
|
18316
18316
|
}), o;
|
|
18317
18317
|
}
|
|
18318
18318
|
static deserializeDraw(t, r, n, s, a, o) {
|
|
@@ -18321,12 +18321,12 @@ const qn = class qn extends sg {
|
|
|
18321
18321
|
static async deserialize(t, r, n) {
|
|
18322
18322
|
var a;
|
|
18323
18323
|
const s = await super.deserialize(t, r, n);
|
|
18324
|
-
return T(s, eo, t.areContours), T(s,
|
|
18324
|
+
return T(s, eo, t.areContours), T(s, ys, ((a = t.accessibilityData) == null ? void 0 : a.alt) || ""), T(s, jl, t.uuid), s;
|
|
18325
18325
|
}
|
|
18326
18326
|
};
|
|
18327
|
-
eo = new WeakMap(),
|
|
18327
|
+
eo = new WeakMap(), ys = new WeakMap(), to = new WeakMap(), jl = new WeakMap(), Re(qn, "_type", "signature"), Re(qn, "_editorType", at.SIGNATURE), Re(qn, "_defaultDrawingOptions", null);
|
|
18328
18328
|
let gb = qn;
|
|
18329
|
-
var or, Vr, ro, oa, no, Dc, la, Ul,
|
|
18329
|
+
var or, Vr, ro, oa, no, Dc, la, Ul, ws, ii, Pc, Mt, Dh, Ph, Gp, Wp, Xp, bb, Yp, xx;
|
|
18330
18330
|
class mb extends er {
|
|
18331
18331
|
constructor(t) {
|
|
18332
18332
|
super({
|
|
@@ -18342,7 +18342,7 @@ class mb extends er {
|
|
|
18342
18342
|
N(this, Dc, "");
|
|
18343
18343
|
N(this, la, null);
|
|
18344
18344
|
N(this, Ul, !1);
|
|
18345
|
-
N(this,
|
|
18345
|
+
N(this, ws, null);
|
|
18346
18346
|
N(this, ii, !1);
|
|
18347
18347
|
N(this, Pc, !1);
|
|
18348
18348
|
T(this, oa, t.bitmapUrl), T(this, no, t.bitmapFile), this.defaultL10nId = "pdfjs-editor-stamp-editor";
|
|
@@ -18416,7 +18416,7 @@ class mb extends er {
|
|
|
18416
18416
|
}
|
|
18417
18417
|
remove() {
|
|
18418
18418
|
var t;
|
|
18419
|
-
u(this, Vr) && (T(this, or, null), this._uiManager.imageManager.deleteId(u(this, Vr)), (t = u(this, la)) == null || t.remove(), T(this, la, null), u(this,
|
|
18419
|
+
u(this, Vr) && (T(this, or, null), this._uiManager.imageManager.deleteId(u(this, Vr)), (t = u(this, la)) == null || t.remove(), T(this, la, null), u(this, ws) && (clearTimeout(u(this, ws)), T(this, ws, null))), super.remove();
|
|
18420
18420
|
}
|
|
18421
18421
|
rebuild() {
|
|
18422
18422
|
if (!this.parent) {
|
|
@@ -18456,8 +18456,8 @@ class mb extends er {
|
|
|
18456
18456
|
onScaleChanging() {
|
|
18457
18457
|
if (!this.parent)
|
|
18458
18458
|
return;
|
|
18459
|
-
u(this,
|
|
18460
|
-
T(this,
|
|
18459
|
+
u(this, ws) !== null && clearTimeout(u(this, ws)), T(this, ws, setTimeout(() => {
|
|
18460
|
+
T(this, ws, null), L(this, Mt, bb).call(this);
|
|
18461
18461
|
}, 200));
|
|
18462
18462
|
}
|
|
18463
18463
|
copyCanvas(t, r, n = !1) {
|
|
@@ -18466,7 +18466,7 @@ class mb extends er {
|
|
|
18466
18466
|
const {
|
|
18467
18467
|
width: s,
|
|
18468
18468
|
height: a
|
|
18469
|
-
} = u(this, or), o = new
|
|
18469
|
+
} = u(this, or), o = new Ki();
|
|
18470
18470
|
let l = u(this, or), c = s, h = a, d = null;
|
|
18471
18471
|
if (r) {
|
|
18472
18472
|
if (s > r || a > r) {
|
|
@@ -18615,7 +18615,7 @@ class mb extends er {
|
|
|
18615
18615
|
}), null;
|
|
18616
18616
|
}
|
|
18617
18617
|
}
|
|
18618
|
-
or = new WeakMap(), Vr = new WeakMap(), ro = new WeakMap(), oa = new WeakMap(), no = new WeakMap(), Dc = new WeakMap(), la = new WeakMap(), Ul = new WeakMap(),
|
|
18618
|
+
or = new WeakMap(), Vr = new WeakMap(), ro = new WeakMap(), oa = new WeakMap(), no = new WeakMap(), Dc = new WeakMap(), la = new WeakMap(), Ul = new WeakMap(), ws = new WeakMap(), ii = new WeakMap(), Pc = new WeakMap(), Mt = new WeakSet(), Dh = function(t, r = !1) {
|
|
18619
18619
|
if (!t) {
|
|
18620
18620
|
this.remove();
|
|
18621
18621
|
return;
|
|
@@ -18724,7 +18724,7 @@ or = new WeakMap(), Vr = new WeakMap(), ro = new WeakMap(), oa = new WeakMap(),
|
|
|
18724
18724
|
const [t, r] = this.parentDimensions, {
|
|
18725
18725
|
width: n,
|
|
18726
18726
|
height: s
|
|
18727
|
-
} = this, a = new
|
|
18727
|
+
} = this, a = new Ki(), o = Math.ceil(n * t * a.sx), l = Math.ceil(s * r * a.sy), c = u(this, la);
|
|
18728
18728
|
if (!c || c.width === o && c.height === l)
|
|
18729
18729
|
return;
|
|
18730
18730
|
c.width = o, c.height = l;
|
|
@@ -18761,7 +18761,7 @@ or = new WeakMap(), Vr = new WeakMap(), ro = new WeakMap(), oa = new WeakMap(),
|
|
|
18761
18761
|
isSameAltText: a
|
|
18762
18762
|
};
|
|
18763
18763
|
}, Re(mb, "_type", "stamp"), Re(mb, "_editorType", at.STAMP);
|
|
18764
|
-
var Hl, Rc,
|
|
18764
|
+
var Hl, Rc, xs, io, ua, si, so, Ic, $l, Vi, ca, qr, ha, ao, Nc, Ye, oo, lr, Ax, ns, vb, yb, Zp;
|
|
18765
18765
|
const Ni = class Ni {
|
|
18766
18766
|
constructor({
|
|
18767
18767
|
uiManager: e,
|
|
@@ -18778,7 +18778,7 @@ const Ni = class Ni {
|
|
|
18778
18778
|
N(this, lr);
|
|
18779
18779
|
N(this, Hl);
|
|
18780
18780
|
N(this, Rc, !1);
|
|
18781
|
-
N(this,
|
|
18781
|
+
N(this, xs, null);
|
|
18782
18782
|
N(this, io, null);
|
|
18783
18783
|
N(this, ua, null);
|
|
18784
18784
|
N(this, si, /* @__PURE__ */ new Map());
|
|
@@ -18798,7 +18798,7 @@ const Ni = class Ni {
|
|
|
18798
18798
|
for (const p of d)
|
|
18799
18799
|
p.initialize(h, e);
|
|
18800
18800
|
}
|
|
18801
|
-
e.registerEditorTypes(d), T(this, Ye, e), this.pageIndex = t, this.div = r, T(this, Hl, s), T(this,
|
|
18801
|
+
e.registerEditorTypes(d), T(this, Ye, e), this.pageIndex = t, this.div = r, T(this, Hl, s), T(this, xs, a), this.viewport = c, T(this, qr, l), this.drawLayer = o, this._structTree = n, u(this, Ye).addLayer(this);
|
|
18802
18802
|
}
|
|
18803
18803
|
get isEmpty() {
|
|
18804
18804
|
return u(this, si).size === 0;
|
|
@@ -18852,7 +18852,7 @@ const Ni = class Ni {
|
|
|
18852
18852
|
}
|
|
18853
18853
|
toggleAnnotationLayerPointerEvents(e = !1) {
|
|
18854
18854
|
var t;
|
|
18855
|
-
(t = u(this,
|
|
18855
|
+
(t = u(this, xs)) == null || t.div.classList.toggle("disabled", !e);
|
|
18856
18856
|
}
|
|
18857
18857
|
async enable() {
|
|
18858
18858
|
var r;
|
|
@@ -18860,11 +18860,11 @@ const Ni = class Ni {
|
|
|
18860
18860
|
const e = /* @__PURE__ */ new Set();
|
|
18861
18861
|
for (const n of u(this, si).values())
|
|
18862
18862
|
n.enableEditing(), n.show(!0), n.annotationElementId && (u(this, Ye).removeChangedExistingAnnotation(n), e.add(n.annotationElementId));
|
|
18863
|
-
if (!u(this,
|
|
18863
|
+
if (!u(this, xs)) {
|
|
18864
18864
|
T(this, $l, !1);
|
|
18865
18865
|
return;
|
|
18866
18866
|
}
|
|
18867
|
-
const t = u(this,
|
|
18867
|
+
const t = u(this, xs).getEditableAnnotations();
|
|
18868
18868
|
for (const n of t) {
|
|
18869
18869
|
if (n.hide(), u(this, Ye).isDeletedAnnotationElement(n.data.id) || e.has(n.data.id))
|
|
18870
18870
|
continue;
|
|
@@ -18922,8 +18922,8 @@ const Ni = class Ni {
|
|
|
18922
18922
|
t.set(s.annotationElementId, s);
|
|
18923
18923
|
(n = this.getEditableAnnotation(s.annotationElementId)) == null || n.show(), s.remove();
|
|
18924
18924
|
}
|
|
18925
|
-
if (u(this,
|
|
18926
|
-
const s = u(this,
|
|
18925
|
+
if (u(this, xs)) {
|
|
18926
|
+
const s = u(this, xs).getEditableAnnotations();
|
|
18927
18927
|
for (const a of s) {
|
|
18928
18928
|
const {
|
|
18929
18929
|
id: o
|
|
@@ -18948,7 +18948,7 @@ const Ni = class Ni {
|
|
|
18948
18948
|
}
|
|
18949
18949
|
getEditableAnnotation(e) {
|
|
18950
18950
|
var t;
|
|
18951
|
-
return ((t = u(this,
|
|
18951
|
+
return ((t = u(this, xs)) == null ? void 0 : t.getEditableAnnotation(e)) || null;
|
|
18952
18952
|
}
|
|
18953
18953
|
setActiveEditor(e) {
|
|
18954
18954
|
u(this, Ye).getActive() !== e && u(this, Ye).setActiveEditor(e);
|
|
@@ -19050,7 +19050,7 @@ const Ni = class Ni {
|
|
|
19050
19050
|
}
|
|
19051
19051
|
canCreateNewEmptyEditor() {
|
|
19052
19052
|
var e;
|
|
19053
|
-
return (e = u(this, lr,
|
|
19053
|
+
return (e = u(this, lr, ns)) == null ? void 0 : e.canCreateNewEmptyEditor();
|
|
19054
19054
|
}
|
|
19055
19055
|
async pasteEditor(e, t) {
|
|
19056
19056
|
this.updateToolbar(e), await u(this, Ye).updateMode(e.mode);
|
|
@@ -19101,7 +19101,7 @@ const Ni = class Ni {
|
|
|
19101
19101
|
const {
|
|
19102
19102
|
isMac: t
|
|
19103
19103
|
} = Gr.platform;
|
|
19104
|
-
if (e.button !== 0 || e.ctrlKey && t || e.target !== this.div || !u(this, so) || (T(this, so, !1), (n = u(this, lr,
|
|
19104
|
+
if (e.button !== 0 || e.ctrlKey && t || e.target !== this.div || !u(this, so) || (T(this, so, !1), (n = u(this, lr, ns)) != null && n.isDrawer && u(this, lr, ns).supportMultipleDrawings))
|
|
19105
19105
|
return;
|
|
19106
19106
|
if (!u(this, Rc)) {
|
|
19107
19107
|
T(this, Rc, !0);
|
|
@@ -19125,7 +19125,7 @@ const Ni = class Ni {
|
|
|
19125
19125
|
} = Gr.platform;
|
|
19126
19126
|
if (e.button !== 0 || e.ctrlKey && t || e.target !== this.div)
|
|
19127
19127
|
return;
|
|
19128
|
-
if (T(this, so, !0), (n = u(this, lr,
|
|
19128
|
+
if (T(this, so, !0), (n = u(this, lr, ns)) != null && n.isDrawer) {
|
|
19129
19129
|
this.startDrawingSession(e);
|
|
19130
19130
|
return;
|
|
19131
19131
|
}
|
|
@@ -19136,7 +19136,7 @@ const Ni = class Ni {
|
|
|
19136
19136
|
if (this.div.focus({
|
|
19137
19137
|
preventScroll: !0
|
|
19138
19138
|
}), u(this, Vi)) {
|
|
19139
|
-
u(this, lr,
|
|
19139
|
+
u(this, lr, ns).startDrawing(this, u(this, Ye), !1, e);
|
|
19140
19140
|
return;
|
|
19141
19141
|
}
|
|
19142
19142
|
u(this, Ye).setCurrentDrawingSession(this), T(this, Vi, new AbortController());
|
|
@@ -19147,7 +19147,7 @@ const Ni = class Ni {
|
|
|
19147
19147
|
r && !this.div.contains(r) && (T(this, ca, null), this.commitOrRemove());
|
|
19148
19148
|
}, {
|
|
19149
19149
|
signal: t
|
|
19150
|
-
}), u(this, lr,
|
|
19150
|
+
}), u(this, lr, ns).startDrawing(this, u(this, Ye), !1, e);
|
|
19151
19151
|
}
|
|
19152
19152
|
pause(e) {
|
|
19153
19153
|
if (e) {
|
|
@@ -19163,7 +19163,7 @@ const Ni = class Ni {
|
|
|
19163
19163
|
}, 0);
|
|
19164
19164
|
}
|
|
19165
19165
|
endDrawingSession(e = !1) {
|
|
19166
|
-
return u(this, Vi) ? (u(this, Ye).setCurrentDrawingSession(null), u(this, Vi).abort(), T(this, Vi, null), T(this, ca, null), u(this, lr,
|
|
19166
|
+
return u(this, Vi) ? (u(this, Ye).setCurrentDrawingSession(null), u(this, Vi).abort(), T(this, Vi, null), T(this, ca, null), u(this, lr, ns).endDrawing(e)) : null;
|
|
19167
19167
|
}
|
|
19168
19168
|
findNewParent(e, t, r) {
|
|
19169
19169
|
const n = u(this, Ye).findParent(t, r);
|
|
@@ -19173,7 +19173,7 @@ const Ni = class Ni {
|
|
|
19173
19173
|
return u(this, Vi) ? (this.endDrawingSession(), !0) : !1;
|
|
19174
19174
|
}
|
|
19175
19175
|
onScaleChanging() {
|
|
19176
|
-
u(this, Vi) && u(this, lr,
|
|
19176
|
+
u(this, Vi) && u(this, lr, ns).onScaleChangingWhenDrawing(this);
|
|
19177
19177
|
}
|
|
19178
19178
|
destroy() {
|
|
19179
19179
|
var e, t;
|
|
@@ -19212,7 +19212,7 @@ const Ni = class Ni {
|
|
|
19212
19212
|
return u(this, Ye).viewParameters.realScale;
|
|
19213
19213
|
}
|
|
19214
19214
|
};
|
|
19215
|
-
Hl = new WeakMap(), Rc = new WeakMap(),
|
|
19215
|
+
Hl = new WeakMap(), Rc = new WeakMap(), xs = new WeakMap(), io = new WeakMap(), ua = new WeakMap(), si = new WeakMap(), so = new WeakMap(), Ic = new WeakMap(), $l = new WeakMap(), Vi = new WeakMap(), ca = new WeakMap(), qr = new WeakMap(), ha = new WeakMap(), ao = new WeakMap(), Nc = new WeakMap(), Ye = new WeakMap(), oo = new WeakMap(), lr = new WeakSet(), Ax = function(e) {
|
|
19216
19216
|
u(this, Ye).unselectAll();
|
|
19217
19217
|
const {
|
|
19218
19218
|
target: t
|
|
@@ -19234,10 +19234,10 @@ Hl = new WeakMap(), Rc = new WeakMap(), ws = new WeakMap(), io = new WeakMap(),
|
|
|
19234
19234
|
signal: u(this, Ye)._signal
|
|
19235
19235
|
}), e.preventDefault();
|
|
19236
19236
|
}
|
|
19237
|
-
},
|
|
19237
|
+
}, ns = function() {
|
|
19238
19238
|
return u(Ni, oo).get(u(this, Ye).getMode());
|
|
19239
19239
|
}, vb = function(e) {
|
|
19240
|
-
const t = u(this, lr,
|
|
19240
|
+
const t = u(this, lr, ns);
|
|
19241
19241
|
return t ? new t.prototype.constructor(e) : null;
|
|
19242
19242
|
}, yb = function() {
|
|
19243
19243
|
const {
|
|
@@ -19255,14 +19255,14 @@ Hl = new WeakMap(), Rc = new WeakMap(), ws = new WeakMap(), io = new WeakMap(),
|
|
|
19255
19255
|
e.isEmpty() && e.remove();
|
|
19256
19256
|
}, Re(Ni, "_initialized", !1), N(Ni, oo, new Map([Z0, ub, mb, ig, gb].map((e) => [e._editorType, e])));
|
|
19257
19257
|
let ag = Ni;
|
|
19258
|
-
var qi,
|
|
19258
|
+
var qi, Cn, Vl, Pf, Pg, Ex, Ss, wb, _x, xb;
|
|
19259
19259
|
const Rr = class Rr {
|
|
19260
19260
|
constructor({
|
|
19261
19261
|
pageIndex: e
|
|
19262
19262
|
}) {
|
|
19263
19263
|
N(this, Ss);
|
|
19264
19264
|
N(this, qi, null);
|
|
19265
|
-
N(this,
|
|
19265
|
+
N(this, Cn, /* @__PURE__ */ new Map());
|
|
19266
19266
|
N(this, Vl, /* @__PURE__ */ new Map());
|
|
19267
19267
|
this.pageIndex = e;
|
|
19268
19268
|
}
|
|
@@ -19272,8 +19272,8 @@ const Rr = class Rr {
|
|
|
19272
19272
|
return;
|
|
19273
19273
|
}
|
|
19274
19274
|
if (u(this, qi) !== e) {
|
|
19275
|
-
if (u(this,
|
|
19276
|
-
for (const t of u(this,
|
|
19275
|
+
if (u(this, Cn).size > 0)
|
|
19276
|
+
for (const t of u(this, Cn).values())
|
|
19277
19277
|
t.remove(), e.append(t);
|
|
19278
19278
|
T(this, qi, e);
|
|
19279
19279
|
}
|
|
@@ -19282,20 +19282,20 @@ const Rr = class Rr {
|
|
|
19282
19282
|
return _t(this, "_svgFactory", new Uh());
|
|
19283
19283
|
}
|
|
19284
19284
|
draw(e, t = !1, r = !1) {
|
|
19285
|
-
const n =
|
|
19285
|
+
const n = yn(Rr, Pf)._++, s = L(this, Ss, wb).call(this), a = Rr._svgFactory.createElement("defs");
|
|
19286
19286
|
s.append(a);
|
|
19287
19287
|
const o = Rr._svgFactory.createElement("path");
|
|
19288
19288
|
a.append(o);
|
|
19289
19289
|
const l = `path_p${this.pageIndex}_${n}`;
|
|
19290
19290
|
o.setAttribute("id", l), o.setAttribute("vector-effect", "non-scaling-stroke"), t && u(this, Vl).set(n, o);
|
|
19291
19291
|
const c = r ? L(this, Ss, _x).call(this, a, l) : null, h = Rr._svgFactory.createElement("use");
|
|
19292
|
-
return s.append(h), h.setAttribute("href", `#${l}`), this.updateProperties(s, e), u(this,
|
|
19292
|
+
return s.append(h), h.setAttribute("href", `#${l}`), this.updateProperties(s, e), u(this, Cn).set(n, s), {
|
|
19293
19293
|
id: n,
|
|
19294
19294
|
clipPathId: `url(#${c})`
|
|
19295
19295
|
};
|
|
19296
19296
|
}
|
|
19297
19297
|
drawOutline(e, t) {
|
|
19298
|
-
const r =
|
|
19298
|
+
const r = yn(Rr, Pf)._++, n = L(this, Ss, wb).call(this), s = Rr._svgFactory.createElement("defs");
|
|
19299
19299
|
n.append(s);
|
|
19300
19300
|
const a = Rr._svgFactory.createElement("path");
|
|
19301
19301
|
s.append(a);
|
|
@@ -19313,7 +19313,7 @@ const Rr = class Rr {
|
|
|
19313
19313
|
const c = Rr._svgFactory.createElement("use");
|
|
19314
19314
|
n.append(c), c.setAttribute("href", `#${o}`), l && c.setAttribute("mask", `url(#${l})`);
|
|
19315
19315
|
const h = c.cloneNode();
|
|
19316
|
-
return n.append(h), c.classList.add("mainOutline"), h.classList.add("secondaryOutline"), this.updateProperties(n, e), u(this,
|
|
19316
|
+
return n.append(h), c.classList.add("mainOutline"), h.classList.add("secondaryOutline"), this.updateProperties(n, e), u(this, Cn).set(r, n), r;
|
|
19317
19317
|
}
|
|
19318
19318
|
finalizeDraw(e, t) {
|
|
19319
19319
|
u(this, Vl).delete(e), this.updateProperties(e, t);
|
|
@@ -19327,7 +19327,7 @@ const Rr = class Rr {
|
|
|
19327
19327
|
bbox: n,
|
|
19328
19328
|
rootClass: s,
|
|
19329
19329
|
path: a
|
|
19330
|
-
} = t, o = typeof e == "number" ? u(this,
|
|
19330
|
+
} = t, o = typeof e == "number" ? u(this, Cn).get(e) : e;
|
|
19331
19331
|
if (o) {
|
|
19332
19332
|
if (r && L(this, Ss, xb).call(this, o, r), n && L(l = Rr, Pg, Ex).call(l, o, n), s) {
|
|
19333
19333
|
const {
|
|
@@ -19345,20 +19345,20 @@ const Rr = class Rr {
|
|
|
19345
19345
|
updateParent(e, t) {
|
|
19346
19346
|
if (t === this)
|
|
19347
19347
|
return;
|
|
19348
|
-
const r = u(this,
|
|
19349
|
-
r && (u(t, qi).append(r), u(this,
|
|
19348
|
+
const r = u(this, Cn).get(e);
|
|
19349
|
+
r && (u(t, qi).append(r), u(this, Cn).delete(e), u(t, Cn).set(e, r));
|
|
19350
19350
|
}
|
|
19351
19351
|
remove(e) {
|
|
19352
|
-
u(this, Vl).delete(e), u(this, qi) !== null && (u(this,
|
|
19352
|
+
u(this, Vl).delete(e), u(this, qi) !== null && (u(this, Cn).get(e).remove(), u(this, Cn).delete(e));
|
|
19353
19353
|
}
|
|
19354
19354
|
destroy() {
|
|
19355
19355
|
T(this, qi, null);
|
|
19356
|
-
for (const e of u(this,
|
|
19356
|
+
for (const e of u(this, Cn).values())
|
|
19357
19357
|
e.remove();
|
|
19358
|
-
u(this,
|
|
19358
|
+
u(this, Cn).clear(), u(this, Vl).clear();
|
|
19359
19359
|
}
|
|
19360
19360
|
};
|
|
19361
|
-
qi = new WeakMap(),
|
|
19361
|
+
qi = new WeakMap(), Cn = new WeakMap(), Vl = new WeakMap(), Pf = new WeakMap(), Pg = new WeakSet(), Ex = function(e, [t, r, n, s]) {
|
|
19362
19362
|
const {
|
|
19363
19363
|
style: a
|
|
19364
19364
|
} = e;
|
|
@@ -19412,7 +19412,7 @@ globalThis.pdfjsLib = {
|
|
|
19412
19412
|
noContextMenu: _i,
|
|
19413
19413
|
normalizeUnicode: b1,
|
|
19414
19414
|
OPS: Oh,
|
|
19415
|
-
OutputScale:
|
|
19415
|
+
OutputScale: Ki,
|
|
19416
19416
|
PasswordResponses: g1,
|
|
19417
19417
|
PDFDataRangeTransport: Gb,
|
|
19418
19418
|
PDFDateString: Og,
|
|
@@ -19453,7 +19453,7 @@ const bS = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
19453
19453
|
InvalidPDFException: eg,
|
|
19454
19454
|
MathClamp: dn,
|
|
19455
19455
|
OPS: Oh,
|
|
19456
|
-
OutputScale:
|
|
19456
|
+
OutputScale: Ki,
|
|
19457
19457
|
PDFDataRangeTransport: Gb,
|
|
19458
19458
|
PDFDateString: Og,
|
|
19459
19459
|
PDFWorker: Mc,
|
|
@@ -19912,9 +19912,9 @@ function Py(i) {
|
|
|
19912
19912
|
return typeof i == "object" && i !== null && ("data" in i || "range" in i || "url" in i);
|
|
19913
19913
|
}
|
|
19914
19914
|
const eT = UE(function({ children: e, className: t, error: r = "Failed to load PDF file.", externalLinkRel: n, externalLinkTarget: s, file: a, inputRef: o, imageResourcesPath: l, loading: c = "Loading PDF…", noData: h = "No PDF file specified.", onItemClick: d, onLoadError: p, onLoadProgress: g, onLoadSuccess: w, onPassword: b = JS, onSourceError: y, onSourceSuccess: v, options: A, renderMode: E, rotate: _, scale: C, ...I }, k) {
|
|
19915
|
-
const [D, R] = Lc(), { value: z, error: q } = D, [O, X] = Lc(), { value: S, error: J } = O, Y =
|
|
19915
|
+
const [D, R] = Lc(), { value: z, error: q } = D, [O, X] = Lc(), { value: S, error: J } = O, Y = Wi(new HS()), W = Wi([]), fe = Wi(void 0), K = Wi(void 0);
|
|
19916
19916
|
a && a !== fe.current && Py(a) && (pn(!Cu(a, fe.current), `File prop passed to <Document /> changed, but it's equal to previous one. This might result in unnecessary reloads. Consider memoizing the value passed to "file" prop.`), fe.current = a), A && A !== K.current && (pn(!Cu(A, K.current), `Options prop passed to <Document /> changed, but it's equal to previous one. This might result in unnecessary reloads. Consider memoizing the value passed to "options" prop.`), K.current = A);
|
|
19917
|
-
const be =
|
|
19917
|
+
const be = Wi({
|
|
19918
19918
|
// Handling jumping to internal links target
|
|
19919
19919
|
scrollPageIntoView: (Te) => {
|
|
19920
19920
|
const { dest: x, pageNumber: U, pageIndex: B = U - 1 } = Te;
|
|
@@ -19944,7 +19944,7 @@ const eT = UE(function({ children: e, className: t, error: r = "Failed to load P
|
|
|
19944
19944
|
function ie() {
|
|
19945
19945
|
R({ type: "RESET" });
|
|
19946
19946
|
}
|
|
19947
|
-
|
|
19947
|
+
Ut(ie, [a, R]);
|
|
19948
19948
|
const ae = gr(async () => {
|
|
19949
19949
|
if (!a)
|
|
19950
19950
|
return null;
|
|
@@ -19965,7 +19965,7 @@ const eT = UE(function({ children: e, className: t, error: r = "Failed to load P
|
|
|
19965
19965
|
}
|
|
19966
19966
|
return a;
|
|
19967
19967
|
}, [a]);
|
|
19968
|
-
|
|
19968
|
+
Ut(() => {
|
|
19969
19969
|
const Te = Bf(ae());
|
|
19970
19970
|
return Te.promise.then((x) => {
|
|
19971
19971
|
R({ type: "RESOLVE", value: x });
|
|
@@ -19974,7 +19974,7 @@ const eT = UE(function({ children: e, className: t, error: r = "Failed to load P
|
|
|
19974
19974
|
}), () => {
|
|
19975
19975
|
Wl(Te);
|
|
19976
19976
|
};
|
|
19977
|
-
}, [ae, R]),
|
|
19977
|
+
}, [ae, R]), Ut(() => {
|
|
19978
19978
|
if (!(typeof z > "u")) {
|
|
19979
19979
|
if (z === !1) {
|
|
19980
19980
|
j();
|
|
@@ -19989,9 +19989,9 @@ const eT = UE(function({ children: e, className: t, error: r = "Failed to load P
|
|
|
19989
19989
|
function se() {
|
|
19990
19990
|
J && (pn(!1, J.toString()), p && p(J));
|
|
19991
19991
|
}
|
|
19992
|
-
|
|
19992
|
+
Ut(function() {
|
|
19993
19993
|
X({ type: "RESET" });
|
|
19994
|
-
}, [X, z]),
|
|
19994
|
+
}, [X, z]), Ut(function() {
|
|
19995
19995
|
if (!z)
|
|
19996
19996
|
return;
|
|
19997
19997
|
const x = A ? { ...z, ...A } : z, U = qb(x);
|
|
@@ -20004,7 +20004,7 @@ const eT = UE(function({ children: e, className: t, error: r = "Failed to load P
|
|
|
20004
20004
|
return () => {
|
|
20005
20005
|
F.finally(() => B.destroy());
|
|
20006
20006
|
};
|
|
20007
|
-
}, [A, X, z]),
|
|
20007
|
+
}, [A, X, z]), Ut(() => {
|
|
20008
20008
|
if (!(typeof S > "u")) {
|
|
20009
20009
|
if (S === !1) {
|
|
20010
20010
|
se();
|
|
@@ -20012,14 +20012,14 @@ const eT = UE(function({ children: e, className: t, error: r = "Failed to load P
|
|
|
20012
20012
|
}
|
|
20013
20013
|
H();
|
|
20014
20014
|
}
|
|
20015
|
-
}, [S]),
|
|
20015
|
+
}, [S]), Ut(function() {
|
|
20016
20016
|
Y.current.setViewer(be.current), Y.current.setExternalLinkRel(n), Y.current.setExternalLinkTarget(s);
|
|
20017
20017
|
}, [n, s]);
|
|
20018
20018
|
const le = gr((Te, x) => {
|
|
20019
20019
|
W.current[Te] = x;
|
|
20020
20020
|
}, []), oe = gr((Te) => {
|
|
20021
20021
|
delete W.current[Te];
|
|
20022
|
-
}, []), ce =
|
|
20022
|
+
}, []), ce = Zi(() => ({
|
|
20023
20023
|
imageResourcesPath: l,
|
|
20024
20024
|
linkService: Y.current,
|
|
20025
20025
|
onItemClick: d,
|
|
@@ -20029,7 +20029,7 @@ const eT = UE(function({ children: e, className: t, error: r = "Failed to load P
|
|
|
20029
20029
|
rotate: _,
|
|
20030
20030
|
scale: C,
|
|
20031
20031
|
unregisterPage: oe
|
|
20032
|
-
}), [l, d, S, le, E, _, C, oe]), Ae =
|
|
20032
|
+
}), [l, d, S, le, E, _, C, oe]), Ae = Zi(
|
|
20033
20033
|
() => Sx(I, () => S),
|
|
20034
20034
|
// biome-ignore lint/correctness/useExhaustiveDependencies: FIXME
|
|
20035
20035
|
[I, S]
|
|
@@ -20081,7 +20081,7 @@ function tT() {
|
|
|
20081
20081
|
Kt(e, "Unable to find Page context.");
|
|
20082
20082
|
const t = { ...i, ...e }, { imageResourcesPath: r, linkService: n, onGetAnnotationsError: s, onGetAnnotationsSuccess: a, onRenderAnnotationLayerError: o, onRenderAnnotationLayerSuccess: l, page: c, pdf: h, renderForms: d, rotate: p, scale: g = 1 } = t;
|
|
20083
20083
|
Kt(h, "Attempted to load page annotations, but no document was specified. Wrap <Page /> in a <Document /> or pass explicit `pdf` prop."), Kt(c, "Attempted to load page annotations, but no page was specified."), Kt(n, "Attempted to load page annotations, but no linkService was specified.");
|
|
20084
|
-
const [w, b] = Lc(), { value: y, error: v } = w, A =
|
|
20084
|
+
const [w, b] = Lc(), { value: y, error: v } = w, A = Wi(null);
|
|
20085
20085
|
pn(Number.parseInt(window.getComputedStyle(document.body).getPropertyValue("--react-pdf-annotation-layer"), 10) === 1, "AnnotationLayer styles not found. Read more: https://github.com/wojtekmaj/react-pdf#support-for-annotations");
|
|
20086
20086
|
function E() {
|
|
20087
20087
|
y && a && a(y);
|
|
@@ -20089,9 +20089,9 @@ function tT() {
|
|
|
20089
20089
|
function _() {
|
|
20090
20090
|
v && (pn(!1, v.toString()), s && s(v));
|
|
20091
20091
|
}
|
|
20092
|
-
|
|
20092
|
+
Ut(function() {
|
|
20093
20093
|
b({ type: "RESET" });
|
|
20094
|
-
}, [b, c]),
|
|
20094
|
+
}, [b, c]), Ut(function() {
|
|
20095
20095
|
if (!c)
|
|
20096
20096
|
return;
|
|
20097
20097
|
const R = Bf(c.getAnnotations()), z = R;
|
|
@@ -20102,7 +20102,7 @@ function tT() {
|
|
|
20102
20102
|
}), () => {
|
|
20103
20103
|
Wl(z);
|
|
20104
20104
|
};
|
|
20105
|
-
}, [b, c]),
|
|
20105
|
+
}, [b, c]), Ut(() => {
|
|
20106
20106
|
if (y !== void 0) {
|
|
20107
20107
|
if (y === !1) {
|
|
20108
20108
|
_();
|
|
@@ -20117,8 +20117,8 @@ function tT() {
|
|
|
20117
20117
|
function I(D) {
|
|
20118
20118
|
pn(!1, `${D}`), o && o(D);
|
|
20119
20119
|
}
|
|
20120
|
-
const k =
|
|
20121
|
-
return
|
|
20120
|
+
const k = Zi(() => c.getViewport({ scale: g, rotation: p }), [c, p, g]);
|
|
20121
|
+
return Ut(function() {
|
|
20122
20122
|
if (!h || !c || !n || !y)
|
|
20123
20123
|
return;
|
|
20124
20124
|
const { current: R } = A;
|
|
@@ -20261,7 +20261,7 @@ function sT(i) {
|
|
|
20261
20261
|
} : null;
|
|
20262
20262
|
}
|
|
20263
20263
|
function Fx({ className: i, node: e }) {
|
|
20264
|
-
const t =
|
|
20264
|
+
const t = Zi(() => sT(e), [e]), r = Zi(() => !Hg(e) || Lx(e) ? null : e.children.map((n, s) => (
|
|
20265
20265
|
// biome-ignore lint/suspicious/noArrayIndexKey: index is stable here
|
|
20266
20266
|
ve.jsx(Fx, { node: n }, s)
|
|
20267
20267
|
)), [e]);
|
|
@@ -20277,9 +20277,9 @@ function aT() {
|
|
|
20277
20277
|
function h() {
|
|
20278
20278
|
a && (pn(!1, a.toString()), e && e(a));
|
|
20279
20279
|
}
|
|
20280
|
-
return
|
|
20280
|
+
return Ut(function() {
|
|
20281
20281
|
n({ type: "RESET" });
|
|
20282
|
-
}, [n, l]),
|
|
20282
|
+
}, [n, l]), Ut(function() {
|
|
20283
20283
|
if (o || !l)
|
|
20284
20284
|
return;
|
|
20285
20285
|
const p = Bf(l.getStructTree()), g = p;
|
|
@@ -20288,7 +20288,7 @@ function aT() {
|
|
|
20288
20288
|
}).catch((w) => {
|
|
20289
20289
|
n({ type: "REJECT", error: w });
|
|
20290
20290
|
}), () => Wl(g);
|
|
20291
|
-
}, [o, l, n]),
|
|
20291
|
+
}, [o, l, n]), Ut(() => {
|
|
20292
20292
|
if (s !== void 0) {
|
|
20293
20293
|
if (s === !1) {
|
|
20294
20294
|
h();
|
|
@@ -20304,15 +20304,15 @@ function oT(i) {
|
|
|
20304
20304
|
Kt(e, "Unable to find Page context.");
|
|
20305
20305
|
const t = { ...e, ...i }, { _className: r, canvasBackground: n, devicePixelRatio: s = XS(), onRenderError: a, onRenderSuccess: o, page: l, renderForms: c, renderTextLayer: h, rotate: d, scale: p } = t, { canvasRef: g } = i;
|
|
20306
20306
|
Kt(l, "Attempted to render page canvas, but no page was specified.");
|
|
20307
|
-
const w =
|
|
20307
|
+
const w = Wi(null);
|
|
20308
20308
|
function b() {
|
|
20309
20309
|
l && o && o(Eb(l, p));
|
|
20310
20310
|
}
|
|
20311
20311
|
function y(_) {
|
|
20312
20312
|
ZS(_) || (pn(!1, _.toString()), a && a(_));
|
|
20313
20313
|
}
|
|
20314
|
-
const v =
|
|
20315
|
-
|
|
20314
|
+
const v = Zi(() => l.getViewport({ scale: p * s, rotation: d }), [s, l, d, p]), A = Zi(() => l.getViewport({ scale: p, rotation: d }), [l, d, p]);
|
|
20315
|
+
Ut(function() {
|
|
20316
20316
|
if (!l)
|
|
20317
20317
|
return;
|
|
20318
20318
|
l.cleanup();
|
|
@@ -20335,7 +20335,7 @@ function oT(i) {
|
|
|
20335
20335
|
const { current: _ } = w;
|
|
20336
20336
|
_ && (_.width = 0, _.height = 0);
|
|
20337
20337
|
}, []);
|
|
20338
|
-
return
|
|
20338
|
+
return Ut(() => E, [E]), ve.jsx("canvas", { className: `${r}__canvas`, dir: "ltr", ref: Ix(g, w), style: {
|
|
20339
20339
|
display: "block",
|
|
20340
20340
|
userSelect: "none"
|
|
20341
20341
|
}, children: h ? ve.jsx(aT, {}) : null });
|
|
@@ -20348,7 +20348,7 @@ function uT() {
|
|
|
20348
20348
|
Kt(i, "Unable to find Page context.");
|
|
20349
20349
|
const { customTextRenderer: e, onGetTextError: t, onGetTextSuccess: r, onRenderTextLayerError: n, onRenderTextLayerSuccess: s, page: a, pageIndex: o, pageNumber: l, rotate: c, scale: h } = i;
|
|
20350
20350
|
Kt(a, "Attempted to load page text content, but no page was specified.");
|
|
20351
|
-
const [d, p] = Lc(), { value: g, error: w } = d, b =
|
|
20351
|
+
const [d, p] = Lc(), { value: g, error: w } = d, b = Wi(null);
|
|
20352
20352
|
pn(Number.parseInt(window.getComputedStyle(document.body).getPropertyValue("--react-pdf-text-layer"), 10) === 1, "TextLayer styles not found. Read more: https://github.com/wojtekmaj/react-pdf#support-for-text-layer");
|
|
20353
20353
|
function y() {
|
|
20354
20354
|
g && r && r(g);
|
|
@@ -20356,9 +20356,9 @@ function uT() {
|
|
|
20356
20356
|
function v() {
|
|
20357
20357
|
w && (pn(!1, w.toString()), t && t(w));
|
|
20358
20358
|
}
|
|
20359
|
-
|
|
20359
|
+
Ut(function() {
|
|
20360
20360
|
p({ type: "RESET" });
|
|
20361
|
-
}, [a, p]),
|
|
20361
|
+
}, [a, p]), Ut(function() {
|
|
20362
20362
|
if (!a)
|
|
20363
20363
|
return;
|
|
20364
20364
|
const D = Bf(a.getTextContent()), R = D;
|
|
@@ -20367,7 +20367,7 @@ function uT() {
|
|
|
20367
20367
|
}).catch((z) => {
|
|
20368
20368
|
p({ type: "REJECT", error: z });
|
|
20369
20369
|
}), () => Wl(R);
|
|
20370
|
-
}, [a, p]),
|
|
20370
|
+
}, [a, p]), Ut(() => {
|
|
20371
20371
|
if (g !== void 0) {
|
|
20372
20372
|
if (g === !1) {
|
|
20373
20373
|
v();
|
|
@@ -20389,7 +20389,7 @@ function uT() {
|
|
|
20389
20389
|
const k = b.current;
|
|
20390
20390
|
k && k.classList.remove("selecting");
|
|
20391
20391
|
}
|
|
20392
|
-
const I =
|
|
20392
|
+
const I = Zi(() => a.getViewport({ scale: h, rotation: c }), [a, c, h]);
|
|
20393
20393
|
return $E(function() {
|
|
20394
20394
|
if (!a || !g)
|
|
20395
20395
|
return;
|
|
@@ -20439,9 +20439,9 @@ function uT() {
|
|
|
20439
20439
|
}
|
|
20440
20440
|
const Iy = 1;
|
|
20441
20441
|
function cT(i) {
|
|
20442
|
-
const t = { ...Rx(), ...i }, { _className: r = "react-pdf__Page", _enableRegisterUnregisterPage: n = !0, canvasBackground: s, canvasRef: a, children: o, className: l, customRenderer: c, customTextRenderer: h, devicePixelRatio: d, error: p = "Failed to load the page.", height: g, inputRef: w, loading: b = "Loading page…", noData: y = "No page specified.", onGetAnnotationsError: v, onGetAnnotationsSuccess: A, onGetStructTreeError: E, onGetStructTreeSuccess: _, onGetTextError: C, onGetTextSuccess: I, onLoadError: k, onLoadSuccess: D, onRenderAnnotationLayerError: R, onRenderAnnotationLayerSuccess: z, onRenderError: q, onRenderSuccess: O, onRenderTextLayerError: X, onRenderTextLayerSuccess: S, pageIndex: J, pageNumber: Y, pdf: W, registerPage: fe, renderAnnotationLayer: K = !0, renderForms: be = !1, renderMode: te = "canvas", renderTextLayer: j = !0, rotate: ie, scale: ae = Iy, unregisterPage: H, width: se, ...le } = t, [oe, ce] = Lc(), { value: Ae, error: Se } = oe, Ie =
|
|
20442
|
+
const t = { ...Rx(), ...i }, { _className: r = "react-pdf__Page", _enableRegisterUnregisterPage: n = !0, canvasBackground: s, canvasRef: a, children: o, className: l, customRenderer: c, customTextRenderer: h, devicePixelRatio: d, error: p = "Failed to load the page.", height: g, inputRef: w, loading: b = "Loading page…", noData: y = "No page specified.", onGetAnnotationsError: v, onGetAnnotationsSuccess: A, onGetStructTreeError: E, onGetStructTreeSuccess: _, onGetTextError: C, onGetTextSuccess: I, onLoadError: k, onLoadSuccess: D, onRenderAnnotationLayerError: R, onRenderAnnotationLayerSuccess: z, onRenderError: q, onRenderSuccess: O, onRenderTextLayerError: X, onRenderTextLayerSuccess: S, pageIndex: J, pageNumber: Y, pdf: W, registerPage: fe, renderAnnotationLayer: K = !0, renderForms: be = !1, renderMode: te = "canvas", renderTextLayer: j = !0, rotate: ie, scale: ae = Iy, unregisterPage: H, width: se, ...le } = t, [oe, ce] = Lc(), { value: Ae, error: Se } = oe, Ie = Wi(null);
|
|
20443
20443
|
Kt(W, "Attempted to load a page, but no document was specified. Wrap <Page /> in a <Document /> or pass explicit `pdf` prop.");
|
|
20444
|
-
const Te = To(Y) ? Y - 1 : J ?? null, x = Y ?? (To(J) ? J + 1 : null), U = ie ?? (Ae ? Ae.rotate : null), B =
|
|
20444
|
+
const Te = To(Y) ? Y - 1 : J ?? null, x = Y ?? (To(J) ? J + 1 : null), U = ie ?? (Ae ? Ae.rotate : null), B = Zi(() => {
|
|
20445
20445
|
if (!Ae)
|
|
20446
20446
|
return null;
|
|
20447
20447
|
let He = 1;
|
|
@@ -20452,7 +20452,7 @@ function cT(i) {
|
|
|
20452
20452
|
}
|
|
20453
20453
|
return We * He;
|
|
20454
20454
|
}, [g, Ae, U, ae, se]);
|
|
20455
|
-
|
|
20455
|
+
Ut(function() {
|
|
20456
20456
|
return () => {
|
|
20457
20457
|
To(Te) && n && H && H(Te);
|
|
20458
20458
|
};
|
|
@@ -20472,9 +20472,9 @@ function cT(i) {
|
|
|
20472
20472
|
function M() {
|
|
20473
20473
|
Se && (pn(!1, Se.toString()), k && k(Se));
|
|
20474
20474
|
}
|
|
20475
|
-
|
|
20475
|
+
Ut(function() {
|
|
20476
20476
|
ce({ type: "RESET" });
|
|
20477
|
-
}, [ce, W, Te]),
|
|
20477
|
+
}, [ce, W, Te]), Ut(function() {
|
|
20478
20478
|
if (!W || !x)
|
|
20479
20479
|
return;
|
|
20480
20480
|
const We = Bf(W.getPage(x)), St = We;
|
|
@@ -20483,7 +20483,7 @@ function cT(i) {
|
|
|
20483
20483
|
}).catch((rr) => {
|
|
20484
20484
|
ce({ type: "REJECT", error: rr });
|
|
20485
20485
|
}), () => Wl(St);
|
|
20486
|
-
}, [ce, W, x]),
|
|
20486
|
+
}, [ce, W, x]), Ut(() => {
|
|
20487
20487
|
if (Ae !== void 0) {
|
|
20488
20488
|
if (Ae === !1) {
|
|
20489
20489
|
M();
|
|
@@ -20492,7 +20492,7 @@ function cT(i) {
|
|
|
20492
20492
|
F();
|
|
20493
20493
|
}
|
|
20494
20494
|
}, [Ae, B]);
|
|
20495
|
-
const G =
|
|
20495
|
+
const G = Zi(() => (
|
|
20496
20496
|
// Technically there cannot be page without pageIndex, pageNumber, rotate and scale, but TypeScript doesn't know that
|
|
20497
20497
|
To(Te) && x && To(U) && To(B) ? {
|
|
20498
20498
|
_className: r,
|
|
@@ -20543,7 +20543,7 @@ function cT(i) {
|
|
|
20543
20543
|
j,
|
|
20544
20544
|
U,
|
|
20545
20545
|
B
|
|
20546
|
-
]), de =
|
|
20546
|
+
]), de = Zi(
|
|
20547
20547
|
() => Sx(le, () => Ae && (B ? Eb(Ae, B) : void 0)),
|
|
20548
20548
|
// biome-ignore lint/correctness/useExhaustiveDependencies: FIXME
|
|
20549
20549
|
[le, Ae, B]
|
|
@@ -20607,164 +20607,181 @@ const N5 = ({
|
|
|
20607
20607
|
className: r,
|
|
20608
20608
|
onOpen: n
|
|
20609
20609
|
}) => {
|
|
20610
|
-
const [s, a] = u1(), [o, l] = c1(), [{ currentPage: c, totalPages: h }, d] = d1(), [{ pan: p, isDragging: g }, w] = h1(), b = (
|
|
20610
|
+
const [s, a] = u1(), [o, l] = c1(), [{ currentPage: c, totalPages: h }, d] = d1(), [{ pan: p, isDragging: g }, w] = h1(), [b, y] = gn(1), v = Wi(null);
|
|
20611
|
+
Ut(() => {
|
|
20612
|
+
const _ = () => {
|
|
20613
|
+
if (v.current) {
|
|
20614
|
+
const I = v.current.offsetWidth / 612;
|
|
20615
|
+
y(I * (s / 100));
|
|
20616
|
+
}
|
|
20617
|
+
};
|
|
20618
|
+
return _(), window.addEventListener("resize", _), () => window.removeEventListener("resize", _);
|
|
20619
|
+
}, [s]);
|
|
20620
|
+
const A = (_) => {
|
|
20611
20621
|
if (n ? (console.debug("[PdfViewer] onOpen callback triggered", {
|
|
20612
20622
|
hasHandler: !0
|
|
20613
|
-
}), n(
|
|
20623
|
+
}), n(_)) : console.debug("[PdfViewer] open button clicked", {
|
|
20614
20624
|
hasHandler: !1
|
|
20615
|
-
}), !
|
|
20625
|
+
}), !_.defaultPrevented) {
|
|
20616
20626
|
if (!e) {
|
|
20617
|
-
|
|
20627
|
+
_.preventDefault();
|
|
20618
20628
|
return;
|
|
20619
20629
|
}
|
|
20620
20630
|
window.open(e, "_blank", "noopener,noreferrer");
|
|
20621
20631
|
}
|
|
20622
|
-
},
|
|
20623
|
-
return /* @__PURE__ */ ve.jsxs(
|
|
20624
|
-
|
|
20625
|
-
|
|
20626
|
-
|
|
20627
|
-
|
|
20628
|
-
|
|
20629
|
-
|
|
20630
|
-
|
|
20631
|
-
|
|
20632
|
-
),
|
|
20633
|
-
onMouseDown: w.handleMouseDown,
|
|
20634
|
-
onMouseMove: w.handleMouseMove,
|
|
20635
|
-
onMouseUp: w.handleMouseUp,
|
|
20636
|
-
onMouseLeave: w.handleMouseUp,
|
|
20637
|
-
style: {
|
|
20638
|
-
userSelect: "none"
|
|
20639
|
-
},
|
|
20640
|
-
children: /* @__PURE__ */ ve.jsx(
|
|
20632
|
+
}, E = /* @__PURE__ */ ve.jsx(fn, { variant: "text", color: "gray", onClick: A, children: /* @__PURE__ */ ve.jsx(l1, { className: "size-4" }) });
|
|
20633
|
+
return /* @__PURE__ */ ve.jsxs(
|
|
20634
|
+
"div",
|
|
20635
|
+
{
|
|
20636
|
+
className: uo("shadow rounded-t-lg flex flex-col h-full", r),
|
|
20637
|
+
ref: v,
|
|
20638
|
+
children: [
|
|
20639
|
+
/* @__PURE__ */ ve.jsx(o1.Header, { onClose: i, right: E, children: t }),
|
|
20640
|
+
/* @__PURE__ */ ve.jsxs("div", { className: "grid grow h-full overflow-hidden shadow", children: [
|
|
20641
|
+
/* @__PURE__ */ ve.jsx(
|
|
20641
20642
|
"div",
|
|
20642
20643
|
{
|
|
20644
|
+
className: uo(
|
|
20645
|
+
"col-start-1 row-start-1 bg-gray-200 h-full overflow-hidden select-none p-8 flex justify-center items-center mt-8",
|
|
20646
|
+
g ? "cursor-grabbing" : "cursor-grab"
|
|
20647
|
+
),
|
|
20648
|
+
onMouseDown: w.handleMouseDown,
|
|
20649
|
+
onMouseMove: w.handleMouseMove,
|
|
20650
|
+
onMouseUp: w.handleMouseUp,
|
|
20651
|
+
onMouseLeave: w.handleMouseUp,
|
|
20643
20652
|
style: {
|
|
20644
|
-
|
|
20645
|
-
transition: g ? "none" : "transform 0.1s",
|
|
20646
|
-
pointerEvents: "none",
|
|
20647
|
-
maxWidth: "650px"
|
|
20653
|
+
userSelect: "none"
|
|
20648
20654
|
},
|
|
20649
20655
|
children: /* @__PURE__ */ ve.jsx(
|
|
20650
|
-
|
|
20656
|
+
"div",
|
|
20651
20657
|
{
|
|
20652
|
-
|
|
20653
|
-
|
|
20654
|
-
|
|
20655
|
-
|
|
20656
|
-
|
|
20658
|
+
style: {
|
|
20659
|
+
transform: `translate(${p.x}px, ${p.y}px)`,
|
|
20660
|
+
transition: g ? "none" : "transform 0.1s",
|
|
20661
|
+
pointerEvents: "none",
|
|
20662
|
+
maxWidth: "650px"
|
|
20657
20663
|
},
|
|
20658
|
-
scale: s / 100,
|
|
20659
|
-
rotate: o,
|
|
20660
20664
|
children: /* @__PURE__ */ ve.jsx(
|
|
20661
|
-
|
|
20665
|
+
eT,
|
|
20662
20666
|
{
|
|
20663
|
-
|
|
20664
|
-
|
|
20665
|
-
|
|
20667
|
+
externalLinkRel: "noopener noreferrer",
|
|
20668
|
+
externalLinkTarget: "_blank",
|
|
20669
|
+
file: e,
|
|
20670
|
+
onLoadSuccess: ({ numPages: _ }) => {
|
|
20671
|
+
d.setTotalPages(_);
|
|
20672
|
+
},
|
|
20673
|
+
scale: b,
|
|
20674
|
+
rotate: o,
|
|
20675
|
+
children: /* @__PURE__ */ ve.jsx(
|
|
20676
|
+
cT,
|
|
20677
|
+
{
|
|
20678
|
+
pageNumber: c,
|
|
20679
|
+
renderTextLayer: !0,
|
|
20680
|
+
renderAnnotationLayer: !0
|
|
20681
|
+
}
|
|
20682
|
+
)
|
|
20666
20683
|
}
|
|
20667
20684
|
)
|
|
20668
20685
|
}
|
|
20669
20686
|
)
|
|
20670
20687
|
}
|
|
20671
|
-
)
|
|
20672
|
-
}
|
|
20673
|
-
),
|
|
20674
|
-
/* @__PURE__ */ ve.jsxs("div", { className: "col-start-1 row-start-1 self-start flex justify-between w-full z-10 flex-wrap items-center gap-3 bg-gray-50 p-2 shadow", children: [
|
|
20675
|
-
/* @__PURE__ */ ve.jsxs(Eu, { className: "divide-x-1 gap-1", children: [
|
|
20676
|
-
/* @__PURE__ */ ve.jsx(
|
|
20677
|
-
fn,
|
|
20678
|
-
{
|
|
20679
|
-
variant: "filled",
|
|
20680
|
-
color: "white",
|
|
20681
|
-
className: "w-8 h-8 rounded border border-gray-300 bg-white p-2 text-gray-700 hover:bg-gray-200 disabled:opacity-50 dark:border-gray-600 dark:bg-gray-700 dark:text-white dark:hover:bg-gray-600 focus:outline-none max-w-auto",
|
|
20682
|
-
onClick: d.prevPage,
|
|
20683
|
-
disabled: c === 1,
|
|
20684
|
-
children: /* @__PURE__ */ ve.jsx(Gi, { icon: "lucide:chevron-left" })
|
|
20685
|
-
}
|
|
20686
20688
|
),
|
|
20687
|
-
/* @__PURE__ */ ve.
|
|
20688
|
-
"
|
|
20689
|
-
|
|
20690
|
-
|
|
20691
|
-
|
|
20692
|
-
|
|
20693
|
-
|
|
20694
|
-
|
|
20695
|
-
|
|
20696
|
-
|
|
20697
|
-
|
|
20698
|
-
|
|
20699
|
-
|
|
20700
|
-
|
|
20701
|
-
|
|
20702
|
-
|
|
20703
|
-
|
|
20704
|
-
|
|
20705
|
-
|
|
20706
|
-
|
|
20707
|
-
|
|
20708
|
-
|
|
20709
|
-
|
|
20710
|
-
|
|
20711
|
-
|
|
20712
|
-
|
|
20713
|
-
|
|
20714
|
-
|
|
20715
|
-
|
|
20716
|
-
|
|
20717
|
-
|
|
20718
|
-
|
|
20719
|
-
|
|
20720
|
-
|
|
20721
|
-
|
|
20722
|
-
|
|
20723
|
-
|
|
20724
|
-
|
|
20725
|
-
|
|
20726
|
-
|
|
20727
|
-
|
|
20728
|
-
|
|
20729
|
-
|
|
20730
|
-
|
|
20731
|
-
{
|
|
20732
|
-
|
|
20733
|
-
|
|
20734
|
-
|
|
20735
|
-
|
|
20736
|
-
|
|
20737
|
-
|
|
20738
|
-
|
|
20739
|
-
|
|
20740
|
-
|
|
20741
|
-
|
|
20742
|
-
|
|
20743
|
-
|
|
20744
|
-
|
|
20745
|
-
|
|
20746
|
-
|
|
20747
|
-
|
|
20748
|
-
|
|
20749
|
-
|
|
20750
|
-
|
|
20751
|
-
|
|
20752
|
-
|
|
20753
|
-
|
|
20754
|
-
|
|
20755
|
-
|
|
20756
|
-
|
|
20757
|
-
|
|
20758
|
-
|
|
20759
|
-
|
|
20760
|
-
|
|
20761
|
-
|
|
20762
|
-
|
|
20763
|
-
|
|
20689
|
+
/* @__PURE__ */ ve.jsxs("div", { className: "col-start-1 row-start-1 self-start flex justify-between w-full z-10 flex-wrap items-center gap-3 bg-gray-50 p-2 shadow", children: [
|
|
20690
|
+
/* @__PURE__ */ ve.jsxs(Eu, { className: "divide-x-1 gap-1", children: [
|
|
20691
|
+
/* @__PURE__ */ ve.jsx(
|
|
20692
|
+
fn,
|
|
20693
|
+
{
|
|
20694
|
+
variant: "filled",
|
|
20695
|
+
color: "white",
|
|
20696
|
+
className: "w-8 h-8 rounded border border-gray-300 bg-white p-2 text-gray-700 hover:bg-gray-200 disabled:opacity-50 dark:border-gray-600 dark:bg-gray-700 dark:text-white dark:hover:bg-gray-600 focus:outline-none max-w-auto",
|
|
20697
|
+
onClick: d.prevPage,
|
|
20698
|
+
disabled: c === 1,
|
|
20699
|
+
children: /* @__PURE__ */ ve.jsx(Gi, { icon: "lucide:chevron-left" })
|
|
20700
|
+
}
|
|
20701
|
+
),
|
|
20702
|
+
/* @__PURE__ */ ve.jsx(
|
|
20703
|
+
"input",
|
|
20704
|
+
{
|
|
20705
|
+
className: "w-14 h-8 rounded border !border-gray-300 bg-white px-1 py-1 text-center text-sm text-gray-700 dark:border-gray-600 dark:bg-gray-700 dark:text-white",
|
|
20706
|
+
value: c,
|
|
20707
|
+
onChange: (_) => {
|
|
20708
|
+
const C = parseInt(_.target.value);
|
|
20709
|
+
isNaN(C) || d.goToPage(C);
|
|
20710
|
+
},
|
|
20711
|
+
type: "number",
|
|
20712
|
+
min: "1",
|
|
20713
|
+
max: h
|
|
20714
|
+
}
|
|
20715
|
+
),
|
|
20716
|
+
/* @__PURE__ */ ve.jsxs("div", { className: "flex items-center bg-transparent px-2", children: [
|
|
20717
|
+
"of ",
|
|
20718
|
+
h
|
|
20719
|
+
] }),
|
|
20720
|
+
/* @__PURE__ */ ve.jsx(
|
|
20721
|
+
fn,
|
|
20722
|
+
{
|
|
20723
|
+
variant: "filled",
|
|
20724
|
+
color: "white",
|
|
20725
|
+
className: "w-8 h-8 rounded border !border-gray-300 bg-white p-2 text-gray-700 hover:bg-gray-200 disabled:opacity-50 dark:border-gray-600 dark:bg-gray-700 dark:text-white dark:hover:bg-gray-600 focus:outline-none max-w-auto",
|
|
20726
|
+
onClick: d.nextPage,
|
|
20727
|
+
disabled: c === h,
|
|
20728
|
+
children: /* @__PURE__ */ ve.jsx(Gi, { icon: "lucide:chevron-right" })
|
|
20729
|
+
}
|
|
20730
|
+
)
|
|
20731
|
+
] }),
|
|
20732
|
+
/* @__PURE__ */ ve.jsxs("div", { className: "flex gap-2 items-center", children: [
|
|
20733
|
+
/* @__PURE__ */ ve.jsxs(Eu, { className: "divide-x-1 gap-1", children: [
|
|
20734
|
+
/* @__PURE__ */ ve.jsx(
|
|
20735
|
+
fn,
|
|
20736
|
+
{
|
|
20737
|
+
variant: "filled",
|
|
20738
|
+
color: "white",
|
|
20739
|
+
className: "w-8 h-8 rounded border !border-gray-300 bg-white p-2 text-gray-700 hover:bg-gray-200 disabled:opacity-50 dark:border-gray-600 dark:bg-gray-700 dark:text-white dark:hover:bg-gray-600 focus:outline-none max-w-auto",
|
|
20740
|
+
onClick: a.zoomOut,
|
|
20741
|
+
children: /* @__PURE__ */ ve.jsx(Gi, { icon: "lucide:minus" })
|
|
20742
|
+
}
|
|
20743
|
+
),
|
|
20744
|
+
/* @__PURE__ */ ve.jsx(Lb, { content: "Click to reset zoom and pan", children: /* @__PURE__ */ ve.jsxs(
|
|
20745
|
+
"button",
|
|
20746
|
+
{
|
|
20747
|
+
className: "w-14 h-8 rounded border !border-gray-300 bg-white px-1 py-1 text-center text-sm text-gray-700 dark:border-gray-600 dark:bg-gray-700 dark:text-white",
|
|
20748
|
+
onClick: () => {
|
|
20749
|
+
a.reset(), w.reset();
|
|
20750
|
+
},
|
|
20751
|
+
children: [
|
|
20752
|
+
s,
|
|
20753
|
+
"%"
|
|
20754
|
+
]
|
|
20755
|
+
}
|
|
20756
|
+
) }),
|
|
20757
|
+
/* @__PURE__ */ ve.jsx(
|
|
20758
|
+
fn,
|
|
20759
|
+
{
|
|
20760
|
+
variant: "filled",
|
|
20761
|
+
color: "white",
|
|
20762
|
+
className: "w-8 h-8 rounded border !border-gray-300 bg-white p-2 text-gray-700 hover:bg-gray-200 disabled:opacity-50 dark:border-gray-600 dark:bg-gray-700 dark:text-white dark:hover:bg-gray-600 focus:outline-none max-w-auto",
|
|
20763
|
+
onClick: a.zoomIn,
|
|
20764
|
+
children: /* @__PURE__ */ ve.jsx(Gi, { icon: "lucide:plus" })
|
|
20765
|
+
}
|
|
20766
|
+
)
|
|
20767
|
+
] }),
|
|
20768
|
+
/* @__PURE__ */ ve.jsx("div", { className: "h-6 w-px bg-gray-300 dark:bg-gray-600" }),
|
|
20769
|
+
/* @__PURE__ */ ve.jsx(Eu, { className: "divide-x-1 gap-1", children: /* @__PURE__ */ ve.jsx(
|
|
20770
|
+
fn,
|
|
20771
|
+
{
|
|
20772
|
+
variant: "filled",
|
|
20773
|
+
color: "white",
|
|
20774
|
+
className: "w-8 h-8 rounded border !border-gray-300 bg-white p-2 text-gray-700 hover:bg-gray-200 disabled:opacity-50 dark:border-gray-600 dark:bg-gray-700 dark:text-white dark:hover:bg-gray-600 focus:outline-none max-w-auto",
|
|
20775
|
+
onClick: l.rotateCounterClockwise,
|
|
20776
|
+
children: /* @__PURE__ */ ve.jsx(Gi, { icon: "lucide:iteration-ccw" })
|
|
20777
|
+
}
|
|
20778
|
+
) })
|
|
20779
|
+
] })
|
|
20780
|
+
] })
|
|
20764
20781
|
] })
|
|
20765
|
-
]
|
|
20766
|
-
|
|
20767
|
-
|
|
20782
|
+
]
|
|
20783
|
+
}
|
|
20784
|
+
);
|
|
20768
20785
|
}, hT = ({ ...i }) => /* @__PURE__ */ ve.jsxs(
|
|
20769
20786
|
"svg",
|
|
20770
20787
|
{
|
|
@@ -21189,13 +21206,13 @@ function nt(i) {
|
|
|
21189
21206
|
}
|
|
21190
21207
|
var CT = "�", Yl = /[-\x09\x0A\x0D\x20-\x2C\x2E-\uD7FF\uE000-\uFFFD]/;
|
|
21191
21208
|
jf && (Yl = Ct("[", Xl(Yl), "\\u{10000}-\\u{10FFFF}", "]"));
|
|
21192
|
-
var ev = /[\x20\x09\x0D\x0A]/, ST = Xl(ev),
|
|
21209
|
+
var ev = /[\x20\x09\x0D\x0A]/, ST = Xl(ev), Ht = Ct(ev, "+"), hr = Ct(ev, "*"), Gh = /[:_a-zA-Z\xC0-\xD6\xD8-\xF6\xF8-\u02FF\u0370-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]/;
|
|
21193
21210
|
jf && (Gh = Ct("[", Xl(Gh), "\\u{10000}-\\u{10FFFF}", "]"));
|
|
21194
21211
|
var TT = Xl(Gh), tv = Ct("[", TT, Xl(/[-.0-9\xB7]/), Xl(/[\u0300-\u036F\u203F-\u2040]/), "]"), Ci = Ct(Gh, tv, "*"), Ny = Ct(tv, "+"), kT = Ct("&", Ci, ";"), DT = nt(/&#[0-9]+;|&#x[0-9a-fA-F]+;/), Wh = nt(kT, "|", DT), Xh = Ct("%", Ci, ";"), rv = nt(
|
|
21195
21212
|
Ct('"', nt(/[^%&"]/, "|", Xh, "|", Wh), "*", '"'),
|
|
21196
21213
|
"|",
|
|
21197
21214
|
Ct("'", nt(/[^%&']/, "|", Xh, "|", Wh), "*", "'")
|
|
21198
|
-
), PT = nt('"', nt(/[^<&"]/, "|", Wh), "*", '"', "|", "'", nt(/[^<&']/, "|", Wh), "*", "'"), RT = Oc(Gh, ":"), IT = Oc(tv, ":"), My = Ct(RT, IT, "*"), Uf = Ct(My, nt(":", My), "?"), NT = Ct("^", Uf, "$"), MT = Ct("(", Uf, ")"), Yh = nt(/"[^"]*"|'[^']*'/), LT = Ct(/^<\?/, "(", Ci, ")", nt(
|
|
21215
|
+
), PT = nt('"', nt(/[^<&"]/, "|", Wh), "*", '"', "|", "'", nt(/[^<&']/, "|", Wh), "*", "'"), RT = Oc(Gh, ":"), IT = Oc(tv, ":"), My = Ct(RT, IT, "*"), Uf = Ct(My, nt(":", My), "?"), NT = Ct("^", Uf, "$"), MT = Ct("(", Uf, ")"), Yh = nt(/"[^"]*"|'[^']*'/), LT = Ct(/^<\?/, "(", Ci, ")", nt(Ht, "(", Yl, "*?)"), "?", /\?>/), Ly = /[\x20\x0D\x0Aa-zA-Z0-9-'()+,./:=?;!*#@$_%]/, $g = nt('"', Ly, '*"', "|", "'", Oc(Ly, "'"), "*'"), Wx = "<!--", Xx = "-->", OT = Ct(Wx, nt(Oc(Yl, "-"), "|", Ct("-", Oc(Yl, "-"))), "*", Xx), Oy = "#PCDATA", FT = nt(
|
|
21199
21216
|
Ct(/\(/, hr, Oy, nt(hr, /\|/, hr, Uf), "*", hr, /\)\*/),
|
|
21200
21217
|
"|",
|
|
21201
21218
|
Ct(/\(/, hr, Oy, hr, /\)/)
|
|
@@ -21203,14 +21220,14 @@ var TT = Xl(Gh), tv = Ct("[", TT, Xl(/[-.0-9\xB7]/), Xl(/[\u0300-\u036F\u203F-\u
|
|
|
21203
21220
|
/\([^>]+\)/,
|
|
21204
21221
|
BT
|
|
21205
21222
|
/*regg(choice, '|', seq), _children_quantity*/
|
|
21206
|
-
), jT = nt("EMPTY", "|", "ANY", "|", FT, "|", zT), UT = "<!ELEMENT", HT = Ct(UT,
|
|
21223
|
+
), jT = nt("EMPTY", "|", "ANY", "|", FT, "|", zT), UT = "<!ELEMENT", HT = Ct(UT, Ht, nt(Uf, "|", Xh), Ht, nt(jT, "|", Xh), hr, ">"), $T = Ct("NOTATION", Ht, /\(/, hr, Ci, nt(hr, /\|/, hr, Ci), "*", hr, /\)/), VT = Ct(/\(/, hr, Ny, nt(hr, /\|/, hr, Ny), "*", hr, /\)/), qT = nt($T, "|", VT), GT = nt(/CDATA|ID|IDREF|IDREFS|ENTITY|ENTITIES|NMTOKEN|NMTOKENS/, "|", qT), WT = nt(/#REQUIRED|#IMPLIED/, "|", nt(nt("#FIXED", Ht), "?", PT)), XT = nt(Ht, Ci, Ht, GT, Ht, WT), YT = "<!ATTLIST", ZT = Ct(YT, Ht, Ci, XT, "*", hr, ">"), _b = "about:legacy-compat", KT = nt('"' + _b + '"', "|", "'" + _b + "'"), nv = "SYSTEM", Vg = "PUBLIC", qg = nt(nt(nv, Ht, Yh), "|", nt(Vg, Ht, $g, Ht, Yh)), QT = Ct(
|
|
21207
21224
|
"^",
|
|
21208
21225
|
nt(
|
|
21209
|
-
nt(nv,
|
|
21226
|
+
nt(nv, Ht, "(?<SystemLiteralOnly>", Yh, ")"),
|
|
21210
21227
|
"|",
|
|
21211
|
-
nt(Vg,
|
|
21228
|
+
nt(Vg, Ht, "(?<PubidLiteral>", $g, ")", Ht, "(?<SystemLiteral>", Yh, ")")
|
|
21212
21229
|
)
|
|
21213
|
-
), JT = nt(
|
|
21230
|
+
), JT = nt(Ht, "NDATA", Ht, Ci), ek = nt(rv, "|", nt(qg, JT, "?")), Yx = "<!ENTITY", tk = Ct(Yx, Ht, Ci, Ht, ek, hr, ">"), rk = nt(rv, "|", qg), nk = Ct(Yx, Ht, "%", Ht, Ci, Ht, rk, hr, ">"), ik = nt(tk, "|", nk), sk = Ct(Vg, Ht, $g), ak = Ct("<!NOTATION", Ht, Ci, Ht, nt(qg, "|", sk), hr, ">"), iv = Ct(hr, "=", hr), Fy = /1[.]\d+/, ok = Ct(Ht, "version", iv, nt("'", Fy, "'", "|", '"', Fy, '"')), By = /[A-Za-z][-A-Za-z0-9._]*/, lk = nt(Ht, "encoding", iv, nt('"', By, '"', "|", "'", By, "'")), uk = nt(Ht, "standalone", iv, nt("'", nt("yes", "|", "no"), "'", "|", '"', nt("yes", "|", "no"), '"')), ck = Ct(/^<\?xml/, ok, lk, "?", uk, "?", hr, /\?>/), hk = "<!DOCTYPE", dk = "<![CDATA[", fk = "]]>", pk = /<!\[CDATA\[/, gk = /\]\]>/, mk = Ct(Yl, "*?", gk), bk = Ct(pk, mk);
|
|
21214
21231
|
pt.chars = Xl;
|
|
21215
21232
|
pt.chars_without = Oc;
|
|
21216
21233
|
pt.detectUnicodeSupport = Gx;
|
|
@@ -21242,7 +21259,7 @@ pt.PubidLiteral = $g;
|
|
|
21242
21259
|
pt.QName = Uf;
|
|
21243
21260
|
pt.QName_exact = NT;
|
|
21244
21261
|
pt.QName_group = MT;
|
|
21245
|
-
pt.S =
|
|
21262
|
+
pt.S = Ht;
|
|
21246
21263
|
pt.SChar_s = ST;
|
|
21247
21264
|
pt.S_OPT = hr;
|
|
21248
21265
|
pt.SYSTEM = nv;
|
|
@@ -21250,9 +21267,9 @@ pt.SystemLiteral = Yh;
|
|
|
21250
21267
|
pt.UNICODE_REPLACEMENT_CHARACTER = CT;
|
|
21251
21268
|
pt.UNICODE_SUPPORT = jf;
|
|
21252
21269
|
pt.XMLDecl = ck;
|
|
21253
|
-
var Ai = br, _s = Ai.find, vk = Ai.hasDefaultHTMLNamespace, Fc = Ai.hasOwn, yk = Ai.isHTMLMimeType, wk = Ai.isHTMLRawTextElement, xk = Ai.isHTMLVoidElement, Rh = Ai.MIME_TYPE, Cs = Ai.NAMESPACE,
|
|
21270
|
+
var Ai = br, _s = Ai.find, vk = Ai.hasDefaultHTMLNamespace, Fc = Ai.hasOwn, yk = Ai.isHTMLMimeType, wk = Ai.isHTMLRawTextElement, xk = Ai.isHTMLVoidElement, Rh = Ai.MIME_TYPE, Cs = Ai.NAMESPACE, Tn = Symbol(), Zx = xo, Je = Zx.DOMException, Ak = Zx.DOMExceptionName, is = pt;
|
|
21254
21271
|
function Bn(i) {
|
|
21255
|
-
if (i !==
|
|
21272
|
+
if (i !== Tn)
|
|
21256
21273
|
throw new TypeError("Illegal constructor");
|
|
21257
21274
|
}
|
|
21258
21275
|
function Ek(i) {
|
|
@@ -21275,7 +21292,7 @@ function Sk(i) {
|
|
|
21275
21292
|
};
|
|
21276
21293
|
}
|
|
21277
21294
|
function Kx(i) {
|
|
21278
|
-
if (!
|
|
21295
|
+
if (!is.QName_exact.test(i))
|
|
21279
21296
|
throw new Je(Je.INVALID_CHARACTER_ERR, 'invalid character in qualified name "' + i + '"');
|
|
21280
21297
|
}
|
|
21281
21298
|
function Cb(i, e) {
|
|
@@ -21314,7 +21331,7 @@ function zn(i, e) {
|
|
|
21314
21331
|
}
|
|
21315
21332
|
t.constructor != i && (typeof i != "function" && console.error("unknown Class:" + i), t.constructor = i);
|
|
21316
21333
|
}
|
|
21317
|
-
var jn = {},
|
|
21334
|
+
var jn = {}, Xi = jn.ELEMENT_NODE = 1, Bc = jn.ATTRIBUTE_NODE = 2, lg = jn.TEXT_NODE = 3, Qx = jn.CDATA_SECTION_NODE = 4, Jx = jn.ENTITY_REFERENCE_NODE = 5, Tk = jn.ENTITY_NODE = 6, eA = jn.PROCESSING_INSTRUCTION_NODE = 7, tA = jn.COMMENT_NODE = 8, Zh = jn.DOCUMENT_NODE = 9, rA = jn.DOCUMENT_TYPE_NODE = 10, fo = jn.DOCUMENT_FRAGMENT_NODE = 11, kk = jn.NOTATION_NODE = 12, dr = Ai.freeze({
|
|
21318
21335
|
DOCUMENT_POSITION_DISCONNECTED: 1,
|
|
21319
21336
|
DOCUMENT_POSITION_PRECEDING: 2,
|
|
21320
21337
|
DOCUMENT_POSITION_FOLLOWING: 4,
|
|
@@ -21693,7 +21710,7 @@ sA.prototype = {
|
|
|
21693
21710
|
createDocument: function(i, e, t) {
|
|
21694
21711
|
var r = Rh.XML_APPLICATION;
|
|
21695
21712
|
i === Cs.HTML ? r = Rh.XML_XHTML_APPLICATION : i === Cs.SVG && (r = Rh.XML_SVG_IMAGE);
|
|
21696
|
-
var n = new po(
|
|
21713
|
+
var n = new po(Tn, { contentType: r });
|
|
21697
21714
|
if (n.implementation = this, n.childNodes = new Mr(), n.doctype = t || null, t && n.appendChild(t), e) {
|
|
21698
21715
|
var s = n.createElementNS(i, e);
|
|
21699
21716
|
n.appendChild(s);
|
|
@@ -21747,7 +21764,7 @@ sA.prototype = {
|
|
|
21747
21764
|
*/
|
|
21748
21765
|
createDocumentType: function(i, e, t, r) {
|
|
21749
21766
|
Kx(i);
|
|
21750
|
-
var n = new Yg(
|
|
21767
|
+
var n = new Yg(Tn);
|
|
21751
21768
|
return n.name = i, n.nodeName = i, n.publicId = e || "", n.systemId = t || "", n.internalSubset = r || "", n.childNodes = new Mr(), n;
|
|
21752
21769
|
},
|
|
21753
21770
|
/**
|
|
@@ -21768,7 +21785,7 @@ sA.prototype = {
|
|
|
21768
21785
|
* @see https://dom.spec.whatwg.org/#html-document
|
|
21769
21786
|
*/
|
|
21770
21787
|
createHTMLDocument: function(i) {
|
|
21771
|
-
var e = new po(
|
|
21788
|
+
var e = new po(Tn, { contentType: Rh.HTML });
|
|
21772
21789
|
if (e.implementation = this, e.childNodes = new Mr(), i !== !1) {
|
|
21773
21790
|
e.doctype = this.createDocumentType("html"), e.doctype.ownerDocument = e, e.appendChild(e.doctype);
|
|
21774
21791
|
var t = e.createElement("html");
|
|
@@ -22423,7 +22440,7 @@ po.prototype = {
|
|
|
22423
22440
|
}
|
|
22424
22441
|
return i;
|
|
22425
22442
|
}
|
|
22426
|
-
return ug(this, i, e), i.ownerDocument = this, this.documentElement === null && i.nodeType ===
|
|
22443
|
+
return ug(this, i, e), i.ownerDocument = this, this.documentElement === null && i.nodeType === Xi && (this.documentElement = i), i;
|
|
22427
22444
|
},
|
|
22428
22445
|
removeChild: function(i) {
|
|
22429
22446
|
var e = uA(this, i);
|
|
@@ -22440,7 +22457,7 @@ po.prototype = {
|
|
|
22440
22457
|
getElementById: function(i) {
|
|
22441
22458
|
var e = null;
|
|
22442
22459
|
return Mh(this.documentElement, function(t) {
|
|
22443
|
-
if (t.nodeType ==
|
|
22460
|
+
if (t.nodeType == Xi && t.getAttribute("id") == i)
|
|
22444
22461
|
return e = t, !0;
|
|
22445
22462
|
}), e;
|
|
22446
22463
|
},
|
|
@@ -22463,7 +22480,7 @@ po.prototype = {
|
|
|
22463
22480
|
* @see https://dom.spec.whatwg.org/#concept-create-element
|
|
22464
22481
|
*/
|
|
22465
22482
|
createElement: function(i) {
|
|
22466
|
-
var e = new mo(
|
|
22483
|
+
var e = new mo(Tn);
|
|
22467
22484
|
e.ownerDocument = this, this.type === "html" && (i = i.toLowerCase()), vk(this.contentType) && (e.namespaceURI = Cs.HTML), e.nodeName = i, e.tagName = i, e.localName = i, e.childNodes = new Mr();
|
|
22468
22485
|
var t = e.attributes = new zc();
|
|
22469
22486
|
return t._ownerElement = e, e;
|
|
@@ -22472,7 +22489,7 @@ po.prototype = {
|
|
|
22472
22489
|
* @returns {DocumentFragment}
|
|
22473
22490
|
*/
|
|
22474
22491
|
createDocumentFragment: function() {
|
|
22475
|
-
var i = new $f(
|
|
22492
|
+
var i = new $f(Tn);
|
|
22476
22493
|
return i.ownerDocument = this, i.childNodes = new Mr(), i;
|
|
22477
22494
|
},
|
|
22478
22495
|
/**
|
|
@@ -22480,7 +22497,7 @@ po.prototype = {
|
|
|
22480
22497
|
* @returns {Text}
|
|
22481
22498
|
*/
|
|
22482
22499
|
createTextNode: function(i) {
|
|
22483
|
-
var e = new Hf(
|
|
22500
|
+
var e = new Hf(Tn);
|
|
22484
22501
|
return e.ownerDocument = this, e.childNodes = new Mr(), e.appendData(i), e;
|
|
22485
22502
|
},
|
|
22486
22503
|
/**
|
|
@@ -22488,7 +22505,7 @@ po.prototype = {
|
|
|
22488
22505
|
* @returns {Comment}
|
|
22489
22506
|
*/
|
|
22490
22507
|
createComment: function(i) {
|
|
22491
|
-
var e = new Wg(
|
|
22508
|
+
var e = new Wg(Tn);
|
|
22492
22509
|
return e.ownerDocument = this, e.childNodes = new Mr(), e.appendData(i), e;
|
|
22493
22510
|
},
|
|
22494
22511
|
/**
|
|
@@ -22496,7 +22513,7 @@ po.prototype = {
|
|
|
22496
22513
|
* @returns {CDATASection}
|
|
22497
22514
|
*/
|
|
22498
22515
|
createCDATASection: function(i) {
|
|
22499
|
-
var e = new Xg(
|
|
22516
|
+
var e = new Xg(Tn);
|
|
22500
22517
|
return e.ownerDocument = this, e.childNodes = new Mr(), e.appendData(i), e;
|
|
22501
22518
|
},
|
|
22502
22519
|
/**
|
|
@@ -22505,7 +22522,7 @@ po.prototype = {
|
|
|
22505
22522
|
* @returns {ProcessingInstruction}
|
|
22506
22523
|
*/
|
|
22507
22524
|
createProcessingInstruction: function(i, e) {
|
|
22508
|
-
var t = new Kg(
|
|
22525
|
+
var t = new Kg(Tn);
|
|
22509
22526
|
return t.ownerDocument = this, t.childNodes = new Mr(), t.nodeName = t.target = i, t.nodeValue = t.data = e, t;
|
|
22510
22527
|
},
|
|
22511
22528
|
/**
|
|
@@ -22523,12 +22540,12 @@ po.prototype = {
|
|
|
22523
22540
|
* @see https://dom.spec.whatwg.org/#dom-document-createattribute
|
|
22524
22541
|
*/
|
|
22525
22542
|
createAttribute: function(i) {
|
|
22526
|
-
if (!
|
|
22543
|
+
if (!is.QName_exact.test(i))
|
|
22527
22544
|
throw new Je(Je.INVALID_CHARACTER_ERR, 'invalid character in name "' + i + '"');
|
|
22528
22545
|
return this.type === "html" && (i = i.toLowerCase()), this._createAttribute(i);
|
|
22529
22546
|
},
|
|
22530
22547
|
_createAttribute: function(i) {
|
|
22531
|
-
var e = new Zl(
|
|
22548
|
+
var e = new Zl(Tn);
|
|
22532
22549
|
return e.ownerDocument = this, e.childNodes = new Mr(), e.name = i, e.nodeName = i, e.localName = i, e.specified = !0, e;
|
|
22533
22550
|
},
|
|
22534
22551
|
/**
|
|
@@ -22548,11 +22565,11 @@ po.prototype = {
|
|
|
22548
22565
|
* @see https://www.w3.org/TR/DOM-Level-3-Core/core.html#ID-392B75AE
|
|
22549
22566
|
*/
|
|
22550
22567
|
createEntityReference: function(i) {
|
|
22551
|
-
if (!
|
|
22568
|
+
if (!is.Name.test(i))
|
|
22552
22569
|
throw new Je(Je.INVALID_CHARACTER_ERR, 'not a valid xml name "' + i + '"');
|
|
22553
22570
|
if (this.type === "html")
|
|
22554
22571
|
throw new Je("document is an html document", Ak.NotSupportedError);
|
|
22555
|
-
var e = new Zg(
|
|
22572
|
+
var e = new Zg(Tn);
|
|
22556
22573
|
return e.ownerDocument = this, e.childNodes = new Mr(), e.nodeName = i, e;
|
|
22557
22574
|
},
|
|
22558
22575
|
// Introduced in DOM Level 2:
|
|
@@ -22562,7 +22579,7 @@ po.prototype = {
|
|
|
22562
22579
|
* @returns {Element}
|
|
22563
22580
|
*/
|
|
22564
22581
|
createElementNS: function(i, e) {
|
|
22565
|
-
var t = Cb(i, e), r = new mo(
|
|
22582
|
+
var t = Cb(i, e), r = new mo(Tn), n = r.attributes = new zc();
|
|
22566
22583
|
return r.childNodes = new Mr(), r.ownerDocument = this, r.nodeName = e, r.tagName = e, r.namespaceURI = t[0], r.prefix = t[1], r.localName = t[2], n._ownerElement = r, r;
|
|
22567
22584
|
},
|
|
22568
22585
|
// Introduced in DOM Level 2:
|
|
@@ -22572,7 +22589,7 @@ po.prototype = {
|
|
|
22572
22589
|
* @returns {Attr}
|
|
22573
22590
|
*/
|
|
22574
22591
|
createAttributeNS: function(i, e) {
|
|
22575
|
-
var t = Cb(i, e), r = new Zl(
|
|
22592
|
+
var t = Cb(i, e), r = new Zl(Tn);
|
|
22576
22593
|
return r.ownerDocument = this, r.childNodes = new Mr(), r.nodeName = e, r.name = e, r.specified = !0, r.namespaceURI = t[0], r.prefix = t[1], r.localName = t[2], r;
|
|
22577
22594
|
}
|
|
22578
22595
|
};
|
|
@@ -22581,7 +22598,7 @@ function mo(i) {
|
|
|
22581
22598
|
Bn(i), this._nsMap = /* @__PURE__ */ Object.create(null);
|
|
22582
22599
|
}
|
|
22583
22600
|
mo.prototype = {
|
|
22584
|
-
nodeType:
|
|
22601
|
+
nodeType: Xi,
|
|
22585
22602
|
/**
|
|
22586
22603
|
* The attributes of this element.
|
|
22587
22604
|
*
|
|
@@ -22705,7 +22722,7 @@ mo.prototype = {
|
|
|
22705
22722
|
return new ql(this, function(t) {
|
|
22706
22723
|
var r = [];
|
|
22707
22724
|
return e.length > 0 && Mh(t, function(n) {
|
|
22708
|
-
if (n !== t && n.nodeType ===
|
|
22725
|
+
if (n !== t && n.nodeType === Xi) {
|
|
22709
22726
|
var s = n.getAttribute("class");
|
|
22710
22727
|
if (s) {
|
|
22711
22728
|
var a = i === s;
|
|
@@ -22748,7 +22765,7 @@ mo.prototype = {
|
|
|
22748
22765
|
return new ql(this, function(r) {
|
|
22749
22766
|
var n = [];
|
|
22750
22767
|
return Mh(r, function(s) {
|
|
22751
|
-
if (!(s === r || s.nodeType !==
|
|
22768
|
+
if (!(s === r || s.nodeType !== Xi))
|
|
22752
22769
|
if (i === "*")
|
|
22753
22770
|
n.push(s);
|
|
22754
22771
|
else {
|
|
@@ -22762,7 +22779,7 @@ mo.prototype = {
|
|
|
22762
22779
|
return new ql(this, function(t) {
|
|
22763
22780
|
var r = [];
|
|
22764
22781
|
return Mh(t, function(n) {
|
|
22765
|
-
n !== t && n.nodeType ===
|
|
22782
|
+
n !== t && n.nodeType === Xi && (i === "*" || n.namespaceURI === i) && (e === "*" || n.localName == e) && r.push(n);
|
|
22766
22783
|
}), r;
|
|
22767
22784
|
});
|
|
22768
22785
|
}
|
|
@@ -22904,7 +22921,7 @@ function wu(i, e, t, r) {
|
|
|
22904
22921
|
} else
|
|
22905
22922
|
return;
|
|
22906
22923
|
switch (i.nodeType) {
|
|
22907
|
-
case
|
|
22924
|
+
case Xi:
|
|
22908
22925
|
var a = i.attributes, o = a.length, E = i.firstChild, l = i.tagName, c = l;
|
|
22909
22926
|
if (!s && !i.prefix && i.namespaceURI) {
|
|
22910
22927
|
for (var h, d = 0; d < a.length; d++)
|
|
@@ -22972,12 +22989,12 @@ function wu(i, e, t, r) {
|
|
|
22972
22989
|
case lg:
|
|
22973
22990
|
return e.push(i.data.replace(/[<&>]/g, aA));
|
|
22974
22991
|
case Qx:
|
|
22975
|
-
return e.push(
|
|
22992
|
+
return e.push(is.CDATA_START, i.data, is.CDATA_END);
|
|
22976
22993
|
case tA:
|
|
22977
|
-
return e.push(
|
|
22994
|
+
return e.push(is.COMMENT_START, i.data, is.COMMENT_END);
|
|
22978
22995
|
case rA:
|
|
22979
22996
|
var _ = i.publicId, C = i.systemId;
|
|
22980
|
-
e.push(
|
|
22997
|
+
e.push(is.DOCTYPE_DECL_START, " ", i.name), _ ? (e.push(" ", is.PUBLIC, " ", _), C && C !== "." && e.push(" ", C)) : C && C !== "." && e.push(" ", is.SYSTEM, " ", C), i.internalSubset && e.push(" [", i.internalSubset, "]"), e.push(">");
|
|
22981
22998
|
return;
|
|
22982
22999
|
case eA:
|
|
22983
23000
|
return e.push("<?", i.target, " ", i.data, "?>");
|
|
@@ -22990,7 +23007,7 @@ function wu(i, e, t, r) {
|
|
|
22990
23007
|
function pA(i, e, t) {
|
|
22991
23008
|
var r;
|
|
22992
23009
|
switch (e.nodeType) {
|
|
22993
|
-
case
|
|
23010
|
+
case Xi:
|
|
22994
23011
|
r = e.cloneNode(!1), r.ownerDocument = i;
|
|
22995
23012
|
case fo:
|
|
22996
23013
|
break;
|
|
@@ -23004,14 +23021,14 @@ function pA(i, e, t) {
|
|
|
23004
23021
|
return r;
|
|
23005
23022
|
}
|
|
23006
23023
|
function Sb(i, e, t) {
|
|
23007
|
-
var r = new e.constructor(
|
|
23024
|
+
var r = new e.constructor(Tn);
|
|
23008
23025
|
for (var n in e)
|
|
23009
23026
|
if (Fc(e, n)) {
|
|
23010
23027
|
var s = e[n];
|
|
23011
23028
|
typeof s != "object" && s != r[n] && (r[n] = s);
|
|
23012
23029
|
}
|
|
23013
23030
|
switch (e.childNodes && (r.childNodes = new Mr()), r.ownerDocument = i, r.nodeType) {
|
|
23014
|
-
case
|
|
23031
|
+
case Xi:
|
|
23015
23032
|
var a = e.attributes, o = r.attributes = new zc(), l = a.length;
|
|
23016
23033
|
o._ownerElement = r;
|
|
23017
23034
|
for (var c = 0; c < l; c++)
|
|
@@ -23032,7 +23049,7 @@ try {
|
|
|
23032
23049
|
if (Object.defineProperty) {
|
|
23033
23050
|
let i = function(e) {
|
|
23034
23051
|
switch (e.nodeType) {
|
|
23035
|
-
case
|
|
23052
|
+
case Xi:
|
|
23036
23053
|
case fo:
|
|
23037
23054
|
var t = [];
|
|
23038
23055
|
for (e = e.firstChild; e; )
|
|
@@ -23052,7 +23069,7 @@ try {
|
|
|
23052
23069
|
},
|
|
23053
23070
|
set: function(e) {
|
|
23054
23071
|
switch (this.nodeType) {
|
|
23055
|
-
case
|
|
23072
|
+
case Xi:
|
|
23056
23073
|
case fo:
|
|
23057
23074
|
for (; this.firstChild; )
|
|
23058
23075
|
this.removeChild(this.firstChild);
|
|
@@ -25954,10 +25971,10 @@ function nu(i) {
|
|
|
25954
25971
|
this.name = "GenericError", this.message = i, this.stack = new Error(i).stack;
|
|
25955
25972
|
}
|
|
25956
25973
|
nu.prototype = Error.prototype;
|
|
25957
|
-
function
|
|
25974
|
+
function bn(i) {
|
|
25958
25975
|
this.name = "TemplateError", this.message = i, this.stack = new Error(i).stack;
|
|
25959
25976
|
}
|
|
25960
|
-
|
|
25977
|
+
bn.prototype = new nu();
|
|
25961
25978
|
function Jh(i) {
|
|
25962
25979
|
this.name = "RenderingError", this.message = i, this.stack = new Error(i).stack;
|
|
25963
25980
|
}
|
|
@@ -25985,7 +26002,7 @@ function oD(i, e) {
|
|
|
25985
26002
|
}, e), t;
|
|
25986
26003
|
}
|
|
25987
26004
|
function lD(i) {
|
|
25988
|
-
var e = new
|
|
26005
|
+
var e = new bn("Multi error");
|
|
25989
26006
|
throw e.properties = {
|
|
25990
26007
|
errors: i,
|
|
25991
26008
|
id: "multi_error",
|
|
@@ -25993,7 +26010,7 @@ function lD(i) {
|
|
|
25993
26010
|
}, e;
|
|
25994
26011
|
}
|
|
25995
26012
|
function uD(i) {
|
|
25996
|
-
var e = new
|
|
26013
|
+
var e = new bn("Unopened tag");
|
|
25997
26014
|
return e.properties = {
|
|
25998
26015
|
xtag: Kp(i.xtag.split(" ")),
|
|
25999
26016
|
id: "unopened_tag",
|
|
@@ -26004,7 +26021,7 @@ function uD(i) {
|
|
|
26004
26021
|
}, e;
|
|
26005
26022
|
}
|
|
26006
26023
|
function cD(i) {
|
|
26007
|
-
var e = new
|
|
26024
|
+
var e = new bn("Duplicate open tag, expected one open tag");
|
|
26008
26025
|
return e.properties = {
|
|
26009
26026
|
xtag: Oo(i.xtag.split(" ")),
|
|
26010
26027
|
id: "duplicate_open_tag",
|
|
@@ -26015,7 +26032,7 @@ function cD(i) {
|
|
|
26015
26032
|
}, e;
|
|
26016
26033
|
}
|
|
26017
26034
|
function hD(i) {
|
|
26018
|
-
var e = new
|
|
26035
|
+
var e = new bn("Duplicate close tag, expected one close tag");
|
|
26019
26036
|
return e.properties = {
|
|
26020
26037
|
xtag: Oo(i.xtag.split(" ")),
|
|
26021
26038
|
id: "duplicate_close_tag",
|
|
@@ -26026,7 +26043,7 @@ function hD(i) {
|
|
|
26026
26043
|
}, e;
|
|
26027
26044
|
}
|
|
26028
26045
|
function dD(i) {
|
|
26029
|
-
var e = new
|
|
26046
|
+
var e = new bn("Unclosed tag");
|
|
26030
26047
|
return e.properties = {
|
|
26031
26048
|
xtag: Oo(i.xtag.split(" ")).substr(1),
|
|
26032
26049
|
id: "unclosed_tag",
|
|
@@ -26037,7 +26054,7 @@ function dD(i) {
|
|
|
26037
26054
|
}, e;
|
|
26038
26055
|
}
|
|
26039
26056
|
function fD(i) {
|
|
26040
|
-
var e = new
|
|
26057
|
+
var e = new bn('No tag "'.concat(i.element, '" was found at the ').concat(i.position)), t = i.parsed[i.index];
|
|
26041
26058
|
throw e.properties = {
|
|
26042
26059
|
id: "no_xml_tag_found_at_".concat(i.position),
|
|
26043
26060
|
explanation: 'No tag "'.concat(i.element, '" was found at the ').concat(i.position),
|
|
@@ -26071,7 +26088,7 @@ function gD(i) {
|
|
|
26071
26088
|
function mD(i) {
|
|
26072
26089
|
var e = i.part, t = e.value, r = e.offset, n = i.id, s = n === void 0 ? "raw_tag_outerxml_invalid" : n, a = i.message, o = a === void 0 ? "Raw tag not in paragraph" : a, l = i.part, c = i.explanation, h = c === void 0 ? 'The tag "'.concat(t, '" is not inside a paragraph') : c;
|
|
26073
26090
|
typeof h == "function" && (h = h(l));
|
|
26074
|
-
var d = new
|
|
26091
|
+
var d = new bn(o);
|
|
26075
26092
|
throw d.properties = {
|
|
26076
26093
|
id: s,
|
|
26077
26094
|
explanation: h,
|
|
@@ -26084,7 +26101,7 @@ function mD(i) {
|
|
|
26084
26101
|
}, d;
|
|
26085
26102
|
}
|
|
26086
26103
|
function bD(i) {
|
|
26087
|
-
var e = new
|
|
26104
|
+
var e = new bn("Raw tag should be the only text in paragraph"), t = i.part.value;
|
|
26088
26105
|
throw e.properties = {
|
|
26089
26106
|
id: "raw_xml_tag_should_be_only_text_in_paragraph",
|
|
26090
26107
|
explanation: 'The raw tag "'.concat(t, '" should be the only text in this paragraph. This means that this tag should not be surrounded by any text or spaces.'),
|
|
@@ -26094,7 +26111,7 @@ function bD(i) {
|
|
|
26094
26111
|
}, e;
|
|
26095
26112
|
}
|
|
26096
26113
|
function vD(i) {
|
|
26097
|
-
var e = i.location, t = i.offset, r = i.square, n = e === "start" ? "unclosed" : "unopened", s = e === "start" ? "Unclosed" : "Unopened", a = new
|
|
26114
|
+
var e = i.location, t = i.offset, r = i.square, n = e === "start" ? "unclosed" : "unopened", s = e === "start" ? "Unclosed" : "Unopened", a = new bn("".concat(s, " loop")), o = i.value;
|
|
26098
26115
|
return a.properties = {
|
|
26099
26116
|
id: "".concat(n, "_loop"),
|
|
26100
26117
|
explanation: 'The loop with tag "'.concat(o, '" is ').concat(n),
|
|
@@ -26103,7 +26120,7 @@ function vD(i) {
|
|
|
26103
26120
|
}, r && (a.properties.square = r), a;
|
|
26104
26121
|
}
|
|
26105
26122
|
function yD(i, e) {
|
|
26106
|
-
var t = new
|
|
26123
|
+
var t = new bn("Unbalanced loop tag"), r = e[0].part.value, n = e[1].part.value, s = i[0].part.value, a = i[1].part.value;
|
|
26107
26124
|
return t.properties = {
|
|
26108
26125
|
id: "unbalanced_loop_tags",
|
|
26109
26126
|
explanation: "Unbalanced loop tags {#".concat(r, "}{/").concat(n, "}{#").concat(s, "}{/").concat(a, "}"),
|
|
@@ -26119,7 +26136,7 @@ function yD(i, e) {
|
|
|
26119
26136
|
}, t;
|
|
26120
26137
|
}
|
|
26121
26138
|
function wD(i) {
|
|
26122
|
-
var e = i.tags, t = new
|
|
26139
|
+
var e = i.tags, t = new bn("Closing tag does not match opening tag");
|
|
26123
26140
|
return t.properties = {
|
|
26124
26141
|
id: "closing_tag_does_not_match_opening_tag",
|
|
26125
26142
|
explanation: 'The tag "'.concat(e[0].value, '" is closed by the tag "').concat(e[1].value, '"'),
|
|
@@ -26150,7 +26167,7 @@ function AD(i) {
|
|
|
26150
26167
|
}, s;
|
|
26151
26168
|
}
|
|
26152
26169
|
function ED(i) {
|
|
26153
|
-
var e = i.tag, t = i.offset, r = new
|
|
26170
|
+
var e = i.tag, t = i.offset, r = new bn('The position of the loop tags "'.concat(e, '" would produce invalid XML'));
|
|
26154
26171
|
return r.properties = {
|
|
26155
26172
|
xtag: e,
|
|
26156
26173
|
id: "loop_position_invalid",
|
|
@@ -26161,7 +26178,7 @@ function ED(i) {
|
|
|
26161
26178
|
function _D(i, e) {
|
|
26162
26179
|
var t = 'Unimplemented tag type "'.concat(i.type, '"');
|
|
26163
26180
|
i.module && (t += ' "'.concat(i.module, '"'));
|
|
26164
|
-
var r = new
|
|
26181
|
+
var r = new bn(t);
|
|
26165
26182
|
throw r.properties = {
|
|
26166
26183
|
part: i,
|
|
26167
26184
|
index: e,
|
|
@@ -26206,7 +26223,7 @@ function DD(i) {
|
|
|
26206
26223
|
}, r;
|
|
26207
26224
|
}
|
|
26208
26225
|
function PD(i, e) {
|
|
26209
|
-
var t = new
|
|
26226
|
+
var t = new bn("An XML file has invalid xml");
|
|
26210
26227
|
throw t.properties = {
|
|
26211
26228
|
id: "file_has_invalid_xml",
|
|
26212
26229
|
content: i,
|
|
@@ -26222,9 +26239,9 @@ function RD(i) {
|
|
|
26222
26239
|
fileType: i
|
|
26223
26240
|
}, e;
|
|
26224
26241
|
}
|
|
26225
|
-
var
|
|
26242
|
+
var Qi = {
|
|
26226
26243
|
XTError: nu,
|
|
26227
|
-
XTTemplateError:
|
|
26244
|
+
XTTemplateError: bn,
|
|
26228
26245
|
XTInternalError: Ao,
|
|
26229
26246
|
XTScopeParserError: rm,
|
|
26230
26247
|
XTAPIVersionError: uv,
|
|
@@ -26297,7 +26314,7 @@ function LD(i, e) {
|
|
|
26297
26314
|
function OD(i) {
|
|
26298
26315
|
if (Array.isArray(i)) return i;
|
|
26299
26316
|
}
|
|
26300
|
-
var TA = It, FD = TA.DOMParser, BD = TA.XMLSerializer, zD =
|
|
26317
|
+
var TA = It, FD = TA.DOMParser, BD = TA.XMLSerializer, zD = Qi, kA = zD.throwXmlTagNotFound, DA = lv, jD = DA.last, UD = DA.first;
|
|
26301
26318
|
function HD(i) {
|
|
26302
26319
|
return /^[ \n\r\t]+$/.test(i);
|
|
26303
26320
|
}
|
|
@@ -26935,7 +26952,7 @@ var Im, n2;
|
|
|
26935
26952
|
function iu() {
|
|
26936
26953
|
if (n2) return Im;
|
|
26937
26954
|
n2 = 1;
|
|
26938
|
-
var i =
|
|
26955
|
+
var i = Qi, e = i.XTInternalError;
|
|
26939
26956
|
function t() {
|
|
26940
26957
|
}
|
|
26941
26958
|
function r(n) {
|
|
@@ -27079,7 +27096,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
27079
27096
|
}
|
|
27080
27097
|
return (ie === "string" ? String : Number)(j);
|
|
27081
27098
|
}
|
|
27082
|
-
var y = Fr, v = y.getRightOrNull, A = y.getRight, E = y.getLeft, _ = y.getLeftOrNull, C = y.chunkBy, I = y.isTagStart, k = y.isTagEnd, D = y.isContent, R = y.last, z = y.first, q =
|
|
27099
|
+
var y = Fr, v = y.getRightOrNull, A = y.getRight, E = y.getLeft, _ = y.getLeftOrNull, C = y.chunkBy, I = y.isTagStart, k = y.isTagEnd, D = y.isContent, R = y.last, z = y.first, q = Qi, O = q.XTTemplateError, X = q.throwExpandNotFound, S = q.getLoopPositionProducesInvalidXMLError;
|
|
27083
27100
|
function J(j, ie) {
|
|
27084
27101
|
if (j.length === 0)
|
|
27085
27102
|
return !1;
|
|
@@ -27380,7 +27397,7 @@ function OP() {
|
|
|
27380
27397
|
}
|
|
27381
27398
|
return String(y);
|
|
27382
27399
|
}
|
|
27383
|
-
var a =
|
|
27400
|
+
var a = Qi, o = a.getScopeParserExecutionError, l = lv, c = l.last, h = Fr, d = h.concatArrays;
|
|
27384
27401
|
function p(y, v) {
|
|
27385
27402
|
for (var A = y.length >>> 0, E, _ = 0; _ < A; _++)
|
|
27386
27403
|
if (E = y[_], v.call(this, E, _, y))
|
|
@@ -27616,7 +27633,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
27616
27633
|
}
|
|
27617
27634
|
return (se === "string" ? String : Number)(H);
|
|
27618
27635
|
}
|
|
27619
|
-
var p =
|
|
27636
|
+
var p = Qi, g = p.getUnclosedTagException, w = p.getUnopenedTagException, b = p.getDuplicateOpenTagException, y = p.getDuplicateCloseTagException, v = p.throwMalformedXml, A = p.throwXmlInvalid, E = p.XTTemplateError, _ = Fr, C = _.isTextStart, I = _.isTextEnd, k = _.wordToUtf8, D = _.pushArray, R = 0, z = 1, q = 2, O = 3;
|
|
27620
27637
|
function X(H, se) {
|
|
27621
27638
|
return H[0] <= se.offset && se.offset < H[1];
|
|
27622
27639
|
}
|
|
@@ -28258,7 +28275,7 @@ var qm, m2;
|
|
|
28258
28275
|
function UP() {
|
|
28259
28276
|
if (m2) return qm;
|
|
28260
28277
|
m2 = 1;
|
|
28261
|
-
var i =
|
|
28278
|
+
var i = Qi, e = i.throwUnimplementedTagType, t = i.XTScopeParserError, r = Fr, n = r.pushArray, s = OA();
|
|
28262
28279
|
function a(l, c) {
|
|
28263
28280
|
for (var h = 0, d = c.modules; h < d.length; h++) {
|
|
28264
28281
|
var p = d[h], g = p.render(l, c);
|
|
@@ -29221,7 +29238,7 @@ function XP() {
|
|
|
29221
29238
|
}
|
|
29222
29239
|
return String(y);
|
|
29223
29240
|
}
|
|
29224
|
-
var a = dv(), o = Fr, l = o.isContent, c =
|
|
29241
|
+
var a = dv(), o = Fr, l = o.isContent, c = Qi, h = c.throwRawTagShouldBeOnlyTextInParagraph, d = c.getInvalidRawXMLValueException, p = iu(), g = "rawxml";
|
|
29225
29242
|
function w(y) {
|
|
29226
29243
|
for (var v = y.part, A = y.left, E = y.right, _ = y.postparsed, C = y.index, I = _.slice(A + 1, E), k = 0, D = I.length; k < D; k++)
|
|
29227
29244
|
if (k !== C - A - 1) {
|
|
@@ -29358,7 +29375,7 @@ function ZP() {
|
|
|
29358
29375
|
}
|
|
29359
29376
|
return String(D);
|
|
29360
29377
|
}
|
|
29361
|
-
var a = "expandPair", o = YP(), l = Fr, c = l.getLeft, h = l.getRight, d = l.pushArray, p = iu(), g = dv(), w = g.getExpandToDefault, b =
|
|
29378
|
+
var a = "expandPair", o = YP(), l = Fr, c = l.getLeft, h = l.getRight, d = l.pushArray, p = iu(), g = dv(), w = g.getExpandToDefault, b = Qi, y = b.getUnmatchedLoopException, v = b.getClosingTagNotMatchOpeningTag, A = b.getUnbalancedLoopException;
|
|
29362
29379
|
function E(D) {
|
|
29363
29380
|
switch (D.location) {
|
|
29364
29381
|
case "start":
|
|
@@ -29550,7 +29567,7 @@ function KP() {
|
|
|
29550
29567
|
}
|
|
29551
29568
|
return String(I);
|
|
29552
29569
|
}
|
|
29553
|
-
var a = iu(), o =
|
|
29570
|
+
var a = iu(), o = Qi, l = o.getScopeCompilationError, c = o.getCorruptCharactersException, h = Fr, d = h.utf8ToWord, p = h.hasCorruptCharacters, g = h.removeCorruptCharacters, w = NA(), b = w.settingsContentType, y = w.coreContentType, v = w.appContentType, A = w.customContentType, E = [b, y, v, A], _ = {
|
|
29554
29571
|
docx: "w",
|
|
29555
29572
|
pptx: "a"
|
|
29556
29573
|
}, C = /* @__PURE__ */ function() {
|
|
@@ -29882,7 +29899,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
29882
29899
|
nullGetter: _.function().optional(),
|
|
29883
29900
|
syntax: C.optional(),
|
|
29884
29901
|
stripInvalidXMLChars: _.boolean().optional()
|
|
29885
|
-
}).strict(), k = NP(), D = k.getRelsTypes, R = MP(), z = R.collectContentTypes, q = R.getContentTypes, O = iu(), X = dv(), S = LP(), J = OP(), Y = MA(), W = FP(), fe = W.getTags, K = BP(), be =
|
|
29902
|
+
}).strict(), k = NP(), D = k.getRelsTypes, R = MP(), z = R.collectContentTypes, q = R.getContentTypes, O = iu(), X = dv(), S = LP(), J = OP(), Y = MA(), W = FP(), fe = W.getTags, K = BP(), be = Qi, te = be.throwMultiError, j = be.throwResolveBeforeCompile, ie = be.throwRenderInvalidTemplate, ae = be.throwRenderTwice, H = be.XTInternalError, se = be.XTTemplateError, le = be.throwFileTypeNotIdentified, oe = be.throwFileTypeNotHandled, ce = be.throwApiVersionError;
|
|
29886
29903
|
E.getRelsTypes = D, E.traits = X, E.moduleWrapper = O, E.collectContentTypes = z, E.getContentTypes = q;
|
|
29887
29904
|
var Ae = E.getDefaults, Se = E.str2xml, Ie = E.xml2str, Te = E.concatArrays, x = E.uniq, U = E.getDuplicates, B = E.stableSort, F = E.pushArray, M = E.utf8ToWord, G = E.invertMap, de = "[Content_Types].xml", we = "_rels/.rels", ee = [3, 47, 2];
|
|
29888
29905
|
function Ee(ge) {
|
|
@@ -30145,8 +30162,8 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
30145
30162
|
this.zip.files[ki] != null && this.precompileFile(ki);
|
|
30146
30163
|
}
|
|
30147
30164
|
this.sendEvent("after-preparse");
|
|
30148
|
-
for (var
|
|
30149
|
-
var $n =
|
|
30165
|
+
for (var vn = 0, es = this.templatedFiles; vn < es.length; vn++) {
|
|
30166
|
+
var $n = es[vn];
|
|
30150
30167
|
this.zip.files[$n] != null && this.compiled[$n].parse({
|
|
30151
30168
|
noPostParse: !0
|
|
30152
30169
|
});
|
|
@@ -30222,10 +30239,10 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
30222
30239
|
}
|
|
30223
30240
|
for (var ft = 0; ft < me.length; ft++)
|
|
30224
30241
|
for (var gt = me[ft], Lt = s(gt, 3), st = Lt[1], nn = Lt[2], Hn = 0, ki = this.modules; Hn < ki.length; Hn++) {
|
|
30225
|
-
var
|
|
30226
|
-
if (
|
|
30227
|
-
var
|
|
30228
|
-
typeof
|
|
30242
|
+
var vn = ki[Hn];
|
|
30243
|
+
if (vn.preZip) {
|
|
30244
|
+
var es = vn.preZip(st, nn);
|
|
30245
|
+
typeof es == "string" && (gt[1] = es);
|
|
30229
30246
|
}
|
|
30230
30247
|
}
|
|
30231
30248
|
for (var $n = 0; $n < me.length; $n++) {
|
|
@@ -30365,7 +30382,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
30365
30382
|
}
|
|
30366
30383
|
}]);
|
|
30367
30384
|
}();
|
|
30368
|
-
tr.DocUtils = E, tr.Errors =
|
|
30385
|
+
tr.DocUtils = E, tr.Errors = Qi, tr.XmlTemplater = qP(), tr.FileTypeConfig = QP(), tr.XmlMatcher = LA(), i.exports = tr, i.exports.default = tr;
|
|
30369
30386
|
})(Bx);
|
|
30370
30387
|
var JP = Bx.exports;
|
|
30371
30388
|
const k2 = /* @__PURE__ */ Rg(JP);
|
|
@@ -30381,27 +30398,27 @@ Vf.decode = function(i) {
|
|
|
30381
30398
|
s = lo.indexOf(i.charAt(c++)), a = lo.indexOf(i.charAt(c++)), o = lo.indexOf(i.charAt(c++)), l = lo.indexOf(i.charAt(c++)), t = s << 2 | a >> 4, r = (a & 15) << 4 | o >> 2, n = (o & 3) << 6 | l, e += String.fromCharCode(t), o !== 64 && (e += String.fromCharCode(r)), l !== 64 && (e += String.fromCharCode(n));
|
|
30382
30399
|
return e;
|
|
30383
30400
|
};
|
|
30384
|
-
var
|
|
30385
|
-
|
|
30386
|
-
|
|
30387
|
-
|
|
30388
|
-
|
|
30389
|
-
|
|
30390
|
-
|
|
30401
|
+
var mn = {}, gp;
|
|
30402
|
+
mn.base64 = !0;
|
|
30403
|
+
mn.array = !0;
|
|
30404
|
+
mn.string = !0;
|
|
30405
|
+
mn.arraybuffer = typeof ArrayBuffer < "u" && typeof Uint8Array < "u";
|
|
30406
|
+
mn.nodebuffer = typeof Buffer < "u";
|
|
30407
|
+
mn.uint8array = typeof Uint8Array < "u";
|
|
30391
30408
|
if (typeof ArrayBuffer > "u")
|
|
30392
|
-
gp =
|
|
30409
|
+
gp = mn.blob = !1;
|
|
30393
30410
|
else {
|
|
30394
30411
|
var D2 = new ArrayBuffer(0);
|
|
30395
30412
|
try {
|
|
30396
|
-
gp =
|
|
30413
|
+
gp = mn.blob = new Blob([D2], {
|
|
30397
30414
|
type: "application/zip"
|
|
30398
30415
|
}).size === 0;
|
|
30399
30416
|
} catch {
|
|
30400
30417
|
try {
|
|
30401
30418
|
var eR = window.BlobBuilder || window.WebKitBlobBuilder || window.MozBlobBuilder || window.MSBlobBuilder, P2 = new eR();
|
|
30402
|
-
P2.append(D2), gp =
|
|
30419
|
+
P2.append(D2), gp = mn.blob = P2.getBlob("application/zip").size === 0;
|
|
30403
30420
|
} catch {
|
|
30404
|
-
gp =
|
|
30421
|
+
gp = mn.blob = !1;
|
|
30405
30422
|
}
|
|
30406
30423
|
}
|
|
30407
30424
|
}
|
|
@@ -30614,13 +30631,13 @@ function tR() {
|
|
|
30614
30631
|
}
|
|
30615
30632
|
while ((P = yt[P & pe]) > Me && --V != 0);
|
|
30616
30633
|
return _e <= f.lookahead ? _e : f.lookahead;
|
|
30617
|
-
},
|
|
30634
|
+
}, vn = function(f) {
|
|
30618
30635
|
var P, m, $, V = f.w_size;
|
|
30619
30636
|
do {
|
|
30620
30637
|
if (m = f.window_size - f.lookahead - f.strstart, f.strstart >= V + (V - ye) && (f.window.set(f.window.subarray(V, V + V - m), 0), f.match_start -= V, f.strstart -= V, f.block_start -= V, f.insert > f.strstart && (f.insert = f.strstart), ut(f), m += V), f.strm.avail_in === 0) break;
|
|
30621
30638
|
if (P = Hn(f.strm, f.window, f.strstart + f.lookahead, m), f.lookahead += P, f.lookahead + f.insert >= 3) for ($ = f.strstart - f.insert, f.ins_h = f.window[$], f.ins_h = ft(f, f.ins_h, f.window[$ + 1]); f.insert && (f.ins_h = ft(f, f.ins_h, f.window[$ + 3 - 1]), f.prev[$ & f.w_mask] = f.head[f.ins_h], f.head[f.ins_h] = $, $++, f.insert--, !(f.lookahead + f.insert < 3)); ) ;
|
|
30622
30639
|
} while (f.lookahead < ye && f.strm.avail_in !== 0);
|
|
30623
|
-
},
|
|
30640
|
+
}, es = function(f, P) {
|
|
30624
30641
|
var m, $, V, Z = f.pending_buf_size - 5 > f.w_size ? f.w_size : f.pending_buf_size - 5, _e = 0, re = f.strm.avail_in;
|
|
30625
30642
|
do {
|
|
30626
30643
|
if (m = 65535, V = f.bi_valid + 42 >> 3, f.strm.avail_out < V || (V = f.strm.avail_out - V, m > ($ = f.strstart - f.block_start) + f.strm.avail_in && (m = $ + f.strm.avail_in), m > V && (m = V), m < Z && (m === 0 && P !== M || P === U || m !== $ + f.strm.avail_in))) break;
|
|
@@ -30630,7 +30647,7 @@ function tR() {
|
|
|
30630
30647
|
}, $n = function(f, P) {
|
|
30631
30648
|
for (var m, $; ; ) {
|
|
30632
30649
|
if (f.lookahead < ye) {
|
|
30633
|
-
if (
|
|
30650
|
+
if (vn(f), f.lookahead < ye && P === U) return 1;
|
|
30634
30651
|
if (f.lookahead === 0) break;
|
|
30635
30652
|
}
|
|
30636
30653
|
if (m = 0, f.lookahead >= 3 && (f.ins_h = ft(f, f.ins_h, f.window[f.strstart + 3 - 1]), m = f.prev[f.strstart & f.w_mask] = f.head[f.ins_h], f.head[f.ins_h] = f.strstart), m !== 0 && f.strstart - m <= f.w_size - ye && (f.match_length = ki(f, m)), f.match_length >= 3) if ($ = Te(f, f.strstart - f.match_start, f.match_length - 3), f.lookahead -= f.match_length, f.match_length <= f.max_lazy_match && f.lookahead >= 3) {
|
|
@@ -30647,7 +30664,7 @@ function tR() {
|
|
|
30647
30664
|
}, sn = function(f, P) {
|
|
30648
30665
|
for (var m, $, V; ; ) {
|
|
30649
30666
|
if (f.lookahead < ye) {
|
|
30650
|
-
if (
|
|
30667
|
+
if (vn(f), f.lookahead < ye && P === U) return 1;
|
|
30651
30668
|
if (f.lookahead === 0) break;
|
|
30652
30669
|
}
|
|
30653
30670
|
if (m = 0, f.lookahead >= 3 && (f.ins_h = ft(f, f.ins_h, f.window[f.strstart + 3 - 1]), m = f.prev[f.strstart & f.w_mask] = f.head[f.ins_h], f.head[f.ins_h] = f.strstart), f.prev_length = f.match_length, f.prev_match = f.match_start, f.match_length = 2, m !== 0 && f.prev_length < f.max_lazy_match && f.strstart - m <= f.w_size - ye && (f.match_length = ki(f, m), f.match_length <= 5 && (f.strategy === Ne || f.match_length === 3 && f.strstart - f.match_start > 4096) && (f.match_length = 2)), f.prev_length >= 3 && f.match_length <= f.prev_length) {
|
|
@@ -30665,7 +30682,7 @@ function tR() {
|
|
|
30665
30682
|
function Wr(f, P, m, $, V) {
|
|
30666
30683
|
this.good_length = f, this.max_lazy = P, this.nice_length = m, this.max_chain = $, this.func = V;
|
|
30667
30684
|
}
|
|
30668
|
-
var hi = [new Wr(0, 0, 0, 0,
|
|
30685
|
+
var hi = [new Wr(0, 0, 0, 0, es), new Wr(4, 4, 8, 4, $n), new Wr(4, 5, 16, 8, $n), new Wr(4, 6, 32, 32, $n), new Wr(4, 4, 16, 16, sn), new Wr(8, 16, 32, 32, sn), new Wr(8, 16, 128, 128, sn), new Wr(8, 32, 128, 256, sn), new Wr(32, 128, 258, 1024, sn), new Wr(32, 258, 258, 4096, sn)];
|
|
30669
30686
|
function Wc() {
|
|
30670
30687
|
this.strm = null, this.status = 0, this.pending_buf = null, this.pending_buf_size = 0, this.pending_out = 0, this.pending = 0, this.wrap = 0, this.gzhead = null, this.gzindex = 0, this.method = tr, this.last_flush = -1, this.w_size = 0, this.w_bits = 0, this.w_mask = 0, this.window = null, this.window_size = 0, this.prev = null, this.head = null, this.ins_h = 0, this.hash_size = 0, this.hash_bits = 0, this.hash_mask = 0, this.hash_shift = 0, this.block_start = 0, this.match_length = 0, this.prev_match = 0, this.match_available = 0, this.strstart = 0, this.match_start = 0, this.lookahead = 0, this.prev_length = 0, this.max_chain_length = 0, this.max_lazy_match = 0, this.level = 0, this.strategy = 0, this.good_match = 0, this.nice_match = 0, this.dyn_ltree = new Uint16Array(1146), this.dyn_dtree = new Uint16Array(122), this.bl_tree = new Uint16Array(78), Xe(this.dyn_ltree), Xe(this.dyn_dtree), Xe(this.bl_tree), this.l_desc = null, this.d_desc = null, this.bl_desc = null, this.bl_count = new Uint16Array(16), this.heap = new Uint16Array(573), Xe(this.heap), this.heap_len = 0, this.heap_max = 0, this.depth = new Uint16Array(573), Xe(this.depth), this.sym_buf = 0, this.lit_bufsize = 0, this.sym_next = 0, this.sym_end = 0, this.opt_len = 0, this.static_len = 0, this.matches = 0, this.insert = 0, this.bi_buf = 0, this.bi_valid = 0;
|
|
30671
30688
|
}
|
|
@@ -30757,9 +30774,9 @@ function tR() {
|
|
|
30757
30774
|
if (m.status = me, gt(f), m.pending !== 0) return m.last_flush = -1, de;
|
|
30758
30775
|
}
|
|
30759
30776
|
if (f.avail_in !== 0 || m.lookahead !== 0 || P !== U && m.status !== Oe) {
|
|
30760
|
-
var ke = m.level === 0 ?
|
|
30777
|
+
var ke = m.level === 0 ? es(m, P) : m.strategy === He ? function(ze, mt) {
|
|
30761
30778
|
for (var ot; ; ) {
|
|
30762
|
-
if (ze.lookahead === 0 && (
|
|
30779
|
+
if (ze.lookahead === 0 && (vn(ze), ze.lookahead === 0)) {
|
|
30763
30780
|
if (mt === U) return 1;
|
|
30764
30781
|
break;
|
|
30765
30782
|
}
|
|
@@ -30769,7 +30786,7 @@ function tR() {
|
|
|
30769
30786
|
}(m, P) : m.strategy === We ? function(ze, mt) {
|
|
30770
30787
|
for (var ot, At, Fe, Le, tt = ze.window; ; ) {
|
|
30771
30788
|
if (ze.lookahead <= ge) {
|
|
30772
|
-
if (
|
|
30789
|
+
if (vn(ze), ze.lookahead <= ge && mt === U) return 1;
|
|
30773
30790
|
if (ze.lookahead === 0) break;
|
|
30774
30791
|
}
|
|
30775
30792
|
if (ze.match_length = 0, ze.lookahead >= 3 && ze.strstart > 0 && (At = tt[Fe = ze.strstart - 1]) === tt[++Fe] && At === tt[++Fe] && At === tt[++Fe]) {
|
|
@@ -30802,12 +30819,12 @@ function tR() {
|
|
|
30802
30819
|
Z.set(P.subarray(m - $.w_size, m), 0), P = Z, m = $.w_size;
|
|
30803
30820
|
}
|
|
30804
30821
|
var _e = f.avail_in, re = f.next_in, Me = f.input;
|
|
30805
|
-
for (f.avail_in = m, f.next_in = 0, f.input = P,
|
|
30822
|
+
for (f.avail_in = m, f.next_in = 0, f.input = P, vn($); $.lookahead >= 3; ) {
|
|
30806
30823
|
var ue = $.strstart, pe = $.lookahead - 2;
|
|
30807
30824
|
do
|
|
30808
30825
|
$.ins_h = ft($, $.ins_h, $.window[ue + 3 - 1]), $.prev[ue & $.w_mask] = $.head[$.ins_h], $.head[$.ins_h] = ue, ue++;
|
|
30809
30826
|
while (--pe);
|
|
30810
|
-
$.strstart = ue, $.lookahead = 2,
|
|
30827
|
+
$.strstart = ue, $.lookahead = 2, vn($);
|
|
30811
30828
|
}
|
|
30812
30829
|
return $.strstart += $.lookahead, $.block_start = $.strstart, $.insert = $.lookahead, $.lookahead = 0, $.match_length = $.prev_length = 2, $.match_available = 0, f.next_in = re, f.input = Me, f.avail_in = _e, $.wrap = V, de;
|
|
30813
30830
|
}, deflateInfo: "pako deflate (from Nodeca project)" };
|
|
@@ -31001,7 +31018,7 @@ function tR() {
|
|
|
31001
31018
|
} while (m < $ && V < _e);
|
|
31002
31019
|
m -= tt = ke >> 3, $e &= (1 << (ke -= tt << 3)) - 1, f.next_in = m, f.next_out = V, f.avail_in = m < $ ? $ - m + 5 : 5 - (m - $), f.avail_out = V < _e ? _e - V + 257 : 257 - (V - _e), ct.hold = $e, ct.bits = ke;
|
|
31003
31020
|
}, Zf = 15, AE = new Uint16Array([3, 4, 5, 6, 7, 8, 9, 10, 11, 13, 15, 17, 19, 23, 27, 31, 35, 43, 51, 59, 67, 83, 99, 115, 131, 163, 195, 227, 258, 0, 0]), EE = new Uint8Array([16, 16, 16, 16, 16, 16, 16, 16, 17, 17, 17, 17, 18, 18, 18, 18, 19, 19, 19, 19, 20, 20, 20, 20, 21, 21, 21, 21, 16, 72, 78]), _E = new Uint16Array([1, 2, 3, 4, 5, 7, 9, 13, 17, 25, 33, 49, 65, 97, 129, 193, 257, 385, 513, 769, 1025, 1537, 2049, 3073, 4097, 6145, 8193, 12289, 16385, 24577, 0, 0]), CE = new Uint8Array([16, 16, 16, 16, 17, 17, 18, 18, 19, 19, 20, 20, 21, 21, 22, 22, 23, 23, 24, 24, 25, 25, 26, 26, 27, 27, 28, 28, 29, 29, 64, 64]), Yc = function(f, P, m, $, V, Z, _e, re) {
|
|
31004
|
-
var Me, ue, pe, yt, $e, ke, ze, mt, ot, At = re.bits, Fe = 0, Le = 0, tt = 0, Yt = 0, Ze = 0, Pt = 0, kt = 0, rt = 0, ct = 0,
|
|
31021
|
+
var Me, ue, pe, yt, $e, ke, ze, mt, ot, At = re.bits, Fe = 0, Le = 0, tt = 0, Yt = 0, Ze = 0, Pt = 0, kt = 0, rt = 0, ct = 0, $t = 0, So = null, ya = new Uint16Array(16), np = new Uint16Array(16), ip = null;
|
|
31005
31022
|
for (Fe = 0; Fe <= Zf; Fe++) ya[Fe] = 0;
|
|
31006
31023
|
for (Le = 0; Le < $; Le++) ya[P[m + Le]]++;
|
|
31007
31024
|
for (Ze = At, Yt = Zf; Yt >= 1 && ya[Yt] === 0; Yt--) ;
|
|
@@ -31011,24 +31028,24 @@ function tR() {
|
|
|
31011
31028
|
if (rt > 0 && (f === 0 || Yt !== 1)) return -1;
|
|
31012
31029
|
for (np[1] = 0, Fe = 1; Fe < Zf; Fe++) np[Fe + 1] = np[Fe] + ya[Fe];
|
|
31013
31030
|
for (Le = 0; Le < $; Le++) P[m + Le] !== 0 && (_e[np[P[m + Le]]++] = Le);
|
|
31014
|
-
if (f === 0 ? (So = ip = _e, ke = 20) : f === 1 ? (So = AE, ip = EE, ke = 257) : (So = _E, ip = CE, ke = 0),
|
|
31031
|
+
if (f === 0 ? (So = ip = _e, ke = 20) : f === 1 ? (So = AE, ip = EE, ke = 257) : (So = _E, ip = CE, ke = 0), $t = 0, Le = 0, Fe = tt, $e = Z, Pt = Ze, kt = 0, pe = -1, yt = (ct = 1 << Ze) - 1, f === 1 && ct > 852 || f === 2 && ct > 592) return 1;
|
|
31015
31032
|
for (; ; ) {
|
|
31016
31033
|
ze = Fe - kt, _e[Le] + 1 < ke ? (mt = 0, ot = _e[Le]) : _e[Le] >= ke ? (mt = ip[_e[Le] - ke], ot = So[_e[Le] - ke]) : (mt = 96, ot = 0), Me = 1 << Fe - kt, tt = ue = 1 << Pt;
|
|
31017
31034
|
do
|
|
31018
|
-
V[$e + (
|
|
31035
|
+
V[$e + ($t >> kt) + (ue -= Me)] = ze << 24 | mt << 16 | ot | 0;
|
|
31019
31036
|
while (ue !== 0);
|
|
31020
|
-
for (Me = 1 << Fe - 1;
|
|
31021
|
-
if (Me !== 0 ? (
|
|
31037
|
+
for (Me = 1 << Fe - 1; $t & Me; ) Me >>= 1;
|
|
31038
|
+
if (Me !== 0 ? ($t &= Me - 1, $t += Me) : $t = 0, Le++, --ya[Fe] == 0) {
|
|
31022
31039
|
if (Fe === Yt) break;
|
|
31023
31040
|
Fe = P[m + _e[Le]];
|
|
31024
31041
|
}
|
|
31025
|
-
if (Fe > Ze && (
|
|
31042
|
+
if (Fe > Ze && ($t & yt) !== pe) {
|
|
31026
31043
|
for (kt === 0 && (kt = Ze), $e += tt, rt = 1 << (Pt = Fe - kt); Pt + kt < Yt && !((rt -= ya[Pt + kt]) <= 0); ) Pt++, rt <<= 1;
|
|
31027
31044
|
if (ct += 1 << Pt, f === 1 && ct > 852 || f === 2 && ct > 592) return 1;
|
|
31028
|
-
V[pe =
|
|
31045
|
+
V[pe = $t & yt] = Ze << 24 | Pt << 16 | $e - Z | 0;
|
|
31029
31046
|
}
|
|
31030
31047
|
}
|
|
31031
|
-
return
|
|
31048
|
+
return $t !== 0 && (V[$e + $t] = Fe - kt << 24 | 64 << 16 | 0), re.bits = Ze, 0;
|
|
31032
31049
|
}, kv = ce.Z_FINISH, SE = ce.Z_BLOCK, Kf = ce.Z_TREES, _o = ce.Z_OK, TE = ce.Z_STREAM_END, kE = ce.Z_NEED_DICT, Di = ce.Z_STREAM_ERROR, Dv = ce.Z_DATA_ERROR, Pv = ce.Z_MEM_ERROR, DE = ce.Z_BUF_ERROR, Rv = ce.Z_DEFLATED, Qf = 16180, Jf = 16190, Ds = 16191, om = 16192, lm = 16194, ep = 16199, tp = 16200, um = 16206, nr = 16209, Iv = function(f) {
|
|
31033
31050
|
return (f >>> 24 & 255) + (f >>> 8 & 65280) + ((65280 & f) << 8) + ((255 & f) << 24);
|
|
31034
31051
|
};
|
|
@@ -31075,7 +31092,7 @@ function tR() {
|
|
|
31075
31092
|
}, Ps = { inflateReset: Mv, inflateReset2: Lv, inflateResetKeep: Nv, inflateInit: function(f) {
|
|
31076
31093
|
return Ov(f, 15);
|
|
31077
31094
|
}, inflateInit2: Ov, inflate: function(f, P) {
|
|
31078
|
-
var m, $, V, Z, _e, re, Me, ue, pe, yt, $e, ke, ze, mt, ot, At, Fe, Le, tt, Yt, Ze, Pt, kt, rt, ct = 0,
|
|
31095
|
+
var m, $, V, Z, _e, re, Me, ue, pe, yt, $e, ke, ze, mt, ot, At, Fe, Le, tt, Yt, Ze, Pt, kt, rt, ct = 0, $t = new Uint8Array(4), So = new Uint8Array([16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15]);
|
|
31079
31096
|
if (Co(f) || !f.output || !f.input && f.avail_in !== 0) return Di;
|
|
31080
31097
|
(m = f.state).mode === Ds && (m.mode = om), _e = f.next_out, V = f.output, Me = f.avail_out, Z = f.next_in, $ = f.input, re = f.avail_in, ue = m.hold, pe = m.bits, yt = re, $e = Me, Pt = _o;
|
|
31081
31098
|
e: for (; ; ) switch (m.mode) {
|
|
@@ -31089,7 +31106,7 @@ function tR() {
|
|
|
31089
31106
|
re--, ue += $[Z++] << pe, pe += 8;
|
|
31090
31107
|
}
|
|
31091
31108
|
if (2 & m.wrap && ue === 35615) {
|
|
31092
|
-
m.wbits === 0 && (m.wbits = 15), m.check = 0,
|
|
31109
|
+
m.wbits === 0 && (m.wbits = 15), m.check = 0, $t[0] = 255 & ue, $t[1] = ue >>> 8 & 255, m.check = le(m.check, $t, 2, 0), ue = 0, pe = 0, m.mode = 16181;
|
|
31093
31110
|
break;
|
|
31094
31111
|
}
|
|
31095
31112
|
if (m.head && (m.head.done = !1), !(1 & m.wrap) || (((255 & ue) << 8) + (ue >> 8)) % 31) {
|
|
@@ -31119,26 +31136,26 @@ function tR() {
|
|
|
31119
31136
|
f.msg = "unknown header flags set", m.mode = nr;
|
|
31120
31137
|
break;
|
|
31121
31138
|
}
|
|
31122
|
-
m.head && (m.head.text = ue >> 8 & 1), 512 & m.flags && 4 & m.wrap && (
|
|
31139
|
+
m.head && (m.head.text = ue >> 8 & 1), 512 & m.flags && 4 & m.wrap && ($t[0] = 255 & ue, $t[1] = ue >>> 8 & 255, m.check = le(m.check, $t, 2, 0)), ue = 0, pe = 0, m.mode = 16182;
|
|
31123
31140
|
case 16182:
|
|
31124
31141
|
for (; pe < 32; ) {
|
|
31125
31142
|
if (re === 0) break e;
|
|
31126
31143
|
re--, ue += $[Z++] << pe, pe += 8;
|
|
31127
31144
|
}
|
|
31128
|
-
m.head && (m.head.time = ue), 512 & m.flags && 4 & m.wrap && (
|
|
31145
|
+
m.head && (m.head.time = ue), 512 & m.flags && 4 & m.wrap && ($t[0] = 255 & ue, $t[1] = ue >>> 8 & 255, $t[2] = ue >>> 16 & 255, $t[3] = ue >>> 24 & 255, m.check = le(m.check, $t, 4, 0)), ue = 0, pe = 0, m.mode = 16183;
|
|
31129
31146
|
case 16183:
|
|
31130
31147
|
for (; pe < 16; ) {
|
|
31131
31148
|
if (re === 0) break e;
|
|
31132
31149
|
re--, ue += $[Z++] << pe, pe += 8;
|
|
31133
31150
|
}
|
|
31134
|
-
m.head && (m.head.xflags = 255 & ue, m.head.os = ue >> 8), 512 & m.flags && 4 & m.wrap && (
|
|
31151
|
+
m.head && (m.head.xflags = 255 & ue, m.head.os = ue >> 8), 512 & m.flags && 4 & m.wrap && ($t[0] = 255 & ue, $t[1] = ue >>> 8 & 255, m.check = le(m.check, $t, 2, 0)), ue = 0, pe = 0, m.mode = 16184;
|
|
31135
31152
|
case 16184:
|
|
31136
31153
|
if (1024 & m.flags) {
|
|
31137
31154
|
for (; pe < 16; ) {
|
|
31138
31155
|
if (re === 0) break e;
|
|
31139
31156
|
re--, ue += $[Z++] << pe, pe += 8;
|
|
31140
31157
|
}
|
|
31141
|
-
m.length = ue, m.head && (m.head.extra_len = ue), 512 & m.flags && 4 & m.wrap && (
|
|
31158
|
+
m.length = ue, m.head && (m.head.extra_len = ue), 512 & m.flags && 4 & m.wrap && ($t[0] = 255 & ue, $t[1] = ue >>> 8 & 255, m.check = le(m.check, $t, 2, 0)), ue = 0, pe = 0;
|
|
31142
31159
|
} else m.head && (m.head.extra = null);
|
|
31143
31160
|
m.mode = 16185;
|
|
31144
31161
|
case 16185:
|
|
@@ -31545,7 +31562,7 @@ var mv = gv.exports;
|
|
|
31545
31562
|
return d && typeof Symbol == "function" && d.constructor === Symbol && d !== Symbol.prototype ? "symbol" : typeof d;
|
|
31546
31563
|
}, e(h);
|
|
31547
31564
|
}
|
|
31548
|
-
var t =
|
|
31565
|
+
var t = mn, r = pv(), n = mv;
|
|
31549
31566
|
i.string2binary = function(h) {
|
|
31550
31567
|
for (var d = "", p = 0; p < h.length; p++)
|
|
31551
31568
|
d += String.fromCharCode(h.charCodeAt(p) & 255);
|
|
@@ -31772,7 +31789,7 @@ BA.prototype = {
|
|
|
31772
31789
|
return null;
|
|
31773
31790
|
}
|
|
31774
31791
|
};
|
|
31775
|
-
var zA = BA, nm = {}, kb = Si, Lh =
|
|
31792
|
+
var zA = BA, nm = {}, kb = Si, Lh = mn, aR = mv, td = new Array(256);
|
|
31776
31793
|
for (var Aa = 0; Aa < 256; Aa++)
|
|
31777
31794
|
td[Aa] = Aa >= 252 ? 6 : Aa >= 248 ? 5 : Aa >= 240 ? 4 : Aa >= 224 ? 3 : Aa >= 192 ? 2 : 1;
|
|
31778
31795
|
td[254] = td[254] = 1;
|
|
@@ -31909,7 +31926,7 @@ function L2(i, e) {
|
|
|
31909
31926
|
for (var t = 0, r = Array(e); t < e; t++) r[t] = i[t];
|
|
31910
31927
|
return r;
|
|
31911
31928
|
}
|
|
31912
|
-
var gR =
|
|
31929
|
+
var gR = mn, Jt = Si, bv = sR, Db = Eo, mR = Ti, HA = Vf, Pb = pv(), cg = zA, bR = mv, Tu = nm, vR = cR, yR = dR;
|
|
31913
31930
|
function $A(i) {
|
|
31914
31931
|
if (i._data instanceof cg && (i._data = i._data.getContent(), i.options.binary = !0, i.options.base64 = !1, Jt.getTypeOf(i._data) === "uint8array")) {
|
|
31915
31932
|
var e = i._data;
|
|
@@ -32387,7 +32404,7 @@ wv.prototype.readData = function(i) {
|
|
|
32387
32404
|
var e = this.data.slice(this.zero + this.index, this.zero + this.index + i);
|
|
32388
32405
|
return this.index += i, e;
|
|
32389
32406
|
};
|
|
32390
|
-
var IR = wv, n0 = ZA, Ri = Si, NR = zA, Do = WA, MR =
|
|
32407
|
+
var IR = wv, n0 = ZA, Ri = Si, NR = zA, Do = WA, MR = mn, LR = 0, OR = 3;
|
|
32391
32408
|
function JA(i, e) {
|
|
32392
32409
|
this.options = i, this.loadOptions = e;
|
|
32393
32410
|
}
|
|
@@ -32541,7 +32558,7 @@ JA.prototype = {
|
|
|
32541
32558
|
return null;
|
|
32542
32559
|
}
|
|
32543
32560
|
};
|
|
32544
|
-
var FR = JA, BR = ZA, zR = IR, jR = QA, UR = KA, Vn = Si, Ii = Eo, HR = FR, vp =
|
|
32561
|
+
var FR = JA, BR = ZA, zR = IR, jR = QA, UR = KA, Vn = Si, Ii = Eo, HR = FR, vp = mn;
|
|
32545
32562
|
function eE(i, e) {
|
|
32546
32563
|
this.files = [], this.loadOptions = e, i && this.load(i);
|
|
32547
32564
|
}
|
|
@@ -32741,7 +32758,7 @@ Un.isRegExp = function(i) {
|
|
|
32741
32758
|
return s;
|
|
32742
32759
|
};
|
|
32743
32760
|
}
|
|
32744
|
-
t.prototype = WA, t.prototype.load = XR, t.support =
|
|
32761
|
+
t.prototype = WA, t.prototype.load = XR, t.support = mn, t.defaults = Ti, t.utils = Un, t.base64 = {
|
|
32745
32762
|
/**
|
|
32746
32763
|
* @deprecated
|
|
32747
32764
|
* This method will be removed in a future version without replacement.
|
|
@@ -38369,7 +38386,7 @@ class w5 {
|
|
|
38369
38386
|
this.checkboxData = { ...this.checkboxData, ...e };
|
|
38370
38387
|
}
|
|
38371
38388
|
}
|
|
38372
|
-
let
|
|
38389
|
+
let wn = {}, W2 = {};
|
|
38373
38390
|
const L5 = ({
|
|
38374
38391
|
docxUrl: i,
|
|
38375
38392
|
schema: e,
|
|
@@ -38378,14 +38395,14 @@ const L5 = ({
|
|
|
38378
38395
|
onSaveRef: n,
|
|
38379
38396
|
readonly: s = !1
|
|
38380
38397
|
}) => {
|
|
38381
|
-
const [a, o] =
|
|
38398
|
+
const [a, o] = gn([]), [l, c] = gn(!0), [h, d] = gn(null), [p, g] = gn(0), w = Wi(null), b = gr((fe) => {
|
|
38382
38399
|
const K = /\{([^}]+)\}/g, be = [];
|
|
38383
38400
|
let te;
|
|
38384
38401
|
for (; (te = K.exec(fe)) !== null; )
|
|
38385
38402
|
be.push(te[1]);
|
|
38386
38403
|
return [...new Set(be)];
|
|
38387
38404
|
}, []), y = gr((fe, K) => {
|
|
38388
|
-
|
|
38405
|
+
wn = { ...wn, [fe]: K }, E(fe, K), t == null || t(wn);
|
|
38389
38406
|
}, [t]), v = gr(
|
|
38390
38407
|
(fe, K) => {
|
|
38391
38408
|
!Object.entries(e.properties || {}).find(([te, j]) => {
|
|
@@ -38419,13 +38436,13 @@ const L5 = ({
|
|
|
38419
38436
|
},
|
|
38420
38437
|
[A]
|
|
38421
38438
|
), _ = gr(() => {
|
|
38422
|
-
!!w.current && Object.entries(
|
|
38439
|
+
!!w.current && Object.entries(wn).forEach(([K, be]) => {
|
|
38423
38440
|
E(K, be);
|
|
38424
38441
|
});
|
|
38425
38442
|
}, [E]), C = gr(async () => {
|
|
38426
|
-
t == null || t(
|
|
38443
|
+
t == null || t(wn), g((fe) => fe + 1);
|
|
38427
38444
|
}, [t]);
|
|
38428
|
-
|
|
38445
|
+
Ut(() => {
|
|
38429
38446
|
n && (n.current = C);
|
|
38430
38447
|
}, [C, n]);
|
|
38431
38448
|
const I = gr(
|
|
@@ -38468,10 +38485,10 @@ const L5 = ({
|
|
|
38468
38485
|
(fe, K, be, te) => {
|
|
38469
38486
|
const j = document.createElement("span");
|
|
38470
38487
|
j.className = "inline-field-container", j.setAttribute("data-field-path", fe);
|
|
38471
|
-
const ie = s, ae = K ||
|
|
38488
|
+
const ie = s, ae = K || wn[fe] || "", H = () => {
|
|
38472
38489
|
const U = be.type === "boolean" ? (() => {
|
|
38473
38490
|
const B = document.createElement("span");
|
|
38474
|
-
return B.textContent = ae === "true" ||
|
|
38491
|
+
return B.textContent = ae === "true" || wn[fe] === !0 ? "☑" : "☐", B.className = "inline-checkbox-readonly", B;
|
|
38475
38492
|
})() : (() => {
|
|
38476
38493
|
const B = "__NEWLINE__", F = String(ae).replace(
|
|
38477
38494
|
new RegExp(B, "g"),
|
|
@@ -38483,7 +38500,7 @@ const L5 = ({
|
|
|
38483
38500
|
return j.appendChild(U), j;
|
|
38484
38501
|
}, se = () => {
|
|
38485
38502
|
const x = document.createElement("input");
|
|
38486
|
-
return x.type = "checkbox", x.checked = K === "true" ||
|
|
38503
|
+
return x.type = "checkbox", x.checked = K === "true" || wn[fe] === !0, x.className = "inline-checkbox rounded border-gray-300 text-green-600 focus:ring-green-500", x.setAttribute("data-field-path", fe), x.addEventListener("change", (U) => {
|
|
38487
38504
|
y(fe, U.target.checked);
|
|
38488
38505
|
}), j.appendChild(x), j;
|
|
38489
38506
|
}, le = () => {
|
|
@@ -38492,18 +38509,18 @@ const L5 = ({
|
|
|
38492
38509
|
const U = document.createElement("option");
|
|
38493
38510
|
return U.value = "", U.textContent = "Select...", x.appendChild(U), be.enum.forEach((B) => {
|
|
38494
38511
|
const F = document.createElement("option");
|
|
38495
|
-
F.value = String(B), F.textContent = String(B), F.selected = K === B ||
|
|
38512
|
+
F.value = String(B), F.textContent = String(B), F.selected = K === B || wn[fe] === B, x.appendChild(F);
|
|
38496
38513
|
}), x.addEventListener("change", (B) => {
|
|
38497
38514
|
y(fe, B.target.value);
|
|
38498
38515
|
}), j.appendChild(x), j;
|
|
38499
38516
|
}, oe = () => {
|
|
38500
38517
|
const x = document.createElement("input");
|
|
38501
|
-
return x.type = be.format === "date" ? "date" : "datetime-local", x.value = String(K ||
|
|
38518
|
+
return x.type = be.format === "date" ? "date" : "datetime-local", x.value = String(K || wn[fe] || ""), x.className = "inline-date-input text-sm focus:outline-none", x.setAttribute("data-field-path", fe), x.style.width = "100%", x.style.maxWidth = "200px", x.placeholder = String(be.description || fe), x.addEventListener("input", (U) => {
|
|
38502
38519
|
y(fe, U.target.value);
|
|
38503
38520
|
}), j.appendChild(x), j;
|
|
38504
38521
|
}, ce = () => {
|
|
38505
38522
|
const x = "__NEWLINE__", U = String(
|
|
38506
|
-
K ||
|
|
38523
|
+
K || wn[fe] || ""
|
|
38507
38524
|
).replace(new RegExp(x, "g"), `
|
|
38508
38525
|
`), B = document.createElement("textarea");
|
|
38509
38526
|
B.value = U, B.className = "inline-textarea text-sm focus:outline-none resize-none", B.setAttribute("data-field-path", fe), B.style.width = "100%", B.style.minHeight = "17px", B.style.overflow = "hidden", B.placeholder = String(be.description || fe), B.rows = 1;
|
|
@@ -38637,7 +38654,7 @@ const L5 = ({
|
|
|
38637
38654
|
ae[se] = ce() || Ae() || Se() || "";
|
|
38638
38655
|
});
|
|
38639
38656
|
const H = { ...ae, ...r };
|
|
38640
|
-
|
|
38657
|
+
wn = H, W2 = { ...H }, d(null);
|
|
38641
38658
|
} catch (fe) {
|
|
38642
38659
|
d(
|
|
38643
38660
|
`Failed to load document: ${fe instanceof Error ? fe.message : "Unknown error"}`
|
|
@@ -38646,12 +38663,12 @@ const L5 = ({
|
|
|
38646
38663
|
c(!1);
|
|
38647
38664
|
}
|
|
38648
38665
|
}, [i, e, b, r]);
|
|
38649
|
-
|
|
38666
|
+
Ut(() => {
|
|
38650
38667
|
z();
|
|
38651
|
-
}, [z]),
|
|
38652
|
-
!l && Object.keys(
|
|
38653
|
-
}, [l, R]),
|
|
38654
|
-
p > 0 && !!w.current && R(
|
|
38668
|
+
}, [z]), Ut(() => {
|
|
38669
|
+
!l && Object.keys(wn).length > 0 && !!w.current && R(wn);
|
|
38670
|
+
}, [l, R]), Ut(() => {
|
|
38671
|
+
p > 0 && !!w.current && R(wn);
|
|
38655
38672
|
}, [p, R]);
|
|
38656
38673
|
const q = () => /* @__PURE__ */ ve.jsx("div", { className: "flex items-center justify-center p-8", children: /* @__PURE__ */ ve.jsx("div", { className: "text-body", children: "Loading document..." }) }), O = () => /* @__PURE__ */ ve.jsxs("div", { className: "bg-red-50 border border-red-200 rounded-md p-4", children: [
|
|
38657
38674
|
/* @__PURE__ */ ve.jsx("div", { className: "text-red-800 text-body-em", children: "Error" }),
|