(()=>{var i="2.0.60";function s(n){!n||Object.prototype.hasOwnProperty.call(n,"version")||Object.defineProperty(n,"version",{value:i,writable:!1,configurable:!1})}function a(n){let e=n?.activeThemeId;if(e!=null&&String(e).trim()!=="")return String(e).trim();if(window.Shopify?.theme?.id)return String(window.Shopify.theme.id);try{let t=new URLSearchParams(window.location.search),r=t.get("wl_theme_id")||t.get("preview_theme_id")||t.get("swishlist_verify_theme_id");if(r)return String(r).trim()}catch{}return""}function l(n,e){if(!Array.isArray(n)||!n.length||!e)return null;let t=n.find(r=>String(r?.themeId??r?.theme_id??"")===e);return t?.settings&&typeof t.settings=="object"&&!Array.isArray(t.settings)?t.settings:null}(()=>{if(typeof window>"u")return;let n=document.getElementById("swishlist-bootstrap-data");if(!n?.textContent)return;let e=null;try{e=JSON.parse(n.textContent)}catch{return}if(!e||typeof e!="object")return;let t=e.configuration&&typeof e.configuration=="object"?e.configuration:{debug:{}};(!t.debug||typeof t.debug!="object")&&(t.debug={}),e.appOtherInfo&&typeof e.appOtherInfo=="object"&&!Object.prototype.hasOwnProperty.call(t,"appOtherInfo")&&(Object.defineProperty(t,"appOtherInfo",{value:e.appOtherInfo,writable:!1,configurable:!1}),Object.freeze(t.appOtherInfo)),e.plan&&typeof e.plan=="object"&&!Object.prototype.hasOwnProperty.call(t,"plan")&&(Object.defineProperty(t,"plan",{value:e.plan,writable:!1,configurable:!1}),Object.freeze(t.plan));let r=a(e);r&&(t.activeThemeId=r),typeof e.numberThemesSettings=="number"&&(t.numberThemesSettings=e.numberThemesSettings);let o=e.themeSettings&&typeof e.themeSettings=="object"&&!Array.isArray(e.themeSettings)?e.themeSettings:l(e.themesSettings,r);o&&(t.themeSettings=o),s(t),window.SWishlistConfiguration=t,window.SWishlistThemesSettings=e.themesSettings??null,window.SWishlistStoreSettings=e.storeSettings??null,window.SWishlistLocalesInfo=e.localesInfo??null,window.SWishlistProductJSON=e.productJSON??null,window.SWishlistStrings=e.strings??null,typeof e.shellTemplateHtml=="string"&&e.shellTemplateHtml&&(window.SWishlistShellTemplateHtml=e.shellTemplateHtml)})();})();