artifactuse 0.3.2 → 0.4.1
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/core/binaryPreview.d.ts +3 -0
- package/dist/core/detector.d.ts +32 -0
- package/dist/{index-ABusvYh9.js → index-CBGheZYZ.js} +360 -309
- package/dist/index.js +1 -1
- package/dist/{jszip.min-CdmYyw5L.js → jszip.min-BdBnWAEK.js} +896 -854
- package/dist/react/index.js +810 -782
- package/dist/styles/components/panel.css +75 -0
- package/dist/svelte/index.js +2283 -2118
- package/dist/vue/index.js +1515 -1425
- package/dist/vue2/index.js +421 -79
- package/package.json +1 -1
package/dist/vue/index.js
CHANGED
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
import { ref as M, computed as
|
|
2
|
-
import { g as
|
|
3
|
-
import { J as
|
|
4
|
-
const
|
|
1
|
+
import { ref as M, computed as k, createElementBlock as l, openBlock as s, normalizeClass as R, createElementVNode as e, toDisplayString as i, withModifiers as me, onMounted as Ee, watch as ne, Fragment as V, createCommentVNode as v, renderList as fe, createTextVNode as G, h as re, normalizeStyle as Le, createStaticVNode as ua, createBlock as Pe, resolveDynamicComponent as da, nextTick as xe, onUnmounted as st, Teleport as va, createVNode as De, Transition as qe, withCtx as Oe, withKeys as fa, onBeforeUnmount as pa, unref as p, withDirectives as Ct, vShow as xt, reactive as Tt, provide as _a, inject as ha } from "vue";
|
|
2
|
+
import { g as Ue, f as Lt, a as tt, b as at, n as ma, i as $t, c as ya, D as ga, d as Pt } from "../index-CBGheZYZ.js";
|
|
3
|
+
import { g as Mt, r as ka, J as wa, b as ba } from "../jszip.min-BdBnWAEK.js";
|
|
4
|
+
const Ca = { class: "artifactuse-card__icon" }, xa = ["innerHTML"], $a = { class: "artifactuse-card__content" }, Ma = { class: "artifactuse-card__title" }, Ta = { class: "artifactuse-card__meta" }, La = { class: "artifactuse-card__type" }, Pa = { class: "artifactuse-card__size" }, Ea = { class: "artifactuse-card__actions" }, Aa = ["title"], Ha = {
|
|
5
5
|
key: 0,
|
|
6
6
|
viewBox: "0 0 24 24",
|
|
7
7
|
fill: "none",
|
|
8
8
|
stroke: "currentColor",
|
|
9
9
|
"stroke-width": "2"
|
|
10
|
-
},
|
|
10
|
+
}, Ba = {
|
|
11
11
|
key: 1,
|
|
12
12
|
viewBox: "0 0 24 24",
|
|
13
13
|
fill: "none",
|
|
14
14
|
stroke: "currentColor",
|
|
15
15
|
"stroke-width": "2"
|
|
16
|
-
},
|
|
16
|
+
}, Sa = {
|
|
17
17
|
__name: "ArtifactuseCard",
|
|
18
18
|
props: {
|
|
19
19
|
artifact: {
|
|
@@ -26,58 +26,58 @@ const da = { class: "artifactuse-card__icon" }, va = ["innerHTML"], fa = { class
|
|
|
26
26
|
}
|
|
27
27
|
},
|
|
28
28
|
emits: ["open", "copy", "download"],
|
|
29
|
-
setup(
|
|
30
|
-
const
|
|
29
|
+
setup(L, { emit: d }) {
|
|
30
|
+
const _ = L, T = d, f = M(!1), n = k(() => Ue(_.artifact.language)), O = k(() => {
|
|
31
31
|
var $;
|
|
32
|
-
return
|
|
33
|
-
}),
|
|
32
|
+
return Lt(_.artifact.size || (($ = _.artifact.code) == null ? void 0 : $.length) || 0);
|
|
33
|
+
}), H = k(() => tt(_.artifact.language));
|
|
34
34
|
function g($) {
|
|
35
|
-
$.stopPropagation(), T("open",
|
|
35
|
+
$.stopPropagation(), T("open", _.artifact);
|
|
36
36
|
}
|
|
37
|
-
async function
|
|
37
|
+
async function r() {
|
|
38
38
|
try {
|
|
39
|
-
await navigator.clipboard.writeText(
|
|
40
|
-
|
|
41
|
-
}, 2e3), T("copy",
|
|
39
|
+
await navigator.clipboard.writeText(_.artifact.code), f.value = !0, setTimeout(() => {
|
|
40
|
+
f.value = !1;
|
|
41
|
+
}, 2e3), T("copy", _.artifact);
|
|
42
42
|
} catch ($) {
|
|
43
43
|
console.error("Failed to copy:", $);
|
|
44
44
|
}
|
|
45
45
|
}
|
|
46
46
|
function h() {
|
|
47
|
-
var
|
|
48
|
-
const $ = new Blob([
|
|
49
|
-
x.href =
|
|
47
|
+
var J;
|
|
48
|
+
const $ = new Blob([_.artifact.code], { type: "text/plain" }), I = URL.createObjectURL($), x = document.createElement("a"), N = at(_.artifact.editorLanguage || _.artifact.language), D = ((J = _.artifact.title) == null ? void 0 : J.replace(/[^a-z0-9]/gi, "_").toLowerCase()) || "code";
|
|
49
|
+
x.href = I, x.download = `${D}.${N}`, document.body.appendChild(x), x.click(), document.body.removeChild(x), URL.revokeObjectURL(I), T("download", _.artifact);
|
|
50
50
|
}
|
|
51
|
-
return ($,
|
|
52
|
-
class:
|
|
51
|
+
return ($, I) => (s(), l("div", {
|
|
52
|
+
class: R(["artifactuse-card", { "artifactuse-card--active": L.isActive }]),
|
|
53
53
|
onClick: g
|
|
54
54
|
}, [
|
|
55
|
-
e("div",
|
|
56
|
-
(
|
|
55
|
+
e("div", Ca, [
|
|
56
|
+
(s(), l("svg", {
|
|
57
57
|
viewBox: "0 0 24 24",
|
|
58
58
|
fill: "none",
|
|
59
59
|
stroke: "currentColor",
|
|
60
60
|
"stroke-width": "1.5",
|
|
61
|
-
innerHTML:
|
|
62
|
-
}, null, 8,
|
|
61
|
+
innerHTML: H.value
|
|
62
|
+
}, null, 8, xa))
|
|
63
63
|
]),
|
|
64
|
-
e("div",
|
|
65
|
-
e("div",
|
|
66
|
-
e("div",
|
|
67
|
-
e("span",
|
|
68
|
-
|
|
69
|
-
e("span",
|
|
64
|
+
e("div", $a, [
|
|
65
|
+
e("div", Ma, i(L.artifact.title), 1),
|
|
66
|
+
e("div", Ta, [
|
|
67
|
+
e("span", La, i(n.value), 1),
|
|
68
|
+
I[0] || (I[0] = e("span", { class: "artifactuse-card__separator" }, "•", -1)),
|
|
69
|
+
e("span", Pa, i(O.value), 1)
|
|
70
70
|
])
|
|
71
71
|
]),
|
|
72
|
-
e("div",
|
|
72
|
+
e("div", Ea, [
|
|
73
73
|
e("button", {
|
|
74
74
|
class: "artifactuse-card__action",
|
|
75
|
-
onClick:
|
|
76
|
-
title:
|
|
75
|
+
onClick: me(r, ["stop"]),
|
|
76
|
+
title: f.value ? "Copied!" : "Copy code"
|
|
77
77
|
}, [
|
|
78
|
-
|
|
78
|
+
f.value ? (s(), l("svg", Ba, [...I[2] || (I[2] = [
|
|
79
79
|
e("polyline", { points: "20 6 9 17 4 12" }, null, -1)
|
|
80
|
-
])])) : (
|
|
80
|
+
])])) : (s(), l("svg", Ha, [...I[1] || (I[1] = [
|
|
81
81
|
e("rect", {
|
|
82
82
|
x: "9",
|
|
83
83
|
y: "9",
|
|
@@ -88,12 +88,12 @@ const da = { class: "artifactuse-card__icon" }, va = ["innerHTML"], fa = { class
|
|
|
88
88
|
}, null, -1),
|
|
89
89
|
e("path", { d: "M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1" }, null, -1)
|
|
90
90
|
])]))
|
|
91
|
-
], 8,
|
|
91
|
+
], 8, Aa),
|
|
92
92
|
e("button", {
|
|
93
93
|
class: "artifactuse-card__action",
|
|
94
|
-
onClick:
|
|
94
|
+
onClick: me(h, ["stop"]),
|
|
95
95
|
title: "Download file"
|
|
96
|
-
}, [...
|
|
96
|
+
}, [...I[3] || (I[3] = [
|
|
97
97
|
e("svg", {
|
|
98
98
|
viewBox: "0 0 24 24",
|
|
99
99
|
fill: "none",
|
|
@@ -111,7 +111,7 @@ const da = { class: "artifactuse-card__icon" }, va = ["innerHTML"], fa = { class
|
|
|
111
111
|
], -1)
|
|
112
112
|
])])
|
|
113
113
|
]),
|
|
114
|
-
|
|
114
|
+
I[4] || (I[4] = e("div", { class: "artifactuse-card__arrow" }, [
|
|
115
115
|
e("svg", {
|
|
116
116
|
viewBox: "0 0 24 24",
|
|
117
117
|
fill: "none",
|
|
@@ -123,10 +123,10 @@ const da = { class: "artifactuse-card__icon" }, va = ["innerHTML"], fa = { class
|
|
|
123
123
|
], -1))
|
|
124
124
|
], 2));
|
|
125
125
|
}
|
|
126
|
-
},
|
|
126
|
+
}, za = ["data-artifactuse-theme"], Va = {
|
|
127
127
|
key: 0,
|
|
128
128
|
class: "artifactuse-form-collapsed"
|
|
129
|
-
},
|
|
129
|
+
}, Ia = { class: "artifactuse-form-collapsed-icon" }, Fa = {
|
|
130
130
|
key: 0,
|
|
131
131
|
viewBox: "0 0 24 24",
|
|
132
132
|
fill: "none",
|
|
@@ -134,7 +134,7 @@ const da = { class: "artifactuse-card__icon" }, va = ["innerHTML"], fa = { class
|
|
|
134
134
|
"stroke-width": "2.5",
|
|
135
135
|
"stroke-linecap": "round",
|
|
136
136
|
"stroke-linejoin": "round"
|
|
137
|
-
},
|
|
137
|
+
}, Ra = {
|
|
138
138
|
key: 1,
|
|
139
139
|
viewBox: "0 0 24 24",
|
|
140
140
|
fill: "none",
|
|
@@ -142,7 +142,7 @@ const da = { class: "artifactuse-card__icon" }, va = ["innerHTML"], fa = { class
|
|
|
142
142
|
"stroke-width": "2.5",
|
|
143
143
|
"stroke-linecap": "round",
|
|
144
144
|
"stroke-linejoin": "round"
|
|
145
|
-
},
|
|
145
|
+
}, qa = {
|
|
146
146
|
key: 2,
|
|
147
147
|
viewBox: "0 0 24 24",
|
|
148
148
|
fill: "none",
|
|
@@ -150,64 +150,64 @@ const da = { class: "artifactuse-card__icon" }, va = ["innerHTML"], fa = { class
|
|
|
150
150
|
"stroke-width": "2.5",
|
|
151
151
|
"stroke-linecap": "round",
|
|
152
152
|
"stroke-linejoin": "round"
|
|
153
|
-
},
|
|
153
|
+
}, Oa = { class: "artifactuse-form-collapsed-title" }, Ua = {
|
|
154
154
|
key: 0,
|
|
155
155
|
class: "artifactuse-form-header"
|
|
156
|
-
},
|
|
156
|
+
}, Da = {
|
|
157
157
|
key: 0,
|
|
158
158
|
class: "artifactuse-form-title"
|
|
159
|
-
},
|
|
159
|
+
}, ja = {
|
|
160
160
|
key: 1,
|
|
161
161
|
class: "artifactuse-form-description"
|
|
162
|
-
},
|
|
162
|
+
}, Na = {
|
|
163
163
|
key: 1,
|
|
164
164
|
class: "artifactuse-form-buttons"
|
|
165
|
-
},
|
|
165
|
+
}, Wa = ["disabled", "onClick"], Ja = ["innerHTML"], Xa = { class: "artifactuse-form-fields" }, Za = {
|
|
166
166
|
key: 0,
|
|
167
167
|
class: "artifactuse-form-buttons"
|
|
168
|
-
},
|
|
168
|
+
}, Ka = ["type", "disabled", "onClick"], Ya = {
|
|
169
169
|
key: 0,
|
|
170
170
|
class: "artifactuse-form-btn-spinner"
|
|
171
|
-
},
|
|
171
|
+
}, Ga = ["innerHTML"], Qa = {
|
|
172
172
|
key: 1,
|
|
173
173
|
class: "artifactuse-form-divider"
|
|
174
|
-
},
|
|
174
|
+
}, es = {
|
|
175
175
|
key: 2,
|
|
176
176
|
class: "artifactuse-form-heading"
|
|
177
|
-
},
|
|
177
|
+
}, ts = {
|
|
178
178
|
key: 3,
|
|
179
179
|
class: "artifactuse-form-field"
|
|
180
|
-
},
|
|
180
|
+
}, as = { class: "artifactuse-checkbox-label" }, ss = ["checked", "disabled", "onChange"], ls = { class: "artifactuse-checkbox-text" }, is = {
|
|
181
181
|
key: 0,
|
|
182
182
|
class: "artifactuse-required"
|
|
183
|
-
},
|
|
183
|
+
}, ns = {
|
|
184
184
|
key: 0,
|
|
185
185
|
class: "artifactuse-help-text"
|
|
186
|
-
},
|
|
186
|
+
}, os = {
|
|
187
187
|
key: 1,
|
|
188
188
|
class: "artifactuse-error-text"
|
|
189
|
-
},
|
|
189
|
+
}, rs = {
|
|
190
190
|
key: 4,
|
|
191
191
|
class: "artifactuse-form-field"
|
|
192
|
-
},
|
|
192
|
+
}, cs = ["for"], us = {
|
|
193
193
|
key: 0,
|
|
194
194
|
class: "artifactuse-required"
|
|
195
|
-
},
|
|
195
|
+
}, ds = ["id", "type", "value", "placeholder", "disabled", "required", "onInput"], vs = ["id", "value", "placeholder", "disabled", "required", "rows", "onInput"], fs = ["id", "value", "disabled", "required", "onChange"], ps = { value: "" }, _s = ["value", "disabled"], hs = {
|
|
196
196
|
key: 3,
|
|
197
197
|
class: "artifactuse-radio-group"
|
|
198
|
-
},
|
|
198
|
+
}, ms = ["name", "value", "checked", "disabled", "onChange"], ys = {
|
|
199
199
|
key: 4,
|
|
200
200
|
class: "artifactuse-help-text"
|
|
201
|
-
},
|
|
201
|
+
}, gs = {
|
|
202
202
|
key: 5,
|
|
203
203
|
class: "artifactuse-error-text"
|
|
204
|
-
},
|
|
204
|
+
}, ks = {
|
|
205
205
|
key: 0,
|
|
206
206
|
class: "artifactuse-form-buttons artifactuse-form-buttons-default"
|
|
207
|
-
},
|
|
207
|
+
}, ws = ["disabled"], bs = {
|
|
208
208
|
key: 0,
|
|
209
209
|
class: "artifactuse-form-btn-spinner"
|
|
210
|
-
},
|
|
210
|
+
}, Cs = {
|
|
211
211
|
__name: "ArtifactuseInlineForm",
|
|
212
212
|
props: {
|
|
213
213
|
artifact: { type: Object, required: !0 },
|
|
@@ -216,121 +216,121 @@ const da = { class: "artifactuse-card__icon" }, va = ["innerHTML"], fa = { class
|
|
|
216
216
|
initialState: {
|
|
217
217
|
type: String,
|
|
218
218
|
default: "active",
|
|
219
|
-
validator: (
|
|
219
|
+
validator: (L) => ["active", "submitted", "cancelled", "inactive"].includes(L)
|
|
220
220
|
}
|
|
221
221
|
},
|
|
222
222
|
emits: ["submit", "cancel", "reset", "button-click"],
|
|
223
|
-
setup(
|
|
224
|
-
const
|
|
225
|
-
function
|
|
226
|
-
|
|
223
|
+
setup(L, { emit: d }) {
|
|
224
|
+
const _ = L, T = d, f = M(_.initialState), n = k(() => f.value !== "active"), O = k(() => f.value === "active" ? "" : `artifactuse-form--${f.value}`);
|
|
225
|
+
function H(b) {
|
|
226
|
+
f.value = b;
|
|
227
227
|
}
|
|
228
|
-
const g =
|
|
228
|
+
const g = k(() => {
|
|
229
229
|
try {
|
|
230
|
-
return JSON.parse(
|
|
230
|
+
return JSON.parse(_.artifact.code);
|
|
231
231
|
} catch {
|
|
232
232
|
return { title: "Invalid Form", variant: "fields", data: { fields: [] } };
|
|
233
233
|
}
|
|
234
|
-
}),
|
|
235
|
-
var
|
|
236
|
-
return ((
|
|
237
|
-
}), ee =
|
|
238
|
-
var
|
|
239
|
-
return g.value.variant === "buttons" ? ((
|
|
240
|
-
}),
|
|
241
|
-
function
|
|
242
|
-
if (!
|
|
243
|
-
const
|
|
244
|
-
if (
|
|
245
|
-
let
|
|
246
|
-
if (
|
|
247
|
-
const
|
|
248
|
-
if (!isNaN(
|
|
234
|
+
}), r = M(null), h = k(() => _.artifact.id || g.value.id || `form-${Date.now()}`), $ = k(() => `artifactuse-form-${g.value.variant || "fields"}`), I = k(() => g.value.title || "Form"), x = M({}), N = M({}), D = M(!1), J = k(() => {
|
|
235
|
+
var b;
|
|
236
|
+
return ((b = g.value.data) == null ? void 0 : b.fields) || [];
|
|
237
|
+
}), ee = k(() => {
|
|
238
|
+
var b;
|
|
239
|
+
return g.value.variant === "buttons" ? ((b = g.value.data) == null ? void 0 : b.fields) || [] : [];
|
|
240
|
+
}), S = k(() => J.value.some((b) => b.type === "buttons"));
|
|
241
|
+
function ce(b) {
|
|
242
|
+
if (!b) return null;
|
|
243
|
+
const B = b.trim();
|
|
244
|
+
if (B.startsWith("#")) {
|
|
245
|
+
let o = B.slice(1);
|
|
246
|
+
if (o.length === 3 && (o = o.split("").map((P) => P + P).join("")), o.length === 6) {
|
|
247
|
+
const P = parseInt(o.slice(0, 2), 16), se = parseInt(o.slice(2, 4), 16), te = parseInt(o.slice(4, 6), 16);
|
|
248
|
+
if (!isNaN(P) && !isNaN(se) && !isNaN(te)) return `${P}, ${se}, ${te}`;
|
|
249
249
|
}
|
|
250
250
|
}
|
|
251
|
-
const
|
|
252
|
-
if (
|
|
253
|
-
const
|
|
254
|
-
return
|
|
251
|
+
const u = B.match(/^rgba?\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)/i);
|
|
252
|
+
if (u) return `${u[1]}, ${u[2]}, ${u[3]}`;
|
|
253
|
+
const z = B.split(/[\s,]+/).map(Number).filter((o) => !isNaN(o));
|
|
254
|
+
return z.length >= 3 ? `${z[0]}, ${z[1]}, ${z[2]}` : null;
|
|
255
255
|
}
|
|
256
256
|
function K() {
|
|
257
|
-
if (
|
|
258
|
-
const
|
|
259
|
-
|
|
257
|
+
if (r.value && _.accent) {
|
|
258
|
+
const b = ce(_.accent);
|
|
259
|
+
b && r.value.style.setProperty("--artifactuse-primary", b);
|
|
260
260
|
}
|
|
261
261
|
}
|
|
262
|
-
|
|
263
|
-
K(),
|
|
264
|
-
}),
|
|
265
|
-
|
|
262
|
+
Ee(() => {
|
|
263
|
+
K(), f.value = _.initialState;
|
|
264
|
+
}), ne(() => _.accent, K), ne(() => _.initialState, (b) => {
|
|
265
|
+
f.value = b;
|
|
266
266
|
});
|
|
267
267
|
function Z() {
|
|
268
|
-
var
|
|
269
|
-
const
|
|
270
|
-
|
|
271
|
-
["buttons", "divider", "heading"].includes(
|
|
272
|
-
}), (
|
|
273
|
-
}
|
|
274
|
-
Z(),
|
|
275
|
-
function
|
|
276
|
-
return ["text", "email", "password", "tel", "url", "number", "date", "time", "datetime-local"].includes(
|
|
277
|
-
}
|
|
278
|
-
function m(
|
|
279
|
-
return
|
|
280
|
-
}
|
|
281
|
-
function
|
|
282
|
-
x.value[
|
|
283
|
-
}
|
|
284
|
-
function
|
|
285
|
-
var
|
|
286
|
-
const
|
|
287
|
-
|
|
288
|
-
if (["buttons", "divider", "heading"].includes(
|
|
289
|
-
const
|
|
290
|
-
if (
|
|
291
|
-
|
|
268
|
+
var u;
|
|
269
|
+
const b = {};
|
|
270
|
+
J.value.forEach((z) => {
|
|
271
|
+
["buttons", "divider", "heading"].includes(z.type) || (z.defaultValue !== void 0 ? b[z.name] = z.defaultValue : z.type === "checkbox" ? b[z.name] = !1 : b[z.name] = "");
|
|
272
|
+
}), (u = g.value.data) != null && u.defaults && Object.assign(b, g.value.data.defaults), x.value = b;
|
|
273
|
+
}
|
|
274
|
+
Z(), ne(() => _.artifact.code, Z);
|
|
275
|
+
function pe(b) {
|
|
276
|
+
return ["text", "email", "password", "tel", "url", "number", "date", "time", "datetime-local"].includes(b);
|
|
277
|
+
}
|
|
278
|
+
function m(b) {
|
|
279
|
+
return b ? b.map((B) => typeof B == "string" ? { label: B, value: B } : B) : [];
|
|
280
|
+
}
|
|
281
|
+
function w(b, B) {
|
|
282
|
+
x.value[b] = B, N.value[b] && delete N.value[b];
|
|
283
|
+
}
|
|
284
|
+
function ie() {
|
|
285
|
+
var z;
|
|
286
|
+
const b = {};
|
|
287
|
+
J.value.forEach((o) => {
|
|
288
|
+
if (["buttons", "divider", "heading"].includes(o.type)) return;
|
|
289
|
+
const P = x.value[o.name];
|
|
290
|
+
if (o.required && !P && P !== 0 && P !== !1) {
|
|
291
|
+
b[o.name] = `${o.label || "This field"} is required`;
|
|
292
292
|
return;
|
|
293
293
|
}
|
|
294
|
-
if (
|
|
295
|
-
|
|
294
|
+
if (o.pattern && P && !new RegExp(o.pattern).test(P)) {
|
|
295
|
+
b[o.name] = o.patternMessage || `${o.label || "This field"} is invalid`;
|
|
296
296
|
return;
|
|
297
297
|
}
|
|
298
|
-
if (
|
|
299
|
-
|
|
298
|
+
if (o.type === "email" && P && !/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(P)) {
|
|
299
|
+
b[o.name] = "Please enter a valid email address";
|
|
300
300
|
return;
|
|
301
301
|
}
|
|
302
|
-
if (
|
|
303
|
-
|
|
302
|
+
if (o.minLength && P && P.length < o.minLength) {
|
|
303
|
+
b[o.name] = `Minimum ${o.minLength} characters required`;
|
|
304
304
|
return;
|
|
305
305
|
}
|
|
306
|
-
if (
|
|
307
|
-
|
|
306
|
+
if (o.maxLength && P && P.length > o.maxLength) {
|
|
307
|
+
b[o.name] = `Maximum ${o.maxLength} characters allowed`;
|
|
308
308
|
return;
|
|
309
309
|
}
|
|
310
310
|
});
|
|
311
|
-
const
|
|
312
|
-
return
|
|
313
|
-
if (
|
|
314
|
-
const se = x.value[
|
|
315
|
-
|
|
316
|
-
}),
|
|
311
|
+
const u = (z = g.value.data) == null ? void 0 : z.validation;
|
|
312
|
+
return u && Object.entries(u).forEach(([o, P]) => {
|
|
313
|
+
if (b[o]) return;
|
|
314
|
+
const se = x.value[o];
|
|
315
|
+
P.pattern && se && (new RegExp(P.pattern).test(se) || (b[o] = P.message || `${o} is invalid`));
|
|
316
|
+
}), N.value = b, Object.keys(b).length === 0;
|
|
317
317
|
}
|
|
318
|
-
function
|
|
319
|
-
Z(),
|
|
318
|
+
function oe() {
|
|
319
|
+
Z(), N.value = {};
|
|
320
320
|
}
|
|
321
321
|
function W() {
|
|
322
|
-
|
|
322
|
+
ie() && (D.value = !0, T("submit", {
|
|
323
323
|
formId: h.value,
|
|
324
324
|
action: "submit",
|
|
325
325
|
values: { ...x.value },
|
|
326
326
|
timestamp: Date.now()
|
|
327
327
|
}), setTimeout(() => {
|
|
328
|
-
|
|
328
|
+
D.value = !1, H("submitted");
|
|
329
329
|
}, 300));
|
|
330
330
|
}
|
|
331
|
-
function
|
|
332
|
-
const
|
|
333
|
-
switch (
|
|
331
|
+
function X(b) {
|
|
332
|
+
const B = b.action || "custom";
|
|
333
|
+
switch (B) {
|
|
334
334
|
case "submit":
|
|
335
335
|
W();
|
|
336
336
|
break;
|
|
@@ -338,17 +338,17 @@ const da = { class: "artifactuse-card__icon" }, va = ["innerHTML"], fa = { class
|
|
|
338
338
|
T("cancel", {
|
|
339
339
|
formId: h.value,
|
|
340
340
|
action: "cancel",
|
|
341
|
-
buttonName:
|
|
341
|
+
buttonName: b.name || "cancel",
|
|
342
342
|
timestamp: Date.now()
|
|
343
343
|
}), setTimeout(() => {
|
|
344
|
-
|
|
344
|
+
H("cancelled");
|
|
345
345
|
}, 150);
|
|
346
346
|
break;
|
|
347
347
|
case "reset":
|
|
348
|
-
|
|
348
|
+
oe(), T("reset", {
|
|
349
349
|
formId: h.value,
|
|
350
350
|
action: "reset",
|
|
351
|
-
buttonName:
|
|
351
|
+
buttonName: b.name || "reset",
|
|
352
352
|
timestamp: Date.now()
|
|
353
353
|
});
|
|
354
354
|
break;
|
|
@@ -356,32 +356,32 @@ const da = { class: "artifactuse-card__icon" }, va = ["innerHTML"], fa = { class
|
|
|
356
356
|
default:
|
|
357
357
|
T("button-click", {
|
|
358
358
|
formId: h.value,
|
|
359
|
-
action:
|
|
360
|
-
buttonName:
|
|
361
|
-
buttonLabel:
|
|
359
|
+
action: B,
|
|
360
|
+
buttonName: b.name || b.label,
|
|
361
|
+
buttonLabel: b.label,
|
|
362
362
|
values: { ...x.value },
|
|
363
363
|
timestamp: Date.now()
|
|
364
364
|
}), setTimeout(() => {
|
|
365
|
-
|
|
365
|
+
H("submitted");
|
|
366
366
|
}, 150);
|
|
367
367
|
break;
|
|
368
368
|
}
|
|
369
369
|
}
|
|
370
|
-
return (
|
|
370
|
+
return (b, B) => (s(), l("div", {
|
|
371
371
|
ref_key: "containerRef",
|
|
372
|
-
ref:
|
|
373
|
-
class:
|
|
372
|
+
ref: r,
|
|
373
|
+
class: R([
|
|
374
374
|
"artifactuse-inline-form",
|
|
375
375
|
$.value,
|
|
376
|
-
|
|
376
|
+
O.value
|
|
377
377
|
]),
|
|
378
|
-
"data-artifactuse-theme":
|
|
378
|
+
"data-artifactuse-theme": L.theme
|
|
379
379
|
}, [
|
|
380
|
-
|
|
381
|
-
e("div",
|
|
382
|
-
|
|
380
|
+
n.value ? (s(), l("div", Va, [
|
|
381
|
+
e("div", Ia, [
|
|
382
|
+
f.value === "submitted" ? (s(), l("svg", Fa, [...B[1] || (B[1] = [
|
|
383
383
|
e("polyline", { points: "20 6 9 17 4 12" }, null, -1)
|
|
384
|
-
])])) :
|
|
384
|
+
])])) : f.value === "cancelled" ? (s(), l("svg", Ra, [...B[2] || (B[2] = [
|
|
385
385
|
e("line", {
|
|
386
386
|
x1: "18",
|
|
387
387
|
y1: "6",
|
|
@@ -394,7 +394,7 @@ const da = { class: "artifactuse-card__icon" }, va = ["innerHTML"], fa = { class
|
|
|
394
394
|
x2: "18",
|
|
395
395
|
y2: "18"
|
|
396
396
|
}, null, -1)
|
|
397
|
-
])])) : (
|
|
397
|
+
])])) : (s(), l("svg", qa, [...B[3] || (B[3] = [
|
|
398
398
|
e("line", {
|
|
399
399
|
x1: "5",
|
|
400
400
|
y1: "12",
|
|
@@ -403,216 +403,216 @@ const da = { class: "artifactuse-card__icon" }, va = ["innerHTML"], fa = { class
|
|
|
403
403
|
}, null, -1)
|
|
404
404
|
])]))
|
|
405
405
|
]),
|
|
406
|
-
e("span",
|
|
407
|
-
])) : (
|
|
408
|
-
g.value.title || g.value.description ? (
|
|
409
|
-
g.value.title ? (
|
|
410
|
-
g.value.description ? (
|
|
406
|
+
e("span", Oa, i(I.value), 1)
|
|
407
|
+
])) : (s(), l(V, { key: 1 }, [
|
|
408
|
+
g.value.title || g.value.description ? (s(), l("div", Ua, [
|
|
409
|
+
g.value.title ? (s(), l("div", Da, i(g.value.title), 1)) : v("", !0),
|
|
410
|
+
g.value.description ? (s(), l("p", ja, i(g.value.description), 1)) : v("", !0)
|
|
411
411
|
])) : v("", !0),
|
|
412
|
-
g.value.variant === "buttons" ? (
|
|
413
|
-
(
|
|
414
|
-
key:
|
|
412
|
+
g.value.variant === "buttons" ? (s(), l("div", Na, [
|
|
413
|
+
(s(!0), l(V, null, fe(ee.value, (u) => (s(), l("button", {
|
|
414
|
+
key: u.name || u.label,
|
|
415
415
|
type: "button",
|
|
416
|
-
class:
|
|
417
|
-
disabled:
|
|
418
|
-
onClick: (
|
|
416
|
+
class: R(["artifactuse-form-btn", `artifactuse-form-btn-${u.variant || "secondary"}`]),
|
|
417
|
+
disabled: u.disabled || D.value,
|
|
418
|
+
onClick: (z) => X(u)
|
|
419
419
|
}, [
|
|
420
|
-
|
|
420
|
+
u.icon ? (s(), l("span", {
|
|
421
421
|
key: 0,
|
|
422
422
|
class: "artifactuse-form-btn-icon",
|
|
423
|
-
innerHTML:
|
|
424
|
-
}, null, 8,
|
|
425
|
-
|
|
426
|
-
], 10,
|
|
427
|
-
])) : (
|
|
423
|
+
innerHTML: u.icon
|
|
424
|
+
}, null, 8, Ja)) : v("", !0),
|
|
425
|
+
G(" " + i(u.label), 1)
|
|
426
|
+
], 10, Wa))), 128))
|
|
427
|
+
])) : (s(), l("form", {
|
|
428
428
|
key: 2,
|
|
429
429
|
class: "artifactuse-form",
|
|
430
|
-
onSubmit:
|
|
430
|
+
onSubmit: me(W, ["prevent"])
|
|
431
431
|
}, [
|
|
432
|
-
e("div",
|
|
433
|
-
(
|
|
434
|
-
key:
|
|
432
|
+
e("div", Xa, [
|
|
433
|
+
(s(!0), l(V, null, fe(J.value, (u, z) => (s(), l(V, {
|
|
434
|
+
key: u.name || z
|
|
435
435
|
}, [
|
|
436
|
-
|
|
437
|
-
(
|
|
438
|
-
key:
|
|
439
|
-
type:
|
|
440
|
-
class:
|
|
441
|
-
disabled:
|
|
442
|
-
onClick: (
|
|
436
|
+
u.type === "buttons" ? (s(), l("div", Za, [
|
|
437
|
+
(s(!0), l(V, null, fe(u.fields || [], (o) => (s(), l("button", {
|
|
438
|
+
key: o.name || o.label,
|
|
439
|
+
type: o.action === "submit" ? "submit" : "button",
|
|
440
|
+
class: R(["artifactuse-form-btn", `artifactuse-form-btn-${o.variant || "secondary"}`]),
|
|
441
|
+
disabled: o.disabled || o.action === "submit" && D.value,
|
|
442
|
+
onClick: (P) => o.action !== "submit" ? X(o) : null
|
|
443
443
|
}, [
|
|
444
|
-
|
|
444
|
+
D.value && o.action === "submit" ? (s(), l("span", Ya)) : o.icon ? (s(), l("span", {
|
|
445
445
|
key: 1,
|
|
446
446
|
class: "artifactuse-form-btn-icon",
|
|
447
|
-
innerHTML:
|
|
448
|
-
}, null, 8,
|
|
449
|
-
|
|
450
|
-
], 10,
|
|
451
|
-
])) :
|
|
452
|
-
e("label",
|
|
447
|
+
innerHTML: o.icon
|
|
448
|
+
}, null, 8, Ga)) : v("", !0),
|
|
449
|
+
G(" " + i(D.value && o.action === "submit" ? "Submitting..." : o.label), 1)
|
|
450
|
+
], 10, Ka))), 128))
|
|
451
|
+
])) : u.type === "divider" ? (s(), l("div", Qa)) : u.type === "heading" ? (s(), l("div", es, i(u.label), 1)) : u.type === "checkbox" ? (s(), l("div", ts, [
|
|
452
|
+
e("label", as, [
|
|
453
453
|
e("input", {
|
|
454
454
|
type: "checkbox",
|
|
455
|
-
checked: x.value[
|
|
456
|
-
disabled:
|
|
455
|
+
checked: x.value[u.name],
|
|
456
|
+
disabled: u.disabled,
|
|
457
457
|
class: "artifactuse-checkbox",
|
|
458
|
-
onChange: (
|
|
459
|
-
}, null, 40,
|
|
460
|
-
e("span",
|
|
461
|
-
|
|
462
|
-
|
|
458
|
+
onChange: (o) => w(u.name, o.target.checked)
|
|
459
|
+
}, null, 40, ss),
|
|
460
|
+
e("span", ls, [
|
|
461
|
+
G(i(u.label) + " ", 1),
|
|
462
|
+
u.required ? (s(), l("span", is, "*")) : v("", !0)
|
|
463
463
|
])
|
|
464
464
|
]),
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
])) : (
|
|
465
|
+
u.helpText ? (s(), l("span", ns, i(u.helpText), 1)) : v("", !0),
|
|
466
|
+
N.value[u.name] ? (s(), l("span", os, i(N.value[u.name]), 1)) : v("", !0)
|
|
467
|
+
])) : (s(), l("div", rs, [
|
|
468
468
|
e("label", {
|
|
469
|
-
for: `${h.value}-${
|
|
469
|
+
for: `${h.value}-${u.name}`,
|
|
470
470
|
class: "artifactuse-label"
|
|
471
471
|
}, [
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
], 8,
|
|
475
|
-
|
|
472
|
+
G(i(u.label) + " ", 1),
|
|
473
|
+
u.required ? (s(), l("span", us, "*")) : v("", !0)
|
|
474
|
+
], 8, cs),
|
|
475
|
+
pe(u.type) ? (s(), l("input", {
|
|
476
476
|
key: 0,
|
|
477
|
-
id: `${h.value}-${
|
|
478
|
-
type:
|
|
479
|
-
value: x.value[
|
|
480
|
-
placeholder:
|
|
481
|
-
disabled:
|
|
482
|
-
required:
|
|
477
|
+
id: `${h.value}-${u.name}`,
|
|
478
|
+
type: u.type,
|
|
479
|
+
value: x.value[u.name],
|
|
480
|
+
placeholder: u.placeholder,
|
|
481
|
+
disabled: u.disabled,
|
|
482
|
+
required: u.required,
|
|
483
483
|
class: "artifactuse-input",
|
|
484
|
-
onInput: (
|
|
485
|
-
}, null, 40,
|
|
484
|
+
onInput: (o) => w(u.name, o.target.value)
|
|
485
|
+
}, null, 40, ds)) : u.type === "textarea" ? (s(), l("textarea", {
|
|
486
486
|
key: 1,
|
|
487
|
-
id: `${h.value}-${
|
|
488
|
-
value: x.value[
|
|
489
|
-
placeholder:
|
|
490
|
-
disabled:
|
|
491
|
-
required:
|
|
492
|
-
rows:
|
|
487
|
+
id: `${h.value}-${u.name}`,
|
|
488
|
+
value: x.value[u.name],
|
|
489
|
+
placeholder: u.placeholder,
|
|
490
|
+
disabled: u.disabled,
|
|
491
|
+
required: u.required,
|
|
492
|
+
rows: u.rows || 3,
|
|
493
493
|
class: "artifactuse-textarea",
|
|
494
|
-
onInput: (
|
|
495
|
-
}, null, 40,
|
|
494
|
+
onInput: (o) => w(u.name, o.target.value)
|
|
495
|
+
}, null, 40, vs)) : u.type === "select" ? (s(), l("select", {
|
|
496
496
|
key: 2,
|
|
497
|
-
id: `${h.value}-${
|
|
498
|
-
value: x.value[
|
|
499
|
-
disabled:
|
|
500
|
-
required:
|
|
497
|
+
id: `${h.value}-${u.name}`,
|
|
498
|
+
value: x.value[u.name],
|
|
499
|
+
disabled: u.disabled,
|
|
500
|
+
required: u.required,
|
|
501
501
|
class: "artifactuse-select",
|
|
502
|
-
onChange: (
|
|
502
|
+
onChange: (o) => w(u.name, o.target.value)
|
|
503
503
|
}, [
|
|
504
|
-
e("option",
|
|
505
|
-
(
|
|
506
|
-
key:
|
|
507
|
-
value:
|
|
508
|
-
disabled:
|
|
509
|
-
},
|
|
510
|
-
], 40,
|
|
511
|
-
(
|
|
512
|
-
key:
|
|
504
|
+
e("option", ps, i(u.placeholder || "Select..."), 1),
|
|
505
|
+
(s(!0), l(V, null, fe(m(u.options), (o) => (s(), l("option", {
|
|
506
|
+
key: o.value,
|
|
507
|
+
value: o.value,
|
|
508
|
+
disabled: o.disabled
|
|
509
|
+
}, i(o.label), 9, _s))), 128))
|
|
510
|
+
], 40, fs)) : u.type === "radio" ? (s(), l("div", hs, [
|
|
511
|
+
(s(!0), l(V, null, fe(m(u.options), (o) => (s(), l("label", {
|
|
512
|
+
key: o.value,
|
|
513
513
|
class: "artifactuse-radio-label"
|
|
514
514
|
}, [
|
|
515
515
|
e("input", {
|
|
516
516
|
type: "radio",
|
|
517
|
-
name:
|
|
518
|
-
value:
|
|
519
|
-
checked: x.value[
|
|
520
|
-
disabled:
|
|
517
|
+
name: u.name,
|
|
518
|
+
value: o.value,
|
|
519
|
+
checked: x.value[u.name] === o.value,
|
|
520
|
+
disabled: o.disabled || u.disabled,
|
|
521
521
|
class: "artifactuse-radio",
|
|
522
|
-
onChange: (
|
|
523
|
-
}, null, 40,
|
|
524
|
-
e("span", null,
|
|
522
|
+
onChange: (P) => w(u.name, o.value)
|
|
523
|
+
}, null, 40, ms),
|
|
524
|
+
e("span", null, i(o.label), 1)
|
|
525
525
|
]))), 128))
|
|
526
526
|
])) : v("", !0),
|
|
527
|
-
|
|
528
|
-
|
|
527
|
+
u.helpText ? (s(), l("span", ys, i(u.helpText), 1)) : v("", !0),
|
|
528
|
+
N.value[u.name] ? (s(), l("span", gs, i(N.value[u.name]), 1)) : v("", !0)
|
|
529
529
|
]))
|
|
530
530
|
], 64))), 128))
|
|
531
531
|
]),
|
|
532
|
-
|
|
532
|
+
S.value ? v("", !0) : (s(), l("div", ks, [
|
|
533
533
|
e("button", {
|
|
534
534
|
type: "button",
|
|
535
535
|
class: "artifactuse-form-btn artifactuse-form-btn-ghost",
|
|
536
|
-
onClick:
|
|
536
|
+
onClick: B[0] || (B[0] = (u) => X({ action: "cancel", label: "Cancel" }))
|
|
537
537
|
}, " Cancel "),
|
|
538
538
|
e("button", {
|
|
539
539
|
type: "submit",
|
|
540
540
|
class: "artifactuse-form-btn artifactuse-form-btn-primary",
|
|
541
|
-
disabled:
|
|
541
|
+
disabled: D.value
|
|
542
542
|
}, [
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
], 8,
|
|
543
|
+
D.value ? (s(), l("span", bs)) : v("", !0),
|
|
544
|
+
G(" " + i(D.value ? "Submitting..." : "Submit"), 1)
|
|
545
|
+
], 8, ws)
|
|
546
546
|
]))
|
|
547
547
|
], 32))
|
|
548
548
|
], 64))
|
|
549
|
-
], 10,
|
|
549
|
+
], 10, za));
|
|
550
550
|
}
|
|
551
|
-
},
|
|
551
|
+
}, xs = ["data-artifactuse-theme"], $s = { class: "artifactuse-social-header" }, Ms = ["src", "alt"], Ts = { class: "artifactuse-social-author" }, Ls = { class: "artifactuse-social-author-name" }, Ps = { class: "artifactuse-social-author-meta" }, Es = { class: "artifactuse-social-author-handle" }, As = { class: "artifactuse-social-timestamp" }, Hs = { class: "artifactuse-social-content" }, Bs = ["innerHTML"], Ss = {
|
|
552
552
|
key: 0,
|
|
553
553
|
class: "artifactuse-social-media"
|
|
554
|
-
},
|
|
554
|
+
}, zs = ["data-count"], Vs = ["src", "alt"], Is = {
|
|
555
555
|
key: 1,
|
|
556
556
|
class: "artifactuse-social-link-card"
|
|
557
|
-
},
|
|
557
|
+
}, Fs = ["src", "alt"], Rs = { class: "artifactuse-social-link-info" }, qs = { class: "artifactuse-social-link-domain" }, Os = { class: "artifactuse-social-link-title" }, Us = {
|
|
558
558
|
key: 0,
|
|
559
559
|
class: "artifactuse-social-link-description"
|
|
560
|
-
},
|
|
560
|
+
}, Ds = {
|
|
561
561
|
key: 2,
|
|
562
562
|
class: "artifactuse-social-poll"
|
|
563
|
-
},
|
|
563
|
+
}, js = { class: "artifactuse-social-poll-label" }, Ns = { class: "artifactuse-social-poll-label-percent" }, Ws = { class: "artifactuse-social-poll-meta" }, Js = {
|
|
564
564
|
key: 3,
|
|
565
565
|
class: "artifactuse-social-quote"
|
|
566
|
-
},
|
|
566
|
+
}, Xs = { class: "artifactuse-social-quote-header" }, Zs = ["src"], Ks = { class: "artifactuse-social-quote-author" }, Ys = { class: "artifactuse-social-quote-handle" }, Gs = { class: "artifactuse-social-quote-text" }, Qs = {
|
|
567
567
|
key: 0,
|
|
568
568
|
class: "artifactuse-social-engagement"
|
|
569
|
-
},
|
|
569
|
+
}, el = { class: "artifactuse-social-stat" }, tl = { class: "artifactuse-social-stat" }, al = { class: "artifactuse-social-stat" }, sl = { class: "artifactuse-social-stat" }, ll = { class: "artifactuse-social-header" }, il = ["src", "alt"], nl = { class: "artifactuse-social-author-info" }, ol = { class: "artifactuse-social-author-name" }, rl = {
|
|
570
570
|
key: 0,
|
|
571
571
|
class: "artifactuse-social-author-connection"
|
|
572
|
-
},
|
|
572
|
+
}, cl = { class: "artifactuse-social-author-headline" }, ul = { class: "artifactuse-social-timestamp" }, dl = { class: "artifactuse-social-content" }, vl = ["innerHTML"], fl = {
|
|
573
573
|
key: 0,
|
|
574
574
|
class: "artifactuse-social-link-card"
|
|
575
|
-
},
|
|
575
|
+
}, pl = ["src", "alt"], _l = { class: "artifactuse-social-link-info" }, hl = { class: "artifactuse-social-link-title" }, ml = { class: "artifactuse-social-link-domain" }, yl = {
|
|
576
576
|
key: 0,
|
|
577
577
|
class: "artifactuse-social-engagement"
|
|
578
|
-
},
|
|
578
|
+
}, gl = { class: "artifactuse-social-reactions" }, kl = { class: "artifactuse-social-header" }, wl = ["src", "alt"], bl = { class: "artifactuse-social-author-name" }, Cl = {
|
|
579
579
|
key: 0,
|
|
580
580
|
class: "artifactuse-social-verified",
|
|
581
581
|
viewBox: "0 0 24 24",
|
|
582
582
|
fill: "currentColor"
|
|
583
|
-
},
|
|
583
|
+
}, xl = {
|
|
584
584
|
key: 0,
|
|
585
585
|
class: "artifactuse-social-media"
|
|
586
|
-
},
|
|
586
|
+
}, $l = ["src", "alt"], Ml = { class: "artifactuse-social-likes" }, Tl = { class: "artifactuse-social-caption" }, Ll = { class: "artifactuse-social-caption-author" }, Pl = ["innerHTML"], El = { class: "artifactuse-social-timestamp" }, Al = { class: "artifactuse-social-header" }, Hl = ["src", "alt"], Bl = { class: "artifactuse-social-author-info" }, Sl = { class: "artifactuse-social-author-name" }, zl = { class: "artifactuse-social-timestamp" }, Vl = { class: "artifactuse-social-content" }, Il = ["innerHTML"], Fl = {
|
|
587
587
|
key: 0,
|
|
588
588
|
class: "artifactuse-social-link-card"
|
|
589
|
-
},
|
|
589
|
+
}, Rl = ["src", "alt"], ql = { class: "artifactuse-social-link-info" }, Ol = { class: "artifactuse-social-link-domain" }, Ul = { class: "artifactuse-social-link-title" }, Dl = {
|
|
590
590
|
key: 0,
|
|
591
591
|
class: "artifactuse-social-link-description"
|
|
592
|
-
},
|
|
592
|
+
}, jl = {
|
|
593
593
|
key: 0,
|
|
594
594
|
class: "artifactuse-social-engagement"
|
|
595
|
-
},
|
|
595
|
+
}, Nl = { class: "artifactuse-social-reactions" }, Wl = { class: "artifactuse-social-reaction-count" }, Jl = { class: "artifactuse-social-comments-shares" }, Xl = { class: "artifactuse-social-header" }, Zl = ["src", "alt"], Kl = { class: "artifactuse-social-author-info" }, Yl = { class: "artifactuse-social-author-name" }, Gl = {
|
|
596
596
|
key: 0,
|
|
597
597
|
class: "artifactuse-social-verified",
|
|
598
598
|
viewBox: "0 0 24 24",
|
|
599
599
|
fill: "currentColor"
|
|
600
|
-
},
|
|
600
|
+
}, Ql = { class: "artifactuse-social-timestamp" }, ei = { class: "artifactuse-social-content" }, ti = ["innerHTML"], ai = {
|
|
601
601
|
key: 0,
|
|
602
602
|
class: "artifactuse-social-engagement"
|
|
603
|
-
},
|
|
603
|
+
}, si = { class: "artifactuse-social-stat" }, li = { class: "artifactuse-social-stat" }, ii = { class: "artifactuse-social-stat" }, ni = { class: "artifactuse-social-thumbnail" }, oi = ["src", "alt"], ri = {
|
|
604
604
|
key: 1,
|
|
605
605
|
class: "artifactuse-social-duration"
|
|
606
|
-
},
|
|
606
|
+
}, ci = { class: "artifactuse-social-info" }, ui = { class: "artifactuse-social-header" }, di = ["src", "alt"], vi = { class: "artifactuse-social-author-name" }, fi = ["innerHTML"], pi = {
|
|
607
607
|
key: 0,
|
|
608
608
|
class: "artifactuse-social-sound"
|
|
609
|
-
},
|
|
609
|
+
}, _i = {
|
|
610
610
|
key: 1,
|
|
611
611
|
class: "artifactuse-social-engagement"
|
|
612
|
-
},
|
|
612
|
+
}, hi = { class: "artifactuse-social-thumbnail" }, mi = ["src", "alt"], yi = {
|
|
613
613
|
key: 1,
|
|
614
614
|
class: "artifactuse-social-duration"
|
|
615
|
-
},
|
|
615
|
+
}, gi = { class: "artifactuse-social-info" }, ki = ["src", "alt"], wi = { class: "artifactuse-social-title" }, bi = { class: "artifactuse-social-channel" }, Ci = { class: "artifactuse-social-meta" }, xi = { class: "artifactuse-social-actions-bar" }, $i = { class: "artifactuse-social-platform-badge" }, ke = 'data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="%23888"><circle cx="12" cy="8" r="4"/><path d="M12 14c-6 0-8 3-8 6v2h16v-2c0-3-2-6-8-6z"/></svg>', Mi = {
|
|
616
616
|
__name: "ArtifactuseSocialPreview",
|
|
617
617
|
props: {
|
|
618
618
|
artifact: {
|
|
@@ -625,37 +625,37 @@ const da = { class: "artifactuse-card__icon" }, va = ["innerHTML"], fa = { class
|
|
|
625
625
|
}
|
|
626
626
|
},
|
|
627
627
|
emits: ["copy", "edit"],
|
|
628
|
-
setup(
|
|
629
|
-
const
|
|
628
|
+
setup(L, { emit: d }) {
|
|
629
|
+
const _ = L, T = d, f = M(null), n = M("Copy"), O = k(() => {
|
|
630
630
|
try {
|
|
631
|
-
return JSON.parse(
|
|
631
|
+
return JSON.parse(_.artifact.code);
|
|
632
632
|
} catch {
|
|
633
633
|
return { platform: "twitter", data: {} };
|
|
634
634
|
}
|
|
635
|
-
}),
|
|
635
|
+
}), H = k(() => {
|
|
636
636
|
var m;
|
|
637
|
-
return ((m =
|
|
637
|
+
return ((m = O.value) == null ? void 0 : m.platform) || "twitter";
|
|
638
638
|
});
|
|
639
|
-
|
|
639
|
+
k(() => {
|
|
640
640
|
var m;
|
|
641
|
-
return ((m =
|
|
641
|
+
return ((m = O.value) == null ? void 0 : m.variant) || "post";
|
|
642
642
|
});
|
|
643
|
-
const g =
|
|
644
|
-
var m,
|
|
645
|
-
return ((
|
|
646
|
-
}),
|
|
647
|
-
var m,
|
|
648
|
-
return ((
|
|
649
|
-
}), h =
|
|
650
|
-
var m,
|
|
651
|
-
return ((
|
|
652
|
-
}), $ =
|
|
653
|
-
var m,
|
|
654
|
-
return ((
|
|
655
|
-
}),
|
|
643
|
+
const g = k(() => {
|
|
644
|
+
var m, w;
|
|
645
|
+
return ((w = (m = O.value) == null ? void 0 : m.data) == null ? void 0 : w.author) || {};
|
|
646
|
+
}), r = k(() => {
|
|
647
|
+
var m, w;
|
|
648
|
+
return ((w = (m = O.value) == null ? void 0 : m.data) == null ? void 0 : w.content) || {};
|
|
649
|
+
}), h = k(() => {
|
|
650
|
+
var m, w;
|
|
651
|
+
return ((w = (m = O.value) == null ? void 0 : m.data) == null ? void 0 : w.engagement) || {};
|
|
652
|
+
}), $ = k(() => {
|
|
653
|
+
var m, w;
|
|
654
|
+
return ((w = (m = O.value) == null ? void 0 : m.data) == null ? void 0 : w.meta) || {};
|
|
655
|
+
}), I = k(() => {
|
|
656
656
|
const m = h.value;
|
|
657
657
|
return m.likes || m.comments || m.shares || m.retweets || m.replies || m.views;
|
|
658
|
-
}), x =
|
|
658
|
+
}), x = k(() => `artifactuse-social-verified-${g.value.verifiedType || "blue"}`), N = k(() => ({
|
|
659
659
|
twitter: "X",
|
|
660
660
|
linkedin: "LinkedIn",
|
|
661
661
|
instagram: "Instagram",
|
|
@@ -663,45 +663,45 @@ const da = { class: "artifactuse-card__icon" }, va = ["innerHTML"], fa = { class
|
|
|
663
663
|
threads: "Threads",
|
|
664
664
|
tiktok: "TikTok",
|
|
665
665
|
youtube: "YouTube"
|
|
666
|
-
})[
|
|
666
|
+
})[H.value] || H.value), D = k(() => {
|
|
667
667
|
const m = {
|
|
668
|
-
twitter: () =>
|
|
669
|
-
|
|
668
|
+
twitter: () => re("svg", { viewBox: "0 0 24 24", fill: "currentColor" }, [
|
|
669
|
+
re("path", { d: "M18.244 2.25h3.308l-7.227 8.26 8.502 11.24H16.17l-5.214-6.817L4.99 21.75H1.68l7.73-8.835L1.254 2.25H8.08l4.713 6.231zm-1.161 17.52h1.833L7.084 4.126H5.117z" })
|
|
670
670
|
]),
|
|
671
|
-
linkedin: () =>
|
|
672
|
-
|
|
671
|
+
linkedin: () => re("svg", { viewBox: "0 0 24 24", fill: "currentColor" }, [
|
|
672
|
+
re("path", { d: "M20.447 20.452h-3.554v-5.569c0-1.328-.027-3.037-1.852-3.037-1.853 0-2.136 1.445-2.136 2.939v5.667H9.351V9h3.414v1.561h.046c.477-.9 1.637-1.85 3.37-1.85 3.601 0 4.267 2.37 4.267 5.455v6.286zM5.337 7.433c-1.144 0-2.063-.926-2.063-2.065 0-1.138.92-2.063 2.063-2.063 1.14 0 2.064.925 2.064 2.063 0 1.139-.925 2.065-2.064 2.065zm1.782 13.019H3.555V9h3.564v11.452zM22.225 0H1.771C.792 0 0 .774 0 1.729v20.542C0 23.227.792 24 1.771 24h20.451C23.2 24 24 23.227 24 22.271V1.729C24 .774 23.2 0 22.222 0h.003z" })
|
|
673
673
|
]),
|
|
674
|
-
instagram: () =>
|
|
675
|
-
|
|
674
|
+
instagram: () => re("svg", { viewBox: "0 0 24 24", fill: "currentColor" }, [
|
|
675
|
+
re("path", { d: "M12 2.163c3.204 0 3.584.012 4.85.07 3.252.148 4.771 1.691 4.919 4.919.058 1.265.069 1.645.069 4.849 0 3.205-.012 3.584-.069 4.849-.149 3.225-1.664 4.771-4.919 4.919-1.266.058-1.644.07-4.85.07-3.204 0-3.584-.012-4.849-.07-3.26-.149-4.771-1.699-4.919-4.92-.058-1.265-.07-1.644-.07-4.849 0-3.204.013-3.583.07-4.849.149-3.227 1.664-4.771 4.919-4.919 1.266-.057 1.645-.069 4.849-.069zM12 0C8.741 0 8.333.014 7.053.072 2.695.272.273 2.69.073 7.052.014 8.333 0 8.741 0 12c0 3.259.014 3.668.072 4.948.2 4.358 2.618 6.78 6.98 6.98C8.333 23.986 8.741 24 12 24c3.259 0 3.668-.014 4.948-.072 4.354-.2 6.782-2.618 6.979-6.98.059-1.28.073-1.689.073-4.948 0-3.259-.014-3.667-.072-4.947-.196-4.354-2.617-6.78-6.979-6.98C15.668.014 15.259 0 12 0zm0 5.838a6.162 6.162 0 100 12.324 6.162 6.162 0 000-12.324zM12 16a4 4 0 110-8 4 4 0 010 8zm6.406-11.845a1.44 1.44 0 100 2.881 1.44 1.44 0 000-2.881z" })
|
|
676
676
|
]),
|
|
677
|
-
facebook: () =>
|
|
678
|
-
|
|
677
|
+
facebook: () => re("svg", { viewBox: "0 0 24 24", fill: "currentColor" }, [
|
|
678
|
+
re("path", { d: "M24 12.073c0-6.627-5.373-12-12-12s-12 5.373-12 12c0 5.99 4.388 10.954 10.125 11.854v-8.385H7.078v-3.47h3.047V9.43c0-3.007 1.792-4.669 4.533-4.669 1.312 0 2.686.235 2.686.235v2.953H15.83c-1.491 0-1.956.925-1.956 1.874v2.25h3.328l-.532 3.47h-2.796v8.385C19.612 23.027 24 18.062 24 12.073z" })
|
|
679
679
|
]),
|
|
680
|
-
threads: () =>
|
|
681
|
-
|
|
680
|
+
threads: () => re("svg", { viewBox: "0 0 24 24", fill: "currentColor" }, [
|
|
681
|
+
re("path", { d: "M12.186 24h-.007c-3.581-.024-6.334-1.205-8.184-3.509C2.35 18.44 1.5 15.586 1.472 12.01v-.017c.03-3.579.879-6.43 2.525-8.482C5.845 1.205 8.6.024 12.18 0h.014c2.746.02 5.043.725 6.826 2.098 1.677 1.29 2.858 3.13 3.509 5.467l-2.04.569c-1.104-3.96-3.898-5.984-8.304-6.015-2.91.022-5.11.936-6.54 2.717C4.307 6.504 3.616 8.914 3.59 12c.025 3.086.718 5.496 2.057 7.164 1.43 1.783 3.631 2.698 6.54 2.717 2.623-.02 4.358-.631 5.8-2.045 1.647-1.613 1.618-3.593 1.09-4.798-.31-.71-.873-1.3-1.634-1.75-.192 1.352-.622 2.446-1.284 3.272-.886 1.102-2.14 1.704-3.73 1.79-1.202.065-2.361-.218-3.259-.801-1.063-.689-1.685-1.74-1.752-2.96-.065-1.182.408-2.256 1.33-3.022.88-.73 2.108-1.152 3.457-1.187 1.357-.035 2.573.283 3.58.89.034-.497.04-1.017.015-1.558-.083-1.792-.648-3.095-1.68-3.876-.99-.75-2.453-1.123-4.35-1.108-.987.008-1.866.09-2.613.246l-.464-2.086c.912-.19 1.965-.29 3.133-.298 2.467-.02 4.42.554 5.807 1.706 1.46 1.213 2.24 3.007 2.354 5.411.039.827.026 1.69-.04 2.576.962.681 1.735 1.542 2.268 2.553.846 1.6 1.026 3.639.508 5.622-.57 2.181-1.782 3.94-3.503 5.079C17.194 23.394 14.88 24 12.186 24zM9.15 13.476c-.927.037-1.628.282-2.085.728-.418.408-.618.945-.578 1.553.04.638.347 1.165.866 1.483.586.36 1.39.521 2.266.45 1.053-.085 1.86-.473 2.4-1.153.457-.576.763-1.39.884-2.356-.893-.41-1.944-.636-3.095-.705h-.009c-.216-.008-.436-.008-.65 0z" })
|
|
682
682
|
]),
|
|
683
|
-
tiktok: () =>
|
|
684
|
-
|
|
683
|
+
tiktok: () => re("svg", { viewBox: "0 0 24 24", fill: "currentColor" }, [
|
|
684
|
+
re("path", { d: "M12.525.02c1.31-.02 2.61-.01 3.91-.02.08 1.53.63 3.09 1.75 4.17 1.12 1.11 2.7 1.62 4.24 1.79v4.03c-1.44-.05-2.89-.35-4.2-.97-.57-.26-1.1-.59-1.62-.93-.01 2.92.01 5.84-.02 8.75-.08 1.4-.54 2.79-1.35 3.94-1.31 1.92-3.58 3.17-5.91 3.21-1.43.08-2.86-.31-4.08-1.03-2.02-1.19-3.44-3.37-3.65-5.71-.02-.5-.03-1-.01-1.49.18-1.9 1.12-3.72 2.58-4.96 1.66-1.44 3.98-2.13 6.15-1.72.02 1.48-.04 2.96-.04 4.44-.99-.32-2.15-.23-3.02.37-.63.41-1.11 1.04-1.36 1.75-.21.51-.15 1.07-.14 1.61.24 1.64 1.82 3.02 3.5 2.87 1.12-.01 2.19-.66 2.77-1.61.19-.33.4-.67.41-1.06.1-1.79.06-3.57.07-5.36.01-4.03-.01-8.05.02-12.07z" })
|
|
685
685
|
]),
|
|
686
|
-
youtube: () =>
|
|
687
|
-
|
|
686
|
+
youtube: () => re("svg", { viewBox: "0 0 24 24", fill: "currentColor" }, [
|
|
687
|
+
re("path", { d: "M23.498 6.186a3.016 3.016 0 0 0-2.122-2.136C19.505 3.545 12 3.545 12 3.545s-7.505 0-9.377.505A3.017 3.017 0 0 0 .502 6.186C0 8.07 0 12 0 12s0 3.93.502 5.814a3.016 3.016 0 0 0 2.122 2.136c1.871.505 9.376.505 9.376.505s7.505 0 9.377-.505a3.015 3.015 0 0 0 2.122-2.136C24 15.93 24 12 24 12s0-3.93-.502-5.814zM9.545 15.568V8.432L15.818 12l-6.273 3.568z" })
|
|
688
688
|
])
|
|
689
689
|
};
|
|
690
|
-
return m[
|
|
691
|
-
}),
|
|
692
|
-
let m =
|
|
690
|
+
return m[H.value] || m.twitter;
|
|
691
|
+
}), J = k(() => {
|
|
692
|
+
let m = r.value.text || "";
|
|
693
693
|
return m = m.replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">"), m = m.replace(/#(\w+)/g, '<span class="artifactuse-social-hashtag">#$1</span>'), m = m.replace(/@(\w+)/g, '<span class="artifactuse-social-mention">@$1</span>'), m = m.replace(
|
|
694
694
|
/(https?:\/\/[^\s]+)/g,
|
|
695
695
|
'<a href="$1" target="_blank" rel="noopener">$1</a>'
|
|
696
696
|
), m;
|
|
697
|
-
}), ee =
|
|
697
|
+
}), ee = k(() => {
|
|
698
698
|
const m = h.value.reactions || {};
|
|
699
|
-
return Object.values(m).reduce((
|
|
699
|
+
return Object.values(m).reduce((w, ie) => w + (ie || 0), 0) || h.value.likes || 0;
|
|
700
700
|
});
|
|
701
|
-
function
|
|
701
|
+
function S(m) {
|
|
702
702
|
return m ? m >= 1e6 ? `${(m / 1e6).toFixed(1)}M` : m >= 1e3 ? `${(m / 1e3).toFixed(1)}K` : m.toString() : "0";
|
|
703
703
|
}
|
|
704
|
-
function
|
|
704
|
+
function ce(m) {
|
|
705
705
|
try {
|
|
706
706
|
return new URL(m).hostname.replace("www.", "");
|
|
707
707
|
} catch {
|
|
@@ -709,82 +709,82 @@ const da = { class: "artifactuse-card__icon" }, va = ["innerHTML"], fa = { class
|
|
|
709
709
|
}
|
|
710
710
|
}
|
|
711
711
|
function K(m) {
|
|
712
|
-
m.target.src =
|
|
712
|
+
m.target.src = ke;
|
|
713
713
|
}
|
|
714
714
|
function Z(m) {
|
|
715
715
|
m.target.style.display = "none";
|
|
716
716
|
}
|
|
717
|
-
function
|
|
718
|
-
const m =
|
|
717
|
+
function pe() {
|
|
718
|
+
const m = r.value.text || "";
|
|
719
719
|
navigator.clipboard.writeText(m).then(() => {
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
}, 2e3), T("copy", { platform:
|
|
720
|
+
n.value = "Copied!", setTimeout(() => {
|
|
721
|
+
n.value = "Copy";
|
|
722
|
+
}, 2e3), T("copy", { platform: H.value, text: m });
|
|
723
723
|
});
|
|
724
724
|
}
|
|
725
|
-
return (m,
|
|
726
|
-
var
|
|
727
|
-
return
|
|
725
|
+
return (m, w) => {
|
|
726
|
+
var ie, oe, W, X, b, B;
|
|
727
|
+
return s(), l("div", {
|
|
728
728
|
ref_key: "containerRef",
|
|
729
|
-
ref:
|
|
730
|
-
class:
|
|
731
|
-
"data-artifactuse-theme":
|
|
729
|
+
ref: f,
|
|
730
|
+
class: R(["artifactuse-social", [`artifactuse-social-${H.value}`]]),
|
|
731
|
+
"data-artifactuse-theme": L.theme
|
|
732
732
|
}, [
|
|
733
|
-
|
|
734
|
-
e("div",
|
|
733
|
+
H.value === "twitter" ? (s(), l(V, { key: 0 }, [
|
|
734
|
+
e("div", $s, [
|
|
735
735
|
e("img", {
|
|
736
|
-
src: g.value.avatar ||
|
|
736
|
+
src: g.value.avatar || ke,
|
|
737
737
|
alt: g.value.name,
|
|
738
738
|
class: "artifactuse-social-avatar",
|
|
739
739
|
onError: K
|
|
740
|
-
}, null, 40,
|
|
741
|
-
e("div",
|
|
742
|
-
e("div",
|
|
743
|
-
e("span", null,
|
|
744
|
-
g.value.verified ? (
|
|
740
|
+
}, null, 40, Ms),
|
|
741
|
+
e("div", Ts, [
|
|
742
|
+
e("div", Ls, [
|
|
743
|
+
e("span", null, i(g.value.name), 1),
|
|
744
|
+
g.value.verified ? (s(), l("svg", {
|
|
745
745
|
key: 0,
|
|
746
|
-
class:
|
|
746
|
+
class: R(["artifactuse-social-verified", x.value]),
|
|
747
747
|
viewBox: "0 0 24 24",
|
|
748
748
|
fill: "currentColor"
|
|
749
|
-
}, [...
|
|
749
|
+
}, [...w[0] || (w[0] = [
|
|
750
750
|
e("path", { d: "M22.25 12c0-1.43-.88-2.67-2.19-3.34.46-1.39.2-2.9-.81-3.91s-2.52-1.27-3.91-.81c-.66-1.31-1.91-2.19-3.34-2.19s-2.67.88-3.34 2.19c-1.39-.46-2.9-.2-3.91.81s-1.27 2.52-.81 3.91C2.63 9.33 1.75 10.57 1.75 12s.88 2.67 2.19 3.34c-.46 1.39-.2 2.9.81 3.91s2.52 1.27 3.91.81c.66 1.31 1.91 2.19 3.34 2.19s2.67-.88 3.34-2.19c1.39.46 2.9.2 3.91-.81s1.27-2.52.81-3.91c1.31-.67 2.19-1.91 2.19-3.34zm-11.71 4.2L6.8 12.46l1.41-1.42 2.26 2.26 4.8-5.23 1.47 1.36-6.2 6.77z" }, null, -1)
|
|
751
751
|
])], 2)) : v("", !0)
|
|
752
752
|
]),
|
|
753
|
-
e("div",
|
|
754
|
-
e("span",
|
|
755
|
-
e("span",
|
|
753
|
+
e("div", Ps, [
|
|
754
|
+
e("span", Es, i(g.value.handle), 1),
|
|
755
|
+
e("span", As, "· " + i($.value.timestamp || "Just now"), 1)
|
|
756
756
|
])
|
|
757
757
|
])
|
|
758
758
|
]),
|
|
759
|
-
e("div",
|
|
759
|
+
e("div", Hs, [
|
|
760
760
|
e("p", {
|
|
761
761
|
class: "artifactuse-social-text",
|
|
762
|
-
innerHTML:
|
|
763
|
-
}, null, 8,
|
|
764
|
-
(
|
|
762
|
+
innerHTML: J.value
|
|
763
|
+
}, null, 8, Bs),
|
|
764
|
+
(ie = r.value.media) != null && ie.length ? (s(), l("div", Ss, [
|
|
765
765
|
e("div", {
|
|
766
|
-
class:
|
|
767
|
-
"data-count":
|
|
766
|
+
class: R(["artifactuse-social-media-grid", { "artifactuse-social-media-single": r.value.media.length === 1 }]),
|
|
767
|
+
"data-count": r.value.media.length
|
|
768
768
|
}, [
|
|
769
|
-
(
|
|
770
|
-
key:
|
|
771
|
-
src:
|
|
772
|
-
alt:
|
|
769
|
+
(s(!0), l(V, null, fe(r.value.media.slice(0, 4), (u, z) => (s(), l("img", {
|
|
770
|
+
key: z,
|
|
771
|
+
src: u.url,
|
|
772
|
+
alt: u.alt || "",
|
|
773
773
|
onError: Z
|
|
774
|
-
}, null, 40,
|
|
775
|
-
], 10,
|
|
774
|
+
}, null, 40, Vs))), 128))
|
|
775
|
+
], 10, zs)
|
|
776
776
|
])) : v("", !0),
|
|
777
|
-
|
|
778
|
-
|
|
777
|
+
r.value.link && !((oe = r.value.media) != null && oe.length) ? (s(), l("div", Is, [
|
|
778
|
+
r.value.link.image ? (s(), l("img", {
|
|
779
779
|
key: 0,
|
|
780
|
-
src:
|
|
781
|
-
alt:
|
|
780
|
+
src: r.value.link.image,
|
|
781
|
+
alt: r.value.link.title,
|
|
782
782
|
class: "artifactuse-social-link-image",
|
|
783
783
|
onError: Z
|
|
784
|
-
}, null, 40,
|
|
785
|
-
e("div",
|
|
786
|
-
e("div",
|
|
787
|
-
|
|
784
|
+
}, null, 40, Fs)) : v("", !0),
|
|
785
|
+
e("div", Rs, [
|
|
786
|
+
e("div", qs, [
|
|
787
|
+
w[1] || (w[1] = e("svg", {
|
|
788
788
|
fill: "none",
|
|
789
789
|
viewBox: "0 0 24 24",
|
|
790
790
|
stroke: "currentColor"
|
|
@@ -796,46 +796,46 @@ const da = { class: "artifactuse-card__icon" }, va = ["innerHTML"], fa = { class
|
|
|
796
796
|
d: "M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"
|
|
797
797
|
})
|
|
798
798
|
], -1)),
|
|
799
|
-
|
|
799
|
+
G(" " + i(r.value.link.domain || ce(r.value.link.url)), 1)
|
|
800
800
|
]),
|
|
801
|
-
e("div",
|
|
802
|
-
|
|
801
|
+
e("div", Os, i(r.value.link.title), 1),
|
|
802
|
+
r.value.link.description ? (s(), l("div", Us, i(r.value.link.description), 1)) : v("", !0)
|
|
803
803
|
])
|
|
804
804
|
])) : v("", !0),
|
|
805
|
-
|
|
806
|
-
(
|
|
807
|
-
var
|
|
808
|
-
return
|
|
809
|
-
key:
|
|
805
|
+
r.value.poll ? (s(), l("div", Ds, [
|
|
806
|
+
(s(!0), l(V, null, fe(r.value.poll.options, (u, z) => {
|
|
807
|
+
var o, P;
|
|
808
|
+
return s(), l("div", {
|
|
809
|
+
key: z,
|
|
810
810
|
class: "artifactuse-social-poll-option"
|
|
811
811
|
}, [
|
|
812
812
|
e("div", {
|
|
813
813
|
class: "artifactuse-social-poll-bar",
|
|
814
|
-
style:
|
|
814
|
+
style: Le({ width: `${((o = r.value.poll.votes) == null ? void 0 : o[z]) || 0}%` })
|
|
815
815
|
}, null, 4),
|
|
816
|
-
e("div",
|
|
817
|
-
e("span", null,
|
|
818
|
-
e("span",
|
|
816
|
+
e("div", js, [
|
|
817
|
+
e("span", null, i(u), 1),
|
|
818
|
+
e("span", Ns, i(((P = r.value.poll.votes) == null ? void 0 : P[z]) || 0) + "%", 1)
|
|
819
819
|
])
|
|
820
820
|
]);
|
|
821
821
|
}), 128)),
|
|
822
|
-
e("div",
|
|
822
|
+
e("div", Ws, i(S(r.value.poll.totalVotes || 0)) + " votes · " + i(r.value.poll.duration || "Poll ended"), 1)
|
|
823
823
|
])) : v("", !0),
|
|
824
|
-
|
|
825
|
-
e("div",
|
|
824
|
+
r.value.quote ? (s(), l("div", Js, [
|
|
825
|
+
e("div", Xs, [
|
|
826
826
|
e("img", {
|
|
827
|
-
src: ((W =
|
|
827
|
+
src: ((W = r.value.quote.author) == null ? void 0 : W.avatar) || ke,
|
|
828
828
|
class: "artifactuse-social-quote-avatar"
|
|
829
|
-
}, null, 8,
|
|
830
|
-
e("span",
|
|
831
|
-
e("span",
|
|
829
|
+
}, null, 8, Zs),
|
|
830
|
+
e("span", Ks, i((X = r.value.quote.author) == null ? void 0 : X.name), 1),
|
|
831
|
+
e("span", Ys, i((b = r.value.quote.author) == null ? void 0 : b.handle), 1)
|
|
832
832
|
]),
|
|
833
|
-
e("p",
|
|
833
|
+
e("p", Gs, i(r.value.quote.text), 1)
|
|
834
834
|
])) : v("", !0)
|
|
835
835
|
]),
|
|
836
|
-
|
|
837
|
-
e("div",
|
|
838
|
-
|
|
836
|
+
I.value ? (s(), l("div", Qs, [
|
|
837
|
+
e("div", el, [
|
|
838
|
+
w[2] || (w[2] = e("svg", {
|
|
839
839
|
viewBox: "0 0 24 24",
|
|
840
840
|
fill: "none",
|
|
841
841
|
stroke: "currentColor",
|
|
@@ -843,10 +843,10 @@ const da = { class: "artifactuse-card__icon" }, va = ["innerHTML"], fa = { class
|
|
|
843
843
|
}, [
|
|
844
844
|
e("path", { d: "M12 21C6.5 21 2 16.5 2 11V3l7 3 3-3 3 3 7-3v8c0 5.5-4.5 10-10 10z" })
|
|
845
845
|
], -1)),
|
|
846
|
-
e("span", null,
|
|
846
|
+
e("span", null, i(S(h.value.replies || 0)), 1)
|
|
847
847
|
]),
|
|
848
|
-
e("div",
|
|
849
|
-
|
|
848
|
+
e("div", tl, [
|
|
849
|
+
w[3] || (w[3] = e("svg", {
|
|
850
850
|
viewBox: "0 0 24 24",
|
|
851
851
|
fill: "none",
|
|
852
852
|
stroke: "currentColor",
|
|
@@ -854,10 +854,10 @@ const da = { class: "artifactuse-card__icon" }, va = ["innerHTML"], fa = { class
|
|
|
854
854
|
}, [
|
|
855
855
|
e("path", { d: "M7 17L17 7M17 7H8M17 7V16" })
|
|
856
856
|
], -1)),
|
|
857
|
-
e("span", null,
|
|
857
|
+
e("span", null, i(S(h.value.retweets || 0)), 1)
|
|
858
858
|
]),
|
|
859
|
-
e("div",
|
|
860
|
-
|
|
859
|
+
e("div", al, [
|
|
860
|
+
w[4] || (w[4] = e("svg", {
|
|
861
861
|
viewBox: "0 0 24 24",
|
|
862
862
|
fill: "none",
|
|
863
863
|
stroke: "currentColor",
|
|
@@ -865,10 +865,10 @@ const da = { class: "artifactuse-card__icon" }, va = ["innerHTML"], fa = { class
|
|
|
865
865
|
}, [
|
|
866
866
|
e("path", { d: "M12 21.35l-1.45-1.32C5.4 15.36 2 12.28 2 8.5 2 5.42 4.42 3 7.5 3c1.74 0 3.41.81 4.5 2.09C13.09 3.81 14.76 3 16.5 3 19.58 3 22 5.42 22 8.5c0 3.78-3.4 6.86-8.55 11.54L12 21.35z" })
|
|
867
867
|
], -1)),
|
|
868
|
-
e("span", null,
|
|
868
|
+
e("span", null, i(S(h.value.likes || 0)), 1)
|
|
869
869
|
]),
|
|
870
|
-
e("div",
|
|
871
|
-
|
|
870
|
+
e("div", sl, [
|
|
871
|
+
w[5] || (w[5] = e("svg", {
|
|
872
872
|
viewBox: "0 0 24 24",
|
|
873
873
|
fill: "none",
|
|
874
874
|
stroke: "currentColor",
|
|
@@ -876,26 +876,26 @@ const da = { class: "artifactuse-card__icon" }, va = ["innerHTML"], fa = { class
|
|
|
876
876
|
}, [
|
|
877
877
|
e("path", { d: "M15 3h4a2 2 0 012 2v14a2 2 0 01-2 2h-4M10 17l5-5-5-5M13.8 12H3" })
|
|
878
878
|
], -1)),
|
|
879
|
-
e("span", null,
|
|
879
|
+
e("span", null, i(S(h.value.views || 0)), 1)
|
|
880
880
|
])
|
|
881
881
|
])) : v("", !0)
|
|
882
|
-
], 64)) :
|
|
883
|
-
e("div",
|
|
882
|
+
], 64)) : H.value === "linkedin" ? (s(), l(V, { key: 1 }, [
|
|
883
|
+
e("div", ll, [
|
|
884
884
|
e("img", {
|
|
885
|
-
src: g.value.avatar ||
|
|
885
|
+
src: g.value.avatar || ke,
|
|
886
886
|
alt: g.value.name,
|
|
887
887
|
class: "artifactuse-social-avatar",
|
|
888
888
|
onError: K
|
|
889
|
-
}, null, 40,
|
|
890
|
-
e("div",
|
|
891
|
-
e("div",
|
|
892
|
-
|
|
893
|
-
g.value.connection ? (
|
|
889
|
+
}, null, 40, il),
|
|
890
|
+
e("div", nl, [
|
|
891
|
+
e("div", ol, [
|
|
892
|
+
G(i(g.value.name) + " ", 1),
|
|
893
|
+
g.value.connection ? (s(), l("span", rl, "· " + i(g.value.connection), 1)) : v("", !0)
|
|
894
894
|
]),
|
|
895
|
-
e("div",
|
|
896
|
-
e("div",
|
|
897
|
-
|
|
898
|
-
|
|
895
|
+
e("div", cl, i(g.value.headline), 1),
|
|
896
|
+
e("div", ul, [
|
|
897
|
+
G(i($.value.timestamp || "Just now") + " · ", 1),
|
|
898
|
+
w[6] || (w[6] = e("svg", {
|
|
899
899
|
viewBox: "0 0 24 24",
|
|
900
900
|
fill: "currentColor"
|
|
901
901
|
}, [
|
|
@@ -904,81 +904,81 @@ const da = { class: "artifactuse-card__icon" }, va = ["innerHTML"], fa = { class
|
|
|
904
904
|
])
|
|
905
905
|
])
|
|
906
906
|
]),
|
|
907
|
-
e("div",
|
|
907
|
+
e("div", dl, [
|
|
908
908
|
e("p", {
|
|
909
909
|
class: "artifactuse-social-text",
|
|
910
|
-
innerHTML:
|
|
911
|
-
}, null, 8,
|
|
912
|
-
|
|
913
|
-
|
|
910
|
+
innerHTML: J.value
|
|
911
|
+
}, null, 8, vl),
|
|
912
|
+
r.value.link ? (s(), l("div", fl, [
|
|
913
|
+
r.value.link.image ? (s(), l("img", {
|
|
914
914
|
key: 0,
|
|
915
|
-
src:
|
|
916
|
-
alt:
|
|
915
|
+
src: r.value.link.image,
|
|
916
|
+
alt: r.value.link.title,
|
|
917
917
|
class: "artifactuse-social-link-image",
|
|
918
918
|
onError: Z
|
|
919
|
-
}, null, 40,
|
|
920
|
-
e("div",
|
|
921
|
-
e("div",
|
|
922
|
-
e("div",
|
|
919
|
+
}, null, 40, pl)) : v("", !0),
|
|
920
|
+
e("div", _l, [
|
|
921
|
+
e("div", hl, i(r.value.link.title), 1),
|
|
922
|
+
e("div", ml, i(r.value.link.domain || ce(r.value.link.url)), 1)
|
|
923
923
|
])
|
|
924
924
|
])) : v("", !0)
|
|
925
925
|
]),
|
|
926
|
-
|
|
927
|
-
e("div",
|
|
928
|
-
|
|
926
|
+
I.value ? (s(), l("div", yl, [
|
|
927
|
+
e("div", gl, [
|
|
928
|
+
w[7] || (w[7] = e("div", { class: "artifactuse-social-reaction-icons" }, [
|
|
929
929
|
e("span", { class: "artifactuse-social-reaction-icon" }, "👍"),
|
|
930
930
|
e("span", { class: "artifactuse-social-reaction-icon" }, "❤️"),
|
|
931
931
|
e("span", { class: "artifactuse-social-reaction-icon" }, "👏")
|
|
932
932
|
], -1)),
|
|
933
|
-
e("span", null,
|
|
933
|
+
e("span", null, i(S(h.value.likes || 0)), 1)
|
|
934
934
|
]),
|
|
935
|
-
e("span", null,
|
|
935
|
+
e("span", null, i(S(h.value.comments || 0)) + " comments · " + i(S(h.value.shares || 0)) + " shares", 1)
|
|
936
936
|
])) : v("", !0)
|
|
937
|
-
], 64)) :
|
|
938
|
-
e("div",
|
|
937
|
+
], 64)) : H.value === "instagram" ? (s(), l(V, { key: 2 }, [
|
|
938
|
+
e("div", kl, [
|
|
939
939
|
e("img", {
|
|
940
|
-
src: g.value.avatar ||
|
|
940
|
+
src: g.value.avatar || ke,
|
|
941
941
|
alt: g.value.name,
|
|
942
942
|
class: "artifactuse-social-avatar",
|
|
943
943
|
onError: K
|
|
944
|
-
}, null, 40,
|
|
945
|
-
e("div",
|
|
946
|
-
|
|
947
|
-
g.value.verified ? (
|
|
944
|
+
}, null, 40, wl),
|
|
945
|
+
e("div", bl, [
|
|
946
|
+
G(i(g.value.name) + " ", 1),
|
|
947
|
+
g.value.verified ? (s(), l("svg", Cl, [...w[8] || (w[8] = [
|
|
948
948
|
e("path", { d: "M22.25 12c0-1.43-.88-2.67-2.19-3.34.46-1.39.2-2.9-.81-3.91s-2.52-1.27-3.91-.81c-.66-1.31-1.91-2.19-3.34-2.19s-2.67.88-3.34 2.19c-1.39-.46-2.9-.2-3.91.81s-1.27 2.52-.81 3.91C2.63 9.33 1.75 10.57 1.75 12s.88 2.67 2.19 3.34c-.46 1.39-.2 2.9.81 3.91s2.52 1.27 3.91.81c.66 1.31 1.91 2.19 3.34 2.19s2.67-.88 3.34-2.19c1.39.46 2.9.2 3.91-.81s1.27-2.52.81-3.91c1.31-.67 2.19-1.91 2.19-3.34zm-11.71 4.2L6.8 12.46l1.41-1.42 2.26 2.26 4.8-5.23 1.47 1.36-6.2 6.77z" }, null, -1)
|
|
949
949
|
])])) : v("", !0)
|
|
950
950
|
])
|
|
951
951
|
]),
|
|
952
|
-
(
|
|
952
|
+
(B = r.value.media) != null && B.length ? (s(), l("div", xl, [
|
|
953
953
|
e("img", {
|
|
954
|
-
src:
|
|
955
|
-
alt:
|
|
954
|
+
src: r.value.media[0].url,
|
|
955
|
+
alt: r.value.media[0].alt || "",
|
|
956
956
|
onError: Z
|
|
957
|
-
}, null, 40,
|
|
957
|
+
}, null, 40, $l)
|
|
958
958
|
])) : v("", !0),
|
|
959
|
-
|
|
960
|
-
e("div",
|
|
961
|
-
e("div",
|
|
962
|
-
e("span",
|
|
959
|
+
w[9] || (w[9] = ua('<div class="artifactuse-social-actions"><div class="artifactuse-social-action"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M12 21.35l-1.45-1.32C5.4 15.36 2 12.28 2 8.5 2 5.42 4.42 3 7.5 3c1.74 0 3.41.81 4.5 2.09C13.09 3.81 14.76 3 16.5 3 19.58 3 22 5.42 22 8.5c0 3.78-3.4 6.86-8.55 11.54L12 21.35z"></path></svg></div><div class="artifactuse-social-action"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M21 11.5a8.38 8.38 0 01-.9 3.8 8.5 8.5 0 01-7.6 4.7 8.38 8.38 0 01-3.8-.9L3 21l1.9-5.7a8.38 8.38 0 01-.9-3.8 8.5 8.5 0 014.7-7.6 8.38 8.38 0 013.8-.9h.5a8.48 8.48 0 018 8v.5z"></path></svg></div><div class="artifactuse-social-action"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M22 2L11 13M22 2l-7 20-4-9-9-4 20-7z"></path></svg></div></div>', 1)),
|
|
960
|
+
e("div", Ml, i(S(h.value.likes || 0)) + " likes", 1),
|
|
961
|
+
e("div", Tl, [
|
|
962
|
+
e("span", Ll, i(g.value.name), 1),
|
|
963
963
|
e("span", {
|
|
964
964
|
class: "artifactuse-social-caption-text",
|
|
965
|
-
innerHTML:
|
|
966
|
-
}, null, 8,
|
|
965
|
+
innerHTML: J.value
|
|
966
|
+
}, null, 8, Pl)
|
|
967
967
|
]),
|
|
968
|
-
e("div",
|
|
969
|
-
], 64)) :
|
|
970
|
-
e("div",
|
|
968
|
+
e("div", El, i($.value.timestamp || "Just now"), 1)
|
|
969
|
+
], 64)) : H.value === "facebook" ? (s(), l(V, { key: 3 }, [
|
|
970
|
+
e("div", Al, [
|
|
971
971
|
e("img", {
|
|
972
|
-
src: g.value.avatar ||
|
|
972
|
+
src: g.value.avatar || ke,
|
|
973
973
|
alt: g.value.name,
|
|
974
974
|
class: "artifactuse-social-avatar",
|
|
975
975
|
onError: K
|
|
976
|
-
}, null, 40,
|
|
977
|
-
e("div",
|
|
978
|
-
e("div",
|
|
979
|
-
e("div",
|
|
980
|
-
|
|
981
|
-
|
|
976
|
+
}, null, 40, Hl),
|
|
977
|
+
e("div", Bl, [
|
|
978
|
+
e("div", Sl, i(g.value.name), 1),
|
|
979
|
+
e("div", zl, [
|
|
980
|
+
G(i($.value.timestamp || "Just now") + " · ", 1),
|
|
981
|
+
w[10] || (w[10] = e("svg", {
|
|
982
982
|
viewBox: "0 0 24 24",
|
|
983
983
|
fill: "currentColor"
|
|
984
984
|
}, [
|
|
@@ -987,64 +987,64 @@ const da = { class: "artifactuse-card__icon" }, va = ["innerHTML"], fa = { class
|
|
|
987
987
|
])
|
|
988
988
|
])
|
|
989
989
|
]),
|
|
990
|
-
e("div",
|
|
990
|
+
e("div", Vl, [
|
|
991
991
|
e("p", {
|
|
992
992
|
class: "artifactuse-social-text",
|
|
993
|
-
innerHTML:
|
|
994
|
-
}, null, 8,
|
|
995
|
-
|
|
996
|
-
|
|
993
|
+
innerHTML: J.value
|
|
994
|
+
}, null, 8, Il),
|
|
995
|
+
r.value.link ? (s(), l("div", Fl, [
|
|
996
|
+
r.value.link.image ? (s(), l("img", {
|
|
997
997
|
key: 0,
|
|
998
|
-
src:
|
|
999
|
-
alt:
|
|
998
|
+
src: r.value.link.image,
|
|
999
|
+
alt: r.value.link.title,
|
|
1000
1000
|
class: "artifactuse-social-link-image",
|
|
1001
1001
|
onError: Z
|
|
1002
|
-
}, null, 40,
|
|
1003
|
-
e("div",
|
|
1004
|
-
e("div",
|
|
1005
|
-
e("div",
|
|
1006
|
-
|
|
1002
|
+
}, null, 40, Rl)) : v("", !0),
|
|
1003
|
+
e("div", ql, [
|
|
1004
|
+
e("div", Ol, i(r.value.link.domain || ce(r.value.link.url)), 1),
|
|
1005
|
+
e("div", Ul, i(r.value.link.title), 1),
|
|
1006
|
+
r.value.link.description ? (s(), l("div", Dl, i(r.value.link.description), 1)) : v("", !0)
|
|
1007
1007
|
])
|
|
1008
1008
|
])) : v("", !0)
|
|
1009
1009
|
]),
|
|
1010
|
-
|
|
1011
|
-
e("div",
|
|
1012
|
-
|
|
1010
|
+
I.value ? (s(), l("div", jl, [
|
|
1011
|
+
e("div", Nl, [
|
|
1012
|
+
w[11] || (w[11] = e("div", { class: "artifactuse-social-reaction-emojis" }, [
|
|
1013
1013
|
e("span", { class: "artifactuse-social-reaction-emoji" }, "👍"),
|
|
1014
1014
|
e("span", { class: "artifactuse-social-reaction-emoji" }, "❤️"),
|
|
1015
1015
|
e("span", { class: "artifactuse-social-reaction-emoji" }, "😂")
|
|
1016
1016
|
], -1)),
|
|
1017
|
-
e("span",
|
|
1017
|
+
e("span", Wl, i(S(ee.value)), 1)
|
|
1018
1018
|
]),
|
|
1019
|
-
e("span",
|
|
1019
|
+
e("span", Jl, i(S(h.value.comments || 0)) + " comments · " + i(S(h.value.shares || 0)) + " shares", 1)
|
|
1020
1020
|
])) : v("", !0)
|
|
1021
|
-
], 64)) :
|
|
1022
|
-
e("div",
|
|
1021
|
+
], 64)) : H.value === "threads" ? (s(), l(V, { key: 4 }, [
|
|
1022
|
+
e("div", Xl, [
|
|
1023
1023
|
e("img", {
|
|
1024
|
-
src: g.value.avatar ||
|
|
1024
|
+
src: g.value.avatar || ke,
|
|
1025
1025
|
alt: g.value.name,
|
|
1026
1026
|
class: "artifactuse-social-avatar",
|
|
1027
1027
|
onError: K
|
|
1028
|
-
}, null, 40,
|
|
1029
|
-
e("div",
|
|
1030
|
-
e("div",
|
|
1031
|
-
|
|
1032
|
-
g.value.verified ? (
|
|
1028
|
+
}, null, 40, Zl),
|
|
1029
|
+
e("div", Kl, [
|
|
1030
|
+
e("div", Yl, [
|
|
1031
|
+
G(i(g.value.name) + " ", 1),
|
|
1032
|
+
g.value.verified ? (s(), l("svg", Gl, [...w[12] || (w[12] = [
|
|
1033
1033
|
e("path", { d: "M22.25 12c0-1.43-.88-2.67-2.19-3.34.46-1.39.2-2.9-.81-3.91s-2.52-1.27-3.91-.81c-.66-1.31-1.91-2.19-3.34-2.19s-2.67.88-3.34 2.19c-1.39-.46-2.9-.2-3.91.81s-1.27 2.52-.81 3.91C2.63 9.33 1.75 10.57 1.75 12s.88 2.67 2.19 3.34c-.46 1.39-.2 2.9.81 3.91s2.52 1.27 3.91.81c.66 1.31 1.91 2.19 3.34 2.19s2.67-.88 3.34-2.19c1.39.46 2.9.2 3.91-.81s1.27-2.52.81-3.91c1.31-.67 2.19-1.91 2.19-3.34zm-11.71 4.2L6.8 12.46l1.41-1.42 2.26 2.26 4.8-5.23 1.47 1.36-6.2 6.77z" }, null, -1)
|
|
1034
1034
|
])])) : v("", !0)
|
|
1035
1035
|
]),
|
|
1036
|
-
e("span",
|
|
1036
|
+
e("span", Ql, i($.value.timestamp || "Just now"), 1)
|
|
1037
1037
|
])
|
|
1038
1038
|
]),
|
|
1039
|
-
e("div",
|
|
1039
|
+
e("div", ei, [
|
|
1040
1040
|
e("p", {
|
|
1041
1041
|
class: "artifactuse-social-text",
|
|
1042
|
-
innerHTML:
|
|
1043
|
-
}, null, 8,
|
|
1042
|
+
innerHTML: J.value
|
|
1043
|
+
}, null, 8, ti)
|
|
1044
1044
|
]),
|
|
1045
|
-
|
|
1046
|
-
e("div",
|
|
1047
|
-
|
|
1045
|
+
I.value ? (s(), l("div", ai, [
|
|
1046
|
+
e("div", si, [
|
|
1047
|
+
w[13] || (w[13] = e("svg", {
|
|
1048
1048
|
viewBox: "0 0 24 24",
|
|
1049
1049
|
fill: "none",
|
|
1050
1050
|
stroke: "currentColor",
|
|
@@ -1052,10 +1052,10 @@ const da = { class: "artifactuse-card__icon" }, va = ["innerHTML"], fa = { class
|
|
|
1052
1052
|
}, [
|
|
1053
1053
|
e("path", { d: "M12 21.35l-1.45-1.32C5.4 15.36 2 12.28 2 8.5 2 5.42 4.42 3 7.5 3c1.74 0 3.41.81 4.5 2.09C13.09 3.81 14.76 3 16.5 3 19.58 3 22 5.42 22 8.5c0 3.78-3.4 6.86-8.55 11.54L12 21.35z" })
|
|
1054
1054
|
], -1)),
|
|
1055
|
-
e("span", null,
|
|
1055
|
+
e("span", null, i(S(h.value.likes || 0)), 1)
|
|
1056
1056
|
]),
|
|
1057
|
-
e("div",
|
|
1058
|
-
|
|
1057
|
+
e("div", li, [
|
|
1058
|
+
w[14] || (w[14] = e("svg", {
|
|
1059
1059
|
viewBox: "0 0 24 24",
|
|
1060
1060
|
fill: "none",
|
|
1061
1061
|
stroke: "currentColor",
|
|
@@ -1063,10 +1063,10 @@ const da = { class: "artifactuse-card__icon" }, va = ["innerHTML"], fa = { class
|
|
|
1063
1063
|
}, [
|
|
1064
1064
|
e("path", { d: "M21 11.5a8.38 8.38 0 01-.9 3.8 8.5 8.5 0 01-7.6 4.7 8.38 8.38 0 01-3.8-.9L3 21l1.9-5.7a8.38 8.38 0 01-.9-3.8 8.5 8.5 0 014.7-7.6 8.38 8.38 0 013.8-.9h.5a8.48 8.48 0 018 8v.5z" })
|
|
1065
1065
|
], -1)),
|
|
1066
|
-
e("span", null,
|
|
1066
|
+
e("span", null, i(S(h.value.comments || 0)), 1)
|
|
1067
1067
|
]),
|
|
1068
|
-
e("div",
|
|
1069
|
-
|
|
1068
|
+
e("div", ii, [
|
|
1069
|
+
w[15] || (w[15] = e("svg", {
|
|
1070
1070
|
viewBox: "0 0 24 24",
|
|
1071
1071
|
fill: "none",
|
|
1072
1072
|
stroke: "currentColor",
|
|
@@ -1074,18 +1074,18 @@ const da = { class: "artifactuse-card__icon" }, va = ["innerHTML"], fa = { class
|
|
|
1074
1074
|
}, [
|
|
1075
1075
|
e("path", { d: "M7 17L17 7M17 7H8M17 7V16" })
|
|
1076
1076
|
], -1)),
|
|
1077
|
-
e("span", null,
|
|
1077
|
+
e("span", null, i(S(h.value.shares || 0)), 1)
|
|
1078
1078
|
])
|
|
1079
1079
|
])) : v("", !0)
|
|
1080
|
-
], 64)) :
|
|
1081
|
-
e("div",
|
|
1082
|
-
|
|
1080
|
+
], 64)) : H.value === "tiktok" ? (s(), l(V, { key: 5 }, [
|
|
1081
|
+
e("div", ni, [
|
|
1082
|
+
r.value.thumbnail ? (s(), l("img", {
|
|
1083
1083
|
key: 0,
|
|
1084
|
-
src:
|
|
1085
|
-
alt:
|
|
1084
|
+
src: r.value.thumbnail,
|
|
1085
|
+
alt: r.value.text,
|
|
1086
1086
|
onError: Z
|
|
1087
|
-
}, null, 40,
|
|
1088
|
-
|
|
1087
|
+
}, null, 40, oi)) : v("", !0),
|
|
1088
|
+
w[16] || (w[16] = e("div", { class: "artifactuse-social-play-button" }, [
|
|
1089
1089
|
e("div", { class: "artifactuse-social-play-icon" }, [
|
|
1090
1090
|
e("svg", {
|
|
1091
1091
|
viewBox: "0 0 24 24",
|
|
@@ -1095,71 +1095,71 @@ const da = { class: "artifactuse-card__icon" }, va = ["innerHTML"], fa = { class
|
|
|
1095
1095
|
])
|
|
1096
1096
|
])
|
|
1097
1097
|
], -1)),
|
|
1098
|
-
|
|
1098
|
+
r.value.duration ? (s(), l("div", ri, i(r.value.duration), 1)) : v("", !0)
|
|
1099
1099
|
]),
|
|
1100
|
-
e("div",
|
|
1101
|
-
e("div",
|
|
1100
|
+
e("div", ci, [
|
|
1101
|
+
e("div", ui, [
|
|
1102
1102
|
e("img", {
|
|
1103
|
-
src: g.value.avatar ||
|
|
1103
|
+
src: g.value.avatar || ke,
|
|
1104
1104
|
alt: g.value.name,
|
|
1105
1105
|
class: "artifactuse-social-avatar",
|
|
1106
1106
|
onError: K
|
|
1107
|
-
}, null, 40,
|
|
1108
|
-
e("span",
|
|
1107
|
+
}, null, 40, di),
|
|
1108
|
+
e("span", vi, i(g.value.name), 1)
|
|
1109
1109
|
]),
|
|
1110
1110
|
e("p", {
|
|
1111
1111
|
class: "artifactuse-social-text",
|
|
1112
|
-
innerHTML:
|
|
1113
|
-
}, null, 8,
|
|
1114
|
-
|
|
1115
|
-
|
|
1112
|
+
innerHTML: J.value
|
|
1113
|
+
}, null, 8, fi),
|
|
1114
|
+
r.value.sound ? (s(), l("div", pi, [
|
|
1115
|
+
w[17] || (w[17] = e("svg", {
|
|
1116
1116
|
viewBox: "0 0 24 24",
|
|
1117
1117
|
fill: "currentColor"
|
|
1118
1118
|
}, [
|
|
1119
1119
|
e("path", { d: "M12 3v10.55c-.59-.34-1.27-.55-2-.55-2.21 0-4 1.79-4 4s1.79 4 4 4 4-1.79 4-4V7h4V3h-6z" })
|
|
1120
1120
|
], -1)),
|
|
1121
|
-
|
|
1121
|
+
G(" " + i(r.value.sound), 1)
|
|
1122
1122
|
])) : v("", !0),
|
|
1123
|
-
|
|
1124
|
-
e("span", null,
|
|
1125
|
-
e("span", null,
|
|
1126
|
-
e("span", null,
|
|
1123
|
+
I.value ? (s(), l("div", _i, [
|
|
1124
|
+
e("span", null, i(S(h.value.likes || 0)) + " likes", 1),
|
|
1125
|
+
e("span", null, i(S(h.value.comments || 0)) + " comments", 1),
|
|
1126
|
+
e("span", null, i(S(h.value.shares || 0)) + " shares", 1)
|
|
1127
1127
|
])) : v("", !0)
|
|
1128
1128
|
])
|
|
1129
|
-
], 64)) :
|
|
1130
|
-
e("div",
|
|
1131
|
-
|
|
1129
|
+
], 64)) : H.value === "youtube" ? (s(), l(V, { key: 6 }, [
|
|
1130
|
+
e("div", hi, [
|
|
1131
|
+
r.value.thumbnail ? (s(), l("img", {
|
|
1132
1132
|
key: 0,
|
|
1133
|
-
src:
|
|
1134
|
-
alt:
|
|
1133
|
+
src: r.value.thumbnail,
|
|
1134
|
+
alt: r.value.title,
|
|
1135
1135
|
onError: Z
|
|
1136
|
-
}, null, 40,
|
|
1137
|
-
|
|
1136
|
+
}, null, 40, mi)) : v("", !0),
|
|
1137
|
+
r.value.duration ? (s(), l("div", yi, i(r.value.duration), 1)) : v("", !0)
|
|
1138
1138
|
]),
|
|
1139
|
-
e("div",
|
|
1139
|
+
e("div", gi, [
|
|
1140
1140
|
e("img", {
|
|
1141
|
-
src: g.value.avatar ||
|
|
1141
|
+
src: g.value.avatar || ke,
|
|
1142
1142
|
alt: g.value.name,
|
|
1143
1143
|
class: "artifactuse-social-avatar",
|
|
1144
1144
|
onError: K
|
|
1145
|
-
}, null, 40,
|
|
1145
|
+
}, null, 40, ki),
|
|
1146
1146
|
e("div", null, [
|
|
1147
|
-
e("div",
|
|
1148
|
-
e("div",
|
|
1149
|
-
e("div",
|
|
1147
|
+
e("div", wi, i(r.value.title || r.value.text), 1),
|
|
1148
|
+
e("div", bi, i(g.value.name), 1),
|
|
1149
|
+
e("div", Ci, i(S(h.value.views || 0)) + " views · " + i($.value.timestamp || "Just now"), 1)
|
|
1150
1150
|
])
|
|
1151
1151
|
])
|
|
1152
1152
|
], 64)) : v("", !0),
|
|
1153
|
-
e("div",
|
|
1154
|
-
e("div",
|
|
1155
|
-
(
|
|
1156
|
-
e("span", null,
|
|
1153
|
+
e("div", xi, [
|
|
1154
|
+
e("div", $i, [
|
|
1155
|
+
(s(), Pe(da(D.value))),
|
|
1156
|
+
e("span", null, i(N.value), 1)
|
|
1157
1157
|
]),
|
|
1158
1158
|
e("button", {
|
|
1159
1159
|
class: "artifactuse-social-copy-btn",
|
|
1160
|
-
onClick:
|
|
1160
|
+
onClick: pe
|
|
1161
1161
|
}, [
|
|
1162
|
-
|
|
1162
|
+
w[18] || (w[18] = e("svg", {
|
|
1163
1163
|
viewBox: "0 0 24 24",
|
|
1164
1164
|
fill: "none",
|
|
1165
1165
|
stroke: "currentColor",
|
|
@@ -1175,31 +1175,31 @@ const da = { class: "artifactuse-card__icon" }, va = ["innerHTML"], fa = { class
|
|
|
1175
1175
|
}),
|
|
1176
1176
|
e("path", { d: "M5 15H4a2 2 0 01-2-2V4a2 2 0 012-2h9a2 2 0 012 2v1" })
|
|
1177
1177
|
], -1)),
|
|
1178
|
-
|
|
1178
|
+
G(" " + i(n.value), 1)
|
|
1179
1179
|
])
|
|
1180
1180
|
])
|
|
1181
|
-
], 10,
|
|
1181
|
+
], 10, xs);
|
|
1182
1182
|
};
|
|
1183
1183
|
}
|
|
1184
|
-
},
|
|
1184
|
+
}, Ti = ["src", "alt"], Li = ["src"], Pi = {
|
|
1185
1185
|
key: 2,
|
|
1186
1186
|
class: "artifactuse-viewer-controls"
|
|
1187
|
-
},
|
|
1187
|
+
}, Ei = ["title"], Ai = {
|
|
1188
1188
|
key: 0,
|
|
1189
1189
|
viewBox: "0 0 24 24",
|
|
1190
1190
|
fill: "none",
|
|
1191
1191
|
stroke: "currentColor",
|
|
1192
1192
|
"stroke-width": "2"
|
|
1193
|
-
},
|
|
1193
|
+
}, Hi = {
|
|
1194
1194
|
key: 1,
|
|
1195
1195
|
viewBox: "0 0 24 24",
|
|
1196
1196
|
fill: "none",
|
|
1197
1197
|
stroke: "currentColor",
|
|
1198
1198
|
"stroke-width": "2"
|
|
1199
|
-
},
|
|
1199
|
+
}, Bi = {
|
|
1200
1200
|
key: 3,
|
|
1201
1201
|
class: "artifactuse-viewer-caption"
|
|
1202
|
-
},
|
|
1202
|
+
}, Si = {
|
|
1203
1203
|
__name: "ArtifactuseViewer",
|
|
1204
1204
|
props: {
|
|
1205
1205
|
// Whether the viewer is open
|
|
@@ -1229,61 +1229,61 @@ const da = { class: "artifactuse-card__icon" }, va = ["innerHTML"], fa = { class
|
|
|
1229
1229
|
}
|
|
1230
1230
|
},
|
|
1231
1231
|
emits: ["close"],
|
|
1232
|
-
setup(
|
|
1233
|
-
const
|
|
1234
|
-
function
|
|
1235
|
-
|
|
1232
|
+
setup(L, { emit: d }) {
|
|
1233
|
+
const _ = L, T = d, f = M(null), n = M(!1);
|
|
1234
|
+
function O() {
|
|
1235
|
+
n.value = !1, T("close");
|
|
1236
1236
|
}
|
|
1237
|
-
function
|
|
1238
|
-
|
|
1237
|
+
function H() {
|
|
1238
|
+
_.type === "image" && (n.value = !n.value);
|
|
1239
1239
|
}
|
|
1240
1240
|
function g() {
|
|
1241
1241
|
const h = document.createElement("a");
|
|
1242
|
-
h.href =
|
|
1242
|
+
h.href = _.src, h.download = _.alt || "download", document.body.appendChild(h), h.click(), document.body.removeChild(h);
|
|
1243
1243
|
}
|
|
1244
|
-
function
|
|
1245
|
-
h.key === "Escape" &&
|
|
1244
|
+
function r(h) {
|
|
1245
|
+
h.key === "Escape" && _.isOpen && O();
|
|
1246
1246
|
}
|
|
1247
|
-
return
|
|
1248
|
-
h ? (
|
|
1247
|
+
return ne(() => _.isOpen, (h) => {
|
|
1248
|
+
h ? (xe(() => {
|
|
1249
1249
|
var $;
|
|
1250
|
-
($ =
|
|
1251
|
-
}), document.body.style.overflow = "hidden") : (document.body.style.overflow = "",
|
|
1252
|
-
}),
|
|
1253
|
-
document.addEventListener("keydown",
|
|
1254
|
-
}),
|
|
1255
|
-
document.removeEventListener("keydown",
|
|
1256
|
-
}), (h, $) => (
|
|
1257
|
-
|
|
1258
|
-
default:
|
|
1259
|
-
|
|
1250
|
+
($ = f.value) == null || $.focus();
|
|
1251
|
+
}), document.body.style.overflow = "hidden") : (document.body.style.overflow = "", n.value = !1);
|
|
1252
|
+
}), Ee(() => {
|
|
1253
|
+
document.addEventListener("keydown", r);
|
|
1254
|
+
}), st(() => {
|
|
1255
|
+
document.removeEventListener("keydown", r), document.body.style.overflow = "";
|
|
1256
|
+
}), (h, $) => (s(), Pe(va, { to: "body" }, [
|
|
1257
|
+
De(qe, { name: "artifactuse-viewer" }, {
|
|
1258
|
+
default: Oe(() => [
|
|
1259
|
+
L.isOpen ? (s(), l("div", {
|
|
1260
1260
|
key: 0,
|
|
1261
1261
|
class: "artifactuse-viewer-overlay",
|
|
1262
|
-
onClick:
|
|
1263
|
-
onKeydown:
|
|
1262
|
+
onClick: O,
|
|
1263
|
+
onKeydown: fa(O, ["escape"]),
|
|
1264
1264
|
tabindex: "-1",
|
|
1265
1265
|
ref_key: "overlayRef",
|
|
1266
|
-
ref:
|
|
1266
|
+
ref: f
|
|
1267
1267
|
}, [
|
|
1268
1268
|
e("div", {
|
|
1269
1269
|
class: "artifactuse-viewer-content",
|
|
1270
|
-
onClick: $[0] || ($[0] =
|
|
1270
|
+
onClick: $[0] || ($[0] = me(() => {
|
|
1271
1271
|
}, ["stop"]))
|
|
1272
1272
|
}, [
|
|
1273
|
-
|
|
1273
|
+
L.type === "image" ? (s(), l("img", {
|
|
1274
1274
|
key: 0,
|
|
1275
|
-
src:
|
|
1276
|
-
alt:
|
|
1277
|
-
class:
|
|
1278
|
-
onClick:
|
|
1279
|
-
}, null, 10,
|
|
1275
|
+
src: L.src,
|
|
1276
|
+
alt: L.alt,
|
|
1277
|
+
class: R(["artifactuse-viewer-image", { "artifactuse-viewer-image--zoomed": n.value }]),
|
|
1278
|
+
onClick: H
|
|
1279
|
+
}, null, 10, Ti)) : L.type === "pdf" ? (s(), l("iframe", {
|
|
1280
1280
|
key: 1,
|
|
1281
|
-
src:
|
|
1281
|
+
src: L.src,
|
|
1282
1282
|
class: "artifactuse-viewer-pdf"
|
|
1283
|
-
}, null, 8,
|
|
1283
|
+
}, null, 8, Li)) : v("", !0),
|
|
1284
1284
|
e("button", {
|
|
1285
1285
|
class: "artifactuse-viewer-close",
|
|
1286
|
-
onClick:
|
|
1286
|
+
onClick: O,
|
|
1287
1287
|
title: "Close (Esc)"
|
|
1288
1288
|
}, [...$[1] || ($[1] = [
|
|
1289
1289
|
e("svg", {
|
|
@@ -1306,13 +1306,13 @@ const da = { class: "artifactuse-card__icon" }, va = ["innerHTML"], fa = { class
|
|
|
1306
1306
|
})
|
|
1307
1307
|
], -1)
|
|
1308
1308
|
])]),
|
|
1309
|
-
|
|
1309
|
+
L.type === "image" ? (s(), l("div", Pi, [
|
|
1310
1310
|
e("button", {
|
|
1311
1311
|
class: "artifactuse-viewer-control",
|
|
1312
|
-
onClick:
|
|
1313
|
-
title:
|
|
1312
|
+
onClick: me(H, ["stop"]),
|
|
1313
|
+
title: n.value ? "Zoom out" : "Zoom in"
|
|
1314
1314
|
}, [
|
|
1315
|
-
|
|
1315
|
+
n.value ? (s(), l("svg", Hi, [...$[3] || ($[3] = [
|
|
1316
1316
|
e("circle", {
|
|
1317
1317
|
cx: "11",
|
|
1318
1318
|
cy: "11",
|
|
@@ -1330,7 +1330,7 @@ const da = { class: "artifactuse-card__icon" }, va = ["innerHTML"], fa = { class
|
|
|
1330
1330
|
x2: "14",
|
|
1331
1331
|
y2: "11"
|
|
1332
1332
|
}, null, -1)
|
|
1333
|
-
])])) : (
|
|
1333
|
+
])])) : (s(), l("svg", Ai, [...$[2] || ($[2] = [
|
|
1334
1334
|
e("circle", {
|
|
1335
1335
|
cx: "11",
|
|
1336
1336
|
cy: "11",
|
|
@@ -1355,10 +1355,10 @@ const da = { class: "artifactuse-card__icon" }, va = ["innerHTML"], fa = { class
|
|
|
1355
1355
|
y2: "11"
|
|
1356
1356
|
}, null, -1)
|
|
1357
1357
|
])]))
|
|
1358
|
-
], 8,
|
|
1358
|
+
], 8, Ei),
|
|
1359
1359
|
e("button", {
|
|
1360
1360
|
class: "artifactuse-viewer-control",
|
|
1361
|
-
onClick:
|
|
1361
|
+
onClick: me(g, ["stop"]),
|
|
1362
1362
|
title: "Download"
|
|
1363
1363
|
}, [...$[4] || ($[4] = [
|
|
1364
1364
|
e("svg", {
|
|
@@ -1378,7 +1378,7 @@ const da = { class: "artifactuse-card__icon" }, va = ["innerHTML"], fa = { class
|
|
|
1378
1378
|
], -1)
|
|
1379
1379
|
])])
|
|
1380
1380
|
])) : v("", !0),
|
|
1381
|
-
|
|
1381
|
+
L.caption ? (s(), l("div", Bi, i(L.caption), 1)) : v("", !0)
|
|
1382
1382
|
])
|
|
1383
1383
|
], 544)) : v("", !0)
|
|
1384
1384
|
]),
|
|
@@ -1386,7 +1386,7 @@ const da = { class: "artifactuse-card__icon" }, va = ["innerHTML"], fa = { class
|
|
|
1386
1386
|
})
|
|
1387
1387
|
]));
|
|
1388
1388
|
}
|
|
1389
|
-
},
|
|
1389
|
+
}, zi = ["innerHTML"], Zo = {
|
|
1390
1390
|
__name: "ArtifactuseAgentMessage",
|
|
1391
1391
|
props: {
|
|
1392
1392
|
// The raw message content (markdown/HTML from AI)
|
|
@@ -1447,211 +1447,211 @@ const da = { class: "artifactuse-card__icon" }, va = ["innerHTML"], fa = { class
|
|
|
1447
1447
|
"social-copy",
|
|
1448
1448
|
"media-open"
|
|
1449
1449
|
],
|
|
1450
|
-
setup(
|
|
1451
|
-
const T =
|
|
1452
|
-
processMessage:
|
|
1453
|
-
openArtifact:
|
|
1454
|
-
state:
|
|
1450
|
+
setup(L, { expose: d, emit: _ }) {
|
|
1451
|
+
const T = L, f = _, {
|
|
1452
|
+
processMessage: n,
|
|
1453
|
+
openArtifact: O,
|
|
1454
|
+
state: H,
|
|
1455
1455
|
getTheme: g,
|
|
1456
|
-
instance:
|
|
1457
|
-
} =
|
|
1458
|
-
let
|
|
1459
|
-
const
|
|
1456
|
+
instance: r
|
|
1457
|
+
} = je(), h = M(null), $ = M(null), I = M(""), x = M([]);
|
|
1458
|
+
let N = null;
|
|
1459
|
+
const D = M(!1), J = M("image"), ee = M(""), S = M(""), ce = M(""), K = k(() => (g == null ? void 0 : g()) || "dark"), Z = k(() => H.activeArtifactId), pe = k(() => {
|
|
1460
1460
|
var C;
|
|
1461
|
-
return T.inlineCards ?? ((C =
|
|
1461
|
+
return T.inlineCards ?? ((C = r == null ? void 0 : r.config) == null ? void 0 : C.inlineCards) ?? !0;
|
|
1462
1462
|
}), m = M(!1);
|
|
1463
|
-
|
|
1463
|
+
Ee(() => {
|
|
1464
1464
|
T.typing && (m.value = !0);
|
|
1465
|
-
}),
|
|
1465
|
+
}), ne(() => T.typing, (C) => {
|
|
1466
1466
|
C && (m.value = !0);
|
|
1467
1467
|
});
|
|
1468
|
-
const
|
|
1469
|
-
function
|
|
1468
|
+
const w = k(() => m.value || T.isLastMessage ? "active" : "inactive");
|
|
1469
|
+
function ie(C) {
|
|
1470
1470
|
if (!C) return null;
|
|
1471
1471
|
try {
|
|
1472
|
-
const
|
|
1473
|
-
return JSON.parse(
|
|
1472
|
+
const q = decodeURIComponent(escape(atob(C)));
|
|
1473
|
+
return JSON.parse(q);
|
|
1474
1474
|
} catch {
|
|
1475
1475
|
try {
|
|
1476
|
-
const
|
|
1476
|
+
const j = C.replace(/ /g, `
|
|
1477
1477
|
`).replace(/ /g, "\r").replace(/	/g, " ").replace(/"/g, '"').replace(/'/g, "'").replace(/</g, "<").replace(/>/g, ">").replace(/&/g, "&");
|
|
1478
|
-
return JSON.parse(
|
|
1479
|
-
} catch (
|
|
1480
|
-
return console.error("Failed to parse artifact data:",
|
|
1478
|
+
return JSON.parse(j);
|
|
1479
|
+
} catch (j) {
|
|
1480
|
+
return console.error("Failed to parse artifact data:", j), null;
|
|
1481
1481
|
}
|
|
1482
1482
|
}
|
|
1483
1483
|
}
|
|
1484
|
-
const
|
|
1485
|
-
const C = [],
|
|
1486
|
-
if (!
|
|
1487
|
-
const
|
|
1488
|
-
let
|
|
1489
|
-
for (; (
|
|
1490
|
-
if (
|
|
1491
|
-
const
|
|
1492
|
-
|
|
1484
|
+
const oe = k(() => {
|
|
1485
|
+
const C = [], q = I.value;
|
|
1486
|
+
if (!q) return C;
|
|
1487
|
+
const j = /<div\s+class="artifactuse-placeholder[^"]*"[^>]*data-artifact-id="([^"]+)"[^>]*data-artifact-type="([^"]+)"[^>]*data-artifact=["']([^"']*)["'][^>]*><\/div>/gi;
|
|
1488
|
+
let le = 0, E;
|
|
1489
|
+
for (; (E = j.exec(q)) !== null; ) {
|
|
1490
|
+
if (E.index > le) {
|
|
1491
|
+
const U = q.slice(le, E.index);
|
|
1492
|
+
U.trim() && C.push({ type: "html", content: U });
|
|
1493
1493
|
}
|
|
1494
|
-
const
|
|
1495
|
-
|
|
1494
|
+
const Q = ie(E[3]), y = E[2];
|
|
1495
|
+
Q && (y === "form" && Q.isInline ? C.push({ type: "form", artifact: Q }) : y === "social" ? C.push({ type: "social", artifact: Q }) : C.push({ type: "panel", artifact: Q })), le = E.index + E[0].length;
|
|
1496
1496
|
}
|
|
1497
|
-
if (
|
|
1498
|
-
const
|
|
1499
|
-
|
|
1497
|
+
if (le < q.length) {
|
|
1498
|
+
const Q = q.slice(le);
|
|
1499
|
+
Q.trim() && C.push({ type: "html", content: Q });
|
|
1500
1500
|
}
|
|
1501
|
-
return C.length === 0 &&
|
|
1501
|
+
return C.length === 0 && q.trim() && C.push({ type: "html", content: q }), C;
|
|
1502
1502
|
});
|
|
1503
1503
|
function W(C) {
|
|
1504
|
-
|
|
1504
|
+
J.value = C.type || "image", ee.value = C.src || "", S.value = C.alt || "", ce.value = C.caption || "", D.value = !0, f("media-open", C);
|
|
1505
1505
|
}
|
|
1506
|
-
function
|
|
1507
|
-
|
|
1506
|
+
function X() {
|
|
1507
|
+
D.value = !1, ee.value = "", S.value = "", ce.value = "";
|
|
1508
1508
|
}
|
|
1509
|
-
function
|
|
1509
|
+
function b() {
|
|
1510
1510
|
if (!$.value) return;
|
|
1511
|
-
$.value.querySelectorAll('img[data-lightbox="true"]').forEach((
|
|
1512
|
-
|
|
1513
|
-
|
|
1511
|
+
$.value.querySelectorAll('img[data-lightbox="true"]').forEach((y) => {
|
|
1512
|
+
y._lightboxHandler && y.removeEventListener("click", y._lightboxHandler), y._lightboxHandler = (U) => {
|
|
1513
|
+
U.preventDefault(), U.stopPropagation(), W({
|
|
1514
1514
|
type: "image",
|
|
1515
|
-
src:
|
|
1516
|
-
alt:
|
|
1517
|
-
caption:
|
|
1515
|
+
src: y.src,
|
|
1516
|
+
alt: y.alt || "",
|
|
1517
|
+
caption: y.dataset.caption || y.alt || ""
|
|
1518
1518
|
});
|
|
1519
|
-
},
|
|
1520
|
-
}), $.value.querySelectorAll(".artifactuse-image-container img").forEach((
|
|
1521
|
-
|
|
1522
|
-
|
|
1523
|
-
const
|
|
1519
|
+
}, y.addEventListener("click", y._lightboxHandler), y.style.cursor = "zoom-in";
|
|
1520
|
+
}), $.value.querySelectorAll(".artifactuse-image-container img").forEach((y) => {
|
|
1521
|
+
y._lightboxHandler || (y._lightboxHandler = (U) => {
|
|
1522
|
+
U.preventDefault(), U.stopPropagation();
|
|
1523
|
+
const Y = y.closest(".artifactuse-image-container"), ue = Y == null ? void 0 : Y.querySelector(".artifactuse-image-caption"), Ae = (ue == null ? void 0 : ue.textContent) || y.dataset.caption || y.alt || "";
|
|
1524
1524
|
W({
|
|
1525
1525
|
type: "image",
|
|
1526
|
-
src:
|
|
1527
|
-
alt:
|
|
1528
|
-
caption:
|
|
1526
|
+
src: y.src,
|
|
1527
|
+
alt: y.alt || "",
|
|
1528
|
+
caption: Ae
|
|
1529
1529
|
});
|
|
1530
|
-
},
|
|
1531
|
-
}), $.value.querySelectorAll(".artifactuse-gallery-item img, .artifactuse-image-gallery img").forEach((
|
|
1532
|
-
|
|
1533
|
-
|
|
1534
|
-
const
|
|
1530
|
+
}, y.addEventListener("click", y._lightboxHandler), y.style.cursor = "zoom-in");
|
|
1531
|
+
}), $.value.querySelectorAll(".artifactuse-gallery-item img, .artifactuse-image-gallery img").forEach((y) => {
|
|
1532
|
+
y._lightboxHandler || (y._lightboxHandler = (U) => {
|
|
1533
|
+
U.preventDefault(), U.stopPropagation();
|
|
1534
|
+
const Y = y.closest(".artifactuse-gallery-item"), ue = Y == null ? void 0 : Y.querySelector(".artifactuse-gallery-caption"), Ae = (ue == null ? void 0 : ue.textContent) || y.dataset.caption || y.alt || "";
|
|
1535
1535
|
W({
|
|
1536
1536
|
type: "image",
|
|
1537
|
-
src:
|
|
1538
|
-
alt:
|
|
1539
|
-
caption:
|
|
1537
|
+
src: y.src,
|
|
1538
|
+
alt: y.alt || "",
|
|
1539
|
+
caption: Ae
|
|
1540
1540
|
});
|
|
1541
|
-
},
|
|
1542
|
-
}), $.value.querySelectorAll('a[href$=".pdf"], a[data-type="pdf"]').forEach((
|
|
1543
|
-
|
|
1544
|
-
|
|
1541
|
+
}, y.addEventListener("click", y._lightboxHandler), y.style.cursor = "zoom-in");
|
|
1542
|
+
}), $.value.querySelectorAll('a[href$=".pdf"], a[data-type="pdf"]').forEach((y) => {
|
|
1543
|
+
y._pdfHandler && y.removeEventListener("click", y._pdfHandler), y._pdfHandler = (U) => {
|
|
1544
|
+
U.preventDefault(), U.stopPropagation(), W({
|
|
1545
1545
|
type: "pdf",
|
|
1546
|
-
src:
|
|
1547
|
-
alt:
|
|
1548
|
-
caption:
|
|
1546
|
+
src: y.href,
|
|
1547
|
+
alt: y.textContent || "PDF Document",
|
|
1548
|
+
caption: y.title || y.textContent || ""
|
|
1549
1549
|
});
|
|
1550
|
-
},
|
|
1551
|
-
}), $.value.querySelectorAll(".artifactuse-pdf-container, [data-pdf-viewer]").forEach((
|
|
1552
|
-
var
|
|
1553
|
-
|
|
1554
|
-
const
|
|
1555
|
-
|
|
1556
|
-
|
|
1550
|
+
}, y.addEventListener("click", y._pdfHandler);
|
|
1551
|
+
}), $.value.querySelectorAll(".artifactuse-pdf-container, [data-pdf-viewer]").forEach((y) => {
|
|
1552
|
+
var Y;
|
|
1553
|
+
y._pdfHandler && y.removeEventListener("click", y._pdfHandler);
|
|
1554
|
+
const U = y.dataset.pdfSrc || ((Y = y.querySelector("iframe")) == null ? void 0 : Y.src) || "";
|
|
1555
|
+
U && (y._pdfHandler = (ue) => {
|
|
1556
|
+
ue.preventDefault(), ue.stopPropagation(), W({
|
|
1557
1557
|
type: "pdf",
|
|
1558
|
-
src:
|
|
1558
|
+
src: U,
|
|
1559
1559
|
alt: "PDF Document",
|
|
1560
|
-
caption:
|
|
1560
|
+
caption: y.dataset.caption || ""
|
|
1561
1561
|
});
|
|
1562
|
-
},
|
|
1563
|
-
}), $.value.querySelectorAll(".artifactuse-video-preview-wrapper, .video-preview-wrapper").forEach((
|
|
1564
|
-
|
|
1565
|
-
if (
|
|
1566
|
-
const
|
|
1567
|
-
|
|
1568
|
-
},
|
|
1562
|
+
}, y.addEventListener("click", y._pdfHandler), y.style.cursor = "pointer");
|
|
1563
|
+
}), $.value.querySelectorAll(".artifactuse-video-preview-wrapper, .video-preview-wrapper").forEach((y) => {
|
|
1564
|
+
y._clickHandler && y.removeEventListener("click", y._clickHandler), y._clickHandler = (U) => {
|
|
1565
|
+
if (U.target.closest(".artifactuse-video-play-button")) return;
|
|
1566
|
+
const Y = y.dataset.videoUrl || y.dataset.url;
|
|
1567
|
+
Y && window.open(Y, "_blank", "noopener,noreferrer");
|
|
1568
|
+
}, y.addEventListener("click", y._clickHandler);
|
|
1569
1569
|
});
|
|
1570
1570
|
}
|
|
1571
|
-
function
|
|
1571
|
+
function B() {
|
|
1572
1572
|
if (!$.value) return;
|
|
1573
|
-
$.value.querySelectorAll("img").forEach((
|
|
1574
|
-
|
|
1575
|
-
}), $.value.querySelectorAll('a[href$=".pdf"], a[data-type="pdf"]').forEach((
|
|
1576
|
-
|
|
1577
|
-
}), $.value.querySelectorAll(".artifactuse-pdf-container, [data-pdf-viewer]").forEach((
|
|
1578
|
-
|
|
1579
|
-
}), $.value.querySelectorAll(".artifactuse-video-preview-wrapper, .video-preview-wrapper").forEach((
|
|
1580
|
-
|
|
1573
|
+
$.value.querySelectorAll("img").forEach((E) => {
|
|
1574
|
+
E._lightboxHandler && (E.removeEventListener("click", E._lightboxHandler), delete E._lightboxHandler);
|
|
1575
|
+
}), $.value.querySelectorAll('a[href$=".pdf"], a[data-type="pdf"]').forEach((E) => {
|
|
1576
|
+
E._pdfHandler && (E.removeEventListener("click", E._pdfHandler), delete E._pdfHandler);
|
|
1577
|
+
}), $.value.querySelectorAll(".artifactuse-pdf-container, [data-pdf-viewer]").forEach((E) => {
|
|
1578
|
+
E._pdfHandler && (E.removeEventListener("click", E._pdfHandler), delete E._pdfHandler);
|
|
1579
|
+
}), $.value.querySelectorAll(".artifactuse-video-preview-wrapper, .video-preview-wrapper").forEach((E) => {
|
|
1580
|
+
E._clickHandler && (E.removeEventListener("click", E._clickHandler), delete E._clickHandler);
|
|
1581
1581
|
});
|
|
1582
1582
|
}
|
|
1583
|
-
function
|
|
1584
|
-
|
|
1585
|
-
if (await
|
|
1583
|
+
function u() {
|
|
1584
|
+
N && clearTimeout(N), N = setTimeout(async () => {
|
|
1585
|
+
if (await xe(), r != null && r.initializeContent && $.value)
|
|
1586
1586
|
try {
|
|
1587
|
-
await
|
|
1587
|
+
await r.initializeContent($.value);
|
|
1588
1588
|
} catch (C) {
|
|
1589
1589
|
console.error("Failed to initialize content:", C);
|
|
1590
1590
|
}
|
|
1591
|
-
|
|
1591
|
+
b();
|
|
1592
1592
|
}, 100);
|
|
1593
1593
|
}
|
|
1594
|
-
|
|
1594
|
+
ne(
|
|
1595
1595
|
() => T.content,
|
|
1596
1596
|
(C) => {
|
|
1597
1597
|
if (C) {
|
|
1598
|
-
const
|
|
1598
|
+
const q = n(C, T.messageId, {
|
|
1599
1599
|
inlinePreview: T.inlinePreview,
|
|
1600
1600
|
inlineCode: T.inlineCode,
|
|
1601
1601
|
tabs: T.tabs,
|
|
1602
1602
|
viewMode: T.viewMode
|
|
1603
1603
|
});
|
|
1604
|
-
|
|
1604
|
+
I.value = q.html, x.value = q.artifacts, q.artifacts.length > 0 && f("artifact-detected", q.artifacts), T.typing || u();
|
|
1605
1605
|
}
|
|
1606
1606
|
},
|
|
1607
1607
|
{ immediate: !0 }
|
|
1608
|
-
),
|
|
1608
|
+
), ne(
|
|
1609
1609
|
() => T.typing,
|
|
1610
|
-
(C,
|
|
1611
|
-
|
|
1610
|
+
(C, q) => {
|
|
1611
|
+
q === !0 && C === !1 && u();
|
|
1612
1612
|
}
|
|
1613
|
-
),
|
|
1614
|
-
T.typing ||
|
|
1615
|
-
}),
|
|
1616
|
-
|
|
1613
|
+
), Ee(() => {
|
|
1614
|
+
T.typing || u();
|
|
1615
|
+
}), pa(() => {
|
|
1616
|
+
N && clearTimeout(N), B();
|
|
1617
1617
|
});
|
|
1618
|
-
function
|
|
1619
|
-
const
|
|
1620
|
-
if (
|
|
1621
|
-
if (
|
|
1622
|
-
const
|
|
1623
|
-
if (
|
|
1624
|
-
const
|
|
1625
|
-
|
|
1618
|
+
function z(C) {
|
|
1619
|
+
const q = C.target.closest(".artifactuse-inline-preview");
|
|
1620
|
+
if (q) {
|
|
1621
|
+
if (q.dataset.nonClickable) return;
|
|
1622
|
+
const j = q.dataset.artifactId;
|
|
1623
|
+
if (j) {
|
|
1624
|
+
const le = H.artifacts.find((E) => E.id === j);
|
|
1625
|
+
le && o(le);
|
|
1626
1626
|
}
|
|
1627
1627
|
}
|
|
1628
1628
|
}
|
|
1629
|
-
function
|
|
1630
|
-
|
|
1629
|
+
function o(C) {
|
|
1630
|
+
O(C), f("artifact-open", C);
|
|
1631
1631
|
}
|
|
1632
|
-
function
|
|
1633
|
-
|
|
1632
|
+
function P(C) {
|
|
1633
|
+
f("artifact-copy", C);
|
|
1634
1634
|
}
|
|
1635
1635
|
function se(C) {
|
|
1636
|
-
|
|
1636
|
+
f("artifact-download", C);
|
|
1637
1637
|
}
|
|
1638
|
-
function
|
|
1639
|
-
|
|
1638
|
+
function te(C) {
|
|
1639
|
+
f("form-submit", C);
|
|
1640
1640
|
}
|
|
1641
1641
|
function be(C) {
|
|
1642
|
-
|
|
1642
|
+
f("form-cancel", C);
|
|
1643
1643
|
}
|
|
1644
|
-
function
|
|
1645
|
-
|
|
1644
|
+
function ge(C) {
|
|
1645
|
+
f("form-button-click", C);
|
|
1646
1646
|
}
|
|
1647
|
-
function
|
|
1648
|
-
|
|
1647
|
+
function $e(C) {
|
|
1648
|
+
f("social-copy", C);
|
|
1649
1649
|
}
|
|
1650
|
-
return
|
|
1650
|
+
return k(() => H.artifacts.filter((C) => C.messageId === T.messageId)), d({
|
|
1651
1651
|
openViewer: W,
|
|
1652
|
-
closeViewer:
|
|
1653
|
-
attachMediaListeners:
|
|
1654
|
-
}), (C,
|
|
1652
|
+
closeViewer: X,
|
|
1653
|
+
attachMediaListeners: b
|
|
1654
|
+
}), (C, q) => (s(), l("div", {
|
|
1655
1655
|
class: "artifactuse-agent-message",
|
|
1656
1656
|
ref_key: "messageRef",
|
|
1657
1657
|
ref: h
|
|
@@ -1660,164 +1660,182 @@ const da = { class: "artifactuse-card__icon" }, va = ["innerHTML"], fa = { class
|
|
|
1660
1660
|
class: "artifactuse-message-content",
|
|
1661
1661
|
ref_key: "contentRef",
|
|
1662
1662
|
ref: $,
|
|
1663
|
-
onClick:
|
|
1663
|
+
onClick: z
|
|
1664
1664
|
}, [
|
|
1665
|
-
(
|
|
1666
|
-
|
|
1665
|
+
(s(!0), l(V, null, fe(oe.value, (j, le) => (s(), l(V, { key: le }, [
|
|
1666
|
+
j.type === "html" ? (s(), l("div", {
|
|
1667
1667
|
key: 0,
|
|
1668
|
-
innerHTML:
|
|
1669
|
-
}, null, 8,
|
|
1668
|
+
innerHTML: j.content
|
|
1669
|
+
}, null, 8, zi)) : j.type === "form" && j.artifact.isInline ? (s(), Pe(Cs, {
|
|
1670
1670
|
key: 1,
|
|
1671
|
-
artifact:
|
|
1671
|
+
artifact: j.artifact,
|
|
1672
1672
|
theme: K.value,
|
|
1673
|
-
"initial-state":
|
|
1674
|
-
onSubmit:
|
|
1673
|
+
"initial-state": w.value,
|
|
1674
|
+
onSubmit: te,
|
|
1675
1675
|
onCancel: be,
|
|
1676
|
-
onButtonClick:
|
|
1677
|
-
}, null, 8, ["artifact", "theme", "initial-state"])) :
|
|
1676
|
+
onButtonClick: ge
|
|
1677
|
+
}, null, 8, ["artifact", "theme", "initial-state"])) : j.type === "social" ? (s(), Pe(Mi, {
|
|
1678
1678
|
key: 2,
|
|
1679
|
-
artifact:
|
|
1679
|
+
artifact: j.artifact,
|
|
1680
1680
|
theme: K.value,
|
|
1681
|
-
onCopy:
|
|
1682
|
-
}, null, 8, ["artifact", "theme"])) :
|
|
1681
|
+
onCopy: $e
|
|
1682
|
+
}, null, 8, ["artifact", "theme"])) : j.type === "panel" && pe.value ? (s(), Pe(Sa, {
|
|
1683
1683
|
key: 3,
|
|
1684
|
-
artifact:
|
|
1685
|
-
"is-active": Z.value ===
|
|
1686
|
-
onOpen:
|
|
1687
|
-
onCopy:
|
|
1684
|
+
artifact: j.artifact,
|
|
1685
|
+
"is-active": Z.value === j.artifact.id,
|
|
1686
|
+
onOpen: o,
|
|
1687
|
+
onCopy: P,
|
|
1688
1688
|
onDownload: se
|
|
1689
1689
|
}, null, 8, ["artifact", "is-active"])) : v("", !0)
|
|
1690
1690
|
], 64))), 128))
|
|
1691
1691
|
], 512),
|
|
1692
|
-
|
|
1693
|
-
"is-open":
|
|
1694
|
-
type:
|
|
1692
|
+
De(Si, {
|
|
1693
|
+
"is-open": D.value,
|
|
1694
|
+
type: J.value,
|
|
1695
1695
|
src: ee.value,
|
|
1696
|
-
alt:
|
|
1697
|
-
caption:
|
|
1698
|
-
onClose:
|
|
1696
|
+
alt: S.value,
|
|
1697
|
+
caption: ce.value,
|
|
1698
|
+
onClose: X
|
|
1699
1699
|
}, null, 8, ["is-open", "type", "src", "alt", "caption"])
|
|
1700
1700
|
], 512));
|
|
1701
1701
|
}
|
|
1702
|
-
},
|
|
1702
|
+
}, Vi = { class: "artifactuse-panel__header artifactuse-panel__header--simple" }, Ii = { class: "artifactuse-panel__title" }, Fi = { class: "artifactuse-panel__icon" }, Ri = {
|
|
1703
1703
|
key: 0,
|
|
1704
1704
|
viewBox: "0 0 24 24",
|
|
1705
1705
|
fill: "none",
|
|
1706
1706
|
stroke: "currentColor",
|
|
1707
1707
|
"stroke-width": "2"
|
|
1708
|
-
},
|
|
1708
|
+
}, qi = {
|
|
1709
1709
|
key: 1,
|
|
1710
1710
|
viewBox: "0 0 24 24",
|
|
1711
1711
|
fill: "none",
|
|
1712
1712
|
stroke: "currentColor",
|
|
1713
1713
|
"stroke-width": "2"
|
|
1714
|
-
},
|
|
1714
|
+
}, Oi = { class: "artifactuse-panel__title-content" }, Ui = { class: "artifactuse-panel__name" }, Di = { class: "artifactuse-panel__actions" }, ji = { class: "artifactuse-panel__empty" }, Ni = { class: "artifactuse-panel__empty-title" }, Wi = { class: "artifactuse-panel__empty-text" }, Ji = { class: "artifactuse-panel__footer artifactuse-panel__footer--simple" }, Xi = {
|
|
1715
1715
|
key: 0,
|
|
1716
1716
|
href: "https://artifactuse.com",
|
|
1717
1717
|
target: "_blank",
|
|
1718
1718
|
rel: "noopener noreferrer",
|
|
1719
1719
|
class: "artifactuse-panel__branding"
|
|
1720
|
-
},
|
|
1720
|
+
}, Zi = { class: "artifactuse-panel__header artifactuse-panel__header--simple" }, Ki = { class: "artifactuse-panel__title" }, Yi = { class: "artifactuse-panel__title-content" }, Gi = { class: "artifactuse-panel__meta" }, Qi = { class: "artifactuse-panel__actions" }, en = ["disabled"], tn = {
|
|
1721
1721
|
key: 0,
|
|
1722
1722
|
viewBox: "0 0 24 24",
|
|
1723
1723
|
fill: "none",
|
|
1724
1724
|
stroke: "currentColor",
|
|
1725
1725
|
"stroke-width": "2"
|
|
1726
|
-
},
|
|
1726
|
+
}, an = {
|
|
1727
1727
|
key: 1,
|
|
1728
1728
|
class: "artifactuse-panel__spinner-icon",
|
|
1729
1729
|
viewBox: "0 0 24 24",
|
|
1730
1730
|
fill: "none",
|
|
1731
1731
|
stroke: "currentColor",
|
|
1732
1732
|
"stroke-width": "2"
|
|
1733
|
-
},
|
|
1733
|
+
}, sn = { class: "artifactuse-panel__list" }, ln = { class: "artifactuse-panel__list-items" }, nn = ["onClick"], on = ["innerHTML"], rn = { class: "artifactuse-panel__list-item-content" }, cn = { class: "artifactuse-panel__list-item-title" }, un = { class: "artifactuse-panel__list-item-meta" }, dn = { class: "artifactuse-panel__footer artifactuse-panel__footer--simple" }, vn = {
|
|
1734
1734
|
key: 0,
|
|
1735
1735
|
href: "https://artifactuse.com",
|
|
1736
1736
|
target: "_blank",
|
|
1737
1737
|
rel: "noopener noreferrer",
|
|
1738
1738
|
class: "artifactuse-panel__branding"
|
|
1739
|
-
},
|
|
1739
|
+
}, fn = { class: "artifactuse-panel__header" }, pn = ["title"], _n = { class: "artifactuse-panel__title" }, hn = ["innerHTML"], mn = { class: "artifactuse-panel__title-content" }, yn = { class: "artifactuse-panel__name" }, gn = { class: "artifactuse-panel__meta" }, kn = { class: "artifactuse-panel__tabs" }, wn = ["disabled"], bn = ["disabled"], Cn = { class: "artifactuse-panel__actions" }, xn = ["title"], $n = {
|
|
1740
1740
|
key: 0,
|
|
1741
1741
|
viewBox: "0 0 24 24",
|
|
1742
1742
|
fill: "none",
|
|
1743
1743
|
stroke: "currentColor",
|
|
1744
1744
|
"stroke-width": "2"
|
|
1745
|
-
},
|
|
1745
|
+
}, Mn = {
|
|
1746
1746
|
key: 1,
|
|
1747
1747
|
viewBox: "0 0 24 24",
|
|
1748
1748
|
fill: "none",
|
|
1749
1749
|
stroke: "currentColor",
|
|
1750
1750
|
"stroke-width": "2"
|
|
1751
|
-
},
|
|
1751
|
+
}, Tn = {
|
|
1752
1752
|
key: 0,
|
|
1753
1753
|
class: "artifactuse-panel__file-tabs"
|
|
1754
|
-
},
|
|
1754
|
+
}, Ln = { class: "artifactuse-panel__file-tabs-scroll" }, Pn = ["onClick"], En = ["innerHTML"], An = { class: "artifactuse-panel__file-tab-title" }, Hn = ["onClick"], Bn = {
|
|
1755
1755
|
key: 0,
|
|
1756
1756
|
class: "artifactuse-panel__loading"
|
|
1757
|
-
},
|
|
1757
|
+
}, Sn = {
|
|
1758
1758
|
key: 0,
|
|
1759
1759
|
class: "artifactuse-panel__loading"
|
|
1760
|
-
},
|
|
1760
|
+
}, zn = {
|
|
1761
|
+
key: 0,
|
|
1762
|
+
class: "artifactuse-panel__binary artifactuse-panel__binary--image"
|
|
1763
|
+
}, Vn = ["src", "alt"], In = {
|
|
1764
|
+
key: 1,
|
|
1765
|
+
class: "artifactuse-panel__binary artifactuse-panel__binary--audio"
|
|
1766
|
+
}, Fn = ["src"], Rn = {
|
|
1761
1767
|
key: 2,
|
|
1768
|
+
class: "artifactuse-panel__binary artifactuse-panel__binary--video"
|
|
1769
|
+
}, qn = ["src"], On = {
|
|
1770
|
+
key: 3,
|
|
1771
|
+
class: "artifactuse-panel__binary artifactuse-panel__binary--pdf"
|
|
1772
|
+
}, Un = ["src"], Dn = {
|
|
1773
|
+
key: 4,
|
|
1774
|
+
class: "artifactuse-panel__binary artifactuse-panel__binary--font"
|
|
1775
|
+
}, jn = {
|
|
1776
|
+
key: 5,
|
|
1777
|
+
class: "artifactuse-panel__binary artifactuse-panel__binary--hex"
|
|
1778
|
+
}, Nn = { class: "artifactuse-panel__hex-dump" }, Wn = ["src"], Jn = {
|
|
1779
|
+
key: 1,
|
|
1762
1780
|
class: "artifactuse-panel__no-preview"
|
|
1763
|
-
},
|
|
1781
|
+
}, Xn = { class: "artifactuse-panel__edit" }, Zn = { class: "artifactuse-panel__console-type" }, Kn = { class: "artifactuse-panel__console-content" }, Yn = { class: "artifactuse-panel__console-timestamp" }, Gn = { class: "artifactuse-panel__footer" }, Qn = { class: "artifactuse-panel__footer-left" }, eo = {
|
|
1764
1782
|
key: 0,
|
|
1765
1783
|
href: "https://artifactuse.com",
|
|
1766
1784
|
target: "_blank",
|
|
1767
1785
|
rel: "noopener noreferrer",
|
|
1768
1786
|
class: "artifactuse-panel__branding"
|
|
1769
|
-
},
|
|
1787
|
+
}, to = {
|
|
1770
1788
|
key: 1,
|
|
1771
1789
|
class: "artifactuse-panel__badge"
|
|
1772
|
-
},
|
|
1790
|
+
}, ao = { class: "artifactuse-panel__footer-right" }, so = ["title"], lo = {
|
|
1773
1791
|
key: 0,
|
|
1774
1792
|
viewBox: "0 0 24 24",
|
|
1775
1793
|
fill: "none",
|
|
1776
1794
|
stroke: "currentColor",
|
|
1777
1795
|
"stroke-width": "2"
|
|
1778
|
-
},
|
|
1796
|
+
}, io = {
|
|
1779
1797
|
key: 1,
|
|
1780
1798
|
viewBox: "0 0 24 24",
|
|
1781
1799
|
fill: "none",
|
|
1782
1800
|
stroke: "currentColor",
|
|
1783
1801
|
"stroke-width": "2"
|
|
1784
|
-
},
|
|
1802
|
+
}, no = {
|
|
1785
1803
|
key: 0,
|
|
1786
1804
|
style: { position: "relative" }
|
|
1787
|
-
},
|
|
1805
|
+
}, oo = {
|
|
1788
1806
|
key: 0,
|
|
1789
1807
|
class: "artifactuse-share-popup"
|
|
1790
|
-
},
|
|
1808
|
+
}, ro = { class: "artifactuse-share-popup__header" }, co = { class: "artifactuse-share-popup__title" }, uo = { class: "artifactuse-share-popup__body" }, vo = {
|
|
1791
1809
|
key: 0,
|
|
1792
1810
|
class: "artifactuse-share-popup__loading"
|
|
1793
|
-
},
|
|
1811
|
+
}, fo = { key: 1 }, po = { class: "artifactuse-share-popup__error" }, _o = { class: "artifactuse-share-popup__error-text" }, ho = { class: "artifactuse-share-popup__actions" }, mo = {
|
|
1794
1812
|
key: 2,
|
|
1795
1813
|
class: "artifactuse-share-popup__options"
|
|
1796
|
-
},
|
|
1814
|
+
}, yo = { key: 3 }, go = {
|
|
1797
1815
|
key: 0,
|
|
1798
1816
|
class: "artifactuse-share-popup__loading"
|
|
1799
|
-
},
|
|
1817
|
+
}, ko = {
|
|
1800
1818
|
key: 1,
|
|
1801
1819
|
class: "artifactuse-share-popup__empty"
|
|
1802
|
-
},
|
|
1820
|
+
}, wo = {
|
|
1803
1821
|
key: 2,
|
|
1804
1822
|
class: "artifactuse-share-popup__artifact-list"
|
|
1805
|
-
},
|
|
1823
|
+
}, bo = ["onClick"], Co = { class: "artifactuse-share-popup__artifact-name" }, xo = { class: "artifactuse-share-popup__artifact-date" }, $o = {
|
|
1806
1824
|
key: 4,
|
|
1807
1825
|
class: "artifactuse-share-popup__success"
|
|
1808
|
-
},
|
|
1826
|
+
}, Mo = { class: "artifactuse-share-popup__link-wrapper" }, To = ["value"], Lo = {
|
|
1809
1827
|
key: 0,
|
|
1810
1828
|
class: "artifactuse-share-popup__expiry"
|
|
1811
|
-
},
|
|
1829
|
+
}, Po = { class: "artifactuse-share-popup__expiry-text" }, Eo = {
|
|
1812
1830
|
key: 1,
|
|
1813
1831
|
class: "artifactuse-share-popup__save-prompt"
|
|
1814
|
-
},
|
|
1832
|
+
}, Ao = {
|
|
1815
1833
|
key: 2,
|
|
1816
1834
|
class: "artifactuse-panel__nav"
|
|
1817
|
-
},
|
|
1835
|
+
}, Ho = ["disabled"], Bo = ["disabled"], So = {
|
|
1818
1836
|
key: 0,
|
|
1819
1837
|
class: "artifactuse-panel__artifact-list"
|
|
1820
|
-
},
|
|
1838
|
+
}, zo = { class: "artifactuse-panel__artifact-list-header" }, Vo = { class: "artifactuse-panel__artifact-list-items" }, Io = ["onClick"], Fo = ["innerHTML"], Ro = { class: "artifactuse-panel__artifact-item-content" }, qo = { class: "artifactuse-panel__artifact-item-title" }, Oo = { class: "artifactuse-panel__artifact-item-meta" }, Uo = { class: "artifactuse-panel__artifact-item-index" }, Ko = {
|
|
1821
1839
|
__name: "ArtifactusePanel",
|
|
1822
1840
|
props: {
|
|
1823
1841
|
panelWidth: { type: Number, default: void 0 },
|
|
@@ -1826,419 +1844,456 @@ const da = { class: "artifactuse-card__icon" }, va = ["innerHTML"], fa = { class
|
|
|
1826
1844
|
consolePanel: { type: Boolean, default: void 0 }
|
|
1827
1845
|
},
|
|
1828
1846
|
emits: ["close", "ai-request", "save", "export", "resize"],
|
|
1829
|
-
setup(
|
|
1830
|
-
var
|
|
1831
|
-
const
|
|
1832
|
-
state:
|
|
1833
|
-
activeArtifact:
|
|
1834
|
-
artifactCount:
|
|
1835
|
-
hasArtifacts:
|
|
1847
|
+
setup(L, { emit: d }) {
|
|
1848
|
+
var wt, bt;
|
|
1849
|
+
const _ = d, T = L, {
|
|
1850
|
+
state: f,
|
|
1851
|
+
activeArtifact: n,
|
|
1852
|
+
artifactCount: O,
|
|
1853
|
+
hasArtifacts: H,
|
|
1836
1854
|
closePanel: g,
|
|
1837
|
-
toggleFullscreen:
|
|
1855
|
+
toggleFullscreen: r,
|
|
1838
1856
|
setViewMode: h,
|
|
1839
1857
|
getPanelUrl: $,
|
|
1840
|
-
openArtifact:
|
|
1858
|
+
openArtifact: I,
|
|
1841
1859
|
instance: x
|
|
1842
|
-
} =
|
|
1843
|
-
let
|
|
1844
|
-
const
|
|
1845
|
-
|
|
1846
|
-
|
|
1847
|
-
|
|
1848
|
-
|
|
1849
|
-
),
|
|
1850
|
-
Math.min(Math.max(T.
|
|
1851
|
-
),
|
|
1852
|
-
|
|
1853
|
-
|
|
1854
|
-
|
|
1860
|
+
} = je(), N = M(null), D = M(null), J = M(null), ee = M(null), S = M(null), ce = M(null), K = M(!1), Z = M(!1), pe = M(!0), m = M(!1), w = M(!1), ie = M(!1), oe = M({});
|
|
1861
|
+
let W = null;
|
|
1862
|
+
const X = M([]), b = M(!1), B = M(null), u = M(/* @__PURE__ */ new Set(["log", "warn", "error", "info"])), z = M(!1), o = M("options"), P = M(""), se = M(null), te = M(""), be = M(!1), ge = M(!1), $e = M([]), C = M(!1), q = M("");
|
|
1863
|
+
let j = null, le = null, E = null, Q = null;
|
|
1864
|
+
const y = k(() => {
|
|
1865
|
+
var a;
|
|
1866
|
+
return ((a = x.editor) == null ? void 0 : a.isAvailable()) || !1;
|
|
1867
|
+
}), U = M(
|
|
1868
|
+
Math.min(Math.max(T.panelWidth ?? ((wt = x.config) == null ? void 0 : wt.panelWidth) ?? 65, 25), 75)
|
|
1869
|
+
), Y = M(
|
|
1870
|
+
Math.min(Math.max(T.splitPosition ?? ((bt = x.config) == null ? void 0 : bt.splitPosition) ?? 50, 20), 80)
|
|
1871
|
+
), ue = k(() => n.value ? Ue(n.value.language) : ""), Ae = k(() => n.value ? `<svg viewBox="0 0 24 24" fill="currentColor">${tt(n.value.language)}</svg>` : ""), Ce = k(() => {
|
|
1872
|
+
if (!n.value) return null;
|
|
1873
|
+
let a = $(n.value);
|
|
1874
|
+
return a && n.value._refreshToken && (a += (a.includes("?") ? "&" : "?") + "_t=" + n.value._refreshToken), a;
|
|
1855
1875
|
});
|
|
1856
|
-
|
|
1857
|
-
const
|
|
1858
|
-
var
|
|
1859
|
-
return ((
|
|
1860
|
-
}),
|
|
1861
|
-
var
|
|
1862
|
-
return
|
|
1863
|
-
}),
|
|
1864
|
-
|
|
1865
|
-
|
|
1866
|
-
t.has(l) ? t.delete(l) : t.add(l), w.value = t;
|
|
1867
|
-
}
|
|
1868
|
-
const $t = b(() => {
|
|
1869
|
-
var l;
|
|
1870
|
-
return (T.consolePanel ?? ((l = x == null ? void 0 : x.config) == null ? void 0 : l.consolePanel)) !== !1 && Q.value.length > 0;
|
|
1871
|
-
}), Mt = b(() => {
|
|
1872
|
-
var l;
|
|
1873
|
-
return ((l = x.share) == null ? void 0 : l.enabled) !== !1;
|
|
1874
|
-
}), tt = b(() => {
|
|
1875
|
-
var l;
|
|
1876
|
-
return ((l = x.share) == null ? void 0 : l.isAuthenticated()) || !1;
|
|
1877
|
-
}), Tt = b(() => !r.value && !_.forceEmptyView ? Math.min(te.value, 30) : te.value), Ee = b(() => {
|
|
1878
|
-
var l;
|
|
1879
|
-
return ((l = x.config) == null ? void 0 : l.multiTab) === !0;
|
|
1880
|
-
}), xe = b(() => _.forceEmptyView), at = b(() => Ee.value ? _.openTabs.map((l) => _.artifacts.find((t) => t.id === l)).filter(Boolean) : []);
|
|
1881
|
-
function Ue(l) {
|
|
1882
|
-
return `<svg viewBox="0 0 24 24" fill="currentColor">${Ze(l)}</svg>`;
|
|
1883
|
-
}
|
|
1884
|
-
function Lt(l) {
|
|
1885
|
-
V(l);
|
|
1886
|
-
}
|
|
1887
|
-
function Pt(l) {
|
|
1888
|
-
x.closeTab(l), _.openTabs.length === 0 && (k.value = !1);
|
|
1889
|
-
}
|
|
1890
|
-
function Et() {
|
|
1891
|
-
k.value = !1, x.state.clearActiveArtifact();
|
|
1892
|
-
}
|
|
1893
|
-
function st(l) {
|
|
1894
|
-
if (l.language !== "smartdiff") return null;
|
|
1876
|
+
k(() => !n.value || !f.artifacts.length ? -1 : f.artifacts.findIndex((a) => a.id === n.value.id));
|
|
1877
|
+
const Ve = k(() => n.value ? ma(n.value.language || "plaintext") : "plaintext"), _e = k(() => f.artifacts.filter((a) => !a.isInline)), He = k(() => n.value ? _e.value.findIndex((a) => a.id === n.value.id) : -1), Ne = k(() => {
|
|
1878
|
+
var a;
|
|
1879
|
+
return ((a = x.config) == null ? void 0 : a.branding) !== !1;
|
|
1880
|
+
}), lt = ["image", "audio", "video", "pdf", "font", "binary"], Be = k(() => {
|
|
1881
|
+
var a;
|
|
1882
|
+
return lt.includes((a = n.value) == null ? void 0 : a.language);
|
|
1883
|
+
}), we = k(() => Be.value ? n.value.language : null), We = k(() => we.value !== "font" || !n.value ? "" : `apfont_${n.value.id.replace(/[^a-zA-Z0-9]/g, "_")}`), Ht = k(() => {
|
|
1884
|
+
var a;
|
|
1885
|
+
if (we.value !== "binary" || !((a = n.value) != null && a.code)) return "";
|
|
1895
1886
|
try {
|
|
1896
|
-
const t =
|
|
1887
|
+
const t = atob(n.value.code.slice(0, 684)), c = Math.min(t.length, 512), A = [];
|
|
1888
|
+
for (let F = 0; F < c; F += 16) {
|
|
1889
|
+
const he = t.slice(F, F + 16), de = Array.from(he).map((ae) => ae.charCodeAt(0).toString(16).padStart(2, "0")).join(" "), ve = Array.from(he).map((ae) => {
|
|
1890
|
+
const ye = ae.charCodeAt(0);
|
|
1891
|
+
return ye >= 32 && ye < 127 ? ae : ".";
|
|
1892
|
+
}).join("");
|
|
1893
|
+
A.push(`${F.toString(16).padStart(8, "0")} ${de.padEnd(47, " ")} ${ve}`);
|
|
1894
|
+
}
|
|
1895
|
+
return (c < t.length || n.value.code.length > 684) && A.push("..."), A.join(`
|
|
1896
|
+
`);
|
|
1897
|
+
} catch {
|
|
1898
|
+
return "(unable to decode)";
|
|
1899
|
+
}
|
|
1900
|
+
}), Bt = k(() => {
|
|
1901
|
+
var a, t;
|
|
1902
|
+
return Ce.value ? ((a = n.value) == null ? void 0 : a.externalPreview) !== void 0 ? n.value.externalPreview : T.externalPreview !== void 0 ? T.externalPreview : ((t = x.config) == null ? void 0 : t.externalPreview) ?? !1 : !1;
|
|
1903
|
+
}), Je = k(() => X.value.filter((a) => a.type === "error").length), it = k(() => X.value.filter((a) => a.type === "warn").length), nt = k(() => X.value.filter((a) => a.type === "info").length), ot = k(() => X.value.filter((a) => a.type === "log").length), St = k(() => X.value.filter((a) => u.value.has(a.type)));
|
|
1904
|
+
function Ie(a) {
|
|
1905
|
+
const t = new Set(u.value);
|
|
1906
|
+
t.has(a) ? t.delete(a) : t.add(a), u.value = t;
|
|
1907
|
+
}
|
|
1908
|
+
const zt = k(() => {
|
|
1909
|
+
var a;
|
|
1910
|
+
return (T.consolePanel ?? ((a = x == null ? void 0 : x.config) == null ? void 0 : a.consolePanel)) !== !1 && X.value.length > 0;
|
|
1911
|
+
}), Vt = k(() => {
|
|
1912
|
+
var a;
|
|
1913
|
+
return ((a = x.share) == null ? void 0 : a.enabled) !== !1;
|
|
1914
|
+
}), rt = k(() => {
|
|
1915
|
+
var a;
|
|
1916
|
+
return ((a = x.share) == null ? void 0 : a.isAuthenticated()) || !1;
|
|
1917
|
+
}), It = k(() => !n.value && !f.forceEmptyView ? Math.min(U.value, 30) : U.value), Se = k(() => {
|
|
1918
|
+
var a;
|
|
1919
|
+
return ((a = x.config) == null ? void 0 : a.multiTab) === !0;
|
|
1920
|
+
}), Me = k(() => f.forceEmptyView), ct = k(() => Se.value ? f.openTabs.map((a) => f.artifacts.find((t) => t.id === a)).filter(Boolean) : []);
|
|
1921
|
+
function Xe(a) {
|
|
1922
|
+
return `<svg viewBox="0 0 24 24" fill="currentColor">${tt(a)}</svg>`;
|
|
1923
|
+
}
|
|
1924
|
+
function Ft(a) {
|
|
1925
|
+
I(a);
|
|
1926
|
+
}
|
|
1927
|
+
function Fe(a) {
|
|
1928
|
+
if (!(a != null && a.code)) return null;
|
|
1929
|
+
if (oe.value[a.id]) return oe.value[a.id];
|
|
1930
|
+
const t = a.fileExtension || a.language, c = ba(a.code, Mt(t));
|
|
1931
|
+
return oe.value[a.id] = c, c;
|
|
1932
|
+
}
|
|
1933
|
+
function ut(a) {
|
|
1934
|
+
oe.value[a] && (ka(oe.value[a]), delete oe.value[a]);
|
|
1935
|
+
}
|
|
1936
|
+
function Rt(a) {
|
|
1937
|
+
ut(a), x.closeTab(a), f.openTabs.length === 0 && (w.value = !1);
|
|
1938
|
+
}
|
|
1939
|
+
function qt() {
|
|
1940
|
+
w.value = !1, x.state.clearActiveArtifact();
|
|
1941
|
+
}
|
|
1942
|
+
function dt(a) {
|
|
1943
|
+
if (a.language !== "smartdiff") return null;
|
|
1944
|
+
try {
|
|
1945
|
+
const t = JSON.parse(a.code);
|
|
1897
1946
|
if (t.oldCode === void 0 || t.newCode === void 0) return null;
|
|
1898
|
-
const
|
|
1947
|
+
const c = t.language || "plaintext", A = $t() && window.Prism.languages[c], F = ya(t.oldCode, t.newCode).split(`
|
|
1899
1948
|
`);
|
|
1900
|
-
return { html:
|
|
1901
|
-
const
|
|
1902
|
-
return
|
|
1949
|
+
return { html: F.map((de) => {
|
|
1950
|
+
const ve = de[0], ae = de.slice(1), ye = A ? window.Prism.highlight(ae, A, c) : ae;
|
|
1951
|
+
return ve === "-" ? `<span class="token deleted">${ye}</span>` : ve === "+" ? `<span class="token inserted">${ye}</span>` : ye;
|
|
1903
1952
|
}).join(`
|
|
1904
|
-
`), lineCount:
|
|
1953
|
+
`), lineCount: F.length };
|
|
1905
1954
|
} catch {
|
|
1906
1955
|
return null;
|
|
1907
1956
|
}
|
|
1908
1957
|
}
|
|
1909
|
-
function
|
|
1910
|
-
var
|
|
1911
|
-
if (ee.value && ((
|
|
1912
|
-
const t =
|
|
1958
|
+
function Ot() {
|
|
1959
|
+
var a;
|
|
1960
|
+
if (ee.value && ((a = n.value) != null && a.code)) {
|
|
1961
|
+
const t = dt(n.value), c = t ? t.lineCount : n.value.code.split(`
|
|
1913
1962
|
`).length;
|
|
1914
|
-
ee.value.innerHTML = Array.from({ length:
|
|
1963
|
+
ee.value.innerHTML = Array.from({ length: c }, (A, F) => `<div>${F + 1}</div>`).join("");
|
|
1915
1964
|
}
|
|
1916
1965
|
}
|
|
1917
|
-
function
|
|
1918
|
-
var
|
|
1919
|
-
if (
|
|
1920
|
-
const t =
|
|
1966
|
+
function Ut() {
|
|
1967
|
+
var a;
|
|
1968
|
+
if (D.value && $t() && ((a = n.value) != null && a.code)) {
|
|
1969
|
+
const t = dt(n.value);
|
|
1921
1970
|
if (t)
|
|
1922
|
-
|
|
1971
|
+
D.value.innerHTML = t.html;
|
|
1923
1972
|
else {
|
|
1924
|
-
const
|
|
1925
|
-
|
|
1926
|
-
|
|
1927
|
-
|
|
1928
|
-
|
|
1929
|
-
) :
|
|
1973
|
+
const c = window.Prism.languages[Ve.value];
|
|
1974
|
+
c ? D.value.innerHTML = window.Prism.highlight(
|
|
1975
|
+
n.value.code,
|
|
1976
|
+
c,
|
|
1977
|
+
Ve.value
|
|
1978
|
+
) : D.value.textContent = n.value.code;
|
|
1930
1979
|
}
|
|
1931
|
-
|
|
1932
|
-
|
|
1980
|
+
D.value.dataset.highlighted = "true", xe(() => {
|
|
1981
|
+
Dt();
|
|
1933
1982
|
});
|
|
1934
1983
|
}
|
|
1935
1984
|
}
|
|
1936
|
-
function
|
|
1985
|
+
function Dt() {
|
|
1937
1986
|
var t;
|
|
1938
|
-
const
|
|
1939
|
-
if (
|
|
1940
|
-
const
|
|
1941
|
-
|
|
1987
|
+
const a = (t = D.value) == null ? void 0 : t.closest("pre");
|
|
1988
|
+
if (a && S.value && ee.value) {
|
|
1989
|
+
const A = window.getComputedStyle(a).backgroundColor;
|
|
1990
|
+
A && A !== "rgba(0, 0, 0, 0)" && A !== "transparent" && (S.value.style.backgroundColor = A, ee.value.style.backgroundColor = A);
|
|
1942
1991
|
}
|
|
1943
1992
|
}
|
|
1944
|
-
function
|
|
1945
|
-
|
|
1993
|
+
function jt() {
|
|
1994
|
+
S.value && (S.value.style.backgroundColor = ""), ee.value && (ee.value.style.backgroundColor = "");
|
|
1946
1995
|
}
|
|
1947
|
-
function
|
|
1948
|
-
|
|
1949
|
-
|
|
1996
|
+
function Re() {
|
|
1997
|
+
xe(() => {
|
|
1998
|
+
Ot(), Ut();
|
|
1950
1999
|
});
|
|
1951
2000
|
}
|
|
1952
|
-
function
|
|
1953
|
-
!
|
|
1954
|
-
code:
|
|
1955
|
-
language:
|
|
2001
|
+
function vt() {
|
|
2002
|
+
!y.value || !ce.value || !n.value || (Ze(), Q = x.editor.create(ce.value, {
|
|
2003
|
+
code: n.value.code || "",
|
|
2004
|
+
language: n.value.editorLanguage || n.value.language || "plaintext",
|
|
1956
2005
|
sdkTheme: x.getTheme()
|
|
1957
2006
|
}));
|
|
1958
2007
|
}
|
|
1959
|
-
function
|
|
1960
|
-
|
|
2008
|
+
function Ze() {
|
|
2009
|
+
Q && (Q.destroy(), Q = null);
|
|
1961
2010
|
}
|
|
1962
|
-
function
|
|
1963
|
-
if (!
|
|
1964
|
-
const
|
|
2011
|
+
function Nt() {
|
|
2012
|
+
if (!Q || !n.value) return;
|
|
2013
|
+
const a = Q.getCode();
|
|
1965
2014
|
x.emit("edit:save", {
|
|
1966
|
-
artifactId:
|
|
1967
|
-
artifact:
|
|
1968
|
-
code:
|
|
2015
|
+
artifactId: n.value.id,
|
|
2016
|
+
artifact: n.value,
|
|
2017
|
+
code: a
|
|
1969
2018
|
});
|
|
1970
2019
|
}
|
|
1971
|
-
function
|
|
1972
|
-
clearTimeout(
|
|
2020
|
+
function Wt() {
|
|
2021
|
+
clearTimeout(E), pe.value = !1, N.value && n.value && (x.bridge.setIframe(N.value), x.bridge.loadArtifact(n.value));
|
|
1973
2022
|
}
|
|
1974
|
-
function
|
|
1975
|
-
clearTimeout(
|
|
2023
|
+
function Jt() {
|
|
2024
|
+
clearTimeout(E), pe.value = !1;
|
|
1976
2025
|
}
|
|
1977
|
-
function
|
|
1978
|
-
clearTimeout(
|
|
1979
|
-
|
|
2026
|
+
function Xt() {
|
|
2027
|
+
clearTimeout(E), E = setTimeout(() => {
|
|
2028
|
+
pe.value = !1;
|
|
1980
2029
|
}, 1e3);
|
|
1981
2030
|
}
|
|
1982
|
-
async function
|
|
1983
|
-
if (
|
|
2031
|
+
async function Zt() {
|
|
2032
|
+
if (n.value)
|
|
1984
2033
|
try {
|
|
1985
|
-
await navigator.clipboard.writeText(
|
|
2034
|
+
await navigator.clipboard.writeText(n.value.code), K.value = !0, setTimeout(() => {
|
|
1986
2035
|
K.value = !1;
|
|
1987
2036
|
}, 2e3);
|
|
1988
|
-
} catch (
|
|
1989
|
-
console.error("Failed to copy:",
|
|
2037
|
+
} catch (a) {
|
|
2038
|
+
console.error("Failed to copy:", a);
|
|
1990
2039
|
}
|
|
1991
2040
|
}
|
|
1992
|
-
function
|
|
1993
|
-
if (!
|
|
1994
|
-
const { code:
|
|
1995
|
-
|
|
2041
|
+
function Kt() {
|
|
2042
|
+
if (!n.value) return;
|
|
2043
|
+
const { code: a, language: t, editorLanguage: c, title: A } = n.value, F = at(c || t), he = `${A.toLowerCase().replace(/\s+/g, "-")}.${F}`, de = new Blob([a], { type: "text/plain" }), ve = URL.createObjectURL(de), ae = document.createElement("a");
|
|
2044
|
+
ae.href = ve, ae.download = he, document.body.appendChild(ae), ae.click(), document.body.removeChild(ae), URL.revokeObjectURL(ve);
|
|
1996
2045
|
}
|
|
1997
|
-
async function
|
|
1998
|
-
if (!(
|
|
1999
|
-
|
|
2046
|
+
async function Yt() {
|
|
2047
|
+
if (!(ie.value || _e.value.length === 0)) {
|
|
2048
|
+
ie.value = !0;
|
|
2000
2049
|
try {
|
|
2001
|
-
const
|
|
2002
|
-
for (const
|
|
2003
|
-
if (!
|
|
2004
|
-
const
|
|
2005
|
-
let
|
|
2006
|
-
const
|
|
2007
|
-
|
|
2050
|
+
const a = new wa(), t = /* @__PURE__ */ new Map();
|
|
2051
|
+
for (const ve of _e.value) {
|
|
2052
|
+
if (!ve.code) continue;
|
|
2053
|
+
const ae = at(ve.editorLanguage || ve.language);
|
|
2054
|
+
let ye = (ve.title || "untitled").toLowerCase().replace(/\s+/g, "-").replace(/[^a-z0-9-_]/g, ""), Qe = `${ye}.${ae}`;
|
|
2055
|
+
const et = t.get(Qe) || 0;
|
|
2056
|
+
et > 0 && (Qe = `${ye}-${et}.${ae}`), t.set(`${ye}.${ae}`, et + 1), a.file(Qe, ve.code);
|
|
2008
2057
|
}
|
|
2009
|
-
const
|
|
2010
|
-
|
|
2011
|
-
} catch (
|
|
2012
|
-
console.error("Failed to create ZIP:",
|
|
2058
|
+
const c = await a.generateAsync({ type: "blob" }), F = `artifacts-${(/* @__PURE__ */ new Date()).toISOString().slice(0, 10)}.zip`, he = URL.createObjectURL(c), de = document.createElement("a");
|
|
2059
|
+
de.href = he, de.download = F, document.body.appendChild(de), de.click(), document.body.removeChild(de), URL.revokeObjectURL(he);
|
|
2060
|
+
} catch (a) {
|
|
2061
|
+
console.error("Failed to create ZIP:", a);
|
|
2013
2062
|
} finally {
|
|
2014
|
-
|
|
2063
|
+
ie.value = !1;
|
|
2015
2064
|
}
|
|
2016
2065
|
}
|
|
2017
2066
|
}
|
|
2018
|
-
function
|
|
2019
|
-
if (
|
|
2020
|
-
|
|
2067
|
+
function Gt() {
|
|
2068
|
+
if (z.value) {
|
|
2069
|
+
z.value = !1;
|
|
2021
2070
|
return;
|
|
2022
2071
|
}
|
|
2023
|
-
|
|
2072
|
+
n.value && (o.value = "options", P.value = "", se.value = null, te.value = "", be.value = !1, ge.value = !1, $e.value = [], C.value = !1, q.value = "", z.value = !0);
|
|
2024
2073
|
}
|
|
2025
|
-
function
|
|
2026
|
-
|
|
2074
|
+
function Qt() {
|
|
2075
|
+
z.value = !1;
|
|
2027
2076
|
}
|
|
2028
|
-
function
|
|
2029
|
-
return
|
|
2077
|
+
function ft(a) {
|
|
2078
|
+
return a ? new Date(a).toLocaleDateString("en-US", { month: "short", day: "numeric", year: "numeric" }) : "";
|
|
2030
2079
|
}
|
|
2031
|
-
async function
|
|
2032
|
-
if (!(!
|
|
2033
|
-
|
|
2080
|
+
async function pt() {
|
|
2081
|
+
if (!(!n.value || !x.share)) {
|
|
2082
|
+
o.value = "loading", te.value = "";
|
|
2034
2083
|
try {
|
|
2035
|
-
const
|
|
2036
|
-
|
|
2037
|
-
} catch (
|
|
2038
|
-
|
|
2084
|
+
const a = await x.share.share(n.value);
|
|
2085
|
+
P.value = a.url, se.value = a.expiresAt, ge.value = !1, o.value = "success";
|
|
2086
|
+
} catch (a) {
|
|
2087
|
+
te.value = a.message || "Failed to create share link", o.value = "error";
|
|
2039
2088
|
}
|
|
2040
2089
|
}
|
|
2041
2090
|
}
|
|
2042
|
-
async function
|
|
2043
|
-
if (
|
|
2044
|
-
|
|
2091
|
+
async function _t() {
|
|
2092
|
+
if (rt.value)
|
|
2093
|
+
Ke();
|
|
2045
2094
|
else {
|
|
2046
|
-
|
|
2095
|
+
o.value = "loading";
|
|
2047
2096
|
try {
|
|
2048
|
-
await x.share.openAuthPopup(),
|
|
2049
|
-
} catch (
|
|
2050
|
-
|
|
2097
|
+
await x.share.openAuthPopup(), Ke();
|
|
2098
|
+
} catch (a) {
|
|
2099
|
+
a.message === "Authentication cancelled" ? o.value = "options" : (te.value = a.message || "Authentication failed", o.value = "error");
|
|
2051
2100
|
}
|
|
2052
2101
|
}
|
|
2053
2102
|
}
|
|
2054
|
-
async function
|
|
2055
|
-
if (!(!
|
|
2056
|
-
|
|
2103
|
+
async function Ke() {
|
|
2104
|
+
if (!(!n.value || !x.share)) {
|
|
2105
|
+
o.value = "loading", te.value = "";
|
|
2057
2106
|
try {
|
|
2058
|
-
const
|
|
2059
|
-
|
|
2060
|
-
} catch (
|
|
2061
|
-
|
|
2107
|
+
const a = await x.share.save(n.value);
|
|
2108
|
+
P.value = a.url, se.value = null, ge.value = !0, o.value = "success";
|
|
2109
|
+
} catch (a) {
|
|
2110
|
+
te.value = a.message || "Failed to save artifact", o.value = "error";
|
|
2062
2111
|
}
|
|
2063
2112
|
}
|
|
2064
2113
|
}
|
|
2065
|
-
function
|
|
2066
|
-
|
|
2114
|
+
function ea() {
|
|
2115
|
+
ge.value ? Ke() : pt();
|
|
2067
2116
|
}
|
|
2068
|
-
async function
|
|
2069
|
-
var
|
|
2117
|
+
async function ta() {
|
|
2118
|
+
var a;
|
|
2070
2119
|
if (x.share) {
|
|
2071
|
-
if (!
|
|
2072
|
-
|
|
2120
|
+
if (!rt.value) {
|
|
2121
|
+
o.value = "loading";
|
|
2073
2122
|
try {
|
|
2074
2123
|
await x.share.openAuthPopup();
|
|
2075
2124
|
} catch (t) {
|
|
2076
|
-
t.message === "Authentication cancelled" ?
|
|
2125
|
+
t.message === "Authentication cancelled" ? o.value = "options" : (te.value = t.message || "Authentication failed", o.value = "error");
|
|
2077
2126
|
return;
|
|
2078
2127
|
}
|
|
2079
2128
|
}
|
|
2080
|
-
|
|
2129
|
+
o.value = "update-list", C.value = !0;
|
|
2081
2130
|
try {
|
|
2082
|
-
const t = ((
|
|
2083
|
-
|
|
2131
|
+
const t = ((a = n.value) == null ? void 0 : a.language) || null, c = await x.share.listArtifacts(t);
|
|
2132
|
+
$e.value = c.projects || [];
|
|
2084
2133
|
} catch (t) {
|
|
2085
|
-
|
|
2134
|
+
te.value = t.message || "Failed to load artifacts", o.value = "error";
|
|
2086
2135
|
} finally {
|
|
2087
|
-
|
|
2136
|
+
C.value = !1;
|
|
2088
2137
|
}
|
|
2089
2138
|
}
|
|
2090
2139
|
}
|
|
2091
|
-
async function
|
|
2092
|
-
var
|
|
2093
|
-
if (!
|
|
2094
|
-
const t = (
|
|
2140
|
+
async function aa(a) {
|
|
2141
|
+
var c, A;
|
|
2142
|
+
if (!n.value || !x.share) return;
|
|
2143
|
+
const t = (c = a.project) == null ? void 0 : c.uuid;
|
|
2095
2144
|
if (t) {
|
|
2096
|
-
|
|
2145
|
+
o.value = "loading", te.value = "";
|
|
2097
2146
|
try {
|
|
2098
|
-
const
|
|
2099
|
-
|
|
2100
|
-
} catch (
|
|
2101
|
-
|
|
2147
|
+
const F = await x.share.updateArtifact(t, n.value);
|
|
2148
|
+
P.value = F.url || "", se.value = null, ge.value = !0, q.value = ((A = a.project) == null ? void 0 : A.name) || "Untitled", o.value = "success";
|
|
2149
|
+
} catch (F) {
|
|
2150
|
+
te.value = F.message || "Failed to update artifact", o.value = "error";
|
|
2102
2151
|
}
|
|
2103
2152
|
}
|
|
2104
2153
|
}
|
|
2105
|
-
async function
|
|
2106
|
-
if (
|
|
2154
|
+
async function sa() {
|
|
2155
|
+
if (P.value)
|
|
2107
2156
|
try {
|
|
2108
|
-
await navigator.clipboard.writeText(
|
|
2109
|
-
|
|
2157
|
+
await navigator.clipboard.writeText(P.value), be.value = !0, setTimeout(() => {
|
|
2158
|
+
be.value = !1;
|
|
2110
2159
|
}, 2e3);
|
|
2111
|
-
} catch (
|
|
2112
|
-
console.error("Failed to copy link:",
|
|
2160
|
+
} catch (a) {
|
|
2161
|
+
console.error("Failed to copy link:", a);
|
|
2113
2162
|
}
|
|
2114
2163
|
}
|
|
2115
|
-
function
|
|
2116
|
-
|
|
2164
|
+
function ht() {
|
|
2165
|
+
Ce.value && window.open(Ce.value, "_blank", "noopener,noreferrer");
|
|
2117
2166
|
}
|
|
2118
|
-
function
|
|
2119
|
-
ee.value &&
|
|
2167
|
+
function la() {
|
|
2168
|
+
ee.value && S.value && (ee.value.style.transform = `translateY(-${S.value.scrollTop}px)`);
|
|
2120
2169
|
}
|
|
2121
|
-
function
|
|
2170
|
+
function ia() {
|
|
2122
2171
|
Z.value = !Z.value;
|
|
2123
2172
|
}
|
|
2124
|
-
function
|
|
2125
|
-
|
|
2173
|
+
function mt(a) {
|
|
2174
|
+
w.value = !0, I(a), Z.value = !1;
|
|
2126
2175
|
}
|
|
2127
|
-
function
|
|
2128
|
-
const
|
|
2129
|
-
|
|
2176
|
+
function na() {
|
|
2177
|
+
const a = He.value - 1;
|
|
2178
|
+
a >= 0 && I(_e.value[a]);
|
|
2130
2179
|
}
|
|
2131
|
-
function
|
|
2132
|
-
const
|
|
2133
|
-
|
|
2180
|
+
function oa() {
|
|
2181
|
+
const a = He.value + 1;
|
|
2182
|
+
a < _e.value.length && I(_e.value[a]);
|
|
2134
2183
|
}
|
|
2135
|
-
function
|
|
2184
|
+
function yt(a) {
|
|
2136
2185
|
const t = document.querySelector(".artifactuse-panel__nav");
|
|
2137
|
-
t && !t.contains(
|
|
2138
|
-
}
|
|
2139
|
-
let
|
|
2140
|
-
function
|
|
2141
|
-
|
|
2142
|
-
startX:
|
|
2143
|
-
startWidth:
|
|
2144
|
-
}, document.addEventListener("mousemove",
|
|
2145
|
-
}
|
|
2146
|
-
function
|
|
2147
|
-
if (
|
|
2148
|
-
const t = window.innerWidth,
|
|
2149
|
-
|
|
2150
|
-
}
|
|
2151
|
-
function
|
|
2152
|
-
const
|
|
2153
|
-
|
|
2154
|
-
}
|
|
2155
|
-
let
|
|
2156
|
-
function
|
|
2157
|
-
if (!
|
|
2158
|
-
const t =
|
|
2159
|
-
|
|
2160
|
-
startX:
|
|
2161
|
-
startPosition:
|
|
2186
|
+
t && !t.contains(a.target) && (Z.value = !1);
|
|
2187
|
+
}
|
|
2188
|
+
let Te = null;
|
|
2189
|
+
function ra(a) {
|
|
2190
|
+
Te = {
|
|
2191
|
+
startX: a.clientX,
|
|
2192
|
+
startWidth: U.value
|
|
2193
|
+
}, document.addEventListener("mousemove", gt), document.addEventListener("mouseup", Ye), document.body.style.cursor = "ew-resize", document.body.style.userSelect = "none", document.querySelectorAll("iframe").forEach((c) => c.style.pointerEvents = "none");
|
|
2194
|
+
}
|
|
2195
|
+
function gt(a) {
|
|
2196
|
+
if (!Te) return;
|
|
2197
|
+
const t = window.innerWidth, A = (Te.startX - a.clientX) / t * 100, F = Te.startWidth + A;
|
|
2198
|
+
U.value = Math.min(Math.max(F, 25), 75), _("resize", { width: U.value });
|
|
2199
|
+
}
|
|
2200
|
+
function Ye() {
|
|
2201
|
+
const a = Te !== null;
|
|
2202
|
+
Te = null, document.removeEventListener("mousemove", gt), document.removeEventListener("mouseup", Ye), document.body.style.cursor = "", document.body.style.userSelect = "", document.querySelectorAll("iframe").forEach((c) => c.style.pointerEvents = ""), a && _("resize", { width: U.value });
|
|
2203
|
+
}
|
|
2204
|
+
let ze = null;
|
|
2205
|
+
function ca(a) {
|
|
2206
|
+
if (!J.value) return;
|
|
2207
|
+
const t = J.value.getBoundingClientRect();
|
|
2208
|
+
ze = {
|
|
2209
|
+
startX: a.clientX,
|
|
2210
|
+
startPosition: Y.value,
|
|
2162
2211
|
contentLeft: t.left,
|
|
2163
2212
|
contentWidth: t.width
|
|
2164
|
-
}, document.addEventListener("mousemove",
|
|
2213
|
+
}, document.addEventListener("mousemove", kt), document.addEventListener("mouseup", Ge), document.body.style.cursor = "col-resize", document.body.style.userSelect = "none", document.querySelectorAll("iframe").forEach((A) => A.style.pointerEvents = "none");
|
|
2165
2214
|
}
|
|
2166
|
-
function
|
|
2167
|
-
if (!
|
|
2168
|
-
const
|
|
2169
|
-
|
|
2215
|
+
function kt(a) {
|
|
2216
|
+
if (!ze) return;
|
|
2217
|
+
const c = (a.clientX - ze.contentLeft) / ze.contentWidth * 100;
|
|
2218
|
+
Y.value = Math.min(Math.max(c, 20), 80);
|
|
2170
2219
|
}
|
|
2171
|
-
function
|
|
2172
|
-
|
|
2220
|
+
function Ge() {
|
|
2221
|
+
ze = null, document.removeEventListener("mousemove", kt), document.removeEventListener("mouseup", Ge), document.body.style.cursor = "", document.body.style.userSelect = "", document.querySelectorAll("iframe").forEach((t) => t.style.pointerEvents = "");
|
|
2173
2222
|
}
|
|
2174
|
-
return
|
|
2175
|
-
|
|
2223
|
+
return ne(n, (a, t) => {
|
|
2224
|
+
a && (t && t.isPreviewable !== a.isPreviewable && (m.value = !0, setTimeout(() => {
|
|
2176
2225
|
m.value = !1;
|
|
2177
|
-
}, 150)), (!t ||
|
|
2178
|
-
|
|
2226
|
+
}, 150)), (!t || a.id !== t.id) && (jt(), pe.value = !0, Xt(), lt.includes(a.language) && f.viewMode !== "preview" && h("preview")), (!t || a.id !== t.id || a.code !== t.code) && (Re(), f.viewMode === "edit" && (!t || a.id !== t.id ? xe(() => vt()) : Q && Q.setCode(a.code || "")), clearTimeout(le), le = setTimeout(() => {
|
|
2227
|
+
N.value && a.isPreviewable && x.bridge.loadArtifact(a);
|
|
2179
2228
|
}, 500)));
|
|
2180
|
-
}, { deep: !0 }),
|
|
2181
|
-
(
|
|
2182
|
-
}),
|
|
2183
|
-
|
|
2184
|
-
}),
|
|
2185
|
-
var
|
|
2186
|
-
return (
|
|
2229
|
+
}, { deep: !0 }), ne(() => f.viewMode, (a) => {
|
|
2230
|
+
(a === "code" || a === "split") && Re(), a === "edit" && xe(() => vt());
|
|
2231
|
+
}), ne(() => f.isPanelOpen, (a) => {
|
|
2232
|
+
a && n.value && Re(), a || Ze();
|
|
2233
|
+
}), ne(() => {
|
|
2234
|
+
var a;
|
|
2235
|
+
return (a = n.value) == null ? void 0 : a.id;
|
|
2187
2236
|
}, () => {
|
|
2188
|
-
|
|
2189
|
-
}),
|
|
2190
|
-
|
|
2191
|
-
|
|
2237
|
+
X.value = [], b.value = !1;
|
|
2238
|
+
}), ne([X, b], () => {
|
|
2239
|
+
B.value && b.value && xe(() => {
|
|
2240
|
+
B.value.scrollTop = B.value.scrollHeight;
|
|
2192
2241
|
});
|
|
2193
|
-
}),
|
|
2194
|
-
|
|
2195
|
-
}),
|
|
2196
|
-
|
|
2197
|
-
}),
|
|
2198
|
-
x.on("ai:request", (
|
|
2199
|
-
|
|
2200
|
-
})), document.addEventListener("click",
|
|
2201
|
-
}),
|
|
2202
|
-
|
|
2203
|
-
|
|
2204
|
-
|
|
2205
|
-
|
|
2242
|
+
}), ne(() => T.panelWidth, (a) => {
|
|
2243
|
+
a !== void 0 && (U.value = Math.min(Math.max(a, 25), 75));
|
|
2244
|
+
}), ne(() => T.splitPosition, (a) => {
|
|
2245
|
+
a !== void 0 && (Y.value = Math.min(Math.max(a, 20), 80));
|
|
2246
|
+
}), Ee(() => {
|
|
2247
|
+
x.on("ai:request", (a) => _("ai-request", a)), x.on("save:request", (a) => _("save", a)), x.on("export:complete", (a) => _("export", a)), x && (j = x.on("console:log", ({ entry: a }) => {
|
|
2248
|
+
X.value = [...X.value, a].slice(-500), a.type === "error" && (b.value = !0);
|
|
2249
|
+
})), document.addEventListener("click", yt), f.isPanelOpen && n.value && Re();
|
|
2250
|
+
}), ne([we, We], ([a, t]) => {
|
|
2251
|
+
var c;
|
|
2252
|
+
if (W && (W.remove(), W = null), a === "font" && t && ((c = n.value) != null && c.code)) {
|
|
2253
|
+
const A = n.value.fileExtension || "ttf", F = Mt(A);
|
|
2254
|
+
W = document.createElement("style"), W.textContent = `@font-face { font-family: "${t}"; src: url("data:${F};base64,${n.value.code}"); }`, document.head.appendChild(W);
|
|
2255
|
+
}
|
|
2256
|
+
}), st(() => {
|
|
2257
|
+
Ye(), Ge(), Ze(), document.removeEventListener("click", yt), clearTimeout(le), clearTimeout(E), j && j(), W && (W.remove(), W = null), Object.keys(oe.value).forEach(ut);
|
|
2258
|
+
}), (a, t) => (s(), Pe(qe, { name: "artifactuse-panel" }, {
|
|
2259
|
+
default: Oe(() => [
|
|
2260
|
+
p(f).isPanelOpen ? (s(), l("div", {
|
|
2206
2261
|
key: 0,
|
|
2207
|
-
class:
|
|
2208
|
-
"artifactuse-panel--fullscreen":
|
|
2209
|
-
"artifactuse-panel--list": !
|
|
2210
|
-
"artifactuse-panel--empty": !
|
|
2262
|
+
class: R(["artifactuse-panel", {
|
|
2263
|
+
"artifactuse-panel--fullscreen": p(f).isFullscreen,
|
|
2264
|
+
"artifactuse-panel--list": !p(n) && p(H) && !p(f).forceEmptyView,
|
|
2265
|
+
"artifactuse-panel--empty": !p(H) && !p(f).forceEmptyView
|
|
2211
2266
|
}]),
|
|
2212
|
-
style:
|
|
2267
|
+
style: Le(p(f).isFullscreen ? void 0 : { width: `${It.value}%` })
|
|
2213
2268
|
}, [
|
|
2214
|
-
|
|
2269
|
+
p(f).isFullscreen ? v("", !0) : (s(), l("div", {
|
|
2215
2270
|
key: 0,
|
|
2216
2271
|
class: "artifactuse-panel__resize-handle",
|
|
2217
|
-
onMousedown:
|
|
2272
|
+
onMousedown: me(ra, ["prevent"])
|
|
2218
2273
|
}, [...t[19] || (t[19] = [
|
|
2219
2274
|
e("div", { class: "artifactuse-panel__resize-handle-line" }, null, -1)
|
|
2220
2275
|
])], 32)),
|
|
2221
|
-
!
|
|
2222
|
-
e("header",
|
|
2223
|
-
e("div",
|
|
2224
|
-
e("span",
|
|
2225
|
-
|
|
2276
|
+
!p(H) || Me.value ? (s(), l(V, { key: 1 }, [
|
|
2277
|
+
e("header", Vi, [
|
|
2278
|
+
e("div", Ii, [
|
|
2279
|
+
e("span", Fi, [
|
|
2280
|
+
Me.value ? (s(), l("svg", Ri, [...t[20] || (t[20] = [
|
|
2226
2281
|
e("path", { d: "M14.5 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7.5L14.5 2z" }, null, -1),
|
|
2227
2282
|
e("polyline", { points: "14 2 14 8 20 8" }, null, -1)
|
|
2228
|
-
])])) : (
|
|
2283
|
+
])])) : (s(), l("svg", qi, [...t[21] || (t[21] = [
|
|
2229
2284
|
e("polyline", { points: "16 18 22 12 16 6" }, null, -1),
|
|
2230
2285
|
e("polyline", { points: "8 6 2 12 8 18" }, null, -1)
|
|
2231
2286
|
])]))
|
|
2232
2287
|
]),
|
|
2233
|
-
e("div",
|
|
2234
|
-
e("span",
|
|
2288
|
+
e("div", Oi, [
|
|
2289
|
+
e("span", Ui, i(Me.value ? "Artifact Viewer" : "Artifacts"), 1)
|
|
2235
2290
|
])
|
|
2236
2291
|
]),
|
|
2237
|
-
e("div",
|
|
2292
|
+
e("div", Di, [
|
|
2238
2293
|
e("button", {
|
|
2239
2294
|
class: "artifactuse-panel__action artifactuse-panel__action--close",
|
|
2240
2295
|
title: "Close panel",
|
|
2241
|
-
onClick: t[0] || (t[0] = (...
|
|
2296
|
+
onClick: t[0] || (t[0] = (...c) => p(g) && p(g)(...c))
|
|
2242
2297
|
}, [...t[22] || (t[22] = [
|
|
2243
2298
|
e("svg", {
|
|
2244
2299
|
viewBox: "0 0 24 24",
|
|
@@ -2262,7 +2317,7 @@ const da = { class: "artifactuse-card__icon" }, va = ["innerHTML"], fa = { class
|
|
|
2262
2317
|
])])
|
|
2263
2318
|
])
|
|
2264
2319
|
]),
|
|
2265
|
-
e("div",
|
|
2320
|
+
e("div", ji, [
|
|
2266
2321
|
t[23] || (t[23] = e("div", { class: "artifactuse-panel__empty-icon" }, [
|
|
2267
2322
|
e("svg", {
|
|
2268
2323
|
viewBox: "0 0 24 24",
|
|
@@ -2274,11 +2329,11 @@ const da = { class: "artifactuse-card__icon" }, va = ["innerHTML"], fa = { class
|
|
|
2274
2329
|
e("polyline", { points: "14 2 14 8 20 8" })
|
|
2275
2330
|
])
|
|
2276
2331
|
], -1)),
|
|
2277
|
-
e("h3",
|
|
2278
|
-
e("p",
|
|
2332
|
+
e("h3", Ni, i(Me.value ? "No artifact selected" : "No artifacts yet"), 1),
|
|
2333
|
+
e("p", Wi, i(Me.value ? "Open an artifact to have it appear here" : "Code blocks, forms, and other interactive content will appear here as the AI generates them."), 1)
|
|
2279
2334
|
]),
|
|
2280
|
-
e("footer",
|
|
2281
|
-
|
|
2335
|
+
e("footer", Ji, [
|
|
2336
|
+
Ne.value ? (s(), l("a", Xi, [...t[24] || (t[24] = [
|
|
2282
2337
|
e("svg", {
|
|
2283
2338
|
width: "16",
|
|
2284
2339
|
height: "16",
|
|
@@ -2298,9 +2353,9 @@ const da = { class: "artifactuse-card__icon" }, va = ["innerHTML"], fa = { class
|
|
|
2298
2353
|
e("span", null, "Artifactuse", -1)
|
|
2299
2354
|
])])) : v("", !0)
|
|
2300
2355
|
])
|
|
2301
|
-
], 64)) : !
|
|
2302
|
-
e("header",
|
|
2303
|
-
e("div",
|
|
2356
|
+
], 64)) : !p(n) && !Me.value ? (s(), l(V, { key: 2 }, [
|
|
2357
|
+
e("header", Zi, [
|
|
2358
|
+
e("div", Ki, [
|
|
2304
2359
|
t[26] || (t[26] = e("span", { class: "artifactuse-panel__icon" }, [
|
|
2305
2360
|
e("svg", {
|
|
2306
2361
|
viewBox: "0 0 24 24",
|
|
@@ -2312,19 +2367,19 @@ const da = { class: "artifactuse-card__icon" }, va = ["innerHTML"], fa = { class
|
|
|
2312
2367
|
e("polyline", { points: "8 6 2 12 8 18" })
|
|
2313
2368
|
])
|
|
2314
2369
|
], -1)),
|
|
2315
|
-
e("div",
|
|
2370
|
+
e("div", Yi, [
|
|
2316
2371
|
t[25] || (t[25] = e("span", { class: "artifactuse-panel__name" }, "Artifacts", -1)),
|
|
2317
|
-
e("span",
|
|
2372
|
+
e("span", Gi, i(_e.value.length) + " available", 1)
|
|
2318
2373
|
])
|
|
2319
2374
|
]),
|
|
2320
|
-
e("div",
|
|
2375
|
+
e("div", Qi, [
|
|
2321
2376
|
e("button", {
|
|
2322
|
-
class:
|
|
2323
|
-
disabled:
|
|
2377
|
+
class: R(["artifactuse-panel__action", { "artifactuse-panel__action--loading": ie.value }]),
|
|
2378
|
+
disabled: ie.value,
|
|
2324
2379
|
title: "Download all as ZIP",
|
|
2325
|
-
onClick:
|
|
2380
|
+
onClick: Yt
|
|
2326
2381
|
}, [
|
|
2327
|
-
|
|
2382
|
+
ie.value ? (s(), l("svg", an, [...t[28] || (t[28] = [
|
|
2328
2383
|
e("circle", {
|
|
2329
2384
|
cx: "12",
|
|
2330
2385
|
cy: "12",
|
|
@@ -2332,7 +2387,7 @@ const da = { class: "artifactuse-card__icon" }, va = ["innerHTML"], fa = { class
|
|
|
2332
2387
|
"stroke-dasharray": "32",
|
|
2333
2388
|
"stroke-dashoffset": "32"
|
|
2334
2389
|
}, null, -1)
|
|
2335
|
-
])])) : (
|
|
2390
|
+
])])) : (s(), l("svg", tn, [...t[27] || (t[27] = [
|
|
2336
2391
|
e("path", { d: "M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4" }, null, -1),
|
|
2337
2392
|
e("polyline", { points: "7 10 12 15 17 10" }, null, -1),
|
|
2338
2393
|
e("line", {
|
|
@@ -2342,11 +2397,11 @@ const da = { class: "artifactuse-card__icon" }, va = ["innerHTML"], fa = { class
|
|
|
2342
2397
|
y2: "3"
|
|
2343
2398
|
}, null, -1)
|
|
2344
2399
|
])]))
|
|
2345
|
-
], 10,
|
|
2400
|
+
], 10, en),
|
|
2346
2401
|
e("button", {
|
|
2347
2402
|
class: "artifactuse-panel__action artifactuse-panel__action--close",
|
|
2348
2403
|
title: "Close panel",
|
|
2349
|
-
onClick: t[1] || (t[1] = (...
|
|
2404
|
+
onClick: t[1] || (t[1] = (...c) => p(g) && p(g)(...c))
|
|
2350
2405
|
}, [...t[29] || (t[29] = [
|
|
2351
2406
|
e("svg", {
|
|
2352
2407
|
viewBox: "0 0 24 24",
|
|
@@ -2370,23 +2425,23 @@ const da = { class: "artifactuse-card__icon" }, va = ["innerHTML"], fa = { class
|
|
|
2370
2425
|
])])
|
|
2371
2426
|
])
|
|
2372
2427
|
]),
|
|
2373
|
-
e("div",
|
|
2374
|
-
e("div",
|
|
2375
|
-
(
|
|
2376
|
-
key:
|
|
2428
|
+
e("div", sn, [
|
|
2429
|
+
e("div", ln, [
|
|
2430
|
+
(s(!0), l(V, null, fe(_e.value, (c, A) => (s(), l("button", {
|
|
2431
|
+
key: c.id,
|
|
2377
2432
|
class: "artifactuse-panel__list-item",
|
|
2378
|
-
onClick: (
|
|
2433
|
+
onClick: (F) => mt(c)
|
|
2379
2434
|
}, [
|
|
2380
2435
|
e("span", {
|
|
2381
2436
|
class: "artifactuse-panel__list-item-icon",
|
|
2382
|
-
innerHTML:
|
|
2383
|
-
}, null, 8,
|
|
2384
|
-
e("div",
|
|
2385
|
-
e("span",
|
|
2386
|
-
e("span",
|
|
2387
|
-
|
|
2388
|
-
|
|
2389
|
-
|
|
2437
|
+
innerHTML: Xe(c.language)
|
|
2438
|
+
}, null, 8, on),
|
|
2439
|
+
e("div", rn, [
|
|
2440
|
+
e("span", cn, i(c.title || "Untitled"), 1),
|
|
2441
|
+
e("span", un, [
|
|
2442
|
+
G(i(p(Ue)(c.language)) + " ", 1),
|
|
2443
|
+
c.lineCount ? (s(), l(V, { key: 0 }, [
|
|
2444
|
+
G(" • " + i(c.lineCount) + " lines ", 1)
|
|
2390
2445
|
], 64)) : v("", !0)
|
|
2391
2446
|
])
|
|
2392
2447
|
]),
|
|
@@ -2400,11 +2455,11 @@ const da = { class: "artifactuse-card__icon" }, va = ["innerHTML"], fa = { class
|
|
|
2400
2455
|
e("polyline", { points: "9 18 15 12 9 6" })
|
|
2401
2456
|
])
|
|
2402
2457
|
], -1))
|
|
2403
|
-
], 8,
|
|
2458
|
+
], 8, nn))), 128))
|
|
2404
2459
|
])
|
|
2405
2460
|
]),
|
|
2406
|
-
e("footer",
|
|
2407
|
-
|
|
2461
|
+
e("footer", dn, [
|
|
2462
|
+
Ne.value ? (s(), l("a", vn, [...t[31] || (t[31] = [
|
|
2408
2463
|
e("svg", {
|
|
2409
2464
|
width: "16",
|
|
2410
2465
|
height: "16",
|
|
@@ -2424,13 +2479,13 @@ const da = { class: "artifactuse-card__icon" }, va = ["innerHTML"], fa = { class
|
|
|
2424
2479
|
e("span", null, "Artifactuse", -1)
|
|
2425
2480
|
])])) : v("", !0)
|
|
2426
2481
|
])
|
|
2427
|
-
], 64)) : (
|
|
2428
|
-
e("header",
|
|
2429
|
-
|
|
2482
|
+
], 64)) : (s(), l(V, { key: 3 }, [
|
|
2483
|
+
e("header", fn, [
|
|
2484
|
+
Se.value || w.value ? (s(), l("button", {
|
|
2430
2485
|
key: 0,
|
|
2431
2486
|
class: "artifactuse-panel__back",
|
|
2432
|
-
title:
|
|
2433
|
-
onClick:
|
|
2487
|
+
title: Se.value ? "Browse artifacts" : "Back to list",
|
|
2488
|
+
onClick: qt
|
|
2434
2489
|
}, [...t[32] || (t[32] = [
|
|
2435
2490
|
e("svg", {
|
|
2436
2491
|
viewBox: "0 0 24 24",
|
|
@@ -2440,29 +2495,29 @@ const da = { class: "artifactuse-card__icon" }, va = ["innerHTML"], fa = { class
|
|
|
2440
2495
|
}, [
|
|
2441
2496
|
e("polyline", { points: "15 18 9 12 15 6" })
|
|
2442
2497
|
], -1)
|
|
2443
|
-
])], 8,
|
|
2444
|
-
e("div",
|
|
2498
|
+
])], 8, pn)) : v("", !0),
|
|
2499
|
+
e("div", _n, [
|
|
2445
2500
|
e("span", {
|
|
2446
2501
|
class: "artifactuse-panel__icon",
|
|
2447
|
-
innerHTML:
|
|
2448
|
-
}, null, 8,
|
|
2449
|
-
e("div",
|
|
2450
|
-
e("span",
|
|
2451
|
-
e("span",
|
|
2452
|
-
|
|
2453
|
-
|
|
2454
|
-
|
|
2502
|
+
innerHTML: Ae.value
|
|
2503
|
+
}, null, 8, hn),
|
|
2504
|
+
e("div", mn, [
|
|
2505
|
+
e("span", yn, i(p(n).title || "Untitled"), 1),
|
|
2506
|
+
e("span", gn, [
|
|
2507
|
+
G(i(ue.value) + " ", 1),
|
|
2508
|
+
p(n).lineCount ? (s(), l(V, { key: 0 }, [
|
|
2509
|
+
G(" • " + i(p(n).lineCount) + " lines ", 1)
|
|
2455
2510
|
], 64)) : v("", !0)
|
|
2456
2511
|
])
|
|
2457
2512
|
])
|
|
2458
2513
|
]),
|
|
2459
|
-
e("div",
|
|
2460
|
-
!
|
|
2514
|
+
e("div", kn, [
|
|
2515
|
+
!p(n).tabs || p(n).tabs.includes("preview") ? (s(), l("button", {
|
|
2461
2516
|
key: 0,
|
|
2462
|
-
class:
|
|
2463
|
-
disabled: !
|
|
2517
|
+
class: R(["artifactuse-panel__tab", { "artifactuse-panel__tab--active": p(f).viewMode === "preview" }]),
|
|
2518
|
+
disabled: !p(n).isPreviewable,
|
|
2464
2519
|
title: "Preview",
|
|
2465
|
-
onClick: t[2] || (t[2] = (
|
|
2520
|
+
onClick: t[2] || (t[2] = (c) => p(h)("preview"))
|
|
2466
2521
|
}, [...t[33] || (t[33] = [
|
|
2467
2522
|
e("svg", {
|
|
2468
2523
|
viewBox: "0 0 24 24",
|
|
@@ -2477,12 +2532,12 @@ const da = { class: "artifactuse-card__icon" }, va = ["innerHTML"], fa = { class
|
|
|
2477
2532
|
r: "3"
|
|
2478
2533
|
})
|
|
2479
2534
|
], -1)
|
|
2480
|
-
])], 10,
|
|
2481
|
-
!
|
|
2535
|
+
])], 10, wn)) : v("", !0),
|
|
2536
|
+
(!p(n).tabs || p(n).tabs.includes("code")) && !Be.value ? (s(), l("button", {
|
|
2482
2537
|
key: 1,
|
|
2483
|
-
class:
|
|
2538
|
+
class: R(["artifactuse-panel__tab", { "artifactuse-panel__tab--active": p(f).viewMode === "code" }]),
|
|
2484
2539
|
title: "Code",
|
|
2485
|
-
onClick: t[3] || (t[3] = (
|
|
2540
|
+
onClick: t[3] || (t[3] = (c) => p(h)("code"))
|
|
2486
2541
|
}, [...t[34] || (t[34] = [
|
|
2487
2542
|
e("svg", {
|
|
2488
2543
|
viewBox: "0 0 24 24",
|
|
@@ -2494,12 +2549,12 @@ const da = { class: "artifactuse-card__icon" }, va = ["innerHTML"], fa = { class
|
|
|
2494
2549
|
e("polyline", { points: "8 6 2 12 8 18" })
|
|
2495
2550
|
], -1)
|
|
2496
2551
|
])], 2)) : v("", !0),
|
|
2497
|
-
!
|
|
2552
|
+
(!p(n).tabs || p(n).tabs.includes("split")) && !Be.value ? (s(), l("button", {
|
|
2498
2553
|
key: 2,
|
|
2499
|
-
class:
|
|
2500
|
-
disabled: !
|
|
2554
|
+
class: R(["artifactuse-panel__tab", { "artifactuse-panel__tab--active": p(f).viewMode === "split" }]),
|
|
2555
|
+
disabled: !p(n).isPreviewable,
|
|
2501
2556
|
title: "Split view",
|
|
2502
|
-
onClick: t[4] || (t[4] = (
|
|
2557
|
+
onClick: t[4] || (t[4] = (c) => p(h)("split"))
|
|
2503
2558
|
}, [...t[35] || (t[35] = [
|
|
2504
2559
|
e("svg", {
|
|
2505
2560
|
viewBox: "0 0 24 24",
|
|
@@ -2522,12 +2577,12 @@ const da = { class: "artifactuse-card__icon" }, va = ["innerHTML"], fa = { class
|
|
|
2522
2577
|
y2: "21"
|
|
2523
2578
|
})
|
|
2524
2579
|
], -1)
|
|
2525
|
-
])], 10,
|
|
2526
|
-
|
|
2580
|
+
])], 10, bn)) : v("", !0),
|
|
2581
|
+
p(n).tabs && p(n).tabs.includes("edit") && y.value ? (s(), l("button", {
|
|
2527
2582
|
key: 3,
|
|
2528
|
-
class:
|
|
2583
|
+
class: R(["artifactuse-panel__tab", { "artifactuse-panel__tab--active": p(f).viewMode === "edit" }]),
|
|
2529
2584
|
title: "Edit",
|
|
2530
|
-
onClick: t[5] || (t[5] = (
|
|
2585
|
+
onClick: t[5] || (t[5] = (c) => p(h)("edit"))
|
|
2531
2586
|
}, [...t[36] || (t[36] = [
|
|
2532
2587
|
e("svg", {
|
|
2533
2588
|
viewBox: "0 0 24 24",
|
|
@@ -2540,12 +2595,12 @@ const da = { class: "artifactuse-card__icon" }, va = ["innerHTML"], fa = { class
|
|
|
2540
2595
|
], -1)
|
|
2541
2596
|
])], 2)) : v("", !0)
|
|
2542
2597
|
]),
|
|
2543
|
-
e("div",
|
|
2544
|
-
|
|
2598
|
+
e("div", Cn, [
|
|
2599
|
+
p(f).viewMode === "edit" ? (s(), l("button", {
|
|
2545
2600
|
key: 0,
|
|
2546
2601
|
class: "artifactuse-panel__action artifactuse-panel__action--save",
|
|
2547
2602
|
title: "Save",
|
|
2548
|
-
onClick:
|
|
2603
|
+
onClick: Nt
|
|
2549
2604
|
}, [...t[37] || (t[37] = [
|
|
2550
2605
|
e("svg", {
|
|
2551
2606
|
viewBox: "0 0 24 24",
|
|
@@ -2558,11 +2613,11 @@ const da = { class: "artifactuse-card__icon" }, va = ["innerHTML"], fa = { class
|
|
|
2558
2613
|
e("polyline", { points: "7 3 7 8 15 8" })
|
|
2559
2614
|
], -1)
|
|
2560
2615
|
])])) : v("", !0),
|
|
2561
|
-
|
|
2616
|
+
Bt.value ? (s(), l("button", {
|
|
2562
2617
|
key: 1,
|
|
2563
2618
|
class: "artifactuse-panel__action",
|
|
2564
2619
|
title: "Open in new tab",
|
|
2565
|
-
onClick:
|
|
2620
|
+
onClick: ht
|
|
2566
2621
|
}, [...t[38] || (t[38] = [
|
|
2567
2622
|
e("svg", {
|
|
2568
2623
|
viewBox: "0 0 24 24",
|
|
@@ -2582,10 +2637,10 @@ const da = { class: "artifactuse-card__icon" }, va = ["innerHTML"], fa = { class
|
|
|
2582
2637
|
])])) : v("", !0),
|
|
2583
2638
|
e("button", {
|
|
2584
2639
|
class: "artifactuse-panel__action",
|
|
2585
|
-
title:
|
|
2586
|
-
onClick: t[6] || (t[6] = (...
|
|
2640
|
+
title: p(f).isFullscreen ? "Exit fullscreen" : "Fullscreen",
|
|
2641
|
+
onClick: t[6] || (t[6] = (...c) => p(r) && p(r)(...c))
|
|
2587
2642
|
}, [
|
|
2588
|
-
|
|
2643
|
+
p(f).isFullscreen ? (s(), l("svg", Mn, [...t[40] || (t[40] = [
|
|
2589
2644
|
e("polyline", { points: "4 14 10 14 10 20" }, null, -1),
|
|
2590
2645
|
e("polyline", { points: "20 10 14 10 14 4" }, null, -1),
|
|
2591
2646
|
e("line", {
|
|
@@ -2600,7 +2655,7 @@ const da = { class: "artifactuse-card__icon" }, va = ["innerHTML"], fa = { class
|
|
|
2600
2655
|
x2: "10",
|
|
2601
2656
|
y2: "14"
|
|
2602
2657
|
}, null, -1)
|
|
2603
|
-
])])) : (
|
|
2658
|
+
])])) : (s(), l("svg", $n, [...t[39] || (t[39] = [
|
|
2604
2659
|
e("polyline", { points: "15 3 21 3 21 9" }, null, -1),
|
|
2605
2660
|
e("polyline", { points: "9 21 3 21 3 15" }, null, -1),
|
|
2606
2661
|
e("line", {
|
|
@@ -2616,11 +2671,11 @@ const da = { class: "artifactuse-card__icon" }, va = ["innerHTML"], fa = { class
|
|
|
2616
2671
|
y2: "14"
|
|
2617
2672
|
}, null, -1)
|
|
2618
2673
|
])]))
|
|
2619
|
-
], 8,
|
|
2674
|
+
], 8, xn),
|
|
2620
2675
|
e("button", {
|
|
2621
2676
|
class: "artifactuse-panel__action artifactuse-panel__action--close",
|
|
2622
2677
|
title: "Close panel",
|
|
2623
|
-
onClick: t[7] || (t[7] = (...
|
|
2678
|
+
onClick: t[7] || (t[7] = (...c) => p(g) && p(g)(...c))
|
|
2624
2679
|
}, [...t[41] || (t[41] = [
|
|
2625
2680
|
e("svg", {
|
|
2626
2681
|
viewBox: "0 0 24 24",
|
|
@@ -2644,24 +2699,24 @@ const da = { class: "artifactuse-card__icon" }, va = ["innerHTML"], fa = { class
|
|
|
2644
2699
|
])])
|
|
2645
2700
|
])
|
|
2646
2701
|
]),
|
|
2647
|
-
|
|
2648
|
-
e("div",
|
|
2649
|
-
(
|
|
2650
|
-
var
|
|
2651
|
-
return
|
|
2652
|
-
key:
|
|
2653
|
-
class:
|
|
2654
|
-
onClick: (
|
|
2702
|
+
Se.value && ct.value.length > 0 ? (s(), l("div", Tn, [
|
|
2703
|
+
e("div", Ln, [
|
|
2704
|
+
(s(!0), l(V, null, fe(ct.value, (c) => {
|
|
2705
|
+
var A;
|
|
2706
|
+
return s(), l("button", {
|
|
2707
|
+
key: c.id,
|
|
2708
|
+
class: R(["artifactuse-panel__file-tab", { "artifactuse-panel__file-tab--active": c.id === ((A = p(n)) == null ? void 0 : A.id) }]),
|
|
2709
|
+
onClick: (F) => Ft(c)
|
|
2655
2710
|
}, [
|
|
2656
2711
|
e("span", {
|
|
2657
2712
|
class: "artifactuse-panel__file-tab-icon",
|
|
2658
|
-
innerHTML:
|
|
2659
|
-
}, null, 8,
|
|
2660
|
-
e("span",
|
|
2713
|
+
innerHTML: Xe(c.language)
|
|
2714
|
+
}, null, 8, En),
|
|
2715
|
+
e("span", An, i(c.title || "Untitled"), 1),
|
|
2661
2716
|
e("button", {
|
|
2662
2717
|
class: "artifactuse-panel__file-tab-close",
|
|
2663
2718
|
title: "Close tab",
|
|
2664
|
-
onClick:
|
|
2719
|
+
onClick: me((F) => Rt(c.id), ["stop"])
|
|
2665
2720
|
}, [...t[42] || (t[42] = [
|
|
2666
2721
|
e("svg", {
|
|
2667
2722
|
viewBox: "0 0 24 24",
|
|
@@ -2682,75 +2737,110 @@ const da = { class: "artifactuse-card__icon" }, va = ["innerHTML"], fa = { class
|
|
|
2682
2737
|
y2: "18"
|
|
2683
2738
|
})
|
|
2684
2739
|
], -1)
|
|
2685
|
-
])], 8,
|
|
2686
|
-
], 10,
|
|
2740
|
+
])], 8, Hn)
|
|
2741
|
+
], 10, Pn);
|
|
2687
2742
|
}), 128))
|
|
2688
2743
|
])
|
|
2689
2744
|
])) : v("", !0),
|
|
2690
2745
|
e("div", {
|
|
2691
2746
|
ref_key: "contentRef",
|
|
2692
|
-
ref:
|
|
2693
|
-
class:
|
|
2694
|
-
`artifactuse-panel__content--${
|
|
2747
|
+
ref: J,
|
|
2748
|
+
class: R(["artifactuse-panel__content", [
|
|
2749
|
+
`artifactuse-panel__content--${p(f).viewMode}`,
|
|
2695
2750
|
{ "artifactuse-panel__content--transitioning": m.value }
|
|
2696
2751
|
]])
|
|
2697
2752
|
}, [
|
|
2698
|
-
m.value ? (
|
|
2753
|
+
m.value ? (s(), l("div", Bn, [...t[43] || (t[43] = [
|
|
2699
2754
|
e("div", { class: "artifactuse-panel__spinner" }, null, -1)
|
|
2700
2755
|
])])) : v("", !0),
|
|
2701
|
-
|
|
2756
|
+
p(f).viewMode === "preview" || p(f).viewMode === "split" ? (s(), l("div", {
|
|
2702
2757
|
key: 1,
|
|
2703
2758
|
class: "artifactuse-panel__preview",
|
|
2704
|
-
style:
|
|
2759
|
+
style: Le(p(f).viewMode === "split" ? { width: `${Y.value}%` } : void 0)
|
|
2705
2760
|
}, [
|
|
2706
|
-
|
|
2761
|
+
pe.value && Ce.value && !Be.value ? (s(), l("div", Sn, [...t[44] || (t[44] = [
|
|
2707
2762
|
e("div", { class: "artifactuse-panel__spinner" }, null, -1)
|
|
2708
2763
|
])])) : v("", !0),
|
|
2709
|
-
|
|
2710
|
-
|
|
2711
|
-
|
|
2712
|
-
|
|
2713
|
-
|
|
2714
|
-
|
|
2715
|
-
|
|
2716
|
-
|
|
2717
|
-
|
|
2718
|
-
|
|
2719
|
-
|
|
2720
|
-
|
|
2721
|
-
|
|
2722
|
-
|
|
2723
|
-
|
|
2724
|
-
|
|
2725
|
-
|
|
2726
|
-
e("
|
|
2727
|
-
|
|
2728
|
-
|
|
2729
|
-
|
|
2730
|
-
|
|
2731
|
-
|
|
2732
|
-
|
|
2733
|
-
|
|
2734
|
-
|
|
2735
|
-
|
|
2736
|
-
|
|
2764
|
+
Be.value ? (s(), l(V, { key: 1 }, [
|
|
2765
|
+
we.value === "image" ? (s(), l("div", zn, [
|
|
2766
|
+
e("img", {
|
|
2767
|
+
src: Fe(p(n)),
|
|
2768
|
+
alt: p(n).title
|
|
2769
|
+
}, null, 8, Vn)
|
|
2770
|
+
])) : we.value === "audio" ? (s(), l("div", In, [
|
|
2771
|
+
e("audio", {
|
|
2772
|
+
controls: "",
|
|
2773
|
+
src: Fe(p(n))
|
|
2774
|
+
}, null, 8, Fn)
|
|
2775
|
+
])) : we.value === "video" ? (s(), l("div", Rn, [
|
|
2776
|
+
e("video", {
|
|
2777
|
+
controls: "",
|
|
2778
|
+
src: Fe(p(n))
|
|
2779
|
+
}, null, 8, qn)
|
|
2780
|
+
])) : we.value === "pdf" ? (s(), l("div", On, [
|
|
2781
|
+
e("iframe", {
|
|
2782
|
+
src: Fe(p(n)) + "#toolbar=1",
|
|
2783
|
+
frameborder: "0"
|
|
2784
|
+
}, null, 8, Un)
|
|
2785
|
+
])) : we.value === "font" ? (s(), l("div", Dn, [
|
|
2786
|
+
e("div", {
|
|
2787
|
+
class: "artifactuse-panel__font-sample",
|
|
2788
|
+
style: Le({ fontFamily: We.value })
|
|
2789
|
+
}, " AaBbCcDdEeFfGgHhIiJjKkLlMmNnOoPpQqRrSsTtUuVvWwXxYyZz ", 4),
|
|
2790
|
+
e("div", {
|
|
2791
|
+
class: "artifactuse-panel__font-sample artifactuse-panel__font-sample--sm",
|
|
2792
|
+
style: Le({ fontFamily: We.value })
|
|
2793
|
+
}, " 0123456789 !@#$%^&*() ", 4)
|
|
2794
|
+
])) : (s(), l("div", jn, [
|
|
2795
|
+
e("pre", Nn, i(Ht.value), 1)
|
|
2796
|
+
]))
|
|
2797
|
+
], 64)) : (s(), l(V, { key: 2 }, [
|
|
2798
|
+
Ce.value ? (s(), l("iframe", {
|
|
2799
|
+
key: 0,
|
|
2800
|
+
ref_key: "iframeRef",
|
|
2801
|
+
ref: N,
|
|
2802
|
+
src: Ce.value,
|
|
2803
|
+
class: R(["artifactuse-panel__iframe", { "artifactuse-panel__iframe--loading": pe.value }]),
|
|
2804
|
+
sandbox: "allow-scripts allow-same-origin allow-forms allow-popups allow-modals allow-downloads allow-top-navigation-by-user-activation",
|
|
2805
|
+
allow: "camera; microphone; fullscreen; geolocation; display-capture; autoplay; clipboard-write; encrypted-media; gyroscope; accelerometer; picture-in-picture",
|
|
2806
|
+
onLoad: Wt,
|
|
2807
|
+
onError: Jt
|
|
2808
|
+
}, null, 42, Wn)) : (s(), l("div", Jn, [
|
|
2809
|
+
t[45] || (t[45] = e("svg", {
|
|
2810
|
+
viewBox: "0 0 24 24",
|
|
2811
|
+
fill: "none",
|
|
2812
|
+
stroke: "currentColor",
|
|
2813
|
+
"stroke-width": "1.5"
|
|
2814
|
+
}, [
|
|
2815
|
+
e("path", { d: "M9 17H7A5 5 0 0 1 7 7h2" }),
|
|
2816
|
+
e("path", { d: "M15 7h2a5 5 0 1 1 0 10h-2" }),
|
|
2817
|
+
e("line", {
|
|
2818
|
+
x1: "8",
|
|
2819
|
+
y1: "12",
|
|
2820
|
+
x2: "16",
|
|
2821
|
+
y2: "12"
|
|
2822
|
+
})
|
|
2823
|
+
], -1)),
|
|
2824
|
+
e("p", null, "Preview not available for " + i(ue.value), 1)
|
|
2825
|
+
]))
|
|
2826
|
+
], 64))
|
|
2737
2827
|
], 4)) : v("", !0),
|
|
2738
|
-
|
|
2828
|
+
Ct(e("div", {
|
|
2739
2829
|
class: "artifactuse-panel__code",
|
|
2740
|
-
style:
|
|
2830
|
+
style: Le(p(f).viewMode === "split" ? { width: `${100 - Y.value}%` } : void 0)
|
|
2741
2831
|
}, [
|
|
2742
|
-
|
|
2832
|
+
p(f).viewMode === "split" ? (s(), l("div", {
|
|
2743
2833
|
key: 0,
|
|
2744
2834
|
class: "artifactuse-panel__split-handle",
|
|
2745
|
-
onMousedown:
|
|
2835
|
+
onMousedown: me(ca, ["prevent"])
|
|
2746
2836
|
}, [...t[46] || (t[46] = [
|
|
2747
2837
|
e("div", { class: "artifactuse-panel__split-handle-line" }, null, -1)
|
|
2748
2838
|
])], 32)) : v("", !0),
|
|
2749
2839
|
e("div", {
|
|
2750
2840
|
class: "artifactuse-panel__code-scroll",
|
|
2751
2841
|
ref_key: "codeScrollRef",
|
|
2752
|
-
ref:
|
|
2753
|
-
onScroll:
|
|
2842
|
+
ref: S,
|
|
2843
|
+
onScroll: la
|
|
2754
2844
|
}, [
|
|
2755
2845
|
e("div", {
|
|
2756
2846
|
class: "artifactuse-panel__line-numbers",
|
|
@@ -2758,36 +2848,36 @@ const da = { class: "artifactuse-card__icon" }, va = ["innerHTML"], fa = { class
|
|
|
2758
2848
|
ref: ee
|
|
2759
2849
|
}, null, 512),
|
|
2760
2850
|
e("pre", {
|
|
2761
|
-
class:
|
|
2851
|
+
class: R(["artifactuse-panel__code-block", `language-${Ve.value}`])
|
|
2762
2852
|
}, [
|
|
2763
|
-
(
|
|
2853
|
+
(s(), l("code", {
|
|
2764
2854
|
ref_key: "codeRef",
|
|
2765
|
-
ref:
|
|
2766
|
-
key:
|
|
2767
|
-
class:
|
|
2855
|
+
ref: D,
|
|
2856
|
+
key: p(n).id,
|
|
2857
|
+
class: R(`language-${Ve.value}`)
|
|
2768
2858
|
}, null, 2))
|
|
2769
2859
|
], 2)
|
|
2770
2860
|
], 544)
|
|
2771
2861
|
], 4), [
|
|
2772
|
-
[
|
|
2862
|
+
[xt, p(f).viewMode === "code" || p(f).viewMode === "split"]
|
|
2773
2863
|
]),
|
|
2774
|
-
|
|
2864
|
+
Ct(e("div", Xn, [
|
|
2775
2865
|
e("div", {
|
|
2776
2866
|
ref_key: "editorContainerRef",
|
|
2777
|
-
ref:
|
|
2867
|
+
ref: ce,
|
|
2778
2868
|
class: "artifactuse-panel__editor-container"
|
|
2779
2869
|
}, null, 512)
|
|
2780
2870
|
], 512), [
|
|
2781
|
-
[
|
|
2871
|
+
[xt, p(f).viewMode === "edit"]
|
|
2782
2872
|
])
|
|
2783
2873
|
], 2),
|
|
2784
|
-
|
|
2874
|
+
zt.value ? (s(), l("div", {
|
|
2785
2875
|
key: 1,
|
|
2786
|
-
class:
|
|
2876
|
+
class: R(["artifactuse-panel__console", { "artifactuse-panel__console--expanded": b.value }])
|
|
2787
2877
|
}, [
|
|
2788
2878
|
e("div", {
|
|
2789
2879
|
class: "artifactuse-panel__console-header",
|
|
2790
|
-
onClick: t[14] || (t[14] = (
|
|
2880
|
+
onClick: t[14] || (t[14] = (c) => b.value = !b.value)
|
|
2791
2881
|
}, [
|
|
2792
2882
|
t[47] || (t[47] = e("svg", {
|
|
2793
2883
|
class: "artifactuse-panel__console-chevron",
|
|
@@ -2801,54 +2891,54 @@ const da = { class: "artifactuse-card__icon" }, va = ["innerHTML"], fa = { class
|
|
|
2801
2891
|
t[48] || (t[48] = e("span", null, "Console", -1)),
|
|
2802
2892
|
e("div", {
|
|
2803
2893
|
class: "artifactuse-panel__console-filters",
|
|
2804
|
-
onClick: t[12] || (t[12] =
|
|
2894
|
+
onClick: t[12] || (t[12] = me(() => {
|
|
2805
2895
|
}, ["stop"]))
|
|
2806
2896
|
}, [
|
|
2807
|
-
|
|
2897
|
+
Je.value > 0 ? (s(), l("button", {
|
|
2808
2898
|
key: 0,
|
|
2809
|
-
class:
|
|
2810
|
-
onClick: t[8] || (t[8] = (
|
|
2811
|
-
},
|
|
2812
|
-
|
|
2899
|
+
class: R(["artifactuse-panel__console-filter", "artifactuse-panel__console-filter--error", { "artifactuse-panel__console-filter--inactive": !u.value.has("error") }]),
|
|
2900
|
+
onClick: t[8] || (t[8] = (c) => Ie("error"))
|
|
2901
|
+
}, i(Je.value) + " error" + i(Je.value !== 1 ? "s" : ""), 3)) : v("", !0),
|
|
2902
|
+
it.value > 0 ? (s(), l("button", {
|
|
2813
2903
|
key: 1,
|
|
2814
|
-
class:
|
|
2815
|
-
onClick: t[9] || (t[9] = (
|
|
2816
|
-
},
|
|
2817
|
-
|
|
2904
|
+
class: R(["artifactuse-panel__console-filter", "artifactuse-panel__console-filter--warn", { "artifactuse-panel__console-filter--inactive": !u.value.has("warn") }]),
|
|
2905
|
+
onClick: t[9] || (t[9] = (c) => Ie("warn"))
|
|
2906
|
+
}, i(it.value) + " warn", 3)) : v("", !0),
|
|
2907
|
+
nt.value > 0 ? (s(), l("button", {
|
|
2818
2908
|
key: 2,
|
|
2819
|
-
class:
|
|
2820
|
-
onClick: t[10] || (t[10] = (
|
|
2821
|
-
},
|
|
2822
|
-
|
|
2909
|
+
class: R(["artifactuse-panel__console-filter", "artifactuse-panel__console-filter--info", { "artifactuse-panel__console-filter--inactive": !u.value.has("info") }]),
|
|
2910
|
+
onClick: t[10] || (t[10] = (c) => Ie("info"))
|
|
2911
|
+
}, i(nt.value) + " info", 3)) : v("", !0),
|
|
2912
|
+
ot.value > 0 ? (s(), l("button", {
|
|
2823
2913
|
key: 3,
|
|
2824
|
-
class:
|
|
2825
|
-
onClick: t[11] || (t[11] = (
|
|
2826
|
-
},
|
|
2914
|
+
class: R(["artifactuse-panel__console-filter", "artifactuse-panel__console-filter--log", { "artifactuse-panel__console-filter--inactive": !u.value.has("log") }]),
|
|
2915
|
+
onClick: t[11] || (t[11] = (c) => Ie("log"))
|
|
2916
|
+
}, i(ot.value) + " log", 3)) : v("", !0)
|
|
2827
2917
|
]),
|
|
2828
2918
|
e("button", {
|
|
2829
2919
|
class: "artifactuse-panel__console-clear",
|
|
2830
|
-
onClick: t[13] || (t[13] =
|
|
2920
|
+
onClick: t[13] || (t[13] = me((c) => X.value = [], ["stop"]))
|
|
2831
2921
|
}, "Clear")
|
|
2832
2922
|
]),
|
|
2833
|
-
|
|
2923
|
+
b.value ? (s(), l("div", {
|
|
2834
2924
|
key: 0,
|
|
2835
2925
|
ref_key: "consoleEntriesEl",
|
|
2836
|
-
ref:
|
|
2926
|
+
ref: B,
|
|
2837
2927
|
class: "artifactuse-panel__console-entries"
|
|
2838
2928
|
}, [
|
|
2839
|
-
(
|
|
2840
|
-
key:
|
|
2841
|
-
class:
|
|
2929
|
+
(s(!0), l(V, null, fe(St.value, (c, A) => (s(), l("div", {
|
|
2930
|
+
key: A,
|
|
2931
|
+
class: R("artifactuse-panel__console-entry artifactuse-panel__console-entry--" + c.type)
|
|
2842
2932
|
}, [
|
|
2843
|
-
e("span",
|
|
2844
|
-
e("span",
|
|
2845
|
-
e("span",
|
|
2933
|
+
e("span", Zn, "[" + i(c.type) + "]", 1),
|
|
2934
|
+
e("span", Kn, i(c.content), 1),
|
|
2935
|
+
e("span", Yn, i(new Date(c.timestamp).toLocaleTimeString()), 1)
|
|
2846
2936
|
], 2))), 128))
|
|
2847
2937
|
], 512)) : v("", !0)
|
|
2848
2938
|
], 2)) : v("", !0),
|
|
2849
|
-
e("footer",
|
|
2850
|
-
e("div",
|
|
2851
|
-
|
|
2939
|
+
e("footer", Gn, [
|
|
2940
|
+
e("div", Qn, [
|
|
2941
|
+
Ne.value ? (s(), l("a", eo, [...t[49] || (t[49] = [
|
|
2852
2942
|
e("svg", {
|
|
2853
2943
|
width: "16",
|
|
2854
2944
|
height: "16",
|
|
@@ -2867,17 +2957,17 @@ const da = { class: "artifactuse-card__icon" }, va = ["innerHTML"], fa = { class
|
|
|
2867
2957
|
], -1),
|
|
2868
2958
|
e("span", null, "Artifactuse", -1)
|
|
2869
2959
|
])])) : v("", !0),
|
|
2870
|
-
|
|
2960
|
+
p(n).size ? (s(), l("span", to, i(p(Lt)(p(n).size)), 1)) : v("", !0)
|
|
2871
2961
|
]),
|
|
2872
|
-
e("div",
|
|
2962
|
+
e("div", ao, [
|
|
2873
2963
|
e("button", {
|
|
2874
|
-
class:
|
|
2964
|
+
class: R(["artifactuse-panel__footer-action", { "artifactuse-panel__footer-action--success": K.value }]),
|
|
2875
2965
|
title: K.value ? "Copied!" : "Copy code",
|
|
2876
|
-
onClick:
|
|
2966
|
+
onClick: Zt
|
|
2877
2967
|
}, [
|
|
2878
|
-
K.value ? (
|
|
2968
|
+
K.value ? (s(), l("svg", io, [...t[51] || (t[51] = [
|
|
2879
2969
|
e("polyline", { points: "20 6 9 17 4 12" }, null, -1)
|
|
2880
|
-
])])) : (
|
|
2970
|
+
])])) : (s(), l("svg", lo, [...t[50] || (t[50] = [
|
|
2881
2971
|
e("rect", {
|
|
2882
2972
|
x: "9",
|
|
2883
2973
|
y: "9",
|
|
@@ -2888,11 +2978,11 @@ const da = { class: "artifactuse-card__icon" }, va = ["innerHTML"], fa = { class
|
|
|
2888
2978
|
}, null, -1),
|
|
2889
2979
|
e("path", { d: "M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1" }, null, -1)
|
|
2890
2980
|
])]))
|
|
2891
|
-
], 10,
|
|
2981
|
+
], 10, so),
|
|
2892
2982
|
e("button", {
|
|
2893
2983
|
class: "artifactuse-panel__footer-action",
|
|
2894
2984
|
title: "Download file",
|
|
2895
|
-
onClick:
|
|
2985
|
+
onClick: Kt
|
|
2896
2986
|
}, [...t[52] || (t[52] = [
|
|
2897
2987
|
e("svg", {
|
|
2898
2988
|
viewBox: "0 0 24 24",
|
|
@@ -2910,11 +3000,11 @@ const da = { class: "artifactuse-card__icon" }, va = ["innerHTML"], fa = { class
|
|
|
2910
3000
|
})
|
|
2911
3001
|
], -1)
|
|
2912
3002
|
])]),
|
|
2913
|
-
|
|
3003
|
+
Vt.value ? (s(), l("div", no, [
|
|
2914
3004
|
e("button", {
|
|
2915
3005
|
class: "artifactuse-panel__footer-action",
|
|
2916
3006
|
title: "Share",
|
|
2917
|
-
onClick:
|
|
3007
|
+
onClick: Gt
|
|
2918
3008
|
}, [...t[53] || (t[53] = [
|
|
2919
3009
|
e("svg", {
|
|
2920
3010
|
viewBox: "0 0 24 24",
|
|
@@ -2951,14 +3041,14 @@ const da = { class: "artifactuse-card__icon" }, va = ["innerHTML"], fa = { class
|
|
|
2951
3041
|
})
|
|
2952
3042
|
], -1)
|
|
2953
3043
|
])]),
|
|
2954
|
-
|
|
2955
|
-
default:
|
|
2956
|
-
|
|
2957
|
-
e("div",
|
|
2958
|
-
e("span",
|
|
3044
|
+
De(qe, { name: "artifactuse-popup" }, {
|
|
3045
|
+
default: Oe(() => [
|
|
3046
|
+
z.value ? (s(), l("div", oo, [
|
|
3047
|
+
e("div", ro, [
|
|
3048
|
+
e("span", co, i(o.value === "success" ? q.value ? "Artifact updated!" : "Link created!" : o.value === "update-list" ? "Update saved artifact" : "Share Artifact"), 1),
|
|
2959
3049
|
e("button", {
|
|
2960
3050
|
class: "artifactuse-share-popup__close",
|
|
2961
|
-
onClick:
|
|
3051
|
+
onClick: Qt
|
|
2962
3052
|
}, [...t[54] || (t[54] = [
|
|
2963
3053
|
e("svg", {
|
|
2964
3054
|
viewBox: "0 0 24 24",
|
|
@@ -2981,28 +3071,28 @@ const da = { class: "artifactuse-card__icon" }, va = ["innerHTML"], fa = { class
|
|
|
2981
3071
|
], -1)
|
|
2982
3072
|
])])
|
|
2983
3073
|
]),
|
|
2984
|
-
e("div",
|
|
2985
|
-
|
|
3074
|
+
e("div", uo, [
|
|
3075
|
+
o.value === "loading" ? (s(), l("div", vo, [...t[55] || (t[55] = [
|
|
2986
3076
|
e("div", { class: "artifactuse-share-popup__spinner" }, null, -1),
|
|
2987
3077
|
e("p", { class: "artifactuse-share-popup__loading-text" }, "Creating link...", -1)
|
|
2988
|
-
])])) :
|
|
2989
|
-
e("div",
|
|
2990
|
-
e("p",
|
|
3078
|
+
])])) : o.value === "error" ? (s(), l("div", fo, [
|
|
3079
|
+
e("div", po, [
|
|
3080
|
+
e("p", _o, i(te.value), 1)
|
|
2991
3081
|
]),
|
|
2992
|
-
e("div",
|
|
3082
|
+
e("div", ho, [
|
|
2993
3083
|
e("button", {
|
|
2994
3084
|
class: "artifactuse-share-popup__btn artifactuse-share-popup__btn--secondary",
|
|
2995
|
-
onClick: t[15] || (t[15] = (
|
|
3085
|
+
onClick: t[15] || (t[15] = (c) => o.value = "options")
|
|
2996
3086
|
}, " Back "),
|
|
2997
3087
|
e("button", {
|
|
2998
3088
|
class: "artifactuse-share-popup__btn artifactuse-share-popup__btn--primary",
|
|
2999
|
-
onClick:
|
|
3089
|
+
onClick: ea
|
|
3000
3090
|
}, " Retry ")
|
|
3001
3091
|
])
|
|
3002
|
-
])) :
|
|
3092
|
+
])) : o.value === "options" ? (s(), l("div", mo, [
|
|
3003
3093
|
e("button", {
|
|
3004
3094
|
class: "artifactuse-share-popup__option",
|
|
3005
|
-
onClick:
|
|
3095
|
+
onClick: pt
|
|
3006
3096
|
}, [...t[56] || (t[56] = [
|
|
3007
3097
|
e("div", { class: "artifactuse-share-popup__option-icon" }, [
|
|
3008
3098
|
e("svg", {
|
|
@@ -3022,7 +3112,7 @@ const da = { class: "artifactuse-card__icon" }, va = ["innerHTML"], fa = { class
|
|
|
3022
3112
|
])]),
|
|
3023
3113
|
e("button", {
|
|
3024
3114
|
class: "artifactuse-share-popup__option",
|
|
3025
|
-
onClick:
|
|
3115
|
+
onClick: _t
|
|
3026
3116
|
}, [...t[57] || (t[57] = [
|
|
3027
3117
|
e("div", { class: "artifactuse-share-popup__option-icon" }, [
|
|
3028
3118
|
e("svg", {
|
|
@@ -3043,7 +3133,7 @@ const da = { class: "artifactuse-card__icon" }, va = ["innerHTML"], fa = { class
|
|
|
3043
3133
|
])]),
|
|
3044
3134
|
e("button", {
|
|
3045
3135
|
class: "artifactuse-share-popup__option",
|
|
3046
|
-
onClick:
|
|
3136
|
+
onClick: ta
|
|
3047
3137
|
}, [...t[58] || (t[58] = [
|
|
3048
3138
|
e("div", { class: "artifactuse-share-popup__option-icon" }, [
|
|
3049
3139
|
e("svg", {
|
|
@@ -3062,28 +3152,28 @@ const da = { class: "artifactuse-card__icon" }, va = ["innerHTML"], fa = { class
|
|
|
3062
3152
|
e("p", { class: "artifactuse-share-popup__option-desc" }, "Replace an existing artifact")
|
|
3063
3153
|
], -1)
|
|
3064
3154
|
])])
|
|
3065
|
-
])) :
|
|
3066
|
-
|
|
3155
|
+
])) : o.value === "update-list" ? (s(), l("div", yo, [
|
|
3156
|
+
C.value ? (s(), l("div", go, [...t[59] || (t[59] = [
|
|
3067
3157
|
e("div", { class: "artifactuse-share-popup__spinner" }, null, -1),
|
|
3068
3158
|
e("p", { class: "artifactuse-share-popup__loading-text" }, "Loading artifacts...", -1)
|
|
3069
|
-
])])) :
|
|
3070
|
-
(
|
|
3071
|
-
var
|
|
3072
|
-
return
|
|
3073
|
-
key: ((
|
|
3159
|
+
])])) : $e.value.length === 0 ? (s(), l("div", ko, " No saved artifacts of this type ")) : (s(), l("div", wo, [
|
|
3160
|
+
(s(!0), l(V, null, fe($e.value, (c) => {
|
|
3161
|
+
var A, F, he;
|
|
3162
|
+
return s(), l("button", {
|
|
3163
|
+
key: ((A = c.project) == null ? void 0 : A.uuid) || c.id,
|
|
3074
3164
|
class: "artifactuse-share-popup__artifact-item",
|
|
3075
|
-
onClick: (
|
|
3165
|
+
onClick: (de) => aa(c)
|
|
3076
3166
|
}, [
|
|
3077
|
-
e("span",
|
|
3078
|
-
e("span",
|
|
3079
|
-
], 8,
|
|
3167
|
+
e("span", Co, i(((F = c.project) == null ? void 0 : F.name) || "Untitled"), 1),
|
|
3168
|
+
e("span", xo, i(ft((he = c.project) == null ? void 0 : he.created_at)), 1)
|
|
3169
|
+
], 8, bo);
|
|
3080
3170
|
}), 128))
|
|
3081
3171
|
])),
|
|
3082
3172
|
e("button", {
|
|
3083
3173
|
class: "artifactuse-share-popup__back-btn",
|
|
3084
|
-
onClick: t[16] || (t[16] = (
|
|
3174
|
+
onClick: t[16] || (t[16] = (c) => o.value = "options")
|
|
3085
3175
|
}, "Back")
|
|
3086
|
-
])) :
|
|
3176
|
+
])) : o.value === "success" ? (s(), l("div", $o, [
|
|
3087
3177
|
t[62] || (t[62] = e("div", { class: "artifactuse-share-popup__success-icon" }, [
|
|
3088
3178
|
e("svg", {
|
|
3089
3179
|
viewBox: "0 0 24 24",
|
|
@@ -3094,20 +3184,20 @@ const da = { class: "artifactuse-card__icon" }, va = ["innerHTML"], fa = { class
|
|
|
3094
3184
|
e("polyline", { points: "20 6 9 17 4 12" })
|
|
3095
3185
|
])
|
|
3096
3186
|
], -1)),
|
|
3097
|
-
e("div",
|
|
3187
|
+
e("div", Mo, [
|
|
3098
3188
|
e("input", {
|
|
3099
3189
|
type: "text",
|
|
3100
3190
|
class: "artifactuse-share-popup__link",
|
|
3101
|
-
value:
|
|
3191
|
+
value: P.value,
|
|
3102
3192
|
readonly: "",
|
|
3103
|
-
onClick: t[17] || (t[17] = (
|
|
3104
|
-
}, null, 8,
|
|
3193
|
+
onClick: t[17] || (t[17] = (c) => c.target.select())
|
|
3194
|
+
}, null, 8, To),
|
|
3105
3195
|
e("button", {
|
|
3106
|
-
class:
|
|
3107
|
-
onClick:
|
|
3108
|
-
},
|
|
3196
|
+
class: R(["artifactuse-share-popup__copy-btn", { "artifactuse-share-popup__copy-btn--copied": be.value }]),
|
|
3197
|
+
onClick: sa
|
|
3198
|
+
}, i(be.value ? "Copied!" : "Copy"), 3)
|
|
3109
3199
|
]),
|
|
3110
|
-
|
|
3200
|
+
se.value && !ge.value ? (s(), l("div", Lo, [
|
|
3111
3201
|
t[60] || (t[60] = e("span", { class: "artifactuse-share-popup__expiry-icon" }, [
|
|
3112
3202
|
e("svg", {
|
|
3113
3203
|
viewBox: "0 0 24 24",
|
|
@@ -3134,13 +3224,13 @@ const da = { class: "artifactuse-card__icon" }, va = ["innerHTML"], fa = { class
|
|
|
3134
3224
|
})
|
|
3135
3225
|
])
|
|
3136
3226
|
], -1)),
|
|
3137
|
-
e("span",
|
|
3227
|
+
e("span", Po, " Expires " + i(ft(se.value)), 1)
|
|
3138
3228
|
])) : v("", !0),
|
|
3139
|
-
|
|
3229
|
+
ge.value ? v("", !0) : (s(), l("div", Eo, [
|
|
3140
3230
|
t[61] || (t[61] = e("p", { class: "artifactuse-share-popup__save-prompt-text" }, "Keep it permanently?", -1)),
|
|
3141
3231
|
e("button", {
|
|
3142
3232
|
class: "artifactuse-share-popup__save-prompt-btn",
|
|
3143
|
-
onClick:
|
|
3233
|
+
onClick: _t
|
|
3144
3234
|
}, " Save to account ")
|
|
3145
3235
|
]))
|
|
3146
3236
|
])) : v("", !0)
|
|
@@ -3176,11 +3266,11 @@ const da = { class: "artifactuse-card__icon" }, va = ["innerHTML"], fa = { class
|
|
|
3176
3266
|
_: 1
|
|
3177
3267
|
})
|
|
3178
3268
|
])) : v("", !0),
|
|
3179
|
-
|
|
3269
|
+
Ce.value ? (s(), l("button", {
|
|
3180
3270
|
key: 1,
|
|
3181
3271
|
class: "artifactuse-panel__footer-action",
|
|
3182
3272
|
title: "Open in new tab",
|
|
3183
|
-
onClick:
|
|
3273
|
+
onClick: ht
|
|
3184
3274
|
}, [...t[64] || (t[64] = [
|
|
3185
3275
|
e("svg", {
|
|
3186
3276
|
viewBox: "0 0 24 24",
|
|
@@ -3198,12 +3288,12 @@ const da = { class: "artifactuse-card__icon" }, va = ["innerHTML"], fa = { class
|
|
|
3198
3288
|
})
|
|
3199
3289
|
], -1)
|
|
3200
3290
|
])])) : v("", !0),
|
|
3201
|
-
!
|
|
3291
|
+
!Se.value && _e.value.length > 1 ? (s(), l("div", Ao, [
|
|
3202
3292
|
e("button", {
|
|
3203
3293
|
class: "artifactuse-panel__nav-btn",
|
|
3204
|
-
disabled:
|
|
3294
|
+
disabled: He.value <= 0,
|
|
3205
3295
|
title: "Previous artifact",
|
|
3206
|
-
onClick:
|
|
3296
|
+
onClick: na
|
|
3207
3297
|
}, [...t[65] || (t[65] = [
|
|
3208
3298
|
e("svg", {
|
|
3209
3299
|
viewBox: "0 0 24 24",
|
|
@@ -3213,13 +3303,13 @@ const da = { class: "artifactuse-card__icon" }, va = ["innerHTML"], fa = { class
|
|
|
3213
3303
|
}, [
|
|
3214
3304
|
e("polyline", { points: "15 18 9 12 15 6" })
|
|
3215
3305
|
], -1)
|
|
3216
|
-
])], 8,
|
|
3306
|
+
])], 8, Ho),
|
|
3217
3307
|
e("button", {
|
|
3218
3308
|
class: "artifactuse-panel__nav-trigger",
|
|
3219
3309
|
title: "View all artifacts",
|
|
3220
|
-
onClick:
|
|
3310
|
+
onClick: ia
|
|
3221
3311
|
}, [
|
|
3222
|
-
e("span", null,
|
|
3312
|
+
e("span", null, i(He.value + 1) + " / " + i(_e.value.length), 1),
|
|
3223
3313
|
t[66] || (t[66] = e("svg", {
|
|
3224
3314
|
viewBox: "0 0 24 24",
|
|
3225
3315
|
fill: "none",
|
|
@@ -3231,9 +3321,9 @@ const da = { class: "artifactuse-card__icon" }, va = ["innerHTML"], fa = { class
|
|
|
3231
3321
|
]),
|
|
3232
3322
|
e("button", {
|
|
3233
3323
|
class: "artifactuse-panel__nav-btn",
|
|
3234
|
-
disabled:
|
|
3324
|
+
disabled: He.value >= _e.value.length - 1,
|
|
3235
3325
|
title: "Next artifact",
|
|
3236
|
-
onClick:
|
|
3326
|
+
onClick: oa
|
|
3237
3327
|
}, [...t[67] || (t[67] = [
|
|
3238
3328
|
e("svg", {
|
|
3239
3329
|
viewBox: "0 0 24 24",
|
|
@@ -3243,15 +3333,15 @@ const da = { class: "artifactuse-card__icon" }, va = ["innerHTML"], fa = { class
|
|
|
3243
3333
|
}, [
|
|
3244
3334
|
e("polyline", { points: "9 18 15 12 9 6" })
|
|
3245
3335
|
], -1)
|
|
3246
|
-
])], 8,
|
|
3247
|
-
|
|
3248
|
-
default:
|
|
3249
|
-
Z.value ? (
|
|
3250
|
-
e("div",
|
|
3336
|
+
])], 8, Bo),
|
|
3337
|
+
De(qe, { name: "artifactuse-popup" }, {
|
|
3338
|
+
default: Oe(() => [
|
|
3339
|
+
Z.value ? (s(), l("div", So, [
|
|
3340
|
+
e("div", zo, [
|
|
3251
3341
|
t[69] || (t[69] = e("span", null, "Artifacts", -1)),
|
|
3252
3342
|
e("button", {
|
|
3253
3343
|
class: "artifactuse-panel__artifact-list-close",
|
|
3254
|
-
onClick: t[18] || (t[18] = (
|
|
3344
|
+
onClick: t[18] || (t[18] = (c) => Z.value = !1)
|
|
3255
3345
|
}, [...t[68] || (t[68] = [
|
|
3256
3346
|
e("svg", {
|
|
3257
3347
|
viewBox: "0 0 24 24",
|
|
@@ -3274,27 +3364,27 @@ const da = { class: "artifactuse-card__icon" }, va = ["innerHTML"], fa = { class
|
|
|
3274
3364
|
], -1)
|
|
3275
3365
|
])])
|
|
3276
3366
|
]),
|
|
3277
|
-
e("div",
|
|
3278
|
-
(
|
|
3279
|
-
key:
|
|
3280
|
-
class:
|
|
3281
|
-
onClick: (
|
|
3367
|
+
e("div", Vo, [
|
|
3368
|
+
(s(!0), l(V, null, fe(_e.value, (c, A) => (s(), l("button", {
|
|
3369
|
+
key: c.id,
|
|
3370
|
+
class: R(["artifactuse-panel__artifact-item", { "artifactuse-panel__artifact-item--active": c.id === p(n).id }]),
|
|
3371
|
+
onClick: (F) => mt(c)
|
|
3282
3372
|
}, [
|
|
3283
3373
|
e("span", {
|
|
3284
3374
|
class: "artifactuse-panel__artifact-item-icon",
|
|
3285
|
-
innerHTML:
|
|
3286
|
-
}, null, 8,
|
|
3287
|
-
e("div",
|
|
3288
|
-
e("span",
|
|
3289
|
-
e("span",
|
|
3290
|
-
|
|
3291
|
-
|
|
3292
|
-
|
|
3375
|
+
innerHTML: Xe(c.language)
|
|
3376
|
+
}, null, 8, Fo),
|
|
3377
|
+
e("div", Ro, [
|
|
3378
|
+
e("span", qo, i(c.title || "Untitled"), 1),
|
|
3379
|
+
e("span", Oo, [
|
|
3380
|
+
G(i(p(Ue)(c.language)) + " ", 1),
|
|
3381
|
+
c.lineCount ? (s(), l(V, { key: 0 }, [
|
|
3382
|
+
G(" • " + i(c.lineCount) + " lines ", 1)
|
|
3293
3383
|
], 64)) : v("", !0)
|
|
3294
3384
|
])
|
|
3295
3385
|
]),
|
|
3296
|
-
e("span",
|
|
3297
|
-
], 10,
|
|
3386
|
+
e("span", Uo, i(A + 1), 1)
|
|
3387
|
+
], 10, Io))), 128))
|
|
3298
3388
|
])
|
|
3299
3389
|
])) : v("", !0)
|
|
3300
3390
|
]),
|
|
@@ -3309,22 +3399,22 @@ const da = { class: "artifactuse-card__icon" }, va = ["innerHTML"], fa = { class
|
|
|
3309
3399
|
_: 1
|
|
3310
3400
|
}));
|
|
3311
3401
|
}
|
|
3312
|
-
},
|
|
3402
|
+
}, Do = ["title"], jo = {
|
|
3313
3403
|
key: 0,
|
|
3314
3404
|
class: "artifactuse-panel-toggle-badge"
|
|
3315
|
-
},
|
|
3405
|
+
}, Yo = {
|
|
3316
3406
|
__name: "ArtifactusePanelToggle",
|
|
3317
|
-
setup(
|
|
3318
|
-
const { state:
|
|
3319
|
-
return (
|
|
3320
|
-
class:
|
|
3321
|
-
"artifactuse-panel-toggle--active":
|
|
3322
|
-
"artifactuse-panel-toggle--has-artifacts":
|
|
3407
|
+
setup(L) {
|
|
3408
|
+
const { state: d, artifactCount: _, hasArtifacts: T, togglePanel: f } = je();
|
|
3409
|
+
return (n, O) => (s(), l("button", {
|
|
3410
|
+
class: R(["artifactuse-panel-toggle", {
|
|
3411
|
+
"artifactuse-panel-toggle--active": p(d).isPanelOpen,
|
|
3412
|
+
"artifactuse-panel-toggle--has-artifacts": p(T)
|
|
3323
3413
|
}]),
|
|
3324
|
-
onClick:
|
|
3325
|
-
title:
|
|
3414
|
+
onClick: O[0] || (O[0] = (...H) => p(f) && p(f)(...H)),
|
|
3415
|
+
title: p(d).isPanelOpen ? "Close artifacts panel" : "Open artifacts panel"
|
|
3326
3416
|
}, [
|
|
3327
|
-
|
|
3417
|
+
O[1] || (O[1] = e("svg", {
|
|
3328
3418
|
viewBox: "0 0 24 24",
|
|
3329
3419
|
fill: "none",
|
|
3330
3420
|
stroke: "currentColor",
|
|
@@ -3335,13 +3425,13 @@ const da = { class: "artifactuse-card__icon" }, va = ["innerHTML"], fa = { class
|
|
|
3335
3425
|
e("polyline", { points: "16 18 22 12 16 6" }),
|
|
3336
3426
|
e("polyline", { points: "8 6 2 12 8 18" })
|
|
3337
3427
|
], -1)),
|
|
3338
|
-
|
|
3339
|
-
], 10,
|
|
3428
|
+
p(_) > 0 ? (s(), l("span", jo, i(p(_) > 99 ? "99+" : p(_)), 1)) : v("", !0)
|
|
3429
|
+
], 10, Do));
|
|
3340
3430
|
}
|
|
3341
|
-
},
|
|
3342
|
-
function
|
|
3343
|
-
var
|
|
3344
|
-
const
|
|
3431
|
+
}, Et = Symbol("artifactuse");
|
|
3432
|
+
function At(L = {}) {
|
|
3433
|
+
var r;
|
|
3434
|
+
const d = Pt(L), _ = Tt({
|
|
3345
3435
|
artifacts: [],
|
|
3346
3436
|
activeArtifactId: null,
|
|
3347
3437
|
isPanelOpen: !1,
|
|
@@ -3351,68 +3441,68 @@ function bt(P = {}) {
|
|
|
3351
3441
|
tabViewModes: {},
|
|
3352
3442
|
forceEmptyView: !1
|
|
3353
3443
|
});
|
|
3354
|
-
|
|
3355
|
-
|
|
3444
|
+
d.state.subscribe((h) => {
|
|
3445
|
+
_.artifacts = h.artifacts, _.activeArtifactId = h.activeArtifactId, _.isPanelOpen = h.isPanelOpen, _.viewMode = h.viewMode, _.isFullscreen = h.isFullscreen, _.openTabs = h.openTabs, _.tabViewModes = h.tabViewModes, _.forceEmptyView = h.forceEmptyView;
|
|
3356
3446
|
});
|
|
3357
|
-
const T =
|
|
3358
|
-
if (
|
|
3359
|
-
const h = ((
|
|
3447
|
+
const T = k(() => _.activeArtifactId && _.artifacts.find((h) => h.id === _.activeArtifactId) || null), f = k(() => _.artifacts.filter((h) => !h.isInline).length), n = k(() => _.artifacts.some((h) => !h.isInline)), O = k(() => d.getPanelTypes()), H = k(() => T.value ? d.getPanelUrl(T.value) : null);
|
|
3448
|
+
if (d.applyTheme(), L.theme === "auto" || !L.theme) {
|
|
3449
|
+
const h = ((r = d.bridge) == null ? void 0 : r.theme) || d.theme;
|
|
3360
3450
|
h != null && h.watchSystemTheme && h.watchSystemTheme(() => {
|
|
3361
|
-
|
|
3451
|
+
d.applyTheme();
|
|
3362
3452
|
});
|
|
3363
3453
|
}
|
|
3364
3454
|
const g = {
|
|
3365
|
-
instance:
|
|
3366
|
-
state:
|
|
3455
|
+
instance: d,
|
|
3456
|
+
state: _,
|
|
3367
3457
|
activeArtifact: T,
|
|
3368
|
-
artifactCount:
|
|
3369
|
-
hasArtifacts:
|
|
3458
|
+
artifactCount: f,
|
|
3459
|
+
hasArtifacts: n,
|
|
3370
3460
|
// Panel computed
|
|
3371
|
-
panelTypes:
|
|
3372
|
-
activePanelUrl:
|
|
3461
|
+
panelTypes: O,
|
|
3462
|
+
activePanelUrl: H,
|
|
3373
3463
|
// Methods
|
|
3374
|
-
processMessage:
|
|
3375
|
-
initializeContent:
|
|
3376
|
-
openArtifact:
|
|
3377
|
-
openFile:
|
|
3378
|
-
openCode:
|
|
3379
|
-
updateFile:
|
|
3380
|
-
openPanel:
|
|
3381
|
-
closePanel:
|
|
3382
|
-
togglePanel:
|
|
3383
|
-
toggleFullscreen:
|
|
3384
|
-
setViewMode:
|
|
3385
|
-
getPanelUrl:
|
|
3386
|
-
sendToPanel:
|
|
3464
|
+
processMessage: d.processMessage,
|
|
3465
|
+
initializeContent: d.initializeContent,
|
|
3466
|
+
openArtifact: d.openArtifact,
|
|
3467
|
+
openFile: d.openFile,
|
|
3468
|
+
openCode: d.openCode,
|
|
3469
|
+
updateFile: d.updateFile,
|
|
3470
|
+
openPanel: d.openPanel,
|
|
3471
|
+
closePanel: d.closePanel,
|
|
3472
|
+
togglePanel: d.togglePanel,
|
|
3473
|
+
toggleFullscreen: d.toggleFullscreen,
|
|
3474
|
+
setViewMode: d.setViewMode,
|
|
3475
|
+
getPanelUrl: d.getPanelUrl,
|
|
3476
|
+
sendToPanel: d.sendToPanel,
|
|
3387
3477
|
// Panel management
|
|
3388
|
-
hasPanel:
|
|
3389
|
-
registerPanel:
|
|
3390
|
-
unregisterPanel:
|
|
3391
|
-
getPanelTypes:
|
|
3478
|
+
hasPanel: d.hasPanel,
|
|
3479
|
+
registerPanel: d.registerPanel,
|
|
3480
|
+
unregisterPanel: d.unregisterPanel,
|
|
3481
|
+
getPanelTypes: d.getPanelTypes,
|
|
3392
3482
|
// Multi-tab
|
|
3393
|
-
closeTab:
|
|
3394
|
-
closeOtherTabs:
|
|
3395
|
-
closeAllTabs:
|
|
3483
|
+
closeTab: d.closeTab,
|
|
3484
|
+
closeOtherTabs: d.closeOtherTabs,
|
|
3485
|
+
closeAllTabs: d.closeAllTabs,
|
|
3396
3486
|
// Events
|
|
3397
|
-
on:
|
|
3398
|
-
off:
|
|
3487
|
+
on: d.on,
|
|
3488
|
+
off: d.off,
|
|
3399
3489
|
// State management
|
|
3400
|
-
clearArtifacts: () =>
|
|
3490
|
+
clearArtifacts: () => d.state.clear(),
|
|
3401
3491
|
// Theme - wrap setTheme to also apply
|
|
3402
|
-
applyTheme:
|
|
3492
|
+
applyTheme: d.applyTheme,
|
|
3403
3493
|
setTheme: (h) => {
|
|
3404
|
-
|
|
3494
|
+
d.setTheme(h), d.applyTheme();
|
|
3405
3495
|
},
|
|
3406
|
-
getTheme:
|
|
3496
|
+
getTheme: d.getTheme
|
|
3407
3497
|
};
|
|
3408
|
-
return
|
|
3498
|
+
return _a(Et, g), g;
|
|
3409
3499
|
}
|
|
3410
|
-
function
|
|
3411
|
-
const
|
|
3412
|
-
return
|
|
3500
|
+
function je() {
|
|
3501
|
+
const L = ha(Et);
|
|
3502
|
+
return L || (console.warn("useArtifactuse() called without provideArtifactuse(). Creating standalone instance."), At());
|
|
3413
3503
|
}
|
|
3414
|
-
function
|
|
3415
|
-
const
|
|
3504
|
+
function No(L = {}) {
|
|
3505
|
+
const d = Pt(L), _ = Tt({
|
|
3416
3506
|
artifacts: [],
|
|
3417
3507
|
activeArtifactId: null,
|
|
3418
3508
|
isPanelOpen: !1,
|
|
@@ -3423,76 +3513,76 @@ function bo(P = {}) {
|
|
|
3423
3513
|
forceEmptyView: !1
|
|
3424
3514
|
});
|
|
3425
3515
|
let T;
|
|
3426
|
-
|
|
3427
|
-
T =
|
|
3428
|
-
|
|
3429
|
-
}),
|
|
3430
|
-
}),
|
|
3431
|
-
T && T(),
|
|
3516
|
+
Ee(() => {
|
|
3517
|
+
T = d.state.subscribe((r) => {
|
|
3518
|
+
_.artifacts = r.artifacts, _.activeArtifactId = r.activeArtifactId, _.isPanelOpen = r.isPanelOpen, _.viewMode = r.viewMode, _.isFullscreen = r.isFullscreen, _.openTabs = r.openTabs, _.tabViewModes = r.tabViewModes, _.forceEmptyView = r.forceEmptyView;
|
|
3519
|
+
}), d.applyTheme();
|
|
3520
|
+
}), st(() => {
|
|
3521
|
+
T && T(), d.destroy();
|
|
3432
3522
|
});
|
|
3433
|
-
const
|
|
3523
|
+
const f = k(() => _.activeArtifactId && _.artifacts.find((r) => r.id === _.activeArtifactId) || null), n = k(() => _.artifacts.filter((r) => !r.isInline).length), O = k(() => _.artifacts.some((r) => !r.isInline)), H = k(() => d.getPanelTypes()), g = k(() => f.value ? d.getPanelUrl(f.value) : null);
|
|
3434
3524
|
return {
|
|
3435
|
-
instance:
|
|
3436
|
-
state:
|
|
3437
|
-
activeArtifact:
|
|
3438
|
-
artifactCount:
|
|
3439
|
-
hasArtifacts:
|
|
3525
|
+
instance: d,
|
|
3526
|
+
state: _,
|
|
3527
|
+
activeArtifact: f,
|
|
3528
|
+
artifactCount: n,
|
|
3529
|
+
hasArtifacts: O,
|
|
3440
3530
|
// Panel computed
|
|
3441
|
-
panelTypes:
|
|
3531
|
+
panelTypes: H,
|
|
3442
3532
|
activePanelUrl: g,
|
|
3443
3533
|
// Methods
|
|
3444
|
-
processMessage:
|
|
3445
|
-
initializeContent:
|
|
3446
|
-
openArtifact:
|
|
3447
|
-
openFile:
|
|
3448
|
-
openCode:
|
|
3449
|
-
updateFile:
|
|
3450
|
-
openPanel:
|
|
3451
|
-
closePanel:
|
|
3452
|
-
togglePanel:
|
|
3453
|
-
toggleFullscreen:
|
|
3454
|
-
setViewMode:
|
|
3455
|
-
getPanelUrl:
|
|
3456
|
-
sendToPanel:
|
|
3534
|
+
processMessage: d.processMessage,
|
|
3535
|
+
initializeContent: d.initializeContent,
|
|
3536
|
+
openArtifact: d.openArtifact,
|
|
3537
|
+
openFile: d.openFile,
|
|
3538
|
+
openCode: d.openCode,
|
|
3539
|
+
updateFile: d.updateFile,
|
|
3540
|
+
openPanel: d.openPanel,
|
|
3541
|
+
closePanel: d.closePanel,
|
|
3542
|
+
togglePanel: d.togglePanel,
|
|
3543
|
+
toggleFullscreen: d.toggleFullscreen,
|
|
3544
|
+
setViewMode: d.setViewMode,
|
|
3545
|
+
getPanelUrl: d.getPanelUrl,
|
|
3546
|
+
sendToPanel: d.sendToPanel,
|
|
3457
3547
|
// Panel management
|
|
3458
|
-
hasPanel:
|
|
3459
|
-
registerPanel:
|
|
3460
|
-
unregisterPanel:
|
|
3461
|
-
getPanelTypes:
|
|
3548
|
+
hasPanel: d.hasPanel,
|
|
3549
|
+
registerPanel: d.registerPanel,
|
|
3550
|
+
unregisterPanel: d.unregisterPanel,
|
|
3551
|
+
getPanelTypes: d.getPanelTypes,
|
|
3462
3552
|
// Multi-tab
|
|
3463
|
-
closeTab:
|
|
3464
|
-
closeOtherTabs:
|
|
3465
|
-
closeAllTabs:
|
|
3553
|
+
closeTab: d.closeTab,
|
|
3554
|
+
closeOtherTabs: d.closeOtherTabs,
|
|
3555
|
+
closeAllTabs: d.closeAllTabs,
|
|
3466
3556
|
// Events
|
|
3467
|
-
on:
|
|
3468
|
-
off:
|
|
3557
|
+
on: d.on,
|
|
3558
|
+
off: d.off,
|
|
3469
3559
|
// State management
|
|
3470
|
-
clearArtifacts: () =>
|
|
3560
|
+
clearArtifacts: () => d.state.clear(),
|
|
3471
3561
|
// Theme - wrap setTheme to also apply
|
|
3472
|
-
applyTheme:
|
|
3473
|
-
setTheme: (
|
|
3474
|
-
|
|
3562
|
+
applyTheme: d.applyTheme,
|
|
3563
|
+
setTheme: (r) => {
|
|
3564
|
+
d.setTheme(r), d.applyTheme();
|
|
3475
3565
|
},
|
|
3476
|
-
getTheme:
|
|
3566
|
+
getTheme: d.getTheme
|
|
3477
3567
|
};
|
|
3478
3568
|
}
|
|
3479
|
-
const
|
|
3480
|
-
provideArtifactuse:
|
|
3481
|
-
useArtifactuse:
|
|
3482
|
-
createArtifactuseComposable:
|
|
3483
|
-
DEFAULT_PANELS:
|
|
3569
|
+
const Go = {
|
|
3570
|
+
provideArtifactuse: At,
|
|
3571
|
+
useArtifactuse: je,
|
|
3572
|
+
createArtifactuseComposable: No,
|
|
3573
|
+
DEFAULT_PANELS: ga
|
|
3484
3574
|
};
|
|
3485
3575
|
export {
|
|
3486
|
-
|
|
3487
|
-
|
|
3488
|
-
|
|
3489
|
-
|
|
3490
|
-
|
|
3491
|
-
|
|
3492
|
-
|
|
3493
|
-
|
|
3494
|
-
|
|
3495
|
-
|
|
3496
|
-
|
|
3497
|
-
|
|
3576
|
+
Zo as ArtifactuseAgentMessage,
|
|
3577
|
+
Sa as ArtifactuseCard,
|
|
3578
|
+
Cs as ArtifactuseInlineForm,
|
|
3579
|
+
Ko as ArtifactusePanel,
|
|
3580
|
+
Yo as ArtifactusePanelToggle,
|
|
3581
|
+
Mi as ArtifactuseSocialPreview,
|
|
3582
|
+
Si as ArtifactuseViewer,
|
|
3583
|
+
ga as DEFAULT_PANELS,
|
|
3584
|
+
No as createArtifactuseComposable,
|
|
3585
|
+
Go as default,
|
|
3586
|
+
At as provideArtifactuse,
|
|
3587
|
+
je as useArtifactuse
|
|
3498
3588
|
};
|