artifactuse 0.2.0 → 0.2.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -0
- package/dist/core/index.d.ts +15 -0
- package/dist/core/state.d.ts +8 -0
- package/dist/{index-llShix6s.js → index-B4BEvWtI.js} +1202 -962
- package/dist/index.js +1 -1
- package/dist/react/index.js +533 -511
- package/dist/styles/components/panel.css +106 -0
- package/dist/svelte/index.d.ts +57 -0
- package/dist/svelte/index.js +1897 -1836
- package/dist/vue/index.d.ts +44 -0
- package/dist/vue/index.js +1450 -1369
- package/dist/vue2/composables.d.ts +44 -0
- package/dist/vue2/index.js +653 -86
- package/package.json +1 -1
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var
|
|
1
|
+
var Dr = Object.defineProperty;
|
|
2
|
+
var qr = (e, t, r) => t in e ? Dr(e, t, { enumerable: !0, configurable: !0, writable: !0, value: r }) : e[t] = r;
|
|
3
|
+
var I = (e, t, r) => qr(e, typeof t != "symbol" ? t + "" : t, r);
|
|
4
4
|
const Ee = {
|
|
5
5
|
CODE: "code",
|
|
6
6
|
FORM: "form",
|
|
7
7
|
SOCIAL: "social"
|
|
8
|
-
},
|
|
8
|
+
}, Zr = [
|
|
9
9
|
// Code languages
|
|
10
10
|
"html",
|
|
11
11
|
"htm",
|
|
@@ -61,11 +61,11 @@ const Ee = {
|
|
|
61
61
|
// Structured artifacts (form can be panel based on complexity)
|
|
62
62
|
"form"
|
|
63
63
|
];
|
|
64
|
-
function
|
|
64
|
+
function Br(e = "artifact") {
|
|
65
65
|
return `${e}-${Date.now()}-${Math.random().toString(36).substr(2, 9)}`;
|
|
66
66
|
}
|
|
67
67
|
function pr(e) {
|
|
68
|
-
return
|
|
68
|
+
return Zr.includes(e == null ? void 0 : e.toLowerCase());
|
|
69
69
|
}
|
|
70
70
|
function Fr(e) {
|
|
71
71
|
return Or.includes(e == null ? void 0 : e.toLowerCase());
|
|
@@ -129,7 +129,41 @@ function ot(e) {
|
|
|
129
129
|
// Structured artifacts
|
|
130
130
|
form: "Form",
|
|
131
131
|
social: "Social Preview",
|
|
132
|
-
txt: "Plain Text"
|
|
132
|
+
txt: "Plain Text",
|
|
133
|
+
plaintext: "Plain Text",
|
|
134
|
+
text: "Plain Text",
|
|
135
|
+
less: "Less",
|
|
136
|
+
sass: "Sass",
|
|
137
|
+
scss: "SCSS",
|
|
138
|
+
lua: "Lua",
|
|
139
|
+
perl: "Perl",
|
|
140
|
+
pl: "Perl",
|
|
141
|
+
r: "R",
|
|
142
|
+
dart: "Dart",
|
|
143
|
+
elixir: "Elixir",
|
|
144
|
+
ex: "Elixir",
|
|
145
|
+
haskell: "Haskell",
|
|
146
|
+
hs: "Haskell",
|
|
147
|
+
clojure: "Clojure",
|
|
148
|
+
clj: "Clojure",
|
|
149
|
+
erlang: "Erlang",
|
|
150
|
+
erl: "Erlang",
|
|
151
|
+
objectivec: "Objective-C",
|
|
152
|
+
objc: "Objective-C",
|
|
153
|
+
m: "Objective-C",
|
|
154
|
+
toml: "TOML",
|
|
155
|
+
ini: "INI",
|
|
156
|
+
env: "Environment",
|
|
157
|
+
makefile: "Makefile",
|
|
158
|
+
cmake: "CMake",
|
|
159
|
+
terraform: "Terraform",
|
|
160
|
+
tf: "Terraform",
|
|
161
|
+
hcl: "HCL",
|
|
162
|
+
protobuf: "Protocol Buffers",
|
|
163
|
+
proto: "Protocol Buffers",
|
|
164
|
+
zig: "Zig",
|
|
165
|
+
nim: "Nim",
|
|
166
|
+
v: "V"
|
|
133
167
|
}[e == null ? void 0 : e.toLowerCase()] || (e == null ? void 0 : e.toUpperCase()) || "Code";
|
|
134
168
|
}
|
|
135
169
|
function Qs(e) {
|
|
@@ -173,7 +207,42 @@ function Qs(e) {
|
|
|
173
207
|
md: "md",
|
|
174
208
|
svg: "svg",
|
|
175
209
|
form: "json",
|
|
176
|
-
social: "json"
|
|
210
|
+
social: "json",
|
|
211
|
+
txt: "txt",
|
|
212
|
+
plaintext: "txt",
|
|
213
|
+
text: "txt",
|
|
214
|
+
less: "less",
|
|
215
|
+
sass: "sass",
|
|
216
|
+
scss: "scss",
|
|
217
|
+
lua: "lua",
|
|
218
|
+
perl: "pl",
|
|
219
|
+
pl: "pl",
|
|
220
|
+
r: "r",
|
|
221
|
+
dart: "dart",
|
|
222
|
+
elixir: "ex",
|
|
223
|
+
ex: "ex",
|
|
224
|
+
haskell: "hs",
|
|
225
|
+
hs: "hs",
|
|
226
|
+
clojure: "clj",
|
|
227
|
+
clj: "clj",
|
|
228
|
+
erlang: "erl",
|
|
229
|
+
erl: "erl",
|
|
230
|
+
objectivec: "m",
|
|
231
|
+
objc: "m",
|
|
232
|
+
m: "m",
|
|
233
|
+
toml: "toml",
|
|
234
|
+
ini: "ini",
|
|
235
|
+
env: "env",
|
|
236
|
+
makefile: "mk",
|
|
237
|
+
cmake: "cmake",
|
|
238
|
+
terraform: "tf",
|
|
239
|
+
tf: "tf",
|
|
240
|
+
hcl: "hcl",
|
|
241
|
+
protobuf: "proto",
|
|
242
|
+
proto: "proto",
|
|
243
|
+
zig: "zig",
|
|
244
|
+
nim: "nim",
|
|
245
|
+
v: "v"
|
|
177
246
|
}[e == null ? void 0 : e.toLowerCase()] || "txt";
|
|
178
247
|
}
|
|
179
248
|
function Nr(e) {
|
|
@@ -211,7 +280,31 @@ function Nr(e) {
|
|
|
211
280
|
md: "markdown",
|
|
212
281
|
svg: "svg",
|
|
213
282
|
diff: "diff",
|
|
214
|
-
patch: "patch"
|
|
283
|
+
patch: "patch",
|
|
284
|
+
txt: "txt",
|
|
285
|
+
less: "less",
|
|
286
|
+
sass: "sass",
|
|
287
|
+
scss: "scss",
|
|
288
|
+
lua: "lua",
|
|
289
|
+
pl: "perl",
|
|
290
|
+
r: "r",
|
|
291
|
+
dart: "dart",
|
|
292
|
+
ex: "elixir",
|
|
293
|
+
exs: "elixir",
|
|
294
|
+
hs: "haskell",
|
|
295
|
+
clj: "clojure",
|
|
296
|
+
erl: "erlang",
|
|
297
|
+
m: "objectivec",
|
|
298
|
+
toml: "toml",
|
|
299
|
+
ini: "ini",
|
|
300
|
+
env: "env",
|
|
301
|
+
cmake: "cmake",
|
|
302
|
+
tf: "terraform",
|
|
303
|
+
hcl: "hcl",
|
|
304
|
+
proto: "proto",
|
|
305
|
+
zig: "zig",
|
|
306
|
+
nim: "nim",
|
|
307
|
+
v: "v"
|
|
215
308
|
}[e == null ? void 0 : e.toLowerCase()] || null;
|
|
216
309
|
}
|
|
217
310
|
function Ys(e) {
|
|
@@ -248,8 +341,69 @@ function Ys(e) {
|
|
|
248
341
|
videoeditor: '<polygon points="23 7 16 12 23 17 23 7"/><rect x="1" y="5" width="15" height="14" rx="2" ry="2"/>',
|
|
249
342
|
timeline: '<line x1="2" y1="12" x2="22" y2="12"/><circle cx="6" cy="12" r="2"/><circle cx="12" cy="12" r="2"/><circle cx="18" cy="12" r="2"/>',
|
|
250
343
|
form: '<path d="M4 4h16v2H4V4zm0 4h10v2H4V8zm0 4h16v2H4v-2zm0 4h10v2H4v-2z"/><rect x="16" y="8" width="4" height="4" rx="1"/><rect x="16" y="16" width="4" height="4" rx="1"/>',
|
|
251
|
-
social: '<path d="M18 2h-3a5 5 0 0 0-5 5v3H7v4h3v8h4v-8h3l1-4h-4V7a1 1 0 0 1 1-1h3z"/>'
|
|
252
|
-
|
|
344
|
+
social: '<path d="M18 2h-3a5 5 0 0 0-5 5v3H7v4h3v8h4v-8h3l1-4h-4V7a1 1 0 0 1 1-1h3z"/>',
|
|
345
|
+
// Languages with display names that were missing icons
|
|
346
|
+
java: '<path d="M8.851 18.56s-.917.534.653.714c1.902.218 2.874.187 4.969-.211 0 0 .552.346 1.321.646-4.699 2.013-10.633-.118-6.943-1.149m-.575-2.627s-1.028.761.542.924c2.032.209 3.636.227 6.413-.308 0 0 .384.389.987.602-5.679 1.661-12.007.13-7.942-1.218m4.84-4.458c1.158 1.333-.304 2.533-.304 2.533s2.939-1.518 1.589-3.418c-1.261-1.772-2.228-2.652 3.007-5.688 0 0-8.216 2.051-4.292 6.573"/><path d="M16.205 20.196s.678.559-.747.991c-2.712.822-11.288 1.069-13.669.033-.856-.373.75-.89 1.254-.998.527-.114.828-.093.828-.093-.953-.671-6.156 1.317-2.643 1.887 9.58 1.553 17.462-.7 14.977-1.82M9.6 13.116s-4.362 1.036-1.544 1.412c1.189.159 3.561.123 5.77-.062 1.806-.152 3.618-.477 3.618-.477s-.637.272-1.098.587c-4.429 1.165-12.986.623-10.522-.568 2.082-1.006 3.776-.892 3.776-.892m7.816 4.368c4.502-2.34 2.421-4.589.968-4.285-.356.075-.515.14-.515.14s.132-.207.385-.296c2.874-1.01 5.086 2.981-.928 4.562 0 0 .07-.062.09-.121"/>',
|
|
347
|
+
c: '<path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8z"/><path d="M10.5 7.5C8.01 7.5 6 9.51 6 12s2.01 4.5 4.5 4.5c1.74 0 3.26-1 4-2.5h-2.18c-.5.63-1.27 1-2.12 1A2.75 2.75 0 0 1 7.5 12a2.75 2.75 0 0 1 2.7-2.5c.85 0 1.62.37 2.12 1h2.18c-.74-1.5-2.26-2.5-4-2.5z"/>',
|
|
348
|
+
cpp: '<path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8z"/><path d="M9.5 7.5C7.01 7.5 5 9.51 5 12s2.01 4.5 4.5 4.5c1.74 0 3.26-1 4-2.5h-2.18c-.5.63-1.27 1-2.12 1A2.75 2.75 0 0 1 6.5 12 2.75 2.75 0 0 1 9.2 9.5c.85 0 1.62.37 2.12 1h2.18c-.74-1.5-2.26-2.5-4-2.5z"/><path d="M16 11h1v-1h1v1h1v1h-1v1h-1v-1h-1zm-3 0h1v-1h1v1h1v1h-1v1h-1v-1h-1z"/>',
|
|
349
|
+
csharp: '<path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8z"/><path d="M9.5 7.5C7.01 7.5 5 9.51 5 12s2.01 4.5 4.5 4.5c1.74 0 3.26-1 4-2.5h-2.18c-.5.63-1.27 1-2.12 1A2.75 2.75 0 0 1 6.5 12 2.75 2.75 0 0 1 9.2 9.5c.85 0 1.62.37 2.12 1h2.18c-.74-1.5-2.26-2.5-4-2.5z"/><path d="M16.5 10.5h-1v-1h-1v1h-1v1h1v1h1v-1h1zM16.5 13.5h-1v-1h-1v1h-1v1h1v1h1v-1h1z"/>',
|
|
350
|
+
cs: '<path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8z"/><path d="M9.5 7.5C7.01 7.5 5 9.51 5 12s2.01 4.5 4.5 4.5c1.74 0 3.26-1 4-2.5h-2.18c-.5.63-1.27 1-2.12 1A2.75 2.75 0 0 1 6.5 12 2.75 2.75 0 0 1 9.2 9.5c.85 0 1.62.37 2.12 1h2.18c-.74-1.5-2.26-2.5-4-2.5z"/><path d="M16.5 10.5h-1v-1h-1v1h-1v1h1v1h1v-1h1zM16.5 13.5h-1v-1h-1v1h-1v1h1v1h1v-1h1z"/>',
|
|
351
|
+
go: '<path d="M3.5 10.83s-.1-.16.06-.21c0 0 2.61-1.05 5.25-1.05h.2c2.64 0 5.25 1.05 5.25 1.05.16.05.06.21.06.21"/><path d="M4.3 11.2c-.15 0-.15-.23 0-.23h4.96c.15 0 .15.23 0 .23H4.3z"/><ellipse cx="6.27" cy="10" rx=".35" ry=".4"/><path d="M14.26 10.83s-.1-.16.06-.21c0 0 1.61-.65 3.25-.65h.2c1.64 0 3.25.65 3.25.65.16.05.06.21.06.21"/><path d="M14.85 11.2c-.15 0-.15-.23 0-.23h4.26c.15 0 .15.23 0 .23h-4.26z"/><ellipse cx="16.57" cy="10" rx=".35" ry=".4"/><path d="M8.98 15.53c-2.6 0-4.72-1.68-4.72-3.75 0-2.07 2.12-3.75 4.72-3.75s4.72 1.68 4.72 3.75-2.12 3.75-4.72 3.75z" fill="none" stroke="currentColor" stroke-width="1"/>',
|
|
352
|
+
rust: '<path d="M12 2l1.09 3.41L15 3.5l-.47 3.53 2.97-1.87-.94 3.42 3.54.16-2.7 2.27 3.15 1.63-3.38.86 2.13 2.87-3.47-.57.78 3.45-3.05-1.73L12 21l-1.56-3.07-3.05 1.73.78-3.45-3.47.57 2.13-2.87-3.38-.86 3.15-1.63L3.9 9.15l3.54-.16-.94-3.42 2.97 1.87L9 3.5l1.91 1.91L12 2z" fill="none" stroke="currentColor" stroke-width="1.2"/><circle cx="12" cy="12" r="3" fill="none" stroke="currentColor" stroke-width="1.2"/>',
|
|
353
|
+
ruby: '<path d="M5.5 18.5L3 14l3-9 4-2h4l4 2 3 9-2.5 4.5L12 21l-6.5-2.5z" fill="none" stroke="currentColor" stroke-width="1.2"/><path d="M12 3v18M3 14h18M6 5l12 14M18 5L6 19" fill="none" stroke="currentColor" stroke-width=".8"/>',
|
|
354
|
+
rb: '<path d="M5.5 18.5L3 14l3-9 4-2h4l4 2 3 9-2.5 4.5L12 21l-6.5-2.5z" fill="none" stroke="currentColor" stroke-width="1.2"/><path d="M12 3v18M3 14h18M6 5l12 14M18 5L6 19" fill="none" stroke="currentColor" stroke-width=".8"/>',
|
|
355
|
+
php: '<ellipse cx="12" cy="12" rx="10" ry="6" fill="none" stroke="currentColor" stroke-width="1.2"/><path d="M7 9.5h2a1.5 1.5 0 0 1 0 3H8v2M12.5 9.5h2a1.5 1.5 0 0 1 0 3H13.5v2M17 9.5v5"/>',
|
|
356
|
+
swift: '<path d="M20.5 8c.3-1.7-.4-3.6-1.8-5-.5 2.1-1.8 3.7-3.5 4.8C12.6 5.5 9.4 3.3 6 2c.9 1.5 1.7 3 2.3 4.5C5.3 4.4 3 3 3 3s1.3 3.5 4 6.3C5.2 9 3.5 8.6 2 8c1.1 1.8 2.7 3.2 4.5 4.2-.7.2-1.5.3-2.5.3 1.5 1.5 3.5 2.5 5.5 2.5-2 2-5 3-8 3 3.5 2 7.5 3 11 1.5 5-2.2 7.5-7.5 7.5-11.5z"/>',
|
|
357
|
+
kotlin: '<path d="M3 3h18v18H3V3z" fill="none" stroke="currentColor" stroke-width="1.2"/><path d="M3 3l9 9L3 21M12 3l9 9-9 9"/>',
|
|
358
|
+
scala: '<path d="M4 4c0 0 8 1 16 1v5c-8 0-16-1-16-1V4z"/><path d="M4 10c0 0 8 1 16 1v5c-8 0-16-1-16-1V10z"/><path d="M4 16c0 0 8 1 16 1v4c-8 0-16-1-16-1V16z"/>',
|
|
359
|
+
powershell: '<path d="M4 4h16a2 2 0 0 1 2 2v12a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2m0 2v12h16V6H4m2 2l5 3.5L6 15m6 0h5"/>',
|
|
360
|
+
ps1: '<path d="M4 4h16a2 2 0 0 1 2 2v12a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2m0 2v12h16V6H4m2 2l5 3.5L6 15m6 0h5"/>',
|
|
361
|
+
xml: '<path d="M7 4l-4 8 4 8M17 4l4 8-4 8M14 4l-4 16"/>',
|
|
362
|
+
yaml: '<path d="M3 4l4.5 5.5L12 4M12 4l4.5 5.5L21 4M12 9.5V20M3 12h18" fill="none" stroke="currentColor" stroke-width="1.5"/>',
|
|
363
|
+
yml: '<path d="M3 4l4.5 5.5L12 4M12 4l4.5 5.5L21 4M12 9.5V20M3 12h18" fill="none" stroke="currentColor" stroke-width="1.5"/>',
|
|
364
|
+
graphql: '<circle cx="12" cy="4" r="1.5"/><circle cx="5" cy="8" r="1.5"/><circle cx="19" cy="8" r="1.5"/><circle cx="5" cy="16" r="1.5"/><circle cx="19" cy="16" r="1.5"/><circle cx="12" cy="20" r="1.5"/><path d="M5.5 8.5l6.5 11M12.5 4.5l6 3.5M5.5 8l13 0M5.5 16l13 0M18 16.5l-6 3.5M5.5 16l6.5-12" fill="none" stroke="currentColor" stroke-width="1"/>',
|
|
365
|
+
dockerfile: '<path d="M2 12.5h3v-3h3v-3h3V3.5h3v3h3v3h1.5a2.5 2.5 0 0 1 0 5H2v-2z"/><path d="M5 9.5h2v2H5zM8 9.5h2v2H8zM8 6.5h2v2H8zM11 6.5h2v2h-2zM11 9.5h2v2h-2zM14 9.5h2v2h-2zM11 3.5h2v2h-2z"/>',
|
|
366
|
+
docker: '<path d="M2 12.5h3v-3h3v-3h3V3.5h3v3h3v3h1.5a2.5 2.5 0 0 1 0 5H2v-2z"/><path d="M5 9.5h2v2H5zM8 9.5h2v2H8zM8 6.5h2v2H8zM11 6.5h2v2h-2zM11 9.5h2v2h-2zM14 9.5h2v2h-2zM11 3.5h2v2h-2z"/>',
|
|
367
|
+
// CSS preprocessors
|
|
368
|
+
less: '<path d="M5 3l.65 3.34h12.59l-.44 2.16H6.11l.65 3.34h11.04l-.78 3.86-5.02 1.67-4.96-1.67-.33-1.69H4.38l.65 3.35L12 19.31l7.02-2.31L20.93 3H5z"/>',
|
|
369
|
+
sass: '<path d="M5 3l.65 3.34h12.59l-.44 2.16H6.11l.65 3.34h11.04l-.78 3.86-5.02 1.67-4.96-1.67-.33-1.69H4.38l.65 3.35L12 19.31l7.02-2.31L20.93 3H5z"/>',
|
|
370
|
+
scss: '<path d="M5 3l.65 3.34h12.59l-.44 2.16H6.11l.65 3.34h11.04l-.78 3.86-5.02 1.67-4.96-1.67-.33-1.69H4.38l.65 3.35L12 19.31l7.02-2.31L20.93 3H5z"/>',
|
|
371
|
+
// New languages
|
|
372
|
+
lua: '<path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2z" fill="none" stroke="currentColor" stroke-width="1.5"/><circle cx="12" cy="12" r="4" fill="none" stroke="currentColor" stroke-width="1.5"/><circle cx="18" cy="5" r="2"/>',
|
|
373
|
+
perl: '<path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2z" fill="none" stroke="currentColor" stroke-width="1.2"/><path d="M9 8v8M9 12h3a2 2 0 1 0 0-4H9"/>',
|
|
374
|
+
pl: '<path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2z" fill="none" stroke="currentColor" stroke-width="1.2"/><path d="M9 8v8M9 12h3a2 2 0 1 0 0-4H9"/>',
|
|
375
|
+
r: '<path d="M3 5h14a4 4 0 0 1 4 4v0a4 4 0 0 1-4 4H3V5z" fill="none" stroke="currentColor" stroke-width="1.5"/><path d="M3 5v14M13 13l5 6" fill="none" stroke="currentColor" stroke-width="1.5"/>',
|
|
376
|
+
dart: '<path d="M4 12L2 6l4-4h6l10 10-6 10H8l-4-4v-6z" fill="none" stroke="currentColor" stroke-width="1.2"/><path d="M6 2l16 10M2 6l10 16"/>',
|
|
377
|
+
elixir: '<path d="M12 2c-3 4-6 8-6 13a6 6 0 0 0 12 0c0-5-3-9-6-13z" fill="none" stroke="currentColor" stroke-width="1.5"/><ellipse cx="12" cy="16" rx="3" ry="2" fill="none" stroke="currentColor" stroke-width="1"/>',
|
|
378
|
+
ex: '<path d="M12 2c-3 4-6 8-6 13a6 6 0 0 0 12 0c0-5-3-9-6-13z" fill="none" stroke="currentColor" stroke-width="1.5"/><ellipse cx="12" cy="16" rx="3" ry="2" fill="none" stroke="currentColor" stroke-width="1"/>',
|
|
379
|
+
haskell: '<path d="M2 4l5 8-5 8M7 4l5 8-5 8" fill="none" stroke="currentColor" stroke-width="2"/><path d="M12 8l2 4-2 4M14 10h8M14 14h8" fill="none" stroke="currentColor" stroke-width="1.5"/>',
|
|
380
|
+
hs: '<path d="M2 4l5 8-5 8M7 4l5 8-5 8" fill="none" stroke="currentColor" stroke-width="2"/><path d="M12 8l2 4-2 4M14 10h8M14 14h8" fill="none" stroke="currentColor" stroke-width="1.5"/>',
|
|
381
|
+
clojure: '<circle cx="12" cy="12" r="9" fill="none" stroke="currentColor" stroke-width="1.5"/><path d="M8 6a7.5 7.5 0 0 0 0 12M16 6a7.5 7.5 0 0 1 0 12"/>',
|
|
382
|
+
clj: '<circle cx="12" cy="12" r="9" fill="none" stroke="currentColor" stroke-width="1.5"/><path d="M8 6a7.5 7.5 0 0 0 0 12M16 6a7.5 7.5 0 0 1 0 12"/>',
|
|
383
|
+
erlang: '<path d="M4 18c2-1.5 3-4 3-6s-1-4.5-3-6M20 18c-3-1-5.5-3.5-5.5-6S17 5.5 20 6" fill="none" stroke="currentColor" stroke-width="1.5"/><path d="M4 12h16" fill="none" stroke="currentColor" stroke-width="1.5"/>',
|
|
384
|
+
erl: '<path d="M4 18c2-1.5 3-4 3-6s-1-4.5-3-6M20 18c-3-1-5.5-3.5-5.5-6S17 5.5 20 6" fill="none" stroke="currentColor" stroke-width="1.5"/><path d="M4 12h16" fill="none" stroke="currentColor" stroke-width="1.5"/>',
|
|
385
|
+
objectivec: '<path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8z"/><path d="M10.5 7.5C8.01 7.5 6 9.51 6 12s2.01 4.5 4.5 4.5c1.74 0 3.26-1 4-2.5h-2.18c-.5.63-1.27 1-2.12 1A2.75 2.75 0 0 1 7.5 12a2.75 2.75 0 0 1 2.7-2.5c.85 0 1.62.37 2.12 1h2.18c-.74-1.5-2.26-2.5-4-2.5z"/>',
|
|
386
|
+
objc: '<path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8z"/><path d="M10.5 7.5C8.01 7.5 6 9.51 6 12s2.01 4.5 4.5 4.5c1.74 0 3.26-1 4-2.5h-2.18c-.5.63-1.27 1-2.12 1A2.75 2.75 0 0 1 7.5 12a2.75 2.75 0 0 1 2.7-2.5c.85 0 1.62.37 2.12 1h2.18c-.74-1.5-2.26-2.5-4-2.5z"/>',
|
|
387
|
+
m: '<path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8z"/><path d="M10.5 7.5C8.01 7.5 6 9.51 6 12s2.01 4.5 4.5 4.5c1.74 0 3.26-1 4-2.5h-2.18c-.5.63-1.27 1-2.12 1A2.75 2.75 0 0 1 7.5 12a2.75 2.75 0 0 1 2.7-2.5c.85 0 1.62.37 2.12 1h2.18c-.74-1.5-2.26-2.5-4-2.5z"/>',
|
|
388
|
+
// Config/build files
|
|
389
|
+
toml: '<path d="M3 3h18v18H3V3z" fill="none" stroke="currentColor" stroke-width="1.2"/><path d="M7 7h10M7 11h7M7 15h10"/>',
|
|
390
|
+
ini: '<path d="M3 3h18v18H3V3z" fill="none" stroke="currentColor" stroke-width="1.2"/><path d="M7 7h10M7 11h7M7 15h10"/>',
|
|
391
|
+
env: '<path d="M3 3h18v18H3V3z" fill="none" stroke="currentColor" stroke-width="1.2"/><path d="M7 7h10M7 11h7M7 15h10"/>',
|
|
392
|
+
makefile: '<path d="M4 4h16a2 2 0 0 1 2 2v12a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2m0 2v12h16V6H4m2 2l4 3-4 3V8m5 5h5v2h-5v-2z"/>',
|
|
393
|
+
cmake: '<path d="M4 4h16a2 2 0 0 1 2 2v12a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2m0 2v12h16V6H4m2 2l4 3-4 3V8m5 5h5v2h-5v-2z"/>',
|
|
394
|
+
terraform: '<path d="M1 5l7 4v8l-7-4V5zM9 1l7 4v8l-7-4V1zM9 13l7 4v8l-7-4v-8zM17 5l7 4v8l-7-4V5z"/>',
|
|
395
|
+
tf: '<path d="M1 5l7 4v8l-7-4V5zM9 1l7 4v8l-7-4V1zM9 13l7 4v8l-7-4v-8zM17 5l7 4v8l-7-4V5z"/>',
|
|
396
|
+
hcl: '<path d="M1 5l7 4v8l-7-4V5zM9 1l7 4v8l-7-4V1zM9 13l7 4v8l-7-4v-8zM17 5l7 4v8l-7-4V5z"/>',
|
|
397
|
+
protobuf: '<path d="M4 4h16v16H4V4z" fill="none" stroke="currentColor" stroke-width="1.2"/><path d="M8 8h8M8 12h5M8 16h8"/>',
|
|
398
|
+
proto: '<path d="M4 4h16v16H4V4z" fill="none" stroke="currentColor" stroke-width="1.2"/><path d="M8 8h8M8 12h5M8 16h8"/>',
|
|
399
|
+
zig: '<path d="M2 6h7l-5 12h7l5-12h7l-5 12h7" fill="none" stroke="currentColor" stroke-width="1.5"/>',
|
|
400
|
+
nim: '<path d="M12 2l3 5h5l-3 5 3 5h-5l-3 5-3-5H4l3-5-3-5h5l3-5z" fill="none" stroke="currentColor" stroke-width="1.2"/>',
|
|
401
|
+
v: '<path d="M4 4l8 16 8-16" fill="none" stroke="currentColor" stroke-width="2"/>',
|
|
402
|
+
// Text/document icon
|
|
403
|
+
txt: '<path d="M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z"/><polyline points="14 2 14 8 20 8"/><line x1="8" y1="13" x2="16" y2="13"/><line x1="8" y1="17" x2="13" y2="17"/>',
|
|
404
|
+
plaintext: '<path d="M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z"/><polyline points="14 2 14 8 20 8"/><line x1="8" y1="13" x2="16" y2="13"/><line x1="8" y1="17" x2="13" y2="17"/>',
|
|
405
|
+
text: '<path d="M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z"/><polyline points="14 2 14 8 20 8"/><line x1="8" y1="13" x2="16" y2="13"/><line x1="8" y1="17" x2="13" y2="17"/>'
|
|
406
|
+
}[e == null ? void 0 : e.toLowerCase()] || '<path d="M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z"/><polyline points="14 2 14 8 20 8"/><line x1="8" y1="13" x2="16" y2="13"/><line x1="8" y1="17" x2="13" y2="17"/>';
|
|
253
407
|
}
|
|
254
408
|
function en(e) {
|
|
255
409
|
if (e === 0) return "0 Bytes";
|
|
@@ -260,7 +414,7 @@ function fr(e) {
|
|
|
260
414
|
return e.replace(/</g, "<").replace(/>/g, ">").replace(/"/g, '"').replace(/'/g, "'").replace(/&/g, "&").replace(/ /g, `
|
|
261
415
|
`).replace(/ /g, "\r").replace(/	/g, " ").replace(/ /g, " ");
|
|
262
416
|
}
|
|
263
|
-
function
|
|
417
|
+
function lt(e) {
|
|
264
418
|
return e.replace(/&/g, "&").replace(/"/g, """).replace(/'/g, "'").replace(/</g, "<").replace(/>/g, ">");
|
|
265
419
|
}
|
|
266
420
|
function Ur(e) {
|
|
@@ -271,18 +425,18 @@ function Gr(e, t) {
|
|
|
271
425
|
const r = t == null ? void 0 : t.toLowerCase();
|
|
272
426
|
if (r === "smartdiff")
|
|
273
427
|
try {
|
|
274
|
-
const
|
|
275
|
-
return
|
|
428
|
+
const l = JSON.parse(e);
|
|
429
|
+
return l.language ? `${ot(l.language)} Diff` : "Smart Diff";
|
|
276
430
|
} catch {
|
|
277
431
|
return "Smart Diff";
|
|
278
432
|
}
|
|
279
433
|
if (r === "form" || r === "social")
|
|
280
434
|
try {
|
|
281
|
-
const
|
|
435
|
+
const l = JSON.parse(e);
|
|
282
436
|
if (r === "form")
|
|
283
|
-
return
|
|
437
|
+
return l.title || "Form";
|
|
284
438
|
if (r === "social")
|
|
285
|
-
return `Social Preview - ${
|
|
439
|
+
return `Social Preview - ${l.platform || "twitter"}`;
|
|
286
440
|
} catch {
|
|
287
441
|
}
|
|
288
442
|
const a = e.match(/(?:\/\/|\/\*|<!--)\s*(?:filename|file):\s*([^\n*\->\s]+)/i);
|
|
@@ -297,8 +451,8 @@ function Gr(e, t) {
|
|
|
297
451
|
const i = e.match(/(?:export\s+)?const\s+([A-Z][a-zA-Z0-9]+)\s*=\s*(?:\([^)]*\)|[a-zA-Z]+)\s*=>/);
|
|
298
452
|
if (i) return i[1];
|
|
299
453
|
if (r === "python" || r === "py") {
|
|
300
|
-
const
|
|
301
|
-
if (
|
|
454
|
+
const l = e.match(/class\s+([A-Z][a-zA-Z0-9_]+)/);
|
|
455
|
+
if (l) return l[1];
|
|
302
456
|
const d = e.match(/def\s+([a-z_][a-zA-Z0-9_]+)\s*\(/);
|
|
303
457
|
if (d && d[1] !== "main") return d[1];
|
|
304
458
|
}
|
|
@@ -320,28 +474,28 @@ function Xr(e, t, r, a) {
|
|
|
320
474
|
const s = a.maxLines || 15;
|
|
321
475
|
function n(f, b) {
|
|
322
476
|
if (b) return !1;
|
|
323
|
-
const
|
|
324
|
-
if (
|
|
325
|
-
const
|
|
326
|
-
return f <
|
|
477
|
+
const v = a.minClickableLines;
|
|
478
|
+
if (v == null) return !1;
|
|
479
|
+
const x = typeof v == "number" ? v : v.lines || 0, $ = typeof v == "object" && Array.isArray(v.ignoreLanguages) ? v.ignoreLanguages : [];
|
|
480
|
+
return f < x && !$.includes(r);
|
|
327
481
|
}
|
|
328
482
|
function o(f, b) {
|
|
329
|
-
const
|
|
330
|
-
let
|
|
331
|
-
return typeof
|
|
483
|
+
const v = a.actionLabel;
|
|
484
|
+
let x;
|
|
485
|
+
return typeof v == "string" ? x = v : v && typeof v == "object" && (x = v[f] || v.default || null), x || (x = f === "diff" || f === "patch" || f === "smartdiff" ? "View full diff" : "View full code"), `${x} (${b} lines)`;
|
|
332
486
|
}
|
|
333
487
|
if (r === "smartdiff")
|
|
334
488
|
try {
|
|
335
|
-
const f = JSON.parse(t),
|
|
336
|
-
`),
|
|
337
|
-
`)),
|
|
338
|
-
return `<div class="artifactuse-inline-preview${
|
|
489
|
+
const f = JSON.parse(t), v = Wr(f.oldCode, f.newCode).split(`
|
|
490
|
+
`), x = v.slice(0, s), $ = x.map((T) => T[0] || " "), A = x.map((T) => T.slice(1)), C = lt(A.join(`
|
|
491
|
+
`)), R = v.length > s, M = f.language || "plaintext", y = n(v.length, R), z = y ? " artifactuse-inline-preview--static" : "", H = y ? ' data-non-clickable="true"' : "", P = o("smartdiff", v.length);
|
|
492
|
+
return `<div class="artifactuse-inline-preview${R ? " artifactuse-inline-preview--truncated" : ""}${z}" data-artifact-id="${e.id}" data-smartdiff="true" data-smartdiff-markers="${$.join(",")}"${H}><pre class="artifactuse-inline-preview__pre"><code class="language-${M}">${C}</code></pre>` + (R ? `<div class="artifactuse-inline-preview__fade"><span class="artifactuse-inline-preview__action">${P}</span></div>` : "") + "</div>";
|
|
339
493
|
} catch {
|
|
340
494
|
}
|
|
341
495
|
let i = t, u = r;
|
|
342
|
-
const
|
|
343
|
-
`), d =
|
|
344
|
-
`), p =
|
|
496
|
+
const l = i.split(`
|
|
497
|
+
`), d = l.slice(0, s).join(`
|
|
498
|
+
`), p = lt(d), w = l.length > s, c = n(l.length, w), m = c ? " artifactuse-inline-preview--static" : "", h = c ? ' data-non-clickable="true"' : "", g = o(r, l.length);
|
|
345
499
|
return `<div class="artifactuse-inline-preview${w ? " artifactuse-inline-preview--truncated" : ""}${m}" data-artifact-id="${e.id}"${h}><pre class="artifactuse-inline-preview__pre"><code class="language-${u}">${p}</code></pre>` + (w ? `<div class="artifactuse-inline-preview__fade"><span class="artifactuse-inline-preview__action">${g}</span></div>` : "") + "</div>";
|
|
346
500
|
}
|
|
347
501
|
function Kr(e, t = "panel") {
|
|
@@ -374,7 +528,7 @@ function Yr(e) {
|
|
|
374
528
|
const t = e == null ? void 0 : e.toLowerCase();
|
|
375
529
|
return t === "form" ? Ee.FORM : t === "social" ? Ee.SOCIAL : Ee.CODE;
|
|
376
530
|
}
|
|
377
|
-
function
|
|
531
|
+
function Me(e, t, r, a) {
|
|
378
532
|
const s = t == null ? void 0 : t.toLowerCase(), n = Yr(s), o = Qr(s, e);
|
|
379
533
|
return {
|
|
380
534
|
id: `${r}-${n}-${a}`,
|
|
@@ -399,10 +553,10 @@ function tn(e, t) {
|
|
|
399
553
|
const o = s[1], i = fr(s[2]);
|
|
400
554
|
let u = o.toLowerCase();
|
|
401
555
|
if ((["xml", "markup", "html", "htm"].includes(u) || !u) && (i.trim().startsWith("<svg") || i.includes("<svg ") || i.includes("<svg>")) && (u = "svg"), (u === "form" || u === "social") && !hr(i)) {
|
|
402
|
-
r.push(
|
|
556
|
+
r.push(Me(i, "json", t, n)), n++;
|
|
403
557
|
continue;
|
|
404
558
|
}
|
|
405
|
-
r.push(
|
|
559
|
+
r.push(Me(i, u, t, n)), n++;
|
|
406
560
|
}
|
|
407
561
|
return r;
|
|
408
562
|
}
|
|
@@ -414,7 +568,7 @@ function ea(e, t, r = {}) {
|
|
|
414
568
|
inlinePreview: o = null,
|
|
415
569
|
inlineCode: i = null,
|
|
416
570
|
tabs: u = null,
|
|
417
|
-
viewMode:
|
|
571
|
+
viewMode: l = null
|
|
418
572
|
} = r;
|
|
419
573
|
function d(g) {
|
|
420
574
|
return o ? o.languages === !0 ? !(Array.isArray(o.excludeLanguages) && o.excludeLanguages.includes(g)) : Array.isArray(o.languages) ? o.languages.includes(g) : !1 : !1;
|
|
@@ -422,22 +576,22 @@ function ea(e, t, r = {}) {
|
|
|
422
576
|
function p(g) {
|
|
423
577
|
return i ? i.languages === !0 ? !0 : Array.isArray(i.languages) ? i.languages.includes(g) : !1 : !1;
|
|
424
578
|
}
|
|
425
|
-
const w = [],
|
|
579
|
+
const w = [], c = /<pre><code class="language-(\w+)">([\s\S]*?)<\/code><\/pre>/gi;
|
|
426
580
|
let m = 0;
|
|
427
|
-
const h = e.replace(
|
|
428
|
-
const
|
|
581
|
+
const h = e.replace(c, (g, f, b) => {
|
|
582
|
+
const v = fr(b).trim(), x = v.split(`
|
|
429
583
|
`).length;
|
|
430
|
-
let
|
|
431
|
-
if ((["xml", "markup", "html", "htm"].includes(
|
|
584
|
+
let $ = f.toLowerCase();
|
|
585
|
+
if ((["xml", "markup", "html", "htm"].includes($) || !$) && v.trim().startsWith("<svg") && ($ = "svg"), p($))
|
|
432
586
|
return m++, g;
|
|
433
|
-
const
|
|
434
|
-
let
|
|
435
|
-
if (n ?
|
|
436
|
-
const
|
|
437
|
-
if (u && (
|
|
438
|
-
return Xr(
|
|
439
|
-
let
|
|
440
|
-
return
|
|
587
|
+
const A = pr($);
|
|
588
|
+
let C = !1;
|
|
589
|
+
if (n ? C = !0 : $ === "diff" || $ === "patch" || $ === "smartdiff" ? C = x > 10 : A ? C = !0 : C = v.length >= s && x >= a, !C && d($) && (C = !0), C) {
|
|
590
|
+
const R = Me(v, $, t, m);
|
|
591
|
+
if (u && (R.tabs = u), l && (R.viewMode = l), m++, w.push(R), d($))
|
|
592
|
+
return Xr(R, v, $, o);
|
|
593
|
+
let M = "panel";
|
|
594
|
+
return R.isInline && (M = R.type === "social" ? "inline-social" : "inline-form"), Kr(R, M);
|
|
441
595
|
}
|
|
442
596
|
return m++, g;
|
|
443
597
|
});
|
|
@@ -453,66 +607,78 @@ function ta() {
|
|
|
453
607
|
isPanelOpen: !1,
|
|
454
608
|
viewMode: "preview",
|
|
455
609
|
// 'preview' | 'code' | 'split'
|
|
456
|
-
isFullscreen: !1
|
|
610
|
+
isFullscreen: !1,
|
|
611
|
+
// Multi-tab support
|
|
612
|
+
openTabs: [],
|
|
613
|
+
// Array of artifact IDs open as tabs (ordered)
|
|
614
|
+
tabViewModes: {},
|
|
615
|
+
// { [artifactId]: 'preview' | 'code' | 'split' | 'edit' }
|
|
616
|
+
// Panel empty view
|
|
617
|
+
forceEmptyView: !1
|
|
618
|
+
// When true, panel shows empty state regardless of artifacts
|
|
457
619
|
};
|
|
458
620
|
const t = /* @__PURE__ */ new Set();
|
|
459
621
|
function r() {
|
|
460
|
-
t.forEach((
|
|
622
|
+
t.forEach((M) => {
|
|
461
623
|
try {
|
|
462
|
-
|
|
463
|
-
} catch (
|
|
464
|
-
console.error("Artifactuse state subscriber error:",
|
|
624
|
+
M(e);
|
|
625
|
+
} catch (y) {
|
|
626
|
+
console.error("Artifactuse state subscriber error:", y);
|
|
465
627
|
}
|
|
466
628
|
});
|
|
467
629
|
}
|
|
468
|
-
function a(
|
|
469
|
-
return t.add(
|
|
470
|
-
t.delete(
|
|
630
|
+
function a(M) {
|
|
631
|
+
return t.add(M), M(e), () => {
|
|
632
|
+
t.delete(M);
|
|
471
633
|
};
|
|
472
634
|
}
|
|
473
635
|
function s() {
|
|
474
636
|
return { ...e };
|
|
475
637
|
}
|
|
476
|
-
function n(
|
|
477
|
-
const
|
|
478
|
-
if (
|
|
638
|
+
function n(M) {
|
|
639
|
+
const y = e.artifacts.findIndex((z) => z.id === M.id);
|
|
640
|
+
if (y === -1)
|
|
479
641
|
e = {
|
|
480
642
|
...e,
|
|
481
|
-
artifacts: [...e.artifacts,
|
|
643
|
+
artifacts: [...e.artifacts, M]
|
|
482
644
|
};
|
|
483
645
|
else {
|
|
484
|
-
const
|
|
485
|
-
|
|
646
|
+
const z = [...e.artifacts];
|
|
647
|
+
z[y] = { ...z[y], ...M }, e = {
|
|
486
648
|
...e,
|
|
487
|
-
artifacts:
|
|
649
|
+
artifacts: z
|
|
488
650
|
};
|
|
489
651
|
}
|
|
490
652
|
r();
|
|
491
653
|
}
|
|
492
|
-
function o(
|
|
493
|
-
|
|
654
|
+
function o(M) {
|
|
655
|
+
M.forEach(n);
|
|
494
656
|
}
|
|
495
|
-
function i(
|
|
657
|
+
function i(M) {
|
|
658
|
+
const y = e.openTabs.filter((P) => P !== M), { [M]: z, ...H } = e.tabViewModes;
|
|
496
659
|
e = {
|
|
497
660
|
...e,
|
|
498
|
-
artifacts: e.artifacts.filter((
|
|
499
|
-
activeArtifactId: e.activeArtifactId ===
|
|
500
|
-
isPanelOpen: e.activeArtifactId ===
|
|
661
|
+
artifacts: e.artifacts.filter((P) => P.id !== M),
|
|
662
|
+
activeArtifactId: e.activeArtifactId === M ? null : e.activeArtifactId,
|
|
663
|
+
isPanelOpen: e.activeArtifactId === M ? !1 : e.isPanelOpen,
|
|
664
|
+
openTabs: y,
|
|
665
|
+
tabViewModes: H
|
|
501
666
|
}, r();
|
|
502
667
|
}
|
|
503
|
-
function u(
|
|
504
|
-
return e.artifacts.find((
|
|
668
|
+
function u(M) {
|
|
669
|
+
return e.artifacts.find((y) => y.id === M) || null;
|
|
505
670
|
}
|
|
506
|
-
function
|
|
671
|
+
function l() {
|
|
507
672
|
return e.activeArtifactId ? u(e.activeArtifactId) : null;
|
|
508
673
|
}
|
|
509
|
-
function d(
|
|
510
|
-
const
|
|
511
|
-
let
|
|
512
|
-
|
|
674
|
+
function d(M) {
|
|
675
|
+
const y = u(M);
|
|
676
|
+
let z = e.tabViewModes[M];
|
|
677
|
+
z || (z = (y == null ? void 0 : y.isPreviewable) === !1 ? "code" : "preview", y != null && y.tabs && !y.tabs.includes(z) && (z = y.tabs[0])), e = {
|
|
513
678
|
...e,
|
|
514
|
-
activeArtifactId:
|
|
515
|
-
viewMode:
|
|
679
|
+
activeArtifactId: M,
|
|
680
|
+
viewMode: z,
|
|
681
|
+
forceEmptyView: !1
|
|
516
682
|
}, r();
|
|
517
683
|
}
|
|
518
684
|
function p() {
|
|
@@ -521,60 +687,118 @@ function ta() {
|
|
|
521
687
|
activeArtifactId: null
|
|
522
688
|
}, r();
|
|
523
689
|
}
|
|
524
|
-
function w(
|
|
690
|
+
function w(M) {
|
|
525
691
|
e = {
|
|
526
692
|
...e,
|
|
527
|
-
isPanelOpen:
|
|
528
|
-
isFullscreen:
|
|
693
|
+
isPanelOpen: M,
|
|
694
|
+
isFullscreen: M ? e.isFullscreen : !1
|
|
529
695
|
}, r();
|
|
530
696
|
}
|
|
531
|
-
function
|
|
532
|
-
if (!["preview", "code", "split", "edit"].includes(
|
|
533
|
-
console.warn(`Invalid view mode: ${
|
|
697
|
+
function c(M) {
|
|
698
|
+
if (!["preview", "code", "split", "edit"].includes(M)) {
|
|
699
|
+
console.warn(`Invalid view mode: ${M}`);
|
|
534
700
|
return;
|
|
535
701
|
}
|
|
702
|
+
const y = e.activeArtifactId ? { ...e.tabViewModes, [e.activeArtifactId]: M } : e.tabViewModes;
|
|
536
703
|
e = {
|
|
537
704
|
...e,
|
|
538
|
-
viewMode:
|
|
705
|
+
viewMode: M,
|
|
706
|
+
tabViewModes: y
|
|
539
707
|
}, r();
|
|
540
708
|
}
|
|
541
|
-
function m(
|
|
709
|
+
function m(M) {
|
|
542
710
|
e = {
|
|
543
711
|
...e,
|
|
544
|
-
isFullscreen:
|
|
712
|
+
isFullscreen: M
|
|
545
713
|
}, r();
|
|
546
714
|
}
|
|
547
|
-
function h(
|
|
548
|
-
|
|
715
|
+
function h(M) {
|
|
716
|
+
e = {
|
|
717
|
+
...e,
|
|
718
|
+
forceEmptyView: !!M
|
|
719
|
+
}, r();
|
|
549
720
|
}
|
|
550
|
-
function g(
|
|
551
|
-
return e.artifacts.filter((
|
|
721
|
+
function g(M) {
|
|
722
|
+
return e.artifacts.filter((y) => y.messageId === M);
|
|
552
723
|
}
|
|
553
|
-
function f() {
|
|
554
|
-
return e.artifacts.
|
|
724
|
+
function f(M) {
|
|
725
|
+
return e.artifacts.filter((y) => y.type === M);
|
|
555
726
|
}
|
|
556
727
|
function b() {
|
|
728
|
+
return e.artifacts.length;
|
|
729
|
+
}
|
|
730
|
+
function v(M) {
|
|
731
|
+
const y = u(M);
|
|
732
|
+
if (!y) return;
|
|
733
|
+
const H = e.openTabs.includes(M) ? e.openTabs : [...e.openTabs, M];
|
|
734
|
+
let P = e.tabViewModes[M];
|
|
735
|
+
P || (P = y.isPreviewable === !1 ? "code" : "preview", y.tabs && !y.tabs.includes(P) && (P = y.tabs[0])), e = {
|
|
736
|
+
...e,
|
|
737
|
+
openTabs: H,
|
|
738
|
+
activeArtifactId: M,
|
|
739
|
+
tabViewModes: { ...e.tabViewModes, [M]: P },
|
|
740
|
+
viewMode: P
|
|
741
|
+
}, r();
|
|
742
|
+
}
|
|
743
|
+
function x(M) {
|
|
744
|
+
const y = e.openTabs.indexOf(M);
|
|
745
|
+
if (y === -1) return;
|
|
746
|
+
const z = e.openTabs.filter((K) => K !== M), { [M]: H, ...P } = e.tabViewModes;
|
|
747
|
+
let T = e.activeArtifactId;
|
|
748
|
+
e.activeArtifactId === M && (z.length === 0 ? T = null : y >= z.length ? T = z[z.length - 1] : T = z[y]);
|
|
749
|
+
const W = T && P[T] || "preview";
|
|
750
|
+
e = {
|
|
751
|
+
...e,
|
|
752
|
+
openTabs: z,
|
|
753
|
+
activeArtifactId: T,
|
|
754
|
+
tabViewModes: P,
|
|
755
|
+
viewMode: W
|
|
756
|
+
}, r();
|
|
757
|
+
}
|
|
758
|
+
function $(M) {
|
|
759
|
+
if (!u(M)) return;
|
|
760
|
+
const z = e.tabViewModes[M] || e.viewMode;
|
|
761
|
+
e = {
|
|
762
|
+
...e,
|
|
763
|
+
openTabs: [M],
|
|
764
|
+
activeArtifactId: M,
|
|
765
|
+
tabViewModes: { [M]: z },
|
|
766
|
+
viewMode: z
|
|
767
|
+
}, r();
|
|
768
|
+
}
|
|
769
|
+
function A() {
|
|
770
|
+
e = {
|
|
771
|
+
...e,
|
|
772
|
+
openTabs: [],
|
|
773
|
+
activeArtifactId: null,
|
|
774
|
+
tabViewModes: {}
|
|
775
|
+
}, r();
|
|
776
|
+
}
|
|
777
|
+
function C() {
|
|
557
778
|
e = {
|
|
558
779
|
artifacts: [],
|
|
559
780
|
activeArtifactId: null,
|
|
560
781
|
isPanelOpen: !1,
|
|
561
782
|
viewMode: "preview",
|
|
562
|
-
isFullscreen: !1
|
|
783
|
+
isFullscreen: !1,
|
|
784
|
+
openTabs: [],
|
|
785
|
+
tabViewModes: {},
|
|
786
|
+
forceEmptyView: !1
|
|
563
787
|
}, r();
|
|
564
788
|
}
|
|
565
|
-
function
|
|
566
|
-
const
|
|
567
|
-
let
|
|
568
|
-
const
|
|
569
|
-
|
|
789
|
+
function R(M) {
|
|
790
|
+
const y = r;
|
|
791
|
+
let z = !1;
|
|
792
|
+
const H = () => {
|
|
793
|
+
z = !0;
|
|
570
794
|
};
|
|
571
795
|
try {
|
|
572
796
|
Object.defineProperty(window, "__artifactuse_notify__", {
|
|
573
|
-
value:
|
|
797
|
+
value: H,
|
|
574
798
|
configurable: !0
|
|
575
|
-
}),
|
|
799
|
+
}), M();
|
|
576
800
|
} finally {
|
|
577
|
-
delete window.__artifactuse_notify__,
|
|
801
|
+
delete window.__artifactuse_notify__, z && y();
|
|
578
802
|
}
|
|
579
803
|
}
|
|
580
804
|
return {
|
|
@@ -586,22 +810,28 @@ function ta() {
|
|
|
586
810
|
addArtifacts: o,
|
|
587
811
|
removeArtifact: i,
|
|
588
812
|
getArtifact: u,
|
|
589
|
-
getActiveArtifact:
|
|
590
|
-
getArtifactsByMessageId:
|
|
591
|
-
getArtifactsByType:
|
|
592
|
-
getArtifactCount:
|
|
813
|
+
getActiveArtifact: l,
|
|
814
|
+
getArtifactsByMessageId: g,
|
|
815
|
+
getArtifactsByType: f,
|
|
816
|
+
getArtifactCount: b,
|
|
593
817
|
// Panel state
|
|
594
818
|
setActiveArtifact: d,
|
|
595
819
|
clearActiveArtifact: p,
|
|
596
820
|
setPanelOpen: w,
|
|
597
|
-
setViewMode:
|
|
821
|
+
setViewMode: c,
|
|
598
822
|
setFullscreen: m,
|
|
823
|
+
setForceEmptyView: h,
|
|
824
|
+
// Multi-tab
|
|
825
|
+
openTab: v,
|
|
826
|
+
closeTab: x,
|
|
827
|
+
closeOtherTabs: $,
|
|
828
|
+
closeAllTabs: A,
|
|
599
829
|
// Utilities
|
|
600
|
-
clear:
|
|
601
|
-
batch:
|
|
830
|
+
clear: C,
|
|
831
|
+
batch: R
|
|
602
832
|
};
|
|
603
833
|
}
|
|
604
|
-
function
|
|
834
|
+
function ct(e) {
|
|
605
835
|
try {
|
|
606
836
|
return new URL(e).hostname;
|
|
607
837
|
} catch {
|
|
@@ -612,129 +842,129 @@ function ra(e = []) {
|
|
|
612
842
|
const t = Array.isArray(e) ? e : [e].filter(Boolean), r = new Set(t), a = /* @__PURE__ */ new Map();
|
|
613
843
|
let s = null, n = !1, o = !1;
|
|
614
844
|
const i = [];
|
|
615
|
-
function u(
|
|
845
|
+
function u(y) {
|
|
616
846
|
if (r.size === 0)
|
|
617
847
|
return console.warn("Artifactuse bridge: No allowed origins configured, accepting all messages"), !0;
|
|
618
|
-
const
|
|
619
|
-
if (!
|
|
620
|
-
for (const
|
|
621
|
-
const
|
|
622
|
-
if (
|
|
848
|
+
const z = ct(y);
|
|
849
|
+
if (!z) return !1;
|
|
850
|
+
for (const H of r) {
|
|
851
|
+
const P = ct(H);
|
|
852
|
+
if (P && P === z || H === z)
|
|
623
853
|
return !0;
|
|
624
854
|
}
|
|
625
855
|
return !1;
|
|
626
856
|
}
|
|
627
|
-
function
|
|
628
|
-
var U,
|
|
629
|
-
if (((U =
|
|
630
|
-
((
|
|
857
|
+
function l(y) {
|
|
858
|
+
var U, J, k;
|
|
859
|
+
if (((U = y.data) == null ? void 0 : U.type) === "artifactuse" && (console.log("[Bridge] Message from:", y.origin, "action:", (J = y.data) == null ? void 0 : J.action), console.log("[Bridge] Allowed origins:", w())), !u(y.origin)) {
|
|
860
|
+
((k = y.data) == null ? void 0 : k.type) === "artifactuse" && console.warn("[Bridge] Origin NOT allowed:", y.origin);
|
|
631
861
|
return;
|
|
632
862
|
}
|
|
633
|
-
const { type:
|
|
634
|
-
if (
|
|
635
|
-
if (
|
|
863
|
+
const { type: z, action: H, data: P, requestId: T } = y.data || {};
|
|
864
|
+
if (z !== "artifactuse") return;
|
|
865
|
+
if (H === "ready" || H === "panel:ready") {
|
|
636
866
|
console.log("[Bridge] panel:ready received, setting isReady=true"), n = !0, o = !0, m();
|
|
637
867
|
return;
|
|
638
868
|
}
|
|
639
|
-
(a.get(
|
|
869
|
+
(a.get(H) || []).forEach((_) => {
|
|
640
870
|
try {
|
|
641
|
-
|
|
642
|
-
} catch (
|
|
643
|
-
console.error(`Artifactuse bridge handler error (${
|
|
871
|
+
_(P, T);
|
|
872
|
+
} catch (L) {
|
|
873
|
+
console.error(`Artifactuse bridge handler error (${H}):`, L);
|
|
644
874
|
}
|
|
645
|
-
}), (a.get("*") || []).forEach((
|
|
875
|
+
}), (a.get("*") || []).forEach((_) => {
|
|
646
876
|
try {
|
|
647
|
-
|
|
648
|
-
} catch (
|
|
649
|
-
console.error("Artifactuse bridge wildcard handler error:",
|
|
877
|
+
_({ action: H, data: P, requestId: T });
|
|
878
|
+
} catch (L) {
|
|
879
|
+
console.error("Artifactuse bridge wildcard handler error:", L);
|
|
650
880
|
}
|
|
651
881
|
});
|
|
652
882
|
}
|
|
653
|
-
window.addEventListener("message",
|
|
654
|
-
function d(
|
|
655
|
-
|
|
883
|
+
window.addEventListener("message", l);
|
|
884
|
+
function d(y) {
|
|
885
|
+
y && typeof y == "string" && r.add(y);
|
|
656
886
|
}
|
|
657
|
-
function p(
|
|
658
|
-
|
|
887
|
+
function p(y) {
|
|
888
|
+
y && typeof y == "string" && r.delete(y);
|
|
659
889
|
}
|
|
660
890
|
function w() {
|
|
661
891
|
return [...r];
|
|
662
892
|
}
|
|
663
|
-
function
|
|
664
|
-
console.log("[Bridge] setIframe called, current isReady:", n, "readySignalReceived:", o, "same iframe:", s ===
|
|
893
|
+
function c(y) {
|
|
894
|
+
console.log("[Bridge] setIframe called, current isReady:", n, "readySignalReceived:", o, "same iframe:", s === y), s !== y && (s = y, o ? (console.log("[Bridge] Ready signal was already received, keeping isReady=true"), n = !0) : n = !1), console.log("[Bridge] setIframe done, isReady:", n, "pendingMessages:", i.length), m();
|
|
665
895
|
}
|
|
666
896
|
function m() {
|
|
667
|
-
console.log("[Bridge] flushPendingMessages: isReady=", n, "hasIframe=", !!(s != null && s.contentWindow), "pending=", i.length), n && (s != null && s.contentWindow) && i.length > 0 && (console.log("[Bridge] Flushing", i.length, "pending messages"), i.forEach((
|
|
897
|
+
console.log("[Bridge] flushPendingMessages: isReady=", n, "hasIframe=", !!(s != null && s.contentWindow), "pending=", i.length), n && (s != null && s.contentWindow) && i.length > 0 && (console.log("[Bridge] Flushing", i.length, "pending messages"), i.forEach((y) => h(y)), i.length = 0);
|
|
668
898
|
}
|
|
669
|
-
function h(
|
|
899
|
+
function h(y, z = "*") {
|
|
670
900
|
if (!(s != null && s.contentWindow))
|
|
671
901
|
return console.warn("Artifactuse: No panel iframe available"), !1;
|
|
672
902
|
try {
|
|
673
|
-
return s.contentWindow.postMessage(
|
|
674
|
-
} catch (
|
|
675
|
-
return console.error("Artifactuse bridge send error:",
|
|
903
|
+
return s.contentWindow.postMessage(y, z), !0;
|
|
904
|
+
} catch (H) {
|
|
905
|
+
return console.error("Artifactuse bridge send error:", H), !1;
|
|
676
906
|
}
|
|
677
907
|
}
|
|
678
|
-
function g(
|
|
679
|
-
const
|
|
908
|
+
function g(y, z, H = null, P = "*") {
|
|
909
|
+
const T = {
|
|
680
910
|
type: "artifactuse",
|
|
681
|
-
action:
|
|
682
|
-
data:
|
|
683
|
-
requestId:
|
|
911
|
+
action: y,
|
|
912
|
+
data: z,
|
|
913
|
+
requestId: H || ut(),
|
|
684
914
|
timestamp: Date.now()
|
|
685
915
|
};
|
|
686
|
-
return n ? (h(
|
|
687
|
-
}
|
|
688
|
-
function f(
|
|
689
|
-
return new Promise((
|
|
690
|
-
const
|
|
691
|
-
|
|
692
|
-
},
|
|
693
|
-
|
|
916
|
+
return n ? (h(T, P), T.requestId) : (i.push(T), T.requestId);
|
|
917
|
+
}
|
|
918
|
+
function f(y, z, H = 3e4) {
|
|
919
|
+
return new Promise((P, T) => {
|
|
920
|
+
const W = ut(), K = setTimeout(() => {
|
|
921
|
+
v(`${y}:response`, U), T(new Error(`Artifactuse bridge request timeout: ${y}`));
|
|
922
|
+
}, H), U = (J, k) => {
|
|
923
|
+
k === W && (clearTimeout(K), v(`${y}:response`, U), P(J));
|
|
694
924
|
};
|
|
695
|
-
b(`${
|
|
925
|
+
b(`${y}:response`, U), g(y, z, W);
|
|
696
926
|
});
|
|
697
927
|
}
|
|
698
|
-
function b(
|
|
699
|
-
return a.has(
|
|
928
|
+
function b(y, z) {
|
|
929
|
+
return a.has(y) || a.set(y, []), a.get(y).push(z), () => v(y, z);
|
|
700
930
|
}
|
|
701
|
-
function y
|
|
702
|
-
const
|
|
703
|
-
if (
|
|
704
|
-
const
|
|
705
|
-
|
|
931
|
+
function v(y, z) {
|
|
932
|
+
const H = a.get(y);
|
|
933
|
+
if (H) {
|
|
934
|
+
const P = H.indexOf(z);
|
|
935
|
+
P > -1 && H.splice(P, 1);
|
|
706
936
|
}
|
|
707
937
|
}
|
|
708
|
-
function
|
|
709
|
-
return g("load:artifact",
|
|
938
|
+
function x(y) {
|
|
939
|
+
return g("load:artifact", y);
|
|
710
940
|
}
|
|
711
|
-
function
|
|
712
|
-
return g("update:artifact", { artifactId:
|
|
941
|
+
function $(y, z) {
|
|
942
|
+
return g("update:artifact", { artifactId: y, updates: z });
|
|
713
943
|
}
|
|
714
|
-
function
|
|
944
|
+
function A() {
|
|
715
945
|
return f("save", {});
|
|
716
946
|
}
|
|
717
|
-
function
|
|
718
|
-
return f("export", { format:
|
|
947
|
+
function C(y = "default") {
|
|
948
|
+
return f("export", { format: y });
|
|
719
949
|
}
|
|
720
|
-
function
|
|
721
|
-
return g("ai:response",
|
|
950
|
+
function R(y, z) {
|
|
951
|
+
return g("ai:response", y, z);
|
|
722
952
|
}
|
|
723
|
-
function
|
|
724
|
-
window.removeEventListener("message",
|
|
953
|
+
function M() {
|
|
954
|
+
window.removeEventListener("message", l), a.clear(), r.clear(), s = null, n = !1, o = !1, i.length = 0;
|
|
725
955
|
}
|
|
726
956
|
return {
|
|
727
|
-
setIframe:
|
|
957
|
+
setIframe: c,
|
|
728
958
|
send: g,
|
|
729
959
|
request: f,
|
|
730
960
|
on: b,
|
|
731
|
-
off:
|
|
732
|
-
loadArtifact:
|
|
733
|
-
updateArtifact:
|
|
734
|
-
requestSave:
|
|
735
|
-
requestExport:
|
|
736
|
-
sendAIResponse:
|
|
737
|
-
destroy:
|
|
961
|
+
off: v,
|
|
962
|
+
loadArtifact: x,
|
|
963
|
+
updateArtifact: $,
|
|
964
|
+
requestSave: A,
|
|
965
|
+
requestExport: C,
|
|
966
|
+
sendAIResponse: R,
|
|
967
|
+
destroy: M,
|
|
738
968
|
// Origin management
|
|
739
969
|
addAllowedOrigin: d,
|
|
740
970
|
removeAllowedOrigin: p,
|
|
@@ -865,16 +1095,16 @@ function na(e = "auto", t = {}) {
|
|
|
865
1095
|
}
|
|
866
1096
|
function i() {
|
|
867
1097
|
const m = o();
|
|
868
|
-
return Object.entries(m).map(([h, g]) => `--artifactuse-${
|
|
1098
|
+
return Object.entries(m).map(([h, g]) => `--artifactuse-${le(h)}: ${g};`).join(`
|
|
869
1099
|
`);
|
|
870
1100
|
}
|
|
871
1101
|
function u(m = document.documentElement) {
|
|
872
1102
|
const h = o(), g = n();
|
|
873
1103
|
Object.entries(h).forEach(([f, b]) => {
|
|
874
|
-
m.style.setProperty(`--artifactuse-${
|
|
1104
|
+
m.style.setProperty(`--artifactuse-${le(f)}`, b);
|
|
875
1105
|
}), m.setAttribute("data-artifactuse-theme", g), m.classList.remove("artifactuse-dark", "artifactuse-light"), m.classList.add(`artifactuse-${g}`);
|
|
876
1106
|
}
|
|
877
|
-
function
|
|
1107
|
+
function l(m) {
|
|
878
1108
|
if (!["dark", "light", "auto"].includes(m)) {
|
|
879
1109
|
console.warn(`Invalid theme: ${m}`);
|
|
880
1110
|
return;
|
|
@@ -883,7 +1113,7 @@ function na(e = "auto", t = {}) {
|
|
|
883
1113
|
}
|
|
884
1114
|
function d() {
|
|
885
1115
|
const m = n();
|
|
886
|
-
|
|
1116
|
+
l(m === "dark" ? "light" : "dark");
|
|
887
1117
|
}
|
|
888
1118
|
function p(m, h = null) {
|
|
889
1119
|
const g = ve(m);
|
|
@@ -897,22 +1127,22 @@ function na(e = "auto", t = {}) {
|
|
|
897
1127
|
h.removeEventListener("change", g);
|
|
898
1128
|
};
|
|
899
1129
|
}
|
|
900
|
-
function
|
|
1130
|
+
function c() {
|
|
901
1131
|
return `
|
|
902
1132
|
:root,
|
|
903
1133
|
[data-artifactuse-theme="dark"] {
|
|
904
|
-
${Object.entries(a.dark).map(([m, h]) => `--artifactuse-${
|
|
1134
|
+
${Object.entries(a.dark).map(([m, h]) => `--artifactuse-${le(m)}: ${h};`).join(`
|
|
905
1135
|
`)}
|
|
906
1136
|
}
|
|
907
1137
|
|
|
908
1138
|
[data-artifactuse-theme="light"] {
|
|
909
|
-
${Object.entries(a.light).map(([m, h]) => `--artifactuse-${
|
|
1139
|
+
${Object.entries(a.light).map(([m, h]) => `--artifactuse-${le(m)}: ${h};`).join(`
|
|
910
1140
|
`)}
|
|
911
1141
|
}
|
|
912
1142
|
|
|
913
1143
|
@media (prefers-color-scheme: light) {
|
|
914
1144
|
:root:not([data-artifactuse-theme]) {
|
|
915
|
-
${Object.entries(a.light).map(([m, h]) => `--artifactuse-${
|
|
1145
|
+
${Object.entries(a.light).map(([m, h]) => `--artifactuse-${le(m)}: ${h};`).join(`
|
|
916
1146
|
`)}
|
|
917
1147
|
}
|
|
918
1148
|
}
|
|
@@ -931,19 +1161,19 @@ function na(e = "auto", t = {}) {
|
|
|
931
1161
|
getResolvedTheme: n,
|
|
932
1162
|
getColors: o,
|
|
933
1163
|
getCSSVariables: i,
|
|
934
|
-
getCSS:
|
|
1164
|
+
getCSS: c,
|
|
935
1165
|
apply: u,
|
|
936
|
-
set:
|
|
1166
|
+
set: l,
|
|
937
1167
|
toggle: d,
|
|
938
1168
|
setColors: p,
|
|
939
1169
|
watchSystemTheme: w
|
|
940
1170
|
};
|
|
941
1171
|
}
|
|
942
|
-
function
|
|
1172
|
+
function le(e) {
|
|
943
1173
|
return e.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase();
|
|
944
1174
|
}
|
|
945
1175
|
const Xe = "artifactuse_auth", gr = "https://app.artifactuse.com", ge = "https://api.artifactuse.com";
|
|
946
|
-
function
|
|
1176
|
+
function Le() {
|
|
947
1177
|
if (typeof window > "u" || !window.localStorage)
|
|
948
1178
|
return null;
|
|
949
1179
|
try {
|
|
@@ -978,8 +1208,8 @@ async function oa(e, t = {}) {
|
|
|
978
1208
|
}
|
|
979
1209
|
return a.json();
|
|
980
1210
|
}
|
|
981
|
-
async function
|
|
982
|
-
const { apiUrl: r = ge, getStoredAuthData: a =
|
|
1211
|
+
async function la(e, t = {}) {
|
|
1212
|
+
const { apiUrl: r = ge, getStoredAuthData: a = Le } = t, s = a();
|
|
983
1213
|
if (!(s != null && s.token))
|
|
984
1214
|
throw new Error("Authentication required. Please sign in first.");
|
|
985
1215
|
const n = await fetch(`${r}/v1/project/save`, {
|
|
@@ -1000,11 +1230,11 @@ async function ca(e, t = {}) {
|
|
|
1000
1230
|
}
|
|
1001
1231
|
return n.json();
|
|
1002
1232
|
}
|
|
1003
|
-
function
|
|
1233
|
+
function ca(e = {}) {
|
|
1004
1234
|
const {
|
|
1005
1235
|
appUrl: t = gr,
|
|
1006
1236
|
setStoredAuthData: r = ia,
|
|
1007
|
-
getStoredAuthData: a =
|
|
1237
|
+
getStoredAuthData: a = Le
|
|
1008
1238
|
} = e;
|
|
1009
1239
|
return new Promise((s, n) => {
|
|
1010
1240
|
const o = window.location.origin, i = `${t}/sdk/auth?origin=${encodeURIComponent(o)}`, u = window.open(
|
|
@@ -1016,18 +1246,18 @@ function la(e = {}) {
|
|
|
1016
1246
|
n(new Error("Failed to open auth popup. Please allow popups for this site."));
|
|
1017
1247
|
return;
|
|
1018
1248
|
}
|
|
1019
|
-
const
|
|
1249
|
+
const l = (p) => {
|
|
1020
1250
|
var w;
|
|
1021
1251
|
if (p.origin === t && ((w = p.data) == null ? void 0 : w.type) === "sdk-auth") {
|
|
1022
|
-
window.removeEventListener("message",
|
|
1023
|
-
const { token:
|
|
1024
|
-
|
|
1252
|
+
window.removeEventListener("message", l);
|
|
1253
|
+
const { token: c, user: m } = p.data;
|
|
1254
|
+
c ? (r({ token: c, user: m }), s({ token: c, user: m })) : n(new Error("Authentication failed"));
|
|
1025
1255
|
}
|
|
1026
1256
|
};
|
|
1027
|
-
window.addEventListener("message",
|
|
1257
|
+
window.addEventListener("message", l);
|
|
1028
1258
|
const d = setInterval(() => {
|
|
1029
1259
|
if (u.closed) {
|
|
1030
|
-
clearInterval(d), window.removeEventListener("message",
|
|
1260
|
+
clearInterval(d), window.removeEventListener("message", l);
|
|
1031
1261
|
const p = a();
|
|
1032
1262
|
p != null && p.token ? s(p) : n(new Error("Authentication cancelled"));
|
|
1033
1263
|
}
|
|
@@ -1035,7 +1265,7 @@ function la(e = {}) {
|
|
|
1035
1265
|
});
|
|
1036
1266
|
}
|
|
1037
1267
|
async function ua(e = {}) {
|
|
1038
|
-
const { apiUrl: t = ge, language: r, getStoredAuthData: a =
|
|
1268
|
+
const { apiUrl: t = ge, language: r, getStoredAuthData: a = Le } = e, s = a();
|
|
1039
1269
|
if (!(s != null && s.token))
|
|
1040
1270
|
throw new Error("Authentication required. Please sign in first.");
|
|
1041
1271
|
const n = new URLSearchParams();
|
|
@@ -1054,7 +1284,7 @@ async function ua(e = {}) {
|
|
|
1054
1284
|
return o.json();
|
|
1055
1285
|
}
|
|
1056
1286
|
async function da(e, t, r = {}) {
|
|
1057
|
-
const { apiUrl: a = ge, getStoredAuthData: s =
|
|
1287
|
+
const { apiUrl: a = ge, getStoredAuthData: s = Le } = r, n = s();
|
|
1058
1288
|
if (!(n != null && n.token))
|
|
1059
1289
|
throw new Error("Authentication required. Please sign in first.");
|
|
1060
1290
|
const o = await fetch(`${a}/v1/project/update`, {
|
|
@@ -1100,7 +1330,7 @@ function pa(e = {}) {
|
|
|
1100
1330
|
} catch {
|
|
1101
1331
|
}
|
|
1102
1332
|
}
|
|
1103
|
-
function
|
|
1333
|
+
function l() {
|
|
1104
1334
|
if (!(typeof window > "u" || !window.localStorage))
|
|
1105
1335
|
try {
|
|
1106
1336
|
localStorage.removeItem(a);
|
|
@@ -1124,14 +1354,14 @@ function pa(e = {}) {
|
|
|
1124
1354
|
},
|
|
1125
1355
|
getStoredAuthData: i,
|
|
1126
1356
|
setStoredAuthData: u,
|
|
1127
|
-
clearStoredAuthData:
|
|
1128
|
-
signOut:
|
|
1357
|
+
clearStoredAuthData: l,
|
|
1358
|
+
signOut: l,
|
|
1129
1359
|
// API methods
|
|
1130
1360
|
share: (d) => oa(d, { apiUrl: t }),
|
|
1131
|
-
save: (d) =>
|
|
1361
|
+
save: (d) => la(d, { apiUrl: t, getStoredAuthData: i }),
|
|
1132
1362
|
listArtifacts: (d) => ua({ apiUrl: t, language: d, getStoredAuthData: i }),
|
|
1133
1363
|
updateArtifact: (d, p) => da(d, p, { apiUrl: t, getStoredAuthData: i }),
|
|
1134
|
-
openAuthPopup: () =>
|
|
1364
|
+
openAuthPopup: () => ca({ appUrl: r, setStoredAuthData: u, getStoredAuthData: i })
|
|
1135
1365
|
};
|
|
1136
1366
|
}
|
|
1137
1367
|
function fa(e = {}) {
|
|
@@ -1287,61 +1517,61 @@ function fa(e = {}) {
|
|
|
1287
1517
|
}
|
|
1288
1518
|
}, { dark: !1 });
|
|
1289
1519
|
}
|
|
1290
|
-
function o(w,
|
|
1520
|
+
function o(w, c, m) {
|
|
1291
1521
|
return m ? w.define([
|
|
1292
|
-
{ tag:
|
|
1293
|
-
{ tag:
|
|
1294
|
-
{ tag:
|
|
1295
|
-
{ tag:
|
|
1296
|
-
{ tag:
|
|
1297
|
-
{ tag:
|
|
1298
|
-
{ tag:
|
|
1299
|
-
{ tag:
|
|
1300
|
-
{ tag:
|
|
1301
|
-
{ tag:
|
|
1302
|
-
{ tag:
|
|
1303
|
-
{ tag:
|
|
1304
|
-
{ tag:
|
|
1305
|
-
{ tag:
|
|
1306
|
-
{ tag:
|
|
1307
|
-
{ tag:
|
|
1308
|
-
{ tag:
|
|
1309
|
-
{ tag:
|
|
1310
|
-
{ tag:
|
|
1311
|
-
{ tag:
|
|
1312
|
-
{ tag:
|
|
1313
|
-
{ tag:
|
|
1314
|
-
{ tag:
|
|
1315
|
-
{ tag:
|
|
1316
|
-
{ tag:
|
|
1317
|
-
{ tag:
|
|
1522
|
+
{ tag: c.keyword, color: "#c084fc" },
|
|
1523
|
+
{ tag: c.operator, color: "#94a3b8" },
|
|
1524
|
+
{ tag: c.special(c.variableName), color: "#67e8f9" },
|
|
1525
|
+
{ tag: c.typeName, color: "#fbbf24" },
|
|
1526
|
+
{ tag: c.atom, color: "#fb923c" },
|
|
1527
|
+
{ tag: c.number, color: "#fb923c" },
|
|
1528
|
+
{ tag: c.definition(c.variableName), color: "#67e8f9" },
|
|
1529
|
+
{ tag: c.string, color: "#86efac" },
|
|
1530
|
+
{ tag: c.special(c.string), color: "#86efac" },
|
|
1531
|
+
{ tag: c.comment, color: "#6b7280", fontStyle: "italic" },
|
|
1532
|
+
{ tag: c.variableName, color: "#e4e4e7" },
|
|
1533
|
+
{ tag: c.tagName, color: "#f87171" },
|
|
1534
|
+
{ tag: c.bracket, color: "#a1a1aa" },
|
|
1535
|
+
{ tag: c.meta, color: "#fbbf24" },
|
|
1536
|
+
{ tag: c.link, color: "#60a5fa", textDecoration: "underline" },
|
|
1537
|
+
{ tag: c.heading, fontWeight: "bold", color: "#f472b6" },
|
|
1538
|
+
{ tag: c.emphasis, fontStyle: "italic" },
|
|
1539
|
+
{ tag: c.strong, fontWeight: "bold" },
|
|
1540
|
+
{ tag: c.strikethrough, textDecoration: "line-through" },
|
|
1541
|
+
{ tag: c.className, color: "#fbbf24" },
|
|
1542
|
+
{ tag: c.propertyName, color: "#60a5fa" },
|
|
1543
|
+
{ tag: c.function(c.variableName), color: "#60a5fa" },
|
|
1544
|
+
{ tag: c.function(c.propertyName), color: "#60a5fa" },
|
|
1545
|
+
{ tag: c.bool, color: "#fb923c" },
|
|
1546
|
+
{ tag: c.null, color: "#fb923c" },
|
|
1547
|
+
{ tag: c.regexp, color: "#f87171" }
|
|
1318
1548
|
]) : w.define([
|
|
1319
|
-
{ tag:
|
|
1320
|
-
{ tag:
|
|
1321
|
-
{ tag:
|
|
1322
|
-
{ tag:
|
|
1323
|
-
{ tag:
|
|
1324
|
-
{ tag:
|
|
1325
|
-
{ tag:
|
|
1326
|
-
{ tag:
|
|
1327
|
-
{ tag:
|
|
1328
|
-
{ tag:
|
|
1329
|
-
{ tag:
|
|
1330
|
-
{ tag:
|
|
1331
|
-
{ tag:
|
|
1332
|
-
{ tag:
|
|
1333
|
-
{ tag:
|
|
1334
|
-
{ tag:
|
|
1335
|
-
{ tag:
|
|
1336
|
-
{ tag:
|
|
1337
|
-
{ tag:
|
|
1338
|
-
{ tag:
|
|
1339
|
-
{ tag:
|
|
1340
|
-
{ tag:
|
|
1341
|
-
{ tag:
|
|
1342
|
-
{ tag:
|
|
1343
|
-
{ tag:
|
|
1344
|
-
{ tag:
|
|
1549
|
+
{ tag: c.keyword, color: "#7c3aed" },
|
|
1550
|
+
{ tag: c.operator, color: "#64748b" },
|
|
1551
|
+
{ tag: c.special(c.variableName), color: "#0891b2" },
|
|
1552
|
+
{ tag: c.typeName, color: "#d97706" },
|
|
1553
|
+
{ tag: c.atom, color: "#ea580c" },
|
|
1554
|
+
{ tag: c.number, color: "#ea580c" },
|
|
1555
|
+
{ tag: c.definition(c.variableName), color: "#0891b2" },
|
|
1556
|
+
{ tag: c.string, color: "#16a34a" },
|
|
1557
|
+
{ tag: c.special(c.string), color: "#16a34a" },
|
|
1558
|
+
{ tag: c.comment, color: "#9ca3af", fontStyle: "italic" },
|
|
1559
|
+
{ tag: c.variableName, color: "#27272a" },
|
|
1560
|
+
{ tag: c.tagName, color: "#dc2626" },
|
|
1561
|
+
{ tag: c.bracket, color: "#71717a" },
|
|
1562
|
+
{ tag: c.meta, color: "#d97706" },
|
|
1563
|
+
{ tag: c.link, color: "#2563eb", textDecoration: "underline" },
|
|
1564
|
+
{ tag: c.heading, fontWeight: "bold", color: "#db2777" },
|
|
1565
|
+
{ tag: c.emphasis, fontStyle: "italic" },
|
|
1566
|
+
{ tag: c.strong, fontWeight: "bold" },
|
|
1567
|
+
{ tag: c.strikethrough, textDecoration: "line-through" },
|
|
1568
|
+
{ tag: c.className, color: "#d97706" },
|
|
1569
|
+
{ tag: c.propertyName, color: "#2563eb" },
|
|
1570
|
+
{ tag: c.function(c.variableName), color: "#2563eb" },
|
|
1571
|
+
{ tag: c.function(c.propertyName), color: "#2563eb" },
|
|
1572
|
+
{ tag: c.bool, color: "#ea580c" },
|
|
1573
|
+
{ tag: c.null, color: "#ea580c" },
|
|
1574
|
+
{ tag: c.regexp, color: "#dc2626" }
|
|
1345
1575
|
]);
|
|
1346
1576
|
}
|
|
1347
1577
|
const i = {
|
|
@@ -1379,16 +1609,16 @@ function fa(e = {}) {
|
|
|
1379
1609
|
scss: { mod: "langSass", fn: "sass" }
|
|
1380
1610
|
};
|
|
1381
1611
|
function u(w) {
|
|
1382
|
-
const
|
|
1383
|
-
if (!
|
|
1384
|
-
const m = t[
|
|
1385
|
-
return !m || typeof m[
|
|
1612
|
+
const c = i[w == null ? void 0 : w.toLowerCase()];
|
|
1613
|
+
if (!c) return [];
|
|
1614
|
+
const m = t[c.mod];
|
|
1615
|
+
return !m || typeof m[c.fn] != "function" ? [] : c.opts ? m[c.fn](c.opts) : m[c.fn]();
|
|
1386
1616
|
}
|
|
1387
|
-
function
|
|
1617
|
+
function l(w) {
|
|
1388
1618
|
return r === "auto" ? w === "dark" : r === "dark";
|
|
1389
1619
|
}
|
|
1390
|
-
function d(w,
|
|
1391
|
-
var
|
|
1620
|
+
function d(w, c = {}) {
|
|
1621
|
+
var B, be;
|
|
1392
1622
|
if (!a())
|
|
1393
1623
|
return console.warn("Artifactuse: CodeMirror modules not provided. Editor not available."), null;
|
|
1394
1624
|
const { EditorState: m } = t.state, {
|
|
@@ -1396,80 +1626,80 @@ function fa(e = {}) {
|
|
|
1396
1626
|
keymap: g,
|
|
1397
1627
|
lineNumbers: f,
|
|
1398
1628
|
highlightActiveLineGutter: b,
|
|
1399
|
-
highlightSpecialChars:
|
|
1400
|
-
drawSelection:
|
|
1401
|
-
dropCursor:
|
|
1402
|
-
rectangularSelection:
|
|
1403
|
-
crosshairCursor:
|
|
1404
|
-
highlightActiveLine:
|
|
1405
|
-
} = t.view, { defaultKeymap:
|
|
1406
|
-
indentOnInput:
|
|
1407
|
-
syntaxHighlighting:
|
|
1408
|
-
bracketMatching:
|
|
1409
|
-
foldGutter:
|
|
1629
|
+
highlightSpecialChars: v,
|
|
1630
|
+
drawSelection: x,
|
|
1631
|
+
dropCursor: $,
|
|
1632
|
+
rectangularSelection: A,
|
|
1633
|
+
crosshairCursor: C,
|
|
1634
|
+
highlightActiveLine: R
|
|
1635
|
+
} = t.view, { defaultKeymap: M, history: y, historyKeymap: z, indentWithTab: H } = t.commands, {
|
|
1636
|
+
indentOnInput: P,
|
|
1637
|
+
syntaxHighlighting: T,
|
|
1638
|
+
bracketMatching: W,
|
|
1639
|
+
foldGutter: K,
|
|
1410
1640
|
foldKeymap: U,
|
|
1411
|
-
HighlightStyle:
|
|
1641
|
+
HighlightStyle: J
|
|
1412
1642
|
} = t.language, {
|
|
1413
|
-
closeBrackets:
|
|
1414
|
-
closeBracketsKeymap:
|
|
1415
|
-
autocompletion:
|
|
1416
|
-
completionKeymap:
|
|
1417
|
-
} = t.autocomplete,
|
|
1643
|
+
closeBrackets: k,
|
|
1644
|
+
closeBracketsKeymap: _,
|
|
1645
|
+
autocompletion: L,
|
|
1646
|
+
completionKeymap: S
|
|
1647
|
+
} = t.autocomplete, D = ((B = t.lezerHighlight) == null ? void 0 : B.tags) || ((be = t.language) == null ? void 0 : be.tags), E = l(c.sdkTheme), Z = E ? s(h) : n(h), ne = [
|
|
1418
1648
|
f(),
|
|
1419
1649
|
b(),
|
|
1650
|
+
v(),
|
|
1420
1651
|
y(),
|
|
1421
|
-
|
|
1422
|
-
te({
|
|
1652
|
+
K({
|
|
1423
1653
|
openText: "▾",
|
|
1424
1654
|
closedText: "▸"
|
|
1425
1655
|
}),
|
|
1426
|
-
v(),
|
|
1427
1656
|
x(),
|
|
1657
|
+
$(),
|
|
1428
1658
|
m.allowMultipleSelections.of(!0),
|
|
1429
|
-
|
|
1430
|
-
...
|
|
1431
|
-
|
|
1659
|
+
P(),
|
|
1660
|
+
...D ? [T(o(J, D, E))] : [],
|
|
1661
|
+
W(),
|
|
1662
|
+
k(),
|
|
1663
|
+
L(),
|
|
1664
|
+
A(),
|
|
1432
1665
|
C(),
|
|
1433
|
-
S(),
|
|
1434
|
-
$(),
|
|
1435
1666
|
R(),
|
|
1436
|
-
z(),
|
|
1437
1667
|
g.of([
|
|
1438
|
-
...
|
|
1439
|
-
...
|
|
1440
|
-
...
|
|
1668
|
+
..._,
|
|
1669
|
+
...M,
|
|
1670
|
+
...z,
|
|
1441
1671
|
...U,
|
|
1442
|
-
...
|
|
1443
|
-
|
|
1672
|
+
...S,
|
|
1673
|
+
H
|
|
1444
1674
|
]),
|
|
1445
|
-
u(
|
|
1446
|
-
|
|
1675
|
+
u(c.language),
|
|
1676
|
+
Z
|
|
1447
1677
|
];
|
|
1448
|
-
|
|
1449
|
-
h.updateListener.of((
|
|
1450
|
-
|
|
1678
|
+
c.onChange && ne.push(
|
|
1679
|
+
h.updateListener.of((Q) => {
|
|
1680
|
+
Q.docChanged && c.onChange(Q.state.doc.toString());
|
|
1451
1681
|
})
|
|
1452
1682
|
);
|
|
1453
|
-
const
|
|
1454
|
-
doc:
|
|
1455
|
-
extensions:
|
|
1456
|
-
}),
|
|
1457
|
-
state:
|
|
1683
|
+
const oe = m.create({
|
|
1684
|
+
doc: c.code || "",
|
|
1685
|
+
extensions: ne
|
|
1686
|
+
}), G = new h({
|
|
1687
|
+
state: oe,
|
|
1458
1688
|
parent: w
|
|
1459
1689
|
});
|
|
1460
1690
|
return {
|
|
1461
|
-
view:
|
|
1691
|
+
view: G,
|
|
1462
1692
|
getCode() {
|
|
1463
|
-
return
|
|
1693
|
+
return G.state.doc.toString();
|
|
1464
1694
|
},
|
|
1465
|
-
setCode(
|
|
1466
|
-
const it =
|
|
1467
|
-
it !==
|
|
1468
|
-
changes: { from: 0, to: it.length, insert:
|
|
1695
|
+
setCode(Q) {
|
|
1696
|
+
const it = G.state.doc.toString();
|
|
1697
|
+
it !== Q && G.dispatch({
|
|
1698
|
+
changes: { from: 0, to: it.length, insert: Q }
|
|
1469
1699
|
});
|
|
1470
1700
|
},
|
|
1471
1701
|
destroy() {
|
|
1472
|
-
|
|
1702
|
+
G.destroy();
|
|
1473
1703
|
}
|
|
1474
1704
|
};
|
|
1475
1705
|
}
|
|
@@ -1485,12 +1715,12 @@ function fa(e = {}) {
|
|
|
1485
1715
|
function Ke() {
|
|
1486
1716
|
return { async: !1, breaks: !1, extensions: null, gfm: !0, hooks: null, pedantic: !1, renderer: null, silent: !1, tokenizer: null, walkTokens: null };
|
|
1487
1717
|
}
|
|
1488
|
-
var
|
|
1718
|
+
var se = Ke();
|
|
1489
1719
|
function mr(e) {
|
|
1490
|
-
|
|
1720
|
+
se = e;
|
|
1491
1721
|
}
|
|
1492
1722
|
var he = { exec: () => null };
|
|
1493
|
-
function
|
|
1723
|
+
function j(e, t = "") {
|
|
1494
1724
|
let r = typeof e == "string" ? e : e.source, a = { replace: (s, n) => {
|
|
1495
1725
|
let o = typeof n == "string" ? n : n.source;
|
|
1496
1726
|
return o = o.replace(q.caret, "$1"), r = r.replace(s, o), a;
|
|
@@ -1503,9 +1733,9 @@ var ha = (() => {
|
|
|
1503
1733
|
} catch {
|
|
1504
1734
|
return !1;
|
|
1505
1735
|
}
|
|
1506
|
-
})(), q = { codeRemoveIndent: /^(?: {1,4}| {0,3}\t)/gm, outputLinkReplace: /\\([\[\]])/g, indentCodeCompensation: /^(\s+)(?:```)/, beginningSpace: /^\s+/, endingHash: /#$/, startingSpaceChar: /^ /, endingSpaceChar: / $/, nonSpaceChar: /[^ ]/, newLineCharGlobal: /\n/g, tabCharGlobal: /\t/g, multipleSpaceGlobal: /\s+/g, blankLine: /^[ \t]*$/, doubleBlankLine: /\n[ \t]*\n[ \t]*$/, blockquoteStart: /^ {0,3}>/, blockquoteSetextReplace: /\n {0,3}((?:=+|-+) *)(?=\n|$)/g, blockquoteSetextReplace2: /^ {0,3}>[ \t]?/gm, listReplaceTabs: /^\t+/, listReplaceNesting: /^ {1,4}(?=( {4})*[^ ])/g, listIsTask: /^\[[ xX]\] +\S/, listReplaceTask: /^\[[ xX]\] +/, listTaskCheckbox: /\[[ xX]\]/, anyLine: /\n.*\n/, hrefBrackets: /^<(.*)>$/, tableDelimiter: /[:|]/, tableAlignChars: /^\||\| *$/g, tableRowBlankLine: /\n[ \t]*$/, tableAlignRight: /^ *-+: *$/, tableAlignCenter: /^ *:-+: *$/, tableAlignLeft: /^ *:-+ *$/, startATag: /^<a /i, endATag: /^<\/a>/i, startPreScriptTag: /^<(pre|code|kbd|script)(\s|>)/i, endPreScriptTag: /^<\/(pre|code|kbd|script)(\s|>)/i, startAngleBracket: /^</, endAngleBracket: />$/, pedanticHrefTitle: /^([^'"]*[^\s])\s+(['"])(.*)\2/, unicodeAlphaNumeric: /[\p{L}\p{N}]/u, escapeTest: /[&<>"']/, escapeReplace: /[&<>"']/g, escapeTestNoEncode: /[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/, escapeReplaceNoEncode: /[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g, unescapeTest: /&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig, caret: /(^|[^\[])\^/g, percentDecode: /%25/g, findPipe: /\|/g, splitPipe: / \|/, slashPipe: /\\\|/g, carriageReturn: /\r\n|\r/g, spaceLine: /^ +$/gm, notSpaceStart: /^\S*/, endingNewline: /\n$/, listItemRegex: (e) => new RegExp(`^( {0,3}${e})((?:[ ][^\\n]*)?(?:\\n|$))`), nextBulletRegex: (e) => new RegExp(`^ {0,${Math.min(3, e - 1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`), hrRegex: (e) => new RegExp(`^ {0,${Math.min(3, e - 1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`), fencesBeginRegex: (e) => new RegExp(`^ {0,${Math.min(3, e - 1)}}(?:\`\`\`|~~~)`), headingBeginRegex: (e) => new RegExp(`^ {0,${Math.min(3, e - 1)}}#`), htmlBeginRegex: (e) => new RegExp(`^ {0,${Math.min(3, e - 1)}}<(?:[a-z].*>|!--)`, "i") }, ga = /^(?:[ \t]*(?:\n|$))+/, ma = /^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/, wa = /^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/, me = /^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/, ba = /^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/, Je = /(?:[*+-]|\d{1,9}[.)])/, wr = /^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/, br =
|
|
1507
|
-
]`).replace("lheading", br).replace("|table", "").replace("blockquote", " {0,3}>").replace("|fences", "").replace("|list", "").replace("|html", "").replace("|tag", "").getRegex() },
|
|
1508
|
-
function
|
|
1736
|
+
})(), q = { codeRemoveIndent: /^(?: {1,4}| {0,3}\t)/gm, outputLinkReplace: /\\([\[\]])/g, indentCodeCompensation: /^(\s+)(?:```)/, beginningSpace: /^\s+/, endingHash: /#$/, startingSpaceChar: /^ /, endingSpaceChar: / $/, nonSpaceChar: /[^ ]/, newLineCharGlobal: /\n/g, tabCharGlobal: /\t/g, multipleSpaceGlobal: /\s+/g, blankLine: /^[ \t]*$/, doubleBlankLine: /\n[ \t]*\n[ \t]*$/, blockquoteStart: /^ {0,3}>/, blockquoteSetextReplace: /\n {0,3}((?:=+|-+) *)(?=\n|$)/g, blockquoteSetextReplace2: /^ {0,3}>[ \t]?/gm, listReplaceTabs: /^\t+/, listReplaceNesting: /^ {1,4}(?=( {4})*[^ ])/g, listIsTask: /^\[[ xX]\] +\S/, listReplaceTask: /^\[[ xX]\] +/, listTaskCheckbox: /\[[ xX]\]/, anyLine: /\n.*\n/, hrefBrackets: /^<(.*)>$/, tableDelimiter: /[:|]/, tableAlignChars: /^\||\| *$/g, tableRowBlankLine: /\n[ \t]*$/, tableAlignRight: /^ *-+: *$/, tableAlignCenter: /^ *:-+: *$/, tableAlignLeft: /^ *:-+ *$/, startATag: /^<a /i, endATag: /^<\/a>/i, startPreScriptTag: /^<(pre|code|kbd|script)(\s|>)/i, endPreScriptTag: /^<\/(pre|code|kbd|script)(\s|>)/i, startAngleBracket: /^</, endAngleBracket: />$/, pedanticHrefTitle: /^([^'"]*[^\s])\s+(['"])(.*)\2/, unicodeAlphaNumeric: /[\p{L}\p{N}]/u, escapeTest: /[&<>"']/, escapeReplace: /[&<>"']/g, escapeTestNoEncode: /[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/, escapeReplaceNoEncode: /[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g, unescapeTest: /&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig, caret: /(^|[^\[])\^/g, percentDecode: /%25/g, findPipe: /\|/g, splitPipe: / \|/, slashPipe: /\\\|/g, carriageReturn: /\r\n|\r/g, spaceLine: /^ +$/gm, notSpaceStart: /^\S*/, endingNewline: /\n$/, listItemRegex: (e) => new RegExp(`^( {0,3}${e})((?:[ ][^\\n]*)?(?:\\n|$))`), nextBulletRegex: (e) => new RegExp(`^ {0,${Math.min(3, e - 1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`), hrRegex: (e) => new RegExp(`^ {0,${Math.min(3, e - 1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`), fencesBeginRegex: (e) => new RegExp(`^ {0,${Math.min(3, e - 1)}}(?:\`\`\`|~~~)`), headingBeginRegex: (e) => new RegExp(`^ {0,${Math.min(3, e - 1)}}#`), htmlBeginRegex: (e) => new RegExp(`^ {0,${Math.min(3, e - 1)}}<(?:[a-z].*>|!--)`, "i") }, ga = /^(?:[ \t]*(?:\n|$))+/, ma = /^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/, wa = /^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/, me = /^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/, ba = /^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/, Je = /(?:[*+-]|\d{1,9}[.)])/, wr = /^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/, br = j(wr).replace(/bull/g, Je).replace(/blockCode/g, /(?: {4}| {0,3}\t)/).replace(/fences/g, / {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g, / {0,3}>/).replace(/heading/g, / {0,3}#{1,6}/).replace(/html/g, / {0,3}<[^\n>]+>\n/).replace(/\|table/g, "").getRegex(), va = j(wr).replace(/bull/g, Je).replace(/blockCode/g, /(?: {4}| {0,3}\t)/).replace(/fences/g, / {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g, / {0,3}>/).replace(/heading/g, / {0,3}#{1,6}/).replace(/html/g, / {0,3}<[^\n>]+>\n/).replace(/table/g, / {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(), Qe = /^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/, ya = /^[^\n]+/, Ye = /(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/, ka = j(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label", Ye).replace("title", /(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(), xa = j(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g, Je).getRegex(), Te = "address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul", et = /<!--(?:-?>|[\s\S]*?(?:-->|$))/, Ma = j("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))", "i").replace("comment", et).replace("tag", Te).replace("attribute", / +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(), vr = j(Qe).replace("hr", me).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("|lheading", "").replace("|table", "").replace("blockquote", " {0,3}>").replace("fences", " {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list", " {0,3}(?:[*+-]|1[.)]) ").replace("html", "</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag", Te).getRegex(), $a = j(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph", vr).getRegex(), tt = { blockquote: $a, code: ma, def: ka, fences: wa, heading: ba, hr: me, html: Ma, lheading: br, list: xa, newline: ga, paragraph: vr, table: he, text: ya }, pt = j("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr", me).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("blockquote", " {0,3}>").replace("code", "(?: {4}| {0,3} )[^\\n]").replace("fences", " {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list", " {0,3}(?:[*+-]|1[.)]) ").replace("html", "</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag", Te).getRegex(), Aa = { ...tt, lheading: va, table: pt, paragraph: j(Qe).replace("hr", me).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("|lheading", "").replace("table", pt).replace("blockquote", " {0,3}>").replace("fences", " {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list", " {0,3}(?:[*+-]|1[.)]) ").replace("html", "</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag", Te).getRegex() }, za = { ...tt, html: j(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment", et).replace(/tag/g, "(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(), def: /^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/, heading: /^(#{1,6})(.*)(?:\n+|$)/, fences: he, lheading: /^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/, paragraph: j(Qe).replace("hr", me).replace("heading", ` *#{1,6} *[^
|
|
1737
|
+
]`).replace("lheading", br).replace("|table", "").replace("blockquote", " {0,3}>").replace("|fences", "").replace("|list", "").replace("|html", "").replace("|tag", "").getRegex() }, Sa = /^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/, Ca = /^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/, yr = /^( {2,}|\\)\n(?!\s*$)/, Ra = /^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/, _e = /[\p{P}\p{S}]/u, rt = /[\s\p{P}\p{S}]/u, kr = /[^\s\p{P}\p{S}]/u, La = j(/^((?![*_])punctSpace)/, "u").replace(/punctSpace/g, rt).getRegex(), xr = /(?!~)[\p{P}\p{S}]/u, Ta = /(?!~)[\s\p{P}\p{S}]/u, _a = /(?:[^\s\p{P}\p{S}]|~)/u, Ea = j(/link|precode-code|html/, "g").replace("link", /\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-", ha ? "(?<!`)()" : "(^^|[^`])").replace("code", /(?<b>`+)[^`]+\k<b>(?!`)/).replace("html", /<(?! )[^<>]*?>/).getRegex(), Mr = /^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/, Pa = j(Mr, "u").replace(/punct/g, _e).getRegex(), ja = j(Mr, "u").replace(/punct/g, xr).getRegex(), $r = "^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)", Ha = j($r, "gu").replace(/notPunctSpace/g, kr).replace(/punctSpace/g, rt).replace(/punct/g, _e).getRegex(), Va = j($r, "gu").replace(/notPunctSpace/g, _a).replace(/punctSpace/g, Ta).replace(/punct/g, xr).getRegex(), Ia = j("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)", "gu").replace(/notPunctSpace/g, kr).replace(/punctSpace/g, rt).replace(/punct/g, _e).getRegex(), Da = j(/\\(punct)/, "gu").replace(/punct/g, _e).getRegex(), qa = j(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme", /[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email", /[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(), Za = j(et).replace("(?:-->|$)", "-->").getRegex(), Oa = j("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment", Za).replace("attribute", /\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(), $e = /(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+[^`]*?`+(?!`)|[^\[\]\\`])*?/, Ba = j(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label", $e).replace("href", /<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title", /"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(), Ar = j(/^!?\[(label)\]\[(ref)\]/).replace("label", $e).replace("ref", Ye).getRegex(), zr = j(/^!?\[(ref)\](?:\[\])?/).replace("ref", Ye).getRegex(), Fa = j("reflink|nolink(?!\\()", "g").replace("reflink", Ar).replace("nolink", zr).getRegex(), ft = /[hH][tT][tT][pP][sS]?|[fF][tT][pP]/, at = { _backpedal: he, anyPunctuation: Da, autolink: qa, blockSkip: Ea, br: yr, code: Ca, del: he, emStrongLDelim: Pa, emStrongRDelimAst: Ha, emStrongRDelimUnd: Ia, escape: Sa, link: Ba, nolink: zr, punctuation: La, reflink: Ar, reflinkSearch: Fa, tag: Oa, text: Ra, url: he }, Na = { ...at, link: j(/^!?\[(label)\]\((.*?)\)/).replace("label", $e).getRegex(), reflink: j(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label", $e).getRegex() }, Ve = { ...at, emStrongRDelimAst: Va, emStrongLDelim: ja, url: j(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol", ft).replace("email", /[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(), _backpedal: /(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/, del: /^(~~?)(?=[^\s~])((?:\\[\s\S]|[^\\])*?(?:\\[\s\S]|[^\s~\\]))\1(?=[^~]|$)/, text: j(/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace("protocol", ft).getRegex() }, Ua = { ...Ve, br: j(yr).replace("{2,}", "*").getRegex(), text: j(Ve.text).replace("\\b_", "\\b_| {2,}\\n").replace(/\{2,\}/g, "*").getRegex() }, ye = { normal: tt, gfm: Aa, pedantic: za }, ce = { normal: at, gfm: Ve, breaks: Ua, pedantic: Na }, Ga = { "&": "&", "<": "<", ">": ">", '"': """, "'": "'" }, ht = (e) => Ga[e];
|
|
1738
|
+
function X(e, t) {
|
|
1509
1739
|
if (t) {
|
|
1510
1740
|
if (q.escapeTest.test(e)) return e.replace(q.escapeReplace, ht);
|
|
1511
1741
|
} else if (q.escapeTestNoEncode.test(e)) return e.replace(q.escapeReplaceNoEncode, ht);
|
|
@@ -1522,9 +1752,9 @@ function gt(e) {
|
|
|
1522
1752
|
function mt(e, t) {
|
|
1523
1753
|
var n;
|
|
1524
1754
|
let r = e.replace(q.findPipe, (o, i, u) => {
|
|
1525
|
-
let
|
|
1526
|
-
for (; --d >= 0 && u[d] === "\\"; )
|
|
1527
|
-
return
|
|
1755
|
+
let l = !1, d = i;
|
|
1756
|
+
for (; --d >= 0 && u[d] === "\\"; ) l = !l;
|
|
1757
|
+
return l ? "|" : " |";
|
|
1528
1758
|
}), a = r.split(q.splitPipe), s = 0;
|
|
1529
1759
|
if (a[0].trim() || a.shift(), a.length > 0 && !((n = a.at(-1)) != null && n.trim()) && a.pop(), t) if (a.length > t) a.splice(t);
|
|
1530
1760
|
else for (; a.length < t; ) a.push("");
|
|
@@ -1566,12 +1796,12 @@ function Xa(e, t, r) {
|
|
|
1566
1796
|
}).join(`
|
|
1567
1797
|
`);
|
|
1568
1798
|
}
|
|
1569
|
-
var
|
|
1799
|
+
var Ae = class {
|
|
1570
1800
|
constructor(e) {
|
|
1571
|
-
|
|
1572
|
-
|
|
1573
|
-
|
|
1574
|
-
this.options = e ||
|
|
1801
|
+
I(this, "options");
|
|
1802
|
+
I(this, "rules");
|
|
1803
|
+
I(this, "lexer");
|
|
1804
|
+
this.options = e || se;
|
|
1575
1805
|
}
|
|
1576
1806
|
space(e) {
|
|
1577
1807
|
let t = this.rules.block.newline.exec(e);
|
|
@@ -1620,27 +1850,27 @@ var Se = class {
|
|
|
1620
1850
|
else if (!o) i.push(r[u]);
|
|
1621
1851
|
else break;
|
|
1622
1852
|
r = r.slice(u);
|
|
1623
|
-
let
|
|
1624
|
-
`), d =
|
|
1853
|
+
let l = i.join(`
|
|
1854
|
+
`), d = l.replace(this.rules.other.blockquoteSetextReplace, `
|
|
1625
1855
|
$1`).replace(this.rules.other.blockquoteSetextReplace2, "");
|
|
1626
1856
|
a = a ? `${a}
|
|
1627
|
-
${
|
|
1857
|
+
${l}` : l, s = s ? `${s}
|
|
1628
1858
|
${d}` : d;
|
|
1629
1859
|
let p = this.lexer.state.top;
|
|
1630
1860
|
if (this.lexer.state.top = !0, this.lexer.blockTokens(d, n, !0), this.lexer.state.top = p, r.length === 0) break;
|
|
1631
1861
|
let w = n.at(-1);
|
|
1632
1862
|
if ((w == null ? void 0 : w.type) === "code") break;
|
|
1633
1863
|
if ((w == null ? void 0 : w.type) === "blockquote") {
|
|
1634
|
-
let
|
|
1864
|
+
let c = w, m = c.raw + `
|
|
1635
1865
|
` + r.join(`
|
|
1636
1866
|
`), h = this.blockquote(m);
|
|
1637
|
-
n[n.length - 1] = h, a = a.substring(0, a.length -
|
|
1867
|
+
n[n.length - 1] = h, a = a.substring(0, a.length - c.raw.length) + h.raw, s = s.substring(0, s.length - c.text.length) + h.text;
|
|
1638
1868
|
break;
|
|
1639
1869
|
} else if ((w == null ? void 0 : w.type) === "list") {
|
|
1640
|
-
let
|
|
1870
|
+
let c = w, m = c.raw + `
|
|
1641
1871
|
` + r.join(`
|
|
1642
1872
|
`), h = this.list(m);
|
|
1643
|
-
n[n.length - 1] = h, a = a.substring(0, a.length - w.raw.length) + h.raw, s = s.substring(0, s.length -
|
|
1873
|
+
n[n.length - 1] = h, a = a.substring(0, a.length - w.raw.length) + h.raw, s = s.substring(0, s.length - c.raw.length) + h.raw, r = m.substring(n.at(-1).raw.length).split(`
|
|
1644
1874
|
`);
|
|
1645
1875
|
continue;
|
|
1646
1876
|
}
|
|
@@ -1659,31 +1889,31 @@ ${d}` : d;
|
|
|
1659
1889
|
let d = !1, p = "", w = "";
|
|
1660
1890
|
if (!(t = i.exec(e)) || this.rules.block.hr.test(e)) break;
|
|
1661
1891
|
p = t[0], e = e.substring(p.length);
|
|
1662
|
-
let
|
|
1892
|
+
let c = t[2].split(`
|
|
1663
1893
|
`, 1)[0].replace(this.rules.other.listReplaceTabs, (f) => " ".repeat(3 * f.length)), m = e.split(`
|
|
1664
|
-
`, 1)[0], h = !
|
|
1665
|
-
if (this.options.pedantic ? (g = 2, w =
|
|
1894
|
+
`, 1)[0], h = !c.trim(), g = 0;
|
|
1895
|
+
if (this.options.pedantic ? (g = 2, w = c.trimStart()) : h ? g = t[1].length + 1 : (g = t[2].search(this.rules.other.nonSpaceChar), g = g > 4 ? 1 : g, w = c.slice(g), g += t[1].length), h && this.rules.other.blankLine.test(m) && (p += m + `
|
|
1666
1896
|
`, e = e.substring(m.length + 1), d = !0), !d) {
|
|
1667
|
-
let f = this.rules.other.nextBulletRegex(g), b = this.rules.other.hrRegex(g),
|
|
1897
|
+
let f = this.rules.other.nextBulletRegex(g), b = this.rules.other.hrRegex(g), v = this.rules.other.fencesBeginRegex(g), x = this.rules.other.headingBeginRegex(g), $ = this.rules.other.htmlBeginRegex(g);
|
|
1668
1898
|
for (; e; ) {
|
|
1669
|
-
let
|
|
1670
|
-
`, 1)[0],
|
|
1671
|
-
if (m =
|
|
1672
|
-
if (
|
|
1673
|
-
` +
|
|
1899
|
+
let A = e.split(`
|
|
1900
|
+
`, 1)[0], C;
|
|
1901
|
+
if (m = A, this.options.pedantic ? (m = m.replace(this.rules.other.listReplaceNesting, " "), C = m) : C = m.replace(this.rules.other.tabCharGlobal, " "), v.test(m) || x.test(m) || $.test(m) || f.test(m) || b.test(m)) break;
|
|
1902
|
+
if (C.search(this.rules.other.nonSpaceChar) >= g || !m.trim()) w += `
|
|
1903
|
+
` + C.slice(g);
|
|
1674
1904
|
else {
|
|
1675
|
-
if (h ||
|
|
1905
|
+
if (h || c.replace(this.rules.other.tabCharGlobal, " ").search(this.rules.other.nonSpaceChar) >= 4 || v.test(c) || x.test(c) || b.test(c)) break;
|
|
1676
1906
|
w += `
|
|
1677
1907
|
` + m;
|
|
1678
1908
|
}
|
|
1679
|
-
!h && !m.trim() && (h = !0), p +=
|
|
1680
|
-
`, e = e.substring(
|
|
1909
|
+
!h && !m.trim() && (h = !0), p += A + `
|
|
1910
|
+
`, e = e.substring(A.length + 1), c = C.slice(g);
|
|
1681
1911
|
}
|
|
1682
1912
|
}
|
|
1683
1913
|
o.loose || (u ? o.loose = !0 : this.rules.other.doubleBlankLine.test(p) && (u = !0)), o.items.push({ type: "list_item", raw: p, task: !!this.options.gfm && this.rules.other.listIsTask.test(w), loose: !1, text: w, tokens: [] }), o.raw += p;
|
|
1684
1914
|
}
|
|
1685
|
-
let
|
|
1686
|
-
if (
|
|
1915
|
+
let l = o.items.at(-1);
|
|
1916
|
+
if (l) l.raw = l.raw.trimEnd(), l.text = l.text.trimEnd();
|
|
1687
1917
|
else return;
|
|
1688
1918
|
o.raw = o.raw.trimEnd();
|
|
1689
1919
|
for (let d of o.items) {
|
|
@@ -1702,7 +1932,7 @@ ${d}` : d;
|
|
|
1702
1932
|
}
|
|
1703
1933
|
}
|
|
1704
1934
|
if (!o.loose) {
|
|
1705
|
-
let p = d.tokens.filter((
|
|
1935
|
+
let p = d.tokens.filter((c) => c.type === "space"), w = p.length > 0 && p.some((c) => this.rules.other.anyLine.test(c.raw));
|
|
1706
1936
|
o.loose = w;
|
|
1707
1937
|
}
|
|
1708
1938
|
}
|
|
@@ -1733,7 +1963,7 @@ ${d}` : d;
|
|
|
1733
1963
|
if (r.length === a.length) {
|
|
1734
1964
|
for (let i of a) this.rules.other.tableAlignRight.test(i) ? n.align.push("right") : this.rules.other.tableAlignCenter.test(i) ? n.align.push("center") : this.rules.other.tableAlignLeft.test(i) ? n.align.push("left") : n.align.push(null);
|
|
1735
1965
|
for (let i = 0; i < r.length; i++) n.header.push({ text: r[i], tokens: this.lexer.inline(r[i]), header: !0, align: n.align[i] });
|
|
1736
|
-
for (let i of s) n.rows.push(mt(i, n.header.length).map((u,
|
|
1966
|
+
for (let i of s) n.rows.push(mt(i, n.header.length).map((u, l) => ({ text: u, tokens: this.lexer.inline(u), header: !1, align: n.align[l] })));
|
|
1737
1967
|
return n;
|
|
1738
1968
|
}
|
|
1739
1969
|
}
|
|
@@ -1799,8 +2029,8 @@ ${d}` : d;
|
|
|
1799
2029
|
emStrong(e, t, r = "") {
|
|
1800
2030
|
let a = this.rules.inline.emStrongLDelim.exec(e);
|
|
1801
2031
|
if (!(!a || a[3] && r.match(this.rules.other.unicodeAlphaNumeric)) && (!(a[1] || a[2]) || !r || this.rules.inline.punctuation.exec(r))) {
|
|
1802
|
-
let s = [...a[0]].length - 1, n, o, i = s, u = 0,
|
|
1803
|
-
for (
|
|
2032
|
+
let s = [...a[0]].length - 1, n, o, i = s, u = 0, l = a[0][0] === "*" ? this.rules.inline.emStrongRDelimAst : this.rules.inline.emStrongRDelimUnd;
|
|
2033
|
+
for (l.lastIndex = 0, t = t.slice(-1 * e.length + s); (a = l.exec(t)) != null; ) {
|
|
1804
2034
|
if (n = a[1] || a[2] || a[3] || a[4] || a[5] || a[6], !n) continue;
|
|
1805
2035
|
if (o = [...n].length, a[3] || a[4]) {
|
|
1806
2036
|
i += o;
|
|
@@ -1813,8 +2043,8 @@ ${d}` : d;
|
|
|
1813
2043
|
o = Math.min(o, o + i + u);
|
|
1814
2044
|
let d = [...a[0]][0].length, p = e.slice(0, s + a.index + d + o);
|
|
1815
2045
|
if (Math.min(s, o) % 2) {
|
|
1816
|
-
let
|
|
1817
|
-
return { type: "em", raw: p, text:
|
|
2046
|
+
let c = p.slice(1, -1);
|
|
2047
|
+
return { type: "em", raw: p, text: c, tokens: this.lexer.inlineTokens(c) };
|
|
1818
2048
|
}
|
|
1819
2049
|
let w = p.slice(2, -2);
|
|
1820
2050
|
return { type: "strong", raw: p, text: w, tokens: this.lexer.inlineTokens(w) };
|
|
@@ -1866,25 +2096,25 @@ ${d}` : d;
|
|
|
1866
2096
|
return { type: "text", raw: t[0], text: t[0], escaped: r };
|
|
1867
2097
|
}
|
|
1868
2098
|
}
|
|
1869
|
-
}, F = class
|
|
2099
|
+
}, F = class Ie {
|
|
1870
2100
|
constructor(t) {
|
|
1871
|
-
|
|
1872
|
-
|
|
1873
|
-
|
|
1874
|
-
|
|
1875
|
-
|
|
1876
|
-
this.tokens = [], this.tokens.links = /* @__PURE__ */ Object.create(null), this.options = t ||
|
|
1877
|
-
let r = { other: q, block: ye.normal, inline:
|
|
1878
|
-
this.options.pedantic ? (r.block = ye.pedantic, r.inline =
|
|
2101
|
+
I(this, "tokens");
|
|
2102
|
+
I(this, "options");
|
|
2103
|
+
I(this, "state");
|
|
2104
|
+
I(this, "inlineQueue");
|
|
2105
|
+
I(this, "tokenizer");
|
|
2106
|
+
this.tokens = [], this.tokens.links = /* @__PURE__ */ Object.create(null), this.options = t || se, this.options.tokenizer = this.options.tokenizer || new Ae(), this.tokenizer = this.options.tokenizer, this.tokenizer.options = this.options, this.tokenizer.lexer = this, this.inlineQueue = [], this.state = { inLink: !1, inRawBlock: !1, top: !0 };
|
|
2107
|
+
let r = { other: q, block: ye.normal, inline: ce.normal };
|
|
2108
|
+
this.options.pedantic ? (r.block = ye.pedantic, r.inline = ce.pedantic) : this.options.gfm && (r.block = ye.gfm, this.options.breaks ? r.inline = ce.breaks : r.inline = ce.gfm), this.tokenizer.rules = r;
|
|
1879
2109
|
}
|
|
1880
2110
|
static get rules() {
|
|
1881
|
-
return { block: ye, inline:
|
|
2111
|
+
return { block: ye, inline: ce };
|
|
1882
2112
|
}
|
|
1883
2113
|
static lex(t, r) {
|
|
1884
|
-
return new
|
|
2114
|
+
return new Ie(r).lex(t);
|
|
1885
2115
|
}
|
|
1886
2116
|
static lexInline(t, r) {
|
|
1887
|
-
return new
|
|
2117
|
+
return new Ie(r).inlineTokens(t);
|
|
1888
2118
|
}
|
|
1889
2119
|
lex(t) {
|
|
1890
2120
|
t = t.replace(q.carriageReturn, `
|
|
@@ -1899,21 +2129,21 @@ ${d}` : d;
|
|
|
1899
2129
|
var s, n, o;
|
|
1900
2130
|
for (this.options.pedantic && (t = t.replace(q.tabCharGlobal, " ").replace(q.spaceLine, "")); t; ) {
|
|
1901
2131
|
let i;
|
|
1902
|
-
if ((n = (s = this.options.extensions) == null ? void 0 : s.block) != null && n.some((
|
|
2132
|
+
if ((n = (s = this.options.extensions) == null ? void 0 : s.block) != null && n.some((l) => (i = l.call({ lexer: this }, t, r)) ? (t = t.substring(i.raw.length), r.push(i), !0) : !1)) continue;
|
|
1903
2133
|
if (i = this.tokenizer.space(t)) {
|
|
1904
2134
|
t = t.substring(i.raw.length);
|
|
1905
|
-
let
|
|
1906
|
-
i.raw.length === 1 &&
|
|
2135
|
+
let l = r.at(-1);
|
|
2136
|
+
i.raw.length === 1 && l !== void 0 ? l.raw += `
|
|
1907
2137
|
` : r.push(i);
|
|
1908
2138
|
continue;
|
|
1909
2139
|
}
|
|
1910
2140
|
if (i = this.tokenizer.code(t)) {
|
|
1911
2141
|
t = t.substring(i.raw.length);
|
|
1912
|
-
let
|
|
1913
|
-
(
|
|
2142
|
+
let l = r.at(-1);
|
|
2143
|
+
(l == null ? void 0 : l.type) === "paragraph" || (l == null ? void 0 : l.type) === "text" ? (l.raw += (l.raw.endsWith(`
|
|
1914
2144
|
`) ? "" : `
|
|
1915
|
-
`) + i.raw,
|
|
1916
|
-
` + i.text, this.inlineQueue.at(-1).src =
|
|
2145
|
+
`) + i.raw, l.text += `
|
|
2146
|
+
` + i.text, this.inlineQueue.at(-1).src = l.text) : r.push(i);
|
|
1917
2147
|
continue;
|
|
1918
2148
|
}
|
|
1919
2149
|
if (i = this.tokenizer.fences(t)) {
|
|
@@ -1942,11 +2172,11 @@ ${d}` : d;
|
|
|
1942
2172
|
}
|
|
1943
2173
|
if (i = this.tokenizer.def(t)) {
|
|
1944
2174
|
t = t.substring(i.raw.length);
|
|
1945
|
-
let
|
|
1946
|
-
(
|
|
2175
|
+
let l = r.at(-1);
|
|
2176
|
+
(l == null ? void 0 : l.type) === "paragraph" || (l == null ? void 0 : l.type) === "text" ? (l.raw += (l.raw.endsWith(`
|
|
1947
2177
|
`) ? "" : `
|
|
1948
|
-
`) + i.raw,
|
|
1949
|
-
` + i.raw, this.inlineQueue.at(-1).src =
|
|
2178
|
+
`) + i.raw, l.text += `
|
|
2179
|
+
` + i.raw, this.inlineQueue.at(-1).src = l.text) : this.tokens.links[i.tag] || (this.tokens.links[i.tag] = { href: i.href, title: i.title }, r.push(i));
|
|
1950
2180
|
continue;
|
|
1951
2181
|
}
|
|
1952
2182
|
if (i = this.tokenizer.table(t)) {
|
|
@@ -1959,34 +2189,34 @@ ${d}` : d;
|
|
|
1959
2189
|
}
|
|
1960
2190
|
let u = t;
|
|
1961
2191
|
if ((o = this.options.extensions) != null && o.startBlock) {
|
|
1962
|
-
let
|
|
2192
|
+
let l = 1 / 0, d = t.slice(1), p;
|
|
1963
2193
|
this.options.extensions.startBlock.forEach((w) => {
|
|
1964
|
-
p = w.call({ lexer: this }, d), typeof p == "number" && p >= 0 && (
|
|
1965
|
-
}),
|
|
2194
|
+
p = w.call({ lexer: this }, d), typeof p == "number" && p >= 0 && (l = Math.min(l, p));
|
|
2195
|
+
}), l < 1 / 0 && l >= 0 && (u = t.substring(0, l + 1));
|
|
1966
2196
|
}
|
|
1967
2197
|
if (this.state.top && (i = this.tokenizer.paragraph(u))) {
|
|
1968
|
-
let
|
|
1969
|
-
a && (
|
|
2198
|
+
let l = r.at(-1);
|
|
2199
|
+
a && (l == null ? void 0 : l.type) === "paragraph" ? (l.raw += (l.raw.endsWith(`
|
|
1970
2200
|
`) ? "" : `
|
|
1971
|
-
`) + i.raw,
|
|
1972
|
-
` + i.text, this.inlineQueue.pop(), this.inlineQueue.at(-1).src =
|
|
2201
|
+
`) + i.raw, l.text += `
|
|
2202
|
+
` + i.text, this.inlineQueue.pop(), this.inlineQueue.at(-1).src = l.text) : r.push(i), a = u.length !== t.length, t = t.substring(i.raw.length);
|
|
1973
2203
|
continue;
|
|
1974
2204
|
}
|
|
1975
2205
|
if (i = this.tokenizer.text(t)) {
|
|
1976
2206
|
t = t.substring(i.raw.length);
|
|
1977
|
-
let
|
|
1978
|
-
(
|
|
2207
|
+
let l = r.at(-1);
|
|
2208
|
+
(l == null ? void 0 : l.type) === "text" ? (l.raw += (l.raw.endsWith(`
|
|
1979
2209
|
`) ? "" : `
|
|
1980
|
-
`) + i.raw,
|
|
1981
|
-
` + i.text, this.inlineQueue.pop(), this.inlineQueue.at(-1).src =
|
|
2210
|
+
`) + i.raw, l.text += `
|
|
2211
|
+
` + i.text, this.inlineQueue.pop(), this.inlineQueue.at(-1).src = l.text) : r.push(i);
|
|
1982
2212
|
continue;
|
|
1983
2213
|
}
|
|
1984
2214
|
if (t) {
|
|
1985
|
-
let
|
|
2215
|
+
let l = "Infinite loop on byte: " + t.charCodeAt(0);
|
|
1986
2216
|
if (this.options.silent) {
|
|
1987
|
-
console.error(
|
|
2217
|
+
console.error(l);
|
|
1988
2218
|
break;
|
|
1989
|
-
} else throw new Error(
|
|
2219
|
+
} else throw new Error(l);
|
|
1990
2220
|
}
|
|
1991
2221
|
}
|
|
1992
2222
|
return this.state.top = !0, r;
|
|
@@ -1995,61 +2225,61 @@ ${d}` : d;
|
|
|
1995
2225
|
return this.inlineQueue.push({ src: t, tokens: r }), r;
|
|
1996
2226
|
}
|
|
1997
2227
|
inlineTokens(t, r = []) {
|
|
1998
|
-
var u,
|
|
2228
|
+
var u, l, d, p, w;
|
|
1999
2229
|
let a = t, s = null;
|
|
2000
2230
|
if (this.tokens.links) {
|
|
2001
|
-
let
|
|
2002
|
-
if (
|
|
2231
|
+
let c = Object.keys(this.tokens.links);
|
|
2232
|
+
if (c.length > 0) for (; (s = this.tokenizer.rules.inline.reflinkSearch.exec(a)) != null; ) c.includes(s[0].slice(s[0].lastIndexOf("[") + 1, -1)) && (a = a.slice(0, s.index) + "[" + "a".repeat(s[0].length - 2) + "]" + a.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex));
|
|
2003
2233
|
}
|
|
2004
2234
|
for (; (s = this.tokenizer.rules.inline.anyPunctuation.exec(a)) != null; ) a = a.slice(0, s.index) + "++" + a.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);
|
|
2005
2235
|
let n;
|
|
2006
2236
|
for (; (s = this.tokenizer.rules.inline.blockSkip.exec(a)) != null; ) n = s[2] ? s[2].length : 0, a = a.slice(0, s.index + n) + "[" + "a".repeat(s[0].length - n - 2) + "]" + a.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);
|
|
2007
|
-
a = ((
|
|
2237
|
+
a = ((l = (u = this.options.hooks) == null ? void 0 : u.emStrongMask) == null ? void 0 : l.call({ lexer: this }, a)) ?? a;
|
|
2008
2238
|
let o = !1, i = "";
|
|
2009
2239
|
for (; t; ) {
|
|
2010
2240
|
o || (i = ""), o = !1;
|
|
2011
|
-
let
|
|
2012
|
-
if ((p = (d = this.options.extensions) == null ? void 0 : d.inline) != null && p.some((h) => (
|
|
2013
|
-
if (
|
|
2014
|
-
t = t.substring(
|
|
2241
|
+
let c;
|
|
2242
|
+
if ((p = (d = this.options.extensions) == null ? void 0 : d.inline) != null && p.some((h) => (c = h.call({ lexer: this }, t, r)) ? (t = t.substring(c.raw.length), r.push(c), !0) : !1)) continue;
|
|
2243
|
+
if (c = this.tokenizer.escape(t)) {
|
|
2244
|
+
t = t.substring(c.raw.length), r.push(c);
|
|
2015
2245
|
continue;
|
|
2016
2246
|
}
|
|
2017
|
-
if (
|
|
2018
|
-
t = t.substring(
|
|
2247
|
+
if (c = this.tokenizer.tag(t)) {
|
|
2248
|
+
t = t.substring(c.raw.length), r.push(c);
|
|
2019
2249
|
continue;
|
|
2020
2250
|
}
|
|
2021
|
-
if (
|
|
2022
|
-
t = t.substring(
|
|
2251
|
+
if (c = this.tokenizer.link(t)) {
|
|
2252
|
+
t = t.substring(c.raw.length), r.push(c);
|
|
2023
2253
|
continue;
|
|
2024
2254
|
}
|
|
2025
|
-
if (
|
|
2026
|
-
t = t.substring(
|
|
2255
|
+
if (c = this.tokenizer.reflink(t, this.tokens.links)) {
|
|
2256
|
+
t = t.substring(c.raw.length);
|
|
2027
2257
|
let h = r.at(-1);
|
|
2028
|
-
|
|
2258
|
+
c.type === "text" && (h == null ? void 0 : h.type) === "text" ? (h.raw += c.raw, h.text += c.text) : r.push(c);
|
|
2029
2259
|
continue;
|
|
2030
2260
|
}
|
|
2031
|
-
if (
|
|
2032
|
-
t = t.substring(
|
|
2261
|
+
if (c = this.tokenizer.emStrong(t, a, i)) {
|
|
2262
|
+
t = t.substring(c.raw.length), r.push(c);
|
|
2033
2263
|
continue;
|
|
2034
2264
|
}
|
|
2035
|
-
if (
|
|
2036
|
-
t = t.substring(
|
|
2265
|
+
if (c = this.tokenizer.codespan(t)) {
|
|
2266
|
+
t = t.substring(c.raw.length), r.push(c);
|
|
2037
2267
|
continue;
|
|
2038
2268
|
}
|
|
2039
|
-
if (
|
|
2040
|
-
t = t.substring(
|
|
2269
|
+
if (c = this.tokenizer.br(t)) {
|
|
2270
|
+
t = t.substring(c.raw.length), r.push(c);
|
|
2041
2271
|
continue;
|
|
2042
2272
|
}
|
|
2043
|
-
if (
|
|
2044
|
-
t = t.substring(
|
|
2273
|
+
if (c = this.tokenizer.del(t)) {
|
|
2274
|
+
t = t.substring(c.raw.length), r.push(c);
|
|
2045
2275
|
continue;
|
|
2046
2276
|
}
|
|
2047
|
-
if (
|
|
2048
|
-
t = t.substring(
|
|
2277
|
+
if (c = this.tokenizer.autolink(t)) {
|
|
2278
|
+
t = t.substring(c.raw.length), r.push(c);
|
|
2049
2279
|
continue;
|
|
2050
2280
|
}
|
|
2051
|
-
if (!this.state.inLink && (
|
|
2052
|
-
t = t.substring(
|
|
2281
|
+
if (!this.state.inLink && (c = this.tokenizer.url(t))) {
|
|
2282
|
+
t = t.substring(c.raw.length), r.push(c);
|
|
2053
2283
|
continue;
|
|
2054
2284
|
}
|
|
2055
2285
|
let m = t;
|
|
@@ -2059,10 +2289,10 @@ ${d}` : d;
|
|
|
2059
2289
|
f = b.call({ lexer: this }, g), typeof f == "number" && f >= 0 && (h = Math.min(h, f));
|
|
2060
2290
|
}), h < 1 / 0 && h >= 0 && (m = t.substring(0, h + 1));
|
|
2061
2291
|
}
|
|
2062
|
-
if (
|
|
2063
|
-
t = t.substring(
|
|
2292
|
+
if (c = this.tokenizer.inlineText(m)) {
|
|
2293
|
+
t = t.substring(c.raw.length), c.raw.slice(-1) !== "_" && (i = c.raw.slice(-1)), o = !0;
|
|
2064
2294
|
let h = r.at(-1);
|
|
2065
|
-
(h == null ? void 0 : h.type) === "text" ? (h.raw +=
|
|
2295
|
+
(h == null ? void 0 : h.type) === "text" ? (h.raw += c.raw, h.text += c.text) : r.push(c);
|
|
2066
2296
|
continue;
|
|
2067
2297
|
}
|
|
2068
2298
|
if (t) {
|
|
@@ -2075,11 +2305,11 @@ ${d}` : d;
|
|
|
2075
2305
|
}
|
|
2076
2306
|
return r;
|
|
2077
2307
|
}
|
|
2078
|
-
},
|
|
2308
|
+
}, ze = class {
|
|
2079
2309
|
constructor(e) {
|
|
2080
|
-
|
|
2081
|
-
|
|
2082
|
-
this.options = e ||
|
|
2310
|
+
I(this, "options");
|
|
2311
|
+
I(this, "parser");
|
|
2312
|
+
this.options = e || se;
|
|
2083
2313
|
}
|
|
2084
2314
|
space(e) {
|
|
2085
2315
|
return "";
|
|
@@ -2088,8 +2318,8 @@ ${d}` : d;
|
|
|
2088
2318
|
var n;
|
|
2089
2319
|
let a = (n = (t || "").match(q.notSpaceStart)) == null ? void 0 : n[0], s = e.replace(q.endingNewline, "") + `
|
|
2090
2320
|
`;
|
|
2091
|
-
return a ? '<pre><code class="language-' +
|
|
2092
|
-
` : "<pre><code>" + (r ? s :
|
|
2321
|
+
return a ? '<pre><code class="language-' + X(a) + '">' + (r ? s : X(s, !0)) + `</code></pre>
|
|
2322
|
+
` : "<pre><code>" + (r ? s : X(s, !0)) + `</code></pre>
|
|
2093
2323
|
`;
|
|
2094
2324
|
}
|
|
2095
2325
|
blockquote({ tokens: e }) {
|
|
@@ -2167,7 +2397,7 @@ ${e}</tr>
|
|
|
2167
2397
|
return `<em>${this.parser.parseInline(e)}</em>`;
|
|
2168
2398
|
}
|
|
2169
2399
|
codespan({ text: e }) {
|
|
2170
|
-
return `<code>${
|
|
2400
|
+
return `<code>${X(e, !0)}</code>`;
|
|
2171
2401
|
}
|
|
2172
2402
|
br(e) {
|
|
2173
2403
|
return "<br>";
|
|
@@ -2180,18 +2410,18 @@ ${e}</tr>
|
|
|
2180
2410
|
if (s === null) return a;
|
|
2181
2411
|
e = s;
|
|
2182
2412
|
let n = '<a href="' + e + '"';
|
|
2183
|
-
return t && (n += ' title="' +
|
|
2413
|
+
return t && (n += ' title="' + X(t) + '"'), n += ">" + a + "</a>", n;
|
|
2184
2414
|
}
|
|
2185
2415
|
image({ href: e, title: t, text: r, tokens: a }) {
|
|
2186
2416
|
a && (r = this.parser.parseInline(a, this.parser.textRenderer));
|
|
2187
2417
|
let s = gt(e);
|
|
2188
|
-
if (s === null) return
|
|
2418
|
+
if (s === null) return X(r);
|
|
2189
2419
|
e = s;
|
|
2190
2420
|
let n = `<img src="${e}" alt="${r}"`;
|
|
2191
|
-
return t && (n += ` title="${
|
|
2421
|
+
return t && (n += ` title="${X(t)}"`), n += ">", n;
|
|
2192
2422
|
}
|
|
2193
2423
|
text(e) {
|
|
2194
|
-
return "tokens" in e && e.tokens ? this.parser.parseInline(e.tokens) : "escaped" in e && e.escaped ? e.text :
|
|
2424
|
+
return "tokens" in e && e.tokens ? this.parser.parseInline(e.tokens) : "escaped" in e && e.escaped ? e.text : X(e.text);
|
|
2195
2425
|
}
|
|
2196
2426
|
}, st = class {
|
|
2197
2427
|
strong({ text: e }) {
|
|
@@ -2224,18 +2454,18 @@ ${e}</tr>
|
|
|
2224
2454
|
checkbox({ raw: e }) {
|
|
2225
2455
|
return e;
|
|
2226
2456
|
}
|
|
2227
|
-
}, N = class
|
|
2457
|
+
}, N = class De {
|
|
2228
2458
|
constructor(t) {
|
|
2229
|
-
|
|
2230
|
-
|
|
2231
|
-
|
|
2232
|
-
this.options = t ||
|
|
2459
|
+
I(this, "options");
|
|
2460
|
+
I(this, "renderer");
|
|
2461
|
+
I(this, "textRenderer");
|
|
2462
|
+
this.options = t || se, this.options.renderer = this.options.renderer || new ze(), this.renderer = this.options.renderer, this.renderer.options = this.options, this.renderer.parser = this, this.textRenderer = new st();
|
|
2233
2463
|
}
|
|
2234
2464
|
static parse(t, r) {
|
|
2235
|
-
return new
|
|
2465
|
+
return new De(r).parse(t);
|
|
2236
2466
|
}
|
|
2237
2467
|
static parseInline(t, r) {
|
|
2238
|
-
return new
|
|
2468
|
+
return new De(r).parseInline(t);
|
|
2239
2469
|
}
|
|
2240
2470
|
parse(t) {
|
|
2241
2471
|
var a, s;
|
|
@@ -2243,9 +2473,9 @@ ${e}</tr>
|
|
|
2243
2473
|
for (let n = 0; n < t.length; n++) {
|
|
2244
2474
|
let o = t[n];
|
|
2245
2475
|
if ((s = (a = this.options.extensions) == null ? void 0 : a.renderers) != null && s[o.type]) {
|
|
2246
|
-
let u = o,
|
|
2247
|
-
if (
|
|
2248
|
-
r +=
|
|
2476
|
+
let u = o, l = this.options.extensions.renderers[u.type].call({ parser: this }, u);
|
|
2477
|
+
if (l !== !1 || !["space", "hr", "heading", "code", "table", "blockquote", "list", "html", "def", "paragraph", "text"].includes(u.type)) {
|
|
2478
|
+
r += l || "";
|
|
2249
2479
|
continue;
|
|
2250
2480
|
}
|
|
2251
2481
|
}
|
|
@@ -2314,9 +2544,9 @@ ${e}</tr>
|
|
|
2314
2544
|
for (let o = 0; o < t.length; o++) {
|
|
2315
2545
|
let i = t[o];
|
|
2316
2546
|
if ((n = (s = this.options.extensions) == null ? void 0 : s.renderers) != null && n[i.type]) {
|
|
2317
|
-
let
|
|
2318
|
-
if (
|
|
2319
|
-
a +=
|
|
2547
|
+
let l = this.options.extensions.renderers[i.type].call({ parser: this }, i);
|
|
2548
|
+
if (l !== !1 || !["escape", "html", "link", "image", "strong", "em", "codespan", "br", "del", "text"].includes(i.type)) {
|
|
2549
|
+
a += l || "";
|
|
2320
2550
|
continue;
|
|
2321
2551
|
}
|
|
2322
2552
|
}
|
|
@@ -2367,9 +2597,9 @@ ${e}</tr>
|
|
|
2367
2597
|
break;
|
|
2368
2598
|
}
|
|
2369
2599
|
default: {
|
|
2370
|
-
let
|
|
2371
|
-
if (this.options.silent) return console.error(
|
|
2372
|
-
throw new Error(
|
|
2600
|
+
let l = 'Token with "' + u.type + '" type was not found.';
|
|
2601
|
+
if (this.options.silent) return console.error(l), "";
|
|
2602
|
+
throw new Error(l);
|
|
2373
2603
|
}
|
|
2374
2604
|
}
|
|
2375
2605
|
}
|
|
@@ -2377,9 +2607,9 @@ ${e}</tr>
|
|
|
2377
2607
|
}
|
|
2378
2608
|
}, xe, pe = (xe = class {
|
|
2379
2609
|
constructor(e) {
|
|
2380
|
-
|
|
2381
|
-
|
|
2382
|
-
this.options = e ||
|
|
2610
|
+
I(this, "options");
|
|
2611
|
+
I(this, "block");
|
|
2612
|
+
this.options = e || se;
|
|
2383
2613
|
}
|
|
2384
2614
|
preprocess(e) {
|
|
2385
2615
|
return e;
|
|
@@ -2399,18 +2629,18 @@ ${e}</tr>
|
|
|
2399
2629
|
provideParser() {
|
|
2400
2630
|
return this.block ? N.parse : N.parseInline;
|
|
2401
2631
|
}
|
|
2402
|
-
},
|
|
2632
|
+
}, I(xe, "passThroughHooks", /* @__PURE__ */ new Set(["preprocess", "postprocess", "processAllTokens", "emStrongMask"])), I(xe, "passThroughHooksRespectAsync", /* @__PURE__ */ new Set(["preprocess", "postprocess", "processAllTokens"])), xe), Ka = class {
|
|
2403
2633
|
constructor(...e) {
|
|
2404
|
-
|
|
2405
|
-
|
|
2406
|
-
|
|
2407
|
-
|
|
2408
|
-
|
|
2409
|
-
|
|
2410
|
-
|
|
2411
|
-
|
|
2412
|
-
|
|
2413
|
-
|
|
2634
|
+
I(this, "defaults", Ke());
|
|
2635
|
+
I(this, "options", this.setOptions);
|
|
2636
|
+
I(this, "parse", this.parseMarkdown(!0));
|
|
2637
|
+
I(this, "parseInline", this.parseMarkdown(!1));
|
|
2638
|
+
I(this, "Parser", N);
|
|
2639
|
+
I(this, "Renderer", ze);
|
|
2640
|
+
I(this, "TextRenderer", st);
|
|
2641
|
+
I(this, "Lexer", F);
|
|
2642
|
+
I(this, "Tokenizer", Ae);
|
|
2643
|
+
I(this, "Hooks", pe);
|
|
2414
2644
|
this.use(...e);
|
|
2415
2645
|
}
|
|
2416
2646
|
walkTokens(e, t) {
|
|
@@ -2458,27 +2688,27 @@ ${e}</tr>
|
|
|
2458
2688
|
}
|
|
2459
2689
|
"childTokens" in s && s.childTokens && (t.childTokens[s.name] = s.childTokens);
|
|
2460
2690
|
}), a.extensions = t), r.renderer) {
|
|
2461
|
-
let s = this.defaults.renderer || new
|
|
2691
|
+
let s = this.defaults.renderer || new ze(this.defaults);
|
|
2462
2692
|
for (let n in r.renderer) {
|
|
2463
2693
|
if (!(n in s)) throw new Error(`renderer '${n}' does not exist`);
|
|
2464
2694
|
if (["options", "parser"].includes(n)) continue;
|
|
2465
2695
|
let o = n, i = r.renderer[o], u = s[o];
|
|
2466
|
-
s[o] = (...
|
|
2467
|
-
let d = i.apply(s,
|
|
2468
|
-
return d === !1 && (d = u.apply(s,
|
|
2696
|
+
s[o] = (...l) => {
|
|
2697
|
+
let d = i.apply(s, l);
|
|
2698
|
+
return d === !1 && (d = u.apply(s, l)), d || "";
|
|
2469
2699
|
};
|
|
2470
2700
|
}
|
|
2471
2701
|
a.renderer = s;
|
|
2472
2702
|
}
|
|
2473
2703
|
if (r.tokenizer) {
|
|
2474
|
-
let s = this.defaults.tokenizer || new
|
|
2704
|
+
let s = this.defaults.tokenizer || new Ae(this.defaults);
|
|
2475
2705
|
for (let n in r.tokenizer) {
|
|
2476
2706
|
if (!(n in s)) throw new Error(`tokenizer '${n}' does not exist`);
|
|
2477
2707
|
if (["options", "rules", "lexer"].includes(n)) continue;
|
|
2478
2708
|
let o = n, i = r.tokenizer[o], u = s[o];
|
|
2479
|
-
s[o] = (...
|
|
2480
|
-
let d = i.apply(s,
|
|
2481
|
-
return d === !1 && (d = u.apply(s,
|
|
2709
|
+
s[o] = (...l) => {
|
|
2710
|
+
let d = i.apply(s, l);
|
|
2711
|
+
return d === !1 && (d = u.apply(s, l)), d;
|
|
2482
2712
|
};
|
|
2483
2713
|
}
|
|
2484
2714
|
a.tokenizer = s;
|
|
@@ -2489,20 +2719,20 @@ ${e}</tr>
|
|
|
2489
2719
|
if (!(n in s)) throw new Error(`hook '${n}' does not exist`);
|
|
2490
2720
|
if (["options", "block"].includes(n)) continue;
|
|
2491
2721
|
let o = n, i = r.hooks[o], u = s[o];
|
|
2492
|
-
pe.passThroughHooks.has(n) ? s[o] = (
|
|
2722
|
+
pe.passThroughHooks.has(n) ? s[o] = (l) => {
|
|
2493
2723
|
if (this.defaults.async && pe.passThroughHooksRespectAsync.has(n)) return (async () => {
|
|
2494
|
-
let p = await i.call(s,
|
|
2724
|
+
let p = await i.call(s, l);
|
|
2495
2725
|
return u.call(s, p);
|
|
2496
2726
|
})();
|
|
2497
|
-
let d = i.call(s,
|
|
2727
|
+
let d = i.call(s, l);
|
|
2498
2728
|
return u.call(s, d);
|
|
2499
|
-
} : s[o] = (...
|
|
2729
|
+
} : s[o] = (...l) => {
|
|
2500
2730
|
if (this.defaults.async) return (async () => {
|
|
2501
|
-
let p = await i.apply(s,
|
|
2502
|
-
return p === !1 && (p = await u.apply(s,
|
|
2731
|
+
let p = await i.apply(s, l);
|
|
2732
|
+
return p === !1 && (p = await u.apply(s, l)), p;
|
|
2503
2733
|
})();
|
|
2504
|
-
let d = i.apply(s,
|
|
2505
|
-
return d === !1 && (d = u.apply(s,
|
|
2734
|
+
let d = i.apply(s, l);
|
|
2735
|
+
return d === !1 && (d = u.apply(s, l)), d;
|
|
2506
2736
|
};
|
|
2507
2737
|
}
|
|
2508
2738
|
a.hooks = s;
|
|
@@ -2535,8 +2765,8 @@ ${e}</tr>
|
|
|
2535
2765
|
if (s.hooks && (s.hooks.options = s, s.hooks.block = e), s.async) return (async () => {
|
|
2536
2766
|
let o = s.hooks ? await s.hooks.preprocess(t) : t, i = await (s.hooks ? await s.hooks.provideLexer() : e ? F.lex : F.lexInline)(o, s), u = s.hooks ? await s.hooks.processAllTokens(i) : i;
|
|
2537
2767
|
s.walkTokens && await Promise.all(this.walkTokens(u, s.walkTokens));
|
|
2538
|
-
let
|
|
2539
|
-
return s.hooks ? await s.hooks.postprocess(
|
|
2768
|
+
let l = await (s.hooks ? await s.hooks.provideParser() : e ? N.parse : N.parseInline)(u, s);
|
|
2769
|
+
return s.hooks ? await s.hooks.postprocess(l) : l;
|
|
2540
2770
|
})().catch(n);
|
|
2541
2771
|
try {
|
|
2542
2772
|
s.hooks && (t = s.hooks.preprocess(t));
|
|
@@ -2553,43 +2783,43 @@ ${e}</tr>
|
|
|
2553
2783
|
return (r) => {
|
|
2554
2784
|
if (r.message += `
|
|
2555
2785
|
Please report this to https://github.com/markedjs/marked.`, e) {
|
|
2556
|
-
let a = "<p>An error occurred:</p><pre>" +
|
|
2786
|
+
let a = "<p>An error occurred:</p><pre>" + X(r.message + "", !0) + "</pre>";
|
|
2557
2787
|
return t ? Promise.resolve(a) : a;
|
|
2558
2788
|
}
|
|
2559
2789
|
if (t) return Promise.reject(r);
|
|
2560
2790
|
throw r;
|
|
2561
2791
|
};
|
|
2562
2792
|
}
|
|
2563
|
-
},
|
|
2564
|
-
function
|
|
2565
|
-
return
|
|
2793
|
+
}, re = new Ka();
|
|
2794
|
+
function V(e, t) {
|
|
2795
|
+
return re.parse(e, t);
|
|
2566
2796
|
}
|
|
2567
|
-
|
|
2568
|
-
return
|
|
2797
|
+
V.options = V.setOptions = function(e) {
|
|
2798
|
+
return re.setOptions(e), V.defaults = re.defaults, mr(V.defaults), V;
|
|
2569
2799
|
};
|
|
2570
|
-
|
|
2571
|
-
|
|
2572
|
-
|
|
2573
|
-
return
|
|
2800
|
+
V.getDefaults = Ke;
|
|
2801
|
+
V.defaults = se;
|
|
2802
|
+
V.use = function(...e) {
|
|
2803
|
+
return re.use(...e), V.defaults = re.defaults, mr(V.defaults), V;
|
|
2574
2804
|
};
|
|
2575
|
-
|
|
2576
|
-
return
|
|
2805
|
+
V.walkTokens = function(e, t) {
|
|
2806
|
+
return re.walkTokens(e, t);
|
|
2577
2807
|
};
|
|
2578
|
-
|
|
2579
|
-
|
|
2580
|
-
|
|
2581
|
-
|
|
2582
|
-
|
|
2583
|
-
|
|
2584
|
-
|
|
2585
|
-
|
|
2586
|
-
|
|
2587
|
-
|
|
2588
|
-
|
|
2589
|
-
|
|
2590
|
-
|
|
2591
|
-
|
|
2592
|
-
|
|
2808
|
+
V.parseInline = re.parseInline;
|
|
2809
|
+
V.Parser = N;
|
|
2810
|
+
V.parser = N.parse;
|
|
2811
|
+
V.Renderer = ze;
|
|
2812
|
+
V.TextRenderer = st;
|
|
2813
|
+
V.Lexer = F;
|
|
2814
|
+
V.lexer = F.lex;
|
|
2815
|
+
V.Tokenizer = Ae;
|
|
2816
|
+
V.Hooks = pe;
|
|
2817
|
+
V.parse = V;
|
|
2818
|
+
V.options;
|
|
2819
|
+
V.setOptions;
|
|
2820
|
+
V.use;
|
|
2821
|
+
V.walkTokens;
|
|
2822
|
+
V.parseInline;
|
|
2593
2823
|
N.parse;
|
|
2594
2824
|
F.lex;
|
|
2595
2825
|
const Ja = ["jpg", "jpeg", "png", "gif", "webp", "svg", "bmp", "ico", "avif"];
|
|
@@ -2614,18 +2844,18 @@ function Qa(e) {
|
|
|
2614
2844
|
);
|
|
2615
2845
|
e = e.replace(a, (n, o, i) => {
|
|
2616
2846
|
const u = i && !i.match(/^(view|see|open|click|image|photo|picture)$/i) ? i : "";
|
|
2617
|
-
return
|
|
2847
|
+
return qe(o, u, u);
|
|
2618
2848
|
});
|
|
2619
2849
|
const s = new RegExp(
|
|
2620
2850
|
`(?<!["'=])(https?:\\/\\/[^\\s<>"]+\\.(?:${r})(\\?[^\\s<>"]*)?)(?!["'])`,
|
|
2621
2851
|
"gi"
|
|
2622
2852
|
);
|
|
2623
|
-
e = e.replace(s, (n, o) =>
|
|
2853
|
+
e = e.replace(s, (n, o) => qe(o, "", ""));
|
|
2624
2854
|
for (let n = t.length - 1; n >= 0; n--)
|
|
2625
2855
|
e = e.replace(`__IMG_PROTECTED_${n}__`, t[n]);
|
|
2626
2856
|
return e;
|
|
2627
2857
|
}
|
|
2628
|
-
function
|
|
2858
|
+
function qe(e, t, r) {
|
|
2629
2859
|
const a = t || r || "";
|
|
2630
2860
|
let s = "artifactuse-image";
|
|
2631
2861
|
e.includes("large2x") || e.includes("large") || r != null && r.toLowerCase().includes("hero") ? s = "artifactuse-hero-image" : e.includes("small") || e.includes("tiny") ? s = "artifactuse-inline-image" : (r != null && r.toLowerCase().includes("aerial") || r != null && r.toLowerCase().includes("view")) && (s = "artifactuse-hero-image");
|
|
@@ -2640,11 +2870,11 @@ function Ya(e) {
|
|
|
2640
2870
|
const o = t[n].trim();
|
|
2641
2871
|
if (o.includes('<div class="artifactuse-image-container">')) {
|
|
2642
2872
|
s || (s = !0, a = []);
|
|
2643
|
-
let i = "", u = n,
|
|
2873
|
+
let i = "", u = n, l = 0;
|
|
2644
2874
|
for (; u < t.length; ) {
|
|
2645
2875
|
const d = t[u];
|
|
2646
2876
|
if (i += d + `
|
|
2647
|
-
`,
|
|
2877
|
+
`, l += (d.match(/<div/g) || []).length, l -= (d.match(/<\/div>/g) || []).length, l === 0) break;
|
|
2648
2878
|
u++;
|
|
2649
2879
|
}
|
|
2650
2880
|
a.push(i.trim()), n = u;
|
|
@@ -2672,10 +2902,10 @@ ${e.map((r) => r.replace("artifactuse-image-container", "artifactuse-gallery-ite
|
|
|
2672
2902
|
`)}
|
|
2673
2903
|
</div>`;
|
|
2674
2904
|
}
|
|
2675
|
-
const
|
|
2905
|
+
const Sr = ["mp4", "webm", "mov", "avi", "mkv", "flv", "wmv", "m4v"];
|
|
2676
2906
|
function es(e) {
|
|
2677
2907
|
if (!e) return !1;
|
|
2678
|
-
const t =
|
|
2908
|
+
const t = Sr.join("|");
|
|
2679
2909
|
return !!(new RegExp(`\\.(${t})(\\?.*)?$`, "i").test(e) || /(?:youtube\.com\/watch\?v=|youtu\.be\/)[a-zA-Z0-9_-]+/.test(e) || /vimeo\.com\/\d+/.test(e) || /loom\.com\/share\/[a-zA-Z0-9]+/.test(e) || /dailymotion\.com\/video\/[a-zA-Z0-9]+/.test(e));
|
|
2680
2910
|
}
|
|
2681
2911
|
function ts(e) {
|
|
@@ -2685,7 +2915,7 @@ function ts(e) {
|
|
|
2685
2915
|
if (t = e.match(/vimeo\.com\/(\d+)/), t) return { type: "vimeo", id: t[1] };
|
|
2686
2916
|
if (t = e.match(/loom\.com\/share\/([a-zA-Z0-9]+)/), t) return { type: "loom", id: t[1] };
|
|
2687
2917
|
if (t = e.match(/dailymotion\.com\/video\/([a-zA-Z0-9]+)/), t) return { type: "dailymotion", id: t[1] };
|
|
2688
|
-
const r =
|
|
2918
|
+
const r = Sr.join("|");
|
|
2689
2919
|
return new RegExp(`\\.(${r})(\\?.*)?$`, "i").test(e) ? { type: "direct", id: e } : null;
|
|
2690
2920
|
}
|
|
2691
2921
|
function rs(e) {
|
|
@@ -2695,53 +2925,53 @@ function rs(e) {
|
|
|
2695
2925
|
case "youtube":
|
|
2696
2926
|
return Oe(t.id);
|
|
2697
2927
|
case "vimeo":
|
|
2698
|
-
return
|
|
2928
|
+
return Be(t.id);
|
|
2699
2929
|
case "loom":
|
|
2700
2930
|
return Fe(t.id);
|
|
2701
2931
|
case "dailymotion":
|
|
2702
2932
|
return Ne(t.id);
|
|
2703
2933
|
case "direct":
|
|
2704
|
-
return
|
|
2934
|
+
return Ze(t.id);
|
|
2705
2935
|
default:
|
|
2706
2936
|
return `<a href="${e}" target="_blank" rel="noopener noreferrer">${e}</a>`;
|
|
2707
2937
|
}
|
|
2708
2938
|
}
|
|
2709
2939
|
function as(e) {
|
|
2710
2940
|
const t = [];
|
|
2711
|
-
e = e.replace(/<pre[^>]*>[\s\S]*?<\/pre>/gi, (
|
|
2941
|
+
e = e.replace(/<pre[^>]*>[\s\S]*?<\/pre>/gi, (c) => {
|
|
2712
2942
|
const m = `__PROTECTED_${t.length}__`;
|
|
2713
|
-
return t.push(
|
|
2714
|
-
}), e = e.replace(/<code[^>]*>[\s\S]*?<\/code>/gi, (
|
|
2943
|
+
return t.push(c), m;
|
|
2944
|
+
}), e = e.replace(/<code[^>]*>[\s\S]*?<\/code>/gi, (c) => {
|
|
2715
2945
|
const m = `__PROTECTED_${t.length}__`;
|
|
2716
|
-
return t.push(
|
|
2717
|
-
}), e = e.replace(/<(video|audio|iframe)[^>]*>[\s\S]*?<\/\1>/gi, (
|
|
2946
|
+
return t.push(c), m;
|
|
2947
|
+
}), e = e.replace(/<(video|audio|iframe)[^>]*>[\s\S]*?<\/\1>/gi, (c) => {
|
|
2718
2948
|
const m = `__PROTECTED_${t.length}__`;
|
|
2719
|
-
return t.push(
|
|
2949
|
+
return t.push(c), m;
|
|
2720
2950
|
});
|
|
2721
2951
|
const r = /\[([^\]]+)\]\((https:\/\/www\.pexels\.com\/video\/[^)]+)\)\s*(?:<\/p>)?\s*(?:<p>)?\s*(?:Preview image:\s*)?!\[([^\]]*)\]\((https:\/\/images\.pexels\.com\/videos\/[^)]+)\)/gi;
|
|
2722
|
-
e = e.replace(r, (
|
|
2952
|
+
e = e.replace(r, (c, m, h, g, f) => ns(m, h, f, g));
|
|
2723
2953
|
const a = /<a[^>]*href="(https?:\/\/[^"]+\.(mp4|webm|mov|avi|mkv|flv|wmv|m4v)(?:\?[^"]*)?)"[^>]*>[^<]*<\/a>/gi;
|
|
2724
|
-
e = e.replace(a, (
|
|
2954
|
+
e = e.replace(a, (c, m) => Ze(m));
|
|
2725
2955
|
const s = new RegExp(`(?<!["'=])(https?:\\/\\/[^\\s<>"]+\\.(mp4|webm|mov|avi|mkv|flv|wmv|m4v)(\\?[^\\s<>"]*)?)(?!["'])`, "gi");
|
|
2726
|
-
e = e.replace(s, (
|
|
2956
|
+
e = e.replace(s, (c, m) => Ze(m));
|
|
2727
2957
|
const n = /<a[^>]*href="(https?:\/\/(?:www\.)?(?:youtube\.com\/watch\?v=|youtu\.be\/)([a-zA-Z0-9_-]+)[^"]*)"[^>]*>[^<]*<\/a>/gi;
|
|
2728
|
-
e = e.replace(n, (
|
|
2958
|
+
e = e.replace(n, (c, m, h) => Oe(h));
|
|
2729
2959
|
const o = new RegExp(`(?<!["'=])(https?:\\/\\/(?:www\\.)?(?:youtube\\.com\\/watch\\?v=|youtu\\.be\\/)([a-zA-Z0-9_-]+))(?!["'])`, "gi");
|
|
2730
|
-
e = e.replace(o, (
|
|
2960
|
+
e = e.replace(o, (c, m, h) => Oe(h));
|
|
2731
2961
|
const i = /<a[^>]*href="(https?:\/\/(?:www\.)?vimeo\.com\/(\d+)[^"]*)"[^>]*>[^<]*<\/a>/gi;
|
|
2732
|
-
e = e.replace(i, (
|
|
2962
|
+
e = e.replace(i, (c, m, h) => Be(h));
|
|
2733
2963
|
const u = new RegExp(`(?<!["'=])(https?:\\/\\/(?:www\\.)?vimeo\\.com\\/(\\d+))(?!["'])`, "gi");
|
|
2734
|
-
e = e.replace(u, (
|
|
2735
|
-
const
|
|
2736
|
-
e = e.replace(
|
|
2964
|
+
e = e.replace(u, (c, m, h) => Be(h));
|
|
2965
|
+
const l = /<a[^>]*href="(https?:\/\/(?:www\.)?loom\.com\/share\/([a-zA-Z0-9]+)[^"]*)"[^>]*>[^<]*<\/a>/gi;
|
|
2966
|
+
e = e.replace(l, (c, m, h) => Fe(h));
|
|
2737
2967
|
const d = new RegExp(`(?<!["'=])(https?:\\/\\/(?:www\\.)?loom\\.com\\/share\\/([a-zA-Z0-9]+))(?!["'])`, "gi");
|
|
2738
|
-
e = e.replace(d, (
|
|
2968
|
+
e = e.replace(d, (c, m, h) => Fe(h));
|
|
2739
2969
|
const p = /<a[^>]*href="(https?:\/\/(?:www\.)?dailymotion\.com\/video\/([a-zA-Z0-9]+)[^"]*)"[^>]*>[^<]*<\/a>/gi;
|
|
2740
|
-
e = e.replace(p, (
|
|
2970
|
+
e = e.replace(p, (c, m, h) => Ne(h));
|
|
2741
2971
|
const w = new RegExp(`(?<!["'=])(https?:\\/\\/(?:www\\.)?dailymotion\\.com\\/video\\/([a-zA-Z0-9]+))(?!["'])`, "gi");
|
|
2742
|
-
e = e.replace(w, (
|
|
2743
|
-
for (let
|
|
2744
|
-
e = e.replace(`__PROTECTED_${
|
|
2972
|
+
e = e.replace(w, (c, m, h) => Ne(h));
|
|
2973
|
+
for (let c = t.length - 1; c >= 0; c--)
|
|
2974
|
+
e = e.replace(`__PROTECTED_${c}__`, t[c]);
|
|
2745
2975
|
return e;
|
|
2746
2976
|
}
|
|
2747
2977
|
function ss(e) {
|
|
@@ -2757,7 +2987,7 @@ function ss(e) {
|
|
|
2757
2987
|
wmv: "video/x-ms-wmv"
|
|
2758
2988
|
}[t] || "video/mp4";
|
|
2759
2989
|
}
|
|
2760
|
-
function
|
|
2990
|
+
function Ze(e) {
|
|
2761
2991
|
const t = ss(e);
|
|
2762
2992
|
return `<div class="artifactuse-video-wrapper"><video controls preload="metadata" class="artifactuse-video"><source src="${e}" type="${t}">Your browser does not support the video tag.</video></div>`;
|
|
2763
2993
|
}
|
|
@@ -2768,7 +2998,7 @@ function Oe(e) {
|
|
|
2768
2998
|
const t = `https://i.ytimg.com/vi/${e}/hqdefault.jpg`, a = `this.parentElement.innerHTML='<iframe src=\\'${`https://www.youtube.com/embed/${e}?autoplay=1`}\\' frameborder=\\'0\\' allow=\\'accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture\\' allowfullscreen class=\\'artifactuse-video-iframe\\'></iframe>'`;
|
|
2769
2999
|
return `<div class="artifactuse-video-wrapper artifactuse-video-lazy" data-video-type="youtube" data-video-id="${e}"><button type="button" class="artifactuse-video-facade" aria-label="Play YouTube video" onclick="${a}"><img src="${t}" alt="YouTube video thumbnail" class="artifactuse-video-thumbnail" loading="lazy" /><div class="artifactuse-video-play-button artifactuse-youtube-play"><svg viewBox="0 0 68 48" width="68" height="48"><path class="artifactuse-youtube-play-bg" d="M66.52,7.74c-0.78-2.93-2.49-5.41-5.42-6.19C55.79,.13,34,0,34,0S12.21,.13,6.9,1.55 C3.97,2.33,2.27,4.81,1.48,7.74C0.06,13.05,0,24,0,24s0.06,10.95,1.48,16.26c0.78,2.93,2.49,5.41,5.42,6.19 C12.21,47.87,34,48,34,48s21.79-0.13,27.1-1.55c2.93-0.78,4.64-3.26,5.42-6.19C67.94,34.95,68,24,68,24S67.94,13.05,66.52,7.74z" fill="#f00"/><path d="M 45,24 27,14 27,34" fill="#fff"/></svg></div></button></div>`;
|
|
2770
3000
|
}
|
|
2771
|
-
function
|
|
3001
|
+
function Be(e) {
|
|
2772
3002
|
const t = `https://player.vimeo.com/video/${e}?autoplay=1`, r = `https://vumbnail.com/${e}.jpg`, a = `this.parentElement.innerHTML='<iframe src=\\'${t}\\' frameborder=\\'0\\' allow=\\'autoplay; fullscreen; picture-in-picture\\' allowfullscreen class=\\'artifactuse-video-iframe\\'></iframe>'`;
|
|
2773
3003
|
return `<div class="artifactuse-video-wrapper artifactuse-video-lazy" data-video-type="vimeo" data-video-id="${e}"><button type="button" class="artifactuse-video-facade" aria-label="Play Vimeo video" onclick="${a}"><img src="${r}" alt="Vimeo video thumbnail" class="artifactuse-video-thumbnail" loading="lazy" onerror="this.style.display='none'" /><div class="artifactuse-video-play-button artifactuse-vimeo-play"><svg viewBox="0 0 64 64" width="64" height="64"><circle cx="32" cy="32" r="31" fill="#1ab7ea"/><path d="M26 20 L26 44 L46 32 Z" fill="#fff"/></svg></div></button></div>`;
|
|
2774
3004
|
}
|
|
@@ -2803,11 +3033,11 @@ function os(e) {
|
|
|
2803
3033
|
let a;
|
|
2804
3034
|
for (; (a = t.exec(e)) !== null; ) {
|
|
2805
3035
|
const u = a.index;
|
|
2806
|
-
let
|
|
3036
|
+
let l = 0, d = u;
|
|
2807
3037
|
for (let p = u; p < e.length; p++)
|
|
2808
3038
|
if (e.substring(p, p + 4) === "<div")
|
|
2809
|
-
|
|
2810
|
-
else if (e.substring(p, p + 6) === "</div>" && (
|
|
3039
|
+
l++;
|
|
3040
|
+
else if (e.substring(p, p + 6) === "</div>" && (l--, l === 0)) {
|
|
2811
3041
|
d = p + 6;
|
|
2812
3042
|
break;
|
|
2813
3043
|
}
|
|
@@ -2825,33 +3055,33 @@ function os(e) {
|
|
|
2825
3055
|
caption: Pe(e.substring(0, r[0].start))
|
|
2826
3056
|
}];
|
|
2827
3057
|
for (let u = 1; u < r.length; u++) {
|
|
2828
|
-
const
|
|
3058
|
+
const l = r[u - 1], d = r[u], p = e.substring(l.end, d.start);
|
|
2829
3059
|
is(p) ? n.push({
|
|
2830
3060
|
...d,
|
|
2831
3061
|
caption: Pe(p)
|
|
2832
3062
|
}) : (s.push([...n]), n = [{
|
|
2833
3063
|
...d,
|
|
2834
|
-
caption: Pe(e.substring(
|
|
3064
|
+
caption: Pe(e.substring(l.end, d.start))
|
|
2835
3065
|
}]);
|
|
2836
3066
|
}
|
|
2837
3067
|
s.push(n);
|
|
2838
3068
|
let o = "", i = 0;
|
|
2839
3069
|
for (const u of s) {
|
|
2840
3070
|
if (u.length === 0) continue;
|
|
2841
|
-
const
|
|
2842
|
-
let d =
|
|
2843
|
-
const w = e.substring(i,
|
|
2844
|
-
if (w && (d =
|
|
2845
|
-
o +=
|
|
3071
|
+
const l = u[0];
|
|
3072
|
+
let d = l.start;
|
|
3073
|
+
const w = e.substring(i, l.start).match(/<p>((?:[^<]|<(?!\/p>))*?)(?:<br\s*\/?>)?\s*<\/p>\s*$/);
|
|
3074
|
+
if (w && (d = l.start - w[0].length, u[0].caption = w[1].trim()), o += e.substring(i, d), u.length >= 2)
|
|
3075
|
+
o += ls(u);
|
|
2846
3076
|
else {
|
|
2847
|
-
const
|
|
2848
|
-
|
|
3077
|
+
const c = u[0];
|
|
3078
|
+
c.caption ? o += `<div class="artifactuse-video-container">${c.html}<div class="artifactuse-video-caption">${c.caption}</div></div>` : o += c.html;
|
|
2849
3079
|
}
|
|
2850
3080
|
i = u[u.length - 1].end;
|
|
2851
3081
|
}
|
|
2852
3082
|
return o += e.substring(i), o = o.replace(/<p>\s*<\/p>/g, ""), o;
|
|
2853
3083
|
}
|
|
2854
|
-
function
|
|
3084
|
+
function ls(e) {
|
|
2855
3085
|
return `<div class="artifactuse-video-gallery">
|
|
2856
3086
|
${e.map(({ html: r, caption: a }) => {
|
|
2857
3087
|
let s = r.replace(
|
|
@@ -2866,59 +3096,59 @@ ${e.map(({ html: r, caption: a }) => {
|
|
|
2866
3096
|
`)}
|
|
2867
3097
|
</div>`;
|
|
2868
3098
|
}
|
|
2869
|
-
function
|
|
3099
|
+
function cs() {
|
|
2870
3100
|
return `audio-${Date.now()}-${Math.random().toString(36).substr(2, 9)}`;
|
|
2871
3101
|
}
|
|
2872
3102
|
function us(e, t = {}) {
|
|
2873
3103
|
const r = t.theme || "dark", a = [];
|
|
2874
|
-
e = e.replace(/<pre[^>]*>[\s\S]*?<\/pre>/gi, (
|
|
2875
|
-
const
|
|
2876
|
-
return a.push(
|
|
2877
|
-
}), e = e.replace(/<code[^>]*>[\s\S]*?<\/code>/gi, (
|
|
2878
|
-
const
|
|
2879
|
-
return a.push(
|
|
2880
|
-
}), e = e.replace(/<(video|audio|iframe)[^>]*>[\s\S]*?<\/\1>/gi, (
|
|
2881
|
-
const
|
|
2882
|
-
return a.push(
|
|
3104
|
+
e = e.replace(/<pre[^>]*>[\s\S]*?<\/pre>/gi, (A) => {
|
|
3105
|
+
const C = `__PROTECTED_${a.length}__`;
|
|
3106
|
+
return a.push(A), C;
|
|
3107
|
+
}), e = e.replace(/<code[^>]*>[\s\S]*?<\/code>/gi, (A) => {
|
|
3108
|
+
const C = `__PROTECTED_${a.length}__`;
|
|
3109
|
+
return a.push(A), C;
|
|
3110
|
+
}), e = e.replace(/<(video|audio|iframe)[^>]*>[\s\S]*?<\/\1>/gi, (A) => {
|
|
3111
|
+
const C = `__PROTECTED_${a.length}__`;
|
|
3112
|
+
return a.push(A), C;
|
|
2883
3113
|
});
|
|
2884
3114
|
const s = /<a[^>]*href="(https?:\/\/[^"]+\.(mp3|wav|flac|aac|ogg|m4a|wma)(?:\?[^"]*)?)"[^>]*>[^<]*<\/a>/gi;
|
|
2885
|
-
e = e.replace(s, (
|
|
3115
|
+
e = e.replace(s, (A, C) => vt(C));
|
|
2886
3116
|
const n = new RegExp(`(?<!["'=])(https?:\\/\\/[^\\s<>"]+\\.(mp3|wav|flac|aac|ogg|m4a|wma)(\\?[^\\s<>"]*)?)(?!["'])`, "gi");
|
|
2887
|
-
e = e.replace(n, (
|
|
3117
|
+
e = e.replace(n, (A, C) => vt(C));
|
|
2888
3118
|
const o = /<a[^>]*href="(https?:\/\/(?:www\.)?soundcloud\.com\/[^"]+)"[^>]*>[^<]*<\/a>/gi;
|
|
2889
|
-
e = e.replace(o, (
|
|
3119
|
+
e = e.replace(o, (A, C) => yt(C));
|
|
2890
3120
|
const i = new RegExp(`(?<!["'=])(https?:\\/\\/(?:www\\.)?soundcloud\\.com\\/[^\\s<>"]+)(?!["'])`, "gi");
|
|
2891
|
-
e = e.replace(i, (
|
|
3121
|
+
e = e.replace(i, (A, C) => yt(C));
|
|
2892
3122
|
const u = /<a[^>]*href="(https?:\/\/open\.spotify\.com\/track\/([a-zA-Z0-9]+)[^"]*)"[^>]*>[^<]*<\/a>/gi;
|
|
2893
|
-
e = e.replace(u, (
|
|
2894
|
-
const
|
|
2895
|
-
e = e.replace(
|
|
3123
|
+
e = e.replace(u, (A, C, R) => O("track", R, r));
|
|
3124
|
+
const l = new RegExp(`(?<!["'=])(https?:\\/\\/open\\.spotify\\.com\\/track\\/([a-zA-Z0-9]+))(?!["'])`, "gi");
|
|
3125
|
+
e = e.replace(l, (A, C, R) => O("track", R, r));
|
|
2896
3126
|
const d = /<a[^>]*href="(https?:\/\/open\.spotify\.com\/album\/([a-zA-Z0-9]+)[^"]*)"[^>]*>[^<]*<\/a>/gi;
|
|
2897
|
-
e = e.replace(d, (
|
|
3127
|
+
e = e.replace(d, (A, C, R) => O("album", R, r));
|
|
2898
3128
|
const p = new RegExp(`(?<!["'=])(https?:\\/\\/open\\.spotify\\.com\\/album\\/([a-zA-Z0-9]+))(?!["'])`, "gi");
|
|
2899
|
-
e = e.replace(p, (
|
|
3129
|
+
e = e.replace(p, (A, C, R) => O("album", R, r));
|
|
2900
3130
|
const w = /<a[^>]*href="(https?:\/\/open\.spotify\.com\/playlist\/([a-zA-Z0-9]+)[^"]*)"[^>]*>[^<]*<\/a>/gi;
|
|
2901
|
-
e = e.replace(w, (
|
|
2902
|
-
const
|
|
2903
|
-
e = e.replace(
|
|
3131
|
+
e = e.replace(w, (A, C, R) => O("playlist", R, r));
|
|
3132
|
+
const c = new RegExp(`(?<!["'=])(https?:\\/\\/open\\.spotify\\.com\\/playlist\\/([a-zA-Z0-9]+))(?!["'])`, "gi");
|
|
3133
|
+
e = e.replace(c, (A, C, R) => O("playlist", R, r));
|
|
2904
3134
|
const m = /<a[^>]*href="(https?:\/\/open\.spotify\.com\/artist\/([a-zA-Z0-9]+)[^"]*)"[^>]*>[^<]*<\/a>/gi;
|
|
2905
|
-
e = e.replace(m, (
|
|
3135
|
+
e = e.replace(m, (A, C, R) => O("artist", R, r));
|
|
2906
3136
|
const h = new RegExp(`(?<!["'=])(https?:\\/\\/open\\.spotify\\.com\\/artist\\/([a-zA-Z0-9]+))(?!["'])`, "gi");
|
|
2907
|
-
e = e.replace(h, (
|
|
3137
|
+
e = e.replace(h, (A, C, R) => O("artist", R, r));
|
|
2908
3138
|
const g = /<a[^>]*href="(https?:\/\/open\.spotify\.com\/episode\/([a-zA-Z0-9]+)[^"]*)"[^>]*>[^<]*<\/a>/gi;
|
|
2909
|
-
e = e.replace(g, (
|
|
3139
|
+
e = e.replace(g, (A, C, R) => O("episode", R, r));
|
|
2910
3140
|
const f = new RegExp(`(?<!["'=])(https?:\\/\\/open\\.spotify\\.com\\/episode\\/([a-zA-Z0-9]+))(?!["'])`, "gi");
|
|
2911
|
-
e = e.replace(f, (
|
|
3141
|
+
e = e.replace(f, (A, C, R) => O("episode", R, r));
|
|
2912
3142
|
const b = /<a[^>]*href="(https?:\/\/open\.spotify\.com\/show\/([a-zA-Z0-9]+)[^"]*)"[^>]*>[^<]*<\/a>/gi;
|
|
2913
|
-
e = e.replace(b, (
|
|
2914
|
-
const
|
|
2915
|
-
e = e.replace(
|
|
2916
|
-
const
|
|
2917
|
-
e = e.replace(
|
|
2918
|
-
const
|
|
2919
|
-
e = e.replace(
|
|
2920
|
-
for (let
|
|
2921
|
-
e = e.replace(`__PROTECTED_${
|
|
3143
|
+
e = e.replace(b, (A, C, R) => O("show", R, r));
|
|
3144
|
+
const v = new RegExp(`(?<!["'=])(https?:\\/\\/open\\.spotify\\.com\\/show\\/([a-zA-Z0-9]+))(?!["'])`, "gi");
|
|
3145
|
+
e = e.replace(v, (A, C, R) => O("show", R, r));
|
|
3146
|
+
const x = /<a[^>]*href="(https?:\/\/music\.apple\.com\/([a-z]{2})\/([a-z-]+)\/[^\/]+\/(\d+)[^"]*)"[^>]*>[^<]*<\/a>/gi;
|
|
3147
|
+
e = e.replace(x, (A, C, R, M, y) => kt(R, M, y));
|
|
3148
|
+
const $ = new RegExp(`(?<!["'=])(https?:\\/\\/music\\.apple\\.com\\/([a-z]{2})\\/([a-z-]+)\\/[^\\/\\s]+\\/(\\d+))(?!["'])`, "gi");
|
|
3149
|
+
e = e.replace($, (A, C, R, M, y) => kt(R, M, y));
|
|
3150
|
+
for (let A = a.length - 1; A >= 0; A--)
|
|
3151
|
+
e = e.replace(`__PROTECTED_${A}__`, a[A]);
|
|
2922
3152
|
return e;
|
|
2923
3153
|
}
|
|
2924
3154
|
function ds(e) {
|
|
@@ -2929,7 +3159,7 @@ function de(e) {
|
|
|
2929
3159
|
return e.replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">").replace(/"/g, """).replace(/'/g, "'");
|
|
2930
3160
|
}
|
|
2931
3161
|
function vt(e) {
|
|
2932
|
-
const t =
|
|
3162
|
+
const t = cs(), r = decodeURIComponent(e.split("/").pop().split("?")[0]), a = ds(e);
|
|
2933
3163
|
return `
|
|
2934
3164
|
<div class="artifactuse-audio-player" data-player-id="${t}" data-audio-src="${de(e)}">
|
|
2935
3165
|
<!-- Hidden audio element -->
|
|
@@ -3032,7 +3262,7 @@ function yt(e) {
|
|
|
3032
3262
|
</div>
|
|
3033
3263
|
`;
|
|
3034
3264
|
}
|
|
3035
|
-
function
|
|
3265
|
+
function O(e, t, r = "dark") {
|
|
3036
3266
|
const s = {
|
|
3037
3267
|
track: 152,
|
|
3038
3268
|
album: 352,
|
|
@@ -3069,7 +3299,7 @@ function kt(e, t, r) {
|
|
|
3069
3299
|
</div>
|
|
3070
3300
|
`;
|
|
3071
3301
|
}
|
|
3072
|
-
const
|
|
3302
|
+
const ae = /* @__PURE__ */ new Map(), je = [0.5, 0.75, 1, 1.25, 1.5, 2];
|
|
3073
3303
|
function ps(e = document) {
|
|
3074
3304
|
e.querySelectorAll(".artifactuse-audio-player:not([data-initialized])").forEach((r) => {
|
|
3075
3305
|
fs(r);
|
|
@@ -3078,7 +3308,7 @@ function ps(e = document) {
|
|
|
3078
3308
|
function fs(e) {
|
|
3079
3309
|
const t = e.dataset.playerId, r = e.dataset.audioSrc;
|
|
3080
3310
|
if (!t || !r) return;
|
|
3081
|
-
const a = e.querySelector(".artifactuse-audio-element"), s = e.querySelector(".artifactuse-audio-play-btn"), n = e.querySelector(".artifactuse-audio-icon-play"), o = e.querySelector(".artifactuse-audio-icon-pause"), i = e.querySelector(".artifactuse-audio-current"), u = e.querySelector(".artifactuse-audio-duration"),
|
|
3311
|
+
const a = e.querySelector(".artifactuse-audio-element"), s = e.querySelector(".artifactuse-audio-play-btn"), n = e.querySelector(".artifactuse-audio-icon-play"), o = e.querySelector(".artifactuse-audio-icon-pause"), i = e.querySelector(".artifactuse-audio-current"), u = e.querySelector(".artifactuse-audio-duration"), l = e.querySelector(".artifactuse-audio-waveform"), d = e.querySelector(".artifactuse-audio-waveform-canvas"), p = e.querySelector(".artifactuse-audio-waveform-progress"), w = e.querySelector(".artifactuse-audio-waveform-hover"), c = e.querySelector(".artifactuse-audio-mute-btn"), m = e.querySelector(".artifactuse-audio-icon-volume"), h = e.querySelector(".artifactuse-audio-icon-muted"), g = e.querySelector(".artifactuse-audio-volume-slider"), f = e.querySelector(".artifactuse-audio-speed-btn");
|
|
3082
3312
|
if (!a) return;
|
|
3083
3313
|
const b = {
|
|
3084
3314
|
isPlaying: !1,
|
|
@@ -3089,56 +3319,56 @@ function fs(e) {
|
|
|
3089
3319
|
currentTime: 0,
|
|
3090
3320
|
waveformData: null
|
|
3091
3321
|
};
|
|
3092
|
-
|
|
3093
|
-
b.isPlaying ?
|
|
3322
|
+
ae.set(t, { playerEl: e, audio: a, state: b }), hs(d, t), s == null || s.addEventListener("click", () => {
|
|
3323
|
+
b.isPlaying ? zt(t) : At(t);
|
|
3094
3324
|
}), a.addEventListener("loadedmetadata", () => {
|
|
3095
|
-
b.duration = a.duration, u.textContent =
|
|
3325
|
+
b.duration = a.duration, u.textContent = $t(a.duration);
|
|
3096
3326
|
}), a.addEventListener("timeupdate", () => {
|
|
3097
|
-
b.currentTime = a.currentTime, i.textContent =
|
|
3098
|
-
const
|
|
3099
|
-
p.style.width = `${
|
|
3327
|
+
b.currentTime = a.currentTime, i.textContent = $t(a.currentTime);
|
|
3328
|
+
const v = a.currentTime / a.duration * 100;
|
|
3329
|
+
p.style.width = `${v}%`;
|
|
3100
3330
|
}), a.addEventListener("ended", () => {
|
|
3101
3331
|
b.isPlaying = !1, n.style.display = "", o.style.display = "none", e.classList.remove("is-playing"), p.style.width = "0%";
|
|
3102
3332
|
}), a.addEventListener("play", () => {
|
|
3103
3333
|
b.isPlaying = !0, n.style.display = "none", o.style.display = "", e.classList.add("is-playing"), gs(t);
|
|
3104
3334
|
}), a.addEventListener("pause", () => {
|
|
3105
3335
|
b.isPlaying = !1, n.style.display = "", o.style.display = "none", e.classList.remove("is-playing");
|
|
3106
|
-
}),
|
|
3107
|
-
const
|
|
3108
|
-
isNaN(
|
|
3109
|
-
}),
|
|
3110
|
-
const
|
|
3111
|
-
w.style.width = `${
|
|
3112
|
-
}),
|
|
3336
|
+
}), l == null || l.addEventListener("click", (v) => {
|
|
3337
|
+
const x = l.getBoundingClientRect(), C = (v.clientX - x.left) / x.width * a.duration;
|
|
3338
|
+
isNaN(C) || (a.currentTime = C);
|
|
3339
|
+
}), l == null || l.addEventListener("mousemove", (v) => {
|
|
3340
|
+
const x = l.getBoundingClientRect(), A = (v.clientX - x.left) / x.width * 100;
|
|
3341
|
+
w.style.width = `${A}%`;
|
|
3342
|
+
}), l == null || l.addEventListener("mouseleave", () => {
|
|
3113
3343
|
w.style.width = "0%";
|
|
3114
|
-
}),
|
|
3344
|
+
}), c == null || c.addEventListener("click", () => {
|
|
3115
3345
|
b.isMuted = !b.isMuted, a.muted = b.isMuted, m.style.display = b.isMuted ? "none" : "", h.style.display = b.isMuted ? "" : "none", b.isMuted ? g.value = 0 : g.value = b.volume * 100;
|
|
3116
|
-
}), g == null || g.addEventListener("input", (
|
|
3117
|
-
const
|
|
3118
|
-
b.volume =
|
|
3346
|
+
}), g == null || g.addEventListener("input", (v) => {
|
|
3347
|
+
const x = parseInt(v.target.value, 10) / 100;
|
|
3348
|
+
b.volume = x, a.volume = x, x === 0 ? (b.isMuted = !0, m.style.display = "none", h.style.display = "") : (b.isMuted = !1, a.muted = !1, m.style.display = "", h.style.display = "none");
|
|
3119
3349
|
}), f == null || f.addEventListener("click", () => {
|
|
3120
|
-
const
|
|
3121
|
-
b.playbackRate = je[
|
|
3122
|
-
}), e.addEventListener("keydown", (
|
|
3123
|
-
switch (
|
|
3350
|
+
const x = (je.indexOf(b.playbackRate) + 1) % je.length;
|
|
3351
|
+
b.playbackRate = je[x], a.playbackRate = b.playbackRate, f.querySelector("span").textContent = `${b.playbackRate}x`;
|
|
3352
|
+
}), e.addEventListener("keydown", (v) => {
|
|
3353
|
+
switch (v.key) {
|
|
3124
3354
|
case " ":
|
|
3125
3355
|
case "k":
|
|
3126
|
-
|
|
3356
|
+
v.preventDefault(), b.isPlaying ? zt(t) : At(t);
|
|
3127
3357
|
break;
|
|
3128
3358
|
case "ArrowLeft":
|
|
3129
|
-
|
|
3359
|
+
v.preventDefault(), a.currentTime = Math.max(0, a.currentTime - 5);
|
|
3130
3360
|
break;
|
|
3131
3361
|
case "ArrowRight":
|
|
3132
|
-
|
|
3362
|
+
v.preventDefault(), a.currentTime = Math.min(a.duration, a.currentTime + 5);
|
|
3133
3363
|
break;
|
|
3134
3364
|
case "ArrowUp":
|
|
3135
|
-
|
|
3365
|
+
v.preventDefault(), b.volume = Math.min(1, b.volume + 0.1), a.volume = b.volume, g.value = b.volume * 100;
|
|
3136
3366
|
break;
|
|
3137
3367
|
case "ArrowDown":
|
|
3138
|
-
|
|
3368
|
+
v.preventDefault(), b.volume = Math.max(0, b.volume - 0.1), a.volume = b.volume, g.value = b.volume * 100;
|
|
3139
3369
|
break;
|
|
3140
3370
|
case "m":
|
|
3141
|
-
|
|
3371
|
+
v.preventDefault(), c == null || c.click();
|
|
3142
3372
|
break;
|
|
3143
3373
|
}
|
|
3144
3374
|
}), e.setAttribute("data-initialized", "true"), e.setAttribute("tabindex", "0");
|
|
@@ -3148,11 +3378,11 @@ function hs(e, t) {
|
|
|
3148
3378
|
const r = e.getContext("2d"), a = window.devicePixelRatio || 1, s = e.parentElement.getBoundingClientRect();
|
|
3149
3379
|
e.width = s.width * a, e.height = s.height * a, e.style.width = `${s.width}px`, e.style.height = `${s.height}px`, r.scale(a, a);
|
|
3150
3380
|
const n = s.width, o = s.height, i = Math.floor(n / 4), u = xt(i, t);
|
|
3151
|
-
|
|
3381
|
+
Mt(r, u, n, o), new ResizeObserver(() => {
|
|
3152
3382
|
const d = e.parentElement.getBoundingClientRect();
|
|
3153
3383
|
e.width = d.width * a, e.height = d.height * a, e.style.width = `${d.width}px`, e.style.height = `${d.height}px`, r.scale(a, a);
|
|
3154
3384
|
const p = Math.floor(d.width / 4), w = xt(p, t);
|
|
3155
|
-
|
|
3385
|
+
Mt(r, w, d.width, d.height);
|
|
3156
3386
|
}).observe(e.parentElement);
|
|
3157
3387
|
}
|
|
3158
3388
|
function xt(e, t) {
|
|
@@ -3172,38 +3402,38 @@ function xt(e, t) {
|
|
|
3172
3402
|
}
|
|
3173
3403
|
return r;
|
|
3174
3404
|
}
|
|
3175
|
-
function
|
|
3405
|
+
function Mt(e, t, r, a) {
|
|
3176
3406
|
e.clearRect(0, 0, r, a);
|
|
3177
|
-
const s = 2, o = s + 2, i = a / 2,
|
|
3178
|
-
e.fillStyle = `rgba(${
|
|
3179
|
-
const w = p * o,
|
|
3180
|
-
e.beginPath(), e.roundRect(w, i - m, s,
|
|
3407
|
+
const s = 2, o = s + 2, i = a / 2, l = getComputedStyle(document.documentElement).getPropertyValue("--artifactuse-text-muted").trim() || "107, 114, 128";
|
|
3408
|
+
e.fillStyle = `rgba(${l}, 0.4)`, t.forEach((d, p) => {
|
|
3409
|
+
const w = p * o, c = d * (a * 0.8), m = c / 2, h = s / 2;
|
|
3410
|
+
e.beginPath(), e.roundRect(w, i - m, s, c, h), e.fill();
|
|
3181
3411
|
});
|
|
3182
3412
|
}
|
|
3183
|
-
function
|
|
3413
|
+
function $t(e) {
|
|
3184
3414
|
if (!e || isNaN(e)) return "0:00";
|
|
3185
3415
|
const t = Math.floor(e / 3600), r = Math.floor(e % 3600 / 60), a = Math.floor(e % 60);
|
|
3186
3416
|
return t > 0 ? `${t}:${r.toString().padStart(2, "0")}:${a.toString().padStart(2, "0")}` : `${r}:${a.toString().padStart(2, "0")}`;
|
|
3187
3417
|
}
|
|
3188
|
-
function
|
|
3189
|
-
const t =
|
|
3418
|
+
function At(e) {
|
|
3419
|
+
const t = ae.get(e);
|
|
3190
3420
|
t && t.audio.play();
|
|
3191
3421
|
}
|
|
3192
|
-
function
|
|
3193
|
-
const t =
|
|
3422
|
+
function zt(e) {
|
|
3423
|
+
const t = ae.get(e);
|
|
3194
3424
|
t && t.audio.pause();
|
|
3195
3425
|
}
|
|
3196
3426
|
function gs(e) {
|
|
3197
|
-
|
|
3427
|
+
ae.forEach((t, r) => {
|
|
3198
3428
|
r !== e && t.state.isPlaying && t.audio.pause();
|
|
3199
3429
|
});
|
|
3200
3430
|
}
|
|
3201
3431
|
function ms(e) {
|
|
3202
|
-
const t =
|
|
3203
|
-
t && (t.audio.pause(), t.audio.src = "",
|
|
3432
|
+
const t = ae.get(e);
|
|
3433
|
+
t && (t.audio.pause(), t.audio.src = "", ae.delete(e));
|
|
3204
3434
|
}
|
|
3205
3435
|
function ws() {
|
|
3206
|
-
|
|
3436
|
+
ae.forEach((e, t) => {
|
|
3207
3437
|
ms(t);
|
|
3208
3438
|
});
|
|
3209
3439
|
}
|
|
@@ -3222,48 +3452,48 @@ function bs(e) {
|
|
|
3222
3452
|
const r = /<a[^>]*href="(https?:\/\/(?:www\.)?google\.com\/maps\/embed\?pb=[^"]+)"[^>]*>[^<]*<\/a>/gi;
|
|
3223
3453
|
e = e.replace(r, (g, f) => {
|
|
3224
3454
|
const b = `__PROTECTED_MAP_${t.length}__`;
|
|
3225
|
-
return t.push(
|
|
3455
|
+
return t.push(St(f)), b;
|
|
3226
3456
|
});
|
|
3227
3457
|
const a = new RegExp(`(?<!["'=])(https?:\\/\\/(?:www\\.)?google\\.com\\/maps\\/embed\\?pb=[^\\s<>"]+)(?!["'])`, "gi");
|
|
3228
3458
|
e = e.replace(a, (g, f) => {
|
|
3229
3459
|
const b = `__PROTECTED_MAP_${t.length}__`;
|
|
3230
|
-
return t.push(
|
|
3460
|
+
return t.push(St(f)), b;
|
|
3231
3461
|
});
|
|
3232
3462
|
const s = /<a[^>]*href="(https?:\/\/(?:www\.)?google\.com\/maps\/place\/([^\/\?"]+)[^"]*)"[^>]*>[^<]*<\/a>/gi;
|
|
3233
|
-
e = e.replace(s, (g, f, b) =>
|
|
3463
|
+
e = e.replace(s, (g, f, b) => Y(decodeURIComponent(b.replace(/\+/g, " "))));
|
|
3234
3464
|
const n = new RegExp(`(?<!["'=])(https?:\\/\\/(?:www\\.)?google\\.com\\/maps\\/place\\/([^\\/\\?\\s]+))(?!["'])`, "gi");
|
|
3235
|
-
e = e.replace(n, (g, f, b) =>
|
|
3465
|
+
e = e.replace(n, (g, f, b) => Y(decodeURIComponent(b.replace(/\+/g, " "))));
|
|
3236
3466
|
const o = /<a[^>]*href="(https?:\/\/(?:www\.)?google\.com\/maps\/@([0-9.-]+),([0-9.-]+),([0-9]+)z[^"]*)"[^>]*>[^<]*<\/a>/gi;
|
|
3237
|
-
e = e.replace(o, (g, f, b,
|
|
3467
|
+
e = e.replace(o, (g, f, b, v, x) => Ue(b, v, x));
|
|
3238
3468
|
const i = new RegExp(`(?<!["'=])(https?:\\/\\/(?:www\\.)?google\\.com\\/maps\\/@([0-9.-]+),([0-9.-]+),([0-9]+)z)(?!["'])`, "gi");
|
|
3239
|
-
e = e.replace(i, (g, f, b,
|
|
3469
|
+
e = e.replace(i, (g, f, b, v, x) => Ue(b, v, x));
|
|
3240
3470
|
const u = /<a[^>]*href="(https?:\/\/maps\.google\.com\/\?q=([^\s"&]+)[^"]*)"[^>]*>[^<]*<\/a>/gi;
|
|
3241
|
-
e = e.replace(u, (g, f, b) =>
|
|
3242
|
-
const
|
|
3243
|
-
e = e.replace(
|
|
3471
|
+
e = e.replace(u, (g, f, b) => Y(decodeURIComponent(b)));
|
|
3472
|
+
const l = new RegExp(`(?<!["'=])(https?:\\/\\/maps\\.google\\.com\\/\\?q=([^\\s"&]+))(?!["'])`, "gi");
|
|
3473
|
+
e = e.replace(l, (g, f, b) => Y(decodeURIComponent(b)));
|
|
3244
3474
|
const d = /<a[^>]*href="(https?:\/\/(?:www\.)?google\.com\/maps\/search\/([^\/\?"]+)[^"]*)"[^>]*>[^<]*<\/a>/gi;
|
|
3245
|
-
e = e.replace(d, (g, f, b) =>
|
|
3475
|
+
e = e.replace(d, (g, f, b) => Y(decodeURIComponent(b.replace(/\+/g, " "))));
|
|
3246
3476
|
const p = new RegExp(`(?<!["'=])(https?:\\/\\/(?:www\\.)?google\\.com\\/maps\\/search\\/([^\\/\\?\\s]+))(?!["'])`, "gi");
|
|
3247
|
-
e = e.replace(p, (g, f, b) =>
|
|
3477
|
+
e = e.replace(p, (g, f, b) => Y(decodeURIComponent(b.replace(/\+/g, " "))));
|
|
3248
3478
|
const w = /<a[^>]*href="(https?:\/\/(?:www\.)?google\.com\/maps\/search\/\?[^"]*query=([^"&]+)[^"]*)"[^>]*>[^<]*<\/a>/gi;
|
|
3249
|
-
e = e.replace(w, (g, f, b) =>
|
|
3250
|
-
const
|
|
3251
|
-
e = e.replace(
|
|
3479
|
+
e = e.replace(w, (g, f, b) => Y(decodeURIComponent(b.replace(/\+/g, " "))));
|
|
3480
|
+
const c = new RegExp(`(?<!["'=])(https?:\\/\\/(?:www\\.)?google\\.com\\/maps\\/search\\/\\?[^\\s"]*query=([^\\s"&]+))(?!["'])`, "gi");
|
|
3481
|
+
e = e.replace(c, (g, f, b) => Y(decodeURIComponent(b.replace(/\+/g, " "))));
|
|
3252
3482
|
const m = /<a[^>]*href="(https?:\/\/(?:www\.)?openstreetmap\.org\/[^"]*mlat=([0-9.-]+)[^"]*mlon=([0-9.-]+)[^"]*)"[^>]*>[^<]*<\/a>/gi;
|
|
3253
|
-
e = e.replace(m, (g, f, b,
|
|
3254
|
-
const
|
|
3255
|
-
return
|
|
3483
|
+
e = e.replace(m, (g, f, b, v) => {
|
|
3484
|
+
const x = f.match(/#map=(\d+)/), $ = x ? x[1] : 15;
|
|
3485
|
+
return Ct(b, v, $);
|
|
3256
3486
|
});
|
|
3257
3487
|
const h = new RegExp(`(?<!["'=])(https?:\\/\\/(?:www\\.)?openstreetmap\\.org\\/[^\\s]*mlat=([0-9.-]+)[^\\s]*mlon=([0-9.-]+))(?!["'])`, "gi");
|
|
3258
|
-
e = e.replace(h, (g, f, b,
|
|
3259
|
-
const
|
|
3260
|
-
return
|
|
3488
|
+
e = e.replace(h, (g, f, b, v) => {
|
|
3489
|
+
const x = f.match(/#map=(\d+)/), $ = x ? x[1] : 15;
|
|
3490
|
+
return Ct(b, v, $);
|
|
3261
3491
|
});
|
|
3262
3492
|
for (let g = t.length - 1; g >= 0; g--)
|
|
3263
3493
|
e = e.replace(`__PROTECTED_MAP_${g}__`, t[g]);
|
|
3264
3494
|
return e;
|
|
3265
3495
|
}
|
|
3266
|
-
function
|
|
3496
|
+
function St(e) {
|
|
3267
3497
|
const t = e.match(/pb=([^&]+)/);
|
|
3268
3498
|
if (t) {
|
|
3269
3499
|
const r = decodeURIComponent(t[1]), a = r.match(/!3d(-?[\d.]+).*?!2d(-?[\d.]+)/), s = r.match(/!2d(-?[\d.]+).*?!3d(-?[\d.]+)/);
|
|
@@ -3272,8 +3502,8 @@ function zt(e) {
|
|
|
3272
3502
|
const i = r.match(/!1d([\d.]+)/);
|
|
3273
3503
|
let u = 15;
|
|
3274
3504
|
if (i) {
|
|
3275
|
-
const
|
|
3276
|
-
|
|
3505
|
+
const l = parseFloat(i[1]);
|
|
3506
|
+
l > 1e4 ? u = 10 : l > 5e3 ? u = 12 : l > 1e3 ? u = 14 : l > 500 ? u = 16 : u = 18;
|
|
3277
3507
|
}
|
|
3278
3508
|
return Ue(n, o, u);
|
|
3279
3509
|
}
|
|
@@ -3291,7 +3521,7 @@ function zt(e) {
|
|
|
3291
3521
|
</div>
|
|
3292
3522
|
`;
|
|
3293
3523
|
}
|
|
3294
|
-
function
|
|
3524
|
+
function Y(e) {
|
|
3295
3525
|
const t = encodeURIComponent(e);
|
|
3296
3526
|
return `
|
|
3297
3527
|
<div class="artifactuse-map-wrapper">
|
|
@@ -3335,7 +3565,7 @@ function Ue(e, t, r) {
|
|
|
3335
3565
|
</div>
|
|
3336
3566
|
`;
|
|
3337
3567
|
}
|
|
3338
|
-
function
|
|
3568
|
+
function Ct(e, t, r = 15) {
|
|
3339
3569
|
return `
|
|
3340
3570
|
<div class="artifactuse-map-wrapper">
|
|
3341
3571
|
<iframe
|
|
@@ -3353,39 +3583,39 @@ function Lt(e, t, r = 15) {
|
|
|
3353
3583
|
}
|
|
3354
3584
|
function vs(e, t = {}) {
|
|
3355
3585
|
const r = t.theme || "dark", a = /<a[^>]*href="(https?:\/\/(?:www\.)?(?:twitter\.com|x\.com)\/([a-zA-Z0-9_]+)\/status\/(\d+)[^"]*)"[^>]*>[^<]*<\/a>/gi;
|
|
3356
|
-
e = e.replace(a, (
|
|
3586
|
+
e = e.replace(a, (v, x, $, A) => Rt($, A, r));
|
|
3357
3587
|
const s = new RegExp(`(?<!["'=])(https?:\\/\\/(?:www\\.)?(?:twitter\\.com|x\\.com)\\/([a-zA-Z0-9_]+)\\/status\\/(\\d+))(?!["'])`, "gi");
|
|
3358
|
-
e = e.replace(s, (
|
|
3588
|
+
e = e.replace(s, (v, x, $, A) => Rt($, A, r));
|
|
3359
3589
|
const n = /<a[^>]*href="(https?:\/\/(?:www\.)?instagram\.com\/p\/([a-zA-Z0-9_-]+)[^"]*)"[^>]*>[^<]*<\/a>/gi;
|
|
3360
|
-
e = e.replace(n, (
|
|
3590
|
+
e = e.replace(n, (v, x, $) => Lt($));
|
|
3361
3591
|
const o = new RegExp(`(?<!["'=])(https?:\\/\\/(?:www\\.)?instagram\\.com\\/p\\/([a-zA-Z0-9_-]+))(?!["'])`, "gi");
|
|
3362
|
-
e = e.replace(o, (
|
|
3592
|
+
e = e.replace(o, (v, x, $) => Lt($));
|
|
3363
3593
|
const i = /<a[^>]*href="(https?:\/\/(?:www\.)?instagram\.com\/reel\/([a-zA-Z0-9_-]+)[^"]*)"[^>]*>[^<]*<\/a>/gi;
|
|
3364
|
-
e = e.replace(i, (
|
|
3594
|
+
e = e.replace(i, (v, x, $) => Tt($));
|
|
3365
3595
|
const u = new RegExp(`(?<!["'=])(https?:\\/\\/(?:www\\.)?instagram\\.com\\/reel\\/([a-zA-Z0-9_-]+))(?!["'])`, "gi");
|
|
3366
|
-
e = e.replace(u, (
|
|
3367
|
-
const
|
|
3368
|
-
e = e.replace(
|
|
3596
|
+
e = e.replace(u, (v, x, $) => Tt($));
|
|
3597
|
+
const l = /<a[^>]*href="(https?:\/\/(?:www\.)?tiktok\.com\/@([a-zA-Z0-9_.]+)\/video\/(\d+)[^"]*)"[^>]*>[^<]*<\/a>/gi;
|
|
3598
|
+
e = e.replace(l, (v, x, $, A) => _t(A));
|
|
3369
3599
|
const d = new RegExp(`(?<!["'=])(https?:\\/\\/(?:www\\.)?tiktok\\.com\\/@([a-zA-Z0-9_.]+)\\/video\\/(\\d+))(?!["'])`, "gi");
|
|
3370
|
-
e = e.replace(d, (
|
|
3600
|
+
e = e.replace(d, (v, x, $, A) => _t(A));
|
|
3371
3601
|
const p = /<a[^>]*href="(https?:\/\/(?:www\.)?linkedin\.com\/(?:posts|feed\/update)\/([a-zA-Z0-9_:-]+)[^"]*)"[^>]*>[^<]*<\/a>/gi;
|
|
3372
|
-
e = e.replace(p, (
|
|
3602
|
+
e = e.replace(p, (v, x, $) => Et($, x));
|
|
3373
3603
|
const w = new RegExp(`(?<!["'=])(https?:\\/\\/(?:www\\.)?linkedin\\.com\\/(?:posts|feed\\/update)\\/([a-zA-Z0-9_:-]+))(?!["'])`, "gi");
|
|
3374
|
-
e = e.replace(w, (
|
|
3375
|
-
const
|
|
3376
|
-
e = e.replace(
|
|
3604
|
+
e = e.replace(w, (v, x, $) => Et($, x));
|
|
3605
|
+
const c = /<a[^>]*href="(https?:\/\/(?:www\.)?reddit\.com\/r\/([a-zA-Z0-9_]+)\/comments\/([a-zA-Z0-9]+)[^"]*)"[^>]*>[^<]*<\/a>/gi;
|
|
3606
|
+
e = e.replace(c, (v, x, $, A) => Pt($, A, x));
|
|
3377
3607
|
const m = new RegExp(`(?<!["'=])(https?:\\/\\/(?:www\\.)?reddit\\.com\\/r\\/([a-zA-Z0-9_]+)\\/comments\\/([a-zA-Z0-9]+))(?!["'])`, "gi");
|
|
3378
|
-
e = e.replace(m, (
|
|
3608
|
+
e = e.replace(m, (v, x, $, A) => Pt($, A, x));
|
|
3379
3609
|
const h = /<a[^>]*href="(https?:\/\/(?:www\.)?facebook\.com\/[a-zA-Z0-9.]+\/posts\/\d+[^"]*)"[^>]*>[^<]*<\/a>/gi;
|
|
3380
|
-
e = e.replace(h, (
|
|
3610
|
+
e = e.replace(h, (v, x) => jt(x));
|
|
3381
3611
|
const g = new RegExp(`(?<!["'=])(https?:\\/\\/(?:www\\.)?facebook\\.com\\/[a-zA-Z0-9.]+\\/posts\\/\\d+)(?!["'])`, "gi");
|
|
3382
|
-
e = e.replace(g, (
|
|
3612
|
+
e = e.replace(g, (v, x) => jt(x));
|
|
3383
3613
|
const f = /<a[^>]*href="(https?:\/\/(?:www\.)?pinterest\.com\/pin\/(\d+)[^"]*)"[^>]*>[^<]*<\/a>/gi;
|
|
3384
|
-
e = e.replace(f, (
|
|
3614
|
+
e = e.replace(f, (v, x, $) => Ht($));
|
|
3385
3615
|
const b = new RegExp(`(?<!["'=])(https?:\\/\\/(?:www\\.)?pinterest\\.com\\/pin\\/(\\d+))(?!["'])`, "gi");
|
|
3386
|
-
return e = e.replace(b, (
|
|
3616
|
+
return e = e.replace(b, (v, x, $) => Ht($)), e;
|
|
3387
3617
|
}
|
|
3388
|
-
function
|
|
3618
|
+
function Rt(e, t, r = "dark") {
|
|
3389
3619
|
return `
|
|
3390
3620
|
<div class="artifactuse-twitter-wrapper">
|
|
3391
3621
|
<blockquote class="twitter-tweet" data-dnt="true" data-theme="${r}">
|
|
@@ -3395,7 +3625,7 @@ function Ct(e, t, r = "dark") {
|
|
|
3395
3625
|
</div>
|
|
3396
3626
|
`;
|
|
3397
3627
|
}
|
|
3398
|
-
function
|
|
3628
|
+
function Lt(e) {
|
|
3399
3629
|
return `
|
|
3400
3630
|
<div class="artifactuse-instagram-wrapper">
|
|
3401
3631
|
<iframe
|
|
@@ -3409,7 +3639,7 @@ function Mt(e) {
|
|
|
3409
3639
|
</div>
|
|
3410
3640
|
`;
|
|
3411
3641
|
}
|
|
3412
|
-
function
|
|
3642
|
+
function Tt(e) {
|
|
3413
3643
|
return `
|
|
3414
3644
|
<div class="artifactuse-instagram-wrapper">
|
|
3415
3645
|
<iframe
|
|
@@ -3423,7 +3653,7 @@ function _t(e) {
|
|
|
3423
3653
|
</div>
|
|
3424
3654
|
`;
|
|
3425
3655
|
}
|
|
3426
|
-
function
|
|
3656
|
+
function _t(e) {
|
|
3427
3657
|
return `
|
|
3428
3658
|
<div class="artifactuse-tiktok-wrapper">
|
|
3429
3659
|
<iframe
|
|
@@ -3485,7 +3715,7 @@ function jt(e) {
|
|
|
3485
3715
|
</div>
|
|
3486
3716
|
`;
|
|
3487
3717
|
}
|
|
3488
|
-
function
|
|
3718
|
+
function Ht(e) {
|
|
3489
3719
|
return `
|
|
3490
3720
|
<div class="artifactuse-pinterest-wrapper">
|
|
3491
3721
|
<a data-pin-do="embedPin" data-pin-width="large" href="https://www.pinterest.com/pin/${e}/"></a>
|
|
@@ -3495,11 +3725,11 @@ function It(e) {
|
|
|
3495
3725
|
}
|
|
3496
3726
|
function ys(e) {
|
|
3497
3727
|
const t = /<a[^>]*href="(https?:\/\/[^"]+\.pdf(?:\?[^"]*)?)"[^>]*>[^<]*<\/a>/gi;
|
|
3498
|
-
e = e.replace(t, (a, s) =>
|
|
3728
|
+
e = e.replace(t, (a, s) => Vt(s));
|
|
3499
3729
|
const r = new RegExp(`(?<!["'=])(https?:\\/\\/[^\\s<>"]+\\.pdf(?:\\?[^\\s<>"]*)?)(?!["'])`, "gi");
|
|
3500
|
-
return e = e.replace(r, (a, s) =>
|
|
3730
|
+
return e = e.replace(r, (a, s) => Vt(s)), e;
|
|
3501
3731
|
}
|
|
3502
|
-
function
|
|
3732
|
+
function Vt(e) {
|
|
3503
3733
|
return `
|
|
3504
3734
|
<div class="artifactuse-pdf-wrapper">
|
|
3505
3735
|
<div class="artifactuse-pdf-header">
|
|
@@ -3525,23 +3755,23 @@ function Dt(e) {
|
|
|
3525
3755
|
}
|
|
3526
3756
|
function ks(e) {
|
|
3527
3757
|
const t = /<a[^>]*href="(https?:\/\/docs\.google\.com\/document\/d\/([a-zA-Z0-9_-]+)[^"]*)"[^>]*>[^<]*<\/a>/gi;
|
|
3528
|
-
e = e.replace(t, (
|
|
3758
|
+
e = e.replace(t, (l, d, p) => ie(p, "document"));
|
|
3529
3759
|
const r = new RegExp(`(?<!["'=])(https?:\\/\\/docs\\.google\\.com\\/document\\/d\\/([a-zA-Z0-9_-]+))(?!["'])`, "gi");
|
|
3530
|
-
e = e.replace(r, (
|
|
3760
|
+
e = e.replace(r, (l, d, p) => ie(p, "document"));
|
|
3531
3761
|
const a = /<a[^>]*href="(https?:\/\/docs\.google\.com\/spreadsheets\/d\/([a-zA-Z0-9_-]+)[^"]*)"[^>]*>[^<]*<\/a>/gi;
|
|
3532
|
-
e = e.replace(a, (
|
|
3762
|
+
e = e.replace(a, (l, d, p) => ie(p, "spreadsheets"));
|
|
3533
3763
|
const s = new RegExp(`(?<!["'=])(https?:\\/\\/docs\\.google\\.com\\/spreadsheets\\/d\\/([a-zA-Z0-9_-]+))(?!["'])`, "gi");
|
|
3534
|
-
e = e.replace(s, (
|
|
3764
|
+
e = e.replace(s, (l, d, p) => ie(p, "spreadsheets"));
|
|
3535
3765
|
const n = /<a[^>]*href="(https?:\/\/docs\.google\.com\/presentation\/d\/([a-zA-Z0-9_-]+)[^"]*)"[^>]*>[^<]*<\/a>/gi;
|
|
3536
|
-
e = e.replace(n, (
|
|
3766
|
+
e = e.replace(n, (l, d, p) => ie(p, "presentation"));
|
|
3537
3767
|
const o = new RegExp(`(?<!["'=])(https?:\\/\\/docs\\.google\\.com\\/presentation\\/d\\/([a-zA-Z0-9_-]+))(?!["'])`, "gi");
|
|
3538
|
-
e = e.replace(o, (
|
|
3768
|
+
e = e.replace(o, (l, d, p) => ie(p, "presentation"));
|
|
3539
3769
|
const i = /<a[^>]*href="(https?:\/\/docs\.google\.com\/forms\/d\/([a-zA-Z0-9_-]+)[^"]*)"[^>]*>[^<]*<\/a>/gi;
|
|
3540
|
-
e = e.replace(i, (
|
|
3770
|
+
e = e.replace(i, (l, d, p) => It(p));
|
|
3541
3771
|
const u = new RegExp(`(?<!["'=])(https?:\\/\\/docs\\.google\\.com\\/forms\\/d\\/([a-zA-Z0-9_-]+))(?!["'])`, "gi");
|
|
3542
|
-
return e = e.replace(u, (
|
|
3772
|
+
return e = e.replace(u, (l, d, p) => It(p)), e;
|
|
3543
3773
|
}
|
|
3544
|
-
function
|
|
3774
|
+
function ie(e, t) {
|
|
3545
3775
|
const r = {
|
|
3546
3776
|
document: "Google Doc",
|
|
3547
3777
|
spreadsheets: "Google Sheet",
|
|
@@ -3572,7 +3802,7 @@ function se(e, t) {
|
|
|
3572
3802
|
</div>
|
|
3573
3803
|
`;
|
|
3574
3804
|
}
|
|
3575
|
-
function
|
|
3805
|
+
function It(e) {
|
|
3576
3806
|
return `
|
|
3577
3807
|
<div class="artifactuse-google-form-wrapper">
|
|
3578
3808
|
<iframe
|
|
@@ -3585,11 +3815,11 @@ function Ht(e) {
|
|
|
3585
3815
|
}
|
|
3586
3816
|
function xs(e) {
|
|
3587
3817
|
const t = /<a[^>]*href="(https?:\/\/[^"]+\.(docx?|xlsx?|pptx?)(?:\?[^"]*)?)"[^>]*>[^<]*<\/a>/gi;
|
|
3588
|
-
e = e.replace(t, (a, s) =>
|
|
3818
|
+
e = e.replace(t, (a, s) => Dt(s));
|
|
3589
3819
|
const r = new RegExp(`(?<!["'=])(https?:\\/\\/[^\\s<>"]+\\.(docx?|xlsx?|pptx?)(?:\\?[^\\s<>"]*)?)(?!["'])`, "gi");
|
|
3590
|
-
return e = e.replace(r, (a, s) =>
|
|
3820
|
+
return e = e.replace(r, (a, s) => Dt(s)), e;
|
|
3591
3821
|
}
|
|
3592
|
-
function
|
|
3822
|
+
function Dt(e) {
|
|
3593
3823
|
const t = encodeURIComponent(e), r = e.split("/").pop().split("?")[0], a = r.split(".").pop().toLowerCase();
|
|
3594
3824
|
return `
|
|
3595
3825
|
<div class="artifactuse-office-wrapper">
|
|
@@ -3615,43 +3845,43 @@ function qt(e) {
|
|
|
3615
3845
|
</div>
|
|
3616
3846
|
`;
|
|
3617
3847
|
}
|
|
3618
|
-
function
|
|
3848
|
+
function Ms(e) {
|
|
3619
3849
|
return `${e}-${Date.now()}-${Math.random().toString(36).substr(2, 9)}`;
|
|
3620
3850
|
}
|
|
3621
|
-
function
|
|
3851
|
+
function $s(e, t = {}) {
|
|
3622
3852
|
const r = t.theme || "dark", a = /<a[^>]*href="(https?:\/\/gist\.github\.com\/([a-zA-Z0-9_-]+)\/([a-f0-9]+)[^"]*)"[^>]*>[^<]*<\/a>/gi;
|
|
3623
|
-
e = e.replace(a, (h, g, f, b) =>
|
|
3853
|
+
e = e.replace(a, (h, g, f, b) => qt(f, b));
|
|
3624
3854
|
const s = new RegExp(`(?<!["'=])(https?:\\/\\/gist\\.github\\.com\\/([a-zA-Z0-9_-]+)\\/([a-f0-9]+))(?!["'])`, "gi");
|
|
3625
|
-
e = e.replace(s, (h, g, f, b) =>
|
|
3855
|
+
e = e.replace(s, (h, g, f, b) => qt(f, b));
|
|
3626
3856
|
const n = /<a[^>]*href="(https?:\/\/codepen\.io\/([a-zA-Z0-9_-]+)\/(?:pen|full|details)\/([a-zA-Z0-9]+)[^"]*)"[^>]*>[^<]*<\/a>/gi;
|
|
3627
|
-
e = e.replace(n, (h, g, f, b) =>
|
|
3857
|
+
e = e.replace(n, (h, g, f, b) => Zt(f, b, r));
|
|
3628
3858
|
const o = new RegExp(`(?<!["'=])(https?:\\/\\/codepen\\.io\\/([a-zA-Z0-9_-]+)\\/(?:pen|full|details)\\/([a-zA-Z0-9]+))(?!["'])`, "gi");
|
|
3629
|
-
e = e.replace(o, (h, g, f, b) =>
|
|
3859
|
+
e = e.replace(o, (h, g, f, b) => Zt(f, b, r));
|
|
3630
3860
|
const i = /<a[^>]*href="(https?:\/\/codesandbox\.io\/(?:s|embed)\/([a-zA-Z0-9-]+)[^"]*)"[^>]*>[^<]*<\/a>/gi;
|
|
3631
3861
|
e = e.replace(i, (h, g, f) => Ot(f, r));
|
|
3632
3862
|
const u = new RegExp(`(?<!["'=])(https?:\\/\\/codesandbox\\.io\\/(?:s|embed)\\/([a-zA-Z0-9-]+))(?!["'])`, "gi");
|
|
3633
3863
|
e = e.replace(u, (h, g, f) => Ot(f, r));
|
|
3634
|
-
const
|
|
3635
|
-
e = e.replace(
|
|
3864
|
+
const l = /<a[^>]*href="(https?:\/\/jsfiddle\.net\/([a-zA-Z0-9_]+)\/([a-zA-Z0-9]+)[^"]*)"[^>]*>[^<]*<\/a>/gi;
|
|
3865
|
+
e = e.replace(l, (h, g, f, b) => Bt(f, b, r));
|
|
3636
3866
|
const d = new RegExp(`(?<!["'=])(https?:\\/\\/jsfiddle\\.net\\/([a-zA-Z0-9_]+)\\/([a-zA-Z0-9]+))(?!["'])`, "gi");
|
|
3637
|
-
e = e.replace(d, (h, g, f, b) =>
|
|
3867
|
+
e = e.replace(d, (h, g, f, b) => Bt(f, b, r));
|
|
3638
3868
|
const p = /<a[^>]*href="(https?:\/\/stackblitz\.com\/(?:edit|embed)\/([a-zA-Z0-9-]+)[^"]*)"[^>]*>[^<]*<\/a>/gi;
|
|
3639
3869
|
e = e.replace(p, (h, g, f) => Ft(f, r));
|
|
3640
3870
|
const w = new RegExp(`(?<!["'=])(https?:\\/\\/stackblitz\\.com\\/(?:edit|embed)\\/([a-zA-Z0-9-]+))(?!["'])`, "gi");
|
|
3641
3871
|
e = e.replace(w, (h, g, f) => Ft(f, r));
|
|
3642
|
-
const
|
|
3643
|
-
e = e.replace(
|
|
3872
|
+
const c = /<a[^>]*href="(https?:\/\/replit\.com\/@([a-zA-Z0-9_]+)\/([a-zA-Z0-9_-]+)[^"]*)"[^>]*>[^<]*<\/a>/gi;
|
|
3873
|
+
e = e.replace(c, (h, g, f, b) => Nt(f, b, r));
|
|
3644
3874
|
const m = new RegExp(`(?<!["'=])(https?:\\/\\/replit\\.com\\/@([a-zA-Z0-9_]+)\\/([a-zA-Z0-9_-]+))(?!["'])`, "gi");
|
|
3645
3875
|
return e = e.replace(m, (h, g, f, b) => Nt(f, b, r)), e;
|
|
3646
3876
|
}
|
|
3647
|
-
function
|
|
3877
|
+
function qt(e, t) {
|
|
3648
3878
|
return `
|
|
3649
|
-
<div class="artifactuse-gist-wrapper" id="${
|
|
3879
|
+
<div class="artifactuse-gist-wrapper" id="${Ms("gist")}">
|
|
3650
3880
|
<script src="https://gist.github.com/${e}/${t}.js"><\/script>
|
|
3651
3881
|
</div>
|
|
3652
3882
|
`;
|
|
3653
3883
|
}
|
|
3654
|
-
function
|
|
3884
|
+
function Zt(e, t, r = "dark") {
|
|
3655
3885
|
return `
|
|
3656
3886
|
<div class="artifactuse-codepen-wrapper">
|
|
3657
3887
|
<iframe
|
|
@@ -3682,7 +3912,7 @@ function Ot(e, t = "dark") {
|
|
|
3682
3912
|
</div>
|
|
3683
3913
|
`;
|
|
3684
3914
|
}
|
|
3685
|
-
function
|
|
3915
|
+
function Bt(e, t, r = "dark") {
|
|
3686
3916
|
return `
|
|
3687
3917
|
<div class="artifactuse-jsfiddle-wrapper">
|
|
3688
3918
|
<iframe
|
|
@@ -3721,23 +3951,23 @@ function Nt(e, t, r = "dark") {
|
|
|
3721
3951
|
</div>
|
|
3722
3952
|
`;
|
|
3723
3953
|
}
|
|
3724
|
-
function
|
|
3954
|
+
function As(e) {
|
|
3725
3955
|
const t = /<a[^>]*href="(https?:\/\/public\.tableau\.com\/(?:views|profile)\/([^\s"]+))"[^>]*>[^<]*<\/a>/gi;
|
|
3726
|
-
e = e.replace(t, (
|
|
3956
|
+
e = e.replace(t, (l, d, p) => Ut(p));
|
|
3727
3957
|
const r = new RegExp(`(?<!["'=])(https?:\\/\\/public\\.tableau\\.com\\/(?:views|profile)\\/([^\\s<>"]+))(?!["'])`, "gi");
|
|
3728
|
-
e = e.replace(r, (
|
|
3958
|
+
e = e.replace(r, (l, d, p) => Ut(p));
|
|
3729
3959
|
const a = /<a[^>]*href="(https?:\/\/(?:public\.)?flourish\.studio\/visualisation\/(\d+)[^"]*)"[^>]*>[^<]*<\/a>/gi;
|
|
3730
|
-
e = e.replace(a, (
|
|
3960
|
+
e = e.replace(a, (l, d, p) => Gt(p));
|
|
3731
3961
|
const s = new RegExp(`(?<!["'=])(https?:\\/\\/(?:public\\.)?flourish\\.studio\\/visualisation\\/(\\d+))(?!["'])`, "gi");
|
|
3732
|
-
e = e.replace(s, (
|
|
3962
|
+
e = e.replace(s, (l, d, p) => Gt(p));
|
|
3733
3963
|
const n = /<a[^>]*href="(https?:\/\/datawrapper\.dwcdn\.net\/([a-zA-Z0-9]+)[^"]*)"[^>]*>[^<]*<\/a>/gi;
|
|
3734
|
-
e = e.replace(n, (
|
|
3964
|
+
e = e.replace(n, (l, d, p) => Wt(p));
|
|
3735
3965
|
const o = new RegExp(`(?<!["'=])(https?:\\/\\/datawrapper\\.dwcdn\\.net\\/([a-zA-Z0-9]+))(?!["'])`, "gi");
|
|
3736
|
-
e = e.replace(o, (
|
|
3966
|
+
e = e.replace(o, (l, d, p) => Wt(p));
|
|
3737
3967
|
const i = /<a[^>]*href="(https?:\/\/(?:e\.)?infogram\.com\/([a-zA-Z0-9_-]+)[^"]*)"[^>]*>[^<]*<\/a>/gi;
|
|
3738
|
-
e = e.replace(i, (
|
|
3968
|
+
e = e.replace(i, (l, d, p) => Xt(p));
|
|
3739
3969
|
const u = new RegExp(`(?<!["'=])(https?:\\/\\/(?:e\\.)?infogram\\.com\\/([a-zA-Z0-9_-]+))(?!["'])`, "gi");
|
|
3740
|
-
return e = e.replace(u, (
|
|
3970
|
+
return e = e.replace(u, (l, d, p) => Xt(p)), e;
|
|
3741
3971
|
}
|
|
3742
3972
|
function Ut(e) {
|
|
3743
3973
|
return `
|
|
@@ -3788,7 +4018,7 @@ function Xt(e) {
|
|
|
3788
4018
|
</div>
|
|
3789
4019
|
`;
|
|
3790
4020
|
}
|
|
3791
|
-
function
|
|
4021
|
+
function zs(e, t = {}) {
|
|
3792
4022
|
const r = t.theme || "dark", a = /<a[^>]*href="(https?:\/\/sketchfab\.com\/(?:3d-)?models\/([a-zA-Z0-9-]+)[^"]*)"[^>]*>[^<]*<\/a>/gi;
|
|
3793
4023
|
e = e.replace(a, (h, g, f) => Kt(f, r));
|
|
3794
4024
|
const s = new RegExp(`(?<!["'=])(https?:\\/\\/sketchfab\\.com\\/(?:3d-)?models\\/([a-zA-Z0-9-]+))(?!["'])`, "gi");
|
|
@@ -3801,16 +4031,16 @@ function Rs(e, t = {}) {
|
|
|
3801
4031
|
e = e.replace(i, (h, g, f) => Qt(f, g));
|
|
3802
4032
|
const u = new RegExp(`(?<!["'=])(https?:\\/\\/(?:www\\.)?figma\\.com\\/proto\\/([a-zA-Z0-9]+)[^\\s]*)(?!["'])`, "gi");
|
|
3803
4033
|
e = e.replace(u, (h, g, f) => Qt(f, g));
|
|
3804
|
-
const
|
|
3805
|
-
e = e.replace(
|
|
4034
|
+
const l = /<a[^>]*href="(https?:\/\/(?:www\.)?canva\.com\/design\/([a-zA-Z0-9_-]+)[^"]*)"[^>]*>[^<]*<\/a>/gi;
|
|
4035
|
+
e = e.replace(l, (h, g, f) => Yt(f, g));
|
|
3806
4036
|
const d = new RegExp(`(?<!["'=])(https?:\\/\\/(?:www\\.)?canva\\.com\\/design\\/([a-zA-Z0-9_-]+)[^\\s]*)(?!["'])`, "gi");
|
|
3807
4037
|
e = e.replace(d, (h, g, f) => Yt(f, g));
|
|
3808
4038
|
const p = /<a[^>]*href="(https?:\/\/dribbble\.com\/shots\/(\d+)[^"]*)"[^>]*>[^<]*<\/a>/gi;
|
|
3809
4039
|
e = e.replace(p, (h, g, f) => er(f));
|
|
3810
4040
|
const w = new RegExp(`(?<!["'=])(https?:\\/\\/dribbble\\.com\\/shots\\/(\\d+))(?!["'])`, "gi");
|
|
3811
4041
|
e = e.replace(w, (h, g, f) => er(f));
|
|
3812
|
-
const
|
|
3813
|
-
e = e.replace(
|
|
4042
|
+
const c = /<a[^>]*href="(https?:\/\/(?:www\.)?behance\.net\/gallery\/(\d+)[^"]*)"[^>]*>[^<]*<\/a>/gi;
|
|
4043
|
+
e = e.replace(c, (h, g, f) => tr(f, g));
|
|
3814
4044
|
const m = new RegExp(`(?<!["'=])(https?:\\/\\/(?:www\\.)?behance\\.net\\/gallery\\/(\\d+)[^\\s]*)(?!["'])`, "gi");
|
|
3815
4045
|
return e = e.replace(m, (h, g, f) => tr(f, g)), e;
|
|
3816
4046
|
}
|
|
@@ -3898,35 +4128,35 @@ function tr(e, t) {
|
|
|
3898
4128
|
</div>
|
|
3899
4129
|
`;
|
|
3900
4130
|
}
|
|
3901
|
-
function
|
|
4131
|
+
function Ss(e, t = {}) {
|
|
3902
4132
|
const r = t.theme || "dark", a = /<a[^>]*href="(https?:\/\/(?:[a-zA-Z0-9-]+\.)?typeform\.com\/to\/([a-zA-Z0-9]+)[^"]*)"[^>]*>[^<]*<\/a>/gi;
|
|
3903
|
-
e = e.replace(a, (f, b,
|
|
4133
|
+
e = e.replace(a, (f, b, v) => rr(v));
|
|
3904
4134
|
const s = new RegExp(`(?<!["'=])(https?:\\/\\/(?:[a-zA-Z0-9-]+\\.)?typeform\\.com\\/to\\/([a-zA-Z0-9]+))(?!["'])`, "gi");
|
|
3905
|
-
e = e.replace(s, (f, b,
|
|
4135
|
+
e = e.replace(s, (f, b, v) => rr(v));
|
|
3906
4136
|
const n = /<a[^>]*href="(https?:\/\/calendly\.com\/([a-zA-Z0-9_-]+)(?:\/([a-zA-Z0-9_-]+))?[^"]*)"[^>]*>[^<]*<\/a>/gi;
|
|
3907
|
-
e = e.replace(n, (f, b,
|
|
4137
|
+
e = e.replace(n, (f, b, v, x) => ar(v, x));
|
|
3908
4138
|
const o = new RegExp(`(?<!["'=])(https?:\\/\\/calendly\\.com\\/([a-zA-Z0-9_-]+)(?:\\/([a-zA-Z0-9_-]+))?)(?!["'])`, "gi");
|
|
3909
|
-
e = e.replace(o, (f, b,
|
|
4139
|
+
e = e.replace(o, (f, b, v, x) => ar(v, x));
|
|
3910
4140
|
const i = /<a[^>]*href="(https?:\/\/calendar\.google\.com\/calendar\/appointments\/schedules\/([a-zA-Z0-9_-]+)[^"]*)"[^>]*>[^<]*<\/a>/gi;
|
|
3911
|
-
e = e.replace(i, (f, b,
|
|
4141
|
+
e = e.replace(i, (f, b, v) => sr(v));
|
|
3912
4142
|
const u = new RegExp(`(?<!["'=])(https?:\\/\\/calendar\\.google\\.com\\/calendar\\/appointments\\/schedules\\/([a-zA-Z0-9_-]+))(?!["'])`, "gi");
|
|
3913
|
-
e = e.replace(u, (f, b,
|
|
3914
|
-
const
|
|
3915
|
-
e = e.replace(
|
|
4143
|
+
e = e.replace(u, (f, b, v) => sr(v));
|
|
4144
|
+
const l = /<a[^>]*href="(https?:\/\/cal\.com\/([a-zA-Z0-9_-]+)(?:\/([a-zA-Z0-9_-]+))?[^"]*)"[^>]*>[^<]*<\/a>/gi;
|
|
4145
|
+
e = e.replace(l, (f, b, v, x) => nr(v, x, r));
|
|
3916
4146
|
const d = new RegExp(`(?<!["'=])(https?:\\/\\/cal\\.com\\/([a-zA-Z0-9_-]+)(?:\\/([a-zA-Z0-9_-]+))?)(?!["'])`, "gi");
|
|
3917
|
-
e = e.replace(d, (f, b,
|
|
4147
|
+
e = e.replace(d, (f, b, v, x) => nr(v, x, r));
|
|
3918
4148
|
const p = /<a[^>]*href="(https?:\/\/(?:www\.)?notion\.so\/([a-zA-Z0-9-]+)[^"]*)"[^>]*>[^<]*<\/a>/gi;
|
|
3919
|
-
e = e.replace(p, (f, b,
|
|
4149
|
+
e = e.replace(p, (f, b, v) => ir(v));
|
|
3920
4150
|
const w = new RegExp(`(?<!["'=])(https?:\\/\\/(?:www\\.)?notion\\.so\\/([a-zA-Z0-9-]+))(?!["'])`, "gi");
|
|
3921
|
-
e = e.replace(w, (f, b,
|
|
3922
|
-
const
|
|
3923
|
-
e = e.replace(
|
|
4151
|
+
e = e.replace(w, (f, b, v) => ir(v));
|
|
4152
|
+
const c = /<a[^>]*href="(https?:\/\/airtable\.com\/(?:embed\/)?([a-zA-Z0-9]+)(?:\/([a-zA-Z0-9]+))?[^"]*)"[^>]*>[^<]*<\/a>/gi;
|
|
4153
|
+
e = e.replace(c, (f, b, v, x) => or(v, x));
|
|
3924
4154
|
const m = new RegExp(`(?<!["'=])(https?:\\/\\/airtable\\.com\\/(?:embed\\/)?([a-zA-Z0-9]+)(?:\\/([a-zA-Z0-9]+))?)(?!["'])`, "gi");
|
|
3925
|
-
e = e.replace(m, (f, b,
|
|
4155
|
+
e = e.replace(m, (f, b, v, x) => or(v, x));
|
|
3926
4156
|
const h = /<a[^>]*href="(https?:\/\/miro\.com\/app\/board\/([a-zA-Z0-9_=-]+)[^"]*)"[^>]*>[^<]*<\/a>/gi;
|
|
3927
|
-
e = e.replace(h, (f, b,
|
|
4157
|
+
e = e.replace(h, (f, b, v) => lr(v));
|
|
3928
4158
|
const g = new RegExp(`(?<!["'=])(https?:\\/\\/miro\\.com\\/app\\/board\\/([a-zA-Z0-9_=-]+))(?!["'])`, "gi");
|
|
3929
|
-
return e = e.replace(g, (f, b,
|
|
4159
|
+
return e = e.replace(g, (f, b, v) => lr(v)), e;
|
|
3930
4160
|
}
|
|
3931
4161
|
function rr(e) {
|
|
3932
4162
|
return `
|
|
@@ -3995,7 +4225,7 @@ function or(e, t) {
|
|
|
3995
4225
|
</div>
|
|
3996
4226
|
`;
|
|
3997
4227
|
}
|
|
3998
|
-
function
|
|
4228
|
+
function lr(e) {
|
|
3999
4229
|
return `
|
|
4000
4230
|
<div class="artifactuse-miro-wrapper">
|
|
4001
4231
|
<iframe
|
|
@@ -4007,37 +4237,37 @@ function cr(e) {
|
|
|
4007
4237
|
</div>
|
|
4008
4238
|
`;
|
|
4009
4239
|
}
|
|
4010
|
-
let
|
|
4011
|
-
function
|
|
4240
|
+
let ee = null, Se = !1, nt = !1;
|
|
4241
|
+
function Cr(e) {
|
|
4012
4242
|
const t = /<pre><code class="language-mermaid">([\s\S]*?)<\/code><\/pre>/gi;
|
|
4013
4243
|
return e = e.replace(t, (r, a) => {
|
|
4014
|
-
const s =
|
|
4015
|
-
return
|
|
4244
|
+
const s = Cs(a).trim();
|
|
4245
|
+
return Rs(s);
|
|
4016
4246
|
}), e;
|
|
4017
4247
|
}
|
|
4018
|
-
function
|
|
4248
|
+
function Cs(e) {
|
|
4019
4249
|
return e.replace(/</g, "<").replace(/>/g, ">").replace(/&/g, "&").replace(/"/g, '"').replace(/'/g, "'").replace(/ /g, " ");
|
|
4020
4250
|
}
|
|
4021
|
-
function
|
|
4022
|
-
const t =
|
|
4251
|
+
function Rs(e) {
|
|
4252
|
+
const t = Rr(e);
|
|
4023
4253
|
return `
|
|
4024
4254
|
<div class="artifactuse-mermaid-container" data-mermaid-id="${`mermaid-${Date.now()}-${Math.random().toString(36).substr(2, 9)}`}" data-mermaid-diagram="${t}">
|
|
4025
4255
|
<div class="artifactuse-mermaid-loading">Loading diagram...</div>
|
|
4026
4256
|
</div>
|
|
4027
4257
|
`;
|
|
4028
4258
|
}
|
|
4029
|
-
function
|
|
4259
|
+
function Rr(e) {
|
|
4030
4260
|
return e.replace(/&/g, "&").replace(/"/g, """).replace(/'/g, "'").replace(/</g, "<").replace(/>/g, ">");
|
|
4031
4261
|
}
|
|
4032
|
-
function
|
|
4262
|
+
function Lr(e) {
|
|
4033
4263
|
return e.replace(/</g, "<").replace(/>/g, ">").replace(/"/g, '"').replace(/'/g, "'").replace(/&/g, "&");
|
|
4034
4264
|
}
|
|
4035
|
-
function
|
|
4036
|
-
return typeof mermaid > "u" ?
|
|
4037
|
-
console.error("Failed to load Mermaid library:", t),
|
|
4038
|
-
})) : (nt ||
|
|
4265
|
+
function Tr(e = {}) {
|
|
4266
|
+
return typeof mermaid > "u" ? Se ? (console.warn("Mermaid loading previously failed. Diagram rendering disabled."), Promise.resolve()) : (console.debug("Mermaid library not loaded. Attempting to load..."), Ts().then(() => (console.log("Mermaid loaded, rendering diagrams..."), cr(e), Ce())).catch((t) => {
|
|
4267
|
+
console.error("Failed to load Mermaid library:", t), Se = !0, Ls();
|
|
4268
|
+
})) : (nt || cr(e), Ce());
|
|
4039
4269
|
}
|
|
4040
|
-
function
|
|
4270
|
+
function cr(e = {}) {
|
|
4041
4271
|
if (typeof mermaid > "u") return;
|
|
4042
4272
|
const r = {
|
|
4043
4273
|
dark: "dark",
|
|
@@ -4067,7 +4297,7 @@ function lr(e = {}) {
|
|
|
4067
4297
|
};
|
|
4068
4298
|
mermaid.initialize(a), nt = !0;
|
|
4069
4299
|
}
|
|
4070
|
-
async function
|
|
4300
|
+
async function Ce() {
|
|
4071
4301
|
if (typeof mermaid > "u") {
|
|
4072
4302
|
console.warn("renderAllMermaid called but Mermaid is not available");
|
|
4073
4303
|
return;
|
|
@@ -4075,7 +4305,7 @@ async function Le() {
|
|
|
4075
4305
|
const e = document.querySelectorAll(".artifactuse-mermaid-container");
|
|
4076
4306
|
for (const t of e) {
|
|
4077
4307
|
if (t.dataset.rendered === "true") continue;
|
|
4078
|
-
const r =
|
|
4308
|
+
const r = Lr(t.dataset.mermaidDiagram), a = t.dataset.mermaidId;
|
|
4079
4309
|
try {
|
|
4080
4310
|
if (await mermaid.parse(r)) {
|
|
4081
4311
|
const { svg: n } = await mermaid.render(a, r);
|
|
@@ -4095,10 +4325,10 @@ async function Le() {
|
|
|
4095
4325
|
}
|
|
4096
4326
|
}
|
|
4097
4327
|
}
|
|
4098
|
-
function
|
|
4328
|
+
function Ls() {
|
|
4099
4329
|
document.querySelectorAll(".artifactuse-mermaid-container").forEach((e) => {
|
|
4100
4330
|
if (e.dataset.rendered === "true") return;
|
|
4101
|
-
const t =
|
|
4331
|
+
const t = Lr(e.dataset.mermaidDiagram);
|
|
4102
4332
|
e.innerHTML = `
|
|
4103
4333
|
<div class="artifactuse-mermaid-fallback">
|
|
4104
4334
|
<div class="artifactuse-mermaid-fallback-title">Mermaid Diagram</div>
|
|
@@ -4110,41 +4340,41 @@ function Ms() {
|
|
|
4110
4340
|
function Ge(e) {
|
|
4111
4341
|
return e.replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">").replace(/"/g, """).replace(/'/g, "'");
|
|
4112
4342
|
}
|
|
4113
|
-
function
|
|
4114
|
-
return
|
|
4343
|
+
function Ts() {
|
|
4344
|
+
return ee || (typeof mermaid < "u" ? Promise.resolve() : (ee = new Promise((e, t) => {
|
|
4115
4345
|
const r = setTimeout(() => {
|
|
4116
|
-
|
|
4346
|
+
ee = null, t(new Error("Mermaid loading timed out after 15 seconds"));
|
|
4117
4347
|
}, 15e3), a = document.createElement("script");
|
|
4118
4348
|
a.src = "https://cdn.jsdelivr.net/npm/mermaid@10/dist/mermaid.min.js", a.crossOrigin = "anonymous", a.onload = () => {
|
|
4119
4349
|
clearTimeout(r), console.log("Mermaid script loaded successfully"), e();
|
|
4120
4350
|
}, a.onerror = (s) => {
|
|
4121
|
-
clearTimeout(r),
|
|
4351
|
+
clearTimeout(r), ee = null, console.error("Mermaid script failed to load:", s), t(new Error("Failed to load Mermaid script from CDN"));
|
|
4122
4352
|
}, document.head.appendChild(a);
|
|
4123
|
-
}),
|
|
4353
|
+
}), ee));
|
|
4124
4354
|
}
|
|
4125
4355
|
function rn() {
|
|
4126
|
-
|
|
4356
|
+
ee = null, Se = !1, nt = !1;
|
|
4127
4357
|
}
|
|
4128
4358
|
function an() {
|
|
4129
4359
|
return typeof mermaid < "u";
|
|
4130
4360
|
}
|
|
4131
4361
|
function sn() {
|
|
4132
|
-
return
|
|
4362
|
+
return Se;
|
|
4133
4363
|
}
|
|
4134
4364
|
function nn(e, t = {}) {
|
|
4135
4365
|
if (!e) return Promise.resolve();
|
|
4136
4366
|
let r = e.innerHTML;
|
|
4137
|
-
return r =
|
|
4367
|
+
return r = Cr(r), e.innerHTML = r, Tr(t);
|
|
4138
4368
|
}
|
|
4139
4369
|
async function on(e) {
|
|
4140
4370
|
const t = document.querySelector(`[data-mermaid-id="${e}"]`);
|
|
4141
|
-
t && (t.dataset.rendered = "false", t.innerHTML = '<div class="artifactuse-mermaid-loading">Loading diagram...</div>', await
|
|
4371
|
+
t && (t.dataset.rendered = "false", t.innerHTML = '<div class="artifactuse-mermaid-loading">Loading diagram...</div>', await Ce());
|
|
4142
4372
|
}
|
|
4143
|
-
async function
|
|
4373
|
+
async function ln(e, t) {
|
|
4144
4374
|
const r = document.querySelector(`[data-mermaid-id="${e}"]`);
|
|
4145
|
-
r && (r.dataset.mermaidDiagram =
|
|
4375
|
+
r && (r.dataset.mermaidDiagram = Rr(t), r.dataset.rendered = "false", r.innerHTML = '<div class="artifactuse-mermaid-loading">Loading diagram...</div>', await Ce());
|
|
4146
4376
|
}
|
|
4147
|
-
function
|
|
4377
|
+
function _s(e) {
|
|
4148
4378
|
const t = /<table([^>]*)>([\s\S]*?)<\/table>/gi;
|
|
4149
4379
|
let r = 0;
|
|
4150
4380
|
return e = e.replace(t, (a, s, n) => {
|
|
@@ -4230,11 +4460,11 @@ function js(e) {
|
|
|
4230
4460
|
}), r.join(`
|
|
4231
4461
|
`);
|
|
4232
4462
|
}
|
|
4233
|
-
function
|
|
4463
|
+
function Hs(e, t = "table-data.csv") {
|
|
4234
4464
|
const r = new Blob([e], { type: "text/csv;charset=utf-8;" }), a = URL.createObjectURL(r), s = document.createElement("a");
|
|
4235
4465
|
s.href = a, s.download = t, document.body.appendChild(s), s.click(), document.body.removeChild(s), URL.revokeObjectURL(a);
|
|
4236
4466
|
}
|
|
4237
|
-
function
|
|
4467
|
+
function Vs(e) {
|
|
4238
4468
|
const t = e.querySelectorAll("tr"), r = [];
|
|
4239
4469
|
return t.forEach((a) => {
|
|
4240
4470
|
const s = a.querySelectorAll("th, td"), n = [];
|
|
@@ -4244,20 +4474,20 @@ function Ds(e) {
|
|
|
4244
4474
|
}), r.join(`
|
|
4245
4475
|
`);
|
|
4246
4476
|
}
|
|
4247
|
-
function
|
|
4477
|
+
function Is(e, t, r = !0) {
|
|
4248
4478
|
const a = e.querySelector("tbody") || e, s = Array.from(a.querySelectorAll("tr")).filter((n) => !n.querySelector("th"));
|
|
4249
4479
|
s.sort((n, o) => {
|
|
4250
4480
|
const i = n.cells[t], u = o.cells[t];
|
|
4251
4481
|
if (!i || !u) return 0;
|
|
4252
|
-
let
|
|
4253
|
-
const p = parseFloat(
|
|
4482
|
+
let l = i.textContent.trim(), d = u.textContent.trim();
|
|
4483
|
+
const p = parseFloat(l.replace(/[,$%]/g, "")), w = parseFloat(d.replace(/[,$%]/g, ""));
|
|
4254
4484
|
if (!isNaN(p) && !isNaN(w))
|
|
4255
4485
|
return r ? p - w : w - p;
|
|
4256
|
-
const
|
|
4257
|
-
return !isNaN(
|
|
4486
|
+
const c = new Date(l), m = new Date(d);
|
|
4487
|
+
return !isNaN(c.getTime()) && !isNaN(m.getTime()) ? r ? c - m : m - c : r ? l.localeCompare(d) : d.localeCompare(l);
|
|
4258
4488
|
}), s.forEach((n) => a.appendChild(n));
|
|
4259
4489
|
}
|
|
4260
|
-
function
|
|
4490
|
+
function Ds(e, t) {
|
|
4261
4491
|
const r = e.querySelectorAll("tbody tr, tr:not(:first-child)"), a = t.toLowerCase().trim();
|
|
4262
4492
|
let s = 0;
|
|
4263
4493
|
return r.forEach((n) => {
|
|
@@ -4269,13 +4499,13 @@ function qs(e, t) {
|
|
|
4269
4499
|
n.style.display = i ? "" : "none", i && s++;
|
|
4270
4500
|
}), s;
|
|
4271
4501
|
}
|
|
4272
|
-
function
|
|
4502
|
+
function qs() {
|
|
4273
4503
|
document.querySelectorAll("[data-table-search]").forEach((e) => {
|
|
4274
4504
|
const t = e.dataset.tableSearch, r = document.getElementById(t), a = document.querySelector(`[data-table-count="${t}"]`);
|
|
4275
4505
|
if (r) {
|
|
4276
4506
|
const s = r.querySelectorAll("tbody tr, tr:not(:first-child)"), n = Array.from(s).filter((o) => !o.querySelector("th")).length;
|
|
4277
4507
|
a && (a.textContent = `${n} rows`), e.addEventListener("input", (o) => {
|
|
4278
|
-
const i =
|
|
4508
|
+
const i = Ds(r, o.target.value);
|
|
4279
4509
|
a && (a.textContent = o.target.value ? `${i} of ${n} rows` : `${n} rows`);
|
|
4280
4510
|
});
|
|
4281
4511
|
}
|
|
@@ -4284,21 +4514,21 @@ function Zs() {
|
|
|
4284
4514
|
const t = e.closest("table"), r = parseInt(e.dataset.sortCol), s = e.dataset.sortDir !== "asc";
|
|
4285
4515
|
t.querySelectorAll(".artifactuse-sortable-header").forEach((n) => {
|
|
4286
4516
|
n.dataset.sortDir = "", n.classList.remove("sort-asc", "sort-desc");
|
|
4287
|
-
}), e.dataset.sortDir = s ? "asc" : "desc", e.classList.add(s ? "sort-asc" : "sort-desc"),
|
|
4517
|
+
}), e.dataset.sortDir = s ? "asc" : "desc", e.classList.add(s ? "sort-asc" : "sort-desc"), Is(t, r, s);
|
|
4288
4518
|
});
|
|
4289
4519
|
}), document.querySelectorAll("[data-table-export]").forEach((e) => {
|
|
4290
4520
|
e.addEventListener("click", () => {
|
|
4291
4521
|
const t = e.dataset.tableExport, r = document.getElementById(t);
|
|
4292
4522
|
if (r) {
|
|
4293
4523
|
const a = js(r);
|
|
4294
|
-
|
|
4524
|
+
Hs(a, `${t}.csv`);
|
|
4295
4525
|
}
|
|
4296
4526
|
});
|
|
4297
4527
|
}), document.querySelectorAll("[data-table-copy]").forEach((e) => {
|
|
4298
4528
|
e.addEventListener("click", async () => {
|
|
4299
4529
|
const t = e.dataset.tableCopy, r = document.getElementById(t);
|
|
4300
4530
|
if (r) {
|
|
4301
|
-
const a =
|
|
4531
|
+
const a = Vs(r);
|
|
4302
4532
|
try {
|
|
4303
4533
|
await navigator.clipboard.writeText(a);
|
|
4304
4534
|
const s = e.querySelector("span"), n = s ? s.textContent : "";
|
|
@@ -4312,11 +4542,11 @@ function Zs() {
|
|
|
4312
4542
|
});
|
|
4313
4543
|
});
|
|
4314
4544
|
}
|
|
4315
|
-
let
|
|
4316
|
-
function
|
|
4317
|
-
return e =
|
|
4545
|
+
let te = null, Re = !1;
|
|
4546
|
+
function _r(e) {
|
|
4547
|
+
return e = Zs(e), e = e.replace(/\$\$([\s\S]*?)\$\$/g, (t, r) => fe(r.trim(), !0)), e = e.replace(/\\\[([\s\S]*?)\\\]/g, (t, r) => fe(r.trim(), !0)), e = e.replace(new RegExp("(?<!\\$)\\$(?!\\$)((?:[^$\\\\]|\\\\.)+?)\\$(?!\\$)", "g"), (t, r) => fe(r.trim(), !1)), e = e.replace(/\\\(([\s\S]*?)\\\)/g, (t, r) => fe(r.trim(), !1)), e;
|
|
4318
4548
|
}
|
|
4319
|
-
function
|
|
4549
|
+
function Zs(e) {
|
|
4320
4550
|
const t = /<pre><code class="language-(math|latex)">([\s\S]*?)<\/code><\/pre>/gi;
|
|
4321
4551
|
return e = e.replace(t, (r, a, s) => {
|
|
4322
4552
|
const n = Os(s).trim();
|
|
@@ -4327,20 +4557,20 @@ function Os(e) {
|
|
|
4327
4557
|
return e.replace(/</g, "<").replace(/>/g, ">").replace(/&/g, "&").replace(/"/g, '"').replace(/'/g, "'").replace(/ /g, " ");
|
|
4328
4558
|
}
|
|
4329
4559
|
function fe(e, t = !1) {
|
|
4330
|
-
const r =
|
|
4560
|
+
const r = Bs(e);
|
|
4331
4561
|
return `<span class="artifactuse-math-container ${t ? "artifactuse-math-display" : "artifactuse-math-inline"}" data-tex="${r}" data-display="${t ? "true" : "false"}"></span>`;
|
|
4332
4562
|
}
|
|
4333
|
-
function
|
|
4563
|
+
function Bs(e) {
|
|
4334
4564
|
return e.replace(/&/g, "&").replace(/"/g, """).replace(/'/g, "'").replace(/</g, "<").replace(/>/g, ">");
|
|
4335
4565
|
}
|
|
4336
4566
|
function Er(e) {
|
|
4337
4567
|
return e.replace(/</g, "<").replace(/>/g, ">").replace(/"/g, '"').replace(/'/g, "'").replace(/&/g, "&");
|
|
4338
4568
|
}
|
|
4339
4569
|
function Pr() {
|
|
4340
|
-
return typeof katex > "u" ?
|
|
4570
|
+
return typeof katex > "u" ? Re ? (console.warn("KaTeX loading previously failed. Math rendering disabled."), Promise.resolve()) : (console.debug("KaTeX library not loaded. Attempting to load..."), Ns().then(() => {
|
|
4341
4571
|
console.log("KaTeX loaded, rendering math..."), ur();
|
|
4342
4572
|
}).catch((e) => {
|
|
4343
|
-
console.error("Failed to load KaTeX library:", e),
|
|
4573
|
+
console.error("Failed to load KaTeX library:", e), Re = !0, Fs();
|
|
4344
4574
|
})) : (ur(), Promise.resolve());
|
|
4345
4575
|
}
|
|
4346
4576
|
function Fs() {
|
|
@@ -4386,9 +4616,9 @@ function We(e) {
|
|
|
4386
4616
|
return e.replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">").replace(/"/g, """).replace(/'/g, "'");
|
|
4387
4617
|
}
|
|
4388
4618
|
function Ns() {
|
|
4389
|
-
return
|
|
4619
|
+
return te || (typeof katex < "u" ? Promise.resolve() : (te = new Promise((e, t) => {
|
|
4390
4620
|
const r = setTimeout(() => {
|
|
4391
|
-
|
|
4621
|
+
te = null, t(new Error("KaTeX loading timed out after 10 seconds"));
|
|
4392
4622
|
}, 1e4), a = document.createElement("link");
|
|
4393
4623
|
a.rel = "stylesheet", a.href = "https://cdn.jsdelivr.net/npm/katex@0.16.11/dist/katex.min.css", a.crossOrigin = "anonymous", a.onerror = () => {
|
|
4394
4624
|
console.warn("KaTeX CSS failed to load, math may not render correctly");
|
|
@@ -4397,23 +4627,23 @@ function Ns() {
|
|
|
4397
4627
|
s.src = "https://cdn.jsdelivr.net/npm/katex@0.16.11/dist/katex.min.js", s.crossOrigin = "anonymous", s.onload = () => {
|
|
4398
4628
|
clearTimeout(r), console.log("KaTeX script loaded successfully"), e();
|
|
4399
4629
|
}, s.onerror = (n) => {
|
|
4400
|
-
clearTimeout(r),
|
|
4630
|
+
clearTimeout(r), te = null, console.error("KaTeX script failed to load:", n), t(new Error("Failed to load KaTeX script from CDN"));
|
|
4401
4631
|
}, document.head.appendChild(s);
|
|
4402
|
-
}),
|
|
4632
|
+
}), te));
|
|
4403
4633
|
}
|
|
4404
|
-
function
|
|
4405
|
-
|
|
4634
|
+
function cn() {
|
|
4635
|
+
te = null, Re = !1;
|
|
4406
4636
|
}
|
|
4407
4637
|
function un() {
|
|
4408
4638
|
return typeof katex < "u";
|
|
4409
4639
|
}
|
|
4410
4640
|
function dn() {
|
|
4411
|
-
return
|
|
4641
|
+
return Re;
|
|
4412
4642
|
}
|
|
4413
4643
|
function pn(e) {
|
|
4414
4644
|
if (!e) return Promise.resolve();
|
|
4415
4645
|
let t = e.innerHTML;
|
|
4416
|
-
return t =
|
|
4646
|
+
return t = _r(t), e.innerHTML = t, Pr();
|
|
4417
4647
|
}
|
|
4418
4648
|
const fn = {
|
|
4419
4649
|
// Fractions
|
|
@@ -4477,7 +4707,7 @@ function Us(e) {
|
|
|
4477
4707
|
for (const s of t) {
|
|
4478
4708
|
const n = s.match(/^(?:language-|lang-)(.+)$/);
|
|
4479
4709
|
if (n)
|
|
4480
|
-
return
|
|
4710
|
+
return He(n[1]);
|
|
4481
4711
|
}
|
|
4482
4712
|
const r = e.closest("pre");
|
|
4483
4713
|
if (r) {
|
|
@@ -4485,13 +4715,13 @@ function Us(e) {
|
|
|
4485
4715
|
for (const n of s) {
|
|
4486
4716
|
const o = n.match(/^(?:language-|lang-)(.+)$/);
|
|
4487
4717
|
if (o)
|
|
4488
|
-
return
|
|
4718
|
+
return He(o[1]);
|
|
4489
4719
|
}
|
|
4490
4720
|
}
|
|
4491
4721
|
const a = e.dataset.language || (r == null ? void 0 : r.dataset.language);
|
|
4492
|
-
return a ?
|
|
4722
|
+
return a ? He(a) : null;
|
|
4493
4723
|
}
|
|
4494
|
-
function
|
|
4724
|
+
function He(e) {
|
|
4495
4725
|
const t = {
|
|
4496
4726
|
js: "javascript",
|
|
4497
4727
|
ts: "typescript",
|
|
@@ -4552,7 +4782,7 @@ function Gs() {
|
|
|
4552
4782
|
const e = {
|
|
4553
4783
|
image(a) {
|
|
4554
4784
|
const s = typeof a == "string" ? a : a.href, n = typeof a == "string" ? arguments[1] : a.title, o = typeof a == "string" ? arguments[2] : a.text;
|
|
4555
|
-
return
|
|
4785
|
+
return qe(s || "", n || "", o || "");
|
|
4556
4786
|
}
|
|
4557
4787
|
}, t = {
|
|
4558
4788
|
link(a) {
|
|
@@ -4568,7 +4798,7 @@ function Gs() {
|
|
|
4568
4798
|
return o ? `<pre><code class="language-${ke(o)}">${i}</code></pre>` : `<pre><code>${i}</code></pre>`;
|
|
4569
4799
|
}
|
|
4570
4800
|
};
|
|
4571
|
-
|
|
4801
|
+
V.use({
|
|
4572
4802
|
renderer: {
|
|
4573
4803
|
...e,
|
|
4574
4804
|
...t,
|
|
@@ -4579,7 +4809,7 @@ function Gs() {
|
|
|
4579
4809
|
});
|
|
4580
4810
|
}
|
|
4581
4811
|
Gs();
|
|
4582
|
-
const
|
|
4812
|
+
const Hr = {
|
|
4583
4813
|
// Structured artifact types
|
|
4584
4814
|
form: "form-panel",
|
|
4585
4815
|
// Visual editors
|
|
@@ -4634,6 +4864,8 @@ const Ir = {
|
|
|
4634
4864
|
// Initial split view position as percentage (20-80)
|
|
4635
4865
|
// Can be overridden per-component via props
|
|
4636
4866
|
splitPosition: 50,
|
|
4867
|
+
// Enable multi-tab mode (open multiple artifacts as tabs)
|
|
4868
|
+
multiTab: !1,
|
|
4637
4869
|
// Panel configuration
|
|
4638
4870
|
// Users can add/override/disable panels here
|
|
4639
4871
|
//
|
|
@@ -4693,7 +4925,7 @@ const Ir = {
|
|
|
4693
4925
|
expiryDays: 30
|
|
4694
4926
|
}
|
|
4695
4927
|
};
|
|
4696
|
-
function
|
|
4928
|
+
function Vr(e, t) {
|
|
4697
4929
|
if (e == null)
|
|
4698
4930
|
return null;
|
|
4699
4931
|
try {
|
|
@@ -4716,25 +4948,25 @@ function Xs(e, t) {
|
|
|
4716
4948
|
console.warn("Artifactuse: Invalid default CDN URL:", t);
|
|
4717
4949
|
}
|
|
4718
4950
|
for (const a of Object.values(e)) {
|
|
4719
|
-
const s =
|
|
4951
|
+
const s = Vr(a, t);
|
|
4720
4952
|
s && r.add(s);
|
|
4721
4953
|
}
|
|
4722
4954
|
return [...r];
|
|
4723
4955
|
}
|
|
4724
4956
|
function Ks(e, t) {
|
|
4725
|
-
const r = { ...
|
|
4957
|
+
const r = { ...Hr };
|
|
4726
4958
|
if (e.panels)
|
|
4727
|
-
for (const [u,
|
|
4959
|
+
for (const [u, l] of Object.entries(e.panels))
|
|
4728
4960
|
if (Array.isArray(u))
|
|
4729
4961
|
u.forEach((d) => {
|
|
4730
4962
|
const p = d == null ? void 0 : d.toLowerCase();
|
|
4731
|
-
p && (r[p] =
|
|
4963
|
+
p && (r[p] = l);
|
|
4732
4964
|
});
|
|
4733
4965
|
else {
|
|
4734
4966
|
const d = u == null ? void 0 : u.toLowerCase();
|
|
4735
|
-
d && (r[d] =
|
|
4967
|
+
d && (r[d] = l);
|
|
4736
4968
|
}
|
|
4737
|
-
function a(u,
|
|
4969
|
+
function a(u, l = {}) {
|
|
4738
4970
|
const d = u == null ? void 0 : u.toLowerCase();
|
|
4739
4971
|
if (!d) return null;
|
|
4740
4972
|
const p = r[d];
|
|
@@ -4747,26 +4979,26 @@ function Ks(e, t) {
|
|
|
4747
4979
|
else
|
|
4748
4980
|
return null;
|
|
4749
4981
|
w.endsWith("/") || (w += "");
|
|
4750
|
-
const
|
|
4751
|
-
|
|
4752
|
-
|
|
4982
|
+
const c = new URLSearchParams();
|
|
4983
|
+
l.theme && c.set("theme", l.theme), l.accent && c.set("accent", l.accent), l.params && Object.entries(l.params).forEach(([h, g]) => {
|
|
4984
|
+
c.set(h, g);
|
|
4753
4985
|
});
|
|
4754
|
-
const m =
|
|
4986
|
+
const m = c.toString();
|
|
4755
4987
|
return m ? `${w}?${m}` : w;
|
|
4756
4988
|
}
|
|
4757
4989
|
function s(u) {
|
|
4758
|
-
const
|
|
4759
|
-
return
|
|
4990
|
+
const l = u == null ? void 0 : u.toLowerCase();
|
|
4991
|
+
return l && r[l] !== void 0 && r[l] !== null;
|
|
4760
4992
|
}
|
|
4761
4993
|
function n() {
|
|
4762
4994
|
return Object.keys(r).filter((u) => r[u] !== null);
|
|
4763
4995
|
}
|
|
4764
|
-
function o(u,
|
|
4996
|
+
function o(u, l) {
|
|
4765
4997
|
(Array.isArray(u) ? u : [u]).forEach((w) => {
|
|
4766
|
-
const
|
|
4767
|
-
|
|
4998
|
+
const c = w == null ? void 0 : w.toLowerCase();
|
|
4999
|
+
c && (r[c] = l);
|
|
4768
5000
|
});
|
|
4769
|
-
const p =
|
|
5001
|
+
const p = Vr(l, e.cdnUrl);
|
|
4770
5002
|
p && t && t.addAllowedOrigin(p);
|
|
4771
5003
|
}
|
|
4772
5004
|
function i(u) {
|
|
@@ -4788,137 +5020,140 @@ function Ks(e, t) {
|
|
|
4788
5020
|
};
|
|
4789
5021
|
}
|
|
4790
5022
|
function bn(e = {}) {
|
|
4791
|
-
const t =
|
|
4792
|
-
function d(k,
|
|
4793
|
-
let S =
|
|
4794
|
-
const D = [],
|
|
5023
|
+
const t = Ir(Ws, e), r = ta(), a = { ...Hr, ...t.panels }, s = Xs(a, t.cdnUrl), n = ra(s), o = na(t.theme, t.colors || {}), i = Ks(t, n), u = pa(t.sharing), l = fa(t.editor);
|
|
5024
|
+
function d(k, _, L = {}) {
|
|
5025
|
+
let S = V.parse(k);
|
|
5026
|
+
const D = [], E = { theme: o.resolved }, Z = L.inlinePreview ?? t.inlinePreview ?? null, ne = L.inlineCode ?? t.inlineCode ?? null, oe = L.tabs ?? t.tabs ?? null, G = L.viewMode ?? t.viewMode ?? null;
|
|
4795
5027
|
if (t.processors.codeBlocks) {
|
|
4796
|
-
const
|
|
5028
|
+
const B = ea(S, _, {
|
|
4797
5029
|
...t.codeExtraction,
|
|
4798
|
-
inlinePreview:
|
|
5030
|
+
inlinePreview: Z,
|
|
4799
5031
|
inlineCode: ne,
|
|
4800
|
-
tabs:
|
|
4801
|
-
viewMode:
|
|
5032
|
+
tabs: oe,
|
|
5033
|
+
viewMode: G
|
|
4802
5034
|
});
|
|
4803
|
-
S =
|
|
5035
|
+
S = B.html, D.push(...B.artifacts);
|
|
4804
5036
|
}
|
|
4805
|
-
return t.processors.images && (S = Qa(S)), t.processors.imageGalleries && (S = Ya(S)), t.processors.videos && (S = as(S)), t.processors.videoGalleries && (S = os(S)), t.processors.audio && (S = us(S,
|
|
4806
|
-
r.addArtifact(
|
|
5037
|
+
return t.processors.images && (S = Qa(S)), t.processors.imageGalleries && (S = Ya(S)), t.processors.videos && (S = as(S)), t.processors.videoGalleries && (S = os(S)), t.processors.audio && (S = us(S, E)), t.processors.maps && (S = bs(S)), t.processors.social && (S = vs(S, E)), t.processors.documents && (S = ys(S), S = ks(S), S = xs(S)), t.processors.codeEmbeds && (S = $s(S, E)), t.processors.dataViz && (S = As(S)), t.processors.design && (S = zs(S, E)), t.processors.interactive && (S = Ss(S, E)), t.processors.tables && (S = _s(S)), t.processors.math && (S = _r(S)), t.processors.mermaid && (S = Cr(S)), D.forEach((B) => {
|
|
5038
|
+
r.addArtifact(B);
|
|
4807
5039
|
}), {
|
|
4808
5040
|
html: S,
|
|
4809
5041
|
artifacts: D
|
|
4810
5042
|
};
|
|
4811
5043
|
}
|
|
4812
5044
|
async function p(k = document) {
|
|
4813
|
-
const
|
|
4814
|
-
t.processors.math &&
|
|
4815
|
-
var
|
|
4816
|
-
const
|
|
4817
|
-
if (!
|
|
4818
|
-
const ne = ((
|
|
5045
|
+
const _ = [], L = { theme: o.resolved };
|
|
5046
|
+
t.processors.math && _.push(Pr()), t.processors.mermaid && _.push(Tr(L)), t.processors.tables && qs(), t.processors.audio && ps(k), t.syntaxHighlight && (jr(k), (k === document ? document : k).querySelectorAll(".artifactuse-inline-preview[data-smartdiff]").forEach((E) => {
|
|
5047
|
+
var G;
|
|
5048
|
+
const Z = E.querySelector("code");
|
|
5049
|
+
if (!Z || Z.dataset.smartdiffProcessed) return;
|
|
5050
|
+
const ne = ((G = E.dataset.smartdiffMarkers) == null ? void 0 : G.split(",")) || [], oe = Z.innerHTML.split(`
|
|
4819
5051
|
`);
|
|
4820
|
-
|
|
4821
|
-
const
|
|
4822
|
-
return
|
|
5052
|
+
Z.innerHTML = oe.map((B, be) => {
|
|
5053
|
+
const Q = ne[be];
|
|
5054
|
+
return Q === "-" ? `<span class="token deleted">${B}</span>` : Q === "+" ? `<span class="token inserted">${B}</span>` : B;
|
|
4823
5055
|
}).join(`
|
|
4824
|
-
`),
|
|
4825
|
-
})), await Promise.all(
|
|
5056
|
+
`), Z.dataset.smartdiffProcessed = "true";
|
|
5057
|
+
})), await Promise.all(_);
|
|
4826
5058
|
}
|
|
4827
5059
|
function w(k) {
|
|
4828
5060
|
if (k.isInline) {
|
|
4829
5061
|
console.warn("Attempted to open inline artifact in panel:", k.id);
|
|
4830
5062
|
return;
|
|
4831
5063
|
}
|
|
4832
|
-
r.setActiveArtifact(k.id), r.setPanelOpen(!0), k.viewMode && r.setViewMode(k.viewMode),
|
|
5064
|
+
t.multiTab ? r.openTab(k.id) : r.setActiveArtifact(k.id), r.setForceEmptyView(!1), r.setPanelOpen(!0), k.viewMode && r.setViewMode(k.viewMode), T("artifact:opened", k);
|
|
4833
5065
|
}
|
|
4834
|
-
function
|
|
4835
|
-
const S = k.split(".").pop(), D = L.language || Nr(S) || S,
|
|
4836
|
-
return m(
|
|
5066
|
+
function c(k, _, L = {}) {
|
|
5067
|
+
const S = k.split(".").pop(), D = L.language || Nr(S) || S, E = L.title || k;
|
|
5068
|
+
return m(_, D, { ...L, title: E });
|
|
4837
5069
|
}
|
|
4838
|
-
function m(k,
|
|
4839
|
-
const S = L.messageId ||
|
|
4840
|
-
return
|
|
5070
|
+
function m(k, _, L = {}) {
|
|
5071
|
+
const S = L.messageId || Br("open"), D = A({ type: _, language: _ }) ? _ : "txt", E = Me(k, D, S, 0);
|
|
5072
|
+
return E.title = L.title || E.title, E.isInline = !1, E.editorLanguage = _, L.tabs && (E.tabs = L.tabs), L.panelUrl && (E.panelUrl = L.panelUrl), r.addArtifact(E), w(E), L.viewMode ? r.setViewMode(L.viewMode) : L.tabs && r.setViewMode(L.tabs[0]), E;
|
|
4841
5073
|
}
|
|
4842
|
-
function h(k,
|
|
5074
|
+
function h(k, _, L = {}) {
|
|
4843
5075
|
const S = typeof k == "string" ? k : k == null ? void 0 : k.id, D = r.getArtifact(S);
|
|
4844
5076
|
if (!D) return null;
|
|
4845
|
-
const
|
|
4846
|
-
return L.title !== void 0 && (
|
|
5077
|
+
const E = { ...D, code: _, _refreshToken: Date.now() };
|
|
5078
|
+
return L.title !== void 0 && (E.title = L.title), L.tabs !== void 0 && (E.tabs = L.tabs), L.panelUrl !== void 0 && (E.panelUrl = L.panelUrl), r.addArtifact(E), T("artifact:updated", { artifactId: S, artifact: r.getArtifact(S) }), r.getArtifact(S);
|
|
4847
5079
|
}
|
|
4848
5080
|
function g() {
|
|
4849
|
-
r.
|
|
5081
|
+
r.clearActiveArtifact(), r.setForceEmptyView(!0), r.setPanelOpen(!0), T("panel:opened");
|
|
4850
5082
|
}
|
|
4851
5083
|
function f() {
|
|
4852
|
-
|
|
4853
|
-
r.clearActiveArtifact(), r.setPanelOpen(k), k || r.setFullscreen(!1), _("panel:toggled", { isOpen: k });
|
|
5084
|
+
r.setPanelOpen(!1), r.setFullscreen(!1), T("panel:closed");
|
|
4854
5085
|
}
|
|
4855
5086
|
function b() {
|
|
5087
|
+
const k = !r.getState().isPanelOpen;
|
|
5088
|
+
r.clearActiveArtifact(), r.setPanelOpen(k), k || r.setFullscreen(!1), T("panel:toggled", { isOpen: k });
|
|
5089
|
+
}
|
|
5090
|
+
function v() {
|
|
4856
5091
|
const k = !r.getState().isFullscreen;
|
|
4857
|
-
r.setFullscreen(k),
|
|
5092
|
+
r.setFullscreen(k), T("fullscreen:toggled", { isFullscreen: k });
|
|
4858
5093
|
}
|
|
4859
|
-
function
|
|
4860
|
-
r.setViewMode(k),
|
|
5094
|
+
function x(k) {
|
|
5095
|
+
r.setViewMode(k), T("viewMode:changed", { mode: k });
|
|
4861
5096
|
}
|
|
4862
|
-
function
|
|
5097
|
+
function $(k, _ = {}) {
|
|
4863
5098
|
if (!k) return null;
|
|
4864
5099
|
if (k.panelUrl) return k.panelUrl;
|
|
4865
5100
|
const { type: L, language: S } = k, D = {
|
|
4866
|
-
theme:
|
|
4867
|
-
},
|
|
4868
|
-
|
|
4869
|
-
let
|
|
4870
|
-
return !
|
|
5101
|
+
theme: _.theme || o.resolved
|
|
5102
|
+
}, E = o.colors;
|
|
5103
|
+
E != null && E.primary && (D.accent = E.primary);
|
|
5104
|
+
let Z = i.resolve(L, D);
|
|
5105
|
+
return !Z && S && (Z = i.resolve(S, D)), Z;
|
|
4871
5106
|
}
|
|
4872
|
-
function
|
|
5107
|
+
function A(k) {
|
|
4873
5108
|
return k ? i.has(k.type) || i.has(k.language) : !1;
|
|
4874
5109
|
}
|
|
4875
|
-
function
|
|
4876
|
-
i.register(k,
|
|
5110
|
+
function C(k, _) {
|
|
5111
|
+
i.register(k, _);
|
|
4877
5112
|
}
|
|
4878
5113
|
function R(k) {
|
|
4879
5114
|
i.unregister(k);
|
|
4880
5115
|
}
|
|
4881
|
-
function
|
|
5116
|
+
function M() {
|
|
4882
5117
|
return i.getTypes();
|
|
4883
5118
|
}
|
|
4884
|
-
function
|
|
4885
|
-
n.send(k,
|
|
5119
|
+
function y(k, _) {
|
|
5120
|
+
n.send(k, _);
|
|
4886
5121
|
}
|
|
4887
|
-
const
|
|
4888
|
-
function
|
|
4889
|
-
return
|
|
5122
|
+
const z = /* @__PURE__ */ new Map();
|
|
5123
|
+
function H(k, _) {
|
|
5124
|
+
return z.has(k) || z.set(k, /* @__PURE__ */ new Set()), z.get(k).add(_), () => {
|
|
4890
5125
|
var L;
|
|
4891
|
-
(L =
|
|
5126
|
+
(L = z.get(k)) == null || L.delete(_);
|
|
4892
5127
|
};
|
|
4893
5128
|
}
|
|
4894
|
-
function
|
|
5129
|
+
function P(k, _) {
|
|
4895
5130
|
var L;
|
|
4896
|
-
(L =
|
|
5131
|
+
(L = z.get(k)) == null || L.delete(_);
|
|
4897
5132
|
}
|
|
4898
|
-
function
|
|
5133
|
+
function T(k, _) {
|
|
4899
5134
|
var L;
|
|
4900
|
-
(L =
|
|
5135
|
+
(L = z.get(k)) == null || L.forEach((S) => {
|
|
4901
5136
|
try {
|
|
4902
|
-
S(
|
|
5137
|
+
S(_);
|
|
4903
5138
|
} catch (D) {
|
|
4904
5139
|
console.error(`Artifactuse event handler error (${k}):`, D);
|
|
4905
5140
|
}
|
|
4906
5141
|
});
|
|
4907
5142
|
}
|
|
4908
|
-
n.on("ai:request", (k) =>
|
|
4909
|
-
k != null && k.artifactId && (k == null ? void 0 : k.code) !== void 0 && h(k.artifactId, k.code),
|
|
5143
|
+
n.on("ai:request", (k) => T("ai:request", k)), n.on("save:request", (k) => T("save:request", k)), n.on("export:complete", (k) => T("export:complete", k)), n.on("form:submit", (k) => T("form:submit", k)), n.on("form:cancel", (k) => T("form:cancel", k)), n.on("form:step", (k) => T("form:step", k)), n.on("social:copy", (k) => T("social:copy", k)), n.on("edit:save", (k) => {
|
|
5144
|
+
k != null && k.artifactId && (k == null ? void 0 : k.code) !== void 0 && h(k.artifactId, k.code), T("edit:save", k);
|
|
4910
5145
|
});
|
|
4911
|
-
function
|
|
5146
|
+
function W() {
|
|
4912
5147
|
o.apply();
|
|
4913
5148
|
}
|
|
4914
|
-
function
|
|
5149
|
+
function K(k) {
|
|
4915
5150
|
o.set(k);
|
|
4916
5151
|
}
|
|
4917
|
-
function
|
|
5152
|
+
function U() {
|
|
4918
5153
|
return o.resolved;
|
|
4919
5154
|
}
|
|
4920
|
-
function
|
|
4921
|
-
n.destroy(),
|
|
5155
|
+
function J() {
|
|
5156
|
+
n.destroy(), z.clear(), r.clear(), ws();
|
|
4922
5157
|
}
|
|
4923
5158
|
return {
|
|
4924
5159
|
// Config
|
|
@@ -4932,42 +5167,47 @@ function bn(e = {}) {
|
|
|
4932
5167
|
initializeContent: p,
|
|
4933
5168
|
// Panel control
|
|
4934
5169
|
openArtifact: w,
|
|
4935
|
-
openFile:
|
|
5170
|
+
openFile: c,
|
|
4936
5171
|
openCode: m,
|
|
4937
5172
|
updateFile: h,
|
|
4938
|
-
|
|
4939
|
-
|
|
4940
|
-
|
|
4941
|
-
|
|
4942
|
-
|
|
4943
|
-
|
|
5173
|
+
openPanel: g,
|
|
5174
|
+
closePanel: f,
|
|
5175
|
+
togglePanel: b,
|
|
5176
|
+
toggleFullscreen: v,
|
|
5177
|
+
setViewMode: x,
|
|
5178
|
+
getPanelUrl: $,
|
|
5179
|
+
sendToPanel: y,
|
|
5180
|
+
// Multi-tab
|
|
5181
|
+
closeTab: (k) => r.closeTab(k),
|
|
5182
|
+
closeOtherTabs: (k) => r.closeOtherTabs(k),
|
|
5183
|
+
closeAllTabs: () => r.closeAllTabs(),
|
|
4944
5184
|
// Panel management (new)
|
|
4945
|
-
hasPanel:
|
|
4946
|
-
registerPanel:
|
|
5185
|
+
hasPanel: A,
|
|
5186
|
+
registerPanel: C,
|
|
4947
5187
|
unregisterPanel: R,
|
|
4948
|
-
getPanelTypes:
|
|
5188
|
+
getPanelTypes: M,
|
|
4949
5189
|
panelResolver: i,
|
|
4950
5190
|
// Expose for advanced use
|
|
4951
5191
|
// Theme
|
|
4952
5192
|
theme: o,
|
|
4953
|
-
applyTheme:
|
|
4954
|
-
setTheme:
|
|
4955
|
-
getTheme:
|
|
5193
|
+
applyTheme: W,
|
|
5194
|
+
setTheme: K,
|
|
5195
|
+
getTheme: U,
|
|
4956
5196
|
// Events
|
|
4957
|
-
on:
|
|
4958
|
-
off:
|
|
4959
|
-
emit:
|
|
5197
|
+
on: H,
|
|
5198
|
+
off: P,
|
|
5199
|
+
emit: T,
|
|
4960
5200
|
// Editor (CodeMirror integration)
|
|
4961
|
-
editor:
|
|
5201
|
+
editor: l,
|
|
4962
5202
|
// Bridge (for advanced use)
|
|
4963
5203
|
bridge: n,
|
|
4964
5204
|
// Sharing
|
|
4965
5205
|
share: u,
|
|
4966
5206
|
// Cleanup
|
|
4967
|
-
destroy:
|
|
5207
|
+
destroy: J
|
|
4968
5208
|
};
|
|
4969
5209
|
}
|
|
4970
|
-
function
|
|
5210
|
+
function Ir(e, t, r = /* @__PURE__ */ new WeakSet()) {
|
|
4971
5211
|
if (!t) return e;
|
|
4972
5212
|
if (!e) return t;
|
|
4973
5213
|
if (typeof t == "object" && t !== null) {
|
|
@@ -4988,7 +5228,7 @@ function Hr(e, t, r = /* @__PURE__ */ new WeakSet()) {
|
|
|
4988
5228
|
continue;
|
|
4989
5229
|
}
|
|
4990
5230
|
if (typeof n == "object" && n.constructor === Object) {
|
|
4991
|
-
a[s] =
|
|
5231
|
+
a[s] = Ir(e[s] || {}, n, r);
|
|
4992
5232
|
continue;
|
|
4993
5233
|
}
|
|
4994
5234
|
a[s] = n;
|
|
@@ -4999,62 +5239,62 @@ function Hr(e, t, r = /* @__PURE__ */ new WeakSet()) {
|
|
|
4999
5239
|
export {
|
|
5000
5240
|
ks as $,
|
|
5001
5241
|
Oe as A,
|
|
5002
|
-
|
|
5242
|
+
Be as B,
|
|
5003
5243
|
Fe as C,
|
|
5004
|
-
|
|
5244
|
+
Hr as D,
|
|
5005
5245
|
Ne as E,
|
|
5006
5246
|
us as F,
|
|
5007
5247
|
vt as G,
|
|
5008
5248
|
yt as H,
|
|
5009
|
-
|
|
5249
|
+
O as I,
|
|
5010
5250
|
kt as J,
|
|
5011
5251
|
ps as K,
|
|
5012
5252
|
ws as L,
|
|
5013
5253
|
bs as M,
|
|
5014
|
-
|
|
5254
|
+
Y as N,
|
|
5015
5255
|
Ue as O,
|
|
5016
|
-
|
|
5256
|
+
Ct as P,
|
|
5017
5257
|
vs as Q,
|
|
5018
|
-
|
|
5019
|
-
|
|
5020
|
-
|
|
5021
|
-
|
|
5258
|
+
Rt as R,
|
|
5259
|
+
Lt as S,
|
|
5260
|
+
Tt as T,
|
|
5261
|
+
_t as U,
|
|
5022
5262
|
Et as V,
|
|
5023
5263
|
Pt as W,
|
|
5024
5264
|
jt as X,
|
|
5025
|
-
|
|
5265
|
+
Ht as Y,
|
|
5026
5266
|
ys as Z,
|
|
5027
|
-
|
|
5267
|
+
Vt as _,
|
|
5028
5268
|
Ys as a,
|
|
5029
5269
|
wn as a$,
|
|
5030
|
-
|
|
5031
|
-
|
|
5270
|
+
ie as a0,
|
|
5271
|
+
It as a1,
|
|
5032
5272
|
xs as a2,
|
|
5033
|
-
|
|
5034
|
-
|
|
5035
|
-
|
|
5036
|
-
|
|
5273
|
+
Dt as a3,
|
|
5274
|
+
$s as a4,
|
|
5275
|
+
qt as a5,
|
|
5276
|
+
Zt as a6,
|
|
5037
5277
|
Ot as a7,
|
|
5038
|
-
|
|
5278
|
+
Bt as a8,
|
|
5039
5279
|
Ft as a9,
|
|
5040
5280
|
an as aA,
|
|
5041
5281
|
sn as aB,
|
|
5042
5282
|
nn as aC,
|
|
5043
5283
|
on as aD,
|
|
5044
|
-
|
|
5045
|
-
|
|
5284
|
+
ln as aE,
|
|
5285
|
+
_s as aF,
|
|
5046
5286
|
Es as aG,
|
|
5047
5287
|
js as aH,
|
|
5048
|
-
|
|
5049
|
-
|
|
5050
|
-
|
|
5051
|
-
|
|
5052
|
-
|
|
5053
|
-
|
|
5288
|
+
Hs as aI,
|
|
5289
|
+
Vs as aJ,
|
|
5290
|
+
Is as aK,
|
|
5291
|
+
Ds as aL,
|
|
5292
|
+
qs as aM,
|
|
5293
|
+
_r as aN,
|
|
5054
5294
|
fe as aO,
|
|
5055
5295
|
Pr as aP,
|
|
5056
5296
|
Ns as aQ,
|
|
5057
|
-
|
|
5297
|
+
cn as aR,
|
|
5058
5298
|
un as aS,
|
|
5059
5299
|
dn as aT,
|
|
5060
5300
|
pn as aU,
|
|
@@ -5065,30 +5305,30 @@ export {
|
|
|
5065
5305
|
Us as aZ,
|
|
5066
5306
|
mn as a_,
|
|
5067
5307
|
Nt as aa,
|
|
5068
|
-
|
|
5308
|
+
As as ab,
|
|
5069
5309
|
Ut as ac,
|
|
5070
5310
|
Gt as ad,
|
|
5071
5311
|
Wt as ae,
|
|
5072
5312
|
Xt as af,
|
|
5073
|
-
|
|
5313
|
+
zs as ag,
|
|
5074
5314
|
Kt as ah,
|
|
5075
5315
|
Jt as ai,
|
|
5076
5316
|
Qt as aj,
|
|
5077
5317
|
Yt as ak,
|
|
5078
5318
|
er as al,
|
|
5079
5319
|
tr as am,
|
|
5080
|
-
|
|
5320
|
+
Ss as an,
|
|
5081
5321
|
rr as ao,
|
|
5082
5322
|
ar as ap,
|
|
5083
5323
|
sr as aq,
|
|
5084
5324
|
nr as ar,
|
|
5085
5325
|
ir as as,
|
|
5086
5326
|
or as at,
|
|
5087
|
-
|
|
5088
|
-
|
|
5089
|
-
|
|
5090
|
-
|
|
5091
|
-
|
|
5327
|
+
lr as au,
|
|
5328
|
+
Cr as av,
|
|
5329
|
+
Rs as aw,
|
|
5330
|
+
Tr as ax,
|
|
5331
|
+
Ts as ay,
|
|
5092
5332
|
rn as az,
|
|
5093
5333
|
Qs as b,
|
|
5094
5334
|
Wr as c,
|
|
@@ -5102,17 +5342,17 @@ export {
|
|
|
5102
5342
|
ra as k,
|
|
5103
5343
|
na as l,
|
|
5104
5344
|
fa as m,
|
|
5105
|
-
|
|
5345
|
+
He as n,
|
|
5106
5346
|
Qa as o,
|
|
5107
5347
|
tn as p,
|
|
5108
5348
|
Ya as q,
|
|
5109
|
-
|
|
5349
|
+
qe as r,
|
|
5110
5350
|
bt as s,
|
|
5111
5351
|
as as t,
|
|
5112
5352
|
es as u,
|
|
5113
5353
|
rs as v,
|
|
5114
|
-
|
|
5354
|
+
Ze as w,
|
|
5115
5355
|
os as x,
|
|
5116
|
-
|
|
5356
|
+
ls as y,
|
|
5117
5357
|
ns as z
|
|
5118
5358
|
};
|