@phtngyn/cms 0.1.0-beta.0 → 0.1.0-beta.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (123) hide show
  1. package/README.md +72 -1
  2. package/package.json +5 -5
  3. package/src/Authoring.d.ts +13 -1
  4. package/src/{AuthoringSchema-BQ5kbhVB.js → Configuration-DyKo0sLS.js} +595 -367
  5. package/src/Configuration-DyKo0sLS.js.map +1 -0
  6. package/src/{DocumentEngine-Da0kWotL.js → DocumentEngine-DYObwMDY.js} +44 -66
  7. package/src/DocumentEngine-DYObwMDY.js.map +1 -0
  8. package/src/DocumentModel.d.ts +4 -0
  9. package/src/DocumentModel.js.map +1 -1
  10. package/src/{HttpPaths-86qLGB90.js → HttpPaths-BbS21Jy8.js} +4 -2
  11. package/src/{HttpPaths-86qLGB90.js.map → HttpPaths-BbS21Jy8.js.map} +1 -1
  12. package/src/Module.js +27 -76
  13. package/src/Module.js.map +1 -1
  14. package/src/{StudioHttp-BTLLooh0.js → StudioHttp-jR2-bc01.js} +44 -242
  15. package/src/StudioHttp-jR2-bc01.js.map +1 -0
  16. package/src/{connection-ZGtL54qY.js → connection-CBTY-TzB.js} +3 -3
  17. package/src/{connection-ZGtL54qY.js.map → connection-CBTY-TzB.js.map} +1 -1
  18. package/src/{installation-BNKaVjni.js → installation-DeuBiFRE.js} +488 -236
  19. package/src/installation-DeuBiFRE.js.map +1 -0
  20. package/src/internal/authoring-catalog.js +147 -0
  21. package/src/internal/authoring-catalog.js.map +1 -0
  22. package/src/internal/authoring-compiler.js +2 -1
  23. package/src/internal/authoring-compiler.js.map +1 -1
  24. package/src/internal/authoring-metadata.js +67 -48
  25. package/src/internal/authoring-metadata.js.map +1 -1
  26. package/src/internal/configuration.js +5 -6
  27. package/src/internal/configuration.js.map +1 -1
  28. package/src/internal/document-model.js +3 -2
  29. package/src/internal/document-model.js.map +1 -1
  30. package/src/internal/studio-app.js +66 -0
  31. package/src/internal/studio-app.js.map +1 -0
  32. package/src/location-DtYv2aes.js +36 -0
  33. package/src/location-DtYv2aes.js.map +1 -0
  34. package/src/{metadata-Czvi3E4K.js → metadata-DE1Mc2td.js} +2 -2
  35. package/src/{metadata-Czvi3E4K.js.map → metadata-DE1Mc2td.js.map} +1 -1
  36. package/src/{models-Citx8jBi.js → models-BkMgeaOL.js} +252 -3
  37. package/src/models-BkMgeaOL.js.map +1 -0
  38. package/src/{models-DS5ClMsH.js → models-C3witQBK.js} +8 -31
  39. package/src/models-C3witQBK.js.map +1 -0
  40. package/src/runtime/blocks.js +17 -0
  41. package/src/runtime/blocks.js.map +1 -0
  42. package/src/runtime/collaboration.js +9 -4
  43. package/src/runtime/collaboration.js.map +1 -1
  44. package/src/runtime/delivery/DocumentRenderer.js +6 -3
  45. package/src/runtime/delivery/DocumentRenderer.js.map +1 -1
  46. package/src/runtime/delivery/blocks.js +6 -0
  47. package/src/runtime/delivery/blocks.js.map +1 -0
  48. package/src/runtime/delivery/context.js +12 -0
  49. package/src/runtime/delivery/context.js.map +1 -0
  50. package/src/runtime/delivery/document-page.js +5 -3
  51. package/src/runtime/delivery/document-page.js.map +1 -1
  52. package/src/runtime/delivery/document.js +18 -2
  53. package/src/runtime/delivery/document.js.map +1 -1
  54. package/src/runtime/delivery/error.js +11 -0
  55. package/src/runtime/delivery/error.js.map +1 -0
  56. package/src/runtime/delivery/plugin.js +21 -0
  57. package/src/runtime/delivery/plugin.js.map +1 -0
  58. package/src/runtime/delivery/useDocument.js +6 -3
  59. package/src/runtime/delivery/useDocument.js.map +1 -1
  60. package/src/runtime/delivery/useDocumentQuery.js +6 -3
  61. package/src/runtime/delivery/useDocumentQuery.js.map +1 -1
  62. package/src/runtime/installation.js +1 -1
  63. package/src/runtime/plugin.js +3 -3
  64. package/src/runtime/plugin.js.map +1 -1
  65. package/src/runtime/preview/connection.js +1 -1
  66. package/src/runtime/preview/controller.js +29 -10
  67. package/src/runtime/preview/controller.js.map +1 -1
  68. package/src/runtime/preview/overlay.js +65 -0
  69. package/src/runtime/preview/overlay.js.map +1 -0
  70. package/src/runtime/preview/plugin.client.js +21 -34
  71. package/src/runtime/preview/plugin.client.js.map +1 -1
  72. package/src/runtime/preview/preview.css +72 -4
  73. package/src/runtime/preview/store.js +1 -1
  74. package/src/runtime/studio-app.js +5 -1
  75. package/src/runtime/studio-app.js.map +1 -1
  76. package/src/runtime/studio-entry.js +36 -0
  77. package/src/runtime/studio-entry.js.map +1 -0
  78. package/src/runtime/studio-navigation.js +11 -0
  79. package/src/runtime/studio-navigation.js.map +1 -0
  80. package/src/{store-Nl4uxEXx.js → store-CfFFx9Ua.js} +3 -3
  81. package/src/{store-Nl4uxEXx.js.map → store-CfFFx9Ua.js.map} +1 -1
  82. package/studio/CreateDocumentDialog--L9lTfx6.js +256 -0
  83. package/studio/collaboration-DUuu678R.js +4565 -0
  84. package/studio/documentPlanning-BXX04Woe.js +28989 -0
  85. package/studio/dom-to-image-more.min-D6jGGdrW.js +877 -0
  86. package/studio/editor-PexnXkJY.js +30817 -0
  87. package/studio/host.css +3 -0
  88. package/studio/host.js +44179 -0
  89. package/studio/rolldown-runtime-B0aSnxlc.js +20 -0
  90. package/dist/studio/assets/ActivityEntryRow-D--fRvWI.js +0 -1
  91. package/dist/studio/assets/ActivityView-D-XBBUHb.js +0 -1
  92. package/dist/studio/assets/CreateDocumentDialog-CH8UH1QM.js +0 -1
  93. package/dist/studio/assets/DocumentsView-CxRpmAxt.js +0 -34
  94. package/dist/studio/assets/DropdownMenu-BSb1l7fr.js +0 -1
  95. package/dist/studio/assets/Input-DVao38h7.js +0 -3
  96. package/dist/studio/assets/MediaView-BHrPIjxB.js +0 -1
  97. package/dist/studio/assets/Modal-VNrXGa5C.js +0 -1
  98. package/dist/studio/assets/OverviewView-DfP6-mLZ.js +0 -1
  99. package/dist/studio/assets/Select-BJZIs9sY.js +0 -1
  100. package/dist/studio/assets/SettingsView-CerHe-ua.js +0 -1
  101. package/dist/studio/assets/Skeleton-CWJNi3nS.js +0 -1
  102. package/dist/studio/assets/StudioPageHeader-DP9HDAF2.js +0 -1
  103. package/dist/studio/assets/UsersView-cP3REkH2.js +0 -1
  104. package/dist/studio/assets/collaboration-BLnCzfvV.js +0 -4
  105. package/dist/studio/assets/context-dY4fNbn3.js +0 -1
  106. package/dist/studio/assets/editor-CE07wW83.js +0 -137
  107. package/dist/studio/assets/gateway-BAyQgCse.js +0 -10
  108. package/dist/studio/assets/index-CjoaPLhZ.js +0 -28
  109. package/dist/studio/assets/index-s2rPqCmP.css +0 -2
  110. package/dist/studio/assets/render-BkxbK2St.js +0 -83
  111. package/dist/studio/assets/rolldown-runtime-DK3Fl9T5.js +0 -1
  112. package/dist/studio/assets/useMediaLibrary-D7qR7aBf.js +0 -1
  113. package/dist/studio/index.html +0 -76
  114. package/src/AuthoringSchema-BQ5kbhVB.js.map +0 -1
  115. package/src/Configuration-BGYFD2N1.js +0 -150
  116. package/src/Configuration-BGYFD2N1.js.map +0 -1
  117. package/src/DocumentEngine-Da0kWotL.js.map +0 -1
  118. package/src/StudioHttp-BTLLooh0.js.map +0 -1
  119. package/src/installation-BNKaVjni.js.map +0 -1
  120. package/src/internal/component-metadata.js +0 -37
  121. package/src/internal/component-metadata.js.map +0 -1
  122. package/src/models-Citx8jBi.js.map +0 -1
  123. package/src/models-DS5ClMsH.js.map +0 -1
