(self.webpackChunkui=self.webpackChunkui||[]).push([[26],{233:t=>{(()=>{"use strict";var e={8578(t,e){e.getFromRemote=async function({contentLookupKey:t,contentObject:e,projectId:o,localRemoteCache:r,cacheTTL:c=3e3,handle:a}){const s=async()=>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 new Error(t.error)}));if(!r)return s();const i=function(t,e,n){return`${e}:${t}:${null!=n?n:""}`}(t,o,a);try{if(n[i])return await n[i].promise;const t=s();return setTimeout((()=>{delete n[i]}),c),n[i]={promise:t},await t}catch(t){throw delete n[i],t}};const n={}}},n={};function o(t){var r=n[t];if(void 0!==r)return r.exports;var c=n[t]={exports:{}};return e[t](c,c.exports,o),c.exports}var r={};(()=>{var t=r;Object.defineProperty(t,"__esModule",{value:!0}),t.setupContent=function({getFromCache:t,getFromCacheList:n,logAssignment:o,selectContentResult:r,projectId:c,featureAssignments:a,localRemoteCache:s}){const i=n?async t=>(await n([t]))[0]:t;return async function(t,n){const u=Boolean(n&&t.key),l=`content_${u?`${t.type}_${n}`:t.type}`,p=`__${l}`,f=null==a?void 0:a[l];if(null==f?void 0:f.startsWith("SKA-")){const e=`__content_${t.type}_${f}`,n=await i(e);if(n){o({featureId:l,variationId:f});const{__meta:t,...e}=n;return e}}let d=null;if(c&&"true"===(null==a?void 0:a[`preview_${t.type}`])){const o="product_mf"!==t.type&&"collection_mf"!==t.type||!u?null==a?void 0:a[l]:String(n);d=await(0,e.getFromRemote)({contentLookupKey:p,contentObject:t,projectId:c,localRemoteCache:s,handle:o})}if(d||(d=await i(p)),!d)return void(s&&console.warn(`No content found for "${t.type}"`));const y=await r(t,d,l);if(!y)return y;const{__meta:h,...m}=y;return m}};const e=o(8578)})(),t.exports=r})()}}]);