@8wave/ai-elements 0.123.0-beta.16 → 0.123.0-beta.17

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (95) hide show
  1. package/dist/_chunks/PkFilePreview-DXmgMwwu.js +1143 -0
  2. package/dist/_chunks/PkFilePreview-DXmgMwwu.js.map +1 -0
  3. package/dist/_chunks/{PkFilePreviewDialog-nibxELSF.js → PkFilePreviewDialog-Bzt534GA.js} +2 -2
  4. package/dist/_chunks/{PkFilePreviewDialog-nibxELSF.js.map → PkFilePreviewDialog-Bzt534GA.js.map} +1 -1
  5. package/dist/_chunks/{PkStreamingMarkdown-C6cFkf82.js → PkStreamingMarkdown-PQ3X83Fq.js} +2 -2
  6. package/dist/_chunks/{PkStreamingMarkdown-C6cFkf82.js.map → PkStreamingMarkdown-PQ3X83Fq.js.map} +1 -1
  7. package/dist/_chunks/{PkToolChatFile-5t_1vL81.js → PkToolChatFile-CYxqugvO.js} +2 -2
  8. package/dist/_chunks/{PkToolChatFile-5t_1vL81.js.map → PkToolChatFile-CYxqugvO.js.map} +1 -1
  9. package/dist/_chunks/{PkToolShowArtifact-DV78g_yD.js → PkToolShowArtifact-BIpD-GkV.js} +2 -2
  10. package/dist/_chunks/{PkToolShowArtifact-DV78g_yD.js.map → PkToolShowArtifact-BIpD-GkV.js.map} +1 -1
  11. package/dist/_chunks/{PkToolShowContactForm-Bnjy0g50.js → PkToolShowContactForm-2_YDqjeM.js} +2 -2
  12. package/dist/_chunks/{PkToolShowContactForm-Bnjy0g50.js.map → PkToolShowContactForm-2_YDqjeM.js.map} +1 -1
  13. package/dist/_chunks/{PkToolShowForm-CT5_ln9b.js → PkToolShowForm-Bu4igmQL.js} +5 -5
  14. package/dist/_chunks/{PkToolShowForm-CT5_ln9b.js.map → PkToolShowForm-Bu4igmQL.js.map} +1 -1
  15. package/dist/_chunks/{PkToolShowSources-DhZ5I_J-.js → PkToolShowSources-DKtdU_Bq.js} +2 -2
  16. package/dist/_chunks/{PkToolShowSources-DhZ5I_J-.js.map → PkToolShowSources-DKtdU_Bq.js.map} +1 -1
  17. package/dist/_chunks/{utils-B5VcWm3g.js → utils-Bz1Gb3iO.js} +114 -77
  18. package/dist/_chunks/utils-Bz1Gb3iO.js.map +1 -0
  19. package/dist/ai-elements.es.js +252 -252
  20. package/dist/ai-elements.es.js.map +1 -1
  21. package/dist-vue/PkChatbot.js +1 -1
  22. package/dist-vue/PkChatbotEmptyState.js +1 -1
  23. package/dist-vue/PkChatbotInput.js +1 -1
  24. package/dist-vue/PkChatbotMessages.js +1 -1
  25. package/dist-vue/PkChatbotStepPayload.js +1 -1
  26. package/dist-vue/PkChatbotStepToolDetail.js +1 -1
  27. package/dist-vue/PkChatbotSteps.js +1 -1
  28. package/dist-vue/PkChatbotViewChat.js +1 -1
  29. package/dist-vue/PkChatbotViewConversations.js +1 -1
  30. package/dist-vue/_chunks/{PkChatbot-tq-fJUij.js → PkChatbot-MEYD0XUR.js} +5 -5
  31. package/dist-vue/_chunks/{PkChatbot-tq-fJUij.js.map → PkChatbot-MEYD0XUR.js.map} +1 -1
  32. package/dist-vue/_chunks/{PkChatbotEmptyState-Dp0_UPJm.js → PkChatbotEmptyState-qKpfIuvI.js} +2 -2
  33. package/dist-vue/_chunks/{PkChatbotEmptyState-Dp0_UPJm.js.map → PkChatbotEmptyState-qKpfIuvI.js.map} +1 -1
  34. package/dist-vue/_chunks/{PkChatbotInput-B_kPnNNB.js → PkChatbotInput-DSH5IrO6.js} +2 -2
  35. package/dist-vue/_chunks/{PkChatbotInput-B_kPnNNB.js.map → PkChatbotInput-DSH5IrO6.js.map} +1 -1
  36. package/dist-vue/_chunks/{PkChatbotMessages-BTZOic9V.js → PkChatbotMessages-BcHNPZUB.js} +327 -327
  37. package/dist-vue/_chunks/{PkChatbotMessages-BTZOic9V.js.map → PkChatbotMessages-BcHNPZUB.js.map} +1 -1
  38. package/dist-vue/_chunks/{PkChatbotStepPayload-CoGCHBhJ.js → PkChatbotStepPayload-BT-Xg18D.js} +2 -2
  39. package/dist-vue/_chunks/{PkChatbotStepPayload-CoGCHBhJ.js.map → PkChatbotStepPayload-BT-Xg18D.js.map} +1 -1
  40. package/dist-vue/_chunks/{PkChatbotStepToolDetail-BJtIZBF0.js → PkChatbotStepToolDetail-Cs322RDk.js} +16 -16
  41. package/dist-vue/_chunks/{PkChatbotStepToolDetail-BJtIZBF0.js.map → PkChatbotStepToolDetail-Cs322RDk.js.map} +1 -1
  42. package/dist-vue/_chunks/{PkChatbotSteps-CEJNclG4.js → PkChatbotSteps-Dd62GEXJ.js} +23 -23
  43. package/dist-vue/_chunks/{PkChatbotSteps-CEJNclG4.js.map → PkChatbotSteps-Dd62GEXJ.js.map} +1 -1
  44. package/dist-vue/_chunks/{PkChatbotViewChat-CnEOSH32.js → PkChatbotViewChat-CfpGWukX.js} +9 -9
  45. package/dist-vue/_chunks/{PkChatbotViewChat-CnEOSH32.js.map → PkChatbotViewChat-CfpGWukX.js.map} +1 -1
  46. package/dist-vue/_chunks/{PkChatbotViewConversations-D7j5P1RO.js → PkChatbotViewConversations-JCrQIoGf.js} +2 -2
  47. package/dist-vue/_chunks/{PkChatbotViewConversations-D7j5P1RO.js.map → PkChatbotViewConversations-JCrQIoGf.js.map} +1 -1
  48. package/dist-vue/_chunks/PkFilePreview-CFqcO3vY.js +1126 -0
  49. package/dist-vue/_chunks/PkFilePreview-CFqcO3vY.js.map +1 -0
  50. package/dist-vue/_chunks/{PkFilePreviewDialog-Cic7gmVR.js → PkFilePreviewDialog-DeNnbXWq.js} +2 -2
  51. package/dist-vue/_chunks/{PkFilePreviewDialog-Cic7gmVR.js.map → PkFilePreviewDialog-DeNnbXWq.js.map} +1 -1
  52. package/dist-vue/_chunks/{PkStreamingMarkdown-CYlCIfA0.js → PkStreamingMarkdown-QDsT-4jC.js} +2 -2
  53. package/dist-vue/_chunks/{PkStreamingMarkdown-CYlCIfA0.js.map → PkStreamingMarkdown-QDsT-4jC.js.map} +1 -1
  54. package/dist-vue/_chunks/{PkToolChatFile-B_PeJef8.js → PkToolChatFile-UZeUytvT.js} +2 -2
  55. package/dist-vue/_chunks/{PkToolChatFile-B_PeJef8.js.map → PkToolChatFile-UZeUytvT.js.map} +1 -1
  56. package/dist-vue/_chunks/{PkToolShowArtifact-Bh-jIo0V.js → PkToolShowArtifact-ldnH-U3h.js} +2 -2
  57. package/dist-vue/_chunks/{PkToolShowArtifact-Bh-jIo0V.js.map → PkToolShowArtifact-ldnH-U3h.js.map} +1 -1
  58. package/dist-vue/_chunks/{PkToolShowContactForm-BjfRuNuj.js → PkToolShowContactForm-4hISKYqb.js} +2 -2
  59. package/dist-vue/_chunks/{PkToolShowContactForm-BjfRuNuj.js.map → PkToolShowContactForm-4hISKYqb.js.map} +1 -1
  60. package/dist-vue/_chunks/{PkToolShowDiagram-_NnrFDGT.js → PkToolShowDiagram-uHFCQ0FJ.js} +2 -2
  61. package/dist-vue/_chunks/{PkToolShowDiagram-_NnrFDGT.js.map → PkToolShowDiagram-uHFCQ0FJ.js.map} +1 -1
  62. package/dist-vue/_chunks/{PkToolShowForm-AqEY4_do.js → PkToolShowForm-DiUz5_Ct.js} +5 -5
  63. package/dist-vue/_chunks/{PkToolShowForm-AqEY4_do.js.map → PkToolShowForm-DiUz5_Ct.js.map} +1 -1
  64. package/dist-vue/_chunks/{PkToolShowImageGallery-DM5AJNZ3.js → PkToolShowImageGallery-CEzeXupr.js} +2 -2
  65. package/dist-vue/_chunks/{PkToolShowImageGallery-DM5AJNZ3.js.map → PkToolShowImageGallery-CEzeXupr.js.map} +1 -1
  66. package/dist-vue/_chunks/{PkToolShowProductList-CAV8be9a.js → PkToolShowProductList-h4Dqvk1V.js} +2 -2
  67. package/dist-vue/_chunks/{PkToolShowProductList-CAV8be9a.js.map → PkToolShowProductList-h4Dqvk1V.js.map} +1 -1
  68. package/dist-vue/_chunks/{PkToolShowSources-CriswKr_.js → PkToolShowSources-BJd4zYAY.js} +2 -2
  69. package/dist-vue/_chunks/{PkToolShowSources-CriswKr_.js.map → PkToolShowSources-BJd4zYAY.js.map} +1 -1
  70. package/dist-vue/_chunks/{PkToolShowVideo-FSWM5MOl.js → PkToolShowVideo-DgkpZriW.js} +2 -2
  71. package/dist-vue/_chunks/{PkToolShowVideo-FSWM5MOl.js.map → PkToolShowVideo-DgkpZriW.js.map} +1 -1
  72. package/dist-vue/_chunks/{PkToolShowWebPages-CPhm2ba3.js → PkToolShowWebPages-DQr3SEGC.js} +2 -2
  73. package/dist-vue/_chunks/{PkToolShowWebPages-CPhm2ba3.js.map → PkToolShowWebPages-DQr3SEGC.js.map} +1 -1
  74. package/dist-vue/_chunks/{utils-BgvjC1Pu.js → utils-DmBnucJs.js} +129 -92
  75. package/dist-vue/_chunks/utils-DmBnucJs.js.map +1 -0
  76. package/dist-vue/composables.js +1 -1
  77. package/dist-vue/composables.js.map +1 -1
  78. package/dist-vue/index.js +32 -32
  79. package/dist-vue/index.js.map +1 -1
  80. package/dist-vue/packages/components/src/chat/PkWordPreview.d.ts +3 -1
  81. package/dist-vue/packages/components/src/chat/PkWordPreviewBlock.d.ts +9 -3
  82. package/dist-vue/packages/components/src/chat/PkWordPreviewPart.d.ts +20 -0
  83. package/dist-vue/packages/components/src/chat/PkWordPreviewRuns.d.ts +12 -3
  84. package/dist-vue/packages/components/src/chat/useChatFilePreview.d.ts +420 -0
  85. package/dist-vue/packages/components/src/chat/utils.d.ts +49 -1
  86. package/dist-vue/packages/models/src/schema/SpreadsheetPreview.d.ts +339 -0
  87. package/dist-vue/packages/models/src/schema/WordPreview.d.ts +571 -0
  88. package/dist-vue/style.css +1 -1
  89. package/package.json +1 -1
  90. package/dist/_chunks/PkFilePreview-Bcdfci6i.js +0 -948
  91. package/dist/_chunks/PkFilePreview-Bcdfci6i.js.map +0 -1
  92. package/dist/_chunks/utils-B5VcWm3g.js.map +0 -1
  93. package/dist-vue/_chunks/PkFilePreview-BKwnNsyV.js +0 -934
  94. package/dist-vue/_chunks/PkFilePreview-BKwnNsyV.js.map +0 -1
  95. package/dist-vue/_chunks/utils-BgvjC1Pu.js.map +0 -1
