@8wave/ai-elements 0.125.0-beta.40 → 0.125.0-beta.42
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/_chunks/{Agent-CeZ3bgZ3.js → Agent-DMvYDpLa.js} +123 -122
- package/dist/_chunks/Agent-DMvYDpLa.js.map +1 -0
- package/dist/_chunks/{PkFilePreview-D_1ZgiiA.js → PkFilePreview-DC4iX7Yc.js} +234 -209
- package/dist/_chunks/PkFilePreview-DC4iX7Yc.js.map +1 -0
- package/dist/_chunks/{PkFilePreviewDialog-CI22huzK.js → PkFilePreviewDialog-bcTkTcYk.js} +12 -7
- package/dist/_chunks/PkFilePreviewDialog-bcTkTcYk.js.map +1 -0
- package/dist/_chunks/{PkImageEditorDialog-CAEninFi.js → PkImageEditorDialog-FpbyhV3t.js} +2 -2
- package/dist/_chunks/{PkImageEditorDialog-CAEninFi.js.map → PkImageEditorDialog-FpbyhV3t.js.map} +1 -1
- package/dist/_chunks/{PkSelectionActions-BriGyWCi.js → PkSelectionActions-BbfVZY0R.js} +140 -13
- package/dist/_chunks/PkSelectionActions-BbfVZY0R.js.map +1 -0
- package/dist/_chunks/{PkStreamingMarkdown--9i0feuM.js → PkStreamingMarkdown-COSOOhCg.js} +3 -3
- package/dist/_chunks/{PkStreamingMarkdown--9i0feuM.js.map → PkStreamingMarkdown-COSOOhCg.js.map} +1 -1
- package/dist/_chunks/{PkToolChatFile-BKGUnWrj.js → PkToolChatFile-C_gS0X1j.js} +3 -3
- package/dist/_chunks/{PkToolChatFile-BKGUnWrj.js.map → PkToolChatFile-C_gS0X1j.js.map} +1 -1
- package/dist/_chunks/{PkToolRequestGeolocation-DktrQJvA.js → PkToolRequestGeolocation-CwDQnr7u.js} +2 -2
- package/dist/_chunks/{PkToolRequestGeolocation-DktrQJvA.js.map → PkToolRequestGeolocation-CwDQnr7u.js.map} +1 -1
- package/dist/_chunks/{PkToolRequestOAuthConnection-DkcLwFWl.js → PkToolRequestOAuthConnection-DkrnVowp.js} +2 -2
- package/dist/_chunks/{PkToolRequestOAuthConnection-DkcLwFWl.js.map → PkToolRequestOAuthConnection-DkrnVowp.js.map} +1 -1
- package/dist/_chunks/{PkToolShowArtifact-BfLpz2-W.js → PkToolShowArtifact-fpFtKrZo.js} +2 -2
- package/dist/_chunks/{PkToolShowArtifact-BfLpz2-W.js.map → PkToolShowArtifact-fpFtKrZo.js.map} +1 -1
- package/dist/_chunks/{PkToolShowContactForm-BsF6DFzV.js → PkToolShowContactForm-BAM772bm.js} +2 -2
- package/dist/_chunks/{PkToolShowContactForm-BsF6DFzV.js.map → PkToolShowContactForm-BAM772bm.js.map} +1 -1
- package/dist/_chunks/{PkToolShowForm-w6RvbKEB.js → PkToolShowForm-DJcL0bgw.js} +4 -4
- package/dist/_chunks/{PkToolShowForm-w6RvbKEB.js.map → PkToolShowForm-DJcL0bgw.js.map} +1 -1
- package/dist/_chunks/{PkToolShowImageGallery-BEddh4He.js → PkToolShowImageGallery-DhB_ucYe.js} +2 -2
- package/dist/_chunks/{PkToolShowImageGallery-BEddh4He.js.map → PkToolShowImageGallery-DhB_ucYe.js.map} +1 -1
- package/dist/_chunks/{PkToolShowProductList-k-VB4pUB.js → PkToolShowProductList-DfcJJrOC.js} +2 -2
- package/dist/_chunks/{PkToolShowProductList-k-VB4pUB.js.map → PkToolShowProductList-DfcJJrOC.js.map} +1 -1
- package/dist/_chunks/{PkToolShowSources-CGESvGrm.js → PkToolShowSources-GeWAMHYC.js} +3 -3
- package/dist/_chunks/{PkToolShowSources-CGESvGrm.js.map → PkToolShowSources-GeWAMHYC.js.map} +1 -1
- package/dist/_chunks/{PkToolShowSuggestedReply-DTAq41wP.js → PkToolShowSuggestedReply-gpuWzpoh.js} +2 -2
- package/dist/_chunks/{PkToolShowSuggestedReply-DTAq41wP.js.map → PkToolShowSuggestedReply-gpuWzpoh.js.map} +1 -1
- package/dist/_chunks/{PkToolShowVideo-DeexblEL.js → PkToolShowVideo-CikqhGpT.js} +2 -2
- package/dist/_chunks/{PkToolShowVideo-DeexblEL.js.map → PkToolShowVideo-CikqhGpT.js.map} +1 -1
- package/dist/_chunks/{PkToolShowWebPages-C42FNo8K.js → PkToolShowWebPages-B-LuiAtg.js} +2 -2
- package/dist/_chunks/{PkToolShowWebPages-C42FNo8K.js.map → PkToolShowWebPages-B-LuiAtg.js.map} +1 -1
- package/dist/_chunks/{chatImagePolicy-DlZPHhW-.js → chatImagePolicy-Dv_WHhDs.js} +2 -2
- package/dist/_chunks/{chatImagePolicy-DlZPHhW-.js.map → chatImagePolicy-Dv_WHhDs.js.map} +1 -1
- package/dist/_chunks/{markdown-DNPhTO5l.js → markdown-BYpvcbWH.js} +2 -2
- package/dist/_chunks/{markdown-DNPhTO5l.js.map → markdown-BYpvcbWH.js.map} +1 -1
- package/dist/_chunks/{utils-zkq8kMz-.js → utils-DMvy5QRR.js} +2 -2
- package/dist/_chunks/{utils-zkq8kMz-.js.map → utils-DMvy5QRR.js.map} +1 -1
- package/dist/ai-elements.es.js +405 -135
- package/dist/ai-elements.es.js.map +1 -1
- package/dist-vue/PkChatbot.js +1 -1
- package/dist-vue/PkChatbotEmptyState.js +1 -1
- package/dist-vue/PkChatbotInput.js +1 -1
- package/dist-vue/PkChatbotMessages.js +1 -1
- package/dist-vue/PkChatbotStepPayload.js +1 -1
- package/dist-vue/PkChatbotStepToolDetail.js +1 -1
- package/dist-vue/PkChatbotSteps.js +1 -1
- package/dist-vue/PkChatbotViewChat.js +1 -1
- package/dist-vue/PkChatbotViewConversations.js +1 -1
- package/dist-vue/PkChatbotViewFiles.js +1 -1
- package/dist-vue/PkChatbotViewProfile.js +1 -1
- package/dist-vue/_chunks/{Agent-ldDZiq6E.js → Agent-B9iJ1WvR.js} +131 -130
- package/dist-vue/_chunks/Agent-B9iJ1WvR.js.map +1 -0
- package/dist-vue/_chunks/{Document-BfjAfogy.js → Document-DnsOE7s6.js} +2 -2
- package/dist-vue/_chunks/{Document-BfjAfogy.js.map → Document-DnsOE7s6.js.map} +1 -1
- package/dist-vue/_chunks/{PkChart-DyyBXkd3.js → PkChart-D-K7nc0g.js} +2 -2
- package/dist-vue/_chunks/{PkChart-DyyBXkd3.js.map → PkChart-D-K7nc0g.js.map} +1 -1
- package/dist-vue/_chunks/{PkChatbot-wsqj3EpU.js → PkChatbot-DVQ-Bb7n.js} +8 -8
- package/dist-vue/_chunks/{PkChatbot-wsqj3EpU.js.map → PkChatbot-DVQ-Bb7n.js.map} +1 -1
- package/dist-vue/_chunks/{PkChatbotEmptyState-DcgIfNkX.js → PkChatbotEmptyState-OlgewA4_.js} +2 -2
- package/dist-vue/_chunks/{PkChatbotEmptyState-DcgIfNkX.js.map → PkChatbotEmptyState-OlgewA4_.js.map} +1 -1
- package/dist-vue/_chunks/{PkChatbotInput-CN4rmNgu.js → PkChatbotInput-D_I0Gf_u.js} +4 -4
- package/dist-vue/_chunks/{PkChatbotInput-CN4rmNgu.js.map → PkChatbotInput-D_I0Gf_u.js.map} +1 -1
- package/dist-vue/_chunks/{PkChatbotMessages-BlF4Xp0_.js → PkChatbotMessages-CAXnEfXK.js} +18 -18
- package/dist-vue/_chunks/{PkChatbotMessages-BlF4Xp0_.js.map → PkChatbotMessages-CAXnEfXK.js.map} +1 -1
- package/dist-vue/_chunks/{PkChatbotStepPayload-q9uXE5mr.js → PkChatbotStepPayload-EBri1L10.js} +2 -2
- package/dist-vue/_chunks/{PkChatbotStepPayload-q9uXE5mr.js.map → PkChatbotStepPayload-EBri1L10.js.map} +1 -1
- package/dist-vue/_chunks/{PkChatbotStepToolDetail-BJz6Qwh3.js → PkChatbotStepToolDetail-DiQEa0UV.js} +3 -3
- package/dist-vue/_chunks/{PkChatbotStepToolDetail-BJz6Qwh3.js.map → PkChatbotStepToolDetail-DiQEa0UV.js.map} +1 -1
- package/dist-vue/_chunks/{PkChatbotSteps-DvJYNl_k.js → PkChatbotSteps-BgLnv2J1.js} +5 -5
- package/dist-vue/_chunks/{PkChatbotSteps-DvJYNl_k.js.map → PkChatbotSteps-BgLnv2J1.js.map} +1 -1
- package/dist-vue/_chunks/{PkChatbotViewChat-tmHyxxT3.js → PkChatbotViewChat-CmjD1IXf.js} +360 -355
- package/dist-vue/_chunks/PkChatbotViewChat-CmjD1IXf.js.map +1 -0
- package/dist-vue/_chunks/{PkChatbotViewConversations-DOzUh_A7.js → PkChatbotViewConversations-CVZH5dXx.js} +3 -3
- package/dist-vue/_chunks/{PkChatbotViewConversations-DOzUh_A7.js.map → PkChatbotViewConversations-CVZH5dXx.js.map} +1 -1
- package/dist-vue/_chunks/{PkChatbotViewFiles-CsL8OhcA.js → PkChatbotViewFiles-CO4gv9nd.js} +3 -3
- package/dist-vue/_chunks/{PkChatbotViewFiles-CsL8OhcA.js.map → PkChatbotViewFiles-CO4gv9nd.js.map} +1 -1
- package/dist-vue/_chunks/{PkChatbotViewProfile-CFqxCK2f.js → PkChatbotViewProfile-CriJtak0.js} +2 -2
- package/dist-vue/_chunks/{PkChatbotViewProfile-CFqxCK2f.js.map → PkChatbotViewProfile-CriJtak0.js.map} +1 -1
- package/dist-vue/_chunks/{PkFilePreview-Bp5-Pl54.js → PkFilePreview-k5gEl3n8.js} +586 -434
- package/dist-vue/_chunks/PkFilePreview-k5gEl3n8.js.map +1 -0
- package/dist-vue/_chunks/{PkFilePreviewDialog-CS885vBR.js → PkFilePreviewDialog-DUwZPErE.js} +12 -7
- package/dist-vue/_chunks/PkFilePreviewDialog-DUwZPErE.js.map +1 -0
- package/dist-vue/_chunks/{PkImageEditorDialog-BhfdnsmX.js → PkImageEditorDialog-DQPXePae.js} +2 -2
- package/dist-vue/_chunks/{PkImageEditorDialog-BhfdnsmX.js.map → PkImageEditorDialog-DQPXePae.js.map} +1 -1
- package/dist-vue/_chunks/{PkStreamingMarkdown-NgrJUZPI.js → PkStreamingMarkdown-ZasabxE0.js} +3 -3
- package/dist-vue/_chunks/{PkStreamingMarkdown-NgrJUZPI.js.map → PkStreamingMarkdown-ZasabxE0.js.map} +1 -1
- package/dist-vue/_chunks/{PkToolChatFile-DnmiNGF4.js → PkToolChatFile-CD26Q2xp.js} +3 -3
- package/dist-vue/_chunks/{PkToolChatFile-DnmiNGF4.js.map → PkToolChatFile-CD26Q2xp.js.map} +1 -1
- package/dist-vue/_chunks/{PkToolRequestGeolocation-D1XNCvdr.js → PkToolRequestGeolocation-Bhh7UomV.js} +2 -2
- package/dist-vue/_chunks/{PkToolRequestGeolocation-D1XNCvdr.js.map → PkToolRequestGeolocation-Bhh7UomV.js.map} +1 -1
- package/dist-vue/_chunks/{PkToolRequestOAuthConnection-OTvMRYaL.js → PkToolRequestOAuthConnection-8GJlt5G1.js} +2 -2
- package/dist-vue/_chunks/{PkToolRequestOAuthConnection-OTvMRYaL.js.map → PkToolRequestOAuthConnection-8GJlt5G1.js.map} +1 -1
- package/dist-vue/_chunks/{PkToolShowArtifact-C8ueuIGQ.js → PkToolShowArtifact-BhVd_ZQ8.js} +2 -2
- package/dist-vue/_chunks/{PkToolShowArtifact-C8ueuIGQ.js.map → PkToolShowArtifact-BhVd_ZQ8.js.map} +1 -1
- package/dist-vue/_chunks/{PkToolShowChart-BWO6Hzlq.js → PkToolShowChart-BQXxaPIO.js} +3 -3
- package/dist-vue/_chunks/{PkToolShowChart-BWO6Hzlq.js.map → PkToolShowChart-BQXxaPIO.js.map} +1 -1
- package/dist-vue/_chunks/{PkToolShowContactForm-BBcDsLEO.js → PkToolShowContactForm-CackCDGD.js} +2 -2
- package/dist-vue/_chunks/{PkToolShowContactForm-BBcDsLEO.js.map → PkToolShowContactForm-CackCDGD.js.map} +1 -1
- package/dist-vue/_chunks/{PkToolShowDiagram-BzUcxOKy.js → PkToolShowDiagram-CABPsFi8.js} +2 -2
- package/dist-vue/_chunks/{PkToolShowDiagram-BzUcxOKy.js.map → PkToolShowDiagram-CABPsFi8.js.map} +1 -1
- package/dist-vue/_chunks/{PkToolShowForm-B6uhHzJ8.js → PkToolShowForm-BStbk4Iu.js} +4 -4
- package/dist-vue/_chunks/{PkToolShowForm-B6uhHzJ8.js.map → PkToolShowForm-BStbk4Iu.js.map} +1 -1
- package/dist-vue/_chunks/{PkToolShowImageGallery-C39nlJrJ.js → PkToolShowImageGallery-BeeHsdTp.js} +2 -2
- package/dist-vue/_chunks/{PkToolShowImageGallery-C39nlJrJ.js.map → PkToolShowImageGallery-BeeHsdTp.js.map} +1 -1
- package/dist-vue/_chunks/{PkToolShowProductList-FLLkRCnm.js → PkToolShowProductList-BfUiap9U.js} +2 -2
- package/dist-vue/_chunks/{PkToolShowProductList-FLLkRCnm.js.map → PkToolShowProductList-BfUiap9U.js.map} +1 -1
- package/dist-vue/_chunks/{PkToolShowSources-Cb7r5jrX.js → PkToolShowSources-CgEkcyRg.js} +3 -3
- package/dist-vue/_chunks/{PkToolShowSources-Cb7r5jrX.js.map → PkToolShowSources-CgEkcyRg.js.map} +1 -1
- package/dist-vue/_chunks/{PkToolShowSuggestedReply-BVLCX5Sm.js → PkToolShowSuggestedReply-DxlGhMvE.js} +2 -2
- package/dist-vue/_chunks/{PkToolShowSuggestedReply-BVLCX5Sm.js.map → PkToolShowSuggestedReply-DxlGhMvE.js.map} +1 -1
- package/dist-vue/_chunks/{PkToolShowVideo-QDLhVlau.js → PkToolShowVideo-CqSRnDNC.js} +2 -2
- package/dist-vue/_chunks/{PkToolShowVideo-QDLhVlau.js.map → PkToolShowVideo-CqSRnDNC.js.map} +1 -1
- package/dist-vue/_chunks/{PkToolShowWebPages-P6PdJTEE.js → PkToolShowWebPages-B-qIS8qY.js} +2 -2
- package/dist-vue/_chunks/{PkToolShowWebPages-P6PdJTEE.js.map → PkToolShowWebPages-B-qIS8qY.js.map} +1 -1
- package/dist-vue/_chunks/{createChatbotApiClient-CGeNprai.js → createChatbotApiClient-DmPcjwB3.js} +7 -7
- package/dist-vue/_chunks/{createChatbotApiClient-CGeNprai.js.map → createChatbotApiClient-DmPcjwB3.js.map} +1 -1
- package/dist-vue/_chunks/{useChatbotStore-KXAltGz3.js → useChatbotStore-B6ILfm5Z.js} +17 -17
- package/dist-vue/_chunks/{useChatbotStore-KXAltGz3.js.map → useChatbotStore-B6ILfm5Z.js.map} +1 -1
- package/dist-vue/_chunks/{utils-D4B1FVGF.js → utils-KBB6SDPn.js} +2 -2
- package/dist-vue/_chunks/{utils-D4B1FVGF.js.map → utils-KBB6SDPn.js.map} +1 -1
- package/dist-vue/api.js +1 -1
- package/dist-vue/apps/web-component/src/composables/useChatbotAgent.d.ts +6 -0
- package/dist-vue/composables.js +270 -6
- package/dist-vue/composables.js.map +1 -1
- package/dist-vue/index.js +5325 -5232
- package/dist-vue/index.js.map +1 -1
- package/dist-vue/locales.js +12 -0
- package/dist-vue/packages/components/src/chat/PkAgentSettingsPanel.d.ts +6 -0
- package/dist-vue/packages/components/src/chat/PkFilePreview.d.ts +8 -0
- package/dist-vue/packages/components/src/chat/PkFilePreviewDialog.d.ts +4 -0
- package/dist-vue/packages/components/src/chat/PkSelectionActionIconPicker.d.ts +19 -0
- package/dist-vue/packages/components/src/chat/PkSelectionActions.d.ts +3 -0
- package/dist-vue/packages/components/src/chat/selectionActionEdits.d.ts +1 -0
- package/dist-vue/packages/components/src/chat/selectionActionIcons.d.ts +9 -0
- package/dist-vue/packages/components/src/chat/useChatFilePreview.d.ts +12 -12
- package/dist-vue/packages/composable/src/chatbot/useChatbotStore.d.ts +18 -0
- package/dist-vue/packages/models/src/schema/Agent.d.ts +2688 -0
- package/dist-vue/packages/models/src/schema/Chart.d.ts +4 -4
- package/dist-vue/packages/models/src/schema/Lead.d.ts +6 -6
- package/dist-vue/packages/models/src/schema/ReasoningChat.d.ts +768 -0
- package/dist-vue/packages/models/src/schema/SelectionAction.d.ts +1415 -0
- package/dist-vue/packages/models/src/schema/SelectionActionPreview.d.ts +38 -0
- package/dist-vue/packages/models/src/schema/SpreadsheetPreview.d.ts +6 -6
- package/dist-vue/packages/models/src/schema/SubAgent.d.ts +768 -0
- package/dist-vue/packages/models/src/schema/WordPreview.d.ts +13 -13
- package/dist-vue/packages/models/src/schema/index.d.ts +1 -0
- package/dist-vue/style.css +1 -1
- package/package.json +1 -1
- package/dist/_chunks/Agent-CeZ3bgZ3.js.map +0 -1
- package/dist/_chunks/PkFilePreview-D_1ZgiiA.js.map +0 -1
- package/dist/_chunks/PkFilePreviewDialog-CI22huzK.js.map +0 -1
- package/dist/_chunks/PkSelectionActions-BriGyWCi.js.map +0 -1
- package/dist-vue/_chunks/Agent-ldDZiq6E.js.map +0 -1
- package/dist-vue/_chunks/PkChatbotViewChat-tmHyxxT3.js.map +0 -1
- package/dist-vue/_chunks/PkFilePreview-Bp5-Pl54.js.map +0 -1
- package/dist-vue/_chunks/PkFilePreviewDialog-CS885vBR.js.map +0 -1
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import { r as e } from "./rolldown-runtime-9rEmUaIe.js";
|
|
2
2
|
import { A as t, B as n, Et as r, F as i, I as a, J as o, L as s, N as c, Ot as l, Q as u, S as d, Tt as f, V as p, X as m, _ as h, d as g, f as _, g as v, gt as y, h as b, j as ee, k as x, kt as S, ot as C, r as w, tt as te, v as T, vt as ne, w as E, wt as D, x as O, y as k, z as A } from "./vue.runtime.esm-bundler-C2U5uTqB.js";
|
|
3
3
|
import { r as re } from "./vue-i18n-POtLvOl1.js";
|
|
4
|
-
import { i as j, n as M, r as
|
|
5
|
-
import { G as
|
|
4
|
+
import { i as j, n as M, r as ie } from "./excelNumberFormat-BhQjife9.js";
|
|
5
|
+
import { G as N, H as ae, J as P, K as F, U as oe, V as I, W as se, o as ce, q as L } from "./utils-DMvy5QRR.js";
|
|
6
6
|
import { d as R, l as le } from "./dist-D6oUr4J_.js";
|
|
7
7
|
import { r as ue } from "./index.es-DIHz5I8K.js";
|
|
8
8
|
import { t as de } from "./VvButtonLocalized-C8S7XJGv.js";
|
|
9
|
-
import { a as
|
|
10
|
-
import { t as
|
|
11
|
-
import { t as
|
|
9
|
+
import { a as z, i as B, r as fe, t as pe } from "./PkSelectionActions-BbfVZY0R.js";
|
|
10
|
+
import { t as V } from "./_plugin-vue_export-helper-Djzt4Yr7.js";
|
|
11
|
+
import { t as me } from "./PkEditorRadioButtons-Br4c42KS.js";
|
|
12
12
|
// ../../packages/components/src/chat/fileSelection.ts
|
|
13
|
-
var
|
|
13
|
+
var he = 2e3, H = 1e3, ge = 60, _e = 1400, U = 20, ve = 100, W = (e) => Number(e.slice(1)), ye = (e) => {
|
|
14
14
|
let t = [...new Set(e)].sort((e, t) => W(e) - W(t)), n = [];
|
|
15
15
|
for (let e of t) {
|
|
16
16
|
let t = n[n.length - 1];
|
|
@@ -29,7 +29,7 @@ var ge = 2e3, V = 1e3, _e = 60, ve = 1400, H = 20, U = 100, W = (e) => Number(e.
|
|
|
29
29
|
let r = G(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 <=
|
|
32
|
+
for (let t = !0; a - i <= _e; t = !t) {
|
|
33
33
|
if (G(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) {
|
|
@@ -41,7 +41,7 @@ var ge = 2e3, V = 1e3, _e = 60, ve = 1400, H = 20, U = 100, W = (e) => Number(e.
|
|
|
41
41
|
index: r.indexOf(t) + 1 || 1,
|
|
42
42
|
of: r.length
|
|
43
43
|
} };
|
|
44
|
-
}, K = (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 >
|
|
44
|
+
}, K = (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 > H ? `${e.slice(0, H / 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);
|
|
@@ -76,7 +76,7 @@ var ge = 2e3, V = 1e3, _e = 60, ve = 1400, H = 20, U = 100, W = (e) => Number(e.
|
|
|
76
76
|
let r = K(n.cloneContents()).replace(/\n$/, ""), a = document.createRange();
|
|
77
77
|
a.setStart(e, 0), a.setEnd(t.startContainer, t.startOffset);
|
|
78
78
|
let l = K(a.cloneContents()).length + (o.length - o.trimStart().length);
|
|
79
|
-
c.before = r.slice(Math.max(0, l -
|
|
79
|
+
c.before = r.slice(Math.max(0, l - ge), l), c.after = r.slice(l + s.length, l + s.length + ge), Object.assign(c, be(r, l, s.length));
|
|
80
80
|
}
|
|
81
81
|
return c;
|
|
82
82
|
}, we = (e) => {
|
|
@@ -94,7 +94,7 @@ var ge = 2e3, V = 1e3, _e = 60, ve = 1400, H = 20, U = 100, W = (e) => Number(e.
|
|
|
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 = `${we(n.c1)}${n.r1}`, a = `${we(n.c2)}${n.r2}`, o = (e.hiddenRows ?? []).filter((e) => e >= n.r1 && e <= n.r2).slice(0,
|
|
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, U).map((e) => String(e.value)).join("; ").slice(0, 500);
|
|
98
98
|
return {
|
|
99
99
|
format: "xlsx",
|
|
100
100
|
sheet: e.name,
|
|
@@ -124,7 +124,7 @@ var Ee = { class: "pk-spreadsheet-preview" }, De = { class: "pk-spreadsheet-prev
|
|
|
124
124
|
}, ze = {
|
|
125
125
|
key: 0,
|
|
126
126
|
class: "pk-spreadsheet-preview__average"
|
|
127
|
-
}, Be = { key: 1 }, Ve = { class: "pk-spreadsheet-preview__zoom" }, He = { class: "pk-spreadsheet-preview__percent" }, Ue = 64, We = 20, Ge = 28, Ke = 44, qe = 400, Je = 10, Ye = /*#__PURE__*/
|
|
127
|
+
}, Be = { key: 1 }, Ve = { class: "pk-spreadsheet-preview__zoom" }, He = { class: "pk-spreadsheet-preview__percent" }, Ue = 64, We = 20, Ge = 28, Ke = 44, qe = 400, Je = 10, Ye = /*#__PURE__*/ V(/* @__PURE__ */ E({
|
|
128
128
|
__name: "PkSpreadsheetPreview",
|
|
129
129
|
props: /*@__PURE__*/ c({
|
|
130
130
|
preview: { type: null },
|
|
@@ -144,26 +144,26 @@ var Ee = { class: "pk-spreadsheet-preview" }, De = { class: "pk-spreadsheet-prev
|
|
|
144
144
|
u(() => n.preview, () => {
|
|
145
145
|
x.value = 0;
|
|
146
146
|
});
|
|
147
|
-
let
|
|
147
|
+
let N = b(() => n.marked?.get(E.value?.name ?? "")), ae = b(() => {
|
|
148
148
|
let e = /* @__PURE__ */ new Map();
|
|
149
|
-
for (let t of
|
|
149
|
+
for (let t of N.value ?? []) {
|
|
150
150
|
let [n, r] = t.split(":"), i = e.get(Number(n));
|
|
151
151
|
e.set(Number(n), i ? `${i},${r}` : r);
|
|
152
152
|
}
|
|
153
153
|
return e;
|
|
154
|
-
}),
|
|
154
|
+
}), P = (e, t) => !!N.value?.has(`${e}:${t}`);
|
|
155
155
|
u(() => n.marked, (e) => {
|
|
156
|
-
if (!e ||
|
|
156
|
+
if (!e || N.value) return;
|
|
157
157
|
let t = n.preview.sheets.findIndex((t) => e.has(t.name));
|
|
158
158
|
t >= 0 && (x.value = t);
|
|
159
159
|
}, { immediate: !0 });
|
|
160
|
-
let
|
|
161
|
-
u(
|
|
162
|
-
let
|
|
160
|
+
let F = () => fe(w.value, ".pk-spreadsheet-preview__cell--marked");
|
|
161
|
+
u(N, F, { flush: "post" }), s(F);
|
|
162
|
+
let oe = (e) => {
|
|
163
163
|
let t = "";
|
|
164
164
|
for (let n = e; n > 0; n = Math.floor((n - 1) / 26)) t = String.fromCharCode(65 + (n - 1) % 26) + t;
|
|
165
165
|
return t;
|
|
166
|
-
},
|
|
166
|
+
}, I = b(() => {
|
|
167
167
|
let e = E.value;
|
|
168
168
|
if (!e) return [];
|
|
169
169
|
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 = Ke, a = te.value / C.value;
|
|
@@ -176,7 +176,7 @@ var Ee = { class: "pk-spreadsheet-preview" }, De = { class: "pk-spreadsheet-prev
|
|
|
176
176
|
}), i += e;
|
|
177
177
|
}
|
|
178
178
|
return r;
|
|
179
|
-
}),
|
|
179
|
+
}), se = b(() => I.value.reduce((e, t) => e + t.width, Ke)), ce = b(() => I.value.map((e) => `${e.col}:${e.width}`).join(",")), L = /* @__PURE__ */ new WeakMap(), R = b(() => {
|
|
180
180
|
let e = E.value;
|
|
181
181
|
if (!e) return [];
|
|
182
182
|
let t = new Set(e.hiddenRows ?? []), n = new Map(e.rows.map((e) => [e.row, e.height])), r = Math.ceil((ne.value / C.value - Ge) / We), i = e.moreRows ? e.lastRow : Math.max(e.lastRow + 5, r + t.size), a = L.get(e);
|
|
@@ -193,28 +193,28 @@ var Ee = { class: "pk-spreadsheet-preview" }, De = { class: "pk-spreadsheet-prev
|
|
|
193
193
|
let e = /* @__PURE__ */ new Map();
|
|
194
194
|
for (let t of E.value?.rows ?? []) for (let n of t.cells) e.set(`${t.row},${n.col}`, n);
|
|
195
195
|
return e;
|
|
196
|
-
}),
|
|
196
|
+
}), z = b(() => {
|
|
197
197
|
let e = /* @__PURE__ */ new Map();
|
|
198
198
|
for (let t of E.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}`, {
|
|
199
199
|
row: t.row,
|
|
200
200
|
col: n.col
|
|
201
201
|
});
|
|
202
202
|
return e;
|
|
203
|
-
}),
|
|
204
|
-
let n =
|
|
203
|
+
}), B = (e, t) => ue.value.get(`${e},${t}`), pe = (e, t) => {
|
|
204
|
+
let n = B(e, t)?.span;
|
|
205
205
|
if (n) return {
|
|
206
206
|
rows: R.value.filter((t) => t.row >= e && t.row < e + n.rows).length,
|
|
207
|
-
cols:
|
|
207
|
+
cols: I.value.filter((e) => e.col >= t && e.col < t + n.cols).length
|
|
208
208
|
};
|
|
209
|
-
},
|
|
209
|
+
}, V = (e) => e?.style === void 0 ? void 0 : n.preview.styles[e.style], me = (e) => {
|
|
210
210
|
let t = e.numFmt === void 0 ? void 0 : n.preview.numberFormats?.[e.numFmt], r = e.value;
|
|
211
211
|
if (t !== void 0) try {
|
|
212
|
-
return e.format === "date" ? e.serial === void 0 ? void 0 : M(t, e.serial, h.value, n.preview.date1904) : typeof r == "number" ? j(t) ? M(t, r, h.value, n.preview.date1904) :
|
|
212
|
+
return e.format === "date" ? e.serial === void 0 ? void 0 : M(t, e.serial, h.value, n.preview.date1904) : typeof r == "number" ? j(t) ? M(t, r, h.value, n.preview.date1904) : ie(t, r, h.value) : void 0;
|
|
213
213
|
} catch {
|
|
214
214
|
return;
|
|
215
215
|
}
|
|
216
|
-
},
|
|
217
|
-
let n =
|
|
216
|
+
}, he = (e, t) => {
|
|
217
|
+
let n = me(e);
|
|
218
218
|
if (n) return n.text;
|
|
219
219
|
let r = e.decimals === void 0 ? { maximumFractionDigits: 10 } : {
|
|
220
220
|
minimumFractionDigits: e.decimals,
|
|
@@ -229,18 +229,18 @@ var Ee = { class: "pk-spreadsheet-preview" }, De = { class: "pk-spreadsheet-prev
|
|
|
229
229
|
currency: e.currency
|
|
230
230
|
} : {}
|
|
231
231
|
}).format(t);
|
|
232
|
-
},
|
|
232
|
+
}, H = (e) => {
|
|
233
233
|
let t = /* @__PURE__ */ new Date(`${e}T00:00:00Z`);
|
|
234
234
|
return Number.isNaN(t.getTime()) ? e : new Intl.DateTimeFormat(h.value, {
|
|
235
235
|
dateStyle: "short",
|
|
236
236
|
timeZone: "UTC"
|
|
237
237
|
}).format(t);
|
|
238
|
-
},
|
|
238
|
+
}, ge = (e) => {
|
|
239
239
|
if (!e) return "";
|
|
240
240
|
if (e.missing) return "—";
|
|
241
241
|
let t = e.value;
|
|
242
|
-
return t === void 0 ? "" : typeof t == "boolean" ? f(t ? "chatFilePreview.true" : "chatFilePreview.false") : e.format === "date" && typeof t == "string" ?
|
|
243
|
-
},
|
|
242
|
+
return t === void 0 ? "" : typeof t == "boolean" ? f(t ? "chatFilePreview.true" : "chatFilePreview.false") : e.format === "date" && typeof t == "string" ? me(e)?.text ?? H(t) : typeof t == "number" ? he(e, t) : t;
|
|
243
|
+
}, _e = (e) => {
|
|
244
244
|
if (!e) return "";
|
|
245
245
|
if (e.formula) return `=${e.formula}`;
|
|
246
246
|
let t = e.value;
|
|
@@ -248,9 +248,9 @@ var Ee = { class: "pk-spreadsheet-preview" }, De = { class: "pk-spreadsheet-prev
|
|
|
248
248
|
useGrouping: !1,
|
|
249
249
|
maximumFractionDigits: 15,
|
|
250
250
|
...e.format === "percent" ? { style: "percent" } : {}
|
|
251
|
-
}).format(t) :
|
|
252
|
-
},
|
|
253
|
-
let r =
|
|
251
|
+
}).format(t) : ge(e);
|
|
252
|
+
}, U = (e) => e ? `${e.width}px solid ${e.color}` : void 0, ve = (e, t, n) => {
|
|
253
|
+
let r = V(e), i = e?.value, a = typeof i == "number" || e?.format === "date" || !!e?.missing, o = {
|
|
254
254
|
textAlign: r?.align ?? (a ? "right" : typeof i == "boolean" || e?.format === "error" ? "center" : "left"),
|
|
255
255
|
verticalAlign: r?.valign === "top" ? "top" : r?.valign === "middle" ? "middle" : "bottom",
|
|
256
256
|
whiteSpace: r?.wrap ? "pre-wrap" : "nowrap"
|
|
@@ -258,13 +258,13 @@ var Ee = { class: "pk-spreadsheet-preview" }, De = { class: "pk-spreadsheet-prev
|
|
|
258
258
|
r?.bold && (o.fontWeight = 700), r?.italic && (o.fontStyle = "italic");
|
|
259
259
|
let s = [r?.underline ? "underline" : "", r?.strike ? "line-through" : ""].filter(Boolean).join(" ");
|
|
260
260
|
s && (o.textDecoration = s), r?.size && (o.fontSize = `${r.size}pt`);
|
|
261
|
-
let c = e ?
|
|
261
|
+
let c = e ? me(e)?.color : void 0;
|
|
262
262
|
if ((c ?? r?.color) && (o.color = c ?? r?.color), r?.fill && (o.backgroundColor = r.fill), r?.indent) {
|
|
263
263
|
let e = `${4 + r.indent * 9}px`;
|
|
264
264
|
o.textAlign === "right" ? o.paddingRight = e : o.paddingLeft = e;
|
|
265
265
|
}
|
|
266
266
|
let l = it(t, n);
|
|
267
|
-
return W(t, n) ? (o.borderStyle = "hidden", o.boxShadow = [...l, Xe(e, t, n)].filter(Boolean).join(", ")) : (o.borderTop =
|
|
267
|
+
return W(t, n) ? (o.borderStyle = "hidden", o.boxShadow = [...l, Xe(e, t, n)].filter(Boolean).join(", ")) : (o.borderTop = U(r?.borders?.top), o.borderRight = U(r?.borders?.right), o.borderBottom = U(r?.borders?.bottom), o.borderLeft = U(r?.borders?.left), o.boxShadow = [...l, ...be(e, t, n)].join(", ")), Object.assign(o, et(t, n)), o;
|
|
268
268
|
}, W = (e, t) => {
|
|
269
269
|
let n = E.value?.frozen;
|
|
270
270
|
return !!n && (e <= n.rows || t <= n.cols);
|
|
@@ -274,9 +274,9 @@ var Ee = { class: "pk-spreadsheet-preview" }, De = { class: "pk-spreadsheet-prev
|
|
|
274
274
|
bottom: (e) => `inset 0 -${e.width}px 0 ${e.color}`,
|
|
275
275
|
left: (e) => `inset ${e.width}px 0 0 ${e.color}`
|
|
276
276
|
}, G = (...e) => e.reduce((e, t) => t && (!e || t.width > e.width) ? t : e, void 0), be = (e, t, n) => {
|
|
277
|
-
let r =
|
|
278
|
-
return [t === R.value[0]?.row && r?.top && ye.top(r.top), n ===
|
|
279
|
-
}, K = b(() => R.value.map((e) => e.row)), xe = b(() =>
|
|
277
|
+
let r = V(e)?.borders;
|
|
278
|
+
return [t === R.value[0]?.row && r?.top && ye.top(r.top), n === I.value[0]?.col && r?.left && ye.left(r.left)].filter((e) => !!e);
|
|
279
|
+
}, K = b(() => R.value.map((e) => e.row)), xe = b(() => I.value.map((e) => e.col)), Se = b(() => new Map(K.value.map((e, t) => [e, t]))), Ce = b(() => new Map(xe.value.map((e, t) => [e, t]))), we = (e, t, n, r) => {
|
|
280
280
|
let i = [], a = t.get(n) ?? e.length;
|
|
281
281
|
for (; a < e.length && e[a] < n + r; a++) i.push(e[a]);
|
|
282
282
|
return {
|
|
@@ -292,17 +292,17 @@ var Ee = { class: "pk-spreadsheet-preview" }, De = { class: "pk-spreadsheet-prev
|
|
|
292
292
|
row: a,
|
|
293
293
|
col: e
|
|
294
294
|
}))).map((e) => {
|
|
295
|
-
let t =
|
|
296
|
-
return
|
|
295
|
+
let t = z.value.get(`${e.row},${e.col}`) ?? e;
|
|
296
|
+
return B(t.row, t.col);
|
|
297
297
|
});
|
|
298
298
|
}, Xe = (e, t, n) => {
|
|
299
|
-
let r =
|
|
299
|
+
let r = V(e)?.borders, i = G(r?.right, ...Ye(e, t, n, "right").map((e) => V(e)?.borders?.left)), a = G(r?.bottom, ...Ye(e, t, n, "bottom").map((e) => V(e)?.borders?.top)), o = E.value?.gridlines;
|
|
300
300
|
return [
|
|
301
301
|
i ? ye.right(i) : o && "inset calc(var(--border) * -1) 0 0 var(--pk-spreadsheet-gridline)",
|
|
302
302
|
a ? ye.bottom(a) : o && "inset 0 calc(var(--border) * -1) 0 var(--pk-spreadsheet-gridline)",
|
|
303
303
|
...be(e, t, n)
|
|
304
304
|
].filter(Boolean).join(", ");
|
|
305
|
-
}, Ze = (e) => Ge + R.value.filter((t) => t.row < e).reduce((e, t) => e + t.height, 0), Qe = (e) => Ke +
|
|
305
|
+
}, Ze = (e) => Ge + R.value.filter((t) => t.row < e).reduce((e, t) => e + t.height, 0), Qe = (e) => Ke + I.value.filter((t) => t.col < e).reduce((e, t) => e + t.width, 0), $e = b(() => {
|
|
306
306
|
let e = E.value?.frozen;
|
|
307
307
|
return {
|
|
308
308
|
top: Ze((e?.rows ?? 0) + 1),
|
|
@@ -337,7 +337,7 @@ var Ee = { class: "pk-spreadsheet-preview" }, De = { class: "pk-spreadsheet-prev
|
|
|
337
337
|
})), tt = (e, t) => e >= X.value.r1 && e <= X.value.r2 && t >= X.value.c1 && t <= X.value.c2, nt = (e, t) => Y.value.row === e && Y.value.col === t, rt = (e) => e >= X.value.r1 && e <= X.value.r2 ? `${X.value.c1}:${X.value.c2}:${Y.value.row === e ? Y.value.col : 0}:${e === X.value.r1 ? "t" : ""}${e === X.value.r2 ? "b" : ""}` : "", it = (e, t) => {
|
|
338
338
|
let { r1: n, r2: r, c1: i, c2: a } = X.value;
|
|
339
339
|
if (n === r && i === a || !tt(e, t)) return [];
|
|
340
|
-
let o =
|
|
340
|
+
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)";
|
|
341
341
|
return [
|
|
342
342
|
e === n && `inset 0 ${l} 0 ${u}`,
|
|
343
343
|
s >= r && `inset 0 calc(${l} * -1) 0 ${u}`,
|
|
@@ -450,7 +450,7 @@ var Ee = { class: "pk-spreadsheet-preview" }, De = { class: "pk-spreadsheet-prev
|
|
|
450
450
|
}[e.key];
|
|
451
451
|
if (!t) return;
|
|
452
452
|
e.preventDefault();
|
|
453
|
-
let n = R.value.map((e) => e.row), r =
|
|
453
|
+
let n = R.value.map((e) => e.row), r = I.value.map((e) => e.col), a = (e) => z.value.get(`${e.row},${e.col}`) ?? e, o = a(Y.value), s = n.indexOf(Y.value.row), c = r.indexOf(Y.value.col), l = o;
|
|
454
454
|
for (;;) {
|
|
455
455
|
let e = Math.min(n.length - 1, Math.max(0, s + t[0])), i = Math.min(r.length - 1, Math.max(0, c + t[1]));
|
|
456
456
|
if (e === s && i === c || (s = e, c = i, l = a({
|
|
@@ -462,18 +462,18 @@ var Ee = { class: "pk-spreadsheet-preview" }, De = { class: "pk-spreadsheet-prev
|
|
|
462
462
|
block: "nearest",
|
|
463
463
|
inline: "nearest"
|
|
464
464
|
}));
|
|
465
|
-
}, yt = b(() =>
|
|
465
|
+
}, yt = b(() => B(Y.value.row, Y.value.col)), $ = b(() => {
|
|
466
466
|
let { r1: e, r2: t, c1: n, c2: r } = X.value;
|
|
467
467
|
if (e === t && n === r) return;
|
|
468
468
|
let i = 0, a = 0, o = 0, s;
|
|
469
469
|
for (let c = e; c <= t; c++) for (let e = n; e <= r; e++) {
|
|
470
|
-
let t =
|
|
470
|
+
let t = B(c, e);
|
|
471
471
|
t && (t.value !== void 0 || t.missing) && (i++, typeof t.value == "number" && (a += t.value, o++, s ??= t));
|
|
472
472
|
}
|
|
473
473
|
if (i) return {
|
|
474
474
|
count: i,
|
|
475
|
-
sum: s ?
|
|
476
|
-
average: s ?
|
|
475
|
+
sum: s ? he(s, a) : void 0,
|
|
476
|
+
average: s ? he(s, a / o) : void 0
|
|
477
477
|
};
|
|
478
478
|
}), bt = (e) => {
|
|
479
479
|
C.value = Math.min(2, Math.max(.5, Math.round((C.value + e) * 10) / 10));
|
|
@@ -485,7 +485,7 @@ var Ee = { class: "pk-spreadsheet-preview" }, De = { class: "pk-spreadsheet-prev
|
|
|
485
485
|
v("span", {
|
|
486
486
|
class: "pk-spreadsheet-preview__ref",
|
|
487
487
|
"aria-label": D(f)("chatFilePreview.cell")
|
|
488
|
-
}, S(
|
|
488
|
+
}, S(oe(Y.value.col)) + S(Y.value.row), 9, Oe),
|
|
489
489
|
n[6] ||= v("span", {
|
|
490
490
|
class: "pk-spreadsheet-preview__fx",
|
|
491
491
|
"aria-hidden": "true"
|
|
@@ -493,7 +493,7 @@ var Ee = { class: "pk-spreadsheet-preview" }, De = { class: "pk-spreadsheet-prev
|
|
|
493
493
|
v("output", {
|
|
494
494
|
class: "pk-spreadsheet-preview__formula",
|
|
495
495
|
"aria-label": D(f)("chatFilePreview.formulaBar")
|
|
496
|
-
}, S(
|
|
496
|
+
}, S(_e(yt.value)), 9, ke)
|
|
497
497
|
]),
|
|
498
498
|
v("div", {
|
|
499
499
|
ref_key: "scrollEl",
|
|
@@ -514,16 +514,16 @@ var Ee = { class: "pk-spreadsheet-preview" }, De = { class: "pk-spreadsheet-prev
|
|
|
514
514
|
class: r(["pk-spreadsheet-preview__grid", { "pk-spreadsheet-preview__grid--lines": E.value.gridlines }]),
|
|
515
515
|
style: l({
|
|
516
516
|
zoom: C.value,
|
|
517
|
-
width: `${
|
|
517
|
+
width: `${se.value}px`,
|
|
518
518
|
"--pk-spreadsheet-stuck-top": `${$e.value.top}px`,
|
|
519
519
|
"--pk-spreadsheet-stuck-left": `${$e.value.left}px`
|
|
520
520
|
})
|
|
521
521
|
}, [
|
|
522
|
-
v("colgroup", null, [v("col", { style: l({ width: `${Ke}px` }) }, null, 4), (A(!0), k(_, null, p(
|
|
522
|
+
v("colgroup", null, [v("col", { style: l({ width: `${Ke}px` }) }, null, 4), (A(!0), k(_, null, p(I.value, (e) => (A(), k("col", {
|
|
523
523
|
key: e.col,
|
|
524
524
|
style: l({ width: `${e.width}px` })
|
|
525
525
|
}, null, 4))), 128))]),
|
|
526
|
-
v("thead", null, [v("tr", { style: l({ height: `${Ge}px` }) }, [n[7] ||= v("th", { class: "pk-spreadsheet-preview__corner" }, null, -1), (A(!0), k(_, null, p(
|
|
526
|
+
v("thead", null, [v("tr", { style: l({ height: `${Ge}px` }) }, [n[7] ||= v("th", { class: "pk-spreadsheet-preview__corner" }, null, -1), (A(!0), k(_, null, p(I.value, (e) => (A(), k("th", {
|
|
527
527
|
key: e.col,
|
|
528
528
|
scope: "col",
|
|
529
529
|
class: r(["pk-spreadsheet-preview__head", { "pk-spreadsheet-preview__head--current": e.col >= X.value.c1 && e.col <= X.value.c2 }]),
|
|
@@ -531,15 +531,15 @@ var Ee = { class: "pk-spreadsheet-preview" }, De = { class: "pk-spreadsheet-prev
|
|
|
531
531
|
left: `${Qe(e.col)}px`,
|
|
532
532
|
zIndex: 2
|
|
533
533
|
} : void 0)
|
|
534
|
-
}, S(
|
|
534
|
+
}, S(oe(e.col)), 7))), 128))], 4)]),
|
|
535
535
|
v("tbody", null, [(A(!0), k(_, null, p(R.value, (e, t, n, i) => {
|
|
536
536
|
let a = [
|
|
537
537
|
e,
|
|
538
538
|
E.value,
|
|
539
|
-
|
|
539
|
+
ce.value,
|
|
540
540
|
D(h),
|
|
541
541
|
rt(e.row),
|
|
542
|
-
|
|
542
|
+
ae.value.get(e.row)
|
|
543
543
|
];
|
|
544
544
|
if (i && i.el && i.key === e.row && ee(i, a)) return i;
|
|
545
545
|
let o = (A(), k("tr", {
|
|
@@ -553,23 +553,23 @@ var Ee = { class: "pk-spreadsheet-preview" }, De = { class: "pk-spreadsheet-prev
|
|
|
553
553
|
left: 0,
|
|
554
554
|
zIndex: 4
|
|
555
555
|
} : void 0)
|
|
556
|
-
}, S(e.row), 7), (A(!0), k(_, null, p(
|
|
556
|
+
}, S(e.row), 7), (A(!0), k(_, null, p(I.value, (t) => (A(), k(_, { key: t.col }, [z.value.has(`${e.row},${t.col}`) ? T("", !0) : (A(), k("td", {
|
|
557
557
|
key: 0,
|
|
558
|
-
rowspan:
|
|
559
|
-
colspan:
|
|
558
|
+
rowspan: pe(e.row, t.col)?.rows,
|
|
559
|
+
colspan: pe(e.row, t.col)?.cols,
|
|
560
560
|
class: r(["pk-spreadsheet-preview__cell", {
|
|
561
561
|
"pk-spreadsheet-preview__cell--range": tt(e.row, t.col) && !nt(e.row, t.col),
|
|
562
|
-
"pk-spreadsheet-preview__cell--missing":
|
|
563
|
-
"pk-spreadsheet-preview__cell--marked":
|
|
562
|
+
"pk-spreadsheet-preview__cell--missing": B(e.row, t.col)?.missing,
|
|
563
|
+
"pk-spreadsheet-preview__cell--marked": P(e.row, t.col)
|
|
564
564
|
}]),
|
|
565
|
-
style: l(
|
|
565
|
+
style: l(ve(B(e.row, t.col), e.row, t.col)),
|
|
566
566
|
"data-focus": nt(e.row, t.col) ? "" : void 0,
|
|
567
567
|
"data-cell": `${e.row}:${t.col}`,
|
|
568
|
-
title:
|
|
568
|
+
title: B(e.row, t.col)?.missing ? D(f)("chatFilePreview.missingValue") : void 0,
|
|
569
569
|
onMousedown: g((n) => at(e.row, t.col, n), ["prevent"]),
|
|
570
570
|
onMouseenter: (n) => ot(e.row, t.col),
|
|
571
571
|
onDblclick: ut
|
|
572
|
-
}, S(
|
|
572
|
+
}, S(ge(B(e.row, t.col))), 47, je))], 64))), 128))], 4));
|
|
573
573
|
return o.memo = a, o;
|
|
574
574
|
}, n, 0), 128))])
|
|
575
575
|
], 6)) : T("", !0), E.value && (E.value.moreRows || E.value.moreColumns) ? (A(), k("p", q, [E.value.moreRows ? (A(), k(_, { key: 0 }, [O(S(D(f)("chatFilePreview.moreRows", E.value.moreRows)), 1)], 64)) : T("", !0), E.value.moreColumns ? (A(), k(_, { key: 1 }, [O(S(D(f)("chatFilePreview.moreColumns", E.value.moreColumns)), 1)], 64)) : T("", !0)])) : T("", !0)], 40, Ae),
|
|
@@ -631,7 +631,7 @@ var Xe = ["src"], Ze = {
|
|
|
631
631
|
numbers: { type: Object }
|
|
632
632
|
},
|
|
633
633
|
setup(e) {
|
|
634
|
-
let n = e, { t: i } = re({ useScope: "global" }), a = t(
|
|
634
|
+
let n = e, { t: i } = re({ useScope: "global" }), a = t(ce, void 0), o = (e) => e.picture ? P(a?.value, e.picture.ref) : void 0, s = (e) => n.page ? L(e) : "inline", c = (e) => {
|
|
635
635
|
let t = {
|
|
636
636
|
width: `${e.width}pt`,
|
|
637
637
|
aspectRatio: `${e.width} / ${e.height}`
|
|
@@ -659,11 +659,11 @@ var Xe = ["src"], Ze = {
|
|
|
659
659
|
zIndex: r.wrap === "behind" ? -1 : 1
|
|
660
660
|
};
|
|
661
661
|
}, u = (e) => e.field && n.numbers ? String(n.numbers[e.field]) : e.text, d = b(() => {
|
|
662
|
-
let e =
|
|
662
|
+
let e = oe(n.runs, n.mode ?? "markup"), t = (e) => !!e.picture && !!n.page && ["around", "block"].includes(L(e.picture));
|
|
663
663
|
return [...e.filter(t), ...e.filter((e) => !t(e))];
|
|
664
664
|
}), f = b(() => !n.mode || n.mode === "markup"), m = (e) => {
|
|
665
665
|
let t = {};
|
|
666
|
-
e.font && (t.fontFamily =
|
|
666
|
+
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");
|
|
667
667
|
let n = [e.underline ? "underline" : "", e.strike ? "line-through" : ""].filter(Boolean).join(" ");
|
|
668
668
|
return n && (t.textDecoration = n), e.caps && (t.textTransform = "uppercase"), e.vertAlign && (t.verticalAlign = e.vertAlign, t.fontSize = `${(e.size ?? 11) * .65}pt`), t;
|
|
669
669
|
}, h = (e) => {
|
|
@@ -809,11 +809,11 @@ var it = { class: "pk-word-preview__part" }, Z = ["src"], at = /* @__PURE__ */ E
|
|
|
809
809
|
numbers: { type: Object }
|
|
810
810
|
},
|
|
811
811
|
setup(e) {
|
|
812
|
-
let n = e, r = t(
|
|
813
|
-
let t =
|
|
812
|
+
let n = e, r = t(ce, void 0), i = b(() => I(n.blocks, n.mode)), a = b(() => F(n.blocks, n.mode).flatMap((e) => {
|
|
813
|
+
let t = P(r?.value, e.ref);
|
|
814
814
|
return t ? [{
|
|
815
815
|
src: t,
|
|
816
|
-
css:
|
|
816
|
+
css: N(e, n.section.page)
|
|
817
817
|
}] : [];
|
|
818
818
|
})), o = b(() => {
|
|
819
819
|
let { margins: e } = n.section.page;
|
|
@@ -880,7 +880,7 @@ var ot = ["aria-label"], st = {
|
|
|
880
880
|
}, Ct = { class: "pk-word-preview__count" }, wt = {
|
|
881
881
|
key: 1,
|
|
882
882
|
class: "pk-word-preview__legend"
|
|
883
|
-
}, Tt = ["title"], Et = { class: "pk-word-preview__removed" }, Dt = { class: "pk-word-preview__added" }, Ot = { class: "pk-word-preview__percent" }, kt = ["data-part"], At = 96 / 72, jt = .5, Mt = /*#__PURE__*/
|
|
883
|
+
}, Tt = ["title"], Et = { class: "pk-word-preview__removed" }, Dt = { class: "pk-word-preview__added" }, Ot = { class: "pk-word-preview__percent" }, kt = ["data-part"], At = 96 / 72, jt = .5, Mt = /*#__PURE__*/ V(/* @__PURE__ */ E({
|
|
884
884
|
__name: "PkWordPreview",
|
|
885
885
|
props: /*@__PURE__*/ c({
|
|
886
886
|
preview: { type: null },
|
|
@@ -898,23 +898,23 @@ var ot = ["aria-label"], st = {
|
|
|
898
898
|
emits: /*@__PURE__*/ c(["select"], ["update:fit", "update:zoom"]),
|
|
899
899
|
setup(e, { emit: t }) {
|
|
900
900
|
let c = e, f = t, { t: g } = re({ useScope: "global" });
|
|
901
|
-
n(
|
|
902
|
-
let ee = (e) =>
|
|
901
|
+
n(ce, b(() => c.preview.images));
|
|
902
|
+
let ee = (e) => oe(e, c.mode), x = b(() => I(c.preview.blocks, c.mode)), C = m("rootEl"), w = m("scrollEl"), te = m("measureEl"), { width: ne } = le(C), { width: E } = le(w), O = b(() => ne.value >= 1e3), j = b(() => c.preview.sections?.length ? c.preview.sections : [{
|
|
903
903
|
page: c.preview.page,
|
|
904
904
|
headerDistance: 0,
|
|
905
905
|
footerDistance: 0,
|
|
906
906
|
headers: {},
|
|
907
907
|
footers: {}
|
|
908
|
-
}]), M = b(() => j.value[0].page),
|
|
909
|
-
fontFamily:
|
|
908
|
+
}]), M = b(() => j.value[0].page), ie = b(() => (E.value - 48) / (M.value.width * At)), L = b(() => ne.value === 0 || E.value === 0 || ie.value >= jt), R = b(() => ({
|
|
909
|
+
fontFamily: ae(c.preview.defaults.font),
|
|
910
910
|
fontSize: `${c.preview.defaults.size}pt`,
|
|
911
911
|
color: c.preview.defaults.color ?? "#000000",
|
|
912
|
-
"--pk-word-line":
|
|
912
|
+
"--pk-word-line": se(c.preview.defaults.font),
|
|
913
913
|
"--pk-word-size": `${c.preview.defaults.size}pt`
|
|
914
|
-
})), ue = b(() => M.value.width - M.value.margins.left - M.value.margins.right),
|
|
914
|
+
})), ue = b(() => M.value.width - M.value.margins.left - M.value.margins.right), B = b(() => ({
|
|
915
915
|
...R.value,
|
|
916
916
|
width: `${ue.value}pt`
|
|
917
|
-
})),
|
|
917
|
+
})), pe = m("flowEl"), { width: V } = le(pe), me = b(() => {
|
|
918
918
|
let e = /* @__PURE__ */ new Map(), t = 0;
|
|
919
919
|
for (let n of c.preview.blocks) {
|
|
920
920
|
if (n.kind === "table") continue;
|
|
@@ -927,26 +927,26 @@ var ot = ["aria-label"], st = {
|
|
|
927
927
|
let n = 0;
|
|
928
928
|
for (let [r, i] of [...e].sort((e, t) => e[0] - t[0])) if (n += i, n > t / 10) return r;
|
|
929
929
|
return 0;
|
|
930
|
-
}),
|
|
930
|
+
}), he = b(() => ({
|
|
931
931
|
...R.value,
|
|
932
|
-
"--pk-word-indent-shared": `${
|
|
933
|
-
"--pk-word-indent-scale":
|
|
934
|
-
})),
|
|
932
|
+
"--pk-word-indent-shared": `${me.value}pt`,
|
|
933
|
+
"--pk-word-indent-scale": V.value ? Math.min(1, V.value / (ue.value * At)) : 1
|
|
934
|
+
})), H = y([]), ge = y({}), _e = async () => {
|
|
935
935
|
await i();
|
|
936
936
|
let e = te.value?.querySelectorAll("[data-item]");
|
|
937
|
-
|
|
937
|
+
H.value = [...e ?? []].map((e) => e.getBoundingClientRect().height);
|
|
938
938
|
let t = te.value?.querySelectorAll("[data-part]");
|
|
939
|
-
|
|
939
|
+
ge.value = Object.fromEntries([...t ?? []].map((e) => [e.dataset.part ?? "", e.getBoundingClientRect().height]));
|
|
940
940
|
};
|
|
941
941
|
u([
|
|
942
942
|
x,
|
|
943
943
|
L,
|
|
944
944
|
() => c.preview.parts
|
|
945
|
-
],
|
|
946
|
-
|
|
945
|
+
], _e, { flush: "post" }), s(() => {
|
|
946
|
+
_e(), document.fonts?.ready.then(_e);
|
|
947
947
|
});
|
|
948
|
-
let
|
|
949
|
-
if (!L.value ||
|
|
948
|
+
let U = b(() => {
|
|
949
|
+
if (!L.value || H.value.length !== x.value.length) return [{
|
|
950
950
|
items: x.value.map((e, t) => t),
|
|
951
951
|
section: 0,
|
|
952
952
|
number: 1,
|
|
@@ -957,7 +957,7 @@ var ot = ["aria-label"], st = {
|
|
|
957
957
|
let r = j.value[t];
|
|
958
958
|
return n && r.pageStart !== void 0 ? r.pageStart : (i ?? e[e.length - 1]?.number ?? 0) + 1;
|
|
959
959
|
}, o = (e) => {
|
|
960
|
-
let r = j.value[t], i = (t) => n && r.titlePage ? t.first : c.preview.evenAndOddHeaders && e % 2 == 0 ? t.even : t.default, a = i(r.headers), o = i(r.footers), s = (e) => e ? (
|
|
960
|
+
let r = j.value[t], i = (t) => n && r.titlePage ? t.first : c.preview.evenAndOddHeaders && e % 2 == 0 ? t.even : t.default, a = i(r.headers), o = i(r.footers), s = (e) => e ? (ge.value[e] ?? 0) / At : 0;
|
|
961
961
|
return {
|
|
962
962
|
header: a,
|
|
963
963
|
footer: o,
|
|
@@ -975,19 +975,19 @@ var ot = ["aria-label"], st = {
|
|
|
975
975
|
};
|
|
976
976
|
return x.value.forEach((c, l) => {
|
|
977
977
|
c.section !== void 0 && c.section !== t && j.value[c.section] && (t = c.section, n = c.breakBefore || !e.length, n || (i = j.value[t].pageStart));
|
|
978
|
-
let u = e[e.length - 1], d = u && j.value[u.section].page, f = d ? (d.height - u.top - u.bottom) * At : 0, p =
|
|
979
|
-
for (let e = l; x.value[e]?.keepNext && e + 1 < x.value.length && !x.value[e + 1].breakBefore; e++) p +=
|
|
980
|
-
(!u || u.items.length && (c.breakBefore || r +
|
|
978
|
+
let u = e[e.length - 1], d = u && j.value[u.section].page, f = d ? (d.height - u.top - u.bottom) * At : 0, p = H.value[l];
|
|
979
|
+
for (let e = l; x.value[e]?.keepNext && e + 1 < x.value.length && !x.value[e + 1].breakBefore; e++) p += H.value[e + 1];
|
|
980
|
+
(!u || u.items.length && (c.breakBefore || r + H.value[l] > f || r + p > f && p <= (() => {
|
|
981
981
|
let e = o(a());
|
|
982
982
|
return (j.value[t].page.height - e.top - e.bottom) * At;
|
|
983
|
-
})())) && s(), e[e.length - 1].items.push(l), r +=
|
|
983
|
+
})())) && s(), e[e.length - 1].items.push(l), r += H.value[l];
|
|
984
984
|
}), e.length || s(), e;
|
|
985
|
-
}),
|
|
985
|
+
}), ve = b(() => {
|
|
986
986
|
let e = /* @__PURE__ */ new Map();
|
|
987
|
-
for (let t of
|
|
988
|
-
return
|
|
987
|
+
for (let t of U.value) e.set(t.section, (e.get(t.section) ?? 0) + 1);
|
|
988
|
+
return U.value.map((t) => ({
|
|
989
989
|
page: t.number,
|
|
990
|
-
pages:
|
|
990
|
+
pages: U.value.length,
|
|
991
991
|
sectionPages: e.get(t.section) ?? 1
|
|
992
992
|
}));
|
|
993
993
|
}), W = (e) => {
|
|
@@ -1000,14 +1000,14 @@ var ot = ["aria-label"], st = {
|
|
|
1000
1000
|
};
|
|
1001
1001
|
}, ye = (e) => {
|
|
1002
1002
|
let t = [...new Set(e.items.map((e) => x.value[e].block))];
|
|
1003
|
-
return
|
|
1004
|
-
let n =
|
|
1003
|
+
return F(t.map((e) => c.preview.blocks[e]), c.mode).flatMap((t) => {
|
|
1004
|
+
let n = P(c.preview.images, t.ref);
|
|
1005
1005
|
return n ? [{
|
|
1006
1006
|
src: n,
|
|
1007
|
-
css:
|
|
1007
|
+
css: N(t, j.value[e.section].page)
|
|
1008
1008
|
}] : [];
|
|
1009
1009
|
});
|
|
1010
|
-
}, G = o(e, "fit"), be = o(e, "zoom"), K = b(() => G.value ? Math.min(1.25, Math.max(.3,
|
|
1010
|
+
}, G = o(e, "fit"), be = o(e, "zoom"), K = b(() => G.value ? Math.min(1.25, Math.max(.3, ie.value)) : be.value), xe = (e) => {
|
|
1011
1011
|
be.value = Math.min(2, Math.max(.3, Math.round((K.value + e) * 10) / 10)), G.value = !1;
|
|
1012
1012
|
}, Se = y(0), we = y(), Te = () => {
|
|
1013
1013
|
let e = w.value?.getBoundingClientRect();
|
|
@@ -1032,8 +1032,8 @@ var ot = ["aria-label"], st = {
|
|
|
1032
1032
|
Ee = 0, Te();
|
|
1033
1033
|
});
|
|
1034
1034
|
};
|
|
1035
|
-
a(() => cancelAnimationFrame(Ee)), u(
|
|
1036
|
-
let { selection: Oe } =
|
|
1035
|
+
a(() => cancelAnimationFrame(Ee)), u(U, () => i(De));
|
|
1036
|
+
let { selection: Oe } = z({
|
|
1037
1037
|
root: () => w.value?.getRootNode(),
|
|
1038
1038
|
touch: !0
|
|
1039
1039
|
});
|
|
@@ -1056,8 +1056,8 @@ var ot = ["aria-label"], st = {
|
|
|
1056
1056
|
added: je(i)
|
|
1057
1057
|
}] : [];
|
|
1058
1058
|
})), Me;
|
|
1059
|
-
u([() => c.marked,
|
|
1060
|
-
!e || e === Me || L.value &&
|
|
1059
|
+
u([() => c.marked, U], ([e]) => {
|
|
1060
|
+
!e || e === Me || L.value && H.value.length !== x.value.length || fe(w.value, ".pk-word-preview__marked") && (Me = e);
|
|
1061
1061
|
}, {
|
|
1062
1062
|
flush: "post",
|
|
1063
1063
|
immediate: !0
|
|
@@ -1113,13 +1113,13 @@ var ot = ["aria-label"], st = {
|
|
|
1113
1113
|
key: 0,
|
|
1114
1114
|
class: "pk-word-preview__pages",
|
|
1115
1115
|
style: l({ zoom: K.value })
|
|
1116
|
-
}, [(A(!0), k(_, null, p(
|
|
1116
|
+
}, [(A(!0), k(_, null, p(U.value, (t, n) => (A(), k("article", {
|
|
1117
1117
|
key: n,
|
|
1118
1118
|
"data-page": "",
|
|
1119
1119
|
class: "pk-word-preview__page",
|
|
1120
1120
|
"aria-label": D(g)("chatFilePreview.pageOf", {
|
|
1121
1121
|
page: n + 1,
|
|
1122
|
-
count:
|
|
1122
|
+
count: U.value.length
|
|
1123
1123
|
}),
|
|
1124
1124
|
style: l(W(t))
|
|
1125
1125
|
}, [
|
|
@@ -1129,7 +1129,7 @@ var ot = ["aria-label"], st = {
|
|
|
1129
1129
|
where: "header",
|
|
1130
1130
|
section: j.value[t.section],
|
|
1131
1131
|
mode: e.mode,
|
|
1132
|
-
numbers:
|
|
1132
|
+
numbers: ve.value[n]
|
|
1133
1133
|
}, null, 8, [
|
|
1134
1134
|
"blocks",
|
|
1135
1135
|
"section",
|
|
@@ -1143,7 +1143,7 @@ var ot = ["aria-label"], st = {
|
|
|
1143
1143
|
row: x.value[r].row,
|
|
1144
1144
|
mode: e.mode,
|
|
1145
1145
|
page: j.value[t.section].page,
|
|
1146
|
-
numbers:
|
|
1146
|
+
numbers: ve.value[n],
|
|
1147
1147
|
marked: e.marked
|
|
1148
1148
|
}, null, 8, [
|
|
1149
1149
|
"data-key",
|
|
@@ -1167,7 +1167,7 @@ var ot = ["aria-label"], st = {
|
|
|
1167
1167
|
where: "footer",
|
|
1168
1168
|
section: j.value[t.section],
|
|
1169
1169
|
mode: e.mode,
|
|
1170
|
-
numbers:
|
|
1170
|
+
numbers: ve.value[n]
|
|
1171
1171
|
}, null, 8, [
|
|
1172
1172
|
"blocks",
|
|
1173
1173
|
"section",
|
|
@@ -1177,9 +1177,9 @@ var ot = ["aria-label"], st = {
|
|
|
1177
1177
|
], 12, yt))), 128))], 4)) : (A(), k("article", {
|
|
1178
1178
|
key: 1,
|
|
1179
1179
|
ref_key: "flowEl",
|
|
1180
|
-
ref:
|
|
1180
|
+
ref: pe,
|
|
1181
1181
|
class: "pk-word-preview__page pk-word-preview__page--flow",
|
|
1182
|
-
style: l(
|
|
1182
|
+
style: l(he.value)
|
|
1183
1183
|
}, [(A(!0), k(_, null, p(x.value, (t) => (A(), h(rt, {
|
|
1184
1184
|
key: t.key,
|
|
1185
1185
|
"data-key": t.key,
|
|
@@ -1196,7 +1196,7 @@ var ot = ["aria-label"], st = {
|
|
|
1196
1196
|
]))), 128))], 4)), e.preview.truncated ? (A(), k("p", bt, S(D(g)("chatFilePreview.truncated")), 1)) : T("", !0)], 544), v("div", xt, [
|
|
1197
1197
|
L.value ? (A(), k("span", St, S(D(g)("chatFilePreview.pageOf", {
|
|
1198
1198
|
page: Se.value + 1,
|
|
1199
|
-
count:
|
|
1199
|
+
count: U.value.length
|
|
1200
1200
|
})), 1)) : T("", !0),
|
|
1201
1201
|
v("span", Ct, S(D(g)("chatFilePreview.words", Ie.value)), 1),
|
|
1202
1202
|
e.mode === "markup" && e.preview.revisionAuthors.length ? (A(), k("span", wt, [
|
|
@@ -1263,7 +1263,7 @@ var ot = ["aria-label"], st = {
|
|
|
1263
1263
|
ref: te,
|
|
1264
1264
|
class: "pk-word-preview__measure",
|
|
1265
1265
|
"aria-hidden": "true",
|
|
1266
|
-
style: l(
|
|
1266
|
+
style: l(B.value)
|
|
1267
1267
|
}, [(A(!0), k(_, null, p(x.value, (t) => (A(), k("div", {
|
|
1268
1268
|
key: t.key,
|
|
1269
1269
|
"data-item": ""
|
|
@@ -1280,7 +1280,7 @@ var ot = ["aria-label"], st = {
|
|
|
1280
1280
|
])]))), 128)), (A(!0), k(_, null, p(e.preview.parts, (t, n) => (A(), k("div", {
|
|
1281
1281
|
key: n,
|
|
1282
1282
|
"data-part": n
|
|
1283
|
-
}, [(A(!0), k(_, null, p(D(
|
|
1283
|
+
}, [(A(!0), k(_, null, p(D(I)(t, e.mode), (n) => (A(), h(rt, {
|
|
1284
1284
|
key: n.key,
|
|
1285
1285
|
block: t[n.block],
|
|
1286
1286
|
row: n.row,
|
|
@@ -1301,16 +1301,23 @@ x(), f(), C();
|
|
|
1301
1301
|
var Nt = ["aria-label"], Pt = { class: "pk-file-preview__head" }, Ft = { class: "pk-file-preview__file" }, It = {
|
|
1302
1302
|
class: "pk-file-preview__tile",
|
|
1303
1303
|
"aria-hidden": "true"
|
|
1304
|
-
}, Lt = { class: "pk-file-preview__name" }, Rt = { class: "pk-file-preview__title" }, zt = {
|
|
1304
|
+
}, Lt = { class: "pk-file-preview__name" }, Rt = { class: "pk-file-preview__title" }, zt = {
|
|
1305
|
+
class: "pk-file-preview__note",
|
|
1306
|
+
role: "status"
|
|
1307
|
+
}, Bt = {
|
|
1305
1308
|
key: 0,
|
|
1309
|
+
class: "pk-file-preview__progress",
|
|
1310
|
+
"aria-hidden": "true"
|
|
1311
|
+
}, Vt = {
|
|
1312
|
+
key: 1,
|
|
1306
1313
|
class: "pk-file-preview__tools"
|
|
1307
|
-
},
|
|
1314
|
+
}, Ht = ["aria-label"], Ut = { class: "pk-file-preview__version" }, Wt = { class: "pk-file-preview__mode-long" }, Gt = { class: "pk-file-preview__mode-short" }, Kt = { class: "pk-file-preview__actions" }, qt = { class: "pk-file-preview__body" }, Jt = {
|
|
1308
1315
|
key: 0,
|
|
1309
1316
|
class: "pk-file-preview__skeleton vv-skeleton"
|
|
1310
|
-
},
|
|
1317
|
+
}, Yt = {
|
|
1311
1318
|
key: 1,
|
|
1312
1319
|
class: "pk-file-preview__empty"
|
|
1313
|
-
},
|
|
1320
|
+
}, Xt = /*@__PURE__*/ E({
|
|
1314
1321
|
__name: "PkFilePreview",
|
|
1315
1322
|
props: /*@__PURE__*/ c({
|
|
1316
1323
|
kind: { type: String },
|
|
@@ -1326,7 +1333,8 @@ var Nt = ["aria-label"], Pt = { class: "pk-file-preview__head" }, Ft = { class:
|
|
|
1326
1333
|
resize: { type: String },
|
|
1327
1334
|
fileId: { type: String },
|
|
1328
1335
|
storedFileName: { type: String },
|
|
1329
|
-
selectionActions: { type: null }
|
|
1336
|
+
selectionActions: { type: null },
|
|
1337
|
+
working: { type: Boolean }
|
|
1330
1338
|
}, {
|
|
1331
1339
|
mode: { default: "markup" },
|
|
1332
1340
|
modeModifiers: {},
|
|
@@ -1345,6 +1353,7 @@ var Nt = ["aria-label"], Pt = { class: "pk-file-preview__head" }, Ft = { class:
|
|
|
1345
1353
|
"version",
|
|
1346
1354
|
"restore",
|
|
1347
1355
|
"resize",
|
|
1356
|
+
"showChat",
|
|
1348
1357
|
"selectionSend"
|
|
1349
1358
|
], [
|
|
1350
1359
|
"update:mode",
|
|
@@ -1353,7 +1362,13 @@ var Nt = ["aria-label"], Pt = { class: "pk-file-preview__head" }, Ft = { class:
|
|
|
1353
1362
|
"update:fit"
|
|
1354
1363
|
]),
|
|
1355
1364
|
setup(e, { emit: t }) {
|
|
1356
|
-
let n = e, a = t, { t: s, locale: c } = re({ useScope: "global" }), l =
|
|
1365
|
+
let n = e, a = t, { t: s, locale: c } = re({ useScope: "global" }), l = y(!1), f;
|
|
1366
|
+
u(() => n.working, (e, t) => {
|
|
1367
|
+
e ? (f = t === void 0 ? void 0 : n.version, l.value = !1) : f !== void 0 && (l.value = n.version === f, f = void 0);
|
|
1368
|
+
}, { immediate: !0 }), u(() => [n.version, n.fileId], () => {
|
|
1369
|
+
n.working || (l.value = !1);
|
|
1370
|
+
});
|
|
1371
|
+
let g = b(() => n.versions ?? []), ee = b(() => n.version ? g.value.indexOf(n.version) : -1), x = b(() => ee.value > 0 ? g.value[ee.value - 1] : void 0), C = b(() => ee.value >= 0 && ee.value < g.value.length - 1 ? g.value[ee.value + 1] : void 0), w = o(e, "mode"), E = o(e, "sheet"), j = o(e, "zoom"), M = o(e, "fit"), ie = b(() => [
|
|
1357
1372
|
{
|
|
1358
1373
|
value: "markup",
|
|
1359
1374
|
label: s("chatFilePreview.modeMarkup")
|
|
@@ -1366,47 +1381,48 @@ var Nt = ["aria-label"], Pt = { class: "pk-file-preview__head" }, Ft = { class:
|
|
|
1366
1381
|
value: "original",
|
|
1367
1382
|
label: s("chatFilePreview.modeOriginal")
|
|
1368
1383
|
}
|
|
1369
|
-
]),
|
|
1384
|
+
]), N = b(() => n.preview?.kind === "word" && n.preview.revisionAuthors.length > 0);
|
|
1370
1385
|
u(() => n.version, () => {
|
|
1371
|
-
|
|
1386
|
+
w.value = "markup";
|
|
1372
1387
|
});
|
|
1373
|
-
let
|
|
1374
|
-
|
|
1388
|
+
let ae = m("rootEl"), P = ne(), F = y(!1), oe = () => {
|
|
1389
|
+
P.value = void 0, F.value = !1;
|
|
1375
1390
|
};
|
|
1376
1391
|
u(() => [
|
|
1377
1392
|
n.version,
|
|
1378
1393
|
n.preview,
|
|
1379
|
-
|
|
1380
|
-
|
|
1381
|
-
],
|
|
1382
|
-
let
|
|
1383
|
-
|
|
1384
|
-
},
|
|
1385
|
-
u(
|
|
1386
|
-
let n =
|
|
1394
|
+
w.value,
|
|
1395
|
+
E.value
|
|
1396
|
+
], oe);
|
|
1397
|
+
let I = (e) => {
|
|
1398
|
+
F.value || (P.value = e);
|
|
1399
|
+
}, se = b(() => P.value?.format === "docx" && B());
|
|
1400
|
+
u(F, async (e, t) => {
|
|
1401
|
+
let n = P.value;
|
|
1387
1402
|
t && !e && n?.format === "docx" && (await i(), n.restore());
|
|
1388
1403
|
});
|
|
1389
|
-
let
|
|
1390
|
-
let e =
|
|
1404
|
+
let ce = b(() => !n.version || n.version === g.value[g.value.length - 1]), L = () => {
|
|
1405
|
+
let e = g.value[g.value.length - 1];
|
|
1391
1406
|
e && a("version", e);
|
|
1392
|
-
},
|
|
1393
|
-
let e =
|
|
1394
|
-
return e?.format === "docx" ? e.paragraphCount > 200 : (e?.cells ?? 0) >
|
|
1395
|
-
}),
|
|
1396
|
-
let e =
|
|
1407
|
+
}, le = b(() => {
|
|
1408
|
+
let e = P.value;
|
|
1409
|
+
return e?.format === "docx" ? e.paragraphCount > 200 : (e?.cells ?? 0) > he;
|
|
1410
|
+
}), z = b(() => P.value?.format === "docx" && w.value === "original"), fe = b(() => le.value || z.value), V = b(() => z.value ? s("selectionActions.hintOriginal") : le.value ? s(P.value?.format === "docx" ? "selectionActions.hintParagraphs" : "selectionActions.hintCells", { count: P.value?.format === "docx" ? 200 : he }) : void 0), H = (e) => e[c.value] ?? e[c.value.split("-")[0]] ?? Object.values(e)[0] ?? "", ge = ["explain", "summarize"], _e = b(() => {
|
|
1411
|
+
let e = P.value, t = n.selectionActions;
|
|
1397
1412
|
if (!e || !t) return [];
|
|
1398
1413
|
let r = e.format;
|
|
1399
|
-
return [...(r === "docx" &&
|
|
1414
|
+
return [...(r === "docx" && fe.value ? ge : t.builtIns).map((e) => ({
|
|
1400
1415
|
id: e,
|
|
1401
1416
|
label: s(`selectionActions.builtIn.${e}`),
|
|
1402
1417
|
...e === "translate" && { asks: s("selectionActions.translateAsks") },
|
|
1403
1418
|
prompt: (t) => s(`selectionActions.prompt.${r}.${e}`, { language: t ?? "" })
|
|
1404
|
-
})), ...(
|
|
1419
|
+
})), ...(fe.value ? [] : t.actions).map((e) => ({
|
|
1405
1420
|
id: e.id,
|
|
1406
|
-
label:
|
|
1407
|
-
|
|
1421
|
+
label: H(e.label),
|
|
1422
|
+
icon: e.icon,
|
|
1423
|
+
prompt: () => H(e.prompt)
|
|
1408
1424
|
}))];
|
|
1409
|
-
}),
|
|
1425
|
+
}), U = (e) => {
|
|
1410
1426
|
if (e.format === "docx") return s("selectionActions.labelParagraphs", {
|
|
1411
1427
|
file: n.filename,
|
|
1412
1428
|
count: e.paragraphCount
|
|
@@ -1422,20 +1438,20 @@ var Nt = ["aria-label"], Pt = { class: "pk-file-preview__head" }, Ft = { class:
|
|
|
1422
1438
|
sheet: e.sheet,
|
|
1423
1439
|
cell: t
|
|
1424
1440
|
});
|
|
1425
|
-
},
|
|
1441
|
+
}, ve = (e) => {
|
|
1426
1442
|
if (!n.fileId || !n.storedFileName) return;
|
|
1427
1443
|
let t = {
|
|
1428
1444
|
fileId: n.fileId,
|
|
1429
1445
|
version: n.version ?? 1,
|
|
1430
1446
|
storedFileName: n.storedFileName,
|
|
1431
|
-
label:
|
|
1447
|
+
label: U(e).slice(0, 200)
|
|
1432
1448
|
};
|
|
1433
1449
|
if (e.format === "docx") {
|
|
1434
1450
|
let { measure: n, ...r } = e;
|
|
1435
1451
|
return {
|
|
1436
1452
|
...t,
|
|
1437
1453
|
...r,
|
|
1438
|
-
...
|
|
1454
|
+
...z.value && { original: !0 }
|
|
1439
1455
|
};
|
|
1440
1456
|
}
|
|
1441
1457
|
let { measure: r, cells: i, ...a } = e;
|
|
@@ -1443,23 +1459,23 @@ var Nt = ["aria-label"], Pt = { class: "pk-file-preview__head" }, Ft = { class:
|
|
|
1443
1459
|
...t,
|
|
1444
1460
|
...a
|
|
1445
1461
|
};
|
|
1446
|
-
},
|
|
1447
|
-
let n =
|
|
1462
|
+
}, W = (e, t) => {
|
|
1463
|
+
let n = P.value, r = n && ve(n);
|
|
1448
1464
|
r && (a("selectionSend", e, r, {
|
|
1449
1465
|
id: t,
|
|
1450
1466
|
size: n.format === "docx" ? n.paragraphCount : n.cells
|
|
1451
|
-
}),
|
|
1452
|
-
},
|
|
1453
|
-
let n =
|
|
1454
|
-
n &&
|
|
1455
|
-
},
|
|
1456
|
-
R(
|
|
1467
|
+
}), oe(), document.getSelection()?.removeAllRanges());
|
|
1468
|
+
}, ye = (e, t) => {
|
|
1469
|
+
let n = _e.value.find((t) => t.id === e);
|
|
1470
|
+
n && W(n.prompt(t), e);
|
|
1471
|
+
}, G = y(0);
|
|
1472
|
+
R(ae, "scroll", () => G.value++, {
|
|
1457
1473
|
capture: !0,
|
|
1458
1474
|
passive: !0
|
|
1459
|
-
}), R(window, "resize", () =>
|
|
1460
|
-
let
|
|
1461
|
-
|
|
1462
|
-
let e =
|
|
1475
|
+
}), R(window, "resize", () => G.value++, { passive: !0 });
|
|
1476
|
+
let be = b(() => {
|
|
1477
|
+
G.value;
|
|
1478
|
+
let e = P.value?.measure(), t = ae.value?.getBoundingClientRect();
|
|
1463
1479
|
if (e && t) return {
|
|
1464
1480
|
start: {
|
|
1465
1481
|
top: e.start.top - t.top,
|
|
@@ -1478,7 +1494,7 @@ var Nt = ["aria-label"], Pt = { class: "pk-file-preview__head" }, Ft = { class:
|
|
|
1478
1494
|
let i = ue, o = de;
|
|
1479
1495
|
return A(), k("section", {
|
|
1480
1496
|
ref_key: "rootEl",
|
|
1481
|
-
ref:
|
|
1497
|
+
ref: ae,
|
|
1482
1498
|
class: "pk-file-preview",
|
|
1483
1499
|
"aria-label": e.filename,
|
|
1484
1500
|
tabindex: "-1",
|
|
@@ -1488,8 +1504,17 @@ var Nt = ["aria-label"], Pt = { class: "pk-file-preview__head" }, Ft = { class:
|
|
|
1488
1504
|
v("div", Ft, [v("span", It, [d(i, {
|
|
1489
1505
|
name: e.kind === "word" ? "ri:file-word-2-line" : "ri:file-excel-2-line",
|
|
1490
1506
|
class: r(e.kind === "word" ? "pk-file-preview__icon--word" : "pk-file-preview__icon--sheet")
|
|
1491
|
-
}, null, 8, ["name", "class"])]), v("div", Lt, [v("strong", Rt, S(e.filename), 1), v("span", zt,
|
|
1492
|
-
|
|
1507
|
+
}, null, 8, ["name", "class"])]), v("div", Lt, [v("strong", Rt, S(e.filename), 1), v("span", zt, [e.working ? (A(), k(_, { key: 0 }, [n[14] ||= v("span", {
|
|
1508
|
+
class: "pk-file-preview__spinner",
|
|
1509
|
+
"aria-hidden": "true"
|
|
1510
|
+
}, null, -1), O(" " + S(D(s)("chatFilePreview.working")), 1)], 64)) : l.value ? (A(), k(_, { key: 1 }, [O(S(D(s)("chatFilePreview.answeredInChat")) + " ", 1), d(o, {
|
|
1511
|
+
modifiers: "link",
|
|
1512
|
+
class: "pk-file-preview__show-chat",
|
|
1513
|
+
label: D(s)("chatFilePreview.showChat"),
|
|
1514
|
+
onClick: n[0] ||= (e) => a("showChat")
|
|
1515
|
+
}, null, 8, ["label"])], 64)) : (A(), k(_, { key: 2 }, [O(S(D(s)("chatFilePreview.readOnly")), 1)], 64))])])]),
|
|
1516
|
+
e.working ? (A(), k("div", Bt)) : T("", !0),
|
|
1517
|
+
e.version && g.value.length > 1 || N.value ? (A(), k("div", Vt, [e.version && g.value.length > 1 ? (A(), k("nav", {
|
|
1493
1518
|
key: 0,
|
|
1494
1519
|
class: "pk-file-preview__versions",
|
|
1495
1520
|
"aria-label": D(s)("chatFilePreview.versions")
|
|
@@ -1498,44 +1523,44 @@ var Nt = ["aria-label"], Pt = { class: "pk-file-preview__head" }, Ft = { class:
|
|
|
1498
1523
|
modifiers: "action-quiet",
|
|
1499
1524
|
icon: "ri:arrow-left-s-line",
|
|
1500
1525
|
"aria-label": D(s)("chatFilePreview.previousVersion"),
|
|
1501
|
-
disabled: !
|
|
1502
|
-
onClick: n[
|
|
1526
|
+
disabled: !x.value,
|
|
1527
|
+
onClick: n[1] ||= (e) => x.value && a("version", x.value)
|
|
1503
1528
|
}, null, 8, ["aria-label", "disabled"]),
|
|
1504
|
-
v("span",
|
|
1529
|
+
v("span", Ut, S(D(s)("chatFilePreview.versionOf", {
|
|
1505
1530
|
version: e.version,
|
|
1506
|
-
count:
|
|
1531
|
+
count: g.value.length
|
|
1507
1532
|
})), 1),
|
|
1508
1533
|
d(o, {
|
|
1509
1534
|
modifiers: "action-quiet",
|
|
1510
1535
|
icon: "ri:arrow-right-s-line",
|
|
1511
1536
|
"aria-label": D(s)("chatFilePreview.nextVersion"),
|
|
1512
|
-
disabled: !
|
|
1513
|
-
onClick: n[
|
|
1537
|
+
disabled: !C.value,
|
|
1538
|
+
onClick: n[2] ||= (e) => C.value && a("version", C.value)
|
|
1514
1539
|
}, null, 8, ["aria-label", "disabled"])
|
|
1515
|
-
], 8,
|
|
1540
|
+
], 8, Ht)) : T("", !0), N.value ? (A(), h(me, {
|
|
1516
1541
|
key: 1,
|
|
1517
|
-
modelValue:
|
|
1518
|
-
"onUpdate:modelValue": n[
|
|
1542
|
+
modelValue: w.value,
|
|
1543
|
+
"onUpdate:modelValue": n[3] ||= (e) => w.value = e,
|
|
1519
1544
|
name: "revisions",
|
|
1520
1545
|
segmented: "",
|
|
1521
1546
|
class: "pk-file-preview__modes u-segmented-fit mb-0",
|
|
1522
1547
|
"aria-label": D(s)("chatFilePreview.modes"),
|
|
1523
|
-
options:
|
|
1548
|
+
options: ie.value
|
|
1524
1549
|
}, {
|
|
1525
|
-
markup: te(() => [v("span",
|
|
1550
|
+
markup: te(() => [v("span", Wt, S(D(s)("chatFilePreview.modeMarkup")), 1), v("span", Gt, S(D(s)("chatFilePreview.modeMarkupShort")), 1)]),
|
|
1526
1551
|
_: 1
|
|
1527
1552
|
}, 8, [
|
|
1528
1553
|
"modelValue",
|
|
1529
1554
|
"aria-label",
|
|
1530
1555
|
"options"
|
|
1531
1556
|
])) : T("", !0)])) : T("", !0),
|
|
1532
|
-
v("div",
|
|
1557
|
+
v("div", Kt, [
|
|
1533
1558
|
e.restorable ? (A(), h(o, {
|
|
1534
1559
|
key: 0,
|
|
1535
1560
|
modifiers: "action-quiet",
|
|
1536
1561
|
icon: "ri:arrow-go-back-line",
|
|
1537
1562
|
label: D(s)("chatFilePreview.restore"),
|
|
1538
|
-
onClick: n[
|
|
1563
|
+
onClick: n[4] ||= (e) => a("restore")
|
|
1539
1564
|
}, null, 8, ["label"])) : T("", !0),
|
|
1540
1565
|
d(o, {
|
|
1541
1566
|
href: e.downloadUrl,
|
|
@@ -1555,37 +1580,37 @@ var Nt = ["aria-label"], Pt = { class: "pk-file-preview__head" }, Ft = { class:
|
|
|
1555
1580
|
icon: "ri:fullscreen-line",
|
|
1556
1581
|
title: D(s)("chatFilePreview.expand"),
|
|
1557
1582
|
"aria-label": D(s)("chatFilePreview.expand"),
|
|
1558
|
-
onClick: n[
|
|
1583
|
+
onClick: n[5] ||= (e) => a("resize")
|
|
1559
1584
|
}, null, 8, ["title", "aria-label"])) : e.resize === "shrink" ? (A(), h(o, {
|
|
1560
1585
|
key: 2,
|
|
1561
1586
|
modifiers: "action-quiet",
|
|
1562
1587
|
icon: "ri:fullscreen-exit-line",
|
|
1563
1588
|
title: D(s)("chatFilePreview.shrink"),
|
|
1564
1589
|
"aria-label": D(s)("chatFilePreview.shrink"),
|
|
1565
|
-
onClick: n[
|
|
1590
|
+
onClick: n[6] ||= (e) => a("resize")
|
|
1566
1591
|
}, null, 8, ["title", "aria-label"])) : T("", !0),
|
|
1567
1592
|
d(o, {
|
|
1568
1593
|
modifiers: "action-quiet",
|
|
1569
1594
|
icon: "ri:close-line",
|
|
1570
1595
|
title: D(s)("chatFilePreview.close"),
|
|
1571
1596
|
"aria-label": D(s)("chatFilePreview.close"),
|
|
1572
|
-
onClick: n[
|
|
1597
|
+
onClick: n[7] ||= (e) => a("close")
|
|
1573
1598
|
}, null, 8, ["title", "aria-label"])
|
|
1574
1599
|
])
|
|
1575
1600
|
]),
|
|
1576
|
-
v("div",
|
|
1601
|
+
v("div", qt, [e.loading ? (A(), k("div", Jt, [(A(), k(_, null, p(8, (e) => v("div", {
|
|
1577
1602
|
key: e,
|
|
1578
1603
|
class: r(["vv-skeleton__item pk-file-preview__skeleton-line", e % 3 ? "w-full" : "w-128"])
|
|
1579
|
-
}, null, 2)), 64))])) : e.error || !e.preview ? (A(), k("p",
|
|
1604
|
+
}, null, 2)), 64))])) : e.error || !e.preview ? (A(), k("p", Yt, S(D(s)("chatFilePreview.unavailable")), 1)) : e.preview.kind === "word" ? (A(), h(Mt, {
|
|
1580
1605
|
key: 2,
|
|
1581
|
-
zoom:
|
|
1582
|
-
"onUpdate:zoom": n[
|
|
1583
|
-
fit:
|
|
1584
|
-
"onUpdate:fit": n[
|
|
1606
|
+
zoom: j.value,
|
|
1607
|
+
"onUpdate:zoom": n[8] ||= (e) => j.value = e,
|
|
1608
|
+
fit: M.value,
|
|
1609
|
+
"onUpdate:fit": n[9] ||= (e) => M.value = e,
|
|
1585
1610
|
preview: e.preview,
|
|
1586
|
-
mode:
|
|
1611
|
+
mode: N.value ? w.value : "markup",
|
|
1587
1612
|
marked: e.changes?.kind === "word" ? e.changes.paragraphs : void 0,
|
|
1588
|
-
onSelect:
|
|
1613
|
+
onSelect: I
|
|
1589
1614
|
}, null, 8, [
|
|
1590
1615
|
"zoom",
|
|
1591
1616
|
"fit",
|
|
@@ -1594,34 +1619,34 @@ var Nt = ["aria-label"], Pt = { class: "pk-file-preview__head" }, Ft = { class:
|
|
|
1594
1619
|
"marked"
|
|
1595
1620
|
])) : (A(), h(Ye, {
|
|
1596
1621
|
key: 3,
|
|
1597
|
-
sheet:
|
|
1598
|
-
"onUpdate:sheet": n[
|
|
1599
|
-
zoom:
|
|
1600
|
-
"onUpdate:zoom": n[
|
|
1622
|
+
sheet: E.value,
|
|
1623
|
+
"onUpdate:sheet": n[10] ||= (e) => E.value = e,
|
|
1624
|
+
zoom: j.value,
|
|
1625
|
+
"onUpdate:zoom": n[11] ||= (e) => j.value = e,
|
|
1601
1626
|
preview: e.preview,
|
|
1602
1627
|
marked: e.changes?.kind === "spreadsheet" ? e.changes.cells : void 0,
|
|
1603
|
-
onSelect:
|
|
1628
|
+
onSelect: I
|
|
1604
1629
|
}, null, 8, [
|
|
1605
1630
|
"sheet",
|
|
1606
1631
|
"zoom",
|
|
1607
1632
|
"preview",
|
|
1608
1633
|
"marked"
|
|
1609
1634
|
]))]),
|
|
1610
|
-
e.selectionActions &&
|
|
1635
|
+
e.selectionActions && P.value && be.value ? (A(), h(pe, {
|
|
1611
1636
|
key: 0,
|
|
1612
|
-
asking:
|
|
1613
|
-
"onUpdate:asking": n[
|
|
1637
|
+
asking: F.value,
|
|
1638
|
+
"onUpdate:asking": n[12] ||= (e) => F.value = e,
|
|
1614
1639
|
strategy: "absolute",
|
|
1615
|
-
anchor:
|
|
1616
|
-
actions:
|
|
1617
|
-
hint:
|
|
1618
|
-
touch:
|
|
1619
|
-
note:
|
|
1640
|
+
anchor: be.value,
|
|
1641
|
+
actions: _e.value,
|
|
1642
|
+
hint: V.value,
|
|
1643
|
+
touch: se.value,
|
|
1644
|
+
note: ce.value ? void 0 : D(s)("selectionActions.notLatest", { version: e.version }),
|
|
1620
1645
|
"note-action": D(s)("selectionActions.openLatest"),
|
|
1621
|
-
onAction:
|
|
1622
|
-
onAsk: n[
|
|
1623
|
-
onNote:
|
|
1624
|
-
onClose:
|
|
1646
|
+
onAction: ye,
|
|
1647
|
+
onAsk: n[13] ||= (e) => W(e, "ask"),
|
|
1648
|
+
onNote: L,
|
|
1649
|
+
onClose: oe
|
|
1625
1650
|
}, null, 8, [
|
|
1626
1651
|
"asking",
|
|
1627
1652
|
"anchor",
|
|
@@ -1634,7 +1659,7 @@ var Nt = ["aria-label"], Pt = { class: "pk-file-preview__head" }, Ft = { class:
|
|
|
1634
1659
|
], 8, Nt);
|
|
1635
1660
|
};
|
|
1636
1661
|
}
|
|
1637
|
-
}),
|
|
1638
|
-
export {
|
|
1662
|
+
}), Zt = ".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}", Qt = /* @__PURE__ */ e({ default: () => $t }), $t = /*#__PURE__*/ V(Xt, [["styles", [Zt]]]);
|
|
1663
|
+
export { Qt as n, $t as t };
|
|
1639
1664
|
|
|
1640
|
-
//# sourceMappingURL=PkFilePreview-
|
|
1665
|
+
//# sourceMappingURL=PkFilePreview-DC4iX7Yc.js.map
|