@eloquentai/chat-sdk 0.35.0-dev.4 → 0.35.0-dev.6
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/components/chat/chat.d.ts +4 -0
- package/dist/components/chat-interface/types.d.ts +2 -0
- package/dist/index.css +1 -1
- package/dist/index.mjs +453 -450
- package/dist/index.mjs.map +1 -1
- package/dist/{skeleton-CudbH0iY.js → skeleton-Bjh-b-YT.js} +344 -325
- package/dist/{skeleton-CudbH0iY.js.map → skeleton-Bjh-b-YT.js.map} +1 -1
- package/dist/ui.mjs +1 -1
- package/package.json +1 -1
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsx as x, jsxs as Z, Fragment as zt } from "react/jsx-runtime";
|
|
3
3
|
import * as R from "react";
|
|
4
|
-
import { useState as Se, forwardRef as je, createContext as Ar, useContext as Er, createElement as Co, useRef as
|
|
4
|
+
import { useState as Se, forwardRef as je, createContext as Ar, useContext as Er, createElement as Co, useRef as Xe, useEffect as bt, useMemo as qn, useCallback as wa } from "react";
|
|
5
5
|
import * as vc from "react-dom";
|
|
6
6
|
try {
|
|
7
7
|
let e = typeof window < "u" ? window : typeof global < "u" ? global : typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : {}, t = new e.Error().stack;
|
|
8
|
-
t && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[t] = "
|
|
8
|
+
t && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[t] = "ac72e031-86e8-4cdc-8627-1b02e960b157", e._sentryDebugIdIdentifier = "sentry-dbid-ac72e031-86e8-4cdc-8627-1b02e960b157");
|
|
9
9
|
} catch {
|
|
10
10
|
}
|
|
11
11
|
{
|
|
12
12
|
let e = typeof window < "u" ? window : typeof global < "u" ? global : typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : {};
|
|
13
|
-
e.SENTRY_RELEASE = { id: "
|
|
13
|
+
e.SENTRY_RELEASE = { id: "a2b11eb14918d7a6bd525fcdc6606f5cbf7459a1" };
|
|
14
14
|
}
|
|
15
15
|
function ka(e) {
|
|
16
16
|
var t, n, r = "";
|
|
@@ -274,14 +274,14 @@ const Ac = (e, t) => {
|
|
|
274
274
|
}
|
|
275
275
|
w = !1;
|
|
276
276
|
}
|
|
277
|
-
const _ = p.length === 0 ? "" : p.length === 1 ? p[0] : l(p).join(":"),
|
|
278
|
-
if (a.indexOf(
|
|
277
|
+
const _ = p.length === 0 ? "" : p.length === 1 ? p[0] : l(p).join(":"), z = g ? _ + Ao : _, M = z + E;
|
|
278
|
+
if (a.indexOf(M) > -1)
|
|
279
279
|
continue;
|
|
280
|
-
a.push(
|
|
280
|
+
a.push(M);
|
|
281
281
|
const C = o(E, w);
|
|
282
282
|
for (let B = 0; B < C.length; ++B) {
|
|
283
283
|
const N = C[B];
|
|
284
|
-
a.push(
|
|
284
|
+
a.push(z + N);
|
|
285
285
|
}
|
|
286
286
|
u = c + (u.length > 0 ? " " + u : u);
|
|
287
287
|
}
|
|
@@ -314,7 +314,7 @@ const Ac = (e, t) => {
|
|
|
314
314
|
}, Wc = [], ke = (e) => {
|
|
315
315
|
const t = (n) => n[e] || Wc;
|
|
316
316
|
return t.isThemeGetter = !0, t;
|
|
317
|
-
}, Ea = /^\[(?:(\w[\w-]*):)?(.+)\]$/i, Ta = /^\((?:(\w[\w-]*):)?(.+)\)$/i, Gc = /^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/, Yc = /^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/, Xc = /\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/, Kc = /^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/, Jc = /^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/, Qc = /^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/, Lt = (e) => Gc.test(e), ee = (e) => !!e && !Number.isNaN(Number(e)), ht = (e) => !!e && Number.isInteger(Number(e)), Xr = (e) => e.endsWith("%") && ee(e.slice(0, -1)),
|
|
317
|
+
}, Ea = /^\[(?:(\w[\w-]*):)?(.+)\]$/i, Ta = /^\((?:(\w[\w-]*):)?(.+)\)$/i, Gc = /^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/, Yc = /^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/, Xc = /\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/, Kc = /^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/, Jc = /^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/, Qc = /^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/, Lt = (e) => Gc.test(e), ee = (e) => !!e && !Number.isNaN(Number(e)), ht = (e) => !!e && Number.isInteger(Number(e)), Xr = (e) => e.endsWith("%") && ee(e.slice(0, -1)), wt = (e) => Yc.test(e), qa = () => !0, Zc = (e) => (
|
|
318
318
|
// `colorFunctionRegex` check is necessary because color functions can have percentages in them which which would be incorrectly classified as lengths.
|
|
319
319
|
// For example, `hsl(0 0% 0%)` would be classified as a length without this check.
|
|
320
320
|
// I could also use lookbehind assertion in `lengthUnitRegex` but that isn't supported widely enough.
|
|
@@ -326,7 +326,7 @@ const Ac = (e, t) => {
|
|
|
326
326
|
const r = Ta.exec(e);
|
|
327
327
|
return r ? r[1] ? t(r[1]) : n : !1;
|
|
328
328
|
}, _a = (e) => e === "position" || e === "percentage", Ia = (e) => e === "image" || e === "url", Ra = (e) => e === "length" || e === "size" || e === "bg-size", Na = (e) => e === "length", df = (e) => e === "number", La = (e) => e === "family-name", Pa = (e) => e === "number" || e === "weight", Da = (e) => e === "shadow", nl = () => {
|
|
329
|
-
const e = ke("color"), t = ke("font"), n = ke("text"), r = ke("font-weight"), o = ke("tracking"), l = ke("leading"), i = ke("breakpoint"), a = ke("container"), s = ke("spacing"), u = ke("radius"), f = ke("shadow"), c = ke("inset-shadow"), d = ke("text-shadow"), p = ke("drop-shadow"), g = ke("blur"), k = ke("perspective"), v = ke("aspect"), w = ke("ease"), E = ke("animate"), _ = () => ["auto", "avoid", "all", "avoid-page", "page", "left", "right", "column"],
|
|
329
|
+
const e = ke("color"), t = ke("font"), n = ke("text"), r = ke("font-weight"), o = ke("tracking"), l = ke("leading"), i = ke("breakpoint"), a = ke("container"), s = ke("spacing"), u = ke("radius"), f = ke("shadow"), c = ke("inset-shadow"), d = ke("text-shadow"), p = ke("drop-shadow"), g = ke("blur"), k = ke("perspective"), v = ke("aspect"), w = ke("ease"), E = ke("animate"), _ = () => ["auto", "avoid", "all", "avoid-page", "page", "left", "right", "column"], z = () => [
|
|
330
330
|
"center",
|
|
331
331
|
"top",
|
|
332
332
|
"bottom",
|
|
@@ -344,9 +344,9 @@ const Ac = (e, t) => {
|
|
|
344
344
|
"bottom-left",
|
|
345
345
|
// Deprecated since Tailwind CSS v4.1.0, see https://github.com/tailwindlabs/tailwindcss/pull/17378
|
|
346
346
|
"left-bottom"
|
|
347
|
-
],
|
|
347
|
+
], M = () => [...z(), H, U], C = () => ["auto", "hidden", "clip", "visible", "scroll"], B = () => ["auto", "contain", "none"], N = () => [H, U, s], W = () => [Lt, "full", "auto", ...N()], S = () => [ht, "none", "subgrid", H, U], P = () => ["auto", {
|
|
348
348
|
span: ["full", ht, H, U]
|
|
349
|
-
}, ht, H, U],
|
|
349
|
+
}, ht, H, U], F = () => [ht, "auto", H, U], re = () => ["auto", "min", "max", "fr", H, U], V = () => ["start", "end", "center", "between", "around", "evenly", "stretch", "baseline", "center-safe", "end-safe"], D = () => ["start", "end", "center", "stretch", "center-safe", "end-safe"], J = () => ["auto", ...N()], ae = () => [Lt, "auto", "full", "dvw", "dvh", "lvw", "lvh", "svw", "svh", "min", "max", "fit", ...N()], Ee = () => [Lt, "screen", "full", "dvw", "lvw", "svw", "min", "max", "fit", ...N()], Le = () => [Lt, "screen", "full", "lh", "dvh", "lvh", "svh", "min", "max", "fit", ...N()], m = () => [e, H, U], ve = () => [...z(), tl, el, {
|
|
350
350
|
position: [H, U]
|
|
351
351
|
}], Pe = () => ["no-repeat", {
|
|
352
352
|
repeat: ["", "x", "y", "space", "round"]
|
|
@@ -360,7 +360,7 @@ const Ac = (e, t) => {
|
|
|
360
360
|
u,
|
|
361
361
|
H,
|
|
362
362
|
U
|
|
363
|
-
], j = () => ["", ee, _n, Wt],
|
|
363
|
+
], j = () => ["", ee, _n, Wt], Je = () => ["solid", "dashed", "dotted", "double"], $e = () => ["normal", "multiply", "screen", "overlay", "darken", "lighten", "color-dodge", "color-burn", "hard-light", "soft-light", "difference", "exclusion", "hue", "saturation", "color", "luminosity"], ce = () => [ee, Xr, tl, el], it = () => [
|
|
364
364
|
// Deprecated since Tailwind CSS v4.0.0
|
|
365
365
|
"",
|
|
366
366
|
"none",
|
|
@@ -373,22 +373,22 @@ const Ac = (e, t) => {
|
|
|
373
373
|
theme: {
|
|
374
374
|
animate: ["spin", "ping", "pulse", "bounce"],
|
|
375
375
|
aspect: ["video"],
|
|
376
|
-
blur: [
|
|
377
|
-
breakpoint: [
|
|
376
|
+
blur: [wt],
|
|
377
|
+
breakpoint: [wt],
|
|
378
378
|
color: [qa],
|
|
379
|
-
container: [
|
|
380
|
-
"drop-shadow": [
|
|
379
|
+
container: [wt],
|
|
380
|
+
"drop-shadow": [wt],
|
|
381
381
|
ease: ["in", "out", "in-out"],
|
|
382
382
|
font: [nf],
|
|
383
383
|
"font-weight": ["thin", "extralight", "light", "normal", "medium", "semibold", "bold", "extrabold", "black"],
|
|
384
|
-
"inset-shadow": [
|
|
384
|
+
"inset-shadow": [wt],
|
|
385
385
|
leading: ["none", "tight", "snug", "normal", "relaxed", "loose"],
|
|
386
386
|
perspective: ["dramatic", "near", "normal", "midrange", "distant", "none"],
|
|
387
|
-
radius: [
|
|
388
|
-
shadow: [
|
|
387
|
+
radius: [wt],
|
|
388
|
+
shadow: [wt],
|
|
389
389
|
spacing: ["px", ee],
|
|
390
|
-
text: [
|
|
391
|
-
"text-shadow": [
|
|
390
|
+
text: [wt],
|
|
391
|
+
"text-shadow": [wt],
|
|
392
392
|
tracking: ["tighter", "tight", "normal", "wide", "wider", "widest"]
|
|
393
393
|
},
|
|
394
394
|
classGroups: {
|
|
@@ -503,7 +503,7 @@ const Ac = (e, t) => {
|
|
|
503
503
|
* @see https://tailwindcss.com/docs/object-position
|
|
504
504
|
*/
|
|
505
505
|
"object-position": [{
|
|
506
|
-
object:
|
|
506
|
+
object: M()
|
|
507
507
|
}],
|
|
508
508
|
/**
|
|
509
509
|
* Overflow
|
|
@@ -724,14 +724,14 @@ const Ac = (e, t) => {
|
|
|
724
724
|
* @see https://tailwindcss.com/docs/grid-column
|
|
725
725
|
*/
|
|
726
726
|
"col-start": [{
|
|
727
|
-
"col-start":
|
|
727
|
+
"col-start": F()
|
|
728
728
|
}],
|
|
729
729
|
/**
|
|
730
730
|
* Grid Column End
|
|
731
731
|
* @see https://tailwindcss.com/docs/grid-column
|
|
732
732
|
*/
|
|
733
733
|
"col-end": [{
|
|
734
|
-
"col-end":
|
|
734
|
+
"col-end": F()
|
|
735
735
|
}],
|
|
736
736
|
/**
|
|
737
737
|
* Grid Template Rows
|
|
@@ -752,14 +752,14 @@ const Ac = (e, t) => {
|
|
|
752
752
|
* @see https://tailwindcss.com/docs/grid-row
|
|
753
753
|
*/
|
|
754
754
|
"row-start": [{
|
|
755
|
-
"row-start":
|
|
755
|
+
"row-start": F()
|
|
756
756
|
}],
|
|
757
757
|
/**
|
|
758
758
|
* Grid Row End
|
|
759
759
|
* @see https://tailwindcss.com/docs/grid-row
|
|
760
760
|
*/
|
|
761
761
|
"row-end": [{
|
|
762
|
-
"row-end":
|
|
762
|
+
"row-end": F()
|
|
763
763
|
}],
|
|
764
764
|
/**
|
|
765
765
|
* Grid Auto Flow
|
|
@@ -1316,7 +1316,7 @@ const Ac = (e, t) => {
|
|
|
1316
1316
|
* @see https://tailwindcss.com/docs/text-decoration-style
|
|
1317
1317
|
*/
|
|
1318
1318
|
"text-decoration-style": [{
|
|
1319
|
-
decoration: [...
|
|
1319
|
+
decoration: [...Je(), "wavy"]
|
|
1320
1320
|
}],
|
|
1321
1321
|
/**
|
|
1322
1322
|
* Text Decoration Thickness
|
|
@@ -1733,14 +1733,14 @@ const Ac = (e, t) => {
|
|
|
1733
1733
|
* @see https://tailwindcss.com/docs/border-style
|
|
1734
1734
|
*/
|
|
1735
1735
|
"border-style": [{
|
|
1736
|
-
border: [...
|
|
1736
|
+
border: [...Je(), "hidden", "none"]
|
|
1737
1737
|
}],
|
|
1738
1738
|
/**
|
|
1739
1739
|
* Divide Style
|
|
1740
1740
|
* @see https://tailwindcss.com/docs/border-style#setting-the-divider-style
|
|
1741
1741
|
*/
|
|
1742
1742
|
"divide-style": [{
|
|
1743
|
-
divide: [...
|
|
1743
|
+
divide: [...Je(), "hidden", "none"]
|
|
1744
1744
|
}],
|
|
1745
1745
|
/**
|
|
1746
1746
|
* Border Color
|
|
@@ -1831,7 +1831,7 @@ const Ac = (e, t) => {
|
|
|
1831
1831
|
* @see https://tailwindcss.com/docs/outline-style
|
|
1832
1832
|
*/
|
|
1833
1833
|
"outline-style": [{
|
|
1834
|
-
outline: [...
|
|
1834
|
+
outline: [...Je(), "none", "hidden"]
|
|
1835
1835
|
}],
|
|
1836
1836
|
/**
|
|
1837
1837
|
* Outline Offset
|
|
@@ -2110,7 +2110,7 @@ const Ac = (e, t) => {
|
|
|
2110
2110
|
}]
|
|
2111
2111
|
}],
|
|
2112
2112
|
"mask-image-radial-pos": [{
|
|
2113
|
-
"mask-radial-at":
|
|
2113
|
+
"mask-radial-at": z()
|
|
2114
2114
|
}],
|
|
2115
2115
|
"mask-image-conic-pos": [{
|
|
2116
2116
|
"mask-conic": [ee]
|
|
@@ -2457,7 +2457,7 @@ const Ac = (e, t) => {
|
|
|
2457
2457
|
* @see https://tailwindcss.com/docs/perspective-origin
|
|
2458
2458
|
*/
|
|
2459
2459
|
"perspective-origin": [{
|
|
2460
|
-
"perspective-origin":
|
|
2460
|
+
"perspective-origin": M()
|
|
2461
2461
|
}],
|
|
2462
2462
|
/**
|
|
2463
2463
|
* Rotate
|
|
@@ -2553,7 +2553,7 @@ const Ac = (e, t) => {
|
|
|
2553
2553
|
* @see https://tailwindcss.com/docs/transform-origin
|
|
2554
2554
|
*/
|
|
2555
2555
|
"transform-origin": [{
|
|
2556
|
-
origin:
|
|
2556
|
+
origin: M()
|
|
2557
2557
|
}],
|
|
2558
2558
|
/**
|
|
2559
2559
|
* Transform Style
|
|
@@ -3738,12 +3738,12 @@ function Ja(e) {
|
|
|
3738
3738
|
return n ? e.ref : (t = Object.getOwnPropertyDescriptor(e, "ref")?.get, n = t && "isReactWarning" in t && t.isReactWarning, n ? e.props.ref : e.props.ref || e.ref);
|
|
3739
3739
|
}
|
|
3740
3740
|
Ct(Ja, "getElementRef");
|
|
3741
|
-
var pp = Object.defineProperty,
|
|
3741
|
+
var pp = Object.defineProperty, rt = (e, t) => pp(e, "name", { value: t, configurable: !0 });
|
|
3742
3742
|
// @__NO_SIDE_EFFECTS__
|
|
3743
3743
|
function dp(e, t) {
|
|
3744
3744
|
const n = R.createContext(t);
|
|
3745
3745
|
n.displayName = e + "Context";
|
|
3746
|
-
const r = /* @__PURE__ */
|
|
3746
|
+
const r = /* @__PURE__ */ rt((l) => {
|
|
3747
3747
|
const { children: i, ...a } = l, s = R.useMemo(() => a, Object.values(a));
|
|
3748
3748
|
return /* @__PURE__ */ x(n.Provider, { value: s, children: i });
|
|
3749
3749
|
}, "Provider");
|
|
@@ -3755,9 +3755,9 @@ function dp(e, t) {
|
|
|
3755
3755
|
if (!a)
|
|
3756
3756
|
throw new Error(`\`${l}\` must be used within \`${e}\``);
|
|
3757
3757
|
}
|
|
3758
|
-
return
|
|
3758
|
+
return rt(o, "useContext"), [r, o];
|
|
3759
3759
|
}
|
|
3760
|
-
|
|
3760
|
+
rt(dp, "createContext");
|
|
3761
3761
|
// @__NO_SIDE_EFFECTS__
|
|
3762
3762
|
function ni(e, t = []) {
|
|
3763
3763
|
let n = [];
|
|
@@ -3766,7 +3766,7 @@ function ni(e, t = []) {
|
|
|
3766
3766
|
a.displayName = l + "Context";
|
|
3767
3767
|
const s = n.length;
|
|
3768
3768
|
n = [...n, i];
|
|
3769
|
-
const u = /* @__PURE__ */
|
|
3769
|
+
const u = /* @__PURE__ */ rt((c) => {
|
|
3770
3770
|
const { scope: d, children: p, ...g } = c, k = d?.[e]?.[s] || a, v = R.useMemo(() => g, Object.values(g));
|
|
3771
3771
|
return /* @__PURE__ */ x(k.Provider, { value: v, children: p });
|
|
3772
3772
|
}, "Provider");
|
|
@@ -3778,12 +3778,12 @@ function ni(e, t = []) {
|
|
|
3778
3778
|
if (!g)
|
|
3779
3779
|
throw new Error(`\`${c}\` must be used within \`${l}\``);
|
|
3780
3780
|
}
|
|
3781
|
-
return
|
|
3781
|
+
return rt(f, "useContext"), [u, f];
|
|
3782
3782
|
}
|
|
3783
|
-
|
|
3784
|
-
const o = /* @__PURE__ */
|
|
3783
|
+
rt(r, "createContext");
|
|
3784
|
+
const o = /* @__PURE__ */ rt(() => {
|
|
3785
3785
|
const l = n.map((i) => R.createContext(i));
|
|
3786
|
-
return /* @__PURE__ */
|
|
3786
|
+
return /* @__PURE__ */ rt(function(a) {
|
|
3787
3787
|
const s = a?.[e] || l;
|
|
3788
3788
|
return R.useMemo(
|
|
3789
3789
|
() => ({ [`__scope${e}`]: { ...a, [e]: s } }),
|
|
@@ -3793,16 +3793,16 @@ function ni(e, t = []) {
|
|
|
3793
3793
|
}, "createScope");
|
|
3794
3794
|
return o.scopeName = e, [r, Qa(o, ...t)];
|
|
3795
3795
|
}
|
|
3796
|
-
|
|
3796
|
+
rt(ni, "createContextScope");
|
|
3797
3797
|
function Qa(...e) {
|
|
3798
3798
|
const t = e[0];
|
|
3799
3799
|
if (e.length === 1) return t;
|
|
3800
|
-
const n = /* @__PURE__ */
|
|
3800
|
+
const n = /* @__PURE__ */ rt(() => {
|
|
3801
3801
|
const r = e.map((o) => ({
|
|
3802
3802
|
useScope: o(),
|
|
3803
3803
|
scopeName: o.scopeName
|
|
3804
3804
|
}));
|
|
3805
|
-
return /* @__PURE__ */
|
|
3805
|
+
return /* @__PURE__ */ rt(function(l) {
|
|
3806
3806
|
const i = r.reduce((a, { useScope: s, scopeName: u }) => {
|
|
3807
3807
|
const c = s(l)[`__scope${u}`];
|
|
3808
3808
|
return { ...a, ...c };
|
|
@@ -3812,15 +3812,15 @@ function Qa(...e) {
|
|
|
3812
3812
|
}, "createScope");
|
|
3813
3813
|
return n.scopeName = t.scopeName, n;
|
|
3814
3814
|
}
|
|
3815
|
-
|
|
3815
|
+
rt(Qa, "composeContextScopes");
|
|
3816
3816
|
var hp = Object.defineProperty, mp = (e, t) => hp(e, "name", { value: t, configurable: !0 });
|
|
3817
|
-
function
|
|
3817
|
+
function vt(e) {
|
|
3818
3818
|
const t = R.useRef(e);
|
|
3819
3819
|
return R.useEffect(() => {
|
|
3820
3820
|
t.current = e;
|
|
3821
3821
|
}), R.useMemo(() => ((...n) => t.current?.(...n)), []);
|
|
3822
3822
|
}
|
|
3823
|
-
mp(
|
|
3823
|
+
mp(vt, "useCallbackRef");
|
|
3824
3824
|
var gp = Object.defineProperty, bp = (e, t) => gp(e, "name", { value: t, configurable: !0 }), yp = R.createContext(void 0);
|
|
3825
3825
|
function Za(e) {
|
|
3826
3826
|
const t = R.useContext(yp);
|
|
@@ -3886,7 +3886,7 @@ var is = "ScrollArea", [ls, Ck] = /* @__PURE__ */ ni(is), [Cp, ot] = ls(is), as
|
|
|
3886
3886
|
dir: l,
|
|
3887
3887
|
scrollHideDelay: i = 600,
|
|
3888
3888
|
...a
|
|
3889
|
-
} = t, [s, u] = R.useState(null), [f, c] = R.useState(null), [d, p] = R.useState(null), [g, k] = R.useState(null), [v, w] = R.useState(null), [E, _] = R.useState(0), [
|
|
3889
|
+
} = t, [s, u] = R.useState(null), [f, c] = R.useState(null), [d, p] = R.useState(null), [g, k] = R.useState(null), [v, w] = R.useState(null), [E, _] = R.useState(0), [z, M] = R.useState(0), [C, B] = R.useState(!1), [N, W] = R.useState(!1), S = Bt(n, u), P = Za(l);
|
|
3890
3890
|
return /* @__PURE__ */ x(
|
|
3891
3891
|
Cp,
|
|
3892
3892
|
{
|
|
@@ -3908,7 +3908,7 @@ var is = "ScrollArea", [ls, Ck] = /* @__PURE__ */ ni(is), [Cp, ot] = ls(is), as
|
|
|
3908
3908
|
scrollbarYEnabled: N,
|
|
3909
3909
|
onScrollbarYEnabledChange: W,
|
|
3910
3910
|
onCornerWidthChange: _,
|
|
3911
|
-
onCornerHeightChange:
|
|
3911
|
+
onCornerHeightChange: M,
|
|
3912
3912
|
children: /* @__PURE__ */ x(
|
|
3913
3913
|
Ut.div,
|
|
3914
3914
|
{
|
|
@@ -3919,7 +3919,7 @@ var is = "ScrollArea", [ls, Ck] = /* @__PURE__ */ ni(is), [Cp, ot] = ls(is), as
|
|
|
3919
3919
|
position: "relative",
|
|
3920
3920
|
// Pass corner sizes as CSS vars to reduce re-renders of context consumers
|
|
3921
3921
|
"--radix-scroll-area-corner-width": E + "px",
|
|
3922
|
-
"--radix-scroll-area-corner-height":
|
|
3922
|
+
"--radix-scroll-area-corner-height": z + "px",
|
|
3923
3923
|
...t.style
|
|
3924
3924
|
}
|
|
3925
3925
|
}
|
|
@@ -4209,29 +4209,29 @@ var is = "ScrollArea", [ls, Ck] = /* @__PURE__ */ ni(is), [Cp, ot] = ls(is), as
|
|
|
4209
4209
|
onWheelScroll: c,
|
|
4210
4210
|
onResize: d,
|
|
4211
4211
|
...p
|
|
4212
|
-
} = t, g = ot(Et, r), [k, v] = R.useState(null), w = Bt(n, v), E = R.useRef(null), _ = R.useRef(""),
|
|
4212
|
+
} = t, g = ot(Et, r), [k, v] = R.useState(null), w = Bt(n, v), E = R.useRef(null), _ = R.useRef(""), z = g.viewport, M = o.content - o.viewport, C = vt(c), B = vt(u), N = Yn(d, 10);
|
|
4213
4213
|
function W(S) {
|
|
4214
4214
|
if (E.current) {
|
|
4215
|
-
const P = S.clientX - E.current.left,
|
|
4216
|
-
f({ x: P, y:
|
|
4215
|
+
const P = S.clientX - E.current.left, F = S.clientY - E.current.top;
|
|
4216
|
+
f({ x: P, y: F });
|
|
4217
4217
|
}
|
|
4218
4218
|
}
|
|
4219
4219
|
return ie(W, "handleDragScroll"), R.useEffect(() => {
|
|
4220
4220
|
const S = /* @__PURE__ */ ie((P) => {
|
|
4221
|
-
const
|
|
4222
|
-
k?.contains(
|
|
4221
|
+
const F = P.target;
|
|
4222
|
+
k?.contains(F) && C(P, M);
|
|
4223
4223
|
}, "handleWheel");
|
|
4224
4224
|
return document.addEventListener("wheel", S, { passive: !1 }), () => document.removeEventListener("wheel", S, { passive: !1 });
|
|
4225
|
-
}, [
|
|
4225
|
+
}, [z, k, M, C]), R.useEffect(B, [o, B]), Zt(k, N), Zt(g.content, N), /* @__PURE__ */ x(
|
|
4226
4226
|
Np,
|
|
4227
4227
|
{
|
|
4228
4228
|
scope: r,
|
|
4229
4229
|
scrollbar: k,
|
|
4230
4230
|
hasThumb: l,
|
|
4231
|
-
onThumbChange:
|
|
4232
|
-
onThumbPointerUp:
|
|
4231
|
+
onThumbChange: vt(i),
|
|
4232
|
+
onThumbPointerUp: vt(a),
|
|
4233
4233
|
onThumbPositionChange: B,
|
|
4234
|
-
onThumbPointerDown:
|
|
4234
|
+
onThumbPointerDown: vt(s),
|
|
4235
4235
|
children: /* @__PURE__ */ x(
|
|
4236
4236
|
Ut.div,
|
|
4237
4237
|
{
|
|
@@ -4370,14 +4370,14 @@ var Mp = /* @__PURE__ */ ie((e, t = () => {
|
|
|
4370
4370
|
}), "loop"))(), () => window.cancelAnimationFrame(r);
|
|
4371
4371
|
}, "addUnlinkedScrollListener");
|
|
4372
4372
|
function Yn(e, t) {
|
|
4373
|
-
const n =
|
|
4373
|
+
const n = vt(e), r = R.useRef(0);
|
|
4374
4374
|
return R.useEffect(() => () => window.clearTimeout(r.current), []), R.useCallback(() => {
|
|
4375
4375
|
window.clearTimeout(r.current), r.current = window.setTimeout(n, t);
|
|
4376
4376
|
}, [n, t]);
|
|
4377
4377
|
}
|
|
4378
4378
|
ie(Yn, "useDebounceCallback");
|
|
4379
4379
|
function Zt(e, t) {
|
|
4380
|
-
const n =
|
|
4380
|
+
const n = vt(t);
|
|
4381
4381
|
Un(() => {
|
|
4382
4382
|
let r = 0;
|
|
4383
4383
|
if (e) {
|
|
@@ -5713,13 +5713,13 @@ function ad() {
|
|
|
5713
5713
|
if (!v) return [];
|
|
5714
5714
|
w = w || {};
|
|
5715
5715
|
var E = 1, _ = 1;
|
|
5716
|
-
function
|
|
5716
|
+
function z(V) {
|
|
5717
5717
|
var D = V.match(t);
|
|
5718
5718
|
D && (E += D.length);
|
|
5719
5719
|
var J = V.lastIndexOf(s);
|
|
5720
5720
|
_ = ~J ? V.length - J : _ + V.length;
|
|
5721
5721
|
}
|
|
5722
|
-
function
|
|
5722
|
+
function M() {
|
|
5723
5723
|
var V = { line: E, column: _ };
|
|
5724
5724
|
return function(D) {
|
|
5725
5725
|
return D.position = new C(V), W(), D;
|
|
@@ -5739,7 +5739,7 @@ function ad() {
|
|
|
5739
5739
|
var D = V.exec(v);
|
|
5740
5740
|
if (D) {
|
|
5741
5741
|
var J = D[0];
|
|
5742
|
-
return
|
|
5742
|
+
return z(J), v = v.slice(J.length), D;
|
|
5743
5743
|
}
|
|
5744
5744
|
}
|
|
5745
5745
|
function W() {
|
|
@@ -5752,21 +5752,21 @@ function ad() {
|
|
|
5752
5752
|
return V;
|
|
5753
5753
|
}
|
|
5754
5754
|
function P() {
|
|
5755
|
-
var V =
|
|
5755
|
+
var V = M();
|
|
5756
5756
|
if (!(u != v.charAt(0) || f != v.charAt(1))) {
|
|
5757
5757
|
for (var D = 2; c != v.charAt(D) && (f != v.charAt(D) || u != v.charAt(D + 1)); )
|
|
5758
5758
|
++D;
|
|
5759
5759
|
if (D += 2, c === v.charAt(D - 1))
|
|
5760
5760
|
return B("End of comment missing");
|
|
5761
5761
|
var J = v.slice(2, D - 2);
|
|
5762
|
-
return _ += 2,
|
|
5762
|
+
return _ += 2, z(J), v = v.slice(D), _ += 2, V({
|
|
5763
5763
|
type: d,
|
|
5764
5764
|
comment: J
|
|
5765
5765
|
});
|
|
5766
5766
|
}
|
|
5767
5767
|
}
|
|
5768
|
-
function
|
|
5769
|
-
var V =
|
|
5768
|
+
function F() {
|
|
5769
|
+
var V = M(), D = N(r);
|
|
5770
5770
|
if (D) {
|
|
5771
5771
|
if (P(), !N(o)) return B("property missing ':'");
|
|
5772
5772
|
var J = N(l), ae = V({
|
|
@@ -5780,7 +5780,7 @@ function ad() {
|
|
|
5780
5780
|
function re() {
|
|
5781
5781
|
var V = [];
|
|
5782
5782
|
S(V);
|
|
5783
|
-
for (var D; D =
|
|
5783
|
+
for (var D; D = F(); )
|
|
5784
5784
|
D !== !1 && (V.push(D), S(V));
|
|
5785
5785
|
return V;
|
|
5786
5786
|
}
|
|
@@ -8429,7 +8429,7 @@ const ml = {
|
|
|
8429
8429
|
function hi(e) {
|
|
8430
8430
|
return Dd.call(ml, e) ? ml[e] : !1;
|
|
8431
8431
|
}
|
|
8432
|
-
function
|
|
8432
|
+
function Ke(e, t, n, r) {
|
|
8433
8433
|
const o = e.length;
|
|
8434
8434
|
let l = 0, i;
|
|
8435
8435
|
if (t < 0 ? t = -t > o ? 0 : o + t : t = t > o ? o : t, n = n > 0 ? n : 0, r.length < 1e4)
|
|
@@ -8438,8 +8438,8 @@ function Xe(e, t, n, r) {
|
|
|
8438
8438
|
for (n && e.splice(t, n); l < r.length; )
|
|
8439
8439
|
i = r.slice(l, l + 1e4), i.unshift(t, 0), e.splice(...i), l += 1e4, t += 1e4;
|
|
8440
8440
|
}
|
|
8441
|
-
function
|
|
8442
|
-
return e.length > 0 ? (
|
|
8441
|
+
function nt(e, t) {
|
|
8442
|
+
return e.length > 0 ? (Ke(e, e.length, 0, t), e) : t;
|
|
8443
8443
|
}
|
|
8444
8444
|
const gl = {}.hasOwnProperty;
|
|
8445
8445
|
function Ds(e) {
|
|
@@ -8471,7 +8471,7 @@ function Md(e, t) {
|
|
|
8471
8471
|
const r = [];
|
|
8472
8472
|
for (; ++n < t.length; )
|
|
8473
8473
|
(t[n].add === "after" ? e : r).push(t[n]);
|
|
8474
|
-
|
|
8474
|
+
Ke(e, 0, 0, r);
|
|
8475
8475
|
}
|
|
8476
8476
|
function Os(e, t) {
|
|
8477
8477
|
const n = Number.parseInt(e, t);
|
|
@@ -8587,28 +8587,28 @@ function Vd(e) {
|
|
|
8587
8587
|
return a;
|
|
8588
8588
|
function a(_) {
|
|
8589
8589
|
if (r < n.length) {
|
|
8590
|
-
const
|
|
8591
|
-
return t.containerState =
|
|
8590
|
+
const z = n[r];
|
|
8591
|
+
return t.containerState = z[1], e.attempt(z[0].continuation, s, u)(_);
|
|
8592
8592
|
}
|
|
8593
8593
|
return u(_);
|
|
8594
8594
|
}
|
|
8595
8595
|
function s(_) {
|
|
8596
8596
|
if (r++, t.containerState._closeFlow) {
|
|
8597
8597
|
t.containerState._closeFlow = void 0, o && E();
|
|
8598
|
-
const
|
|
8599
|
-
let
|
|
8600
|
-
for (;
|
|
8601
|
-
if (t.events[
|
|
8602
|
-
C = t.events[
|
|
8598
|
+
const z = t.events.length;
|
|
8599
|
+
let M = z, C;
|
|
8600
|
+
for (; M--; )
|
|
8601
|
+
if (t.events[M][0] === "exit" && t.events[M][1].type === "chunkFlow") {
|
|
8602
|
+
C = t.events[M][1].end;
|
|
8603
8603
|
break;
|
|
8604
8604
|
}
|
|
8605
8605
|
w(r);
|
|
8606
|
-
let B =
|
|
8606
|
+
let B = z;
|
|
8607
8607
|
for (; B < t.events.length; )
|
|
8608
8608
|
t.events[B][1].end = {
|
|
8609
8609
|
...C
|
|
8610
8610
|
}, B++;
|
|
8611
|
-
return
|
|
8611
|
+
return Ke(t.events, M + 1, 0, t.events.slice(z)), t.events.length = B, u(_);
|
|
8612
8612
|
}
|
|
8613
8613
|
return a(_);
|
|
8614
8614
|
}
|
|
@@ -8652,9 +8652,9 @@ function Vd(e) {
|
|
|
8652
8652
|
}
|
|
8653
8653
|
return Y(_) ? (e.consume(_), v(e.exit("chunkFlow")), r = 0, t.interrupt = void 0, a) : (e.consume(_), k);
|
|
8654
8654
|
}
|
|
8655
|
-
function v(_,
|
|
8656
|
-
const
|
|
8657
|
-
if (
|
|
8655
|
+
function v(_, z) {
|
|
8656
|
+
const M = t.sliceStream(_);
|
|
8657
|
+
if (z && M.push(null), _.previous = l, l && (l.next = _), l = _, o.defineSkip(_.start), o.write(M), t.parser.lazy[_.start.line]) {
|
|
8658
8658
|
let C = o.events.length;
|
|
8659
8659
|
for (; C--; )
|
|
8660
8660
|
if (
|
|
@@ -8678,14 +8678,14 @@ function Vd(e) {
|
|
|
8678
8678
|
t.events[C][1].end = {
|
|
8679
8679
|
...S
|
|
8680
8680
|
}, C++;
|
|
8681
|
-
|
|
8681
|
+
Ke(t.events, N + 1, 0, t.events.slice(B)), t.events.length = C;
|
|
8682
8682
|
}
|
|
8683
8683
|
}
|
|
8684
8684
|
function w(_) {
|
|
8685
|
-
let
|
|
8686
|
-
for (;
|
|
8687
|
-
const
|
|
8688
|
-
t.containerState =
|
|
8685
|
+
let z = n.length;
|
|
8686
|
+
for (; z-- > _; ) {
|
|
8687
|
+
const M = n[z];
|
|
8688
|
+
t.containerState = M[1], M[0].exit.call(t, e);
|
|
8689
8689
|
}
|
|
8690
8690
|
n.length = _;
|
|
8691
8691
|
}
|
|
@@ -8763,7 +8763,7 @@ function Wd(e, t) {
|
|
|
8763
8763
|
...i.start
|
|
8764
8764
|
}, e[n][1].start = {
|
|
8765
8765
|
...a.end
|
|
8766
|
-
}, u = [], e[r][1].end.offset - e[r][1].start.offset && (u =
|
|
8766
|
+
}, u = [], e[r][1].end.offset - e[r][1].start.offset && (u = nt(u, [["enter", e[r][1], t], ["exit", e[r][1], t]])), u = nt(u, [["enter", o, t], ["enter", i, t], ["exit", i, t], ["enter", l, t]]), u = nt(u, _r(t.parser.constructs.insideSpan.null, e.slice(r + 1, n), t)), u = nt(u, [["exit", l, t], ["enter", a, t], ["exit", a, t], ["exit", o, t]]), e[n][1].end.offset - e[n][1].start.offset ? (f = 2, u = nt(u, [["enter", e[n][1], t], ["exit", e[n][1], t]])) : f = 0, Ke(e, r - 1, n - r + 3, u), n = r + u.length - f - 2;
|
|
8767
8767
|
break;
|
|
8768
8768
|
}
|
|
8769
8769
|
}
|
|
@@ -8926,7 +8926,7 @@ const xl = {
|
|
|
8926
8926
|
function nh(e, t, n) {
|
|
8927
8927
|
const r = this, o = {
|
|
8928
8928
|
partial: !0,
|
|
8929
|
-
tokenize:
|
|
8929
|
+
tokenize: M
|
|
8930
8930
|
};
|
|
8931
8931
|
let l = 0, i = 0, a;
|
|
8932
8932
|
return s;
|
|
@@ -8941,7 +8941,7 @@ function nh(e, t, n) {
|
|
|
8941
8941
|
return C === a ? (i++, e.consume(C), f) : i < 3 ? n(C) : (e.exit("codeFencedFenceSequence"), oe(C) ? se(e, c, "whitespace")(C) : c(C));
|
|
8942
8942
|
}
|
|
8943
8943
|
function c(C) {
|
|
8944
|
-
return C === null || Y(C) ? (e.exit("codeFencedFence"), r.interrupt ? t(C) : e.check(xl, k,
|
|
8944
|
+
return C === null || Y(C) ? (e.exit("codeFencedFence"), r.interrupt ? t(C) : e.check(xl, k, z)(C)) : (e.enter("codeFencedFenceInfo"), e.enter("chunkString", {
|
|
8945
8945
|
contentType: "string"
|
|
8946
8946
|
}), d(C));
|
|
8947
8947
|
}
|
|
@@ -8957,7 +8957,7 @@ function nh(e, t, n) {
|
|
|
8957
8957
|
return C === null || Y(C) ? (e.exit("chunkString"), e.exit("codeFencedFenceMeta"), c(C)) : C === 96 && C === a ? n(C) : (e.consume(C), g);
|
|
8958
8958
|
}
|
|
8959
8959
|
function k(C) {
|
|
8960
|
-
return e.attempt(o,
|
|
8960
|
+
return e.attempt(o, z, v)(C);
|
|
8961
8961
|
}
|
|
8962
8962
|
function v(C) {
|
|
8963
8963
|
return e.enter("lineEnding"), e.consume(C), e.exit("lineEnding"), w;
|
|
@@ -8966,24 +8966,24 @@ function nh(e, t, n) {
|
|
|
8966
8966
|
return l > 0 && oe(C) ? se(e, E, "linePrefix", l + 1)(C) : E(C);
|
|
8967
8967
|
}
|
|
8968
8968
|
function E(C) {
|
|
8969
|
-
return C === null || Y(C) ? e.check(xl, k,
|
|
8969
|
+
return C === null || Y(C) ? e.check(xl, k, z)(C) : (e.enter("codeFlowValue"), _(C));
|
|
8970
8970
|
}
|
|
8971
8971
|
function _(C) {
|
|
8972
8972
|
return C === null || Y(C) ? (e.exit("codeFlowValue"), E(C)) : (e.consume(C), _);
|
|
8973
8973
|
}
|
|
8974
|
-
function
|
|
8974
|
+
function z(C) {
|
|
8975
8975
|
return e.exit("codeFenced"), t(C);
|
|
8976
8976
|
}
|
|
8977
|
-
function
|
|
8977
|
+
function M(C, B, N) {
|
|
8978
8978
|
let W = 0;
|
|
8979
8979
|
return S;
|
|
8980
8980
|
function S(D) {
|
|
8981
8981
|
return C.enter("lineEnding"), C.consume(D), C.exit("lineEnding"), P;
|
|
8982
8982
|
}
|
|
8983
8983
|
function P(D) {
|
|
8984
|
-
return C.enter("codeFencedFence"), oe(D) ? se(C,
|
|
8984
|
+
return C.enter("codeFencedFence"), oe(D) ? se(C, F, "linePrefix", r.parser.constructs.disable.null.includes("codeIndented") ? void 0 : 4)(D) : F(D);
|
|
8985
8985
|
}
|
|
8986
|
-
function
|
|
8986
|
+
function F(D) {
|
|
8987
8987
|
return D === a ? (C.enter("codeFencedFenceSequence"), re(D)) : N(D);
|
|
8988
8988
|
}
|
|
8989
8989
|
function re(D) {
|
|
@@ -9277,7 +9277,7 @@ function Bs(e) {
|
|
|
9277
9277
|
}, a = f.slice(o, n), a.unshift(r), f.splice(o, n - o + 1, a));
|
|
9278
9278
|
}
|
|
9279
9279
|
}
|
|
9280
|
-
return
|
|
9280
|
+
return Ke(e, 0, Number.POSITIVE_INFINITY, f.slice(0)), !u;
|
|
9281
9281
|
}
|
|
9282
9282
|
function ph(e, t) {
|
|
9283
9283
|
const n = e.get(t)[1], r = e.get(t)[2];
|
|
@@ -9526,7 +9526,7 @@ function Ah(e, t) {
|
|
|
9526
9526
|
start: e[r][1].start,
|
|
9527
9527
|
end: e[n][1].end,
|
|
9528
9528
|
contentType: "text"
|
|
9529
|
-
},
|
|
9529
|
+
}, Ke(e, r, n - r + 1, [["enter", o, t], ["enter", l, t], ["exit", l, t], ["exit", o, t]])), e;
|
|
9530
9530
|
}
|
|
9531
9531
|
function Eh(e, t, n) {
|
|
9532
9532
|
let r = 0;
|
|
@@ -9652,7 +9652,7 @@ function Nh(e, t, n) {
|
|
|
9652
9652
|
}
|
|
9653
9653
|
function g(b) {
|
|
9654
9654
|
const Te = "CDATA[";
|
|
9655
|
-
return b === Te.charCodeAt(a++) ? (e.consume(b), a === Te.length ? r.interrupt ? t :
|
|
9655
|
+
return b === Te.charCodeAt(a++) ? (e.consume(b), a === Te.length ? r.interrupt ? t : F : g) : n(b);
|
|
9656
9656
|
}
|
|
9657
9657
|
function k(b) {
|
|
9658
9658
|
return Me(b) ? (e.consume(b), i = String.fromCharCode(b), v) : n(b);
|
|
@@ -9660,24 +9660,24 @@ function Nh(e, t, n) {
|
|
|
9660
9660
|
function v(b) {
|
|
9661
9661
|
if (b === null || b === 47 || b === 62 || de(b)) {
|
|
9662
9662
|
const Te = b === 47, me = i.toLowerCase();
|
|
9663
|
-
return !Te && !l && kl.includes(me) ? (o = 1, r.interrupt ? t(b) :
|
|
9663
|
+
return !Te && !l && kl.includes(me) ? (o = 1, r.interrupt ? t(b) : F(b)) : Th.includes(i.toLowerCase()) ? (o = 6, Te ? (e.consume(b), w) : r.interrupt ? t(b) : F(b)) : (o = 7, r.interrupt && !r.parser.lazy[r.now().line] ? n(b) : l ? E(b) : _(b));
|
|
9664
9664
|
}
|
|
9665
9665
|
return b === 45 || Ie(b) ? (e.consume(b), i += String.fromCharCode(b), v) : n(b);
|
|
9666
9666
|
}
|
|
9667
9667
|
function w(b) {
|
|
9668
|
-
return b === 62 ? (e.consume(b), r.interrupt ? t :
|
|
9668
|
+
return b === 62 ? (e.consume(b), r.interrupt ? t : F) : n(b);
|
|
9669
9669
|
}
|
|
9670
9670
|
function E(b) {
|
|
9671
9671
|
return oe(b) ? (e.consume(b), E) : S(b);
|
|
9672
9672
|
}
|
|
9673
9673
|
function _(b) {
|
|
9674
|
-
return b === 47 ? (e.consume(b), S) : b === 58 || b === 95 || Me(b) ? (e.consume(b),
|
|
9674
|
+
return b === 47 ? (e.consume(b), S) : b === 58 || b === 95 || Me(b) ? (e.consume(b), z) : oe(b) ? (e.consume(b), _) : S(b);
|
|
9675
9675
|
}
|
|
9676
|
-
function
|
|
9677
|
-
return b === 45 || b === 46 || b === 58 || b === 95 || Ie(b) ? (e.consume(b),
|
|
9676
|
+
function z(b) {
|
|
9677
|
+
return b === 45 || b === 46 || b === 58 || b === 95 || Ie(b) ? (e.consume(b), z) : M(b);
|
|
9678
9678
|
}
|
|
9679
|
-
function
|
|
9680
|
-
return b === 61 ? (e.consume(b), C) : oe(b) ? (e.consume(b),
|
|
9679
|
+
function M(b) {
|
|
9680
|
+
return b === 61 ? (e.consume(b), C) : oe(b) ? (e.consume(b), M) : _(b);
|
|
9681
9681
|
}
|
|
9682
9682
|
function C(b) {
|
|
9683
9683
|
return b === null || b === 60 || b === 61 || b === 62 || b === 96 ? n(b) : b === 34 || b === 39 ? (e.consume(b), s = b, B) : oe(b) ? (e.consume(b), C) : N(b);
|
|
@@ -9686,7 +9686,7 @@ function Nh(e, t, n) {
|
|
|
9686
9686
|
return b === s ? (e.consume(b), s = null, W) : b === null || Y(b) ? n(b) : (e.consume(b), B);
|
|
9687
9687
|
}
|
|
9688
9688
|
function N(b) {
|
|
9689
|
-
return b === null || b === 34 || b === 39 || b === 47 || b === 60 || b === 61 || b === 62 || b === 96 || de(b) ?
|
|
9689
|
+
return b === null || b === 34 || b === 39 || b === 47 || b === 60 || b === 61 || b === 62 || b === 96 || de(b) ? M(b) : (e.consume(b), N);
|
|
9690
9690
|
}
|
|
9691
9691
|
function W(b) {
|
|
9692
9692
|
return b === 47 || b === 62 || oe(b) ? _(b) : n(b);
|
|
@@ -9695,10 +9695,10 @@ function Nh(e, t, n) {
|
|
|
9695
9695
|
return b === 62 ? (e.consume(b), P) : n(b);
|
|
9696
9696
|
}
|
|
9697
9697
|
function P(b) {
|
|
9698
|
-
return b === null || Y(b) ?
|
|
9698
|
+
return b === null || Y(b) ? F(b) : oe(b) ? (e.consume(b), P) : n(b);
|
|
9699
9699
|
}
|
|
9700
|
-
function
|
|
9701
|
-
return b === 45 && o === 2 ? (e.consume(b), J) : b === 60 && o === 1 ? (e.consume(b), ae) : b === 62 && o === 4 ? (e.consume(b), ve) : b === 63 && o === 3 ? (e.consume(b), m) : b === 93 && o === 5 ? (e.consume(b), Le) : Y(b) && (o === 6 || o === 7) ? (e.exit("htmlFlowData"), e.check(_h, Pe, re)(b)) : b === null || Y(b) ? (e.exit("htmlFlowData"), re(b)) : (e.consume(b),
|
|
9700
|
+
function F(b) {
|
|
9701
|
+
return b === 45 && o === 2 ? (e.consume(b), J) : b === 60 && o === 1 ? (e.consume(b), ae) : b === 62 && o === 4 ? (e.consume(b), ve) : b === 63 && o === 3 ? (e.consume(b), m) : b === 93 && o === 5 ? (e.consume(b), Le) : Y(b) && (o === 6 || o === 7) ? (e.exit("htmlFlowData"), e.check(_h, Pe, re)(b)) : b === null || Y(b) ? (e.exit("htmlFlowData"), re(b)) : (e.consume(b), F);
|
|
9702
9702
|
}
|
|
9703
9703
|
function re(b) {
|
|
9704
9704
|
return e.check(Ih, V, Pe)(b);
|
|
@@ -9707,26 +9707,26 @@ function Nh(e, t, n) {
|
|
|
9707
9707
|
return e.enter("lineEnding"), e.consume(b), e.exit("lineEnding"), D;
|
|
9708
9708
|
}
|
|
9709
9709
|
function D(b) {
|
|
9710
|
-
return b === null || Y(b) ? re(b) : (e.enter("htmlFlowData"),
|
|
9710
|
+
return b === null || Y(b) ? re(b) : (e.enter("htmlFlowData"), F(b));
|
|
9711
9711
|
}
|
|
9712
9712
|
function J(b) {
|
|
9713
|
-
return b === 45 ? (e.consume(b), m) :
|
|
9713
|
+
return b === 45 ? (e.consume(b), m) : F(b);
|
|
9714
9714
|
}
|
|
9715
9715
|
function ae(b) {
|
|
9716
|
-
return b === 47 ? (e.consume(b), i = "", Ee) :
|
|
9716
|
+
return b === 47 ? (e.consume(b), i = "", Ee) : F(b);
|
|
9717
9717
|
}
|
|
9718
9718
|
function Ee(b) {
|
|
9719
9719
|
if (b === 62) {
|
|
9720
9720
|
const Te = i.toLowerCase();
|
|
9721
|
-
return kl.includes(Te) ? (e.consume(b), ve) :
|
|
9721
|
+
return kl.includes(Te) ? (e.consume(b), ve) : F(b);
|
|
9722
9722
|
}
|
|
9723
|
-
return Me(b) && i.length < 8 ? (e.consume(b), i += String.fromCharCode(b), Ee) :
|
|
9723
|
+
return Me(b) && i.length < 8 ? (e.consume(b), i += String.fromCharCode(b), Ee) : F(b);
|
|
9724
9724
|
}
|
|
9725
9725
|
function Le(b) {
|
|
9726
|
-
return b === 93 ? (e.consume(b), m) :
|
|
9726
|
+
return b === 93 ? (e.consume(b), m) : F(b);
|
|
9727
9727
|
}
|
|
9728
9728
|
function m(b) {
|
|
9729
|
-
return b === 62 ? (e.consume(b), ve) : b === 45 && o === 2 ? (e.consume(b), m) :
|
|
9729
|
+
return b === 62 ? (e.consume(b), ve) : b === 45 && o === 2 ? (e.consume(b), m) : F(b);
|
|
9730
9730
|
}
|
|
9731
9731
|
function ve(b) {
|
|
9732
9732
|
return b === null || Y(b) ? (e.exit("htmlFlowData"), Pe(b)) : (e.consume(b), ve);
|
|
@@ -9763,7 +9763,7 @@ function Oh(e, t, n) {
|
|
|
9763
9763
|
return e.enter("htmlText"), e.enter("htmlTextData"), e.consume(m), s;
|
|
9764
9764
|
}
|
|
9765
9765
|
function s(m) {
|
|
9766
|
-
return m === 33 ? (e.consume(m), u) : m === 47 ? (e.consume(m),
|
|
9766
|
+
return m === 33 ? (e.consume(m), u) : m === 47 ? (e.consume(m), M) : m === 63 ? (e.consume(m), _) : Me(m) ? (e.consume(m), N) : n(m);
|
|
9767
9767
|
}
|
|
9768
9768
|
function u(m) {
|
|
9769
9769
|
return m === 45 ? (e.consume(m), f) : m === 91 ? (e.consume(m), l = 0, g) : Me(m) ? (e.consume(m), E) : n(m);
|
|
@@ -9797,12 +9797,12 @@ function Oh(e, t, n) {
|
|
|
9797
9797
|
return m === null || m === 62 ? J(m) : Y(m) ? (i = E, ae(m)) : (e.consume(m), E);
|
|
9798
9798
|
}
|
|
9799
9799
|
function _(m) {
|
|
9800
|
-
return m === null ? n(m) : m === 63 ? (e.consume(m),
|
|
9800
|
+
return m === null ? n(m) : m === 63 ? (e.consume(m), z) : Y(m) ? (i = _, ae(m)) : (e.consume(m), _);
|
|
9801
9801
|
}
|
|
9802
|
-
function
|
|
9802
|
+
function z(m) {
|
|
9803
9803
|
return m === 62 ? J(m) : _(m);
|
|
9804
9804
|
}
|
|
9805
|
-
function
|
|
9805
|
+
function M(m) {
|
|
9806
9806
|
return Me(m) ? (e.consume(m), C) : n(m);
|
|
9807
9807
|
}
|
|
9808
9808
|
function C(m) {
|
|
@@ -9821,10 +9821,10 @@ function Oh(e, t, n) {
|
|
|
9821
9821
|
return m === 45 || m === 46 || m === 58 || m === 95 || Ie(m) ? (e.consume(m), S) : P(m);
|
|
9822
9822
|
}
|
|
9823
9823
|
function P(m) {
|
|
9824
|
-
return m === 61 ? (e.consume(m),
|
|
9824
|
+
return m === 61 ? (e.consume(m), F) : Y(m) ? (i = P, ae(m)) : oe(m) ? (e.consume(m), P) : W(m);
|
|
9825
9825
|
}
|
|
9826
|
-
function
|
|
9827
|
-
return m === null || m === 60 || m === 61 || m === 62 || m === 96 ? n(m) : m === 34 || m === 39 ? (e.consume(m), o = m, re) : Y(m) ? (i =
|
|
9826
|
+
function F(m) {
|
|
9827
|
+
return m === null || m === 60 || m === 61 || m === 62 || m === 96 ? n(m) : m === 34 || m === 39 ? (e.consume(m), o = m, re) : Y(m) ? (i = F, ae(m)) : oe(m) ? (e.consume(m), F) : (e.consume(m), V);
|
|
9828
9828
|
}
|
|
9829
9829
|
function re(m) {
|
|
9830
9830
|
return m === o ? (e.consume(m), o = void 0, D) : m === null ? n(m) : Y(m) ? (i = re, ae(m)) : (e.consume(m), re);
|
|
@@ -9870,7 +9870,7 @@ function Bh(e) {
|
|
|
9870
9870
|
r.type = "data", t += o;
|
|
9871
9871
|
}
|
|
9872
9872
|
}
|
|
9873
|
-
return e.length !== n.length &&
|
|
9873
|
+
return e.length !== n.length && Ke(e, 0, e.length, n), e;
|
|
9874
9874
|
}
|
|
9875
9875
|
function Uh(e, t) {
|
|
9876
9876
|
let n = e.length, r = 0, o, l, i, a;
|
|
@@ -9910,7 +9910,7 @@ function Uh(e, t) {
|
|
|
9910
9910
|
...e[i - 2][1].start
|
|
9911
9911
|
}
|
|
9912
9912
|
};
|
|
9913
|
-
return a = [["enter", s, t], ["enter", u, t]], a =
|
|
9913
|
+
return a = [["enter", s, t], ["enter", u, t]], a = nt(a, e.slice(l + 1, l + r + 3)), a = nt(a, [["enter", f, t]]), a = nt(a, _r(t.parser.constructs.insideSpan.null, e.slice(l + r + 4, i - 3), t)), a = nt(a, [["exit", f, t], e[i - 2], e[i - 1], ["exit", u, t]]), a = nt(a, e.slice(i + 1)), a = nt(a, [["exit", s, t]]), Ke(e, l, e.length, a), e;
|
|
9914
9914
|
}
|
|
9915
9915
|
function Hh(e, t, n) {
|
|
9916
9916
|
const r = this;
|
|
@@ -10379,11 +10379,11 @@ function vm(e, t, n) {
|
|
|
10379
10379
|
const o = {}, l = [];
|
|
10380
10380
|
let i = [], a = [];
|
|
10381
10381
|
const s = {
|
|
10382
|
-
attempt: B(
|
|
10382
|
+
attempt: B(M),
|
|
10383
10383
|
check: B(C),
|
|
10384
10384
|
consume: E,
|
|
10385
10385
|
enter: _,
|
|
10386
|
-
exit:
|
|
10386
|
+
exit: z,
|
|
10387
10387
|
interrupt: B(C, {
|
|
10388
10388
|
interrupt: !0
|
|
10389
10389
|
})
|
|
@@ -10402,10 +10402,10 @@ function vm(e, t, n) {
|
|
|
10402
10402
|
let f = t.tokenize.call(u, s);
|
|
10403
10403
|
return t.resolveAll && l.push(t), u;
|
|
10404
10404
|
function c(P) {
|
|
10405
|
-
return i =
|
|
10405
|
+
return i = nt(i, P), v(), i[i.length - 1] !== null ? [] : (N(t, 0), u.events = _r(l, u.events, u), u.events);
|
|
10406
10406
|
}
|
|
10407
|
-
function d(P,
|
|
10408
|
-
return Am(p(P),
|
|
10407
|
+
function d(P, F) {
|
|
10408
|
+
return Am(p(P), F);
|
|
10409
10409
|
}
|
|
10410
10410
|
function p(P) {
|
|
10411
10411
|
return Cm(i, P);
|
|
@@ -10413,14 +10413,14 @@ function vm(e, t, n) {
|
|
|
10413
10413
|
function g() {
|
|
10414
10414
|
const {
|
|
10415
10415
|
_bufferIndex: P,
|
|
10416
|
-
_index:
|
|
10416
|
+
_index: F,
|
|
10417
10417
|
line: re,
|
|
10418
10418
|
column: V,
|
|
10419
10419
|
offset: D
|
|
10420
10420
|
} = r;
|
|
10421
10421
|
return {
|
|
10422
10422
|
_bufferIndex: P,
|
|
10423
|
-
_index:
|
|
10423
|
+
_index: F,
|
|
10424
10424
|
line: re,
|
|
10425
10425
|
column: V,
|
|
10426
10426
|
offset: D
|
|
@@ -10432,12 +10432,12 @@ function vm(e, t, n) {
|
|
|
10432
10432
|
function v() {
|
|
10433
10433
|
let P;
|
|
10434
10434
|
for (; r._index < i.length; ) {
|
|
10435
|
-
const
|
|
10436
|
-
if (typeof
|
|
10437
|
-
for (P = r._index, r._bufferIndex < 0 && (r._bufferIndex = 0); r._index === P && r._bufferIndex <
|
|
10438
|
-
w(
|
|
10435
|
+
const F = i[r._index];
|
|
10436
|
+
if (typeof F == "string")
|
|
10437
|
+
for (P = r._index, r._bufferIndex < 0 && (r._bufferIndex = 0); r._index === P && r._bufferIndex < F.length; )
|
|
10438
|
+
w(F.charCodeAt(r._bufferIndex));
|
|
10439
10439
|
else
|
|
10440
|
-
w(
|
|
10440
|
+
w(F);
|
|
10441
10441
|
}
|
|
10442
10442
|
}
|
|
10443
10443
|
function w(P) {
|
|
@@ -10449,21 +10449,21 @@ function vm(e, t, n) {
|
|
|
10449
10449
|
/** @type {string} */
|
|
10450
10450
|
i[r._index].length && (r._bufferIndex = -1, r._index++)), u.previous = P;
|
|
10451
10451
|
}
|
|
10452
|
-
function _(P,
|
|
10453
|
-
const re =
|
|
10452
|
+
function _(P, F) {
|
|
10453
|
+
const re = F || {};
|
|
10454
10454
|
return re.type = P, re.start = g(), u.events.push(["enter", re, u]), a.push(re), re;
|
|
10455
10455
|
}
|
|
10456
|
-
function
|
|
10457
|
-
const
|
|
10458
|
-
return
|
|
10456
|
+
function z(P) {
|
|
10457
|
+
const F = a.pop();
|
|
10458
|
+
return F.end = g(), u.events.push(["exit", F, u]), F;
|
|
10459
10459
|
}
|
|
10460
|
-
function
|
|
10461
|
-
N(P,
|
|
10460
|
+
function M(P, F) {
|
|
10461
|
+
N(P, F.from);
|
|
10462
10462
|
}
|
|
10463
|
-
function C(P,
|
|
10464
|
-
|
|
10463
|
+
function C(P, F) {
|
|
10464
|
+
F.restore();
|
|
10465
10465
|
}
|
|
10466
|
-
function B(P,
|
|
10466
|
+
function B(P, F) {
|
|
10467
10467
|
return re;
|
|
10468
10468
|
function re(V, D, J) {
|
|
10469
10469
|
let ae, Ee, Le, m;
|
|
@@ -10478,8 +10478,8 @@ function vm(e, t, n) {
|
|
|
10478
10478
|
])
|
|
10479
10479
|
) : ve(V);
|
|
10480
10480
|
function ve(j) {
|
|
10481
|
-
return
|
|
10482
|
-
function
|
|
10481
|
+
return Je;
|
|
10482
|
+
function Je($e) {
|
|
10483
10483
|
const ce = $e !== null && j[$e], it = $e !== null && j.null, lt = [
|
|
10484
10484
|
// To do: add more extension tests.
|
|
10485
10485
|
/* c8 ignore next 2 */
|
|
@@ -10493,13 +10493,13 @@ function vm(e, t, n) {
|
|
|
10493
10493
|
return ae = j, Ee = 0, j.length === 0 ? J : b(j[Ee]);
|
|
10494
10494
|
}
|
|
10495
10495
|
function b(j) {
|
|
10496
|
-
return
|
|
10497
|
-
function
|
|
10496
|
+
return Je;
|
|
10497
|
+
function Je($e) {
|
|
10498
10498
|
return m = W(), Le = j, j.partial || (u.currentConstruct = j), j.name && u.parser.constructs.disable.null.includes(j.name) ? me() : j.tokenize.call(
|
|
10499
10499
|
// If we do have fields, create an object w/ `context` as its
|
|
10500
10500
|
// prototype.
|
|
10501
10501
|
// This allows a “live binding”, which is needed for `interrupt`.
|
|
10502
|
-
|
|
10502
|
+
F ? Object.assign(Object.create(u), F) : u,
|
|
10503
10503
|
s,
|
|
10504
10504
|
Te,
|
|
10505
10505
|
me
|
|
@@ -10514,17 +10514,17 @@ function vm(e, t, n) {
|
|
|
10514
10514
|
}
|
|
10515
10515
|
}
|
|
10516
10516
|
}
|
|
10517
|
-
function N(P,
|
|
10518
|
-
P.resolveAll && !l.includes(P) && l.push(P), P.resolve &&
|
|
10517
|
+
function N(P, F) {
|
|
10518
|
+
P.resolveAll && !l.includes(P) && l.push(P), P.resolve && Ke(u.events, F, u.events.length - F, P.resolve(u.events.slice(F), u)), P.resolveTo && (u.events = P.resolveTo(u.events, u));
|
|
10519
10519
|
}
|
|
10520
10520
|
function W() {
|
|
10521
|
-
const P = g(),
|
|
10521
|
+
const P = g(), F = u.previous, re = u.currentConstruct, V = u.events.length, D = Array.from(a);
|
|
10522
10522
|
return {
|
|
10523
10523
|
from: V,
|
|
10524
10524
|
restore: J
|
|
10525
10525
|
};
|
|
10526
10526
|
function J() {
|
|
10527
|
-
r = P, u.previous =
|
|
10527
|
+
r = P, u.previous = F, u.currentConstruct = re, u.events.length = V, a = D, S();
|
|
10528
10528
|
}
|
|
10529
10529
|
}
|
|
10530
10530
|
function S() {
|
|
@@ -10714,7 +10714,7 @@ function Lm(e) {
|
|
|
10714
10714
|
},
|
|
10715
10715
|
exit: {
|
|
10716
10716
|
atxHeading: s(),
|
|
10717
|
-
atxHeadingSequence:
|
|
10717
|
+
atxHeadingSequence: M,
|
|
10718
10718
|
autolink: s(),
|
|
10719
10719
|
autolinkEmail: ce,
|
|
10720
10720
|
autolinkProtocol: $e,
|
|
@@ -10723,7 +10723,7 @@ function Lm(e) {
|
|
|
10723
10723
|
characterReferenceMarkerHexadecimal: me,
|
|
10724
10724
|
characterReferenceMarkerNumeric: me,
|
|
10725
10725
|
characterReferenceValue: j,
|
|
10726
|
-
characterReference:
|
|
10726
|
+
characterReference: Je,
|
|
10727
10727
|
codeFenced: s(v),
|
|
10728
10728
|
codeFencedFence: k,
|
|
10729
10729
|
codeFencedFenceInfo: p,
|
|
@@ -10734,12 +10734,12 @@ function Lm(e) {
|
|
|
10734
10734
|
codeTextData: S,
|
|
10735
10735
|
data: S,
|
|
10736
10736
|
definition: s(),
|
|
10737
|
-
definitionDestinationString:
|
|
10737
|
+
definitionDestinationString: z,
|
|
10738
10738
|
definitionLabelString: E,
|
|
10739
10739
|
definitionTitleString: _,
|
|
10740
10740
|
emphasis: s(),
|
|
10741
|
-
hardBreakEscape: s(
|
|
10742
|
-
hardBreakTrailing: s(
|
|
10741
|
+
hardBreakEscape: s(F),
|
|
10742
|
+
hardBreakTrailing: s(F),
|
|
10743
10743
|
htmlFlow: s(re),
|
|
10744
10744
|
htmlFlowData: S,
|
|
10745
10745
|
htmlText: s(V),
|
|
@@ -10817,18 +10817,18 @@ function Lm(e) {
|
|
|
10817
10817
|
return O;
|
|
10818
10818
|
}
|
|
10819
10819
|
function o(A, O, G) {
|
|
10820
|
-
let Q = O - 1, le = -1, De = !1,
|
|
10820
|
+
let Q = O - 1, le = -1, De = !1, Qe, ze, xt, Ze;
|
|
10821
10821
|
for (; ++Q <= G; ) {
|
|
10822
10822
|
const Ce = A[Q];
|
|
10823
10823
|
switch (Ce[1].type) {
|
|
10824
10824
|
case "listUnordered":
|
|
10825
10825
|
case "listOrdered":
|
|
10826
10826
|
case "blockQuote": {
|
|
10827
|
-
Ce[0] === "enter" ? le++ : le--,
|
|
10827
|
+
Ce[0] === "enter" ? le++ : le--, Ze = void 0;
|
|
10828
10828
|
break;
|
|
10829
10829
|
}
|
|
10830
10830
|
case "lineEndingBlank": {
|
|
10831
|
-
Ce[0] === "enter" && (
|
|
10831
|
+
Ce[0] === "enter" && (Qe && !Ze && !le && !xt && (xt = Q), Ze = void 0);
|
|
10832
10832
|
break;
|
|
10833
10833
|
}
|
|
10834
10834
|
case "linePrefix":
|
|
@@ -10838,19 +10838,19 @@ function Lm(e) {
|
|
|
10838
10838
|
case "listItemPrefixWhitespace":
|
|
10839
10839
|
break;
|
|
10840
10840
|
default:
|
|
10841
|
-
|
|
10841
|
+
Ze = void 0;
|
|
10842
10842
|
}
|
|
10843
10843
|
if (!le && Ce[0] === "enter" && Ce[1].type === "listItemPrefix" || le === -1 && Ce[0] === "exit" && (Ce[1].type === "listUnordered" || Ce[1].type === "listOrdered")) {
|
|
10844
|
-
if (
|
|
10844
|
+
if (Qe) {
|
|
10845
10845
|
let at = Q;
|
|
10846
10846
|
for (ze = void 0; at--; ) {
|
|
10847
|
-
const
|
|
10848
|
-
if (
|
|
10849
|
-
if (
|
|
10850
|
-
ze && (A[ze][1].type = "lineEndingBlank", De = !0),
|
|
10851
|
-
} else if (!(
|
|
10847
|
+
const et = A[at];
|
|
10848
|
+
if (et[1].type === "lineEnding" || et[1].type === "lineEndingBlank") {
|
|
10849
|
+
if (et[0] === "exit") continue;
|
|
10850
|
+
ze && (A[ze][1].type = "lineEndingBlank", De = !0), et[1].type = "lineEnding", ze = at;
|
|
10851
|
+
} else if (!(et[1].type === "linePrefix" || et[1].type === "blockQuotePrefix" || et[1].type === "blockQuotePrefixWhitespace" || et[1].type === "blockQuoteMarker" || et[1].type === "listItemIndent")) break;
|
|
10852
10852
|
}
|
|
10853
|
-
|
|
10853
|
+
xt && (!ze || xt < ze) && (Qe._spread = !0), Qe.end = Object.assign({}, ze ? A[ze][1].start : Ce[1].end), A.splice(ze || Q, 0, ["exit", Qe, Ce[2]]), Q++, G++;
|
|
10854
10854
|
}
|
|
10855
10855
|
if (Ce[1].type === "listItemPrefix") {
|
|
10856
10856
|
const at = {
|
|
@@ -10860,7 +10860,7 @@ function Lm(e) {
|
|
|
10860
10860
|
// @ts-expect-error: we’ll add `end` in a second.
|
|
10861
10861
|
end: void 0
|
|
10862
10862
|
};
|
|
10863
|
-
|
|
10863
|
+
Qe = at, A.splice(Q, 0, ["enter", at, Ce[2]]), Q++, G++, xt = void 0, Ze = !0;
|
|
10864
10864
|
}
|
|
10865
10865
|
}
|
|
10866
10866
|
}
|
|
@@ -10940,11 +10940,11 @@ function Lm(e) {
|
|
|
10940
10940
|
const A = this.resume(), O = this.stack[this.stack.length - 1];
|
|
10941
10941
|
O.title = A;
|
|
10942
10942
|
}
|
|
10943
|
-
function
|
|
10943
|
+
function z() {
|
|
10944
10944
|
const A = this.resume(), O = this.stack[this.stack.length - 1];
|
|
10945
10945
|
O.url = A;
|
|
10946
10946
|
}
|
|
10947
|
-
function
|
|
10947
|
+
function M(A) {
|
|
10948
10948
|
const O = this.stack[this.stack.length - 1];
|
|
10949
10949
|
if (!O.depth) {
|
|
10950
10950
|
const G = this.sliceSerialize(A).length;
|
|
@@ -10983,7 +10983,7 @@ function Lm(e) {
|
|
|
10983
10983
|
}
|
|
10984
10984
|
!this.data.setextHeadingSlurpLineEnding && t.canContainEols.includes(O.type) && (W.call(this, A), S.call(this, A));
|
|
10985
10985
|
}
|
|
10986
|
-
function
|
|
10986
|
+
function F() {
|
|
10987
10987
|
this.data.atHardBreak = !0;
|
|
10988
10988
|
}
|
|
10989
10989
|
function re() {
|
|
@@ -11056,7 +11056,7 @@ function Lm(e) {
|
|
|
11056
11056
|
const le = this.stack[this.stack.length - 1];
|
|
11057
11057
|
le.value += Q;
|
|
11058
11058
|
}
|
|
11059
|
-
function
|
|
11059
|
+
function Je(A) {
|
|
11060
11060
|
const O = this.stack.pop();
|
|
11061
11061
|
O.position.end = Pt(A.end);
|
|
11062
11062
|
}
|
|
@@ -13817,16 +13817,16 @@ function lu(e, t, n) {
|
|
|
13817
13817
|
d.lastIndex = 0;
|
|
13818
13818
|
let _ = d.exec(u.value);
|
|
13819
13819
|
for (; _; ) {
|
|
13820
|
-
const
|
|
13820
|
+
const z = _.index, M = {
|
|
13821
13821
|
index: _.index,
|
|
13822
13822
|
input: _.input,
|
|
13823
13823
|
stack: [...f, u]
|
|
13824
13824
|
};
|
|
13825
|
-
let C = p(..._,
|
|
13826
|
-
if (typeof C == "string" && (C = C.length > 0 ? { type: "text", value: C } : void 0), C === !1 ? d.lastIndex =
|
|
13825
|
+
let C = p(..._, M);
|
|
13826
|
+
if (typeof C == "string" && (C = C.length > 0 ? { type: "text", value: C } : void 0), C === !1 ? d.lastIndex = z + 1 : (g !== z && E.push({
|
|
13827
13827
|
type: "text",
|
|
13828
|
-
value: u.value.slice(g,
|
|
13829
|
-
}), Array.isArray(C) ? E.push(...C) : C && E.push(C), g =
|
|
13828
|
+
value: u.value.slice(g, z)
|
|
13829
|
+
}), Array.isArray(C) ? E.push(...C) : C && E.push(C), g = z + _[0].length, w = !0), !d.global)
|
|
13830
13830
|
break;
|
|
13831
13831
|
_ = d.exec(u.value);
|
|
13832
13832
|
}
|
|
@@ -14179,14 +14179,14 @@ function Zb(e, t) {
|
|
|
14179
14179
|
const w = [];
|
|
14180
14180
|
for (; ++c < u; ) {
|
|
14181
14181
|
const E = k[c] || "";
|
|
14182
|
-
let _ = "",
|
|
14182
|
+
let _ = "", z = "";
|
|
14183
14183
|
if (n.alignDelimiters !== !1) {
|
|
14184
|
-
const
|
|
14185
|
-
C === 114 ? _ = " ".repeat(
|
|
14184
|
+
const M = s[c] - (v[c] || 0), C = l[c];
|
|
14185
|
+
C === 114 ? _ = " ".repeat(M) : C === 99 ? M % 2 ? (_ = " ".repeat(M / 2 + 0.5), z = " ".repeat(M / 2 - 0.5)) : (_ = " ".repeat(M / 2), z = _) : z = " ".repeat(M);
|
|
14186
14186
|
}
|
|
14187
14187
|
n.delimiterStart !== !1 && !c && w.push("|"), n.padding !== !1 && // Don’t add the opening space if we’re not aligning and the cell is
|
|
14188
14188
|
// empty: there will be a closing space.
|
|
14189
|
-
!(n.alignDelimiters === !1 && E === "") && (n.delimiterStart !== !1 || c) && w.push(" "), n.alignDelimiters !== !1 && w.push(_), w.push(E), n.alignDelimiters !== !1 && w.push(
|
|
14189
|
+
!(n.alignDelimiters === !1 && E === "") && (n.delimiterStart !== !1 || c) && w.push(" "), n.alignDelimiters !== !1 && w.push(_), w.push(E), n.alignDelimiters !== !1 && w.push(z), n.padding !== !1 && w.push(" "), (n.delimiterEnd !== !1 || c !== u - 1) && w.push("|");
|
|
14190
14190
|
}
|
|
14191
14191
|
g.push(
|
|
14192
14192
|
n.delimiterEnd === !1 ? w.join("").replace(/ +$/, "") : w.join("")
|
|
@@ -15025,23 +15025,23 @@ const Wy = {
|
|
|
15025
15025
|
name: "emailAutolink",
|
|
15026
15026
|
tokenize: Xy,
|
|
15027
15027
|
previous: _u
|
|
15028
|
-
},
|
|
15028
|
+
}, yt = {};
|
|
15029
15029
|
function Yy() {
|
|
15030
15030
|
return {
|
|
15031
|
-
text:
|
|
15031
|
+
text: yt
|
|
15032
15032
|
};
|
|
15033
15033
|
}
|
|
15034
15034
|
let Yt = 48;
|
|
15035
15035
|
for (; Yt < 123; )
|
|
15036
|
-
|
|
15037
|
-
|
|
15038
|
-
|
|
15039
|
-
|
|
15040
|
-
|
|
15041
|
-
|
|
15042
|
-
|
|
15043
|
-
|
|
15044
|
-
|
|
15036
|
+
yt[Yt] = Tt, Yt++, Yt === 58 ? Yt = 65 : Yt === 91 && (Yt = 97);
|
|
15037
|
+
yt[43] = Tt;
|
|
15038
|
+
yt[45] = Tt;
|
|
15039
|
+
yt[46] = Tt;
|
|
15040
|
+
yt[95] = Tt;
|
|
15041
|
+
yt[72] = [Tt, Eu];
|
|
15042
|
+
yt[104] = [Tt, Eu];
|
|
15043
|
+
yt[87] = [Tt, Au];
|
|
15044
|
+
yt[119] = [Tt, Au];
|
|
15045
15045
|
function Xy(e, t, n) {
|
|
15046
15046
|
const r = this;
|
|
15047
15047
|
let o, l;
|
|
@@ -15408,7 +15408,7 @@ function px(e) {
|
|
|
15408
15408
|
start: Object.assign({}, i[u][1].end),
|
|
15409
15409
|
end: Object.assign({}, i[s][1].start)
|
|
15410
15410
|
}, d = [["enter", f, a], ["enter", i[u][1], a], ["exit", i[u][1], a], ["enter", c, a]], p = a.parser.constructs.insideSpan.null;
|
|
15411
|
-
p &&
|
|
15411
|
+
p && Ke(d, d.length, 0, _r(p, i.slice(u + 1, s), a)), Ke(d, d.length, 0, [["exit", c, a], ["enter", i[s][1], a], ["exit", i[s][1], a], ["exit", f, a]]), Ke(i, u - 1, s - u + 3, d), s = u + d.length - 2;
|
|
15412
15412
|
break;
|
|
15413
15413
|
}
|
|
15414
15414
|
}
|
|
@@ -15544,7 +15544,7 @@ function bx(e, t, n) {
|
|
|
15544
15544
|
V === "linePrefix") P--;
|
|
15545
15545
|
else break;
|
|
15546
15546
|
}
|
|
15547
|
-
const
|
|
15547
|
+
const F = P > -1 ? r.events[P][1].type : null, re = F === "tableHead" || F === "tableRow" ? C : s;
|
|
15548
15548
|
return re === C && r.parser.lazy[r.now().line] ? n(S) : re(S);
|
|
15549
15549
|
}
|
|
15550
15550
|
function s(S) {
|
|
@@ -15566,27 +15566,27 @@ function bx(e, t, n) {
|
|
|
15566
15566
|
return r.interrupt = !1, r.parser.lazy[r.now().line] ? n(S) : (e.enter("tableDelimiterRow"), i = !1, oe(S) ? se(e, g, "linePrefix", r.parser.constructs.disable.null.includes("codeIndented") ? void 0 : 4)(S) : g(S));
|
|
15567
15567
|
}
|
|
15568
15568
|
function g(S) {
|
|
15569
|
-
return S === 45 || S === 58 ? v(S) : S === 124 ? (i = !0, e.enter("tableCellDivider"), e.consume(S), e.exit("tableCellDivider"), k) :
|
|
15569
|
+
return S === 45 || S === 58 ? v(S) : S === 124 ? (i = !0, e.enter("tableCellDivider"), e.consume(S), e.exit("tableCellDivider"), k) : M(S);
|
|
15570
15570
|
}
|
|
15571
15571
|
function k(S) {
|
|
15572
15572
|
return oe(S) ? se(e, v, "whitespace")(S) : v(S);
|
|
15573
15573
|
}
|
|
15574
15574
|
function v(S) {
|
|
15575
|
-
return S === 58 ? (l += 1, i = !0, e.enter("tableDelimiterMarker"), e.consume(S), e.exit("tableDelimiterMarker"), w) : S === 45 ? (l += 1, w(S)) : S === null || Y(S) ?
|
|
15575
|
+
return S === 58 ? (l += 1, i = !0, e.enter("tableDelimiterMarker"), e.consume(S), e.exit("tableDelimiterMarker"), w) : S === 45 ? (l += 1, w(S)) : S === null || Y(S) ? z(S) : M(S);
|
|
15576
15576
|
}
|
|
15577
15577
|
function w(S) {
|
|
15578
|
-
return S === 45 ? (e.enter("tableDelimiterFiller"), E(S)) :
|
|
15578
|
+
return S === 45 ? (e.enter("tableDelimiterFiller"), E(S)) : M(S);
|
|
15579
15579
|
}
|
|
15580
15580
|
function E(S) {
|
|
15581
15581
|
return S === 45 ? (e.consume(S), E) : S === 58 ? (i = !0, e.exit("tableDelimiterFiller"), e.enter("tableDelimiterMarker"), e.consume(S), e.exit("tableDelimiterMarker"), _) : (e.exit("tableDelimiterFiller"), _(S));
|
|
15582
15582
|
}
|
|
15583
15583
|
function _(S) {
|
|
15584
|
-
return oe(S) ? se(e,
|
|
15584
|
+
return oe(S) ? se(e, z, "whitespace")(S) : z(S);
|
|
15585
15585
|
}
|
|
15586
|
-
function
|
|
15587
|
-
return S === 124 ? g(S) : S === null || Y(S) ? !i || o !== l ?
|
|
15586
|
+
function z(S) {
|
|
15587
|
+
return S === 124 ? g(S) : S === null || Y(S) ? !i || o !== l ? M(S) : (e.exit("tableDelimiterRow"), e.exit("tableHead"), t(S)) : M(S);
|
|
15588
15588
|
}
|
|
15589
|
-
function
|
|
15589
|
+
function M(S) {
|
|
15590
15590
|
return n(S);
|
|
15591
15591
|
}
|
|
15592
15592
|
function C(S) {
|
|
@@ -15753,8 +15753,8 @@ function qx() {
|
|
|
15753
15753
|
return typeof window < "u" && typeof window.matchMedia == "function" && window.matchMedia("(prefers-reduced-motion: reduce)").matches;
|
|
15754
15754
|
}
|
|
15755
15755
|
function _x(e, t = !0) {
|
|
15756
|
-
const [n, r] = Se(0), o =
|
|
15757
|
-
return
|
|
15756
|
+
const [n, r] = Se(0), o = Xe(qx());
|
|
15757
|
+
return bt(() => {
|
|
15758
15758
|
if (!t || o.current) {
|
|
15759
15759
|
r(e.length);
|
|
15760
15760
|
return;
|
|
@@ -16149,45 +16149,56 @@ function Zl({
|
|
|
16149
16149
|
isBot: t,
|
|
16150
16150
|
isSibling: n
|
|
16151
16151
|
}) {
|
|
16152
|
-
const r = ei(), { onMessageClick: o } = nn(), l =
|
|
16152
|
+
const r = ei(), { onMessageClick: o, highlightedMessageId: l } = nn(), i = l != null && l === e.id, a = Xe(null);
|
|
16153
|
+
bt(() => {
|
|
16154
|
+
if (!i) return;
|
|
16155
|
+
const M = window.matchMedia?.(
|
|
16156
|
+
"(prefers-reduced-motion: reduce)"
|
|
16157
|
+
).matches;
|
|
16158
|
+
a.current?.scrollIntoView?.({
|
|
16159
|
+
block: "nearest",
|
|
16160
|
+
behavior: M ? "auto" : "smooth"
|
|
16161
|
+
});
|
|
16162
|
+
}, [i]);
|
|
16163
|
+
const s = te({
|
|
16153
16164
|
[r.botBubbleColor]: e.sender === "assistant",
|
|
16154
16165
|
[r.userBubbleColor]: e.sender === "user"
|
|
16155
|
-
}),
|
|
16156
|
-
|
|
16157
|
-
if (!
|
|
16158
|
-
|
|
16166
|
+
}), f = (e.sender === "assistant" ? r.botBubbleTextColor : r.userBubbleTextColor) || Ai(s), c = e.content === "...", d = e.attachments ?? [], p = e.type === "image" || e.content !== "" || d.length === 0, [g, k] = Se(!c);
|
|
16167
|
+
bt(() => {
|
|
16168
|
+
if (!c) {
|
|
16169
|
+
k(!0);
|
|
16159
16170
|
return;
|
|
16160
16171
|
}
|
|
16161
|
-
const
|
|
16162
|
-
() =>
|
|
16172
|
+
const M = setTimeout(
|
|
16173
|
+
() => k(!0),
|
|
16163
16174
|
Yx
|
|
16164
16175
|
);
|
|
16165
|
-
return () => clearTimeout(
|
|
16166
|
-
}, [
|
|
16167
|
-
const
|
|
16176
|
+
return () => clearTimeout(M);
|
|
16177
|
+
}, [c]);
|
|
16178
|
+
const v = Xx.has(
|
|
16168
16179
|
Jx(e.content)
|
|
16169
|
-
),
|
|
16170
|
-
|
|
16171
|
-
|
|
16172
|
-
),
|
|
16180
|
+
), w = !!(t && e.isThinking), E = w && !c && !v, _ = _x(
|
|
16181
|
+
E ? e.content.replace(Kx, "Thinking") : "",
|
|
16182
|
+
E
|
|
16183
|
+
), z = () => w ? g ? /* @__PURE__ */ Z("div", { className: "eloq:ml-1 eloq:flex eloq:items-center eloq:gap-2 eloq:animate-message-in", children: [
|
|
16173
16184
|
/* @__PURE__ */ x(
|
|
16174
16185
|
"span",
|
|
16175
16186
|
{
|
|
16176
16187
|
className: "eloq:flex eloq:h-5 eloq:items-center eloq:gap-[0.25em] eloq:rounded-2xl eloq:px-[12px] eloq:py-[8px] eloq:text-sm eloq:box-content",
|
|
16177
16188
|
style: { backgroundColor: r.botBubbleColor },
|
|
16178
|
-
children: [0, 150, 300].map((
|
|
16189
|
+
children: [0, 150, 300].map((M) => /* @__PURE__ */ x(
|
|
16179
16190
|
"span",
|
|
16180
16191
|
{
|
|
16181
16192
|
className: Gx,
|
|
16182
|
-
style: { animationDelay: `${
|
|
16193
|
+
style: { animationDelay: `${M}ms` }
|
|
16183
16194
|
},
|
|
16184
|
-
|
|
16195
|
+
M
|
|
16185
16196
|
))
|
|
16186
16197
|
}
|
|
16187
16198
|
),
|
|
16188
|
-
|
|
16199
|
+
_ && // Outside the bubble, on the panel background. Same wave as the
|
|
16189
16200
|
// dots, swept through the glyphs.
|
|
16190
|
-
/* @__PURE__ */ x("span", { className: "eloq-thinking-shimmer eloq:text-sm eloq:font-medium eloq:animate-thinking-shimmer eloq:motion-reduce:animate-none", children:
|
|
16201
|
+
/* @__PURE__ */ x("span", { className: "eloq-thinking-shimmer eloq:text-sm eloq:font-medium eloq:animate-thinking-shimmer eloq:motion-reduce:animate-none", children: _ })
|
|
16191
16202
|
] }) : null : /* @__PURE__ */ Z(
|
|
16192
16203
|
"div",
|
|
16193
16204
|
{
|
|
@@ -16199,11 +16210,12 @@ function Zl({
|
|
|
16199
16210
|
role: o && !e.isWelcomeMessage ? "button" : void 0,
|
|
16200
16211
|
tabIndex: 0,
|
|
16201
16212
|
children: [
|
|
16202
|
-
|
|
16213
|
+
p && /* @__PURE__ */ x(
|
|
16203
16214
|
"div",
|
|
16204
16215
|
{
|
|
16216
|
+
"data-highlighted": i || void 0,
|
|
16205
16217
|
className: te(
|
|
16206
|
-
"eloq:relative eloq:rounded-2xl eloq:py-[12px] eloq:px-[16px] eloq:align-center",
|
|
16218
|
+
"eloq:relative eloq:rounded-2xl eloq:py-[12px] eloq:px-[16px] eloq:align-center eloq:outline-2 eloq:outline-offset-2 eloq:outline-transparent eloq:transition-[outline-color] eloq:duration-150",
|
|
16207
16219
|
{
|
|
16208
16220
|
"eloq:ml-1": e.sender === "assistant",
|
|
16209
16221
|
"eloq:mr-1": e.sender === "user",
|
|
@@ -16212,8 +16224,12 @@ function Zl({
|
|
|
16212
16224
|
}
|
|
16213
16225
|
),
|
|
16214
16226
|
style: {
|
|
16215
|
-
backgroundColor:
|
|
16216
|
-
color:
|
|
16227
|
+
backgroundColor: s,
|
|
16228
|
+
color: f,
|
|
16229
|
+
...i && {
|
|
16230
|
+
outlineColor: r.userBubbleColor,
|
|
16231
|
+
outlineStyle: "solid"
|
|
16232
|
+
}
|
|
16217
16233
|
},
|
|
16218
16234
|
children: e.type === "image" ? /* @__PURE__ */ x(
|
|
16219
16235
|
"a",
|
|
@@ -16233,13 +16249,14 @@ function Zl({
|
|
|
16233
16249
|
) : /* @__PURE__ */ x("div", { className: "typewriter prose eloq:text-left eloq-wrap-anywhere", children: /* @__PURE__ */ x(Ex, { text: e.content }) })
|
|
16234
16250
|
}
|
|
16235
16251
|
),
|
|
16236
|
-
|
|
16252
|
+
d.length > 0 && /* @__PURE__ */ x(jx, { attachments: d })
|
|
16237
16253
|
]
|
|
16238
16254
|
}
|
|
16239
16255
|
);
|
|
16240
16256
|
return /* @__PURE__ */ Z(
|
|
16241
16257
|
"div",
|
|
16242
16258
|
{
|
|
16259
|
+
ref: a,
|
|
16243
16260
|
className: te(
|
|
16244
16261
|
`eloq:flex eloq:flex-1 eloq:self-stretch eloq:items-center eloq:gap-1.5 ${e.sender === "user" ? "eloq:justify-end" : "eloq:justify-start"}`
|
|
16245
16262
|
),
|
|
@@ -16253,7 +16270,7 @@ function Zl({
|
|
|
16253
16270
|
"eloq:max-w-[75%]": !t,
|
|
16254
16271
|
"eloq:max-w-full": n
|
|
16255
16272
|
}),
|
|
16256
|
-
children:
|
|
16273
|
+
children: z()
|
|
16257
16274
|
}
|
|
16258
16275
|
)
|
|
16259
16276
|
]
|
|
@@ -16424,7 +16441,7 @@ function rw() {
|
|
|
16424
16441
|
return Er(tw) ?? nw;
|
|
16425
16442
|
}
|
|
16426
16443
|
function ow() {
|
|
16427
|
-
const e = nn(), t = rw(), n =
|
|
16444
|
+
const e = nn(), t = rw(), n = Xe(null), r = Xe(!0), o = Xe(0), [l, i] = Se(!1), [a, s] = Se(!1), u = (p) => p.scrollHeight - p.scrollTop <= p.clientHeight + 60, f = (p) => {
|
|
16428
16445
|
const g = p.target;
|
|
16429
16446
|
u(g) ? (i(!1), s(!1)) : (i(!0), s(!0));
|
|
16430
16447
|
}, c = wa((p = "smooth") => {
|
|
@@ -16436,16 +16453,16 @@ function ow() {
|
|
|
16436
16453
|
});
|
|
16437
16454
|
}
|
|
16438
16455
|
}, []);
|
|
16439
|
-
|
|
16456
|
+
bt(() => {
|
|
16440
16457
|
const p = e.messages?.length ?? 0, g = p < o.current;
|
|
16441
16458
|
o.current = p, r.current ? (c("instant"), r.current = !1) : g ? (i(!1), s(!1), c("instant")) : a || c();
|
|
16442
|
-
}, [e.messages, a, c]),
|
|
16459
|
+
}, [e.messages, a, c]), bt(() => {
|
|
16443
16460
|
if (!e.isChatClosed) return;
|
|
16444
16461
|
const p = setTimeout(() => {
|
|
16445
16462
|
c("smooth");
|
|
16446
16463
|
}, 500);
|
|
16447
16464
|
return () => clearTimeout(p);
|
|
16448
|
-
}, [e.isChatClosed, c]),
|
|
16465
|
+
}, [e.isChatClosed, c]), bt(() => {
|
|
16449
16466
|
const p = n.current?.querySelector(
|
|
16450
16467
|
"div.chat-interface-body"
|
|
16451
16468
|
);
|
|
@@ -16571,7 +16588,7 @@ $o || ($o = function(t) {
|
|
|
16571
16588
|
for (var n = arguments.length, r = new Array(n > 1 ? n - 1 : 0), o = 1; o < n; o++) r[o - 1] = arguments[o];
|
|
16572
16589
|
return new t(...r);
|
|
16573
16590
|
});
|
|
16574
|
-
const
|
|
16591
|
+
const kt = ge(Array.prototype.forEach), fw = ge(Array.prototype.lastIndexOf), na = ge(Array.prototype.pop), Pn = ge(Array.prototype.push), pw = ge(Array.prototype.slice), dw = ge(Array.prototype.splice), yn = Array.isArray, mo = Wu(Set), go = ge(Set.prototype.add), Dn = ge(Set.prototype.has), Kt = ge(String.prototype.toLowerCase), bo = ge(String.prototype.toString), ra = ge(String.prototype.match), On = ge(String.prototype.replace), oa = ge(String.prototype.indexOf), hw = ge(String.prototype.trim), mw = ge(Number.prototype.toString), gw = ge(Boolean.prototype.toString), ia = typeof BigInt > "u" ? null : ge(BigInt.prototype.toString), la = typeof Symbol > "u" ? null : ge(Symbol.prototype.toString), He = ge(Object.prototype.hasOwnProperty), Mn = ge(Object.prototype.toString), qe = ge(RegExp.prototype.test), St = Wu(TypeError);
|
|
16575
16592
|
function ge(e) {
|
|
16576
16593
|
return function(t) {
|
|
16577
16594
|
t instanceof RegExp && (t.lastIndex = 0);
|
|
@@ -16629,7 +16646,7 @@ function yw(e) {
|
|
|
16629
16646
|
case "function":
|
|
16630
16647
|
case "object": {
|
|
16631
16648
|
if (e === null) return Mn(e);
|
|
16632
|
-
const t = e, n =
|
|
16649
|
+
const t = e, n = tt(t, "toString");
|
|
16633
16650
|
if (typeof n == "function") {
|
|
16634
16651
|
const r = n(t);
|
|
16635
16652
|
return typeof r == "string" ? r : Mn(r);
|
|
@@ -16640,7 +16657,7 @@ function yw(e) {
|
|
|
16640
16657
|
return Mn(e);
|
|
16641
16658
|
}
|
|
16642
16659
|
}
|
|
16643
|
-
function
|
|
16660
|
+
function tt(e, t) {
|
|
16644
16661
|
for (; e !== null; ) {
|
|
16645
16662
|
const r = Vu(e, t);
|
|
16646
16663
|
if (r) {
|
|
@@ -17376,10 +17393,10 @@ function Gu() {
|
|
|
17376
17393
|
e.DocumentFragment;
|
|
17377
17394
|
const l = e.HTMLTemplateElement, i = e.Node, a = e.Element, s = e.NodeFilter;
|
|
17378
17395
|
e.NamedNodeMap === void 0 && (e.NamedNodeMap || e.MozNamedAttrMap), e.HTMLFormElement;
|
|
17379
|
-
const u = e.DOMParser, f = e.trustedTypes, c = a.prototype, d =
|
|
17380
|
-
return
|
|
17396
|
+
const u = e.DOMParser, f = e.trustedTypes, c = a.prototype, d = tt(c, "cloneNode"), p = tt(c, "remove"), g = tt(c, "removeAttributeNode"), k = tt(c, "nextSibling"), v = tt(c, "childNodes"), w = tt(c, "parentNode"), E = tt(c, "shadowRoot"), _ = tt(c, "attributes"), z = i && i.prototype ? tt(i.prototype, "nodeType") : null, M = i && i.prototype ? tt(i.prototype, "nodeName") : null, C = i && i.prototype ? tt(i.prototype, "ownerDocument") : null, B = function(h) {
|
|
17397
|
+
return z ? z(h) : h.nodeType;
|
|
17381
17398
|
}, N = function(h) {
|
|
17382
|
-
return
|
|
17399
|
+
return M ? M(h) : h.nodeName;
|
|
17383
17400
|
}, W = xw(c, "namespaceURI"), S = function(h) {
|
|
17384
17401
|
return W ? W(h) : h.namespaceURI;
|
|
17385
17402
|
};
|
|
@@ -17387,9 +17404,9 @@ function Gu() {
|
|
|
17387
17404
|
const I = n.createElement("template");
|
|
17388
17405
|
I.content && I.content.ownerDocument && (n = I.content.ownerDocument);
|
|
17389
17406
|
}
|
|
17390
|
-
let P,
|
|
17407
|
+
let P, F = "", re, V = !1, D = 0;
|
|
17391
17408
|
const J = function() {
|
|
17392
|
-
if (D > 0) throw
|
|
17409
|
+
if (D > 0) throw St('A configured TRUSTED_TYPES_POLICY callback (createHTML or createScriptURL) must not call DOMPurify.sanitize, as that causes infinite recursion. Do not pass a policy whose callbacks wrap DOMPurify as TRUSTED_TYPES_POLICY; see the "DOMPurify and Trusted Types" section of the README.');
|
|
17393
17410
|
}, ae = function(h) {
|
|
17394
17411
|
J(), D++;
|
|
17395
17412
|
try {
|
|
@@ -17409,7 +17426,7 @@ function Gu() {
|
|
|
17409
17426
|
}, m = n, ve = m.implementation, Pe = m.createNodeIterator, b = m.createDocumentFragment, Te = m.getElementsByTagName, me = r.importNode;
|
|
17410
17427
|
let j = ha();
|
|
17411
17428
|
t.isSupported = typeof Hu == "function" && typeof w == "function" && ve && ve.createHTMLDocument !== void 0;
|
|
17412
|
-
const
|
|
17429
|
+
const Je = vw, $e = Cw, ce = Aw, it = Ew, lt = Tw, qt = qw, _t = _w, It = Rw;
|
|
17413
17430
|
let vn = fa, fe = null;
|
|
17414
17431
|
const on = ue({}, [
|
|
17415
17432
|
...aa,
|
|
@@ -17459,7 +17476,7 @@ function Gu() {
|
|
|
17459
17476
|
value: null
|
|
17460
17477
|
}
|
|
17461
17478
|
}));
|
|
17462
|
-
let er = !0, Cn = !0, A = !1, O = !0, G = !1, Q = !0, le = !1, De = !1,
|
|
17479
|
+
let er = !0, Cn = !0, A = !1, O = !0, G = !1, Q = !0, le = !1, De = !1, Qe = null, ze = null, xt = !1, Ze = !1, Ce = !1, at = !1, et = !0, Ei = !1;
|
|
17463
17480
|
const Ti = "user-content-";
|
|
17464
17481
|
let Lr = !0, Pr = !1, Vt = null, an = {}, $t = null;
|
|
17465
17482
|
const qi = ue({}, [
|
|
@@ -17552,23 +17569,23 @@ function Gu() {
|
|
|
17552
17569
|
}), _i = Dt(h, "ADD_DATA_URI_TAGS", Ii, {
|
|
17553
17570
|
transform: be,
|
|
17554
17571
|
base: Ii
|
|
17555
|
-
}), $t = Dt(h, "FORBID_CONTENTS", qi, { transform: be }), jt = Dt(h, "FORBID_TAGS", Ye({}), { transform: be }), Zn = Dt(h, "FORBID_ATTR", Ye({}), { transform: be }), an = He(h, "USE_PROFILES") ? h.USE_PROFILES && typeof h.USE_PROFILES == "object" ? Ye(h.USE_PROFILES) : h.USE_PROFILES : !1, er = h.ALLOW_ARIA_ATTR !== !1, Cn = h.ALLOW_DATA_ATTR !== !1, A = h.ALLOW_UNKNOWN_PROTOCOLS || !1, O = h.ALLOW_SELF_CLOSE_IN_ATTR !== !1, G = h.SAFE_FOR_TEMPLATES || !1, Q = h.SAFE_FOR_XML !== !1, le = h.WHOLE_DOCUMENT || !1,
|
|
17572
|
+
}), $t = Dt(h, "FORBID_CONTENTS", qi, { transform: be }), jt = Dt(h, "FORBID_TAGS", Ye({}), { transform: be }), Zn = Dt(h, "FORBID_ATTR", Ye({}), { transform: be }), an = He(h, "USE_PROFILES") ? h.USE_PROFILES && typeof h.USE_PROFILES == "object" ? Ye(h.USE_PROFILES) : h.USE_PROFILES : !1, er = h.ALLOW_ARIA_ATTR !== !1, Cn = h.ALLOW_DATA_ATTR !== !1, A = h.ALLOW_UNKNOWN_PROTOCOLS || !1, O = h.ALLOW_SELF_CLOSE_IN_ATTR !== !1, G = h.SAFE_FOR_TEMPLATES || !1, Q = h.SAFE_FOR_XML !== !1, le = h.WHOLE_DOCUMENT || !1, Ze = h.RETURN_DOM || !1, Ce = h.RETURN_DOM_FRAGMENT || !1, at = h.RETURN_TRUSTED_TYPE || !1, xt = h.FORCE_BODY || !1, et = h.SANITIZE_DOM !== !1, Ei = h.SANITIZE_NAMED_PROPS || !1, Lr = h.KEEP_CONTENT !== !1, Pr = h.IN_PLACE || !1, vn = ww(h.ALLOWED_URI_REGEXP) ? h.ALLOWED_URI_REGEXP : fa, sn = typeof h.NAMESPACE == "string" ? h.NAMESPACE : pt, Mr = vo(h, "MATHML_TEXT_INTEGRATION_POINTS", () => ue({}, Li)), zr = vo(h, "HTML_INTEGRATION_POINTS", () => ue({}, Pi));
|
|
17556
17573
|
const y = vo(h, "CUSTOM_ELEMENT_HANDLING", () => bn(null));
|
|
17557
|
-
if (We = bn(null), He(y, "tagNameCheck") && Di(y.tagNameCheck) && (We.tagNameCheck = y.tagNameCheck), He(y, "attributeNameCheck") && Di(y.attributeNameCheck) && (We.attributeNameCheck = y.attributeNameCheck), He(y, "allowCustomizedBuiltInElements") && typeof y.allowCustomizedBuiltInElements == "boolean" && (We.allowCustomizedBuiltInElements = y.allowCustomizedBuiltInElements), _e(We), G && (Cn = !1), Ce && (
|
|
17574
|
+
if (We = bn(null), He(y, "tagNameCheck") && Di(y.tagNameCheck) && (We.tagNameCheck = y.tagNameCheck), He(y, "attributeNameCheck") && Di(y.attributeNameCheck) && (We.attributeNameCheck = y.attributeNameCheck), He(y, "allowCustomizedBuiltInElements") && typeof y.allowCustomizedBuiltInElements == "boolean" && (We.allowCustomizedBuiltInElements = y.allowCustomizedBuiltInElements), _e(We), G && (Cn = !1), Ce && (Ze = !0), an && (fe = ue({}, sa), he = bn(null), an.html === !0 && (ue(fe, aa), ue(he, ua)), an.svg === !0 && (ue(fe, yo), ue(he, ko), ue(he, mr)), an.svgFilters === !0 && (ue(fe, xo), ue(he, ko), ue(he, mr)), an.mathMl === !0 && (ue(fe, wo), ue(he, ca), ue(he, mr))), ft.tagCheck = null, ft.attributeCheck = null, He(h, "ADD_TAGS") && (typeof h.ADD_TAGS == "function" ? ft.tagCheck = h.ADD_TAGS : yn(h.ADD_TAGS) && (fe === on && (fe = Ye(fe)), ue(fe, h.ADD_TAGS, be))), He(h, "ADD_ATTR") && (typeof h.ADD_ATTR == "function" ? ft.attributeCheck = h.ADD_ATTR : yn(h.ADD_ATTR) && (he === ln && (he = Ye(he)), ue(he, h.ADD_ATTR, be))), He(h, "ADD_FORBID_CONTENTS") && yn(h.ADD_FORBID_CONTENTS) && ($t === qi && ($t = Ye($t)), ue($t, h.ADD_FORBID_CONTENTS, be)), Lr && (fe["#text"] = !0), le && ue(fe, [
|
|
17558
17575
|
"html",
|
|
17559
17576
|
"head",
|
|
17560
17577
|
"body"
|
|
17561
17578
|
]), fe.table && (ue(fe, ["tbody"]), delete jt.tbody), h.TRUSTED_TYPES_POLICY) {
|
|
17562
|
-
if (typeof h.TRUSTED_TYPES_POLICY.createHTML != "function") throw
|
|
17563
|
-
if (typeof h.TRUSTED_TYPES_POLICY.createScriptURL != "function") throw
|
|
17579
|
+
if (typeof h.TRUSTED_TYPES_POLICY.createHTML != "function") throw St('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');
|
|
17580
|
+
if (typeof h.TRUSTED_TYPES_POLICY.createScriptURL != "function") throw St('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');
|
|
17564
17581
|
const T = P;
|
|
17565
17582
|
P = h.TRUSTED_TYPES_POLICY;
|
|
17566
17583
|
try {
|
|
17567
|
-
|
|
17584
|
+
F = ae("");
|
|
17568
17585
|
} catch (q) {
|
|
17569
17586
|
throw P = T, q;
|
|
17570
17587
|
}
|
|
17571
|
-
} else h.TRUSTED_TYPES_POLICY === null ? (P = void 0,
|
|
17588
|
+
} else h.TRUSTED_TYPES_POLICY === null ? (P = void 0, F = "") : (P === void 0 && (P = Le()), P && typeof F == "string" && (F = ae("")));
|
|
17572
17589
|
Ae && Ae(h), un = h;
|
|
17573
17590
|
}, Oi = ue({}, [
|
|
17574
17591
|
...yo,
|
|
@@ -17589,7 +17606,7 @@ function Gu() {
|
|
|
17589
17606
|
try {
|
|
17590
17607
|
w(h).removeChild(h);
|
|
17591
17608
|
} catch {
|
|
17592
|
-
if (p(h), !w(h)) throw
|
|
17609
|
+
if (p(h), !w(h)) throw St("a node selected for removal could not be detached from its tree and cannot be safely returned; refusing to sanitize in place");
|
|
17593
17610
|
}
|
|
17594
17611
|
}, zi = function(h, y, T) {
|
|
17595
17612
|
try {
|
|
@@ -17603,7 +17620,7 @@ function Gu() {
|
|
|
17603
17620
|
}, Br = function(h) {
|
|
17604
17621
|
Hr(h);
|
|
17605
17622
|
const y = v(h);
|
|
17606
|
-
y &&
|
|
17623
|
+
y && kt(pw(y), (q) => {
|
|
17607
17624
|
try {
|
|
17608
17625
|
p(q);
|
|
17609
17626
|
} catch {
|
|
@@ -17633,7 +17650,7 @@ function Gu() {
|
|
|
17633
17650
|
}
|
|
17634
17651
|
}
|
|
17635
17652
|
if (h === "is")
|
|
17636
|
-
if (
|
|
17653
|
+
if (Ze || Ce) try {
|
|
17637
17654
|
Rt(y);
|
|
17638
17655
|
} catch {
|
|
17639
17656
|
}
|
|
@@ -17672,30 +17689,30 @@ function Gu() {
|
|
|
17672
17689
|
}, !0), y;
|
|
17673
17690
|
}, pc = function(h, y) {
|
|
17674
17691
|
const T = mo();
|
|
17675
|
-
|
|
17692
|
+
kt(jr(h), (q) => {
|
|
17676
17693
|
B(q) === ye.element && go(T, q);
|
|
17677
|
-
}),
|
|
17694
|
+
}), kt(y, (q) => {
|
|
17678
17695
|
B(q) === ye.element && !Dn(T, q) && Fi(q);
|
|
17679
17696
|
});
|
|
17680
17697
|
}, Bi = function(h, y) {
|
|
17681
17698
|
let T = !1;
|
|
17682
|
-
return
|
|
17699
|
+
return kt(t.removed, (q) => {
|
|
17683
17700
|
q.element && (T = T || q.element === h, Hr(q.element));
|
|
17684
17701
|
}), pc(h, y), T;
|
|
17685
17702
|
}, dc = 8, hc = function(h, y) {
|
|
17686
17703
|
const T = Vt;
|
|
17687
17704
|
let q = null;
|
|
17688
|
-
const $ = () => (q || (q = mo(),
|
|
17705
|
+
const $ = () => (q || (q = mo(), kt(y, (X) => {
|
|
17689
17706
|
go(q, X);
|
|
17690
17707
|
})), q);
|
|
17691
17708
|
for (let X = 0; ; X++) {
|
|
17692
17709
|
const ne = jr(h), we = [h];
|
|
17693
17710
|
let dt = !1;
|
|
17694
|
-
if (
|
|
17711
|
+
if (kt(ne, (Oe) => {
|
|
17695
17712
|
B(Oe) === ye.documentFragment ? Pn(we, Oe) : !dt && !Dn(T, Oe) && (dt = Dn($(), Oe));
|
|
17696
17713
|
}), !dt) return;
|
|
17697
|
-
if (X >= dc) throw
|
|
17698
|
-
|
|
17714
|
+
if (X >= dc) throw St("the tree kept changing during in-place sanitization; refusing to return it");
|
|
17715
|
+
kt(we, (Oe, Fe) => {
|
|
17699
17716
|
mc(Oe, Fe > 0, h, $());
|
|
17700
17717
|
});
|
|
17701
17718
|
}
|
|
@@ -17729,7 +17746,7 @@ function Gu() {
|
|
|
17729
17746
|
});
|
|
17730
17747
|
}, Hi = function(h) {
|
|
17731
17748
|
let y = null, T = null;
|
|
17732
|
-
if (
|
|
17749
|
+
if (xt) h = "<remove></remove>" + h;
|
|
17733
17750
|
else {
|
|
17734
17751
|
const X = ra(h, /^[\r\n\t ]+/);
|
|
17735
17752
|
T = X && X[0];
|
|
@@ -17743,7 +17760,7 @@ function Gu() {
|
|
|
17743
17760
|
if (!y || !y.documentElement) {
|
|
17744
17761
|
y = ve.createDocument(sn, "template", null);
|
|
17745
17762
|
try {
|
|
17746
|
-
y.documentElement.innerHTML = Dr ?
|
|
17763
|
+
y.documentElement.innerHTML = Dr ? F : q;
|
|
17747
17764
|
} catch {
|
|
17748
17765
|
}
|
|
17749
17766
|
}
|
|
@@ -17753,12 +17770,12 @@ function Gu() {
|
|
|
17753
17770
|
const y = C ? C(h) : h.ownerDocument;
|
|
17754
17771
|
return Pe.call(y || h, h, s.SHOW_ELEMENT | s.SHOW_COMMENT | s.SHOW_TEXT | s.SHOW_PROCESSING_INSTRUCTION | s.SHOW_CDATA_SECTION, null);
|
|
17755
17772
|
}, rr = function(h) {
|
|
17756
|
-
return h = On(h,
|
|
17773
|
+
return h = On(h, Je, " "), h = On(h, $e, " "), h = On(h, ce, " "), h;
|
|
17757
17774
|
}, $r = function(h) {
|
|
17758
17775
|
var y;
|
|
17759
17776
|
ji(h);
|
|
17760
17777
|
const T = (y = h.querySelectorAll) === null || y === void 0 ? void 0 : y.call(h, "template");
|
|
17761
|
-
T &&
|
|
17778
|
+
T && kt(T, (q) => {
|
|
17762
17779
|
Nt(q.content) && $r(q.content);
|
|
17763
17780
|
});
|
|
17764
17781
|
}, ji = function(h) {
|
|
@@ -17768,25 +17785,25 @@ function Gu() {
|
|
|
17768
17785
|
for (; q; )
|
|
17769
17786
|
q.data = rr(q.data), q = T.nextNode();
|
|
17770
17787
|
}, or = function(h) {
|
|
17771
|
-
const y =
|
|
17772
|
-
return typeof y != "string" || be(y) !== "form" ? !1 : typeof h.nodeName != "string" || typeof h.textContent != "string" || typeof h.removeChild != "function" || h.attributes !== _(h) || typeof h.removeAttribute != "function" || typeof h.removeAttributeNode != "function" || typeof h.getAttributeNode != "function" || typeof h.setAttribute != "function" || typeof h.namespaceURI != "string" || typeof h.insertBefore != "function" || typeof h.hasChildNodes != "function" || h.nodeType !==
|
|
17788
|
+
const y = M ? M(h) : null;
|
|
17789
|
+
return typeof y != "string" || be(y) !== "form" ? !1 : typeof h.nodeName != "string" || typeof h.textContent != "string" || typeof h.removeChild != "function" || h.attributes !== _(h) || typeof h.removeAttribute != "function" || typeof h.removeAttributeNode != "function" || typeof h.getAttributeNode != "function" || typeof h.setAttribute != "function" || typeof h.namespaceURI != "string" || typeof h.insertBefore != "function" || typeof h.hasChildNodes != "function" || h.nodeType !== z(h) || h.childNodes !== v(h);
|
|
17773
17790
|
}, Nt = function(h) {
|
|
17774
|
-
if (!
|
|
17791
|
+
if (!z || typeof h != "object" || h === null) return !1;
|
|
17775
17792
|
try {
|
|
17776
|
-
return
|
|
17793
|
+
return z(h) === ye.documentFragment;
|
|
17777
17794
|
} catch {
|
|
17778
17795
|
return !1;
|
|
17779
17796
|
}
|
|
17780
17797
|
}, En = function(h) {
|
|
17781
|
-
if (!
|
|
17798
|
+
if (!z || typeof h != "object" || h === null) return !1;
|
|
17782
17799
|
try {
|
|
17783
|
-
return typeof
|
|
17800
|
+
return typeof z(h) == "number";
|
|
17784
17801
|
} catch {
|
|
17785
17802
|
return !1;
|
|
17786
17803
|
}
|
|
17787
17804
|
};
|
|
17788
17805
|
function st(I, h, y) {
|
|
17789
|
-
I.length !== 0 &&
|
|
17806
|
+
I.length !== 0 && kt(I, (T) => {
|
|
17790
17807
|
T.call(t, h, y, un);
|
|
17791
17808
|
});
|
|
17792
17809
|
}
|
|
@@ -17821,7 +17838,7 @@ function Gu() {
|
|
|
17821
17838
|
if (or(h))
|
|
17822
17839
|
return Rt(h), !0;
|
|
17823
17840
|
const T = be(N(h));
|
|
17824
|
-
if (fe = Vi(j.uponSanitizeElement, fe, on,
|
|
17841
|
+
if (fe = Vi(j.uponSanitizeElement, fe, on, Qe), st(j.uponSanitizeElement, h, {
|
|
17825
17842
|
tagName: T,
|
|
17826
17843
|
allowedTags: fe
|
|
17827
17844
|
}), fn(h, y)) return !0;
|
|
@@ -17839,7 +17856,7 @@ function Gu() {
|
|
|
17839
17856
|
}
|
|
17840
17857
|
return st(j.afterSanitizeElements, h, null), fn(h, y);
|
|
17841
17858
|
}, $i = function(h, y, T) {
|
|
17842
|
-
if (Zn[y] || Ui(y, h) ||
|
|
17859
|
+
if (Zn[y] || Ui(y, h) || et && (y === "id" || y === "name") && (T in n || T in ac)) return !1;
|
|
17843
17860
|
const q = he[y] || ft.attributeCheck instanceof Function && ft.attributeCheck(y, h);
|
|
17844
17861
|
return Cn && qe(it, y) || er && qe(lt, y) ? !0 : q ? Ri[y] || qe(vn, On(T, _t, "")) || (y === "src" || y === "xlink:href" || y === "href") && h !== "script" && oa(T, "data:") === 0 && _i[h] || A && !qe(qt, On(T, _t, "")) ? !0 : !T : Wi(h) && ir(We.tagNameCheck, h) && ir(We.attributeNameCheck, y, h) || y === "is" && We.allowCustomizedBuiltInElements && ir(We.tagNameCheck, T);
|
|
17845
17862
|
}, wc = ue({}, [
|
|
@@ -17933,7 +17950,7 @@ function Gu() {
|
|
|
17933
17950
|
shadow: null
|
|
17934
17951
|
});
|
|
17935
17952
|
if ($) {
|
|
17936
|
-
const ne =
|
|
17953
|
+
const ne = M ? M(q) : null;
|
|
17937
17954
|
if (typeof ne == "string" && be(ne) === "template") {
|
|
17938
17955
|
const we = q.content;
|
|
17939
17956
|
Nt(we) && y.push({
|
|
@@ -17957,9 +17974,9 @@ function Gu() {
|
|
|
17957
17974
|
return t.sanitize = function(I) {
|
|
17958
17975
|
let h = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, y = null, T = null, q = null, $ = null;
|
|
17959
17976
|
if (Dr = !I, Dr && (I = "<!-->"), typeof I != "string" && !En(I) && (I = yw(I), typeof I != "string"))
|
|
17960
|
-
throw
|
|
17977
|
+
throw St("dirty is not a string, aborting");
|
|
17961
17978
|
if (!t.isSupported) return I;
|
|
17962
|
-
De ? (fe =
|
|
17979
|
+
De ? (fe = Qe, he = ze) : Fr(h), (j.uponSanitizeElement.length > 0 || j.uponSanitizeAttribute.length > 0) && (fe = Ye(fe)), j.uponSanitizeAttribute.length > 0 && (he = Ye(he)), t.removed = [];
|
|
17963
17980
|
const X = Pr && typeof I != "string" && En(I);
|
|
17964
17981
|
let ne = [];
|
|
17965
17982
|
const we = Vt;
|
|
@@ -17969,18 +17986,18 @@ function Gu() {
|
|
|
17969
17986
|
if (typeof Fe == "string") {
|
|
17970
17987
|
const pn = be(Fe);
|
|
17971
17988
|
if (!fe[pn] || jt[pn])
|
|
17972
|
-
throw Br(I),
|
|
17989
|
+
throw Br(I), St("root node is forbidden and cannot be sanitized in-place");
|
|
17973
17990
|
}
|
|
17974
17991
|
if (or(I))
|
|
17975
|
-
throw Br(I),
|
|
17992
|
+
throw Br(I), St("root node is clobbered and cannot be sanitized in-place");
|
|
17976
17993
|
ne = jr(I), Vt = mo();
|
|
17977
17994
|
} else if (En(I))
|
|
17978
17995
|
y = Hi("<!---->"), T = y.ownerDocument.importNode(I, !0), T.nodeType === ye.element && T.nodeName === "BODY" || T.nodeName === "HTML" ? y = T : y.appendChild(T), Yr(y);
|
|
17979
17996
|
else {
|
|
17980
|
-
if (!
|
|
17981
|
-
if (y = Hi(I), !y) return
|
|
17997
|
+
if (!Ze && !G && !le && I.indexOf("<") === -1) return P && at ? ae(I) : I;
|
|
17998
|
+
if (y = Hi(I), !y) return Ze ? null : at ? F : "";
|
|
17982
17999
|
}
|
|
17983
|
-
y &&
|
|
18000
|
+
y && xt && Rt(y.firstChild);
|
|
17984
18001
|
const dt = X ? I : y;
|
|
17985
18002
|
try {
|
|
17986
18003
|
X && Yr(I);
|
|
@@ -17994,10 +18011,10 @@ function Gu() {
|
|
|
17994
18011
|
Vt = we;
|
|
17995
18012
|
}
|
|
17996
18013
|
if (X) {
|
|
17997
|
-
if (Bi(I, ne)) throw
|
|
18014
|
+
if (Bi(I, ne)) throw St("a node selected for removal could not be safely returned; refusing to sanitize in place");
|
|
17998
18015
|
return G && $r(I), I;
|
|
17999
18016
|
}
|
|
18000
|
-
if (
|
|
18017
|
+
if (Ze) {
|
|
18001
18018
|
if (G && $r(y), Ce)
|
|
18002
18019
|
for ($ = b.call(y.ownerDocument); y.firstChild; ) $.appendChild(y.firstChild);
|
|
18003
18020
|
else $ = y;
|
|
@@ -18008,9 +18025,9 @@ function Gu() {
|
|
|
18008
18025
|
` + Oe), G && (Oe = rr(Oe)), P && at ? ae(Oe) : Oe;
|
|
18009
18026
|
}, t.setConfig = function() {
|
|
18010
18027
|
let I = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
|
|
18011
|
-
Fr(I), De = !0,
|
|
18028
|
+
Fr(I), De = !0, Qe = fe, ze = he;
|
|
18012
18029
|
}, t.clearConfig = function() {
|
|
18013
|
-
un = null, De = !1,
|
|
18030
|
+
un = null, De = !1, Qe = null, ze = null, P = re, F = "";
|
|
18014
18031
|
}, t.isValidAttribute = function(I, h, y) {
|
|
18015
18032
|
un || Fr({});
|
|
18016
18033
|
const T = be(I), q = be(h);
|
|
@@ -18050,7 +18067,7 @@ function Ow({
|
|
|
18050
18067
|
isDisabled: e,
|
|
18051
18068
|
onFiles: t
|
|
18052
18069
|
}) {
|
|
18053
|
-
const n =
|
|
18070
|
+
const n = Xe(null);
|
|
18054
18071
|
return /* @__PURE__ */ Z(zt, { children: [
|
|
18055
18072
|
/* @__PURE__ */ x(
|
|
18056
18073
|
"input",
|
|
@@ -18155,13 +18172,13 @@ function zw(e) {
|
|
|
18155
18172
|
};
|
|
18156
18173
|
}
|
|
18157
18174
|
function Fw(e) {
|
|
18158
|
-
const t =
|
|
18159
|
-
return
|
|
18175
|
+
const t = Xe(e);
|
|
18176
|
+
return bt(() => {
|
|
18160
18177
|
t.current = e;
|
|
18161
18178
|
}), t;
|
|
18162
18179
|
}
|
|
18163
18180
|
function Bw(e) {
|
|
18164
|
-
const [t, n] = Se(!1), r = Fw(e), o =
|
|
18181
|
+
const [t, n] = Se(!1), r = Fw(e), o = Xe(null), l = wa(
|
|
18165
18182
|
(i) => {
|
|
18166
18183
|
if (o.current?.abort(), o.current = null, !i) return;
|
|
18167
18184
|
const a = new AbortController();
|
|
@@ -18259,7 +18276,7 @@ function Ww(e) {
|
|
|
18259
18276
|
return { strong: ma(l), soft: ma(i) };
|
|
18260
18277
|
}
|
|
18261
18278
|
function Gw() {
|
|
18262
|
-
const e =
|
|
18279
|
+
const e = Xe(!1), t = Xe(0), n = Xe(0);
|
|
18263
18280
|
return {
|
|
18264
18281
|
onMouseDown: (a) => {
|
|
18265
18282
|
e.current = !0;
|
|
@@ -18283,7 +18300,7 @@ function Gw() {
|
|
|
18283
18300
|
const Yw = 1100, ga = 4e3, Xw = 9e3;
|
|
18284
18301
|
function Kw(e) {
|
|
18285
18302
|
const [t, n] = Se(!1);
|
|
18286
|
-
return
|
|
18303
|
+
return bt(() => {
|
|
18287
18304
|
if (!e) return;
|
|
18288
18305
|
let r, o = !1;
|
|
18289
18306
|
const l = () => {
|
|
@@ -18300,7 +18317,7 @@ function Kw(e) {
|
|
|
18300
18317
|
}, [e]), t;
|
|
18301
18318
|
}
|
|
18302
18319
|
function Jw() {
|
|
18303
|
-
const [e, t] = Se(!1), n =
|
|
18320
|
+
const [e, t] = Se(!1), n = Xe(null);
|
|
18304
18321
|
return { scrollContainerRef: (o) => {
|
|
18305
18322
|
if (n.current?.disconnect(), n.current = null, !o) return;
|
|
18306
18323
|
const l = () => {
|
|
@@ -18477,21 +18494,21 @@ Cr.isSupported && Cr.addHook("afterSanitizeAttributes", (e) => {
|
|
|
18477
18494
|
const rk = "eloq:bg-card eloq:rounded-3xl eloq:shadow-[0_0_4px_0_rgba(0,0,0,0.20)] eloq:dark:shadow-none eloq:dark:border eloq:dark:border-border", ok = "eloq:w-full eloq:rounded-t-2xl eloq:bg-cream eloq:border-t eloq:border-x eloq:border-border eloq:px-5 eloq:pt-5 eloq:pb-4 eloq:shadow-[0_-8px_24px_rgba(0,0,0,0.08)] eloq:dark:shadow-none", ik = "eloq:flex eloq:items-center eloq:justify-between eloq:w-[70%] eloq:m-auto eloq:rounded-full eloq:py-2 eloq:pl-4 eloq:pr-2 eloq:text-sm eloq:font-semibold eloq:transition-opacity eloq:hover:opacity-90 eloq:focus-visible:outline-none eloq:focus-visible:ring-2 eloq:focus-visible:ring-primary eloq:focus-visible:ring-offset-2", lk = "eloq:bg-cream", ak = "eloq:bg-muted-foreground eloq:dark:bg-muted eloq:dark:text-muted-foreground/50";
|
|
18478
18495
|
function sk() {
|
|
18479
18496
|
const [e, t] = Se(!1);
|
|
18480
|
-
return
|
|
18497
|
+
return bt(() => {
|
|
18481
18498
|
t(!0);
|
|
18482
18499
|
}, []), e && Cr.isSupported;
|
|
18483
18500
|
}
|
|
18484
18501
|
function uk() {
|
|
18485
|
-
const { error: e } = tk(), t = !!e, n = nn(), r =
|
|
18502
|
+
const { error: e } = tk(), t = !!e, n = nn(), r = Xe(null), [o, l] = Se(""), i = ei(), a = !!n.messages?.some((z) => z.isRatingRequest), s = n.keyboardInset ?? 0, u = sk(), f = !!n.hasAttachments, c = t || a, d = zw(
|
|
18486
18503
|
f && !c
|
|
18487
18504
|
), p = Bw(d.addFiles), g = !!o.trim() || d.attachmentFiles.length > 0, k = i.userBubbleTextColor || Ai(i.userBubbleColor), v = () => g && !c ? {
|
|
18488
18505
|
backgroundColor: i.userBubbleColor,
|
|
18489
18506
|
color: k
|
|
18490
|
-
} : {}, w = (
|
|
18491
|
-
l(
|
|
18492
|
-
}, E = async (
|
|
18493
|
-
|
|
18494
|
-
const
|
|
18507
|
+
} : {}, w = (z) => {
|
|
18508
|
+
l(z), r.current && r.current.focus();
|
|
18509
|
+
}, E = async (z) => {
|
|
18510
|
+
z.preventDefault();
|
|
18511
|
+
const M = o.trim();
|
|
18495
18512
|
if (!g || c) return;
|
|
18496
18513
|
l("");
|
|
18497
18514
|
const C = d.takeFiles();
|
|
@@ -18499,7 +18516,7 @@ function uk() {
|
|
|
18499
18516
|
if (await n.onSendMessage?.(
|
|
18500
18517
|
{
|
|
18501
18518
|
id: crypto.randomUUID(),
|
|
18502
|
-
content:
|
|
18519
|
+
content: M,
|
|
18503
18520
|
sender: "user",
|
|
18504
18521
|
timestamp: (/* @__PURE__ */ new Date()).toISOString()
|
|
18505
18522
|
},
|
|
@@ -18511,7 +18528,7 @@ function uk() {
|
|
|
18511
18528
|
B.style.height = `${N}px`;
|
|
18512
18529
|
}
|
|
18513
18530
|
} catch (B) {
|
|
18514
|
-
l(
|
|
18531
|
+
l(M), d.restoreFiles(C, B);
|
|
18515
18532
|
}
|
|
18516
18533
|
}, _ = () => n.isChatClosed ? /* @__PURE__ */ x("div", { className: "eloq:w-full eloq:z-20 eloq:animate-slide-up-in", children: /* @__PURE__ */ Z(
|
|
18517
18534
|
"div",
|
|
@@ -18575,21 +18592,21 @@ function uk() {
|
|
|
18575
18592
|
rows: 1,
|
|
18576
18593
|
value: o,
|
|
18577
18594
|
disabled: c,
|
|
18578
|
-
onChange: (
|
|
18579
|
-
onKeyDown: (
|
|
18580
|
-
if (
|
|
18581
|
-
|
|
18582
|
-
const
|
|
18583
|
-
|
|
18595
|
+
onChange: (z) => l(z.target.value),
|
|
18596
|
+
onKeyDown: (z) => {
|
|
18597
|
+
if (z.key === "Enter" && !z.shiftKey) {
|
|
18598
|
+
z.preventDefault();
|
|
18599
|
+
const M = z.currentTarget.form;
|
|
18600
|
+
M && M.dispatchEvent(
|
|
18584
18601
|
new Event("submit", { bubbles: !0 })
|
|
18585
18602
|
);
|
|
18586
18603
|
}
|
|
18587
18604
|
},
|
|
18588
|
-
onInput: (
|
|
18589
|
-
const
|
|
18590
|
-
|
|
18591
|
-
const C = Math.min(
|
|
18592
|
-
|
|
18605
|
+
onInput: (z) => {
|
|
18606
|
+
const M = z.currentTarget;
|
|
18607
|
+
M.style.height = "auto";
|
|
18608
|
+
const C = Math.min(M.scrollHeight, 132);
|
|
18609
|
+
M.style.height = `${C}px`, l(M.value);
|
|
18593
18610
|
}
|
|
18594
18611
|
}
|
|
18595
18612
|
) }),
|
|
@@ -18698,7 +18715,7 @@ var ck = Object.defineProperty, At = (e, t) => ck(e, "name", { value: t, configu
|
|
|
18698
18715
|
crossOrigin: i.crossOrigin,
|
|
18699
18716
|
loadingStatus: a.imageLoadingStatus,
|
|
18700
18717
|
setLoadingStatus: a.setImageLoadingStatus
|
|
18701
|
-
}), u =
|
|
18718
|
+
}), u = vt((c) => {
|
|
18702
18719
|
l?.(c);
|
|
18703
18720
|
}), f = R.useRef(s);
|
|
18704
18721
|
return Un(() => {
|
|
@@ -18826,11 +18843,13 @@ function Lk(e) {
|
|
|
18826
18843
|
// where a popup-style "rise from the corner" animation is wrong.
|
|
18827
18844
|
skipAnimation: !i
|
|
18828
18845
|
}), u = () => /* @__PURE__ */ Z(Ko, { className: te(s, { "eloq:relative": a }), children: [
|
|
18829
|
-
a &&
|
|
18846
|
+
a && // Above the footer's z-20 layers (the ended-conversation panel, the
|
|
18847
|
+
// composer) so it runs the full height; clicks pass through to them.
|
|
18848
|
+
/* @__PURE__ */ x(
|
|
18830
18849
|
"div",
|
|
18831
18850
|
{
|
|
18832
18851
|
"data-testid": "test-mode-stripe",
|
|
18833
|
-
className: "eloq-test-mode-stripe eloq:absolute eloq:left-0 eloq:top-0 eloq:h-full eloq:w-3 eloq:z-
|
|
18852
|
+
className: "eloq-test-mode-stripe eloq:pointer-events-none eloq:absolute eloq:left-0 eloq:top-0 eloq:h-full eloq:w-3 eloq:z-30"
|
|
18834
18853
|
}
|
|
18835
18854
|
),
|
|
18836
18855
|
/* @__PURE__ */ x(
|
|
@@ -18870,7 +18889,7 @@ function mt({ className: e, ...t }) {
|
|
|
18870
18889
|
}
|
|
18871
18890
|
function kk(e, t) {
|
|
18872
18891
|
const [n, r] = Se(e);
|
|
18873
|
-
return
|
|
18892
|
+
return bt(() => {
|
|
18874
18893
|
const o = setTimeout(() => {
|
|
18875
18894
|
r(e);
|
|
18876
18895
|
}, t);
|
|
@@ -18951,4 +18970,4 @@ export {
|
|
|
18951
18970
|
ei as u,
|
|
18952
18971
|
Mx as w
|
|
18953
18972
|
};
|
|
18954
|
-
//# sourceMappingURL=skeleton-
|
|
18973
|
+
//# sourceMappingURL=skeleton-Bjh-b-YT.js.map
|