@epam/ai-dial-attachment-canvas 1.2.0-dev.213 → 1.2.0-dev.217
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/index.js
CHANGED
|
@@ -3,41 +3,41 @@ import { i as a, o, t as s } from "./LazyContentBoundary-tNE1ExbI.js";
|
|
|
3
3
|
import { AttachmentType as c, CodeBlockTheme as l, DEFAULT_MARKDOWN_CLASS_NAMES as u, FileExtension as d, MIMEType as f, MarkdownRenderer as p, buildCssVars as m, copyToClipboard as h, mergeClasses as g, restrainedSyntaxTheme as _, stripUrlQueryAndFragment as v } from "@epam/ai-dial-chat-shared";
|
|
4
4
|
import { SidebarOrientation as y, SidebarPanel as b } from "@epam/ai-dial-sidebar";
|
|
5
5
|
import { DIAL_ICON_SIZE as x, DIAL_KIT_ICON_STROKE as S, ElementSize as C, GhostIconButton as w, LinkButton as T, Spinner as E } from "@epam/ai-dial-ui-kit";
|
|
6
|
-
import { IconAlertTriangle as D, IconArrowsMaximize as O, IconCheck as k, IconCode as ee, IconCopy as
|
|
7
|
-
import { createContext as
|
|
8
|
-
import { JsonView as
|
|
9
|
-
import { Fragment as
|
|
10
|
-
import { AppBridge as
|
|
11
|
-
import { McpUiHostContextChangedNotificationSchema as
|
|
12
|
-
import { VisualizerConnectorRequests as
|
|
13
|
-
import { VisualizerConnector as
|
|
6
|
+
import { IconAlertTriangle as D, IconArrowsMaximize as O, IconCheck as k, IconCode as ee, IconCopy as A, IconDownload as te, IconEye as ne, IconLock as re, IconMarkdown as ie, IconRefresh as ae } from "@tabler/icons-react";
|
|
7
|
+
import { createContext as oe, lazy as j, memo as M, useCallback as N, useContext as P, useEffect as F, useMemo as I, useRef as L, useState as R } from "react";
|
|
8
|
+
import { JsonView as se, defaultStyles as z } from "react-json-view-lite";
|
|
9
|
+
import { Fragment as B, jsx as V, jsxs as H } from "react/jsx-runtime";
|
|
10
|
+
import { AppBridge as U, AppFrame as W } from "@mcp-ui/client";
|
|
11
|
+
import { McpUiHostContextChangedNotificationSchema as ce } from "@modelcontextprotocol/ext-apps/app-bridge";
|
|
12
|
+
import { VisualizerConnectorRequests as le } from "@epam/ai-dial-shared";
|
|
13
|
+
import { VisualizerConnector as ue } from "@epam/ai-dial-visualizer-connector";
|
|
14
14
|
//#region src/constants/public-class-names.ts
|
|
15
|
-
var
|
|
15
|
+
var de = { panel: "dial-attachment-canvas-panel" }, fe = {
|
|
16
16
|
container: "_container_1nhig_1",
|
|
17
17
|
containerLight: "_containerLight_1nhig_5"
|
|
18
|
-
},
|
|
18
|
+
}, pe = {
|
|
19
19
|
[l.Dark]: _,
|
|
20
20
|
[l.Light]: _
|
|
21
|
-
},
|
|
21
|
+
}, G = () => j(async () => {
|
|
22
22
|
let { Prism: e } = await import("react-syntax-highlighter");
|
|
23
23
|
return { default: e };
|
|
24
|
-
}),
|
|
25
|
-
let { text: r, language: i } = e, a = i == null || i === "plaintext", o =
|
|
24
|
+
}), me = M(({ content: e, codeBlockTheme: t = l.Light, labels: n }) => {
|
|
25
|
+
let { text: r, language: i } = e, a = i == null || i === "plaintext", o = pe[t], c = t === l.Light, [u, d] = R(0), f = I(G, [u]), p = N(() => {
|
|
26
26
|
d((e) => e + 1);
|
|
27
|
-
}, []), m = /* @__PURE__ */
|
|
27
|
+
}, []), m = /* @__PURE__ */ V("pre", {
|
|
28
28
|
className: "whitespace-pre-wrap break-words p-4",
|
|
29
29
|
children: r
|
|
30
30
|
});
|
|
31
|
-
return /* @__PURE__ */
|
|
31
|
+
return /* @__PURE__ */ V("div", {
|
|
32
32
|
dir: "ltr",
|
|
33
|
-
className: g("h-full overflow-auto",
|
|
34
|
-
children: a ? m : /* @__PURE__ */
|
|
33
|
+
className: g("h-full overflow-auto", fe.container, c && fe.containerLight),
|
|
34
|
+
children: a ? m : /* @__PURE__ */ V(s, {
|
|
35
35
|
retryKey: u,
|
|
36
36
|
onRetry: p,
|
|
37
37
|
pendingContent: m,
|
|
38
38
|
errorContent: m,
|
|
39
39
|
labels: n,
|
|
40
|
-
children: /* @__PURE__ */
|
|
40
|
+
children: /* @__PURE__ */ V(f, {
|
|
41
41
|
language: i,
|
|
42
42
|
style: o,
|
|
43
43
|
customStyle: {
|
|
@@ -54,62 +54,87 @@ var fe = { panel: "dial-attachment-canvas-panel" }, pe = {
|
|
|
54
54
|
})
|
|
55
55
|
})
|
|
56
56
|
});
|
|
57
|
-
}),
|
|
58
|
-
let { htmlFrameBlockedLabel: s = "This page cannot be displayed in preview", htmlOpenInNewTabLabel: c = "Open in new tab" } = t, [l, u] =
|
|
59
|
-
|
|
60
|
-
u(!0), f(!1);
|
|
57
|
+
}), he = { openInNewTabButton: "_openInNewTabButton_c1arc_1" }, ge = M(({ content: e, labels: t, isSourceView: n, title: r, codeBlockTheme: a, openInNewTabButtonTypographyClassName: o = "dial-body-semi-text" }) => {
|
|
58
|
+
let { htmlFrameBlockedLabel: s = "This page cannot be displayed in preview", htmlOpenInNewTabLabel: c = "Open in new tab" } = t, [l, u] = R(!0), [d, f] = R(!1), [p, m] = R(void 0), [h, _] = R(!1), [v, y] = R(!1), b = L(null);
|
|
59
|
+
F(() => {
|
|
60
|
+
u(!0), f(!1), m(void 0), _(!1), y(!1);
|
|
61
61
|
}, [e]);
|
|
62
|
-
let
|
|
63
|
-
|
|
64
|
-
|
|
62
|
+
let x = L(n);
|
|
63
|
+
x.current !== n && (x.current = n, n && v && y(!1)), F(() => {
|
|
64
|
+
if (!n || e.srcdoc != null || e.resolveSourceText == null || p != null) return;
|
|
65
|
+
let t = !1, r = e.resolveSourceText;
|
|
66
|
+
return (async () => {
|
|
67
|
+
_(!0);
|
|
68
|
+
try {
|
|
69
|
+
let e = await r();
|
|
70
|
+
t || m(e);
|
|
71
|
+
} catch {
|
|
72
|
+
t || y(!0);
|
|
73
|
+
} finally {
|
|
74
|
+
t || _(!1);
|
|
75
|
+
}
|
|
76
|
+
})(), () => {
|
|
77
|
+
t = !0;
|
|
78
|
+
};
|
|
79
|
+
}, [
|
|
80
|
+
n,
|
|
81
|
+
e,
|
|
82
|
+
p
|
|
83
|
+
]);
|
|
84
|
+
let S = e.isSameOriginUrl === !0 && e.url != null, C = !S && e.srcdoc != null, w = N((e) => {
|
|
85
|
+
if (u(!1), !(C || S)) try {
|
|
86
|
+
b.current?.contentDocument ?? f(!0);
|
|
65
87
|
} catch {
|
|
66
88
|
f(!0);
|
|
67
89
|
}
|
|
68
|
-
}, [
|
|
90
|
+
}, [C, S]), D = N(() => {
|
|
69
91
|
u(!1), f(!0);
|
|
70
|
-
}, []);
|
|
71
|
-
if (n &&
|
|
92
|
+
}, []), O = e.srcdoc ?? p, k = e.srcdoc != null || e.resolveSourceText != null, ee = e.srcdoc == null && e.resolveSourceText != null && p == null && !v;
|
|
93
|
+
if (n && k && (O != null || h || ee)) return O == null ? /* @__PURE__ */ V("div", {
|
|
94
|
+
className: "flex h-full items-center justify-center",
|
|
95
|
+
children: /* @__PURE__ */ V(E, {})
|
|
96
|
+
}) : /* @__PURE__ */ V(me, {
|
|
72
97
|
content: {
|
|
73
98
|
type: i.Code,
|
|
74
|
-
text:
|
|
99
|
+
text: O,
|
|
75
100
|
language: "html"
|
|
76
101
|
},
|
|
77
102
|
codeBlockTheme: a
|
|
78
103
|
});
|
|
79
|
-
if (d) return /* @__PURE__ */
|
|
104
|
+
if (d) return /* @__PURE__ */ H("div", {
|
|
80
105
|
className: "flex h-full flex-col items-center justify-center gap-3 p-4",
|
|
81
|
-
children: [/* @__PURE__ */
|
|
106
|
+
children: [/* @__PURE__ */ V("p", {
|
|
82
107
|
className: "text-center",
|
|
83
108
|
children: s
|
|
84
|
-
}), e.url != null && /* @__PURE__ */
|
|
109
|
+
}), e.url != null && /* @__PURE__ */ V(T, {
|
|
85
110
|
href: e.url,
|
|
86
111
|
target: "_blank",
|
|
87
112
|
label: c,
|
|
88
|
-
className:
|
|
113
|
+
className: he.openInNewTabButton,
|
|
89
114
|
textClassName: o
|
|
90
115
|
})]
|
|
91
116
|
});
|
|
92
|
-
let
|
|
93
|
-
return /* @__PURE__ */
|
|
117
|
+
let A = C ? void 0 : e.url, te = C ? e.srcdoc : void 0;
|
|
118
|
+
return /* @__PURE__ */ H("div", {
|
|
94
119
|
className: "relative h-full",
|
|
95
|
-
children: [l && /* @__PURE__ */
|
|
120
|
+
children: [l && /* @__PURE__ */ V("div", {
|
|
96
121
|
className: "absolute inset-0 flex items-center justify-center",
|
|
97
|
-
children: /* @__PURE__ */
|
|
98
|
-
}), /* @__PURE__ */
|
|
99
|
-
ref:
|
|
122
|
+
children: /* @__PURE__ */ V(E, {})
|
|
123
|
+
}), /* @__PURE__ */ V("iframe", {
|
|
124
|
+
ref: b,
|
|
100
125
|
title: r,
|
|
101
|
-
src:
|
|
102
|
-
srcDoc:
|
|
103
|
-
sandbox:
|
|
126
|
+
src: A,
|
|
127
|
+
srcDoc: te,
|
|
128
|
+
sandbox: C || S ? "allow-scripts" : "allow-scripts allow-same-origin",
|
|
104
129
|
className: g("h-full w-full border-none", l ? "invisible" : ""),
|
|
105
|
-
onLoad:
|
|
106
|
-
onError:
|
|
130
|
+
onLoad: w,
|
|
131
|
+
onError: D
|
|
107
132
|
})]
|
|
108
133
|
});
|
|
109
|
-
}),
|
|
134
|
+
}), _e = {
|
|
110
135
|
name: "MCP-UI Host",
|
|
111
136
|
version: "1.0.0"
|
|
112
|
-
},
|
|
137
|
+
}, ve = { openLinks: {} }, ye = (e) => {
|
|
113
138
|
let t;
|
|
114
139
|
try {
|
|
115
140
|
t = new URL(e);
|
|
@@ -123,20 +148,20 @@ var fe = { panel: "dial-attachment-canvas-panel" }, pe = {
|
|
|
123
148
|
return !1;
|
|
124
149
|
}
|
|
125
150
|
return !0;
|
|
126
|
-
},
|
|
151
|
+
}, be = (e, t, n) => {
|
|
127
152
|
if (n) {
|
|
128
153
|
e.style.maxWidth = "", e.style.maxHeight = "";
|
|
129
154
|
return;
|
|
130
155
|
}
|
|
131
156
|
let r = t;
|
|
132
157
|
r != null && (r.width != null && (e.style.width = `${r.width}px`), r.maxWidth != null && (e.style.maxWidth = `${r.maxWidth}px`), r.height != null && (e.style.height = `${r.height}px`), r.maxHeight != null && (e.style.maxHeight = `${r.maxHeight}px`));
|
|
133
|
-
},
|
|
134
|
-
let r =
|
|
135
|
-
|
|
158
|
+
}, xe = (e, t, n) => {
|
|
159
|
+
let r = L(e);
|
|
160
|
+
F(() => {
|
|
136
161
|
r.current = e;
|
|
137
162
|
});
|
|
138
|
-
let [i, a] =
|
|
139
|
-
return
|
|
163
|
+
let [i, a] = R(null), [o, s] = R(!1);
|
|
164
|
+
return F(() => {
|
|
140
165
|
let e = null;
|
|
141
166
|
try {
|
|
142
167
|
let n = t.current?.getBoundingClientRect(), i = n != null && n.width > 0 && n.height > 0 ? {
|
|
@@ -146,15 +171,15 @@ var fe = { panel: "dial-attachment-canvas-panel" }, pe = {
|
|
|
146
171
|
height: Math.round(n.height)
|
|
147
172
|
}
|
|
148
173
|
} : r.current.hostContext;
|
|
149
|
-
e = new
|
|
174
|
+
e = new U(null, r.current.hostInfo ?? _e, ve, { hostContext: i }), e.onopenlink = async ({ url: e }) => {
|
|
150
175
|
let t = r.current.onOpenLink;
|
|
151
|
-
return (t == null ?
|
|
176
|
+
return (t == null ? ye(e) : t(e)) === !1 ? { isError: !0 } : {};
|
|
152
177
|
}, e.onrequestdisplaymode = async ({ mode: e }) => {
|
|
153
178
|
let t = r.current.onRequestDisplayMode, n = r.current.hostContext?.displayMode ?? "inline";
|
|
154
179
|
return { mode: t?.(e) ?? n };
|
|
155
|
-
}, e.oncalltool = (e) => r.current.onToolCall(e.name, e.arguments), e.setNotificationHandler(
|
|
180
|
+
}, e.oncalltool = (e) => r.current.onToolCall(e.name, e.arguments), e.setNotificationHandler(ce, ({ params: e }) => {
|
|
156
181
|
let n = t.current?.querySelector("iframe");
|
|
157
|
-
n != null &&
|
|
182
|
+
n != null && be(n, e.containerDimensions, r.current.hostContext?.displayMode === "fullscreen");
|
|
158
183
|
}), a(e);
|
|
159
184
|
} catch (e) {
|
|
160
185
|
console.error("[useMcpAppBridge] Error creating AppBridge:", e), s(!0);
|
|
@@ -162,22 +187,22 @@ var fe = { panel: "dial-attachment-canvas-panel" }, pe = {
|
|
|
162
187
|
return () => {
|
|
163
188
|
e?.close().catch((e) => console.error("[useMcpAppBridge] Error closing AppBridge:", e));
|
|
164
189
|
};
|
|
165
|
-
}, [t]),
|
|
190
|
+
}, [t]), F(() => {
|
|
166
191
|
i != null && i.transport != null && n != null && i.setHostContext(n);
|
|
167
192
|
}, [i, n]), {
|
|
168
193
|
appBridge: i,
|
|
169
194
|
hasFailed: o
|
|
170
195
|
};
|
|
171
|
-
},
|
|
196
|
+
}, K = {
|
|
172
197
|
loadingOverlay: "_loadingOverlay_iea4a_2",
|
|
173
198
|
fullscreenFrame: "_fullscreenFrame_iea4a_21",
|
|
174
199
|
loadingFrame: "_loadingFrame_iea4a_29",
|
|
175
200
|
statusLabel: "_statusLabel_iea4a_33",
|
|
176
201
|
statusDetail: "_statusDetail_iea4a_38",
|
|
177
202
|
errorIcon: "_errorIcon_iea4a_42"
|
|
178
|
-
},
|
|
179
|
-
let [r, i] =
|
|
180
|
-
|
|
203
|
+
}, Se = ({ content: e, errorLabel: t = "Failed to load app", onAppInfo: n }) => {
|
|
204
|
+
let [r, i] = R("loading"), [a, o] = R(), { html: s, sandboxUrl: c, toolInput: l, toolResult: u, hostContext: d } = e, f = I(() => ({ url: new URL(c) }), [c]), p = d?.displayMode === "fullscreen", m = L(null), [h, _] = R();
|
|
205
|
+
F(() => {
|
|
181
206
|
let e = m.current;
|
|
182
207
|
if (!e) return;
|
|
183
208
|
let t = new ResizeObserver(([e]) => {
|
|
@@ -190,15 +215,15 @@ var fe = { panel: "dial-attachment-canvas-panel" }, pe = {
|
|
|
190
215
|
});
|
|
191
216
|
return t.observe(e), () => t.disconnect();
|
|
192
217
|
}, []);
|
|
193
|
-
let { appBridge: v, hasFailed: y } =
|
|
218
|
+
let { appBridge: v, hasFailed: y } = xe(e, m, I(() => d == null || h == null ? d : {
|
|
194
219
|
...d,
|
|
195
220
|
containerDimensions: h
|
|
196
221
|
}, [d, h])), b = y || r === "error";
|
|
197
|
-
return /* @__PURE__ */
|
|
222
|
+
return /* @__PURE__ */ H("div", {
|
|
198
223
|
ref: m,
|
|
199
|
-
className: g("relative h-full min-h-[200px] w-full", p &&
|
|
224
|
+
className: g("relative h-full min-h-[200px] w-full", p && K.fullscreenFrame, !p && r === "loading" && K.loadingFrame),
|
|
200
225
|
children: [
|
|
201
|
-
v != null && !b && /* @__PURE__ */
|
|
226
|
+
v != null && !b && /* @__PURE__ */ V(W, {
|
|
202
227
|
html: s,
|
|
203
228
|
sandbox: f,
|
|
204
229
|
appBridge: v,
|
|
@@ -212,29 +237,29 @@ var fe = { panel: "dial-attachment-canvas-panel" }, pe = {
|
|
|
212
237
|
o(e.message), i("error");
|
|
213
238
|
}
|
|
214
239
|
}),
|
|
215
|
-
!b && r === "loading" && /* @__PURE__ */
|
|
216
|
-
className: g("absolute inset-0 flex flex-col items-center justify-center gap-2",
|
|
217
|
-
children: /* @__PURE__ */
|
|
240
|
+
!b && r === "loading" && /* @__PURE__ */ V("div", {
|
|
241
|
+
className: g("absolute inset-0 flex flex-col items-center justify-center gap-2", K.loadingOverlay),
|
|
242
|
+
children: /* @__PURE__ */ V(E, {})
|
|
218
243
|
}),
|
|
219
|
-
b && /* @__PURE__ */
|
|
244
|
+
b && /* @__PURE__ */ H("div", {
|
|
220
245
|
className: "absolute inset-0 flex flex-col items-center justify-center gap-2 p-4",
|
|
221
|
-
children: [/* @__PURE__ */
|
|
246
|
+
children: [/* @__PURE__ */ V(D, {
|
|
222
247
|
size: 60,
|
|
223
248
|
stroke: S,
|
|
224
249
|
"aria-hidden": !0,
|
|
225
|
-
className:
|
|
226
|
-
}), /* @__PURE__ */
|
|
250
|
+
className: K.errorIcon
|
|
251
|
+
}), /* @__PURE__ */ H("p", {
|
|
227
252
|
role: "alert",
|
|
228
|
-
className: g("text-center",
|
|
229
|
-
children: [t, a && /* @__PURE__ */
|
|
230
|
-
className:
|
|
253
|
+
className: g("text-center", K.statusLabel),
|
|
254
|
+
children: [t, a && /* @__PURE__ */ H(B, { children: [/* @__PURE__ */ V("br", {}), /* @__PURE__ */ V("span", {
|
|
255
|
+
className: K.statusDetail,
|
|
231
256
|
children: a
|
|
232
257
|
})] })]
|
|
233
258
|
})]
|
|
234
259
|
})
|
|
235
260
|
]
|
|
236
261
|
});
|
|
237
|
-
},
|
|
262
|
+
}, q = {
|
|
238
263
|
viewer: "_viewer_1w97n_2",
|
|
239
264
|
spreadsheetCanvas: "_spreadsheetCanvas_1w97n_6",
|
|
240
265
|
formulaPanel: "_formulaPanel_1w97n_12",
|
|
@@ -242,13 +267,13 @@ var fe = { panel: "dial-attachment-canvas-panel" }, pe = {
|
|
|
242
267
|
statusOverlay: "_statusOverlay_1w97n_24",
|
|
243
268
|
errorIcon: "_errorIcon_1w97n_29",
|
|
244
269
|
highlight: "_highlight_1w97n_37"
|
|
245
|
-
},
|
|
270
|
+
}, Ce = (e) => {
|
|
246
271
|
if (e?.kind !== "range") return "";
|
|
247
272
|
let { activeCell: t } = e.selection, n = e.cells.find(({ address: e }) => e.row === t.row && e.col === t.col);
|
|
248
273
|
if (n == null) return "";
|
|
249
274
|
let r = n.formula;
|
|
250
275
|
return r == null || r.trim().length === 0 ? n.displayText : r.startsWith("=") ? r : `=${r}`;
|
|
251
|
-
},
|
|
276
|
+
}, we = async (e, t, { onError: n, onXlsxSelectionContextChange: i }) => {
|
|
252
277
|
switch (t) {
|
|
253
278
|
case r.Docx: {
|
|
254
279
|
let [{ DocxScrollViewer: t }, { chartEx: r }] = await Promise.all([import("@silurus/ooxml/docx"), import("@silurus/ooxml/chart-ex")]);
|
|
@@ -270,7 +295,7 @@ var fe = { panel: "dial-attachment-canvas-panel" }, pe = {
|
|
|
270
295
|
}
|
|
271
296
|
case r.Csv: {
|
|
272
297
|
let { XlsxSheetViewer: t } = await import("@silurus/ooxml/xlsx"), r = document.createElement("canvas");
|
|
273
|
-
r.className =
|
|
298
|
+
r.className = q.spreadsheetCanvas, e.replaceChildren(r);
|
|
274
299
|
let i = new t(r, {
|
|
275
300
|
showScrollbars: !0,
|
|
276
301
|
onError: n
|
|
@@ -294,7 +319,7 @@ var fe = { panel: "dial-attachment-canvas-panel" }, pe = {
|
|
|
294
319
|
});
|
|
295
320
|
}
|
|
296
321
|
}
|
|
297
|
-
},
|
|
322
|
+
}, Te = async (e, t, n, i) => {
|
|
298
323
|
let { onError: a, onXlsxSelectionContextChange: o, onGeometryInvalidated: s } = n;
|
|
299
324
|
switch (t.format) {
|
|
300
325
|
case r.Docx: {
|
|
@@ -303,7 +328,7 @@ var fe = { panel: "dial-attachment-canvas-panel" }, pe = {
|
|
|
303
328
|
import("@silurus/ooxml/chart-ex"),
|
|
304
329
|
import("./ooxml-highlight-surfaces-BzgOKpBV.js")
|
|
305
330
|
]), l = await n.load(t.url, { chartEx: o });
|
|
306
|
-
if (i()) throw l.destroy(), new
|
|
331
|
+
if (i()) throw l.destroy(), new Ee();
|
|
307
332
|
let u = r.fromDocument(e, l, {
|
|
308
333
|
enableTextSelection: !0,
|
|
309
334
|
refitOnResize: !0,
|
|
@@ -323,7 +348,7 @@ var fe = { panel: "dial-attachment-canvas-panel" }, pe = {
|
|
|
323
348
|
import("@silurus/ooxml/chart-ex"),
|
|
324
349
|
import("./ooxml-highlight-surfaces-BzgOKpBV.js")
|
|
325
350
|
]), l = await n.load(t.url, { chartEx: o });
|
|
326
|
-
if (i()) throw l.destroy(), new
|
|
351
|
+
if (i()) throw l.destroy(), new Ee();
|
|
327
352
|
let u = r.fromPresentation(e, l, {
|
|
328
353
|
enableTextSelection: !0,
|
|
329
354
|
refitOnResize: !0,
|
|
@@ -357,15 +382,15 @@ var fe = { panel: "dial-attachment-canvas-panel" }, pe = {
|
|
|
357
382
|
};
|
|
358
383
|
}
|
|
359
384
|
case r.Csv: {
|
|
360
|
-
let r = await
|
|
385
|
+
let r = await we(e, t.format, n);
|
|
361
386
|
return await r.load(t.url), { viewer: r };
|
|
362
387
|
}
|
|
363
388
|
}
|
|
364
|
-
},
|
|
365
|
-
let l =
|
|
389
|
+
}, Ee = class extends Error {}, De = ({ content: t, fileName: n, loadErrorLabel: i, formulaLabel: a, formulaLabelClassName: o, highlightsLabel: s = "Cited locations", highlightNavigatedLabel: c = "Scrolled to the cited location" }) => {
|
|
390
|
+
let l = L(null), [u, d] = R(!0), [f, p] = R(!1), [m, h] = R(""), [_, v] = R([]), [y, b] = R(!1), { highlights: x, selectedHighlightId: C } = t, w = x != null && x.length > 0, T = L(void 0), O = L(x);
|
|
366
391
|
O.current = x;
|
|
367
|
-
let k =
|
|
368
|
-
return
|
|
392
|
+
let k = L(void 0);
|
|
393
|
+
return F(() => {
|
|
369
394
|
let e = l.current;
|
|
370
395
|
if (e == null) return;
|
|
371
396
|
let n, r, i = !1, a, o = () => i;
|
|
@@ -387,7 +412,7 @@ var fe = { panel: "dial-attachment-canvas-panel" }, pe = {
|
|
|
387
412
|
i || (d(!1), p(!0));
|
|
388
413
|
},
|
|
389
414
|
onXlsxSelectionContextChange: (e) => {
|
|
390
|
-
i || h(
|
|
415
|
+
i || h(Ce(e));
|
|
391
416
|
},
|
|
392
417
|
onGeometryInvalidated: s
|
|
393
418
|
}, f = () => {
|
|
@@ -398,14 +423,14 @@ var fe = { panel: "dial-attachment-canvas-panel" }, pe = {
|
|
|
398
423
|
return e.addEventListener("scroll", s, !0), k.current = s, (async () => {
|
|
399
424
|
try {
|
|
400
425
|
if (w) {
|
|
401
|
-
let r = await
|
|
426
|
+
let r = await Te(e, t, u, o);
|
|
402
427
|
if (i) {
|
|
403
428
|
r.viewer.destroy(), r.engine?.destroy();
|
|
404
429
|
return;
|
|
405
430
|
}
|
|
406
431
|
n = r, T.current = r.highlights, f();
|
|
407
432
|
} else {
|
|
408
|
-
let r = await
|
|
433
|
+
let r = await we(e, t.format, u);
|
|
409
434
|
if (i) {
|
|
410
435
|
r.destroy();
|
|
411
436
|
return;
|
|
@@ -416,7 +441,7 @@ var fe = { panel: "dial-attachment-canvas-panel" }, pe = {
|
|
|
416
441
|
if (i) return;
|
|
417
442
|
d(!1), await c();
|
|
418
443
|
} catch (t) {
|
|
419
|
-
if (t instanceof
|
|
444
|
+
if (t instanceof Ee || i) return;
|
|
420
445
|
n?.viewer.destroy(), n?.engine?.destroy(), n = void 0, T.current = void 0, e.replaceChildren(), d(!1), p(!0);
|
|
421
446
|
}
|
|
422
447
|
})(), () => {
|
|
@@ -426,9 +451,9 @@ var fe = { panel: "dial-attachment-canvas-panel" }, pe = {
|
|
|
426
451
|
t.format,
|
|
427
452
|
t.url,
|
|
428
453
|
w
|
|
429
|
-
]),
|
|
454
|
+
]), F(() => {
|
|
430
455
|
k.current?.();
|
|
431
|
-
}, [x]),
|
|
456
|
+
}, [x]), F(() => {
|
|
432
457
|
b(!1);
|
|
433
458
|
let t = T.current;
|
|
434
459
|
if (t == null || u) return;
|
|
@@ -446,38 +471,38 @@ var fe = { panel: "dial-attachment-canvas-panel" }, pe = {
|
|
|
446
471
|
})(), () => {
|
|
447
472
|
r = !0;
|
|
448
473
|
};
|
|
449
|
-
}, [C, u]), /* @__PURE__ */
|
|
474
|
+
}, [C, u]), /* @__PURE__ */ H("div", {
|
|
450
475
|
className: "relative flex h-full w-full min-w-0 flex-col overflow-hidden",
|
|
451
476
|
children: [
|
|
452
|
-
t.format === r.Xlsx && /* @__PURE__ */
|
|
477
|
+
t.format === r.Xlsx && /* @__PURE__ */ H("div", {
|
|
453
478
|
role: "region",
|
|
454
479
|
"aria-label": a,
|
|
455
|
-
className: g("flex min-w-0 shrink-0 items-center gap-2 border-b px-3 py-2",
|
|
456
|
-
children: [/* @__PURE__ */
|
|
480
|
+
className: g("flex min-w-0 shrink-0 items-center gap-2 border-b px-3 py-2", q.formulaPanel),
|
|
481
|
+
children: [/* @__PURE__ */ V("span", {
|
|
457
482
|
"aria-hidden": "true",
|
|
458
483
|
className: g("shrink-0", o),
|
|
459
484
|
children: "fx"
|
|
460
|
-
}), /* @__PURE__ */
|
|
485
|
+
}), /* @__PURE__ */ V("code", {
|
|
461
486
|
dir: "ltr",
|
|
462
487
|
tabIndex: 0,
|
|
463
488
|
"aria-live": "polite",
|
|
464
|
-
className: g("h-8 min-w-0 flex-1 overflow-x-auto whitespace-nowrap rounded border px-2 py-1 text-sm focus-visible:outline focus-visible:outline-focus",
|
|
489
|
+
className: g("h-8 min-w-0 flex-1 overflow-x-auto whitespace-nowrap rounded border px-2 py-1 text-sm focus-visible:outline focus-visible:outline-focus", q.formulaValue),
|
|
465
490
|
children: m
|
|
466
491
|
})]
|
|
467
492
|
}),
|
|
468
|
-
/* @__PURE__ */
|
|
493
|
+
/* @__PURE__ */ H("div", {
|
|
469
494
|
className: "relative min-h-0 w-full flex-1",
|
|
470
|
-
children: [/* @__PURE__ */
|
|
495
|
+
children: [/* @__PURE__ */ V("div", {
|
|
471
496
|
ref: l,
|
|
472
497
|
role: "document",
|
|
473
498
|
"aria-label": n,
|
|
474
499
|
"aria-busy": u,
|
|
475
|
-
className: g("h-full w-full overflow-hidden",
|
|
476
|
-
}), _.length > 0 && /* @__PURE__ */
|
|
500
|
+
className: g("h-full w-full overflow-hidden", q.viewer)
|
|
501
|
+
}), _.length > 0 && /* @__PURE__ */ V("div", {
|
|
477
502
|
role: "region",
|
|
478
503
|
"aria-label": s,
|
|
479
504
|
className: "pointer-events-none absolute inset-0 overflow-hidden",
|
|
480
|
-
children: _.map((e, t) => /* @__PURE__ */
|
|
505
|
+
children: _.map((e, t) => /* @__PURE__ */ V("div", {
|
|
481
506
|
"aria-hidden": "true",
|
|
482
507
|
style: {
|
|
483
508
|
left: `${e.left}px`,
|
|
@@ -487,28 +512,28 @@ var fe = { panel: "dial-attachment-canvas-panel" }, pe = {
|
|
|
487
512
|
},
|
|
488
513
|
"data-selected": e.highlightId === C,
|
|
489
514
|
"data-clipped": e.isClippedAtEnd === !0,
|
|
490
|
-
className: g("absolute",
|
|
515
|
+
className: g("absolute", q.highlight)
|
|
491
516
|
}, `${e.highlightId}-${t}`))
|
|
492
517
|
})]
|
|
493
518
|
}),
|
|
494
|
-
/* @__PURE__ */
|
|
519
|
+
/* @__PURE__ */ V("div", {
|
|
495
520
|
role: "status",
|
|
496
521
|
"aria-live": "polite",
|
|
497
522
|
className: "sr-only",
|
|
498
523
|
children: y ? c : ""
|
|
499
524
|
}),
|
|
500
|
-
(u || f) && /* @__PURE__ */
|
|
525
|
+
(u || f) && /* @__PURE__ */ V("div", {
|
|
501
526
|
role: f ? "alert" : void 0,
|
|
502
527
|
"aria-live": "polite",
|
|
503
|
-
className: g("absolute inset-0 flex items-center justify-center",
|
|
504
|
-
children: u ? /* @__PURE__ */
|
|
528
|
+
className: g("absolute inset-0 flex items-center justify-center", q.statusOverlay),
|
|
529
|
+
children: u ? /* @__PURE__ */ V(E, { size: 48 }) : /* @__PURE__ */ H("div", {
|
|
505
530
|
className: "flex flex-col items-center gap-2",
|
|
506
|
-
children: [/* @__PURE__ */
|
|
531
|
+
children: [/* @__PURE__ */ V(D, {
|
|
507
532
|
"aria-hidden": "true",
|
|
508
533
|
size: 60,
|
|
509
534
|
stroke: S,
|
|
510
|
-
className:
|
|
511
|
-
}), /* @__PURE__ */
|
|
535
|
+
className: q.errorIcon
|
|
536
|
+
}), /* @__PURE__ */ V("p", {
|
|
512
537
|
className: "text-center",
|
|
513
538
|
children: i
|
|
514
539
|
})]
|
|
@@ -516,17 +541,17 @@ var fe = { panel: "dial-attachment-canvas-panel" }, pe = {
|
|
|
516
541
|
})
|
|
517
542
|
]
|
|
518
543
|
});
|
|
519
|
-
},
|
|
544
|
+
}, Oe = {
|
|
520
545
|
loadingOverlay: "_loadingOverlay_12637_1",
|
|
521
546
|
statusLabel: "_statusLabel_12637_5",
|
|
522
547
|
errorIcon: "_errorIcon_12637_9"
|
|
523
|
-
},
|
|
524
|
-
let o =
|
|
525
|
-
return f.current = e,
|
|
548
|
+
}, ke = ({ content: e, loadingLabel: t, errorLabel: n = "Failed to load visualizer", frameTitle: r, colors: a }) => {
|
|
549
|
+
let o = L(null), [s, c] = R("loading"), { url: l, visualizerName: u, requestTimeout: d } = e, f = L(e);
|
|
550
|
+
return f.current = e, F(() => {
|
|
526
551
|
let e = o.current;
|
|
527
552
|
if (!e) return;
|
|
528
553
|
c("loading");
|
|
529
|
-
let t = new
|
|
554
|
+
let t = new ue(e, {
|
|
530
555
|
domain: l,
|
|
531
556
|
hostDomain: window.location.origin,
|
|
532
557
|
visualizerName: u,
|
|
@@ -535,7 +560,7 @@ var fe = { panel: "dial-attachment-canvas-panel" }, pe = {
|
|
|
535
560
|
return (async () => {
|
|
536
561
|
if (await t.ready(), !n) return;
|
|
537
562
|
let e = f.current;
|
|
538
|
-
if (e.type === i.GroupedVisualizer) await t.send(
|
|
563
|
+
if (e.type === i.GroupedVisualizer) await t.send(le.sendGroupedVisualizeData, {
|
|
539
564
|
attachments: e.attachments,
|
|
540
565
|
layout: e.layout
|
|
541
566
|
});
|
|
@@ -544,7 +569,7 @@ var fe = { panel: "dial-attachment-canvas-panel" }, pe = {
|
|
|
544
569
|
layout: r,
|
|
545
570
|
...typeof i == "object" && i ? i : {}
|
|
546
571
|
};
|
|
547
|
-
await t.send(
|
|
572
|
+
await t.send(le.sendVisualizeData, {
|
|
548
573
|
mimeType: n,
|
|
549
574
|
visualizerData: a
|
|
550
575
|
});
|
|
@@ -559,7 +584,7 @@ var fe = { panel: "dial-attachment-canvas-panel" }, pe = {
|
|
|
559
584
|
l,
|
|
560
585
|
u,
|
|
561
586
|
d
|
|
562
|
-
]),
|
|
587
|
+
]), F(() => {
|
|
563
588
|
let e = r ?? u.trim();
|
|
564
589
|
e !== "" && o.current?.querySelector("iframe")?.setAttribute("title", e);
|
|
565
590
|
}, [
|
|
@@ -567,7 +592,7 @@ var fe = { panel: "dial-attachment-canvas-panel" }, pe = {
|
|
|
567
592
|
u,
|
|
568
593
|
l,
|
|
569
594
|
d
|
|
570
|
-
]), /* @__PURE__ */
|
|
595
|
+
]), /* @__PURE__ */ H("div", {
|
|
571
596
|
className: "relative h-full w-full",
|
|
572
597
|
style: m({
|
|
573
598
|
"--vs-loading-bg": a?.loadingBackground,
|
|
@@ -575,33 +600,33 @@ var fe = { panel: "dial-attachment-canvas-panel" }, pe = {
|
|
|
575
600
|
"--vs-error-icon": a?.errorIcon
|
|
576
601
|
}),
|
|
577
602
|
children: [
|
|
578
|
-
/* @__PURE__ */
|
|
603
|
+
/* @__PURE__ */ V("div", {
|
|
579
604
|
ref: o,
|
|
580
605
|
className: "h-full w-full"
|
|
581
606
|
}),
|
|
582
|
-
s === "loading" && /* @__PURE__ */
|
|
583
|
-
className: g("absolute inset-0 flex flex-col items-center justify-center gap-2",
|
|
584
|
-
children: [/* @__PURE__ */
|
|
585
|
-
className: g("text-center",
|
|
607
|
+
s === "loading" && /* @__PURE__ */ H("div", {
|
|
608
|
+
className: g("absolute inset-0 flex flex-col items-center justify-center gap-2", Oe.loadingOverlay),
|
|
609
|
+
children: [/* @__PURE__ */ V(E, {}), t && /* @__PURE__ */ V("p", {
|
|
610
|
+
className: g("text-center", Oe.statusLabel),
|
|
586
611
|
children: t
|
|
587
612
|
})]
|
|
588
613
|
}),
|
|
589
|
-
s === "error" && /* @__PURE__ */
|
|
614
|
+
s === "error" && /* @__PURE__ */ H("div", {
|
|
590
615
|
className: "absolute inset-0 flex flex-col items-center justify-center gap-2",
|
|
591
|
-
children: [/* @__PURE__ */
|
|
616
|
+
children: [/* @__PURE__ */ V(D, {
|
|
592
617
|
size: 60,
|
|
593
618
|
stroke: S,
|
|
594
619
|
"aria-hidden": !0,
|
|
595
|
-
className:
|
|
596
|
-
}), /* @__PURE__ */
|
|
620
|
+
className: Oe.errorIcon
|
|
621
|
+
}), /* @__PURE__ */ V("p", {
|
|
597
622
|
role: "alert",
|
|
598
|
-
className: g("text-center",
|
|
623
|
+
className: g("text-center", Oe.statusLabel),
|
|
599
624
|
children: n
|
|
600
625
|
})]
|
|
601
626
|
})
|
|
602
627
|
]
|
|
603
628
|
});
|
|
604
|
-
},
|
|
629
|
+
}, J = {
|
|
605
630
|
body: "_body_13ogb_4",
|
|
606
631
|
statusLabel: "_statusLabel_13ogb_13",
|
|
607
632
|
errorIcon: "_errorIcon_13ogb_17",
|
|
@@ -616,66 +641,66 @@ var fe = { panel: "dial-attachment-canvas-panel" }, pe = {
|
|
|
616
641
|
jsonExpandIcon: "_jsonExpandIcon_13ogb_54",
|
|
617
642
|
jsonCollapseIcon: "_jsonCollapseIcon_13ogb_67",
|
|
618
643
|
jsonCollapsedContent: "_jsonCollapsedContent_13ogb_84"
|
|
619
|
-
},
|
|
620
|
-
let [r, i] =
|
|
621
|
-
return
|
|
644
|
+
}, Ae = () => j(async () => ({ default: (await import("./PdfContent-BoAtghsO.js")).PdfContent })), je = ({ url: e, fileName: t, loadErrorLabel: n }) => {
|
|
645
|
+
let [r, i] = R(!1);
|
|
646
|
+
return F(() => {
|
|
622
647
|
i(!1);
|
|
623
|
-
}, [e]), r ? /* @__PURE__ */
|
|
648
|
+
}, [e]), r ? /* @__PURE__ */ H("div", {
|
|
624
649
|
className: "flex flex-col items-center gap-2",
|
|
625
|
-
children: [/* @__PURE__ */
|
|
650
|
+
children: [/* @__PURE__ */ V(D, {
|
|
626
651
|
size: 60,
|
|
627
652
|
stroke: S,
|
|
628
|
-
className:
|
|
629
|
-
}), /* @__PURE__ */
|
|
630
|
-
className: g("text-center",
|
|
653
|
+
className: J.errorIcon
|
|
654
|
+
}), /* @__PURE__ */ V("p", {
|
|
655
|
+
className: g("text-center", J.statusLabel),
|
|
631
656
|
children: n
|
|
632
657
|
})]
|
|
633
|
-
}) : /* @__PURE__ */
|
|
658
|
+
}) : /* @__PURE__ */ V("img", {
|
|
634
659
|
src: e,
|
|
635
660
|
alt: t ?? "",
|
|
636
661
|
className: "max-h-full max-w-full object-contain",
|
|
637
662
|
onError: () => i(!0)
|
|
638
663
|
});
|
|
639
|
-
},
|
|
664
|
+
}, Me = new Set([
|
|
640
665
|
i.PlainText,
|
|
641
666
|
i.Code,
|
|
642
667
|
i.Ooxml
|
|
643
|
-
]),
|
|
644
|
-
let { colors:
|
|
645
|
-
|
|
646
|
-
}, []),
|
|
668
|
+
]), Ne = M(({ content: e, isLoading: t = !1, fileName: r, isHtmlSourceView: a = !1, labels: { unsupportedLabel: o = "Preview is not supported for this file", loadErrorLabel: c = "Failed to load file", forbiddenErrorLabel: l = "You don't have permission to access this file", visualizerErrorLabel: d, htmlFrameBlockedLabel: f = "This page cannot be displayed in preview", htmlOpenInNewTabLabel: h = "Open in new tab", pdfThumbnailsLabel: _, pdfShowThumbnailsLabel: v, pdfHideThumbnailsLabel: y, pdfPageNumberLabel: b, pdfContentLoadingLabel: x, pdfContentErrorLabel: C, pdfContentRetryLabel: w, xlsxFormulaLabel: T = "Formula", codeContentLoadingLabel: O, codeContentErrorLabel: k, codeContentRetryLabel: ee, tableCopyLabel: A, tableCopiedLabel: te, tableDownloadCsvLabel: ne, ooxmlHighlightsLabel: ie, ooxmlHighlightNavigatedLabel: ae } = {}, styles: oe, codeBlockTheme: j, tableDownloadFilename: M, loadPdf: P, hidePdfToolbar: F = !1, configurePdfWorker: L, onAppInfo: B }) => {
|
|
669
|
+
let { colors: U, typography: W, bodyClassName: ce, cssVars: le } = oe ?? {}, [ue, de] = R(0), fe = I(Ae, [ue]), pe = N(() => {
|
|
670
|
+
de((e) => e + 1);
|
|
671
|
+
}, []), G = W?.fontClassName != null, he = I(() => ({
|
|
647
672
|
...m({
|
|
648
|
-
"--ac-text":
|
|
649
|
-
"--ac-status-text":
|
|
650
|
-
"--ac-error-icon":
|
|
651
|
-
"--ac-open-in-new-tab-text":
|
|
652
|
-
"--ac-json-border":
|
|
653
|
-
"--ac-json-bg":
|
|
654
|
-
"--ac-json-label":
|
|
655
|
-
"--ac-json-clickable-label":
|
|
656
|
-
"--ac-json-punctuation":
|
|
657
|
-
"--ac-json-string":
|
|
658
|
-
"--ac-json-number":
|
|
659
|
-
"--ac-json-boolean":
|
|
660
|
-
"--ac-json-null":
|
|
661
|
-
"--ac-json-toggle-icon":
|
|
662
|
-
"--ac-json-toggle-icon-hover":
|
|
663
|
-
"--ac-ooxml-bg":
|
|
664
|
-
"--ac-ooxml-formula-border":
|
|
665
|
-
"--ac-ooxml-formula-bg":
|
|
666
|
-
"--ac-ooxml-formula-text":
|
|
667
|
-
"--ac-ooxml-highlight-border":
|
|
668
|
-
"--ac-ooxml-highlight-bg":
|
|
669
|
-
"--ac-json-collapsed-text":
|
|
670
|
-
"--ac-json-collapsed-bg":
|
|
671
|
-
"--ac-font-family":
|
|
672
|
-
"--ac-font-size":
|
|
673
|
-
"--ac-font-weight":
|
|
674
|
-
"--ac-line-height":
|
|
675
|
-
"--ac-letter-spacing":
|
|
673
|
+
"--ac-text": U?.text,
|
|
674
|
+
"--ac-status-text": U?.statusText,
|
|
675
|
+
"--ac-error-icon": U?.errorIcon,
|
|
676
|
+
"--ac-open-in-new-tab-text": U?.openInNewTabText,
|
|
677
|
+
"--ac-json-border": U?.jsonBorder,
|
|
678
|
+
"--ac-json-bg": U?.jsonBackground,
|
|
679
|
+
"--ac-json-label": U?.jsonLabel,
|
|
680
|
+
"--ac-json-clickable-label": U?.jsonClickableLabel,
|
|
681
|
+
"--ac-json-punctuation": U?.jsonPunctuation,
|
|
682
|
+
"--ac-json-string": U?.jsonString,
|
|
683
|
+
"--ac-json-number": U?.jsonNumber,
|
|
684
|
+
"--ac-json-boolean": U?.jsonBoolean,
|
|
685
|
+
"--ac-json-null": U?.jsonNull,
|
|
686
|
+
"--ac-json-toggle-icon": U?.jsonToggleIcon,
|
|
687
|
+
"--ac-json-toggle-icon-hover": U?.jsonToggleIconHover,
|
|
688
|
+
"--ac-ooxml-bg": U?.ooxmlBackground,
|
|
689
|
+
"--ac-ooxml-formula-border": U?.ooxmlFormulaBorder,
|
|
690
|
+
"--ac-ooxml-formula-bg": U?.ooxmlFormulaBackground,
|
|
691
|
+
"--ac-ooxml-formula-text": U?.ooxmlFormulaText,
|
|
692
|
+
"--ac-ooxml-highlight-border": U?.ooxmlHighlightBorder,
|
|
693
|
+
"--ac-ooxml-highlight-bg": U?.ooxmlHighlightBackground,
|
|
694
|
+
"--ac-json-collapsed-text": U?.jsonCollapsedText,
|
|
695
|
+
"--ac-json-collapsed-bg": U?.jsonCollapsedBackground,
|
|
696
|
+
"--ac-font-family": G ? void 0 : W?.fontFamily,
|
|
697
|
+
"--ac-font-size": G ? void 0 : W?.fontSize,
|
|
698
|
+
"--ac-font-weight": G ? void 0 : W?.fontWeight,
|
|
699
|
+
"--ac-line-height": G ? void 0 : W?.lineHeight,
|
|
700
|
+
"--ac-letter-spacing": G ? void 0 : W?.letterSpacing
|
|
676
701
|
}),
|
|
677
|
-
...
|
|
678
|
-
}), [
|
|
702
|
+
...le
|
|
703
|
+
}), [oe]), _e = I(() => {
|
|
679
704
|
switch (e.type) {
|
|
680
705
|
case i.Image:
|
|
681
706
|
case i.Audio:
|
|
@@ -693,38 +718,38 @@ var fe = { panel: "dial-attachment-canvas-panel" }, pe = {
|
|
|
693
718
|
case i.MarkdownTable: return "flex h-full min-h-0 flex-col overflow-hidden p-4";
|
|
694
719
|
default: return "h-full overflow-auto p-4";
|
|
695
720
|
}
|
|
696
|
-
}, [e.type]),
|
|
721
|
+
}, [e.type]), ve = I(() => {
|
|
697
722
|
switch (e.type) {
|
|
698
|
-
case i.PlainText: return /* @__PURE__ */
|
|
699
|
-
className: g("whitespace-pre-wrap break-words",
|
|
723
|
+
case i.PlainText: return /* @__PURE__ */ V("pre", {
|
|
724
|
+
className: g("whitespace-pre-wrap break-words", J.body, W?.fontClassName),
|
|
700
725
|
children: e.text
|
|
701
726
|
});
|
|
702
|
-
case i.Image: return /* @__PURE__ */
|
|
727
|
+
case i.Image: return /* @__PURE__ */ V(je, {
|
|
703
728
|
url: e.url,
|
|
704
729
|
fileName: r,
|
|
705
730
|
loadErrorLabel: c
|
|
706
731
|
});
|
|
707
|
-
case i.Audio: return /* @__PURE__ */
|
|
732
|
+
case i.Audio: return /* @__PURE__ */ V("audio", {
|
|
708
733
|
controls: !0,
|
|
709
734
|
src: e.url,
|
|
710
735
|
"aria-label": r ?? "Audio attachment",
|
|
711
736
|
className: "w-full max-w-sm",
|
|
712
737
|
preload: "metadata",
|
|
713
|
-
children: e.mimeType && /* @__PURE__ */
|
|
738
|
+
children: e.mimeType && /* @__PURE__ */ V("source", {
|
|
714
739
|
src: e.url,
|
|
715
740
|
type: e.mimeType
|
|
716
741
|
})
|
|
717
742
|
});
|
|
718
|
-
case i.Markdown: return /* @__PURE__ */
|
|
743
|
+
case i.Markdown: return /* @__PURE__ */ V(p, {
|
|
719
744
|
content: e.text,
|
|
720
745
|
isStreaming: !1,
|
|
721
|
-
codeBlockTheme:
|
|
746
|
+
codeBlockTheme: j,
|
|
722
747
|
classNames: u
|
|
723
748
|
});
|
|
724
|
-
case i.MarkdownTable: return /* @__PURE__ */
|
|
749
|
+
case i.MarkdownTable: return /* @__PURE__ */ V(p, {
|
|
725
750
|
content: e.text,
|
|
726
751
|
isStreaming: !1,
|
|
727
|
-
codeBlockTheme:
|
|
752
|
+
codeBlockTheme: j,
|
|
728
753
|
containerClassName: "flex h-full min-h-0 flex-col",
|
|
729
754
|
classNames: {
|
|
730
755
|
...u,
|
|
@@ -732,49 +757,49 @@ var fe = { panel: "dial-attachment-canvas-panel" }, pe = {
|
|
|
732
757
|
tableScrollContainer: "max-h-full"
|
|
733
758
|
},
|
|
734
759
|
tableActionLabels: {
|
|
735
|
-
copyLabel:
|
|
736
|
-
copiedLabel:
|
|
737
|
-
downloadCsvLabel:
|
|
760
|
+
copyLabel: A,
|
|
761
|
+
copiedLabel: te,
|
|
762
|
+
downloadCsvLabel: ne
|
|
738
763
|
},
|
|
739
|
-
tableDownloadFilename:
|
|
764
|
+
tableDownloadFilename: M
|
|
740
765
|
});
|
|
741
|
-
case i.Json: return /* @__PURE__ */
|
|
766
|
+
case i.Json: return /* @__PURE__ */ V("div", {
|
|
742
767
|
dir: "ltr",
|
|
743
768
|
className: "h-full overflow-auto",
|
|
744
|
-
children: /* @__PURE__ */
|
|
745
|
-
className: g("m-3 overflow-auto rounded-md border",
|
|
746
|
-
children: /* @__PURE__ */
|
|
769
|
+
children: /* @__PURE__ */ V("div", {
|
|
770
|
+
className: g("m-3 overflow-auto rounded-md border", J.jsonWrapper),
|
|
771
|
+
children: /* @__PURE__ */ V(se, {
|
|
747
772
|
data: e.value,
|
|
748
773
|
style: {
|
|
749
|
-
container: g("whitespace-pre-wrap break-words p-2",
|
|
750
|
-
basicChildStyle:
|
|
774
|
+
container: g("whitespace-pre-wrap break-words p-2", W?.jsonClassName ?? "dial-code-text"),
|
|
775
|
+
basicChildStyle: z.basicChildStyle,
|
|
751
776
|
childFieldsContainer: "m-0 ps-3",
|
|
752
|
-
label: g("me-1 font-semibold",
|
|
753
|
-
clickableLabel: g("me-1 cursor-pointer font-semibold hover:underline",
|
|
754
|
-
nullValue: g("italic",
|
|
755
|
-
undefinedValue: g("italic",
|
|
756
|
-
stringValue:
|
|
757
|
-
booleanValue:
|
|
758
|
-
numberValue:
|
|
759
|
-
otherValue: g("italic",
|
|
760
|
-
punctuation: g("me-1",
|
|
761
|
-
collapseIcon: g("me-1 cursor-pointer select-none transition-colors",
|
|
762
|
-
expandIcon: g("me-1 cursor-pointer select-none transition-colors",
|
|
763
|
-
collapsedContent: g("me-1 cursor-pointer rounded px-1",
|
|
777
|
+
label: g("me-1 font-semibold", J.jsonLabel),
|
|
778
|
+
clickableLabel: g("me-1 cursor-pointer font-semibold hover:underline", J.jsonClickableLabel),
|
|
779
|
+
nullValue: g("italic", J.jsonNullValue),
|
|
780
|
+
undefinedValue: g("italic", J.jsonNullValue),
|
|
781
|
+
stringValue: J.jsonStringValue,
|
|
782
|
+
booleanValue: J.jsonBooleanValue,
|
|
783
|
+
numberValue: J.jsonNumberValue,
|
|
784
|
+
otherValue: g("italic", J.jsonNullValue),
|
|
785
|
+
punctuation: g("me-1", J.jsonPunctuation),
|
|
786
|
+
collapseIcon: g("me-1 cursor-pointer select-none transition-colors", J.jsonCollapseIcon),
|
|
787
|
+
expandIcon: g("me-1 cursor-pointer select-none transition-colors", J.jsonExpandIcon),
|
|
788
|
+
collapsedContent: g("me-1 cursor-pointer rounded px-1", J.jsonCollapsedContent)
|
|
764
789
|
}
|
|
765
790
|
})
|
|
766
791
|
})
|
|
767
792
|
});
|
|
768
|
-
case i.Code: return /* @__PURE__ */
|
|
793
|
+
case i.Code: return /* @__PURE__ */ V(me, {
|
|
769
794
|
content: e,
|
|
770
|
-
codeBlockTheme:
|
|
795
|
+
codeBlockTheme: j,
|
|
771
796
|
labels: {
|
|
772
797
|
loadingLabel: O,
|
|
773
798
|
errorLabel: k,
|
|
774
799
|
retryLabel: ee
|
|
775
800
|
}
|
|
776
801
|
});
|
|
777
|
-
case i.Html: return /* @__PURE__ */
|
|
802
|
+
case i.Html: return /* @__PURE__ */ V(ge, {
|
|
778
803
|
content: e,
|
|
779
804
|
labels: {
|
|
780
805
|
htmlFrameBlockedLabel: f,
|
|
@@ -782,25 +807,25 @@ var fe = { panel: "dial-attachment-canvas-panel" }, pe = {
|
|
|
782
807
|
},
|
|
783
808
|
isSourceView: a,
|
|
784
809
|
title: r,
|
|
785
|
-
codeBlockTheme:
|
|
810
|
+
codeBlockTheme: j
|
|
786
811
|
});
|
|
787
|
-
case i.Pdf: return /* @__PURE__ */
|
|
788
|
-
retryKey:
|
|
789
|
-
onRetry:
|
|
812
|
+
case i.Pdf: return /* @__PURE__ */ V(s, {
|
|
813
|
+
retryKey: ue,
|
|
814
|
+
onRetry: pe,
|
|
790
815
|
labels: {
|
|
791
816
|
loadingLabel: x,
|
|
792
817
|
errorLabel: C,
|
|
793
818
|
retryLabel: w
|
|
794
819
|
},
|
|
795
|
-
children: /* @__PURE__ */
|
|
820
|
+
children: /* @__PURE__ */ V(fe, {
|
|
796
821
|
fileName: r,
|
|
797
822
|
url: e.url,
|
|
798
823
|
highlights: e.highlights ?? [],
|
|
799
824
|
selectedHighlightId: e.selectedHighlightId,
|
|
800
825
|
selectedPageNumber: e.page,
|
|
801
|
-
loadPdf:
|
|
802
|
-
hideHeader:
|
|
803
|
-
configurePdfWorker:
|
|
826
|
+
loadPdf: P,
|
|
827
|
+
hideHeader: F,
|
|
828
|
+
configurePdfWorker: L,
|
|
804
829
|
labels: {
|
|
805
830
|
thumbnailsLabel: _,
|
|
806
831
|
showThumbnailsLabel: v,
|
|
@@ -812,38 +837,38 @@ var fe = { panel: "dial-attachment-canvas-panel" }, pe = {
|
|
|
812
837
|
}
|
|
813
838
|
})
|
|
814
839
|
}, e.url);
|
|
815
|
-
case i.Ooxml: return /* @__PURE__ */
|
|
840
|
+
case i.Ooxml: return /* @__PURE__ */ V(De, {
|
|
816
841
|
content: e,
|
|
817
842
|
fileName: r,
|
|
818
843
|
loadErrorLabel: c,
|
|
819
844
|
formulaLabel: T,
|
|
820
|
-
formulaLabelClassName:
|
|
821
|
-
highlightsLabel:
|
|
822
|
-
highlightNavigatedLabel:
|
|
845
|
+
formulaLabelClassName: W?.xlsxFormulaLabelClassName ?? "dial-italic-text",
|
|
846
|
+
highlightsLabel: ie,
|
|
847
|
+
highlightNavigatedLabel: ae
|
|
823
848
|
});
|
|
824
849
|
case i.Visualizer:
|
|
825
|
-
case i.GroupedVisualizer: return /* @__PURE__ */
|
|
850
|
+
case i.GroupedVisualizer: return /* @__PURE__ */ V(ke, {
|
|
826
851
|
content: e,
|
|
827
852
|
errorLabel: d
|
|
828
853
|
});
|
|
829
|
-
case i.McpApp: return /* @__PURE__ */
|
|
854
|
+
case i.McpApp: return /* @__PURE__ */ V(Se, {
|
|
830
855
|
content: e,
|
|
831
|
-
onAppInfo:
|
|
856
|
+
onAppInfo: B
|
|
832
857
|
});
|
|
833
|
-
case i.Unsupported: return /* @__PURE__ */
|
|
834
|
-
className: g("text-center",
|
|
858
|
+
case i.Unsupported: return /* @__PURE__ */ V("p", {
|
|
859
|
+
className: g("text-center", J.statusLabel),
|
|
835
860
|
children: o
|
|
836
861
|
});
|
|
837
862
|
case i.Error: {
|
|
838
863
|
let t = e.errorType === n.Forbidden;
|
|
839
|
-
return /* @__PURE__ */
|
|
864
|
+
return /* @__PURE__ */ H("div", {
|
|
840
865
|
className: "flex flex-col items-center gap-2",
|
|
841
|
-
children: [
|
|
866
|
+
children: [V(t ? re : D, {
|
|
842
867
|
size: 60,
|
|
843
868
|
stroke: S,
|
|
844
|
-
className:
|
|
845
|
-
}), /* @__PURE__ */
|
|
846
|
-
className: g("text-center",
|
|
869
|
+
className: J.errorIcon
|
|
870
|
+
}), /* @__PURE__ */ V("p", {
|
|
871
|
+
className: g("text-center", J.statusLabel),
|
|
847
872
|
children: t ? l : c
|
|
848
873
|
})]
|
|
849
874
|
});
|
|
@@ -851,11 +876,11 @@ var fe = { panel: "dial-attachment-canvas-panel" }, pe = {
|
|
|
851
876
|
}
|
|
852
877
|
}, [
|
|
853
878
|
e,
|
|
854
|
-
|
|
855
|
-
|
|
856
|
-
|
|
879
|
+
W?.fontClassName,
|
|
880
|
+
W?.jsonClassName,
|
|
881
|
+
W?.xlsxFormulaLabelClassName,
|
|
857
882
|
r,
|
|
858
|
-
|
|
883
|
+
j,
|
|
859
884
|
o,
|
|
860
885
|
c,
|
|
861
886
|
l,
|
|
@@ -863,11 +888,11 @@ var fe = { panel: "dial-attachment-canvas-panel" }, pe = {
|
|
|
863
888
|
f,
|
|
864
889
|
h,
|
|
865
890
|
a,
|
|
866
|
-
|
|
867
|
-
N,
|
|
891
|
+
M,
|
|
868
892
|
P,
|
|
869
|
-
|
|
870
|
-
|
|
893
|
+
F,
|
|
894
|
+
L,
|
|
895
|
+
B,
|
|
871
896
|
_,
|
|
872
897
|
v,
|
|
873
898
|
y,
|
|
@@ -879,59 +904,59 @@ var fe = { panel: "dial-attachment-canvas-panel" }, pe = {
|
|
|
879
904
|
O,
|
|
880
905
|
k,
|
|
881
906
|
ee,
|
|
907
|
+
fe,
|
|
908
|
+
ue,
|
|
882
909
|
pe,
|
|
883
|
-
|
|
884
|
-
me,
|
|
910
|
+
A,
|
|
885
911
|
te,
|
|
886
912
|
ne,
|
|
887
|
-
|
|
888
|
-
ae
|
|
889
|
-
oe
|
|
913
|
+
ie,
|
|
914
|
+
ae
|
|
890
915
|
]);
|
|
891
|
-
return /* @__PURE__ */
|
|
892
|
-
style: !t &&
|
|
893
|
-
className: g(t ? "flex h-full items-center justify-center" :
|
|
894
|
-
children: t ? /* @__PURE__ */
|
|
916
|
+
return /* @__PURE__ */ V("div", {
|
|
917
|
+
style: !t && Me.has(e.type) ? he : void 0,
|
|
918
|
+
className: g(t ? "flex h-full items-center justify-center" : _e, ce),
|
|
919
|
+
children: t ? /* @__PURE__ */ V(E, {}) : ve
|
|
895
920
|
});
|
|
896
|
-
}),
|
|
921
|
+
}), Pe = {
|
|
897
922
|
mcpAppDivider: "_mcpAppDivider_1jh5p_1",
|
|
898
923
|
mcpAppVersion: "_mcpAppVersion_1jh5p_5"
|
|
899
|
-
},
|
|
900
|
-
let [
|
|
901
|
-
|
|
902
|
-
}, [
|
|
903
|
-
|
|
904
|
-
}, [
|
|
905
|
-
|
|
906
|
-
}, [
|
|
907
|
-
|
|
908
|
-
|
|
924
|
+
}, Fe = 2e3, Ie = M(({ isOpen: e, isLoading: t = !1, onClose: n, content: r, fileName: a, leftActions: s, labels: { ariaLabel: c, closeLabel: l = "Close", resizeLabel: u = "Resize panel", downloadLabel: d = "Download", copyTextLabel: f = "Copy text", copiedTextLabel: p = "Copied!", copyMarkdownLabel: h = "Copy as Markdown", copiedMarkdownLabel: _ = "Copied!", copyJsonLabel: v = "Copy as JSON", copiedJsonLabel: C = "Copied!", visualizerErrorLabel: T, unsupportedLabel: E = "Preview is not supported for this file", loadErrorLabel: D = "Failed to load file", forbiddenErrorLabel: O = "You don't have permission to access this file", htmlFrameBlockedLabel: re = "This page cannot be displayed in preview", htmlOpenInNewTabLabel: oe = "Open in new tab", htmlViewSourceLabel: j = "View source", htmlViewRenderedLabel: M = "View rendered", mcpAppReloadLabel: P = "Reload", pdfThumbnailsLabel: se, pdfShowThumbnailsLabel: z, pdfHideThumbnailsLabel: U, pdfPageNumberLabel: W, pdfContentLoadingLabel: ce, pdfContentErrorLabel: le, pdfContentRetryLabel: ue, xlsxFormulaLabel: fe, codeContentLoadingLabel: pe, codeContentErrorLabel: G, codeContentRetryLabel: me, tableCopyLabel: he, tableCopiedLabel: ge, tableDownloadCsvLabel: _e, ooxmlHighlightsLabel: ve, ooxmlHighlightNavigatedLabel: ye }, onDownload: be, onCopyText: xe, onCopyMarkdown: K, onCopyJson: Se, tableDownloadFilename: q, isMobile: Ce = !1, defaultWidth: we, minWidth: Te = 600, maxWidth: Ee = 1500, onResizeStop: De, styles: Oe, codeBlockTheme: ke, loadPdf: J, configurePdfWorker: Ae }) => {
|
|
925
|
+
let [je, Me] = R(!1), [Ie, Le] = R(!1), [Y, Re] = R(!1), [X, ze] = R(!1), [Be, Z] = R(void 0), Ve = L(null), He = L(null), Q = L(null), Ue = N(() => {
|
|
926
|
+
xe?.(), Ve.current != null && clearTimeout(Ve.current), Me(!0), Ve.current = setTimeout(() => Me(!1), Fe);
|
|
927
|
+
}, [xe]), We = N(() => {
|
|
928
|
+
K?.(), He.current != null && clearTimeout(He.current), Le(!0), He.current = setTimeout(() => Le(!1), Fe);
|
|
929
|
+
}, [K]), Ge = N(() => {
|
|
930
|
+
Se?.(), Q.current != null && clearTimeout(Q.current), Re(!0), Q.current = setTimeout(() => Re(!1), Fe);
|
|
931
|
+
}, [Se]);
|
|
932
|
+
F(() => () => {
|
|
933
|
+
Ve.current != null && clearTimeout(Ve.current), He.current != null && clearTimeout(He.current), Q.current != null && clearTimeout(Q.current);
|
|
909
934
|
}, []);
|
|
910
|
-
let $ =
|
|
911
|
-
|
|
935
|
+
let $ = N(() => {
|
|
936
|
+
ze((e) => !e);
|
|
912
937
|
}, []);
|
|
913
|
-
|
|
914
|
-
|
|
938
|
+
F(() => {
|
|
939
|
+
ze(!1), Z(void 0);
|
|
915
940
|
}, [r]);
|
|
916
|
-
let { className: Ke, panelStyles: qe, ...Je } =
|
|
941
|
+
let { className: Ke, panelStyles: qe, ...Je } = Oe ?? {}, { colors: Ye, typography: Xe } = Je, Ze = I(() => m({
|
|
917
942
|
"--ac-mcp-app-divider": Ye?.mcpAppDividerColor,
|
|
918
943
|
"--ac-mcp-app-version": Ye?.mcpAppVersionColor
|
|
919
|
-
}), [Ye?.mcpAppDividerColor, Ye?.mcpAppVersionColor]), Qe = r.type === i.McpApp &&
|
|
944
|
+
}), [Ye?.mcpAppDividerColor, Ye?.mcpAppVersionColor]), Qe = r.type === i.McpApp && Be != null ? /* @__PURE__ */ H("span", {
|
|
920
945
|
style: Ze,
|
|
921
946
|
children: [
|
|
922
|
-
/* @__PURE__ */
|
|
923
|
-
/* @__PURE__ */
|
|
947
|
+
/* @__PURE__ */ V("span", { children: a }),
|
|
948
|
+
/* @__PURE__ */ V("span", {
|
|
924
949
|
"aria-hidden": !0,
|
|
925
|
-
className: g("mx-1.5 inline-block h-3 w-0 border-s align-middle",
|
|
950
|
+
className: g("mx-1.5 inline-block h-3 w-0 border-s align-middle", Pe.mcpAppDivider)
|
|
926
951
|
}),
|
|
927
|
-
/* @__PURE__ */
|
|
928
|
-
|
|
929
|
-
className: g("ms-2", Xe?.mcpAppVersionClassName ?? "dial-caption-text",
|
|
930
|
-
children:
|
|
952
|
+
/* @__PURE__ */ V("span", { children: Be.name }),
|
|
953
|
+
Be.version && /* @__PURE__ */ V("span", {
|
|
954
|
+
className: g("ms-2", Xe?.mcpAppVersionClassName ?? "dial-caption-text", Pe.mcpAppVersion),
|
|
955
|
+
children: Be.version
|
|
931
956
|
})
|
|
932
957
|
]
|
|
933
|
-
}) : a, $e = !t && r.type === i.Html && r.srcdoc != null, et = !t &&
|
|
934
|
-
return /* @__PURE__ */
|
|
958
|
+
}) : a, $e = !t && r.type === i.Html && (r.srcdoc != null || r.resolveSourceText != null), et = !t && xe != null && (r.type === i.PlainText || r.type === i.Code), tt = !t && K != null && r.type === i.Markdown, nt = !t && Se != null && r.type === i.Json, rt = !t && be != null && o(r), it = !t && r.type === i.McpApp && r.onReload != null;
|
|
959
|
+
return /* @__PURE__ */ V(b, {
|
|
935
960
|
isOpen: e,
|
|
936
961
|
orientation: y.Right,
|
|
937
962
|
title: Qe,
|
|
@@ -941,153 +966,153 @@ var fe = { panel: "dial-attachment-canvas-panel" }, pe = {
|
|
|
941
966
|
resizeLabel: u
|
|
942
967
|
},
|
|
943
968
|
onClose: n,
|
|
944
|
-
resizable: !
|
|
945
|
-
defaultWidth:
|
|
946
|
-
minWidth:
|
|
947
|
-
maxWidth:
|
|
948
|
-
onResizeStop:
|
|
969
|
+
resizable: !Ce,
|
|
970
|
+
defaultWidth: we,
|
|
971
|
+
minWidth: Te,
|
|
972
|
+
maxWidth: Ee,
|
|
973
|
+
onResizeStop: De,
|
|
949
974
|
styles: {
|
|
950
975
|
...qe,
|
|
951
976
|
titleClassName: qe?.titleClassName ?? "dial-h3-text",
|
|
952
977
|
headerClassName: g("border-b border-tertiary", qe?.headerClassName),
|
|
953
|
-
className: g(e ? "mobile:w-full mobile:max-w-full" : "w-0", Ke, qe?.className,
|
|
978
|
+
className: g(e ? "mobile:w-full mobile:max-w-full" : "w-0", Ke, qe?.className, de.panel)
|
|
954
979
|
},
|
|
955
980
|
leftActions: s,
|
|
956
|
-
rightActions: $e || et || tt || nt || rt || it ? /* @__PURE__ */
|
|
957
|
-
it && /* @__PURE__ */
|
|
958
|
-
icon: /* @__PURE__ */
|
|
981
|
+
rightActions: $e || et || tt || nt || rt || it ? /* @__PURE__ */ H(B, { children: [
|
|
982
|
+
it && /* @__PURE__ */ V(w, {
|
|
983
|
+
icon: /* @__PURE__ */ V(ae, {
|
|
959
984
|
size: x.LG,
|
|
960
985
|
stroke: S,
|
|
961
986
|
"aria-hidden": !0
|
|
962
987
|
}),
|
|
963
|
-
"aria-label":
|
|
964
|
-
tooltipProps: { tooltip:
|
|
988
|
+
"aria-label": P,
|
|
989
|
+
tooltipProps: { tooltip: P },
|
|
965
990
|
onClick: r.type === i.McpApp ? r.onReload : void 0
|
|
966
991
|
}),
|
|
967
|
-
$e && /* @__PURE__ */
|
|
968
|
-
icon:
|
|
992
|
+
$e && /* @__PURE__ */ V(w, {
|
|
993
|
+
icon: V(X ? ne : ee, {
|
|
969
994
|
size: x.LG,
|
|
970
995
|
stroke: S,
|
|
971
996
|
"aria-hidden": !0
|
|
972
997
|
}),
|
|
973
|
-
"aria-label":
|
|
974
|
-
"aria-pressed":
|
|
975
|
-
tooltipProps: { tooltip:
|
|
998
|
+
"aria-label": X ? M : j,
|
|
999
|
+
"aria-pressed": X,
|
|
1000
|
+
tooltipProps: { tooltip: X ? M : j },
|
|
976
1001
|
onClick: $
|
|
977
1002
|
}),
|
|
978
|
-
et && /* @__PURE__ */
|
|
979
|
-
icon:
|
|
1003
|
+
et && /* @__PURE__ */ V(w, {
|
|
1004
|
+
icon: V(je ? k : A, {
|
|
980
1005
|
size: x.LG,
|
|
981
1006
|
stroke: S,
|
|
982
1007
|
"aria-hidden": !0
|
|
983
1008
|
}),
|
|
984
|
-
"aria-label":
|
|
985
|
-
tooltipProps: { tooltip:
|
|
1009
|
+
"aria-label": je ? p : f,
|
|
1010
|
+
tooltipProps: { tooltip: je ? p : f },
|
|
986
1011
|
onClick: Ue
|
|
987
1012
|
}),
|
|
988
|
-
tt && /* @__PURE__ */
|
|
989
|
-
icon:
|
|
1013
|
+
tt && /* @__PURE__ */ V(w, {
|
|
1014
|
+
icon: V(Ie ? k : ie, {
|
|
990
1015
|
size: x.LG,
|
|
991
1016
|
stroke: S,
|
|
992
1017
|
"aria-hidden": !0
|
|
993
1018
|
}),
|
|
994
|
-
"aria-label":
|
|
995
|
-
tooltipProps: { tooltip:
|
|
1019
|
+
"aria-label": Ie ? _ : h,
|
|
1020
|
+
tooltipProps: { tooltip: Ie ? _ : h },
|
|
996
1021
|
onClick: We
|
|
997
1022
|
}),
|
|
998
|
-
nt && /* @__PURE__ */
|
|
999
|
-
icon:
|
|
1023
|
+
nt && /* @__PURE__ */ V(w, {
|
|
1024
|
+
icon: V(Y ? k : A, {
|
|
1000
1025
|
size: x.LG,
|
|
1001
1026
|
stroke: S,
|
|
1002
1027
|
"aria-hidden": !0
|
|
1003
1028
|
}),
|
|
1004
|
-
"aria-label":
|
|
1005
|
-
tooltipProps: { tooltip:
|
|
1029
|
+
"aria-label": Y ? C : v,
|
|
1030
|
+
tooltipProps: { tooltip: Y ? C : v },
|
|
1006
1031
|
onClick: Ge
|
|
1007
1032
|
}),
|
|
1008
|
-
rt && /* @__PURE__ */
|
|
1009
|
-
icon: /* @__PURE__ */
|
|
1033
|
+
rt && /* @__PURE__ */ V(w, {
|
|
1034
|
+
icon: /* @__PURE__ */ V(te, {
|
|
1010
1035
|
size: x.LG,
|
|
1011
1036
|
stroke: S
|
|
1012
1037
|
}),
|
|
1013
1038
|
"aria-label": d,
|
|
1014
1039
|
tooltipProps: { tooltip: d },
|
|
1015
|
-
onClick:
|
|
1040
|
+
onClick: be
|
|
1016
1041
|
})
|
|
1017
1042
|
] }) : null,
|
|
1018
|
-
children: /* @__PURE__ */
|
|
1043
|
+
children: /* @__PURE__ */ V(Ne, {
|
|
1019
1044
|
content: r,
|
|
1020
1045
|
isLoading: t,
|
|
1021
1046
|
fileName: a,
|
|
1022
|
-
isHtmlSourceView:
|
|
1023
|
-
onAppInfo: r.type === i.McpApp ?
|
|
1047
|
+
isHtmlSourceView: X,
|
|
1048
|
+
onAppInfo: r.type === i.McpApp ? Z : void 0,
|
|
1024
1049
|
labels: {
|
|
1025
1050
|
unsupportedLabel: E,
|
|
1026
1051
|
loadErrorLabel: D,
|
|
1027
1052
|
forbiddenErrorLabel: O,
|
|
1028
1053
|
visualizerErrorLabel: T,
|
|
1029
|
-
htmlFrameBlockedLabel:
|
|
1030
|
-
htmlOpenInNewTabLabel:
|
|
1031
|
-
pdfThumbnailsLabel:
|
|
1032
|
-
pdfShowThumbnailsLabel:
|
|
1033
|
-
pdfHideThumbnailsLabel:
|
|
1034
|
-
pdfPageNumberLabel:
|
|
1035
|
-
pdfContentLoadingLabel:
|
|
1036
|
-
pdfContentErrorLabel:
|
|
1037
|
-
pdfContentRetryLabel:
|
|
1038
|
-
xlsxFormulaLabel:
|
|
1039
|
-
codeContentLoadingLabel:
|
|
1040
|
-
codeContentErrorLabel:
|
|
1041
|
-
codeContentRetryLabel:
|
|
1042
|
-
tableCopyLabel:
|
|
1043
|
-
tableCopiedLabel:
|
|
1044
|
-
tableDownloadCsvLabel:
|
|
1045
|
-
ooxmlHighlightsLabel:
|
|
1046
|
-
ooxmlHighlightNavigatedLabel:
|
|
1054
|
+
htmlFrameBlockedLabel: re,
|
|
1055
|
+
htmlOpenInNewTabLabel: oe,
|
|
1056
|
+
pdfThumbnailsLabel: se,
|
|
1057
|
+
pdfShowThumbnailsLabel: z,
|
|
1058
|
+
pdfHideThumbnailsLabel: U,
|
|
1059
|
+
pdfPageNumberLabel: W,
|
|
1060
|
+
pdfContentLoadingLabel: ce,
|
|
1061
|
+
pdfContentErrorLabel: le,
|
|
1062
|
+
pdfContentRetryLabel: ue,
|
|
1063
|
+
xlsxFormulaLabel: fe,
|
|
1064
|
+
codeContentLoadingLabel: pe,
|
|
1065
|
+
codeContentErrorLabel: G,
|
|
1066
|
+
codeContentRetryLabel: me,
|
|
1067
|
+
tableCopyLabel: he,
|
|
1068
|
+
tableCopiedLabel: ge,
|
|
1069
|
+
tableDownloadCsvLabel: _e,
|
|
1070
|
+
ooxmlHighlightsLabel: ve,
|
|
1071
|
+
ooxmlHighlightNavigatedLabel: ye
|
|
1047
1072
|
},
|
|
1048
1073
|
styles: Je,
|
|
1049
|
-
codeBlockTheme:
|
|
1050
|
-
tableDownloadFilename:
|
|
1051
|
-
loadPdf:
|
|
1052
|
-
configurePdfWorker:
|
|
1074
|
+
codeBlockTheme: ke,
|
|
1075
|
+
tableDownloadFilename: q,
|
|
1076
|
+
loadPdf: J,
|
|
1077
|
+
configurePdfWorker: Ae
|
|
1053
1078
|
})
|
|
1054
1079
|
});
|
|
1055
|
-
}),
|
|
1080
|
+
}), Le = new Set(["html", "htm"]), Y = {
|
|
1056
1081
|
docx: "application/vnd.openxmlformats-officedocument.wordprocessingml.document",
|
|
1057
1082
|
xlsx: "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
|
|
1058
1083
|
pptx: "application/vnd.openxmlformats-officedocument.presentationml.presentation"
|
|
1059
|
-
},
|
|
1084
|
+
}, Re = new Set(/* @__PURE__ */ "txt.md.markdown.json.jsonl.ndjson.xml.csv.tsv.yaml.yml.toml.ini.conf.cfg.css.scss.sass.less.js.jsx.ts.tsx.mjs.cjs.mts.cts.py.rb.go.rs.java.kt.swift.c.h.cpp.cs.sh.bash.zsh.fish.ps1.log.env.gitignore.dockerfile.makefile.sql".split(".")), X = {
|
|
1060
1085
|
docx: r.Docx,
|
|
1061
1086
|
xlsx: r.Xlsx,
|
|
1062
1087
|
pptx: r.Pptx,
|
|
1063
1088
|
csv: r.Csv
|
|
1064
|
-
},
|
|
1065
|
-
[
|
|
1066
|
-
[
|
|
1067
|
-
[
|
|
1089
|
+
}, ze = {
|
|
1090
|
+
[Y.docx]: r.Docx,
|
|
1091
|
+
[Y.xlsx]: r.Xlsx,
|
|
1092
|
+
[Y.pptx]: r.Pptx,
|
|
1068
1093
|
[f.CSV]: r.Csv
|
|
1069
|
-
},
|
|
1070
|
-
[r.Docx]:
|
|
1071
|
-
[r.Xlsx]:
|
|
1072
|
-
[r.Pptx]:
|
|
1094
|
+
}, Be = {
|
|
1095
|
+
[r.Docx]: Y.docx,
|
|
1096
|
+
[r.Xlsx]: Y.xlsx,
|
|
1097
|
+
[r.Pptx]: Y.pptx,
|
|
1073
1098
|
[r.Csv]: f.CSV
|
|
1074
|
-
},
|
|
1099
|
+
}, Z = (e, t) => {
|
|
1075
1100
|
let n = t?.split(";", 1)[0].trim().toLowerCase();
|
|
1076
1101
|
if (n != null) {
|
|
1077
|
-
let e =
|
|
1102
|
+
let e = ze[n];
|
|
1078
1103
|
if (e != null) return e;
|
|
1079
1104
|
}
|
|
1080
1105
|
let r = e.lastIndexOf(".");
|
|
1081
|
-
if (r !== -1) return
|
|
1082
|
-
},
|
|
1083
|
-
let n =
|
|
1084
|
-
return n == null ? void 0 :
|
|
1106
|
+
if (r !== -1) return X[e.slice(r + 1).toLowerCase()];
|
|
1107
|
+
}, Ve = (e, t) => Z(e, t) != null, He = (e, t) => {
|
|
1108
|
+
let n = Z(e, t);
|
|
1109
|
+
return n == null ? void 0 : Be[n];
|
|
1085
1110
|
}, Q = (e) => {
|
|
1086
1111
|
let t = e.lastIndexOf(".");
|
|
1087
|
-
return t === -1 ? !1 :
|
|
1112
|
+
return t === -1 ? !1 : Re.has(e.slice(t + 1).toLowerCase());
|
|
1088
1113
|
}, Ue = (e) => {
|
|
1089
1114
|
let t = e.lastIndexOf(".");
|
|
1090
|
-
return t === -1 ? !1 :
|
|
1115
|
+
return t === -1 ? !1 : Le.has(e.slice(t + 1).toLowerCase());
|
|
1091
1116
|
}, We = {
|
|
1092
1117
|
xml: "xml",
|
|
1093
1118
|
csv: "plaintext",
|
|
@@ -1155,21 +1180,21 @@ var fe = { panel: "dial-attachment-canvas-panel" }, pe = {
|
|
|
1155
1180
|
}, Xe = {
|
|
1156
1181
|
type: i.PlainText,
|
|
1157
1182
|
text: ""
|
|
1158
|
-
}, Ze =
|
|
1183
|
+
}, Ze = oe(void 0);
|
|
1159
1184
|
Ze.displayName = "AttachmentCanvasContext";
|
|
1160
1185
|
var Qe = ({ children: e }) => {
|
|
1161
|
-
let [t, n] =
|
|
1186
|
+
let [t, n] = R(!1), [r, i] = R(!1), [a, o] = R(Xe), [s, c] = R(void 0), [l, u] = R(void 0), d = N((e, t) => {
|
|
1162
1187
|
c(e), u(t), i(!0), n(!0);
|
|
1163
|
-
}, []), f =
|
|
1188
|
+
}, []), f = N((e, t, r) => {
|
|
1164
1189
|
o(e), c(t), u(r), i(!1), n(!0);
|
|
1165
|
-
}, []), p =
|
|
1190
|
+
}, []), p = N(() => {
|
|
1166
1191
|
o(Xe), n(!1), i(!1), u(void 0);
|
|
1167
1192
|
}, []);
|
|
1168
|
-
return
|
|
1193
|
+
return F(() => () => {
|
|
1169
1194
|
let e = Je(a);
|
|
1170
1195
|
e != null && URL.revokeObjectURL(e);
|
|
1171
|
-
}, [a]), /* @__PURE__ */
|
|
1172
|
-
value:
|
|
1196
|
+
}, [a]), /* @__PURE__ */ V(Ze.Provider, {
|
|
1197
|
+
value: I(() => ({
|
|
1173
1198
|
isOpen: t,
|
|
1174
1199
|
isLoading: r,
|
|
1175
1200
|
content: a,
|
|
@@ -1191,25 +1216,25 @@ var Qe = ({ children: e }) => {
|
|
|
1191
1216
|
children: e
|
|
1192
1217
|
});
|
|
1193
1218
|
}, $e = () => {
|
|
1194
|
-
let e =
|
|
1219
|
+
let e = P(Ze);
|
|
1195
1220
|
if (!e) throw Error("useAttachmentCanvas must be used within an AttachmentCanvasProvider");
|
|
1196
1221
|
return e;
|
|
1197
|
-
}, et =
|
|
1198
|
-
let { ariaLabel: d = "Attachment preview", closeLabel: f = "Close", downloadLabel: p = "Download", unsupportedLabel: m = "Preview is not supported for this file", loadErrorLabel: g = "Failed to load file", forbiddenErrorLabel: _ = "You don't have permission to access this file", copyTextLabel: v, copiedTextLabel: y, copyMarkdownLabel: b, copiedMarkdownLabel: x, copyJsonLabel: S, copiedJsonLabel: C, htmlFrameBlockedLabel: w, htmlOpenInNewTabLabel: T, htmlViewSourceLabel: E, htmlViewRenderedLabel: D, pdfThumbnailsLabel: O, pdfShowThumbnailsLabel: k, pdfHideThumbnailsLabel: ee, pdfPageNumberLabel:
|
|
1199
|
-
a(
|
|
1200
|
-
}, [
|
|
1201
|
-
(
|
|
1202
|
-
}, [
|
|
1203
|
-
|
|
1204
|
-
}, [
|
|
1205
|
-
|
|
1206
|
-
}, [
|
|
1207
|
-
return /* @__PURE__ */
|
|
1208
|
-
isOpen:
|
|
1209
|
-
isLoading:
|
|
1210
|
-
onClose:
|
|
1211
|
-
content:
|
|
1212
|
-
fileName:
|
|
1222
|
+
}, et = M(({ labels: e, leftActions: t, isMobile: n = !1, defaultWidth: r, maxWidth: o, codeBlockTheme: s, tableDownloadFilename: c, loadPdf: l, configurePdfWorker: u }) => {
|
|
1223
|
+
let { ariaLabel: d = "Attachment preview", closeLabel: f = "Close", downloadLabel: p = "Download", unsupportedLabel: m = "Preview is not supported for this file", loadErrorLabel: g = "Failed to load file", forbiddenErrorLabel: _ = "You don't have permission to access this file", copyTextLabel: v, copiedTextLabel: y, copyMarkdownLabel: b, copiedMarkdownLabel: x, copyJsonLabel: S, copiedJsonLabel: C, htmlFrameBlockedLabel: w, htmlOpenInNewTabLabel: T, htmlViewSourceLabel: E, htmlViewRenderedLabel: D, pdfThumbnailsLabel: O, pdfShowThumbnailsLabel: k, pdfHideThumbnailsLabel: ee, pdfPageNumberLabel: A, pdfContentLoadingLabel: te, pdfContentErrorLabel: ne, pdfContentRetryLabel: re, xlsxFormulaLabel: ie, codeContentLoadingLabel: ae, codeContentErrorLabel: oe, codeContentRetryLabel: j, tableCopyLabel: M, tableCopiedLabel: P, tableDownloadCsvLabel: F, ooxmlHighlightsLabel: I, ooxmlHighlightNavigatedLabel: L } = e ?? {}, { isOpen: R, isLoading: se, content: z, fileName: B, closeCanvas: H } = $e(), U = N(() => {
|
|
1224
|
+
a(z, B);
|
|
1225
|
+
}, [z, B]), W = N(() => {
|
|
1226
|
+
(z.type === i.PlainText || z.type === i.Code) && h(z.text);
|
|
1227
|
+
}, [z]), ce = N(() => {
|
|
1228
|
+
z.type === i.Markdown && h(z.text);
|
|
1229
|
+
}, [z]), le = N(() => {
|
|
1230
|
+
z.type === i.Json && h(JSON.stringify(z.value, null, 2));
|
|
1231
|
+
}, [z]);
|
|
1232
|
+
return /* @__PURE__ */ V(Ie, {
|
|
1233
|
+
isOpen: R,
|
|
1234
|
+
isLoading: se,
|
|
1235
|
+
onClose: H,
|
|
1236
|
+
content: z,
|
|
1237
|
+
fileName: B,
|
|
1213
1238
|
leftActions: t,
|
|
1214
1239
|
labels: {
|
|
1215
1240
|
ariaLabel: d,
|
|
@@ -1231,24 +1256,24 @@ var Qe = ({ children: e }) => {
|
|
|
1231
1256
|
pdfThumbnailsLabel: O,
|
|
1232
1257
|
pdfShowThumbnailsLabel: k,
|
|
1233
1258
|
pdfHideThumbnailsLabel: ee,
|
|
1234
|
-
pdfPageNumberLabel:
|
|
1235
|
-
pdfContentLoadingLabel:
|
|
1236
|
-
pdfContentErrorLabel:
|
|
1237
|
-
pdfContentRetryLabel:
|
|
1238
|
-
xlsxFormulaLabel:
|
|
1239
|
-
codeContentLoadingLabel:
|
|
1240
|
-
codeContentErrorLabel:
|
|
1241
|
-
codeContentRetryLabel:
|
|
1242
|
-
tableCopyLabel:
|
|
1243
|
-
tableCopiedLabel:
|
|
1244
|
-
tableDownloadCsvLabel:
|
|
1245
|
-
ooxmlHighlightsLabel:
|
|
1246
|
-
ooxmlHighlightNavigatedLabel:
|
|
1259
|
+
pdfPageNumberLabel: A,
|
|
1260
|
+
pdfContentLoadingLabel: te,
|
|
1261
|
+
pdfContentErrorLabel: ne,
|
|
1262
|
+
pdfContentRetryLabel: re,
|
|
1263
|
+
xlsxFormulaLabel: ie,
|
|
1264
|
+
codeContentLoadingLabel: ae,
|
|
1265
|
+
codeContentErrorLabel: oe,
|
|
1266
|
+
codeContentRetryLabel: j,
|
|
1267
|
+
tableCopyLabel: M,
|
|
1268
|
+
tableCopiedLabel: P,
|
|
1269
|
+
tableDownloadCsvLabel: F,
|
|
1270
|
+
ooxmlHighlightsLabel: I,
|
|
1271
|
+
ooxmlHighlightNavigatedLabel: L
|
|
1247
1272
|
},
|
|
1248
|
-
onDownload:
|
|
1249
|
-
onCopyText:
|
|
1250
|
-
onCopyMarkdown:
|
|
1251
|
-
onCopyJson:
|
|
1273
|
+
onDownload: U,
|
|
1274
|
+
onCopyText: z.type === i.PlainText || z.type === i.Code ? W : void 0,
|
|
1275
|
+
onCopyMarkdown: z.type === i.Markdown ? ce : void 0,
|
|
1276
|
+
onCopyJson: z.type === i.Json ? le : void 0,
|
|
1252
1277
|
tableDownloadFilename: c,
|
|
1253
1278
|
isMobile: n,
|
|
1254
1279
|
defaultWidth: r,
|
|
@@ -1261,26 +1286,26 @@ var Qe = ({ children: e }) => {
|
|
|
1261
1286
|
frame: "_frame_g47g7_1",
|
|
1262
1287
|
header: "_header_g47g7_6",
|
|
1263
1288
|
title: "_title_g47g7_10"
|
|
1264
|
-
}, nt =
|
|
1289
|
+
}, nt = M(({ content: e, height: t, onExpand: n, expandAriaLabel: r, actionsGroupAriaLabel: i = "Visualizer actions", frameTitle: a, loadingLabel: o, errorLabel: s, titleClassName: c = "dial-small-semi-text", isBorderless: l = !1, isTitleHidden: u = !1, colors: d }) => {
|
|
1265
1290
|
let f = e.visualizerName.trim(), p = !u && f !== "";
|
|
1266
|
-
return /* @__PURE__ */
|
|
1291
|
+
return /* @__PURE__ */ H("div", {
|
|
1267
1292
|
className: g("flex w-full min-w-0 flex-col overflow-hidden", !l && ["rounded-xl border", tt.frame]),
|
|
1268
1293
|
style: m({
|
|
1269
1294
|
"--igv-bg": d?.background,
|
|
1270
1295
|
"--igv-border": d?.border,
|
|
1271
1296
|
"--igv-title-text": d?.titleText
|
|
1272
1297
|
}),
|
|
1273
|
-
children: [/* @__PURE__ */
|
|
1298
|
+
children: [/* @__PURE__ */ H("div", {
|
|
1274
1299
|
className: g("flex min-h-10 items-center gap-2 py-2", p ? "justify-between" : "justify-end", !l && ["border-b px-4", tt.header]),
|
|
1275
|
-
children: [p && /* @__PURE__ */
|
|
1300
|
+
children: [p && /* @__PURE__ */ V("span", {
|
|
1276
1301
|
className: g("min-w-0 truncate", c, tt.title),
|
|
1277
1302
|
children: f
|
|
1278
|
-
}), /* @__PURE__ */
|
|
1303
|
+
}), /* @__PURE__ */ V("div", {
|
|
1279
1304
|
role: "toolbar",
|
|
1280
1305
|
"aria-label": i,
|
|
1281
1306
|
className: "flex items-center gap-1",
|
|
1282
|
-
children: /* @__PURE__ */
|
|
1283
|
-
icon: /* @__PURE__ */
|
|
1307
|
+
children: /* @__PURE__ */ V(w, {
|
|
1308
|
+
icon: /* @__PURE__ */ V(O, {
|
|
1284
1309
|
size: x.SM,
|
|
1285
1310
|
stroke: S,
|
|
1286
1311
|
"aria-hidden": !0
|
|
@@ -1290,10 +1315,10 @@ var Qe = ({ children: e }) => {
|
|
|
1290
1315
|
onClick: n
|
|
1291
1316
|
})
|
|
1292
1317
|
})]
|
|
1293
|
-
}), /* @__PURE__ */
|
|
1318
|
+
}), /* @__PURE__ */ V("div", {
|
|
1294
1319
|
className: "w-full",
|
|
1295
1320
|
style: { height: `${t}px` },
|
|
1296
|
-
children: /* @__PURE__ */
|
|
1321
|
+
children: /* @__PURE__ */ V(ke, {
|
|
1297
1322
|
content: e,
|
|
1298
1323
|
loadingLabel: o,
|
|
1299
1324
|
errorLabel: s,
|
|
@@ -1332,7 +1357,7 @@ var Qe = ({ children: e }) => {
|
|
|
1332
1357
|
return n;
|
|
1333
1358
|
}
|
|
1334
1359
|
}, ct = (e, t) => {
|
|
1335
|
-
let { openCanvas: n, openCanvasLoading: r, closeCanvas: a } = $e(), { customVisualizers: o, themeId: s, onBeforeOpen: l } = t, u =
|
|
1360
|
+
let { openCanvas: n, openCanvasLoading: r, closeCanvas: a } = $e(), { customVisualizers: o, themeId: s, onBeforeOpen: l } = t, u = N(async (t, n, r) => {
|
|
1336
1361
|
if (t.url == null && t.referenceUrl != null) {
|
|
1337
1362
|
let i = e.resolveReferencePdfContent(t);
|
|
1338
1363
|
if (i != null) return r(i, t.name, n);
|
|
@@ -1346,14 +1371,14 @@ var Qe = ({ children: e }) => {
|
|
|
1346
1371
|
let i = await e.resolveTextContent(t);
|
|
1347
1372
|
if (i != null) return r(i, t.name, n);
|
|
1348
1373
|
}
|
|
1349
|
-
let l =
|
|
1374
|
+
let l = Z("", a);
|
|
1350
1375
|
if (l != null) return r(await e.resolveOoxmlContent(t, l) ?? $(e.resolveContentUrl(t)), t.name, n);
|
|
1351
1376
|
switch (a) {
|
|
1352
1377
|
case f.PDF: return r(await e.resolvePdfContent(t) ?? $(e.resolveContentUrl(t)), t.name, n);
|
|
1353
1378
|
case f.Markdown: return r(await e.resolveMarkdownContent(t) ?? $(e.resolveContentUrl(t)), t.name, n);
|
|
1354
1379
|
case f.JSON: return r(await e.resolveJsonContent(t) ?? $(e.resolveContentUrl(t)), t.name, n);
|
|
1355
1380
|
}
|
|
1356
|
-
let u = t.name ?? "", p = u.lastIndexOf("."), m = p === -1 ? "" : u.slice(p + 1).toLowerCase(), h =
|
|
1381
|
+
let u = t.name ?? "", p = u.lastIndexOf("."), m = p === -1 ? "" : u.slice(p + 1).toLowerCase(), h = Z(u);
|
|
1357
1382
|
if (h != null) return r(await e.resolveOoxmlContent(t, h) ?? $(e.resolveContentUrl(t)), t.name, n);
|
|
1358
1383
|
switch (m) {
|
|
1359
1384
|
case d.Markdown:
|
|
@@ -1386,7 +1411,7 @@ var Qe = ({ children: e }) => {
|
|
|
1386
1411
|
s,
|
|
1387
1412
|
e
|
|
1388
1413
|
]);
|
|
1389
|
-
return { openAttachmentCanvas:
|
|
1414
|
+
return { openAttachmentCanvas: N(async (t, o = t.id, s) => {
|
|
1390
1415
|
let d = () => s == null || s(), f = (e, t, r) => d() ? (n(e, t, r), !0) : (Ye(e), !1);
|
|
1391
1416
|
switch (t.type) {
|
|
1392
1417
|
case c.Image: {
|
|
@@ -1424,4 +1449,4 @@ var Qe = ({ children: e }) => {
|
|
|
1424
1449
|
]) };
|
|
1425
1450
|
};
|
|
1426
1451
|
//#endregion
|
|
1427
|
-
export {
|
|
1452
|
+
export { de as ATTACHMENT_CANVAS_CLASS, Ie as AttachmentCanvas, Ne as AttachmentCanvasBody, et as AttachmentCanvasContainer, Qe as AttachmentCanvasProvider, i as AttachmentContentType, n as AttachmentErrorType, me as CodeContent, nt as InlineGroupedVisualizer, Se as McpAppCanvasRenderer, r as OoxmlFileType, t as OoxmlHighlightKind, qe as createForbiddenCanvasContent, Ke as createLoadErrorCanvasContent, $ as createUnsupportedCanvasContent, a as downloadAttachmentContent, Ge as extensionToLanguage, it as findVisualizerForApplication, rt as findVisualizerForMime, Z as getOoxmlFileType, He as getOoxmlMimeType, at as groupedVisualizerCanvasKey, o as isDownloadable, Ue as isHtmlPreviewable, Ve as isOoxmlPreviewable, Q as isTextPreviewable, ot as partitionAttachmentsForApplicationVisualizer, $e as useAttachmentCanvas, ct as useOpenAttachmentCanvas };
|