@tenancy.nz/chat-ui 0.1.46 → 0.1.47
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/esm/index.js +268 -265
- package/dist/esm/index.js.map +1 -1
- package/package.json +1 -1
package/dist/esm/index.js
CHANGED
|
@@ -84,16 +84,16 @@ function $w() {
|
|
|
84
84
|
De.unshift("Warning: " + q), Function.prototype.apply.call(console[R], console, De);
|
|
85
85
|
}
|
|
86
86
|
}
|
|
87
|
-
var P = !1, _ = !1, E = !1, O = !1,
|
|
87
|
+
var P = !1, _ = !1, E = !1, O = !1, H = !1, j;
|
|
88
88
|
j = Symbol.for("react.module.reference");
|
|
89
89
|
function I(R) {
|
|
90
|
-
return !!(typeof R == "string" || typeof R == "function" || R === i || R === s ||
|
|
90
|
+
return !!(typeof R == "string" || typeof R == "function" || R === i || R === s || H || R === r || R === u || R === h || O || R === p || P || _ || E || typeof R == "object" && R !== null && (R.$$typeof === f || R.$$typeof === d || R.$$typeof === o || R.$$typeof === a || R.$$typeof === l || // This needs to include all possible module reference object
|
|
91
91
|
// types supported by any Flight configuration anywhere since
|
|
92
92
|
// we don't know which Flight build this will end up being used
|
|
93
93
|
// with.
|
|
94
94
|
R.$$typeof === j || R.getModuleId !== void 0));
|
|
95
95
|
}
|
|
96
|
-
function
|
|
96
|
+
function B(R, q, J) {
|
|
97
97
|
var re = R.displayName;
|
|
98
98
|
if (re)
|
|
99
99
|
return re;
|
|
@@ -103,7 +103,7 @@ function $w() {
|
|
|
103
103
|
function N(R) {
|
|
104
104
|
return R.displayName || "Context";
|
|
105
105
|
}
|
|
106
|
-
function
|
|
106
|
+
function $(R) {
|
|
107
107
|
if (R == null)
|
|
108
108
|
return null;
|
|
109
109
|
if (typeof R.tag == "number" && x("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."), typeof R == "function")
|
|
@@ -133,14 +133,14 @@ function $w() {
|
|
|
133
133
|
var J = R;
|
|
134
134
|
return N(J._context) + ".Provider";
|
|
135
135
|
case l:
|
|
136
|
-
return
|
|
136
|
+
return B(R, R.render, "ForwardRef");
|
|
137
137
|
case d:
|
|
138
138
|
var re = R.displayName || null;
|
|
139
|
-
return re !== null ? re :
|
|
139
|
+
return re !== null ? re : $(R.type) || "Memo";
|
|
140
140
|
case f: {
|
|
141
141
|
var Ee = R, De = Ee._payload, Re = Ee._init;
|
|
142
142
|
try {
|
|
143
|
-
return
|
|
143
|
+
return $(Re(De));
|
|
144
144
|
} catch {
|
|
145
145
|
return null;
|
|
146
146
|
}
|
|
@@ -497,7 +497,7 @@ function $w() {
|
|
|
497
497
|
function V() {
|
|
498
498
|
{
|
|
499
499
|
if (Nt.current) {
|
|
500
|
-
var R =
|
|
500
|
+
var R = $(Nt.current.type);
|
|
501
501
|
if (R)
|
|
502
502
|
return `
|
|
503
503
|
|
|
@@ -532,7 +532,7 @@ Check the top-level render call using <` + J + ">.");
|
|
|
532
532
|
return;
|
|
533
533
|
Te[J] = !0;
|
|
534
534
|
var re = "";
|
|
535
|
-
R && R._owner && R._owner !== Nt.current && (re = " It was passed a child from " +
|
|
535
|
+
R && R._owner && R._owner !== Nt.current && (re = " It was passed a child from " + $(R._owner.type) + "."), Ji(R), x('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', J, re), Ji(null);
|
|
536
536
|
}
|
|
537
537
|
}
|
|
538
538
|
function St(R, q) {
|
|
@@ -569,11 +569,11 @@ Check the top-level render call using <` + J + ">.");
|
|
|
569
569
|
else
|
|
570
570
|
return;
|
|
571
571
|
if (J) {
|
|
572
|
-
var re =
|
|
572
|
+
var re = $(q);
|
|
573
573
|
ct(J, R.props, "prop", re, R);
|
|
574
574
|
} else if (q.PropTypes !== void 0 && !ds) {
|
|
575
575
|
ds = !0;
|
|
576
|
-
var Ee =
|
|
576
|
+
var Ee = $(q);
|
|
577
577
|
x("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", Ee || "Unknown");
|
|
578
578
|
}
|
|
579
579
|
typeof q.getDefaultProps == "function" && !q.getDefaultProps.isReactClassApproved && x("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
|
|
@@ -601,7 +601,7 @@ Check the top-level render call using <` + J + ">.");
|
|
|
601
601
|
var An = de();
|
|
602
602
|
An ? je += An : je += V();
|
|
603
603
|
var Ct;
|
|
604
|
-
R === null ? Ct = "null" : Ei(R) ? Ct = "array" : R !== void 0 && R.$$typeof === e ? (Ct = "<" + (
|
|
604
|
+
R === null ? Ct = "null" : Ei(R) ? Ct = "array" : R !== void 0 && R.$$typeof === e ? (Ct = "<" + ($(R.type) || "Unknown") + " />", je = " Did you accidentally export a JSX literal instead of a component?") : Ct = typeof R, x("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", Ct, je);
|
|
605
605
|
}
|
|
606
606
|
var Rt = Ki(R, q, J, Ee, De);
|
|
607
607
|
if (Rt == null)
|
|
@@ -620,7 +620,7 @@ Check the top-level render call using <` + J + ">.");
|
|
|
620
620
|
St(hi, R);
|
|
621
621
|
}
|
|
622
622
|
if (sn.call(q, "key")) {
|
|
623
|
-
var so =
|
|
623
|
+
var so = $(R), Ln = Object.keys(q).filter(function(Dw) {
|
|
624
624
|
return Dw !== "key";
|
|
625
625
|
}), If = Ln.length > 0 ? "{key: someKey, " + Ln.join(": ..., ") + ": ...}" : "{key: someKey}";
|
|
626
626
|
if (!wn[so + If]) {
|
|
@@ -793,7 +793,7 @@ function Uw(n = {}) {
|
|
|
793
793
|
});
|
|
794
794
|
},
|
|
795
795
|
async chatStream(o, a, l) {
|
|
796
|
-
var v, b, x, k, P, _, E, O,
|
|
796
|
+
var v, b, x, k, P, _, E, O, H;
|
|
797
797
|
const u = `${e}/messages`, h = await this.buildAuthHeaders(), d = await fetch(u, {
|
|
798
798
|
method: "POST",
|
|
799
799
|
headers: {
|
|
@@ -821,14 +821,14 @@ function Uw(n = {}) {
|
|
|
821
821
|
const { done: j, value: I } = await f.read();
|
|
822
822
|
if (j) break;
|
|
823
823
|
g += p.decode(I, { stream: !0 });
|
|
824
|
-
const
|
|
824
|
+
const B = g.split(`
|
|
825
825
|
`);
|
|
826
|
-
g =
|
|
827
|
-
for (const N of
|
|
828
|
-
const
|
|
829
|
-
if (
|
|
826
|
+
g = B.pop() || "";
|
|
827
|
+
for (const N of B) {
|
|
828
|
+
const $ = N.trimEnd();
|
|
829
|
+
if ($ && !$.startsWith(":") && $.startsWith("data: "))
|
|
830
830
|
try {
|
|
831
|
-
const M = JSON.parse(
|
|
831
|
+
const M = JSON.parse($.slice(6));
|
|
832
832
|
switch (M.type) {
|
|
833
833
|
case "metadata":
|
|
834
834
|
(b = a.onMetadata) == null || b.call(a, M.sources, { messageId: M.messageId });
|
|
@@ -858,7 +858,7 @@ function Uw(n = {}) {
|
|
|
858
858
|
if (g.startsWith("data: "))
|
|
859
859
|
try {
|
|
860
860
|
const j = JSON.parse(g.slice(6));
|
|
861
|
-
j.type === "text" && ((_ = a.onText) == null || _.call(a, j.content)), j.type === "metadata" && ((E = a.onMetadata) == null || E.call(a, j.sources)), j.type === "complete" && ((O = a.onComplete) == null || O.call(a, j.usage), m = !0), j.type === "error" && ((
|
|
861
|
+
j.type === "text" && ((_ = a.onText) == null || _.call(a, j.content)), j.type === "metadata" && ((E = a.onMetadata) == null || E.call(a, j.sources)), j.type === "complete" && ((O = a.onComplete) == null || O.call(a, j.usage), m = !0), j.type === "error" && ((H = a.onError) == null || H.call(a, j.message), m = !0);
|
|
862
862
|
} catch {
|
|
863
863
|
}
|
|
864
864
|
} finally {
|
|
@@ -1475,7 +1475,7 @@ function N1() {
|
|
|
1475
1475
|
}
|
|
1476
1476
|
}
|
|
1477
1477
|
}
|
|
1478
|
-
var _ = l, E = u, O = a,
|
|
1478
|
+
var _ = l, E = u, O = a, H = o, j = e, I = h, B = i, N = g, $ = p, M = t, W = s, L = r, D = d, ie = !1;
|
|
1479
1479
|
function pe(te) {
|
|
1480
1480
|
return ie || (ie = !0, console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")), S(te) || P(te) === l;
|
|
1481
1481
|
}
|
|
@@ -1515,7 +1515,7 @@ function N1() {
|
|
|
1515
1515
|
function rt(te) {
|
|
1516
1516
|
return P(te) === d;
|
|
1517
1517
|
}
|
|
1518
|
-
Qe.AsyncMode = _, Qe.ConcurrentMode = E, Qe.ContextConsumer = O, Qe.ContextProvider =
|
|
1518
|
+
Qe.AsyncMode = _, Qe.ConcurrentMode = E, Qe.ContextConsumer = O, Qe.ContextProvider = H, Qe.Element = j, Qe.ForwardRef = I, Qe.Fragment = B, Qe.Lazy = N, Qe.Memo = $, Qe.Portal = M, Qe.Profiler = W, Qe.StrictMode = L, Qe.Suspense = D, Qe.isAsyncMode = pe, Qe.isConcurrentMode = S, Qe.isContextConsumer = U, Qe.isContextProvider = ee, Qe.isElement = C, Qe.isForwardRef = Q, Qe.isFragment = fe, Qe.isLazy = G, Qe.isMemo = Z, Qe.isPortal = he, Qe.isProfiler = Ae, Qe.isStrictMode = xe, Qe.isSuspense = rt, Qe.isValidElementType = k, Qe.typeOf = P;
|
|
1519
1519
|
}()), Qe;
|
|
1520
1520
|
}
|
|
1521
1521
|
var Zm;
|
|
@@ -1672,11 +1672,11 @@ function j1() {
|
|
|
1672
1672
|
elementType: _(),
|
|
1673
1673
|
instanceOf: E,
|
|
1674
1674
|
node: I(),
|
|
1675
|
-
objectOf:
|
|
1675
|
+
objectOf: H,
|
|
1676
1676
|
oneOf: O,
|
|
1677
1677
|
oneOfType: j,
|
|
1678
1678
|
shape: N,
|
|
1679
|
-
exact:
|
|
1679
|
+
exact: $
|
|
1680
1680
|
};
|
|
1681
1681
|
function g(S, U) {
|
|
1682
1682
|
return S === U ? S !== 0 || 1 / S === 1 / U : S !== S && U !== U;
|
|
@@ -1792,7 +1792,7 @@ function j1() {
|
|
|
1792
1792
|
}
|
|
1793
1793
|
return v(U);
|
|
1794
1794
|
}
|
|
1795
|
-
function
|
|
1795
|
+
function H(S) {
|
|
1796
1796
|
function U(ee, C, Q, fe, G) {
|
|
1797
1797
|
if (typeof S != "function")
|
|
1798
1798
|
return new m("Property `" + G + "` of component `" + Q + "` has invalid PropType notation inside objectOf.");
|
|
@@ -1837,7 +1837,7 @@ function j1() {
|
|
|
1837
1837
|
}
|
|
1838
1838
|
return v(S);
|
|
1839
1839
|
}
|
|
1840
|
-
function
|
|
1840
|
+
function B(S, U, ee, C, Q) {
|
|
1841
1841
|
return new m(
|
|
1842
1842
|
(S || "React class") + ": " + U + " type `" + ee + "." + C + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + Q + "`."
|
|
1843
1843
|
);
|
|
@@ -1850,7 +1850,7 @@ function j1() {
|
|
|
1850
1850
|
for (var Ae in S) {
|
|
1851
1851
|
var xe = S[Ae];
|
|
1852
1852
|
if (typeof xe != "function")
|
|
1853
|
-
return
|
|
1853
|
+
return B(Q, fe, G, Ae, D(xe));
|
|
1854
1854
|
var rt = xe(Z, Ae, Q, fe, G + "." + Ae, t);
|
|
1855
1855
|
if (rt)
|
|
1856
1856
|
return rt;
|
|
@@ -1859,7 +1859,7 @@ function j1() {
|
|
|
1859
1859
|
}
|
|
1860
1860
|
return v(U);
|
|
1861
1861
|
}
|
|
1862
|
-
function
|
|
1862
|
+
function $(S) {
|
|
1863
1863
|
function U(ee, C, Q, fe, G) {
|
|
1864
1864
|
var Z = ee[C], he = L(Z);
|
|
1865
1865
|
if (he !== "object")
|
|
@@ -1868,7 +1868,7 @@ function j1() {
|
|
|
1868
1868
|
for (var xe in Ae) {
|
|
1869
1869
|
var rt = S[xe];
|
|
1870
1870
|
if (i(S, xe) && typeof rt != "function")
|
|
1871
|
-
return
|
|
1871
|
+
return B(Q, fe, G, xe, D(rt));
|
|
1872
1872
|
if (!rt)
|
|
1873
1873
|
return new m(
|
|
1874
1874
|
"Invalid " + fe + " `" + G + "` key `" + xe + "` supplied to `" + Q + "`.\nBad object: " + JSON.stringify(ee[C], null, " ") + `
|
|
@@ -5243,7 +5243,7 @@ var zS = jS, BS = class extends qe.Component {
|
|
|
5243
5243
|
type: $i.TARGET_NOT_FOUND,
|
|
5244
5244
|
step: P
|
|
5245
5245
|
}));
|
|
5246
|
-
const
|
|
5246
|
+
const H = {
|
|
5247
5247
|
...this.state,
|
|
5248
5248
|
index: r,
|
|
5249
5249
|
step: P
|
|
@@ -5256,7 +5256,7 @@ var zS = jS, BS = class extends qe.Component {
|
|
|
5256
5256
|
]) && x("status", Be.PAUSED)) {
|
|
5257
5257
|
const I = Ra(this.props, u[e.index]);
|
|
5258
5258
|
this.callback({
|
|
5259
|
-
...
|
|
5259
|
+
...H,
|
|
5260
5260
|
index: e.index,
|
|
5261
5261
|
lifecycle: _e.COMPLETE,
|
|
5262
5262
|
step: I,
|
|
@@ -5266,23 +5266,23 @@ var zS = jS, BS = class extends qe.Component {
|
|
|
5266
5266
|
if (x("status", [Be.FINISHED, Be.SKIPPED])) {
|
|
5267
5267
|
const I = Ra(this.props, u[e.index]);
|
|
5268
5268
|
i || this.callback({
|
|
5269
|
-
...
|
|
5269
|
+
...H,
|
|
5270
5270
|
index: e.index,
|
|
5271
5271
|
lifecycle: _e.COMPLETE,
|
|
5272
5272
|
step: I,
|
|
5273
5273
|
type: $i.STEP_AFTER
|
|
5274
5274
|
}), this.callback({
|
|
5275
|
-
...
|
|
5275
|
+
...H,
|
|
5276
5276
|
type: $i.TOUR_END,
|
|
5277
5277
|
// Return the last step when the tour is finished
|
|
5278
5278
|
step: I,
|
|
5279
5279
|
index: e.index
|
|
5280
5280
|
}), f();
|
|
5281
5281
|
} else k("status", [Be.IDLE, Be.READY], Be.RUNNING) ? this.callback({
|
|
5282
|
-
...
|
|
5282
|
+
...H,
|
|
5283
5283
|
type: $i.TOUR_START
|
|
5284
5284
|
}) : (x("status") || x("action", Ze.RESET)) && this.callback({
|
|
5285
|
-
...
|
|
5285
|
+
...H,
|
|
5286
5286
|
type: $i.TOUR_STATUS
|
|
5287
5287
|
});
|
|
5288
5288
|
this.scrollToStep(e);
|
|
@@ -7587,11 +7587,11 @@ function fE(n) {
|
|
|
7587
7587
|
)
|
|
7588
7588
|
return;
|
|
7589
7589
|
const O = e.events.length;
|
|
7590
|
-
let
|
|
7591
|
-
for (;
|
|
7592
|
-
if (e.events[
|
|
7590
|
+
let H = O, j, I;
|
|
7591
|
+
for (; H--; )
|
|
7592
|
+
if (e.events[H][0] === "exit" && e.events[H][1].type === "chunkFlow") {
|
|
7593
7593
|
if (j) {
|
|
7594
|
-
I = e.events[
|
|
7594
|
+
I = e.events[H][1].end;
|
|
7595
7595
|
break;
|
|
7596
7596
|
}
|
|
7597
7597
|
j = !0;
|
|
@@ -7600,7 +7600,7 @@ function fE(n) {
|
|
|
7600
7600
|
e.events[E][1].end = {
|
|
7601
7601
|
...I
|
|
7602
7602
|
}, E++;
|
|
7603
|
-
li(e.events,
|
|
7603
|
+
li(e.events, H + 1, 0, e.events.slice(O)), e.events.length = E;
|
|
7604
7604
|
}
|
|
7605
7605
|
}
|
|
7606
7606
|
function b(k) {
|
|
@@ -7896,23 +7896,23 @@ function EE(n, e, t) {
|
|
|
7896
7896
|
function P(E) {
|
|
7897
7897
|
return n.exit("codeFenced"), e(E);
|
|
7898
7898
|
}
|
|
7899
|
-
function _(E, O,
|
|
7899
|
+
function _(E, O, H) {
|
|
7900
7900
|
let j = 0;
|
|
7901
7901
|
return I;
|
|
7902
7902
|
function I(W) {
|
|
7903
|
-
return E.enter("lineEnding"), E.consume(W), E.exit("lineEnding"),
|
|
7903
|
+
return E.enter("lineEnding"), E.consume(W), E.exit("lineEnding"), B;
|
|
7904
7904
|
}
|
|
7905
|
-
function
|
|
7905
|
+
function B(W) {
|
|
7906
7906
|
return E.enter("codeFencedFence"), He(W) ? Ge(E, N, "linePrefix", i.parser.constructs.disable.null.includes("codeIndented") ? void 0 : 4)(W) : N(W);
|
|
7907
7907
|
}
|
|
7908
7908
|
function N(W) {
|
|
7909
|
-
return W === a ? (E.enter("codeFencedFenceSequence"),
|
|
7909
|
+
return W === a ? (E.enter("codeFencedFenceSequence"), $(W)) : H(W);
|
|
7910
7910
|
}
|
|
7911
|
-
function
|
|
7912
|
-
return W === a ? (j++, E.consume(W),
|
|
7911
|
+
function $(W) {
|
|
7912
|
+
return W === a ? (j++, E.consume(W), $) : j >= o ? (E.exit("codeFencedFenceSequence"), He(W) ? Ge(E, M, "whitespace")(W) : M(W)) : H(W);
|
|
7913
7913
|
}
|
|
7914
7914
|
function M(W) {
|
|
7915
|
-
return W === null || ve(W) ? (E.exit("codeFencedFence"), O(W)) :
|
|
7915
|
+
return W === null || ve(W) ? (E.exit("codeFencedFence"), O(W)) : H(W);
|
|
7916
7916
|
}
|
|
7917
7917
|
}
|
|
7918
7918
|
}
|
|
@@ -8602,34 +8602,34 @@ function tC(n, e, t) {
|
|
|
8602
8602
|
return C === 61 ? (n.consume(C), E) : He(C) ? (n.consume(C), _) : k(C);
|
|
8603
8603
|
}
|
|
8604
8604
|
function E(C) {
|
|
8605
|
-
return C === null || C === 60 || C === 61 || C === 62 || C === 96 ? t(C) : C === 34 || C === 39 ? (n.consume(C), l = C, O) : He(C) ? (n.consume(C), E) :
|
|
8605
|
+
return C === null || C === 60 || C === 61 || C === 62 || C === 96 ? t(C) : C === 34 || C === 39 ? (n.consume(C), l = C, O) : He(C) ? (n.consume(C), E) : H(C);
|
|
8606
8606
|
}
|
|
8607
8607
|
function O(C) {
|
|
8608
8608
|
return C === l ? (n.consume(C), l = null, j) : C === null || ve(C) ? t(C) : (n.consume(C), O);
|
|
8609
8609
|
}
|
|
8610
|
-
function
|
|
8611
|
-
return C === null || C === 34 || C === 39 || C === 47 || C === 60 || C === 61 || C === 62 || C === 96 || dt(C) ? _(C) : (n.consume(C),
|
|
8610
|
+
function H(C) {
|
|
8611
|
+
return C === null || C === 34 || C === 39 || C === 47 || C === 60 || C === 61 || C === 62 || C === 96 || dt(C) ? _(C) : (n.consume(C), H);
|
|
8612
8612
|
}
|
|
8613
8613
|
function j(C) {
|
|
8614
8614
|
return C === 47 || C === 62 || He(C) ? k(C) : t(C);
|
|
8615
8615
|
}
|
|
8616
8616
|
function I(C) {
|
|
8617
|
-
return C === 62 ? (n.consume(C),
|
|
8617
|
+
return C === 62 ? (n.consume(C), B) : t(C);
|
|
8618
8618
|
}
|
|
8619
|
-
function
|
|
8620
|
-
return C === null || ve(C) ? N(C) : He(C) ? (n.consume(C),
|
|
8619
|
+
function B(C) {
|
|
8620
|
+
return C === null || ve(C) ? N(C) : He(C) ? (n.consume(C), B) : t(C);
|
|
8621
8621
|
}
|
|
8622
8622
|
function N(C) {
|
|
8623
|
-
return C === 45 && r === 2 ? (n.consume(C), L) : C === 60 && r === 1 ? (n.consume(C), D) : C === 62 && r === 4 ? (n.consume(C), U) : C === 63 && r === 3 ? (n.consume(C), S) : C === 93 && r === 5 ? (n.consume(C), pe) : ve(C) && (r === 6 || r === 7) ? (n.exit("htmlFlowData"), n.check(QE, ee,
|
|
8623
|
+
return C === 45 && r === 2 ? (n.consume(C), L) : C === 60 && r === 1 ? (n.consume(C), D) : C === 62 && r === 4 ? (n.consume(C), U) : C === 63 && r === 3 ? (n.consume(C), S) : C === 93 && r === 5 ? (n.consume(C), pe) : ve(C) && (r === 6 || r === 7) ? (n.exit("htmlFlowData"), n.check(QE, ee, $)(C)) : C === null || ve(C) ? (n.exit("htmlFlowData"), $(C)) : (n.consume(C), N);
|
|
8624
8624
|
}
|
|
8625
|
-
function
|
|
8625
|
+
function $(C) {
|
|
8626
8626
|
return n.check(ZE, M, ee)(C);
|
|
8627
8627
|
}
|
|
8628
8628
|
function M(C) {
|
|
8629
8629
|
return n.enter("lineEnding"), n.consume(C), n.exit("lineEnding"), W;
|
|
8630
8630
|
}
|
|
8631
8631
|
function W(C) {
|
|
8632
|
-
return C === null || ve(C) ?
|
|
8632
|
+
return C === null || ve(C) ? $(C) : (n.enter("htmlFlowData"), N(C));
|
|
8633
8633
|
}
|
|
8634
8634
|
function L(C) {
|
|
8635
8635
|
return C === 45 ? (n.consume(C), S) : N(C);
|
|
@@ -8685,7 +8685,7 @@ function sC(n, e, t) {
|
|
|
8685
8685
|
return n.enter("htmlText"), n.enter("htmlTextData"), n.consume(S), l;
|
|
8686
8686
|
}
|
|
8687
8687
|
function l(S) {
|
|
8688
|
-
return S === 33 ? (n.consume(S), u) : S === 47 ? (n.consume(S), _) : S === 63 ? (n.consume(S), k) : Pn(S) ? (n.consume(S),
|
|
8688
|
+
return S === 33 ? (n.consume(S), u) : S === 47 ? (n.consume(S), _) : S === 63 ? (n.consume(S), k) : Pn(S) ? (n.consume(S), H) : t(S);
|
|
8689
8689
|
}
|
|
8690
8690
|
function u(S) {
|
|
8691
8691
|
return S === 45 ? (n.consume(S), h) : S === 91 ? (n.consume(S), s = 0, g) : Pn(S) ? (n.consume(S), x) : t(S);
|
|
@@ -8733,23 +8733,23 @@ function sC(n, e, t) {
|
|
|
8733
8733
|
function O(S) {
|
|
8734
8734
|
return ve(S) ? (o = O, D(S)) : He(S) ? (n.consume(S), O) : L(S);
|
|
8735
8735
|
}
|
|
8736
|
-
function
|
|
8737
|
-
return S === 45 || vn(S) ? (n.consume(S),
|
|
8736
|
+
function H(S) {
|
|
8737
|
+
return S === 45 || vn(S) ? (n.consume(S), H) : S === 47 || S === 62 || dt(S) ? j(S) : t(S);
|
|
8738
8738
|
}
|
|
8739
8739
|
function j(S) {
|
|
8740
8740
|
return S === 47 ? (n.consume(S), L) : S === 58 || S === 95 || Pn(S) ? (n.consume(S), I) : ve(S) ? (o = j, D(S)) : He(S) ? (n.consume(S), j) : L(S);
|
|
8741
8741
|
}
|
|
8742
8742
|
function I(S) {
|
|
8743
|
-
return S === 45 || S === 46 || S === 58 || S === 95 || vn(S) ? (n.consume(S), I) :
|
|
8743
|
+
return S === 45 || S === 46 || S === 58 || S === 95 || vn(S) ? (n.consume(S), I) : B(S);
|
|
8744
8744
|
}
|
|
8745
|
-
function
|
|
8746
|
-
return S === 61 ? (n.consume(S), N) : ve(S) ? (o =
|
|
8745
|
+
function B(S) {
|
|
8746
|
+
return S === 61 ? (n.consume(S), N) : ve(S) ? (o = B, D(S)) : He(S) ? (n.consume(S), B) : j(S);
|
|
8747
8747
|
}
|
|
8748
8748
|
function N(S) {
|
|
8749
|
-
return S === null || S === 60 || S === 61 || S === 62 || S === 96 ? t(S) : S === 34 || S === 39 ? (n.consume(S), r = S,
|
|
8749
|
+
return S === null || S === 60 || S === 61 || S === 62 || S === 96 ? t(S) : S === 34 || S === 39 ? (n.consume(S), r = S, $) : ve(S) ? (o = N, D(S)) : He(S) ? (n.consume(S), N) : (n.consume(S), M);
|
|
8750
8750
|
}
|
|
8751
|
-
function
|
|
8752
|
-
return S === r ? (n.consume(S), r = void 0, W) : S === null ? t(S) : ve(S) ? (o =
|
|
8751
|
+
function $(S) {
|
|
8752
|
+
return S === r ? (n.consume(S), r = void 0, W) : S === null ? t(S) : ve(S) ? (o = $, D(S)) : (n.consume(S), $);
|
|
8753
8753
|
}
|
|
8754
8754
|
function M(S) {
|
|
8755
8755
|
return S === null || S === 34 || S === 39 || S === 60 || S === 61 || S === 96 ? t(S) : S === 47 || S === 62 || dt(S) ? j(S) : (n.consume(S), M);
|
|
@@ -9323,71 +9323,71 @@ function qC(n, e, t) {
|
|
|
9323
9323
|
};
|
|
9324
9324
|
let h = e.tokenize.call(u, l);
|
|
9325
9325
|
return e.resolveAll && s.push(e), u;
|
|
9326
|
-
function d(
|
|
9327
|
-
return o = xi(o,
|
|
9326
|
+
function d(B) {
|
|
9327
|
+
return o = xi(o, B), v(), o[o.length - 1] !== null ? [] : (H(e, 0), u.events = yf(s, u.events, u), u.events);
|
|
9328
9328
|
}
|
|
9329
|
-
function f(
|
|
9330
|
-
return YC(p(
|
|
9329
|
+
function f(B, N) {
|
|
9330
|
+
return YC(p(B), N);
|
|
9331
9331
|
}
|
|
9332
|
-
function p(
|
|
9333
|
-
return GC(o,
|
|
9332
|
+
function p(B) {
|
|
9333
|
+
return GC(o, B);
|
|
9334
9334
|
}
|
|
9335
9335
|
function g() {
|
|
9336
9336
|
const {
|
|
9337
|
-
_bufferIndex:
|
|
9337
|
+
_bufferIndex: B,
|
|
9338
9338
|
_index: N,
|
|
9339
|
-
line:
|
|
9339
|
+
line: $,
|
|
9340
9340
|
column: M,
|
|
9341
9341
|
offset: W
|
|
9342
9342
|
} = i;
|
|
9343
9343
|
return {
|
|
9344
|
-
_bufferIndex:
|
|
9344
|
+
_bufferIndex: B,
|
|
9345
9345
|
_index: N,
|
|
9346
|
-
line:
|
|
9346
|
+
line: $,
|
|
9347
9347
|
column: M,
|
|
9348
9348
|
offset: W
|
|
9349
9349
|
};
|
|
9350
9350
|
}
|
|
9351
|
-
function m(
|
|
9352
|
-
r[
|
|
9351
|
+
function m(B) {
|
|
9352
|
+
r[B.line] = B.column, I();
|
|
9353
9353
|
}
|
|
9354
9354
|
function v() {
|
|
9355
|
-
let
|
|
9355
|
+
let B;
|
|
9356
9356
|
for (; i._index < o.length; ) {
|
|
9357
9357
|
const N = o[i._index];
|
|
9358
9358
|
if (typeof N == "string")
|
|
9359
|
-
for (
|
|
9359
|
+
for (B = i._index, i._bufferIndex < 0 && (i._bufferIndex = 0); i._index === B && i._bufferIndex < N.length; )
|
|
9360
9360
|
b(N.charCodeAt(i._bufferIndex));
|
|
9361
9361
|
else
|
|
9362
9362
|
b(N);
|
|
9363
9363
|
}
|
|
9364
9364
|
}
|
|
9365
|
-
function b(
|
|
9366
|
-
h = h(
|
|
9365
|
+
function b(B) {
|
|
9366
|
+
h = h(B);
|
|
9367
9367
|
}
|
|
9368
|
-
function x(
|
|
9369
|
-
ve(
|
|
9368
|
+
function x(B) {
|
|
9369
|
+
ve(B) ? (i.line++, i.column = 1, i.offset += B === -3 ? 2 : 1, I()) : B !== -1 && (i.column++, i.offset++), i._bufferIndex < 0 ? i._index++ : (i._bufferIndex++, i._bufferIndex === // Points w/ non-negative `_bufferIndex` reference
|
|
9370
9370
|
// strings.
|
|
9371
9371
|
/** @type {string} */
|
|
9372
|
-
o[i._index].length && (i._bufferIndex = -1, i._index++)), u.previous =
|
|
9372
|
+
o[i._index].length && (i._bufferIndex = -1, i._index++)), u.previous = B;
|
|
9373
9373
|
}
|
|
9374
|
-
function k(
|
|
9375
|
-
const
|
|
9376
|
-
return
|
|
9374
|
+
function k(B, N) {
|
|
9375
|
+
const $ = N || {};
|
|
9376
|
+
return $.type = B, $.start = g(), u.events.push(["enter", $, u]), a.push($), $;
|
|
9377
9377
|
}
|
|
9378
|
-
function P(
|
|
9378
|
+
function P(B) {
|
|
9379
9379
|
const N = a.pop();
|
|
9380
9380
|
return N.end = g(), u.events.push(["exit", N, u]), N;
|
|
9381
9381
|
}
|
|
9382
|
-
function _(
|
|
9383
|
-
B
|
|
9382
|
+
function _(B, N) {
|
|
9383
|
+
H(B, N.from);
|
|
9384
9384
|
}
|
|
9385
|
-
function E(
|
|
9385
|
+
function E(B, N) {
|
|
9386
9386
|
N.restore();
|
|
9387
9387
|
}
|
|
9388
|
-
function O(
|
|
9389
|
-
return
|
|
9390
|
-
function
|
|
9388
|
+
function O(B, N) {
|
|
9389
|
+
return $;
|
|
9390
|
+
function $(M, W, L) {
|
|
9391
9391
|
let D, ie, pe, S;
|
|
9392
9392
|
return Array.isArray(M) ? (
|
|
9393
9393
|
/* c8 ignore next 1 */
|
|
@@ -9429,24 +9429,24 @@ function qC(n, e, t) {
|
|
|
9429
9429
|
}
|
|
9430
9430
|
}
|
|
9431
9431
|
function Q(G) {
|
|
9432
|
-
return
|
|
9432
|
+
return B(pe, S), W;
|
|
9433
9433
|
}
|
|
9434
9434
|
function fe(G) {
|
|
9435
9435
|
return S.restore(), ++ie < D.length ? C(D[ie]) : L;
|
|
9436
9436
|
}
|
|
9437
9437
|
}
|
|
9438
9438
|
}
|
|
9439
|
-
function B
|
|
9440
|
-
|
|
9439
|
+
function H(B, N) {
|
|
9440
|
+
B.resolveAll && !s.includes(B) && s.push(B), B.resolve && li(u.events, N, u.events.length - N, B.resolve(u.events.slice(N), u)), B.resolveTo && (u.events = B.resolveTo(u.events, u));
|
|
9441
9441
|
}
|
|
9442
9442
|
function j() {
|
|
9443
|
-
const
|
|
9443
|
+
const B = g(), N = u.previous, $ = u.currentConstruct, M = u.events.length, W = Array.from(a);
|
|
9444
9444
|
return {
|
|
9445
9445
|
from: M,
|
|
9446
9446
|
restore: L
|
|
9447
9447
|
};
|
|
9448
9448
|
function L() {
|
|
9449
|
-
i =
|
|
9449
|
+
i = B, u.previous = N, u.currentConstruct = $, u.events.length = M, a = W, I();
|
|
9450
9450
|
}
|
|
9451
9451
|
}
|
|
9452
9452
|
function I() {
|
|
@@ -9662,14 +9662,14 @@ function n_(n) {
|
|
|
9662
9662
|
emphasis: l(),
|
|
9663
9663
|
hardBreakEscape: l(N),
|
|
9664
9664
|
hardBreakTrailing: l(N),
|
|
9665
|
-
htmlFlow: l(
|
|
9665
|
+
htmlFlow: l($),
|
|
9666
9666
|
htmlFlowData: I,
|
|
9667
9667
|
htmlText: l(M),
|
|
9668
9668
|
htmlTextData: I,
|
|
9669
9669
|
image: l(D),
|
|
9670
9670
|
label: pe,
|
|
9671
9671
|
labelText: ie,
|
|
9672
|
-
lineEnding:
|
|
9672
|
+
lineEnding: B,
|
|
9673
9673
|
link: l(L),
|
|
9674
9674
|
listItem: l(),
|
|
9675
9675
|
listOrdered: l(),
|
|
@@ -9679,7 +9679,7 @@ function n_(n) {
|
|
|
9679
9679
|
resourceDestinationString: S,
|
|
9680
9680
|
resourceTitleString: U,
|
|
9681
9681
|
resource: ee,
|
|
9682
|
-
setextHeading: l(
|
|
9682
|
+
setextHeading: l(H),
|
|
9683
9683
|
setextHeadingLineSequence: O,
|
|
9684
9684
|
setextHeadingText: E,
|
|
9685
9685
|
strong: l(),
|
|
@@ -9880,7 +9880,7 @@ function n_(n) {
|
|
|
9880
9880
|
const K = this.stack[this.stack.length - 1];
|
|
9881
9881
|
K.depth = this.sliceSerialize(F).codePointAt(0) === 61 ? 1 : 2;
|
|
9882
9882
|
}
|
|
9883
|
-
function
|
|
9883
|
+
function H() {
|
|
9884
9884
|
this.data.setextHeadingSlurpLineEnding = void 0;
|
|
9885
9885
|
}
|
|
9886
9886
|
function j(F) {
|
|
@@ -9896,7 +9896,7 @@ function n_(n) {
|
|
|
9896
9896
|
const K = this.stack.pop();
|
|
9897
9897
|
K.value += this.sliceSerialize(F), K.position.end = fs(F.end);
|
|
9898
9898
|
}
|
|
9899
|
-
function
|
|
9899
|
+
function B(F) {
|
|
9900
9900
|
const K = this.stack[this.stack.length - 1];
|
|
9901
9901
|
if (this.data.atHardBreak) {
|
|
9902
9902
|
const ke = K.children[K.children.length - 1];
|
|
@@ -9908,7 +9908,7 @@ function n_(n) {
|
|
|
9908
9908
|
function N() {
|
|
9909
9909
|
this.data.atHardBreak = !0;
|
|
9910
9910
|
}
|
|
9911
|
-
function
|
|
9911
|
+
function $() {
|
|
9912
9912
|
const F = this.resume(), K = this.stack[this.stack.length - 1];
|
|
9913
9913
|
K.value = F;
|
|
9914
9914
|
}
|
|
@@ -14034,15 +14034,15 @@ function CR(n, e, t) {
|
|
|
14034
14034
|
let r = 0, s = 0, o;
|
|
14035
14035
|
return a;
|
|
14036
14036
|
function a(I) {
|
|
14037
|
-
let
|
|
14038
|
-
for (;
|
|
14039
|
-
const M = i.events[
|
|
14037
|
+
let B = i.events.length - 1;
|
|
14038
|
+
for (; B > -1; ) {
|
|
14039
|
+
const M = i.events[B][1].type;
|
|
14040
14040
|
if (M === "lineEnding" || // Note: markdown-rs uses `whitespace` instead of `linePrefix`
|
|
14041
|
-
M === "linePrefix")
|
|
14041
|
+
M === "linePrefix") B--;
|
|
14042
14042
|
else break;
|
|
14043
14043
|
}
|
|
14044
|
-
const N =
|
|
14045
|
-
return
|
|
14044
|
+
const N = B > -1 ? i.events[B][1].type : null, $ = N === "tableHead" || N === "tableRow" ? E : l;
|
|
14045
|
+
return $ === E && i.parser.lazy[i.now().line] ? t(I) : $(I);
|
|
14046
14046
|
}
|
|
14047
14047
|
function l(I) {
|
|
14048
14048
|
return n.enter("tableHead"), n.enter("tableRow"), u(I);
|
|
@@ -14090,13 +14090,13 @@ function CR(n, e, t) {
|
|
|
14090
14090
|
return n.enter("tableRow"), O(I);
|
|
14091
14091
|
}
|
|
14092
14092
|
function O(I) {
|
|
14093
|
-
return I === 124 ? (n.enter("tableCellDivider"), n.consume(I), n.exit("tableCellDivider"), O) : I === null || ve(I) ? (n.exit("tableRow"), e(I)) : He(I) ? Ge(n, O, "whitespace")(I) : (n.enter("data"),
|
|
14093
|
+
return I === 124 ? (n.enter("tableCellDivider"), n.consume(I), n.exit("tableCellDivider"), O) : I === null || ve(I) ? (n.exit("tableRow"), e(I)) : He(I) ? Ge(n, O, "whitespace")(I) : (n.enter("data"), H(I));
|
|
14094
14094
|
}
|
|
14095
|
-
function
|
|
14096
|
-
return I === null || I === 124 || dt(I) ? (n.exit("data"), O(I)) : (n.consume(I), I === 92 ? j :
|
|
14095
|
+
function H(I) {
|
|
14096
|
+
return I === null || I === 124 || dt(I) ? (n.exit("data"), O(I)) : (n.consume(I), I === 92 ? j : H);
|
|
14097
14097
|
}
|
|
14098
14098
|
function j(I) {
|
|
14099
|
-
return I === 92 || I === 124 ? (n.consume(I),
|
|
14099
|
+
return I === 92 || I === 124 ? (n.consume(I), H) : H(I);
|
|
14100
14100
|
}
|
|
14101
14101
|
}
|
|
14102
14102
|
function _R(n, e) {
|
|
@@ -14304,9 +14304,9 @@ function DR({
|
|
|
14304
14304
|
const f = (o.sources || []).filter((E) => E.is_public && E.original_file_name.endsWith(".pdf")), p = Se.useMemo(() => {
|
|
14305
14305
|
const E = /* @__PURE__ */ new Map();
|
|
14306
14306
|
for (const O of f) {
|
|
14307
|
-
const
|
|
14308
|
-
E.has(
|
|
14309
|
-
const j = E.get(
|
|
14307
|
+
const H = O.filename;
|
|
14308
|
+
E.has(H) || E.set(H, { filename: O.filename, original_file_name: O.original_file_name, items: [], pageMin: void 0, pageMax: void 0 });
|
|
14309
|
+
const j = E.get(H);
|
|
14310
14310
|
j.items.push(O), typeof O.page_number == "number" && (j.pageMin = j.pageMin == null ? O.page_number : Math.min(j.pageMin, O.page_number), j.pageMax = j.pageMax == null ? O.page_number : Math.max(j.pageMax, O.page_number));
|
|
14311
14311
|
}
|
|
14312
14312
|
return Array.from(E.values());
|
|
@@ -14357,15 +14357,15 @@ function DR({
|
|
|
14357
14357
|
/* @__PURE__ */ T.jsx("span", { className: "md-li-bullet", "aria-hidden": !0 }),
|
|
14358
14358
|
/* @__PURE__ */ T.jsx("div", { className: "md-li-content", children: E })
|
|
14359
14359
|
] }),
|
|
14360
|
-
a: ({ href: E, children: O, ...
|
|
14360
|
+
a: ({ href: E, children: O, ...H }) => {
|
|
14361
14361
|
var j;
|
|
14362
14362
|
if (typeof E == "string" && E.includes("/api/v1/docs/") && E.includes("contextIndex="))
|
|
14363
14363
|
try {
|
|
14364
|
-
const I = new URL(E),
|
|
14364
|
+
const I = new URL(E), B = I.searchParams.get("page"), N = I.searchParams.get("contextIndex");
|
|
14365
14365
|
if (N === null || !o.sources) return null;
|
|
14366
|
-
const
|
|
14366
|
+
const $ = parseInt(N, 10), M = o.sources[$];
|
|
14367
14367
|
if (!M || !M.is_public || !M.original_file_name.endsWith(".pdf")) return null;
|
|
14368
|
-
const W = `${M.original_file_name} ${(j = M.metadata) != null && j.sectionNumber ? `s ${M.metadata.sectionNumber}` : ""} ${
|
|
14368
|
+
const W = `${M.original_file_name} ${(j = M.metadata) != null && j.sectionNumber ? `s ${M.metadata.sectionNumber}` : ""} ${B ? ` p.${M.page_number}` : ""}`;
|
|
14369
14369
|
return /* @__PURE__ */ T.jsxs(
|
|
14370
14370
|
"a",
|
|
14371
14371
|
{
|
|
@@ -14375,7 +14375,7 @@ function DR({
|
|
|
14375
14375
|
var pe;
|
|
14376
14376
|
if (L.metaKey || L.ctrlKey) return;
|
|
14377
14377
|
L.preventDefault();
|
|
14378
|
-
const D =
|
|
14378
|
+
const D = B ? parseInt(B, 10) : M.page_number, ie = (o.sources || []).filter((S) => S.filename === M.filename);
|
|
14379
14379
|
i({
|
|
14380
14380
|
filename: M.filename,
|
|
14381
14381
|
originalFileName: M.original_file_name,
|
|
@@ -14399,7 +14399,7 @@ function DR({
|
|
|
14399
14399
|
} catch (I) {
|
|
14400
14400
|
console.warn("Failed to parse citation URL:", E, I);
|
|
14401
14401
|
}
|
|
14402
|
-
return /* @__PURE__ */ T.jsxs("a", { className: "md-link", ...
|
|
14402
|
+
return /* @__PURE__ */ T.jsxs("a", { className: "md-link", ...H, href: E, target: "_blank", rel: "noreferrer", children: [
|
|
14403
14403
|
/* @__PURE__ */ T.jsx("span", { className: "md-link-text", children: O }),
|
|
14404
14404
|
/* @__PURE__ */ T.jsx("span", { className: "md-link-icon", "aria-hidden": !0, children: /* @__PURE__ */ T.jsxs("svg", { width: "12", height: "12", viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: [
|
|
14405
14405
|
/* @__PURE__ */ T.jsx("path", { d: "M14 3h7v7", stroke: "currentColor", strokeWidth: "1.6", strokeLinecap: "round" }),
|
|
@@ -14482,20 +14482,23 @@ function DR({
|
|
|
14482
14482
|
)
|
|
14483
14483
|
] }),
|
|
14484
14484
|
g && p.length > 0 && /* @__PURE__ */ T.jsx("ul", { id: `sources-list-${o.id}`, className: "sources-acc-list", children: p.map((E) => {
|
|
14485
|
-
|
|
14485
|
+
function O(I = "") {
|
|
14486
|
+
return typeof I != "string" || !I ? "" : I.split(/[/\\]/).pop();
|
|
14487
|
+
}
|
|
14488
|
+
const H = E.pageMin != null && E.pageMax != null && E.pageMin === E.pageMax, j = E.pageMin == null || E.pageMax == null ? void 0 : H ? `Page ${E.pageMin}` : `Pages ${E.pageMin}–${E.pageMax}`;
|
|
14486
14489
|
return /* @__PURE__ */ T.jsx("li", { className: "sources-acc-item", children: /* @__PURE__ */ T.jsxs(
|
|
14487
14490
|
"button",
|
|
14488
14491
|
{
|
|
14489
14492
|
className: "sources-acc-link",
|
|
14490
|
-
title: `Open ${E.original_file_name}${
|
|
14493
|
+
title: `Open ${E.original_file_name}${j ? ` ${j}` : ""}`,
|
|
14491
14494
|
onClick: () => {
|
|
14492
|
-
var
|
|
14493
|
-
const
|
|
14494
|
-
i({ filename: E.filename, originalFileName: E.original_file_name, page:
|
|
14495
|
+
var N, $, M;
|
|
14496
|
+
const I = (f || []).filter((W) => W.filename === E.filename), B = (N = I.find((W) => typeof W.page_number == "number")) == null ? void 0 : N.page_number;
|
|
14497
|
+
i({ filename: E.filename, originalFileName: E.original_file_name, page: B, highlight: (M = ($ = I[0]) == null ? void 0 : $.content) == null ? void 0 : M.slice(0, 500), sourcesGroup: I });
|
|
14495
14498
|
},
|
|
14496
14499
|
children: [
|
|
14497
|
-
/* @__PURE__ */ T.jsx("span", { className: "sources-acc-name", children: E.original_file_name }),
|
|
14498
|
-
|
|
14500
|
+
/* @__PURE__ */ T.jsx("span", { className: "sources-acc-name", children: O(E.original_file_name) }),
|
|
14501
|
+
j && /* @__PURE__ */ T.jsx("span", { className: "sources-acc-page", children: j })
|
|
14499
14502
|
]
|
|
14500
14503
|
}
|
|
14501
14504
|
) }, E.filename);
|
|
@@ -17982,27 +17985,27 @@ To = new WeakMap(), Oi = new WeakMap(), gt = new WeakMap(), il = new WeakMap(),
|
|
|
17982
17985
|
const k = m(a, l), P = v(a, l);
|
|
17983
17986
|
let _ = f(...P);
|
|
17984
17987
|
const E = Ne._round(s + _[0]), O = Ne._round(o + _[1]);
|
|
17985
|
-
let
|
|
17988
|
+
let H = 1, j = 1, I, B;
|
|
17986
17989
|
if (t.fromKeyboard)
|
|
17987
17990
|
({
|
|
17988
17991
|
deltaX: I,
|
|
17989
|
-
deltaY:
|
|
17992
|
+
deltaY: B
|
|
17990
17993
|
} = t);
|
|
17991
17994
|
else {
|
|
17992
17995
|
const {
|
|
17993
17996
|
screenX: L,
|
|
17994
17997
|
screenY: D
|
|
17995
17998
|
} = t, [ie, pe] = c(this, Ro);
|
|
17996
|
-
[I,
|
|
17999
|
+
[I, B] = this.screenToPageTranslation(L - ie, D - pe), c(this, Ro)[0] = L, c(this, Ro)[1] = D;
|
|
17997
18000
|
}
|
|
17998
|
-
if ([I,
|
|
18001
|
+
if ([I, B] = g(I / i, B / r), b) {
|
|
17999
18002
|
const L = Math.hypot(a, l);
|
|
18000
|
-
|
|
18001
|
-
} else x ?
|
|
18002
|
-
const N = Ne._round(a *
|
|
18003
|
-
_ = f(...v(N,
|
|
18003
|
+
H = j = Math.max(Math.min(Math.hypot(P[0] - k[0] - I, P[1] - k[1] - B) / L, 1 / a, 1 / l), u / a, h / l);
|
|
18004
|
+
} else x ? H = Math.max(u, Math.min(1, Math.abs(P[0] - k[0] - I))) / a : j = Math.max(h, Math.min(1, Math.abs(P[1] - k[1] - B))) / l;
|
|
18005
|
+
const N = Ne._round(a * H), $ = Ne._round(l * j);
|
|
18006
|
+
_ = f(...v(N, $));
|
|
18004
18007
|
const M = E - _[0], W = O - _[1];
|
|
18005
|
-
c(this, Xn) || y(this, Xn, [this.x, this.y, this.width, this.height]), this.width = N, this.height =
|
|
18008
|
+
c(this, Xn) || y(this, Xn, [this.x, this.y, this.width, this.height]), this.width = N, this.height = $, this.x = M, this.y = W, this.setDims(i * N, r * $), this.fixAndSetPosition(), this._onResizing();
|
|
18006
18009
|
}, ax = function() {
|
|
18007
18010
|
var e;
|
|
18008
18011
|
y(this, zr, {
|
|
@@ -18405,8 +18408,8 @@ class lI {
|
|
|
18405
18408
|
return P.charCodeAt(_) << 24 | P.charCodeAt(_ + 1) << 16 | P.charCodeAt(_ + 2) << 8 | P.charCodeAt(_ + 3) & 255;
|
|
18406
18409
|
}
|
|
18407
18410
|
function r(P, _, E, O) {
|
|
18408
|
-
const
|
|
18409
|
-
return
|
|
18411
|
+
const H = P.substring(0, _), j = P.substring(_ + E);
|
|
18412
|
+
return H + O + j;
|
|
18410
18413
|
}
|
|
18411
18414
|
let s, o;
|
|
18412
18415
|
const a = this._document.createElement("canvas");
|
|
@@ -19009,16 +19012,16 @@ class hI extends Sx {
|
|
|
19009
19012
|
let d = Math.round(0.2126 * u[0] + 0.7152 * u[1] + 0.0722 * u[2]), f = Math.round(0.2126 * h[0] + 0.7152 * h[1] + 0.0722 * h[2]), [p, g] = [s, o].map(A(this, se, Rc).bind(this));
|
|
19010
19013
|
f < d && ([d, f, p, g] = [f, d, g, p]), c(this, se, Ma).style.color = "";
|
|
19011
19014
|
const m = (k, P, _) => {
|
|
19012
|
-
const E = new Array(256), O = (f - d) / _,
|
|
19015
|
+
const E = new Array(256), O = (f - d) / _, H = k / 255, j = (P - k) / (255 * _);
|
|
19013
19016
|
let I = 0;
|
|
19014
|
-
for (let
|
|
19015
|
-
const N = Math.round(d +
|
|
19017
|
+
for (let B = 0; B <= _; B++) {
|
|
19018
|
+
const N = Math.round(d + B * O), $ = H + B * j;
|
|
19016
19019
|
for (let M = I; M <= N; M++)
|
|
19017
|
-
E[M] =
|
|
19020
|
+
E[M] = $;
|
|
19018
19021
|
I = N + 1;
|
|
19019
19022
|
}
|
|
19020
|
-
for (let
|
|
19021
|
-
E[
|
|
19023
|
+
for (let B = I; B < 256; B++)
|
|
19024
|
+
E[B] = E[I - 1];
|
|
19022
19025
|
return E.join(",");
|
|
19023
19026
|
}, v = `g_${c(this, Hr)}_hcm_${t}_filter`, b = l.filter = A(this, se, Na).call(this, v);
|
|
19024
19027
|
return A(this, se, tg).call(this, b), A(this, se, Pc).call(this, m(p[0], g[0], 5), m(p[1], g[1], 5), m(p[2], g[2], 5), b), l.url = A(this, se, La).call(this, v), l.url;
|
|
@@ -19178,18 +19181,18 @@ function lp(n, e, t, i, r, s, o, a) {
|
|
|
19178
19181
|
const p = (l[t] + e.offsetX) * e.scaleX, g = (l[t + 1] + e.offsetY) * e.scaleY, m = (l[i] + e.offsetX) * e.scaleX, v = (l[i + 1] + e.offsetY) * e.scaleY, b = (l[r] + e.offsetX) * e.scaleX, x = (l[r + 1] + e.offsetY) * e.scaleY;
|
|
19179
19182
|
if (g >= x)
|
|
19180
19183
|
return;
|
|
19181
|
-
const k = u[s], P = u[s + 1], _ = u[s + 2], E = u[o], O = u[o + 1],
|
|
19184
|
+
const k = u[s], P = u[s + 1], _ = u[s + 2], E = u[o], O = u[o + 1], H = u[o + 2], j = u[a], I = u[a + 1], B = u[a + 2], N = Math.round(g), $ = Math.round(x);
|
|
19182
19185
|
let M, W, L, D, ie, pe, S, U;
|
|
19183
|
-
for (let ee = N; ee <=
|
|
19186
|
+
for (let ee = N; ee <= $; ee++) {
|
|
19184
19187
|
if (ee < v) {
|
|
19185
19188
|
const Z = ee < g ? 0 : (g - ee) / (g - v);
|
|
19186
|
-
M = p - (p - m) * Z, W = k - (k - E) * Z, L = P - (P - O) * Z, D = _ - (_ -
|
|
19189
|
+
M = p - (p - m) * Z, W = k - (k - E) * Z, L = P - (P - O) * Z, D = _ - (_ - H) * Z;
|
|
19187
19190
|
} else {
|
|
19188
19191
|
let Z;
|
|
19189
|
-
ee > x ? Z = 1 : v === x ? Z = 0 : Z = (v - ee) / (v - x), M = m - (m - b) * Z, W = E - (E - j) * Z, L = O - (O - I) * Z, D =
|
|
19192
|
+
ee > x ? Z = 1 : v === x ? Z = 0 : Z = (v - ee) / (v - x), M = m - (m - b) * Z, W = E - (E - j) * Z, L = O - (O - I) * Z, D = H - (H - B) * Z;
|
|
19190
19193
|
}
|
|
19191
19194
|
let C;
|
|
19192
|
-
ee < g ? C = 0 : ee > x ? C = 1 : C = (g - ee) / (g - x), ie = p - (p - b) * C, pe = k - (k - j) * C, S = P - (P - I) * C, U = _ - (_ -
|
|
19195
|
+
ee < g ? C = 0 : ee > x ? C = 1 : C = (g - ee) / (g - x), ie = p - (p - b) * C, pe = k - (k - j) * C, S = P - (P - I) * C, U = _ - (_ - B) * C;
|
|
19193
19196
|
const Q = Math.round(Math.min(M, ie)), fe = Math.round(Math.max(M, ie));
|
|
19194
19197
|
let G = d * ee + Q * 4;
|
|
19195
19198
|
for (let Z = Q; Z <= fe; Z++)
|
|
@@ -19231,7 +19234,7 @@ class yI extends _m {
|
|
|
19231
19234
|
}, v = d + 2 * 2, b = f + 2 * 2, x = i.getCanvas("mesh", v, b), k = x.context, P = k.createImageData(d, f);
|
|
19232
19235
|
if (t) {
|
|
19233
19236
|
const E = P.data;
|
|
19234
|
-
for (let O = 0,
|
|
19237
|
+
for (let O = 0, H = E.length; O < H; O += 4)
|
|
19235
19238
|
E[O] = t[0], E[O + 1] = t[1], E[O + 2] = t[2], E[O + 3] = 255;
|
|
19236
19239
|
}
|
|
19237
19240
|
for (const E of this._figures)
|
|
@@ -19296,10 +19299,10 @@ const Ty = {
|
|
|
19296
19299
|
l = Math.abs(l), u = Math.abs(u), kf("TilingType: " + s);
|
|
19297
19300
|
const h = t[0], d = t[1], f = t[2], p = t[3], g = f - h, m = p - d, v = be.singularValueDecompose2dScale(this.matrix), b = be.singularValueDecompose2dScale(this.baseTransform), x = v[0] * b[0], k = v[1] * b[1];
|
|
19298
19301
|
let P = g, _ = m, E = !1, O = !1;
|
|
19299
|
-
const
|
|
19300
|
-
|
|
19301
|
-
const N = this.getSizeAndScale(P, this.ctx.canvas.width, x),
|
|
19302
|
-
if (L.groupLevel = e.groupLevel, this.setFillAndStrokeStyleToContext(L, r, o), W.translate(-N.scale * h,
|
|
19302
|
+
const H = Math.ceil(l * x), j = Math.ceil(u * k), I = Math.ceil(g * x), B = Math.ceil(m * k);
|
|
19303
|
+
H >= I ? P = l : E = !0, j >= B ? _ = u : O = !0;
|
|
19304
|
+
const N = this.getSizeAndScale(P, this.ctx.canvas.width, x), $ = this.getSizeAndScale(_, this.ctx.canvas.height, k), M = e.cachedCanvases.getCanvas("pattern", N.size, $.size), W = M.context, L = a.createCanvasGraphics(W);
|
|
19305
|
+
if (L.groupLevel = e.groupLevel, this.setFillAndStrokeStyleToContext(L, r, o), W.translate(-N.scale * h, -$.scale * d), L.transform(N.scale, 0, 0, $.scale, 0, 0), W.save(), this.clipBbox(L, h, d, f, p), L.baseTransform = bt(L.ctx), L.executeOperatorList(i), L.endDrawing(), W.restore(), E || O) {
|
|
19303
19306
|
const D = M.canvas;
|
|
19304
19307
|
E && (P = l), O && (_ = u);
|
|
19305
19308
|
const ie = this.getSizeAndScale(P, this.ctx.canvas.width, x), pe = this.getSizeAndScale(_, this.ctx.canvas.height, k), S = ie.size, U = pe.size, ee = e.cachedCanvases.getCanvas("pattern-workaround", S, U), C = ee.context, Q = E ? Math.floor(g / l) : 0, fe = O ? Math.floor(m / u) : 0;
|
|
@@ -19317,7 +19320,7 @@ const Ty = {
|
|
|
19317
19320
|
return {
|
|
19318
19321
|
canvas: M.canvas,
|
|
19319
19322
|
scaleX: N.scale,
|
|
19320
|
-
scaleY:
|
|
19323
|
+
scaleY: $.scale,
|
|
19321
19324
|
offsetX: h,
|
|
19322
19325
|
offsetY: d
|
|
19323
19326
|
};
|
|
@@ -19448,11 +19451,11 @@ class kI {
|
|
|
19448
19451
|
function Gh(n, e, t, i, r, s, o, a, l, u) {
|
|
19449
19452
|
const [h, d, f, p, g, m] = bt(n);
|
|
19450
19453
|
if (d === 0 && f === 0) {
|
|
19451
|
-
const x = o * h + g, k = Math.round(x), P = a * p + m, _ = Math.round(P), E = (o + l) * h + g, O = Math.abs(Math.round(E) - k) || 1,
|
|
19454
|
+
const x = o * h + g, k = Math.round(x), P = a * p + m, _ = Math.round(P), E = (o + l) * h + g, O = Math.abs(Math.round(E) - k) || 1, H = (a + u) * p + m, j = Math.abs(Math.round(H) - _) || 1;
|
|
19452
19455
|
return n.setTransform(Math.sign(h), 0, 0, Math.sign(p), k, _), n.drawImage(e, t, i, r, s, 0, 0, O, j), n.setTransform(h, d, f, p, g, m), [O, j];
|
|
19453
19456
|
}
|
|
19454
19457
|
if (h === 0 && p === 0) {
|
|
19455
|
-
const x = a * f + g, k = Math.round(x), P = o * d + m, _ = Math.round(P), E = (a + u) * f + g, O = Math.abs(Math.round(E) - k) || 1,
|
|
19458
|
+
const x = a * f + g, k = Math.round(x), P = o * d + m, _ = Math.round(P), E = (a + u) * f + g, O = Math.abs(Math.round(E) - k) || 1, H = (o + l) * d + m, j = Math.abs(Math.round(H) - _) || 1;
|
|
19456
19459
|
return n.setTransform(0, Math.sign(d), Math.sign(f), 0, k, _), n.drawImage(e, t, i, r, s, 0, 0, j, O), n.setTransform(h, d, f, p, g, m), [j, O];
|
|
19457
19460
|
}
|
|
19458
19461
|
n.drawImage(e, t, i, r, s, o, a, l, u);
|
|
@@ -19578,12 +19581,12 @@ function Ly(n, e) {
|
|
|
19578
19581
|
for (g = f < s ? Hn : r, u = 0, p = 0; p < g; p++) {
|
|
19579
19582
|
const E = v - l;
|
|
19580
19583
|
let O = 0;
|
|
19581
|
-
const
|
|
19582
|
-
let I = 0,
|
|
19584
|
+
const H = E > k ? i : E * 8 - 7, j = H & -8;
|
|
19585
|
+
let I = 0, B = 0;
|
|
19583
19586
|
for (; O < j; O += 8)
|
|
19584
|
-
|
|
19585
|
-
for (; O <
|
|
19586
|
-
I === 0 && (
|
|
19587
|
+
B = h[l++], b[u++] = B & 128 ? P : _, b[u++] = B & 64 ? P : _, b[u++] = B & 32 ? P : _, b[u++] = B & 16 ? P : _, b[u++] = B & 8 ? P : _, b[u++] = B & 4 ? P : _, b[u++] = B & 2 ? P : _, b[u++] = B & 1 ? P : _;
|
|
19588
|
+
for (; O < H; O++)
|
|
19589
|
+
I === 0 && (B = h[l++], I = 128), b[u++] = B & I ? P : _, I >>= 1;
|
|
19587
19590
|
}
|
|
19588
19591
|
for (; u < x; )
|
|
19589
19592
|
b[u++] = 0;
|
|
@@ -19731,15 +19734,15 @@ const Om = class Om {
|
|
|
19731
19734
|
} = e, s = this.current.fillColor, o = this.current.patternFill, a = bt(t);
|
|
19732
19735
|
let l, u, h, d;
|
|
19733
19736
|
if ((e.bitmap || e.data) && e.count > 1) {
|
|
19734
|
-
const
|
|
19735
|
-
u = JSON.stringify(o ? a : [a.slice(0, 4), s]), l = this._cachedBitmapsMap.get(
|
|
19737
|
+
const H = e.bitmap || e.data.buffer;
|
|
19738
|
+
u = JSON.stringify(o ? a : [a.slice(0, 4), s]), l = this._cachedBitmapsMap.get(H), l || (l = /* @__PURE__ */ new Map(), this._cachedBitmapsMap.set(H, l));
|
|
19736
19739
|
const j = l.get(u);
|
|
19737
19740
|
if (j && !o) {
|
|
19738
|
-
const I = Math.round(Math.min(a[0], a[2]) + a[4]),
|
|
19741
|
+
const I = Math.round(Math.min(a[0], a[2]) + a[4]), B = Math.round(Math.min(a[1], a[3]) + a[5]);
|
|
19739
19742
|
return {
|
|
19740
19743
|
canvas: j,
|
|
19741
19744
|
offsetX: I,
|
|
19742
|
-
offsetY:
|
|
19745
|
+
offsetY: B
|
|
19743
19746
|
};
|
|
19744
19747
|
}
|
|
19745
19748
|
h = j;
|
|
@@ -20086,10 +20089,10 @@ const Om = class Om {
|
|
|
20086
20089
|
k /= P;
|
|
20087
20090
|
if (o !== 1 && (s.scale(o, o), k /= o), s.lineWidth = k, i.isInvalidPDFjsFont) {
|
|
20088
20091
|
const O = [];
|
|
20089
|
-
let
|
|
20092
|
+
let H = 0;
|
|
20090
20093
|
for (const j of e)
|
|
20091
|
-
O.push(j.unicode),
|
|
20092
|
-
s.fillText(O.join(""), 0, 0), t.x +=
|
|
20094
|
+
O.push(j.unicode), H += j.width;
|
|
20095
|
+
s.fillText(O.join(""), 0, 0), t.x += H * m * h, s.restore(), this.compose();
|
|
20093
20096
|
return;
|
|
20094
20097
|
}
|
|
20095
20098
|
let _ = 0, E;
|
|
@@ -20099,31 +20102,31 @@ const Om = class Om {
|
|
|
20099
20102
|
_ += p * O * r / 1e3;
|
|
20100
20103
|
continue;
|
|
20101
20104
|
}
|
|
20102
|
-
let
|
|
20103
|
-
const j = (O.isSpace ? l : 0) + a, I = O.fontChar,
|
|
20104
|
-
let N,
|
|
20105
|
+
let H = !1;
|
|
20106
|
+
const j = (O.isSpace ? l : 0) + a, I = O.fontChar, B = O.accent;
|
|
20107
|
+
let N, $, M = O.width;
|
|
20105
20108
|
if (f) {
|
|
20106
20109
|
const L = O.vmetric || g, D = -(O.vmetric ? L[1] : M * 0.5) * m, ie = L[2] * m;
|
|
20107
|
-
M = L ? -L[0] : M, N = D / o,
|
|
20110
|
+
M = L ? -L[0] : M, N = D / o, $ = (_ + ie) / o;
|
|
20108
20111
|
} else
|
|
20109
|
-
N = _ / o,
|
|
20112
|
+
N = _ / o, $ = 0;
|
|
20110
20113
|
if (i.remeasure && M > 0) {
|
|
20111
20114
|
const L = s.measureText(I).width * 1e3 / r * o;
|
|
20112
20115
|
if (M < L && this.isFontSubpixelAAEnabled) {
|
|
20113
20116
|
const D = M / L;
|
|
20114
|
-
|
|
20117
|
+
H = !0, s.save(), s.scale(D, 1), N /= D;
|
|
20115
20118
|
} else M !== L && (N += (M - L) / 2e3 * r / o);
|
|
20116
20119
|
}
|
|
20117
20120
|
if (this.contentVisible && (O.isInFont || i.missingFile)) {
|
|
20118
|
-
if (v &&
|
|
20119
|
-
s.fillText(I, N,
|
|
20120
|
-
else if (this.paintChar(I, N,
|
|
20121
|
-
const L = N + r *
|
|
20122
|
-
this.paintChar(
|
|
20121
|
+
if (v && !B)
|
|
20122
|
+
s.fillText(I, N, $);
|
|
20123
|
+
else if (this.paintChar(I, N, $, b, x), B) {
|
|
20124
|
+
const L = N + r * B.offset.x / o, D = $ - r * B.offset.y / o;
|
|
20125
|
+
this.paintChar(B.fontChar, L, D, b, x);
|
|
20123
20126
|
}
|
|
20124
20127
|
}
|
|
20125
20128
|
const W = f ? M * m - j * u : M * m + j * u;
|
|
20126
|
-
_ += W,
|
|
20129
|
+
_ += W, H && s.restore();
|
|
20127
20130
|
}
|
|
20128
20131
|
f ? t.y -= _ : t.x += _ * h, s.restore(), this.compose();
|
|
20129
20132
|
}
|
|
@@ -21941,16 +21944,16 @@ function iO(n = {}) {
|
|
|
21941
21944
|
docId: t
|
|
21942
21945
|
} = e, i = n.url ? rO(n.url) : null, r = n.data ? sO(n.data) : null, s = n.httpHeaders || null, o = n.withCredentials === !0, a = n.password ?? null, l = n.range instanceof jx ? n.range : null, u = Number.isInteger(n.rangeChunkSize) && n.rangeChunkSize > 0 ? n.rangeChunkSize : KI;
|
|
21943
21946
|
let h = n.worker instanceof Va ? n.worker : null;
|
|
21944
|
-
const d = n.verbosity, f = typeof n.docBaseUrl == "string" && !_f(n.docBaseUrl) ? n.docBaseUrl : null, p = typeof n.cMapUrl == "string" ? n.cMapUrl : null, g = n.cMapPacked !== !1, m = n.CMapReaderFactory || eO, v = typeof n.standardFontDataUrl == "string" ? n.standardFontDataUrl : null, b = n.StandardFontDataFactory || nO, x = n.stopAtErrors !== !0, k = Number.isInteger(n.maxImageSize) && n.maxImageSize > -1 ? n.maxImageSize : -1, P = n.isEvalSupported !== !1, _ = typeof n.isOffscreenCanvasSupported == "boolean" ? n.isOffscreenCanvasSupported : !yn, E = typeof n.isImageDecoderSupported == "boolean" ? n.isImageDecoderSupported : !yn && (In.platform.isFirefox || !globalThis.chrome), O = Number.isInteger(n.canvasMaxAreaInBytes) ? n.canvasMaxAreaInBytes : -1,
|
|
21947
|
+
const d = n.verbosity, f = typeof n.docBaseUrl == "string" && !_f(n.docBaseUrl) ? n.docBaseUrl : null, p = typeof n.cMapUrl == "string" ? n.cMapUrl : null, g = n.cMapPacked !== !1, m = n.CMapReaderFactory || eO, v = typeof n.standardFontDataUrl == "string" ? n.standardFontDataUrl : null, b = n.StandardFontDataFactory || nO, x = n.stopAtErrors !== !0, k = Number.isInteger(n.maxImageSize) && n.maxImageSize > -1 ? n.maxImageSize : -1, P = n.isEvalSupported !== !1, _ = typeof n.isOffscreenCanvasSupported == "boolean" ? n.isOffscreenCanvasSupported : !yn, E = typeof n.isImageDecoderSupported == "boolean" ? n.isImageDecoderSupported : !yn && (In.platform.isFirefox || !globalThis.chrome), O = Number.isInteger(n.canvasMaxAreaInBytes) ? n.canvasMaxAreaInBytes : -1, H = typeof n.disableFontFace == "boolean" ? n.disableFontFace : yn, j = n.fontExtraProperties === !0, I = n.enableXfa === !0, B = n.ownerDocument || globalThis.document, N = n.disableRange === !0, $ = n.disableStream === !0, M = n.disableAutoFetch === !0, W = n.pdfBug === !0, L = n.CanvasFactory || ZI, D = n.FilterFactory || tO, ie = n.enableHWA === !0, pe = l ? l.length : n.length ?? NaN, S = typeof n.useSystemFonts == "boolean" ? n.useSystemFonts : !yn && !H, U = typeof n.useWorkerFetch == "boolean" ? n.useWorkerFetch : m === Ax && b === Cx && p && v && Ac(p, document.baseURI) && Ac(v, document.baseURI), ee = null;
|
|
21945
21948
|
HR(d);
|
|
21946
21949
|
const C = {
|
|
21947
21950
|
canvasFactory: new L({
|
|
21948
|
-
ownerDocument:
|
|
21951
|
+
ownerDocument: B,
|
|
21949
21952
|
enableHWA: ie
|
|
21950
21953
|
}),
|
|
21951
21954
|
filterFactory: new D({
|
|
21952
21955
|
docId: t,
|
|
21953
|
-
ownerDocument:
|
|
21956
|
+
ownerDocument: B
|
|
21954
21957
|
}),
|
|
21955
21958
|
cMapReaderFactory: U ? null : new m({
|
|
21956
21959
|
baseUrl: p,
|
|
@@ -21979,7 +21982,7 @@ function iO(n = {}) {
|
|
|
21979
21982
|
enableXfa: I,
|
|
21980
21983
|
evaluatorOptions: {
|
|
21981
21984
|
maxImageSize: k,
|
|
21982
|
-
disableFontFace:
|
|
21985
|
+
disableFontFace: H,
|
|
21983
21986
|
ignoreErrors: x,
|
|
21984
21987
|
isEvalSupported: P,
|
|
21985
21988
|
isOffscreenCanvasSupported: _,
|
|
@@ -21991,9 +21994,9 @@ function iO(n = {}) {
|
|
|
21991
21994
|
standardFontDataUrl: U ? v : null
|
|
21992
21995
|
}
|
|
21993
21996
|
}, fe = {
|
|
21994
|
-
disableFontFace:
|
|
21997
|
+
disableFontFace: H,
|
|
21995
21998
|
fontExtraProperties: j,
|
|
21996
|
-
ownerDocument:
|
|
21999
|
+
ownerDocument: B,
|
|
21997
22000
|
pdfBug: W,
|
|
21998
22001
|
styleElement: ee,
|
|
21999
22002
|
loadingParams: {
|
|
@@ -22011,7 +22014,7 @@ function iO(n = {}) {
|
|
|
22011
22014
|
if (l)
|
|
22012
22015
|
Z = new OI(l, {
|
|
22013
22016
|
disableRange: N,
|
|
22014
|
-
disableStream:
|
|
22017
|
+
disableStream: $
|
|
22015
22018
|
});
|
|
22016
22019
|
else if (!r) {
|
|
22017
22020
|
if (!i)
|
|
@@ -22033,7 +22036,7 @@ function iO(n = {}) {
|
|
|
22033
22036
|
withCredentials: o,
|
|
22034
22037
|
rangeChunkSize: u,
|
|
22035
22038
|
disableRange: N,
|
|
22036
|
-
disableStream:
|
|
22039
|
+
disableStream: $
|
|
22037
22040
|
});
|
|
22038
22041
|
}
|
|
22039
22042
|
return G.then((he) => {
|
|
@@ -22369,12 +22372,12 @@ class aO {
|
|
|
22369
22372
|
(m.renderTasks || (m.renderTasks = /* @__PURE__ */ new Set())).add(x);
|
|
22370
22373
|
const k = x.task;
|
|
22371
22374
|
return Promise.all([m.displayReadyCapability.promise, a]).then(([E, O]) => {
|
|
22372
|
-
var
|
|
22375
|
+
var H;
|
|
22373
22376
|
if (this.destroyed) {
|
|
22374
22377
|
b();
|
|
22375
22378
|
return;
|
|
22376
22379
|
}
|
|
22377
|
-
if ((
|
|
22380
|
+
if ((H = this._stats) == null || H.time("Rendering"), !(O.renderingIntent & p))
|
|
22378
22381
|
throw new Error("Must use the same `intent`-argument when calling the `PDFPageProxy.render` and `PDFDocumentProxy.getOptionalContentConfig` methods.");
|
|
22379
22382
|
x.initializeGraphics({
|
|
22380
22383
|
transparency: E,
|
|
@@ -23873,8 +23876,8 @@ const Mm = class Mm {
|
|
|
23873
23876
|
const p = h.createElement("clipPath"), g = `clippath_${this.data.id}`;
|
|
23874
23877
|
p.setAttribute("id", g), p.setAttribute("clipPathUnits", "objectBoundingBox"), f.append(p);
|
|
23875
23878
|
for (let m = 2, v = e.length; m < v; m += 8) {
|
|
23876
|
-
const b = e[m], x = e[m + 1], k = e[m + 2], P = e[m + 3], _ = h.createElement("rect"), E = (k - t) / l, O = (s - x) / u,
|
|
23877
|
-
_.setAttribute("x", E), _.setAttribute("y", O), _.setAttribute("width",
|
|
23879
|
+
const b = e[m], x = e[m + 1], k = e[m + 2], P = e[m + 3], _ = h.createElement("rect"), E = (k - t) / l, O = (s - x) / u, H = (b - k) / l, j = (x - P) / u;
|
|
23880
|
+
_.setAttribute("x", E), _.setAttribute("y", O), _.setAttribute("width", H), _.setAttribute("height", j), p.append(_), a == null || a.push(`<rect vector-effect="non-scaling-stroke" x="${E}" y="${O}" width="${H}" height="${j}"/>`);
|
|
23878
23881
|
}
|
|
23879
23882
|
c(this, wl) && (a.push("</g></svg>')"), o.backgroundImage = a.join("")), this.container.append(d), this.container.style.clipPath = `url(#${g})`;
|
|
23880
23883
|
}
|
|
@@ -26078,8 +26081,8 @@ class Sg {
|
|
|
26078
26081
|
width: x,
|
|
26079
26082
|
height: k
|
|
26080
26083
|
} of e) {
|
|
26081
|
-
const P = Math.floor((v - t) / u) * u, _ = Math.ceil((v + x + t) / u) * u, E = Math.floor((b - t) / u) * u, O = Math.ceil((b + k + t) / u) * u,
|
|
26082
|
-
c(this, Fs).push(
|
|
26084
|
+
const P = Math.floor((v - t) / u) * u, _ = Math.ceil((v + x + t) / u) * u, E = Math.floor((b - t) / u) * u, O = Math.ceil((b + k + t) / u) * u, H = [P, E, O, !0], j = [_, E, O, !1];
|
|
26085
|
+
c(this, Fs).push(H, j), s = Math.min(s, P), o = Math.max(o, _), a = Math.min(a, E), l = Math.max(l, O);
|
|
26083
26086
|
}
|
|
26084
26087
|
const h = o - s + 2 * i, d = l - a + 2 * i, f = s - i, p = a - i, g = c(this, Fs).at(r ? -1 : -2), m = [g[0], g[2]];
|
|
26085
26088
|
for (const v of c(this, Fs)) {
|
|
@@ -26674,7 +26677,7 @@ const Ke = class Ke extends At {
|
|
|
26674
26677
|
rotation: _,
|
|
26675
26678
|
id: E,
|
|
26676
26679
|
color: O,
|
|
26677
|
-
opacity:
|
|
26680
|
+
opacity: H,
|
|
26678
26681
|
popupRef: j
|
|
26679
26682
|
},
|
|
26680
26683
|
parent: {
|
|
@@ -26686,7 +26689,7 @@ const Ke = class Ke extends At {
|
|
|
26686
26689
|
s = t = {
|
|
26687
26690
|
annotationType: Oe.HIGHLIGHT,
|
|
26688
26691
|
color: Array.from(O),
|
|
26689
|
-
opacity:
|
|
26692
|
+
opacity: H,
|
|
26690
26693
|
quadPoints: k,
|
|
26691
26694
|
boxes: null,
|
|
26692
26695
|
pageIndex: I - 1,
|
|
@@ -26705,7 +26708,7 @@ const Ke = class Ke extends At {
|
|
|
26705
26708
|
id: E,
|
|
26706
26709
|
color: O,
|
|
26707
26710
|
borderStyle: {
|
|
26708
|
-
rawWidth:
|
|
26711
|
+
rawWidth: H
|
|
26709
26712
|
},
|
|
26710
26713
|
popupRef: j
|
|
26711
26714
|
},
|
|
@@ -26718,7 +26721,7 @@ const Ke = class Ke extends At {
|
|
|
26718
26721
|
s = t = {
|
|
26719
26722
|
annotationType: Oe.HIGHLIGHT,
|
|
26720
26723
|
color: Array.from(O),
|
|
26721
|
-
thickness:
|
|
26724
|
+
thickness: H,
|
|
26722
26725
|
inkLists: k,
|
|
26723
26726
|
boxes: null,
|
|
26724
26727
|
pageIndex: I - 1,
|
|
@@ -26753,8 +26756,8 @@ const Ke = class Ke extends At {
|
|
|
26753
26756
|
x: k[0] - p,
|
|
26754
26757
|
y: f - (k[1] - g)
|
|
26755
26758
|
}, _ = new Eg(P, [0, 0, d, f], 1, c(h, bi) / 2, !0, 1e-3);
|
|
26756
|
-
for (let
|
|
26757
|
-
P.x = k[
|
|
26759
|
+
for (let H = 0, j = k.length; H < j; H += 2)
|
|
26760
|
+
P.x = k[H] - p, P.y = f - (k[H + 1] - g), _.add(P);
|
|
26758
26761
|
const {
|
|
26759
26762
|
id: E,
|
|
26760
26763
|
clipPathId: O
|
|
@@ -27699,11 +27702,11 @@ const Lm = class Lm extends ae {
|
|
|
27699
27702
|
}
|
|
27700
27703
|
const P = new Float32Array(3 * (k - 2));
|
|
27701
27704
|
a.push(P);
|
|
27702
|
-
let [_, E, O,
|
|
27705
|
+
let [_, E, O, H] = x.subarray(0, 4);
|
|
27703
27706
|
P.set([NaN, NaN, NaN, NaN, _, E], 0);
|
|
27704
27707
|
for (let j = 4; j < k; j += 2) {
|
|
27705
|
-
const I = x[j],
|
|
27706
|
-
P.set(ae.createBezierPoints(_, E, O,
|
|
27708
|
+
const I = x[j], B = x[j + 1];
|
|
27709
|
+
P.set(ae.createBezierPoints(_, E, O, H, I, B), (j - 2) * 3), [_, E, O, H] = [O, H, I, B];
|
|
27707
27710
|
}
|
|
27708
27711
|
}
|
|
27709
27712
|
}
|
|
@@ -28218,8 +28221,8 @@ const Hc = class Hc extends At {
|
|
|
28218
28221
|
let l = c(this, wt), u = s, h = o, d = null;
|
|
28219
28222
|
if (i) {
|
|
28220
28223
|
if (s > i || o > i) {
|
|
28221
|
-
const
|
|
28222
|
-
u = Math.floor(s *
|
|
28224
|
+
const H = Math.min(i / s, i / o);
|
|
28225
|
+
u = Math.floor(s * H), h = Math.floor(o * H);
|
|
28223
28226
|
}
|
|
28224
28227
|
d = document.createElement("canvas");
|
|
28225
28228
|
const g = d.width = Math.ceil(u * a.sx), m = d.height = Math.ceil(h * a.sy);
|
|
@@ -28277,13 +28280,13 @@ const Hc = class Hc extends At {
|
|
|
28277
28280
|
pageNumber: E
|
|
28278
28281
|
}
|
|
28279
28282
|
}
|
|
28280
|
-
} = t, O = _.querySelector("canvas"),
|
|
28283
|
+
} = t, O = _.querySelector("canvas"), H = r.imageManager.getFromCanvas(_.id, O);
|
|
28281
28284
|
O.remove();
|
|
28282
28285
|
const j = ((m = await i._structTree.getAriaAttributes(`${wm}${x}`)) == null ? void 0 : m.get("aria-label")) || "";
|
|
28283
28286
|
s = t = {
|
|
28284
28287
|
annotationType: Oe.STAMP,
|
|
28285
|
-
bitmapId:
|
|
28286
|
-
bitmap:
|
|
28288
|
+
bitmapId: H.id,
|
|
28289
|
+
bitmap: H.bitmap,
|
|
28287
28290
|
pageIndex: E - 1,
|
|
28288
28291
|
rect: v.slice(0),
|
|
28289
28292
|
rotation: b,
|
|
@@ -29147,7 +29150,7 @@ function $O() {
|
|
|
29147
29150
|
}
|
|
29148
29151
|
const Hy = /* @__PURE__ */ new Map();
|
|
29149
29152
|
function HO({ fileUrl: n, pageNumber: e, onMeta: t, scrollBehavior: i = "auto", highlights: r, clientId: s, apiKey: o, authToken: a }) {
|
|
29150
|
-
const [l, u] = it(0), [h, d] = it(!0), [f, p] = it(null), [g, m] = it(0), v = ut([]), b = ut([]), x = ut(null), k = ut(null), P = ut(!1), _ = ut(null), E = ut(null), O = ut(1),
|
|
29153
|
+
const [l, u] = it(0), [h, d] = it(!0), [f, p] = it(null), [g, m] = it(0), v = ut([]), b = ut([]), x = ut(null), k = ut(null), P = ut(!1), _ = ut(null), E = ut(null), O = ut(1), H = nn((N) => {
|
|
29151
29154
|
try {
|
|
29152
29155
|
return !N || /^https?:\/\//i.test(N) ? N : new URL(N, window.location.origin).href;
|
|
29153
29156
|
} catch {
|
|
@@ -29158,24 +29161,24 @@ function HO({ fileUrl: n, pageNumber: e, onMeta: t, scrollBehavior: i = "auto",
|
|
|
29158
29161
|
v.current = [], b.current = [], u(0), d(!0), p(null);
|
|
29159
29162
|
}, [n]);
|
|
29160
29163
|
const j = nn(async () => {
|
|
29161
|
-
const N = x.current,
|
|
29162
|
-
if (!N ||
|
|
29164
|
+
const N = x.current, $ = k.current;
|
|
29165
|
+
if (!N || !$) return 1;
|
|
29163
29166
|
let M = 0;
|
|
29164
|
-
for (;
|
|
29167
|
+
for (; $.clientWidth <= 1 && M < 20; )
|
|
29165
29168
|
await new Promise(requestAnimationFrame), M++;
|
|
29166
|
-
const W = await N.getPage(1), L = (W.rotate + 180) % 360, D = W.getViewport({ scale: 1, rotation: L - 180 }), ie = 0, pe =
|
|
29169
|
+
const W = await N.getPage(1), L = (W.rotate + 180) % 360, D = W.getViewport({ scale: 1, rotation: L - 180 }), ie = 0, pe = $.clientWidth, S = Math.max(1, pe - ie);
|
|
29167
29170
|
return Math.max(0.1, S / D.width);
|
|
29168
29171
|
}, []), I = nn(async () => {
|
|
29169
29172
|
if (!P.current) {
|
|
29170
29173
|
P.current = !0;
|
|
29171
29174
|
try {
|
|
29172
|
-
const N = x.current,
|
|
29173
|
-
if (!N ||
|
|
29175
|
+
const N = x.current, $ = l, M = k.current;
|
|
29176
|
+
if (!N || !$ || !M) return;
|
|
29174
29177
|
const W = await j();
|
|
29175
29178
|
O.current = W;
|
|
29176
|
-
for (let L = 0; L < 6 && !(b.current.length >=
|
|
29179
|
+
for (let L = 0; L < 6 && !(b.current.length >= $ && v.current.length >= $ && b.current[$ - 1] && v.current[$ - 1]); L++)
|
|
29177
29180
|
await new Promise(requestAnimationFrame);
|
|
29178
|
-
for (let L = 1; L <=
|
|
29181
|
+
for (let L = 1; L <= $; L++) {
|
|
29179
29182
|
let D = v.current[L - 1], ie = b.current[L - 1];
|
|
29180
29183
|
if ((!D || !ie) && (await new Promise(requestAnimationFrame), D = v.current[L - 1], ie = b.current[L - 1], !D || !ie))
|
|
29181
29184
|
continue;
|
|
@@ -29188,22 +29191,22 @@ function HO({ fileUrl: n, pageNumber: e, onMeta: t, scrollBehavior: i = "auto",
|
|
|
29188
29191
|
P.current = !1, m((N) => N + 1);
|
|
29189
29192
|
}
|
|
29190
29193
|
}
|
|
29191
|
-
}, [j, l]),
|
|
29194
|
+
}, [j, l]), B = nn((N, $) => {
|
|
29192
29195
|
try {
|
|
29193
29196
|
console.log("Original bbox data:", {
|
|
29194
29197
|
bbox: N,
|
|
29195
|
-
pageHeight:
|
|
29198
|
+
pageHeight: $,
|
|
29196
29199
|
coord_origin: N.coord_origin
|
|
29197
29200
|
});
|
|
29198
29201
|
let M = N.l, W = N.t, L = N.r, D = N.b;
|
|
29199
29202
|
if (console.log("Before transformation:", { left: M, top: W, right: L, bottom: D }), N.coord_origin === "BOTTOMLEFT") {
|
|
29200
29203
|
const fe = W, G = D;
|
|
29201
|
-
W =
|
|
29204
|
+
W = $ - G, D = $ - fe, console.log("BOTTOMLEFT transformation:", {
|
|
29202
29205
|
originalTop: fe,
|
|
29203
29206
|
originalBottom: G,
|
|
29204
29207
|
newTop: W,
|
|
29205
29208
|
newBottom: D,
|
|
29206
|
-
pageHeight:
|
|
29209
|
+
pageHeight: $
|
|
29207
29210
|
});
|
|
29208
29211
|
}
|
|
29209
29212
|
console.log("After transformation:", { left: M, top: W, right: L, bottom: D });
|
|
@@ -29218,7 +29221,7 @@ function HO({ fileUrl: n, pageNumber: e, onMeta: t, scrollBehavior: i = "auto",
|
|
|
29218
29221
|
}), ee <= 0 || C <= 0)
|
|
29219
29222
|
return console.warn("Invalid bbox dimensions:", { width: ee, height: C, bbox: N }), null;
|
|
29220
29223
|
const Q = document.createElement("div");
|
|
29221
|
-
return Q.style.position = "absolute", Q.style.left = `${ie}px`, Q.style.top = `${pe}px`, Q.style.width = `${ee}px`, Q.style.height = `${C}px`, Q.style.background = "
|
|
29224
|
+
return Q.style.position = "absolute", Q.style.left = `${ie}px`, Q.style.top = `${pe}px`, Q.style.width = `${ee}px`, Q.style.height = `${C}px`, Q.style.background = "rbga(206, 243, 237, 0.5)", Q.style.borderRadius = "2px", Q.style.boxShadow = "0 0 0 1px rgba(235,240,248,0.6) inset", Q.setAttribute("data-highlight-type", "bbox"), Q;
|
|
29222
29225
|
} catch (M) {
|
|
29223
29226
|
return console.error("Failed to create bbox highlight:", M), null;
|
|
29224
29227
|
}
|
|
@@ -29272,7 +29275,7 @@ function HO({ fileUrl: n, pageNumber: e, onMeta: t, scrollBehavior: i = "auto",
|
|
|
29272
29275
|
`, document.head.querySelector("style[data-pdf-no-select]") || (Vn.setAttribute("data-pdf-no-select", "true"), document.head.appendChild(Vn)), st.setAttribute("data-key", S), D.appendChild(st);
|
|
29273
29276
|
for (const lt of pe)
|
|
29274
29277
|
if (lt.bbox) {
|
|
29275
|
-
const ct =
|
|
29278
|
+
const ct = B(lt.bbox, Et.height);
|
|
29276
29279
|
ct && st.appendChild(ct);
|
|
29277
29280
|
}
|
|
29278
29281
|
}
|
|
@@ -29281,21 +29284,21 @@ function HO({ fileUrl: n, pageNumber: e, onMeta: t, scrollBehavior: i = "auto",
|
|
|
29281
29284
|
}
|
|
29282
29285
|
};
|
|
29283
29286
|
N();
|
|
29284
|
-
const
|
|
29287
|
+
const $ = () => {
|
|
29285
29288
|
requestAnimationFrame(N);
|
|
29286
29289
|
};
|
|
29287
|
-
return window.addEventListener("resize",
|
|
29288
|
-
}, [r, l, g,
|
|
29290
|
+
return window.addEventListener("resize", $), () => window.removeEventListener("resize", $);
|
|
29291
|
+
}, [r, l, g, B]), gn(() => {
|
|
29289
29292
|
let N = !1;
|
|
29290
29293
|
return (async () => {
|
|
29291
29294
|
try {
|
|
29292
29295
|
d(!0), console.debug("[SimplePdfViewer] start load", { fileUrl: n }), await $O();
|
|
29293
|
-
const
|
|
29296
|
+
const $ = H(n), M = `${$}::${s || ""}::${o || ""}::${a || ""}`;
|
|
29294
29297
|
let W = Hy.get(M);
|
|
29295
29298
|
if (!W) {
|
|
29296
29299
|
const D = {};
|
|
29297
29300
|
s && (D["x-client-id"] = s), o && (D["x-api-key"] = o), a && (D.authorization = `Bearer ${a}`), W = await jO({
|
|
29298
|
-
url:
|
|
29301
|
+
url: $,
|
|
29299
29302
|
httpHeaders: Object.keys(D).length > 0 ? D : void 0
|
|
29300
29303
|
}).promise, N || Hy.set(M, W);
|
|
29301
29304
|
}
|
|
@@ -29321,23 +29324,23 @@ function HO({ fileUrl: n, pageNumber: e, onMeta: t, scrollBehavior: i = "auto",
|
|
|
29321
29324
|
_.current = null, E.current = null;
|
|
29322
29325
|
}
|
|
29323
29326
|
await I(), N || d(!1);
|
|
29324
|
-
} catch (
|
|
29325
|
-
const M =
|
|
29326
|
-
console.error("[SimplePdfViewer] load error",
|
|
29327
|
+
} catch ($) {
|
|
29328
|
+
const M = $ instanceof Error ? $.message : "Failed to load PDF";
|
|
29329
|
+
console.error("[SimplePdfViewer] load error", $), N || (p(M), d(!1));
|
|
29327
29330
|
}
|
|
29328
29331
|
})(), () => {
|
|
29329
29332
|
N = !0;
|
|
29330
29333
|
};
|
|
29331
|
-
}, [n, s, o, I, t,
|
|
29334
|
+
}, [n, s, o, I, t, H]), gn(() => {
|
|
29332
29335
|
const N = k.current;
|
|
29333
29336
|
if (!N) return;
|
|
29334
|
-
let
|
|
29337
|
+
let $ = N.clientWidth, M, W = 0;
|
|
29335
29338
|
const L = new ResizeObserver((D) => {
|
|
29336
29339
|
var S;
|
|
29337
29340
|
const ie = (S = D[0]) == null ? void 0 : S.contentRect;
|
|
29338
29341
|
if (!ie) return;
|
|
29339
29342
|
const pe = Math.round(ie.width);
|
|
29340
|
-
Math.abs(pe -
|
|
29343
|
+
Math.abs(pe - $) <= 24 || ($ = pe, clearTimeout(M), cancelAnimationFrame(W), M = setTimeout(() => {
|
|
29341
29344
|
W = requestAnimationFrame(() => {
|
|
29342
29345
|
I();
|
|
29343
29346
|
});
|
|
@@ -29348,20 +29351,20 @@ function HO({ fileUrl: n, pageNumber: e, onMeta: t, scrollBehavior: i = "auto",
|
|
|
29348
29351
|
};
|
|
29349
29352
|
}, [I]), gn(() => {
|
|
29350
29353
|
if (!e || e < 1 || e > (l || 0)) return;
|
|
29351
|
-
const N = k.current,
|
|
29354
|
+
const N = k.current, $ = _.current, M = E.current;
|
|
29352
29355
|
let W = e;
|
|
29353
|
-
if (
|
|
29356
|
+
if ($ && M) {
|
|
29354
29357
|
const S = M.get(e);
|
|
29355
29358
|
if (typeof S == "number") W = S;
|
|
29356
29359
|
else
|
|
29357
|
-
for (let U = 0; U <
|
|
29358
|
-
if (String(
|
|
29360
|
+
for (let U = 0; U < $.length; U++)
|
|
29361
|
+
if (String($[U]).trim() === String(e)) {
|
|
29359
29362
|
W = U + 1;
|
|
29360
29363
|
break;
|
|
29361
29364
|
}
|
|
29362
|
-
} else if (
|
|
29363
|
-
for (let S = 0; S <
|
|
29364
|
-
if (String(
|
|
29365
|
+
} else if ($) {
|
|
29366
|
+
for (let S = 0; S < $.length; S++)
|
|
29367
|
+
if (String($[S]).trim() === String(e)) {
|
|
29365
29368
|
W = S + 1;
|
|
29366
29369
|
break;
|
|
29367
29370
|
}
|
|
@@ -29369,9 +29372,9 @@ function HO({ fileUrl: n, pageNumber: e, onMeta: t, scrollBehavior: i = "auto",
|
|
|
29369
29372
|
console.debug("[SimplePdfViewer] goTo", {
|
|
29370
29373
|
requested: e,
|
|
29371
29374
|
resolvedInternal: W,
|
|
29372
|
-
labelAtResolved:
|
|
29373
|
-
beforeNeighbor:
|
|
29374
|
-
afterNeighbor:
|
|
29375
|
+
labelAtResolved: $ && $[W - 1],
|
|
29376
|
+
beforeNeighbor: $ && $[W - 2],
|
|
29377
|
+
afterNeighbor: $ && $[W]
|
|
29375
29378
|
}), W = Math.max(1, Math.min(l, W));
|
|
29376
29379
|
const L = W - 1, D = b.current[L];
|
|
29377
29380
|
if (!N || !D) return;
|
|
@@ -29398,11 +29401,11 @@ function HO({ fileUrl: n, pageNumber: e, onMeta: t, scrollBehavior: i = "auto",
|
|
|
29398
29401
|
}, [e, l, i, g]), /* @__PURE__ */ T.jsxs("div", { className: "simple-pdf-viewer", style: { position: "relative", width: "100%", height: "100%", overflow: "hidden" }, children: [
|
|
29399
29402
|
h && /* @__PURE__ */ T.jsx("div", { className: "pdf-blocker", children: /* @__PURE__ */ T.jsx("div", { className: "spinner", "aria-label": "Loading PDF viewer" }) }),
|
|
29400
29403
|
!h && f && /* @__PURE__ */ T.jsx("div", { className: "pdf-error", role: "alert", style: { padding: "8px 12px", color: "#b00020" }, children: f }),
|
|
29401
|
-
/* @__PURE__ */ T.jsx("div", { ref: k, className: "simple-pdf-doc", style: { position: "absolute", inset: 0, overflowY: "scroll", overflowX: "hidden", scrollbarGutter: "stable" }, children: Array.from({ length: l }).map((N,
|
|
29404
|
+
/* @__PURE__ */ T.jsx("div", { ref: k, className: "simple-pdf-doc", style: { position: "absolute", inset: 0, overflowY: "scroll", overflowX: "hidden", scrollbarGutter: "stable" }, children: Array.from({ length: l }).map((N, $) => /* @__PURE__ */ T.jsx(
|
|
29402
29405
|
"div",
|
|
29403
29406
|
{
|
|
29404
29407
|
ref: (M) => {
|
|
29405
|
-
M && (b.current[
|
|
29408
|
+
M && (b.current[$] = M);
|
|
29406
29409
|
},
|
|
29407
29410
|
style: {
|
|
29408
29411
|
position: "relative",
|
|
@@ -29413,10 +29416,10 @@ function HO({ fileUrl: n, pageNumber: e, onMeta: t, scrollBehavior: i = "auto",
|
|
|
29413
29416
|
justifyContent: "center"
|
|
29414
29417
|
},
|
|
29415
29418
|
children: /* @__PURE__ */ T.jsx("canvas", { ref: (M) => {
|
|
29416
|
-
M && (v.current[
|
|
29419
|
+
M && (v.current[$] = M);
|
|
29417
29420
|
} })
|
|
29418
29421
|
},
|
|
29419
|
-
|
|
29422
|
+
$
|
|
29420
29423
|
)) })
|
|
29421
29424
|
] });
|
|
29422
29425
|
}
|
|
@@ -29544,7 +29547,7 @@ function YO({ user: n, generateToken: e, clientId: t, apiBase: i, docsBase: r })
|
|
|
29544
29547
|
gn(() => {
|
|
29545
29548
|
k.current = b;
|
|
29546
29549
|
}, [b]);
|
|
29547
|
-
const [P, _] = it([]), [E, O] = it({}), [
|
|
29550
|
+
const [P, _] = it([]), [E, O] = it({}), [H, j] = it({ open: !1 }), [I, B] = it(null), N = ut(null), $ = ut(!0), M = ut(!0), W = ut(0), L = ut(null), D = ut(null), ie = ut(!1), [pe, S] = it(!0), [U, ee] = it(50), [C, Q] = it(!1), [fe, G] = it(!1), [Z, he] = it(null), [Ae, xe] = it(!1), [rt, te] = it(!0), [Et, st] = it(null), $t = ut(null), sn = ut(null), on = ut(null), Vn = ut(void 0), { toasts: lt, pushToast: ct } = qw(), [ui, Ei] = it(null), [to, Er] = it(null), no = ut(null);
|
|
29548
29551
|
gn(() => {
|
|
29549
29552
|
const V = (Te) => {
|
|
29550
29553
|
if (!ui) return;
|
|
@@ -29567,7 +29570,7 @@ function YO({ user: n, generateToken: e, clientId: t, apiBase: i, docsBase: r })
|
|
|
29567
29570
|
gn(() => {
|
|
29568
29571
|
e && Promise.resolve(e()).then(ke).catch(() => ke(void 0));
|
|
29569
29572
|
}, [e]);
|
|
29570
|
-
const Le = nn(({ numPages: V }) =>
|
|
29573
|
+
const Le = nn(({ numPages: V }) => B(V), []), Fe = nn(() => {
|
|
29571
29574
|
const V = N.current;
|
|
29572
29575
|
V && requestAnimationFrame(() => {
|
|
29573
29576
|
try {
|
|
@@ -29593,7 +29596,7 @@ function YO({ user: n, generateToken: e, clientId: t, apiBase: i, docsBase: r })
|
|
|
29593
29596
|
const V = N.current;
|
|
29594
29597
|
if (!V) return;
|
|
29595
29598
|
const Te = V.scrollHeight - V.scrollTop - V.clientHeight <= 80;
|
|
29596
|
-
S(Te), !Te && p && (
|
|
29599
|
+
S(Te), !Te && p && ($.current = !1), Te && ($.current = !0);
|
|
29597
29600
|
}, []), an = nn(async (V) => {
|
|
29598
29601
|
var Te;
|
|
29599
29602
|
x(V), u((ye) => ye.filter((et) => et.role === "system")), v(null), st(null), ee(50), xe(!0);
|
|
@@ -29621,7 +29624,7 @@ function YO({ user: n, generateToken: e, clientId: t, apiBase: i, docsBase: r })
|
|
|
29621
29624
|
var jh, zh;
|
|
29622
29625
|
if (V.preventDefault(), !h.trim() || p) return;
|
|
29623
29626
|
const de = { role: "user", content: h.trim(), createdAt: Date.now() }, Te = [...l, de];
|
|
29624
|
-
u(Te), d(""), g(!0),
|
|
29627
|
+
u(Te), d(""), g(!0), $.current = !0, v(null);
|
|
29625
29628
|
const ye = !1, et = P.length === 0;
|
|
29626
29629
|
let St = "";
|
|
29627
29630
|
const Kt = 500;
|
|
@@ -29736,13 +29739,13 @@ function YO({ user: n, generateToken: e, clientId: t, apiBase: i, docsBase: r })
|
|
|
29736
29739
|
Xi(V, Te === ye ? null : ye);
|
|
29737
29740
|
}, [l, Xi]);
|
|
29738
29741
|
gn(() => {
|
|
29739
|
-
if (p &&
|
|
29742
|
+
if (p && $.current) {
|
|
29740
29743
|
Fe();
|
|
29741
29744
|
return;
|
|
29742
29745
|
}
|
|
29743
29746
|
pe && Fe();
|
|
29744
29747
|
}, [l, p, pe, Fe]), gn(() => {
|
|
29745
|
-
!b || !E[b] || p &&
|
|
29748
|
+
!b || !E[b] || p && $.current && Fe();
|
|
29746
29749
|
}, [E, b, p, Fe]), gn(() => {
|
|
29747
29750
|
var Te;
|
|
29748
29751
|
M.current = !0;
|
|
@@ -30076,11 +30079,11 @@ function YO({ user: n, generateToken: e, clientId: t, apiBase: i, docsBase: r })
|
|
|
30076
30079
|
/* @__PURE__ */ T.jsx(
|
|
30077
30080
|
UO,
|
|
30078
30081
|
{
|
|
30079
|
-
open:
|
|
30080
|
-
file:
|
|
30081
|
-
originalFileName:
|
|
30082
|
-
page:
|
|
30083
|
-
sources:
|
|
30082
|
+
open: H.open,
|
|
30083
|
+
file: H.file,
|
|
30084
|
+
originalFileName: H.originalFileName,
|
|
30085
|
+
page: H.page,
|
|
30086
|
+
sources: H.sources,
|
|
30084
30087
|
numPages: I,
|
|
30085
30088
|
clientId: t,
|
|
30086
30089
|
apiKey: a,
|