@deneb-ui/cli 2.0.28 → 2.0.29

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,4 +1,4 @@
1
1
  'use strict';
2
2
 
3
- // Generated from visual editor bridge (v45).
4
- module.exports = "(function(M,L,x,R,s){const l=`${[\"MARKET\",\"PLACE\"].join(\"\")}_PREVIEW_`,p=__name(t=>`${l}${t}`,\"previousPreviewMessage\"),P=__name(t=>`__${l}${t}__`,\"previousPreviewStorageKey\"),U=\"FIVORA_PREVIEW_FOCUS_PAGE\",T=p(\"FOCUS_PAGE\"),C=\"FIVORA_PREVIEW_FOCUS_RESULT\",v=p(\"FOCUS_RESULT\"),V=\"FIVORA_PREVIEW_READY\",j=p(\"READY\"),G=\"data-fivora-preview-active-field\",m=\"data-fivora-resolved-field-path\",h=\"data-fivora-empty-editable\",A=\"data-fivora-empty-collection\",N=\"data-preview-list-path\",$=\"data-preview-item-path\",W=\"data-preview-static\",k=\"__FIVORA_UNIVERSAL_PREVIEW_FOCUS__\",z=\"__FIVORA_VISUAL_EDITOR_TARGETS__\",Q=\"__FIVORA_PREVIEW_PARENT_ORIGIN__\",qt=P(\"PARENT_ORIGIN\"),wt=\"__FIVORA_PREVIEW_SITE_DATA_CACHE__\",At=P(\"SITE_DATA_CACHE\"),f=\"__FIVORA_PREVIEW_SITE_DATA__\",_=P(\"SITE_DATA\"),S=\"FIVORA_PREVIEW_SITE_DATA\",F=p(\"SITE_DATA\"),X=\"FIVORA_PREVIEW_SITE_DATA_APPLIED\",nt=p(\"SITE_DATA_APPLIED\"),An=\"FIVORA_PREVIEW_CONTENT_PATCH\",En=p(\"CONTENT_PATCH\"),Sn=\"FIVORA_PREVIEW_STYLE_PATCH\",xn=\"DENEB_PREVIEW_STYLE_PATCH\",Tn=p(\"STYLE_PATCH\"),Cn=\"data-preview-style-target\",Ae=\"data-preview-style-type\",Ee=\"__FIVORA_STYLE_LIVE_CACHE__\",Se=\"fivora-template-color-replacements\",vn=[200],In=2500,Pn=1600,Rn=12e3,On=\"h1, h2, h3, h4, h5, h6, p, span, a, button, address, li, dt, dd, label, strong, em, small\";let Bt=[];const xe=new Map;let Te=0,Ut=!1,Et=null,Wt,Yt=[],rt=null,O=null,Ce=\"\",ve=\"\",Ie=\"\";function ut(){try{window.sessionStorage.removeItem(k)}catch{}}__name(ut,\"clearPendingFocus\");function jt(){try{return window.sessionStorage.getItem(Q)||window.sessionStorage.getItem(qt)}catch{return null}}__name(jt,\"readRememberedParentOrigin\");function zt(t){if(t)try{window.sessionStorage.setItem(Q,t)}catch{}}__name(zt,\"rememberParentOrigin\");function Pe(){for(const t of Yt)window.clearTimeout(t);Yt=[]}__name(Pe,\"clearSiteDataRelayTimers\");function Re(){const t=new Set;at&&t.add(at),t.add(window.location.origin);const e=jt();e&&t.add(e);try{if(document.referrer){const n=new URL(document.referrer).origin;n&&n!==\"null\"&&t.add(n)}}catch{}try{const n=window.location.ancestorOrigins?.item(0);n&&t.add(n)}catch{}return Array.from(t)}__name(Re,\"collectSiteDataRelayOrigins\");function St(t,e){const n=Re(),r=e?.fanOut?n:n.slice(0,1);for(const i of r)for(const o of[S,F])try{window.dispatchEvent(new MessageEvent(\"message\",{data:{type:o,siteData:t,__fivoraBridgeRelay:!0},origin:i,source:window.parent}))}catch{}}__name(St,\"relaySiteDataToTemplateRuntime\");function xt(t,e){O=t;try{window[f]=t,window[_]=t}catch{}const n=__name(()=>{rt=null;try{const r=JSON.stringify(O);window.sessionStorage.setItem(wt,r),window.sessionStorage.setItem(At,r)}catch{}},\"writeSessionCache\");if(e?.immediate){rt!==null&&(window.clearTimeout(rt),rt=null),n();return}rt!==null&&window.clearTimeout(rt),rt=window.setTimeout(n,In)}__name(xt,\"persistSiteData\");function Oe(t){const e=t&&typeof t==\"object\"&&!Array.isArray(t)?t:null,n=e?.requirements&&typeof e.requirements==\"object\"&&!Array.isArray(e.requirements)?e.requirements:null,r=e?.template&&typeof e.template==\"object\"&&!Array.isArray(e.template)?e.template:null,i=r?.structure&&typeof r.structure==\"object\"&&!Array.isArray(r.structure)?r.structure:null;try{return JSON.stringify({requiredPages:n?.requiredPages??null,pages:i?.pages??null,pageDefinitions:r?.pageDefinitions??i?.pageDefinitions??null})}catch{return String(Date.now())}}__name(Oe,\"pagesSignature\");let it=null,ot=null;function Me(t){const e=[];for(const n of t.matchAll(/([^.[\\]]+)|\\[(\\d+)\\]/g))n[2]!==void 0?e.push(Number(n[2])):n[1]&&e.push(n[1]);return e}__name(Me,\"parseFieldPath\");function Le(t,e,n){if(e.length===0)return t;const r=__name((i,o)=>{const a=e[o],c=o===e.length-1,u=c?void 0:e[o+1];if(typeof a==\"number\"){const w=(Array.isArray(i)?i:[]).slice();if(c)return w[a]=n,w;const D=w[a];return w[a]=D==null||typeof D!=\"object\"?r(typeof u==\"number\"?[]:{},o+1):r(D,o+1),w}const d={...i&&typeof i==\"object\"&&!Array.isArray(i)?i:{}};if(c)return d[a]=n,d;const b=d[a];return d[a]=b==null||typeof b!=\"object\"?r(typeof u==\"number\"?[]:{},o+1):r(b,o+1),d},\"setAt\");return r(t,0)}__name(Le,\"setValueAtPath\");function $e(){return(O&&typeof O==\"object\"&&!Array.isArray(O)?O:{}).content??{}}__name($e,\"readPublishedContent\");function Kt(t){const n={...O&&typeof O==\"object\"&&!Array.isArray(O)?O:{},content:t};O=n;try{window[f]=n,window[_]=n}catch{}return n}__name(Kt,\"writePublishedContent\");function Jt(){it!==null&&window.clearTimeout(it),it=window.setTimeout(()=>{it=null,O!=null&&St(O,{fanOut:!1})},Pn)}__name(Jt,\"scheduleContentOnlyRelay\");function Xt(){ot!==null&&window.clearTimeout(ot),ot=window.setTimeout(()=>{if(ot=null,O==null)return;const t=window;if(typeof t.requestIdleCallback==\"function\"){t.requestIdleCallback(()=>{O!=null&&xt(O,{immediate:!0})},{timeout:4e3});return}xt(O,{immediate:!0})},Rn)}__name(Xt,\"scheduleContentOnlyPersist\");function Zt(t,e){const n=Array.from(document.querySelectorAll(`[data-preview-field-path=\"${CSS.escape(t)}\"], [${m}=\"${CSS.escape(t)}\"]`));for(const r of n){if(K?.target===r)continue;if(r.tagName===\"IMG\"){typeof e==\"string\"&&e.trim()&&r.setAttribute(\"src\",e);continue}if(typeof e!=\"string\"&&typeof e!=\"number\"&&typeof e!=\"boolean\")continue;const i=(r.getAttribute(\"data-fivora-value-prefix\")??\"\")+String(e)+(r.getAttribute(\"data-fivora-value-suffix\")??\"\");if(r.childElementCount===0)r.textContent=i;else{const o=Array.from(r.childNodes).find(a=>a.nodeType===Node.TEXT_NODE&&a.textContent?.trim());o?o.textContent=i:r.textContent=i}B&&(i.trim().length===0?r.setAttribute(h,\"true\"):r.removeAttribute(h))}}__name(Zt,\"applyDomFieldValue\");function ke(t){if(!Array.isArray(t)||t.length===0)return;let e=$e();for(const n of t){if(!n||typeof n.path!=\"string\"||!n.path.trim())continue;const r=Me(n.path);r.length!==0&&(e=Le(e,r,n.value),Zt(n.path,n.value))}Kt(e),Jt(),Xt()}__name(ke,\"publishContentPatches\");const Mn={none:\"none\",sm:\"0 1px 2px 0 rgba(0, 0, 0, 0.05)\",md:\"0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1)\",lg:\"0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1)\",xl:\"0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1)\",\"2xl\":\"0 25px 50px -12px rgba(0, 0, 0, 0.25)\"};function I(t){if(t==null||t===\"\")return;if(typeof t==\"number\")return`${t}px`;const e=String(t);return/^\\d+$/.test(e)?`${e}px`:e}__name(I,\"formatStyleUnit\");function Tt(t,e){const n={},r=t.marginTop??t.spacingTop,i=t.marginBottom??t.spacingBottom,o=t.marginLeft??t.spacingLeft,a=t.marginRight??t.spacingRight,c=I(r),u=I(i),g=I(o),d=I(a);return c&&(n[`${e}-margin-top`]=c),u&&(n[`${e}-margin-bottom`]=u),g&&(n[`${e}-margin-left`]=g),d&&(n[`${e}-margin-right`]=d),n}__name(Tt,\"styleMarginVars\");function Fe(t,e){const n={};if(t===\"text\"){Object.assign(n,Tt(e,\"--deneb\")),e.fontFamily&&(n[\"--deneb-font-family\"]=String(e.fontFamily));const r=I(e.fontSize);return r&&(n[\"--deneb-font-size\"]=r),e.fontWeight!==void 0&&(n[\"--deneb-font-weight\"]=String(e.fontWeight)),e.lineHeight!==void 0&&(n[\"--deneb-line-height\"]=String(e.lineHeight)),e.letterSpacing&&(n[\"--deneb-letter-spacing\"]=String(e.letterSpacing)),e.color&&(n[\"--deneb-color\"]=String(e.color)),e.textAlign&&(n[\"--deneb-text-align\"]=String(e.textAlign)),e.textTransform&&(n[\"--deneb-text-transform\"]=String(e.textTransform)),n}if(t===\"card\"){Object.assign(n,Tt(e,\"--deneb-card\"));const r=I(e.width);r&&(n[\"--deneb-card-width\"]=r);const i=I(e.minWidth);i&&(n[\"--deneb-card-min-width\"]=i);const o=I(e.maxWidth);o&&(n[\"--deneb-card-max-width\"]=o);const a=I(e.height);a&&(n[\"--deneb-card-height\"]=a),e.aspectRatio&&(n[\"--deneb-card-aspect-ratio\"]=String(e.aspectRatio));const c=I(e.paddingTop);c&&(n[\"--deneb-card-pt\"]=c);const u=I(e.paddingBottom);u&&(n[\"--deneb-card-pb\"]=u);const g=I(e.paddingLeft);g&&(n[\"--deneb-card-pl\"]=g);const d=I(e.paddingRight);d&&(n[\"--deneb-card-pr\"]=d);const b=I(e.borderRadius);b&&(n[\"--deneb-card-radius\"]=b);const y=I(e.borderWidth);if(y&&(n[\"--deneb-card-border-w\"]=y),e.borderStyle&&(n[\"--deneb-card-border-s\"]=String(e.borderStyle)),e.borderColor&&(n[\"--deneb-card-border-c\"]=String(e.borderColor)),e.backgroundColor&&(n[\"--deneb-card-bg\"]=String(e.backgroundColor)),e.boxShadow){const D=String(e.boxShadow);n[\"--deneb-card-shadow\"]=Mn[D]??D}const w=I(e.backdropBlur);return w&&(n[\"--deneb-card-blur\"]=w),n}if(t===\"button\"){Object.assign(n,Tt(e,\"--deneb-btn\"));const r=I(e.borderRadius);r&&(n[\"--deneb-btn-radius\"]=r);const i=I(e.paddingX);i&&(n[\"--deneb-btn-px\"]=i);const o=I(e.paddingY);return o&&(n[\"--deneb-btn-py\"]=o),e.backgroundColor&&(n[\"--deneb-btn-bg\"]=String(e.backgroundColor)),e.textColor&&(n[\"--deneb-btn-color\"]=String(e.textColor)),e.borderColor&&(n[\"--deneb-btn-border-c\"]=String(e.borderColor)),e.hoverBackgroundColor&&(n[\"--deneb-btn-hover-bg\"]=String(e.hoverBackgroundColor)),e.hoverTextColor&&(n[\"--deneb-btn-hover-color\"]=String(e.hoverTextColor)),n}if(t===\"grid\"){e.columns!==void 0&&(n[\"--deneb-grid-cols\"]=String(e.columns)),e.minCardWidth&&(n[\"--deneb-grid-min-card\"]=String(e.minCardWidth));const r=I(e.gapX);r&&(n[\"--deneb-grid-gap-x\"]=r);const i=I(e.gapY);return i&&(n[\"--deneb-grid-gap-y\"]=i),e.equalHeight!==void 0&&(n[\"--deneb-grid-equal-height\"]=e.equalHeight?\"stretch\":\"start\"),n}if(t===\"section\"){const r=I(e.paddingTop);r&&(n[\"--deneb-section-pt\"]=r);const i=I(e.paddingBottom);i&&(n[\"--deneb-section-pb\"]=i);const o=I(e.paddingX);return o&&(n[\"--deneb-section-px\"]=o),e.maxWidth&&(n[\"--deneb-section-max-w\"]=String(e.maxWidth)),e.backgroundColor&&(n[\"--deneb-section-bg\"]=String(e.backgroundColor)),e.backgroundImage&&(n[\"--deneb-section-bg-image\"]=String(e.backgroundImage)),n}return n}__name(Fe,\"styleToCssVariables\");function De(){const t=window,e=t[Ee];if(e&&typeof e==\"object\"&&!Array.isArray(e))return e;const n={};return t[Ee]=n,n}__name(De,\"readStyleLiveCache\");function Ne(t,e){const n=[`[${Cn}=\"${CSS.escape(t)}\"]`,`[data-preview-field-path=\"${CSS.escape(t)}\"]`,`[${$}=\"${CSS.escape(t)}\"]`];if(e===\"card\"&&t.endsWith(\".card\")){const r=t.slice(0,-5);n.push(`[${$}=\"${CSS.escape(r)}\"]`)}for(const r of n){const i=document.querySelector(r);if(i)return i}return null}__name(Ne,\"findStyleTargetElement\");function Ve(t){const e=typeof t.targetPath==\"string\"?t.targetPath.trim():\"\";if(!e)return;const n=typeof t.styleType==\"string\"?t.styleType:\"text\",r=t.properties&&typeof t.properties==\"object\"?t.properties:{},i=Ne(e,n);if(!i)return;const o=De(),c={...o[e]??{},...r};o[e]=c;const u=Fe(n,c);for(const[g,d]of Object.entries(u))d?i.style.setProperty(g,d):i.style.removeProperty(g);i.getAttribute(Ae)||i.setAttribute(Ae,n)}__name(Ve,\"applyStylePatch\");function He(t){Kt(t),Jt(),Xt()}__name(He,\"publishContentOnly\");function Ct(t,e){if(e?.contentOnly){const n=t&&typeof t==\"object\"&&!Array.isArray(t)?t:null;He(n?.content??t);return}if(it!==null&&(window.clearTimeout(it),it=null),ot!==null&&(window.clearTimeout(ot),ot=null),Ut){Et=t,Wt=e;return}Ut=!0;try{if(xt(t,{immediate:e?.persistImmediate}),Qt(t),vt(t,{colorReplacements:e?.colorReplacements===!0}),St(t,{fanOut:e?.fanOut===!0}),e?.scheduleRelays!==!1){Pe();for(const n of vn)Yt.push(window.setTimeout(()=>{O!=null&&St(O,{fanOut:!0})},n))}}finally{if(Ut=!1,Et!=null){const n=Et,r=Wt;Et=null,Wt=void 0,window.setTimeout(()=>{Ct(n,r)},0)}}}__name(Ct,\"publishSiteData\");function Ge(t){const e=t?.full!==!1,n=\"ontouchstart\"in window||navigator.maxTouchPoints>0||navigator.hardwareConcurrency!=null&&navigator.hardwareConcurrency<=4;window.requestAnimationFrame(()=>{window.requestAnimationFrame(()=>{try{q({type:X,full:e}),q({type:nt,full:e})}catch{}const r=O;if(r==null)return;const i=__name(()=>vt(r,{colorReplacements:!0}),\"run\");if(!n){window.setTimeout(i,0);return}const o=window.requestIdleCallback;typeof o==\"function\"?o(i,{timeout:4e3}):window.setTimeout(i,1200)})})}__name(Ge,\"acknowledgeSiteDataApplied\");const Ln=(()=>{try{return window.location.ancestorOrigins?.item(0)??null}catch{return null}})(),$n=(()=>{try{return window.parent!==window?window.parent.location.origin:null}catch{return null}})();let at=M({currentOrigin:window.location.origin,referrer:document.referrer,rememberedOrigin:jt(),ancestorOrigin:Ln,accessibleParentOrigin:$n});zt(at);function qe(t){if(t.source!==window.parent)return!1;if(at)return t.origin===at;try{const e=new URL(t.origin).origin;return e===\"null\"?!1:(at=e,zt(e),!0)}catch{return!1}}__name(qe,\"isTrustedParentMessage\");function q(t){window.parent.postMessage(t,at??\"*\")}__name(q,\"postToParent\");function dt(t,e,n=0){t.requestId&&(q({type:C,requestId:t.requestId,result:e,fieldPath:t.fieldPath??null,pageRoute:t.pageRoute??null,occurrences:n}),q({type:v,requestId:t.requestId,result:e,fieldPath:t.fieldPath??null,pageRoute:t.pageRoute??null,occurrences:n}))}__name(dt,\"postFocusResult\");function gt(){try{q({type:V,pathname:window.location.pathname}),q({type:j,pathname:window.location.pathname})}catch{}}__name(gt,\"announceReady\");async function Be(t){const e=++Te,r=(t&&typeof t==\"object\"&&!Array.isArray(t)?t:null)?.colorReplacements,i=document.getElementById(Se);if(!r||typeof r!=\"object\"||Array.isArray(r)||Object.keys(r).length===0){i?.remove();return}const o=Array.from(document.querySelectorAll('link[rel=\"stylesheet\"][href]')),a=await Promise.all(o.map(async g=>{const d=g.href;let b=xe.get(d);if(b===void 0){const w=await fetch(d,{credentials:\"same-origin\"});if(!w.ok)return\"\";b=await w.text(),xe.set(d,b)}const y=x(b,r);return y===b?\"\":y}));if(e!==Te)return;const c=a.filter(Boolean).join(`\n`);if(!c){i?.remove();return}const u=i instanceof HTMLStyleElement?i:document.createElement(\"style\");u.id=Se,u.textContent=c,u.isConnected||document.head.appendChild(u)}__name(Be,\"applyTemplateColorReplacements\");function vt(t,e){const n=t&&typeof t==\"object\"&&!Array.isArray(t)?t:null,r=n?.template&&typeof n.template==\"object\"&&!Array.isArray(n.template)?n.template:null,o=(r?.structure&&typeof r.structure==\"object\"&&!Array.isArray(r.structure)?r.structure:null)?.theme,a=(()=>{try{return JSON.stringify(o??null)}catch{return String(Date.now())}})();if(a!==Ce){Ce=a;const u=L(o),g=document.getElementById(R);if(!u)g?.remove();else{const d=g instanceof HTMLStyleElement?g:document.createElement(\"style\");d.id=R,d.textContent=u,d.isConnected||document.head.appendChild(d)}}if(e?.colorReplacements){if(a===ve)return;ve=a,Be(o).catch(()=>{})}}__name(vt,\"applyUniversalTheme\");function Qt(t){const e=Oe(t);e!==Ie&&(Ie=e,s(t,document),window.setTimeout(()=>s(t,document),300))}__name(Qt,\"applySelectedPages\");function E(t){return String(t??\"\").trim().replace(/\\s+/g,\" \").toLowerCase()}__name(E,\"normalizeText\");function It(t){const e=String(t??\"\").trim();if(!e)return[];const n=e.split(/[,;|\\n\\r]+/).map(r=>E(r)).filter(r=>r.length>=3);return Array.from(new Set([E(e),...n])).filter(r=>r.length>=2)}__name(It,\"valueFragments\");function Pt(t,e){const n=E(e),r=E(t);return/image|photo|logo|banner|thumbnail|cover/.test(n)||/^(https?:|data:|blob:|\\/)/.test(r)}__name(Pt,\"isImageValue\");function Ue(t){const e=new Set,n=t.getAttribute(\"src\")||\"\";n&&e.add(n),\"src\"in t&&t.src&&e.add(t.src),\"currentSrc\"in t&&t.currentSrc&&e.add(t.currentSrc);const r=t.getAttribute(\"srcset\");r&&r.split(\",\").forEach(i=>{const o=i.trim().split(/\\s+/)[0];o&&e.add(o)});for(const i of[\"data-src\",\"data-original\",\"data-fallback\",\"data-nimg\",\"data-image\",\"data-url\"]){const o=t.getAttribute(i);o&&o!==\"1\"&&e.add(o)}if(t.style.backgroundImage){const i=t.style.backgroundImage.match(/url\\([\"']?([^\"']+)[\"']?\\)/i);i?.[1]&&e.add(i[1])}for(const i of Array.from(e))try{const a=new URL(i,window.location.href).searchParams.get(\"url\");if(a){e.add(a);try{e.add(decodeURIComponent(a))}catch{}}}catch{}return Array.from(e).filter(Boolean)}__name(Ue,\"extractImageCandidates\");function te(t,e){const n=String(e??\"\").trim();if(!n)return!1;const r=Ue(t);if(r.length===0)return!1;const o=n.split(\"?\")[0].replace(/\\\\/g,\"/\").split(\"/\").pop()?.toLowerCase();for(const a of r){if(a===n)return!0;try{if(new URL(a,window.location.href).href===new URL(n,window.location.href).href)return!0}catch{}if(a.includes(n)||n.includes(a))return!0;try{const g=decodeURIComponent(a);if(g.includes(n)||n.includes(g))return!0}catch{}const u=a.split(\"?\")[0].replace(/\\\\/g,\"/\").split(\"/\").pop()?.toLowerCase();if(u&&o&&u.length>=3&&u===o)return!0}return!1}__name(te,\"imageMatchesValue\");function ee(t,e){return Array.from(t.querySelectorAll(\"img\")).filter(n=>te(n,e))}__name(ee,\"findImageMatches\");function Rt(t,e){const n=String(e??\"\").trim();return n?[t.getAttribute(\"href\"),t.getAttribute(\"src\"),t.getAttribute(\"poster\"),t.getAttribute(\"srcset\"),t.style.backgroundImage].filter(i=>!!i).some(i=>{if(i===n||i.includes(n))return!0;try{return new URL(i,window.location.href).href===new URL(n,window.location.href).href}catch{return!1}}):!1}__name(Rt,\"attributeMatchesValue\");function Ot(t,e){return Array.from(t.querySelectorAll('a[href], img[src], source[src], video[poster], [style*=\"background-image\"]')).filter(n=>Rt(n,e))}__name(Ot,\"findAttributeMatches\");function We(t,e){const n=It(e);if(n.length===0)return[];const r=Array.from(t.querySelectorAll(On)),i=r.filter(o=>{const a=E(o.textContent);return n.some(c=>a===c)});return i.length>0?i:r.filter(o=>{const a=E(o.textContent);return n.some(c=>a.includes(c)||c.includes(a))})}__name(We,\"findTextMatches\");function Mt(t,e,n){if(Pt(e,n)){const r=ee(t,e);if(r.length>0)return r}return We(t,e)}__name(Mt,\"findValueMatches\");function Ye(t,e,n){if(Pt(e,n)&&ee(t,e).length>0)return!0;const r=E(t.textContent);return It(e).some(i=>r.includes(i))}__name(Ye,\"subtreeContainsValue\");function je(t,e){const n=t[0];if(!n)return null;let r=n;for(;r;){if(t.every(i=>r?.contains(i)))return r;if(r===e)break;r=r.parentElement}return e??n}__name(je,\"lowestCommonAncestor\");function st(t){const e=String(t??\"\").trim();if(!e)return[];const n=e.replace(/\\[(\\d+)\\]/g,\".$1\"),r=n.replace(/\\.(\\d+)(?=\\.|$)/g,\"[$1]\");return Array.from(new Set([e,n,r]))}__name(st,\"pathVariants\");function ne(t){return Array.from(new Set([t.fieldPath,...t.fieldPaths??[]].filter(e=>!!(e&&e.trim())).flatMap(e=>st(e))))}__name(ne,\"focusPathCandidates\");function pt(t){if(t.closest(\"[hidden]\"))return!1;let e=t;for(;e&&e!==document.documentElement;){const r=window.getComputedStyle(e);if(r.display===\"none\"||r.visibility===\"hidden\"||Number(r.opacity)===0||r.maxHeight===\"0px\"||r.maxHeight===\"0\")return!1;const i=e.getBoundingClientRect();if((r.overflow===\"hidden\"||r.overflow===\"clip\")&&(i.width<2||i.height<2))return!1;e=e.parentElement}const n=t.getBoundingClientRect();return n.width>=2&&n.height>=2}__name(pt,\"isVisuallyHighlightable\");function re(t){let e=0;pt(t)&&(e+=100);const n=E(t.textContent);n.length>=2&&(e+=40),t.tagName===\"IMG\"&&(e+=35),t.closest(\"main, footer, header, [data-preview-page-key]\")&&(e+=20),t.closest('.fixed, [class*=\"fixed\"]')&&n.length<2&&t.tagName!==\"IMG\"&&(e-=25);const r=t.getBoundingClientRect();return e+=Math.min(15,Math.floor(r.width*r.height/400)),e}__name(re,\"highlightTargetScore\");function ie(t){return[...t].sort((e,n)=>re(n)-re(e))}__name(ie,\"rankHighlightTargets\");function ze(t,e){const n=[],r=Array.from(new Set([t,...e??[]].filter(a=>!!a).flatMap(a=>st(a))));for(const a of r){const c=CSS.escape(a);document.querySelectorAll('[data-preview-field-path=\"'+c+'\"], [data-preview-list-path=\"'+c+'\"], [data-content-path=\"'+c+'\"]').forEach(u=>{n.includes(u)||n.push(u)})}const i=ie(n.filter(a=>pt(a))),o=i.filter(a=>!i.some(c=>c!==a&&a.contains(c)));return o.length>0?o:i}__name(ze,\"findExplicitTargets\");function oe(t){const e=(t?.itemValues??[]).filter(o=>E(o.value).length>=2&&o.key!==\"id\");if(e.length===0)return null;const n=[];for(const o of e)for(const a of Mt(document,o.value,o.key).slice(0,8))n.includes(a)||n.push(a);let r=null;for(const o of n){let a=o,c=0;for(;a&&a!==document.body&&c<12;){const u=e.reduce((b,y)=>b+(Ye(a,y.value,y.key)?1:0),0),g=a.getBoundingClientRect(),d=Math.max(1,g.width*g.height);(!r||u>r.score||u===r.score&&d<r.area)&&(r={target:a,score:u,area:d}),a=a.parentElement,c+=1}}const i=Math.min(2,e.length);return r&&r.score>=i?r.target:null}__name(oe,\"findItemContainer\");function Lt(t,e,n){const r=Mt(t,e,n);if(r.length===0)return null;const i=It(e);if(i.length>1&&!Pt(e,n)){const o=r.filter(a=>{const c=E(a.textContent);return i.slice(1).some(u=>c===u)});if(o.length>1)return je(o,t instanceof HTMLElement?t:null)}return r.sort((o,a)=>E(o.textContent).length-E(a.textContent).length)[0]}__name(Lt,\"findFieldTarget\");function $t(t,e){const n=String(t??e??\"\").trim().toLowerCase().replace(/\\s+/g,\"_\");return!n||n===\"common\"?\"home\":n===\"about\"?\"about_us\":n}__name($t,\"normalizePageKey\");function Ke(t){const e=t.replace(/_us$/,\"\"),n=['[data-preview-page-key=\"'+CSS.escape(t)+'\"]','[data-preview-page-key=\"'+CSS.escape(e)+'\"]',\"#\"+CSS.escape(t)+\"_view\",\"#\"+CSS.escape(e)+\"_view\",\"#\"+CSS.escape(t),\"#\"+CSS.escape(e),\"main\",\"body\"];for(const r of n){const i=document.querySelector(r);if(i instanceof HTMLElement)return i}return null}__name(Ke,\"findPageTarget\");function ae(t,e){const n=window.location.pathname.match(/^(\\/uploads\\/generated-sites\\/(?:template-preview|preview|live)\\/[^/]+)/),r=String(e??\"\").trim(),i=r?\"/\"+r.replace(/^\\/+|\\/+$/g,\"\"):null,o=i!==null?i===\"/\"?\"\":i:t===\"home\"?\"\":\"/\"+t.replace(/^\\/+/,\"\");return n?n[1]+o:o||\"/\"}__name(ae,\"resolvePath\");function se(){for(const t of Bt)t.target.style.outline=t.outline,t.target.style.outlineOffset=t.outlineOffset,t.target.style.boxShadow=t.boxShadow,t.target.style.transition=t.transition,t.target.style.scrollMarginTop=t.scrollMarginTop,t.target.style.borderRadius=t.borderRadius,t.target.removeAttribute(G);Bt=[]}__name(se,\"clearHighlight\");function kt(t,e){se(),Bt=t.map(n=>({target:n,outline:n.style.outline,outlineOffset:n.style.outlineOffset,boxShadow:n.style.boxShadow,transition:n.style.transition,scrollMarginTop:n.style.scrollMarginTop,borderRadius:n.style.borderRadius}));for(const n of t)n.setAttribute(G,\"true\"),n.style.scrollMarginTop=\"72px\",n.style.transition=\"outline-color 0.2s ease, box-shadow 0.2s ease\",n.style.outline=\"2px solid rgba(34, 197, 94, 0.98)\",n.style.outlineOffset=\"4px\",n.style.boxShadow=\"0 0 0 7px rgba(34, 197, 94, 0.2)\",n.style.borderRadius||(n.style.borderRadius=\"4px\");t[0]?.scrollIntoView({behavior:\"smooth\",block:e?\"start\":\"center\",inline:\"nearest\"})}__name(kt,\"highlightTargets\");function Je(t,e){kt([t],e)}__name(Je,\"highlight\");function Ft(t){return Array.from(new Set([t.fieldValue,...t.fieldMatchValues??[]].filter(e=>typeof e==\"boolean\"||typeof e==\"number\"||typeof e==\"string\"&&e.trim().length>0).map(e=>String(e))))}__name(Ft,\"focusMatchValues\");function Xe(t){const e=ne(t);if(e.length===0)return null;try{const n=JSON.parse(window.sessionStorage.getItem(z)??\"{}\");for(const r of e){const i=n[`${window.location.pathname}|${r}`];if(!i)continue;const o=document.querySelector(i);if(!o)continue;const a=Ft(t).map(E),c=E(o.textContent);if(!(a.length>0&&c&&!a.some(u=>c===u||c.includes(u)||Rt(o,u))))return o}return null}catch{return null}}__name(Xe,\"findRememberedFocusTarget\");function ht(t){if(!t)return null;if(pt(t))return t;let e=t.parentElement;for(;e&&e!==document.body;){if(pt(e))return e;e=e.parentElement}return null}__name(ht,\"pickVisibleHeuristicTarget\");function ce(t){const e=ne(t),n=ze(t.fieldPath,e.filter(a=>a!==t.fieldPath));if(n.length>0)return{targets:n,result:\"exact\"};const r=ht(Xe(t));if(r)return{targets:[r],result:\"heuristic\"};const i=oe(t.fieldContext),o=t.fieldContext?.fieldKey;if(i){for(const c of Ft(t)){const u=ht(Ot(i,c)[0]??Lt(i,c,o));if(u)return{targets:[u],result:\"heuristic\"}}const a=ht(i);if(a)return{targets:[a],result:\"heuristic\"}}for(const a of Ft(t)){const c=Ot(document,a),u=Lt(document,a,o),g=u?[...c,u]:c,d=ie(g.map(b=>ht(b)).filter(b=>!!b));if(d.length>0)return{targets:[d[0]],result:\"heuristic\"}}return null}__name(ce,\"resolveFieldTarget\");function le(){document.documentElement.dataset.fivoraPreview=\"true\",document.querySelectorAll(\".reveal-on-scroll:not(.reveal-active)\").forEach(t=>t.classList.add(\"reveal-active\"))}__name(le,\"activateRevealNodes\");function ct(t,e=0){le();const n=!!t.fieldPath;if(t.focusOnly&&n){const a=ce(t);if(a){kt(a.targets,!1),dt(t,a.result,a.targets.length);return}if(e<12){window.setTimeout(()=>ct(t,e+1),120);return}dt(t,\"missing\");return}const r=$t(t.pageKey,t.pageLabel),i=Ke(r);if(!i){e<12?window.setTimeout(()=>ct(t,e+1),120):dt(t,\"missing\");return}const o=n?ce(t):null;if(n&&!o&&e<12){window.setTimeout(()=>ct(t,e+1),120);return}o?(kt(o.targets,!1),dt(t,o.result,o.targets.length)):(Je(i,!0),dt(t,\"page\",1))}__name(ct,\"applyFocus\");function Ze(t){if(t.focusOnly){ut(),window.setTimeout(()=>ct(t),80);return}const e=$t(t.pageKey,t.pageLabel),n=ae(e,t.pageRoute);if((window.location.pathname.replace(/\\/+$/,\"\")||\"/\")!==n){try{window.sessionStorage.setItem(k,JSON.stringify({...t,awaitingNavigation:!0}))}catch{}window.location.assign(n);return}ut(),window.setTimeout(()=>ct(t),80)}__name(Ze,\"handleFocus\");function ue(t){return E(t).replace(/\\.html$/i,\"\").replace(/[^a-z0-9]+/g,\"-\")}__name(ue,\"normalizeRouteToken\");function Qe(){const t=window.location.pathname.split(\"/\").map(o=>decodeURIComponent(o).trim()).filter(Boolean);if(t.length<2||H.length===0)return;const e=H.filter(o=>{const a=o.context;if(!a?.collectionPath||!a.fieldKey)return!1;const c=a.collectionPath.split(\".\").at(-1)??\"\",u=t.lastIndexOf(c);if(u<0||u>=t.length-1)return!1;const g=ue(t.at(-1)??\"\");return a.itemValues.some(({key:d,value:b})=>{const y=E(d).replace(/[^a-z0-9]/g,\"\");return y!==\"id\"&&!y.endsWith(\"id\")&&y!==\"slug\"&&y!==\"name\"&&y!==\"title\"?!1:ue(b)===g})});if(e.length===0)return;const n=Array.from(document.querySelectorAll(`[${W}]`)),r=[];for(const o of e){const a=o.context,c=a.fieldKey,u=E(c).replace(/[^a-z0-9]/g,\"\");if(u===\"slug\"||u===\"identifier\"||u.endsWith(\"id\"))continue;const g=a.collectionPath.split(\".\").at(-1)??\"\",d=E(g).replace(/s$/,\"\"),b=c.replace(/([a-z0-9])([A-Z])/g,\"$1 $2\").split(/[^a-z0-9]+/i).map(E).filter(w=>w&&![\"url\",\"text\",\"value\"].includes(w)),y=E(o.value);for(const w of n){const D=E(w.getAttribute(W));if(!D||!D.includes(d))continue;let J=0;const _n=b.filter(Zn=>D.includes(Zn));_n.length>0&&(J+=40+_n.length*5);const wn=w.tagName===\"IMG\"?E(w.getAttribute(\"src\")??w.getAttribute(\"alt\")):E(w.textContent);y&&wn===y?J+=120:y.length>=3&&wn.includes(y)&&(J+=80),/image|photo|logo|banner|thumbnail|cover/i.test(c)&&w.tagName===\"IMG\"&&D.includes(\"image\")&&(J+=120),J>=40&&r.push({element:w,field:o,score:J})}}r.sort((o,a)=>a.score-o.score);const i=new Set;for(const{element:o,field:a}of r)if(!i.has(o)){if(i.add(o),o.tagName!==\"IMG\"){const c=o.textContent??\"\",u=String(a.value??\"\"),g=c.toLowerCase().indexOf(u.toLowerCase());u&&g>=0&&c!==u&&(o.setAttribute(\"data-fivora-value-prefix\",c.slice(0,g)),o.setAttribute(\"data-fivora-value-suffix\",c.slice(g+u.length)))}o.removeAttribute(W),o.setAttribute(\"data-preview-field-path\",a.path),Zt(a.path,a.value)}}__name(Qe,\"promoteActiveRouteDetailFields\");const kn=\"FIVORA_PREVIEW_ELEMENT_CLICKED\",Fn=p(\"ELEMENT_CLICKED\"),Dn=\"FIVORA_PREVIEW_FIELD_CHANGED\",Nn=p(\"FIELD_CHANGED\"),Vn=\"FIVORA_PREVIEW_EDIT_MODE\",Hn=p(\"EDIT_MODE\"),Gn=\"FIVORA_PREVIEW_FLUSH_EDIT\",qn=p(\"FLUSH_EDIT\"),Bn=\"FIVORA_PREVIEW_EDIT_FLUSHED\",Un=p(\"EDIT_FLUSHED\"),Wn=\"h1, h2, h3, h4, h5, h6, p, span, a, button, address, li, dt, dd, label, strong, em, small, img\",Dt=\"ontouchstart\"in window||navigator.maxTouchPoints>0||window.matchMedia&&window.matchMedia(\"(pointer: coarse)\").matches,Qn=(()=>{const t=navigator.userAgent||\"\",e=navigator.vendor||\"\";if(/iP(ad|hone|od)/i.test(t)||/Safari/i.test(t)&&/Apple Computer/i.test(e)&&!/Chrom(e|ium)/i.test(t))return!0;try{return!!window.safari}catch{return!1}})(),Yn=(()=>{try{const t=document.createElement(\"div\");return t.setAttribute(\"contenteditable\",\"plaintext-only\"),t.contentEditable===\"plaintext-only\"}catch{return!1}})(),jn=Dt||navigator.hardwareConcurrency!=null&&navigator.hardwareConcurrency<=4||typeof navigator.deviceMemory==\"number\"&&(navigator.deviceMemory??8)<=4,zn=!0;let H=[];window.addEventListener(\"message\",t=>{if(!qe(t)||t.data&&typeof t.data==\"object\"&&t.data.__fivoraBridgeRelay===!0)return;if(t.data?.type===U||t.data?.type===T){t.stopImmediatePropagation(),Ze(t.data);return}if((t.data?.type===S||t.data?.type===F)&&t.data.siteData){const c=t.data.full!==!1;if(t.data.contentOnly===!0){Ct(t.data.siteData,{contentOnly:!0});return}Ct(t.data.siteData,{fanOut:!1,colorReplacements:!1}),Ge({full:c});return}if(t.data?.type===An||t.data?.type===En){const c=t.data.patches;Array.isArray(c)&&ke(c);return}if(t.data?.type===Sn||t.data?.type===xn||t.data?.type===Tn){Ve(t.data);return}if(t.data?.type===Vn||t.data?.type===Hn){H=Array.isArray(t.data.fields)?t.data.fields:[],Qe(),t.data.editMode?(pn(),window.setTimeout(()=>me(),50)):hn();return}(t.data?.type===Gn||t.data?.type===qn)&&(lt(!0),q({type:Bn,requestId:t.data.requestId}),q({type:Un,requestId:t.data.requestId}))},!0);try{const t=JSON.parse(window.sessionStorage.getItem(k)??\"null\");if(t?.awaitingNavigation){const e=$t(t.pageKey,t.pageLabel),n=ae(e,t.pageRoute),r=window.location.pathname.replace(/\\/+$/,\"\")||\"/\";ut(),r===n&&window.setTimeout(()=>ct(t),220)}else t&&ut()}catch{ut()}try{const t=JSON.parse(window.sessionStorage.getItem(wt)??window.sessionStorage.getItem(At)??\"null\");if(t){O=t;try{window[f]=t,window[_]=t}catch{}jn||(Qt(t),vt(t,{colorReplacements:!1}))}}catch{}let B=!1,Y=null,tt=null,Nt=null,K=null,bt=[],et=null;function de(){if(document.querySelector(\"[data-fivora-empty-editable-styles]\"))return;const t=document.createElement(\"style\");t.setAttribute(\"data-fivora-empty-editable-styles\",\"true\"),t.textContent=`\n [${h}=\"true\"] {\n min-width: 7rem !important;\n min-height: 1.25em !important;\n outline: 1px dashed rgba(37, 99, 235, 0.28) !important;\n outline-offset: 3px !important;\n }\n span[${h}=\"true\"],\n a[${h}=\"true\"],\n strong[${h}=\"true\"],\n em[${h}=\"true\"],\n small[${h}=\"true\"],\n label[${h}=\"true\"] {\n display: inline-block !important;\n }\n [${h}=\"true\"]:empty::before {\n content: \"\";\n color: rgba(37, 99, 235, 0.78);\n font: 500 12px/1.4 system-ui, sans-serif;\n letter-spacing: normal;\n text-transform: none;\n white-space: nowrap;\n }\n [${h}=\"true\"]:empty:hover::before {\n content: \"Click to add text\";\n }\n [${A}=\"true\"] {\n min-width: 10rem !important;\n min-height: 3.5rem !important;\n outline: 1px dashed rgba(37, 99, 235, 0.28) !important;\n outline-offset: 3px !important;\n }\n [${A}=\"true\"]:empty::before {\n content: \"\";\n display: inline-flex;\n align-items: center;\n min-height: 3.5rem;\n color: rgba(37, 99, 235, 0.78);\n font: 500 12px/1.4 system-ui, sans-serif;\n letter-spacing: normal;\n text-transform: none;\n white-space: nowrap;\n }\n [${A}=\"true\"]:empty:hover::before {\n content: \"Click to add the first item\";\n }\n `,document.head.appendChild(t)}__name(de,\"ensureEmptyEditableStyles\");function tn(t){if(t.id)return\"#\"+CSS.escape(t.id);const e=[];let n=t;for(;n&&n!==document.body;){const r=n.tagName.toLowerCase(),i=n.parentElement?Array.from(n.parentElement.children).filter(a=>a.tagName===n?.tagName):[],o=i.indexOf(n)+1;e.unshift(i.length>1?`${r}:nth-of-type(${o})`:r),n=n.parentElement}return e.length>0?`body > ${e.join(\" > \")}`:\"\"}__name(tn,\"buildStructuralSelector\");function Vt(){try{const t=JSON.parse(window.sessionStorage.getItem(z)??\"{}\");return t&&typeof t==\"object\"?t:{}}catch{return{}}}__name(Vt,\"readResolvedTargetSelectors\");function en(t,e){const n=tn(t);if(!n)return;const r=Vt();r[`${window.location.pathname}|${e}`]=n;try{window.sessionStorage.setItem(z,JSON.stringify(r))}catch{}}__name(en,\"rememberResolvedTarget\");function Kn(){const t=Vt(),e=`${window.location.pathname}|`;let n=!1;for(const r of Object.keys(t))r.startsWith(e)&&(delete t[r],n=!0);if(n)try{window.sessionStorage.setItem(z,JSON.stringify(t))}catch{}}__name(Kn,\"forgetResolvedTargetsForCurrentPage\");function fe(){document.querySelectorAll(`[${m}]`).forEach(t=>{K?.target!==t&&(t.removeAttribute(m),t.removeAttribute(h),t.removeAttribute(A))})}__name(fe,\"clearResolvedEditableTargets\");function ft(t,e,n=!0){const r=t.getAttribute(m),i=t.getAttribute(\"data-preview-field-path\")??t.getAttribute(N)??t.getAttribute(\"data-content-path\")??t.getAttribute(\"data-field-path\");if(r&&r!==e.path&&i!==e.path)return!1;t.setAttribute(m,e.path);const o=String(e.value??\"\").trim().length===0&&E(t.textContent).length===0;B&&o&&t.tagName!==\"IMG\"?t.setAttribute(h,\"true\"):t.removeAttribute(h);const a=e.kind===\"collection\"||e.type===\"list\",c=e.collection?.length;return B&&a&&(c===0||t.childElementCount===0)?(t.setAttribute(A,\"true\"),t.removeAttribute(h)):t.removeAttribute(A),n&&!a&&en(t,e.path),!0}__name(ft,\"annotateEditableTarget\");function Z(t){const e=[t.value,...t.matchValues??[]].filter(n=>typeof n==\"number\"||typeof n==\"string\"&&n.trim().length>0);return Array.from(new Set(e.map(n=>String(n))))}__name(Z,\"editableFieldMatchValues\");function nn(t){for(const e of st(t)){const n=CSS.escape(e),r=document.querySelector(`[data-preview-field-path=\"${n}\"], [${N}=\"${n}\"], [data-content-path=\"${n}\"], [data-field-path=\"${n}\"], [${m}=\"${n}\"]`);if(r)return r}return null}__name(nn,\"findExplicitEditableTarget\");function rn(t){if(t.kind===\"collection\"||t.type===\"list\")return null;const n=Vt()[`${window.location.pathname}|${t.path}`];if(!n)return null;try{const r=document.querySelector(n);if(!r)return null;const i=Z(t).map(E),o=E(r.textContent);return i.length>0&&o&&!i.includes(o)?null:(ft(r,t,!1),r)}catch{return null}}__name(rn,\"restoreRememberedTarget\");function on(t){if(t.kind===\"collection\"||t.type===\"list\")return null;const n=(t.context?oe({collectionPath:t.context.collectionPath,itemIndex:t.context.itemIndex,fieldKey:t.context.fieldKey,itemValues:t.context.itemValues}):null)??document;for(const r of Z(t)){const i=Lt(n,r,t.context?.fieldKey),o=[...Ot(n,r),...i?[i]:[],...Mt(n,r,t.context?.fieldKey)];for(const a of o){if(a.closest(`[${W}]`))continue;const c=a.getAttribute(m);if(!c||c===t.path)return a}}return null}__name(on,\"inferEditableTarget\");function an(t){if(B){de(),le();for(const e of H){const n=nn(e.path)??rn(e)??(t?.explicitOnly?null:on(e));n&&ft(n,e)}}}__name(an,\"indexEditableTargets\");let Ht=!1;function me(){for(const e of bt)window.clearTimeout(e);if(bt=[],et!==null){const e=window.cancelIdleCallback;typeof e==\"function\"?e(et):window.clearTimeout(et),et=null}if(Ht)return;Ht=!0;const t=__name((e,n)=>{n&&(Ht=!1),e&&fe(),an({explicitOnly:e})},\"runPass\");bt=[window.setTimeout(()=>{t(!0,!0)},0)]}__name(me,\"scheduleEditableTargetIndex\");function sn(){const t=document.createElement(\"div\");return t.setAttribute(\"data-fivora-edit-badge\",\"true\"),t.innerHTML=\"\\u270F\\uFE0F\",Object.assign(t.style,{position:\"fixed\",zIndex:\"2147483647\",width:\"28px\",height:\"28px\",display:\"flex\",alignItems:\"center\",justifyContent:\"center\",fontSize:\"14px\",borderRadius:\"8px\",background:\"rgba(37, 99, 235, 0.92)\",color:\"#fff\",cursor:\"pointer\",pointerEvents:\"auto\",boxShadow:\"0 2px 8px rgba(0,0,0,0.18)\",opacity:\"0\",transition:\"opacity 0.15s ease\",userSelect:\"none\"}),t.setAttribute(\"title\",\"Edit this content\"),t.setAttribute(\"aria-label\",\"Edit this content\"),document.body.appendChild(t),t}__name(sn,\"createHoverBadge\");function cn(t){if(!Y)return;const e=t.getBoundingClientRect();t.tagName===\"IMG\"||t.querySelector(\"img\")!==null||t.classList.contains(\"animated-shoe\")||t.closest(\".animated-shoe\")!==null||/image/i.test(t.getAttribute(\"data-preview-field-path\")??\"\")||/image/i.test(t.getAttribute(\"data-content-path\")??\"\")||/image/i.test(t.getAttribute(\"data-field-path\")??\"\")||/image/i.test(t.getAttribute(m)??\"\")?(Y.style.top=`${Math.max(4,Math.min(window.innerHeight-36,e.bottom-40))}px`,Y.style.left=`${Math.max(4,e.left+16)}px`):(Y.style.top=`${Math.max(4,e.top-4)}px`,Y.style.left=`${Math.min(window.innerWidth-36,e.right-32)}px`),Y.style.opacity=\"1\"}__name(cn,\"positionBadge\");function yt(){Nt&&(Nt(),Nt=null),Y&&(Y.style.opacity=\"0\"),tt=null}__name(yt,\"clearHoverOverlay\");function ln(t){if(t===tt)return;yt(),tt=t;const e=t.style.outline,n=t.style.outlineOffset,r=t.style.cursor;t.style.outline=\"2px dashed rgba(37, 99, 235, 0.6)\",t.style.outlineOffset=\"2px\",t.style.cursor=\"pointer\",Nt=__name(()=>{t.style.outline=e,t.style.outlineOffset=n,t.style.cursor=r},\"hoverOutlineCleanup\"),cn(t)}__name(ln,\"applyHoverOverlay\");function ge(t){let e=t instanceof Element?t:null;for(;e&&!(e instanceof HTMLElement);)e=e.parentElement;let n=e;for(;n&&n!==document.body;){if(n.hasAttribute(W)){n=n.parentElement;continue}if(n.hasAttribute(\"data-preview-field-path\")||n.hasAttribute(N)||n.hasAttribute($)||n.hasAttribute(\"data-content-path\")||n.hasAttribute(\"data-field-path\")||n.hasAttribute(m)||n.matches(Wn)){const i=Gt(n);if(i)return{element:n,field:i}}n=n.parentElement}return null}__name(ge,\"findEditableTarget\");function Gt(t){if(t.closest(`[${W}]`))return null;const e=t.getAttribute(\"data-preview-field-path\")??t.getAttribute(\"data-content-path\")??t.getAttribute(\"data-field-path\")??t.getAttribute(m);if(e)return H.find(d=>st(d.path).includes(e))??{path:e,label:e.split(\".\").pop()??\"Content\",type:t.tagName===\"IMG\"?\"image\":\"text\",value:t.tagName===\"IMG\"?t.src:t.textContent?.trim()??\"\"};const n=t.getAttribute($);if(n){const g=n.match(/^(.+)\\[(\\d+)\\]$/);if(g){const d=g[1],b=Number(g[2]),y=H.find(w=>(w.kind===\"collection\"||w.type===\"list\")&&st(w.path).includes(d));if(y)return{...y,collection:{listPath:d,itemIndex:b,length:y.collection?.length??0,minItems:y.collection?.minItems,maxItems:y.collection?.maxItems,itemLabel:y.collection?.itemLabel}}}}const r=t.getAttribute(N);if(r)return H.find(d=>(d.kind===\"collection\"||d.type===\"list\")&&st(d.path).includes(r))??{kind:\"collection\",path:r,label:r.split(\".\").pop()??\"Collection\",type:\"list\",value:0,collection:{listPath:r,length:t.children.length}};const i=t.tagName===\"IMG\"?t:t.querySelector(\"img\");if(i){const g=H.find(y=>y.type===\"image\"&&Z(y).some(w=>te(i,w)));if(g)return g;const d=pe(i);if(d.collectionPath&&typeof d.itemIndex==\"number\"){const y=H.find(w=>w.type===\"image\"&&w.context?.collectionPath===d.collectionPath&&w.context?.itemIndex===d.itemIndex);if(y)return y}const b=i.closest('section, article, [data-preview-page-key], main, header, footer, .card, [class*=\"section\"]');if(b){const y=b.getAttribute(\"data-preview-field-path\")||b.getAttribute(\"data-content-path\")||b.getAttribute(\"data-field-path\")||b.getAttribute(m);if(y){const w=y.split(\".\")[0],D=H.find(J=>J.type===\"image\"&&(J.path.startsWith(`${w}.`)||J.path.startsWith(`${y}.`)));if(D)return D}}if(t.tagName===\"IMG\"){const y=H.filter(D=>D.type===\"image\");if(y.length===1)return y[0];const w=i.getAttribute(\"src\")||i.src||\"\";return{path:e||\"image\",label:(e||\"\").split(\".\").pop()||\"Image\",type:\"image\",value:w}}}const o=H.filter(g=>Z(g).some(d=>Rt(t,d)));if(o.length===1)return o[0];const a=E(t.textContent);if(!a)return null;const c=H.filter(g=>typeof g.value!=\"boolean\"&&Z(g).some(d=>E(d)===a));if(c.length===1)return c[0];const u=H.filter(g=>typeof g.value==\"boolean\"?!1:Z(g).some(d=>{const b=E(d);return b.length>=3&&a.includes(b)})).sort((g,d)=>Math.max(...Z(d).map(b=>E(b).length),0)-Math.max(...Z(g).map(b=>E(b).length),0));return u.length===1?u[0]:null}__name(Gt,\"resolveEditableField\");function un(t,e){return t.tagName!==\"IMG\"&&t.childElementCount===0&&![\"INPUT\",\"TEXTAREA\",\"SELECT\",\"OPTION\",\"VIDEO\",\"AUDIO\",\"IFRAME\"].includes(t.tagName)&&!e.context&&![\"image\",\"color\",\"boolean\",\"select\",\"list\"].includes(e.type??\"text\")}__name(un,\"canEditInline\");function dn(t){let e=t;for(;e&&e!==document.body;){const n=e.getAttribute(\"data-preview-field-path\")??e.getAttribute(N)??e.getAttribute(\"data-content-path\")??e.getAttribute(\"data-field-path\")??e.getAttribute(m);if(n)return n;e=e.parentElement}return null}__name(dn,\"extractFieldPath\");function pe(t){let e=t;for(;e&&e!==document.body;){const n=e.getAttribute($);if(n){const o=n.match(/^(.+)\\[(\\d+)\\]$/);if(o)return{collectionPath:o[1],itemIndex:Number(o[2])}}const r=e.getAttribute(\"data-preview-field-path\")??e.getAttribute(\"data-content-path\")??e.getAttribute(\"data-field-path\")??e.getAttribute(m);if(r){const o=r.match(/^(.+)\\[(\\d+)\\]/);if(o)return{collectionPath:o[1],itemIndex:Number(o[2])}}const i=e.getAttribute(N);if(i)return{collectionPath:i,itemIndex:null};e=e.parentElement}return{collectionPath:null,itemIndex:null}}__name(pe,\"extractCollectionContext\");function he(t,e){const n=[],r=new Set(e?.path?[e.path]:[]);let i=t,o=0;for(;i&&i!==document.body&&o<3&&!(i.hasAttribute(W)||o>0&&(i.hasAttribute($)||i.hasAttribute(N)||i.tagName===\"SECTION\"));){if(i.hasAttribute(\"data-preview-field-path\")||i.hasAttribute(\"data-content-path\")||i.hasAttribute(\"data-field-path\")||i.hasAttribute(m)){const a=Gt(i);a?.path&&a.kind!==\"collection\"&&a.type!==\"list\"&&!r.has(a.path)&&(r.add(a.path),n.push({path:a.path,label:a.label??a.path.split(\".\").pop()??\"Content\",type:a.type??\"text\"}))}i=i.parentElement,o+=1}return n}__name(he,\"findRelatedAncestorFields\");function fn(t,e,n=he(t,e)){const r=t.getBoundingClientRect(),i=t.tagName===\"IMG\",o=e?.path??dn(t),a=i?t.src:t.textContent?.trim()??\"\",c=pe(t);let u=e?.collection?.listPath??e?.collection?.path??e?.context?.collectionPath??c.collectionPath,g=e?.collection?.itemIndex??e?.context?.itemIndex??c.itemIndex;u&&o&&e?.kind!==\"collection\"&&!o.startsWith(`${u}[`)&&!o.startsWith(`${u}.`)&&o!==u&&(u=null,g=null);const d=e?.context?.itemPath??(u&&typeof g==\"number\"?`${u}[${g}]`:null),b={type:kn,fieldPath:o,descriptorKind:e?.kind??\"field\",fieldValue:a,elementTag:t.tagName.toLowerCase(),isImage:i,boundingRect:{top:r.top,left:r.left,width:r.width,height:r.height},listPath:u,itemPath:d,collectionPath:u,itemIndex:g,relatedFields:n};q(b),q({...b,type:Fn})}__name(fn,\"emitClickEvent\");function mn(t,e){q({type:Dn,fieldPath:t,value:e}),q({type:Nn,fieldPath:t,value:e})}__name(mn,\"emitFieldChange\");function lt(t){const e=K;if(!e)return;K=null,e.target.removeEventListener(\"keydown\",e.keydown),e.target.removeEventListener(\"blur\",e.blur);const n=t?(e.target.innerText??e.target.textContent??\"\").replace(/\\u00a0/g,\" \").trim():\"\";e.contentEditable===null?e.target.removeAttribute(\"contenteditable\"):e.target.setAttribute(\"contenteditable\",e.contentEditable),e.spellcheck===null?e.target.removeAttribute(\"spellcheck\"):e.target.setAttribute(\"spellcheck\",e.spellcheck),e.target.style.outline=e.outline,e.target.style.outlineOffset=e.outlineOffset,e.target.style.cursor=e.cursor,e.target.style.userSelect=e.userSelect,e.target.style.textTransform=e.textTransform,e.target.innerHTML=e.originalHtml,t&&(n!==e.originalText.trim()?(e.field.value=n,ft(e.target,e.field),mn(e.field.path,n)):n||ft(e.target,e.field))}__name(lt,\"finishInlineEdit\");function gn(t,e,n){if(K?.target===t)return;lt(!0),yt(),ft(t,e),t.removeAttribute(h);const r=typeof e.value==\"string\"||typeof e.value==\"number\"?String(e.value):t.textContent??\"\",i=t.innerHTML,o=__name(c=>{if(c.key===\"Escape\"){c.preventDefault(),lt(!1);return}c.key===\"Enter\"&&e.type!==\"textarea\"&&!c.shiftKey&&(c.preventDefault(),lt(!0))},\"keydown\"),a=__name(()=>lt(!0),\"blur\");if(K={target:t,field:e,originalText:r,originalHtml:i,contentEditable:t.getAttribute(\"contenteditable\"),spellcheck:t.getAttribute(\"spellcheck\"),outline:t.style.outline,outlineOffset:t.style.outlineOffset,cursor:t.style.cursor,userSelect:t.style.userSelect,textTransform:t.style.textTransform,keydown:o,blur:a},t.setAttribute(\"contenteditable\",Yn?\"plaintext-only\":\"true\"),t.setAttribute(\"spellcheck\",\"true\"),t.textContent=r,t.style.outline=\"2px solid rgba(37, 99, 235, 0.95)\",t.style.outlineOffset=\"3px\",t.style.cursor=\"text\",t.style.userSelect=\"text\",t.style.textTransform=\"none\",t.addEventListener(\"keydown\",o),t.addEventListener(\"blur\",a),t.focus(),n){const c=document,u=c.caretPositionFromPoint?.(n.x,n.y),g=u?(()=>{const d=document.createRange();return d.setStart(u.offsetNode,u.offset),d.collapse(!0),d})():c.caretRangeFromPoint?.(n.x,n.y);if(g){const d=window.getSelection();d?.removeAllRanges(),d?.addRange(g)}}else{const c=document.createRange();c.selectNodeContents(t);const u=window.getSelection();u?.removeAllRanges(),u?.addRange(c)}}__name(gn,\"beginInlineEdit\");let mt=null;function be(t){if(!B||K||Dt||mt!==null)return;const e=t.target;mt=requestAnimationFrame(()=>{if(mt=null,!B||K)return;const n=ge(e);n&&!n.element.hasAttribute(\"data-fivora-edit-badge\")&&ln(n.element)})}__name(be,\"onEditMouseOver\");function ye(t){if(!B)return;const e=t.relatedTarget instanceof HTMLElement?t.relatedTarget:null;e&&(e===Y||e===tt||tt?.contains(e))||yt()}__name(ye,\"onEditMouseOut\");function _e(t){if(!B||K&&t.target instanceof Node&&K.target.contains(t.target))return;const e=t.target instanceof HTMLElement&&t.target.hasAttribute(\"data-fivora-edit-badge\")?t.target:null,n=e?tt?{element:tt,field:Gt(tt)}:null:ge(t.target),r=n?.element,i=n?.field;if(!r||!i)return;t.preventDefault(),t.stopPropagation();const o=he(r,i);!zn&&un(r,i)&&o.length===0?gn(r,i,e?void 0:{x:t.clientX,y:t.clientY}):fn(r,i,o)}__name(_e,\"onEditClick\");function pn(){B||(B=!0,se(),de(),!Dt&&!Y&&(Y=sn()),Dt||(document.addEventListener(\"mouseover\",be,!0),document.addEventListener(\"mouseout\",ye,!0)),document.addEventListener(\"click\",_e,!0),document.addEventListener(\"submit\",we,!0),me())}__name(pn,\"enterEditMode\");function we(t){B&&(t.preventDefault(),t.stopPropagation())}__name(we,\"preventEditModeSubmit\");function hn(){if(B){B=!1,Ht=!1,lt(!0),yt(),mt!==null&&(cancelAnimationFrame(mt),mt=null);for(const t of bt)window.clearTimeout(t);if(bt=[],et!==null){const t=window.cancelIdleCallback;typeof t==\"function\"?t(et):window.clearTimeout(et),et=null}fe(),document.querySelectorAll(`[${h}], [${A}]`).forEach(t=>{t.removeAttribute(h),t.removeAttribute(A)}),document.removeEventListener(\"mouseover\",be,!0),document.removeEventListener(\"mouseout\",ye,!0),document.removeEventListener(\"click\",_e,!0),document.removeEventListener(\"submit\",we,!0)}}__name(hn,\"exitEditMode\");const Jn=window.history.pushState.bind(window.history),Xn=window.history.replaceState.bind(window.history);window.history.pushState=(...t)=>{Jn(...t),window.setTimeout(gt,0)},window.history.replaceState=(...t)=>{Xn(...t),window.setTimeout(gt,0)},window.addEventListener(\"popstate\",gt);function bn(){return window.location.pathname.match(/^(\\/uploads\\/generated-sites\\/(?:template-preview|[^/]+)\\/[^/]+)/)?.[1]??\"\"}__name(bn,\"resolvePreviewRootPrefix\");function yn(t){if(t.target&&t.target!==\"_self\"||t.hasAttribute(\"download\"))return!1;const e=t.getAttribute(\"href\");if(!e||e.startsWith(\"#\")||/^(mailto:|tel:|sms:|whatsapp:|javascript:)/i.test(e))return!1;let n;try{n=new URL(e,window.location.href)}catch{return!1}if(n.origin!==window.location.origin)return!1;const r=bn();if(r&&!n.pathname.startsWith(r))return!1;const i=window.location.pathname.replace(/\\/+$/,\"\")||\"/\",o=n.pathname.replace(/\\/+$/,\"\")||\"/\";return i!==o||n.search!==window.location.search}__name(yn,\"isInternalPreviewNavigation\"),document.addEventListener(\"click\",t=>{if(t.defaultPrevented||t.button!==0||t.metaKey||t.ctrlKey||t.shiftKey||t.altKey)return;const e=t.target?.closest?.(\"a[href]\");!e||!yn(e)||(t.preventDefault(),t.stopPropagation(),window.location.assign(e.href))},!0),gt()})(function(M){const L=__name((P,U)=>{if(!P||P.trim()===\"null\")return null;try{const T=new URL(P,U??void 0).origin;return T===\"null\"?null:T}catch{return null}},\"normalizeOrigin\"),x=L(M.currentOrigin),R=L(M.ancestorOrigin,x),s=L(M.accessibleParentOrigin,x),l=L(M.referrer,x),p=L(M.rememberedOrigin);return R??s??(l&&l!==x?l:null)??p??l},function(M){const L=__name(m=>!!m&&typeof m==\"object\"&&!Array.isArray(m),\"isRecord\");if(!L(M)||M.designCustomizationVersion!==1)return\"\";const x=M,R=__name(m=>{if(typeof m!=\"string\")return\"\";const h=m.trim();return!h||h.length>160||/[;{}<>\\r\\n]/.test(h)||/(?:url\\s*\\(|expression\\s*\\(|@import|javascript:)/i.test(h)?\"\":h},\"safeValue\"),s=__name(m=>R(x[m]),\"read\"),l=__name((m,h)=>h?`${m}:${h} !important;`:\"\",\"declaration\"),p=__name((m,h)=>{const A=h.filter(Boolean).join(\"\");return A?`${m}{${A}}`:\"\"},\"rule\"),P=__name(m=>m?[l(\"background\",m),l(\"background-color\",m),\"background-image:none !important;\"]:[],\"backgroundDeclarations\"),U=__name(m=>m===\"start\"?\"flex-start\":m===\"end\"?\"flex-end\":m===\"center\"||m===\"stretch\"?m:\"\",\"alignItems\"),T=__name(m=>{const h=Number(m);return Number.isInteger(h)&&h>=1&&h<=6?`repeat(${h},minmax(0,1fr))`:\"\"},\"gridColumns\"),C=(()=>{const m=Number(s(\"headingScale\"));return Number.isFinite(m)&&m>=.75&&m<=2?String(m):\"\"})(),v=__name(m=>({none:\"none\",subtle:\"0 4px 14px rgba(15,23,42,.08)\",medium:\"0 12px 30px rgba(15,23,42,.14)\",strong:\"0 22px 55px rgba(15,23,42,.22)\"})[m]??\"\",\"shadow\"),V=[[\"--brand-color\",s(\"primaryColor\")],[\"--brand-primary\",s(\"primaryColor\")],[\"--primary-color\",s(\"primaryColor\")],[\"--color-primary\",s(\"primaryColor\")],[\"--brand-secondary\",s(\"secondaryColor\")],[\"--secondary-color\",s(\"secondaryColor\")],[\"--brand-accent\",s(\"accentColor\")],[\"--accent-color\",s(\"accentColor\")],[\"--page-background\",s(\"backgroundColor\")],[\"--page-text\",s(\"textColor\")],[\"--surface-color\",s(\"surfaceColor\")],[\"--surface-alt-color\",s(\"surfaceAltColor\")],[\"--heading-color\",s(\"headingColor\")],[\"--muted-text-color\",s(\"mutedTextColor\")],[\"--border-color\",s(\"borderColor\")],[\"--card-background\",s(\"cardBackgroundColor\")],[\"--hero-min-height\",s(\"heroMinHeight\")],[\"--section-padding\",s(\"sectionPadding\")],[\"--content-max-width\",s(\"contentMaxWidth\")],[\"--container-padding\",s(\"containerPadding\")],[\"--section-gap\",s(\"sectionGap\")],[\"--element-gap\",s(\"elementGap\")],[\"--grid-gap\",s(\"gridGap\")],[\"--card-radius\",s(\"cardRadius\")],[\"--button-radius\",s(\"buttonRadius\")],[\"--image-radius\",s(\"imageRadius\")]],j=[p(\":root,body\",V.map(([m,h])=>l(m,h))),p(\"html\",[l(\"font-size\",s(\"baseSize\"))]),p(\"body\",[l(\"font-family\",s(\"bodyFont\")?`${s(\"bodyFont\")},sans-serif`:\"\"),l(\"font-weight\",s(\"bodyWeight\")),l(\"line-height\",s(\"bodyLineHeight\")),l(\"letter-spacing\",s(\"letterSpacing\")),...P(s(\"backgroundColor\")),l(\"color\",s(\"textColor\"))]),p(\"body :where(h1,h2,h3,h4,h5,h6)\",[l(\"font-family\",s(\"headingFont\")?`${s(\"headingFont\")},sans-serif`:\"\"),l(\"font-weight\",s(\"headingWeight\")),l(\"line-height\",s(\"headingLineHeight\")),l(\"color\",s(\"headingColor\"))]),p('body :where(p,small,.muted,[class*=\"muted\"])',[l(\"color\",s(\"mutedTextColor\"))]),C?`body h1{font-size:calc(2.5rem * ${C}) !important}body h2{font-size:calc(2rem * ${C}) !important}body h3{font-size:calc(1.5rem * ${C}) !important}body h4{font-size:calc(1.25rem * ${C}) !important}`:\"\",p(\"body header\",[...P(s(\"headerBackgroundColor\")),l(\"min-height\",s(\"headerHeight\"))]),p(\"body footer\",[...P(s(\"footerBackgroundColor\"))]),p(\"body main\",[...P(s(\"backgroundColor\")),l(\"color\",s(\"textColor\"))]),p(\"body main > section,body main [data-preview-page-key] > section\",[l(\"padding-block\",s(\"sectionPadding\")),l(\"text-align\",s(\"textAlign\"))]),p(\"body main :where(section,[data-design-section]) :where(h1,h2,h3,h4,h5,h6,p,[data-design-text])\",[l(\"text-align\",s(\"textAlign\"))]),p(\"body main > section + section,body main [data-preview-page-key] > section + section\",[l(\"margin-top\",s(\"sectionGap\"))]),p('body main :where([class*=\"flex\"],[class*=\"grid\"],[data-design-stack])',[l(\"gap\",s(\"elementGap\"))]),p(\"body main > section:nth-of-type(even),body main [data-preview-page-key] > section:nth-of-type(even)\",P(s(\"surfaceAltColor\"))),p(\"body main > section:nth-of-type(odd),body main [data-preview-page-key] > section:nth-of-type(odd)\",P(s(\"surfaceColor\"))),p(\"body main > section:first-of-type,body main [data-preview-page-key] > section:first-of-type\",[l(\"min-height\",s(\"heroMinHeight\")),l(\"text-align\",s(\"heroTextAlign\"))]),p('body main > section:first-of-type :where(h1,h2,h3,h4,h5,h6,p,[class*=\"container\"],[data-design-text]),body main [data-preview-page-key] > section:first-of-type :where(h1,h2,h3,h4,h5,h6,p,[class*=\"container\"],[data-design-text])',[l(\"text-align\",s(\"heroTextAlign\"))]),p('body main :where([class*=\"container\"],[class~=\"container\"],[data-design-container])',[l(\"max-width\",s(\"contentMaxWidth\")),l(\"padding-inline\",s(\"containerPadding\")),s(\"contentMaxWidth\")?\"margin-inline:auto !important;\":\"\"]),p('body main :where(section,[data-design-section]) > :where([class*=\"flex\"],[data-design-content])',[l(\"align-items\",U(s(\"contentAlign\"))),l(\"justify-items\",s(\"contentAlign\"))]),p(\"body main :where([data-preview-list-path],[data-design-grid])\",[T(s(\"gridColumns\"))?\"display:grid !important;\":\"\",l(\"grid-template-columns\",T(s(\"gridColumns\"))),l(\"gap\",s(\"gridGap\"))]),p('body main :where([data-preview-item-path],[data-design-card],.card,[class*=\"card-\"])',[l(\"width\",s(\"cardWidth\")),s(\"cardWidth\")?\"max-width:100% !important;\":\"\",l(\"min-height\",s(\"cardMinHeight\")),l(\"padding\",s(\"cardPadding\")),l(\"border-radius\",s(\"cardRadius\")),l(\"border-width\",s(\"cardBorderWidth\")),s(\"cardBorderWidth\")?\"border-style:solid !important;\":\"\",l(\"border-color\",s(\"borderColor\")),...P(s(\"cardBackgroundColor\")),l(\"box-shadow\",v(s(\"cardShadow\"))),l(\"text-align\",s(\"cardTextAlign\"))]),p('body main :where([data-preview-item-path],[data-design-card],.card,[class*=\"card-\"]) :where(h1,h2,h3,h4,h5,h6,p,span,[data-design-text])',[l(\"text-align\",s(\"cardTextAlign\"))]),p('body main :where(button,a[class*=\"btn\"],a[class*=\"button\"],[data-design-button])',[l(\"padding\",s(\"buttonPadding\")),l(\"border-radius\",s(\"buttonRadius\")),...P(s(\"buttonBackgroundColor\")),l(\"color\",s(\"buttonTextColor\")),l(\"box-shadow\",v(s(\"buttonShadow\")))]),p(\"body main img\",[l(\"border-radius\",s(\"imageRadius\"))])],G=L(x.sections)?x.sections:{};for(const[m,h]of Object.entries(G)){if(!/^[a-zA-Z0-9_-]{1,64}$/.test(m)||!L(h))continue;const A=__name(z=>R(h[z]),\"sectionRead\"),N=A(\"backgroundColor\"),$=['[class*=\"absolute\"][class*=\"inset-0\"]','[class*=\"fixed\"][class*=\"inset-0\"]','[class*=\"absolute\"][class*=\"inset-x-0\"][class*=\"inset-y-0\"]','[class*=\"absolute\"][class*=\"top-0\"][class*=\"right-0\"][class*=\"bottom-0\"][class*=\"left-0\"]'].join(\",\"),k={all:\"body main section\",hero:\"body main > section:first-of-type,body main [data-preview-page-key] > section:first-of-type\",header:\"body header\",footer:\"body footer\",cards:'body main :where([data-preview-item-path],[data-design-card],.card,[class*=\"card-\"])'}[m]??`body :where([data-preview-page-key=\"${m}\"] > section,[data-design-section=\"${m}\"],[data-section-id=\"${m}\"],section#${m},section.${m})`;j.push(p(k,[h.visible===!1?\"display:none !important;\":\"\",...P(N),l(\"color\",A(\"textColor\")),l(\"min-height\",A(\"minHeight\")),l(\"padding-block\",A(\"padding\")),l(\"max-width\",A(\"contentMaxWidth\")),l(\"gap\",A(\"gap\")),l(\"text-align\",A(\"textAlign\")),l(\"align-items\",U(A(\"contentAlign\")))]),p(`${k} :where(h1,h2,h3,h4,h5,h6)`,[l(\"color\",A(\"headingColor\")),l(\"text-align\",A(\"textAlign\"))]),p(`${k} :where(p,span,[data-design-text])`,[l(\"text-align\",A(\"textAlign\"))]),p(`${k} :where([data-preview-item-path],[data-design-card],.card,[class*=\"card-\"])`,[...P(A(\"cardBackgroundColor\")),l(\"width\",A(\"cardWidth\")),A(\"cardWidth\")?\"max-width:100% !important;\":\"\",l(\"min-height\",A(\"cardMinHeight\")),l(\"border-radius\",A(\"cardRadius\"))]),p(`${k} :where([data-preview-list-path],[data-design-grid])`,[T(A(\"gridColumns\"))?\"display:grid !important;\":\"\",l(\"grid-template-columns\",T(A(\"gridColumns\")))]),p(`${k}::before,${k}::after`,N?[\"background:none !important;\",\"background-image:none !important;\",\"opacity:0 !important;\"]:[]),p(`${k} > :where(${$})`,N?[\"background:none !important;\",\"background-image:none !important;\",\"box-shadow:none !important;\",\"mask-image:none !important;\",\"-webkit-mask-image:none !important;\"]:[]),p(`${k} > :where(${$})::before,${k} > :where(${$})::after`,N?[\"background:none !important;\",\"background-image:none !important;\",\"opacity:0 !important;\"]:[]),p(`${k} > :where(${$}) :where(img,video,canvas,picture)`,N?[\"opacity:0.2 !important;\"]:[]))}return j.filter(Boolean).join(`\n`)},function(M,L){if(!L||typeof L!=\"object\"||Array.isArray(L))return M;const x=__name(T=>{const C=T.trim().toLowerCase(),v=C.match(/^#([0-9a-f]{3})$/);return v?`#${[...v[1]].map(V=>V.repeat(2)).join(\"\")}`:/^#[0-9a-f]{6}$/.test(C)?C:null},\"normalize\"),R=new Map,s=new Map;for(const[T,C]of Object.entries(L).slice(0,64)){if(typeof C!=\"string\")continue;const v=x(T),V=x(C);if(!v||!V||v===V)continue;R.set(v,V);const j=__name(G=>[Number.parseInt(G.slice(1,3),16),Number.parseInt(G.slice(3,5),16),Number.parseInt(G.slice(5,7),16)],\"channels\");s.set(j(v).join(\",\"),j(V)),v[1]===v[2]&&v[3]===v[4]&&v[5]===v[6]&&R.set(`#${v[1]}${v[3]}${v[5]}`,V)}if(R.size===0)return M;const l=[...R.keys()].sort((T,C)=>C.length-T.length).map(T=>T.replace(/[.*+?^${}()|[\\]\\\\]/g,\"\\\\$&\")),p=new RegExp(`(?<!\\\\\\\\)(?:${l.join(\"|\")})(?![0-9a-f])`,\"gi\"),P=M.replace(p,T=>{const C=x(T);return C?R.get(C)??T:T}),U=/(rgba?\\(\\s*)(\\d{1,3})(\\s+|,\\s*)(\\d{1,3})(\\s+|,\\s*)(\\d{1,3})/gi;return P.replace(U,(T,C,v,V,j,G,m)=>{const h=s.get(`${v},${j},${m}`);return h?`${C}${h[0]}${V}${h[1]}${G}${h[2]}`:T})},\"fivora-universal-design-overrides\",function(M,L){const x=L??document,R=M&&typeof M==\"object\"&&!Array.isArray(M)?M:null,s=R?.requirements&&typeof R.requirements==\"object\"&&!Array.isArray(R.requirements)?R.requirements:null,l=R?.template&&typeof R.template==\"object\"&&!Array.isArray(R.template)?R.template:null,p=l?.structure&&typeof l.structure==\"object\"&&!Array.isArray(l.structure)?l.structure:null,P=Array.isArray(s?.requiredPages),U=Array.isArray(p?.pages);if(!P&&!U)return;const T=P?s?.requiredPages:p?.pages,C=new Set(T.filter(f=>typeof f==\"string\").map(f=>f.trim()).filter(Boolean)),v=Array.isArray(l?.pageDefinitions)?l.pageDefinitions:[],V=Array.isArray(p?.pageDefinitions)?p.pageDefinitions:[],G=(v.length>0?v:V).flatMap(f=>{if(!f||typeof f!=\"object\"||Array.isArray(f))return[];const _=f;if(typeof _.id!=\"string\"||!_.id.trim())return[];const S=_.id.trim(),F=typeof _.label==\"string\"&&_.label.trim()?_.label.trim():S.replace(/_/g,\" \"),X=typeof _.route==\"string\"?_.route.trim():\"\",nt=X===\"/\"?\"/\":`/${(X||S).replace(/^\\/+|\\/+$/g,\"\")}`;return[{id:S,label:F,route:nt}]}),h=(U?p?.pages:T).filter(f=>typeof f==\"string\").map(f=>f.trim()).filter(Boolean).map((f,_)=>({id:f,label:f.replace(/_/g,\" \"),route:_===0?\"/\":`/${f}`})),A=G.length>0?G:h;if(A.length===0)return;const N=A.filter(f=>!C.has(f.id));if(N.length===0){x.querySelectorAll(\"[data-fivora-page-disabled]\").forEach(f=>f.removeAttribute(\"data-fivora-page-disabled\"));return}let $=x.getElementById(\"fivora-page-selection-style\");(!$||$.tagName!==\"STYLE\")&&($=x.createElement(\"style\"),$.id=\"fivora-page-selection-style\",$.textContent='[data-fivora-page-disabled=\"true\"]{display:none!important}',x.head.appendChild($)),x.querySelectorAll(\"[data-fivora-page-disabled]\").forEach(f=>f.removeAttribute(\"data-fivora-page-disabled\"));const W=__name(f=>{let _=f;try{const X=new URL(f,x.baseURI);if(X.origin!==x.location?.origin)return\"\";_=X.pathname}catch{return\"\"}const S=_.match(/^(\\/uploads\\/generated-sites\\/(?:template-preview|preview|live)\\/[^/]+)/)?.[1];S&&_.startsWith(S)&&(_=_.slice(S.length)||\"/\"),_=_.replace(/\\/index\\.html$/i,\"/\").replace(/\\.html$/i,\"\");const F=_.replace(/\\/+$/g,\"\")||\"/\";return F.startsWith(\"/\")?F:`/${F}`},\"normalizePath\"),k=__name(f=>A.find(_=>{const S=W(_.route);return S?S===\"/\"?f===\"/\":f===S||f.startsWith(`${S}/`):!1}),\"pageForPath\"),z=__name(f=>{for(const _ of[\"href\",\"formaction\",\"data-href\",\"data-route\",\"data-url\"]){const S=f.getAttribute(_);if(!S)continue;const F=k(W(S));if(F)return F}},\"pageForControl\"),Q=__name(f=>{f&&f.setAttribute(\"data-fivora-page-disabled\",\"true\")},\"disable\");for(const f of N)for(const _ of[\"data-page-key\",\"data-required-page\",\"data-target-page\"])x.querySelectorAll(`[${_}]`).forEach(S=>{S.getAttribute(_)===f.id&&Q(S)});const qt=Array.from(x.querySelectorAll(\"a[href]\"));for(const f of qt){const _=z(f);if(!_||C.has(_.id))continue;if(f.classList.contains(\"absolute\")&&(f.classList.contains(\"inset-0\")||f.classList.contains(\"inset-x-0\")&&f.classList.contains(\"inset-y-0\")))Q(f.closest(\"[data-preview-item-path],[data-design-card],article,li\"));else{const F=f.closest(\"li\");Q(F&&F.querySelectorAll(\"a[href]\").length===1?F:f)}}const wt=Array.from(x.querySelectorAll('button,[role=\"button\"],[data-href],[data-route],[data-url]')).filter(f=>f.tagName!==\"A\");for(const f of wt){const _=z(f);if(!_||C.has(_.id))continue;const S=f.closest(\"li\");Q(S&&S.querySelectorAll('a[href],button,[role=\"button\"],[data-href],[data-route],[data-url]').length===1?S:f)}const At=x.querySelector(\"main section\");for(const f of x.querySelectorAll(\"main section\")){const _=Array.from(f.querySelectorAll('a[href],button,[role=\"button\"],[data-href],[data-route],[data-url]')),S=_.map(z).filter(nt=>!!nt),F=f.hasAttribute(\"data-preview-page-key\"),X=f===At||f.hasAttribute(\"data-design-hero\")||/(?:^|\\s)(?:hero|banner|masthead)(?:\\s|$)/i.test(f.className)||!!f.querySelector(\"h1\");!F&&!X&&S.length>0&&S.length===_.length&&S.every(nt=>!C.has(nt.id))&&Q(f)}});";
3
+ // Generated from visual editor bridge (v46).
4
+ module.exports = "var __name=typeof __name==\"function\"?__name:((it,I)=>typeof Object.defineProperty==\"function\"?Object.defineProperty(it,\"name\",{value:I,configurable:!0}):it);(function(I,O,_,C,H){const s=`${[\"MARKET\",\"PLACE\"].join(\"\")}_PREVIEW_`,c=__name(t=>`${s}${t}`,\"previousPreviewMessage\"),h=__name(t=>`__${s}${t}__`,\"previousPreviewStorageKey\"),k=\"FIVORA_PREVIEW_FOCUS_PAGE\",$=c(\"FOCUS_PAGE\"),R=\"FIVORA_PREVIEW_FOCUS_RESULT\",T=c(\"FOCUS_RESULT\"),N=\"FIVORA_PREVIEW_READY\",X=c(\"READY\"),q=\"data-fivora-preview-active-field\",F=\"data-fivora-resolved-field-path\",P=\"data-fivora-empty-editable\",V=\"data-fivora-empty-collection\",B=\"data-preview-list-path\",D=\"data-preview-item-path\",U=\"data-preview-static\",ot=\"__FIVORA_UNIVERSAL_PREVIEW_FOCUS__\",Y=\"__FIVORA_VISUAL_EDITOR_TARGETS__\",u=\"__FIVORA_PREVIEW_PARENT_ORIGIN__\",E=h(\"PARENT_ORIGIN\"),S=\"__FIVORA_PREVIEW_SITE_DATA_CACHE__\",z=h(\"SITE_DATA_CACHE\"),l=\"__FIVORA_PREVIEW_SITE_DATA__\",m=h(\"SITE_DATA\"),y=\"FIVORA_PREVIEW_SITE_DATA\",M=c(\"SITE_DATA\"),Z=\"FIVORA_PREVIEW_SITE_DATA_APPLIED\",at=c(\"SITE_DATA_APPLIED\"),En=\"FIVORA_PREVIEW_CONTENT_PATCH\",xn=c(\"CONTENT_PATCH\"),Cn=\"FIVORA_PREVIEW_STYLE_PATCH\",ve=\"fivora-template-color-replacements\",Tn=[200],Pn=2500,vn=1600,In=12e3,_n=\"h1, h2, h3, h4, h5, h6, p, span, a, button, address, li, dt, dd, label, strong, em, small\";let Jt=[];const Ie=new Map;let _e=0,Xt=!1,Tt=null,Zt,Qt=[],st=null,v=null,Re=\"\",$e=\"\",Oe=\"\";function gt(){try{window.sessionStorage.removeItem(ot)}catch{}}__name(gt,\"clearPendingFocus\");function te(){try{return window.sessionStorage.getItem(u)||window.sessionStorage.getItem(E)}catch{return null}}__name(te,\"readRememberedParentOrigin\");function ee(t){if(t)try{window.sessionStorage.setItem(u,t)}catch{}}__name(ee,\"rememberParentOrigin\");function Me(){for(const t of Qt)window.clearTimeout(t);Qt=[]}__name(Me,\"clearSiteDataRelayTimers\");function Le(){const t=new Set;dt&&t.add(dt),t.add(window.location.origin);const e=te();e&&t.add(e);try{if(document.referrer){const n=new URL(document.referrer).origin;n&&n!==\"null\"&&t.add(n)}}catch{}try{const n=window.location.ancestorOrigins?.item(0);n&&t.add(n)}catch{}return Array.from(t)}__name(Le,\"collectSiteDataRelayOrigins\");function Pt(t,e){const n=Le(),r=e?.fanOut?n:n.slice(0,1);for(const o of r)for(const i of[y,M])try{window.dispatchEvent(new MessageEvent(\"message\",{data:{type:i,siteData:t,__fivoraBridgeRelay:!0},origin:o,source:window.parent}))}catch{}}__name(Pt,\"relaySiteDataToTemplateRuntime\");function vt(t,e){v=t;try{window[l]=t,window[m]=t}catch{}const n=__name(()=>{st=null;try{const r=JSON.stringify(v);window.sessionStorage.setItem(S,r),window.sessionStorage.setItem(z,r)}catch{}},\"writeSessionCache\");if(e?.immediate){st!==null&&(window.clearTimeout(st),st=null),n();return}st!==null&&window.clearTimeout(st),st=window.setTimeout(n,Pn)}__name(vt,\"persistSiteData\");function ke(t){const e=t&&typeof t==\"object\"&&!Array.isArray(t)?t:null,n=e?.requirements&&typeof e.requirements==\"object\"&&!Array.isArray(e.requirements)?e.requirements:null,r=e?.template&&typeof e.template==\"object\"&&!Array.isArray(e.template)?e.template:null,o=r?.structure&&typeof r.structure==\"object\"&&!Array.isArray(r.structure)?r.structure:null;try{return JSON.stringify({requiredPages:n?.requiredPages??null,pages:o?.pages??null,pageDefinitions:r?.pageDefinitions??o?.pageDefinitions??null})}catch{return String(Date.now())}}__name(ke,\"pagesSignature\");let ct=null,lt=null;function Fe(t){const e=[];for(const n of t.matchAll(/([^.[\\]]+)|\\[(\\d+)\\]/g))n[2]!==void 0?e.push(Number(n[2])):n[1]&&e.push(n[1]);return e}__name(Fe,\"parseFieldPath\");function De(t,e,n){if(e.length===0)return t;const r=__name((o,i)=>{const a=e[i],d=i===e.length-1,f=d?void 0:e[i+1];if(typeof a==\"number\"){const A=(Array.isArray(o)?o:[]).slice();if(d)return A[a]=n,A;const L=A[a];return A[a]=L==null||typeof L!=\"object\"?r(typeof f==\"number\"?[]:{},i+1):r(L,i+1),A}const g={...o&&typeof o==\"object\"&&!Array.isArray(o)?o:{}};if(d)return g[a]=n,g;const w=g[a];return g[a]=w==null||typeof w!=\"object\"?r(typeof f==\"number\"?[]:{},i+1):r(w,i+1),g},\"setAt\");return r(t,0)}__name(De,\"setValueAtPath\");function Ne(){return(v&&typeof v==\"object\"&&!Array.isArray(v)?v:{}).content??{}}__name(Ne,\"readPublishedContent\");function ne(t){const n={...v&&typeof v==\"object\"&&!Array.isArray(v)?v:{},content:t};v=n;try{window[l]=n,window[m]=n}catch{}return n}__name(ne,\"writePublishedContent\");function re(){ct!==null&&window.clearTimeout(ct),ct=window.setTimeout(()=>{ct=null,v!=null&&Pt(v,{fanOut:!1})},vn)}__name(re,\"scheduleContentOnlyRelay\");function It(){lt!==null&&window.clearTimeout(lt),lt=window.setTimeout(()=>{if(lt=null,v==null)return;const t=window;if(typeof t.requestIdleCallback==\"function\"){t.requestIdleCallback(()=>{v!=null&&vt(v,{immediate:!0})},{timeout:4e3});return}vt(v,{immediate:!0})},In)}__name(It,\"scheduleContentOnlyPersist\");function ie(t,e){const n=Array.from(document.querySelectorAll(`[data-preview-field-path=\"${CSS.escape(t)}\"], [${F}=\"${CSS.escape(t)}\"]`));for(const r of n){if(J?.target===r)continue;if(r.tagName===\"IMG\"){typeof e==\"string\"&&e.trim()&&r.setAttribute(\"src\",e);continue}if(typeof e!=\"string\"&&typeof e!=\"number\"&&typeof e!=\"boolean\")continue;const o=(r.getAttribute(\"data-fivora-value-prefix\")??\"\")+String(e)+(r.getAttribute(\"data-fivora-value-suffix\")??\"\");if(r.childElementCount===0)r.textContent=o;else{const i=Array.from(r.childNodes).find(a=>a.nodeType===Node.TEXT_NODE&&a.textContent?.trim());i?i.textContent=o:r.textContent=o}j&&(o.trim().length===0?r.setAttribute(P,\"true\"):r.removeAttribute(P))}}__name(ie,\"applyDomFieldValue\");function He(t){if(!Array.isArray(t)||t.length===0)return;let e=Ne();for(const n of t){if(!n||typeof n.path!=\"string\"||!n.path.trim())continue;const r=Fe(n.path);r.length!==0&&(e=De(e,r,n.value),ie(n.path,n.value))}ne(e),re(),It()}__name(He,\"publishContentPatches\");function Ve(t){ne(t),re(),It()}__name(Ve,\"publishContentOnly\");function Ge(t,e){if(!/^[a-zA-Z0-9_.:\\[\\]-]{1,180}$/.test(t)||!e||typeof e!=\"object\"||Array.isArray(e))return;const n=v&&typeof v==\"object\"&&!Array.isArray(v)?v:{},r=n.template&&typeof n.template==\"object\"&&!Array.isArray(n.template)?n.template:{},o=r.structure&&typeof r.structure==\"object\"&&!Array.isArray(r.structure)?r.structure:{},i=(o.theme&&typeof o.theme==\"object\"&&!Array.isArray(o.theme)?o.theme:r.theme&&typeof r.theme==\"object\"&&!Array.isArray(r.theme)?r.theme:{})||{},a=i.elementStyles&&typeof i.elementStyles==\"object\"&&!Array.isArray(i.elementStyles)?i.elementStyles:{},d={...i,designCustomizationVersion:1,elementStyles:{...a,[t]:e}},f={...r,theme:d,structure:{...o,theme:d}},p={...n,template:f};v=p,wt(p),qe(t,e),It()}__name(Ge,\"publishElementStylePatch\");function qe(t,e){if(!t||!e||typeof e!=\"object\"||Array.isArray(e))return;const n=e;let r=[];if(t.includes(\":\")){const[i,a]=t.split(\":\");a===\"card\"?r=Array.from(document.querySelectorAll(`[data-preview-list-path=\"${CSS.escape(i)}\"] [data-preview-item-path], [data-preview-list-path=\"${CSS.escape(i)}\"] .card, [data-preview-list-path=\"${CSS.escape(i)}\"] article`)):a&&(r=Array.from(document.querySelectorAll(`[data-preview-list-path=\"${CSS.escape(i)}\"] [data-preview-field-path$=\".${CSS.escape(a)}\"], [data-preview-list-path=\"${CSS.escape(i)}\"] [data-field-path$=\".${CSS.escape(a)}\"]`)))}else r=Array.from(document.querySelectorAll(`[data-preview-field-path=\"${CSS.escape(t)}\"], [data-preview-item-path=\"${CSS.escape(t)}\"], [data-preview-style-target=\"${CSS.escape(t)}\"], [data-field-path=\"${CSS.escape(t)}\"], [data-content-path=\"${CSS.escape(t)}\"]`));const o=__name(i=>i==null||i===\"\"?\"\":typeof i==\"number\"?`${i}px`:String(i),\"toCssVal\");for(const i of r){if(n.color&&(i.style.setProperty(\"color\",String(n.color),\"important\"),i.style.setProperty(\"--deneb-color\",String(n.color))),n.textAlign&&(i.style.setProperty(\"text-align\",String(n.textAlign),\"important\"),i.style.setProperty(\"--deneb-text-align\",String(n.textAlign))),n.fontSize){const a=o(n.fontSize);i.style.setProperty(\"font-size\",a,\"important\"),i.style.setProperty(\"--deneb-font-size\",a)}if(n.fontFamily&&(i.style.setProperty(\"font-family\",String(n.fontFamily),\"important\"),i.style.setProperty(\"--deneb-font-family\",String(n.fontFamily))),n.lineHeight&&(i.style.setProperty(\"line-height\",String(n.lineHeight),\"important\"),i.style.setProperty(\"--deneb-line-height\",String(n.lineHeight))),n.fontWeight&&(i.style.setProperty(\"font-weight\",String(n.fontWeight),\"important\"),i.style.setProperty(\"--deneb-font-weight\",String(n.fontWeight))),n.backgroundColor&&(i.style.setProperty(\"background-color\",String(n.backgroundColor),\"important\"),i.style.setProperty(\"background\",String(n.backgroundColor),\"important\"),i.style.setProperty(\"--deneb-card-bg\",String(n.backgroundColor))),n.borderRadius){const a=o(n.borderRadius);i.style.setProperty(\"border-radius\",a,\"important\"),i.style.setProperty(\"--deneb-card-radius\",a)}if(n.padding){const a=o(n.padding);i.style.setProperty(\"padding\",a,\"important\"),i.style.setProperty(\"--deneb-card-pt\",a)}if(n.boxShadow&&(i.style.setProperty(\"box-shadow\",String(n.boxShadow),\"important\"),i.style.setProperty(\"--deneb-card-shadow\",String(n.boxShadow))),n.borderColor&&(i.style.setProperty(\"border-color\",String(n.borderColor),\"important\"),i.style.setProperty(\"--deneb-card-border-c\",String(n.borderColor))),n.borderWidth){const a=o(n.borderWidth);i.style.setProperty(\"border-width\",a,\"important\"),i.style.setProperty(\"border-style\",\"solid\",\"important\"),i.style.setProperty(\"--deneb-card-border-w\",a)}n.marginTop&&i.style.setProperty(\"margin-top\",o(n.marginTop),\"important\"),n.marginBottom&&i.style.setProperty(\"margin-bottom\",o(n.marginBottom),\"important\"),n.marginLeft&&i.style.setProperty(\"margin-left\",o(n.marginLeft),\"important\"),n.marginRight&&i.style.setProperty(\"margin-right\",o(n.marginRight),\"important\")}}__name(qe,\"applyElementStyleDirectly\");function _t(t,e){if(e?.contentOnly){const n=t&&typeof t==\"object\"&&!Array.isArray(t)?t:null;Ve(n?.content??t);return}if(ct!==null&&(window.clearTimeout(ct),ct=null),lt!==null&&(window.clearTimeout(lt),lt=null),Xt){Tt=t,Zt=e;return}Xt=!0;try{if(vt(t,{immediate:e?.persistImmediate}),oe(t),wt(t,{colorReplacements:e?.colorReplacements===!0}),Pt(t,{fanOut:e?.fanOut===!0}),e?.scheduleRelays!==!1){Me();for(const n of Tn)Qt.push(window.setTimeout(()=>{v!=null&&Pt(v,{fanOut:!0})},n))}}finally{if(Xt=!1,Tt!=null){const n=Tt,r=Zt;Tt=null,Zt=void 0,window.setTimeout(()=>{_t(n,r)},0)}}}__name(_t,\"publishSiteData\");function Be(t){const e=t?.full!==!1,n=\"ontouchstart\"in window||navigator.maxTouchPoints>0||navigator.hardwareConcurrency!=null&&navigator.hardwareConcurrency<=4;window.requestAnimationFrame(()=>{window.requestAnimationFrame(()=>{try{W({type:Z,full:e}),W({type:at,full:e})}catch{}const r=v;if(r==null)return;const o=__name(()=>wt(r,{colorReplacements:!0}),\"run\");if(!n){window.setTimeout(o,0);return}const i=window.requestIdleCallback;typeof i==\"function\"?i(o,{timeout:4e3}):window.setTimeout(o,1200)})})}__name(Be,\"acknowledgeSiteDataApplied\");const Rn=(()=>{try{return window.location.ancestorOrigins?.item(0)??null}catch{return null}})(),$n=(()=>{try{return window.parent!==window?window.parent.location.origin:null}catch{return null}})();let dt=I({currentOrigin:window.location.origin,referrer:document.referrer,rememberedOrigin:te(),ancestorOrigin:Rn,accessibleParentOrigin:$n});ee(dt);function We(t){if(t.source!==window.parent)return!1;if(dt)return t.origin===dt;try{const e=new URL(t.origin).origin;return e===\"null\"?!1:(dt=e,ee(e),!0)}catch{return!1}}__name(We,\"isTrustedParentMessage\");function W(t){window.parent.postMessage(t,dt??\"*\")}__name(W,\"postToParent\");function mt(t,e,n=0){t.requestId&&(W({type:R,requestId:t.requestId,result:e,fieldPath:t.fieldPath??null,pageRoute:t.pageRoute??null,occurrences:n}),W({type:T,requestId:t.requestId,result:e,fieldPath:t.fieldPath??null,pageRoute:t.pageRoute??null,occurrences:n}))}__name(mt,\"postFocusResult\");function bt(){try{W({type:N,pathname:window.location.pathname}),W({type:X,pathname:window.location.pathname})}catch{}}__name(bt,\"announceReady\");async function je(t){const e=++_e,r=(t&&typeof t==\"object\"&&!Array.isArray(t)?t:null)?.colorReplacements,o=document.getElementById(ve);if(!r||typeof r!=\"object\"||Array.isArray(r)||Object.keys(r).length===0){o?.remove();return}const i=Array.from(document.querySelectorAll('link[rel=\"stylesheet\"][href]')),a=await Promise.all(i.map(async p=>{const g=p.href;let w=Ie.get(g);if(w===void 0){const A=await fetch(g,{credentials:\"same-origin\"});if(!A.ok)return\"\";w=await A.text(),Ie.set(g,w)}const b=_(w,r);return b===w?\"\":b}));if(e!==_e)return;const d=a.filter(Boolean).join(`\n`);if(!d){o?.remove();return}const f=o instanceof HTMLStyleElement?o:document.createElement(\"style\");f.id=ve,f.textContent=d,f.isConnected||document.head.appendChild(f)}__name(je,\"applyTemplateColorReplacements\");function wt(t,e){const n=t&&typeof t==\"object\"&&!Array.isArray(t)?t:null,r=n?.template&&typeof n.template==\"object\"&&!Array.isArray(n.template)?n.template:null,o=r?.structure&&typeof r.structure==\"object\"&&!Array.isArray(r.structure)?r.structure:null,i=o?.theme&&typeof o.theme==\"object\"&&!Array.isArray(o.theme)?o.theme:r?.theme&&typeof r.theme==\"object\"&&!Array.isArray(r.theme)?r.theme:null,a=(()=>{try{return JSON.stringify(i??null)}catch{return String(Date.now())}})();if(a!==Re){Re=a;const f=O(i),p=document.getElementById(C);if(!f)p?.remove();else{const g=p instanceof HTMLStyleElement?p:document.createElement(\"style\");g.id=C,g.textContent=f,g.isConnected||document.head.appendChild(g)}}if(e?.colorReplacements){if(a===$e)return;$e=a,je(i).catch(()=>{})}}__name(wt,\"applyUniversalTheme\");function oe(t){const e=ke(t);e!==Oe&&(Oe=e,H(t,document),window.setTimeout(()=>H(t,document),300))}__name(oe,\"applySelectedPages\");function x(t){return String(t??\"\").trim().replace(/\\s+/g,\" \").toLowerCase()}__name(x,\"normalizeText\");function Rt(t){const e=String(t??\"\").trim();if(!e)return[];const n=e.split(/[,;|\\n\\r]+/).map(r=>x(r)).filter(r=>r.length>=3);return Array.from(new Set([x(e),...n])).filter(r=>r.length>=2)}__name(Rt,\"valueFragments\");function $t(t,e){const n=x(e),r=x(t);return/image|photo|logo|banner|thumbnail|cover/.test(n)||/^(https?:|data:|blob:|\\/)/.test(r)}__name($t,\"isImageValue\");function Ue(t){const e=new Set,n=t.getAttribute(\"src\")||\"\";n&&e.add(n),\"src\"in t&&t.src&&e.add(t.src),\"currentSrc\"in t&&t.currentSrc&&e.add(t.currentSrc);const r=t.getAttribute(\"srcset\");r&&r.split(\",\").forEach(o=>{const i=o.trim().split(/\\s+/)[0];i&&e.add(i)});for(const o of[\"data-src\",\"data-original\",\"data-fallback\",\"data-nimg\",\"data-image\",\"data-url\"]){const i=t.getAttribute(o);i&&i!==\"1\"&&e.add(i)}if(t.style.backgroundImage){const o=t.style.backgroundImage.match(/url\\([\"']?([^\"']+)[\"']?\\)/i);o?.[1]&&e.add(o[1])}for(const o of Array.from(e))try{const a=new URL(o,window.location.href).searchParams.get(\"url\");if(a){e.add(a);try{e.add(decodeURIComponent(a))}catch{}}}catch{}return Array.from(e).filter(Boolean)}__name(Ue,\"extractImageCandidates\");function ae(t,e){const n=String(e??\"\").trim();if(!n)return!1;const r=Ue(t);if(r.length===0)return!1;const i=n.split(\"?\")[0].replace(/\\\\/g,\"/\").split(\"/\").pop()?.toLowerCase();for(const a of r){if(a===n)return!0;try{if(new URL(a,window.location.href).href===new URL(n,window.location.href).href)return!0}catch{}if(a.includes(n)||n.includes(a))return!0;try{const p=decodeURIComponent(a);if(p.includes(n)||n.includes(p))return!0}catch{}const f=a.split(\"?\")[0].replace(/\\\\/g,\"/\").split(\"/\").pop()?.toLowerCase();if(f&&i&&f.length>=3&&f===i)return!0}return!1}__name(ae,\"imageMatchesValue\");function se(t,e){return Array.from(t.querySelectorAll(\"img\")).filter(n=>ae(n,e))}__name(se,\"findImageMatches\");function Ot(t,e){const n=String(e??\"\").trim();return n?[t.getAttribute(\"href\"),t.getAttribute(\"src\"),t.getAttribute(\"poster\"),t.getAttribute(\"srcset\"),t.style.backgroundImage].filter(o=>!!o).some(o=>{if(o===n||o.includes(n))return!0;try{return new URL(o,window.location.href).href===new URL(n,window.location.href).href}catch{return!1}}):!1}__name(Ot,\"attributeMatchesValue\");function Mt(t,e){return Array.from(t.querySelectorAll('a[href], img[src], source[src], video[poster], [style*=\"background-image\"]')).filter(n=>Ot(n,e))}__name(Mt,\"findAttributeMatches\");function ze(t,e){const n=Rt(e);if(n.length===0)return[];const r=Array.from(t.querySelectorAll(_n)),o=r.filter(i=>{const a=x(i.textContent);return n.some(d=>a===d)});return o.length>0?o:r.filter(i=>{const a=x(i.textContent);return n.some(d=>a.includes(d)||d.includes(a))})}__name(ze,\"findTextMatches\");function Lt(t,e,n){if($t(e,n)){const r=se(t,e);if(r.length>0)return r}return ze(t,e)}__name(Lt,\"findValueMatches\");function Ke(t,e,n){if($t(e,n)&&se(t,e).length>0)return!0;const r=x(t.textContent);return Rt(e).some(o=>r.includes(o))}__name(Ke,\"subtreeContainsValue\");function Ye(t,e){const n=t[0];if(!n)return null;let r=n;for(;r;){if(t.every(o=>r?.contains(o)))return r;if(r===e)break;r=r.parentElement}return e??n}__name(Ye,\"lowestCommonAncestor\");function ut(t){const e=String(t??\"\").trim();if(!e)return[];const n=e.replace(/\\[(\\d+)\\]/g,\".$1\"),r=n.replace(/\\.(\\d+)(?=\\.|$)/g,\"[$1]\");return Array.from(new Set([e,n,r]))}__name(ut,\"pathVariants\");function ce(t){return Array.from(new Set([t.fieldPath,...t.fieldPaths??[]].filter(e=>!!(e&&e.trim())).flatMap(e=>ut(e))))}__name(ce,\"focusPathCandidates\");function At(t){if(t.closest(\"[hidden]\"))return!1;let e=t;for(;e&&e!==document.documentElement;){const r=window.getComputedStyle(e);if(r.display===\"none\"||r.visibility===\"hidden\"||Number(r.opacity)===0||r.maxHeight===\"0px\"||r.maxHeight===\"0\")return!1;const o=e.getBoundingClientRect();if((r.overflow===\"hidden\"||r.overflow===\"clip\")&&(o.width<2||o.height<2))return!1;e=e.parentElement}const n=t.getBoundingClientRect();return n.width>=2&&n.height>=2}__name(At,\"isVisuallyHighlightable\");function le(t){let e=0;At(t)&&(e+=100);const n=x(t.textContent);n.length>=2&&(e+=40),t.tagName===\"IMG\"&&(e+=35),t.closest(\"main, footer, header, [data-preview-page-key]\")&&(e+=20),t.closest('.fixed, [class*=\"fixed\"]')&&n.length<2&&t.tagName!==\"IMG\"&&(e-=25);const r=t.getBoundingClientRect();return e+=Math.min(15,Math.floor(r.width*r.height/400)),e}__name(le,\"highlightTargetScore\");function de(t){return[...t].sort((e,n)=>le(n)-le(e))}__name(de,\"rankHighlightTargets\");function Je(t,e){const n=[],r=Array.from(new Set([t,...e??[]].filter(a=>!!a).flatMap(a=>ut(a))));for(const a of r){const d=CSS.escape(a);document.querySelectorAll('[data-preview-field-path=\"'+d+'\"], [data-preview-list-path=\"'+d+'\"], [data-content-path=\"'+d+'\"]').forEach(f=>{n.includes(f)||n.push(f)})}const o=de(n.filter(a=>At(a))),i=o.filter(a=>!o.some(d=>d!==a&&a.contains(d)));return i.length>0?i:o}__name(Je,\"findExplicitTargets\");function ue(t){const e=(t?.itemValues??[]).filter(i=>x(i.value).length>=2&&i.key!==\"id\");if(e.length===0)return null;const n=[];for(const i of e)for(const a of Lt(document,i.value,i.key).slice(0,8))n.includes(a)||n.push(a);let r=null;for(const i of n){let a=i,d=0;for(;a&&a!==document.body&&d<12;){const f=e.reduce((w,b)=>w+(Ke(a,b.value,b.key)?1:0),0),p=a.getBoundingClientRect(),g=Math.max(1,p.width*p.height);(!r||f>r.score||f===r.score&&g<r.area)&&(r={target:a,score:f,area:g}),a=a.parentElement,d+=1}}const o=Math.min(2,e.length);return r&&r.score>=o?r.target:null}__name(ue,\"findItemContainer\");function kt(t,e,n){const r=Lt(t,e,n);if(r.length===0)return null;const o=Rt(e);if(o.length>1&&!$t(e,n)){const i=r.filter(a=>{const d=x(a.textContent);return o.slice(1).some(f=>d===f)});if(i.length>1)return Ye(i,t instanceof HTMLElement?t:null)}return r.sort((i,a)=>x(i.textContent).length-x(a.textContent).length)[0]}__name(kt,\"findFieldTarget\");function Ft(t,e){const n=String(t??e??\"\").trim().toLowerCase().replace(/\\s+/g,\"_\");return!n||n===\"common\"?\"home\":n===\"about\"?\"about_us\":n}__name(Ft,\"normalizePageKey\");function Xe(t){const e=t.replace(/_us$/,\"\"),n=['[data-preview-page-key=\"'+CSS.escape(t)+'\"]','[data-preview-page-key=\"'+CSS.escape(e)+'\"]',\"#\"+CSS.escape(t)+\"_view\",\"#\"+CSS.escape(e)+\"_view\",\"#\"+CSS.escape(t),\"#\"+CSS.escape(e),\"main\",\"body\"];for(const r of n){const o=document.querySelector(r);if(o instanceof HTMLElement)return o}return null}__name(Xe,\"findPageTarget\");function fe(t,e){const n=window.location.pathname.match(/^(\\/uploads\\/generated-sites\\/(?:template-preview|preview|live)\\/[^/]+)/),r=String(e??\"\").trim(),o=r?\"/\"+r.replace(/^\\/+|\\/+$/g,\"\"):null,i=o!==null?o===\"/\"?\"\":o:t===\"home\"?\"\":\"/\"+t.replace(/^\\/+/,\"\");return n?n[1]+i:i||\"/\"}__name(fe,\"resolvePath\");function pe(){for(const t of Jt)t.target.style.outline=t.outline,t.target.style.outlineOffset=t.outlineOffset,t.target.style.boxShadow=t.boxShadow,t.target.style.transition=t.transition,t.target.style.scrollMarginTop=t.scrollMarginTop,t.target.style.borderRadius=t.borderRadius,t.target.removeAttribute(q);Jt=[]}__name(pe,\"clearHighlight\");function Dt(t,e){pe(),Jt=t.map(n=>({target:n,outline:n.style.outline,outlineOffset:n.style.outlineOffset,boxShadow:n.style.boxShadow,transition:n.style.transition,scrollMarginTop:n.style.scrollMarginTop,borderRadius:n.style.borderRadius}));for(const n of t)n.setAttribute(q,\"true\"),n.style.scrollMarginTop=\"72px\",n.style.transition=\"outline-color 0.2s ease, box-shadow 0.2s ease\",n.style.outline=\"2px solid rgba(34, 197, 94, 0.98)\",n.style.outlineOffset=\"4px\",n.style.boxShadow=\"0 0 0 7px rgba(34, 197, 94, 0.2)\",n.style.borderRadius||(n.style.borderRadius=\"4px\");t[0]?.scrollIntoView({behavior:\"smooth\",block:e?\"start\":\"center\",inline:\"nearest\"})}__name(Dt,\"highlightTargets\");function Ze(t,e){Dt([t],e)}__name(Ze,\"highlight\");function Nt(t){return Array.from(new Set([t.fieldValue,...t.fieldMatchValues??[]].filter(e=>typeof e==\"boolean\"||typeof e==\"number\"||typeof e==\"string\"&&e.trim().length>0).map(e=>String(e))))}__name(Nt,\"focusMatchValues\");function Qe(t){const e=ce(t);if(e.length===0)return null;try{const n=JSON.parse(window.sessionStorage.getItem(Y)??\"{}\");for(const r of e){const o=n[`${window.location.pathname}|${r}`];if(!o)continue;const i=document.querySelector(o);if(!i)continue;const a=Nt(t).map(x),d=x(i.textContent);if(!(a.length>0&&d&&!a.some(f=>d===f||d.includes(f)||Ot(i,f))))return i}return null}catch{return null}}__name(Qe,\"findRememberedFocusTarget\");function St(t){if(!t)return null;if(At(t))return t;let e=t.parentElement;for(;e&&e!==document.body;){if(At(e))return e;e=e.parentElement}return null}__name(St,\"pickVisibleHeuristicTarget\");function ge(t){const e=ce(t),n=Je(t.fieldPath,e.filter(a=>a!==t.fieldPath));if(n.length>0)return{targets:n,result:\"exact\"};const r=St(Qe(t));if(r)return{targets:[r],result:\"heuristic\"};const o=ue(t.fieldContext),i=t.fieldContext?.fieldKey;if(o){for(const d of Nt(t)){const f=St(Mt(o,d)[0]??kt(o,d,i));if(f)return{targets:[f],result:\"heuristic\"}}const a=St(o);if(a)return{targets:[a],result:\"heuristic\"}}for(const a of Nt(t)){const d=Mt(document,a),f=kt(document,a,i),p=f?[...d,f]:d,g=de(p.map(w=>St(w)).filter(w=>!!w));if(g.length>0)return{targets:[g[0]],result:\"heuristic\"}}return null}__name(ge,\"resolveFieldTarget\");function me(){document.documentElement.dataset.fivoraPreview=\"true\",document.querySelectorAll(\".reveal-on-scroll:not(.reveal-active)\").forEach(t=>t.classList.add(\"reveal-active\"))}__name(me,\"activateRevealNodes\");function ft(t,e=0){me();const n=!!t.fieldPath;if(t.focusOnly&&n){const a=ge(t);if(a){Dt(a.targets,!1),mt(t,a.result,a.targets.length);return}if(e<12){window.setTimeout(()=>ft(t,e+1),120);return}mt(t,\"missing\");return}const r=Ft(t.pageKey,t.pageLabel),o=Xe(r);if(!o){e<12?window.setTimeout(()=>ft(t,e+1),120):mt(t,\"missing\");return}const i=n?ge(t):null;if(n&&!i&&e<12){window.setTimeout(()=>ft(t,e+1),120);return}i?(Dt(i.targets,!1),mt(t,i.result,i.targets.length)):(Ze(o,!0),mt(t,\"page\",1))}__name(ft,\"applyFocus\");function tn(t){if(t.focusOnly){gt(),window.setTimeout(()=>ft(t),80);return}const e=Ft(t.pageKey,t.pageLabel),n=fe(e,t.pageRoute);if((window.location.pathname.replace(/\\/+$/,\"\")||\"/\")!==n){try{window.sessionStorage.setItem(ot,JSON.stringify({...t,awaitingNavigation:!0}))}catch{}window.location.assign(n);return}gt(),window.setTimeout(()=>ft(t),80)}__name(tn,\"handleFocus\");function he(t){return x(t).replace(/\\.html$/i,\"\").replace(/[^a-z0-9]+/g,\"-\")}__name(he,\"normalizeRouteToken\");function en(){const t=window.location.pathname.split(\"/\").map(i=>decodeURIComponent(i).trim()).filter(Boolean);if(t.length<2||G.length===0)return;const e=G.filter(i=>{const a=i.context;if(!a?.collectionPath||!a.fieldKey)return!1;const d=a.collectionPath.split(\".\").at(-1)??\"\",f=t.lastIndexOf(d);if(f<0||f>=t.length-1)return!1;const p=he(t.at(-1)??\"\");return a.itemValues.some(({key:g,value:w})=>{const b=x(g).replace(/[^a-z0-9]/g,\"\");return b!==\"id\"&&!b.endsWith(\"id\")&&b!==\"slug\"&&b!==\"name\"&&b!==\"title\"?!1:he(w)===p})});if(e.length===0)return;const n=Array.from(document.querySelectorAll(`[${U}]`)),r=[];for(const i of e){const a=i.context,d=a.fieldKey,f=x(d).replace(/[^a-z0-9]/g,\"\");if(f===\"slug\"||f===\"identifier\"||f.endsWith(\"id\"))continue;const p=a.collectionPath.split(\".\").at(-1)??\"\",g=x(p).replace(/s$/,\"\"),w=d.replace(/([a-z0-9])([A-Z])/g,\"$1 $2\").split(/[^a-z0-9]+/i).map(x).filter(A=>A&&![\"url\",\"text\",\"value\"].includes(A)),b=x(i.value);for(const A of n){const L=x(A.getAttribute(U));if(!L||!L.includes(g))continue;let K=0;const Wt=w.filter(et=>L.includes(et));Wt.length>0&&(K+=40+Wt.length*5);const jt=A.tagName===\"IMG\"?x(A.getAttribute(\"src\")??A.getAttribute(\"alt\")):x(A.textContent);b&&jt===b?K+=120:b.length>=3&&jt.includes(b)&&(K+=80),/image|photo|logo|banner|thumbnail|cover/i.test(d)&&A.tagName===\"IMG\"&&L.includes(\"image\")&&(K+=120),K>=40&&r.push({element:A,field:i,score:K})}}r.sort((i,a)=>a.score-i.score);const o=new Set;for(const{element:i,field:a}of r)if(!o.has(i)){if(o.add(i),i.tagName!==\"IMG\"){const d=i.textContent??\"\",f=String(a.value??\"\"),p=d.toLowerCase().indexOf(f.toLowerCase());f&&p>=0&&d!==f&&(i.setAttribute(\"data-fivora-value-prefix\",d.slice(0,p)),i.setAttribute(\"data-fivora-value-suffix\",d.slice(p+f.length)))}i.removeAttribute(U),i.setAttribute(\"data-preview-field-path\",a.path),ie(a.path,a.value)}}__name(en,\"promoteActiveRouteDetailFields\");const On=\"FIVORA_PREVIEW_ELEMENT_CLICKED\",Mn=c(\"ELEMENT_CLICKED\"),Ln=\"FIVORA_PREVIEW_FIELD_CHANGED\",kn=c(\"FIELD_CHANGED\"),Fn=\"FIVORA_PREVIEW_EDIT_MODE\",Dn=c(\"EDIT_MODE\"),Nn=\"FIVORA_PREVIEW_FLUSH_EDIT\",Hn=c(\"FLUSH_EDIT\"),Vn=\"FIVORA_PREVIEW_EDIT_FLUSHED\",Gn=c(\"EDIT_FLUSHED\"),qn=\"h1, h2, h3, h4, h5, h6, p, span, a, button, address, li, dt, dd, label, strong, em, small, img\",Ht=\"ontouchstart\"in window||navigator.maxTouchPoints>0||window.matchMedia&&window.matchMedia(\"(pointer: coarse)\").matches,Jn=(()=>{const t=navigator.userAgent||\"\",e=navigator.vendor||\"\";if(/iP(ad|hone|od)/i.test(t)||/Safari/i.test(t)&&/Apple Computer/i.test(e)&&!/Chrom(e|ium)/i.test(t))return!0;try{return!!window.safari}catch{return!1}})(),Bn=(()=>{try{const t=document.createElement(\"div\");return t.setAttribute(\"contenteditable\",\"plaintext-only\"),t.contentEditable===\"plaintext-only\"}catch{return!1}})(),Wn=Ht||navigator.hardwareConcurrency!=null&&navigator.hardwareConcurrency<=4||typeof navigator.deviceMemory==\"number\"&&(navigator.deviceMemory??8)<=4,jn=!0;let G=[];window.addEventListener(\"message\",t=>{if(!We(t)||t.data&&typeof t.data==\"object\"&&t.data.__fivoraBridgeRelay===!0)return;if(t.data?.type===k||t.data?.type===$){t.stopImmediatePropagation(),tn(t.data);return}if((t.data?.type===y||t.data?.type===M)&&t.data.siteData){const a=t.data.full!==!1;if(t.data.contentOnly===!0){_t(t.data.siteData,{contentOnly:!0});return}_t(t.data.siteData,{fanOut:!1,colorReplacements:!1}),Be({full:a});return}if(t.data?.type===En||t.data?.type===xn){const a=t.data.patches;Array.isArray(a)&&He(a);return}if(t.data?.type===Cn||t.data?.type===\"DENEB_PREVIEW_STYLE_PATCH\"){const a=t.data,d=typeof a.fieldPath==\"string\"?a.fieldPath:typeof a.targetPath==\"string\"?a.targetPath:\"\",f=a.styles??a.properties;d&&f&&Ge(d,f);return}if(t.data?.type===Fn||t.data?.type===Dn){G=Array.isArray(t.data.fields)?t.data.fields:[],en(),t.data.editMode?(yn(),window.setTimeout(()=>we(),50)):bn();return}(t.data?.type===Nn||t.data?.type===Hn)&&(pt(!0),W({type:Vn,requestId:t.data.requestId}),W({type:Gn,requestId:t.data.requestId}))},!0);try{const t=JSON.parse(window.sessionStorage.getItem(ot)??\"null\");if(t?.awaitingNavigation){const e=Ft(t.pageKey,t.pageLabel),n=fe(e,t.pageRoute),r=window.location.pathname.replace(/\\/+$/,\"\")||\"/\";gt(),r===n&&window.setTimeout(()=>ft(t),220)}else t&&gt()}catch{gt()}try{const t=JSON.parse(window.sessionStorage.getItem(S)??window.sessionStorage.getItem(z)??\"null\");if(t){v=t;try{window[l]=t,window[m]=t}catch{}Wn||(oe(t),wt(t,{colorReplacements:!1}))}}catch{}let j=!1,Q=null,nt=null,Vt=null,J=null,Et=[],rt=null;function ye(){if(document.querySelector(\"[data-fivora-empty-editable-styles]\"))return;const t=document.createElement(\"style\");t.setAttribute(\"data-fivora-empty-editable-styles\",\"true\"),t.textContent=`\n [${P}=\"true\"] {\n min-width: 7rem !important;\n min-height: 1.25em !important;\n outline: 1px dashed rgba(37, 99, 235, 0.28) !important;\n outline-offset: 3px !important;\n }\n span[${P}=\"true\"],\n a[${P}=\"true\"],\n strong[${P}=\"true\"],\n em[${P}=\"true\"],\n small[${P}=\"true\"],\n label[${P}=\"true\"] {\n display: inline-block !important;\n }\n [${P}=\"true\"]:empty::before {\n content: \"\";\n color: rgba(37, 99, 235, 0.78);\n font: 500 12px/1.4 system-ui, sans-serif;\n letter-spacing: normal;\n text-transform: none;\n white-space: nowrap;\n }\n [${P}=\"true\"]:empty:hover::before {\n content: \"Click to add text\";\n }\n [${V}=\"true\"] {\n min-width: 10rem !important;\n min-height: 3.5rem !important;\n outline: 1px dashed rgba(37, 99, 235, 0.28) !important;\n outline-offset: 3px !important;\n }\n [${V}=\"true\"]:empty::before {\n content: \"\";\n display: inline-flex;\n align-items: center;\n min-height: 3.5rem;\n color: rgba(37, 99, 235, 0.78);\n font: 500 12px/1.4 system-ui, sans-serif;\n letter-spacing: normal;\n text-transform: none;\n white-space: nowrap;\n }\n [${V}=\"true\"]:empty:hover::before {\n content: \"Click to add the first item\";\n }\n `,document.head.appendChild(t)}__name(ye,\"ensureEmptyEditableStyles\");function nn(t){if(t.id)return\"#\"+CSS.escape(t.id);const e=[];let n=t;for(;n&&n!==document.body;){const r=n.tagName.toLowerCase(),o=n.parentElement?Array.from(n.parentElement.children).filter(a=>a.tagName===n?.tagName):[],i=o.indexOf(n)+1;e.unshift(o.length>1?`${r}:nth-of-type(${i})`:r),n=n.parentElement}return e.length>0?`body > ${e.join(\" > \")}`:\"\"}__name(nn,\"buildStructuralSelector\");function Gt(){try{const t=JSON.parse(window.sessionStorage.getItem(Y)??\"{}\");return t&&typeof t==\"object\"?t:{}}catch{return{}}}__name(Gt,\"readResolvedTargetSelectors\");function rn(t,e){const n=nn(t);if(!n)return;const r=Gt();r[`${window.location.pathname}|${e}`]=n;try{window.sessionStorage.setItem(Y,JSON.stringify(r))}catch{}}__name(rn,\"rememberResolvedTarget\");function Un(){const t=Gt(),e=`${window.location.pathname}|`;let n=!1;for(const r of Object.keys(t))r.startsWith(e)&&(delete t[r],n=!0);if(n)try{window.sessionStorage.setItem(Y,JSON.stringify(t))}catch{}}__name(Un,\"forgetResolvedTargetsForCurrentPage\");function be(){document.querySelectorAll(`[${F}]`).forEach(t=>{J?.target!==t&&(t.removeAttribute(F),t.removeAttribute(P),t.removeAttribute(V))})}__name(be,\"clearResolvedEditableTargets\");function ht(t,e,n=!0){const r=t.getAttribute(F),o=t.getAttribute(\"data-preview-field-path\")??t.getAttribute(B)??t.getAttribute(\"data-content-path\")??t.getAttribute(\"data-field-path\");if(r&&r!==e.path&&o!==e.path)return!1;t.setAttribute(F,e.path);const i=String(e.value??\"\").trim().length===0&&x(t.textContent).length===0;j&&i&&t.tagName!==\"IMG\"?t.setAttribute(P,\"true\"):t.removeAttribute(P);const a=e.kind===\"collection\"||e.type===\"list\",d=e.collection?.length;return j&&a&&(d===0||t.childElementCount===0)?(t.setAttribute(V,\"true\"),t.removeAttribute(P)):t.removeAttribute(V),n&&!a&&rn(t,e.path),!0}__name(ht,\"annotateEditableTarget\");function tt(t){const e=[t.value,...t.matchValues??[]].filter(n=>typeof n==\"number\"||typeof n==\"string\"&&n.trim().length>0);return Array.from(new Set(e.map(n=>String(n))))}__name(tt,\"editableFieldMatchValues\");function on(t){for(const e of ut(t)){const n=CSS.escape(e),r=document.querySelector(`[data-preview-field-path=\"${n}\"], [${B}=\"${n}\"], [data-content-path=\"${n}\"], [data-field-path=\"${n}\"], [${F}=\"${n}\"]`);if(r)return r}return null}__name(on,\"findExplicitEditableTarget\");function an(t){if(t.kind===\"collection\"||t.type===\"list\")return null;const n=Gt()[`${window.location.pathname}|${t.path}`];if(!n)return null;try{const r=document.querySelector(n);if(!r)return null;const o=tt(t).map(x),i=x(r.textContent);return o.length>0&&i&&!o.includes(i)?null:(ht(r,t,!1),r)}catch{return null}}__name(an,\"restoreRememberedTarget\");function sn(t){if(t.kind===\"collection\"||t.type===\"list\")return null;const n=(t.context?ue({collectionPath:t.context.collectionPath,itemIndex:t.context.itemIndex,fieldKey:t.context.fieldKey,itemValues:t.context.itemValues}):null)??document;for(const r of tt(t)){const o=kt(n,r,t.context?.fieldKey),i=[...Mt(n,r),...o?[o]:[],...Lt(n,r,t.context?.fieldKey)];for(const a of i){if(a.closest(`[${U}]`))continue;const d=a.getAttribute(F);if(!d||d===t.path)return a}}return null}__name(sn,\"inferEditableTarget\");function cn(t){if(j){ye(),me();for(const e of G){const n=on(e.path)??an(e)??(t?.explicitOnly?null:sn(e));n&&ht(n,e)}}}__name(cn,\"indexEditableTargets\");let qt=!1;function we(){for(const e of Et)window.clearTimeout(e);if(Et=[],rt!==null){const e=window.cancelIdleCallback;typeof e==\"function\"?e(rt):window.clearTimeout(rt),rt=null}if(qt)return;qt=!0;const t=__name((e,n)=>{n&&(qt=!1),e&&be(),cn({explicitOnly:e})},\"runPass\");Et=[window.setTimeout(()=>{t(!0,!0)},0)]}__name(we,\"scheduleEditableTargetIndex\");function ln(){const t=document.createElement(\"div\");return t.setAttribute(\"data-fivora-edit-badge\",\"true\"),t.innerHTML=\"\\u270F\\uFE0F\",Object.assign(t.style,{position:\"fixed\",zIndex:\"2147483647\",width:\"28px\",height:\"28px\",display:\"flex\",alignItems:\"center\",justifyContent:\"center\",fontSize:\"14px\",borderRadius:\"8px\",background:\"rgba(37, 99, 235, 0.92)\",color:\"#fff\",cursor:\"pointer\",pointerEvents:\"auto\",boxShadow:\"0 2px 8px rgba(0,0,0,0.18)\",opacity:\"0\",transition:\"opacity 0.15s ease\",userSelect:\"none\"}),t.setAttribute(\"title\",\"Edit this content\"),t.setAttribute(\"aria-label\",\"Edit this content\"),document.body.appendChild(t),t}__name(ln,\"createHoverBadge\");function dn(t){if(!Q)return;const e=t.getBoundingClientRect();Q.style.top=`${Math.max(4,e.top-4)}px`,Q.style.left=`${Math.min(window.innerWidth-36,e.right-32)}px`,Q.style.opacity=\"1\"}__name(dn,\"positionBadge\");function xt(){Vt&&(Vt(),Vt=null),Q&&(Q.style.opacity=\"0\"),nt=null}__name(xt,\"clearHoverOverlay\");function un(t){if(t===nt)return;xt(),nt=t;const e=t.style.outline,n=t.style.outlineOffset,r=t.style.cursor;t.style.outline=\"2px dashed rgba(37, 99, 235, 0.6)\",t.style.outlineOffset=\"2px\",t.style.cursor=\"pointer\",Vt=__name(()=>{t.style.outline=e,t.style.outlineOffset=n,t.style.cursor=r},\"hoverOutlineCleanup\"),dn(t)}__name(un,\"applyHoverOverlay\");function Ae(t){let e=t instanceof Element?t:null;for(;e&&!(e instanceof HTMLElement);)e=e.parentElement;let n=e;for(;n&&n!==document.body;){if(n.hasAttribute(U)){n=n.parentElement;continue}if(n.hasAttribute(\"data-preview-field-path\")||n.hasAttribute(B)||n.hasAttribute(D)||n.hasAttribute(\"data-content-path\")||n.hasAttribute(\"data-field-path\")||n.hasAttribute(F)||n.matches(qn)){const o=Bt(n);if(o)return{element:n,field:o}}n=n.parentElement}return null}__name(Ae,\"findEditableTarget\");function Bt(t){if(t.closest(`[${U}]`))return null;const e=t.getAttribute(\"data-preview-field-path\")??t.getAttribute(\"data-content-path\")??t.getAttribute(\"data-field-path\")??t.getAttribute(F);if(e)return G.find(g=>ut(g.path).includes(e))??{path:e,label:e.split(\".\").pop()??\"Content\",type:t.tagName===\"IMG\"?\"image\":\"text\",value:t.tagName===\"IMG\"?t.src:t.textContent?.trim()??\"\"};const n=t.getAttribute(D);if(n){const p=n.match(/^(.+)\\[(\\d+)\\]$/);if(p){const g=p[1],w=Number(p[2]),b=G.find(A=>(A.kind===\"collection\"||A.type===\"list\")&&ut(A.path).includes(g));if(b)return{...b,collection:{listPath:g,itemIndex:w,length:b.collection?.length??0,minItems:b.collection?.minItems,maxItems:b.collection?.maxItems,itemLabel:b.collection?.itemLabel}}}}const r=t.getAttribute(B);if(r)return G.find(g=>(g.kind===\"collection\"||g.type===\"list\")&&ut(g.path).includes(r))??{kind:\"collection\",path:r,label:r.split(\".\").pop()??\"Collection\",type:\"list\",value:0,collection:{listPath:r,length:t.children.length}};const o=t.tagName===\"IMG\"?t:t.querySelector(\"img\");if(o){const p=G.find(b=>b.type===\"image\"&&tt(b).some(A=>ae(o,A)));if(p)return p;const g=Se(o);if(g.collectionPath&&typeof g.itemIndex==\"number\"){const b=G.find(A=>A.type===\"image\"&&A.context?.collectionPath===g.collectionPath&&A.context?.itemIndex===g.itemIndex);if(b)return b}const w=o.closest('section, article, [data-preview-page-key], main, header, footer, .card, [class*=\"section\"]');if(w){const b=w.getAttribute(\"data-preview-field-path\")||w.getAttribute(\"data-content-path\")||w.getAttribute(\"data-field-path\")||w.getAttribute(F);if(b){const A=b.split(\".\")[0],L=G.find(K=>K.type===\"image\"&&(K.path.startsWith(`${A}.`)||K.path.startsWith(`${b}.`)));if(L)return L}}if(t.tagName===\"IMG\"){const b=G.filter(L=>L.type===\"image\");if(b.length===1)return b[0];const A=o.getAttribute(\"src\")||o.src||\"\";return{path:e||\"image\",label:(e||\"\").split(\".\").pop()||\"Image\",type:\"image\",value:A}}}const i=G.filter(p=>tt(p).some(g=>Ot(t,g)));if(i.length===1)return i[0];const a=x(t.textContent);if(!a)return null;const d=G.filter(p=>typeof p.value!=\"boolean\"&&tt(p).some(g=>x(g)===a));if(d.length===1)return d[0];const f=G.filter(p=>typeof p.value==\"boolean\"?!1:tt(p).some(g=>{const w=x(g);return w.length>=3&&a.includes(w)})).sort((p,g)=>Math.max(...tt(g).map(w=>x(w).length),0)-Math.max(...tt(p).map(w=>x(w).length),0));return f.length===1?f[0]:null}__name(Bt,\"resolveEditableField\");function fn(t,e){return t.tagName!==\"IMG\"&&t.childElementCount===0&&![\"INPUT\",\"TEXTAREA\",\"SELECT\",\"OPTION\",\"VIDEO\",\"AUDIO\",\"IFRAME\"].includes(t.tagName)&&!e.context&&![\"image\",\"color\",\"boolean\",\"select\",\"list\"].includes(e.type??\"text\")}__name(fn,\"canEditInline\");function pn(t){let e=t;for(;e&&e!==document.body;){const n=e.getAttribute(\"data-preview-field-path\")??e.getAttribute(B)??e.getAttribute(\"data-content-path\")??e.getAttribute(\"data-field-path\")??e.getAttribute(F);if(n)return n;e=e.parentElement}return null}__name(pn,\"extractFieldPath\");function Se(t){let e=t;for(;e&&e!==document.body;){const n=e.getAttribute(D);if(n){const i=n.match(/^(.+)\\[(\\d+)\\]$/);if(i)return{collectionPath:i[1],itemIndex:Number(i[2])}}const r=e.getAttribute(\"data-preview-field-path\")??e.getAttribute(\"data-content-path\")??e.getAttribute(\"data-field-path\")??e.getAttribute(F);if(r){const i=r.match(/^(.+)\\[(\\d+)\\]/);if(i)return{collectionPath:i[1],itemIndex:Number(i[2])}}const o=e.getAttribute(B);if(o)return{collectionPath:o,itemIndex:null};e=e.parentElement}return{collectionPath:null,itemIndex:null}}__name(Se,\"extractCollectionContext\");function Ee(t,e){const n=[],r=new Set(e?.path?[e.path]:[]);let o=t,i=0;for(;o&&o!==document.body&&i<3&&!(o.hasAttribute(U)||i>0&&(o.hasAttribute(D)||o.hasAttribute(B)||o.tagName===\"SECTION\"));){if(o.hasAttribute(\"data-preview-field-path\")||o.hasAttribute(\"data-content-path\")||o.hasAttribute(\"data-field-path\")||o.hasAttribute(F)){const a=Bt(o);a?.path&&a.kind!==\"collection\"&&a.type!==\"list\"&&!r.has(a.path)&&(r.add(a.path),n.push({path:a.path,label:a.label??a.path.split(\".\").pop()??\"Content\",type:a.type??\"text\"}))}o=o.parentElement,i+=1}return n}__name(Ee,\"findRelatedAncestorFields\");function gn(t,e,n=Ee(t,e)){const r=t.getBoundingClientRect(),o=window.getComputedStyle(t),i=t.tagName===\"IMG\",a=e?.path??pn(t),d=i?t.src:t.textContent?.trim()??\"\",f=Se(t);let p=e?.collection?.listPath??e?.collection?.path??e?.context?.collectionPath??f.collectionPath,g=e?.collection?.itemIndex??e?.context?.itemIndex??f.itemIndex;p&&a&&e?.kind!==\"collection\"&&!a.startsWith(`${p}[`)&&!a.startsWith(`${p}.`)&&a!==p&&(p=null,g=null);const w=e?.context?.itemPath??(p&&typeof g==\"number\"?`${p}[${g}]`:null),b=__name(Ct=>String(Ct??\"\").trim().replace(/[^a-zA-Z0-9_.-]+/g,\"-\").replace(/^-+|-+$/g,\"\").slice(0,64),\"safeScopePart\"),A=[],L=__name((Ct,zt,Kt)=>{!zt||A.some(Yt=>Yt.key===zt)||A.push({kind:Ct,key:zt,label:Kt})},\"pushStyleScope\");L(\"element\",a,\"This element\");const K=t.closest(`[${D}]`);L(\"card\",K?.getAttribute(D)??w,\"This card\");const Wt=t.closest(`[${B}]`);L(\"grid\",Wt?.getAttribute(B)??p,\"Entire grid\");const jt=t.closest(\"[data-preview-page-key]\"),Ut=b(jt?.getAttribute(\"data-preview-page-key\")),et=t.closest(\"section,[data-design-section],[data-section-id]\");if(et){const Ct=b(et.getAttribute(\"data-design-section\")??et.getAttribute(\"data-section-id\")??et.id),Kt=(et.parentElement?Array.from(et.parentElement.children).filter(Yn=>Yn.tagName===\"SECTION\"):[]).indexOf(et)+1,Yt=Ct||(Kt>0?`nth-${Kt}`:\"\");L(\"section\",Yt?`section:${Ut||\"all\"}:${Yt}`:null,\"This section\")}L(\"page\",Ut?`page:${Ut}`:null,\"Current page\"),L(\"site\",\"site:all\",\"Whole website\");const Sn={type:On,fieldPath:a,descriptorKind:e?.kind??\"field\",fieldValue:d,elementTag:t.tagName.toLowerCase(),isImage:i,boundingRect:{top:r.top,left:r.left,width:r.width,height:r.height},computedStyle:{fontFamily:o.fontFamily,fontSize:o.fontSize,lineHeight:o.lineHeight,fontWeight:o.fontWeight,letterSpacing:o.letterSpacing,color:o.color,backgroundColor:o.backgroundColor,textAlign:o.textAlign,width:o.width,height:o.height,minWidth:o.minWidth,minHeight:o.minHeight,maxWidth:o.maxWidth,maxHeight:o.maxHeight,marginTop:o.marginTop,marginRight:o.marginRight,marginBottom:o.marginBottom,marginLeft:o.marginLeft,paddingTop:o.paddingTop,paddingRight:o.paddingRight,paddingBottom:o.paddingBottom,paddingLeft:o.paddingLeft,borderRadius:o.borderRadius},listPath:p,itemPath:w,collectionPath:p,itemIndex:g,relatedFields:n,styleScopes:A};W(Sn),W({...Sn,type:Mn})}__name(gn,\"emitClickEvent\");function mn(t,e){W({type:Ln,fieldPath:t,value:e}),W({type:kn,fieldPath:t,value:e})}__name(mn,\"emitFieldChange\");function pt(t){const e=J;if(!e)return;J=null,e.target.removeEventListener(\"keydown\",e.keydown),e.target.removeEventListener(\"blur\",e.blur);const n=t?(e.target.innerText??e.target.textContent??\"\").replace(/\\u00a0/g,\" \").trim():\"\";e.contentEditable===null?e.target.removeAttribute(\"contenteditable\"):e.target.setAttribute(\"contenteditable\",e.contentEditable),e.spellcheck===null?e.target.removeAttribute(\"spellcheck\"):e.target.setAttribute(\"spellcheck\",e.spellcheck),e.target.style.outline=e.outline,e.target.style.outlineOffset=e.outlineOffset,e.target.style.cursor=e.cursor,e.target.style.userSelect=e.userSelect,e.target.style.textTransform=e.textTransform,e.target.innerHTML=e.originalHtml,t&&(n!==e.originalText.trim()?(e.field.value=n,ht(e.target,e.field),mn(e.field.path,n)):n||ht(e.target,e.field))}__name(pt,\"finishInlineEdit\");function hn(t,e,n){if(J?.target===t)return;pt(!0),xt(),ht(t,e),t.removeAttribute(P);const r=typeof e.value==\"string\"||typeof e.value==\"number\"?String(e.value):t.textContent??\"\",o=t.innerHTML,i=__name(d=>{if(d.key===\"Escape\"){d.preventDefault(),pt(!1);return}d.key===\"Enter\"&&e.type!==\"textarea\"&&!d.shiftKey&&(d.preventDefault(),pt(!0))},\"keydown\"),a=__name(()=>pt(!0),\"blur\");if(J={target:t,field:e,originalText:r,originalHtml:o,contentEditable:t.getAttribute(\"contenteditable\"),spellcheck:t.getAttribute(\"spellcheck\"),outline:t.style.outline,outlineOffset:t.style.outlineOffset,cursor:t.style.cursor,userSelect:t.style.userSelect,textTransform:t.style.textTransform,keydown:i,blur:a},t.setAttribute(\"contenteditable\",Bn?\"plaintext-only\":\"true\"),t.setAttribute(\"spellcheck\",\"true\"),t.textContent=r,t.style.outline=\"2px solid rgba(37, 99, 235, 0.95)\",t.style.outlineOffset=\"3px\",t.style.cursor=\"text\",t.style.userSelect=\"text\",t.style.textTransform=\"none\",t.addEventListener(\"keydown\",i),t.addEventListener(\"blur\",a),t.focus(),n){const d=document,f=d.caretPositionFromPoint?.(n.x,n.y),p=f?(()=>{const g=document.createRange();return g.setStart(f.offsetNode,f.offset),g.collapse(!0),g})():d.caretRangeFromPoint?.(n.x,n.y);if(p){const g=window.getSelection();g?.removeAllRanges(),g?.addRange(p)}}else{const d=document.createRange();d.selectNodeContents(t);const f=window.getSelection();f?.removeAllRanges(),f?.addRange(d)}}__name(hn,\"beginInlineEdit\");let yt=null;function xe(t){if(!j||J||Ht||yt!==null)return;const e=t.target;yt=requestAnimationFrame(()=>{if(yt=null,!j||J)return;const n=Ae(e);n&&!n.element.hasAttribute(\"data-fivora-edit-badge\")&&un(n.element)})}__name(xe,\"onEditMouseOver\");function Ce(t){if(!j)return;const e=t.relatedTarget instanceof HTMLElement?t.relatedTarget:null;e&&(e===Q||e===nt||nt?.contains(e))||xt()}__name(Ce,\"onEditMouseOut\");function Te(t){if(!j||J&&t.target instanceof Node&&J.target.contains(t.target))return;const e=t.target instanceof HTMLElement&&t.target.hasAttribute(\"data-fivora-edit-badge\")?t.target:null,n=e?nt?{element:nt,field:Bt(nt)}:null:Ae(t.target),r=n?.element,o=n?.field;if(!r||!o)return;t.preventDefault(),t.stopPropagation();const i=Ee(r,o);!jn&&fn(r,o)&&i.length===0?hn(r,o,e?void 0:{x:t.clientX,y:t.clientY}):gn(r,o,i)}__name(Te,\"onEditClick\");function yn(){j||(j=!0,pe(),ye(),!Ht&&!Q&&(Q=ln()),Ht||(document.addEventListener(\"mouseover\",xe,!0),document.addEventListener(\"mouseout\",Ce,!0)),document.addEventListener(\"click\",Te,!0),document.addEventListener(\"submit\",Pe,!0),we())}__name(yn,\"enterEditMode\");function Pe(t){j&&(t.preventDefault(),t.stopPropagation())}__name(Pe,\"preventEditModeSubmit\");function bn(){if(j){j=!1,qt=!1,pt(!0),xt(),yt!==null&&(cancelAnimationFrame(yt),yt=null);for(const t of Et)window.clearTimeout(t);if(Et=[],rt!==null){const t=window.cancelIdleCallback;typeof t==\"function\"?t(rt):window.clearTimeout(rt),rt=null}be(),document.querySelectorAll(`[${P}], [${V}]`).forEach(t=>{t.removeAttribute(P),t.removeAttribute(V)}),document.removeEventListener(\"mouseover\",xe,!0),document.removeEventListener(\"mouseout\",Ce,!0),document.removeEventListener(\"click\",Te,!0),document.removeEventListener(\"submit\",Pe,!0)}}__name(bn,\"exitEditMode\");const zn=window.history.pushState.bind(window.history),Kn=window.history.replaceState.bind(window.history);window.history.pushState=(...t)=>{zn(...t),window.setTimeout(bt,0)},window.history.replaceState=(...t)=>{Kn(...t),window.setTimeout(bt,0)},window.addEventListener(\"popstate\",bt);function wn(){return window.location.pathname.match(/^(\\/uploads\\/generated-sites\\/(?:template-preview|[^/]+)\\/[^/]+)/)?.[1]??\"\"}__name(wn,\"resolvePreviewRootPrefix\");function An(t){if(t.target&&t.target!==\"_self\"||t.hasAttribute(\"download\"))return!1;const e=t.getAttribute(\"href\");if(!e||e.startsWith(\"#\")||/^(mailto:|tel:|sms:|whatsapp:|javascript:)/i.test(e))return!1;let n;try{n=new URL(e,window.location.href)}catch{return!1}if(n.origin!==window.location.origin)return!1;const r=wn();if(r&&!n.pathname.startsWith(r))return!1;const o=window.location.pathname.replace(/\\/+$/,\"\")||\"/\",i=n.pathname.replace(/\\/+$/,\"\")||\"/\";return o!==i||n.search!==window.location.search}__name(An,\"isInternalPreviewNavigation\"),document.addEventListener(\"click\",t=>{if(t.defaultPrevented||t.button!==0||t.metaKey||t.ctrlKey||t.shiftKey||t.altKey)return;const e=t.target?.closest?.(\"a[href]\");!e||!An(e)||(t.preventDefault(),t.stopPropagation(),window.location.assign(e.href))},!0),bt()})(function(I){const O=__name((h,k)=>{if(!h||h.trim()===\"null\")return null;try{const $=new URL(h,k??void 0).origin;return $===\"null\"?null:$}catch{return null}},\"normalizeOrigin\"),_=O(I.currentOrigin),C=O(I.ancestorOrigin,_),H=O(I.accessibleParentOrigin,_),s=O(I.referrer,_),c=O(I.rememberedOrigin);return C??H??(s&&s!==_?s:null)??c??s},function(I){const O=__name(u=>!!u&&typeof u==\"object\"&&!Array.isArray(u),\"isRecord\"),_=O(I)&&(I.designCustomizationVersion===1||!!I.elementStyles||!!I.sections);if(!O(I)||!_)return\"\";const C=I,H=__name(u=>{if(typeof u==\"number\")return`${u}px`;if(typeof u!=\"string\")return\"\";const E=u.trim();return!E||E.length>160||/[;{}<>\\r\\n]/.test(E)||/(?:url\\s*\\(|expression\\s*\\(|@import|javascript:)/i.test(E)?\"\":E},\"safeValue\"),s=__name(u=>H(C[u]),\"read\"),c=__name((u,E)=>E?`${u}:${E} !important;`:\"\",\"declaration\"),h=__name((u,E)=>{const S=E.filter(Boolean).join(\"\");return S?`${u}{${S}}`:\"\"},\"rule\"),k=__name(u=>u?[c(\"background\",u),c(\"background-color\",u),\"background-image:none !important;\"]:[],\"backgroundDeclarations\"),$=__name(u=>u===\"start\"?\"flex-start\":u===\"end\"?\"flex-end\":u===\"center\"||u===\"stretch\"?u:\"\",\"alignItems\"),R=__name(u=>{const E=Number(u);return Number.isInteger(E)&&E>=1&&E<=6?`repeat(${E},minmax(0,1fr))`:\"\"},\"gridColumns\"),T=(()=>{const u=Number(s(\"headingScale\"));return Number.isFinite(u)&&u>=.75&&u<=2?String(u):\"\"})(),N=__name(u=>({none:\"none\",subtle:\"0 4px 14px rgba(15,23,42,.08)\",medium:\"0 12px 30px rgba(15,23,42,.14)\",strong:\"0 22px 55px rgba(15,23,42,.22)\"})[u]??\"\",\"shadow\"),X=[[\"--brand-color\",s(\"primaryColor\")],[\"--brand-primary\",s(\"primaryColor\")],[\"--primary-color\",s(\"primaryColor\")],[\"--color-primary\",s(\"primaryColor\")],[\"--brand-secondary\",s(\"secondaryColor\")],[\"--secondary-color\",s(\"secondaryColor\")],[\"--brand-accent\",s(\"accentColor\")],[\"--accent-color\",s(\"accentColor\")],[\"--page-background\",s(\"backgroundColor\")],[\"--page-text\",s(\"textColor\")],[\"--bg-primary\",s(\"canvasColor\")],[\"--bg-secondary\",s(\"surfaceColor\")],[\"--surface\",s(\"surfaceColor\")],[\"--card-bg\",s(\"surfaceColor\")],[\"--background\",s(\"canvasColor\")],[\"--brand-primary\",s(\"brandPrimary\")],[\"--brand-secondary\",s(\"brandSecondary\")],[\"--brand-accent\",s(\"brandAccent\")],[\"--primary\",s(\"brandPrimary\")],[\"--secondary\",s(\"brandSecondary\")],[\"--accent\",s(\"brandAccent\")],[\"--text-primary\",s(\"textPrimary\")],[\"--text-secondary\",s(\"textSecondary\")],[\"--text-muted\",s(\"textMuted\")],[\"--muted\",s(\"textMuted\")],[\"--border-primary\",s(\"borderColor\")],[\"--border-secondary\",s(\"borderColor\")],[\"--border\",s(\"borderColor\")],[\"--card-radius\",s(\"cardRadius\")],[\"--button-radius\",s(\"buttonRadius\")],[\"--image-radius\",s(\"imageRadius\")]],q=new Set([\"sans-serif\",\"serif\",\"monospace\",\"inherit\",\"initial\",\"system-ui\",\"system sans\",\"editorial serif\"]),F=new Set,P=__name(u=>{if(typeof u==\"string\"&&u.trim()){const E=u.split(\",\")[0].replace(/['\"]/g,\"\").trim();E&&!q.has(E.toLowerCase())&&!E.toLowerCase().includes(\"system\")&&F.add(E)}},\"addFont\");P(C.headingFont),P(C.bodyFont);const V=O(C.elementStyles)?C.elementStyles:{};for(const u of Object.values(V))O(u)&&P(u.fontFamily);const D=[...Array.from(F).map(u=>`@import url('https://fonts.googleapis.com/css2?family=${encodeURIComponent(u).replace(/%20/g,\"+\")}:wght@300;400;500;600;700;800&display=swap');`),h(\":root,body\",X.map(([u,E])=>c(u,E))),h(\"html\",[c(\"font-size\",s(\"baseSize\"))]),h(\"body\",[c(\"font-family\",s(\"bodyFont\")?`${s(\"bodyFont\")},sans-serif`:\"\"),c(\"font-weight\",s(\"bodyWeight\")),c(\"line-height\",s(\"bodyLineHeight\")),c(\"letter-spacing\",s(\"letterSpacing\")),...k(s(\"backgroundColor\")),c(\"color\",s(\"textColor\"))]),h(\"body :where(h1,h2,h3,h4,h5,h6)\",[c(\"font-family\",s(\"headingFont\")?`${s(\"headingFont\")},sans-serif`:\"\"),c(\"font-weight\",s(\"headingWeight\")),c(\"line-height\",s(\"headingLineHeight\")),c(\"color\",s(\"headingColor\"))]),h('body :where(p,small,.muted,[class*=\"muted\"])',[c(\"color\",s(\"mutedTextColor\"))]),T?`body h1{font-size:calc(2.5rem * ${T}) !important}body h2{font-size:calc(2rem * ${T}) !important}body h3{font-size:calc(1.5rem * ${T}) !important}body h4{font-size:calc(1.25rem * ${T}) !important}`:\"\",h(\"body header\",[...k(s(\"headerBackgroundColor\")),c(\"min-height\",s(\"headerHeight\"))]),h(\"body footer\",[...k(s(\"footerBackgroundColor\"))]),h(\"body main\",[...k(s(\"backgroundColor\")),c(\"color\",s(\"textColor\"))]),h(\"body main > section,body main [data-preview-page-key] > section\",[c(\"padding-block\",s(\"sectionPadding\")),c(\"text-align\",s(\"textAlign\"))]),h(\"body main :where(section,[data-design-section]) :where(h1,h2,h3,h4,h5,h6,p,[data-design-text])\",[c(\"text-align\",s(\"textAlign\"))]),h(\"body main > section + section,body main [data-preview-page-key] > section + section\",[c(\"margin-top\",s(\"sectionGap\"))]),h('body main :where([class*=\"flex\"],[class*=\"grid\"],[data-design-stack])',[c(\"gap\",s(\"elementGap\"))]),h(\"body main > section:nth-of-type(even),body main [data-preview-page-key] > section:nth-of-type(even)\",k(s(\"surfaceAltColor\"))),h(\"body main > section:nth-of-type(odd),body main [data-preview-page-key] > section:nth-of-type(odd)\",k(s(\"surfaceColor\"))),h(\"body main > section:first-of-type,body main [data-preview-page-key] > section:first-of-type\",[c(\"min-height\",s(\"heroMinHeight\")),c(\"text-align\",s(\"heroTextAlign\"))]),h('body main > section:first-of-type :where(h1,h2,h3,h4,h5,h6,p,[class*=\"container\"],[data-design-text]),body main [data-preview-page-key] > section:first-of-type :where(h1,h2,h3,h4,h5,h6,p,[class*=\"container\"],[data-design-text])',[c(\"text-align\",s(\"heroTextAlign\"))]),h('body main :where([class*=\"container\"],[class~=\"container\"],[data-design-container])',[c(\"max-width\",s(\"contentMaxWidth\")),c(\"padding-inline\",s(\"containerPadding\")),s(\"contentMaxWidth\")?\"margin-inline:auto !important;\":\"\"]),h('body main :where(section,[data-design-section]) > :where([class*=\"flex\"],[data-design-content])',[c(\"align-items\",$(s(\"contentAlign\"))),c(\"justify-items\",s(\"contentAlign\"))]),h(\"body main :where([data-preview-list-path],[data-design-grid])\",[R(s(\"gridColumns\"))?\"display:grid !important;\":\"\",c(\"grid-template-columns\",R(s(\"gridColumns\"))),c(\"gap\",s(\"gridGap\"))]),h('body main :where([data-preview-item-path],[data-design-card],.card,[class*=\"card-\"])',[c(\"width\",s(\"cardWidth\")),s(\"cardWidth\")?\"max-width:100% !important;\":\"\",c(\"min-height\",s(\"cardMinHeight\")),c(\"padding\",s(\"cardPadding\")),c(\"border-radius\",s(\"cardRadius\")),c(\"border-width\",s(\"cardBorderWidth\")),s(\"cardBorderWidth\")?\"border-style:solid !important;\":\"\",c(\"border-color\",s(\"borderColor\")),...k(s(\"cardBackgroundColor\")),c(\"box-shadow\",N(s(\"cardShadow\"))),c(\"text-align\",s(\"cardTextAlign\"))]),h('body main :where([data-preview-item-path],[data-design-card],.card,[class*=\"card-\"]) :where(h1,h2,h3,h4,h5,h6,p,span,[data-design-text])',[c(\"text-align\",s(\"cardTextAlign\"))]),h('body main :where(button,a[class*=\"btn\"],a[class*=\"button\"],[data-design-button])',[c(\"padding\",s(\"buttonPadding\")),c(\"border-radius\",s(\"buttonRadius\")),...k(s(\"buttonBackgroundColor\")),c(\"color\",s(\"buttonTextColor\")),c(\"box-shadow\",N(s(\"buttonShadow\")))]),h(\"body main img\",[c(\"border-radius\",s(\"imageRadius\"))])],U=O(C.sections)?C.sections:{};for(const[u,E]of Object.entries(U)){if(!/^[a-zA-Z0-9_-]{1,64}$/.test(u)||!O(E))continue;const S=__name(M=>H(E[M]),\"sectionRead\"),z=S(\"backgroundColor\"),l=['[class*=\"absolute\"][class*=\"inset-0\"]','[class*=\"fixed\"][class*=\"inset-0\"]','[class*=\"absolute\"][class*=\"inset-x-0\"][class*=\"inset-y-0\"]','[class*=\"absolute\"][class*=\"top-0\"][class*=\"right-0\"][class*=\"bottom-0\"][class*=\"left-0\"]'].join(\",\"),y={all:\"body main section\",hero:\"body main > section:first-of-type,body main [data-preview-page-key] > section:first-of-type\",header:\"body header\",footer:\"body footer\",cards:'body main :where([data-preview-item-path],[data-design-card],.card,[class*=\"card-\"])'}[u]??`body :where([data-preview-page-key=\"${u}\"] > section,[data-design-section=\"${u}\"],[data-section-id=\"${u}\"],section#${u},section.${u})`;D.push(h(y,[E.visible===!1?\"display:none !important;\":\"\",...k(z),c(\"color\",S(\"textColor\")),c(\"min-height\",S(\"minHeight\")),c(\"padding-block\",S(\"padding\")),c(\"max-width\",S(\"contentMaxWidth\")),c(\"gap\",S(\"gap\")),c(\"text-align\",S(\"textAlign\")),c(\"align-items\",$(S(\"contentAlign\")))]),h(`${y} :where(h1,h2,h3,h4,h5,h6)`,[c(\"color\",S(\"headingColor\")),c(\"text-align\",S(\"textAlign\"))]),h(`${y} :where(p,span,[data-design-text])`,[c(\"text-align\",S(\"textAlign\"))]),h(`${y} :where([data-preview-item-path],[data-design-card],.card,[class*=\"card-\"])`,[...k(S(\"cardBackgroundColor\")),c(\"width\",S(\"cardWidth\")),S(\"cardWidth\")?\"max-width:100% !important;\":\"\",c(\"min-height\",S(\"cardMinHeight\")),c(\"border-radius\",S(\"cardRadius\"))]),h(`${y} :where([data-preview-list-path],[data-design-grid])`,[R(S(\"gridColumns\"))?\"display:grid !important;\":\"\",c(\"grid-template-columns\",R(S(\"gridColumns\")))]),h(`${y}::before,${y}::after`,z?[\"background:none !important;\",\"background-image:none !important;\",\"opacity:0 !important;\"]:[]),h(`${y} > :where(${l})`,z?[\"background:none !important;\",\"background-image:none !important;\",\"box-shadow:none !important;\",\"mask-image:none !important;\",\"-webkit-mask-image:none !important;\"]:[]),h(`${y} > :where(${l})::before,${y} > :where(${l})::after`,z?[\"background:none !important;\",\"background-image:none !important;\",\"opacity:0 !important;\"]:[]),h(`${y} > :where(${l}) :where(img,video,canvas,picture)`,z?[\"opacity:0.2 !important;\"]:[]))}const ot=O(C.elementStyles)?C.elementStyles:{},Y=[[\"fontFamily\",\"font-family\"],[\"fontSize\",\"font-size\"],[\"lineHeight\",\"line-height\"],[\"fontWeight\",\"font-weight\"],[\"letterSpacing\",\"letter-spacing\"],[\"color\",\"color\"],[\"backgroundColor\",\"background-color\"],[\"textAlign\",\"text-align\"],[\"width\",\"width\"],[\"height\",\"height\"],[\"minWidth\",\"min-width\"],[\"minHeight\",\"min-height\"],[\"maxWidth\",\"max-width\"],[\"maxHeight\",\"max-height\"],[\"marginTop\",\"margin-top\"],[\"marginRight\",\"margin-right\"],[\"marginBottom\",\"margin-bottom\"],[\"marginLeft\",\"margin-left\"],[\"paddingTop\",\"padding-top\"],[\"paddingRight\",\"padding-right\"],[\"paddingBottom\",\"padding-bottom\"],[\"paddingLeft\",\"padding-left\"],[\"padding\",\"padding\"],[\"borderRadius\",\"border-radius\"],[\"borderWidth\",\"border-width\"],[\"borderColor\",\"border-color\"],[\"borderStyle\",\"border-style\"],[\"boxShadow\",\"box-shadow\"]];for(const[u,E]of Object.entries(ot).slice(0,256)){if(!/^[a-zA-Z0-9_.:\\[\\]-]{1,180}$/.test(u)||!O(E))continue;const S=u.replace(/\\\\/g,\"\\\\\\\\\").replace(/\"/g,'\\\\\"'),z=(()=>{if(u===\"site:all\")return\"body\";if(u.startsWith(\"page:\"))return`body :where([data-preview-page-key=\"${S.slice(5)}\"])`;if(u.startsWith(\"section:\")){const[,l=\"all\",m=\"\"]=S.split(\":\"),y=l===\"all\"?\"body main\":`body :where([data-preview-page-key=\"${l}\"])`,M=m.match(/^nth-(\\d+)$/)?.[1];return M?`${y} > section:nth-of-type(${M})`:`${y} :where([data-design-section=\"${m}\"],[data-section-id=\"${m}\"],section#${m})`}if(u.includes(\":\")){const[l,m]=S.split(\":\");if(m===\"card\")return`body [data-preview-list-path=\"${l}\"] :is([data-preview-item-path],[data-design-card],.card,[class*=\"card-\"])`;if(m)return`body [data-preview-list-path=\"${l}\"] :is([data-preview-field-path$=\".${m}\"],[data-field-path$=\".${m}\"],[data-content-path$=\".${m}\"])`}return`body :is([data-preview-field-path=\"${S}\"],[data-content-path=\"${S}\"],[data-field-path=\"${S}\"],[data-fivora-resolved-field-path=\"${S}\"],[data-preview-list-path=\"${S}\"],[data-preview-item-path=\"${S}\"])`})();D.push(h(z,Y.map(([l,m])=>c(m,H(E[l])))))}return D.filter(Boolean).join(`\n`)},function(I,O){if(!O||typeof O!=\"object\"||Array.isArray(O))return I;const _=__name($=>{const R=$.trim().toLowerCase(),T=R.match(/^#([0-9a-f]{3})$/);return T?`#${[...T[1]].map(N=>N.repeat(2)).join(\"\")}`:/^#[0-9a-f]{6}$/.test(R)?R:null},\"normalize\"),C=new Map,H=new Map;for(const[$,R]of Object.entries(O).slice(0,64)){if(typeof R!=\"string\")continue;const T=_($),N=_(R);if(!T||!N||T===N)continue;C.set(T,N);const X=__name(q=>[Number.parseInt(q.slice(1,3),16),Number.parseInt(q.slice(3,5),16),Number.parseInt(q.slice(5,7),16)],\"channels\");H.set(X(T).join(\",\"),X(N)),T[1]===T[2]&&T[3]===T[4]&&T[5]===T[6]&&C.set(`#${T[1]}${T[3]}${T[5]}`,N)}if(C.size===0)return I;const s=[...C.keys()].sort(($,R)=>R.length-$.length).map($=>$.replace(/[.*+?^${}()|[\\]\\\\]/g,\"\\\\$&\")),c=new RegExp(`(?<!\\\\\\\\)(?:${s.join(\"|\")})(?![0-9a-f])`,\"gi\"),h=I.replace(c,$=>{const R=_($);return R?C.get(R)??$:$}),k=/(rgba?\\(\\s*)(\\d{1,3})(\\s+|,\\s*)(\\d{1,3})(\\s+|,\\s*)(\\d{1,3})/gi;return h.replace(k,($,R,T,N,X,q,F)=>{const P=H.get(`${T},${X},${F}`);return P?`${R}${P[0]}${N}${P[1]}${q}${P[2]}`:$})},\"fivora-universal-design-overrides\",function(I,O){const _=O??document,C=I&&typeof I==\"object\"&&!Array.isArray(I)?I:null,H=C?.requirements&&typeof C.requirements==\"object\"&&!Array.isArray(C.requirements)?C.requirements:null,s=C?.template&&typeof C.template==\"object\"&&!Array.isArray(C.template)?C.template:null,c=s?.structure&&typeof s.structure==\"object\"&&!Array.isArray(s.structure)?s.structure:null,h=Array.isArray(H?.requiredPages),k=Array.isArray(c?.pages);if(!h&&!k)return;const $=h?H?.requiredPages:c?.pages,R=new Set($.filter(l=>typeof l==\"string\").map(l=>l.trim()).filter(Boolean)),T=Array.isArray(s?.pageDefinitions)?s.pageDefinitions:[],N=Array.isArray(c?.pageDefinitions)?c.pageDefinitions:[],q=(T.length>0?T:N).flatMap(l=>{if(!l||typeof l!=\"object\"||Array.isArray(l))return[];const m=l;if(typeof m.id!=\"string\"||!m.id.trim())return[];const y=m.id.trim(),M=typeof m.label==\"string\"&&m.label.trim()?m.label.trim():y.replace(/_/g,\" \"),Z=typeof m.route==\"string\"?m.route.trim():\"\",at=Z===\"/\"?\"/\":`/${(Z||y).replace(/^\\/+|\\/+$/g,\"\")}`;return[{id:y,label:M,route:at}]}),P=(k?c?.pages:$).filter(l=>typeof l==\"string\").map(l=>l.trim()).filter(Boolean).map((l,m)=>({id:l,label:l.replace(/_/g,\" \"),route:m===0?\"/\":`/${l}`})),V=q.length>0?q:P;if(V.length===0)return;const B=V.filter(l=>!R.has(l.id));if(B.length===0){_.querySelectorAll(\"[data-fivora-page-disabled]\").forEach(l=>l.removeAttribute(\"data-fivora-page-disabled\"));return}let D=_.getElementById(\"fivora-page-selection-style\");(!D||D.tagName!==\"STYLE\")&&(D=_.createElement(\"style\"),D.id=\"fivora-page-selection-style\",D.textContent='[data-fivora-page-disabled=\"true\"]{display:none!important}',_.head.appendChild(D)),_.querySelectorAll(\"[data-fivora-page-disabled]\").forEach(l=>l.removeAttribute(\"data-fivora-page-disabled\"));const U=__name(l=>{let m=l;try{const Z=new URL(l,_.baseURI);if(Z.origin!==_.location?.origin)return\"\";m=Z.pathname}catch{return\"\"}const y=m.match(/^(\\/uploads\\/generated-sites\\/(?:template-preview|preview|live)\\/[^/]+)/)?.[1];y&&m.startsWith(y)&&(m=m.slice(y.length)||\"/\"),m=m.replace(/\\/index\\.html$/i,\"/\").replace(/\\.html$/i,\"\");const M=m.replace(/\\/+$/g,\"\")||\"/\";return M.startsWith(\"/\")?M:`/${M}`},\"normalizePath\"),ot=__name(l=>V.find(m=>{const y=U(m.route);return y?y===\"/\"?l===\"/\":l===y||l.startsWith(`${y}/`):!1}),\"pageForPath\"),Y=__name(l=>{for(const m of[\"href\",\"formaction\",\"data-href\",\"data-route\",\"data-url\"]){const y=l.getAttribute(m);if(!y)continue;const M=ot(U(y));if(M)return M}},\"pageForControl\"),u=__name(l=>{l&&l.setAttribute(\"data-fivora-page-disabled\",\"true\")},\"disable\");for(const l of B)for(const m of[\"data-page-key\",\"data-required-page\",\"data-target-page\"])_.querySelectorAll(`[${m}]`).forEach(y=>{y.getAttribute(m)===l.id&&u(y)});const E=Array.from(_.querySelectorAll(\"a[href]\"));for(const l of E){const m=Y(l);if(!m||R.has(m.id))continue;if(l.classList.contains(\"absolute\")&&(l.classList.contains(\"inset-0\")||l.classList.contains(\"inset-x-0\")&&l.classList.contains(\"inset-y-0\")))u(l.closest(\"[data-preview-item-path],[data-design-card],article,li\"));else{const M=l.closest(\"li\");u(M&&M.querySelectorAll(\"a[href]\").length===1?M:l)}}const S=Array.from(_.querySelectorAll('button,[role=\"button\"],[data-href],[data-route],[data-url]')).filter(l=>l.tagName!==\"A\");for(const l of S){const m=Y(l);if(!m||R.has(m.id))continue;const y=l.closest(\"li\");u(y&&y.querySelectorAll('a[href],button,[role=\"button\"],[data-href],[data-route],[data-url]').length===1?y:l)}const z=_.querySelector(\"main section\");for(const l of _.querySelectorAll(\"main section\")){const m=Array.from(l.querySelectorAll('a[href],button,[role=\"button\"],[data-href],[data-route],[data-url]')),y=m.map(Y).filter(at=>!!at),M=l.hasAttribute(\"data-preview-page-key\"),Z=l===z||l.hasAttribute(\"data-design-hero\")||/(?:^|\\s)(?:hero|banner|masthead)(?:\\s|$)/i.test(l.className)||!!l.querySelector(\"h1\");!M&&!Z&&y.length>0&&y.length===m.length&&y.every(at=>!R.has(at.id))&&u(l)}});";