@storyblok/js 4.2.4 → 4.2.7
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-js.js +1 -1
- package/dist/storyblok-js.mjs +516 -795
- package/package.json +3 -3
package/dist/storyblok-js.js
CHANGED
@@ -4,4 +4,4 @@
|
|
4
4
|
* description: SDK to integrate Storyblok into your project using JavaScript.
|
5
5
|
* author: undefined
|
6
6
|
*/
|
7
|
-
(function(p,x){typeof exports=="object"&&typeof module<"u"?x(exports):typeof define=="function"&&define.amd?define(["exports"],x):(p=typeof globalThis<"u"?globalThis:p||self,x(p.storyblok={}))})(this,function(p){"use strict";var Vt=Object.defineProperty;var Kt=(p,x,S)=>x in p?Vt(p,x,{enumerable:!0,configurable:!0,writable:!0,value:S}):p[x]=S;var E=(p,x,S)=>Kt(p,typeof x!="symbol"?x+"":x,S);const x=/[!-#%-\*,-\/:;\?@\[-\]_\{\}\xA1\xA7\xAB\xB6\xB7\xBB\xBF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061D-\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u09FD\u0A76\u0AF0\u0C77\u0C84\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1B7D\u1B7E\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2308-\u230B\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E4F\u2E52-\u2E5D\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]|\uD800[\uDD00-\uDD02\uDF9F\uDFD0]|\uD801\uDD6F|\uD802[\uDC57\uDD1F\uDD3F\uDE50-\uDE58\uDE7F\uDEF0-\uDEF6\uDF39-\uDF3F\uDF99-\uDF9C]|\uD803[\uDEAD\uDF55-\uDF59\uDF86-\uDF89]|\uD804[\uDC47-\uDC4D\uDCBB\uDCBC\uDCBE-\uDCC1\uDD40-\uDD43\uDD74\uDD75\uDDC5-\uDDC8\uDDCD\uDDDB\uDDDD-\uDDDF\uDE38-\uDE3D\uDEA9]|\uD805[\uDC4B-\uDC4F\uDC5A\uDC5B\uDC5D\uDCC6\uDDC1-\uDDD7\uDE41-\uDE43\uDE60-\uDE6C\uDEB9\uDF3C-\uDF3E]|\uD806[\uDC3B\uDD44-\uDD46\uDDE2\uDE3F-\uDE46\uDE9A-\uDE9C\uDE9E-\uDEA2\uDF00-\uDF09]|\uD807[\uDC41-\uDC45\uDC70\uDC71\uDEF7\uDEF8\uDF43-\uDF4F\uDFFF]|\uD809[\uDC70-\uDC74]|\uD80B[\uDFF1\uDFF2]|\uD81A[\uDE6E\uDE6F\uDEF5\uDF37-\uDF3B\uDF44]|\uD81B[\uDE97-\uDE9A\uDFE2]|\uD82F\uDC9F|\uD836[\uDE87-\uDE8B]|\uD83A[\uDD5E\uDD5F]/,S=/[\$\+<->\^`\|~\xA2-\xA6\xA8\xA9\xAC\xAE-\xB1\xB4\xB8\xD7\xF7\u02C2-\u02C5\u02D2-\u02DF\u02E5-\u02EB\u02ED\u02EF-\u02FF\u0375\u0384\u0385\u03F6\u0482\u058D-\u058F\u0606-\u0608\u060B\u060E\u060F\u06DE\u06E9\u06FD\u06FE\u07F6\u07FE\u07FF\u0888\u09F2\u09F3\u09FA\u09FB\u0AF1\u0B70\u0BF3-\u0BFA\u0C7F\u0D4F\u0D79\u0E3F\u0F01-\u0F03\u0F13\u0F15-\u0F17\u0F1A-\u0F1F\u0F34\u0F36\u0F38\u0FBE-\u0FC5\u0FC7-\u0FCC\u0FCE\u0FCF\u0FD5-\u0FD8\u109E\u109F\u1390-\u1399\u166D\u17DB\u1940\u19DE-\u19FF\u1B61-\u1B6A\u1B74-\u1B7C\u1FBD\u1FBF-\u1FC1\u1FCD-\u1FCF\u1FDD-\u1FDF\u1FED-\u1FEF\u1FFD\u1FFE\u2044\u2052\u207A-\u207C\u208A-\u208C\u20A0-\u20C0\u2100\u2101\u2103-\u2106\u2108\u2109\u2114\u2116-\u2118\u211E-\u2123\u2125\u2127\u2129\u212E\u213A\u213B\u2140-\u2144\u214A-\u214D\u214F\u218A\u218B\u2190-\u2307\u230C-\u2328\u232B-\u2426\u2440-\u244A\u249C-\u24E9\u2500-\u2767\u2794-\u27C4\u27C7-\u27E5\u27F0-\u2982\u2999-\u29D7\u29DC-\u29FB\u29FE-\u2B73\u2B76-\u2B95\u2B97-\u2BFF\u2CE5-\u2CEA\u2E50\u2E51\u2E80-\u2E99\u2E9B-\u2EF3\u2F00-\u2FD5\u2FF0-\u2FFF\u3004\u3012\u3013\u3020\u3036\u3037\u303E\u303F\u309B\u309C\u3190\u3191\u3196-\u319F\u31C0-\u31E3\u31EF\u3200-\u321E\u322A-\u3247\u3250\u3260-\u327F\u328A-\u32B0\u32C0-\u33FF\u4DC0-\u4DFF\uA490-\uA4C6\uA700-\uA716\uA720\uA721\uA789\uA78A\uA828-\uA82B\uA836-\uA839\uAA77-\uAA79\uAB5B\uAB6A\uAB6B\uFB29\uFBB2-\uFBC2\uFD40-\uFD4F\uFDCF\uFDFC-\uFDFF\uFE62\uFE64-\uFE66\uFE69\uFF04\uFF0B\uFF1C-\uFF1E\uFF3E\uFF40\uFF5C\uFF5E\uFFE0-\uFFE6\uFFE8-\uFFEE\uFFFC\uFFFD]|\uD800[\uDD37-\uDD3F\uDD79-\uDD89\uDD8C-\uDD8E\uDD90-\uDD9C\uDDA0\uDDD0-\uDDFC]|\uD802[\uDC77\uDC78\uDEC8]|\uD805\uDF3F|\uD807[\uDFD5-\uDFF1]|\uD81A[\uDF3C-\uDF3F\uDF45]|\uD82F\uDC9C|\uD833[\uDF50-\uDFC3]|\uD834[\uDC00-\uDCF5\uDD00-\uDD26\uDD29-\uDD64\uDD6A-\uDD6C\uDD83\uDD84\uDD8C-\uDDA9\uDDAE-\uDDEA\uDE00-\uDE41\uDE45\uDF00-\uDF56]|\uD835[\uDEC1\uDEDB\uDEFB\uDF15\uDF35\uDF4F\uDF6F\uDF89\uDFA9\uDFC3]|\uD836[\uDC00-\uDDFF\uDE37-\uDE3A\uDE6D-\uDE74\uDE76-\uDE83\uDE85\uDE86]|\uD838[\uDD4F\uDEFF]|\uD83B[\uDCAC\uDCB0\uDD2E\uDEF0\uDEF1]|\uD83C[\uDC00-\uDC2B\uDC30-\uDC93\uDCA0-\uDCAE\uDCB1-\uDCBF\uDCC1-\uDCCF\uDCD1-\uDCF5\uDD0D-\uDDAD\uDDE6-\uDE02\uDE10-\uDE3B\uDE40-\uDE48\uDE50\uDE51\uDE60-\uDE65\uDF00-\uDFFF]|\uD83D[\uDC00-\uDED7\uDEDC-\uDEEC\uDEF0-\uDEFC\uDF00-\uDF76\uDF7B-\uDFD9\uDFE0-\uDFEB\uDFF0]|\uD83E[\uDC00-\uDC0B\uDC10-\uDC47\uDC50-\uDC59\uDC60-\uDC87\uDC90-\uDCAD\uDCB0\uDCB1\uDD00-\uDE53\uDE60-\uDE6D\uDE70-\uDE7C\uDE80-\uDE88\uDE90-\uDEBD\uDEBF-\uDEC5\uDECE-\uDEDB\uDEE0-\uDEE8\uDEF0-\uDEF8\uDF00-\uDF92\uDF94-\uDFCA]/;function P(t){switch(t){case 9:case 32:return!0}return!1}function q(t){if(t>=8192&&t<=8202)return!0;switch(t){case 9:case 10:case 11:case 12:case 13:case 32:case 160:case 5760:case 8239:case 8287:case 12288:return!0}return!1}function G(t){return x.test(t)||S.test(t)}function J(t){switch(t){case 33:case 34:case 35:case 36:case 37:case 38:case 39:case 40:case 41:case 42:case 43:case 44:case 45:case 46:case 47:case 58:case 59:case 60:case 61:case 62:case 63:case 64:case 91:case 92:case 93:case 94:case 95:case 96:case 123:case 124:case 125:case 126:return!0;default:return!1}}function B(t,e,r){this.type=t,this.tag=e,this.attrs=null,this.map=null,this.nesting=r,this.level=0,this.children=null,this.content="",this.markup="",this.info="",this.meta=null,this.block=!1,this.hidden=!1}B.prototype.attrIndex=function(e){if(!this.attrs)return-1;const r=this.attrs;for(let s=0,u=r.length;s<u;s++)if(r[s][0]===e)return s;return-1},B.prototype.attrPush=function(e){this.attrs?this.attrs.push(e):this.attrs=[e]},B.prototype.attrSet=function(e,r){const s=this.attrIndex(e),u=[e,r];s<0?this.attrPush(u):this.attrs[s]=u},B.prototype.attrGet=function(e){const r=this.attrIndex(e);let s=null;return r>=0&&(s=this.attrs[r][1]),s},B.prototype.attrJoin=function(e,r){const s=this.attrIndex(e);s<0?this.attrPush([e,r]):this.attrs[s][1]=this.attrs[s][1]+" "+r};function ot(t,e,r){this.src=t,this.env=r,this.tokens=[],this.inlineMode=!1,this.md=e}ot.prototype.Token=B;function w(t,e,r,s){this.src=t,this.md=e,this.env=r,this.tokens=s,this.bMarks=[],this.eMarks=[],this.tShift=[],this.sCount=[],this.bsCount=[],this.blkIndent=0,this.line=0,this.lineMax=0,this.tight=!1,this.ddIndent=-1,this.listIndent=-1,this.parentType="root",this.level=0;const u=this.src;for(let i=0,o=0,n=0,a=0,c=u.length,h=!1;o<c;o++){const D=u.charCodeAt(o);if(!h)if(P(D)){n++,D===9?a+=4-a%4:a++;continue}else h=!0;(D===10||o===c-1)&&(D!==10&&o++,this.bMarks.push(i),this.eMarks.push(o),this.tShift.push(n),this.sCount.push(a),this.bsCount.push(0),h=!1,n=0,a=0,i=o+1)}this.bMarks.push(u.length),this.eMarks.push(u.length),this.tShift.push(0),this.sCount.push(0),this.bsCount.push(0),this.lineMax=this.bMarks.length-1}w.prototype.push=function(t,e,r){const s=new B(t,e,r);return s.block=!0,r<0&&this.level--,s.level=this.level,r>0&&this.level++,this.tokens.push(s),s},w.prototype.isEmpty=function(e){return this.bMarks[e]+this.tShift[e]>=this.eMarks[e]},w.prototype.skipEmptyLines=function(e){for(let r=this.lineMax;e<r&&!(this.bMarks[e]+this.tShift[e]<this.eMarks[e]);e++);return e},w.prototype.skipSpaces=function(e){for(let r=this.src.length;e<r;e++){const s=this.src.charCodeAt(e);if(!P(s))break}return e},w.prototype.skipSpacesBack=function(e,r){if(e<=r)return e;for(;e>r;)if(!P(this.src.charCodeAt(--e)))return e+1;return e},w.prototype.skipChars=function(e,r){for(let s=this.src.length;e<s&&this.src.charCodeAt(e)===r;e++);return e},w.prototype.skipCharsBack=function(e,r,s){if(e<=s)return e;for(;e>s;)if(r!==this.src.charCodeAt(--e))return e+1;return e},w.prototype.getLines=function(e,r,s,u){if(e>=r)return"";const i=new Array(r-e);for(let o=0,n=e;n<r;n++,o++){let a=0;const c=this.bMarks[n];let h=c,D;for(n+1<r||u?D=this.eMarks[n]+1:D=this.eMarks[n];h<D&&a<s;){const b=this.src.charCodeAt(h);if(P(b))b===9?a+=4-(a+this.bsCount[n])%4:a++;else if(h-c<this.tShift[n])a++;else break;h++}a>s?i[o]=new Array(a-s+1).join(" ")+this.src.slice(h,D):i[o]=this.src.slice(h,D)}return i.join("")},w.prototype.Token=B;const at=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],ct="[a-zA-Z_:][a-zA-Z0-9:._-]*",lt="(?:"+"[^\"'=<>`\\x00-\\x20]+"+"|"+"'[^']*'"+"|"+'"[^"]*"'+")",ht="<[A-Za-z][A-Za-z0-9\\-]*"+("(?:\\s+"+ct+"(?:\\s*=\\s*"+lt+")?)")+"*\\s*\\/?>",Dt="<\\/[A-Za-z][A-Za-z0-9\\-]*\\s*>",dt=new RegExp("^(?:"+ht+"|"+Dt+")");new RegExp("^</?("+at.join("|")+")(?=(\\s|/?>|$))","i"),new RegExp(dt.source+"\\s*$");function O(t,e,r,s){this.src=t,this.env=r,this.md=e,this.tokens=s,this.tokens_meta=Array(s.length),this.pos=0,this.posMax=this.src.length,this.level=0,this.pending="",this.pendingLevel=0,this.cache={},this.delimiters=[],this._prev_delimiters=[],this.backticks={},this.backticksScanned=!1,this.linkLevel=0}O.prototype.pushPending=function(){const t=new B("text","",0);return t.content=this.pending,t.level=this.pendingLevel,this.tokens.push(t),this.pending="",t},O.prototype.push=function(t,e,r){this.pending&&this.pushPending();const s=new B(t,e,r);let u=null;return r<0&&(this.level--,this.delimiters=this._prev_delimiters.pop()),s.level=this.level,r>0&&(this.level++,this._prev_delimiters.push(this.delimiters),this.delimiters=[],u={delimiters:this.delimiters}),this.pendingLevel=this.level,this.tokens.push(s),this.tokens_meta.push(u),s},O.prototype.scanDelims=function(t,e){const r=this.posMax,s=this.src.charCodeAt(t),u=t>0?this.src.charCodeAt(t-1):32;let i=t;for(;i<r&&this.src.charCodeAt(i)===s;)i++;const o=i-t,n=i<r?this.src.charCodeAt(i):32,a=J(u)||G(String.fromCharCode(u)),c=J(n)||G(String.fromCharCode(n)),h=q(u),D=q(n),b=!D&&(!c||h||a),m=!h&&(!a||D||c);return{can_open:b&&(e||!m||a),can_close:m&&(e||!b||c),length:o}},O.prototype.Token=B;const V=[];for(let t=0;t<256;t++)V.push(0);"\\!\"#$%&'()*+,./:;<=>?@[]^_`{|}~-".split("").forEach(function(t){V[t.charCodeAt(0)]=1});let g=function(t){return t.DOCUMENT="doc",t.HEADING="heading",t.PARAGRAPH="paragraph",t.QUOTE="blockquote",t.OL_LIST="ordered_list",t.UL_LIST="bullet_list",t.LIST_ITEM="list_item",t.CODE_BLOCK="code_block",t.HR="horizontal_rule",t.BR="hard_break",t.IMAGE="image",t.EMOJI="emoji",t.COMPONENT="blok",t.TABLE="table",t.TABLE_ROW="tableRow",t.TABLE_CELL="tableCell",t.TABLE_HEADER="tableHeader",t}({}),_=function(t){return t.BOLD="bold",t.STRONG="strong",t.STRIKE="strike",t.UNDERLINE="underline",t.ITALIC="italic",t.CODE="code",t.LINK="link",t.ANCHOR="anchor",t.STYLED="styled",t.SUPERSCRIPT="superscript",t.SUBSCRIPT="subscript",t.TEXT_STYLE="textStyle",t.HIGHLIGHT="highlight",t}({}),K=function(t){return t.TEXT="text",t}({}),I=function(t){return t.URL="url",t.STORY="story",t.ASSET="asset",t.EMAIL="email",t}({});function ft(t,e){if(!e)return{src:t,attrs:{}};let r=0,s=0;const u={},i=[];function o(a,c,h,D,b){typeof a!="number"||a<=c||a>=h?console.warn(`[StoryblokRichText] - ${D.charAt(0).toUpperCase()+D.slice(1)} value must be a number between ${c} and ${h} (inclusive)`):b.push(`${D}(${a})`)}if(typeof e=="object"){if(typeof e.width=="number"&&e.width>0?(u.width=e.width,r=e.width):console.warn("[StoryblokRichText] - Width value must be a number greater than 0"),e.height&&typeof e.height=="number"&&e.height>0?(u.height=e.height,s=e.height):console.warn("[StoryblokRichText] - Height value must be a number greater than 0"),e.loading&&["lazy","eager"].includes(e.loading)&&(u.loading=e.loading),e.class&&(u.class=e.class),e.filters){const{filters:a}=e||{},{blur:c,brightness:h,fill:D,format:b,grayscale:m,quality:T,rotate:L}=a||{};c&&o(c,0,100,"blur",i),T&&o(T,0,100,"quality",i),h&&o(h,0,100,"brightness",i),D&&i.push(`fill(${D})`),m&&i.push("grayscale()"),L&&[0,90,180,270].includes(e.filters.rotate||0)&&i.push(`rotate(${L})`),b&&["webp","png","jpeg"].includes(b)&&i.push(`format(${b})`)}e.srcset&&(u.srcset=e.srcset.map(a=>{if(typeof a=="number")return`${t}/m/${a}x0/${i.length>0?`filters:${i.join(":")}`:""} ${a}w`;if(Array.isArray(a)&&a.length===2){const[c,h]=a;return`${t}/m/${c}x${h}/${i.length>0?`filters:${i.join(":")}`:""} ${c}w`}else{console.warn("[StoryblokRichText] - srcset entry must be a number or a tuple of two numbers");return}}).join(", ")),e.sizes&&(u.sizes=e.sizes.join(", "))}let n=`${t}/m/`;return r>0&&s>0&&(n=`${n}${r}x${s}/`),i.length>0&&(n=`${n}filters:${i.join(":")}`),{src:n,attrs:u}}const Ft=["area","base","br","col","embed","hr","img","input","link","meta","param","source","track","wbr"],Et=(t={})=>Object.keys(t).map(e=>`${e}="${t[e]}"`).join(" "),pt=(t={})=>Object.keys(t).map(e=>`${e}: ${t[e]}`).join("; ");function Ct(t){return t.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")}const N=t=>Object.fromEntries(Object.entries(t).filter(([e,r])=>r!==void 0));function Y(t,e={},r){const s=Et(e),u=s?`${t} ${s}`:t,i=Array.isArray(r)?r.join(""):r||"";if(t){if(Ft.includes(t))return`<${u}>`}else return i;return`<${u}>${i}</${t}>`}function W(t={}){const e=new Map,{renderFn:r=Y,textFn:s=Ct,resolvers:u={},optimizeImages:i=!1,keyedResolvers:o=!1}=t,n=r!==Y,a=l=>(f,d)=>{const F=f.attrs||{};return d.render(l,F,f.children||null)},c=(l,f)=>{const{src:d,alt:F,title:C,srcset:A,sizes:y}=l.attrs||{};let k=d,v={};if(i){const{src:Gt,attrs:Jt}=ft(d,i);k=Gt,v=Jt}const qt={src:k,alt:F,title:C,srcset:A,sizes:y,...v};return f.render("img",N(qt))},h=(l,f)=>{const{level:d,...F}=l.attrs||{};return f.render(`h${d}`,F,l.children)},D=(l,f)=>{var F,C,A,y;const d=f.render("img",{src:(F=l.attrs)==null?void 0:F.fallbackImage,alt:(C=l.attrs)==null?void 0:C.alt,style:"width: 1.25em; height: 1.25em; vertical-align: text-top",draggable:"false",loading:"lazy"});return f.render("span",{"data-type":"emoji","data-name":(A=l.attrs)==null?void 0:A.name,"data-emoji":(y=l.attrs)==null?void 0:y.emoji},d)},b=(l,f)=>f.render("pre",l.attrs||{},f.render("code",{},l.children||"")),m=(l,f=!1)=>({text:d,attrs:F},C)=>{const{class:A,id:y,...k}=F||{},v=f?{class:A,id:y,style:pt(k)||void 0}:F||{};return C.render(l,N(v),d)},T=l=>z(l),L=l=>{const{marks:f,...d}=l;if("text"in l){if(f)return f.reduce((C,A)=>T({...A,text:C}),T({...d,children:d.children}));const F=l.attrs||{};if(o){const C=e.get("txt")||0;e.set("txt",C+1),F.key=`txt-${C}`}return s(d.text,F)}return""},ut=(l,f)=>{const{linktype:d,href:F,anchor:C,...A}=l.attrs||{};let y="";switch(d){case I.ASSET:case I.URL:y=F;break;case I.EMAIL:y=`mailto:${F}`;break;case I.STORY:y=F,C&&(y=`${y}#${C}`);break;default:y=F;break}const k={...A};return y&&(k.href=y),f.render("a",k,l.text)},$t=(l,f)=>{var d,F;return console.warn("[StoryblokRichtText] - BLOK resolver is not available for vanilla usage"),f.render("span",{blok:(d=l==null?void 0:l.attrs)==null?void 0:d.body[0],id:(F=l.attrs)==null?void 0:F.id,style:"display: none"})},jt=(l,f)=>{const d={},F=f.render("tbody",{},l.children);return f.render("table",d,F)},Ht=(l,f)=>{const d={};return f.render("tr",d,l.children)},Mt=(l,f)=>{const{colspan:d,rowspan:F,colwidth:C,backgroundColor:A,...y}=l.attrs||{},k={...y};d>1&&(k.colspan=d),F>1&&(k.rowspan=F);const v=[];return C&&v.push(`width: ${C}px;`),A&&v.push(`background-color: ${A};`),v.length>0&&(k.style=v.join(" ")),f.render("td",N(k),l.children)},Ut=(l,f)=>{const{colspan:d,rowspan:F,colwidth:C,backgroundColor:A,...y}=l.attrs||{},k={...y};d>1&&(k.colspan=d),F>1&&(k.rowspan=F);const v=[];return C&&v.push(`width: ${C}px;`),A&&v.push(`background-color: ${A};`),v.length>0&&(k.style=v.join(" ")),f.render("th",N(k),l.children)},it=new Map([[g.DOCUMENT,a("")],[g.HEADING,h],[g.PARAGRAPH,a("p")],[g.UL_LIST,a("ul")],[g.OL_LIST,a("ol")],[g.LIST_ITEM,a("li")],[g.IMAGE,c],[g.EMOJI,D],[g.CODE_BLOCK,b],[g.HR,a("hr")],[g.BR,a("br")],[g.QUOTE,a("blockquote")],[g.COMPONENT,$t],[K.TEXT,L],[_.LINK,ut],[_.ANCHOR,ut],[_.STYLED,m("span",!0)],[_.BOLD,m("strong")],[_.TEXT_STYLE,m("span",!0)],[_.ITALIC,m("em")],[_.UNDERLINE,m("u")],[_.STRIKE,m("s")],[_.CODE,m("code")],[_.SUPERSCRIPT,m("sup")],[_.SUBSCRIPT,m("sub")],[_.HIGHLIGHT,m("mark")],[g.TABLE,jt],[g.TABLE_ROW,Ht],[g.TABLE_CELL,Mt],[g.TABLE_HEADER,Ut]]),nt=new Map([...it,...Object.entries(u).map(([l,f])=>[l,f])]),zt=()=>({render:(d,F={},C)=>{if(o&&d){const A=e.get(d)||0;e.set(d,A+1),F.key=`${d}-${A}`}return r(d,F,C)},originalResolvers:it,mergedResolvers:nt});function j(l){const f=nt.get(l.type);if(!f)return console.error("<Storyblok>",`No resolver found for node type ${l.type}`),"";const d=zt();if(l.type==="text")return f(l,d);const F=l.content?l.content.map(z):void 0;return f({...l,children:F},d)}function z(l){return l.type==="doc"?n?l.content.map(j):l.content.map(j).join(""):Array.isArray(l)?l.map(j):j(l)}return{render:z}}let Z=!1;const X=[],Q=t=>new Promise((e,r)=>{if(typeof window>"u"){r(new Error("Cannot load Storyblok bridge: window is undefined (server-side environment)"));return}if(window.storyblokRegisterEvent=u=>{if(!window.location.search.includes("_storyblok")){console.warn("You are not in Draft Mode or in the Visual Editor.");return}Z?u():X.push(u)},document.getElementById("storyblok-javascript-bridge")){e(void 0);return}const s=document.createElement("script");s.async=!0,s.src=t,s.id="storyblok-javascript-bridge",s.onerror=u=>r(u),s.onload=u=>{X.forEach(i=>i()),Z=!0,e(u)},document.getElementsByTagName("head")[0].appendChild(s)});var At=class extends Error{constructor(t){super(t),this.name="AbortError"}};function yt(t,e,r){if(!Number.isFinite(e))throw new TypeError("Expected `limit` to be a finite number");if(!Number.isFinite(r))throw new TypeError("Expected `interval` to be a finite number");const s=[];let u=[],i=0,o=!1;const n=async()=>{i++;const c=s.shift();if(c)try{const D=await t(...c.args);c.resolve(D)}catch(D){c.reject(D)}const h=setTimeout(()=>{i--,s.length>0&&n(),u=u.filter(D=>D!==h)},r);u.includes(h)||u.push(h)},a=(...c)=>o?Promise.reject(new Error("Throttled function is already aborted and not accepting new promises")):new Promise((h,D)=>{s.push({resolve:h,reject:D,args:c}),i<e&&n()});return a.abort=()=>{o=!0,u.forEach(clearTimeout),u=[],s.forEach(c=>c.reject(()=>new At("Throttle function aborted"))),s.length=0},a}var gt=yt;const tt=(t="")=>t.includes("/cdn/"),bt=(t,e=25,r=1)=>({...t,per_page:e,page:r}),kt=t=>new Promise(e=>setTimeout(e,t)),mt=(t=0,e)=>Array.from({length:t},e),vt=(t=0,e=t)=>{const r=Math.abs(e-t)||0,s=t<e?1:-1;return mt(r,(u,i)=>i*s+t)},xt=async(t,e)=>Promise.all(t.map(e)),_t=(t=[],e)=>t.map(e).reduce((r,s)=>[...r,...s],[]),H=(t,e,r)=>{const s=[];for(const u in t){if(!Object.prototype.hasOwnProperty.call(t,u))continue;const i=t[u];if(i==null)continue;const o=r?"":encodeURIComponent(u);let n;typeof i=="object"?n=H(i,e?e+encodeURIComponent(`[${o}]`):o,Array.isArray(i)):n=`${e?e+encodeURIComponent(`[${o}]`):o}=${encodeURIComponent(i)}`,s.push(n)}return s.join("&")},et=t=>{const e={eu:"api.storyblok.com",us:"api-us.storyblok.com",cn:"app.storyblokchina.cn",ap:"api-ap.storyblok.com",ca:"api-ca.storyblok.com"};return e[t]??e.eu};var Bt=class{constructor(t){E(this,"baseURL");E(this,"timeout");E(this,"headers");E(this,"responseInterceptor");E(this,"fetch");E(this,"ejectInterceptor");E(this,"url");E(this,"parameters");E(this,"fetchOptions");this.baseURL=t.baseURL,this.headers=t.headers||new Headers,this.timeout=t!=null&&t.timeout?t.timeout*1e3:0,this.responseInterceptor=t.responseInterceptor,this.fetch=(...e)=>t.fetch?t.fetch(...e):fetch(...e),this.ejectInterceptor=!1,this.url="",this.parameters={},this.fetchOptions={}}get(t,e){return this.url=t,this.parameters=e,this._methodHandler("get")}post(t,e){return this.url=t,this.parameters=e,this._methodHandler("post")}put(t,e){return this.url=t,this.parameters=e,this._methodHandler("put")}delete(t,e){return this.url=t,this.parameters=e??{},this._methodHandler("delete")}async _responseHandler(t){const e=[],r={data:{},headers:{},status:0,statusText:""};t.status!==204&&await t.json().then(s=>{r.data=s});for(const s of t.headers.entries())e[s[0]]=s[1];return r.headers={...e},r.status=t.status,r.statusText=t.statusText,r}async _methodHandler(t){let e=`${this.baseURL}${this.url}`,r=null;t==="get"?e=`${this.baseURL}${this.url}?${H(this.parameters)}`:r=JSON.stringify(this.parameters);const s=new URL(e),u=new AbortController,{signal:i}=u;let o;this.timeout&&(o=setTimeout(()=>u.abort(),this.timeout));try{const n=await this.fetch(`${s}`,{method:t,headers:this.headers,body:r,signal:i,...this.fetchOptions});this.timeout&&clearTimeout(o);const a=await this._responseHandler(n);return this.responseInterceptor&&!this.ejectInterceptor?this._statusHandler(this.responseInterceptor(a)):this._statusHandler(a)}catch(n){return{message:n}}}setFetchOptions(t={}){Object.keys(t).length>0&&"method"in t&&delete t.method,this.fetchOptions={...t}}eject(){this.ejectInterceptor=!0}_normalizeErrorMessage(t){if(Array.isArray(t))return t[0]||"Unknown error";if(t&&typeof t=="object"){if(t.error)return t.error;for(const e in t){if(Array.isArray(t[e]))return`${e}: ${t[e][0]}`;if(typeof t[e]=="string")return`${e}: ${t[e]}`}if(t.slug)return t.slug}return"Unknown error"}_statusHandler(t){const e=/20[0-6]/g;return new Promise((r,s)=>{if(e.test(`${t.status}`))return r(t);const u={message:this._normalizeErrorMessage(t.data),status:t.status,response:t};s(u)})}},wt=Bt;const st="SB-Agent",M={defaultAgentName:"SB-JS-CLIENT",defaultAgentVersion:"SB-Agent-Version",packageVersion:"7.0.0"},Rt={PUBLISHED:"published"};let $={};const R={};var St=class{constructor(t,e){E(this,"client");E(this,"maxRetries");E(this,"retriesDelay");E(this,"throttle");E(this,"accessToken");E(this,"cache");E(this,"resolveCounter");E(this,"relations");E(this,"links");E(this,"version");E(this,"richTextResolver");E(this,"resolveNestedRelations");E(this,"stringifiedStoriesCache");E(this,"inlineAssets");let r=t.endpoint||e;if(!r){const i=t.https===!1?"http":"https";t.oauthToken?r=`${i}://${et(t.region)}/v1`:r=`${i}://${et(t.region)}/v2`}const s=new Headers;s.set("Content-Type","application/json"),s.set("Accept","application/json"),t.headers&&(t.headers.constructor.name==="Headers"?t.headers.entries().toArray():Object.entries(t.headers)).forEach(([o,n])=>{s.set(o,n)}),s.has(st)||(s.set(st,M.defaultAgentName),s.set(M.defaultAgentVersion,M.packageVersion));let u=5;t.oauthToken&&(s.set("Authorization",t.oauthToken),u=3),t.rateLimit&&(u=t.rateLimit),this.maxRetries=t.maxRetries||10,this.retriesDelay=300,this.throttle=gt(this.throttledRequest.bind(this),u,1e3),this.accessToken=t.accessToken||"",this.relations={},this.links={},this.cache=t.cache||{clear:"manual"},this.resolveCounter=0,this.resolveNestedRelations=t.resolveNestedRelations||!0,this.stringifiedStoriesCache={},this.version=t.version||Rt.PUBLISHED,this.inlineAssets=t.inlineAssets||!1,this.client=new wt({baseURL:r,timeout:t.timeout||0,headers:s,responseInterceptor:t.responseInterceptor,fetch:t.fetch})}parseParams(t){return t.token||(t.token=this.getToken()),t.cv||(t.cv=R[t.token]),Array.isArray(t.resolve_relations)&&(t.resolve_relations=t.resolve_relations.join(",")),typeof t.resolve_relations<"u"&&(t.resolve_level=2),t}factoryParamOptions(t,e){return tt(t)?this.parseParams(e):e}makeRequest(t,e,r,s,u){const i=this.factoryParamOptions(t,bt(e,r,s));return this.cacheResponse(t,i,void 0,u)}get(t,e={},r){e||(e={});const s=`/${t}`;tt(s)&&(e.version=e.version||this.version);const u=this.factoryParamOptions(s,e);return this.cacheResponse(s,u,void 0,r)}async getAll(t,e={},r,s){const u=(e==null?void 0:e.per_page)||25,i=`/${t}`.replace(/\/$/,""),o=r??i.substring(i.lastIndexOf("/")+1);e.version=e.version||this.version;const n=1,a=await this.makeRequest(i,e,u,n,s),c=a.total?Math.ceil(a.total/(a.perPage||u)):1,h=await xt(vt(n,c),D=>this.makeRequest(i,e,u,D+1,s));return _t([a,...h],D=>Object.values(D.data[o]))}post(t,e={},r){const s=`/${t}`;return this.throttle("post",s,e,r)}put(t,e={},r){const s=`/${t}`;return this.throttle("put",s,e,r)}delete(t,e={},r){e||(e={});const s=`/${t}`;return this.throttle("delete",s,e,r)}getStories(t={},e){return this._addResolveLevel(t),this.get("cdn/stories",t,e)}getStory(t,e={},r){return this._addResolveLevel(e),this.get(`cdn/stories/${t}`,e,r)}getToken(){return this.accessToken}ejectInterceptor(){this.client.eject()}_addResolveLevel(t){typeof t.resolve_relations<"u"&&(t.resolve_level=2)}_cleanCopy(t){return JSON.parse(JSON.stringify(t))}_insertLinks(t,e,r){const s=t[e];s&&s.fieldtype==="multilink"&&s.linktype==="story"&&typeof s.id=="string"&&this.links[r][s.id]?s.story=this._cleanCopy(this.links[r][s.id]):s&&s.linktype==="story"&&typeof s.uuid=="string"&&this.links[r][s.uuid]&&(s.story=this._cleanCopy(this.links[r][s.uuid]))}getStoryReference(t,e){return this.relations[t][e]?JSON.parse(this.stringifiedStoriesCache[e]||JSON.stringify(this.relations[t][e])):e}_resolveField(t,e,r){const s=t[e];typeof s=="string"?t[e]=this.getStoryReference(r,s):Array.isArray(s)&&(t[e]=s.map(u=>this.getStoryReference(r,u)).filter(Boolean))}_insertRelations(t,e,r,s){if(Array.isArray(r)?r.find(o=>o.endsWith(`.${e}`)):r.endsWith(`.${e}`)){this._resolveField(t,e,s);return}const i=t.component?`${t.component}.${e}`:e;(Array.isArray(r)?r.includes(i):r===i)&&this._resolveField(t,e,s)}iterateTree(t,e,r){const s=(u,i="")=>{if(!(!u||u._stopResolving)){if(Array.isArray(u))u.forEach((o,n)=>s(o,`${i}[${n}]`));else if(typeof u=="object")for(const o in u){const n=i?`${i}.${o}`:o;(u.component&&u._uid||u.type==="link")&&(this._insertRelations(u,o,e,r),this._insertLinks(u,o,r)),s(u[o],n)}}};s(t.content)}async resolveLinks(t,e,r){let s=[];if(t.link_uuids){const u=t.link_uuids.length,i=[],o=50;for(let n=0;n<u;n+=o){const a=Math.min(u,n+o);i.push(t.link_uuids.slice(n,a))}for(let n=0;n<i.length;n++)(await this.getStories({per_page:o,language:e.language,version:e.version,starts_with:e.starts_with,by_uuids:i[n].join(",")})).data.stories.forEach(c=>{s.push(c)})}else s=t.links;s.forEach(u=>{this.links[r][u.uuid]={...u,_stopResolving:!0}})}async resolveRelations(t,e,r){let s=[];if(t.rel_uuids){const u=t.rel_uuids.length,i=[],o=50;for(let n=0;n<u;n+=o){const a=Math.min(u,n+o);i.push(t.rel_uuids.slice(n,a))}for(let n=0;n<i.length;n++)(await this.getStories({per_page:o,language:e.language,version:e.version,starts_with:e.starts_with,by_uuids:i[n].join(","),excluding_fields:e.excluding_fields})).data.stories.forEach(c=>{s.push(c)});s.length>0&&(t.rels=s,delete t.rel_uuids)}else s=t.rels;s&&s.length>0&&s.forEach(u=>{this.relations[r][u.uuid]={...u,_stopResolving:!0}})}async resolveStories(t,e,r){var u,i;let s=[];if(this.links[r]={},this.relations[r]={},typeof e.resolve_relations<"u"&&e.resolve_relations.length>0&&(typeof e.resolve_relations=="string"&&(s=e.resolve_relations.split(",")),await this.resolveRelations(t,e,r)),e.resolve_links&&["1","story","url","link"].includes(e.resolve_links)&&((u=t.links)!=null&&u.length||(i=t.link_uuids)!=null&&i.length)&&await this.resolveLinks(t,e,r),this.resolveNestedRelations)for(const o in this.relations[r])this.iterateTree(this.relations[r][o],s,r);t.story?this.iterateTree(t.story,s,r):t.stories.forEach(o=>{this.iterateTree(o,s,r)}),this.stringifiedStoriesCache={},delete this.links[r],delete this.relations[r]}async cacheResponse(t,e,r,s){const u=H({url:t,params:e}),i=this.cacheProvider();if(e.version==="published"&&t!=="/cdn/spaces/me"){const o=await i.get(u);if(o)return Promise.resolve(o)}return new Promise(async(o,n)=>{var a;try{const c=await this.throttle("get",t,e,s);if(c.status!==200)return n(c);let h={data:c.data,headers:c.headers};if((a=c.headers)!=null&&a["per-page"]&&(h=Object.assign({},h,{perPage:c.headers["per-page"]?Number.parseInt(c.headers["per-page"]):0,total:c.headers["per-page"]?Number.parseInt(c.headers.total):0})),h.data.story||h.data.stories){const b=this.resolveCounter=++this.resolveCounter%1e3;await this.resolveStories(h.data,e,`${b}`),h=await this.processInlineAssets(h)}e.version==="published"&&t!=="/cdn/spaces/me"&&await i.set(u,h);const D=this.cache.clear==="onpreview"&&e.version==="draft"||this.cache.clear==="auto";return e.token&&h.data.cv&&(D&&R[e.token]&&R[e.token]!==h.data.cv&&await this.flushCache(),R[e.token]=h.data.cv),o(h)}catch(c){if(c.response&&c.status===429&&(r=typeof r>"u"?0:r+1,r<this.maxRetries))return console.log(`Hit rate limit. Retrying in ${this.retriesDelay/1e3} seconds.`),await kt(this.retriesDelay),this.cacheResponse(t,e,r).then(o).catch(n);n(c)}})}throttledRequest(t,e,r,s){return this.client.setFetchOptions(s),this.client[t](e,r)}cacheVersions(){return R}cacheVersion(){return R[this.accessToken]}setCacheVersion(t){this.accessToken&&(R[this.accessToken]=t)}clearCacheVersion(){this.accessToken&&(R[this.accessToken]=0)}cacheProvider(){switch(this.cache.type){case"memory":return{get(t){return Promise.resolve($[t])},getAll(){return Promise.resolve($)},set(t,e){return $[t]=e,Promise.resolve(void 0)},flush(){return $={},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.clearCacheVersion(),this}async processInlineAssets(t){if(!this.inlineAssets)return t;const e=r=>{if(!r||typeof r!="object")return r;if(Array.isArray(r))return r.map(u=>e(u));let s={...r};s.fieldtype==="asset"&&Array.isArray(t.data.assets)&&(s={...s,...t.data.assets.find(u=>u.id===s.id)});for(const u in s)typeof s[u]=="object"&&(s[u]=e(s[u]));return s};return t.data.story&&(t.data.story.content=e(t.data.story.content)),t.data.stories&&(t.data.stories=t.data.stories.map(r=>(r.content=e(r.content),r))),t}},Tt=St;const Lt=(t={})=>{const{apiOptions:e}=t;if(!e||!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 Tt(e)}},Pt=t=>{if(typeof t!="object"||typeof t._editable>"u")return{};try{const e=JSON.parse(t._editable.replace(/^<!--#storyblok#/,"").replace(/-->$/,""));return e?{"data-blok-c":JSON.stringify(e),"data-blok-uid":`${e.id}-${e.uid}`}:{}}catch{return{}}};let U="https://app.storyblok.com/f/storyblok-v2-latest.js";const rt=(t,e,r={})=>{var n;const u=!(typeof window>"u")&&typeof window.storyblokRegisterEvent<"u",i=new URL((n=window.location)==null?void 0:n.href).searchParams.get("_storyblok"),o=i!==null&&+i===t;if(!(!u||!o)){if(!t){console.warn("Story ID is not defined. Please provide a valid ID.");return}window.storyblokRegisterEvent(()=>{new window.StoryblokBridge(r).on(["input","published","change"],c=>{var h;c&&(c.action==="input"&&((h=c.story)==null?void 0:h.id)===t?e(c.story):(c.action==="change"||c.action==="published")&&c.storyId===t&&window.location.reload())})})}},Ot=(t={})=>{var h,D;const{bridge:e,accessToken:r,use:s=[],apiOptions:u={},bridgeUrl:i}=t;u.accessToken=u.accessToken||r;const o={bridge:e,apiOptions:u};let n={};s.forEach(b=>{n={...n,...b(o)}}),i&&(U=i);const c=!(typeof window>"u")&&((D=(h=window.location)==null?void 0:h.search)==null?void 0:D.includes("_storyblok_tk"));return e!==!1&&c&&Q(U),n};function It(t,e){return W(e).render(t)}const Nt=()=>Q(U);p.BlockTypes=g,p.MarkTypes=_,p.TextTypes=K,p.apiPlugin=Lt,p.loadStoryblokBridge=Nt,p.registerStoryblokBridge=rt,p.renderRichText=It,p.richTextResolver=W,p.storyblokEditable=Pt,p.storyblokInit=Ot,p.useStoryblokBridge=rt,Object.defineProperty(p,Symbol.toStringTag,{value:"Module"})});
|
7
|
+
(function(m,b){typeof exports=="object"&&typeof module<"u"?b(exports):typeof define=="function"&&define.amd?define(["exports"],b):(m=typeof globalThis<"u"?globalThis:m||self,b(m.storyblok={}))})(this,function(m){"use strict";var Ce=Object.defineProperty;var Pe=(m,b,w)=>b in m?Ce(m,b,{enumerable:!0,configurable:!0,writable:!0,value:w}):m[b]=w;var p=(m,b,w)=>Pe(m,typeof b!="symbol"?b+"":b,w);let b=function(e){return e.DOCUMENT="doc",e.HEADING="heading",e.PARAGRAPH="paragraph",e.QUOTE="blockquote",e.OL_LIST="ordered_list",e.UL_LIST="bullet_list",e.LIST_ITEM="list_item",e.CODE_BLOCK="code_block",e.HR="horizontal_rule",e.BR="hard_break",e.IMAGE="image",e.EMOJI="emoji",e.COMPONENT="blok",e.TABLE="table",e.TABLE_ROW="tableRow",e.TABLE_CELL="tableCell",e.TABLE_HEADER="tableHeader",e}({}),w=function(e){return e.BOLD="bold",e.STRONG="strong",e.STRIKE="strike",e.UNDERLINE="underline",e.ITALIC="italic",e.CODE="code",e.LINK="link",e.ANCHOR="anchor",e.STYLED="styled",e.SUPERSCRIPT="superscript",e.SUBSCRIPT="subscript",e.TEXT_STYLE="textStyle",e.HIGHLIGHT="highlight",e}({}),U=function(e){return e.TEXT="text",e}({}),O=function(e){return e.URL="url",e.STORY="story",e.ASSET="asset",e.EMAIL="email",e}({});const X=["area","base","br","col","embed","hr","img","input","link","meta","param","source","track","wbr"],Q=(e={})=>Object.keys(e).map(t=>`${t}="${e[t]}"`).join(" "),Z=(e={})=>Object.keys(e).map(t=>`${t}: ${e[t]}`).join("; ");function ee(e){return e.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")}const C=e=>Object.fromEntries(Object.entries(e).filter(([t,s])=>s!==void 0));function te(e,t){if(!t)return{src:e,attrs:{}};let s=0,r=0;const i={},n=[];function a(u,c,f,g,A){typeof u!="number"||u<=c||u>=f?console.warn(`[StoryblokRichText] - ${g.charAt(0).toUpperCase()+g.slice(1)} value must be a number between ${c} and ${f} (inclusive)`):A.push(`${g}(${u})`)}if(typeof t=="object"){if(typeof t.width=="number"&&t.width>0?(i.width=t.width,s=t.width):console.warn("[StoryblokRichText] - Width value must be a number greater than 0"),t.height&&typeof t.height=="number"&&t.height>0?(i.height=t.height,r=t.height):console.warn("[StoryblokRichText] - Height value must be a number greater than 0"),t.loading&&["lazy","eager"].includes(t.loading)&&(i.loading=t.loading),t.class&&(i.class=t.class),t.filters){const{filters:u}=t||{},{blur:c,brightness:f,fill:g,format:A,grayscale:E,quality:L,rotate:I}=u||{};c&&a(c,0,100,"blur",n),L&&a(L,0,100,"quality",n),f&&a(f,0,100,"brightness",n),g&&n.push(`fill(${g})`),E&&n.push("grayscale()"),I&&[0,90,180,270].includes(t.filters.rotate||0)&&n.push(`rotate(${I})`),A&&["webp","png","jpeg"].includes(A)&&n.push(`format(${A})`)}t.srcset&&(i.srcset=t.srcset.map(u=>{if(typeof u=="number")return`${e}/m/${u}x0/${n.length>0?`filters:${n.join(":")}`:""} ${u}w`;if(Array.isArray(u)&&u.length===2){const[c,f]=u;return`${e}/m/${c}x${f}/${n.length>0?`filters:${n.join(":")}`:""} ${c}w`}else{console.warn("[StoryblokRichText] - srcset entry must be a number or a tuple of two numbers");return}}).join(", ")),t.sizes&&(i.sizes=t.sizes.join(", "))}let l=`${e}/m/`;return s>0&&r>0&&(l=`${l}${s}x${r}/`),n.length>0&&(l=`${l}filters:${n.join(":")}`),{src:l,attrs:i}}function B(e,t={},s){const r=Q(t),i=r?`${e} ${r}`:e,n=Array.isArray(s)?s.join(""):s||"";if(e){if(X.includes(e))return`<${i}>`}else return n;return`<${i}>${n}</${e}>`}function F(e={}){const t=new Map,{renderFn:s=B,textFn:r=ee,resolvers:i={},optimizeImages:n=!1,keyedResolvers:a=!1}=e,l=s!==B,u=o=>(d,h)=>{const y=d.attrs||{};return h.render(o,y,d.children||null)},c=(o,d)=>{const{src:h,alt:y,title:v,srcset:R,sizes:k}=o.attrs||{};let _=h,S={};if(n){const{src:Le,attrs:Oe}=te(h,n);_=Le,S=Oe}const Te={src:_,alt:y,title:v,srcset:R,sizes:k,...S};return d.render("img",C(Te))},f=(o,d)=>{const{level:h,...y}=o.attrs||{};return d.render(`h${h}`,y,o.children)},g=(o,d)=>{var y,v,R,k;const h=d.render("img",{src:(y=o.attrs)==null?void 0:y.fallbackImage,alt:(v=o.attrs)==null?void 0:v.alt,style:"width: 1.25em; height: 1.25em; vertical-align: text-top",draggable:"false",loading:"lazy"});return d.render("span",{"data-type":"emoji","data-name":(R=o.attrs)==null?void 0:R.name,"data-emoji":(k=o.attrs)==null?void 0:k.emoji},h)},A=(o,d)=>d.render("pre",o.attrs||{},d.render("code",{},o.children||"")),E=(o,d=!1)=>({text:h,attrs:y},v)=>{const{class:R,id:k,..._}=y||{},S=d?{class:R,id:k,style:Z(_)||void 0}:y||{};return v.render(o,C(S),h)},L=o=>x(o),I=o=>{const{marks:d,...h}=o;if("text"in o){if(d)return d.reduce((v,R)=>L({...R,text:v}),L({...h,children:h.children}));const y=o.attrs||{};if(a){const v=t.get("txt")||0;t.set("txt",v+1),y.key=`txt-${v}`}return r(h.text,y)}return""},K=(o,d)=>{const{linktype:h,href:y,anchor:v,...R}=o.attrs||{};let k="";switch(h){case O.ASSET:case O.URL:k=y;break;case O.EMAIL:k=`mailto:${y}`;break;case O.STORY:k=y,v&&(k=`${k}#${v}`);break;default:k=y;break}const _={...R};return k&&(_.href=k),d.render("a",_,o.text)},ke=(o,d)=>{var h,y;return console.warn("[StoryblokRichtText] - BLOK resolver is not available for vanilla usage"),d.render("span",{blok:(h=o==null?void 0:o.attrs)==null?void 0:h.body[0],id:(y=o.attrs)==null?void 0:y.id,style:"display: none"})},we=(o,d)=>{const h={},y=d.render("tbody",{},o.children);return d.render("table",h,y)},_e=(o,d)=>{const h={};return d.render("tr",h,o.children)},Se=(o,d)=>{const{colspan:h,rowspan:y,colwidth:v,backgroundColor:R,...k}=o.attrs||{},_={...k};h>1&&(_.colspan=h),y>1&&(_.rowspan=y);const S=[];return v&&S.push(`width: ${v}px;`),R&&S.push(`background-color: ${R};`),S.length>0&&(_.style=S.join(" ")),d.render("td",C(_),o.children)},Ee=(o,d)=>{const{colspan:h,rowspan:y,colwidth:v,backgroundColor:R,...k}=o.attrs||{},_={...k};h>1&&(_.colspan=h),y>1&&(_.rowspan=y);const S=[];return v&&S.push(`width: ${v}px;`),R&&S.push(`background-color: ${R};`),S.length>0&&(_.style=S.join(" ")),d.render("th",C(_),o.children)},Y=new Map([[b.DOCUMENT,u("")],[b.HEADING,f],[b.PARAGRAPH,u("p")],[b.UL_LIST,u("ul")],[b.OL_LIST,u("ol")],[b.LIST_ITEM,u("li")],[b.IMAGE,c],[b.EMOJI,g],[b.CODE_BLOCK,A],[b.HR,u("hr")],[b.BR,u("br")],[b.QUOTE,u("blockquote")],[b.COMPONENT,ke],[U.TEXT,I],[w.LINK,K],[w.ANCHOR,K],[w.STYLED,E("span",!0)],[w.BOLD,E("strong")],[w.TEXT_STYLE,E("span",!0)],[w.ITALIC,E("em")],[w.UNDERLINE,E("u")],[w.STRIKE,E("s")],[w.CODE,E("code")],[w.SUPERSCRIPT,E("sup")],[w.SUBSCRIPT,E("sub")],[w.HIGHLIGHT,E("mark")],[b.TABLE,we],[b.TABLE_ROW,_e],[b.TABLE_CELL,Se],[b.TABLE_HEADER,Ee]]),W=new Map([...Y,...Object.entries(i).map(([o,d])=>[o,d])]),Ae=()=>({render:(h,y={},v)=>{if(a&&h){const R=t.get(h)||0;t.set(h,R+1),y.key=`${h}-${R}`}return s(h,y,v)},originalResolvers:Y,mergedResolvers:W});function N(o){const d=W.get(o.type);if(!d)return console.error("<Storyblok>",`No resolver found for node type ${o.type}`),"";const h=Ae();if(o.type==="text")return d(o,h);const y=o.content?o.content.map(x):void 0;return d({...o,children:y},h)}function x(o){return o.type==="doc"?l?o.content.map(N):o.content.map(N).join(""):Array.isArray(o)?o.map(N):N(o)}return{render:x}}let z=!1;const G=[],M=e=>new Promise((t,s)=>{if(typeof window>"u"){s(new Error("Cannot load Storyblok bridge: window is undefined (server-side environment)"));return}if(window.storyblokRegisterEvent=i=>{if(!window.location.search.includes("_storyblok")){console.warn("You are not in Draft Mode or in the Visual Editor.");return}z?i():G.push(i)},document.getElementById("storyblok-javascript-bridge")){t(void 0);return}const r=document.createElement("script");r.async=!0,r.src=e,r.id="storyblok-javascript-bridge",r.onerror=i=>s(i),r.onload=i=>{G.forEach(n=>n()),z=!0,t(i)},document.getElementsByTagName("head")[0].appendChild(r)});var re=class extends Error{constructor(e){super(e),this.name="AbortError"}};function se(e,t,s){if(!Number.isFinite(t))throw new TypeError("Expected `limit` to be a finite number");if(!Number.isFinite(s))throw new TypeError("Expected `interval` to be a finite number");const r=[];let i=[],n=0,a=!1;const l=async()=>{n++;const c=r.shift();if(c)try{const g=await e(...c.args);c.resolve(g)}catch(g){c.reject(g)}const f=setTimeout(()=>{n--,r.length>0&&l(),i=i.filter(g=>g!==f)},s);i.includes(f)||i.push(f)},u=(...c)=>a?Promise.reject(new Error("Throttled function is already aborted and not accepting new promises")):new Promise((f,g)=>{r.push({resolve:f,reject:g,args:c}),n<t&&l()});return u.abort=()=>{a=!0,i.forEach(clearTimeout),i=[],r.forEach(c=>c.reject(()=>new re("Throttle function aborted"))),r.length=0},u}var ie=se;const q=(e="")=>e.includes("/cdn/"),ne=(e,t=25,s=1)=>({...e,per_page:t,page:s}),oe=e=>new Promise(t=>setTimeout(t,e)),le=(e=0,t)=>Array.from({length:e},t),ae=(e=0,t=e)=>{const s=Math.abs(t-e)||0,r=e<t?1:-1;return le(s,(i,n)=>n*r+e)},ce=async(e,t)=>Promise.all(e.map(t)),ue=(e=[],t)=>e.map(t).reduce((s,r)=>[...s,...r],[]),$=(e,t,s)=>{const r=[];for(const i in e){if(!Object.prototype.hasOwnProperty.call(e,i))continue;const n=e[i];if(n==null)continue;const a=s?"":encodeURIComponent(i);let l;typeof n=="object"?l=$(n,t?t+encodeURIComponent(`[${a}]`):a,Array.isArray(n)):l=`${t?t+encodeURIComponent(`[${a}]`):a}=${encodeURIComponent(n)}`,r.push(l)}return r.join("&")},V=e=>{const t={eu:"api.storyblok.com",us:"api-us.storyblok.com",cn:"app.storyblokchina.cn",ap:"api-ap.storyblok.com",ca:"api-ca.storyblok.com"};return t[e]??t.eu};var he=class{constructor(e){p(this,"baseURL");p(this,"timeout");p(this,"headers");p(this,"responseInterceptor");p(this,"fetch");p(this,"ejectInterceptor");p(this,"url");p(this,"parameters");p(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;e==="get"?t=`${this.baseURL}${this.url}?${$(this.parameters)}`:s=JSON.stringify(this.parameters);const r=new URL(t),i=new AbortController,{signal:n}=i;let a;this.timeout&&(a=setTimeout(()=>i.abort(),this.timeout));try{const l=await this.fetch(`${r}`,{method:e,headers:this.headers,body:s,signal:n,...this.fetchOptions});this.timeout&&clearTimeout(a);const u=await this._responseHandler(l);return this.responseInterceptor&&!this.ejectInterceptor?this._statusHandler(this.responseInterceptor(u)):this._statusHandler(u)}catch(l){return{message:l}}}setFetchOptions(e={}){Object.keys(e).length>0&&"method"in e&&delete e.method,this.fetchOptions={...e}}eject(){this.ejectInterceptor=!0}_normalizeErrorMessage(e){if(Array.isArray(e))return e[0]||"Unknown error";if(e&&typeof e=="object"){if(e.error)return e.error;for(const t in e){if(Array.isArray(e[t]))return`${t}: ${e[t][0]}`;if(typeof e[t]=="string")return`${t}: ${e[t]}`}if(e.slug)return e.slug}return"Unknown error"}_statusHandler(e){const t=/20[0-6]/g;return new Promise((s,r)=>{if(t.test(`${e.status}`))return s(e);const i={message:this._normalizeErrorMessage(e.data),status:e.status,response:e};r(i)})}},de=he;const D="SB-Agent",j={defaultAgentName:"SB-JS-CLIENT",defaultAgentVersion:"SB-Agent-Version",packageVersion:"7.0.0"},fe={PUBLISHED:"published"};let P={};const T={};var ye=class{constructor(e,t){p(this,"client");p(this,"maxRetries");p(this,"retriesDelay");p(this,"throttle");p(this,"accessToken");p(this,"cache");p(this,"resolveCounter");p(this,"relations");p(this,"links");p(this,"version");p(this,"richTextResolver");p(this,"resolveNestedRelations");p(this,"stringifiedStoriesCache");p(this,"inlineAssets");let s=e.endpoint||t;if(!s){const n=e.https===!1?"http":"https";e.oauthToken?s=`${n}://${V(e.region)}/v1`:s=`${n}://${V(e.region)}/v2`}const r=new Headers;r.set("Content-Type","application/json"),r.set("Accept","application/json"),e.headers&&(e.headers.constructor.name==="Headers"?e.headers.entries().toArray():Object.entries(e.headers)).forEach(([a,l])=>{r.set(a,l)}),r.has(D)||(r.set(D,j.defaultAgentName),r.set(j.defaultAgentVersion,j.packageVersion));let i=5;e.oauthToken&&(r.set("Authorization",e.oauthToken),i=3),e.rateLimit&&(i=e.rateLimit),this.maxRetries=e.maxRetries||10,this.retriesDelay=300,this.throttle=ie(this.throttledRequest.bind(this),i,1e3),this.accessToken=e.accessToken||"",this.relations={},this.links={},this.cache=e.cache||{clear:"manual"},this.resolveCounter=0,this.resolveNestedRelations=e.resolveNestedRelations||!0,this.stringifiedStoriesCache={},this.version=e.version||fe.PUBLISHED,this.inlineAssets=e.inlineAssets||!1,this.client=new de({baseURL:s,timeout:e.timeout||0,headers:r,responseInterceptor:e.responseInterceptor,fetch:e.fetch})}parseParams(e){return e.token||(e.token=this.getToken()),e.cv||(e.cv=T[e.token]),Array.isArray(e.resolve_relations)&&(e.resolve_relations=e.resolve_relations.join(",")),typeof e.resolve_relations<"u"&&(e.resolve_level=2),e}factoryParamOptions(e,t){return q(e)?this.parseParams(t):t}makeRequest(e,t,s,r,i){const n=this.factoryParamOptions(e,ne(t,s,r));return this.cacheResponse(e,n,void 0,i)}get(e,t={},s){t||(t={});const r=`/${e}`;q(r)&&(t.version=t.version||this.version);const i=this.factoryParamOptions(r,t);return this.cacheResponse(r,i,void 0,s)}async getAll(e,t={},s,r){const i=(t==null?void 0:t.per_page)||25,n=`/${e}`.replace(/\/$/,""),a=s??n.substring(n.lastIndexOf("/")+1);t.version=t.version||this.version;const l=1,u=await this.makeRequest(n,t,i,l,r),c=u.total?Math.ceil(u.total/(u.perPage||i)):1,f=await ce(ae(l,c),g=>this.makeRequest(n,t,i,g+1,r));return ue([u,...f],g=>Object.values(g.data[a]))}post(e,t={},s){const r=`/${e}`;return this.throttle("post",r,t,s)}put(e,t={},s){const r=`/${e}`;return this.throttle("put",r,t,s)}delete(e,t={},s){t||(t={});const r=`/${e}`;return this.throttle("delete",r,t,s)}getStories(e={},t){return this._addResolveLevel(e),this.get("cdn/stories",e,t)}getStory(e,t={},s){return this._addResolveLevel(t),this.get(`cdn/stories/${e}`,t,s)}getToken(){return this.accessToken}ejectInterceptor(){this.client.eject()}_addResolveLevel(e){typeof e.resolve_relations<"u"&&(e.resolve_level=2)}_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]?JSON.parse(this.stringifiedStoriesCache[t]||JSON.stringify(this.relations[e][t])):t}_resolveField(e,t,s){const r=e[t];typeof r=="string"?e[t]=this.getStoryReference(s,r):Array.isArray(r)&&(e[t]=r.map(i=>this.getStoryReference(s,i)).filter(Boolean))}_insertRelations(e,t,s,r){if(Array.isArray(s)?s.find(a=>a.endsWith(`.${t}`)):s.endsWith(`.${t}`)){this._resolveField(e,t,r);return}const n=e.component?`${e.component}.${t}`:t;(Array.isArray(s)?s.includes(n):s===n)&&this._resolveField(e,t,r)}iterateTree(e,t,s){const r=(i,n="")=>{if(!(!i||i._stopResolving)){if(Array.isArray(i))i.forEach((a,l)=>r(a,`${n}[${l}]`));else if(typeof i=="object")for(const a in i){const l=n?`${n}.${a}`:a;(i.component&&i._uid||i.type==="link")&&(this._insertRelations(i,a,t,s),this._insertLinks(i,a,s)),r(i[a],l)}}};r(e.content)}async resolveLinks(e,t,s){let r=[];if(e.link_uuids){const i=e.link_uuids.length,n=[],a=50;for(let l=0;l<i;l+=a){const u=Math.min(i,l+a);n.push(e.link_uuids.slice(l,u))}for(let l=0;l<n.length;l++)(await this.getStories({per_page:a,language:t.language,version:t.version,starts_with:t.starts_with,by_uuids:n[l].join(",")})).data.stories.forEach(c=>{r.push(c)})}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=[],a=50;for(let l=0;l<i;l+=a){const u=Math.min(i,l+a);n.push(e.rel_uuids.slice(l,u))}for(let l=0;l<n.length;l++)(await this.getStories({per_page:a,language:t.language,version:t.version,starts_with:t.starts_with,by_uuids:n[l].join(","),excluding_fields:t.excluding_fields})).data.stories.forEach(c=>{r.push(c)});r.length>0&&(e.rels=r,delete e.rel_uuids)}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 i,n;let r=[];if(this.links[s]={},this.relations[s]={},typeof t.resolve_relations<"u"&&t.resolve_relations.length>0&&(typeof t.resolve_relations=="string"&&(r=t.resolve_relations.split(",")),await this.resolveRelations(e,t,s)),t.resolve_links&&["1","story","url","link"].includes(t.resolve_links)&&((i=e.links)!=null&&i.length||(n=e.link_uuids)!=null&&n.length)&&await this.resolveLinks(e,t,s),this.resolveNestedRelations)for(const a in this.relations[s])this.iterateTree(this.relations[s][a],r,s);e.story?this.iterateTree(e.story,r,s):e.stories.forEach(a=>{this.iterateTree(a,r,s)}),this.stringifiedStoriesCache={},delete this.links[s],delete this.relations[s]}async cacheResponse(e,t,s,r){const i=$({url:e,params:t}),n=this.cacheProvider();if(t.version==="published"&&e!=="/cdn/spaces/me"){const a=await n.get(i);if(a)return Promise.resolve(a)}return new Promise(async(a,l)=>{var u;try{const c=await this.throttle("get",e,t,r);if(c.status!==200)return l(c);let f={data:c.data,headers:c.headers};if((u=c.headers)!=null&&u["per-page"]&&(f=Object.assign({},f,{perPage:c.headers["per-page"]?Number.parseInt(c.headers["per-page"]):0,total:c.headers["per-page"]?Number.parseInt(c.headers.total):0})),f.data.story||f.data.stories){const A=this.resolveCounter=++this.resolveCounter%1e3;await this.resolveStories(f.data,t,`${A}`),f=await this.processInlineAssets(f)}t.version==="published"&&e!=="/cdn/spaces/me"&&await n.set(i,f);const g=this.cache.clear==="onpreview"&&t.version==="draft"||this.cache.clear==="auto";return t.token&&f.data.cv&&(g&&T[t.token]&&T[t.token]!==f.data.cv&&await this.flushCache(),T[t.token]=f.data.cv),a(f)}catch(c){if(c.response&&c.status===429&&(s=typeof s>"u"?0:s+1,s<this.maxRetries))return console.log(`Hit rate limit. Retrying in ${this.retriesDelay/1e3} seconds.`),await oe(this.retriesDelay),this.cacheResponse(e,t,s).then(a).catch(l);l(c)}})}throttledRequest(e,t,s,r){return this.client.setFetchOptions(r),this.client[e](t,s)}cacheVersions(){return T}cacheVersion(){return T[this.accessToken]}setCacheVersion(e){this.accessToken&&(T[this.accessToken]=e)}clearCacheVersion(){this.accessToken&&(T[this.accessToken]=0)}cacheProvider(){switch(this.cache.type){case"memory":return{get(e){return Promise.resolve(P[e])},getAll(){return Promise.resolve(P)},set(e,t){return P[e]=t,Promise.resolve(void 0)},flush(){return P={},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.clearCacheVersion(),this}async processInlineAssets(e){if(!this.inlineAssets)return e;const t=s=>{if(!s||typeof s!="object")return s;if(Array.isArray(s))return s.map(i=>t(i));let r={...s};r.fieldtype==="asset"&&Array.isArray(e.data.assets)&&(r={...r,...e.data.assets.find(i=>i.id===r.id)});for(const i in r)typeof r[i]=="object"&&(r[i]=t(r[i]));return r};return e.data.story&&(e.data.story.content=t(e.data.story.content)),e.data.stories&&(e.data.stories=e.data.stories.map(s=>(s.content=t(s.content),s))),e}},be=ye;const ge=(e={})=>{const{apiOptions:t}=e;if(!t||!t.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 be(t)}},pe=e=>{if(typeof e!="object"||typeof e._editable>"u")return{};try{const t=JSON.parse(e._editable.replace(/^<!--#storyblok#/,"").replace(/-->$/,""));return t?{"data-blok-c":JSON.stringify(t),"data-blok-uid":`${t.id}-${t.uid}`}:{}}catch{return{}}};let H="https://app.storyblok.com/f/storyblok-v2-latest.js";const J=(e,t,s={})=>{var l;const i=!(typeof window>"u")&&typeof window.storyblokRegisterEvent<"u",n=new URL((l=window.location)==null?void 0:l.href).searchParams.get("_storyblok"),a=n!==null&&+n===e;if(!(!i||!a)){if(!e){console.warn("Story ID is not defined. Please provide a valid ID.");return}window.storyblokRegisterEvent(()=>{new window.StoryblokBridge(s).on(["input","published","change"],c=>{var f;c&&(c.action==="input"&&((f=c.story)==null?void 0:f.id)===e?t(c.story):(c.action==="change"||c.action==="published")&&c.storyId===e&&window.location.reload())})})}},me=(e={})=>{var f,g;const{bridge:t,accessToken:s,use:r=[],apiOptions:i={},bridgeUrl:n}=e;i.accessToken=i.accessToken||s;const a={bridge:t,apiOptions:i};let l={};r.forEach(A=>{l={...l,...A(a)}}),n&&(H=n);const c=!(typeof window>"u")&&((g=(f=window.location)==null?void 0:f.search)==null?void 0:g.includes("_storyblok_tk"));return t!==!1&&c&&M(H),l};function ve(e,t){return F(t).render(e)}const Re=()=>M(H);m.BlockTypes=b,m.MarkTypes=w,m.TextTypes=U,m.apiPlugin=ge,m.loadStoryblokBridge=Re,m.registerStoryblokBridge=J,m.renderRichText=ve,m.richTextResolver=F,m.storyblokEditable=pe,m.storyblokInit=me,m.useStoryblokBridge=J,Object.defineProperty(m,Symbol.toStringTag,{value:"Module"})});
|