@8wave/ai-elements 0.123.0-beta.14 → 0.123.0-beta.16
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/_chunks/{PkChatbotFilePreview-Dgikkf9Y.js → PkChatbotFilePreview-Dk748hZ0.js} +2 -2
- package/dist/_chunks/{PkChatbotFilePreview-Dgikkf9Y.js.map → PkChatbotFilePreview-Dk748hZ0.js.map} +1 -1
- package/dist/_chunks/{PkFilePreview-CG9peejh.js → PkFilePreview-Bcdfci6i.js} +2 -2
- package/dist/_chunks/{PkFilePreview-CG9peejh.js.map → PkFilePreview-Bcdfci6i.js.map} +1 -1
- package/dist/_chunks/{PkFilePreviewDialog-jzUvrw9R.js → PkFilePreviewDialog-nibxELSF.js} +2 -2
- package/dist/_chunks/{PkFilePreviewDialog-jzUvrw9R.js.map → PkFilePreviewDialog-nibxELSF.js.map} +1 -1
- package/dist/_chunks/{PkStreamingMarkdown-DI1AjsVC.js → PkStreamingMarkdown-C6cFkf82.js} +4 -4
- package/dist/_chunks/{PkStreamingMarkdown-DI1AjsVC.js.map → PkStreamingMarkdown-C6cFkf82.js.map} +1 -1
- package/dist/_chunks/{PkToolChatFile-BKX_7nJp.js → PkToolChatFile-5t_1vL81.js} +3 -3
- package/dist/_chunks/{PkToolChatFile-BKX_7nJp.js.map → PkToolChatFile-5t_1vL81.js.map} +1 -1
- package/dist/_chunks/{PkToolRequestOAuthConnection-BYXzi6XB.js → PkToolRequestOAuthConnection-ST3-OlS4.js} +2 -2
- package/dist/_chunks/{PkToolRequestOAuthConnection-BYXzi6XB.js.map → PkToolRequestOAuthConnection-ST3-OlS4.js.map} +1 -1
- package/dist/_chunks/{PkToolShareDocument-D2uV6p8t.js → PkToolShareDocument-1zhZDa0R.js} +2 -2
- package/dist/_chunks/{PkToolShareDocument-D2uV6p8t.js.map → PkToolShareDocument-1zhZDa0R.js.map} +1 -1
- package/dist/_chunks/{PkToolShowArtifact-CyKWxAff.js → PkToolShowArtifact-DV78g_yD.js} +2 -2
- package/dist/_chunks/{PkToolShowArtifact-CyKWxAff.js.map → PkToolShowArtifact-DV78g_yD.js.map} +1 -1
- package/dist/_chunks/{PkToolShowCalendarEvent-BF2aXrwP.js → PkToolShowCalendarEvent-Dvp1SwBY.js} +2 -2
- package/dist/_chunks/{PkToolShowCalendarEvent-BF2aXrwP.js.map → PkToolShowCalendarEvent-Dvp1SwBY.js.map} +1 -1
- package/dist/_chunks/{PkToolShowContactForm-C-U785n6.js → PkToolShowContactForm-Bnjy0g50.js} +4 -4
- package/dist/_chunks/{PkToolShowContactForm-C-U785n6.js.map → PkToolShowContactForm-Bnjy0g50.js.map} +1 -1
- package/dist/_chunks/{PkToolShowDiagram-Bs5Ri9df.js → PkToolShowDiagram-C1Q5jhbk.js} +3 -3
- package/dist/_chunks/{PkToolShowDiagram-Bs5Ri9df.js.map → PkToolShowDiagram-C1Q5jhbk.js.map} +1 -1
- package/dist/_chunks/{PkToolShowForm-CN5jvQqQ.js → PkToolShowForm-CT5_ln9b.js} +3 -3
- package/dist/_chunks/{PkToolShowForm-CN5jvQqQ.js.map → PkToolShowForm-CT5_ln9b.js.map} +1 -1
- package/dist/_chunks/{PkToolShowImageGallery-BtgWr1lk.js → PkToolShowImageGallery-BMP-xuYr.js} +4 -4
- package/dist/_chunks/{PkToolShowImageGallery-BtgWr1lk.js.map → PkToolShowImageGallery-BMP-xuYr.js.map} +1 -1
- package/dist/_chunks/{PkToolShowLocation-COmQJbXp.js → PkToolShowLocation-Drq1nnwN.js} +2 -2
- package/dist/_chunks/{PkToolShowLocation-COmQJbXp.js.map → PkToolShowLocation-Drq1nnwN.js.map} +1 -1
- package/dist/_chunks/{PkToolShowProductList-CRy6jNPa.js → PkToolShowProductList-AkLG4dBV.js} +2 -2
- package/dist/_chunks/{PkToolShowProductList-CRy6jNPa.js.map → PkToolShowProductList-AkLG4dBV.js.map} +1 -1
- package/dist/_chunks/{PkToolShowSources-CQweChKW.js → PkToolShowSources-DhZ5I_J-.js} +3 -3
- package/dist/_chunks/{PkToolShowSources-CQweChKW.js.map → PkToolShowSources-DhZ5I_J-.js.map} +1 -1
- package/dist/_chunks/{PkToolShowVideo-C8dP8I-g.js → PkToolShowVideo-C5jqPYXw.js} +3 -3
- package/dist/_chunks/{PkToolShowVideo-C8dP8I-g.js.map → PkToolShowVideo-C5jqPYXw.js.map} +1 -1
- package/dist/_chunks/{PkToolShowWeather-sx72yMH6.js → PkToolShowWeather-7_f5k1pX.js} +2 -2
- package/dist/_chunks/{PkToolShowWeather-sx72yMH6.js.map → PkToolShowWeather-7_f5k1pX.js.map} +1 -1
- package/dist/_chunks/{PkToolShowWebPages-fXkqV27c.js → PkToolShowWebPages-BqL9PjpM.js} +3 -3
- package/dist/_chunks/{PkToolShowWebPages-fXkqV27c.js.map → PkToolShowWebPages-BqL9PjpM.js.map} +1 -1
- package/dist/_chunks/{browser-CwAulEhA.js → browser-DnbodHv5.js} +32 -18
- package/dist/_chunks/browser-DnbodHv5.js.map +1 -0
- package/dist/_chunks/{chatImagePolicy-B183jp31.js → chatImagePolicy-ZiVuD6nX.js} +2 -2
- package/dist/_chunks/{chatImagePolicy-B183jp31.js.map → chatImagePolicy-ZiVuD6nX.js.map} +1 -1
- package/dist/_chunks/{index.es-DYy-Q9hZ.js → index.es-DRbDRAW5.js} +2 -2
- package/dist/_chunks/{index.es-DYy-Q9hZ.js.map → index.es-DRbDRAW5.js.map} +1 -1
- package/dist/_chunks/src-JJyCGvqH.js +183 -0
- package/dist/_chunks/src-JJyCGvqH.js.map +1 -0
- package/dist/_chunks/{useLightbox-B575Qxeu.js → useLightbox-BigL4WLe.js} +2 -2
- package/dist/_chunks/{useLightbox-B575Qxeu.js.map → useLightbox-BigL4WLe.js.map} +1 -1
- package/dist/_chunks/{utils-COV6n6VV.js → utils-B5VcWm3g.js} +2 -2
- package/dist/_chunks/{utils-COV6n6VV.js.map → utils-B5VcWm3g.js.map} +1 -1
- package/dist/ai-elements.es.js +23 -23
- package/dist-vue/PkChatbot.js +1 -1
- package/dist-vue/PkChatbotAudioTranscript.js +1 -1
- package/dist-vue/PkChatbotEmptyState.js +1 -1
- package/dist-vue/PkChatbotFilePreview.js +1 -1
- package/dist-vue/PkChatbotInput.js +1 -1
- package/dist-vue/PkChatbotMessages.js +1 -1
- package/dist-vue/PkChatbotStepPayload.js +1 -1
- package/dist-vue/PkChatbotStepToolDetail.js +1 -1
- package/dist-vue/PkChatbotSteps.js +1 -1
- package/dist-vue/PkChatbotViewChat.js +1 -1
- package/dist-vue/PkChatbotViewConversations.js +1 -1
- package/dist-vue/PkChatbotViewFiles.js +1 -1
- package/dist-vue/PkChatbotViewProfile.js +1 -1
- package/dist-vue/_chunks/{PkChatbot-DGut25cv.js → PkChatbot-tq-fJUij.js} +8 -8
- package/dist-vue/_chunks/{PkChatbot-DGut25cv.js.map → PkChatbot-tq-fJUij.js.map} +1 -1
- package/dist-vue/_chunks/{PkChatbotAudioTranscript-DiZ7BEEH.js → PkChatbotAudioTranscript-SSTh074Z.js} +2 -2
- package/dist-vue/_chunks/{PkChatbotAudioTranscript-DiZ7BEEH.js.map → PkChatbotAudioTranscript-SSTh074Z.js.map} +1 -1
- package/dist-vue/_chunks/{PkChatbotEmptyState-DT9Pxyjt.js → PkChatbotEmptyState-Dp0_UPJm.js} +2 -2
- package/dist-vue/_chunks/{PkChatbotEmptyState-DT9Pxyjt.js.map → PkChatbotEmptyState-Dp0_UPJm.js.map} +1 -1
- package/dist-vue/_chunks/{PkChatbotFilePreview-BiurawUn.js → PkChatbotFilePreview-KxVpL0UT.js} +2 -2
- package/dist-vue/_chunks/{PkChatbotFilePreview-BiurawUn.js.map → PkChatbotFilePreview-KxVpL0UT.js.map} +1 -1
- package/dist-vue/_chunks/{PkChatbotInput-liQNntaY.js → PkChatbotInput-B_kPnNNB.js} +3 -3
- package/dist-vue/_chunks/{PkChatbotInput-liQNntaY.js.map → PkChatbotInput-B_kPnNNB.js.map} +1 -1
- package/dist-vue/_chunks/{PkChatbotMessages-CDhi_NvV.js → PkChatbotMessages-BTZOic9V.js} +22 -22
- package/dist-vue/_chunks/{PkChatbotMessages-CDhi_NvV.js.map → PkChatbotMessages-BTZOic9V.js.map} +1 -1
- package/dist-vue/_chunks/{PkChatbotStepPayload-XMAC8eoc.js → PkChatbotStepPayload-CoGCHBhJ.js} +2 -2
- package/dist-vue/_chunks/{PkChatbotStepPayload-XMAC8eoc.js.map → PkChatbotStepPayload-CoGCHBhJ.js.map} +1 -1
- package/dist-vue/_chunks/{PkChatbotStepToolDetail-CPWnpmuB.js → PkChatbotStepToolDetail-BJtIZBF0.js} +3 -3
- package/dist-vue/_chunks/{PkChatbotStepToolDetail-CPWnpmuB.js.map → PkChatbotStepToolDetail-BJtIZBF0.js.map} +1 -1
- package/dist-vue/_chunks/{PkChatbotSteps-CyT4Ck3C.js → PkChatbotSteps-CEJNclG4.js} +5 -5
- package/dist-vue/_chunks/{PkChatbotSteps-CyT4Ck3C.js.map → PkChatbotSteps-CEJNclG4.js.map} +1 -1
- package/dist-vue/_chunks/{PkChatbotViewChat-8Ss2bt2I.js → PkChatbotViewChat-CnEOSH32.js} +8 -8
- package/dist-vue/_chunks/{PkChatbotViewChat-8Ss2bt2I.js.map → PkChatbotViewChat-CnEOSH32.js.map} +1 -1
- package/dist-vue/_chunks/{PkChatbotViewConversations-ImCdmkUi.js → PkChatbotViewConversations-D7j5P1RO.js} +4 -4
- package/dist-vue/_chunks/{PkChatbotViewConversations-ImCdmkUi.js.map → PkChatbotViewConversations-D7j5P1RO.js.map} +1 -1
- package/dist-vue/_chunks/{PkChatbotViewFiles-Ccti1JAS.js → PkChatbotViewFiles-B1mncBOo.js} +2 -2
- package/dist-vue/_chunks/{PkChatbotViewFiles-Ccti1JAS.js.map → PkChatbotViewFiles-B1mncBOo.js.map} +1 -1
- package/dist-vue/_chunks/{PkChatbotViewProfile-ChEItAHZ.js → PkChatbotViewProfile--TWIrhYk.js} +2 -2
- package/dist-vue/_chunks/{PkChatbotViewProfile-ChEItAHZ.js.map → PkChatbotViewProfile--TWIrhYk.js.map} +1 -1
- package/dist-vue/_chunks/{PkFilePreview-CfzGAziV.js → PkFilePreview-BKwnNsyV.js} +2 -2
- package/dist-vue/_chunks/{PkFilePreview-CfzGAziV.js.map → PkFilePreview-BKwnNsyV.js.map} +1 -1
- package/dist-vue/_chunks/{PkFilePreviewDialog-DXIGcmYa.js → PkFilePreviewDialog-Cic7gmVR.js} +2 -2
- package/dist-vue/_chunks/{PkFilePreviewDialog-DXIGcmYa.js.map → PkFilePreviewDialog-Cic7gmVR.js.map} +1 -1
- package/dist-vue/_chunks/{PkStreamingMarkdown-BTcd7ku7.js → PkStreamingMarkdown-CYlCIfA0.js} +3 -3
- package/dist-vue/_chunks/{PkStreamingMarkdown-BTcd7ku7.js.map → PkStreamingMarkdown-CYlCIfA0.js.map} +1 -1
- package/dist-vue/_chunks/{PkSvgViewer-CvKzI689.js → PkSvgViewer-DBYr0CUi.js} +2 -2
- package/dist-vue/_chunks/{PkSvgViewer-CvKzI689.js.map → PkSvgViewer-DBYr0CUi.js.map} +1 -1
- package/dist-vue/_chunks/{PkToolChatFile-DHZjc9cf.js → PkToolChatFile-B_PeJef8.js} +3 -3
- package/dist-vue/_chunks/{PkToolChatFile-DHZjc9cf.js.map → PkToolChatFile-B_PeJef8.js.map} +1 -1
- package/dist-vue/_chunks/{PkToolRequestOAuthConnection-Dy0GXNwC.js → PkToolRequestOAuthConnection-C9_w8V0T.js} +2 -2
- package/dist-vue/_chunks/{PkToolRequestOAuthConnection-Dy0GXNwC.js.map → PkToolRequestOAuthConnection-C9_w8V0T.js.map} +1 -1
- package/dist-vue/_chunks/{PkToolShareDocument-DHrzH95L.js → PkToolShareDocument-CsS5OTDj.js} +2 -2
- package/dist-vue/_chunks/{PkToolShareDocument-DHrzH95L.js.map → PkToolShareDocument-CsS5OTDj.js.map} +1 -1
- package/dist-vue/_chunks/{PkToolShowArtifact-BDfqYsCD.js → PkToolShowArtifact-Bh-jIo0V.js} +2 -2
- package/dist-vue/_chunks/{PkToolShowArtifact-BDfqYsCD.js.map → PkToolShowArtifact-Bh-jIo0V.js.map} +1 -1
- package/dist-vue/_chunks/{PkToolShowCalendarEvent-75TaGeMf.js → PkToolShowCalendarEvent-BsAOYLjp.js} +2 -2
- package/dist-vue/_chunks/{PkToolShowCalendarEvent-75TaGeMf.js.map → PkToolShowCalendarEvent-BsAOYLjp.js.map} +1 -1
- package/dist-vue/_chunks/{PkToolShowContactForm-4f3q-cfC.js → PkToolShowContactForm-BjfRuNuj.js} +4 -4
- package/dist-vue/_chunks/{PkToolShowContactForm-4f3q-cfC.js.map → PkToolShowContactForm-BjfRuNuj.js.map} +1 -1
- package/dist-vue/_chunks/{PkToolShowDiagram-CwowbfOT.js → PkToolShowDiagram-_NnrFDGT.js} +4 -4
- package/dist-vue/_chunks/{PkToolShowDiagram-CwowbfOT.js.map → PkToolShowDiagram-_NnrFDGT.js.map} +1 -1
- package/dist-vue/_chunks/{PkToolShowForm-xFFBo17s.js → PkToolShowForm-AqEY4_do.js} +3 -3
- package/dist-vue/_chunks/{PkToolShowForm-xFFBo17s.js.map → PkToolShowForm-AqEY4_do.js.map} +1 -1
- package/dist-vue/_chunks/{PkToolShowImageGallery-_hd3FyqC.js → PkToolShowImageGallery-DM5AJNZ3.js} +4 -4
- package/dist-vue/_chunks/{PkToolShowImageGallery-_hd3FyqC.js.map → PkToolShowImageGallery-DM5AJNZ3.js.map} +1 -1
- package/dist-vue/_chunks/{PkToolShowLocation-C7hBRwq8.js → PkToolShowLocation-DAQEuCuQ.js} +2 -2
- package/dist-vue/_chunks/{PkToolShowLocation-C7hBRwq8.js.map → PkToolShowLocation-DAQEuCuQ.js.map} +1 -1
- package/dist-vue/_chunks/{PkToolShowProductList-BPSYoZVU.js → PkToolShowProductList-CAV8be9a.js} +2 -2
- package/dist-vue/_chunks/{PkToolShowProductList-BPSYoZVU.js.map → PkToolShowProductList-CAV8be9a.js.map} +1 -1
- package/dist-vue/_chunks/{PkToolShowSources-CzFNTuWy.js → PkToolShowSources-CriswKr_.js} +3 -3
- package/dist-vue/_chunks/{PkToolShowSources-CzFNTuWy.js.map → PkToolShowSources-CriswKr_.js.map} +1 -1
- package/dist-vue/_chunks/{PkToolShowVideo-Dr7UtU-3.js → PkToolShowVideo-FSWM5MOl.js} +3 -3
- package/dist-vue/_chunks/{PkToolShowVideo-Dr7UtU-3.js.map → PkToolShowVideo-FSWM5MOl.js.map} +1 -1
- package/dist-vue/_chunks/{PkToolShowWeather-Z6vCrhh9.js → PkToolShowWeather-BC-Rx-sI.js} +2 -2
- package/dist-vue/_chunks/{PkToolShowWeather-Z6vCrhh9.js.map → PkToolShowWeather-BC-Rx-sI.js.map} +1 -1
- package/dist-vue/_chunks/{PkToolShowWebPages-CAeOJ5xx.js → PkToolShowWebPages-CPhm2ba3.js} +3 -3
- package/dist-vue/_chunks/{PkToolShowWebPages-CAeOJ5xx.js.map → PkToolShowWebPages-CPhm2ba3.js.map} +1 -1
- package/dist-vue/_chunks/{createChatbotApiClient-CuqGJGHD.js → createChatbotApiClient-CFKeOgEA.js} +2 -2
- package/dist-vue/_chunks/{createChatbotApiClient-CuqGJGHD.js.map → createChatbotApiClient-CFKeOgEA.js.map} +1 -1
- package/dist-vue/_chunks/{mcpOAuthReport-BdegDfcz.js → mcpOAuthReport-D-MtFYwN.js} +2 -2
- package/dist-vue/_chunks/{mcpOAuthReport-BdegDfcz.js.map → mcpOAuthReport-D-MtFYwN.js.map} +1 -1
- package/dist-vue/_chunks/src-nb8MU1sh.js +183 -0
- package/dist-vue/_chunks/src-nb8MU1sh.js.map +1 -0
- package/dist-vue/_chunks/{useChatbotStore-C1lW6qXE.js → useChatbotStore--6ws3cew.js} +4 -4
- package/dist-vue/_chunks/{useChatbotStore-C1lW6qXE.js.map → useChatbotStore--6ws3cew.js.map} +1 -1
- package/dist-vue/_chunks/{useSafeLocalStorage-DImmddot.js → useSafeLocalStorage-Bn4SsL8C.js} +2 -2
- package/dist-vue/_chunks/{useSafeLocalStorage-DImmddot.js.map → useSafeLocalStorage-Bn4SsL8C.js.map} +1 -1
- package/dist-vue/_chunks/{utils-D9BAduwQ.js → utils-BgvjC1Pu.js} +2 -2
- package/dist-vue/_chunks/{utils-D9BAduwQ.js.map → utils-BgvjC1Pu.js.map} +1 -1
- package/dist-vue/api.js +1 -1
- package/dist-vue/composables.js +4 -4
- package/dist-vue/index.js +31 -31
- package/package.json +1 -1
- package/dist/_chunks/browser-CwAulEhA.js.map +0 -1
- package/dist/_chunks/src-Bg96usAF.js +0 -132
- package/dist/_chunks/src-Bg96usAF.js.map +0 -1
- package/dist-vue/_chunks/src-j7iLdNe4.js +0 -132
- package/dist-vue/_chunks/src-j7iLdNe4.js.map +0 -1
|
@@ -0,0 +1,183 @@
|
|
|
1
|
+
import "vue";
|
|
2
|
+
// ../../packages/utils/src/query-error.ts
|
|
3
|
+
var e = 20, t = 50, n = /(Failed query: [\s\S]*?\nparams: )(?!values not logged|\d+ values, not logged)[\s\S]*?(?=\n[ \t]+at [^\n]*:\d+:\d+\)?(?:\n|$)|$)/g, r = /(Failed query: (?:[^"\\]|\\.)*?\\nparams: )(?!values not logged|\d+ values, not logged)(?:[^"\\]|\\.)*/g;
|
|
4
|
+
function i(t) {
|
|
5
|
+
let n = c(t), r = /* @__PURE__ */ new Set();
|
|
6
|
+
for (; n.length > 0 && r.size < e;) {
|
|
7
|
+
let e = n.shift();
|
|
8
|
+
if (!(e instanceof Error) || r.has(e)) continue;
|
|
9
|
+
r.add(e), l(e), n.push(e.cause);
|
|
10
|
+
let t = e.errors;
|
|
11
|
+
Array.isArray(t) && n.push(...t);
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
function a(e) {
|
|
15
|
+
return e.includes("Failed query: ") ? e.replace(n, "$1values not logged").replace(r, "$1values not logged") : e;
|
|
16
|
+
}
|
|
17
|
+
function o(e) {
|
|
18
|
+
return e.map((e) => (i(e), typeof e == "string" ? a(e) : e));
|
|
19
|
+
}
|
|
20
|
+
function s(e) {
|
|
21
|
+
let t = Object.keys(e), n = o(t.map((t) => e[t]));
|
|
22
|
+
return Object.fromEntries(t.map((e, t) => [e, n[t]]));
|
|
23
|
+
}
|
|
24
|
+
var c = (e) => {
|
|
25
|
+
if (e instanceof Error || typeof e != "object" || !e) return [e];
|
|
26
|
+
let n = Object.getPrototypeOf(e);
|
|
27
|
+
if (!Array.isArray(e) && n !== Object.prototype && n !== null) return [];
|
|
28
|
+
let r = [];
|
|
29
|
+
try {
|
|
30
|
+
for (let n in e) {
|
|
31
|
+
if (r.length >= t) break;
|
|
32
|
+
r.push(e[n]);
|
|
33
|
+
}
|
|
34
|
+
} catch {}
|
|
35
|
+
return r;
|
|
36
|
+
}, l = (e) => {
|
|
37
|
+
let { query: t, params: n } = e;
|
|
38
|
+
if (typeof t != "string" || !Array.isArray(n) || !Object.prototype.propertyIsEnumerable.call(e, "params") || typeof e.message != "string" || !e.message.startsWith("Failed query: ")) return;
|
|
39
|
+
let r = `Failed query: ${t}\nparams: ${n.length} values, not logged`;
|
|
40
|
+
try {
|
|
41
|
+
e.stack = typeof e.stack == "string" && e.stack.includes(e.message) ? e.stack.replace(e.message, () => r) : `${e.name}: ${r}`, e.message = r, Object.defineProperty(e, "params", {
|
|
42
|
+
value: n,
|
|
43
|
+
enumerable: !1,
|
|
44
|
+
writable: !0,
|
|
45
|
+
configurable: !0
|
|
46
|
+
});
|
|
47
|
+
} catch {}
|
|
48
|
+
}, u = null, d = /pass(word)?|secret|token|api[-_]?key|authorization|cookie|credential/i, f = 3, p = 2e3, m = (e) => {
|
|
49
|
+
let t = /* @__PURE__ */ new WeakSet(), n = (e, r) => {
|
|
50
|
+
if (e instanceof Error) return i(e), e.stack ?? e.message;
|
|
51
|
+
if (typeof e == "bigint") return `${e.toString()}n`;
|
|
52
|
+
if (typeof e == "function" || typeof e == "symbol") return String(e);
|
|
53
|
+
if (typeof e != "object" || !e) return e;
|
|
54
|
+
if (t.has(e)) return "[Circular]";
|
|
55
|
+
if (r >= f) return Array.isArray(e) ? "[Array]" : "[Object]";
|
|
56
|
+
t.add(e);
|
|
57
|
+
try {
|
|
58
|
+
if (Array.isArray(e)) return e.map((e) => n(e, r + 1));
|
|
59
|
+
let t = {};
|
|
60
|
+
for (let [i, a] of Object.entries(e)) t[i] = d.test(i) ? "[REDACTED]" : n(a, r + 1);
|
|
61
|
+
return t;
|
|
62
|
+
} finally {
|
|
63
|
+
t.delete(e);
|
|
64
|
+
}
|
|
65
|
+
};
|
|
66
|
+
try {
|
|
67
|
+
let t = n(e, 0), r = typeof t == "string" ? t : JSON.stringify(t);
|
|
68
|
+
return typeof r == "string" ? r.length > p ? `${r.slice(0, p)}… [truncated]` : r : String(r);
|
|
69
|
+
} catch {
|
|
70
|
+
return "[Unserializable]";
|
|
71
|
+
}
|
|
72
|
+
}, h = 5, g = (e) => {
|
|
73
|
+
let t = [e.stack ?? e.message], n = /* @__PURE__ */ new Set([e]), r = e.cause;
|
|
74
|
+
for (let e = 0; r != null && !n.has(r) && e < h; e++) n.add(r), r instanceof Error ? (t.push(`Caused by: ${r.stack ?? r.message}`), r = r.cause) : (t.push(`Caused by: ${m(r)}`), r = void 0);
|
|
75
|
+
return t.join("\n");
|
|
76
|
+
}, _ = (e) => e instanceof Error ? g(e) : typeof e == "object" && e ? m(e) : String(e), v = (e) => e.find((e) => e instanceof Error) || Error(e.map(_).join(" ")), y = (e) => a(e.map(_).join(" ")), b = typeof window > "u", x = (b ? process?.env?.VITE_LOCAL === "true" : !1) || b, S = {
|
|
77
|
+
debug: 10,
|
|
78
|
+
info: 20,
|
|
79
|
+
warn: 30,
|
|
80
|
+
error: 40,
|
|
81
|
+
fatal: 50
|
|
82
|
+
}, C = b ? ((e) => S[(e ?? "").toLowerCase()] ?? S.info)(process?.env?.LOG_LEVEL) : S.info, w = (e) => x && S[e] >= C, T = (...e) => {
|
|
83
|
+
let t = o(e);
|
|
84
|
+
w("info") && console.log(...t), u?.logInfo(y(t));
|
|
85
|
+
}, E = (...e) => {
|
|
86
|
+
let t = o(e), n = v(t);
|
|
87
|
+
u?.logException(n), w("error") && console.error(y(t));
|
|
88
|
+
}, D = (...e) => {
|
|
89
|
+
let t = o(e);
|
|
90
|
+
w("info") && console.info(...t), u?.logInfo(y(t));
|
|
91
|
+
}, O = (...e) => {
|
|
92
|
+
let t = o(e);
|
|
93
|
+
w("debug") && console.debug(...t), u?.logDebug(y(t));
|
|
94
|
+
}, k = (...e) => {
|
|
95
|
+
let t = o(e);
|
|
96
|
+
v(t);
|
|
97
|
+
let n = y(t);
|
|
98
|
+
u?.logWarn(n), w("warn") && console.warn(n);
|
|
99
|
+
}, A = (e, t) => t ? y([e, t]) : e, j = {
|
|
100
|
+
log: T,
|
|
101
|
+
error: E,
|
|
102
|
+
info: D,
|
|
103
|
+
debug: O,
|
|
104
|
+
warn: k,
|
|
105
|
+
warnAttrs: (e, t) => {
|
|
106
|
+
let n = t && s(t);
|
|
107
|
+
u?.logWarn(e, n), w("warn") && console.warn(A(e, n));
|
|
108
|
+
},
|
|
109
|
+
logEvent: (e, t) => {
|
|
110
|
+
let n = t && s(t);
|
|
111
|
+
u?.logEvent(e, n), x && console.log(A(e, n));
|
|
112
|
+
},
|
|
113
|
+
assert: (e, t) => {
|
|
114
|
+
x && console.assert(e, t);
|
|
115
|
+
},
|
|
116
|
+
clear: () => {
|
|
117
|
+
x && console.clear();
|
|
118
|
+
},
|
|
119
|
+
table: (e) => {
|
|
120
|
+
w("info") && console.table(e);
|
|
121
|
+
},
|
|
122
|
+
group: (e) => {
|
|
123
|
+
x && console.group(e);
|
|
124
|
+
},
|
|
125
|
+
groupEnd: () => {
|
|
126
|
+
x && console.groupEnd();
|
|
127
|
+
},
|
|
128
|
+
time: (e) => {
|
|
129
|
+
x && console.time(e);
|
|
130
|
+
},
|
|
131
|
+
timeEnd: (e) => {
|
|
132
|
+
x && console.timeEnd(e);
|
|
133
|
+
},
|
|
134
|
+
timeLog: (e, ...t) => {
|
|
135
|
+
x && console.timeLog(e, ...t);
|
|
136
|
+
}
|
|
137
|
+
};
|
|
138
|
+
new TextEncoder();
|
|
139
|
+
// ../../packages/utils/src/phoneNumber.ts
|
|
140
|
+
var M = /* @__PURE__ */ new Set(["1", "7"]), N = new Set("20 27 30 31 32 33 34 36 39 40 41 43 44 45 46 47 48 49 51 52 53 54 55 56 57 58 60 61 62 63 64 65 66 81 82 84 86 90 91 92 93 94 95 98".split(" "));
|
|
141
|
+
function P(e) {
|
|
142
|
+
let t = M.has(e.slice(0, 1)) ? 1 : N.has(e.slice(0, 2)) ? 2 : 3;
|
|
143
|
+
return e.length > t ? [e.slice(0, t), e.slice(t)] : void 0;
|
|
144
|
+
}
|
|
145
|
+
function F(e, t = "+39") {
|
|
146
|
+
if (!e) return "";
|
|
147
|
+
let n = e.trim().replace(/[^\d+]/g, "");
|
|
148
|
+
if (!n) return "";
|
|
149
|
+
let r = "", i = t.replace("+", "");
|
|
150
|
+
if (n.startsWith("+")) {
|
|
151
|
+
let e = n.match(/^\+(\d+)$/);
|
|
152
|
+
if (e) {
|
|
153
|
+
let t = e[1];
|
|
154
|
+
if (t.startsWith(i)) r = t.substring(i.length);
|
|
155
|
+
else {
|
|
156
|
+
let e = P(t);
|
|
157
|
+
e && ([i, r] = e);
|
|
158
|
+
}
|
|
159
|
+
}
|
|
160
|
+
} else if (n.startsWith("00")) {
|
|
161
|
+
let e = n.substring(2);
|
|
162
|
+
if (e.startsWith(i)) r = e.substring(i.length);
|
|
163
|
+
else {
|
|
164
|
+
let t = P(e);
|
|
165
|
+
t && ([i, r] = t);
|
|
166
|
+
}
|
|
167
|
+
} else n.startsWith(i) && n.length > i.length + 8 ? r = n.substring(i.length) : (r = n, i !== "39" && r.startsWith("0") && r.length > 1 && (r = r.substring(1)));
|
|
168
|
+
if (!r) return e;
|
|
169
|
+
let a = `+${i}`;
|
|
170
|
+
if (i === "39" && r.length === 10 && r.startsWith("3") || i === "39" && r.length >= 9 && r.length <= 11 && r.startsWith("0")) return `${a} ${r.substring(0, 3)} ${r.substring(3)}`;
|
|
171
|
+
let o = [], s = r;
|
|
172
|
+
for (; s.length > 0;) {
|
|
173
|
+
if (s.length <= 4) {
|
|
174
|
+
o.push(s);
|
|
175
|
+
break;
|
|
176
|
+
}
|
|
177
|
+
o.push(s.substring(0, 3)), s = s.substring(3);
|
|
178
|
+
}
|
|
179
|
+
return `${a} ${o.join(" ")}`;
|
|
180
|
+
}
|
|
181
|
+
export { j as n, F as t };
|
|
182
|
+
|
|
183
|
+
//# sourceMappingURL=src-nb8MU1sh.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"src-nb8MU1sh.js","names":["MAX_ERRORS","MAX_HELD_VALUES","QUERY_PARAMS_IN_TEXT","QUERY_PARAMS_IN_JSON","redactQueryParams","pending","errorsHeldBy","value","visited","current","redactOne","aggregated","redactQueryParamsInText","text","redactQueryParamsInValues","values","redactQueryParamsInAttributes","keys","attributes","key","index","prototype","held","error","query","params","message","_otelBridge","SENSITIVE_KEY_RE","SERIALIZE_MAX_DEPTH","SERIALIZE_MAX_LENGTH","safeSerialize","seen","render","val","depth","item","out","rendered","CAUSE_MAX_DEPTH","formatError","lines","printed","cause","formatParam","param","extractError","p","formatParams","isServerSide","isLoggingEnabled","LEVEL_WEIGHT","_consoleFloor","level","printsAt","log","safe","err","info","debug","warn","withAttrs","attrs","logger","name","condition","table","ONE_DIGIT_COUNTRY_CODES","TWO_DIGIT_COUNTRY_CODES","splitCountryCode","length","digits","formatPhoneNumber","phone","cleaned","nationalNumber","countryCode","defaultPrefix","match","split","prefix","parts","remaining"],"sources":["../../../../packages/utils/src/query-error.ts","../../../../packages/utils/src/logger.ts","../../../../packages/utils/src/internal-signature.ts","../../../../packages/utils/src/phoneNumber.ts"],"sourcesContent":["/** How many errors one call looks at, causes and aggregates included. */\nconst MAX_ERRORS = 20\n\n/** How many values of a holder (`{ err }`, a list of params) are looked at. */\nconst MAX_HELD_VALUES = 50\n\n/**\n * The values of a failed query written into a text. Drizzle's message is\n * `Failed query: <sql>`, the SQL on as many lines as it was written, then\n * `params: <values>`, which run to the end of the message: to the first frame\n * of a stack or to the end of the text. A frame is a line indented with spaces\n * that starts with `at ` and ends in `:line:column`, which a page's text\n * almost never does; `\\s` in place of the spaces would read every run of blank\n * lines in the values again from each of its lines (1.5 s for 20,000 of them\n * on 2026-10-30). A section already redacted is left alone.\n */\nconst QUERY_PARAMS_IN_TEXT =\n /(Failed query: [\\s\\S]*?\\nparams: )(?!values not logged|\\d+ values, not logged)[\\s\\S]*?(?=\\n[ \\t]+at [^\\n]*:\\d+:\\d+\\)?(?:\\n|$)|$)/g\n\n/**\n * The same values in a text that went through `JSON.stringify`, an attribute\n * logged as JSON: the line breaks are written `\\n`, and the values run to the\n * quote that closes the string.\n */\nconst QUERY_PARAMS_IN_JSON =\n /(Failed query: (?:[^\"\\\\]|\\\\.)*?\\\\nparams: )(?!values not logged|\\d+ values, not logged)(?:[^\"\\\\]|\\\\.)*/g\n\n/**\n * Takes the bound values out of a failed query's error, in place: the error\n * itself, every cause and every error of an aggregate under it, or the errors\n * a holder carries one level down (`{ err }`, a list of params).\n *\n * Drizzle's `DrizzleQueryError` writes every value into its message, so into\n * its stack, and keeps them in an enumerable `params` that any serializer\n * copying the error carries too. On 2026-10-29 a failed document write put the\n * whole text of each page in the console logs, six times per delivery. The\n * SQL stays, the values become a count, and `params` stays on the error for\n * code that reads it but is no longer enumerable, which also marks the error\n * as done.\n *\n * It changes the error itself because the error travels on: rethrown to the\n * Functions host or to Fastify's error handler, which log it their own way.\n * Recognised by its shape, because this package does not depend on\n * drizzle-orm. Mirrored in packages/telemetry, which cannot import this one.\n */\nexport function redactQueryParams(value: unknown): void {\n const pending = errorsHeldBy(value)\n const visited = new Set<unknown>()\n while (pending.length > 0 && visited.size < MAX_ERRORS) {\n const current = pending.shift()\n if (!(current instanceof Error) || visited.has(current)) {\n continue\n }\n visited.add(current)\n redactOne(current)\n pending.push((current as { cause?: unknown }).cause)\n const aggregated = (current as { errors?: unknown }).errors\n if (Array.isArray(aggregated)) {\n pending.push(...aggregated)\n }\n }\n}\n\n/**\n * A text without the values of a failed query: for an error that became a\n * string before any sink saw it, `${String(error)}` in a message, a stack\n * passed on as text, or either inside JSON.\n */\nexport function redactQueryParamsInText(text: string): string {\n if (!text.includes('Failed query: ')) {\n return text\n }\n return text\n .replace(QUERY_PARAMS_IN_TEXT, '$1values not logged')\n .replace(QUERY_PARAMS_IN_JSON, '$1values not logged')\n}\n\n/**\n * Values about to be logged, without a failed query's values: every error\n * among them loses them in place, and a string that already carries one comes\n * back without them. For a logger that hands its params to a console as they\n * are.\n */\nexport function redactQueryParamsInValues(values: unknown[]): unknown[] {\n return values.map((value) => {\n redactQueryParams(value)\n return typeof value === 'string'\n ? redactQueryParamsInText(value)\n : value\n })\n}\n\n/**\n * Attributes about to be logged, the same way: a copy whose strings no longer\n * carry a failed query's values, every error among them changed in place.\n */\nexport function redactQueryParamsInAttributes(\n attributes: Record<string, unknown>,\n): Record<string, unknown> {\n const keys = Object.keys(attributes)\n const values = redactQueryParamsInValues(keys.map((key) => attributes[key]))\n return Object.fromEntries(keys.map((key, index) => [key, values[index]]))\n}\n\nconst errorsHeldBy = (value: unknown): unknown[] => {\n if (value instanceof Error || value === null || typeof value !== 'object') {\n return [value]\n }\n // Only what a caller builds to log, a plain object or a list: reading the\n // fields of a class instance, a DOM element or a framework object can run\n // code (a getter, a layout).\n const prototype: unknown = Object.getPrototypeOf(value)\n if (\n !Array.isArray(value) &&\n prototype !== Object.prototype &&\n prototype !== null\n ) {\n return []\n }\n const held: unknown[] = []\n // A getter that throws must not make a log call throw: what was read\n // before it is still looked at.\n try {\n for (const key in value) {\n if (held.length >= MAX_HELD_VALUES) {\n break\n }\n held.push((value as Record<string, unknown>)[key])\n }\n } catch {\n // Nothing to do: see above.\n }\n return held\n}\n\nconst redactOne = (error: Error): void => {\n const { query, params } = error as { query?: unknown; params?: unknown }\n if (\n typeof query !== 'string' ||\n !Array.isArray(params) ||\n !Object.prototype.propertyIsEnumerable.call(error, 'params') ||\n typeof error.message !== 'string' ||\n !error.message.startsWith('Failed query: ')\n ) {\n return\n }\n const message = `Failed query: ${query}\\nparams: ${params.length} values, not logged`\n try {\n // A stack that no longer starts from the message (something rewrote\n // the message) keeps the values wherever they are: its frames go\n // with them.\n error.stack =\n typeof error.stack === 'string' &&\n error.stack.includes(error.message)\n ? error.stack.replace(error.message, () => message)\n : `${error.name}: ${message}`\n error.message = message\n Object.defineProperty(error, 'params', {\n value: params,\n enumerable: false,\n writable: true,\n configurable: true,\n })\n } catch {\n // A frozen error cannot change, and a log call must not throw: the\n // text rule still takes the values out of what is printed.\n }\n}\n","import type { Ref } from 'vue'\nimport {\n redactQueryParams,\n redactQueryParamsInAttributes,\n redactQueryParamsInText,\n redactQueryParamsInValues,\n} from './query-error'\n\ntype ExceptionTracker = (\n error: Error,\n properties?: Record<string, string>,\n) => void\n\ntype OtelLoggerBridge = {\n logInfo: (msg: string, attrs?: Record<string, unknown>) => void\n logEvent: (name: string, attrs?: Record<string, unknown>) => void\n logDebug: (msg: string, attrs?: Record<string, unknown>) => void\n logWarn: (msg: string, attrs?: Record<string, unknown>) => void\n logError: (msg: string, attrs?: Record<string, unknown>) => void\n logException: (error: Error, attrs?: Record<string, unknown>) => void\n} | null\n\nlet _exceptionTracker: ExceptionTracker | undefined\n/** Runtime-set bridge to OTel LoggerProvider (set during backend init) */\nlet _otelBridge: OtelLoggerBridge = null\n\n/**\n * Registers the OTel logger bridge at runtime.\n * Called by the backend during startup; no-op in the frontend.\n */\nexport const setOtelLoggerBridge = (bridge: OtelLoggerBridge) => {\n _otelBridge = bridge\n}\n\n/**\n * Registers a callback invoked by error/warn/logError/logWarn to track exceptions\n * (e.g. OTel recordException + span status ERROR).\n */\nexport const setExceptionTracker = (tracker: ExceptionTracker) => {\n _exceptionTracker = tracker\n}\n\n/**\n * Keys whose values must never land in a log line. The OTel sink additionally\n * masks value patterns (see packages/telemetry/src/sanitization.ts), which\n * utils cannot import: the bridge exists precisely to avoid that dependency.\n */\nconst SENSITIVE_KEY_RE =\n /pass(word)?|secret|token|api[-_]?key|authorization|cookie|credential/i\nconst SERIALIZE_MAX_DEPTH = 3\nconst SERIALIZE_MAX_LENGTH = 2_000\n\n/**\n * Serializes a non-Error object for a log line. `String(param)` produced\n * `[object Object]`, which made whole error families undiagnosable. A naked\n * JSON.stringify is not the fix either: it throws on circular references and\n * BigInt, has no depth or length cap, and would promote sensitive fields\n * into the message. This handles all four.\n */\nconst safeSerialize = (value: unknown): string => {\n const seen = new WeakSet<object>()\n const render = (val: unknown, depth: number): unknown => {\n if (val instanceof Error) {\n redactQueryParams(val)\n return val.stack ?? val.message\n }\n if (typeof val === 'bigint') {\n return `${val.toString()}n`\n }\n if (typeof val === 'function' || typeof val === 'symbol') {\n return String(val)\n }\n if (typeof val !== 'object' || val === null) {\n return val\n }\n if (seen.has(val)) {\n return '[Circular]'\n }\n if (depth >= SERIALIZE_MAX_DEPTH) {\n return Array.isArray(val) ? '[Array]' : '[Object]'\n }\n // Added on the way down, removed on the way back up: only a true\n // cycle is flagged, a shared reference (the same object under two\n // keys) is rendered normally.\n seen.add(val)\n try {\n if (Array.isArray(val)) {\n return val.map((item) => render(item, depth + 1))\n }\n const out: Record<string, unknown> = {}\n for (const [key, item] of Object.entries(val)) {\n out[key] = SENSITIVE_KEY_RE.test(key)\n ? '[REDACTED]'\n : render(item, depth + 1)\n }\n return out\n } finally {\n seen.delete(val)\n }\n }\n try {\n const rendered = render(value, 0)\n const text =\n typeof rendered === 'string' ? rendered : JSON.stringify(rendered)\n if (typeof text !== 'string') {\n return String(text)\n }\n return text.length > SERIALIZE_MAX_LENGTH\n ? `${text.slice(0, SERIALIZE_MAX_LENGTH)}… [truncated]`\n : text\n } catch {\n return '[Unserializable]'\n }\n}\n\n/** How many causes a log line follows, however long the chain. */\nconst CAUSE_MAX_DEPTH = 5\n\n/**\n * An error as a log line shows it: its stack, then each cause in its chain,\n * each one once. Wrappers like Drizzle keep only \"Failed query\" in their own\n * message and put the Postgres error in `cause`, so a line with the stack\n * alone said which write failed and never why. Mirrors `formatCauseChain` in\n * packages/telemetry, which this package cannot import: that one renders the\n * exception record, this one the console line and the text a WARN or INFO\n * hands the bridge. A cause that is not an error goes through\n * `safeSerialize`, where telemetry's `String(cause)` would print\n * `[object Object]`.\n */\nconst formatError = (error: Error): string => {\n const lines = [error.stack ?? error.message]\n const printed = new Set<unknown>([error])\n let cause = (error as { cause?: unknown }).cause\n for (\n let depth = 0;\n cause != null && !printed.has(cause) && depth < CAUSE_MAX_DEPTH;\n depth++\n ) {\n printed.add(cause)\n if (cause instanceof Error) {\n lines.push(`Caused by: ${cause.stack ?? cause.message}`)\n cause = (cause as { cause?: unknown }).cause\n } else {\n lines.push(`Caused by: ${safeSerialize(cause)}`)\n cause = undefined\n }\n }\n return lines.join('\\n')\n}\n\nconst formatParam = (param: unknown): string => {\n if (param instanceof Error) {\n return formatError(param)\n }\n if (typeof param === 'object' && param !== null) {\n return safeSerialize(param)\n }\n return String(param)\n}\n\nconst extractError = (params: unknown[]): Error => {\n const found = params.find((p): p is Error => p instanceof Error)\n if (found) {\n return found\n }\n return new Error(params.map(formatParam).join(' '))\n}\n\nconst formatParams = (params: unknown[]): string => {\n return redactQueryParamsInText(params.map(formatParam).join(' '))\n}\n\nconst isServerSide = typeof window === 'undefined'\n// `import.meta.env` only exists in Vite builds: the cast keeps this file\n// compilable under plain Node tsconfigs (e.g. apps/azure-functions)\nconst isLocal = isServerSide\n ? process?.env?.VITE_LOCAL === 'true'\n : (import.meta as { env?: Record<string, unknown> }).env?.VITE_LOCAL ===\n 'true'\n\nconst isLoggingEnabled = isLocal || isServerSide\n\n/**\n * Console severity floor, read from `LOG_LEVEL`.\n *\n * The OTel bridge below has always honoured that variable, which is why\n * production exports no INFO rows. The console writers did not, and\n * `isLoggingEnabled` is unconditionally true on a server, so every info line\n * still reached stdout in every environment: the two sinks disagreed, and the\n * container log pipeline kept billing for rows nobody could query. Measured on\n * 2026-09-02: one knowledge-base search wrote three of them, one carrying 500\n * characters of dense-vector JSON, three times per turn.\n *\n * The default is `info`, so an environment that sets nothing keeps exactly the\n * output it has today. Note that an `error` is still tracked and exported when\n * the floor hides it from the console: only the console write is gated.\n */\nconst LEVEL_WEIGHT: Record<string, number> = {\n debug: 10,\n info: 20,\n warn: 30,\n error: 40,\n fatal: 50,\n}\nconst readLevel = (level: string | undefined): number =>\n LEVEL_WEIGHT[(level ?? '').toLowerCase()] ?? LEVEL_WEIGHT.info\n\nlet _consoleFloor = isServerSide\n ? readLevel(process?.env?.LOG_LEVEL)\n : LEVEL_WEIGHT.info\n\n/**\n * Overrides the console floor for a level chosen at runtime rather than by\n * env, mirroring `setLogLevel` on the OTel side. The backend calls both from\n * one place so the two sinks cannot drift (`apps/backend/src/main.ts`).\n */\nexport const setConsoleLogLevel = (level: string): void => {\n _consoleFloor = readLevel(level)\n}\n\n/** Whether a message of this severity should reach the console. */\nconst printsAt = (level: 'debug' | 'info' | 'warn' | 'error'): boolean =>\n isLoggingEnabled && LEVEL_WEIGHT[level] >= _consoleFloor\n\nexport const log = (...params: unknown[]) => {\n const safe = redactQueryParamsInValues(params)\n if (printsAt('info')) {\n // eslint-disable-next-line no-console\n console.log(...safe)\n }\n _otelBridge?.logInfo(formatParams(safe))\n}\n\nexport const error = (...params: unknown[]) => {\n const safe = redactQueryParamsInValues(params)\n const err = extractError(safe)\n _exceptionTracker?.(err)\n _otelBridge?.logException(err)\n if (printsAt('error')) {\n // eslint-disable-next-line no-console\n console.error(formatParams(safe))\n }\n}\n\nexport const info = (...params: unknown[]) => {\n const safe = redactQueryParamsInValues(params)\n if (printsAt('info')) {\n // eslint-disable-next-line no-console\n console.info(...safe)\n }\n _otelBridge?.logInfo(formatParams(safe))\n}\n\nexport const debug = (...params: unknown[]) => {\n const safe = redactQueryParamsInValues(params)\n if (printsAt('debug')) {\n // eslint-disable-next-line no-console\n console.debug(...safe)\n }\n _otelBridge?.logDebug(formatParams(safe))\n}\n\nexport const warn = (...params: unknown[]) => {\n // A warning is not an exception: it must never reach `app_errors`, so\n // the OTel bridge gets only logWarn. The exception tracker stays: it is\n // wired in the frontend only (Application Insights trackException).\n const safe = redactQueryParamsInValues(params)\n const err = extractError(safe)\n _exceptionTracker?.(err)\n // Serialize once for both sinks: the walk is depth-capped but not free.\n const text = formatParams(safe)\n _otelBridge?.logWarn(text)\n if (printsAt('warn')) {\n // eslint-disable-next-line no-console\n console.warn(text)\n }\n}\n\n/**\n * The console rendering of a fixed message plus attributes: ONE line, with the\n * attributes as JSON after the message. `console.warn(message, attrs)` lets\n * Node's inspector break a wide object across several lines, and a container\n * log pipeline stores each line as its own row, so the query that reads the\n * attributes back finds the first row and a fragment. `formatParams` also\n * redacts the sensitive keys and survives a circular reference.\n */\nconst withAttrs = (message: string, attrs?: Record<string, unknown>): string =>\n attrs ? formatParams([message, attrs]) : message\n\n/**\n * WARN with a fixed message and structured attributes. Prefer this over\n * interpolating values into the message: a fixed message keeps the log\n * stream groupable (and therefore alertable), the values stay queryable\n * as attributes.\n */\nexport const warnAttrs = (message: string, attrs?: Record<string, unknown>) => {\n const safe = attrs && redactQueryParamsInAttributes(attrs)\n _otelBridge?.logWarn(message, safe)\n if (printsAt('warn')) {\n // eslint-disable-next-line no-console\n console.warn(withAttrs(message, safe))\n }\n}\n\n/**\n * A measurement event: one fixed name, the ids as attributes, and **neither\n * sink drops it**, whatever `LOG_LEVEL` says.\n *\n * The info twin of {@link warnAttrs} used to be an ordinary INFO line, and that\n * was wrong in the one environment it exists for: production runs at\n * `LOG_LEVEL=warn`, so the console floor and the OTel floor would each have\n * dropped it and the measurement it feeds would have read zero rows and been\n * believed. WARN is not the answer either, because these events fire on the\n * majority of turns and a normal event at WARN degrades the level alerting\n * watches. So this is a channel, not a level: severity stays INFO and the floor\n * does not apply.\n *\n * The price is that nothing else may use it. Keep the callers few\n * (`closure_gate.refused`, `closure_recovery.applied`) and the volume of the\n * order of one row per turn, and never pass a message with the values\n * interpolated into it: a fixed name is what makes the rows groupable by agent\n * instead of countable by regex.\n */\nexport const logEvent = (name: string, attrs?: Record<string, unknown>) => {\n const safe = attrs && redactQueryParamsInAttributes(attrs)\n _otelBridge?.logEvent(name, safe)\n if (isLoggingEnabled) {\n // eslint-disable-next-line no-console\n console.log(withAttrs(name, safe))\n }\n}\n\nexport const assert = (condition: boolean | undefined, message: string) => {\n if (isLoggingEnabled) {\n // eslint-disable-next-line no-console\n console.assert(condition, message)\n }\n}\n\nexport const clear = () => {\n if (isLoggingEnabled) {\n // eslint-disable-next-line no-console\n console.clear()\n }\n}\n\n/**\n * A table is an info line that happens to be wide, so it answers to the floor\n * like one. It used to check only `isLoggingEnabled`, which left the usage\n * table of every turn on the console of an environment set to `warn`, and made\n * it the last write of a turn in the test run: vitest reports a console write\n * that outlives its test as `Closing rpc while \"onUserConsoleLog\" was pending`\n * and fails a run whose tests all passed.\n */\nexport const table = (table: unknown) => {\n if (printsAt('info')) {\n // eslint-disable-next-line no-console\n console.table(table)\n }\n}\n\nexport const group = (name: string) => {\n if (isLoggingEnabled) {\n // eslint-disable-next-line no-console\n console.group(name)\n }\n}\n\nexport const groupEnd = () => {\n if (isLoggingEnabled) {\n // eslint-disable-next-line no-console\n console.groupEnd()\n }\n}\n\nexport const time = (name: string) => {\n if (isLoggingEnabled) {\n // eslint-disable-next-line no-console\n console.time(name)\n }\n}\n\nexport const timeEnd = (name: string) => {\n if (isLoggingEnabled) {\n // eslint-disable-next-line no-console\n console.timeEnd(name)\n }\n}\n\nexport const timeLog = (name: string, ...params: unknown[]) => {\n if (isLoggingEnabled) {\n // eslint-disable-next-line no-console\n console.timeLog(name, ...params)\n }\n}\n\nexport const logger = {\n log,\n error,\n info,\n debug,\n warn,\n warnAttrs,\n logEvent,\n assert,\n clear,\n table,\n group,\n groupEnd,\n time,\n timeEnd,\n timeLog,\n}\n\nexport const useErrorsLogger = (errors: Ref<Error | null | undefined>[]) => {\n // Vue is an optional runtime dependency for the backend build.\n // Lazily import it only when running in a browser/Vue environment.\n if (typeof window === 'undefined') {\n return\n }\n\n void import('vue').then(({ watch }) => {\n errors.forEach((error) => {\n watch(error, (value) => {\n logger.error(value)\n })\n })\n })\n}\n","/**\n * Signature of the calls the function app makes to the backend's internal\n * routes (spec agent-wakeup, \"Timer: coda, function, endpoint interno\"). Both\n * ends share `INTERNAL_API_SECRET`; the signed payload binds the method, the\n * path, the body and a timestamp, so a captured request cannot be replayed on\n * another route nor after the tolerance window.\n *\n * WebCrypto, not `node:crypto`: this package is imported by the browser too.\n */\nexport const INTERNAL_SIGNATURE_HEADER = 'x-internal-signature'\nexport const INTERNAL_TIMESTAMP_HEADER = 'x-internal-timestamp'\nexport const INTERNAL_SIGNATURE_TOLERANCE_MS = 5 * 60_000\n\ninterface InternalRequest {\n secret: string\n method: string\n /** The path as the server routes it, without host or querystring. */\n path: string\n body: string\n}\n\nconst encoder = new TextEncoder()\n\nconst hmacSha256Hex = async (secret: string, payload: string) => {\n const key = await globalThis.crypto.subtle.importKey(\n 'raw',\n encoder.encode(secret),\n { name: 'HMAC', hash: 'SHA-256' },\n false,\n ['sign'],\n )\n const signature = await globalThis.crypto.subtle.sign(\n 'HMAC',\n key,\n encoder.encode(payload),\n )\n return Array.from(new Uint8Array(signature), (byte) =>\n byte.toString(16).padStart(2, '0'),\n ).join('')\n}\n\nconst signedPayload = (\n { method, path, body }: InternalRequest,\n timestamp: string,\n) => `${timestamp}.${method.toUpperCase()}.${path}.${body}`\n\n/** Constant-time comparison of two hex strings. */\nconst sameHex = (a: string, b: string) => {\n if (a.length !== b.length) {\n return false\n }\n let difference = 0\n for (let index = 0; index < a.length; index++) {\n difference |= a.charCodeAt(index) ^ b.charCodeAt(index)\n }\n return difference === 0\n}\n\n/** The two headers that sign an internal request. */\nexport async function signInternalRequest(\n request: InternalRequest,\n now = Date.now(),\n): Promise<Record<string, string>> {\n const timestamp = String(now)\n return {\n [INTERNAL_TIMESTAMP_HEADER]: timestamp,\n [INTERNAL_SIGNATURE_HEADER]: await hmacSha256Hex(\n request.secret,\n signedPayload(request, timestamp),\n ),\n }\n}\n\n/**\n * Whether the headers sign this request with this secret, within the\n * tolerance window.\n */\nexport async function verifyInternalRequest(\n request: InternalRequest & {\n signature: string | undefined\n timestamp: string | undefined\n },\n now = Date.now(),\n): Promise<boolean> {\n const { signature, timestamp } = request\n if (!signature || !timestamp || !/^\\d+$/.test(timestamp)) {\n return false\n }\n if (Math.abs(now - Number(timestamp)) > INTERNAL_SIGNATURE_TOLERANCE_MS) {\n return false\n }\n const expected = await hmacSha256Hex(\n request.secret,\n signedPayload(request, timestamp),\n )\n return sameHex(expected, signature.toLowerCase())\n}\n","// E.164 country codes are prefix-free: one digit for these two, two digits\n// for the next set, three for every other one. Reading \"the first one to four\n// digits\" took four, so +44 1234 567890 came out as +4412.\nconst ONE_DIGIT_COUNTRY_CODES = new Set(['1', '7'])\nconst TWO_DIGIT_COUNTRY_CODES = new Set(\n (\n '20 27 30 31 32 33 34 36 39 40 41 43 44 45 46 47 48 49 51 52 53 54 55 ' +\n '56 57 58 60 61 62 63 64 65 66 81 82 84 86 90 91 92 93 94 95 98'\n ).split(' '),\n)\n\n/** Splits international digits into country code and national number. */\nfunction splitCountryCode(digits: string): [string, string] | undefined {\n const length = ONE_DIGIT_COUNTRY_CODES.has(digits.slice(0, 1))\n ? 1\n : TWO_DIGIT_COUNTRY_CODES.has(digits.slice(0, 2))\n ? 2\n : 3\n return digits.length > length\n ? [digits.slice(0, length), digits.slice(length)]\n : undefined\n}\n\n/**\n * Formats a phone number with international prefix, its groups separated by\n * spaces as a person writes them\n * If no international prefix is provided, defaults to Italian (+39)\n *\n * @param phone - The phone number to format\n * @param defaultPrefix - The default international prefix (default: '+39')\n * @returns Formatted phone number (e.g., '+39 392 4096227')\n *\n * @example\n * formatPhoneNumber('3924096227') // '+39 392 4096227'\n * formatPhoneNumber('+393924096227') // '+39 392 4096227'\n * formatPhoneNumber('00393924096227') // '+39 392 4096227'\n * formatPhoneNumber('393924096227') // '+39 392 4096227'\n * formatPhoneNumber('0450000101') // '+39 045 0000101'\n */\nexport function formatPhoneNumber(\n phone: string | null | undefined,\n defaultPrefix = '+39',\n): string {\n if (!phone) {\n return ''\n }\n\n // Remove all non-digit characters except + at the beginning\n const cleaned = phone.trim().replace(/[^\\d+]/g, '')\n\n if (!cleaned) {\n return ''\n }\n\n // Normalize the phone number to have international prefix\n let nationalNumber = ''\n let countryCode = defaultPrefix.replace('+', '')\n\n // Handle different input formats\n if (cleaned.startsWith('+')) {\n // Already has + prefix: +393924096227\n const match = cleaned.match(/^\\+(\\d+)$/)\n if (match) {\n const digits = match[1]\n // Extract country code and national number\n if (digits.startsWith(countryCode)) {\n nationalNumber = digits.substring(countryCode.length)\n } else {\n const split = splitCountryCode(digits)\n if (split) {\n ;[countryCode, nationalNumber] = split\n }\n }\n }\n } else if (cleaned.startsWith('00')) {\n // International format without +: 00393924096227\n const digits = cleaned.substring(2)\n if (digits.startsWith(countryCode)) {\n nationalNumber = digits.substring(countryCode.length)\n } else {\n const split = splitCountryCode(digits)\n if (split) {\n ;[countryCode, nationalNumber] = split\n }\n }\n } else if (\n cleaned.startsWith(countryCode) &&\n cleaned.length > countryCode.length + 8\n ) {\n // Starts with country code but no +: 393924096227\n nationalNumber = cleaned.substring(countryCode.length)\n } else {\n // Local number: 3924096227 or 0450000101\n nationalNumber = cleaned\n // The national trunk 0 is not dialled after the country code, except\n // in Italy, where it belongs to the landline number (045 is Verona):\n // dropping it turned 045 0000101 into another number\n if (\n countryCode !== '39' &&\n nationalNumber.startsWith('0') &&\n nationalNumber.length > 1\n ) {\n nationalNumber = nationalNumber.substring(1)\n }\n }\n\n if (!nationalNumber) {\n return phone\n }\n\n const prefix = `+${countryCode}`\n\n // Italian mobile numbers: 3XX XXXXXXX (10 digits total, starting with 3)\n if (\n countryCode === '39' &&\n nationalNumber.length === 10 &&\n nationalNumber.startsWith('3')\n ) {\n return `${prefix} ${nationalNumber.substring(0, 3)} ${nationalNumber.substring(3)}`\n }\n\n // Italian landline numbers: 0XX XXXXXXX (9-11 digits, starting with 0)\n if (\n countryCode === '39' &&\n nationalNumber.length >= 9 &&\n nationalNumber.length <= 11 &&\n nationalNumber.startsWith('0')\n ) {\n const areaCode = nationalNumber.substring(0, 3)\n const rest = nationalNumber.substring(3)\n return `${prefix} ${areaCode} ${rest}`\n }\n\n // Generic formatting: group by 3-4 digits\n const parts: string[] = []\n let remaining = nationalNumber\n\n while (remaining.length > 0) {\n if (remaining.length <= 4) {\n parts.push(remaining)\n break\n }\n parts.push(remaining.substring(0, 3))\n remaining = remaining.substring(3)\n }\n\n return `${prefix} ${parts.join(' ')}`\n}\n\n/**\n * Returns a formatted phone number or a dash if empty\n * Useful for displaying in tables\n *\n * @param phone - The phone number to format\n * @param defaultPrefix - The default international prefix (default: '+39')\n * @returns Formatted phone number or '-'\n */\nexport function formatPhoneNumberOrDash(\n phone: string | null | undefined,\n defaultPrefix = '+39',\n): string {\n const formatted = formatPhoneNumber(phone, defaultPrefix)\n return formatted || '-'\n}\n"],"mappings":";;AACA,IAAMA,IAAa,IAGbC,IAAkB,IAYlBC,IACF,qIAOEC,IACF;AAoBJ,SAAgBC,EAAkB,GAAsB;CACpD,IAAMC,IAAUC,EAAaC,CAAK,GAC5BC,oBAAU,IAAI,IAAa;CACjC,OAAOH,EAAQ,SAAS,KAAKG,EAAQ,OAAOR,IAAY;EACpD,IAAMS,IAAUJ,EAAQ,MAAM;EAC9B,IAAI,EAAEI,aAAmB,UAAUD,EAAQ,IAAIC,CAAO,GAClD;EAIJ,AAFAD,EAAQ,IAAIC,CAAO,GACnBC,EAAUD,CAAO,GACjBJ,EAAQ,KAAMI,EAAgC,KAAK;EACnD,IAAME,IAAcF,EAAiC;EACrD,AAAI,MAAM,QAAQE,CAAU,KACxBN,EAAQ,KAAK,GAAGM,CAAU;CAElC;AACJ;AAOA,SAAgBC,EAAwB,GAAsB;CAI1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,GAAG,CAEzB,EAAS,GADhBA,EAAe,UAAU,CACN;CAIpC,IAAMM,IAAkB,CAAC,GACrBC,IAAYP;CAEhB,OAAOO,EAAU,SAAS,IAAG;EACzB,IAAIA,EAAU,UAAU,GAAG;GACvB,EAAM,KAAKA,CAAS;GACpB;EACJ;EAEA,AADAD,EAAM,KAAKC,EAAU,UAAU,GAAG,CAAC,CAAC,GACpC,IAAYA,EAAU,UAAU,CAAC;CACrC;CAEA,OAAO,GAAGF,EAAO,GAAGC,EAAM,KAAK,GAAG;AACtC"}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { C as e, D as t, O as n, S as r, _ as i, a, g as o, h as s, i as c, l, m as u, o as d, p as f, r as p, s as m, u as h, v as g, w as _, x as v } from "./schemas-BO5QlXAp.js";
|
|
2
2
|
import { $ as ee, B as y, G as te, Q as ne, W as re, Y as ie, et as ae, q as oe } from "./Agent-D3US-D1x.js";
|
|
3
|
-
import { r as se, t as ce } from "./createChatbotApiClient-
|
|
4
|
-
import { n as le } from "./src-
|
|
3
|
+
import { r as se, t as ce } from "./createChatbotApiClient-CFKeOgEA.js";
|
|
4
|
+
import { n as le } from "./src-nb8MU1sh.js";
|
|
5
5
|
import { d as ue, r as de } from "./message-DuibQyHy.js";
|
|
6
|
-
import { n as fe, t as pe } from "./useSafeLocalStorage-
|
|
6
|
+
import { n as fe, t as pe } from "./useSafeLocalStorage-Bn4SsL8C.js";
|
|
7
7
|
import { computed as b, getCurrentScope as me, isReadonly as he, nextTick as ge, onScopeDispose as _e, reactive as ve, ref as x, shallowRef as S, toRefs as ye, toValue as be, watch as C, watchEffect as xe } from "vue";
|
|
8
8
|
import { useI18n as Se } from "vue-i18n";
|
|
9
9
|
import { useDocumentVisibility as Ce, usePreferredDark as we } from "@vueuse/core";
|
|
@@ -4570,4 +4570,4 @@ function di(e) {
|
|
|
4570
4570
|
}
|
|
4571
4571
|
export { ft as a, hr as i, di as n, Gr as r, Kr as t };
|
|
4572
4572
|
|
|
4573
|
-
//# sourceMappingURL=useChatbotStore
|
|
4573
|
+
//# sourceMappingURL=useChatbotStore--6ws3cew.js.map
|