@storyblok/astro 4.0.4-next.2 → 4.0.4-next.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/storyblok-astro.js +14 -15
- package/dist/storyblok-astro.mjs +818 -359
- package/package.json +1 -1
package/dist/storyblok-astro.js
CHANGED
|
@@ -1,14 +1,4 @@
|
|
|
1
|
-
(function(
|
|
2
|
-
import { storyblokInit, apiPlugin } from "@storyblok/js";
|
|
3
|
-
const { storyblokApi } = storyblokInit({
|
|
4
|
-
accessToken: "${r}",
|
|
5
|
-
use: ${t?"[]":"[apiPlugin]"},
|
|
6
|
-
apiOptions: ${JSON.stringify(e)},
|
|
7
|
-
});
|
|
8
|
-
export const storyblokApiInstance = storyblokApi;
|
|
9
|
-
`}}}const R=/[\p{Lu}]/u,x=/[\p{Ll}]/u,$=/^[\p{Lu}](?![\p{Lu}])/gu,v=/([\p{Alpha}\p{N}_]|$)/u,y=/[_.\- ]+/,O=new RegExp("^"+y.source),I=new RegExp(y.source+v.source,"gu"),w=new RegExp("\\d+"+v.source,"gu"),M=(r,t,e,o)=>{let s=!1,n=!1,a=!1,c=!1;for(let i=0;i<r.length;i++){const l=r[i];c=i>2?r[i-3]==="-":!0,s&&R.test(l)?(r=r.slice(0,i)+"-"+r.slice(i),s=!1,a=n,n=!0,i++):n&&a&&x.test(l)&&(!c||o)?(r=r.slice(0,i-1)+"-"+r.slice(i-1),a=n,n=!1,s=!0):(s=t(l)===l&&e(l)!==l,a=n,n=e(l)===l&&t(l)!==l)}return r},N=(r,t)=>($.lastIndex=0,r.replaceAll($,e=>t(e))),P=(r,t)=>(I.lastIndex=0,w.lastIndex=0,r.replaceAll(w,(e,o,s)=>["_","-"].includes(r.charAt(s+e.length))?e:t(e)).replaceAll(I,(e,o)=>t(o)));function A(r,t){if(!(typeof r=="string"||Array.isArray(r)))throw new TypeError("Expected the input to be `string | string[]`");if(t={pascalCase:!1,preserveConsecutiveUppercase:!1,...t},Array.isArray(r)?r=r.map(n=>n.trim()).filter(n=>n.length).join("-"):r=r.trim(),r.length===0)return"";const e=t.locale===!1?n=>n.toLowerCase():n=>n.toLocaleLowerCase(t.locale),o=t.locale===!1?n=>n.toUpperCase():n=>n.toLocaleUpperCase(t.locale);return r.length===1?y.test(r)?"":t.pascalCase?o(r):e(r):(r!==e(r)&&(r=M(r,e,o,t.preserveConsecutiveUppercase)),r=r.replace(O,""),r=t.preserveConsecutiveUppercase?N(r,e):e(r),t.pascalCase&&(r=o(r.charAt(0))+r.slice(1)),P(r,o))}function L(r,t,e,o){const s="virtual:storyblok-components",n="\0"+s;return{name:"vite-plugin-storyblok-components",async resolveId(a){if(a===s)return n},async load(a){if(a===n){const c=[],i=[];for await(const[u,d]of Object.entries(t)){const h=await this.resolve("/"+r+"/"+d+".astro");if(h)c.push(`import ${A(u)} from "${h.id}"`);else if(e)i.push(u);else throw new Error(`Component could not be found for blok "${u}"! Does "${"/"+r+"/"+d}.astro" exist?`)}let l="";if(e)if(l=",FallbackComponent",o){const u=await this.resolve("/"+r+"/"+o+".astro");if(!u)throw new Error(`Custom fallback component could not be found. Does "${"/"+r+"/"+o}.astro" exist?`);c.push(`import FallbackComponent from "${u.id}"`)}else c.push("import FallbackComponent from '@storyblok/astro/FallbackComponent.astro'");if(Object.values(t).length)return`${c.join(";")};export default {${Object.keys(t).filter(u=>!i.includes(u)).map(u=>A(u)).join(",")}${l}}`;if(e)return`${c[0]}; export default {${l.replace(",","")}}`;throw new Error(`Currently, no Storyblok components are registered in astro.config.mjs.
|
|
10
|
-
Please register your components or enable the fallback component.
|
|
11
|
-
Detailed information can be found here: https://github.com/storyblok/storyblok-astro`)}}}}function _(r){const t="virtual:storyblok-options",e="\0"+t;return{name:"vite-plugin-storyblok-options",async resolveId(o){if(o===t)return e},async load(o){if(o===e)return`export default ${JSON.stringify(r)}`}}}let T=!1;const C=[],z=r=>new Promise((t,e)=>{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}T?s():C.push(s)},document.getElementById("storyblok-javascript-bridge")))return;const o=document.createElement("script");o.async=!0,o.src=r,o.id="storyblok-javascript-bridge",o.onerror=s=>e(s),o.onload=s=>{C.forEach(n=>n()),T=!0,t(s)},document.getElementsByTagName("head")[0].appendChild(o)});var U=Object.defineProperty,D=(r,t,e)=>t in r?U(r,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):r[t]=e,p=(r,t,e)=>(D(r,typeof t!="symbol"?t+"":t,e),e);class B{constructor(){p(this,"isCDNUrl",(t="")=>t.indexOf("/cdn/")>-1),p(this,"getOptionsPage",(t,e=25,o=1)=>({...t,per_page:e,page:o})),p(this,"delay",t=>new Promise(e=>setTimeout(e,t))),p(this,"arrayFrom",(t=0,e)=>[...Array(t)].map(e)),p(this,"range",(t=0,e=t)=>{const o=Math.abs(e-t)||0,s=t<e?1:-1;return this.arrayFrom(o,(n,a)=>a*s+t)}),p(this,"asyncMap",async(t,e)=>Promise.all(t.map(e))),p(this,"flatMap",(t=[],e)=>t.map(e).reduce((o,s)=>[...o,...s],[])),p(this,"escapeHTML",function(t){const e={"&":"&","<":"<",">":">",'"':""","'":"'"},o=/[&<>"']/g,s=RegExp(o.source);return t&&s.test(t)?t.replace(o,n=>e[n]):t})}stringify(t,e,o){const s=[];for(const n in t){if(!Object.prototype.hasOwnProperty.call(t,n))continue;const a=t[n],c=o?"":encodeURIComponent(n);let i;typeof a=="object"?i=this.stringify(a,e?e+encodeURIComponent("["+c+"]"):c,Array.isArray(a)):i=(e?e+encodeURIComponent("["+c+"]"):c)+"="+encodeURIComponent(a),s.push(i)}return s.join("&")}getRegionURL(t){const e="api.storyblok.com",o="api-us.storyblok.com",s="app.storyblokchina.cn",n="api-ap.storyblok.com",a="api-ca.storyblok.com";switch(t){case"us":return o;case"cn":return s;case"ap":return n;case"ca":return a;default:return e}}}const q=function(r,t){const e={};for(const o in r){const s=r[o];t.indexOf(o)>-1&&s!==null&&(e[o]=s)}return e},F=r=>r==="email",J=()=>({singleTag:"hr"}),K=()=>({tag:"blockquote"}),V=()=>({tag:"ul"}),H=r=>({tag:["pre",{tag:"code",attrs:r.attrs}]}),G=()=>({singleTag:"br"}),W=r=>({tag:`h${r.attrs.level}`}),Y=r=>({singleTag:[{tag:"img",attrs:q(r.attrs,["src","alt","title"])}]}),Q=()=>({tag:"li"}),X=()=>({tag:"ol"}),Z=()=>({tag:"p"}),ee=r=>({tag:[{tag:"span",attrs:{"data-type":"emoji","data-name":r.attrs.name,emoji:r.attrs.emoji}}]}),te=()=>({tag:"b"}),re=()=>({tag:"s"}),oe=()=>({tag:"u"}),se=()=>({tag:"strong"}),ne=()=>({tag:"code"}),ae=()=>({tag:"i"}),ie=r=>{if(!r.attrs)return{tag:""};const t=new B().escapeHTML,e={...r.attrs},{linktype:o="url"}=r.attrs;if(delete e.linktype,e.href&&(e.href=t(r.attrs.href||"")),F(o)&&(e.href=`mailto:${e.href}`),e.anchor&&(e.href=`${e.href}#${e.anchor}`,delete e.anchor),e.custom){for(const s in e.custom)e[s]=e.custom[s];delete e.custom}return{tag:[{tag:"a",attrs:e}]}},le=r=>({tag:[{tag:"span",attrs:r.attrs}]}),ce=()=>({tag:"sub"}),ue=()=>({tag:"sup"}),ge=r=>({tag:[{tag:"span",attrs:r.attrs}]}),fe=r=>{var t;return(t=r.attrs)!=null&&t.color?{tag:[{tag:"span",attrs:{style:`background-color:${r.attrs.color};`}}]}:{tag:""}},pe=r=>{var t;return(t=r.attrs)!=null&&t.color?{tag:[{tag:"span",attrs:{style:`color:${r.attrs.color}`}}]}:{tag:""}},E={nodes:{horizontal_rule:J,blockquote:K,bullet_list:V,code_block:H,hard_break:G,heading:W,image:Y,list_item:Q,ordered_list:X,paragraph:Z,emoji:ee},marks:{bold:te,strike:re,underline:oe,strong:se,code:ne,italic:ae,link:ie,styled:le,subscript:ce,superscript:ue,anchor:ge,highlight:fe,textStyle:pe}},de=function(r){const t={"&":"&","<":"<",">":">",'"':""","'":"'"},e=/[&<>"']/g,o=RegExp(e.source);return r&&o.test(r)?r.replace(e,s=>t[s]):r};class S{constructor(t){p(this,"marks"),p(this,"nodes"),t||(t=E),this.marks=t.marks||[],this.nodes=t.nodes||[]}addNode(t,e){this.nodes[t]=e}addMark(t,e){this.marks[t]=e}render(t,e={optimizeImages:!1}){if(t&&t.content&&Array.isArray(t.content)){let o="";return t.content.forEach(s=>{o+=this.renderNode(s)}),e.optimizeImages?this.optimizeImages(o,e.optimizeImages):o}return console.warn(`The render method must receive an Object with a "content" field.
|
|
1
|
+
(function(d,y){typeof exports=="object"&&typeof module<"u"?y(exports):typeof define=="function"&&define.amd?define(["exports"],y):(d=typeof globalThis<"u"?globalThis:d||self,y(d.storyblokAstro={}))})(this,function(d){"use strict";let y=!1;const S=[],A=o=>new Promise((e,t)=>{if(typeof window>"u"||(window.storyblokRegisterEvent=r=>{if(window.location===window.parent.location){console.warn("You are not in Draft Mode or in the Visual Editor.");return}y?r():S.push(r)},document.getElementById("storyblok-javascript-bridge")))return;const s=document.createElement("script");s.async=!0,s.src=o,s.id="storyblok-javascript-bridge",s.onerror=r=>t(r),s.onload=r=>{S.forEach(i=>i()),y=!0,e(r)},document.getElementsByTagName("head")[0].appendChild(s)});var z=Object.defineProperty,F=(o,e,t)=>e in o?z(o,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):o[e]=t,u=(o,e,t)=>(F(o,typeof e!="symbol"?e+"":e,t),t);function C(o){return!(o!==o||o===1/0||o===-1/0)}function H(o,e,t){if(!C(e))throw new TypeError("Expected `limit` to be a finite number");if(!C(t))throw new TypeError("Expected `interval` to be a finite number");const s=[];let r=[],i=0;const n=function(){i++;const a=setTimeout(function(){i--,s.length>0&&n(),r=r.filter(function(h){return h!==a})},t);r.indexOf(a)<0&&r.push(a);const l=s.shift();l.resolve(o.apply(l.self,l.args))},c=function(...a){const l=this;return new Promise(function(h,p){s.push({resolve:h,reject:p,args:a,self:l}),i<e&&n()})};return c.abort=function(){r.forEach(clearTimeout),r=[],s.forEach(function(a){a.reject(function(){Error.call(this,"Throttled function aborted"),this.name="AbortError"})}),s.length=0},c}class v{constructor(){u(this,"isCDNUrl",(e="")=>e.indexOf("/cdn/")>-1),u(this,"getOptionsPage",(e,t=25,s=1)=>({...e,per_page:t,page:s})),u(this,"delay",e=>new Promise(t=>setTimeout(t,e))),u(this,"arrayFrom",(e=0,t)=>[...Array(e)].map(t)),u(this,"range",(e=0,t=e)=>{const s=Math.abs(t-e)||0,r=e<t?1:-1;return this.arrayFrom(s,(i,n)=>n*r+e)}),u(this,"asyncMap",async(e,t)=>Promise.all(e.map(t))),u(this,"flatMap",(e=[],t)=>e.map(t).reduce((s,r)=>[...s,...r],[])),u(this,"escapeHTML",function(e){const t={"&":"&","<":"<",">":">",'"':""","'":"'"},s=/[&<>"']/g,r=RegExp(s.source);return e&&r.test(e)?e.replace(s,i=>t[i]):e})}stringify(e,t,s){const r=[];for(const i in e){if(!Object.prototype.hasOwnProperty.call(e,i))continue;const n=e[i],c=s?"":encodeURIComponent(i);let a;typeof n=="object"?a=this.stringify(n,t?t+encodeURIComponent("["+c+"]"):c,Array.isArray(n)):a=(t?t+encodeURIComponent("["+c+"]"):c)+"="+encodeURIComponent(n),r.push(a)}return r.join("&")}getRegionURL(e){const t="api.storyblok.com",s="api-us.storyblok.com",r="app.storyblokchina.cn",i="api-ap.storyblok.com",n="api-ca.storyblok.com";switch(e){case"us":return s;case"cn":return r;case"ap":return i;case"ca":return n;default:return t}}}const q=function(o,e){const t={};for(const s in o){const r=o[s];e.indexOf(s)>-1&&r!==null&&(t[s]=r)}return t},B=o=>o==="email",D=()=>({singleTag:"hr"}),V=()=>({tag:"blockquote"}),J=()=>({tag:"ul"}),K=o=>({tag:["pre",{tag:"code",attrs:o.attrs}]}),G=()=>({singleTag:"br"}),W=o=>({tag:`h${o.attrs.level}`}),Y=o=>({singleTag:[{tag:"img",attrs:q(o.attrs,["src","alt","title"])}]}),Q=()=>({tag:"li"}),X=()=>({tag:"ol"}),Z=()=>({tag:"p"}),ee=o=>({tag:[{tag:"span",attrs:{"data-type":"emoji","data-name":o.attrs.name,emoji:o.attrs.emoji}}]}),te=()=>({tag:"b"}),se=()=>({tag:"s"}),re=()=>({tag:"u"}),oe=()=>({tag:"strong"}),ie=()=>({tag:"code"}),ne=()=>({tag:"i"}),ae=o=>{if(!o.attrs)return{tag:""};const e=new v().escapeHTML,t={...o.attrs},{linktype:s="url"}=o.attrs;if(delete t.linktype,t.href&&(t.href=e(o.attrs.href||"")),B(s)&&(t.href=`mailto:${t.href}`),t.anchor&&(t.href=`${t.href}#${t.anchor}`,delete t.anchor),t.custom){for(const r in t.custom)t[r]=t.custom[r];delete t.custom}return{tag:[{tag:"a",attrs:t}]}},le=o=>({tag:[{tag:"span",attrs:o.attrs}]}),ce=()=>({tag:"sub"}),he=()=>({tag:"sup"}),ue=o=>({tag:[{tag:"span",attrs:o.attrs}]}),pe=o=>{var e;return(e=o.attrs)!=null&&e.color?{tag:[{tag:"span",attrs:{style:`background-color:${o.attrs.color};`}}]}:{tag:""}},de=o=>{var e;return(e=o.attrs)!=null&&e.color?{tag:[{tag:"span",attrs:{style:`color:${o.attrs.color}`}}]}:{tag:""}},O={nodes:{horizontal_rule:D,blockquote:V,bullet_list:J,code_block:K,hard_break:G,heading:W,image:Y,list_item:Q,ordered_list:X,paragraph:Z,emoji:ee},marks:{bold:te,strike:se,underline:re,strong:oe,code:ie,italic:ne,link:ae,styled:le,subscript:ce,superscript:he,anchor:ue,highlight:pe,textStyle:de}},ge=function(o){const e={"&":"&","<":"<",">":">",'"':""","'":"'"},t=/[&<>"']/g,s=RegExp(t.source);return o&&s.test(o)?o.replace(t,r=>e[r]):o};class k{constructor(e){u(this,"marks"),u(this,"nodes"),e||(e=O),this.marks=e.marks||[],this.nodes=e.nodes||[]}addNode(e,t){this.nodes[e]=t}addMark(e,t){this.marks[e]=t}render(e,t={optimizeImages:!1}){if(e&&e.content&&Array.isArray(e.content)){let s="";return e.content.forEach(r=>{s+=this.renderNode(r)}),t.optimizeImages?this.optimizeImages(s,t.optimizeImages):s}return console.warn(`The render method must receive an Object with a "content" field.
|
|
12
2
|
The "content" field must be an array of nodes as the type ISbRichtext.
|
|
13
3
|
ISbRichtext:
|
|
14
4
|
content?: ISbRichtext[]
|
|
@@ -31,14 +21,23 @@ Detailed information can be found here: https://github.com/storyblok/storyblok-a
|
|
|
31
21
|
}
|
|
32
22
|
],
|
|
33
23
|
type: 'doc'
|
|
34
|
-
}`),""}optimizeImages(t,e){let o=0,s=0,n="",a="";typeof e!="boolean"&&(typeof e.width=="number"&&e.width>0&&(n+=`width="${e.width}" `,o=e.width),typeof e.height=="number"&&e.height>0&&(n+=`height="${e.height}" `,s=e.height),(e.loading==="lazy"||e.loading==="eager")&&(n+=`loading="${e.loading}" `),typeof e.class=="string"&&e.class.length>0&&(n+=`class="${e.class}" `),e.filters&&(typeof e.filters.blur=="number"&&e.filters.blur>=0&&e.filters.blur<=100&&(a+=`:blur(${e.filters.blur})`),typeof e.filters.brightness=="number"&&e.filters.brightness>=-100&&e.filters.brightness<=100&&(a+=`:brightness(${e.filters.brightness})`),e.filters.fill&&(e.filters.fill.match(/[0-9A-Fa-f]{6}/g)||e.filters.fill==="transparent")&&(a+=`:fill(${e.filters.fill})`),e.filters.format&&["webp","png","jpeg"].includes(e.filters.format)&&(a+=`:format(${e.filters.format})`),typeof e.filters.grayscale=="boolean"&&e.filters.grayscale&&(a+=":grayscale()"),typeof e.filters.quality=="number"&&e.filters.quality>=0&&e.filters.quality<=100&&(a+=`:quality(${e.filters.quality})`),e.filters.rotate&&[90,180,270].includes(e.filters.rotate)&&(a+=`:rotate(${e.filters.rotate})`),a.length>0&&(a="/filters"+a))),n.length>0&&(t=t.replace(/<img/g,`<img ${n.trim()}`));const c=o>0||s>0||a.length>0?`${o}x${s}${a}`:"";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/${c}`),typeof e!="boolean"&&(e.sizes||e.srcset)&&(t=t.replace(/<img.*?src=["|'](.*?)["|']/g,i=>{var l,u;const d=i.match(/a.storyblok.com\/f\/(\d+)\/([^.]+)\.(gif|jpg|jpeg|png|tif|tiff|bmp)/g);if(d&&d.length>0){const h={srcset:(l=e.srcset)==null?void 0:l.map(f=>{if(typeof f=="number")return`//${d}/m/${f}x0${a} ${f}w`;if(typeof f=="object"&&f.length===2){let k=0,j=0;return typeof f[0]=="number"&&(k=f[0]),typeof f[1]=="number"&&(j=f[1]),`//${d}/m/${k}x${j}${a} ${k}w`}}).join(", "),sizes:(u=e.sizes)==null?void 0:u.map(f=>f).join(", ")};let m="";return h.srcset&&(m+=`srcset="${h.srcset}" `),h.sizes&&(m+=`sizes="${h.sizes}" `),i.replace(/<img/g,`<img ${m.trim()}`)}return i})),t}renderNode(t){const e=[];t.marks&&t.marks.forEach(s=>{const n=this.getMatchingMark(s);n&&n.tag!==""&&e.push(this.renderOpeningTag(n.tag))});const o=this.getMatchingNode(t);return o&&o.tag&&e.push(this.renderOpeningTag(o.tag)),t.content?t.content.forEach(s=>{e.push(this.renderNode(s))}):t.text?e.push(de(t.text)):o&&o.singleTag?e.push(this.renderTag(o.singleTag," /")):o&&o.html?e.push(o.html):t.type==="emoji"&&e.push(this.renderEmoji(t)),o&&o.tag&&e.push(this.renderClosingTag(o.tag)),t.marks&&t.marks.slice(0).reverse().forEach(s=>{const n=this.getMatchingMark(s);n&&n.tag!==""&&e.push(this.renderClosingTag(n.tag))}),e.join("")}renderTag(t,e){return t.constructor===String?`<${t}${e}>`:t.map(o=>{if(o.constructor===String)return`<${o}${e}>`;{let s=`<${o.tag}`;if(o.attrs)for(const n in o.attrs){const a=o.attrs[n];a!==null&&(s+=` ${n}="${a}"`)}return`${s}${e}>`}}).join("")}renderOpeningTag(t){return this.renderTag(t,"")}renderClosingTag(t){return t.constructor===String?`</${t}>`:t.slice(0).reverse().map(e=>e.constructor===String?`</${e}>`:`</${e.tag}>`).join("")}getMatchingNode(t){const e=this.nodes[t.type];if(typeof e=="function")return e(t)}getMatchingMark(t){const e=this.marks[t.type];if(typeof e=="function")return e(t)}renderEmoji(t){if(t.attrs.emoji)return t.attrs.emoji;const e=[{tag:"img",attrs:{src:t.attrs.fallbackImage,draggable:"false",loading:"lazy",align:"absmiddle"}}];return this.renderTag(e," /")}}const he=r=>{if(typeof r!="object"||typeof r._editable>"u")return{};try{const t=JSON.parse(r._editable.replace(/^<!--#storyblok#/,"").replace(/-->$/,""));return t?{"data-blok-c":JSON.stringify(t),"data-blok-uid":t.id+"-"+t.uid}:{}}catch{return{}}};let be,ye="https://app.storyblok.com/f/storyblok-v2-latest.js";const me=(r,t)=>{r.addNode("blok",e=>{let o="";return e.attrs.body.forEach(s=>{o+=t(s.component,s)}),{html:o}})},ke=r=>!r||!(r!=null&&r.content.some(t=>t.content||t.type==="blok"||t.type==="horizontal_rule")),$e=(r,t,e)=>{let o=e||be;if(!o){console.error("Please initialize the Storyblok SDK before calling the renderRichText function");return}return ke(r)?"":(t&&(o=new S(t.schema),t.resolver&&me(o,t.resolver)),o.render(r))},ve=()=>z(ye);function Ie(){return globalThis.storyblokApiInstance||console.error("storyblokApiInstance has not been initialized correctly"),globalThis.storyblokApiInstance}function we(r,t){const e=globalThis.storyblokApiInstance.richTextResolver;if(!e){console.error("Please initialize the Storyblok SDK before calling the renderRichText function");return}return $e(r,t,e)}function Ae(r){const t={useCustomApi:!1,bridge:!0,componentsDir:"src",enableFallbackComponent:!1,...r};return{name:"@storyblok/astro",hooks:{"astro:config:setup":({injectScript:e,updateConfig:o,addDevToolbarApp:s})=>{if(o({vite:{plugins:[b(t.accessToken,t.useCustomApi,t.apiOptions),L(t.componentsDir,t.components,t.enableFallbackComponent,t.customFallbackComponent),_(t)]}}),e("page-ssr",`
|
|
24
|
+
}`),""}optimizeImages(e,t){let s=0,r=0,i="",n="";typeof t!="boolean"&&(typeof t.width=="number"&&t.width>0&&(i+=`width="${t.width}" `,s=t.width),typeof t.height=="number"&&t.height>0&&(i+=`height="${t.height}" `,r=t.height),(t.loading==="lazy"||t.loading==="eager")&&(i+=`loading="${t.loading}" `),typeof t.class=="string"&&t.class.length>0&&(i+=`class="${t.class}" `),t.filters&&(typeof t.filters.blur=="number"&&t.filters.blur>=0&&t.filters.blur<=100&&(n+=`:blur(${t.filters.blur})`),typeof t.filters.brightness=="number"&&t.filters.brightness>=-100&&t.filters.brightness<=100&&(n+=`:brightness(${t.filters.brightness})`),t.filters.fill&&(t.filters.fill.match(/[0-9A-Fa-f]{6}/g)||t.filters.fill==="transparent")&&(n+=`:fill(${t.filters.fill})`),t.filters.format&&["webp","png","jpeg"].includes(t.filters.format)&&(n+=`:format(${t.filters.format})`),typeof t.filters.grayscale=="boolean"&&t.filters.grayscale&&(n+=":grayscale()"),typeof t.filters.quality=="number"&&t.filters.quality>=0&&t.filters.quality<=100&&(n+=`:quality(${t.filters.quality})`),t.filters.rotate&&[90,180,270].includes(t.filters.rotate)&&(n+=`:rotate(${t.filters.rotate})`),n.length>0&&(n="/filters"+n))),i.length>0&&(e=e.replace(/<img/g,`<img ${i.trim()}`));const c=s>0||r>0||n.length>0?`${s}x${r}${n}`:"";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/${c}`),typeof t!="boolean"&&(t.sizes||t.srcset)&&(e=e.replace(/<img.*?src=["|'](.*?)["|']/g,a=>{var l,h;const p=a.match(/a.storyblok.com\/f\/(\d+)\/([^.]+)\.(gif|jpg|jpeg|png|tif|tiff|bmp)/g);if(p&&p.length>0){const g={srcset:(l=t.srcset)==null?void 0:l.map(f=>{if(typeof f=="number")return`//${p}/m/${f}x0${n} ${f}w`;if(typeof f=="object"&&f.length===2){let _=0,U=0;return typeof f[0]=="number"&&(_=f[0]),typeof f[1]=="number"&&(U=f[1]),`//${p}/m/${_}x${U}${n} ${_}w`}}).join(", "),sizes:(h=t.sizes)==null?void 0:h.map(f=>f).join(", ")};let m="";return g.srcset&&(m+=`srcset="${g.srcset}" `),g.sizes&&(m+=`sizes="${g.sizes}" `),a.replace(/<img/g,`<img ${m.trim()}`)}return a})),e}renderNode(e){const t=[];e.marks&&e.marks.forEach(r=>{const i=this.getMatchingMark(r);i&&i.tag!==""&&t.push(this.renderOpeningTag(i.tag))});const s=this.getMatchingNode(e);return s&&s.tag&&t.push(this.renderOpeningTag(s.tag)),e.content?e.content.forEach(r=>{t.push(this.renderNode(r))}):e.text?t.push(ge(e.text)):s&&s.singleTag?t.push(this.renderTag(s.singleTag," /")):s&&s.html?t.push(s.html):e.type==="emoji"&&t.push(this.renderEmoji(e)),s&&s.tag&&t.push(this.renderClosingTag(s.tag)),e.marks&&e.marks.slice(0).reverse().forEach(r=>{const i=this.getMatchingMark(r);i&&i.tag!==""&&t.push(this.renderClosingTag(i.tag))}),t.join("")}renderTag(e,t){return e.constructor===String?`<${e}${t}>`:e.map(s=>{if(s.constructor===String)return`<${s}${t}>`;{let r=`<${s.tag}`;if(s.attrs)for(const i in s.attrs){const n=s.attrs[i];n!==null&&(r+=` ${i}="${n}"`)}return`${r}${t}>`}}).join("")}renderOpeningTag(e){return this.renderTag(e,"")}renderClosingTag(e){return e.constructor===String?`</${e}>`:e.slice(0).reverse().map(t=>t.constructor===String?`</${t}>`:`</${t.tag}>`).join("")}getMatchingNode(e){const t=this.nodes[e.type];if(typeof t=="function")return t(e)}getMatchingMark(e){const t=this.marks[e.type];if(typeof t=="function")return t(e)}renderEmoji(e){if(e.attrs.emoji)return e.attrs.emoji;const t=[{tag:"img",attrs:{src:e.attrs.fallbackImage,draggable:"false",loading:"lazy",align:"absmiddle"}}];return this.renderTag(t," /")}}class fe{constructor(e){u(this,"baseURL"),u(this,"timeout"),u(this,"headers"),u(this,"responseInterceptor"),u(this,"fetch"),u(this,"ejectInterceptor"),u(this,"url"),u(this,"parameters"),u(this,"fetchOptions"),this.baseURL=e.baseURL,this.headers=e.headers||new Headers,this.timeout=e!=null&&e.timeout?e.timeout*1e3:0,this.responseInterceptor=e.responseInterceptor,this.fetch=(...t)=>e.fetch?e.fetch(...t):fetch(...t),this.ejectInterceptor=!1,this.url="",this.parameters={},this.fetchOptions={}}get(e,t){return this.url=e,this.parameters=t,this._methodHandler("get")}post(e,t){return this.url=e,this.parameters=t,this._methodHandler("post")}put(e,t){return this.url=e,this.parameters=t,this._methodHandler("put")}delete(e,t){return this.url=e,this.parameters=t,this._methodHandler("delete")}async _responseHandler(e){const t=[],s={data:{},headers:{},status:0,statusText:""};e.status!==204&&await e.json().then(r=>{s.data=r});for(const r of e.headers.entries())t[r[0]]=r[1];return s.headers={...t},s.status=e.status,s.statusText=e.statusText,s}async _methodHandler(e){let t=`${this.baseURL}${this.url}`,s=null;if(e==="get"){const a=new v;t=`${this.baseURL}${this.url}?${a.stringify(this.parameters)}`}else s=JSON.stringify(this.parameters);const r=new URL(t),i=new AbortController,{signal:n}=i;let c;this.timeout&&(c=setTimeout(()=>i.abort(),this.timeout));try{const a=await fetch(`${r}`,{method:e,headers:this.headers,body:s,signal:n,...this.fetchOptions});this.timeout&&clearTimeout(c);const l=await this._responseHandler(a);return this.responseInterceptor&&!this.ejectInterceptor?this._statusHandler(this.responseInterceptor(l)):this._statusHandler(l)}catch(a){return{message:a}}}setFetchOptions(e={}){Object.keys(e).length>0&&"method"in e&&delete e.method,this.fetchOptions={...e}}eject(){this.ejectInterceptor=!0}_statusHandler(e){const t=/20[0-6]/g;return new Promise((s,r)=>{if(t.test(`${e.status}`))return s(e);const i={message:e.statusText,status:e.status,response:Array.isArray(e.data)?e.data[0]:e.data.error||e.data.slug};r(i)})}}var me={npm_package_version:"6.6.3"};const x="SB-Agent",T={defaultAgentName:"SB-JS-CLIENT",defaultAgentVersion:"SB-Agent-Version",packageVersion:me.npm_package_version};let w={};const b={};class ye{constructor(e,t){u(this,"client"),u(this,"maxRetries"),u(this,"throttle"),u(this,"accessToken"),u(this,"cache"),u(this,"helpers"),u(this,"resolveCounter"),u(this,"relations"),u(this,"links"),u(this,"richTextResolver"),u(this,"resolveNestedRelations"),u(this,"stringifiedStoriesCache");let s=e.endpoint||t;const r=new v().getRegionURL,i=e.https===!1?"http":"https";e.oauthToken?s=`${i}://${r(e.region)}/v1`:s=`${i}://${r(e.region)}/v2`;const n=new Headers;if(n.set("Content-Type","application/json"),n.set("Accept","application/json"),e.headers)for(const a in e.headers)n.set(a,e.headers[a]);n.has(x)||(n.set(x,T.defaultAgentName),n.set(T.defaultAgentVersion,T.packageVersion));let c=5;e.oauthToken&&(n.set("Authorization",e.oauthToken),c=3),e.rateLimit&&(c=e.rateLimit),e.richTextSchema?this.richTextResolver=new k(e.richTextSchema):this.richTextResolver=new k,e.componentResolver&&this.setComponentResolver(e.componentResolver),this.maxRetries=e.maxRetries||5,this.throttle=H(this.throttledRequest,c,1e3),this.accessToken=e.accessToken||"",this.relations={},this.links={},this.cache=e.cache||{clear:"manual"},this.helpers=new v,this.resolveCounter=0,this.resolveNestedRelations=e.resolveNestedRelations||!0,this.stringifiedStoriesCache={},this.client=new fe({baseURL:s,timeout:e.timeout||0,headers:n,responseInterceptor:e.responseInterceptor,fetch:e.fetch})}setComponentResolver(e){this.richTextResolver.addNode("blok",t=>{let s="";return t.attrs.body&&t.attrs.body.forEach(r=>{s+=e(r.component,r)}),{html:s}})}parseParams(e){return e.token||(e.token=this.getToken()),e.cv||(e.cv=b[e.token]),Array.isArray(e.resolve_relations)&&(e.resolve_relations=e.resolve_relations.join(",")),e}factoryParamOptions(e,t){return this.helpers.isCDNUrl(e)?this.parseParams(t):t}makeRequest(e,t,s,r){const i=this.factoryParamOptions(e,this.helpers.getOptionsPage(t,s,r));return this.cacheResponse(e,i)}get(e,t,s){t||(t={});const r=`/${e}`,i=this.factoryParamOptions(r,t);return this.client.setFetchOptions(s),this.cacheResponse(r,i)}async getAll(e,t,s,r){const i=(t==null?void 0:t.per_page)||25,n=`/${e}`,c=n.split("/"),a=s||c[c.length-1],l=1,h=await this.makeRequest(n,t,i,l),p=h.total?Math.ceil(h.total/i):1;this.client.setFetchOptions(r);const g=await this.helpers.asyncMap(this.helpers.range(l,p),m=>this.makeRequest(n,t,i,m+1));return this.helpers.flatMap([h,...g],m=>Object.values(m.data[a]))}post(e,t,s){const r=`/${e}`;return this.client.setFetchOptions(s),Promise.resolve(this.throttle("post",r,t))}put(e,t,s){const r=`/${e}`;return this.client.setFetchOptions(s),Promise.resolve(this.throttle("put",r,t))}delete(e,t,s){const r=`/${e}`;return this.client.setFetchOptions(s),Promise.resolve(this.throttle("delete",r,t))}getStories(e,t){return this.client.setFetchOptions(t),this.get("cdn/stories",e)}getStory(e,t,s){return this.client.setFetchOptions(s),this.get(`cdn/stories/${e}`,t)}getToken(){return this.accessToken}ejectInterceptor(){this.client.eject()}_cleanCopy(e){return JSON.parse(JSON.stringify(e))}_insertLinks(e,t,s){const r=e[t];r&&r.fieldtype=="multilink"&&r.linktype=="story"&&typeof r.id=="string"&&this.links[s][r.id]?r.story=this._cleanCopy(this.links[s][r.id]):r&&r.linktype==="story"&&typeof r.uuid=="string"&&this.links[s][r.uuid]&&(r.story=this._cleanCopy(this.links[s][r.uuid]))}getStoryReference(e,t){return this.relations[e][t]?(this.stringifiedStoriesCache[t]||(this.stringifiedStoriesCache[t]=JSON.stringify(this.relations[e][t])),JSON.parse(this.stringifiedStoriesCache[t])):t}_insertRelations(e,t,s,r){s.indexOf(`${e.component}.${t}`)>-1&&(typeof e[t]=="string"?e[t]=this.getStoryReference(r,e[t]):Array.isArray(e[t])&&(e[t]=e[t].map(i=>this.getStoryReference(r,i)).filter(Boolean)))}iterateTree(e,t,s){const r=i=>{if(i!=null){if(i.constructor===Array)for(let n=0;n<i.length;n++)r(i[n]);else if(i.constructor===Object){if(i._stopResolving)return;for(const n in i)(i.component&&i._uid||i.type==="link")&&(this._insertRelations(i,n,t,s),this._insertLinks(i,n,s)),r(i[n])}}};r(e.content)}async resolveLinks(e,t,s){let r=[];if(e.link_uuids){const i=e.link_uuids.length,n=[],c=50;for(let a=0;a<i;a+=c){const l=Math.min(i,a+c);n.push(e.link_uuids.slice(a,l))}for(let a=0;a<n.length;a++)(await this.getStories({per_page:c,language:t.language,version:t.version,by_uuids:n[a].join(",")})).data.stories.forEach(l=>{r.push(l)})}else r=e.links;r.forEach(i=>{this.links[s][i.uuid]={...i,_stopResolving:!0}})}async resolveRelations(e,t,s){let r=[];if(e.rel_uuids){const i=e.rel_uuids.length,n=[],c=50;for(let a=0;a<i;a+=c){const l=Math.min(i,a+c);n.push(e.rel_uuids.slice(a,l))}for(let a=0;a<n.length;a++)(await this.getStories({per_page:c,language:t.language,version:t.version,by_uuids:n[a].join(","),excluding_fields:t.excluding_fields})).data.stories.forEach(l=>{r.push(l)})}else r=e.rels;r&&r.length>0&&r.forEach(i=>{this.relations[s][i.uuid]={...i,_stopResolving:!0}})}async resolveStories(e,t,s){var r,i;let n=[];if(this.links[s]={},this.relations[s]={},typeof t.resolve_relations<"u"&&t.resolve_relations.length>0&&(typeof t.resolve_relations=="string"&&(n=t.resolve_relations.split(",")),await this.resolveRelations(e,t,s)),t.resolve_links&&["1","story","url","link"].indexOf(t.resolve_links)>-1&&((r=e.links)!=null&&r.length||(i=e.link_uuids)!=null&&i.length)&&await this.resolveLinks(e,t,s),this.resolveNestedRelations)for(const c in this.relations[s])this.iterateTree(this.relations[s][c],n,s);e.story?this.iterateTree(e.story,n,s):e.stories.forEach(c=>{this.iterateTree(c,n,s)}),this.stringifiedStoriesCache={},delete this.links[s],delete this.relations[s]}async cacheResponse(e,t,s){(typeof s>"u"||!s)&&(s=0);const r=this.helpers.stringify({url:e,params:t}),i=this.cacheProvider();if(this.cache.clear==="auto"&&t.version==="draft"&&await this.flushCache(),t.version==="published"&&e!="/cdn/spaces/me"){const n=await i.get(r);if(n)return Promise.resolve(n)}return new Promise(async(n,c)=>{var a;try{const l=await this.throttle("get",e,t);if(l.status!==200)return c(l);let h={data:l.data,headers:l.headers};if((a=l.headers)!=null&&a["per-page"]&&(h=Object.assign({},h,{perPage:l.headers["per-page"]?parseInt(l.headers["per-page"]):0,total:l.headers["per-page"]?parseInt(l.headers.total):0})),h.data.story||h.data.stories){const p=this.resolveCounter=++this.resolveCounter%1e3;await this.resolveStories(h.data,t,`${p}`)}return t.version==="published"&&e!="/cdn/spaces/me"&&await i.set(r,h),h.data.cv&&t.token&&(t.version==="draft"&&b[t.token]!=h.data.cv&&await this.flushCache(),b[t.token]=t.cv?t.cv:h.data.cv),n(h)}catch(l){if(l.response&&l.status===429&&(s=s?s+1:0,s<this.maxRetries))return console.log(`Hit rate limit. Retrying in ${s} seconds.`),await this.helpers.delay(1e3*s),this.cacheResponse(e,t,s).then(n).catch(c);c(l)}})}throttledRequest(e,t,s){return this.client[e](t,s)}cacheVersions(){return b}cacheVersion(){return b[this.accessToken]}setCacheVersion(e){this.accessToken&&(b[this.accessToken]=e)}cacheProvider(){switch(this.cache.type){case"memory":return{get(e){return Promise.resolve(w[e])},getAll(){return Promise.resolve(w)},set(e,t){return w[e]=t,Promise.resolve(void 0)},flush(){return w={},Promise.resolve(void 0)}};case"custom":if(this.cache.custom)return this.cache.custom;default:return{get(){return Promise.resolve()},getAll(){return Promise.resolve(void 0)},set(){return Promise.resolve(void 0)},flush(){return Promise.resolve(void 0)}}}}async flushCache(){return await this.cacheProvider().flush(),this}}const be=(o={})=>{const{apiOptions:e}=o;if(!e.accessToken){console.error("You need to provide an access token to interact with Storyblok API. Read https://www.storyblok.com/docs/api/content-delivery#topics/authentication");return}return{storyblokApi:new ye(e)}},ke=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 $,R="https://app.storyblok.com/f/storyblok-v2-latest.js";const ve=(o={})=>{var e,t;const{bridge:s,accessToken:r,use:i=[],apiOptions:n={},richText:c={},bridgeUrl:a}=o;n.accessToken=n.accessToken||r;const l={bridge:s,apiOptions:n};let h={};i.forEach(g=>{h={...h,...g(l)}}),a&&(R=a);const p=!(typeof window>"u")&&((t=(e=window.location)==null?void 0:e.search)==null?void 0:t.includes("_storyblok_tk"));return s!==!1&&p&&A(R),$=new k(c.schema),c.resolver&&j($,c.resolver),h},j=(o,e)=>{o.addNode("blok",t=>{let s="";return t.attrs.body.forEach(r=>{s+=e(r.component,r)}),{html:s}})},we=o=>!o||!(o!=null&&o.content.some(e=>e.content||e.type==="blok"||e.type==="horizontal_rule")),Te=(o,e,t)=>{let s=t||$;if(!s){console.error("Please initialize the Storyblok SDK before calling the renderRichText function");return}return we(o)?"":(e&&(s=new k(e.schema),e.resolver&&j(s,e.resolver)),s.render(o))},$e=()=>A(R);function Re(o,e,t){const s="virtual:storyblok-init",r="\0"+s;return globalThis.apiPlugin=be,globalThis.storyblokInit=ve,{name:"vite-plugin-storyblok-init",async resolveId(i){if(i===s)return r},async load(i){if(i===r)return`
|
|
25
|
+
const { storyblokApi } = globalThis.storyblokInit({
|
|
26
|
+
accessToken: "${o}",
|
|
27
|
+
use: ${e?"[]":"[globalThis.apiPlugin]"},
|
|
28
|
+
apiOptions: ${JSON.stringify(t)},
|
|
29
|
+
});
|
|
30
|
+
export const storyblokApiInstance = storyblokApi;
|
|
31
|
+
`}}}const Ie=/[\p{Lu}]/u,_e=/[\p{Ll}]/u,E=/^[\p{Lu}](?![\p{Lu}])/gu,P=/([\p{Alpha}\p{N}_]|$)/u,I=/[_.\- ]+/,Se=new RegExp("^"+I.source),L=new RegExp(I.source+P.source,"gu"),N=new RegExp("\\d+"+P.source,"gu"),Ae=(o,e,t,s)=>{let r=!1,i=!1,n=!1,c=!1;for(let a=0;a<o.length;a++){const l=o[a];c=a>2?o[a-3]==="-":!0,r&&Ie.test(l)?(o=o.slice(0,a)+"-"+o.slice(a),r=!1,n=i,i=!0,a++):i&&n&&_e.test(l)&&(!c||s)?(o=o.slice(0,a-1)+"-"+o.slice(a-1),n=i,i=!1,r=!0):(r=e(l)===l&&t(l)!==l,n=i,i=t(l)===l&&e(l)!==l)}return o},Ce=(o,e)=>(E.lastIndex=0,o.replaceAll(E,t=>e(t))),Oe=(o,e)=>(L.lastIndex=0,N.lastIndex=0,o.replaceAll(N,(t,s,r)=>["_","-"].includes(o.charAt(r+t.length))?t:e(t)).replaceAll(L,(t,s)=>e(s)));function M(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(i=>i.trim()).filter(i=>i.length).join("-"):o=o.trim(),o.length===0)return"";const t=e.locale===!1?i=>i.toLowerCase():i=>i.toLocaleLowerCase(e.locale),s=e.locale===!1?i=>i.toUpperCase():i=>i.toLocaleUpperCase(e.locale);return o.length===1?I.test(o)?"":e.pascalCase?s(o):t(o):(o!==t(o)&&(o=Ae(o,t,s,e.preserveConsecutiveUppercase)),o=o.replace(Se,""),o=e.preserveConsecutiveUppercase?Ce(o,t):t(o),e.pascalCase&&(o=s(o.charAt(0))+o.slice(1)),Oe(o,s))}function xe(o,e,t,s){const r="virtual:storyblok-components",i="\0"+r;return{name:"vite-plugin-storyblok-components",async resolveId(n){if(n===r)return i},async load(n){if(n===i){const c=[],a=[];for await(const[h,p]of Object.entries(e)){const g=await this.resolve("/"+o+"/"+p+".astro");if(g)c.push(`import ${M(h)} from "${g.id}"`);else if(t)a.push(h);else throw new Error(`Component could not be found for blok "${h}"! Does "${"/"+o+"/"+p}.astro" exist?`)}let l="";if(t)if(l=",FallbackComponent",s){const h=await this.resolve("/"+o+"/"+s+".astro");if(!h)throw new Error(`Custom fallback component could not be found. Does "${"/"+o+"/"+s}.astro" exist?`);c.push(`import FallbackComponent from "${h.id}"`)}else c.push("import FallbackComponent from '@storyblok/astro/FallbackComponent.astro'");if(Object.values(e).length)return`${c.join(";")};export default {${Object.keys(e).filter(h=>!a.includes(h)).map(h=>M(h)).join(",")}${l}}`;if(t)return`${c[0]}; export default {${l.replace(",","")}}`;throw new Error(`Currently, no Storyblok components are registered in astro.config.mjs.
|
|
32
|
+
Please register your components or enable the fallback component.
|
|
33
|
+
Detailed information can be found here: https://github.com/storyblok/storyblok-astro`)}}}}function je(o){const e="virtual:storyblok-options",t="\0"+e;return{name:"vite-plugin-storyblok-options",async resolveId(s){if(s===e)return t},async load(s){if(s===t)return`export default ${JSON.stringify(o)}`}}}function Ee(){return globalThis.storyblokApiInstance||console.error("storyblokApiInstance has not been initialized correctly"),globalThis.storyblokApiInstance}function Pe(o,e){const t=globalThis.storyblokApiInstance.richTextResolver;if(!t){console.error("Please initialize the Storyblok SDK before calling the renderRichText function");return}return Te(o,e,t)}function Le(o){const e={useCustomApi:!1,bridge:!0,componentsDir:"src",enableFallbackComponent:!1,...o};return{name:"@storyblok/astro",hooks:{"astro:config:setup":({injectScript:t,updateConfig:s,addDevToolbarApp:r})=>{if(s({vite:{plugins:[Re(e.accessToken,e.useCustomApi,e.apiOptions),xe(e.componentsDir,e.components,e.enableFallbackComponent,e.customFallbackComponent),je(e)]}}),t("page-ssr",`
|
|
35
34
|
import { storyblokApiInstance } from "virtual:storyblok-init";
|
|
36
35
|
globalThis.storyblokApiInstance = storyblokApiInstance;
|
|
37
|
-
`),
|
|
36
|
+
`),e.bridge){let i="";if(typeof e.bridge=="object"){const n={...e.bridge};i=`const storyblokInstance = new StoryblokBridge(${JSON.stringify(n)});`}else i="const storyblokInstance = new StoryblokBridge()";t("page",`
|
|
38
37
|
import { loadStoryblokBridge } from "@storyblok/astro";
|
|
39
38
|
loadStoryblokBridge().then(() => {
|
|
40
39
|
const { StoryblokBridge, location } = window;
|
|
41
|
-
${
|
|
40
|
+
${i}
|
|
42
41
|
|
|
43
42
|
storyblokInstance.on(["published", "change"], (event) => {
|
|
44
43
|
if (!event.slugChanged) {
|
|
@@ -46,4 +45,4 @@ Detailed information can be found here: https://github.com/storyblok/storyblok-a
|
|
|
46
45
|
}
|
|
47
46
|
});
|
|
48
47
|
});
|
|
49
|
-
`)}
|
|
48
|
+
`)}r("@storyblok/astro/toolbar-app-storyblok.ts")}}}}d.RichTextResolver=k,d.RichTextSchema=O,d.default=Le,d.loadStoryblokBridge=$e,d.renderRichText=Pe,d.storyblokEditable=ke,d.useStoryblokApi=Ee,Object.defineProperties(d,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
|