@8wave/ai-elements 0.125.0-beta.43 → 0.125.0-beta.44

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 (109) hide show
  1. package/README.md +9 -4
  2. package/dist/_chunks/{PkFilePreview-yjdtArag.js → PkFilePreview-DfYzaj3Y.js} +427 -427
  3. package/dist/_chunks/{PkFilePreview-yjdtArag.js.map → PkFilePreview-DfYzaj3Y.js.map} +1 -1
  4. package/dist/_chunks/{PkFilePreviewDialog-Df0Lt40J.js → PkFilePreviewDialog-COkwyLq6.js} +2 -2
  5. package/dist/_chunks/{PkFilePreviewDialog-Df0Lt40J.js.map → PkFilePreviewDialog-COkwyLq6.js.map} +1 -1
  6. package/dist/_chunks/{PkImageEditorDialog-PVf3IHGB.js → PkImageEditorDialog-Ceas-HZA.js} +2 -2
  7. package/dist/_chunks/{PkImageEditorDialog-PVf3IHGB.js.map → PkImageEditorDialog-Ceas-HZA.js.map} +1 -1
  8. package/dist/_chunks/{PkSelectionActions-CMyg_x8h.js → PkSelectionActions-Dl3cKb7x.js} +2 -2
  9. package/dist/_chunks/PkSelectionActions-Dl3cKb7x.js.map +1 -0
  10. package/dist/_chunks/{PkStreamingMarkdown-BDXbU2tz.js → PkStreamingMarkdown-DZvLHy2l.js} +2 -2
  11. package/dist/_chunks/{PkStreamingMarkdown-BDXbU2tz.js.map → PkStreamingMarkdown-DZvLHy2l.js.map} +1 -1
  12. package/dist/_chunks/{PkToolChatFile-CMQdMs-9.js → PkToolChatFile-D4ukZ9g6.js} +2 -2
  13. package/dist/_chunks/{PkToolChatFile-CMQdMs-9.js.map → PkToolChatFile-D4ukZ9g6.js.map} +1 -1
  14. package/dist/_chunks/{PkToolShowArtifact-YrC54qxc.js → PkToolShowArtifact-wIAxyXrL.js} +2 -2
  15. package/dist/_chunks/{PkToolShowArtifact-YrC54qxc.js.map → PkToolShowArtifact-wIAxyXrL.js.map} +1 -1
  16. package/dist/_chunks/{PkToolShowContactForm-Dio2FNkA.js → PkToolShowContactForm-BhcM-Z6m.js} +2 -2
  17. package/dist/_chunks/{PkToolShowContactForm-Dio2FNkA.js.map → PkToolShowContactForm-BhcM-Z6m.js.map} +1 -1
  18. package/dist/_chunks/{PkToolShowForm-w9HGhvCy.js → PkToolShowForm-D6k7_QLF.js} +3 -3
  19. package/dist/_chunks/{PkToolShowForm-w9HGhvCy.js.map → PkToolShowForm-D6k7_QLF.js.map} +1 -1
  20. package/dist/_chunks/{PkToolShowSources-DXFvFHOo.js → PkToolShowSources-Cw1ofky2.js} +2 -2
  21. package/dist/_chunks/{PkToolShowSources-DXFvFHOo.js.map → PkToolShowSources-Cw1ofky2.js.map} +1 -1
  22. package/dist/_chunks/{utils-BBoaLDYF.js → utils-C2aFWWye.js} +132 -110
  23. package/{dist-vue/_chunks/utils-C9l078yb.js.map → dist/_chunks/utils-C2aFWWye.js.map} +1 -1
  24. package/dist/ai-elements.es.js +2909 -2858
  25. package/dist/ai-elements.es.js.map +1 -1
  26. package/dist-vue/PkChatbot.js +1 -1
  27. package/dist-vue/PkChatbotEmptyState.js +1 -1
  28. package/dist-vue/PkChatbotInput.js +1 -1
  29. package/dist-vue/PkChatbotMessages.js +1 -1
  30. package/dist-vue/PkChatbotStepPayload.js +1 -1
  31. package/dist-vue/PkChatbotStepToolDetail.js +1 -1
  32. package/dist-vue/PkChatbotSteps.js +1 -1
  33. package/dist-vue/PkChatbotViewChat.js +1 -1
  34. package/dist-vue/PkChatbotViewConversations.js +1 -1
  35. package/dist-vue/_chunks/{PkChatbot-CxkTubw8.js → PkChatbot-CBSe9MOB.js} +5 -5
  36. package/dist-vue/_chunks/{PkChatbot-CxkTubw8.js.map → PkChatbot-CBSe9MOB.js.map} +1 -1
  37. package/dist-vue/_chunks/{PkChatbotEmptyState-CUoHkCgO.js → PkChatbotEmptyState-DfyYZXHQ.js} +2 -2
  38. package/dist-vue/_chunks/{PkChatbotEmptyState-CUoHkCgO.js.map → PkChatbotEmptyState-DfyYZXHQ.js.map} +1 -1
  39. package/dist-vue/_chunks/{PkChatbotInput-CPf7wqiQ.js → PkChatbotInput-CBalSveL.js} +4 -4
  40. package/dist-vue/_chunks/{PkChatbotInput-CPf7wqiQ.js.map → PkChatbotInput-CBalSveL.js.map} +1 -1
  41. package/dist-vue/_chunks/{PkChatbotMessages-CLNu2dTm.js → PkChatbotMessages-C2AUTqk4.js} +15 -15
  42. package/dist-vue/_chunks/{PkChatbotMessages-CLNu2dTm.js.map → PkChatbotMessages-C2AUTqk4.js.map} +1 -1
  43. package/dist-vue/_chunks/{PkChatbotStepPayload-Cf7mJPjL.js → PkChatbotStepPayload-Bb3Y6kuL.js} +2 -2
  44. package/dist-vue/_chunks/{PkChatbotStepPayload-Cf7mJPjL.js.map → PkChatbotStepPayload-Bb3Y6kuL.js.map} +1 -1
  45. package/dist-vue/_chunks/{PkChatbotStepToolDetail-D6nwNnHv.js → PkChatbotStepToolDetail-CwOxzYOe.js} +3 -3
  46. package/dist-vue/_chunks/{PkChatbotStepToolDetail-D6nwNnHv.js.map → PkChatbotStepToolDetail-CwOxzYOe.js.map} +1 -1
  47. package/dist-vue/_chunks/{PkChatbotSteps-xkxdaX7O.js → PkChatbotSteps-FduD9X9i.js} +5 -5
  48. package/dist-vue/_chunks/{PkChatbotSteps-xkxdaX7O.js.map → PkChatbotSteps-FduD9X9i.js.map} +1 -1
  49. package/dist-vue/_chunks/{PkChatbotViewChat-BkkyjiFl.js → PkChatbotViewChat-jl3ZbK7H.js} +6 -6
  50. package/dist-vue/_chunks/{PkChatbotViewChat-BkkyjiFl.js.map → PkChatbotViewChat-jl3ZbK7H.js.map} +1 -1
  51. package/dist-vue/_chunks/{PkChatbotViewConversations-hgqSO1hx.js → PkChatbotViewConversations-BtwTWqmM.js} +2 -2
  52. package/dist-vue/_chunks/{PkChatbotViewConversations-hgqSO1hx.js.map → PkChatbotViewConversations-BtwTWqmM.js.map} +1 -1
  53. package/dist-vue/_chunks/{PkFilePreview-CmsT6lSP.js → PkFilePreview-CRfDEYYo.js} +3 -3
  54. package/dist-vue/_chunks/PkFilePreview-CRfDEYYo.js.map +1 -0
  55. package/dist-vue/_chunks/{PkFilePreviewDialog-DIiTt9iK.js → PkFilePreviewDialog-u-0rhuRx.js} +2 -2
  56. package/dist-vue/_chunks/{PkFilePreviewDialog-DIiTt9iK.js.map → PkFilePreviewDialog-u-0rhuRx.js.map} +1 -1
  57. package/dist-vue/_chunks/{PkImageEditorDialog-CE0Y5Pwr.js → PkImageEditorDialog-CjMwpb-a.js} +2 -2
  58. package/dist-vue/_chunks/{PkImageEditorDialog-CE0Y5Pwr.js.map → PkImageEditorDialog-CjMwpb-a.js.map} +1 -1
  59. package/dist-vue/_chunks/{PkStreamingMarkdown-BBvCtDlO.js → PkStreamingMarkdown-7Kl_VBH-.js} +2 -2
  60. package/dist-vue/_chunks/{PkStreamingMarkdown-BBvCtDlO.js.map → PkStreamingMarkdown-7Kl_VBH-.js.map} +1 -1
  61. package/dist-vue/_chunks/{PkToolChatFile-DVhunkPS.js → PkToolChatFile-DcNRCVXy.js} +2 -2
  62. package/dist-vue/_chunks/{PkToolChatFile-DVhunkPS.js.map → PkToolChatFile-DcNRCVXy.js.map} +1 -1
  63. package/dist-vue/_chunks/{PkToolShowArtifact-DKOTsP9C.js → PkToolShowArtifact-C7CxCqVO.js} +2 -2
  64. package/dist-vue/_chunks/{PkToolShowArtifact-DKOTsP9C.js.map → PkToolShowArtifact-C7CxCqVO.js.map} +1 -1
  65. package/dist-vue/_chunks/{PkToolShowChart-CNBUjDc7.js → PkToolShowChart-DULlrMjq.js} +2 -2
  66. package/dist-vue/_chunks/{PkToolShowChart-CNBUjDc7.js.map → PkToolShowChart-DULlrMjq.js.map} +1 -1
  67. package/dist-vue/_chunks/{PkToolShowContactForm-D1Ff15Zf.js → PkToolShowContactForm-472d-SAE.js} +2 -2
  68. package/dist-vue/_chunks/{PkToolShowContactForm-D1Ff15Zf.js.map → PkToolShowContactForm-472d-SAE.js.map} +1 -1
  69. package/dist-vue/_chunks/{PkToolShowDiagram-CBwqjy6a.js → PkToolShowDiagram-RrqVpOaX.js} +2 -2
  70. package/dist-vue/_chunks/{PkToolShowDiagram-CBwqjy6a.js.map → PkToolShowDiagram-RrqVpOaX.js.map} +1 -1
  71. package/dist-vue/_chunks/{PkToolShowForm-D-rzzwJa.js → PkToolShowForm-CgyszDEI.js} +3 -3
  72. package/dist-vue/_chunks/{PkToolShowForm-D-rzzwJa.js.map → PkToolShowForm-CgyszDEI.js.map} +1 -1
  73. package/dist-vue/_chunks/{PkToolShowImageGallery-Cre2zSGV.js → PkToolShowImageGallery-LBx9JE6p.js} +2 -2
  74. package/dist-vue/_chunks/{PkToolShowImageGallery-Cre2zSGV.js.map → PkToolShowImageGallery-LBx9JE6p.js.map} +1 -1
  75. package/dist-vue/_chunks/{PkToolShowProductList-D4FAfMS-.js → PkToolShowProductList-THiH4EzZ.js} +2 -2
  76. package/dist-vue/_chunks/{PkToolShowProductList-D4FAfMS-.js.map → PkToolShowProductList-THiH4EzZ.js.map} +1 -1
  77. package/dist-vue/_chunks/{PkToolShowSources-BC6YJl-O.js → PkToolShowSources-CEqGXOOt.js} +2 -2
  78. package/dist-vue/_chunks/{PkToolShowSources-BC6YJl-O.js.map → PkToolShowSources-CEqGXOOt.js.map} +1 -1
  79. package/dist-vue/_chunks/{PkToolShowVideo-CxN7z_cZ.js → PkToolShowVideo-8Gi3vOer.js} +2 -2
  80. package/dist-vue/_chunks/{PkToolShowVideo-CxN7z_cZ.js.map → PkToolShowVideo-8Gi3vOer.js.map} +1 -1
  81. package/dist-vue/_chunks/{PkToolShowWebPages-0Ux6n8G1.js → PkToolShowWebPages-xjUPdfOU.js} +2 -2
  82. package/dist-vue/_chunks/{PkToolShowWebPages-0Ux6n8G1.js.map → PkToolShowWebPages-xjUPdfOU.js.map} +1 -1
  83. package/dist-vue/_chunks/{utils-C9l078yb.js → utils-VVbH-Liq.js} +22 -22
  84. package/dist-vue/_chunks/utils-VVbH-Liq.js.map +1 -0
  85. package/dist-vue/apps/web-component/src/composables/useChatbotAgent.d.ts +6 -6
  86. package/dist-vue/apps/web-component/src/composables/useSelectionActions.d.ts +14 -4
  87. package/dist-vue/composables.js +1 -1
  88. package/dist-vue/index.js +21 -21
  89. package/dist-vue/packages/components/src/chat/PkAgentSettingsPanel.d.ts +6 -6
  90. package/dist-vue/packages/components/src/chat/PkChatbotMessages.d.ts +1 -1
  91. package/dist-vue/packages/components/src/chat/PkSelectionActionIconPicker.d.ts +2 -2
  92. package/dist-vue/packages/components/src/chat/PkSelectionAnswerCard.d.ts +6 -0
  93. package/dist-vue/packages/components/src/chat/selectionActionEdits.d.ts +1 -1
  94. package/dist-vue/packages/components/src/chat/useChatFilePreview.d.ts +4 -4
  95. package/dist-vue/packages/components/src/chat/utils.d.ts +51 -4
  96. package/dist-vue/packages/composable/src/chatbot/useChatbotStore.d.ts +18 -18
  97. package/dist-vue/packages/composable/src/useSettledSelection.d.ts +2 -2
  98. package/dist-vue/packages/models/src/schema/Agent.d.ts +21 -21
  99. package/dist-vue/packages/models/src/schema/Chart.d.ts +1 -1
  100. package/dist-vue/packages/models/src/schema/ReasoningChat.d.ts +6 -6
  101. package/dist-vue/packages/models/src/schema/SelectionAction.d.ts +11 -11
  102. package/dist-vue/packages/models/src/schema/SelectionActionPreview.d.ts +3 -3
  103. package/dist-vue/packages/models/src/schema/SpreadsheetPreview.d.ts +5 -5
  104. package/dist-vue/packages/models/src/schema/SubAgent.d.ts +6 -6
  105. package/dist-vue/packages/models/src/schema/WordPreview.d.ts +1 -1
  106. package/package.json +1 -1
  107. package/dist/_chunks/PkSelectionActions-CMyg_x8h.js.map +0 -1
  108. package/dist/_chunks/utils-BBoaLDYF.js.map +0 -1
  109. package/dist-vue/_chunks/PkFilePreview-CmsT6lSP.js.map +0 -1
@@ -1,36 +1,36 @@
1
1
  import { r as e } from "./rolldown-runtime-9rEmUaIe.js";
2
- import { A as t, B as n, C as r, Et as i, F as a, I as o, J as s, L as c, N as l, Ot as u, Q as d, S as f, Tt as p, V as m, X as h, _ as g, d as _, f as v, g as y, gt as b, h as x, j as S, k as C, kt as w, ot as T, r as ee, tt as te, v as E, vt 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 ne } from "./vue-i18n-POtLvOl1.js";
4
- import { i as N, n as re, r as P } from "./excelNumberFormat-CcXF_wJK.js";
5
- import { G as ie, H as F, J as I, K as ae, U as oe, W as L, Y as se, o as ce, q as le, s as R } from "./utils-BBoaLDYF.js";
6
- import { d as ue, l as de } from "./dist-D6oUr4J_.js";
7
- import { r as fe } from "./index.es-DIHz5I8K.js";
8
- import { t as pe } from "./VvButtonLocalized-C8S7XJGv.js";
9
- import { a as me, i as z, r as he, t as ge } from "./PkSelectionActions-CMyg_x8h.js";
10
- import { t as B } from "./_plugin-vue_export-helper-Djzt4Yr7.js";
11
- import { t as _e } from "./PkEditorRadioButtons-Br4c42KS.js";
2
+ import { A as t, B as n, C as r, Et as i, F as a, I as o, J as s, L as c, N as l, Ot as u, Q as d, S as f, Tt as p, V as m, X as h, _ as g, d as _, f as v, g as y, gt as b, h as x, j as S, k as C, kt as w, ot as T, r as E, tt as ee, v as D, vt as O, w as k, wt as A, x as j, y as M, z as N } from "./vue.runtime.esm-bundler-C2U5uTqB.js";
3
+ import { r as te } from "./vue-i18n-POtLvOl1.js";
4
+ import { i as P, n as ne, r as F } from "./excelNumberFormat-CcXF_wJK.js";
5
+ import { G as re, J as I, K as L, U as ie, W as ae, X as R, Y as oe, o as se, q as ce, s as z } from "./utils-C2aFWWye.js";
6
+ import { d as le, l as ue } from "./dist-D6oUr4J_.js";
7
+ import { r as de } from "./index.es-DIHz5I8K.js";
8
+ import { t as fe } from "./VvButtonLocalized-C8S7XJGv.js";
9
+ import { a as pe, i as B, r as me, t as he } from "./PkSelectionActions-Dl3cKb7x.js";
10
+ import { t as V } from "./_plugin-vue_export-helper-Djzt4Yr7.js";
11
+ import { t as ge } from "./PkEditorRadioButtons-Br4c42KS.js";
12
12
  // ../../packages/components/src/chat/fileSelection.ts
