@feedmepos/mf-report 5.34.2 → 5.35.0-beta.0

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.
Files changed (39) hide show
  1. package/dist/{App-D-YQ3yMW.js → App-DQyEf0mm.js} +40 -40
  2. package/dist/{DateRangeSelect-OTyc3v5_.js → DateRangeSelect-DvE_au_i.js} +1 -1
  3. package/dist/{Default.vue_vue_type_script_setup_true_lang-CxIN_bfu.js → Default.vue_vue_type_script_setup_true_lang-B5Ir3Xuu.js} +1 -1
  4. package/dist/{DigestListView-DCpIQY1v.js → DigestListView-Cl2EK5bf.js} +3 -3
  5. package/dist/DigestReaderView-BS0iuanX.js +489 -0
  6. package/dist/{DynamicWidget.vue_vue_type_script_setup_true_lang-iRcCryhy.js → DynamicWidget.vue_vue_type_script_setup_true_lang-DfVW7Q_x.js} +173 -173
  7. package/dist/{GlobalFilterSelect.vue_vue_type_script_setup_true_lang-VTI9bq-3.js → GlobalFilterSelect.vue_vue_type_script_setup_true_lang-Fcz2N71N.js} +175 -175
  8. package/dist/{InsightView-WQ3IXr2b.js → InsightView-CmA2Xi0T.js} +5 -5
  9. package/dist/{Integration-Bx6Xt8rm.js → Integration-DdfS7Jgh.js} +3 -3
  10. package/dist/{Integrations-BSsJGc4e.js → Integrations-CRMbmKLq.js} +2 -2
  11. package/dist/{Layout-CmTYhuDW.js → Layout-kcAw_A-E.js} +1 -1
  12. package/dist/{LocationSelect.vue_vue_type_script_setup_true_lang-SjaEdhpI.js → LocationSelect.vue_vue_type_script_setup_true_lang-BRYP_afx.js} +1553 -1547
  13. package/dist/{MenuTab.vue_vue_type_script_setup_true_lang-CtJRTkuw.js → MenuTab.vue_vue_type_script_setup_true_lang-I8gsgGXJ.js} +5 -5
  14. package/dist/{NavigationTab.vue_vue_type_script_setup_true_lang-DERX_GCc.js → NavigationTab.vue_vue_type_script_setup_true_lang-D3QOPpyj.js} +5 -5
  15. package/dist/{OverviewView-BXuqus0r.js → OverviewView-tS8EKm9q.js} +5 -5
  16. package/dist/{Report-Cj7xHOMI.js → Report-BvJw6A0s.js} +3 -3
  17. package/dist/ReportCanvasView-Bywb09Z7.js +1066 -0
  18. package/dist/{ReportEditor-v3CRHflb.js → ReportEditor-D88J-04n.js} +7 -7
  19. package/dist/{ReportView-IbQC8Qf1.js → ReportView-DxnYH37m.js} +6 -6
  20. package/dist/{ReportViewRoute-NwvXWZDf.js → ReportViewRoute-DJdbgiqN.js} +2 -2
  21. package/dist/{Setting-GyFSTgFs.js → Setting-CNrh7nBB.js} +94 -94
  22. package/dist/{Template-DLVGn41O.js → Template-BreFV27K.js} +3 -3
  23. package/dist/{TileEditor-DT4ayXKN.js → TileEditor-CLXi5in3.js} +6 -6
  24. package/dist/{TilePageStack.vue_vue_type_script_setup_true_lang-Bh0NcO-n.js → TilePageStack.vue_vue_type_script_setup_true_lang-HMTKQELw.js} +2 -2
  25. package/dist/{TransitionFade-DIDahT3W.js → TransitionFade-tUK-3l63.js} +5 -5
  26. package/dist/{app-X-tKojve.js → app-CwMmSHUw.js} +21 -21
  27. package/dist/app.js +1 -1
  28. package/dist/assets/{formatChartData.worker-Cpgnh20a.js → formatChartData.worker-Bt8turfo.js} +22 -22
  29. package/dist/assets/{processTableData.worker-B7I6PElJ.js → processTableData.worker-MGb36f8J.js} +22 -22
  30. package/dist/{currency-Cebf4JT_.js → currency-BUi-Xq6N.js} +1 -1
  31. package/dist/{index-Brvkpnxl.js → index-cojDf4MH.js} +503 -473
  32. package/dist/{report-CoK9Yl1E.js → report-CtMB0C_H.js} +1 -1
  33. package/dist/style.css +1 -1
  34. package/dist/{useDigestFont-DUUhWR6u.js → useDigestFont-HI14Bq_l.js} +1 -1
  35. package/dist/{useReportCanvasPanel-B8qruqY0.js → useReportCanvasPicks-ZAlJK9Cv.js} +1353 -1264
  36. package/dist/{useRestaurantPermission-BTBg_goI.js → useRestaurantPermission-DO4WIH7P.js} +1 -1
  37. package/package.json +2 -2
  38. package/dist/DigestReaderView-W6sW8h9Q.js +0 -526
  39. package/dist/ReportCanvasView-CGt4ayU2.js +0 -1035
