1const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./BFfbdina.js","./CH7hBqN2.js"])))=>i.map(i=>d[i]); 2import{_ as ye}from"./DBhCzhan.js";import{j as ve,d as te,au as D,m as be,r as N,b as re,a as se,av as ke,l as we,w as _e,k as Re,aw as Ae,ax as Te,ay as Ee,E as Le,p as ne,ap as $e}from"./CH7hBqN2.js";import"./C_AIf2Th.js";import"./kdoqpHnA.js";import"./8EjqdbuV.js";import"./DNGFOs8F.js";import{d as Se}from"./CFZk4HDP.js";(function(){try{var e=typeof globalThis<"u"?globalThis:typeof global<"u"?global:typeof window<"u"?window:typeof self<"u"?self:{};e["__faroGitHash_Corporate website"]="398b77a0431d58485aa32c4e66620479c825652a"}catch{}})();(function(){try{var e=typeof globalThis<"u"?globalThis:typeof global<"u"?global:typeof window<"u"?window:typeof self<"u"?self:{};e["__faroBundleId_Corporate website"]="1790088952739e4e15c68b6"}catch{}})();var Ie=Object.defineProperty,Ce=(e,t,r)=>t in e?Ie(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,g=(e,t,r)=>Ce(e,typeof t!="symbol"?t+"":t,r);let w=(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})({}),A=(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})({}),Oe=(function(e){return e.TEXT="text",e})({}),x=(function(e){return e.URL="url",e.STORY="story",e.ASSET="asset",e.EMAIL="email",e})({});const xe=["area","base","br","col","embed","hr","img","input","link","meta","param","source","track","wbr"],je=(e={})=>{const{custom:t,...r}=e,s={...r,...t};return Object.keys(s).map(n=>`${n}="${s[n]}"`).join(" ")},Pe=(e={})=>Object.keys(e).map(t=>`${t}: ${e[t]}`).join("; ");function Me(e){return e.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")}const I=e=>Object.fromEntries(Object.entries(e).filter(([t,r])=>r!==void 0));function Ne(e,t){if(!t)return{src:e,attrs:{}};let r=0,s=0;const n={},o=[];function l(c,d,v,h,b){typeof c!="number"||c<=d||c>=v?console.warn(`[StoryblokRichText] - ${h.charAt(0).toUpperCase()+h.slice(1)} value must be a number between ${d} and ${v} (inclusive)`):b.push(`${h}(${c})`)}if(typeof t=="object"){if(t.width!==void 0&&(typeof t.width=="number"&&t.width>=0?(n.width=t.width,r=t.width):console.warn("[StoryblokRichText] - Width value must be a number greater than or equal to 0")),t.height!==void 0&&(typeof t.height=="number"&&t.height>=0?(n.height=t.height,s=t.height):console.warn("[StoryblokRichText] - Height value must be a number greater than or equal to 0")),t.height===0&&t.width===0&&(delete n.width,delete n.height,console.warn("[StoryblokRichText] - Width and height values cannot both be 0")),t.loading&&["lazy","eager"].includes(t.loading)&&(n.loading=t.loading),t.class&&(n.class=t.class),t.filters){const{filters:c}=t||{},{blur:d,brightness:v,fill:h,format:b,grayscale:L,quality:R,rotate:$}=c||{};d&&l(d,0,100,"blur",o),R&&l(R,0,100,"quality",o),v&&l(v,0,100,"brightness",o),h&&o.push(`fill(${h})`),L&&o.push("grayscale()"),$&&[0,90,180,270].includes(t.filters.rotate||0)&&o.push(`rotate(${$})`),b&&["webp","png","jpeg"].includes(b)&&o.push(`format(${b})`)}t.srcset&&(n.srcset=t.srcset.map(c=>{if(typeof c=="number")return`${e}/m/${c}x0/${o.length>0?`filters:${o.join(":")}`:""} ${c}w`;if(Array.isArray(c)&&c.length===2){const[d,v]=c;return`${e}/m/${d}x${v}/${o.length>0?`filters:${o.join(":")}`:""} ${d}w`}else{console.warn("[StoryblokRichText] - srcset entry must be a number or a tuple of two numbers");return}}).join(", ")),t.sizes&&(n.sizes=t.sizes.join(", "))}let a=`${e}/m/`;return(r>0||s>0)&&(a=`${a}${r}x${s}/`),o.length>0&&(a=`${a}filters:${o.join(":")}`),{src:a,attrs:n}}function K(e,t={},r){const s=je(t),n=s?`${e} ${s}`:e,o=Array.isArray(r)?r.join(""):r||"";if(e){if(xe.includes(e))return`<${n}>`}else return o;return`<${n}>${o}</${e}>`}function oe(e={}){const t=new Map,{renderFn:r=K,textFn:s=Me,resolvers:n={},optimizeImages:o=!1,keyedResolvers:l=!1}=e,a=r!==K,c=(i={})=>
2{const{textAlign:u,class:p,id:f,style:m,...k}=i,y=[];return m&&y.push(m.endsWith(";")?m:`${m};`),u&&y.push(`text-align: ${u};`),I({...k,class:p,id:f,...y.length>0?{style:y.join(" ")}:{}})},d=i=>(u,p)=>{const f=c(u.attrs);return p.render(i,f,u.children||null)},v=(i,u)=>{const{src:p,alt:f,title:m,srcset:k,sizes:y}=i.attrs||{};let T=p,_={};if(o){const{src:me,attrs:ge}=Ne(p,o);T=me,_=ge}const S={src:T,alt:f,title:m,srcset:k,sizes:y,..._};return u.render("img",I(S))},h=(i,u)=>{const{level:p,...f}=i.attrs||{},m=c(f);return u.render(`h${p}`,m,i.children)},b=(i,u)=>{var p,f,m,k;const y=u.render("img",{src:(p=i.attrs)==null?void 0:p.fallbackImage,alt:(f=i.attrs)==null?void 0:f.alt,style:"width: 1.25em; height: 1.25em; vertical-align: text-top",draggable:"false",loading:"lazy"});return u.render("span",{"data-type":"emoji","data-name":(m=i.attrs)==null?void 0:m.name,"data-emoji":(k=i.attrs)==null?void 0:k.emoji},y)},L=(i,u)=>u.render("pre",i.attrs||{},u.render("code",{},i.children||"")),R=(i,u=!1)=>({text:p,attrs:f},m)=>{const{class:k,id:y,...T}=f||{},_=u?{class:k,id:y,style:Pe(T)||void 0}:f||{};return m.render(i,I(_),p)},$=i=>H(i),le=i=>{const{marks:u,...p}=i;if("text"in i){if(u)return u.reduce((m,k)=>$({...k,text:m}),$({...p,children:p.children}));const f=i.attrs||{};if(l){const m=t.get("txt")||0;t.set("txt",m+1),f.key=`txt-${m}`}return s(p.text,f)}return""},z=(i,u)=>{const{linktype:p,href:f,anchor:m,...k}=i.attrs||{};let y="";switch(p){case x.ASSET:case x.URL:y=f;break;case x.EMAIL:y=`mailto:${f}`;break;case x.STORY:y=f,m&&(y=`${y}#${m}`);break;default:y=f;break}const T={...k};return y&&(T.href=y),u.render("a",T,i.text)},ce=(i,u)=>{var p,f;return console.warn("[StoryblokRichtText] - BLOK resolver is not available for vanilla usage"),u.render("span",{blok:(p=i?.attrs)==null?void 0:p.body[0],id:(f=i.attrs)==null?void 0:f.id,style:"display: none"})},ue=(i,u)=>{const p=c(i.attrs),f=i.children||null;return u.render("table",p,u.render("tbody",{},f))},he=(i,u)=>{const p=c(i.attrs);return u.render("tr",p,i.children)},de=(i,u)=>{const{colspan:p,rowspan:f,colwidth:m,backgroundColor:k,textAlign:y,...T}=i.attrs||{},_=[];m&&_.push(`width: ${m}px;`),k&&_.push(`background-color: ${k};`),y&&_.push(`text-align: ${y};`);const S={...T,...p>1?{colspan:p}:{},...f>1?{rowspan:f}:{},..._.length>0?{style:_.join(" ")}:{}};return u.render("td",I(S),i.children)},pe=(i,u)=>{const{colspan:p,rowspan:f,colwidth:m,backgroundColor:k,textAlign:y,...T}=i.attrs||{},_=[];m&&_.push(`width: ${m}px;`),k&&_.push(`background-color: ${k};`),y&&_.push(`text-align: ${y};`);const S={...T,...p>1?{colspan:p}:{},...f>1?{rowspan:f}:{},..._.length>0?{style:_.join(" ")}:{}};return u.render("th",I(S),i.children)},Y=new Map([[w.DOCUMENT,d("")],[w.HEADING,h],[w.PARAGRAPH,d("p")],[w.UL_LIST,d("ul")],[w.OL_LIST,d("ol")],[w.LIST_ITEM,d("li")],[w.IMAGE,v],[w.EMOJI,b],[w.CODE_BLOCK,L],[w.HR,d("hr")],[w.BR,d("br")],[w.QUOTE,d("blockquote")],[w.COMPONENT,ce],[Oe.TEXT,le],[A.LINK,z],[A.ANCHOR,z],[A.STYLED,R("span",!0)],[A.BOLD,R("strong")],[A.TEXT_STYLE,R("span",!0)],[A.ITALIC,R("em")],[A.UNDERLINE,R("u")],[A.STRIKE,R("s")],[A.CODE,R("code")],[A.SUPERSCRIPT,R("sup")],[A.SUBSCRIPT,R("sub")],[A.HIGHLIGHT,R("mark")],[w.TABLE,ue],[w.TABLE_ROW,he],[w.TABLE_CELL,de],[w.TABLE_HEADER,pe]]),J=new Map([...Y,...Object.entries(n).map(([i,u])=>[i,u])]),fe=()=>({render:(i,u={},p)=>{if(l&&i){const f=t.get(i)||0;t.set(i,f+1),u.key=`${i}-${f}`}return r(i,u,p)},originalResolvers:Y,mergedResolvers:J});function O(i){const u=J.get(i.type);if(!u)return console.error("<Storyblok>",`No resolver found for node type ${i.type}`),"";const p=fe();if(i.type==="text")return u(i,p);const f=i.content?i.content.map(H):void 0;return u({...i,children:f},p)}function H(i){return i.type==="doc"?a?i.content.map(O):i.content.map(O).join(""):Array.isArray(i)?i.map(O):O(i)}return{render:H}}let W=!1;const X=[],He=e=>new Promise((t,r)=>{if(typeof window>"u"){r(new Error("Cannot load Storyblok bridge: window is undefined (server-side environment)"));return}if(window.storyblokRegisterEvent=n=>{if(!window.location.search.includes("_storyblok")){console.warn("You are not in Draft Mode or in the Visual Editor.");return}W?n():X.push(n)},document.getElementById("storyblok-javascript-bridge")){t(void 0);return}const s=document.createElement("script");s.async=!0,s.src=e,s.id="storyblok-javascript-bridge",s.onerror=n=>r(n),s.onload=n=>
2{X.forEach(o=>o()),W=!0,t(n)},document.getElementsByTagName("head")[0].appendChild(s)}),U=(e="")=>e.includes("/cdn/"),De=(e,t=25,r=1)=>({...e,per_page:t,page:r}),Ue=e=>new Promise(t=>setTimeout(t,e)),Be=(e=0,t)=>Array.from({length:e},t),qe=(e=0,t=e)=>{const r=Math.abs(t-e)||0,s=e<t?1:-1;return Be(r,(n,o)=>o*s+e)},Fe=async(e,t)=>Promise.all(e.map(t)),Ge=(e=[],t)=>e.map(t).reduce((r,s)=>[...r,...s],[]),V=(e,t,r)=>{const s=[];for(const n in e){if(!Object.prototype.hasOwnProperty.call(e,n))continue;const o=e[n];if(o==null)continue;const l=r?"":encodeURIComponent(n);let a;typeof o=="object"?a=V(o,t?t+encodeURIComponent(`[${l}]`):l,Array.isArray(o)):a=`${t?t+encodeURIComponent(`[${l}]`):l}=${encodeURIComponent(o)}`,s.push(a)}return s.join("&")},Q=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 Ve=class{constructor(e){g(this,"baseURL"),g(this,"timeout"),g(this,"headers"),g(this,"responseInterceptor"),g(this,"fetch"),g(this,"ejectInterceptor"),g(this,"url"),g(this,"parameters"),g(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=[],r={data:{},headers:{},status:0,statusText:""};e.status!==204&&await e.json().then(s=>{r.data=s});for(const s of e.headers.entries())t[s[0]]=s[1];return r.headers={...t},r.status=e.status,r.statusText=e.statusText,r}async _methodHandler(e){let t=`${this.baseURL}${this.url}`,r=null;e==="get"?t=`${this.baseURL}${this.url}?${V(this.parameters)}`:r=JSON.stringify(this.parameters);const s=new URL(t),n=new AbortController,{signal:o}=n;let l=null;this.timeout&&(l=setTimeout(()=>n.abort(),this.timeout));try{const a=await this.fetch(`${s}`,{method:e,headers:this.headers,body:r,signal:o,...this.fetchOptions});this.timeout&&l&&clearTimeout(l);const c=await this._responseHandler(a);return this.responseInterceptor&&!this.ejectInterceptor?this._statusHandler(this.responseInterceptor(c)):this._statusHandler(c)}catch(a){return a.name==="AbortError"?{message:"Request timeout: The request was aborted due to timeout"}:{message:a.message||a.toString()||"An unknown error occurred"}}}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((r,s)=>{if(t.test(`${e.status}`))return r(e);const n={message:this._normalizeErrorMessage(e.data),status:e.status,response:e};s(n)})}},ze=Ve;const Z="SB-Agent",B={defaultAgentName:"SB-JS-CLIENT",defaultAgentVersion:"SB-Agent-Version",packageVersion:"7.0.0"},ie={DRAFT:"draft",PUBLISHED:"published"},Ye=25,q={SMALL:25,MEDIUM:50,LARGE:75},C={SINGLE_OR_SMALL:50,MEDIUM:15,LARGE:10,VERY_LARGE:6},F=1e3,j=3;function Je(e){return e.version===ie.DRAFT}function Ke(e,t){const r=e.includes("/cdn/stories/"),s=e.split("/").length>3&&!e.endsWith("/cdn/stories"),n="find_by"in t;return r&&s||n}function We(e){return e<=q.SMALL?C.SINGLE_OR_SMALL:e<=q.MEDIUM?C.MEDIUM:e<=q.LARGE?C.LARGE:C.VERY_LARGE}function P(e,t,r={},s){if(r.userRateLimit!==void 0)return Math.min(r.userRateLimit,F);if(r.serverHeadersRateLimit!==void 0)return Math.min(r.serverHeadersRateLimit,F);if(s!==void 0)return s;if(t&&!Je(t))return F;if(Ke(e,t))return C.SINGLE_OR_SMALL;const n=t.per_page||Ye;return We(n)}function Xe(e){if(!e)return null;const t=e["x-ratelimit"]||e["X-RateLimit"],r=e["x-ratelimit-policy"]||e["X-RateLimit-Policy"];if(!t&&!r)return null;const s={};if(t){const n=t.match(/r=(\d+)/);n&&(s.remaining=Number.parseInt(n[1],10))}if(r){const n=r.match(/q=(\d+)/);n&&(s.max=Number.parseInt(n[1],10))}return Object.keys(s).length>0?s:null}function Qe(e,t=!1){return{userRateLimit:e,serverHeadersRateLimit:void 0,isManagementApi:t}}
2var Ze=class extends Error{constructor(e){super(e),this.name="AbortError"}};function et(e,t,r){if(!Number.isFinite(t))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 n=[],o=0,l=!1;const a=async()=>{o++;const d=s.shift();if(d)try{const h=await e(...d.args);d.resolve(h)}catch(h){d.reject(h)}const v=setTimeout(()=>{o--,s.length>0&&a(),n=n.filter(h=>h!==v)},r);n.includes(v)||n.push(v)},c=(...d)=>l?Promise.reject(new Error("Throttled function is already aborted and not accepting new promises")):new Promise((v,h)=>{s.push({resolve:v,reject:h,args:d}),o<t&&a()});return c.abort=()=>{l=!0,n.forEach(clearTimeout),n=[],s.forEach(d=>d.reject(()=>new Ze("Throttle function aborted"))),s.length=0},c}var tt=et,rt=class{constructor(e,t=1e3){g(this,"queues"),g(this,"interval"),g(this,"throttledRequestFn"),this.queues=new Map,this.interval=t,this.throttledRequestFn=e}getQueue(e){let t=this.queues.get(e);return t||(t=tt(this.throttledRequestFn,e,this.interval),this.queues.set(e,t)),t}execute(e,...t){return this.getQueue(e)(...t)}
2abortAll(){this.queues.forEach(e=>{var t;(t=e.abort)==null||t.call(e)}),this.queues.clear()}getQueueCount(){return this.queues.size}};let M={};const E={};var st=class{constructor(e,t){g(this,"client"),g(this,"maxRetries"),g(this,"retriesDelay"),g(this,"throttleManager"),g(this,"accessToken"),g(this,"cache"),g(this,"resolveCounter"),g(this,"relations"),g(this,"links"),g(this,"version"),g(this,"rateLimitConfig"),g(this,"richTextResolver"),g(this,"resolveNestedRelations"),g(this,"stringifiedStoriesCache"),g(this,"inlineAssets");let r=e.endpoint||t;if(!r){const n=e.https===!1?"http":"https";e.oauthToken?r=`${n}://${Q(e.region)}/v1`:r=`${n}://${Q(e.region)}/v2`}const s=new Headers;s.set("Content-Type","application/json"),s.set("Accept","application/json"),e.headers&&(e.headers.constructor.name==="Headers"?e.headers.entries().toArray():Object.entries(e.headers)).forEach(([n,o])=>{s.set(n,o)}),s.has(Z)||(s.set(Z,B.defaultAgentName),s.set(B.defaultAgentVersion,B.packageVersion)),e.oauthToken&&s.set("Authorization",e.oauthToken),this.rateLimitConfig=Qe(e.rateLimit,!!e.oauthToken),this.maxRetries=e.maxRetries||10,this.retriesDelay=300,this.throttleManager=new rt(this.throttledRequest.bind(this),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||ie.PUBLISHED,this.inlineAssets=e.inlineAssets||!1,this.client=new ze({baseURL:r,timeout:e.timeout||0,headers:s,responseInterceptor:e.responseInterceptor,fetch:e.fetch})}parseParams(e){return e.token||(e.token=this.getToken()),e.cv||(e.cv=E[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 U(e)?this.parseParams(t):t}
2makeRequest(e,t,r,s,n){const o=this.factoryParamOptions(e,De(t,r,s));return this.cacheResponse(e,o,void 0,n)}get(e,t={},r){t||(t={});const s=`/${e}`;U(s)&&(t.version=t.version||this.version);const n=this.factoryParamOptions(s,t);return this.cacheResponse(s,n,void 0,r)}async getAll(e,t={},r,s){const n=t?.per_page||25,o=`/${e}`.replace(/\/$/,""),l=r??o.substring(o.lastIndexOf("/")+1);t.version=t.version||this.version;const a=1,c=await this.makeRequest(o,t,n,a,s),d=c.total?Math.ceil(c.total/(c.perPage||n)):1,v=await Fe(qe(a,d),h=>this.makeRequest(o,t,n,h+1,s));return Ge([c,...v],h=>Object.values(h.data[l]))}post(e,t={},r){const s=`/${e}`,n=P(void 0,void 0,this.rateLimitConfig,j);return this.throttleManager.execute(n,"post",s,t,r)}put(e,t={},r){const s=`/${e}`,n=P(void 0,void 0,this.rateLimitConfig,j);return this.throttleManager.execute(n,"put",s,t,r)}delete(e,t={},r){t||(t={});const s=`/${e}`,n=P(void 0,void 0,this.rateLimitConfig,j);return this.throttleManager.execute(n,"delete",s,t,r)}getStories(e={},t){return this._addResolveLevel(e),this.get("cdn/stories",e,t)}getStory(e,t={},r){return this._addResolveLevel(t),this.get(`cdn/stories/${e}`,t,r)}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,r){const s=e[t];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(e,t){return this.relations[e][t]?JSON.parse(this.stringifiedStoriesCache[t]||JSON.stringify(this.relations[e][t])):t}_resolveField(e,t,r){const s=e[t];typeof s=="string"?e[t]=this.getStoryReference(r,s):Array.isArray(s)&&(e[t]=s.map(n=>this.getStoryReference(r,n)).filter(Boolean))}_insertRelations(e,t,r,s){if(Array.isArray(r)?r.find(o=>o.endsWith(`.${t}`)):r.endsWith(`.${t}`)){this._resolveField(e,t,s);return}const n=e.component?`${e.component}.${t}`:t;(Array.isArray(r)?r.includes(n):r===n)&&this._resolveField(e,t,s)}iterateTree(e,t,r){const s=(n,o="")=>{if(!(!n||n._stopResolving)){if(Array.isArray(n))n.forEach((l,a)=>s(l,`${o}[${a}]`));else if(typeof n=="object")for(const l in n){const a=o?`${o}.${l}`:l;(n.component&&n._uid||n.type==="link")&&(this._insertRelations(n,l,t,r),this._insertLinks(n,l,r)),s(n[l],a)}}};s(e.content)}async resolveLinks(e,t,r){let s=[];if(e.link_uuids){const n=e.link_uuids.length,o=[],l=50;for(let a=0;a<n;a+=l){const c=Math.min(n,a+l);o.push(e.link_uuids.slice(a,c))}for(let a=0;a<o.length;
2a++)(await this.getStories({per_page:l,language:t.language,version:t.version,starts_with:t.starts_with,by_uuids:o[a].join(",")})).data.stories.forEach(c=>{s.push(c)})}else s=e.links;s.forEach(n=>{this.links[r][n.uuid]={...n,_stopResolving:!0}})}async resolveRelations(e,t,r){let s=[];if(e.rel_uuids){const n=e.rel_uuids.length,o=[],l=50;for(let a=0;a<n;a+=l){const c=Math.min(n,a+l);o.push(e.rel_uuids.slice(a,c))}for(let a=0;a<o.length;a++)(await this.getStories({per_page:l,language:t.language,version:t.version,starts_with:t.starts_with,by_uuids:o[a].join(","),excluding_fields:t.excluding_fields})).data.stories.forEach(c=>{s.push(c)});s.length>0&&(e.rels=s,delete e.rel_uuids)}else s=e.rels;s&&s.length>0&&s.forEach(n=>{this.relations[r][n.uuid]={...n,_stopResolving:!0}})}async resolveStories(e,t,r){var s,n;let o=[];if(this.links[r]={},this.relations[r]={},typeof t.resolve_relations<"u"&&t.resolve_relations.length>0&&(typeof t.resolve_relations=="string"&&(o=t.resolve_relations.split(",")),await this.resolveRelations(e,t,r)),t.resolve_links&&["1","story","url","link"].includes(t.resolve_links)&&((s=e.links)!=null&&s.length||(n=e.link_uuids)!=null&&n.length)&&await this.resolveLinks(e,t,r),this.resolveNestedRelations)for(const l in this.relations[r])this.iterateTree(this.relations[r][l],o,r);e.story?this.iterateTree(e.story,o,r):e.stories.forEach(l=>{this.iterateTree(l,o,r)}),this.stringifiedStoriesCache={},delete this.links[r],delete this.relations[r]}async cacheResponse(e,t,r,s){const n=V({url:e,params:t}),o=this.cacheProvider();if(t.version==="published"&&e!=="/cdn/spaces/me"){const c=await o.get(n);if(c)return Promise.resolve(c)}const l=!U(e)&&this.rateLimitConfig.isManagementApi?j:void 0,a=P(e,t,this.rateLimitConfig,l);return new Promise(async(c,d)=>{var v;try{const h=await this.throttleManager.execute(a,"get",e,t,s);if(h.status!==200)return d(h);let b={data:h.data,headers:h.headers};const L=Xe(h.headers);if(L?.max!==void 0&&(this.rateLimitConfig.serverHeadersRateLimit=L.max),(v=h.headers)!=null&&v["per-page"]&&(b=Object.assign({},b,{perPage:h.headers["per-page"]?Number.parseInt(h.headers["per-page"]):0,total:h.headers["per-page"]?Number.parseInt(h.headers.total):0})),b.data.story||b.data.stories){const $=this.resolveCounter=++this.resolveCounter%1e3;await this.resolveStories(b.data,t,`${$}`),b=await this.processInlineAssets(b)}t.version==="published"&&e!=="/cdn/spaces/me"&&await o.set(n,b);const R=this.cache.clear==="onpreview"&&t.version==="draft"||this.cache.clear==="auto";return t.token&&b.data.cv&&(R&&E[t.token]&&E[t.token]!==b.data.cv&&await this.flushCache(),E[t.token]=b.data.cv),c(b)}catch(h){if(h.response&&h.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 Ue(this.retriesDelay),this.cacheResponse(e,t,r).then(c).catch(d);d(h)}})}throttledRequest(e,t,r,s){return this.client.setFetchOptions(s),this.client[e](t,r)}cacheVersions(){return E}cacheVersion(){return E[this.accessToken]}setCacheVersion(e){this.accessToken&&(E[this.accessToken]=e)}clearCacheVersion(){this.accessToken&&(E[this.accessToken]=0)}cacheProvider(){switch(this.cache.type){case"memory":return{get(e){return Promise.resolve(M[e])},getAll(){return Promise.resolve(M)},set(e,t){return M[e]=t,Promise.resolve(void 0)},flush(){return M={},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=r=>{if(!r||typeof r!="object")return r;if(Array.isArray(r))return r.map(n=>t(n));let s={...r};s.fieldtype==="asset"&&Array.isArray(e.data.assets)&&(s={...e.data.assets.find(n=>n.id===s.id),...s});for(const n in s)typeof s[n]=="object"&&(s[n]=t(s[n]));return s};return e.data.story&&(e.data.story.content=t(e.data.story.content)),e.data.stories&&(e.data.stories=e.data.stories.map(r=>(r.content=t(r.content),r))),e}},nt=st;
2const bt=(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 nt(t)}},ot=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 ee="https://app.storyblok.com/f/storyblok-v2-latest.js";const kt=(e,t,r={})=>{var s;const n=!(typeof window>"u")&&typeof window.storyblokRegisterEvent<"u",o=new URL((s=window.location)==null?void 0:s.href).searchParams.get("_storyblok"),l=o!==null&&+o===e;if(!(!n||!l)){if(!e){console.warn("Story ID is not defined. Please provide a valid ID.");return}window.storyblokRegisterEvent(()=>{new window.StoryblokBridge(r).on(["input","published","change"],a=>{var c;a&&(a.action==="input"&&((c=a.story)==null?void 0:c.id)===e?t(a.story):(a.action==="change"||a.action==="published")&&a.storyId===e&&window.location.reload())})})}},it=(e={})=>{var t,r;const{bridge:s,accessToken:n,use:o=[],apiOptions:l={},bridgeUrl:a}=e;l.accessToken=l.accessToken||n;const c={bridge:s,apiOptions:l};let d={};o.forEach(h=>{d={...d,...h(c)}}),a&&(ee=a);const v=!(typeof window>"u")&&((r=(t=window.location)==null?void 0:t.search)==null?void 0:r.includes("_storyblok_tk"));return s!==!1&&v&&He(ee),d};function wt(e,t){return oe(t).render(e)}const ae=te({__name:"StoryblokComponent",props:{blok:{}},setup(e,{expose:t}){var r;const s=e,n=N();t({value:n});const o=typeof D(s.blok.component)!="string",l=be("VueSDKOptions"),a=N((r=s.blok.component)==null?void 0:r.replace(/_/g,"-"));return!o&&l&&(l.enableFallbackComponent?(a.value=l.customFallbackComponent??"FallbackComponent",typeof D(a.value)=="string"&&console.error(`Is the Fallback component "${a.value}" registered properly?`)):console.error(`Component could not be found for blok "${s.blok.component}"! Is it defined in main.ts as "app.component("${s.blok.component}", ${s.blok.component});"?`)),(c,d)=>(re(),se(D(a.value),Ee({ref_key:"blokRef",ref:n},{...c.$props,...c.$attrs}),ke({_:2},[we(c.$slots,(v,h)=>({name:h,fn:_e(b=>[Re(c.$slots,h,Ae(Te(b)))])}))]),1040))}}),at=e=>{var t;const r=(t=e?.attrs)==null?void 0:t.body;return!Array.isArray(r)||r.length===0?[]:r.map(s=>{var n;return ne(ae,{blok:s,id:(n=e?.attrs)==null?void 0:n.id},e.children)})};function lt(e){const t={renderFn:ne,textFn:$e,keyedResolvers:!0,resolvers:{[w.COMPONENT]:at,...e.resolvers}};return oe(t)}const ct=te({__name:"StoryblokRichText",props:{doc:{},resolvers:{}},setup(e){const t=e,r=N(),s=()=>r.value;return Le([()=>t.doc,()=>t.resolvers],([n,o])=>{const{render:l}=lt({resolvers:o??{}});r.value=l(n)},{immediate:!0,deep:!0}),(n,o)=>(re(),se(s))}}),ut={beforeMount(e,t){if(t.value){const r=ot(t.value);Object.keys(r).length>0&&(e.setAttribute("data-blok-c",r["data-blok-c"]),e.setAttribute("data-blok-uid",r["data-blok-uid"]),e.classList.add("storyblok__outline"))}}},ht=e=>{console.error(`You can't use ${e} if you're not loading apiPlugin. Please provide it on StoryblokVue initialization. 3 `)};let G=null;const _t=()=>(G||ht("useStoryblokApi"),G),Rt={install(e,t={}){e.directive("editable",ut),e.component("StoryblokComponent",ae),e.component("StoryblokRichText",ct),t.enableFallbackComponent&&!t.customFallbackComponent&&e.component("FallbackComponent",ve(()=>ye(()=>import("./BFfbdina.js"),__vite__mapDeps([0,1]),import.meta.url)));const{storyblokApi:r}=it(t);G=r||null,e.provide("VueSDKOptions",t)}},At=Se("cache",()=>({storyblokCacheVersion:N()}));export{wt as f,Rt as g,kt as i,_t as m,bt as p,At as u};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.