(self.webpackChunkui=self.webpackChunkui||[]).push([[25],{246:t=>{(()=>{"use strict";var e={8578(t,e){e.getFromRemote=async function({contentLookupKey:t,contentObject:e,projectId:o,localRemoteCache:c,cacheTTL:r=3e3,handle:a,liveRef:i,contentCacheEndpoint:s}){const u=()=>i&&s?async function(t,{contentObjectType:e,projectId:n,liveRef:o}){const c=`${t.replace(/\/+$/,"")}/${encodeURIComponent(n)}/content-cache/preview/${encodeURIComponent(e)}/${encodeURIComponent(o)}`,r=await fetch(c,{method:"GET"});if(!r.ok)throw new Error(`LIVE content fetch failed: ${r.status}`);return r.json()}(s,{contentObjectType:e.type,projectId:o,liveRef:i}):async function(t,e){return(await fetch("https://deploys.services.outsmartly.app/content",{method:"POST",body:JSON.stringify(e),headers:{"Content-Type":"application/json"}})).json()}(0,{contentLookupKey:t,contentObjectString:JSON.stringify(e),projectId:o,handle:a,ACTION:"GET_CONTENT"}).then((t=>{if(t.success)return t.object;throw c&&delete n[l],new Error(t.error)}));if(!c)return u();const l=function(t,e,n,o){return`${e}:${t}:${null!=n?n:""}:${null!=o?o:""}`}(t,o,a,i);if(n[l])return n[l].promise;const p=u();return setTimeout((()=>{delete n[l]}),r),n[l]={promise:p},p};const n={}}},n={};function o(t){var c=n[t];if(void 0!==c)return c.exports;var r=n[t]={exports:{}};return e[t](r,r.exports,o),r.exports}var c={};(()=>{var t=c;Object.defineProperty(t,"__esModule",{value:!0}),t.setupContent=function({getFromCache:t,getFromCacheList:o,selectContentResult:c,projectId:r,featureAssignments:a,localRemoteCache:i}){const s=o?async t=>(await o([t]))[0]:t;return async function(t,o){var u;const l=Boolean(o&&t.key),p=`content_${l?`${t.type}_${o}`:t.type}`,d=`__${p}`,f=null==a?void 0:a[p];if(null==f?void 0:f.startsWith("SKA-")){const e=`__content_${t.type}_${f}`,n=await s(e);if(n){const{__meta:t,...e}=n;return e}}if(r&&(null==f?void 0:f.startsWith("LIVE-"))){const o=null!==(u=null==a?void 0:a.contentCacheEndpoint)&&void 0!==u?u:n,c=await(0,e.getFromRemote)({contentLookupKey:d,contentObject:t,projectId:r,localRemoteCache:i,liveRef:f,contentCacheEndpoint:o}),{__meta:s,...l}=c;return l}let h=null;if(r&&"true"===(null==a?void 0:a[`preview_${t.type}`])){const n="product_mf"!==t.type&&"collection_mf"!==t.type||!l?null==a?void 0:a[p]:String(o);h=await(0,e.getFromRemote)({contentLookupKey:d,contentObject:t,projectId:r,localRemoteCache:i,handle:n})}if(h||(h=await s(d)),!h)return void(i&&console.warn(`No content found for "${t.type}"`));const m=await c(t,h,p);if(!m)return m;const{__meta:y,...v}=m;return v}};const e=o(8578),n="https://canvas.outsmartly.app"})(),t.exports=c})()}}]);