likec4 1.22.1 → 1.23.0

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 CHANGED
@@ -229,11 +229,11 @@ Check Typescript definitions for available methods.
229
229
  In root workspace:
230
230
 
231
231
  ```sh
232
- yarn install
233
- yarn build
232
+ pnpm install
233
+ pnpm build
234
234
 
235
235
  cd packages/likec4
236
- yarn dev
236
+ pnpm dev
237
237
  ```
238
238
 
239
239
  ## Support
@@ -1,11 +1,11 @@
1
1
  import { jsx as t, jsxs as u, Fragment as z } from "react/jsx-runtime";
2
2
  import { useOverviewGraph as L } from "virtual:likec4/overview-graph";
3
3
  import { nonexhaustive as R } from "@likec4/core";
4
- import { u as V } from "./tanstack-router-CsfoXGgM.js";
5
- import { B as G, H as v, P as g, u as $, a as K, i as U, b as A, c as X } from "./likec4-B-gfuLMn.js";
4
+ import { u as V } from "./tanstack-router-htnGPerc.js";
5
+ import { B as G, H as v, P as g, u as $, a as K, i as U, b as A, c as X } from "./likec4-Dc_HarGT.js";
6
6
  import { memo as k, useRef as Y, useMemo as B } from "react";
7
- import { c as b, I as q, n as S, u as j, i as J } from "./main-8uz6QKlw.js";
8
- import { P as O, c as I, G as C, T as F, a as y, C as Q, b as W, d as ee, I as te, B as P, u as se } from "./mantine-pfC7caNp.js";
7
+ import { c as b, I as q, n as S, u as j, i as J } from "./main-CgCGub6x.js";
8
+ import { P as O, c as I, G as C, T as F, a as y, C as Q, b as W, d as ee, I as te, B as P, u as se } from "./mantine-Dy50iVbn.js";
9
9
  import { usePreviewUrl as ae } from "virtual:likec4/previews";
