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