@storyblok/astro 5.0.1 → 5.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/storyblok-astro.js +6 -6
- package/dist/storyblok-astro.mjs +329 -327
- package/package.json +4 -4
package/dist/storyblok-astro.mjs
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
function Or(o, r, t) {
|
|
2
|
-
const
|
|
2
|
+
const s = "virtual:storyblok-init", i = "\0" + s;
|
|
3
3
|
return {
|
|
4
4
|
name: "vite-plugin-storyblok-init",
|
|
5
5
|
async resolveId(l) {
|
|
6
|
-
if (l ===
|
|
7
|
-
return
|
|
6
|
+
if (l === s)
|
|
7
|
+
return i;
|
|
8
8
|
},
|
|
9
9
|
async load(l) {
|
|
10
|
-
if (l ===
|
|
10
|
+
if (l === i)
|
|
11
11
|
return `
|
|
12
12
|
import { storyblokInit, apiPlugin } from "@storyblok/js";
|
|
13
13
|
const { storyblokApi } = storyblokInit({
|
|
@@ -20,15 +20,15 @@ function Or(o, r, t) {
|
|
|
20
20
|
}
|
|
21
21
|
};
|
|
22
22
|
}
|
|
23
|
-
const Cr = /[\p{Lu}]/u, jr = /[\p{Ll}]/u,
|
|
24
|
-
let
|
|
25
|
-
for (let
|
|
26
|
-
const
|
|
27
|
-
f =
|
|
23
|
+
const Cr = /[\p{Lu}]/u, jr = /[\p{Ll}]/u, Ne = /^[\p{Lu}](?![\p{Lu}])/gu, Ge = /([\p{Alpha}\p{N}_]|$)/u, fe = /[_.\- ]+/, xr = new RegExp("^" + fe.source), ze = new RegExp(fe.source + Ge.source, "gu"), Le = new RegExp("\\d+" + Ge.source, "gu"), $r = (o, r, t, s) => {
|
|
24
|
+
let i = !1, l = !1, u = !1, f = !1;
|
|
25
|
+
for (let p = 0; p < o.length; p++) {
|
|
26
|
+
const y = o[p];
|
|
27
|
+
f = p > 2 ? o[p - 3] === "-" : !0, i && Cr.test(y) ? (o = o.slice(0, p) + "-" + o.slice(p), i = !1, u = l, l = !0, p++) : l && u && jr.test(y) && (!f || s) ? (o = o.slice(0, p - 1) + "-" + o.slice(p - 1), u = l, l = !1, i = !0) : (i = r(y) === y && t(y) !== y, u = l, l = t(y) === y && r(y) !== y);
|
|
28
28
|
}
|
|
29
29
|
return o;
|
|
30
|
-
}, Er = (o, r) => (
|
|
31
|
-
function
|
|
30
|
+
}, Er = (o, r) => (Ne.lastIndex = 0, o.replaceAll(Ne, (t) => r(t))), Rr = (o, r) => (ze.lastIndex = 0, Le.lastIndex = 0, o.replaceAll(Le, (t, s, i) => ["_", "-"].includes(o.charAt(i + t.length)) ? t : r(t)).replaceAll(ze, (t, s) => r(s)));
|
|
31
|
+
function De(o, r) {
|
|
32
32
|
if (!(typeof o == "string" || Array.isArray(o)))
|
|
33
33
|
throw new TypeError("Expected the input to be `string | string[]`");
|
|
34
34
|
if (r = {
|
|
@@ -37,42 +37,42 @@ function Ue(o, r) {
|
|
|
37
37
|
...r
|
|
38
38
|
}, Array.isArray(o) ? o = o.map((l) => l.trim()).filter((l) => l.length).join("-") : o = o.trim(), o.length === 0)
|
|
39
39
|
return "";
|
|
40
|
-
const t = r.locale === !1 ? (l) => l.toLowerCase() : (l) => l.toLocaleLowerCase(r.locale),
|
|
41
|
-
return o.length === 1 ? fe.test(o) ? "" : r.pascalCase ?
|
|
40
|
+
const t = r.locale === !1 ? (l) => l.toLowerCase() : (l) => l.toLocaleLowerCase(r.locale), s = r.locale === !1 ? (l) => l.toUpperCase() : (l) => l.toLocaleUpperCase(r.locale);
|
|
41
|
+
return o.length === 1 ? fe.test(o) ? "" : r.pascalCase ? s(o) : t(o) : (o !== t(o) && (o = $r(o, t, s, r.preserveConsecutiveUppercase)), o = o.replace(xr, ""), o = r.preserveConsecutiveUppercase ? Er(o, t) : t(o), r.pascalCase && (o = s(o.charAt(0)) + o.slice(1)), Rr(o, s));
|
|
42
42
|
}
|
|
43
|
-
function Pr(o, r, t,
|
|
44
|
-
const
|
|
43
|
+
function Pr(o, r, t, s) {
|
|
44
|
+
const i = "virtual:storyblok-components", l = "\0" + i;
|
|
45
45
|
return {
|
|
46
46
|
name: "vite-plugin-storyblok-components",
|
|
47
47
|
async resolveId(u) {
|
|
48
|
-
if (u ===
|
|
48
|
+
if (u === i)
|
|
49
49
|
return l;
|
|
50
50
|
},
|
|
51
51
|
async load(u) {
|
|
52
52
|
if (u === l) {
|
|
53
|
-
const f = [],
|
|
53
|
+
const f = [], p = [];
|
|
54
54
|
for await (const [_, k] of Object.entries(r)) {
|
|
55
|
-
const
|
|
55
|
+
const A = await this.resolve(
|
|
56
56
|
"/" + o + "/" + k + ".astro"
|
|
57
57
|
);
|
|
58
|
-
if (
|
|
59
|
-
f.push(`import ${
|
|
58
|
+
if (A)
|
|
59
|
+
f.push(`import ${De(_)} from "${A.id}"`);
|
|
60
60
|
else if (t)
|
|
61
|
-
|
|
61
|
+
p.push(_);
|
|
62
62
|
else
|
|
63
63
|
throw new Error(
|
|
64
64
|
`Component could not be found for blok "${_}"! Does "${"/" + o + "/" + k}.astro" exist?`
|
|
65
65
|
);
|
|
66
66
|
}
|
|
67
|
-
let
|
|
67
|
+
let y = "";
|
|
68
68
|
if (t)
|
|
69
|
-
if (
|
|
69
|
+
if (y = ",FallbackComponent", s) {
|
|
70
70
|
const _ = await this.resolve(
|
|
71
|
-
"/" + o + "/" +
|
|
71
|
+
"/" + o + "/" + s + ".astro"
|
|
72
72
|
);
|
|
73
73
|
if (!_)
|
|
74
74
|
throw new Error(
|
|
75
|
-
`Custom fallback component could not be found. Does "${"/" + o + "/" +
|
|
75
|
+
`Custom fallback component could not be found. Does "${"/" + o + "/" + s}.astro" exist?`
|
|
76
76
|
);
|
|
77
77
|
f.push(
|
|
78
78
|
`import FallbackComponent from "${_.id}"`
|
|
@@ -82,9 +82,9 @@ function Pr(o, r, t, i) {
|
|
|
82
82
|
"import FallbackComponent from '@storyblok/astro/FallbackComponent.astro'"
|
|
83
83
|
);
|
|
84
84
|
if (Object.values(r).length)
|
|
85
|
-
return `${f.join(";")};export default {${Object.keys(r).filter((_) => !
|
|
85
|
+
return `${f.join(";")};export default {${Object.keys(r).filter((_) => !p.includes(_)).map((_) => De(_)).join(",")}${y}}`;
|
|
86
86
|
if (t)
|
|
87
|
-
return `${f[0]}; export default {${
|
|
87
|
+
return `${f[0]}; export default {${y.replace(",", "")}}`;
|
|
88
88
|
throw new Error(
|
|
89
89
|
`Currently, no Storyblok components are registered in astro.config.mjs.
|
|
90
90
|
Please register your components or enable the fallback component.
|
|
@@ -98,49 +98,49 @@ function Mr(o) {
|
|
|
98
98
|
const r = "virtual:storyblok-options", t = "\0" + r;
|
|
99
99
|
return {
|
|
100
100
|
name: "vite-plugin-storyblok-options",
|
|
101
|
-
async resolveId(
|
|
102
|
-
if (
|
|
101
|
+
async resolveId(s) {
|
|
102
|
+
if (s === r)
|
|
103
103
|
return t;
|
|
104
104
|
},
|
|
105
|
-
async load(
|
|
106
|
-
if (
|
|
105
|
+
async load(s) {
|
|
106
|
+
if (s === t)
|
|
107
107
|
return `export default ${JSON.stringify(o)}`;
|
|
108
108
|
}
|
|
109
109
|
};
|
|
110
110
|
}
|
|
111
|
-
let
|
|
112
|
-
const
|
|
113
|
-
if (typeof window > "u" || (window.storyblokRegisterEvent = (
|
|
111
|
+
let Ue = !1;
|
|
112
|
+
const Be = [], Nr = (o) => new Promise((r, t) => {
|
|
113
|
+
if (typeof window > "u" || (window.storyblokRegisterEvent = (i) => {
|
|
114
114
|
if (window.location === window.parent.location) {
|
|
115
115
|
console.warn("You are not in Draft Mode or in the Visual Editor.");
|
|
116
116
|
return;
|
|
117
117
|
}
|
|
118
|
-
|
|
118
|
+
Ue ? i() : Be.push(i);
|
|
119
119
|
}, document.getElementById("storyblok-javascript-bridge"))) return;
|
|
120
|
-
const
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
}, document.getElementsByTagName("head")[0].appendChild(
|
|
120
|
+
const s = document.createElement("script");
|
|
121
|
+
s.async = !0, s.src = o, s.id = "storyblok-javascript-bridge", s.onerror = (i) => t(i), s.onload = (i) => {
|
|
122
|
+
Be.forEach((l) => l()), Ue = !0, r(i);
|
|
123
|
+
}, document.getElementsByTagName("head")[0].appendChild(s);
|
|
124
124
|
});
|
|
125
|
-
var zr = Object.defineProperty, Lr = (o, r, t) => r in o ? zr(o, r, { enumerable: !0, configurable: !0, writable: !0, value: t }) : o[r] = t, S = (o, r, t) =>
|
|
125
|
+
var zr = Object.defineProperty, Lr = (o, r, t) => r in o ? zr(o, r, { enumerable: !0, configurable: !0, writable: !0, value: t }) : o[r] = t, S = (o, r, t) => Lr(o, typeof r != "symbol" ? r + "" : r, t);
|
|
126
126
|
class Dr {
|
|
127
127
|
constructor() {
|
|
128
|
-
S(this, "isCDNUrl", (r = "") => r.indexOf("/cdn/") > -1), S(this, "getOptionsPage", (r, t = 25,
|
|
128
|
+
S(this, "isCDNUrl", (r = "") => r.indexOf("/cdn/") > -1), S(this, "getOptionsPage", (r, t = 25, s = 1) => ({
|
|
129
129
|
...r,
|
|
130
130
|
per_page: t,
|
|
131
|
-
page:
|
|
131
|
+
page: s
|
|
132
132
|
})), S(this, "delay", (r) => new Promise((t) => setTimeout(t, r))), S(this, "arrayFrom", (r = 0, t) => [...Array(r)].map(t)), S(this, "range", (r = 0, t = r) => {
|
|
133
|
-
const
|
|
134
|
-
return this.arrayFrom(
|
|
135
|
-
}), S(this, "asyncMap", async (r, t) => Promise.all(r.map(t))), S(this, "flatMap", (r = [], t) => r.map(t).reduce((
|
|
133
|
+
const s = Math.abs(t - r) || 0, i = r < t ? 1 : -1;
|
|
134
|
+
return this.arrayFrom(s, (l, u) => u * i + r);
|
|
135
|
+
}), S(this, "asyncMap", async (r, t) => Promise.all(r.map(t))), S(this, "flatMap", (r = [], t) => r.map(t).reduce((s, i) => [...s, ...i], [])), S(this, "escapeHTML", function(r) {
|
|
136
136
|
const t = {
|
|
137
137
|
"&": "&",
|
|
138
138
|
"<": "<",
|
|
139
139
|
">": ">",
|
|
140
140
|
'"': """,
|
|
141
141
|
"'": "'"
|
|
142
|
-
},
|
|
143
|
-
return r &&
|
|
142
|
+
}, s = /[&<>"']/g, i = RegExp(s.source);
|
|
143
|
+
return r && i.test(r) ? r.replace(s, (l) => t[l]) : r;
|
|
144
144
|
});
|
|
145
145
|
}
|
|
146
146
|
/**
|
|
@@ -150,20 +150,20 @@ class Dr {
|
|
|
150
150
|
* @param {Boolean} isArray
|
|
151
151
|
* @return {String} Stringified object
|
|
152
152
|
*/
|
|
153
|
-
stringify(r, t,
|
|
154
|
-
const
|
|
153
|
+
stringify(r, t, s) {
|
|
154
|
+
const i = [];
|
|
155
155
|
for (const l in r) {
|
|
156
156
|
if (!Object.prototype.hasOwnProperty.call(r, l))
|
|
157
157
|
continue;
|
|
158
|
-
const u = r[l], f =
|
|
159
|
-
let
|
|
160
|
-
typeof u == "object" ?
|
|
158
|
+
const u = r[l], f = s ? "" : encodeURIComponent(l);
|
|
159
|
+
let p;
|
|
160
|
+
typeof u == "object" ? p = this.stringify(
|
|
161
161
|
u,
|
|
162
162
|
t ? t + encodeURIComponent("[" + f + "]") : f,
|
|
163
163
|
Array.isArray(u)
|
|
164
|
-
) :
|
|
164
|
+
) : p = (t ? t + encodeURIComponent("[" + f + "]") : f) + "=" + encodeURIComponent(u), i.push(p);
|
|
165
165
|
}
|
|
166
|
-
return
|
|
166
|
+
return i.join("&");
|
|
167
167
|
}
|
|
168
168
|
/**
|
|
169
169
|
* @method getRegionURL
|
|
@@ -171,12 +171,12 @@ class Dr {
|
|
|
171
171
|
* @return {String} The base URL of the region
|
|
172
172
|
*/
|
|
173
173
|
getRegionURL(r) {
|
|
174
|
-
const t = "api.storyblok.com",
|
|
174
|
+
const t = "api.storyblok.com", s = "api-us.storyblok.com", i = "app.storyblokchina.cn", l = "api-ap.storyblok.com", u = "api-ca.storyblok.com";
|
|
175
175
|
switch (r) {
|
|
176
176
|
case "us":
|
|
177
|
-
return i;
|
|
178
|
-
case "cn":
|
|
179
177
|
return s;
|
|
178
|
+
case "cn":
|
|
179
|
+
return i;
|
|
180
180
|
case "ap":
|
|
181
181
|
return l;
|
|
182
182
|
case "ca":
|
|
@@ -188,9 +188,9 @@ class Dr {
|
|
|
188
188
|
}
|
|
189
189
|
const Ur = function(o, r) {
|
|
190
190
|
const t = {};
|
|
191
|
-
for (const
|
|
192
|
-
const
|
|
193
|
-
r.indexOf(
|
|
191
|
+
for (const s in o) {
|
|
192
|
+
const i = o[s];
|
|
193
|
+
r.indexOf(s) > -1 && i !== null && (t[s] = i);
|
|
194
194
|
}
|
|
195
195
|
return t;
|
|
196
196
|
}, Br = (o) => o === "email", Fr = () => ({
|
|
@@ -218,13 +218,13 @@ const Ur = function(o, r) {
|
|
|
218
218
|
attrs: Ur(o.attrs, ["src", "alt", "title"])
|
|
219
219
|
}
|
|
220
220
|
]
|
|
221
|
-
}),
|
|
221
|
+
}), Xr = () => ({
|
|
222
222
|
tag: "li"
|
|
223
|
-
}),
|
|
223
|
+
}), Yr = () => ({
|
|
224
224
|
tag: "ol"
|
|
225
|
-
}),
|
|
225
|
+
}), Zr = () => ({
|
|
226
226
|
tag: "p"
|
|
227
|
-
}),
|
|
227
|
+
}), Qr = (o) => ({
|
|
228
228
|
tag: [
|
|
229
229
|
{
|
|
230
230
|
tag: "span",
|
|
@@ -235,7 +235,7 @@ const Ur = function(o, r) {
|
|
|
235
235
|
}
|
|
236
236
|
}
|
|
237
237
|
]
|
|
238
|
-
}),
|
|
238
|
+
}), Vr = () => ({
|
|
239
239
|
tag: "b"
|
|
240
240
|
}), en = () => ({
|
|
241
241
|
tag: "s"
|
|
@@ -252,10 +252,10 @@ const Ur = function(o, r) {
|
|
|
252
252
|
return {
|
|
253
253
|
tag: ""
|
|
254
254
|
};
|
|
255
|
-
const r = new Dr().escapeHTML, t = { ...o.attrs }, { linktype:
|
|
256
|
-
if (delete t.linktype, t.href && (t.href = r(o.attrs.href || "")), Br(
|
|
257
|
-
for (const
|
|
258
|
-
t[
|
|
255
|
+
const r = new Dr().escapeHTML, t = { ...o.attrs }, { linktype: s = "url" } = o.attrs;
|
|
256
|
+
if (delete t.linktype, t.href && (t.href = r(o.attrs.href || "")), Br(s) && (t.href = `mailto:${t.href}`), t.anchor && (t.href = `${t.href}#${t.anchor}`, delete t.anchor), t.custom) {
|
|
257
|
+
for (const i in t.custom)
|
|
258
|
+
t[i] = t.custom[i];
|
|
259
259
|
delete t.custom;
|
|
260
260
|
}
|
|
261
261
|
return {
|
|
@@ -298,7 +298,7 @@ const Ur = function(o, r) {
|
|
|
298
298
|
} : {
|
|
299
299
|
tag: ""
|
|
300
300
|
};
|
|
301
|
-
},
|
|
301
|
+
}, dn = (o) => {
|
|
302
302
|
var r;
|
|
303
303
|
return (r = o.attrs) != null && r.color ? {
|
|
304
304
|
tag: [
|
|
@@ -312,7 +312,7 @@ const Ur = function(o, r) {
|
|
|
312
312
|
} : {
|
|
313
313
|
tag: ""
|
|
314
314
|
};
|
|
315
|
-
},
|
|
315
|
+
}, pn = {
|
|
316
316
|
nodes: {
|
|
317
317
|
horizontal_rule: Fr,
|
|
318
318
|
blockquote: Hr,
|
|
@@ -321,13 +321,13 @@ const Ur = function(o, r) {
|
|
|
321
321
|
hard_break: Jr,
|
|
322
322
|
heading: Kr,
|
|
323
323
|
image: Wr,
|
|
324
|
-
list_item:
|
|
325
|
-
ordered_list:
|
|
326
|
-
paragraph:
|
|
327
|
-
emoji:
|
|
324
|
+
list_item: Xr,
|
|
325
|
+
ordered_list: Yr,
|
|
326
|
+
paragraph: Zr,
|
|
327
|
+
emoji: Qr
|
|
328
328
|
},
|
|
329
329
|
marks: {
|
|
330
|
-
bold:
|
|
330
|
+
bold: Vr,
|
|
331
331
|
strike: en,
|
|
332
332
|
underline: tn,
|
|
333
333
|
strong: rn,
|
|
@@ -339,7 +339,7 @@ const Ur = function(o, r) {
|
|
|
339
339
|
superscript: cn,
|
|
340
340
|
anchor: un,
|
|
341
341
|
highlight: fn,
|
|
342
|
-
textStyle:
|
|
342
|
+
textStyle: dn
|
|
343
343
|
}
|
|
344
344
|
}, gn = function(o) {
|
|
345
345
|
const r = {
|
|
@@ -348,12 +348,13 @@ const Ur = function(o, r) {
|
|
|
348
348
|
">": ">",
|
|
349
349
|
'"': """,
|
|
350
350
|
"'": "'"
|
|
351
|
-
}, t = /[&<>"']/g,
|
|
352
|
-
return o &&
|
|
351
|
+
}, t = /[&<>"']/g, s = RegExp(t.source);
|
|
352
|
+
return o && s.test(o) ? o.replace(t, (i) => r[i]) : o;
|
|
353
353
|
};
|
|
354
|
+
let Fe = !1;
|
|
354
355
|
class hn {
|
|
355
356
|
constructor(r) {
|
|
356
|
-
S(this, "marks"), S(this, "nodes"), r || (r =
|
|
357
|
+
S(this, "marks"), S(this, "nodes"), r || (r = pn), this.marks = r.marks || [], this.nodes = r.nodes || [];
|
|
357
358
|
}
|
|
358
359
|
addNode(r, t) {
|
|
359
360
|
this.nodes[r] = t;
|
|
@@ -361,11 +362,13 @@ class hn {
|
|
|
361
362
|
addMark(r, t) {
|
|
362
363
|
this.marks[r] = t;
|
|
363
364
|
}
|
|
364
|
-
render(r, t = { optimizeImages: !1 }) {
|
|
365
|
-
if (
|
|
365
|
+
render(r, t = { optimizeImages: !1 }, s = !0) {
|
|
366
|
+
if (!Fe && s && (console.warn(
|
|
367
|
+
"Warning ⚠️: The RichTextResolver class is deprecated and will be removed in the next major release. Please use the `@storyblok/richtext` package instead. https://github.com/storyblok/richtext/"
|
|
368
|
+
), Fe = !0), r && r.content && Array.isArray(r.content)) {
|
|
366
369
|
let i = "";
|
|
367
|
-
return r.content.forEach((
|
|
368
|
-
i += this.renderNode(
|
|
370
|
+
return r.content.forEach((l) => {
|
|
371
|
+
i += this.renderNode(l);
|
|
369
372
|
}), t.optimizeImages ? this.optimizeImages(i, t.optimizeImages) : i;
|
|
370
373
|
}
|
|
371
374
|
return console.warn(
|
|
@@ -396,20 +399,20 @@ class hn {
|
|
|
396
399
|
), "";
|
|
397
400
|
}
|
|
398
401
|
optimizeImages(r, t) {
|
|
399
|
-
let
|
|
400
|
-
typeof t != "boolean" && (typeof t.width == "number" && t.width > 0 && (l += `width="${t.width}" `,
|
|
401
|
-
const f =
|
|
402
|
+
let s = 0, i = 0, l = "", u = "";
|
|
403
|
+
typeof t != "boolean" && (typeof t.width == "number" && t.width > 0 && (l += `width="${t.width}" `, s = t.width), typeof t.height == "number" && t.height > 0 && (l += `height="${t.height}" `, i = t.height), (t.loading === "lazy" || t.loading === "eager") && (l += `loading="${t.loading}" `), typeof t.class == "string" && t.class.length > 0 && (l += `class="${t.class}" `), t.filters && (typeof t.filters.blur == "number" && t.filters.blur >= 0 && t.filters.blur <= 100 && (u += `:blur(${t.filters.blur})`), typeof t.filters.brightness == "number" && t.filters.brightness >= -100 && t.filters.brightness <= 100 && (u += `:brightness(${t.filters.brightness})`), t.filters.fill && (t.filters.fill.match(/[0-9A-Fa-f]{6}/g) || t.filters.fill === "transparent") && (u += `:fill(${t.filters.fill})`), t.filters.format && ["webp", "png", "jpeg"].includes(t.filters.format) && (u += `:format(${t.filters.format})`), typeof t.filters.grayscale == "boolean" && t.filters.grayscale && (u += ":grayscale()"), typeof t.filters.quality == "number" && t.filters.quality >= 0 && t.filters.quality <= 100 && (u += `:quality(${t.filters.quality})`), t.filters.rotate && [90, 180, 270].includes(t.filters.rotate) && (u += `:rotate(${t.filters.rotate})`), u.length > 0 && (u = "/filters" + u))), l.length > 0 && (r = r.replace(/<img/g, `<img ${l.trim()}`));
|
|
404
|
+
const f = s > 0 || i > 0 || u.length > 0 ? `${s}x${i}${u}` : "";
|
|
402
405
|
return r = r.replace(
|
|
403
406
|
/a.storyblok.com\/f\/(\d+)\/([^.]+)\.(gif|jpg|jpeg|png|tif|tiff|bmp)/g,
|
|
404
407
|
`a.storyblok.com/f/$1/$2.$3/m/${f}`
|
|
405
|
-
), typeof t != "boolean" && (t.sizes || t.srcset) && (r = r.replace(/<img.*?src=["|'](.*?)["|']/g, (
|
|
406
|
-
var
|
|
407
|
-
const k =
|
|
408
|
+
), typeof t != "boolean" && (t.sizes || t.srcset) && (r = r.replace(/<img.*?src=["|'](.*?)["|']/g, (p) => {
|
|
409
|
+
var y, _;
|
|
410
|
+
const k = p.match(
|
|
408
411
|
/a.storyblok.com\/f\/(\d+)\/([^.]+)\.(gif|jpg|jpeg|png|tif|tiff|bmp)/g
|
|
409
412
|
);
|
|
410
413
|
if (k && k.length > 0) {
|
|
411
|
-
const
|
|
412
|
-
srcset: (
|
|
414
|
+
const A = {
|
|
415
|
+
srcset: (y = t.srcset) == null ? void 0 : y.map((w) => {
|
|
413
416
|
if (typeof w == "number")
|
|
414
417
|
return `//${k}/m/${w}x0${u} ${w}w`;
|
|
415
418
|
if (typeof w == "object" && w.length === 2) {
|
|
@@ -420,39 +423,39 @@ class hn {
|
|
|
420
423
|
sizes: (_ = t.sizes) == null ? void 0 : _.map((w) => w).join(", ")
|
|
421
424
|
};
|
|
422
425
|
let O = "";
|
|
423
|
-
return
|
|
426
|
+
return A.srcset && (O += `srcset="${A.srcset}" `), A.sizes && (O += `sizes="${A.sizes}" `), p.replace(/<img/g, `<img ${O.trim()}`);
|
|
424
427
|
}
|
|
425
|
-
return
|
|
428
|
+
return p;
|
|
426
429
|
})), r;
|
|
427
430
|
}
|
|
428
431
|
renderNode(r) {
|
|
429
432
|
const t = [];
|
|
430
|
-
r.marks && r.marks.forEach((
|
|
431
|
-
const l = this.getMatchingMark(
|
|
433
|
+
r.marks && r.marks.forEach((i) => {
|
|
434
|
+
const l = this.getMatchingMark(i);
|
|
432
435
|
l && l.tag !== "" && t.push(this.renderOpeningTag(l.tag));
|
|
433
436
|
});
|
|
434
|
-
const
|
|
435
|
-
return
|
|
436
|
-
t.push(this.renderNode(
|
|
437
|
-
}) : r.text ? t.push(gn(r.text)) :
|
|
438
|
-
const l = this.getMatchingMark(
|
|
437
|
+
const s = this.getMatchingNode(r);
|
|
438
|
+
return s && s.tag && t.push(this.renderOpeningTag(s.tag)), r.content ? r.content.forEach((i) => {
|
|
439
|
+
t.push(this.renderNode(i));
|
|
440
|
+
}) : r.text ? t.push(gn(r.text)) : s && s.singleTag ? t.push(this.renderTag(s.singleTag, " /")) : s && s.html ? t.push(s.html) : r.type === "emoji" && t.push(this.renderEmoji(r)), s && s.tag && t.push(this.renderClosingTag(s.tag)), r.marks && r.marks.slice(0).reverse().forEach((i) => {
|
|
441
|
+
const l = this.getMatchingMark(i);
|
|
439
442
|
l && l.tag !== "" && t.push(this.renderClosingTag(l.tag));
|
|
440
443
|
}), t.join("");
|
|
441
444
|
}
|
|
442
445
|
renderTag(r, t) {
|
|
443
|
-
return r.constructor === String ? `<${r}${t}>` : r.map((
|
|
444
|
-
if (
|
|
445
|
-
return `<${
|
|
446
|
+
return r.constructor === String ? `<${r}${t}>` : r.map((s) => {
|
|
447
|
+
if (s.constructor === String)
|
|
448
|
+
return `<${s}${t}>`;
|
|
446
449
|
{
|
|
447
|
-
let
|
|
448
|
-
if (
|
|
449
|
-
for (const l in
|
|
450
|
-
if (Object.prototype.hasOwnProperty.call(
|
|
451
|
-
const u =
|
|
452
|
-
u !== null && (
|
|
450
|
+
let i = `<${s.tag}`;
|
|
451
|
+
if (s.attrs) {
|
|
452
|
+
for (const l in s.attrs)
|
|
453
|
+
if (Object.prototype.hasOwnProperty.call(s.attrs, l)) {
|
|
454
|
+
const u = s.attrs[l];
|
|
455
|
+
u !== null && (i += ` ${l}="${u}"`);
|
|
453
456
|
}
|
|
454
457
|
}
|
|
455
|
-
return `${
|
|
458
|
+
return `${i}${t}>`;
|
|
456
459
|
}
|
|
457
460
|
}).join("");
|
|
458
461
|
}
|
|
@@ -489,7 +492,7 @@ class hn {
|
|
|
489
492
|
return this.renderTag(t, " /");
|
|
490
493
|
}
|
|
491
494
|
}
|
|
492
|
-
const $n = (o) => {
|
|
495
|
+
const bn = hn, $n = (o) => {
|
|
493
496
|
if (typeof o != "object" || typeof o._editable > "u")
|
|
494
497
|
return {};
|
|
495
498
|
try {
|
|
@@ -504,61 +507,61 @@ const $n = (o) => {
|
|
|
504
507
|
return {};
|
|
505
508
|
}
|
|
506
509
|
};
|
|
507
|
-
let yn,
|
|
508
|
-
const
|
|
510
|
+
let yn, mn = "https://app.storyblok.com/f/storyblok-v2-latest.js";
|
|
511
|
+
const vn = (o, r) => {
|
|
509
512
|
o.addNode("blok", (t) => {
|
|
510
|
-
let
|
|
511
|
-
return t.attrs.body.forEach((
|
|
512
|
-
|
|
513
|
+
let s = "";
|
|
514
|
+
return t.attrs.body.forEach((i) => {
|
|
515
|
+
s += r(i.component, i);
|
|
513
516
|
}), {
|
|
514
|
-
html:
|
|
517
|
+
html: s
|
|
515
518
|
};
|
|
516
519
|
});
|
|
517
|
-
},
|
|
518
|
-
let
|
|
519
|
-
if (!
|
|
520
|
+
}, _n = (o) => !o || !(o != null && o.content.some((r) => r.content || r.type === "blok" || r.type === "horizontal_rule")), wn = (o, r, t) => {
|
|
521
|
+
let s = t || yn;
|
|
522
|
+
if (!s) {
|
|
520
523
|
console.error(
|
|
521
524
|
"Please initialize the Storyblok SDK before calling the renderRichText function"
|
|
522
525
|
);
|
|
523
526
|
return;
|
|
524
527
|
}
|
|
525
|
-
return
|
|
526
|
-
},
|
|
527
|
-
function
|
|
528
|
+
return _n(o) ? "" : (r && (s = new bn(r.schema), r.resolver && vn(s, r.resolver)), s.render(o, {}, !1));
|
|
529
|
+
}, En = () => Nr(mn);
|
|
530
|
+
function Tn(o) {
|
|
528
531
|
let r = {
|
|
529
532
|
resolveRelations: []
|
|
530
533
|
};
|
|
531
|
-
function t(
|
|
532
|
-
|
|
533
|
-
...Array.isArray(
|
|
534
|
+
function t(s) {
|
|
535
|
+
s && Array.isArray(r.resolveRelations) && r.resolveRelations.push(
|
|
536
|
+
...Array.isArray(s) ? s : [s]
|
|
534
537
|
);
|
|
535
538
|
}
|
|
536
|
-
for (const
|
|
537
|
-
if (
|
|
538
|
-
const { apiOptions:
|
|
539
|
-
if (t(
|
|
539
|
+
for (const s of o)
|
|
540
|
+
if (s.options) {
|
|
541
|
+
const { apiOptions: i, bridgeOptions: l } = s.options;
|
|
542
|
+
if (t(i == null ? void 0 : i.resolve_relations), l) {
|
|
540
543
|
const { resolveRelations: u, ...f } = l;
|
|
541
544
|
t(u), Object.assign(r, f);
|
|
542
545
|
}
|
|
543
546
|
}
|
|
544
547
|
return r.resolveRelations = [...new Set(r.resolveRelations)], r;
|
|
545
548
|
}
|
|
546
|
-
var
|
|
547
|
-
function
|
|
549
|
+
var Z = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
|
|
550
|
+
function kn(o) {
|
|
548
551
|
return o && o.__esModule && Object.prototype.hasOwnProperty.call(o, "default") ? o.default : o;
|
|
549
552
|
}
|
|
550
|
-
var
|
|
551
|
-
|
|
553
|
+
var Q = { exports: {} };
|
|
554
|
+
Q.exports;
|
|
552
555
|
(function(o, r) {
|
|
553
|
-
var t = 200,
|
|
554
|
-
|
|
555
|
-
var
|
|
556
|
+
var t = 200, s = "__lodash_hash_undefined__", i = 800, l = 16, u = 9007199254740991, f = "[object Arguments]", p = "[object Array]", y = "[object AsyncFunction]", _ = "[object Boolean]", k = "[object Date]", A = "[object Error]", O = "[object Function]", w = "[object GeneratorFunction]", M = "[object Map]", F = "[object Number]", Je = "[object Null]", de = "[object Object]", Ke = "[object Proxy]", We = "[object RegExp]", Xe = "[object Set]", Ye = "[object String]", Ze = "[object Undefined]", Qe = "[object WeakMap]", Ve = "[object ArrayBuffer]", et = "[object DataView]", tt = "[object Float32Array]", rt = "[object Float64Array]", nt = "[object Int8Array]", ot = "[object Int16Array]", at = "[object Int32Array]", st = "[object Uint8Array]", it = "[object Uint8ClampedArray]", lt = "[object Uint16Array]", ct = "[object Uint32Array]", ut = /[\\^$.*+?()[\]{}|]/g, ft = /^\[object .+?Constructor\]$/, dt = /^(?:0|[1-9]\d*)$/, b = {};
|
|
557
|
+
b[tt] = b[rt] = b[nt] = b[ot] = b[at] = b[st] = b[it] = b[lt] = b[ct] = !0, b[f] = b[p] = b[Ve] = b[_] = b[et] = b[k] = b[A] = b[O] = b[M] = b[F] = b[de] = b[We] = b[Xe] = b[Ye] = b[Qe] = !1;
|
|
558
|
+
var pe = typeof Z == "object" && Z && Z.Object === Object && Z, pt = typeof self == "object" && self && self.Object === Object && self, N = pe || pt || Function("return this")(), ge = r && !r.nodeType && r, z = ge && !0 && o && !o.nodeType && o, he = z && z.exports === ge, V = he && pe.process, be = function() {
|
|
556
559
|
try {
|
|
557
560
|
var e = z && z.require && z.require("util").types;
|
|
558
|
-
return e ||
|
|
561
|
+
return e || V && V.binding && V.binding("util");
|
|
559
562
|
} catch {
|
|
560
563
|
}
|
|
561
|
-
}(),
|
|
564
|
+
}(), ye = be && be.isTypedArray;
|
|
562
565
|
function gt(e, n, a) {
|
|
563
566
|
switch (a.length) {
|
|
564
567
|
case 0:
|
|
@@ -577,12 +580,12 @@ Z.exports;
|
|
|
577
580
|
c[a] = n(a);
|
|
578
581
|
return c;
|
|
579
582
|
}
|
|
580
|
-
function
|
|
583
|
+
function bt(e) {
|
|
581
584
|
return function(n) {
|
|
582
585
|
return e(n);
|
|
583
586
|
};
|
|
584
587
|
}
|
|
585
|
-
function
|
|
588
|
+
function yt(e, n) {
|
|
586
589
|
return e == null ? void 0 : e[n];
|
|
587
590
|
}
|
|
588
591
|
function mt(e, n) {
|
|
@@ -590,31 +593,33 @@ Z.exports;
|
|
|
590
593
|
return e(n(a));
|
|
591
594
|
};
|
|
592
595
|
}
|
|
593
|
-
var vt = Array.prototype, _t = Function.prototype, H = Object.prototype, ee = N["__core-js_shared__"], q = _t.toString,
|
|
596
|
+
var vt = Array.prototype, _t = Function.prototype, H = Object.prototype, ee = N["__core-js_shared__"], q = _t.toString, j = H.hasOwnProperty, me = function() {
|
|
594
597
|
var e = /[^.]+$/.exec(ee && ee.keys && ee.keys.IE_PROTO || "");
|
|
595
598
|
return e ? "Symbol(src)_1." + e : "";
|
|
596
599
|
}(), ve = H.toString, wt = q.call(Object), Tt = RegExp(
|
|
597
|
-
"^" + q.call(
|
|
598
|
-
), G = he ? N.Buffer : void 0, _e = N.Symbol, we = N.Uint8Array
|
|
600
|
+
"^" + q.call(j).replace(ut, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$"
|
|
601
|
+
), G = he ? N.Buffer : void 0, _e = N.Symbol, we = N.Uint8Array;
|
|
602
|
+
G && G.allocUnsafe;
|
|
603
|
+
var Te = mt(Object.getPrototypeOf, Object), ke = Object.create, kt = H.propertyIsEnumerable, At = vt.splice, x = _e ? _e.toStringTag : void 0, J = function() {
|
|
599
604
|
try {
|
|
600
605
|
var e = ne(Object, "defineProperty");
|
|
601
606
|
return e({}, "", {}), e;
|
|
602
607
|
} catch {
|
|
603
608
|
}
|
|
604
|
-
}(), It = G ? G.isBuffer : void 0,
|
|
609
|
+
}(), It = G ? G.isBuffer : void 0, Ae = Math.max, St = Date.now, Ie = ne(N, "Map"), L = ne(Object, "create"), Ot = /* @__PURE__ */ function() {
|
|
605
610
|
function e() {
|
|
606
611
|
}
|
|
607
612
|
return function(n) {
|
|
608
613
|
if (!E(n))
|
|
609
614
|
return {};
|
|
610
|
-
if (
|
|
611
|
-
return
|
|
615
|
+
if (ke)
|
|
616
|
+
return ke(n);
|
|
612
617
|
e.prototype = n;
|
|
613
618
|
var a = new e();
|
|
614
619
|
return e.prototype = void 0, a;
|
|
615
620
|
};
|
|
616
621
|
}();
|
|
617
|
-
function
|
|
622
|
+
function $(e) {
|
|
618
623
|
var n = -1, a = e == null ? 0 : e.length;
|
|
619
624
|
for (this.clear(); ++n < a; ) {
|
|
620
625
|
var c = e[n];
|
|
@@ -628,24 +633,24 @@ Z.exports;
|
|
|
628
633
|
var n = this.has(e) && delete this.__data__[e];
|
|
629
634
|
return this.size -= n ? 1 : 0, n;
|
|
630
635
|
}
|
|
631
|
-
function
|
|
636
|
+
function xt(e) {
|
|
632
637
|
var n = this.__data__;
|
|
633
638
|
if (L) {
|
|
634
639
|
var a = n[e];
|
|
635
|
-
return a ===
|
|
640
|
+
return a === s ? void 0 : a;
|
|
636
641
|
}
|
|
637
|
-
return
|
|
642
|
+
return j.call(n, e) ? n[e] : void 0;
|
|
638
643
|
}
|
|
639
|
-
function
|
|
644
|
+
function $t(e) {
|
|
640
645
|
var n = this.__data__;
|
|
641
|
-
return L ? n[e] !== void 0 :
|
|
646
|
+
return L ? n[e] !== void 0 : j.call(n, e);
|
|
642
647
|
}
|
|
643
648
|
function Et(e, n) {
|
|
644
649
|
var a = this.__data__;
|
|
645
|
-
return this.size += this.has(e) ? 0 : 1, a[e] = L && n === void 0 ?
|
|
650
|
+
return this.size += this.has(e) ? 0 : 1, a[e] = L && n === void 0 ? s : n, this;
|
|
646
651
|
}
|
|
647
|
-
|
|
648
|
-
function
|
|
652
|
+
$.prototype.clear = Ct, $.prototype.delete = jt, $.prototype.get = xt, $.prototype.has = $t, $.prototype.set = Et;
|
|
653
|
+
function C(e) {
|
|
649
654
|
var n = -1, a = e == null ? 0 : e.length;
|
|
650
655
|
for (this.clear(); ++n < a; ) {
|
|
651
656
|
var c = e[n];
|
|
@@ -673,7 +678,7 @@ Z.exports;
|
|
|
673
678
|
var a = this.__data__, c = K(a, e);
|
|
674
679
|
return c < 0 ? (++this.size, a.push([e, n])) : a[c][1] = n, this;
|
|
675
680
|
}
|
|
676
|
-
|
|
681
|
+
C.prototype.clear = Rt, C.prototype.delete = Pt, C.prototype.get = Mt, C.prototype.has = Nt, C.prototype.set = zt;
|
|
677
682
|
function R(e) {
|
|
678
683
|
var n = -1, a = e == null ? 0 : e.length;
|
|
679
684
|
for (this.clear(); ++n < a; ) {
|
|
@@ -683,32 +688,32 @@ Z.exports;
|
|
|
683
688
|
}
|
|
684
689
|
function Lt() {
|
|
685
690
|
this.size = 0, this.__data__ = {
|
|
686
|
-
hash: new
|
|
687
|
-
map: new (
|
|
688
|
-
string: new
|
|
691
|
+
hash: new $(),
|
|
692
|
+
map: new (Ie || C)(),
|
|
693
|
+
string: new $()
|
|
689
694
|
};
|
|
690
695
|
}
|
|
691
696
|
function Dt(e) {
|
|
692
|
-
var n =
|
|
697
|
+
var n = X(this, e).delete(e);
|
|
693
698
|
return this.size -= n ? 1 : 0, n;
|
|
694
699
|
}
|
|
695
700
|
function Ut(e) {
|
|
696
|
-
return
|
|
701
|
+
return X(this, e).get(e);
|
|
697
702
|
}
|
|
698
703
|
function Bt(e) {
|
|
699
|
-
return
|
|
704
|
+
return X(this, e).has(e);
|
|
700
705
|
}
|
|
701
706
|
function Ft(e, n) {
|
|
702
|
-
var a =
|
|
707
|
+
var a = X(this, e), c = a.size;
|
|
703
708
|
return a.set(e, n), this.size += a.size == c ? 0 : 1, this;
|
|
704
709
|
}
|
|
705
710
|
R.prototype.clear = Lt, R.prototype.delete = Dt, R.prototype.get = Ut, R.prototype.has = Bt, R.prototype.set = Ft;
|
|
706
711
|
function P(e) {
|
|
707
|
-
var n = this.__data__ = new
|
|
712
|
+
var n = this.__data__ = new C(e);
|
|
708
713
|
this.size = n.size;
|
|
709
714
|
}
|
|
710
715
|
function Ht() {
|
|
711
|
-
this.__data__ = new
|
|
716
|
+
this.__data__ = new C(), this.size = 0;
|
|
712
717
|
}
|
|
713
718
|
function qt(e) {
|
|
714
719
|
var n = this.__data__, a = n.delete(e);
|
|
@@ -722,9 +727,9 @@ Z.exports;
|
|
|
722
727
|
}
|
|
723
728
|
function Kt(e, n) {
|
|
724
729
|
var a = this.__data__;
|
|
725
|
-
if (a instanceof
|
|
730
|
+
if (a instanceof C) {
|
|
726
731
|
var c = a.__data__;
|
|
727
|
-
if (!
|
|
732
|
+
if (!Ie || c.length < t - 1)
|
|
728
733
|
return c.push([e, n]), this.size = ++a.size, this;
|
|
729
734
|
a = this.__data__ = new R(c);
|
|
730
735
|
}
|
|
@@ -732,25 +737,25 @@ Z.exports;
|
|
|
732
737
|
}
|
|
733
738
|
P.prototype.clear = Ht, P.prototype.delete = qt, P.prototype.get = Gt, P.prototype.has = Jt, P.prototype.set = Kt;
|
|
734
739
|
function Wt(e, n) {
|
|
735
|
-
var a =
|
|
736
|
-
for (var
|
|
737
|
-
|
|
738
|
-
(
|
|
739
|
-
d && (
|
|
740
|
-
h && (
|
|
741
|
-
|
|
742
|
-
return
|
|
740
|
+
var a = se(e), c = !a && ae(e), d = !a && !c && xe(e), h = !a && !c && !d && Ee(e), m = a || c || d || h, g = m ? ht(e.length, String) : [], v = g.length;
|
|
741
|
+
for (var I in e)
|
|
742
|
+
m && // Safari 9 has enumerable `arguments.length` in strict mode.
|
|
743
|
+
(I == "length" || // Node.js 0.10 has enumerable non-index properties on buffers.
|
|
744
|
+
d && (I == "offset" || I == "parent") || // PhantomJS 2 has enumerable non-index properties on typed arrays.
|
|
745
|
+
h && (I == "buffer" || I == "byteLength" || I == "byteOffset") || // Skip index properties.
|
|
746
|
+
Ce(I, v)) || g.push(I);
|
|
747
|
+
return g;
|
|
743
748
|
}
|
|
744
749
|
function te(e, n, a) {
|
|
745
|
-
(a !== void 0 && !
|
|
750
|
+
(a !== void 0 && !Y(e[n], a) || a === void 0 && !(n in e)) && re(e, n, a);
|
|
746
751
|
}
|
|
747
|
-
function
|
|
752
|
+
function Xt(e, n, a) {
|
|
748
753
|
var c = e[n];
|
|
749
|
-
(!(
|
|
754
|
+
(!(j.call(e, n) && Y(c, a)) || a === void 0 && !(n in e)) && re(e, n, a);
|
|
750
755
|
}
|
|
751
756
|
function K(e, n) {
|
|
752
757
|
for (var a = e.length; a--; )
|
|
753
|
-
if (
|
|
758
|
+
if (Y(e[a][0], n))
|
|
754
759
|
return a;
|
|
755
760
|
return -1;
|
|
756
761
|
}
|
|
@@ -762,55 +767,55 @@ Z.exports;
|
|
|
762
767
|
writable: !0
|
|
763
768
|
}) : e[n] = a;
|
|
764
769
|
}
|
|
765
|
-
var
|
|
770
|
+
var Yt = cr();
|
|
766
771
|
function W(e) {
|
|
767
|
-
return e == null ? e === void 0 ?
|
|
772
|
+
return e == null ? e === void 0 ? Ze : Je : x && x in Object(e) ? ur(e) : br(e);
|
|
768
773
|
}
|
|
769
|
-
function
|
|
774
|
+
function Se(e) {
|
|
770
775
|
return D(e) && W(e) == f;
|
|
771
776
|
}
|
|
772
|
-
function
|
|
777
|
+
function Zt(e) {
|
|
773
778
|
if (!E(e) || gr(e))
|
|
774
779
|
return !1;
|
|
775
780
|
var n = le(e) ? Tt : ft;
|
|
776
781
|
return n.test(_r(e));
|
|
777
782
|
}
|
|
778
|
-
function Zt(e) {
|
|
779
|
-
return D(e) && Ee(e.length) && !!y[W(e)];
|
|
780
|
-
}
|
|
781
783
|
function Qt(e) {
|
|
784
|
+
return D(e) && $e(e.length) && !!b[W(e)];
|
|
785
|
+
}
|
|
786
|
+
function Vt(e) {
|
|
782
787
|
if (!E(e))
|
|
783
788
|
return hr(e);
|
|
784
|
-
var n =
|
|
789
|
+
var n = je(e), a = [];
|
|
785
790
|
for (var c in e)
|
|
786
|
-
c == "constructor" && (n || !
|
|
791
|
+
c == "constructor" && (n || !j.call(e, c)) || a.push(c);
|
|
787
792
|
return a;
|
|
788
793
|
}
|
|
789
|
-
function
|
|
790
|
-
e !== n &&
|
|
794
|
+
function Oe(e, n, a, c, d) {
|
|
795
|
+
e !== n && Yt(n, function(h, m) {
|
|
791
796
|
if (d || (d = new P()), E(h))
|
|
792
|
-
er(e, n, m, a,
|
|
797
|
+
er(e, n, m, a, Oe, c, d);
|
|
793
798
|
else {
|
|
794
|
-
var
|
|
795
|
-
|
|
799
|
+
var g = c ? c(oe(e, m), h, m + "", e, n, d) : void 0;
|
|
800
|
+
g === void 0 && (g = h), te(e, m, g);
|
|
796
801
|
}
|
|
797
|
-
},
|
|
802
|
+
}, Re);
|
|
798
803
|
}
|
|
799
804
|
function er(e, n, a, c, d, h, m) {
|
|
800
|
-
var
|
|
801
|
-
if (
|
|
802
|
-
te(e, a,
|
|
805
|
+
var g = oe(e, a), v = oe(n, a), I = m.get(v);
|
|
806
|
+
if (I) {
|
|
807
|
+
te(e, a, I);
|
|
803
808
|
return;
|
|
804
809
|
}
|
|
805
|
-
var T = h ? h(
|
|
810
|
+
var T = h ? h(g, v, a + "", e, n, m) : void 0, U = T === void 0;
|
|
806
811
|
if (U) {
|
|
807
|
-
var ce =
|
|
808
|
-
T = v, ce || ue ||
|
|
812
|
+
var ce = se(v), ue = !ce && xe(v), Me = !ce && !ue && Ee(v);
|
|
813
|
+
T = v, ce || ue || Me ? se(g) ? T = g : wr(g) ? T = sr(g) : ue ? (U = !1, T = nr(v)) : Me ? (U = !1, T = ar(v)) : T = [] : Tr(v) || ae(v) ? (T = g, ae(g) ? T = kr(g) : (!E(g) || le(g)) && (T = fr(v))) : U = !1;
|
|
809
814
|
}
|
|
810
815
|
U && (m.set(v, T), d(T, v, c, h, m), m.delete(v)), te(e, a, T);
|
|
811
816
|
}
|
|
812
817
|
function tr(e, n) {
|
|
813
|
-
return mr(
|
|
818
|
+
return mr(yr(e, n, Pe), e + "");
|
|
814
819
|
}
|
|
815
820
|
var rr = J ? function(e, n) {
|
|
816
821
|
return J(e, "toString", {
|
|
@@ -819,95 +824,92 @@ Z.exports;
|
|
|
819
824
|
value: Ir(n),
|
|
820
825
|
writable: !0
|
|
821
826
|
});
|
|
822
|
-
} :
|
|
827
|
+
} : Pe;
|
|
823
828
|
function nr(e, n) {
|
|
824
|
-
|
|
825
|
-
return e.slice();
|
|
826
|
-
var a = e.length, c = Te ? Te(a) : new e.constructor(a);
|
|
827
|
-
return e.copy(c), c;
|
|
829
|
+
return e.slice();
|
|
828
830
|
}
|
|
829
831
|
function or(e) {
|
|
830
832
|
var n = new e.constructor(e.byteLength);
|
|
831
833
|
return new we(n).set(new we(e)), n;
|
|
832
834
|
}
|
|
833
835
|
function ar(e, n) {
|
|
834
|
-
var a =
|
|
836
|
+
var a = or(e.buffer);
|
|
835
837
|
return new e.constructor(a, e.byteOffset, e.length);
|
|
836
838
|
}
|
|
837
|
-
function
|
|
839
|
+
function sr(e, n) {
|
|
838
840
|
var a = -1, c = e.length;
|
|
839
841
|
for (n || (n = Array(c)); ++a < c; )
|
|
840
842
|
n[a] = e[a];
|
|
841
843
|
return n;
|
|
842
844
|
}
|
|
843
|
-
function
|
|
845
|
+
function ir(e, n, a, c) {
|
|
844
846
|
var d = !a;
|
|
845
847
|
a || (a = {});
|
|
846
848
|
for (var h = -1, m = n.length; ++h < m; ) {
|
|
847
|
-
var
|
|
848
|
-
v === void 0 && (v = e[
|
|
849
|
+
var g = n[h], v = void 0;
|
|
850
|
+
v === void 0 && (v = e[g]), d ? re(a, g, v) : Xt(a, g, v);
|
|
849
851
|
}
|
|
850
852
|
return a;
|
|
851
853
|
}
|
|
852
854
|
function lr(e) {
|
|
853
855
|
return tr(function(n, a) {
|
|
854
856
|
var c = -1, d = a.length, h = d > 1 ? a[d - 1] : void 0, m = d > 2 ? a[2] : void 0;
|
|
855
|
-
for (h = e.length > 3 && typeof h == "function" ? (d--, h) : void 0, m &&
|
|
856
|
-
var
|
|
857
|
-
|
|
857
|
+
for (h = e.length > 3 && typeof h == "function" ? (d--, h) : void 0, m && dr(a[0], a[1], m) && (h = d < 3 ? void 0 : h, d = 1), n = Object(n); ++c < d; ) {
|
|
858
|
+
var g = a[c];
|
|
859
|
+
g && e(n, g, c, h);
|
|
858
860
|
}
|
|
859
861
|
return n;
|
|
860
862
|
});
|
|
861
863
|
}
|
|
862
864
|
function cr(e) {
|
|
863
865
|
return function(n, a, c) {
|
|
864
|
-
for (var d = -1, h = Object(n), m = c(n),
|
|
865
|
-
var v = m[
|
|
866
|
+
for (var d = -1, h = Object(n), m = c(n), g = m.length; g--; ) {
|
|
867
|
+
var v = m[++d];
|
|
866
868
|
if (a(h[v], v, h) === !1)
|
|
867
869
|
break;
|
|
868
870
|
}
|
|
869
871
|
return n;
|
|
870
872
|
};
|
|
871
873
|
}
|
|
872
|
-
function
|
|
874
|
+
function X(e, n) {
|
|
873
875
|
var a = e.__data__;
|
|
874
|
-
return
|
|
876
|
+
return pr(n) ? a[typeof n == "string" ? "string" : "hash"] : a.map;
|
|
875
877
|
}
|
|
876
878
|
function ne(e, n) {
|
|
877
|
-
var a =
|
|
878
|
-
return
|
|
879
|
+
var a = yt(e, n);
|
|
880
|
+
return Zt(a) ? a : void 0;
|
|
879
881
|
}
|
|
880
882
|
function ur(e) {
|
|
881
|
-
var n =
|
|
883
|
+
var n = j.call(e, x), a = e[x];
|
|
882
884
|
try {
|
|
883
|
-
e[
|
|
885
|
+
e[x] = void 0;
|
|
884
886
|
var c = !0;
|
|
885
887
|
} catch {
|
|
886
888
|
}
|
|
887
889
|
var d = ve.call(e);
|
|
888
|
-
return c && (n ? e[
|
|
890
|
+
return c && (n ? e[x] = a : delete e[x]), d;
|
|
889
891
|
}
|
|
890
892
|
function fr(e) {
|
|
891
|
-
return typeof e.constructor == "function" &&
|
|
893
|
+
return typeof e.constructor == "function" && !je(e) ? Ot(Te(e)) : {};
|
|
892
894
|
}
|
|
893
|
-
function
|
|
895
|
+
function Ce(e, n) {
|
|
894
896
|
var a = typeof e;
|
|
895
|
-
return n = n ?? u, !!n && (a == "number" || a != "symbol" &&
|
|
897
|
+
return n = n ?? u, !!n && (a == "number" || a != "symbol" && dt.test(e)) && e > -1 && e % 1 == 0 && e < n;
|
|
896
898
|
}
|
|
897
|
-
function
|
|
899
|
+
function dr(e, n, a) {
|
|
898
900
|
if (!E(a))
|
|
899
901
|
return !1;
|
|
900
902
|
var c = typeof n;
|
|
901
|
-
return (c == "number" ?
|
|
903
|
+
return (c == "number" ? ie(a) && Ce(n, a.length) : c == "string" && n in a) ? Y(a[n], e) : !1;
|
|
902
904
|
}
|
|
903
|
-
function
|
|
905
|
+
function pr(e) {
|
|
904
906
|
var n = typeof e;
|
|
905
907
|
return n == "string" || n == "number" || n == "symbol" || n == "boolean" ? e !== "__proto__" : e === null;
|
|
906
908
|
}
|
|
907
909
|
function gr(e) {
|
|
908
910
|
return !!me && me in e;
|
|
909
911
|
}
|
|
910
|
-
function
|
|
912
|
+
function je(e) {
|
|
911
913
|
var n = e && e.constructor, a = typeof n == "function" && n.prototype || H;
|
|
912
914
|
return e === a;
|
|
913
915
|
}
|
|
@@ -918,17 +920,17 @@ Z.exports;
|
|
|
918
920
|
n.push(a);
|
|
919
921
|
return n;
|
|
920
922
|
}
|
|
921
|
-
function
|
|
923
|
+
function br(e) {
|
|
922
924
|
return ve.call(e);
|
|
923
925
|
}
|
|
924
|
-
function
|
|
925
|
-
return n =
|
|
926
|
-
for (var c = arguments, d = -1, h =
|
|
926
|
+
function yr(e, n, a) {
|
|
927
|
+
return n = Ae(n === void 0 ? e.length - 1 : n, 0), function() {
|
|
928
|
+
for (var c = arguments, d = -1, h = Ae(c.length - n, 0), m = Array(h); ++d < h; )
|
|
927
929
|
m[d] = c[n + d];
|
|
928
930
|
d = -1;
|
|
929
|
-
for (var
|
|
930
|
-
|
|
931
|
-
return
|
|
931
|
+
for (var g = Array(n + 1); ++d < n; )
|
|
932
|
+
g[d] = c[d];
|
|
933
|
+
return g[n] = a(m), gt(e, this, g);
|
|
932
934
|
};
|
|
933
935
|
}
|
|
934
936
|
function oe(e, n) {
|
|
@@ -941,7 +943,7 @@ Z.exports;
|
|
|
941
943
|
return function() {
|
|
942
944
|
var c = St(), d = l - (c - a);
|
|
943
945
|
if (a = c, d > 0) {
|
|
944
|
-
if (++n >=
|
|
946
|
+
if (++n >= i)
|
|
945
947
|
return arguments[0];
|
|
946
948
|
} else
|
|
947
949
|
n = 0;
|
|
@@ -961,28 +963,28 @@ Z.exports;
|
|
|
961
963
|
}
|
|
962
964
|
return "";
|
|
963
965
|
}
|
|
964
|
-
function
|
|
966
|
+
function Y(e, n) {
|
|
965
967
|
return e === n || e !== e && n !== n;
|
|
966
968
|
}
|
|
967
|
-
var ae =
|
|
969
|
+
var ae = Se(/* @__PURE__ */ function() {
|
|
968
970
|
return arguments;
|
|
969
|
-
}()) ?
|
|
970
|
-
return D(e) &&
|
|
971
|
-
},
|
|
972
|
-
function
|
|
973
|
-
return e != null &&
|
|
971
|
+
}()) ? Se : function(e) {
|
|
972
|
+
return D(e) && j.call(e, "callee") && !kt.call(e, "callee");
|
|
973
|
+
}, se = Array.isArray;
|
|
974
|
+
function ie(e) {
|
|
975
|
+
return e != null && $e(e.length) && !le(e);
|
|
974
976
|
}
|
|
975
977
|
function wr(e) {
|
|
976
|
-
return D(e) &&
|
|
978
|
+
return D(e) && ie(e);
|
|
977
979
|
}
|
|
978
980
|
var xe = It || Sr;
|
|
979
981
|
function le(e) {
|
|
980
982
|
if (!E(e))
|
|
981
983
|
return !1;
|
|
982
984
|
var n = W(e);
|
|
983
|
-
return n == O || n == w || n ==
|
|
985
|
+
return n == O || n == w || n == y || n == Ke;
|
|
984
986
|
}
|
|
985
|
-
function
|
|
987
|
+
function $e(e) {
|
|
986
988
|
return typeof e == "number" && e > -1 && e % 1 == 0 && e <= u;
|
|
987
989
|
}
|
|
988
990
|
function E(e) {
|
|
@@ -993,44 +995,44 @@ Z.exports;
|
|
|
993
995
|
return e != null && typeof e == "object";
|
|
994
996
|
}
|
|
995
997
|
function Tr(e) {
|
|
996
|
-
if (!D(e) || W(e) !=
|
|
998
|
+
if (!D(e) || W(e) != de)
|
|
997
999
|
return !1;
|
|
998
|
-
var n =
|
|
1000
|
+
var n = Te(e);
|
|
999
1001
|
if (n === null)
|
|
1000
1002
|
return !0;
|
|
1001
|
-
var a =
|
|
1003
|
+
var a = j.call(n, "constructor") && n.constructor;
|
|
1002
1004
|
return typeof a == "function" && a instanceof a && q.call(a) == wt;
|
|
1003
1005
|
}
|
|
1004
|
-
var
|
|
1006
|
+
var Ee = ye ? bt(ye) : Qt;
|
|
1005
1007
|
function kr(e) {
|
|
1006
|
-
return
|
|
1008
|
+
return ir(e, Re(e));
|
|
1007
1009
|
}
|
|
1008
|
-
function
|
|
1009
|
-
return
|
|
1010
|
+
function Re(e) {
|
|
1011
|
+
return ie(e) ? Wt(e) : Vt(e);
|
|
1010
1012
|
}
|
|
1011
1013
|
var Ar = lr(function(e, n, a, c) {
|
|
1012
|
-
|
|
1014
|
+
Oe(e, n, a, c);
|
|
1013
1015
|
});
|
|
1014
1016
|
function Ir(e) {
|
|
1015
1017
|
return function() {
|
|
1016
1018
|
return e;
|
|
1017
1019
|
};
|
|
1018
1020
|
}
|
|
1019
|
-
function
|
|
1021
|
+
function Pe(e) {
|
|
1020
1022
|
return e;
|
|
1021
1023
|
}
|
|
1022
1024
|
function Sr() {
|
|
1023
1025
|
return !1;
|
|
1024
1026
|
}
|
|
1025
1027
|
o.exports = Ar;
|
|
1026
|
-
})(
|
|
1027
|
-
var
|
|
1028
|
-
const
|
|
1029
|
-
function
|
|
1028
|
+
})(Q, Q.exports);
|
|
1029
|
+
var An = Q.exports;
|
|
1030
|
+
const In = /* @__PURE__ */ kn(An);
|
|
1031
|
+
function Sn(o) {
|
|
1030
1032
|
let r = {};
|
|
1031
|
-
function t(
|
|
1032
|
-
if ((
|
|
1033
|
-
const l =
|
|
1033
|
+
function t(s, i) {
|
|
1034
|
+
if ((i == null ? void 0 : i.type) === "AwaitExpression" && i.argument.type === "CallExpression" && i.argument.callee.type === "Identifier" && i.argument.callee.name === "useStoryblok") {
|
|
1035
|
+
const l = i.argument.arguments;
|
|
1034
1036
|
if (l && l[1].type === "ObjectExpression") {
|
|
1035
1037
|
const u = He(l[1].properties);
|
|
1036
1038
|
r = {
|
|
@@ -1047,95 +1049,95 @@ function In(o) {
|
|
|
1047
1049
|
}
|
|
1048
1050
|
}
|
|
1049
1051
|
}
|
|
1050
|
-
return
|
|
1052
|
+
return In({}, o, t), r;
|
|
1051
1053
|
}
|
|
1052
1054
|
function He(o) {
|
|
1053
1055
|
const r = {};
|
|
1054
|
-
return o.reduce((t,
|
|
1055
|
-
if (
|
|
1056
|
-
const { key:
|
|
1057
|
-
if (
|
|
1056
|
+
return o.reduce((t, s) => {
|
|
1057
|
+
if (s.type !== "Property") return t;
|
|
1058
|
+
const { key: i, value: l } = s, { type: u } = l;
|
|
1059
|
+
if (i.type !== "Identifier") return t;
|
|
1058
1060
|
if (u === "Literal")
|
|
1059
|
-
t[
|
|
1061
|
+
t[i.name] = l.value;
|
|
1060
1062
|
else if (u === "ArrayExpression") {
|
|
1061
|
-
const f = l.elements.reduce((
|
|
1062
|
-
t[
|
|
1063
|
+
const f = l.elements.reduce((p, y) => y.type === "Literal" && y.value ? [...p, y.value] : p, []);
|
|
1064
|
+
t[i.name] = f;
|
|
1063
1065
|
}
|
|
1064
1066
|
return t;
|
|
1065
1067
|
}, r);
|
|
1066
1068
|
}
|
|
1067
1069
|
let B = [];
|
|
1068
|
-
function
|
|
1069
|
-
const t = "virtual:storyblok-bridge",
|
|
1070
|
+
function On(o, r) {
|
|
1071
|
+
const t = "virtual:storyblok-bridge", s = "\0" + t;
|
|
1070
1072
|
if (!o || r !== "server")
|
|
1071
1073
|
return {
|
|
1072
1074
|
name: "vite-plugin-storyblok-bridge",
|
|
1073
1075
|
resolveId(f) {
|
|
1074
1076
|
if (f === t)
|
|
1075
|
-
return
|
|
1077
|
+
return s;
|
|
1076
1078
|
},
|
|
1077
1079
|
load(f) {
|
|
1078
|
-
if (f ===
|
|
1080
|
+
if (f === s)
|
|
1079
1081
|
return "export const bridgeOptions = null";
|
|
1080
1082
|
}
|
|
1081
1083
|
};
|
|
1082
|
-
let
|
|
1084
|
+
let i = [], l = null, u;
|
|
1083
1085
|
return {
|
|
1084
1086
|
name: "vite-plugin-storyblok-bridge",
|
|
1085
1087
|
async resolveId(f) {
|
|
1086
1088
|
if (f === t)
|
|
1087
|
-
return
|
|
1089
|
+
return s;
|
|
1088
1090
|
},
|
|
1089
|
-
async transform(f,
|
|
1091
|
+
async transform(f, p) {
|
|
1090
1092
|
var O;
|
|
1091
|
-
if (
|
|
1092
|
-
const [, ..._] =
|
|
1093
|
-
B.length && (
|
|
1093
|
+
if (p.includes("node_modules") && !p.includes("/pages/") || !f.includes("useStoryblok") || !((O = this.getModuleInfo(p).meta) != null && O.astro)) return;
|
|
1094
|
+
const [, ..._] = p.split("src/pages/"), k = _.join("/").replace(".astro", ""), A = Sn(this.parse(f));
|
|
1095
|
+
B.length && (i = B.filter((w) => w.url !== k)), i.push({
|
|
1094
1096
|
url: k,
|
|
1095
|
-
options:
|
|
1097
|
+
options: A
|
|
1096
1098
|
}), l && (u && clearTimeout(u), u = setTimeout(() => {
|
|
1097
|
-
|
|
1099
|
+
Cn(B, i) || (B.length !== 0 && (l.restart(), console.info("Bridge options updated. Restarting...")), B = [...i]);
|
|
1098
1100
|
}, 1e3));
|
|
1099
1101
|
},
|
|
1100
1102
|
async load(f) {
|
|
1101
|
-
if (f ===
|
|
1102
|
-
return `export const bridgeOptions = ${JSON.stringify(
|
|
1103
|
+
if (f === s)
|
|
1104
|
+
return `export const bridgeOptions = ${JSON.stringify(Tn(i))}`;
|
|
1103
1105
|
},
|
|
1104
1106
|
configureServer(f) {
|
|
1105
1107
|
l = f;
|
|
1106
1108
|
}
|
|
1107
1109
|
};
|
|
1108
1110
|
}
|
|
1109
|
-
function
|
|
1110
|
-
return r.every(({ url: t, options:
|
|
1111
|
-
const
|
|
1112
|
-
return
|
|
1111
|
+
function Cn(o = [], r = []) {
|
|
1112
|
+
return r.every(({ url: t, options: s }) => {
|
|
1113
|
+
const i = o.find((l) => (l == null ? void 0 : l.url) === t);
|
|
1114
|
+
return i && JSON.stringify(s) === JSON.stringify(i.options);
|
|
1113
1115
|
});
|
|
1114
1116
|
}
|
|
1115
1117
|
let qe;
|
|
1116
|
-
async function
|
|
1118
|
+
async function Rn(o) {
|
|
1117
1119
|
const { action: r, story: t } = o || {};
|
|
1118
1120
|
if (r === "input" && t) {
|
|
1119
|
-
const
|
|
1120
|
-
const l = await
|
|
1121
|
+
const s = async () => {
|
|
1122
|
+
const l = await xn(t), u = document.body;
|
|
1121
1123
|
if (l.outerHTML === u.outerHTML) return;
|
|
1122
1124
|
const f = document.querySelector('[data-blok-focused="true"]');
|
|
1123
|
-
|
|
1125
|
+
jn(u, l, f);
|
|
1124
1126
|
};
|
|
1125
|
-
clearTimeout(qe), qe = setTimeout(
|
|
1127
|
+
clearTimeout(qe), qe = setTimeout(s, 500);
|
|
1126
1128
|
}
|
|
1127
1129
|
["published", "change"].includes(o == null ? void 0 : o.action) && location.reload();
|
|
1128
1130
|
}
|
|
1129
|
-
function
|
|
1131
|
+
function jn(o, r, t) {
|
|
1130
1132
|
if (t) {
|
|
1131
|
-
const
|
|
1132
|
-
`[data-blok-uid="${
|
|
1133
|
+
const s = t.getAttribute("data-blok-uid"), i = r.querySelector(
|
|
1134
|
+
`[data-blok-uid="${s}"]`
|
|
1133
1135
|
);
|
|
1134
|
-
|
|
1136
|
+
i && (i.setAttribute("data-blok-focused", "true"), t.replaceWith(i));
|
|
1135
1137
|
} else
|
|
1136
1138
|
o.replaceWith(r);
|
|
1137
1139
|
}
|
|
1138
|
-
async function
|
|
1140
|
+
async function xn(o) {
|
|
1139
1141
|
const t = await (await fetch(location.href, {
|
|
1140
1142
|
method: "POST",
|
|
1141
1143
|
body: JSON.stringify({
|
|
@@ -1148,25 +1150,25 @@ async function jn(o) {
|
|
|
1148
1150
|
})).text();
|
|
1149
1151
|
return new DOMParser().parseFromString(t, "text/html").body;
|
|
1150
1152
|
}
|
|
1151
|
-
function
|
|
1153
|
+
function Pn() {
|
|
1152
1154
|
return globalThis.storyblokApiInstance || console.error("storyblokApiInstance has not been initialized correctly"), globalThis.storyblokApiInstance;
|
|
1153
1155
|
}
|
|
1154
|
-
async function
|
|
1156
|
+
async function Mn(o, r = {}, t = {}, s) {
|
|
1155
1157
|
globalThis.storyblokApiInstance || console.error("storyblokApiInstance has not been initialized correctly");
|
|
1156
|
-
let
|
|
1157
|
-
if (
|
|
1158
|
-
|
|
1158
|
+
let i = null;
|
|
1159
|
+
if (s && s.locals._storyblok_preview_data)
|
|
1160
|
+
i = s.locals._storyblok_preview_data;
|
|
1159
1161
|
else {
|
|
1160
1162
|
const { data: l } = await globalThis.storyblokApiInstance.get(
|
|
1161
1163
|
o,
|
|
1162
1164
|
r,
|
|
1163
1165
|
t
|
|
1164
1166
|
);
|
|
1165
|
-
|
|
1167
|
+
i = l.story;
|
|
1166
1168
|
}
|
|
1167
|
-
return
|
|
1169
|
+
return i;
|
|
1168
1170
|
}
|
|
1169
|
-
function
|
|
1171
|
+
function Nn(o, r) {
|
|
1170
1172
|
const t = globalThis.storyblokApiInstance.richTextResolver;
|
|
1171
1173
|
if (!t) {
|
|
1172
1174
|
console.error(
|
|
@@ -1174,9 +1176,9 @@ function Mn(o, r) {
|
|
|
1174
1176
|
);
|
|
1175
1177
|
return;
|
|
1176
1178
|
}
|
|
1177
|
-
return
|
|
1179
|
+
return wn(o, r, t);
|
|
1178
1180
|
}
|
|
1179
|
-
function
|
|
1181
|
+
function zn(o) {
|
|
1180
1182
|
const r = {
|
|
1181
1183
|
useCustomApi: !1,
|
|
1182
1184
|
bridge: !0,
|
|
@@ -1190,12 +1192,12 @@ function Nn(o) {
|
|
|
1190
1192
|
hooks: {
|
|
1191
1193
|
"astro:config:setup": ({
|
|
1192
1194
|
injectScript: t,
|
|
1193
|
-
updateConfig:
|
|
1194
|
-
addDevToolbarApp:
|
|
1195
|
+
updateConfig: s,
|
|
1196
|
+
addDevToolbarApp: i,
|
|
1195
1197
|
addMiddleware: l,
|
|
1196
1198
|
config: u
|
|
1197
1199
|
}) => {
|
|
1198
|
-
if (
|
|
1200
|
+
if (s({
|
|
1199
1201
|
vite: {
|
|
1200
1202
|
plugins: [
|
|
1201
1203
|
Or(
|
|
@@ -1210,7 +1212,7 @@ function Nn(o) {
|
|
|
1210
1212
|
r.customFallbackComponent
|
|
1211
1213
|
),
|
|
1212
1214
|
Mr(r),
|
|
1213
|
-
|
|
1215
|
+
On(
|
|
1214
1216
|
r.livePreview,
|
|
1215
1217
|
u.output
|
|
1216
1218
|
)
|
|
@@ -1229,9 +1231,9 @@ function Nn(o) {
|
|
|
1229
1231
|
), r.bridge && !r.livePreview) {
|
|
1230
1232
|
let f = "";
|
|
1231
1233
|
if (typeof r.bridge == "object") {
|
|
1232
|
-
const
|
|
1234
|
+
const p = { ...r.bridge };
|
|
1233
1235
|
f = `const storyblokInstance = new StoryblokBridge(${JSON.stringify(
|
|
1234
|
-
|
|
1236
|
+
p
|
|
1235
1237
|
)});`;
|
|
1236
1238
|
} else
|
|
1237
1239
|
f = "const storyblokInstance = new StoryblokBridge()";
|
|
@@ -1269,19 +1271,19 @@ function Nn(o) {
|
|
|
1269
1271
|
), l({
|
|
1270
1272
|
entrypoint: "@storyblok/astro/middleware.ts",
|
|
1271
1273
|
order: "pre"
|
|
1272
|
-
})),
|
|
1274
|
+
})), i("@storyblok/astro/toolbarApp.ts");
|
|
1273
1275
|
}
|
|
1274
1276
|
}
|
|
1275
1277
|
};
|
|
1276
1278
|
}
|
|
1277
1279
|
export {
|
|
1278
|
-
|
|
1279
|
-
|
|
1280
|
-
|
|
1281
|
-
|
|
1282
|
-
|
|
1283
|
-
|
|
1280
|
+
bn as RichTextResolver,
|
|
1281
|
+
pn as RichTextSchema,
|
|
1282
|
+
zn as default,
|
|
1283
|
+
Rn as handleStoryblokMessage,
|
|
1284
|
+
En as loadStoryblokBridge,
|
|
1285
|
+
Nn as renderRichText,
|
|
1284
1286
|
$n as storyblokEditable,
|
|
1285
|
-
|
|
1286
|
-
|
|
1287
|
+
Mn as useStoryblok,
|
|
1288
|
+
Pn as useStoryblokApi
|
|
1287
1289
|
};
|