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