@canofold/markdown 0.2.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.
Files changed (131) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +50 -0
  3. package/README.zh-CN.md +50 -0
  4. package/dist/Markdown-DgolXL7g.js +2116 -0
  5. package/dist/Markdown-iU2W4KgV.js +2116 -0
  6. package/dist/base.css +2 -0
  7. package/dist/client/chunks/client-BkvCIcoZ.js +334 -0
  8. package/dist/client/chunks/client-kVNIqHQd.js +334 -0
  9. package/dist/client/chunks/gallery-BTg1qJjd.js +40 -0
  10. package/dist/client/chunks/gallery-q0WKbDeW.js +40 -0
  11. package/dist/client/chunks/image-BuMCsr5L.js +36 -0
  12. package/dist/client/chunks/image-_I24969q.js +36 -0
  13. package/dist/client/chunks/provider-DNSHvvN7.js +841 -0
  14. package/dist/client/chunks/provider-SSQfNDJA.js +841 -0
  15. package/dist/client/chunks/react-runtime-Dzgdzn6D.js +10571 -0
  16. package/dist/client/chunks/serialized-DajnRKXi.js +3464 -0
  17. package/dist/client/chunks/serialized-T1PzI4rG.js +3464 -0
  18. package/dist/client/chunks/table-JOSJsHgy.js +30 -0
  19. package/dist/client/chunks/table-PQvrpt1p.js +30 -0
  20. package/dist/client/index.js +4 -0
  21. package/dist/client/nativeBehaviors.d.ts +4 -0
  22. package/dist/client.d.ts +15 -0
  23. package/dist/compiler/analyze.d.ts +27 -0
  24. package/dist/compiler/assets.d.ts +29 -0
  25. package/dist/compiler/ast.d.ts +68 -0
  26. package/dist/compiler/createPipeline.d.ts +18 -0
  27. package/dist/compiler/defaultLabels.d.ts +28 -0
  28. package/dist/compiler/directiveValidation.d.ts +17 -0
  29. package/dist/compiler/highlighter.d.ts +3 -0
  30. package/dist/compiler/mdxModules.d.ts +19 -0
  31. package/dist/compiler/mdxPlugins.d.ts +16 -0
  32. package/dist/compiler/normalizeOptions.d.ts +16 -0
  33. package/dist/compiler/pluginPlan.d.ts +18 -0
  34. package/dist/compiler/plugins/code.d.ts +16 -0
  35. package/dist/compiler/plugins/directives.d.ts +24 -0
  36. package/dist/compiler/plugins/documentBlocks.d.ts +5 -0
  37. package/dist/compiler/plugins/tables.d.ts +5 -0
  38. package/dist/compiler/plugins.d.ts +24 -0
  39. package/dist/compiler/prepareMarkdown.d.ts +11 -0
  40. package/dist/compiler/sanitizeBoundary.d.ts +18 -0
  41. package/dist/compiler/stableJson.d.ts +2 -0
  42. package/dist/compiler/syntaxFeatures.d.ts +10 -0
  43. package/dist/compiler/types.d.ts +177 -0
  44. package/dist/components/blocks/MarkdownCodeBlock.d.ts +10 -0
  45. package/dist/components/blocks/MarkdownCopySnippet.d.ts +10 -0
  46. package/dist/components/blocks/MarkdownHeading.d.ts +13 -0
  47. package/dist/components/blocks/MarkdownImage.d.ts +16 -0
  48. package/dist/components/blocks/MarkdownTable.d.ts +12 -0
  49. package/dist/components/blocks/MarkdownTerminal.d.ts +9 -0
  50. package/dist/components/composite/MarkdownComposite.d.ts +37 -0
  51. package/dist/components/composite/MarkdownFileTree.d.ts +5 -0
  52. package/dist/components/composite/MarkdownTabs.d.ts +6 -0
  53. package/dist/components/gallery/ImageGallery.d.ts +25 -0
  54. package/dist/components/shared/MarkdownActions.d.ts +18 -0
  55. package/dist/components/shared/MarkdownDialog.d.ts +11 -0
  56. package/dist/components/shared/MarkdownFileIcon.d.ts +4 -0
  57. package/dist/components/shared/MarkdownIcon.d.ts +8 -0
  58. package/dist/components/shared/interactionConstants.d.ts +1 -0
  59. package/dist/components/shared/reactText.d.ts +14 -0
  60. package/dist/directiveValidation-CwXRsn5k.js +741 -0
  61. package/dist/directiveValidation-KWUIIjKw.js +741 -0
  62. package/dist/file-icons/LICENSE +21 -0
  63. package/dist/file-icons/astro.svg +1 -0
  64. package/dist/file-icons/bun.svg +1 -0
  65. package/dist/file-icons/bun_light.svg +1 -0
  66. package/dist/file-icons/config.svg +1 -0
  67. package/dist/file-icons/console.svg +1 -0
  68. package/dist/file-icons/css.svg +1 -0
  69. package/dist/file-icons/database.svg +1 -0
  70. package/dist/file-icons/deno.svg +1 -0
  71. package/dist/file-icons/deno_light.svg +1 -0
  72. package/dist/file-icons/diff.svg +1 -0
  73. package/dist/file-icons/docker.svg +1 -0
  74. package/dist/file-icons/document.svg +1 -0
  75. package/dist/file-icons/download.svg +1 -0
  76. package/dist/file-icons/environment.svg +1 -0
  77. package/dist/file-icons/excel.svg +1 -0
  78. package/dist/file-icons/git.svg +1 -0
  79. package/dist/file-icons/github-actions.svg +1 -0
  80. package/dist/file-icons/go.svg +1 -0
  81. package/dist/file-icons/javascript.svg +1 -0
  82. package/dist/file-icons/json.svg +1 -0
  83. package/dist/file-icons/markdown.svg +1 -0
  84. package/dist/file-icons/nodejs.svg +1 -0
  85. package/dist/file-icons/npm.svg +1 -0
  86. package/dist/file-icons/pdf.svg +1 -0
  87. package/dist/file-icons/pnpm.svg +1 -0
  88. package/dist/file-icons/pnpm_light.svg +1 -0
  89. package/dist/file-icons/powerpoint.svg +1 -0
  90. package/dist/file-icons/python.svg +1 -0
  91. package/dist/file-icons/react.svg +1 -0
  92. package/dist/file-icons/rust.svg +1 -0
  93. package/dist/file-icons/sass.svg +1 -0
  94. package/dist/file-icons/settings.svg +1 -0
  95. package/dist/file-icons/svelte.svg +1 -0
  96. package/dist/file-icons/typescript.svg +1 -0
  97. package/dist/file-icons/vue.svg +1 -0
  98. package/dist/file-icons/word.svg +1 -0
  99. package/dist/file-icons/yaml.svg +1 -0
  100. package/dist/file-icons/yarn.svg +1 -0
  101. package/dist/index.d.ts +7 -0
  102. package/dist/index.js +6 -0
  103. package/dist/islands/gallery.d.ts +2 -0
  104. package/dist/islands/image.d.ts +2 -0
  105. package/dist/islands/options.d.ts +8 -0
  106. package/dist/islands/provider.d.ts +4 -0
  107. package/dist/islands/serialized.d.ts +4 -0
  108. package/dist/islands/table.d.ts +2 -0
  109. package/dist/islands.d.ts +13 -0
  110. package/dist/plugins-CeQ-Bo89.js +288 -0
  111. package/dist/plugins-DQ-VUuCT.js +288 -0
  112. package/dist/prepareMarkdown-8N-OdLDS.js +852 -0
  113. package/dist/prepareMarkdown-Bug1ncYk.js +852 -0
  114. package/dist/protocol/serializedNode.d.ts +3 -0
  115. package/dist/react/Markdown.d.ts +54 -0
  116. package/dist/react/componentMap.d.ts +172 -0
  117. package/dist/react/semanticOverrideProps.d.ts +4 -0
  118. package/dist/react/slots.d.ts +39 -0
  119. package/dist/react/urlTransform.d.ts +12 -0
  120. package/dist/server/analyze.d.ts +6 -0
  121. package/dist/server/analyze.js +132 -0
  122. package/dist/server/cache.d.ts +16 -0
  123. package/dist/server/createMarkdownRenderer.d.ts +39 -0
  124. package/dist/server.d.ts +5 -0
  125. package/dist/server.js +137 -0
  126. package/dist/shared/copyText.d.ts +2 -0
  127. package/dist/shared/fileKinds.d.ts +6 -0
  128. package/dist/theme.css +183 -0
  129. package/dist/theme.d.ts +167 -0
  130. package/dist/theme.js +228 -0
  131. package/package.json +110 -0
