@work-zhanguo/light-file-preview 0.0.16 → 0.0.17
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +18 -10
- package/dist/PptxRenderer-B4sDptn0.js +14773 -0
- package/dist/{UnsupportedRenderer-pjXuzLhC.js → UnsupportedRenderer-B016ePP5.js} +1 -1
- package/dist/{index-AN7FkZtw.js → index-DX4yvG8n.js} +126 -119
- package/dist/light-file-preview.js +1 -1
- package/dist/light-file-preview.umd.cjs +196 -158
- package/dist/standalone/light-file-preview.iife.js +208 -169
- package/dist/standalone/style.css +1 -1
- package/dist/style.css +1 -1
- package/dist/types/components/FilePreview.vue.d.ts +3 -3
- package/dist/types/components/renderers/PptxRenderer.vue.d.ts +13 -0
- package/dist/types/constants/file.d.ts +1 -0
- package/dist/types/types.d.ts +1 -1
- package/dist/vue2/{DocxRenderer-DR_4KeGA.js → DocxRenderer-BYzWAtSx.js} +1 -1
- package/dist/vue2/{PdfRenderer-DNDmJ3M6.js → PdfRenderer-2f-SRj0_.js} +1 -1
- package/dist/vue2/PptxRenderer-B1TlLH2y.js +14773 -0
- package/dist/vue2/{SheetRenderer-XW8dLaab.js → SheetRenderer-DF9A6Tqq.js} +1 -1
- package/dist/vue2/{TextRenderer-CQsD7GMD.js → TextRenderer-Be7RzYjF.js} +1 -1
- package/dist/vue2/{UnsupportedRenderer-fr1iHYbj.js → UnsupportedRenderer-CIeHYr5T.js} +1 -1
- package/dist/vue2/light-file-preview-vue2.js +1 -1
- package/dist/vue2/light-file-preview-vue2.umd.cjs +217 -178
- package/dist/vue2/style.css +1 -0
- package/dist/vue2/{vue2-C42eMKpL.js → vue2-DryhXOWQ.js} +2296 -2251
- package/package.json +3 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { defineComponent as o, openBlock as l, createElementBlock as a, createElementVNode as t, toDisplayString as i, unref as r } from "vue";
|
|
2
|
-
import { d as s } from "./index-
|
|
2
|
+
import { d as s } from "./index-DX4yvG8n.js";
|
|
3
3
|
const d = { class: "lfp-empty" }, p = { class: "lfp-hint" }, c = /* @__PURE__ */ o({
|
|
4
4
|
__name: "UnsupportedRenderer",
|
|
5
5
|
props: {
|
|
@@ -1,22 +1,23 @@
|
|
|
1
|
-
import { defineComponent as z, defineAsyncComponent as R, ref as
|
|
2
|
-
const
|
|
1
|
+
import { defineComponent as z, defineAsyncComponent as R, ref as T, computed as f, watch as U, onBeforeUnmount as W, openBlock as l, createBlock as w, Teleport as G, createElementBlock as v, normalizeClass as J, createCommentVNode as P, createElementVNode as s, toDisplayString as D, createVNode as Q, Transition as Y, withCtx as ee, Fragment as te, unref as E, reactive as O, createApp as V, h as Z } from "vue";
|
|
2
|
+
const g = {
|
|
3
3
|
image: ["png", "jpg", "jpeg", "gif", "webp", "bmp", "svg"],
|
|
4
4
|
pdf: ["pdf"],
|
|
5
5
|
text: ["txt", "json", "js", "ts", "jsx", "tsx", "html", "css", "md", "csv"],
|
|
6
6
|
docx: ["docx"],
|
|
7
|
+
pptx: ["pptx"],
|
|
7
8
|
sheet: ["xls", "xlsx", "csv"],
|
|
8
9
|
video: ["mp4", "webm"],
|
|
9
10
|
audio: ["mp3", "wav"]
|
|
10
|
-
},
|
|
11
|
-
function
|
|
11
|
+
}, oe = ["doc", "ppt"];
|
|
12
|
+
function I(e = "") {
|
|
12
13
|
const n = e.split("#")[0].split("?")[0].split(".");
|
|
13
14
|
return n.length > 1 ? n[n.length - 1].toLowerCase() : "";
|
|
14
15
|
}
|
|
15
|
-
function oe(e) {
|
|
16
|
-
const t = j(e);
|
|
17
|
-
return w.image.includes(t) ? "image" : w.pdf.includes(t) ? "pdf" : w.docx.includes(t) ? "docx" : w.sheet.includes(t) ? "sheet" : w.video.includes(t) ? "video" : w.audio.includes(t) ? "audio" : w.text.includes(t) ? t === "csv" ? "sheet" : "text" : (te.includes(t), "unsupported");
|
|
18
|
-
}
|
|
19
16
|
function ne(e) {
|
|
17
|
+
const t = I(e);
|
|
18
|
+
return g.image.includes(t) ? "image" : g.pdf.includes(t) ? "pdf" : g.docx.includes(t) ? "docx" : g.pptx.includes(t) ? "pptx" : g.sheet.includes(t) ? "sheet" : g.video.includes(t) ? "video" : g.audio.includes(t) ? "audio" : g.text.includes(t) ? t === "csv" ? "sheet" : "text" : (oe.includes(t), "unsupported");
|
|
19
|
+
}
|
|
20
|
+
function ae(e) {
|
|
20
21
|
if (/^(blob:|data:|https?:\/\/|file:\/\/)/i.test(e))
|
|
21
22
|
return e;
|
|
22
23
|
try {
|
|
@@ -26,15 +27,15 @@ function ne(e) {
|
|
|
26
27
|
return e.split("/").map((n) => encodeURIComponent(decodeURIComponent(n))).join("/");
|
|
27
28
|
}
|
|
28
29
|
}
|
|
29
|
-
function
|
|
30
|
+
function N(e, t) {
|
|
30
31
|
var r;
|
|
31
32
|
if (typeof e == "string") {
|
|
32
|
-
const m =
|
|
33
|
+
const m = ae(e), d = e.split("/"), C = (r = t != null ? t : d[d.length - 1]) != null ? r : "unknown";
|
|
33
34
|
return {
|
|
34
35
|
source: e,
|
|
35
36
|
src: m,
|
|
36
|
-
name: decodeURIComponent(
|
|
37
|
-
extension:
|
|
37
|
+
name: decodeURIComponent(C.split("?")[0].split("#")[0]),
|
|
38
|
+
extension: I(C)
|
|
38
39
|
};
|
|
39
40
|
}
|
|
40
41
|
const n = URL.createObjectURL(e), c = t != null ? t : "name" in e && typeof e.name == "string" ? e.name : "blob";
|
|
@@ -42,24 +43,24 @@ function K(e, t) {
|
|
|
42
43
|
source: e,
|
|
43
44
|
src: n,
|
|
44
45
|
name: c,
|
|
45
|
-
extension:
|
|
46
|
+
extension: I(c),
|
|
46
47
|
cleanup: () => URL.revokeObjectURL(n)
|
|
47
48
|
};
|
|
48
49
|
}
|
|
49
|
-
function
|
|
50
|
+
function le(e, t) {
|
|
50
51
|
const n = document.createElement("a");
|
|
51
52
|
n.href = e, n.download = t, n.target = "_blank", n.rel = "noopener", document.body.append(n), n.click(), n.remove();
|
|
52
53
|
}
|
|
53
|
-
const
|
|
54
|
+
const se = ["aria-modal"], ie = {
|
|
54
55
|
key: 0,
|
|
55
56
|
class: "lfp-toolbar"
|
|
56
|
-
},
|
|
57
|
+
}, ue = { class: "lfp-toolbar__meta" }, re = { class: "lfp-title" }, ce = { class: "lfp-badge" }, de = { class: "lfp-toolbar__actions" }, ve = { class: "lfp-content" }, pe = {
|
|
57
58
|
key: 0,
|
|
58
59
|
class: "lfp-loading"
|
|
59
60
|
}, me = {
|
|
60
61
|
key: 0,
|
|
61
62
|
class: "lfp-error"
|
|
62
|
-
},
|
|
63
|
+
}, fe = ["src", "alt"], ge = ["src"], xe = ["src"], A = /* @__PURE__ */ z({
|
|
63
64
|
__name: "FilePreview",
|
|
64
65
|
props: {
|
|
65
66
|
source: {},
|
|
@@ -77,16 +78,17 @@ const le = ["aria-modal"], se = {
|
|
|
77
78
|
},
|
|
78
79
|
emits: ["update:visible", "error"],
|
|
79
80
|
setup(e, { emit: t }) {
|
|
80
|
-
const n = R(() => import("./PdfRenderer-DweDxjLS.js")), c = R(() => import("./TextRenderer-KUhpnf63.js")), r = R(() => import("./DocxRenderer-Cck1uOjU.js")), m = R(() => import("./SheetRenderer-CMDoDBXR.js")),
|
|
81
|
+
const n = R(() => import("./PdfRenderer-DweDxjLS.js")), c = R(() => import("./TextRenderer-KUhpnf63.js")), r = R(() => import("./DocxRenderer-Cck1uOjU.js")), m = R(() => import("./PptxRenderer-B4sDptn0.js")), d = R(() => import("./SheetRenderer-CMDoDBXR.js")), C = R(() => import("./UnsupportedRenderer-B016ePP5.js")), o = e, F = t, x = T(null), b = T(!1), h = T(""), k = T(0), a = T(N(o.source, o.fileName)), H = {
|
|
81
82
|
image: "图片",
|
|
82
83
|
pdf: "PDF",
|
|
83
84
|
text: "文本",
|
|
84
85
|
docx: "DOCX",
|
|
86
|
+
pptx: "PPTX",
|
|
85
87
|
sheet: "表格",
|
|
86
88
|
video: "视频",
|
|
87
89
|
audio: "音频",
|
|
88
90
|
unsupported: "下载"
|
|
89
|
-
}, p = f(() =>
|
|
91
|
+
}, p = f(() => ne(a.value.name)), X = f(() => H[p.value]), $ = f(() => o.fileName || a.value.name || o.dialogTitle), y = f(() => o.mode === "dialog"), q = f(() => y.value ? o.visible : !0), B = f(() => `${a.value.src}::${k.value}`), L = f(
|
|
90
92
|
() => [
|
|
91
93
|
a.value.src,
|
|
92
94
|
a.value.extension,
|
|
@@ -95,192 +97,197 @@ const le = ["aria-modal"], se = {
|
|
|
95
97
|
o.maxSheetRows,
|
|
96
98
|
o.maxSheetCols,
|
|
97
99
|
o.pdfScale,
|
|
98
|
-
|
|
100
|
+
k.value
|
|
99
101
|
].join("::")
|
|
100
|
-
),
|
|
102
|
+
), j = f(() => p.value === "image" ? "img" : p.value === "video" ? "video" : p.value === "audio" ? "audio" : null);
|
|
101
103
|
U(
|
|
102
104
|
() => [o.source, o.fileName],
|
|
103
105
|
() => {
|
|
104
106
|
var i, u;
|
|
105
|
-
(i =
|
|
107
|
+
(i = x.value) == null || i.call(x), a.value = N(o.source, o.fileName), x.value = (u = a.value.cleanup) != null ? u : null, h.value = "", b.value = !1, k.value += 1;
|
|
106
108
|
},
|
|
107
109
|
{ immediate: !0 }
|
|
108
110
|
), U(
|
|
109
111
|
() => [o.textEncoding, o.maxTextBytes, o.maxSheetRows, o.maxSheetCols, o.pdfScale],
|
|
110
112
|
() => {
|
|
111
|
-
|
|
113
|
+
h.value = "", b.value = !1, k.value += 1;
|
|
112
114
|
}
|
|
113
115
|
), U(
|
|
114
116
|
() => o.visible,
|
|
115
117
|
(i, u) => {
|
|
116
|
-
if (
|
|
118
|
+
if (y.value) {
|
|
117
119
|
if (!i) {
|
|
118
|
-
|
|
120
|
+
b.value = !1;
|
|
119
121
|
return;
|
|
120
122
|
}
|
|
121
|
-
u || (
|
|
123
|
+
u || (h.value = "", b.value = !1, k.value += 1);
|
|
122
124
|
}
|
|
123
125
|
}
|
|
124
126
|
), U(
|
|
125
127
|
() => o.mode,
|
|
126
128
|
(i, u) => {
|
|
127
|
-
i === "dialog" && u !== "dialog" && o.visible && (
|
|
129
|
+
i === "dialog" && u !== "dialog" && o.visible && (h.value = "", b.value = !1, k.value += 1);
|
|
128
130
|
}
|
|
129
|
-
),
|
|
131
|
+
), W(() => {
|
|
130
132
|
var i;
|
|
131
|
-
(i =
|
|
133
|
+
(i = x.value) == null || i.call(x);
|
|
132
134
|
});
|
|
133
|
-
function F() {
|
|
134
|
-
A("update:visible", !1);
|
|
135
|
-
}
|
|
136
135
|
function M() {
|
|
137
|
-
|
|
136
|
+
F("update:visible", !1);
|
|
137
|
+
}
|
|
138
|
+
function K() {
|
|
139
|
+
le(a.value.src, a.value.name);
|
|
138
140
|
}
|
|
139
|
-
function
|
|
140
|
-
|
|
141
|
+
function S(i) {
|
|
142
|
+
h.value = i.message, F("error", i);
|
|
141
143
|
}
|
|
142
|
-
function
|
|
143
|
-
|
|
144
|
+
function _(i) {
|
|
145
|
+
b.value = i;
|
|
144
146
|
}
|
|
145
|
-
return (i, u) => (
|
|
147
|
+
return (i, u) => (l(), w(G, {
|
|
146
148
|
to: "body",
|
|
147
|
-
disabled: !
|
|
149
|
+
disabled: !y.value
|
|
148
150
|
}, [
|
|
149
|
-
q.value ? (
|
|
151
|
+
q.value ? (l(), v("div", {
|
|
150
152
|
key: 0,
|
|
151
|
-
class:
|
|
153
|
+
class: J(["lfp-wrapper", { "is-dialog": y.value }])
|
|
152
154
|
}, [
|
|
153
|
-
|
|
155
|
+
y.value ? (l(), v("div", {
|
|
154
156
|
key: 0,
|
|
155
157
|
class: "lfp-backdrop",
|
|
156
|
-
onClick:
|
|
157
|
-
})) :
|
|
158
|
-
|
|
158
|
+
onClick: M
|
|
159
|
+
})) : P("", !0),
|
|
160
|
+
s("section", {
|
|
159
161
|
class: "lfp-panel",
|
|
160
162
|
role: "dialog",
|
|
161
|
-
"aria-modal":
|
|
163
|
+
"aria-modal": y.value ? "true" : "false"
|
|
162
164
|
}, [
|
|
163
|
-
e.showToolbar ? (
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
165
|
+
e.showToolbar ? (l(), v("header", ie, [
|
|
166
|
+
s("div", ue, [
|
|
167
|
+
s("strong", re, D($.value), 1),
|
|
168
|
+
s("span", ce, D(X.value), 1)
|
|
167
169
|
]),
|
|
168
|
-
|
|
169
|
-
|
|
170
|
+
s("div", de, [
|
|
171
|
+
s("button", {
|
|
170
172
|
class: "lfp-button lfp-icon-button",
|
|
171
173
|
type: "button",
|
|
172
174
|
"aria-label": "Download",
|
|
173
175
|
title: "Download",
|
|
174
|
-
onClick:
|
|
176
|
+
onClick: K
|
|
175
177
|
}, [...u[0] || (u[0] = [
|
|
176
|
-
|
|
178
|
+
s("svg", {
|
|
177
179
|
viewBox: "0 0 24 24",
|
|
178
180
|
"aria-hidden": "true"
|
|
179
181
|
}, [
|
|
180
|
-
|
|
182
|
+
s("path", { d: "M12 3.5a1 1 0 0 1 1 1V12l2.8-2.8a1 1 0 1 1 1.4 1.42l-4.5 4.48a1 1 0 0 1-1.4 0l-4.5-4.48a1 1 0 0 1 1.4-1.42L11 12V4.5a1 1 0 0 1 1-1Zm-7 13a1 1 0 0 1 1 1v.75c0 .41.34.75.75.75h10.5a.75.75 0 0 0 .75-.75v-.75a1 1 0 1 1 2 0v.75A2.75 2.75 0 0 1 17.25 21H6.75A2.75 2.75 0 0 1 4 18.25v-.75a1 1 0 0 1 1-1Z" })
|
|
181
183
|
], -1)
|
|
182
184
|
])]),
|
|
183
|
-
|
|
185
|
+
y.value ? (l(), v("button", {
|
|
184
186
|
key: 0,
|
|
185
187
|
class: "lfp-button lfp-button is-ghost lfp-icon-button",
|
|
186
188
|
type: "button",
|
|
187
189
|
"aria-label": "Close",
|
|
188
190
|
title: "Close",
|
|
189
|
-
onClick:
|
|
191
|
+
onClick: M
|
|
190
192
|
}, [...u[1] || (u[1] = [
|
|
191
|
-
|
|
193
|
+
s("svg", {
|
|
192
194
|
viewBox: "0 0 24 24",
|
|
193
195
|
"aria-hidden": "true"
|
|
194
196
|
}, [
|
|
195
|
-
|
|
197
|
+
s("path", { d: "M6.7 5.3a1 1 0 0 1 1.4 0L12 9.17l3.9-3.88a1 1 0 1 1 1.4 1.42L13.4 10.6l3.9 3.89a1 1 0 0 1-1.4 1.42L12 12.03l-3.9 3.88a1 1 0 0 1-1.4-1.42l3.9-3.89-3.9-3.89a1 1 0 0 1 0-1.42Z" })
|
|
196
198
|
], -1)
|
|
197
|
-
])])) :
|
|
199
|
+
])])) : P("", !0)
|
|
198
200
|
])
|
|
199
|
-
])) :
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
default:
|
|
203
|
-
|
|
204
|
-
u[2] || (u[2] =
|
|
205
|
-
|
|
206
|
-
])) :
|
|
201
|
+
])) : P("", !0),
|
|
202
|
+
s("div", ve, [
|
|
203
|
+
Q(Y, { name: "lfp-fade" }, {
|
|
204
|
+
default: ee(() => [
|
|
205
|
+
b.value ? (l(), v("div", pe, [
|
|
206
|
+
u[2] || (u[2] = s("span", { class: "lfp-spinner" }, null, -1)),
|
|
207
|
+
s("span", null, D(e.loadingText), 1)
|
|
208
|
+
])) : P("", !0)
|
|
207
209
|
]),
|
|
208
210
|
_: 1
|
|
209
211
|
}),
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
212
|
+
h.value ? (l(), v("div", me, [
|
|
213
|
+
s("p", null, D(h.value), 1),
|
|
214
|
+
s("button", {
|
|
213
215
|
class: "lfp-button lfp-icon-button",
|
|
214
216
|
type: "button",
|
|
215
217
|
"aria-label": "Download",
|
|
216
218
|
title: "Download",
|
|
217
|
-
onClick:
|
|
219
|
+
onClick: K
|
|
218
220
|
}, [...u[3] || (u[3] = [
|
|
219
|
-
|
|
221
|
+
s("svg", {
|
|
220
222
|
viewBox: "0 0 24 24",
|
|
221
223
|
"aria-hidden": "true"
|
|
222
224
|
}, [
|
|
223
|
-
|
|
225
|
+
s("path", { d: "M12 3.5a1 1 0 0 1 1 1V12l2.8-2.8a1 1 0 1 1 1.4 1.42l-4.5 4.48a1 1 0 0 1-1.4 0l-4.5-4.48a1 1 0 0 1 1.4-1.42L11 12V4.5a1 1 0 0 1 1-1Zm-7 13a1 1 0 0 1 1 1v.75c0 .41.34.75.75.75h10.5a.75.75 0 0 0 .75-.75v-.75a1 1 0 1 1 2 0v.75A2.75 2.75 0 0 1 17.25 21H6.75A2.75 2.75 0 0 1 4 18.25v-.75a1 1 0 0 1 1-1Z" })
|
|
224
226
|
], -1)
|
|
225
227
|
])])
|
|
226
|
-
])) : (
|
|
227
|
-
|
|
228
|
-
key:
|
|
228
|
+
])) : (l(), v(te, { key: 1 }, [
|
|
229
|
+
j.value === "img" ? (l(), v("img", {
|
|
230
|
+
key: B.value,
|
|
229
231
|
class: "lfp-image",
|
|
230
232
|
src: a.value.src,
|
|
231
233
|
alt: a.value.name,
|
|
232
234
|
loading: "lazy"
|
|
233
|
-
}, null, 8,
|
|
234
|
-
key:
|
|
235
|
+
}, null, 8, fe)) : j.value === "video" ? (l(), v("video", {
|
|
236
|
+
key: B.value,
|
|
235
237
|
class: "lfp-media",
|
|
236
238
|
src: a.value.src,
|
|
237
239
|
controls: "",
|
|
238
240
|
preload: "metadata"
|
|
239
|
-
}, null, 8,
|
|
240
|
-
key:
|
|
241
|
+
}, null, 8, ge)) : j.value === "audio" ? (l(), v("audio", {
|
|
242
|
+
key: B.value,
|
|
241
243
|
class: "lfp-audio",
|
|
242
244
|
src: a.value.src,
|
|
243
245
|
controls: "",
|
|
244
246
|
preload: "metadata"
|
|
245
|
-
}, null, 8,
|
|
246
|
-
key:
|
|
247
|
+
}, null, 8, xe)) : p.value === "pdf" ? (l(), w(E(n), {
|
|
248
|
+
key: L.value,
|
|
247
249
|
source: typeof o.source == "string" ? a.value.src : o.source,
|
|
248
250
|
scale: e.pdfScale,
|
|
249
|
-
onLoading:
|
|
250
|
-
onError:
|
|
251
|
-
}, null, 8, ["source", "scale"])) : p.value === "docx" ? (
|
|
252
|
-
key:
|
|
251
|
+
onLoading: _,
|
|
252
|
+
onError: S
|
|
253
|
+
}, null, 8, ["source", "scale"])) : p.value === "docx" ? (l(), w(E(r), {
|
|
254
|
+
key: L.value,
|
|
255
|
+
source: typeof o.source == "string" ? a.value.src : o.source,
|
|
256
|
+
onLoading: _,
|
|
257
|
+
onError: S
|
|
258
|
+
}, null, 8, ["source"])) : p.value === "pptx" ? (l(), w(E(m), {
|
|
259
|
+
key: L.value,
|
|
253
260
|
source: typeof o.source == "string" ? a.value.src : o.source,
|
|
254
|
-
onLoading:
|
|
255
|
-
onError:
|
|
256
|
-
}, null, 8, ["source"])) : p.value === "sheet" ? (
|
|
257
|
-
key:
|
|
261
|
+
onLoading: _,
|
|
262
|
+
onError: S
|
|
263
|
+
}, null, 8, ["source"])) : p.value === "sheet" ? (l(), w(E(d), {
|
|
264
|
+
key: L.value,
|
|
258
265
|
source: typeof o.source == "string" ? a.value.src : o.source,
|
|
259
266
|
"max-cols": e.maxSheetCols,
|
|
260
267
|
"max-rows": e.maxSheetRows,
|
|
261
|
-
onLoading:
|
|
262
|
-
onError:
|
|
263
|
-
}, null, 8, ["source", "max-cols", "max-rows"])) : p.value === "text" ? (
|
|
264
|
-
key:
|
|
268
|
+
onLoading: _,
|
|
269
|
+
onError: S
|
|
270
|
+
}, null, 8, ["source", "max-cols", "max-rows"])) : p.value === "text" ? (l(), w(E(c), {
|
|
271
|
+
key: L.value,
|
|
265
272
|
source: typeof o.source == "string" ? a.value.src : o.source,
|
|
266
273
|
encoding: e.textEncoding,
|
|
267
274
|
extension: a.value.extension,
|
|
268
275
|
"max-bytes": e.maxTextBytes,
|
|
269
|
-
onLoading:
|
|
270
|
-
onError:
|
|
271
|
-
}, null, 8, ["source", "encoding", "extension", "max-bytes"])) : (
|
|
272
|
-
key:
|
|
276
|
+
onLoading: _,
|
|
277
|
+
onError: S
|
|
278
|
+
}, null, 8, ["source", "encoding", "extension", "max-bytes"])) : (l(), w(E(C), {
|
|
279
|
+
key: 8,
|
|
273
280
|
"file-name": a.value.name,
|
|
274
281
|
src: a.value.src
|
|
275
282
|
}, null, 8, ["file-name", "src"]))
|
|
276
283
|
], 64))
|
|
277
284
|
])
|
|
278
|
-
], 8,
|
|
279
|
-
], 2)) :
|
|
285
|
+
], 8, se)
|
|
286
|
+
], 2)) : P("", !0)
|
|
280
287
|
], 8, ["disabled"]));
|
|
281
288
|
}
|
|
282
289
|
});
|
|
283
|
-
function
|
|
290
|
+
function be(e) {
|
|
284
291
|
if (typeof e == "string") {
|
|
285
292
|
const t = document.querySelector(e);
|
|
286
293
|
if (!t)
|
|
@@ -289,9 +296,9 @@ function xe(e) {
|
|
|
289
296
|
}
|
|
290
297
|
return e;
|
|
291
298
|
}
|
|
292
|
-
function
|
|
293
|
-
const n =
|
|
294
|
-
render: () =>
|
|
299
|
+
function he(e, t) {
|
|
300
|
+
const n = O({ ...t }), c = be(e), r = V({
|
|
301
|
+
render: () => Z(A, n)
|
|
295
302
|
});
|
|
296
303
|
return r.mount(c), {
|
|
297
304
|
update(m) {
|
|
@@ -302,19 +309,19 @@ function be(e, t) {
|
|
|
302
309
|
}
|
|
303
310
|
};
|
|
304
311
|
}
|
|
305
|
-
function
|
|
312
|
+
function ye(e) {
|
|
306
313
|
const t = document.createElement("div");
|
|
307
314
|
document.body.append(t);
|
|
308
315
|
let n;
|
|
309
|
-
const c = e["onUpdate:visible"], r =
|
|
316
|
+
const c = e["onUpdate:visible"], r = O({
|
|
310
317
|
visible: !0,
|
|
311
318
|
mode: "dialog",
|
|
312
319
|
...e,
|
|
313
320
|
"onUpdate:visible"(d) {
|
|
314
321
|
c == null || c(d), r.visible = d, d || queueMicrotask(() => n.unmount());
|
|
315
322
|
}
|
|
316
|
-
}), m =
|
|
317
|
-
render: () =>
|
|
323
|
+
}), m = V({
|
|
324
|
+
render: () => Z(A, r)
|
|
318
325
|
});
|
|
319
326
|
return m.mount(t), n = {
|
|
320
327
|
update(d) {
|
|
@@ -325,22 +332,22 @@ function he(e) {
|
|
|
325
332
|
}
|
|
326
333
|
}, n;
|
|
327
334
|
}
|
|
328
|
-
function
|
|
335
|
+
function ke() {
|
|
329
336
|
const e = {
|
|
330
|
-
mount:
|
|
331
|
-
openDialog:
|
|
337
|
+
mount: he,
|
|
338
|
+
openDialog: ye
|
|
332
339
|
};
|
|
333
340
|
return typeof window != "undefined" && (window.LightFilePreview = e), e;
|
|
334
341
|
}
|
|
335
|
-
const
|
|
342
|
+
const Re = {
|
|
336
343
|
install(e) {
|
|
337
|
-
e.component("LightFilePreview",
|
|
344
|
+
e.component("LightFilePreview", A);
|
|
338
345
|
}
|
|
339
346
|
};
|
|
340
347
|
export {
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
348
|
+
A as _,
|
|
349
|
+
le as d,
|
|
350
|
+
Re as i,
|
|
351
|
+
ye as o,
|
|
352
|
+
ke as r
|
|
346
353
|
};
|