@8wave/ai-elements 0.124.0-beta.10 → 0.124.0-beta.11

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 (94) hide show
  1. package/dist/_chunks/{PkFilePreview-D_piCsAW.js → PkFilePreview-BwHe4-m1.js} +368 -346
  2. package/dist/_chunks/PkFilePreview-BwHe4-m1.js.map +1 -0
  3. package/dist/_chunks/{PkFilePreviewDialog-Bq0ipzrJ.js → PkFilePreviewDialog-LWxNgkzk.js} +2 -2
  4. package/dist/_chunks/{PkFilePreviewDialog-Bq0ipzrJ.js.map → PkFilePreviewDialog-LWxNgkzk.js.map} +1 -1
  5. package/dist/_chunks/{PkStreamingMarkdown-CHwrLP75.js → PkStreamingMarkdown-BvgO6aHe.js} +2 -2
  6. package/dist/_chunks/{PkStreamingMarkdown-CHwrLP75.js.map → PkStreamingMarkdown-BvgO6aHe.js.map} +1 -1
  7. package/dist/_chunks/{PkToolChatFile-DO4zjMJr.js → PkToolChatFile-OuaeZTxw.js} +62 -54
  8. package/dist/_chunks/PkToolChatFile-OuaeZTxw.js.map +1 -0
  9. package/dist/_chunks/{PkToolShowArtifact-B2-3-k2F.js → PkToolShowArtifact-BqgW3E6D.js} +2 -2
  10. package/dist/_chunks/{PkToolShowArtifact-B2-3-k2F.js.map → PkToolShowArtifact-BqgW3E6D.js.map} +1 -1
  11. package/dist/_chunks/{PkToolShowContactForm-DbOZHB_G.js → PkToolShowContactForm-DDDXopZp.js} +2 -2
  12. package/dist/_chunks/{PkToolShowContactForm-DbOZHB_G.js.map → PkToolShowContactForm-DDDXopZp.js.map} +1 -1
  13. package/dist/_chunks/{PkToolShowForm-o2LuWDNq.js → PkToolShowForm-D2LZ8Kkl.js} +3 -3
  14. package/dist/_chunks/{PkToolShowForm-o2LuWDNq.js.map → PkToolShowForm-D2LZ8Kkl.js.map} +1 -1
  15. package/dist/_chunks/{PkToolShowSources-CUNneZCp.js → PkToolShowSources-DA4SOt-H.js} +2 -2
  16. package/dist/_chunks/{PkToolShowSources-CUNneZCp.js.map → PkToolShowSources-DA4SOt-H.js.map} +1 -1
  17. package/dist/_chunks/excelNumberFormat-CIbRUEwQ.js +543 -0
  18. package/dist/_chunks/excelNumberFormat-CIbRUEwQ.js.map +1 -0
  19. package/dist/_chunks/{utils-BHvRrCzW.js → utils-euH8esYP.js} +7 -6
  20. package/dist/_chunks/utils-euH8esYP.js.map +1 -0
  21. package/dist/ai-elements.es.js +8 -8
  22. package/dist-vue/PkChatbot.js +1 -1
  23. package/dist-vue/PkChatbotEmptyState.js +1 -1
  24. package/dist-vue/PkChatbotInput.js +1 -1
  25. package/dist-vue/PkChatbotMessages.js +1 -1
  26. package/dist-vue/PkChatbotStepPayload.js +1 -1
  27. package/dist-vue/PkChatbotStepToolDetail.js +1 -1
  28. package/dist-vue/PkChatbotSteps.js +1 -1
  29. package/dist-vue/PkChatbotViewChat.js +1 -1
  30. package/dist-vue/PkChatbotViewConversations.js +1 -1
  31. package/dist-vue/_chunks/{PkChatbot-DQssgXm3.js → PkChatbot-BRttF7Lo.js} +5 -5
  32. package/dist-vue/_chunks/{PkChatbot-DQssgXm3.js.map → PkChatbot-BRttF7Lo.js.map} +1 -1
  33. package/dist-vue/_chunks/{PkChatbotEmptyState-B6qxJAPT.js → PkChatbotEmptyState-CLOH5Z2d.js} +2 -2
  34. package/dist-vue/_chunks/{PkChatbotEmptyState-B6qxJAPT.js.map → PkChatbotEmptyState-CLOH5Z2d.js.map} +1 -1
  35. package/dist-vue/_chunks/{PkChatbotInput-Bk8OS1xU.js → PkChatbotInput-BK7f1jFE.js} +2 -2
  36. package/dist-vue/_chunks/{PkChatbotInput-Bk8OS1xU.js.map → PkChatbotInput-BK7f1jFE.js.map} +1 -1
  37. package/dist-vue/_chunks/{PkChatbotMessages-D4LJZxv7.js → PkChatbotMessages-Ck0ofhtK.js} +14 -14
  38. package/dist-vue/_chunks/{PkChatbotMessages-D4LJZxv7.js.map → PkChatbotMessages-Ck0ofhtK.js.map} +1 -1
  39. package/dist-vue/_chunks/{PkChatbotStepPayload-_0WRbSR6.js → PkChatbotStepPayload-D682n3VR.js} +2 -2
  40. package/dist-vue/_chunks/{PkChatbotStepPayload-_0WRbSR6.js.map → PkChatbotStepPayload-D682n3VR.js.map} +1 -1
  41. package/dist-vue/_chunks/{PkChatbotStepToolDetail-DiaervF2.js → PkChatbotStepToolDetail-D5c8rqj9.js} +3 -3
  42. package/dist-vue/_chunks/{PkChatbotStepToolDetail-DiaervF2.js.map → PkChatbotStepToolDetail-D5c8rqj9.js.map} +1 -1
  43. package/dist-vue/_chunks/{PkChatbotSteps-BqL-ClgI.js → PkChatbotSteps-CtKRHqaG.js} +5 -5
  44. package/dist-vue/_chunks/{PkChatbotSteps-BqL-ClgI.js.map → PkChatbotSteps-CtKRHqaG.js.map} +1 -1
  45. package/dist-vue/_chunks/{PkChatbotViewChat-BfVLCU_j.js → PkChatbotViewChat-D8depeWQ.js} +6 -6
  46. package/dist-vue/_chunks/{PkChatbotViewChat-BfVLCU_j.js.map → PkChatbotViewChat-D8depeWQ.js.map} +1 -1
  47. package/dist-vue/_chunks/{PkChatbotViewConversations-C32O6SsT.js → PkChatbotViewConversations-B-dmLi-8.js} +2 -2
  48. package/dist-vue/_chunks/{PkChatbotViewConversations-C32O6SsT.js.map → PkChatbotViewConversations-B-dmLi-8.js.map} +1 -1
  49. package/dist-vue/_chunks/PkFilePreview-B54Dp_Rs.js +1149 -0
  50. package/dist-vue/_chunks/PkFilePreview-B54Dp_Rs.js.map +1 -0
  51. package/dist-vue/_chunks/{PkFilePreviewDialog-BSvgiM9A.js → PkFilePreviewDialog-QDPoZh1v.js} +2 -2
  52. package/dist-vue/_chunks/{PkFilePreviewDialog-BSvgiM9A.js.map → PkFilePreviewDialog-QDPoZh1v.js.map} +1 -1
  53. package/dist-vue/_chunks/{PkStreamingMarkdown-Dk3iXhTm.js → PkStreamingMarkdown-qnKwvrCg.js} +2 -2
  54. package/dist-vue/_chunks/{PkStreamingMarkdown-Dk3iXhTm.js.map → PkStreamingMarkdown-qnKwvrCg.js.map} +1 -1
  55. package/dist-vue/_chunks/PkToolChatFile-i0rHgFxB.js +227 -0
  56. package/dist-vue/_chunks/PkToolChatFile-i0rHgFxB.js.map +1 -0
  57. package/dist-vue/_chunks/{PkToolShowArtifact-BtCGilTJ.js → PkToolShowArtifact-Dh4ogn6A.js} +2 -2
  58. package/dist-vue/_chunks/{PkToolShowArtifact-BtCGilTJ.js.map → PkToolShowArtifact-Dh4ogn6A.js.map} +1 -1
  59. package/dist-vue/_chunks/{PkToolShowContactForm-BZNIeJpf.js → PkToolShowContactForm-BGTI1sio.js} +2 -2
  60. package/dist-vue/_chunks/{PkToolShowContactForm-BZNIeJpf.js.map → PkToolShowContactForm-BGTI1sio.js.map} +1 -1
  61. package/dist-vue/_chunks/{PkToolShowDiagram-KD4MfVkP.js → PkToolShowDiagram-xef3wJb0.js} +2 -2
  62. package/dist-vue/_chunks/{PkToolShowDiagram-KD4MfVkP.js.map → PkToolShowDiagram-xef3wJb0.js.map} +1 -1
  63. package/dist-vue/_chunks/{PkToolShowForm-Dtfpi58S.js → PkToolShowForm-Crg4Kl6v.js} +3 -3
  64. package/dist-vue/_chunks/{PkToolShowForm-Dtfpi58S.js.map → PkToolShowForm-Crg4Kl6v.js.map} +1 -1
  65. package/dist-vue/_chunks/{PkToolShowImageGallery-DnS04nTs.js → PkToolShowImageGallery-D9hdGBHK.js} +2 -2
  66. package/dist-vue/_chunks/{PkToolShowImageGallery-DnS04nTs.js.map → PkToolShowImageGallery-D9hdGBHK.js.map} +1 -1
  67. package/dist-vue/_chunks/{PkToolShowProductList-BlFKAtqQ.js → PkToolShowProductList-SC5aKDCw.js} +2 -2
  68. package/dist-vue/_chunks/{PkToolShowProductList-BlFKAtqQ.js.map → PkToolShowProductList-SC5aKDCw.js.map} +1 -1
  69. package/dist-vue/_chunks/{PkToolShowSources-DM177ZlR.js → PkToolShowSources-Bf9_JwFL.js} +2 -2
  70. package/dist-vue/_chunks/{PkToolShowSources-DM177ZlR.js.map → PkToolShowSources-Bf9_JwFL.js.map} +1 -1
  71. package/dist-vue/_chunks/{PkToolShowVideo-DQdVpaWT.js → PkToolShowVideo-C2ITZDNo.js} +2 -2
  72. package/dist-vue/_chunks/{PkToolShowVideo-DQdVpaWT.js.map → PkToolShowVideo-C2ITZDNo.js.map} +1 -1
  73. package/dist-vue/_chunks/{PkToolShowWebPages-Cx2Ft_wN.js → PkToolShowWebPages-BrefGxKQ.js} +2 -2
  74. package/dist-vue/_chunks/{PkToolShowWebPages-Cx2Ft_wN.js.map → PkToolShowWebPages-BrefGxKQ.js.map} +1 -1
  75. package/dist-vue/_chunks/excelNumberFormat-COn5tHoH.js +543 -0
  76. package/dist-vue/_chunks/excelNumberFormat-COn5tHoH.js.map +1 -0
  77. package/dist-vue/_chunks/{utils-BuxgMuKv.js → utils-B0PnU1Rk.js} +7 -6
  78. package/dist-vue/_chunks/utils-B0PnU1Rk.js.map +1 -0
  79. package/dist-vue/composables.js +1 -1
  80. package/dist-vue/index.js +20 -20
  81. package/dist-vue/packages/components/src/chat/excelNumberFormat.d.ts +34 -0
  82. package/dist-vue/packages/components/src/chat/useChatFilePreview.d.ts +20 -0
  83. package/dist-vue/packages/components/src/chat/utils.d.ts +2 -0
  84. package/dist-vue/packages/models/src/schema/SpreadsheetPreview.d.ts +26 -0
  85. package/dist-vue/packages/models/src/schema/WordPreview.d.ts +11 -0
  86. package/package.json +1 -1
  87. package/dist/_chunks/PkFilePreview-D_piCsAW.js.map +0 -1
  88. package/dist/_chunks/PkToolChatFile-DO4zjMJr.js.map +0 -1
  89. package/dist/_chunks/utils-BHvRrCzW.js.map +0 -1
  90. package/dist-vue/_chunks/PkFilePreview-jeqvHDm7.js +0 -1127
  91. package/dist-vue/_chunks/PkFilePreview-jeqvHDm7.js.map +0 -1
  92. package/dist-vue/_chunks/PkToolChatFile-Bnj-YFLh.js +0 -219
  93. package/dist-vue/_chunks/PkToolChatFile-Bnj-YFLh.js.map +0 -1
  94. package/dist-vue/_chunks/utils-BuxgMuKv.js.map +0 -1
@@ -1,31 +1,32 @@
1
1
  import { r as e } from "./rolldown-runtime-9rEmUaIe.js";
2
- import { A as t, B as n, Et as r, F as i, I as a, J as o, L as s, N as c, Ot as l, Q as u, S as d, Tt as f, V as p, X as m, _ as h, d as g, f as _, g as v, gt as y, h as b, j as x, k as S, kt as C, ot as w, r as T, tt as E, v as D, w as O, wt as k, x as A, y as j, z as M } from "./vue.runtime.esm-bundler-C2U5uTqB.js";
3
- import { r as ee } from "./vue-i18n-POtLvOl1.js";
4
- import { B as te, H as ne, L as N, R as re, U as P, V as F, W as I, a as ie, z as L } from "./utils-BHvRrCzW.js";
5
- import { l as ae } from "./dist-B3-I_01H.js";
2
+ import { A as t, B as n, Et as r, F as i, I as a, J as o, L as s, N as c, Ot as l, Q as u, S as d, Tt as f, V as p, X as m, _ as h, d as g, f as _, g as v, gt as y, h as b, j as ee, k as x, kt as S, ot as C, r as w, tt as T, v as E, w as D, wt as O, x as k, y as A, z as j } from "./vue.runtime.esm-bundler-C2U5uTqB.js";
3
+ import { r as te } from "./vue-i18n-POtLvOl1.js";
4
+ import { i as M, n as N, r as ne } from "./excelNumberFormat-CIbRUEwQ.js";
5
+ import { B as re, H as ie, L as P, R as ae, U as F, V as I, W as oe, a as se, z as L } from "./utils-euH8esYP.js";
6
+ import { l as ce } from "./dist-B3-I_01H.js";
6
7
  import { t as R } from "./index.es-C7ON2BA3.js";
7
- import { t as oe } from "./VvButtonLocalized-KEhD3ono.js";
8
+ import { t as le } from "./VvButtonLocalized-KEhD3ono.js";
8
9
  import { t as z } from "./_plugin-vue_export-helper-Djzt4Yr7.js";
9
- import { t as se } from "./PkEditorRadioButtons-Cif9q08d.js";
10
+ import { t as B } from "./PkEditorRadioButtons-Cif9q08d.js";
10
11
  // ../../packages/components/src/chat/PkSpreadsheetPreview.vue?vue&type=script&setup=true&lang.ts
