artifactuse 0.1.21 → 0.1.22

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