@@ -0,0 +1,1126 @@
1
+ import { t as e } from "./rolldown-runtime-CGnMp29N.js";
2
+ import { t } from "./PkEditorRadioButtons-Bw576DPQ.js";
3
+ import { t as n } from "./VvButtonLocalized-C-vx25u4.js";
4
+ import { B as r, H as i, I as a, L as o, R as s, U as c, V as l, a as u, z as d } from "./utils-DmBnucJs.js";
5
+ import { VvIcon as f } from "@volverjs/ui-vue/components";
6
+ import { Fragment as p, computed as m, createBlock as h, createCommentVNode as g, createElementBlock as _, createElementVNode as v, createTextVNode as y, createVNode as b, defineComponent as x, inject as S, isMemoSame as ee, mergeModels as C, nextTick as te, normalizeClass as w, normalizeStyle as T, onBeforeUnmount as ne, onMounted as re, openBlock as E, provide as D, ref as O, renderList as k, toDisplayString as A, unref as j, useModel as M, useTemplateRef as ie, watch as N, withCtx as ae, withModifiers as P } from "vue";
7
+ import { useI18n as oe } from "vue-i18n";
8
+ import { useElementSize as se } from "@vueuse/core";
9
+ // ../../packages/components/src/chat/PkSpreadsheetPreview.vue?vue&type=script&setup=true&lang.ts
10
+ var ce = { class: "pk-spreadsheet-preview" }, F = { class: "pk-spreadsheet-preview__bar" }, I = ["aria-label"], le = ["aria-label"], ue = ["aria-label"], L = [
11
+ "rowspan",
12
+ "colspan",
13
+ "data-focus",
14
+ "title",
15
+ "onMousedown",
16
+ "onMouseenter"
17
+ ], de = {
18
+ key: 1,
19
+ class: "pk-spreadsheet-preview__more"
20
+ }, fe = ["aria-label"], R = ["aria-current", "onClick"], pe = { class: "pk-spreadsheet-preview__status" }, me = { class: "pk-spreadsheet-preview__info" }, he = ["title"], z = ["title"], ge = {
21
+ key: 2,
22
+ class: "pk-spreadsheet-preview__stats"
23
+ }, B = {
24
+ key: 0,
25
+ class: "pk-spreadsheet-preview__average"
26
+ }, _e = { key: 1 }, ve = { class: "pk-spreadsheet-preview__zoom" }, ye = { class: "pk-spreadsheet-preview__percent" }, be = 64, V = 20, H = 28, U = 44, W = /* @__PURE__ */ x({
27
+ __name: "PkSpreadsheetPreview",
28
+ props: /*@__PURE__*/ C({ preview: {} }, {
29
+ sheet: { default: 0 },
30
+ sheetModifiers: {},
31
+ zoom: { default: 1 },
32
+ zoomModifiers: {}
33
+ }),
34
+ emits: ["update:sheet", "update:zoom"],
35
+ setup(e) {
36
+ let t = e, { t: r, locale: i } = oe({ useScope: "global" }), a = M(e, "sheet"), o = M(e, "zoom"), s = ie("scrollEl"), { width: c, height: l } = se(s, {
37
+ width: 0,
38
+ height: 0
39
+ }, { box: "border-box" }), u = m(() => t.preview.sheets[a.value] ?? t.preview.sheets[0]);
40
+ N(() => t.preview, () => {
41
+ a.value = 0;
42
+ });
43
+ let d = (e) => {
44
+ let t = "";
45
+ for (let n = e; n > 0; n = Math.floor((n - 1) / 26)) t = String.fromCharCode(65 + (n - 1) % 26) + t;
46
+ return t;
47
+ }, f = m(() => {
48
+ let e = u.value;
49
+ if (!e) return [];
50
+ let t = new Set(e.columns.filter((e) => e.hidden).map((e) => e.col)), n = new Map(e.columns.map((e) => [e.col, e.width])), r = [], i = U, a = c.value / o.value;
51
+ for (let o = 1; o <= e.lastColumn || !e.moreColumns && (o <= e.lastColumn + 2 || i < a); o++) {
52
+ if (t.has(o)) continue;
53
+ let e = n.get(o) ?? be;
54
+ r.push({
55
+ col: o,
56
+ width: e
57
+ }), i += e;
58
+ }
59
+ return r;
60
+ }), h = m(() => f.value.reduce((e, t) => e + t.width, U)), x = m(() => f.value.map((e) => `${e.col}:${e.width}`).join(",")), S = /* @__PURE__ */ new WeakMap(), C = m(() => {
61
+ let e = u.value;
62
+ if (!e) return [];
63
+ let t = new Set(e.hiddenRows ?? []), n = new Map(e.rows.map((e) => [e.row, e.height])), r = Math.ceil((l.value / o.value - H) / V), i = e.moreRows ? e.lastRow : Math.max(e.lastRow + 5, r + t.size), a = S.get(e);
64
+ a || (a = /* @__PURE__ */ new Map(), S.set(e, a));
65
+ let s = a;
66
+ return Array.from({ length: i }, (e, t) => t + 1).filter((e) => !t.has(e)).map((e) => {
67
+ let t = s.get(e);
68
+ return t || (t = {
69
+ row: e,
70
+ height: n.get(e) ?? V
71
+ }, s.set(e, t)), t;
72
+ });
73
+ }), ne = m(() => {
74
+ let e = /* @__PURE__ */ new Map();
75
+ for (let t of u.value?.rows ?? []) for (let n of t.cells) e.set(`${t.row},${n.col}`, n);
76
+ return e;
77
+ }), re = m(() => {
78
+ let e = /* @__PURE__ */ new Map();
79
+ for (let t of u.value?.rows ?? []) for (let n of t.cells) if (n.span) for (let r = 0; r < n.span.rows; r++) for (let i = 0; i < n.span.cols; i++) (r || i) && e.set(`${t.row + r},${n.col + i}`, {
80
+ row: t.row,
81
+ col: n.col
82
+ });
83
+ return e;
84
+ }), D = (e, t) => ne.value.get(`${e},${t}`), ae = (e, t) => {
85
+ let n = D(e, t)?.span;
86
+ if (n) return {
87
+ rows: C.value.filter((t) => t.row >= e && t.row < e + n.rows).length,
88
+ cols: f.value.filter((e) => e.col >= t && e.col < t + n.cols).length
89
+ };
90
+ }, W = (e) => e?.style === void 0 ? void 0 : t.preview.styles[e.style], G = (e, t) => {
91
+ let n = e.decimals === void 0 ? { maximumFractionDigits: 10 } : {
92
+ minimumFractionDigits: e.decimals,
93
+ maximumFractionDigits: e.maxDecimals ?? e.decimals
94
+ };
95
+ return new Intl.NumberFormat(i.value, {
96
+ ...n,
97
+ ...e.format === "percent" ? { style: "percent" } : {},
98
+ ...e.format === "currency" && e.currency ? {
99
+ style: "currency",
100
+ currency: e.currency
101
+ } : {}
102
+ }).format(t);
103
+ }, K = (e) => {
104
+ let t = /* @__PURE__ */ new Date(`${e}T00:00:00Z`);
105
+ return Number.isNaN(t.getTime()) ? e : new Intl.DateTimeFormat(i.value, {
106
+ dateStyle: "short",
107
+ timeZone: "UTC"
108
+ }).format(t);
109
+ }, q = (e) => {
110
+ if (!e) return "";
111
+ if (e.missing) return "—";
112
+ let t = e.value;
113
+ return t === void 0 ? "" : typeof t == "boolean" ? r(t ? "chatFilePreview.true" : "chatFilePreview.false") : e.format === "date" && typeof t == "string" ? K(t) : typeof t == "number" ? G(e, t) : t;
114
+ }, J = (e) => {
115
+ if (!e) return "";
116
+ if (e.formula) return `=${e.formula}`;
117
+ let t = e.value;
118
+ return typeof t == "number" ? new Intl.NumberFormat(i.value, {
119
+ useGrouping: !1,
120
+ maximumFractionDigits: 15,
121
+ ...e.format === "percent" ? { style: "percent" } : {}
122
+ }).format(t) : q(e);
123
+ }, Y = (e) => e ? `${e.width}px solid ${e.color}` : void 0, xe = (e, t, n) => {
124
+ let r = W(e), i = e?.value, a = typeof i == "number" || !!e?.missing, o = {
125
+ textAlign: r?.align ?? (a ? "right" : typeof i == "boolean" || e?.format === "error" ? "center" : "left"),
126
+ verticalAlign: r?.valign === "top" ? "top" : r?.valign === "middle" ? "middle" : "bottom",
127
+ whiteSpace: r?.wrap ? "pre-wrap" : "nowrap"
128
+ };
129
+ r?.bold && (o.fontWeight = 700), r?.italic && (o.fontStyle = "italic");
130
+ let s = [r?.underline ? "underline" : "", r?.strike ? "line-through" : ""].filter(Boolean).join(" ");
131
+ if (s && (o.textDecoration = s), r?.size && (o.fontSize = `${r.size}pt`), r?.color && (o.color = r.color), r?.fill && (o.backgroundColor = r.fill), r?.indent) {
132
+ let e = `${4 + r.indent * 9}px`;
133
+ o.textAlign === "right" ? o.paddingRight = e : o.paddingLeft = e;
134
+ }
135
+ return o.borderTop = Y(r?.borders?.top), o.borderRight = Y(r?.borders?.right), o.borderBottom = Y(r?.borders?.bottom), o.borderLeft = Y(r?.borders?.left), Object.assign(o, Se(t, n)), o;
136
+ }, Se = (e, t) => {
137
+ let n = u.value?.frozen;
138
+ if (!n) return {};
139
+ let r = {};
140
+ return e <= n.rows && (r.position = "sticky", r.top = `${H + C.value.filter((t) => t.row < e).reduce((e, t) => e + t.height, 0)}px`, r.zIndex = 2), t <= n.cols && (r.position = "sticky", r.left = `${U + f.value.filter((e) => e.col < t).reduce((e, t) => e + t.width, 0)}px`, r.zIndex = e <= n.rows ? 3 : 2), r;
141
+ }, X = O({
142
+ row: 1,
143
+ col: 1
144
+ }), Z = O({
145
+ row: 1,
146
+ col: 1
147
+ });
148
+ N(u, () => {
149
+ X.value = {
150
+ row: 1,
151
+ col: 1
152
+ }, Z.value = {
153
+ row: 1,
154
+ col: 1
155
+ };
156
+ });
157
+ let Q = m(() => ({
158
+ r1: Math.min(X.value.row, Z.value.row),
159
+ r2: Math.max(X.value.row, Z.value.row),
160
+ c1: Math.min(X.value.col, Z.value.col),
161
+ c2: Math.max(X.value.col, Z.value.col)
162
+ })), Ce = (e, t) => e >= Q.value.r1 && e <= Q.value.r2 && t >= Q.value.c1 && t <= Q.value.c2, we = (e, t) => Z.value.row === e && Z.value.col === t, Te = (e) => e >= Q.value.r1 && e <= Q.value.r2 ? `${Q.value.c1}:${Q.value.c2}:${Z.value.row === e ? Z.value.col : 0}` : "", Ee = O(!1), De = (e, t, n) => {
163
+ s.value?.focus({ preventScroll: !0 }), Z.value = {
164
+ row: e,
165
+ col: t
166
+ }, n.shiftKey || (X.value = {
167
+ row: e,
168
+ col: t
169
+ }), Ee.value = !0;
170
+ }, Oe = (e, t) => {
171
+ Ee.value && (Z.value = {
172
+ row: e,
173
+ col: t
174
+ });
175
+ }, ke = (e) => {
176
+ let t = {
177
+ ArrowUp: [-1, 0],
178
+ ArrowDown: [1, 0],
179
+ ArrowLeft: [0, -1],
180
+ ArrowRight: [0, 1],
181
+ Enter: [1, 0],
182
+ Tab: [0, 1]
183
+ }[e.key];
184
+ if (!t) return;
185
+ e.preventDefault();
186
+ let n = C.value.map((e) => e.row), r = f.value.map((e) => e.col), i = (e) => re.value.get(`${e.row},${e.col}`) ?? e, a = i(Z.value), o = n.indexOf(Z.value.row), c = r.indexOf(Z.value.col), l = a;
187
+ for (;;) {
188
+ let e = Math.min(n.length - 1, Math.max(0, o + t[0])), s = Math.min(r.length - 1, Math.max(0, c + t[1]));
189
+ if (e === o && s === c || (o = e, c = s, l = i({
190
+ row: n[o],
191
+ col: r[c]
192
+ }), l.row !== a.row || l.col !== a.col)) break;
193
+ }
194
+ Z.value = l, e.shiftKey || (X.value = l), te(() => s.value?.querySelector("[data-focus]")?.scrollIntoView({
195
+ block: "nearest",
196
+ inline: "nearest"
197
+ }));
198
+ }, Ae = m(() => D(Z.value.row, Z.value.col)), $ = m(() => {
199
+ let { r1: e, r2: t, c1: n, c2: r } = Q.value;
200
+ if (e === t && n === r) return;
201
+ let i = 0, a = 0, o = 0, s;
202
+ for (let c = e; c <= t; c++) for (let e = n; e <= r; e++) {
203
+ let t = D(c, e);
204
+ t && (t.value !== void 0 || t.missing) && (i++, typeof t.value == "number" && (a += t.value, o++, s ??= t));
205
+ }
206
+ if (i) return {
207
+ count: i,
208
+ sum: s ? G(s, a) : void 0,
209
+ average: s ? G(s, a / o) : void 0
210
+ };
211
+ }), je = (e) => {
212
+ o.value = Math.min(2, Math.max(.5, Math.round((o.value + e) * 10) / 10));
213
+ };
214
+ return (t, c) => {
215
+ let l = n;
216
+ return E(), _("div", ce, [
217
+ v("div", F, [
218
+ v("span", {
219
+ class: "pk-spreadsheet-preview__ref",
220
+ "aria-label": j(r)("chatFilePreview.cell")
221
+ }, A(d(Z.value.col)) + A(Z.value.row), 9, I),
222
+ c[6] ||= v("span", {
223
+ class: "pk-spreadsheet-preview__fx",
224
+ "aria-hidden": "true"
225
+ }, "fx", -1),
226
+ v("output", {
227
+ class: "pk-spreadsheet-preview__formula",
228
+ "aria-label": j(r)("chatFilePreview.formulaBar")
229
+ }, A(J(Ae.value)), 9, le)
230
+ ]),
231
+ v("div", {
232
+ ref_key: "scrollEl",
233
+ ref: s,
234
+ class: "pk-spreadsheet-preview__scroll",
235
+ tabindex: "0",
236
+ role: "grid",
237
+ "aria-label": u.value?.name,
238
+ onKeydown: ke,
239
+ onMouseup: c[2] ||= (e) => Ee.value = !1,
240
+ onMouseleave: c[3] ||= (e) => Ee.value = !1
241
+ }, [u.value ? (E(), _("table", {
242
+ key: 0,
243
+ class: w(["pk-spreadsheet-preview__grid", { "pk-spreadsheet-preview__grid--lines": u.value.gridlines }]),
244
+ style: T({
245
+ zoom: o.value,
246
+ width: `${h.value}px`
247
+ })
248
+ }, [
249
+ v("colgroup", null, [v("col", { style: T({ width: `${U}px` }) }, null, 4), (E(!0), _(p, null, k(f.value, (e) => (E(), _("col", {
250
+ key: e.col,
251
+ style: T({ width: `${e.width}px` })
252
+ }, null, 4))), 128))]),
253
+ v("thead", null, [v("tr", { style: T({ height: `${H}px` }) }, [c[7] ||= v("th", { class: "pk-spreadsheet-preview__corner" }, null, -1), (E(!0), _(p, null, k(f.value, (e) => (E(), _("th", {
254
+ key: e.col,
255
+ scope: "col",
256
+ class: w(["pk-spreadsheet-preview__head", { "pk-spreadsheet-preview__head--current": e.col >= Q.value.c1 && e.col <= Q.value.c2 }])
257
+ }, A(d(e.col)), 3))), 128))], 4)]),
258
+ v("tbody", null, [(E(!0), _(p, null, k(C.value, (e, t, n, a) => {
259
+ let o = [
260
+ e,
261
+ u.value,
262
+ x.value,
263
+ j(i),
264
+ Te(e.row)
265
+ ];
266
+ if (a && a.el && a.key === e.row && ee(a, o)) return a;
267
+ let s = (E(), _("tr", {
268
+ key: e.row,
269
+ style: T({ height: `${e.height}px` })
270
+ }, [v("th", {
271
+ scope: "row",
272
+ class: w(["pk-spreadsheet-preview__row", { "pk-spreadsheet-preview__row--current": e.row >= Q.value.r1 && e.row <= Q.value.r2 }]),
273
+ style: T(u.value.frozen && e.row <= u.value.frozen.rows ? {
274
+ ...Se(e.row, 0),
275
+ left: 0,
276
+ zIndex: 4
277
+ } : void 0)
278
+ }, A(e.row), 7), (E(!0), _(p, null, k(f.value, (t) => (E(), _(p, { key: t.col }, [re.value.has(`${e.row},${t.col}`) ? g("", !0) : (E(), _("td", {
279
+ key: 0,
280
+ rowspan: ae(e.row, t.col)?.rows,
281
+ colspan: ae(e.row, t.col)?.cols,
282
+ class: w(["pk-spreadsheet-preview__cell", {
283
+ "pk-spreadsheet-preview__cell--range": Ce(e.row, t.col) && !we(e.row, t.col),
284
+ "pk-spreadsheet-preview__cell--missing": D(e.row, t.col)?.missing
285
+ }]),
286
+ style: T(xe(D(e.row, t.col), e.row, t.col)),
287
+ "data-focus": we(e.row, t.col) ? "" : void 0,
288
+ title: D(e.row, t.col)?.missing ? j(r)("chatFilePreview.missingValue") : void 0,
289
+ onMousedown: P((n) => De(e.row, t.col, n), ["prevent"]),
290
+ onMouseenter: (n) => Oe(e.row, t.col)
291
+ }, A(q(D(e.row, t.col))), 47, L))], 64))), 128))], 4));
292
+ return s.memo = o, s;
293
+ }, c, 0), 128))])
294
+ ], 6)) : g("", !0), u.value && (u.value.moreRows || u.value.moreColumns) ? (E(), _("p", de, [u.value.moreRows ? (E(), _(p, { key: 0 }, [y(A(j(r)("chatFilePreview.moreRows", u.value.moreRows)), 1)], 64)) : g("", !0), u.value.moreColumns ? (E(), _(p, { key: 1 }, [y(A(j(r)("chatFilePreview.moreColumns", u.value.moreColumns)), 1)], 64)) : g("", !0)])) : g("", !0)], 40, ue),
295
+ v("nav", {
296
+ class: "pk-spreadsheet-preview__sheets",
297
+ "aria-label": j(r)("chatFilePreview.sheets")
298
+ }, [(E(!0), _(p, null, k(e.preview.sheets, (e, t) => (E(), _("button", {
299
+ key: e.name,
300
+ type: "button",
301
+ class: "pk-spreadsheet-preview__sheet",
302
+ "aria-current": t === a.value ? "page" : void 0,
303
+ onClick: (e) => a.value = t
304
+ }, A(e.name), 9, R))), 128))], 8, fe),
305
+ v("div", pe, [v("p", me, [e.preview.staleFormulas ? (E(), _("span", {
306
+ key: 0,
307
+ class: "pk-spreadsheet-preview__note",
308
+ title: j(r)("chatFilePreview.staleFormulas")
309
+ }, A(j(r)("chatFilePreview.staleFormulas")), 9, he)) : e.preview.computedFormulas ? (E(), _("span", {
310
+ key: 1,
311
+ class: "pk-spreadsheet-preview__note",
312
+ title: j(r)("chatFilePreview.computedFormulas")
313
+ }, A(j(r)("chatFilePreview.computedFormulas")), 9, z)) : g("", !0), $.value ? (E(), _("span", ge, [
314
+ $.value.average ? (E(), _("span", B, A(j(r)("chatFilePreview.average")) + " " + A($.value.average), 1)) : g("", !0),
315
+ v("span", null, A(j(r)("chatFilePreview.count")) + " " + A($.value.count), 1),
316
+ $.value.sum ? (E(), _("span", _e, A(j(r)("chatFilePreview.sum")) + " " + A($.value.sum), 1)) : g("", !0)
317
+ ])) : g("", !0)]), v("div", ve, [
318
+ b(l, {
319
+ modifiers: "action-quiet",
320
+ icon: "ri:subtract-line",
321
+ "aria-label": j(r)("chatFilePreview.zoomOut"),
322
+ disabled: o.value <= .5,
323
+ onClick: c[4] ||= (e) => je(-.1)
324
+ }, null, 8, ["aria-label", "disabled"]),
325
+ v("span", ye, A(Math.round(o.value * 100)) + "% ", 1),
326
+ b(l, {
327
+ modifiers: "action-quiet",
328
+ icon: "ri:add-line",
329
+ "aria-label": j(r)("chatFilePreview.zoomIn"),
330
+ disabled: o.value >= 2,
331
+ onClick: c[5] ||= (e) => je(.1)
332
+ }, null, 8, ["aria-label", "disabled"])
333
+ ])])
334
+ ]);
335
+ };
336
+ }
337
+ }), G = ["src"], K = {
338
+ key: 1,
339
+ class: "pk-word-preview__image"
340
+ }, q = ["title"], J = ["title"], Y = /* @__PURE__ */ x({
341
+ __name: "PkWordPreviewRuns",
342
+ props: {
343
+ runs: {},
344
+ mode: {},
345
+ page: {},
346
+ numbers: {}
347
+ },
348
+ setup(e) {
349
+ let t = e, { t: n } = oe({ useScope: "global" }), r = S(u, void 0), a = (e) => e.picture ? c(r?.value, e.picture.ref) : void 0, l = (e) => t.page ? i(e) : "inline", d = (e) => {
350
+ let n = {
351
+ width: `${e.width}pt`,
352
+ aspectRatio: `${e.width} / ${e.height}`
353
+ }, r = e.anchor, a = t.page;
354
+ if (!r || !a) return n;
355
+ let o = r.xFrom === "page" ? r.x - a.margins.left : r.x, s = i(e);
356
+ if (s === "around") {
357
+ let t = a.width - a.margins.left - a.margins.right, i = o + e.width / 2 < t / 2;
358
+ return {
359
+ ...n,
360
+ float: i ? "left" : "right",
361
+ marginTop: r.yFrom === "paragraph" && r.y > 0 ? `${r.y}pt` : void 0,
362
+ [i ? "marginRight" : "marginLeft"]: "9pt"
363
+ };
364
+ }
365
+ return s === "block" ? {
366
+ ...n,
367
+ display: "block",
368
+ marginLeft: `${Math.max(0, o)}pt`
369
+ } : {
370
+ ...n,
371
+ position: "absolute",
372
+ left: `${o}pt`,
373
+ top: `${r.y}pt`,
374
+ zIndex: r.wrap === "behind" ? -1 : 1
375
+ };
376
+ }, f = (e) => e.field && t.numbers ? String(t.numbers[e.field]) : e.text, h = m(() => {
377
+ let e = s(t.runs, t.mode ?? "markup"), n = (e) => !!e.picture && !!t.page && ["around", "block"].includes(i(e.picture));
378
+ return [...e.filter(n), ...e.filter((e) => !n(e))];
379
+ }), v = m(() => !t.mode || t.mode === "markup"), y = (e) => {
380
+ let t = {};
381
+ e.font && (t.fontFamily = o(e.font)), t.fontSize = e.size ? `${e.size}pt` : "var(--pk-word-size)", e.color && (t.color = e.color), e.highlight && (t.backgroundColor = e.highlight), e.bold && (t.fontWeight = 700), e.italic && (t.fontStyle = "italic");
382
+ let n = [e.underline ? "underline" : "", e.strike ? "line-through" : ""].filter(Boolean).join(" ");
383
+ return n && (t.textDecoration = n), e.caps && (t.textTransform = "uppercase"), e.vertAlign && (t.verticalAlign = e.vertAlign, t.fontSize = `${(e.size ?? 11) * .65}pt`), t;
384
+ }, b = (e) => {
385
+ let t = y(e), n = new Set(String(t.textDecoration ?? "").split(" ").filter(Boolean));
386
+ return n.add(e.change === "deleted" ? "line-through" : "underline"), {
387
+ ...t,
388
+ textDecoration: [...n].join(" ")
389
+ };
390
+ }, x = (e) => e.author ? n("chatFilePreview.revisionBy", { author: e.author }) : void 0;
391
+ return (e, t) => (E(!0), _(p, null, k(h.value, (e, t) => (E(), _(p, { key: t }, [e.image ? (E(), _(p, { key: 0 }, [e.picture && a(e) ? (E(), _(p, { key: 0 }, [l(e.picture) === "page" ? g("", !0) : (E(), _("img", {
392
+ key: 0,
393
+ class: w(["pk-word-preview__picture", `pk-word-preview__picture--${l(e.picture)}`]),
394
+ style: T(d(e.picture)),
395
+ src: a(e),
396
+ alt: ""
397
+ }, null, 14, G))], 64)) : (E(), _("span", K, A(j(n)("chatFilePreview.image")), 1))], 64)) : v.value && e.change === "deleted" ? (E(), _("del", {
398
+ key: 1,
399
+ class: "pk-word-preview__removed",
400
+ style: T(b(e)),
401
+ title: x(e)
402
+ }, A(f(e)), 13, q)) : v.value && e.change === "inserted" ? (E(), _("ins", {
403
+ key: 2,
404
+ class: "pk-word-preview__added",
405
+ style: T(b(e)),
406
+ title: x(e)
407
+ }, A(f(e)), 13, J)) : (E(), _("span", {
408
+ key: 3,
409
+ style: T(y(e))
410
+ }, A(f(e)), 5))], 64))), 128));
411
+ }
412
+ }), xe = { key: 0 }, Se = ["colspan"], X = ["role", "aria-level"], Z = { key: 1 }, Q = /* @__PURE__ */ x({
413
+ __name: "PkWordPreviewBlock",
414
+ props: {
415
+ block: {},
416
+ row: {},
417
+ mode: {},
418
+ page: {},
419
+ numbers: {}
420
+ },
421
+ setup(e) {
422
+ let t = e, n = m(() => {
423
+ if (t.block.kind === "table") return {};
424
+ let e = t.block.style ?? {};
425
+ return {
426
+ textAlign: e.align,
427
+ paddingLeft: e.indentLeft ? `${e.indentLeft}pt` : void 0,
428
+ paddingRight: e.indentRight ? `${e.indentRight}pt` : void 0,
429
+ textIndent: e.firstLine ? `${e.firstLine}pt` : void 0,
430
+ paddingTop: e.spaceBefore ? `${e.spaceBefore}pt` : void 0,
431
+ paddingBottom: e.spaceAfter ? `${e.spaceAfter}pt` : void 0,
432
+ lineHeight: e.lineExact ? `${e.lineExact}pt` : e.lineAtLeast ? `max(calc(var(--pk-word-line, 1.17) * max(1em, var(--pk-word-size, 1em))), ${e.lineAtLeast}pt)` : `calc(var(--pk-word-line, 1.17) * ${e.lineHeight ?? 1})`,
433
+ backgroundColor: e.shading,
434
+ fontSize: e.size ? `${e.size}pt` : void 0
435
+ };
436
+ }), r = m(() => {
437
+ if (t.block.kind === "table") return {};
438
+ let e = -(t.block.style?.firstLine ?? 0);
439
+ return e > 0 ? { minWidth: `${e}pt` } : { paddingRight: "6pt" };
440
+ }), i = m(() => t.mode === "markup" && t.block.kind !== "table" && t.block.runs.some((e) => e.change)), a = m(() => t.block.kind === "table" && t.row !== void 0 ? t.block.rows[t.row] : void 0), o = m(() => {
441
+ if (t.block.kind !== "table") return [];
442
+ let e = t.block.widths ?? [], n = e.reduce((e, t) => e + t, 0);
443
+ return n ? e.map((e) => `${e / n * 100}%`) : [];
444
+ }), s = m(() => t.mode === "markup" && !!a.value?.some((e) => e.runs.some((e) => e.change)));
445
+ return (t, c) => e.block.kind === "table" && a.value ? (E(), _("table", {
446
+ key: 0,
447
+ class: w(["pk-word-preview__table", {
448
+ "pk-word-preview__table--lines": e.block.borders,
449
+ "pk-word-preview__table--next": e.row !== 0,
450
+ "pk-word-preview__changed": s.value
451
+ }])
452
+ }, [o.value.length ? (E(), _("colgroup", xe, [(E(!0), _(p, null, k(o.value, (e, t) => (E(), _("col", {
453
+ key: t,
454
+ style: T({ width: e })
455
+ }, null, 4))), 128))])) : g("", !0), v("tbody", null, [v("tr", null, [(E(!0), _(p, null, k(a.value, (t, n) => (E(), _("td", {
456
+ key: n,
457
+ colspan: t.span,
458
+ style: T({
459
+ backgroundColor: t.fill,
460
+ textAlign: t.align,
461
+ fontSize: t.size ? `${t.size}pt` : void 0
462
+ })
463
+ }, [b(Y, {
464
+ runs: t.runs,
465
+ mode: e.mode,
466
+ numbers: e.numbers
467
+ }, null, 8, [
468
+ "runs",
469
+ "mode",
470
+ "numbers"
471
+ ])], 12, Se))), 128))])])], 2)) : e.block.kind === "table" ? g("", !0) : (E(), _("div", {
472
+ key: 1,
473
+ class: w(["pk-word-preview__block", { "pk-word-preview__changed": i.value }]),
474
+ role: e.block.kind === "heading" ? "heading" : void 0,
475
+ "aria-level": e.block.kind === "heading" ? Math.max(1, e.block.level) : void 0,
476
+ style: T(n.value)
477
+ }, [
478
+ e.block.label ? (E(), _("span", {
479
+ key: 0,
480
+ class: "pk-word-preview__label",
481
+ style: T(r.value)
482
+ }, A(e.block.label), 5)) : g("", !0),
483
+ b(Y, {
484
+ runs: e.block.runs,
485
+ mode: e.mode,
486
+ page: e.page,
487
+ numbers: e.numbers
488
+ }, null, 8, [
489
+ "runs",
490
+ "mode",
491
+ "page",
492
+ "numbers"
493
+ ]),
494
+ !e.block.label && !e.block.runs.length ? (E(), _("br", Z)) : g("", !0)
495
+ ], 14, X));
496
+ }
497
+ }), Ce = { class: "pk-word-preview__part" }, we = ["src"], Te = /* @__PURE__ */ x({
498
+ __name: "PkWordPreviewPart",
499
+ props: {
500
+ blocks: {},
501
+ where: {},
502
+ section: {},
503
+ mode: {},
504
+ numbers: {}
505
+ },
506
+ setup(e) {
507
+ let t = e, n = S(u, void 0), i = m(() => a(t.blocks, t.mode)), o = m(() => l(t.blocks, t.mode).flatMap((e) => {
508
+ let i = c(n?.value, e.ref);
509
+ return i ? [{
510
+ src: i,
511
+ css: r(e, t.section.page)
512
+ }] : [];
513
+ })), s = m(() => {
514
+ let { margins: e } = t.section.page;
515
+ return {
516
+ left: `${e.left}pt`,
517
+ right: `${e.right}pt`,
518
+ ...t.where === "header" ? { top: `${t.section.headerDistance}pt` } : { bottom: `${t.section.footerDistance}pt` }
519
+ };
520
+ });
521
+ return (t, n) => (E(), _("div", Ce, [v("div", {
522
+ class: "pk-word-preview__part-flow",
523
+ style: T(s.value)
524
+ }, [(E(!0), _(p, null, k(i.value, (t) => (E(), h(Q, {
525
+ key: t.key,
526
+ block: e.blocks[t.block],
527
+ row: t.row,
528
+ mode: e.mode,
529
+ page: e.section.page,
530
+ numbers: e.numbers
531
+ }, null, 8, [
532
+ "block",
533
+ "row",
534
+ "mode",
535
+ "page",
536
+ "numbers"
537
+ ]))), 128))], 4), (E(!0), _(p, null, k(o.value, (e, t) => (E(), _("img", {
538
+ key: t,
539
+ class: "pk-word-preview__float",
540
+ style: T(e.css),
541
+ src: e.src,
542
+ alt: ""
543
+ }, null, 12, we))), 128))]));
544
+ }
545
+ }), Ee = ["aria-label"], De = {
546
+ class: "pk-word-preview__tabs",
547
+ role: "tablist"
548
+ }, Oe = ["aria-selected"], ke = ["aria-selected"], Ae = {
549
+ key: 0,
550
+ class: "pk-word-preview__list"
551
+ }, $ = ["aria-current", "onClick"], je = { class: "pk-word-preview__entry-text" }, Me = {
552
+ key: 0,
553
+ class: "u-dot"
554
+ }, Ne = {
555
+ key: 0,
556
+ class: "pk-word-preview__none"
557
+ }, Pe = {
558
+ key: 1,
559
+ class: "pk-word-preview__list"
560
+ }, Fe = ["onClick"], Ie = {
561
+ key: 0,
562
+ class: "pk-word-preview__removed"
563
+ }, Le = {
564
+ key: 1,
565
+ class: "pk-word-preview__added"
566
+ }, Re = { class: "pk-word-preview__main" }, ze = ["aria-label"], Be = ["src"], Ve = {
567
+ key: 2,
568
+ class: "pk-word-preview__truncated"
569
+ }, He = { class: "pk-word-preview__status" }, Ue = {
570
+ key: 0,
571
+ class: "pk-word-preview__count"
572
+ }, We = { class: "pk-word-preview__count" }, Ge = {
573
+ key: 1,
574
+ class: "pk-word-preview__legend"
575
+ }, Ke = ["title"], qe = { class: "pk-word-preview__removed" }, Je = { class: "pk-word-preview__added" }, Ye = { class: "pk-word-preview__percent" }, Xe = ["data-part"], Ze = 96 / 72, Qe = /* @__PURE__ */ x({
576
+ __name: "PkWordPreview",
577
+ props: /*@__PURE__*/ C({
578
+ preview: {},
579
+ mode: {}
580
+ }, {
581
+ fit: {
582
+ type: Boolean,
583
+ default: !0
584
+ },
585
+ fitModifiers: {},
586
+ zoom: { default: 1 },
587
+ zoomModifiers: {}
588
+ }),
589
+ emits: ["update:fit", "update:zoom"],
590
+ setup(e) {
591
+ let t = e, { t: i } = oe({ useScope: "global" });
592
+ D(u, m(() => t.preview.images));
593
+ let f = (e) => s(e, t.mode), y = m(() => a(t.preview.blocks, t.mode)), x = ie("rootEl"), S = ie("scrollEl"), ee = ie("measureEl"), { width: C } = se(x), { width: ae } = se(S), P = m(() => C.value === 0 || C.value >= 640), ce = m(() => C.value >= 1e3), F = m(() => t.preview.sections?.length ? t.preview.sections : [{
594
+ page: t.preview.page,
595
+ headerDistance: 0,
596
+ footerDistance: 0,
597
+ headers: {},
598
+ footers: {}
599
+ }]), I = m(() => F.value[0].page), le = m(() => ({
600
+ fontFamily: o(t.preview.defaults.font),
601
+ fontSize: `${t.preview.defaults.size}pt`,
602
+ color: t.preview.defaults.color ?? "#000000",
603
+ "--pk-word-line": d(t.preview.defaults.font),
604
+ "--pk-word-size": `${t.preview.defaults.size}pt`
605
+ })), ue = m(() => ({
606
+ ...le.value,
607
+ width: `${I.value.width - I.value.margins.left - I.value.margins.right}pt`
608
+ })), L = O([]), de = O({}), fe = async () => {
609
+ await te();
610
+ let e = ee.value?.querySelectorAll("[data-item]");
611
+ L.value = [...e ?? []].map((e) => e.getBoundingClientRect().height);
612
+ let t = ee.value?.querySelectorAll("[data-part]");
613
+ de.value = Object.fromEntries([...t ?? []].map((e) => [e.dataset.part ?? "", e.getBoundingClientRect().height]));
614
+ };
615
+ N([
616
+ y,
617
+ P,
618
+ () => t.preview.parts
619
+ ], fe, { flush: "post" }), re(() => {
620
+ fe(), document.fonts?.ready.then(fe);
621
+ });
622
+ let R = m(() => {
623
+ if (!P.value || L.value.length !== y.value.length) return [{
624
+ items: y.value.map((e, t) => t),
625
+ section: 0,
626
+ number: 1,
627
+ top: I.value.margins.top,
628
+ bottom: I.value.margins.bottom
629
+ }];
630
+ let e = [], n = 0, r = !0, i = 0, a, o = () => {
631
+ let o = F.value[n], s = r && o.pageStart !== void 0 ? o.pageStart : (a ?? e[e.length - 1]?.number ?? 0) + 1;
632
+ a = void 0;
633
+ let c = (e) => r && o.titlePage ? e.first : t.preview.evenAndOddHeaders && s % 2 == 0 ? e.even : e.default, l = c(o.headers), u = c(o.footers), d = (e) => e ? (de.value[e] ?? 0) / Ze : 0;
634
+ e.push({
635
+ items: [],
636
+ section: n,
637
+ number: s,
638
+ header: l,
639
+ footer: u,
640
+ top: Math.max(o.page.margins.top, l ? o.headerDistance + d(l) : 0),
641
+ bottom: Math.max(o.page.margins.bottom, u ? o.footerDistance + d(u) : 0)
642
+ }), r = !1, i = 0;
643
+ };
644
+ return y.value.forEach((t, s) => {
645
+ t.section !== void 0 && t.section !== n && F.value[t.section] && (n = t.section, r = t.breakBefore || !e.length, r || (a = F.value[n].pageStart));
646
+ let c = e[e.length - 1], l = c && F.value[c.section].page, u = l ? (l.height - c.top - c.bottom) * Ze : 0;
647
+ (!c || c.items.length && (t.breakBefore || i + L.value[s] > u)) && o(), e[e.length - 1].items.push(s), i += L.value[s];
648
+ }), e.length || o(), e;
649
+ }), pe = m(() => {
650
+ let e = /* @__PURE__ */ new Map();
651
+ for (let t of R.value) e.set(t.section, (e.get(t.section) ?? 0) + 1);
652
+ return R.value.map((t) => ({
653
+ page: t.number,
654
+ pages: R.value.length,
655
+ sectionPages: e.get(t.section) ?? 1
656
+ }));
657
+ }), me = (e) => {
658
+ let t = F.value[e.section].page;
659
+ return {
660
+ ...le.value,
661
+ width: `${t.width}pt`,
662
+ minHeight: `${t.height}pt`,
663
+ padding: `${e.top}pt ${t.margins.right}pt ${e.bottom}pt ${t.margins.left}pt`
664
+ };
665
+ }, he = (e) => {
666
+ let n = [...new Set(e.items.map((e) => y.value[e].block))];
667
+ return l(n.map((e) => t.preview.blocks[e]), t.mode).flatMap((n) => {
668
+ let i = c(t.preview.images, n.ref);
669
+ return i ? [{
670
+ src: i,
671
+ css: r(n, F.value[e.section].page)
672
+ }] : [];
673
+ });
674
+ }, z = M(e, "fit"), ge = M(e, "zoom"), B = m(() => z.value ? Math.min(1.25, Math.max(.3, (ae.value - 48) / (I.value.width * Ze))) : ge.value), _e = (e) => {
675
+ ge.value = Math.min(2, Math.max(.3, Math.round((B.value + e) * 10) / 10)), z.value = !1;
676
+ }, ve = O(0), ye = O(), be = () => {
677
+ let e = S.value?.getBoundingClientRect();
678
+ if (!e) return;
679
+ let t = S.value?.querySelectorAll("[data-page]") ?? [], n = 0;
680
+ for (let [r, i] of [...t].entries()) {
681
+ if (i.getBoundingClientRect().top - e.top > e.height / 3) break;
682
+ n = r;
683
+ }
684
+ ve.value = n;
685
+ let r;
686
+ for (let t of W.value) {
687
+ let n = S.value?.querySelector(`[data-key="${t.key}"]`);
688
+ if (n) {
689
+ if (n.getBoundingClientRect().top - e.top > 48) break;
690
+ r = t.key;
691
+ }
692
+ }
693
+ ye.value = r ?? W.value[0]?.key;
694
+ }, V = 0, H = () => {
695
+ V ||= requestAnimationFrame(() => {
696
+ V = 0, be();
697
+ });
698
+ };
699
+ ne(() => cancelAnimationFrame(V)), N(R, () => te(H));
700
+ let U = (e) => f(e).map((e) => e.text).join("").replace(/\s+/g, " ").trim(), W = m(() => y.value.flatMap((e) => {
701
+ let n = t.preview.blocks[e.block], r = n.kind === "heading" ? [n.label, U(n.runs)].filter(Boolean).join(" ") : "";
702
+ return n.kind === "heading" && n.level <= 3 && r ? [{
703
+ key: e.key,
704
+ level: n.level,
705
+ text: r
706
+ }] : [];
707
+ })), G = (e) => e.length > 60 ? `${e.slice(0, 60)}…` : e, K = m(() => y.value.flatMap((e) => {
708
+ let n = t.preview.blocks[e.block], r = n.kind === "table" ? (n.rows[e.row ?? 0] ?? []).flatMap((e) => e.runs) : n.runs, i = r.filter((e) => e.change === "deleted").map((e) => e.text).join(" ").trim(), a = r.filter((e) => e.change === "inserted").map((e) => e.text).join(" ").trim();
709
+ return i || a ? [{
710
+ key: e.key,
711
+ removed: G(i),
712
+ added: G(a)
713
+ }] : [];
714
+ })), q = O("outline"), J = O(!1), Y = (e) => {
715
+ S.value?.querySelector(`[data-key="${e}"]`)?.scrollIntoView({
716
+ block: "start",
717
+ behavior: "smooth"
718
+ }), ce.value || (J.value = !1);
719
+ }, xe = m(() => t.preview.blocks.flatMap((e) => e.kind === "table" ? e.rows.flat().map((e) => U(e.runs)) : [U(e.runs)]).join(" ").split(/\s+/).filter(Boolean).length), Se = m(() => t.preview.revisionAuthors.join(", "));
720
+ return (t, r) => {
721
+ let o = n;
722
+ return E(), _("div", {
723
+ ref_key: "rootEl",
724
+ ref: x,
725
+ class: w(["pk-word-preview", { "pk-word-preview--paged": P.value }])
726
+ }, [
727
+ (ce.value || J.value) && (W.value.length || K.value.length) ? (E(), _("aside", {
728
+ key: 0,
729
+ class: w(["pk-word-preview__side", { "pk-word-preview__side--over": !ce.value }]),
730
+ "aria-label": j(i)("chatFilePreview.outline")
731
+ }, [v("div", De, [v("button", {
732
+ type: "button",
733
+ role: "tab",
734
+ class: "pk-word-preview__tab",
735
+ "aria-selected": q.value === "outline",
736
+ onClick: r[0] ||= (e) => q.value = "outline"
737
+ }, A(j(i)("chatFilePreview.outline")), 9, Oe), K.value.length ? (E(), _("button", {
738
+ key: 0,
739
+ type: "button",
740
+ role: "tab",
741
+ class: "pk-word-preview__tab",
742
+ "aria-selected": q.value === "changes",
743
+ onClick: r[1] ||= (e) => q.value = "changes"
744
+ }, A(j(i)("chatFilePreview.changes", { count: K.value.length })), 9, ke)) : g("", !0)]), q.value === "outline" || !K.value.length ? (E(), _("nav", Ae, [(E(!0), _(p, null, k(W.value, (e) => (E(), _("button", {
745
+ key: e.key,
746
+ type: "button",
747
+ class: w(["pk-word-preview__entry", `pk-word-preview__entry--${Math.min(e.level, 3)}`]),
748
+ "aria-current": ye.value === e.key ? "location" : void 0,
749
+ onClick: (t) => Y(e.key)
750
+ }, [v("span", je, A(e.text), 1), K.value.some((t) => t.key === e.key) ? (E(), _("span", Me)) : g("", !0)], 10, $))), 128)), W.value.length ? g("", !0) : (E(), _("p", Ne, A(j(i)("chatFilePreview.noHeadings")), 1))])) : (E(), _("nav", Pe, [(E(!0), _(p, null, k(K.value, (e) => (E(), _("button", {
751
+ key: e.key,
752
+ type: "button",
753
+ class: "pk-word-preview__entry pk-word-preview__entry--change",
754
+ onClick: (t) => Y(e.key)
755
+ }, [e.removed ? (E(), _("del", Ie, A(e.removed), 1)) : g("", !0), e.added ? (E(), _("ins", Le, A(e.added), 1)) : g("", !0)], 8, Fe))), 128))]))], 10, Ee)) : g("", !0),
756
+ v("div", Re, [v("div", {
757
+ ref_key: "scrollEl",
758
+ ref: S,
759
+ class: "pk-word-preview__scroll",
760
+ onScroll: H
761
+ }, [P.value ? (E(), _("div", {
762
+ key: 0,
763
+ class: "pk-word-preview__pages",
764
+ style: T({ zoom: B.value })
765
+ }, [(E(!0), _(p, null, k(R.value, (t, n) => (E(), _("article", {
766
+ key: n,
767
+ "data-page": "",
768
+ class: "pk-word-preview__page",
769
+ "aria-label": j(i)("chatFilePreview.pageOf", {
770
+ page: n + 1,
771
+ count: R.value.length
772
+ }),
773
+ style: T(me(t))
774
+ }, [
775
+ t.header && e.preview.parts?.[t.header] ? (E(), h(Te, {
776
+ key: 0,
777
+ blocks: e.preview.parts[t.header],
778
+ where: "header",
779
+ section: F.value[t.section],
780
+ mode: e.mode,
781
+ numbers: pe.value[n]
782
+ }, null, 8, [
783
+ "blocks",
784
+ "section",
785
+ "mode",
786
+ "numbers"
787
+ ])) : g("", !0),
788
+ (E(!0), _(p, null, k(t.items, (r) => (E(), h(Q, {
789
+ key: y.value[r].key,
790
+ "data-key": y.value[r].key,
791
+ block: e.preview.blocks[y.value[r].block],
792
+ row: y.value[r].row,
793
+ mode: e.mode,
794
+ page: F.value[t.section].page,
795
+ numbers: pe.value[n]
796
+ }, null, 8, [
797
+ "data-key",
798
+ "block",
799
+ "row",
800
+ "mode",
801
+ "page",
802
+ "numbers"
803
+ ]))), 128)),
804
+ (E(!0), _(p, null, k(he(t), (e, t) => (E(), _("img", {
805
+ key: `image-${t}`,
806
+ class: "pk-word-preview__float",
807
+ style: T(e.css),
808
+ src: e.src,
809
+ alt: ""
810
+ }, null, 12, Be))), 128)),
811
+ t.footer && e.preview.parts?.[t.footer] ? (E(), h(Te, {
812
+ key: 1,
813
+ blocks: e.preview.parts[t.footer],
814
+ where: "footer",
815
+ section: F.value[t.section],
816
+ mode: e.mode,
817
+ numbers: pe.value[n]
818
+ }, null, 8, [
819
+ "blocks",
820
+ "section",
821
+ "mode",
822
+ "numbers"
823
+ ])) : g("", !0)
824
+ ], 12, ze))), 128))], 4)) : (E(), _("article", {
825
+ key: 1,
826
+ class: "pk-word-preview__page pk-word-preview__page--flow",
827
+ style: T(le.value)
828
+ }, [(E(!0), _(p, null, k(y.value, (t) => (E(), h(Q, {
829
+ key: t.key,
830
+ "data-key": t.key,
831
+ block: e.preview.blocks[t.block],
832
+ row: t.row,
833
+ mode: e.mode
834
+ }, null, 8, [
835
+ "data-key",
836
+ "block",
837
+ "row",
838
+ "mode"
839
+ ]))), 128))], 4)), e.preview.truncated ? (E(), _("p", Ve, A(j(i)("chatFilePreview.truncated")), 1)) : g("", !0)], 544), v("div", He, [
840
+ P.value ? (E(), _("span", Ue, A(j(i)("chatFilePreview.pageOf", {
841
+ page: ve.value + 1,
842
+ count: R.value.length
843
+ })), 1)) : g("", !0),
844
+ v("span", We, A(j(i)("chatFilePreview.words", xe.value)), 1),
845
+ e.mode === "markup" && e.preview.revisionAuthors.length ? (E(), _("span", Ge, [
846
+ v("span", {
847
+ class: "pk-word-preview__legend-text",
848
+ title: j(i)("chatFilePreview.revisionsOf", { authors: Se.value })
849
+ }, A(j(i)("chatFilePreview.revisionsOf", { authors: Se.value })), 9, Ke),
850
+ v("del", qe, A(j(i)("chatFilePreview.removed")), 1),
851
+ v("ins", Je, A(j(i)("chatFilePreview.added")), 1)
852
+ ])) : g("", !0),
853
+ r[6] ||= v("span", { class: "pk-word-preview__spacer" }, null, -1),
854
+ !ce.value && (W.value.length || K.value.length) ? (E(), h(o, {
855
+ key: 2,
856
+ class: "pk-word-preview__outline-toggle",
857
+ modifiers: "action-quiet",
858
+ icon: "ri:list-unordered",
859
+ label: j(i)("chatFilePreview.outline"),
860
+ title: j(i)("chatFilePreview.outline"),
861
+ "aria-label": j(i)("chatFilePreview.outline"),
862
+ "aria-expanded": J.value,
863
+ onClick: r[2] ||= (e) => J.value = !J.value
864
+ }, null, 8, [
865
+ "label",
866
+ "title",
867
+ "aria-label",
868
+ "aria-expanded"
869
+ ])) : g("", !0),
870
+ P.value ? (E(), _(p, { key: 3 }, [
871
+ b(o, {
872
+ modifiers: "action-quiet",
873
+ label: j(i)("chatFilePreview.fitWidth"),
874
+ disabled: z.value,
875
+ onClick: r[3] ||= (e) => z.value = !0
876
+ }, null, 8, ["label", "disabled"]),
877
+ b(o, {
878
+ modifiers: "action-quiet",
879
+ icon: "ri:subtract-line",
880
+ "aria-label": j(i)("chatFilePreview.zoomOut"),
881
+ disabled: B.value <= .3,
882
+ onClick: r[4] ||= (e) => _e(-.1)
883
+ }, null, 8, ["aria-label", "disabled"]),
884
+ v("span", Ye, A(Math.round(B.value * 100)) + "% ", 1),
885
+ b(o, {
886
+ modifiers: "action-quiet",
887
+ icon: "ri:add-line",
888
+ "aria-label": j(i)("chatFilePreview.zoomIn"),
889
+ disabled: B.value >= 2,
890
+ onClick: r[5] ||= (e) => _e(.1)
891
+ }, null, 8, ["aria-label", "disabled"])
892
+ ], 64)) : g("", !0)
893
+ ])]),
894
+ P.value ? (E(), _("div", {
895
+ key: 1,
896
+ ref_key: "measureEl",
897
+ ref: ee,
898
+ class: "pk-word-preview__measure",
899
+ "aria-hidden": "true",
900
+ style: T(ue.value)
901
+ }, [(E(!0), _(p, null, k(y.value, (t) => (E(), _("div", {
902
+ key: t.key,
903
+ "data-item": ""
904
+ }, [b(Q, {
905
+ block: e.preview.blocks[t.block],
906
+ row: t.row,
907
+ mode: e.mode,
908
+ page: I.value
909
+ }, null, 8, [
910
+ "block",
911
+ "row",
912
+ "mode",
913
+ "page"
914
+ ])]))), 128)), (E(!0), _(p, null, k(e.preview.parts, (t, n) => (E(), _("div", {
915
+ key: n,
916
+ "data-part": n
917
+ }, [(E(!0), _(p, null, k(j(a)(t, e.mode), (n) => (E(), h(Q, {
918
+ key: n.key,
919
+ block: t[n.block],
920
+ row: n.row,
921
+ mode: e.mode,
922
+ page: I.value
923
+ }, null, 8, [
924
+ "block",
925
+ "row",
926
+ "mode",
927
+ "page"
928
+ ]))), 128))], 8, Xe))), 128))], 4)) : g("", !0)
929
+ ], 2);
930
+ };
931
+ }
932
+ }), $e = ["aria-label"], et = { class: "pk-file-preview__head" }, tt = { class: "pk-file-preview__file" }, nt = {
933
+ class: "pk-file-preview__tile",
934
+ "aria-hidden": "true"
935
+ }, rt = { class: "pk-file-preview__name" }, it = { class: "pk-file-preview__title" }, at = { class: "pk-file-preview__note" }, ot = {
936
+ key: 0,
937
+ class: "pk-file-preview__tools"
938
+ }, st = ["aria-label"], ct = { class: "pk-file-preview__version" }, lt = { class: "pk-file-preview__mode-long" }, ut = { class: "pk-file-preview__mode-short" }, dt = { class: "pk-file-preview__actions" }, ft = { class: "pk-file-preview__body" }, pt = {
939
+ key: 0,
940
+ class: "pk-file-preview__skeleton vv-skeleton"
941
+ }, mt = {
942
+ key: 1,
943
+ class: "pk-file-preview__empty"
944
+ }, ht = /*@__PURE__*/ x({
945
+ __name: "PkFilePreview",
946
+ props: /*@__PURE__*/ C({
947
+ kind: {},
948
+ filename: {},
949
+ version: {},
950
+ versions: {},
951
+ downloadUrl: {},
952
+ preview: {},
953
+ loading: { type: Boolean },
954
+ error: { type: Boolean },
955
+ restorable: { type: Boolean },
956
+ resize: {}
957
+ }, {
958
+ mode: { default: "markup" },
959
+ modeModifiers: {},
960
+ sheet: { default: 0 },
961
+ sheetModifiers: {},
962
+ zoom: { default: 1 },
963
+ zoomModifiers: {},
964
+ fit: {
965
+ type: Boolean,
966
+ default: !0
967
+ },
968
+ fitModifiers: {}
969
+ }),
970
+ emits: /*@__PURE__*/ C([
971
+ "close",
972
+ "version",
973
+ "restore",
974
+ "resize"
975
+ ], [
976
+ "update:mode",
977
+ "update:sheet",
978
+ "update:zoom",
979
+ "update:fit"
980
+ ]),
981
+ setup(e, { emit: r }) {
982
+ let i = e, a = r, { t: o } = oe({ useScope: "global" }), s = m(() => i.versions ?? []), c = m(() => i.version ? s.value.indexOf(i.version) : -1), l = m(() => c.value > 0 ? s.value[c.value - 1] : void 0), u = m(() => c.value >= 0 && c.value < s.value.length - 1 ? s.value[c.value + 1] : void 0), d = M(e, "mode"), y = M(e, "sheet"), x = M(e, "zoom"), S = M(e, "fit"), ee = m(() => [
983
+ {
984
+ value: "markup",
985
+ label: o("chatFilePreview.modeMarkup")
986
+ },
987
+ {
988
+ value: "accepted",
989
+ label: o("chatFilePreview.modeAccepted")
990
+ },
991
+ {
992
+ value: "original",
993
+ label: o("chatFilePreview.modeOriginal")
994
+ }
995
+ ]), C = m(() => i.preview?.kind === "word" && i.preview.revisionAuthors.length > 0);
996
+ return N(() => i.version, () => {
997
+ d.value = "markup";
998
+ }), (r, i) => {
999
+ let c = f, m = n;
1000
+ return E(), _("section", {
1001
+ class: "pk-file-preview",
1002
+ "aria-label": e.filename,
1003
+ tabindex: "-1",
1004
+ autofocus: ""
1005
+ }, [v("header", et, [
1006
+ v("div", tt, [v("span", nt, [b(c, {
1007
+ name: e.kind === "word" ? "ri:file-word-2-line" : "ri:file-excel-2-line",
1008
+ class: w(e.kind === "word" ? "pk-file-preview__icon--word" : "pk-file-preview__icon--sheet")
1009
+ }, null, 8, ["name", "class"])]), v("div", rt, [v("strong", it, A(e.filename), 1), v("span", at, A(j(o)("chatFilePreview.readOnly")), 1)])]),
1010
+ e.version && s.value.length > 1 || C.value ? (E(), _("div", ot, [e.version && s.value.length > 1 ? (E(), _("nav", {
1011
+ key: 0,
1012
+ class: "pk-file-preview__versions",
1013
+ "aria-label": j(o)("chatFilePreview.versions")
1014
+ }, [
1015
+ b(m, {
1016
+ modifiers: "action-quiet",
1017
+ icon: "ri:arrow-left-s-line",
1018
+ "aria-label": j(o)("chatFilePreview.previousVersion"),
1019
+ disabled: !l.value,
1020
+ onClick: i[0] ||= (e) => l.value && a("version", l.value)
1021
+ }, null, 8, ["aria-label", "disabled"]),
1022
+ v("span", ct, A(j(o)("chatFilePreview.versionOf", {
1023
+ version: e.version,
1024
+ count: s.value.length
1025
+ })), 1),
1026
+ b(m, {
1027
+ modifiers: "action-quiet",
1028
+ icon: "ri:arrow-right-s-line",
1029
+ "aria-label": j(o)("chatFilePreview.nextVersion"),
1030
+ disabled: !u.value,
1031
+ onClick: i[1] ||= (e) => u.value && a("version", u.value)
1032
+ }, null, 8, ["aria-label", "disabled"])
1033
+ ], 8, st)) : g("", !0), C.value ? (E(), h(t, {
1034
+ key: 1,
1035
+ modelValue: d.value,
1036
+ "onUpdate:modelValue": i[2] ||= (e) => d.value = e,
1037
+ name: "revisions",
1038
+ segmented: "",
1039
+ class: "pk-file-preview__modes u-segmented-fit mb-0",
1040
+ "aria-label": j(o)("chatFilePreview.modes"),
1041
+ options: ee.value
1042
+ }, {
1043
+ markup: ae(() => [v("span", lt, A(j(o)("chatFilePreview.modeMarkup")), 1), v("span", ut, A(j(o)("chatFilePreview.modeMarkupShort")), 1)]),
1044
+ _: 1
1045
+ }, 8, [
1046
+ "modelValue",
1047
+ "aria-label",
1048
+ "options"
1049
+ ])) : g("", !0)])) : g("", !0),
1050
+ v("div", dt, [
1051
+ e.restorable ? (E(), h(m, {
1052
+ key: 0,
1053
+ modifiers: "action-quiet",
1054
+ icon: "ri:arrow-go-back-line",
1055
+ label: j(o)("chatFilePreview.restore"),
1056
+ onClick: i[3] ||= (e) => a("restore")
1057
+ }, null, 8, ["label"])) : g("", !0),
1058
+ b(m, {
1059
+ href: e.downloadUrl,
1060
+ download: "",
1061
+ modifiers: "action-quiet",
1062
+ icon: "ri:download-line",
1063
+ title: j(o)("chatFilePreview.download"),
1064
+ "aria-label": j(o)("chatFilePreview.download")
1065
+ }, null, 8, [
1066
+ "href",
1067
+ "title",
1068
+ "aria-label"
1069
+ ]),
1070
+ e.resize === "expand" ? (E(), h(m, {
1071
+ key: 1,
1072
+ modifiers: "action-quiet",
1073
+ icon: "ri:fullscreen-line",
1074
+ title: j(o)("chatFilePreview.expand"),
1075
+ "aria-label": j(o)("chatFilePreview.expand"),
1076
+ onClick: i[4] ||= (e) => a("resize")
1077
+ }, null, 8, ["title", "aria-label"])) : e.resize === "shrink" ? (E(), h(m, {
1078
+ key: 2,
1079
+ modifiers: "action-quiet",
1080
+ icon: "ri:fullscreen-exit-line",
1081
+ title: j(o)("chatFilePreview.shrink"),
1082
+ "aria-label": j(o)("chatFilePreview.shrink"),
1083
+ onClick: i[5] ||= (e) => a("resize")
1084
+ }, null, 8, ["title", "aria-label"])) : g("", !0),
1085
+ b(m, {
1086
+ modifiers: "action-quiet",
1087
+ icon: "ri:close-line",
1088
+ title: j(o)("chatFilePreview.close"),
1089
+ "aria-label": j(o)("chatFilePreview.close"),
1090
+ onClick: i[6] ||= (e) => a("close")
1091
+ }, null, 8, ["title", "aria-label"])
1092
+ ])
1093
+ ]), v("div", ft, [e.loading ? (E(), _("div", pt, [(E(), _(p, null, k(8, (e) => v("div", {
1094
+ key: e,
1095
+ class: w(["vv-skeleton__item pk-file-preview__skeleton-line", e % 3 ? "w-full" : "w-128"])
1096
+ }, null, 2)), 64))])) : e.error || !e.preview ? (E(), _("p", mt, A(j(o)("chatFilePreview.unavailable")), 1)) : e.preview.kind === "word" ? (E(), h(Qe, {
1097
+ key: 2,
1098
+ zoom: x.value,
1099
+ "onUpdate:zoom": i[7] ||= (e) => x.value = e,
1100
+ fit: S.value,
1101
+ "onUpdate:fit": i[8] ||= (e) => S.value = e,
1102
+ preview: e.preview,
1103
+ mode: C.value ? d.value : "markup"
1104
+ }, null, 8, [
1105
+ "zoom",
1106
+ "fit",
1107
+ "preview",
1108
+ "mode"
1109
+ ])) : (E(), h(W, {
1110
+ key: 3,
1111
+ sheet: y.value,
1112
+ "onUpdate:sheet": i[9] ||= (e) => y.value = e,
1113
+ zoom: x.value,
1114
+ "onUpdate:zoom": i[10] ||= (e) => x.value = e,
1115
+ preview: e.preview
1116
+ }, null, 8, [
1117
+ "sheet",
1118
+ "zoom",
1119
+ "preview"
1120
+ ]))])], 8, $e);
1121
+ };
1122
+ }
1123
+ }), gt = /* @__PURE__ */ e({ default: () => _t }), _t = ht;
1124
+ export { gt as n, _t as t };
1125
+
1126
+ //# sourceMappingURL=PkFilePreview-CFqcO3vY.js.map