10
10
  /**
11
11
  * @license @tabler/icons-react v3.29.0 - MIT
@@ -0,0 +1,491 @@
1
+ function O(t, e) {
2
+ if (t.match(/^[a-z]+:\/\//i))
3
+ return t;
4
+ if (t.match(/^\/\//))
5
+ return window.location.protocol + t;
6
+ if (t.match(/^[a-z]+:/i))
7
+ return t;
8
+ const r = document.implementation.createHTMLDocument(), n = r.createElement("base"), s = r.createElement("a");
9
+ return r.head.appendChild(n), r.body.appendChild(s), e && (n.href = e), s.href = t, s.href;
10
+ }
11
+ const _ = /* @__PURE__ */ (() => {
12
+ let t = 0;
13
+ const e = () => (
14
+ // eslint-disable-next-line no-bitwise
15
+ `0000${(Math.random() * 36 ** 4 << 0).toString(36)}`.slice(-4)
16
+ );
17
+ return () => (t += 1, `u${e()}${t}`);
18
+ })();
19
+ function h(t) {
20
+ const e = [];
21
+ for (let r = 0, n = t.length; r < n; r++)
22
+ e.push(t[r]);
23
+ return e;
24
+ }
25
+ function d(t, e) {
26
+ const n = (t.ownerDocument.defaultView || window).getComputedStyle(t).getPropertyValue(e);
27
+ return n ? parseFloat(n.replace("px", "")) : 0;
28
+ }
29
+ function W(t) {
30
+ const e = d(t, "border-left-width"), r = d(t, "border-right-width");
31
+ return t.clientWidth + e + r;
32
+ }
33
+ function q(t) {
34
+ const e = d(t, "border-top-width"), r = d(t, "border-bottom-width");
35
+ return t.clientHeight + e + r;
36
+ }
37
+ function A(t, e = {}) {
38
+ const r = e.width || W(t), n = e.height || q(t);
39
+ return { width: r, height: n };
40
+ }
41
+ function B() {
42
+ let t, e;
43
+ try {
44
+ e = process;
45
+ } catch {
46
+ }
47
+ const r = e && e.env ? e.env.devicePixelRatio : null;
48
+ return r && (t = parseInt(r, 10), Number.isNaN(t) && (t = 1)), t || window.devicePixelRatio || 1;
49
+ }
50
+ const u = 16384;
51
+ function j(t) {
52
+ (t.width > u || t.height > u) && (t.width > u && t.height > u ? t.width > t.height ? (t.height *= u / t.width, t.width = u) : (t.width *= u / t.height, t.height = u) : t.width > u ? (t.height *= u / t.width, t.width = u) : (t.width *= u / t.height, t.height = u));
53
+ }
54
+ function z(t, e = {}) {
55
+ return t.toBlob ? new Promise((r) => {
56
+ t.toBlob(r, e.type ? e.type : "image/png", e.quality ? e.quality : 1);
57
+ }) : new Promise((r) => {
58
+ const n = window.atob(t.toDataURL(e.type ? e.type : void 0, e.quality ? e.quality : void 0).split(",")[1]), s = n.length, i = new Uint8Array(s);
59
+ for (let c = 0; c < s; c += 1)
60
+ i[c] = n.charCodeAt(c);
61
+ r(new Blob([i], {
62
+ type: e.type ? e.type : "image/png"
63
+ }));
64
+ });
65
+ }
66
+ function y(t) {
67
+ return new Promise((e, r) => {
68
+ const n = new Image();
69
+ n.onload = () => {
70
+ n.decode().then(() => {
71
+ requestAnimationFrame(() => e(n));
72
+ });
73
+ }, n.onerror = r, n.crossOrigin = "anonymous", n.decoding = "async", n.src = t;
74
+ });
75
+ }
76
+ async function G(t) {
77
+ return Promise.resolve().then(() => new XMLSerializer().serializeToString(t)).then(encodeURIComponent).then((e) => `data:image/svg+xml;charset=utf-8,${e}`);
78
+ }
79
+ async function X(t, e, r) {
80
+ const n = "http://www.w3.org/2000/svg", s = document.createElementNS(n, "svg"), i = document.createElementNS(n, "foreignObject");
81
+ return s.setAttribute("width", `${e}`), s.setAttribute("height", `${r}`), s.setAttribute("viewBox", `0 0 ${e} ${r}`), i.setAttribute("width", "100%"), i.setAttribute("height", "100%"), i.setAttribute("x", "0"), i.setAttribute("y", "0"), i.setAttribute("externalResourcesRequired", "true"), s.appendChild(i), i.appendChild(t), G(s);
82
+ }
83
+ const l = (t, e) => {
84
+ if (t instanceof e)
85
+ return !0;
86
+ const r = Object.getPrototypeOf(t);
87
+ return r === null ? !1 : r.constructor.name === e.name || l(r, e);
88
+ };
89
+ function K(t) {
90
+ const e = t.getPropertyValue("content");
91
+ return `${t.cssText} content: '${e.replace(/'|"/g, "")}';`;
92
+ }
93
+ function J(t) {
94
+ return h(t).map((e) => {
95
+ const r = t.getPropertyValue(e), n = t.getPropertyPriority(e);
96
+ return `${e}: ${r}${n ? " !important" : ""};`;
97
+ }).join(" ");
98
+ }
99
+ function Q(t, e, r) {
100
+ const n = `.${t}:${e}`, s = r.cssText ? K(r) : J(r);
101
+ return document.createTextNode(`${n}{${s}}`);
102
+ }
103
+ function R(t, e, r) {
104
+ const n = window.getComputedStyle(t, r), s = n.getPropertyValue("content");
105
+ if (s === "" || s === "none")
106
+ return;
107
+ const i = _();
108
+ try {
109
+ e.className = `${e.className} ${i}`;
110
+ } catch {
111
+ return;
112
+ }
113
+ const c = document.createElement("style");
114
+ c.appendChild(Q(i, r, n)), e.appendChild(c);
115
+ }
116
+ function Y(t, e) {
117
+ R(t, e, ":before"), R(t, e, ":after");
118
+ }
119
+ const C = "application/font-woff", P = "image/jpeg", Z = {
120
+ woff: C,
121
+ woff2: C,
122
+ ttf: "application/font-truetype",
123
+ eot: "application/vnd.ms-fontobject",
124
+ png: "image/png",
125
+ jpg: P,
126
+ jpeg: P,
127
+ gif: "image/gif",
128
+ tiff: "image/tiff",
129
+ svg: "image/svg+xml",
130
+ webp: "image/webp"
131
+ };
132
+ function N(t) {
133
+ const e = /\.([^./]*?)$/g.exec(t);
134
+ return e ? e[1] : "";
135
+ }
136
+ function E(t) {
137
+ const e = N(t).toLowerCase();
138
+ return Z[e] || "";
139
+ }
140
+ function tt(t) {
141
+ return t.split(/,/)[1];
142
+ }
143
+ function S(t) {
144
+ return t.search(/^(data:)/) !== -1;
145
+ }
146
+ function et(t, e) {
147
+ return `data:${e};base64,${t}`;
148
+ }
149
+ async function I(t, e, r) {
150
+ const n = await fetch(t, e);
151
+ if (n.status === 404)
152
+ throw new Error(`Resource "${n.url}" not found`);
153
+ const s = await n.blob();
154
+ return new Promise((i, c) => {
155
+ const a = new FileReader();
156
+ a.onerror = c, a.onloadend = () => {
157
+ try {
158
+ i(r({ res: n, result: a.result }));
159
+ } catch (o) {
160
+ c(o);
161
+ }
162
+ }, a.readAsDataURL(s);
163
+ });
164
+ }
165
+ const b = {};
166
+ function nt(t, e, r) {
167
+ let n = t.replace(/\?.*/, "");
168
+ return r && (n = t), /ttf|otf|eot|woff2?/i.test(n) && (n = n.replace(/.*\//, "")), e ? `[${e}]${n}` : n;
169
+ }
170
+ async function x(t, e, r) {
171
+ const n = nt(t, e, r.includeQueryParams);
172
+ if (b[n] != null)
173
+ return b[n];
174
+ r.cacheBust && (t += (/\?/.test(t) ? "&" : "?") + (/* @__PURE__ */ new Date()).getTime());
175
+ let s;
176
+ try {
177
+ const i = await I(t, r.fetchRequestInit, ({ res: c, result: a }) => (e || (e = c.headers.get("Content-Type") || ""), tt(a)));
178
+ s = et(i, e);
179
+ } catch (i) {
180
+ s = r.imagePlaceholder || "";
181
+ let c = `Failed to fetch resource: ${t}`;
182
+ i && (c = typeof i == "string" ? i : i.message), c && console.warn(c);
183
+ }
184
+ return b[n] = s, s;
185
+ }
186
+ async function rt(t) {
187
+ const e = t.toDataURL();
188
+ return e === "data:," ? t.cloneNode(!1) : y(e);
189
+ }
190
+ async function it(t, e) {
191
+ if (t.currentSrc) {
192
+ const i = document.createElement("canvas"), c = i.getContext("2d");
193
+ i.width = t.clientWidth, i.height = t.clientHeight, c?.drawImage(t, 0, 0, i.width, i.height);
194
+ const a = i.toDataURL();
195
+ return y(a);
196
+ }
197
+ const r = t.poster, n = E(r), s = await x(r, n, e);
198
+ return y(s);
199
+ }
200
+ async function st(t) {
201
+ var e;
202
+ try {
203
+ if (!((e = t?.contentDocument) === null || e === void 0) && e.body)
204
+ return await w(t.contentDocument.body, {}, !0);
205
+ } catch {
206
+ }
207
+ return t.cloneNode(!1);
208
+ }
209
+ async function ct(t, e) {
210
+ return l(t, HTMLCanvasElement) ? rt(t) : l(t, HTMLVideoElement) ? it(t, e) : l(t, HTMLIFrameElement) ? st(t) : t.cloneNode(D(t));
211
+ }
212
+ const at = (t) => t.tagName != null && t.tagName.toUpperCase() === "SLOT", D = (t) => t.tagName != null && t.tagName.toUpperCase() === "SVG";
213
+ async function ot(t, e, r) {
214
+ var n, s;
215
+ if (D(e))
216
+ return e;
217
+ let i = [];
218
+ return at(t) && t.assignedNodes ? i = h(t.assignedNodes()) : l(t, HTMLIFrameElement) && (!((n = t.contentDocument) === null || n === void 0) && n.body) ? i = h(t.contentDocument.body.childNodes) : i = h(((s = t.shadowRoot) !== null && s !== void 0 ? s : t).childNodes), i.length === 0 || l(t, HTMLVideoElement) || await i.reduce((c, a) => c.then(() => w(a, r)).then((o) => {
219
+ o && e.appendChild(o);
220
+ }), Promise.resolve()), e;
221
+ }
222
+ function lt(t, e) {
223
+ const r = e.style;
224
+ if (!r)
225
+ return;
226
+ const n = window.getComputedStyle(t);
227
+ n.cssText ? (r.cssText = n.cssText, r.transformOrigin = n.transformOrigin) : h(n).forEach((s) => {
228
+ let i = n.getPropertyValue(s);
229
+ s === "font-size" && i.endsWith("px") && (i = `${Math.floor(parseFloat(i.substring(0, i.length - 2))) - 0.1}px`), l(t, HTMLIFrameElement) && s === "display" && i === "inline" && (i = "block"), s === "d" && e.getAttribute("d") && (i = `path(${e.getAttribute("d")})`), r.setProperty(s, i, n.getPropertyPriority(s));
230
+ });
231
+ }
232
+ function ut(t, e) {
233
+ l(t, HTMLTextAreaElement) && (e.innerHTML = t.value), l(t, HTMLInputElement) && e.setAttribute("value", t.value);
234
+ }
235
+ function ft(t, e) {
236
+ if (l(t, HTMLSelectElement)) {
237
+ const r = e, n = Array.from(r.children).find((s) => t.value === s.getAttribute("value"));
238
+ n && n.setAttribute("selected", "");
239
+ }
240
+ }
241
+ function ht(t, e) {
242
+ return l(e, Element) && (lt(t, e), Y(t, e), ut(t, e), ft(t, e)), e;
243
+ }
244
+ async function mt(t, e) {
245
+ const r = t.querySelectorAll ? t.querySelectorAll("use") : [];
246
+ if (r.length === 0)
247
+ return t;
248
+ const n = {};
249
+ for (let i = 0; i < r.length; i++) {
250
+ const a = r[i].getAttribute("xlink:href");
251
+ if (a) {
252
+ const o = t.querySelector(a), f = document.querySelector(a);
253
+ !o && f && !n[a] && (n[a] = await w(f, e, !0));
254
+ }
255
+ }
256
+ const s = Object.values(n);
257
+ if (s.length) {
258
+ const i = "http://www.w3.org/1999/xhtml", c = document.createElementNS(i, "svg");
259
+ c.setAttribute("xmlns", i), c.style.position = "absolute", c.style.width = "0", c.style.height = "0", c.style.overflow = "hidden", c.style.display = "none";
260
+ const a = document.createElementNS(i, "defs");
261
+ c.appendChild(a);
262
+ for (let o = 0; o < s.length; o++)
263
+ a.appendChild(s[o]);
264
+ t.appendChild(c);
265
+ }
266
+ return t;
267
+ }
268
+ async function w(t, e, r) {
269
+ return !r && e.filter && !e.filter(t) ? null : Promise.resolve(t).then((n) => ct(n, e)).then((n) => ot(t, n, e)).then((n) => ht(t, n)).then((n) => mt(n, e));
270
+ }
271
+ const U = /url\((['"]?)([^'"]+?)\1\)/g, gt = /url\([^)]+\)\s*format\((["']?)([^"']+)\1\)/g, dt = /src:\s*(?:url\([^)]+\)\s*format\([^)]+\)[,;]\s*)+/g;
272
+ function yt(t) {
273
+ const e = t.replace(/([.*+?^${}()|\[\]\/\\])/g, "\\$1");
274
+ return new RegExp(`(url\\(['"]?)(${e})(['"]?\\))`, "g");
275
+ }
276
+ function wt(t) {
277
+ const e = [];
278
+ return t.replace(U, (r, n, s) => (e.push(s), r)), e.filter((r) => !S(r));
279
+ }
280
+ async function pt(t, e, r, n, s) {
281
+ try {
282
+ const i = r ? O(e, r) : e, c = E(e);
283
+ let a;
284
+ return s || (a = await x(i, c, n)), t.replace(yt(e), `$1${a}$3`);
285
+ } catch {
286
+ }
287
+ return t;
288
+ }
289
+ function bt(t, { preferredFontFormat: e }) {
290
+ return e ? t.replace(dt, (r) => {
291
+ for (; ; ) {
292
+ const [n, , s] = gt.exec(r) || [];
293
+ if (!s)
294
+ return "";
295
+ if (s === e)
296
+ return `src: ${n};`;
297
+ }
298
+ }) : t;
299
+ }
300
+ function v(t) {
301
+ return t.search(U) !== -1;
302
+ }
303
+ async function H(t, e, r) {
304
+ if (!v(t))
305
+ return t;
306
+ const n = bt(t, r);
307
+ return wt(n).reduce((i, c) => i.then((a) => pt(a, c, e, r)), Promise.resolve(n));
308
+ }
309
+ async function g(t, e, r) {
310
+ var n;
311
+ const s = (n = e.style) === null || n === void 0 ? void 0 : n.getPropertyValue(t);
312
+ if (s) {
313
+ const i = await H(s, null, r);
314
+ return e.style.setProperty(t, i, e.style.getPropertyPriority(t)), !0;
315
+ }
316
+ return !1;
317
+ }
318
+ async function St(t, e) {
319
+ await g("background", t, e) || await g("background-image", t, e), await g("mask", t, e) || await g("mask-image", t, e);
320
+ }
321
+ async function Et(t, e) {
322
+ const r = l(t, HTMLImageElement);
323
+ if (!(r && !S(t.src)) && !(l(t, SVGImageElement) && !S(t.href.baseVal)))
324
+ return;
325
+ const n = r ? t.src : t.href.baseVal, s = await x(n, E(n), e);
326
+ await new Promise((i, c) => {
327
+ t.onload = i, t.onerror = e.onImageErrorHandler ? (...o) => {
328
+ try {
329
+ i(e.onImageErrorHandler(...o));
330
+ } catch (f) {
331
+ c(f);
332
+ }
333
+ } : c;
334
+ const a = t;
335
+ a.decode && (a.decode = i), a.loading === "lazy" && (a.loading = "eager"), r ? (t.srcset = "", t.src = s) : t.href.baseVal = s;
336
+ });
337
+ }
338
+ async function xt(t, e) {
339
+ const n = h(t.childNodes).map((s) => V(s, e));
340
+ await Promise.all(n).then(() => t);
341
+ }
342
+ async function V(t, e) {
343
+ l(t, Element) && (await St(t, e), await Et(t, e), await xt(t, e));
344
+ }
345
+ function Rt(t, e) {
346
+ const { style: r } = t;
347
+ e.backgroundColor && (r.backgroundColor = e.backgroundColor), e.width && (r.width = `${e.width}px`), e.height && (r.height = `${e.height}px`);
348
+ const n = e.style;
349
+ return n != null && Object.keys(n).forEach((s) => {
350
+ r[s] = n[s];
351
+ }), t;
352
+ }
353
+ const $ = {};
354
+ async function T(t) {
355
+ let e = $[t];
356
+ if (e != null)
357
+ return e;
358
+ const n = await (await fetch(t)).text();
359
+ return e = { url: t, cssText: n }, $[t] = e, e;
360
+ }
361
+ async function F(t, e) {
362
+ let r = t.cssText;
363
+ const n = /url\(["']?([^"')]+)["']?\)/g, i = (r.match(/url\([^)]+\)/g) || []).map(async (c) => {
364
+ let a = c.replace(n, "$1");
365
+ return a.startsWith("https://") || (a = new URL(a, t.url).href), I(a, e.fetchRequestInit, ({ result: o }) => (r = r.replace(c, `url(${o})`), [c, o]));
366
+ });
367
+ return Promise.all(i).then(() => r);
368
+ }
369
+ function L(t) {
370
+ if (t == null)
371
+ return [];
372
+ const e = [], r = /(\/\*[\s\S]*?\*\/)/gi;
373
+ let n = t.replace(r, "");
374
+ const s = new RegExp("((@.*?keyframes [\\s\\S]*?){([\\s\\S]*?}\\s*?)})", "gi");
375
+ for (; ; ) {
376
+ const o = s.exec(n);
377
+ if (o === null)
378
+ break;
379
+ e.push(o[0]);
380
+ }
381
+ n = n.replace(s, "");
382
+ const i = /@import[\s\S]*?url\([^)]*\)[\s\S]*?;/gi, c = "((\\s*?(?:\\/\\*[\\s\\S]*?\\*\\/)?\\s*?@media[\\s\\S]*?){([\\s\\S]*?)}\\s*?})|(([\\s\\S]*?){([\\s\\S]*?)})", a = new RegExp(c, "gi");
383
+ for (; ; ) {
384
+ let o = i.exec(n);
385
+ if (o === null) {
386
+ if (o = a.exec(n), o === null)
387
+ break;
388
+ i.lastIndex = a.lastIndex;
389
+ } else
390
+ a.lastIndex = i.lastIndex;
391
+ e.push(o[0]);
392
+ }
393
+ return e;
394
+ }
395
+ async function Ct(t, e) {
396
+ const r = [], n = [];
397
+ return t.forEach((s) => {
398
+ if ("cssRules" in s)
399
+ try {
400
+ h(s.cssRules || []).forEach((i, c) => {
401
+ if (i.type === CSSRule.IMPORT_RULE) {
402
+ let a = c + 1;
403
+ const o = i.href, f = T(o).then((m) => F(m, e)).then((m) => L(m).forEach((p) => {
404
+ try {
405
+ s.insertRule(p, p.startsWith("@import") ? a += 1 : s.cssRules.length);
406
+ } catch (M) {
407
+ console.error("Error inserting rule from remote css", {
408
+ rule: p,
409
+ error: M
410
+ });
411
+ }
412
+ })).catch((m) => {
413
+ console.error("Error loading remote css", m.toString());
414
+ });
415
+ n.push(f);
416
+ }
417
+ });
418
+ } catch (i) {
419
+ const c = t.find((a) => a.href == null) || document.styleSheets[0];
420
+ s.href != null && n.push(T(s.href).then((a) => F(a, e)).then((a) => L(a).forEach((o) => {
421
+ c.insertRule(o, s.cssRules.length);
422
+ })).catch((a) => {
423
+ console.error("Error loading remote stylesheet", a);
424
+ })), console.error("Error inlining remote css file", i);
425
+ }
426
+ }), Promise.all(n).then(() => (t.forEach((s) => {
427
+ if ("cssRules" in s)
428
+ try {
429
+ h(s.cssRules || []).forEach((i) => {
430
+ r.push(i);
431
+ });
432
+ } catch (i) {
433
+ console.error(`Error while reading CSS rules from ${s.href}`, i);
434
+ }
435
+ }), r));
436
+ }
437
+ function Pt(t) {
438
+ return t.filter((e) => e.type === CSSRule.FONT_FACE_RULE).filter((e) => v(e.style.getPropertyValue("src")));
439
+ }
440
+ async function $t(t, e) {
441
+ if (t.ownerDocument == null)
442
+ throw new Error("Provided element is not within a Document");
443
+ const r = h(t.ownerDocument.styleSheets), n = await Ct(r, e);
444
+ return Pt(n);
445
+ }
446
+ function k(t) {
447
+ return t.trim().replace(/["']/g, "");
448
+ }
449
+ function Tt(t) {
450
+ const e = /* @__PURE__ */ new Set();
451
+ function r(n) {
452
+ (n.style.fontFamily || getComputedStyle(n).fontFamily).split(",").forEach((i) => {
453
+ e.add(k(i));
454
+ }), Array.from(n.children).forEach((i) => {
455
+ i instanceof HTMLElement && r(i);
456
+ });
457
+ }
458
+ return r(t), e;
459
+ }
460
+ async function Ft(t, e) {
461
+ const r = await $t(t, e), n = Tt(t);
462
+ return (await Promise.all(r.filter((i) => n.has(k(i.style.fontFamily))).map((i) => {
463
+ const c = i.parentStyleSheet ? i.parentStyleSheet.href : null;
464
+ return H(i.cssText, c, e);
465
+ }))).join(`
466
+ `);
467
+ }
468
+ async function Lt(t, e) {
469
+ const r = e.fontEmbedCSS != null ? e.fontEmbedCSS : e.skipFonts ? null : await Ft(t, e);
470
+ if (r) {
471
+ const n = document.createElement("style"), s = document.createTextNode(r);
472
+ n.appendChild(s), t.firstChild ? t.insertBefore(n, t.firstChild) : t.appendChild(n);
473
+ }
474
+ }
475
+ async function At(t, e = {}) {
476
+ const { width: r, height: n } = A(t, e), s = await w(t, e, !0);
477
+ return await Lt(s, e), await V(s, e), Rt(s, e), await X(s, r, n);
478
+ }
479
+ async function It(t, e = {}) {
480
+ const { width: r, height: n } = A(t, e), s = await At(t, e), i = await y(s), c = document.createElement("canvas"), a = c.getContext("2d"), o = e.pixelRatio || B(), f = e.canvasWidth || r, m = e.canvasHeight || n;
481
+ return c.width = f * o, c.height = m * o, e.skipAutoScale || j(c), c.style.width = `${f}`, c.style.height = `${m}`, e.backgroundColor && (a.fillStyle = e.backgroundColor, a.fillRect(0, 0, c.width, c.height)), a.drawImage(i, 0, 0, c.width, c.height), c;
482
+ }
483
+ async function Dt(t, e = {}) {
484
+ const r = await It(t, e);
485
+ return await z(r);
486
+ }
487
+ export {
488
+ Dt as toBlob,
489
+ It as toCanvas,
490
+ At as toSvg
491
+ };