@storyblok/astro 4.1.0-alpha.1 → 4.1.0-alpha.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/README.md CHANGED
@@ -389,6 +389,56 @@ const options = {
389
389
 
390
390
  Returns the instance of the `storyblok-js-client`.
391
391
 
392
+ ## Enabling Live Preview for Storyblok's Visual Editor
393
+
394
+ > **Warning**
395
+ > This feature is currently experimental and optional. You may encounters bugs or performance issues.
396
+
397
+ The Astro SDK now provides a live preview feature, designed to offer real-time editing capabilities for an enhanced user experience in Storyblok's Visual Editor.
398
+
399
+ To activate the experimental live preview feature, follow these steps:
400
+
401
+ 1. Set `livePreview` to `true` within your `astro.config.mjs` file.
402
+
403
+ ```js
404
+ //astro.config.mjs
405
+ export default defineConfig({
406
+ integrations: [
407
+ storyblok({
408
+ accessToken: "OsvN..",
409
+ livePreview: true,
410
+ }),
411
+ ],
412
+ });
413
+ ```
414
+
415
+ 2. Additionally, please use `useStoryblok` on your Astro pages for story fetching. This replaces the previously used `useStoryblokApi` method.
416
+
417
+ ```jsx
418
+ //pages/[...slug].astro
419
+ ---
420
+ import { useStoryblok } from "@storyblok/astro";
421
+ import StoryblokComponent from "@storyblok/astro/StoryblokComponent.astro";
422
+
423
+ const { slug } = Astro.params;
424
+
425
+ const story = await useStoryblok(
426
+ // The slug to fetch
427
+ `cdn/stories/${slug === undefined ? "home" : slug}`,
428
+ // The API options
429
+ {
430
+ version: "draft",
431
+ },
432
+ // The Bridge options (optional, if an empty object, null, or false are set, the API options will be considered automatically as far as applicable)
433
+ {},
434
+ // The Astro object (essential for the live preview functionality)
435
+ Astro
436
+ );
437
+ ---
438
+
439
+ <StoryblokComponent blok={story.content} />
440
+ ```
441
+
392
442
  ## The Storyblok JavaScript SDK Ecosystem
393
443
 
394
444
  ![A visual representation of the Storyblok JavaScript SDK Ecosystem](https://a.storyblok.com/f/88751/2400x1350/be4a4a4180/sdk-ecosystem.png/m/1200x0)
@@ -1,14 +1,14 @@
1
- (function(k,L){typeof exports=="object"&&typeof module<"u"?L(exports):typeof define=="function"&&define.amd?define(["exports"],L):(k=typeof globalThis<"u"?globalThis:k||self,L(k.storyblokAstro={}))})(this,function(k){"use strict";function L(o,t,r){const a="virtual:storyblok-init",s="\0"+a;return{name:"vite-plugin-storyblok-init",async resolveId(l){if(l===a)return s},async load(l){if(l===s)return`
1
+ (function(A,N){typeof exports=="object"&&typeof module<"u"?N(exports):typeof define=="function"&&define.amd?define(["exports"],N):(A=typeof globalThis<"u"?globalThis:A||self,N(A.storyblokAstro={}))})(this,function(A){"use strict";function N(o,e,r){const a="virtual:storyblok-init",s="\0"+a;return{name:"vite-plugin-storyblok-init",async resolveId(l){if(l===a)return s},async load(l){if(l===s)return`
2
2
  import { storyblokInit, apiPlugin } from "@storyblok/js";
3
3
  const { storyblokApi } = storyblokInit({
4
4
  accessToken: "${o}",
5
- use: ${t?"[]":"[apiPlugin]"},
5
+ use: ${e?"[]":"[apiPlugin]"},
6
6
  apiOptions: ${JSON.stringify(r)},
7
7
  });
8
8
  export const storyblokApiInstance = storyblokApi;
9
- `}}}const Ye=/[\p{Lu}]/u,Xe=/[\p{Ll}]/u,ge=/^[\p{Lu}](?![\p{Lu}])/gu,he=/([\p{Alpha}\p{N}_]|$)/u,te=/[_.\- ]+/,Ze=new RegExp("^"+te.source),be=new RegExp(te.source+he.source,"gu"),ye=new RegExp("\\d+"+he.source,"gu"),Qe=(o,t,r,a)=>{let s=!1,l=!1,u=!1,f=!1;for(let g=0;g<o.length;g++){const y=o[g];f=g>2?o[g-3]==="-":!0,s&&Ye.test(y)?(o=o.slice(0,g)+"-"+o.slice(g),s=!1,u=l,l=!0,g++):l&&u&&Xe.test(y)&&(!f||a)?(o=o.slice(0,g-1)+"-"+o.slice(g-1),u=l,l=!1,s=!0):(s=t(y)===y&&r(y)!==y,u=l,l=r(y)===y&&t(y)!==y)}return o},Ve=(o,t)=>(ge.lastIndex=0,o.replaceAll(ge,r=>t(r))),et=(o,t)=>(be.lastIndex=0,ye.lastIndex=0,o.replaceAll(ye,(r,a,s)=>["_","-"].includes(o.charAt(s+r.length))?r:t(r)).replaceAll(be,(r,a)=>t(a)));function me(o,t){if(!(typeof o=="string"||Array.isArray(o)))throw new TypeError("Expected the input to be `string | string[]`");if(t={pascalCase:!1,preserveConsecutiveUppercase:!1,...t},Array.isArray(o)?o=o.map(l=>l.trim()).filter(l=>l.length).join("-"):o=o.trim(),o.length===0)return"";const r=t.locale===!1?l=>l.toLowerCase():l=>l.toLocaleLowerCase(t.locale),a=t.locale===!1?l=>l.toUpperCase():l=>l.toLocaleUpperCase(t.locale);return o.length===1?te.test(o)?"":t.pascalCase?a(o):r(o):(o!==r(o)&&(o=Qe(o,r,a,t.preserveConsecutiveUppercase)),o=o.replace(Ze,""),o=t.preserveConsecutiveUppercase?Ve(o,r):r(o),t.pascalCase&&(o=a(o.charAt(0))+o.slice(1)),et(o,a))}function tt(o,t,r,a){const s="virtual:storyblok-components",l="\0"+s;return{name:"vite-plugin-storyblok-components",async resolveId(u){if(u===s)return l},async load(u){if(u===l){const f=[],g=[];for await(const[_,T]of Object.entries(t)){const S=await this.resolve("/"+o+"/"+T+".astro");if(S)f.push(`import ${me(_)} from "${S.id}"`);else if(r)g.push(_);else throw new Error(`Component could not be found for blok "${_}"! Does "${"/"+o+"/"+T}.astro" exist?`)}let y="";if(r)if(y=",FallbackComponent",a){const _=await this.resolve("/"+o+"/"+a+".astro");if(!_)throw new Error(`Custom fallback component could not be found. Does "${"/"+o+"/"+a}.astro" exist?`);f.push(`import FallbackComponent from "${_.id}"`)}else f.push("import FallbackComponent from '@storyblok/astro/FallbackComponent.astro'");if(Object.values(t).length)return`${f.join(";")};export default {${Object.keys(t).filter(_=>!g.includes(_)).map(_=>me(_)).join(",")}${y}}`;if(r)return`${f[0]}; export default {${y.replace(",","")}}`;throw new Error(`Currently, no Storyblok components are registered in astro.config.mjs.
9
+ `}}}const Xt=/[\p{Lu}]/u,Zt=/[\p{Ll}]/u,gt=/^[\p{Lu}](?![\p{Lu}])/gu,ht=/([\p{Alpha}\p{N}_]|$)/u,et=/[_.\- ]+/,Qt=new RegExp("^"+et.source),bt=new RegExp(et.source+ht.source,"gu"),yt=new RegExp("\\d+"+ht.source,"gu"),Vt=(o,e,r,a)=>{let s=!1,l=!1,u=!1,f=!1;for(let g=0;g<o.length;g++){const v=o[g];f=g>2?o[g-3]==="-":!0,s&&Xt.test(v)?(o=o.slice(0,g)+"-"+o.slice(g),s=!1,u=l,l=!0,g++):l&&u&&Zt.test(v)&&(!f||a)?(o=o.slice(0,g-1)+"-"+o.slice(g-1),u=l,l=!1,s=!0):(s=e(v)===v&&r(v)!==v,u=l,l=r(v)===v&&e(v)!==v)}return o},te=(o,e)=>(gt.lastIndex=0,o.replaceAll(gt,r=>e(r))),ee=(o,e)=>(bt.lastIndex=0,yt.lastIndex=0,o.replaceAll(yt,(r,a,s)=>["_","-"].includes(o.charAt(s+r.length))?r:e(r)).replaceAll(bt,(r,a)=>e(a)));function mt(o,e){if(!(typeof o=="string"||Array.isArray(o)))throw new TypeError("Expected the input to be `string | string[]`");if(e={pascalCase:!1,preserveConsecutiveUppercase:!1,...e},Array.isArray(o)?o=o.map(l=>l.trim()).filter(l=>l.length).join("-"):o=o.trim(),o.length===0)return"";const r=e.locale===!1?l=>l.toLowerCase():l=>l.toLocaleLowerCase(e.locale),a=e.locale===!1?l=>l.toUpperCase():l=>l.toLocaleUpperCase(e.locale);return o.length===1?et.test(o)?"":e.pascalCase?a(o):r(o):(o!==r(o)&&(o=Vt(o,r,a,e.preserveConsecutiveUppercase)),o=o.replace(Qt,""),o=e.preserveConsecutiveUppercase?te(o,r):r(o),e.pascalCase&&(o=a(o.charAt(0))+o.slice(1)),ee(o,a))}function re(o,e,r,a){const s="virtual:storyblok-components",l="\0"+s;return{name:"vite-plugin-storyblok-components",async resolveId(u){if(u===s)return l},async load(u){if(u===l){const f=[],g=[];for await(const[_,w]of Object.entries(e)){const T=await this.resolve("/"+o+"/"+w+".astro");if(T)f.push(`import ${mt(_)} from "${T.id}"`);else if(r)g.push(_);else throw new Error(`Component could not be found for blok "${_}"! Does "${"/"+o+"/"+w}.astro" exist?`)}let v="";if(r)if(v=",FallbackComponent",a){const _=await this.resolve("/"+o+"/"+a+".astro");if(!_)throw new Error(`Custom fallback component could not be found. Does "${"/"+o+"/"+a}.astro" exist?`);f.push(`import FallbackComponent from "${_.id}"`)}else f.push("import FallbackComponent from '@storyblok/astro/FallbackComponent.astro'");if(Object.values(e).length)return`${f.join(";")};export default {${Object.keys(e).filter(_=>!g.includes(_)).map(_=>mt(_)).join(",")}${v}}`;if(r)return`${f[0]}; export default {${v.replace(",","")}}`;throw new Error(`Currently, no Storyblok components are registered in astro.config.mjs.
10
10
  Please register your components or enable the fallback component.
11
- Detailed information can be found here: https://github.com/storyblok/storyblok-astro`)}}}}function rt(o){const t="virtual:storyblok-options",r="\0"+t;return{name:"vite-plugin-storyblok-options",async resolveId(a){if(a===t)return r},async load(a){if(a===r)return`export default ${JSON.stringify(o)}`}}}let ve=!1;const _e=[],nt=o=>new Promise((t,r)=>{if(typeof window>"u"||(window.storyblokRegisterEvent=s=>{if(window.location===window.parent.location){console.warn("You are not in Draft Mode or in the Visual Editor.");return}ve?s():_e.push(s)},document.getElementById("storyblok-javascript-bridge")))return;const a=document.createElement("script");a.async=!0,a.src=o,a.id="storyblok-javascript-bridge",a.onerror=s=>r(s),a.onload=s=>{_e.forEach(l=>l()),ve=!0,t(s)},document.getElementsByTagName("head")[0].appendChild(a)});var ot=Object.defineProperty,it=(o,t,r)=>t in o?ot(o,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):o[t]=r,O=(o,t,r)=>(it(o,typeof t!="symbol"?t+"":t,r),r);class at{constructor(){O(this,"isCDNUrl",(t="")=>t.indexOf("/cdn/")>-1),O(this,"getOptionsPage",(t,r=25,a=1)=>({...t,per_page:r,page:a})),O(this,"delay",t=>new Promise(r=>setTimeout(r,t))),O(this,"arrayFrom",(t=0,r)=>[...Array(t)].map(r)),O(this,"range",(t=0,r=t)=>{const a=Math.abs(r-t)||0,s=t<r?1:-1;return this.arrayFrom(a,(l,u)=>u*s+t)}),O(this,"asyncMap",async(t,r)=>Promise.all(t.map(r))),O(this,"flatMap",(t=[],r)=>t.map(r).reduce((a,s)=>[...a,...s],[])),O(this,"escapeHTML",function(t){const r={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},a=/[&<>"']/g,s=RegExp(a.source);return t&&s.test(t)?t.replace(a,l=>r[l]):t})}stringify(t,r,a){const s=[];for(const l in t){if(!Object.prototype.hasOwnProperty.call(t,l))continue;const u=t[l],f=a?"":encodeURIComponent(l);let g;typeof u=="object"?g=this.stringify(u,r?r+encodeURIComponent("["+f+"]"):f,Array.isArray(u)):g=(r?r+encodeURIComponent("["+f+"]"):f)+"="+encodeURIComponent(u),s.push(g)}return s.join("&")}getRegionURL(t){const r="api.storyblok.com",a="api-us.storyblok.com",s="app.storyblokchina.cn",l="api-ap.storyblok.com",u="api-ca.storyblok.com";switch(t){case"us":return a;case"cn":return s;case"ap":return l;case"ca":return u;default:return r}}}const st=function(o,t){const r={};for(const a in o){const s=o[a];t.indexOf(a)>-1&&s!==null&&(r[a]=s)}return r},lt=o=>o==="email",ct=()=>({singleTag:"hr"}),ut=()=>({tag:"blockquote"}),ft=()=>({tag:"ul"}),dt=o=>({tag:["pre",{tag:"code",attrs:o.attrs}]}),pt=()=>({singleTag:"br"}),gt=o=>({tag:`h${o.attrs.level}`}),ht=o=>({singleTag:[{tag:"img",attrs:st(o.attrs,["src","alt","title"])}]}),bt=()=>({tag:"li"}),yt=()=>({tag:"ol"}),mt=()=>({tag:"p"}),vt=o=>({tag:[{tag:"span",attrs:{"data-type":"emoji","data-name":o.attrs.name,emoji:o.attrs.emoji}}]}),_t=()=>({tag:"b"}),Tt=()=>({tag:"s"}),wt=()=>({tag:"u"}),kt=()=>({tag:"strong"}),St=()=>({tag:"code"}),At=()=>({tag:"i"}),It=o=>{if(!o.attrs)return{tag:""};const t=new at().escapeHTML,r={...o.attrs},{linktype:a="url"}=o.attrs;if(delete r.linktype,r.href&&(r.href=t(o.attrs.href||"")),lt(a)&&(r.href=`mailto:${r.href}`),r.anchor&&(r.href=`${r.href}#${r.anchor}`,delete r.anchor),r.custom){for(const s in r.custom)r[s]=r.custom[s];delete r.custom}return{tag:[{tag:"a",attrs:r}]}},Ot=o=>({tag:[{tag:"span",attrs:o.attrs}]}),Ct=()=>({tag:"sub"}),$t=()=>({tag:"sup"}),jt=o=>({tag:[{tag:"span",attrs:o.attrs}]}),xt=o=>{var t;return(t=o.attrs)!=null&&t.color?{tag:[{tag:"span",attrs:{style:`background-color:${o.attrs.color};`}}]}:{tag:""}},Et=o=>{var t;return(t=o.attrs)!=null&&t.color?{tag:[{tag:"span",attrs:{style:`color:${o.attrs.color}`}}]}:{tag:""}},Te={nodes:{horizontal_rule:ct,blockquote:ut,bullet_list:ft,code_block:dt,hard_break:pt,heading:gt,image:ht,list_item:bt,ordered_list:yt,paragraph:mt,emoji:vt},marks:{bold:_t,strike:Tt,underline:wt,strong:kt,code:St,italic:At,link:It,styled:Ot,subscript:Ct,superscript:$t,anchor:jt,highlight:xt,textStyle:Et}},Rt=function(o){const t={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},r=/[&<>"']/g,a=RegExp(r.source);return o&&a.test(o)?o.replace(r,s=>t[s]):o};class we{constructor(t){O(this,"marks"),O(this,"nodes"),t||(t=Te),this.marks=t.marks||[],this.nodes=t.nodes||[]}addNode(t,r){this.nodes[t]=r}addMark(t,r){this.marks[t]=r}render(t,r={optimizeImages:!1}){if(t&&t.content&&Array.isArray(t.content)){let a="";return t.content.forEach(s=>{a+=this.renderNode(s)}),r.optimizeImages?this.optimizeImages(a,r.optimizeImages):a}return console.warn(`The render method must receive an Object with a "content" field.
11
+ Detailed information can be found here: https://github.com/storyblok/storyblok-astro`)}}}}function ne(o){const e="virtual:storyblok-options",r="\0"+e;return{name:"vite-plugin-storyblok-options",async resolveId(a){if(a===e)return r},async load(a){if(a===r)return`export default ${JSON.stringify(o)}`}}}let vt=!1;const _t=[],oe=o=>new Promise((e,r)=>{if(typeof window>"u"||(window.storyblokRegisterEvent=s=>{if(window.location===window.parent.location){console.warn("You are not in Draft Mode or in the Visual Editor.");return}vt?s():_t.push(s)},document.getElementById("storyblok-javascript-bridge")))return;const a=document.createElement("script");a.async=!0,a.src=o,a.id="storyblok-javascript-bridge",a.onerror=s=>r(s),a.onload=s=>{_t.forEach(l=>l()),vt=!0,e(s)},document.getElementsByTagName("head")[0].appendChild(a)});var ie=Object.defineProperty,ae=(o,e,r)=>e in o?ie(o,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):o[e]=r,C=(o,e,r)=>(ae(o,typeof e!="symbol"?e+"":e,r),r);class se{constructor(){C(this,"isCDNUrl",(e="")=>e.indexOf("/cdn/")>-1),C(this,"getOptionsPage",(e,r=25,a=1)=>({...e,per_page:r,page:a})),C(this,"delay",e=>new Promise(r=>setTimeout(r,e))),C(this,"arrayFrom",(e=0,r)=>[...Array(e)].map(r)),C(this,"range",(e=0,r=e)=>{const a=Math.abs(r-e)||0,s=e<r?1:-1;return this.arrayFrom(a,(l,u)=>u*s+e)}),C(this,"asyncMap",async(e,r)=>Promise.all(e.map(r))),C(this,"flatMap",(e=[],r)=>e.map(r).reduce((a,s)=>[...a,...s],[])),C(this,"escapeHTML",function(e){const r={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},a=/[&<>"']/g,s=RegExp(a.source);return e&&s.test(e)?e.replace(a,l=>r[l]):e})}stringify(e,r,a){const s=[];for(const l in e){if(!Object.prototype.hasOwnProperty.call(e,l))continue;const u=e[l],f=a?"":encodeURIComponent(l);let g;typeof u=="object"?g=this.stringify(u,r?r+encodeURIComponent("["+f+"]"):f,Array.isArray(u)):g=(r?r+encodeURIComponent("["+f+"]"):f)+"="+encodeURIComponent(u),s.push(g)}return s.join("&")}getRegionURL(e){const r="api.storyblok.com",a="api-us.storyblok.com",s="app.storyblokchina.cn",l="api-ap.storyblok.com",u="api-ca.storyblok.com";switch(e){case"us":return a;case"cn":return s;case"ap":return l;case"ca":return u;default:return r}}}const le=function(o,e){const r={};for(const a in o){const s=o[a];e.indexOf(a)>-1&&s!==null&&(r[a]=s)}return r},ce=o=>o==="email",ue=()=>({singleTag:"hr"}),fe=()=>({tag:"blockquote"}),de=()=>({tag:"ul"}),pe=o=>({tag:["pre",{tag:"code",attrs:o.attrs}]}),ge=()=>({singleTag:"br"}),he=o=>({tag:`h${o.attrs.level}`}),be=o=>({singleTag:[{tag:"img",attrs:le(o.attrs,["src","alt","title"])}]}),ye=()=>({tag:"li"}),me=()=>({tag:"ol"}),ve=()=>({tag:"p"}),_e=o=>({tag:[{tag:"span",attrs:{"data-type":"emoji","data-name":o.attrs.name,emoji:o.attrs.emoji}}]}),Te=()=>({tag:"b"}),we=()=>({tag:"s"}),ke=()=>({tag:"u"}),Ae=()=>({tag:"strong"}),Se=()=>({tag:"code"}),Ie=()=>({tag:"i"}),Oe=o=>{if(!o.attrs)return{tag:""};const e=new se().escapeHTML,r={...o.attrs},{linktype:a="url"}=o.attrs;if(delete r.linktype,r.href&&(r.href=e(o.attrs.href||"")),ce(a)&&(r.href=`mailto:${r.href}`),r.anchor&&(r.href=`${r.href}#${r.anchor}`,delete r.anchor),r.custom){for(const s in r.custom)r[s]=r.custom[s];delete r.custom}return{tag:[{tag:"a",attrs:r}]}},Ce=o=>({tag:[{tag:"span",attrs:o.attrs}]}),je=()=>({tag:"sub"}),$e=()=>({tag:"sup"}),xe=o=>({tag:[{tag:"span",attrs:o.attrs}]}),Ee=o=>{var e;return(e=o.attrs)!=null&&e.color?{tag:[{tag:"span",attrs:{style:`background-color:${o.attrs.color};`}}]}:{tag:""}},Re=o=>{var e;return(e=o.attrs)!=null&&e.color?{tag:[{tag:"span",attrs:{style:`color:${o.attrs.color}`}}]}:{tag:""}},Tt={nodes:{horizontal_rule:ue,blockquote:fe,bullet_list:de,code_block:pe,hard_break:ge,heading:he,image:be,list_item:ye,ordered_list:me,paragraph:ve,emoji:_e},marks:{bold:Te,strike:we,underline:ke,strong:Ae,code:Se,italic:Ie,link:Oe,styled:Ce,subscript:je,superscript:$e,anchor:xe,highlight:Ee,textStyle:Re}},Me=function(o){const e={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},r=/[&<>"']/g,a=RegExp(r.source);return o&&a.test(o)?o.replace(r,s=>e[s]):o};class wt{constructor(e){C(this,"marks"),C(this,"nodes"),e||(e=Tt),this.marks=e.marks||[],this.nodes=e.nodes||[]}addNode(e,r){this.nodes[e]=r}addMark(e,r){this.marks[e]=r}render(e,r={optimizeImages:!1}){if(e&&e.content&&Array.isArray(e.content)){let a="";return e.content.forEach(s=>{a+=this.renderNode(s)}),r.optimizeImages?this.optimizeImages(a,r.optimizeImages):a}return console.warn(`The render method must receive an Object with a "content" field.
12
12
  The "content" field must be an array of nodes as the type ISbRichtext.
13
13
  ISbRichtext:
14
14
  content?: ISbRichtext[]
@@ -31,10 +31,10 @@ Detailed information can be found here: https://github.com/storyblok/storyblok-a
31
31
  }
32
32
  ],
33
33
  type: 'doc'
34
- }`),""}optimizeImages(t,r){let a=0,s=0,l="",u="";typeof r!="boolean"&&(typeof r.width=="number"&&r.width>0&&(l+=`width="${r.width}" `,a=r.width),typeof r.height=="number"&&r.height>0&&(l+=`height="${r.height}" `,s=r.height),(r.loading==="lazy"||r.loading==="eager")&&(l+=`loading="${r.loading}" `),typeof r.class=="string"&&r.class.length>0&&(l+=`class="${r.class}" `),r.filters&&(typeof r.filters.blur=="number"&&r.filters.blur>=0&&r.filters.blur<=100&&(u+=`:blur(${r.filters.blur})`),typeof r.filters.brightness=="number"&&r.filters.brightness>=-100&&r.filters.brightness<=100&&(u+=`:brightness(${r.filters.brightness})`),r.filters.fill&&(r.filters.fill.match(/[0-9A-Fa-f]{6}/g)||r.filters.fill==="transparent")&&(u+=`:fill(${r.filters.fill})`),r.filters.format&&["webp","png","jpeg"].includes(r.filters.format)&&(u+=`:format(${r.filters.format})`),typeof r.filters.grayscale=="boolean"&&r.filters.grayscale&&(u+=":grayscale()"),typeof r.filters.quality=="number"&&r.filters.quality>=0&&r.filters.quality<=100&&(u+=`:quality(${r.filters.quality})`),r.filters.rotate&&[90,180,270].includes(r.filters.rotate)&&(u+=`:rotate(${r.filters.rotate})`),u.length>0&&(u="/filters"+u))),l.length>0&&(t=t.replace(/<img/g,`<img ${l.trim()}`));const f=a>0||s>0||u.length>0?`${a}x${s}${u}`:"";return t=t.replace(/a.storyblok.com\/f\/(\d+)\/([^.]+)\.(gif|jpg|jpeg|png|tif|tiff|bmp)/g,`a.storyblok.com/f/$1/$2.$3/m/${f}`),typeof r!="boolean"&&(r.sizes||r.srcset)&&(t=t.replace(/<img.*?src=["|'](.*?)["|']/g,g=>{var y,_;const T=g.match(/a.storyblok.com\/f\/(\d+)\/([^.]+)\.(gif|jpg|jpeg|png|tif|tiff|bmp)/g);if(T&&T.length>0){const S={srcset:(y=r.srcset)==null?void 0:y.map(w=>{if(typeof w=="number")return`//${T}/m/${w}x0${u} ${w}w`;if(typeof w=="object"&&w.length===2){let z=0,J=0;return typeof w[0]=="number"&&(z=w[0]),typeof w[1]=="number"&&(J=w[1]),`//${T}/m/${z}x${J}${u} ${z}w`}}).join(", "),sizes:(_=r.sizes)==null?void 0:_.map(w=>w).join(", ")};let C="";return S.srcset&&(C+=`srcset="${S.srcset}" `),S.sizes&&(C+=`sizes="${S.sizes}" `),g.replace(/<img/g,`<img ${C.trim()}`)}return g})),t}renderNode(t){const r=[];t.marks&&t.marks.forEach(s=>{const l=this.getMatchingMark(s);l&&l.tag!==""&&r.push(this.renderOpeningTag(l.tag))});const a=this.getMatchingNode(t);return a&&a.tag&&r.push(this.renderOpeningTag(a.tag)),t.content?t.content.forEach(s=>{r.push(this.renderNode(s))}):t.text?r.push(Rt(t.text)):a&&a.singleTag?r.push(this.renderTag(a.singleTag," /")):a&&a.html?r.push(a.html):t.type==="emoji"&&r.push(this.renderEmoji(t)),a&&a.tag&&r.push(this.renderClosingTag(a.tag)),t.marks&&t.marks.slice(0).reverse().forEach(s=>{const l=this.getMatchingMark(s);l&&l.tag!==""&&r.push(this.renderClosingTag(l.tag))}),r.join("")}renderTag(t,r){return t.constructor===String?`<${t}${r}>`:t.map(a=>{if(a.constructor===String)return`<${a}${r}>`;{let s=`<${a.tag}`;if(a.attrs)for(const l in a.attrs){const u=a.attrs[l];u!==null&&(s+=` ${l}="${u}"`)}return`${s}${r}>`}}).join("")}renderOpeningTag(t){return this.renderTag(t,"")}renderClosingTag(t){return t.constructor===String?`</${t}>`:t.slice(0).reverse().map(r=>r.constructor===String?`</${r}>`:`</${r.tag}>`).join("")}getMatchingNode(t){const r=this.nodes[t.type];if(typeof r=="function")return r(t)}getMatchingMark(t){const r=this.marks[t.type];if(typeof r=="function")return r(t)}renderEmoji(t){if(t.attrs.emoji)return t.attrs.emoji;const r=[{tag:"img",attrs:{src:t.attrs.fallbackImage,draggable:"false",loading:"lazy",align:"absmiddle"}}];return this.renderTag(r," /")}}const Mt=o=>{if(typeof o!="object"||typeof o._editable>"u")return{};try{const t=JSON.parse(o._editable.replace(/^<!--#storyblok#/,"").replace(/-->$/,""));return t?{"data-blok-c":JSON.stringify(t),"data-blok-uid":t.id+"-"+t.uid}:{}}catch{return{}}};let Pt,Lt="https://app.storyblok.com/f/storyblok-v2-latest.js";const Nt=(o,t)=>{o.addNode("blok",r=>{let a="";return r.attrs.body.forEach(s=>{a+=t(s.component,s)}),{html:a}})},zt=o=>!o||!(o!=null&&o.content.some(t=>t.content||t.type==="blok"||t.type==="horizontal_rule")),Ut=(o,t,r)=>{let a=r||Pt;if(!a){console.error("Please initialize the Storyblok SDK before calling the renderRichText function");return}return zt(o)?"":(t&&(a=new we(t.schema),t.resolver&&Nt(a,t.resolver)),a.render(o))},Dt=()=>nt(Lt);function Bt(o){let t={resolveRelations:[]};function r(a){a&&(Array.isArray(a)?t.resolveRelations.push(...a):t.resolveRelations.push(a))}for(const a of o)if(a.options){const{apiOptions:s,bridgeOptions:l}=a.options;if(r(s==null?void 0:s.resolve_relations),l){const{resolveRelations:u,...f}=l;r(u),Object.assign(t,f)}}return t.resolveRelations=[...new Set(t.resolveRelations)],t}var q=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Ft(o){return o&&o.__esModule&&Object.prototype.hasOwnProperty.call(o,"default")?o.default:o}var G={exports:{}};G.exports,function(o,t){var r=200,a="__lodash_hash_undefined__",s=800,l=16,u=9007199254740991,f="[object Arguments]",g="[object Array]",y="[object AsyncFunction]",_="[object Boolean]",T="[object Date]",S="[object Error]",C="[object Function]",w="[object GeneratorFunction]",z="[object Map]",J="[object Number]",rr="[object Null]",Se="[object Object]",nr="[object Proxy]",or="[object RegExp]",ir="[object Set]",ar="[object String]",sr="[object Undefined]",lr="[object WeakMap]",cr="[object ArrayBuffer]",ur="[object DataView]",fr="[object Float32Array]",dr="[object Float64Array]",pr="[object Int8Array]",gr="[object Int16Array]",hr="[object Int32Array]",br="[object Uint8Array]",yr="[object Uint8ClampedArray]",mr="[object Uint16Array]",vr="[object Uint32Array]",_r=/[\\^$.*+?()[\]{}|]/g,Tr=/^\[object .+?Constructor\]$/,wr=/^(?:0|[1-9]\d*)$/,b={};b[fr]=b[dr]=b[pr]=b[gr]=b[hr]=b[br]=b[yr]=b[mr]=b[vr]=!0,b[f]=b[g]=b[cr]=b[_]=b[ur]=b[T]=b[S]=b[C]=b[z]=b[J]=b[Se]=b[or]=b[ir]=b[ar]=b[lr]=!1;var Ae=typeof q=="object"&&q&&q.Object===Object&&q,kr=typeof self=="object"&&self&&self.Object===Object&&self,U=Ae||kr||Function("return this")(),Ie=t&&!t.nodeType&&t,D=Ie&&!0&&o&&!o.nodeType&&o,Oe=D&&D.exports===Ie,re=Oe&&Ae.process,Ce=function(){try{var e=D&&D.require&&D.require("util").types;return e||re&&re.binding&&re.binding("util")}catch{}}(),$e=Ce&&Ce.isTypedArray;function Sr(e,n,i){switch(i.length){case 0:return e.call(n);case 1:return e.call(n,i[0]);case 2:return e.call(n,i[0],i[1]);case 3:return e.call(n,i[0],i[1],i[2])}return e.apply(n,i)}function Ar(e,n){for(var i=-1,c=Array(e);++i<e;)c[i]=n(i);return c}function Ir(e){return function(n){return e(n)}}function Or(e,n){return e==null?void 0:e[n]}function Cr(e,n){return function(i){return e(n(i))}}var $r=Array.prototype,jr=Function.prototype,K=Object.prototype,ne=U["__core-js_shared__"],W=jr.toString,$=K.hasOwnProperty,je=function(){var e=/[^.]+$/.exec(ne&&ne.keys&&ne.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}(),xe=K.toString,xr=W.call(Object),Er=RegExp("^"+W.call($).replace(_r,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Y=Oe?U.Buffer:void 0,Ee=U.Symbol,Re=U.Uint8Array,Me=Y?Y.allocUnsafe:void 0,Pe=Cr(Object.getPrototypeOf,Object),Le=Object.create,Rr=K.propertyIsEnumerable,Mr=$r.splice,x=Ee?Ee.toStringTag:void 0,X=function(){try{var e=ae(Object,"defineProperty");return e({},"",{}),e}catch{}}(),Pr=Y?Y.isBuffer:void 0,Ne=Math.max,Lr=Date.now,ze=ae(U,"Map"),B=ae(Object,"create"),Nr=function(){function e(){}return function(n){if(!R(n))return{};if(Le)return Le(n);e.prototype=n;var i=new e;return e.prototype=void 0,i}}();function E(e){var n=-1,i=e==null?0:e.length;for(this.clear();++n<i;){var c=e[n];this.set(c[0],c[1])}}function zr(){this.__data__=B?B(null):{},this.size=0}function Ur(e){var n=this.has(e)&&delete this.__data__[e];return this.size-=n?1:0,n}function Dr(e){var n=this.__data__;if(B){var i=n[e];return i===a?void 0:i}return $.call(n,e)?n[e]:void 0}function Br(e){var n=this.__data__;return B?n[e]!==void 0:$.call(n,e)}function Fr(e,n){var i=this.__data__;return this.size+=this.has(e)?0:1,i[e]=B&&n===void 0?a:n,this}E.prototype.clear=zr,E.prototype.delete=Ur,E.prototype.get=Dr,E.prototype.has=Br,E.prototype.set=Fr;function j(e){var n=-1,i=e==null?0:e.length;for(this.clear();++n<i;){var c=e[n];this.set(c[0],c[1])}}function Hr(){this.__data__=[],this.size=0}function qr(e){var n=this.__data__,i=Z(n,e);if(i<0)return!1;var c=n.length-1;return i==c?n.pop():Mr.call(n,i,1),--this.size,!0}function Gr(e){var n=this.__data__,i=Z(n,e);return i<0?void 0:n[i][1]}function Jr(e){return Z(this.__data__,e)>-1}function Kr(e,n){var i=this.__data__,c=Z(i,e);return c<0?(++this.size,i.push([e,n])):i[c][1]=n,this}j.prototype.clear=Hr,j.prototype.delete=qr,j.prototype.get=Gr,j.prototype.has=Jr,j.prototype.set=Kr;function M(e){var n=-1,i=e==null?0:e.length;for(this.clear();++n<i;){var c=e[n];this.set(c[0],c[1])}}function Wr(){this.size=0,this.__data__={hash:new E,map:new(ze||j),string:new E}}function Yr(e){var n=V(this,e).delete(e);return this.size-=n?1:0,n}function Xr(e){return V(this,e).get(e)}function Zr(e){return V(this,e).has(e)}function Qr(e,n){var i=V(this,e),c=i.size;return i.set(e,n),this.size+=i.size==c?0:1,this}M.prototype.clear=Wr,M.prototype.delete=Yr,M.prototype.get=Xr,M.prototype.has=Zr,M.prototype.set=Qr;function P(e){var n=this.__data__=new j(e);this.size=n.size}function Vr(){this.__data__=new j,this.size=0}function en(e){var n=this.__data__,i=n.delete(e);return this.size=n.size,i}function tn(e){return this.__data__.get(e)}function rn(e){return this.__data__.has(e)}function nn(e,n){var i=this.__data__;if(i instanceof j){var c=i.__data__;if(!ze||c.length<r-1)return c.push([e,n]),this.size=++i.size,this;i=this.__data__=new M(c)}return i.set(e,n),this.size=i.size,this}P.prototype.clear=Vr,P.prototype.delete=en,P.prototype.get=tn,P.prototype.has=rn,P.prototype.set=nn;function on(e,n){var i=ce(e),c=!i&&le(e),p=!i&&!c&&He(e),h=!i&&!c&&!p&&Ge(e),m=i||c||p||h,d=m?Ar(e.length,String):[],v=d.length;for(var I in e)(n||$.call(e,I))&&!(m&&(I=="length"||p&&(I=="offset"||I=="parent")||h&&(I=="buffer"||I=="byteLength"||I=="byteOffset")||Be(I,v)))&&d.push(I);return d}function oe(e,n,i){(i!==void 0&&!ee(e[n],i)||i===void 0&&!(n in e))&&ie(e,n,i)}function an(e,n,i){var c=e[n];(!($.call(e,n)&&ee(c,i))||i===void 0&&!(n in e))&&ie(e,n,i)}function Z(e,n){for(var i=e.length;i--;)if(ee(e[i][0],n))return i;return-1}function ie(e,n,i){n=="__proto__"&&X?X(e,n,{configurable:!0,enumerable:!0,value:i,writable:!0}):e[n]=i}var sn=_n();function Q(e){return e==null?e===void 0?sr:rr:x&&x in Object(e)?Tn(e):On(e)}function Ue(e){return F(e)&&Q(e)==f}function ln(e){if(!R(e)||An(e))return!1;var n=fe(e)?Er:Tr;return n.test(xn(e))}function cn(e){return F(e)&&qe(e.length)&&!!b[Q(e)]}function un(e){if(!R(e))return In(e);var n=Fe(e),i=[];for(var c in e)c=="constructor"&&(n||!$.call(e,c))||i.push(c);return i}function De(e,n,i,c,p){e!==n&&sn(n,function(h,m){if(p||(p=new P),R(h))fn(e,n,m,i,De,c,p);else{var d=c?c(se(e,m),h,m+"",e,n,p):void 0;d===void 0&&(d=h),oe(e,m,d)}},Je)}function fn(e,n,i,c,p,h,m){var d=se(e,i),v=se(n,i),I=m.get(v);if(I){oe(e,i,I);return}var A=h?h(d,v,i+"",e,n,m):void 0,H=A===void 0;if(H){var de=ce(v),pe=!de&&He(v),We=!de&&!pe&&Ge(v);A=v,de||pe||We?ce(d)?A=d:En(d)?A=yn(d):pe?(H=!1,A=gn(v,!0)):We?(H=!1,A=bn(v,!0)):A=[]:Rn(v)||le(v)?(A=d,le(d)?A=Mn(d):(!R(d)||fe(d))&&(A=wn(v))):H=!1}H&&(m.set(v,A),p(A,v,c,h,m),m.delete(v)),oe(e,i,A)}function dn(e,n){return $n(Cn(e,n,Ke),e+"")}var pn=X?function(e,n){return X(e,"toString",{configurable:!0,enumerable:!1,value:Ln(n),writable:!0})}:Ke;function gn(e,n){if(n)return e.slice();var i=e.length,c=Me?Me(i):new e.constructor(i);return e.copy(c),c}function hn(e){var n=new e.constructor(e.byteLength);return new Re(n).set(new Re(e)),n}function bn(e,n){var i=n?hn(e.buffer):e.buffer;return new e.constructor(i,e.byteOffset,e.length)}function yn(e,n){var i=-1,c=e.length;for(n||(n=Array(c));++i<c;)n[i]=e[i];return n}function mn(e,n,i,c){var p=!i;i||(i={});for(var h=-1,m=n.length;++h<m;){var d=n[h],v=c?c(i[d],e[d],d,i,e):void 0;v===void 0&&(v=e[d]),p?ie(i,d,v):an(i,d,v)}return i}function vn(e){return dn(function(n,i){var c=-1,p=i.length,h=p>1?i[p-1]:void 0,m=p>2?i[2]:void 0;for(h=e.length>3&&typeof h=="function"?(p--,h):void 0,m&&kn(i[0],i[1],m)&&(h=p<3?void 0:h,p=1),n=Object(n);++c<p;){var d=i[c];d&&e(n,d,c,h)}return n})}function _n(e){return function(n,i,c){for(var p=-1,h=Object(n),m=c(n),d=m.length;d--;){var v=m[e?d:++p];if(i(h[v],v,h)===!1)break}return n}}function V(e,n){var i=e.__data__;return Sn(n)?i[typeof n=="string"?"string":"hash"]:i.map}function ae(e,n){var i=Or(e,n);return ln(i)?i:void 0}function Tn(e){var n=$.call(e,x),i=e[x];try{e[x]=void 0;var c=!0}catch{}var p=xe.call(e);return c&&(n?e[x]=i:delete e[x]),p}function wn(e){return typeof e.constructor=="function"&&!Fe(e)?Nr(Pe(e)):{}}function Be(e,n){var i=typeof e;return n=n??u,!!n&&(i=="number"||i!="symbol"&&wr.test(e))&&e>-1&&e%1==0&&e<n}function kn(e,n,i){if(!R(i))return!1;var c=typeof n;return(c=="number"?ue(i)&&Be(n,i.length):c=="string"&&n in i)?ee(i[n],e):!1}function Sn(e){var n=typeof e;return n=="string"||n=="number"||n=="symbol"||n=="boolean"?e!=="__proto__":e===null}function An(e){return!!je&&je in e}function Fe(e){var n=e&&e.constructor,i=typeof n=="function"&&n.prototype||K;return e===i}function In(e){var n=[];if(e!=null)for(var i in Object(e))n.push(i);return n}function On(e){return xe.call(e)}function Cn(e,n,i){return n=Ne(n===void 0?e.length-1:n,0),function(){for(var c=arguments,p=-1,h=Ne(c.length-n,0),m=Array(h);++p<h;)m[p]=c[n+p];p=-1;for(var d=Array(n+1);++p<n;)d[p]=c[p];return d[n]=i(m),Sr(e,this,d)}}function se(e,n){if(!(n==="constructor"&&typeof e[n]=="function")&&n!="__proto__")return e[n]}var $n=jn(pn);function jn(e){var n=0,i=0;return function(){var c=Lr(),p=l-(c-i);if(i=c,p>0){if(++n>=s)return arguments[0]}else n=0;return e.apply(void 0,arguments)}}function xn(e){if(e!=null){try{return W.call(e)}catch{}try{return e+""}catch{}}return""}function ee(e,n){return e===n||e!==e&&n!==n}var le=Ue(function(){return arguments}())?Ue:function(e){return F(e)&&$.call(e,"callee")&&!Rr.call(e,"callee")},ce=Array.isArray;function ue(e){return e!=null&&qe(e.length)&&!fe(e)}function En(e){return F(e)&&ue(e)}var He=Pr||Nn;function fe(e){if(!R(e))return!1;var n=Q(e);return n==C||n==w||n==y||n==nr}function qe(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=u}function R(e){var n=typeof e;return e!=null&&(n=="object"||n=="function")}function F(e){return e!=null&&typeof e=="object"}function Rn(e){if(!F(e)||Q(e)!=Se)return!1;var n=Pe(e);if(n===null)return!0;var i=$.call(n,"constructor")&&n.constructor;return typeof i=="function"&&i instanceof i&&W.call(i)==xr}var Ge=$e?Ir($e):cn;function Mn(e){return mn(e,Je(e))}function Je(e){return ue(e)?on(e,!0):un(e)}var Pn=vn(function(e,n,i,c){De(e,n,i,c)});function Ln(e){return function(){return e}}function Ke(e){return e}function Nn(){return!1}o.exports=Pn}(G,G.exports);var Ht=G.exports;const qt=Ft(Ht);function Gt(o){let t;function r(a,s){var l,u,f;(s==null?void 0:s.type)==="AwaitExpression"&&((u=(l=s==null?void 0:s.argument)==null?void 0:l.callee)==null?void 0:u.name)==="useStoryblok"&&((f=s==null?void 0:s.argument)==null?void 0:f.arguments).forEach(y=>{var _;(_=y==null?void 0:y.properties)==null||_.forEach(T=>{var S;["apiOptions","bridgeOptions"].includes(T.key.name)&&(t={...t,[T.key.name]:Jt((S=T==null?void 0:T.value)==null?void 0:S.properties)})})})}return qt({},o,r),t}function Jt(o){return o.reduce((t,{key:r,value:a})=>{const{type:s}=a;return t[r.name]=s==="Literal"?a.value:s==="ArrayExpression"?a.elements.map(l=>l.value):a.value,t},{})}let N=[];function Kt(o,t){const r="virtual:storyblok-bridge",a="\0"+r;if(!o||t!=="server")return{name:"vite-plugin-storyblok-bridge",resolveId(f){if(f===r)return a},load(f){if(f===a)return"export const bridgeOptions = null"}};let s=[],l=null,u=null;return{name:"vite-plugin-storyblok-bridge",async resolveId(f){if(f===r)return a},async transform(f,g){var C;if(g.includes("node_modules")&&!g.includes("/pages/")||!f.includes("useStoryblok")||!((C=this.getModuleInfo(g).meta)!=null&&C.astro))return;const[,..._]=g.split("src/pages/"),T=_.join("/").replace(".astro",""),S=Gt(this.parse(f));N.length&&(s=N.filter(w=>w.url!==T)),s.push({url:T,options:S}),l&&(u&&clearTimeout(u),u=setTimeout(()=>{Wt(N,s)||(N.length!==0&&(l.restart(),console.info("Updating bridge options...")),N=[...s])},1e3))},async load(f){if(f===a)return`export const bridgeOptions = ${JSON.stringify(Bt(s))}`},configureServer(f){l=f}}}function Wt(o=[],t=[]){return t.every(({url:r,options:a})=>{const s=o.find(l=>(l==null?void 0:l.url)===r);return s&&JSON.stringify(a)===JSON.stringify(s.options)})}let ke;async function Yt(o){const{action:t,story:r}=o||{};if(t==="input"&&r){const a=async()=>{const l=await Zt(r),u=document.body;if(l.outerHTML===u.outerHTML)return;const f=document.querySelector('[data-blok-focused="true"]');Xt(u,l,f)};clearTimeout(ke),ke=setTimeout(a,1e3)}["published","change"].includes(o==null?void 0:o.action)&&location.reload()}function Xt(o,t,r){if(r){const a=r.getAttribute("data-blok-uid"),s=t.querySelector(`[data-blok-uid="${a}"]`);s&&(s.setAttribute("data-blok-focused","true"),r.replaceWith(s))}else o.replaceWith(t)}async function Zt(o){const r=await(await fetch(location.href,{method:"POST",body:JSON.stringify({...o,is_storyblok_preview:!0}),headers:{"Content-Type":"application/json"}})).text();return new DOMParser().parseFromString(r,"text/html").body}function Qt(){return globalThis.storyblokApiInstance||console.error("storyblokApiInstance has not been initialized correctly"),globalThis.storyblokApiInstance}async function Vt({slug:o,apiOptions:t={},bridgeOptions:r={},Astro:a}){globalThis.storyblokApiInstance||console.error("storyblokApiInstance has not been initialized correctly");let s=null;if(a&&a.locals._storyblok_preview_data)s=a.locals._storyblok_preview_data;else{const{data:l}=await globalThis.storyblokApiInstance.get(o,t,r);s=l.story}return s}function er(o,t){const r=globalThis.storyblokApiInstance.richTextResolver;if(!r){console.error("Please initialize the Storyblok SDK before calling the renderRichText function");return}return Ut(o,t,r)}function tr(o){const t={useCustomApi:!1,bridge:!0,componentsDir:"src",enableFallbackComponent:!1,experimentalLivePreview:!1,...o};return{name:"@storyblok/astro",hooks:{"astro:config:setup":({injectScript:r,updateConfig:a,addDevToolbarApp:s,addMiddleware:l,config:u})=>{if(a({vite:{plugins:[L(t.accessToken,t.useCustomApi,t.apiOptions),tt(t.componentsDir,t.components,t.enableFallbackComponent,t.customFallbackComponent),rt(t),Kt(t.experimentalLivePreview,u.output)]}}),t.experimentalLivePreview&&(u==null?void 0:u.output)!=="server")throw new Error("To utilize the Astro Storyblok Live feature, Astro must be configured in SSR mode. Please disable this feature or switch Astro to SSR mode.");if(r("page-ssr",`
34
+ }`),""}optimizeImages(e,r){let a=0,s=0,l="",u="";typeof r!="boolean"&&(typeof r.width=="number"&&r.width>0&&(l+=`width="${r.width}" `,a=r.width),typeof r.height=="number"&&r.height>0&&(l+=`height="${r.height}" `,s=r.height),(r.loading==="lazy"||r.loading==="eager")&&(l+=`loading="${r.loading}" `),typeof r.class=="string"&&r.class.length>0&&(l+=`class="${r.class}" `),r.filters&&(typeof r.filters.blur=="number"&&r.filters.blur>=0&&r.filters.blur<=100&&(u+=`:blur(${r.filters.blur})`),typeof r.filters.brightness=="number"&&r.filters.brightness>=-100&&r.filters.brightness<=100&&(u+=`:brightness(${r.filters.brightness})`),r.filters.fill&&(r.filters.fill.match(/[0-9A-Fa-f]{6}/g)||r.filters.fill==="transparent")&&(u+=`:fill(${r.filters.fill})`),r.filters.format&&["webp","png","jpeg"].includes(r.filters.format)&&(u+=`:format(${r.filters.format})`),typeof r.filters.grayscale=="boolean"&&r.filters.grayscale&&(u+=":grayscale()"),typeof r.filters.quality=="number"&&r.filters.quality>=0&&r.filters.quality<=100&&(u+=`:quality(${r.filters.quality})`),r.filters.rotate&&[90,180,270].includes(r.filters.rotate)&&(u+=`:rotate(${r.filters.rotate})`),u.length>0&&(u="/filters"+u))),l.length>0&&(e=e.replace(/<img/g,`<img ${l.trim()}`));const f=a>0||s>0||u.length>0?`${a}x${s}${u}`:"";return e=e.replace(/a.storyblok.com\/f\/(\d+)\/([^.]+)\.(gif|jpg|jpeg|png|tif|tiff|bmp)/g,`a.storyblok.com/f/$1/$2.$3/m/${f}`),typeof r!="boolean"&&(r.sizes||r.srcset)&&(e=e.replace(/<img.*?src=["|'](.*?)["|']/g,g=>{var v,_;const w=g.match(/a.storyblok.com\/f\/(\d+)\/([^.]+)\.(gif|jpg|jpeg|png|tif|tiff|bmp)/g);if(w&&w.length>0){const T={srcset:(v=r.srcset)==null?void 0:v.map(k=>{if(typeof k=="number")return`//${w}/m/${k}x0${u} ${k}w`;if(typeof k=="object"&&k.length===2){let L=0,J=0;return typeof k[0]=="number"&&(L=k[0]),typeof k[1]=="number"&&(J=k[1]),`//${w}/m/${L}x${J}${u} ${L}w`}}).join(", "),sizes:(_=r.sizes)==null?void 0:_.map(k=>k).join(", ")};let S="";return T.srcset&&(S+=`srcset="${T.srcset}" `),T.sizes&&(S+=`sizes="${T.sizes}" `),g.replace(/<img/g,`<img ${S.trim()}`)}return g})),e}renderNode(e){const r=[];e.marks&&e.marks.forEach(s=>{const l=this.getMatchingMark(s);l&&l.tag!==""&&r.push(this.renderOpeningTag(l.tag))});const a=this.getMatchingNode(e);return a&&a.tag&&r.push(this.renderOpeningTag(a.tag)),e.content?e.content.forEach(s=>{r.push(this.renderNode(s))}):e.text?r.push(Me(e.text)):a&&a.singleTag?r.push(this.renderTag(a.singleTag," /")):a&&a.html?r.push(a.html):e.type==="emoji"&&r.push(this.renderEmoji(e)),a&&a.tag&&r.push(this.renderClosingTag(a.tag)),e.marks&&e.marks.slice(0).reverse().forEach(s=>{const l=this.getMatchingMark(s);l&&l.tag!==""&&r.push(this.renderClosingTag(l.tag))}),r.join("")}renderTag(e,r){return e.constructor===String?`<${e}${r}>`:e.map(a=>{if(a.constructor===String)return`<${a}${r}>`;{let s=`<${a.tag}`;if(a.attrs)for(const l in a.attrs){const u=a.attrs[l];u!==null&&(s+=` ${l}="${u}"`)}return`${s}${r}>`}}).join("")}renderOpeningTag(e){return this.renderTag(e,"")}renderClosingTag(e){return e.constructor===String?`</${e}>`:e.slice(0).reverse().map(r=>r.constructor===String?`</${r}>`:`</${r.tag}>`).join("")}getMatchingNode(e){const r=this.nodes[e.type];if(typeof r=="function")return r(e)}getMatchingMark(e){const r=this.marks[e.type];if(typeof r=="function")return r(e)}renderEmoji(e){if(e.attrs.emoji)return e.attrs.emoji;const r=[{tag:"img",attrs:{src:e.attrs.fallbackImage,draggable:"false",loading:"lazy",align:"absmiddle"}}];return this.renderTag(r," /")}}const Pe=o=>{if(typeof o!="object"||typeof o._editable>"u")return{};try{const e=JSON.parse(o._editable.replace(/^<!--#storyblok#/,"").replace(/-->$/,""));return e?{"data-blok-c":JSON.stringify(e),"data-blok-uid":e.id+"-"+e.uid}:{}}catch{return{}}};let Ne,ze="https://app.storyblok.com/f/storyblok-v2-latest.js";const Le=(o,e)=>{o.addNode("blok",r=>{let a="";return r.attrs.body.forEach(s=>{a+=e(s.component,s)}),{html:a}})},Ue=o=>!o||!(o!=null&&o.content.some(e=>e.content||e.type==="blok"||e.type==="horizontal_rule")),De=(o,e,r)=>{let a=r||Ne;if(!a){console.error("Please initialize the Storyblok SDK before calling the renderRichText function");return}return Ue(o)?"":(e&&(a=new wt(e.schema),e.resolver&&Le(a,e.resolver)),a.render(o))},Be=()=>oe(ze);function Fe(o){let e={resolveRelations:[]};function r(a){a&&(Array.isArray(a)?e.resolveRelations.push(...a):e.resolveRelations.push(a))}for(const a of o)if(a.options){const{apiOptions:s,bridgeOptions:l}=a.options;if(r(s==null?void 0:s.resolve_relations),l){const{resolveRelations:u,...f}=l;r(u),Object.assign(e,f)}}return e.resolveRelations=[...new Set(e.resolveRelations)],e}var q=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function He(o){return o&&o.__esModule&&Object.prototype.hasOwnProperty.call(o,"default")?o.default:o}var G={exports:{}};G.exports,function(o,e){var r=200,a="__lodash_hash_undefined__",s=800,l=16,u=9007199254740991,f="[object Arguments]",g="[object Array]",v="[object AsyncFunction]",_="[object Boolean]",w="[object Date]",T="[object Error]",S="[object Function]",k="[object GeneratorFunction]",L="[object Map]",J="[object Number]",rr="[object Null]",St="[object Object]",nr="[object Proxy]",or="[object RegExp]",ir="[object Set]",ar="[object String]",sr="[object Undefined]",lr="[object WeakMap]",cr="[object ArrayBuffer]",ur="[object DataView]",fr="[object Float32Array]",dr="[object Float64Array]",pr="[object Int8Array]",gr="[object Int16Array]",hr="[object Int32Array]",br="[object Uint8Array]",yr="[object Uint8ClampedArray]",mr="[object Uint16Array]",vr="[object Uint32Array]",_r=/[\\^$.*+?()[\]{}|]/g,Tr=/^\[object .+?Constructor\]$/,wr=/^(?:0|[1-9]\d*)$/,b={};b[fr]=b[dr]=b[pr]=b[gr]=b[hr]=b[br]=b[yr]=b[mr]=b[vr]=!0,b[f]=b[g]=b[cr]=b[_]=b[ur]=b[w]=b[T]=b[S]=b[L]=b[J]=b[St]=b[or]=b[ir]=b[ar]=b[lr]=!1;var It=typeof q=="object"&&q&&q.Object===Object&&q,kr=typeof self=="object"&&self&&self.Object===Object&&self,U=It||kr||Function("return this")(),Ot=e&&!e.nodeType&&e,D=Ot&&!0&&o&&!o.nodeType&&o,Ct=D&&D.exports===Ot,rt=Ct&&It.process,jt=function(){try{var t=D&&D.require&&D.require("util").types;return t||rt&&rt.binding&&rt.binding("util")}catch{}}(),$t=jt&&jt.isTypedArray;function Ar(t,n,i){switch(i.length){case 0:return t.call(n);case 1:return t.call(n,i[0]);case 2:return t.call(n,i[0],i[1]);case 3:return t.call(n,i[0],i[1],i[2])}return t.apply(n,i)}function Sr(t,n){for(var i=-1,c=Array(t);++i<t;)c[i]=n(i);return c}function Ir(t){return function(n){return t(n)}}function Or(t,n){return t==null?void 0:t[n]}function Cr(t,n){return function(i){return t(n(i))}}var jr=Array.prototype,$r=Function.prototype,K=Object.prototype,nt=U["__core-js_shared__"],W=$r.toString,j=K.hasOwnProperty,xt=function(){var t=/[^.]+$/.exec(nt&&nt.keys&&nt.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""}(),Et=K.toString,xr=W.call(Object),Er=RegExp("^"+W.call(j).replace(_r,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Y=Ct?U.Buffer:void 0,Rt=U.Symbol,Mt=U.Uint8Array,Pt=Y?Y.allocUnsafe:void 0,Nt=Cr(Object.getPrototypeOf,Object),zt=Object.create,Rr=K.propertyIsEnumerable,Mr=jr.splice,x=Rt?Rt.toStringTag:void 0,X=function(){try{var t=at(Object,"defineProperty");return t({},"",{}),t}catch{}}(),Pr=Y?Y.isBuffer:void 0,Lt=Math.max,Nr=Date.now,Ut=at(U,"Map"),B=at(Object,"create"),zr=function(){function t(){}return function(n){if(!R(n))return{};if(zt)return zt(n);t.prototype=n;var i=new t;return t.prototype=void 0,i}}();function E(t){var n=-1,i=t==null?0:t.length;for(this.clear();++n<i;){var c=t[n];this.set(c[0],c[1])}}function Lr(){this.__data__=B?B(null):{},this.size=0}function Ur(t){var n=this.has(t)&&delete this.__data__[t];return this.size-=n?1:0,n}function Dr(t){var n=this.__data__;if(B){var i=n[t];return i===a?void 0:i}return j.call(n,t)?n[t]:void 0}function Br(t){var n=this.__data__;return B?n[t]!==void 0:j.call(n,t)}function Fr(t,n){var i=this.__data__;return this.size+=this.has(t)?0:1,i[t]=B&&n===void 0?a:n,this}E.prototype.clear=Lr,E.prototype.delete=Ur,E.prototype.get=Dr,E.prototype.has=Br,E.prototype.set=Fr;function $(t){var n=-1,i=t==null?0:t.length;for(this.clear();++n<i;){var c=t[n];this.set(c[0],c[1])}}function Hr(){this.__data__=[],this.size=0}function qr(t){var n=this.__data__,i=Z(n,t);if(i<0)return!1;var c=n.length-1;return i==c?n.pop():Mr.call(n,i,1),--this.size,!0}function Gr(t){var n=this.__data__,i=Z(n,t);return i<0?void 0:n[i][1]}function Jr(t){return Z(this.__data__,t)>-1}function Kr(t,n){var i=this.__data__,c=Z(i,t);return c<0?(++this.size,i.push([t,n])):i[c][1]=n,this}$.prototype.clear=Hr,$.prototype.delete=qr,$.prototype.get=Gr,$.prototype.has=Jr,$.prototype.set=Kr;function M(t){var n=-1,i=t==null?0:t.length;for(this.clear();++n<i;){var c=t[n];this.set(c[0],c[1])}}function Wr(){this.size=0,this.__data__={hash:new E,map:new(Ut||$),string:new E}}function Yr(t){var n=V(this,t).delete(t);return this.size-=n?1:0,n}function Xr(t){return V(this,t).get(t)}function Zr(t){return V(this,t).has(t)}function Qr(t,n){var i=V(this,t),c=i.size;return i.set(t,n),this.size+=i.size==c?0:1,this}M.prototype.clear=Wr,M.prototype.delete=Yr,M.prototype.get=Xr,M.prototype.has=Zr,M.prototype.set=Qr;function P(t){var n=this.__data__=new $(t);this.size=n.size}function Vr(){this.__data__=new $,this.size=0}function tn(t){var n=this.__data__,i=n.delete(t);return this.size=n.size,i}function en(t){return this.__data__.get(t)}function rn(t){return this.__data__.has(t)}function nn(t,n){var i=this.__data__;if(i instanceof $){var c=i.__data__;if(!Ut||c.length<r-1)return c.push([t,n]),this.size=++i.size,this;i=this.__data__=new M(c)}return i.set(t,n),this.size=i.size,this}P.prototype.clear=Vr,P.prototype.delete=tn,P.prototype.get=en,P.prototype.has=rn,P.prototype.set=nn;function on(t,n){var i=ct(t),c=!i&&lt(t),p=!i&&!c&&qt(t),h=!i&&!c&&!p&&Jt(t),y=i||c||p||h,d=y?Sr(t.length,String):[],m=d.length;for(var O in t)(n||j.call(t,O))&&!(y&&(O=="length"||p&&(O=="offset"||O=="parent")||h&&(O=="buffer"||O=="byteLength"||O=="byteOffset")||Ft(O,m)))&&d.push(O);return d}function ot(t,n,i){(i!==void 0&&!tt(t[n],i)||i===void 0&&!(n in t))&&it(t,n,i)}function an(t,n,i){var c=t[n];(!(j.call(t,n)&&tt(c,i))||i===void 0&&!(n in t))&&it(t,n,i)}function Z(t,n){for(var i=t.length;i--;)if(tt(t[i][0],n))return i;return-1}function it(t,n,i){n=="__proto__"&&X?X(t,n,{configurable:!0,enumerable:!0,value:i,writable:!0}):t[n]=i}var sn=_n();function Q(t){return t==null?t===void 0?sr:rr:x&&x in Object(t)?Tn(t):On(t)}function Dt(t){return F(t)&&Q(t)==f}function ln(t){if(!R(t)||Sn(t))return!1;var n=ft(t)?Er:Tr;return n.test(xn(t))}function cn(t){return F(t)&&Gt(t.length)&&!!b[Q(t)]}function un(t){if(!R(t))return In(t);var n=Ht(t),i=[];for(var c in t)c=="constructor"&&(n||!j.call(t,c))||i.push(c);return i}function Bt(t,n,i,c,p){t!==n&&sn(n,function(h,y){if(p||(p=new P),R(h))fn(t,n,y,i,Bt,c,p);else{var d=c?c(st(t,y),h,y+"",t,n,p):void 0;d===void 0&&(d=h),ot(t,y,d)}},Kt)}function fn(t,n,i,c,p,h,y){var d=st(t,i),m=st(n,i),O=y.get(m);if(O){ot(t,i,O);return}var I=h?h(d,m,i+"",t,n,y):void 0,H=I===void 0;if(H){var dt=ct(m),pt=!dt&&qt(m),Yt=!dt&&!pt&&Jt(m);I=m,dt||pt||Yt?ct(d)?I=d:En(d)?I=yn(d):pt?(H=!1,I=gn(m,!0)):Yt?(H=!1,I=bn(m,!0)):I=[]:Rn(m)||lt(m)?(I=d,lt(d)?I=Mn(d):(!R(d)||ft(d))&&(I=wn(m))):H=!1}H&&(y.set(m,I),p(I,m,c,h,y),y.delete(m)),ot(t,i,I)}function dn(t,n){return jn(Cn(t,n,Wt),t+"")}var pn=X?function(t,n){return X(t,"toString",{configurable:!0,enumerable:!1,value:Nn(n),writable:!0})}:Wt;function gn(t,n){if(n)return t.slice();var i=t.length,c=Pt?Pt(i):new t.constructor(i);return t.copy(c),c}function hn(t){var n=new t.constructor(t.byteLength);return new Mt(n).set(new Mt(t)),n}function bn(t,n){var i=n?hn(t.buffer):t.buffer;return new t.constructor(i,t.byteOffset,t.length)}function yn(t,n){var i=-1,c=t.length;for(n||(n=Array(c));++i<c;)n[i]=t[i];return n}function mn(t,n,i,c){var p=!i;i||(i={});for(var h=-1,y=n.length;++h<y;){var d=n[h],m=c?c(i[d],t[d],d,i,t):void 0;m===void 0&&(m=t[d]),p?it(i,d,m):an(i,d,m)}return i}function vn(t){return dn(function(n,i){var c=-1,p=i.length,h=p>1?i[p-1]:void 0,y=p>2?i[2]:void 0;for(h=t.length>3&&typeof h=="function"?(p--,h):void 0,y&&kn(i[0],i[1],y)&&(h=p<3?void 0:h,p=1),n=Object(n);++c<p;){var d=i[c];d&&t(n,d,c,h)}return n})}function _n(t){return function(n,i,c){for(var p=-1,h=Object(n),y=c(n),d=y.length;d--;){var m=y[t?d:++p];if(i(h[m],m,h)===!1)break}return n}}function V(t,n){var i=t.__data__;return An(n)?i[typeof n=="string"?"string":"hash"]:i.map}function at(t,n){var i=Or(t,n);return ln(i)?i:void 0}function Tn(t){var n=j.call(t,x),i=t[x];try{t[x]=void 0;var c=!0}catch{}var p=Et.call(t);return c&&(n?t[x]=i:delete t[x]),p}function wn(t){return typeof t.constructor=="function"&&!Ht(t)?zr(Nt(t)):{}}function Ft(t,n){var i=typeof t;return n=n??u,!!n&&(i=="number"||i!="symbol"&&wr.test(t))&&t>-1&&t%1==0&&t<n}function kn(t,n,i){if(!R(i))return!1;var c=typeof n;return(c=="number"?ut(i)&&Ft(n,i.length):c=="string"&&n in i)?tt(i[n],t):!1}function An(t){var n=typeof t;return n=="string"||n=="number"||n=="symbol"||n=="boolean"?t!=="__proto__":t===null}function Sn(t){return!!xt&&xt in t}function Ht(t){var n=t&&t.constructor,i=typeof n=="function"&&n.prototype||K;return t===i}function In(t){var n=[];if(t!=null)for(var i in Object(t))n.push(i);return n}function On(t){return Et.call(t)}function Cn(t,n,i){return n=Lt(n===void 0?t.length-1:n,0),function(){for(var c=arguments,p=-1,h=Lt(c.length-n,0),y=Array(h);++p<h;)y[p]=c[n+p];p=-1;for(var d=Array(n+1);++p<n;)d[p]=c[p];return d[n]=i(y),Ar(t,this,d)}}function st(t,n){if(!(n==="constructor"&&typeof t[n]=="function")&&n!="__proto__")return t[n]}var jn=$n(pn);function $n(t){var n=0,i=0;return function(){var c=Nr(),p=l-(c-i);if(i=c,p>0){if(++n>=s)return arguments[0]}else n=0;return t.apply(void 0,arguments)}}function xn(t){if(t!=null){try{return W.call(t)}catch{}try{return t+""}catch{}}return""}function tt(t,n){return t===n||t!==t&&n!==n}var lt=Dt(function(){return arguments}())?Dt:function(t){return F(t)&&j.call(t,"callee")&&!Rr.call(t,"callee")},ct=Array.isArray;function ut(t){return t!=null&&Gt(t.length)&&!ft(t)}function En(t){return F(t)&&ut(t)}var qt=Pr||zn;function ft(t){if(!R(t))return!1;var n=Q(t);return n==S||n==k||n==v||n==nr}function Gt(t){return typeof t=="number"&&t>-1&&t%1==0&&t<=u}function R(t){var n=typeof t;return t!=null&&(n=="object"||n=="function")}function F(t){return t!=null&&typeof t=="object"}function Rn(t){if(!F(t)||Q(t)!=St)return!1;var n=Nt(t);if(n===null)return!0;var i=j.call(n,"constructor")&&n.constructor;return typeof i=="function"&&i instanceof i&&W.call(i)==xr}var Jt=$t?Ir($t):cn;function Mn(t){return mn(t,Kt(t))}function Kt(t){return ut(t)?on(t,!0):un(t)}var Pn=vn(function(t,n,i,c){Bt(t,n,i,c)});function Nn(t){return function(){return t}}function Wt(t){return t}function zn(){return!1}o.exports=Pn}(G,G.exports);var qe=G.exports;const Ge=He(qe);function Je(o){let e;function r(a,s){var l,u,f,g,v,_,w;if((s==null?void 0:s.type)==="AwaitExpression"&&((u=(l=s==null?void 0:s.argument)==null?void 0:l.callee)==null?void 0:u.name)==="useStoryblok"){const T=(f=s==null?void 0:s.argument)==null?void 0:f.arguments;if(((g=T[1])==null?void 0:g.type)==="ObjectExpression"){const S=kt((v=T[1])==null?void 0:v.properties);e={...e,apiOptions:S}}if(((_=T[2])==null?void 0:_.type)==="ObjectExpression"){const S=kt((w=T[2])==null?void 0:w.properties);e={...e,bridgeOptions:S}}}}return Ge({},o,r),e}function kt(o){return o.reduce((e,{key:r,value:a})=>{const{type:s}=a;return e[r.name]=s==="Literal"?a.value:s==="ArrayExpression"?a.elements.map(l=>l.value):a.value,e},{})}let z=[];function Ke(o,e){const r="virtual:storyblok-bridge",a="\0"+r;if(!o||e!=="server")return{name:"vite-plugin-storyblok-bridge",resolveId(f){if(f===r)return a},load(f){if(f===a)return"export const bridgeOptions = null"}};let s=[],l=null,u=null;return{name:"vite-plugin-storyblok-bridge",async resolveId(f){if(f===r)return a},async transform(f,g){var S;if(g.includes("node_modules")&&!g.includes("/pages/")||!f.includes("useStoryblok")||!((S=this.getModuleInfo(g).meta)!=null&&S.astro))return;const[,..._]=g.split("src/pages/"),w=_.join("/").replace(".astro",""),T=Je(this.parse(f));z.length&&(s=z.filter(k=>k.url!==w)),s.push({url:w,options:T}),l&&(u&&clearTimeout(u),u=setTimeout(()=>{We(z,s)||(z.length!==0&&(l.restart(),console.info("Updating bridge options...")),z=[...s])},1e3))},async load(f){if(f===a)return`export const bridgeOptions = ${JSON.stringify(Fe(s))}`},configureServer(f){l=f}}}function We(o=[],e=[]){return e.every(({url:r,options:a})=>{const s=o.find(l=>(l==null?void 0:l.url)===r);return s&&JSON.stringify(a)===JSON.stringify(s.options)})}let At;async function Ye(o){const{action:e,story:r}=o||{};if(e==="input"&&r){const a=async()=>{const l=await Ze(r),u=document.body;if(l.outerHTML===u.outerHTML)return;const f=document.querySelector('[data-blok-focused="true"]');Xe(u,l,f)};clearTimeout(At),At=setTimeout(a,500)}["published","change"].includes(o==null?void 0:o.action)&&location.reload()}function Xe(o,e,r){if(r){const a=r.getAttribute("data-blok-uid"),s=e.querySelector(`[data-blok-uid="${a}"]`);s&&(s.setAttribute("data-blok-focused","true"),r.replaceWith(s))}else o.replaceWith(e)}async function Ze(o){const r=await(await fetch(location.href,{method:"POST",body:JSON.stringify({...o,is_storyblok_preview:!0}),headers:{"Content-Type":"application/json"}})).text();return new DOMParser().parseFromString(r,"text/html").body}function Qe(){return globalThis.storyblokApiInstance||console.error("storyblokApiInstance has not been initialized correctly"),globalThis.storyblokApiInstance}async function Ve(o,e={},r={},a){globalThis.storyblokApiInstance||console.error("storyblokApiInstance has not been initialized correctly");let s=null;if(a&&a.locals._storyblok_preview_data)s=a.locals._storyblok_preview_data;else{const{data:l}=await globalThis.storyblokApiInstance.get(o,e,r);s=l.story}return s}function tr(o,e){const r=globalThis.storyblokApiInstance.richTextResolver;if(!r){console.error("Please initialize the Storyblok SDK before calling the renderRichText function");return}return De(o,e,r)}function er(o){const e={useCustomApi:!1,bridge:!0,componentsDir:"src",enableFallbackComponent:!1,livePreview:!1,...o};return{name:"@storyblok/astro",hooks:{"astro:config:setup":({injectScript:r,updateConfig:a,addDevToolbarApp:s,addMiddleware:l,config:u})=>{if(a({vite:{plugins:[N(e.accessToken,e.useCustomApi,e.apiOptions),re(e.componentsDir,e.components,e.enableFallbackComponent,e.customFallbackComponent),ne(e),Ke(e.livePreview,u.output)]}}),e.livePreview&&(u==null?void 0:u.output)!=="server")throw new Error("To utilize the Astro Storyblok Live feature, Astro must be configured in SSR mode. Please disable this feature or switch Astro to SSR mode.");if(r("page-ssr",`
35
35
  import { storyblokApiInstance } from "virtual:storyblok-init";
36
36
  globalThis.storyblokApiInstance = storyblokApiInstance;
37
- `),t.bridge&&!t.experimentalLivePreview){let f="";if(typeof t.bridge=="object"){const g={...t.bridge};f=`const storyblokInstance = new StoryblokBridge(${JSON.stringify(g)});`}else f="const storyblokInstance = new StoryblokBridge()";r("page",`
37
+ `),e.bridge&&!e.livePreview){let f="";if(typeof e.bridge=="object"){const g={...e.bridge};f=`const storyblokInstance = new StoryblokBridge(${JSON.stringify(g)});`}else f="const storyblokInstance = new StoryblokBridge()";r("page",`
38
38
  import { loadStoryblokBridge } from "@storyblok/astro";
39
39
  loadStoryblokBridge().then(() => {
40
40
  const { StoryblokBridge, location } = window;
@@ -46,15 +46,15 @@ Detailed information can be found here: https://github.com/storyblok/storyblok-a
46
46
  }
47
47
  });
48
48
  });
