@8wave/ai-elements 0.126.0-beta.5 → 0.126.0-beta.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/ai-elements.es.js +376 -359
- package/dist/ai-elements.es.js.map +1 -1
- package/dist-vue/apps/web-component/src/composables/useChatbotAuth.d.ts +18 -1
- package/dist-vue/apps/web-component/src/utils/cookie.d.ts +3 -3
- package/dist-vue/composables.js +108 -91
- package/dist-vue/composables.js.map +1 -1
- package/dist-vue/packages/auth/src/anonymous-reauth-plugin.d.ts +8 -6
- package/package.json +1 -1
package/dist/ai-elements.es.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
(function(){try{var __b=new URL(".",import.meta.url).href;if(typeof document<`u`){var e=document.createElement(`style`);e.appendChild(document.createTextNode(`@font-face{font-family:'Open Sans';font-style:italic;font-weight:300 800;font-stretch:100%;font-display:swap;src:url("+__b+"assets/memtYaGs126MiZpBA-UFUIcVXSCEkx2cmqvXlWqWtE6F15M.woff2) format('woff2');unicode-range:U+0460-052F,U+1C80-1C8A,U+20B4,U+2DE0-2DFF,U+A640-A69F,U+FE2E-FE2F}@font-face{font-family:'Open Sans';font-style:italic;font-weight:300 800;font-stretch:100%;font-display:swap;src:url("+__b+"assets/memtYaGs126MiZpBA-UFUIcVXSCEkx2cmqvXlWqWvU6F15M.woff2) format('woff2');unicode-range:U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116}@font-face{font-family:'Open Sans';font-style:italic;font-weight:300 800;font-stretch:100%;font-display:swap;src:url("+__b+"assets/memtYaGs126MiZpBA-UFUIcVXSCEkx2cmqvXlWqWtU6F15M.woff2) format('woff2');unicode-range:U+1F00-1FFF}@font-face{font-family:'Open Sans';font-style:italic;font-weight:300 800;font-stretch:100%;font-display:swap;src:url("+__b+"assets/memtYaGs126MiZpBA-UFUIcVXSCEkx2cmqvXlWqWuk6F15M.woff2) format('woff2');unicode-range:U+0370-0377,U+037A-037F,U+0384-038A,U+038C,U+038E-03A1,U+03A3-03FF}@font-face{font-family:'Open Sans';font-style:italic;font-weight:300 800;font-stretch:100%;font-display:swap;src:url("+__b+"assets/memtYaGs126MiZpBA-UFUIcVXSCEkx2cmqvXlWqWu06F15M.woff2) format('woff2');unicode-range:U+0307-0308,U+0590-05FF,U+200C-2010,U+20AA,U+25CC,U+FB1D-FB4F}@font-face{font-family:'Open Sans';font-style:italic;font-weight:300 800;font-stretch:100%;font-display:swap;src:url("+__b+"assets/memtYaGs126MiZpBA-UFUIcVXSCEkx2cmqvXlWqWxU6F15M.woff2) format('woff2');unicode-range:U+0302-0303,U+0305,U+0307-0308,U+0310,U+0312,U+0315,U+031A,U+0326-0327,U+032C,U+032F-0330,U+0332-0333,U+0338,U+033A,U+0346,U+034D,U+0391-03A1,U+03A3-03A9,U+03B1-03C9,U+03D1,U+03D5-03D6,U+03F0-03F1,U+03F4-03F5,U+2016-2017,U+2034-2038,U+203C,U+2040,U+2043,U+2047,U+2050,U+2057,U+205F,U+2070-2071,U+2074-209F,U+20D0-20DC,U+20E1,U+20E5-20EF,U+2100-2112,U+2114-2115,U+2117-2121,U+2123-214F,U+2190,U+2192,U+2194-21AE,U+21B0-21E5,U+21F1-21F2,U+21F4-2211,U+2213-2214,U+2216-22FF,U+2308-230B,U+2310,U+2319,U+231C-2321,U+2336-237A,U+237C,U+2395,U+239B-23B7,U+23D0,U+23DC-23E1,U+2474-2475,U+25AF,U+25B3,U+25B7,U+25BD,U+25C1,U+25CA,U+25CC,U+25FB,U+266D-266F,U+27C0-27FF,U+2900-2AFF,U+2B0E-2B11,U+2B30-2B4C,U+2BFE,U+3030,U+FF5B,U+FF5D,U+1D400-1D7FF,U+1EE00-1EEFF}@font-face{font-family:'Open Sans';font-style:italic;font-weight:300 800;font-stretch:100%;font-display:swap;src:url("+__b+"assets/memtYaGs126MiZpBA-UFUIcVXSCEkx2cmqvXlWqW106F15M.woff2) format('woff2');unicode-range:U+0001-000C,U+000E-001F,U+007F-009F,U+20DD-20E0,U+20E2-20E4,U+2150-218F,U+2190,U+2192,U+2194-2199,U+21AF,U+21E6-21F0,U+21F3,U+2218-2219,U+2299,U+22C4-22C6,U+2300-243F,U+2440-244A,U+2460-24FF,U+25A0-27BF,U+2800-28FF,U+2921-2922,U+2981,U+29BF,U+29EB,U+2B00-2BFF,U+4DC0-4DFF,U+FFF9-FFFB,U+10140-1018E,U+10190-1019C,U+101A0,U+101D0-101FD,U+102E0-102FB,U+10E60-10E7E,U+1D2C0-1D2D3,U+1D2E0-1D37F,U+1F000-1F0FF,U+1F100-1F1AE,U+1F1E6-1F1FF,U+1F30D-1F30F,U+1F315,U+1F31C,U+1F31E,U+1F320-1F32C,U+1F336,U+1F378,U+1F37D,U+1F382,U+1F393-1F39F,U+1F3A7-1F3A8,U+1F3AC-1F3AF,U+1F3C2,U+1F3C4-1F3C6,U+1F3CA-1F3CE,U+1F3D4-1F3E0,U+1F3ED,U+1F3F1-1F3F3,U+1F3F5-1F3F7,U+1F408,U+1F415,U+1F41F,U+1F426,U+1F43F,U+1F441-1F442,U+1F444,U+1F446-1F449,U+1F44C-1F44E,U+1F453,U+1F46A,U+1F47D,U+1F4A3,U+1F4B0,U+1F4B3,U+1F4B9,U+1F4BB,U+1F4BF,U+1F4C8-1F4CB,U+1F4D6,U+1F4DA,U+1F4DF,U+1F4E3-1F4E6,U+1F4EA-1F4ED,U+1F4F7,U+1F4F9-1F4FB,U+1F4FD-1F4FE,U+1F503,U+1F507-1F50B,U+1F50D,U+1F512-1F513,U+1F53E-1F54A,U+1F54F-1F5FA,U+1F610,U+1F650-1F67F,U+1F687,U+1F68D,U+1F691,U+1F694,U+1F698,U+1F6AD,U+1F6B2,U+1F6B9-1F6BA,U+1F6BC,U+1F6C6-1F6CF,U+1F6D3-1F6D7,U+1F6E0-1F6EA,U+1F6F0-1F6F3,U+1F6F7-1F6FC,U+1F700-1F80B,U+1F810-1F847,U+1F850-1F859,U+1F860-1F887,U+1F890-1F8AD,U+1F8B0-1F8BB,U+1F8C0-1F8C1,U+1F8D0-1F8D8,U+1F900-1F90B,U+1F93B,U+1F946,U+1F984,U+1F996,U+1F9E9,U+1FA00-1FA6F,U+1FA70-1FA7C,U+1FA80-1FAC6,U+1FAC8,U+1FACC-1FADD,U+1FADF-1FAEB,U+1FAEF-1FAFA,U+1FB00-1FBFF}@font-face{font-family:'Open Sans';font-style:italic;font-weight:300 800;font-stretch:100%;font-display:swap;src:url("+__b+"assets/memtYaGs126MiZpBA-UFUIcVXSCEkx2cmqvXlWqWtk6F15M.woff2) format('woff2');unicode-range:U+0102-0103,U+0110-0111,U+0128-0129,U+0168-0169,U+01A0-01A1,U+01AF-01B0,U+0300-0301,U+0303-0304,U+0308-0309,U+0323,U+0329,U+1EA0-1EF9,U+20AB}@font-face{font-family:'Open Sans';font-style:italic;font-weight:300 800;font-stretch:100%;font-display:swap;src:url("+__b+"assets/memtYaGs126MiZpBA-UFUIcVXSCEkx2cmqvXlWqWt06F15M.woff2) format('woff2');unicode-range:U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C4,U+2113,U+2C60-2C7F,U+A720-A7FF}@font-face{font-family:'Open Sans';font-style:italic;font-weight:300 800;font-stretch:100%;font-display:swap;src:url("+__b+"assets/memtYaGs126MiZpBA-UFUIcVXSCEkx2cmqvXlWqWuU6F.woff2) format('woff2');unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}@font-face{font-family:'Open Sans';font-style:normal;font-weight:300 800;font-stretch:100%;font-display:swap;src:url("+__b+"assets/memvYaGs126MiZpBA-UvWbX2vVnXBbObj2OVTSKmu1aB.woff2) format('woff2');unicode-range:U+0460-052F,U+1C80-1C8A,U+20B4,U+2DE0-2DFF,U+A640-A69F,U+FE2E-FE2F}@font-face{font-family:'Open Sans';font-style:normal;font-weight:300 800;font-stretch:100%;font-display:swap;src:url("+__b+"assets/memvYaGs126MiZpBA-UvWbX2vVnXBbObj2OVTSumu1aB.woff2) format('woff2');unicode-range:U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116}@font-face{font-family:'Open Sans';font-style:normal;font-weight:300 800;font-stretch:100%;font-display:swap;src:url("+__b+"assets/memvYaGs126MiZpBA-UvWbX2vVnXBbObj2OVTSOmu1aB.woff2) format('woff2');unicode-range:U+1F00-1FFF}@font-face{font-family:'Open Sans';font-style:normal;font-weight:300 800;font-stretch:100%;font-display:swap;src:url("+__b+"assets/memvYaGs126MiZpBA-UvWbX2vVnXBbObj2OVTSymu1aB.woff2) format('woff2');unicode-range:U+0370-0377,U+037A-037F,U+0384-038A,U+038C,U+038E-03A1,U+03A3-03FF}@font-face{font-family:'Open Sans';font-style:normal;font-weight:300 800;font-stretch:100%;font-display:swap;src:url("+__b+"assets/memvYaGs126MiZpBA-UvWbX2vVnXBbObj2OVTS2mu1aB.woff2) format('woff2');unicode-range:U+0307-0308,U+0590-05FF,U+200C-2010,U+20AA,U+25CC,U+FB1D-FB4F}@font-face{font-family:'Open Sans';font-style:normal;font-weight:300 800;font-stretch:100%;font-display:swap;src:url("+__b+"assets/memvYaGs126MiZpBA-UvWbX2vVnXBbObj2OVTVOmu1aB.woff2) format('woff2');unicode-range:U+0302-0303,U+0305,U+0307-0308,U+0310,U+0312,U+0315,U+031A,U+0326-0327,U+032C,U+032F-0330,U+0332-0333,U+0338,U+033A,U+0346,U+034D,U+0391-03A1,U+03A3-03A9,U+03B1-03C9,U+03D1,U+03D5-03D6,U+03F0-03F1,U+03F4-03F5,U+2016-2017,U+2034-2038,U+203C,U+2040,U+2043,U+2047,U+2050,U+2057,U+205F,U+2070-2071,U+2074-209F,U+20D0-20DC,U+20E1,U+20E5-20EF,U+2100-2112,U+2114-2115,U+2117-2121,U+2123-214F,U+2190,U+2192,U+2194-21AE,U+21B0-21E5,U+21F1-21F2,U+21F4-2211,U+2213-2214,U+2216-22FF,U+2308-230B,U+2310,U+2319,U+231C-2321,U+2336-237A,U+237C,U+2395,U+239B-23B7,U+23D0,U+23DC-23E1,U+2474-2475,U+25AF,U+25B3,U+25B7,U+25BD,U+25C1,U+25CA,U+25CC,U+25FB,U+266D-266F,U+27C0-27FF,U+2900-2AFF,U+2B0E-2B11,U+2B30-2B4C,U+2BFE,U+3030,U+FF5B,U+FF5D,U+1D400-1D7FF,U+1EE00-1EEFF}@font-face{font-family:'Open Sans';font-style:normal;font-weight:300 800;font-stretch:100%;font-display:swap;src:url("+__b+"assets/memvYaGs126MiZpBA-UvWbX2vVnXBbObj2OVTUGmu1aB.woff2) format('woff2');unicode-range:U+0001-000C,U+000E-001F,U+007F-009F,U+20DD-20E0,U+20E2-20E4,U+2150-218F,U+2190,U+2192,U+2194-2199,U+21AF,U+21E6-21F0,U+21F3,U+2218-2219,U+2299,U+22C4-22C6,U+2300-243F,U+2440-244A,U+2460-24FF,U+25A0-27BF,U+2800-28FF,U+2921-2922,U+2981,U+29BF,U+29EB,U+2B00-2BFF,U+4DC0-4DFF,U+FFF9-FFFB,U+10140-1018E,U+10190-1019C,U+101A0,U+101D0-101FD,U+102E0-102FB,U+10E60-10E7E,U+1D2C0-1D2D3,U+1D2E0-1D37F,U+1F000-1F0FF,U+1F100-1F1AE,U+1F1E6-1F1FF,U+1F30D-1F30F,U+1F315,U+1F31C,U+1F31E,U+1F320-1F32C,U+1F336,U+1F378,U+1F37D,U+1F382,U+1F393-1F39F,U+1F3A7-1F3A8,U+1F3AC-1F3AF,U+1F3C2,U+1F3C4-1F3C6,U+1F3CA-1F3CE,U+1F3D4-1F3E0,U+1F3ED,U+1F3F1-1F3F3,U+1F3F5-1F3F7,U+1F408,U+1F415,U+1F41F,U+1F426,U+1F43F,U+1F441-1F442,U+1F444,U+1F446-1F449,U+1F44C-1F44E,U+1F453,U+1F46A,U+1F47D,U+1F4A3,U+1F4B0,U+1F4B3,U+1F4B9,U+1F4BB,U+1F4BF,U+1F4C8-1F4CB,U+1F4D6,U+1F4DA,U+1F4DF,U+1F4E3-1F4E6,U+1F4EA-1F4ED,U+1F4F7,U+1F4F9-1F4FB,U+1F4FD-1F4FE,U+1F503,U+1F507-1F50B,U+1F50D,U+1F512-1F513,U+1F53E-1F54A,U+1F54F-1F5FA,U+1F610,U+1F650-1F67F,U+1F687,U+1F68D,U+1F691,U+1F694,U+1F698,U+1F6AD,U+1F6B2,U+1F6B9-1F6BA,U+1F6BC,U+1F6C6-1F6CF,U+1F6D3-1F6D7,U+1F6E0-1F6EA,U+1F6F0-1F6F3,U+1F6F7-1F6FC,U+1F700-1F80B,U+1F810-1F847,U+1F850-1F859,U+1F860-1F887,U+1F890-1F8AD,U+1F8B0-1F8BB,U+1F8C0-1F8C1,U+1F8D0-1F8D8,U+1F900-1F90B,U+1F93B,U+1F946,U+1F984,U+1F996,U+1F9E9,U+1FA00-1FA6F,U+1FA70-1FA7C,U+1FA80-1FAC6,U+1FAC8,U+1FACC-1FADD,U+1FADF-1FAEB,U+1FAEF-1FAFA,U+1FB00-1FBFF}@font-face{font-family:'Open Sans';font-style:normal;font-weight:300 800;font-stretch:100%;font-display:swap;src:url("+__b+"assets/memvYaGs126MiZpBA-UvWbX2vVnXBbObj2OVTSCmu1aB.woff2) format('woff2');unicode-range:U+0102-0103,U+0110-0111,U+0128-0129,U+0168-0169,U+01A0-01A1,U+01AF-01B0,U+0300-0301,U+0303-0304,U+0308-0309,U+0323,U+0329,U+1EA0-1EF9,U+20AB}@font-face{font-family:'Open Sans';font-style:normal;font-weight:300 800;font-stretch:100%;font-display:swap;src:url("+__b+"assets/memvYaGs126MiZpBA-UvWbX2vVnXBbObj2OVTSGmu1aB.woff2) format('woff2');unicode-range:U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C4,U+2113,U+2C60-2C7F,U+A720-A7FF}@font-face{font-family:'Open Sans';font-style:normal;font-weight:300 800;font-stretch:100%;font-display:swap;src:url("+__b+"assets/memvYaGs126MiZpBA-UvWbX2vVnXBbObj2OVTS-muw.woff2) format('woff2');unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}`)),document.head.appendChild(e)}}catch(e){console.error(`vite-plugin-css-injected-by-js`,e)}})();
|
|
2
|
-
import { C as e, E as t, S as n, T as r, _ as i, a, b as o, d as s, f as c, g as l, h as u, i as d, l as f, m as p, n as m, o as h, p as g, r as _, s as v, t as y, u as b, w as x, x as S, y as
|
|
3
|
-
import { $ as
|
|
2
|
+
import { C as e, E as t, S as n, T as r, _ as i, a, b as o, d as s, f as c, g as l, h as u, i as d, l as f, m as p, n as m, o as h, p as g, r as _, s as v, t as y, u as b, w as x, x as S, y as C } from "./_chunks/zod-Cty6wiWN.js";
|
|
3
|
+
import { $ as ee, A as w, B as te, C as T, Ct as ne, D as re, Dt as ie, E, Et as D, F as O, H as ae, I as oe, J as k, L as se, N as ce, O as le, Ot as ue, P as de, Q as A, R as fe, S as j, St as M, T as pe, Tt as N, V as me, W as P, X as he, Y as ge, _ as F, at as _e, b as ve, bt as ye, ct as be, d as xe, dt as Se, f as I, ft as Ce, g as L, gt as R, h as z, i as we, it as Te, k as B, kt as V, l as Ee, lt as H, mt as De, n as Oe, nt as ke, ot as U, p as Ae, pt as je, q as Me, r as Ne, t as W, tt as G, u as Pe, ut as Fe, v as K, vt as Ie, w as q, wt as J, x as Le, xt as Re, y as Y, yt as ze, z as X } from "./_chunks/vue.runtime.esm-bundler-C2U5uTqB.js";
|
|
4
4
|
import { n as Be, r as Ve, t as He } from "./_chunks/vue-i18n-Dl4eZ714.js";
|
|
5
5
|
import { i as Ue, n as We, r as Ge } from "./_chunks/iconify-Cj-qXWYO.js";
|
|
6
6
|
import { t as Ke } from "./_chunks/PkStreamingMarkdown-CA6Yy0Ul.js";
|
|
@@ -145,7 +145,7 @@ function Or(e, t) {
|
|
|
145
145
|
if (cr(i) && cr(r) && Object.hasOwn(e, n) && !Fe(r) && !be(r)) {
|
|
146
146
|
e[n] = Or(i, r);
|
|
147
147
|
let t = ze(e)[n];
|
|
148
|
-
Fe(t) && Se(t) &&
|
|
148
|
+
Fe(t) && Se(t) && ne(t);
|
|
149
149
|
} else e[n] = r;
|
|
150
150
|
}
|
|
151
151
|
return e;
|
|
@@ -277,7 +277,7 @@ function Fr(e, t, n) {
|
|
|
277
277
|
r = i ? n : t;
|
|
278
278
|
function a(n, a) {
|
|
279
279
|
let o = le();
|
|
280
|
-
return n ||= o ?
|
|
280
|
+
return n ||= o ? w(sr, null) : null, n && or(n), n = ar, n._s.has(e) || (i ? Pr(e, t, r, n) : Nr(e, r, n)), n._s.get(e);
|
|
281
281
|
}
|
|
282
282
|
return a.$id = e, a;
|
|
283
283
|
}
|
|
@@ -5708,7 +5708,7 @@ var wi = i({
|
|
|
5708
5708
|
mediaType: o().regex(xt),
|
|
5709
5709
|
url: e(),
|
|
5710
5710
|
filename: o().optional(),
|
|
5711
|
-
providerMetadata:
|
|
5711
|
+
providerMetadata: C(o(), C(o(), n())).optional()
|
|
5712
5712
|
}), Ei = b("type", [wi, Ti]);
|
|
5713
5713
|
i({
|
|
5714
5714
|
id: o(),
|
|
@@ -5735,7 +5735,7 @@ i({
|
|
|
5735
5735
|
fallbackModels: h(o()).optional(),
|
|
5736
5736
|
gatewayOptions: vt.partial().optional(),
|
|
5737
5737
|
deviceContext: nt.optional(),
|
|
5738
|
-
externalContext:
|
|
5738
|
+
externalContext: C(o(), n()).optional(),
|
|
5739
5739
|
smoothStream: v().optional(),
|
|
5740
5740
|
hostTools: h(n()).optional(),
|
|
5741
5741
|
pageTools: n().optional(),
|
|
@@ -5762,7 +5762,7 @@ var Oi = /* @__PURE__ */ new Set([
|
|
|
5762
5762
|
messageCountAtLastSummary: o().nullable(),
|
|
5763
5763
|
createdAt: y(),
|
|
5764
5764
|
updatedAt: y(),
|
|
5765
|
-
metadata:
|
|
5765
|
+
metadata: C(o(), n()),
|
|
5766
5766
|
totalCostInUSD: o(),
|
|
5767
5767
|
usage: n(),
|
|
5768
5768
|
agentId: o().nullable(),
|
|
@@ -7183,7 +7183,7 @@ var xc = async (e, t) => {
|
|
|
7183
7183
|
error: null
|
|
7184
7184
|
};
|
|
7185
7185
|
}
|
|
7186
|
-
let y = t?.jsonParser ?? rc, b = await h.text(), x = tc(b), S = x ? await y(b) : null,
|
|
7186
|
+
let y = t?.jsonParser ?? rc, b = await h.text(), x = tc(b), S = x ? await y(b) : null, C = {
|
|
7187
7187
|
response: h,
|
|
7188
7188
|
responseText: b,
|
|
7189
7189
|
request: p,
|
|
@@ -7193,8 +7193,8 @@ var xc = async (e, t) => {
|
|
|
7193
7193
|
})
|
|
7194
7194
|
};
|
|
7195
7195
|
for (let e of r.onError) if (e) {
|
|
7196
|
-
var
|
|
7197
|
-
await e(bc(bc({},
|
|
7196
|
+
var ee;
|
|
7197
|
+
await e(bc(bc({}, C), {}, { response: t != null && (ee = t.hookOptions) != null && ee.cloneResponse ? h.clone() : h }));
|
|
7198
7198
|
}
|
|
7199
7199
|
if (t?.retry) {
|
|
7200
7200
|
let n = Is(t.retry), i = t.retryAttempt ?? 0;
|
|
@@ -9271,7 +9271,7 @@ var Q = {
|
|
|
9271
9271
|
null: a,
|
|
9272
9272
|
number: l,
|
|
9273
9273
|
object: i,
|
|
9274
|
-
record:
|
|
9274
|
+
record: C,
|
|
9275
9275
|
string: o,
|
|
9276
9276
|
union: S,
|
|
9277
9277
|
unknown: n
|
|
@@ -11300,7 +11300,7 @@ var Bf = "voice-", Vf = 300, Hf = (e) => e?.role === "assistant" && e.parts.some
|
|
|
11300
11300
|
};
|
|
11301
11301
|
function ap(e) {
|
|
11302
11302
|
return Fr(`chatbot-${e}`, () => {
|
|
11303
|
-
let { t, te: n, locale: r } = Ve({ useScope: "global" }), i = R(""), a = R(), o = R(e), s = R(), c = R(), l = R(), u = R(), d = R(), f = R(), p = R(), m = R(), h = R(), g = R(), _ = R(), v = R(), y = R(), b = R(), x = R(), S = R(),
|
|
11303
|
+
let { t, te: n, locale: r } = Ve({ useScope: "global" }), i = R(""), a = R(), o = R(e), s = R(), c = R(), l = R(), u = R(), d = R(), f = R(), p = R(), m = R(), h = R(), g = R(), _ = R(), v = R(), y = R(), b = R(), x = R(), S = R(), C = Ie(), w = R(0), te = R(0), T = R(), ne = R(), re = R(), ie = Ie(), E = Ie(), D = R(), ae = R(), oe = Ie(), k = R(!1), se = R({}), ce = R({}), le = R(!1), ue = R(0), de = R(), fe = R(!1), j = An(), M = z(() => {
|
|
11304
11304
|
let e = u.value?.theme;
|
|
11305
11305
|
return e && e !== "auto" || (e = de.value), e ? e === "dark" : j.value;
|
|
11306
11306
|
}), pe = z(() => c.value === "reasoning"), N = z(() => pe.value ? g.value?.filter((e) => ![
|
|
@@ -11308,7 +11308,7 @@ function ap(e) {
|
|
|
11308
11308
|
"downvote",
|
|
11309
11309
|
"feedback"
|
|
11310
11310
|
].includes(e)) : g.value), me = Gn(z(() => `${o.value}-chatId`), null);
|
|
11311
|
-
|
|
11311
|
+
ee(() => {
|
|
11312
11312
|
me.value ||= Bl();
|
|
11313
11313
|
});
|
|
11314
11314
|
let P = z({
|
|
@@ -11316,20 +11316,20 @@ function ap(e) {
|
|
|
11316
11316
|
set: (e) => {
|
|
11317
11317
|
me.value = e;
|
|
11318
11318
|
}
|
|
11319
|
-
}), he = Un(z(() => `${o.value}-pageAccessOff`), !1), ge = z(() => he.value ? [] : ie.value ?? []), F = () => he.value ? [] : E.value?.() ?? [], _e = z(() => !!(
|
|
11319
|
+
}), he = Un(z(() => `${o.value}-pageAccessOff`), !1), ge = z(() => he.value ? [] : ie.value ?? []), F = () => he.value ? [] : E.value?.() ?? [], _e = z(() => !!(T.value && ie.value?.length)), ve = Gn(z(() => `${o.value}-${l.value ?? "anonymous"}-confirmations`), "manual"), ye = z(() => ne.value?.allowAutomatic === !0), be = z(() => ye.value && ve.value === "automatic" ? "automatic" : "manual");
|
|
11320
11320
|
function xe(e) {
|
|
11321
11321
|
ve.value = e;
|
|
11322
11322
|
}
|
|
11323
|
-
let Se = z(() => !!oe.value &&
|
|
11323
|
+
let Se = z(() => !!oe.value && T.value?.pointer === !0 && ge.value.length > 0);
|
|
11324
11324
|
A(Se, (e) => {
|
|
11325
11325
|
e || (ae.value = void 0);
|
|
11326
11326
|
});
|
|
11327
11327
|
let I = Gn(z(() => `${o.value}-pageNotice`), null), Ce = z(() => {
|
|
11328
|
-
let e =
|
|
11328
|
+
let e = T.value?.level;
|
|
11329
11329
|
return e && e !== qe.Off && ge.value.length && !et(I.value ?? void 0, e) ? e : void 0;
|
|
11330
11330
|
});
|
|
11331
11331
|
function L() {
|
|
11332
|
-
I.value =
|
|
11332
|
+
I.value = T.value?.level ?? null;
|
|
11333
11333
|
}
|
|
11334
11334
|
let we = R(), Te = R(!1), B = z(() => we.value?.message?.toLowerCase().includes("conversation-blocked") ?? !1);
|
|
11335
11335
|
function V(e) {
|
|
@@ -11386,7 +11386,7 @@ function ap(e) {
|
|
|
11386
11386
|
unchanged: t.unchanged
|
|
11387
11387
|
}
|
|
11388
11388
|
});
|
|
11389
|
-
}, G = ({ forms: e }) =>
|
|
11389
|
+
}, G = ({ forms: e }) => T.value && ge.value.length ? {
|
|
11390
11390
|
version: 1,
|
|
11391
11391
|
features: [...mt],
|
|
11392
11392
|
forms: e ? F().map(({ name: e, description: t, inputSchema: n, annotations: r }) => ({
|
|
@@ -11412,7 +11412,7 @@ function ap(e) {
|
|
|
11412
11412
|
}), e.readOnly ? D.value = void 0 : (D.value = { title: n ?? t?.annotations?.title ?? e.toolName }, le.value = !0);
|
|
11413
11413
|
}, Fe = Yc({
|
|
11414
11414
|
registry: () => [
|
|
11415
|
-
...(
|
|
11415
|
+
...(C.value ?? []).filter((e) => !pt(e.name)),
|
|
11416
11416
|
...ge.value,
|
|
11417
11417
|
...F()
|
|
11418
11418
|
],
|
|
@@ -11421,7 +11421,7 @@ function ap(e) {
|
|
|
11421
11421
|
confirm: Me,
|
|
11422
11422
|
waitForResume: U,
|
|
11423
11423
|
onPendingChange: (e) => {
|
|
11424
|
-
|
|
11424
|
+
w.value = e;
|
|
11425
11425
|
},
|
|
11426
11426
|
onActivity: Pe,
|
|
11427
11427
|
mode: () => be.value,
|
|
@@ -11449,7 +11449,7 @@ function ap(e) {
|
|
|
11449
11449
|
},
|
|
11450
11450
|
waitForResume: () => new Promise((e) => setTimeout(() => e(!0), Vf)),
|
|
11451
11451
|
onPendingChange: (e) => {
|
|
11452
|
-
|
|
11452
|
+
te.value = e;
|
|
11453
11453
|
},
|
|
11454
11454
|
onActivity: Pe,
|
|
11455
11455
|
mode: () => Re
|
|
@@ -11530,7 +11530,7 @@ function ap(e) {
|
|
|
11530
11530
|
disabledTools: f.value?.disabled,
|
|
11531
11531
|
fallbackModels: y.value,
|
|
11532
11532
|
gatewayOptions: b.value,
|
|
11533
|
-
hostTools: Jc(
|
|
11533
|
+
hostTools: Jc(C.value, S.value),
|
|
11534
11534
|
pageTools: G({ forms: !0 }),
|
|
11535
11535
|
...be.value === "automatic" && { confirmations: "automatic" }
|
|
11536
11536
|
} }),
|
|
@@ -11765,7 +11765,7 @@ function ap(e) {
|
|
|
11765
11765
|
let on = () => {
|
|
11766
11766
|
let e = Z.value.status;
|
|
11767
11767
|
return e === "submitted" || e === "streaming";
|
|
11768
|
-
}, sn = () => on() || We?.chatId === P.value ||
|
|
11768
|
+
}, sn = () => on() || We?.chatId === P.value || w.value > 0, cn = () => {
|
|
11769
11769
|
let e = ot();
|
|
11770
11770
|
return Ae.value !== void 0 || Hf(e) || rp(e);
|
|
11771
11771
|
}, ln = /* @__PURE__ */ new Set();
|
|
@@ -11894,15 +11894,15 @@ function ap(e) {
|
|
|
11894
11894
|
let En;
|
|
11895
11895
|
A(() => [
|
|
11896
11896
|
Z.value.status,
|
|
11897
|
-
|
|
11898
|
-
|
|
11897
|
+
w.value,
|
|
11898
|
+
te.value
|
|
11899
11899
|
], ([e, t, n]) => {
|
|
11900
11900
|
clearTimeout(En), e === "ready" && t === 0 && n === 0 && (En = setTimeout(() => {
|
|
11901
11901
|
le.value = !1;
|
|
11902
11902
|
}, 1500));
|
|
11903
11903
|
});
|
|
11904
11904
|
let Dn = R(!1), On;
|
|
11905
|
-
A(() => !Ae.value && !Hf(ot()) && (on() ||
|
|
11905
|
+
A(() => !Ae.value && !Hf(ot()) && (on() || w.value > 0), (e) => {
|
|
11906
11906
|
clearTimeout(On), e ? Dn.value = !0 : On = setTimeout(() => {
|
|
11907
11907
|
Dn.value = !1;
|
|
11908
11908
|
}, 400);
|
|
@@ -11961,7 +11961,7 @@ function ap(e) {
|
|
|
11961
11961
|
un();
|
|
11962
11962
|
}
|
|
11963
11963
|
}
|
|
11964
|
-
}), A(
|
|
11964
|
+
}), A(w, (e) => {
|
|
11965
11965
|
e === 0 && Z.value.status === "ready" && un();
|
|
11966
11966
|
}), A(() => Z.value.status, (e) => {
|
|
11967
11967
|
e === "ready" && It.value.length > 0 && (It.value = "");
|
|
@@ -12163,9 +12163,9 @@ function ap(e) {
|
|
|
12163
12163
|
gatewayOptions: b,
|
|
12164
12164
|
externalContext: x,
|
|
12165
12165
|
agentHostTools: S,
|
|
12166
|
-
hostToolRegistry:
|
|
12167
|
-
hostToolsPending:
|
|
12168
|
-
agentPageAccess:
|
|
12166
|
+
hostToolRegistry: C,
|
|
12167
|
+
hostToolsPending: w,
|
|
12168
|
+
agentPageAccess: T,
|
|
12169
12169
|
pageToolRegistry: ie,
|
|
12170
12170
|
pageFormsProvider: E,
|
|
12171
12171
|
pageAction: D,
|
|
@@ -12183,7 +12183,7 @@ function ap(e) {
|
|
|
12183
12183
|
pageAccessAvailable: _e,
|
|
12184
12184
|
pageAccessOff: he,
|
|
12185
12185
|
setPageAccessOff: He,
|
|
12186
|
-
agentConfirmations:
|
|
12186
|
+
agentConfirmations: ne,
|
|
12187
12187
|
agentSelectionActions: re,
|
|
12188
12188
|
sendSelection: xn,
|
|
12189
12189
|
confirmationsAvailable: ye,
|
|
@@ -13449,7 +13449,7 @@ function ag(e, { t, pages: n = () => [], presence: r, refs: i = new Pp() }) {
|
|
|
13449
13449
|
c = e;
|
|
13450
13450
|
}
|
|
13451
13451
|
return o && c.contains(r) ? s : Kh(Kp(c, a, Ah)).includes(i);
|
|
13452
|
-
},
|
|
13452
|
+
}, C = (e) => !!e.closest("[data-agent-confirm]"), ee = (t) => e.confirmEveryAction || C(t), w = Uc, te = () => {
|
|
13453
13453
|
let e = lm();
|
|
13454
13454
|
if (!e || Up(e, { inert: !1 }) || Vp(e, a)) return { root: document.body };
|
|
13455
13455
|
let t = em(e, a);
|
|
@@ -13457,19 +13457,19 @@ function ag(e, { t, pages: n = () => [], presence: r, refs: i = new Pp() }) {
|
|
|
13457
13457
|
root: e,
|
|
13458
13458
|
note: `[The dialog${t ? ` "${t}"` : ""} is open: the page behind it is out of reach until it closes, so only the dialog is shown.]`
|
|
13459
13459
|
};
|
|
13460
|
-
},
|
|
13461
|
-
let { root: e, note: t } =
|
|
13460
|
+
}, T = () => {
|
|
13461
|
+
let { root: e, note: t } = te(), n = u(e, jh);
|
|
13462
13462
|
return t ? {
|
|
13463
13463
|
...n,
|
|
13464
13464
|
text: `${t}\n${n.text}`
|
|
13465
13465
|
} : n;
|
|
13466
|
-
},
|
|
13466
|
+
}, ne = (e) => [...e.elements].filter((e) => "validity" in e && !e.validity.valid && !Vp(e, a)).slice(0, 3).map((e) => `${em(e, a) || Jp(e) || "field"}: ${e.validationMessage}`), re = async ({ element: e, said: t, run: n, submission: i, shows: o, signal: s }) => {
|
|
13467
13467
|
let c = Oh(i), l = location.href, d = sh(a), f = () => {
|
|
13468
13468
|
let t = o?.();
|
|
13469
13469
|
return t && !Vp(t, a) ? t : e.closest("form, section, article, dialog, [role=dialog], main") ?? e.parentElement ?? document.body;
|
|
13470
13470
|
}, p = Kp(f(), a, Ah), m = !!e.closest("dialog, [role=dialog], [role=alertdialog]"), h = lm();
|
|
13471
13471
|
try {
|
|
13472
|
-
if (await r?.point(e, jm(e, a)), s && $h(s), n(), await Jh(), i && !c?.destination &&
|
|
13472
|
+
if (await r?.point(e, jm(e, a)), s && $h(s), n(), await Jh(), i && !c?.destination && ne(i.form).length === 0) for (let e = 0; e < Vh && d.said().length === 0 && !c?.destination && !s?.aborted && location.href === l; e += Hh) await new Promise((e) => setTimeout(e, Hh));
|
|
13473
13473
|
} catch (e) {
|
|
13474
13474
|
throw c?.drop(), d.stop(), e;
|
|
13475
13475
|
}
|
|
@@ -13478,10 +13478,10 @@ function ag(e, { t, pages: n = () => [], presence: r, refs: i = new Pp() }) {
|
|
|
13478
13478
|
let b = d.stop(), x = [typeof t == "function" ? t() : t];
|
|
13479
13479
|
if (b.length > 0 && x.push(`The page said: ${b.map((e) => `«${e}»`).join(" ")}`), c?.destination) x.push(`The page is loading ${Xh(c.destination)}: the conversation goes on there, so read it with page_snapshot before doing anything else.`);
|
|
13480
13480
|
else if (v || y) {
|
|
13481
|
-
let e =
|
|
13481
|
+
let e = T();
|
|
13482
13482
|
x.push(`${v ? "The page is now" : "The part of the page that held it closed or was replaced, the page is"} "${document.title}" (${location.pathname}${location.search}). Now:\n${e.text}`), e.truncated && x.push("[The page goes on: page_snapshot for the rest.]"), !v && m && b.length === 0 && x.push("[The dialog closed and the page announced nothing: what it held may only be written into the page's form, which its own save button sends. Do not say it is saved until the page shows it.]");
|
|
13483
13483
|
} else {
|
|
13484
|
-
let e = i ?
|
|
13484
|
+
let e = i ? ne(i.form) : [];
|
|
13485
13485
|
e.length > 0 && x.push(`The form was not sent: ${e.join("; ")}.`);
|
|
13486
13486
|
let t = _ ?? f(), n = _ ? em(_, a) : "";
|
|
13487
13487
|
x.push(`${_ ? `A dialog opened${n ? ` "${n}"` : ""}, the page behind it is out of reach until it closes. ` : ""}Now:\n${u(t, Ah).text}`), !_ && b.length === 0 && e.length === 0 && Kp(t, a, Ah) === p && x.push("[No visible change yet: if the page is still working, wait for it with page_wait; if the action opened something elsewhere, read it with page_snapshot.]");
|
|
@@ -13573,7 +13573,7 @@ function ag(e, { t, pages: n = () => [], presence: r, refs: i = new Pp() }) {
|
|
|
13573
13573
|
policy: j,
|
|
13574
13574
|
async execute(e, { signal: t }) {
|
|
13575
13575
|
await xh(), $h(t);
|
|
13576
|
-
let r = e.scope, { root: i, note: a } = r === void 0 ?
|
|
13576
|
+
let r = e.scope, { root: i, note: a } = r === void 0 ? te() : {
|
|
13577
13577
|
root: d({ ref: r }),
|
|
13578
13578
|
note: void 0
|
|
13579
13579
|
}, o = u(i, kh), s = n().map((e) => [e.path, e.title ?? ""]);
|
|
@@ -13653,19 +13653,19 @@ function ag(e, { t, pages: n = () => [], presence: r, refs: i = new Pp() }) {
|
|
|
13653
13653
|
confirmation(e) {
|
|
13654
13654
|
let n = Number(e.ref), r = i.resolve(n);
|
|
13655
13655
|
if (!r || um(r)) return;
|
|
13656
|
-
let o = D(r), s = dm(r, a), c = th(r) || !!s ||
|
|
13656
|
+
let o = D(r), s = dm(r, a), c = th(r) || !!s || C(r), l = eh(r);
|
|
13657
13657
|
if (l) {
|
|
13658
13658
|
let e = ue(l, t("toolApproval.pageSubmit", { name: o }), String(n));
|
|
13659
|
-
return c ?
|
|
13659
|
+
return c ? w(e) : e;
|
|
13660
13660
|
}
|
|
13661
|
-
if (th(r)) return
|
|
13662
|
-
if (s) return
|
|
13661
|
+
if (th(r)) return w(t("toolApproval.pageOpen", { name: o }));
|
|
13662
|
+
if (s) return w(t("toolApproval.pageAnswer", {
|
|
13663
13663
|
question: s,
|
|
13664
13664
|
name: o
|
|
13665
13665
|
}));
|
|
13666
|
-
if (!
|
|
13666
|
+
if (!ee(r)) return;
|
|
13667
13667
|
let u = nh(r) ? t("toolApproval.pageOpen", { name: o }) : t("toolApproval.pageClick", { name: o });
|
|
13668
|
-
return c ?
|
|
13668
|
+
return c ? w(u) : u;
|
|
13669
13669
|
},
|
|
13670
13670
|
describe: (e) => t("messagePart.pageStep.click", { name: k(i.resolve(Number(e.ref))) }),
|
|
13671
13671
|
async execute(e, { signal: t }) {
|
|
@@ -13699,7 +13699,7 @@ function ag(e, { t, pages: n = () => [], presence: r, refs: i = new Pp() }) {
|
|
|
13699
13699
|
element: i.resolve(Number(e.ref)),
|
|
13700
13700
|
value: String(e.value ?? "")
|
|
13701
13701
|
}));
|
|
13702
|
-
if (!n.some(({ element: e }) => e &&
|
|
13702
|
+
if (!n.some(({ element: e }) => e && ee(e))) return;
|
|
13703
13703
|
let r = (e) => e.length > 120 ? `${e.slice(0, 119)}…` : e, o = (e) => e && jm(e, a) || t("toolApproval.pageElement"), s = n.length === 1 ? t("toolApproval.pageFill", {
|
|
13704
13704
|
name: o(n[0]?.element),
|
|
13705
13705
|
value: r(n[0]?.value ?? "")
|
|
@@ -13710,7 +13710,7 @@ function ag(e, { t, pages: n = () => [], presence: r, refs: i = new Pp() }) {
|
|
|
13710
13710
|
value: r(t)
|
|
13711
13711
|
}))
|
|
13712
13712
|
};
|
|
13713
|
-
return n.some(({ element: e }) => e &&
|
|
13713
|
+
return n.some(({ element: e }) => e && C(e)) ? w(s) : s;
|
|
13714
13714
|
},
|
|
13715
13715
|
async execute(e, { signal: t }) {
|
|
13716
13716
|
await xh(), $h(t);
|
|
@@ -13719,7 +13719,7 @@ function ag(e, { t, pages: n = () => [], presence: r, refs: i = new Pp() }) {
|
|
|
13719
13719
|
let o = sh(a), s = [], c;
|
|
13720
13720
|
try {
|
|
13721
13721
|
for (let [e, o] of n.entries()) {
|
|
13722
|
-
let l = "", d, p = null, _ = !1,
|
|
13722
|
+
let l = "", d, p = null, _ = !1, C = 0, ee = !1;
|
|
13723
13723
|
try {
|
|
13724
13724
|
$h(t);
|
|
13725
13725
|
let s = f(o);
|
|
@@ -13737,32 +13737,32 @@ function ag(e, { t, pages: n = () => [], presence: r, refs: i = new Pp() }) {
|
|
|
13737
13737
|
c && r?.toward && !h(s) && m(c, r.toward), await Jh(), p = await g(s, t);
|
|
13738
13738
|
}
|
|
13739
13739
|
$h(t);
|
|
13740
|
-
let d = p ? x(p, o.value, { loose: _ }) : { matches: 0 }, { option:
|
|
13741
|
-
if (
|
|
13742
|
-
let e = em(
|
|
13740
|
+
let d = p ? x(p, o.value, { loose: _ }) : { matches: 0 }, { option: w } = d;
|
|
13741
|
+
if (C = d.matches, p && w) {
|
|
13742
|
+
let e = em(w, a) || w.textContent?.trim() || "";
|
|
13743
13743
|
c ??= Oh();
|
|
13744
|
-
let n = p.getAttribute("aria-multiselectable") === "true" &&
|
|
13745
|
-
n || (await r?.point(
|
|
13744
|
+
let n = p.getAttribute("aria-multiselectable") === "true" && w.getAttribute("aria-selected") === "true";
|
|
13745
|
+
n || (await r?.point(w, e), $h(t), Wm(w), await Jh()), ee = !n && !c?.destination && !S(s, w, e, p);
|
|
13746
13746
|
let o = em(s, a), u = `[${i.refOf(s)}] ${Jp(s) ?? "generic"}${o ? ` ${JSON.stringify(o)}` : ""}`;
|
|
13747
|
-
l = n ? `${JSON.stringify(e)} was already chosen in ${u}` :
|
|
13747
|
+
l = n ? `${JSON.stringify(e)} was already chosen in ${u}` : ee ? `Clicked the option ${JSON.stringify(e)} of ${u}, and the field does not show it: check it with page_snapshot before going on.` : `Chose ${JSON.stringify(e)} in ${u}`, p = null;
|
|
13748
13748
|
}
|
|
13749
13749
|
} catch (e) {
|
|
13750
13750
|
d = e;
|
|
13751
13751
|
}
|
|
13752
13752
|
if (d !== void 0) throw s.length === 0 ? d : Error(`${s.join("\n")}\nStopped at [${String(o.ref)}], the rest not written: ${d instanceof Error ? d.message : "failed"}`);
|
|
13753
13753
|
s.push(l);
|
|
13754
|
-
let
|
|
13754
|
+
let w = n.slice(e + 1);
|
|
13755
13755
|
if (c?.destination) {
|
|
13756
|
-
s.push(`The page is loading ${Xh(c.destination)}: the conversation goes on there, so read it with page_snapshot before doing anything else.${
|
|
13756
|
+
s.push(`The page is loading ${Xh(c.destination)}: the conversation goes on there, so read it with page_snapshot before doing anything else.${w.length > 0 ? ` Not written: ${w.map(({ ref: e }) => `[${String(e)}]`).join(", ")}.` : ""}`);
|
|
13757
13757
|
break;
|
|
13758
13758
|
}
|
|
13759
|
-
if (
|
|
13760
|
-
|
|
13759
|
+
if (ee) {
|
|
13760
|
+
w.length > 0 && s.push(`Not written yet: ${w.map(({ ref: e }) => `[${String(e)}]`).join(", ")}. Check this field first, then write them with page_fill.`);
|
|
13761
13761
|
break;
|
|
13762
13762
|
}
|
|
13763
13763
|
if (p) {
|
|
13764
|
-
let e = JSON.stringify(String(o.value ?? "")), t =
|
|
13765
|
-
s.push(_ ? `Its list of options opened, and ${t}: if one is what you meant, choose it with page_click. Now:\n${u(p, Ah).text}` : `Its list of options opened, and ${t}: if one of them is what you meant, choose it with page_click. In a field like this the text alone may not count as a choice, and the site may clear it when the field loses the focus; where it does count (a search), go on without choosing. Now:\n${u(p, Ah).text}`),
|
|
13764
|
+
let e = JSON.stringify(String(o.value ?? "")), t = C > 1 ? `${C} options match ${e}, so none was chosen` : _ ? `none of them is ${e}` : `no option is ${e} exactly`;
|
|
13765
|
+
s.push(_ ? `Its list of options opened, and ${t}: if one is what you meant, choose it with page_click. Now:\n${u(p, Ah).text}` : `Its list of options opened, and ${t}: if one of them is what you meant, choose it with page_click. In a field like this the text alone may not count as a choice, and the site may clear it when the field loses the focus; where it does count (a search), go on without choosing. Now:\n${u(p, Ah).text}`), w.length > 0 && s.push(`Not written yet, since writing another field would close the list: ${w.map(({ ref: e }) => `[${String(e)}]`).join(", ")}. Choose the option first, then write them with page_fill.`);
|
|
13766
13766
|
break;
|
|
13767
13767
|
}
|
|
13768
13768
|
}
|
|
@@ -13801,9 +13801,9 @@ function ag(e, { t, pages: n = () => [], presence: r, refs: i = new Pp() }) {
|
|
|
13801
13801
|
describe: (e) => t("messagePart.pageStep.hover", { name: k(i.resolve(Number(e.ref))) }),
|
|
13802
13802
|
confirmation(e) {
|
|
13803
13803
|
let n = i.resolve(Number(e.ref));
|
|
13804
|
-
if (!n || !
|
|
13804
|
+
if (!n || !ee(n)) return;
|
|
13805
13805
|
let r = t("toolApproval.pageHover", { name: D(n) });
|
|
13806
|
-
return
|
|
13806
|
+
return C(n) ? w(r) : r;
|
|
13807
13807
|
},
|
|
13808
13808
|
async execute(e, { signal: t }) {
|
|
13809
13809
|
await xh(), $h(t);
|
|
@@ -13826,21 +13826,21 @@ function ag(e, { t, pages: n = () => [], presence: r, refs: i = new Pp() }) {
|
|
|
13826
13826
|
}
|
|
13827
13827
|
let i = `press:${String(e.ref)}`, o = n === "Enter" && !!hm(r, a);
|
|
13828
13828
|
o ? de.add(i) : de.delete(i);
|
|
13829
|
-
let s = n === "Enter" || n === "Space" ? dm(r, a, { anyElement: !0 }) : void 0, c = !!s ||
|
|
13829
|
+
let s = n === "Enter" || n === "Space" ? dm(r, a, { anyElement: !0 }) : void 0, c = !!s || C(r), l = n === "Enter" && !o ? Ym(r) : null;
|
|
13830
13830
|
if (l) {
|
|
13831
13831
|
let e = ue(l, t("toolApproval.pageSubmit", { name: D(r) }), i), n = Jm(l);
|
|
13832
|
-
return c || n &&
|
|
13832
|
+
return c || n && C(n) ? w(e) : e;
|
|
13833
13833
|
}
|
|
13834
|
-
if (s) return
|
|
13834
|
+
if (s) return w(t("toolApproval.pageAnswer", {
|
|
13835
13835
|
question: s,
|
|
13836
13836
|
name: `${String(n)} · ${D(r)}`
|
|
13837
13837
|
}));
|
|
13838
|
-
if (!
|
|
13838
|
+
if (!ee(r)) return;
|
|
13839
13839
|
let u = t("toolApproval.pagePress", {
|
|
13840
13840
|
key: String(n),
|
|
13841
13841
|
name: D(r)
|
|
13842
13842
|
});
|
|
13843
|
-
return c ?
|
|
13843
|
+
return c ? w(u) : u;
|
|
13844
13844
|
},
|
|
13845
13845
|
describe(e) {
|
|
13846
13846
|
let { key: n, ref: r } = e;
|
|
@@ -13893,7 +13893,7 @@ function ag(e, { t, pages: n = () => [], presence: r, refs: i = new Pp() }) {
|
|
|
13893
13893
|
inputSchema: { type: "object" },
|
|
13894
13894
|
annotations: { title: t("messagePart.pageTool.back") },
|
|
13895
13895
|
policy: j,
|
|
13896
|
-
confirmation: () => Qh() ? e.confirmEveryAction ? t("toolApproval.pageBack") : void 0 :
|
|
13896
|
+
confirmation: () => Qh() ? e.confirmEveryAction ? t("toolApproval.pageBack") : void 0 : w(t("toolApproval.pageBack")),
|
|
13897
13897
|
async execute(e, { signal: t }) {
|
|
13898
13898
|
if (await xh(), $h(t), history.length <= 1) throw Error("There is no page before this one in this tab.");
|
|
13899
13899
|
return tg("Going back to the previous page.", () => history.back());
|
|
@@ -13915,12 +13915,12 @@ function ag(e, { t, pages: n = () => [], presence: r, refs: i = new Pp() }) {
|
|
|
13915
13915
|
let r = String(n.url ?? ""), i = E(r);
|
|
13916
13916
|
if (!i && rg(r) && !ae(r)) {
|
|
13917
13917
|
let e = [...O().entries()];
|
|
13918
|
-
return
|
|
13918
|
+
return w({
|
|
13919
13919
|
question: t("toolApproval.pageNavigateUnknown", { url: Xh(r) }),
|
|
13920
13920
|
refusal: `The user did not let you open ${Xh(r)}, an address the page does not show. Open one of these instead, or click through the site's menus:\n${oe(e, ng)}`
|
|
13921
13921
|
});
|
|
13922
13922
|
}
|
|
13923
|
-
return i &&
|
|
13923
|
+
return i && C(i) ? w(t("toolApproval.pageNavigate", { url: r })) : e.confirmEveryAction ? t("toolApproval.pageNavigate", { url: r }) : void 0;
|
|
13924
13924
|
},
|
|
13925
13925
|
async execute(e, { signal: t }) {
|
|
13926
13926
|
await xh(), $h(t);
|
|
@@ -13955,7 +13955,7 @@ function ag(e, { t, pages: n = () => [], presence: r, refs: i = new Pp() }) {
|
|
|
13955
13955
|
};
|
|
13956
13956
|
}
|
|
13957
13957
|
if (a?.drop(), o) {
|
|
13958
|
-
let e =
|
|
13958
|
+
let e = T();
|
|
13959
13959
|
return qh(`Opened ${r}: the page is now "${document.title}". Now:\n${e.text}${e.truncated ? "\n[The page goes on: page_snapshot for the rest.]" : ""}`);
|
|
13960
13960
|
}
|
|
13961
13961
|
return tg(`Opening ${r}.`, () => location.replace(n.href));
|
|
@@ -15155,10 +15155,13 @@ B(), U();
|
|
|
15155
15155
|
function xv() {
|
|
15156
15156
|
return {
|
|
15157
15157
|
id: "anonymous-reauth",
|
|
15158
|
-
getActions: (e) => ({
|
|
15159
|
-
|
|
15160
|
-
|
|
15161
|
-
|
|
15158
|
+
getActions: (e) => ({
|
|
15159
|
+
signIn: { anonymousReauth: async (t) => e("/sign-in/anonymous-reauth", {
|
|
15160
|
+
method: "POST",
|
|
15161
|
+
body: t
|
|
15162
|
+
}) },
|
|
15163
|
+
anonymousReauth: { proof: async () => e("/anonymous-reauth/proof", { method: "GET" }) }
|
|
15164
|
+
}),
|
|
15162
15165
|
pathMethods: { "/sign-in/anonymous-reauth": "POST" }
|
|
15163
15166
|
};
|
|
15164
15167
|
}
|
|
@@ -15253,82 +15256,96 @@ function Av(e = {}) {
|
|
|
15253
15256
|
isAnonymous: !!t.isAnonymous
|
|
15254
15257
|
}), !t && n && e.onSignedOut?.();
|
|
15255
15258
|
});
|
|
15256
|
-
|
|
15257
|
-
|
|
15258
|
-
|
|
15259
|
+
let m = /* @__PURE__ */ new Set();
|
|
15260
|
+
function h(t) {
|
|
15261
|
+
return pv(e.cookieName).startsWith(`${t}.`);
|
|
15262
|
+
}
|
|
15263
|
+
async function g(t) {
|
|
15264
|
+
if (!m.has(t)) {
|
|
15265
|
+
m.add(t);
|
|
15266
|
+
try {
|
|
15267
|
+
let { data: n } = await a.anonymousReauth.proof();
|
|
15268
|
+
n?.proof?.startsWith(`${t}.`) && fv(n.proof, e.cookieName);
|
|
15269
|
+
} catch {}
|
|
15270
|
+
}
|
|
15259
15271
|
}
|
|
15260
|
-
async function
|
|
15272
|
+
async function _() {
|
|
15273
|
+
let { data: e } = await a.signIn.anonymous();
|
|
15274
|
+
e?.token && (r.value = e.token, e.user?.id && await g(e.user.id));
|
|
15275
|
+
}
|
|
15276
|
+
async function v() {
|
|
15261
15277
|
let t = pv(e.cookieName);
|
|
15262
15278
|
if (!t) return !1;
|
|
15279
|
+
if (!t.includes(".")) return mv(e.cookieName), !1;
|
|
15263
15280
|
try {
|
|
15264
|
-
let { data: e } = await a.signIn.anonymousReauth({
|
|
15281
|
+
let { data: e } = await a.signIn.anonymousReauth({ proof: t });
|
|
15265
15282
|
if (e?.token) return r.value = e.token, await o.value.refetch(), !0;
|
|
15266
15283
|
} catch {}
|
|
15267
15284
|
return !1;
|
|
15268
15285
|
}
|
|
15269
|
-
async function
|
|
15270
|
-
await
|
|
15286
|
+
async function y() {
|
|
15287
|
+
await v() || await _();
|
|
15271
15288
|
}
|
|
15272
|
-
async function
|
|
15273
|
-
u.value === t && (e.onExternalAuthExpired?.(), !e.awaitExternalToken && (
|
|
15289
|
+
async function b(t) {
|
|
15290
|
+
u.value === t && (e.onExternalAuthExpired?.(), !e.awaitExternalToken && (w(void 0), await y()));
|
|
15274
15291
|
}
|
|
15275
|
-
let
|
|
15276
|
-
function
|
|
15277
|
-
return
|
|
15292
|
+
let x, S, C;
|
|
15293
|
+
function ee() {
|
|
15294
|
+
return S === r.value ? x : void 0;
|
|
15278
15295
|
}
|
|
15279
|
-
function
|
|
15280
|
-
|
|
15296
|
+
function w(t) {
|
|
15297
|
+
x = t, S = t ? r.value : void 0, clearTimeout(C), C = void 0;
|
|
15281
15298
|
let n = t ? Ev(t)?.exp : void 0, i = typeof n == "number" ? Tv(n) : void 0;
|
|
15282
|
-
i !== void 0 && e.onExternalTokenExpiring && (
|
|
15283
|
-
|
|
15299
|
+
i !== void 0 && e.onExternalTokenExpiring && (C = setTimeout(() => {
|
|
15300
|
+
ee() === t && e.onExternalTokenExpiring?.();
|
|
15284
15301
|
}, i));
|
|
15285
15302
|
}
|
|
15286
|
-
_e() && je(() => clearTimeout(
|
|
15287
|
-
async function
|
|
15303
|
+
_e() && je(() => clearTimeout(C));
|
|
15304
|
+
async function te(e) {
|
|
15288
15305
|
try {
|
|
15289
15306
|
let { error: t } = await a.externalToken.refresh({ token: e });
|
|
15290
|
-
return !t && (u.value === e &&
|
|
15307
|
+
return !t && (u.value === e && w(e), !0);
|
|
15291
15308
|
} catch {
|
|
15292
15309
|
return !1;
|
|
15293
15310
|
}
|
|
15294
15311
|
}
|
|
15295
|
-
async function
|
|
15312
|
+
async function T(e) {
|
|
15296
15313
|
s.value = !0;
|
|
15297
15314
|
try {
|
|
15298
|
-
let t =
|
|
15299
|
-
if (o.value.data && t && Dv(t, e) && (await
|
|
15315
|
+
let t = ee();
|
|
15316
|
+
if (o.value.data && t && Dv(t, e) && (await te(e) || u.value !== e)) return;
|
|
15300
15317
|
let { data: n } = await a.signIn.externalToken({ token: e });
|
|
15301
15318
|
if (u.value !== e) return;
|
|
15302
15319
|
if (n?.token) {
|
|
15303
|
-
r.value = n.token,
|
|
15320
|
+
r.value = n.token, w(e), await o.value.refetch();
|
|
15304
15321
|
return;
|
|
15305
15322
|
}
|
|
15306
|
-
await
|
|
15323
|
+
await b(e);
|
|
15307
15324
|
} catch {
|
|
15308
|
-
await
|
|
15325
|
+
await b(e);
|
|
15309
15326
|
} finally {
|
|
15310
15327
|
s.value = !1;
|
|
15311
15328
|
}
|
|
15312
15329
|
}
|
|
15313
|
-
let
|
|
15314
|
-
async function
|
|
15315
|
-
if (e &&
|
|
15316
|
-
u.value = e,
|
|
15330
|
+
let ne, re, ie = !1;
|
|
15331
|
+
async function E(e) {
|
|
15332
|
+
if (e && ne !== e) {
|
|
15333
|
+
u.value = e, re = e, ne = e;
|
|
15317
15334
|
try {
|
|
15318
15335
|
await p(async () => {
|
|
15319
|
-
u.value === e && await
|
|
15336
|
+
u.value === e && await T(e);
|
|
15320
15337
|
});
|
|
15321
15338
|
} finally {
|
|
15322
|
-
|
|
15339
|
+
ne = void 0;
|
|
15323
15340
|
}
|
|
15324
15341
|
}
|
|
15325
15342
|
}
|
|
15326
|
-
async function
|
|
15343
|
+
async function D() {
|
|
15327
15344
|
s.value || await p(async () => {
|
|
15328
15345
|
if (!(u.value || n.value)) {
|
|
15329
15346
|
s.value = !0;
|
|
15330
15347
|
try {
|
|
15331
|
-
await
|
|
15348
|
+
await y();
|
|
15332
15349
|
} finally {
|
|
15333
15350
|
s.value = !1;
|
|
15334
15351
|
}
|
|
@@ -15340,53 +15357,53 @@ function Av(e = {}) {
|
|
|
15340
15357
|
if (!r.isPending && !r.isRefetching && !s.value && !r.data) {
|
|
15341
15358
|
if (n.value) return;
|
|
15342
15359
|
if (u.value) {
|
|
15343
|
-
|
|
15360
|
+
E(u.value);
|
|
15344
15361
|
return;
|
|
15345
15362
|
}
|
|
15346
15363
|
if (e.awaitExternalToken) return;
|
|
15347
|
-
|
|
15364
|
+
D();
|
|
15348
15365
|
return;
|
|
15349
15366
|
}
|
|
15350
15367
|
let i = r.data?.user;
|
|
15351
15368
|
if (n.value) return;
|
|
15352
|
-
if (r.data?.session?.hardExpiresAt && !
|
|
15353
|
-
if (
|
|
15354
|
-
|
|
15369
|
+
if (r.data?.session?.hardExpiresAt && !ie) {
|
|
15370
|
+
if (ie = !0, !u.value) {
|
|
15371
|
+
me();
|
|
15355
15372
|
return;
|
|
15356
15373
|
}
|
|
15357
|
-
if (
|
|
15358
|
-
|
|
15374
|
+
if (re !== u.value) {
|
|
15375
|
+
E(u.value);
|
|
15359
15376
|
return;
|
|
15360
15377
|
}
|
|
15361
15378
|
}
|
|
15362
|
-
let a =
|
|
15363
|
-
i && !i.isAnonymous && a && u.value && u.value !== a &&
|
|
15379
|
+
let a = ee();
|
|
15380
|
+
i && !i.isAnonymous && a && u.value && u.value !== a && re !== u.value || i?.isAnonymous && u.value && re !== u.value ? E(u.value) : i?.isAnonymous && i.id && !h(i.id) && g(i.id);
|
|
15364
15381
|
}, { immediate: !0 }), A(n, () => {
|
|
15365
15382
|
o.value.refetch();
|
|
15366
15383
|
}), A(c, (e, t) => {
|
|
15367
|
-
e ? (u.value = e, l.value &&
|
|
15384
|
+
e ? (u.value = e, l.value && E(e)) : t && u.value === t && me();
|
|
15368
15385
|
});
|
|
15369
|
-
function
|
|
15370
|
-
t.status === 401 && (n.value ? o.value.refetch() : u.value ?
|
|
15386
|
+
function O(t) {
|
|
15387
|
+
t.status === 401 && (n.value ? o.value.refetch() : u.value ? E(u.value) : e.awaitExternalToken || D());
|
|
15371
15388
|
}
|
|
15372
|
-
let
|
|
15373
|
-
async function
|
|
15389
|
+
let ae = z(() => o.value.data?.user?.id), oe = R();
|
|
15390
|
+
async function k(t, n, i) {
|
|
15374
15391
|
let o = await a.signIn.email({
|
|
15375
15392
|
email: t,
|
|
15376
15393
|
password: n,
|
|
15377
15394
|
rememberMe: i
|
|
15378
15395
|
}), s = o.data;
|
|
15379
|
-
return s?.twoFactorRedirect ? (
|
|
15396
|
+
return s?.twoFactorRedirect ? (oe.value = s.twoFactorToken ? {
|
|
15380
15397
|
token: s.twoFactorToken,
|
|
15381
15398
|
methods: s.twoFactorMethods ?? []
|
|
15382
|
-
} : void 0,
|
|
15399
|
+
} : void 0, o) : (o.data?.token && (r.value = o.data.token, mv(e.cookieName)), o);
|
|
15383
15400
|
}
|
|
15384
|
-
let
|
|
15401
|
+
let se = {
|
|
15385
15402
|
totp: "/two-factor/verify-totp",
|
|
15386
15403
|
otp: "/two-factor/verify-otp",
|
|
15387
15404
|
backup: "/two-factor/verify-backup-code"
|
|
15388
15405
|
};
|
|
15389
|
-
function
|
|
15406
|
+
function ce(e) {
|
|
15390
15407
|
return {
|
|
15391
15408
|
method: "POST",
|
|
15392
15409
|
headers: { "x-two-factor-token": e.token },
|
|
@@ -15396,58 +15413,58 @@ function Av(e = {}) {
|
|
|
15396
15413
|
}
|
|
15397
15414
|
};
|
|
15398
15415
|
}
|
|
15399
|
-
let
|
|
15416
|
+
let le = {
|
|
15400
15417
|
data: null,
|
|
15401
15418
|
error: {
|
|
15402
15419
|
code: "INVALID_TWO_FACTOR_COOKIE",
|
|
15403
15420
|
message: void 0
|
|
15404
15421
|
}
|
|
15405
15422
|
};
|
|
15406
|
-
async function
|
|
15407
|
-
let
|
|
15408
|
-
if (!
|
|
15409
|
-
let
|
|
15410
|
-
...
|
|
15411
|
-
body: { code:
|
|
15423
|
+
async function ue(t, n) {
|
|
15424
|
+
let i = oe.value;
|
|
15425
|
+
if (!i) return le;
|
|
15426
|
+
let o = await a.$fetch(se[t], {
|
|
15427
|
+
...ce(i),
|
|
15428
|
+
body: { code: n }
|
|
15412
15429
|
});
|
|
15413
|
-
return
|
|
15430
|
+
return o.data?.token && (r.value = o.data.token, oe.value = void 0, mv(e.cookieName)), o;
|
|
15414
15431
|
}
|
|
15415
|
-
async function
|
|
15416
|
-
let e =
|
|
15417
|
-
return e ? a.$fetch("/two-factor/send-otp",
|
|
15432
|
+
async function de() {
|
|
15433
|
+
let e = oe.value;
|
|
15434
|
+
return e ? a.$fetch("/two-factor/send-otp", ce(e)) : le;
|
|
15418
15435
|
}
|
|
15419
|
-
function
|
|
15420
|
-
|
|
15436
|
+
function fe() {
|
|
15437
|
+
oe.value = void 0;
|
|
15421
15438
|
}
|
|
15422
|
-
function
|
|
15439
|
+
function j(e) {
|
|
15423
15440
|
return a.signUp.email(e);
|
|
15424
15441
|
}
|
|
15425
|
-
function
|
|
15442
|
+
function pe(e, t) {
|
|
15426
15443
|
return a.requestPasswordReset({
|
|
15427
15444
|
email: e,
|
|
15428
15445
|
redirectTo: t
|
|
15429
15446
|
});
|
|
15430
15447
|
}
|
|
15431
|
-
async function
|
|
15448
|
+
async function N(t, n) {
|
|
15432
15449
|
let i = e.baseUrl ?? "https://ai-api.8wave.it", a = e.basePath ?? "auth", s = kv(), c = new URL(`${i}/${a}/oauth-popup/start`);
|
|
15433
15450
|
c.searchParams.set("provider", t), c.searchParams.set("popupOrigin", window.location.origin), c.searchParams.set("popupNonce", s);
|
|
15434
15451
|
let l = window.open(c.toString(), "eightwave-oauth", "width=600,height=700,menubar=no,toolbar=no");
|
|
15435
|
-
return l ? new Promise((
|
|
15436
|
-
let
|
|
15437
|
-
l?.closed &&
|
|
15452
|
+
return l ? new Promise((e) => {
|
|
15453
|
+
let t = new URL(i).origin, a = setInterval(() => {
|
|
15454
|
+
l?.closed && c();
|
|
15438
15455
|
}, 500);
|
|
15439
|
-
function
|
|
15440
|
-
window.removeEventListener("message",
|
|
15456
|
+
function c() {
|
|
15457
|
+
window.removeEventListener("message", u), clearInterval(a), e({ popupBlocked: !1 });
|
|
15441
15458
|
}
|
|
15442
|
-
function
|
|
15443
|
-
|
|
15459
|
+
function u(e) {
|
|
15460
|
+
e.origin === t && e.source === l && e.data?.type === Ov && e.data.nonce === s && (l?.close(), typeof e.data.token == "string" && e.data.token && (r.value = e.data.token, o.value.refetch().then(() => n?.())), c());
|
|
15444
15461
|
}
|
|
15445
|
-
window.addEventListener("message",
|
|
15462
|
+
window.addEventListener("message", u);
|
|
15446
15463
|
}) : { popupBlocked: !0 };
|
|
15447
15464
|
}
|
|
15448
|
-
async function
|
|
15465
|
+
async function me() {
|
|
15449
15466
|
if (n.value) return;
|
|
15450
|
-
u.value = void 0,
|
|
15467
|
+
u.value = void 0, w(void 0);
|
|
15451
15468
|
let e = r.value;
|
|
15452
15469
|
try {
|
|
15453
15470
|
await a.signOut();
|
|
@@ -15462,26 +15479,26 @@ function Av(e = {}) {
|
|
|
15462
15479
|
isExternalAuth: d,
|
|
15463
15480
|
token: r,
|
|
15464
15481
|
headers: i,
|
|
15465
|
-
onError:
|
|
15466
|
-
userId:
|
|
15467
|
-
signInWithEmail:
|
|
15468
|
-
twoFactorChallenge:
|
|
15469
|
-
verifyTwoFactor:
|
|
15470
|
-
sendTwoFactorCode:
|
|
15471
|
-
cancelTwoFactor:
|
|
15472
|
-
signUpWithEmail:
|
|
15473
|
-
requestPasswordReset:
|
|
15482
|
+
onError: O,
|
|
15483
|
+
userId: ae,
|
|
15484
|
+
signInWithEmail: k,
|
|
15485
|
+
twoFactorChallenge: oe,
|
|
15486
|
+
verifyTwoFactor: ue,
|
|
15487
|
+
sendTwoFactorCode: de,
|
|
15488
|
+
cancelTwoFactor: fe,
|
|
15489
|
+
signUpWithEmail: j,
|
|
15490
|
+
requestPasswordReset: pe,
|
|
15474
15491
|
signInSocial: a.signIn.social,
|
|
15475
|
-
signInWithSocialPopup:
|
|
15476
|
-
signInWithExternalToken:
|
|
15477
|
-
signOut:
|
|
15492
|
+
signInWithSocialPopup: N,
|
|
15493
|
+
signInWithExternalToken: E,
|
|
15494
|
+
signOut: me
|
|
15478
15495
|
};
|
|
15479
15496
|
}
|
|
15480
15497
|
// src/composables/useChatbotStoreSync.ts
|
|
15481
15498
|
B();
|
|
15482
15499
|
function jv(e) {
|
|
15483
15500
|
let t = ap(e.agentId);
|
|
15484
|
-
return
|
|
15501
|
+
return ee(() => {
|
|
15485
15502
|
t.baseUrl = e.baseUrl, t.headers = e.headers.value, t.userId = e.userId.value;
|
|
15486
15503
|
}), t;
|
|
15487
15504
|
}
|
|
@@ -15531,7 +15548,7 @@ function Pv(e) {
|
|
|
15531
15548
|
organizationId: t.value.organizationId,
|
|
15532
15549
|
interface: t.value.interface
|
|
15533
15550
|
} : n.value);
|
|
15534
|
-
return
|
|
15551
|
+
return te(Mv, Nv({
|
|
15535
15552
|
session: i,
|
|
15536
15553
|
signOut: a,
|
|
15537
15554
|
canSignIn: c,
|
|
@@ -15798,7 +15815,7 @@ var Kv = {
|
|
|
15798
15815
|
mainColor: t.mainColor,
|
|
15799
15816
|
tones: t.tones,
|
|
15800
15817
|
secondColor: t.secondColor
|
|
15801
|
-
}), s && !i.value && a.value && (s.uniform3f(h, ...b(a.value.first)), s.uniform3f(g, ...b(a.value.second)), s.uniform1f(_, +!!a.value.duo),
|
|
15818
|
+
}), s && !i.value && a.value && (s.uniform3f(h, ...b(a.value.first)), s.uniform3f(g, ...b(a.value.second)), s.uniform1f(_, +!!a.value.duo), ee(C() ? 10 : void 0)));
|
|
15802
15819
|
};
|
|
15803
15820
|
A([
|
|
15804
15821
|
() => t.mainColor,
|
|
@@ -15816,11 +15833,11 @@ var Kv = {
|
|
|
15816
15833
|
let u = Number.parseFloat(getComputedStyle(r.value).getPropertyValue("--aurora-spread"));
|
|
15817
15834
|
s.uniform1f(m, Number.isNaN(u) ? 1 : u);
|
|
15818
15835
|
}
|
|
15819
|
-
|
|
15820
|
-
},
|
|
15836
|
+
ee(C() ? 10 : void 0);
|
|
15837
|
+
}, C = () => window.matchMedia("(prefers-reduced-motion: reduce)").matches, ee = (e) => {
|
|
15821
15838
|
s && r.value && (s.uniform1f(u, e ?? (performance.now() - v) / 1e3), s.uniform2f(d, r.value.width, r.value.height), s.drawArrays(s.TRIANGLE_STRIP, 0, 4));
|
|
15822
|
-
},
|
|
15823
|
-
|
|
15839
|
+
}, w = () => {
|
|
15840
|
+
ee(), c = requestAnimationFrame(w);
|
|
15824
15841
|
};
|
|
15825
15842
|
return se(() => {
|
|
15826
15843
|
let e = r.value;
|
|
@@ -15846,7 +15863,7 @@ var Kv = {
|
|
|
15846
15863
|
1
|
|
15847
15864
|
]), s.STATIC_DRAW);
|
|
15848
15865
|
let v = s.getAttribLocation(o, "a_position");
|
|
15849
|
-
s.enableVertexAttribArray(v), s.vertexAttribPointer(v, 2, s.FLOAT, !1, 0, 0), u = s.getUniformLocation(o, "u_time"), d = s.getUniformLocation(o, "u_resolution"), f = s.getUniformLocation(o, "u_center"), p = s.getUniformLocation(o, "u_half"), m = s.getUniformLocation(o, "u_spread"), h = s.getUniformLocation(o, "u_color"), g = s.getUniformLocation(o, "u_color2"), _ = s.getUniformLocation(o, "u_duo"), x(), l = new ResizeObserver(S), l.observe(e), S(), O(S),
|
|
15866
|
+
s.enableVertexAttribArray(v), s.vertexAttribPointer(v, 2, s.FLOAT, !1, 0, 0), u = s.getUniformLocation(o, "u_time"), d = s.getUniformLocation(o, "u_resolution"), f = s.getUniformLocation(o, "u_center"), p = s.getUniformLocation(o, "u_half"), m = s.getUniformLocation(o, "u_spread"), h = s.getUniformLocation(o, "u_color"), g = s.getUniformLocation(o, "u_color2"), _ = s.getUniformLocation(o, "u_duo"), x(), l = new ResizeObserver(S), l.observe(e), S(), O(S), C() ? ee(10) : w();
|
|
15850
15867
|
}), oe(() => {
|
|
15851
15868
|
cancelAnimationFrame(c), l?.disconnect();
|
|
15852
15869
|
}), fe(() => {
|
|
@@ -16165,27 +16182,27 @@ var Ty = ["datetime"], Ey = 6e4, Dy = /* @__PURE__ */ q({
|
|
|
16165
16182
|
// ../../packages/components/src/chat/toolComponentMap.ts
|
|
16166
16183
|
B();
|
|
16167
16184
|
var Oy = {
|
|
16168
|
-
requestOAuthConnection:
|
|
16169
|
-
shareDocument:
|
|
16170
|
-
showArtifact:
|
|
16171
|
-
showCalendarEvent:
|
|
16172
|
-
showChart:
|
|
16173
|
-
showComparison:
|
|
16174
|
-
showContactForm:
|
|
16175
|
-
showDiagram:
|
|
16176
|
-
showEmail:
|
|
16177
|
-
showImageGallery:
|
|
16178
|
-
showLocation:
|
|
16179
|
-
showMessage:
|
|
16180
|
-
showForm:
|
|
16181
|
-
showMultipleChoice:
|
|
16182
|
-
showProductList:
|
|
16183
|
-
showQrCode:
|
|
16184
|
-
showSources:
|
|
16185
|
-
showSuggestedReply:
|
|
16186
|
-
showVideo:
|
|
16187
|
-
showWeather:
|
|
16188
|
-
showWebPages:
|
|
16185
|
+
requestOAuthConnection: T(() => import("./_chunks/PkToolRequestOAuthConnection-JhdCcPGn.js")),
|
|
16186
|
+
shareDocument: T(() => import("./_chunks/PkToolShareDocument-Q41TPE8p.js")),
|
|
16187
|
+
showArtifact: T(() => import("./_chunks/PkToolShowArtifact-DkJaxkWI.js")),
|
|
16188
|
+
showCalendarEvent: T(() => import("./_chunks/PkToolShowCalendarEvent-DhvADvek.js")),
|
|
16189
|
+
showChart: T(() => import("./_chunks/PkToolShowChart-5epjmGHf.js")),
|
|
16190
|
+
showComparison: T(() => import("./_chunks/PkToolShowComparison-BURyhuOx.js")),
|
|
16191
|
+
showContactForm: T(() => import("./_chunks/PkToolShowContactForm-dLdK3POY.js")),
|
|
16192
|
+
showDiagram: T(() => import("./_chunks/PkToolShowDiagram-CzzrE7Mv.js")),
|
|
16193
|
+
showEmail: T(() => import("./_chunks/PkToolShowEmail-mGLOd6zf.js")),
|
|
16194
|
+
showImageGallery: T(() => import("./_chunks/PkToolShowImageGallery-g_2RBM8g.js")),
|
|
16195
|
+
showLocation: T(() => import("./_chunks/PkToolShowLocation-BYkY2CEF.js")),
|
|
16196
|
+
showMessage: T(() => import("./_chunks/PkToolShowMessage-CvxABht3.js")),
|
|
16197
|
+
showForm: T(() => import("./_chunks/PkToolShowForm-Ce0IzrxF.js")),
|
|
16198
|
+
showMultipleChoice: T(() => import("./_chunks/PkToolShowForm-Ce0IzrxF.js")),
|
|
16199
|
+
showProductList: T(() => import("./_chunks/PkToolShowProductList-B-fw08V_.js")),
|
|
16200
|
+
showQrCode: T(() => import("./_chunks/PkToolShowQrCode-DgnNA0rU.js")),
|
|
16201
|
+
showSources: T(() => import("./_chunks/PkToolShowSources-IgpsG650.js")),
|
|
16202
|
+
showSuggestedReply: T(() => import("./_chunks/PkToolShowSuggestedReply-DKKMLvpr.js")),
|
|
16203
|
+
showVideo: T(() => import("./_chunks/PkToolShowVideo-Dadpkgeb.js")),
|
|
16204
|
+
showWeather: T(() => import("./_chunks/PkToolShowWeather-CRbZYzFK.js")),
|
|
16205
|
+
showWebPages: T(() => import("./_chunks/PkToolShowWebPages-B7dYxtRc.js"))
|
|
16189
16206
|
};
|
|
16190
16207
|
// ../../packages/components/src/chat/PkToolApprovalPreviewMessage.vue?vue&type=script&setup=true&lang.ts
|
|
16191
16208
|
B(), N();
|
|
@@ -16770,7 +16787,7 @@ var Ab = {
|
|
|
16770
16787
|
isDark: { type: Boolean }
|
|
16771
16788
|
},
|
|
16772
16789
|
setup(e) {
|
|
16773
|
-
let t = e, { t: n, n: r } = Ve({ useScope: "global" }), i =
|
|
16790
|
+
let t = e, { t: n, n: r } = Ve({ useScope: "global" }), i = w(pn, void 0), a = w(ln, void 0), o = (e) => Zt(e) === "output-error" && "errorText" in e && typeof e.errorText == "string" ? e.errorText : void 0, s = z(() => {
|
|
16774
16791
|
let e = t.message.parts, r = t.message.metadata?.partTimings, s = [];
|
|
16775
16792
|
for (let [c, l] of e.entries()) {
|
|
16776
16793
|
let u = mn(l), d = Jt(l), f = Xt(l) || !!d;
|
|
@@ -16939,26 +16956,26 @@ function Xb(e) {
|
|
|
16939
16956
|
if (!t.value) return;
|
|
16940
16957
|
let { scrollTop: e, scrollHeight: n, clientHeight: r } = t.value;
|
|
16941
16958
|
u.value = n - r - e < Jb, d || (e < g && s?.(), e > g && (u.value && (l.value = !1), c?.())), g = e;
|
|
16942
|
-
},
|
|
16959
|
+
}, C = () => {
|
|
16943
16960
|
if (d || l.value || !t.value) return;
|
|
16944
16961
|
let e = t.value, n = e.scrollHeight - e.clientHeight;
|
|
16945
16962
|
n <= e.scrollTop || (u.value = !0, d = !0, e.scrollTop = n, requestAnimationFrame(() => {
|
|
16946
16963
|
d = !1;
|
|
16947
16964
|
}));
|
|
16948
|
-
},
|
|
16949
|
-
!f && t.value && (f = new MutationObserver(
|
|
16965
|
+
}, ee = () => {
|
|
16966
|
+
!f && t.value && (f = new MutationObserver(C), f.observe(t.value, {
|
|
16950
16967
|
childList: !0,
|
|
16951
16968
|
subtree: !0,
|
|
16952
16969
|
characterData: !0
|
|
16953
16970
|
}));
|
|
16954
|
-
},
|
|
16971
|
+
}, w = () => {
|
|
16955
16972
|
f?.disconnect(), f = null;
|
|
16956
16973
|
};
|
|
16957
16974
|
A(n, (e, t) => {
|
|
16958
|
-
e === "streaming" || e === "submitted" ?
|
|
16975
|
+
e === "streaming" || e === "submitted" ? ee() : (e !== "ready" || t !== "streaming") && w();
|
|
16959
16976
|
}), A(r, async () => {
|
|
16960
16977
|
if (r() && i() !== "assistant") {
|
|
16961
|
-
|
|
16978
|
+
ne(), l.value = !1, d = !0;
|
|
16962
16979
|
try {
|
|
16963
16980
|
await O(), await o?.(), await O();
|
|
16964
16981
|
} finally {
|
|
@@ -16966,23 +16983,23 @@ function Xb(e) {
|
|
|
16966
16983
|
}
|
|
16967
16984
|
}
|
|
16968
16985
|
});
|
|
16969
|
-
let
|
|
16970
|
-
t.value && (t.value.scrollHeight <= t.value.clientHeight || (t.value.scrollTop = t.value.scrollHeight,
|
|
16971
|
-
},
|
|
16972
|
-
p?.disconnect(), p = null, m?.disconnect(), m = null,
|
|
16986
|
+
let te = null, T = () => {
|
|
16987
|
+
t.value && (t.value.scrollHeight <= t.value.clientHeight || (t.value.scrollTop = t.value.scrollHeight, te && clearTimeout(te), te = setTimeout(ne, 300)));
|
|
16988
|
+
}, ne = () => {
|
|
16989
|
+
p?.disconnect(), p = null, m?.disconnect(), m = null, te &&= (clearTimeout(te), null);
|
|
16973
16990
|
};
|
|
16974
16991
|
return se(() => {
|
|
16975
16992
|
if (!t.value) return;
|
|
16976
16993
|
t.value.addEventListener("wheel", v, { passive: !0 }), t.value.addEventListener("touchstart", b, { passive: !0 }), t.value.addEventListener("touchmove", x, { passive: !0 });
|
|
16977
16994
|
let e = n() === "submitted" || n() === "streaming";
|
|
16978
|
-
e ?
|
|
16995
|
+
e ? ee() : (p = new ResizeObserver(T), p.observe(t.value), m = new MutationObserver(T), m.observe(t.value, {
|
|
16979
16996
|
childList: !0,
|
|
16980
16997
|
subtree: !0
|
|
16981
16998
|
}));
|
|
16982
16999
|
let r = a?.() ?? t.value.firstElementChild;
|
|
16983
|
-
r && (h = new ResizeObserver(
|
|
17000
|
+
r && (h = new ResizeObserver(C), h.observe(r)), e || T();
|
|
16984
17001
|
}), oe(() => {
|
|
16985
|
-
t.value?.removeEventListener("wheel", v), t.value?.removeEventListener("touchstart", b), t.value?.removeEventListener("touchmove", x), h?.disconnect(), h = null,
|
|
17002
|
+
t.value?.removeEventListener("wheel", v), t.value?.removeEventListener("touchstart", b), t.value?.removeEventListener("touchmove", x), h?.disconnect(), h = null, w(), ne();
|
|
16986
17003
|
}), {
|
|
16987
17004
|
handleScroll: S,
|
|
16988
17005
|
scrollToBottom: _,
|
|
@@ -17100,7 +17117,7 @@ var Qb = ["aria-busy"], $b = {
|
|
|
17100
17117
|
"host-confirm-respond"
|
|
17101
17118
|
],
|
|
17102
17119
|
setup(e, { emit: t }) {
|
|
17103
|
-
let n = e, r = t, { t: i, te: a, d: o, n: s } = Ve({ useScope: "global" }), c =
|
|
17120
|
+
let n = e, r = t, { t: i, te: a, d: o, n: s } = Ve({ useScope: "global" }), c = w(pn, void 0), l = w(ln, void 0), u = (e) => {
|
|
17104
17121
|
let t = e.toolCallId;
|
|
17105
17122
|
return typeof t == "string" ? l?.value[t]?.details : void 0;
|
|
17106
17123
|
}, d = ge(), f = (e, t) => {
|
|
@@ -17133,26 +17150,26 @@ var Qb = ["aria-busy"], $b = {
|
|
|
17133
17150
|
}, x = z(() => (n.messages ?? []).filter((e) => e.role === "user" && !Mi(e)).map((e) => ({
|
|
17134
17151
|
id: e.id,
|
|
17135
17152
|
preview: e.parts.find(an)?.text.trim().slice(0, 120) || "…"
|
|
17136
|
-
}))), S = R(),
|
|
17153
|
+
}))), S = R(), C = () => p.value?.querySelectorAll(".pk-chatbot-message--user") ?? [], ee = () => {
|
|
17137
17154
|
let e = p.value;
|
|
17138
17155
|
if (!e || !n.showScrollToBottom) return;
|
|
17139
17156
|
let t = e.getBoundingClientRect().top + e.clientHeight / 2, r = x.value[0]?.id;
|
|
17140
|
-
|
|
17157
|
+
C().forEach((e, n) => {
|
|
17141
17158
|
e.getBoundingClientRect().top <= t && (r = x.value[n]?.id);
|
|
17142
17159
|
}), S.value = r;
|
|
17143
17160
|
};
|
|
17144
17161
|
A(x, async () => {
|
|
17145
|
-
await O(),
|
|
17162
|
+
await O(), ee();
|
|
17146
17163
|
});
|
|
17147
|
-
let
|
|
17148
|
-
g(),
|
|
17149
|
-
},
|
|
17150
|
-
let t = p.value, n = x.value.findIndex((t) => t.id === e), r =
|
|
17164
|
+
let te = () => {
|
|
17165
|
+
g(), ee();
|
|
17166
|
+
}, T = (e) => {
|
|
17167
|
+
let t = p.value, n = x.value.findIndex((t) => t.id === e), r = C()[n];
|
|
17151
17168
|
t && r && (v.value = !0, t.scrollTo({
|
|
17152
17169
|
top: t.scrollTop + r.getBoundingClientRect().top - t.getBoundingClientRect().top - Number.parseFloat(getComputedStyle(t).paddingTop),
|
|
17153
17170
|
behavior: "smooth"
|
|
17154
17171
|
}));
|
|
17155
|
-
},
|
|
17172
|
+
}, ne = z(() => n.status === "submitted" || n.status === "streaming" || n.hostWorking === !0), re = R(0), ie = R(!1), E = !1, oe = Ie(), k = () => n.messages?.[n.messages.length - 1]?.role === "user" || ne.value, ce = () => {
|
|
17156
17173
|
E = !1, ie.value = !0, re.value = 0;
|
|
17157
17174
|
}, le = async () => {
|
|
17158
17175
|
if (!n.messages?.length || n.disableHeightAdjustment) return;
|
|
@@ -17161,7 +17178,7 @@ var Qb = ["aria-busy"], $b = {
|
|
|
17161
17178
|
return;
|
|
17162
17179
|
}
|
|
17163
17180
|
if (E = !0, ie.value = !1, await O(), !p.value) return;
|
|
17164
|
-
let { paddingTop: e, paddingBottom: t } = getComputedStyle(p.value), r = p.value.clientHeight - Number.parseFloat(e) - Number.parseFloat(t), i = m.value && Number.parseFloat(getComputedStyle(m.value).rowGap) || 0, a =
|
|
17181
|
+
let { paddingTop: e, paddingBottom: t } = getComputedStyle(p.value), r = p.value.clientHeight - Number.parseFloat(e) - Number.parseFloat(t), i = m.value && Number.parseFloat(getComputedStyle(m.value).rowGap) || 0, a = C();
|
|
17165
17182
|
oe.value = a[a.length - 1];
|
|
17166
17183
|
let o = r - (oe.value?.clientHeight ?? 0) - i;
|
|
17167
17184
|
r > 0 && (re.value = Math.max(o, 0)), await O();
|
|
@@ -17169,8 +17186,8 @@ var Qb = ["aria-busy"], $b = {
|
|
|
17169
17186
|
A([() => n.messages?.length, () => n.messages?.[n.messages.length - 1]?.id], () => le()), jn([p, oe], () => {
|
|
17170
17187
|
E && le();
|
|
17171
17188
|
}), se(() => {
|
|
17172
|
-
(
|
|
17173
|
-
}), A(
|
|
17189
|
+
(ne.value || n.awaitingSpokenAnswer) && le();
|
|
17190
|
+
}), A(ne, (e) => {
|
|
17174
17191
|
e || ce();
|
|
17175
17192
|
});
|
|
17176
17193
|
let fe = (e) => n.revisedAnswers?.some((t) => t.messageId === e), M = (e) => n.messageFeedbacks?.find((t) => t.messageId === e), pe = /* @__PURE__ */ new Set([
|
|
@@ -17211,7 +17228,7 @@ var Qb = ["aria-busy"], $b = {
|
|
|
17211
17228
|
let e = /* @__PURE__ */ new Map();
|
|
17212
17229
|
for (let t of n.messages ?? []) t.role === "assistant" && e.set(t.id, It($t(Pt(t.parts))));
|
|
17213
17230
|
return e;
|
|
17214
|
-
}), Oe = (e) => De.value.get(e.id) ?? e.parts, ke = z(() => n.status === "error"), U = z(() => n.awaitingSpokenAnswer === !0 && !
|
|
17231
|
+
}), Oe = (e) => De.value.get(e.id) ?? e.parts, ke = z(() => n.status === "error"), U = z(() => n.awaitingSpokenAnswer === !0 && !ne.value), Ae = z(() => U.value && Ee.value?.role === "user" && !ke.value), je = (e, t) => t(), Me = z(() => {
|
|
17215
17232
|
let e = H.value;
|
|
17216
17233
|
return jt(i, e, c?.value);
|
|
17217
17234
|
}), Ne = z(() => {
|
|
@@ -17220,7 +17237,7 @@ var Qb = ["aria-busy"], $b = {
|
|
|
17220
17237
|
}), Pe = (e) => n.messages?.findIndex((t) => t.id === e), Fe = (e) => e === void 0 || !n.messages ? !1 : e === n.messages.length - 1, q = (e) => Fe(e) && n.status === "ready" && !n.hostWorking && !!n.actions?.includes("regenerate"), Re = (e, t) => (!Fe(t) || n.status === "ready" && !n.hostWorking) && !!n.actions?.includes(e), ze = (e) => {
|
|
17221
17238
|
let t = e.parts[e.parts.length - 1];
|
|
17222
17239
|
return an(t);
|
|
17223
|
-
}, Be = (e) => e.parts.some((e) => mn(e) || Xt(e) || !!Jt(e)), He = (e) => !!n.showExtendedSteps && Ze(e) && Be(e), Ue = (e) => n.hostConfirmation !== void 0 && Jt(e) !== void 0 && e.toolCallId === n.hostConfirmation.toolCallId, We = z(() => n.hostConfirmation !== void 0 && !n.messages?.some((e) => e.parts.some(Ue))), Ge = (e, t) =>
|
|
17240
|
+
}, Be = (e) => e.parts.some((e) => mn(e) || Xt(e) || !!Jt(e)), He = (e) => !!n.showExtendedSteps && Ze(e) && Be(e), Ue = (e) => n.hostConfirmation !== void 0 && Jt(e) !== void 0 && e.toolCallId === n.hostConfirmation.toolCallId, We = z(() => n.hostConfirmation !== void 0 && !n.messages?.some((e) => e.parts.some(Ue))), Ge = (e, t) => ne.value && Fe(e) && Jt(t)?.state === "input-available", qe = (e, t, n, r) => {
|
|
17224
17241
|
if (!Jt(n) || He(e)) return !1;
|
|
17225
17242
|
let i = Ge(t, n);
|
|
17226
17243
|
return i && r === Oe(e).length - 1 ? !1 : i || kt(n) || !gn(e);
|
|
@@ -17250,7 +17267,7 @@ var Qb = ["aria-busy"], $b = {
|
|
|
17250
17267
|
block: "center"
|
|
17251
17268
|
}));
|
|
17252
17269
|
}), (t, n) => {
|
|
17253
|
-
let l = Bn, g = In, _ = Hn,
|
|
17270
|
+
let l = Bn, g = In, _ = Hn, C = Pn;
|
|
17254
17271
|
return X(), Y("div", {
|
|
17255
17272
|
ref_key: "scrollEl",
|
|
17256
17273
|
ref: p,
|
|
@@ -17261,17 +17278,17 @@ var Qb = ["aria-busy"], $b = {
|
|
|
17261
17278
|
role: "log",
|
|
17262
17279
|
"aria-live": "polite",
|
|
17263
17280
|
"aria-relevant": "additions text",
|
|
17264
|
-
"aria-busy":
|
|
17281
|
+
"aria-busy": ne.value,
|
|
17265
17282
|
style: ue({
|
|
17266
17283
|
"--chatbot-main-color": e.mainColor,
|
|
17267
17284
|
"--chatbot-contrast-color": h.value
|
|
17268
17285
|
}),
|
|
17269
|
-
onScroll:
|
|
17286
|
+
onScroll: te
|
|
17270
17287
|
}, [
|
|
17271
17288
|
e.showScrollToBottom && x.value.length > 1 ? (X(), Y("div", $b, [j(qb, {
|
|
17272
17289
|
items: x.value,
|
|
17273
17290
|
"active-id": S.value,
|
|
17274
|
-
onSelect:
|
|
17291
|
+
onSelect: T
|
|
17275
17292
|
}, null, 8, ["items", "active-id"])])) : K("", !0),
|
|
17276
17293
|
L("div", {
|
|
17277
17294
|
ref_key: "wrapperEl",
|
|
@@ -17294,9 +17311,9 @@ var Qb = ["aria-busy"], $b = {
|
|
|
17294
17311
|
name: "ri:alarm-line",
|
|
17295
17312
|
class: "shrink-0"
|
|
17296
17313
|
}), L("span", null, [Le(V(J(i)("label.wakeupCheck")) + " ", 1), p.metadata?.createdAt ? (X(), Y(I, { key: 0 }, [Le(" · " + V(J(o)(p.metadata.createdAt, "time")), 1)], 64)) : K("", !0)])], 8, rx)) : K("", !0),
|
|
17297
|
-
(!J(Mi)(p) || e.showAllMessageParts) && (!rt.value.hidden.has(p.id) ||
|
|
17314
|
+
(!J(Mi)(p) || e.showAllMessageParts) && (!rt.value.hidden.has(p.id) || ne.value && Fe(m)) && (p.parts.length || Fe(m) && ne.value && Ze(p)) ? (X(), Y("div", {
|
|
17298
17315
|
key: 3,
|
|
17299
|
-
class: D(["pk-chatbot-message", [`pk-chatbot-message--${p.role}`, { "pk-chatbot-message--loading":
|
|
17316
|
+
class: D(["pk-chatbot-message", [`pk-chatbot-message--${p.role}`, { "pk-chatbot-message--loading": ne.value && Fe(m) && Ze(p) }]]),
|
|
17300
17317
|
style: ue({ minHeight: Fe(m) && Ze(p) && !ke.value ? `${re.value}px` : void 0 })
|
|
17301
17318
|
}, [
|
|
17302
17319
|
j(W, {
|
|
@@ -17306,7 +17323,7 @@ var Qb = ["aria-busy"], $b = {
|
|
|
17306
17323
|
default: G(() => [He(p) ? (X(), F(Hb, {
|
|
17307
17324
|
key: 0,
|
|
17308
17325
|
message: p,
|
|
17309
|
-
"is-streaming":
|
|
17326
|
+
"is-streaming": ne.value && Fe(m),
|
|
17310
17327
|
"has-content": Xe(p),
|
|
17311
17328
|
"hide-reasoning": e.hideReasoning,
|
|
17312
17329
|
"is-dark": e.isDark
|
|
@@ -17328,7 +17345,7 @@ var Qb = ["aria-busy"], $b = {
|
|
|
17328
17345
|
message: p,
|
|
17329
17346
|
part: o,
|
|
17330
17347
|
index: m,
|
|
17331
|
-
isLoading:
|
|
17348
|
+
isLoading: ne.value
|
|
17332
17349
|
}), () => [Ze(p) ? (X(), F(Ke, {
|
|
17333
17350
|
key: 0,
|
|
17334
17351
|
class: "wysiwyg",
|
|
@@ -17452,7 +17469,7 @@ var Qb = ["aria-busy"], $b = {
|
|
|
17452
17469
|
message: p,
|
|
17453
17470
|
part: o,
|
|
17454
17471
|
index: m,
|
|
17455
|
-
isLoading:
|
|
17472
|
+
isLoading: ne.value
|
|
17456
17473
|
}), () => [e.showAllMessageParts ? (X(), Y("div", fx, [L("div", px, [J(bn)(o) ? (X(), F(l, {
|
|
17457
17474
|
key: 0,
|
|
17458
17475
|
name: J(bn)(o),
|
|
@@ -17488,7 +17505,7 @@ var Qb = ["aria-busy"], $b = {
|
|
|
17488
17505
|
name: "fade-in",
|
|
17489
17506
|
mode: "out-in"
|
|
17490
17507
|
}, {
|
|
17491
|
-
default: G(() => [
|
|
17508
|
+
default: G(() => [ne.value && Fe(m) && !ze(p) && !e.hostConfirmation && Ze(p) && (!He(p) || Xe(p)) ? (X(), Y("div", {
|
|
17492
17509
|
key: `loading-info-${p.id}`,
|
|
17493
17510
|
class: "pk-chatbot-message__loading-info"
|
|
17494
17511
|
}, [L("div", yx, [
|
|
@@ -17533,7 +17550,7 @@ var Qb = ["aria-busy"], $b = {
|
|
|
17533
17550
|
}, 1024),
|
|
17534
17551
|
j(W, { mode: "out-in" }, {
|
|
17535
17552
|
default: G(() => [at(p, m) ? (X(), Y("div", bx, [
|
|
17536
|
-
j(
|
|
17553
|
+
j(C, {
|
|
17537
17554
|
modifiers: "compact",
|
|
17538
17555
|
class: "mr-auto shrink-0"
|
|
17539
17556
|
}, {
|
|
@@ -17932,7 +17949,7 @@ var Kx = { class: "pk-chatbot-input" }, qx = {
|
|
|
17932
17949
|
"manual-confirmations"
|
|
17933
17950
|
], ["update:modelValue", "update:pendingAttachments"]),
|
|
17934
17951
|
setup(e, { expose: t, emit: n }) {
|
|
17935
|
-
let r =
|
|
17952
|
+
let r = T(() => import("./_chunks/PkImageEditorDialog-DeDcbpTx.js")), i = k(e, "modelValue"), a = k(e, "pendingAttachments"), o = n, s = e, { t: c } = Ve({ useScope: "global" }), l = he("textareaEl"), u = he("fileInputEl"), d = he("cameraInputEl"), f = he("formEl"), p = R(i.value ?? ""), m = null, h = () => {
|
|
17936
17953
|
m !== null && (clearTimeout(m), m = null);
|
|
17937
17954
|
}, g = () => {
|
|
17938
17955
|
h(), i.value = p.value;
|
|
@@ -17948,7 +17965,7 @@ var Kx = { class: "pk-chatbot-input" }, qx = {
|
|
|
17948
17965
|
l.value && Hx.update(l.value);
|
|
17949
17966
|
}));
|
|
17950
17967
|
});
|
|
17951
|
-
let y = z(() => s.status === "streaming"), b = z(() => s.status === "submitted"), x = z(() => y.value || b.value), S = Me(),
|
|
17968
|
+
let y = z(() => s.status === "streaming"), b = z(() => s.status === "submitted"), x = z(() => y.value || b.value), S = Me(), C = z(() => p.value.length), ee = z(() => s.maxMessageLength !== void 0 && C.value > s.maxMessageLength), w = z(() => a.value.some((e) => e.state === "uploading")), te = z(() => a.value.some((e) => e.state === "error")), ne = z(() => x.value && !s.queueEnabled || w.value || te.value || ee.value ? !1 : p.value.trim().length > 0), re = z(() => x.value && ne.value), E = "capture" in document.createElement("input"), ce = z(() => {
|
|
17952
17969
|
let e = s.fileUpload?.allowedMimeTypes ?? [];
|
|
17953
17970
|
return [...e, ...Je(e)].join(",");
|
|
17954
17971
|
}), le = z(() => (s.fileUpload?.allowedMimeTypes ?? []).filter((e) => e.startsWith("image/")).join(",")), ue = z(() => E && le.value.length > 0), fe = () => {
|
|
@@ -17981,7 +17998,7 @@ var Kx = { class: "pk-chatbot-input" }, qx = {
|
|
|
17981
17998
|
dismiss: () => o("dismiss-attachment-notice")
|
|
17982
17999
|
}];
|
|
17983
18000
|
let e = [];
|
|
17984
|
-
|
|
18001
|
+
te.value && e.push({
|
|
17985
18002
|
id: "upload-failed",
|
|
17986
18003
|
icon: "ri:error-warning-line",
|
|
17987
18004
|
text: c("message.attachmentUploadFailed")
|
|
@@ -18008,7 +18025,7 @@ var Kx = { class: "pk-chatbot-input" }, qx = {
|
|
|
18008
18025
|
}, H = () => {
|
|
18009
18026
|
Ee(), o("stop-generation");
|
|
18010
18027
|
}, De = () => {
|
|
18011
|
-
|
|
18028
|
+
ne.value && (Ee(), g(), o("submit"), p.value = "", i.value = "", O(() => {
|
|
18012
18029
|
l.value && (l.value.value = "", Hx.update(l.value));
|
|
18013
18030
|
}));
|
|
18014
18031
|
}, Oe = (e) => {
|
|
@@ -18222,7 +18239,7 @@ var Kx = { class: "pk-chatbot-input" }, qx = {
|
|
|
18222
18239
|
enterkeyhint: "send",
|
|
18223
18240
|
"aria-label": J(c)("label.message"),
|
|
18224
18241
|
"aria-describedby": e.maxMessageLength ? J(S) : void 0,
|
|
18225
|
-
"aria-invalid":
|
|
18242
|
+
"aria-invalid": ee.value || void 0,
|
|
18226
18243
|
placeholder: e.placeholder,
|
|
18227
18244
|
onInput: v,
|
|
18228
18245
|
onKeydown: Pe(Oe, ["enter"])
|
|
@@ -18230,8 +18247,8 @@ var Kx = { class: "pk-chatbot-input" }, qx = {
|
|
|
18230
18247
|
e.maxMessageLength ? (X(), Y("div", {
|
|
18231
18248
|
key: 5,
|
|
18232
18249
|
id: J(S),
|
|
18233
|
-
class: D(["pk-chatbot-input__counter", { "pk-chatbot-input__counter--over":
|
|
18234
|
-
}, [Le(V(t.$n(
|
|
18250
|
+
class: D(["pk-chatbot-input__counter", { "pk-chatbot-input__counter--over": ee.value }])
|
|
18251
|
+
}, [Le(V(t.$n(C.value, "integer")) + "/", 1), L("span", oS, V(t.$n(e.maxMessageLength, "integer")), 1)], 10, aS)) : K("", !0),
|
|
18235
18252
|
e.voiceEnabled && !y.value ? (X(), F(Gx, {
|
|
18236
18253
|
key: 6,
|
|
18237
18254
|
icon: "ri:mic-line",
|
|
@@ -18258,7 +18275,7 @@ var Kx = { class: "pk-chatbot-input" }, qx = {
|
|
|
18258
18275
|
modifiers: "primary",
|
|
18259
18276
|
icon: b.value ? "loading-loop" : "ri:arrow-up-line",
|
|
18260
18277
|
title: J(c)("action.submit"),
|
|
18261
|
-
disabled: !
|
|
18278
|
+
disabled: !ne.value
|
|
18262
18279
|
}, null, 8, [
|
|
18263
18280
|
"icon",
|
|
18264
18281
|
"title",
|
|
@@ -18673,7 +18690,7 @@ var kS = (e) => {
|
|
|
18673
18690
|
B();
|
|
18674
18691
|
var AS = Symbol("ChatFilePreviewDock");
|
|
18675
18692
|
function jS() {
|
|
18676
|
-
return
|
|
18693
|
+
return w(AS, void 0);
|
|
18677
18694
|
}
|
|
18678
18695
|
// ../../packages/components/src/chat/useWakeupWatch.ts
|
|
18679
18696
|
B(), U();
|
|
@@ -18822,8 +18839,8 @@ var zS = { class: "pk-chatbot-view-chat__input-stage" }, BS = {
|
|
|
18822
18839
|
"selection-action"
|
|
18823
18840
|
],
|
|
18824
18841
|
setup(e, { emit: t }) {
|
|
18825
|
-
let n =
|
|
18826
|
-
|
|
18842
|
+
let n = T(() => import("./_chunks/PkToolShowForm-Ce0IzrxF.js")), r = T(() => import("./_chunks/PkToolShowContactForm-dLdK3POY.js")), i = T(() => import("./_chunks/PkToolShowSuggestedReply-DKKMLvpr.js")), a = T(() => import("./_chunks/PkToolShowSources-IgpsG650.js")), o = T(() => import("./_chunks/PkToolRequestGeolocation-D196AF0R.js")), s = T(() => import("./_chunks/PkToolRequestOAuthConnection-JhdCcPGn.js")), c = T(() => import("./_chunks/PkToolShowLocation-BYkY2CEF.js")), l = T(() => import("./_chunks/PkToolShowChart-5epjmGHf.js")), u = T(() => import("./_chunks/PkToolShowDiagram-CzzrE7Mv.js")), d = T(() => import("./_chunks/PkToolChatFile-DmNIFwm4.js")), f = T(() => import("./_chunks/PkToolShareDocument-Q41TPE8p.js")), p = T(() => import("./_chunks/PkFilePreview-lW67C8H1.js").then((e) => e.n)), m = T(() => import("./_chunks/PkFilePreviewDialog-D3CfqzoG.js")), h = e, g = t, _ = ap(h.agentId), { agentInterface: v, agentFileUpload: y, agentType: b, agentVoice: x, actions: S, revisedAnswers: C, messages: ee, chat: w, messageFeedbacks: ne, feedbackDialogMessage: re, isFeedbackSubmitting: ie, isFeedbackSubmitted: E, feedbackSubmitError: O, isLeadSubmitted: ae, isLoadingSubmitLead: k, submitLeadError: se, input: ce, inputMessagePlaceholder: le, isConversationBlocked: ue, baseUrl: de, pendingAttachments: fe, isAttachmentLimitReached: M, fileLimitError: pe, apiClient: N, isDark: me, hostToolsPending: P, pageNoticeLevel: ge, hostConfirmation: _e, agentPageAccess: ye, hostStepTitles: be, hostStepChanges: xe, confirmationMode: Se, canQueue: I, queuedMessages: Ce, backgroundAnswers: we, inputFocusRequest: Te, pagePointer: B, pagePointerAvailable: Ee, pagePointing: H, agentSelectionActions: De } = Ir(_);
|
|
18843
|
+
te(pn, be), te(ln, xe);
|
|
18827
18844
|
let Oe = he("inputEl");
|
|
18828
18845
|
A(Te, () => {
|
|
18829
18846
|
Oe.value?.focus();
|
|
@@ -18841,13 +18858,13 @@ var zS = { class: "pk-chatbot-view-chat__input-stage" }, BS = {
|
|
|
18841
18858
|
available: () => !!Oe.value && je.value && !M.value,
|
|
18842
18859
|
annotate: (e) => Oe.value?.annotateImage(e)
|
|
18843
18860
|
});
|
|
18844
|
-
let Me = (e) => N.value.getMediaDownloadUrl(h.agentId, _.localChatId, e), { handleSubmit: Ne, stopGeneration: Pe, regenerate: Ie, onUpvote: q, onDownvote: Le, onFeedback: Re, onFeedbackSubmit: ze, onLeadSubmit: Be, startNewChat: He, addToolOutput: Ue, addToolApprovalResponse: We, handleFileSelect: Ge, discardPendingAttachment: Ke, replacePendingAttachment: qe, retryPendingAttachment: Je, clearFileLimitError: Xe, refreshMessages: Ze, appendMessage: Qe, closePageNotice: $e, respondHostConfirmation: et, editQueuedMessage: tt, removeQueuedMessage: nt, openBackgroundAnswer: rt, dismissBackgroundAnswer: it } = _, { t: at } = Ve({ useScope: "global" }), Z = z(() => P.value > 0), ot = z(() => Z.value &&
|
|
18861
|
+
let Me = (e) => N.value.getMediaDownloadUrl(h.agentId, _.localChatId, e), { handleSubmit: Ne, stopGeneration: Pe, regenerate: Ie, onUpvote: q, onDownvote: Le, onFeedback: Re, onFeedbackSubmit: ze, onLeadSubmit: Be, startNewChat: He, addToolOutput: Ue, addToolApprovalResponse: We, handleFileSelect: Ge, discardPendingAttachment: Ke, replacePendingAttachment: qe, retryPendingAttachment: Je, clearFileLimitError: Xe, refreshMessages: Ze, appendMessage: Qe, closePageNotice: $e, respondHostConfirmation: et, editQueuedMessage: tt, removeQueuedMessage: nt, openBackgroundAnswer: rt, dismissBackgroundAnswer: it } = _, { t: at } = Ve({ useScope: "global" }), Z = z(() => P.value > 0), ot = z(() => Z.value && w.value.status === "ready" ? "streaming" : w.value.status), st = Wn(() => ye.value?.notice), ct = z(() => ge.value ? st.value || at(`message.pageAccessNotice.${ge.value}`) : void 0), lt = z(() => {
|
|
18845
18862
|
let e = pe.value;
|
|
18846
18863
|
if (e) return e.reason === "per-chat" ? at("message.fileLimitPerChat", { max: e.max }) : at("message.fileLimitPerMessage", { max: e.max });
|
|
18847
18864
|
}), ut = z(() => we.value.map(({ chatId: e, title: t }) => ({
|
|
18848
18865
|
id: e,
|
|
18849
18866
|
text: t ? at("message.backgroundAnswerReady", { title: t }) : at("message.backgroundAnswerReadyUntitled")
|
|
18850
|
-
}))), dt = Wn(() => v.value?.dismissableNotice), ft = z(() =>
|
|
18867
|
+
}))), dt = Wn(() => v.value?.dismissableNotice), ft = z(() => ee.value.some((e) => e.role === "user")), pt = z(() => h.modifier === "fullscreen" && !ft.value), mt = _p(v, () => h.userName), ht = he("chatViewEl"), gt = jS(), _t = z(() => !!gt?.value), vt = z(() => gt?.value ?? "body"), yt = R(0), bt = R(0);
|
|
18851
18868
|
jn([ht, z(() => gt?.value ?? void 0)], (e) => {
|
|
18852
18869
|
for (let t of e) {
|
|
18853
18870
|
let e = t.borderBoxSize?.[0]?.inlineSize ?? t.contentRect.width;
|
|
@@ -18866,7 +18883,7 @@ var zS = { class: "pk-chatbot-view-chat__input-stage" }, BS = {
|
|
|
18866
18883
|
"tool-createWordDocument"
|
|
18867
18884
|
]), Lt = z(() => {
|
|
18868
18885
|
let e = /* @__PURE__ */ new Map();
|
|
18869
|
-
for (let t of
|
|
18886
|
+
for (let t of ee.value) for (let n of t.parts) {
|
|
18870
18887
|
let { type: t, state: r, output: i } = n;
|
|
18871
18888
|
if (It.has(t) && r === "output-available" && i?.fileId && i.version && i.storedFileName) {
|
|
18872
18889
|
let t = e.get(i.fileId) ?? /* @__PURE__ */ new Map();
|
|
@@ -18903,7 +18920,7 @@ var zS = { class: "pk-chatbot-view-chat__input-stage" }, BS = {
|
|
|
18903
18920
|
e && t && e.fileId === t.fileId && e.newest > t.newest && Ct.value?.version === t.newest && zt(e.newest, Ct.value.storedFileName);
|
|
18904
18921
|
});
|
|
18905
18922
|
let Ht = z(() => {
|
|
18906
|
-
let e =
|
|
18923
|
+
let e = w.value?.status;
|
|
18907
18924
|
if (!(ue.value || e === "submitted" || e === "streaming")) return Ct.value?.kind === "word" ? De.value?.word : De.value?.excel;
|
|
18908
18925
|
}), Ut = z(() => ot.value === "submitted" || ot.value === "streaming"), Wt = () => {
|
|
18909
18926
|
xt.value ? Nt.value = !1 : Ft();
|
|
@@ -19018,7 +19035,7 @@ var zS = { class: "pk-chatbot-view-chat__input-stage" }, BS = {
|
|
|
19018
19035
|
});
|
|
19019
19036
|
}, Ln = z(() => {
|
|
19020
19037
|
let e = /* @__PURE__ */ new Map();
|
|
19021
|
-
for (let t of
|
|
19038
|
+
for (let t of ee.value) for (let n of t.parts) {
|
|
19022
19039
|
let { type: t, state: r, output: i } = n;
|
|
19023
19040
|
It.has(t) && r === "output-available" && i?.fileId && i.version && e.set(i.fileId, Math.max(e.get(i.fileId) ?? 0, i.version));
|
|
19024
19041
|
}
|
|
@@ -19030,7 +19047,7 @@ var zS = { class: "pk-chatbot-view-chat__input-stage" }, BS = {
|
|
|
19030
19047
|
e.set(r, (e.get(r) ?? /* @__PURE__ */ new Set()).add(n));
|
|
19031
19048
|
}
|
|
19032
19049
|
};
|
|
19033
|
-
for (let e of
|
|
19050
|
+
for (let e of ee.value) for (let n of e.parts) {
|
|
19034
19051
|
if (un(n)) {
|
|
19035
19052
|
t(n.filename, qt(n)?.storedFileName);
|
|
19036
19053
|
continue;
|
|
@@ -19070,9 +19087,9 @@ var zS = { class: "pk-chatbot-view-chat__input-stage" }, BS = {
|
|
|
19070
19087
|
agentId: () => h.agentId,
|
|
19071
19088
|
chatId: () => _.localChatId,
|
|
19072
19089
|
apiClient: () => N.value,
|
|
19073
|
-
messages: () =>
|
|
19090
|
+
messages: () => ee.value,
|
|
19074
19091
|
refreshMessages: Ze,
|
|
19075
|
-
status: () =>
|
|
19092
|
+
status: () => w.value.status
|
|
19076
19093
|
});
|
|
19077
19094
|
return (t, y) => {
|
|
19078
19095
|
let b = Bn;
|
|
@@ -19102,15 +19119,15 @@ var zS = { class: "pk-chatbot-view-chat__input-stage" }, BS = {
|
|
|
19102
19119
|
key: 1,
|
|
19103
19120
|
class: "flex flex-col flex-1 min-h-0 p-md overflow-y-auto",
|
|
19104
19121
|
interactive: "",
|
|
19105
|
-
messages: J(
|
|
19122
|
+
messages: J(ee),
|
|
19106
19123
|
"confirm-verdicts-on-call": Nn.value,
|
|
19107
|
-
status: J(
|
|
19108
|
-
error: J(
|
|
19124
|
+
status: J(w).status,
|
|
19125
|
+
error: J(w).error,
|
|
19109
19126
|
"main-color": J(v)?.mainColor,
|
|
19110
19127
|
"text-color": J(v)?.textColor,
|
|
19111
|
-
"revised-answers": J(
|
|
19128
|
+
"revised-answers": J(C),
|
|
19112
19129
|
actions: J(S),
|
|
19113
|
-
"message-feedbacks": J(
|
|
19130
|
+
"message-feedbacks": J(ne),
|
|
19114
19131
|
"feedback-message-id": J(re)?.id,
|
|
19115
19132
|
"feedback-loading": J(ie),
|
|
19116
19133
|
"feedback-submitted": J(E),
|
|
@@ -19332,7 +19349,7 @@ var zS = { class: "pk-chatbot-view-chat__input-stage" }, BS = {
|
|
|
19332
19349
|
"pending-attachments": J(fe),
|
|
19333
19350
|
"onUpdate:pendingAttachments": y[5] ||= (e) => Fe(fe) ? fe.value = e : null,
|
|
19334
19351
|
placeholder: J(le),
|
|
19335
|
-
"dismissable-notice": J(dt) && J(
|
|
19352
|
+
"dismissable-notice": J(dt) && J(w).messages.length <= 1 ? J(dt) : void 0,
|
|
19336
19353
|
"page-notice": ct.value,
|
|
19337
19354
|
status: ot.value,
|
|
19338
19355
|
"max-message-length": J(v)?.maxMessageLength,
|
|
@@ -19532,19 +19549,19 @@ var XS = { class: "flex flex-col flex-1 min-h-0 relative" }, ZS = {
|
|
|
19532
19549
|
f.value || (o.value = e, c("chat"));
|
|
19533
19550
|
}, b = (e) => o.value === e.id, x = (e, t) => Et(Ot(e.filter((e) => e.role === t).slice(-1)[0]) || ""), S = (e) => {
|
|
19534
19551
|
m(e, x(e.messages, "assistant"));
|
|
19535
|
-
}, { openDialogConfirm:
|
|
19536
|
-
let e =
|
|
19537
|
-
if (e &&
|
|
19552
|
+
}, { openDialogConfirm: C } = hp(), ee = w(Mv, void 0), te = z(() => !!ee?.eraseConversations && !(ee.isExternalAuth?.value ?? !1)), T = R(!1), ne = async () => {
|
|
19553
|
+
let e = ee?.eraseConversations;
|
|
19554
|
+
if (e && te.value && await C({
|
|
19538
19555
|
title: n("confirmTitle.deleteMyConversations"),
|
|
19539
19556
|
questionLabel: n("message.deleteMyConversationsConfirm")
|
|
19540
19557
|
})) {
|
|
19541
|
-
|
|
19558
|
+
T.value = !0;
|
|
19542
19559
|
try {
|
|
19543
19560
|
await e(), i.value = [], l();
|
|
19544
19561
|
} catch {
|
|
19545
19562
|
r.loadConversations(t.agentId);
|
|
19546
19563
|
} finally {
|
|
19547
|
-
|
|
19564
|
+
T.value = !1;
|
|
19548
19565
|
}
|
|
19549
19566
|
}
|
|
19550
19567
|
};
|
|
@@ -19647,15 +19664,15 @@ var XS = { class: "flex flex-col flex-1 min-h-0 relative" }, ZS = {
|
|
|
19647
19664
|
icon: "ri:add-line",
|
|
19648
19665
|
label: J(n)("action.startNewChat"),
|
|
19649
19666
|
onClick: t[3] ||= xe((e) => J(l)(), ["stop"])
|
|
19650
|
-
}, null, 8, ["label"]),
|
|
19667
|
+
}, null, 8, ["label"]), te.value ? (X(), F(o, {
|
|
19651
19668
|
key: 0,
|
|
19652
19669
|
class: "text-12 pointer-events-auto",
|
|
19653
19670
|
modifiers: "action-quiet-danger",
|
|
19654
19671
|
icon: "ri:delete-bin-line",
|
|
19655
|
-
loading:
|
|
19656
|
-
disabled:
|
|
19672
|
+
loading: T.value,
|
|
19673
|
+
disabled: T.value,
|
|
19657
19674
|
label: J(n)("action.deleteMyConversations"),
|
|
19658
|
-
onClick: t[4] ||= xe((e) =>
|
|
19675
|
+
onClick: t[4] ||= xe((e) => ne(), ["stop"])
|
|
19659
19676
|
}, null, 8, [
|
|
19660
19677
|
"loading",
|
|
19661
19678
|
"disabled",
|
|
@@ -19755,7 +19772,7 @@ var FC = { class: "flex flex-col flex-1 min-h-0 overflow-y-auto" }, IC = { class
|
|
|
19755
19772
|
__name: "PkChatbotViewProfile",
|
|
19756
19773
|
props: { agentId: { type: String } },
|
|
19757
19774
|
setup(e) {
|
|
19758
|
-
let t = e, { t: n } = Ve({ useScope: "global" }), { name: r, agentInterface: i } = Ir(ap(t.agentId)), a =
|
|
19775
|
+
let t = e, { t: n } = Ve({ useScope: "global" }), { name: r, agentInterface: i } = Ir(ap(t.agentId)), a = w(Mv, void 0), o = z(() => a?.user.value ?? null), s = z(() => a?.canManageProfile.value ?? !1), c = z(() => a?.profileUrl.value), l = z(() => a?.isExternalAuth?.value ?? !1), u = R(!1), d = R();
|
|
19759
19776
|
async function f() {
|
|
19760
19777
|
if (a) {
|
|
19761
19778
|
u.value = !0;
|
|
@@ -19875,12 +19892,12 @@ var JC = { class: "pk-chatbot__header-start" }, YC = ["title"], XC = { key: 1 },
|
|
|
19875
19892
|
setup(e, { expose: t, emit: n }) {
|
|
19876
19893
|
let r = ge(), { t: i } = Ve({ useScope: "global" }), a = e, o = n, s = k(e, "chatId"), c = ap(a.agentId);
|
|
19877
19894
|
qn((e) => c.apiClient.resolveShortUrls(e));
|
|
19878
|
-
let { messages: l, localChatId: u, activeView: d, chatError: f, isDark: p, pageAccessAvailable: m, pageAccessOff: h, confirmationsAvailable: g, confirmationMode: _ } = Ir(c), v = ye(c, "agentId"), { startNewChat: y, stopGeneration: b, regenerate: x, navigate: S, sendMessage:
|
|
19895
|
+
let { messages: l, localChatId: u, activeView: d, chatError: f, isDark: p, pageAccessAvailable: m, pageAccessOff: h, confirmationsAvailable: g, confirmationMode: _ } = Ir(c), v = ye(c, "agentId"), { startNewChat: y, stopGeneration: b, regenerate: x, navigate: S, sendMessage: C, setPageAccessOff: te, setConfirmationMode: T } = c;
|
|
19879
19896
|
er(() => a.agentInterface, () => a.baseUrl);
|
|
19880
|
-
let
|
|
19897
|
+
let ne = w(Mv, void 0), re = z(() => ne?.canManageProfile.value ?? !1), O = z(() => !re.value && (ne?.canSignIn?.value ?? !1) && r["view-auth"] !== void 0);
|
|
19881
19898
|
A(re, (e) => {
|
|
19882
19899
|
e && d.value === "auth" && S("chat");
|
|
19883
|
-
}),
|
|
19900
|
+
}), ee(() => {
|
|
19884
19901
|
c.baseUrl = a.baseUrl, c.basePath = a.basePath, c.name = a.name, c.agentType = a.agentType, c.userId = a.userId, c.agentInterface = a.agentInterface, c.agentModel = a.agentModel, c.agentTools = a.agentTools, c.headers = a.headers, c.revisedAnswers = a.revisedAnswers, c.model = a.model, c.actionsInput = a.actions, c.agentFileUpload = a.agentFileUpload, c.agentVoice = a.voice, c.fallbackModels = a.fallbackModels, c.gatewayOptions = a.gatewayOptions, c.externalContext = a.externalContext, c.agentHostTools = a.hostTools, c.hostToolRegistry = a.hostToolRegistry, c.agentPageAccess = a.pageAccess, c.agentConfirmations = a.confirmations, c.agentSelectionActions = a.selectionActions, c.pageToolRegistry = a.pageToolRegistry, c.pageFormsProvider = a.pageForms, c.systemTheme = a.systemTheme, c.hideWelcomeMessage = a.modifier === "fullscreen";
|
|
19885
19902
|
}), A(() => s.value, (e) => {
|
|
19886
19903
|
e && e !== c.localChatId && (c.localChatId = e);
|
|
@@ -19897,7 +19914,7 @@ var JC = { class: "pk-chatbot__header-start" }, YC = ["title"], XC = { key: 1 },
|
|
|
19897
19914
|
startNewChat: y,
|
|
19898
19915
|
regenerate: x,
|
|
19899
19916
|
stopGeneration: b,
|
|
19900
|
-
sendMessage:
|
|
19917
|
+
sendMessage: C,
|
|
19901
19918
|
sendSelection: c.sendSelection
|
|
19902
19919
|
}), A([v, u], async ([e, t]) => {
|
|
19903
19920
|
await c.initialize(e, t), o("loaded", t);
|
|
@@ -19998,14 +20015,14 @@ var JC = { class: "pk-chatbot__header-start" }, YC = ["title"], XC = { key: 1 },
|
|
|
19998
20015
|
})) : K("", !0),
|
|
19999
20016
|
J(m) ? (X(), F(c, {
|
|
20000
20017
|
key: 3,
|
|
20001
|
-
onClick: n[6] ||= (e) => J(
|
|
20018
|
+
onClick: n[6] ||= (e) => J(te)(!J(h))
|
|
20002
20019
|
}, {
|
|
20003
20020
|
default: G(() => [j(s, { name: J(h) ? "ri:pages-line" : "ri:forbid-line" }, null, 8, ["name"]), Le(" " + V(J(h) ? J(i)("action.enablePageAccess") : J(i)("action.disablePageAccess")), 1)]),
|
|
20004
20021
|
_: 1
|
|
20005
20022
|
})) : K("", !0),
|
|
20006
20023
|
J(g) ? (X(), F(c, {
|
|
20007
20024
|
key: 4,
|
|
20008
|
-
onClick: n[7] ||= (e) => J(
|
|
20025
|
+
onClick: n[7] ||= (e) => J(T)(J(_) === "automatic" ? "manual" : "automatic")
|
|
20009
20026
|
}, {
|
|
20010
20027
|
default: G(() => [j(s, { name: J(_) === "automatic" ? "ri:hand" : "ri:flashlight-line" }, null, 8, ["name"]), Le(" " + V(J(_) === "automatic" ? J(i)("action.manualConfirmations") : J(i)("action.automaticConfirmations")), 1)]),
|
|
20011
20028
|
_: 1
|
|
@@ -20616,26 +20633,26 @@ function sT(e, t) {
|
|
|
20616
20633
|
}
|
|
20617
20634
|
}
|
|
20618
20635
|
o?.remove(), c?.(), i = void 0, a = void 0, o = void 0, s = void 0, c = void 0, n.value = !1;
|
|
20619
|
-
},
|
|
20636
|
+
}, C = () => {
|
|
20620
20637
|
let e = i, t = eT(e, ...e.children).length > 0;
|
|
20621
|
-
t ? h.delete(e) : g.add(e), S(), t &&
|
|
20622
|
-
},
|
|
20638
|
+
t ? h.delete(e) : g.add(e), S(), t && te();
|
|
20639
|
+
}, ee = () => {
|
|
20623
20640
|
if (i && o) {
|
|
20624
20641
|
if (aT(o)) {
|
|
20625
20642
|
if (y(), !n.value) {
|
|
20626
20643
|
if (!b()) {
|
|
20627
|
-
|
|
20644
|
+
C();
|
|
20628
20645
|
return;
|
|
20629
20646
|
}
|
|
20630
20647
|
n.value = !0;
|
|
20631
20648
|
}
|
|
20632
|
-
d = requestAnimationFrame(
|
|
20649
|
+
d = requestAnimationFrame(ee);
|
|
20633
20650
|
} else {
|
|
20634
20651
|
let t = i;
|
|
20635
|
-
S(), aT(e) && g.add(t),
|
|
20652
|
+
S(), aT(e) && g.add(t), te();
|
|
20636
20653
|
}
|
|
20637
20654
|
}
|
|
20638
|
-
},
|
|
20655
|
+
}, w = (t) => {
|
|
20639
20656
|
let n = iT(t), { height: r } = e.getBoundingClientRect(), f = document.createElement("div");
|
|
20640
20657
|
f.className = e.className, f.style.cssText = e.style.cssText, f.style.height || (f.style.minHeight = `${r}px`), f.setAttribute("aria-hidden", "true"), f.setAttribute(Jw, ""), s = {
|
|
20641
20658
|
parent: e.parentNode,
|
|
@@ -20643,7 +20660,7 @@ function sT(e, t) {
|
|
|
20643
20660
|
}, s.parent.insertBefore(f, e), o = f, c = _(), oT(n, e, null) ? (i = t, a = n, l = {
|
|
20644
20661
|
x: 0,
|
|
20645
20662
|
y: 0
|
|
20646
|
-
}, y(), e.addEventListener("keydown", x), u = new MutationObserver(
|
|
20663
|
+
}, y(), e.addEventListener("keydown", x), u = new MutationObserver(te), u.observe(t, {
|
|
20647
20664
|
attributes: !0,
|
|
20648
20665
|
attributeFilter: [
|
|
20649
20666
|
"open",
|
|
@@ -20660,8 +20677,8 @@ function sT(e, t) {
|
|
|
20660
20677
|
}), u.observe(document, {
|
|
20661
20678
|
childList: !0,
|
|
20662
20679
|
subtree: !0
|
|
20663
|
-
}), d = requestAnimationFrame(
|
|
20664
|
-
},
|
|
20680
|
+
}), d = requestAnimationFrame(ee)) : (g.add(t), S());
|
|
20681
|
+
}, te = () => {
|
|
20665
20682
|
if (!r) return;
|
|
20666
20683
|
let t = (e) => !e.open || !e.isConnected;
|
|
20667
20684
|
for (let e of [g, h]) for (let n of e) t(n) && e.delete(n);
|
|
@@ -20669,13 +20686,13 @@ function sT(e, t) {
|
|
|
20669
20686
|
let s = Fw((e) => e === p), c = s && !g.has(s) && s.getBoundingClientRect().width > 0 && !nT(s) ? s : null;
|
|
20670
20687
|
if (i) {
|
|
20671
20688
|
if (i === c && a?.contains(e) && i.contains(a) && o && aT(o)) {
|
|
20672
|
-
n.value && !b() &&
|
|
20689
|
+
n.value && !b() && C();
|
|
20673
20690
|
return;
|
|
20674
20691
|
}
|
|
20675
20692
|
S();
|
|
20676
20693
|
}
|
|
20677
|
-
c && !g.has(c) && aT(e) && (h.has(c) ?
|
|
20678
|
-
},
|
|
20694
|
+
c && !g.has(c) && aT(e) && (h.has(c) ? w(c) : T(c));
|
|
20695
|
+
}, T = (e) => {
|
|
20679
20696
|
if (m?.dialog === e) return;
|
|
20680
20697
|
let t = { dialog: e };
|
|
20681
20698
|
m = t;
|
|
@@ -20687,18 +20704,18 @@ function sT(e, t) {
|
|
|
20687
20704
|
}
|
|
20688
20705
|
let i = eT(e, ...e.children);
|
|
20689
20706
|
Promise.race([Promise.allSettled(i.map((e) => e.finished)), new Promise((e) => setTimeout(e, qw))]).then(() => {
|
|
20690
|
-
m === t && (m = void 0, h.add(e),
|
|
20707
|
+
m === t && (m = void 0, h.add(e), te());
|
|
20691
20708
|
});
|
|
20692
20709
|
};
|
|
20693
20710
|
requestAnimationFrame(r);
|
|
20694
|
-
},
|
|
20695
|
-
e.target === i && e.newState === "closed" && (p = i,
|
|
20711
|
+
}, ne = (e) => {
|
|
20712
|
+
e.target === i && e.newState === "closed" && (p = i, te(), p = void 0);
|
|
20696
20713
|
}, re = (e) => {
|
|
20697
|
-
e.target instanceof HTMLDialogElement &&
|
|
20714
|
+
e.target instanceof HTMLDialogElement && te();
|
|
20698
20715
|
}, ie = () => {
|
|
20699
|
-
r = !0, document.addEventListener("beforetoggle",
|
|
20716
|
+
r = !0, document.addEventListener("beforetoggle", ne, !0), document.addEventListener("toggle", re, !0), f = setInterval(te, Gw), te();
|
|
20700
20717
|
}, E = () => {
|
|
20701
|
-
r = !1, document.removeEventListener("beforetoggle",
|
|
20718
|
+
r = !1, document.removeEventListener("beforetoggle", ne, !0), document.removeEventListener("toggle", re, !0), clearInterval(f), f = void 0, m = void 0, i && S(), g.clear(), h.clear();
|
|
20702
20719
|
};
|
|
20703
20720
|
return A(() => M(t), (e) => {
|
|
20704
20721
|
E(), e && ie();
|
|
@@ -20763,15 +20780,15 @@ var cT = { class: "pk-chatbot-auth flex flex-col items-center justify-center w-f
|
|
|
20763
20780
|
email: s(),
|
|
20764
20781
|
password: Bi,
|
|
20765
20782
|
rememberMe: v().default(!1)
|
|
20766
|
-
}), g = i({ email: s() }), { VvForm: _, VvFormField: y } = Kn(h, { lazyLoad: !0 }), { VvForm: b, VvFormField: x, clear: S } = Kn(Hi, { lazyLoad: !0 }), { VvForm:
|
|
20783
|
+
}), g = i({ email: s() }), { VvForm: _, VvFormField: y } = Kn(h, { lazyLoad: !0 }), { VvForm: b, VvFormField: x, clear: S } = Kn(Hi, { lazyLoad: !0 }), { VvForm: C, VvFormField: ee, clear: w } = Kn(g, { lazyLoad: !0 });
|
|
20767
20784
|
A(u, (e) => {
|
|
20768
|
-
e && (S(),
|
|
20785
|
+
e && (S(), w());
|
|
20769
20786
|
});
|
|
20770
|
-
let
|
|
20771
|
-
function
|
|
20772
|
-
u.value &&
|
|
20787
|
+
let te = R();
|
|
20788
|
+
function T() {
|
|
20789
|
+
u.value && te.value?.focus();
|
|
20773
20790
|
}
|
|
20774
|
-
function
|
|
20791
|
+
function ne(e) {
|
|
20775
20792
|
d("sign-in", {
|
|
20776
20793
|
email: e.email,
|
|
20777
20794
|
password: e.password,
|
|
@@ -20810,11 +20827,11 @@ var cT = { class: "pk-chatbot-auth flex flex-col items-center justify-center w-f
|
|
|
20810
20827
|
return X(), Y("div", cT, [L("div", lT, [j(W, {
|
|
20811
20828
|
name: "pk-flip",
|
|
20812
20829
|
mode: "out-in",
|
|
20813
|
-
onAfterEnter:
|
|
20830
|
+
onAfterEnter: T
|
|
20814
20831
|
}, {
|
|
20815
20832
|
default: G(() => [u.value ? (X(), Y("div", {
|
|
20816
20833
|
ref_key: "successCard",
|
|
20817
|
-
ref:
|
|
20834
|
+
ref: te,
|
|
20818
20835
|
key: "success",
|
|
20819
20836
|
tabindex: "-1",
|
|
20820
20837
|
class: "pk-chatbot-auth__flip-card outline-none flex flex-col text-center leading-normal"
|
|
@@ -20900,7 +20917,7 @@ var cT = { class: "pk-chatbot-auth flex flex-col items-center justify-center w-f
|
|
|
20900
20917
|
key: 3,
|
|
20901
20918
|
class: "flex flex-col",
|
|
20902
20919
|
readonly: e.loading,
|
|
20903
|
-
onSubmit:
|
|
20920
|
+
onSubmit: ne
|
|
20904
20921
|
}, {
|
|
20905
20922
|
default: G(() => [L("div", xT, [
|
|
20906
20923
|
j(J(y), {
|
|
@@ -20988,13 +21005,13 @@ var cT = { class: "pk-chatbot-auth flex flex-col items-center justify-center w-f
|
|
|
20988
21005
|
"label"
|
|
20989
21006
|
])]),
|
|
20990
21007
|
_: 1
|
|
20991
|
-
}, 8, ["readonly"])) : f.value === "reset" ? (X(), F(J(
|
|
21008
|
+
}, 8, ["readonly"])) : f.value === "reset" ? (X(), F(J(C), {
|
|
20992
21009
|
key: 5,
|
|
20993
21010
|
class: "flex flex-col",
|
|
20994
21011
|
readonly: e.loading,
|
|
20995
21012
|
onSubmit: ie
|
|
20996
21013
|
}, {
|
|
20997
|
-
default: G(() => [j(J(
|
|
21014
|
+
default: G(() => [j(J(ee), {
|
|
20998
21015
|
name: "email",
|
|
20999
21016
|
type: "email",
|
|
21000
21017
|
autocomplete: "username",
|
|
@@ -21299,19 +21316,19 @@ var RT = 13, zT = 8, BT = 3, VT = 150, HT = /*#__PURE__*/ $n(/* @__PURE__ */ q({
|
|
|
21299
21316
|
try {
|
|
21300
21317
|
e?.matches(":popover-open") && e.hidePopover(), e?.showPopover();
|
|
21301
21318
|
} catch {}
|
|
21302
|
-
},
|
|
21303
|
-
clearTimeout(
|
|
21319
|
+
}, C, ee = () => {
|
|
21320
|
+
clearTimeout(C), C = setTimeout(() => {
|
|
21304
21321
|
try {
|
|
21305
21322
|
i.value?.hidePopover();
|
|
21306
21323
|
} catch {}
|
|
21307
21324
|
}, 450);
|
|
21308
|
-
},
|
|
21325
|
+
}, w = (e) => e.y + e.height > 0 && e.y < window.innerHeight && e.x + e.width > 0 && e.x < window.innerWidth, te, T, ne = (e) => {
|
|
21309
21326
|
let t = g(e);
|
|
21310
21327
|
if (!t) {
|
|
21311
21328
|
l.value = !1;
|
|
21312
21329
|
return;
|
|
21313
21330
|
}
|
|
21314
|
-
|
|
21331
|
+
T = e;
|
|
21315
21332
|
let n = parseFloat(getComputedStyle(e).borderTopLeftRadius);
|
|
21316
21333
|
o.value?.style.setProperty("--pk-agent-presence-radius", `${(Number.isFinite(n) ? n : 0) + BT}px`), h(y(t)), l.value = !0, d.value++;
|
|
21317
21334
|
}, re = 0, ie = async (e) => {
|
|
@@ -21320,20 +21337,20 @@ var RT = 13, zT = 8, BT = 3, VT = 150, HT = /*#__PURE__*/ $n(/* @__PURE__ */ q({
|
|
|
21320
21337
|
i(!1);
|
|
21321
21338
|
return;
|
|
21322
21339
|
}
|
|
21323
|
-
if (e.heading && !(c.value &&
|
|
21340
|
+
if (e.heading && !(c.value && w(a)) || (clearTimeout(C), x(), f.value = e.name.replace(/\s*[::]\s*$/, ""), await O(), t !== re)) return;
|
|
21324
21341
|
let o = g(e.element);
|
|
21325
21342
|
if (!n.active || !o) {
|
|
21326
21343
|
i(!1);
|
|
21327
21344
|
return;
|
|
21328
21345
|
}
|
|
21329
21346
|
let s = v(o);
|
|
21330
|
-
|
|
21331
|
-
u.value++,
|
|
21347
|
+
te = e.element, e.heading ? m.to(s) : (c.value ||= (m.jump(b() ?? [s[0] + 40, s[1] + 24]), !0), m.to(s, () => {
|
|
21348
|
+
u.value++, ne(e.element), i(!0);
|
|
21332
21349
|
}));
|
|
21333
21350
|
}, E = () => {
|
|
21334
|
-
l.value = !1,
|
|
21351
|
+
l.value = !1, te = void 0, T = void 0, f.value = "";
|
|
21335
21352
|
let e = b(), t = () => {
|
|
21336
|
-
c.value = !1,
|
|
21353
|
+
c.value = !1, ee();
|
|
21337
21354
|
};
|
|
21338
21355
|
c.value && e ? m.to(e, t) : t();
|
|
21339
21356
|
};
|
|
@@ -21348,9 +21365,9 @@ var RT = 13, zT = 8, BT = 3, VT = 150, HT = /*#__PURE__*/ $n(/* @__PURE__ */ q({
|
|
|
21348
21365
|
ae ||= requestAnimationFrame(() => {
|
|
21349
21366
|
if (ae = 0, !n.active) return;
|
|
21350
21367
|
x();
|
|
21351
|
-
let e = g(
|
|
21368
|
+
let e = g(te);
|
|
21352
21369
|
e && m.follow(v(e));
|
|
21353
|
-
let t = l.value ? g(
|
|
21370
|
+
let t = l.value ? g(T) : void 0;
|
|
21354
21371
|
t ? h(y(t)) : l.value = !1;
|
|
21355
21372
|
});
|
|
21356
21373
|
}, ce;
|
|
@@ -21362,7 +21379,7 @@ var RT = 13, zT = 8, BT = 3, VT = 150, HT = /*#__PURE__*/ $n(/* @__PURE__ */ q({
|
|
|
21362
21379
|
passive: !0
|
|
21363
21380
|
}), window.addEventListener("resize", k, { passive: !0 }), n.active && (S(), n.target && ie(n.target));
|
|
21364
21381
|
}), oe(() => {
|
|
21365
|
-
window.removeEventListener("scroll", k, { capture: !0 }), window.removeEventListener("resize", k), cancelAnimationFrame(ae), clearInterval(ce), clearTimeout(
|
|
21382
|
+
window.removeEventListener("scroll", k, { capture: !0 }), window.removeEventListener("resize", k), cancelAnimationFrame(ae), clearInterval(ce), clearTimeout(C), m.stop();
|
|
21366
21383
|
}), (t, n) => (X(), Y("div", {
|
|
21367
21384
|
ref_key: "layer",
|
|
21368
21385
|
ref: i,
|
|
@@ -21487,7 +21504,7 @@ var UT = {
|
|
|
21487
21504
|
A(l, (e) => {
|
|
21488
21505
|
e && (d.value = void 0);
|
|
21489
21506
|
});
|
|
21490
|
-
let { session: p, onError: m, headers: h, token: g, userId: _, isExternalAuth: v, signInWithEmail: y, twoFactorChallenge: b, verifyTwoFactor: x, sendTwoFactorCode: S, cancelTwoFactor:
|
|
21507
|
+
let { session: p, onError: m, headers: h, token: g, userId: _, isExternalAuth: v, signInWithEmail: y, twoFactorChallenge: b, verifyTwoFactor: x, sendTwoFactorCode: S, cancelTwoFactor: C, signUpWithEmail: ee, requestPasswordReset: w, signInWithSocialPopup: te, signInWithExternalToken: T, signOut: ne } = Av({
|
|
21491
21508
|
baseUrl: r,
|
|
21492
21509
|
externalToken: () => n.externalToken,
|
|
21493
21510
|
awaitExternalToken: !!n.awaitExternalToken && n.awaitExternalToken !== "false",
|
|
@@ -21616,7 +21633,7 @@ var UT = {
|
|
|
21616
21633
|
branding: se,
|
|
21617
21634
|
authMethods: ce,
|
|
21618
21635
|
session: p,
|
|
21619
|
-
signOut:
|
|
21636
|
+
signOut: ne,
|
|
21620
21637
|
isExternalAuth: v,
|
|
21621
21638
|
frontendUrl: () => de.value?.frontendUrl,
|
|
21622
21639
|
token: g,
|
|
@@ -21650,11 +21667,11 @@ var UT = {
|
|
|
21650
21667
|
isTwoFactorPending: () => !!b.value,
|
|
21651
21668
|
verifyTwoFactor: x,
|
|
21652
21669
|
sendTwoFactorCode: S,
|
|
21653
|
-
cancelTwoFactor:
|
|
21654
|
-
signUpWithEmail:
|
|
21655
|
-
requestPasswordReset:
|
|
21670
|
+
cancelTwoFactor: C,
|
|
21671
|
+
signUpWithEmail: ee,
|
|
21672
|
+
requestPasswordReset: w,
|
|
21656
21673
|
frontendUrl: () => de.value?.frontendUrl,
|
|
21657
|
-
signInWithSocialPopup:
|
|
21674
|
+
signInWithSocialPopup: te,
|
|
21658
21675
|
refetchSession: () => p.value.refetch(),
|
|
21659
21676
|
reload: ge
|
|
21660
21677
|
});
|
|
@@ -21684,8 +21701,8 @@ var UT = {
|
|
|
21684
21701
|
c.value = c.value.filter((t) => t.name !== e);
|
|
21685
21702
|
},
|
|
21686
21703
|
registerPages: be,
|
|
21687
|
-
signIn:
|
|
21688
|
-
signOut:
|
|
21704
|
+
signIn: T,
|
|
21705
|
+
signOut: ne,
|
|
21689
21706
|
get isOpen() {
|
|
21690
21707
|
return l.value;
|
|
21691
21708
|
},
|
|
@@ -22096,7 +22113,7 @@ var eE = {
|
|
|
22096
22113
|
organizationSlug: n.organizationSlug,
|
|
22097
22114
|
agentId: n.agentId
|
|
22098
22115
|
});
|
|
22099
|
-
let { session: l, onError: u, headers: d, token: f, userId: p, isExternalAuth: m, signInWithEmail: h, twoFactorChallenge: g, verifyTwoFactor: _, sendTwoFactorCode: v, cancelTwoFactor: y, signUpWithEmail: b, requestPasswordReset: x, signInWithSocialPopup: S, signInWithExternalToken:
|
|
22116
|
+
let { session: l, onError: u, headers: d, token: f, userId: p, isExternalAuth: m, signInWithEmail: h, twoFactorChallenge: g, verifyTwoFactor: _, sendTwoFactorCode: v, cancelTwoFactor: y, signUpWithEmail: b, requestPasswordReset: x, signInWithSocialPopup: S, signInWithExternalToken: C, signOut: ee } = Av({
|
|
22100
22117
|
baseUrl: r,
|
|
22101
22118
|
externalToken: () => n.externalToken,
|
|
22102
22119
|
awaitExternalToken: !!n.awaitExternalToken && n.awaitExternalToken !== "false",
|
|
@@ -22110,29 +22127,29 @@ var eE = {
|
|
|
22110
22127
|
A(p, (e) => {
|
|
22111
22128
|
e && Yi({ userId: e });
|
|
22112
22129
|
});
|
|
22113
|
-
let
|
|
22130
|
+
let w = jv({
|
|
22114
22131
|
agentId: n.agentId,
|
|
22115
22132
|
baseUrl: r,
|
|
22116
22133
|
headers: d,
|
|
22117
22134
|
userId: p
|
|
22118
22135
|
});
|
|
22119
|
-
e_(() =>
|
|
22120
|
-
let
|
|
22136
|
+
e_(() => w.isWorking), t_(() => w.pageControlActive);
|
|
22137
|
+
let te = Rv(o, () => w.localChatId);
|
|
22121
22138
|
A(p, (e) => {
|
|
22122
22139
|
e && a("ready");
|
|
22123
22140
|
});
|
|
22124
|
-
function
|
|
22141
|
+
function T(e) {
|
|
22125
22142
|
Zi(/* @__PURE__ */ Error(`${e.type}: ${e.title}`), { status: String(e.status) }), a("chat-error", {
|
|
22126
22143
|
type: e.type,
|
|
22127
22144
|
title: e.title,
|
|
22128
22145
|
status: e.status
|
|
22129
22146
|
}), u(e);
|
|
22130
22147
|
}
|
|
22131
|
-
let { t:
|
|
22132
|
-
Ww(ie, () =>
|
|
22133
|
-
text: () =>
|
|
22134
|
-
stopLabel: () =>
|
|
22135
|
-
onStop: () => void
|
|
22148
|
+
let { t: ne, locale: re } = Ve({ useScope: "global" }), ie = Iw(() => !!w.hostConfirmation || w.pageControlActive), E = sT(we(), () => !!n.followPageDialogs && n.followPageDialogs !== "false");
|
|
22149
|
+
Ww(ie, () => w.pageControlActive && !E.value, {
|
|
22150
|
+
text: () => ne("messagePart.pageControlActive"),
|
|
22151
|
+
stopLabel: () => ne("action.stop"),
|
|
22152
|
+
onStop: () => void w.stopHostActions()
|
|
22136
22153
|
});
|
|
22137
22154
|
let { agent: O, branding: oe, authMethods: k, deploymentCss: se, deployment: ce, requiresAuth: le, notFound: de, isLoading: fe, reload: M, themeClass: pe, themeStyle: N } = Fv({
|
|
22138
22155
|
baseUrl: r,
|
|
@@ -22151,7 +22168,7 @@ var eE = {
|
|
|
22151
22168
|
...e.telemetry
|
|
22152
22169
|
});
|
|
22153
22170
|
});
|
|
22154
|
-
let ge = Rg(() =>
|
|
22171
|
+
let ge = Rg(() => w.pageControlActive), { registry: _e, forms: ye, registerPages: be, pointing: xe } = Ig(() => O.value?.capabilities?.pageAccess, ne, ge), Se = ge.target, I = z(() => O.value?.capabilities?.selectionActions?.page), Ce = z(() => !!I.value && _e.value.length > 0 && !w.pageAccessOff), Te = () => !w.isWorking && !w.pagePointing && (Ce.value || w.pagePointerAvailable), B = Yg({
|
|
22155
22172
|
pointing: xe,
|
|
22156
22173
|
enabled: Te,
|
|
22157
22174
|
touch: () => Ce.value
|
|
@@ -22159,11 +22176,11 @@ var eE = {
|
|
|
22159
22176
|
pointing: xe,
|
|
22160
22177
|
selection: B.selection,
|
|
22161
22178
|
clearSelection: B.clear,
|
|
22162
|
-
available: () =>
|
|
22179
|
+
available: () => w.pagePointerAvailable && !w.isWorking,
|
|
22163
22180
|
chatOpen: () => !0,
|
|
22164
22181
|
bubble: () => !Ce.value,
|
|
22165
22182
|
onPointed: (e) => {
|
|
22166
|
-
|
|
22183
|
+
w.pagePointer = e;
|
|
22167
22184
|
}
|
|
22168
22185
|
}), { held: De, actions: Oe, asking: ke, run: U, ask: Ae, dismiss: je } = Qg({
|
|
22169
22186
|
selection: B.selection,
|
|
@@ -22172,24 +22189,24 @@ var eE = {
|
|
|
22172
22189
|
group: () => Ce.value ? I.value : void 0,
|
|
22173
22190
|
describe: xe.describe,
|
|
22174
22191
|
locale: () => re.value,
|
|
22175
|
-
t:
|
|
22192
|
+
t: ne,
|
|
22176
22193
|
onSend: (e, t, n) => {
|
|
22177
22194
|
Xi("selection_action", {
|
|
22178
22195
|
surface: "page",
|
|
22179
22196
|
action: n,
|
|
22180
22197
|
state: "chat"
|
|
22181
|
-
}),
|
|
22198
|
+
}), te.send(e, { pagePointer: t });
|
|
22182
22199
|
}
|
|
22183
22200
|
}), Me = z(() => Ce.value && De.value ? Wg(De.value) : void 0);
|
|
22184
|
-
|
|
22185
|
-
|
|
22201
|
+
w.pagePointerStart = H.start, A(H.picking, (e) => {
|
|
22202
|
+
w.pagePointing = e;
|
|
22186
22203
|
});
|
|
22187
22204
|
let Ne = () => o.value?.$el, Pe = z(() => Mt(O.value?.interface.mainColor) ? { "--pk-agent-presence-color": "var(--color-accent)" } : void 0), { authBranding: q } = Pv({
|
|
22188
22205
|
agent: O,
|
|
22189
22206
|
branding: oe,
|
|
22190
22207
|
authMethods: k,
|
|
22191
22208
|
session: l,
|
|
22192
|
-
signOut:
|
|
22209
|
+
signOut: ee,
|
|
22193
22210
|
isExternalAuth: m,
|
|
22194
22211
|
frontendUrl: () => ce.value?.frontendUrl,
|
|
22195
22212
|
token: f,
|
|
@@ -22218,10 +22235,10 @@ var eE = {
|
|
|
22218
22235
|
});
|
|
22219
22236
|
return t({
|
|
22220
22237
|
sendMessage(e) {
|
|
22221
|
-
|
|
22238
|
+
te.send(e);
|
|
22222
22239
|
},
|
|
22223
22240
|
startNewChat() {
|
|
22224
|
-
|
|
22241
|
+
te.invalidate(), w.startNewChat();
|
|
22225
22242
|
},
|
|
22226
22243
|
setContext(e) {
|
|
22227
22244
|
s.value = e;
|
|
@@ -22233,13 +22250,13 @@ var eE = {
|
|
|
22233
22250
|
c.value = c.value.filter((t) => t.name !== e);
|
|
22234
22251
|
},
|
|
22235
22252
|
registerPages: be,
|
|
22236
|
-
signIn:
|
|
22237
|
-
signOut:
|
|
22253
|
+
signIn: C,
|
|
22254
|
+
signOut: ee,
|
|
22238
22255
|
get isWorking() {
|
|
22239
|
-
return
|
|
22256
|
+
return w.isWorking;
|
|
22240
22257
|
},
|
|
22241
22258
|
get isControllingPage() {
|
|
22242
|
-
return
|
|
22259
|
+
return w.pageControlActive;
|
|
22243
22260
|
}
|
|
22244
22261
|
}), (t, n) => (X(), Y("div", {
|
|
22245
22262
|
class: D(["embedded-chat-widget-root", J(pe)]),
|
|
@@ -22254,7 +22271,7 @@ var eE = {
|
|
|
22254
22271
|
_: 1
|
|
22255
22272
|
})) : K("", !0),
|
|
22256
22273
|
j(HT, {
|
|
22257
|
-
active: J(
|
|
22274
|
+
active: J(w).pageControlActive,
|
|
22258
22275
|
target: J(Se),
|
|
22259
22276
|
"agent-name": J(O)?.name,
|
|
22260
22277
|
home: Ne,
|
|
@@ -22270,10 +22287,10 @@ var eE = {
|
|
|
22270
22287
|
"onArrived"
|
|
22271
22288
|
]),
|
|
22272
22289
|
j(ow, {
|
|
22273
|
-
active: J(
|
|
22274
|
-
action: J(
|
|
22290
|
+
active: J(w).pageControlActive,
|
|
22291
|
+
action: J(w).pageAction?.title,
|
|
22275
22292
|
chat: o.value?.$el,
|
|
22276
|
-
onStop: n[0] ||= (e) => J(
|
|
22293
|
+
onStop: n[0] ||= (e) => J(w).stopHostActions()
|
|
22277
22294
|
}, null, 8, [
|
|
22278
22295
|
"active",
|
|
22279
22296
|
"action",
|
|
@@ -22316,19 +22333,19 @@ var eE = {
|
|
|
22316
22333
|
"onAsk",
|
|
22317
22334
|
"onClose"
|
|
22318
22335
|
])) : K("", !0),
|
|
22319
|
-
J(
|
|
22336
|
+
J(w).hostConfirmation && J(ie) && !J(E) ? (X(), F(Ow, {
|
|
22320
22337
|
key: 3,
|
|
22321
|
-
question: J(
|
|
22322
|
-
details: J(
|
|
22323
|
-
unchanged: J(
|
|
22324
|
-
onRespond: J(
|
|
22338
|
+
question: J(w).hostConfirmation.question ?? J(ne)("toolApproval.prompt"),
|
|
22339
|
+
details: J(w).hostConfirmation.details,
|
|
22340
|
+
unchanged: J(w).hostConfirmation.unchanged,
|
|
22341
|
+
onRespond: J(w).respondHostConfirmation
|
|
22325
22342
|
}, null, 8, [
|
|
22326
22343
|
"question",
|
|
22327
22344
|
"details",
|
|
22328
22345
|
"unchanged",
|
|
22329
22346
|
"onRespond"
|
|
22330
22347
|
])) : K("", !0),
|
|
22331
|
-
J(de) ? (X(), Y("div", eE, [L("p", null, V(J(
|
|
22348
|
+
J(de) ? (X(), Y("div", eE, [L("p", null, V(J(ne)("message.agentNotFound")), 1)])) : K("", !0),
|
|
22332
22349
|
j(W, {
|
|
22333
22350
|
name: "fade",
|
|
22334
22351
|
appear: ""
|
|
@@ -22405,8 +22422,8 @@ var eE = {
|
|
|
22405
22422
|
"page-tool-registry": J(_e),
|
|
22406
22423
|
"page-forms": J(ye),
|
|
22407
22424
|
closable: !!e.closable && e.closable !== "false",
|
|
22408
|
-
onError:
|
|
22409
|
-
onLoaded: J(
|
|
22425
|
+
onError: T,
|
|
22426
|
+
onLoaded: J(te).onLoaded,
|
|
22410
22427
|
onSelectionAction: n[8] ||= (e) => J(Xi)("selection_action", e),
|
|
22411
22428
|
onClose: n[9] ||= (e) => J(a)("close-requested")
|
|
22412
22429
|
}, ve({
|