@@ -0,0 +1,334 @@
1
+ const x = [
2
+ "gallery",
3
+ "code-toolbar",
4
+ "copy-snippet",
5
+ "terminal-toolbar",
6
+ "table",
7
+ "image",
8
+ "heading",
9
+ "tabs",
10
+ "details",
11
+ "file-tree"
12
+ ];
13
+ async function D(e) {
14
+ if (typeof navigator < "u" && navigator.clipboard)
15
+ try {
16
+ return await navigator.clipboard.writeText(e), !0;
17
+ } catch {
18
+ }
19
+ if (typeof document > "u" || typeof document.execCommand != "function") return !1;
20
+ const t = document.createElement("textarea");
21
+ t.value = e, t.setAttribute("readonly", ""), t.style.position = "fixed", t.style.inset = "0 auto auto 0", t.style.opacity = "0", document.body.appendChild(t), t.select();
22
+ try {
23
+ return document.execCommand("copy");
24
+ } finally {
25
+ t.remove();
26
+ }
27
+ }
28
+ const B = {
29
+ "copy-code": "code-toolbar",
30
+ "copy-snippet": "copy-snippet",
31
+ "copy-terminal": "terminal-toolbar",
32
+ "copy-section-link": "heading"
33
+ }, N = 1600, A = /* @__PURE__ */ new WeakMap();
34
+ function d(e, t) {
35
+ return (e.behaviorOwners.get(t) ?? 0) > 0;
36
+ }
37
+ function I(e, t, a) {
38
+ a === null ? e.removeAttribute(t) : e.setAttribute(t, a);
39
+ }
40
+ function f(e, t) {
41
+ const a = t.map((n) => [n, e.getAttribute(n)]);
42
+ return () => a.forEach(([n, s]) => I(e, n, s));
43
+ }
44
+ function E(e, t, a) {
45
+ const n = e.behaviorCleanup.get(t) ?? [];
46
+ n.push(a), e.behaviorCleanup.set(t, n);
47
+ }
48
+ function H(e, t) {
49
+ e.feedback.forEach((a, n) => {
50
+ a.behavior === t && (window.clearTimeout(a.timer), a.restore(), e.feedback.delete(n));
51
+ }), e.behaviorCleanup.get(t)?.splice(0).reverse().forEach((a) => a()), e.behaviorCleanup.delete(t);
52
+ }
53
+ function T(e, t) {
54
+ return [...e instanceof Element && e.matches(t) ? [e] : [], ...e.querySelectorAll(t)].filter(
55
+ (n) => !n.closest('[data-cf-runtime="react"]')
56
+ );
57
+ }
58
+ function h(e, t, a) {
59
+ const n = t.closest(a);
60
+ return n ? e instanceof Element && n !== e && !e.contains(n) ? null : n : null;
61
+ }
62
+ function C(e, t) {
63
+ t ? e.setAttribute("inert", "") : e.removeAttribute("inert");
64
+ }
65
+ function O(e) {
66
+ e.dataset.cfEnhanced = "true";
67
+ const t = e.querySelector('[data-cf-slot="content"]');
68
+ t && C(t, !e.open);
69
+ }
70
+ function _(e, t) {
71
+ for (const a of T(e, '[data-cf-behavior="details"]')) {
72
+ if (t.details.has(a)) continue;
73
+ t.details.add(a);
74
+ const n = f(a, ["data-cf-enhanced"]), s = a.querySelector('[data-cf-slot="content"]'), r = s ? f(s, ["inert"]) : () => {
75
+ }, o = () => O(a);
76
+ O(a), a.addEventListener("toggle", o), E(t, "details", () => {
77
+ a.removeEventListener("toggle", o), n(), r(), t.details.delete(a);
78
+ });
79
+ }
80
+ }
81
+ function $(e, t, a, n, s) {
82
+ let r = a.feedback.get(e);
83
+ r && (window.clearTimeout(r.timer), r.restore(), a.feedback.delete(e));
84
+ const o = f(e, [
85
+ "data-cf-idle-label",
86
+ "data-cf-copied",
87
+ "data-cf-copy-error",
88
+ "aria-label",
89
+ "title"
90
+ ]), c = f(e, ["class"]), i = e.querySelector("[aria-live]"), l = i?.textContent ?? "", p = () => {
91
+ o(), c(), i && (i.textContent = l);
92
+ }, b = e.dataset.cfIdleLabel || e.getAttribute("aria-label") || "";
93
+ e.dataset.cfIdleLabel = b, e.classList.toggle("cf-action-success", t), e.classList.toggle("cf-action-error", !t), t ? (e.dataset.cfCopied = "true", delete e.dataset.cfCopyError) : (e.dataset.cfCopyError = "true", delete e.dataset.cfCopied);
94
+ const u = t ? `${b} ✓` : s || b;
95
+ e.setAttribute("aria-label", u), e.setAttribute("title", u), i && (i.textContent = u);
96
+ const y = window.setTimeout(() => {
97
+ p(), a.feedback.delete(e);
98
+ }, N);
99
+ a.feedback.set(e, { behavior: n, timer: y, restore: p });
100
+ }
101
+ async function z(e, t, a) {
102
+ const n = B[e];
103
+ if (!n || !d(a, n)) return;
104
+ const s = t.closest("[data-cf-behavior], [data-cf-island]");
105
+ if (!s) return;
106
+ const r = e === "copy-section-link" ? `${window.location.origin}${window.location.pathname}${window.location.search}${s.dataset.cfAnchor ?? ""}` : e === "copy-snippet" ? s.dataset.cfValue ?? "" : e === "copy-code" ? s.closest(".cf-code")?.querySelector("pre")?.textContent ?? "" : e === "copy-terminal" ? s.closest(".cf-terminal")?.querySelector("pre")?.textContent ?? "" : "", o = await D(r);
107
+ d(a, n) && $(t, o, a, n, s.dataset.cfCopyFailureLabel);
108
+ }
109
+ function L(e) {
110
+ return [...e.querySelectorAll('[role="tab"][data-cf-tab]')];
111
+ }
112
+ function K(e) {
113
+ const t = e.closest('[role="tablist"]');
114
+ if (!t || typeof t.scrollTo != "function") return;
115
+ const a = e.offsetLeft, n = a + e.offsetWidth;
116
+ a < t.scrollLeft ? t.scrollTo({ left: a, behavior: "smooth" }) : n > t.scrollLeft + t.clientWidth && t.scrollTo({ left: n - t.clientWidth, behavior: "smooth" });
117
+ }
118
+ function F(e) {
119
+ const t = e.querySelector(':scope > [role="tablist"]'), a = e.querySelector(
120
+ ':scope > [data-cf-action="scroll-code-tabs"][data-cf-direction="-1"]'
121
+ ), n = e.querySelector(
122
+ ':scope > [data-cf-action="scroll-code-tabs"][data-cf-direction="1"]'
123
+ );
124
+ if (!t || !a || !n) return;
125
+ const s = Math.max(0, t.scrollWidth - t.clientWidth);
126
+ a.hidden = s <= 1 || t.scrollLeft <= 1, n.hidden = s <= 1 || t.scrollLeft >= s - 1;
127
+ }
128
+ function P(e, t) {
129
+ for (const a of T(e, '.cf-code-group[data-cf-behavior="tabs"]')) {
130
+ if (t.tabOverflow.has(a)) continue;
131
+ const n = a.querySelector(':scope > [role="tablist"]');
132
+ if (!n) continue;
133
+ t.tabOverflow.add(a);
134
+ const r = [
135
+ ...a.querySelectorAll(':scope > [data-cf-action="scroll-code-tabs"]')
136
+ ].map((i) => f(i, ["hidden"])), o = () => F(a);
137
+ n.addEventListener("scroll", o, { passive: !0 });
138
+ const c = typeof ResizeObserver > "u" ? void 0 : new ResizeObserver(o);
139
+ c?.observe(n), o(), E(t, "tabs", () => {
140
+ n.removeEventListener("scroll", o), c?.disconnect(), r.forEach((i) => i()), t.tabOverflow.delete(a);
141
+ });
142
+ }
143
+ }
144
+ function M(e, t, a, n = !1) {
145
+ if (t.disabled || t.getAttribute("aria-disabled") === "true") return;
146
+ const s = L(e), r = [...e.querySelectorAll('[role="tabpanel"][data-cf-tab-panel]')];
147
+ if (!a.tabs.has(e)) {
148
+ a.tabs.add(e);
149
+ const c = s.map(
150
+ (l) => f(l, ["aria-selected", "tabindex"])
151
+ ), i = r.map((l) => f(l, ["hidden"]));
152
+ E(a, "tabs", () => {
153
+ [...c, ...i].forEach((l) => l()), a.tabs.delete(e);
154
+ });
155
+ }
156
+ const o = t.dataset.cfTab ?? "";
157
+ s.forEach((c) => {
158
+ const i = c === t;
159
+ c.setAttribute("aria-selected", String(i)), c.tabIndex = i ? 0 : -1;
160
+ }), r.forEach((c) => {
161
+ c.hidden = c.dataset.cfTabPanel !== o;
162
+ }), K(t), n && t.focus();
163
+ }
164
+ function j(e, t, a, n) {
165
+ if (!["ArrowLeft", "ArrowRight", "ArrowUp", "ArrowDown", "Home", "End"].includes(a.key)) return;
166
+ const r = L(e).filter(
167
+ (i) => !i.disabled && i.getAttribute("aria-disabled") !== "true"
168
+ ), o = r.indexOf(t);
169
+ if (o < 0 || !r.length) return;
170
+ a.preventDefault();
171
+ const c = a.key === "Home" ? r[0] : a.key === "End" ? r.at(-1) : r[(o + (a.key === "ArrowRight" || a.key === "ArrowDown" ? 1 : -1) + r.length) % r.length];
172
+ c && M(e, c, n, !0);
173
+ }
174
+ function V(e, t) {
175
+ const a = e.closest("[data-cf-file-tree-branch]"), n = a?.querySelector(":scope > .cf-file-tree-children, :scope > ul");
176
+ if (!a || !n) return;
177
+ if (!t.fileTrees.has(e)) {
178
+ t.fileTrees.add(e);
179
+ const o = f(e, ["aria-expanded"]), c = f(a, ["data-cf-state"]), i = f(n, ["data-cf-state", "aria-hidden", "inert"]);
180
+ E(t, "file-tree", () => {
181
+ o(), c(), i(), t.fileTrees.delete(e);
182
+ });
183
+ }
184
+ const r = !(e.getAttribute("aria-expanded") !== "false");
185
+ e.setAttribute("aria-expanded", String(r)), a.dataset.cfState = r ? "expanded" : "collapsed", n.dataset.cfState = r ? "expanded" : "collapsed", r ? n.removeAttribute("aria-hidden") : n.setAttribute("aria-hidden", "true"), C(n, !r);
186
+ }
187
+ function U(e) {
188
+ const t = {
189
+ owners: 0,
190
+ behaviorOwners: /* @__PURE__ */ new Map(),
191
+ details: /* @__PURE__ */ new WeakSet(),
192
+ tabs: /* @__PURE__ */ new WeakSet(),
193
+ tabOverflow: /* @__PURE__ */ new WeakSet(),
194
+ fileTrees: /* @__PURE__ */ new WeakSet(),
195
+ cleanup: [],
196
+ behaviorCleanup: /* @__PURE__ */ new Map(),
197
+ feedback: /* @__PURE__ */ new Map()
198
+ }, a = e, n = (r) => {
199
+ if (!(r.target instanceof Element) || r.target.closest('[data-cf-runtime="react"]')) return;
200
+ const c = h(
201
+ e,
202
+ r.target,
203
+ 'details[data-cf-behavior="details"] > summary'
204
+ )?.parentElement;
205
+ c && d(t, "details") && queueMicrotask(() => {
206
+ d(t, "details") && O(c);
207
+ });
208
+ const i = h(e, r.target, '[role="tab"][data-cf-tab]'), l = i?.closest('[data-cf-behavior="tabs"]');
209
+ if (i && l && d(t, "tabs")) {
210
+ r.preventDefault(), M(l, i, t);
211
+ return;
212
+ }
213
+ const p = h(
214
+ e,
215
+ r.target,
216
+ '[data-cf-action="scroll-code-tabs"]'
217
+ ), b = p?.closest('.cf-code-group[data-cf-behavior="tabs"]'), u = b?.querySelector(':scope > [role="tablist"]');
218
+ if (p && b && u && d(t, "tabs")) {
219
+ r.preventDefault(), typeof u.scrollBy == "function" && u.scrollBy({
220
+ left: Number(p.dataset.cfDirection || 1) * Math.max(180, u.clientWidth * 0.72),
221
+ behavior: "smooth"
222
+ });
223
+ return;
224
+ }
225
+ const y = h(
226
+ e,
227
+ r.target,
228
+ '[data-cf-action="toggle-file-tree"]'
229
+ );
230
+ if (y && d(t, "file-tree")) {
231
+ r.preventDefault(), V(y, t);
232
+ return;
233
+ }
234
+ const k = h(e, r.target, "[data-cf-action]");
235
+ k?.dataset.cfAction && z(k.dataset.cfAction, k, t);
236
+ }, s = (r) => {
237
+ if (!(r instanceof KeyboardEvent) || !(r.target instanceof HTMLButtonElement) || r.target.closest('[data-cf-runtime="react"]')) return;
238
+ const o = r.target.closest('[data-cf-behavior="tabs"]');
239
+ o && d(t, "tabs") && j(o, r.target, r, t);
240
+ };
241
+ return a.addEventListener("click", n), a.addEventListener("keydown", s), t.cleanup.push(() => a.removeEventListener("click", n)), t.cleanup.push(() => a.removeEventListener("keydown", s)), t;
242
+ }
243
+ function Y(e, t) {
244
+ const a = A.get(e) ?? U(e);
245
+ A.set(e, a);
246
+ const n = [...new Set(t)];
247
+ a.owners += 1, n.forEach(
248
+ (r) => a.behaviorOwners.set(r, (a.behaviorOwners.get(r) ?? 0) + 1)
249
+ ), d(a, "details") && _(e, a), d(a, "tabs") && P(e, a);
250
+ let s = !1;
251
+ return () => {
252
+ s || (s = !0, a.owners -= 1, n.forEach((r) => {
253
+ const o = (a.behaviorOwners.get(r) ?? 1) - 1;
254
+ o > 0 ? a.behaviorOwners.set(r, o) : (a.behaviorOwners.delete(r), H(a, r));
255
+ }), !(a.owners > 0) && (a.cleanup.splice(0).forEach((r) => r()), A.delete(e)));
256
+ };
257
+ }
258
+ const R = {
259
+ gallery: '[data-cf-island="gallery"]',
260
+ image: '[data-cf-island="image"]',
261
+ table: '[data-cf-island="table"]'
262
+ }, v = {
263
+ gallery: () => import("./gallery-BTg1qJjd.js"),
264
+ image: () => import("./image-BuMCsr5L.js"),
265
+ table: () => import("./table-JOSJsHgy.js")
266
+ }, w = /* @__PURE__ */ new WeakMap(), m = /* @__PURE__ */ new WeakSet(), g = /* @__PURE__ */ new WeakSet();
267
+ function q(e) {
268
+ return [...new Set(e)].filter((t) => Object.hasOwn(v, t));
269
+ }
270
+ function W(e, t) {
271
+ return [...e instanceof HTMLElement && e.matches(t) ? [e] : [], ...e.querySelectorAll(t)].filter(
272
+ (n) => !n.closest('[data-cf-runtime="react"]')
273
+ );
274
+ }
275
+ async function G(e = document, t = Object.keys(v), a = {}) {
276
+ const n = q(t);
277
+ await Promise.all(
278
+ n.map(async (s) => {
279
+ const r = W(e, R[s]).filter(
280
+ (o) => !w.has(o) && !m.has(o)
281
+ );
282
+ if (r.length) {
283
+ r.forEach((o) => {
284
+ g.delete(o), m.add(o);
285
+ });
286
+ try {
287
+ const o = await v[s]();
288
+ for (const c of r) {
289
+ if (g.has(c) || w.has(c)) continue;
290
+ const i = o.hydrate(c, a);
291
+ i && w.set(c, i);
292
+ }
293
+ } finally {
294
+ r.forEach((o) => {
295
+ m.delete(o), g.delete(o);
296
+ });
297
+ }
298
+ }
299
+ })
300
+ );
301
+ }
302
+ function J(e = document, t = Object.keys(v)) {
303
+ for (const a of q(t))
304
+ for (const n of W(e, R[a])) {
305
+ m.has(n) && g.add(n);
306
+ const s = w.get(n);
307
+ s && (s.unmount(), w.delete(n));
308
+ }
309
+ }
310
+ const S = /* @__PURE__ */ new WeakMap();
311
+ function Q(e = document, t = { behaviors: [...x] }) {
312
+ const a = [...new Set(t.behaviors)].filter((c) => x.includes(c)), n = S.get(e) ?? { behaviorOwners: /* @__PURE__ */ new Map() };
313
+ S.set(e, n), a.forEach(
314
+ (c) => n.behaviorOwners.set(c, (n.behaviorOwners.get(c) ?? 0) + 1)
315
+ );
316
+ const s = Y(e, a), r = G(e, a);
317
+ let o = !1;
318
+ return {
319
+ ready: r,
320
+ dispose() {
321
+ if (o) return;
322
+ o = !0, s();
323
+ const c = a.filter((i) => {
324
+ const l = (n.behaviorOwners.get(i) ?? 1) - 1;
325
+ return l > 0 ? (n.behaviorOwners.set(i, l), !1) : (n.behaviorOwners.delete(i), !0);
326
+ });
327
+ J(e, c), n.behaviorOwners.size === 0 && S.delete(e);
328
+ }
329
+ };
330
+ }
331
+ export {
332
+ D as c,
333
+ Q as e
334
+ };
@@ -0,0 +1,40 @@
1
+ import { c as s, j as r } from "./react-runtime-Dzgdzn6D.js";
2
+ import { w as l, I as n } from "./provider-DNSHvvN7.js";
3
+ function i(e) {
4
+ try {
5
+ const a = JSON.parse(e.dataset.cfGalleryItems ?? "[]");
6
+ return Array.isArray(a) ? a.filter(
7
+ (t) => !!(t && typeof t == "object" && typeof t.src == "string" && typeof t.alt == "string")
8
+ ) : [];
9
+ } catch {
10
+ return [];
11
+ }
12
+ }
13
+ function u(e, a) {
14
+ return s.hydrateRoot(
15
+ e,
16
+ l(
17
+ /* @__PURE__ */ r.jsx(
18
+ n,
19
+ {
20
+ items: i(e),
21
+ className: e.className || void 0,
22
+ role: e.getAttribute("role") === "region" ? "region" : "group",
23
+ labels: {
24
+ gallery: e.dataset.cfGalleryLabel,
25
+ close: e.dataset.cfCloseLabel,
26
+ previous: e.dataset.cfPreviousLabel,
27
+ next: e.dataset.cfNextLabel,
28
+ thumbnails: e.dataset.cfThumbnailsLabel,
29
+ image: e.dataset.cfImageLabel
30
+ },
31
+ inner: !0
32
+ }
33
+ ),
34
+ a
35
+ )
36
+ );
37
+ }
38
+ export {
39
+ u as hydrate
40
+ };
@@ -0,0 +1,40 @@
1
+ import { c as s, j as r } from "./react-runtime-Dzgdzn6D.js";
2
+ import { w as l, I as n } from "./provider-SSQfNDJA.js";
3
+ function i(e) {
4
+ try {
5
+ const a = JSON.parse(e.dataset.dfGalleryItems ?? "[]");
6
+ return Array.isArray(a) ? a.filter(
7
+ (t) => !!(t && typeof t == "object" && typeof t.src == "string" && typeof t.alt == "string")
8
+ ) : [];
9
+ } catch {
10
+ return [];
11
+ }
12
+ }
13
+ function u(e, a) {
14
+ return s.hydrateRoot(
15
+ e,
16
+ l(
17
+ /* @__PURE__ */ r.jsx(
18
+ n,
19
+ {
20
+ items: i(e),
21
+ className: e.className || void 0,
22
+ role: e.getAttribute("role") === "region" ? "region" : "group",
23
+ labels: {
24
+ gallery: e.dataset.dfGalleryLabel,
25
+ close: e.dataset.dfCloseLabel,
26
+ previous: e.dataset.dfPreviousLabel,
27
+ next: e.dataset.dfNextLabel,
28
+ thumbnails: e.dataset.dfThumbnailsLabel,
29
+ image: e.dataset.dfImageLabel
30
+ },
31
+ inner: !0
32
+ }
33
+ ),
34
+ a
35
+ )
36
+ );
37
+ }
38
+ export {
39
+ u as hydrate
40
+ };
@@ -0,0 +1,36 @@
1
+ import { c as r, j as d } from "./react-runtime-Dzgdzn6D.js";
2
+ import { r as s, M as o } from "./serialized-T1PzI4rG.js";
3
+ import { w as l } from "./provider-DNSHvvN7.js";
4
+ function u(i, a) {
5
+ const t = i.querySelector("img");
6
+ if (!t) return;
7
+ const e = s(i.dataset.cfIslandData, a);
8
+ return r.hydrateRoot(
9
+ i,
10
+ l(
11
+ /* @__PURE__ */ d.jsx(
12
+ o,
13
+ {
14
+ src: e ? void 0 : t.getAttribute("src") ?? "",
15
+ alt: e ? void 0 : t.getAttribute("alt") ?? "",
16
+ title: e ? void 0 : t.getAttribute("title") ?? void 0,
17
+ width: e ? void 0 : t.getAttribute("width") ?? void 0,
18
+ height: e ? void 0 : t.getAttribute("height") ?? void 0,
19
+ loading: e || !t.hasAttribute("loading") ? void 0 : t.getAttribute("loading") === "eager" ? "eager" : "lazy",
20
+ srcSet: e ? void 0 : t.getAttribute("srcset") ?? void 0,
21
+ sizes: e ? void 0 : t.getAttribute("sizes") ?? void 0,
22
+ caption: e ? void 0 : i.querySelector("figcaption")?.textContent ?? void 0,
23
+ className: i.className || void 0,
24
+ zoomLabel: i.dataset.cfZoomLabel,
25
+ closeLabel: i.dataset.cfCloseLabel,
26
+ inner: !0,
27
+ children: e
28
+ }
29
+ ),
30
+ a
31
+ )
32
+ );
33
+ }
34
+ export {
35
+ u as hydrate
36
+ };
@@ -0,0 +1,36 @@
1
+ import { c as d, j as r } from "./react-runtime-Dzgdzn6D.js";
2
+ import { r as s, M as o } from "./serialized-DajnRKXi.js";
3
+ import { w as l } from "./provider-SSQfNDJA.js";
4
+ function u(i, a) {
5
+ const t = i.querySelector("img");
6
+ if (!t) return;
7
+ const e = s(i.dataset.dfIslandData, a);
8
+ return d.hydrateRoot(
9
+ i,
10
+ l(
11
+ /* @__PURE__ */ r.jsx(
12
+ o,
13
+ {
14
+ src: e ? void 0 : t.getAttribute("src") ?? "",
15
+ alt: e ? void 0 : t.getAttribute("alt") ?? "",
16
+ title: e ? void 0 : t.getAttribute("title") ?? void 0,
17
+ width: e ? void 0 : t.getAttribute("width") ?? void 0,
18
+ height: e ? void 0 : t.getAttribute("height") ?? void 0,
19
+ loading: e || !t.hasAttribute("loading") ? void 0 : t.getAttribute("loading") === "eager" ? "eager" : "lazy",
20
+ srcSet: e ? void 0 : t.getAttribute("srcset") ?? void 0,
21
+ sizes: e ? void 0 : t.getAttribute("sizes") ?? void 0,
22
+ caption: e ? void 0 : i.querySelector("figcaption")?.textContent ?? void 0,
23
+ className: i.className || void 0,
24
+ zoomLabel: i.dataset.dfZoomLabel,
25
+ closeLabel: i.dataset.dfCloseLabel,
26
+ inner: !0,
27
+ children: e
28
+ }
29
+ ),
30
+ a
31
+ )
32
+ );
33
+ }
34
+ export {
35
+ u as hydrate
36
+ };