11
- S(), w(), f(), T();
12
- var B = { class: "pk-spreadsheet-preview" }, ce = { class: "pk-spreadsheet-preview__bar" }, le = ["aria-label"], V = ["aria-label"], ue = ["aria-label"], de = [
12
+ x(), C(), f(), w();
13
+ var V = { class: "pk-spreadsheet-preview" }, ue = { class: "pk-spreadsheet-preview__bar" }, de = ["aria-label"], fe = ["aria-label"], H = ["aria-label"], pe = [
13
14
  "rowspan",
14
15
  "colspan",
15
16
  "data-focus",
16
17
  "title",
17
18
  "onMousedown",
18
19
  "onMouseenter"
19
- ], fe = {
20
+ ], U = {
20
21
  key: 1,
21
22
  class: "pk-spreadsheet-preview__more"
22
- }, pe = ["aria-label"], me = ["aria-current", "onClick"], H = { class: "pk-spreadsheet-preview__status" }, he = { class: "pk-spreadsheet-preview__info" }, ge = ["title"], _e = ["title"], ve = {
23
+ }, me = ["aria-label"], he = ["aria-current", "onClick"], ge = { class: "pk-spreadsheet-preview__status" }, _e = { class: "pk-spreadsheet-preview__info" }, ve = ["title"], ye = ["title"], be = {
23
24
  key: 2,
24
25
  class: "pk-spreadsheet-preview__stats"
25
- }, ye = {
26
+ }, W = {
26
27
  key: 0,
27
28
  class: "pk-spreadsheet-preview__average"
28
- }, be = { key: 1 }, xe = { class: "pk-spreadsheet-preview__zoom" }, U = { class: "pk-spreadsheet-preview__percent" }, Se = 64, W = 20, G = 28, K = 44, q = /*#__PURE__*/ z(/* @__PURE__ */ O({
29
+ }, xe = { key: 1 }, G = { class: "pk-spreadsheet-preview__zoom" }, K = { class: "pk-spreadsheet-preview__percent" }, q = 64, Se = 20, Ce = 28, J = 44, we = /*#__PURE__*/ z(/* @__PURE__ */ D({
29
30
  __name: "PkSpreadsheetPreview",
30
31
  props: /*@__PURE__*/ c({ preview: { type: null } }, {
31
32
  sheet: { default: 0 },
@@ -35,67 +36,76 @@ var B = { class: "pk-spreadsheet-preview" }, ce = { class: "pk-spreadsheet-previ
35
36
  }),
36
37
  emits: ["update:sheet", "update:zoom"],
37
38
  setup(e) {
38
- let t = e, { t: n, locale: a } = ee({ useScope: "global" }), s = o(e, "sheet"), c = o(e, "zoom"), f = m("scrollEl"), { width: h, height: S } = ae(f, {
39
+ let t = e, { t: n, locale: a } = te({ useScope: "global" }), s = o(e, "sheet"), c = o(e, "zoom"), f = m("scrollEl"), { width: h, height: x } = ce(f, {
39
40
  width: 0,
40
41
  height: 0
41
- }, { box: "border-box" }), w = b(() => t.preview.sheets[s.value] ?? t.preview.sheets[0]);
42
+ }, { box: "border-box" }), C = b(() => t.preview.sheets[s.value] ?? t.preview.sheets[0]);
42
43
  u(() => t.preview, () => {
43
44
  s.value = 0;
44
45
  });
45
- let T = (e) => {
46
+ let w = (e) => {
46
47
  let t = "";
47
48
  for (let n = e; n > 0; n = Math.floor((n - 1) / 26)) t = String.fromCharCode(65 + (n - 1) % 26) + t;
48
49
  return t;
49
- }, E = b(() => {
50
- let e = w.value;
50
+ }, T = b(() => {
51
+ let e = C.value;
51
52
  if (!e) return [];
52
- 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 = K, a = h.value / c.value;
53
+ 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 = J, a = h.value / c.value;
53
54
  for (let o = 1; o <= e.lastColumn || !e.moreColumns && (o <= e.lastColumn + 2 || i < a); o++) {
54
55
  if (t.has(o)) continue;
55
- let e = n.get(o) ?? Se;
56
+ let e = n.get(o) ?? q;
56
57
  r.push({
57
58
  col: o,
58
59
  width: e
59
60
  }), i += e;
60
61
  }
61
62
  return r;
62
- }), O = b(() => E.value.reduce((e, t) => e + t.width, K)), te = b(() => E.value.map((e) => `${e.col}:${e.width}`).join(",")), ne = /* @__PURE__ */ new WeakMap(), N = b(() => {
63
- let e = w.value;
63
+ }), D = b(() => T.value.reduce((e, t) => e + t.width, J)), re = b(() => T.value.map((e) => `${e.col}:${e.width}`).join(",")), ie = /* @__PURE__ */ new WeakMap(), P = b(() => {
64
+ let e = C.value;
64
65
  if (!e) return [];
65
- let t = new Set(e.hiddenRows ?? []), n = new Map(e.rows.map((e) => [e.row, e.height])), r = Math.ceil((S.value / c.value - G) / W), i = e.moreRows ? e.lastRow : Math.max(e.lastRow + 5, r + t.size), a = ne.get(e);
66
- a || (a = /* @__PURE__ */ new Map(), ne.set(e, a));
66
+ let t = new Set(e.hiddenRows ?? []), n = new Map(e.rows.map((e) => [e.row, e.height])), r = Math.ceil((x.value / c.value - Ce) / Se), i = e.moreRows ? e.lastRow : Math.max(e.lastRow + 5, r + t.size), a = ie.get(e);
67
+ a || (a = /* @__PURE__ */ new Map(), ie.set(e, a));
67
68
  let o = a;
68
69
  return Array.from({ length: i }, (e, t) => t + 1).filter((e) => !t.has(e)).map((e) => {
69
70
  let t = o.get(e);
70
71
  return t || (t = {
71
72
  row: e,
72
- height: n.get(e) ?? W
73
+ height: n.get(e) ?? Se
73
74
  }, o.set(e, t)), t;
74
75
  });
75
- }), re = b(() => {
76
+ }), ae = b(() => {
76
77
  let e = /* @__PURE__ */ new Map();
77
- for (let t of w.value?.rows ?? []) for (let n of t.cells) e.set(`${t.row},${n.col}`, n);
78
+ for (let t of C.value?.rows ?? []) for (let n of t.cells) e.set(`${t.row},${n.col}`, n);
78
79
  return e;
79
- }), P = b(() => {
80
+ }), F = b(() => {
80
81
  let e = /* @__PURE__ */ new Map();
81
- for (let t of w.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}`, {
82
+ for (let t of C.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}`, {
82
83
  row: t.row,
83
84
  col: n.col
84
85
  });
85
86
  return e;
86
- }), F = (e, t) => re.value.get(`${e},${t}`), I = (e, t) => {
87
- let n = F(e, t)?.span;
87
+ }), I = (e, t) => ae.value.get(`${e},${t}`), oe = (e, t) => {
88
+ let n = I(e, t)?.span;
88
89
  if (n) return {
89
- rows: N.value.filter((t) => t.row >= e && t.row < e + n.rows).length,
90
- cols: E.value.filter((e) => e.col >= t && e.col < t + n.cols).length
90
+ rows: P.value.filter((t) => t.row >= e && t.row < e + n.rows).length,
91
+ cols: T.value.filter((e) => e.col >= t && e.col < t + n.cols).length
91
92
  };
92
- }, ie = (e) => e?.style === void 0 ? void 0 : t.preview.styles[e.style], L = (e, t) => {
93
- let n = e.decimals === void 0 ? { maximumFractionDigits: 10 } : {
93
+ }, se = (e) => e?.style === void 0 ? void 0 : t.preview.styles[e.style], L = (e) => {
94
+ let n = e.numFmt === void 0 ? void 0 : t.preview.numberFormats?.[e.numFmt], r = e.value;
95
+ if (n !== void 0) try {
96
+ return e.format === "date" ? e.serial === void 0 ? void 0 : N(n, e.serial, a.value, t.preview.date1904) : typeof r == "number" ? M(n) ? N(n, r, a.value, t.preview.date1904) : ne(n, r, a.value) : void 0;
97
+ } catch {
98
+ return;
99
+ }
100
+ }, R = (e, t) => {
101
+ let n = L(e);
102
+ if (n) return n.text;
103
+ let r = e.decimals === void 0 ? { maximumFractionDigits: 10 } : {
94
104
  minimumFractionDigits: e.decimals,
95
105
  maximumFractionDigits: e.maxDecimals ?? e.decimals
96
106
  };
97
107
  return new Intl.NumberFormat(a.value, {
98
- ...n,
108
+ ...r,
99
109
  useGrouping: e.grouped === !0,
100
110
  ...e.format === "percent" ? { style: "percent" } : {},
101
111
  ...e.format === "currency" && e.currency ? {
@@ -103,18 +113,18 @@ var B = { class: "pk-spreadsheet-preview" }, ce = { class: "pk-spreadsheet-previ
103
113
  currency: e.currency
104
114
  } : {}
105
115
  }).format(t);
106
- }, R = (e) => {
116
+ }, z = (e) => {
107
117
  let t = /* @__PURE__ */ new Date(`${e}T00:00:00Z`);
108
118
  return Number.isNaN(t.getTime()) ? e : new Intl.DateTimeFormat(a.value, {
109
119
  dateStyle: "short",
110
120
  timeZone: "UTC"
111
121
  }).format(t);
112
- }, z = (e) => {
122
+ }, B = (e) => {
113
123
  if (!e) return "";
114
124
  if (e.missing) return "—";
115
125
  let t = e.value;
116
- return t === void 0 ? "" : typeof t == "boolean" ? n(t ? "chatFilePreview.true" : "chatFilePreview.false") : e.format === "date" && typeof t == "string" ? R(t) : typeof t == "number" ? L(e, t) : t;
117
- }, se = (e) => {
126
+ return t === void 0 ? "" : typeof t == "boolean" ? n(t ? "chatFilePreview.true" : "chatFilePreview.false") : e.format === "date" && typeof t == "string" ? L(e)?.text ?? z(t) : typeof t == "number" ? R(e, t) : t;
127
+ }, we = (e) => {
118
128
  if (!e) return "";
119
129
  if (e.formula) return `=${e.formula}`;
120
130
  let t = e.value;
@@ -122,25 +132,27 @@ var B = { class: "pk-spreadsheet-preview" }, ce = { class: "pk-spreadsheet-previ
122
132
  useGrouping: !1,
123
133
  maximumFractionDigits: 15,
124
134
  ...e.format === "percent" ? { style: "percent" } : {}
125
- }).format(t) : z(e);
126
- }, q = (e) => e ? `${e.width}px solid ${e.color}` : void 0, Ce = (e, t, n) => {
127
- let r = ie(e), i = e?.value, a = typeof i == "number" || !!e?.missing, o = {
135
+ }).format(t) : B(e);
136
+ }, Te = (e) => e ? `${e.width}px solid ${e.color}` : void 0, Ee = (e, t, n) => {
137
+ let r = se(e), i = e?.value, a = typeof i == "number" || e?.format === "date" || !!e?.missing, o = {
128
138
  textAlign: r?.align ?? (a ? "right" : typeof i == "boolean" || e?.format === "error" ? "center" : "left"),
129
139
  verticalAlign: r?.valign === "top" ? "top" : r?.valign === "middle" ? "middle" : "bottom",
130
140
  whiteSpace: r?.wrap ? "pre-wrap" : "nowrap"
131
141
  };
132
142
  r?.bold && (o.fontWeight = 700), r?.italic && (o.fontStyle = "italic");
133
143
  let s = [r?.underline ? "underline" : "", r?.strike ? "line-through" : ""].filter(Boolean).join(" ");
134
- 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) {
144
+ s && (o.textDecoration = s), r?.size && (o.fontSize = `${r.size}pt`);
145
+ let c = e ? L(e)?.color : void 0;
146
+ if ((c ?? r?.color) && (o.color = c ?? r?.color), r?.fill && (o.backgroundColor = r.fill), r?.indent) {
135
147
  let e = `${4 + r.indent * 9}px`;
136
148
  o.textAlign === "right" ? o.paddingRight = e : o.paddingLeft = e;
137
149
  }
138
- return o.borderTop = q(r?.borders?.top), o.borderRight = q(r?.borders?.right), o.borderBottom = q(r?.borders?.bottom), o.borderLeft = q(r?.borders?.left), Object.assign(o, J(t, n)), o;
139
- }, J = (e, t) => {
140
- let n = w.value?.frozen;
150
+ return o.borderTop = Te(r?.borders?.top), o.borderRight = Te(r?.borders?.right), o.borderBottom = Te(r?.borders?.bottom), o.borderLeft = Te(r?.borders?.left), Object.assign(o, De(t, n)), o;
151
+ }, De = (e, t) => {
152
+ let n = C.value?.frozen;
141
153
  if (!n) return {};
142
154
  let r = {};
143
- return e <= n.rows && (r.position = "sticky", r.top = `${G + N.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 = `${K + E.value.filter((e) => e.col < t).reduce((e, t) => e + t.width, 0)}px`, r.zIndex = e <= n.rows ? 3 : 2), r;
155
+ return e <= n.rows && (r.position = "sticky", r.top = `${Ce + P.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 = `${J + T.value.filter((e) => e.col < t).reduce((e, t) => e + t.width, 0)}px`, r.zIndex = e <= n.rows ? 3 : 2), r;
144
156
  }, Y = y({
145
157
  row: 1,
146
158
  col: 1
@@ -148,7 +160,7 @@ var B = { class: "pk-spreadsheet-preview" }, ce = { class: "pk-spreadsheet-previ
148
160
  row: 1,
149
161
  col: 1
150
162
  });
151
- u(w, () => {
163
+ u(C, () => {
152
164
  Y.value = {
153
165
  row: 1,
154
166
  col: 1
@@ -162,20 +174,20 @@ var B = { class: "pk-spreadsheet-preview" }, ce = { class: "pk-spreadsheet-previ
162
174
  r2: Math.max(Y.value.row, X.value.row),
163
175
  c1: Math.min(Y.value.col, X.value.col),
164
176
  c2: Math.max(Y.value.col, X.value.col)
165
- })), we = (e, t) => e >= Z.value.r1 && e <= Z.value.r2 && t >= Z.value.c1 && t <= Z.value.c2, Te = (e, t) => X.value.row === e && X.value.col === t, Ee = (e) => e >= Z.value.r1 && e <= Z.value.r2 ? `${Z.value.c1}:${Z.value.c2}:${X.value.row === e ? X.value.col : 0}` : "", De = y(!1), Q = (e, t, n) => {
177
+ })), Oe = (e, t) => e >= Z.value.r1 && e <= Z.value.r2 && t >= Z.value.c1 && t <= Z.value.c2, ke = (e, t) => X.value.row === e && X.value.col === t, Ae = (e) => e >= Z.value.r1 && e <= Z.value.r2 ? `${Z.value.c1}:${Z.value.c2}:${X.value.row === e ? X.value.col : 0}` : "", Q = y(!1), je = (e, t, n) => {
166
178
  f.value?.focus({ preventScroll: !0 }), X.value = {
167
179
  row: e,
168
180
  col: t
169
181
  }, n.shiftKey || (Y.value = {
170
182
  row: e,
171
183
  col: t
172
- }), De.value = !0;
173
- }, Oe = (e, t) => {
174
- De.value && (X.value = {
184
+ }), Q.value = !0;
185
+ }, Me = (e, t) => {
186
+ Q.value && (X.value = {
175
187
  row: e,
176
188
  col: t
177
189
  });
178
- }, ke = (e) => {
190
+ }, Ne = (e) => {
179
191
  let t = {
180
192
  ArrowUp: [-1, 0],
181
193
  ArrowDown: [1, 0],
@@ -186,7 +198,7 @@ var B = { class: "pk-spreadsheet-preview" }, ce = { class: "pk-spreadsheet-previ
186
198
  }[e.key];
187
199
  if (!t) return;
188
200
  e.preventDefault();
189
- let n = N.value.map((e) => e.row), r = E.value.map((e) => e.col), a = (e) => P.value.get(`${e.row},${e.col}`) ?? e, o = a(X.value), s = n.indexOf(X.value.row), c = r.indexOf(X.value.col), l = o;
201
+ let n = P.value.map((e) => e.row), r = T.value.map((e) => e.col), a = (e) => F.value.get(`${e.row},${e.col}`) ?? e, o = a(X.value), s = n.indexOf(X.value.row), c = r.indexOf(X.value.col), l = o;
190
202
  for (;;) {
191
203
  let e = Math.min(n.length - 1, Math.max(0, s + t[0])), i = Math.min(r.length - 1, Math.max(0, c + t[1]));
192
204
  if (e === s && i === c || (s = e, c = i, l = a({
@@ -198,38 +210,38 @@ var B = { class: "pk-spreadsheet-preview" }, ce = { class: "pk-spreadsheet-previ
198
210
  block: "nearest",
199
211
  inline: "nearest"
200
212
  }));
201
- }, Ae = b(() => F(X.value.row, X.value.col)), $ = b(() => {
213
+ }, Pe = b(() => I(X.value.row, X.value.col)), $ = b(() => {
202
214
  let { r1: e, r2: t, c1: n, c2: r } = Z.value;
203
215
  if (e === t && n === r) return;
204
216
  let i = 0, a = 0, o = 0, s;
205
217
  for (let c = e; c <= t; c++) for (let e = n; e <= r; e++) {
206
- let t = F(c, e);
218
+ let t = I(c, e);
207
219
  t && (t.value !== void 0 || t.missing) && (i++, typeof t.value == "number" && (a += t.value, o++, s ??= t));
208
220
  }
209
221
  if (i) return {
210
222
  count: i,
211
- sum: s ? L(s, a) : void 0,
212
- average: s ? L(s, a / o) : void 0
223
+ sum: s ? R(s, a) : void 0,
224
+ average: s ? R(s, a / o) : void 0
213
225
  };
214
- }), je = (e) => {
226
+ }), Fe = (e) => {
215
227
  c.value = Math.min(2, Math.max(.5, Math.round((c.value + e) * 10) / 10));
216
228
  };
217
229
  return (t, i) => {
218
- let o = oe;
219
- return M(), j("div", B, [
220
- v("div", ce, [
230
+ let o = le;
231
+ return j(), A("div", V, [
232
+ v("div", ue, [
221
233
  v("span", {
222
234
  class: "pk-spreadsheet-preview__ref",
223
- "aria-label": k(n)("chatFilePreview.cell")
224
- }, C(T(X.value.col)) + C(X.value.row), 9, le),
235
+ "aria-label": O(n)("chatFilePreview.cell")
236
+ }, S(w(X.value.col)) + S(X.value.row), 9, de),
225
237
  i[6] ||= v("span", {
226
238
  class: "pk-spreadsheet-preview__fx",
227
239
  "aria-hidden": "true"
228
240
  }, "fx", -1),
229
241
  v("output", {
230
242
  class: "pk-spreadsheet-preview__formula",
231
- "aria-label": k(n)("chatFilePreview.formulaBar")
232
- }, C(se(Ae.value)), 9, V)
243
+ "aria-label": O(n)("chatFilePreview.formulaBar")
244
+ }, S(we(Pe.value)), 9, fe)
233
245
  ]),
234
246
  v("div", {
235
247
  ref_key: "scrollEl",
@@ -237,101 +249,101 @@ var B = { class: "pk-spreadsheet-preview" }, ce = { class: "pk-spreadsheet-previ
237
249
  class: "pk-spreadsheet-preview__scroll",
238
250
  tabindex: "0",
239
251
  role: "grid",
240
- "aria-label": w.value?.name,
241
- onKeydown: ke,
242
- onMouseup: i[2] ||= (e) => De.value = !1,
243
- onMouseleave: i[3] ||= (e) => De.value = !1
244
- }, [w.value ? (M(), j("table", {
252
+ "aria-label": C.value?.name,
253
+ onKeydown: Ne,
254
+ onMouseup: i[2] ||= (e) => Q.value = !1,
255
+ onMouseleave: i[3] ||= (e) => Q.value = !1
256
+ }, [C.value ? (j(), A("table", {
245
257
  key: 0,
246
- class: r(["pk-spreadsheet-preview__grid", { "pk-spreadsheet-preview__grid--lines": w.value.gridlines }]),
258
+ class: r(["pk-spreadsheet-preview__grid", { "pk-spreadsheet-preview__grid--lines": C.value.gridlines }]),
247
259
  style: l({
248
260
  zoom: c.value,
249
- width: `${O.value}px`
261
+ width: `${D.value}px`
250
262
  })
251
263
  }, [
252
- v("colgroup", null, [v("col", { style: l({ width: `${K}px` }) }, null, 4), (M(!0), j(_, null, p(E.value, (e) => (M(), j("col", {
264
+ v("colgroup", null, [v("col", { style: l({ width: `${J}px` }) }, null, 4), (j(!0), A(_, null, p(T.value, (e) => (j(), A("col", {
253
265
  key: e.col,
254
266
  style: l({ width: `${e.width}px` })
255
267
  }, null, 4))), 128))]),
256
- v("thead", null, [v("tr", { style: l({ height: `${G}px` }) }, [i[7] ||= v("th", { class: "pk-spreadsheet-preview__corner" }, null, -1), (M(!0), j(_, null, p(E.value, (e) => (M(), j("th", {
268
+ v("thead", null, [v("tr", { style: l({ height: `${Ce}px` }) }, [i[7] ||= v("th", { class: "pk-spreadsheet-preview__corner" }, null, -1), (j(!0), A(_, null, p(T.value, (e) => (j(), A("th", {
257
269
  key: e.col,
258
270
  scope: "col",
259
271
  class: r(["pk-spreadsheet-preview__head", { "pk-spreadsheet-preview__head--current": e.col >= Z.value.c1 && e.col <= Z.value.c2 }])
260
- }, C(T(e.col)), 3))), 128))], 4)]),
261
- v("tbody", null, [(M(!0), j(_, null, p(N.value, (e, t, i, o) => {
272
+ }, S(w(e.col)), 3))), 128))], 4)]),
273
+ v("tbody", null, [(j(!0), A(_, null, p(P.value, (e, t, i, o) => {
262
274
  let s = [
263
275
  e,
264
- w.value,
265
- te.value,
266
- k(a),
267
- Ee(e.row)
276
+ C.value,
277
+ re.value,
278
+ O(a),
279
+ Ae(e.row)
268
280
  ];
269
- if (o && o.el && o.key === e.row && x(o, s)) return o;
270
- let c = (M(), j("tr", {
281
+ if (o && o.el && o.key === e.row && ee(o, s)) return o;
282
+ let c = (j(), A("tr", {
271
283
  key: e.row,
272
284
  style: l({ height: `${e.height}px` })
273
285
  }, [v("th", {
274
286
  scope: "row",
275
287
  class: r(["pk-spreadsheet-preview__row", { "pk-spreadsheet-preview__row--current": e.row >= Z.value.r1 && e.row <= Z.value.r2 }]),
276
- style: l(w.value.frozen && e.row <= w.value.frozen.rows ? {
277
- ...J(e.row, 0),
288
+ style: l(C.value.frozen && e.row <= C.value.frozen.rows ? {
289
+ ...De(e.row, 0),
278
290
  left: 0,
279
291
  zIndex: 4
280
292
  } : void 0)
281
- }, C(e.row), 7), (M(!0), j(_, null, p(E.value, (t) => (M(), j(_, { key: t.col }, [P.value.has(`${e.row},${t.col}`) ? D("", !0) : (M(), j("td", {
293
+ }, S(e.row), 7), (j(!0), A(_, null, p(T.value, (t) => (j(), A(_, { key: t.col }, [F.value.has(`${e.row},${t.col}`) ? E("", !0) : (j(), A("td", {
282
294
  key: 0,
283
- rowspan: I(e.row, t.col)?.rows,
284
- colspan: I(e.row, t.col)?.cols,
295
+ rowspan: oe(e.row, t.col)?.rows,
296
+ colspan: oe(e.row, t.col)?.cols,
285
297
  class: r(["pk-spreadsheet-preview__cell", {
286
- "pk-spreadsheet-preview__cell--range": we(e.row, t.col) && !Te(e.row, t.col),
287
- "pk-spreadsheet-preview__cell--missing": F(e.row, t.col)?.missing
298
+ "pk-spreadsheet-preview__cell--range": Oe(e.row, t.col) && !ke(e.row, t.col),
299
+ "pk-spreadsheet-preview__cell--missing": I(e.row, t.col)?.missing
288
300
  }]),
289
- style: l(Ce(F(e.row, t.col), e.row, t.col)),
290
- "data-focus": Te(e.row, t.col) ? "" : void 0,
291
- title: F(e.row, t.col)?.missing ? k(n)("chatFilePreview.missingValue") : void 0,
292
- onMousedown: g((n) => Q(e.row, t.col, n), ["prevent"]),
293
- onMouseenter: (n) => Oe(e.row, t.col)
294
- }, C(z(F(e.row, t.col))), 47, de))], 64))), 128))], 4));
301
+ style: l(Ee(I(e.row, t.col), e.row, t.col)),
302
+ "data-focus": ke(e.row, t.col) ? "" : void 0,
303
+ title: I(e.row, t.col)?.missing ? O(n)("chatFilePreview.missingValue") : void 0,
304
+ onMousedown: g((n) => je(e.row, t.col, n), ["prevent"]),
305
+ onMouseenter: (n) => Me(e.row, t.col)
306
+ }, S(B(I(e.row, t.col))), 47, pe))], 64))), 128))], 4));
295
307
  return c.memo = s, c;
296
308
  }, i, 0), 128))])
297
- ], 6)) : D("", !0), w.value && (w.value.moreRows || w.value.moreColumns) ? (M(), j("p", fe, [w.value.moreRows ? (M(), j(_, { key: 0 }, [A(C(k(n)("chatFilePreview.moreRows", w.value.moreRows)), 1)], 64)) : D("", !0), w.value.moreColumns ? (M(), j(_, { key: 1 }, [A(C(k(n)("chatFilePreview.moreColumns", w.value.moreColumns)), 1)], 64)) : D("", !0)])) : D("", !0)], 40, ue),
309
+ ], 6)) : E("", !0), C.value && (C.value.moreRows || C.value.moreColumns) ? (j(), A("p", U, [C.value.moreRows ? (j(), A(_, { key: 0 }, [k(S(O(n)("chatFilePreview.moreRows", C.value.moreRows)), 1)], 64)) : E("", !0), C.value.moreColumns ? (j(), A(_, { key: 1 }, [k(S(O(n)("chatFilePreview.moreColumns", C.value.moreColumns)), 1)], 64)) : E("", !0)])) : E("", !0)], 40, H),
298
310
  v("nav", {
299
311
  class: "pk-spreadsheet-preview__sheets",
300
- "aria-label": k(n)("chatFilePreview.sheets")
301
- }, [(M(!0), j(_, null, p(e.preview.sheets, (e, t) => (M(), j("button", {
312
+ "aria-label": O(n)("chatFilePreview.sheets")
313
+ }, [(j(!0), A(_, null, p(e.preview.sheets, (e, t) => (j(), A("button", {
302
314
  key: e.name,
303
315
  type: "button",
304
316
  class: "pk-spreadsheet-preview__sheet",
305
317
  "aria-current": t === s.value ? "page" : void 0,
306
318
  onClick: (e) => s.value = t
307
- }, C(e.name), 9, me))), 128))], 8, pe),
308
- v("div", H, [v("p", he, [e.preview.staleFormulas ? (M(), j("span", {
319
+ }, S(e.name), 9, he))), 128))], 8, me),
320
+ v("div", ge, [v("p", _e, [e.preview.staleFormulas ? (j(), A("span", {
309
321
  key: 0,
310
322
  class: "pk-spreadsheet-preview__note",
311
- title: k(n)("chatFilePreview.staleFormulas")
312
- }, C(k(n)("chatFilePreview.staleFormulas")), 9, ge)) : e.preview.computedFormulas ? (M(), j("span", {
323
+ title: O(n)("chatFilePreview.staleFormulas")
324
+ }, S(O(n)("chatFilePreview.staleFormulas")), 9, ve)) : e.preview.computedFormulas ? (j(), A("span", {
313
325
  key: 1,
314
326
  class: "pk-spreadsheet-preview__note",
315
- title: k(n)("chatFilePreview.computedFormulas")
316
- }, C(k(n)("chatFilePreview.computedFormulas")), 9, _e)) : D("", !0), $.value ? (M(), j("span", ve, [
317
- $.value.average ? (M(), j("span", ye, C(k(n)("chatFilePreview.average")) + " " + C($.value.average), 1)) : D("", !0),
318
- v("span", null, C(k(n)("chatFilePreview.count")) + " " + C($.value.count), 1),
319
- $.value.sum ? (M(), j("span", be, C(k(n)("chatFilePreview.sum")) + " " + C($.value.sum), 1)) : D("", !0)
320
- ])) : D("", !0)]), v("div", xe, [
327
+ title: O(n)("chatFilePreview.computedFormulas")
328
+ }, S(O(n)("chatFilePreview.computedFormulas")), 9, ye)) : E("", !0), $.value ? (j(), A("span", be, [
329
+ $.value.average ? (j(), A("span", W, S(O(n)("chatFilePreview.average")) + " " + S($.value.average), 1)) : E("", !0),
330
+ v("span", null, S(O(n)("chatFilePreview.count")) + " " + S($.value.count), 1),
331
+ $.value.sum ? (j(), A("span", xe, S(O(n)("chatFilePreview.sum")) + " " + S($.value.sum), 1)) : E("", !0)
332
+ ])) : E("", !0)]), v("div", G, [
321
333
  d(o, {
322
334
  modifiers: "action-quiet",
323
335
  icon: "ri:subtract-line",
324
- "aria-label": k(n)("chatFilePreview.zoomOut"),
336
+ "aria-label": O(n)("chatFilePreview.zoomOut"),
325
337
  disabled: c.value <= .5,
326
- onClick: i[4] ||= (e) => je(-.1)
338
+ onClick: i[4] ||= (e) => Fe(-.1)
327
339
  }, null, 8, ["aria-label", "disabled"]),
328
- v("span", U, C(Math.round(c.value * 100)) + "% ", 1),
340
+ v("span", K, S(Math.round(c.value * 100)) + "% ", 1),
329
341
  d(o, {
330
342
  modifiers: "action-quiet",
331
343
  icon: "ri:add-line",
332
- "aria-label": k(n)("chatFilePreview.zoomIn"),
344
+ "aria-label": O(n)("chatFilePreview.zoomIn"),
333
345
  disabled: c.value >= 2,
334
- onClick: i[5] ||= (e) => je(.1)
346
+ onClick: i[5] ||= (e) => Fe(.1)
335
347
  }, null, 8, ["aria-label", "disabled"])
336
348
  ])])
337
349
  ]);
@@ -339,11 +351,11 @@ var B = { class: "pk-spreadsheet-preview" }, ce = { class: "pk-spreadsheet-previ
339
351
  }
340
352
  }), [["styles", [".pk-spreadsheet-preview{--pk-spreadsheet-green:#217346;--pk-spreadsheet-green-head:#217346;flex-direction:column;flex:1;min-height:0;display:flex}.pk-spreadsheet-preview__bar{min-height:var(--spacing-40);border-bottom:var(--border) solid var(--color-surface-3);background-color:var(--color-surface);font-size:var(--text-14);align-items:stretch;display:flex}.pk-spreadsheet-preview__ref{width:var(--spacing-96);padding:0 var(--spacing-12);box-sizing:border-box;border-right:var(--border) solid var(--color-surface-3);font-variant-numeric:tabular-nums;flex-shrink:0;align-items:center;display:flex}.pk-spreadsheet-preview__fx{width:var(--spacing-40);border-right:var(--border) solid var(--color-surface-3);color:var(--color-word-3);flex-shrink:0;justify-content:center;align-items:center;font-family:Georgia,serif;font-style:italic;display:flex}.pk-spreadsheet-preview__formula{min-width:0;padding:0 var(--spacing-12);text-overflow:ellipsis;white-space:nowrap;flex:1;align-items:center;display:flex;overflow:hidden}.pk-spreadsheet-preview__scroll{cursor:cell;background-color:#fff;outline:none;flex:1;min-height:0;overflow:auto}.pk-spreadsheet-preview__scroll:focus-visible{box-shadow:inset 0 0 0 var(--spacing-2) var(--input-focus-color)}.pk-spreadsheet-preview__grid{border-collapse:collapse;table-layout:fixed;color:#000;-webkit-user-select:none;user-select:none;font-family:Calibri,Carlito,Segoe UI,Arial,sans-serif;font-size:11pt}.pk-spreadsheet-preview__grid td{max-width:0;padding:0 var(--spacing-4);text-overflow:clip;background-color:#fff;line-height:1.2;overflow:hidden}.pk-spreadsheet-preview__grid--lines td{border:var(--border) solid #e1e1e1}.pk-spreadsheet-preview__corner,.pk-spreadsheet-preview__head,.pk-spreadsheet-preview__row{z-index:1;border:var(--border) solid var(--color-surface-3);background-color:var(--color-surface-1);color:var(--color-word-3);font-family:var(--font-family-sans);font-size:var(--text-12);font-weight:var(--font-normal);text-align:center;position:sticky}.pk-spreadsheet-preview__corner,.pk-spreadsheet-preview__head{padding:var(--spacing-4) var(--spacing-4) var(--spacing-2);vertical-align:middle;line-height:1;top:0}.pk-spreadsheet-preview__row{vertical-align:middle}.pk-spreadsheet-preview__corner{z-index:5;left:0}.pk-spreadsheet-preview__row{padding:0 var(--spacing-4);font-variant-numeric:tabular-nums;left:0}.pk-spreadsheet-preview__head--current{background-color:var(--color-surface-2);box-shadow:inset 0 calc(var(--spacing-2) * -1) 0 var(--pk-spreadsheet-green-head);color:var(--pk-spreadsheet-green-head);font-weight:var(--font-medium)}.pk-spreadsheet-preview__row--current{background-color:var(--color-surface-2);box-shadow:inset calc(var(--spacing-2) * -1) 0 0 var(--pk-spreadsheet-green-head);color:var(--pk-spreadsheet-green-head);font-weight:var(--font-medium)}.pk-spreadsheet-preview__cell[data-focus]{outline:var(--spacing-2) solid var(--pk-spreadsheet-green);outline-offset:calc(var(--spacing-2) * -1)}.pk-spreadsheet-preview__cell--range{box-shadow:inset 0 0 0 100vmax #1f1d2b14}.pk-spreadsheet-preview__cell--missing{color:#6b6880}.pk-spreadsheet-preview__more{padding:var(--spacing-8) var(--spacing-12);color:#6b6880;font-size:var(--text-12);margin:0;position:sticky;left:0}.pk-spreadsheet-preview__sheets{min-height:var(--spacing-32);padding-left:var(--spacing-40);border-top:var(--border) solid var(--color-surface-3);background-color:var(--color-surface-1);flex-shrink:0;display:flex;overflow-x:auto}@media (pointer:coarse){.pk-spreadsheet-preview__sheets{min-height:var(--spacing-40)}}.pk-spreadsheet-preview__status{min-height:var(--spacing-40);border-top:var(--border) solid var(--color-surface-3);background-color:var(--color-surface-1);font-size:var(--text-12);flex-shrink:0;align-items:center;display:flex}.pk-spreadsheet-preview__sheet{padding:0 var(--spacing-16);border:0;border-right:var(--border) solid var(--color-surface-3);color:var(--color-word-2);font:inherit;font-size:var(--text-12);white-space:nowrap;cursor:pointer;background:0 0;flex-shrink:0}.pk-spreadsheet-preview__sheet:first-child{border-left:var(--border) solid var(--color-surface-3)}.pk-spreadsheet-preview__sheet:hover{background-color:var(--color-surface-2)}.pk-spreadsheet-preview__sheet[aria-current=page]{background-color:var(--color-surface);box-shadow:inset 0 calc(var(--spacing-2) * -1) 0 var(--pk-spreadsheet-green-head);color:var(--pk-spreadsheet-green-head);font-weight:var(--font-semibold)}.pk-spreadsheet-preview__info{align-items:center;gap:var(--spacing-16);min-width:0;padding:0 var(--spacing-12);color:var(--color-word-2);font-variant-numeric:tabular-nums;white-space:nowrap;flex:1;margin:0;display:flex;overflow:hidden}.pk-spreadsheet-preview__note{min-width:0;color:var(--color-word-3);text-overflow:ellipsis;overflow:hidden}.pk-spreadsheet-preview__stats{gap:var(--spacing-12);flex-shrink:0;margin-left:auto;display:flex}@container (width<26rem){.pk-spreadsheet-preview__average{display:none}}.pk-spreadsheet-preview__zoom{align-items:center;gap:var(--spacing-2);padding-right:var(--spacing-8);flex-shrink:0;display:flex}.pk-spreadsheet-preview__percent{min-width:var(--spacing-40);font-variant-numeric:tabular-nums;text-align:center}@media (prefers-color-scheme:dark){:where(:host,:root,.theme):not(.theme--light) .pk-spreadsheet-preview{--pk-spreadsheet-green-head:#5fbf8f}}:where(.theme.theme--dark) .pk-spreadsheet-preview{--pk-spreadsheet-green-head:#5fbf8f}"]]]);
341
353
  // ../../packages/components/src/chat/PkWordPreviewRuns.vue?vue&type=script&setup=true&lang.ts
342
- S(), f(), w();
343
- var Ce = ["src"], J = {
354
+ x(), f(), C();
355
+ var Te = ["src"], Ee = {
344
356
  key: 1,
345
357
  class: "pk-word-preview__image"
346
- }, Y = ["title"], X = ["title"], Z = /* @__PURE__ */ O({
358
+ }, De = ["title"], Y = ["title"], X = /* @__PURE__ */ D({
347
359
  __name: "PkWordPreviewRuns",
348
360
  props: {
349
361
  runs: { type: Array },
@@ -352,13 +364,13 @@ var Ce = ["src"], J = {
352
364
  numbers: { type: Object }
353
365
  },
354
366
  setup(e) {
355
- let n = e, { t: i } = ee({ useScope: "global" }), a = t(ie, void 0), o = (e) => e.picture ? I(a?.value, e.picture.ref) : void 0, s = (e) => n.page ? P(e) : "inline", c = (e) => {
367
+ let n = e, { t: i } = te({ useScope: "global" }), a = t(se, void 0), o = (e) => e.picture ? oe(a?.value, e.picture.ref) : void 0, s = (e) => n.page ? F(e) : "inline", c = (e) => {
356
368
  let t = {
357
369
  width: `${e.width}pt`,
358
370
  aspectRatio: `${e.width} / ${e.height}`
359
371
  }, r = e.anchor, i = n.page;
360
372
  if (!r || !i) return t;
361
- let a = r.xFrom === "page" ? r.x - i.margins.left : r.x, o = P(e);
373
+ let a = r.xFrom === "page" ? r.x - i.margins.left : r.x, o = F(e);
362
374
  if (o === "around") {
363
375
  let n = i.width - i.margins.left - i.margins.right, o = a + e.width / 2 < n / 2;
364
376
  return {
@@ -380,11 +392,11 @@ var Ce = ["src"], J = {
380
392
  zIndex: r.wrap === "behind" ? -1 : 1
381
393
  };
382
394
  }, u = (e) => e.field && n.numbers ? String(n.numbers[e.field]) : e.text, d = b(() => {
383
- let e = L(n.runs, n.mode ?? "markup"), t = (e) => !!e.picture && !!n.page && ["around", "block"].includes(P(e.picture));
395
+ let e = L(n.runs, n.mode ?? "markup"), t = (e) => !!e.picture && !!n.page && ["around", "block"].includes(F(e.picture));
384
396
  return [...e.filter(t), ...e.filter((e) => !t(e))];
385
397
  }), f = b(() => !n.mode || n.mode === "markup"), m = (e) => {
386
398
  let t = {};
387
- e.font && (t.fontFamily = re(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");
399
+ e.font && (t.fontFamily = ae(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");
388
400
  let n = [e.underline ? "underline" : "", e.strike ? "line-through" : ""].filter(Boolean).join(" ");
389
401
  return n && (t.textDecoration = n), e.caps && (t.textTransform = "uppercase"), e.vertAlign && (t.verticalAlign = e.vertAlign, t.fontSize = `${(e.size ?? 11) * .65}pt`), t;
390
402
  }, h = (e) => {
@@ -394,31 +406,31 @@ var Ce = ["src"], J = {
394
406
  textDecoration: [...n].join(" ")
395
407
  };
396
408
  }, g = (e) => e.author ? i("chatFilePreview.revisionBy", { author: e.author }) : void 0;
397
- return (e, t) => (M(!0), j(_, null, p(d.value, (e, t) => (M(), j(_, { key: t }, [e.image ? (M(), j(_, { key: 0 }, [e.picture && o(e) ? (M(), j(_, { key: 0 }, [s(e.picture) === "page" ? D("", !0) : (M(), j("img", {
409
+ return (e, t) => (j(!0), A(_, null, p(d.value, (e, t) => (j(), A(_, { key: t }, [e.image ? (j(), A(_, { key: 0 }, [e.picture && o(e) ? (j(), A(_, { key: 0 }, [s(e.picture) === "page" ? E("", !0) : (j(), A("img", {
398
410
  key: 0,
399
411
  class: r(["pk-word-preview__picture", `pk-word-preview__picture--${s(e.picture)}`]),
400
412
  style: l(c(e.picture)),
401
413
  src: o(e),
402
414
  alt: ""
403
- }, null, 14, Ce))], 64)) : (M(), j("span", J, C(k(i)("chatFilePreview.image")), 1))], 64)) : f.value && e.change === "deleted" ? (M(), j("del", {
415
+ }, null, 14, Te))], 64)) : (j(), A("span", Ee, S(O(i)("chatFilePreview.image")), 1))], 64)) : f.value && e.change === "deleted" ? (j(), A("del", {
404
416
  key: 1,
405
417
  class: "pk-word-preview__removed",
406
418
  style: l(h(e)),
407
419
  title: g(e)
408
- }, C(u(e)), 13, Y)) : f.value && e.change === "inserted" ? (M(), j("ins", {
420
+ }, S(u(e)), 13, De)) : f.value && e.change === "inserted" ? (j(), A("ins", {
409
421
  key: 2,
410
422
  class: "pk-word-preview__added",
411
423
  style: l(h(e)),
412
424
  title: g(e)
413
- }, C(u(e)), 13, X)) : (M(), j("span", {
425
+ }, S(u(e)), 13, Y)) : (j(), A("span", {
414
426
  key: 3,
415
427
  style: l(m(e))
416
- }, C(u(e)), 5))], 64))), 128));
428
+ }, S(u(e)), 5))], 64))), 128));
417
429
  }
418
430
  });
419
431
  // ../../packages/components/src/chat/PkWordPreviewBlock.vue?vue&type=script&setup=true&lang.ts
420
- S(), f();
421
- var we = { key: 0 }, Te = ["colspan"], Ee = ["role", "aria-level"], De = { key: 1 }, Q = /* @__PURE__ */ O({
432
+ x(), f();
433
+ var Z = { key: 0 }, Oe = ["colspan"], ke = ["role", "aria-level"], Ae = { key: 1 }, Q = /* @__PURE__ */ D({
422
434
  __name: "PkWordPreviewBlock",
423
435
  props: {
424
436
  block: { type: null },
@@ -451,17 +463,17 @@ var we = { key: 0 }, Te = ["colspan"], Ee = ["role", "aria-level"], De = { key:
451
463
  let e = t.block.widths ?? [], n = e.reduce((e, t) => e + t, 0);
452
464
  return n ? e.map((e) => `${e / n * 100}%`) : [];
453
465
  }), c = b(() => t.mode === "markup" && !!o.value?.some((e) => e.runs.some((e) => e.change)));
454
- return (t, u) => e.block.kind === "table" && o.value ? (M(), j("table", {
466
+ return (t, u) => e.block.kind === "table" && o.value ? (j(), A("table", {
455
467
  key: 0,
456
468
  class: r(["pk-word-preview__table", {
457
469
  "pk-word-preview__table--lines": e.block.borders,
458
470
  "pk-word-preview__table--next": e.row !== 0,
459
471
  "pk-word-preview__changed": c.value
460
472
  }])
461
- }, [s.value.length ? (M(), j("colgroup", we, [(M(!0), j(_, null, p(s.value, (e, t) => (M(), j("col", {
473
+ }, [s.value.length ? (j(), A("colgroup", Z, [(j(!0), A(_, null, p(s.value, (e, t) => (j(), A("col", {
462
474
  key: t,
463
475
  style: l({ width: e })
464
- }, null, 4))), 128))])) : D("", !0), v("tbody", null, [v("tr", null, [(M(!0), j(_, null, p(o.value, (t, n) => (M(), j("td", {
476
+ }, null, 4))), 128))])) : E("", !0), v("tbody", null, [v("tr", null, [(j(!0), A(_, null, p(o.value, (t, n) => (j(), A("td", {
465
477
  key: n,
466
478
  colspan: t.span,
467
479
  style: l({
@@ -469,7 +481,7 @@ var we = { key: 0 }, Te = ["colspan"], Ee = ["role", "aria-level"], De = { key:
469
481
  textAlign: t.align,
470
482
  fontSize: t.size ? `${t.size}pt` : void 0
471
483
  })
472
- }, [d(Z, {
484
+ }, [d(X, {
473
485
  runs: t.runs,
474
486
  mode: e.mode,
475
487
  numbers: e.numbers
@@ -477,19 +489,19 @@ var we = { key: 0 }, Te = ["colspan"], Ee = ["role", "aria-level"], De = { key:
477
489
  "runs",
478
490
  "mode",
479
491
  "numbers"
480
- ])], 12, Te))), 128))])])], 2)) : e.block.kind === "table" ? D("", !0) : (M(), j("div", {
492
+ ])], 12, Oe))), 128))])])], 2)) : e.block.kind === "table" ? E("", !0) : (j(), A("div", {
481
493
  key: 1,
482
494
  class: r(["pk-word-preview__block", { "pk-word-preview__changed": a.value }]),
483
495
  role: e.block.kind === "heading" ? "heading" : void 0,
484
496
  "aria-level": e.block.kind === "heading" ? Math.max(1, e.block.level) : void 0,
485
497
  style: l(n.value)
486
498
  }, [
487
- e.block.label ? (M(), j("span", {
499
+ e.block.label ? (j(), A("span", {
488
500
  key: 0,
489
501
  class: "pk-word-preview__label",
490
502
  style: l(i.value)
491
- }, C(e.block.label), 5)) : D("", !0),
492
- d(Z, {
503
+ }, S(e.block.label), 5)) : E("", !0),
504
+ d(X, {
493
505
  runs: e.block.runs,
494
506
  mode: e.mode,
495
507
  page: e.page,
@@ -500,13 +512,13 @@ var we = { key: 0 }, Te = ["colspan"], Ee = ["role", "aria-level"], De = { key:
500
512
  "page",
501
513
  "numbers"
502
514
  ]),
503
- !e.block.label && !e.block.runs.length ? (M(), j("br", De)) : D("", !0)
504
- ], 14, Ee));
515
+ !e.block.label && !e.block.runs.length ? (j(), A("br", Ae)) : E("", !0)
516
+ ], 14, ke));
505
517
  }
506
518
  });
507
519
  // ../../packages/components/src/chat/PkWordPreviewPart.vue?vue&type=script&setup=true&lang.ts
508
- S(), f();
509
- var Oe = { class: "pk-word-preview__part" }, ke = ["src"], Ae = /* @__PURE__ */ O({
520
+ x(), f();
521
+ var je = { class: "pk-word-preview__part" }, Me = ["src"], Ne = /* @__PURE__ */ D({
510
522
  __name: "PkWordPreviewPart",
511
523
  props: {
512
524
  blocks: { type: Array },
@@ -516,11 +528,11 @@ var Oe = { class: "pk-word-preview__part" }, ke = ["src"], Ae = /* @__PURE__ */
516
528
  numbers: { type: Object }
517
529
  },
518
530
  setup(e) {
519
- let n = e, r = t(ie, void 0), i = b(() => N(n.blocks, n.mode)), a = b(() => ne(n.blocks, n.mode).flatMap((e) => {
520
- let t = I(r?.value, e.ref);
531
+ let n = e, r = t(se, void 0), i = b(() => P(n.blocks, n.mode)), a = b(() => ie(n.blocks, n.mode).flatMap((e) => {
532
+ let t = oe(r?.value, e.ref);
521
533
  return t ? [{
522
534
  src: t,
523
- css: F(e, n.section.page)
535
+ css: I(e, n.section.page)
524
536
  }] : [];
525
537
  })), o = b(() => {
526
538
  let { margins: e } = n.section.page;
@@ -530,10 +542,10 @@ var Oe = { class: "pk-word-preview__part" }, ke = ["src"], Ae = /* @__PURE__ */
530
542
  ...n.where === "header" ? { top: `${n.section.headerDistance}pt` } : { bottom: `${n.section.footerDistance}pt` }
531
543
  };
532
544
  });
533
- return (t, n) => (M(), j("div", Oe, [v("div", {
545
+ return (t, n) => (j(), A("div", je, [v("div", {
534
546
  class: "pk-word-preview__part-flow",
535
547
  style: l(o.value)
536
- }, [(M(!0), j(_, null, p(i.value, (t) => (M(), h(Q, {
548
+ }, [(j(!0), A(_, null, p(i.value, (t) => (j(), h(Q, {
537
549
  key: t.key,
538
550
  block: e.blocks[t.block],
539
551
  row: t.row,
@@ -546,48 +558,48 @@ var Oe = { class: "pk-word-preview__part" }, ke = ["src"], Ae = /* @__PURE__ */
546
558
  "mode",
547
559
  "page",
548
560
  "numbers"
549
- ]))), 128))], 4), (M(!0), j(_, null, p(a.value, (e, t) => (M(), j("img", {
561
+ ]))), 128))], 4), (j(!0), A(_, null, p(a.value, (e, t) => (j(), A("img", {
550
562
  key: t,
551
563
  class: "pk-word-preview__float",
552
564
  style: l(e.css),
553
565
  src: e.src,
554
566
  alt: ""
555
- }, null, 12, ke))), 128))]));
567
+ }, null, 12, Me))), 128))]));
556
568
  }
557
569
  });
558
570
  // ../../packages/components/src/chat/PkWordPreview.vue?vue&type=script&setup=true&lang.ts
559
- S(), w(), f();
560
- var $ = ["aria-label"], je = {
571
+ x(), C(), f();
572
+ var Pe = ["aria-label"], $ = {
561
573
  class: "pk-word-preview__tabs",
562
574
  role: "tablist"
563
- }, Me = ["aria-selected"], Ne = ["aria-selected"], Pe = {
575
+ }, Fe = ["aria-selected"], Ie = ["aria-selected"], Le = {
564
576
  key: 0,
565
577
  class: "pk-word-preview__list"
566
- }, Fe = ["aria-current", "onClick"], Ie = { class: "pk-word-preview__entry-text" }, Le = {
578
+ }, Re = ["aria-current", "onClick"], ze = { class: "pk-word-preview__entry-text" }, Be = {
567
579
  key: 0,
568
580
  class: "u-dot"
569
- }, Re = {
581
+ }, Ve = {
570
582
  key: 0,
571
583
  class: "pk-word-preview__none"
572
- }, ze = {
584
+ }, He = {
573
585
  key: 1,
574
586
  class: "pk-word-preview__list"
575
- }, Be = ["onClick"], Ve = {
587
+ }, Ue = ["onClick"], We = {
576
588
  key: 0,
577
589
  class: "pk-word-preview__removed"
578
- }, He = {
590
+ }, Ge = {
579
591
  key: 1,
580
592
  class: "pk-word-preview__added"
581
- }, Ue = { class: "pk-word-preview__main" }, We = ["aria-label"], Ge = ["src"], Ke = {
593
+ }, Ke = { class: "pk-word-preview__main" }, qe = ["aria-label"], Je = ["src"], Ye = {
582
594
  key: 2,
583
595
  class: "pk-word-preview__truncated"
584
- }, qe = { class: "pk-word-preview__status" }, Je = {
596
+ }, Xe = { class: "pk-word-preview__status" }, Ze = {
585
597
  key: 0,
586
598
  class: "pk-word-preview__count"
587
- }, Ye = { class: "pk-word-preview__count" }, Xe = {
599
+ }, Qe = { class: "pk-word-preview__count" }, $e = {
588
600
  key: 1,
589
601
  class: "pk-word-preview__legend"
590
- }, Ze = ["title"], Qe = { class: "pk-word-preview__removed" }, $e = { class: "pk-word-preview__added" }, et = { class: "pk-word-preview__percent" }, tt = ["data-part"], nt = 96 / 72, rt = /*#__PURE__*/ z(/* @__PURE__ */ O({
602
+ }, et = ["title"], tt = { class: "pk-word-preview__removed" }, nt = { class: "pk-word-preview__added" }, rt = { class: "pk-word-preview__percent" }, it = ["data-part"], at = 96 / 72, ot = /*#__PURE__*/ z(/* @__PURE__ */ D({
591
603
  __name: "PkWordPreview",
592
604
  props: /*@__PURE__*/ c({
593
605
  preview: { type: null },
@@ -603,64 +615,74 @@ var $ = ["aria-label"], je = {
603
615
  }),
604
616
  emits: ["update:fit", "update:zoom"],
605
617
  setup(e) {
606
- let t = e, { t: c } = ee({ useScope: "global" });
607
- n(ie, b(() => t.preview.images));
608
- let f = (e) => L(e, t.mode), g = b(() => N(t.preview.blocks, t.mode)), x = m("rootEl"), S = m("scrollEl"), w = m("measureEl"), { width: T } = ae(x), { width: E } = ae(S), O = b(() => T.value === 0 || T.value >= 640), A = b(() => T.value >= 1e3), P = b(() => t.preview.sections?.length ? t.preview.sections : [{
618
+ let t = e, { t: c } = te({ useScope: "global" });
619
+ n(se, b(() => t.preview.images));
620
+ let f = (e) => L(e, t.mode), g = b(() => P(t.preview.blocks, t.mode)), ee = m("rootEl"), x = m("scrollEl"), C = m("measureEl"), { width: w } = ce(ee), { width: T } = ce(x), D = b(() => w.value === 0 || w.value >= 640), k = b(() => w.value >= 1e3), M = b(() => t.preview.sections?.length ? t.preview.sections : [{
609
621
  page: t.preview.page,
610
622
  headerDistance: 0,
611
623
  footerDistance: 0,
612
624
  headers: {},
613
625
  footers: {}
614
- }]), R = b(() => P.value[0].page), z = b(() => ({
615
- fontFamily: re(t.preview.defaults.font),
626
+ }]), N = b(() => M.value[0].page), ne = b(() => ({
627
+ fontFamily: ae(t.preview.defaults.font),
616
628
  fontSize: `${t.preview.defaults.size}pt`,
617
629
  color: t.preview.defaults.color ?? "#000000",
618
- "--pk-word-line": te(t.preview.defaults.font),
630
+ "--pk-word-line": re(t.preview.defaults.font),
619
631
  "--pk-word-size": `${t.preview.defaults.size}pt`
620
- })), se = b(() => ({
621
- ...z.value,
622
- width: `${R.value.width - R.value.margins.left - R.value.margins.right}pt`
623
- })), B = y([]), ce = y({}), le = async () => {
632
+ })), F = b(() => ({
633
+ ...ne.value,
634
+ width: `${N.value.width - N.value.margins.left - N.value.margins.right}pt`
635
+ })), R = y([]), z = y({}), B = async () => {
624
636
  await i();
625
- let e = w.value?.querySelectorAll("[data-item]");
626
- B.value = [...e ?? []].map((e) => e.getBoundingClientRect().height);
627
- let t = w.value?.querySelectorAll("[data-part]");
628
- ce.value = Object.fromEntries([...t ?? []].map((e) => [e.dataset.part ?? "", e.getBoundingClientRect().height]));
637
+ let e = C.value?.querySelectorAll("[data-item]");
638
+ R.value = [...e ?? []].map((e) => e.getBoundingClientRect().height);
639
+ let t = C.value?.querySelectorAll("[data-part]");
640
+ z.value = Object.fromEntries([...t ?? []].map((e) => [e.dataset.part ?? "", e.getBoundingClientRect().height]));
629
641
  };
630
642
  u([
631
643
  g,
632
- O,
644
+ D,
633
645
  () => t.preview.parts
634
- ], le, { flush: "post" }), s(() => {
635
- le(), document.fonts?.ready.then(le);
646
+ ], B, { flush: "post" }), s(() => {
647
+ B(), document.fonts?.ready.then(B);
636
648
  });
637
649
  let V = b(() => {
638
- if (!O.value || B.value.length !== g.value.length) return [{
650
+ if (!D.value || R.value.length !== g.value.length) return [{
639
651
  items: g.value.map((e, t) => t),
640
652
  section: 0,
641
653
  number: 1,
642
- top: R.value.margins.top,
643
- bottom: R.value.margins.bottom
654
+ top: N.value.margins.top,
655
+ bottom: N.value.margins.bottom
644
656
  }];
645
657
  let e = [], n = 0, r = !0, i = 0, a, o = () => {
646
- let o = P.value[n], s = r && o.pageStart !== void 0 ? o.pageStart : (a ?? e[e.length - 1]?.number ?? 0) + 1;
647
- a = void 0;
648
- 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 ? (ce.value[e] ?? 0) / nt : 0;
649
- e.push({
658
+ let t = M.value[n];
659
+ return r && t.pageStart !== void 0 ? t.pageStart : (a ?? e[e.length - 1]?.number ?? 0) + 1;
660
+ }, s = (e) => {
661
+ let i = M.value[n], a = (n) => r && i.titlePage ? n.first : t.preview.evenAndOddHeaders && e % 2 == 0 ? n.even : n.default, o = a(i.headers), s = a(i.footers), c = (e) => e ? (z.value[e] ?? 0) / at : 0;
662
+ return {
663
+ header: o,
664
+ footer: s,
665
+ top: Math.max(i.page.margins.top, o ? i.headerDistance + c(o) : 0),
666
+ bottom: Math.max(i.page.margins.bottom, s ? i.footerDistance + c(s) : 0)
667
+ };
668
+ }, c = () => {
669
+ let t = o();
670
+ a = void 0, e.push({
650
671
  items: [],
651
672
  section: n,
652
- number: s,
653
- header: l,
654
- footer: u,
655
- top: Math.max(o.page.margins.top, l ? o.headerDistance + d(l) : 0),
656
- bottom: Math.max(o.page.margins.bottom, u ? o.footerDistance + d(u) : 0)
673
+ number: t,
674
+ ...s(t)
657
675
  }), r = !1, i = 0;
658
676
  };
659
- return g.value.forEach((t, s) => {
660
- t.section !== void 0 && t.section !== n && P.value[t.section] && (n = t.section, r = t.breakBefore || !e.length, r || (a = P.value[n].pageStart));
661
- let c = e[e.length - 1], l = c && P.value[c.section].page, u = l ? (l.height - c.top - c.bottom) * nt : 0;
662
- (!c || c.items.length && (t.breakBefore || i + B.value[s] > u)) && o(), e[e.length - 1].items.push(s), i += B.value[s];
663
- }), e.length || o(), e;
677
+ return g.value.forEach((t, l) => {
678
+ t.section !== void 0 && t.section !== n && M.value[t.section] && (n = t.section, r = t.breakBefore || !e.length, r || (a = M.value[n].pageStart));
679
+ let u = e[e.length - 1], d = u && M.value[u.section].page, f = d ? (d.height - u.top - u.bottom) * at : 0, p = R.value[l];
680
+ for (let e = l; g.value[e]?.keepNext && e + 1 < g.value.length && !g.value[e + 1].breakBefore; e++) p += R.value[e + 1];
681
+ (!u || u.items.length && (t.breakBefore || i + R.value[l] > f || i + p > f && p <= (() => {
682
+ let e = s(o());
683
+ return (M.value[n].page.height - e.top - e.bottom) * at;
684
+ })())) && c(), e[e.length - 1].items.push(l), i += R.value[l];
685
+ }), e.length || c(), e;
664
686
  }), ue = b(() => {
665
687
  let e = /* @__PURE__ */ new Map();
666
688
  for (let t of V.value) e.set(t.section, (e.get(t.section) ?? 0) + 1);
@@ -670,128 +692,128 @@ var $ = ["aria-label"], je = {
670
692
  sectionPages: e.get(t.section) ?? 1
671
693
  }));
672
694
  }), de = (e) => {
673
- let t = P.value[e.section].page;
695
+ let t = M.value[e.section].page;
674
696
  return {
675
- ...z.value,
697
+ ...ne.value,
676
698
  width: `${t.width}pt`,
677
699
  minHeight: `${t.height}pt`,
678
700
  padding: `${e.top}pt ${t.margins.right}pt ${e.bottom}pt ${t.margins.left}pt`
679
701
  };
680
702
  }, fe = (e) => {
681
703
  let n = [...new Set(e.items.map((e) => g.value[e].block))];
682
- return ne(n.map((e) => t.preview.blocks[e]), t.mode).flatMap((n) => {
683
- let r = I(t.preview.images, n.ref);
704
+ return ie(n.map((e) => t.preview.blocks[e]), t.mode).flatMap((n) => {
705
+ let r = oe(t.preview.images, n.ref);
684
706
  return r ? [{
685
707
  src: r,
686
- css: F(n, P.value[e.section].page)
708
+ css: I(n, M.value[e.section].page)
687
709
  }] : [];
688
710
  });
689
- }, pe = o(e, "fit"), me = o(e, "zoom"), H = b(() => pe.value ? Math.min(1.25, Math.max(.3, (E.value - 48) / (R.value.width * nt))) : me.value), he = (e) => {
690
- me.value = Math.min(2, Math.max(.3, Math.round((H.value + e) * 10) / 10)), pe.value = !1;
691
- }, ge = y(0), _e = y(), ve = () => {
692
- let e = S.value?.getBoundingClientRect();
711
+ }, H = o(e, "fit"), pe = o(e, "zoom"), U = b(() => H.value ? Math.min(1.25, Math.max(.3, (T.value - 48) / (N.value.width * at))) : pe.value), me = (e) => {
712
+ pe.value = Math.min(2, Math.max(.3, Math.round((U.value + e) * 10) / 10)), H.value = !1;
713
+ }, he = y(0), ge = y(), _e = () => {
714
+ let e = x.value?.getBoundingClientRect();
693
715
  if (!e) return;
694
- let t = S.value?.querySelectorAll("[data-page]") ?? [], n = 0;
716
+ let t = x.value?.querySelectorAll("[data-page]") ?? [], n = 0;
695
717
  for (let [r, i] of [...t].entries()) {
696
718
  if (i.getBoundingClientRect().top - e.top > e.height / 3) break;
697
719
  n = r;
698
720
  }
699
- ge.value = n;
721
+ he.value = n;
700
722
  let r;
701
- for (let t of U.value) {
702
- let n = S.value?.querySelector(`[data-key="${t.key}"]`);
723
+ for (let t of W.value) {
724
+ let n = x.value?.querySelector(`[data-key="${t.key}"]`);
703
725
  if (n) {
704
726
  if (n.getBoundingClientRect().top - e.top > 48) break;
705
727
  r = t.key;
706
728
  }
707
729
  }
708
- _e.value = r ?? U.value[0]?.key;
709
- }, ye = 0, be = () => {
710
- ye ||= requestAnimationFrame(() => {
711
- ye = 0, ve();
730
+ ge.value = r ?? W.value[0]?.key;
731
+ }, ve = 0, ye = () => {
732
+ ve ||= requestAnimationFrame(() => {
733
+ ve = 0, _e();
712
734
  });
713
735
  };
714
- a(() => cancelAnimationFrame(ye)), u(V, () => i(be));
715
- let xe = (e) => f(e).map((e) => e.text).join("").replace(/\s+/g, " ").trim(), U = b(() => g.value.flatMap((e) => {
716
- let n = t.preview.blocks[e.block], r = n.kind === "heading" ? [n.label, xe(n.runs)].filter(Boolean).join(" ") : "";
736
+ a(() => cancelAnimationFrame(ve)), u(V, () => i(ye));
737
+ let be = (e) => f(e).map((e) => e.text).join("").replace(/\s+/g, " ").trim(), W = b(() => g.value.flatMap((e) => {
738
+ let n = t.preview.blocks[e.block], r = n.kind === "heading" ? [n.label, be(n.runs)].filter(Boolean).join(" ") : "";
717
739
  return n.kind === "heading" && n.level <= 3 && r ? [{
718
740
  key: e.key,
719
741
  level: n.level,
720
742
  text: r
721
743
  }] : [];
722
- })), Se = (e) => e.length > 60 ? `${e.slice(0, 60)}…` : e, W = b(() => g.value.flatMap((e) => {
744
+ })), xe = (e) => e.length > 60 ? `${e.slice(0, 60)}…` : e, G = b(() => g.value.flatMap((e) => {
723
745
  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();
724
746
  return i || a ? [{
725
747
  key: e.key,
726
- removed: Se(i),
727
- added: Se(a)
748
+ removed: xe(i),
749
+ added: xe(a)
728
750
  }] : [];
729
- })), G = y("outline"), K = y(!1), q = (e) => {
730
- S.value?.querySelector(`[data-key="${e}"]`)?.scrollIntoView({
751
+ })), K = y("outline"), q = y(!1), Se = (e) => {
752
+ x.value?.querySelector(`[data-key="${e}"]`)?.scrollIntoView({
731
753
  block: "start",
732
754
  behavior: "smooth"
733
- }), A.value || (K.value = !1);
734
- }, Ce = b(() => t.preview.blocks.flatMap((e) => e.kind === "table" ? e.rows.flat().map((e) => xe(e.runs)) : [xe(e.runs)]).join(" ").split(/\s+/).filter(Boolean).length), J = b(() => t.preview.revisionAuthors.join(", "));
755
+ }), k.value || (q.value = !1);
756
+ }, Ce = b(() => t.preview.blocks.flatMap((e) => e.kind === "table" ? e.rows.flat().map((e) => be(e.runs)) : [be(e.runs)]).join(" ").split(/\s+/).filter(Boolean).length), J = b(() => t.preview.revisionAuthors.join(", "));
735
757
  return (t, n) => {
736
- let i = oe;
737
- return M(), j("div", {
758
+ let i = le;
759
+ return j(), A("div", {
738
760
  ref_key: "rootEl",
739
- ref: x,
740
- class: r(["pk-word-preview", { "pk-word-preview--paged": O.value }])
761
+ ref: ee,
762
+ class: r(["pk-word-preview", { "pk-word-preview--paged": D.value }])
741
763
  }, [
742
- (A.value || K.value) && (U.value.length || W.value.length) ? (M(), j("aside", {
764
+ (k.value || q.value) && (W.value.length || G.value.length) ? (j(), A("aside", {
743
765
  key: 0,
744
- class: r(["pk-word-preview__side", { "pk-word-preview__side--over": !A.value }]),
745
- "aria-label": k(c)("chatFilePreview.outline")
746
- }, [v("div", je, [v("button", {
766
+ class: r(["pk-word-preview__side", { "pk-word-preview__side--over": !k.value }]),
767
+ "aria-label": O(c)("chatFilePreview.outline")
768
+ }, [v("div", $, [v("button", {
747
769
  type: "button",
748
770
  role: "tab",
749
771
  class: "pk-word-preview__tab",
750
- "aria-selected": G.value === "outline",
751
- onClick: n[0] ||= (e) => G.value = "outline"
752
- }, C(k(c)("chatFilePreview.outline")), 9, Me), W.value.length ? (M(), j("button", {
772
+ "aria-selected": K.value === "outline",
773
+ onClick: n[0] ||= (e) => K.value = "outline"
774
+ }, S(O(c)("chatFilePreview.outline")), 9, Fe), G.value.length ? (j(), A("button", {
753
775
  key: 0,
754
776
  type: "button",
755
777
  role: "tab",
756
778
  class: "pk-word-preview__tab",
757
- "aria-selected": G.value === "changes",
758
- onClick: n[1] ||= (e) => G.value = "changes"
759
- }, C(k(c)("chatFilePreview.changes", { count: W.value.length })), 9, Ne)) : D("", !0)]), G.value === "outline" || !W.value.length ? (M(), j("nav", Pe, [(M(!0), j(_, null, p(U.value, (e) => (M(), j("button", {
779
+ "aria-selected": K.value === "changes",
780
+ onClick: n[1] ||= (e) => K.value = "changes"
781
+ }, S(O(c)("chatFilePreview.changes", { count: G.value.length })), 9, Ie)) : E("", !0)]), K.value === "outline" || !G.value.length ? (j(), A("nav", Le, [(j(!0), A(_, null, p(W.value, (e) => (j(), A("button", {
760
782
  key: e.key,
761
783
  type: "button",
762
784
  class: r(["pk-word-preview__entry", `pk-word-preview__entry--${Math.min(e.level, 3)}`]),
763
- "aria-current": _e.value === e.key ? "location" : void 0,
764
- onClick: (t) => q(e.key)
765
- }, [v("span", Ie, C(e.text), 1), W.value.some((t) => t.key === e.key) ? (M(), j("span", Le)) : D("", !0)], 10, Fe))), 128)), U.value.length ? D("", !0) : (M(), j("p", Re, C(k(c)("chatFilePreview.noHeadings")), 1))])) : (M(), j("nav", ze, [(M(!0), j(_, null, p(W.value, (e) => (M(), j("button", {
785
+ "aria-current": ge.value === e.key ? "location" : void 0,
786
+ onClick: (t) => Se(e.key)
787
+ }, [v("span", ze, S(e.text), 1), G.value.some((t) => t.key === e.key) ? (j(), A("span", Be)) : E("", !0)], 10, Re))), 128)), W.value.length ? E("", !0) : (j(), A("p", Ve, S(O(c)("chatFilePreview.noHeadings")), 1))])) : (j(), A("nav", He, [(j(!0), A(_, null, p(G.value, (e) => (j(), A("button", {
766
788
  key: e.key,
767
789
  type: "button",
768
790
  class: "pk-word-preview__entry pk-word-preview__entry--change",
769
- onClick: (t) => q(e.key)
770
- }, [e.removed ? (M(), j("del", Ve, C(e.removed), 1)) : D("", !0), e.added ? (M(), j("ins", He, C(e.added), 1)) : D("", !0)], 8, Be))), 128))]))], 10, $)) : D("", !0),
771
- v("div", Ue, [v("div", {
791
+ onClick: (t) => Se(e.key)
792
+ }, [e.removed ? (j(), A("del", We, S(e.removed), 1)) : E("", !0), e.added ? (j(), A("ins", Ge, S(e.added), 1)) : E("", !0)], 8, Ue))), 128))]))], 10, Pe)) : E("", !0),
793
+ v("div", Ke, [v("div", {
772
794
  ref_key: "scrollEl",
773
- ref: S,
795
+ ref: x,
774
796
  class: "pk-word-preview__scroll",
775
- onScroll: be
776
- }, [O.value ? (M(), j("div", {
797
+ onScroll: ye
798
+ }, [D.value ? (j(), A("div", {
777
799
  key: 0,
778
800
  class: "pk-word-preview__pages",
779
- style: l({ zoom: H.value })
780
- }, [(M(!0), j(_, null, p(V.value, (t, n) => (M(), j("article", {
801
+ style: l({ zoom: U.value })
802
+ }, [(j(!0), A(_, null, p(V.value, (t, n) => (j(), A("article", {
781
803
  key: n,
782
804
  "data-page": "",
783
805
  class: "pk-word-preview__page",
784
- "aria-label": k(c)("chatFilePreview.pageOf", {
806
+ "aria-label": O(c)("chatFilePreview.pageOf", {
785
807
  page: n + 1,
786
808
  count: V.value.length
787
809
  }),
788
810
  style: l(de(t))
789
811
  }, [
790
- t.header && e.preview.parts?.[t.header] ? (M(), h(Ae, {
812
+ t.header && e.preview.parts?.[t.header] ? (j(), h(Ne, {
791
813
  key: 0,
792
814
  blocks: e.preview.parts[t.header],
793
815
  where: "header",
794
- section: P.value[t.section],
816
+ section: M.value[t.section],
795
817
  mode: e.mode,
796
818
  numbers: ue.value[n]
797
819
  }, null, 8, [
@@ -799,14 +821,14 @@ var $ = ["aria-label"], je = {
799
821
  "section",
800
822
  "mode",
801
823
  "numbers"
802
- ])) : D("", !0),
803
- (M(!0), j(_, null, p(t.items, (r) => (M(), h(Q, {
824
+ ])) : E("", !0),
825
+ (j(!0), A(_, null, p(t.items, (r) => (j(), h(Q, {
804
826
  key: g.value[r].key,
805
827
  "data-key": g.value[r].key,
806
828
  block: e.preview.blocks[g.value[r].block],
807
829
  row: g.value[r].row,
808
830
  mode: e.mode,
809
- page: P.value[t.section].page,
831
+ page: M.value[t.section].page,
810
832
  numbers: ue.value[n]
811
833
  }, null, 8, [
812
834
  "data-key",
@@ -816,18 +838,18 @@ var $ = ["aria-label"], je = {
816
838
  "page",
817
839
  "numbers"
818
840
  ]))), 128)),
819
- (M(!0), j(_, null, p(fe(t), (e, t) => (M(), j("img", {
841
+ (j(!0), A(_, null, p(fe(t), (e, t) => (j(), A("img", {
820
842
  key: `image-${t}`,
821
843
  class: "pk-word-preview__float",
822
844
  style: l(e.css),
823
845
  src: e.src,
824
846
  alt: ""
825
- }, null, 12, Ge))), 128)),
826
- t.footer && e.preview.parts?.[t.footer] ? (M(), h(Ae, {
847
+ }, null, 12, Je))), 128)),
848
+ t.footer && e.preview.parts?.[t.footer] ? (j(), h(Ne, {
827
849
  key: 1,
828
850
  blocks: e.preview.parts[t.footer],
829
851
  where: "footer",
830
- section: P.value[t.section],
852
+ section: M.value[t.section],
831
853
  mode: e.mode,
832
854
  numbers: ue.value[n]
833
855
  }, null, 8, [
@@ -835,12 +857,12 @@ var $ = ["aria-label"], je = {
835
857
  "section",
836
858
  "mode",
837
859
  "numbers"
838
- ])) : D("", !0)
839
- ], 12, We))), 128))], 4)) : (M(), j("article", {
860
+ ])) : E("", !0)
861
+ ], 12, qe))), 128))], 4)) : (j(), A("article", {
840
862
  key: 1,
841
863
  class: "pk-word-preview__page pk-word-preview__page--flow",
842
- style: l(z.value)
843
- }, [(M(!0), j(_, null, p(g.value, (t) => (M(), h(Q, {
864
+ style: l(ne.value)
865
+ }, [(j(!0), A(_, null, p(g.value, (t) => (j(), h(Q, {
844
866
  key: t.key,
845
867
  "data-key": t.key,
846
868
  block: e.preview.blocks[t.block],
@@ -851,115 +873,115 @@ var $ = ["aria-label"], je = {
851
873
  "block",
852
874
  "row",
853
875
  "mode"
854
- ]))), 128))], 4)), e.preview.truncated ? (M(), j("p", Ke, C(k(c)("chatFilePreview.truncated")), 1)) : D("", !0)], 544), v("div", qe, [
855
- O.value ? (M(), j("span", Je, C(k(c)("chatFilePreview.pageOf", {
856
- page: ge.value + 1,
876
+ ]))), 128))], 4)), e.preview.truncated ? (j(), A("p", Ye, S(O(c)("chatFilePreview.truncated")), 1)) : E("", !0)], 544), v("div", Xe, [
877
+ D.value ? (j(), A("span", Ze, S(O(c)("chatFilePreview.pageOf", {
878
+ page: he.value + 1,
857
879
  count: V.value.length
858
- })), 1)) : D("", !0),
859
- v("span", Ye, C(k(c)("chatFilePreview.words", Ce.value)), 1),
860
- e.mode === "markup" && e.preview.revisionAuthors.length ? (M(), j("span", Xe, [
880
+ })), 1)) : E("", !0),
881
+ v("span", Qe, S(O(c)("chatFilePreview.words", Ce.value)), 1),
882
+ e.mode === "markup" && e.preview.revisionAuthors.length ? (j(), A("span", $e, [
861
883
  v("span", {
862
884
  class: "pk-word-preview__legend-text",
863
- title: k(c)("chatFilePreview.revisionsOf", { authors: J.value })
864
- }, C(k(c)("chatFilePreview.revisionsOf", { authors: J.value })), 9, Ze),
865
- v("del", Qe, C(k(c)("chatFilePreview.removed")), 1),
866
- v("ins", $e, C(k(c)("chatFilePreview.added")), 1)
867
- ])) : D("", !0),
885
+ title: O(c)("chatFilePreview.revisionsOf", { authors: J.value })
886
+ }, S(O(c)("chatFilePreview.revisionsOf", { authors: J.value })), 9, et),
887
+ v("del", tt, S(O(c)("chatFilePreview.removed")), 1),
888
+ v("ins", nt, S(O(c)("chatFilePreview.added")), 1)
889
+ ])) : E("", !0),
868
890
  n[6] ||= v("span", { class: "pk-word-preview__spacer" }, null, -1),
869
- !A.value && (U.value.length || W.value.length) ? (M(), h(i, {
891
+ !k.value && (W.value.length || G.value.length) ? (j(), h(i, {
870
892
  key: 2,
871
893
  class: "pk-word-preview__outline-toggle",
872
894
  modifiers: "action-quiet",
873
895
  icon: "ri:list-unordered",
874
- label: k(c)("chatFilePreview.outline"),
875
- title: k(c)("chatFilePreview.outline"),
876
- "aria-label": k(c)("chatFilePreview.outline"),
877
- "aria-expanded": K.value,
878
- onClick: n[2] ||= (e) => K.value = !K.value
896
+ label: O(c)("chatFilePreview.outline"),
897
+ title: O(c)("chatFilePreview.outline"),
898
+ "aria-label": O(c)("chatFilePreview.outline"),
899
+ "aria-expanded": q.value,
900
+ onClick: n[2] ||= (e) => q.value = !q.value
879
901
  }, null, 8, [
880
902
  "label",
881
903
  "title",
882
904
  "aria-label",
883
905
  "aria-expanded"
884
- ])) : D("", !0),
885
- O.value ? (M(), j(_, { key: 3 }, [
906
+ ])) : E("", !0),
907
+ D.value ? (j(), A(_, { key: 3 }, [
886
908
  d(i, {
887
909
  modifiers: "action-quiet",
888
- label: k(c)("chatFilePreview.fitWidth"),
889
- disabled: pe.value,
890
- onClick: n[3] ||= (e) => pe.value = !0
910
+ label: O(c)("chatFilePreview.fitWidth"),
911
+ disabled: H.value,
912
+ onClick: n[3] ||= (e) => H.value = !0
891
913
  }, null, 8, ["label", "disabled"]),
892
914
  d(i, {
893
915
  modifiers: "action-quiet",
894
916
  icon: "ri:subtract-line",
895
- "aria-label": k(c)("chatFilePreview.zoomOut"),
896
- disabled: H.value <= .3,
897
- onClick: n[4] ||= (e) => he(-.1)
917
+ "aria-label": O(c)("chatFilePreview.zoomOut"),
918
+ disabled: U.value <= .3,
919
+ onClick: n[4] ||= (e) => me(-.1)
898
920
  }, null, 8, ["aria-label", "disabled"]),
899
- v("span", et, C(Math.round(H.value * 100)) + "% ", 1),
921
+ v("span", rt, S(Math.round(U.value * 100)) + "% ", 1),
900
922
  d(i, {
901
923
  modifiers: "action-quiet",
902
924
  icon: "ri:add-line",
903
- "aria-label": k(c)("chatFilePreview.zoomIn"),
904
- disabled: H.value >= 2,
905
- onClick: n[5] ||= (e) => he(.1)
925
+ "aria-label": O(c)("chatFilePreview.zoomIn"),
926
+ disabled: U.value >= 2,
927
+ onClick: n[5] ||= (e) => me(.1)
906
928
  }, null, 8, ["aria-label", "disabled"])
907
- ], 64)) : D("", !0)
929
+ ], 64)) : E("", !0)
908
930
  ])]),
909
- O.value ? (M(), j("div", {
931
+ D.value ? (j(), A("div", {
910
932
  key: 1,
911
933
  ref_key: "measureEl",
912
- ref: w,
934
+ ref: C,
913
935
  class: "pk-word-preview__measure",
914
936
  "aria-hidden": "true",
915
- style: l(se.value)
916
- }, [(M(!0), j(_, null, p(g.value, (t) => (M(), j("div", {
937
+ style: l(F.value)
938
+ }, [(j(!0), A(_, null, p(g.value, (t) => (j(), A("div", {
917
939
  key: t.key,
918
940
  "data-item": ""
919
941
  }, [d(Q, {
920
942
  block: e.preview.blocks[t.block],
921
943
  row: t.row,
922
944
  mode: e.mode,
923
- page: R.value
945
+ page: N.value
924
946
  }, null, 8, [
925
947
  "block",
926
948
  "row",
927
949
  "mode",
928
950
  "page"
929
- ])]))), 128)), (M(!0), j(_, null, p(e.preview.parts, (t, n) => (M(), j("div", {
951
+ ])]))), 128)), (j(!0), A(_, null, p(e.preview.parts, (t, n) => (j(), A("div", {
930
952
  key: n,
931
953
  "data-part": n
932
- }, [(M(!0), j(_, null, p(k(N)(t, e.mode), (n) => (M(), h(Q, {
954
+ }, [(j(!0), A(_, null, p(O(P)(t, e.mode), (n) => (j(), h(Q, {
933
955
  key: n.key,
934
956
  block: t[n.block],
935
957
  row: n.row,
936
958
  mode: e.mode,
937
- page: R.value
959
+ page: N.value
938
960
  }, null, 8, [
939
961
  "block",
940
962
  "row",
941
963
  "mode",
942
964
  "page"
943
- ]))), 128))], 8, tt))), 128))], 4)) : D("", !0)
965
+ ]))), 128))], 8, it))), 128))], 4)) : E("", !0)
944
966
  ], 2);
945
967
  };
946
968
  }
947
969
  }), [["styles", [".pk-word-preview{flex:1;min-height:0;display:flex;position:relative}.pk-word-preview__side{gap:var(--spacing-12);width:16.5rem;padding:var(--spacing-12);box-sizing:border-box;border-right:var(--border) solid var(--color-surface-3);background-color:var(--color-surface);flex-direction:column;flex-shrink:0;display:flex;overflow-y:auto}.pk-word-preview__side--over{inset:0 auto var(--spacing-40) 0;z-index:3;box-shadow:var(--shadow-lg);position:absolute}.pk-word-preview__tabs{border-bottom:var(--border) solid var(--color-surface-3);display:flex}.pk-word-preview__tab{min-height:var(--spacing-40);color:var(--color-word-3);font:inherit;font-size:var(--text-14);cursor:pointer;background:0 0;border:0;flex:1}.pk-word-preview__tab[aria-selected=true]{box-shadow:inset 0 calc(var(--spacing-2) * -1) 0 var(--color-word-1);color:var(--color-word-1);font-weight:var(--font-semibold)}.pk-word-preview__list{border:var(--border) solid var(--color-surface-3);border-radius:var(--rounded-lg);flex-direction:column;flex-shrink:0;display:flex;overflow:hidden}.pk-word-preview__entry{align-items:center;gap:var(--spacing-8);min-height:var(--spacing-40);padding:var(--spacing-8) var(--spacing-12);border:0;border-bottom:var(--border) solid var(--color-surface-2);color:var(--color-word-2);font:inherit;font-size:var(--text-14);text-align:start;cursor:pointer;transition:background-color var(--duration-150) var(--ease-out);background:0 0;display:flex}.pk-word-preview__entry:last-child{border-bottom:0}.pk-word-preview__entry:hover{background-color:var(--color-surface-1)}.pk-word-preview__entry[aria-current=location]{background-color:var(--color-surface-2);box-shadow:inset var(--spacing-3) 0 0 var(--color-word-2);color:var(--color-word-1);font-weight:var(--font-medium)}.pk-word-preview__entry--0{font-weight:var(--font-semibold)}.pk-word-preview__entry--2{padding-left:var(--spacing-24)}.pk-word-preview__entry--3{padding-left:var(--spacing-36)}.pk-word-preview__entry--change{gap:var(--spacing-4) var(--spacing-8);font-size:var(--text-12);flex-wrap:wrap}.pk-word-preview__entry-text{flex:1;min-width:0}.pk-word-preview__none{padding:var(--spacing-md);color:var(--color-word-3);font-size:var(--text-12);text-align:center;margin:0}.pk-word-preview__main{flex-direction:column;flex:1;min-width:0;display:flex}.pk-word-preview__scroll{min-height:0;padding:var(--spacing-md);background-color:var(--color-surface-2);flex:1;overflow:auto}.pk-word-preview__pages{align-items:center;gap:var(--spacing-24);flex-direction:column;width:max-content;min-width:100%;display:flex}.pk-word-preview__page{isolation:isolate;box-sizing:border-box;line-height:var(--pk-word-line,1.17);overflow-wrap:break-word;background-color:#fff;position:relative;overflow:hidden;box-shadow:0 1px 3px #140e3329,0 10px 28px #140e3314}.pk-word-preview__page--flow{width:100%;padding:var(--spacing-24) var(--spacing-20)}.pk-word-preview__measure{visibility:hidden;pointer-events:none;height:0;line-height:var(--pk-word-line,1.17);overflow-wrap:break-word;position:absolute;top:0;left:-100000px;overflow:hidden}.pk-word-preview__block{white-space:pre-wrap;margin:0;display:flow-root;position:relative}.pk-word-preview__picture{vertical-align:baseline;max-width:100%;height:auto}.pk-word-preview__picture--paragraph{max-width:none}.pk-word-preview__float{max-width:none;position:absolute}.pk-word-preview__part{pointer-events:none;position:absolute;inset:0}.pk-word-preview__part-flow{pointer-events:auto;position:absolute}.pk-word-preview__label{text-indent:0;display:inline-block}.pk-word-preview__changed:before{content:\"\";background-color:#3f3c51;width:1.5pt;position:absolute;top:0;bottom:0;left:-14pt}.pk-word-preview__table{border-collapse:collapse;table-layout:fixed;width:100%;margin:0;position:relative}.pk-word-preview__table td{vertical-align:top;white-space:pre-wrap;overflow-wrap:anywhere;padding:0 5.4pt}.pk-word-preview__table--lines td{border:.5pt solid #000}.pk-word-preview__table--lines.pk-word-preview__table--next td{border-top:0}.pk-word-preview__removed{color:var(--u-danger-text,#c42b3c);text-decoration:line-through}.pk-word-preview__added{color:var(--u-success-text,#178230);text-underline-offset:.2em;text-decoration:underline}.pk-word-preview__page .pk-word-preview__removed{color:#c42b3c}.pk-word-preview__page .pk-word-preview__added{color:#178230}.pk-word-preview__removed+.pk-word-preview__added{margin-inline-start:.15em}.pk-word-preview__image{padding:var(--spacing-2) var(--spacing-8);border:var(--border) dashed #c9c8d2;border-radius:var(--rounded);color:#6b6880;text-indent:0;font-size:9pt;display:inline-block}.pk-word-preview__truncated{margin:var(--spacing-md) 0 0;color:var(--color-word-3);font-size:var(--text-12);text-align:center}.pk-word-preview__status{align-items:center;gap:var(--spacing-16);min-height:var(--spacing-40);padding:0 var(--spacing-8) 0 var(--spacing-12);border-top:var(--border) solid var(--color-surface-3);background-color:var(--color-surface-1);color:var(--color-word-2);font-size:var(--text-12);white-space:nowrap;display:flex}.pk-word-preview__status>*{flex-shrink:0}.pk-word-preview__count{font-variant-numeric:tabular-nums}.pk-word-preview__status>.pk-word-preview__legend{gap:var(--spacing-8);flex-shrink:1;min-width:0;display:flex}.pk-word-preview__legend-text{text-overflow:ellipsis;min-width:0;overflow:hidden}.pk-word-preview__legend>.pk-word-preview__removed,.pk-word-preview__legend>.pk-word-preview__added{flex-shrink:0}.pk-word-preview__spacer{flex:1}@container (width<30rem){.pk-word-preview__outline-toggle .vv-button__label{display:none}}.pk-word-preview__percent{min-width:var(--spacing-40);font-variant-numeric:tabular-nums;text-align:center}"]]]);
948
970
  // ../../packages/components/src/chat/PkFilePreview.vue?vue&type=script&setup=true&lang.ts
949
- S(), f(), w();
950
- var it = ["aria-label"], at = { class: "pk-file-preview__head" }, ot = { class: "pk-file-preview__file" }, st = {
971
+ x(), f(), C();
972
+ var st = ["aria-label"], ct = { class: "pk-file-preview__head" }, lt = { class: "pk-file-preview__file" }, ut = {
951
973
  class: "pk-file-preview__tile",
952
974
  "aria-hidden": "true"
953
- }, ct = { class: "pk-file-preview__name" }, lt = { class: "pk-file-preview__title" }, ut = { class: "pk-file-preview__note" }, dt = {
975
+ }, dt = { class: "pk-file-preview__name" }, ft = { class: "pk-file-preview__title" }, pt = { class: "pk-file-preview__note" }, mt = {
954
976
  key: 0,
955
977
  class: "pk-file-preview__tools"
956
- }, ft = ["aria-label"], pt = { class: "pk-file-preview__version" }, mt = { class: "pk-file-preview__mode-long" }, ht = { class: "pk-file-preview__mode-short" }, gt = { class: "pk-file-preview__actions" }, _t = { class: "pk-file-preview__body" }, vt = {
978
+ }, ht = ["aria-label"], gt = { class: "pk-file-preview__version" }, _t = { class: "pk-file-preview__mode-long" }, vt = { class: "pk-file-preview__mode-short" }, yt = { class: "pk-file-preview__actions" }, bt = { class: "pk-file-preview__body" }, xt = {
957
979
  key: 0,
958
980
  class: "pk-file-preview__skeleton vv-skeleton"
959
- }, yt = {
981
+ }, St = {
960
982
  key: 1,
961
983
  class: "pk-file-preview__empty"
962
- }, bt = /*@__PURE__*/ O({
984
+ }, Ct = /*@__PURE__*/ D({
963
985
  __name: "PkFilePreview",
964
986
  props: /*@__PURE__*/ c({
965
987
  kind: { type: String },
@@ -997,7 +1019,7 @@ var it = ["aria-label"], at = { class: "pk-file-preview__head" }, ot = { class:
997
1019
  "update:fit"
998
1020
  ]),
999
1021
  setup(e, { emit: t }) {
1000
- let n = e, i = t, { t: a } = ee({ useScope: "global" }), s = b(() => n.versions ?? []), c = b(() => n.version ? s.value.indexOf(n.version) : -1), l = b(() => c.value > 0 ? s.value[c.value - 1] : void 0), f = b(() => c.value >= 0 && c.value < s.value.length - 1 ? s.value[c.value + 1] : void 0), m = o(e, "mode"), g = o(e, "sheet"), y = o(e, "zoom"), x = o(e, "fit"), S = b(() => [
1022
+ let n = e, i = t, { t: a } = te({ useScope: "global" }), s = b(() => n.versions ?? []), c = b(() => n.version ? s.value.indexOf(n.version) : -1), l = b(() => c.value > 0 ? s.value[c.value - 1] : void 0), f = b(() => c.value >= 0 && c.value < s.value.length - 1 ? s.value[c.value + 1] : void 0), m = o(e, "mode"), g = o(e, "sheet"), y = o(e, "zoom"), ee = o(e, "fit"), x = b(() => [
1001
1023
  {
1002
1024
  value: "markup",
1003
1025
  label: a("chatFilePreview.modeMarkup")
@@ -1010,121 +1032,121 @@ var it = ["aria-label"], at = { class: "pk-file-preview__head" }, ot = { class:
1010
1032
  value: "original",
1011
1033
  label: a("chatFilePreview.modeOriginal")
1012
1034
  }
1013
- ]), w = b(() => n.preview?.kind === "word" && n.preview.revisionAuthors.length > 0);
1035
+ ]), C = b(() => n.preview?.kind === "word" && n.preview.revisionAuthors.length > 0);
1014
1036
  return u(() => n.version, () => {
1015
1037
  m.value = "markup";
1016
1038
  }), (t, n) => {
1017
- let o = R, c = oe;
1018
- return M(), j("section", {
1039
+ let o = R, c = le;
1040
+ return j(), A("section", {
1019
1041
  class: "pk-file-preview",
1020
1042
  "aria-label": e.filename,
1021
1043
  tabindex: "-1",
1022
1044
  autofocus: ""
1023
- }, [v("header", at, [
1024
- v("div", ot, [v("span", st, [d(o, {
1045
+ }, [v("header", ct, [
1046
+ v("div", lt, [v("span", ut, [d(o, {
1025
1047
  name: e.kind === "word" ? "ri:file-word-2-line" : "ri:file-excel-2-line",
1026
1048
  class: r(e.kind === "word" ? "pk-file-preview__icon--word" : "pk-file-preview__icon--sheet")
1027
- }, null, 8, ["name", "class"])]), v("div", ct, [v("strong", lt, C(e.filename), 1), v("span", ut, C(k(a)("chatFilePreview.readOnly")), 1)])]),
1028
- e.version && s.value.length > 1 || w.value ? (M(), j("div", dt, [e.version && s.value.length > 1 ? (M(), j("nav", {
1049
+ }, null, 8, ["name", "class"])]), v("div", dt, [v("strong", ft, S(e.filename), 1), v("span", pt, S(O(a)("chatFilePreview.readOnly")), 1)])]),
1050
+ e.version && s.value.length > 1 || C.value ? (j(), A("div", mt, [e.version && s.value.length > 1 ? (j(), A("nav", {
1029
1051
  key: 0,
1030
1052
  class: "pk-file-preview__versions",
1031
- "aria-label": k(a)("chatFilePreview.versions")
1053
+ "aria-label": O(a)("chatFilePreview.versions")
1032
1054
  }, [
1033
1055
  d(c, {
1034
1056
  modifiers: "action-quiet",
1035
1057
  icon: "ri:arrow-left-s-line",
1036
- "aria-label": k(a)("chatFilePreview.previousVersion"),
1058
+ "aria-label": O(a)("chatFilePreview.previousVersion"),
1037
1059
  disabled: !l.value,
1038
1060
  onClick: n[0] ||= (e) => l.value && i("version", l.value)
1039
1061
  }, null, 8, ["aria-label", "disabled"]),
1040
- v("span", pt, C(k(a)("chatFilePreview.versionOf", {
1062
+ v("span", gt, S(O(a)("chatFilePreview.versionOf", {
1041
1063
  version: e.version,
1042
1064
  count: s.value.length
1043
1065
  })), 1),
1044
1066
  d(c, {
1045
1067
  modifiers: "action-quiet",
1046
1068
  icon: "ri:arrow-right-s-line",
1047
- "aria-label": k(a)("chatFilePreview.nextVersion"),
1069
+ "aria-label": O(a)("chatFilePreview.nextVersion"),
1048
1070
  disabled: !f.value,
1049
1071
  onClick: n[1] ||= (e) => f.value && i("version", f.value)
1050
1072
  }, null, 8, ["aria-label", "disabled"])
1051
- ], 8, ft)) : D("", !0), w.value ? (M(), h(se, {
1073
+ ], 8, ht)) : E("", !0), C.value ? (j(), h(B, {
1052
1074
  key: 1,
1053
1075
  modelValue: m.value,
1054
1076
  "onUpdate:modelValue": n[2] ||= (e) => m.value = e,
1055
1077
  name: "revisions",
1056
1078
  segmented: "",
1057
1079
  class: "pk-file-preview__modes u-segmented-fit mb-0",
1058
- "aria-label": k(a)("chatFilePreview.modes"),
1059
- options: S.value
1080
+ "aria-label": O(a)("chatFilePreview.modes"),
1081
+ options: x.value
1060
1082
  }, {
1061
- markup: E(() => [v("span", mt, C(k(a)("chatFilePreview.modeMarkup")), 1), v("span", ht, C(k(a)("chatFilePreview.modeMarkupShort")), 1)]),
1083
+ markup: T(() => [v("span", _t, S(O(a)("chatFilePreview.modeMarkup")), 1), v("span", vt, S(O(a)("chatFilePreview.modeMarkupShort")), 1)]),
1062
1084
  _: 1
1063
1085
  }, 8, [
1064
1086
  "modelValue",
1065
1087
  "aria-label",
1066
1088
  "options"
1067
- ])) : D("", !0)])) : D("", !0),
1068
- v("div", gt, [
1069
- e.restorable ? (M(), h(c, {
1089
+ ])) : E("", !0)])) : E("", !0),
1090
+ v("div", yt, [
1091
+ e.restorable ? (j(), h(c, {
1070
1092
  key: 0,
1071
1093
  modifiers: "action-quiet",
1072
1094
  icon: "ri:arrow-go-back-line",
1073
- label: k(a)("chatFilePreview.restore"),
1095
+ label: O(a)("chatFilePreview.restore"),
1074
1096
  onClick: n[3] ||= (e) => i("restore")
1075
- }, null, 8, ["label"])) : D("", !0),
1097
+ }, null, 8, ["label"])) : E("", !0),
1076
1098
  d(c, {
1077
1099
  href: e.downloadUrl,
1078
1100
  download: "",
1079
1101
  modifiers: "action-quiet",
1080
1102
  icon: "ri:download-line",
1081
- title: k(a)("chatFilePreview.download"),
1082
- "aria-label": k(a)("chatFilePreview.download")
1103
+ title: O(a)("chatFilePreview.download"),
1104
+ "aria-label": O(a)("chatFilePreview.download")
1083
1105
  }, null, 8, [
1084
1106
  "href",
1085
1107
  "title",
1086
1108
  "aria-label"
1087
1109
  ]),
1088
- e.resize === "expand" ? (M(), h(c, {
1110
+ e.resize === "expand" ? (j(), h(c, {
1089
1111
  key: 1,
1090
1112
  modifiers: "action-quiet",
1091
1113
  icon: "ri:fullscreen-line",
1092
- title: k(a)("chatFilePreview.expand"),
1093
- "aria-label": k(a)("chatFilePreview.expand"),
1114
+ title: O(a)("chatFilePreview.expand"),
1115
+ "aria-label": O(a)("chatFilePreview.expand"),
1094
1116
  onClick: n[4] ||= (e) => i("resize")
1095
- }, null, 8, ["title", "aria-label"])) : e.resize === "shrink" ? (M(), h(c, {
1117
+ }, null, 8, ["title", "aria-label"])) : e.resize === "shrink" ? (j(), h(c, {
1096
1118
  key: 2,
1097
1119
  modifiers: "action-quiet",
1098
1120
  icon: "ri:fullscreen-exit-line",
1099
- title: k(a)("chatFilePreview.shrink"),
1100
- "aria-label": k(a)("chatFilePreview.shrink"),
1121
+ title: O(a)("chatFilePreview.shrink"),
1122
+ "aria-label": O(a)("chatFilePreview.shrink"),
1101
1123
  onClick: n[5] ||= (e) => i("resize")
1102
- }, null, 8, ["title", "aria-label"])) : D("", !0),
1124
+ }, null, 8, ["title", "aria-label"])) : E("", !0),
1103
1125
  d(c, {
1104
1126
  modifiers: "action-quiet",
1105
1127
  icon: "ri:close-line",
1106
- title: k(a)("chatFilePreview.close"),
1107
- "aria-label": k(a)("chatFilePreview.close"),
1128
+ title: O(a)("chatFilePreview.close"),
1129
+ "aria-label": O(a)("chatFilePreview.close"),
1108
1130
  onClick: n[6] ||= (e) => i("close")
1109
1131
  }, null, 8, ["title", "aria-label"])
1110
1132
  ])
1111
- ]), v("div", _t, [e.loading ? (M(), j("div", vt, [(M(), j(_, null, p(8, (e) => v("div", {
1133
+ ]), v("div", bt, [e.loading ? (j(), A("div", xt, [(j(), A(_, null, p(8, (e) => v("div", {
1112
1134
  key: e,
1113
1135
  class: r(["vv-skeleton__item pk-file-preview__skeleton-line", e % 3 ? "w-full" : "w-128"])
1114
- }, null, 2)), 64))])) : e.error || !e.preview ? (M(), j("p", yt, C(k(a)("chatFilePreview.unavailable")), 1)) : e.preview.kind === "word" ? (M(), h(rt, {
1136
+ }, null, 2)), 64))])) : e.error || !e.preview ? (j(), A("p", St, S(O(a)("chatFilePreview.unavailable")), 1)) : e.preview.kind === "word" ? (j(), h(ot, {
1115
1137
  key: 2,
1116
1138
  zoom: y.value,
1117
1139
  "onUpdate:zoom": n[7] ||= (e) => y.value = e,
1118
- fit: x.value,
1119
- "onUpdate:fit": n[8] ||= (e) => x.value = e,
1140
+ fit: ee.value,
1141
+ "onUpdate:fit": n[8] ||= (e) => ee.value = e,
1120
1142
  preview: e.preview,
1121
- mode: w.value ? m.value : "markup"
1143
+ mode: C.value ? m.value : "markup"
1122
1144
  }, null, 8, [
1123
1145
  "zoom",
1124
1146
  "fit",
1125
1147
  "preview",
1126
1148
  "mode"
1127
- ])) : (M(), h(q, {
1149
+ ])) : (j(), h(we, {
1128
1150
  key: 3,
1129
1151
  sheet: g.value,
1130
1152
  "onUpdate:sheet": n[9] ||= (e) => g.value = e,
@@ -1135,10 +1157,10 @@ var it = ["aria-label"], at = { class: "pk-file-preview__head" }, ot = { class:
1135
1157
  "sheet",
1136
1158
  "zoom",
1137
1159
  "preview"
1138
- ]))])], 8, it);
1160
+ ]))])], 8, st);
1139
1161
  };
1140
1162
  }
1141
- }), xt = ".pk-file-preview{background-color:var(--color-surface);height:100%;min-height:0;color:var(--color-word-1);outline:none;flex-direction:column;display:flex;container-type:inline-size}.pk-file-preview__head{align-items:center;gap:var(--spacing-8) var(--spacing-12);padding:var(--spacing-12) var(--spacing-12) var(--spacing-12) var(--spacing-md);border-bottom:var(--border) solid var(--color-surface-3);flex-wrap:wrap;display:flex}.pk-file-preview__file{align-items:center;gap:var(--spacing-12);flex:12rem;min-width:0;display:flex}.pk-file-preview__tile{width:var(--spacing-32);height:var(--spacing-32);border:var(--border) solid var(--color-surface-3);border-radius:var(--rounded);flex-shrink:0;justify-content:center;align-items:center;display:flex}.pk-file-preview__tile .vv-icon{width:var(--spacing-18);height:var(--spacing-18)}.pk-file-preview__icon--word{color:#2b7de9}.pk-file-preview__icon--sheet{color:#1f9d57}.pk-file-preview__name{flex-direction:column;min-width:0;display:flex}.pk-file-preview__title{font-size:var(--text-14);text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.pk-file-preview__note{color:var(--color-word-3);font-size:var(--text-12)}.pk-file-preview__tools{align-items:center;gap:var(--spacing-8) var(--spacing-12);flex-wrap:wrap;display:flex}.pk-file-preview__versions{align-items:center;gap:var(--spacing-2);display:flex}.pk-file-preview__version{font-size:var(--text-14);font-weight:var(--font-semibold);font-variant-numeric:tabular-nums;white-space:nowrap}.pk-file-preview__actions{align-items:center;gap:var(--spacing-8);margin-left:auto;display:flex}@container (width<52rem){.pk-file-preview__file{order:1}.pk-file-preview__actions{order:2}.pk-file-preview__tools{flex-basis:100%;order:3}.pk-file-preview__tools .pk-file-preview__modes{flex:auto}}.pk-file-preview__mode-short{display:none}@container (width<38rem){.pk-file-preview__mode-long{display:none}.pk-file-preview__mode-short{display:inline}}@container (width<30rem){.pk-file-preview__tools .pk-file-preview__modes{flex:100%}.pk-file-preview__tools .pk-file-preview__modes .vv-radio{padding-inline:var(--spacing-4)}}.pk-file-preview__body{background-color:var(--color-surface-1);flex-direction:column;flex:1;min-height:0;display:flex}.pk-file-preview__skeleton{width:min(42rem, 100% - 2 * var(--spacing-md));margin:var(--spacing-md) auto;padding:var(--spacing-lg);box-sizing:border-box;border:var(--border) solid var(--color-surface-3);border-radius:var(--rounded);background-color:var(--color-surface)}.pk-file-preview__skeleton-line{height:var(--spacing-12);margin-bottom:var(--spacing-12);border-radius:var(--rounded)}.pk-file-preview__empty{margin:var(--spacing-lg) var(--spacing-md);color:var(--color-word-3);font-size:var(--text-14);text-align:center}", St = /* @__PURE__ */ e({ default: () => Ct }), Ct = /*#__PURE__*/ z(bt, [["styles", [xt]]]);
1142
- export { St as n, Ct as t };
1163
+ }), wt = ".pk-file-preview{background-color:var(--color-surface);height:100%;min-height:0;color:var(--color-word-1);outline:none;flex-direction:column;display:flex;container-type:inline-size}.pk-file-preview__head{align-items:center;gap:var(--spacing-8) var(--spacing-12);padding:var(--spacing-12) var(--spacing-12) var(--spacing-12) var(--spacing-md);border-bottom:var(--border) solid var(--color-surface-3);flex-wrap:wrap;display:flex}.pk-file-preview__file{align-items:center;gap:var(--spacing-12);flex:12rem;min-width:0;display:flex}.pk-file-preview__tile{width:var(--spacing-32);height:var(--spacing-32);border:var(--border) solid var(--color-surface-3);border-radius:var(--rounded);flex-shrink:0;justify-content:center;align-items:center;display:flex}.pk-file-preview__tile .vv-icon{width:var(--spacing-18);height:var(--spacing-18)}.pk-file-preview__icon--word{color:#2b7de9}.pk-file-preview__icon--sheet{color:#1f9d57}.pk-file-preview__name{flex-direction:column;min-width:0;display:flex}.pk-file-preview__title{font-size:var(--text-14);text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.pk-file-preview__note{color:var(--color-word-3);font-size:var(--text-12)}.pk-file-preview__tools{align-items:center;gap:var(--spacing-8) var(--spacing-12);flex-wrap:wrap;display:flex}.pk-file-preview__versions{align-items:center;gap:var(--spacing-2);display:flex}.pk-file-preview__version{font-size:var(--text-14);font-weight:var(--font-semibold);font-variant-numeric:tabular-nums;white-space:nowrap}.pk-file-preview__actions{align-items:center;gap:var(--spacing-8);margin-left:auto;display:flex}@container (width<52rem){.pk-file-preview__file{order:1}.pk-file-preview__actions{order:2}.pk-file-preview__tools{flex-basis:100%;order:3}.pk-file-preview__tools .pk-file-preview__modes{flex:auto}}.pk-file-preview__mode-short{display:none}@container (width<38rem){.pk-file-preview__mode-long{display:none}.pk-file-preview__mode-short{display:inline}}@container (width<30rem){.pk-file-preview__tools .pk-file-preview__modes{flex:100%}.pk-file-preview__tools .pk-file-preview__modes .vv-radio{padding-inline:var(--spacing-4)}}.pk-file-preview__body{background-color:var(--color-surface-1);flex-direction:column;flex:1;min-height:0;display:flex}.pk-file-preview__skeleton{width:min(42rem, 100% - 2 * var(--spacing-md));margin:var(--spacing-md) auto;padding:var(--spacing-lg);box-sizing:border-box;border:var(--border) solid var(--color-surface-3);border-radius:var(--rounded);background-color:var(--color-surface)}.pk-file-preview__skeleton-line{height:var(--spacing-12);margin-bottom:var(--spacing-12);border-radius:var(--rounded)}.pk-file-preview__empty{margin:var(--spacing-lg) var(--spacing-md);color:var(--color-word-3);font-size:var(--text-14);text-align:center}", Tt = /* @__PURE__ */ e({ default: () => Et }), Et = /*#__PURE__*/ z(Ct, [["styles", [wt]]]);
1164
+ export { Tt as n, Et as t };
1143
1165
 
1144
- //# sourceMappingURL=PkFilePreview-D_piCsAW.js.map
1166
+ //# sourceMappingURL=PkFilePreview-BwHe4-m1.js.map