@@ -0,0 +1,877 @@
1
+ import { t as e } from "./rolldown-runtime-B0aSnxlc.js";
2
+ //#region ../../node_modules/.pnpm/dom-to-image-more@3.10.2/node_modules/dom-to-image-more/dist/dom-to-image-more.min.js
3
+ var t = /* @__PURE__ */ e(((e, t) => {
4
+ ((n) => {
5
+ let r = (() => {
6
+ let e = 0;
7
+ return {
8
+ escape: function(e) {
9
+ return e.replace(/([.*+?^${}()|[\]/\\])/g, "\\$1");
10
+ },
11
+ isDataUrl: function(e) {
12
+ return e.search(/^(data:)/) !== -1;
13
+ },
14
+ canvasToBlob: function(e) {
15
+ return e.toBlob ? new Promise(function(t) {
16
+ e.toBlob(t);
17
+ }) : (t = e, new Promise(function(e) {
18
+ var n = b(t.toDataURL().split(",")[1]), r = n.length, i = new Uint8Array(r);
19
+ for (let e = 0; e < r; e++) i[e] = n.charCodeAt(e);
20
+ e(new Blob([i], { type: "image/png" }));
21
+ }));
22
+ var t;
23
+ },
24
+ resolveUrl: function(e, t) {
25
+ var n = document.implementation.createHTMLDocument(), r = n.createElement("base"), i = (n.head.appendChild(r), n.createElement("a"));
26
+ return Object.assign(i.style, l), n.body.appendChild(i), r.href = t, i.href = e, i.href;
27
+ },
28
+ getAndEncode: function(e, t) {
29
+ return p(e, t, !0).then(c);
30
+ },
31
+ getResourceText: function(e, t, n) {
32
+ return p(e, t, n).then(d);
33
+ },
34
+ uid: function() {
35
+ return "u" + ("0000" + (Math.random() * 36 ** 4 << 0).toString(36)).slice(-4) + e++;
36
+ },
37
+ asArray: function(e) {
38
+ return Array.from(e);
39
+ },
40
+ escapeXhtml: function(e) {
41
+ return e.replace(/%/g, "%25").replace(/#/g, "%23").replace(/\n/g, "%0A");
42
+ },
43
+ makeImage: function(e) {
44
+ return e === "data:," ? Promise.resolve() : new Promise(function(t, n) {
45
+ let r = document.createElementNS(u, "svg"), i = new Image();
46
+ g.impl.options.useCredentials && (i.crossOrigin = "use-credentials"), i.onload = function() {
47
+ function e() {
48
+ window && window.requestAnimationFrame ? window.requestAnimationFrame(function() {
49
+ t(i);
50
+ }) : t(i);
51
+ }
52
+ r.remove(), typeof i.decode == "function" ? i.decode().then(e, e) : e();
53
+ }, i.onerror = (t) => {
54
+ r.remove();
55
+ var i = String(e).split(",", 1)[0], i = /* @__PURE__ */ Error("dom-to-image-more: failed to rasterize the generated image (" + i + ", " + String(e).length + " bytes). The source may contain malformed markup, an unsupported element, or a tainted/cross-origin resource.");
56
+ i.cause = t, n(i);
57
+ }, r.appendChild(i), Object.assign(r.style, l), i.src = e, document.body.appendChild(r);
58
+ });
59
+ },
60
+ width: function(e) {
61
+ var t, n, r = _(e, "width");
62
+ return isNaN(r) ? (t = m(e)) ? t.width : (t = _(e, "border-left-width"), n = _(e, "border-right-width"), e.scrollWidth + t + n) : r;
63
+ },
64
+ height: function(e) {
65
+ var t, n, r = _(e, "height");
66
+ return isNaN(r) ? (t = m(e)) ? t.height : (t = _(e, "border-top-width"), n = _(e, "border-bottom-width"), e.scrollHeight + t + n) : r;
67
+ },
68
+ getWindow: t,
69
+ isElement: s,
70
+ isElementHostForOpenShadowRoot: function(e) {
71
+ return s(e) && e.shadowRoot !== null;
72
+ },
73
+ isShadowRoot: a,
74
+ isInShadowRoot: o,
75
+ isHTMLElement: function(e) {
76
+ return r(e, "HTMLElement");
77
+ },
78
+ isHTMLCanvasElement: function(e) {
79
+ return r(e, "HTMLCanvasElement");
80
+ },
81
+ isHTMLInputElement: function(e) {
82
+ return r(e, "HTMLInputElement");
83
+ },
84
+ isHTMLImageElement: function(e) {
85
+ return r(e, "HTMLImageElement");
86
+ },
87
+ isHTMLLinkElement: function(e) {
88
+ return r(e, "HTMLLinkElement");
89
+ },
90
+ isHTMLScriptElement: function(e) {
91
+ return r(e, "HTMLScriptElement");
92
+ },
93
+ isHTMLStyleElement: function(e) {
94
+ return r(e, "HTMLStyleElement");
95
+ },
96
+ isHTMLTextAreaElement: function(e) {
97
+ return r(e, "HTMLTextAreaElement");
98
+ },
99
+ isShadowSlotElement: function(e) {
100
+ return o(e) && r(e, "HTMLSlotElement");
101
+ },
102
+ isSVGElement: function(e) {
103
+ return r(e, "SVGElement");
104
+ },
105
+ isSVGImageElement: function(e) {
106
+ return r(e, "SVGImageElement");
107
+ },
108
+ isSVGSVGElement: function(e) {
109
+ return r(e, "SVGSVGElement");
110
+ },
111
+ isSVGRectElement: function(e) {
112
+ return r(e, "SVGRectElement");
113
+ },
114
+ isSVGUseElement: function(e) {
115
+ return r(e, "SVGUseElement");
116
+ },
117
+ isDimensionMissing: function(e) {
118
+ return isNaN(e) || e <= 0;
119
+ },
120
+ isInstanceOf: r
121
+ };
122
+ function t(e) {
123
+ return e = e ? e.ownerDocument : void 0, (e ? e.defaultView : void 0) || (typeof window < "u" ? window : void 0) || (n === void 0 ? void 0 : n) || globalThis;
124
+ }
125
+ function r(e, n) {
126
+ var r = t(e);
127
+ return i(e, r, n) || i(e, r && r.parent, n);
128
+ }
129
+ function i(e, t, n) {
130
+ try {
131
+ var r = t && t[n];
132
+ return typeof r == "function" && e instanceof r;
133
+ } catch {
134
+ return !1;
135
+ }
136
+ }
137
+ function a(e) {
138
+ return r(e, "ShadowRoot");
139
+ }
140
+ function o(e) {
141
+ return e != null && e.getRootNode !== void 0 && a(e.getRootNode());
142
+ }
143
+ function s(e) {
144
+ return r(e, "Element");
145
+ }
146
+ function c(e) {
147
+ return e == null || e === "" ? "" : typeof e == "string" ? e : f(e, "readAsDataURL", "");
148
+ }
149
+ function d(e) {
150
+ if (e == null || e === "") return null;
151
+ if (typeof e != "string") return f(e, "readAsText", null);
152
+ {
153
+ var t = e.indexOf(",");
154
+ if (t === -1) return "";
155
+ var n = e.slice(0, t), e = e.slice(t + 1);
156
+ if (!/;base64/i.test(n)) return decodeURIComponent(e);
157
+ let r = b(e), i = "";
158
+ for (let e = 0; e < r.length; e += 1) i += "%" + ("00" + r.charCodeAt(e).toString(16)).slice(-2);
159
+ return decodeURIComponent(i);
160
+ }
161
+ }
162
+ function f(e, t, n) {
163
+ return new Promise(function(r) {
164
+ let i = new FileReader();
165
+ i.onloadend = function() {
166
+ r(i.result);
167
+ }, i.onerror = function() {
168
+ r(n);
169
+ };
170
+ try {
171
+ i[t](e);
172
+ } catch {
173
+ r(n);
174
+ }
175
+ });
176
+ }
177
+ function p(e, t, n) {
178
+ let r = g.impl.urlCache.find(function(t) {
179
+ return t.url === e;
180
+ });
181
+ if (r || (r = {
182
+ url: e,
183
+ promise: null
184
+ }, g.impl.urlCache.push(r)), r.promise === null) {
185
+ let i = function(n) {
186
+ var r = g.impl.options.requestInterceptor;
187
+ if (typeof r == "function") try {
188
+ return r(e, {
189
+ type: t,
190
+ status: n
191
+ });
192
+ } catch (e) {
193
+ C("requestInterceptor threw:", e);
194
+ }
195
+ }, a = function(e) {
196
+ return e != null;
197
+ }, o = i(void 0);
198
+ if (a(o)) return r.promise = Promise.resolve(o), r.promise;
199
+ if (!1 === n) return r.promise = Promise.resolve(null), r.promise;
200
+ g.impl.options.cacheBust && (e += (/\?/.test(e) ? "&" : "?") + (/* @__PURE__ */ new Date()).getTime()), r.promise = new Promise(function(n) {
201
+ let r = new XMLHttpRequest();
202
+ function o(e) {
203
+ l(e, !1), n(null);
204
+ }
205
+ function s() {
206
+ c("Status:" + r.status + " while fetching resource: " + e);
207
+ }
208
+ function c(e) {
209
+ var s = i(r.status);
210
+ a(s) ? Promise.resolve(s).then(function(t) {
211
+ l(e, !0), n(t);
212
+ }, function() {
213
+ C(e), o(e);
214
+ }) : (s = t === h.IMAGE || t === h.CSS_IMAGE ? g.impl.options.imagePlaceholder : void 0) ? (l(e, !0), n(s)) : (C(e), o(e));
215
+ }
216
+ function l(t, n) {
217
+ var i = g.impl.options.onImageError;
218
+ if (typeof i == "function") try {
219
+ i({
220
+ url: e,
221
+ message: t,
222
+ status: r.status,
223
+ willUsePlaceholder: n
224
+ });
225
+ } catch (e) {
226
+ C("onImageError handler threw:", e);
227
+ }
228
+ }
229
+ if (r.timeout = g.impl.options.httpTimeout, r.onerror = s, r.ontimeout = s, r.onloadend = function() {
230
+ var t;
231
+ r.readyState === XMLHttpRequest.DONE && ((t = r.status) === 0 && e.toLowerCase().startsWith("file://") || 200 <= t && t <= 300 && r.response !== null ? (t = r.response) instanceof Blob ? n(t) : c("Response was not a Blob (got " + typeof t + ") while fetching resource: " + e) : s());
232
+ }, 0 < g.impl.options.useCredentialsFilters.length && (g.impl.options.useCredentials = 0 < g.impl.options.useCredentialsFilters.filter((t) => 0 <= e.search(t)).length), g.impl.options.useCredentials && (r.withCredentials = !0), g.impl.options.corsImg && e.indexOf("http") === 0 && e.indexOf(window.location.origin) === -1) {
233
+ var u = (g.impl.options.corsImg.method || "GET").toUpperCase() === "POST" ? "POST" : "GET";
234
+ r.open(u, (g.impl.options.corsImg.url || "").replace("#{cors}", e), !0);
235
+ let t = !1, n = g.impl.options.corsImg.headers || {}, i = (Object.keys(n).forEach(function(e) {
236
+ n[e].indexOf("application/json") !== -1 && (t = !0), r.setRequestHeader(e, n[e]);
237
+ }), ((e) => {
238
+ try {
239
+ return JSON.parse(JSON.stringify(e));
240
+ } catch (e) {
241
+ C("corsImg.data is missing or invalid", e), o("corsImg.data is missing or invalid");
242
+ }
243
+ })(g.impl.options.corsImg.data || ""));
244
+ Object.keys(i).forEach(function(t) {
245
+ typeof i[t] == "string" && (i[t] = i[t].replace("#{cors}", e));
246
+ }), r.responseType = "blob", r.send(t ? JSON.stringify(i) : i);
247
+ } else r.open("GET", e, !0), r.responseType = "blob", r.send();
248
+ });
249
+ }
250
+ return r.promise;
251
+ }
252
+ function m(e) {
253
+ if (e.nodeType !== v || typeof e.getBBox != "function") return null;
254
+ try {
255
+ var t = e.getBBox();
256
+ return t && (t.width || t.height) ? t : null;
257
+ } catch {
258
+ return null;
259
+ }
260
+ }
261
+ function _(e, t) {
262
+ if (e.nodeType === v) {
263
+ let n = y(e).getPropertyValue(t);
264
+ if (n.slice(-2) === "px") return n = n.slice(0, -2), parseFloat(n);
265
+ }
266
+ return NaN;
267
+ }
268
+ })(), i = (() => {
269
+ let e = /url\(\s*(["']?)((?:\\.|[^\\)])+)\1\s*\)/gm;
270
+ return {
271
+ inlineAll: function(e, r, i, o) {
272
+ return t(e) ? Promise.resolve(e).then(n).then(function(e) {
273
+ return g.impl.options.filterUrls ? e.filter(function(e) {
274
+ return g.impl.options.filterUrls(e, r);
275
+ }) : e;
276
+ }).then(function(t) {
277
+ let n = Promise.resolve(e);
278
+ return t.forEach(function(e) {
279
+ n = n.then(function(t) {
280
+ return a(t, e, r, i, o);
281
+ });
282
+ }), n;
283
+ }) : Promise.resolve(e);
284
+ },
285
+ shouldProcess: t,
286
+ impl: {
287
+ readUrls: n,
288
+ inline: a,
289
+ urlAsRegex: i
290
+ }
291
+ };
292
+ function t(t) {
293
+ return t.search(e) !== -1;
294
+ }
295
+ function n(t) {
296
+ for (var n, i = []; (n = e.exec(t)) !== null;) i.push(n[2]);
297
+ return i.filter(function(e) {
298
+ return !r.isDataUrl(e);
299
+ });
300
+ }
301
+ function i(e) {
302
+ return RegExp(`url\\((["']?)(${r.escape(e)})\\1\\)`, "gm");
303
+ }
304
+ function a(e, t, n, a, o) {
305
+ return Promise.resolve(t).then(function(e) {
306
+ return n ? r.resolveUrl(e, n) : e;
307
+ }).then(function(e) {
308
+ return (o || r.getAndEncode)(e, a);
309
+ }).then(function(n) {
310
+ var r = i(t);
311
+ return e.replace(r, `url($1${n}$1)`);
312
+ });
313
+ }
314
+ })(), a = {
315
+ resolveAll: function() {
316
+ return o().then(function(e) {
317
+ return Promise.all(e.map(function(e) {
318
+ return e.resolve();
319
+ }));
320
+ }).then(function(e) {
321
+ return e.join("\n");
322
+ });
323
+ },
324
+ impl: { readAll: o }
325
+ };
326
+ function o() {
327
+ return Promise.resolve(r.asArray(document.styleSheets)).then(function(e) {
328
+ let t = typeof g.impl.options.requestInterceptor == "function", n = {};
329
+ return Promise.all(e.map(function(e) {
330
+ let i = e.href;
331
+ if (!i || n[i]) return e;
332
+ n[i] = !0;
333
+ var a = ((e) => {
334
+ try {
335
+ return !e.cssRules;
336
+ } catch {
337
+ return !0;
338
+ }
339
+ })(e) && ((e) => {
340
+ var t = g.impl.options.loadExternalStyleSheet;
341
+ if (typeof t == "function") try {
342
+ return !0 === t(e);
343
+ } catch (e) {
344
+ return C("domtoimage: loadExternalStyleSheet predicate threw:", e), !1;
345
+ }
346
+ return !0 === t;
347
+ })(i);
348
+ return t || a ? r.getResourceText(i, h.STYLESHEET, a).then(function(t) {
349
+ return t && ((e, t) => {
350
+ try {
351
+ var n = document.implementation.createHTMLDocument(""), i = n.createElement("style");
352
+ return i.appendChild(document.createTextNode((a = t, e.replace(/url\((['"]?)([^'")]+)\1\)/g, function(e, t, n) {
353
+ return n = n.trim(), r.isDataUrl(n) || /^[a-z][a-z0-9+.-]*:/i.test(n) ? e : `url(${t}${r.resolveUrl(n, a)}${t})`;
354
+ })))), n.body.appendChild(i), i.sheet;
355
+ } catch {
356
+ return null;
357
+ }
358
+ var a;
359
+ })(t, i) || e;
360
+ }) : e;
361
+ }));
362
+ }).then(function(e) {
363
+ let t = [];
364
+ return e.forEach(function(e) {
365
+ var n = Object.getPrototypeOf(e);
366
+ if (Object.prototype.hasOwnProperty.call(n, "cssRules")) try {
367
+ r.asArray(e.cssRules || []).forEach(t.push.bind(t));
368
+ } catch (t) {
369
+ g.impl.options.ignoreCSSRuleErrors || C("domtoimage: Error while reading CSS rules from: " + e.href, t);
370
+ }
371
+ }), t;
372
+ }).then(function(e) {
373
+ return e.filter(function(e) {
374
+ return e.type === CSSRule.FONT_FACE_RULE;
375
+ }).filter(function(e) {
376
+ return i.shouldProcess(e.style.getPropertyValue("src"));
377
+ });
378
+ }).then(function(t) {
379
+ return t.map(e);
380
+ });
381
+ function e(e) {
382
+ return {
383
+ resolve: function() {
384
+ var t = (e.parentStyleSheet || {}).href;
385
+ return i.inlineAll(e.cssText, t, h.FONT);
386
+ },
387
+ src: function() {
388
+ return e.style.getPropertyValue("src");
389
+ }
390
+ };
391
+ }
392
+ }
393
+ let s = {
394
+ inlineAll: function e(t) {
395
+ return r.isElement(t) ? ((n = t).style ? (a = [
396
+ "background",
397
+ "background-image",
398
+ "mask",
399
+ "mask-image",
400
+ "-webkit-mask",
401
+ "-webkit-mask-image"
402
+ ].map(function(e) {
403
+ let t = n.style.getPropertyValue(e), r = n.style.getPropertyPriority(e);
404
+ return t ? i.inlineAll(t, void 0, h.CSS_IMAGE).then(function(t) {
405
+ n.style.setProperty(e, t, r);
406
+ }) : Promise.resolve();
407
+ }), Promise.all(a).then(function() {
408
+ return n;
409
+ })) : Promise.resolve(n)).then(function() {
410
+ return r.isHTMLImageElement(t) ? c(t).inline() : r.isSVGImageElement(t) ? !(i = (n = t).getAttribute("href") || n.getAttributeNS(d, "href") || n.getAttribute("xlink:href")) || r.isDataUrl(i) ? Promise.resolve(n) : Promise.resolve(i).then(function(e) {
411
+ return (0, r.getAndEncode)(e, h.IMAGE);
412
+ }).then(function(e) {
413
+ return e && (n.setAttributeNS(d, "xlink:href", e), n.setAttribute("href", e)), n;
414
+ }) : Promise.all(r.asArray(t.childNodes).map(e));
415
+ var n, i;
416
+ }) : Promise.resolve(t);
417
+ var n, a;
418
+ },
419
+ impl: { newImage: c }
420
+ };
421
+ function c(e) {
422
+ return { inline: function(t) {
423
+ return r.isDataUrl(e.src) ? Promise.resolve() : Promise.resolve(e.src).then(function(e) {
424
+ return (t || r.getAndEncode)(e, h.IMAGE);
425
+ }).then(function(t) {
426
+ return new Promise(function(n) {
427
+ e.onload = n, e.onerror = n, e.src = t;
428
+ });
429
+ });
430
+ } };
431
+ }
432
+ let l = {
433
+ position: "fixed",
434
+ left: "-9999px",
435
+ visibility: "hidden"
436
+ }, u = "http://www.w3.org/2000/svg", d = "http://www.w3.org/1999/xlink", f = "data:image/svg+xml;charset=utf-8,", p = {
437
+ warn: function(...e) {
438
+ console.warn(...e);
439
+ },
440
+ error: function(...e) {
441
+ console.error(...e);
442
+ }
443
+ }, m = {
444
+ copyDefaultStyles: !0,
445
+ imagePlaceholder: void 0,
446
+ cacheBust: !1,
447
+ useCredentials: !1,
448
+ useCredentialsFilters: [],
449
+ httpTimeout: 3e4,
450
+ styleCaching: "strict",
451
+ corsImg: void 0,
452
+ adjustClonedNode: void 0,
453
+ filterStyles: void 0,
454
+ filterUrls: void 0,
455
+ adjustPseudoElement: void 0,
456
+ onImageError: void 0,
457
+ ensureShown: !1,
458
+ pixelRatio: 1,
459
+ preserveScroll: !1,
460
+ ignoreCSSRuleErrors: !1,
461
+ requestInterceptor: void 0,
462
+ loadExternalStyleSheet: !1,
463
+ logger: p
464
+ }, h = Object.freeze({
465
+ IMAGE: "image",
466
+ CSS_IMAGE: "css-image",
467
+ FONT: "font",
468
+ STYLESHEET: "stylesheet"
469
+ }), g = {
470
+ toSvg: T,
471
+ toPng: function(e, t) {
472
+ return E(e, t).then(function(e) {
473
+ return e.toDataURL();
474
+ });
475
+ },
476
+ toJpeg: function(e, t) {
477
+ return E(e, t).then(function(e) {
478
+ return e.toDataURL("image/jpeg", (t ? t.quality : void 0) || 1);
479
+ });
480
+ },
481
+ toBlob: function(e, t) {
482
+ return E(e, t).then(r.canvasToBlob);
483
+ },
484
+ toPixelData: function(e, t) {
485
+ return E(e, t).then(function(t) {
486
+ return t.getContext("2d").getImageData(0, 0, r.width(e), r.height(e)).data;
487
+ });
488
+ },
489
+ toCanvas: E,
490
+ ResourceType: h,
491
+ impl: {
492
+ fontFaces: a,
493
+ images: s,
494
+ util: r,
495
+ inliner: i,
496
+ urlCache: [],
497
+ options: {},
498
+ copyOptions: function(e) {
499
+ Object.keys(m).forEach(function(t) {
500
+ g.impl.options[t] = (e[t] === void 0 ? m : e)[t];
501
+ });
502
+ },
503
+ resetUrlCache: _
504
+ }
505
+ };
506
+ function _() {
507
+ g.impl.urlCache = [];
508
+ }
509
+ typeof e == "object" && typeof t == "object" ? t.exports = g : n.domtoimage = g;
510
+ let v = (typeof Node < "u" ? Node.ELEMENT_NODE : void 0) || 1, y = x("getComputedStyle"), b = x("atob");
511
+ function x(e) {
512
+ return (n === void 0 ? void 0 : n[e]) || (typeof window < "u" ? window[e] : void 0) || globalThis[e];
513
+ }
514
+ function S(...e) {
515
+ w("warn", e);
516
+ }
517
+ function C(...e) {
518
+ w("error", e);
519
+ }
520
+ function w(e, t) {
521
+ var n = g.impl.options.logger || p, e = n[e];
522
+ typeof e == "function" && e.apply(n, t);
523
+ }
524
+ function T(e, t) {
525
+ let n = g.impl.util.getWindow(e), a = (t ||= {}, g.impl.copyOptions(t), []);
526
+ return O = [], n && n.document ? (() => {
527
+ var e = n.document;
528
+ if (!e.fonts || !e.fonts.ready) return Promise.resolve();
529
+ let t = g.impl.options.httpTimeout || 3e4, r, i = Promise.resolve(e.fonts.ready).then(function() {
530
+ return !1;
531
+ }, function() {
532
+ return !1;
533
+ }), a = new Promise(function(e) {
534
+ r = n.setTimeout(function() {
535
+ e(!0);
536
+ }, t);
537
+ });
538
+ return Promise.race([i, a]).then(function(e) {
539
+ n.clearTimeout(r), e && S("dom-to-image-more: timed out after " + t + "ms waiting for document fonts to finish loading (document.fonts.ready); rendering anyway — the output may have missing glyphs or fallback-font metrics.");
540
+ });
541
+ })().then(function() {
542
+ var t = e;
543
+ if (t.nodeType === v) return t;
544
+ var n, r = t, i = t.parentNode;
545
+ if (i) return n = document.createElement("span"), i.replaceChild(n, r), n.append(t), a.push({
546
+ parent: i,
547
+ child: r,
548
+ wrapper: n
549
+ }), n;
550
+ throw Error("Cannot render a non-element node that is not attached to a parent; wrap it in an element or attach it to the document first.");
551
+ }).then(function(e) {
552
+ return function e(t, n, a, o) {
553
+ var s = n.filter;
554
+ return t === D || r.isHTMLScriptElement(t) || r.isHTMLStyleElement(t) || r.isHTMLLinkElement(t) || a !== null && s && !s(t) ? Promise.resolve() : Promise.resolve(t).then(function(e) {
555
+ return r.isHTMLCanvasElement(e) ? r.makeImage(e.toDataURL()) : e.cloneNode(!1);
556
+ }).then(function(e) {
557
+ return n.adjustClonedNode && n.adjustClonedNode(t, e, !1), Promise.resolve(e);
558
+ }).then(function(i) {
559
+ {
560
+ var a = i, i = (i = t, r.isElementHostForOpenShadowRoot(i) ? i.shadowRoot : i);
561
+ let s = ((e) => {
562
+ if (r.isShadowSlotElement(e)) {
563
+ var t = e.assignedNodes();
564
+ if (t && 0 < t.length) return t;
565
+ }
566
+ return e.childNodes;
567
+ })(i), c = Promise.resolve();
568
+ if (s.length !== 0) {
569
+ let t = y((i = i, r.isShadowRoot(i) ? i.host : i));
570
+ r.asArray(s).forEach(function(r) {
571
+ c = c.then(function() {
572
+ return e(r, n, t, o).then(function(e) {
573
+ e && a.appendChild(e);
574
+ });
575
+ });
576
+ });
577
+ }
578
+ return c.then(function() {
579
+ return a;
580
+ });
581
+ }
582
+ }).then(function(e) {
583
+ return n.adjustClonedNode && n.adjustClonedNode(t, e, !0), Promise.resolve(e);
584
+ }).then(function(e) {
585
+ return o = e, s = t, !r.isElement(o) || r.isShadowSlotElement(s) ? Promise.resolve(o) : Promise.resolve().then(function() {
586
+ if (r.isHTMLImageElement(s) && typeof s.decode == "function" && !(s.complete && 0 < s.naturalWidth)) return s.decode().catch(function() {});
587
+ }).then(function() {
588
+ if (o.style) {
589
+ var e = s, t = o, i, c, u = y(e);
590
+ if (u.cssText) t.style.cssText = u.cssText, (h = t.style).font = (_ = u).font, h.fontFamily = _.fontFamily, h.fontFeatureSettings = _.fontFeatureSettings, h.fontKerning = _.fontKerning, h.fontSize = _.fontSize, h.fontStretch = _.fontStretch, h.fontStyle = _.fontStyle, h.fontVariant = _.fontVariant, h.fontVariantCaps = _.fontVariantCaps, h.fontVariantEastAsian = _.fontVariantEastAsian, h.fontVariantLigatures = _.fontVariantLigatures, h.fontVariantNumeric = _.fontVariantNumeric, h.fontVariationSettings = _.fontVariationSettings, h.fontWeight = _.fontWeight;
591
+ else {
592
+ {
593
+ var d = n, f = e, p = u, m = a, h = t;
594
+ let o = g.impl.options.copyDefaultStyles ? ((e, t) => {
595
+ var n, i = ((e) => {
596
+ var t = [];
597
+ do
598
+ if (e.nodeType === v) {
599
+ var n = e.tagName;
600
+ if (t.push(n), F.includes(n)) break;
601
+ }
602
+ while (e = e.parentNode);
603
+ return t;
604
+ })(t), e = (e.styleCaching === "relaxed" ? i.filter((e, t, n) => t === 0 || t === n.length - 1) : i).join(">") + ((n = t) && n.hasAttribute ? I.filter(function(e) {
605
+ return n.hasAttribute(e);
606
+ }).map(function(e) {
607
+ return `[${e}]`;
608
+ }).join("") : "");
609
+ if (P[e]) return P[e];
610
+ var a, o = i = ((e, t) => {
611
+ let n = e.body;
612
+ do
613
+ var r = t.pop(), r = e.createElement(r);
614
+ while (n.appendChild(r), n = r, 0 < t.length);
615
+ return n.textContent = "​", n;
616
+ })((a = (() => {
617
+ if (D) return D.contentWindow;
618
+ t = document.characterSet || "UTF-8", e = (e = document.doctype) ? (`<!DOCTYPE ${c(e.name)} ${c(e.publicId)} ` + c(e.systemId)).trim() + ">" : "", (D = document.createElement("iframe")).id = "domtoimage-sandbox-" + r.uid(), Object.assign(D.style, l), document.body.appendChild(D);
619
+ var e, t, n = D, i = "domtoimage-sandbox";
620
+ try {
621
+ return n.contentWindow.document.write(e + `<html><head><meta charset='${t}'><title>${i}</title></head><body></body></html>`), n.contentWindow;
622
+ } catch {}
623
+ var a = document.createElement("meta");
624
+ a.setAttribute("charset", t);
625
+ try {
626
+ var o = document.implementation.createHTMLDocument(i), s = (o.head.appendChild(a), e + o.documentElement.outerHTML);
627
+ return n.setAttribute("srcdoc", s), n.contentWindow;
628
+ } catch {}
629
+ return n.contentDocument.head.appendChild(a), n.contentDocument.title = i, n.contentWindow;
630
+ function c(e) {
631
+ var t;
632
+ return e ? ((t = document.createElement("div")).innerText = e, t.innerHTML) : "";
633
+ }
634
+ })()).document, i), s = t, c = (s && s.hasAttribute && I.forEach(function(e) {
635
+ s.hasAttribute(e) && o.setAttribute(e, s.getAttribute(e));
636
+ }), t = ((e, t) => {
637
+ let n = {}, i = e.getComputedStyle(t), a = (r.asArray(i).forEach(function(e) {
638
+ n[e] = e === "width" || e === "height" ? "auto" : i.getPropertyValue(e);
639
+ }), t.parentElement), o;
640
+ return a && (o = e.getComputedStyle(a).getPropertyValue("font-size"), n[M] = n["font-size"] !== o), n;
641
+ })(a, i), i);
642
+ do
643
+ var u = c.parentElement;
644
+ while (u !== null && u.removeChild(c), (c = u) && c.tagName !== "BODY");
645
+ return P[e] = t;
646
+ })(d, f) : {}, s = h.style;
647
+ r.asArray(p).forEach(function(e) {
648
+ var t, n, r;
649
+ d.filterStyles && !d.filterStyles(f, e) || (t = p.getPropertyValue(e), r = o[e], n = m ? m.getPropertyValue(e) : void 0, s.getPropertyValue(e)) || (t !== r || m && t !== n || e === "font-size" && o[M]) && (r = p.getPropertyPriority(e), j(s, e, t, r));
650
+ }), i = p, c = s, [
651
+ "top",
652
+ "right",
653
+ "bottom",
654
+ "left"
655
+ ].forEach(function(e) {
656
+ var t, n = `border-${e}-width`, e = i.getPropertyValue(`border-${e}-style`);
657
+ e && e !== "none" && !c.getPropertyValue(n) && (e = i.getPropertyValue(n)) && (t = i.getPropertyPriority(n), j(c, n, e, t));
658
+ });
659
+ }
660
+ a === null && ([
661
+ "inset-block",
662
+ "inset-block-start",
663
+ "inset-block-end"
664
+ ].forEach((e) => t.style.removeProperty(e)), [
665
+ "left",
666
+ "right",
667
+ "top",
668
+ "bottom"
669
+ ].forEach((e) => {
670
+ t.style.getPropertyValue(e) && t.style.setProperty(e, "0px");
671
+ }));
672
+ }
673
+ _ = y(s).getPropertyValue("visibility"), a === null ? _ !== "visible" && o.style.setProperty("visibility", "visible") : _ === a.getPropertyValue("visibility") && o.style.removeProperty("visibility");
674
+ }
675
+ var _;
676
+ }).then(function() {
677
+ let e = r.uid();
678
+ return Promise.all([":before", ":after"].map(function(t) {
679
+ let a = y(s, t), c = a.getPropertyValue("content");
680
+ if (c !== "" && c !== "none") {
681
+ let u;
682
+ if (n.adjustPseudoElement) {
683
+ var l = n.adjustPseudoElement(s, t, a);
684
+ if (!1 === l) return;
685
+ l && typeof l == "object" && (u = l);
686
+ }
687
+ let d = o.getAttribute("class") || "", f = (o.setAttribute("class", d + " " + e), `.${e}:` + t), p = a.cssText ? a.cssText + ` content: ${c};` : r.asArray(a).map(function(e) {
688
+ return e + ": " + a.getPropertyValue(e) + (a.getPropertyPriority(e) ? " !important" : "");
689
+ }).join("; ") + ";";
690
+ return u && (p += Object.keys(u).map(function(e) {
691
+ return ` ${e}: ${u[e]};`;
692
+ }).join("")), i.inlineAll(p, void 0, h.CSS_IMAGE).then(function(e) {
693
+ var t = document.createElement("style");
694
+ t.appendChild(document.createTextNode(f + `{${e}}`)), o.appendChild(t);
695
+ });
696
+ }
697
+ }));
698
+ }).then(function() {
699
+ r.isHTMLTextAreaElement(s) && (o.innerHTML = s.value), r.isHTMLInputElement(s) && o.setAttribute("value", s.value);
700
+ }).then(function() {
701
+ if (o.attributes && o.removeAttribute) {
702
+ var e = [];
703
+ for (let n = 0; n < o.attributes.length; n += 1) {
704
+ var t = o.attributes[n].name;
705
+ /["'=<>/\s]/.test(t) && e.push(t);
706
+ }
707
+ e.forEach(function(e) {
708
+ o.removeAttribute(e);
709
+ });
710
+ }
711
+ }).then(function() {
712
+ if (n.preserveScroll && o.style) {
713
+ var e = s.scrollLeft || 0, t = s.scrollTop || 0;
714
+ if (e !== 0 || t !== 0) {
715
+ o.style.overflow = "hidden";
716
+ let n = `translate(${-e}px, ${-t}px)`;
717
+ r.asArray(o.children).forEach(function(e) {
718
+ var t;
719
+ e.style && (t = e.style.transform && e.style.transform !== "none" ? " " + e.style.transform : "", e.style.transform = n + t);
720
+ });
721
+ }
722
+ }
723
+ }).then(function() {
724
+ if (r.isSVGElement(o) && (o.setAttribute("xmlns", u), r.isSVGRectElement(o) && ["width", "height"].forEach(function(e) {
725
+ var t = o.getAttribute(e);
726
+ t && o.style.setProperty(e, t);
727
+ }), r.isSVGUseElement(o))) {
728
+ var e = s, t = e.getAttribute("href") || e.getAttributeNS(d, "href") || e.getAttribute("xlink:href");
729
+ if (t && t.charAt(0) === "#") {
730
+ let n = t.slice(1);
731
+ O.some((e) => e.id === n) || (t = e.ownerDocument.getElementById(n)) && ((e = t.cloneNode(!0)).setAttribute("xmlns", u), O.push({
732
+ id: n,
733
+ node: e
734
+ }));
735
+ }
736
+ }
737
+ }).then(function() {
738
+ var e;
739
+ r.isElement(o) && (() => {
740
+ var e = s.children || [];
741
+ for (let t = 0; t < e.length; t += 1) if (e[t].tagName === "CAPTION") return 1;
742
+ })() && ((e = y(s).getPropertyValue("display")) !== "table" && e !== "inline-table" || (o.style.removeProperty("height"), o.style.removeProperty("block-size")));
743
+ }).then(function() {
744
+ r.isHTMLImageElement(o) && (o.removeAttribute("loading"), s.srcset || s.sizes) && (o.removeAttribute("srcset"), o.removeAttribute("sizes"), o.src = s.currentSrc || s.src);
745
+ }).then(function() {
746
+ return o;
747
+ });
748
+ var o, s;
749
+ });
750
+ }(e, t, null, n);
751
+ }).then(function(e) {
752
+ if (O.length !== 0) {
753
+ var t = document.createElementNS(u, "svg");
754
+ t.setAttribute("xmlns", u), t.setAttribute("width", "0"), t.setAttribute("height", "0"), t.style.setProperty("position", "absolute"), t.style.setProperty("width", "0"), t.style.setProperty("height", "0"), t.style.setProperty("overflow", "hidden");
755
+ let n = document.createElementNS(u, "defs"), r = (t.appendChild(n), /* @__PURE__ */ new Set()), i = (e.getAttribute("id") && r.add(e.getAttribute("id")), e.querySelectorAll("[id]").forEach(function(e) {
756
+ r.add(e.getAttribute("id"));
757
+ }), 0);
758
+ O.forEach(function(e) {
759
+ r.has(e.id) || (n.appendChild(e.node), i += 1);
760
+ }), 0 < i && e.insertBefore(t, e.firstChild);
761
+ }
762
+ return e;
763
+ }).then(t.disableEmbedFonts ? Promise.resolve(e) : k).then(t.disableInlineImages ? Promise.resolve(e) : A).then(function(e) {
764
+ e.style && (e.style.margin = "0"), t.bgcolor && (e.style.backgroundColor = t.bgcolor), t.width && (e.style.width = t.width + "px"), t.height && (e.style.height = t.height + "px"), t.style && Object.assign(e.style, t.style);
765
+ let n = null;
766
+ return typeof t.onclone == "function" && (n = t.onclone(e)), Promise.resolve(n).then(function() {
767
+ return e;
768
+ });
769
+ }).then(function(n) {
770
+ if (r.isSVGElement(e) && !r.isSVGSVGElement(e)) {
771
+ let i = n, a = s(i), c;
772
+ try {
773
+ c = e.getBBox();
774
+ } catch {
775
+ c = {
776
+ x: 0,
777
+ y: 0,
778
+ width: 0,
779
+ height: 0
780
+ };
781
+ } finally {
782
+ a();
783
+ }
784
+ i.removeAttribute("transform"), i.style.removeProperty("transform");
785
+ let l = t.width || c.width, d = t.height || c.height;
786
+ return Promise.resolve(i).then(function(e) {
787
+ return e.setAttribute("xmlns", u), new XMLSerializer().serializeToString(e);
788
+ }).then(o).then(r.escapeXhtml).then(function(e) {
789
+ var t = (r.isDimensionMissing(l) ? "" : ` width="${l}"`) + (r.isDimensionMissing(d) ? "" : ` height="${d}"`), n = `${c.x} ${c.y} ${c.width} ` + c.height;
790
+ return `<svg xmlns="${u}"${t} viewBox="${n}">${e}</svg>`;
791
+ }).then(function(e) {
792
+ return f + e;
793
+ });
794
+ }
795
+ {
796
+ let i = s(n), a, c;
797
+ try {
798
+ a = t.width || r.width(e), c = t.height || r.height(e);
799
+ } finally {
800
+ i();
801
+ }
802
+ return Promise.resolve(n).then(function(e) {
803
+ return e.setAttribute("xmlns", "http://www.w3.org/1999/xhtml"), new XMLSerializer().serializeToString(e);
804
+ }).then(o).then(r.escapeXhtml).then(function(e) {
805
+ var t = (r.isDimensionMissing(a) ? " width=\"100%\"" : ` width="${a}"`) + (r.isDimensionMissing(c) ? " height=\"100%\"" : ` height="${c}"`), n = (r.isDimensionMissing(a) ? "" : ` width="${a}"`) + (r.isDimensionMissing(c) ? "" : ` height="${c}"`);
806
+ return `<svg xmlns="${u}"${n}><foreignObject${t}>${e}</foreignObject></svg>`;
807
+ }).then(function(e) {
808
+ return f + e;
809
+ });
810
+ }
811
+ }).finally(function() {
812
+ for (; 0 < a.length;) {
813
+ var e = a.pop();
814
+ try {
815
+ e.parent.replaceChild(e.child, e.wrapper);
816
+ } catch (e) {
817
+ C("domtoimage: failed to restore wrapped node", e);
818
+ }
819
+ }
820
+ _(), O = [], D &&= (D.remove(), null), N && clearTimeout(N), N = setTimeout(() => {
821
+ N = null, P = {};
822
+ }, 2e4);
823
+ }) : Promise.reject(/* @__PURE__ */ Error("dom-to-image-more: a browser DOM is required (SSR)"));
824
+ function o(e) {
825
+ return e.replace(/url\(&quot;([^]*?)&quot;\)/g, function(e, t) {
826
+ return 0 <= t.indexOf("'") ? e : `url('${t}')`;
827
+ });
828
+ }
829
+ function s(n) {
830
+ function r() {}
831
+ if (!t.ensureShown) return r;
832
+ var i = y(e);
833
+ if (i.getPropertyValue("opacity") === "0" && n.style.setProperty("opacity", "1"), i.getPropertyValue("display") !== "none") return r;
834
+ let a = e.style.getPropertyValue("display"), o = e.style.getPropertyPriority("display");
835
+ return e.style.removeProperty("display"), y(e).getPropertyValue("display") === "none" && (i = a && a !== "none" ? a : "revert", e.style.setProperty("display", i, "important")), function() {
836
+ var t = y(e).getPropertyValue("display");
837
+ n.style.setProperty("display", t === "none" ? "block" : t), a ? e.style.setProperty("display", a, o) : e.style.removeProperty("display");
838
+ };
839
+ }
840
+ }
841
+ function E(e, t) {
842
+ return T(e, t ||= {}).then(r.makeImage).then(function(n) {
843
+ var i = ((e) => {
844
+ let n = t.width || r.width(e), i = t.height || r.height(e);
845
+ r.isDimensionMissing(n) && (n = r.isDimensionMissing(i) ? 300 : 2 * i), r.isDimensionMissing(i) && (i = n / 2);
846
+ var a, e = (typeof t.scale == "number" ? t.scale : 1) * (typeof t.pixelRatio == "number" ? t.pixelRatio : 1), o = (o = n, s = i, e = e, !(0 < o && 0 < s && 0 < e) || e <= (a = Math.min(16384 / o, 16384 / s, Math.sqrt(268435456 / (o * s)))) ? e : (S("dom-to-image-more: the requested " + Math.round(o * e) + "×" + Math.round(s * e) + " canvas exceeds the browser limit; clamping the effective scale from " + e + " to " + a + ". Capture detail may be reduced — render a smaller region or lower scale/pixelRatio."), a)), s = document.createElement("canvas");
847
+ return s.width = n * o, s.height = i * o, t.bgcolor && ((e = s.getContext("2d")).fillStyle = t.bgcolor, e.fillRect(0, 0, s.width, s.height)), {
848
+ canvas: s,
849
+ scale: o,
850
+ width: n,
851
+ height: i
852
+ };
853
+ })(e), a = i.canvas, o = i.scale, s = a.getContext("2d");
854
+ return s.msImageSmoothingEnabled = !1, s.imageSmoothingEnabled = !1, n && (s.scale(o, o), s.drawImage(n, 0, 0, i.width, i.height)), a;
855
+ });
856
+ }
857
+ let D = null, O = [];
858
+ function k(e) {
859
+ return a.resolveAll().then(function(t) {
860
+ var n;
861
+ return t !== "" && (n = document.createElement("style"), e.appendChild(n), n.appendChild(document.createTextNode(t))), e;
862
+ });
863
+ }
864
+ function A(e) {
865
+ return s.inlineAll(e).then(function() {
866
+ return e;
867
+ });
868
+ }
869
+ function j(e, t, n, r) {
870
+ var i = 0 <= ["background-clip"].indexOf(t);
871
+ r ? (e.setProperty(t, n, r), i && e.setProperty("-webkit-" + t, n, r)) : (e.setProperty(t, n), i && e.setProperty("-webkit-" + t, n));
872
+ }
873
+ let M = Symbol("dtim-ua-relative-font-size"), N = null, P = {}, F = /* @__PURE__ */ "ADDRESS.ARTICLE.ASIDE.BLOCKQUOTE.DETAILS.DIALOG.DD.DIV.DL.DT.FIELDSET.FIGCAPTION.FIGURE.FOOTER.FORM.H1.H2.H3.H4.H5.H6.HEADER.HGROUP.HR.LI.MAIN.NAV.OL.P.PRE.SECTION.SVG.TABLE.UL.math.svg.BODY.HEAD.HTML".split("."), I = ["href"];
874
+ })(e);
875
+ }));
876
+ //#endregion
877
+ export default t();