49
- `)}t.experimentalLivePreview&&(r("page",`
50
- import { loadStoryblokBridge, handleStoryblokMessage } from "@storyblok/astro";
51
- import { bridgeOptions } from "virtual:storyblok-bridge";
52
-
53
- loadStoryblokBridge().then(() => {
54
- const { StoryblokBridge, location } = window;
55
- if(bridgeOptions){
56
- const storyblokInstance = new StoryblokBridge(bridgeOptions);
57
- storyblokInstance.on(["published", "change","input"], handleStoryblokMessage);
58
- };
59
- });
60
- `),l({entrypoint:"@storyblok/astro/middleware.ts",order:"pre"})),s("@storyblok/astro/toolbarApp.ts")}}}}k.RichTextResolver=we,k.RichTextSchema=Te,k.default=tr,k.handleStoryblokMessage=Yt,k.loadStoryblokBridge=Dt,k.renderRichText=er,k.storyblokEditable=Mt,k.useStoryblok=Vt,k.useStoryblokApi=Qt,Object.defineProperties(k,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
49
+ `)}e.livePreview&&(r("page",`
50
+ import { loadStoryblokBridge, handleStoryblokMessage } from "@storyblok/astro";
51
+ import { bridgeOptions } from "virtual:storyblok-bridge";
52
+ console.info("The Storyblok Astro live preview feature is currently in an experimental phase, and its API is subject to change in the future.")
53
+ loadStoryblokBridge().then(() => {
54
+ const { StoryblokBridge, location } = window;
55
+ if(bridgeOptions){
56
+ const storyblokInstance = new StoryblokBridge(bridgeOptions);
57
+ storyblokInstance.on(["published", "change", "input"], handleStoryblokMessage);
58
+ };
59
+ });
60
+ `),l({entrypoint:"@storyblok/astro/middleware.ts",order:"pre"})),s("@storyblok/astro/toolbarApp.ts")}}}}A.RichTextResolver=wt,A.RichTextSchema=Tt,A.default=er,A.handleStoryblokMessage=Ye,A.loadStoryblokBridge=Be,A.renderRichText=tr,A.storyblokEditable=Pe,A.useStoryblok=Ve,A.useStoryblokApi=Qe,Object.defineProperties(A,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});