13
- var V = 2e3, ve = 1e3, H = 60, U = 1400, W = 20, ye = 100, G = (e) => Number(e.slice(1)), K = (e) => {
14
- let t = [...new Set(e)].sort((e, t) => G(e) - G(t)), n = [];
13
+ var H = 2e3, _e = 1e3, U = 60, W = 1400, G = 20, ve = 100, K = (e) => Number(e.slice(1)), q = (e) => {
14
+ let t = [...new Set(e)].sort((e, t) => K(e) - K(t)), n = [];
15
15
  for (let e of t) {
16
16
  let t = n[n.length - 1];
17
- t && G(e) === G(t.to) + 1 ? t.to = e : n.push({
17
+ t && K(e) === K(t.to) + 1 ? t.to = e : n.push({
18
18
  from: e,
19
19
  to: e
20
20
  });
21
21
  }
22
22
  return n.slice(0, 100);
23
- }, be = (e, t) => {
23
+ }, ye = (e, t) => {
24
24
  let n = [];
25
25
  if (!t) return n;
26
26
  for (let r = e.indexOf(t); r >= 0; r = e.indexOf(t, r + 1)) n.push(r);
27
27
  return n;
28
- }, q = (e, t, n) => {
29
- let r = be(e, e.slice(t, t + n));
28
+ }, J = (e, t, n) => {
29
+ let r = ye(e, e.slice(t, t + n));
30
30
  if (r.length < 2) return {};
31
31
  let i = t, a = t + n;
32
- for (let t = !0; a - i <= U; t = !t) {
33
- if (be(e, e.slice(i, a)).length === 1) return { find: e.slice(i, a) };
32
+ for (let t = !0; a - i <= W; t = !t) {
33
+ if (ye(e, e.slice(i, a)).length === 1) return { find: e.slice(i, a) };
34
34
  if (t && i > 0) i = e.slice(0, i).replace(/\S*\s*$/, "").length;
35
35
  else if (a < e.length) {
36
36
  let t = e.slice(a).match(/^\s*\S*/)?.[0] ?? "";
@@ -41,23 +41,23 @@ var V = 2e3, ve = 1e3, H = 60, U = 1400, W = 20, ye = 100, G = (e) => Number(e.s
41
41
  index: r.indexOf(t) + 1 || 1,
42
42
  of: r.length
43
43
  } };
44
- }, xe = (e) => (e.querySelectorAll("[data-quote-skip]").forEach((e) => e.remove()), e.querySelectorAll("[data-paragraph]").forEach((e) => e.append("\n")), e.textContent ?? ""), Se = (e) => e.length > ve ? `${e.slice(0, ve / 2)} […] ${e.slice(-500)}` : e, Ce = (e) => {
44
+ }, be = (e) => (e.querySelectorAll("[data-quote-skip]").forEach((e) => e.remove()), e.querySelectorAll("[data-paragraph]").forEach((e) => e.append("\n")), e.textContent ?? ""), xe = (e) => e.length > _e ? `${e.slice(0, _e / 2)} […] ${e.slice(-500)}` : e, Se = (e) => {
45
45
  let t = e.startContainer.getRootNode().getSelection?.() ?? document.getSelection();
46
46
  try {
47
47
  t?.setBaseAndExtent(e.startContainer, e.startOffset, e.endContainer, e.endOffset);
48
48
  } catch {}
49
- }, we = (e, t, n) => {
49
+ }, Ce = (e, t, n) => {
50
50
  let r = t.commonAncestorContainer;
51
51
  if (!e.contains(r) || (r instanceof Element ? r : r.parentElement)?.closest("[data-quote-skip]")) return;
52
52
  let i = [...e.querySelectorAll("[data-paragraph]")].filter((e) => !e.closest(n) && t.intersectsNode(e));
53
53
  if (!i.length) return;
54
- let a = i.flatMap((e) => e.dataset.paragraph.split(" ")), o = xe(t.cloneContents()), s = o.trim();
54
+ let a = i.flatMap((e) => e.dataset.paragraph.split(" ")), o = be(t.cloneContents()), s = o.trim();
55
55
  if (s.length < 2) return;
56
56
  let c = {
57
57
  format: "docx",
58
- runs: K(a),
58
+ runs: q(a),
59
59
  paragraphCount: new Set(a).size,
60
- quote: Se(s),
60
+ quote: xe(s),
61
61
  measure: () => {
62
62
  let e = t.getBoundingClientRect(), n = t.getClientRects()[0] ?? e;
63
63
  return {
@@ -68,22 +68,22 @@ var V = 2e3, ve = 1e3, H = 60, U = 1400, W = 20, ye = 100, G = (e) => Number(e.s
68
68
  bottom: e.bottom
69
69
  };
70
70
  },
71
- restore: () => Ce(t)
71
+ restore: () => Se(t)
72
72
  };
73
73
  if (i.length === 1) {
74
74
  let e = i[0], n = document.createRange();
75
75
  n.selectNodeContents(e);
76
- let r = xe(n.cloneContents()).replace(/\n$/, ""), a = document.createRange();
76
+ let r = be(n.cloneContents()).replace(/\n$/, ""), a = document.createRange();
77
77
  a.setStart(e, 0), a.setEnd(t.startContainer, t.startOffset);
78
- let l = xe(a.cloneContents()).length + (o.length - o.trimStart().length);
79
- c.before = r.slice(Math.max(0, l - H), l), c.after = r.slice(l + s.length, l + s.length + H), Object.assign(c, q(r, l, s.length));
78
+ let l = be(a.cloneContents()).length + (o.length - o.trimStart().length);
79
+ c.before = r.slice(Math.max(0, l - U), l), c.after = r.slice(l + s.length, l + s.length + U), Object.assign(c, J(r, l, s.length));
80
80
  }
81
81
  return c;
82
- }, Te = (e) => {
82
+ }, we = (e) => {
83
83
  let t = "";
84
84
  for (let n = e; n > 0; n = Math.floor((n - 1) / 26)) t = String.fromCharCode(65 + (n - 1) % 26) + t;
85
85
  return t;
86
- }, Ee = (e, t) => {
86
+ }, Te = (e, t) => {
87
87
  let n = { ...t }, r = e.rows.flatMap((e) => e.cells.filter((e) => e.span).map((t) => ({
88
88
  r1: e.row,
89
89
  r2: e.row + t.span.rows - 1,
@@ -94,7 +94,7 @@ var V = 2e3, ve = 1e3, H = 60, U = 1400, W = 20, ye = 100, G = (e) => Number(e.s
94
94
  e = !1;
95
95
  for (let t of r) t.r1 <= n.r2 && t.r2 >= n.r1 && t.c1 <= n.c2 && t.c2 >= n.c1 && (t.r1 < n.r1 || t.r2 > n.r2 || t.c1 < n.c1 || t.c2 > n.c2) && (n.r1 = Math.min(n.r1, t.r1), n.r2 = Math.max(n.r2, t.r2), n.c1 = Math.min(n.c1, t.c1), n.c2 = Math.max(n.c2, t.c2), e = !0);
96
96
  }
97
- let i = `${Te(n.c1)}${n.r1}`, a = `${Te(n.c2)}${n.r2}`, o = (e.hiddenRows ?? []).filter((e) => e >= n.r1 && e <= n.r2).slice(0, ye), s = e.columns.filter((e) => e.hidden && e.col >= n.c1 && e.col <= n.c2).map((e) => Te(e.col)).slice(0, ye), c = e.rows.filter((e) => e.row >= n.r1 && e.row <= n.r2).flatMap((e) => e.cells.filter((e) => e.col >= n.c1 && e.col <= n.c2 && e.value !== void 0 && e.value !== "")).slice(0, W).map((e) => String(e.value)).join("; ").slice(0, 500);
97
+ let i = `${we(n.c1)}${n.r1}`, a = `${we(n.c2)}${n.r2}`, o = (e.hiddenRows ?? []).filter((e) => e >= n.r1 && e <= n.r2).slice(0, ve), s = e.columns.filter((e) => e.hidden && e.col >= n.c1 && e.col <= n.c2).map((e) => we(e.col)).slice(0, ve), c = e.rows.filter((e) => e.row >= n.r1 && e.row <= n.r2).flatMap((e) => e.cells.filter((e) => e.col >= n.c1 && e.col <= n.c2 && e.value !== void 0 && e.value !== "")).slice(0, G).map((e) => String(e.value)).join("; ").slice(0, 500);
98
98
  return {
99
99
  format: "xlsx",
100
100
  sheet: e.name,
@@ -107,20 +107,20 @@ var V = 2e3, ve = 1e3, H = 60, U = 1400, W = 20, ye = 100, G = (e) => Number(e.s
107
107
  };
108
108
  // ../../packages/components/src/chat/PkFileChart.vue?vue&type=script&setup=true&lang.ts
109
109
  C(), T(), p();
110
- var De = {
110
+ var Ee = {
111
111
  class: "pk-file-chart",
112
112
  "data-quote-skip": ""
113
- }, Oe = {
113
+ }, De = {
114
114
  key: 1,
115
115
  class: "pk-file-chart__placeholder"
116
- }, ke = { class: "pk-file-chart__title" }, J = /*#__PURE__*/ B(/* @__PURE__ */ O({
116
+ }, Oe = { class: "pk-file-chart__title" }, ke = /*#__PURE__*/ V(/* @__PURE__ */ k({
117
117
  __name: "PkFileChart",
118
118
  props: { preview: { type: null } },
119
119
  setup(e) {
120
- let t = r(() => import("./PkChart-CYFx_UDq.js")), { t: n } = ne({ useScope: "global" });
120
+ let t = r(() => import("./PkChart-CYFx_UDq.js")), { t: n } = te({ useScope: "global" });
121
121
  return (r, i) => {
122
- let a = fe;
123
- return M(), j("div", De, [e.preview.chart ? (M(), g(k(t), {
122
+ let a = de;
123
+ return N(), M("div", Ee, [e.preview.chart ? (N(), g(A(t), {
124
124
  key: 0,
125
125
  chart: e.preview.chart,
126
126
  colors: e.preview.colors,
@@ -130,19 +130,19 @@ var De = {
130
130
  "chart",
131
131
  "colors",
132
132
  "legend"
133
- ])) : (M(), j("div", Oe, [
133
+ ])) : (N(), M("div", De, [
134
134
  f(a, {
135
135
  name: "ri:bar-chart-2-line",
136
136
  class: "text-16"
137
137
  }),
138
- y("span", ke, w(e.preview.title || k(n)("chatFilePreview.chart")), 1),
139
- y("span", null, w(k(n)("chatFilePreview.chartNotDrawn")), 1)
138
+ y("span", Oe, w(e.preview.title || A(n)("chatFilePreview.chart")), 1),
139
+ y("span", null, w(A(n)("chatFilePreview.chartNotDrawn")), 1)
140
140
  ]))]);
141
141
  };
142
142
  }
143
143
  }), [["styles", [".pk-file-chart{width:100%;height:100%;padding:var(--spacing-8);box-sizing:border-box;color:#595959;background-color:#fff;border:1px solid #d9d9d9;font-family:Calibri,Carlito,Segoe UI,Arial,sans-serif}.pk-file-chart__placeholder{justify-content:center;align-items:center;gap:var(--spacing-4);height:100%;font-size:var(--text-12);text-align:center;flex-direction:column;display:flex}.pk-file-chart__title{font-size:var(--text-14)}"]]]);
144
144
  // ../../packages/components/src/chat/PkSpreadsheetPreview.vue?vue&type=script&setup=true&lang.ts
145
- C(), T(), p(), ee();
145
+ C(), T(), p(), E();
146
146
  var Ae = { class: "pk-spreadsheet-preview" }, je = { class: "pk-spreadsheet-preview__bar" }, Me = ["aria-label"], Ne = ["aria-label"], Pe = ["aria-label"], Fe = [
147
147
  "rowspan",
148
148
  "colspan",
@@ -163,7 +163,7 @@ var Ae = { class: "pk-spreadsheet-preview" }, je = { class: "pk-spreadsheet-prev
163
163
  }, Ge = {
164
164
  key: 0,
165
165
  class: "pk-spreadsheet-preview__average"
166
- }, Ke = { key: 1 }, qe = { class: "pk-spreadsheet-preview__zoom" }, Je = { class: "pk-spreadsheet-preview__percent" }, Ye = 64, Xe = 20, Ze = 28, Qe = 44, $e = 400, et = 10, tt = /*#__PURE__*/ B(/* @__PURE__ */ O({
166
+ }, Ke = { key: 1 }, qe = { class: "pk-spreadsheet-preview__zoom" }, Je = { class: "pk-spreadsheet-preview__percent" }, Ye = 64, Xe = 20, Ze = 28, Qe = 44, $e = 400, et = 10, tt = /*#__PURE__*/ V(/* @__PURE__ */ k({
167
167
  __name: "PkSpreadsheetPreview",
168
168
  props: /*@__PURE__*/ l({
169
169
  preview: { type: null },
@@ -176,43 +176,43 @@ var Ae = { class: "pk-spreadsheet-preview" }, je = { class: "pk-spreadsheet-prev
176
176
  }),
177
177
  emits: /*@__PURE__*/ l(["select"], ["update:sheet", "update:zoom"]),
178
178
  setup(e, { emit: t }) {
179
- let n = e, r = t, { t: l, locale: p } = ne({ useScope: "global" }), g = s(e, "sheet"), C = s(e, "zoom"), T = h("scrollEl"), { width: ee, height: te } = de(T, {
179
+ let n = e, r = t, { t: l, locale: p } = te({ useScope: "global" }), g = s(e, "sheet"), C = s(e, "zoom"), T = h("scrollEl"), { width: E, height: ee } = ue(T, {
180
180
  width: 0,
181
181
  height: 0
182
- }, { box: "border-box" }), D = x(() => n.preview.sheets[g.value] ?? n.preview.sheets[0]);
182
+ }, { box: "border-box" }), O = x(() => n.preview.sheets[g.value] ?? n.preview.sheets[0]);
183
183
  d(() => n.preview, () => {
184
184
  g.value = 0;
185
185
  });
186
- let O = x(() => n.marked?.get(D.value?.name ?? "")), ie = x(() => {
186
+ let k = x(() => n.marked?.get(O.value?.name ?? "")), re = x(() => {
187
187
  let e = /* @__PURE__ */ new Map();
188
- for (let t of O.value ?? []) {
188
+ for (let t of k.value ?? []) {
189
189
  let [n, r] = t.split(":"), i = e.get(Number(n));
190
190
  e.set(Number(n), i ? `${i},${r}` : r);
191
191
  }
192
192
  return e;
193
- }), F = (e, t) => !!O.value?.has(`${e}:${t}`);
193
+ }), I = (e, t) => !!k.value?.has(`${e}:${t}`);
194
194
  d(() => n.marked, (e) => {
195
- if (!e || O.value) return;
195
+ if (!e || k.value) return;
196
196
  let t = n.preview.sheets.findIndex((t) => e.has(t.name));
197
197
  t >= 0 && (g.value = t);
198
198
  }, { immediate: !0 });
199
- let I = () => he(T.value, ".pk-spreadsheet-preview__cell--marked");
200
- d(O, I, { flush: "post" }), c(I);
201
- let ae = (e) => {
199
+ let L = () => me(T.value, ".pk-spreadsheet-preview__cell--marked");
200
+ d(k, L, { flush: "post" }), c(L);
201
+ let ie = (e) => {
202
202
  let t = "";
203
203
  for (let n = e; n > 0; n = Math.floor((n - 1) / 26)) t = String.fromCharCode(65 + (n - 1) % 26) + t;
204
204
  return t;
205
- }, oe = x(() => (D.value?.charts ?? []).reduce((e, t) => ({
205
+ }, ae = x(() => (O.value?.charts ?? []).reduce((e, t) => ({
206
206
  col: Math.max(e.col, t.lastCol),
207
207
  row: Math.max(e.row, t.lastRow)
208
208
  }), {
209
209
  col: 0,
210
210
  row: 0
211
- })), L = x(() => {
212
- let e = D.value;
211
+ })), R = x(() => {
212
+ let e = O.value;
213
213
  if (!e) return [];
214
- 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 = Qe, a = ee.value / C.value;
215
- for (let o = 1; o <= e.lastColumn || o <= oe.value.col || !e.moreColumns && (o <= e.lastColumn + 2 || i < a); o++) {
214
+ 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 = Qe, a = E.value / C.value;
215
+ for (let o = 1; o <= e.lastColumn || o <= ae.value.col || !e.moreColumns && (o <= e.lastColumn + 2 || i < a); o++) {
216
216
  if (t.has(o)) continue;
217
217
  let e = n.get(o) ?? Ye;
218
218
  r.push({
@@ -221,11 +221,11 @@ var Ae = { class: "pk-spreadsheet-preview" }, je = { class: "pk-spreadsheet-prev
221
221
  }), i += e;
222
222
  }
223
223
  return r;
224
- }), se = x(() => L.value.reduce((e, t) => e + t.width, Qe)), ce = x(() => L.value.map((e) => `${e.col}:${e.width}`).join(",")), le = /* @__PURE__ */ new WeakMap(), R = x(() => {
225
- let e = D.value;
224
+ }), oe = x(() => R.value.reduce((e, t) => e + t.width, Qe)), se = x(() => R.value.map((e) => `${e.col}:${e.width}`).join(",")), ce = /* @__PURE__ */ new WeakMap(), z = x(() => {
225
+ let e = O.value;
226
226
  if (!e) return [];
227
- let t = new Set(e.hiddenRows ?? []), n = new Map(e.rows.map((e) => [e.row, e.height])), r = Math.ceil((te.value / C.value - Ze) / Xe), i = e.moreRows ? e.lastRow : Math.max(e.lastRow + 5, r + t.size, oe.value.row), a = le.get(e);
228
- a || (a = /* @__PURE__ */ new Map(), le.set(e, a));
227
+ let t = new Set(e.hiddenRows ?? []), n = new Map(e.rows.map((e) => [e.row, e.height])), r = Math.ceil((ee.value / C.value - Ze) / Xe), i = e.moreRows ? e.lastRow : Math.max(e.lastRow + 5, r + t.size, ae.value.row), a = ce.get(e);
228
+ a || (a = /* @__PURE__ */ new Map(), ce.set(e, a));
229
229
  let o = a;
230
230
  return Array.from({ length: i }, (e, t) => t + 1).filter((e) => !t.has(e)).map((e) => {
231
231
  let t = o.get(e);
@@ -234,14 +234,14 @@ var Ae = { class: "pk-spreadsheet-preview" }, je = { class: "pk-spreadsheet-prev
234
234
  height: n.get(e) ?? Xe
235
235
  }, o.set(e, t)), t;
236
236
  });
237
- }), ue = x(() => {
238
- let e = D.value?.charts ?? [];
237
+ }), le = x(() => {
238
+ let e = O.value?.charts ?? [];
239
239
  if (!e.length) return [];
240
240
  let t = C.value;
241
241
  return e.map((e, n) => {
242
- let r = L.value.reduce((t, n) => n.col < e.col ? t + n.width : t, Qe + e.x), i = R.value.reduce((t, n) => n.row < e.row ? t + n.height : t, Ze + e.y);
242
+ let r = R.value.reduce((t, n) => n.col < e.col ? t + n.width : t, Qe + e.x), i = z.value.reduce((t, n) => n.row < e.row ? t + n.height : t, Ze + e.y);
243
243
  return {
244
- key: `${D.value?.name}:${n}`,
244
+ key: `${O.value?.name}:${n}`,
245
245
  chart: e,
246
246
  css: {
247
247
  left: `${r * t}px`,
@@ -251,32 +251,32 @@ var Ae = { class: "pk-spreadsheet-preview" }, je = { class: "pk-spreadsheet-prev
251
251
  }
252
252
  };
253
253
  });
254
- }), fe = x(() => {
254
+ }), de = x(() => {
255
255
  let e = /* @__PURE__ */ new Map();
256
- for (let t of D.value?.rows ?? []) for (let n of t.cells) e.set(`${t.row},${n.col}`, n);
256
+ for (let t of O.value?.rows ?? []) for (let n of t.cells) e.set(`${t.row},${n.col}`, n);
257
257
  return e;
258
- }), me = x(() => {
258
+ }), pe = x(() => {
259
259
  let e = /* @__PURE__ */ new Map();
260
- for (let t of D.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}`, {
260
+ for (let t of O.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}`, {
261
261
  row: t.row,
262
262
  col: n.col
263
263
  });
264
264
  return e;
265
- }), z = (e, t) => fe.value.get(`${e},${t}`), ge = (e, t) => {
266
- let n = z(e, t)?.span;
265
+ }), B = (e, t) => de.value.get(`${e},${t}`), he = (e, t) => {
266
+ let n = B(e, t)?.span;
267
267
  if (n) return {
268
- rows: R.value.filter((t) => t.row >= e && t.row < e + n.rows).length,
269
- cols: L.value.filter((e) => e.col >= t && e.col < t + n.cols).length
268
+ rows: z.value.filter((t) => t.row >= e && t.row < e + n.rows).length,
269
+ cols: R.value.filter((e) => e.col >= t && e.col < t + n.cols).length
270
270
  };
271
- }, B = (e) => e?.style === void 0 ? void 0 : n.preview.styles[e.style], _e = (e) => {
271
+ }, V = (e) => e?.style === void 0 ? void 0 : n.preview.styles[e.style], ge = (e) => {
272
272
  let t = e.numFmt === void 0 ? void 0 : n.preview.numberFormats?.[e.numFmt], r = e.value;
273
273
  if (t !== void 0) try {
274
- return e.format === "date" ? e.serial === void 0 ? void 0 : re(t, e.serial, p.value, n.preview.date1904) : typeof r == "number" ? N(t) ? re(t, r, p.value, n.preview.date1904) : P(t, r, p.value) : void 0;
274
+ return e.format === "date" ? e.serial === void 0 ? void 0 : ne(t, e.serial, p.value, n.preview.date1904) : typeof r == "number" ? P(t) ? ne(t, r, p.value, n.preview.date1904) : F(t, r, p.value) : void 0;
275
275
  } catch {
276
276
  return;
277
277
  }
278
- }, V = (e, t) => {
279
- let n = _e(e);
278
+ }, H = (e, t) => {
279
+ let n = ge(e);
280
280
  if (n) return n.text;
281
281
  let r = e.decimals === void 0 ? { maximumFractionDigits: 10 } : {
282
282
  minimumFractionDigits: e.decimals,
@@ -291,18 +291,18 @@ var Ae = { class: "pk-spreadsheet-preview" }, je = { class: "pk-spreadsheet-prev
291
291
  currency: e.currency
292
292
  } : {}
293
293
  }).format(t);
294
- }, ve = (e) => {
294
+ }, _e = (e) => {
295
295
  let t = /* @__PURE__ */ new Date(`${e}T00:00:00Z`);
296
296
  return Number.isNaN(t.getTime()) ? e : new Intl.DateTimeFormat(p.value, {
297
297
  dateStyle: "short",
298
298
  timeZone: "UTC"
299
299
  }).format(t);
300
- }, H = (e) => {
300
+ }, U = (e) => {
301
301
  if (!e) return "";
302
302
  if (e.missing) return "—";
303
303
  let t = e.value;
304
- return t === void 0 ? "" : typeof t == "boolean" ? l(t ? "chatFilePreview.true" : "chatFilePreview.false") : e.format === "date" && typeof t == "string" ? _e(e)?.text ?? ve(t) : typeof t == "number" ? V(e, t) : t;
305
- }, U = (e) => {
304
+ return t === void 0 ? "" : typeof t == "boolean" ? l(t ? "chatFilePreview.true" : "chatFilePreview.false") : e.format === "date" && typeof t == "string" ? ge(e)?.text ?? _e(t) : typeof t == "number" ? H(e, t) : t;
305
+ }, W = (e) => {
306
306
  if (!e) return "";
307
307
  if (e.formula) return `=${e.formula}`;
308
308
  let t = e.value;
@@ -310,9 +310,9 @@ var Ae = { class: "pk-spreadsheet-preview" }, je = { class: "pk-spreadsheet-prev
310
310
  useGrouping: !1,
311
311
  maximumFractionDigits: 15,
312
312
  ...e.format === "percent" ? { style: "percent" } : {}
313
- }).format(t) : H(e);
314
- }, W = (e) => e ? `${e.width}px solid ${e.color}` : void 0, ye = (e, t, n) => {
315
- let r = B(e), i = e?.value, a = typeof i == "number" || e?.format === "date" || !!e?.missing, o = {
313
+ }).format(t) : U(e);
314
+ }, G = (e) => e ? `${e.width}px solid ${e.color}` : void 0, ve = (e, t, n) => {
315
+ let r = V(e), i = e?.value, a = typeof i == "number" || e?.format === "date" || !!e?.missing, o = {
316
316
  textAlign: r?.align ?? (a ? "right" : typeof i == "boolean" || e?.format === "error" ? "center" : "left"),
317
317
  verticalAlign: r?.valign === "top" ? "top" : r?.valign === "middle" ? "middle" : "bottom",
318
318
  whiteSpace: r?.wrap ? "pre-wrap" : "nowrap"
@@ -320,33 +320,33 @@ var Ae = { class: "pk-spreadsheet-preview" }, je = { class: "pk-spreadsheet-prev
320
320
  r?.bold && (o.fontWeight = 700), r?.italic && (o.fontStyle = "italic");
321
321
  let s = [r?.underline ? "underline" : "", r?.strike ? "line-through" : ""].filter(Boolean).join(" ");
322
322
  s && (o.textDecoration = s), r?.size && (o.fontSize = `${r.size}pt`);
323
- let c = e ? _e(e)?.color : void 0;
323
+ let c = e ? ge(e)?.color : void 0;
324
324
  if ((c ?? r?.color) && (o.color = c ?? r?.color), r?.fill && (o.backgroundColor = r.fill), r?.indent) {
325
325
  let e = `${4 + r.indent * 9}px`;
326
326
  o.textAlign === "right" ? o.paddingRight = e : o.paddingLeft = e;
327
327
  }
328
328
  let l = st(t, n);
329
- return G(t, n) ? (o.borderStyle = "hidden", o.boxShadow = [...l, Oe(e, t, n)].filter(Boolean).join(", ")) : (o.borderTop = W(r?.borders?.top), o.borderRight = W(r?.borders?.right), o.borderBottom = W(r?.borders?.bottom), o.borderLeft = W(r?.borders?.left), o.boxShadow = [...l, ...q(e, t, n)].join(", ")), Object.assign(o, rt(t, n)), o;
330
- }, G = (e, t) => {
331
- let n = D.value?.frozen;
329
+ return K(t, n) ? (o.borderStyle = "hidden", o.boxShadow = [...l, De(e, t, n)].filter(Boolean).join(", ")) : (o.borderTop = G(r?.borders?.top), o.borderRight = G(r?.borders?.right), o.borderBottom = G(r?.borders?.bottom), o.borderLeft = G(r?.borders?.left), o.boxShadow = [...l, ...J(e, t, n)].join(", ")), Object.assign(o, rt(t, n)), o;
330
+ }, K = (e, t) => {
331
+ let n = O.value?.frozen;
332
332
  return !!n && (e <= n.rows || t <= n.cols);
333
- }, K = {
333
+ }, q = {
334
334
  top: (e) => `inset 0 ${e.width}px 0 ${e.color}`,
335
335
  right: (e) => `inset -${e.width}px 0 0 ${e.color}`,
336
336
  bottom: (e) => `inset 0 -${e.width}px 0 ${e.color}`,
337
337
  left: (e) => `inset ${e.width}px 0 0 ${e.color}`
338
- }, be = (...e) => e.reduce((e, t) => t && (!e || t.width > e.width) ? t : e, void 0), q = (e, t, n) => {
339
- let r = B(e)?.borders;
340
- return [t === R.value[0]?.row && r?.top && K.top(r.top), n === L.value[0]?.col && r?.left && K.left(r.left)].filter((e) => !!e);
341
- }, xe = x(() => R.value.map((e) => e.row)), Se = x(() => L.value.map((e) => e.col)), Ce = x(() => new Map(xe.value.map((e, t) => [e, t]))), we = x(() => new Map(Se.value.map((e, t) => [e, t]))), Te = (e, t, n, r) => {
338
+ }, ye = (...e) => e.reduce((e, t) => t && (!e || t.width > e.width) ? t : e, void 0), J = (e, t, n) => {
339
+ let r = V(e)?.borders;
340
+ return [t === z.value[0]?.row && r?.top && q.top(r.top), n === R.value[0]?.col && r?.left && q.left(r.left)].filter((e) => !!e);
341
+ }, be = x(() => z.value.map((e) => e.row)), xe = x(() => R.value.map((e) => e.col)), Se = x(() => new Map(be.value.map((e, t) => [e, t]))), Ce = x(() => new Map(xe.value.map((e, t) => [e, t]))), we = (e, t, n, r) => {
342
342
  let i = [], a = t.get(n) ?? e.length;
343
343
  for (; a < e.length && e[a] < n + r; a++) i.push(e[a]);
344
344
  return {
345
345
  spanned: i,
346
346
  next: e[a]
347
347
  };
348
- }, De = (e, t, n, r) => {
349
- let { spanned: i, next: a } = Te(xe.value, Ce.value, t, e?.span?.rows ?? 1), { spanned: o, next: s } = Te(Se.value, we.value, n, e?.span?.cols ?? 1);
348
+ }, Ee = (e, t, n, r) => {
349
+ let { spanned: i, next: a } = we(be.value, Se.value, t, e?.span?.rows ?? 1), { spanned: o, next: s } = we(xe.value, Ce.value, n, e?.span?.cols ?? 1);
350
350
  return (r === "right" ? s === void 0 ? [] : i.map((e) => ({
351
351
  row: e,
352
352
  col: s
@@ -354,27 +354,27 @@ var Ae = { class: "pk-spreadsheet-preview" }, je = { class: "pk-spreadsheet-prev
354
354
  row: a,
355
355
  col: e
356
356
  }))).map((e) => {
357
- let t = me.value.get(`${e.row},${e.col}`) ?? e;
358
- return z(t.row, t.col);
357
+ let t = pe.value.get(`${e.row},${e.col}`) ?? e;
358
+ return B(t.row, t.col);
359
359
  });
360
- }, Oe = (e, t, n) => {
361
- let r = B(e)?.borders, i = be(r?.right, ...De(e, t, n, "right").map((e) => B(e)?.borders?.left)), a = be(r?.bottom, ...De(e, t, n, "bottom").map((e) => B(e)?.borders?.top)), o = D.value?.gridlines;
360
+ }, De = (e, t, n) => {
361
+ let r = V(e)?.borders, i = ye(r?.right, ...Ee(e, t, n, "right").map((e) => V(e)?.borders?.left)), a = ye(r?.bottom, ...Ee(e, t, n, "bottom").map((e) => V(e)?.borders?.top)), o = O.value?.gridlines;
362
362
  return [
363
- i ? K.right(i) : o && "inset calc(var(--border) * -1) 0 0 var(--pk-spreadsheet-gridline)",
364
- a ? K.bottom(a) : o && "inset 0 calc(var(--border) * -1) 0 var(--pk-spreadsheet-gridline)",
365
- ...q(e, t, n)
363
+ i ? q.right(i) : o && "inset calc(var(--border) * -1) 0 0 var(--pk-spreadsheet-gridline)",
364
+ a ? q.bottom(a) : o && "inset 0 calc(var(--border) * -1) 0 var(--pk-spreadsheet-gridline)",
365
+ ...J(e, t, n)
366
366
  ].filter(Boolean).join(", ");
367
- }, ke = (e) => Ze + R.value.filter((t) => t.row < e).reduce((e, t) => e + t.height, 0), tt = (e) => Qe + L.value.filter((t) => t.col < e).reduce((e, t) => e + t.width, 0), nt = x(() => {
368
- let e = D.value?.frozen;
367
+ }, Oe = (e) => Ze + z.value.filter((t) => t.row < e).reduce((e, t) => e + t.height, 0), tt = (e) => Qe + R.value.filter((t) => t.col < e).reduce((e, t) => e + t.width, 0), nt = x(() => {
368
+ let e = O.value?.frozen;
369
369
  return {
370
- top: ke((e?.rows ?? 0) + 1),
370
+ top: Oe((e?.rows ?? 0) + 1),
371
371
  left: tt((e?.cols ?? 0) + 1)
372
372
  };
373
373
  }), rt = (e, t) => {
374
- let n = D.value?.frozen;
374
+ let n = O.value?.frozen;
375
375
  if (!n) return {};
376
376
  let r = {};
377
- return e <= n.rows && (r.position = "sticky", r.top = `${ke(e)}px`, r.scrollMarginTop = r.top, r.zIndex = 0), t <= n.cols && (r.position = "sticky", r.left = `${tt(t)}px`, r.scrollMarginLeft = r.left, r.zIndex = +(e <= n.rows)), r;
377
+ return e <= n.rows && (r.position = "sticky", r.top = `${Oe(e)}px`, r.scrollMarginTop = r.top, r.zIndex = 0), t <= n.cols && (r.position = "sticky", r.left = `${tt(t)}px`, r.scrollMarginLeft = r.left, r.zIndex = +(e <= n.rows)), r;
378
378
  }, Y = b({
379
379
  row: 1,
380
380
  col: 1
@@ -382,7 +382,7 @@ var Ae = { class: "pk-spreadsheet-preview" }, je = { class: "pk-spreadsheet-prev
382
382
  row: 1,
383
383
  col: 1
384
384
  });
385
- d(D, () => {
385
+ d(O, () => {
386
386
  Y.value = {
387
387
  row: 1,
388
388
  col: 1
@@ -399,7 +399,7 @@ var Ae = { class: "pk-spreadsheet-preview" }, je = { class: "pk-spreadsheet-prev
399
399
  })), it = (e, t) => e >= Z.value.r1 && e <= Z.value.r2 && t >= Z.value.c1 && t <= Z.value.c2, at = (e, t) => X.value.row === e && X.value.col === t, ot = (e) => e >= Z.value.r1 && e <= Z.value.r2 ? `${Z.value.c1}:${Z.value.c2}:${X.value.row === e ? X.value.col : 0}:${e === Z.value.r1 ? "t" : ""}${e === Z.value.r2 ? "b" : ""}` : "", st = (e, t) => {
400
400
  let { r1: n, r2: r, c1: i, c2: a } = Z.value;
401
401
  if (n === r && i === a || !it(e, t)) return [];
402
- let o = z(e, t)?.span, s = e + (o?.rows ?? 1) - 1, c = t + (o?.cols ?? 1) - 1, l = "var(--spacing-2)", u = "var(--pk-spreadsheet-green)";
402
+ let o = B(e, t)?.span, s = e + (o?.rows ?? 1) - 1, c = t + (o?.cols ?? 1) - 1, l = "var(--spacing-2)", u = "var(--pk-spreadsheet-green)";
403
403
  return [
404
404
  e === n && `inset 0 ${l} 0 ${u}`,
405
405
  s >= r && `inset 0 calc(${l} * -1) 0 ${u}`,
@@ -428,8 +428,8 @@ var Ae = { class: "pk-spreadsheet-preview" }, je = { class: "pk-spreadsheet-prev
428
428
  },
429
429
  bottom: Math.max(...e.map((e) => e.bottom))
430
430
  };
431
- }, ft = () => D.value ? {
432
- ...Ee(D.value, Z.value),
431
+ }, ft = () => O.value ? {
432
+ ...Te(O.value, Z.value),
433
433
  measure: dt
434
434
  } : void 0;
435
435
  d([Z, Q], () => {
@@ -441,7 +441,7 @@ var Ae = { class: "pk-spreadsheet-preview" }, je = { class: "pk-spreadsheet-prev
441
441
  let pt = () => {
442
442
  clearTimeout(ut), r("select", ft());
443
443
  }, $, mt;
444
- d(D, () => {
444
+ d(O, () => {
445
445
  mt = void 0;
446
446
  });
447
447
  let ht = (e) => {
@@ -512,7 +512,7 @@ var Ae = { class: "pk-spreadsheet-preview" }, je = { class: "pk-spreadsheet-prev
512
512
  }[e.key];
513
513
  if (!t) return;
514
514
  e.preventDefault();
515
- let n = R.value.map((e) => e.row), r = L.value.map((e) => e.col), i = (e) => me.value.get(`${e.row},${e.col}`) ?? e, o = i(X.value), s = n.indexOf(X.value.row), c = r.indexOf(X.value.col), l = o;
515
+ let n = z.value.map((e) => e.row), r = R.value.map((e) => e.col), i = (e) => pe.value.get(`${e.row},${e.col}`) ?? e, o = i(X.value), s = n.indexOf(X.value.row), c = r.indexOf(X.value.col), l = o;
516
516
  for (;;) {
517
517
  let e = Math.min(n.length - 1, Math.max(0, s + t[0])), a = Math.min(r.length - 1, Math.max(0, c + t[1]));
518
518
  if (e === s && a === c || (s = e, c = a, l = i({
@@ -524,38 +524,38 @@ var Ae = { class: "pk-spreadsheet-preview" }, je = { class: "pk-spreadsheet-prev
524
524
  block: "nearest",
525
525
  inline: "nearest"
526
526
  }));
527
- }, St = x(() => z(X.value.row, X.value.col)), Ct = x(() => {
527
+ }, St = x(() => B(X.value.row, X.value.col)), Ct = x(() => {
528
528
  let { r1: e, r2: t, c1: n, c2: r } = Z.value;
529
529
  if (e === t && n === r) return;
530
530
  let i = 0, a = 0, o = 0, s;
531
531
  for (let c = e; c <= t; c++) for (let e = n; e <= r; e++) {
532
- let t = z(c, e);
532
+ let t = B(c, e);
533
533
  t && (t.value !== void 0 || t.missing) && (i++, typeof t.value == "number" && (a += t.value, o++, s ??= t));
534
534
  }
535
535
  if (i) return {
536
536
  count: i,
537
- sum: s ? V(s, a) : void 0,
538
- average: s ? V(s, a / o) : void 0
537
+ sum: s ? H(s, a) : void 0,
538
+ average: s ? H(s, a / o) : void 0
539
539
  };
540
540
  }), wt = (e) => {
541
541
  C.value = Math.min(2, Math.max(.5, Math.round((C.value + e) * 10) / 10));
542
542
  };
543
543
  return (t, n) => {
544
- let r = pe;
545
- return M(), j("div", Ae, [
544
+ let r = fe;
545
+ return N(), M("div", Ae, [
546
546
  y("div", je, [
547
547
  y("span", {
548
548
  class: "pk-spreadsheet-preview__ref",
549
- "aria-label": k(l)("chatFilePreview.cell")
550
- }, w(ae(X.value.col)) + w(X.value.row), 9, Me),
549
+ "aria-label": A(l)("chatFilePreview.cell")
550
+ }, w(ie(X.value.col)) + w(X.value.row), 9, Me),
551
551
  n[6] ||= y("span", {
552
552
  class: "pk-spreadsheet-preview__fx",
553
553
  "aria-hidden": "true"
554
554
  }, "fx", -1),
555
555
  y("output", {
556
556
  class: "pk-spreadsheet-preview__formula",
557
- "aria-label": k(l)("chatFilePreview.formulaBar")
558
- }, w(U(St.value)), 9, Ne)
557
+ "aria-label": A(l)("chatFilePreview.formulaBar")
558
+ }, w(W(St.value)), 9, Ne)
559
559
  ]),
560
560
  y("div", {
561
561
  ref_key: "scrollEl",
@@ -563,7 +563,7 @@ var Ae = { class: "pk-spreadsheet-preview" }, je = { class: "pk-spreadsheet-prev
563
563
  class: "pk-spreadsheet-preview__scroll",
564
564
  tabindex: "0",
565
565
  role: "grid",
566
- "aria-label": D.value?.name,
566
+ "aria-label": O.value?.name,
567
567
  onKeydown: xt,
568
568
  onMouseup: n[2] ||= (e) => Q.value = !1,
569
569
  onMouseleave: n[3] ||= (e) => Q.value = !1,
@@ -572,104 +572,104 @@ var Ae = { class: "pk-spreadsheet-preview" }, je = { class: "pk-spreadsheet-prev
572
572
  onTouchend: bt,
573
573
  onTouchcancel: gt
574
574
  }, [
575
- D.value ? (M(), j("table", {
575
+ O.value ? (N(), M("table", {
576
576
  key: 0,
577
- class: i(["pk-spreadsheet-preview__grid", { "pk-spreadsheet-preview__grid--lines": D.value.gridlines }]),
577
+ class: i(["pk-spreadsheet-preview__grid", { "pk-spreadsheet-preview__grid--lines": O.value.gridlines }]),
578
578
  style: u({
579
579
  zoom: C.value,
580
- width: `${se.value}px`,
580
+ width: `${oe.value}px`,
581
581
  "--pk-spreadsheet-stuck-top": `${nt.value.top}px`,
582
582
  "--pk-spreadsheet-stuck-left": `${nt.value.left}px`
583
583
  })
584
584
  }, [
585
- y("colgroup", null, [y("col", { style: u({ width: `${Qe}px` }) }, null, 4), (M(!0), j(v, null, m(L.value, (e) => (M(), j("col", {
585
+ y("colgroup", null, [y("col", { style: u({ width: `${Qe}px` }) }, null, 4), (N(!0), M(v, null, m(R.value, (e) => (N(), M("col", {
586
586
  key: e.col,
587
587
  style: u({ width: `${e.width}px` })
588
588
  }, null, 4))), 128))]),
589
- y("thead", null, [y("tr", { style: u({ height: `${Ze}px` }) }, [n[7] ||= y("th", { class: "pk-spreadsheet-preview__corner" }, null, -1), (M(!0), j(v, null, m(L.value, (e) => (M(), j("th", {
589
+ y("thead", null, [y("tr", { style: u({ height: `${Ze}px` }) }, [n[7] ||= y("th", { class: "pk-spreadsheet-preview__corner" }, null, -1), (N(!0), M(v, null, m(R.value, (e) => (N(), M("th", {
590
590
  key: e.col,
591
591
  scope: "col",
592
592
  class: i(["pk-spreadsheet-preview__head", { "pk-spreadsheet-preview__head--current": e.col >= Z.value.c1 && e.col <= Z.value.c2 }]),
593
- style: u(D.value.frozen && e.col <= D.value.frozen.cols ? {
593
+ style: u(O.value.frozen && e.col <= O.value.frozen.cols ? {
594
594
  left: `${tt(e.col)}px`,
595
595
  zIndex: 2
596
596
  } : void 0)
597
- }, w(ae(e.col)), 7))), 128))], 4)]),
598
- y("tbody", null, [(M(!0), j(v, null, m(R.value, (e, t, n, r) => {
597
+ }, w(ie(e.col)), 7))), 128))], 4)]),
598
+ y("tbody", null, [(N(!0), M(v, null, m(z.value, (e, t, n, r) => {
599
599
  let a = [
600
600
  e,
601
- D.value,
602
- ce.value,
603
- k(p),
601
+ O.value,
602
+ se.value,
603
+ A(p),
604
604
  ot(e.row),
605
- ie.value.get(e.row)
605
+ re.value.get(e.row)
606
606
  ];
607
607
  if (r && r.el && r.key === e.row && S(r, a)) return r;
608
- let o = (M(), j("tr", {
608
+ let o = (N(), M("tr", {
609
609
  key: e.row,
610
610
  style: u({ height: `${e.height}px` })
611
611
  }, [y("th", {
612
612
  scope: "row",
613
613
  class: i(["pk-spreadsheet-preview__row", { "pk-spreadsheet-preview__row--current": e.row >= Z.value.r1 && e.row <= Z.value.r2 }]),
614
- style: u(D.value.frozen && e.row <= D.value.frozen.rows ? {
614
+ style: u(O.value.frozen && e.row <= O.value.frozen.rows ? {
615
615
  ...rt(e.row, 0),
616
616
  left: 0,
617
617
  zIndex: 4
618
618
  } : void 0)
619
- }, w(e.row), 7), (M(!0), j(v, null, m(L.value, (t) => (M(), j(v, { key: t.col }, [me.value.has(`${e.row},${t.col}`) ? E("", !0) : (M(), j("td", {
619
+ }, w(e.row), 7), (N(!0), M(v, null, m(R.value, (t) => (N(), M(v, { key: t.col }, [pe.value.has(`${e.row},${t.col}`) ? D("", !0) : (N(), M("td", {
620
620
  key: 0,
621
- rowspan: ge(e.row, t.col)?.rows,
622
- colspan: ge(e.row, t.col)?.cols,
621
+ rowspan: he(e.row, t.col)?.rows,
622
+ colspan: he(e.row, t.col)?.cols,
623
623
  class: i(["pk-spreadsheet-preview__cell", {
624
624
  "pk-spreadsheet-preview__cell--range": it(e.row, t.col) && !at(e.row, t.col),
625
- "pk-spreadsheet-preview__cell--missing": z(e.row, t.col)?.missing,
626
- "pk-spreadsheet-preview__cell--marked": F(e.row, t.col)
625
+ "pk-spreadsheet-preview__cell--missing": B(e.row, t.col)?.missing,
626
+ "pk-spreadsheet-preview__cell--marked": I(e.row, t.col)
627
627
  }]),
628
- style: u(ye(z(e.row, t.col), e.row, t.col)),
628
+ style: u(ve(B(e.row, t.col), e.row, t.col)),
629
629
  "data-focus": at(e.row, t.col) ? "" : void 0,
630
630
  "data-cell": `${e.row}:${t.col}`,
631
- title: z(e.row, t.col)?.missing ? k(l)("chatFilePreview.missingValue") : void 0,
631
+ title: B(e.row, t.col)?.missing ? A(l)("chatFilePreview.missingValue") : void 0,
632
632
  onMousedown: _((n) => ct(e.row, t.col, n), ["prevent"]),
633
633
  onMouseenter: (n) => lt(e.row, t.col),
634
634
  onDblclick: pt
635
- }, w(H(z(e.row, t.col))), 47, Fe))], 64))), 128))], 4));
635
+ }, w(U(B(e.row, t.col))), 47, Fe))], 64))), 128))], 4));
636
636
  return o.memo = a, o;
637
637
  }, n, 0), 128))])
638
- ], 6)) : E("", !0),
639
- ue.value.length ? (M(), j("div", Ie, [(M(!0), j(v, null, m(ue.value, (e) => (M(), j("div", {
638
+ ], 6)) : D("", !0),
639
+ le.value.length ? (N(), M("div", Ie, [(N(!0), M(v, null, m(le.value, (e) => (N(), M("div", {
640
640
  key: e.key,
641
641
  class: "pk-spreadsheet-preview__chart",
642
642
  style: u(e.css)
643
- }, [f(J, { preview: e.chart }, null, 8, ["preview"])], 4))), 128))])) : E("", !0),
644
- D.value && (D.value.moreRows || D.value.moreColumns) ? (M(), j("p", Le, [D.value.moreRows ? (M(), j(v, { key: 0 }, [A(w(k(l)("chatFilePreview.moreRows", D.value.moreRows)), 1)], 64)) : E("", !0), D.value.moreColumns ? (M(), j(v, { key: 1 }, [A(w(k(l)("chatFilePreview.moreColumns", D.value.moreColumns)), 1)], 64)) : E("", !0)])) : E("", !0)
643
+ }, [f(ke, { preview: e.chart }, null, 8, ["preview"])], 4))), 128))])) : D("", !0),
644
+ O.value && (O.value.moreRows || O.value.moreColumns) ? (N(), M("p", Le, [O.value.moreRows ? (N(), M(v, { key: 0 }, [j(w(A(l)("chatFilePreview.moreRows", O.value.moreRows)), 1)], 64)) : D("", !0), O.value.moreColumns ? (N(), M(v, { key: 1 }, [j(w(A(l)("chatFilePreview.moreColumns", O.value.moreColumns)), 1)], 64)) : D("", !0)])) : D("", !0)
645
645
  ], 40, Pe),
646
646
  y("nav", {
647
647
  class: "pk-spreadsheet-preview__sheets",
648
- "aria-label": k(l)("chatFilePreview.sheets")
649
- }, [(M(!0), j(v, null, m(e.preview.sheets, (e, t) => (M(), j("button", {
648
+ "aria-label": A(l)("chatFilePreview.sheets")
649
+ }, [(N(!0), M(v, null, m(e.preview.sheets, (e, t) => (N(), M("button", {
650
650
  key: e.name,
651
651
  type: "button",
652
652
  class: "pk-spreadsheet-preview__sheet",
653
653
  "aria-current": t === g.value ? "page" : void 0,
654
654
  onClick: (e) => g.value = t
655
655
  }, w(e.name), 9, ze))), 128))], 8, Re),
656
- y("div", Be, [y("p", Ve, [e.preview.staleFormulas ? (M(), j("span", {
656
+ y("div", Be, [y("p", Ve, [e.preview.staleFormulas ? (N(), M("span", {
657
657
  key: 0,
658
658
  class: "pk-spreadsheet-preview__note",
659
- title: k(l)("chatFilePreview.staleFormulas")
660
- }, w(k(l)("chatFilePreview.staleFormulas")), 9, He)) : e.preview.computedFormulas ? (M(), j("span", {
659
+ title: A(l)("chatFilePreview.staleFormulas")
660
+ }, w(A(l)("chatFilePreview.staleFormulas")), 9, He)) : e.preview.computedFormulas ? (N(), M("span", {
661
661
  key: 1,
662
662
  class: "pk-spreadsheet-preview__note",
663
- title: k(l)("chatFilePreview.computedFormulas")
664
- }, w(k(l)("chatFilePreview.computedFormulas")), 9, Ue)) : E("", !0), Ct.value ? (M(), j("span", We, [
665
- Ct.value.average ? (M(), j("span", Ge, w(k(l)("chatFilePreview.average")) + " " + w(Ct.value.average), 1)) : E("", !0),
666
- y("span", null, w(k(l)("chatFilePreview.count")) + " " + w(Ct.value.count), 1),
667
- Ct.value.sum ? (M(), j("span", Ke, w(k(l)("chatFilePreview.sum")) + " " + w(Ct.value.sum), 1)) : E("", !0)
668
- ])) : E("", !0)]), y("div", qe, [
663
+ title: A(l)("chatFilePreview.computedFormulas")
664
+ }, w(A(l)("chatFilePreview.computedFormulas")), 9, Ue)) : D("", !0), Ct.value ? (N(), M("span", We, [
665
+ Ct.value.average ? (N(), M("span", Ge, w(A(l)("chatFilePreview.average")) + " " + w(Ct.value.average), 1)) : D("", !0),
666
+ y("span", null, w(A(l)("chatFilePreview.count")) + " " + w(Ct.value.count), 1),
667
+ Ct.value.sum ? (N(), M("span", Ke, w(A(l)("chatFilePreview.sum")) + " " + w(Ct.value.sum), 1)) : D("", !0)
668
+ ])) : D("", !0)]), y("div", qe, [
669
669
  f(r, {
670
670
  modifiers: "action-quiet",
671
671
  icon: "ri:subtract-line",
672
- "aria-label": k(l)("chatFilePreview.zoomOut"),
672
+ "aria-label": A(l)("chatFilePreview.zoomOut"),
673
673
  disabled: C.value <= .5,
674
674
  onClick: n[4] ||= (e) => wt(-.1)
675
675
  }, null, 8, ["aria-label", "disabled"]),
@@ -677,7 +677,7 @@ var Ae = { class: "pk-spreadsheet-preview" }, je = { class: "pk-spreadsheet-prev
677
677
  f(r, {
678
678
  modifiers: "action-quiet",
679
679
  icon: "ri:add-line",
680
- "aria-label": k(l)("chatFilePreview.zoomIn"),
680
+ "aria-label": A(l)("chatFilePreview.zoomIn"),
681
681
  disabled: C.value >= 2,
682
682
  onClick: n[5] ||= (e) => wt(.1)
683
683
  }, null, 8, ["aria-label", "disabled"])
@@ -692,7 +692,7 @@ var nt = ["src"], rt = {
692
692
  key: 2,
693
693
  class: "pk-word-preview__image",
694
694
  "data-quote-skip": ""
695
- }, Y = ["title"], X = ["title"], Z = ["data-quote-skip"], it = /* @__PURE__ */ O({
695
+ }, Y = ["title"], X = ["title"], Z = ["data-quote-skip"], it = /* @__PURE__ */ k({
696
696
  __name: "PkWordPreviewRuns",
697
697
  props: {
698
698
  runs: { type: Array },
@@ -701,7 +701,7 @@ var nt = ["src"], rt = {
701
701
  numbers: { type: Object }
702
702
  },
703
703
  setup(e) {
704
- let n = e, { t: r } = ne({ useScope: "global" }), a = t(R, void 0), o = t(ce, void 0), s = (e) => e.picture ? se(a?.value, e.picture.ref) : void 0, c = (e) => e.chart ? o?.value?.[e.chart.ref] : void 0, l = (e) => n.page ? I(e) : "inline", d = (e) => l(e) === "page" ? {
704
+ let n = e, { t: r } = te({ useScope: "global" }), a = t(z, void 0), o = t(se, void 0), s = (e) => e.picture ? R(a?.value, e.picture.ref) : void 0, c = (e) => e.chart ? o?.value?.[e.chart.ref] : void 0, l = (e) => n.page ? oe(e) : "inline", d = (e) => l(e) === "page" ? {
705
705
  ...e,
706
706
  anchor: void 0
707
707
  } : e, p = (e) => {
@@ -710,7 +710,7 @@ var nt = ["src"], rt = {
710
710
  aspectRatio: `${e.width} / ${e.height}`
711
711
  }, r = e.anchor, i = n.page;
712
712
  if (!r || !i) return t;
713
- let a = r.xFrom === "page" ? r.x - i.margins.left : r.x, o = I(e);
713
+ let a = r.xFrom === "page" ? r.x - i.margins.left : r.x, o = oe(e);
714
714
  if (o === "around") {
715
715
  let n = i.width - i.margins.left - i.margins.right, o = a + e.width / 2 < n / 2;
716
716
  return {
@@ -732,14 +732,14 @@ var nt = ["src"], rt = {
732
732
  zIndex: r.wrap === "behind" ? -1 : 1
733
733
  };
734
734
  }, h = (e) => e.field && n.numbers ? String(n.numbers[e.field]) : e.text, g = x(() => {
735
- let e = L(n.runs, n.mode ?? "markup"), t = (e) => {
735
+ let e = re(n.runs, n.mode ?? "markup"), t = (e) => {
736
736
  let t = e.picture ?? (e.chart && d(e.chart));
737
- return !!t && !!n.page && ["around", "block"].includes(I(t));
737
+ return !!t && !!n.page && ["around", "block"].includes(oe(t));
738
738
  };
739
739
  return [...e.filter(t), ...e.filter((e) => !t(e))];
740
740
  }), _ = x(() => !n.mode || n.mode === "markup"), y = (e) => {
741
741
  let t = {};
742
- e.font && (t.fontFamily = oe(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");
742
+ 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");
743
743
  let n = [e.underline ? "underline" : "", e.strike ? "line-through" : ""].filter(Boolean).join(" ");
744
744
  return n && (t.textDecoration = n), e.caps && (t.textTransform = "uppercase"), e.vertAlign && (t.verticalAlign = e.vertAlign, t.fontSize = `${(e.size ?? 11) * .65}pt`), t;
745
745
  }, b = (e) => {
@@ -749,28 +749,28 @@ var nt = ["src"], rt = {
749
749
  textDecoration: [...n].join(" ")
750
750
  };
751
751
  }, S = (e) => e.author ? r("chatFilePreview.revisionBy", { author: e.author }) : void 0;
752
- return (e, t) => (M(!0), j(v, null, m(g.value, (e, t) => (M(), j(v, { key: t }, [e.image ? (M(), j(v, { key: 0 }, [e.chart && c(e) ? (M(), j("span", {
752
+ return (e, t) => (N(!0), M(v, null, m(g.value, (e, t) => (N(), M(v, { key: t }, [e.image ? (N(), M(v, { key: 0 }, [e.chart && c(e) ? (N(), M("span", {
753
753
  key: 0,
754
754
  class: i(["pk-word-preview__chart", `pk-word-preview__chart--${l(d(e.chart))}`]),
755
755
  style: u(p(d(e.chart)))
756
- }, [f(J, { preview: c(e) }, null, 8, ["preview"])], 6)) : e.picture && s(e) ? (M(), j(v, { key: 1 }, [l(e.picture) === "page" ? E("", !0) : (M(), j("img", {
756
+ }, [f(ke, { preview: c(e) }, null, 8, ["preview"])], 6)) : e.picture && s(e) ? (N(), M(v, { key: 1 }, [l(e.picture) === "page" ? D("", !0) : (N(), M("img", {
757
757
  key: 0,
758
758
  class: i(["pk-word-preview__picture", `pk-word-preview__picture--${l(e.picture)}`]),
759
759
  style: u(p(e.picture)),
760
760
  src: s(e),
761
761
  alt: ""
762
- }, null, 14, nt))], 64)) : (M(), j("span", rt, w(k(r)("chatFilePreview.image")), 1))], 64)) : _.value && e.change === "deleted" ? (M(), j("del", {
762
+ }, null, 14, nt))], 64)) : (N(), M("span", rt, w(A(r)("chatFilePreview.image")), 1))], 64)) : _.value && e.change === "deleted" ? (N(), M("del", {
763
763
  key: 1,
764
764
  class: "pk-word-preview__removed",
765
765
  "data-quote-skip": "",
766
766
  style: u(b(e)),
767
767
  title: S(e)
768
- }, w(h(e)), 13, Y)) : _.value && e.change === "inserted" ? (M(), j("ins", {
768
+ }, w(h(e)), 13, Y)) : _.value && e.change === "inserted" ? (N(), M("ins", {
769
769
  key: 2,
770
770
  class: "pk-word-preview__added",
771
771
  style: u(b(e)),
772
772
  title: S(e)
773
- }, w(h(e)), 13, X)) : (M(), j("span", {
773
+ }, w(h(e)), 13, X)) : (N(), M("span", {
774
774
  key: 3,
775
775
  style: u(y(e)),
776
776
  "data-quote-skip": e.label ? "" : void 0
@@ -783,7 +783,7 @@ var at = { key: 0 }, ot = ["data-paragraph", "colspan"], st = [
783
783
  "data-paragraph",
784
784
  "role",
785
785
  "aria-level"
786
- ], Q = { key: 1 }, ct = /* @__PURE__ */ O({
786
+ ], Q = { key: 1 }, ct = /* @__PURE__ */ k({
787
787
  __name: "PkWordPreviewBlock",
788
788
  props: {
789
789
  block: { type: null },
@@ -817,17 +817,17 @@ var at = { key: 0 }, ot = ["data-paragraph", "colspan"], st = [
817
817
  let e = t.block.widths ?? [], n = e.reduce((e, t) => e + t, 0);
818
818
  return n ? e.map((e) => `${e / n * 100}%`) : [];
819
819
  }), c = x(() => t.block.kind !== "table" && !!t.block.id && !!t.marked?.has(t.block.id)), l = (e) => !!e?.some((e) => t.marked?.has(e)), d = x(() => t.mode === "markup" && !!o.value?.some((e) => e.runs.some((e) => e.change)));
820
- return (t, p) => e.block.kind === "table" && o.value ? (M(), j("table", {
820
+ return (t, p) => e.block.kind === "table" && o.value ? (N(), M("table", {
821
821
  key: 0,
822
822
  class: i(["pk-word-preview__table", {
823
823
  "pk-word-preview__table--lines": e.block.borders,
824
824
  "pk-word-preview__table--next": e.row !== 0,
825
825
  "pk-word-preview__changed": d.value
826
826
  }])
827
- }, [s.value.length ? (M(), j("colgroup", at, [(M(!0), j(v, null, m(s.value, (e, t) => (M(), j("col", {
827
+ }, [s.value.length ? (N(), M("colgroup", at, [(N(!0), M(v, null, m(s.value, (e, t) => (N(), M("col", {
828
828
  key: t,
829
829
  style: u({ width: e })
830
- }, null, 4))), 128))])) : E("", !0), y("tbody", null, [y("tr", null, [(M(!0), j(v, null, m(o.value, (t, n) => (M(), j("td", {
830
+ }, null, 4))), 128))])) : D("", !0), y("tbody", null, [y("tr", null, [(N(!0), M(v, null, m(o.value, (t, n) => (N(), M("td", {
831
831
  key: n,
832
832
  "data-paragraph": t.ids?.join(" "),
833
833
  class: i({ "pk-word-preview__marked": l(t.ids) }),
@@ -845,7 +845,7 @@ var at = { key: 0 }, ot = ["data-paragraph", "colspan"], st = [
845
845
  "runs",
846
846
  "mode",
847
847
  "numbers"
848
- ])], 14, ot))), 128))])])], 2)) : e.block.kind === "table" ? E("", !0) : (M(), j("div", {
848
+ ])], 14, ot))), 128))])])], 2)) : e.block.kind === "table" ? D("", !0) : (N(), M("div", {
849
849
  key: 1,
850
850
  class: i(["pk-word-preview__block", {
851
851
  "pk-word-preview__changed": a.value,
@@ -856,12 +856,12 @@ var at = { key: 0 }, ot = ["data-paragraph", "colspan"], st = [
856
856
  "aria-level": e.block.kind === "heading" ? Math.max(1, e.block.level) : void 0,
857
857
  style: u(n.value)
858
858
  }, [
859
- e.block.label ? (M(), j("span", {
859
+ e.block.label ? (N(), M("span", {
860
860
  key: 0,
861
861
  class: "pk-word-preview__label",
862
862
  "data-quote-skip": "",
863
863
  style: u(r.value)
864
- }, w(e.block.label), 5)) : E("", !0),
864
+ }, w(e.block.label), 5)) : D("", !0),
865
865
  f(it, {
866
866
  runs: e.block.runs,
867
867
  mode: e.mode,
@@ -873,13 +873,13 @@ var at = { key: 0 }, ot = ["data-paragraph", "colspan"], st = [
873
873
  "page",
874
874
  "numbers"
875
875
  ]),
876
- !e.block.label && !e.block.runs.length ? (M(), j("br", Q)) : E("", !0)
876
+ !e.block.label && !e.block.runs.length ? (N(), M("br", Q)) : D("", !0)
877
877
  ], 14, st));
878
878
  }
879
879
  });
880
880
  // ../../packages/components/src/chat/PkWordPreviewPart.vue?vue&type=script&setup=true&lang.ts
881
881
  C(), p();
882
- var lt = { class: "pk-word-preview__part" }, ut = ["src"], dt = /* @__PURE__ */ O({
882
+ var lt = { class: "pk-word-preview__part" }, ut = ["src"], dt = /* @__PURE__ */ k({
883
883
  __name: "PkWordPreviewPart",
884
884
  props: {
885
885
  blocks: { type: Array },
@@ -889,11 +889,11 @@ var lt = { class: "pk-word-preview__part" }, ut = ["src"], dt = /* @__PURE__ */
889
889
  numbers: { type: Object }
890
890
  },
891
891
  setup(e) {
892
- let n = e, r = t(R, void 0), i = x(() => F(n.blocks, n.mode)), a = x(() => le(n.blocks, n.mode).flatMap((e) => {
893
- let t = se(r?.value, e.ref);
892
+ let n = e, r = t(z, void 0), i = x(() => ie(n.blocks, n.mode)), a = x(() => I(n.blocks, n.mode).flatMap((e) => {
893
+ let t = R(r?.value, e.ref);
894
894
  return t ? [{
895
895
  src: t,
896
- css: ae(e, n.section.page)
896
+ css: ce(e, n.section.page)
897
897
  }] : [];
898
898
  })), o = x(() => {
899
899
  let { margins: e } = n.section.page;
@@ -903,10 +903,10 @@ var lt = { class: "pk-word-preview__part" }, ut = ["src"], dt = /* @__PURE__ */
903
903
  ...n.where === "header" ? { top: `${n.section.headerDistance}pt` } : { bottom: `${n.section.footerDistance}pt` }
904
904
  };
905
905
  });
906
- return (t, n) => (M(), j("div", lt, [y("div", {
906
+ return (t, n) => (N(), M("div", lt, [y("div", {
907
907
  class: "pk-word-preview__part-flow",
908
908
  style: u(o.value)
909
- }, [(M(!0), j(v, null, m(i.value, (t) => (M(), g(ct, {
909
+ }, [(N(!0), M(v, null, m(i.value, (t) => (N(), g(ct, {
910
910
  key: t.key,
911
911
  block: e.blocks[t.block],
912
912
  row: t.row,
@@ -919,7 +919,7 @@ var lt = { class: "pk-word-preview__part" }, ut = ["src"], dt = /* @__PURE__ */
919
919
  "mode",
920
920
  "page",
921
921
  "numbers"
922
- ]))), 128))], 4), (M(!0), j(v, null, m(a.value, (e, t) => (M(), j("img", {
922
+ ]))), 128))], 4), (N(!0), M(v, null, m(a.value, (e, t) => (N(), M("img", {
923
923
  key: t,
924
924
  class: "pk-word-preview__float",
925
925
  style: u(e.css),
@@ -960,7 +960,7 @@ var ft = ["aria-label"], pt = {
960
960
  }, At = { class: "pk-word-preview__count" }, jt = {
961
961
  key: 1,
962
962
  class: "pk-word-preview__legend"
963
- }, Mt = ["title"], Nt = { class: "pk-word-preview__removed" }, Pt = { class: "pk-word-preview__added" }, Ft = { class: "pk-word-preview__percent" }, It = ["data-part"], Lt = 96 / 72, Rt = .5, zt = /*#__PURE__*/ B(/* @__PURE__ */ O({
963
+ }, Mt = ["title"], Nt = { class: "pk-word-preview__removed" }, Pt = { class: "pk-word-preview__added" }, Ft = { class: "pk-word-preview__percent" }, It = ["data-part"], Lt = 96 / 72, Rt = .5, zt = /*#__PURE__*/ V(/* @__PURE__ */ k({
964
964
  __name: "PkWordPreview",
965
965
  props: /*@__PURE__*/ l({
966
966
  preview: { type: null },
@@ -977,24 +977,24 @@ var ft = ["aria-label"], pt = {
977
977
  }),
978
978
  emits: /*@__PURE__*/ l(["select"], ["update:fit", "update:zoom"]),
979
979
  setup(e, { emit: t }) {
980
- let r = e, l = t, { t: p } = ne({ useScope: "global" });
981
- n(R, x(() => r.preview.images)), n(ce, x(() => r.preview.charts));
982
- let _ = (e) => L(e, r.mode), S = x(() => F(r.preview.blocks, r.mode)), C = h("rootEl"), T = h("scrollEl"), ee = h("measureEl"), { width: te } = de(C), { width: D } = de(T), O = x(() => te.value >= 1e3), A = x(() => r.preview.sections?.length ? r.preview.sections : [{
980
+ let r = e, l = t, { t: p } = te({ useScope: "global" });
981
+ n(z, x(() => r.preview.images)), n(se, x(() => r.preview.charts));
982
+ let _ = (e) => re(e, r.mode), S = x(() => ie(r.preview.blocks, r.mode)), C = h("rootEl"), T = h("scrollEl"), E = h("measureEl"), { width: ee } = ue(C), { width: O } = ue(T), k = x(() => ee.value >= 1e3), j = x(() => r.preview.sections?.length ? r.preview.sections : [{
983
983
  page: r.preview.page,
984
984
  headerDistance: 0,
985
985
  footerDistance: 0,
986
986
  headers: {},
987
987
  footers: {}
988
- }]), N = x(() => A.value[0].page), re = x(() => (D.value - 48) / (N.value.width * Lt)), P = x(() => te.value === 0 || D.value === 0 || re.value >= Rt), I = x(() => ({
989
- fontFamily: oe(r.preview.defaults.font),
988
+ }]), P = x(() => j.value[0].page), ne = x(() => (O.value - 48) / (P.value.width * Lt)), F = x(() => ee.value === 0 || O.value === 0 || ne.value >= Rt), oe = x(() => ({
989
+ fontFamily: ae(r.preview.defaults.font),
990
990
  fontSize: `${r.preview.defaults.size}pt`,
991
991
  color: r.preview.defaults.color ?? "#000000",
992
- "--pk-word-line": ie(r.preview.defaults.font),
992
+ "--pk-word-line": L(r.preview.defaults.font),
993
993
  "--pk-word-size": `${r.preview.defaults.size}pt`
994
- })), ue = x(() => N.value.width - N.value.margins.left - N.value.margins.right), fe = x(() => ({
995
- ...I.value,
996
- width: `${ue.value}pt`
997
- })), z = h("flowEl"), { width: ge } = de(z), B = x(() => {
994
+ })), le = x(() => P.value.width - P.value.margins.left - P.value.margins.right), de = x(() => ({
995
+ ...oe.value,
996
+ width: `${le.value}pt`
997
+ })), B = h("flowEl"), { width: he } = ue(B), V = x(() => {
998
998
  let e = /* @__PURE__ */ new Map(), t = 0;
999
999
  for (let n of r.preview.blocks) {
1000
1000
  if (n.kind === "table") continue;
@@ -1007,37 +1007,37 @@ var ft = ["aria-label"], pt = {
1007
1007
  let n = 0;
1008
1008
  for (let [r, i] of [...e].sort((e, t) => e[0] - t[0])) if (n += i, n > t / 10) return r;
1009
1009
  return 0;
1010
- }), _e = x(() => ({
1011
- ...I.value,
1012
- "--pk-word-indent-shared": `${B.value}pt`,
1013
- "--pk-word-indent-scale": ge.value ? Math.min(1, ge.value / (ue.value * Lt)) : 1
1014
- })), V = b([]), ve = b({}), H = async () => {
1010
+ }), ge = x(() => ({
1011
+ ...oe.value,
1012
+ "--pk-word-indent-shared": `${V.value}pt`,
1013
+ "--pk-word-indent-scale": he.value ? Math.min(1, he.value / (le.value * Lt)) : 1
1014
+ })), H = b([]), _e = b({}), U = async () => {
1015
1015
  await a();
1016
- let e = ee.value?.querySelectorAll("[data-item]");
1017
- V.value = [...e ?? []].map((e) => e.getBoundingClientRect().height);
1018
- let t = ee.value?.querySelectorAll("[data-part]");
1019
- ve.value = Object.fromEntries([...t ?? []].map((e) => [e.dataset.part ?? "", e.getBoundingClientRect().height]));
1016
+ let e = E.value?.querySelectorAll("[data-item]");
1017
+ H.value = [...e ?? []].map((e) => e.getBoundingClientRect().height);
1018
+ let t = E.value?.querySelectorAll("[data-part]");
1019
+ _e.value = Object.fromEntries([...t ?? []].map((e) => [e.dataset.part ?? "", e.getBoundingClientRect().height]));
1020
1020
  };
1021
1021
  d([
1022
1022
  S,
1023
- P,
1023
+ F,
1024
1024
  () => r.preview.parts
1025
- ], H, { flush: "post" }), c(() => {
1026
- H(), document.fonts?.ready.then(H);
1025
+ ], U, { flush: "post" }), c(() => {
1026
+ U(), document.fonts?.ready.then(U);
1027
1027
  });
1028
- let U = x(() => {
1029
- if (!P.value || V.value.length !== S.value.length) return [{
1028
+ let W = x(() => {
1029
+ if (!F.value || H.value.length !== S.value.length) return [{
1030
1030
  items: S.value.map((e, t) => t),
1031
1031
  section: 0,
1032
1032
  number: 1,
1033
- top: N.value.margins.top,
1034
- bottom: N.value.margins.bottom
1033
+ top: P.value.margins.top,
1034
+ bottom: P.value.margins.bottom
1035
1035
  }];
1036
1036
  let e = [], t = 0, n = !0, i = 0, a, o = () => {
1037
- let r = A.value[t];
1037
+ let r = j.value[t];
1038
1038
  return n && r.pageStart !== void 0 ? r.pageStart : (a ?? e[e.length - 1]?.number ?? 0) + 1;
1039
1039
  }, s = (e) => {
1040
- let i = A.value[t], a = (t) => n && i.titlePage ? t.first : r.preview.evenAndOddHeaders && e % 2 == 0 ? t.even : t.default, o = a(i.headers), s = a(i.footers), c = (e) => e ? (ve.value[e] ?? 0) / Lt : 0;
1040
+ let i = j.value[t], a = (t) => n && i.titlePage ? t.first : r.preview.evenAndOddHeaders && e % 2 == 0 ? t.even : t.default, o = a(i.headers), s = a(i.footers), c = (e) => e ? (_e.value[e] ?? 0) / Lt : 0;
1041
1041
  return {
1042
1042
  header: o,
1043
1043
  footer: s,
@@ -1054,42 +1054,42 @@ var ft = ["aria-label"], pt = {
1054
1054
  }), n = !1, i = 0;
1055
1055
  };
1056
1056
  return S.value.forEach((r, l) => {
1057
- r.section !== void 0 && r.section !== t && A.value[r.section] && (t = r.section, n = r.breakBefore || !e.length, n || (a = A.value[t].pageStart));
1058
- let u = e[e.length - 1], d = u && A.value[u.section].page, f = d ? (d.height - u.top - u.bottom) * Lt : 0, p = V.value[l];
1059
- for (let e = l; S.value[e]?.keepNext && e + 1 < S.value.length && !S.value[e + 1].breakBefore; e++) p += V.value[e + 1];
1060
- (!u || u.items.length && (r.breakBefore || i + V.value[l] > f || i + p > f && p <= (() => {
1057
+ r.section !== void 0 && r.section !== t && j.value[r.section] && (t = r.section, n = r.breakBefore || !e.length, n || (a = j.value[t].pageStart));
1058
+ let u = e[e.length - 1], d = u && j.value[u.section].page, f = d ? (d.height - u.top - u.bottom) * Lt : 0, p = H.value[l];
1059
+ for (let e = l; S.value[e]?.keepNext && e + 1 < S.value.length && !S.value[e + 1].breakBefore; e++) p += H.value[e + 1];
1060
+ (!u || u.items.length && (r.breakBefore || i + H.value[l] > f || i + p > f && p <= (() => {
1061
1061
  let e = s(o());
1062
- return (A.value[t].page.height - e.top - e.bottom) * Lt;
1063
- })())) && c(), e[e.length - 1].items.push(l), i += V.value[l];
1062
+ return (j.value[t].page.height - e.top - e.bottom) * Lt;
1063
+ })())) && c(), e[e.length - 1].items.push(l), i += H.value[l];
1064
1064
  }), e.length || c(), e;
1065
- }), W = x(() => {
1065
+ }), G = x(() => {
1066
1066
  let e = /* @__PURE__ */ new Map();
1067
- for (let t of U.value) e.set(t.section, (e.get(t.section) ?? 0) + 1);
1068
- return U.value.map((t) => ({
1067
+ for (let t of W.value) e.set(t.section, (e.get(t.section) ?? 0) + 1);
1068
+ return W.value.map((t) => ({
1069
1069
  page: t.number,
1070
- pages: U.value.length,
1070
+ pages: W.value.length,
1071
1071
  sectionPages: e.get(t.section) ?? 1
1072
1072
  }));
1073
- }), ye = (e) => {
1074
- let t = A.value[e.section].page;
1073
+ }), ve = (e) => {
1074
+ let t = j.value[e.section].page;
1075
1075
  return {
1076
- ...I.value,
1076
+ ...oe.value,
1077
1077
  width: `${t.width}pt`,
1078
1078
  minHeight: `${t.height}pt`,
1079
1079
  padding: `${e.top}pt ${t.margins.right}pt ${e.bottom}pt ${t.margins.left}pt`
1080
1080
  };
1081
- }, G = (e) => {
1081
+ }, K = (e) => {
1082
1082
  let t = [...new Set(e.items.map((e) => S.value[e].block))];
1083
- return le(t.map((e) => r.preview.blocks[e]), r.mode).flatMap((t) => {
1084
- let n = se(r.preview.images, t.ref);
1083
+ return I(t.map((e) => r.preview.blocks[e]), r.mode).flatMap((t) => {
1084
+ let n = R(r.preview.images, t.ref);
1085
1085
  return n ? [{
1086
1086
  src: n,
1087
- css: ae(t, A.value[e.section].page)
1087
+ css: ce(t, j.value[e.section].page)
1088
1088
  }] : [];
1089
1089
  });
1090
- }, K = s(e, "fit"), be = s(e, "zoom"), q = x(() => K.value ? Math.min(1.25, Math.max(.3, re.value)) : be.value), xe = (e) => {
1091
- be.value = Math.min(2, Math.max(.3, Math.round((q.value + e) * 10) / 10)), K.value = !1;
1092
- }, Se = b(0), Ce = b(), Te = () => {
1090
+ }, q = s(e, "fit"), ye = s(e, "zoom"), J = x(() => q.value ? Math.min(1.25, Math.max(.3, ne.value)) : ye.value), be = (e) => {
1091
+ ye.value = Math.min(2, Math.max(.3, Math.round((J.value + e) * 10) / 10)), q.value = !1;
1092
+ }, xe = b(0), Se = b(), we = () => {
1093
1093
  let e = T.value?.getBoundingClientRect();
1094
1094
  if (!e) return;
1095
1095
  let t = T.value?.querySelectorAll("[data-page]") ?? [], n = 0;
@@ -1097,32 +1097,32 @@ var ft = ["aria-label"], pt = {
1097
1097
  if (i.getBoundingClientRect().top - e.top > e.height / 3) break;
1098
1098
  n = r;
1099
1099
  }
1100
- Se.value = n;
1100
+ xe.value = n;
1101
1101
  let r;
1102
- for (let t of J.value) {
1102
+ for (let t of ke.value) {
1103
1103
  let n = T.value?.querySelector(`[data-key="${t.key}"]`);
1104
1104
  if (n) {
1105
1105
  if (n.getBoundingClientRect().top - e.top > 48) break;
1106
1106
  r = t.key;
1107
1107
  }
1108
1108
  }
1109
- Ce.value = r ?? J.value[0]?.key;
1110
- }, Ee = 0, De = () => {
1111
- Ee ||= requestAnimationFrame(() => {
1112
- Ee = 0, Te();
1109
+ Se.value = r ?? ke.value[0]?.key;
1110
+ }, Te = 0, Ee = () => {
1111
+ Te ||= requestAnimationFrame(() => {
1112
+ Te = 0, we();
1113
1113
  });
1114
1114
  };
1115
- o(() => cancelAnimationFrame(Ee)), d(U, () => a(De));
1116
- let { selection: Oe } = me({
1115
+ o(() => cancelAnimationFrame(Te)), d(W, () => a(Ee));
1116
+ let { selection: De } = pe({
1117
1117
  root: () => T.value?.getRootNode(),
1118
1118
  touch: !0
1119
1119
  });
1120
- d(Oe, (e) => {
1120
+ d(De, (e) => {
1121
1121
  let t = T.value;
1122
- l("select", e && t ? we(t, e.range, ".pk-word-preview__measure, .pk-word-preview__part") : void 0);
1122
+ l("select", e && t ? Ce(t, e.range, ".pk-word-preview__measure, .pk-word-preview__part") : void 0);
1123
1123
  });
1124
- let ke = (e) => _(e).map((e) => e.text).join("").replace(/\s+/g, " ").trim(), J = x(() => S.value.flatMap((e) => {
1125
- let t = r.preview.blocks[e.block], n = t.kind === "heading" ? [t.label, ke(t.runs)].filter(Boolean).join(" ") : "";
1124
+ let Oe = (e) => _(e).map((e) => e.text).join("").replace(/\s+/g, " ").trim(), ke = x(() => S.value.flatMap((e) => {
1125
+ let t = r.preview.blocks[e.block], n = t.kind === "heading" ? [t.label, Oe(t.runs)].filter(Boolean).join(" ") : "";
1126
1126
  return t.kind === "heading" && t.level <= 3 && n ? [{
1127
1127
  key: e.key,
1128
1128
  level: t.level,
@@ -1136,8 +1136,8 @@ var ft = ["aria-label"], pt = {
1136
1136
  added: Ae(a)
1137
1137
  }] : [];
1138
1138
  })), Me;
1139
- d([() => r.marked, U], ([e]) => {
1140
- !e || e === Me || P.value && V.value.length !== S.value.length || he(T.value, ".pk-word-preview__marked") && (Me = e);
1139
+ d([() => r.marked, W], ([e]) => {
1140
+ !e || e === Me || F.value && H.value.length !== S.value.length || me(T.value, ".pk-word-preview__marked") && (Me = e);
1141
1141
  }, {
1142
1142
  flush: "post",
1143
1143
  immediate: !0
@@ -1146,84 +1146,84 @@ var ft = ["aria-label"], pt = {
1146
1146
  T.value?.querySelector(`[data-key="${e}"]`)?.scrollIntoView({
1147
1147
  block: "start",
1148
1148
  behavior: "smooth"
1149
- }), O.value || (Pe.value = !1);
1150
- }, Ie = x(() => r.preview.blocks.flatMap((e) => e.kind === "table" ? e.rows.flat().map((e) => ke(e.runs)) : [ke(e.runs)]).join(" ").split(/\s+/).filter(Boolean).length), Le = x(() => r.preview.revisionAuthors.join(", "));
1149
+ }), k.value || (Pe.value = !1);
1150
+ }, Ie = x(() => r.preview.blocks.flatMap((e) => e.kind === "table" ? e.rows.flat().map((e) => Oe(e.runs)) : [Oe(e.runs)]).join(" ").split(/\s+/).filter(Boolean).length), Le = x(() => r.preview.revisionAuthors.join(", "));
1151
1151
  return (t, n) => {
1152
- let r = pe;
1153
- return M(), j("div", {
1152
+ let r = fe;
1153
+ return N(), M("div", {
1154
1154
  ref_key: "rootEl",
1155
1155
  ref: C,
1156
- class: i(["pk-word-preview", { "pk-word-preview--paged": P.value }])
1156
+ class: i(["pk-word-preview", { "pk-word-preview--paged": F.value }])
1157
1157
  }, [
1158
- (O.value || Pe.value) && (J.value.length || je.value.length) ? (M(), j("aside", {
1158
+ (k.value || Pe.value) && (ke.value.length || je.value.length) ? (N(), M("aside", {
1159
1159
  key: 0,
1160
- class: i(["pk-word-preview__side", { "pk-word-preview__side--over": !O.value }]),
1161
- "aria-label": k(p)("chatFilePreview.outline")
1160
+ class: i(["pk-word-preview__side", { "pk-word-preview__side--over": !k.value }]),
1161
+ "aria-label": A(p)("chatFilePreview.outline")
1162
1162
  }, [y("div", pt, [y("button", {
1163
1163
  type: "button",
1164
1164
  role: "tab",
1165
1165
  class: "pk-word-preview__tab",
1166
1166
  "aria-selected": Ne.value === "outline",
1167
1167
  onClick: n[0] ||= (e) => Ne.value = "outline"
1168
- }, w(k(p)("chatFilePreview.outline")), 9, $), je.value.length ? (M(), j("button", {
1168
+ }, w(A(p)("chatFilePreview.outline")), 9, $), je.value.length ? (N(), M("button", {
1169
1169
  key: 0,
1170
1170
  type: "button",
1171
1171
  role: "tab",
1172
1172
  class: "pk-word-preview__tab",
1173
1173
  "aria-selected": Ne.value === "changes",
1174
1174
  onClick: n[1] ||= (e) => Ne.value = "changes"
1175
- }, w(k(p)("chatFilePreview.changes", { count: je.value.length })), 9, mt)) : E("", !0)]), Ne.value === "outline" || !je.value.length ? (M(), j("nav", ht, [(M(!0), j(v, null, m(J.value, (e) => (M(), j("button", {
1175
+ }, w(A(p)("chatFilePreview.changes", { count: je.value.length })), 9, mt)) : D("", !0)]), Ne.value === "outline" || !je.value.length ? (N(), M("nav", ht, [(N(!0), M(v, null, m(ke.value, (e) => (N(), M("button", {
1176
1176
  key: e.key,
1177
1177
  type: "button",
1178
1178
  class: i(["pk-word-preview__entry", `pk-word-preview__entry--${Math.min(e.level, 3)}`]),
1179
- "aria-current": Ce.value === e.key ? "location" : void 0,
1179
+ "aria-current": Se.value === e.key ? "location" : void 0,
1180
1180
  onClick: (t) => Fe(e.key)
1181
- }, [y("span", _t, w(e.text), 1), je.value.some((t) => t.key === e.key) ? (M(), j("span", vt)) : E("", !0)], 10, gt))), 128)), J.value.length ? E("", !0) : (M(), j("p", yt, w(k(p)("chatFilePreview.noHeadings")), 1))])) : (M(), j("nav", bt, [(M(!0), j(v, null, m(je.value, (e) => (M(), j("button", {
1181
+ }, [y("span", _t, w(e.text), 1), je.value.some((t) => t.key === e.key) ? (N(), M("span", vt)) : D("", !0)], 10, gt))), 128)), ke.value.length ? D("", !0) : (N(), M("p", yt, w(A(p)("chatFilePreview.noHeadings")), 1))])) : (N(), M("nav", bt, [(N(!0), M(v, null, m(je.value, (e) => (N(), M("button", {
1182
1182
  key: e.key,
1183
1183
  type: "button",
1184
1184
  class: "pk-word-preview__entry pk-word-preview__entry--change",
1185
1185
  onClick: (t) => Fe(e.key)
1186
- }, [e.removed ? (M(), j("del", St, w(e.removed), 1)) : E("", !0), e.added ? (M(), j("ins", Ct, w(e.added), 1)) : E("", !0)], 8, xt))), 128))]))], 10, ft)) : E("", !0),
1186
+ }, [e.removed ? (N(), M("del", St, w(e.removed), 1)) : D("", !0), e.added ? (N(), M("ins", Ct, w(e.added), 1)) : D("", !0)], 8, xt))), 128))]))], 10, ft)) : D("", !0),
1187
1187
  y("div", wt, [y("div", {
1188
1188
  ref_key: "scrollEl",
1189
1189
  ref: T,
1190
1190
  class: "pk-word-preview__scroll",
1191
- onScroll: De
1192
- }, [P.value ? (M(), j("div", {
1191
+ onScroll: Ee
1192
+ }, [F.value ? (N(), M("div", {
1193
1193
  key: 0,
1194
1194
  class: "pk-word-preview__pages",
1195
- style: u({ zoom: q.value })
1196
- }, [(M(!0), j(v, null, m(U.value, (t, n) => (M(), j("article", {
1195
+ style: u({ zoom: J.value })
1196
+ }, [(N(!0), M(v, null, m(W.value, (t, n) => (N(), M("article", {
1197
1197
  key: n,
1198
1198
  "data-page": "",
1199
1199
  class: "pk-word-preview__page",
1200
- "aria-label": k(p)("chatFilePreview.pageOf", {
1200
+ "aria-label": A(p)("chatFilePreview.pageOf", {
1201
1201
  page: n + 1,
1202
- count: U.value.length
1202
+ count: W.value.length
1203
1203
  }),
1204
- style: u(ye(t))
1204
+ style: u(ve(t))
1205
1205
  }, [
1206
- t.header && e.preview.parts?.[t.header] ? (M(), g(dt, {
1206
+ t.header && e.preview.parts?.[t.header] ? (N(), g(dt, {
1207
1207
  key: 0,
1208
1208
  blocks: e.preview.parts[t.header],
1209
1209
  where: "header",
1210
- section: A.value[t.section],
1210
+ section: j.value[t.section],
1211
1211
  mode: e.mode,
1212
- numbers: W.value[n]
1212
+ numbers: G.value[n]
1213
1213
  }, null, 8, [
1214
1214
  "blocks",
1215
1215
  "section",
1216
1216
  "mode",
1217
1217
  "numbers"
1218
- ])) : E("", !0),
1219
- (M(!0), j(v, null, m(t.items, (r) => (M(), g(ct, {
1218
+ ])) : D("", !0),
1219
+ (N(!0), M(v, null, m(t.items, (r) => (N(), g(ct, {
1220
1220
  key: S.value[r].key,
1221
1221
  "data-key": S.value[r].key,
1222
1222
  block: e.preview.blocks[S.value[r].block],
1223
1223
  row: S.value[r].row,
1224
1224
  mode: e.mode,
1225
- page: A.value[t.section].page,
1226
- numbers: W.value[n],
1225
+ page: j.value[t.section].page,
1226
+ numbers: G.value[n],
1227
1227
  marked: e.marked
1228
1228
  }, null, 8, [
1229
1229
  "data-key",
@@ -1234,33 +1234,33 @@ var ft = ["aria-label"], pt = {
1234
1234
  "numbers",
1235
1235
  "marked"
1236
1236
  ]))), 128)),
1237
- (M(!0), j(v, null, m(G(t), (e, t) => (M(), j("img", {
1237
+ (N(!0), M(v, null, m(K(t), (e, t) => (N(), M("img", {
1238
1238
  key: `image-${t}`,
1239
1239
  class: "pk-word-preview__float",
1240
1240
  style: u(e.css),
1241
1241
  src: e.src,
1242
1242
  alt: ""
1243
1243
  }, null, 12, Et))), 128)),
1244
- t.footer && e.preview.parts?.[t.footer] ? (M(), g(dt, {
1244
+ t.footer && e.preview.parts?.[t.footer] ? (N(), g(dt, {
1245
1245
  key: 1,
1246
1246
  blocks: e.preview.parts[t.footer],
1247
1247
  where: "footer",
1248
- section: A.value[t.section],
1248
+ section: j.value[t.section],
1249
1249
  mode: e.mode,
1250
- numbers: W.value[n]
1250
+ numbers: G.value[n]
1251
1251
  }, null, 8, [
1252
1252
  "blocks",
1253
1253
  "section",
1254
1254
  "mode",
1255
1255
  "numbers"
1256
- ])) : E("", !0)
1257
- ], 12, Tt))), 128))], 4)) : (M(), j("article", {
1256
+ ])) : D("", !0)
1257
+ ], 12, Tt))), 128))], 4)) : (N(), M("article", {
1258
1258
  key: 1,
1259
1259
  ref_key: "flowEl",
1260
- ref: z,
1260
+ ref: B,
1261
1261
  class: "pk-word-preview__page pk-word-preview__page--flow",
1262
- style: u(_e.value)
1263
- }, [(M(!0), j(v, null, m(S.value, (t) => (M(), g(ct, {
1262
+ style: u(ge.value)
1263
+ }, [(N(!0), M(v, null, m(S.value, (t) => (N(), g(ct, {
1264
1264
  key: t.key,
1265
1265
  "data-key": t.key,
1266
1266
  block: e.preview.blocks[t.block],
@@ -1273,29 +1273,29 @@ var ft = ["aria-label"], pt = {
1273
1273
  "row",
1274
1274
  "mode",
1275
1275
  "marked"
1276
- ]))), 128))], 4)), e.preview.truncated ? (M(), j("p", Dt, w(k(p)("chatFilePreview.truncated")), 1)) : E("", !0)], 544), y("div", Ot, [
1277
- P.value ? (M(), j("span", kt, w(k(p)("chatFilePreview.pageOf", {
1278
- page: Se.value + 1,
1279
- count: U.value.length
1280
- })), 1)) : E("", !0),
1281
- y("span", At, w(k(p)("chatFilePreview.words", Ie.value)), 1),
1282
- e.mode === "markup" && e.preview.revisionAuthors.length ? (M(), j("span", jt, [
1276
+ ]))), 128))], 4)), e.preview.truncated ? (N(), M("p", Dt, w(A(p)("chatFilePreview.truncated")), 1)) : D("", !0)], 544), y("div", Ot, [
1277
+ F.value ? (N(), M("span", kt, w(A(p)("chatFilePreview.pageOf", {
1278
+ page: xe.value + 1,
1279
+ count: W.value.length
1280
+ })), 1)) : D("", !0),
1281
+ y("span", At, w(A(p)("chatFilePreview.words", Ie.value)), 1),
1282
+ e.mode === "markup" && e.preview.revisionAuthors.length ? (N(), M("span", jt, [
1283
1283
  y("span", {
1284
1284
  class: "pk-word-preview__legend-text",
1285
- title: k(p)("chatFilePreview.revisionsOf", { authors: Le.value })
1286
- }, w(k(p)("chatFilePreview.revisionsOf", { authors: Le.value })), 9, Mt),
1287
- y("del", Nt, w(k(p)("chatFilePreview.removed")), 1),
1288
- y("ins", Pt, w(k(p)("chatFilePreview.added")), 1)
1289
- ])) : E("", !0),
1285
+ title: A(p)("chatFilePreview.revisionsOf", { authors: Le.value })
1286
+ }, w(A(p)("chatFilePreview.revisionsOf", { authors: Le.value })), 9, Mt),
1287
+ y("del", Nt, w(A(p)("chatFilePreview.removed")), 1),
1288
+ y("ins", Pt, w(A(p)("chatFilePreview.added")), 1)
1289
+ ])) : D("", !0),
1290
1290
  n[6] ||= y("span", { class: "pk-word-preview__spacer" }, null, -1),
1291
- !O.value && (J.value.length || je.value.length) ? (M(), g(r, {
1291
+ !k.value && (ke.value.length || je.value.length) ? (N(), g(r, {
1292
1292
  key: 2,
1293
1293
  class: "pk-word-preview__outline-toggle",
1294
1294
  modifiers: "action-quiet",
1295
1295
  icon: "ri:list-unordered",
1296
- label: k(p)("chatFilePreview.outline"),
1297
- title: k(p)("chatFilePreview.outline"),
1298
- "aria-label": k(p)("chatFilePreview.outline"),
1296
+ label: A(p)("chatFilePreview.outline"),
1297
+ title: A(p)("chatFilePreview.outline"),
1298
+ "aria-label": A(p)("chatFilePreview.outline"),
1299
1299
  "aria-expanded": Pe.value,
1300
1300
  onClick: n[2] ||= (e) => Pe.value = !Pe.value
1301
1301
  }, null, 8, [
@@ -1303,17 +1303,17 @@ var ft = ["aria-label"], pt = {
1303
1303
  "title",
1304
1304
  "aria-label",
1305
1305
  "aria-expanded"
1306
- ])) : E("", !0),
1307
- P.value ? (M(), j(v, { key: 3 }, [
1306
+ ])) : D("", !0),
1307
+ F.value ? (N(), M(v, { key: 3 }, [
1308
1308
  f(r, {
1309
1309
  class: "pk-word-preview__fit",
1310
1310
  modifiers: "action-quiet",
1311
1311
  icon: "ri:expand-width-line",
1312
- label: k(p)("chatFilePreview.fitWidth"),
1313
- title: k(p)("chatFilePreview.fitWidth"),
1314
- "aria-label": k(p)("chatFilePreview.fitWidth"),
1315
- disabled: K.value,
1316
- onClick: n[3] ||= (e) => K.value = !0
1312
+ label: A(p)("chatFilePreview.fitWidth"),
1313
+ title: A(p)("chatFilePreview.fitWidth"),
1314
+ "aria-label": A(p)("chatFilePreview.fitWidth"),
1315
+ disabled: q.value,
1316
+ onClick: n[3] ||= (e) => q.value = !0
1317
1317
  }, null, 8, [
1318
1318
  "label",
1319
1319
  "title",
@@ -1323,55 +1323,55 @@ var ft = ["aria-label"], pt = {
1323
1323
  f(r, {
1324
1324
  modifiers: "action-quiet",
1325
1325
  icon: "ri:subtract-line",
1326
- "aria-label": k(p)("chatFilePreview.zoomOut"),
1327
- disabled: q.value <= .3,
1328
- onClick: n[4] ||= (e) => xe(-.1)
1326
+ "aria-label": A(p)("chatFilePreview.zoomOut"),
1327
+ disabled: J.value <= .3,
1328
+ onClick: n[4] ||= (e) => be(-.1)
1329
1329
  }, null, 8, ["aria-label", "disabled"]),
1330
- y("span", Ft, w(Math.round(q.value * 100)) + "% ", 1),
1330
+ y("span", Ft, w(Math.round(J.value * 100)) + "% ", 1),
1331
1331
  f(r, {
1332
1332
  modifiers: "action-quiet",
1333
1333
  icon: "ri:add-line",
1334
- "aria-label": k(p)("chatFilePreview.zoomIn"),
1335
- disabled: q.value >= 2,
1336
- onClick: n[5] ||= (e) => xe(.1)
1334
+ "aria-label": A(p)("chatFilePreview.zoomIn"),
1335
+ disabled: J.value >= 2,
1336
+ onClick: n[5] ||= (e) => be(.1)
1337
1337
  }, null, 8, ["aria-label", "disabled"])
1338
- ], 64)) : E("", !0)
1338
+ ], 64)) : D("", !0)
1339
1339
  ])]),
1340
- P.value ? (M(), j("div", {
1340
+ F.value ? (N(), M("div", {
1341
1341
  key: 1,
1342
1342
  ref_key: "measureEl",
1343
- ref: ee,
1343
+ ref: E,
1344
1344
  class: "pk-word-preview__measure",
1345
1345
  "aria-hidden": "true",
1346
- style: u(fe.value)
1347
- }, [(M(!0), j(v, null, m(S.value, (t) => (M(), j("div", {
1346
+ style: u(de.value)
1347
+ }, [(N(!0), M(v, null, m(S.value, (t) => (N(), M("div", {
1348
1348
  key: t.key,
1349
1349
  "data-item": ""
1350
1350
  }, [f(ct, {
1351
1351
  block: e.preview.blocks[t.block],
1352
1352
  row: t.row,
1353
1353
  mode: e.mode,
1354
- page: N.value
1354
+ page: P.value
1355
1355
  }, null, 8, [
1356
1356
  "block",
1357
1357
  "row",
1358
1358
  "mode",
1359
1359
  "page"
1360
- ])]))), 128)), (M(!0), j(v, null, m(e.preview.parts, (t, n) => (M(), j("div", {
1360
+ ])]))), 128)), (N(!0), M(v, null, m(e.preview.parts, (t, n) => (N(), M("div", {
1361
1361
  key: n,
1362
1362
  "data-part": n
1363
- }, [(M(!0), j(v, null, m(k(F)(t, e.mode), (n) => (M(), g(ct, {
1363
+ }, [(N(!0), M(v, null, m(A(ie)(t, e.mode), (n) => (N(), g(ct, {
1364
1364
  key: n.key,
1365
1365
  block: t[n.block],
1366
1366
  row: n.row,
1367
1367
  mode: e.mode,
1368
- page: N.value
1368
+ page: P.value
1369
1369
  }, null, 8, [
1370
1370
  "block",
1371
1371
  "row",
1372
1372
  "mode",
1373
1373
  "page"
1374
- ]))), 128))], 8, It))), 128))], 4)) : E("", !0)
1374
+ ]))), 128))], 8, It))), 128))], 4)) : D("", !0)
1375
1375
  ], 2);
1376
1376
  };
1377
1377
  }
@@ -1397,7 +1397,7 @@ var Bt = ["aria-label"], Vt = { class: "pk-file-preview__head" }, Ht = { class:
1397
1397
  }, nn = {
1398
1398
  key: 1,
1399
1399
  class: "pk-file-preview__empty"
1400
- }, rn = /*@__PURE__*/ O({
1400
+ }, rn = /*@__PURE__*/ k({
1401
1401
  __name: "PkFilePreview",
1402
1402
  props: /*@__PURE__*/ l({
1403
1403
  kind: { type: String },
@@ -1442,13 +1442,13 @@ var Bt = ["aria-label"], Vt = { class: "pk-file-preview__head" }, Ht = { class:
1442
1442
  "update:fit"
1443
1443
  ]),
1444
1444
  setup(e, { emit: t }) {
1445
- let n = e, r = t, { t: o, locale: c } = ne({ useScope: "global" }), l = b(!1), u;
1445
+ let n = e, r = t, { t: o, locale: c } = te({ useScope: "global" }), l = b(!1), u;
1446
1446
  d(() => n.working, (e, t) => {
1447
1447
  e ? (u = t === void 0 ? void 0 : n.version, l.value = !1) : u !== void 0 && (l.value = n.version === u, u = void 0);
1448
1448
  }, { immediate: !0 }), d(() => [n.version, n.fileId], () => {
1449
1449
  n.working || (l.value = !1);
1450
1450
  });
1451
- let p = x(() => n.versions ?? []), _ = x(() => n.version ? p.value.indexOf(n.version) : -1), S = x(() => _.value > 0 ? p.value[_.value - 1] : void 0), C = x(() => _.value >= 0 && _.value < p.value.length - 1 ? p.value[_.value + 1] : void 0), T = s(e, "mode"), ee = s(e, "sheet"), O = s(e, "zoom"), N = s(e, "fit"), re = x(() => [
1451
+ let p = x(() => n.versions ?? []), _ = x(() => n.version ? p.value.indexOf(n.version) : -1), S = x(() => _.value > 0 ? p.value[_.value - 1] : void 0), C = x(() => _.value >= 0 && _.value < p.value.length - 1 ? p.value[_.value + 1] : void 0), T = s(e, "mode"), E = s(e, "sheet"), k = s(e, "zoom"), P = s(e, "fit"), ne = x(() => [
1452
1452
  {
1453
1453
  value: "markup",
1454
1454
  label: o("chatFilePreview.modeMarkup")
@@ -1461,48 +1461,48 @@ var Bt = ["aria-label"], Vt = { class: "pk-file-preview__head" }, Ht = { class:
1461
1461
  value: "original",
1462
1462
  label: o("chatFilePreview.modeOriginal")
1463
1463
  }
1464
- ]), P = x(() => n.preview?.kind === "word" && n.preview.revisionAuthors.length > 0);
1464
+ ]), F = x(() => n.preview?.kind === "word" && n.preview.revisionAuthors.length > 0);
1465
1465
  d(() => n.version, () => {
1466
1466
  T.value = "markup";
1467
1467
  });
1468
- let ie = h("rootEl"), F = D(), I = b(!1), ae = () => {
1469
- F.value = void 0, I.value = !1;
1468
+ let re = h("rootEl"), I = O(), L = b(!1), ie = () => {
1469
+ I.value = void 0, L.value = !1;
1470
1470
  };
1471
1471
  d(() => [
1472
1472
  n.version,
1473
1473
  n.preview,
1474
1474
  T.value,
1475
- ee.value
1476
- ], ae);
1477
- let oe = (e) => {
1478
- I.value || (F.value = e);
1479
- }, L = x(() => F.value?.format === "docx" && z());
1480
- d(I, async (e, t) => {
1481
- let n = F.value;
1475
+ E.value
1476
+ ], ie);
1477
+ let ae = (e) => {
1478
+ L.value || (I.value = e);
1479
+ }, R = x(() => I.value?.format === "docx" && B());
1480
+ d(L, async (e, t) => {
1481
+ let n = I.value;
1482
1482
  t && !e && n?.format === "docx" && (await a(), n.restore());
1483
1483
  });
1484
- let se = x(() => !n.version || n.version === p.value[p.value.length - 1]), ce = () => {
1484
+ let oe = x(() => !n.version || n.version === p.value[p.value.length - 1]), se = () => {
1485
1485
  let e = p.value[p.value.length - 1];
1486
1486
  e && r("version", e);
1487
- }, le = x(() => {
1488
- let e = F.value;
1489
- return e?.format === "docx" ? e.paragraphCount > 200 : (e?.cells ?? 0) > V;
1490
- }), R = x(() => F.value?.format === "docx" && T.value === "original"), de = x(() => le.value || R.value), me = x(() => R.value ? o("selectionActions.hintOriginal") : le.value ? o(F.value?.format === "docx" ? "selectionActions.hintParagraphs" : "selectionActions.hintCells", { count: F.value?.format === "docx" ? 200 : V }) : void 0), he = (e) => e[c.value] ?? e[c.value.split("-")[0]] ?? Object.values(e)[0] ?? "", B = ["explain", "summarize"], ve = x(() => {
1491
- let e = F.value, t = n.selectionActions;
1487
+ }, ce = x(() => {
1488
+ let e = I.value;
1489
+ return e?.format === "docx" ? e.paragraphCount > 200 : (e?.cells ?? 0) > H;
1490
+ }), z = x(() => I.value?.format === "docx" && T.value === "original"), ue = x(() => ce.value || z.value), pe = x(() => z.value ? o("selectionActions.hintOriginal") : ce.value ? o(I.value?.format === "docx" ? "selectionActions.hintParagraphs" : "selectionActions.hintCells", { count: I.value?.format === "docx" ? 200 : H }) : void 0), me = (e) => e[c.value] ?? e[c.value.split("-")[0]] ?? Object.values(e)[0] ?? "", V = ["explain", "summarize"], _e = x(() => {
1491
+ let e = I.value, t = n.selectionActions;
1492
1492
  if (!e || !t) return [];
1493
1493
  let r = e.format;
1494
- return [...(r === "docx" && de.value ? B : t.builtIns).map((e) => ({
1494
+ return [...(r === "docx" && ue.value ? V : t.builtIns).map((e) => ({
1495
1495
  id: e,
1496
1496
  label: o(`selectionActions.builtIn.${e}`),
1497
1497
  ...e === "translate" && { asks: o("selectionActions.translateAsks") },
1498
1498
  prompt: (t) => o(`selectionActions.prompt.${r}.${e}`, { language: t ?? "" })
1499
- })), ...(de.value ? [] : t.actions).map((e) => ({
1499
+ })), ...(ue.value ? [] : t.actions).map((e) => ({
1500
1500
  id: e.id,
1501
- label: he(e.label),
1501
+ label: me(e.label),
1502
1502
  icon: e.icon,
1503
- prompt: () => he(e.prompt)
1503
+ prompt: () => me(e.prompt)
1504
1504
  }))];
1505
- }), H = (e) => {
1505
+ }), U = (e) => {
1506
1506
  if (e.format === "docx") return o("selectionActions.labelParagraphs", {
1507
1507
  file: n.filename,
1508
1508
  count: e.paragraphCount
@@ -1518,20 +1518,20 @@ var Bt = ["aria-label"], Vt = { class: "pk-file-preview__head" }, Ht = { class:
1518
1518
  sheet: e.sheet,
1519
1519
  cell: t
1520
1520
  });
1521
- }, U = (e) => {
1521
+ }, W = (e) => {
1522
1522
  if (!n.fileId || !n.storedFileName) return;
1523
1523
  let t = {
1524
1524
  fileId: n.fileId,
1525
1525
  version: n.version ?? 1,
1526
1526
  storedFileName: n.storedFileName,
1527
- label: H(e).slice(0, 200)
1527
+ label: U(e).slice(0, 200)
1528
1528
  };
1529
1529
  if (e.format === "docx") {
1530
1530
  let { measure: n, ...r } = e;
1531
1531
  return {
1532
1532
  ...t,
1533
1533
  ...r,
1534
- ...R.value && { original: !0 }
1534
+ ...z.value && { original: !0 }
1535
1535
  };
1536
1536
  }
1537
1537
  let { measure: r, cells: i, ...a } = e;
@@ -1539,23 +1539,23 @@ var Bt = ["aria-label"], Vt = { class: "pk-file-preview__head" }, Ht = { class:
1539
1539
  ...t,
1540
1540
  ...a
1541
1541
  };
1542
- }, W = (e, t) => {
1543
- let n = F.value, i = n && U(n);
1542
+ }, G = (e, t) => {
1543
+ let n = I.value, i = n && W(n);
1544
1544
  i && (r("selectionSend", e, i, {
1545
1545
  id: t,
1546
1546
  size: n.format === "docx" ? n.paragraphCount : n.cells
1547
- }), ae(), document.getSelection()?.removeAllRanges());
1548
- }, ye = (e, t) => {
1549
- let n = ve.value.find((t) => t.id === e);
1550
- n && W(n.prompt(t), e);
1551
- }, G = b(0);
1552
- ue(ie, "scroll", () => G.value++, {
1547
+ }), ie(), document.getSelection()?.removeAllRanges());
1548
+ }, ve = (e, t) => {
1549
+ let n = _e.value.find((t) => t.id === e);
1550
+ n && G(n.prompt(t), e);
1551
+ }, K = b(0);
1552
+ le(re, "scroll", () => K.value++, {
1553
1553
  capture: !0,
1554
1554
  passive: !0
1555
- }), ue(window, "resize", () => G.value++, { passive: !0 });
1556
- let K = x(() => {
1557
- G.value;
1558
- let e = F.value?.measure(), t = ie.value?.getBoundingClientRect();
1555
+ }), le(window, "resize", () => K.value++, { passive: !0 });
1556
+ let q = x(() => {
1557
+ K.value;
1558
+ let e = I.value?.measure(), t = re.value?.getBoundingClientRect();
1559
1559
  if (e && t) return {
1560
1560
  start: {
1561
1561
  top: e.start.top - t.top,
@@ -1571,10 +1571,10 @@ var Bt = ["aria-label"], Vt = { class: "pk-file-preview__head" }, Ht = { class:
1571
1571
  };
1572
1572
  });
1573
1573
  return (t, n) => {
1574
- let a = fe, s = pe;
1575
- return M(), j("section", {
1574
+ let a = de, s = fe;
1575
+ return N(), M("section", {
1576
1576
  ref_key: "rootEl",
1577
- ref: ie,
1577
+ ref: re,
1578
1578
  class: "pk-file-preview",
1579
1579
  "aria-label": e.filename,
1580
1580
  tabindex: "-1",
@@ -1584,149 +1584,149 @@ var Bt = ["aria-label"], Vt = { class: "pk-file-preview__head" }, Ht = { class:
1584
1584
  y("div", Ht, [y("span", Ut, [f(a, {
1585
1585
  name: e.kind === "word" ? "ri:file-word-2-line" : "ri:file-excel-2-line",
1586
1586
  class: i(e.kind === "word" ? "pk-file-preview__icon--word" : "pk-file-preview__icon--sheet")
1587
- }, null, 8, ["name", "class"])]), y("div", Wt, [y("strong", Gt, w(e.filename), 1), y("span", Kt, [e.working ? (M(), j(v, { key: 0 }, [n[14] ||= y("span", {
1587
+ }, null, 8, ["name", "class"])]), y("div", Wt, [y("strong", Gt, w(e.filename), 1), y("span", Kt, [e.working ? (N(), M(v, { key: 0 }, [n[14] ||= y("span", {
1588
1588
  class: "pk-file-preview__spinner",
1589
1589
  "aria-hidden": "true"
1590
- }, null, -1), A(" " + w(k(o)("chatFilePreview.working")), 1)], 64)) : l.value ? (M(), j(v, { key: 1 }, [A(w(k(o)("chatFilePreview.answeredInChat")) + " ", 1), f(s, {
1590
+ }, null, -1), j(" " + w(A(o)("chatFilePreview.working")), 1)], 64)) : l.value ? (N(), M(v, { key: 1 }, [j(w(A(o)("chatFilePreview.answeredInChat")) + " ", 1), f(s, {
1591
1591
  modifiers: "link",
1592
1592
  class: "pk-file-preview__show-chat",
1593
- label: k(o)("chatFilePreview.showChat"),
1593
+ label: A(o)("chatFilePreview.showChat"),
1594
1594
  onClick: n[0] ||= (e) => r("showChat")
1595
- }, null, 8, ["label"])], 64)) : (M(), j(v, { key: 2 }, [A(w(k(o)("chatFilePreview.readOnly")), 1)], 64))])])]),
1596
- e.working ? (M(), j("div", qt)) : E("", !0),
1597
- e.version && p.value.length > 1 || P.value ? (M(), j("div", Jt, [e.version && p.value.length > 1 ? (M(), j("nav", {
1595
+ }, null, 8, ["label"])], 64)) : (N(), M(v, { key: 2 }, [j(w(A(o)("chatFilePreview.readOnly")), 1)], 64))])])]),
1596
+ e.working ? (N(), M("div", qt)) : D("", !0),
1597
+ e.version && p.value.length > 1 || F.value ? (N(), M("div", Jt, [e.version && p.value.length > 1 ? (N(), M("nav", {
1598
1598
  key: 0,
1599
1599
  class: "pk-file-preview__versions",
1600
- "aria-label": k(o)("chatFilePreview.versions")
1600
+ "aria-label": A(o)("chatFilePreview.versions")
1601
1601
  }, [
1602
1602
  f(s, {
1603
1603
  modifiers: "action-quiet",
1604
1604
  icon: "ri:arrow-left-s-line",
1605
- "aria-label": k(o)("chatFilePreview.previousVersion"),
1605
+ "aria-label": A(o)("chatFilePreview.previousVersion"),
1606
1606
  disabled: !S.value,
1607
1607
  onClick: n[1] ||= (e) => S.value && r("version", S.value)
1608
1608
  }, null, 8, ["aria-label", "disabled"]),
1609
- y("span", Xt, w(k(o)("chatFilePreview.versionOf", {
1609
+ y("span", Xt, w(A(o)("chatFilePreview.versionOf", {
1610
1610
  version: e.version,
1611
1611
  count: p.value.length
1612
1612
  })), 1),
1613
1613
  f(s, {
1614
1614
  modifiers: "action-quiet",
1615
1615
  icon: "ri:arrow-right-s-line",
1616
- "aria-label": k(o)("chatFilePreview.nextVersion"),
1616
+ "aria-label": A(o)("chatFilePreview.nextVersion"),
1617
1617
  disabled: !C.value,
1618
1618
  onClick: n[2] ||= (e) => C.value && r("version", C.value)
1619
1619
  }, null, 8, ["aria-label", "disabled"])
1620
- ], 8, Yt)) : E("", !0), P.value ? (M(), g(_e, {
1620
+ ], 8, Yt)) : D("", !0), F.value ? (N(), g(ge, {
1621
1621
  key: 1,
1622
1622
  modelValue: T.value,
1623
1623
  "onUpdate:modelValue": n[3] ||= (e) => T.value = e,
1624
1624
  name: "revisions",
1625
1625
  segmented: "",
1626
1626
  class: "pk-file-preview__modes u-segmented-fit mb-0",
1627
- "aria-label": k(o)("chatFilePreview.modes"),
1628
- options: re.value
1627
+ "aria-label": A(o)("chatFilePreview.modes"),
1628
+ options: ne.value
1629
1629
  }, {
1630
- markup: te(() => [y("span", Zt, w(k(o)("chatFilePreview.modeMarkup")), 1), y("span", Qt, w(k(o)("chatFilePreview.modeMarkupShort")), 1)]),
1630
+ markup: ee(() => [y("span", Zt, w(A(o)("chatFilePreview.modeMarkup")), 1), y("span", Qt, w(A(o)("chatFilePreview.modeMarkupShort")), 1)]),
1631
1631
  _: 1
1632
1632
  }, 8, [
1633
1633
  "modelValue",
1634
1634
  "aria-label",
1635
1635
  "options"
1636
- ])) : E("", !0)])) : E("", !0),
1636
+ ])) : D("", !0)])) : D("", !0),
1637
1637
  y("div", $t, [
1638
- e.restorable ? (M(), g(s, {
1638
+ e.restorable ? (N(), g(s, {
1639
1639
  key: 0,
1640
1640
  modifiers: "action-quiet",
1641
1641
  icon: "ri:arrow-go-back-line",
1642
- label: k(o)("chatFilePreview.restore"),
1642
+ label: A(o)("chatFilePreview.restore"),
1643
1643
  onClick: n[4] ||= (e) => r("restore")
1644
- }, null, 8, ["label"])) : E("", !0),
1644
+ }, null, 8, ["label"])) : D("", !0),
1645
1645
  f(s, {
1646
1646
  href: e.downloadUrl,
1647
1647
  download: "",
1648
1648
  modifiers: "action-quiet",
1649
1649
  icon: "ri:download-line",
1650
- title: k(o)("chatFilePreview.download"),
1651
- "aria-label": k(o)("chatFilePreview.download")
1650
+ title: A(o)("chatFilePreview.download"),
1651
+ "aria-label": A(o)("chatFilePreview.download")
1652
1652
  }, null, 8, [
1653
1653
  "href",
1654
1654
  "title",
1655
1655
  "aria-label"
1656
1656
  ]),
1657
- e.resize === "expand" ? (M(), g(s, {
1657
+ e.resize === "expand" ? (N(), g(s, {
1658
1658
  key: 1,
1659
1659
  modifiers: "action-quiet",
1660
1660
  icon: "ri:fullscreen-line",
1661
- title: k(o)("chatFilePreview.expand"),
1662
- "aria-label": k(o)("chatFilePreview.expand"),
1661
+ title: A(o)("chatFilePreview.expand"),
1662
+ "aria-label": A(o)("chatFilePreview.expand"),
1663
1663
  onClick: n[5] ||= (e) => r("resize")
1664
- }, null, 8, ["title", "aria-label"])) : e.resize === "shrink" ? (M(), g(s, {
1664
+ }, null, 8, ["title", "aria-label"])) : e.resize === "shrink" ? (N(), g(s, {
1665
1665
  key: 2,
1666
1666
  modifiers: "action-quiet",
1667
1667
  icon: "ri:fullscreen-exit-line",
1668
- title: k(o)("chatFilePreview.shrink"),
1669
- "aria-label": k(o)("chatFilePreview.shrink"),
1668
+ title: A(o)("chatFilePreview.shrink"),
1669
+ "aria-label": A(o)("chatFilePreview.shrink"),
1670
1670
  onClick: n[6] ||= (e) => r("resize")
1671
- }, null, 8, ["title", "aria-label"])) : E("", !0),
1671
+ }, null, 8, ["title", "aria-label"])) : D("", !0),
1672
1672
  f(s, {
1673
1673
  modifiers: "action-quiet",
1674
1674
  icon: "ri:close-line",
1675
- title: k(o)("chatFilePreview.close"),
1676
- "aria-label": k(o)("chatFilePreview.close"),
1675
+ title: A(o)("chatFilePreview.close"),
1676
+ "aria-label": A(o)("chatFilePreview.close"),
1677
1677
  onClick: n[7] ||= (e) => r("close")
1678
1678
  }, null, 8, ["title", "aria-label"])
1679
1679
  ])
1680
1680
  ]),
1681
- y("div", en, [e.loading ? (M(), j("div", tn, [(M(), j(v, null, m(8, (e) => y("div", {
1681
+ y("div", en, [e.loading ? (N(), M("div", tn, [(N(), M(v, null, m(8, (e) => y("div", {
1682
1682
  key: e,
1683
1683
  class: i(["vv-skeleton__item pk-file-preview__skeleton-line", e % 3 ? "w-full" : "w-128"])
1684
- }, null, 2)), 64))])) : e.error || !e.preview ? (M(), j("p", nn, w(k(o)("chatFilePreview.unavailable")), 1)) : e.preview.kind === "word" ? (M(), g(zt, {
1684
+ }, null, 2)), 64))])) : e.error || !e.preview ? (N(), M("p", nn, w(A(o)("chatFilePreview.unavailable")), 1)) : e.preview.kind === "word" ? (N(), g(zt, {
1685
1685
  key: 2,
1686
- zoom: O.value,
1687
- "onUpdate:zoom": n[8] ||= (e) => O.value = e,
1688
- fit: N.value,
1689
- "onUpdate:fit": n[9] ||= (e) => N.value = e,
1686
+ zoom: k.value,
1687
+ "onUpdate:zoom": n[8] ||= (e) => k.value = e,
1688
+ fit: P.value,
1689
+ "onUpdate:fit": n[9] ||= (e) => P.value = e,
1690
1690
  preview: e.preview,
1691
- mode: P.value ? T.value : "markup",
1691
+ mode: F.value ? T.value : "markup",
1692
1692
  marked: e.changes?.kind === "word" ? e.changes.paragraphs : void 0,
1693
- onSelect: oe
1693
+ onSelect: ae
1694
1694
  }, null, 8, [
1695
1695
  "zoom",
1696
1696
  "fit",
1697
1697
  "preview",
1698
1698
  "mode",
1699
1699
  "marked"
1700
- ])) : (M(), g(tt, {
1700
+ ])) : (N(), g(tt, {
1701
1701
  key: 3,
1702
- sheet: ee.value,
1703
- "onUpdate:sheet": n[10] ||= (e) => ee.value = e,
1704
- zoom: O.value,
1705
- "onUpdate:zoom": n[11] ||= (e) => O.value = e,
1702
+ sheet: E.value,
1703
+ "onUpdate:sheet": n[10] ||= (e) => E.value = e,
1704
+ zoom: k.value,
1705
+ "onUpdate:zoom": n[11] ||= (e) => k.value = e,
1706
1706
  preview: e.preview,
1707
1707
  marked: e.changes?.kind === "spreadsheet" ? e.changes.cells : void 0,
1708
- onSelect: oe
1708
+ onSelect: ae
1709
1709
  }, null, 8, [
1710
1710
  "sheet",
1711
1711
  "zoom",
1712
1712
  "preview",
1713
1713
  "marked"
1714
1714
  ]))]),
1715
- e.selectionActions && F.value && K.value ? (M(), g(ge, {
1715
+ e.selectionActions && I.value && q.value ? (N(), g(he, {
1716
1716
  key: 0,
1717
- asking: I.value,
1718
- "onUpdate:asking": n[12] ||= (e) => I.value = e,
1717
+ asking: L.value,
1718
+ "onUpdate:asking": n[12] ||= (e) => L.value = e,
1719
1719
  strategy: "absolute",
1720
- anchor: K.value,
1721
- actions: ve.value,
1722
- hint: me.value,
1723
- touch: L.value,
1724
- note: se.value ? void 0 : k(o)("selectionActions.notLatest", { version: e.version }),
1725
- "note-action": k(o)("selectionActions.openLatest"),
1726
- onAction: ye,
1727
- onAsk: n[13] ||= (e) => W(e, "ask"),
1728
- onNote: ce,
1729
- onClose: ae
1720
+ anchor: q.value,
1721
+ actions: _e.value,
1722
+ hint: pe.value,
1723
+ touch: R.value,
1724
+ note: oe.value ? void 0 : A(o)("selectionActions.notLatest", { version: e.version }),
1725
+ "note-action": A(o)("selectionActions.openLatest"),
1726
+ onAction: ve,
1727
+ onAsk: n[13] ||= (e) => G(e, "ask"),
1728
+ onNote: se,
1729
+ onClose: ie
1730
1730
  }, null, 8, [
1731
1731
  "asking",
1732
1732
  "anchor",
@@ -1735,11 +1735,11 @@ var Bt = ["aria-label"], Vt = { class: "pk-file-preview__head" }, Ht = { class:
1735
1735
  "touch",
1736
1736
  "note",
1737
1737
  "note-action"
1738
- ])) : E("", !0)
1738
+ ])) : D("", !0)
1739
1739
  ], 8, Bt);
1740
1740
  };
1741
1741
  }
1742
- }), an = ".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;position:relative;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;position:relative}.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{align-items:center;gap:var(--spacing-6);color:var(--color-word-3);font-size:var(--text-12);display:flex}.pk-file-preview__spinner{width:var(--spacing-12);height:var(--spacing-12);border:var(--spacing-2) solid var(--color-surface-4);border-top-color:var(--color-word-2);border-radius:50%;flex-shrink:0;animation:.8s linear infinite pk-file-preview-spin}.pk-file-preview__progress{right:0;bottom:calc(-1 * var(--border));height:var(--spacing-2);position:absolute;left:0;overflow:hidden}.pk-file-preview__progress:before{content:\"\";background-color:var(--color-word-3);width:30%;animation:1.4s ease-in-out infinite pk-file-preview-progress;position:absolute;top:0;bottom:0}@media (prefers-reduced-motion:reduce){.pk-file-preview__spinner,.pk-file-preview__progress:before{animation:none}}@keyframes pk-file-preview-spin{to{rotate:360deg}}@keyframes pk-file-preview-progress{0%{left:-30%}to{left:100%}}.pk-file-preview__show-chat{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}", on = /* @__PURE__ */ e({ default: () => sn }), sn = /*#__PURE__*/ B(rn, [["styles", [an]]]);
1742
+ }), an = ".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;position:relative;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;position:relative}.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{align-items:center;gap:var(--spacing-6);color:var(--color-word-3);font-size:var(--text-12);display:flex}.pk-file-preview__spinner{width:var(--spacing-12);height:var(--spacing-12);border:var(--spacing-2) solid var(--color-surface-4);border-top-color:var(--color-word-2);border-radius:50%;flex-shrink:0;animation:.8s linear infinite pk-file-preview-spin}.pk-file-preview__progress{right:0;bottom:calc(-1 * var(--border));height:var(--spacing-2);position:absolute;left:0;overflow:hidden}.pk-file-preview__progress:before{content:\"\";background-color:var(--color-word-3);width:30%;animation:1.4s ease-in-out infinite pk-file-preview-progress;position:absolute;top:0;bottom:0}@media (prefers-reduced-motion:reduce){.pk-file-preview__spinner,.pk-file-preview__progress:before{animation:none}}@keyframes pk-file-preview-spin{to{rotate:360deg}}@keyframes pk-file-preview-progress{0%{left:-30%}to{left:100%}}.pk-file-preview__show-chat{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}", on = /* @__PURE__ */ e({ default: () => sn }), sn = /*#__PURE__*/ V(rn, [["styles", [an]]]);
1743
1743
  export { on as n, sn as t };
1744
1744
 
1745
- //# sourceMappingURL=PkFilePreview-yjdtArag.js.map
1745
+ //# sourceMappingURL=PkFilePreview-DfYzaj3Y.js.map