@@ -0,0 +1,489 @@
1
+ import { defineComponent as ue, ref as f, watch as Q, onMounted as pe, nextTick as st, resolveComponent as $, openBlock as c, createElementBlock as h, createElementVNode as y, unref as t, createVNode as R, createCommentVNode as _, computed as k, onBeforeUnmount as ot, createBlock as V, withCtx as F, createSlots as rt, toDisplayString as D, normalizeClass as le } from "vue";
2
+ import { useRoute as nt, useRouter as it } from "vue-router";
3
+ import { useI18n as fe } from "@feedmepos/mf-common";
4
+ import { useBreakpoints as lt } from "@feedmepos/ui-library";
5
+ import { _ as ct } from "./Default.vue_vue_type_script_setup_true_lang-B5Ir3Xuu.js";
6
+ import { _ as ce } from "./SelectComponent.vue_vue_type_script_setup_true_lang-Cxx-TQz9.js";
7
+ import { u as dt, a as ut, R as pt, b as ft, c as mt, d as vt, e as gt, f as ht, g as M } from "./useReportCanvasPicks-ZAlJK9Cv.js";
8
+ import { b as kt, d as yt, a as wt, _ as bt, D as _t } from "./useDigestFont-HI14Bq_l.js";
9
+ import { f as xt, n as Ct, o as St, A as de } from "./app-CwMmSHUw.js";
10
+ import { _ as Vt } from "./_plugin-vue_export-helper-Bx7s49ra.js";
11
+ const Rt = { class: "relative flex min-h-0 grow flex-col" }, Et = ["srcdoc", "title"], Pt = {
12
+ key: 0,
13
+ class: "pointer-events-none absolute inset-0 flex items-center justify-center",
14
+ "data-testid": "digest-frame-loading"
15
+ }, Tt = /* @__PURE__ */ ue({
16
+ __name: "DigestCanvasFrame",
17
+ props: {
18
+ digest: {},
19
+ commentMode: { type: Boolean },
20
+ picked: {}
21
+ },
22
+ emits: ["select", "area", "cancel"],
23
+ setup(Z, { emit: s }) {
24
+ const B = { MYR: "RM" }, m = Z, E = s, { t: q } = fe(), P = f(), x = f(!1), l = {
25
+ reportId: `digest-${m.digest.weekStart}`,
26
+ version: 1,
27
+ state: "published",
28
+ canEdit: !1,
29
+ hostFilters: !1,
30
+ ...m.digest.canvas
31
+ }, v = dt(l.reportId, { frozen: m.digest.rows }), T = new Set(
32
+ l.sections.flatMap((o) => {
33
+ var n;
34
+ const r = (n = o.config) == null ? void 0 : n.href;
35
+ return o.component === "digest-idea" && typeof r == "string" ? [r] : [];
36
+ })
37
+ ), w = ut(P, {
38
+ onSelectSection: (o, r) => E("select", o, r),
39
+ onSelectArea: (o) => E("area", o),
40
+ onCancelSelection: () => E("cancel"),
41
+ onSetParams: (o, r) => {
42
+ v.setParams(o, r);
43
+ },
44
+ // a saved page records nothing back (its sections were checked before it was saved); a drawn part ends the loader
45
+ onSectionRendered: () => {
46
+ x.value = !0;
47
+ },
48
+ onSectionError: (o, r, n) => {
49
+ x.value = !0, console.warn("[digest] section failed", { weekStart: m.digest.weekStart, sectionId: o, message: n });
50
+ },
51
+ onSectionLayout: () => {
52
+ },
53
+ onOpenLink: (o) => {
54
+ T.has(o) && window.open(o, "_blank", "noopener,noreferrer");
55
+ }
56
+ });
57
+ return v.onResult((o) => w.pushRows(o)), v.onParamsChanged(() => w.pushParams(v.paramState())), Q([() => m.commentMode, () => m.picked, w.ready], () => {
58
+ w.setCommentMode(!!m.commentMode, m.picked ?? [], !0);
59
+ }), pe(async () => {
60
+ v.load(l), await st();
61
+ const o = v.env();
62
+ await w.init(l.sections, v.paramState(), {
63
+ ...o,
64
+ currency: m.digest.money || B[o.currency] || o.currency,
65
+ digest: !0,
66
+ digestFont: kt
67
+ });
68
+ }), (o, r) => {
69
+ const n = $("FmCircularProgress");
70
+ return c(), h("div", Rt, [
71
+ y("iframe", {
72
+ ref_key: "frame",
73
+ ref: P,
74
+ "data-testid": "digest-frame",
75
+ class: "min-h-0 grow border-0",
76
+ srcdoc: t(pt),
77
+ sandbox: "allow-scripts",
78
+ title: t(q)("reportV5.digest.frameTitle")
79
+ }, null, 8, Et),
80
+ x.value ? _("", !0) : (c(), h("div", Pt, [
81
+ R(n, { size: "xl" })
82
+ ]))
83
+ ]);
84
+ };
85
+ }
86
+ }), At = { class: "flex min-w-0 grow flex-col" }, Ft = { class: "fm-typo-en-title-md-600 block min-w-0 max-w-full overflow-hidden text-ellipsis whitespace-nowrap" }, Dt = {
87
+ key: 0,
88
+ class: "flex shrink-0 flex-wrap items-center gap-8 border-b border-fm-color-border-secondary px-16 py-8",
89
+ "data-testid": "digest-toolbar"
90
+ }, Mt = { class: "digest-kind" }, $t = {
91
+ class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary",
92
+ "data-testid": "digest-published"
93
+ }, Bt = {
94
+ key: 1,
95
+ "data-testid": "digest-comment-hint",
96
+ class: "fm-typo-en-body-sm-400 text-fm-color-typo-secondary"
97
+ }, Lt = ["aria-pressed", "aria-label", "disabled"], jt = {
98
+ width: "20",
99
+ height: "20",
100
+ viewBox: "0 0 20 20",
101
+ fill: "none",
102
+ "aria-hidden": "true"
103
+ }, It = ["fill"], zt = {
104
+ key: 3,
105
+ class: "fm-typo-en-body-sm-400 p-16 text-fm-color-typo-error",
106
+ "data-testid": "digest-error"
107
+ }, Ot = {
108
+ key: 4,
109
+ class: "flex min-h-[75vh] flex-1 items-center justify-center",
110
+ "data-testid": "digest-loading"
111
+ }, qt = {
112
+ key: 5,
113
+ class: "flex min-h-[75vh] flex-1 flex-col"
114
+ }, Nt = ["role", "aria-modal", "aria-label"], Ut = /* @__PURE__ */ ue({
115
+ __name: "DigestReaderView",
116
+ setup(Z) {
117
+ var ie;
118
+ const { t: s, locale: B } = fe(), { breakpoints: m } = lt(), E = nt(), q = it(), P = xt(), x = k(() => String(E.params.weekStart ?? "")), l = f(), v = f(!0), T = f(""), w = f(!1), o = f(!1), r = f(!1), n = f(""), J = f(""), L = f(!1), d = f(!1), N = f(!1), K = k(() => d.value && !N.value), { root: me, drawer: ve, docked: U, modal: H } = ft(r, K);
119
+ Q([d, r], ([e, a]) => {
120
+ (!e || !a) && (N.value = !1);
121
+ });
122
+ const j = k(() => {
123
+ var e;
124
+ return ((e = l.value) == null ? void 0 : e.canvas.sections) ?? [];
125
+ }), {
126
+ homePicks: W,
127
+ threadPicks: Y,
128
+ picks: b,
129
+ targets: ge,
130
+ outlines: he,
131
+ chips: ke,
132
+ stale: X,
133
+ toggle: ye,
134
+ addArea: we,
135
+ widen: be
136
+ } = mt(L, { sections: () => j.value, named: xe });
137
+ function _e(e, a) {
138
+ var O;
139
+ const i = e.config ?? {}, g = i.title ?? i.headline;
140
+ if (typeof g == "string" && g) return g;
141
+ if (e.component === "digest-kpis") return s("reportV5.digest.ask.tiles");
142
+ const S = j.value.slice(0, a).reverse().find((p) => p.component === "digest-chapter");
143
+ return e.component === "digest-text" && typeof ((O = S == null ? void 0 : S.config) == null ? void 0 : O.title) == "string" ? S.config.title : s("reportV5.digest.ask.part", { number: a + 1 });
144
+ }
145
+ function I() {
146
+ b.value = [], d.value = !1;
147
+ }
148
+ function xe(e) {
149
+ const a = j.value.findIndex((g) => g.id === e.sectionId), i = j.value[a];
150
+ if (!(!i || i.version !== e.version))
151
+ return { ...e, label: e.label || _e(i, a) };
152
+ }
153
+ function Ce(e, a) {
154
+ !d.value || C.value || ye(e, a) && (r.value = !0);
155
+ }
156
+ function Se(e) {
157
+ !d.value || C.value || we(e) && (r.value = !0);
158
+ }
159
+ const Ve = ((ie = window.matchMedia) == null ? void 0 : ie.call(window, "(pointer: coarse)").matches) ?? !1;
160
+ function Re() {
161
+ if (d.value) return I();
162
+ d.value = !0, r.value = !0;
163
+ }
164
+ function Ee() {
165
+ N.value = !0, r.value = !0;
166
+ }
167
+ function ee(e) {
168
+ e.key === "Escape" && d.value && I();
169
+ }
170
+ const u = vt(gt(x.value)), {
171
+ messages: Pe,
172
+ sessionId: Te,
173
+ title: Ae,
174
+ chats: Fe,
175
+ chatsCursor: te,
176
+ chatsLoading: De,
177
+ chatsError: Me,
178
+ switching: G,
179
+ earlier: $e,
180
+ loadingEarlier: Be,
181
+ streaming: Le,
182
+ turnId: je,
183
+ step: Ie,
184
+ error: ae,
185
+ interrupted: ze,
186
+ stoppable: Oe,
187
+ stopping: qe,
188
+ unsent: Ne,
189
+ slow: Ue,
190
+ startedAt: He,
191
+ awaiting: Ye,
192
+ noReplyId: Ge
193
+ } = u, C = k(() => Le.value || Ye.value), se = k(() => C.value || G.value);
194
+ let oe = !1;
195
+ Q(r, (e) => {
196
+ !e || oe || (oe = !0, u.load());
197
+ });
198
+ async function z() {
199
+ const e = n.value.trim();
200
+ if (!(!e || C.value || G.value || X.value)) {
201
+ if (n.value = "", await u.send(e, ge.value), ae.value) {
202
+ n.value || (n.value = e);
203
+ return;
204
+ }
205
+ I();
206
+ }
207
+ }
208
+ async function re(e) {
209
+ u.stashDraft(
210
+ n.value,
211
+ Y.value.flatMap((i) => i.targets)
212
+ ), await e();
213
+ const a = u.recallDraft();
214
+ n.value = a.text, Y.value = M(a.targets), d.value = !1;
215
+ }
216
+ async function Qe(e) {
217
+ if (se.value) return;
218
+ const a = e ? [...W.value] : [];
219
+ let i = !1;
220
+ await re(async () => {
221
+ i = await u.startChat();
222
+ }), i && e && (L.value = !1, Y.value = a, W.value = [], n.value = e, await z());
223
+ }
224
+ const Ze = (e) => re(() => u.select(e));
225
+ function Je(e) {
226
+ const a = u.takeUnsent(e);
227
+ if (a)
228
+ return n.value = a.text, b.value = M(a.targets), z();
229
+ }
230
+ async function Ke() {
231
+ const e = await u.stop();
232
+ !e || n.value.trim() || (n.value = e.text, b.value = M(e.targets));
233
+ }
234
+ function We(e) {
235
+ const a = u.requestOf(e);
236
+ a && (n.value = a.text, b.value = M(a.targets));
237
+ }
238
+ function Xe(e) {
239
+ const a = u.requestOf(e);
240
+ if (a)
241
+ return n.value = a.text, b.value = M(a.targets), z();
242
+ }
243
+ const A = k(
244
+ () => l.value ? yt(l.value.weekStart, l.value.weekEnd, B.value) : ""
245
+ ), et = k(() => {
246
+ const e = l.value;
247
+ if (!e) return "";
248
+ const a = [
249
+ s("reportV5.digest.published", {
250
+ date: wt(e.createdAt, B.value, e.timezone)
251
+ })
252
+ ];
253
+ return e.outlets && a.push(s("reportV5.digest.outlets", { count: e.outlets }, e.outlets)), a.join(" · ");
254
+ }), tt = k(
255
+ () => {
256
+ var e;
257
+ return (((e = l.value) == null ? void 0 : e.canvas.sections) ?? []).filter(
258
+ (a) => {
259
+ var i;
260
+ return a.component === "digest-chapter" && typeof ((i = a.config) == null ? void 0 : i.title) == "string";
261
+ }
262
+ ).slice(0, 3).map((a) => {
263
+ var g;
264
+ const i = String((g = a.config) == null ? void 0 : g.title);
265
+ return { label: i, prompt: s("reportV5.digest.ask.about", { title: i }) };
266
+ });
267
+ }
268
+ ), ne = k(() => ({
269
+ title: s("reportV5.digest.ask.title"),
270
+ welcome: s("reportV5.digest.ask.welcome"),
271
+ hint: s("reportV5.digest.ask.hint", { subject: A.value }),
272
+ target: s("reportV5.digest.ask.target", { subject: A.value }),
273
+ placeholder: s("reportV5.digest.ask.title"),
274
+ outcomes: {
275
+ withheld: s("reportV5.digest.ask.withheld"),
276
+ failed: s("reportV5.digest.ask.failed"),
277
+ stopped: s("reportV5.digest.ask.stopped")
278
+ }
279
+ }));
280
+ function at() {
281
+ q.push({ name: "digest", query: E.query });
282
+ }
283
+ return pe(async () => {
284
+ window.addEventListener("keydown", ee);
285
+ try {
286
+ l.value = await Ct(x.value), St(x.value).catch(() => {
287
+ });
288
+ } catch (e) {
289
+ e instanceof de && e.status === 403 ? w.value = !0 : e instanceof de && e.status === 404 ? o.value = !0 : T.value = e instanceof Error ? e.message : String(e);
290
+ } finally {
291
+ v.value = !1;
292
+ }
293
+ P.subscription || await P.loadSubscription().catch(() => {
294
+ });
295
+ }), ot(() => window.removeEventListener("keydown", ee)), (e, a) => {
296
+ const i = $("FmTooltip"), g = $("FmPageHead"), S = $("FmButton"), O = $("FmCircularProgress");
297
+ return c(), V(ct, null, {
298
+ default: F(() => [
299
+ y("div", {
300
+ ref_key: "root",
301
+ ref: me,
302
+ class: "relative flex h-full min-h-0 w-full"
303
+ }, [
304
+ y("div", At, [
305
+ R(g, {
306
+ class: "shrink-0",
307
+ title: A.value || t(s)("reportV5.digest.title"),
308
+ "back-button": !0,
309
+ "data-testid": "digest-reader-head",
310
+ "onClick:back": at
311
+ }, rt({
312
+ title: F(() => [
313
+ R(i, {
314
+ content: A.value,
315
+ placement: "bottom",
316
+ "z-index": 2e3,
317
+ class: "flex min-w-0 max-w-full justify-start"
318
+ }, {
319
+ default: F(() => [
320
+ y("p", Ft, D(A.value || t(s)("reportV5.digest.title")), 1)
321
+ ]),
322
+ _: 1
323
+ }, 8, ["content"])
324
+ ]),
325
+ _: 2
326
+ }, [
327
+ t(m).lg || t(m).md ? {
328
+ name: "append",
329
+ fn: F(() => [
330
+ l.value ? (c(), V(bt, { key: 0 })) : _("", !0)
331
+ ]),
332
+ key: "0"
333
+ } : void 0
334
+ ]), 1032, ["title"]),
335
+ l.value ? (c(), h("div", Dt, [
336
+ y("span", Mt, D(t(s)("reportV5.digest.card.weekly")), 1),
337
+ y("span", $t, D(et.value), 1),
338
+ a[9] || (a[9] = y("span", { class: "grow" }, null, -1)),
339
+ d.value && t(b).length && !t(U) ? (c(), V(S, {
340
+ key: 0,
341
+ "data-testid": "digest-ask-picked",
342
+ variant: "tertiary",
343
+ size: "sm",
344
+ "prepend-icon": "auto_awesome",
345
+ label: t(s)("reportV5.digest.ask.askPicked"),
346
+ onClick: Ee
347
+ }, null, 8, ["label"])) : d.value ? (c(), h("span", Bt, D(t(b).length ? t(s)("reportV5.digest.ask.picked", { count: t(b).length }) : t(s)(t(Ve) ? "reportV5.digest.ask.pickingTouch" : "reportV5.digest.ask.picking")), 1)) : _("", !0),
348
+ R(i, {
349
+ placement: "bottom",
350
+ content: d.value ? t(s)("reportV5.reportAi.chat.cancelSelection") : t(s)("reportV5.digest.ask.comment")
351
+ }, {
352
+ default: F(() => [
353
+ y("button", {
354
+ "data-testid": "digest-comment-toggle",
355
+ class: le(["digest-comment flex h-32 w-32 items-center justify-center rounded-md text-fm-color-typo-secondary disabled:opacity-50", d.value && "bg-fm-color-neutral-gray-100 text-fm-color-primary"]),
356
+ "aria-pressed": d.value,
357
+ "aria-label": t(s)("reportV5.digest.ask.comment"),
358
+ disabled: C.value,
359
+ onClick: Re
360
+ }, [
361
+ (c(), h("svg", jt, [
362
+ y("path", {
363
+ d: "M5 3.5h5a6.5 6.5 0 1 1-6.5 6.5V5A1.5 1.5 0 0 1 5 3.5Z",
364
+ fill: d.value ? "currentColor" : "none",
365
+ stroke: "currentColor",
366
+ "stroke-width": "1.5",
367
+ "stroke-linecap": "round",
368
+ "stroke-linejoin": "round"
369
+ }, null, 8, It)
370
+ ]))
371
+ ], 10, Lt)
372
+ ]),
373
+ _: 1
374
+ }, 8, ["content"]),
375
+ r.value ? _("", !0) : (c(), V(S, {
376
+ key: 2,
377
+ "data-testid": "digest-ask-open",
378
+ variant: "tertiary",
379
+ "prepend-icon": "auto_awesome",
380
+ label: t(s)("reportV5.digest.ask.title"),
381
+ onClick: a[0] || (a[0] = (p) => r.value = !0)
382
+ }, null, 8, ["label"]))
383
+ ])) : _("", !0),
384
+ w.value ? (c(), V(ce, {
385
+ key: 1,
386
+ "data-testid": "digest-refused",
387
+ title: t(s)("reportV5.digest.refusedTitle"),
388
+ "sub-title": t(s)("reportV5.digest.refusedBody")
389
+ }, null, 8, ["title", "sub-title"])) : o.value ? (c(), V(ce, {
390
+ key: 2,
391
+ title: t(s)("reportV5.digest.missingTitle"),
392
+ "sub-title": t(s)("reportV5.digest.missingBody")
393
+ }, null, 8, ["title", "sub-title"])) : T.value ? (c(), h("p", zt, D(T.value), 1)) : v.value ? (c(), h("div", Ot, [
394
+ R(O, { size: "xl" })
395
+ ])) : l.value ? (c(), h("div", qt, [
396
+ R(_t, {
397
+ "hide-subscribed": "",
398
+ class: "m-16 shrink-0"
399
+ }),
400
+ (c(), V(Tt, {
401
+ key: `${l.value.weekStart}:${l.value.createdAt}`,
402
+ digest: l.value,
403
+ "comment-mode": d.value && !C.value,
404
+ picked: t(he),
405
+ onSelect: Ce,
406
+ onArea: Se,
407
+ onCancel: I
408
+ }, null, 8, ["digest", "comment-mode", "picked"]))
409
+ ])) : _("", !0)
410
+ ]),
411
+ t(H) ? (c(), h("div", {
412
+ key: 0,
413
+ class: "digest-scrim absolute inset-0 z-20",
414
+ onClick: a[1] || (a[1] = (p) => r.value = !1)
415
+ })) : _("", !0),
416
+ r.value && l.value && (t(U) || !K.value) ? (c(), h("div", {
417
+ key: 1,
418
+ ref_key: "drawer",
419
+ ref: ve,
420
+ "data-testid": "digest-chat",
421
+ class: le(
422
+ t(U) ? "w-[380px] shrink-0" : "absolute inset-y-0 right-0 z-30 w-full max-w-[380px] shadow-lg"
423
+ ),
424
+ role: t(H) ? "dialog" : void 0,
425
+ "aria-modal": t(H) ? "true" : void 0,
426
+ "aria-label": ne.value.title
427
+ }, [
428
+ R(ht, {
429
+ "home-draft": J.value,
430
+ "onUpdate:homeDraft": a[2] || (a[2] = (p) => J.value = p),
431
+ "home-open": L.value,
432
+ "onUpdate:homeOpen": a[3] || (a[3] = (p) => L.value = p),
433
+ messages: t(Pe),
434
+ draft: n.value,
435
+ targets: t(ke),
436
+ "target-stale": t(X),
437
+ streaming: C.value,
438
+ "turn-id": t(je),
439
+ phase: t(Ie) ?? "working",
440
+ slow: t(Ue),
441
+ "started-at": t(He),
442
+ error: t(ae),
443
+ interrupted: t(ze),
444
+ blank: !1,
445
+ run: null,
446
+ "run-anchor-id": null,
447
+ "run-stale": !1,
448
+ "retry-error": "",
449
+ "unsent-ids": t(Ne),
450
+ "no-reply-id": t(Ge),
451
+ "chat-id": t(Te),
452
+ "chat-title": t(Ae),
453
+ chats: t(Fe),
454
+ "chats-cursor": t(te),
455
+ "chats-loading": t(De),
456
+ "chats-error": t(Me),
457
+ switching: t(G),
458
+ busy: se.value,
459
+ stoppable: t(Oe),
460
+ stopping: t(qe),
461
+ earlier: t($e),
462
+ "loading-earlier": t(Be),
463
+ copy: ne.value,
464
+ starters: tt.value,
465
+ "onUpdate:draft": a[4] || (a[4] = (p) => n.value = p),
466
+ onClearTarget: t(be),
467
+ onSubmit: z,
468
+ onClose: a[5] || (a[5] = (p) => r.value = !1),
469
+ onResend: Je,
470
+ onAskAgain: Xe,
471
+ onEditRequest: We,
472
+ onStop: Ke,
473
+ onNewChat: Qe,
474
+ onSelectChat: Ze,
475
+ onLoadChats: a[6] || (a[6] = (p) => t(u).loadChats()),
476
+ onLoadMoreChats: a[7] || (a[7] = (p) => t(u).loadChats(t(te) ?? void 0)),
477
+ onLoadEarlier: a[8] || (a[8] = (p) => t(u).loadEarlier())
478
+ }, null, 8, ["home-draft", "home-open", "messages", "draft", "targets", "target-stale", "streaming", "turn-id", "phase", "slow", "started-at", "error", "interrupted", "unsent-ids", "no-reply-id", "chat-id", "chat-title", "chats", "chats-cursor", "chats-loading", "chats-error", "switching", "busy", "stoppable", "stopping", "earlier", "loading-earlier", "copy", "starters", "onClearTarget"])
479
+ ], 10, Nt)) : _("", !0)
480
+ ], 512)
481
+ ]),
482
+ _: 1
483
+ });
484
+ };
485
+ }
486
+ }), ta = /* @__PURE__ */ Vt(Ut, [["__scopeId", "data-v-bc7eaf2b"]]);
487
+ export {
488
+ ta as default
489
+ };