artifactuse 0.3.1 → 0.3.2
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/{index-vmcpJRYe.js → index-ABusvYh9.js} +3 -2
- package/dist/index.js +1 -1
- package/dist/react/index.js +123 -123
- package/dist/svelte/index.js +480 -480
- package/dist/vue/index.js +194 -194
- package/dist/vue2/index.js +6 -5
- package/package.json +1 -1
package/dist/svelte/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { writable as ka, derived as Ja } from "svelte/store";
|
|
2
2
|
import { createEventDispatcher as ya, onMount as xa, onDestroy as Ha, tick as Jt, setContext as hs, getContext as bs } from "svelte";
|
|
3
|
-
import { g as la, f as vr, a as Xa, b as dr, n as Fr, i as Vr, c as ks, D as ys, d as xs } from "../index-
|
|
3
|
+
import { g as la, f as vr, a as Xa, b as dr, n as Fr, i as Vr, c as ks, D as ys, d as xs } from "../index-ABusvYh9.js";
|
|
4
4
|
import "svelte/internal/disclose-version";
|
|
5
5
|
import "svelte/internal/flags/legacy";
|
|
6
6
|
import * as e from "svelte/internal/client";
|
|
@@ -44,8 +44,8 @@ function Es(Ve, c) {
|
|
|
44
44
|
function we(D) {
|
|
45
45
|
var u;
|
|
46
46
|
D.stopPropagation();
|
|
47
|
-
const he = new Blob([l().code], { type: "text/plain" }), te = URL.createObjectURL(he), Re = document.createElement("a"),
|
|
48
|
-
Re.href = te, Re.download = `${
|
|
47
|
+
const he = new Blob([l().code], { type: "text/plain" }), te = URL.createObjectURL(he), Re = document.createElement("a"), ot = dr(l().editorLanguage || l().language), at = ((u = l().title) == null ? void 0 : u.replace(/[^a-z0-9]/gi, "_").toLowerCase()) || "code";
|
|
48
|
+
Re.href = te, Re.download = `${at}.${ot}`, document.body.appendChild(Re), Re.click(), document.body.removeChild(Re), URL.revokeObjectURL(te), d("download", l());
|
|
49
49
|
}
|
|
50
50
|
e.legacy_pre_effect(() => e.deep_read_state(l()), () => {
|
|
51
51
|
e.set(me, la(l().language));
|
|
@@ -57,34 +57,34 @@ function Es(Ve, c) {
|
|
|
57
57
|
}), e.legacy_pre_effect_reset(), e.init();
|
|
58
58
|
var Z = As();
|
|
59
59
|
let se;
|
|
60
|
-
var Ie = e.child(Z), ue = e.child(Ie),
|
|
61
|
-
e.html(
|
|
60
|
+
var Ie = e.child(Z), ue = e.child(Ie), Se = e.child(ue);
|
|
61
|
+
e.html(Se, () => e.get(w), !0), e.reset(ue), e.reset(Ie);
|
|
62
62
|
var C = e.sibling(Ie, 2), f = e.child(C), F = e.child(f, !0);
|
|
63
63
|
e.reset(f);
|
|
64
|
-
var q = e.sibling(f, 2),
|
|
65
|
-
e.reset(
|
|
66
|
-
var ve = e.sibling(
|
|
64
|
+
var q = e.sibling(f, 2), Te = e.child(q), xe = e.child(Te, !0);
|
|
65
|
+
e.reset(Te);
|
|
66
|
+
var ve = e.sibling(Te, 4), lt = e.child(ve, !0);
|
|
67
67
|
e.reset(ve), e.reset(q), e.reset(C);
|
|
68
68
|
var qe = e.sibling(C, 2), Ce = e.child(qe), De = e.child(Ce);
|
|
69
69
|
{
|
|
70
70
|
var Je = (D) => {
|
|
71
71
|
var he = $s();
|
|
72
72
|
e.append(D, he);
|
|
73
|
-
},
|
|
73
|
+
}, Ze = (D) => {
|
|
74
74
|
var he = Ps();
|
|
75
75
|
e.append(D, he);
|
|
76
76
|
};
|
|
77
77
|
e.if(De, (D) => {
|
|
78
|
-
e.get(I) ? D(
|
|
78
|
+
e.get(I) ? D(Ze, !1) : D(Je);
|
|
79
79
|
});
|
|
80
80
|
}
|
|
81
81
|
e.reset(Ce);
|
|
82
82
|
var $e = e.sibling(Ce, 2);
|
|
83
83
|
e.reset(qe), e.next(2), e.reset(Z), e.template_effect(() => {
|
|
84
|
-
se = e.set_class(Z, 1, "artifactuse-card", null, se, { "artifactuse-card--active": i() }), e.set_text(F, (e.deep_read_state(l()), e.untrack(() => l().title))), e.set_text(xe, e.get(me)), e.set_text(
|
|
84
|
+
se = e.set_class(Z, 1, "artifactuse-card", null, se, { "artifactuse-card--active": i() }), e.set_text(F, (e.deep_read_state(l()), e.untrack(() => l().title))), e.set_text(xe, e.get(me)), e.set_text(lt, e.get(h)), e.set_attribute(Ce, "title", e.get(I) ? "Copied!" : "Copy code");
|
|
85
85
|
}), e.event("click", Ce, Ee), e.event("click", $e, we), e.event("click", Z, a), e.event("keypress", Z, (D) => D.key === "Enter" && a(D)), e.append(Ve, Z), e.pop();
|
|
86
86
|
}
|
|
87
|
-
var
|
|
87
|
+
var Ls = e.from_svg('<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"><polyline points="20 6 9 17 4 12"></polyline></svg>'), Ts = e.from_svg('<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"><line x1="18" y1="6" x2="6" y2="18"></line><line x1="6" y1="6" x2="18" y2="18"></line></svg>'), Ss = e.from_svg('<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"><line x1="5" y1="12" x2="19" y2="12"></line></svg>'), Ms = e.from_html('<div class="artifactuse-form-collapsed"><div class="artifactuse-form-collapsed-icon"><!></div> <span class="artifactuse-form-collapsed-title"> </span></div>'), Bs = e.from_html('<div class="artifactuse-form-title"> </div>'), Hs = e.from_html('<p class="artifactuse-form-description"> </p>'), Is = e.from_html('<div class="artifactuse-form-header"><!> <!></div>'), zs = e.from_html('<span class="artifactuse-form-btn-icon"><!></span>'), Fs = e.from_html('<button type="button"><!> </button>'), Vs = e.from_html('<div class="artifactuse-form-buttons"></div>'), qs = e.from_html('<span class="artifactuse-form-btn-spinner"></span>'), Ds = e.from_html('<span class="artifactuse-form-btn-icon"><!></span>'), Rs = e.from_html("<button><!> </button>"), Os = e.from_html('<div class="artifactuse-form-buttons"></div>'), Us = e.from_html('<div class="artifactuse-form-divider"></div>'), Ns = e.from_html('<div class="artifactuse-form-heading"> </div>'), js = e.from_html('<span class="artifactuse-required">*</span>'), Ws = e.from_html('<span class="artifactuse-help-text"> </span>'), Js = e.from_html('<span class="artifactuse-error-text"> </span>'), Xs = e.from_html('<div class="artifactuse-form-field"><label class="artifactuse-checkbox-label"><input type="checkbox" class="artifactuse-checkbox"/> <span class="artifactuse-checkbox-text"> <!></span></label> <!> <!></div>'), Zs = e.from_html('<span class="artifactuse-required">*</span>'), Ks = e.from_html('<label class="artifactuse-label"> <!></label>'), Ys = e.from_html('<label class="artifactuse-radio-label"><input type="radio" class="artifactuse-radio"/> <span> </span></label>'), Qs = e.from_html('<span class="artifactuse-help-text"> </span>'), Gs = e.from_html('<span class="artifactuse-error-text"> </span>'), ei = e.from_html('<div class="artifactuse-form-field"><!> <div class="artifactuse-radio-group"></div> <!> <!></div>'), ti = e.from_html('<span class="artifactuse-required">*</span>'), ai = e.from_html('<input class="artifactuse-input"/>'), ri = e.from_html('<textarea class="artifactuse-textarea"></textarea>'), si = e.from_html("<option> </option>"), ii = e.from_html('<select class="artifactuse-select"><option> </option><!></select>'), ni = e.from_html('<span class="artifactuse-help-text"> </span>'), li = e.from_html('<span class="artifactuse-error-text"> </span>'), oi = e.from_html('<div class="artifactuse-form-field"><label class="artifactuse-label"> <!></label> <!> <!> <!></div>'), ci = e.from_html('<span class="artifactuse-form-btn-spinner"></span>'), ui = e.from_html('<div class="artifactuse-form-buttons artifactuse-form-buttons-default"><button type="button" class="artifactuse-form-btn artifactuse-form-btn-ghost">Cancel</button> <button type="submit" class="artifactuse-form-btn artifactuse-form-btn-primary"><!> </button></div>'), vi = e.from_html('<form class="artifactuse-form"><div class="artifactuse-form-fields"></div> <!></form>'), di = e.from_html("<!> <!>", 1), _i = e.from_html("<div><!></div>");
|
|
88
88
|
function pi(Ve, c) {
|
|
89
89
|
e.push(c, !1);
|
|
90
90
|
const me = e.mutable_source(), h = e.mutable_source(), w = e.mutable_source(), l = e.mutable_source(), i = e.mutable_source(), d = e.mutable_source(), I = e.mutable_source(), a = e.mutable_source(), Ee = e.mutable_source();
|
|
@@ -96,8 +96,8 @@ function pi(Ve, c) {
|
|
|
96
96
|
// 'active' | 'submitted' | 'cancelled' | 'inactive'
|
|
97
97
|
);
|
|
98
98
|
const ue = ya();
|
|
99
|
-
let
|
|
100
|
-
function
|
|
99
|
+
let Se = e.mutable_source(), C = e.mutable_source({}), f = e.mutable_source({}), F = e.mutable_source(!1), q = e.mutable_source(Ie());
|
|
100
|
+
function Te(u) {
|
|
101
101
|
try {
|
|
102
102
|
return JSON.parse(u);
|
|
103
103
|
} catch {
|
|
@@ -117,8 +117,8 @@ function pi(Ve, c) {
|
|
|
117
117
|
if (K.startsWith("#")) {
|
|
118
118
|
let ae = K.slice(1);
|
|
119
119
|
if (ae.length === 3 && (ae = ae.split("").map((k) => k + k).join("")), ae.length === 6) {
|
|
120
|
-
const k = parseInt(ae.slice(0, 2), 16),
|
|
121
|
-
if (!isNaN(k) && !isNaN(
|
|
120
|
+
const k = parseInt(ae.slice(0, 2), 16), Le = parseInt(ae.slice(2, 4), 16), Pe = parseInt(ae.slice(4, 6), 16);
|
|
121
|
+
if (!isNaN(k) && !isNaN(Le) && !isNaN(Pe)) return `${k}, ${Le}, ${Pe}`;
|
|
122
122
|
}
|
|
123
123
|
}
|
|
124
124
|
const de = K.match(/^rgba?\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)/i);
|
|
@@ -126,13 +126,13 @@ function pi(Ve, c) {
|
|
|
126
126
|
const M = K.split(/[\s,]+/).map(Number).filter((ae) => !isNaN(ae));
|
|
127
127
|
return M.length >= 3 ? `${M[0]}, ${M[1]}, ${M[2]}` : null;
|
|
128
128
|
}
|
|
129
|
-
function
|
|
129
|
+
function lt(u) {
|
|
130
130
|
return u ? u.map((K) => typeof K == "string" ? { label: K, value: K } : K) : [];
|
|
131
131
|
}
|
|
132
132
|
function qe() {
|
|
133
|
-
if (e.get(
|
|
133
|
+
if (e.get(Se) && se()) {
|
|
134
134
|
const u = ve(se());
|
|
135
|
-
u && e.get(
|
|
135
|
+
u && e.get(Se).style.setProperty("--artifactuse-primary", u);
|
|
136
136
|
}
|
|
137
137
|
}
|
|
138
138
|
xa(() => {
|
|
@@ -161,7 +161,7 @@ function pi(Ve, c) {
|
|
|
161
161
|
function Je(u, K) {
|
|
162
162
|
e.mutate(C, e.get(C)[u] = K), e.get(f)[u] && (delete e.get(f)[u], e.set(f, e.get(f)));
|
|
163
163
|
}
|
|
164
|
-
function
|
|
164
|
+
function Ze() {
|
|
165
165
|
var de;
|
|
166
166
|
const u = {};
|
|
167
167
|
e.get(d).forEach((M) => {
|
|
@@ -199,7 +199,7 @@ function pi(Ve, c) {
|
|
|
199
199
|
Ce();
|
|
200
200
|
}
|
|
201
201
|
function D(u) {
|
|
202
|
-
u.preventDefault(),
|
|
202
|
+
u.preventDefault(), Ze() && (e.set(F, !0), ue("submit", {
|
|
203
203
|
formId: e.get(l),
|
|
204
204
|
action: "submit",
|
|
205
205
|
values: { ...e.get(C) },
|
|
@@ -216,7 +216,7 @@ function pi(Ve, c) {
|
|
|
216
216
|
const K = u.action || "custom";
|
|
217
217
|
switch (K) {
|
|
218
218
|
case "submit":
|
|
219
|
-
const M = (de = e.get(
|
|
219
|
+
const M = (de = e.get(Se)) == null ? void 0 : de.querySelector("form");
|
|
220
220
|
M && M.requestSubmit();
|
|
221
221
|
break;
|
|
222
222
|
case "cancel":
|
|
@@ -266,7 +266,7 @@ function pi(Ve, c) {
|
|
|
266
266
|
e.set(h, e.get(q) === "active" ? "" : `artifactuse-form--${e.get(q)}`);
|
|
267
267
|
}), e.legacy_pre_effect(() => e.deep_read_state(we()), () => {
|
|
268
268
|
var u;
|
|
269
|
-
e.set(w,
|
|
269
|
+
e.set(w, Te((u = we()) == null ? void 0 : u.code));
|
|
270
270
|
}), e.legacy_pre_effect(() => (e.deep_read_state(we()), e.get(w)), () => {
|
|
271
271
|
var u;
|
|
272
272
|
e.set(l, ((u = we()) == null ? void 0 : u.id) || e.get(w).id || `form-${Date.now()}`);
|
|
@@ -289,20 +289,20 @@ function pi(Ve, c) {
|
|
|
289
289
|
}), e.legacy_pre_effect_reset(), e.init();
|
|
290
290
|
var te = _i(), Re = e.child(te);
|
|
291
291
|
{
|
|
292
|
-
var
|
|
292
|
+
var ot = (u) => {
|
|
293
293
|
var K = Ms(), de = e.child(K), M = e.child(de);
|
|
294
294
|
{
|
|
295
295
|
var ae = (Ae) => {
|
|
296
|
-
var He =
|
|
296
|
+
var He = Ls();
|
|
297
297
|
e.append(Ae, He);
|
|
298
298
|
}, k = (Ae) => {
|
|
299
299
|
var He = e.comment(), ne = e.first_child(He);
|
|
300
300
|
{
|
|
301
301
|
var Me = (t) => {
|
|
302
|
-
var fe =
|
|
302
|
+
var fe = Ts();
|
|
303
303
|
e.append(t, fe);
|
|
304
304
|
}, be = (t) => {
|
|
305
|
-
var fe =
|
|
305
|
+
var fe = Ss();
|
|
306
306
|
e.append(t, fe);
|
|
307
307
|
};
|
|
308
308
|
e.if(
|
|
@@ -320,9 +320,9 @@ function pi(Ve, c) {
|
|
|
320
320
|
});
|
|
321
321
|
}
|
|
322
322
|
e.reset(de);
|
|
323
|
-
var
|
|
324
|
-
e.reset(
|
|
325
|
-
},
|
|
323
|
+
var Le = e.sibling(de, 2), Pe = e.child(Le, !0);
|
|
324
|
+
e.reset(Le), e.reset(K), e.template_effect(() => e.set_text(Pe, e.get(Ee))), e.append(u, K);
|
|
325
|
+
}, at = (u) => {
|
|
326
326
|
var K = di(), de = e.first_child(K);
|
|
327
327
|
{
|
|
328
328
|
var M = (Pe) => {
|
|
@@ -372,7 +372,7 @@ function pi(Ve, c) {
|
|
|
372
372
|
e.set_class(Me, 1, `artifactuse-form-btn artifactuse-form-btn-${e.get(ne), e.untrack(() => e.get(ne).variant || "secondary") ?? ""}`), Me.disabled = (e.get(ne), e.get(F), e.untrack(() => e.get(ne).disabled || e.get(F))), e.set_text(fe, ` ${e.get(ne), e.untrack(() => e.get(ne).label) ?? ""}`);
|
|
373
373
|
}), e.event("click", Me, () => he(e.get(ne))), e.append(He, Me);
|
|
374
374
|
}), e.reset(Ae), e.append(Pe, Ae);
|
|
375
|
-
},
|
|
375
|
+
}, Le = (Pe) => {
|
|
376
376
|
var Ae = vi(), He = e.child(Ae);
|
|
377
377
|
e.each(He, 7, () => e.get(d), (be, t) => be.name || t, (be, t) => {
|
|
378
378
|
var fe = e.comment(), s = e.first_child(fe);
|
|
@@ -434,38 +434,38 @@ function pi(Ve, c) {
|
|
|
434
434
|
e.remove_input_defaults(A);
|
|
435
435
|
var j = e.sibling(A, 2), y = e.child(j), _ = e.sibling(y);
|
|
436
436
|
{
|
|
437
|
-
var b = (
|
|
437
|
+
var b = (T) => {
|
|
438
438
|
var _e = js();
|
|
439
|
-
e.append(
|
|
439
|
+
e.append(T, _e);
|
|
440
440
|
};
|
|
441
|
-
e.if(_, (
|
|
442
|
-
e.get(t), e.untrack(() => e.get(t).required) &&
|
|
441
|
+
e.if(_, (T) => {
|
|
442
|
+
e.get(t), e.untrack(() => e.get(t).required) && T(b);
|
|
443
443
|
});
|
|
444
444
|
}
|
|
445
445
|
e.reset(j), e.reset(P);
|
|
446
446
|
var J = e.sibling(P, 2);
|
|
447
447
|
{
|
|
448
|
-
var U = (
|
|
448
|
+
var U = (T) => {
|
|
449
449
|
var _e = Ws(), W = e.child(_e, !0);
|
|
450
|
-
e.reset(_e), e.template_effect(() => e.set_text(W, (e.get(t), e.untrack(() => e.get(t).helpText)))), e.append(
|
|
450
|
+
e.reset(_e), e.template_effect(() => e.set_text(W, (e.get(t), e.untrack(() => e.get(t).helpText)))), e.append(T, _e);
|
|
451
451
|
};
|
|
452
|
-
e.if(J, (
|
|
453
|
-
e.get(t), e.untrack(() => e.get(t).helpText) &&
|
|
452
|
+
e.if(J, (T) => {
|
|
453
|
+
e.get(t), e.untrack(() => e.get(t).helpText) && T(U);
|
|
454
454
|
});
|
|
455
455
|
}
|
|
456
|
-
var
|
|
456
|
+
var L = e.sibling(J, 2);
|
|
457
457
|
{
|
|
458
|
-
var ee = (
|
|
458
|
+
var ee = (T) => {
|
|
459
459
|
var _e = Js(), W = e.child(_e, !0);
|
|
460
|
-
e.reset(_e), e.template_effect(() => e.set_text(W, (e.get(f), e.get(t), e.untrack(() => e.get(f)[e.get(t).name])))), e.append(
|
|
460
|
+
e.reset(_e), e.template_effect(() => e.set_text(W, (e.get(f), e.get(t), e.untrack(() => e.get(f)[e.get(t).name])))), e.append(T, _e);
|
|
461
461
|
};
|
|
462
|
-
e.if(
|
|
463
|
-
e.get(f), e.get(t), e.untrack(() => e.get(f)[e.get(t).name]) &&
|
|
462
|
+
e.if(L, (T) => {
|
|
463
|
+
e.get(f), e.get(t), e.untrack(() => e.get(f)[e.get(t).name]) && T(ee);
|
|
464
464
|
});
|
|
465
465
|
}
|
|
466
466
|
e.reset(x), e.template_effect(() => {
|
|
467
467
|
e.set_checked(A, (e.get(C), e.get(t), e.untrack(() => e.get(C)[e.get(t).name]))), A.disabled = (e.get(t), e.untrack(() => e.get(t).disabled)), e.set_text(y, `${e.get(t), e.untrack(() => e.get(t).label) ?? ""} `);
|
|
468
|
-
}), e.event("change", A, (
|
|
468
|
+
}), e.event("change", A, (T) => Je(e.get(t).name, T.target.checked)), e.append(v, x);
|
|
469
469
|
}, Q = (v) => {
|
|
470
470
|
var x = e.comment(), P = e.first_child(x);
|
|
471
471
|
{
|
|
@@ -476,8 +476,8 @@ function pi(Ve, c) {
|
|
|
476
476
|
var B = Ks(), Y = e.child(B), oe = e.sibling(Y);
|
|
477
477
|
{
|
|
478
478
|
var H = (X) => {
|
|
479
|
-
var
|
|
480
|
-
e.append(X,
|
|
479
|
+
var et = Zs();
|
|
480
|
+
e.append(X, et);
|
|
481
481
|
};
|
|
482
482
|
e.if(oe, (X) => {
|
|
483
483
|
e.get(t), e.untrack(() => e.get(t).required) && X(H);
|
|
@@ -495,7 +495,7 @@ function pi(Ve, c) {
|
|
|
495
495
|
e.each(
|
|
496
496
|
U,
|
|
497
497
|
5,
|
|
498
|
-
() => (e.get(t), e.untrack(() =>
|
|
498
|
+
() => (e.get(t), e.untrack(() => lt(e.get(t).options))),
|
|
499
499
|
(W) => W.value,
|
|
500
500
|
(W, B) => {
|
|
501
501
|
var Y = Ys(), oe = e.child(Y);
|
|
@@ -506,23 +506,23 @@ function pi(Ve, c) {
|
|
|
506
506
|
}), e.event("change", oe, () => Je(e.get(t).name, e.get(B).value)), e.append(W, Y);
|
|
507
507
|
}
|
|
508
508
|
), e.reset(U);
|
|
509
|
-
var
|
|
509
|
+
var L = e.sibling(U, 2);
|
|
510
510
|
{
|
|
511
511
|
var ee = (W) => {
|
|
512
512
|
var B = Qs(), Y = e.child(B, !0);
|
|
513
513
|
e.reset(B), e.template_effect(() => e.set_text(Y, (e.get(t), e.untrack(() => e.get(t).helpText)))), e.append(W, B);
|
|
514
514
|
};
|
|
515
|
-
e.if(
|
|
515
|
+
e.if(L, (W) => {
|
|
516
516
|
e.get(t), e.untrack(() => e.get(t).helpText) && W(ee);
|
|
517
517
|
});
|
|
518
518
|
}
|
|
519
|
-
var
|
|
519
|
+
var T = e.sibling(L, 2);
|
|
520
520
|
{
|
|
521
521
|
var _e = (W) => {
|
|
522
522
|
var B = Gs(), Y = e.child(B, !0);
|
|
523
523
|
e.reset(B), e.template_effect(() => e.set_text(Y, (e.get(f), e.get(t), e.untrack(() => e.get(f)[e.get(t).name])))), e.append(W, B);
|
|
524
524
|
};
|
|
525
|
-
e.if(
|
|
525
|
+
e.if(T, (W) => {
|
|
526
526
|
e.get(f), e.get(t), e.untrack(() => e.get(f)[e.get(t).name]) && W(_e);
|
|
527
527
|
});
|
|
528
528
|
}
|
|
@@ -530,55 +530,55 @@ function pi(Ve, c) {
|
|
|
530
530
|
}, j = (y) => {
|
|
531
531
|
var _ = oi(), b = e.child(_), J = e.child(b), U = e.sibling(J);
|
|
532
532
|
{
|
|
533
|
-
var
|
|
533
|
+
var L = (H) => {
|
|
534
534
|
var X = ti();
|
|
535
535
|
e.append(H, X);
|
|
536
536
|
};
|
|
537
537
|
e.if(U, (H) => {
|
|
538
|
-
e.get(t), e.untrack(() => e.get(t).required) && H(
|
|
538
|
+
e.get(t), e.untrack(() => e.get(t).required) && H(L);
|
|
539
539
|
});
|
|
540
540
|
}
|
|
541
541
|
e.reset(b);
|
|
542
542
|
var ee = e.sibling(b, 2);
|
|
543
543
|
{
|
|
544
|
-
var
|
|
544
|
+
var T = (H) => {
|
|
545
545
|
var X = ai();
|
|
546
546
|
e.remove_input_defaults(X), e.template_effect(() => {
|
|
547
547
|
e.set_attribute(X, "id", `${e.get(l) ?? ""}-${e.get(t), e.untrack(() => e.get(t).name) ?? ""}`), e.set_attribute(X, "type", (e.get(t), e.untrack(() => e.get(t).type))), e.set_value(X, (e.get(C), e.get(t), e.untrack(() => e.get(C)[e.get(t).name] || ""))), e.set_attribute(X, "placeholder", (e.get(t), e.untrack(() => e.get(t).placeholder))), X.disabled = (e.get(t), e.untrack(() => e.get(t).disabled)), X.required = (e.get(t), e.untrack(() => e.get(t).required));
|
|
548
|
-
}), e.event("input", X, (
|
|
548
|
+
}), e.event("input", X, (et) => Je(e.get(t).name, et.target.value)), e.append(H, X);
|
|
549
549
|
}, _e = (H) => {
|
|
550
|
-
var X = e.comment(),
|
|
550
|
+
var X = e.comment(), et = e.first_child(X);
|
|
551
551
|
{
|
|
552
|
-
var Xt = (
|
|
553
|
-
var
|
|
554
|
-
e.remove_textarea_child(
|
|
555
|
-
e.set_attribute(
|
|
556
|
-
}), e.event("input",
|
|
557
|
-
}, oa = (
|
|
558
|
-
var
|
|
552
|
+
var Xt = ($t) => {
|
|
553
|
+
var rt = ri();
|
|
554
|
+
e.remove_textarea_child(rt), e.template_effect(() => {
|
|
555
|
+
e.set_attribute(rt, "id", `${e.get(l) ?? ""}-${e.get(t), e.untrack(() => e.get(t).name) ?? ""}`), e.set_value(rt, (e.get(C), e.get(t), e.untrack(() => e.get(C)[e.get(t).name] || ""))), e.set_attribute(rt, "placeholder", (e.get(t), e.untrack(() => e.get(t).placeholder))), rt.disabled = (e.get(t), e.untrack(() => e.get(t).disabled)), rt.required = (e.get(t), e.untrack(() => e.get(t).required)), e.set_attribute(rt, "rows", (e.get(t), e.untrack(() => e.get(t).rows || 3)));
|
|
556
|
+
}), e.event("input", rt, (Ot) => Je(e.get(t).name, Ot.target.value)), e.append($t, rt);
|
|
557
|
+
}, oa = ($t) => {
|
|
558
|
+
var rt = e.comment(), Ot = e.first_child(rt);
|
|
559
559
|
{
|
|
560
560
|
var wa = (Ca) => {
|
|
561
|
-
var
|
|
561
|
+
var ft = ii(), Zt = e.child(ft), Ia = e.child(Zt, !0);
|
|
562
562
|
e.reset(Zt), Zt.value = Zt.__value = "";
|
|
563
563
|
var za = e.sibling(Zt);
|
|
564
564
|
e.each(
|
|
565
565
|
za,
|
|
566
566
|
1,
|
|
567
|
-
() => (e.get(t), e.untrack(() =>
|
|
567
|
+
() => (e.get(t), e.untrack(() => lt(e.get(t).options))),
|
|
568
568
|
(Kt) => Kt.value,
|
|
569
|
-
(Kt,
|
|
569
|
+
(Kt, Lt) => {
|
|
570
570
|
var Ut = si(), Ka = e.child(Ut, !0);
|
|
571
571
|
e.reset(Ut);
|
|
572
572
|
var Fa = {};
|
|
573
573
|
e.template_effect(() => {
|
|
574
|
-
Ut.disabled = (e.get(
|
|
574
|
+
Ut.disabled = (e.get(Lt), e.untrack(() => e.get(Lt).disabled)), e.set_text(Ka, (e.get(Lt), e.untrack(() => e.get(Lt).label))), Fa !== (Fa = (e.get(Lt), e.untrack(() => e.get(Lt).value))) && (Ut.value = (Ut.__value = (e.get(Lt), e.untrack(() => e.get(Lt).value))) ?? "");
|
|
575
575
|
}), e.append(Kt, Ut);
|
|
576
576
|
}
|
|
577
|
-
), e.reset(
|
|
577
|
+
), e.reset(ft);
|
|
578
578
|
var ca;
|
|
579
|
-
e.init_select(
|
|
580
|
-
e.set_attribute(
|
|
581
|
-
}), e.event("change",
|
|
579
|
+
e.init_select(ft), e.template_effect(() => {
|
|
580
|
+
e.set_attribute(ft, "id", `${e.get(l) ?? ""}-${e.get(t), e.untrack(() => e.get(t).name) ?? ""}`), ft.disabled = (e.get(t), e.untrack(() => e.get(t).disabled)), ft.required = (e.get(t), e.untrack(() => e.get(t).required)), e.set_text(Ia, (e.get(t), e.untrack(() => e.get(t).placeholder || "Select..."))), ca !== (ca = (e.get(C), e.get(t), e.untrack(() => e.get(C)[e.get(t).name] || ""))) && (ft.value = (ft.__value = (e.get(C), e.get(t), e.untrack(() => e.get(C)[e.get(t).name] || ""))) ?? "", e.select_option(ft, (e.get(C), e.get(t), e.untrack(() => e.get(C)[e.get(t).name] || ""))));
|
|
581
|
+
}), e.event("change", ft, (Kt) => Je(e.get(t).name, Kt.target.value)), e.append(Ca, ft);
|
|
582
582
|
};
|
|
583
583
|
e.if(
|
|
584
584
|
Ot,
|
|
@@ -588,12 +588,12 @@ function pi(Ve, c) {
|
|
|
588
588
|
!0
|
|
589
589
|
);
|
|
590
590
|
}
|
|
591
|
-
e.append(
|
|
591
|
+
e.append($t, rt);
|
|
592
592
|
};
|
|
593
593
|
e.if(
|
|
594
|
-
|
|
595
|
-
(
|
|
596
|
-
e.get(t), e.untrack(() => e.get(t).type === "textarea") ?
|
|
594
|
+
et,
|
|
595
|
+
($t) => {
|
|
596
|
+
e.get(t), e.untrack(() => e.get(t).type === "textarea") ? $t(Xt) : $t(oa, !1);
|
|
597
597
|
},
|
|
598
598
|
!0
|
|
599
599
|
);
|
|
@@ -601,14 +601,14 @@ function pi(Ve, c) {
|
|
|
601
601
|
e.append(H, X);
|
|
602
602
|
};
|
|
603
603
|
e.if(ee, (H) => {
|
|
604
|
-
e.get(t), e.untrack(() => De(e.get(t).type)) ? H(
|
|
604
|
+
e.get(t), e.untrack(() => De(e.get(t).type)) ? H(T) : H(_e, !1);
|
|
605
605
|
});
|
|
606
606
|
}
|
|
607
607
|
var W = e.sibling(ee, 2);
|
|
608
608
|
{
|
|
609
609
|
var B = (H) => {
|
|
610
|
-
var X = ni(),
|
|
611
|
-
e.reset(X), e.template_effect(() => e.set_text(
|
|
610
|
+
var X = ni(), et = e.child(X, !0);
|
|
611
|
+
e.reset(X), e.template_effect(() => e.set_text(et, (e.get(t), e.untrack(() => e.get(t).helpText)))), e.append(H, X);
|
|
612
612
|
};
|
|
613
613
|
e.if(W, (H) => {
|
|
614
614
|
e.get(t), e.untrack(() => e.get(t).helpText) && H(B);
|
|
@@ -617,8 +617,8 @@ function pi(Ve, c) {
|
|
|
617
617
|
var Y = e.sibling(W, 2);
|
|
618
618
|
{
|
|
619
619
|
var oe = (H) => {
|
|
620
|
-
var X = li(),
|
|
621
|
-
e.reset(X), e.template_effect(() => e.set_text(
|
|
620
|
+
var X = li(), et = e.child(X, !0);
|
|
621
|
+
e.reset(X), e.template_effect(() => e.set_text(et, (e.get(f), e.get(t), e.untrack(() => e.get(f)[e.get(t).name])))), e.append(H, X);
|
|
622
622
|
};
|
|
623
623
|
e.if(Y, (H) => {
|
|
624
624
|
e.get(f), e.get(t), e.untrack(() => e.get(f)[e.get(t).name]) && H(oe);
|
|
@@ -699,24 +699,24 @@ function pi(Ve, c) {
|
|
|
699
699
|
e.reset(Ae), e.event("submit", Ae, D), e.append(Pe, Ae);
|
|
700
700
|
};
|
|
701
701
|
e.if(ae, (Pe) => {
|
|
702
|
-
e.get(w), e.untrack(() => e.get(w).variant === "buttons") ? Pe(k) : Pe(
|
|
702
|
+
e.get(w), e.untrack(() => e.get(w).variant === "buttons") ? Pe(k) : Pe(Le, !1);
|
|
703
703
|
});
|
|
704
704
|
}
|
|
705
705
|
e.append(u, K);
|
|
706
706
|
};
|
|
707
707
|
e.if(Re, (u) => {
|
|
708
|
-
e.get(me) ? u(
|
|
708
|
+
e.get(me) ? u(ot) : u(at, !1);
|
|
709
709
|
});
|
|
710
710
|
}
|
|
711
|
-
e.reset(te), e.bind_this(te, (u) => e.set(
|
|
711
|
+
e.reset(te), e.bind_this(te, (u) => e.set(Se, u), () => e.get(Se)), e.template_effect(() => {
|
|
712
712
|
e.set_class(te, 1, `artifactuse-inline-form ${e.get(i) ?? ""} ${e.get(h) ?? ""}`), e.set_attribute(te, "data-artifactuse-theme", Z());
|
|
713
713
|
}), e.append(Ve, te), e.pop();
|
|
714
714
|
}
|
|
715
|
-
var fi = e.from_svg('<svg viewBox="0 0 24 24" fill="currentColor"><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"></path></svg>'), gi = e.from_html("<img/>"), mi = e.from_html('<div class="artifactuse-social-media"><div></div></div>'), hi = e.from_html('<img class="artifactuse-social-link-image"/>'), bi = e.from_html('<div class="artifactuse-social-link-description"> </div>'), ki = e.from_html('<div class="artifactuse-social-link-card"><!> <div class="artifactuse-social-link-info"><div class="artifactuse-social-link-domain"> </div> <div class="artifactuse-social-link-title"> </div> <!></div></div>'), yi = e.from_html('<div class="artifactuse-social-poll-option"><div class="artifactuse-social-poll-bar"></div> <div class="artifactuse-social-poll-label"><span> </span> <span class="artifactuse-social-poll-percent"> </span></div></div>'), xi = e.from_html('<div class="artifactuse-social-poll"><!> <div class="artifactuse-social-poll-meta"> </div></div>'), wi = e.from_html('<div class="artifactuse-social-quote"><div class="artifactuse-social-quote-header"><img class="artifactuse-social-quote-avatar" alt=""/> <span class="artifactuse-social-quote-author"> </span> <span class="artifactuse-social-quote-handle"> </span></div> <p class="artifactuse-social-quote-text"> </p></div>'), Ci = e.from_html('<div class="artifactuse-social-engagement"><span> </span> <span> </span> <span> </span> <span> </span></div>'), $i = e.from_html('<div class="artifactuse-social-header"><img class="artifactuse-social-avatar"/> <div class="artifactuse-social-author"><div class="artifactuse-social-author-name"><span> </span> <!></div> <div class="artifactuse-social-author-meta"><span class="artifactuse-social-author-handle"> </span> <span class="artifactuse-social-timestamp"> </span></div></div></div> <div class="artifactuse-social-content"><p class="artifactuse-social-text"><!></p> <!> <!> <!> <!></div> <!>', 1), Pi = e.from_html('<span class="artifactuse-social-author-connection"> </span>'), Ai = e.from_html('<img class="artifactuse-social-link-image"/>'), Ei = e.from_html('<div class="artifactuse-social-link-card"><!> <div class="artifactuse-social-link-info"><div class="artifactuse-social-link-title"> </div> <div class="artifactuse-social-link-domain"> </div></div></div>'),
|
|
715
|
+
var fi = e.from_svg('<svg viewBox="0 0 24 24" fill="currentColor"><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"></path></svg>'), gi = e.from_html("<img/>"), mi = e.from_html('<div class="artifactuse-social-media"><div></div></div>'), hi = e.from_html('<img class="artifactuse-social-link-image"/>'), bi = e.from_html('<div class="artifactuse-social-link-description"> </div>'), ki = e.from_html('<div class="artifactuse-social-link-card"><!> <div class="artifactuse-social-link-info"><div class="artifactuse-social-link-domain"> </div> <div class="artifactuse-social-link-title"> </div> <!></div></div>'), yi = e.from_html('<div class="artifactuse-social-poll-option"><div class="artifactuse-social-poll-bar"></div> <div class="artifactuse-social-poll-label"><span> </span> <span class="artifactuse-social-poll-percent"> </span></div></div>'), xi = e.from_html('<div class="artifactuse-social-poll"><!> <div class="artifactuse-social-poll-meta"> </div></div>'), wi = e.from_html('<div class="artifactuse-social-quote"><div class="artifactuse-social-quote-header"><img class="artifactuse-social-quote-avatar" alt=""/> <span class="artifactuse-social-quote-author"> </span> <span class="artifactuse-social-quote-handle"> </span></div> <p class="artifactuse-social-quote-text"> </p></div>'), Ci = e.from_html('<div class="artifactuse-social-engagement"><span> </span> <span> </span> <span> </span> <span> </span></div>'), $i = e.from_html('<div class="artifactuse-social-header"><img class="artifactuse-social-avatar"/> <div class="artifactuse-social-author"><div class="artifactuse-social-author-name"><span> </span> <!></div> <div class="artifactuse-social-author-meta"><span class="artifactuse-social-author-handle"> </span> <span class="artifactuse-social-timestamp"> </span></div></div></div> <div class="artifactuse-social-content"><p class="artifactuse-social-text"><!></p> <!> <!> <!> <!></div> <!>', 1), Pi = e.from_html('<span class="artifactuse-social-author-connection"> </span>'), Ai = e.from_html('<img class="artifactuse-social-link-image"/>'), Ei = e.from_html('<div class="artifactuse-social-link-card"><!> <div class="artifactuse-social-link-info"><div class="artifactuse-social-link-title"> </div> <div class="artifactuse-social-link-domain"> </div></div></div>'), Li = e.from_html('<div class="artifactuse-social-engagement"><span> </span> <span> </span> <span> </span></div>'), Ti = e.from_html('<div class="artifactuse-social-header"><img class="artifactuse-social-avatar"/> <div class="artifactuse-social-author-info"><div class="artifactuse-social-author-name"> <!></div> <div class="artifactuse-social-author-headline"> </div> <div class="artifactuse-social-timestamp"> </div></div></div> <div class="artifactuse-social-content"><p class="artifactuse-social-text"><!></p> <!></div> <!>', 1), Si = e.from_svg('<svg class="artifactuse-social-verified" viewBox="0 0 24 24" fill="currentColor"><path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm-2 15l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z"></path></svg>'), Mi = e.from_html('<div class="artifactuse-social-location"> </div>'), Bi = e.from_html("<img/>"), Hi = e.from_html('<div class="artifactuse-social-media-placeholder"></div>'), Ii = e.from_html('<div class="artifactuse-social-header"><img class="artifactuse-social-avatar"/> <div class="artifactuse-social-author"><div class="artifactuse-social-author-name"> <!></div> <!></div></div> <div class="artifactuse-social-media"><!></div> <div class="artifactuse-social-likes"> </div> <div class="artifactuse-social-caption"><span class="artifactuse-social-caption-author"> </span> <span class="artifactuse-social-caption-text"><!></span></div> <div class="artifactuse-social-timestamp"> </div>', 1), zi = e.from_html("<img/>"), Fi = e.from_html('<div class="artifactuse-social-media"><div class="artifactuse-social-media-grid"></div></div>'), Vi = e.from_html('<img class="artifactuse-social-link-image"/>'), qi = e.from_html('<div class="artifactuse-social-link-card"><!> <div class="artifactuse-social-link-info"><div class="artifactuse-social-link-domain"> </div> <div class="artifactuse-social-link-title"> </div></div></div>'), Di = e.from_html('<div class="artifactuse-social-engagement"><span> </span> <span> </span></div>'), Ri = e.from_html('<div class="artifactuse-social-header"><img class="artifactuse-social-avatar"/> <div class="artifactuse-social-author"><div class="artifactuse-social-author-name"> </div> <div class="artifactuse-social-timestamp"> </div></div></div> <div class="artifactuse-social-content"><p class="artifactuse-social-text"><!></p> <!> <!></div> <!>', 1), Oi = e.from_svg('<svg class="artifactuse-social-verified" viewBox="0 0 24 24" fill="currentColor"><path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm-2 15l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z"></path></svg>'), Ui = e.from_html('<div class="artifactuse-social-engagement"><span> </span> <span> </span> <span> </span></div>'), Ni = e.from_html('<div class="artifactuse-social-header"><img class="artifactuse-social-avatar"/> <div class="artifactuse-social-author"><div class="artifactuse-social-author-name"> <!></div></div> <span class="artifactuse-social-timestamp"> </span></div> <div class="artifactuse-social-content"><p class="artifactuse-social-text"><!></p></div> <!>', 1), ji = e.from_html('<img alt="Video thumbnail"/>'), Wi = e.from_html('<div class="artifactuse-social-thumbnail-placeholder"></div>'), Ji = e.from_html('<div class="artifactuse-social-duration"> </div>'), Xi = e.from_html('<div class="artifactuse-social-sound"> </div>'), Zi = e.from_html('<div class="artifactuse-social-engagement"><span> </span> <span> </span> <span> </span></div>'), Ki = e.from_html('<div class="artifactuse-social-thumbnail"><!> <!></div> <div class="artifactuse-social-info"><div class="artifactuse-social-header"><img class="artifactuse-social-avatar"/> <span class="artifactuse-social-author-name"> </span></div> <p class="artifactuse-social-text"><!></p> <!></div> <!>', 1), Yi = e.from_html('<img alt="Video thumbnail"/>'), Qi = e.from_html('<div class="artifactuse-social-thumbnail-placeholder"></div>'), Gi = e.from_html('<div class="artifactuse-social-duration"> </div>'), en = e.from_html('<div class="artifactuse-social-thumbnail"><!> <!></div> <div class="artifactuse-social-info"><img class="artifactuse-social-avatar"/> <div class="artifactuse-social-details"><div class="artifactuse-social-title"> </div> <div class="artifactuse-social-channel"> </div> <div class="artifactuse-social-meta"> </div></div></div>', 1), tn = e.from_html('<div><!> <div class="artifactuse-social-actions-bar"><div class="artifactuse-social-platform-badge"><span> </span></div> <div class="artifactuse-social-actions-right"><span> </span> <button class="artifactuse-social-copy-btn"> </button></div></div></div>');
|
|
716
716
|
function an(Ve, c) {
|
|
717
717
|
e.push(c, !1);
|
|
718
718
|
const me = e.mutable_source(), h = e.mutable_source(), w = e.mutable_source(), l = e.mutable_source(), i = e.mutable_source(), d = e.mutable_source(), I = e.mutable_source(), a = e.mutable_source(), Ee = e.mutable_source(), we = e.mutable_source(), Z = e.mutable_source(), se = e.mutable_source(), Ie = e.mutable_source();
|
|
719
|
-
let ue = e.prop(c, "artifact", 8),
|
|
719
|
+
let ue = e.prop(c, "artifact", 8), Se = e.prop(c, "theme", 8, "dark");
|
|
720
720
|
const C = ya(), f = '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>', F = {
|
|
721
721
|
twitter: 280,
|
|
722
722
|
linkedin: 3e3,
|
|
@@ -734,7 +734,7 @@ function an(Ve, c) {
|
|
|
734
734
|
tiktok: "TikTok",
|
|
735
735
|
youtube: "YouTube"
|
|
736
736
|
};
|
|
737
|
-
let
|
|
737
|
+
let Te = e.mutable_source("Copy");
|
|
738
738
|
function xe(k) {
|
|
739
739
|
try {
|
|
740
740
|
return JSON.parse(k);
|
|
@@ -745,7 +745,7 @@ function an(Ve, c) {
|
|
|
745
745
|
function ve(k) {
|
|
746
746
|
return k ? k >= 1e6 ? `${(k / 1e6).toFixed(1)}M` : k >= 1e3 ? `${(k / 1e3).toFixed(1)}K` : k.toString() : "0";
|
|
747
747
|
}
|
|
748
|
-
function
|
|
748
|
+
function lt(k) {
|
|
749
749
|
try {
|
|
750
750
|
return new URL(k).hostname.replace("www.", "");
|
|
751
751
|
} catch {
|
|
@@ -754,8 +754,8 @@ function an(Ve, c) {
|
|
|
754
754
|
}
|
|
755
755
|
function qe(k) {
|
|
756
756
|
if (!k) return "";
|
|
757
|
-
let
|
|
758
|
-
return
|
|
757
|
+
let Le = k.replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">");
|
|
758
|
+
return Le = Le.replace(/\n/g, "<br>"), Le = Le.replace(/#(\w+)/g, '<span class="artifactuse-social-hashtag">#$1</span>'), Le = Le.replace(/@(\w+)/g, '<span class="artifactuse-social-mention">@$1</span>'), Le;
|
|
759
759
|
}
|
|
760
760
|
function Ce(k) {
|
|
761
761
|
k.target.src = f;
|
|
@@ -766,9 +766,9 @@ function an(Ve, c) {
|
|
|
766
766
|
function Je() {
|
|
767
767
|
const k = e.get(i).text || "";
|
|
768
768
|
navigator.clipboard.writeText(k).then(() => {
|
|
769
|
-
e.set(
|
|
769
|
+
e.set(Te, "Copied!"), setTimeout(
|
|
770
770
|
() => {
|
|
771
|
-
e.set(
|
|
771
|
+
e.set(Te, "Copy");
|
|
772
772
|
},
|
|
773
773
|
2e3
|
|
774
774
|
), C("copy", { platform: e.get(h), text: k });
|
|
@@ -804,13 +804,13 @@ function an(Ve, c) {
|
|
|
804
804
|
}), e.legacy_pre_effect(() => e.get(d), () => {
|
|
805
805
|
e.set(Ie, (() => {
|
|
806
806
|
const k = e.get(d).reactions || {};
|
|
807
|
-
return Object.values(k).reduce((
|
|
807
|
+
return Object.values(k).reduce((Le, Pe) => Le + (Pe || 0), 0) || e.get(d).likes || 0;
|
|
808
808
|
})());
|
|
809
809
|
}), e.legacy_pre_effect_reset(), e.init();
|
|
810
|
-
var
|
|
810
|
+
var Ze = tn(), $e = e.child(Ze);
|
|
811
811
|
{
|
|
812
812
|
var D = (k) => {
|
|
813
|
-
var
|
|
813
|
+
var Le = $i(), Pe = e.first_child(Le), Ae = e.child(Pe), He = e.sibling(Ae, 2), ne = e.child(He), Me = e.child(ne), be = e.child(Me, !0);
|
|
814
814
|
e.reset(Me);
|
|
815
815
|
var t = e.sibling(Me, 2);
|
|
816
816
|
{
|
|
@@ -861,10 +861,10 @@ function an(Ve, c) {
|
|
|
861
861
|
var x = ki(), P = e.child(x);
|
|
862
862
|
{
|
|
863
863
|
var A = (ee) => {
|
|
864
|
-
var
|
|
864
|
+
var T = hi();
|
|
865
865
|
e.template_effect(() => {
|
|
866
|
-
e.set_attribute(
|
|
867
|
-
}), e.event("error",
|
|
866
|
+
e.set_attribute(T, "src", (e.get(i), e.untrack(() => e.get(i).link.image))), e.set_attribute(T, "alt", (e.get(i), e.untrack(() => e.get(i).link.title)));
|
|
867
|
+
}), e.event("error", T, De), e.append(ee, T);
|
|
868
868
|
};
|
|
869
869
|
e.if(P, (ee) => {
|
|
870
870
|
e.get(i), e.untrack(() => e.get(i).link.image) && ee(A);
|
|
@@ -876,12 +876,12 @@ function an(Ve, c) {
|
|
|
876
876
|
e.reset(b);
|
|
877
877
|
var U = e.sibling(b, 2);
|
|
878
878
|
{
|
|
879
|
-
var
|
|
880
|
-
var
|
|
881
|
-
e.reset(
|
|
879
|
+
var L = (ee) => {
|
|
880
|
+
var T = bi(), _e = e.child(T, !0);
|
|
881
|
+
e.reset(T), e.template_effect(() => e.set_text(_e, (e.get(i), e.untrack(() => e.get(i).link.description)))), e.append(ee, T);
|
|
882
882
|
};
|
|
883
883
|
e.if(U, (ee) => {
|
|
884
|
-
e.get(i), e.untrack(() => e.get(i).link.description) && ee(
|
|
884
|
+
e.get(i), e.untrack(() => e.get(i).link.description) && ee(L);
|
|
885
885
|
});
|
|
886
886
|
}
|
|
887
887
|
e.reset(j), e.reset(x), e.template_effect(
|
|
@@ -889,7 +889,7 @@ function an(Ve, c) {
|
|
|
889
889
|
e.set_text(_, ee), e.set_text(J, (e.get(i), e.untrack(() => e.get(i).link.title)));
|
|
890
890
|
},
|
|
891
891
|
[
|
|
892
|
-
() => (e.get(i), e.untrack(() => e.get(i).link.domain ||
|
|
892
|
+
() => (e.get(i), e.untrack(() => e.get(i).link.domain || lt(e.get(i).link.url)))
|
|
893
893
|
]
|
|
894
894
|
), e.append(v, x);
|
|
895
895
|
};
|
|
@@ -902,14 +902,14 @@ function an(Ve, c) {
|
|
|
902
902
|
var V = (v) => {
|
|
903
903
|
var x = xi(), P = e.child(x);
|
|
904
904
|
e.each(P, 1, () => (e.get(i), e.untrack(() => e.get(i).poll.options)), e.index, (y, _, b) => {
|
|
905
|
-
var J = yi(), U = e.child(J),
|
|
905
|
+
var J = yi(), U = e.child(J), L = e.sibling(U, 2), ee = e.child(L), T = e.child(ee, !0);
|
|
906
906
|
e.reset(ee);
|
|
907
907
|
var _e = e.sibling(ee, 2), W = e.child(_e);
|
|
908
|
-
e.reset(_e), e.reset(
|
|
908
|
+
e.reset(_e), e.reset(L), e.reset(J), e.template_effect(() => {
|
|
909
909
|
e.set_style(U, `width: ${e.get(i), e.untrack(() => {
|
|
910
910
|
var B;
|
|
911
911
|
return ((B = e.get(i).poll.votes) == null ? void 0 : B[b]) || 0;
|
|
912
|
-
}) ?? ""}%`), e.set_text(
|
|
912
|
+
}) ?? ""}%`), e.set_text(T, e.get(_)), e.set_text(W, `${e.get(i), e.untrack(() => {
|
|
913
913
|
var B;
|
|
914
914
|
return ((B = e.get(i).poll.votes) == null ? void 0 : B[b]) || 0;
|
|
915
915
|
}) ?? ""}%`);
|
|
@@ -937,14 +937,14 @@ function an(Ve, c) {
|
|
|
937
937
|
var J = e.sibling(P, 2), U = e.child(J, !0);
|
|
938
938
|
e.reset(J), e.reset(x), e.template_effect(() => {
|
|
939
939
|
e.set_attribute(A, "src", (e.get(i), e.untrack(() => {
|
|
940
|
-
var
|
|
941
|
-
return ((
|
|
940
|
+
var L;
|
|
941
|
+
return ((L = e.get(i).quote.author) == null ? void 0 : L.avatar) || f;
|
|
942
942
|
}))), e.set_text(y, (e.get(i), e.untrack(() => {
|
|
943
|
-
var
|
|
944
|
-
return (
|
|
943
|
+
var L;
|
|
944
|
+
return (L = e.get(i).quote.author) == null ? void 0 : L.name;
|
|
945
945
|
}))), e.set_text(b, (e.get(i), e.untrack(() => {
|
|
946
|
-
var
|
|
947
|
-
return (
|
|
946
|
+
var L;
|
|
947
|
+
return (L = e.get(i).quote.author) == null ? void 0 : L.handle;
|
|
948
948
|
}))), e.set_text(U, (e.get(i), e.untrack(() => e.get(i).quote.text)));
|
|
949
949
|
}), e.append(v, x);
|
|
950
950
|
};
|
|
@@ -964,8 +964,8 @@ function an(Ve, c) {
|
|
|
964
964
|
e.reset(_);
|
|
965
965
|
var J = e.sibling(_, 2), U = e.child(J);
|
|
966
966
|
e.reset(J), e.reset(x), e.template_effect(
|
|
967
|
-
(
|
|
968
|
-
e.set_text(A, `${
|
|
967
|
+
(L, ee, T, _e) => {
|
|
968
|
+
e.set_text(A, `${L ?? ""} replies`), e.set_text(y, `${ee ?? ""} reposts`), e.set_text(b, `${T ?? ""} likes`), e.set_text(U, `${_e ?? ""} views`);
|
|
969
969
|
},
|
|
970
970
|
[
|
|
971
971
|
() => (e.get(d), e.untrack(() => ve(e.get(d).replies || 0))),
|
|
@@ -981,12 +981,12 @@ function an(Ve, c) {
|
|
|
981
981
|
}
|
|
982
982
|
e.template_effect(() => {
|
|
983
983
|
e.set_attribute(Ae, "src", (e.get(l), e.untrack(() => e.get(l).avatar || f))), e.set_attribute(Ae, "alt", (e.get(l), e.untrack(() => e.get(l).name))), e.set_text(be, (e.get(l), e.untrack(() => e.get(l).name))), e.set_text(N, (e.get(l), e.untrack(() => e.get(l).handle))), e.set_text(m, `· ${e.get(I), e.untrack(() => e.get(I).timestamp || "Just now") ?? ""}`);
|
|
984
|
-
}), e.event("error", Ae, Ce), e.append(k,
|
|
984
|
+
}), e.event("error", Ae, Ce), e.append(k, Le);
|
|
985
985
|
}, he = (k) => {
|
|
986
|
-
var
|
|
986
|
+
var Le = e.comment(), Pe = e.first_child(Le);
|
|
987
987
|
{
|
|
988
988
|
var Ae = (ne) => {
|
|
989
|
-
var Me =
|
|
989
|
+
var Me = Ti(), be = e.first_child(Me), t = e.child(be), fe = e.sibling(t, 2), s = e.child(fe), g = e.child(s), N = e.sibling(g);
|
|
990
990
|
{
|
|
991
991
|
var re = (O) => {
|
|
992
992
|
var E = Pi(), Q = e.child(E);
|
|
@@ -1026,7 +1026,7 @@ function an(Ve, c) {
|
|
|
1026
1026
|
e.set_text(A, (e.get(i), e.untrack(() => e.get(i).link.title))), e.set_text(y, _);
|
|
1027
1027
|
},
|
|
1028
1028
|
[
|
|
1029
|
-
() => (e.get(i), e.untrack(() => e.get(i).link.domain ||
|
|
1029
|
+
() => (e.get(i), e.untrack(() => e.get(i).link.domain || lt(e.get(i).link.url)))
|
|
1030
1030
|
]
|
|
1031
1031
|
), e.append(O, E);
|
|
1032
1032
|
};
|
|
@@ -1038,7 +1038,7 @@ function an(Ve, c) {
|
|
|
1038
1038
|
var V = e.sibling(z, 2);
|
|
1039
1039
|
{
|
|
1040
1040
|
var le = (O) => {
|
|
1041
|
-
var E =
|
|
1041
|
+
var E = Li(), Q = e.child(E), v = e.child(Q);
|
|
1042
1042
|
e.reset(Q);
|
|
1043
1043
|
var x = e.sibling(Q, 2), P = e.child(x);
|
|
1044
1044
|
e.reset(x);
|
|
@@ -1068,7 +1068,7 @@ function an(Ve, c) {
|
|
|
1068
1068
|
var g = Ii(), N = e.first_child(g), re = e.child(N), m = e.sibling(re, 2), R = e.child(m), n = e.child(R), $ = e.sibling(n);
|
|
1069
1069
|
{
|
|
1070
1070
|
var z = (_) => {
|
|
1071
|
-
var b =
|
|
1071
|
+
var b = Si();
|
|
1072
1072
|
e.append(_, b);
|
|
1073
1073
|
};
|
|
1074
1074
|
e.if($, (_) => {
|
|
@@ -1138,10 +1138,10 @@ function an(Ve, c) {
|
|
|
1138
1138
|
() => (e.get(a), e.untrack(() => e.get(a).slice(0, 4))),
|
|
1139
1139
|
e.index,
|
|
1140
1140
|
(J, U) => {
|
|
1141
|
-
var
|
|
1141
|
+
var L = zi();
|
|
1142
1142
|
e.template_effect(() => {
|
|
1143
|
-
e.set_attribute(
|
|
1144
|
-
}), e.event("error",
|
|
1143
|
+
e.set_attribute(L, "src", (e.get(U), e.untrack(() => e.get(U).url))), e.set_attribute(L, "alt", (e.get(U), e.untrack(() => e.get(U).alt || "")));
|
|
1144
|
+
}), e.event("error", L, De), e.append(J, L);
|
|
1145
1145
|
}
|
|
1146
1146
|
), e.reset(b), e.reset(_), e.template_effect(() => e.set_attribute(b, "data-count", (e.get(a), e.untrack(() => e.get(a).length)))), e.append(y, _);
|
|
1147
1147
|
};
|
|
@@ -1164,15 +1164,15 @@ function an(Ve, c) {
|
|
|
1164
1164
|
e.get(i), e.untrack(() => e.get(i).link.image) && W(J);
|
|
1165
1165
|
});
|
|
1166
1166
|
}
|
|
1167
|
-
var U = e.sibling(b, 2),
|
|
1168
|
-
e.reset(
|
|
1169
|
-
var
|
|
1170
|
-
e.reset(
|
|
1167
|
+
var U = e.sibling(b, 2), L = e.child(U), ee = e.child(L, !0);
|
|
1168
|
+
e.reset(L);
|
|
1169
|
+
var T = e.sibling(L, 2), _e = e.child(T, !0);
|
|
1170
|
+
e.reset(T), e.reset(U), e.reset(_), e.template_effect(
|
|
1171
1171
|
(W) => {
|
|
1172
1172
|
e.set_text(ee, W), e.set_text(_e, (e.get(i), e.untrack(() => e.get(i).link.title)));
|
|
1173
1173
|
},
|
|
1174
1174
|
[
|
|
1175
|
-
() => (e.get(i), e.untrack(() => e.get(i).link.domain ||
|
|
1175
|
+
() => (e.get(i), e.untrack(() => e.get(i).link.domain || lt(e.get(i).link.url)))
|
|
1176
1176
|
]
|
|
1177
1177
|
), e.append(y, _);
|
|
1178
1178
|
};
|
|
@@ -1186,10 +1186,10 @@ function an(Ve, c) {
|
|
|
1186
1186
|
var j = (y) => {
|
|
1187
1187
|
var _ = Di(), b = e.child(_), J = e.child(b);
|
|
1188
1188
|
e.reset(b);
|
|
1189
|
-
var U = e.sibling(b, 2),
|
|
1189
|
+
var U = e.sibling(b, 2), L = e.child(U);
|
|
1190
1190
|
e.reset(U), e.reset(_), e.template_effect(
|
|
1191
|
-
(ee,
|
|
1192
|
-
e.set_text(J, `👍❤️ ${ee ?? ""}`), e.set_text(
|
|
1191
|
+
(ee, T, _e) => {
|
|
1192
|
+
e.set_text(J, `👍❤️ ${ee ?? ""}`), e.set_text(L, `${T ?? ""} comments · ${_e ?? ""} shares`);
|
|
1193
1193
|
},
|
|
1194
1194
|
[
|
|
1195
1195
|
() => (e.get(Ie), e.untrack(() => ve(e.get(Ie)))),
|
|
@@ -1227,11 +1227,11 @@ function an(Ve, c) {
|
|
|
1227
1227
|
var _ = e.sibling(A, 2);
|
|
1228
1228
|
{
|
|
1229
1229
|
var b = (J) => {
|
|
1230
|
-
var U = Ui(),
|
|
1230
|
+
var U = Ui(), L = e.child(U), ee = e.child(L);
|
|
1231
|
+
e.reset(L);
|
|
1232
|
+
var T = e.sibling(L, 2), _e = e.child(T);
|
|
1231
1233
|
e.reset(T);
|
|
1232
|
-
var
|
|
1233
|
-
e.reset(S);
|
|
1234
|
-
var W = e.sibling(S, 2), B = e.child(W);
|
|
1234
|
+
var W = e.sibling(T, 2), B = e.child(W);
|
|
1235
1235
|
e.reset(W), e.reset(U), e.template_effect(
|
|
1236
1236
|
(Y, oe, H) => {
|
|
1237
1237
|
e.set_text(ee, `${Y ?? ""} likes`), e.set_text(_e, `${oe ?? ""} replies`), e.set_text(B, `${H ?? ""} reposts`);
|
|
@@ -1280,15 +1280,15 @@ function an(Ve, c) {
|
|
|
1280
1280
|
e.reset(Q);
|
|
1281
1281
|
var y = e.sibling(Q, 2), _ = e.child(y), b = e.child(_), J = e.sibling(b, 2), U = e.child(J);
|
|
1282
1282
|
e.reset(J), e.reset(_);
|
|
1283
|
-
var
|
|
1284
|
-
e.html(ee, () => (e.get(i), e.untrack(() => qe(e.get(i).text)))), e.reset(
|
|
1285
|
-
var
|
|
1283
|
+
var L = e.sibling(_, 2), ee = e.child(L);
|
|
1284
|
+
e.html(ee, () => (e.get(i), e.untrack(() => qe(e.get(i).text)))), e.reset(L);
|
|
1285
|
+
var T = e.sibling(L, 2);
|
|
1286
1286
|
{
|
|
1287
1287
|
var _e = (Y) => {
|
|
1288
1288
|
var oe = Xi(), H = e.child(oe);
|
|
1289
1289
|
e.reset(oe), e.template_effect(() => e.set_text(H, `🎵 ${e.get(i), e.untrack(() => e.get(i).sound) ?? ""}`)), e.append(Y, oe);
|
|
1290
1290
|
};
|
|
1291
|
-
e.if(
|
|
1291
|
+
e.if(T, (Y) => {
|
|
1292
1292
|
e.get(i), e.untrack(() => e.get(i).sound) && Y(_e);
|
|
1293
1293
|
});
|
|
1294
1294
|
}
|
|
@@ -1298,12 +1298,12 @@ function an(Ve, c) {
|
|
|
1298
1298
|
var B = (Y) => {
|
|
1299
1299
|
var oe = Zi(), H = e.child(oe), X = e.child(H);
|
|
1300
1300
|
e.reset(H);
|
|
1301
|
-
var
|
|
1302
|
-
e.reset(
|
|
1303
|
-
var oa = e.sibling(
|
|
1301
|
+
var et = e.sibling(H, 2), Xt = e.child(et);
|
|
1302
|
+
e.reset(et);
|
|
1303
|
+
var oa = e.sibling(et, 2), $t = e.child(oa);
|
|
1304
1304
|
e.reset(oa), e.reset(oe), e.template_effect(
|
|
1305
|
-
(
|
|
1306
|
-
e.set_text(X, `${
|
|
1305
|
+
(rt, Ot, wa) => {
|
|
1306
|
+
e.set_text(X, `${rt ?? ""} likes`), e.set_text(Xt, `${Ot ?? ""} comments`), e.set_text($t, `${wa ?? ""} shares`);
|
|
1307
1307
|
},
|
|
1308
1308
|
[
|
|
1309
1309
|
() => (e.get(d), e.untrack(() => ve(e.get(d).likes || 0))),
|
|
@@ -1339,27 +1339,27 @@ function an(Ve, c) {
|
|
|
1339
1339
|
var b = e.sibling(j, 2);
|
|
1340
1340
|
{
|
|
1341
1341
|
var J = (H) => {
|
|
1342
|
-
var X = Gi(),
|
|
1343
|
-
e.reset(X), e.template_effect(() => e.set_text(
|
|
1342
|
+
var X = Gi(), et = e.child(X, !0);
|
|
1343
|
+
e.reset(X), e.template_effect(() => e.set_text(et, (e.get(i), e.untrack(() => e.get(i).duration)))), e.append(H, X);
|
|
1344
1344
|
};
|
|
1345
1345
|
e.if(b, (H) => {
|
|
1346
1346
|
e.get(i), e.untrack(() => e.get(i).duration) && H(J);
|
|
1347
1347
|
});
|
|
1348
1348
|
}
|
|
1349
1349
|
e.reset(A);
|
|
1350
|
-
var U = e.sibling(A, 2),
|
|
1351
|
-
e.reset(
|
|
1352
|
-
var W = e.sibling(
|
|
1350
|
+
var U = e.sibling(A, 2), L = e.child(U), ee = e.sibling(L, 2), T = e.child(ee), _e = e.child(T, !0);
|
|
1351
|
+
e.reset(T);
|
|
1352
|
+
var W = e.sibling(T, 2), B = e.child(W, !0);
|
|
1353
1353
|
e.reset(W);
|
|
1354
1354
|
var Y = e.sibling(W, 2), oe = e.child(Y);
|
|
1355
1355
|
e.reset(Y), e.reset(ee), e.reset(U), e.template_effect(
|
|
1356
1356
|
(H) => {
|
|
1357
|
-
e.set_attribute(
|
|
1357
|
+
e.set_attribute(L, "src", (e.get(l), e.untrack(() => e.get(l).avatar || f))), e.set_attribute(L, "alt", (e.get(l), e.untrack(() => e.get(l).name))), e.set_text(_e, (e.get(i), e.untrack(() => e.get(i).title))), e.set_text(B, (e.get(l), e.untrack(() => e.get(l).name))), e.set_text(oe, `${H ?? ""} views · ${e.get(I), e.untrack(() => e.get(I).timestamp || "Just now") ?? ""}`);
|
|
1358
1358
|
},
|
|
1359
1359
|
[
|
|
1360
1360
|
() => (e.get(d), e.untrack(() => ve(e.get(d).views || 0)))
|
|
1361
1361
|
]
|
|
1362
|
-
), e.event("error",
|
|
1362
|
+
), e.event("error", L, Ce), e.append(x, P);
|
|
1363
1363
|
};
|
|
1364
1364
|
e.if(
|
|
1365
1365
|
Q,
|
|
@@ -1419,20 +1419,20 @@ function an(Ve, c) {
|
|
|
1419
1419
|
!0
|
|
1420
1420
|
);
|
|
1421
1421
|
}
|
|
1422
|
-
e.append(k,
|
|
1422
|
+
e.append(k, Le);
|
|
1423
1423
|
};
|
|
1424
1424
|
e.if($e, (k) => {
|
|
1425
1425
|
e.get(h) === "twitter" ? k(D) : k(he, !1);
|
|
1426
1426
|
});
|
|
1427
1427
|
}
|
|
1428
|
-
var te = e.sibling($e, 2), Re = e.child(te),
|
|
1429
|
-
e.reset(
|
|
1428
|
+
var te = e.sibling($e, 2), Re = e.child(te), ot = e.child(Re), at = e.child(ot, !0);
|
|
1429
|
+
e.reset(ot), e.reset(Re);
|
|
1430
1430
|
var u = e.sibling(Re, 2), K = e.child(u), de = e.child(K);
|
|
1431
1431
|
e.reset(K);
|
|
1432
1432
|
var M = e.sibling(K, 2), ae = e.child(M, !0);
|
|
1433
|
-
e.reset(M), e.reset(u), e.reset(te), e.reset(
|
|
1434
|
-
e.set_class(
|
|
1435
|
-
}), e.event("click", M, Je), e.append(Ve,
|
|
1433
|
+
e.reset(M), e.reset(u), e.reset(te), e.reset(Ze), e.template_effect(() => {
|
|
1434
|
+
e.set_class(Ze, 1, `artifactuse-social artifactuse-social-${e.get(h) ?? ""}`), e.set_attribute(Ze, "data-artifactuse-theme", Se()), e.set_text(at, (e.get(h), e.untrack(() => q[e.get(h)] || e.get(h)))), e.set_class(K, 1, `artifactuse-social-char-counter ${e.get(Z) ?? ""}`), e.set_text(de, `${e.get(we) ?? ""}/${e.get(Ee) ?? ""}`), e.set_text(ae, e.get(Te));
|
|
1435
|
+
}), e.event("click", M, Je), e.append(Ve, Ze), e.pop();
|
|
1436
1436
|
}
|
|
1437
1437
|
var rn = e.from_html('<button type="button" class="artifactuse-viewer-image-button"><img/></button>'), sn = e.from_html('<iframe class="artifactuse-viewer-pdf"></iframe>'), nn = e.from_svg('<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><circle cx="11" cy="11" r="8"></circle><line x1="21" y1="21" x2="16.65" y2="16.65"></line><line x1="11" y1="8" x2="11" y2="14"></line><line x1="8" y1="11" x2="14" y2="11"></line></svg>'), ln = e.from_svg('<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><circle cx="11" cy="11" r="8"></circle><line x1="21" y1="21" x2="16.65" y2="16.65"></line><line x1="8" y1="11" x2="14" y2="11"></line></svg>'), on = e.from_html('<div class="artifactuse-viewer-controls"><button class="artifactuse-viewer-control"><!></button> <button class="artifactuse-viewer-control" title="Download"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"></path><polyline points="7 10 12 15 17 10"></polyline><line x1="12" y1="15" x2="12" y2="3"></line></svg></button></div>'), cn = e.from_html('<div class="artifactuse-viewer-caption"> </div>'), un = e.from_html('<div class="artifactuse-viewer-overlay" tabindex="-1" role="dialog" aria-modal="true"><div class="artifactuse-viewer-content"><!> <!> <button class="artifactuse-viewer-close" title="Close (Esc)"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><line x1="18" y1="6" x2="6" y2="18"></line><line x1="6" y1="6" x2="18" y2="18"></line></svg></button> <!> <!></div></div>');
|
|
1438
1438
|
function vn(Ve, c) {
|
|
@@ -1466,10 +1466,10 @@ function vn(Ve, c) {
|
|
|
1466
1466
|
return (f = e.get(I)) == null ? void 0 : f.focus();
|
|
1467
1467
|
}, 0)) : (document.body.style.overflow = "", e.set(a, !1));
|
|
1468
1468
|
}), e.legacy_pre_effect_reset(), e.init();
|
|
1469
|
-
var ue = e.comment(),
|
|
1469
|
+
var ue = e.comment(), Se = e.first_child(ue);
|
|
1470
1470
|
{
|
|
1471
1471
|
var C = (f) => {
|
|
1472
|
-
var F = un(), q = e.child(F),
|
|
1472
|
+
var F = un(), q = e.child(F), Te = e.child(q);
|
|
1473
1473
|
{
|
|
1474
1474
|
var xe = ($e) => {
|
|
1475
1475
|
var D = rn(), he = e.child(D);
|
|
@@ -1478,20 +1478,20 @@ function vn(Ve, c) {
|
|
|
1478
1478
|
e.set_attribute(he, "src", w()), e.set_attribute(he, "alt", l()), te = e.set_class(he, 1, "artifactuse-viewer-image", null, te, { "artifactuse-viewer-image--zoomed": e.get(a) });
|
|
1479
1479
|
}), e.event("click", D, we), e.append($e, D);
|
|
1480
1480
|
};
|
|
1481
|
-
e.if(
|
|
1481
|
+
e.if(Te, ($e) => {
|
|
1482
1482
|
h() === "image" && $e(xe);
|
|
1483
1483
|
});
|
|
1484
1484
|
}
|
|
1485
|
-
var ve = e.sibling(
|
|
1485
|
+
var ve = e.sibling(Te, 2);
|
|
1486
1486
|
{
|
|
1487
|
-
var
|
|
1487
|
+
var lt = ($e) => {
|
|
1488
1488
|
var D = sn();
|
|
1489
1489
|
e.template_effect(() => {
|
|
1490
1490
|
e.set_attribute(D, "src", w()), e.set_attribute(D, "title", l() || "PDF Viewer");
|
|
1491
1491
|
}), e.append($e, D);
|
|
1492
1492
|
};
|
|
1493
1493
|
e.if(ve, ($e) => {
|
|
1494
|
-
h() === "pdf" && $e(
|
|
1494
|
+
h() === "pdf" && $e(lt);
|
|
1495
1495
|
});
|
|
1496
1496
|
}
|
|
1497
1497
|
var qe = e.sibling(ve, 2), Ce = e.sibling(qe, 2);
|
|
@@ -1502,17 +1502,17 @@ function vn(Ve, c) {
|
|
|
1502
1502
|
var Re = (u) => {
|
|
1503
1503
|
var K = nn();
|
|
1504
1504
|
e.append(u, K);
|
|
1505
|
-
},
|
|
1505
|
+
}, ot = (u) => {
|
|
1506
1506
|
var K = ln();
|
|
1507
1507
|
e.append(u, K);
|
|
1508
1508
|
};
|
|
1509
1509
|
e.if(te, (u) => {
|
|
1510
|
-
e.get(a) ? u(
|
|
1510
|
+
e.get(a) ? u(ot, !1) : u(Re);
|
|
1511
1511
|
});
|
|
1512
1512
|
}
|
|
1513
1513
|
e.reset(he);
|
|
1514
|
-
var
|
|
1515
|
-
e.reset(D), e.template_effect(() => e.set_attribute(he, "title", e.get(a) ? "Zoom out" : "Zoom in")), e.event("click", he, e.stopPropagation(we)), e.event("click",
|
|
1514
|
+
var at = e.sibling(he, 2);
|
|
1515
|
+
e.reset(D), e.template_effect(() => e.set_attribute(he, "title", e.get(a) ? "Zoom out" : "Zoom in")), e.event("click", he, e.stopPropagation(we)), e.event("click", at, e.stopPropagation(Z)), e.append($e, D);
|
|
1516
1516
|
};
|
|
1517
1517
|
e.if(Ce, ($e) => {
|
|
1518
1518
|
h() === "image" && $e(De);
|
|
@@ -1520,17 +1520,17 @@ function vn(Ve, c) {
|
|
|
1520
1520
|
}
|
|
1521
1521
|
var Je = e.sibling(Ce, 2);
|
|
1522
1522
|
{
|
|
1523
|
-
var
|
|
1523
|
+
var Ze = ($e) => {
|
|
1524
1524
|
var D = cn(), he = e.child(D, !0);
|
|
1525
1525
|
e.reset(D), e.template_effect(() => e.set_text(he, i())), e.append($e, D);
|
|
1526
1526
|
};
|
|
1527
1527
|
e.if(Je, ($e) => {
|
|
1528
|
-
i() && $e(
|
|
1528
|
+
i() && $e(Ze);
|
|
1529
1529
|
});
|
|
1530
1530
|
}
|
|
1531
1531
|
e.reset(q), e.reset(F), e.bind_this(F, ($e) => e.set(I, $e), () => e.get(I)), e.event("click", qe, Ee), e.transition(3, q, () => ws, () => ({ duration: 200, start: 0.95 })), e.event("click", F, Ie), e.event("keydown", F, se), e.transition(3, F, () => qr, () => ({ duration: 200 })), e.append(f, F);
|
|
1532
1532
|
};
|
|
1533
|
-
e.if(
|
|
1533
|
+
e.if(Se, (f) => {
|
|
1534
1534
|
me() && f(C);
|
|
1535
1535
|
});
|
|
1536
1536
|
}
|
|
@@ -1548,13 +1548,13 @@ function El(Ve, c) {
|
|
|
1548
1548
|
// Whether this is the last/most recent message
|
|
1549
1549
|
), we = e.prop(c, "inlinePreview", 8, null), Z = e.prop(c, "inlineCode", 8, null), se = e.prop(c, "tabs", 8, null), Ie = e.prop(c, "viewMode", 8, null);
|
|
1550
1550
|
const ue = ya(), {
|
|
1551
|
-
processMessage:
|
|
1551
|
+
processMessage: Se,
|
|
1552
1552
|
openArtifact: C,
|
|
1553
1553
|
getTheme: f,
|
|
1554
1554
|
instance: F,
|
|
1555
1555
|
activeArtifactId: q
|
|
1556
1556
|
} = Za();
|
|
1557
|
-
let
|
|
1557
|
+
let Te = e.mutable_source(), xe = e.mutable_source(), ve = e.mutable_source(""), lt = e.mutable_source([]), qe = e.mutable_source([]), Ce = null, De = e.mutable_source(a()), Je = e.mutable_source(!1), Ze = e.mutable_source(!1), $e = e.mutable_source("image"), D = e.mutable_source(""), he = e.mutable_source(""), te = e.mutable_source("");
|
|
1558
1558
|
function Re(s) {
|
|
1559
1559
|
if (!s) return null;
|
|
1560
1560
|
try {
|
|
@@ -1570,7 +1570,7 @@ function El(Ve, c) {
|
|
|
1570
1570
|
}
|
|
1571
1571
|
}
|
|
1572
1572
|
}
|
|
1573
|
-
function
|
|
1573
|
+
function ot(s) {
|
|
1574
1574
|
const g = [];
|
|
1575
1575
|
if (!s) return g;
|
|
1576
1576
|
const N = /<div\s+class="artifactuse-placeholder[^"]*"[^>]*data-artifact-id="([^"]+)"[^>]*data-artifact-type="([^"]+)"[^>]*data-artifact=["']([^"']*)["'][^>]*><\/div>/gi;
|
|
@@ -1589,17 +1589,17 @@ function El(Ve, c) {
|
|
|
1589
1589
|
}
|
|
1590
1590
|
return g.length === 0 && s.trim() && g.push({ type: "html", content: s }), g;
|
|
1591
1591
|
}
|
|
1592
|
-
function
|
|
1593
|
-
e.set($e, s.type || "image"), e.set(D, s.src || ""), e.set(he, s.alt || ""), e.set(te, s.caption || ""), e.set(
|
|
1592
|
+
function at(s) {
|
|
1593
|
+
e.set($e, s.type || "image"), e.set(D, s.src || ""), e.set(he, s.alt || ""), e.set(te, s.caption || ""), e.set(Ze, !0), ue("media-open", s);
|
|
1594
1594
|
}
|
|
1595
1595
|
function u() {
|
|
1596
|
-
e.set(
|
|
1596
|
+
e.set(Ze, !1), e.set(D, ""), e.set(he, ""), e.set(te, "");
|
|
1597
1597
|
}
|
|
1598
1598
|
function K() {
|
|
1599
1599
|
if (!e.get(xe)) return;
|
|
1600
1600
|
e.get(xe).querySelectorAll('img[data-lightbox="true"]').forEach((n) => {
|
|
1601
1601
|
n._lightboxHandler && n.removeEventListener("click", n._lightboxHandler), n._lightboxHandler = ($) => {
|
|
1602
|
-
$.preventDefault(), $.stopPropagation(),
|
|
1602
|
+
$.preventDefault(), $.stopPropagation(), at({
|
|
1603
1603
|
type: "image",
|
|
1604
1604
|
src: n.src,
|
|
1605
1605
|
alt: n.alt || "",
|
|
@@ -1610,17 +1610,17 @@ function El(Ve, c) {
|
|
|
1610
1610
|
n._lightboxHandler || (n._lightboxHandler = ($) => {
|
|
1611
1611
|
$.preventDefault(), $.stopPropagation();
|
|
1612
1612
|
const z = n.closest(".artifactuse-image-container"), G = z == null ? void 0 : z.querySelector(".artifactuse-image-caption"), ke = (G == null ? void 0 : G.textContent) || n.dataset.caption || n.alt || "";
|
|
1613
|
-
|
|
1613
|
+
at({ type: "image", src: n.src, alt: n.alt || "", caption: ke });
|
|
1614
1614
|
}, n.addEventListener("click", n._lightboxHandler), n.style.cursor = "zoom-in");
|
|
1615
1615
|
}), e.get(xe).querySelectorAll(".artifactuse-gallery-item img, .artifactuse-image-gallery img").forEach((n) => {
|
|
1616
1616
|
n._lightboxHandler || (n._lightboxHandler = ($) => {
|
|
1617
1617
|
$.preventDefault(), $.stopPropagation();
|
|
1618
1618
|
const z = n.closest(".artifactuse-gallery-item"), G = z == null ? void 0 : z.querySelector(".artifactuse-gallery-caption"), ke = (G == null ? void 0 : G.textContent) || n.dataset.caption || n.alt || "";
|
|
1619
|
-
|
|
1619
|
+
at({ type: "image", src: n.src, alt: n.alt || "", caption: ke });
|
|
1620
1620
|
}, n.addEventListener("click", n._lightboxHandler), n.style.cursor = "zoom-in");
|
|
1621
1621
|
}), e.get(xe).querySelectorAll('a[href$=".pdf"], a[data-type="pdf"]').forEach((n) => {
|
|
1622
1622
|
n._pdfHandler && n.removeEventListener("click", n._pdfHandler), n._pdfHandler = ($) => {
|
|
1623
|
-
$.preventDefault(), $.stopPropagation(),
|
|
1623
|
+
$.preventDefault(), $.stopPropagation(), at({
|
|
1624
1624
|
type: "pdf",
|
|
1625
1625
|
src: n.href,
|
|
1626
1626
|
alt: n.textContent || "PDF Document",
|
|
@@ -1632,7 +1632,7 @@ function El(Ve, c) {
|
|
|
1632
1632
|
n._pdfHandler && n.removeEventListener("click", n._pdfHandler);
|
|
1633
1633
|
const $ = n.dataset.pdfSrc || ((z = n.querySelector("iframe")) == null ? void 0 : z.src) || "";
|
|
1634
1634
|
$ && (n._pdfHandler = (G) => {
|
|
1635
|
-
G.preventDefault(), G.stopPropagation(),
|
|
1635
|
+
G.preventDefault(), G.stopPropagation(), at({
|
|
1636
1636
|
type: "pdf",
|
|
1637
1637
|
src: $,
|
|
1638
1638
|
alt: "PDF Document",
|
|
@@ -1688,7 +1688,7 @@ function El(Ve, c) {
|
|
|
1688
1688
|
function k(s) {
|
|
1689
1689
|
C(s), ue("artifact-open", s);
|
|
1690
1690
|
}
|
|
1691
|
-
function
|
|
1691
|
+
function Le(s) {
|
|
1692
1692
|
ue("artifact-copy", s.detail);
|
|
1693
1693
|
}
|
|
1694
1694
|
function Pe(s) {
|
|
@@ -1727,13 +1727,13 @@ function El(Ve, c) {
|
|
|
1727
1727
|
() => (e.deep_read_state(i()), e.deep_read_state(d()), e.deep_read_state(we()), e.deep_read_state(Z()), e.deep_read_state(se()), e.deep_read_state(Ie()), e.get(ve), e.deep_read_state(a())),
|
|
1728
1728
|
() => {
|
|
1729
1729
|
if (i()) {
|
|
1730
|
-
const s =
|
|
1730
|
+
const s = Se(i(), d(), {
|
|
1731
1731
|
inlinePreview: we(),
|
|
1732
1732
|
inlineCode: Z(),
|
|
1733
1733
|
tabs: se(),
|
|
1734
1734
|
viewMode: Ie()
|
|
1735
1735
|
});
|
|
1736
|
-
e.set(ve, s.html), e.set(
|
|
1736
|
+
e.set(ve, s.html), e.set(lt, s.artifacts), e.set(qe, ot(e.get(ve))), s.artifacts.length > 0 && ue("artifact-detected", s.artifacts), a() || M();
|
|
1737
1737
|
}
|
|
1738
1738
|
}
|
|
1739
1739
|
), e.legacy_pre_effect(() => (e.get(De), e.deep_read_state(a())), () => {
|
|
@@ -1802,7 +1802,7 @@ function El(Ve, c) {
|
|
|
1802
1802
|
},
|
|
1803
1803
|
$$events: {
|
|
1804
1804
|
open: (j) => k(j.detail),
|
|
1805
|
-
copy:
|
|
1805
|
+
copy: Le,
|
|
1806
1806
|
download: Pe
|
|
1807
1807
|
}
|
|
1808
1808
|
});
|
|
@@ -1848,7 +1848,7 @@ function El(Ve, c) {
|
|
|
1848
1848
|
var fe = e.sibling(t, 2);
|
|
1849
1849
|
vn(fe, {
|
|
1850
1850
|
get isOpen() {
|
|
1851
|
-
return e.get(
|
|
1851
|
+
return e.get(Ze);
|
|
1852
1852
|
},
|
|
1853
1853
|
get type() {
|
|
1854
1854
|
return e.get($e);
|
|
@@ -1863,16 +1863,16 @@ function El(Ve, c) {
|
|
|
1863
1863
|
return e.get(te);
|
|
1864
1864
|
},
|
|
1865
1865
|
$$events: { close: u }
|
|
1866
|
-
}), e.reset(be), e.bind_this(be, (s) => e.set(
|
|
1866
|
+
}), e.reset(be), e.bind_this(be, (s) => e.set(Te, s), () => e.get(Te)), e.event("click", t, ae), e.event("keydown", t, ae), e.append(Ve, be), e.pop();
|
|
1867
1867
|
}
|
|
1868
|
-
var pn = e.from_html('<button class="artifactuse-panel__resize-handle" aria-label="Resize panel"><div class="artifactuse-panel__resize-handle-line"></div></button>'), fn = e.from_svg('<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><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"></path><polyline points="14 2 14 8 20 8"></polyline></svg>'), gn = e.from_svg('<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><polyline points="16 18 22 12 16 6"></polyline><polyline points="8 6 2 12 8 18"></polyline></svg>'), mn = e.from_html('<a href="https://artifactuse.com" target="_blank" rel="noopener noreferrer" class="artifactuse-panel__branding"><svg width="16" height="16" viewBox="0 0 42 42" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M16.6667 41.6673V10.4173C16.6667 9.86478 16.4472 9.33488 16.0565 8.94418C15.6658 8.55348 15.1359 8.33398 14.5833 8.33398H4.16667C3.0616 8.33398 2.00179 8.77297 1.22039 9.55437C0.438987 10.3358 0 11.3956 0 12.5007V37.5006C0 38.6057 0.438987 39.6655 1.22039 40.4469C2.00179 41.2283 3.0616 41.6673 4.16667 41.6673H29.1667C30.2717 41.6673 31.3315 41.2283 32.1129 40.4469C32.8943 39.6655 33.3333 38.6057 33.3333 37.5006V27.084C33.3333 26.5314 33.1138 26.0015 32.7231 25.6108C32.3324 25.2201 31.8025 25.0007 31.25 25.0007H0" fill="#5F51C8"></path><path d="M39.5833 0H27.0833C25.9327 0 25 0.93274 25 2.08333V14.5833C25 15.7339 25.9327 16.6667 27.0833 16.6667H39.5833C40.7339 16.6667 41.6667 15.7339 41.6667 14.5833V2.08333C41.6667 0.93274 40.7339 0 39.5833 0Z" fill="#695AE0"></path></svg> <span>Artifactuse</span></a>'), hn = e.from_html('<div><!> <header class="artifactuse-panel__header artifactuse-panel__header--simple"><div class="artifactuse-panel__title"><span class="artifactuse-panel__icon"><!></span> <div class="artifactuse-panel__title-content"><span class="artifactuse-panel__name"> </span></div></div> <div class="artifactuse-panel__actions"><button class="artifactuse-panel__action artifactuse-panel__action--close" title="Close panel"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><line x1="18" y1="6" x2="6" y2="18"></line><line x1="6" y1="6" x2="18" y2="18"></line></svg></button></div></header> <div class="artifactuse-panel__empty"><div class="artifactuse-panel__empty-icon"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5"><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"></path><polyline points="14 2 14 8 20 8"></polyline></svg></div> <h3 class="artifactuse-panel__empty-title"> </h3> <p class="artifactuse-panel__empty-text"> </p></div> <footer class="artifactuse-panel__footer artifactuse-panel__footer--simple"><!></footer></div>'), bn = e.from_html('<button class="artifactuse-panel__resize-handle" aria-label="Resize panel"><div class="artifactuse-panel__resize-handle-line"></div></button>'), kn = e.from_svg('<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"></path><polyline points="7 10 12 15 17 10"></polyline><line x1="12" y1="15" x2="12" y2="3"></line></svg>'), yn = e.from_svg('<svg class="artifactuse-panel__spinner-icon" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><circle cx="12" cy="12" r="10" stroke-dasharray="32" stroke-dashoffset="32"></circle></svg>'), xn = e.from_html('<button class="artifactuse-panel__list-item"><span class="artifactuse-panel__list-item-icon"><!></span> <div class="artifactuse-panel__list-item-content"><span class="artifactuse-panel__list-item-title"> </span> <span class="artifactuse-panel__list-item-meta"> <!></span></div> <span class="artifactuse-panel__list-item-arrow"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><polyline points="9 18 15 12 9 6"></polyline></svg></span></button>'), wn = e.from_html('<a href="https://artifactuse.com" target="_blank" rel="noopener noreferrer" class="artifactuse-panel__branding"><svg width="16" height="16" viewBox="0 0 42 42" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M16.6667 41.6673V10.4173C16.6667 9.86478 16.4472 9.33488 16.0565 8.94418C15.6658 8.55348 15.1359 8.33398 14.5833 8.33398H4.16667C3.0616 8.33398 2.00179 8.77297 1.22039 9.55437C0.438987 10.3358 0 11.3956 0 12.5007V37.5006C0 38.6057 0.438987 39.6655 1.22039 40.4469C2.00179 41.2283 3.0616 41.6673 4.16667 41.6673H29.1667C30.2717 41.6673 31.3315 41.2283 32.1129 40.4469C32.8943 39.6655 33.3333 38.6057 33.3333 37.5006V27.084C33.3333 26.5314 33.1138 26.0015 32.7231 25.6108C32.3324 25.2201 31.8025 25.0007 31.25 25.0007H0" fill="#5F51C8"></path><path d="M39.5833 0H27.0833C25.9327 0 25 0.93274 25 2.08333V14.5833C25 15.7339 25.9327 16.6667 27.0833 16.6667H39.5833C40.7339 16.6667 41.6667 15.7339 41.6667 14.5833V2.08333C41.6667 0.93274 40.7339 0 39.5833 0Z" fill="#695AE0"></path></svg> <span>Artifactuse</span></a>'), Cn = e.from_html('<div><!> <header class="artifactuse-panel__header artifactuse-panel__header--simple"><div class="artifactuse-panel__title"><span class="artifactuse-panel__icon"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><polyline points="16 18 22 12 16 6"></polyline><polyline points="8 6 2 12 8 18"></polyline></svg></span> <div class="artifactuse-panel__title-content"><span class="artifactuse-panel__name">Artifacts</span> <span class="artifactuse-panel__meta"> </span></div></div> <div class="artifactuse-panel__actions"><button title="Download all as ZIP"><!></button> <button class="artifactuse-panel__action artifactuse-panel__action--close" title="Close panel"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><line x1="18" y1="6" x2="6" y2="18"></line><line x1="6" y1="6" x2="18" y2="18"></line></svg></button></div></header> <div class="artifactuse-panel__list"><div class="artifactuse-panel__list-items"></div></div> <footer class="artifactuse-panel__footer artifactuse-panel__footer--simple"><!></footer></div>'), $n = e.from_html('<button class="artifactuse-panel__resize-handle" aria-label="Resize panel"><div class="artifactuse-panel__resize-handle-line"></div></button>'), Pn = e.from_html('<button class="artifactuse-panel__back"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><polyline points="15 18 9 12 15 6"></polyline></svg></button>'), An = e.from_html('<button title="Preview"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M1 12s4-8 11-8 11 8 11 8-4 8-11 8-11-8-11-8z"></path><circle cx="12" cy="12" r="3"></circle></svg></button>'), En = e.from_html('<button title="Code"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><polyline points="16 18 22 12 16 6"></polyline><polyline points="8 6 2 12 8 18"></polyline></svg></button>'), Tn = e.from_html('<button title="Split view"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><rect x="3" y="3" width="18" height="18" rx="2" ry="2"></rect><line x1="12" y1="3" x2="12" y2="21"></line></svg></button>'), Sn = e.from_html('<button title="Edit"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M11 4H4a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7"></path><path d="M18.5 2.5a2.121 2.121 0 0 1 3 3L12 15l-4 1 1-4 9.5-9.5z"></path></svg></button>'), Ln = e.from_html('<button class="artifactuse-panel__action artifactuse-panel__action--save" title="Save"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M19 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h11l5 5v11a2 2 0 0 1-2 2z"></path><polyline points="17 21 17 13 7 13 7 21"></polyline><polyline points="7 3 7 8 15 8"></polyline></svg></button>'), Mn = e.from_html('<button class="artifactuse-panel__action" title="Open in new tab"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6"></path><polyline points="15 3 21 3 21 9"></polyline><line x1="10" y1="14" x2="21" y2="3"></line></svg></button>'), Bn = e.from_svg('<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" y1="3" x2="14" y2="10"></line><line x1="3" y1="21" x2="10" y2="14"></line></svg>'), Hn = e.from_svg('<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><polyline points="4 14 10 14 10 20"></polyline><polyline points="20 10 14 10 14 4"></polyline><line x1="14" y1="10" x2="21" y2="3"></line><line x1="3" y1="21" x2="10" y2="14"></line></svg>'), In = e.from_html('<button><span class="artifactuse-panel__file-tab-icon"><!></span> <span class="artifactuse-panel__file-tab-title"> </span> <span class="artifactuse-panel__file-tab-close" role="button" tabindex="0" title="Close tab"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><line x1="18" y1="6" x2="6" y2="18"></line><line x1="6" y1="6" x2="18" y2="18"></line></svg></span></button>'), zn = e.from_html('<div class="artifactuse-panel__file-tabs"><div class="artifactuse-panel__file-tabs-scroll"></div></div>'), Fn = e.from_html('<div class="artifactuse-panel__loading"><div class="artifactuse-panel__spinner"></div></div>'), Vn = e.from_html('<div class="artifactuse-panel__loading"><div class="artifactuse-panel__spinner"></div></div>'), qn = e.from_html('<iframe sandbox="allow-scripts allow-same-origin allow-forms allow-popups allow-modals allow-downloads allow-top-navigation-by-user-activation" allow="camera; microphone; fullscreen; geolocation; display-capture; autoplay; clipboard-write; encrypted-media; gyroscope; accelerometer; picture-in-picture" title="Artifact Preview"></iframe>'), Dn = e.from_html('<div class="artifactuse-panel__no-preview"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5"><path d="M9 17H7A5 5 0 0 1 7 7h2"></path><path d="M15 7h2a5 5 0 1 1 0 10h-2"></path><line x1="8" y1="12" x2="16" y2="12"></line></svg> <p> </p></div>'), Rn = e.from_html('<div class="artifactuse-panel__preview"><!> <!></div>'), On = e.from_html('<button class="artifactuse-panel__split-handle" aria-label="Split Resize"><div class="artifactuse-panel__split-handle-line"></div></button>'), Un = e.from_html("<button> </button>"), Nn = e.from_html("<button> </button>"), jn = e.from_html("<button> </button>"), Wn = e.from_html("<button> </button>"), Jn = e.from_html('<div><span class="artifactuse-panel__console-type"> </span> <span class="artifactuse-panel__console-content"> </span> <span class="artifactuse-panel__console-timestamp"> </span></div>'), Xn = e.from_html('<div class="artifactuse-panel__console-entries"></div>'), Zn = e.from_html('<div><div class="artifactuse-panel__console-header" role="button" tabindex="0"><svg class="artifactuse-panel__console-chevron" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><polyline points="18 15 12 9 6 15"></polyline></svg> <span>Console</span> <div class="artifactuse-panel__console-filters"><!> <!> <!> <!></div> <button class="artifactuse-panel__console-clear">Clear</button></div> <!></div>'), Kn = e.from_html('<a href="https://artifactuse.com" target="_blank" rel="noopener noreferrer" class="artifactuse-panel__branding" title="Powered by Artifactuse"><svg width="16" height="16" viewBox="0 0 42 42" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M16.6667 41.6673V10.4173C16.6667 9.86478 16.4472 9.33488 16.0565 8.94418C15.6658 8.55348 15.1359 8.33398 14.5833 8.33398H4.16667C3.0616 8.33398 2.00179 8.77297 1.22039 9.55437C0.438987 10.3358 0 11.3956 0 12.5007V37.5006C0 38.6057 0.438987 39.6655 1.22039 40.4469C2.00179 41.2283 3.0616 41.6673 4.16667 41.6673H29.1667C30.2717 41.6673 31.3315 41.2283 32.1129 40.4469C32.8943 39.6655 33.3333 38.6057 33.3333 37.5006V27.084C33.3333 26.5314 33.1138 26.0015 32.7231 25.6108C32.3324 25.2201 31.8025 25.0007 31.25 25.0007H0" fill="#5F51C8"></path><path d="M39.5833 0H27.0833C25.9327 0 25 0.93274 25 2.08333V14.5833C25 15.7339 25.9327 16.6667 27.0833 16.6667H39.5833C40.7339 16.6667 41.6667 15.7339 41.6667 14.5833V2.08333C41.6667 0.93274 40.7339 0 39.5833 0Z" fill="#695AE0"></path></svg> <span>Artifactuse</span></a>'), Yn = e.from_html('<span class="artifactuse-panel__badge artifactuse-panel__badge--secondary"> </span>'), Qn = e.from_svg('<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><rect x="9" y="9" width="13" height="13" rx="2" ry="2"></rect><path d="M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1"></path></svg>'), Gn = e.from_svg('<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><polyline points="20 6 9 17 4 12"></polyline></svg>'), el = e.from_html('<div class="artifactuse-share-popup__loading"><div class="artifactuse-share-popup__spinner"></div> <p class="artifactuse-share-popup__loading-text">Creating link...</p></div>'), tl = e.from_html('<div><div class="artifactuse-share-popup__error"><p class="artifactuse-share-popup__error-text"> </p></div> <div class="artifactuse-share-popup__actions"><button class="artifactuse-share-popup__btn artifactuse-share-popup__btn--secondary">Back</button> <button class="artifactuse-share-popup__btn artifactuse-share-popup__btn--primary">Retry</button></div></div>'), al = e.from_html('<div class="artifactuse-share-popup__options"><button class="artifactuse-share-popup__option"><div class="artifactuse-share-popup__option-icon"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71"></path><path d="M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71"></path></svg></div> <div class="artifactuse-share-popup__option-content"><p class="artifactuse-share-popup__option-title">Share link</p> <p class="artifactuse-share-popup__option-desc">Expires in 30 days</p></div></button> <button class="artifactuse-share-popup__option"><div class="artifactuse-share-popup__option-icon"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M19 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h11l5 5v11a2 2 0 0 1-2 2z"></path><polyline points="17 21 17 13 7 13 7 21"></polyline><polyline points="7 3 7 8 15 8"></polyline></svg></div> <div class="artifactuse-share-popup__option-content"><p class="artifactuse-share-popup__option-title">Save to account</p> <p class="artifactuse-share-popup__option-desc">Permanent, manageable</p></div></button> <button class="artifactuse-share-popup__option"><div class="artifactuse-share-popup__option-icon"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><polyline points="23 4 23 10 17 10"></polyline><polyline points="1 20 1 14 7 14"></polyline><path d="M3.51 9a9 9 0 0 1 14.85-3.36L23 10M1 14l4.64 4.36A9 9 0 0 0 20.49 15"></path></svg></div> <div class="artifactuse-share-popup__option-content"><p class="artifactuse-share-popup__option-title">Update saved</p> <p class="artifactuse-share-popup__option-desc">Replace an existing artifact</p></div></button></div>'), rl = e.from_html('<div class="artifactuse-share-popup__loading"><div class="artifactuse-share-popup__spinner"></div> <p class="artifactuse-share-popup__loading-text">Loading artifacts...</p></div>'), sl = e.from_html('<div class="artifactuse-share-popup__empty">No saved artifacts of this type</div>'), il = e.from_html('<button class="artifactuse-share-popup__artifact-item"><span class="artifactuse-share-popup__artifact-name"> </span> <span class="artifactuse-share-popup__artifact-date"> </span></button>'), nl = e.from_html('<div class="artifactuse-share-popup__artifact-list"></div>'), ll = e.from_html('<div><!> <button class="artifactuse-share-popup__back-btn">Back</button></div>'), ol = e.from_html('<div class="artifactuse-share-popup__expiry"><span class="artifactuse-share-popup__expiry-icon"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><circle cx="12" cy="12" r="10"></circle><line x1="12" y1="8" x2="12" y2="12"></line><line x1="12" y1="16" x2="12.01" y2="16"></line></svg></span> <span class="artifactuse-share-popup__expiry-text"> </span></div>'), cl = e.from_html('<div class="artifactuse-share-popup__save-prompt"><p class="artifactuse-share-popup__save-prompt-text">Keep it permanently?</p> <button class="artifactuse-share-popup__save-prompt-btn">Save to account</button></div>'), ul = e.from_html('<div class="artifactuse-share-popup__success"><div class="artifactuse-share-popup__success-icon"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><polyline points="20 6 9 17 4 12"></polyline></svg></div> <div class="artifactuse-share-popup__link-wrapper"><input type="text" class="artifactuse-share-popup__link" readonly=""/> <button> </button></div> <!> <!></div>'), vl = e.from_html('<div class="artifactuse-share-popup"><div class="artifactuse-share-popup__header"><span class="artifactuse-share-popup__title"> </span> <button aria-label="share" class="artifactuse-share-popup__close"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><line x1="18" y1="6" x2="6" y2="18"></line><line x1="6" y1="6" x2="18" y2="18"></line></svg></button></div> <div class="artifactuse-share-popup__body"><!></div> <div class="artifactuse-share-popup__footer"><a href="https://artifactuse.com" target="_blank" rel="noopener noreferrer" class="artifactuse-share-popup__branding"><svg width="12" height="12" viewBox="0 0 42 42" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M16.6667 41.6673V10.4173C16.6667 9.86478 16.4472 9.33488 16.0565 8.94418C15.6658 8.55348 15.1359 8.33398 14.5833 8.33398H4.16667C3.0616 8.33398 2.00179 8.77297 1.22039 9.55437C0.438987 10.3358 0 11.3956 0 12.5007V37.5006C0 38.6057 0.438987 39.6655 1.22039 40.4469C2.00179 41.2283 3.0616 41.6673 4.16667 41.6673H29.1667C30.2717 41.6673 31.3315 41.2283 32.1129 40.4469C32.8943 39.6655 33.3333 38.6057 33.3333 37.5006V27.084C33.3333 26.5314 33.1138 26.0015 32.7231 25.6108C32.3324 25.2201 31.8025 25.0007 31.25 25.0007H0" fill="#5F51C8"></path><path d="M39.5833 0H27.0833C25.9327 0 25 0.93274 25 2.08333V14.5833C25 15.7339 25.9327 16.6667 27.0833 16.6667H39.5833C40.7339 16.6667 41.6667 15.7339 41.6667 14.5833V2.08333C41.6667 0.93274 40.7339 0 39.5833 0Z" fill="#695AE0"></path></svg> <span>Powered by Artifactuse</span></a></div></div>'), dl = e.from_html('<div style="position: relative;"><button class="artifactuse-panel__footer-action" title="Share"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><circle cx="18" cy="5" r="3"></circle><circle cx="6" cy="12" r="3"></circle><circle cx="18" cy="19" r="3"></circle><line x1="8.59" y1="13.51" x2="15.42" y2="17.49"></line><line x1="15.41" y1="6.51" x2="8.59" y2="10.49"></line></svg></button> <!></div>'), _l = e.from_html('<button><span class="artifactuse-panel__artifact-item-icon"><!></span> <div class="artifactuse-panel__artifact-item-content"><span class="artifactuse-panel__artifact-item-title"> </span> <span class="artifactuse-panel__artifact-item-meta"> <!></span></div> <span class="artifactuse-panel__artifact-item-index"> </span></button>'), pl = e.from_html('<div class="artifactuse-panel__artifact-list"><div class="artifactuse-panel__artifact-list-header"><span> </span> <button class="artifactuse-panel__artifact-list-close" aria-label="Close artifact list"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><line x1="18" y1="6" x2="6" y2="18"></line><line x1="6" y1="6" x2="18" y2="18"></line></svg></button></div> <div class="artifactuse-panel__artifact-list-items"></div></div>'), fl = e.from_html('<div class="artifactuse-panel__nav"><button class="artifactuse-panel__nav-btn" title="Previous artifact"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><polyline points="15 18 9 12 15 6"></polyline></svg></button> <button class="artifactuse-panel__nav-trigger"><span> </span> <svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><polyline points="6 9 12 15 18 9"></polyline></svg></button> <button class="artifactuse-panel__nav-btn" title="Next artifact"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><polyline points="9 18 15 12 9 6"></polyline></svg></button> <!></div>'), gl = e.from_html('<div><!> <header class="artifactuse-panel__header"><!> <div class="artifactuse-panel__title"><span class="artifactuse-panel__icon"><svg viewBox="0 0 24 24" fill="currentColor"><!></svg></span> <div class="artifactuse-panel__title-content"><span class="artifactuse-panel__name"> </span> <span class="artifactuse-panel__meta"> <!></span></div></div> <div class="artifactuse-panel__tabs"><!> <!> <!> <!></div> <div class="artifactuse-panel__actions"><!> <!> <button class="artifactuse-panel__action"><!></button> <button class="artifactuse-panel__action artifactuse-panel__action--close" title="Close"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><line x1="18" y1="6" x2="6" y2="18"></line><line x1="6" y1="6" x2="18" y2="18"></line></svg></button></div></header> <!> <div><!> <!> <div class="artifactuse-panel__code"><!> <div class="artifactuse-panel__code-scroll"><div class="artifactuse-panel__line-numbers"></div> <pre><code></code></pre></div></div> <div class="artifactuse-panel__edit"><div class="artifactuse-panel__editor-container"></div></div></div> <!> <footer class="artifactuse-panel__footer"><div class="artifactuse-panel__footer-left"><!> <!></div> <div class="artifactuse-panel__footer-right"><button><!></button> <button class="artifactuse-panel__footer-action" title="Download"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"></path><polyline points="7 10 12 15 17 10"></polyline><line x1="12" y1="15" x2="12" y2="3"></line></svg></button> <!> <!></div></footer></div>');
|
|
1869
|
-
function
|
|
1868
|
+
var pn = e.from_html('<button class="artifactuse-panel__resize-handle" aria-label="Resize panel"><div class="artifactuse-panel__resize-handle-line"></div></button>'), fn = e.from_svg('<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><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"></path><polyline points="14 2 14 8 20 8"></polyline></svg>'), gn = e.from_svg('<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><polyline points="16 18 22 12 16 6"></polyline><polyline points="8 6 2 12 8 18"></polyline></svg>'), mn = e.from_html('<a href="https://artifactuse.com" target="_blank" rel="noopener noreferrer" class="artifactuse-panel__branding"><svg width="16" height="16" viewBox="0 0 42 42" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M16.6667 41.6673V10.4173C16.6667 9.86478 16.4472 9.33488 16.0565 8.94418C15.6658 8.55348 15.1359 8.33398 14.5833 8.33398H4.16667C3.0616 8.33398 2.00179 8.77297 1.22039 9.55437C0.438987 10.3358 0 11.3956 0 12.5007V37.5006C0 38.6057 0.438987 39.6655 1.22039 40.4469C2.00179 41.2283 3.0616 41.6673 4.16667 41.6673H29.1667C30.2717 41.6673 31.3315 41.2283 32.1129 40.4469C32.8943 39.6655 33.3333 38.6057 33.3333 37.5006V27.084C33.3333 26.5314 33.1138 26.0015 32.7231 25.6108C32.3324 25.2201 31.8025 25.0007 31.25 25.0007H0" fill="#5F51C8"></path><path d="M39.5833 0H27.0833C25.9327 0 25 0.93274 25 2.08333V14.5833C25 15.7339 25.9327 16.6667 27.0833 16.6667H39.5833C40.7339 16.6667 41.6667 15.7339 41.6667 14.5833V2.08333C41.6667 0.93274 40.7339 0 39.5833 0Z" fill="#695AE0"></path></svg> <span>Artifactuse</span></a>'), hn = e.from_html('<div><!> <header class="artifactuse-panel__header artifactuse-panel__header--simple"><div class="artifactuse-panel__title"><span class="artifactuse-panel__icon"><!></span> <div class="artifactuse-panel__title-content"><span class="artifactuse-panel__name"> </span></div></div> <div class="artifactuse-panel__actions"><button class="artifactuse-panel__action artifactuse-panel__action--close" title="Close panel"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><line x1="18" y1="6" x2="6" y2="18"></line><line x1="6" y1="6" x2="18" y2="18"></line></svg></button></div></header> <div class="artifactuse-panel__empty"><div class="artifactuse-panel__empty-icon"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5"><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"></path><polyline points="14 2 14 8 20 8"></polyline></svg></div> <h3 class="artifactuse-panel__empty-title"> </h3> <p class="artifactuse-panel__empty-text"> </p></div> <footer class="artifactuse-panel__footer artifactuse-panel__footer--simple"><!></footer></div>'), bn = e.from_html('<button class="artifactuse-panel__resize-handle" aria-label="Resize panel"><div class="artifactuse-panel__resize-handle-line"></div></button>'), kn = e.from_svg('<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"></path><polyline points="7 10 12 15 17 10"></polyline><line x1="12" y1="15" x2="12" y2="3"></line></svg>'), yn = e.from_svg('<svg class="artifactuse-panel__spinner-icon" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><circle cx="12" cy="12" r="10" stroke-dasharray="32" stroke-dashoffset="32"></circle></svg>'), xn = e.from_html('<button class="artifactuse-panel__list-item"><span class="artifactuse-panel__list-item-icon"><!></span> <div class="artifactuse-panel__list-item-content"><span class="artifactuse-panel__list-item-title"> </span> <span class="artifactuse-panel__list-item-meta"> <!></span></div> <span class="artifactuse-panel__list-item-arrow"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><polyline points="9 18 15 12 9 6"></polyline></svg></span></button>'), wn = e.from_html('<a href="https://artifactuse.com" target="_blank" rel="noopener noreferrer" class="artifactuse-panel__branding"><svg width="16" height="16" viewBox="0 0 42 42" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M16.6667 41.6673V10.4173C16.6667 9.86478 16.4472 9.33488 16.0565 8.94418C15.6658 8.55348 15.1359 8.33398 14.5833 8.33398H4.16667C3.0616 8.33398 2.00179 8.77297 1.22039 9.55437C0.438987 10.3358 0 11.3956 0 12.5007V37.5006C0 38.6057 0.438987 39.6655 1.22039 40.4469C2.00179 41.2283 3.0616 41.6673 4.16667 41.6673H29.1667C30.2717 41.6673 31.3315 41.2283 32.1129 40.4469C32.8943 39.6655 33.3333 38.6057 33.3333 37.5006V27.084C33.3333 26.5314 33.1138 26.0015 32.7231 25.6108C32.3324 25.2201 31.8025 25.0007 31.25 25.0007H0" fill="#5F51C8"></path><path d="M39.5833 0H27.0833C25.9327 0 25 0.93274 25 2.08333V14.5833C25 15.7339 25.9327 16.6667 27.0833 16.6667H39.5833C40.7339 16.6667 41.6667 15.7339 41.6667 14.5833V2.08333C41.6667 0.93274 40.7339 0 39.5833 0Z" fill="#695AE0"></path></svg> <span>Artifactuse</span></a>'), Cn = e.from_html('<div><!> <header class="artifactuse-panel__header artifactuse-panel__header--simple"><div class="artifactuse-panel__title"><span class="artifactuse-panel__icon"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><polyline points="16 18 22 12 16 6"></polyline><polyline points="8 6 2 12 8 18"></polyline></svg></span> <div class="artifactuse-panel__title-content"><span class="artifactuse-panel__name">Artifacts</span> <span class="artifactuse-panel__meta"> </span></div></div> <div class="artifactuse-panel__actions"><button title="Download all as ZIP"><!></button> <button class="artifactuse-panel__action artifactuse-panel__action--close" title="Close panel"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><line x1="18" y1="6" x2="6" y2="18"></line><line x1="6" y1="6" x2="18" y2="18"></line></svg></button></div></header> <div class="artifactuse-panel__list"><div class="artifactuse-panel__list-items"></div></div> <footer class="artifactuse-panel__footer artifactuse-panel__footer--simple"><!></footer></div>'), $n = e.from_html('<button class="artifactuse-panel__resize-handle" aria-label="Resize panel"><div class="artifactuse-panel__resize-handle-line"></div></button>'), Pn = e.from_html('<button class="artifactuse-panel__back"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><polyline points="15 18 9 12 15 6"></polyline></svg></button>'), An = e.from_html('<button title="Preview"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M1 12s4-8 11-8 11 8 11 8-4 8-11 8-11-8-11-8z"></path><circle cx="12" cy="12" r="3"></circle></svg></button>'), En = e.from_html('<button title="Code"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><polyline points="16 18 22 12 16 6"></polyline><polyline points="8 6 2 12 8 18"></polyline></svg></button>'), Ln = e.from_html('<button title="Split view"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><rect x="3" y="3" width="18" height="18" rx="2" ry="2"></rect><line x1="12" y1="3" x2="12" y2="21"></line></svg></button>'), Tn = e.from_html('<button title="Edit"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M11 4H4a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7"></path><path d="M18.5 2.5a2.121 2.121 0 0 1 3 3L12 15l-4 1 1-4 9.5-9.5z"></path></svg></button>'), Sn = e.from_html('<button class="artifactuse-panel__action artifactuse-panel__action--save" title="Save"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M19 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h11l5 5v11a2 2 0 0 1-2 2z"></path><polyline points="17 21 17 13 7 13 7 21"></polyline><polyline points="7 3 7 8 15 8"></polyline></svg></button>'), Mn = e.from_html('<button class="artifactuse-panel__action" title="Open in new tab"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6"></path><polyline points="15 3 21 3 21 9"></polyline><line x1="10" y1="14" x2="21" y2="3"></line></svg></button>'), Bn = e.from_svg('<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" y1="3" x2="14" y2="10"></line><line x1="3" y1="21" x2="10" y2="14"></line></svg>'), Hn = e.from_svg('<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><polyline points="4 14 10 14 10 20"></polyline><polyline points="20 10 14 10 14 4"></polyline><line x1="14" y1="10" x2="21" y2="3"></line><line x1="3" y1="21" x2="10" y2="14"></line></svg>'), In = e.from_html('<button><span class="artifactuse-panel__file-tab-icon"><!></span> <span class="artifactuse-panel__file-tab-title"> </span> <span class="artifactuse-panel__file-tab-close" role="button" tabindex="0" title="Close tab"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><line x1="18" y1="6" x2="6" y2="18"></line><line x1="6" y1="6" x2="18" y2="18"></line></svg></span></button>'), zn = e.from_html('<div class="artifactuse-panel__file-tabs"><div class="artifactuse-panel__file-tabs-scroll"></div></div>'), Fn = e.from_html('<div class="artifactuse-panel__loading"><div class="artifactuse-panel__spinner"></div></div>'), Vn = e.from_html('<div class="artifactuse-panel__loading"><div class="artifactuse-panel__spinner"></div></div>'), qn = e.from_html('<iframe sandbox="allow-scripts allow-same-origin allow-forms allow-popups allow-modals allow-downloads allow-top-navigation-by-user-activation" allow="camera; microphone; fullscreen; geolocation; display-capture; autoplay; clipboard-write; encrypted-media; gyroscope; accelerometer; picture-in-picture" title="Artifact Preview"></iframe>'), Dn = e.from_html('<div class="artifactuse-panel__no-preview"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5"><path d="M9 17H7A5 5 0 0 1 7 7h2"></path><path d="M15 7h2a5 5 0 1 1 0 10h-2"></path><line x1="8" y1="12" x2="16" y2="12"></line></svg> <p> </p></div>'), Rn = e.from_html('<div class="artifactuse-panel__preview"><!> <!></div>'), On = e.from_html('<button class="artifactuse-panel__split-handle" aria-label="Split Resize"><div class="artifactuse-panel__split-handle-line"></div></button>'), Un = e.from_html("<button> </button>"), Nn = e.from_html("<button> </button>"), jn = e.from_html("<button> </button>"), Wn = e.from_html("<button> </button>"), Jn = e.from_html('<div><span class="artifactuse-panel__console-type"> </span> <span class="artifactuse-panel__console-content"> </span> <span class="artifactuse-panel__console-timestamp"> </span></div>'), Xn = e.from_html('<div class="artifactuse-panel__console-entries"></div>'), Zn = e.from_html('<div><div class="artifactuse-panel__console-header" role="button" tabindex="0"><svg class="artifactuse-panel__console-chevron" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><polyline points="18 15 12 9 6 15"></polyline></svg> <span>Console</span> <div class="artifactuse-panel__console-filters"><!> <!> <!> <!></div> <button class="artifactuse-panel__console-clear">Clear</button></div> <!></div>'), Kn = e.from_html('<a href="https://artifactuse.com" target="_blank" rel="noopener noreferrer" class="artifactuse-panel__branding" title="Powered by Artifactuse"><svg width="16" height="16" viewBox="0 0 42 42" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M16.6667 41.6673V10.4173C16.6667 9.86478 16.4472 9.33488 16.0565 8.94418C15.6658 8.55348 15.1359 8.33398 14.5833 8.33398H4.16667C3.0616 8.33398 2.00179 8.77297 1.22039 9.55437C0.438987 10.3358 0 11.3956 0 12.5007V37.5006C0 38.6057 0.438987 39.6655 1.22039 40.4469C2.00179 41.2283 3.0616 41.6673 4.16667 41.6673H29.1667C30.2717 41.6673 31.3315 41.2283 32.1129 40.4469C32.8943 39.6655 33.3333 38.6057 33.3333 37.5006V27.084C33.3333 26.5314 33.1138 26.0015 32.7231 25.6108C32.3324 25.2201 31.8025 25.0007 31.25 25.0007H0" fill="#5F51C8"></path><path d="M39.5833 0H27.0833C25.9327 0 25 0.93274 25 2.08333V14.5833C25 15.7339 25.9327 16.6667 27.0833 16.6667H39.5833C40.7339 16.6667 41.6667 15.7339 41.6667 14.5833V2.08333C41.6667 0.93274 40.7339 0 39.5833 0Z" fill="#695AE0"></path></svg> <span>Artifactuse</span></a>'), Yn = e.from_html('<span class="artifactuse-panel__badge artifactuse-panel__badge--secondary"> </span>'), Qn = e.from_svg('<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><rect x="9" y="9" width="13" height="13" rx="2" ry="2"></rect><path d="M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1"></path></svg>'), Gn = e.from_svg('<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><polyline points="20 6 9 17 4 12"></polyline></svg>'), el = e.from_html('<div class="artifactuse-share-popup__loading"><div class="artifactuse-share-popup__spinner"></div> <p class="artifactuse-share-popup__loading-text">Creating link...</p></div>'), tl = e.from_html('<div><div class="artifactuse-share-popup__error"><p class="artifactuse-share-popup__error-text"> </p></div> <div class="artifactuse-share-popup__actions"><button class="artifactuse-share-popup__btn artifactuse-share-popup__btn--secondary">Back</button> <button class="artifactuse-share-popup__btn artifactuse-share-popup__btn--primary">Retry</button></div></div>'), al = e.from_html('<div class="artifactuse-share-popup__options"><button class="artifactuse-share-popup__option"><div class="artifactuse-share-popup__option-icon"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71"></path><path d="M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71"></path></svg></div> <div class="artifactuse-share-popup__option-content"><p class="artifactuse-share-popup__option-title">Share link</p> <p class="artifactuse-share-popup__option-desc">Expires in 30 days</p></div></button> <button class="artifactuse-share-popup__option"><div class="artifactuse-share-popup__option-icon"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M19 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h11l5 5v11a2 2 0 0 1-2 2z"></path><polyline points="17 21 17 13 7 13 7 21"></polyline><polyline points="7 3 7 8 15 8"></polyline></svg></div> <div class="artifactuse-share-popup__option-content"><p class="artifactuse-share-popup__option-title">Save to account</p> <p class="artifactuse-share-popup__option-desc">Permanent, manageable</p></div></button> <button class="artifactuse-share-popup__option"><div class="artifactuse-share-popup__option-icon"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><polyline points="23 4 23 10 17 10"></polyline><polyline points="1 20 1 14 7 14"></polyline><path d="M3.51 9a9 9 0 0 1 14.85-3.36L23 10M1 14l4.64 4.36A9 9 0 0 0 20.49 15"></path></svg></div> <div class="artifactuse-share-popup__option-content"><p class="artifactuse-share-popup__option-title">Update saved</p> <p class="artifactuse-share-popup__option-desc">Replace an existing artifact</p></div></button></div>'), rl = e.from_html('<div class="artifactuse-share-popup__loading"><div class="artifactuse-share-popup__spinner"></div> <p class="artifactuse-share-popup__loading-text">Loading artifacts...</p></div>'), sl = e.from_html('<div class="artifactuse-share-popup__empty">No saved artifacts of this type</div>'), il = e.from_html('<button class="artifactuse-share-popup__artifact-item"><span class="artifactuse-share-popup__artifact-name"> </span> <span class="artifactuse-share-popup__artifact-date"> </span></button>'), nl = e.from_html('<div class="artifactuse-share-popup__artifact-list"></div>'), ll = e.from_html('<div><!> <button class="artifactuse-share-popup__back-btn">Back</button></div>'), ol = e.from_html('<div class="artifactuse-share-popup__expiry"><span class="artifactuse-share-popup__expiry-icon"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><circle cx="12" cy="12" r="10"></circle><line x1="12" y1="8" x2="12" y2="12"></line><line x1="12" y1="16" x2="12.01" y2="16"></line></svg></span> <span class="artifactuse-share-popup__expiry-text"> </span></div>'), cl = e.from_html('<div class="artifactuse-share-popup__save-prompt"><p class="artifactuse-share-popup__save-prompt-text">Keep it permanently?</p> <button class="artifactuse-share-popup__save-prompt-btn">Save to account</button></div>'), ul = e.from_html('<div class="artifactuse-share-popup__success"><div class="artifactuse-share-popup__success-icon"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><polyline points="20 6 9 17 4 12"></polyline></svg></div> <div class="artifactuse-share-popup__link-wrapper"><input type="text" class="artifactuse-share-popup__link" readonly=""/> <button> </button></div> <!> <!></div>'), vl = e.from_html('<div class="artifactuse-share-popup"><div class="artifactuse-share-popup__header"><span class="artifactuse-share-popup__title"> </span> <button aria-label="share" class="artifactuse-share-popup__close"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><line x1="18" y1="6" x2="6" y2="18"></line><line x1="6" y1="6" x2="18" y2="18"></line></svg></button></div> <div class="artifactuse-share-popup__body"><!></div> <div class="artifactuse-share-popup__footer"><a href="https://artifactuse.com" target="_blank" rel="noopener noreferrer" class="artifactuse-share-popup__branding"><svg width="12" height="12" viewBox="0 0 42 42" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M16.6667 41.6673V10.4173C16.6667 9.86478 16.4472 9.33488 16.0565 8.94418C15.6658 8.55348 15.1359 8.33398 14.5833 8.33398H4.16667C3.0616 8.33398 2.00179 8.77297 1.22039 9.55437C0.438987 10.3358 0 11.3956 0 12.5007V37.5006C0 38.6057 0.438987 39.6655 1.22039 40.4469C2.00179 41.2283 3.0616 41.6673 4.16667 41.6673H29.1667C30.2717 41.6673 31.3315 41.2283 32.1129 40.4469C32.8943 39.6655 33.3333 38.6057 33.3333 37.5006V27.084C33.3333 26.5314 33.1138 26.0015 32.7231 25.6108C32.3324 25.2201 31.8025 25.0007 31.25 25.0007H0" fill="#5F51C8"></path><path d="M39.5833 0H27.0833C25.9327 0 25 0.93274 25 2.08333V14.5833C25 15.7339 25.9327 16.6667 27.0833 16.6667H39.5833C40.7339 16.6667 41.6667 15.7339 41.6667 14.5833V2.08333C41.6667 0.93274 40.7339 0 39.5833 0Z" fill="#695AE0"></path></svg> <span>Powered by Artifactuse</span></a></div></div>'), dl = e.from_html('<div style="position: relative;"><button class="artifactuse-panel__footer-action" title="Share"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><circle cx="18" cy="5" r="3"></circle><circle cx="6" cy="12" r="3"></circle><circle cx="18" cy="19" r="3"></circle><line x1="8.59" y1="13.51" x2="15.42" y2="17.49"></line><line x1="15.41" y1="6.51" x2="8.59" y2="10.49"></line></svg></button> <!></div>'), _l = e.from_html('<button><span class="artifactuse-panel__artifact-item-icon"><!></span> <div class="artifactuse-panel__artifact-item-content"><span class="artifactuse-panel__artifact-item-title"> </span> <span class="artifactuse-panel__artifact-item-meta"> <!></span></div> <span class="artifactuse-panel__artifact-item-index"> </span></button>'), pl = e.from_html('<div class="artifactuse-panel__artifact-list"><div class="artifactuse-panel__artifact-list-header"><span> </span> <button class="artifactuse-panel__artifact-list-close" aria-label="Close artifact list"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><line x1="18" y1="6" x2="6" y2="18"></line><line x1="6" y1="6" x2="18" y2="18"></line></svg></button></div> <div class="artifactuse-panel__artifact-list-items"></div></div>'), fl = e.from_html('<div class="artifactuse-panel__nav"><button class="artifactuse-panel__nav-btn" title="Previous artifact"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><polyline points="15 18 9 12 15 6"></polyline></svg></button> <button class="artifactuse-panel__nav-trigger"><span> </span> <svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><polyline points="6 9 12 15 18 9"></polyline></svg></button> <button class="artifactuse-panel__nav-btn" title="Next artifact"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><polyline points="9 18 15 12 9 6"></polyline></svg></button> <!></div>'), gl = e.from_html('<div><!> <header class="artifactuse-panel__header"><!> <div class="artifactuse-panel__title"><span class="artifactuse-panel__icon"><svg viewBox="0 0 24 24" fill="currentColor"><!></svg></span> <div class="artifactuse-panel__title-content"><span class="artifactuse-panel__name"> </span> <span class="artifactuse-panel__meta"> <!></span></div></div> <div class="artifactuse-panel__tabs"><!> <!> <!> <!></div> <div class="artifactuse-panel__actions"><!> <!> <button class="artifactuse-panel__action"><!></button> <button class="artifactuse-panel__action artifactuse-panel__action--close" title="Close"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><line x1="18" y1="6" x2="6" y2="18"></line><line x1="6" y1="6" x2="18" y2="18"></line></svg></button></div></header> <!> <div><!> <!> <div class="artifactuse-panel__code"><!> <div class="artifactuse-panel__code-scroll"><div class="artifactuse-panel__line-numbers"></div> <pre><code></code></pre></div></div> <div class="artifactuse-panel__edit"><div class="artifactuse-panel__editor-container"></div></div></div> <!> <footer class="artifactuse-panel__footer"><div class="artifactuse-panel__footer-left"><!> <!></div> <div class="artifactuse-panel__footer-right"><button><!></button> <button class="artifactuse-panel__footer-action" title="Download"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"></path><polyline points="7 10 12 15 17 10"></polyline><line x1="12" y1="15" x2="12" y2="3"></line></svg></button> <!> <!></div></footer></div>');
|
|
1869
|
+
function Ll(Ve, c) {
|
|
1870
1870
|
var yr, xr;
|
|
1871
1871
|
e.push(c, !1);
|
|
1872
|
-
const me = () => e.store_get(Pe, "$activeArtifact", i), h = () => e.store_get(
|
|
1872
|
+
const me = () => e.store_get(Pe, "$activeArtifact", i), h = () => e.store_get(Le, "$state", i), w = () => e.store_get(Ae, "$artifactCount", i), l = () => e.store_get(He, "$hasArtifacts", i), [i, d] = e.setup_stores(), I = e.mutable_source(), a = e.mutable_source(), Ee = e.mutable_source(), we = e.mutable_source(), Z = e.mutable_source(), se = e.mutable_source(), Ie = e.mutable_source(), ue = e.mutable_source(), Se = e.mutable_source(), C = e.mutable_source(), f = e.mutable_source(), F = e.mutable_source(), q = e.mutable_source(), Te = e.mutable_source(), xe = e.mutable_source(), ve = e.mutable_source(), lt = e.mutable_source(), qe = e.mutable_source(), Ce = e.mutable_source(), De = e.mutable_source(), Je = e.mutable_source(), Ze = e.mutable_source(), $e = e.mutable_source(), D = e.mutable_source(), he = e.mutable_source(), te = e.mutable_source(), Re = e.mutable_source(), ot = e.mutable_source(), at = e.mutable_source(), u = ya();
|
|
1873
1873
|
let K = e.prop(c, "className", 8, ""), de = e.prop(c, "initialPanelWidth", 8, void 0), M = e.prop(c, "initialSplitPosition", 8, void 0), ae = e.prop(c, "externalPreview", 8, void 0), k = e.prop(c, "consolePanel", 8, void 0);
|
|
1874
1874
|
const {
|
|
1875
|
-
state:
|
|
1875
|
+
state: Le,
|
|
1876
1876
|
activeArtifact: Pe,
|
|
1877
1877
|
artifactCount: Ae,
|
|
1878
1878
|
hasArtifacts: He,
|
|
@@ -1886,8 +1886,8 @@ function Tl(Ve, c) {
|
|
|
1886
1886
|
let g = e.mutable_source(), N = e.mutable_source(), re = e.mutable_source(), m = e.mutable_source(), R = e.mutable_source(), n = e.mutable_source(), $ = e.mutable_source(!1), z = e.mutable_source(!1), G = e.mutable_source(!0), ke = e.mutable_source(!1), ge = e.mutable_source(!1), ce = e.mutable_source(!1), V = e.mutable_source([]), le = e.mutable_source(!1), O = e.mutable_source(null), E = e.mutable_source(/* @__PURE__ */ new Set(["log", "warn", "error", "info"])), Q = e.mutable_source(!1), v = e.mutable_source(
|
|
1887
1887
|
"options"
|
|
1888
1888
|
// 'options' | 'email' | 'loading' | 'success' | 'verify' | 'error'
|
|
1889
|
-
), x = e.mutable_source(""), P = e.mutable_source(null), A = e.mutable_source(""), j = e.mutable_source(!1), y = e.mutable_source(!1), _ = e.mutable_source([]), b = e.mutable_source(!1), J = e.mutable_source(""), U = e.mutable_source(Math.min(Math.max(de() ?? ((yr = s.config) == null ? void 0 : yr.panelWidth) ?? 65, 25), 75)),
|
|
1890
|
-
function
|
|
1889
|
+
), x = e.mutable_source(""), P = e.mutable_source(null), A = e.mutable_source(""), j = e.mutable_source(!1), y = e.mutable_source(!1), _ = e.mutable_source([]), b = e.mutable_source(!1), J = e.mutable_source(""), U = e.mutable_source(Math.min(Math.max(de() ?? ((yr = s.config) == null ? void 0 : yr.panelWidth) ?? 65, 25), 75)), L = e.mutable_source(Math.min(Math.max(M() ?? ((xr = s.config) == null ? void 0 : xr.splitPosition) ?? 50, 20), 80)), ee = null, T = null, _e = null, W = null, B = null, Y = null, oe = null, H = null, X = e.mutable_source(null);
|
|
1890
|
+
function et(r) {
|
|
1891
1891
|
r && (H !== null && H !== r.isPreviewable && (e.set(ce, !0), setTimeout(
|
|
1892
1892
|
() => {
|
|
1893
1893
|
e.set(ce, !1);
|
|
@@ -1906,24 +1906,24 @@ function Tl(Ve, c) {
|
|
|
1906
1906
|
function oa(r) {
|
|
1907
1907
|
fe(r);
|
|
1908
1908
|
}
|
|
1909
|
-
function
|
|
1909
|
+
function $t(r) {
|
|
1910
1910
|
s.closeTab(r), h().openTabs.length === 0 && e.set(ke, !1);
|
|
1911
1911
|
}
|
|
1912
|
-
function
|
|
1912
|
+
function rt() {
|
|
1913
1913
|
e.set(ke, !1), s.state.clearActiveArtifact();
|
|
1914
1914
|
}
|
|
1915
1915
|
function Ot(r) {
|
|
1916
1916
|
if (r.language !== "smartdiff") return null;
|
|
1917
1917
|
try {
|
|
1918
|
-
const
|
|
1919
|
-
if (
|
|
1920
|
-
const ze =
|
|
1918
|
+
const S = JSON.parse(r.code);
|
|
1919
|
+
if (S.oldCode === void 0 || S.newCode === void 0) return null;
|
|
1920
|
+
const ze = S.language || "plaintext", Ne = Vr() && window.Prism.languages[ze], ct = ks(S.oldCode, S.newCode).split(`
|
|
1921
1921
|
`);
|
|
1922
|
-
return { html:
|
|
1923
|
-
const
|
|
1924
|
-
return
|
|
1922
|
+
return { html: ct.map((Ke) => {
|
|
1923
|
+
const st = Ke[0], it = Ke.slice(1), gt = Ne ? window.Prism.highlight(it, Ne, ze) : it;
|
|
1924
|
+
return st === "-" ? `<span class="token deleted">${gt}</span>` : st === "+" ? `<span class="token inserted">${gt}</span>` : gt;
|
|
1925
1925
|
}).join(`
|
|
1926
|
-
`), lineCount:
|
|
1926
|
+
`), lineCount: ct.length };
|
|
1927
1927
|
} catch {
|
|
1928
1928
|
return null;
|
|
1929
1929
|
}
|
|
@@ -1931,28 +1931,28 @@ function Tl(Ve, c) {
|
|
|
1931
1931
|
function wa() {
|
|
1932
1932
|
var Ne;
|
|
1933
1933
|
if (!e.get(m) || !((Ne = e.get(a)) != null && Ne.code)) return;
|
|
1934
|
-
const r = Ot(e.get(a)),
|
|
1935
|
-
`).length, ze = Array.from({ length:
|
|
1934
|
+
const r = Ot(e.get(a)), S = r ? r.lineCount : e.get(a).code.split(`
|
|
1935
|
+
`).length, ze = Array.from({ length: S }, (ct, vt) => `<div>${vt + 1}</div>`).join("");
|
|
1936
1936
|
e.mutate(m, e.get(m).innerHTML = ze);
|
|
1937
1937
|
}
|
|
1938
1938
|
function Ca() {
|
|
1939
1939
|
var r;
|
|
1940
1940
|
if (e.get(N) && Vr() && ((r = e.get(a)) != null && r.code)) {
|
|
1941
|
-
const
|
|
1942
|
-
if (
|
|
1943
|
-
e.mutate(N, e.get(N).innerHTML =
|
|
1941
|
+
const S = Ot(e.get(a));
|
|
1942
|
+
if (S)
|
|
1943
|
+
e.mutate(N, e.get(N).innerHTML = S.html);
|
|
1944
1944
|
else {
|
|
1945
1945
|
const ze = window.Prism.languages[e.get(F)];
|
|
1946
1946
|
ze ? e.mutate(N, e.get(N).innerHTML = window.Prism.highlight(e.get(a).code, ze, e.get(F))) : e.mutate(N, e.get(N).textContent = e.get(a).code);
|
|
1947
1947
|
}
|
|
1948
1948
|
e.mutate(N, e.get(N).dataset.highlighted = "true"), Jt().then(() => {
|
|
1949
|
-
|
|
1949
|
+
ft();
|
|
1950
1950
|
});
|
|
1951
1951
|
}
|
|
1952
1952
|
}
|
|
1953
|
-
function
|
|
1954
|
-
var
|
|
1955
|
-
const r = (
|
|
1953
|
+
function ft() {
|
|
1954
|
+
var S;
|
|
1955
|
+
const r = (S = e.get(N)) == null ? void 0 : S.closest("pre");
|
|
1956
1956
|
if (r && e.get(R) && e.get(m)) {
|
|
1957
1957
|
const Ne = window.getComputedStyle(r).backgroundColor;
|
|
1958
1958
|
Ne && Ne !== "rgba(0, 0, 0, 0)" && Ne !== "transparent" && (e.mutate(R, e.get(R).style.backgroundColor = Ne), e.mutate(m, e.get(m).style.backgroundColor = Ne));
|
|
@@ -1983,7 +1983,7 @@ function Tl(Ve, c) {
|
|
|
1983
1983
|
code: r
|
|
1984
1984
|
});
|
|
1985
1985
|
}
|
|
1986
|
-
function
|
|
1986
|
+
function Lt() {
|
|
1987
1987
|
e.get(f) && window.open(e.get(f), "_blank", "noopener,noreferrer");
|
|
1988
1988
|
}
|
|
1989
1989
|
function Ut() {
|
|
@@ -2015,23 +2015,23 @@ function Tl(Ve, c) {
|
|
|
2015
2015
|
}
|
|
2016
2016
|
function Or() {
|
|
2017
2017
|
if (!e.get(a)) return;
|
|
2018
|
-
const { code: r, language:
|
|
2019
|
-
|
|
2018
|
+
const { code: r, language: S, editorLanguage: ze, title: Ne } = e.get(a), ct = dr(ze || S), vt = `${Ne.toLowerCase().replace(/\s+/g, "-")}.${ct}`, Ke = new Blob([r], { type: "text/plain" }), st = URL.createObjectURL(Ke), it = document.createElement("a");
|
|
2019
|
+
it.href = st, it.download = vt, document.body.appendChild(it), it.click(), document.body.removeChild(it), URL.revokeObjectURL(st);
|
|
2020
2020
|
}
|
|
2021
2021
|
async function Ur() {
|
|
2022
2022
|
if (!(e.get(ge) || e.get(q).length === 0)) {
|
|
2023
2023
|
e.set(ge, !0);
|
|
2024
2024
|
try {
|
|
2025
|
-
const r = new Cs(),
|
|
2026
|
-
for (const
|
|
2027
|
-
if (!
|
|
2028
|
-
const
|
|
2029
|
-
let
|
|
2030
|
-
const Ye =
|
|
2031
|
-
Ye > 0 && (
|
|
2025
|
+
const r = new Cs(), S = /* @__PURE__ */ new Map();
|
|
2026
|
+
for (const st of e.get(q)) {
|
|
2027
|
+
if (!st.code) continue;
|
|
2028
|
+
const it = dr(st.editorLanguage || st.language);
|
|
2029
|
+
let gt = (st.title || "untitled").toLowerCase().replace(/\s+/g, "-").replace(/[^a-z0-9-_]/g, ""), dt = `${gt}.${it}`;
|
|
2030
|
+
const Ye = S.get(dt) || 0;
|
|
2031
|
+
Ye > 0 && (dt = `${gt}-${Ye}.${it}`), S.set(`${gt}.${it}`, Ye + 1), r.file(dt, st.code);
|
|
2032
2032
|
}
|
|
2033
|
-
const ze = await r.generateAsync({ type: "blob" }),
|
|
2034
|
-
|
|
2033
|
+
const ze = await r.generateAsync({ type: "blob" }), ct = `artifacts-${(/* @__PURE__ */ new Date()).toISOString().slice(0, 10)}.zip`, vt = URL.createObjectURL(ze), Ke = document.createElement("a");
|
|
2034
|
+
Ke.href = vt, Ke.download = ct, document.body.appendChild(Ke), Ke.click(), document.body.removeChild(Ke), URL.revokeObjectURL(vt);
|
|
2035
2035
|
} catch (r) {
|
|
2036
2036
|
console.error("Failed to create ZIP:", r);
|
|
2037
2037
|
} finally {
|
|
@@ -2096,17 +2096,17 @@ function Tl(Ve, c) {
|
|
|
2096
2096
|
e.set(v, "loading");
|
|
2097
2097
|
try {
|
|
2098
2098
|
await s.share.openAuthPopup();
|
|
2099
|
-
} catch (
|
|
2100
|
-
|
|
2099
|
+
} catch (S) {
|
|
2100
|
+
S.message === "Authentication cancelled" ? e.set(v, "options") : (e.set(A, S.message || "Authentication failed"), e.set(v, "error"));
|
|
2101
2101
|
return;
|
|
2102
2102
|
}
|
|
2103
2103
|
}
|
|
2104
2104
|
e.set(v, "update-list"), e.set(b, !0);
|
|
2105
2105
|
try {
|
|
2106
|
-
const
|
|
2106
|
+
const S = ((r = e.get(a)) == null ? void 0 : r.language) || null, ze = await s.share.listArtifacts(S);
|
|
2107
2107
|
e.set(_, ze.projects || []);
|
|
2108
|
-
} catch (
|
|
2109
|
-
e.set(A,
|
|
2108
|
+
} catch (S) {
|
|
2109
|
+
e.set(A, S.message || "Failed to load artifacts"), e.set(v, "error");
|
|
2110
2110
|
} finally {
|
|
2111
2111
|
e.set(b, !1);
|
|
2112
2112
|
}
|
|
@@ -2115,14 +2115,14 @@ function Tl(Ve, c) {
|
|
|
2115
2115
|
async function Xr(r) {
|
|
2116
2116
|
var ze, Ne;
|
|
2117
2117
|
if (!e.get(a) || !(s != null && s.share)) return;
|
|
2118
|
-
const
|
|
2119
|
-
if (
|
|
2118
|
+
const S = (ze = r.project) == null ? void 0 : ze.uuid;
|
|
2119
|
+
if (S) {
|
|
2120
2120
|
e.set(v, "loading"), e.set(A, "");
|
|
2121
2121
|
try {
|
|
2122
|
-
const
|
|
2123
|
-
e.set(x,
|
|
2124
|
-
} catch (
|
|
2125
|
-
e.set(A,
|
|
2122
|
+
const ct = await s.share.updateArtifact(S, e.get(a));
|
|
2123
|
+
e.set(x, ct.url || ""), e.set(P, null), e.set(y, !0), e.set(J, ((Ne = r.project) == null ? void 0 : Ne.name) || "Untitled"), e.set(v, "success");
|
|
2124
|
+
} catch (ct) {
|
|
2125
|
+
e.set(A, ct.message || "Failed to update artifact"), e.set(v, "error");
|
|
2126
2126
|
}
|
|
2127
2127
|
}
|
|
2128
2128
|
}
|
|
@@ -2143,20 +2143,20 @@ function Tl(Ve, c) {
|
|
|
2143
2143
|
e.set(ke, !0), fe(r), e.set(z, !1);
|
|
2144
2144
|
}
|
|
2145
2145
|
function Kr() {
|
|
2146
|
-
e.get(
|
|
2146
|
+
e.get(Te) > 0 && fe(e.get(q)[e.get(Te) - 1]);
|
|
2147
2147
|
}
|
|
2148
2148
|
function Yr() {
|
|
2149
|
-
e.get(
|
|
2149
|
+
e.get(Te) < e.get(q).length - 1 && fe(e.get(q)[e.get(Te) + 1]);
|
|
2150
2150
|
}
|
|
2151
2151
|
function Qa(r) {
|
|
2152
|
-
ee = { startX: r.clientX, startWidth: e.get(U) }, document.addEventListener("mousemove", hr), document.addEventListener("mouseup", Ga), document.body.style.cursor = "ew-resize", document.body.style.userSelect = "none", document.querySelectorAll("iframe").forEach((
|
|
2153
|
-
|
|
2152
|
+
ee = { startX: r.clientX, startWidth: e.get(U) }, document.addEventListener("mousemove", hr), document.addEventListener("mouseup", Ga), document.body.style.cursor = "ew-resize", document.body.style.userSelect = "none", document.querySelectorAll("iframe").forEach((S) => {
|
|
2153
|
+
S.style.pointerEvents = "none";
|
|
2154
2154
|
});
|
|
2155
2155
|
}
|
|
2156
2156
|
function hr(r) {
|
|
2157
2157
|
if (!ee) return;
|
|
2158
|
-
const
|
|
2159
|
-
e.set(U, Math.min(Math.max(
|
|
2158
|
+
const S = window.innerWidth, Ne = (ee.startX - r.clientX) / S * 100, ct = ee.startWidth + Ne;
|
|
2159
|
+
e.set(U, Math.min(Math.max(ct, 25), 75));
|
|
2160
2160
|
}
|
|
2161
2161
|
function Ga() {
|
|
2162
2162
|
ee = null, document.removeEventListener("mousemove", hr), document.removeEventListener("mouseup", Ga), document.body.style.cursor = "", document.body.style.userSelect = "", document.querySelectorAll("iframe").forEach((r) => {
|
|
@@ -2165,23 +2165,23 @@ function Tl(Ve, c) {
|
|
|
2165
2165
|
}
|
|
2166
2166
|
function Qr(r) {
|
|
2167
2167
|
if (!e.get(re)) return;
|
|
2168
|
-
const
|
|
2169
|
-
|
|
2168
|
+
const S = e.get(re).getBoundingClientRect();
|
|
2169
|
+
T = {
|
|
2170
2170
|
startX: r.clientX,
|
|
2171
|
-
startPosition: e.get(
|
|
2172
|
-
contentLeft:
|
|
2173
|
-
contentWidth:
|
|
2171
|
+
startPosition: e.get(L),
|
|
2172
|
+
contentLeft: S.left,
|
|
2173
|
+
contentWidth: S.width
|
|
2174
2174
|
}, document.addEventListener("mousemove", br), document.addEventListener("mouseup", er), document.body.style.cursor = "col-resize", document.body.style.userSelect = "none", document.querySelectorAll("iframe").forEach((ze) => {
|
|
2175
2175
|
ze.style.pointerEvents = "none";
|
|
2176
2176
|
});
|
|
2177
2177
|
}
|
|
2178
2178
|
function br(r) {
|
|
2179
|
-
if (!
|
|
2180
|
-
const ze = (r.clientX -
|
|
2181
|
-
e.set(
|
|
2179
|
+
if (!T) return;
|
|
2180
|
+
const ze = (r.clientX - T.contentLeft) / T.contentWidth * 100;
|
|
2181
|
+
e.set(L, Math.min(Math.max(ze, 20), 80));
|
|
2182
2182
|
}
|
|
2183
2183
|
function er() {
|
|
2184
|
-
|
|
2184
|
+
T = null, document.removeEventListener("mousemove", br), document.removeEventListener("mouseup", er), document.body.style.cursor = "", document.body.style.userSelect = "", document.querySelectorAll("iframe").forEach((r) => {
|
|
2185
2185
|
r.style.pointerEvents = "";
|
|
2186
2186
|
});
|
|
2187
2187
|
}
|
|
@@ -2196,13 +2196,13 @@ function Tl(Ve, c) {
|
|
|
2196
2196
|
Ga(), er(), ca(), clearTimeout(_e), clearTimeout(W), tr && tr();
|
|
2197
2197
|
});
|
|
2198
2198
|
function Va(r) {
|
|
2199
|
-
const
|
|
2200
|
-
|
|
2199
|
+
const S = new Set(e.get(E));
|
|
2200
|
+
S.has(r) ? S.delete(r) : S.add(r), e.set(E, S);
|
|
2201
2201
|
}
|
|
2202
2202
|
e.legacy_pre_effect(() => e.deep_read_state(de()), () => {
|
|
2203
2203
|
de() !== void 0 && e.set(U, Math.min(Math.max(de(), 25), 75));
|
|
2204
2204
|
}), e.legacy_pre_effect(() => e.deep_read_state(M()), () => {
|
|
2205
|
-
M() !== void 0 && e.set(
|
|
2205
|
+
M() !== void 0 && e.set(L, Math.min(Math.max(M(), 20), 80));
|
|
2206
2206
|
}), e.legacy_pre_effect(() => {
|
|
2207
2207
|
}, () => {
|
|
2208
2208
|
var r;
|
|
@@ -2222,7 +2222,7 @@ function Tl(Ve, c) {
|
|
|
2222
2222
|
}), e.legacy_pre_effect(() => l(), () => {
|
|
2223
2223
|
e.set(ue, l());
|
|
2224
2224
|
}), e.legacy_pre_effect(() => (e.get(a), la), () => {
|
|
2225
|
-
e.set(
|
|
2225
|
+
e.set(Se, e.get(a) ? la(e.get(a).language) : "");
|
|
2226
2226
|
}), e.legacy_pre_effect(() => (e.get(a), Xa), () => {
|
|
2227
2227
|
e.set(C, e.get(a) ? Xa(e.get(a).language) : "");
|
|
2228
2228
|
}), e.legacy_pre_effect(() => e.get(a), () => {
|
|
@@ -2236,7 +2236,7 @@ function Tl(Ve, c) {
|
|
|
2236
2236
|
}), e.legacy_pre_effect(() => e.get(Ee), () => {
|
|
2237
2237
|
e.set(q, e.get(Ee).filter((r) => !r.isInline));
|
|
2238
2238
|
}), e.legacy_pre_effect(() => (e.get(a), e.get(q)), () => {
|
|
2239
|
-
e.set(
|
|
2239
|
+
e.set(Te, e.get(a) && e.get(q).length ? e.get(q).findIndex((r) => r.id === e.get(a).id) : -1);
|
|
2240
2240
|
}), e.legacy_pre_effect(() => {
|
|
2241
2241
|
}, () => {
|
|
2242
2242
|
var r;
|
|
@@ -2245,14 +2245,14 @@ function Tl(Ve, c) {
|
|
|
2245
2245
|
() => (e.get(f), e.get(a), e.deep_read_state(ae())),
|
|
2246
2246
|
() => {
|
|
2247
2247
|
e.set(ve, (() => {
|
|
2248
|
-
var r,
|
|
2249
|
-
return e.get(f) ? ((r = e.get(a)) == null ? void 0 : r.externalPreview) !== void 0 ? e.get(a).externalPreview : ae() !== void 0 ? ae() : ((
|
|
2248
|
+
var r, S;
|
|
2249
|
+
return e.get(f) ? ((r = e.get(a)) == null ? void 0 : r.externalPreview) !== void 0 ? e.get(a).externalPreview : ae() !== void 0 ? ae() : ((S = s == null ? void 0 : s.config) == null ? void 0 : S.externalPreview) ?? !1 : !1;
|
|
2250
2250
|
})());
|
|
2251
2251
|
}
|
|
2252
2252
|
), e.legacy_pre_effect(() => {
|
|
2253
2253
|
}, () => {
|
|
2254
2254
|
var r;
|
|
2255
|
-
e.set(
|
|
2255
|
+
e.set(lt, ((r = s == null ? void 0 : s.share) == null ? void 0 : r.enabled) !== !1);
|
|
2256
2256
|
}), e.legacy_pre_effect(() => {
|
|
2257
2257
|
}, () => {
|
|
2258
2258
|
var r;
|
|
@@ -2267,7 +2267,7 @@ function Tl(Ve, c) {
|
|
|
2267
2267
|
}), e.legacy_pre_effect(() => e.get(V), () => {
|
|
2268
2268
|
e.set(Je, e.get(V).filter((r) => r.type === "info").length);
|
|
2269
2269
|
}), e.legacy_pre_effect(() => e.get(V), () => {
|
|
2270
|
-
e.set(
|
|
2270
|
+
e.set(Ze, e.get(V).filter((r) => r.type === "log").length);
|
|
2271
2271
|
}), e.legacy_pre_effect(() => (e.get(V), e.get(E)), () => {
|
|
2272
2272
|
e.set($e, e.get(V).filter((r) => e.get(E).has(r.type)));
|
|
2273
2273
|
}), e.legacy_pre_effect(() => (e.deep_read_state(k()), e.get(V)), () => {
|
|
@@ -2280,11 +2280,11 @@ function Tl(Ve, c) {
|
|
|
2280
2280
|
var r;
|
|
2281
2281
|
e.set(te, ((r = s.config) == null ? void 0 : r.multiTab) === !0);
|
|
2282
2282
|
}), e.legacy_pre_effect(() => (e.get(te), h(), e.get(Ee)), () => {
|
|
2283
|
-
e.set(Re, e.get(te) ? h().openTabs.map((r) => e.get(Ee).find((
|
|
2283
|
+
e.set(Re, e.get(te) ? h().openTabs.map((r) => e.get(Ee).find((S) => S.id === r)).filter(Boolean) : []);
|
|
2284
2284
|
}), e.legacy_pre_effect(
|
|
2285
2285
|
() => (e.get(se), e.get(a), e.get(ue), h(), e.deep_read_state(K())),
|
|
2286
2286
|
() => {
|
|
2287
|
-
e.set(
|
|
2287
|
+
e.set(ot, [
|
|
2288
2288
|
"artifactuse-panel",
|
|
2289
2289
|
e.get(se) && "artifactuse-panel--fullscreen",
|
|
2290
2290
|
!e.get(a) && e.get(ue) && !h().forceEmptyView && "artifactuse-panel--list",
|
|
@@ -2293,9 +2293,9 @@ function Tl(Ve, c) {
|
|
|
2293
2293
|
].filter(Boolean).join(" "));
|
|
2294
2294
|
}
|
|
2295
2295
|
), e.legacy_pre_effect(() => (e.get(Z), e.get(ce)), () => {
|
|
2296
|
-
e.set(
|
|
2296
|
+
e.set(at, `artifactuse-panel__content artifactuse-panel__content--${e.get(Z)}${e.get(ce) ? " artifactuse-panel__content--transitioning" : ""}`);
|
|
2297
2297
|
}), e.legacy_pre_effect(() => e.get(a), () => {
|
|
2298
|
-
e.get(a) &&
|
|
2298
|
+
e.get(a) && et(e.get(a));
|
|
2299
2299
|
}), e.legacy_pre_effect(() => (e.get(Z), Jt), () => {
|
|
2300
2300
|
(e.get(Z) === "code" || e.get(Z) === "split") && Jt().then(() => Ia());
|
|
2301
2301
|
}), e.legacy_pre_effect(() => (e.get(Z), Jt), () => {
|
|
@@ -2306,27 +2306,27 @@ function Tl(Ve, c) {
|
|
|
2306
2306
|
var kr = e.comment(), Gr = e.first_child(kr);
|
|
2307
2307
|
{
|
|
2308
2308
|
var es = (r) => {
|
|
2309
|
-
var
|
|
2309
|
+
var S = e.comment(), ze = e.first_child(S);
|
|
2310
2310
|
{
|
|
2311
|
-
var Ne = (
|
|
2312
|
-
var
|
|
2311
|
+
var Ne = (vt) => {
|
|
2312
|
+
var Ke = hn(), st = e.child(Ke);
|
|
2313
2313
|
{
|
|
2314
|
-
var
|
|
2315
|
-
var
|
|
2316
|
-
e.event("mousedown",
|
|
2314
|
+
var it = (je) => {
|
|
2315
|
+
var mt = pn();
|
|
2316
|
+
e.event("mousedown", mt, e.preventDefault(Qa)), e.append(je, mt);
|
|
2317
2317
|
};
|
|
2318
|
-
e.if(
|
|
2319
|
-
e.get(se) || je(
|
|
2318
|
+
e.if(st, (je) => {
|
|
2319
|
+
e.get(se) || je(it);
|
|
2320
2320
|
});
|
|
2321
2321
|
}
|
|
2322
|
-
var
|
|
2322
|
+
var gt = e.sibling(st, 2), dt = e.child(gt), Ye = e.child(dt), Yt = e.child(Ye);
|
|
2323
2323
|
{
|
|
2324
2324
|
var $a = (je) => {
|
|
2325
|
-
var
|
|
2326
|
-
e.append(je,
|
|
2325
|
+
var mt = fn();
|
|
2326
|
+
e.append(je, mt);
|
|
2327
2327
|
}, It = (je) => {
|
|
2328
|
-
var
|
|
2329
|
-
e.append(je,
|
|
2328
|
+
var mt = gn();
|
|
2329
|
+
e.append(je, mt);
|
|
2330
2330
|
};
|
|
2331
2331
|
e.if(Yt, (je) => {
|
|
2332
2332
|
h(), e.untrack(() => h().forceEmptyView) ? je($a) : je(It, !1);
|
|
@@ -2334,30 +2334,30 @@ function Tl(Ve, c) {
|
|
|
2334
2334
|
}
|
|
2335
2335
|
e.reset(Ye);
|
|
2336
2336
|
var zt = e.sibling(Ye, 2), Qt = e.child(zt), Nt = e.child(Qt, !0);
|
|
2337
|
-
e.reset(Qt), e.reset(zt), e.reset(
|
|
2338
|
-
var jt = e.sibling(
|
|
2339
|
-
e.reset(jt), e.reset(
|
|
2340
|
-
var
|
|
2337
|
+
e.reset(Qt), e.reset(zt), e.reset(dt);
|
|
2338
|
+
var jt = e.sibling(dt, 2), Gt = e.child(jt);
|
|
2339
|
+
e.reset(jt), e.reset(gt);
|
|
2340
|
+
var yt = e.sibling(gt, 2), Ft = e.sibling(e.child(yt), 2), ea = e.child(Ft, !0);
|
|
2341
2341
|
e.reset(Ft);
|
|
2342
2342
|
var ua = e.sibling(Ft, 2), va = e.child(ua, !0);
|
|
2343
|
-
e.reset(ua), e.reset(
|
|
2344
|
-
var ta = e.sibling(
|
|
2343
|
+
e.reset(ua), e.reset(yt);
|
|
2344
|
+
var ta = e.sibling(yt, 2), aa = e.child(ta);
|
|
2345
2345
|
{
|
|
2346
2346
|
var da = (je) => {
|
|
2347
|
-
var
|
|
2348
|
-
e.append(je,
|
|
2347
|
+
var mt = mn();
|
|
2348
|
+
e.append(je, mt);
|
|
2349
2349
|
};
|
|
2350
2350
|
e.if(aa, (je) => {
|
|
2351
2351
|
e.get(xe) && je(da);
|
|
2352
2352
|
});
|
|
2353
2353
|
}
|
|
2354
|
-
e.reset(ta), e.reset(
|
|
2355
|
-
e.set_class(
|
|
2356
|
-
}), e.event("click", Gt, ne), e.append(
|
|
2357
|
-
},
|
|
2358
|
-
var
|
|
2354
|
+
e.reset(ta), e.reset(Ke), e.template_effect(() => {
|
|
2355
|
+
e.set_class(Ke, 1, e.clsx(e.get(ot))), e.set_style(Ke, e.get(se) ? void 0 : `width: ${e.get(he)}%`), e.set_text(Nt, (h(), e.untrack(() => h().forceEmptyView ? "Artifact Viewer" : "Artifacts"))), e.set_text(ea, (h(), e.untrack(() => h().forceEmptyView ? "No artifact selected" : "No artifacts yet"))), e.set_text(va, (h(), e.untrack(() => h().forceEmptyView ? "Open an artifact to have it appear here" : "Code blocks, forms, and other interactive content will appear here as the AI generates them.")));
|
|
2356
|
+
}), e.event("click", Gt, ne), e.append(vt, Ke);
|
|
2357
|
+
}, ct = (vt) => {
|
|
2358
|
+
var Ke = e.comment(), st = e.first_child(Ke);
|
|
2359
2359
|
{
|
|
2360
|
-
var
|
|
2360
|
+
var it = (dt) => {
|
|
2361
2361
|
var Ye = Cn(), Yt = e.child(Ye);
|
|
2362
2362
|
{
|
|
2363
2363
|
var $a = (We) => {
|
|
@@ -2370,9 +2370,9 @@ function Tl(Ve, c) {
|
|
|
2370
2370
|
}
|
|
2371
2371
|
var It = e.sibling(Yt, 2), zt = e.child(It), Qt = e.sibling(e.child(zt), 2), Nt = e.sibling(e.child(Qt), 2), jt = e.child(Nt);
|
|
2372
2372
|
e.reset(Nt), e.reset(Qt), e.reset(zt);
|
|
2373
|
-
var Gt = e.sibling(zt, 2),
|
|
2373
|
+
var Gt = e.sibling(zt, 2), yt = e.child(Gt);
|
|
2374
2374
|
let Ft;
|
|
2375
|
-
var ea = e.child(
|
|
2375
|
+
var ea = e.child(yt);
|
|
2376
2376
|
{
|
|
2377
2377
|
var ua = (We) => {
|
|
2378
2378
|
var Oe = kn();
|
|
@@ -2385,8 +2385,8 @@ function Tl(Ve, c) {
|
|
|
2385
2385
|
e.get(ge) ? We(va, !1) : We(ua);
|
|
2386
2386
|
});
|
|
2387
2387
|
}
|
|
2388
|
-
e.reset(
|
|
2389
|
-
var ta = e.sibling(
|
|
2388
|
+
e.reset(yt);
|
|
2389
|
+
var ta = e.sibling(yt, 2);
|
|
2390
2390
|
e.reset(Gt), e.reset(It);
|
|
2391
2391
|
var aa = e.sibling(It, 2), da = e.child(aa);
|
|
2392
2392
|
e.each(da, 7, () => e.get(q), (We) => We.id, (We, Oe) => {
|
|
@@ -2413,22 +2413,22 @@ function Tl(Ve, c) {
|
|
|
2413
2413
|
]
|
|
2414
2414
|
), e.event("click", ra, () => mr(e.get(Oe))), e.append(We, ra);
|
|
2415
2415
|
}), e.reset(da), e.reset(aa);
|
|
2416
|
-
var je = e.sibling(aa, 2),
|
|
2416
|
+
var je = e.sibling(aa, 2), mt = e.child(je);
|
|
2417
2417
|
{
|
|
2418
2418
|
var ar = (We) => {
|
|
2419
2419
|
var Oe = wn();
|
|
2420
2420
|
e.append(We, Oe);
|
|
2421
2421
|
};
|
|
2422
|
-
e.if(
|
|
2422
|
+
e.if(mt, (We) => {
|
|
2423
2423
|
e.get(xe) && We(ar);
|
|
2424
2424
|
});
|
|
2425
2425
|
}
|
|
2426
2426
|
e.reset(je), e.reset(Ye), e.template_effect(() => {
|
|
2427
|
-
e.set_class(Ye, 1, e.clsx(e.get(
|
|
2427
|
+
e.set_class(Ye, 1, e.clsx(e.get(ot))), e.set_style(Ye, e.get(se) ? void 0 : `width: ${e.get(he)}%`), e.set_text(jt, `${e.get(q), e.untrack(() => e.get(q).length) ?? ""} available`), Ft = e.set_class(yt, 1, "artifactuse-panel__action", null, Ft, {
|
|
2428
2428
|
"artifactuse-panel__action--loading": e.get(ge)
|
|
2429
|
-
}),
|
|
2430
|
-
}), e.event("click",
|
|
2431
|
-
},
|
|
2429
|
+
}), yt.disabled = e.get(ge);
|
|
2430
|
+
}), e.event("click", yt, Ur), e.event("click", ta, ne), e.append(dt, Ye);
|
|
2431
|
+
}, gt = (dt) => {
|
|
2432
2432
|
var Ye = gl(), Yt = e.child(Ye);
|
|
2433
2433
|
{
|
|
2434
2434
|
var $a = (o) => {
|
|
@@ -2443,14 +2443,14 @@ function Tl(Ve, c) {
|
|
|
2443
2443
|
{
|
|
2444
2444
|
var Qt = (o) => {
|
|
2445
2445
|
var p = Pn();
|
|
2446
|
-
e.template_effect(() => e.set_attribute(p, "title", e.get(te) ? "Browse artifacts" : "Back to list")), e.event("click", p,
|
|
2446
|
+
e.template_effect(() => e.set_attribute(p, "title", e.get(te) ? "Browse artifacts" : "Back to list")), e.event("click", p, rt), e.append(o, p);
|
|
2447
2447
|
};
|
|
2448
2448
|
e.if(zt, (o) => {
|
|
2449
2449
|
(e.get(te) || e.get(ke)) && o(Qt);
|
|
2450
2450
|
});
|
|
2451
2451
|
}
|
|
2452
|
-
var Nt = e.sibling(zt, 2), jt = e.child(Nt), Gt = e.child(jt),
|
|
2453
|
-
e.html(
|
|
2452
|
+
var Nt = e.sibling(zt, 2), jt = e.child(Nt), Gt = e.child(jt), yt = e.child(Gt);
|
|
2453
|
+
e.html(yt, () => e.get(C) || "", !0), e.reset(Gt), e.reset(jt);
|
|
2454
2454
|
var Ft = e.sibling(jt, 2), ea = e.child(Ft), ua = e.child(ea, !0);
|
|
2455
2455
|
e.reset(ea);
|
|
2456
2456
|
var va = e.sibling(ea, 2), ta = e.child(va), aa = e.sibling(ta);
|
|
@@ -2464,7 +2464,7 @@ function Tl(Ve, c) {
|
|
|
2464
2464
|
});
|
|
2465
2465
|
}
|
|
2466
2466
|
e.reset(va), e.reset(Ft), e.reset(Nt);
|
|
2467
|
-
var je = e.sibling(Nt, 2),
|
|
2467
|
+
var je = e.sibling(Nt, 2), mt = e.child(je);
|
|
2468
2468
|
{
|
|
2469
2469
|
var ar = (o) => {
|
|
2470
2470
|
var p = An();
|
|
@@ -2475,11 +2475,11 @@ function Tl(Ve, c) {
|
|
|
2475
2475
|
}), p.disabled = (e.get(a), e.untrack(() => !e.get(a).isPreviewable));
|
|
2476
2476
|
}), e.event("click", p, () => be("preview")), e.append(o, p);
|
|
2477
2477
|
};
|
|
2478
|
-
e.if(
|
|
2478
|
+
e.if(mt, (o) => {
|
|
2479
2479
|
e.get(a), e.untrack(() => !e.get(a).tabs || e.get(a).tabs.includes("preview")) && o(ar);
|
|
2480
2480
|
});
|
|
2481
2481
|
}
|
|
2482
|
-
var We = e.sibling(
|
|
2482
|
+
var We = e.sibling(mt, 2);
|
|
2483
2483
|
{
|
|
2484
2484
|
var Oe = (o) => {
|
|
2485
2485
|
var p = En();
|
|
@@ -2493,7 +2493,7 @@ function Tl(Ve, c) {
|
|
|
2493
2493
|
var ra = e.sibling(We, 2);
|
|
2494
2494
|
{
|
|
2495
2495
|
var Pa = (o) => {
|
|
2496
|
-
var p =
|
|
2496
|
+
var p = Ln();
|
|
2497
2497
|
let ye;
|
|
2498
2498
|
e.template_effect(() => {
|
|
2499
2499
|
ye = e.set_class(p, 1, "artifactuse-panel__tab", null, ye, {
|
|
@@ -2508,7 +2508,7 @@ function Tl(Ve, c) {
|
|
|
2508
2508
|
var rr = e.sibling(ra, 2);
|
|
2509
2509
|
{
|
|
2510
2510
|
var qa = (o) => {
|
|
2511
|
-
var p =
|
|
2511
|
+
var p = Tn();
|
|
2512
2512
|
let ye;
|
|
2513
2513
|
e.template_effect(() => ye = e.set_class(p, 1, "artifactuse-panel__tab", null, ye, { "artifactuse-panel__tab--active": e.get(Z) === "edit" })), e.event("click", p, () => be("edit")), e.append(o, p);
|
|
2514
2514
|
};
|
|
@@ -2520,7 +2520,7 @@ function Tl(Ve, c) {
|
|
|
2520
2520
|
var _a = e.sibling(je, 2), Da = e.child(_a);
|
|
2521
2521
|
{
|
|
2522
2522
|
var Ra = (o) => {
|
|
2523
|
-
var p =
|
|
2523
|
+
var p = Sn();
|
|
2524
2524
|
e.event("click", p, Kt), e.append(o, p);
|
|
2525
2525
|
};
|
|
2526
2526
|
e.if(Da, (o) => {
|
|
@@ -2531,7 +2531,7 @@ function Tl(Ve, c) {
|
|
|
2531
2531
|
{
|
|
2532
2532
|
var sr = (o) => {
|
|
2533
2533
|
var p = Mn();
|
|
2534
|
-
e.event("click", p,
|
|
2534
|
+
e.event("click", p, Lt), e.append(o, p);
|
|
2535
2535
|
};
|
|
2536
2536
|
e.if(Aa, (o) => {
|
|
2537
2537
|
e.get(ve) && o(sr);
|
|
@@ -2557,20 +2557,20 @@ function Tl(Ve, c) {
|
|
|
2557
2557
|
{
|
|
2558
2558
|
var rs = (o) => {
|
|
2559
2559
|
var p = zn(), ye = e.child(p);
|
|
2560
|
-
e.each(ye, 5, () => e.get(Re), (Qe) => Qe.id, (Qe,
|
|
2561
|
-
var
|
|
2562
|
-
let
|
|
2563
|
-
var Ue = e.child(
|
|
2564
|
-
e.html(Fe, () => (e.get(
|
|
2565
|
-
var
|
|
2566
|
-
e.reset(
|
|
2567
|
-
var
|
|
2568
|
-
e.reset(
|
|
2569
|
-
var
|
|
2570
|
-
|
|
2571
|
-
"artifactuse-panel__file-tab--active": e.get(
|
|
2572
|
-
}), e.set_text(
|
|
2573
|
-
}), e.event("click",
|
|
2560
|
+
e.each(ye, 5, () => e.get(Re), (Qe) => Qe.id, (Qe, Ge) => {
|
|
2561
|
+
var ut = In();
|
|
2562
|
+
let nt;
|
|
2563
|
+
var Ue = e.child(ut), Fe = e.child(Ue);
|
|
2564
|
+
e.html(Fe, () => (e.get(Ge), e.untrack(() => Xt(e.get(Ge).language)))), e.reset(Ue);
|
|
2565
|
+
var tt = e.sibling(Ue, 2), ht = e.child(tt, !0);
|
|
2566
|
+
e.reset(tt);
|
|
2567
|
+
var Pt = e.sibling(tt, 2);
|
|
2568
|
+
e.reset(ut), e.template_effect(() => {
|
|
2569
|
+
var xt;
|
|
2570
|
+
nt = e.set_class(ut, 1, "artifactuse-panel__file-tab", null, nt, {
|
|
2571
|
+
"artifactuse-panel__file-tab--active": e.get(Ge).id === ((xt = e.get(a)) == null ? void 0 : xt.id)
|
|
2572
|
+
}), e.set_text(ht, (e.get(Ge), e.untrack(() => e.get(Ge).title || "Untitled")));
|
|
2573
|
+
}), e.event("click", Pt, e.stopPropagation(() => $t(e.get(Ge).id))), e.event("keydown", Pt, e.stopPropagation((xt) => xt.key === "Enter" && $t(e.get(Ge).id))), e.event("click", ut, () => oa(e.get(Ge))), e.append(Qe, ut);
|
|
2574
2574
|
}), e.reset(ye), e.reset(p), e.append(o, p);
|
|
2575
2575
|
};
|
|
2576
2576
|
e.if(wr, (o) => {
|
|
@@ -2600,23 +2600,23 @@ function Tl(Ve, c) {
|
|
|
2600
2600
|
e.get(G) && e.get(f) && Ue(Qe);
|
|
2601
2601
|
});
|
|
2602
2602
|
}
|
|
2603
|
-
var
|
|
2603
|
+
var Ge = e.sibling(ye, 2);
|
|
2604
2604
|
{
|
|
2605
|
-
var
|
|
2605
|
+
var ut = (Ue) => {
|
|
2606
2606
|
var Fe = qn();
|
|
2607
|
-
let
|
|
2608
|
-
e.bind_this(Fe, (
|
|
2609
|
-
e.set_attribute(Fe, "src", e.get(f)),
|
|
2607
|
+
let tt;
|
|
2608
|
+
e.bind_this(Fe, (ht) => e.set(g, ht), () => e.get(g)), e.template_effect(() => {
|
|
2609
|
+
e.set_attribute(Fe, "src", e.get(f)), tt = e.set_class(Fe, 1, "artifactuse-panel__iframe", null, tt, { "artifactuse-panel__iframe--loading": e.get(G) });
|
|
2610
2610
|
}), e.event("load", Fe, Ut), e.event("error", Fe, Ka), e.append(Ue, Fe);
|
|
2611
|
-
},
|
|
2612
|
-
var Fe = Dn(),
|
|
2613
|
-
e.reset(
|
|
2611
|
+
}, nt = (Ue) => {
|
|
2612
|
+
var Fe = Dn(), tt = e.sibling(e.child(Fe), 2), ht = e.child(tt);
|
|
2613
|
+
e.reset(tt), e.reset(Fe), e.template_effect(() => e.set_text(ht, `Preview not available for ${e.get(Se) ?? ""}`)), e.append(Ue, Fe);
|
|
2614
2614
|
};
|
|
2615
|
-
e.if(
|
|
2616
|
-
e.get(f) ? Ue(
|
|
2615
|
+
e.if(Ge, (Ue) => {
|
|
2616
|
+
e.get(f) ? Ue(ut) : Ue(nt, !1);
|
|
2617
2617
|
});
|
|
2618
2618
|
}
|
|
2619
|
-
e.reset(p), e.template_effect(() => e.set_style(p, e.get(Z) === "split" ? `width: ${e.get(
|
|
2619
|
+
e.reset(p), e.template_effect(() => e.set_style(p, e.get(Z) === "split" ? `width: ${e.get(L)}%` : void 0)), e.append(o, p);
|
|
2620
2620
|
};
|
|
2621
2621
|
e.if($r, (o) => {
|
|
2622
2622
|
(e.get(Z) === "preview" || e.get(Z) === "split") && o(is);
|
|
@@ -2638,50 +2638,50 @@ function Tl(Ve, c) {
|
|
|
2638
2638
|
e.bind_this(Er, (o) => e.set(N, o), () => e.get(N)), e.reset(nr), e.reset(ir), e.bind_this(ir, (o) => e.set(R, o), () => e.get(R)), e.reset(Ua);
|
|
2639
2639
|
var lr = e.sibling(Ua, 2), ls = e.child(lr);
|
|
2640
2640
|
e.bind_this(ls, (o) => e.set(n, o), () => e.get(n)), e.reset(lr), e.reset(Ea), e.bind_this(Ea, (o) => e.set(re, o), () => e.get(re));
|
|
2641
|
-
var
|
|
2641
|
+
var Lr = e.sibling(Ea, 2);
|
|
2642
2642
|
{
|
|
2643
2643
|
var os = (o) => {
|
|
2644
|
-
var p = Zn(), ye = e.child(p), Qe = e.sibling(e.child(ye), 4),
|
|
2644
|
+
var p = Zn(), ye = e.child(p), Qe = e.sibling(e.child(ye), 4), Ge = e.child(Qe);
|
|
2645
2645
|
{
|
|
2646
|
-
var
|
|
2646
|
+
var ut = (pe) => {
|
|
2647
2647
|
var ie = Un(), Be = e.child(ie);
|
|
2648
2648
|
e.reset(ie), e.template_effect(
|
|
2649
|
-
(
|
|
2650
|
-
e.set_class(ie, 1, `artifactuse-panel__console-filter artifactuse-panel__console-filter--error ${
|
|
2649
|
+
(Xe) => {
|
|
2650
|
+
e.set_class(ie, 1, `artifactuse-panel__console-filter artifactuse-panel__console-filter--error ${Xe ?? ""}`), e.set_text(Be, `${e.get(Ce) ?? ""} error${e.get(Ce) !== 1 ? "s" : ""}`);
|
|
2651
2651
|
},
|
|
2652
2652
|
[
|
|
2653
2653
|
() => (e.get(E), e.untrack(() => e.get(E).has("error") ? "" : "artifactuse-panel__console-filter--inactive"))
|
|
2654
2654
|
]
|
|
2655
2655
|
), e.event("click", ie, () => Va("error")), e.append(pe, ie);
|
|
2656
2656
|
};
|
|
2657
|
-
e.if(
|
|
2658
|
-
e.get(Ce) > 0 && pe(
|
|
2657
|
+
e.if(Ge, (pe) => {
|
|
2658
|
+
e.get(Ce) > 0 && pe(ut);
|
|
2659
2659
|
});
|
|
2660
2660
|
}
|
|
2661
|
-
var
|
|
2661
|
+
var nt = e.sibling(Ge, 2);
|
|
2662
2662
|
{
|
|
2663
2663
|
var Ue = (pe) => {
|
|
2664
2664
|
var ie = Nn(), Be = e.child(ie);
|
|
2665
2665
|
e.reset(ie), e.template_effect(
|
|
2666
|
-
(
|
|
2667
|
-
e.set_class(ie, 1, `artifactuse-panel__console-filter artifactuse-panel__console-filter--warn ${
|
|
2666
|
+
(Xe) => {
|
|
2667
|
+
e.set_class(ie, 1, `artifactuse-panel__console-filter artifactuse-panel__console-filter--warn ${Xe ?? ""}`), e.set_text(Be, `${e.get(De) ?? ""} warn`);
|
|
2668
2668
|
},
|
|
2669
2669
|
[
|
|
2670
2670
|
() => (e.get(E), e.untrack(() => e.get(E).has("warn") ? "" : "artifactuse-panel__console-filter--inactive"))
|
|
2671
2671
|
]
|
|
2672
2672
|
), e.event("click", ie, () => Va("warn")), e.append(pe, ie);
|
|
2673
2673
|
};
|
|
2674
|
-
e.if(
|
|
2674
|
+
e.if(nt, (pe) => {
|
|
2675
2675
|
e.get(De) > 0 && pe(Ue);
|
|
2676
2676
|
});
|
|
2677
2677
|
}
|
|
2678
|
-
var Fe = e.sibling(
|
|
2678
|
+
var Fe = e.sibling(nt, 2);
|
|
2679
2679
|
{
|
|
2680
|
-
var
|
|
2680
|
+
var tt = (pe) => {
|
|
2681
2681
|
var ie = jn(), Be = e.child(ie);
|
|
2682
2682
|
e.reset(ie), e.template_effect(
|
|
2683
|
-
(
|
|
2684
|
-
e.set_class(ie, 1, `artifactuse-panel__console-filter artifactuse-panel__console-filter--info ${
|
|
2683
|
+
(Xe) => {
|
|
2684
|
+
e.set_class(ie, 1, `artifactuse-panel__console-filter artifactuse-panel__console-filter--info ${Xe ?? ""}`), e.set_text(Be, `${e.get(Je) ?? ""} info`);
|
|
2685
2685
|
},
|
|
2686
2686
|
[
|
|
2687
2687
|
() => (e.get(E), e.untrack(() => e.get(E).has("info") ? "" : "artifactuse-panel__console-filter--inactive"))
|
|
@@ -2689,74 +2689,74 @@ function Tl(Ve, c) {
|
|
|
2689
2689
|
), e.event("click", ie, () => Va("info")), e.append(pe, ie);
|
|
2690
2690
|
};
|
|
2691
2691
|
e.if(Fe, (pe) => {
|
|
2692
|
-
e.get(Je) > 0 && pe(
|
|
2692
|
+
e.get(Je) > 0 && pe(tt);
|
|
2693
2693
|
});
|
|
2694
2694
|
}
|
|
2695
|
-
var
|
|
2695
|
+
var ht = e.sibling(Fe, 2);
|
|
2696
2696
|
{
|
|
2697
|
-
var
|
|
2697
|
+
var Pt = (pe) => {
|
|
2698
2698
|
var ie = Wn(), Be = e.child(ie);
|
|
2699
2699
|
e.reset(ie), e.template_effect(
|
|
2700
|
-
(
|
|
2701
|
-
e.set_class(ie, 1, `artifactuse-panel__console-filter artifactuse-panel__console-filter--log ${
|
|
2700
|
+
(Xe) => {
|
|
2701
|
+
e.set_class(ie, 1, `artifactuse-panel__console-filter artifactuse-panel__console-filter--log ${Xe ?? ""}`), e.set_text(Be, `${e.get(Ze) ?? ""} log`);
|
|
2702
2702
|
},
|
|
2703
2703
|
[
|
|
2704
2704
|
() => (e.get(E), e.untrack(() => e.get(E).has("log") ? "" : "artifactuse-panel__console-filter--inactive"))
|
|
2705
2705
|
]
|
|
2706
2706
|
), e.event("click", ie, () => Va("log")), e.append(pe, ie);
|
|
2707
2707
|
};
|
|
2708
|
-
e.if(
|
|
2709
|
-
e.get(
|
|
2708
|
+
e.if(ht, (pe) => {
|
|
2709
|
+
e.get(Ze) > 0 && pe(Pt);
|
|
2710
2710
|
});
|
|
2711
2711
|
}
|
|
2712
2712
|
e.reset(Qe);
|
|
2713
|
-
var
|
|
2713
|
+
var xt = e.sibling(Qe, 2);
|
|
2714
2714
|
e.reset(ye);
|
|
2715
|
-
var
|
|
2715
|
+
var La = e.sibling(ye, 2);
|
|
2716
2716
|
{
|
|
2717
|
-
var
|
|
2717
|
+
var Ta = (pe) => {
|
|
2718
2718
|
var ie = Xn();
|
|
2719
|
-
e.each(ie, 5, () => e.get($e), e.index, (Be,
|
|
2720
|
-
var
|
|
2721
|
-
e.reset(
|
|
2722
|
-
var
|
|
2723
|
-
e.reset(
|
|
2724
|
-
var
|
|
2725
|
-
e.reset(
|
|
2726
|
-
(
|
|
2727
|
-
e.set_class(
|
|
2719
|
+
e.each(ie, 5, () => e.get($e), e.index, (Be, Xe) => {
|
|
2720
|
+
var wt = Jn(), bt = e.child(wt), Ct = e.child(bt);
|
|
2721
|
+
e.reset(bt);
|
|
2722
|
+
var At = e.sibling(bt, 2), Tt = e.child(At, !0);
|
|
2723
|
+
e.reset(At);
|
|
2724
|
+
var St = e.sibling(At, 2), kt = e.child(St, !0);
|
|
2725
|
+
e.reset(St), e.reset(wt), e.template_effect(
|
|
2726
|
+
(_t) => {
|
|
2727
|
+
e.set_class(wt, 1, `artifactuse-panel__console-entry artifactuse-panel__console-entry--${e.get(Xe), e.untrack(() => e.get(Xe).type) ?? ""}`), e.set_text(Ct, `[${e.get(Xe), e.untrack(() => e.get(Xe).type) ?? ""}]`), e.set_text(Tt, (e.get(Xe), e.untrack(() => e.get(Xe).content))), e.set_text(kt, _t);
|
|
2728
2728
|
},
|
|
2729
2729
|
[
|
|
2730
|
-
() => (e.get(
|
|
2730
|
+
() => (e.get(Xe), e.untrack(() => new Date(e.get(Xe).timestamp).toLocaleTimeString()))
|
|
2731
2731
|
]
|
|
2732
|
-
), e.append(Be,
|
|
2732
|
+
), e.append(Be, wt);
|
|
2733
2733
|
}), e.reset(ie), e.bind_this(ie, (Be) => e.set(O, Be), () => e.get(O)), e.append(pe, ie);
|
|
2734
2734
|
};
|
|
2735
|
-
e.if(
|
|
2736
|
-
e.get(le) && pe(
|
|
2735
|
+
e.if(La, (pe) => {
|
|
2736
|
+
e.get(le) && pe(Ta);
|
|
2737
2737
|
});
|
|
2738
2738
|
}
|
|
2739
2739
|
e.reset(p), e.template_effect(() => e.set_class(p, 1, `artifactuse-panel__console ${e.get(le) ? "artifactuse-panel__console--expanded" : ""}`)), e.event("click", Qe, e.stopPropagation(function(pe) {
|
|
2740
2740
|
e.bubble_event.call(this, c, pe);
|
|
2741
|
-
})), e.event("click",
|
|
2741
|
+
})), e.event("click", xt, e.stopPropagation(() => e.set(V, []))), e.event("click", ye, () => e.set(le, !e.get(le))), e.event("keydown", ye, (pe) => {
|
|
2742
2742
|
(pe.key === "Enter" || pe.key === " ") && e.set(le, !e.get(le));
|
|
2743
2743
|
}), e.append(o, p);
|
|
2744
2744
|
};
|
|
2745
|
-
e.if(
|
|
2745
|
+
e.if(Lr, (o) => {
|
|
2746
2746
|
e.get(D) && o(os);
|
|
2747
2747
|
});
|
|
2748
2748
|
}
|
|
2749
|
-
var
|
|
2749
|
+
var Tr = e.sibling(Lr, 2), or = e.child(Tr), Sr = e.child(or);
|
|
2750
2750
|
{
|
|
2751
2751
|
var cs = (o) => {
|
|
2752
2752
|
var p = Kn();
|
|
2753
2753
|
e.append(o, p);
|
|
2754
2754
|
};
|
|
2755
|
-
e.if(
|
|
2755
|
+
e.if(Sr, (o) => {
|
|
2756
2756
|
e.get(xe) && o(cs);
|
|
2757
2757
|
});
|
|
2758
2758
|
}
|
|
2759
|
-
var us = e.sibling(
|
|
2759
|
+
var us = e.sibling(Sr, 2);
|
|
2760
2760
|
{
|
|
2761
2761
|
var vs = (o) => {
|
|
2762
2762
|
var p = Yn(), ye = e.child(p, !0);
|
|
@@ -2790,32 +2790,32 @@ function Tl(Ve, c) {
|
|
|
2790
2790
|
var fs = (o) => {
|
|
2791
2791
|
var p = dl(), ye = e.child(p), Qe = e.sibling(ye, 2);
|
|
2792
2792
|
{
|
|
2793
|
-
var
|
|
2794
|
-
var
|
|
2793
|
+
var Ge = (ut) => {
|
|
2794
|
+
var nt = vl(), Ue = e.child(nt), Fe = e.child(Ue), tt = e.child(Fe, !0);
|
|
2795
2795
|
e.reset(Fe);
|
|
2796
|
-
var
|
|
2796
|
+
var ht = e.sibling(Fe, 2);
|
|
2797
2797
|
e.reset(Ue);
|
|
2798
|
-
var
|
|
2798
|
+
var Pt = e.sibling(Ue, 2), xt = e.child(Pt);
|
|
2799
2799
|
{
|
|
2800
|
-
var
|
|
2800
|
+
var La = (pe) => {
|
|
2801
2801
|
var ie = el();
|
|
2802
2802
|
e.append(pe, ie);
|
|
2803
|
-
},
|
|
2803
|
+
}, Ta = (pe) => {
|
|
2804
2804
|
var ie = e.comment(), Be = e.first_child(ie);
|
|
2805
2805
|
{
|
|
2806
|
-
var
|
|
2807
|
-
var
|
|
2808
|
-
e.reset(
|
|
2809
|
-
var
|
|
2810
|
-
e.reset(
|
|
2811
|
-
},
|
|
2812
|
-
var
|
|
2806
|
+
var Xe = (bt) => {
|
|
2807
|
+
var Ct = tl(), At = e.child(Ct), Tt = e.child(At), St = e.child(Tt, !0);
|
|
2808
|
+
e.reset(Tt), e.reset(At);
|
|
2809
|
+
var kt = e.sibling(At, 2), _t = e.child(kt), Vt = e.sibling(_t, 2);
|
|
2810
|
+
e.reset(kt), e.reset(Ct), e.template_effect(() => e.set_text(St, e.get(A))), e.event("click", _t, () => e.set(v, "options")), e.event("click", Vt, Wr), e.append(bt, Ct);
|
|
2811
|
+
}, wt = (bt) => {
|
|
2812
|
+
var Ct = e.comment(), At = e.first_child(Ct);
|
|
2813
2813
|
{
|
|
2814
|
-
var
|
|
2815
|
-
var
|
|
2816
|
-
e.reset(
|
|
2817
|
-
},
|
|
2818
|
-
var
|
|
2814
|
+
var Tt = (kt) => {
|
|
2815
|
+
var _t = al(), Vt = e.child(_t), fa = e.sibling(Vt, 2), Sa = e.sibling(fa, 2);
|
|
2816
|
+
e.reset(_t), e.event("click", Vt, fr), e.event("click", fa, gr), e.event("click", Sa, Jr), e.append(kt, _t);
|
|
2817
|
+
}, St = (kt) => {
|
|
2818
|
+
var _t = e.comment(), Vt = e.first_child(_t);
|
|
2819
2819
|
{
|
|
2820
2820
|
var fa = (qt) => {
|
|
2821
2821
|
var Wt = ll(), Mt = e.child(Wt);
|
|
@@ -2835,10 +2835,10 @@ function Tl(Ve, c) {
|
|
|
2835
2835
|
var Ht;
|
|
2836
2836
|
return ((Ht = ha.project) == null ? void 0 : Ht.uuid) || ha.id;
|
|
2837
2837
|
}, (ha, Ht) => {
|
|
2838
|
-
var
|
|
2839
|
-
e.reset(
|
|
2840
|
-
var ja = e.sibling(
|
|
2841
|
-
e.reset(ja), e.reset(
|
|
2838
|
+
var pt = il(), Et = e.child(pt), ba = e.child(Et, !0);
|
|
2839
|
+
e.reset(Et);
|
|
2840
|
+
var ja = e.sibling(Et, 2), ur = e.child(ja, !0);
|
|
2841
|
+
e.reset(ja), e.reset(pt), e.template_effect(
|
|
2842
2842
|
(Wa) => {
|
|
2843
2843
|
e.set_text(ba, (e.get(Ht), e.untrack(() => {
|
|
2844
2844
|
var zr;
|
|
@@ -2851,7 +2851,7 @@ function Tl(Ve, c) {
|
|
|
2851
2851
|
return pr((Wa = e.get(Ht).project) == null ? void 0 : Wa.created_at);
|
|
2852
2852
|
}))
|
|
2853
2853
|
]
|
|
2854
|
-
), e.event("click",
|
|
2854
|
+
), e.event("click", pt, () => Xr(e.get(Ht))), e.append(ha, pt);
|
|
2855
2855
|
}), e.reset(na), e.append(Rt, na);
|
|
2856
2856
|
};
|
|
2857
2857
|
e.if(
|
|
@@ -2870,7 +2870,7 @@ function Tl(Ve, c) {
|
|
|
2870
2870
|
}
|
|
2871
2871
|
var Ba = e.sibling(Mt, 2);
|
|
2872
2872
|
e.reset(Wt), e.event("click", Ba, () => e.set(v, "options")), e.append(qt, Wt);
|
|
2873
|
-
},
|
|
2873
|
+
}, Sa = (qt) => {
|
|
2874
2874
|
var Wt = e.comment(), Mt = e.first_child(Wt);
|
|
2875
2875
|
{
|
|
2876
2876
|
var ga = (Ma) => {
|
|
@@ -2882,31 +2882,31 @@ function Tl(Ve, c) {
|
|
|
2882
2882
|
e.reset(ma), e.reset(Bt);
|
|
2883
2883
|
var Rt = e.sibling(Bt, 2);
|
|
2884
2884
|
{
|
|
2885
|
-
var na = (
|
|
2886
|
-
var
|
|
2887
|
-
e.reset(ba), e.reset(
|
|
2885
|
+
var na = (pt) => {
|
|
2886
|
+
var Et = ol(), ba = e.sibling(e.child(Et), 2), ja = e.child(ba);
|
|
2887
|
+
e.reset(ba), e.reset(Et), e.template_effect((ur) => e.set_text(ja, `Expires ${ur ?? ""}`), [
|
|
2888
2888
|
() => (e.get(P), e.untrack(() => pr(e.get(P))))
|
|
2889
|
-
]), e.append(
|
|
2889
|
+
]), e.append(pt, Et);
|
|
2890
2890
|
};
|
|
2891
|
-
e.if(Rt, (
|
|
2892
|
-
e.get(P) && !e.get(y) &&
|
|
2891
|
+
e.if(Rt, (pt) => {
|
|
2892
|
+
e.get(P) && !e.get(y) && pt(na);
|
|
2893
2893
|
});
|
|
2894
2894
|
}
|
|
2895
2895
|
var ha = e.sibling(Rt, 2);
|
|
2896
2896
|
{
|
|
2897
|
-
var Ht = (
|
|
2898
|
-
var
|
|
2899
|
-
e.reset(
|
|
2897
|
+
var Ht = (pt) => {
|
|
2898
|
+
var Et = cl(), ba = e.sibling(e.child(Et), 2);
|
|
2899
|
+
e.reset(Et), e.event("click", ba, gr), e.append(pt, Et);
|
|
2900
2900
|
};
|
|
2901
|
-
e.if(ha, (
|
|
2902
|
-
e.get(y) ||
|
|
2901
|
+
e.if(ha, (pt) => {
|
|
2902
|
+
e.get(y) || pt(Ht);
|
|
2903
2903
|
});
|
|
2904
2904
|
}
|
|
2905
2905
|
e.reset(Ba), e.template_effect(() => {
|
|
2906
2906
|
e.set_value(Dt, e.get(x)), Na = e.set_class(ma, 1, "artifactuse-share-popup__copy-btn", null, Na, {
|
|
2907
2907
|
"artifactuse-share-popup__copy-btn--copied": e.get(j)
|
|
2908
2908
|
}), e.set_text(cr, e.get(j) ? "Copied!" : "Copy");
|
|
2909
|
-
}), e.event("click", Dt, (
|
|
2909
|
+
}), e.event("click", Dt, (pt) => pt.target.select()), e.event("click", ma, Zr), e.append(Ma, Ba);
|
|
2910
2910
|
};
|
|
2911
2911
|
e.if(
|
|
2912
2912
|
Mt,
|
|
@@ -2921,124 +2921,124 @@ function Tl(Ve, c) {
|
|
|
2921
2921
|
e.if(
|
|
2922
2922
|
Vt,
|
|
2923
2923
|
(qt) => {
|
|
2924
|
-
e.get(v) === "update-list" ? qt(fa) : qt(
|
|
2924
|
+
e.get(v) === "update-list" ? qt(fa) : qt(Sa, !1);
|
|
2925
2925
|
},
|
|
2926
2926
|
!0
|
|
2927
2927
|
);
|
|
2928
2928
|
}
|
|
2929
|
-
e.append(
|
|
2929
|
+
e.append(kt, _t);
|
|
2930
2930
|
};
|
|
2931
2931
|
e.if(
|
|
2932
|
-
|
|
2933
|
-
(
|
|
2934
|
-
e.get(v) === "options" ?
|
|
2932
|
+
At,
|
|
2933
|
+
(kt) => {
|
|
2934
|
+
e.get(v) === "options" ? kt(Tt) : kt(St, !1);
|
|
2935
2935
|
},
|
|
2936
2936
|
!0
|
|
2937
2937
|
);
|
|
2938
2938
|
}
|
|
2939
|
-
e.append(
|
|
2939
|
+
e.append(bt, Ct);
|
|
2940
2940
|
};
|
|
2941
2941
|
e.if(
|
|
2942
2942
|
Be,
|
|
2943
|
-
(
|
|
2944
|
-
e.get(v) === "error" ?
|
|
2943
|
+
(bt) => {
|
|
2944
|
+
e.get(v) === "error" ? bt(Xe) : bt(wt, !1);
|
|
2945
2945
|
},
|
|
2946
2946
|
!0
|
|
2947
2947
|
);
|
|
2948
2948
|
}
|
|
2949
2949
|
e.append(pe, ie);
|
|
2950
2950
|
};
|
|
2951
|
-
e.if(
|
|
2952
|
-
e.get(v) === "loading" ? pe(
|
|
2951
|
+
e.if(xt, (pe) => {
|
|
2952
|
+
e.get(v) === "loading" ? pe(La) : pe(Ta, !1);
|
|
2953
2953
|
});
|
|
2954
2954
|
}
|
|
2955
|
-
e.reset(
|
|
2955
|
+
e.reset(Pt), e.next(2), e.reset(nt), e.template_effect(() => e.set_text(tt, e.get(v) === "success" ? e.get(J) ? "Artifact updated!" : "Link created!" : e.get(v) === "update-list" ? "Update saved artifact" : "Share Artifact")), e.event("click", ht, jr), e.transition(3, nt, () => qr, () => ({ duration: 150 })), e.append(ut, nt);
|
|
2956
2956
|
};
|
|
2957
|
-
e.if(Qe, (
|
|
2958
|
-
e.get(Q) &&
|
|
2957
|
+
e.if(Qe, (ut) => {
|
|
2958
|
+
e.get(Q) && ut(Ge);
|
|
2959
2959
|
});
|
|
2960
2960
|
}
|
|
2961
2961
|
e.reset(p), e.event("click", ye, Nr), e.append(o, p);
|
|
2962
2962
|
};
|
|
2963
2963
|
e.if(Ir, (o) => {
|
|
2964
|
-
e.get(
|
|
2964
|
+
e.get(lt) && o(fs);
|
|
2965
2965
|
});
|
|
2966
2966
|
}
|
|
2967
2967
|
var gs = e.sibling(Ir, 2);
|
|
2968
2968
|
{
|
|
2969
2969
|
var ms = (o) => {
|
|
2970
|
-
var p = fl(), ye = e.child(p), Qe = e.sibling(ye, 2),
|
|
2971
|
-
e.reset(
|
|
2972
|
-
var
|
|
2970
|
+
var p = fl(), ye = e.child(p), Qe = e.sibling(ye, 2), Ge = e.child(Qe), ut = e.child(Ge);
|
|
2971
|
+
e.reset(Ge), e.next(2), e.reset(Qe);
|
|
2972
|
+
var nt = e.sibling(Qe, 2), Ue = e.sibling(nt, 2);
|
|
2973
2973
|
{
|
|
2974
|
-
var Fe = (
|
|
2975
|
-
var
|
|
2976
|
-
e.reset(
|
|
2977
|
-
var
|
|
2978
|
-
e.reset(
|
|
2979
|
-
var pe = e.sibling(
|
|
2980
|
-
e.each(pe, 7, () => e.get(q), (ie) => ie.id, (ie, Be,
|
|
2981
|
-
var
|
|
2982
|
-
let
|
|
2983
|
-
var
|
|
2984
|
-
e.html(
|
|
2985
|
-
var
|
|
2986
|
-
e.reset(
|
|
2987
|
-
var
|
|
2974
|
+
var Fe = (tt) => {
|
|
2975
|
+
var ht = pl(), Pt = e.child(ht), xt = e.child(Pt), La = e.child(xt);
|
|
2976
|
+
e.reset(xt);
|
|
2977
|
+
var Ta = e.sibling(xt, 2);
|
|
2978
|
+
e.reset(Pt);
|
|
2979
|
+
var pe = e.sibling(Pt, 2);
|
|
2980
|
+
e.each(pe, 7, () => e.get(q), (ie) => ie.id, (ie, Be, Xe) => {
|
|
2981
|
+
var wt = _l();
|
|
2982
|
+
let bt;
|
|
2983
|
+
var Ct = e.child(wt), At = e.child(Ct);
|
|
2984
|
+
e.html(At, () => (e.get(Be), e.untrack(() => Xt(e.get(Be).language)))), e.reset(Ct);
|
|
2985
|
+
var Tt = e.sibling(Ct, 2), St = e.child(Tt), kt = e.child(St, !0);
|
|
2986
|
+
e.reset(St);
|
|
2987
|
+
var _t = e.sibling(St, 2), Vt = e.child(_t), fa = e.sibling(Vt);
|
|
2988
2988
|
{
|
|
2989
|
-
var
|
|
2989
|
+
var Sa = (Mt) => {
|
|
2990
2990
|
var ga = e.text();
|
|
2991
2991
|
e.template_effect(() => e.set_text(ga, `• ${e.get(Be), e.untrack(() => e.get(Be).lineCount) ?? ""} lines`)), e.append(Mt, ga);
|
|
2992
2992
|
};
|
|
2993
2993
|
e.if(fa, (Mt) => {
|
|
2994
|
-
e.get(Be), e.untrack(() => e.get(Be).lineCount) && Mt(
|
|
2994
|
+
e.get(Be), e.untrack(() => e.get(Be).lineCount) && Mt(Sa);
|
|
2995
2995
|
});
|
|
2996
2996
|
}
|
|
2997
|
-
e.reset(
|
|
2998
|
-
var qt = e.sibling(
|
|
2999
|
-
e.reset(qt), e.reset(
|
|
2997
|
+
e.reset(_t), e.reset(Tt);
|
|
2998
|
+
var qt = e.sibling(Tt, 2), Wt = e.child(qt, !0);
|
|
2999
|
+
e.reset(qt), e.reset(wt), e.template_effect(
|
|
3000
3000
|
(Mt) => {
|
|
3001
|
-
|
|
3001
|
+
bt = e.set_class(wt, 1, "artifactuse-panel__artifact-item", null, bt, {
|
|
3002
3002
|
"artifactuse-panel__artifact-item--active": e.get(Be).id === e.get(a).id
|
|
3003
|
-
}), e.set_text(
|
|
3003
|
+
}), e.set_text(kt, (e.get(Be), e.untrack(() => e.get(Be).title || "Untitled"))), e.set_text(Vt, `${Mt ?? ""} `), e.set_text(Wt, e.get(Xe) + 1);
|
|
3004
3004
|
},
|
|
3005
3005
|
[
|
|
3006
3006
|
() => (e.deep_read_state(la), e.get(Be), e.untrack(() => la(e.get(Be).language)))
|
|
3007
3007
|
]
|
|
3008
|
-
), e.event("click",
|
|
3009
|
-
}), e.reset(pe), e.reset(
|
|
3008
|
+
), e.event("click", wt, () => mr(e.get(Be))), e.append(ie, wt);
|
|
3009
|
+
}), e.reset(pe), e.reset(ht), e.template_effect(() => e.set_text(La, `All Artifacts (${e.get(q), e.untrack(() => e.get(q).length) ?? ""})`)), e.event("click", Ta, () => e.set(z, !1)), e.append(tt, ht);
|
|
3010
3010
|
};
|
|
3011
|
-
e.if(Ue, (
|
|
3012
|
-
e.get(z) &&
|
|
3011
|
+
e.if(Ue, (tt) => {
|
|
3012
|
+
e.get(z) && tt(Fe);
|
|
3013
3013
|
});
|
|
3014
3014
|
}
|
|
3015
3015
|
e.reset(p), e.template_effect(() => {
|
|
3016
|
-
ye.disabled = e.get(
|
|
3017
|
-
}), e.event("click", ye, Kr), e.event("click", Qe, () => e.set(z, !e.get(z))), e.event("click",
|
|
3016
|
+
ye.disabled = e.get(Te) <= 0, e.set_text(ut, `${e.get(Te) + 1} / ${e.get(q), e.untrack(() => e.get(q).length) ?? ""}`), nt.disabled = (e.get(Te), e.get(q), e.untrack(() => e.get(Te) >= e.get(q).length - 1));
|
|
3017
|
+
}), e.event("click", ye, Kr), e.event("click", Qe, () => e.set(z, !e.get(z))), e.event("click", nt, Yr), e.append(o, p);
|
|
3018
3018
|
};
|
|
3019
3019
|
e.if(gs, (o) => {
|
|
3020
3020
|
e.get(te), e.get(q), e.untrack(() => !e.get(te) && e.get(q).length > 1) && o(ms);
|
|
3021
3021
|
});
|
|
3022
3022
|
}
|
|
3023
|
-
e.reset(Mr), e.reset(
|
|
3024
|
-
e.set_class(Ye, 1, e.clsx(e.get(
|
|
3025
|
-
}), e.event("click", sa, Me), e.event("click", as, ne), e.event("click", pa, Rr), e.event("click", Hr, Or), e.append(
|
|
3023
|
+
e.reset(Mr), e.reset(Tr), e.reset(Ye), e.template_effect(() => {
|
|
3024
|
+
e.set_class(Ye, 1, e.clsx(e.get(ot))), e.set_style(Ye, e.get(se) ? void 0 : `width: ${e.get(U)}%`), e.set_text(ua, (e.get(a), e.untrack(() => e.get(a).title || "Untitled"))), e.set_text(ta, `${e.get(Se) ?? ""} `), e.set_attribute(sa, "title", e.get(se) ? "Exit fullscreen" : "Fullscreen"), e.set_class(Ea, 1, e.clsx(e.get(at))), e.set_style(Ua, e.get(Z) === "split" ? `width: ${100 - e.get(L)}%` : e.get(Z) === "code" ? "" : "display: none"), e.set_class(nr, 1, `artifactuse-panel__code-block language-${e.get(F) ?? ""}`), e.set_class(Er, 1, `language-${e.get(F) ?? ""}`), e.set_style(lr, e.get(Z) === "edit" ? "" : "display: none"), Br = e.set_class(pa, 1, "artifactuse-panel__footer-action", null, Br, { "artifactuse-panel__footer-action--success": e.get($) }), e.set_attribute(pa, "title", e.get($) ? "Copied!" : "Copy code");
|
|
3025
|
+
}), e.event("click", sa, Me), e.event("click", as, ne), e.event("click", pa, Rr), e.event("click", Hr, Or), e.append(dt, Ye);
|
|
3026
3026
|
};
|
|
3027
3027
|
e.if(
|
|
3028
|
-
|
|
3029
|
-
(
|
|
3030
|
-
e.get(a), h(), e.untrack(() => !e.get(a) && !h().forceEmptyView) ?
|
|
3028
|
+
st,
|
|
3029
|
+
(dt) => {
|
|
3030
|
+
e.get(a), h(), e.untrack(() => !e.get(a) && !h().forceEmptyView) ? dt(it) : dt(gt, !1);
|
|
3031
3031
|
},
|
|
3032
3032
|
!0
|
|
3033
3033
|
);
|
|
3034
3034
|
}
|
|
3035
|
-
e.append(
|
|
3035
|
+
e.append(vt, Ke);
|
|
3036
3036
|
};
|
|
3037
|
-
e.if(ze, (
|
|
3038
|
-
e.get(ue), h(), e.untrack(() => !e.get(ue) || h().forceEmptyView) ?
|
|
3037
|
+
e.if(ze, (vt) => {
|
|
3038
|
+
e.get(ue), h(), e.untrack(() => !e.get(ue) || h().forceEmptyView) ? vt(Ne) : vt(ct, !1);
|
|
3039
3039
|
});
|
|
3040
3040
|
}
|
|
3041
|
-
e.append(r,
|
|
3041
|
+
e.append(r, S);
|
|
3042
3042
|
};
|
|
3043
3043
|
e.if(Gr, (r) => {
|
|
3044
3044
|
e.get(we) && r(es);
|
|
@@ -3047,7 +3047,7 @@ function Tl(Ve, c) {
|
|
|
3047
3047
|
e.append(Ve, kr), e.pop(), d();
|
|
3048
3048
|
}
|
|
3049
3049
|
var ml = e.from_html('<span class="artifactuse-panel-toggle-badge"> </span>'), hl = e.from_html('<button><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polyline points="16 18 22 12 16 6"></polyline><polyline points="8 6 2 12 8 18"></polyline></svg> <!></button>');
|
|
3050
|
-
function
|
|
3050
|
+
function Tl(Ve, c) {
|
|
3051
3051
|
e.push(c, !1);
|
|
3052
3052
|
const me = () => e.store_get(Z, "$isPanelOpen", l), h = () => e.store_get(se, "$artifactCount", l), w = () => e.store_get(Ie, "$hasArtifacts", l), [l, i] = e.setup_stores(), d = e.mutable_source(), I = e.mutable_source(), a = e.mutable_source(), Ee = e.mutable_source(), we = e.mutable_source(), { isPanelOpen: Z, artifactCount: se, hasArtifacts: Ie, togglePanel: ue } = Za();
|
|
3053
3053
|
e.legacy_pre_effect(() => me(), () => {
|
|
@@ -3065,19 +3065,19 @@ function Sl(Ve, c) {
|
|
|
3065
3065
|
e.get(a) && "artifactuse-panel-toggle--has-artifacts"
|
|
3066
3066
|
].filter(Boolean).join(" "));
|
|
3067
3067
|
}), e.legacy_pre_effect_reset(), e.init();
|
|
3068
|
-
var
|
|
3068
|
+
var Se = hl(), C = e.sibling(e.child(Se), 2);
|
|
3069
3069
|
{
|
|
3070
3070
|
var f = (F) => {
|
|
3071
|
-
var q = ml(),
|
|
3072
|
-
e.reset(q), e.template_effect(() => e.set_text(
|
|
3071
|
+
var q = ml(), Te = e.child(q, !0);
|
|
3072
|
+
e.reset(q), e.template_effect(() => e.set_text(Te, e.get(Ee))), e.append(F, q);
|
|
3073
3073
|
};
|
|
3074
3074
|
e.if(C, (F) => {
|
|
3075
3075
|
e.get(I) > 0 && F(f);
|
|
3076
3076
|
});
|
|
3077
3077
|
}
|
|
3078
|
-
e.reset(
|
|
3079
|
-
e.set_class(
|
|
3080
|
-
}), e.event("click",
|
|
3078
|
+
e.reset(Se), e.template_effect(() => {
|
|
3079
|
+
e.set_class(Se, 1, e.clsx(e.get(we))), e.set_attribute(Se, "title", e.get(d) ? "Close artifacts panel" : "Open artifacts panel");
|
|
3080
|
+
}), e.event("click", Se, ue), e.append(Ve, Se), e.pop(), i();
|
|
3081
3081
|
}
|
|
3082
3082
|
const Dr = "artifactuse";
|
|
3083
3083
|
function _r(Ve = {}) {
|
|
@@ -3092,7 +3092,7 @@ function _r(Ve = {}) {
|
|
|
3092
3092
|
c.setTheme(C), c.applyTheme();
|
|
3093
3093
|
}, ue = (C, f) => {
|
|
3094
3094
|
c.registerPanel(C, f), d.set(c.getPanelTypes());
|
|
3095
|
-
},
|
|
3095
|
+
}, Se = (C) => {
|
|
3096
3096
|
c.unregisterPanel(C), d.set(c.getPanelTypes());
|
|
3097
3097
|
};
|
|
3098
3098
|
return {
|
|
@@ -3127,7 +3127,7 @@ function _r(Ve = {}) {
|
|
|
3127
3127
|
// Panel management
|
|
3128
3128
|
hasPanel: c.hasPanel,
|
|
3129
3129
|
registerPanel: ue,
|
|
3130
|
-
unregisterPanel:
|
|
3130
|
+
unregisterPanel: Se,
|
|
3131
3131
|
getPanelTypes: c.getPanelTypes,
|
|
3132
3132
|
// Multi-tab
|
|
3133
3133
|
closeTab: c.closeTab,
|
|
@@ -3168,7 +3168,7 @@ function kl(Ve = {}) {
|
|
|
3168
3168
|
c.destroy();
|
|
3169
3169
|
}), c;
|
|
3170
3170
|
}
|
|
3171
|
-
const
|
|
3171
|
+
const Sl = {
|
|
3172
3172
|
createArtifactuseStores: _r,
|
|
3173
3173
|
setArtifactuseContext: bl,
|
|
3174
3174
|
getArtifactuseContext: Za,
|
|
@@ -3179,13 +3179,13 @@ export {
|
|
|
3179
3179
|
El as ArtifactuseAgentMessage,
|
|
3180
3180
|
Es as ArtifactuseCard,
|
|
3181
3181
|
pi as ArtifactuseInlineForm,
|
|
3182
|
-
|
|
3183
|
-
|
|
3182
|
+
Ll as ArtifactusePanel,
|
|
3183
|
+
Tl as ArtifactusePanelToggle,
|
|
3184
3184
|
an as ArtifactuseSocialPreview,
|
|
3185
3185
|
vn as ArtifactuseViewer,
|
|
3186
3186
|
ys as DEFAULT_PANELS,
|
|
3187
3187
|
_r as createArtifactuseStores,
|
|
3188
|
-
|
|
3188
|
+
Sl as default,
|
|
3189
3189
|
Za as getArtifactuseContext,
|
|
3190
3190
|
bl as setArtifactuseContext,
|
|
3191
3191
|
kl as useArtifactuse
|