@8wave/ai-elements 0.114.0-beta.7 → 0.114.0-beta.8
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/ai-elements.es.js +545 -556
- package/dist/ai-elements.es.js.map +1 -1
- package/dist-vue/apps/web-component/src/composables/useChatbotAuth.d.ts +1 -3
- package/dist-vue/composables.js +77 -88
- package/dist-vue/composables.js.map +1 -1
- package/dist-vue/index.js +2 -2
- package/dist-vue/packages/auth/src/social-redirect-plugin.d.ts +18 -12
- package/package.json +1 -1
package/dist/ai-elements.es.js
CHANGED
|
@@ -9228,35 +9228,21 @@ function Ad() {
|
|
|
9228
9228
|
return { emit: n };
|
|
9229
9229
|
}
|
|
9230
9230
|
//#endregion
|
|
9231
|
-
//#region ../../packages/auth/src/social-redirect-client-plugin.ts
|
|
9232
|
-
function jd() {
|
|
9233
|
-
return {
|
|
9234
|
-
id: "social-redirect",
|
|
9235
|
-
getActions: (e, t, n) => ({ signIn: { socialRedirect: (e) => {
|
|
9236
|
-
let t = n?.baseURL ?? "", r = n?.basePath ?? "auth", i = new URLSearchParams({
|
|
9237
|
-
provider: e.provider,
|
|
9238
|
-
callbackURL: e.callbackURL
|
|
9239
|
-
});
|
|
9240
|
-
return e.errorCallbackURL && i.set("errorCallbackURL", e.errorCallbackURL), `${t}/${r}/sign-in/social-redirect?${i}`;
|
|
9241
|
-
} } })
|
|
9242
|
-
};
|
|
9243
|
-
}
|
|
9244
|
-
//#endregion
|
|
9245
9231
|
//#region ../../node_modules/.pnpm/better-auth@1.7.6_@opentelemetry+api@1.9.1_drizzle-kit@0.31.11_drizzle-orm@0.45.3_@open_278cdd289b4d3ad668620afc70e58472/node_modules/better-auth/dist/utils/url.mjs
|
|
9246
|
-
var
|
|
9247
|
-
function
|
|
9232
|
+
var jd = 47;
|
|
9233
|
+
function Md(e) {
|
|
9248
9234
|
let t = e.length;
|
|
9249
|
-
for (; t > 0 && e.charCodeAt(t - 1) ===
|
|
9235
|
+
for (; t > 0 && e.charCodeAt(t - 1) === jd;) t--;
|
|
9250
9236
|
return t === e.length ? e : e.slice(0, t);
|
|
9251
9237
|
}
|
|
9252
|
-
function
|
|
9238
|
+
function Nd(e) {
|
|
9253
9239
|
try {
|
|
9254
|
-
return (
|
|
9240
|
+
return (Md(new URL(e).pathname) || "/") !== "/";
|
|
9255
9241
|
} catch {
|
|
9256
9242
|
throw new ao(`Invalid base URL: ${e}. Please provide a valid base URL.`);
|
|
9257
9243
|
}
|
|
9258
9244
|
}
|
|
9259
|
-
function
|
|
9245
|
+
function Pd(e) {
|
|
9260
9246
|
try {
|
|
9261
9247
|
let t = new URL(e);
|
|
9262
9248
|
if (t.protocol !== "http:" && t.protocol !== "https:") throw new ao(`Invalid base URL: ${e}. URL must include 'http://' or 'https://'`);
|
|
@@ -9264,12 +9250,12 @@ function Fd(e) {
|
|
|
9264
9250
|
throw t instanceof ao ? t : new ao(`Invalid base URL: ${e}. Please provide a valid base URL.`, { cause: t });
|
|
9265
9251
|
}
|
|
9266
9252
|
}
|
|
9267
|
-
function
|
|
9268
|
-
if (
|
|
9269
|
-
let n =
|
|
9253
|
+
function Fd(e, t = "/api/auth") {
|
|
9254
|
+
if (Pd(e), Nd(e)) return e;
|
|
9255
|
+
let n = Md(e);
|
|
9270
9256
|
return !t || t === "/" ? n : (t = t.startsWith("/") ? t : `/${t}`, `${n}${t}`);
|
|
9271
9257
|
}
|
|
9272
|
-
function
|
|
9258
|
+
function Id(e, t) {
|
|
9273
9259
|
return !e || e.trim() === "" ? !1 : t === "proto" ? e === "http" || e === "https" : t === "host" ? [
|
|
9274
9260
|
/\.\./,
|
|
9275
9261
|
/\0/,
|
|
@@ -9281,24 +9267,24 @@ function Ld(e, t) {
|
|
|
9281
9267
|
/data:/i
|
|
9282
9268
|
].some((t) => t.test(e)) ? !1 : /^[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])?)*(:[0-9]{1,5})?$/.test(e) || /^(\d{1,3}\.){3}\d{1,3}(:[0-9]{1,5})?$/.test(e) || /^\[[0-9a-fA-F:]+\](:[0-9]{1,5})?$/.test(e) || /^localhost(:[0-9]{1,5})?$/i.test(e) : !1;
|
|
9283
9269
|
}
|
|
9284
|
-
function
|
|
9285
|
-
if (e) return
|
|
9270
|
+
function Ld(e, t, n, r, i) {
|
|
9271
|
+
if (e) return Fd(e, t);
|
|
9286
9272
|
if (r !== !1) {
|
|
9287
9273
|
let e = xo.BETTER_AUTH_URL || xo.NEXT_PUBLIC_BETTER_AUTH_URL || xo.PUBLIC_BETTER_AUTH_URL || xo.NUXT_PUBLIC_BETTER_AUTH_URL || xo.NUXT_PUBLIC_AUTH_URL || (xo.BASE_URL === "/" ? void 0 : xo.BASE_URL);
|
|
9288
|
-
if (e) return
|
|
9274
|
+
if (e) return Fd(e, t);
|
|
9289
9275
|
}
|
|
9290
9276
|
let a = n?.headers.get("x-forwarded-host"), o = n?.headers.get("x-forwarded-proto");
|
|
9291
|
-
if (a && o && i &&
|
|
9292
|
-
return
|
|
9277
|
+
if (a && o && i && Id(o, "proto") && Id(a, "host")) try {
|
|
9278
|
+
return Fd(`${o}://${a}`, t);
|
|
9293
9279
|
} catch {}
|
|
9294
9280
|
if (n) {
|
|
9295
|
-
let e =
|
|
9281
|
+
let e = Rd(n.url);
|
|
9296
9282
|
if (!e) throw new ao("Could not get origin from request. Please provide a valid base URL.");
|
|
9297
|
-
return
|
|
9283
|
+
return Fd(e, t);
|
|
9298
9284
|
}
|
|
9299
|
-
if (typeof window < "u" && window.location) return
|
|
9285
|
+
if (typeof window < "u" && window.location) return Fd(window.location.origin, t);
|
|
9300
9286
|
}
|
|
9301
|
-
function
|
|
9287
|
+
function Rd(e) {
|
|
9302
9288
|
try {
|
|
9303
9289
|
let t = new URL(e);
|
|
9304
9290
|
return t.origin === "null" ? null : t.origin;
|
|
@@ -9308,12 +9294,12 @@ function zd(e) {
|
|
|
9308
9294
|
}
|
|
9309
9295
|
//#endregion
|
|
9310
9296
|
//#region ../../node_modules/.pnpm/better-auth@1.7.6_@opentelemetry+api@1.9.1_drizzle-kit@0.31.11_drizzle-orm@0.45.3_@open_278cdd289b4d3ad668620afc70e58472/node_modules/better-auth/dist/client/parser.mjs
|
|
9311
|
-
var
|
|
9297
|
+
var zd = {
|
|
9312
9298
|
proto: /"(?:_|\\u0{2}5[Ff]){2}(?:p|\\u0{2}70)(?:r|\\u0{2}72)(?:o|\\u0{2}6[Ff])(?:t|\\u0{2}74)(?:o|\\u0{2}6[Ff])(?:_|\\u0{2}5[Ff]){2}"\s*:/,
|
|
9313
9299
|
constructor: /"(?:c|\\u0063)(?:o|\\u006[Ff])(?:n|\\u006[Ee])(?:s|\\u0073)(?:t|\\u0074)(?:r|\\u0072)(?:u|\\u0075)(?:c|\\u0063)(?:t|\\u0074)(?:o|\\u006[Ff])(?:r|\\u0072)"\s*:/,
|
|
9314
9300
|
protoShort: /"__proto__"\s*:/,
|
|
9315
9301
|
constructorShort: /"constructor"\s*:/
|
|
9316
|
-
},
|
|
9302
|
+
}, Bd = /^\s*["[{]|^\s*-?\d{1,16}(\.\d{1,17})?([Ee][+-]?\d+)?\s*$/, Vd = {
|
|
9317
9303
|
true: !0,
|
|
9318
9304
|
false: !1,
|
|
9319
9305
|
null: null,
|
|
@@ -9321,30 +9307,30 @@ var Bd = {
|
|
|
9321
9307
|
nan: NaN,
|
|
9322
9308
|
infinity: Infinity,
|
|
9323
9309
|
"-infinity": -Infinity
|
|
9324
|
-
},
|
|
9325
|
-
function
|
|
9310
|
+
}, Hd = /^(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2}):(\d{2})(?:\.(\d{1,7}))?(?:Z|([+-])(\d{2}):(\d{2}))$/;
|
|
9311
|
+
function Ud(e) {
|
|
9326
9312
|
return e instanceof Date && !isNaN(e.getTime());
|
|
9327
9313
|
}
|
|
9328
|
-
function
|
|
9329
|
-
let t =
|
|
9314
|
+
function Wd(e) {
|
|
9315
|
+
let t = Hd.exec(e);
|
|
9330
9316
|
if (!t) return null;
|
|
9331
9317
|
let [, n, r, i, a, o, s, c, l, u, d] = t, f = new Date(Date.UTC(parseInt(n, 10), parseInt(r, 10) - 1, parseInt(i, 10), parseInt(a, 10), parseInt(o, 10), parseInt(s, 10), c ? parseInt(c.padEnd(3, "0"), 10) : 0));
|
|
9332
9318
|
if (l) {
|
|
9333
9319
|
let e = (parseInt(u, 10) * 60 + parseInt(d, 10)) * (l === "+" ? -1 : 1);
|
|
9334
9320
|
f.setUTCMinutes(f.getUTCMinutes() + e);
|
|
9335
9321
|
}
|
|
9336
|
-
return
|
|
9322
|
+
return Ud(f) ? f : null;
|
|
9337
9323
|
}
|
|
9338
|
-
function
|
|
9324
|
+
function Gd(e, t = {}) {
|
|
9339
9325
|
let { strict: n = !1, warnings: r = !1, reviver: i, parseDates: a = !0 } = t;
|
|
9340
9326
|
if (typeof e != "string") return e;
|
|
9341
9327
|
let o = e.trim(), s = o.toLowerCase();
|
|
9342
|
-
if (s.length <= 9 && s in
|
|
9343
|
-
if (!
|
|
9328
|
+
if (s.length <= 9 && s in Vd) return Vd[s];
|
|
9329
|
+
if (!Bd.test(o)) {
|
|
9344
9330
|
if (n) throw SyntaxError("[better-json] Invalid JSON");
|
|
9345
9331
|
return e;
|
|
9346
9332
|
}
|
|
9347
|
-
if (Object.entries(
|
|
9333
|
+
if (Object.entries(zd).some(([e, t]) => {
|
|
9348
9334
|
let n = t.test(o);
|
|
9349
9335
|
return n && r && console.warn(`[better-json] Detected potential prototype pollution attempt using ${e} pattern`), n;
|
|
9350
9336
|
}) && n) throw Error("[better-json] Potential prototype pollution attempt detected");
|
|
@@ -9355,7 +9341,7 @@ function Kd(e, t = {}) {
|
|
|
9355
9341
|
return;
|
|
9356
9342
|
}
|
|
9357
9343
|
if (a && typeof t == "string") {
|
|
9358
|
-
let e =
|
|
9344
|
+
let e = Wd(t);
|
|
9359
9345
|
if (e) return e;
|
|
9360
9346
|
}
|
|
9361
9347
|
return i ? i(e, t) : t;
|
|
@@ -9365,12 +9351,12 @@ function Kd(e, t = {}) {
|
|
|
9365
9351
|
return e;
|
|
9366
9352
|
}
|
|
9367
9353
|
}
|
|
9368
|
-
function
|
|
9369
|
-
return
|
|
9354
|
+
function Kd(e, t = { strict: !0 }) {
|
|
9355
|
+
return Gd(e, t);
|
|
9370
9356
|
}
|
|
9371
9357
|
//#endregion
|
|
9372
9358
|
//#region ../../node_modules/.pnpm/better-auth@1.7.6_@opentelemetry+api@1.9.1_drizzle-kit@0.31.11_drizzle-orm@0.45.3_@open_278cdd289b4d3ad668620afc70e58472/node_modules/better-auth/dist/client/fetch-plugins.mjs
|
|
9373
|
-
var
|
|
9359
|
+
var qd = {
|
|
9374
9360
|
id: "redirect",
|
|
9375
9361
|
name: "Redirect",
|
|
9376
9362
|
hooks: { onSuccess(e) {
|
|
@@ -9378,7 +9364,7 @@ var Jd = {
|
|
|
9378
9364
|
window.location.href = e.data.url;
|
|
9379
9365
|
} catch {}
|
|
9380
9366
|
} }
|
|
9381
|
-
},
|
|
9367
|
+
}, Jd = [], Yd = 0, Xd = 4, Zd = globalThis.nanostoresGlobal ||= { epoch: 0 }, Qd = /* @__NO_SIDE_EFFECTS__ */ (e) => {
|
|
9382
9368
|
let t = [], n = {
|
|
9383
9369
|
get() {
|
|
9384
9370
|
return n.lc || n.listen(() => {})(), n.value;
|
|
@@ -9387,18 +9373,18 @@ var Jd = {
|
|
|
9387
9373
|
lc: 0,
|
|
9388
9374
|
listen(e) {
|
|
9389
9375
|
return n.lc = t.push(e), () => {
|
|
9390
|
-
for (let t =
|
|
9376
|
+
for (let t = Yd + Xd; t < Jd.length;) Jd[t] === e ? Jd.splice(t, Xd) : t += Xd;
|
|
9391
9377
|
let r = t.indexOf(e);
|
|
9392
9378
|
~r && (t.splice(r, 1), --n.lc || n.off());
|
|
9393
9379
|
};
|
|
9394
9380
|
},
|
|
9395
9381
|
notify(e, r) {
|
|
9396
|
-
|
|
9397
|
-
let i = !
|
|
9398
|
-
for (let i of t)
|
|
9382
|
+
Zd.epoch++;
|
|
9383
|
+
let i = !Jd.length;
|
|
9384
|
+
for (let i of t) Jd.push(i, n.value, e, r);
|
|
9399
9385
|
if (i) {
|
|
9400
|
-
for (
|
|
9401
|
-
|
|
9386
|
+
for (Yd = 0; Yd < Jd.length; Yd += Xd) Jd[Yd](Jd[Yd + 1], Jd[Yd + 2], Jd[Yd + 3]);
|
|
9387
|
+
Jd.length = 0;
|
|
9402
9388
|
}
|
|
9403
9389
|
},
|
|
9404
9390
|
off() {},
|
|
@@ -9413,15 +9399,15 @@ var Jd = {
|
|
|
9413
9399
|
value: e
|
|
9414
9400
|
};
|
|
9415
9401
|
return n;
|
|
9416
|
-
},
|
|
9402
|
+
}, $d = 2, ef = 5, tf = 6, nf = 10, rf = (e, t, n, r) => (e.events = e.events || {}, e.events[n + nf] || (e.events[n + nf] = r((t) => {
|
|
9417
9403
|
e.events[n].reduceRight((e, t) => (t(e), e), {
|
|
9418
9404
|
shared: {},
|
|
9419
9405
|
...t
|
|
9420
9406
|
});
|
|
9421
9407
|
})), e.events[n] = e.events[n] || [], e.events[n].push(t), () => {
|
|
9422
9408
|
let r = e.events[n], i = r.indexOf(t);
|
|
9423
|
-
r.splice(i, 1), r.length || (delete e.events[n], e.events[n +
|
|
9424
|
-
}),
|
|
9409
|
+
r.splice(i, 1), r.length || (delete e.events[n], e.events[n + nf](), delete e.events[n + nf]);
|
|
9410
|
+
}), af = (e, t) => rf(e, t, $d, (t) => {
|
|
9425
9411
|
let n = e.set, r = e.setKey;
|
|
9426
9412
|
return e.setKey &&= (n, i) => {
|
|
9427
9413
|
let a;
|
|
@@ -9446,62 +9432,62 @@ var Jd = {
|
|
|
9446
9432
|
}, () => {
|
|
9447
9433
|
e.set = n, e.setKey = r;
|
|
9448
9434
|
};
|
|
9449
|
-
}),
|
|
9435
|
+
}), of = 1e3, sf = (e, t) => rf(e, (n) => {
|
|
9450
9436
|
let r = t(n);
|
|
9451
|
-
r && e.events[
|
|
9452
|
-
},
|
|
9437
|
+
r && e.events[tf].push(r);
|
|
9438
|
+
}, ef, (t) => {
|
|
9453
9439
|
let n = e.listen;
|
|
9454
9440
|
e.listen = (...r) => (!e.lc && !e.active && (e.active = !0, t()), n(...r));
|
|
9455
9441
|
let r = e.off;
|
|
9456
|
-
return e.events[
|
|
9442
|
+
return e.events[tf] = [], e.off = () => {
|
|
9457
9443
|
r(), setTimeout(() => {
|
|
9458
9444
|
if (e.active && !e.lc) {
|
|
9459
9445
|
e.active = !1;
|
|
9460
|
-
for (let t of e.events[
|
|
9461
|
-
e.events[
|
|
9446
|
+
for (let t of e.events[tf]) t();
|
|
9447
|
+
e.events[tf] = [];
|
|
9462
9448
|
}
|
|
9463
|
-
},
|
|
9449
|
+
}, of);
|
|
9464
9450
|
}, () => {
|
|
9465
9451
|
e.listen = n, e.off = r;
|
|
9466
9452
|
};
|
|
9467
9453
|
});
|
|
9468
9454
|
//#endregion
|
|
9469
9455
|
//#region ../../node_modules/.pnpm/better-auth@1.7.6_@opentelemetry+api@1.9.1_drizzle-kit@0.31.11_drizzle-orm@0.45.3_@open_278cdd289b4d3ad668620afc70e58472/node_modules/better-auth/dist/client/equality.mjs
|
|
9470
|
-
function
|
|
9456
|
+
function cf(e) {
|
|
9471
9457
|
if (typeof e != "object" || !e) return !1;
|
|
9472
9458
|
let t = Object.getPrototypeOf(e);
|
|
9473
9459
|
return t === Object.prototype || t === null;
|
|
9474
9460
|
}
|
|
9475
|
-
function
|
|
9461
|
+
function lf(e, t) {
|
|
9476
9462
|
if (e === t) return !0;
|
|
9477
9463
|
if (Array.isArray(e) && Array.isArray(t)) {
|
|
9478
9464
|
if (e.length !== t.length) return !1;
|
|
9479
|
-
for (let n = 0; n < e.length; n++) if (!
|
|
9465
|
+
for (let n = 0; n < e.length; n++) if (!lf(e[n], t[n])) return !1;
|
|
9480
9466
|
return !0;
|
|
9481
9467
|
}
|
|
9482
|
-
if (
|
|
9468
|
+
if (cf(e) && cf(t)) {
|
|
9483
9469
|
let n = Object.keys(e), r = Object.keys(t);
|
|
9484
9470
|
if (n.length !== r.length) return !1;
|
|
9485
|
-
for (let r of n) if (!(r in t) || !
|
|
9471
|
+
for (let r of n) if (!(r in t) || !lf(e[r], t[r])) return !1;
|
|
9486
9472
|
return !0;
|
|
9487
9473
|
}
|
|
9488
9474
|
return !1;
|
|
9489
9475
|
}
|
|
9490
|
-
function
|
|
9491
|
-
return
|
|
9476
|
+
function uf(e, t) {
|
|
9477
|
+
return af(e, ({ newValue: n, abort: r }) => {
|
|
9492
9478
|
t(e.value, n) && r();
|
|
9493
9479
|
});
|
|
9494
9480
|
}
|
|
9495
9481
|
//#endregion
|
|
9496
9482
|
//#region ../../node_modules/.pnpm/better-auth@1.7.6_@opentelemetry+api@1.9.1_drizzle-kit@0.31.11_drizzle-orm@0.45.3_@open_278cdd289b4d3ad668620afc70e58472/node_modules/better-auth/dist/client/query-atom.mjs
|
|
9497
|
-
var
|
|
9498
|
-
function
|
|
9499
|
-
let t = /* @__PURE__ */
|
|
9500
|
-
return Object.defineProperty(t,
|
|
9483
|
+
var df = Symbol.for("better-auth:auth-query");
|
|
9484
|
+
function ff(e) {
|
|
9485
|
+
let t = /* @__PURE__ */ Qd(e);
|
|
9486
|
+
return Object.defineProperty(t, df, { value: !0 }), t;
|
|
9501
9487
|
}
|
|
9502
9488
|
//#endregion
|
|
9503
9489
|
//#region ../../node_modules/.pnpm/better-auth@1.7.6_@opentelemetry+api@1.9.1_drizzle-kit@0.31.11_drizzle-orm@0.45.3_@open_278cdd289b4d3ad668620afc70e58472/node_modules/better-auth/dist/client/broadcast-channel.mjs
|
|
9504
|
-
var
|
|
9490
|
+
var pf = Symbol.for("better-auth:broadcast-channel"), mf = () => Math.floor(Date.now() / 1e3), hf = class {
|
|
9505
9491
|
listeners = /* @__PURE__ */ new Set();
|
|
9506
9492
|
name;
|
|
9507
9493
|
constructor(e = "better-auth.message") {
|
|
@@ -9516,7 +9502,7 @@ var mf = Symbol.for("better-auth:broadcast-channel"), hf = () => Math.floor(Date
|
|
|
9516
9502
|
if (typeof window < "u") try {
|
|
9517
9503
|
localStorage.setItem(this.name, JSON.stringify({
|
|
9518
9504
|
...e,
|
|
9519
|
-
timestamp:
|
|
9505
|
+
timestamp: mf()
|
|
9520
9506
|
}));
|
|
9521
9507
|
} catch {}
|
|
9522
9508
|
}
|
|
@@ -9532,12 +9518,12 @@ var mf = Symbol.for("better-auth:broadcast-channel"), hf = () => Math.floor(Date
|
|
|
9532
9518
|
};
|
|
9533
9519
|
}
|
|
9534
9520
|
};
|
|
9535
|
-
function
|
|
9536
|
-
return globalThis[
|
|
9521
|
+
function gf(e = "better-auth.message") {
|
|
9522
|
+
return globalThis[pf] || (globalThis[pf] = new hf(e)), globalThis[pf];
|
|
9537
9523
|
}
|
|
9538
9524
|
//#endregion
|
|
9539
9525
|
//#region ../../node_modules/.pnpm/better-auth@1.7.6_@opentelemetry+api@1.9.1_drizzle-kit@0.31.11_drizzle-orm@0.45.3_@open_278cdd289b4d3ad668620afc70e58472/node_modules/better-auth/dist/client/focus-manager.mjs
|
|
9540
|
-
var
|
|
9526
|
+
var _f = Symbol.for("better-auth:focus-manager"), vf = class {
|
|
9541
9527
|
listeners = /* @__PURE__ */ new Set();
|
|
9542
9528
|
subscribe(e) {
|
|
9543
9529
|
return this.listeners.add(e), () => {
|
|
@@ -9557,12 +9543,12 @@ var vf = Symbol.for("better-auth:focus-manager"), yf = class {
|
|
|
9557
9543
|
};
|
|
9558
9544
|
}
|
|
9559
9545
|
};
|
|
9560
|
-
function
|
|
9561
|
-
return globalThis[
|
|
9546
|
+
function yf() {
|
|
9547
|
+
return globalThis[_f] || (globalThis[_f] = new vf()), globalThis[_f];
|
|
9562
9548
|
}
|
|
9563
9549
|
//#endregion
|
|
9564
9550
|
//#region ../../node_modules/.pnpm/better-auth@1.7.6_@opentelemetry+api@1.9.1_drizzle-kit@0.31.11_drizzle-orm@0.45.3_@open_278cdd289b4d3ad668620afc70e58472/node_modules/better-auth/dist/client/online-manager.mjs
|
|
9565
|
-
var
|
|
9551
|
+
var bf = Symbol.for("better-auth:online-manager"), xf = class {
|
|
9566
9552
|
listeners = /* @__PURE__ */ new Set();
|
|
9567
9553
|
isOnline = typeof navigator < "u" ? navigator.onLine : !0;
|
|
9568
9554
|
subscribe(e) {
|
|
@@ -9581,35 +9567,35 @@ var xf = Symbol.for("better-auth:online-manager"), Sf = class {
|
|
|
9581
9567
|
};
|
|
9582
9568
|
}
|
|
9583
9569
|
};
|
|
9584
|
-
function
|
|
9585
|
-
return globalThis[
|
|
9570
|
+
function Sf() {
|
|
9571
|
+
return globalThis[bf] || (globalThis[bf] = new xf()), globalThis[bf];
|
|
9586
9572
|
}
|
|
9587
9573
|
//#endregion
|
|
9588
9574
|
//#region ../../node_modules/.pnpm/better-auth@1.7.6_@opentelemetry+api@1.9.1_drizzle-kit@0.31.11_drizzle-orm@0.45.3_@open_278cdd289b4d3ad668620afc70e58472/node_modules/better-auth/dist/client/session-refresh.mjs
|
|
9589
|
-
var
|
|
9590
|
-
function
|
|
9575
|
+
var Cf = () => Math.floor(Date.now() / 1e3), wf = 5;
|
|
9576
|
+
function Tf(e) {
|
|
9591
9577
|
let { fetchSession: t, shouldPollSession: n = () => !0, sessionSignal: r, options: i = {} } = e, a = i.sessionOptions?.refetchInterval ?? 0, o = i.sessionOptions?.refetchOnWindowFocus ?? !0, s = i.sessionOptions?.refetchWhenOffline ?? !1, c = {
|
|
9592
9578
|
isInitialized: !1,
|
|
9593
9579
|
lastSessionRequest: 0
|
|
9594
|
-
}, l = () => s ||
|
|
9580
|
+
}, l = () => s || Sf().isOnline, u = (e) => {
|
|
9595
9581
|
if (l()) {
|
|
9596
9582
|
if (e?.event === "storage") {
|
|
9597
9583
|
t();
|
|
9598
9584
|
return;
|
|
9599
9585
|
}
|
|
9600
9586
|
if (e?.event === "poll") {
|
|
9601
|
-
c.lastSessionRequest =
|
|
9587
|
+
c.lastSessionRequest = Cf(), t();
|
|
9602
9588
|
return;
|
|
9603
9589
|
}
|
|
9604
9590
|
if (e?.event === "visibilitychange") {
|
|
9605
|
-
if (
|
|
9606
|
-
c.lastSessionRequest =
|
|
9591
|
+
if (Cf() - c.lastSessionRequest < wf) return;
|
|
9592
|
+
c.lastSessionRequest = Cf(), t();
|
|
9607
9593
|
return;
|
|
9608
9594
|
}
|
|
9609
9595
|
t();
|
|
9610
9596
|
}
|
|
9611
9597
|
}, d = (e) => {
|
|
9612
|
-
|
|
9598
|
+
gf().post({
|
|
9613
9599
|
event: "session",
|
|
9614
9600
|
data: { trigger: e },
|
|
9615
9601
|
clientId: Math.random().toString(36).substring(7)
|
|
@@ -9619,15 +9605,15 @@ function Ef(e) {
|
|
|
9619
9605
|
n() && u({ event: "poll" });
|
|
9620
9606
|
}, a * 1e3));
|
|
9621
9607
|
}, p = () => {
|
|
9622
|
-
c.unsubscribeBroadcast =
|
|
9608
|
+
c.unsubscribeBroadcast = gf().subscribe(() => {
|
|
9623
9609
|
u({ event: "storage" });
|
|
9624
9610
|
});
|
|
9625
9611
|
}, m = () => {
|
|
9626
|
-
o && (c.unsubscribeFocus =
|
|
9612
|
+
o && (c.unsubscribeFocus = yf().subscribe(() => {
|
|
9627
9613
|
u({ event: "visibilitychange" });
|
|
9628
9614
|
}));
|
|
9629
9615
|
}, h = () => {
|
|
9630
|
-
c.unsubscribeOnline =
|
|
9616
|
+
c.unsubscribeOnline = Sf().subscribe((e) => {
|
|
9631
9617
|
e && u({ event: "visibilitychange" });
|
|
9632
9618
|
});
|
|
9633
9619
|
}, g = () => {
|
|
@@ -9637,7 +9623,7 @@ function Ef(e) {
|
|
|
9637
9623
|
};
|
|
9638
9624
|
return {
|
|
9639
9625
|
init: () => {
|
|
9640
|
-
c.isInitialized || (c.isInitialized = !0, f(), p(), m(), h(), g(), c.cleanupBroadcastSetup =
|
|
9626
|
+
c.isInitialized || (c.isInitialized = !0, f(), p(), m(), h(), g(), c.cleanupBroadcastSetup = gf().setup(), c.cleanupFocusSetup = yf().setup(), c.cleanupOnlineSetup = Sf().setup());
|
|
9641
9627
|
},
|
|
9642
9628
|
cleanup: () => {
|
|
9643
9629
|
c.isInitialized && (c.pollInterval &&= (clearInterval(c.pollInterval), void 0), c.unsubscribeBroadcast &&= (c.unsubscribeBroadcast(), void 0), c.unsubscribeFocus &&= (c.unsubscribeFocus(), void 0), c.unsubscribeOnline &&= (c.unsubscribeOnline(), void 0), c.unsubscribeSignal &&= (c.unsubscribeSignal(), void 0), c.cleanupBroadcastSetup &&= (c.cleanupBroadcastSetup(), void 0), c.cleanupFocusSetup &&= (c.cleanupFocusSetup(), void 0), c.cleanupOnlineSetup &&= (c.cleanupOnlineSetup(), void 0), c.isInitialized = !1, c.lastSessionRequest = 0);
|
|
@@ -9648,8 +9634,8 @@ function Ef(e) {
|
|
|
9648
9634
|
}
|
|
9649
9635
|
//#endregion
|
|
9650
9636
|
//#region ../../node_modules/.pnpm/better-auth@1.7.6_@opentelemetry+api@1.9.1_drizzle-kit@0.31.11_drizzle-orm@0.45.3_@open_278cdd289b4d3ad668620afc70e58472/node_modules/better-auth/dist/client/session-atom.mjs
|
|
9651
|
-
var
|
|
9652
|
-
function
|
|
9637
|
+
var Ef = () => typeof window > "u", Df = of;
|
|
9638
|
+
function Of(e, t) {
|
|
9653
9639
|
if (typeof window > "u") return;
|
|
9654
9640
|
let n = e.get();
|
|
9655
9641
|
n.data === null && t !== null && e.set({
|
|
@@ -9659,31 +9645,31 @@ function kf(e, t) {
|
|
|
9659
9645
|
isPending: !1
|
|
9660
9646
|
});
|
|
9661
9647
|
}
|
|
9662
|
-
function
|
|
9648
|
+
function kf(e) {
|
|
9663
9649
|
return typeof e == "object" && e && "data" in e && "error" in e ? e : {
|
|
9664
9650
|
data: e,
|
|
9665
9651
|
error: null
|
|
9666
9652
|
};
|
|
9667
9653
|
}
|
|
9668
|
-
function
|
|
9654
|
+
function Af(e) {
|
|
9669
9655
|
return !e || e.session === null && e.user === null ? null : e;
|
|
9670
9656
|
}
|
|
9671
|
-
function
|
|
9672
|
-
return
|
|
9657
|
+
function jf(e, t) {
|
|
9658
|
+
return lf(e.data, t.data) && e.error === t.error && e.isPending === t.isPending && e.isRefetching === t.isRefetching && e.refetch === t.refetch;
|
|
9673
9659
|
}
|
|
9674
|
-
function
|
|
9675
|
-
let n = /* @__PURE__ */
|
|
9660
|
+
function Mf(e, t) {
|
|
9661
|
+
let n = /* @__PURE__ */ Qd(!1), r, i = 0, a = 0;
|
|
9676
9662
|
n.listen(() => {
|
|
9677
9663
|
a++, i = 0;
|
|
9678
9664
|
});
|
|
9679
|
-
let o = (e) => u(e), s =
|
|
9665
|
+
let o = (e) => u(e), s = ff({
|
|
9680
9666
|
data: null,
|
|
9681
9667
|
error: null,
|
|
9682
9668
|
isPending: !0,
|
|
9683
9669
|
isRefetching: !1,
|
|
9684
9670
|
refetch: o
|
|
9685
9671
|
});
|
|
9686
|
-
|
|
9672
|
+
uf(s, jf);
|
|
9687
9673
|
let c = async (t, n) => {
|
|
9688
9674
|
let r = s.value;
|
|
9689
9675
|
if (s.set({
|
|
@@ -9700,14 +9686,14 @@ function Nf(e, t) {
|
|
|
9700
9686
|
signal: t
|
|
9701
9687
|
});
|
|
9702
9688
|
if (t.aborted) return "aborted";
|
|
9703
|
-
let { data: i, error: a } =
|
|
9689
|
+
let { data: i, error: a } = kf(r), c = "fresh";
|
|
9704
9690
|
if (i?.needsRefresh) try {
|
|
9705
9691
|
let n = await e("/get-session", {
|
|
9706
9692
|
method: "POST",
|
|
9707
9693
|
signal: t
|
|
9708
9694
|
});
|
|
9709
9695
|
if (t.aborted) return "aborted";
|
|
9710
|
-
({data: i, error: a} =
|
|
9696
|
+
({data: i, error: a} = kf(n));
|
|
9711
9697
|
} catch {
|
|
9712
9698
|
if (t.aborted) return "aborted";
|
|
9713
9699
|
c = "stale";
|
|
@@ -9722,7 +9708,7 @@ function Nf(e, t) {
|
|
|
9722
9708
|
refetch: o
|
|
9723
9709
|
}), "failed";
|
|
9724
9710
|
}
|
|
9725
|
-
let l =
|
|
9711
|
+
let l = Af(i), u = s.value, d = u.data != null && l != null && lf(u.data, l) ? u.data : l;
|
|
9726
9712
|
return s.set({
|
|
9727
9713
|
data: d,
|
|
9728
9714
|
error: null,
|
|
@@ -9743,7 +9729,7 @@ function Nf(e, t) {
|
|
|
9743
9729
|
}
|
|
9744
9730
|
}, l = () => {
|
|
9745
9731
|
let e = s.value.data?.session?.expiresAt, t = e instanceof Date ? e.getTime() : Infinity;
|
|
9746
|
-
return Math.min(Date.now() +
|
|
9732
|
+
return Math.min(Date.now() + Df, t);
|
|
9747
9733
|
}, u = (e) => {
|
|
9748
9734
|
i = 0, r?.cancel();
|
|
9749
9735
|
let t = new AbortController(), n = {
|
|
@@ -9757,12 +9743,12 @@ function Nf(e, t) {
|
|
|
9757
9743
|
};
|
|
9758
9744
|
return n.promise.then(o, () => o("failed")), n.promise.then(() => void 0);
|
|
9759
9745
|
}, d = () => r?.revision === a ? r.promise.then(() => void 0) : Date.now() < i ? Promise.resolve() : u(), f = () => {};
|
|
9760
|
-
return
|
|
9746
|
+
return sf(s, () => {
|
|
9761
9747
|
let e;
|
|
9762
|
-
|
|
9748
|
+
Ef() || (e = setTimeout(() => {
|
|
9763
9749
|
d();
|
|
9764
9750
|
}, 0));
|
|
9765
|
-
let r =
|
|
9751
|
+
let r = Tf({
|
|
9766
9752
|
fetchSession: u,
|
|
9767
9753
|
shouldPollSession: () => s.value.data != null,
|
|
9768
9754
|
sessionSignal: n,
|
|
@@ -9779,7 +9765,7 @@ function Nf(e, t) {
|
|
|
9779
9765
|
}
|
|
9780
9766
|
//#endregion
|
|
9781
9767
|
//#region ../../node_modules/.pnpm/better-auth@1.7.6_@opentelemetry+api@1.9.1_drizzle-kit@0.31.11_drizzle-orm@0.45.3_@open_278cdd289b4d3ad668620afc70e58472/node_modules/better-auth/dist/client/config.mjs
|
|
9782
|
-
var
|
|
9768
|
+
var Nf = (e) => {
|
|
9783
9769
|
if (typeof process > "u") return;
|
|
9784
9770
|
let t = e ?? "/api/auth";
|
|
9785
9771
|
if (process.env.NEXT_PUBLIC_AUTH_URL) return process.env.NEXT_PUBLIC_AUTH_URL;
|
|
@@ -9792,8 +9778,8 @@ var Pf = (e) => {
|
|
|
9792
9778
|
return `${new URL(`${e}${process.env.VERCEL_URL}`).origin}${t}`;
|
|
9793
9779
|
} catch {}
|
|
9794
9780
|
}
|
|
9795
|
-
},
|
|
9796
|
-
let n = "credentials" in Request.prototype, r =
|
|
9781
|
+
}, Pf = (e, t) => {
|
|
9782
|
+
let n = "credentials" in Request.prototype, r = Ld(e?.baseURL, e?.basePath, void 0, t) ?? Nf(e?.basePath) ?? "/api/auth", i = e?.plugins?.flatMap((e) => e.fetchPlugins).filter((e) => e !== void 0) || [], a = {
|
|
9797
9783
|
id: "lifecycle-hooks",
|
|
9798
9784
|
name: "lifecycle-hooks",
|
|
9799
9785
|
hooks: {
|
|
@@ -9807,18 +9793,18 @@ var Pf = (e) => {
|
|
|
9807
9793
|
...n ? { credentials: "include" } : {},
|
|
9808
9794
|
method: "GET",
|
|
9809
9795
|
jsonParser(e) {
|
|
9810
|
-
return e ?
|
|
9796
|
+
return e ? Kd(e, { strict: !1 }) : null;
|
|
9811
9797
|
},
|
|
9812
9798
|
customFetchImpl: fetch,
|
|
9813
9799
|
...u,
|
|
9814
9800
|
plugins: [
|
|
9815
9801
|
a,
|
|
9816
9802
|
...u.plugins || [],
|
|
9817
|
-
...e?.disableDefaultFetchPlugins ? [] : [
|
|
9803
|
+
...e?.disableDefaultFetchPlugins ? [] : [qd],
|
|
9818
9804
|
...i
|
|
9819
9805
|
]
|
|
9820
|
-
}), { $sessionSignal: f, session: p, broadcastSessionUpdate: m } =
|
|
9821
|
-
h || e === null || (h = !0,
|
|
9806
|
+
}), { $sessionSignal: f, session: p, broadcastSessionUpdate: m } = Mf(d, e), h = !1, g = (e) => {
|
|
9807
|
+
h || e === null || (h = !0, Of(p, e));
|
|
9822
9808
|
}, _ = e?.plugins || [], v = {}, y = {
|
|
9823
9809
|
$sessionSignal: f,
|
|
9824
9810
|
session: p
|
|
@@ -9863,28 +9849,28 @@ var Pf = (e) => {
|
|
|
9863
9849
|
};
|
|
9864
9850
|
//#endregion
|
|
9865
9851
|
//#region ../../node_modules/.pnpm/better-auth@1.7.6_@opentelemetry+api@1.9.1_drizzle-kit@0.31.11_drizzle-orm@0.45.3_@open_278cdd289b4d3ad668620afc70e58472/node_modules/better-auth/dist/utils/is-atom.mjs
|
|
9866
|
-
function
|
|
9852
|
+
function Ff(e) {
|
|
9867
9853
|
return typeof e == "object" && !!e && "get" in e && typeof e.get == "function" && "lc" in e && typeof e.lc == "number";
|
|
9868
9854
|
}
|
|
9869
9855
|
//#endregion
|
|
9870
9856
|
//#region ../../node_modules/.pnpm/@better-auth+core@1.7.6_@better-auth+utils@0.4.2_@better-fetch+fetch@1.3.2_@opentelemet_6f95b1a60f08c43e0de20286d2ff773b/node_modules/@better-auth/core/dist/utils/string.mjs
|
|
9871
|
-
function
|
|
9857
|
+
function If(e) {
|
|
9872
9858
|
return e.charAt(0).toUpperCase() + e.slice(1);
|
|
9873
9859
|
}
|
|
9874
|
-
var
|
|
9875
|
-
function
|
|
9876
|
-
return e.replace(
|
|
9860
|
+
var Lf = /[\p{Ll}\d]+|\p{Lu}+(?!\p{Ll})|\p{Lu}[\p{Ll}\d]+|\p{Lo}+/gu, Rf = /['\u2019]/g;
|
|
9861
|
+
function zf(e) {
|
|
9862
|
+
return e.replace(Rf, "").match(Lf) ?? [];
|
|
9877
9863
|
}
|
|
9878
|
-
function
|
|
9879
|
-
return
|
|
9864
|
+
function Bf(e) {
|
|
9865
|
+
return zf(e).map((e) => e.toLowerCase()).join("-");
|
|
9880
9866
|
}
|
|
9881
9867
|
//#endregion
|
|
9882
9868
|
//#region ../../node_modules/.pnpm/better-auth@1.7.6_@opentelemetry+api@1.9.1_drizzle-kit@0.31.11_drizzle-orm@0.45.3_@open_278cdd289b4d3ad668620afc70e58472/node_modules/better-auth/dist/client/proxy.mjs
|
|
9883
|
-
function
|
|
9869
|
+
function Vf(e, t, n) {
|
|
9884
9870
|
let r = t[e], { fetchOptions: i, query: a, ...o } = n || {};
|
|
9885
9871
|
return r || (i?.method ? i.method : o && Object.keys(o).length > 0 ? "POST" : "GET");
|
|
9886
9872
|
}
|
|
9887
|
-
function
|
|
9873
|
+
function Hf(e, t, n, r, i) {
|
|
9888
9874
|
function a(o = []) {
|
|
9889
9875
|
return new Proxy(function() {}, {
|
|
9890
9876
|
get(t, n) {
|
|
@@ -9895,13 +9881,13 @@ function Uf(e, t, n, r, i) {
|
|
|
9895
9881
|
i = void 0;
|
|
9896
9882
|
break;
|
|
9897
9883
|
}
|
|
9898
|
-
return typeof i == "function" ||
|
|
9884
|
+
return typeof i == "function" || Ff(i) ? i : a(r);
|
|
9899
9885
|
},
|
|
9900
9886
|
apply: async (e, a, s) => {
|
|
9901
|
-
let c = "/" + o.map(
|
|
9887
|
+
let c = "/" + o.map(Bf).join("/"), l = s[0] || {}, u = s[1] || {}, { query: d, fetchOptions: f, ...p } = l, m = {
|
|
9902
9888
|
...u,
|
|
9903
9889
|
...f
|
|
9904
|
-
}, h =
|
|
9890
|
+
}, h = Vf(c, n, l);
|
|
9905
9891
|
return await t(c, {
|
|
9906
9892
|
...m,
|
|
9907
9893
|
body: h === "GET" ? void 0 : {
|
|
@@ -9935,7 +9921,7 @@ function Uf(e, t, n, r, i) {
|
|
|
9935
9921
|
//#endregion
|
|
9936
9922
|
//#region ../../node_modules/.pnpm/better-auth@1.7.6_@opentelemetry+api@1.9.1_drizzle-kit@0.31.11_drizzle-orm@0.45.3_@open_278cdd289b4d3ad668620afc70e58472/node_modules/better-auth/dist/client/vue/vue-store.mjs
|
|
9937
9923
|
H();
|
|
9938
|
-
function
|
|
9924
|
+
function Uf(e) {
|
|
9939
9925
|
let t = ge(), n = e.subscribe((e) => {
|
|
9940
9926
|
t.value = e;
|
|
9941
9927
|
});
|
|
@@ -9943,29 +9929,29 @@ function Wf(e) {
|
|
|
9943
9929
|
}
|
|
9944
9930
|
//#endregion
|
|
9945
9931
|
//#region ../../node_modules/.pnpm/better-auth@1.7.6_@opentelemetry+api@1.9.1_drizzle-kit@0.31.11_drizzle-orm@0.45.3_@open_278cdd289b4d3ad668620afc70e58472/node_modules/better-auth/dist/client/vue/index.mjs
|
|
9946
|
-
function
|
|
9947
|
-
return `use${
|
|
9932
|
+
function Wf(e) {
|
|
9933
|
+
return `use${If(e)}`;
|
|
9948
9934
|
}
|
|
9949
|
-
function
|
|
9935
|
+
function Gf(e) {
|
|
9950
9936
|
if (!e) return;
|
|
9951
9937
|
if (e instanceof Headers || Array.isArray(e)) return e;
|
|
9952
9938
|
let t = {};
|
|
9953
9939
|
for (let [n, r] of Object.entries(e)) r !== void 0 && (t[n] = r);
|
|
9954
9940
|
return t;
|
|
9955
9941
|
}
|
|
9956
|
-
function
|
|
9957
|
-
let { baseURL: t, pluginPathMethods: n, pluginsActions: r, pluginsAtoms: i, hydrateSession: a, $sessionSignal: o, $fetch: s, $store: c, atomListeners: l } =
|
|
9942
|
+
function Kf(e) {
|
|
9943
|
+
let { baseURL: t, pluginPathMethods: n, pluginsActions: r, pluginsAtoms: i, hydrateSession: a, $sessionSignal: o, $fetch: s, $store: c, atomListeners: l } = Pf(e, !1), u = [
|
|
9958
9944
|
"better-auth",
|
|
9959
9945
|
"session",
|
|
9960
9946
|
e?.baseURL || "inferred",
|
|
9961
9947
|
e?.basePath ?? "/api/auth"
|
|
9962
9948
|
].join(":"), d = {};
|
|
9963
|
-
for (let [e, t] of Object.entries(i)) d[
|
|
9949
|
+
for (let [e, t] of Object.entries(i)) d[Wf(e)] = () => Uf(t);
|
|
9964
9950
|
function f(n) {
|
|
9965
9951
|
if (n) {
|
|
9966
|
-
let r =
|
|
9952
|
+
let r = Uf(o);
|
|
9967
9953
|
return n(`${t}/get-session`, {
|
|
9968
|
-
headers:
|
|
9954
|
+
headers: Gf(e?.fetchOptions?.headers),
|
|
9969
9955
|
key: u,
|
|
9970
9956
|
watch: [r]
|
|
9971
9957
|
}).then((e) => ({
|
|
@@ -9976,7 +9962,7 @@ function qf(e) {
|
|
|
9976
9962
|
}
|
|
9977
9963
|
return d.useSession();
|
|
9978
9964
|
}
|
|
9979
|
-
return
|
|
9965
|
+
return Hf({
|
|
9980
9966
|
...r,
|
|
9981
9967
|
...d,
|
|
9982
9968
|
hydrateSession: a,
|
|
@@ -9987,7 +9973,7 @@ function qf(e) {
|
|
|
9987
9973
|
}
|
|
9988
9974
|
//#endregion
|
|
9989
9975
|
//#region ../../node_modules/.pnpm/better-auth@1.7.6_@opentelemetry+api@1.9.1_drizzle-kit@0.31.11_drizzle-orm@0.45.3_@open_584ae725ccdce0c7ea15c2e095c0e81e/node_modules/better-auth/dist/plugins/anonymous/client.mjs
|
|
9990
|
-
var
|
|
9976
|
+
var qf = () => ({
|
|
9991
9977
|
id: "anonymous",
|
|
9992
9978
|
version: go,
|
|
9993
9979
|
$InferServerPlugin: {},
|
|
@@ -10000,19 +9986,19 @@ var Jf = () => ({
|
|
|
10000
9986
|
signal: "$sessionSignal"
|
|
10001
9987
|
}],
|
|
10002
9988
|
$ERROR_CODES: ls
|
|
10003
|
-
}),
|
|
9989
|
+
}), Jf = (e) => ({
|
|
10004
9990
|
id: "additional-fields-client",
|
|
10005
9991
|
version: go,
|
|
10006
9992
|
$InferServerPlugin: {}
|
|
10007
|
-
}),
|
|
10008
|
-
function
|
|
9993
|
+
}), Yf = "eight-wave-ai", Xf = "-uid", Zf = 31536e3;
|
|
9994
|
+
function Qf(e, t, n) {
|
|
10009
9995
|
try {
|
|
10010
9996
|
document.cookie = `${e}=${t}; path=/; max-age=${n}${n > 0 ? "" : "; expires=Thu, 01 Jan 1970 00:00:00 GMT"}; SameSite=Lax; Secure`;
|
|
10011
9997
|
} catch (e) {
|
|
10012
9998
|
At.warn("[cookie] setCookie blocked (cross-origin/tracking protection)", e);
|
|
10013
9999
|
}
|
|
10014
10000
|
}
|
|
10015
|
-
function
|
|
10001
|
+
function $f(e) {
|
|
10016
10002
|
try {
|
|
10017
10003
|
let t = `${e}=`, n = document.cookie.split("; ").find((e) => e.startsWith(t));
|
|
10018
10004
|
return n ? n.slice(t.length) : "";
|
|
@@ -10020,28 +10006,28 @@ function ep(e) {
|
|
|
10020
10006
|
return At.warn("[cookie] getCookie blocked (cross-origin/tracking protection)", e), "";
|
|
10021
10007
|
}
|
|
10022
10008
|
}
|
|
10023
|
-
function
|
|
10024
|
-
|
|
10009
|
+
function ep(e, t = Yf) {
|
|
10010
|
+
Qf(t, e, e ? Zf : 0);
|
|
10025
10011
|
}
|
|
10026
|
-
function
|
|
10027
|
-
return
|
|
10012
|
+
function tp(e = Yf) {
|
|
10013
|
+
return $f(e);
|
|
10028
10014
|
}
|
|
10029
|
-
function
|
|
10030
|
-
|
|
10015
|
+
function np(e, t = Yf) {
|
|
10016
|
+
Qf(`${t}${Xf}`, e, Zf);
|
|
10031
10017
|
}
|
|
10032
|
-
function
|
|
10033
|
-
return
|
|
10018
|
+
function rp(e = Yf) {
|
|
10019
|
+
return $f(`${e}${Xf}`);
|
|
10034
10020
|
}
|
|
10035
|
-
function
|
|
10036
|
-
|
|
10021
|
+
function ip(e = Yf) {
|
|
10022
|
+
Qf(`${e}${Xf}`, "", 0);
|
|
10037
10023
|
}
|
|
10038
10024
|
//#endregion
|
|
10039
10025
|
//#region src/utils/index.ts
|
|
10040
|
-
var
|
|
10026
|
+
var ap = "https://ai-api.8wave.it", op = "https://ai.8wave.it";
|
|
10041
10027
|
//#endregion
|
|
10042
10028
|
//#region src/composables/useChatbotAuth.ts
|
|
10043
10029
|
k(), H();
|
|
10044
|
-
function
|
|
10030
|
+
function sp() {
|
|
10045
10031
|
return {
|
|
10046
10032
|
id: "anonymous-reauth",
|
|
10047
10033
|
getActions: (e) => ({ signIn: { anonymousReauth: async (t) => e("/sign-in/anonymous-reauth", {
|
|
@@ -10051,7 +10037,7 @@ function cp() {
|
|
|
10051
10037
|
pathMethods: { "/sign-in/anonymous-reauth": "POST" }
|
|
10052
10038
|
};
|
|
10053
10039
|
}
|
|
10054
|
-
function
|
|
10040
|
+
function cp() {
|
|
10055
10041
|
return {
|
|
10056
10042
|
id: "external-auth",
|
|
10057
10043
|
getActions: (e) => ({ signIn: { externalToken: async (t) => e("/sign-in/external-token", {
|
|
@@ -10065,21 +10051,25 @@ function lp() {
|
|
|
10065
10051
|
}]
|
|
10066
10052
|
};
|
|
10067
10053
|
}
|
|
10068
|
-
|
|
10069
|
-
|
|
10054
|
+
var lp = "better-auth:oauth-popup";
|
|
10055
|
+
function up() {
|
|
10056
|
+
let e = crypto.getRandomValues(/* @__PURE__ */ new Uint8Array(16));
|
|
10057
|
+
return Array.from(e, (e) => e.toString(16).padStart(2, "0")).join("");
|
|
10058
|
+
}
|
|
10059
|
+
function dp(e = {}) {
|
|
10060
|
+
let t = W(tp(e.cookieName)), n = U(() => Y(e.useHostSession) ?? !1), r = U({
|
|
10070
10061
|
get: () => t.value,
|
|
10071
10062
|
set: (n) => {
|
|
10072
|
-
|
|
10063
|
+
ep(n, e.cookieName), t.value = n;
|
|
10073
10064
|
}
|
|
10074
|
-
}), i = U(() => !n.value && r.value ? { Authorization: `Bearer ${r.value}` } : void 0), a =
|
|
10065
|
+
}), i = U(() => !n.value && r.value ? { Authorization: `Bearer ${r.value}` } : void 0), a = Kf({
|
|
10075
10066
|
baseURL: e.baseUrl ?? "https://ai-api.8wave.it",
|
|
10076
10067
|
basePath: e.basePath ?? "auth",
|
|
10077
10068
|
plugins: [
|
|
10078
|
-
Yf(),
|
|
10079
10069
|
Jf(),
|
|
10080
|
-
|
|
10081
|
-
|
|
10082
|
-
|
|
10070
|
+
qf(),
|
|
10071
|
+
sp(),
|
|
10072
|
+
cp()
|
|
10083
10073
|
],
|
|
10084
10074
|
fetchOptions: {
|
|
10085
10075
|
onSuccess: (e) => {
|
|
@@ -10110,10 +10100,10 @@ function up(e = {}) {
|
|
|
10110
10100
|
});
|
|
10111
10101
|
async function m() {
|
|
10112
10102
|
let { data: t } = await a.signIn.anonymous();
|
|
10113
|
-
t?.token && (r.value = t.token, t.user?.id &&
|
|
10103
|
+
t?.token && (r.value = t.token, t.user?.id && np(t.user.id, e.cookieName));
|
|
10114
10104
|
}
|
|
10115
10105
|
async function h() {
|
|
10116
|
-
let t =
|
|
10106
|
+
let t = rp(e.cookieName);
|
|
10117
10107
|
if (!t) return !1;
|
|
10118
10108
|
try {
|
|
10119
10109
|
let { data: e } = await a.signIn.anonymousReauth({ userId: t });
|
|
@@ -10196,7 +10186,7 @@ function up(e = {}) {
|
|
|
10196
10186
|
S(u.value);
|
|
10197
10187
|
return;
|
|
10198
10188
|
}
|
|
10199
|
-
i?.isAnonymous && i.id && !
|
|
10189
|
+
i?.isAnonymous && i.id && !rp(e.cookieName) && np(i.id, e.cookieName);
|
|
10200
10190
|
}
|
|
10201
10191
|
}, { immediate: !0 }), P(n, () => {
|
|
10202
10192
|
o.value.refetch();
|
|
@@ -10227,7 +10217,7 @@ function up(e = {}) {
|
|
|
10227
10217
|
password: n,
|
|
10228
10218
|
rememberMe: i
|
|
10229
10219
|
});
|
|
10230
|
-
return o.data?.token && (r.value = o.data.token,
|
|
10220
|
+
return o.data?.token && (r.value = o.data.token, ip(e.cookieName)), o;
|
|
10231
10221
|
}
|
|
10232
10222
|
function te(e) {
|
|
10233
10223
|
return a.signUp.email(e);
|
|
@@ -10239,21 +10229,20 @@ function up(e = {}) {
|
|
|
10239
10229
|
});
|
|
10240
10230
|
}
|
|
10241
10231
|
async function E(t, n) {
|
|
10242
|
-
let i = e.baseUrl ?? "https://ai-api.8wave.it",
|
|
10243
|
-
|
|
10244
|
-
|
|
10245
|
-
}), l = window.open(c, "eightwave-oauth", "width=600,height=700,menubar=no,toolbar=no");
|
|
10232
|
+
let i = e.baseUrl ?? "https://ai-api.8wave.it", a = e.basePath ?? "auth", s = up(), c = new URL(`${i}/${a}/oauth-popup/start`);
|
|
10233
|
+
c.searchParams.set("provider", t), c.searchParams.set("popupOrigin", window.location.origin), c.searchParams.set("popupNonce", s);
|
|
10234
|
+
let l = window.open(c.toString(), "eightwave-oauth", "width=600,height=700,menubar=no,toolbar=no");
|
|
10246
10235
|
return l ? new Promise((t) => {
|
|
10247
|
-
let a = new URL(i).origin,
|
|
10248
|
-
l?.closed &&
|
|
10236
|
+
let a = new URL(i).origin, c = setInterval(() => {
|
|
10237
|
+
l?.closed && u();
|
|
10249
10238
|
}, 500);
|
|
10250
|
-
function
|
|
10251
|
-
window.removeEventListener("message",
|
|
10239
|
+
function u() {
|
|
10240
|
+
window.removeEventListener("message", d), clearInterval(c), t({ popupBlocked: !1 });
|
|
10252
10241
|
}
|
|
10253
|
-
function
|
|
10254
|
-
t.origin === a && t.data?.type ===
|
|
10242
|
+
function d(t) {
|
|
10243
|
+
t.origin === a && t.source === l && t.data?.type === lp && t.data.nonce === s && (l?.close(), typeof t.data.token == "string" && t.data.token && (r.value = t.data.token, ip(e.cookieName), o.value.refetch().then(() => n?.())), u());
|
|
10255
10244
|
}
|
|
10256
|
-
window.addEventListener("message",
|
|
10245
|
+
window.addEventListener("message", d);
|
|
10257
10246
|
}) : { popupBlocked: !0 };
|
|
10258
10247
|
}
|
|
10259
10248
|
async function re() {
|
|
@@ -10287,7 +10276,7 @@ function up(e = {}) {
|
|
|
10287
10276
|
//#endregion
|
|
10288
10277
|
//#region src/composables/useChatbotStoreSync.ts
|
|
10289
10278
|
k();
|
|
10290
|
-
function
|
|
10279
|
+
function fp(e) {
|
|
10291
10280
|
let t = dd(e.agentId);
|
|
10292
10281
|
return ue(() => {
|
|
10293
10282
|
t.baseUrl = e.baseUrl, t.headers = e.headers.value, t.userId = e.userId.value;
|
|
@@ -10295,11 +10284,11 @@ function dp(e) {
|
|
|
10295
10284
|
}
|
|
10296
10285
|
//#endregion
|
|
10297
10286
|
//#region ../../packages/components/src/chat/chatbotProfileContext.ts
|
|
10298
|
-
var
|
|
10287
|
+
var pp = Symbol("chatbotProfileContext");
|
|
10299
10288
|
//#endregion
|
|
10300
10289
|
//#region src/composables/useChatbotProfile.ts
|
|
10301
10290
|
k(), H();
|
|
10302
|
-
function
|
|
10291
|
+
function mp(e) {
|
|
10303
10292
|
let { session: t, signOut: n, erasure: r } = e, i = U(() => {
|
|
10304
10293
|
let e = t.value.data?.user;
|
|
10305
10294
|
return !e || e.isAnonymous ? null : {
|
|
@@ -10315,7 +10304,7 @@ function pp(e) {
|
|
|
10315
10304
|
canManageProfile: U(() => i.value !== null),
|
|
10316
10305
|
canSignIn: U(() => Y(e.canSignIn) ?? !1),
|
|
10317
10306
|
isExternalAuth: U(() => Y(e.isExternalAuth) ?? !1),
|
|
10318
|
-
profileUrl: U(() => `${
|
|
10307
|
+
profileUrl: U(() => `${op}/app/profile`),
|
|
10319
10308
|
signOut: n,
|
|
10320
10309
|
eraseConversations: r ? async () => {
|
|
10321
10310
|
let e = await fetch(`${r.baseUrl}/api/v1/me/conversations/erasure`, {
|
|
@@ -10332,14 +10321,14 @@ function pp(e) {
|
|
|
10332
10321
|
//#endregion
|
|
10333
10322
|
//#region src/composables/useChatbotProfileProvider.ts
|
|
10334
10323
|
k();
|
|
10335
|
-
function
|
|
10324
|
+
function hp(e) {
|
|
10336
10325
|
let { agent: t, branding: n, authMethods: r, session: i, signOut: a, token: o } = e, s = U(() => !!r.value && (r.value.emailPassword || r.value.google || r.value.microsoft)), c = U(() => s.value && t.value?.interface?.interactiveLogin !== !1), l = U(() => t.value ? {
|
|
10337
10326
|
id: t.value.id,
|
|
10338
10327
|
name: t.value.name,
|
|
10339
10328
|
organizationId: t.value.organizationId,
|
|
10340
10329
|
interface: t.value.interface
|
|
10341
10330
|
} : n.value);
|
|
10342
|
-
return j(
|
|
10331
|
+
return j(pp, mp({
|
|
10343
10332
|
session: i,
|
|
10344
10333
|
signOut: a,
|
|
10345
10334
|
canSignIn: c,
|
|
@@ -10348,7 +10337,7 @@ function mp(e) {
|
|
|
10348
10337
|
baseUrl: e.baseUrl,
|
|
10349
10338
|
headers: e.headers,
|
|
10350
10339
|
onAccountDeleted: async () => {
|
|
10351
|
-
|
|
10340
|
+
ip(e.cookieName), o.value = "", await i.value.refetch();
|
|
10352
10341
|
}
|
|
10353
10342
|
}
|
|
10354
10343
|
})), {
|
|
@@ -10359,7 +10348,7 @@ function mp(e) {
|
|
|
10359
10348
|
//#endregion
|
|
10360
10349
|
//#region src/composables/useChatbotAgent.ts
|
|
10361
10350
|
k(), H();
|
|
10362
|
-
function
|
|
10351
|
+
function gp(e) {
|
|
10363
10352
|
let t = W(), n = W(), r = W(), i = W(!1), a = W(!1), o = W(!1);
|
|
10364
10353
|
async function s() {
|
|
10365
10354
|
let s = Y(e.organizationSlug), c = Y(e.agentId);
|
|
@@ -10410,7 +10399,7 @@ function hp(e) {
|
|
|
10410
10399
|
//#endregion
|
|
10411
10400
|
//#region src/composables/useChatbotAuthForm.ts
|
|
10412
10401
|
H();
|
|
10413
|
-
function
|
|
10402
|
+
function _p(e) {
|
|
10414
10403
|
let { t } = Ie({ useScope: "global" }), n = W(), r = W(), i = W(!1), a = (e) => e?.message ?? t("auth.genericError");
|
|
10415
10404
|
async function o(e) {
|
|
10416
10405
|
n.value = void 0, r.value = void 0, i.value = !0;
|
|
@@ -10477,7 +10466,7 @@ function gp(e) {
|
|
|
10477
10466
|
//#endregion
|
|
10478
10467
|
//#region src/composables/useFocusTrapBypass.ts
|
|
10479
10468
|
k();
|
|
10480
|
-
function
|
|
10469
|
+
function vp() {
|
|
10481
10470
|
let e = null, t = (e) => {
|
|
10482
10471
|
e.stopPropagation();
|
|
10483
10472
|
};
|
|
@@ -10489,7 +10478,7 @@ function _p() {
|
|
|
10489
10478
|
});
|
|
10490
10479
|
}
|
|
10491
10480
|
k(), H(), J();
|
|
10492
|
-
var
|
|
10481
|
+
var yp = ["src"], bp = /*#__PURE__*/ Qt(/* @__PURE__ */ w({
|
|
10493
10482
|
__name: "PkAvatar",
|
|
10494
10483
|
props: {
|
|
10495
10484
|
name: {
|
|
@@ -10526,7 +10515,7 @@ var vp = ["src"], yp = /*#__PURE__*/ Qt(/* @__PURE__ */ w({
|
|
|
10526
10515
|
src: e.imgSrc,
|
|
10527
10516
|
alt: "avatar",
|
|
10528
10517
|
onError: n[0] ||= (t) => L(r)(e.imgSrc)
|
|
10529
|
-
}, null, 40,
|
|
10518
|
+
}, null, 40, yp)) : o.value ? (D(), K(z, { key: 1 }, [I(N(o.value), 1)], 64)) : e.fallbackIcon ? (D(), B(s, {
|
|
10530
10519
|
key: 2,
|
|
10531
10520
|
name: e.fallbackIcon
|
|
10532
10521
|
}, null, 8, ["name"])) : F("", !0)]),
|
|
@@ -10536,13 +10525,13 @@ var vp = ["src"], yp = /*#__PURE__*/ Qt(/* @__PURE__ */ w({
|
|
|
10536
10525
|
}
|
|
10537
10526
|
}), [["styles", [".pk-avatar{object-fit:cover;overflow:hidden}.pk-avatar>.vv-icon{font-size:1.4em}"]]]);
|
|
10538
10527
|
k(), H();
|
|
10539
|
-
var
|
|
10528
|
+
var xp = {
|
|
10540
10529
|
class: "pk-aurora",
|
|
10541
10530
|
"aria-hidden": "true"
|
|
10542
|
-
},
|
|
10531
|
+
}, Sp = {
|
|
10543
10532
|
key: 1,
|
|
10544
10533
|
class: "pk-aurora__fallback"
|
|
10545
|
-
},
|
|
10534
|
+
}, Cp = "\nattribute vec2 a_position;\nvoid main() {\n gl_Position = vec4(a_position, 0.0, 1.0);\n}", wp = "\nprecision mediump float;\nuniform vec2 u_resolution;\nuniform float u_time;\nuniform vec3 u_color;\nuniform vec2 u_center;\nuniform vec2 u_half;\nuniform float u_spread;\n\nvec3 permute(vec3 x) { return mod(((x * 34.0) + 1.0) * x, 289.0); }\n\nfloat snoise(vec2 v) {\n const vec4 C = vec4(0.211324865405187, 0.366025403784439,\n -0.577350269189626, 0.024390243902439);\n vec2 i = floor(v + dot(v, C.yy));\n vec2 x0 = v - i + dot(i, C.xx);\n vec2 i1 = (x0.x > x0.y) ? vec2(1.0, 0.0) : vec2(0.0, 1.0);\n vec4 x12 = x0.xyxy + C.xxzz;\n x12.xy -= i1;\n i = mod(i, 289.0);\n vec3 p = permute(permute(i.y + vec3(0.0, i1.y, 1.0))\n + i.x + vec3(0.0, i1.x, 1.0));\n vec3 m = max(0.5 - vec3(dot(x0, x0), dot(x12.xy, x12.xy),\n dot(x12.zw, x12.zw)), 0.0);\n m = m * m;\n m = m * m;\n vec3 x = 2.0 * fract(p * C.www) - 1.0;\n vec3 h = abs(x) - 0.5;\n vec3 ox = floor(x + 0.5);\n vec3 a0 = x - ox;\n m *= 1.79284291400159 - 0.85373472095314 * (a0 * a0 + h * h);\n vec3 g;\n g.x = a0.x * x0.x + h.x * x0.y;\n g.yz = a0.yz * x12.xz + h.yz * x12.yw;\n return 130.0 * dot(m, g);\n}\n\nvoid main() {\n vec2 px = gl_FragCoord.xy;\n vec2 rel = px - u_center;\n\n // Ignition: the ellipse lights up expanding from the center on mount\n float intro = smoothstep(0.0, 1.4, u_time);\n\n // Breathing: size and brightness oscillate gently but visibly\n float breath = 1.0\n + 0.12 * sin(u_time * 0.55)\n + 0.06 * snoise(vec2(u_time * 0.1, 3.7));\n float pulse = 1.0 + 0.2 * sin(u_time * 0.55 + 1.3);\n\n // Keep it simple (Gemini-style): one huge soft elliptical glow\n // centered on the pill\n vec2 radii = vec2(u_half.x * 0.95, u_half.y * 6.5)\n * u_spread\n * breath\n * mix(0.15, 1.0, intro);\n float r = length(rel / max(radii, vec2(1.0)));\n float glow = exp(-r * r * 2.2);\n\n // Never cut hard against the canvas bounds\n vec2 m = min(px, u_resolution - px);\n glow *= smoothstep(0.0, 32.0, min(m.x, m.y));\n\n // Dither: breaks the 8-bit banding rings of the very soft gradient\n // (no CSS blur on the canvas, the noise must fully mask the bands)\n glow = max(glow + (snoise(px * 0.9) - 0.5) * 0.03, 0.0);\n\n float alpha = glow * 0.2 * pulse * intro;\n\n // Premultiplied alpha (default canvas compositing)\n gl_FragColor = vec4(u_color * alpha, alpha);\n}", Tp = /*#__PURE__*/ Qt(/* @__PURE__ */ w({
|
|
10546
10535
|
__name: "PkAuroraCanvas",
|
|
10547
10536
|
props: { sourceSelector: { type: String } },
|
|
10548
10537
|
setup(e) {
|
|
@@ -10583,7 +10572,7 @@ var bp = {
|
|
|
10583
10572
|
r.value = !0;
|
|
10584
10573
|
return;
|
|
10585
10574
|
}
|
|
10586
|
-
let a = p(i.VERTEX_SHADER,
|
|
10575
|
+
let a = p(i.VERTEX_SHADER, Cp), f = p(i.FRAGMENT_SHADER, wp), y = i.createProgram();
|
|
10587
10576
|
if (!a || !f || !y) {
|
|
10588
10577
|
r.value = !0;
|
|
10589
10578
|
return;
|
|
@@ -10617,7 +10606,7 @@ var bp = {
|
|
|
10617
10606
|
i = null, setTimeout(() => {
|
|
10618
10607
|
e?.getExtension("WEBGL_lose_context")?.loseContext();
|
|
10619
10608
|
}, 150);
|
|
10620
|
-
}), (e, t) => (D(), K("div",
|
|
10609
|
+
}), (e, t) => (D(), K("div", xp, [r.value ? (D(), K("div", Sp)) : (D(), K("canvas", {
|
|
10621
10610
|
key: 0,
|
|
10622
10611
|
ref_key: "canvasEl",
|
|
10623
10612
|
ref: n,
|
|
@@ -10628,7 +10617,7 @@ var bp = {
|
|
|
10628
10617
|
k(), H(), J();
|
|
10629
10618
|
//#endregion
|
|
10630
10619
|
//#region ../../packages/components/src/chat/PkChatbotError.vue
|
|
10631
|
-
var
|
|
10620
|
+
var Ep = /* @__PURE__ */ w({
|
|
10632
10621
|
__name: "PkChatbotError",
|
|
10633
10622
|
props: { error: { type: Error } },
|
|
10634
10623
|
emits: ["retry", "reset"],
|
|
@@ -10684,10 +10673,10 @@ var Tp = /* @__PURE__ */ w({
|
|
|
10684
10673
|
}
|
|
10685
10674
|
});
|
|
10686
10675
|
k(), H(), J(), Te();
|
|
10687
|
-
var
|
|
10676
|
+
var Dp = { class: "border border-surface-3 rounded-xl w-full overflow-hidden bg-surface" }, Op = { class: "px-sm py-6 bg-surface-1 min-h-40 text-12 border-b border-surface-3 text-word-3 flex items-center gap-8 min-h-40" }, kp = { class: "font-bold" }, Ap = { key: 0 }, jp = { class: "p-sm" }, Mp = { class: "flex justify-end border-t border-surface-3 px-sm py-10" }, Np = {
|
|
10688
10677
|
key: 1,
|
|
10689
10678
|
class: "p-sm"
|
|
10690
|
-
},
|
|
10679
|
+
}, Pp = { class: "flex items-center gap-sm" }, Fp = { class: "font-medium block text-word-1" }, Ip = { class: "text-word-3" }, Lp = /* @__PURE__ */ w({
|
|
10691
10680
|
__name: "PkChatbotFeedbackForm",
|
|
10692
10681
|
props: {
|
|
10693
10682
|
submitted: { type: Boolean },
|
|
@@ -10701,12 +10690,12 @@ var Ep = { class: "border border-surface-3 rounded-xl w-full overflow-hidden bg-
|
|
|
10701
10690
|
};
|
|
10702
10691
|
return (t, r) => {
|
|
10703
10692
|
let i = Gt, s = Wt, u = Ut, d = Rt;
|
|
10704
|
-
return D(), K("div",
|
|
10693
|
+
return D(), K("div", Dp, [V("div", Op, [
|
|
10705
10694
|
q(i, {
|
|
10706
10695
|
name: "ri:feedback-line",
|
|
10707
10696
|
class: "text-16"
|
|
10708
10697
|
}),
|
|
10709
|
-
V("strong",
|
|
10698
|
+
V("strong", kp, N(L(n)("action.feedback")), 1),
|
|
10710
10699
|
q(s, {
|
|
10711
10700
|
icon: "ri:close-line",
|
|
10712
10701
|
modifiers: "action-quiet-small",
|
|
@@ -10715,15 +10704,15 @@ var Ep = { class: "border border-surface-3 rounded-xl w-full overflow-hidden bg-
|
|
|
10715
10704
|
onClick: r[0] ||= Oe((e) => t.$emit("close"), ["stop"])
|
|
10716
10705
|
}, null, 8, ["title"])
|
|
10717
10706
|
]), q(G, { mode: "out-in" }, {
|
|
10718
|
-
default: S(() => [e.submitted ? (D(), K("div",
|
|
10707
|
+
default: S(() => [e.submitted ? (D(), K("div", Np, [V("div", Pp, [q(i, {
|
|
10719
10708
|
name: "ri:check-line",
|
|
10720
10709
|
class: "text-16 text-success"
|
|
10721
|
-
}), V("div", null, [V("strong",
|
|
10710
|
+
}), V("div", null, [V("strong", Fp, N(L(n)("message.feedbackSubmittedTitle")), 1), V("p", Ip, N(L(n)("message.feedbackSubmittedMessage")), 1)])])])) : (D(), K("div", Ap, [q(L(a), {
|
|
10722
10711
|
modelValue: L(c),
|
|
10723
10712
|
"onUpdate:modelValue": r[2] ||= (e) => R(c) ? c.value = e : null,
|
|
10724
10713
|
onSubmit: l
|
|
10725
10714
|
}, {
|
|
10726
|
-
default: S(() => [V("div",
|
|
10715
|
+
default: S(() => [V("div", jp, [e.error ? (D(), B(u, {
|
|
10727
10716
|
key: 0,
|
|
10728
10717
|
modifiers: "danger",
|
|
10729
10718
|
class: "mb-sm",
|
|
@@ -10736,7 +10725,7 @@ var Ep = { class: "border border-surface-3 rounded-xl w-full overflow-hidden bg-
|
|
|
10736
10725
|
placeholder: L(n)("placeholder.comment"),
|
|
10737
10726
|
modifiers: "compact no-label",
|
|
10738
10727
|
class: "mb-0"
|
|
10739
|
-
}, null, 8, ["label", "placeholder"])]), V("div",
|
|
10728
|
+
}, null, 8, ["label", "placeholder"])]), V("div", Mp, [q(d, null, {
|
|
10740
10729
|
default: S(() => [q(s, {
|
|
10741
10730
|
type: "button",
|
|
10742
10731
|
modifiers: "action-quiet",
|
|
@@ -10767,13 +10756,13 @@ var Ep = { class: "border border-surface-3 rounded-xl w-full overflow-hidden bg-
|
|
|
10767
10756
|
}
|
|
10768
10757
|
});
|
|
10769
10758
|
k(), J();
|
|
10770
|
-
var
|
|
10759
|
+
var Rp = { class: "pk-message-feedback__badge" }, zp = {
|
|
10771
10760
|
key: 0,
|
|
10772
10761
|
class: "pk-message-feedback__emoji"
|
|
10773
|
-
},
|
|
10762
|
+
}, Bp = {
|
|
10774
10763
|
key: 0,
|
|
10775
10764
|
class: "pk-message-feedback__comment"
|
|
10776
|
-
},
|
|
10765
|
+
}, Vp = /*#__PURE__*/ Qt(/* @__PURE__ */ w({
|
|
10777
10766
|
__name: "PkChatbotMessageFeedback",
|
|
10778
10767
|
props: { feedback: { type: null } },
|
|
10779
10768
|
setup(e) {
|
|
@@ -10797,35 +10786,35 @@ var Lp = { class: "pk-message-feedback__badge" }, Rp = {
|
|
|
10797
10786
|
});
|
|
10798
10787
|
return (t, a) => {
|
|
10799
10788
|
let o = Gt;
|
|
10800
|
-
return D(), K("div", { class: ce(["pk-message-feedback", r.value]) }, [V("span",
|
|
10789
|
+
return D(), K("div", { class: ce(["pk-message-feedback", r.value]) }, [V("span", Rp, [n.value ? (D(), K("span", zp, N(n.value), 1)) : (D(), B(o, {
|
|
10801
10790
|
key: 1,
|
|
10802
10791
|
name: i.value
|
|
10803
|
-
}, null, 8, ["name"]))]), e.feedback.comment ? (D(), K("p",
|
|
10792
|
+
}, null, 8, ["name"]))]), e.feedback.comment ? (D(), K("p", Bp, N(e.feedback.comment), 1)) : F("", !0)], 2);
|
|
10804
10793
|
};
|
|
10805
10794
|
}
|
|
10806
10795
|
}), [["styles", [".pk-message-feedback{align-items:center;gap:var(--spacing-8);padding:var(--spacing-6) var(--spacing-12) var(--spacing-6) var(--spacing-6);border-radius:var(--rounded-lg);background:var(--pk-feedback-surface);font-size:var(--text-12);color:var(--color-word-2);display:flex}.pk-message-feedback--positive{--pk-feedback-accent:var(--color-success)}.pk-message-feedback--negative{--pk-feedback-accent:var(--color-danger)}.pk-message-feedback--neutral{--pk-feedback-accent:var(--color-surface-4)}.pk-message-feedback{--pk-feedback-surface:color-mix(in srgb, var(--pk-feedback-accent) 8%, var(--color-surface))}.pk-message-feedback__badge{width:var(--spacing-22,1.375rem);height:var(--spacing-22,1.375rem);border-radius:var(--rounded-full,9999px);background:var(--color-surface);color:var(--pk-feedback-accent);box-shadow:var(--shadow-sm);flex-shrink:0;justify-content:center;align-items:center;display:inline-flex}.pk-message-feedback__emoji{font-size:var(--text-12);line-height:1}.pk-message-feedback__comment{white-space:pre-wrap;text-wrap:pretty;margin:0}"]]]);
|
|
10807
10796
|
k(), Te(), J(), H();
|
|
10808
|
-
var
|
|
10797
|
+
var Hp = [
|
|
10809
10798
|
"href",
|
|
10810
10799
|
"data-pswp-src",
|
|
10811
10800
|
"data-pswp-width",
|
|
10812
10801
|
"data-pswp-height",
|
|
10813
10802
|
"data-pswp-caption",
|
|
10814
10803
|
"aria-label"
|
|
10815
|
-
],
|
|
10804
|
+
], Up = ["src", "alt"], Wp = {
|
|
10816
10805
|
key: 0,
|
|
10817
10806
|
class: "pk-chatbot-file-preview__status pk-chatbot-file-preview__status--overlay"
|
|
10818
|
-
},
|
|
10807
|
+
}, Gp = {
|
|
10819
10808
|
key: 1,
|
|
10820
10809
|
class: "pk-chatbot-file-preview__status pk-chatbot-file-preview__status--overlay pk-chatbot-file-preview__status--error"
|
|
10821
|
-
},
|
|
10810
|
+
}, Kp = {
|
|
10822
10811
|
key: 0,
|
|
10823
10812
|
class: "pk-chatbot-file-preview__caption"
|
|
10824
|
-
},
|
|
10813
|
+
}, qp = ["title"], Jp = { class: "pk-chatbot-file-preview__meta" }, Yp = ["title"], Xp = ["title", "aria-label"], Zp = { class: "pk-chatbot-file-preview__body" }, Qp = ["title"], $p = { class: "pk-chatbot-file-preview__meta" }, em = ["title"], tm = [
|
|
10825
10814
|
"href",
|
|
10826
10815
|
"title",
|
|
10827
10816
|
"aria-label"
|
|
10828
|
-
],
|
|
10817
|
+
], nm = ["title", "aria-label"], rm = 300, im = /*#__PURE__*/ Qt(/* @__PURE__ */ w({
|
|
10829
10818
|
__name: "PkChatbotFilePreview",
|
|
10830
10819
|
props: {
|
|
10831
10820
|
mediaType: { type: String },
|
|
@@ -10936,7 +10925,7 @@ var Vp = [
|
|
|
10936
10925
|
for (; r >= 1024 && i < n.length - 1;) r /= 1024, i += 1;
|
|
10937
10926
|
return `${r < 10 ? r.toFixed(1) : Math.round(r)} ${n[i]}`;
|
|
10938
10927
|
}), l = /* @__PURE__ */ new Map(), u = (e, t) => {
|
|
10939
|
-
l.delete(e), l.set(e, t), l.size >
|
|
10928
|
+
l.delete(e), l.set(e, t), l.size > rm && l.delete(l.keys().next().value);
|
|
10940
10929
|
}, d = l.get(t.url), f = W(d?.status ?? "loading"), p = W(d?.dimensions), m = (e) => {
|
|
10941
10930
|
let n = e.target;
|
|
10942
10931
|
n.naturalWidth && n.naturalHeight && (p.value = {
|
|
@@ -10982,16 +10971,16 @@ var Vp = [
|
|
|
10982
10971
|
class: "pk-chatbot-file-preview__thumb",
|
|
10983
10972
|
onLoad: m,
|
|
10984
10973
|
onError: h
|
|
10985
|
-
}, null, 40,
|
|
10986
|
-
e.compact ? F("", !0) : (D(), K("figcaption",
|
|
10974
|
+
}, null, 40, Up), [[fe, f.value === "loaded"]])], 8, Hp), e.loading || f.value === "loading" ? (D(), K("span", Wp, [q(i, { name: "loading-loop" })])) : f.value === "error" ? (D(), K("span", Gp, [q(i, { name: "ri:image-2-line" })])) : F("", !0)], 512),
|
|
10975
|
+
e.compact ? F("", !0) : (D(), K("figcaption", Kp, [e.filename ? (D(), K("span", {
|
|
10987
10976
|
key: 0,
|
|
10988
10977
|
class: "pk-chatbot-file-preview__name",
|
|
10989
10978
|
title: e.filename
|
|
10990
|
-
}, N(e.filename), 9,
|
|
10979
|
+
}, N(e.filename), 9, qp)) : F("", !0), V("span", Jp, [e.error ? (D(), K("span", {
|
|
10991
10980
|
key: 0,
|
|
10992
10981
|
class: "pk-chatbot-file-preview__error",
|
|
10993
10982
|
title: e.error
|
|
10994
|
-
}, [q(i, { name: "ri:error-warning-line" }), I(" " + N(e.error), 1)], 8,
|
|
10983
|
+
}, [q(i, { name: "ri:error-warning-line" }), I(" " + N(e.error), 1)], 8, Yp)) : (D(), K(z, { key: 1 }, [I(N(_.value.join(" · ")), 1)], 64))])])),
|
|
10995
10984
|
e.removable && !e.loading ? (D(), K("button", {
|
|
10996
10985
|
key: 1,
|
|
10997
10986
|
type: "button",
|
|
@@ -10999,7 +10988,7 @@ var Vp = [
|
|
|
10999
10988
|
title: t.$t("action.remove"),
|
|
11000
10989
|
"aria-label": t.$t("action.remove"),
|
|
11001
10990
|
onClick: r[0] ||= Oe((e) => t.$emit("remove"), ["prevent"])
|
|
11002
|
-
}, [q(i, { name: "ri:close-line" })], 8,
|
|
10991
|
+
}, [q(i, { name: "ri:close-line" })], 8, Xp)) : F("", !0)
|
|
11003
10992
|
], 2)) : (D(), K("div", {
|
|
11004
10993
|
key: 1,
|
|
11005
10994
|
class: ce(["pk-chatbot-file-preview pk-chatbot-file-preview--doc", {
|
|
@@ -11019,15 +11008,15 @@ var Vp = [
|
|
|
11019
11008
|
name: o.value.icon,
|
|
11020
11009
|
class: "pk-chatbot-file-preview__icon"
|
|
11021
11010
|
}, null, 8, ["name"]))], 4),
|
|
11022
|
-
V("span",
|
|
11011
|
+
V("span", Zp, [e.filename ? (D(), K("span", {
|
|
11023
11012
|
key: 0,
|
|
11024
11013
|
class: "pk-chatbot-file-preview__name",
|
|
11025
11014
|
title: e.filename
|
|
11026
|
-
}, N(e.filename), 9,
|
|
11015
|
+
}, N(e.filename), 9, Qp)) : F("", !0), V("span", $p, [e.error ? (D(), K("span", {
|
|
11027
11016
|
key: 0,
|
|
11028
11017
|
class: "pk-chatbot-file-preview__error",
|
|
11029
11018
|
title: e.error
|
|
11030
|
-
}, [q(i, { name: "ri:error-warning-line" }), I(" " + N(e.error), 1)], 8,
|
|
11019
|
+
}, [q(i, { name: "ri:error-warning-line" }), I(" " + N(e.error), 1)], 8, em)) : (D(), K(z, { key: 1 }, [I(N(v.value.join(" · ")), 1)], 64))])]),
|
|
11031
11020
|
!e.loading && !e.error && !e.compact ? (D(), K("a", {
|
|
11032
11021
|
key: 0,
|
|
11033
11022
|
href: e.url,
|
|
@@ -11036,7 +11025,7 @@ var Vp = [
|
|
|
11036
11025
|
class: "pk-chatbot-file-preview__open",
|
|
11037
11026
|
title: t.$t("action.download"),
|
|
11038
11027
|
"aria-label": `${t.$t("action.download")}${e.filename ? ` — ${e.filename}` : ""}`
|
|
11039
|
-
}, [q(i, { name: "ri:download-2-line" })], 8,
|
|
11028
|
+
}, [q(i, { name: "ri:download-2-line" })], 8, tm)) : F("", !0),
|
|
11040
11029
|
e.removable && !e.loading ? (D(), K("button", {
|
|
11041
11030
|
key: 1,
|
|
11042
11031
|
type: "button",
|
|
@@ -11044,13 +11033,13 @@ var Vp = [
|
|
|
11044
11033
|
title: t.$t("action.remove"),
|
|
11045
11034
|
"aria-label": t.$t("action.remove"),
|
|
11046
11035
|
onClick: r[1] ||= (e) => t.$emit("remove")
|
|
11047
|
-
}, [q(i, { name: "ri:close-line" })], 10,
|
|
11036
|
+
}, [q(i, { name: "ri:close-line" })], 10, nm)) : F("", !0)
|
|
11048
11037
|
], 2));
|
|
11049
11038
|
};
|
|
11050
11039
|
}
|
|
11051
11040
|
}), [["styles", [".pk-chatbot-file-preview{--file-radius:var(--rounded-lg,12px);background-color:var(--color-surface-1);border:1px solid var(--color-surface-3);border-radius:var(--file-radius);max-width:280px;color:var(--color-word-2);font-size:var(--text-12);position:relative}.pk-chatbot-file-preview--error{border-color:var(--color-danger)}.pk-chatbot-file-preview--doc{align-items:center;gap:var(--spacing-8);padding:var(--spacing-8);min-width:0;transition:border-color .18s var(--ease-out), background-color .18s var(--ease-out), box-shadow .18s var(--ease-out);display:flex}.pk-chatbot-file-preview--doc:hover{border-color:var(--color-surface-4);background-color:var(--color-surface-2);box-shadow:var(--shadow-sm)}.pk-chatbot-file-preview__icon-tile{width:var(--spacing-36);height:var(--spacing-36);border-radius:var(--rounded-md,6px);background-color:color-mix(in srgb, var(--file-accent) 14%, transparent);color:var(--file-accent);flex-shrink:0;justify-content:center;align-items:center;display:flex}.pk-chatbot-file-preview__icon{width:var(--spacing-20);height:var(--spacing-20)}.pk-chatbot-file-preview__body{flex-direction:column;flex:1;gap:1px;min-width:0;display:flex}.pk-chatbot-file-preview__open{width:var(--spacing-28);height:var(--spacing-28);border-radius:var(--rounded);color:var(--color-word-3);opacity:0;transition:opacity .18s var(--ease-out), color .18s var(--ease-out), background-color .18s var(--ease-out);flex-shrink:0;justify-content:center;align-items:center;margin-inline-start:var(--spacing-4);text-decoration:none;display:flex}.pk-chatbot-file-preview__open:hover{background-color:var(--color-surface-3);color:var(--color-word-1)}.pk-chatbot-file-preview--doc:hover .pk-chatbot-file-preview__open,.pk-chatbot-file-preview--doc:focus-within .pk-chatbot-file-preview__open{opacity:1}@media (hover:none){.pk-chatbot-file-preview--doc .pk-chatbot-file-preview__open{opacity:1}}.pk-chatbot-file-preview--image{flex-direction:column;margin:0;display:inline-flex}.pk-chatbot-file-preview__thumb-wrap{background-color:var(--color-surface);border-radius:var(--file-radius);width:280px;max-width:100%;height:200px;display:flex;position:relative;overflow:hidden}.pk-chatbot-file-preview__thumb-link{cursor:pointer;width:100%;height:100%;display:flex}.pk-chatbot-file-preview__thumb{object-fit:cover;width:100%;height:100%;display:block}.pk-chatbot-file-preview__caption{padding:var(--spacing-8);flex-direction:column;gap:1px;min-width:0;display:flex}.pk-chatbot-file-preview__name{text-overflow:ellipsis;white-space:nowrap;min-width:0;font-weight:var(--font-medium,500);color:var(--color-word-1);overflow:hidden}.pk-chatbot-file-preview__meta{text-overflow:ellipsis;white-space:nowrap;min-width:0;font-size:var(--text-10);line-height:var(--leading-normal);min-height:1.4em;color:var(--color-word-4);font-variant-numeric:tabular-nums;overflow:hidden}.pk-chatbot-file-preview__error{align-items:center;gap:var(--spacing-4);color:var(--color-danger);display:inline-flex}.pk-chatbot-file-preview__error .vv-icon{flex-shrink:0}.pk-chatbot-file-preview__status{justify-content:center;align-items:center;display:inline-flex}.pk-chatbot-file-preview__status .vv-icon{width:var(--spacing-32);height:var(--spacing-32)}.pk-chatbot-file-preview__status--overlay{background-color:color-mix(in srgb, var(--color-surface-1) 70%, transparent);color:var(--color-word-1);position:absolute;inset:0}.pk-chatbot-file-preview__status--error{color:var(--color-word-4)}.pk-chatbot-file-preview__remove{width:var(--spacing-28);height:var(--spacing-28);border-radius:var(--rounded-full,9999px);background-color:color-mix(in srgb, var(--color-surface-1) 85%, transparent);color:var(--color-word-2);cursor:pointer;box-shadow:var(--shadow-sm);transition:background-color .18s var(--ease-out), color .18s var(--ease-out), scale .12s var(--ease-out);border:none;justify-content:center;align-items:center;padding:0;line-height:1;display:flex;position:absolute;top:0;right:0;transform:translate(50%,-50%)}.pk-chatbot-file-preview__remove:hover{background-color:var(--color-surface-2);color:var(--color-word-1)}.pk-chatbot-file-preview__remove:active{scale:.96}.pk-chatbot-file-preview__remove--inline{box-shadow:none;color:var(--color-word-4);background-color:#0000;flex-shrink:0;position:static}.pk-chatbot-file-preview__remove--inline:hover{background-color:var(--color-surface-3);color:var(--color-word-1)}.pk-chatbot-file-preview--compact{--chip-size:var(--spacing-56);max-width:240px}.pk-chatbot-file-preview--compact.pk-chatbot-file-preview--image{width:var(--chip-size);height:var(--chip-size);border-radius:var(--rounded-md,6px)}.pk-chatbot-file-preview--compact .pk-chatbot-file-preview__thumb-wrap,.pk-chatbot-file-preview--compact .pk-chatbot-file-preview__thumb-link{width:100%;height:100%}.pk-chatbot-file-preview--compact.pk-chatbot-file-preview--doc{height:var(--chip-size);gap:var(--spacing-8);padding:var(--spacing-8);padding-inline-end:var(--spacing-28)}.pk-chatbot-file-preview--compact .pk-chatbot-file-preview__icon-tile{aspect-ratio:1;align-self:stretch;width:auto;height:auto}.pk-chatbot-file-preview--compact .pk-chatbot-file-preview__icon{width:var(--spacing-20);height:var(--spacing-20)}.pk-chatbot-file-preview--compact .pk-chatbot-file-preview__remove{top:var(--spacing-4);right:var(--spacing-4);width:var(--spacing-24);height:var(--spacing-24);border:1px solid var(--color-surface-4);background-color:var(--color-surface);color:var(--color-word-1);font-size:var(--text-16);box-shadow:var(--shadow-sm)}.pk-chatbot-file-preview--compact .pk-chatbot-file-preview__remove:after{content:\"\";inset:calc(-1 * var(--spacing-4));position:absolute}.pk-chatbot-file-preview--compact .pk-chatbot-file-preview__remove:hover{background-color:var(--color-surface-2);color:var(--color-word-1)}@media (prefers-reduced-motion:reduce){.pk-chatbot-file-preview--doc,.pk-chatbot-file-preview__open,.pk-chatbot-file-preview__remove{transition:none}}"]]]);
|
|
11052
11041
|
k(), J(), H();
|
|
11053
|
-
var
|
|
11042
|
+
var am = ["datetime"], om = 6e4, sm = /* @__PURE__ */ w({
|
|
11054
11043
|
__name: "PkRelativeTime",
|
|
11055
11044
|
props: {
|
|
11056
11045
|
date: { type: [
|
|
@@ -11079,7 +11068,7 @@ var im = ["datetime"], am = 6e4, om = /* @__PURE__ */ w({
|
|
|
11079
11068
|
let t = e, { t: n } = Ie({ useScope: "global" }), r = W(Date.now()), i = null, a = U(() => t.date instanceof Date ? t.date.getTime() : typeof t.date == "string" ? new Date(t.date).getTime() : t.date), o = U(() => t.endDate === void 0 ? null : t.endDate instanceof Date ? t.endDate.getTime() : typeof t.endDate == "string" ? new Date(t.endDate).getTime() : t.endDate), s = U(() => {
|
|
11080
11069
|
let e = o.value ?? r.value;
|
|
11081
11070
|
return a.value - e;
|
|
11082
|
-
}), c = U(() => t.endDate ? s.value > 0 : s.value >
|
|
11071
|
+
}), c = U(() => t.endDate ? s.value > 0 : s.value > om), l = U(() => Math.abs(s.value)), { formatDelta: u } = kd(), d = U(() => {
|
|
11083
11072
|
let e = l.value;
|
|
11084
11073
|
return u(e);
|
|
11085
11074
|
}), f = U(() => {
|
|
@@ -11095,13 +11084,13 @@ var im = ["datetime"], am = 6e4, om = /* @__PURE__ */ w({
|
|
|
11095
11084
|
t.autoUpdate && !t.endDate && (i = setTimeout(h, m()));
|
|
11096
11085
|
}), ie(() => {
|
|
11097
11086
|
i && clearTimeout(i);
|
|
11098
|
-
}), (e, t) => (D(), K("time", { datetime: p.value }, N(f.value), 9,
|
|
11087
|
+
}), (e, t) => (D(), K("time", { datetime: p.value }, N(f.value), 9, am));
|
|
11099
11088
|
}
|
|
11100
11089
|
});
|
|
11101
11090
|
//#endregion
|
|
11102
11091
|
//#region ../../packages/components/src/chat/toolComponentMap.ts
|
|
11103
11092
|
k();
|
|
11104
|
-
var
|
|
11093
|
+
var cm = {
|
|
11105
11094
|
requestOAuthConnection: M(() => import("./_chunks/PkToolRequestOAuthConnection-CTp2w60F.js")),
|
|
11106
11095
|
showArtifact: M(() => import("./_chunks/PkToolShowArtifact-BfTjxGOT.js")),
|
|
11107
11096
|
showCalendarEvent: M(() => import("./_chunks/PkToolShowCalendarEvent-D0jVbqWt.js")),
|
|
@@ -11123,10 +11112,10 @@ var sm = {
|
|
|
11123
11112
|
showWebPages: M(() => import("./_chunks/PkToolShowWebPages-BgXlRdmH.js"))
|
|
11124
11113
|
};
|
|
11125
11114
|
k(), J();
|
|
11126
|
-
var
|
|
11115
|
+
var lm = {
|
|
11127
11116
|
key: 0,
|
|
11128
11117
|
class: "text-12 text-word-3 m-0 mb-xs"
|
|
11129
|
-
},
|
|
11118
|
+
}, um = /* @__PURE__ */ w({
|
|
11130
11119
|
__name: "PkToolApprovalPreviewMessage",
|
|
11131
11120
|
props: { input: { type: null } },
|
|
11132
11121
|
setup(e) {
|
|
@@ -11134,14 +11123,14 @@ var cm = {
|
|
|
11134
11123
|
let e = t.input;
|
|
11135
11124
|
return typeof e?.message == "string" ? e.message : "";
|
|
11136
11125
|
});
|
|
11137
|
-
return (e, t) => n.value ? (D(), K("p",
|
|
11126
|
+
return (e, t) => n.value ? (D(), K("p", lm, N(n.value), 1)) : F("", !0);
|
|
11138
11127
|
}
|
|
11139
|
-
}),
|
|
11128
|
+
}), dm = { [rt]: um };
|
|
11140
11129
|
k(), H(), J(), Te();
|
|
11141
|
-
var
|
|
11130
|
+
var fm = {
|
|
11142
11131
|
key: 0,
|
|
11143
11132
|
class: "text-12 text-word-3 m-0 mb-xs"
|
|
11144
|
-
},
|
|
11133
|
+
}, pm = /* @__PURE__ */ w({
|
|
11145
11134
|
__name: "PkToolApprovalCard",
|
|
11146
11135
|
props: {
|
|
11147
11136
|
part: { type: null },
|
|
@@ -11150,7 +11139,7 @@ var dm = {
|
|
|
11150
11139
|
},
|
|
11151
11140
|
emits: ["respond"],
|
|
11152
11141
|
setup(e, { emit: t }) {
|
|
11153
|
-
let n = e, r = t, { t: i } = Ie({ useScope: "global" }), a = U(() => n.part), o = U(() => lt(n.part)), s = U(() => o.value === rt), c = U(() => s.value ? (a.value.state === "input-available" || kt(a.value.output)) && n.callVerdict === void 0 : a.value.state === "approval-requested"), l = U(() => c.value && n.actionable === !0), u = U(() => c.value && n.actionable !== !0), d = U(() => s.value ? a.value.output === "confirmed" || n.callVerdict === !0 : a.value.approval?.approved === !0), f = U(() => s.value ? a.value.output === "cancelled" || n.callVerdict === !1 : a.value.approval?.approved === !1 || a.value.state === "output-denied"), p = U(() =>
|
|
11142
|
+
let n = e, r = t, { t: i } = Ie({ useScope: "global" }), a = U(() => n.part), o = U(() => lt(n.part)), s = U(() => o.value === rt), c = U(() => s.value ? (a.value.state === "input-available" || kt(a.value.output)) && n.callVerdict === void 0 : a.value.state === "approval-requested"), l = U(() => c.value && n.actionable === !0), u = U(() => c.value && n.actionable !== !0), d = U(() => s.value ? a.value.output === "confirmed" || n.callVerdict === !0 : a.value.approval?.approved === !0), f = U(() => s.value ? a.value.output === "cancelled" || n.callVerdict === !1 : a.value.approval?.approved === !1 || a.value.state === "output-denied"), p = U(() => dm[o.value]), m = U(() => {
|
|
11154
11143
|
if (u.value) return {
|
|
11155
11144
|
icon: "ri:time-line",
|
|
11156
11145
|
message: i("toolApproval.expired")
|
|
@@ -11168,7 +11157,7 @@ var dm = {
|
|
|
11168
11157
|
let o = Wt, u = Rt, d = Gt;
|
|
11169
11158
|
return D(), K("div", { class: ce(["w-full overflow-hidden transition-all duration-300", { "bg-surface p-sm rounded-xl border border-surface-3": !h.value }]) }, [
|
|
11170
11159
|
q(G, null, {
|
|
11171
|
-
default: S(() => [!s.value && c.value ? (D(), K("p",
|
|
11160
|
+
default: S(() => [!s.value && c.value ? (D(), K("p", fm, N(L(i)("toolApproval.prompt")), 1)) : F("", !0)]),
|
|
11172
11161
|
_: 1
|
|
11173
11162
|
}),
|
|
11174
11163
|
p.value ? (D(), B(re(p.value), {
|
|
@@ -11206,7 +11195,7 @@ var dm = {
|
|
|
11206
11195
|
}
|
|
11207
11196
|
});
|
|
11208
11197
|
k(), J(), H();
|
|
11209
|
-
var
|
|
11198
|
+
var mm = 8, hm = /* @__PURE__ */ w({
|
|
11210
11199
|
__name: "PkStreamingMarkdownAutoscroll",
|
|
11211
11200
|
props: {
|
|
11212
11201
|
markdown: { type: String },
|
|
@@ -11217,7 +11206,7 @@ var pm = 8, mm = /* @__PURE__ */ w({
|
|
|
11217
11206
|
setup(e) {
|
|
11218
11207
|
let t = W(), n = W(), r = !1, i, a = () => {
|
|
11219
11208
|
let e = t.value;
|
|
11220
|
-
e && e.scrollTop !== i && (i = void 0, r = e.scrollHeight - e.clientHeight - e.scrollTop >
|
|
11209
|
+
e && e.scrollTop !== i && (i = void 0, r = e.scrollHeight - e.clientHeight - e.scrollTop > mm);
|
|
11221
11210
|
};
|
|
11222
11211
|
return Ft([t, n], () => {
|
|
11223
11212
|
let e = t.value;
|
|
@@ -11243,19 +11232,19 @@ var pm = 8, mm = /* @__PURE__ */ w({
|
|
|
11243
11232
|
}
|
|
11244
11233
|
});
|
|
11245
11234
|
k(), J(), H();
|
|
11246
|
-
var
|
|
11235
|
+
var gm = {
|
|
11247
11236
|
key: 0,
|
|
11248
11237
|
class: "pk-chatbot-step-payload"
|
|
11249
|
-
},
|
|
11238
|
+
}, _m = ["aria-expanded"], vm = { class: "pk-chatbot-step-payload__label" }, ym = { class: "pk-chatbot-step-payload__summary" }, bm = {
|
|
11250
11239
|
key: 0,
|
|
11251
11240
|
class: "pk-chatbot-step-payload__rows"
|
|
11252
|
-
},
|
|
11241
|
+
}, xm = { class: "pk-chatbot-step-payload__key" }, Sm = { class: "pk-chatbot-step-payload__value" }, Cm = {
|
|
11253
11242
|
key: 0,
|
|
11254
11243
|
class: "pk-chatbot-step-payload__full"
|
|
11255
|
-
},
|
|
11244
|
+
}, wm = {
|
|
11256
11245
|
key: 1,
|
|
11257
11246
|
class: "pk-chatbot-step-payload__full"
|
|
11258
|
-
},
|
|
11247
|
+
}, Tm = 120, Em = /*#__PURE__*/ Qt(/* @__PURE__ */ w({
|
|
11259
11248
|
__name: "PkChatbotStepPayload",
|
|
11260
11249
|
props: {
|
|
11261
11250
|
label: { type: String },
|
|
@@ -11271,7 +11260,7 @@ var hm = {
|
|
|
11271
11260
|
}, i = (e) => {
|
|
11272
11261
|
if (e === void 0) return "";
|
|
11273
11262
|
let t = (typeof e == "string" ? e : r(e) ?? "").replace(/\s+/g, " ").trim();
|
|
11274
|
-
return t.length >
|
|
11263
|
+
return t.length > Tm ? `${t.slice(0, Tm)}…` : t;
|
|
11275
11264
|
}, a = U(() => {
|
|
11276
11265
|
let e = t.value;
|
|
11277
11266
|
if (Array.isArray(e)) return e.length ? e.map((e, t) => [`${t + 1}`, e]) : void 0;
|
|
@@ -11294,27 +11283,27 @@ var hm = {
|
|
|
11294
11283
|
};
|
|
11295
11284
|
return (t, n) => {
|
|
11296
11285
|
let r = Gt;
|
|
11297
|
-
return o.value || s.value ? (D(), K("div",
|
|
11286
|
+
return o.value || s.value ? (D(), K("div", gm, [V("button", {
|
|
11298
11287
|
type: "button",
|
|
11299
11288
|
class: "pk-chatbot-step-payload__header",
|
|
11300
11289
|
"aria-expanded": l.value,
|
|
11301
11290
|
onClick: n[0] ||= (e) => l.value = !l.value
|
|
11302
11291
|
}, [
|
|
11303
|
-
V("span",
|
|
11304
|
-
V("span",
|
|
11292
|
+
V("span", vm, N(e.label), 1),
|
|
11293
|
+
V("span", ym, N(c.value), 1),
|
|
11305
11294
|
q(r, {
|
|
11306
11295
|
name: l.value ? "ri:arrow-up-s-line" : "ri:arrow-down-s-line",
|
|
11307
11296
|
class: "shrink-0"
|
|
11308
11297
|
}, null, 8, ["name"])
|
|
11309
|
-
], 8,
|
|
11298
|
+
], 8, _m), l.value && o.value ? (D(), K("ul", bm, [(D(!0), K(z, null, Pe(o.value, (e) => (D(), K("li", { key: e.key }, [(D(), B(re(e.full ? "button" : "div"), {
|
|
11310
11299
|
type: e.full ? "button" : void 0,
|
|
11311
11300
|
class: "pk-chatbot-step-payload__row",
|
|
11312
11301
|
"aria-expanded": e.full ? u.has(e.key) : void 0,
|
|
11313
11302
|
onClick: (t) => e.full ? d(e.key) : void 0
|
|
11314
11303
|
}, {
|
|
11315
11304
|
default: S(() => [
|
|
11316
|
-
V("span",
|
|
11317
|
-
V("span",
|
|
11305
|
+
V("span", xm, N(e.key), 1),
|
|
11306
|
+
V("span", Sm, N(e.preview), 1),
|
|
11318
11307
|
e.full ? (D(), B(r, {
|
|
11319
11308
|
key: 0,
|
|
11320
11309
|
name: u.has(e.key) ? "ri:arrow-up-s-line" : "ri:arrow-down-s-line",
|
|
@@ -11326,37 +11315,37 @@ var hm = {
|
|
|
11326
11315
|
"type",
|
|
11327
11316
|
"aria-expanded",
|
|
11328
11317
|
"onClick"
|
|
11329
|
-
])), e.full && u.has(e.key) ? (D(), K("pre",
|
|
11318
|
+
])), e.full && u.has(e.key) ? (D(), K("pre", Cm, N(e.full), 1)) : F("", !0)]))), 128))])) : l.value ? (D(), K("pre", wm, N(s.value), 1)) : F("", !0)])) : F("", !0);
|
|
11330
11319
|
};
|
|
11331
11320
|
}
|
|
11332
11321
|
}), [["styles", [".pk-chatbot-step-payload{border:var(--spacing-px) solid var(--color-surface-3);border-radius:var(--rounded);background-color:var(--color-surface-1);overflow:hidden}.pk-chatbot-step-payload__header{align-items:center;gap:var(--spacing-8);width:100%;min-height:var(--spacing-28);padding:var(--spacing-4) var(--spacing-8);text-align:left;cursor:pointer;transition:background-color .2s;display:flex}.pk-chatbot-step-payload__header:hover{background-color:var(--color-surface-2)}.pk-chatbot-step-payload__label{font-weight:600;font-size:var(--text-10);text-transform:uppercase;letter-spacing:.05em;color:var(--color-word-3);flex-shrink:0}.pk-chatbot-step-payload__summary{text-overflow:ellipsis;white-space:nowrap;min-width:0;font-family:var(--font-mono);font-size:var(--text-10);color:var(--color-word-4);flex:1 1 0;overflow:hidden}.pk-chatbot-step-payload__rows>li{border-top:var(--spacing-px) solid var(--color-surface-3)}.pk-chatbot-step-payload__row{align-items:baseline;gap:var(--spacing-8);width:100%;padding:var(--spacing-4) var(--spacing-8);text-align:left;font-size:var(--text-10);display:flex}.pk-chatbot-step-payload__row:is(button){cursor:pointer;transition:background-color .2s}.pk-chatbot-step-payload__row:is(button):hover{background-color:var(--color-surface-2)}.pk-chatbot-step-payload__key{text-overflow:ellipsis;white-space:nowrap;max-width:40%;font-family:var(--font-mono);color:var(--color-word-4);flex-shrink:0;overflow:hidden}.pk-chatbot-step-payload__value{text-overflow:ellipsis;white-space:nowrap;min-width:0;color:var(--color-word-2);flex:1 1 0;overflow:hidden}.pk-chatbot-step-payload__full{padding:var(--spacing-8);border-top:var(--spacing-px) solid var(--color-surface-3);max-height:var(--spacing-160);white-space:pre-wrap;word-break:break-word;font-family:var(--font-mono);font-size:var(--text-10);color:var(--color-word-3);overflow:auto}"]]]);
|
|
11333
11322
|
k(), J(), H(), Te();
|
|
11334
|
-
var
|
|
11323
|
+
var Dm = { class: "pk-chatbot-step-detail" }, Om = {
|
|
11335
11324
|
key: 0,
|
|
11336
11325
|
class: "pk-chatbot-step-detail__chips"
|
|
11337
|
-
},
|
|
11326
|
+
}, km = { class: "pk-chatbot-step-detail__chip-text" }, Am = {
|
|
11338
11327
|
key: 1,
|
|
11339
11328
|
class: "pk-chatbot-step-detail__empty"
|
|
11340
|
-
},
|
|
11329
|
+
}, jm = {
|
|
11341
11330
|
key: 2,
|
|
11342
11331
|
class: "pk-chatbot-step-detail__hits"
|
|
11343
|
-
},
|
|
11332
|
+
}, Mm = { class: "pk-chatbot-step-detail__hit-heading" }, Nm = { class: "pk-chatbot-step-detail__hit-title" }, Pm = ["href"], Fm = {
|
|
11344
11333
|
key: 0,
|
|
11345
11334
|
class: "pk-chatbot-step-detail__hit-meta"
|
|
11346
|
-
},
|
|
11335
|
+
}, Im = {
|
|
11347
11336
|
key: 1,
|
|
11348
11337
|
class: "pk-chatbot-step-detail__relevance",
|
|
11349
11338
|
"aria-hidden": "true"
|
|
11350
|
-
},
|
|
11339
|
+
}, Lm = {
|
|
11351
11340
|
key: 0,
|
|
11352
11341
|
class: "pk-chatbot-step-detail__hit-body"
|
|
11353
|
-
},
|
|
11342
|
+
}, Rm = {
|
|
11354
11343
|
key: 3,
|
|
11355
11344
|
class: "pk-chatbot-step-detail__passage"
|
|
11356
|
-
},
|
|
11345
|
+
}, zm = { class: "pk-chatbot-step-detail__passage-header" }, Bm = { class: "pk-chatbot-step-detail__hit-heading" }, Vm = { class: "pk-chatbot-step-detail__hit-title" }, Hm = {
|
|
11357
11346
|
key: 0,
|
|
11358
11347
|
class: "pk-chatbot-step-detail__hit-meta"
|
|
11359
|
-
},
|
|
11348
|
+
}, Um = { class: "pk-chatbot-step-detail__passage-content" }, Wm = /*#__PURE__*/ Qt(/* @__PURE__ */ w({
|
|
11360
11349
|
__name: "PkChatbotStepToolDetail",
|
|
11361
11350
|
props: { part: { type: null } },
|
|
11362
11351
|
setup(e) {
|
|
@@ -11513,14 +11502,14 @@ var Em = { class: "pk-chatbot-step-detail" }, Dm = {
|
|
|
11513
11502
|
};
|
|
11514
11503
|
return (e, t) => {
|
|
11515
11504
|
let r = Gt;
|
|
11516
|
-
return D(), K("div",
|
|
11517
|
-
b.value.chips?.length ? (D(), K("ul",
|
|
11505
|
+
return D(), K("div", Dm, [
|
|
11506
|
+
b.value.chips?.length ? (D(), K("ul", Om, [(D(!0), K(z, null, Pe(b.value.chips, (e, t) => (D(), K("li", {
|
|
11518
11507
|
key: `${t}-${e}`,
|
|
11519
11508
|
class: "pk-chatbot-step-detail__chip"
|
|
11520
11509
|
}, [q(r, {
|
|
11521
11510
|
name: "ri:search-line",
|
|
11522
11511
|
class: "shrink-0"
|
|
11523
|
-
}), V("span",
|
|
11512
|
+
}), V("span", km, N(e), 1)]))), 128))])) : F("", !0),
|
|
11524
11513
|
(D(!0), K(z, null, Pe(b.value.facts, (e, t) => (D(), K("div", {
|
|
11525
11514
|
key: `${t}-${e.text}`,
|
|
11526
11515
|
class: "pk-chatbot-step-detail__fact"
|
|
@@ -11528,7 +11517,7 @@ var Em = { class: "pk-chatbot-step-detail" }, Dm = {
|
|
|
11528
11517
|
name: e.icon,
|
|
11529
11518
|
class: "shrink-0"
|
|
11530
11519
|
}, null, 8, ["name"]), V("span", null, N(e.text), 1)]))), 128)),
|
|
11531
|
-
b.value.showEmpty ? (D(), K("div",
|
|
11520
|
+
b.value.showEmpty ? (D(), K("div", Am, N(L(n)("messagePart.stepNoResults")), 1)) : b.value.hits?.length ? (D(), K("ul", jm, [(D(!0), K(z, null, Pe(b.value.hits, (e) => (D(), K("li", { key: e.key }, [(D(), B(re(e.body ? "button" : "div"), {
|
|
11532
11521
|
type: e.body ? "button" : void 0,
|
|
11533
11522
|
class: "pk-chatbot-step-detail__hit-header",
|
|
11534
11523
|
"aria-expanded": e.body ? x.has(e.key) : void 0,
|
|
@@ -11539,16 +11528,16 @@ var Em = { class: "pk-chatbot-step-detail" }, Dm = {
|
|
|
11539
11528
|
name: e.icon,
|
|
11540
11529
|
class: "pk-chatbot-step-detail__hit-icon"
|
|
11541
11530
|
}, null, 8, ["name"]),
|
|
11542
|
-
V("span",
|
|
11531
|
+
V("span", Mm, [V("span", Nm, N(e.title), 1), e.url ? (D(), K("a", {
|
|
11543
11532
|
key: 0,
|
|
11544
11533
|
href: e.url,
|
|
11545
11534
|
target: "_blank",
|
|
11546
11535
|
rel: "noopener noreferrer",
|
|
11547
11536
|
class: "pk-chatbot-step-detail__link",
|
|
11548
11537
|
onClick: t[0] ||= Oe(() => {}, ["stop"])
|
|
11549
|
-
}, [q(r, { name: "ri:external-link-line" })], 8,
|
|
11550
|
-
e.meta ? (D(), K("span",
|
|
11551
|
-
e.relevance === void 0 ? F("", !0) : (D(), K("span",
|
|
11538
|
+
}, [q(r, { name: "ri:external-link-line" })], 8, Pm)) : F("", !0)]),
|
|
11539
|
+
e.meta ? (D(), K("span", Fm, N(e.meta), 1)) : F("", !0),
|
|
11540
|
+
e.relevance === void 0 ? F("", !0) : (D(), K("span", Im, [V("span", {
|
|
11552
11541
|
class: "pk-chatbot-step-detail__relevance-fill",
|
|
11553
11542
|
style: Me({ width: `${Math.round(e.relevance * 100)}%` })
|
|
11554
11543
|
}, null, 4)])),
|
|
@@ -11563,21 +11552,21 @@ var Em = { class: "pk-chatbot-step-detail" }, Dm = {
|
|
|
11563
11552
|
"type",
|
|
11564
11553
|
"aria-expanded",
|
|
11565
11554
|
"onClick"
|
|
11566
|
-
])), e.body && x.has(e.key) ? (D(), K("div",
|
|
11567
|
-
b.value.passage ? (D(), K("div",
|
|
11555
|
+
])), e.body && x.has(e.key) ? (D(), K("div", Lm, N(e.body), 1)) : F("", !0)]))), 128))])) : F("", !0),
|
|
11556
|
+
b.value.passage ? (D(), K("div", Rm, [V("div", zm, [
|
|
11568
11557
|
q(r, {
|
|
11569
11558
|
name: "ri:file-text-line",
|
|
11570
11559
|
class: "shrink-0"
|
|
11571
11560
|
}),
|
|
11572
|
-
V("span",
|
|
11573
|
-
b.value.passage.meta ? (D(), K("span",
|
|
11574
|
-
]), V("div",
|
|
11575
|
-
L(nt)(b.value.rawInput) ? (D(), B(
|
|
11561
|
+
V("span", Bm, [V("span", Vm, N(b.value.passage.title ?? L(n)("messagePart.stepDocument")), 1)]),
|
|
11562
|
+
b.value.passage.meta ? (D(), K("span", Hm, N(b.value.passage.meta), 1)) : F("", !0)
|
|
11563
|
+
]), V("div", Um, N(b.value.passage.content), 1)])) : F("", !0),
|
|
11564
|
+
L(nt)(b.value.rawInput) ? (D(), B(Em, {
|
|
11576
11565
|
key: 4,
|
|
11577
11566
|
label: L(n)("messagePart.stepInput"),
|
|
11578
11567
|
value: b.value.rawInput
|
|
11579
11568
|
}, null, 8, ["label", "value"])) : F("", !0),
|
|
11580
|
-
L(nt)(b.value.rawOutput) ? (D(), B(
|
|
11569
|
+
L(nt)(b.value.rawOutput) ? (D(), B(Em, {
|
|
11581
11570
|
key: 5,
|
|
11582
11571
|
label: L(n)("messagePart.stepOutput"),
|
|
11583
11572
|
value: b.value.rawOutput
|
|
@@ -11587,25 +11576,25 @@ var Em = { class: "pk-chatbot-step-detail" }, Dm = {
|
|
|
11587
11576
|
}
|
|
11588
11577
|
}), [["styles", [".pk-chatbot-step-detail{gap:var(--spacing-8);font-size:var(--text-12);color:var(--color-word-3);flex-direction:column;display:flex}.pk-chatbot-step-detail__chips{gap:var(--spacing-4);flex-wrap:wrap;display:flex}.pk-chatbot-step-detail__chip{align-items:center;gap:var(--spacing-4);max-width:100%;padding:var(--spacing-2) var(--spacing-8);border:var(--spacing-px) solid var(--color-surface-3);border-radius:var(--rounded-full);background-color:var(--color-surface-1);color:var(--color-word-2);display:inline-flex}.pk-chatbot-step-detail__chip-text{text-overflow:ellipsis;white-space:nowrap;min-width:0;overflow:hidden}.pk-chatbot-step-detail__fact{align-items:center;gap:var(--spacing-8);color:var(--color-word-2);display:flex}.pk-chatbot-step-detail__empty{color:var(--color-word-4);font-style:italic}.pk-chatbot-step-detail__hits{border:var(--spacing-px) solid var(--color-surface-3);border-radius:var(--rounded);background-color:var(--color-surface-1);flex-direction:column;display:flex;overflow:hidden}.pk-chatbot-step-detail__hits>li+li{border-top:var(--spacing-px) solid var(--color-surface-3)}.pk-chatbot-step-detail__hit-header{align-items:center;gap:var(--spacing-8);width:100%;min-height:var(--spacing-32);padding:var(--spacing-4) var(--spacing-8);text-align:left;display:flex}.pk-chatbot-step-detail__hit-header:is(button){cursor:pointer;transition:background-color .2s}.pk-chatbot-step-detail__hit-header:is(button):hover{background-color:var(--color-surface-2)}.pk-chatbot-step-detail__hit-icon{color:var(--color-word-3);flex-shrink:0}.pk-chatbot-step-detail__hit-heading{align-items:center;gap:var(--spacing-4);flex:1 1 0;min-width:0;display:flex}.pk-chatbot-step-detail__hit-title{text-overflow:ellipsis;white-space:nowrap;min-width:0;color:var(--color-word-2);overflow:hidden}.pk-chatbot-step-detail__hit-meta{color:var(--color-word-4);font-variant-numeric:tabular-nums;white-space:nowrap}.pk-chatbot-step-detail__relevance{width:var(--spacing-40);height:var(--spacing-4);border-radius:var(--rounded-full);background-color:var(--color-surface-3);flex-shrink:0;overflow:hidden}.pk-chatbot-step-detail__relevance-fill{border-radius:inherit;background-color:var(--chatbot-main-color,var(--color-word-4));height:100%;display:block}.pk-chatbot-step-detail__link{color:var(--color-word-4);flex-shrink:0;display:inline-flex}.pk-chatbot-step-detail__link:hover{color:var(--color-word-1)}.pk-chatbot-step-detail__hit-body,.pk-chatbot-step-detail__passage-content{padding:var(--spacing-8);max-height:var(--spacing-160);white-space:pre-wrap;word-break:break-word;color:var(--color-word-3);overflow:auto}.pk-chatbot-step-detail__hit-body{border-top:var(--spacing-px) solid var(--color-surface-3)}.pk-chatbot-step-detail__passage{border:var(--spacing-px) solid var(--color-surface-3);border-radius:var(--rounded);background-color:var(--color-surface-1);overflow:hidden}.pk-chatbot-step-detail__passage-header{align-items:center;gap:var(--spacing-8);min-height:var(--spacing-32);padding:var(--spacing-4) var(--spacing-8);border-bottom:var(--spacing-px) solid var(--color-surface-3);display:flex}"]]]);
|
|
11589
11578
|
k(), H(), J();
|
|
11590
|
-
var
|
|
11579
|
+
var Gm = {
|
|
11591
11580
|
key: 0,
|
|
11592
11581
|
class: "pk-chatbot-steps"
|
|
11593
|
-
},
|
|
11582
|
+
}, Km = ["aria-expanded"], qm = { class: "pk-chatbot-steps__title" }, Jm = { class: "pk-chatbot-steps__meta" }, Ym = {
|
|
11594
11583
|
key: 0,
|
|
11595
11584
|
class: "pk-chatbot-steps__list"
|
|
11596
|
-
},
|
|
11585
|
+
}, Xm = { class: "pk-chatbot-steps__step-label" }, Zm = { class: "pk-chatbot-steps__step-summary" }, Qm = {
|
|
11597
11586
|
key: 0,
|
|
11598
11587
|
class: "pk-chatbot-steps__step-duration"
|
|
11599
|
-
},
|
|
11588
|
+
}, $m = {
|
|
11600
11589
|
key: 0,
|
|
11601
11590
|
class: "pk-chatbot-steps__step-body"
|
|
11602
|
-
},
|
|
11591
|
+
}, eh = {
|
|
11603
11592
|
key: 1,
|
|
11604
11593
|
class: "pk-chatbot-steps__step-content pk-chatbot-steps__step-content--scroll light-scrollbar"
|
|
11605
|
-
},
|
|
11594
|
+
}, th = {
|
|
11606
11595
|
key: 2,
|
|
11607
11596
|
class: "pk-chatbot-steps__step-payload pk-chatbot-steps__step-payload--error"
|
|
11608
|
-
},
|
|
11597
|
+
}, nh = { class: "pk-chatbot-steps__step-payload-label" }, rh = /*#__PURE__*/ Qt(/* @__PURE__ */ w({
|
|
11609
11598
|
__name: "PkChatbotSteps",
|
|
11610
11599
|
props: {
|
|
11611
11600
|
message: { type: Object },
|
|
@@ -11646,7 +11635,7 @@ var Wm = {
|
|
|
11646
11635
|
e && (d.value = void 0, c.clear());
|
|
11647
11636
|
}), (t, r) => {
|
|
11648
11637
|
let i = Gt;
|
|
11649
|
-
return a.value.length ? (D(), K("div",
|
|
11638
|
+
return a.value.length ? (D(), K("div", Gm, [V("button", {
|
|
11650
11639
|
type: "button",
|
|
11651
11640
|
class: "pk-chatbot-steps__header",
|
|
11652
11641
|
"aria-expanded": f.value,
|
|
@@ -11661,13 +11650,13 @@ var Wm = {
|
|
|
11661
11650
|
name: "ri:route-line",
|
|
11662
11651
|
class: "shrink-0"
|
|
11663
11652
|
})),
|
|
11664
|
-
V("span",
|
|
11665
|
-
V("span",
|
|
11653
|
+
V("span", qm, N(L(n)("messagePart.steps")), 1),
|
|
11654
|
+
V("span", Jm, [I(N(L(n)("messagePart.stepCount", a.value.length)) + " ", 1), s(o.value) ? (D(), K(z, { key: 0 }, [I(" · " + N(s(o.value)), 1)], 64)) : F("", !0)]),
|
|
11666
11655
|
q(i, {
|
|
11667
11656
|
name: f.value ? "ri:arrow-up-s-line" : "ri:arrow-down-s-line",
|
|
11668
11657
|
class: "pk-chatbot-steps__chevron shrink-0 ml-auto"
|
|
11669
11658
|
}, null, 8, ["name"])
|
|
11670
|
-
], 8,
|
|
11659
|
+
], 8, Km), f.value ? (D(), K("ol", Ym, [(D(!0), K(z, null, Pe(a.value, (t) => (D(), K("li", {
|
|
11671
11660
|
key: t.key,
|
|
11672
11661
|
class: ce(["pk-chatbot-steps__step", { "pk-chatbot-steps__step--active": t.isActive }])
|
|
11673
11662
|
}, [(D(), B(re(t.hasBody ? "button" : "div"), {
|
|
@@ -11684,9 +11673,9 @@ var Wm = {
|
|
|
11684
11673
|
key: 1,
|
|
11685
11674
|
name: t.icon
|
|
11686
11675
|
}, null, 8, ["name"])) : F("", !0)], 2),
|
|
11687
|
-
V("span",
|
|
11688
|
-
V("span",
|
|
11689
|
-
s(t.durationMs) ? (D(), K("span",
|
|
11676
|
+
V("span", Xm, N(t.label), 1),
|
|
11677
|
+
V("span", Zm, N(t.summary), 1),
|
|
11678
|
+
s(t.durationMs) ? (D(), K("span", Qm, N(s(t.durationMs)), 1)) : F("", !0),
|
|
11690
11679
|
t.hasBody ? (D(), B(i, {
|
|
11691
11680
|
key: 1,
|
|
11692
11681
|
name: l(t) ? "ri:arrow-up-s-line" : "ri:arrow-down-s-line",
|
|
@@ -11698,7 +11687,7 @@ var Wm = {
|
|
|
11698
11687
|
"type",
|
|
11699
11688
|
"aria-expanded",
|
|
11700
11689
|
"onClick"
|
|
11701
|
-
])), t.hasBody && l(t) ? (D(), K("div",
|
|
11690
|
+
])), t.hasBody && l(t) ? (D(), K("div", $m, [t.text && t.isActive ? (D(), B(hm, {
|
|
11702
11691
|
key: 0,
|
|
11703
11692
|
markdown: t.text,
|
|
11704
11693
|
"is-dark": e.isDark,
|
|
@@ -11709,18 +11698,18 @@ var Wm = {
|
|
|
11709
11698
|
"markdown",
|
|
11710
11699
|
"is-dark",
|
|
11711
11700
|
"tail-length"
|
|
11712
|
-
])) : t.text ? (D(), K("div",
|
|
11701
|
+
])) : t.text ? (D(), K("div", eh, [q(ot, {
|
|
11713
11702
|
markdown: t.text,
|
|
11714
11703
|
"is-dark": e.isDark,
|
|
11715
11704
|
class: "wysiwyg"
|
|
11716
|
-
}, null, 8, ["markdown", "is-dark"])])) : t.error ? (D(), K("div",
|
|
11705
|
+
}, null, 8, ["markdown", "is-dark"])])) : t.error ? (D(), K("div", th, [V("span", nh, N(L(n)("messagePart.stepError")), 1), V("pre", null, N(t.error), 1)])) : t.hasRichDetail ? (D(), B(Wm, {
|
|
11717
11706
|
key: 3,
|
|
11718
11707
|
part: t.part
|
|
11719
|
-
}, null, 8, ["part"])) : (D(), K(z, { key: 4 }, [L(nt)(t.toolInput) ? (D(), B(
|
|
11708
|
+
}, null, 8, ["part"])) : (D(), K(z, { key: 4 }, [L(nt)(t.toolInput) ? (D(), B(Em, {
|
|
11720
11709
|
key: 0,
|
|
11721
11710
|
label: L(n)("messagePart.stepInput"),
|
|
11722
11711
|
value: t.toolInput
|
|
11723
|
-
}, null, 8, ["label", "value"])) : F("", !0), L(nt)(t.toolOutput) ? (D(), B(
|
|
11712
|
+
}, null, 8, ["label", "value"])) : F("", !0), L(nt)(t.toolOutput) ? (D(), B(Em, {
|
|
11724
11713
|
key: 1,
|
|
11725
11714
|
label: L(n)("messagePart.stepOutput"),
|
|
11726
11715
|
value: t.toolOutput
|
|
@@ -11729,10 +11718,10 @@ var Wm = {
|
|
|
11729
11718
|
}
|
|
11730
11719
|
}), [["styles", [".pk-chatbot-steps{border:var(--spacing-px) solid var(--color-surface-3);border-radius:var(--rounded-lg);background-color:var(--color-surface-1);width:100%;font-size:var(--text-12);color:var(--color-word-3);overflow:hidden}.pk-chatbot-steps__header{align-items:center;gap:var(--spacing-8);width:100%;min-height:var(--spacing-40);padding:var(--spacing-8) var(--spacing-sm);text-align:left;cursor:pointer;transition:background-color .2s;display:flex}.pk-chatbot-steps__header:hover{background-color:var(--color-surface-2)}.pk-chatbot-steps__chevron{font-size:var(--text-16)}.pk-chatbot-steps__title{color:var(--color-word-2);flex-grow:1;font-weight:600}.pk-chatbot-steps__meta{color:var(--color-word-4);font-variant-numeric:tabular-nums;white-space:nowrap}.pk-chatbot-steps__list{background-color:var(--color-surface);border-top:var(--spacing-px) solid var(--color-surface-3);padding:var(--spacing-8) var(--spacing-sm);flex-direction:column;display:flex}.pk-chatbot-steps__step{position:relative}.pk-chatbot-steps__step:not(:last-child):before{content:\"\";left:var(--spacing-10);top:var(--spacing-28);bottom:calc(var(--spacing-8) * -1);width:var(--spacing-px);background-color:var(--color-surface-4);position:absolute}.pk-chatbot-steps__step-header{align-items:center;gap:var(--spacing-8);width:calc(100% + var(--spacing-16));min-height:var(--spacing-36);margin-inline:calc(var(--spacing-8) * -1);padding:var(--spacing-4) var(--spacing-8);text-align:left;display:flex}.pk-chatbot-steps__step-header:is(button){cursor:pointer;border-radius:var(--rounded);transition:background-color .2s}.pk-chatbot-steps__step-header:is(button):hover{background-color:var(--color-surface-2)}.pk-chatbot-steps-marker{width:var(--spacing-20);height:var(--spacing-20);z-index:1;background-color:var(--color-surface-1);border-radius:var(--rounded-full);border:var(--spacing-px) solid var(--color-surface-4);flex-shrink:0;justify-content:center;align-items:center;display:inline-flex;position:relative}.pk-chatbot-steps-marker--active{background-color:var(--chatbot-main-color,var(--color-surface-4));color:var(--chatbot-contrast-color,var(--color-word-1));border-color:#0000}.pk-chatbot-steps__step-label{text-overflow:ellipsis;white-space:nowrap;min-width:0;color:var(--color-word-2);overflow:hidden}.pk-chatbot-steps__step-summary{text-overflow:ellipsis;white-space:nowrap;min-width:0;color:var(--color-word-4);flex:1 1 0;overflow:hidden}.pk-chatbot-steps__step-duration{color:var(--color-word-4);font-variant-numeric:tabular-nums;white-space:nowrap}.pk-chatbot-steps__step--active .pk-chatbot-steps__step-label{color:var(--color-word-1)}.pk-chatbot-steps__step-body{gap:var(--spacing-4);margin-left:var(--spacing-28);margin-block:var(--spacing-4) var(--spacing-8);flex-direction:column;display:flex}.pk-chatbot-steps__step-content{border:var(--spacing-px) solid var(--color-surface-3);border-radius:var(--rounded);padding:var(--spacing-8);background-color:var(--color-surface-1)}.pk-chatbot-steps__step-content--scroll{max-height:var(--spacing-256);overflow:auto}.pk-chatbot-steps__step-payload{gap:var(--spacing-2);flex-direction:column;display:flex}.pk-chatbot-steps__step-payload pre{border:var(--spacing-px) solid var(--color-surface-3);border-radius:var(--rounded);padding:var(--spacing-8);font-size:var(--text-10);max-height:var(--spacing-160);white-space:pre-wrap;word-break:break-word;font-family:var(--font-mono);background-color:var(--color-surface-1);overflow:auto}.pk-chatbot-steps__step-payload-label{color:var(--color-word-3);text-transform:uppercase;font-weight:600;font-size:var(--text-10);letter-spacing:.05em}.pk-chatbot-steps__step-payload--error .pk-chatbot-steps__step-payload-label,.pk-chatbot-steps__step-payload--error pre{color:var(--color-danger)}.pk-chatbot-steps__step-payload--error pre{border-color:var(--color-danger-lighten-5)}"]]]);
|
|
11731
11720
|
k(), H(), J();
|
|
11732
|
-
var
|
|
11721
|
+
var ih = ["aria-label"], ah = {
|
|
11733
11722
|
class: "pk-chatbot-outline__bars",
|
|
11734
11723
|
"aria-hidden": "true"
|
|
11735
|
-
},
|
|
11724
|
+
}, oh = { class: "pk-chatbot-outline__panel" }, sh = ["aria-current", "onClick"], ch = /*#__PURE__*/ Qt(/* @__PURE__ */ w({
|
|
11736
11725
|
__name: "PkChatbotOutlineRail",
|
|
11737
11726
|
props: {
|
|
11738
11727
|
items: { type: Array },
|
|
@@ -11744,23 +11733,23 @@ var rh = ["aria-label"], ih = {
|
|
|
11744
11733
|
return (t, n) => (D(), K("nav", {
|
|
11745
11734
|
class: ce(["pk-chatbot-outline", { "pk-chatbot-outline--dense": a.value }]),
|
|
11746
11735
|
"aria-label": L(i)("label.conversationOutline")
|
|
11747
|
-
}, [V("div",
|
|
11736
|
+
}, [V("div", ah, [(D(!0), K(z, null, Pe(e.items, (t) => (D(), K("span", {
|
|
11748
11737
|
key: t.id,
|
|
11749
11738
|
class: ce(["pk-chatbot-outline__bar", { "pk-chatbot-outline__bar--active": t.id === e.activeId }])
|
|
11750
|
-
}, null, 2))), 128))]), V("div",
|
|
11739
|
+
}, null, 2))), 128))]), V("div", oh, [(D(!0), K(z, null, Pe(e.items, (t) => (D(), K("button", {
|
|
11751
11740
|
key: t.id,
|
|
11752
11741
|
type: "button",
|
|
11753
11742
|
class: ce(["pk-chatbot-outline__item", { "pk-chatbot-outline__item--active": t.id === e.activeId }]),
|
|
11754
11743
|
"aria-current": t.id === e.activeId ? "true" : void 0,
|
|
11755
11744
|
onClick: (e) => r("select", t.id)
|
|
11756
|
-
}, N(t.preview), 11,
|
|
11745
|
+
}, N(t.preview), 11, sh))), 128))])], 10, ih));
|
|
11757
11746
|
}
|
|
11758
11747
|
}), [["styles", [".pk-chatbot-outline{padding:var(--spacing-12);align-items:center;display:flex;position:relative}.pk-chatbot-outline__bars{align-items:flex-end;gap:var(--spacing-6);flex-direction:column;max-height:60vh;display:flex;overflow:hidden}.pk-chatbot-outline--dense .pk-chatbot-outline__bars{gap:var(--spacing-2)}.pk-chatbot-outline__bar{width:var(--spacing-16);height:var(--spacing-2);border-radius:var(--rounded-full);background-color:var(--color-surface-5);transition:var(--transition-colors)}.pk-chatbot-outline__bar--active{background-color:var(--color-word-2)}.pk-chatbot-outline__panel{gap:var(--spacing-2);min-width:180px;max-width:280px;max-height:min(50vh,480px);padding:var(--spacing-6);border:1px solid var(--color-surface-3);border-radius:var(--rounded-lg);background-color:var(--color-surface);box-shadow:var(--shadow-md);opacity:0;visibility:hidden;translate:var(--spacing-8) 0;transition:opacity .15s var(--ease-out), translate .15s var(--ease-out), visibility .15s;flex-direction:column;display:flex;position:absolute;bottom:0;right:100%;overflow-y:auto}@media (prefers-reduced-motion:reduce){.pk-chatbot-outline__panel{transition:none}}.pk-chatbot-outline:hover .pk-chatbot-outline__panel,.pk-chatbot-outline:focus-within .pk-chatbot-outline__panel{opacity:1;visibility:visible;translate:0}.pk-chatbot-outline__item{padding:var(--spacing-6) var(--spacing-10);border-radius:var(--rounded-md);font-size:var(--text-12);color:var(--color-word-2);text-align:start;white-space:nowrap;text-overflow:ellipsis;cursor:pointer;transition:var(--transition-colors);flex-shrink:0;overflow:hidden}.pk-chatbot-outline__item:hover{background-color:var(--color-surface-1)}.pk-chatbot-outline__item--active{background-color:var(--color-surface-2);color:var(--color-word-1);font-weight:var(--font-semibold)}"]]]);
|
|
11759
11748
|
//#endregion
|
|
11760
11749
|
//#region ../../packages/components/src/chat/useChatScroll.ts
|
|
11761
11750
|
H(), k();
|
|
11762
|
-
var
|
|
11763
|
-
function
|
|
11751
|
+
var lh = 30, uh = 500;
|
|
11752
|
+
function dh(e) {
|
|
11764
11753
|
let { scrollEl: t, status: n, messagesLength: r, lastMessageRole: i, contentEl: a, beforeNewMessageScroll: o, onScrollUp: s, onScrollDown: c } = e, l = W(!1), u = W(!0), d = !1, f = null, p = null, m = null, h = null, g = 0, _ = (e = "smooth") => {
|
|
11765
11754
|
if (!t.value || l.value) {
|
|
11766
11755
|
d = !1;
|
|
@@ -11771,7 +11760,7 @@ function uh(e) {
|
|
|
11771
11760
|
behavior: e
|
|
11772
11761
|
}), setTimeout(() => {
|
|
11773
11762
|
d = !1;
|
|
11774
|
-
}, e === "instant" ? 0 :
|
|
11763
|
+
}, e === "instant" ? 0 : uh);
|
|
11775
11764
|
}, v = (e) => {
|
|
11776
11765
|
e.deltaY < 0 && (l.value = !0);
|
|
11777
11766
|
}, y = 0, b = (e) => {
|
|
@@ -11782,7 +11771,7 @@ function uh(e) {
|
|
|
11782
11771
|
}, S = () => {
|
|
11783
11772
|
if (!t.value) return;
|
|
11784
11773
|
let { scrollTop: e, scrollHeight: n, clientHeight: r } = t.value;
|
|
11785
|
-
if (u.value = n - r - e <
|
|
11774
|
+
if (u.value = n - r - e < lh, d) {
|
|
11786
11775
|
g = e;
|
|
11787
11776
|
return;
|
|
11788
11777
|
}
|
|
@@ -11843,34 +11832,34 @@ function uh(e) {
|
|
|
11843
11832
|
};
|
|
11844
11833
|
}
|
|
11845
11834
|
k(), H(), J(), Te();
|
|
11846
|
-
var
|
|
11835
|
+
var fh = ["aria-busy"], ph = {
|
|
11847
11836
|
key: 0,
|
|
11848
11837
|
class: "pk-chatbot-messages__outline"
|
|
11849
|
-
},
|
|
11838
|
+
}, mh = {
|
|
11850
11839
|
key: 0,
|
|
11851
11840
|
class: "pk-chatbot-divider"
|
|
11852
|
-
},
|
|
11841
|
+
}, hh = { class: "pk-chatbot-divider__label" }, gh = { class: "pk-chatbot-message__text" }, _h = ["title"], vh = {
|
|
11853
11842
|
key: 0,
|
|
11854
11843
|
class: "pk-chatbot-message__reaction-emoji"
|
|
11855
|
-
},
|
|
11844
|
+
}, yh = {
|
|
11856
11845
|
key: 0,
|
|
11857
11846
|
class: "pk-chatbot-message__loading-info"
|
|
11858
|
-
},
|
|
11847
|
+
}, bh = { class: "flex gap-8 items-center" }, xh = { class: "font-mono rounded text-12" }, Sh = { class: "flex gap-8 items-center" }, Ch = {
|
|
11859
11848
|
key: 0,
|
|
11860
11849
|
class: "pk-chatbot-message__footer"
|
|
11861
|
-
},
|
|
11850
|
+
}, wh = {
|
|
11862
11851
|
key: 0,
|
|
11863
11852
|
class: "pk-chatbot-message__hover-meta"
|
|
11864
|
-
},
|
|
11853
|
+
}, Th = ["datetime", "title"], Eh = { class: "truncate" }, Dh = {
|
|
11865
11854
|
key: 0,
|
|
11866
11855
|
class: "flex items-center gap-4 min-w-0"
|
|
11867
|
-
},
|
|
11856
|
+
}, Oh = { class: "truncate" }, kh = {
|
|
11868
11857
|
key: 1,
|
|
11869
11858
|
class: "flex items-center gap-4 text-12 text-word-3"
|
|
11870
|
-
},
|
|
11859
|
+
}, Ah = { class: "truncate" }, jh = ["datetime"], Mh = { class: "truncate" }, Nh = {
|
|
11871
11860
|
key: 3,
|
|
11872
11861
|
class: "flex items-center gap-4 text-12 text-word-3"
|
|
11873
|
-
},
|
|
11862
|
+
}, Ph = { class: "pk-chatbot-message__loading-info" }, Fh = { class: "flex gap-8 items-center" }, Ih = { class: "text-12" }, Lh = ["title", "aria-label"], Rh = /*#__PURE__*/ Qt(/* @__PURE__ */ w({
|
|
11874
11863
|
__name: "PkChatbotMessages",
|
|
11875
11864
|
props: {
|
|
11876
11865
|
status: { type: String },
|
|
@@ -11928,7 +11917,7 @@ var dh = ["aria-busy"], fh = {
|
|
|
11928
11917
|
id: n,
|
|
11929
11918
|
approved: t
|
|
11930
11919
|
});
|
|
11931
|
-
}, l = ae("scrollEl"), u = ae("wrapperEl"), d = U(() => Je(n.textColor, n.mainColor)), { handleScroll: f, scrollToBottom: p, userScrolledUp: m, isAtBottom: h } =
|
|
11920
|
+
}, l = ae("scrollEl"), u = ae("wrapperEl"), d = U(() => Je(n.textColor, n.mainColor)), { handleScroll: f, scrollToBottom: p, userScrolledUp: m, isAtBottom: h } = dh({
|
|
11932
11921
|
scrollEl: l,
|
|
11933
11922
|
status: () => n.status,
|
|
11934
11923
|
messagesLength: () => n.messages?.length,
|
|
@@ -12045,7 +12034,7 @@ var dh = ["aria-busy"], fh = {
|
|
|
12045
12034
|
}),
|
|
12046
12035
|
onScroll: x
|
|
12047
12036
|
}, [
|
|
12048
|
-
e.showScrollToBottom && _.value.length > 1 ? (D(), K("div",
|
|
12037
|
+
e.showScrollToBottom && _.value.length > 1 ? (D(), K("div", ph, [q(ch, {
|
|
12049
12038
|
items: _.value,
|
|
12050
12039
|
"active-id": v.value,
|
|
12051
12040
|
onSelect: w
|
|
@@ -12055,7 +12044,7 @@ var dh = ["aria-busy"], fh = {
|
|
|
12055
12044
|
ref: u,
|
|
12056
12045
|
class: "pk-chatbot-messages__wrapper"
|
|
12057
12046
|
}, [
|
|
12058
|
-
(D(!0), K(z, null, Pe(e.messages, (l, u) => (D(), K(z, { key: l.id }, [Ae(l) && Ne(u) ? (D(), K("div",
|
|
12047
|
+
(D(!0), K(z, null, Pe(e.messages, (l, u) => (D(), K(z, { key: l.id }, [Ae(l) && Ne(u) ? (D(), K("div", mh, [V("span", hh, N(L(a)(Ne(u), "short")), 1)])) : F("", !0), l.parts.length || xe(u) && he.value && ke(l) ? (D(), K("div", {
|
|
12059
12048
|
key: 1,
|
|
12060
12049
|
class: ce(["pk-chatbot-message", [`pk-chatbot-message--${l.role}`, { "pk-chatbot-message--loading": he.value && xe(u) && ke(l) }]]),
|
|
12061
12050
|
style: Me({ minHeight: xe(u) && ke(l) && !ge.value ? `${ee.value}px` : void 0 })
|
|
@@ -12064,7 +12053,7 @@ var dh = ["aria-busy"], fh = {
|
|
|
12064
12053
|
appear: "",
|
|
12065
12054
|
name: "pk-chatbot-part"
|
|
12066
12055
|
}, {
|
|
12067
|
-
default: S(() => [De(l) ? (D(), B(
|
|
12056
|
+
default: S(() => [De(l) ? (D(), B(rh, {
|
|
12068
12057
|
key: 0,
|
|
12069
12058
|
message: l,
|
|
12070
12059
|
"is-streaming": he.value && xe(u),
|
|
@@ -12081,7 +12070,7 @@ var dh = ["aria-busy"], fh = {
|
|
|
12081
12070
|
appear: "",
|
|
12082
12071
|
name: "pk-chatbot-part"
|
|
12083
12072
|
}, {
|
|
12084
|
-
default: S(() => [V("div",
|
|
12073
|
+
default: S(() => [V("div", gh, [C(t.$slots, "text", O({ ref_for: !0 }, {
|
|
12085
12074
|
message: l,
|
|
12086
12075
|
part: n,
|
|
12087
12076
|
index: u,
|
|
@@ -12100,17 +12089,17 @@ var dh = ["aria-busy"], fh = {
|
|
|
12100
12089
|
key: 0,
|
|
12101
12090
|
class: ce(["pk-chatbot-message__reaction", le(l.id)]),
|
|
12102
12091
|
title: ue(l.id)
|
|
12103
|
-
}, [j(l.id) ? (D(), K("span",
|
|
12092
|
+
}, [j(l.id) ? (D(), K("span", vh, N(j(l.id)), 1)) : (D(), B(r, {
|
|
12104
12093
|
key: 1,
|
|
12105
12094
|
name: A(l.id) === "downvote" ? "ri:thumb-down-fill" : "ri:thumb-up-fill"
|
|
12106
|
-
}, null, 8, ["name"]))], 10,
|
|
12095
|
+
}, null, 8, ["name"]))], 10, _h)) : F("", !0)])]),
|
|
12107
12096
|
_: 2
|
|
12108
12097
|
}, 1024)) : L(Ge)(n) ? (D(), B(G, {
|
|
12109
12098
|
key: 1,
|
|
12110
12099
|
appear: "",
|
|
12111
12100
|
name: "pk-chatbot-part"
|
|
12112
12101
|
}, {
|
|
12113
|
-
default: S(() => [q(
|
|
12102
|
+
default: S(() => [q(im, {
|
|
12114
12103
|
"media-type": n.mediaType,
|
|
12115
12104
|
url: n.url,
|
|
12116
12105
|
filename: n.filename,
|
|
@@ -12127,7 +12116,7 @@ var dh = ["aria-busy"], fh = {
|
|
|
12127
12116
|
appear: "",
|
|
12128
12117
|
name: "pk-chatbot-part"
|
|
12129
12118
|
}, {
|
|
12130
|
-
default: S(() => [(D(), B(
|
|
12119
|
+
default: S(() => [(D(), B(pm, {
|
|
12131
12120
|
key: `approval-${i}`,
|
|
12132
12121
|
part: n,
|
|
12133
12122
|
actionable: e.interactive === !0 && (L(ct)(n) || xe(u)),
|
|
@@ -12140,12 +12129,12 @@ var dh = ["aria-busy"], fh = {
|
|
|
12140
12129
|
"onRespond"
|
|
12141
12130
|
]))]),
|
|
12142
12131
|
_: 2
|
|
12143
|
-
}, 1024)) : L(We)(n) && !L(Ke)(n) && (L(
|
|
12132
|
+
}, 1024)) : L(We)(n) && !L(Ke)(n) && (L(cm)[L(lt)(n)] || L(s)[n.type] || e.showAllMessageParts) ? (D(), B(G, {
|
|
12144
12133
|
key: 3,
|
|
12145
12134
|
appear: "",
|
|
12146
12135
|
name: "pk-chatbot-part"
|
|
12147
12136
|
}, {
|
|
12148
|
-
default: S(() => [!L(s)[n.type] && L(
|
|
12137
|
+
default: S(() => [!L(s)[n.type] && L(cm)[L(lt)(n)] ? (D(), B(re(L(cm)[L(lt)(n)]), {
|
|
12149
12138
|
key: `component-${i}-${L(st)(n)}`,
|
|
12150
12139
|
part: n
|
|
12151
12140
|
}, null, 8, ["part"])) : C(t.$slots, n.type, O({ ref_for: !0 }, {
|
|
@@ -12153,14 +12142,14 @@ var dh = ["aria-busy"], fh = {
|
|
|
12153
12142
|
part: n,
|
|
12154
12143
|
index: u,
|
|
12155
12144
|
isLoading: he.value
|
|
12156
|
-
}), () => [e.showAllMessageParts ? (D(), K("div",
|
|
12145
|
+
}), () => [e.showAllMessageParts ? (D(), K("div", yh, [V("div", bh, [L(tt)(n) ? (D(), B(r, {
|
|
12157
12146
|
key: 0,
|
|
12158
12147
|
name: L(tt)(n),
|
|
12159
12148
|
class: "shrink-0"
|
|
12160
|
-
}, null, 8, ["name"])) : F("", !0), V("code",
|
|
12149
|
+
}, null, 8, ["name"])) : F("", !0), V("code", xh, N(L(jt)(n.type)), 1)])])) : F("", !0)], void 0, 1)]),
|
|
12161
12150
|
_: 2
|
|
12162
12151
|
}, 1024)) : F("", !0), q(G, { mode: "out-in" }, {
|
|
12163
|
-
default: S(() => [i === de(l) && e.readonlyFeedback && ie(l.id)?.comment ? (D(), B(
|
|
12152
|
+
default: S(() => [i === de(l) && e.readonlyFeedback && ie(l.id)?.comment ? (D(), B(Vp, {
|
|
12164
12153
|
key: 0,
|
|
12165
12154
|
feedback: ie(l.id)
|
|
12166
12155
|
}, null, 8, ["feedback"])) : F("", !0)]),
|
|
@@ -12173,7 +12162,7 @@ var dh = ["aria-busy"], fh = {
|
|
|
12173
12162
|
default: S(() => [he.value && xe(u) && !Te(l) && ke(l) && !De(l) ? (D(), K("div", {
|
|
12174
12163
|
key: `loading-info-${l.id}`,
|
|
12175
12164
|
class: "pk-chatbot-message__loading-info"
|
|
12176
|
-
}, [V("div",
|
|
12165
|
+
}, [V("div", Sh, [
|
|
12177
12166
|
q(r, {
|
|
12178
12167
|
name: "loading-loop",
|
|
12179
12168
|
class: "shrink-0"
|
|
@@ -12197,7 +12186,7 @@ var dh = ["aria-busy"], fh = {
|
|
|
12197
12186
|
name: "fade-in",
|
|
12198
12187
|
mode: "out-in"
|
|
12199
12188
|
}, {
|
|
12200
|
-
default: S(() => [R.value && "text" in R.value && R.value.text.trim() ? (D(), B(
|
|
12189
|
+
default: S(() => [R.value && "text" in R.value && R.value.text.trim() ? (D(), B(hm, {
|
|
12201
12190
|
key: 0,
|
|
12202
12191
|
markdown: R.value.text,
|
|
12203
12192
|
"is-dark": e.isDark,
|
|
@@ -12214,7 +12203,7 @@ var dh = ["aria-busy"], fh = {
|
|
|
12214
12203
|
_: 2
|
|
12215
12204
|
}, 1024),
|
|
12216
12205
|
q(G, { mode: "out-in" }, {
|
|
12217
|
-
default: S(() => [Y(l, u) ? (D(), K("div",
|
|
12206
|
+
default: S(() => [Y(l, u) ? (D(), K("div", Ch, [
|
|
12218
12207
|
q(p, {
|
|
12219
12208
|
modifiers: "compact",
|
|
12220
12209
|
class: "mr-auto shrink-0"
|
|
@@ -12315,21 +12304,21 @@ var dh = ["aria-busy"], fh = {
|
|
|
12315
12304
|
]),
|
|
12316
12305
|
_: 2
|
|
12317
12306
|
}, 1024),
|
|
12318
|
-
!e.showMessageDateTime && l.metadata?.createdAt && l.metadata?.completedAt ? (D(), K("div",
|
|
12307
|
+
!e.showMessageDateTime && l.metadata?.createdAt && l.metadata?.completedAt ? (D(), K("div", wh, [V("time", {
|
|
12319
12308
|
datetime: new Date(l.metadata.createdAt).toISOString(),
|
|
12320
12309
|
title: L(a)(new Date(l.metadata.createdAt), "date-time"),
|
|
12321
12310
|
class: "flex items-center gap-4 min-w-0"
|
|
12322
12311
|
}, [q(r, {
|
|
12323
12312
|
name: "ri:time-line",
|
|
12324
12313
|
class: "shrink-0"
|
|
12325
|
-
}), V("span",
|
|
12314
|
+
}), V("span", Eh, N(Fe(l.metadata.createdAt)), 1)], 8, Th), Le(l) ? (D(), K("span", Dh, [q(r, {
|
|
12326
12315
|
name: "ri:hourglass-line",
|
|
12327
12316
|
class: "shrink-0"
|
|
12328
|
-
}), V("span",
|
|
12329
|
-
e.showMessageTokensCount && l.metadata?.totalTokens ? (D(), K("span",
|
|
12317
|
+
}), V("span", Oh, N(Le(l)), 1)])) : F("", !0)])) : F("", !0),
|
|
12318
|
+
e.showMessageTokensCount && l.metadata?.totalTokens ? (D(), K("span", kh, [q(r, {
|
|
12330
12319
|
name: "ri:ai-generate-2-line",
|
|
12331
12320
|
class: "shrink-0"
|
|
12332
|
-
}), V("span",
|
|
12321
|
+
}), V("span", Ah, N(L(o)(l.metadata.totalTokens, "integer")) + " " + N(L(i)("label.tokens")), 1)])) : F("", !0),
|
|
12333
12322
|
e.showMessageDateTime && l.metadata?.createdAt ? (D(), K("time", {
|
|
12334
12323
|
key: 2,
|
|
12335
12324
|
datetime: new Date(l.metadata?.createdAt).toISOString(),
|
|
@@ -12337,11 +12326,11 @@ var dh = ["aria-busy"], fh = {
|
|
|
12337
12326
|
}, [q(r, {
|
|
12338
12327
|
name: "ri:time-line",
|
|
12339
12328
|
class: "shrink-0"
|
|
12340
|
-
}), V("span",
|
|
12341
|
-
e.showMessageDateTime && l?.metadata?.completedAt && l?.metadata?.createdAt ? (D(), K("div",
|
|
12329
|
+
}), V("span", Mh, N(L(a)(new Date(l.metadata?.createdAt), "date-time")), 1)], 8, jh)) : F("", !0),
|
|
12330
|
+
e.showMessageDateTime && l?.metadata?.completedAt && l?.metadata?.createdAt ? (D(), K("div", Nh, [q(r, {
|
|
12342
12331
|
name: "ri:hourglass-line",
|
|
12343
12332
|
class: "shrink-0"
|
|
12344
|
-
}), q(
|
|
12333
|
+
}), q(sm, {
|
|
12345
12334
|
class: "truncate",
|
|
12346
12335
|
date: l.metadata?.createdAt,
|
|
12347
12336
|
"end-date": l.metadata?.completedAt
|
|
@@ -12350,7 +12339,7 @@ var dh = ["aria-busy"], fh = {
|
|
|
12350
12339
|
_: 2
|
|
12351
12340
|
}, 1024),
|
|
12352
12341
|
q(G, { mode: "out-in" }, {
|
|
12353
|
-
default: S(() => [l.id === e.feedbackMessageId ? (D(), B(
|
|
12342
|
+
default: S(() => [l.id === e.feedbackMessageId ? (D(), B(Lp, {
|
|
12354
12343
|
key: 0,
|
|
12355
12344
|
ref_for: !0,
|
|
12356
12345
|
ref_key: "feedbackMessageEl",
|
|
@@ -12376,17 +12365,17 @@ var dh = ["aria-busy"], fh = {
|
|
|
12376
12365
|
key: 0,
|
|
12377
12366
|
class: "pk-chatbot-message pk-chatbot-message--assistant pk-chatbot-message--loading",
|
|
12378
12367
|
style: Me({ minHeight: _e.value ? `${ee.value}px` : void 0 })
|
|
12379
|
-
}, [V("div",
|
|
12368
|
+
}, [V("div", Ph, [V("div", Fh, [q(r, {
|
|
12380
12369
|
name: "loading-loop",
|
|
12381
12370
|
class: "shrink-0"
|
|
12382
|
-
}), V("span",
|
|
12371
|
+
}), V("span", Ih, N(L(i)("label.answeringOnTheCall")), 1)])])], 4)) : F("", !0)]),
|
|
12383
12372
|
_: 1
|
|
12384
12373
|
}),
|
|
12385
12374
|
q(G, {
|
|
12386
12375
|
appear: "",
|
|
12387
12376
|
name: "pk-chatbot-part"
|
|
12388
12377
|
}, {
|
|
12389
|
-
default: S(() => [ge.value ? (D(), B(
|
|
12378
|
+
default: S(() => [ge.value ? (D(), B(Ep, {
|
|
12390
12379
|
key: 0,
|
|
12391
12380
|
error: e.error,
|
|
12392
12381
|
onRetry: n[3] ||= (e) => t.$emit("auto-retry"),
|
|
@@ -12408,32 +12397,32 @@ var dh = ["aria-busy"], fh = {
|
|
|
12408
12397
|
title: L(i)("action.scrollToBottom"),
|
|
12409
12398
|
"aria-label": L(i)("action.scrollToBottom"),
|
|
12410
12399
|
onClick: g
|
|
12411
|
-
}, [q(r, { name: "ri:arrow-down-line" })], 8,
|
|
12400
|
+
}, [q(r, { name: "ri:arrow-down-line" })], 8, Lh)) : F("", !0)]),
|
|
12412
12401
|
_: 1
|
|
12413
12402
|
})
|
|
12414
|
-
], 46,
|
|
12403
|
+
], 46, fh);
|
|
12415
12404
|
};
|
|
12416
12405
|
}
|
|
12417
|
-
}), [["styles", [".pk-chatbot-messages{min-width:0;font-size:var(--text-14);scrollbar-width:thin;scrollbar-color:var(--color-word-5) var(--color-surface-1);flex:1;overflow-y:auto}.pk-chatbot-messages__wrapper{gap:var(--spacing-16);flex-direction:column;min-width:0;display:flex}.pk-chatbot-messages__outline{z-index:2;flex:none;align-self:flex-end;height:0;display:none;position:sticky;top:50%}@media (width>=992px){.pk-chatbot-messages__outline{display:block}}.pk-chatbot-messages__outline .pk-chatbot-outline{position:absolute;top:0;right:0;transform:translateY(-50%)}.pk-chatbot-messages--settling .pk-chatbot-messages__spacer,.pk-chatbot-messages--settling .pk-chatbot-message{transition:min-height .3s var(--ease-out)}@media (prefers-reduced-motion:reduce){.pk-chatbot-messages--settling .pk-chatbot-messages__spacer,.pk-chatbot-messages--settling .pk-chatbot-message{transition:none}}.pk-chatbot-messages__scroll-to-bottom{bottom:var(--spacing-8);z-index:2;width:var(--spacing-36);height:var(--spacing-36);border:1px solid var(--color-surface-3);border-radius:var(--rounded-full);background-color:var(--color-surface-1);box-shadow:var(--shadow-md);color:var(--color-word-1);cursor:pointer;transition:var(--transition-colors);flex:none;justify-content:center;align-items:center;margin-block-start:calc(-1 * var(--spacing-36));margin-inline:auto;display:flex;position:sticky}.pk-chatbot-messages__scroll-to-bottom:hover{background-color:var(--color-surface-2)}.pk-chatbot-messages-fab-enter-active,.pk-chatbot-messages-fab-leave-active{transition:opacity .15s var(--ease-out)}.pk-chatbot-messages-fab-enter-from,.pk-chatbot-messages-fab-leave-to{opacity:0}@media (prefers-reduced-motion:reduce){.pk-chatbot-messages-fab-enter-active,.pk-chatbot-messages-fab-leave-active{transition:none}}.pk-chatbot-divider{border-bottom:1px solid var(--color-surface-3);position:relative}.pk-chatbot-divider__label{padding-inline:var(--spacing-8);background-color:var(--color-surface);color:var(--color-word-4);font-size:var(--text-12);position:absolute;top:50%;left:50%;transform:translate(-50%,-50%)}.pk-chatbot-message{gap:var(--spacing-sm);overflow-clip-margin:var(--spacing-16);flex-direction:column;align-items:flex-start;min-width:0;max-width:100%;display:flex;overflow:clip}.pk-chatbot-message__text{color:var(--color-word-2);background-color:var(--color-surface);line-height:var(--leading-normal);border-width:var(--spacing-px);border-style:solid;border-color:var(--color-surface-3);padding:var(--spacing-sm);border-radius:var(--rounded-xl) var(--rounded-xl) var(--rounded-xl) 0;text-overflow:ellipsis;overflow-clip-margin:var(--spacing-16);max-width:100%;position:relative;overflow:clip}.pk-chatbot-message__reaction{right:var(--spacing-8);width:var(--spacing-24);height:var(--spacing-24);border-radius:var(--rounded-full,9999px);color:var(--color-white,#fff);font-size:var(--text-12);box-shadow:var(--shadow-md);justify-content:center;align-items:center;display:inline-flex;position:absolute;bottom:0;transform:translateY(50%)}.pk-chatbot-message__reaction--positive{background-color:var(--color-success)}.pk-chatbot-message__reaction--negative{background-color:var(--color-danger)}.pk-chatbot-message__reaction--neutral{background-color:var(--color-surface-1)}.pk-chatbot-message__reaction-emoji{font-size:var(--text-12);line-height:1}.pk-chatbot-message__loading-info{line-height:var(--leading-normal);border-width:var(--spacing-px);border-style:solid;border-color:var(--color-surface-3);padding:var(--spacing-sm);border-radius:var(--rounded-xl) var(--rounded-xl) var(--rounded-xl) 0;font-size:var(--text-12);color:var(--color-word-3);background-color:var(--color-surface)}.pk-chatbot-message__footer{gap:var(--spacing-8);align-items:center;width:100%;display:flex}.pk-chatbot-message__hover-meta{align-items:center;gap:var(--spacing-8);min-width:0;font-size:var(--text-12);color:var(--color-word-3);white-space:nowrap;font-variant-numeric:tabular-nums;opacity:0;transition:opacity .2s;display:flex}.pk-chatbot-message:hover .pk-chatbot-message__hover-meta,.pk-chatbot-message:focus-within .pk-chatbot-message__hover-meta{opacity:1}@media (hover:none){.pk-chatbot-message__hover-meta{opacity:1}}.pk-chatbot-message--user{align-items:flex-end}.pk-chatbot-message--user .pk-chatbot-message__text{background-color:var(--chatbot-main-color,var(--color-surface-1));border-color:var(--chatbot-main-color,var(--color-surface-3));color:var(--chatbot-contrast-color,var(--color-word-1));border-radius:var(--rounded-xl) var(--rounded-xl) 0 var(--rounded-xl)}.pk-chatbot-message--assistant{gap:var(--spacing-16);width:100%}.pk-chatbot-message--assistant .pk-chatbot-message__text{width:100%}.pk-chatbot-message--system{align-items:flex-end}.pk-chatbot-message--system .pk-chatbot-message__text{gap:var(--spacing-8);font-size:var(--text-12);padding:var(--spacing-8) var(--spacing-sm);border-color:var(--chatbot-main-color,var(--color-surface-3));color:var(--chatbot-main-color,var(--color-word-1));border-radius:var(--rounded-xl) var(--rounded-xl) 0 var(--rounded-xl);align-items:center;display:flex}.pk-chatbot-part-enter-active{transition:opacity .25s,transform .25s}.pk-chatbot-part-enter-from{opacity:0;transform:translateY(8px)}@media (prefers-reduced-motion:reduce){.pk-chatbot-part-enter-active{transition:none}.pk-chatbot-part-enter-from{transform:none}}"]]]),
|
|
12418
|
-
function
|
|
12419
|
-
var t =
|
|
12406
|
+
}), [["styles", [".pk-chatbot-messages{min-width:0;font-size:var(--text-14);scrollbar-width:thin;scrollbar-color:var(--color-word-5) var(--color-surface-1);flex:1;overflow-y:auto}.pk-chatbot-messages__wrapper{gap:var(--spacing-16);flex-direction:column;min-width:0;display:flex}.pk-chatbot-messages__outline{z-index:2;flex:none;align-self:flex-end;height:0;display:none;position:sticky;top:50%}@media (width>=992px){.pk-chatbot-messages__outline{display:block}}.pk-chatbot-messages__outline .pk-chatbot-outline{position:absolute;top:0;right:0;transform:translateY(-50%)}.pk-chatbot-messages--settling .pk-chatbot-messages__spacer,.pk-chatbot-messages--settling .pk-chatbot-message{transition:min-height .3s var(--ease-out)}@media (prefers-reduced-motion:reduce){.pk-chatbot-messages--settling .pk-chatbot-messages__spacer,.pk-chatbot-messages--settling .pk-chatbot-message{transition:none}}.pk-chatbot-messages__scroll-to-bottom{bottom:var(--spacing-8);z-index:2;width:var(--spacing-36);height:var(--spacing-36);border:1px solid var(--color-surface-3);border-radius:var(--rounded-full);background-color:var(--color-surface-1);box-shadow:var(--shadow-md);color:var(--color-word-1);cursor:pointer;transition:var(--transition-colors);flex:none;justify-content:center;align-items:center;margin-block-start:calc(-1 * var(--spacing-36));margin-inline:auto;display:flex;position:sticky}.pk-chatbot-messages__scroll-to-bottom:hover{background-color:var(--color-surface-2)}.pk-chatbot-messages-fab-enter-active,.pk-chatbot-messages-fab-leave-active{transition:opacity .15s var(--ease-out)}.pk-chatbot-messages-fab-enter-from,.pk-chatbot-messages-fab-leave-to{opacity:0}@media (prefers-reduced-motion:reduce){.pk-chatbot-messages-fab-enter-active,.pk-chatbot-messages-fab-leave-active{transition:none}}.pk-chatbot-divider{border-bottom:1px solid var(--color-surface-3);position:relative}.pk-chatbot-divider__label{padding-inline:var(--spacing-8);background-color:var(--color-surface);color:var(--color-word-4);font-size:var(--text-12);position:absolute;top:50%;left:50%;transform:translate(-50%,-50%)}.pk-chatbot-message{gap:var(--spacing-sm);overflow-clip-margin:var(--spacing-16);flex-direction:column;align-items:flex-start;min-width:0;max-width:100%;display:flex;overflow:clip}.pk-chatbot-message__text{color:var(--color-word-2);background-color:var(--color-surface);line-height:var(--leading-normal);border-width:var(--spacing-px);border-style:solid;border-color:var(--color-surface-3);padding:var(--spacing-sm);border-radius:var(--rounded-xl) var(--rounded-xl) var(--rounded-xl) 0;text-overflow:ellipsis;overflow-clip-margin:var(--spacing-16);max-width:100%;position:relative;overflow:clip}.pk-chatbot-message__reaction{right:var(--spacing-8);width:var(--spacing-24);height:var(--spacing-24);border-radius:var(--rounded-full,9999px);color:var(--color-white,#fff);font-size:var(--text-12);box-shadow:var(--shadow-md);justify-content:center;align-items:center;display:inline-flex;position:absolute;bottom:0;transform:translateY(50%)}.pk-chatbot-message__reaction--positive{background-color:var(--color-success)}.pk-chatbot-message__reaction--negative{background-color:var(--color-danger)}.pk-chatbot-message__reaction--neutral{background-color:var(--color-surface-1)}.pk-chatbot-message__reaction-emoji{font-size:var(--text-12);line-height:1}.pk-chatbot-message__loading-info{line-height:var(--leading-normal);border-width:var(--spacing-px);border-style:solid;border-color:var(--color-surface-3);padding:var(--spacing-sm);border-radius:var(--rounded-xl) var(--rounded-xl) var(--rounded-xl) 0;font-size:var(--text-12);color:var(--color-word-3);background-color:var(--color-surface)}.pk-chatbot-message__footer{gap:var(--spacing-8);align-items:center;width:100%;display:flex}.pk-chatbot-message__hover-meta{align-items:center;gap:var(--spacing-8);min-width:0;font-size:var(--text-12);color:var(--color-word-3);white-space:nowrap;font-variant-numeric:tabular-nums;opacity:0;transition:opacity .2s;display:flex}.pk-chatbot-message:hover .pk-chatbot-message__hover-meta,.pk-chatbot-message:focus-within .pk-chatbot-message__hover-meta{opacity:1}@media (hover:none){.pk-chatbot-message__hover-meta{opacity:1}}.pk-chatbot-message--user{align-items:flex-end}.pk-chatbot-message--user .pk-chatbot-message__text{background-color:var(--chatbot-main-color,var(--color-surface-1));border-color:var(--chatbot-main-color,var(--color-surface-3));color:var(--chatbot-contrast-color,var(--color-word-1));border-radius:var(--rounded-xl) var(--rounded-xl) 0 var(--rounded-xl)}.pk-chatbot-message--assistant{gap:var(--spacing-16);width:100%}.pk-chatbot-message--assistant .pk-chatbot-message__text{width:100%}.pk-chatbot-message--system{align-items:flex-end}.pk-chatbot-message--system .pk-chatbot-message__text{gap:var(--spacing-8);font-size:var(--text-12);padding:var(--spacing-8) var(--spacing-sm);border-color:var(--chatbot-main-color,var(--color-surface-3));color:var(--chatbot-main-color,var(--color-word-1));border-radius:var(--rounded-xl) var(--rounded-xl) 0 var(--rounded-xl);align-items:center;display:flex}.pk-chatbot-part-enter-active{transition:opacity .25s,transform .25s}.pk-chatbot-part-enter-from{opacity:0;transform:translateY(8px)}@media (prefers-reduced-motion:reduce){.pk-chatbot-part-enter-active{transition:none}.pk-chatbot-part-enter-from{transform:none}}"]]]), zh = /* @__PURE__ */ new Map();
|
|
12407
|
+
function Bh(e) {
|
|
12408
|
+
var t = zh.get(e);
|
|
12420
12409
|
t && t.destroy();
|
|
12421
12410
|
}
|
|
12422
|
-
function
|
|
12423
|
-
var t =
|
|
12411
|
+
function Vh(e) {
|
|
12412
|
+
var t = zh.get(e);
|
|
12424
12413
|
t && t.update();
|
|
12425
12414
|
}
|
|
12426
|
-
var
|
|
12427
|
-
typeof window > "u" ? ((
|
|
12415
|
+
var Hh = null;
|
|
12416
|
+
typeof window > "u" ? ((Hh = function(e) {
|
|
12428
12417
|
return e;
|
|
12429
12418
|
}).destroy = function(e) {
|
|
12430
12419
|
return e;
|
|
12431
|
-
},
|
|
12420
|
+
}, Hh.update = function(e) {
|
|
12432
12421
|
return e;
|
|
12433
|
-
}) : ((
|
|
12422
|
+
}) : ((Hh = function(e, t) {
|
|
12434
12423
|
return e && Array.prototype.forEach.call(e.length ? e : [e], function(e) {
|
|
12435
12424
|
return function(e) {
|
|
12436
|
-
if (e && e.nodeName && e.nodeName === "TEXTAREA" && !
|
|
12425
|
+
if (e && e.nodeName && e.nodeName === "TEXTAREA" && !zh.has(e)) {
|
|
12437
12426
|
var t, n = null, r = window.getComputedStyle(e), i = (t = e.value, function() {
|
|
12438
12427
|
o({
|
|
12439
12428
|
testForHeightReduction: t === "" || !e.value.startsWith(t),
|
|
@@ -12442,7 +12431,7 @@ typeof window > "u" ? ((Vh = function(e) {
|
|
|
12442
12431
|
}), a = function(t) {
|
|
12443
12432
|
e.removeEventListener("autosize:destroy", a), e.removeEventListener("autosize:update", s), e.removeEventListener("input", i), window.removeEventListener("resize", s), Object.keys(t).forEach(function(n) {
|
|
12444
12433
|
return e.style[n] = t[n];
|
|
12445
|
-
}),
|
|
12434
|
+
}), zh.delete(e);
|
|
12446
12435
|
}.bind(e, {
|
|
12447
12436
|
height: e.style.height,
|
|
12448
12437
|
resize: e.style.resize,
|
|
@@ -12451,7 +12440,7 @@ typeof window > "u" ? ((Vh = function(e) {
|
|
|
12451
12440
|
overflowX: e.style.overflowX,
|
|
12452
12441
|
wordWrap: e.style.wordWrap
|
|
12453
12442
|
});
|
|
12454
|
-
e.addEventListener("autosize:destroy", a), e.addEventListener("autosize:update", s), e.addEventListener("input", i), window.addEventListener("resize", s), e.style.overflowX = "hidden", e.style.wordWrap = "break-word",
|
|
12443
|
+
e.addEventListener("autosize:destroy", a), e.addEventListener("autosize:update", s), e.addEventListener("input", i), window.addEventListener("resize", s), e.style.overflowX = "hidden", e.style.wordWrap = "break-word", zh.set(e, {
|
|
12455
12444
|
destroy: a,
|
|
12456
12445
|
update: s
|
|
12457
12446
|
}), s();
|
|
@@ -12483,16 +12472,16 @@ typeof window > "u" ? ((Vh = function(e) {
|
|
|
12483
12472
|
}(e);
|
|
12484
12473
|
}), e;
|
|
12485
12474
|
}).destroy = function(e) {
|
|
12486
|
-
return e && Array.prototype.forEach.call(e.length ? e : [e], zh), e;
|
|
12487
|
-
}, Vh.update = function(e) {
|
|
12488
12475
|
return e && Array.prototype.forEach.call(e.length ? e : [e], Bh), e;
|
|
12476
|
+
}, Hh.update = function(e) {
|
|
12477
|
+
return e && Array.prototype.forEach.call(e.length ? e : [e], Vh), e;
|
|
12489
12478
|
});
|
|
12490
|
-
var
|
|
12479
|
+
var Uh = Hh;
|
|
12491
12480
|
k(), J();
|
|
12492
|
-
var
|
|
12481
|
+
var Wh = ["type"], Gh = {
|
|
12493
12482
|
key: 0,
|
|
12494
12483
|
class: "pk-chat-button__label"
|
|
12495
|
-
},
|
|
12484
|
+
}, Kh = /*#__PURE__*/ Qt(/* @__PURE__ */ w({
|
|
12496
12485
|
__name: "PkChatButton",
|
|
12497
12486
|
props: {
|
|
12498
12487
|
icon: { type: String },
|
|
@@ -12518,31 +12507,31 @@ var Uh = ["type"], Wh = {
|
|
|
12518
12507
|
}, [q(r, {
|
|
12519
12508
|
name: e.icon,
|
|
12520
12509
|
class: "pk-chat-button__icon"
|
|
12521
|
-
}, null, 8, ["name"]), e.label ? (D(), K("span",
|
|
12510
|
+
}, null, 8, ["name"]), e.label ? (D(), K("span", Gh, N(e.label), 1)) : F("", !0)], 10, Wh);
|
|
12522
12511
|
};
|
|
12523
12512
|
}
|
|
12524
12513
|
}), [["styles", [".pk-chat-button{padding:var(--spacing-4);border-radius:var(--rounded);color:var(--color-word-1);cursor:pointer;transition:var(--transition-colors);background-color:#0000;border:none;flex-shrink:0;align-items:center;display:inline-flex}.pk-chat-button:hover{background-color:var(--color-surface-2)}.pk-chat-button:focus-visible{outline:var(--spacing-2) solid var(--input-focus-color);outline-offset:0}.pk-chat-button:disabled{cursor:not-allowed;opacity:.5}.pk-chat-button[aria-pressed=true]{background-color:var(--color-surface-3);color:var(--color-word)}.pk-chat-button--danger{color:var(--color-danger)}.pk-chat-button--danger:hover{background-color:color-mix(in srgb, var(--color-danger) 12%, transparent)}.pk-chat-button--primary{--pk-chat-button-fill:var(--chatbot-main-color,var(--color-word-1));padding:var(--spacing-6);border-radius:var(--rounded-full);background-color:var(--pk-chat-button-fill);color:var(--chatbot-contrast-color,var(--color-surface))}.pk-chat-button--primary:hover{background-color:color-mix(in srgb, var(--pk-chat-button-fill) 85%, var(--color-surface))}.pk-chat-button--primary:focus-visible{outline-offset:var(--spacing-2)}.pk-chat-button--primary:disabled{opacity:1;background-color:var(--color-surface-3);color:var(--color-word-3)}.pk-chat-button--primary .pk-chat-button__icon{width:var(--spacing-16);height:var(--spacing-16)}.pk-chat-button--labelled{gap:var(--spacing-4);padding-inline:var(--spacing-8);font-size:var(--text-12)}.pk-chat-button__icon{width:var(--spacing-20);height:var(--spacing-20);display:block}"]]]);
|
|
12525
12514
|
k(), J(), H(), Te();
|
|
12526
|
-
var
|
|
12515
|
+
var qh = { class: "pk-chatbot-input" }, Jh = {
|
|
12527
12516
|
key: 2,
|
|
12528
12517
|
class: "pk-chatbot-input__notice-text"
|
|
12529
|
-
},
|
|
12518
|
+
}, Yh = {
|
|
12530
12519
|
key: 0,
|
|
12531
12520
|
class: "pk-chatbot-input__drop-overlay"
|
|
12532
|
-
},
|
|
12521
|
+
}, Xh = {
|
|
12533
12522
|
key: 1,
|
|
12534
12523
|
class: "pk-chatbot-input__attachments"
|
|
12535
|
-
},
|
|
12524
|
+
}, Zh = { class: "pk-chatbot-input__fieldset" }, Qh = [
|
|
12536
12525
|
"title",
|
|
12537
12526
|
"disabled",
|
|
12538
12527
|
"onClick"
|
|
12539
|
-
],
|
|
12528
|
+
], $h = ["accept"], eg = ["accept"], tg = { class: "pk-chatbot-input__content" }, ng = [
|
|
12540
12529
|
"value",
|
|
12541
12530
|
"aria-label",
|
|
12542
12531
|
"aria-describedby",
|
|
12543
12532
|
"aria-invalid",
|
|
12544
12533
|
"placeholder"
|
|
12545
|
-
],
|
|
12534
|
+
], rg = ["id"], ig = { class: "opacity-60" }, ag = /*#__PURE__*/ Qt(/* @__PURE__ */ w({
|
|
12546
12535
|
__name: "PkChatbotInput",
|
|
12547
12536
|
props: /*@__PURE__*/ _e({
|
|
12548
12537
|
placeholder: { type: String },
|
|
@@ -12581,7 +12570,7 @@ var Kh = { class: "pk-chatbot-input" }, qh = {
|
|
|
12581
12570
|
};
|
|
12582
12571
|
P(n, (e) => {
|
|
12583
12572
|
e !== u.value && (u.value = e ?? "", se(() => {
|
|
12584
|
-
o.value &&
|
|
12573
|
+
o.value && Uh.update(o.value);
|
|
12585
12574
|
}));
|
|
12586
12575
|
});
|
|
12587
12576
|
let g = U(() => a.status === "streaming"), _ = U(() => a.status === "submitted"), v = U(() => g.value || _.value), y = E(), b = U(() => u.value.length), x = U(() => a.maxMessageLength !== void 0 && b.value > a.maxMessageLength), w = U(() => r.value.some((e) => e.state === "uploading")), T = U(() => v.value || w.value || x.value ? !1 : u.value.trim().length > 0), te = "capture" in document.createElement("input"), re = U(() => a.fileUpload?.allowedMimeTypes?.join(",") ?? ""), ie = U(() => (a.fileUpload?.allowedMimeTypes ?? []).filter((e) => e.startsWith("image/")).join(",")), k = U(() => te && ie.value.length > 0), j = () => {
|
|
@@ -12618,19 +12607,19 @@ var Kh = { class: "pk-chatbot-input" }, qh = {
|
|
|
12618
12607
|
ge(), i("stop-generation");
|
|
12619
12608
|
}, _e = () => {
|
|
12620
12609
|
T.value && (ge(), p(), i("submit"), u.value = "", n.value = "", se(() => {
|
|
12621
|
-
o.value && (o.value.value = "",
|
|
12610
|
+
o.value && (o.value.value = "", Uh.update(o.value));
|
|
12622
12611
|
}));
|
|
12623
12612
|
}, ve = (e) => {
|
|
12624
12613
|
e.shiftKey || e.isComposing || e.keyCode === 229 || (e.preventDefault(), _e());
|
|
12625
12614
|
};
|
|
12626
12615
|
return ne(() => {
|
|
12627
|
-
o.value &&
|
|
12616
|
+
o.value && Uh(o.value);
|
|
12628
12617
|
}), A(() => {
|
|
12629
|
-
f(), o.value &&
|
|
12618
|
+
f(), o.value && Uh.destroy(o.value);
|
|
12630
12619
|
for (let e of r.value) URL.revokeObjectURL(e.localUrl);
|
|
12631
12620
|
}), (t, n) => {
|
|
12632
12621
|
let a = Gt, d = Wt, f = zt, p = Kt;
|
|
12633
|
-
return D(), K("div",
|
|
12622
|
+
return D(), K("div", qh, [he.value ? (D(), K("div", {
|
|
12634
12623
|
key: he.value.id,
|
|
12635
12624
|
class: "pk-chatbot-input__notice",
|
|
12636
12625
|
role: "status"
|
|
@@ -12644,7 +12633,7 @@ var Kh = { class: "pk-chatbot-input" }, qh = {
|
|
|
12644
12633
|
key: 1,
|
|
12645
12634
|
markdown: he.value.markdown,
|
|
12646
12635
|
class: "wysiwyg pk-chatbot-input__notice-text"
|
|
12647
|
-
}, null, 8, ["markdown"])) : (D(), K("span",
|
|
12636
|
+
}, null, 8, ["markdown"])) : (D(), K("span", Jh, N(he.value.text), 1)),
|
|
12648
12637
|
he.value.dismiss ? (D(), B(d, {
|
|
12649
12638
|
key: 3,
|
|
12650
12639
|
title: t.$t("action.close"),
|
|
@@ -12659,11 +12648,11 @@ var Kh = { class: "pk-chatbot-input" }, qh = {
|
|
|
12659
12648
|
class: "pk-chatbot-input__form",
|
|
12660
12649
|
onSubmit: Oe(_e, ["prevent"])
|
|
12661
12650
|
}, [
|
|
12662
|
-
L(R) && fe.value ? (D(), K("div",
|
|
12651
|
+
L(R) && fe.value ? (D(), K("div", Yh, [q(a, {
|
|
12663
12652
|
name: "ri:upload-cloud-2-line",
|
|
12664
12653
|
class: "pk-chatbot-input__drop-overlay-icon"
|
|
12665
12654
|
}), V("span", null, N(t.$t("action.dropFile")), 1)])) : F("", !0),
|
|
12666
|
-
r.value.length ? (D(), K("div",
|
|
12655
|
+
r.value.length ? (D(), K("div", Xh, [(D(!0), K(z, null, Pe(r.value, (e) => (D(), B(im, {
|
|
12667
12656
|
key: e.id,
|
|
12668
12657
|
"media-type": e.file.type,
|
|
12669
12658
|
url: e.localUrl,
|
|
@@ -12684,7 +12673,7 @@ var Kh = { class: "pk-chatbot-input" }, qh = {
|
|
|
12684
12673
|
"removable",
|
|
12685
12674
|
"onRemove"
|
|
12686
12675
|
]))), 128))])) : F("", !0),
|
|
12687
|
-
V("div",
|
|
12676
|
+
V("div", Zh, [
|
|
12688
12677
|
C(t.$slots, "prepend"),
|
|
12689
12678
|
e.fileUpload && e.fileUpload.enabled && (k.value || t.$slots["additional-actions"]) ? (D(), B(p, ee(O({ key: 0 }, {
|
|
12690
12679
|
placement: "top-start",
|
|
@@ -12701,7 +12690,7 @@ var Kh = { class: "pk-chatbot-input" }, qh = {
|
|
|
12701
12690
|
}), [q(a, {
|
|
12702
12691
|
name: "ri:add-line",
|
|
12703
12692
|
class: "pk-chat-button__icon"
|
|
12704
|
-
})], 16,
|
|
12693
|
+
})], 16, Qh)]),
|
|
12705
12694
|
items: S(() => [
|
|
12706
12695
|
k.value ? (D(), B(f, {
|
|
12707
12696
|
key: 0,
|
|
@@ -12727,7 +12716,7 @@ var Kh = { class: "pk-chatbot-input" }, qh = {
|
|
|
12727
12716
|
C(t.$slots, "additional-actions")
|
|
12728
12717
|
]),
|
|
12729
12718
|
_: 3
|
|
12730
|
-
}, 16)) : e.fileUpload && e.fileUpload.enabled ? (D(), B(
|
|
12719
|
+
}, 16)) : e.fileUpload && e.fileUpload.enabled ? (D(), B(Kh, {
|
|
12731
12720
|
key: 1,
|
|
12732
12721
|
icon: "ri:add-line",
|
|
12733
12722
|
title: t.$t("action.attachFile"),
|
|
@@ -12743,7 +12732,7 @@ var Kh = { class: "pk-chatbot-input" }, qh = {
|
|
|
12743
12732
|
multiple: "",
|
|
12744
12733
|
accept: re.value,
|
|
12745
12734
|
onChange: ue
|
|
12746
|
-
}, null, 40,
|
|
12735
|
+
}, null, 40, $h)) : F("", !0),
|
|
12747
12736
|
e.fileUpload && e.fileUpload.enabled && k.value ? (D(), K("input", {
|
|
12748
12737
|
key: 3,
|
|
12749
12738
|
ref_key: "cameraInputEl",
|
|
@@ -12753,8 +12742,8 @@ var Kh = { class: "pk-chatbot-input" }, qh = {
|
|
|
12753
12742
|
hidden: "",
|
|
12754
12743
|
accept: ie.value,
|
|
12755
12744
|
onChange: ue
|
|
12756
|
-
}, null, 40,
|
|
12757
|
-
V("div",
|
|
12745
|
+
}, null, 40, eg)) : F("", !0),
|
|
12746
|
+
V("div", tg, [V("textarea", {
|
|
12758
12747
|
ref_key: "textareaEl",
|
|
12759
12748
|
ref: o,
|
|
12760
12749
|
value: u.value,
|
|
@@ -12768,26 +12757,26 @@ var Kh = { class: "pk-chatbot-input" }, qh = {
|
|
|
12768
12757
|
placeholder: e.placeholder,
|
|
12769
12758
|
onInput: h,
|
|
12770
12759
|
onKeydown: ye(ve, ["enter"])
|
|
12771
|
-
}, null, 40,
|
|
12760
|
+
}, null, 40, ng)]),
|
|
12772
12761
|
e.maxMessageLength ? (D(), K("div", {
|
|
12773
12762
|
key: 4,
|
|
12774
12763
|
id: L(y),
|
|
12775
12764
|
class: ce(["pk-chatbot-input__counter", { "pk-chatbot-input__counter--over": x.value }])
|
|
12776
|
-
}, [I(N(t.$n(b.value, "integer")) + "/", 1), V("span",
|
|
12777
|
-
e.voiceEnabled && !g.value ? (D(), B(
|
|
12765
|
+
}, [I(N(t.$n(b.value, "integer")) + "/", 1), V("span", ig, N(t.$n(e.maxMessageLength, "integer")), 1)], 10, rg)) : F("", !0),
|
|
12766
|
+
e.voiceEnabled && !g.value ? (D(), B(Kh, {
|
|
12778
12767
|
key: 5,
|
|
12779
12768
|
icon: "ri:mic-line",
|
|
12780
12769
|
title: t.$t("action.talk"),
|
|
12781
12770
|
disabled: v.value,
|
|
12782
12771
|
onClick: n[1] ||= (e) => i("voice-start")
|
|
12783
12772
|
}, null, 8, ["title", "disabled"])) : F("", !0),
|
|
12784
|
-
g.value ? (D(), B(
|
|
12773
|
+
g.value ? (D(), B(Kh, {
|
|
12785
12774
|
key: 6,
|
|
12786
12775
|
icon: "ri:stop-fill",
|
|
12787
12776
|
modifiers: "primary",
|
|
12788
12777
|
title: t.$t("action.stop"),
|
|
12789
12778
|
onClick: H
|
|
12790
|
-
}, null, 8, ["title"])) : (D(), B(
|
|
12779
|
+
}, null, 8, ["title"])) : (D(), B(Kh, {
|
|
12791
12780
|
key: 7,
|
|
12792
12781
|
type: "submit",
|
|
12793
12782
|
modifiers: "primary",
|
|
@@ -12807,7 +12796,7 @@ var Kh = { class: "pk-chatbot-input" }, qh = {
|
|
|
12807
12796
|
//#endregion
|
|
12808
12797
|
//#region ../../packages/components/src/chat/PkChatbotEmptyState.vue?vue&type=script&setup=true&lang.ts
|
|
12809
12798
|
k();
|
|
12810
|
-
var
|
|
12799
|
+
var og = { class: "pk-chatbot-empty-state" }, sg = /*#__PURE__*/ Qt(/* @__PURE__ */ w({
|
|
12811
12800
|
__name: "PkChatbotEmptyState",
|
|
12812
12801
|
props: {
|
|
12813
12802
|
greeting: { type: String },
|
|
@@ -12815,7 +12804,7 @@ var ag = { class: "pk-chatbot-empty-state" }, og = /*#__PURE__*/ Qt(/* @__PURE__
|
|
|
12815
12804
|
name: { type: String }
|
|
12816
12805
|
},
|
|
12817
12806
|
setup(e) {
|
|
12818
|
-
return (t, n) => (D(), K("div",
|
|
12807
|
+
return (t, n) => (D(), K("div", og, [e.logo || e.name ? (D(), B(bp, {
|
|
12819
12808
|
key: 0,
|
|
12820
12809
|
class: "pk-chatbot-empty-state__avatar",
|
|
12821
12810
|
modifiers: "surface",
|
|
@@ -12830,7 +12819,7 @@ var ag = { class: "pk-chatbot-empty-state" }, og = /*#__PURE__*/ Qt(/* @__PURE__
|
|
|
12830
12819
|
}
|
|
12831
12820
|
}), [["styles", [".pk-chatbot-empty-state{align-items:center;gap:var(--spacing-sm);padding:var(--spacing-md);text-align:center;flex-direction:column;display:flex;position:relative}.pk-chatbot--phone .pk-chatbot-empty-state{padding-inline:var(--spacing-56)}.pk-chatbot-empty-state__avatar{width:var(--spacing-64);height:var(--spacing-64);font-size:var(--text-20);border-radius:var(--rounded-full)}.pk-chatbot:not(.pk-chatbot--tight) .pk-chatbot-empty-state__avatar{display:none}.pk-chatbot-empty-state__greeting{font-size:var(--text-28);font-weight:var(--font-light);color:var(--color-word-1);text-wrap:balance}.pk-chatbot-empty-state__greeting :first-child{margin-top:0}.pk-chatbot-empty-state__greeting :last-child{margin-bottom:0}.pk-chatbot-empty-state__avatar,.pk-chatbot-empty-state__greeting{animation:pk-chatbot-greeting-enter .6s var(--ease-out) both}@media (prefers-reduced-motion:reduce){.pk-chatbot-empty-state__avatar,.pk-chatbot-empty-state__greeting{animation:none}}@keyframes pk-chatbot-greeting-enter{0%{opacity:0;transform:translateY(var(--spacing-16))}}"]]]);
|
|
12832
12821
|
k(), J();
|
|
12833
|
-
var
|
|
12822
|
+
var cg = .18, lg = .35, ug = /*#__PURE__*/ Qt(/* @__PURE__ */ w({
|
|
12834
12823
|
__name: "PkVoiceOrb",
|
|
12835
12824
|
props: {
|
|
12836
12825
|
sample: { type: Function },
|
|
@@ -12845,20 +12834,20 @@ var sg = .18, cg = .35, lg = /*#__PURE__*/ Qt(/* @__PURE__ */ w({
|
|
|
12845
12834
|
}
|
|
12846
12835
|
},
|
|
12847
12836
|
setup(e) {
|
|
12848
|
-
let t = e, n = ae("barsEl"), r = Array.from({ length: t.bars }, () =>
|
|
12837
|
+
let t = e, n = ae("barsEl"), r = Array.from({ length: t.bars }, () => cg), i, a = () => typeof window < "u" && window.matchMedia?.("(prefers-reduced-motion: reduce)").matches === !0, o = () => {
|
|
12849
12838
|
let e = Math.min(1, Math.max(0, t.sample())), n = t.spectrum?.(), i = r.length;
|
|
12850
12839
|
if (!n?.length) {
|
|
12851
12840
|
let t = Date.now() / 260;
|
|
12852
12841
|
return Array.from({ length: i }, (n, r) => {
|
|
12853
12842
|
let i = .65 + .35 * Math.sin(t + r * .9);
|
|
12854
|
-
return
|
|
12843
|
+
return cg + e * 2.4 * i;
|
|
12855
12844
|
});
|
|
12856
12845
|
}
|
|
12857
12846
|
let a = Math.max(1, Math.floor(n.length / 2)), o = Math.max(1, Math.floor(a / i));
|
|
12858
12847
|
return Array.from({ length: i }, (e, t) => {
|
|
12859
12848
|
let r = 0;
|
|
12860
12849
|
for (let e = 0; e < o; e += 1) r += n[t * o + e] ?? 0;
|
|
12861
|
-
return
|
|
12850
|
+
return cg + r / o / 255 * 2.2;
|
|
12862
12851
|
});
|
|
12863
12852
|
}, s = () => {
|
|
12864
12853
|
let e = n.value?.children;
|
|
@@ -12867,13 +12856,13 @@ var sg = .18, cg = .35, lg = /*#__PURE__*/ Qt(/* @__PURE__ */ w({
|
|
|
12867
12856
|
});
|
|
12868
12857
|
}, c = () => {
|
|
12869
12858
|
let e = o();
|
|
12870
|
-
r = r.map((t, n) => t + (Math.min(1, Math.max(
|
|
12859
|
+
r = r.map((t, n) => t + (Math.min(1, Math.max(cg, e[n] ?? cg)) - t) * lg), s(), i = requestAnimationFrame(c);
|
|
12871
12860
|
}, l = () => {
|
|
12872
12861
|
i !== void 0 && (cancelAnimationFrame(i), i = void 0);
|
|
12873
12862
|
};
|
|
12874
12863
|
return P(() => t.state, async (e) => {
|
|
12875
12864
|
if (e !== "listening" && e !== "speaking" || a()) {
|
|
12876
|
-
l(), r = r.map(() =>
|
|
12865
|
+
l(), r = r.map(() => cg * 1.6), await se(), s();
|
|
12877
12866
|
return;
|
|
12878
12867
|
}
|
|
12879
12868
|
i === void 0 && (i = requestAnimationFrame(c));
|
|
@@ -12891,18 +12880,18 @@ var sg = .18, cg = .35, lg = /*#__PURE__*/ Qt(/* @__PURE__ */ w({
|
|
|
12891
12880
|
}
|
|
12892
12881
|
}), [["styles", [".pk-voice-orb{--pk-voice-orb-color:var(--color-word-3);width:var(--pk-voice-orb-size,var(--spacing-40));height:var(--pk-voice-orb-size,var(--spacing-40));border-radius:var(--rounded-full);background-color:color-mix(in srgb, var(--pk-voice-orb-color) 12%, transparent);transition:background-color var(--duration-200,.2s) ease;flex-shrink:0;justify-content:center;align-items:center;display:inline-flex}.pk-voice-orb__bars{height:var(--pk-voice-orb-bars-height,var(--spacing-20));align-items:center;gap:2px;display:flex}.pk-voice-orb__bar{border-radius:var(--rounded-full);background-color:var(--pk-voice-orb-color);width:3px;height:100%;transform:scaleY(var(--pk-voice-orb-scale,.2));transform-origin:50%}.pk-voice-orb--listening{--pk-voice-orb-color:var(--color-brand)}.pk-voice-orb--speaking{--pk-voice-orb-color:var(--color-accent)}.pk-voice-orb--listening,.pk-voice-orb--speaking{animation:2s ease-out infinite pk-voice-orb-live}.pk-voice-orb--error{--pk-voice-orb-color:var(--color-danger)}.pk-voice-orb--connecting .pk-voice-orb__bar{animation:1.2s ease-in-out infinite pk-voice-orb-wait}.pk-voice-orb--connecting .pk-voice-orb__bar:nth-child(2){animation-delay:.15s}.pk-voice-orb--connecting .pk-voice-orb__bar:nth-child(3){animation-delay:.3s}.pk-voice-orb--connecting .pk-voice-orb__bar:nth-child(4){animation-delay:.45s}.pk-voice-orb--connecting .pk-voice-orb__bar:nth-child(5){animation-delay:.6s}@keyframes pk-voice-orb-wait{0%,to{transform:scaleY(.25)}50%{transform:scaleY(.8)}}@keyframes pk-voice-orb-live{0%{box-shadow:0 0 0 0 color-mix(in srgb, var(--pk-voice-orb-color) 35%, transparent)}to{box-shadow:0 0 0 var(--spacing-8) transparent}}@media (prefers-reduced-motion:reduce){.pk-voice-orb__bar{animation:none;transform:scaleY(.45)}.pk-voice-orb--listening,.pk-voice-orb--speaking{box-shadow:0 0 0 3px color-mix(in srgb, var(--pk-voice-orb-color) 20%, transparent);animation:none}}"]]]);
|
|
12893
12882
|
k(), J(), H();
|
|
12894
|
-
var
|
|
12883
|
+
var dg = {
|
|
12895
12884
|
key: 0,
|
|
12896
12885
|
class: "pk-voice-session__badge",
|
|
12897
12886
|
"aria-hidden": "true"
|
|
12898
|
-
},
|
|
12887
|
+
}, fg = {
|
|
12899
12888
|
class: "pk-voice-session__status",
|
|
12900
12889
|
role: "status"
|
|
12901
|
-
},
|
|
12890
|
+
}, pg = {
|
|
12902
12891
|
key: 0,
|
|
12903
12892
|
class: "pk-voice-session__live-dot",
|
|
12904
12893
|
"aria-hidden": "true"
|
|
12905
|
-
},
|
|
12894
|
+
}, mg = ["title"], hg = ["title"], gg = { class: "pk-voice-session__actions" }, _g = /*#__PURE__*/ Qt(/* @__PURE__ */ w({
|
|
12906
12895
|
__name: "PkVoiceSession",
|
|
12907
12896
|
props: {
|
|
12908
12897
|
state: { type: String },
|
|
@@ -12931,7 +12920,7 @@ var ug = {
|
|
|
12931
12920
|
return (t, n) => {
|
|
12932
12921
|
let u = Gt;
|
|
12933
12922
|
return D(), K("div", { class: ce(["pk-voice-session", { "pk-voice-session--failed": !!e.error }]) }, [
|
|
12934
|
-
e.error ? (D(), K("span",
|
|
12923
|
+
e.error ? (D(), K("span", dg, [q(u, { name: "ri:error-warning-line" })])) : (D(), B(ug, {
|
|
12935
12924
|
key: 1,
|
|
12936
12925
|
state: e.state,
|
|
12937
12926
|
sample: e.sample,
|
|
@@ -12941,34 +12930,34 @@ var ug = {
|
|
|
12941
12930
|
"sample",
|
|
12942
12931
|
"spectrum"
|
|
12943
12932
|
])),
|
|
12944
|
-
V("div",
|
|
12933
|
+
V("div", fg, [V("span", { class: ce(["pk-voice-session__state", l.value && `pk-voice-session__state--${l.value}`]) }, [c.value ? (D(), K("span", pg)) : F("", !0), I(" " + N(a.value), 1)], 2), e.error ? (D(), K("p", {
|
|
12945
12934
|
key: 0,
|
|
12946
12935
|
class: "pk-voice-session__detail",
|
|
12947
12936
|
title: e.rawError ?? e.error
|
|
12948
|
-
}, N(e.error), 9,
|
|
12937
|
+
}, N(e.error), 9, mg)) : F("", !0)]),
|
|
12949
12938
|
o.value ? (D(), K("span", {
|
|
12950
12939
|
key: 2,
|
|
12951
12940
|
class: ce(["pk-voice-session__timer", { "pk-voice-session__timer--warning": s.value }]),
|
|
12952
12941
|
title: L(i)("hint.voiceRemaining"),
|
|
12953
12942
|
"aria-hidden": "true"
|
|
12954
|
-
}, N(o.value), 11,
|
|
12955
|
-
V("div",
|
|
12943
|
+
}, N(o.value), 11, hg)) : F("", !0),
|
|
12944
|
+
V("div", gg, [e.error ? (D(), K(z, { key: 0 }, [q(Kh, {
|
|
12956
12945
|
icon: "ri:refresh-line",
|
|
12957
12946
|
label: L(i)("action.retry"),
|
|
12958
12947
|
onClick: n[0] ||= (e) => r("retry")
|
|
12959
|
-
}, null, 8, ["label"]), e.live ? (D(), B(
|
|
12948
|
+
}, null, 8, ["label"]), e.live ? (D(), B(Kh, {
|
|
12960
12949
|
key: 0,
|
|
12961
12950
|
icon: "ri:stop-circle-line",
|
|
12962
12951
|
modifiers: "danger",
|
|
12963
12952
|
title: L(i)("action.hangUp"),
|
|
12964
12953
|
"aria-label": L(i)("action.hangUp"),
|
|
12965
12954
|
onClick: n[1] ||= (e) => r("hang-up")
|
|
12966
|
-
}, null, 8, ["title", "aria-label"])) : (D(), B(
|
|
12955
|
+
}, null, 8, ["title", "aria-label"])) : (D(), B(Kh, {
|
|
12967
12956
|
key: 1,
|
|
12968
12957
|
icon: "ri:close-line",
|
|
12969
12958
|
label: L(i)("action.close"),
|
|
12970
12959
|
onClick: n[2] ||= (e) => r("dismiss")
|
|
12971
|
-
}, null, 8, ["label"]))], 64)) : (D(), K(z, { key: 1 }, [q(
|
|
12960
|
+
}, null, 8, ["label"]))], 64)) : (D(), K(z, { key: 1 }, [q(Kh, {
|
|
12972
12961
|
icon: e.muted ? "ri:mic-off-line" : "ri:mic-line",
|
|
12973
12962
|
title: e.muted ? L(i)("action.unmute") : L(i)("action.mute"),
|
|
12974
12963
|
"aria-label": e.muted ? L(i)("action.unmute") : L(i)("action.mute"),
|
|
@@ -12979,7 +12968,7 @@ var ug = {
|
|
|
12979
12968
|
"title",
|
|
12980
12969
|
"aria-label",
|
|
12981
12970
|
"aria-pressed"
|
|
12982
|
-
]), q(
|
|
12971
|
+
]), q(Kh, {
|
|
12983
12972
|
icon: "ri:stop-circle-line",
|
|
12984
12973
|
modifiers: "danger",
|
|
12985
12974
|
title: L(i)("action.hangUp"),
|
|
@@ -12993,7 +12982,7 @@ var ug = {
|
|
|
12993
12982
|
//#endregion
|
|
12994
12983
|
//#region ../../packages/components/src/chat/useVoiceSession.ts
|
|
12995
12984
|
k(), H();
|
|
12996
|
-
var
|
|
12985
|
+
var vg = (e) => {
|
|
12997
12986
|
let t = ge(), n = W("disconnected"), r = W("listening"), i = W(), a = W([]), o = W(), s = W(), c, l, u = 0, d = !1, f = () => {
|
|
12998
12987
|
l &&= (clearInterval(l), void 0), o.value = void 0;
|
|
12999
12988
|
}, p = (e) => {
|
|
@@ -13119,16 +13108,16 @@ var _g = (e) => {
|
|
|
13119
13108
|
};
|
|
13120
13109
|
};
|
|
13121
13110
|
k(), H(), Te(), J();
|
|
13122
|
-
var
|
|
13111
|
+
var yg = { class: "pk-chatbot-view-chat__input-stage" }, bg = {
|
|
13123
13112
|
key: 0,
|
|
13124
13113
|
class: "p-md border-t border-surface-3 text-center text-12 text-danger-darken-2 bg-surface-danger"
|
|
13125
|
-
},
|
|
13114
|
+
}, xg = { class: "pk-chatbot-view-chat__agent-chip" }, Sg = {
|
|
13126
13115
|
key: 0,
|
|
13127
13116
|
class: "pk-chatbot-view-chat__agent-chip-name"
|
|
13128
|
-
},
|
|
13117
|
+
}, Cg = {
|
|
13129
13118
|
key: 0,
|
|
13130
13119
|
class: "pk-chatbot-view-chat__drop-overlay"
|
|
13131
|
-
},
|
|
13120
|
+
}, wg = 3e3, Tg = 6e4, Eg = 3e5, Dg = 6e5, Og = /*#__PURE__*/ Qt(/* @__PURE__ */ w({
|
|
13132
13121
|
__name: "PkChatbotViewChat",
|
|
13133
13122
|
props: {
|
|
13134
13123
|
agentId: { type: String },
|
|
@@ -13172,12 +13161,12 @@ var vg = { class: "pk-chatbot-view-chat__input-stage" }, yg = {
|
|
|
13172
13161
|
}
|
|
13173
13162
|
if (J) return;
|
|
13174
13163
|
if (e === "caught-up" && (Y.value = !1), X.isActive.value) {
|
|
13175
|
-
Le = void 0, Re = !1, ze = 0, He(
|
|
13164
|
+
Le = void 0, Re = !1, ze = 0, He(wg);
|
|
13176
13165
|
return;
|
|
13177
13166
|
}
|
|
13178
13167
|
Le === void 0 && (Le = Date.now(), Re = !!X.error.value);
|
|
13179
13168
|
let t = Date.now() - Le;
|
|
13180
|
-
if (e === "caught-up" && t >= (Re ?
|
|
13169
|
+
if (e === "caught-up" && t >= (Re ? Eg : Tg) || t >= Dg) {
|
|
13181
13170
|
Ve();
|
|
13182
13171
|
return;
|
|
13183
13172
|
}
|
|
@@ -13186,7 +13175,7 @@ var vg = { class: "pk-chatbot-view-chat__input-stage" }, yg = {
|
|
|
13186
13175
|
}
|
|
13187
13176
|
let We = (e = 1200) => {
|
|
13188
13177
|
He(e);
|
|
13189
|
-
}, X =
|
|
13178
|
+
}, X = vg({
|
|
13190
13179
|
fetchGrant: async () => {
|
|
13191
13180
|
let e = await j.value.createVoiceSession(u.agentId, f.localChatId, {
|
|
13192
13181
|
deviceContext: f.buildDeviceContext(),
|
|
@@ -13220,7 +13209,7 @@ var vg = { class: "pk-chatbot-view-chat__input-stage" }, yg = {
|
|
|
13220
13209
|
let e = X.error.value;
|
|
13221
13210
|
if (e) return /took too long/i.test(e) ? Se("message.voiceTookTooLong") : /cascade|no response|custom_llm_error/i.test(e) ? Se("message.voiceNoAnswer") : Se("message.voiceInterrupted");
|
|
13222
13211
|
}), Ye = U(() => X.isSpeaking.value ? "output" : "input"), Xe = () => X.readLevel(Ye.value), Ze = () => X.readSpectrum(Ye.value), Qe = async () => {
|
|
13223
|
-
Me.value = !1, await X.start(), X.isActive.value && (Ve(), He(
|
|
13212
|
+
Me.value = !1, await X.start(), X.isActive.value && (Ve(), He(wg));
|
|
13224
13213
|
}, $e = async () => {
|
|
13225
13214
|
Y.value = !1, await X.stop(), !J && We(0);
|
|
13226
13215
|
}, et = () => {
|
|
@@ -13281,7 +13270,7 @@ var vg = { class: "pk-chatbot-view-chat__input-stage" }, yg = {
|
|
|
13281
13270
|
name: "pk-chatbot-view-chat-fade",
|
|
13282
13271
|
mode: "out-in"
|
|
13283
13272
|
}, {
|
|
13284
|
-
default: S(() => [Ee.value ? (D(), B(
|
|
13273
|
+
default: S(() => [Ee.value ? (D(), B(sg, {
|
|
13285
13274
|
key: 0,
|
|
13286
13275
|
greeting: L(De),
|
|
13287
13276
|
logo: L(p)?.logo,
|
|
@@ -13290,7 +13279,7 @@ var vg = { class: "pk-chatbot-view-chat__input-stage" }, yg = {
|
|
|
13290
13279
|
"greeting",
|
|
13291
13280
|
"logo",
|
|
13292
13281
|
"name"
|
|
13293
|
-
])) : (D(), B(
|
|
13282
|
+
])) : (D(), B(Rh, {
|
|
13294
13283
|
key: 1,
|
|
13295
13284
|
class: "flex flex-col flex-1 min-h-0 p-md overflow-y-auto",
|
|
13296
13285
|
interactive: "",
|
|
@@ -13441,14 +13430,14 @@ var vg = { class: "pk-chatbot-view-chat__input-stage" }, yg = {
|
|
|
13441
13430
|
]))]),
|
|
13442
13431
|
_: 1
|
|
13443
13432
|
}),
|
|
13444
|
-
V("div",
|
|
13445
|
-
default: S(() => [Ee.value ? (D(), B(
|
|
13433
|
+
V("div", yg, [q(G, { name: "pk-chatbot-view-chat-fade" }, {
|
|
13434
|
+
default: S(() => [Ee.value ? (D(), B(Tp, {
|
|
13446
13435
|
key: 0,
|
|
13447
13436
|
class: "pk-chatbot-view-chat__aurora",
|
|
13448
13437
|
"source-selector": ".pk-chatbot-input__form"
|
|
13449
13438
|
})) : F("", !0)]),
|
|
13450
13439
|
_: 1
|
|
13451
|
-
}), L(ie) ? (D(), K("div",
|
|
13440
|
+
}), L(ie) ? (D(), K("div", bg, N(L(Se)("message.chatErrorConversationBlocked")), 1)) : Ke.value === "idle" ? (D(), B(ag, {
|
|
13452
13441
|
key: 2,
|
|
13453
13442
|
modelValue: L(E),
|
|
13454
13443
|
"onUpdate:modelValue": h[4] ||= (e) => R(E) ? E.value = e : null,
|
|
@@ -13469,12 +13458,12 @@ var vg = { class: "pk-chatbot-view-chat__input-stage" }, yg = {
|
|
|
13469
13458
|
onVoiceStart: Qe
|
|
13470
13459
|
}, Ne({ _: 2 }, [e.modifier === "fullscreen" ? {
|
|
13471
13460
|
name: "prepend",
|
|
13472
|
-
fn: S(() => [V("span",
|
|
13461
|
+
fn: S(() => [V("span", xg, [q(bp, {
|
|
13473
13462
|
modifiers: "surface",
|
|
13474
13463
|
class: "pk-chatbot-view-chat__agent-chip-avatar",
|
|
13475
13464
|
"img-src": L(p)?.logo,
|
|
13476
13465
|
name: L(f).name
|
|
13477
|
-
}, null, 8, ["img-src", "name"]), L(f).name ? (D(), K("strong",
|
|
13466
|
+
}, null, 8, ["img-src", "name"]), L(f).name ? (D(), K("strong", Sg, N(L(f).name), 1)) : F("", !0)])]),
|
|
13478
13467
|
key: "0"
|
|
13479
13468
|
} : void 0]), 1032, [
|
|
13480
13469
|
"modelValue",
|
|
@@ -13491,7 +13480,7 @@ var vg = { class: "pk-chatbot-view-chat__input-stage" }, yg = {
|
|
|
13491
13480
|
"onSubmit",
|
|
13492
13481
|
"onFileSelect",
|
|
13493
13482
|
"onDismissAttachmentNotice"
|
|
13494
|
-
])) : (D(), B(
|
|
13483
|
+
])) : (D(), B(_g, {
|
|
13495
13484
|
key: 1,
|
|
13496
13485
|
state: Ke.value,
|
|
13497
13486
|
sample: Xe,
|
|
@@ -13515,7 +13504,7 @@ var vg = { class: "pk-chatbot-view-chat__input-stage" }, yg = {
|
|
|
13515
13504
|
"live"
|
|
13516
13505
|
]))]),
|
|
13517
13506
|
q(G, null, {
|
|
13518
|
-
default: S(() => [L(je) && L(m)?.enabled ? (D(), K("div",
|
|
13507
|
+
default: S(() => [L(je) && L(m)?.enabled ? (D(), K("div", Cg, [q(ae, {
|
|
13519
13508
|
name: "ri:upload-cloud-2-line",
|
|
13520
13509
|
class: "pk-chatbot-view-chat__drop-overlay-icon"
|
|
13521
13510
|
}), V("span", null, N(L(Se)("action.dropFile")), 1)])) : F("", !0)]),
|
|
@@ -13526,23 +13515,23 @@ var vg = { class: "pk-chatbot-view-chat__input-stage" }, yg = {
|
|
|
13526
13515
|
}
|
|
13527
13516
|
}), [["styles", [".pk-chatbot-view-chat{flex-direction:column;flex:1;min-height:0;display:flex;position:relative}.pk-chatbot-view-chat--empty{justify-content:center;gap:var(--spacing-md)}.pk-chatbot--phone .pk-chatbot-view-chat--empty{justify-content:flex-start}.pk-chatbot--phone .pk-chatbot-view-chat--empty .pk-chatbot-empty-state{flex:1;justify-content:center}.pk-chatbot-view-chat__input-stage{position:relative}.pk-chatbot-view-chat__input-stage .pk-chatbot-view-chat__aurora{inset:calc(-1 * var(--spacing-224)) calc(-1 * var(--spacing-96)) calc(-1 * var(--spacing-160))}.pk-chatbot--phone .pk-chatbot-view-chat__input-stage .pk-chatbot-view-chat__aurora{--aurora-spread:1.6;inset:calc(-1 * var(--spacing-384) - var(--spacing-128)) calc(-1 * var(--spacing-96)) calc(-1 * var(--spacing-160))}.pk-chatbot-view-chat__agent-chip{align-items:center;gap:var(--spacing-6);padding:var(--spacing-4) var(--spacing-10) var(--spacing-4) var(--spacing-4);border:1px solid var(--color-surface-3);border-radius:var(--rounded-full);background-color:var(--color-surface);flex-shrink:0;display:inline-flex}.pk-chatbot--tight .pk-chatbot-view-chat__agent-chip{display:none}.pk-chatbot-view-chat__agent-chip-avatar{width:var(--spacing-24);height:var(--spacing-24);font-size:var(--text-10);border-radius:var(--rounded-full)}.pk-chatbot-view-chat__agent-chip-name{font-size:var(--text-12);font-weight:var(--font-semibold);color:var(--color-word-2);white-space:nowrap}.pk-chatbot-view-chat-fade-enter-active{transition:opacity .25s var(--ease-out)}.pk-chatbot-view-chat-fade-leave-active{transition:opacity .15s var(--ease-out)}.pk-chatbot-view-chat-fade-enter-from,.pk-chatbot-view-chat-fade-leave-to{opacity:0}@media (prefers-reduced-motion:reduce){.pk-chatbot-view-chat-fade-enter-active,.pk-chatbot-view-chat-fade-leave-active{transition:none}}.pk-chatbot-view-chat__drop-overlay{inset:var(--spacing-sm) var(--spacing-sm) var(--spacing-sm) var(--spacing-sm);z-index:1;justify-content:center;align-items:center;gap:var(--spacing-xs);background-color:color-mix(in srgb, var(--color-surface) 85%, transparent);border-radius:var(--rounded-xl);border:var(--spacing-2) dashed var(--color-surface-5);pointer-events:none;color:var(--color-word-3);flex-direction:column;display:flex;position:absolute}.pk-chatbot-view-chat__drop-overlay-icon{font-size:var(--spacing-32)}"]]]);
|
|
13528
13517
|
k(), H(), J(), Te();
|
|
13529
|
-
var
|
|
13518
|
+
var kg = { class: "flex flex-col flex-1 min-h-0 relative" }, Ag = {
|
|
13530
13519
|
key: 0,
|
|
13531
13520
|
class: "u-pick-list__list u-pick-list__list--fill"
|
|
13532
|
-
},
|
|
13521
|
+
}, jg = { class: "u-pick-list__entry u-pick-list__entry--roomy" }, Mg = { class: "flex flex-col gap-6 flex-1 min-w-0" }, Ng = {
|
|
13533
13522
|
key: 1,
|
|
13534
13523
|
class: "flex flex-col flex-1 items-center justify-center gap-12 p-24 text-center"
|
|
13535
|
-
},
|
|
13524
|
+
}, Pg = { class: "w-64 h-64 rounded-full bg-surface-1 border border-surface-3 flex items-center justify-center" }, Fg = { class: "flex flex-col gap-4" }, Ig = { class: "text-16 font-semibold text-word-1" }, Lg = { class: "text-14 text-word-3 leading-relaxed" }, Rg = {
|
|
13536
13525
|
key: 2,
|
|
13537
13526
|
class: "u-pick-list__list u-pick-list__list--fill overflow-y-auto pb-64 light-scrollbar"
|
|
13538
|
-
},
|
|
13527
|
+
}, zg = {
|
|
13539
13528
|
key: 0,
|
|
13540
13529
|
class: "flex flex-1 items-center gap-8 min-w-0 px-md py-12"
|
|
13541
|
-
},
|
|
13530
|
+
}, Bg = ["aria-current", "onClick"], Vg = { class: "min-w-0 flex-1" }, Hg = { class: "flex items-center gap-8" }, Ug = { class: "u-pick-list__label font-medium flex-1" }, Wg = { class: "text-12 text-word-4 line-clamp-2" }, Gg = { class: "u-pick-list__actions" }, Kg = {
|
|
13542
13531
|
key: 3,
|
|
13543
13532
|
class: "absolute bottom-0 left-0 right-0 flex flex-col items-center gap-4 px-16 pb-16 pt-32 pointer-events-none",
|
|
13544
13533
|
style: { background: "linear-gradient(to top, var(--color-surface) 55%, transparent)" }
|
|
13545
|
-
},
|
|
13534
|
+
}, qg = /* @__PURE__ */ w({
|
|
13546
13535
|
__name: "PkChatbotViewConversations",
|
|
13547
13536
|
props: { agentId: { type: String } },
|
|
13548
13537
|
setup(e) {
|
|
@@ -13553,7 +13542,7 @@ var Og = { class: "flex flex-col flex-1 min-h-0 relative" }, kg = {
|
|
|
13553
13542
|
d.value || (o.value = e, s("chat"));
|
|
13554
13543
|
}, y = (e) => o.value === e.id, b = (e, t) => vt(Ve(e.filter((e) => e.role === t).slice(-1)[0]) || ""), x = (e) => {
|
|
13555
13544
|
p(e, b(e.messages, "assistant"));
|
|
13556
|
-
}, { openDialogConfirm: C } = xd(), w = ve(
|
|
13545
|
+
}, { openDialogConfirm: C } = xd(), w = ve(pp, void 0), ee = U(() => !!w?.eraseConversations && !(w.isExternalAuth?.value ?? !1)), T = W(!1), te = async () => {
|
|
13557
13546
|
let e = w?.eraseConversations;
|
|
13558
13547
|
if (e && ee.value && await C({
|
|
13559
13548
|
title: n("confirmTitle.deleteMyConversations"),
|
|
@@ -13571,19 +13560,19 @@ var Og = { class: "flex flex-col flex-1 min-h-0 relative" }, kg = {
|
|
|
13571
13560
|
};
|
|
13572
13561
|
return (e, t) => {
|
|
13573
13562
|
let r = Gt, o = Wt, s = Bt, l = Rt, u = zt, p = Kt;
|
|
13574
|
-
return D(), K("div",
|
|
13563
|
+
return D(), K("div", kg, [L(a) && L(i).length === 0 ? (D(), K("div", Ag, [(D(), K(z, null, Pe(5, (e) => V("div", {
|
|
13575
13564
|
key: e,
|
|
13576
13565
|
class: "u-pick-list__row u-pick-list__row--skeleton"
|
|
13577
|
-
}, [V("div",
|
|
13566
|
+
}, [V("div", jg, [V("div", Mg, [
|
|
13578
13567
|
V("div", { class: ce(["vv-skeleton h-16 rounded", e % 2 ? "w-192" : "w-128"]) }, [...t[5] ||= [V("div", { class: "vv-skeleton__item" }, null, -1)]], 2),
|
|
13579
13568
|
t[6] ||= V("div", { class: "vv-skeleton h-12 rounded" }, [V("div", { class: "vv-skeleton__item" })], -1),
|
|
13580
13569
|
t[7] ||= V("div", { class: "vv-skeleton h-12 rounded w-160" }, [V("div", { class: "vv-skeleton__item" })], -1)
|
|
13581
|
-
])])])), 64))])) : L(i).length === 0 ? (D(), K("div",
|
|
13582
|
-
V("div",
|
|
13570
|
+
])])])), 64))])) : L(i).length === 0 ? (D(), K("div", Ng, [
|
|
13571
|
+
V("div", Pg, [q(r, {
|
|
13583
13572
|
name: "ri:chat-3-line",
|
|
13584
13573
|
class: "w-28 h-28 text-word-4"
|
|
13585
13574
|
})]),
|
|
13586
|
-
V("div",
|
|
13575
|
+
V("div", Fg, [V("strong", Ig, N(L(n)("message.noConversations")), 1), V("span", Lg, N(L(n)("message.noConversationsHint")), 1)]),
|
|
13587
13576
|
q(o, {
|
|
13588
13577
|
modifiers: "primary rounded",
|
|
13589
13578
|
icon: "ri:add-line",
|
|
@@ -13591,10 +13580,10 @@ var Og = { class: "flex flex-col flex-1 min-h-0 relative" }, kg = {
|
|
|
13591
13580
|
label: L(n)("action.startNewChat"),
|
|
13592
13581
|
onClick: t[0] ||= (e) => L(c)()
|
|
13593
13582
|
}, null, 8, ["label"])
|
|
13594
|
-
])) : (D(), K("ul",
|
|
13583
|
+
])) : (D(), K("ul", Rg, [(D(!0), K(z, null, Pe(L(i), (e) => (D(), K("li", {
|
|
13595
13584
|
key: e.id,
|
|
13596
13585
|
class: ce(["u-pick-list__row", { "u-pick-list__row--current": y(e) }])
|
|
13597
|
-
}, [L(d) === e.id ? (D(), K("div",
|
|
13586
|
+
}, [L(d) === e.id ? (D(), K("div", zg, [q(s, {
|
|
13598
13587
|
modelValue: L(f),
|
|
13599
13588
|
"onUpdate:modelValue": t[1] ||= (e) => R(f) ? f.value = e : null,
|
|
13600
13589
|
class: "flex-1 mb-0",
|
|
@@ -13626,10 +13615,10 @@ var Og = { class: "flex flex-col flex-1 min-h-0 relative" }, kg = {
|
|
|
13626
13615
|
class: "u-pick-list__entry u-pick-list__entry--roomy leading-relaxed",
|
|
13627
13616
|
"aria-current": y(e) ? "true" : void 0,
|
|
13628
13617
|
onClick: (t) => v(e.id)
|
|
13629
|
-
}, [V("div",
|
|
13618
|
+
}, [V("div", Vg, [V("div", Hg, [V("strong", Ug, N(L(vt)(e.title) || b(e.messages, "assistant")), 1), q(sm, {
|
|
13630
13619
|
class: "text-word-4 text-smaller shrink-0",
|
|
13631
13620
|
date: e.lastMessageAt
|
|
13632
|
-
}, null, 8, ["date"])]), V("span",
|
|
13621
|
+
}, null, 8, ["date"])]), V("span", Wg, N(L(vt)(e.summary) || b(e.messages, "user")), 1)])], 8, Bg), V("div", Gg, [q(p, O({ ref_for: !0 }, {
|
|
13633
13622
|
placement: "bottom-end",
|
|
13634
13623
|
modifiers: "menu",
|
|
13635
13624
|
flip: !0,
|
|
@@ -13649,7 +13638,7 @@ var Og = { class: "flex flex-col flex-1 min-h-0 relative" }, kg = {
|
|
|
13649
13638
|
modifiers: "action-quiet-small"
|
|
13650
13639
|
}, null, 8, ["title"])]),
|
|
13651
13640
|
_: 2
|
|
13652
|
-
}, 1040)])], 64))], 2))), 128))])), L(i).length > 0 ? (D(), K("div",
|
|
13641
|
+
}, 1040)])], 64))], 2))), 128))])), L(i).length > 0 ? (D(), K("div", Kg, [q(o, {
|
|
13653
13642
|
class: "text-14 pointer-events-auto",
|
|
13654
13643
|
modifiers: "primary rounded",
|
|
13655
13644
|
icon: "ri:add-line",
|
|
@@ -13673,16 +13662,16 @@ var Og = { class: "flex flex-col flex-1 min-h-0 relative" }, kg = {
|
|
|
13673
13662
|
}
|
|
13674
13663
|
});
|
|
13675
13664
|
k(), H(), J();
|
|
13676
|
-
var
|
|
13665
|
+
var Jg = { class: "flex flex-col flex-1 min-h-0 relative" }, Yg = {
|
|
13677
13666
|
key: 0,
|
|
13678
13667
|
class: "u-pick-list__list u-pick-list__list--fill"
|
|
13679
|
-
},
|
|
13668
|
+
}, Xg = { class: "u-pick-list__entry u-pick-list__entry--roomy" }, Zg = { class: "flex flex-col gap-6 flex-1 min-w-0" }, Qg = {
|
|
13680
13669
|
key: 1,
|
|
13681
13670
|
class: "flex flex-col flex-1 items-center justify-center gap-12 p-24 text-center"
|
|
13682
|
-
},
|
|
13671
|
+
}, $g = { class: "w-64 h-64 rounded-full bg-surface-1 border border-surface-3 flex items-center justify-center" }, e_ = { class: "text-14 text-word-3 leading-relaxed" }, t_ = {
|
|
13683
13672
|
key: 2,
|
|
13684
13673
|
class: "pk-chatbot-files u-pick-list__list u-pick-list__list--fill overflow-y-auto light-scrollbar"
|
|
13685
|
-
},
|
|
13674
|
+
}, n_ = ["title", "onClick"], r_ = { class: "pk-chatbot-files__icon" }, i_ = ["src", "onError"], a_ = { class: "flex flex-col min-w-0 flex-1" }, o_ = { class: "u-pick-list__label" }, s_ = { class: "text-12 text-word-3" }, c_ = { class: "u-pick-list__actions pk-chatbot-files__actions" }, l_ = /*#__PURE__*/ Qt(/* @__PURE__ */ w({
|
|
13686
13675
|
__name: "PkChatbotViewFiles",
|
|
13687
13676
|
props: { agentId: { type: String } },
|
|
13688
13677
|
setup(e) {
|
|
@@ -13704,13 +13693,13 @@ var qg = { class: "flex flex-col flex-1 min-h-0 relative" }, Jg = {
|
|
|
13704
13693
|
};
|
|
13705
13694
|
return (e, t) => {
|
|
13706
13695
|
let r = Gt, i = Wt;
|
|
13707
|
-
return D(), K("div",
|
|
13696
|
+
return D(), K("div", Jg, [L(o) && L(a).length === 0 ? (D(), K("div", Yg, [(D(), K(z, null, Pe(4, (e) => V("div", {
|
|
13708
13697
|
key: e,
|
|
13709
13698
|
class: "u-pick-list__row u-pick-list__row--skeleton"
|
|
13710
|
-
}, [V("div",
|
|
13699
|
+
}, [V("div", Xg, [t[2] ||= V("div", { class: "vv-skeleton w-36 h-36 shrink-0 rounded-md" }, [V("div", { class: "vv-skeleton__item" })], -1), V("div", Zg, [V("div", { class: ce(["vv-skeleton h-14 rounded", e % 2 ? "w-192" : "w-128"]) }, [...t[0] ||= [V("div", { class: "vv-skeleton__item" }, null, -1)]], 2), t[1] ||= V("div", { class: "vv-skeleton h-12 rounded w-96" }, [V("div", { class: "vv-skeleton__item" })], -1)])])])), 64))])) : L(a).length === 0 ? (D(), K("div", Qg, [V("div", $g, [q(r, {
|
|
13711
13700
|
name: "ri:folder-open-line",
|
|
13712
13701
|
class: "w-28 h-28 text-word-4"
|
|
13713
|
-
})]), V("span",
|
|
13702
|
+
})]), V("span", e_, N(L(n)("userFiles.chatFilesEmpty")), 1)])) : (D(), K("ul", t_, [(D(!0), K(z, null, Pe(L(a), (e) => (D(), K("li", {
|
|
13714
13703
|
key: e.documentId,
|
|
13715
13704
|
class: "u-pick-list__row"
|
|
13716
13705
|
}, [V("button", {
|
|
@@ -13718,7 +13707,7 @@ var qg = { class: "flex flex-col flex-1 min-h-0 relative" }, Jg = {
|
|
|
13718
13707
|
class: "u-pick-list__entry u-pick-list__entry--roomy",
|
|
13719
13708
|
title: L(n)("userFiles.open"),
|
|
13720
13709
|
onClick: (t) => L(u)(e)
|
|
13721
|
-
}, [V("span",
|
|
13710
|
+
}, [V("span", r_, [L(s)(e) ? (D(), K("img", {
|
|
13722
13711
|
key: 0,
|
|
13723
13712
|
src: L(c)(e),
|
|
13724
13713
|
loading: "lazy",
|
|
@@ -13726,10 +13715,10 @@ var qg = { class: "flex flex-col flex-1 min-h-0 relative" }, Jg = {
|
|
|
13726
13715
|
alt: "",
|
|
13727
13716
|
class: "pk-chatbot-files__thumb",
|
|
13728
13717
|
onError: (t) => L(l)(e)
|
|
13729
|
-
}, null, 40,
|
|
13718
|
+
}, null, 40, i_)) : (D(), B(r, {
|
|
13730
13719
|
key: 1,
|
|
13731
13720
|
name: L(_t)(e.mimeType)
|
|
13732
|
-
}, null, 8, ["name"]))]), V("span",
|
|
13721
|
+
}, null, 8, ["name"]))]), V("span", a_, [V("span", o_, N(e.name || L(n)("userFiles.untitled")), 1), V("span", s_, N(L(d)(e.createdAt)), 1)])], 8, n_), V("div", c_, [q(i, {
|
|
13733
13722
|
modifiers: "action-quiet-small",
|
|
13734
13723
|
icon: "ri:download-line",
|
|
13735
13724
|
title: L(n)("action.download"),
|
|
@@ -13751,20 +13740,20 @@ var qg = { class: "flex flex-col flex-1 min-h-0 relative" }, Jg = {
|
|
|
13751
13740
|
}
|
|
13752
13741
|
}), [["styles", [".pk-chatbot-files{margin:0;padding:0;list-style:none}.pk-chatbot-files__icon{width:var(--spacing-36);height:var(--spacing-36);border-radius:var(--rounded-md);color:var(--color-word-3);flex-shrink:0;justify-content:center;align-items:center;display:flex;overflow:hidden}.pk-chatbot-files__icon svg{width:var(--spacing-20);height:var(--spacing-20)}.pk-chatbot-files__thumb{object-fit:cover;width:100%;height:100%}.pk-chatbot-files__actions{gap:var(--spacing-2)}"]]]);
|
|
13753
13742
|
k(), H(), J();
|
|
13754
|
-
var
|
|
13743
|
+
var u_ = { class: "flex flex-col flex-1 min-h-0 overflow-y-auto" }, d_ = { class: "flex flex-col items-center gap-sm pt-lg px-lg pb-md bg-surface-1 border-b border-surface-3" }, f_ = { class: "flex flex-col items-center gap-6 text-center" }, p_ = {
|
|
13755
13744
|
key: 0,
|
|
13756
13745
|
class: "text-16 font-semibold text-word-1 leading-tight"
|
|
13757
|
-
},
|
|
13746
|
+
}, m_ = {
|
|
13758
13747
|
key: 1,
|
|
13759
13748
|
class: "text-12 text-word-3 leading-none"
|
|
13760
|
-
},
|
|
13749
|
+
}, h_ = { class: "flex flex-col gap-sm p-md flex-1" }, g_ = ["href"], __ = { class: "w-40 h-40 rounded-lg bg-surface-2 border border-surface-3 flex items-center justify-center shrink-0" }, v_ = { class: "flex flex-col flex-1 min-w-0 gap-1" }, y_ = { class: "text-14 font-medium text-word-1 leading-tight" }, b_ = { class: "text-12 text-word-3 leading-tight" }, x_ = {
|
|
13761
13750
|
key: 0,
|
|
13762
13751
|
class: "px-md py-sm"
|
|
13763
|
-
},
|
|
13752
|
+
}, S_ = /* @__PURE__ */ w({
|
|
13764
13753
|
__name: "PkChatbotViewProfile",
|
|
13765
13754
|
props: { agentId: { type: String } },
|
|
13766
13755
|
setup(e) {
|
|
13767
|
-
let t = e, { t: n } = Ie({ useScope: "global" }), { name: r, agentInterface: i } = Nn(dd(t.agentId)), a = ve(
|
|
13756
|
+
let t = e, { t: n } = Ie({ useScope: "global" }), { name: r, agentInterface: i } = Nn(dd(t.agentId)), a = ve(pp, void 0), o = U(() => a?.user.value ?? null), s = U(() => a?.canManageProfile.value ?? !1), c = U(() => a?.profileUrl.value), l = U(() => a?.isExternalAuth?.value ?? !1), u = W(!1), d = W();
|
|
13768
13757
|
async function f() {
|
|
13769
13758
|
if (a) {
|
|
13770
13759
|
u.value = !0;
|
|
@@ -13779,14 +13768,14 @@ var l_ = { class: "flex flex-col flex-1 min-h-0 overflow-y-auto" }, u_ = { class
|
|
|
13779
13768
|
}
|
|
13780
13769
|
return (e, t) => {
|
|
13781
13770
|
let a = Ut, p = Gt, m = Wt;
|
|
13782
|
-
return D(), K("div",
|
|
13783
|
-
V("div",
|
|
13771
|
+
return D(), K("div", u_, [
|
|
13772
|
+
V("div", d_, [q(bp, {
|
|
13784
13773
|
modifiers: "surface ring",
|
|
13785
13774
|
class: "w-64 h-64",
|
|
13786
13775
|
name: o.value?.name ?? L(r),
|
|
13787
13776
|
"img-src": o.value?.image ?? L(i)?.logo
|
|
13788
|
-
}, null, 8, ["name", "img-src"]), V("div",
|
|
13789
|
-
V("div",
|
|
13777
|
+
}, null, 8, ["name", "img-src"]), V("div", f_, [o.value?.name ?? L(r) ? (D(), K("strong", p_, N(o.value?.name ?? L(r)), 1)) : F("", !0), o.value?.email ? (D(), K("span", m_, N(o.value.email), 1)) : F("", !0)])]),
|
|
13778
|
+
V("div", h_, [d.value ? (D(), B(a, {
|
|
13790
13779
|
key: 0,
|
|
13791
13780
|
modifiers: "danger",
|
|
13792
13781
|
content: d.value
|
|
@@ -13797,17 +13786,17 @@ var l_ = { class: "flex flex-col flex-1 min-h-0 overflow-y-auto" }, u_ = { class
|
|
|
13797
13786
|
rel: "noopener noreferrer",
|
|
13798
13787
|
class: "flex items-center gap-12 p-12 rounded-lg border border-surface-3 hover:border-surface-5 hover:bg-surface-1 transition-colors cursor-pointer no-underline"
|
|
13799
13788
|
}, [
|
|
13800
|
-
V("div",
|
|
13789
|
+
V("div", __, [q(p, {
|
|
13801
13790
|
name: "ri:user-settings-line",
|
|
13802
13791
|
class: "w-20 h-20 text-word-2"
|
|
13803
13792
|
})]),
|
|
13804
|
-
V("div",
|
|
13793
|
+
V("div", v_, [V("span", y_, N(L(n)("action.manageProfile")), 1), V("span", b_, N(L(n)("label.manageProfileDescription")), 1)]),
|
|
13805
13794
|
q(p, {
|
|
13806
13795
|
name: "ri:arrow-right-s-line",
|
|
13807
13796
|
class: "w-16 h-16 text-word-4 shrink-0"
|
|
13808
13797
|
})
|
|
13809
|
-
], 8,
|
|
13810
|
-
l.value ? F("", !0) : (D(), K("div",
|
|
13798
|
+
], 8, g_)) : F("", !0)]),
|
|
13799
|
+
l.value ? F("", !0) : (D(), K("div", x_, [q(m, {
|
|
13811
13800
|
modifiers: "secondary-danger",
|
|
13812
13801
|
class: "w-full",
|
|
13813
13802
|
icon: "ri:logout-box-line",
|
|
@@ -13826,13 +13815,13 @@ var l_ = { class: "flex flex-col flex-1 min-h-0 overflow-y-auto" }, u_ = { class
|
|
|
13826
13815
|
}
|
|
13827
13816
|
});
|
|
13828
13817
|
k(), H(), J();
|
|
13829
|
-
var
|
|
13818
|
+
var C_ = { class: "pk-chatbot__header-start" }, w_ = ["title"], T_ = { key: 1 }, E_ = { class: "pk-chatbot__warning-body" }, D_ = { class: "pk-chatbot__warning-header" }, O_ = { class: "pk-chatbot__warning-title" }, k_ = { class: "pk-chatbot__warning-text" }, A_ = {
|
|
13830
13819
|
key: 5,
|
|
13831
13820
|
class: "pk-chatbot__view-auth flex-1 min-h-0 overflow-y-auto"
|
|
13832
|
-
},
|
|
13821
|
+
}, j_ = {
|
|
13833
13822
|
key: 7,
|
|
13834
13823
|
class: "pk-chatbot__footer"
|
|
13835
|
-
},
|
|
13824
|
+
}, M_ = /*#__PURE__*/ Qt(/* @__PURE__ */ w({
|
|
13836
13825
|
__name: "PkChatbot",
|
|
13837
13826
|
props: /*@__PURE__*/ _e({
|
|
13838
13827
|
baseUrl: { type: String },
|
|
@@ -13873,7 +13862,7 @@ var S_ = { class: "pk-chatbot__header-start" }, C_ = ["title"], w_ = { key: 1 },
|
|
|
13873
13862
|
setup(e, { expose: t, emit: n }) {
|
|
13874
13863
|
let r = we(), { t: i } = Ie({ useScope: "global" }), a = e, o = n, s = oe(e, "chatId"), c = dd(a.agentId);
|
|
13875
13864
|
Xt((e) => c.apiClient.resolveShortUrls(e));
|
|
13876
|
-
let { messages: l, chat: u, localChatId: d, activeView: f, chatError: p, isDark: m } = Nn(c), h = de(c, "agentId"), { startNewChat: g, stopGeneration: _, regenerate: v, navigate: y, sendMessage: b } = c, x = ve(
|
|
13865
|
+
let { messages: l, chat: u, localChatId: d, activeView: f, chatError: p, isDark: m } = Nn(c), h = de(c, "agentId"), { startNewChat: g, stopGeneration: _, regenerate: v, navigate: y, sendMessage: b } = c, x = ve(pp, void 0), w = U(() => x?.canManageProfile.value ?? !1), T = U(() => !w.value && (x?.canSignIn?.value ?? !1) && r["view-auth"] !== void 0);
|
|
13877
13866
|
P(w, (e) => {
|
|
13878
13867
|
e && f.value === "auth" && y("chat");
|
|
13879
13868
|
}), ue(() => {
|
|
@@ -13920,7 +13909,7 @@ var S_ = { class: "pk-chatbot__header-start" }, C_ = ["title"], w_ = { key: 1 },
|
|
|
13920
13909
|
key: 0,
|
|
13921
13910
|
class: "pk-chatbot__header",
|
|
13922
13911
|
style: Me(j.value ? { backgroundColor: R.value } : void 0)
|
|
13923
|
-
}, [V("div",
|
|
13912
|
+
}, [V("div", C_, [L(f) === "chat" ? ne.value ? F("", !0) : (D(), B(bp, {
|
|
13924
13913
|
key: 1,
|
|
13925
13914
|
modifiers: "surface ring shrink-0",
|
|
13926
13915
|
class: "pk-chatbot__avatar",
|
|
@@ -13938,7 +13927,7 @@ var S_ = { class: "pk-chatbot__header-start" }, C_ = ["title"], w_ = { key: 1 },
|
|
|
13938
13927
|
class: "pk-chatbot__title",
|
|
13939
13928
|
title: he.value,
|
|
13940
13929
|
style: Me(j.value ? { color: pe.value } : void 0)
|
|
13941
|
-
}, N(he.value), 13,
|
|
13930
|
+
}, N(he.value), 13, w_)]), q(u, {
|
|
13942
13931
|
class: "pk-chatbot__header-end",
|
|
13943
13932
|
modifiers: "compact"
|
|
13944
13933
|
}, {
|
|
@@ -14033,14 +14022,14 @@ var S_ = { class: "pk-chatbot__header-start" }, C_ = ["title"], w_ = { key: 1 },
|
|
|
14033
14022
|
]),
|
|
14034
14023
|
_: 3
|
|
14035
14024
|
})], 4)),
|
|
14036
|
-
A.value ? (D(), K("div",
|
|
14037
|
-
default: S(() => [V("div",
|
|
14025
|
+
A.value ? (D(), K("div", T_, [V("div", E_, [q(p, { modifiers: "callout" }, {
|
|
14026
|
+
default: S(() => [V("div", D_, [q(s, {
|
|
14038
14027
|
name: "ri:alert-line",
|
|
14039
14028
|
class: "pk-chatbot__warning-icon"
|
|
14040
|
-
}), V("strong",
|
|
14029
|
+
}), V("strong", O_, N(L(i)("message.warning")), 1)]), V("p", k_, N(L(i)("message.reasoningAgent")), 1)]),
|
|
14041
14030
|
_: 1
|
|
14042
14031
|
})])])) : F("", !0),
|
|
14043
|
-
L(f) === "chat" ? (D(), B(
|
|
14032
|
+
L(f) === "chat" ? (D(), B(Og, {
|
|
14044
14033
|
key: 2,
|
|
14045
14034
|
"agent-id": e.agentId,
|
|
14046
14035
|
modifier: e.modifier,
|
|
@@ -14054,23 +14043,23 @@ var S_ = { class: "pk-chatbot__header-start" }, C_ = ["title"], w_ = { key: 1 },
|
|
|
14054
14043
|
"agent-id",
|
|
14055
14044
|
"modifier",
|
|
14056
14045
|
"user-name"
|
|
14057
|
-
])) : L(f) === "conversations" ? (D(), B(
|
|
14046
|
+
])) : L(f) === "conversations" ? (D(), B(qg, {
|
|
14058
14047
|
key: 3,
|
|
14059
14048
|
"agent-id": e.agentId
|
|
14060
14049
|
}, Ne({ _: 2 }, [Pe(Object.keys(L(r)), (e) => ({
|
|
14061
14050
|
name: e,
|
|
14062
14051
|
fn: S((n) => [C(t.$slots, e, ee(le(n)))])
|
|
14063
|
-
}))]), 1032, ["agent-id"])) : L(f) === "files" ? (D(), B(
|
|
14052
|
+
}))]), 1032, ["agent-id"])) : L(f) === "files" ? (D(), B(l_, {
|
|
14064
14053
|
key: 4,
|
|
14065
14054
|
"agent-id": e.agentId
|
|
14066
|
-
}, null, 8, ["agent-id"])) : L(f) === "auth" ? (D(), K("div",
|
|
14055
|
+
}, null, 8, ["agent-id"])) : L(f) === "auth" ? (D(), K("div", A_, [C(t.$slots, "view-auth")])) : (D(), B(S_, {
|
|
14067
14056
|
key: 6,
|
|
14068
14057
|
"agent-id": e.agentId
|
|
14069
14058
|
}, Ne({ _: 2 }, [Pe(Object.keys(L(r)), (e) => ({
|
|
14070
14059
|
name: e,
|
|
14071
14060
|
fn: S((n) => [C(t.$slots, e, ee(le(n)))])
|
|
14072
14061
|
}))]), 1032, ["agent-id"])),
|
|
14073
|
-
L(me) ? (D(), K("div",
|
|
14062
|
+
L(me) ? (D(), K("div", j_, [q(ot, {
|
|
14074
14063
|
markdown: L(me),
|
|
14075
14064
|
class: "wysiwyg"
|
|
14076
14065
|
}, null, 8, ["markdown"])])) : F("", !0)
|
|
@@ -14079,16 +14068,16 @@ var S_ = { class: "pk-chatbot__header-start" }, C_ = ["title"], w_ = { key: 1 },
|
|
|
14079
14068
|
}
|
|
14080
14069
|
}), [["styles", [".pk-chatbot{background-color:var(--color-surface);flex-direction:column;height:100%;display:flex;position:relative}.pk-chatbot__header{z-index:1;justify-content:space-between;gap:var(--spacing-14);background-color:var(--color-surface-1);padding:var(--spacing-14);border-bottom:1px solid var(--color-surface-3);display:flex;position:sticky;top:0}.pk-chatbot__header-start{align-items:center;gap:var(--spacing-sm);min-width:0;display:flex}.pk-chatbot__nav-icon{font-size:var(--text-18)}.pk-chatbot__avatar{width:var(--spacing-24);height:var(--spacing-24)}.pk-chatbot__title{font-size:var(--text-16);font-weight:var(--font-semibold);text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.pk-chatbot__header-end{flex-shrink:0}.pk-chatbot__warning-body{padding:var(--spacing-md);border-bottom:1px solid var(--color-surface-3)}.pk-chatbot__warning-header{align-items:center;gap:var(--spacing-4);margin-bottom:var(--spacing-4);display:flex}.pk-chatbot__warning-icon{width:var(--spacing-16);height:var(--spacing-16)}.pk-chatbot__warning-title{font-weight:600;font-size:var(--text-14)}.pk-chatbot__warning-text{font-size:var(--text-12);color:var(--color-word-3)}.pk-chatbot__footer{padding:var(--spacing-md);border-top:1px solid var(--color-surface-3);text-align:center;font-size:var(--text-12);color:var(--color-word-2)}.pk-chatbot--fullscreen{--pk-chat-fullscreen-dock-height:calc(var(--spacing-56) + var(--spacing-4));--pk-chat-dock-radius:calc(var(--pk-chat-fullscreen-dock-height) / 2);background-color:#0000}.pk-chatbot--fullscreen .pk-chatbot__footer{padding:0 var(--spacing-md) var(--spacing-sm) var(--spacing-md);border-top:none}.pk-chatbot--fullscreen .pk-chatbot-messages{scrollbar-gutter:stable both-edges;-webkit-mask-image:linear-gradient(to bottom, transparent 0, #000 var(--spacing-40), #000 calc(100% - var(--spacing-40)), transparent 100%);mask-image:linear-gradient(to bottom, transparent 0, #000 var(--spacing-40), #000 calc(100% - var(--spacing-40)), transparent 100%);padding-block:var(--spacing-48)}.pk-chatbot--fullscreen .pk-chatbot-messages__wrapper{width:100%;max-width:768px;margin-inline:auto}.pk-chatbot--fullscreen .pk-chatbot-messages__outline{display:none}.pk-chatbot--fullscreen.pk-chatbot--wide .pk-chatbot-messages__outline{display:block}.pk-chatbot--fullscreen .pk-chatbot-file-preview{background-color:var(--color-surface)}.pk-chatbot--fullscreen .pk-chatbot-input__notice{background-color:var(--color-surface);border-inline:1px solid var(--color-surface-3);border-top:1px solid var(--color-surface-2);padding:var(--spacing-10) var(--spacing-16)}.pk-chatbot--fullscreen .pk-chatbot-input__notice:after{background-color:var(--color-surface);border-inline:1px solid var(--color-surface-2);bottom:calc(-1 * var(--pk-chat-dock-radius));height:var(--pk-chat-dock-radius);left:-1px;right:-1px}.pk-chatbot--fullscreen .pk-chatbot-input{width:calc(100% - var(--spacing-sm) * 2);max-width:768px;margin-inline:auto}.pk-chatbot--fullscreen .pk-chatbot-input__form{border-radius:var(--pk-chat-dock-radius);min-height:var(--pk-chat-fullscreen-dock-height);padding:var(--spacing-12) var(--spacing-16);background-color:var(--color-surface-1);border-color:var(--color-surface-2);box-shadow:none;transition:border-color var(--duration-200) var(--ease-in-out), box-shadow var(--duration-200) var(--ease-in-out)}.pk-chatbot--fullscreen .pk-chatbot-input__form:has(:focus-within){border-color:var(--color-surface-4);box-shadow:var(--shadow-sm)}@media (prefers-reduced-motion:reduce){.pk-chatbot--fullscreen .pk-chatbot-input__form{transition:none}}.pk-chatbot--fullscreen .pk-chatbot-input__textarea{background-color:#0000}.pk-chatbot--fullscreen .pk-chat-button{position:relative}.pk-chatbot--fullscreen .pk-chat-button:after{content:\"\";inset:calc(-1 * var(--spacing-8));position:absolute}.pk-chatbot--fullscreen .pk-voice-session{--pk-chat-dock-height:var(--pk-chat-fullscreen-dock-height);--pk-voice-orb-size:var(--spacing-40);--pk-voice-orb-bars-height:var(--spacing-20);--pk-voice-session-surface:var(--color-surface-1);width:calc(100% - var(--spacing-sm) * 2);max-width:768px;padding-inline:var(--spacing-16);border-color:var(--color-surface-2);border-radius:var(--pk-chat-dock-radius);box-shadow:none;margin-inline:auto}.pk-chatbot--fullscreen .pk-voice-session__timer{font-size:var(--text-14)}.pk-chatbot--panel{background-color:#0000}.pk-chatbot--panel .pk-chatbot__header{height:var(--pk-chatbot-panel-header-height,50px);padding-block:0;padding-inline:var(--spacing-10);border-bottom:1px solid var(--color-surface-3);background-color:#0000;align-items:center}.pk-chatbot--panel .pk-chatbot__title{font-size:var(--text-14)}.pk-chatbot--panel .pk-chatbot__footer{padding:var(--spacing-6) var(--spacing-md);border-top:none}"]]]);
|
|
14081
14070
|
k(), J(), H(), Te();
|
|
14082
|
-
var
|
|
14071
|
+
var N_ = { class: "pk-chatbot-auth flex flex-col items-center justify-center w-full min-h-full p-lg overflow-y-auto" }, P_ = { class: "pk-chatbot-auth__flip w-full max-w-384 mx-auto my-auto" }, F_ = { class: "pk-chatbot-auth__success-icon w-64 h-64 border border-surface-3 rounded-full bg-surface-0 flex items-center justify-center overflow-hidden bg-surface mx-auto mb-md" }, I_ = { class: "font-bold text-18 mb-xs" }, L_ = { class: "mb-lg text-16 text-word-3" }, R_ = {
|
|
14083
14072
|
key: "form",
|
|
14084
14073
|
class: "pk-chatbot-auth__flip-card flex flex-col"
|
|
14085
|
-
},
|
|
14074
|
+
}, z_ = { class: "flex flex-col" }, B_ = {
|
|
14086
14075
|
key: 0,
|
|
14087
14076
|
class: "flex justify-center mb-md"
|
|
14088
|
-
},
|
|
14077
|
+
}, V_ = ["src", "alt"], H_ = { class: "text-center leading-normal mb-lg" }, U_ = {
|
|
14089
14078
|
key: 0,
|
|
14090
14079
|
class: "font-bold text-20 m-0"
|
|
14091
|
-
},
|
|
14080
|
+
}, W_ = { class: "mb-md" }, G_ = { class: "mb-md" }, K_ = { class: "mb-md" }, q_ = { class: "hr mt-xs" }, J_ = { class: "pt-lg text-center text-word-3" }, Y_ = /*#__PURE__*/ Qt(/* @__PURE__ */ w({
|
|
14092
14081
|
__name: "PkChatbotAuth",
|
|
14093
14082
|
props: /*@__PURE__*/ _e({
|
|
14094
14083
|
branding: {
|
|
@@ -14159,7 +14148,7 @@ var M_ = { class: "pk-chatbot-auth flex flex-col items-center justify-center w-f
|
|
|
14159
14148
|
}
|
|
14160
14149
|
return (t, r) => {
|
|
14161
14150
|
let s = Gt, l = Wt, p = Ut, m = Rt;
|
|
14162
|
-
return D(), K("div",
|
|
14151
|
+
return D(), K("div", N_, [V("div", P_, [q(G, {
|
|
14163
14152
|
name: "pk-flip",
|
|
14164
14153
|
mode: "out-in",
|
|
14165
14154
|
onAfterEnter: te
|
|
@@ -14171,13 +14160,13 @@ var M_ = { class: "pk-chatbot-auth flex flex-col items-center justify-center w-f
|
|
|
14171
14160
|
tabindex: "-1",
|
|
14172
14161
|
class: "pk-chatbot-auth__flip-card outline-none flex flex-col text-center leading-normal"
|
|
14173
14162
|
}, [
|
|
14174
|
-
V("div",
|
|
14163
|
+
V("div", F_, [q(s, {
|
|
14175
14164
|
name: "ri:mail-check-line",
|
|
14176
14165
|
"aria-hidden": "true",
|
|
14177
14166
|
class: "text-success w-32 h-32"
|
|
14178
14167
|
})]),
|
|
14179
|
-
V("h1",
|
|
14180
|
-
V("p",
|
|
14168
|
+
V("h1", I_, N(c.value.title), 1),
|
|
14169
|
+
V("p", L_, N(c.value.message), 1),
|
|
14181
14170
|
q(l, {
|
|
14182
14171
|
type: "button",
|
|
14183
14172
|
modifiers: "link",
|
|
@@ -14185,14 +14174,14 @@ var M_ = { class: "pk-chatbot-auth flex flex-col items-center justify-center w-f
|
|
|
14185
14174
|
label: L(n)("action.backToSignIn"),
|
|
14186
14175
|
onClick: d
|
|
14187
14176
|
}, null, 8, ["label"])
|
|
14188
|
-
], 512)) : (D(), K("div",
|
|
14189
|
-
L(i)(e.branding?.interface.logo) ? (D(), K("div",
|
|
14177
|
+
], 512)) : (D(), K("div", R_, [V("div", z_, [
|
|
14178
|
+
L(i)(e.branding?.interface.logo) ? (D(), K("div", B_, [V("img", {
|
|
14190
14179
|
src: e.branding?.interface.logo,
|
|
14191
14180
|
alt: e.branding?.name,
|
|
14192
14181
|
class: "w-64 h-64 border border-surface-3 rounded-full bg-surface-0 overflow-hidden bg-surface object-contain",
|
|
14193
14182
|
onError: r[0] ||= (t) => L(a)(e.branding?.interface.logo)
|
|
14194
|
-
}, null, 40,
|
|
14195
|
-
V("div",
|
|
14183
|
+
}, null, 40, V_)])) : F("", !0),
|
|
14184
|
+
V("div", H_, [e.branding?.name ? (D(), K("h1", U_, N(e.branding.name), 1)) : F("", !0), (D(), B(re(e.branding?.name ? "h2" : "h1"), { class: "text-word-3 mb-0" }, {
|
|
14196
14185
|
default: S(() => [u.value === "sign-in" ? (D(), K(z, { key: 0 }, [I(N(L(n)("auth.signInTitle")), 1)], 64)) : u.value === "sign-up" ? (D(), K(z, { key: 1 }, [I(N(L(n)("auth.signUpTitle")), 1)], 64)) : u.value === "reset" ? (D(), K(z, { key: 2 }, [I(N(L(n)("auth.resetTitle")), 1)], 64)) : F("", !0)]),
|
|
14197
14186
|
_: 1
|
|
14198
14187
|
}))]),
|
|
@@ -14208,7 +14197,7 @@ var M_ = { class: "pk-chatbot-auth flex flex-col items-center justify-center w-f
|
|
|
14208
14197
|
readonly: e.loading,
|
|
14209
14198
|
onSubmit: ne
|
|
14210
14199
|
}, {
|
|
14211
|
-
default: S(() => [V("div",
|
|
14200
|
+
default: S(() => [V("div", W_, [
|
|
14212
14201
|
q(L(v), {
|
|
14213
14202
|
name: "email",
|
|
14214
14203
|
type: "email",
|
|
@@ -14223,7 +14212,7 @@ var M_ = { class: "pk-chatbot-auth flex flex-col items-center justify-center w-f
|
|
|
14223
14212
|
label: L(n)("label.password"),
|
|
14224
14213
|
floating: ""
|
|
14225
14214
|
}, null, 8, ["label"]),
|
|
14226
|
-
V("div",
|
|
14215
|
+
V("div", G_, [q(l, {
|
|
14227
14216
|
type: "button",
|
|
14228
14217
|
modifiers: "link",
|
|
14229
14218
|
label: L(n)("action.forgetPassword"),
|
|
@@ -14253,7 +14242,7 @@ var M_ = { class: "pk-chatbot-auth flex flex-col items-center justify-center w-f
|
|
|
14253
14242
|
readonly: e.loading,
|
|
14254
14243
|
onSubmit: E
|
|
14255
14244
|
}, {
|
|
14256
|
-
default: S(() => [V("div",
|
|
14245
|
+
default: S(() => [V("div", K_, [
|
|
14257
14246
|
q(L(b), {
|
|
14258
14247
|
name: "name",
|
|
14259
14248
|
type: "text",
|
|
@@ -14322,7 +14311,7 @@ var M_ = { class: "pk-chatbot-auth flex flex-col items-center justify-center w-f
|
|
|
14322
14311
|
})]),
|
|
14323
14312
|
_: 1
|
|
14324
14313
|
}, 8, ["readonly"])) : F("", !0),
|
|
14325
|
-
(u.value === "sign-in" || u.value === "sign-up") && f.value ? (D(), K(z, { key: 5 }, [V("div",
|
|
14314
|
+
(u.value === "sign-in" || u.value === "sign-up") && f.value ? (D(), K(z, { key: 5 }, [V("div", q_, [V("span", null, N(L(n)("label.or")), 1)]), q(m, {
|
|
14326
14315
|
modifiers: "vertical",
|
|
14327
14316
|
class: "gap-xs mt-xs"
|
|
14328
14317
|
}, {
|
|
@@ -14345,7 +14334,7 @@ var M_ = { class: "pk-chatbot-auth flex flex-col items-center justify-center w-f
|
|
|
14345
14334
|
}, null, 8, ["disabled", "label"])) : F("", !0)]),
|
|
14346
14335
|
_: 1
|
|
14347
14336
|
})], 64)) : F("", !0)
|
|
14348
|
-
]), V("div",
|
|
14337
|
+
]), V("div", J_, [u.value === "sign-in" ? (D(), K(z, { key: 0 }, [I(N(L(n)("auth.noAccount")) + " ", 1), q(l, {
|
|
14349
14338
|
type: "button",
|
|
14350
14339
|
modifiers: "link",
|
|
14351
14340
|
class: "font-semibold",
|
|
@@ -14369,20 +14358,20 @@ var M_ = { class: "pk-chatbot-auth flex flex-col items-center justify-center w-f
|
|
|
14369
14358
|
})])]);
|
|
14370
14359
|
};
|
|
14371
14360
|
}
|
|
14372
|
-
}), [["styles", [".pk-chatbot-auth__flip{transform-style:preserve-3d;perspective:1000px;display:grid}.pk-chatbot-auth__flip-card{backface-visibility:hidden;transform-style:preserve-3d;grid-area:1/1}.pk-chatbot-auth__success-icon{animation:.4s ease-out .3s backwards pk-chatbot-auth-check-pop}.pk-flip-enter-active{animation:.6s ease-out pk-chatbot-auth-flip-in}.pk-flip-leave-active{animation:.6s ease-in pk-chatbot-auth-flip-out}@keyframes pk-chatbot-auth-flip-in{0%{opacity:0;transform:rotateY(-180deg)}to{opacity:1;transform:rotateY(0)}}@keyframes pk-chatbot-auth-flip-out{0%{opacity:1;transform:rotateY(0)}to{opacity:0;transform:rotateY(180deg)}}@keyframes pk-chatbot-auth-check-pop{0%{opacity:0;transform:scale(0)}60%{transform:scale(1.15)}to{opacity:1;transform:scale(1)}}"]]]),
|
|
14361
|
+
}), [["styles", [".pk-chatbot-auth__flip{transform-style:preserve-3d;perspective:1000px;display:grid}.pk-chatbot-auth__flip-card{backface-visibility:hidden;transform-style:preserve-3d;grid-area:1/1}.pk-chatbot-auth__success-icon{animation:.4s ease-out .3s backwards pk-chatbot-auth-check-pop}.pk-flip-enter-active{animation:.6s ease-out pk-chatbot-auth-flip-in}.pk-flip-leave-active{animation:.6s ease-in pk-chatbot-auth-flip-out}@keyframes pk-chatbot-auth-flip-in{0%{opacity:0;transform:rotateY(-180deg)}to{opacity:1;transform:rotateY(0)}}@keyframes pk-chatbot-auth-flip-out{0%{opacity:1;transform:rotateY(0)}to{opacity:0;transform:rotateY(180deg)}}@keyframes pk-chatbot-auth-check-pop{0%{opacity:0;transform:scale(0)}60%{transform:scale(1.15)}to{opacity:1;transform:scale(1)}}"]]]), X_ = "@layer volver.reset,volver.preflight,volver.props;@layer volver.components{.pk-loader{width:var(--spacing-48);height:var(--spacing-48);border-radius:50%;animation:1s linear infinite rotate;position:relative}.pk-loader:before{content:\"\";box-sizing:border-box;border:var(--spacing-5) solid var(--color-brand);border-radius:50%;animation:2s linear infinite prix-clip-fix;position:absolute;inset:0}@keyframes rotate{to{rotate:360deg}}@keyframes prix-clip-fix{0%{clip-path:polygon(50% 50%,0 0,0 0,0 0,0 0,0 0)}25%{clip-path:polygon(50% 50%,0 0,100% 0,100% 0,100% 0,100% 0)}50%{clip-path:polygon(50% 50%,0 0,100% 0,100% 100%,100% 100%,100% 100%)}75%{clip-path:polygon(50% 50%,0 0,100% 0,100% 100%,0 100%,0 100%)}to{clip-path:polygon(50% 50%,0 0,100% 0,100% 100%,0 100%,0 0)}}}@layer volver.themes,volver.utilities;";
|
|
14373
14362
|
//#endregion
|
|
14374
14363
|
//#region ../../packages/components/src/PkLoader.vue
|
|
14375
14364
|
k();
|
|
14376
|
-
var
|
|
14377
|
-
function
|
|
14365
|
+
var Z_ = {};
|
|
14366
|
+
function Q_(e, t) {
|
|
14378
14367
|
return D(), K("div", null, [...t[0] ||= [V("div", {
|
|
14379
14368
|
"aria-hidden": "true",
|
|
14380
14369
|
class: "pk-loader"
|
|
14381
14370
|
}, null, -1)]]);
|
|
14382
14371
|
}
|
|
14383
|
-
var
|
|
14372
|
+
var $_ = /*#__PURE__*/ Qt(Z_, [["render", Q_], ["styles", [X_]]]);
|
|
14384
14373
|
k(), J(), Te(), H();
|
|
14385
|
-
var
|
|
14374
|
+
var ev = { class: "welcome-popup__text" }, tv = ["aria-label"], nv = 100, rv = /*#__PURE__*/ Qt(/* @__PURE__ */ w({
|
|
14386
14375
|
__name: "PkWelcomePopup",
|
|
14387
14376
|
props: {
|
|
14388
14377
|
agentId: { type: String },
|
|
@@ -14403,7 +14392,7 @@ var $_ = { class: "welcome-popup__text" }, ev = ["aria-label"], tv = 100, nv = /
|
|
|
14403
14392
|
c.value = [], s.value = !1;
|
|
14404
14393
|
let t = e.split(/(\s+)/), n = 0;
|
|
14405
14394
|
function r() {
|
|
14406
|
-
n < t.length ? (c.value.push(t[n]), n++, l = setTimeout(r,
|
|
14395
|
+
n < t.length ? (c.value.push(t[n]), n++, l = setTimeout(r, nv)) : s.value = !0;
|
|
14407
14396
|
}
|
|
14408
14397
|
r();
|
|
14409
14398
|
}
|
|
@@ -14427,7 +14416,7 @@ var $_ = { class: "welcome-popup__text" }, ev = ["aria-label"], tv = 100, nv = /
|
|
|
14427
14416
|
key: 0,
|
|
14428
14417
|
class: "welcome-popup",
|
|
14429
14418
|
onClick: Oe(m, ["stop"])
|
|
14430
|
-
}, [V("p",
|
|
14419
|
+
}, [V("p", ev, [(D(!0), K(z, null, Pe(c.value, (e, t) => (D(), K("span", {
|
|
14431
14420
|
key: t,
|
|
14432
14421
|
class: "welcome-popup__word"
|
|
14433
14422
|
}, N(e), 1))), 128))]), q(G, null, {
|
|
@@ -14443,7 +14432,7 @@ var $_ = { class: "welcome-popup__text" }, ev = ["aria-label"], tv = 100, nv = /
|
|
|
14443
14432
|
width: "14",
|
|
14444
14433
|
height: "14",
|
|
14445
14434
|
fill: "currentColor"
|
|
14446
|
-
}, [V("path", { d: "M12.0007 10.5865L16.9504 5.63672L18.3646 7.05093L13.4149 12.0007L18.3646 16.9504L16.9504 18.3646L12.0007 13.4149L7.05093 18.3646L5.63672 16.9504L10.5865 12.0007L5.63672 7.05093L7.05093 5.63672L12.0007 10.5865Z" })], -1)]], 8,
|
|
14435
|
+
}, [V("path", { d: "M12.0007 10.5865L16.9504 5.63672L18.3646 7.05093L13.4149 12.0007L18.3646 16.9504L16.9504 18.3646L12.0007 13.4149L7.05093 18.3646L5.63672 16.9504L10.5865 12.0007L5.63672 7.05093L7.05093 5.63672L12.0007 10.5865Z" })], -1)]], 8, tv)) : F("", !0)]),
|
|
14447
14436
|
_: 1
|
|
14448
14437
|
})])) : F("", !0)]),
|
|
14449
14438
|
_: 1
|
|
@@ -14451,10 +14440,10 @@ var $_ = { class: "welcome-popup__text" }, ev = ["aria-label"], tv = 100, nv = /
|
|
|
14451
14440
|
}
|
|
14452
14441
|
}), [["styles", [".welcome-popup{background:var(--color-surface);pointer-events:auto;max-width:300px;color:var(--color-word-2);line-height:var(--leading-normal);border-width:var(--spacing-px);border-color:var(--color-surface-3);padding:var(--spacing-sm);border-radius:var(--rounded-xl);font-size:var(--text-14);cursor:pointer;box-shadow:0 4px 16px #00000014,0 1px 4px #0000000f}.welcome-popup__word{animation:.3s ease-out both welcome-popup-word-in;display:inline}.welcome-popup__close{background-color:var(--color-surface);border:1px solid var(--color-surface-3);border-radius:var(--rounded-full);width:var(--spacing-20);height:var(--spacing-20);top:calc(-1 * var(--spacing-8));right:calc(-1 * var(--spacing-8));padding:var(--spacing-2);cursor:pointer;color:var(--color-word-4);border-radius:var(--rounded-full);transition:var(--transition-colors);box-shadow:var(--shadow-md);justify-content:center;align-items:center;line-height:1;display:flex;position:absolute}.welcome-popup__close:hover{color:var(--color-word)}.welcome-popup-enter-active,.welcome-popup-leave-active{transition:transform var(--duration-300) var(--ease-out), opacity var(--duration-300) var(--ease-out)}.welcome-popup-enter-from{opacity:0;transform:translateY(var(--spacing-32))}.welcome-popup-leave-to{opacity:0}@keyframes welcome-popup-word-in{0%{opacity:0;transform:translateY(4px)}to{opacity:1;transform:translateY(0)}}"]]]);
|
|
14453
14442
|
k(), H(), J(), Te();
|
|
14454
|
-
var
|
|
14443
|
+
var iv = {
|
|
14455
14444
|
key: 0,
|
|
14456
14445
|
class: "floating-chat-widget__launcher"
|
|
14457
|
-
},
|
|
14446
|
+
}, av = {
|
|
14458
14447
|
key: 0,
|
|
14459
14448
|
class: "w-full h-full",
|
|
14460
14449
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -14462,7 +14451,7 @@ var rv = {
|
|
|
14462
14451
|
width: "24",
|
|
14463
14452
|
height: "24",
|
|
14464
14453
|
fill: "currentColor"
|
|
14465
|
-
},
|
|
14454
|
+
}, ov = {
|
|
14466
14455
|
key: 1,
|
|
14467
14456
|
class: "w-full h-full",
|
|
14468
14457
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -14470,20 +14459,20 @@ var rv = {
|
|
|
14470
14459
|
width: "24",
|
|
14471
14460
|
height: "24",
|
|
14472
14461
|
fill: "currentColor"
|
|
14473
|
-
},
|
|
14462
|
+
}, sv = {
|
|
14474
14463
|
key: 0,
|
|
14475
14464
|
class: "floating-chat-widget__chat floating-chat-widget__auth"
|
|
14476
|
-
},
|
|
14465
|
+
}, cv = {
|
|
14477
14466
|
key: 0,
|
|
14478
14467
|
class: "floating-chat-widget__chat floating-chat-widget__loading"
|
|
14479
|
-
},
|
|
14468
|
+
}, lv = /*#__PURE__*/ Qt(/* @__PURE__ */ w({
|
|
14480
14469
|
inheritAttrs: !1,
|
|
14481
14470
|
__name: "FloatingChatWidget.ce",
|
|
14482
14471
|
props: {
|
|
14483
14472
|
agentId: { type: String },
|
|
14484
14473
|
organizationSlug: { type: String },
|
|
14485
14474
|
baseUrl: {
|
|
14486
|
-
default:
|
|
14475
|
+
default: ap,
|
|
14487
14476
|
type: String
|
|
14488
14477
|
},
|
|
14489
14478
|
externalToken: {
|
|
@@ -14520,7 +14509,7 @@ var rv = {
|
|
|
14520
14509
|
}
|
|
14521
14510
|
},
|
|
14522
14511
|
setup(e, { expose: t }) {
|
|
14523
|
-
|
|
14512
|
+
vp();
|
|
14524
14513
|
let n = e;
|
|
14525
14514
|
Fr(n.appinsightsConnectionString), Ir({
|
|
14526
14515
|
organizationSlug: n.organizationSlug,
|
|
@@ -14528,7 +14517,7 @@ var rv = {
|
|
|
14528
14517
|
});
|
|
14529
14518
|
let { PkGlobalDialog: r } = bd(), { emit: i } = Ad(), a = W(), o = W(), s = Jt(U(() => `${n.agentId}-is-open`), !1), c = () => {
|
|
14530
14519
|
s.value = !s.value, Lr(s.value ? "widget_opened" : "widget_closed"), i(s.value ? "opened" : "closed"), s.value || a.value?.stopGeneration();
|
|
14531
|
-
}, { session: l, onError: u, headers: d, token: f, userId: p, isExternalAuth: m, signInWithEmail: h, signUpWithEmail: g, requestPasswordReset: _, signInWithSocialPopup: v, signInWithExternalToken: y, signOut: b } =
|
|
14520
|
+
}, { session: l, onError: u, headers: d, token: f, userId: p, isExternalAuth: m, signInWithEmail: h, signUpWithEmail: g, requestPasswordReset: _, signInWithSocialPopup: v, signInWithExternalToken: y, signOut: b } = dp({
|
|
14532
14521
|
baseUrl: n.baseUrl,
|
|
14533
14522
|
externalToken: () => n.externalToken,
|
|
14534
14523
|
awaitExternalToken: !!n.awaitExternalToken && n.awaitExternalToken !== "false",
|
|
@@ -14541,7 +14530,7 @@ var rv = {
|
|
|
14541
14530
|
});
|
|
14542
14531
|
P(p, (e) => {
|
|
14543
14532
|
e && Ir({ userId: e });
|
|
14544
|
-
}),
|
|
14533
|
+
}), fp({
|
|
14545
14534
|
agentId: n.agentId,
|
|
14546
14535
|
baseUrl: n.baseUrl,
|
|
14547
14536
|
headers: d,
|
|
@@ -14556,13 +14545,13 @@ var rv = {
|
|
|
14556
14545
|
status: e.status
|
|
14557
14546
|
}), u(e);
|
|
14558
14547
|
}
|
|
14559
|
-
let { agent: C, branding: w, authMethods: ee, requiresAuth: T, notFound: te, isLoading: ne, contrastColor: E, themeClass: ie, themeStyle: ae, reload: oe } =
|
|
14548
|
+
let { agent: C, branding: w, authMethods: ee, requiresAuth: T, notFound: te, isLoading: ne, contrastColor: E, themeClass: ie, themeStyle: ae, reload: oe } = gp({
|
|
14560
14549
|
baseUrl: n.baseUrl,
|
|
14561
14550
|
organizationSlug: () => n.organizationSlug,
|
|
14562
14551
|
agentId: () => n.agentId,
|
|
14563
14552
|
headers: d,
|
|
14564
14553
|
systemTheme: () => n.systemTheme
|
|
14565
|
-
}), { authBranding: O } =
|
|
14554
|
+
}), { authBranding: O } = hp({
|
|
14566
14555
|
agent: C,
|
|
14567
14556
|
branding: w,
|
|
14568
14557
|
authMethods: ee,
|
|
@@ -14580,7 +14569,7 @@ var rv = {
|
|
|
14580
14569
|
n.customCss
|
|
14581
14570
|
].filter(Boolean);
|
|
14582
14571
|
return e.length ? e.join("\n") : void 0;
|
|
14583
|
-
}), { authError: A, authSuccess: j, authLoading: M, handleSignIn: le, handleSignUp: ue, handleReset: de, handleSocial: fe } =
|
|
14572
|
+
}), { authError: A, authSuccess: j, authLoading: M, handleSignIn: le, handleSignUp: ue, handleReset: de, handleSocial: fe } = _p({
|
|
14584
14573
|
signInWithEmail: h,
|
|
14585
14574
|
signUpWithEmail: g,
|
|
14586
14575
|
requestPasswordReset: _,
|
|
@@ -14623,7 +14612,7 @@ var rv = {
|
|
|
14623
14612
|
_: 1
|
|
14624
14613
|
})) : F("", !0),
|
|
14625
14614
|
q(G, { name: "slide-bottom" }, {
|
|
14626
|
-
default: S(() => [(L(C) || L(w)) && !L(te) ? (D(), K("div",
|
|
14615
|
+
default: S(() => [(L(C) || L(w)) && !L(te) ? (D(), K("div", iv, [q(rv, {
|
|
14627
14616
|
"agent-id": e.agentId,
|
|
14628
14617
|
message: L(C)?.interface.initialMessage,
|
|
14629
14618
|
enabled: !L(s) && L(C)?.interface?.welcomePopup,
|
|
@@ -14637,11 +14626,11 @@ var rv = {
|
|
|
14637
14626
|
"aria-label": "chat-button",
|
|
14638
14627
|
class: "floating-chat-widget__button",
|
|
14639
14628
|
onClick: Oe(c, ["stop"])
|
|
14640
|
-
}, [L(s) ? (D(), K("svg",
|
|
14629
|
+
}, [L(s) ? (D(), K("svg", av, [...n[4] ||= [V("path", { d: "M11.9999 13.1714L16.9497 8.22168L18.3639 9.63589L11.9999 15.9999L5.63599 9.63589L7.0502 8.22168L11.9999 13.1714Z" }, null, -1)]])) : (D(), K("svg", ov, [...n[5] ||= [V("path", { d: "M12 1.99996C12.8632 1.99996 13.701 2.10973 14.5 2.31539L14 4.25192C13.3608 4.0874 12.6906 3.99997 12 3.99997C7.58174 3.99997 4.00002 7.58172 4 12C4 13.3344 4.3255 14.6174 4.93945 15.7656L5.28906 16.4189L4.63379 19.3662L7.58105 18.7109L8.23438 19.0605C9.38255 19.6745 10.6656 20 12 20C16.4183 20 20 16.4183 20 12C20 11.6771 19.9805 11.3587 19.9434 11.0459L21.9297 10.8095C21.976 11.1999 22 11.5972 22 12C22 17.5228 17.5228 22 12 22C10.2975 22 8.69425 21.5746 7.29102 20.8242L2 22L3.17578 16.709C2.42541 15.3057 2 13.7025 2 12C2.00002 6.47714 6.47717 1.99996 12 1.99996ZM19.5293 1.3193C19.7058 0.893513 20.2942 0.8935 20.4707 1.3193L20.7236 1.93063C21.1555 2.97343 21.9615 3.80614 22.9746 4.2568L23.6914 4.57614C24.1022 4.75882 24.1022 5.35635 23.6914 5.53903L22.9326 5.87692C21.945 6.3162 21.1534 7.11943 20.7139 8.1279L20.4668 8.69333C20.2863 9.10747 19.7136 9.10747 19.5332 8.69333L19.2861 8.1279C18.8466 7.11942 18.0551 6.3162 17.0674 5.87692L16.3076 5.53903C15.8974 5.35618 15.8974 4.75895 16.3076 4.57614L17.0254 4.2568C18.0384 3.80614 18.8445 2.97343 19.2764 1.93063L19.5293 1.3193Z" }, null, -1)]]))])])) : F("", !0)]),
|
|
14641
14630
|
_: 1
|
|
14642
14631
|
}),
|
|
14643
14632
|
q(G, null, {
|
|
14644
|
-
default: S(() => [L(s) && (L(T) || L(ne)) && !(L(C) && L(l).data) ? (D(), K("div",
|
|
14633
|
+
default: S(() => [L(s) && (L(T) || L(ne)) && !(L(C) && L(l).data) ? (D(), K("div", sv, [L(T) ? (D(), B(Y_, {
|
|
14645
14634
|
key: 0,
|
|
14646
14635
|
"error-message": L(A),
|
|
14647
14636
|
"onUpdate:errorMessage": n[0] ||= (e) => R(A) ? A.value = e : null,
|
|
@@ -14666,15 +14655,15 @@ var rv = {
|
|
|
14666
14655
|
"onSignUp",
|
|
14667
14656
|
"onRequestReset",
|
|
14668
14657
|
"onSocial"
|
|
14669
|
-
])) : (D(), B(
|
|
14658
|
+
])) : (D(), B($_, { key: 1 }))])) : F("", !0)]),
|
|
14670
14659
|
_: 1
|
|
14671
14660
|
}),
|
|
14672
14661
|
q(G, null, {
|
|
14673
|
-
default: S(() => [L(s) && !L(T) && !L(C) && !L(ne) ? (D(), K("div",
|
|
14662
|
+
default: S(() => [L(s) && !L(T) && !L(C) && !L(ne) ? (D(), K("div", cv, [q($_)])) : F("", !0)]),
|
|
14674
14663
|
_: 1
|
|
14675
14664
|
}),
|
|
14676
14665
|
q(G, null, {
|
|
14677
|
-
default: S(() => [L(C) && L(s) && L(l).data ? (D(), B(
|
|
14666
|
+
default: S(() => [L(C) && L(s) && L(l).data ? (D(), B(M_, {
|
|
14678
14667
|
key: e.agentId,
|
|
14679
14668
|
ref_key: "chatbotEl",
|
|
14680
14669
|
ref: a,
|
|
@@ -14703,7 +14692,7 @@ var rv = {
|
|
|
14703
14692
|
title: t.$t("action.close"),
|
|
14704
14693
|
onClick: Oe(c, ["stop"])
|
|
14705
14694
|
}, null, 8, ["modifiers", "title"])]),
|
|
14706
|
-
"view-auth": S(() => [q(
|
|
14695
|
+
"view-auth": S(() => [q(Y_, {
|
|
14707
14696
|
"error-message": L(A),
|
|
14708
14697
|
"onUpdate:errorMessage": n[2] ||= (e) => R(A) ? A.value = e : null,
|
|
14709
14698
|
success: L(j),
|
|
@@ -14747,23 +14736,23 @@ var rv = {
|
|
|
14747
14736
|
}
|
|
14748
14737
|
}), [["styles", [".floating-chat-widget{display:contents}.floating-chat-widget__launcher{bottom:var(--spacing-16);right:var(--spacing-16);align-items:flex-end;gap:var(--spacing-14);z-index:99999997;background:0 0;flex-direction:column;width:fit-content;display:flex;position:fixed}.floating-chat-widget__button{padding:var(--spacing-10);width:var(--spacing-48);height:var(--spacing-48);border-radius:var(--rounded-full);background-color:var(--chatbot-main-color,var(--color-black,#000));color:var(--chatbot-contrast-color,var(--color-white,#fff));cursor:pointer;pointer-events:auto;border:0;flex-shrink:0;justify-content:center;align-items:center;transition:all .2s ease-in-out;display:block;transform:scale(1);box-shadow:0 4px 8px #0003}.floating-chat-widget__button:hover{transform:scale(1.1)}.floating-chat-widget__chat{z-index:2147483647;height:auto;position:fixed;inset:0;overflow:hidden}@media (width>=576px){.floating-chat-widget__chat{border-radius:var(--rounded-xxl);-webkit-backdrop-filter:blur(4px);backdrop-filter:blur(4px);width:406px;height:85dvh;inset:auto 16px 78px auto;box-shadow:0 260px 73px #0000,0 166px 67px #00000003,0 94px 56px #00000005,0 42px 42px #00000008,0 10px 23px #0000000a}}.floating-chat-widget__loading,.floating-chat-widget__auth{background-color:var(--color-surface,#fff);justify-content:center;align-items:center;display:flex}.floating-chat-widget--position-left .floating-chat-widget__launcher{right:unset;left:var(--spacing-16);align-items:flex-start}@media (width>=576px){.floating-chat-widget--position-left .floating-chat-widget__chat{right:unset;left:16px}}"]]]);
|
|
14749
14738
|
k(), H(), J(), Te();
|
|
14750
|
-
var
|
|
14739
|
+
var uv = {
|
|
14751
14740
|
key: 1,
|
|
14752
14741
|
class: "embedded-chat-widget embedded-chat-widget--not-found"
|
|
14753
|
-
},
|
|
14742
|
+
}, dv = {
|
|
14754
14743
|
key: 0,
|
|
14755
14744
|
class: "embedded-chat-widget embedded-chat-widget--auth"
|
|
14756
|
-
},
|
|
14745
|
+
}, fv = {
|
|
14757
14746
|
key: 0,
|
|
14758
14747
|
class: "embedded-chat-widget embedded-chat-widget--loading"
|
|
14759
|
-
},
|
|
14748
|
+
}, pv = /*#__PURE__*/ Qt(/* @__PURE__ */ w({
|
|
14760
14749
|
inheritAttrs: !1,
|
|
14761
14750
|
__name: "EmbeddedChatWidget.ce",
|
|
14762
14751
|
props: {
|
|
14763
14752
|
agentId: { type: String },
|
|
14764
14753
|
organizationSlug: { type: String },
|
|
14765
14754
|
baseUrl: {
|
|
14766
|
-
default:
|
|
14755
|
+
default: ap,
|
|
14767
14756
|
type: String
|
|
14768
14757
|
},
|
|
14769
14758
|
externalToken: {
|
|
@@ -14804,13 +14793,13 @@ var lv = {
|
|
|
14804
14793
|
}
|
|
14805
14794
|
},
|
|
14806
14795
|
setup(e, { expose: t }) {
|
|
14807
|
-
|
|
14796
|
+
vp();
|
|
14808
14797
|
let n = e, { PkGlobalDialog: r } = bd(), { emit: i } = Ad(), a = W(), o = W();
|
|
14809
14798
|
Fr(n.appinsightsConnectionString), Ir({
|
|
14810
14799
|
organizationSlug: n.organizationSlug,
|
|
14811
14800
|
agentId: n.agentId
|
|
14812
14801
|
});
|
|
14813
|
-
let { session: s, onError: c, headers: l, token: u, userId: d, isExternalAuth: f, signInWithEmail: p, signUpWithEmail: m, requestPasswordReset: h, signInWithSocialPopup: g, signInWithExternalToken: _, signOut: v } =
|
|
14802
|
+
let { session: s, onError: c, headers: l, token: u, userId: d, isExternalAuth: f, signInWithEmail: p, signUpWithEmail: m, requestPasswordReset: h, signInWithSocialPopup: g, signInWithExternalToken: _, signOut: v } = dp({
|
|
14814
14803
|
baseUrl: n.baseUrl,
|
|
14815
14804
|
externalToken: () => n.externalToken,
|
|
14816
14805
|
awaitExternalToken: !!n.awaitExternalToken && n.awaitExternalToken !== "false",
|
|
@@ -14822,7 +14811,7 @@ var lv = {
|
|
|
14822
14811
|
});
|
|
14823
14812
|
P(d, (e) => {
|
|
14824
14813
|
e && Ir({ userId: e });
|
|
14825
|
-
}),
|
|
14814
|
+
}), fp({
|
|
14826
14815
|
agentId: n.agentId,
|
|
14827
14816
|
baseUrl: n.baseUrl,
|
|
14828
14817
|
headers: l,
|
|
@@ -14837,13 +14826,13 @@ var lv = {
|
|
|
14837
14826
|
status: e.status
|
|
14838
14827
|
}), c(e);
|
|
14839
14828
|
}
|
|
14840
|
-
let { t: b } = Ie({ useScope: "global" }), { agent: x, branding: w, authMethods: ee, requiresAuth: T, notFound: te, isLoading: ne, reload: E, themeClass: ie, themeStyle: ae } =
|
|
14829
|
+
let { t: b } = Ie({ useScope: "global" }), { agent: x, branding: w, authMethods: ee, requiresAuth: T, notFound: te, isLoading: ne, reload: E, themeClass: ie, themeStyle: ae } = gp({
|
|
14841
14830
|
baseUrl: n.baseUrl,
|
|
14842
14831
|
organizationSlug: () => n.organizationSlug,
|
|
14843
14832
|
agentId: () => n.agentId,
|
|
14844
14833
|
headers: l,
|
|
14845
14834
|
systemTheme: () => n.systemTheme
|
|
14846
|
-
}), { authBranding: oe } =
|
|
14835
|
+
}), { authBranding: oe } = hp({
|
|
14847
14836
|
agent: x,
|
|
14848
14837
|
branding: w,
|
|
14849
14838
|
authMethods: ee,
|
|
@@ -14854,7 +14843,7 @@ var lv = {
|
|
|
14854
14843
|
baseUrl: n.baseUrl,
|
|
14855
14844
|
headers: l,
|
|
14856
14845
|
cookieName: n.cookieName
|
|
14857
|
-
}), { authError: O, authSuccess: se, authLoading: k, handleSignIn: A, handleSignUp: j, handleReset: M, handleSocial: le } =
|
|
14846
|
+
}), { authError: O, authSuccess: se, authLoading: k, handleSignIn: A, handleSignUp: j, handleReset: M, handleSocial: le } = _p({
|
|
14858
14847
|
signInWithEmail: p,
|
|
14859
14848
|
signUpWithEmail: m,
|
|
14860
14849
|
requestPasswordReset: h,
|
|
@@ -14889,12 +14878,12 @@ var lv = {
|
|
|
14889
14878
|
default: S(() => [I(N(fe.value), 1)]),
|
|
14890
14879
|
_: 1
|
|
14891
14880
|
})) : F("", !0),
|
|
14892
|
-
L(te) ? (D(), K("div",
|
|
14881
|
+
L(te) ? (D(), K("div", uv, [V("p", null, N(L(b)("message.agentNotFound")), 1)])) : F("", !0),
|
|
14893
14882
|
q(G, {
|
|
14894
14883
|
name: "fade",
|
|
14895
14884
|
appear: ""
|
|
14896
14885
|
}, {
|
|
14897
|
-
default: S(() => [(L(x) || L(w)) && !L(te) && L(T) && (!L(s).data?.user?.id || L(s).data?.user?.isAnonymous) ? (D(), K("div",
|
|
14886
|
+
default: S(() => [(L(x) || L(w)) && !L(te) && L(T) && (!L(s).data?.user?.id || L(s).data?.user?.isAnonymous) ? (D(), K("div", dv, [L(ee) ? (D(), B(Y_, {
|
|
14898
14887
|
key: 0,
|
|
14899
14888
|
"error-message": L(O),
|
|
14900
14889
|
"onUpdate:errorMessage": n[0] ||= (e) => R(O) ? O.value = e : null,
|
|
@@ -14917,17 +14906,17 @@ var lv = {
|
|
|
14917
14906
|
"onSignUp",
|
|
14918
14907
|
"onRequestReset",
|
|
14919
14908
|
"onSocial"
|
|
14920
|
-
])) : (D(), B(
|
|
14909
|
+
])) : (D(), B($_, { key: 1 }))])) : F("", !0)]),
|
|
14921
14910
|
_: 1
|
|
14922
14911
|
}),
|
|
14923
14912
|
q(G, {
|
|
14924
14913
|
name: "fade",
|
|
14925
14914
|
appear: ""
|
|
14926
14915
|
}, {
|
|
14927
|
-
default: S(() => [L(ne) && !L(te) ? (D(), K("div",
|
|
14916
|
+
default: S(() => [L(ne) && !L(te) ? (D(), K("div", fv, [q($_)])) : F("", !0)]),
|
|
14928
14917
|
_: 1
|
|
14929
14918
|
}),
|
|
14930
|
-
L(x) && L(s).data && !L(te) ? (D(), B(
|
|
14919
|
+
L(x) && L(s).data && !L(te) ? (D(), B(M_, {
|
|
14931
14920
|
key: 2,
|
|
14932
14921
|
ref_key: "chatbotEl",
|
|
14933
14922
|
ref: a,
|
|
@@ -14954,7 +14943,7 @@ var lv = {
|
|
|
14954
14943
|
}, Ne({
|
|
14955
14944
|
"header-actions": S(() => [C(t.$slots, "header-actions")]),
|
|
14956
14945
|
actions: S(() => [C(t.$slots, "actions")]),
|
|
14957
|
-
"view-auth": S(() => [q(
|
|
14946
|
+
"view-auth": S(() => [q(Y_, {
|
|
14958
14947
|
"error-message": L(O),
|
|
14959
14948
|
"onUpdate:errorMessage": n[2] ||= (e) => R(O) ? O.value = e : null,
|
|
14960
14949
|
success: L(se),
|
|
@@ -15002,7 +14991,7 @@ var lv = {
|
|
|
15002
14991
|
//#endregion
|
|
15003
14992
|
//#region src/lib.ts
|
|
15004
14993
|
Te();
|
|
15005
|
-
function
|
|
14994
|
+
function mv(e) {
|
|
15006
14995
|
let { t } = Bn.global;
|
|
15007
14996
|
e.use(vn()), e.use(Bn), e.provide(Le, Bn), e.use(ir, {
|
|
15008
14997
|
iconsCollections: [ar, or],
|
|
@@ -15023,16 +15012,16 @@ function pv(e) {
|
|
|
15023
15012
|
Rr(e instanceof Error ? e : Error(String(e)), { vueInfo: n });
|
|
15024
15013
|
};
|
|
15025
15014
|
}
|
|
15026
|
-
function
|
|
15015
|
+
function hv(e) {
|
|
15027
15016
|
let { styles: t } = e;
|
|
15028
15017
|
return {
|
|
15029
|
-
configureApp:
|
|
15018
|
+
configureApp: mv,
|
|
15030
15019
|
styles: [zr, ...t ?? []]
|
|
15031
15020
|
};
|
|
15032
15021
|
}
|
|
15033
|
-
var
|
|
15034
|
-
customElements.define("floating-chat-widget",
|
|
15022
|
+
var gv = xe(lv, hv(lv)), _v = xe(pv, hv(pv));
|
|
15023
|
+
customElements.define("floating-chat-widget", gv), customElements.define("embedded-chat-widget", _v);
|
|
15035
15024
|
//#endregion
|
|
15036
|
-
export {
|
|
15025
|
+
export { _v as EmbeddedChatWidgetCe, gv as FloatingChatWidgetCe };
|
|
15037
15026
|
|
|
15038
15027
|
//# sourceMappingURL=ai-elements.es.js.map
|