@pagelines/sdk 1.0.579 → 1.0.580
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.
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
var
|
|
2
|
-
var o = (e, a) =>
|
|
3
|
-
import { defineComponent as q, openBlock as m, createBlock as N, TransitionGroup as Qe, withCtx as F, renderSlot as me, ref as J, computed as A, watch as ze, createElementBlock as
|
|
1
|
+
var xt = Object.defineProperty;
|
|
2
|
+
var o = (e, a) => xt(e, "name", { value: a, configurable: !0 });
|
|
3
|
+
import { defineComponent as q, openBlock as m, createBlock as N, TransitionGroup as Qe, withCtx as F, renderSlot as me, ref as J, computed as A, watch as ze, createElementBlock as x, createElementVNode as b, toDisplayString as P, createCommentVNode as S, createVNode as T, withKeys as pt, createTextVNode as ge, resolveDynamicComponent as vt, normalizeClass as $, Fragment as Z, renderList as Se, unref as R, onMounted as Xe, Transition as Pe, withModifiers as Ae, normalizeStyle as Je, shallowRef as kt, onUnmounted as yt, mergeProps as wt } from "vue";
|
|
4
4
|
import { S as ae } from "./socialPlatforms.js";
|
|
5
5
|
import { b as Ct, d as zt, c as Ze, e as _e, f as et, h as Le, p as At, g as ye, a as we, A as $t, _ as St } from "./AgentWrap.vue_vue_type_script_setup_true_lang.js";
|
|
6
6
|
import { getColorSchemeOklch as Mt } from "@pagelines/core";
|
|
@@ -88,25 +88,25 @@ const tt = [
|
|
|
88
88
|
}, n = A(() => l[t.value]);
|
|
89
89
|
return ze(() => e.sdk.activeUser.value, (s) => {
|
|
90
90
|
s && t.value === "code" && console.log("[ElAuthGate] Authentication successful", { email: s.email });
|
|
91
|
-
}), (s, i) => (m(),
|
|
91
|
+
}), (s, i) => (m(), x("div", {
|
|
92
92
|
"data-test": "auth-form",
|
|
93
93
|
"data-test-mode": t.value,
|
|
94
94
|
class: "flex flex-col items-center justify-center h-full p-6"
|
|
95
95
|
}, [
|
|
96
96
|
b("div", Tt, [
|
|
97
|
-
e.sdk.error.value ? (m(),
|
|
97
|
+
e.sdk.error.value ? (m(), x("p", Et, P(e.sdk.error.value), 1)) : S("", !0),
|
|
98
98
|
b("h3", Ot, P(n.value.title), 1),
|
|
99
99
|
b("div", jt, [
|
|
100
100
|
T(It, null, {
|
|
101
101
|
default: F(() => [
|
|
102
|
-
t.value === "email" ? (m(),
|
|
102
|
+
t.value === "email" ? (m(), x("div", Bt, [
|
|
103
103
|
T(Ct, {
|
|
104
104
|
modelValue: a.value.email,
|
|
105
105
|
"onUpdate:modelValue": i[0] || (i[0] = (u) => a.value.email = u),
|
|
106
106
|
"data-test": "auth-email-input",
|
|
107
|
-
onKeyup:
|
|
107
|
+
onKeyup: pt(n.value.action, ["enter"])
|
|
108
108
|
}, null, 8, ["modelValue", "onKeyup"])
|
|
109
|
-
])) : (m(),
|
|
109
|
+
])) : (m(), x("div", Gt, [
|
|
110
110
|
T(zt, {
|
|
111
111
|
modelValue: a.value.code,
|
|
112
112
|
"onUpdate:modelValue": i[1] || (i[1] = (u) => a.value.code = u),
|
|
@@ -116,7 +116,7 @@ const tt = [
|
|
|
116
116
|
onAutoSubmit: n.value.action
|
|
117
117
|
}, null, 8, ["modelValue", "onAutoSubmit"])
|
|
118
118
|
])),
|
|
119
|
-
(m(),
|
|
119
|
+
(m(), x("div", {
|
|
120
120
|
key: n.value.button.label,
|
|
121
121
|
class: "space-y-4 w-full"
|
|
122
122
|
}, [
|
|
@@ -134,7 +134,7 @@ const tt = [
|
|
|
134
134
|
]),
|
|
135
135
|
_: 1
|
|
136
136
|
}, 8, ["loading", "disabled", "onClick"]),
|
|
137
|
-
t.value === "code" ? (m(),
|
|
137
|
+
t.value === "code" ? (m(), x("button", {
|
|
138
138
|
key: 0,
|
|
139
139
|
class: "w-full text-xs text-white/50 hover:text-white/70 transition-colors py-2",
|
|
140
140
|
onClick: i[2] || (i[2] = (u) => t.value = "email")
|
|
@@ -396,14 +396,14 @@ const tt = [
|
|
|
396
396
|
}
|
|
397
397
|
H = !1;
|
|
398
398
|
}
|
|
399
|
-
const C = I.length === 0 ? "" : I.length === 1 ? I[0] : n(I).join(":"),
|
|
399
|
+
const C = I.length === 0 ? "" : I.length === 1 ? I[0] : n(I).join(":"), p = U ? C + $e : C, z = p + j;
|
|
400
400
|
if (i.indexOf(z) > -1)
|
|
401
401
|
continue;
|
|
402
402
|
i.push(z);
|
|
403
403
|
const Q = l(j, H);
|
|
404
404
|
for (let Y = 0; Y < Q.length; ++Y) {
|
|
405
405
|
const g = Q[Y];
|
|
406
|
-
i.push(
|
|
406
|
+
i.push(p + g);
|
|
407
407
|
}
|
|
408
408
|
h = w + (h.length > 0 ? " " + h : h);
|
|
409
409
|
}
|
|
@@ -441,14 +441,14 @@ const tt = [
|
|
|
441
441
|
// For example, `hsl(0 0% 0%)` would be classified as a length without this check.
|
|
442
442
|
// I could also use lookbehind assertion in `lengthUnitRegex` but that isn't supported widely enough.
|
|
443
443
|
ir.test(e) && !dr.test(e)
|
|
444
|
-
), "isLengthOnly"), Ie = /* @__PURE__ */ o(() => !1, "isNever"), mr = /* @__PURE__ */ o((e) => cr.test(e), "isShadow"), gr = /* @__PURE__ */ o((e) => ur.test(e), "isImage"), hr = /* @__PURE__ */ o((e) => !d(e) && !c(e), "isAnyNonArbitrary"), fr = /* @__PURE__ */ o((e) => e.startsWith("@container") && (e[10] === "/" && e[11] !== void 0 || e[11] === "s" && e[16] !== void 0 && e.startsWith("-size/", 10) || e[11] === "n" && e[18] !== void 0 && e.startsWith("-normal/", 10)), "isNamedContainerQuery"),
|
|
444
|
+
), "isLengthOnly"), Ie = /* @__PURE__ */ o(() => !1, "isNever"), mr = /* @__PURE__ */ o((e) => cr.test(e), "isShadow"), gr = /* @__PURE__ */ o((e) => ur.test(e), "isImage"), hr = /* @__PURE__ */ o((e) => !d(e) && !c(e), "isAnyNonArbitrary"), fr = /* @__PURE__ */ o((e) => e.startsWith("@container") && (e[10] === "/" && e[11] !== void 0 || e[11] === "s" && e[16] !== void 0 && e.startsWith("-size/", 10) || e[11] === "n" && e[18] !== void 0 && e.startsWith("-normal/", 10)), "isNamedContainerQuery"), xr = /* @__PURE__ */ o((e) => _(e, ut, Ie), "isArbitrarySize"), d = /* @__PURE__ */ o((e) => nt.test(e), "isArbitraryValue"), te = /* @__PURE__ */ o((e) => _(e, bt, br), "isArbitraryLength"), qe = /* @__PURE__ */ o((e) => _(e, Ar, k), "isArbitraryNumber"), pr = /* @__PURE__ */ o((e) => _(e, gt, it), "isArbitraryWeight"), vr = /* @__PURE__ */ o((e) => _(e, mt, Ie), "isArbitraryFamilyName"), De = /* @__PURE__ */ o((e) => _(e, dt, Ie), "isArbitraryPosition"), kr = /* @__PURE__ */ o((e) => _(e, ct, gr), "isArbitraryImage"), ue = /* @__PURE__ */ o((e) => _(e, ht, mr), "isArbitraryShadow"), c = /* @__PURE__ */ o((e) => lt.test(e), "isArbitraryVariable"), se = /* @__PURE__ */ o((e) => re(e, bt), "isArbitraryVariableLength"), yr = /* @__PURE__ */ o((e) => re(e, mt), "isArbitraryVariableFamilyName"), He = /* @__PURE__ */ o((e) => re(e, dt), "isArbitraryVariablePosition"), wr = /* @__PURE__ */ o((e) => re(e, ut), "isArbitraryVariableSize"), Cr = /* @__PURE__ */ o((e) => re(e, ct), "isArbitraryVariableImage"), be = /* @__PURE__ */ o((e) => re(e, ht, !0), "isArbitraryVariableShadow"), zr = /* @__PURE__ */ o((e) => re(e, gt, !0), "isArbitraryVariableWeight"), _ = /* @__PURE__ */ o((e, a, t) => {
|
|
445
445
|
const r = nt.exec(e);
|
|
446
446
|
return r ? r[1] ? a(r[1]) : t(r[2]) : !1;
|
|
447
447
|
}, "getIsArbitraryValue"), re = /* @__PURE__ */ o((e, a, t = !1) => {
|
|
448
448
|
const r = lt.exec(e);
|
|
449
449
|
return r ? r[1] ? a(r[1]) : t : !1;
|
|
450
450
|
}, "getIsArbitraryVariable"), dt = /* @__PURE__ */ o((e) => e === "position" || e === "percentage", "isLabelPosition"), ct = /* @__PURE__ */ o((e) => e === "image" || e === "url", "isLabelImage"), ut = /* @__PURE__ */ o((e) => e === "length" || e === "size" || e === "bg-size", "isLabelSize"), bt = /* @__PURE__ */ o((e) => e === "length", "isLabelLength"), Ar = /* @__PURE__ */ o((e) => e === "number", "isLabelNumber"), mt = /* @__PURE__ */ o((e) => e === "family-name", "isLabelFamilyName"), gt = /* @__PURE__ */ o((e) => e === "number" || e === "weight", "isLabelWeight"), ht = /* @__PURE__ */ o((e) => e === "shadow", "isLabelShadow"), $r = /* @__PURE__ */ o(() => {
|
|
451
|
-
const e = M("color"), a = M("font"), t = M("text"), r = M("font-weight"), l = M("tracking"), n = M("leading"), s = M("breakpoint"), i = M("container"), u = M("spacing"), h = M("radius"), v = M("shadow"), w = M("inset-shadow"), y = M("text-shadow"), I = M("drop-shadow"), U = M("blur"), E = M("perspective"), O = M("aspect"), H = M("ease"), j = M("animate"), C = /* @__PURE__ */ o(() => ["auto", "avoid", "all", "avoid-page", "page", "left", "right", "column"], "scaleBreak"),
|
|
451
|
+
const e = M("color"), a = M("font"), t = M("text"), r = M("font-weight"), l = M("tracking"), n = M("leading"), s = M("breakpoint"), i = M("container"), u = M("spacing"), h = M("radius"), v = M("shadow"), w = M("inset-shadow"), y = M("text-shadow"), I = M("drop-shadow"), U = M("blur"), E = M("perspective"), O = M("aspect"), H = M("ease"), j = M("animate"), C = /* @__PURE__ */ o(() => ["auto", "avoid", "all", "avoid-page", "page", "left", "right", "column"], "scaleBreak"), p = /* @__PURE__ */ o(() => [
|
|
452
452
|
"center",
|
|
453
453
|
"top",
|
|
454
454
|
"bottom",
|
|
@@ -466,13 +466,13 @@ const tt = [
|
|
|
466
466
|
"bottom-left",
|
|
467
467
|
// Deprecated since Tailwind CSS v4.1.0, see https://github.com/tailwindlabs/tailwindcss/pull/17378
|
|
468
468
|
"left-bottom"
|
|
469
|
-
], "scalePosition"), z = /* @__PURE__ */ o(() => [...
|
|
469
|
+
], "scalePosition"), z = /* @__PURE__ */ o(() => [...p(), c, d], "scalePositionWithArbitrary"), Q = /* @__PURE__ */ o(() => ["auto", "hidden", "clip", "visible", "scroll"], "scaleOverflow"), Y = /* @__PURE__ */ o(() => ["auto", "contain", "none"], "scaleOverscroll"), g = /* @__PURE__ */ o(() => [c, d, u], "scaleUnambiguousSpacing"), L = /* @__PURE__ */ o(() => [X, "full", "auto", ...g()], "scaleInset"), Ve = /* @__PURE__ */ o(() => [D, "none", "subgrid", c, d], "scaleGridTemplateColsRows"), Te = /* @__PURE__ */ o(() => ["auto", {
|
|
470
470
|
span: ["full", D, c, d]
|
|
471
|
-
}, D, c, d], "scaleGridColRowStartAndEnd"), ne = /* @__PURE__ */ o(() => [D, "auto", c, d], "scaleGridColRowStartOrEnd"), Ee = /* @__PURE__ */ o(() => ["auto", "min", "max", "fr", c, d], "scaleGridAutoColsRows"), fe = /* @__PURE__ */ o(() => ["start", "end", "center", "between", "around", "evenly", "stretch", "baseline", "center-safe", "end-safe"], "scaleAlignPrimaryAxis"), oe = /* @__PURE__ */ o(() => ["start", "end", "center", "stretch", "center-safe", "end-safe"], "scaleAlignSecondaryAxis"), W = /* @__PURE__ */ o(() => ["auto", ...g()], "scaleMargin"), ee = /* @__PURE__ */ o(() => [X, "auto", "full", "dvw", "dvh", "lvw", "lvh", "svw", "svh", "min", "max", "fit", ...g()], "scaleSizing"),
|
|
471
|
+
}, D, c, d], "scaleGridColRowStartAndEnd"), ne = /* @__PURE__ */ o(() => [D, "auto", c, d], "scaleGridColRowStartOrEnd"), Ee = /* @__PURE__ */ o(() => ["auto", "min", "max", "fr", c, d], "scaleGridAutoColsRows"), fe = /* @__PURE__ */ o(() => ["start", "end", "center", "between", "around", "evenly", "stretch", "baseline", "center-safe", "end-safe"], "scaleAlignPrimaryAxis"), oe = /* @__PURE__ */ o(() => ["start", "end", "center", "stretch", "center-safe", "end-safe"], "scaleAlignSecondaryAxis"), W = /* @__PURE__ */ o(() => ["auto", ...g()], "scaleMargin"), ee = /* @__PURE__ */ o(() => [X, "auto", "full", "dvw", "dvh", "lvw", "lvh", "svw", "svh", "min", "max", "fit", ...g()], "scaleSizing"), xe = /* @__PURE__ */ o(() => [X, "screen", "full", "dvw", "lvw", "svw", "min", "max", "fit", ...g()], "scaleSizingInline"), pe = /* @__PURE__ */ o(() => [X, "screen", "full", "lh", "dvh", "lvh", "svh", "min", "max", "fit", ...g()], "scaleSizingBlock"), f = /* @__PURE__ */ o(() => [e, c, d], "scaleColor"), Oe = /* @__PURE__ */ o(() => [...p(), He, De, {
|
|
472
472
|
position: [c, d]
|
|
473
473
|
}], "scaleBgPosition"), je = /* @__PURE__ */ o(() => ["no-repeat", {
|
|
474
474
|
repeat: ["", "x", "y", "space", "round"]
|
|
475
|
-
}], "scaleBgRepeat"), Be = /* @__PURE__ */ o(() => ["auto", "cover", "contain", wr,
|
|
475
|
+
}], "scaleBgRepeat"), Be = /* @__PURE__ */ o(() => ["auto", "cover", "contain", wr, xr, {
|
|
476
476
|
size: [c, d]
|
|
477
477
|
}], "scaleBgSize"), ve = /* @__PURE__ */ o(() => [Ce, se, te], "scaleGradientStopPosition"), B = /* @__PURE__ */ o(() => [
|
|
478
478
|
// Deprecated since Tailwind CSS v4.0.0
|
|
@@ -1186,42 +1186,42 @@ const tt = [
|
|
|
1186
1186
|
* @see https://tailwindcss.com/docs/width
|
|
1187
1187
|
*/
|
|
1188
1188
|
"inline-size": [{
|
|
1189
|
-
inline: ["auto", ...
|
|
1189
|
+
inline: ["auto", ...xe()]
|
|
1190
1190
|
}],
|
|
1191
1191
|
/**
|
|
1192
1192
|
* Min-Inline Size
|
|
1193
1193
|
* @see https://tailwindcss.com/docs/min-width
|
|
1194
1194
|
*/
|
|
1195
1195
|
"min-inline-size": [{
|
|
1196
|
-
"min-inline": ["auto", ...
|
|
1196
|
+
"min-inline": ["auto", ...xe()]
|
|
1197
1197
|
}],
|
|
1198
1198
|
/**
|
|
1199
1199
|
* Max-Inline Size
|
|
1200
1200
|
* @see https://tailwindcss.com/docs/max-width
|
|
1201
1201
|
*/
|
|
1202
1202
|
"max-inline-size": [{
|
|
1203
|
-
"max-inline": ["none", ...
|
|
1203
|
+
"max-inline": ["none", ...xe()]
|
|
1204
1204
|
}],
|
|
1205
1205
|
/**
|
|
1206
1206
|
* Block Size
|
|
1207
1207
|
* @see https://tailwindcss.com/docs/height
|
|
1208
1208
|
*/
|
|
1209
1209
|
"block-size": [{
|
|
1210
|
-
block: ["auto", ...
|
|
1210
|
+
block: ["auto", ...pe()]
|
|
1211
1211
|
}],
|
|
1212
1212
|
/**
|
|
1213
1213
|
* Min-Block Size
|
|
1214
1214
|
* @see https://tailwindcss.com/docs/min-height
|
|
1215
1215
|
*/
|
|
1216
1216
|
"min-block-size": [{
|
|
1217
|
-
"min-block": ["auto", ...
|
|
1217
|
+
"min-block": ["auto", ...pe()]
|
|
1218
1218
|
}],
|
|
1219
1219
|
/**
|
|
1220
1220
|
* Max-Block Size
|
|
1221
1221
|
* @see https://tailwindcss.com/docs/max-height
|
|
1222
1222
|
*/
|
|
1223
1223
|
"max-block-size": [{
|
|
1224
|
-
"max-block": ["none", ...
|
|
1224
|
+
"max-block": ["none", ...pe()]
|
|
1225
1225
|
}],
|
|
1226
1226
|
/**
|
|
1227
1227
|
* Width
|
|
@@ -1307,7 +1307,7 @@ const tt = [
|
|
|
1307
1307
|
* @see https://tailwindcss.com/docs/font-weight
|
|
1308
1308
|
*/
|
|
1309
1309
|
"font-weight": [{
|
|
1310
|
-
font: [r, zr,
|
|
1310
|
+
font: [r, zr, pr]
|
|
1311
1311
|
}],
|
|
1312
1312
|
/**
|
|
1313
1313
|
* Font Stretch
|
|
@@ -2232,7 +2232,7 @@ const tt = [
|
|
|
2232
2232
|
}]
|
|
2233
2233
|
}],
|
|
2234
2234
|
"mask-image-radial-pos": [{
|
|
2235
|
-
"mask-radial-at":
|
|
2235
|
+
"mask-radial-at": p()
|
|
2236
2236
|
}],
|
|
2237
2237
|
"mask-image-conic-pos": [{
|
|
2238
2238
|
"mask-conic": [k]
|
|
@@ -3429,6 +3429,7 @@ const tt = [
|
|
|
3429
3429
|
size: { default: "md" },
|
|
3430
3430
|
rounding: { default: "full" },
|
|
3431
3431
|
href: {},
|
|
3432
|
+
target: {},
|
|
3432
3433
|
icon: {},
|
|
3433
3434
|
iconAfter: {},
|
|
3434
3435
|
tag: { default: "button" },
|
|
@@ -3477,12 +3478,14 @@ const tt = [
|
|
|
3477
3478
|
}));
|
|
3478
3479
|
return (u, h) => (m(), N(vt(r.value), {
|
|
3479
3480
|
href: e.disabled ? void 0 : e.href,
|
|
3481
|
+
target: e.href && !e.disabled ? e.target : void 0,
|
|
3482
|
+
rel: e.href && e.target === "_blank" ? "noopener noreferrer" : void 0,
|
|
3480
3483
|
disabled: e.disabled || void 0,
|
|
3481
3484
|
"aria-disabled": e.disabled || void 0,
|
|
3482
3485
|
class: $(s.value)
|
|
3483
3486
|
}, {
|
|
3484
3487
|
default: F(() => [
|
|
3485
|
-
e.loading ? (m(),
|
|
3488
|
+
e.loading ? (m(), x("div", Mr, [
|
|
3486
3489
|
T(_e, {
|
|
3487
3490
|
class: $(l.value)
|
|
3488
3491
|
}, null, 8, ["class"])
|
|
@@ -3490,19 +3493,19 @@ const tt = [
|
|
|
3490
3493
|
b("span", {
|
|
3491
3494
|
class: $(["flex items-center gap-2 transition-opacity duration-200 whitespace-nowrap", e.loading ? "opacity-0" : "opacity-100"])
|
|
3492
3495
|
}, [
|
|
3493
|
-
a.value ? (m(),
|
|
3496
|
+
a.value ? (m(), x("span", {
|
|
3494
3497
|
key: 0,
|
|
3495
3498
|
class: $(["flex items-center size-[1.1em] mt-[-.07em]", [a.value, i.value.design]])
|
|
3496
3499
|
}, null, 2)) : S("", !0),
|
|
3497
3500
|
me(u.$slots, "default"),
|
|
3498
|
-
t.value ? (m(),
|
|
3501
|
+
t.value ? (m(), x("span", {
|
|
3499
3502
|
key: 1,
|
|
3500
3503
|
class: $(["flex items-center size-[1.1em] mt-[-.07em]", [t.value, i.value.design]])
|
|
3501
3504
|
}, null, 2)) : S("", !0)
|
|
3502
3505
|
], 2)
|
|
3503
3506
|
]),
|
|
3504
3507
|
_: 3
|
|
3505
|
-
}, 8, ["href", "disabled", "aria-disabled", "class"]));
|
|
3508
|
+
}, 8, ["href", "target", "rel", "disabled", "aria-disabled", "class"]));
|
|
3506
3509
|
}
|
|
3507
3510
|
}), Ir = { class: "flex-1 flex flex-col min-h-0 py-6 space-y-6 h-full overflow-scroll [scrollbar-width:none] [-ms-overflow-style:none] [&::-webkit-scrollbar]:hidden relative" }, Vr = { class: "flex-1 space-y-6 pb-12" }, Tr = {
|
|
3508
3511
|
key: 0,
|
|
@@ -3523,24 +3526,24 @@ const tt = [
|
|
|
3523
3526
|
isOnline: { type: Boolean, default: !1 }
|
|
3524
3527
|
},
|
|
3525
3528
|
setup(e) {
|
|
3526
|
-
return (a, t) => (m(),
|
|
3529
|
+
return (a, t) => (m(), x("div", Ir, [
|
|
3527
3530
|
T(et, {
|
|
3528
3531
|
agent: e.agent,
|
|
3529
3532
|
"is-online": e.isOnline
|
|
3530
3533
|
}, null, 8, ["agent", "is-online"]),
|
|
3531
3534
|
b("div", Vr, [
|
|
3532
|
-
e.agent.summary.value ? (m(),
|
|
3535
|
+
e.agent.summary.value ? (m(), x("div", Tr, [
|
|
3533
3536
|
t[0] || (t[0] = b("h3", { class: "font-medium text-white/50" }, " About ", -1)),
|
|
3534
3537
|
b("div", {
|
|
3535
3538
|
class: "text-white/70 leading-relaxed",
|
|
3536
3539
|
innerHTML: e.agent.summary.value
|
|
3537
3540
|
}, null, 8, Er)
|
|
3538
3541
|
])) : S("", !0),
|
|
3539
|
-
e.agent.entityType.value === "company" ? (m(),
|
|
3542
|
+
e.agent.entityType.value === "company" ? (m(), x("div", Or, [
|
|
3540
3543
|
t[1] || (t[1] = b("h3", { class: "text-sm font-medium text-white/90 mb-2" }, " Company Info ", -1)),
|
|
3541
3544
|
b("p", jr, " This is a company agent representing " + P(e.agent.name.value) + ". ", 1)
|
|
3542
3545
|
])) : S("", !0),
|
|
3543
|
-
e.agent.email.value ? (m(),
|
|
3546
|
+
e.agent.email.value ? (m(), x("div", Br, [
|
|
3544
3547
|
t[3] || (t[3] = b("h3", { class: "text-sm font-medium text-white/90" }, " Contact ", -1)),
|
|
3545
3548
|
T(Ke, {
|
|
3546
3549
|
design: "ghost",
|
|
@@ -3557,10 +3560,10 @@ const tt = [
|
|
|
3557
3560
|
_: 1
|
|
3558
3561
|
}, 8, ["href"])
|
|
3559
3562
|
])) : S("", !0),
|
|
3560
|
-
e.agent.accounts.value && e.agent.accounts.value.length > 0 ? (m(),
|
|
3563
|
+
e.agent.accounts.value && e.agent.accounts.value.length > 0 ? (m(), x("div", Gr, [
|
|
3561
3564
|
t[4] || (t[4] = b("h3", { class: "text-sm font-medium text-white/90" }, " Links ", -1)),
|
|
3562
3565
|
b("div", Rr, [
|
|
3563
|
-
(m(!0),
|
|
3566
|
+
(m(!0), x(Z, null, Se(e.agent.accounts.value, (r) => (m(), N(Ke, {
|
|
3564
3567
|
key: `${r.platform}-${r.handle}`,
|
|
3565
3568
|
design: "ghost",
|
|
3566
3569
|
theme: "default",
|
|
@@ -3590,7 +3593,7 @@ const tt = [
|
|
|
3590
3593
|
isOnline: { type: Boolean, default: !1 }
|
|
3591
3594
|
},
|
|
3592
3595
|
setup(e) {
|
|
3593
|
-
return (a, t) => (m(),
|
|
3596
|
+
return (a, t) => (m(), x("div", Lr, [
|
|
3594
3597
|
b("div", Nr, [
|
|
3595
3598
|
b("div", Ur, [
|
|
3596
3599
|
b("img", {
|
|
@@ -3602,13 +3605,13 @@ const tt = [
|
|
|
3602
3605
|
}, null, 40, Wr)
|
|
3603
3606
|
]),
|
|
3604
3607
|
b("div", Fr, [
|
|
3605
|
-
e.isOnline ? (m(),
|
|
3608
|
+
e.isOnline ? (m(), x(Z, { key: 0 }, [
|
|
3606
3609
|
t[1] || (t[1] = b("div", {
|
|
3607
3610
|
class: "size-4 bg-green-500 rounded-full ring-2 ring-white absolute animate-ping",
|
|
3608
3611
|
style: { "animation-duration": "3s" }
|
|
3609
3612
|
}, null, -1)),
|
|
3610
3613
|
t[2] || (t[2] = b("div", { class: "size-4 bg-green-500 rounded-full ring-2 ring-white" }, null, -1))
|
|
3611
|
-
], 64)) : (m(),
|
|
3614
|
+
], 64)) : (m(), x("div", qr))
|
|
3612
3615
|
])
|
|
3613
3616
|
]),
|
|
3614
3617
|
b("div", Dr, [
|
|
@@ -3627,7 +3630,7 @@ const tt = [
|
|
|
3627
3630
|
setTimeout(() => {
|
|
3628
3631
|
a.value = !0;
|
|
3629
3632
|
}, 100);
|
|
3630
|
-
}), (t, r) => (m(),
|
|
3633
|
+
}), (t, r) => (m(), x("a", {
|
|
3631
3634
|
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",
|
|
3632
3635
|
onClick: r[0] || (r[0] = (l) => t.$emit("click", l))
|
|
3633
3636
|
}, [
|
|
@@ -3685,7 +3688,7 @@ const tt = [
|
|
|
3685
3688
|
position: "justify-end",
|
|
3686
3689
|
closeButton: "-left-16"
|
|
3687
3690
|
});
|
|
3688
|
-
return (v, w) => (m(),
|
|
3691
|
+
return (v, w) => (m(), x(Z, null, [
|
|
3689
3692
|
T(Pe, {
|
|
3690
3693
|
"enter-active-class": "transition-opacity duration-300 ease-out",
|
|
3691
3694
|
"leave-active-class": "transition-opacity duration-200 ease-in",
|
|
@@ -3695,7 +3698,7 @@ const tt = [
|
|
|
3695
3698
|
"leave-to-class": "opacity-0"
|
|
3696
3699
|
}, {
|
|
3697
3700
|
default: F(() => [
|
|
3698
|
-
s.value ? (m(),
|
|
3701
|
+
s.value ? (m(), x("div", {
|
|
3699
3702
|
key: 0,
|
|
3700
3703
|
class: "absolute inset-0 z-40 bg-black/50 backdrop-blur-sm",
|
|
3701
3704
|
onClick: w[0] || (w[0] = (y) => s.value = !1)
|
|
@@ -3712,7 +3715,7 @@ const tt = [
|
|
|
3712
3715
|
"leave-to-class": h.value.leave
|
|
3713
3716
|
}, {
|
|
3714
3717
|
default: F(() => [
|
|
3715
|
-
s.value ? (m(),
|
|
3718
|
+
s.value ? (m(), x("div", {
|
|
3716
3719
|
key: 0,
|
|
3717
3720
|
class: $(["absolute inset-0 z-50 flex", h.value.position]),
|
|
3718
3721
|
onClick: w[3] || (w[3] = (y) => s.value = !1)
|
|
@@ -3726,10 +3729,10 @@ const tt = [
|
|
|
3726
3729
|
class: $(["absolute top-4 z-10 text-white", h.value.closeButton]),
|
|
3727
3730
|
onClick: w[1] || (w[1] = (y) => s.value = !1)
|
|
3728
3731
|
}, null, 8, ["class"]),
|
|
3729
|
-
e.title ? (m(),
|
|
3732
|
+
e.title ? (m(), x("div", Jr, [
|
|
3730
3733
|
b("h3", Zr, P(e.title), 1)
|
|
3731
3734
|
])) : S("", !0),
|
|
3732
|
-
v.$slots.header ? (m(),
|
|
3735
|
+
v.$slots.header ? (m(), x("div", _r, [
|
|
3733
3736
|
me(v.$slots, "header")
|
|
3734
3737
|
])) : S("", !0),
|
|
3735
3738
|
b("div", {
|
|
@@ -3744,7 +3747,7 @@ const tt = [
|
|
|
3744
3747
|
"leave-to-class": R(l) === "left" ? "-translate-x-4 opacity-0" : "translate-x-4 opacity-0"
|
|
3745
3748
|
}, {
|
|
3746
3749
|
default: F(() => [
|
|
3747
|
-
(m(!0),
|
|
3750
|
+
(m(!0), x(Z, null, Se(i.value, (y, I) => (m(), x("button", {
|
|
3748
3751
|
key: y.key || y.label || I,
|
|
3749
3752
|
style: Je({ transitionDelay: `${I * 40}ms` }),
|
|
3750
3753
|
class: $(["cursor-pointer w-full text-left p-3 rounded-xl transition-all duration-200 ease-[cubic-bezier(0.25,1,0.33,1)] group", [
|
|
@@ -3755,7 +3758,7 @@ const tt = [
|
|
|
3755
3758
|
onClick: /* @__PURE__ */ o((U) => u(y), "onClick")
|
|
3756
3759
|
}, [
|
|
3757
3760
|
b("div", to, [
|
|
3758
|
-
y.icon?.src ? (m(),
|
|
3761
|
+
y.icon?.src ? (m(), x("i", {
|
|
3759
3762
|
key: 0,
|
|
3760
3763
|
class: $(["size-5 flex-shrink-0 transition-transform duration-200 ease-[cubic-bezier(0.25,1,0.33,1)] group-hover:scale-110", [
|
|
3761
3764
|
y.icon.src,
|
|
@@ -3766,7 +3769,7 @@ const tt = [
|
|
|
3766
3769
|
b("div", {
|
|
3767
3770
|
class: $(["font-medium text-sm", y.isActive ? "text-primary-300" : "text-white"])
|
|
3768
3771
|
}, P(y.label), 3),
|
|
3769
|
-
y.subLabel ? (m(),
|
|
3772
|
+
y.subLabel ? (m(), x("div", oo, P(y.subLabel), 1)) : S("", !0)
|
|
3770
3773
|
])
|
|
3771
3774
|
])
|
|
3772
3775
|
], 14, eo))), 128))
|
|
@@ -3887,10 +3890,10 @@ const tt = [
|
|
|
3887
3890
|
}, ho = { class: "text-sm" }, fo = {
|
|
3888
3891
|
key: 0,
|
|
3889
3892
|
class: "flex-1 basis-0 flex justify-end"
|
|
3890
|
-
},
|
|
3893
|
+
}, xo = {
|
|
3891
3894
|
key: 0,
|
|
3892
3895
|
class: "flex-1 flex flex-col relative z-20 min-h-0 w-full px-4"
|
|
3893
|
-
},
|
|
3896
|
+
}, po = { class: "flex-1 min-h-0 max-w-md mx-auto w-full" }, vo = {
|
|
3894
3897
|
key: 0,
|
|
3895
3898
|
class: "h-full pb-12 flex-1 flex flex-col relative z-20 min-h-0 px-4 @[480px]/agent:px-6 max-w-md mx-auto w-full"
|
|
3896
3899
|
}, ko = { class: "flex-1 basis-0 flex flex-col justify-start pt-8 gap-7" }, yo = {
|
|
@@ -3944,8 +3947,8 @@ const tt = [
|
|
|
3944
3947
|
function I(C) {
|
|
3945
3948
|
if (!i.value)
|
|
3946
3949
|
return;
|
|
3947
|
-
const
|
|
3948
|
-
Object.entries(
|
|
3950
|
+
const p = Mt(C);
|
|
3951
|
+
Object.entries(p).forEach(([z, Q]) => {
|
|
3949
3952
|
i.value.style.setProperty(`--primary-${z}`, Q);
|
|
3950
3953
|
});
|
|
3951
3954
|
}
|
|
@@ -3953,15 +3956,15 @@ const tt = [
|
|
|
3953
3956
|
try {
|
|
3954
3957
|
y(), I(e.theme), e.chatOnly && r.value && r.value.setMode("chat");
|
|
3955
3958
|
} catch (C) {
|
|
3956
|
-
const
|
|
3957
|
-
s.value =
|
|
3959
|
+
const p = C instanceof Error ? C.message : "Couldn't initialize your assistant";
|
|
3960
|
+
s.value = p, t("error", p);
|
|
3958
3961
|
}
|
|
3959
3962
|
}), yt(() => {
|
|
3960
3963
|
r.value && r.value.destroy();
|
|
3961
3964
|
}), ze(() => e.theme, (C) => {
|
|
3962
3965
|
I(C);
|
|
3963
|
-
}), ze(() => e.sdk.activeUser.value, (C,
|
|
3964
|
-
|
|
3966
|
+
}), ze(() => e.sdk.activeUser.value, (C, p) => {
|
|
3967
|
+
p && !C && r.value && r.value.setMode("self");
|
|
3965
3968
|
});
|
|
3966
3969
|
const U = A(() => !!(e.agent.cover.value?.src && e.agent.cover.value?.quality === "low") || !!(e.agent.avatar.value?.src && e.agent.avatar.value?.quality === "low")), E = A(() => {
|
|
3967
3970
|
const C = [U.value ? "backdrop-blur-sm" : ""];
|
|
@@ -3976,16 +3979,16 @@ const tt = [
|
|
|
3976
3979
|
template: e.buttonText || "Talk to {name}",
|
|
3977
3980
|
agent: e.agent.toConfig()
|
|
3978
3981
|
})), j = A(() => O[e.buttonIcon || "phone"] || O.phone);
|
|
3979
|
-
return (C,
|
|
3982
|
+
return (C, p) => (m(), x("div", {
|
|
3980
3983
|
ref_key: "rootElement",
|
|
3981
3984
|
ref: i,
|
|
3982
3985
|
key: R(ye)(e.agent.toConfig()),
|
|
3983
3986
|
class: "pagelines-sdk @container/agent pagelines-agent w-full h-full overflow-hidden relative",
|
|
3984
3987
|
"data-test": "agent-chat"
|
|
3985
3988
|
}, [
|
|
3986
|
-
e.loading ? (m(),
|
|
3989
|
+
e.loading ? (m(), x("div", lo, [
|
|
3987
3990
|
T(_e, { class: "text-white size-8" })
|
|
3988
|
-
])) : e.agent && !s.value ? (m(),
|
|
3991
|
+
])) : e.agent && !s.value ? (m(), x("div", {
|
|
3989
3992
|
key: 1,
|
|
3990
3993
|
class: "absolute inset-0 bg-cover bg-center bg-no-repeat",
|
|
3991
3994
|
style: Je({ backgroundImage: `url(${R(ye)(e.agent.toConfig())})` }),
|
|
@@ -4000,7 +4003,7 @@ const tt = [
|
|
|
4000
4003
|
b("div", {
|
|
4001
4004
|
class: $(["relative z-30 p-2", u.value !== "self" ? "backdrop-blur-lg" : ""])
|
|
4002
4005
|
}, [
|
|
4003
|
-
e.chatOnly ? (m(),
|
|
4006
|
+
e.chatOnly ? (m(), x("div", co, [
|
|
4004
4007
|
b("div", uo, [
|
|
4005
4008
|
b("img", {
|
|
4006
4009
|
src: R(ye)(e.agent.toConfig()),
|
|
@@ -4009,15 +4012,15 @@ const tt = [
|
|
|
4009
4012
|
}, null, 8, bo),
|
|
4010
4013
|
b("span", mo, P(e.agent.displayName.value), 1)
|
|
4011
4014
|
]),
|
|
4012
|
-
e.hasClose ? (m(),
|
|
4015
|
+
e.hasClose ? (m(), x("div", go, [
|
|
4013
4016
|
b("button", {
|
|
4014
4017
|
class: "cursor-pointer flex items-center p-3 rounded-2xl text-white/70 hover:bg-white/10 transition-colors",
|
|
4015
|
-
onClick:
|
|
4016
|
-
}, [...
|
|
4018
|
+
onClick: p[0] || (p[0] = Ae((z) => t("close", "button"), ["stop"]))
|
|
4019
|
+
}, [...p[7] || (p[7] = [
|
|
4017
4020
|
b("i", { class: "size-6 i-tabler-x" }, null, -1)
|
|
4018
4021
|
])])
|
|
4019
4022
|
])) : S("", !0)
|
|
4020
|
-
])) : (m(),
|
|
4023
|
+
])) : (m(), x("div", {
|
|
4021
4024
|
key: 1,
|
|
4022
4025
|
class: $(["flex items-center", e.hasClose ? "" : "justify-between"])
|
|
4023
4026
|
}, [
|
|
@@ -4026,41 +4029,41 @@ const tt = [
|
|
|
4026
4029
|
}, [
|
|
4027
4030
|
b("button", {
|
|
4028
4031
|
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",
|
|
4029
|
-
onClick:
|
|
4030
|
-
}, [...
|
|
4032
|
+
onClick: p[1] || (p[1] = (z) => l.value = !0)
|
|
4033
|
+
}, [...p[8] || (p[8] = [
|
|
4031
4034
|
b("i", { class: "i-tabler-menu size-7" }, null, -1)
|
|
4032
4035
|
])])
|
|
4033
4036
|
], 2),
|
|
4034
4037
|
b("button", {
|
|
4035
4038
|
class: $(["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": n.value }]),
|
|
4036
|
-
onClick:
|
|
4039
|
+
onClick: p[2] || (p[2] = (z) => n.value = !0)
|
|
4037
4040
|
}, [
|
|
4038
4041
|
b("i", {
|
|
4039
4042
|
class: $([w.value?.icon, "size-4 opacity-60"])
|
|
4040
4043
|
}, null, 2),
|
|
4041
4044
|
b("span", ho, P(w.value?.label), 1),
|
|
4042
|
-
|
|
4045
|
+
p[9] || (p[9] = b("i", { class: "i-tabler-chevron-down size-4" }, null, -1))
|
|
4043
4046
|
], 2),
|
|
4044
|
-
e.hasClose ? (m(),
|
|
4047
|
+
e.hasClose ? (m(), x("div", fo, [
|
|
4045
4048
|
b("button", {
|
|
4046
4049
|
class: "cursor-pointer flex items-center p-3 rounded-2xl text-white/70 hover:bg-white/10 transition-colors",
|
|
4047
|
-
onClick:
|
|
4048
|
-
}, [...
|
|
4050
|
+
onClick: p[3] || (p[3] = Ae((z) => t("close", "button"), ["stop"]))
|
|
4051
|
+
}, [...p[10] || (p[10] = [
|
|
4049
4052
|
b("i", { class: "size-6 i-tabler-x" }, null, -1)
|
|
4050
4053
|
])])
|
|
4051
4054
|
])) : S("", !0)
|
|
4052
4055
|
], 2))
|
|
4053
4056
|
], 2),
|
|
4054
|
-
e.chatOnly ? (m(),
|
|
4055
|
-
b("div",
|
|
4057
|
+
e.chatOnly ? (m(), x("div", xo, [
|
|
4058
|
+
b("div", po, [
|
|
4056
4059
|
T(we, {
|
|
4057
4060
|
"chat-controller": r.value,
|
|
4058
4061
|
agent: e.agent
|
|
4059
4062
|
}, null, 8, ["chat-controller", "agent"])
|
|
4060
4063
|
])
|
|
4061
|
-
])) : (m(),
|
|
4062
|
-
u.value === "self" ? (m(),
|
|
4063
|
-
|
|
4064
|
+
])) : (m(), x(Z, { key: 1 }, [
|
|
4065
|
+
u.value === "self" ? (m(), x("div", vo, [
|
|
4066
|
+
p[11] || (p[11] = b("div", { class: "flex-1 basis-0 mb-12" }, null, -1)),
|
|
4064
4067
|
T(Kr, {
|
|
4065
4068
|
agent: e.agent,
|
|
4066
4069
|
"is-online": h.value
|
|
@@ -4072,15 +4075,15 @@ const tt = [
|
|
|
4072
4075
|
class: "w-full",
|
|
4073
4076
|
icon: j.value,
|
|
4074
4077
|
"data-test": "voice-button",
|
|
4075
|
-
onClick:
|
|
4078
|
+
onClick: p[4] || (p[4] = (z) => r.value?.setMode("talk"))
|
|
4076
4079
|
}, {
|
|
4077
4080
|
default: F(() => [
|
|
4078
4081
|
ge(P(H.value), 1)
|
|
4079
4082
|
]),
|
|
4080
4083
|
_: 1
|
|
4081
4084
|
}, 8, ["icon"]),
|
|
4082
|
-
e.agent.accounts.value && e.agent.accounts.value.length > 0 ? (m(),
|
|
4083
|
-
(m(!0),
|
|
4085
|
+
e.agent.accounts.value && e.agent.accounts.value.length > 0 ? (m(), x("div", yo, [
|
|
4086
|
+
(m(!0), x(Z, null, Se((e.agent.accounts.value || []).filter((z) => R(ae)[z.platform]), (z) => (m(), x("a", {
|
|
4084
4087
|
key: `${z.platform}-${z.handle}`,
|
|
4085
4088
|
href: R(ae)[z.platform].getUrl(z.handle),
|
|
4086
4089
|
target: "_blank",
|
|
@@ -4092,11 +4095,11 @@ const tt = [
|
|
|
4092
4095
|
], 8, wo))), 128))
|
|
4093
4096
|
])) : S("", !0)
|
|
4094
4097
|
])
|
|
4095
|
-
])) : u.value === "talk" ? (m(),
|
|
4098
|
+
])) : u.value === "talk" ? (m(), x("div", Co, [
|
|
4096
4099
|
e.requireAuth && !v.value ? (m(), N(Ne, {
|
|
4097
4100
|
key: 0,
|
|
4098
4101
|
sdk: e.sdk
|
|
4099
|
-
}, null, 8, ["sdk"])) : (m(),
|
|
4102
|
+
}, null, 8, ["sdk"])) : (m(), x(Z, { key: 1 }, [
|
|
4100
4103
|
b("div", null, [
|
|
4101
4104
|
b("div", zo, [
|
|
4102
4105
|
T(et, {
|
|
@@ -4110,9 +4113,9 @@ const tt = [
|
|
|
4110
4113
|
agent: e.agent
|
|
4111
4114
|
}, null, 8, ["chat-controller", "agent"])
|
|
4112
4115
|
], 64))
|
|
4113
|
-
])) : (m(),
|
|
4116
|
+
])) : (m(), x("div", Ao, [
|
|
4114
4117
|
b("div", $o, [
|
|
4115
|
-
u.value === "chat" ? (m(),
|
|
4118
|
+
u.value === "chat" ? (m(), x(Z, { key: 0 }, [
|
|
4116
4119
|
e.requireAuth && !v.value ? (m(), N(Ne, {
|
|
4117
4120
|
key: 0,
|
|
4118
4121
|
sdk: e.sdk
|
|
@@ -4130,21 +4133,21 @@ const tt = [
|
|
|
4130
4133
|
]))
|
|
4131
4134
|
], 64))
|
|
4132
4135
|
], 2)
|
|
4133
|
-
], 12, io)) : s.value ? (m(),
|
|
4136
|
+
], 12, io)) : s.value ? (m(), x("div", So, [
|
|
4134
4137
|
b("div", Mo, [
|
|
4135
|
-
|
|
4138
|
+
p[12] || (p[12] = b("div", { class: "flex justify-center" }, [
|
|
4136
4139
|
b("div", { class: "rounded-full bg-red-500/20 flex items-center justify-center size-10" }, [
|
|
4137
4140
|
b("i", { class: "i-tabler-alert-circle size-6 text-red-400" })
|
|
4138
4141
|
])
|
|
4139
4142
|
], -1)),
|
|
4140
|
-
|
|
4143
|
+
p[13] || (p[13] = b("h3", { class: "text-lg font-medium" }, " Agent Error ", -1)),
|
|
4141
4144
|
b("p", Io, P(s.value), 1)
|
|
4142
4145
|
])
|
|
4143
|
-
])) : (m(),
|
|
4146
|
+
])) : (m(), x("div", Vo, " Couldn't load your assistant. Please try again later. ")),
|
|
4144
4147
|
e.chatOnly ? S("", !0) : (m(), N(no, {
|
|
4145
4148
|
key: 4,
|
|
4146
4149
|
modelValue: l.value,
|
|
4147
|
-
"onUpdate:modelValue":
|
|
4150
|
+
"onUpdate:modelValue": p[5] || (p[5] = (z) => l.value = z),
|
|
4148
4151
|
agent: e.agent,
|
|
4149
4152
|
sdk: e.sdk,
|
|
4150
4153
|
title: e.agent.displayName.value,
|
|
@@ -4153,7 +4156,7 @@ const tt = [
|
|
|
4153
4156
|
e.chatOnly ? S("", !0) : (m(), N(so, {
|
|
4154
4157
|
key: 5,
|
|
4155
4158
|
modelValue: n.value,
|
|
4156
|
-
"onUpdate:modelValue":
|
|
4159
|
+
"onUpdate:modelValue": p[6] || (p[6] = (z) => n.value = z),
|
|
4157
4160
|
"chat-controller": r.value,
|
|
4158
4161
|
"data-test": "agent-mode-sidebar"
|
|
4159
4162
|
}, null, 8, ["modelValue", "chat-controller"]))
|