@pagelines/sdk 1.0.291 → 1.0.293
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/{AgentProvider.vue_vue_type_script_setup_true_lang-DmWkSIQQ.js → AgentProvider.vue_vue_type_script_setup_true_lang-Bg_PPQPT.js} +2 -2
- package/dist/{AgentProvider.vue_vue_type_script_setup_true_lang-DmWkSIQQ.js.map → AgentProvider.vue_vue_type_script_setup_true_lang-Bg_PPQPT.js.map} +1 -1
- package/dist/{AgentWidgetInline-D7pTvMJt.js → AgentWidgetInline-DSsDV1ks.js} +2 -2
- package/dist/{AgentWidgetInline-D7pTvMJt.js.map → AgentWidgetInline-DSsDV1ks.js.map} +1 -1
- package/dist/{AgentWidgetModal-DeP_KWDO.js → AgentWidgetModal-DLL8guTy.js} +3 -3
- package/dist/{AgentWidgetModal-DeP_KWDO.js.map → AgentWidgetModal-DLL8guTy.js.map} +1 -1
- package/dist/{AgentWidgetPopup-DJwdf8XH.js → AgentWidgetPopup-CUrXOmYA.js} +2 -2
- package/dist/{AgentWidgetPopup-DJwdf8XH.js.map → AgentWidgetPopup-CUrXOmYA.js.map} +1 -1
- package/dist/{AgentWrap.vue_vue_type_script_setup_true_lang-ClwAQWXO.js → AgentWrap.vue_vue_type_script_setup_true_lang-CwKY5BM_.js} +432 -426
- package/dist/{AgentWrap.vue_vue_type_script_setup_true_lang-ClwAQWXO.js.map → AgentWrap.vue_vue_type_script_setup_true_lang-CwKY5BM_.js.map} +1 -1
- package/dist/{FModal.vue_vue_type_script_setup_true_lang-DcdpaApF.js → FModal.vue_vue_type_script_setup_true_lang-DI6cyWhd.js} +55 -54
- package/dist/FModal.vue_vue_type_script_setup_true_lang-DI6cyWhd.js.map +1 -0
- package/dist/agent.js +4 -4
- package/dist/sdk.css +1 -1
- package/dist/widget.js +4 -4
- package/dist/widget.js.map +1 -1
- package/package.json +1 -1
- package/dist/FModal.vue_vue_type_script_setup_true_lang-DcdpaApF.js.map +0 -1
|
@@ -2,11 +2,11 @@ var nn = Object.defineProperty;
|
|
|
2
2
|
var ws = (r, t, e) => t in r ? nn(r, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : r[t] = e;
|
|
3
3
|
var l = (r, t) => nn(r, "name", { value: t, configurable: !0 });
|
|
4
4
|
var U = (r, t, e) => ws(r, typeof t != "symbol" ? t + "" : t, e);
|
|
5
|
-
import { defineComponent as ce, openBlock as f, createElementBlock as
|
|
5
|
+
import { defineComponent as ce, openBlock as f, createElementBlock as b, createElementVNode as p, normalizeClass as A, ref as q, watch as Ve, createBlock as Ae, TransitionGroup as _n, withCtx as Me, renderSlot as mt, computed as D, createCommentVNode as P, onMounted as _t, Fragment as ge, renderList as Je, withDirectives as In, vModelText as Mn, toDisplayString as Y, createVNode as ne, withKeys as Ts, createTextVNode as bt, unref as ie, resolveDynamicComponent as As, nextTick as ur, normalizeStyle as Er, Transition as sn, withModifiers as vr, shallowRef as $n, onUnmounted as Ss } from "vue";
|
|
6
6
|
import { S as dt } from "./socialPlatforms-Ck-b3SnQ.js";
|
|
7
7
|
import { SettingsObject as Es, Agent as Vt, getDefaultAvatarUrl as Dn, getColorSchemeOklch as Cs, createLogger as Rs } from "@pagelines/core";
|
|
8
|
-
import { P as
|
|
9
|
-
const
|
|
8
|
+
import { P as zs } from "./sdkClient-6j3pmwVP.js";
|
|
9
|
+
const _s = { class: "spinner max-w-sm" }, Is = {
|
|
10
10
|
class: "ring-circular h-full w-full origin-center",
|
|
11
11
|
viewBox: "25 25 50 50"
|
|
12
12
|
}, Wt = /* @__PURE__ */ ce({
|
|
@@ -16,10 +16,10 @@ const zs = { class: "spinner max-w-sm" }, Is = {
|
|
|
16
16
|
colorMode: { type: String, default: "primary" }
|
|
17
17
|
},
|
|
18
18
|
setup(r) {
|
|
19
|
-
return (t, e) => (f(),
|
|
20
|
-
(f(),
|
|
19
|
+
return (t, e) => (f(), b("div", _s, [
|
|
20
|
+
(f(), b("svg", Is, [
|
|
21
21
|
p("circle", {
|
|
22
|
-
class:
|
|
22
|
+
class: A([r.colorMode, "ring-path"]),
|
|
23
23
|
cx: "50",
|
|
24
24
|
cy: "50",
|
|
25
25
|
r: "20",
|
|
@@ -269,7 +269,7 @@ const $s = /* @__PURE__ */ ce({
|
|
|
269
269
|
mode: { default: "block" }
|
|
270
270
|
},
|
|
271
271
|
setup(r) {
|
|
272
|
-
return (t, e) => (f(), Ae(
|
|
272
|
+
return (t, e) => (f(), Ae(_n, {
|
|
273
273
|
name: r.disabled ? "" : "nlist"
|
|
274
274
|
}, {
|
|
275
275
|
default: Me(() => [
|
|
@@ -291,38 +291,38 @@ const $s = /* @__PURE__ */ ce({
|
|
|
291
291
|
iconAfter: {}
|
|
292
292
|
},
|
|
293
293
|
setup(r) {
|
|
294
|
-
const t =
|
|
294
|
+
const t = D(() => ({
|
|
295
295
|
primary: "bg-primary-600 border-primary-400 hover:border-primary-300 hover:bg-primary-500",
|
|
296
296
|
green: "bg-green-600 border-green-400 hover:border-green-300 hover:bg-green-500",
|
|
297
297
|
red: "bg-red-600 border-red-400 hover:border-red-300 hover:bg-red-500",
|
|
298
298
|
default: "bg-white/10 border-white/20 hover:border-white/40 hover:bg-white/20"
|
|
299
|
-
})[r.theme]), e =
|
|
299
|
+
})[r.theme]), e = D(() => ({
|
|
300
300
|
sm: "px-4 py-2 text-sm",
|
|
301
301
|
md: "px-6 py-3 text-base",
|
|
302
302
|
lg: "px-8 py-4 text-base"
|
|
303
|
-
})[r.size]), n =
|
|
303
|
+
})[r.size]), n = D(() => ({
|
|
304
304
|
sm: "size-4",
|
|
305
305
|
md: "size-4",
|
|
306
306
|
lg: "size-5"
|
|
307
307
|
})[r.size]);
|
|
308
|
-
return (s, a) => (f(),
|
|
309
|
-
class:
|
|
308
|
+
return (s, a) => (f(), b("button", {
|
|
309
|
+
class: A(["relative inline-flex items-center justify-center gap-2 font-medium rounded-full backdrop-blur-sm border-2 text-white transition-all duration-200 focus:outline-none active:opacity-80 disabled:opacity-50 disabled:cursor-not-allowed cursor-pointer", [t.value, e.value]])
|
|
310
310
|
}, [
|
|
311
|
-
r.loading ? (f(),
|
|
311
|
+
r.loading ? (f(), b("div", Ds, [...a[0] || (a[0] = [
|
|
312
312
|
p("i", { class: "i-svg-spinners-90-ring-with-bg size-5" }, null, -1)
|
|
313
|
-
])])) :
|
|
313
|
+
])])) : P("", !0),
|
|
314
314
|
p("span", {
|
|
315
|
-
class:
|
|
315
|
+
class: A(["flex items-center gap-2 transition-opacity duration-200", r.loading ? "opacity-0" : "opacity-100"])
|
|
316
316
|
}, [
|
|
317
|
-
r.icon ? (f(),
|
|
317
|
+
r.icon ? (f(), b("i", {
|
|
318
318
|
key: 0,
|
|
319
|
-
class:
|
|
320
|
-
}, null, 2)) :
|
|
319
|
+
class: A([r.icon, n.value])
|
|
320
|
+
}, null, 2)) : P("", !0),
|
|
321
321
|
mt(s.$slots, "default"),
|
|
322
|
-
r.iconAfter ? (f(),
|
|
322
|
+
r.iconAfter ? (f(), b("i", {
|
|
323
323
|
key: 1,
|
|
324
|
-
class:
|
|
325
|
-
}, null, 2)) :
|
|
324
|
+
class: A([r.iconAfter, n.value])
|
|
325
|
+
}, null, 2)) : P("", !0)
|
|
326
326
|
], 2)
|
|
327
327
|
], 2));
|
|
328
328
|
}
|
|
@@ -334,7 +334,7 @@ const $s = /* @__PURE__ */ ce({
|
|
|
334
334
|
emits: ["update:modelValue"],
|
|
335
335
|
setup(r, { emit: t }) {
|
|
336
336
|
const e = t;
|
|
337
|
-
return (n, s) => (f(),
|
|
337
|
+
return (n, s) => (f(), b("input", {
|
|
338
338
|
type: "email",
|
|
339
339
|
autocomplete: "email",
|
|
340
340
|
placeholder: "Enter Your Email",
|
|
@@ -354,7 +354,7 @@ const $s = /* @__PURE__ */ ce({
|
|
|
354
354
|
emits: ["update:modelValue", "autoSubmit"],
|
|
355
355
|
setup(r, { emit: t }) {
|
|
356
356
|
const e = r, n = t, s = q([]), a = q(Array.from({ length: e.length }).fill("")), o = q(!1);
|
|
357
|
-
|
|
357
|
+
_t(() => {
|
|
358
358
|
e.modelValue && (a.value = e.modelValue.split("").slice(0, e.length)), e.focusFirst && !("ontouchstart" in window) && s.value[0]?.focus();
|
|
359
359
|
}), Ve(() => e.modelValue, (d) => {
|
|
360
360
|
a.value = d ? d.split("").slice(0, e.length) : Array.from({ length: e.length }).fill("");
|
|
@@ -371,12 +371,12 @@ const $s = /* @__PURE__ */ ce({
|
|
|
371
371
|
}, 10);
|
|
372
372
|
else {
|
|
373
373
|
const E = [...a.value];
|
|
374
|
-
k.split("").slice(0, e.length - d).forEach((
|
|
375
|
-
E[d + Q] =
|
|
374
|
+
k.split("").slice(0, e.length - d).forEach((L, Q) => {
|
|
375
|
+
E[d + Q] = L;
|
|
376
376
|
}), a.value = E;
|
|
377
|
-
const
|
|
377
|
+
const I = Math.min(d + k.length, e.length - 1);
|
|
378
378
|
setTimeout(() => {
|
|
379
|
-
s.value[
|
|
379
|
+
s.value[I]?.focus(), o.value = !1;
|
|
380
380
|
}, 10);
|
|
381
381
|
}
|
|
382
382
|
}
|
|
@@ -395,8 +395,8 @@ const $s = /* @__PURE__ */ ce({
|
|
|
395
395
|
for (let m = d; m < e.length; m++)
|
|
396
396
|
a.value[m] = "";
|
|
397
397
|
}
|
|
398
|
-
return l(g, "onFocus"), (d, m) => (f(),
|
|
399
|
-
(f(!0),
|
|
398
|
+
return l(g, "onFocus"), (d, m) => (f(), b("div", Ps, [
|
|
399
|
+
(f(!0), b(ge, null, Je(r.length, (k) => In((f(), b("input", {
|
|
400
400
|
key: k,
|
|
401
401
|
ref_for: !0,
|
|
402
402
|
ref: /* @__PURE__ */ l((E) => s.value[k - 1] = E, "ref"),
|
|
@@ -460,28 +460,28 @@ const $s = /* @__PURE__ */ ce({
|
|
|
460
460
|
}
|
|
461
461
|
}, "action")
|
|
462
462
|
}
|
|
463
|
-
}, a =
|
|
463
|
+
}, a = D(() => s[e.value]);
|
|
464
464
|
return Ve(() => r.sdk.activeUser.value, (o) => {
|
|
465
465
|
o && e.value === "code" && console.log("[ElAuthGate] Authentication successful", { email: o.email });
|
|
466
|
-
}), (o, u) => (f(),
|
|
466
|
+
}), (o, u) => (f(), b("div", {
|
|
467
467
|
"data-test": "auth-form",
|
|
468
468
|
"data-test-mode": e.value,
|
|
469
469
|
class: "flex flex-col items-center justify-center h-full p-6"
|
|
470
470
|
}, [
|
|
471
471
|
p("div", Fs, [
|
|
472
|
-
r.sdk.error.value ? (f(),
|
|
472
|
+
r.sdk.error.value ? (f(), b("p", js, Y(r.sdk.error.value), 1)) : P("", !0),
|
|
473
473
|
p("h3", Gs, Y(a.value.title), 1),
|
|
474
474
|
p("div", Hs, [
|
|
475
475
|
ne($s, null, {
|
|
476
476
|
default: Me(() => [
|
|
477
|
-
e.value === "email" ? (f(),
|
|
477
|
+
e.value === "email" ? (f(), b("div", Vs, [
|
|
478
478
|
ne(Os, {
|
|
479
479
|
modelValue: t.value.email,
|
|
480
480
|
"onUpdate:modelValue": u[0] || (u[0] = (i) => t.value.email = i),
|
|
481
481
|
"data-test": "auth-email-input",
|
|
482
482
|
onKeyup: Ts(a.value.action, ["enter"])
|
|
483
483
|
}, null, 8, ["modelValue", "onKeyup"])
|
|
484
|
-
])) : (f(),
|
|
484
|
+
])) : (f(), b("div", Ws, [
|
|
485
485
|
ne(Bs, {
|
|
486
486
|
modelValue: t.value.code,
|
|
487
487
|
"onUpdate:modelValue": u[1] || (u[1] = (i) => t.value.code = i),
|
|
@@ -491,7 +491,7 @@ const $s = /* @__PURE__ */ ce({
|
|
|
491
491
|
onAutoSubmit: a.value.action
|
|
492
492
|
}, null, 8, ["modelValue", "onAutoSubmit"])
|
|
493
493
|
])),
|
|
494
|
-
(f(),
|
|
494
|
+
(f(), b("div", {
|
|
495
495
|
key: a.value.button.label,
|
|
496
496
|
class: "space-y-4 w-full"
|
|
497
497
|
}, [
|
|
@@ -509,11 +509,11 @@ const $s = /* @__PURE__ */ ce({
|
|
|
509
509
|
]),
|
|
510
510
|
_: 1
|
|
511
511
|
}, 8, ["loading", "disabled", "onClick"]),
|
|
512
|
-
e.value === "code" ? (f(),
|
|
512
|
+
e.value === "code" ? (f(), b("button", {
|
|
513
513
|
key: 0,
|
|
514
514
|
class: "w-full text-xs text-white/50 hover:text-white/70 transition-colors py-2",
|
|
515
515
|
onClick: u[2] || (u[2] = (i) => e.value = "email")
|
|
516
|
-
}, " Change Email ")) :
|
|
516
|
+
}, " Change Email ")) : P("", !0)
|
|
517
517
|
]))
|
|
518
518
|
]),
|
|
519
519
|
_: 1
|
|
@@ -534,14 +534,14 @@ const $s = /* @__PURE__ */ ce({
|
|
|
534
534
|
layout: { default: "centered" }
|
|
535
535
|
},
|
|
536
536
|
setup(r) {
|
|
537
|
-
return (t, e) => (f(),
|
|
538
|
-
class:
|
|
537
|
+
return (t, e) => (f(), b("div", {
|
|
538
|
+
class: A(["flex gap-4", [
|
|
539
539
|
r.layout === "centered" ? "flex-col items-center text-center" : "flex-row items-center justify-center"
|
|
540
540
|
]])
|
|
541
541
|
}, [
|
|
542
542
|
p("div", qs, [
|
|
543
543
|
p("div", {
|
|
544
|
-
class:
|
|
544
|
+
class: A(["rounded-full overflow-hidden border-white", r.size === "lg" ? "w-20 h-20 sm:w-24 sm:h-24 border-4" : "w-16 sm:size-16 border-2"])
|
|
545
545
|
}, [
|
|
546
546
|
p("img", {
|
|
547
547
|
src: r.agent.avatarUrl.value,
|
|
@@ -552,24 +552,24 @@ const $s = /* @__PURE__ */ ce({
|
|
|
552
552
|
}, null, 40, Ys)
|
|
553
553
|
], 2),
|
|
554
554
|
p("div", Zs, [
|
|
555
|
-
r.isOnline ? (f(),
|
|
555
|
+
r.isOnline ? (f(), b(ge, { key: 0 }, [
|
|
556
556
|
e[1] || (e[1] = p("div", {
|
|
557
557
|
class: "size-3 bg-green-500 rounded-full ring-2 ring-white absolute animate-ping",
|
|
558
558
|
style: { "animation-duration": "3s" }
|
|
559
559
|
}, null, -1)),
|
|
560
560
|
e[2] || (e[2] = p("div", { class: "size-3 bg-green-500 rounded-full ring-2 ring-white" }, null, -1))
|
|
561
|
-
], 64)) : (f(),
|
|
561
|
+
], 64)) : (f(), b("div", Xs))
|
|
562
562
|
])
|
|
563
563
|
]),
|
|
564
564
|
p("div", Ks, [
|
|
565
565
|
p("h1", {
|
|
566
|
-
class:
|
|
566
|
+
class: A(["font-light text-white mb-1 truncate", [
|
|
567
567
|
r.size === "lg" ? "text-3xl mb-2" : "text-xl sm:text-2xl tracking-wide leading-tight",
|
|
568
568
|
r.layout === "horizontal" ? "text-white/95" : ""
|
|
569
569
|
]])
|
|
570
570
|
}, Y(r.agent.displayName.value), 3),
|
|
571
571
|
p("p", {
|
|
572
|
-
class:
|
|
572
|
+
class: A(["font-light line-clamp-1", [
|
|
573
573
|
r.size === "lg" ? "text-base text-white/60" : "text-sm sm:text-base",
|
|
574
574
|
r.layout === "horizontal" ? "text-white/70 truncate" : "text-white/60"
|
|
575
575
|
]])
|
|
@@ -723,19 +723,19 @@ const $s = /* @__PURE__ */ ce({
|
|
|
723
723
|
const a = [];
|
|
724
724
|
let o = 0, u = 0, i = 0, h;
|
|
725
725
|
const g = s.length;
|
|
726
|
-
for (let
|
|
727
|
-
const
|
|
726
|
+
for (let I = 0; I < g; I++) {
|
|
727
|
+
const L = s[I];
|
|
728
728
|
if (o === 0 && u === 0) {
|
|
729
|
-
if (
|
|
730
|
-
a.push(s.slice(i,
|
|
729
|
+
if (L === cn) {
|
|
730
|
+
a.push(s.slice(i, I)), i = I + 1;
|
|
731
731
|
continue;
|
|
732
732
|
}
|
|
733
|
-
if (
|
|
734
|
-
h =
|
|
733
|
+
if (L === "/") {
|
|
734
|
+
h = I;
|
|
735
735
|
continue;
|
|
736
736
|
}
|
|
737
737
|
}
|
|
738
|
-
|
|
738
|
+
L === "[" ? o++ : L === "]" ? o-- : L === "(" ? u++ : L === ")" && u--;
|
|
739
739
|
}
|
|
740
740
|
const d = a.length === 0 ? s : s.slice(i);
|
|
741
741
|
let m = d, k = !1;
|
|
@@ -793,15 +793,15 @@ const $s = /* @__PURE__ */ ce({
|
|
|
793
793
|
modifiers: m,
|
|
794
794
|
hasImportantModifier: k,
|
|
795
795
|
baseClassName: E,
|
|
796
|
-
maybePostfixModifierPosition:
|
|
796
|
+
maybePostfixModifierPosition: I
|
|
797
797
|
} = e(g);
|
|
798
798
|
if (d) {
|
|
799
799
|
i = g + (i.length > 0 ? " " + i : i);
|
|
800
800
|
continue;
|
|
801
801
|
}
|
|
802
|
-
let
|
|
802
|
+
let L = !!I, Q = n(L ? E.substring(0, I) : E);
|
|
803
803
|
if (!Q) {
|
|
804
|
-
if (!
|
|
804
|
+
if (!L) {
|
|
805
805
|
i = g + (i.length > 0 ? " " + i : i);
|
|
806
806
|
continue;
|
|
807
807
|
}
|
|
@@ -809,13 +809,13 @@ const $s = /* @__PURE__ */ ce({
|
|
|
809
809
|
i = g + (i.length > 0 ? " " + i : i);
|
|
810
810
|
continue;
|
|
811
811
|
}
|
|
812
|
-
|
|
812
|
+
L = !1;
|
|
813
813
|
}
|
|
814
814
|
const xe = m.length === 0 ? "" : m.length === 1 ? m[0] : a(m).join(":"), B = k ? xe + wr : xe, y = B + Q;
|
|
815
815
|
if (o.indexOf(y) > -1)
|
|
816
816
|
continue;
|
|
817
817
|
o.push(y);
|
|
818
|
-
const F = s(Q,
|
|
818
|
+
const F = s(Q, L);
|
|
819
819
|
for (let J = 0; J < F.length; ++J) {
|
|
820
820
|
const de = F[J];
|
|
821
821
|
o.push(B + de);
|
|
@@ -856,14 +856,14 @@ const $s = /* @__PURE__ */ ce({
|
|
|
856
856
|
// For example, `hsl(0 0% 0%)` would be classified as a length without this check.
|
|
857
857
|
// I could also use lookbehind assertion in `lengthUnitRegex` but that isn't supported widely enough.
|
|
858
858
|
wa.test(r) && !Ta.test(r)
|
|
859
|
-
), "isLengthOnly"),
|
|
859
|
+
), "isLengthOnly"), zr = /* @__PURE__ */ l(() => !1, "isNever"), Ca = /* @__PURE__ */ l((r) => Aa.test(r), "isShadow"), Ra = /* @__PURE__ */ l((r) => Sa.test(r), "isImage"), za = /* @__PURE__ */ l((r) => !w(r) && !T(r), "isAnyNonArbitrary"), _a = /* @__PURE__ */ l((r) => We(r, Wn, zr), "isArbitrarySize"), w = /* @__PURE__ */ l((r) => Fn.test(r), "isArbitraryValue"), Ke = /* @__PURE__ */ l((r) => We(r, qn, Ea), "isArbitraryLength"), dn = /* @__PURE__ */ l((r) => We(r, Na, $), "isArbitraryNumber"), Ia = /* @__PURE__ */ l((r) => We(r, Zn, Gn), "isArbitraryWeight"), Ma = /* @__PURE__ */ l((r) => We(r, Yn, zr), "isArbitraryFamilyName"), hn = /* @__PURE__ */ l((r) => We(r, Hn, zr), "isArbitraryPosition"), $a = /* @__PURE__ */ l((r) => We(r, Vn, Ra), "isArbitraryImage"), Nt = /* @__PURE__ */ l((r) => We(r, Xn, Ca), "isArbitraryShadow"), T = /* @__PURE__ */ l((r) => jn.test(r), "isArbitraryVariable"), yt = /* @__PURE__ */ l((r) => tt(r, qn), "isArbitraryVariableLength"), Da = /* @__PURE__ */ l((r) => tt(r, Yn), "isArbitraryVariableFamilyName"), gn = /* @__PURE__ */ l((r) => tt(r, Hn), "isArbitraryVariablePosition"), La = /* @__PURE__ */ l((r) => tt(r, Wn), "isArbitraryVariableSize"), Oa = /* @__PURE__ */ l((r) => tt(r, Vn), "isArbitraryVariableImage"), Bt = /* @__PURE__ */ l((r) => tt(r, Xn, !0), "isArbitraryVariableShadow"), Pa = /* @__PURE__ */ l((r) => tt(r, Zn, !0), "isArbitraryVariableWeight"), We = /* @__PURE__ */ l((r, t, e) => {
|
|
860
860
|
const n = Fn.exec(r);
|
|
861
861
|
return n ? n[1] ? t(n[1]) : e(n[2]) : !1;
|
|
862
862
|
}, "getIsArbitraryValue"), tt = /* @__PURE__ */ l((r, t, e = !1) => {
|
|
863
863
|
const n = jn.exec(r);
|
|
864
864
|
return n ? n[1] ? t(n[1]) : e : !1;
|
|
865
865
|
}, "getIsArbitraryVariable"), Hn = /* @__PURE__ */ l((r) => r === "position" || r === "percentage", "isLabelPosition"), Vn = /* @__PURE__ */ l((r) => r === "image" || r === "url", "isLabelImage"), Wn = /* @__PURE__ */ l((r) => r === "length" || r === "size" || r === "bg-size", "isLabelSize"), qn = /* @__PURE__ */ l((r) => r === "length", "isLabelLength"), Na = /* @__PURE__ */ l((r) => r === "number", "isLabelNumber"), Yn = /* @__PURE__ */ l((r) => r === "family-name", "isLabelFamilyName"), Zn = /* @__PURE__ */ l((r) => r === "number" || r === "weight", "isLabelWeight"), Xn = /* @__PURE__ */ l((r) => r === "shadow", "isLabelShadow"), Ba = /* @__PURE__ */ l(() => {
|
|
866
|
-
const r = ae("color"), t = ae("font"), e = ae("text"), n = ae("font-weight"), s = ae("tracking"), a = ae("leading"), o = ae("breakpoint"), u = ae("container"), i = ae("spacing"), h = ae("radius"), g = ae("shadow"), d = ae("inset-shadow"), m = ae("text-shadow"), k = ae("drop-shadow"), E = ae("blur"),
|
|
866
|
+
const r = ae("color"), t = ae("font"), e = ae("text"), n = ae("font-weight"), s = ae("tracking"), a = ae("leading"), o = ae("breakpoint"), u = ae("container"), i = ae("spacing"), h = ae("radius"), g = ae("shadow"), d = ae("inset-shadow"), m = ae("text-shadow"), k = ae("drop-shadow"), E = ae("blur"), I = ae("perspective"), L = ae("aspect"), Q = ae("ease"), xe = ae("animate"), B = /* @__PURE__ */ l(() => ["auto", "avoid", "all", "avoid-page", "page", "left", "right", "column"], "scaleBreak"), y = /* @__PURE__ */ l(() => [
|
|
867
867
|
"center",
|
|
868
868
|
"top",
|
|
869
869
|
"bottom",
|
|
@@ -883,11 +883,11 @@ const $s = /* @__PURE__ */ ce({
|
|
|
883
883
|
"left-bottom"
|
|
884
884
|
], "scalePosition"), F = /* @__PURE__ */ l(() => [...y(), T, w], "scalePositionWithArbitrary"), J = /* @__PURE__ */ l(() => ["auto", "hidden", "clip", "visible", "scroll"], "scaleOverflow"), de = /* @__PURE__ */ l(() => ["auto", "contain", "none"], "scaleOverscroll"), v = /* @__PURE__ */ l(() => [T, w, i], "scaleUnambiguousSpacing"), oe = /* @__PURE__ */ l(() => [Ue, "full", "auto", ...v()], "scaleInset"), nt = /* @__PURE__ */ l(() => [Fe, "none", "subgrid", T, w], "scaleGridTemplateColsRows"), ee = /* @__PURE__ */ l(() => ["auto", {
|
|
885
885
|
span: ["full", Fe, T, w]
|
|
886
|
-
}, Fe, T, w], "scaleGridColRowStartAndEnd"), we = /* @__PURE__ */ l(() => [Fe, "auto", T, w], "scaleGridColRowStartOrEnd"), $e = /* @__PURE__ */ l(() => ["auto", "min", "max", "fr", T, w], "scaleGridAutoColsRows"), M = /* @__PURE__ */ l(() => ["start", "end", "center", "between", "around", "evenly", "stretch", "baseline", "center-safe", "end-safe"], "scaleAlignPrimaryAxis"),
|
|
886
|
+
}, Fe, T, w], "scaleGridColRowStartAndEnd"), we = /* @__PURE__ */ l(() => [Fe, "auto", T, w], "scaleGridColRowStartOrEnd"), $e = /* @__PURE__ */ l(() => ["auto", "min", "max", "fr", T, w], "scaleGridAutoColsRows"), M = /* @__PURE__ */ l(() => ["start", "end", "center", "between", "around", "evenly", "stretch", "baseline", "center-safe", "end-safe"], "scaleAlignPrimaryAxis"), _ = /* @__PURE__ */ l(() => ["start", "end", "center", "stretch", "center-safe", "end-safe"], "scaleAlignSecondaryAxis"), z = /* @__PURE__ */ l(() => ["auto", ...v()], "scaleMargin"), j = /* @__PURE__ */ l(() => [Ue, "auto", "full", "dvw", "dvh", "lvw", "lvh", "svw", "svh", "min", "max", "fit", ...v()], "scaleSizing"), Z = /* @__PURE__ */ l(() => [Ue, "screen", "full", "dvw", "lvw", "svw", "min", "max", "fit", ...v()], "scaleSizingInline"), ve = /* @__PURE__ */ l(() => [Ue, "screen", "full", "lh", "dvh", "lvh", "svh", "min", "max", "fit", ...v()], "scaleSizingBlock"), C = /* @__PURE__ */ l(() => [r, T, w], "scaleColor"), V = /* @__PURE__ */ l(() => [...y(), gn, hn, {
|
|
887
887
|
position: [T, w]
|
|
888
888
|
}], "scaleBgPosition"), xt = /* @__PURE__ */ l(() => ["no-repeat", {
|
|
889
889
|
repeat: ["", "x", "y", "space", "round"]
|
|
890
|
-
}], "scaleBgRepeat"), te = /* @__PURE__ */ l(() => ["auto", "cover", "contain", La,
|
|
890
|
+
}], "scaleBgRepeat"), te = /* @__PURE__ */ l(() => ["auto", "cover", "contain", La, _a, {
|
|
891
891
|
size: [T, w]
|
|
892
892
|
}], "scaleBgSize"), st = /* @__PURE__ */ l(() => [hr, yt, Ke], "scaleGradientStopPosition"), N = /* @__PURE__ */ l(() => [
|
|
893
893
|
// Deprecated since Tailwind CSS v4.0.0
|
|
@@ -916,7 +916,7 @@ const $s = /* @__PURE__ */ ce({
|
|
|
916
916
|
container: [Be],
|
|
917
917
|
"drop-shadow": [Be],
|
|
918
918
|
ease: ["in", "out", "in-out"],
|
|
919
|
-
font: [
|
|
919
|
+
font: [za],
|
|
920
920
|
"font-weight": ["thin", "extralight", "light", "normal", "medium", "semibold", "bold", "extrabold", "black"],
|
|
921
921
|
"inset-shadow": [Be],
|
|
922
922
|
leading: ["none", "tight", "snug", "normal", "relaxed", "loose"],
|
|
@@ -937,7 +937,7 @@ const $s = /* @__PURE__ */ ce({
|
|
|
937
937
|
* @see https://tailwindcss.com/docs/aspect-ratio
|
|
938
938
|
*/
|
|
939
939
|
aspect: [{
|
|
940
|
-
aspect: ["auto", "square", Ue, w, T,
|
|
940
|
+
aspect: ["auto", "square", Ue, w, T, L]
|
|
941
941
|
}],
|
|
942
942
|
/**
|
|
943
943
|
* Container
|
|
@@ -1340,14 +1340,14 @@ const $s = /* @__PURE__ */ ce({
|
|
|
1340
1340
|
* @see https://tailwindcss.com/docs/justify-items
|
|
1341
1341
|
*/
|
|
1342
1342
|
"justify-items": [{
|
|
1343
|
-
"justify-items": [...
|
|
1343
|
+
"justify-items": [..._(), "normal"]
|
|
1344
1344
|
}],
|
|
1345
1345
|
/**
|
|
1346
1346
|
* Justify Self
|
|
1347
1347
|
* @see https://tailwindcss.com/docs/justify-self
|
|
1348
1348
|
*/
|
|
1349
1349
|
"justify-self": [{
|
|
1350
|
-
"justify-self": ["auto", ...
|
|
1350
|
+
"justify-self": ["auto", ..._()]
|
|
1351
1351
|
}],
|
|
1352
1352
|
/**
|
|
1353
1353
|
* Align Content
|
|
@@ -1361,7 +1361,7 @@ const $s = /* @__PURE__ */ ce({
|
|
|
1361
1361
|
* @see https://tailwindcss.com/docs/align-items
|
|
1362
1362
|
*/
|
|
1363
1363
|
"align-items": [{
|
|
1364
|
-
items: [...
|
|
1364
|
+
items: [..._(), {
|
|
1365
1365
|
baseline: ["", "last"]
|
|
1366
1366
|
}]
|
|
1367
1367
|
}],
|
|
@@ -1370,7 +1370,7 @@ const $s = /* @__PURE__ */ ce({
|
|
|
1370
1370
|
* @see https://tailwindcss.com/docs/align-self
|
|
1371
1371
|
*/
|
|
1372
1372
|
"align-self": [{
|
|
1373
|
-
self: ["auto", ...
|
|
1373
|
+
self: ["auto", ..._(), {
|
|
1374
1374
|
baseline: ["", "last"]
|
|
1375
1375
|
}]
|
|
1376
1376
|
}],
|
|
@@ -1386,14 +1386,14 @@ const $s = /* @__PURE__ */ ce({
|
|
|
1386
1386
|
* @see https://tailwindcss.com/docs/place-items
|
|
1387
1387
|
*/
|
|
1388
1388
|
"place-items": [{
|
|
1389
|
-
"place-items": [...
|
|
1389
|
+
"place-items": [..._(), "baseline"]
|
|
1390
1390
|
}],
|
|
1391
1391
|
/**
|
|
1392
1392
|
* Place Self
|
|
1393
1393
|
* @see https://tailwindcss.com/docs/place-self
|
|
1394
1394
|
*/
|
|
1395
1395
|
"place-self": [{
|
|
1396
|
-
"place-self": ["auto", ...
|
|
1396
|
+
"place-self": ["auto", ..._()]
|
|
1397
1397
|
}],
|
|
1398
1398
|
// Spacing
|
|
1399
1399
|
/**
|
|
@@ -1478,77 +1478,77 @@ const $s = /* @__PURE__ */ ce({
|
|
|
1478
1478
|
* @see https://tailwindcss.com/docs/margin
|
|
1479
1479
|
*/
|
|
1480
1480
|
m: [{
|
|
1481
|
-
m:
|
|
1481
|
+
m: z()
|
|
1482
1482
|
}],
|
|
1483
1483
|
/**
|
|
1484
1484
|
* Margin Inline
|
|
1485
1485
|
* @see https://tailwindcss.com/docs/margin
|
|
1486
1486
|
*/
|
|
1487
1487
|
mx: [{
|
|
1488
|
-
mx:
|
|
1488
|
+
mx: z()
|
|
1489
1489
|
}],
|
|
1490
1490
|
/**
|
|
1491
1491
|
* Margin Block
|
|
1492
1492
|
* @see https://tailwindcss.com/docs/margin
|
|
1493
1493
|
*/
|
|
1494
1494
|
my: [{
|
|
1495
|
-
my:
|
|
1495
|
+
my: z()
|
|
1496
1496
|
}],
|
|
1497
1497
|
/**
|
|
1498
1498
|
* Margin Inline Start
|
|
1499
1499
|
* @see https://tailwindcss.com/docs/margin
|
|
1500
1500
|
*/
|
|
1501
1501
|
ms: [{
|
|
1502
|
-
ms:
|
|
1502
|
+
ms: z()
|
|
1503
1503
|
}],
|
|
1504
1504
|
/**
|
|
1505
1505
|
* Margin Inline End
|
|
1506
1506
|
* @see https://tailwindcss.com/docs/margin
|
|
1507
1507
|
*/
|
|
1508
1508
|
me: [{
|
|
1509
|
-
me:
|
|
1509
|
+
me: z()
|
|
1510
1510
|
}],
|
|
1511
1511
|
/**
|
|
1512
1512
|
* Margin Block Start
|
|
1513
1513
|
* @see https://tailwindcss.com/docs/margin
|
|
1514
1514
|
*/
|
|
1515
1515
|
mbs: [{
|
|
1516
|
-
mbs:
|
|
1516
|
+
mbs: z()
|
|
1517
1517
|
}],
|
|
1518
1518
|
/**
|
|
1519
1519
|
* Margin Block End
|
|
1520
1520
|
* @see https://tailwindcss.com/docs/margin
|
|
1521
1521
|
*/
|
|
1522
1522
|
mbe: [{
|
|
1523
|
-
mbe:
|
|
1523
|
+
mbe: z()
|
|
1524
1524
|
}],
|
|
1525
1525
|
/**
|
|
1526
1526
|
* Margin Top
|
|
1527
1527
|
* @see https://tailwindcss.com/docs/margin
|
|
1528
1528
|
*/
|
|
1529
1529
|
mt: [{
|
|
1530
|
-
mt:
|
|
1530
|
+
mt: z()
|
|
1531
1531
|
}],
|
|
1532
1532
|
/**
|
|
1533
1533
|
* Margin Right
|
|
1534
1534
|
* @see https://tailwindcss.com/docs/margin
|
|
1535
1535
|
*/
|
|
1536
1536
|
mr: [{
|
|
1537
|
-
mr:
|
|
1537
|
+
mr: z()
|
|
1538
1538
|
}],
|
|
1539
1539
|
/**
|
|
1540
1540
|
* Margin Bottom
|
|
1541
1541
|
* @see https://tailwindcss.com/docs/margin
|
|
1542
1542
|
*/
|
|
1543
1543
|
mb: [{
|
|
1544
|
-
mb:
|
|
1544
|
+
mb: z()
|
|
1545
1545
|
}],
|
|
1546
1546
|
/**
|
|
1547
1547
|
* Margin Left
|
|
1548
1548
|
* @see https://tailwindcss.com/docs/margin
|
|
1549
1549
|
*/
|
|
1550
1550
|
ml: [{
|
|
1551
|
-
ml:
|
|
1551
|
+
ml: z()
|
|
1552
1552
|
}],
|
|
1553
1553
|
/**
|
|
1554
1554
|
* Space Between X
|
|
@@ -2968,7 +2968,7 @@ const $s = /* @__PURE__ */ ce({
|
|
|
2968
2968
|
* @see https://tailwindcss.com/docs/perspective
|
|
2969
2969
|
*/
|
|
2970
2970
|
perspective: [{
|
|
2971
|
-
perspective: [
|
|
2971
|
+
perspective: [I, T, w]
|
|
2972
2972
|
}],
|
|
2973
2973
|
/**
|
|
2974
2974
|
* Perspective Origin
|
|
@@ -3796,17 +3796,17 @@ const $s = /* @__PURE__ */ ce({
|
|
|
3796
3796
|
class: { default: "" }
|
|
3797
3797
|
},
|
|
3798
3798
|
setup(r) {
|
|
3799
|
-
const t =
|
|
3799
|
+
const t = D(() => typeof r.icon == "string" ? r.icon : r.icon?.className), e = D(() => typeof r.iconAfter == "string" ? r.iconAfter : r.iconAfter?.className), n = D(() => r.href ? "a" : r.tag), s = D(() => ({
|
|
3800
3800
|
xxs: "size-2.5",
|
|
3801
3801
|
xs: "size-3",
|
|
3802
3802
|
sm: "size-3.5",
|
|
3803
3803
|
md: "size-4",
|
|
3804
3804
|
lg: "size-5",
|
|
3805
3805
|
xl: "size-6"
|
|
3806
|
-
})[r.size]), a =
|
|
3806
|
+
})[r.size]), a = D(() => {
|
|
3807
3807
|
const i = pn[r.theme]?.[r.design] || pn.default[r.design];
|
|
3808
3808
|
return i || console.warn(`FButton: No theme configuration found for theme "${r.theme}" and design "${r.design}". Falling back to default solid theme.`), i || { base: "", border: "", hover: "", icon: "" };
|
|
3809
|
-
}), o =
|
|
3809
|
+
}), o = D(() => {
|
|
3810
3810
|
const i = "relative inline-flex items-center justify-center gap-2 font-medium transition-colors duration-200 focus:outline-none active:opacity-80 cursor-pointer", h = {
|
|
3811
3811
|
xxs: "px-2 py-0.5 text-[10px]",
|
|
3812
3812
|
xs: "px-3 py-1 text-[11px]",
|
|
@@ -3830,33 +3830,33 @@ const $s = /* @__PURE__ */ ce({
|
|
|
3830
3830
|
k
|
|
3831
3831
|
].filter(Boolean).join(" ");
|
|
3832
3832
|
return Ua(E, r.class);
|
|
3833
|
-
}), u =
|
|
3833
|
+
}), u = D(() => ({
|
|
3834
3834
|
design: a.value.icon || ""
|
|
3835
3835
|
}));
|
|
3836
3836
|
return (i, h) => (f(), Ae(As(n.value), {
|
|
3837
3837
|
href: r.disabled ? void 0 : r.href,
|
|
3838
3838
|
disabled: r.disabled || void 0,
|
|
3839
3839
|
"aria-disabled": r.disabled || void 0,
|
|
3840
|
-
class:
|
|
3840
|
+
class: A(o.value)
|
|
3841
3841
|
}, {
|
|
3842
3842
|
default: Me(() => [
|
|
3843
|
-
r.loading ? (f(),
|
|
3843
|
+
r.loading ? (f(), b("div", Fa, [
|
|
3844
3844
|
ne(Wt, {
|
|
3845
|
-
class:
|
|
3845
|
+
class: A(s.value)
|
|
3846
3846
|
}, null, 8, ["class"])
|
|
3847
|
-
])) :
|
|
3847
|
+
])) : P("", !0),
|
|
3848
3848
|
p("span", {
|
|
3849
|
-
class:
|
|
3849
|
+
class: A(["flex items-center gap-2 transition-opacity duration-200 whitespace-nowrap", r.loading ? "opacity-0" : "opacity-100"])
|
|
3850
3850
|
}, [
|
|
3851
|
-
t.value ? (f(),
|
|
3851
|
+
t.value ? (f(), b("span", {
|
|
3852
3852
|
key: 0,
|
|
3853
|
-
class:
|
|
3854
|
-
}, null, 2)) :
|
|
3853
|
+
class: A(["flex items-center size-[1.1em] mt-[-.07em]", [t.value, u.value.design]])
|
|
3854
|
+
}, null, 2)) : P("", !0),
|
|
3855
3855
|
mt(i.$slots, "default"),
|
|
3856
|
-
e.value ? (f(),
|
|
3856
|
+
e.value ? (f(), b("span", {
|
|
3857
3857
|
key: 1,
|
|
3858
|
-
class:
|
|
3859
|
-
}, null, 2)) :
|
|
3858
|
+
class: A(["flex items-center size-[1.1em] mt-[-.07em]", [e.value, u.value.design]])
|
|
3859
|
+
}, null, 2)) : P("", !0)
|
|
3860
3860
|
], 2)
|
|
3861
3861
|
]),
|
|
3862
3862
|
_: 3
|
|
@@ -3881,24 +3881,24 @@ const $s = /* @__PURE__ */ ce({
|
|
|
3881
3881
|
isOnline: { type: Boolean, default: !1 }
|
|
3882
3882
|
},
|
|
3883
3883
|
setup(r) {
|
|
3884
|
-
return (t, e) => (f(),
|
|
3884
|
+
return (t, e) => (f(), b("div", ja, [
|
|
3885
3885
|
ne(Cr, {
|
|
3886
3886
|
agent: r.agent,
|
|
3887
3887
|
"is-online": r.isOnline
|
|
3888
3888
|
}, null, 8, ["agent", "is-online"]),
|
|
3889
3889
|
p("div", Ga, [
|
|
3890
|
-
r.agent.summary.value ? (f(),
|
|
3890
|
+
r.agent.summary.value ? (f(), b("div", Ha, [
|
|
3891
3891
|
e[0] || (e[0] = p("h3", { class: "font-medium text-white/50" }, " About ", -1)),
|
|
3892
3892
|
p("div", {
|
|
3893
3893
|
class: "text-white/70 leading-relaxed",
|
|
3894
3894
|
innerHTML: r.agent.summary.value
|
|
3895
3895
|
}, null, 8, Va)
|
|
3896
|
-
])) :
|
|
3897
|
-
r.agent.entityType.value === "company" ? (f(),
|
|
3896
|
+
])) : P("", !0),
|
|
3897
|
+
r.agent.entityType.value === "company" ? (f(), b("div", Wa, [
|
|
3898
3898
|
e[1] || (e[1] = p("h3", { class: "text-sm font-medium text-white/90 mb-2" }, " Company Info ", -1)),
|
|
3899
3899
|
p("p", qa, " This is a company agent representing " + Y(r.agent.name.value) + ". ", 1)
|
|
3900
|
-
])) :
|
|
3901
|
-
r.agent.email.value ? (f(),
|
|
3900
|
+
])) : P("", !0),
|
|
3901
|
+
r.agent.email.value ? (f(), b("div", Ya, [
|
|
3902
3902
|
e[3] || (e[3] = p("h3", { class: "text-sm font-medium text-white/90" }, " Contact ", -1)),
|
|
3903
3903
|
ne(fn, {
|
|
3904
3904
|
design: "ghost",
|
|
@@ -3914,11 +3914,11 @@ const $s = /* @__PURE__ */ ce({
|
|
|
3914
3914
|
])]),
|
|
3915
3915
|
_: 1
|
|
3916
3916
|
}, 8, ["href"])
|
|
3917
|
-
])) :
|
|
3918
|
-
r.agent.accounts.value && r.agent.accounts.value.length > 0 ? (f(),
|
|
3917
|
+
])) : P("", !0),
|
|
3918
|
+
r.agent.accounts.value && r.agent.accounts.value.length > 0 ? (f(), b("div", Za, [
|
|
3919
3919
|
e[4] || (e[4] = p("h3", { class: "text-sm font-medium text-white/90" }, " Links ", -1)),
|
|
3920
3920
|
p("div", Xa, [
|
|
3921
|
-
(f(!0),
|
|
3921
|
+
(f(!0), b(ge, null, Je(r.agent.accounts.value, (n) => (f(), Ae(fn, {
|
|
3922
3922
|
key: `${n.platform}-${n.handle}`,
|
|
3923
3923
|
design: "ghost",
|
|
3924
3924
|
theme: "default",
|
|
@@ -3934,7 +3934,7 @@ const $s = /* @__PURE__ */ ce({
|
|
|
3934
3934
|
_: 2
|
|
3935
3935
|
}, 1032, ["icon", "href"]))), 128))
|
|
3936
3936
|
])
|
|
3937
|
-
])) :
|
|
3937
|
+
])) : P("", !0)
|
|
3938
3938
|
])
|
|
3939
3939
|
]));
|
|
3940
3940
|
}
|
|
@@ -3988,7 +3988,7 @@ function ao(r) {
|
|
|
3988
3988
|
};
|
|
3989
3989
|
}
|
|
3990
3990
|
l(ao, "unconstruct");
|
|
3991
|
-
function
|
|
3991
|
+
function O(r, t) {
|
|
3992
3992
|
let e = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : Ht;
|
|
3993
3993
|
mn && mn(r, null);
|
|
3994
3994
|
let n = t.length;
|
|
@@ -4002,20 +4002,20 @@ function P(r, t) {
|
|
|
4002
4002
|
}
|
|
4003
4003
|
return r;
|
|
4004
4004
|
}
|
|
4005
|
-
l(
|
|
4005
|
+
l(O, "addToSet");
|
|
4006
4006
|
function oo(r) {
|
|
4007
4007
|
for (let t = 0; t < r.length; t++)
|
|
4008
4008
|
ke(r, t) || (r[t] = null);
|
|
4009
4009
|
return r;
|
|
4010
4010
|
}
|
|
4011
4011
|
l(oo, "cleanArray");
|
|
4012
|
-
function
|
|
4012
|
+
function _e(r) {
|
|
4013
4013
|
const t = Gt(null);
|
|
4014
4014
|
for (const [e, n] of Kn(r))
|
|
4015
|
-
ke(r, e) && (Array.isArray(n) ? t[e] = oo(n) : n && typeof n == "object" && n.constructor === Object ? t[e] =
|
|
4015
|
+
ke(r, e) && (Array.isArray(n) ? t[e] = oo(n) : n && typeof n == "object" && n.constructor === Object ? t[e] = _e(n) : t[e] = n);
|
|
4016
4016
|
return t;
|
|
4017
4017
|
}
|
|
4018
|
-
l(
|
|
4018
|
+
l(_e, "clone");
|
|
4019
4019
|
function St(r, t) {
|
|
4020
4020
|
for (; r !== null; ) {
|
|
4021
4021
|
const n = eo(r, t);
|
|
@@ -4112,7 +4112,7 @@ function es() {
|
|
|
4112
4112
|
HTMLFormElement: d,
|
|
4113
4113
|
DOMParser: m,
|
|
4114
4114
|
trustedTypes: k
|
|
4115
|
-
} = r, E = i.prototype,
|
|
4115
|
+
} = r, E = i.prototype, I = St(E, "cloneNode"), L = St(E, "remove"), Q = St(E, "nextSibling"), xe = St(E, "childNodes"), B = St(E, "parentNode");
|
|
4116
4116
|
if (typeof o == "function") {
|
|
4117
4117
|
const R = e.createElement("template");
|
|
4118
4118
|
R.content && R.content.ownerDocument && (e = R.content.ownerDocument);
|
|
@@ -4132,8 +4132,8 @@ function es() {
|
|
|
4132
4132
|
MUSTACHE_EXPR: we,
|
|
4133
4133
|
ERB_EXPR: $e,
|
|
4134
4134
|
TMPLIT_EXPR: M,
|
|
4135
|
-
DATA_ATTR:
|
|
4136
|
-
ARIA_ATTR:
|
|
4135
|
+
DATA_ATTR: _,
|
|
4136
|
+
ARIA_ATTR: z,
|
|
4137
4137
|
IS_SCRIPT_OR_DATA: j,
|
|
4138
4138
|
ATTR_WHITESPACE: Z,
|
|
4139
4139
|
CUSTOM_ELEMENT: ve
|
|
@@ -4141,9 +4141,9 @@ function es() {
|
|
|
4141
4141
|
let {
|
|
4142
4142
|
IS_ALLOWED_URI: C
|
|
4143
4143
|
} = wn, V = null;
|
|
4144
|
-
const xt =
|
|
4144
|
+
const xt = O({}, [...xn, ...fr, ...mr, ...br, ...kn]);
|
|
4145
4145
|
let te = null;
|
|
4146
|
-
const st =
|
|
4146
|
+
const st = O({}, [...vn, ...xr, ...yn, ...Ft]);
|
|
4147
4147
|
let N = Object.seal(Gt(null, {
|
|
4148
4148
|
tagNameCheck: {
|
|
4149
4149
|
writable: !0,
|
|
@@ -4181,15 +4181,15 @@ function es() {
|
|
|
4181
4181
|
let K = !0, at = !0, qe = !1, Ye = !0, Ce = !1, Le = !0, Ze = !1, er = !1, tr = !1, ot = !1, Mt = !1, $t = !1, Ur = !0, Fr = !1;
|
|
4182
4182
|
const ps = "user-content-";
|
|
4183
4183
|
let rr = !0, kt = !1, lt = {}, Re = null;
|
|
4184
|
-
const nr =
|
|
4184
|
+
const nr = O({}, ["annotation-xml", "audio", "colgroup", "desc", "foreignobject", "head", "iframe", "math", "mi", "mn", "mo", "ms", "mtext", "noembed", "noframes", "noscript", "plaintext", "script", "style", "svg", "template", "thead", "title", "video", "xmp"]);
|
|
4185
4185
|
let jr = null;
|
|
4186
|
-
const Gr =
|
|
4186
|
+
const Gr = O({}, ["audio", "video", "img", "source", "image", "track"]);
|
|
4187
4187
|
let sr = null;
|
|
4188
|
-
const Hr =
|
|
4188
|
+
const Hr = O({}, ["alt", "class", "for", "id", "label", "name", "pattern", "placeholder", "role", "summary", "title", "value", "style", "xmlns"]), Dt = "http://www.w3.org/1998/Math/MathML", Lt = "http://www.w3.org/2000/svg", Oe = "http://www.w3.org/1999/xhtml";
|
|
4189
4189
|
let it = Oe, ar = !1, or = null;
|
|
4190
|
-
const fs =
|
|
4191
|
-
let Ot =
|
|
4192
|
-
const ms =
|
|
4190
|
+
const fs = O({}, [Dt, Lt, Oe], gr);
|
|
4191
|
+
let Ot = O({}, ["mi", "mo", "mn", "ms", "mtext"]), Pt = O({}, ["annotation-xml"]);
|
|
4192
|
+
const ms = O({}, ["title", "style", "font", "a", "script"]);
|
|
4193
4193
|
let vt = null;
|
|
4194
4194
|
const bs = ["application/xhtml+xml", "text/html"], xs = "text/html";
|
|
4195
4195
|
let se = null, ct = null;
|
|
@@ -4198,8 +4198,8 @@ function es() {
|
|
|
4198
4198
|
}, "isRegexOrFunction"), lr = /* @__PURE__ */ l(function() {
|
|
4199
4199
|
let c = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
|
|
4200
4200
|
if (!(ct && ct === c)) {
|
|
4201
|
-
if ((!c || typeof c != "object") && (c = {}), c =
|
|
4202
|
-
bs.indexOf(c.PARSER_MEDIA_TYPE) === -1 ? xs : c.PARSER_MEDIA_TYPE, se = vt === "application/xhtml+xml" ? gr : Ht, V = ke(c, "ALLOWED_TAGS") ?
|
|
4201
|
+
if ((!c || typeof c != "object") && (c = {}), c = _e(c), vt = // eslint-disable-next-line unicorn/prefer-includes
|
|
4202
|
+
bs.indexOf(c.PARSER_MEDIA_TYPE) === -1 ? xs : c.PARSER_MEDIA_TYPE, se = vt === "application/xhtml+xml" ? gr : Ht, V = ke(c, "ALLOWED_TAGS") ? O({}, c.ALLOWED_TAGS, se) : xt, te = ke(c, "ALLOWED_ATTR") ? O({}, c.ALLOWED_ATTR, se) : st, or = ke(c, "ALLOWED_NAMESPACES") ? O({}, c.ALLOWED_NAMESPACES, gr) : fs, sr = ke(c, "ADD_URI_SAFE_ATTR") ? O(_e(Hr), c.ADD_URI_SAFE_ATTR, se) : Hr, jr = ke(c, "ADD_DATA_URI_TAGS") ? O(_e(Gr), c.ADD_DATA_URI_TAGS, se) : Gr, Re = ke(c, "FORBID_CONTENTS") ? O({}, c.FORBID_CONTENTS, se) : nr, X = ke(c, "FORBID_TAGS") ? O({}, c.FORBID_TAGS, se) : _e({}), De = ke(c, "FORBID_ATTR") ? O({}, c.FORBID_ATTR, se) : _e({}), lt = ke(c, "USE_PROFILES") ? c.USE_PROFILES : !1, K = c.ALLOW_ARIA_ATTR !== !1, at = c.ALLOW_DATA_ATTR !== !1, qe = c.ALLOW_UNKNOWN_PROTOCOLS || !1, Ye = c.ALLOW_SELF_CLOSE_IN_ATTR !== !1, Ce = c.SAFE_FOR_TEMPLATES || !1, Le = c.SAFE_FOR_XML !== !1, Ze = c.WHOLE_DOCUMENT || !1, ot = c.RETURN_DOM || !1, Mt = c.RETURN_DOM_FRAGMENT || !1, $t = c.RETURN_TRUSTED_TYPE || !1, tr = c.FORCE_BODY || !1, Ur = c.SANITIZE_DOM !== !1, Fr = c.SANITIZE_NAMED_PROPS || !1, rr = c.KEEP_CONTENT !== !1, kt = c.IN_PLACE || !1, C = c.ALLOWED_URI_REGEXP || Qn, it = c.NAMESPACE || Oe, Ot = c.MATHML_TEXT_INTEGRATION_POINTS || Ot, Pt = c.HTML_INTEGRATION_POINTS || Pt, N = c.CUSTOM_ELEMENT_HANDLING || {}, c.CUSTOM_ELEMENT_HANDLING && Vr(c.CUSTOM_ELEMENT_HANDLING.tagNameCheck) && (N.tagNameCheck = c.CUSTOM_ELEMENT_HANDLING.tagNameCheck), c.CUSTOM_ELEMENT_HANDLING && Vr(c.CUSTOM_ELEMENT_HANDLING.attributeNameCheck) && (N.attributeNameCheck = c.CUSTOM_ELEMENT_HANDLING.attributeNameCheck), c.CUSTOM_ELEMENT_HANDLING && typeof c.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements == "boolean" && (N.allowCustomizedBuiltInElements = c.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements), Ce && (at = !1), Mt && (ot = !0), lt && (V = O({}, kn), te = Gt(null), lt.html === !0 && (O(V, xn), O(te, vn)), lt.svg === !0 && (O(V, fr), O(te, xr), O(te, Ft)), lt.svgFilters === !0 && (O(V, mr), O(te, xr), O(te, Ft)), lt.mathMl === !0 && (O(V, br), O(te, yn), O(te, Ft))), ke(c, "ADD_TAGS") || (Te.tagCheck = null), ke(c, "ADD_ATTR") || (Te.attributeCheck = null), c.ADD_TAGS && (typeof c.ADD_TAGS == "function" ? Te.tagCheck = c.ADD_TAGS : (V === xt && (V = _e(V)), O(V, c.ADD_TAGS, se))), c.ADD_ATTR && (typeof c.ADD_ATTR == "function" ? Te.attributeCheck = c.ADD_ATTR : (te === st && (te = _e(te)), O(te, c.ADD_ATTR, se))), c.ADD_URI_SAFE_ATTR && O(sr, c.ADD_URI_SAFE_ATTR, se), c.FORBID_CONTENTS && (Re === nr && (Re = _e(Re)), O(Re, c.FORBID_CONTENTS, se)), c.ADD_FORBID_CONTENTS && (Re === nr && (Re = _e(Re)), O(Re, c.ADD_FORBID_CONTENTS, se)), rr && (V["#text"] = !0), Ze && O(V, ["html", "head", "body"]), V.table && (O(V, ["tbody"]), delete X.tbody), c.TRUSTED_TYPES_POLICY) {
|
|
4203
4203
|
if (typeof c.TRUSTED_TYPES_POLICY.createHTML != "function")
|
|
4204
4204
|
throw At('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');
|
|
4205
4205
|
if (typeof c.TRUSTED_TYPES_POLICY.createScriptURL != "function")
|
|
@@ -4209,70 +4209,70 @@ function es() {
|
|
|
4209
4209
|
y === void 0 && (y = ko(k, s)), y !== null && typeof F == "string" && (F = y.createHTML(""));
|
|
4210
4210
|
fe && fe(c), ct = c;
|
|
4211
4211
|
}
|
|
4212
|
-
}, "_parseConfig"), Wr =
|
|
4213
|
-
let
|
|
4214
|
-
(!
|
|
4212
|
+
}, "_parseConfig"), Wr = O({}, [...fr, ...mr, ...lo]), qr = O({}, [...br, ...io]), vs = /* @__PURE__ */ l(function(c) {
|
|
4213
|
+
let x = B(c);
|
|
4214
|
+
(!x || !x.tagName) && (x = {
|
|
4215
4215
|
namespaceURI: it,
|
|
4216
4216
|
tagName: "template"
|
|
4217
4217
|
});
|
|
4218
|
-
const
|
|
4219
|
-
return or[c.namespaceURI] ? c.namespaceURI === Lt ?
|
|
4220
|
-
}, "_checkValidNamespace"),
|
|
4218
|
+
const S = Ht(c.tagName), W = Ht(x.tagName);
|
|
4219
|
+
return or[c.namespaceURI] ? c.namespaceURI === Lt ? x.namespaceURI === Oe ? S === "svg" : x.namespaceURI === Dt ? S === "svg" && (W === "annotation-xml" || Ot[W]) : !!Wr[S] : c.namespaceURI === Dt ? x.namespaceURI === Oe ? S === "math" : x.namespaceURI === Lt ? S === "math" && Pt[W] : !!qr[S] : c.namespaceURI === Oe ? x.namespaceURI === Lt && !Pt[W] || x.namespaceURI === Dt && !Ot[W] ? !1 : !qr[S] && (ms[S] || !Wr[S]) : !!(vt === "application/xhtml+xml" && or[c.namespaceURI]) : !1;
|
|
4220
|
+
}, "_checkValidNamespace"), ze = /* @__PURE__ */ l(function(c) {
|
|
4221
4221
|
wt(t.removed, {
|
|
4222
4222
|
element: c
|
|
4223
4223
|
});
|
|
4224
4224
|
try {
|
|
4225
4225
|
B(c).removeChild(c);
|
|
4226
4226
|
} catch {
|
|
4227
|
-
|
|
4227
|
+
L(c);
|
|
4228
4228
|
}
|
|
4229
|
-
}, "_forceRemove"), Xe = /* @__PURE__ */ l(function(c,
|
|
4229
|
+
}, "_forceRemove"), Xe = /* @__PURE__ */ l(function(c, x) {
|
|
4230
4230
|
try {
|
|
4231
4231
|
wt(t.removed, {
|
|
4232
|
-
attribute:
|
|
4233
|
-
from:
|
|
4232
|
+
attribute: x.getAttributeNode(c),
|
|
4233
|
+
from: x
|
|
4234
4234
|
});
|
|
4235
4235
|
} catch {
|
|
4236
4236
|
wt(t.removed, {
|
|
4237
4237
|
attribute: null,
|
|
4238
|
-
from:
|
|
4238
|
+
from: x
|
|
4239
4239
|
});
|
|
4240
4240
|
}
|
|
4241
|
-
if (
|
|
4241
|
+
if (x.removeAttribute(c), c === "is")
|
|
4242
4242
|
if (ot || Mt)
|
|
4243
4243
|
try {
|
|
4244
|
-
|
|
4244
|
+
ze(x);
|
|
4245
4245
|
} catch {
|
|
4246
4246
|
}
|
|
4247
4247
|
else
|
|
4248
4248
|
try {
|
|
4249
|
-
|
|
4249
|
+
x.setAttribute(c, "");
|
|
4250
4250
|
} catch {
|
|
4251
4251
|
}
|
|
4252
4252
|
}, "_removeAttribute"), Yr = /* @__PURE__ */ l(function(c) {
|
|
4253
|
-
let
|
|
4253
|
+
let x = null, S = null;
|
|
4254
4254
|
if (tr)
|
|
4255
4255
|
c = "<remove></remove>" + c;
|
|
4256
4256
|
else {
|
|
4257
4257
|
const re = pr(c, /^[\r\n\t ]+/);
|
|
4258
|
-
|
|
4258
|
+
S = re && re[0];
|
|
4259
4259
|
}
|
|
4260
4260
|
vt === "application/xhtml+xml" && it === Oe && (c = '<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>' + c + "</body></html>");
|
|
4261
4261
|
const W = y ? y.createHTML(c) : c;
|
|
4262
4262
|
if (it === Oe)
|
|
4263
4263
|
try {
|
|
4264
|
-
|
|
4264
|
+
x = new m().parseFromString(W, vt);
|
|
4265
4265
|
} catch {
|
|
4266
4266
|
}
|
|
4267
|
-
if (!
|
|
4268
|
-
|
|
4267
|
+
if (!x || !x.documentElement) {
|
|
4268
|
+
x = J.createDocument(it, "template", null);
|
|
4269
4269
|
try {
|
|
4270
|
-
|
|
4270
|
+
x.documentElement.innerHTML = ar ? F : W;
|
|
4271
4271
|
} catch {
|
|
4272
4272
|
}
|
|
4273
4273
|
}
|
|
4274
|
-
const ue =
|
|
4275
|
-
return c &&
|
|
4274
|
+
const ue = x.body || x.documentElement;
|
|
4275
|
+
return c && S && ue.insertBefore(e.createTextNode(S), ue.childNodes[0] || null), it === Oe ? oe.call(x, Ze ? "html" : "body")[0] : Ze ? x.documentElement : ue;
|
|
4276
4276
|
}, "_initDocument"), Zr = /* @__PURE__ */ l(function(c) {
|
|
4277
4277
|
return de.call(
|
|
4278
4278
|
c.ownerDocument || c,
|
|
@@ -4286,62 +4286,62 @@ function es() {
|
|
|
4286
4286
|
}, "_isClobbered"), Xr = /* @__PURE__ */ l(function(c) {
|
|
4287
4287
|
return typeof u == "function" && c instanceof u;
|
|
4288
4288
|
}, "_isNode");
|
|
4289
|
-
function Pe(R, c,
|
|
4290
|
-
Ut(R, (
|
|
4291
|
-
|
|
4289
|
+
function Pe(R, c, x) {
|
|
4290
|
+
Ut(R, (S) => {
|
|
4291
|
+
S.call(t, c, x, ct);
|
|
4292
4292
|
});
|
|
4293
4293
|
}
|
|
4294
4294
|
l(Pe, "_executeHooks");
|
|
4295
4295
|
const Kr = /* @__PURE__ */ l(function(c) {
|
|
4296
|
-
let
|
|
4296
|
+
let x = null;
|
|
4297
4297
|
if (Pe(ee.beforeSanitizeElements, c, null), ir(c))
|
|
4298
|
-
return
|
|
4299
|
-
const
|
|
4298
|
+
return ze(c), !0;
|
|
4299
|
+
const S = se(c.nodeName);
|
|
4300
4300
|
if (Pe(ee.uponSanitizeElement, c, {
|
|
4301
|
-
tagName:
|
|
4301
|
+
tagName: S,
|
|
4302
4302
|
allowedTags: V
|
|
4303
4303
|
}), Le && c.hasChildNodes() && !Xr(c.firstElementChild) && he(/<[/\w!]/g, c.innerHTML) && he(/<[/\w!]/g, c.textContent) || c.nodeType === Et.progressingInstruction || Le && c.nodeType === Et.comment && he(/<[/\w]/g, c.data))
|
|
4304
|
-
return
|
|
4305
|
-
if (!(Te.tagCheck instanceof Function && Te.tagCheck(
|
|
4306
|
-
if (!X[
|
|
4304
|
+
return ze(c), !0;
|
|
4305
|
+
if (!(Te.tagCheck instanceof Function && Te.tagCheck(S)) && (!V[S] || X[S])) {
|
|
4306
|
+
if (!X[S] && Jr(S) && (N.tagNameCheck instanceof RegExp && he(N.tagNameCheck, S) || N.tagNameCheck instanceof Function && N.tagNameCheck(S)))
|
|
4307
4307
|
return !1;
|
|
4308
|
-
if (rr && !Re[
|
|
4308
|
+
if (rr && !Re[S]) {
|
|
4309
4309
|
const W = B(c) || c.parentNode, ue = xe(c) || c.childNodes;
|
|
4310
4310
|
if (ue && W) {
|
|
4311
4311
|
const re = ue.length;
|
|
4312
4312
|
for (let be = re - 1; be >= 0; --be) {
|
|
4313
|
-
const Ne =
|
|
4313
|
+
const Ne = I(ue[be], !0);
|
|
4314
4314
|
Ne.__removalCount = (c.__removalCount || 0) + 1, W.insertBefore(Ne, Q(c));
|
|
4315
4315
|
}
|
|
4316
4316
|
}
|
|
4317
4317
|
}
|
|
4318
|
-
return
|
|
4318
|
+
return ze(c), !0;
|
|
4319
4319
|
}
|
|
4320
|
-
return c instanceof i && !vs(c) || (
|
|
4321
|
-
|
|
4322
|
-
}), c.textContent !==
|
|
4320
|
+
return c instanceof i && !vs(c) || (S === "noscript" || S === "noembed" || S === "noframes") && he(/<\/no(script|embed|frames)/i, c.innerHTML) ? (ze(c), !0) : (Ce && c.nodeType === Et.text && (x = c.textContent, Ut([we, $e, M], (W) => {
|
|
4321
|
+
x = Tt(x, W, " ");
|
|
4322
|
+
}), c.textContent !== x && (wt(t.removed, {
|
|
4323
4323
|
element: c.cloneNode()
|
|
4324
|
-
}), c.textContent =
|
|
4325
|
-
}, "_sanitizeElements"), Qr = /* @__PURE__ */ l(function(c,
|
|
4326
|
-
if (De[
|
|
4324
|
+
}), c.textContent = x)), Pe(ee.afterSanitizeElements, c, null), !1);
|
|
4325
|
+
}, "_sanitizeElements"), Qr = /* @__PURE__ */ l(function(c, x, S) {
|
|
4326
|
+
if (De[x] || Ur && (x === "id" || x === "name") && (S in e || S in ks))
|
|
4327
4327
|
return !1;
|
|
4328
|
-
if (!(at && !De[
|
|
4329
|
-
if (!(K && he(
|
|
4330
|
-
if (!(Te.attributeCheck instanceof Function && Te.attributeCheck(
|
|
4331
|
-
if (!te[
|
|
4328
|
+
if (!(at && !De[x] && he(_, x))) {
|
|
4329
|
+
if (!(K && he(z, x))) {
|
|
4330
|
+
if (!(Te.attributeCheck instanceof Function && Te.attributeCheck(x, c))) {
|
|
4331
|
+
if (!te[x] || De[x]) {
|
|
4332
4332
|
if (
|
|
4333
4333
|
// First condition does a very basic check if a) it's basically a valid custom element tagname AND
|
|
4334
4334
|
// b) if the tagName passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.tagNameCheck
|
|
4335
4335
|
// and c) if the attribute name passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.attributeNameCheck
|
|
4336
|
-
!(Jr(c) && (N.tagNameCheck instanceof RegExp && he(N.tagNameCheck, c) || N.tagNameCheck instanceof Function && N.tagNameCheck(c)) && (N.attributeNameCheck instanceof RegExp && he(N.attributeNameCheck,
|
|
4336
|
+
!(Jr(c) && (N.tagNameCheck instanceof RegExp && he(N.tagNameCheck, c) || N.tagNameCheck instanceof Function && N.tagNameCheck(c)) && (N.attributeNameCheck instanceof RegExp && he(N.attributeNameCheck, x) || N.attributeNameCheck instanceof Function && N.attributeNameCheck(x, c)) || // Alternative, second condition checks if it's an `is`-attribute, AND
|
|
4337
4337
|
// the value passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.tagNameCheck
|
|
4338
|
-
|
|
4338
|
+
x === "is" && N.allowCustomizedBuiltInElements && (N.tagNameCheck instanceof RegExp && he(N.tagNameCheck, S) || N.tagNameCheck instanceof Function && N.tagNameCheck(S)))
|
|
4339
4339
|
) return !1;
|
|
4340
|
-
} else if (!sr[
|
|
4341
|
-
if (!he(C, Tt(
|
|
4342
|
-
if (!((
|
|
4343
|
-
if (!(qe && !he(j, Tt(
|
|
4344
|
-
if (
|
|
4340
|
+
} else if (!sr[x]) {
|
|
4341
|
+
if (!he(C, Tt(S, Z, ""))) {
|
|
4342
|
+
if (!((x === "src" || x === "xlink:href" || x === "href") && c !== "script" && no(S, "data:") === 0 && jr[c])) {
|
|
4343
|
+
if (!(qe && !he(j, Tt(S, Z, "")))) {
|
|
4344
|
+
if (S)
|
|
4345
4345
|
return !1;
|
|
4346
4346
|
}
|
|
4347
4347
|
}
|
|
@@ -4356,26 +4356,26 @@ function es() {
|
|
|
4356
4356
|
}, "_isBasicCustomElement"), en = /* @__PURE__ */ l(function(c) {
|
|
4357
4357
|
Pe(ee.beforeSanitizeAttributes, c, null);
|
|
4358
4358
|
const {
|
|
4359
|
-
attributes:
|
|
4359
|
+
attributes: x
|
|
4360
4360
|
} = c;
|
|
4361
|
-
if (!
|
|
4361
|
+
if (!x || ir(c))
|
|
4362
4362
|
return;
|
|
4363
|
-
const
|
|
4363
|
+
const S = {
|
|
4364
4364
|
attrName: "",
|
|
4365
4365
|
attrValue: "",
|
|
4366
4366
|
keepAttr: !0,
|
|
4367
4367
|
allowedAttributes: te,
|
|
4368
4368
|
forceKeepAttr: void 0
|
|
4369
4369
|
};
|
|
4370
|
-
let W =
|
|
4370
|
+
let W = x.length;
|
|
4371
4371
|
for (; W--; ) {
|
|
4372
|
-
const ue =
|
|
4372
|
+
const ue = x[W], {
|
|
4373
4373
|
name: re,
|
|
4374
4374
|
namespaceURI: be,
|
|
4375
4375
|
value: Ne
|
|
4376
4376
|
} = ue, ut = se(re), cr = Ne;
|
|
4377
4377
|
let le = re === "value" ? cr : so(cr);
|
|
4378
|
-
if (
|
|
4378
|
+
if (S.attrName = ut, S.attrValue = le, S.keepAttr = !0, S.forceKeepAttr = void 0, Pe(ee.uponSanitizeAttribute, c, S), le = S.attrValue, Fr && (ut === "id" || ut === "name") && (Xe(re, c), le = ps + le), Le && he(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i, le)) {
|
|
4379
4379
|
Xe(re, c);
|
|
4380
4380
|
continue;
|
|
4381
4381
|
}
|
|
@@ -4383,9 +4383,9 @@ function es() {
|
|
|
4383
4383
|
Xe(re, c);
|
|
4384
4384
|
continue;
|
|
4385
4385
|
}
|
|
4386
|
-
if (
|
|
4386
|
+
if (S.forceKeepAttr)
|
|
4387
4387
|
continue;
|
|
4388
|
-
if (!
|
|
4388
|
+
if (!S.keepAttr) {
|
|
4389
4389
|
Xe(re, c);
|
|
4390
4390
|
continue;
|
|
4391
4391
|
}
|
|
@@ -4414,21 +4414,21 @@ function es() {
|
|
|
4414
4414
|
}
|
|
4415
4415
|
if (le !== cr)
|
|
4416
4416
|
try {
|
|
4417
|
-
be ? c.setAttributeNS(be, re, le) : c.setAttribute(re, le), ir(c) ?
|
|
4417
|
+
be ? c.setAttributeNS(be, re, le) : c.setAttribute(re, le), ir(c) ? ze(c) : bn(t.removed);
|
|
4418
4418
|
} catch {
|
|
4419
4419
|
Xe(re, c);
|
|
4420
4420
|
}
|
|
4421
4421
|
}
|
|
4422
4422
|
Pe(ee.afterSanitizeAttributes, c, null);
|
|
4423
4423
|
}, "_sanitizeAttributes"), ys = /* @__PURE__ */ l(function R(c) {
|
|
4424
|
-
let
|
|
4425
|
-
const
|
|
4426
|
-
for (Pe(ee.beforeSanitizeShadowDOM, c, null);
|
|
4427
|
-
Pe(ee.uponSanitizeShadowNode,
|
|
4424
|
+
let x = null;
|
|
4425
|
+
const S = Zr(c);
|
|
4426
|
+
for (Pe(ee.beforeSanitizeShadowDOM, c, null); x = S.nextNode(); )
|
|
4427
|
+
Pe(ee.uponSanitizeShadowNode, x, null), Kr(x), en(x), x.content instanceof a && R(x.content);
|
|
4428
4428
|
Pe(ee.afterSanitizeShadowDOM, c, null);
|
|
4429
4429
|
}, "_sanitizeShadowDOM");
|
|
4430
4430
|
return t.sanitize = function(R) {
|
|
4431
|
-
let c = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {},
|
|
4431
|
+
let c = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, x = null, S = null, W = null, ue = null;
|
|
4432
4432
|
if (ar = !R, ar && (R = "<!-->"), typeof R != "string" && !Xr(R))
|
|
4433
4433
|
if (typeof R.toString == "function") {
|
|
4434
4434
|
if (R = R.toString(), typeof R != "string")
|
|
@@ -4444,30 +4444,30 @@ function es() {
|
|
|
4444
4444
|
throw At("root node is forbidden and cannot be sanitized in-place");
|
|
4445
4445
|
}
|
|
4446
4446
|
} else if (R instanceof u)
|
|
4447
|
-
|
|
4447
|
+
x = Yr("<!---->"), S = x.ownerDocument.importNode(R, !0), S.nodeType === Et.element && S.nodeName === "BODY" || S.nodeName === "HTML" ? x = S : x.appendChild(S);
|
|
4448
4448
|
else {
|
|
4449
4449
|
if (!ot && !Ce && !Ze && // eslint-disable-next-line unicorn/prefer-includes
|
|
4450
4450
|
R.indexOf("<") === -1)
|
|
4451
4451
|
return y && $t ? y.createHTML(R) : R;
|
|
4452
|
-
if (
|
|
4452
|
+
if (x = Yr(R), !x)
|
|
4453
4453
|
return ot ? null : $t ? F : "";
|
|
4454
4454
|
}
|
|
4455
|
-
|
|
4456
|
-
const re = Zr(kt ? R :
|
|
4455
|
+
x && tr && ze(x.firstChild);
|
|
4456
|
+
const re = Zr(kt ? R : x);
|
|
4457
4457
|
for (; W = re.nextNode(); )
|
|
4458
4458
|
Kr(W), en(W), W.content instanceof a && ys(W.content);
|
|
4459
4459
|
if (kt)
|
|
4460
4460
|
return R;
|
|
4461
4461
|
if (ot) {
|
|
4462
4462
|
if (Mt)
|
|
4463
|
-
for (ue = v.call(
|
|
4464
|
-
ue.appendChild(
|
|
4463
|
+
for (ue = v.call(x.ownerDocument); x.firstChild; )
|
|
4464
|
+
ue.appendChild(x.firstChild);
|
|
4465
4465
|
else
|
|
4466
|
-
ue =
|
|
4466
|
+
ue = x;
|
|
4467
4467
|
return (te.shadowroot || te.shadowrootmode) && (ue = nt.call(n, ue, !0)), ue;
|
|
4468
4468
|
}
|
|
4469
|
-
let be = Ze ?
|
|
4470
|
-
return Ze && V["!doctype"] &&
|
|
4469
|
+
let be = Ze ? x.outerHTML : x.innerHTML;
|
|
4470
|
+
return Ze && V["!doctype"] && x.ownerDocument && x.ownerDocument.doctype && x.ownerDocument.doctype.name && he(Jn, x.ownerDocument.doctype.name) && (be = "<!DOCTYPE " + x.ownerDocument.doctype.name + `>
|
|
4471
4471
|
` + be), Ce && Ut([we, $e, M], (Ne) => {
|
|
4472
4472
|
be = Tt(be, Ne, " ");
|
|
4473
4473
|
}), y && $t ? y.createHTML(be) : be;
|
|
@@ -4476,16 +4476,16 @@ function es() {
|
|
|
4476
4476
|
lr(R), er = !0;
|
|
4477
4477
|
}, t.clearConfig = function() {
|
|
4478
4478
|
ct = null, er = !1;
|
|
4479
|
-
}, t.isValidAttribute = function(R, c,
|
|
4479
|
+
}, t.isValidAttribute = function(R, c, x) {
|
|
4480
4480
|
ct || lr({});
|
|
4481
|
-
const
|
|
4482
|
-
return Qr(
|
|
4481
|
+
const S = se(R), W = se(c);
|
|
4482
|
+
return Qr(S, W, x);
|
|
4483
4483
|
}, t.addHook = function(R, c) {
|
|
4484
4484
|
typeof c == "function" && wt(ee[R], c);
|
|
4485
4485
|
}, t.removeHook = function(R, c) {
|
|
4486
4486
|
if (c !== void 0) {
|
|
4487
|
-
const
|
|
4488
|
-
return
|
|
4487
|
+
const x = to(ee[R], c);
|
|
4488
|
+
return x === -1 ? void 0 : ro(ee[R], x, 1)[0];
|
|
4489
4489
|
}
|
|
4490
4490
|
return bn(ee[R]);
|
|
4491
4491
|
}, t.removeHooks = function(R) {
|
|
@@ -4496,11 +4496,11 @@ function es() {
|
|
|
4496
4496
|
}
|
|
4497
4497
|
l(es, "createDOMPurify");
|
|
4498
4498
|
var vo = es();
|
|
4499
|
-
function
|
|
4499
|
+
function _r() {
|
|
4500
4500
|
return { async: !1, breaks: !1, extensions: null, gfm: !0, hooks: null, pedantic: !1, renderer: null, silent: !1, tokenizer: null, walkTokens: null };
|
|
4501
4501
|
}
|
|
4502
|
-
l(
|
|
4503
|
-
var rt =
|
|
4502
|
+
l(_r, "M");
|
|
4503
|
+
var rt = _r();
|
|
4504
4504
|
function ts(r) {
|
|
4505
4505
|
rt = r;
|
|
4506
4506
|
}
|
|
@@ -4520,7 +4520,7 @@ var yo = (() => {
|
|
|
4520
4520
|
} catch {
|
|
4521
4521
|
return !1;
|
|
4522
4522
|
}
|
|
4523
|
-
})(), pe = { codeRemoveIndent: /^(?: {1,4}| {0,3}\t)/gm, outputLinkReplace: /\\([\[\]])/g, indentCodeCompensation: /^(\s+)(?:```)/, beginningSpace: /^\s+/, endingHash: /#$/, startingSpaceChar: /^ /, endingSpaceChar: / $/, nonSpaceChar: /[^ ]/, newLineCharGlobal: /\n/g, tabCharGlobal: /\t/g, multipleSpaceGlobal: /\s+/g, blankLine: /^[ \t]*$/, doubleBlankLine: /\n[ \t]*\n[ \t]*$/, blockquoteStart: /^ {0,3}>/, blockquoteSetextReplace: /\n {0,3}((?:=+|-+) *)(?=\n|$)/g, blockquoteSetextReplace2: /^ {0,3}>[ \t]?/gm, listReplaceNesting: /^ {1,4}(?=( {4})*[^ ])/g, listIsTask: /^\[[ xX]\] +\S/, listReplaceTask: /^\[[ xX]\] +/, listTaskCheckbox: /\[[ xX]\]/, anyLine: /\n.*\n/, hrefBrackets: /^<(.*)>$/, tableDelimiter: /[:|]/, tableAlignChars: /^\||\| *$/g, tableRowBlankLine: /\n[ \t]*$/, tableAlignRight: /^ *-+: *$/, tableAlignCenter: /^ *:-+: *$/, tableAlignLeft: /^ *:-+ *$/, startATag: /^<a /i, endATag: /^<\/a>/i, startPreScriptTag: /^<(pre|code|kbd|script)(\s|>)/i, endPreScriptTag: /^<\/(pre|code|kbd|script)(\s|>)/i, startAngleBracket: /^</, endAngleBracket: />$/, pedanticHrefTitle: /^([^'"]*[^\s])\s+(['"])(.*)\2/, unicodeAlphaNumeric: /[\p{L}\p{N}]/u, escapeTest: /[&<>"']/, escapeReplace: /[&<>"']/g, escapeTestNoEncode: /[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/, escapeReplaceNoEncode: /[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g, caret: /(^|[^\[])\^/g, percentDecode: /%25/g, findPipe: /\|/g, splitPipe: / \|/, slashPipe: /\\\|/g, carriageReturn: /\r\n|\r/g, spaceLine: /^ +$/gm, notSpaceStart: /^\S*/, endingNewline: /\n$/, listItemRegex: /* @__PURE__ */ l((r) => new RegExp(`^( {0,3}${r})((?:[ ][^\\n]*)?(?:\\n|$))`), "listItemRegex"), nextBulletRegex: /* @__PURE__ */ l((r) => new RegExp(`^ {0,${Math.min(3, r - 1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`), "nextBulletRegex"), hrRegex: /* @__PURE__ */ l((r) => new RegExp(`^ {0,${Math.min(3, r - 1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`), "hrRegex"), fencesBeginRegex: /* @__PURE__ */ l((r) => new RegExp(`^ {0,${Math.min(3, r - 1)}}(?:\`\`\`|~~~)`), "fencesBeginRegex"), headingBeginRegex: /* @__PURE__ */ l((r) => new RegExp(`^ {0,${Math.min(3, r - 1)}}#`), "headingBeginRegex"), htmlBeginRegex: /* @__PURE__ */ l((r) => new RegExp(`^ {0,${Math.min(3, r - 1)}}<(?:[a-z].*>|!--)`, "i"), "htmlBeginRegex"), blockquoteBeginRegex: /* @__PURE__ */ l((r) => new RegExp(`^ {0,${Math.min(3, r - 1)}}>`), "blockquoteBeginRegex") }, wo = /^(?:[ \t]*(?:\n|$))+/, To = /^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/, Ao = /^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/, It = /^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/, So = /^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/, Ir = / {0,3}(?:[*+-]|\d{1,9}[.)])/, rs = /^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/, ns = G(rs).replace(/bull/g, Ir).replace(/blockCode/g, /(?: {4}| {0,3}\t)/).replace(/fences/g, / {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g, / {0,3}>/).replace(/heading/g, / {0,3}#{1,6}/).replace(/html/g, / {0,3}<[^\n>]+>\n/).replace(/\|table/g, "").getRegex(), Eo = G(rs).replace(/bull/g, Ir).replace(/blockCode/g, /(?: {4}| {0,3}\t)/).replace(/fences/g, / {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g, / {0,3}>/).replace(/heading/g, / {0,3}#{1,6}/).replace(/html/g, / {0,3}<[^\n>]+>\n/).replace(/table/g, / {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(), Mr = /^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/, Co = /^[^\n]+/, $r = /(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/, Ro = G(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label", $r).replace("title", /(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),
|
|
4523
|
+
})(), pe = { codeRemoveIndent: /^(?: {1,4}| {0,3}\t)/gm, outputLinkReplace: /\\([\[\]])/g, indentCodeCompensation: /^(\s+)(?:```)/, beginningSpace: /^\s+/, endingHash: /#$/, startingSpaceChar: /^ /, endingSpaceChar: / $/, nonSpaceChar: /[^ ]/, newLineCharGlobal: /\n/g, tabCharGlobal: /\t/g, multipleSpaceGlobal: /\s+/g, blankLine: /^[ \t]*$/, doubleBlankLine: /\n[ \t]*\n[ \t]*$/, blockquoteStart: /^ {0,3}>/, blockquoteSetextReplace: /\n {0,3}((?:=+|-+) *)(?=\n|$)/g, blockquoteSetextReplace2: /^ {0,3}>[ \t]?/gm, listReplaceNesting: /^ {1,4}(?=( {4})*[^ ])/g, listIsTask: /^\[[ xX]\] +\S/, listReplaceTask: /^\[[ xX]\] +/, listTaskCheckbox: /\[[ xX]\]/, anyLine: /\n.*\n/, hrefBrackets: /^<(.*)>$/, tableDelimiter: /[:|]/, tableAlignChars: /^\||\| *$/g, tableRowBlankLine: /\n[ \t]*$/, tableAlignRight: /^ *-+: *$/, tableAlignCenter: /^ *:-+: *$/, tableAlignLeft: /^ *:-+ *$/, startATag: /^<a /i, endATag: /^<\/a>/i, startPreScriptTag: /^<(pre|code|kbd|script)(\s|>)/i, endPreScriptTag: /^<\/(pre|code|kbd|script)(\s|>)/i, startAngleBracket: /^</, endAngleBracket: />$/, pedanticHrefTitle: /^([^'"]*[^\s])\s+(['"])(.*)\2/, unicodeAlphaNumeric: /[\p{L}\p{N}]/u, escapeTest: /[&<>"']/, escapeReplace: /[&<>"']/g, escapeTestNoEncode: /[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/, escapeReplaceNoEncode: /[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g, caret: /(^|[^\[])\^/g, percentDecode: /%25/g, findPipe: /\|/g, splitPipe: / \|/, slashPipe: /\\\|/g, carriageReturn: /\r\n|\r/g, spaceLine: /^ +$/gm, notSpaceStart: /^\S*/, endingNewline: /\n$/, listItemRegex: /* @__PURE__ */ l((r) => new RegExp(`^( {0,3}${r})((?:[ ][^\\n]*)?(?:\\n|$))`), "listItemRegex"), nextBulletRegex: /* @__PURE__ */ l((r) => new RegExp(`^ {0,${Math.min(3, r - 1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`), "nextBulletRegex"), hrRegex: /* @__PURE__ */ l((r) => new RegExp(`^ {0,${Math.min(3, r - 1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`), "hrRegex"), fencesBeginRegex: /* @__PURE__ */ l((r) => new RegExp(`^ {0,${Math.min(3, r - 1)}}(?:\`\`\`|~~~)`), "fencesBeginRegex"), headingBeginRegex: /* @__PURE__ */ l((r) => new RegExp(`^ {0,${Math.min(3, r - 1)}}#`), "headingBeginRegex"), htmlBeginRegex: /* @__PURE__ */ l((r) => new RegExp(`^ {0,${Math.min(3, r - 1)}}<(?:[a-z].*>|!--)`, "i"), "htmlBeginRegex"), blockquoteBeginRegex: /* @__PURE__ */ l((r) => new RegExp(`^ {0,${Math.min(3, r - 1)}}>`), "blockquoteBeginRegex") }, wo = /^(?:[ \t]*(?:\n|$))+/, To = /^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/, Ao = /^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/, It = /^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/, So = /^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/, Ir = / {0,3}(?:[*+-]|\d{1,9}[.)])/, rs = /^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/, ns = G(rs).replace(/bull/g, Ir).replace(/blockCode/g, /(?: {4}| {0,3}\t)/).replace(/fences/g, / {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g, / {0,3}>/).replace(/heading/g, / {0,3}#{1,6}/).replace(/html/g, / {0,3}<[^\n>]+>\n/).replace(/\|table/g, "").getRegex(), Eo = G(rs).replace(/bull/g, Ir).replace(/blockCode/g, /(?: {4}| {0,3}\t)/).replace(/fences/g, / {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g, / {0,3}>/).replace(/heading/g, / {0,3}#{1,6}/).replace(/html/g, / {0,3}<[^\n>]+>\n/).replace(/table/g, / {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(), Mr = /^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/, Co = /^[^\n]+/, $r = /(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/, Ro = G(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label", $r).replace("title", /(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(), zo = G(/^(bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g, Ir).getRegex(), Qt = "address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul", Dr = /<!--(?:-?>|[\s\S]*?(?:-->|$))/, _o = G("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))", "i").replace("comment", Dr).replace("tag", Qt).replace("attribute", / +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(), ss = G(Mr).replace("hr", It).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("|lheading", "").replace("|table", "").replace("blockquote", " {0,3}>").replace("fences", " {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list", " {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html", "</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag", Qt).getRegex(), Io = G(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph", ss).getRegex(), Lr = { blockquote: Io, code: To, def: Ro, fences: Ao, heading: So, hr: It, html: _o, lheading: ns, list: zo, newline: wo, paragraph: ss, table: Qe, text: Co }, An = G("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr", It).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("blockquote", " {0,3}>").replace("code", "(?: {4}| {0,3} )[^\\n]").replace("fences", " {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list", " {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html", "</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag", Qt).getRegex(), Mo = { ...Lr, lheading: Eo, table: An, paragraph: G(Mr).replace("hr", It).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("|lheading", "").replace("table", An).replace("blockquote", " {0,3}>").replace("fences", " {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list", " {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html", "</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag", Qt).getRegex() }, $o = { ...Lr, html: G(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment", Dr).replace(/tag/g, "(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(), def: /^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/, heading: /^(#{1,6})(.*)(?:\n+|$)/, fences: Qe, lheading: /^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/, paragraph: G(Mr).replace("hr", It).replace("heading", ` *#{1,6} *[^
|
|
4524
4524
|
]`).replace("lheading", ns).replace("|table", "").replace("blockquote", " {0,3}>").replace("|fences", "").replace("|list", "").replace("|html", "").replace("|tag", "").getRegex() }, Do = /^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/, Lo = /^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/, as = /^( {2,}|\\)\n(?!\s*$)/, Oo = /^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/, Jt = /[\p{P}\p{S}]/u, Or = /[\s\p{P}\p{S}]/u, os = /[^\s\p{P}\p{S}]/u, Po = G(/^((?![*_])punctSpace)/, "u").replace(/punctSpace/g, Or).getRegex(), ls = /(?!~)[\p{P}\p{S}]/u, No = /(?!~)[\s\p{P}\p{S}]/u, Bo = /(?:[^\s\p{P}\p{S}]|~)/u, is = /(?![*_])[\p{P}\p{S}]/u, Uo = /(?![*_])[\s\p{P}\p{S}]/u, Fo = /(?:[^\s\p{P}\p{S}]|[*_])/u, jo = G(/link|precode-code|html/, "g").replace("link", /\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-", yo ? "(?<!`)()" : "(^^|[^`])").replace("code", /(?<b>`+)[^`]+\k<b>(?!`)/).replace("html", /<(?! )[^<>]*?>/).getRegex(), cs = /^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/, Go = G(cs, "u").replace(/punct/g, Jt).getRegex(), Ho = G(cs, "u").replace(/punct/g, ls).getRegex(), us = "^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)", Vo = G(us, "gu").replace(/notPunctSpace/g, os).replace(/punctSpace/g, Or).replace(/punct/g, Jt).getRegex(), Wo = G(us, "gu").replace(/notPunctSpace/g, Bo).replace(/punctSpace/g, No).replace(/punct/g, ls).getRegex(), qo = G("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)", "gu").replace(/notPunctSpace/g, os).replace(/punctSpace/g, Or).replace(/punct/g, Jt).getRegex(), Yo = G(/^~~?(?:((?!~)punct)|[^\s~])/, "u").replace(/punct/g, is).getRegex(), Zo = "^[^~]+(?=[^~])|(?!~)punct(~~?)(?=[\\s]|$)|notPunctSpace(~~?)(?!~)(?=punctSpace|$)|(?!~)punctSpace(~~?)(?=notPunctSpace)|[\\s](~~?)(?!~)(?=punct)|(?!~)punct(~~?)(?!~)(?=punct)|notPunctSpace(~~?)(?=notPunctSpace)", Xo = G(Zo, "gu").replace(/notPunctSpace/g, Fo).replace(/punctSpace/g, Uo).replace(/punct/g, is).getRegex(), Ko = G(/\\(punct)/, "gu").replace(/punct/g, Jt).getRegex(), Qo = G(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme", /[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email", /[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(), Jo = G(Dr).replace("(?:-->|$)", "-->").getRegex(), el = G("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment", Jo).replace("attribute", /\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(), Zt = /(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+[^`]*?`+(?!`)|[^\[\]\\`])*?/, tl = G(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]+(?:\n[ \t]*)?|\n[ \t]*)(title))?\s*\)/).replace("label", Zt).replace("href", /<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title", /"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(), ds = G(/^!?\[(label)\]\[(ref)\]/).replace("label", Zt).replace("ref", $r).getRegex(), hs = G(/^!?\[(ref)\](?:\[\])?/).replace("ref", $r).getRegex(), rl = G("reflink|nolink(?!\\()", "g").replace("reflink", ds).replace("nolink", hs).getRegex(), Sn = /[hH][tT][tT][pP][sS]?|[fF][tT][pP]/, Pr = { _backpedal: Qe, anyPunctuation: Ko, autolink: Qo, blockSkip: jo, br: as, code: Lo, del: Qe, delLDelim: Qe, delRDelim: Qe, emStrongLDelim: Go, emStrongRDelimAst: Vo, emStrongRDelimUnd: qo, escape: Do, link: tl, nolink: hs, punctuation: Po, reflink: ds, reflinkSearch: rl, tag: el, text: Oo, url: Qe }, nl = { ...Pr, link: G(/^!?\[(label)\]\((.*?)\)/).replace("label", Zt).getRegex(), reflink: G(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label", Zt).getRegex() }, Sr = { ...Pr, emStrongRDelimAst: Wo, emStrongLDelim: Ho, delLDelim: Yo, delRDelim: Xo, url: G(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol", Sn).replace("email", /[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(), _backpedal: /(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/, del: /^(~~?)(?=[^\s~])((?:\\[\s\S]|[^\\])*?(?:\\[\s\S]|[^\s~\\]))\1(?=[^~]|$)/, text: G(/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace("protocol", Sn).getRegex() }, sl = { ...Sr, br: G(as).replace("{2,}", "*").getRegex(), text: G(Sr.text).replace("\\b_", "\\b_| {2,}\\n").replace(/\{2,\}/g, "*").getRegex() }, jt = { normal: Lr, gfm: Mo, pedantic: $o }, Ct = { normal: Pr, gfm: Sr, breaks: sl, pedantic: nl }, al = { "&": "&", "<": "<", ">": ">", '"': """, "'": "'" }, En = /* @__PURE__ */ l((r) => al[r], "de");
|
|
4525
4525
|
function Ie(r, t) {
|
|
4526
4526
|
if (t) {
|
|
@@ -4577,13 +4577,13 @@ function ll(r, t = 0) {
|
|
|
4577
4577
|
return n;
|
|
4578
4578
|
}
|
|
4579
4579
|
l(ll, "fe");
|
|
4580
|
-
function
|
|
4580
|
+
function zn(r, t, e, n, s) {
|
|
4581
4581
|
let a = t.href, o = t.title || null, u = r[1].replace(s.other.outputLinkReplace, "$1");
|
|
4582
4582
|
n.state.inLink = !0;
|
|
4583
4583
|
let i = { type: r[0].charAt(0) === "!" ? "image" : "link", raw: e, href: a, title: o, text: u, tokens: n.inlineTokens(u) };
|
|
4584
4584
|
return n.state.inLink = !1, i;
|
|
4585
4585
|
}
|
|
4586
|
-
l(
|
|
4586
|
+
l(zn, "me");
|
|
4587
4587
|
function il(r, t, e) {
|
|
4588
4588
|
let n = r.match(e.other.indentCodeCompensation);
|
|
4589
4589
|
if (n === null) return t;
|
|
@@ -4663,16 +4663,16 @@ ${d}` : d;
|
|
|
4663
4663
|
let k = o.at(-1);
|
|
4664
4664
|
if (k?.type === "code") break;
|
|
4665
4665
|
if (k?.type === "blockquote") {
|
|
4666
|
-
let E = k,
|
|
4666
|
+
let E = k, I = E.raw + `
|
|
4667
4667
|
` + n.join(`
|
|
4668
|
-
`),
|
|
4669
|
-
o[o.length - 1] =
|
|
4668
|
+
`), L = this.blockquote(I);
|
|
4669
|
+
o[o.length - 1] = L, s = s.substring(0, s.length - E.raw.length) + L.raw, a = a.substring(0, a.length - E.text.length) + L.text;
|
|
4670
4670
|
break;
|
|
4671
4671
|
} else if (k?.type === "list") {
|
|
4672
|
-
let E = k,
|
|
4672
|
+
let E = k, I = E.raw + `
|
|
4673
4673
|
` + n.join(`
|
|
4674
|
-
`),
|
|
4675
|
-
o[o.length - 1] =
|
|
4674
|
+
`), L = this.list(I);
|
|
4675
|
+
o[o.length - 1] = L, s = s.substring(0, s.length - k.raw.length) + L.raw, a = a.substring(0, a.length - E.raw.length) + L.raw, n = I.substring(o.at(-1).raw.length).split(`
|
|
4676
4676
|
`);
|
|
4677
4677
|
continue;
|
|
4678
4678
|
}
|
|
@@ -4692,23 +4692,23 @@ ${d}` : d;
|
|
|
4692
4692
|
g = e[0], t = t.substring(g.length);
|
|
4693
4693
|
let m = ll(e[2].split(`
|
|
4694
4694
|
`, 1)[0], e[1].length), k = t.split(`
|
|
4695
|
-
`, 1)[0], E = !m.trim(),
|
|
4696
|
-
if (this.options.pedantic ? (
|
|
4695
|
+
`, 1)[0], E = !m.trim(), I = 0;
|
|
4696
|
+
if (this.options.pedantic ? (I = 2, d = m.trimStart()) : E ? I = e[1].length + 1 : (I = m.search(this.rules.other.nonSpaceChar), I = I > 4 ? 1 : I, d = m.slice(I), I += e[1].length), E && this.rules.other.blankLine.test(k) && (g += k + `
|
|
4697
4697
|
`, t = t.substring(k.length + 1), h = !0), !h) {
|
|
4698
|
-
let
|
|
4698
|
+
let L = this.rules.other.nextBulletRegex(I), Q = this.rules.other.hrRegex(I), xe = this.rules.other.fencesBeginRegex(I), B = this.rules.other.headingBeginRegex(I), y = this.rules.other.htmlBeginRegex(I), F = this.rules.other.blockquoteBeginRegex(I);
|
|
4699
4699
|
for (; t; ) {
|
|
4700
4700
|
let J = t.split(`
|
|
4701
4701
|
`, 1)[0], de;
|
|
4702
|
-
if (k = J, this.options.pedantic ? (k = k.replace(this.rules.other.listReplaceNesting, " "), de = k) : de = k.replace(this.rules.other.tabCharGlobal, " "), xe.test(k) || B.test(k) || y.test(k) || F.test(k) ||
|
|
4703
|
-
if (de.search(this.rules.other.nonSpaceChar) >=
|
|
4704
|
-
` + de.slice(
|
|
4702
|
+
if (k = J, this.options.pedantic ? (k = k.replace(this.rules.other.listReplaceNesting, " "), de = k) : de = k.replace(this.rules.other.tabCharGlobal, " "), xe.test(k) || B.test(k) || y.test(k) || F.test(k) || L.test(k) || Q.test(k)) break;
|
|
4703
|
+
if (de.search(this.rules.other.nonSpaceChar) >= I || !k.trim()) d += `
|
|
4704
|
+
` + de.slice(I);
|
|
4705
4705
|
else {
|
|
4706
4706
|
if (E || m.replace(this.rules.other.tabCharGlobal, " ").search(this.rules.other.nonSpaceChar) >= 4 || xe.test(m) || B.test(m) || Q.test(m)) break;
|
|
4707
4707
|
d += `
|
|
4708
4708
|
` + k;
|
|
4709
4709
|
}
|
|
4710
4710
|
E = !k.trim(), g += J + `
|
|
4711
|
-
`, t = t.substring(J.length + 1), m = de.slice(
|
|
4711
|
+
`, t = t.substring(J.length + 1), m = de.slice(I);
|
|
4712
4712
|
}
|
|
4713
4713
|
}
|
|
4714
4714
|
a.loose || (u ? a.loose = !0 : this.rules.other.doubleBlankLine.test(g) && (u = !0)), a.items.push({ type: "list_item", raw: g, task: !!this.options.gfm && this.rules.other.listIsTask.test(d), loose: !1, text: d, tokens: [] }), a.raw += g;
|
|
@@ -4812,7 +4812,7 @@ ${d}` : d;
|
|
|
4812
4812
|
let o = this.rules.other.pedanticHrefTitle.exec(s);
|
|
4813
4813
|
o && (s = o[1], a = o[3]);
|
|
4814
4814
|
} else a = e[3] ? e[3].slice(1, -1) : "";
|
|
4815
|
-
return s = s.trim(), this.rules.other.startAngleBracket.test(s) && (this.options.pedantic && !this.rules.other.endAngleBracket.test(n) ? s = s.slice(1) : s = s.slice(1, -1)),
|
|
4815
|
+
return s = s.trim(), this.rules.other.startAngleBracket.test(s) && (this.options.pedantic && !this.rules.other.endAngleBracket.test(n) ? s = s.slice(1) : s = s.slice(1, -1)), zn(e, { href: s && s.replace(this.rules.inline.anyPunctuation, "$1"), title: a && a.replace(this.rules.inline.anyPunctuation, "$1") }, e[0], this.lexer, this.rules);
|
|
4816
4816
|
}
|
|
4817
4817
|
}
|
|
4818
4818
|
reflink(t, e) {
|
|
@@ -4823,7 +4823,7 @@ ${d}` : d;
|
|
|
4823
4823
|
let o = n[0].charAt(0);
|
|
4824
4824
|
return { type: "text", raw: o, text: o };
|
|
4825
4825
|
}
|
|
4826
|
-
return
|
|
4826
|
+
return zn(n, a, n[0], this.lexer, this.rules);
|
|
4827
4827
|
}
|
|
4828
4828
|
}
|
|
4829
4829
|
emStrong(t, e, n = "") {
|
|
@@ -5412,7 +5412,7 @@ ${t}</tr>
|
|
|
5412
5412
|
}
|
|
5413
5413
|
return n;
|
|
5414
5414
|
}
|
|
5415
|
-
}, l(He, "u"), He), je,
|
|
5415
|
+
}, l(He, "u"), He), je, zt = (je = class {
|
|
5416
5416
|
constructor(t) {
|
|
5417
5417
|
U(this, "options");
|
|
5418
5418
|
U(this, "block");
|
|
@@ -5438,7 +5438,7 @@ ${t}</tr>
|
|
|
5438
5438
|
}
|
|
5439
5439
|
}, l(je, "P"), U(je, "passThroughHooks", /* @__PURE__ */ new Set(["preprocess", "postprocess", "processAllTokens", "emStrongMask"])), U(je, "passThroughHooksRespectAsync", /* @__PURE__ */ new Set(["preprocess", "postprocess", "processAllTokens"])), je), ft, cl = (ft = class {
|
|
5440
5440
|
constructor(...t) {
|
|
5441
|
-
U(this, "defaults",
|
|
5441
|
+
U(this, "defaults", _r());
|
|
5442
5442
|
U(this, "options", this.setOptions);
|
|
5443
5443
|
U(this, "parse", this.parseMarkdown(!0));
|
|
5444
5444
|
U(this, "parseInline", this.parseMarkdown(!1));
|
|
@@ -5447,7 +5447,7 @@ ${t}</tr>
|
|
|
5447
5447
|
U(this, "TextRenderer", Nr);
|
|
5448
5448
|
U(this, "Lexer", Se);
|
|
5449
5449
|
U(this, "Tokenizer", Xt);
|
|
5450
|
-
U(this, "Hooks",
|
|
5450
|
+
U(this, "Hooks", zt);
|
|
5451
5451
|
this.use(...t);
|
|
5452
5452
|
}
|
|
5453
5453
|
walkTokens(t, e) {
|
|
@@ -5520,13 +5520,13 @@ ${t}</tr>
|
|
|
5520
5520
|
s.tokenizer = a;
|
|
5521
5521
|
}
|
|
5522
5522
|
if (n.hooks) {
|
|
5523
|
-
let a = this.defaults.hooks || new
|
|
5523
|
+
let a = this.defaults.hooks || new zt();
|
|
5524
5524
|
for (let o in n.hooks) {
|
|
5525
5525
|
if (!(o in a)) throw new Error(`hook '${o}' does not exist`);
|
|
5526
5526
|
if (["options", "block"].includes(o)) continue;
|
|
5527
5527
|
let u = o, i = n.hooks[u], h = a[u];
|
|
5528
|
-
|
|
5529
|
-
if (this.defaults.async &&
|
|
5528
|
+
zt.passThroughHooks.has(o) ? a[u] = (g) => {
|
|
5529
|
+
if (this.defaults.async && zt.passThroughHooksRespectAsync.has(o)) return (async () => {
|
|
5530
5530
|
let m = await i.call(a, g);
|
|
5531
5531
|
return h.call(a, m);
|
|
5532
5532
|
})();
|
|
@@ -5604,7 +5604,7 @@ l(H, "g");
|
|
|
5604
5604
|
H.options = H.setOptions = function(r) {
|
|
5605
5605
|
return et.setOptions(r), H.defaults = et.defaults, ts(H.defaults), H;
|
|
5606
5606
|
};
|
|
5607
|
-
H.getDefaults =
|
|
5607
|
+
H.getDefaults = _r;
|
|
5608
5608
|
H.defaults = rt;
|
|
5609
5609
|
H.use = function(...r) {
|
|
5610
5610
|
return et.use(...r), H.defaults = et.defaults, ts(H.defaults), H;
|
|
@@ -5620,7 +5620,7 @@ H.TextRenderer = Nr;
|
|
|
5620
5620
|
H.Lexer = Se;
|
|
5621
5621
|
H.lexer = Se.lex;
|
|
5622
5622
|
H.Tokenizer = Xt;
|
|
5623
|
-
H.Hooks =
|
|
5623
|
+
H.Hooks = zt;
|
|
5624
5624
|
H.parse = H;
|
|
5625
5625
|
H.options;
|
|
5626
5626
|
H.setOptions;
|
|
@@ -5647,7 +5647,7 @@ const ul = { class: "flex flex-col h-full relative" }, dl = {
|
|
|
5647
5647
|
}, Sl = ["src", "alt"], El = { class: "max-w-20 truncate" }, Cl = ["onClick"], Rl = {
|
|
5648
5648
|
key: 0,
|
|
5649
5649
|
class: "shrink-0 flex items-center justify-center size-14"
|
|
5650
|
-
},
|
|
5650
|
+
}, zl = ["disabled"], _l = {
|
|
5651
5651
|
key: 0,
|
|
5652
5652
|
class: "i-svg-spinners-ring-resize size-4"
|
|
5653
5653
|
}, Il = {
|
|
@@ -5667,18 +5667,18 @@ const ul = { class: "flex flex-col h-full relative" }, dl = {
|
|
|
5667
5667
|
function t(M) {
|
|
5668
5668
|
if (!M)
|
|
5669
5669
|
return "";
|
|
5670
|
-
const
|
|
5671
|
-
return vo.sanitize(
|
|
5670
|
+
const _ = H.parse(M, { async: !1 });
|
|
5671
|
+
return vo.sanitize(_);
|
|
5672
5672
|
}
|
|
5673
5673
|
l(t, "renderMarkdown");
|
|
5674
|
-
const e =
|
|
5675
|
-
function h(M,
|
|
5676
|
-
const
|
|
5677
|
-
return !j || j.sender !==
|
|
5674
|
+
const e = D(() => r.scale === "lg"), n = q(""), s = q(), a = q(), o = q(), u = q([]), i = q(!1);
|
|
5675
|
+
function h(M, _) {
|
|
5676
|
+
const z = M[_], j = M[_ + 1];
|
|
5677
|
+
return !j || j.sender !== z.sender;
|
|
5678
5678
|
}
|
|
5679
5679
|
l(h, "shouldShowAvatar");
|
|
5680
|
-
const g =
|
|
5681
|
-
|
|
5680
|
+
const g = D(() => r.chatController?.textState.value), d = D(() => g.value?.isConnected ?? !1), m = D(() => g.value?.isThinking ?? !1), k = D(() => g.value?.connectionStatus === "disconnected" && !!g.value?.error), E = D(() => g.value?.connectionStatus !== "connected" && !g.value?.error), I = D(() => g.value?.error), L = D(() => r.chatController?.sharedMessages.value?.filter((M) => M.sender !== "system") ?? []), Q = D(() => !d.value), xe = D(() => k.value ? "Agent is offline" : E.value ? "Connecting..." : "Message"), B = D(() => (n.value.trim() || u.value.length > 0) && !Q.value && !i.value);
|
|
5681
|
+
_t(async () => {
|
|
5682
5682
|
if (r.chatController && !d.value)
|
|
5683
5683
|
try {
|
|
5684
5684
|
await r.chatController.startTextConversation();
|
|
@@ -5687,13 +5687,13 @@ const ul = { class: "flex flex-col h-full relative" }, dl = {
|
|
|
5687
5687
|
}
|
|
5688
5688
|
});
|
|
5689
5689
|
async function y() {
|
|
5690
|
-
const M = n.value.trim(),
|
|
5691
|
-
if (!M && !
|
|
5690
|
+
const M = n.value.trim(), _ = u.value.length > 0;
|
|
5691
|
+
if (!M && !_ || !r.chatController || !d.value || i.value)
|
|
5692
5692
|
return;
|
|
5693
|
-
const
|
|
5693
|
+
const z = n.value, j = _ ? [...u.value] : void 0;
|
|
5694
5694
|
n.value = "", u.value = [], a.value && (a.value.style.height = "auto", a.value.focus());
|
|
5695
5695
|
try {
|
|
5696
|
-
await r.chatController.sendChatMessage(
|
|
5696
|
+
await r.chatController.sendChatMessage(z, j), J();
|
|
5697
5697
|
} catch (Z) {
|
|
5698
5698
|
console.error("Error sending message:", Z);
|
|
5699
5699
|
}
|
|
@@ -5713,48 +5713,48 @@ const ul = { class: "flex flex-col h-full relative" }, dl = {
|
|
|
5713
5713
|
a.value && (a.value.style.height = "auto", a.value.style.height = `${Math.min(a.value.scrollHeight, 150)}px`);
|
|
5714
5714
|
}
|
|
5715
5715
|
l(de, "adjustTextareaHeight"), Ve(n, () => ur(() => de()));
|
|
5716
|
-
const v =
|
|
5716
|
+
const v = D(() => r.variant === "light");
|
|
5717
5717
|
function oe() {
|
|
5718
5718
|
o.value?.click();
|
|
5719
5719
|
}
|
|
5720
5720
|
l(oe, "triggerFileInput");
|
|
5721
5721
|
async function nt(M) {
|
|
5722
|
-
const
|
|
5723
|
-
if (!(!
|
|
5722
|
+
const _ = M.target, z = _.files?.[0];
|
|
5723
|
+
if (!(!z || !r.uploadFn)) {
|
|
5724
5724
|
i.value = !0;
|
|
5725
5725
|
try {
|
|
5726
|
-
const j = await r.uploadFn(
|
|
5726
|
+
const j = await r.uploadFn(z);
|
|
5727
5727
|
u.value = [...u.value, j];
|
|
5728
5728
|
} catch (j) {
|
|
5729
5729
|
console.error("Upload failed:", j);
|
|
5730
5730
|
} finally {
|
|
5731
|
-
i.value = !1,
|
|
5731
|
+
i.value = !1, _.value = "";
|
|
5732
5732
|
}
|
|
5733
5733
|
}
|
|
5734
5734
|
}
|
|
5735
5735
|
l(nt, "handleFileSelect");
|
|
5736
5736
|
function ee(M) {
|
|
5737
|
-
u.value = u.value.filter((
|
|
5737
|
+
u.value = u.value.filter((_, z) => z !== M);
|
|
5738
5738
|
}
|
|
5739
5739
|
l(ee, "removeAttachment");
|
|
5740
|
-
function we(M,
|
|
5741
|
-
if (
|
|
5742
|
-
const V = M[
|
|
5740
|
+
function we(M, _) {
|
|
5741
|
+
if (_ === 0) {
|
|
5742
|
+
const V = M[_];
|
|
5743
5743
|
return V?.timestamp ? $e(new Date(V.timestamp)) : null;
|
|
5744
5744
|
}
|
|
5745
|
-
const
|
|
5746
|
-
if (!
|
|
5747
|
-
const Z = new Date(
|
|
5745
|
+
const z = M[_ - 1], j = M[_];
|
|
5746
|
+
if (!z?.timestamp || !j?.timestamp) return null;
|
|
5747
|
+
const Z = new Date(z.timestamp).getTime();
|
|
5748
5748
|
return new Date(j.timestamp).getTime() - Z > 36e5 ? $e(new Date(j.timestamp)) : null;
|
|
5749
5749
|
}
|
|
5750
5750
|
l(we, "shouldShowTimeDivider");
|
|
5751
5751
|
function $e(M) {
|
|
5752
|
-
const
|
|
5752
|
+
const _ = /* @__PURE__ */ new Date(), z = M.toDateString() === _.toDateString(), j = new Date(_);
|
|
5753
5753
|
j.setDate(j.getDate() - 1);
|
|
5754
5754
|
const Z = M.toDateString() === j.toDateString(), ve = M.toLocaleTimeString("en-US", { hour: "numeric", minute: "2-digit" });
|
|
5755
|
-
if (
|
|
5755
|
+
if (z) return ve;
|
|
5756
5756
|
if (Z) return `Yesterday, ${ve}`;
|
|
5757
|
-
const C = M.getFullYear() ===
|
|
5757
|
+
const C = M.getFullYear() === _.getFullYear();
|
|
5758
5758
|
return `${M.toLocaleDateString("en-US", {
|
|
5759
5759
|
weekday: "long",
|
|
5760
5760
|
month: "short",
|
|
@@ -5762,172 +5762,178 @@ const ul = { class: "flex flex-col h-full relative" }, dl = {
|
|
|
5762
5762
|
...C ? {} : { year: "numeric" }
|
|
5763
5763
|
})}, ${ve}`;
|
|
5764
5764
|
}
|
|
5765
|
-
return l($e, "formatTimeDivider"), Ve(
|
|
5765
|
+
return l($e, "formatTimeDivider"), Ve(L, (M) => {
|
|
5766
5766
|
M.length > 0 && ur(() => J());
|
|
5767
|
-
}, { immediate: !0, deep: !0 }), (M,
|
|
5768
|
-
v.value ?
|
|
5767
|
+
}, { immediate: !0, deep: !0 }), (M, _) => (f(), b("div", ul, [
|
|
5768
|
+
v.value ? P("", !0) : (f(), b("div", dl, [
|
|
5769
5769
|
ne(Cr, {
|
|
5770
5770
|
agent: r.agent,
|
|
5771
5771
|
"is-online": d.value
|
|
5772
5772
|
}, null, 8, ["agent", "is-online"])
|
|
5773
5773
|
])),
|
|
5774
|
-
k.value ? (f(),
|
|
5774
|
+
k.value ? (f(), b("div", {
|
|
5775
5775
|
key: 1,
|
|
5776
|
-
class:
|
|
5776
|
+
class: A(["py-16 flex flex-col items-center justify-center gap-3 text-sm", v.value ? "text-theme-400" : "text-white/60"])
|
|
5777
5777
|
}, [
|
|
5778
5778
|
p("i", {
|
|
5779
|
-
class:
|
|
5779
|
+
class: A(["i-heroicons-cloud-arrow-down size-8", v.value ? "text-theme-300" : "text-white/40"])
|
|
5780
5780
|
}, null, 2),
|
|
5781
|
-
p("span", null, Y(
|
|
5782
|
-
], 2)) : E.value ? (f(),
|
|
5781
|
+
p("span", null, Y(I.value), 1)
|
|
5782
|
+
], 2)) : E.value ? (f(), b("div", {
|
|
5783
5783
|
key: 2,
|
|
5784
|
-
class:
|
|
5784
|
+
class: A(["py-16 flex flex-col items-center justify-center gap-2 text-sm", v.value ? "text-theme-400" : "text-theme-600"])
|
|
5785
5785
|
}, [
|
|
5786
5786
|
ne(Wt, { class: "size-4" })
|
|
5787
|
-
], 2)) :
|
|
5787
|
+
], 2)) : (f(), b("div", {
|
|
5788
|
+
key: 3,
|
|
5789
|
+
class: A(["flex items-center justify-center gap-1.5 py-2 text-[11px]", v.value ? "text-theme-300" : "text-white/30"])
|
|
5790
|
+
}, [..._[2] || (_[2] = [
|
|
5791
|
+
p("i", { class: "i-tabler-tool size-3" }, null, -1),
|
|
5792
|
+
p("span", null, "Setup & testing only", -1)
|
|
5793
|
+
])], 2)),
|
|
5788
5794
|
p("div", {
|
|
5789
5795
|
ref_key: "messagesContainer",
|
|
5790
5796
|
ref: s,
|
|
5791
5797
|
class: "flex-1 overflow-y-auto overflow-x-hidden py-4 space-y-1 min-h-0 [scrollbar-width:none] [-ms-overflow-style:none] [&::-webkit-scrollbar]:hidden"
|
|
5792
5798
|
}, [
|
|
5793
|
-
|
|
5799
|
+
L.value.length === 0 && !E.value && !k.value ? (f(), b("div", hl, [
|
|
5794
5800
|
p("img", {
|
|
5795
5801
|
src: r.agent.avatarUrl.value,
|
|
5796
5802
|
alt: r.agent.displayName.value,
|
|
5797
|
-
class:
|
|
5803
|
+
class: A(["rounded-full object-cover mb-3", e.value ? "size-28" : "size-20"])
|
|
5798
5804
|
}, null, 10, gl),
|
|
5799
5805
|
p("div", {
|
|
5800
|
-
class:
|
|
5806
|
+
class: A(["font-semibold", [v.value ? "text-theme-900" : "text-white", e.value ? "text-lg" : "text-base"]])
|
|
5801
5807
|
}, Y(r.agent.displayName.value), 3),
|
|
5802
|
-
r.agent.hasCustomHandle.value ? (f(),
|
|
5808
|
+
r.agent.hasCustomHandle.value ? (f(), b("div", {
|
|
5803
5809
|
key: 0,
|
|
5804
|
-
class:
|
|
5805
|
-
}, Y(r.agent.displayHandle.value), 3)) :
|
|
5810
|
+
class: A(["mt-0.5", [v.value ? "text-theme-400" : "text-white/50", e.value ? "text-sm" : "text-xs"]])
|
|
5811
|
+
}, Y(r.agent.displayHandle.value), 3)) : P("", !0),
|
|
5806
5812
|
p("p", {
|
|
5807
|
-
class:
|
|
5808
|
-
}, "
|
|
5809
|
-
])) :
|
|
5810
|
-
(f(!0),
|
|
5811
|
-
key:
|
|
5813
|
+
class: A(["text-center mt-3 leading-relaxed", [v.value ? "text-theme-400" : "text-white/50", e.value ? "text-base max-w-[300px]" : "text-sm max-w-[240px]"]])
|
|
5814
|
+
}, " Setup & testing — for daily use, connect a messaging app. ", 2)
|
|
5815
|
+
])) : P("", !0),
|
|
5816
|
+
(f(!0), b(ge, null, Je(L.value, (z, j) => (f(), b(ge, {
|
|
5817
|
+
key: z.id
|
|
5812
5818
|
}, [
|
|
5813
|
-
we(
|
|
5819
|
+
we(L.value, j) ? (f(), b("div", pl, [
|
|
5814
5820
|
p("div", {
|
|
5815
|
-
class:
|
|
5821
|
+
class: A(["flex-1 h-px", v.value ? "bg-theme-200" : "bg-white/10"])
|
|
5816
5822
|
}, null, 2),
|
|
5817
5823
|
p("span", {
|
|
5818
|
-
class:
|
|
5819
|
-
}, Y(we(
|
|
5824
|
+
class: A(["font-medium shrink-0", [v.value ? "text-theme-400" : "text-white/40", e.value ? "text-xs" : "text-[11px]"]])
|
|
5825
|
+
}, Y(we(L.value, j)), 3),
|
|
5820
5826
|
p("div", {
|
|
5821
|
-
class:
|
|
5827
|
+
class: A(["flex-1 h-px", v.value ? "bg-theme-200" : "bg-white/10"])
|
|
5822
5828
|
}, null, 2)
|
|
5823
|
-
])) :
|
|
5829
|
+
])) : P("", !0),
|
|
5824
5830
|
p("div", {
|
|
5825
|
-
class:
|
|
5826
|
-
"justify-end":
|
|
5827
|
-
"justify-start":
|
|
5828
|
-
"mb-4": h(
|
|
5831
|
+
class: A(["flex gap-2 items-end", {
|
|
5832
|
+
"justify-end": z.sender === "user",
|
|
5833
|
+
"justify-start": z.sender === "agent",
|
|
5834
|
+
"mb-4": h(L.value, j)
|
|
5829
5835
|
}])
|
|
5830
5836
|
}, [
|
|
5831
|
-
|
|
5837
|
+
z.sender === "agent" ? (f(), b("div", {
|
|
5832
5838
|
key: 0,
|
|
5833
|
-
class:
|
|
5839
|
+
class: A(["flex-shrink-0", e.value ? "size-10" : "size-8"])
|
|
5834
5840
|
}, [
|
|
5835
|
-
h(
|
|
5841
|
+
h(L.value, j) ? (f(), b("img", {
|
|
5836
5842
|
key: 0,
|
|
5837
5843
|
src: r.agent.avatarUrl.value,
|
|
5838
5844
|
alt: r.agent.displayName.value,
|
|
5839
|
-
class:
|
|
5840
|
-
}, null, 10, fl)) :
|
|
5841
|
-
], 2)) :
|
|
5845
|
+
class: A(["rounded-full object-cover", e.value ? "size-10" : "size-7"])
|
|
5846
|
+
}, null, 10, fl)) : P("", !0)
|
|
5847
|
+
], 2)) : P("", !0),
|
|
5842
5848
|
p("div", {
|
|
5843
|
-
class:
|
|
5849
|
+
class: A(z.sender === "user" ? "max-w-[75%]" : "max-w-[85%]")
|
|
5844
5850
|
}, [
|
|
5845
|
-
|
|
5851
|
+
z.attachments?.length ? (f(), b("div", {
|
|
5846
5852
|
key: 0,
|
|
5847
|
-
class:
|
|
5853
|
+
class: A(["mb-1 space-y-1", z.sender === "user" ? "flex flex-col items-end" : ""])
|
|
5848
5854
|
}, [
|
|
5849
|
-
(f(!0),
|
|
5850
|
-
Z.type === "image" ? (f(),
|
|
5855
|
+
(f(!0), b(ge, null, Je(z.attachments, (Z, ve) => (f(), b(ge, { key: ve }, [
|
|
5856
|
+
Z.type === "image" ? (f(), b("img", {
|
|
5851
5857
|
key: 0,
|
|
5852
5858
|
src: Z.url,
|
|
5853
5859
|
alt: Z.name,
|
|
5854
|
-
class:
|
|
5855
|
-
}, null, 10, ml)) : Z.type === "audio" ? (f(),
|
|
5860
|
+
class: A(["rounded-xl object-cover max-h-48", e.value ? "max-w-[320px]" : "max-w-[240px]"])
|
|
5861
|
+
}, null, 10, ml)) : Z.type === "audio" ? (f(), b("audio", {
|
|
5856
5862
|
key: 1,
|
|
5857
5863
|
src: Z.url,
|
|
5858
5864
|
controls: "",
|
|
5859
5865
|
class: "max-w-full"
|
|
5860
|
-
}, null, 8, bl)) : (f(),
|
|
5866
|
+
}, null, 8, bl)) : (f(), b("a", {
|
|
5861
5867
|
key: 2,
|
|
5862
5868
|
href: Z.url,
|
|
5863
5869
|
target: "_blank",
|
|
5864
5870
|
rel: "noopener",
|
|
5865
|
-
class:
|
|
5871
|
+
class: A(["inline-flex items-center gap-1.5 px-3 py-1.5 rounded-lg text-xs", v.value ? "bg-theme-100 text-theme-600 hover:bg-theme-200" : "bg-white/10 text-white/80 hover:bg-white/20"])
|
|
5866
5872
|
}, [
|
|
5867
|
-
|
|
5873
|
+
_[3] || (_[3] = p("i", { class: "i-tabler-file size-3.5" }, null, -1)),
|
|
5868
5874
|
bt(" " + Y(Z.name), 1)
|
|
5869
5875
|
], 10, xl))
|
|
5870
5876
|
], 64))), 128))
|
|
5871
|
-
], 2)) :
|
|
5872
|
-
|
|
5877
|
+
], 2)) : P("", !0),
|
|
5878
|
+
z.text ? (f(), b("div", {
|
|
5873
5879
|
key: 1,
|
|
5874
|
-
class:
|
|
5880
|
+
class: A(["rounded-2xl px-3.5 py-2", z.sender === "user" ? "bg-primary-500 text-white" : v.value ? "bg-theme-100 text-theme-800" : "bg-white/15 backdrop-blur-sm text-white/95"])
|
|
5875
5881
|
}, [
|
|
5876
5882
|
p("div", {
|
|
5877
|
-
class:
|
|
5878
|
-
innerHTML: t(
|
|
5883
|
+
class: A(["chat-msg-prose break-words", e.value ? "text-[15px] leading-[1.6]" : "text-[13px] leading-[1.55]"]),
|
|
5884
|
+
innerHTML: t(z.text)
|
|
5879
5885
|
}, null, 10, kl)
|
|
5880
|
-
], 2)) :
|
|
5886
|
+
], 2)) : P("", !0)
|
|
5881
5887
|
], 2)
|
|
5882
5888
|
], 2)
|
|
5883
5889
|
], 64))), 128)),
|
|
5884
|
-
m.value ? (f(),
|
|
5890
|
+
m.value ? (f(), b("div", vl, [
|
|
5885
5891
|
p("div", yl, [
|
|
5886
5892
|
p("img", {
|
|
5887
5893
|
src: r.agent.avatarUrl.value,
|
|
5888
5894
|
alt: r.agent.displayName.value,
|
|
5889
|
-
class:
|
|
5895
|
+
class: A(["rounded-full object-cover", e.value ? "size-10" : "size-8"])
|
|
5890
5896
|
}, null, 10, wl)
|
|
5891
5897
|
]),
|
|
5892
5898
|
p("div", {
|
|
5893
|
-
class:
|
|
5899
|
+
class: A(["rounded-2xl px-4 py-2.5 flex items-center", v.value ? "bg-theme-100" : "bg-white/15 backdrop-blur-sm"])
|
|
5894
5900
|
}, [
|
|
5895
5901
|
p("i", {
|
|
5896
|
-
class:
|
|
5902
|
+
class: A(["i-svg-spinners-3-dots-fade size-6", v.value ? "text-theme-400" : "text-white/70"])
|
|
5897
5903
|
}, null, 2)
|
|
5898
5904
|
], 2)
|
|
5899
|
-
])) :
|
|
5905
|
+
])) : P("", !0)
|
|
5900
5906
|
], 512),
|
|
5901
5907
|
p("div", Tl, [
|
|
5902
|
-
u.value.length > 0 ? (f(),
|
|
5903
|
-
(f(!0),
|
|
5908
|
+
u.value.length > 0 ? (f(), b("div", Al, [
|
|
5909
|
+
(f(!0), b(ge, null, Je(u.value, (z, j) => (f(), b("div", {
|
|
5904
5910
|
key: j,
|
|
5905
5911
|
class: "relative shrink-0 group"
|
|
5906
5912
|
}, [
|
|
5907
|
-
|
|
5913
|
+
z.type === "image" ? (f(), b("img", {
|
|
5908
5914
|
key: 0,
|
|
5909
|
-
src:
|
|
5910
|
-
alt:
|
|
5911
|
-
class:
|
|
5912
|
-
}, null, 10, Sl)) : (f(),
|
|
5915
|
+
src: z.url,
|
|
5916
|
+
alt: z.name,
|
|
5917
|
+
class: A(["size-14 rounded-lg object-cover border", v.value ? "border-theme-200" : "border-white/20"])
|
|
5918
|
+
}, null, 10, Sl)) : (f(), b("div", {
|
|
5913
5919
|
key: 1,
|
|
5914
|
-
class:
|
|
5920
|
+
class: A(["h-14 px-3 rounded-lg flex items-center gap-1.5 text-xs border", v.value ? "border-theme-200 bg-theme-50 text-theme-600" : "border-white/20 bg-white/10 text-white/70"])
|
|
5915
5921
|
}, [
|
|
5916
|
-
|
|
5917
|
-
p("span", El, Y(
|
|
5922
|
+
_[4] || (_[4] = p("i", { class: "i-tabler-file size-4" }, null, -1)),
|
|
5923
|
+
p("span", El, Y(z.name), 1)
|
|
5918
5924
|
], 2)),
|
|
5919
5925
|
p("button", {
|
|
5920
5926
|
class: "absolute -top-1.5 -right-1.5 size-5 flex items-center justify-center rounded-full bg-theme-600 text-white text-xs opacity-0 group-hover:opacity-100 transition-opacity cursor-pointer",
|
|
5921
5927
|
onClick: /* @__PURE__ */ l((Z) => ee(j), "onClick")
|
|
5922
|
-
}, [...
|
|
5928
|
+
}, [..._[5] || (_[5] = [
|
|
5923
5929
|
p("i", { class: "i-tabler-x size-3" }, null, -1)
|
|
5924
5930
|
])], 8, Cl)
|
|
5925
5931
|
]))), 128)),
|
|
5926
|
-
i.value ? (f(),
|
|
5932
|
+
i.value ? (f(), b("div", Rl, [
|
|
5927
5933
|
ne(Wt, { class: "size-5" })
|
|
5928
|
-
])) :
|
|
5929
|
-
])) :
|
|
5930
|
-
r.uploadFn ? (f(),
|
|
5934
|
+
])) : P("", !0)
|
|
5935
|
+
])) : P("", !0),
|
|
5936
|
+
r.uploadFn ? (f(), b("input", {
|
|
5931
5937
|
key: 1,
|
|
5932
5938
|
ref_key: "fileInput",
|
|
5933
5939
|
ref: o,
|
|
@@ -5935,13 +5941,13 @@ const ul = { class: "flex flex-col h-full relative" }, dl = {
|
|
|
5935
5941
|
accept: "image/*,audio/*,video/*",
|
|
5936
5942
|
class: "hidden",
|
|
5937
5943
|
onChange: nt
|
|
5938
|
-
}, null, 544)) :
|
|
5944
|
+
}, null, 544)) : P("", !0),
|
|
5939
5945
|
p("div", {
|
|
5940
|
-
class:
|
|
5946
|
+
class: A(["flex items-end gap-1 w-full rounded-3xl px-3 py-1.5", v.value ? "bg-theme-50 border border-theme-200 focus-within:border-theme-300" : "bg-white/10 backdrop-blur-sm border border-white/20 focus-within:border-white/40"])
|
|
5941
5947
|
}, [
|
|
5942
|
-
r.uploadFn ? (f(),
|
|
5948
|
+
r.uploadFn ? (f(), b("button", {
|
|
5943
5949
|
key: 0,
|
|
5944
|
-
class:
|
|
5950
|
+
class: A(["shrink-0 flex items-center justify-center rounded-full transition-colors mb-0.5 cursor-pointer", [
|
|
5945
5951
|
e.value ? "size-10" : "size-9",
|
|
5946
5952
|
v.value ? "text-theme-400 hover:text-theme-600" : "text-white/50 hover:text-white/80",
|
|
5947
5953
|
i.value ? "opacity-50 pointer-events-none" : ""
|
|
@@ -5949,35 +5955,35 @@ const ul = { class: "flex flex-col h-full relative" }, dl = {
|
|
|
5949
5955
|
disabled: Q.value || i.value,
|
|
5950
5956
|
onClick: oe
|
|
5951
5957
|
}, [
|
|
5952
|
-
i.value ? (f(),
|
|
5953
|
-
], 10,
|
|
5958
|
+
i.value ? (f(), b("i", _l)) : (f(), b("i", Il))
|
|
5959
|
+
], 10, zl)) : P("", !0),
|
|
5954
5960
|
In(p("textarea", {
|
|
5955
5961
|
ref_key: "textarea",
|
|
5956
5962
|
ref: a,
|
|
5957
|
-
"onUpdate:modelValue":
|
|
5963
|
+
"onUpdate:modelValue": _[0] || (_[0] = (z) => n.value = z),
|
|
5958
5964
|
rows: "1",
|
|
5959
5965
|
enterkeyhint: "send",
|
|
5960
5966
|
placeholder: xe.value,
|
|
5961
5967
|
disabled: Q.value,
|
|
5962
5968
|
style: Er({ fontSize: (e.value, "16px"), resize: "none" }),
|
|
5963
|
-
class:
|
|
5969
|
+
class: A(["flex-1 min-w-0 bg-transparent px-2 py-1.5 focus:outline-none disabled:opacity-50 overflow-y-auto [scrollbar-width:none] [-ms-overflow-style:none] [&::-webkit-scrollbar]:hidden", v.value ? "text-theme-800 placeholder-theme-400" : "text-white placeholder-white/50"]),
|
|
5964
5970
|
onKeydown: F
|
|
5965
5971
|
}, null, 46, Ml), [
|
|
5966
5972
|
[Mn, n.value]
|
|
5967
5973
|
]),
|
|
5968
5974
|
p("button", {
|
|
5969
|
-
class:
|
|
5975
|
+
class: A(["shrink-0 flex items-center justify-center rounded-full transition-colors mb-0.5", [
|
|
5970
5976
|
e.value ? "size-10" : "size-9",
|
|
5971
5977
|
B.value ? "bg-primary-500 text-white hover:bg-primary-600 cursor-pointer" : v.value ? "bg-theme-100 text-theme-300" : "bg-white/10 text-white/30"
|
|
5972
5978
|
]]),
|
|
5973
5979
|
disabled: !B.value,
|
|
5974
|
-
onClick:
|
|
5975
|
-
}, [...
|
|
5980
|
+
onClick: _[1] || (_[1] = (z) => y())
|
|
5981
|
+
}, [..._[6] || (_[6] = [
|
|
5976
5982
|
p("i", { class: "i-tabler-arrow-up size-5" }, null, -1)
|
|
5977
5983
|
])], 10, $l)
|
|
5978
5984
|
], 2),
|
|
5979
5985
|
p("div", {
|
|
5980
|
-
class:
|
|
5986
|
+
class: A(["hidden lg:block text-[10px] text-center mt-2", v.value ? "text-theme-300" : "text-white/40"])
|
|
5981
5987
|
}, " Press Enter to send, Shift+Enter for new line ", 2)
|
|
5982
5988
|
])
|
|
5983
5989
|
]));
|
|
@@ -5987,7 +5993,7 @@ const ul = { class: "flex flex-col h-full relative" }, dl = {
|
|
|
5987
5993
|
for (const [n, s] of t)
|
|
5988
5994
|
e[n] = s;
|
|
5989
5995
|
return e;
|
|
5990
|
-
}, "_export_sfc"), kr = /* @__PURE__ */ Ll(Dl, [["__scopeId", "data-v-
|
|
5996
|
+
}, "_export_sfc"), kr = /* @__PURE__ */ Ll(Dl, [["__scopeId", "data-v-7a3df8b0"]]), Ol = { class: "flex flex-col items-center text-center gap-4" }, Pl = { class: "relative flex-shrink-0" }, Nl = { class: "w-20 h-20 sm:w-24 sm:h-24 rounded-full overflow-hidden border-4 border-white" }, Bl = ["src", "alt"], Ul = { class: "absolute top-1.5 right-1.5" }, Fl = {
|
|
5991
5997
|
key: 1,
|
|
5992
5998
|
class: "size-4 bg-theme-400 rounded-full ring-2 ring-white"
|
|
5993
5999
|
}, jl = { class: "min-w-0" }, Gl = { class: "text-3xl font-light text-white mb-2 truncate" }, Hl = { class: "text-base font-light text-white/60 line-clamp-1" }, Vl = /* @__PURE__ */ ce({
|
|
@@ -5997,7 +6003,7 @@ const ul = { class: "flex flex-col h-full relative" }, dl = {
|
|
|
5997
6003
|
isOnline: { type: Boolean, default: !1 }
|
|
5998
6004
|
},
|
|
5999
6005
|
setup(r) {
|
|
6000
|
-
return (t, e) => (f(),
|
|
6006
|
+
return (t, e) => (f(), b("div", Ol, [
|
|
6001
6007
|
p("div", Pl, [
|
|
6002
6008
|
p("div", Nl, [
|
|
6003
6009
|
p("img", {
|
|
@@ -6009,13 +6015,13 @@ const ul = { class: "flex flex-col h-full relative" }, dl = {
|
|
|
6009
6015
|
}, null, 40, Bl)
|
|
6010
6016
|
]),
|
|
6011
6017
|
p("div", Ul, [
|
|
6012
|
-
r.isOnline ? (f(),
|
|
6018
|
+
r.isOnline ? (f(), b(ge, { key: 0 }, [
|
|
6013
6019
|
e[1] || (e[1] = p("div", {
|
|
6014
6020
|
class: "size-4 bg-green-500 rounded-full ring-2 ring-white absolute animate-ping",
|
|
6015
6021
|
style: { "animation-duration": "3s" }
|
|
6016
6022
|
}, null, -1)),
|
|
6017
6023
|
e[2] || (e[2] = p("div", { class: "size-4 bg-green-500 rounded-full ring-2 ring-white" }, null, -1))
|
|
6018
|
-
], 64)) : (f(),
|
|
6024
|
+
], 64)) : (f(), b("div", Fl))
|
|
6019
6025
|
])
|
|
6020
6026
|
]),
|
|
6021
6027
|
p("div", jl, [
|
|
@@ -6030,22 +6036,22 @@ const ul = { class: "flex flex-col h-full relative" }, dl = {
|
|
|
6030
6036
|
emits: ["click"],
|
|
6031
6037
|
setup(r) {
|
|
6032
6038
|
const t = q(!1);
|
|
6033
|
-
return
|
|
6039
|
+
return _t(() => {
|
|
6034
6040
|
setTimeout(() => {
|
|
6035
6041
|
t.value = !0;
|
|
6036
6042
|
}, 100);
|
|
6037
|
-
}), (e, n) => (f(),
|
|
6043
|
+
}), (e, n) => (f(), b("a", {
|
|
6038
6044
|
class: "close block cursor-pointer w-[60px] h-[60px] rounded-full transition-all duration-1000 ease-[cubic-bezier(0.25,1,0.33,1)] hover:scale-110 active:scale-90 hover:rotate-90",
|
|
6039
6045
|
onClick: n[0] || (n[0] = (s) => e.$emit("click", s))
|
|
6040
6046
|
}, [
|
|
6041
6047
|
n[1] || (n[1] = p("span", { class: "absolute inset-0 rounded-full transition-all" }, null, -1)),
|
|
6042
6048
|
p("span", Wl, [
|
|
6043
6049
|
p("span", {
|
|
6044
|
-
class:
|
|
6050
|
+
class: A(["absolute h-full w-[3px] rounded-[5px] left-[13px] transition-all duration-[400ms] ease-[cubic-bezier(0.52,0.01,0.16,1)]", t.value ? "translate-y-0 translate-x-0 rotate-45" : "translate-y-[30px] -translate-x-[30px] rotate-0"]),
|
|
6045
6051
|
style: { "background-color": "currentColor", "transition-delay": "0.15s" }
|
|
6046
6052
|
}, null, 2),
|
|
6047
6053
|
p("span", {
|
|
6048
|
-
class:
|
|
6054
|
+
class: A(["absolute h-full w-[3px] rounded-[5px] left-[13px] transition-all duration-[400ms] ease-[cubic-bezier(0.52,0.01,0.16,1)]", t.value ? "translate-y-0 translate-x-0 -rotate-45" : "-translate-y-[30px] -translate-x-[30px] rotate-0"]),
|
|
6049
6055
|
style: { "background-color": "currentColor", "transition-delay": "0.45s" }
|
|
6050
6056
|
}, null, 2)
|
|
6051
6057
|
])
|
|
@@ -6073,15 +6079,15 @@ const ul = { class: "flex flex-col h-full relative" }, dl = {
|
|
|
6073
6079
|
},
|
|
6074
6080
|
emits: ["update:modelValue"],
|
|
6075
6081
|
setup(r, { emit: t }) {
|
|
6076
|
-
const e = r, n = t, s = e.position || "left", a = e.widthClasses || "w-[80%] max-w-[300px]", o =
|
|
6082
|
+
const e = r, n = t, s = e.position || "left", a = e.widthClasses || "w-[80%] max-w-[300px]", o = D({
|
|
6077
6083
|
get: /* @__PURE__ */ l(() => e.modelValue, "get"),
|
|
6078
6084
|
set: /* @__PURE__ */ l((g) => n("update:modelValue", g), "set")
|
|
6079
|
-
}), u =
|
|
6085
|
+
}), u = D(() => e.items.filter((g) => !g.isHidden));
|
|
6080
6086
|
function i(g) {
|
|
6081
6087
|
g.isDisabled || (g.onClick ? g.onClick({ item: g, event: new MouseEvent("click") }) : g.href && (g.href.includes("http") ? window.open(g.href, g.target || "_self")?.focus() : window.location.href = g.href), o.value = !1);
|
|
6082
6088
|
}
|
|
6083
6089
|
l(i, "handleItemClick");
|
|
6084
|
-
const h =
|
|
6090
|
+
const h = D(() => s === "left" ? {
|
|
6085
6091
|
enter: "-translate-x-full",
|
|
6086
6092
|
leave: "-translate-x-full",
|
|
6087
6093
|
position: "justify-start",
|
|
@@ -6092,7 +6098,7 @@ const ul = { class: "flex flex-col h-full relative" }, dl = {
|
|
|
6092
6098
|
position: "justify-end",
|
|
6093
6099
|
closeButton: "-left-16"
|
|
6094
6100
|
});
|
|
6095
|
-
return (g, d) => (f(),
|
|
6101
|
+
return (g, d) => (f(), b(ge, null, [
|
|
6096
6102
|
ne(sn, {
|
|
6097
6103
|
"enter-active-class": "transition-opacity duration-300 ease-out",
|
|
6098
6104
|
"leave-active-class": "transition-opacity duration-200 ease-in",
|
|
@@ -6102,11 +6108,11 @@ const ul = { class: "flex flex-col h-full relative" }, dl = {
|
|
|
6102
6108
|
"leave-to-class": "opacity-0"
|
|
6103
6109
|
}, {
|
|
6104
6110
|
default: Me(() => [
|
|
6105
|
-
o.value ? (f(),
|
|
6111
|
+
o.value ? (f(), b("div", {
|
|
6106
6112
|
key: 0,
|
|
6107
6113
|
class: "absolute inset-0 z-40 bg-black/50 backdrop-blur-sm",
|
|
6108
6114
|
onClick: d[0] || (d[0] = (m) => o.value = !1)
|
|
6109
|
-
})) :
|
|
6115
|
+
})) : P("", !0)
|
|
6110
6116
|
]),
|
|
6111
6117
|
_: 1
|
|
6112
6118
|
}),
|
|
@@ -6119,30 +6125,30 @@ const ul = { class: "flex flex-col h-full relative" }, dl = {
|
|
|
6119
6125
|
"leave-to-class": h.value.leave
|
|
6120
6126
|
}, {
|
|
6121
6127
|
default: Me(() => [
|
|
6122
|
-
o.value ? (f(),
|
|
6128
|
+
o.value ? (f(), b("div", {
|
|
6123
6129
|
key: 0,
|
|
6124
|
-
class:
|
|
6130
|
+
class: A(["absolute inset-0 z-50 flex", h.value.position]),
|
|
6125
6131
|
onClick: d[3] || (d[3] = (m) => o.value = !1)
|
|
6126
6132
|
}, [
|
|
6127
6133
|
p("div", {
|
|
6128
|
-
class:
|
|
6134
|
+
class: A(["relative h-full shadow-2xl bg-black/30 backdrop-blur-xl flex flex-col justify-center", ie(a)]),
|
|
6129
6135
|
onClick: d[2] || (d[2] = vr(() => {
|
|
6130
6136
|
}, ["stop"]))
|
|
6131
6137
|
}, [
|
|
6132
6138
|
ne(ql, {
|
|
6133
|
-
class:
|
|
6139
|
+
class: A(["absolute top-4 z-10 text-white", h.value.closeButton]),
|
|
6134
6140
|
onClick: d[1] || (d[1] = (m) => o.value = !1)
|
|
6135
6141
|
}, null, 8, ["class"]),
|
|
6136
|
-
r.title ? (f(),
|
|
6142
|
+
r.title ? (f(), b("div", Yl, [
|
|
6137
6143
|
p("h3", Zl, Y(r.title), 1)
|
|
6138
|
-
])) :
|
|
6139
|
-
g.$slots.header ? (f(),
|
|
6144
|
+
])) : P("", !0),
|
|
6145
|
+
g.$slots.header ? (f(), b("div", Xl, [
|
|
6140
6146
|
mt(g.$slots, "header")
|
|
6141
|
-
])) :
|
|
6147
|
+
])) : P("", !0),
|
|
6142
6148
|
p("div", {
|
|
6143
|
-
class:
|
|
6149
|
+
class: A(["flex-1 p-6 space-y-2 overflow-y-auto", { "pt-6": !r.title && !g.$slots.header, "pt-4": r.title || g.$slots.header }])
|
|
6144
6150
|
}, [
|
|
6145
|
-
ne(
|
|
6151
|
+
ne(_n, {
|
|
6146
6152
|
"enter-active-class": "transition-all duration-400 ease-[cubic-bezier(0.25,1,0.33,1)]",
|
|
6147
6153
|
"leave-active-class": "transition-all duration-200 ease-[cubic-bezier(0.25,1,0.33,1)]",
|
|
6148
6154
|
"enter-from-class": ie(s) === "left" ? "-translate-x-4 opacity-0" : "translate-x-4 opacity-0",
|
|
@@ -6151,10 +6157,10 @@ const ul = { class: "flex flex-col h-full relative" }, dl = {
|
|
|
6151
6157
|
"leave-to-class": ie(s) === "left" ? "-translate-x-4 opacity-0" : "translate-x-4 opacity-0"
|
|
6152
6158
|
}, {
|
|
6153
6159
|
default: Me(() => [
|
|
6154
|
-
(f(!0),
|
|
6160
|
+
(f(!0), b(ge, null, Je(u.value, (m, k) => (f(), b("button", {
|
|
6155
6161
|
key: m.key || m.label || k,
|
|
6156
6162
|
style: Er({ transitionDelay: `${k * 40}ms` }),
|
|
6157
|
-
class:
|
|
6163
|
+
class: A(["cursor-pointer w-full text-left p-3 rounded-xl transition-all duration-200 ease-[cubic-bezier(0.25,1,0.33,1)] group", [
|
|
6158
6164
|
m.isActive ? "bg-primary-500/20 border border-primary-500/40" : "hover:bg-white/10",
|
|
6159
6165
|
m.isDisabled && "opacity-50 cursor-not-allowed"
|
|
6160
6166
|
]]),
|
|
@@ -6162,18 +6168,18 @@ const ul = { class: "flex flex-col h-full relative" }, dl = {
|
|
|
6162
6168
|
onClick: /* @__PURE__ */ l((E) => i(m), "onClick")
|
|
6163
6169
|
}, [
|
|
6164
6170
|
p("div", Ql, [
|
|
6165
|
-
m.icon?.src ? (f(),
|
|
6171
|
+
m.icon?.src ? (f(), b("i", {
|
|
6166
6172
|
key: 0,
|
|
6167
|
-
class:
|
|
6173
|
+
class: A(["size-5 flex-shrink-0 transition-transform duration-200 ease-[cubic-bezier(0.25,1,0.33,1)] group-hover:scale-110", [
|
|
6168
6174
|
m.icon.src,
|
|
6169
6175
|
m.isActive ? "text-primary-400" : "text-white/70 group-hover:text-white"
|
|
6170
6176
|
]])
|
|
6171
|
-
}, null, 2)) :
|
|
6177
|
+
}, null, 2)) : P("", !0),
|
|
6172
6178
|
p("div", Jl, [
|
|
6173
6179
|
p("div", {
|
|
6174
|
-
class:
|
|
6180
|
+
class: A(["font-medium text-sm", m.isActive ? "text-primary-300" : "text-white"])
|
|
6175
6181
|
}, Y(m.label), 3),
|
|
6176
|
-
m.subLabel ? (f(),
|
|
6182
|
+
m.subLabel ? (f(), b("div", ei, Y(m.subLabel), 1)) : P("", !0)
|
|
6177
6183
|
])
|
|
6178
6184
|
])
|
|
6179
6185
|
], 14, Kl))), 128))
|
|
@@ -6196,7 +6202,7 @@ const ul = { class: "flex flex-col h-full relative" }, dl = {
|
|
|
6196
6202
|
])
|
|
6197
6203
|
])
|
|
6198
6204
|
], 2)
|
|
6199
|
-
], 2)) :
|
|
6205
|
+
], 2)) : P("", !0)
|
|
6200
6206
|
]),
|
|
6201
6207
|
_: 3
|
|
6202
6208
|
}, 8, ["enter-from-class", "leave-to-class"])
|
|
@@ -6211,10 +6217,10 @@ const ul = { class: "flex flex-col h-full relative" }, dl = {
|
|
|
6211
6217
|
},
|
|
6212
6218
|
emits: ["update:modelValue"],
|
|
6213
6219
|
setup(r, { emit: t }) {
|
|
6214
|
-
const e = r, n = t, s =
|
|
6220
|
+
const e = r, n = t, s = D({
|
|
6215
6221
|
get: /* @__PURE__ */ l(() => e.modelValue, "get"),
|
|
6216
6222
|
set: /* @__PURE__ */ l((u) => n("update:modelValue", u), "set")
|
|
6217
|
-
}), a =
|
|
6223
|
+
}), a = D(() => e.chatController?.agentMode?.value ?? "self"), o = D(() => Ln.map((u) => ({
|
|
6218
6224
|
key: u.mode,
|
|
6219
6225
|
icon: { src: u.icon },
|
|
6220
6226
|
label: u.label,
|
|
@@ -6243,10 +6249,10 @@ const ul = { class: "flex flex-col h-full relative" }, dl = {
|
|
|
6243
6249
|
},
|
|
6244
6250
|
emits: ["update:modelValue"],
|
|
6245
6251
|
setup(r, { emit: t }) {
|
|
6246
|
-
const e = r, n = t, s =
|
|
6252
|
+
const e = r, n = t, s = D({
|
|
6247
6253
|
get: /* @__PURE__ */ l(() => e.modelValue, "get"),
|
|
6248
6254
|
set: /* @__PURE__ */ l((o) => n("update:modelValue", o), "set")
|
|
6249
|
-
}), a =
|
|
6255
|
+
}), a = D(() => {
|
|
6250
6256
|
const o = [
|
|
6251
6257
|
{
|
|
6252
6258
|
key: "share",
|
|
@@ -6342,7 +6348,7 @@ const ul = { class: "flex flex-col h-full relative" }, dl = {
|
|
|
6342
6348
|
},
|
|
6343
6349
|
emits: ["close", "error"],
|
|
6344
6350
|
setup(r, { emit: t }) {
|
|
6345
|
-
const e = t, n = $n(), s = q(!1), a = q(!1), o = q(), u = q(), i =
|
|
6351
|
+
const e = t, n = $n(), s = q(!1), a = q(!1), o = q(), u = q(), i = D(() => n.value?.agentMode?.value ?? "self"), h = D(() => n.value?.textState.value.isConnected ?? !1), g = D(() => r.sdk.activeUser.value !== void 0), d = D(() => Ln.find((B) => B.mode === i.value));
|
|
6346
6352
|
function m() {
|
|
6347
6353
|
n.value && n.value.destroy();
|
|
6348
6354
|
try {
|
|
@@ -6365,7 +6371,7 @@ const ul = { class: "flex flex-col h-full relative" }, dl = {
|
|
|
6365
6371
|
u.value.style.setProperty(`--primary-${F}`, J);
|
|
6366
6372
|
});
|
|
6367
6373
|
}
|
|
6368
|
-
l(k, "applyTheme"),
|
|
6374
|
+
l(k, "applyTheme"), _t(() => {
|
|
6369
6375
|
try {
|
|
6370
6376
|
m(), k(r.theme), r.chatOnly && n.value && n.value.setMode("chat");
|
|
6371
6377
|
} catch (B) {
|
|
@@ -6379,44 +6385,44 @@ const ul = { class: "flex flex-col h-full relative" }, dl = {
|
|
|
6379
6385
|
}), Ve(() => r.sdk.activeUser.value, (B, y) => {
|
|
6380
6386
|
y && !B && n.value && n.value.setMode("self");
|
|
6381
6387
|
});
|
|
6382
|
-
const E =
|
|
6388
|
+
const E = D(() => !!(r.agent.cover.value?.src && r.agent.cover.value?.quality === "low") || !!(r.agent.avatar.value?.src && r.agent.avatar.value?.quality === "low")), I = D(() => {
|
|
6383
6389
|
const B = [E.value ? "backdrop-blur-sm" : ""];
|
|
6384
6390
|
return E.value && i.value === "self" ? B.push("from-black/80 via-black/60 to-black/80") : i.value === "self" ? B.push("from-black/70 via-black/50 to-black/80") : B.push("from-black/90 via-black/90 to-black/100"), B.join(" ");
|
|
6385
|
-
}),
|
|
6391
|
+
}), L = {
|
|
6386
6392
|
phone: "i-heroicons-phone",
|
|
6387
6393
|
calendar: "i-heroicons-calendar",
|
|
6388
6394
|
question: "i-heroicons-question-mark-circle",
|
|
6389
6395
|
message: "i-heroicons-chat-bubble-left-right",
|
|
6390
6396
|
sparkles: "i-heroicons-sparkles"
|
|
6391
|
-
}, Q =
|
|
6397
|
+
}, Q = D(() => Ms({
|
|
6392
6398
|
template: r.buttonText || "Talk to {name}",
|
|
6393
6399
|
agent: r.agent.toConfig()
|
|
6394
|
-
})), xe =
|
|
6395
|
-
return (B, y) => (f(),
|
|
6400
|
+
})), xe = D(() => L[r.buttonIcon || "phone"] || L.phone);
|
|
6401
|
+
return (B, y) => (f(), b("div", {
|
|
6396
6402
|
ref_key: "rootElement",
|
|
6397
6403
|
ref: u,
|
|
6398
6404
|
key: ie(dr)(r.agent.toConfig()),
|
|
6399
6405
|
class: "pagelines-sdk @container/agent pagelines-agent w-full h-full overflow-hidden relative",
|
|
6400
6406
|
"data-test": "agent-chat"
|
|
6401
6407
|
}, [
|
|
6402
|
-
r.loading ? (f(),
|
|
6408
|
+
r.loading ? (f(), b("div", si, [
|
|
6403
6409
|
ne(Wt, { class: "text-white size-8" })
|
|
6404
|
-
])) : r.agent && !o.value ? (f(),
|
|
6410
|
+
])) : r.agent && !o.value ? (f(), b("div", {
|
|
6405
6411
|
key: 1,
|
|
6406
6412
|
class: "absolute inset-0 bg-cover bg-center bg-no-repeat",
|
|
6407
6413
|
style: Er({ backgroundImage: `url(${ie(dr)(r.agent.toConfig())})` }),
|
|
6408
6414
|
"data-quality": r.agent.avatar.value?.quality || "none"
|
|
6409
6415
|
}, [
|
|
6410
6416
|
p("div", {
|
|
6411
|
-
class:
|
|
6417
|
+
class: A(["absolute inset-0 bg-gradient-to-br z-0", I.value])
|
|
6412
6418
|
}, null, 2),
|
|
6413
6419
|
p("div", {
|
|
6414
|
-
class:
|
|
6420
|
+
class: A(["relative z-10 flex flex-col h-full transition-all duration-500 ease-[cubic-bezier(0.25,1,0.33,1)] will-change-transform", r.isActive ? "opacity-100 translate-y-0" : "opacity-0 translate-y-2"])
|
|
6415
6421
|
}, [
|
|
6416
6422
|
p("div", {
|
|
6417
|
-
class:
|
|
6423
|
+
class: A(["relative z-30 p-2", i.value !== "self" ? "backdrop-blur-lg" : ""])
|
|
6418
6424
|
}, [
|
|
6419
|
-
r.chatOnly ? (f(),
|
|
6425
|
+
r.chatOnly ? (f(), b("div", oi, [
|
|
6420
6426
|
p("div", li, [
|
|
6421
6427
|
p("img", {
|
|
6422
6428
|
src: ie(dr)(r.agent.toConfig()),
|
|
@@ -6425,20 +6431,20 @@ const ul = { class: "flex flex-col h-full relative" }, dl = {
|
|
|
6425
6431
|
}, null, 8, ii),
|
|
6426
6432
|
p("span", ci, Y(r.agent.displayName.value), 1)
|
|
6427
6433
|
]),
|
|
6428
|
-
r.hasClose ? (f(),
|
|
6434
|
+
r.hasClose ? (f(), b("div", ui, [
|
|
6429
6435
|
p("button", {
|
|
6430
6436
|
class: "cursor-pointer flex items-center p-3 rounded-2xl text-white/70 hover:bg-white/10 transition-colors",
|
|
6431
6437
|
onClick: y[0] || (y[0] = vr((F) => e("close", "button"), ["stop"]))
|
|
6432
6438
|
}, [...y[7] || (y[7] = [
|
|
6433
6439
|
p("i", { class: "size-6 i-tabler-x" }, null, -1)
|
|
6434
6440
|
])])
|
|
6435
|
-
])) :
|
|
6436
|
-
])) : (f(),
|
|
6441
|
+
])) : P("", !0)
|
|
6442
|
+
])) : (f(), b("div", {
|
|
6437
6443
|
key: 1,
|
|
6438
|
-
class:
|
|
6444
|
+
class: A(["flex items-center", r.hasClose ? "" : "justify-between"])
|
|
6439
6445
|
}, [
|
|
6440
6446
|
p("div", {
|
|
6441
|
-
class:
|
|
6447
|
+
class: A(r.hasClose ? "flex-1 basis-0" : "")
|
|
6442
6448
|
}, [
|
|
6443
6449
|
p("button", {
|
|
6444
6450
|
class: "cursor-pointer p-2 flex items-center gap-2 rounded-2xl text-white/70 hover:bg-white/10 transition-all duration-300 ease-[cubic-bezier(0.25,1,0.33,1)] hover:scale-105 active:scale-95",
|
|
@@ -6448,34 +6454,34 @@ const ul = { class: "flex flex-col h-full relative" }, dl = {
|
|
|
6448
6454
|
])])
|
|
6449
6455
|
], 2),
|
|
6450
6456
|
p("button", {
|
|
6451
|
-
class:
|
|
6457
|
+
class: A(["flex items-center gap-2 px-3.5 py-3 rounded-2xl text-white/90 hover:bg-white/10 transition-all cursor-pointer flex-grow-0", { "bg-white/10": a.value }]),
|
|
6452
6458
|
onClick: y[2] || (y[2] = (F) => a.value = !0)
|
|
6453
6459
|
}, [
|
|
6454
6460
|
p("i", {
|
|
6455
|
-
class:
|
|
6461
|
+
class: A([d.value?.icon, "size-4 opacity-60"])
|
|
6456
6462
|
}, null, 2),
|
|
6457
6463
|
p("span", di, Y(d.value?.label), 1),
|
|
6458
6464
|
y[9] || (y[9] = p("i", { class: "i-tabler-chevron-down size-4" }, null, -1))
|
|
6459
6465
|
], 2),
|
|
6460
|
-
r.hasClose ? (f(),
|
|
6466
|
+
r.hasClose ? (f(), b("div", hi, [
|
|
6461
6467
|
p("button", {
|
|
6462
6468
|
class: "cursor-pointer flex items-center p-3 rounded-2xl text-white/70 hover:bg-white/10 transition-colors",
|
|
6463
6469
|
onClick: y[3] || (y[3] = vr((F) => e("close", "button"), ["stop"]))
|
|
6464
6470
|
}, [...y[10] || (y[10] = [
|
|
6465
6471
|
p("i", { class: "size-6 i-tabler-x" }, null, -1)
|
|
6466
6472
|
])])
|
|
6467
|
-
])) :
|
|
6473
|
+
])) : P("", !0)
|
|
6468
6474
|
], 2))
|
|
6469
6475
|
], 2),
|
|
6470
|
-
r.chatOnly ? (f(),
|
|
6476
|
+
r.chatOnly ? (f(), b("div", gi, [
|
|
6471
6477
|
p("div", pi, [
|
|
6472
6478
|
ne(kr, {
|
|
6473
6479
|
"chat-controller": n.value,
|
|
6474
6480
|
agent: r.agent
|
|
6475
6481
|
}, null, 8, ["chat-controller", "agent"])
|
|
6476
6482
|
])
|
|
6477
|
-
])) : (f(),
|
|
6478
|
-
i.value === "self" ? (f(),
|
|
6483
|
+
])) : (f(), b(ge, { key: 1 }, [
|
|
6484
|
+
i.value === "self" ? (f(), b("div", fi, [
|
|
6479
6485
|
y[11] || (y[11] = p("div", { class: "flex-1 basis-0 mb-12" }, null, -1)),
|
|
6480
6486
|
ne(Vl, {
|
|
6481
6487
|
agent: r.agent,
|
|
@@ -6495,24 +6501,24 @@ const ul = { class: "flex flex-col h-full relative" }, dl = {
|
|
|
6495
6501
|
]),
|
|
6496
6502
|
_: 1
|
|
6497
6503
|
}, 8, ["icon"]),
|
|
6498
|
-
r.agent.accounts.value && r.agent.accounts.value.length > 0 ? (f(),
|
|
6499
|
-
(f(!0),
|
|
6504
|
+
r.agent.accounts.value && r.agent.accounts.value.length > 0 ? (f(), b("div", bi, [
|
|
6505
|
+
(f(!0), b(ge, null, Je((r.agent.accounts.value || []).filter((F) => ie(dt)[F.platform]), (F) => (f(), b("a", {
|
|
6500
6506
|
key: `${F.platform}-${F.handle}`,
|
|
6501
6507
|
href: ie(dt)[F.platform].getUrl(F.handle),
|
|
6502
6508
|
target: "_blank",
|
|
6503
6509
|
class: "size-12 rounded-full text-white/60 hover:text-white hover:bg-white/5 border border-white/0 hover:border-white/10 flex items-center justify-center transition-all duration-200 hover:scale-105"
|
|
6504
6510
|
}, [
|
|
6505
6511
|
p("i", {
|
|
6506
|
-
class:
|
|
6512
|
+
class: A([ie(dt)[F.platform].icon, "size-5"])
|
|
6507
6513
|
}, null, 2)
|
|
6508
6514
|
], 8, xi))), 128))
|
|
6509
|
-
])) :
|
|
6515
|
+
])) : P("", !0)
|
|
6510
6516
|
])
|
|
6511
|
-
])) : i.value === "talk" ? (f(),
|
|
6517
|
+
])) : i.value === "talk" ? (f(), b("div", ki, [
|
|
6512
6518
|
r.requireAuth && !g.value ? (f(), Ae(on, {
|
|
6513
6519
|
key: 0,
|
|
6514
6520
|
sdk: r.sdk
|
|
6515
|
-
}, null, 8, ["sdk"])) : (f(),
|
|
6521
|
+
}, null, 8, ["sdk"])) : (f(), b(ge, { key: 1 }, [
|
|
6516
6522
|
p("div", null, [
|
|
6517
6523
|
p("div", vi, [
|
|
6518
6524
|
ne(Cr, {
|
|
@@ -6526,9 +6532,9 @@ const ul = { class: "flex flex-col h-full relative" }, dl = {
|
|
|
6526
6532
|
agent: r.agent
|
|
6527
6533
|
}, null, 8, ["chat-controller", "agent"])
|
|
6528
6534
|
], 64))
|
|
6529
|
-
])) : (f(),
|
|
6535
|
+
])) : (f(), b("div", yi, [
|
|
6530
6536
|
p("div", wi, [
|
|
6531
|
-
i.value === "chat" ? (f(),
|
|
6537
|
+
i.value === "chat" ? (f(), b(ge, { key: 0 }, [
|
|
6532
6538
|
r.requireAuth && !g.value ? (f(), Ae(on, {
|
|
6533
6539
|
key: 0,
|
|
6534
6540
|
sdk: r.sdk
|
|
@@ -6541,12 +6547,12 @@ const ul = { class: "flex flex-col h-full relative" }, dl = {
|
|
|
6541
6547
|
key: 1,
|
|
6542
6548
|
agent: r.agent,
|
|
6543
6549
|
"is-online": h.value
|
|
6544
|
-
}, null, 8, ["agent", "is-online"])) :
|
|
6550
|
+
}, null, 8, ["agent", "is-online"])) : P("", !0)
|
|
6545
6551
|
])
|
|
6546
6552
|
]))
|
|
6547
6553
|
], 64)),
|
|
6548
6554
|
p("div", {
|
|
6549
|
-
class:
|
|
6555
|
+
class: A(["relative z-20 text-center py-5 px-6", i.value === "info" ? "hidden" : ""])
|
|
6550
6556
|
}, [...y[12] || (y[12] = [
|
|
6551
6557
|
p("a", {
|
|
6552
6558
|
href: "https://www.pagelines.com",
|
|
@@ -6558,7 +6564,7 @@ const ul = { class: "flex flex-col h-full relative" }, dl = {
|
|
|
6558
6564
|
], -1)
|
|
6559
6565
|
])], 2)
|
|
6560
6566
|
], 2)
|
|
6561
|
-
], 12, ai)) : o.value ? (f(),
|
|
6567
|
+
], 12, ai)) : o.value ? (f(), b("div", Ti, [
|
|
6562
6568
|
p("div", Ai, [
|
|
6563
6569
|
y[13] || (y[13] = p("div", { class: "flex justify-center" }, [
|
|
6564
6570
|
p("div", { class: "rounded-full bg-red-500/20 flex items-center justify-center size-10" }, [
|
|
@@ -6568,8 +6574,8 @@ const ul = { class: "flex flex-col h-full relative" }, dl = {
|
|
|
6568
6574
|
y[14] || (y[14] = p("h3", { class: "text-lg font-medium" }, " Agent Error ", -1)),
|
|
6569
6575
|
p("p", Si, Y(o.value), 1)
|
|
6570
6576
|
])
|
|
6571
|
-
])) : (f(),
|
|
6572
|
-
r.chatOnly ?
|
|
6577
|
+
])) : (f(), b("div", Ei, " There was an error loading the digital agent. Please try again later. ")),
|
|
6578
|
+
r.chatOnly ? P("", !0) : (f(), Ae(ni, {
|
|
6573
6579
|
key: 4,
|
|
6574
6580
|
modelValue: s.value,
|
|
6575
6581
|
"onUpdate:modelValue": y[5] || (y[5] = (F) => s.value = F),
|
|
@@ -6578,7 +6584,7 @@ const ul = { class: "flex flex-col h-full relative" }, dl = {
|
|
|
6578
6584
|
title: r.agent.displayName.value,
|
|
6579
6585
|
"data-test": "agent-sidebar"
|
|
6580
6586
|
}, null, 8, ["modelValue", "agent", "sdk", "title"])),
|
|
6581
|
-
r.chatOnly ?
|
|
6587
|
+
r.chatOnly ? P("", !0) : (f(), Ae(ri, {
|
|
6582
6588
|
key: 5,
|
|
6583
6589
|
modelValue: a.value,
|
|
6584
6590
|
"onUpdate:modelValue": y[6] || (y[6] = (F) => a.value = F),
|
|
@@ -6604,11 +6610,11 @@ const ul = { class: "flex flex-col h-full relative" }, dl = {
|
|
|
6604
6610
|
apiBase: {}
|
|
6605
6611
|
},
|
|
6606
6612
|
setup(r) {
|
|
6607
|
-
const t = Rs("AgentWrap"), e = r, n = e.sdk ||
|
|
6613
|
+
const t = Rs("AgentWrap"), e = r, n = e.sdk || zs.getInstance({
|
|
6608
6614
|
isDev: typeof window < "u" ? window.location.hostname === "localhost" || window.location.hostname.includes("127.0.0.1") : !1,
|
|
6609
6615
|
...e.apiBase && { apiBase: e.apiBase }
|
|
6610
6616
|
}), s = q(!e.agent), a = $n(e.agent ? new Vt({ config: e.agent }) : void 0), o = q();
|
|
6611
|
-
return
|
|
6617
|
+
return _t(async () => {
|
|
6612
6618
|
if (e.agent) {
|
|
6613
6619
|
t.debug("Agent provided via props, skipping fetch", {
|
|
6614
6620
|
agentId: e.agent.agentId,
|
|
@@ -6684,8 +6690,8 @@ const ul = { class: "flex flex-col h-full relative" }, dl = {
|
|
|
6684
6690
|
}
|
|
6685
6691
|
});
|
|
6686
6692
|
}
|
|
6687
|
-
}), (u, i) => (f(),
|
|
6688
|
-
s.value ? (f(),
|
|
6693
|
+
}), (u, i) => (f(), b("div", Ci, [
|
|
6694
|
+
s.value ? (f(), b("div", Ri, [...i[0] || (i[0] = [
|
|
6689
6695
|
p("div", { class: "animate-spin rounded-full size-6 border-b-2 border-white" }, null, -1)
|
|
6690
6696
|
])])) : a.value ? mt(u.$slots, "default", {
|
|
6691
6697
|
key: 1,
|
|
@@ -6696,7 +6702,7 @@ const ul = { class: "flex flex-col h-full relative" }, dl = {
|
|
|
6696
6702
|
buttonText: r.buttonText,
|
|
6697
6703
|
buttonIcon: r.buttonIcon,
|
|
6698
6704
|
loading: s.value
|
|
6699
|
-
}) :
|
|
6705
|
+
}) : P("", !0)
|
|
6700
6706
|
]));
|
|
6701
6707
|
}
|
|
6702
6708
|
});
|
|
@@ -6708,4 +6714,4 @@ export {
|
|
|
6708
6714
|
yr as b,
|
|
6709
6715
|
dr as g
|
|
6710
6716
|
};
|
|
6711
|
-
//# sourceMappingURL=AgentWrap.vue_vue_type_script_setup_true_lang-
|
|
6717
|
+
//# sourceMappingURL=AgentWrap.vue_vue_type_script_setup_true_lang-CwKY5BM_.js.map
|