efficient-storefront-blocks 0.70.0 → 0.74.0
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.
- package/CHANGELOG.md +38 -0
- package/dist/chunks/EditorPreviewCheckout-YQ3F5MSG.js +4 -0
- package/dist/chunks/{SiteEditorProvider-3GKJZDL5.js → SiteEditorProvider-Z33JB5BA.js} +1 -1
- package/dist/chunks/chunk-5OFEWRWI.js +1 -0
- package/dist/chunks/{chunk-TXTTPEQA.js → chunk-BZDVZUF4.js} +1 -1
- package/dist/chunks/{chunk-QWHNN7GF.js → chunk-QJDTP7K6.js} +1 -1
- package/dist/chunks/chunk-UGXNUQRA.js +246 -0
- package/dist/chunks/chunk-UJW4B64R.js +1 -0
- package/dist/chunks/{fitment-data-6GK7QQQI.js → fitment-data-DHKRLKNI.js} +1 -1
- package/dist/contract.js +2 -2
- package/dist/editor/components/CategorySource.js +1 -1
- package/dist/editor/components/HeaderSettingsPanel.js +1 -1
- package/dist/editor/components/PreviewHeader.d.ts +0 -1
- package/dist/editor/components/PreviewHeader.js +1 -11
- package/dist/editor/lib/document/blocks/service/ContactCards/fields.d.ts +2 -0
- package/dist/editor/lib/document/blocks/service/ContactCards/fields.js +1 -0
- package/dist/editor/lib/document/blocks/service/ContactRouting/fields.js +1 -1
- package/dist/editor/lib/document/blocks/service/FooterMessaging/fields.d.ts +2 -0
- package/dist/editor/lib/document/blocks/service/FooterMessaging/fields.js +1 -0
- package/dist/editor/lib/document/blocks/service/FooterPayment/fields.d.ts +2 -0
- package/dist/editor/lib/document/blocks/service/FooterPayment/fields.js +1 -0
- package/dist/editor/lib/document/blocks/service/MessagingCards/fields.d.ts +2 -0
- package/dist/editor/lib/document/blocks/service/MessagingCards/fields.js +1 -0
- package/dist/editor/lib/document/blocks/service/Reviews/fields.js +1 -1
- package/dist/editor/lib/document/blocks/service/index.d.ts +1 -1
- package/dist/editor/lib/document/blocks/service/index.js +1 -1
- package/dist/editor/lib/document/config.d.ts +2 -0
- package/dist/editor/lib/document/config.js +1 -1
- package/dist/editor/lib/efficient-block-sources.js +1 -1
- package/dist/editor/lib/header-settings-source.d.ts +2 -1
- package/dist/editor/lib/header-settings-source.js +1 -1
- package/dist/editor/lib/storefront-editor-words.d.ts +17 -2
- package/dist/editor/lib/storefront-editor-words.js +1 -1
- package/dist/editor.css +1 -1
- package/dist/index.d.ts +0 -2
- package/dist/index.js +97 -200
- package/dist/links.d.ts +0 -2
- package/dist/links.js +1 -1
- package/dist/render/built-with.json +1 -1
- package/dist/render/components/ChatLauncher.js +1 -1
- package/dist/render/components/ContactCards.d.ts +13 -0
- package/dist/render/components/ContactCards.js +1 -0
- package/dist/render/components/CopyText.d.ts +4 -0
- package/dist/render/components/CopyText.js +1 -0
- package/dist/render/components/Events.d.ts +3 -0
- package/dist/render/components/Events.js +1 -1
- package/dist/render/components/FooterMessaging.d.ts +5 -0
- package/dist/render/components/FooterMessaging.js +1 -0
- package/dist/render/components/FooterPayment.d.ts +11 -0
- package/dist/render/components/FooterPayment.js +1 -0
- package/dist/render/components/GalleryItem.js +1 -1
- package/dist/render/components/GalleryShowcase.js +1 -1
- package/dist/render/components/Header.d.ts +2 -1
- package/dist/render/components/Header.js +1 -1
- package/dist/render/components/HeaderCallButton.d.ts +9 -0
- package/dist/render/components/HeaderCallButton.js +1 -0
- package/dist/render/components/MessagingCards.d.ts +9 -0
- package/dist/render/components/MessagingCards.js +1 -0
- package/dist/render/components/QrCode.d.ts +5 -0
- package/dist/render/components/QrCode.js +1 -0
- package/dist/render/components/Reviews.d.ts +14 -4
- package/dist/render/components/Reviews.js +1 -1
- package/dist/render/components/checkout/CheckoutPageClient.d.ts +2 -25
- package/dist/render/components/checkout/CheckoutPageClient.js +1 -3
- package/dist/render/components/checkout/checkout-parts.d.ts +5 -0
- package/dist/render/components/checkout/checkout-parts.js +1 -0
- package/dist/render/components/checkout/checkout-state.d.ts +169 -0
- package/dist/render/components/checkout/checkout-state.js +3 -0
- package/dist/render/lib/api/index.d.ts +1 -0
- package/dist/render/lib/api/types.d.ts +3 -0
- package/dist/render/lib/document/blocks/service/ContactCards/meta.d.ts +7 -0
- package/dist/render/lib/document/blocks/service/ContactCards/meta.js +1 -0
- package/dist/render/lib/document/blocks/service/ContactCards/render.d.ts +4 -0
- package/dist/render/lib/document/blocks/service/ContactCards/render.js +1 -0
- package/dist/render/lib/document/blocks/service/Events/render.js +1 -1
- package/dist/render/lib/document/blocks/service/Footer/meta.js +1 -1
- package/dist/render/lib/document/blocks/service/FooterGroup/meta.js +1 -1
- package/dist/render/lib/document/blocks/service/FooterMessaging/meta.d.ts +2 -0
- package/dist/render/lib/document/blocks/service/FooterMessaging/meta.js +1 -0
- package/dist/render/lib/document/blocks/service/FooterMessaging/render.d.ts +2 -0
- package/dist/render/lib/document/blocks/service/FooterMessaging/render.js +1 -0
- package/dist/render/lib/document/blocks/service/FooterPayment/meta.d.ts +3 -0
- package/dist/render/lib/document/blocks/service/FooterPayment/meta.js +1 -0
- package/dist/render/lib/document/blocks/service/FooterPayment/render.d.ts +2 -0
- package/dist/render/lib/document/blocks/service/FooterPayment/render.js +1 -0
- package/dist/render/lib/document/blocks/service/MessagingCards/meta.d.ts +2 -0
- package/dist/render/lib/document/blocks/service/MessagingCards/meta.js +1 -0
- package/dist/render/lib/document/blocks/service/MessagingCards/render.d.ts +4 -0
- package/dist/render/lib/document/blocks/service/MessagingCards/render.js +1 -0
- package/dist/render/lib/document/blocks/service/Reviews/meta.d.ts +6 -0
- package/dist/render/lib/document/blocks/service/Reviews/meta.js +1 -1
- package/dist/render/lib/document/blocks/service/Reviews/render.js +1 -1
- package/dist/render/lib/document/blocks/service/metas.d.ts +4 -0
- package/dist/render/lib/document/blocks/service/metas.js +1 -1
- package/dist/render/lib/document/blocks/service/renders.d.ts +4 -0
- package/dist/render/lib/document/blocks/service/renders.js +1 -1
- package/dist/render/lib/document/blocks/text-part-shapes.json +137 -6
- package/dist/render/lib/document/card-templates.d.ts +2 -0
- package/dist/render/lib/document/card-templates.js +1 -0
- package/dist/render/lib/document/footer-page-blocks.d.ts +1 -0
- package/dist/render/lib/document/footer-page-blocks.js +1 -1
- package/dist/render/lib/document/lazy-draws.js +1 -1
- package/dist/render/lib/document/render-config.d.ts +2 -0
- package/dist/render/lib/document/render-config.js +1 -1
- package/dist/render/lib/document/section-to-box-rows-reviews.d.ts +1 -0
- package/dist/render/lib/document/section-to-box-rows-reviews.js +1 -0
- package/dist/render/lib/links/link-rules.d.ts +1 -1
- package/dist/render/lib/links/link-rules.js +1 -1
- package/dist/render/lib/qr.d.ts +5 -0
- package/dist/render/lib/qr.js +1 -0
- package/dist/render/lib/sections/messaging.d.ts +45 -0
- package/dist/render/lib/sections/messaging.js +1 -0
- package/dist/render/lib/sections/reviews.d.ts +1 -0
- package/dist/render/lib/sections/reviews.js +1 -0
- package/dist/render/lib/wheels/catalog-default-layout.js +1 -1
- package/dist/render/lib/wheels/collections.js +1 -1
- package/dist/words.d.ts +40 -7
- package/dist/words.js +4 -4
- package/package.json +4 -4
- package/dist/chunks/EditorPreviewCheckout-XI4VULPL.js +0 -4
- package/dist/chunks/chunk-RPLNV3WM.js +0 -1
- package/dist/chunks/chunk-SQH6XBRG.js +0 -1
- package/dist/chunks/chunk-XF2ZAVNU.js +0 -262
- package/dist/render/components/useStorefrontReviews.d.ts +0 -2
- package/dist/render/components/useStorefrontReviews.js +0 -1
- /package/dist/chunks/{chunk-XF2ZAVNU.js.LEGAL.txt → chunk-UGXNUQRA.js.LEGAL.txt} +0 -0
|
@@ -0,0 +1,246 @@
|
|
|
1
|
+
import{$ as Bu,A as Vo,Aa as K,B as yo,Ba as zu,C as Yt,D as Xt,Da as en,Ea as Gu,F as Pu,Fa as Uu,I as _a,K as Eu,Ka as $u,L as Rs,M as Bs,O as Fu,P as Ou,R as Lu,S as _s,U as Au,V as qe,W as ht,X as Ru,Y as bo,Z as Qr,a as gu,aa as Ds,c as yu,d as Qe,da as _u,e as Vt,ea as Ns,f as Bo,g as Os,ga as Ms,h as Cu,ka as Du,l as Ba,n as Ko,o as Ls,qa as It,sa as Nu,u as wu,ua as Mu,v as vu,w as As,wa as Hu,x as ze,y as ku,z as Tu}from"./chunk-UJW4B64R.js";import{d as bu,e as Ra,f as Su,g as Wu,j as Jr,n as Hs}from"./chunk-5OFEWRWI.js";var ne=e=>typeof e=="string"&&e?e:void 0;var ju="en",on=null,Ku=ju,Vu=null;function O4(e,o,t){on=e??null,Ku=o||ju,Vu=t??null}function X(){return Vu}function Ws(){return Ku}function Yu(){return on}function qu(e,o){return o?e.replace(/\{([A-Za-z][A-Za-z0-9_]*)\}/g,(t,a)=>Object.prototype.hasOwnProperty.call(o,a)?String(o[a]):t):e}function l(e,o){let t=on?on[e]:void 0;if(typeof t=="function"){try{let a=ne(t(o??{}));if(a)return a}catch{}return qu(e,o)}return qu(ne(t)??e,o)}function Ae(e,o,t,a){return l(t===1?e:o,{...a,n:t})}import{jsx as zs,Fragment as yv,jsxs as bv}from"react/jsx-runtime";import{createContext as Sv,useContext as Cv}from"react";var wv={mirrorHostStyles:!0,css:null,fontHrefs:[]},Xu=Sv(wv);function B4({value:e,children:o}){return zs(Xu.Provider,{value:e,children:o})}function Gs(){return Cv(Xu)}function Zu(){let{css:e,fontHrefs:o}=Gs();return bv(yv,{children:[o.map(t=>zs("link",{rel:"stylesheet",href:t},t)),e?zs("style",{"data-sf-canvas-css":"",children:e}):null]})}import{jsx as vv}from"react/jsx-runtime";import{createContext as kv,useContext as Tv}from"react";var Qu=kv(void 0);function M4({metadata:e,children:o}){return vv(Qu.Provider,{value:e,children:o})}var Ju=()=>Tv(Qu);import{jsx as he,Fragment as rv,jsxs as Vr}from"react/jsx-runtime";import{useCallback as Yr,useEffect as Ve,useRef as e4,useState as ev}from"react";import{Button as o4,Tooltip as t4}from"efficient-shell/ui";import{SettingsSwitch as a4}from"efficient-easel/panel";import{PagesIcon as r4,StylesIcon as n4}from"efficient-easel/rail";import{PaletteIcon as l4}from"efficient-shell/icons/efficient";import{TemplateIcon as s4}from"efficient-easel/icons";import{Subtree as i4,TreeRow as nv}from"efficient-easel/tree";import{useEasel as lv}from"efficient-easel/easel";import{useEaselStrings as sv}from"efficient-easel/strings";import{createContext as Pv,useContext as Ev}from"react";var Us=Pv(!1),z4=()=>Ev(Us);import{jsx as ae,Fragment as qg,jsxs as dr}from"react/jsx-runtime";import{Fragment as SB,useEffect as CB,useId as wB,useMemo as jg,useRef as vB,useState as dt}from"react";import{useScreenDocument as kB}from"efficient-easel/screen/components/ScreenDocumentContext";import{UiIcon as Sc}from"efficient-easel/draw/client";import TB from"efficient-easel/screen/components/SidePanelHead";import{jsx as Z,jsxs as ct,Fragment as _t}from"react/jsx-runtime";import{useEasel as Tg,useRootFields as yR}from"efficient-easel/easel";import{Inspector as bR}from"efficient-easel/fields";import{SettingsGroup as SR}from"efficient-easel/panel";import{useEffect as CR,useRef as wR,useState as kl}from"react";import{jsx as sa,jsxs as lI,Fragment as E1}from"react/jsx-runtime";import{useState as sI}from"react";import{SettingsDefaultReset as F1,SettingsField as O1}from"efficient-easel/panel";import{useEaselStrings as L1}from"efficient-easel/strings";import{AddIcon as A1}from"efficient-easel/icons";import{jsx as y,jsxs as zo,Fragment as ro}from"react/jsx-runtime";import{cloneElement as gh,useId as xF,useRef as xf,useState as Xa}from"react";import{useEasel as Za}from"efficient-easel/easel";import{toDateKey as $7,fromDateKey as q7}from"efficient-shell/format";function Fv(e){return!!e&&typeof e=="object"&&!Array.isArray(e)&&typeof e.src=="string"}function Yo(e){return typeof e=="string"?e:Fv(e)?e.src:""}function U4(e,o,t){return $s(e,o.split("."),t)}function $s(e,o,t){if(o.length===0)return t(e);let[a,...r]=o,n=a.endsWith("[]"),s=n?a.slice(0,-2):a;if(!e||typeof e!="object"||Array.isArray(e))return e;let i=e;if(!(s in i))return e;let f=i[s];if(n){if(!Array.isArray(f))return e;let p=!1,x=f.map(m=>{let h=$s(m,r,t);return h!==m&&(p=!0),h});return p?{...i,[s]:x}:e}let d=$s(f,r,t);return d===f?e:{...i,[s]:d}}var Ov=["upload","youtube"],Lv="upload",j4={upload:"Upload",youtube:"YouTube"},Av=["background","click"],Rv="background",K4={background:"Background",click:"Click to play"};function V4(e){return Ov.includes(e)?e:Lv}function Y4(e){return Av.includes(e)?e:Rv}var ep=/^[A-Za-z0-9_-]{11}$/,Bv=/^(?:www\.|m\.|music\.)?(?:youtube\.com|youtube-nocookie\.com|youtu\.be)$/;function X4(e){let o=typeof e=="string"?e.trim():"";if(!o)return null;if(ep.test(o))return o;let t;try{t=new URL(/^[a-z]+:\/\//i.test(o)?o:`https://${o}`)}catch{return null}if(t.protocol!=="https:"&&t.protocol!=="http:"||!Bv.test(t.hostname))return null;let a=t.pathname.split("/").filter(Boolean),r=t.hostname.endsWith("youtu.be")?a[0]:a[0]==="watch"?t.searchParams.get("v"):a[0]==="embed"||a[0]==="shorts"||a[0]==="live"||a[0]==="v"?a[1]:null;return r&&ep.test(r)?r:null}function Z4(e,o){let t=o==="click"?"autoplay=1&playsinline=1&rel=0":`autoplay=1&mute=1&loop=1&playlist=${e}&controls=0&playsinline=1&rel=0&disablekb=1`;return`https://www.youtube-nocookie.com/embed/${e}?${t}`}function Q4(e){return`https://i.ytimg.com/vi/${e}/maxresdefault.jpg`}function J4(e){return`https://i.ytimg.com/vi/${e}/hqdefault.jpg`}var e6="Play video";var qs={frame:"Video frame",image:"Image"},o6={any:[{field:"loadingShows",is:"image"},{all:[{not:{field:"loadingShows",set:!0}},{field:"poster",set:!0}]}]};function js(e){let o=e.loadingShows;return o==="image"?"image":o!=null&&o!==""?"frame":Yo(e.poster)?"image":"frame"}function t6(e){return Yo(js(e)==="image"?e.poster:e.videoFrame)||void 0}import{readHidable as lt,hidableText as hF}from"efficient-easel/draw";import{FOLD_FIELD_MARKER as If,LINK_FIELD_MARKER as IF,MEDIA_FIELD_MARKER as gF,SCAFFOLD_FIELD_MARKER as yF,TEXT_FIELD_MARKER as Go,foldMetaOf as To,textFieldIdentifier as Z7}from"efficient-easel/draw";import{jsx as sp}from"react/jsx-runtime";import{useCallback as Hv,useEffect as Wv,useRef as zv,useState as Gv}from"react";import{useEasel as Uv}from"efficient-easel/easel";import{SettingsAction as $v}from"efficient-easel/panel";function Ks(e){return typeof e=="number"&&Number.isFinite(e)}function n6(e,o){if(!Ks(e))return;let t=Qr(bo(e));if(Object.keys(t).length===0)return;let a=t[tn];if(typeof a!="string")return t;let r=Da(o)?Na(a,_o(o)??[]):a;return{...t,[_v]:r}}var _v="--sf-section-radius",tn="--sf-card-radius",gt=["tl","tr","br","bl"];function _o(e){if(!Array.isArray(e))return null;let o=e.filter(t=>gt.includes(t));return gt.filter(t=>o.includes(t))}function Da(e){let o=_o(e);return o!==null&&o.length<gt.length}function Na(e,o){return gt.map(t=>o.includes(t)?e:"0").join(" ")}var op=[{value:"tl",label:"Top left"},{value:"tr",label:"Top right"},{value:"bl",label:"Bottom left"},{value:"br",label:"Bottom right"}];var Dv="--sf-card-box-radius",Nv="--sf-site-card-radius",f6="sf-section-bleeds";function Vs(e){return typeof e=="number"&&Number.isFinite(e)}function c6(e,o){if(!Vs(e))return;let t=Qr(bo(e))[tn];if(typeof t!="string")return;let a=Da(o)?Na(t,_o(o)??[]):t;return{[Dv]:a}}function d6(e){let o=e[tn];return typeof o=="string"?{[Nv]:o}:{}}function tp(e,o){let t=e.find(n=>n?.props?.id===o);if(!t)return[...e];let a=t.props?.cardCorners,r=t.props?.cardCornerSides;return e.map(n=>n?.props?.id===o?n:{...n,props:{...n.props,cardCorners:a,cardCornerSides:r}})}import{locateNode as Mv}from"efficient-easel/draw";function Ma(e){if(!e)return null;let o=e.lastIndexOf(":");return o>0?{ownerId:e.slice(0,o),slot:e.slice(o+1)}:null}function an(e,o,t){let a=Ma(t?.zone),r=a?Mv(e,o,a.ownerId):null;return r&&a?{...r,slot:a.slot}:null}function ap(e,o,t){let a=an(e,o,t),r=a?.slot??"",n=a&&Array.isArray(a.item.props[r])?a.item.props[r]:[],s=t?.index??-1,i=s>=0?n[s]:void 0,f=i?.props?.id?String(i.props.id):"",d=Math.max(n.length-1,0);return!a||!f?{can:!1,reason:"unreachable",others:0}:n.length<=1?{can:!1,reason:"alone",others:d}:Vs(i?.props?.cardCorners)?{can:!0,others:d,zone:a.zone,index:a.index,data:{...a.item,props:{...a.item.props,[r]:tp(n,f)}}}:{can:!1,reason:"unset",others:d}}function rp(e){return e.can?Ae("Gives the other card this card's Corners.","Gives the other {n} cards this card's Corners.",e.others):e.reason==="alone"?l("This is the only card in the section."):e.reason==="unset"?l("Set this card's corners first."):l("This card is not in a section that can share corners.")}function np(e){return Ae("Applied to {n} card","Applied to {n} cards",e)}function lp(e,o){e.can&&o(e.zone,e.index,e.data)}import{useSectionOps as qv}from"efficient-easel/screen/lib/document/use-section-ops";var jv=2200,Kv="apply-corners-to-siblings",Vv="Apply to all cards";function Yv({plan:e,doneCount:o,onPress:t}){return sp($v,{id:Kv,label:l(Vv),note:rp(e),disabled:!e.can,done:o!==null,doneLabel:np(o??0),onPress:t})}function ip(){let{appState:e,config:o}=Uv(f=>f),t=qv(),[a,r]=Gv(null),n=zv(null);Wv(()=>()=>{n.current&&clearTimeout(n.current)},[]);let s=ap(o,e.data.content??[],e.ui.itemSelector),i=Hv(()=>{lp(s,t.replaceComponent),s.can&&(r(s.others),n.current&&clearTimeout(n.current),n.current=setTimeout(()=>r(null),jv))},[s,t]);return sp(Yv,{plan:s,doneCount:a,onPress:i})}var fp=1;function Xv(e){return bo(e)}function E6(e){let o=Xv(e);return o===null?{}:{"--sf-card-image-radius":`${o}px`}}var cp=1,dp="Corners";function Zv(e){return bo(e)}function A6(e,o){let t=Zv(e);if(t===null)return null;let a=`${t}px`;return{borderRadius:Da(o)?Na(a,_o(o)??[]):a}}var Do={twoAcross:{label:"Two across",across:2,acrossPhone:2,desktop:[[6,1],[6,1]],phone:[[3,1],[3,1]]},zigzag:{label:"Zigzag",across:2,acrossPhone:2,desktop:[[8,1],[4,1],[4,1],[8,1]],phone:[[4,1],[2,1],[2,1],[4,1]]},brick:{label:"Brick",across:2,acrossPhone:2,desktop:[[5,1],[7,1],[7,1],[5,1]],phone:[[2,1],[4,1],[4,1],[2,1]]},twoTall:{label:"Two tall",across:2,acrossPhone:2,desktop:[[6,2],[6,2]],phone:[[3,2],[3,2]]},offsetTall:{label:"Offset tall",across:2,acrossPhone:2,desktop:[[5,2],[7,1],[3,1],[4,1]],phone:[[3,2],[3,1],[3,1]]},ladder:{label:"Ladder",across:2,acrossPhone:2,desktop:[[3,2],[9,1],[5,1],[4,1]],phone:[[2,2],[4,1],[2,1],[2,1]]},threeAcross:{label:"Three across",across:3,acrossPhone:3,desktop:[[4,1],[4,1],[4,1]],phone:[[2,1],[2,1],[2,1]]},bigLeft:{label:"Big left",across:3,acrossPhone:3,desktop:[[6,1],[3,1],[3,1]],phone:[[4,1],[1,1],[1,1]]},bigRight:{label:"Big right",across:3,acrossPhone:3,desktop:[[3,1],[3,1],[6,1]],phone:[[1,1],[1,1],[4,1]]},threeStagger:{label:"Three stagger",across:3,acrossPhone:3,desktop:[[5,1],[4,1],[3,1],[3,1],[4,1],[5,1]],phone:[[3,1],[2,1],[1,1],[1,1],[2,1],[3,1]]},threeLadder:{label:"Three ladder",across:3,acrossPhone:3,desktop:[[3,1],[4,1],[5,1],[5,1],[4,1],[3,1]],phone:[[1,1],[2,1],[3,1],[3,1],[2,1],[1,1]]},tallMiddle:{label:"Tall middle",across:3,acrossPhone:3,desktop:[[4,1],[4,2],[4,1],[4,1],[4,1]],phone:[[2,1],[2,2],[2,1],[2,1],[2,1]]},fourAcross:{label:"Four across",across:4,acrossPhone:2,desktop:[[3,1],[3,1],[3,1],[3,1]],phone:[[3,1],[3,1]]},bigFirst:{label:"Big first",across:4,acrossPhone:2,desktop:[[6,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1]],phone:[[6,1],[3,1],[3,1]]},fourStagger:{label:"Four stagger",across:4,acrossPhone:2,desktop:[[4,1],[3,1],[2,1],[3,1],[2,1],[3,1],[4,1],[3,1]],phone:[[4,1],[2,1],[2,1],[4,1]]},tallFirst:{label:"Tall first",across:4,acrossPhone:2,desktop:[[3,2],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1]],phone:[[3,2],[3,1],[3,1]]},oneThenFour:{label:"One then four",across:4,acrossPhone:2,desktop:[[12,1],[3,1],[3,1],[3,1],[3,1]],phone:[[6,1],[3,1],[3,1]]},sixAcross:{label:"Six across",across:6,acrossPhone:3,desktop:[[2,1],[2,1],[2,1],[2,1],[2,1],[2,1]],phone:[[2,1],[2,1],[2,1]]},sixStagger:{label:"Six stagger",across:6,acrossPhone:6,desktop:[[3,1],[2,1],[1,1],[2,1],[1,1],[3,1],[1,1],[3,1],[2,1],[2,1],[1,1],[3,1]],phone:[[1,1],[1,1],[1,1],[1,1],[1,1],[1,1]]},twoThenThrees:{label:"Two, then threes",across:3,acrossPhone:3,lead:[[6,1],[6,1]],desktop:[[4,1],[4,1],[4,1]],leadPhone:[[3,1],[3,1]],phone:[[2,1],[2,1],[2,1]]}},Ys=Object.keys(Do),pp=[2,3,4,6];function mp(e){return typeof e!="string"||e===""?null:Do[e]??null}function up(e,o){return o?6/e.acrossPhone:12/e.across}function xp(e){return[...e.lead??[],...e.desktop]}var Qv="sf-wall--";function Jv(e){return`${Qv}${e}`}function B6(e){let o=Do[e],t=`.${Jv(e)}`,a=[],r=(n,s,i=[])=>{let f=[],d=n.length,p=i.length;i.forEach(([x,m],h)=>{f.push(`${t} > :nth-child(${h+1}){grid-column:span ${x};grid-row:span ${m}}`)}),n.forEach(([x,m],h)=>{f.push(`${t} > :nth-child(${d}n+${p+h+1}){grid-column:span ${x};grid-row:span ${m}}`)});for(let x=1;x<d;x+=1)f.push(`${t}:has(> :nth-child(${d}n+${p+x}):last-child) > :nth-last-child(-n+${x}){grid-column:span ${s};grid-row:span 1}`);return f};return a.push(`${t}{grid-template-columns:repeat(12,minmax(0,1fr))}`),a.push(...r(o.desktop,up(o,!1),o.lead)),a.push("@media (max-width:800px){"),a.push(`${t}{grid-template-columns:repeat(6,minmax(0,1fr))}`),a.push(...r(o.phone,up(o,!0),o.leadPhone)),a.push("}"),a.join("")}var rn=12,hp=1,ek=3;var ok=3;function Xs(e,o,t){let a=typeof e=="number"?e:Number.parseInt(String(e??""),10);return Number.isFinite(a)?Math.min(t,Math.max(o,Math.trunc(a))):null}function tk(e){return Xs(e,1,rn)??ok}function N6(e,o){return Xs(e,hp,ek)??(tk(o)===4?2:hp)}function M6(e){return e==null||e===""?null:Xs(e,1,rn)}var H6="data-sf-span";function W6(e){if(!e)return!1;if(e.type==="Grid")return!0;if(e.type==="GalleryB"){if(mp(e.props?.layout))return!1;let o=e.props?.columns;return o!=null&&o!==""}return!1}var Xo=["top-left","top-center","top-right","left","center","right","bottom-left","bottom-center","bottom-right"],nn="bottom-left";var Zs={"top-left":"Top left","top-center":"Top center","top-right":"Top right",left:"Left",center:"Center",right:"Right","bottom-left":"Bottom left","bottom-center":"Bottom center","bottom-right":"Bottom right"};function ak(e){let o=Xo.indexOf(yt(e));return{band:Math.floor(o/3),column:["start","center","end"][o%3]}}function rk(e){return 1+ak(e).band*6}function G6(e){return rk(e)+1}function yt(e){return Xo.includes(e)?e:nn}function U6(e){let o=typeof e=="number"&&Number.isFinite(e)?e:0;return Math.max(-40,Math.min(40,Math.round(o)))}function $6(e,o=60){let t=typeof e=="number"&&Number.isFinite(e)?e:o;return Math.max(30,Math.min(100,Math.round(t)))}function Qs(e,o){let t=yt(o);return e.filter(a=>yt(a?.props?.placement)===t).length}function Ip(e){return`${Zs[yt(e)]} already holds 4 boxes. Move one somewhere else first.`}function Js(e,o){let t=e.filter(a=>a?.props?.id!==o);return Xo.map(a=>{let r=Qs(t,a)>=4,n=Zs[a];return r?{value:a,label:n,disabled:!0,title:Ip(a)}:{value:a,label:n}})}function ln(e,o){let t=o===void 0?nn:yt(o?.props?.placement);return Qs(e,t)>=4?Ip(t):null}var sn="HeroGroup";function nk(e){return Xo.map(o=>{let t=Qs(e,o);return{anchor:o,total:t,hidden:t-4}}).filter(o=>o.hidden>0)}function ei(e){let o=nk(e);return o.length===0?null:o.map(({anchor:t,total:a,hidden:r})=>{let n=Zs[t],s=r===1?"1 is not shown":`${r} are not shown`;return`${n} holds ${a} boxes. The published page draws the first 4, so ${s}. ${r===1?"Move it":"Move them"} somewhere else.`}).join(" ")}function gp(e,o){let t=o;if(t?.type!==sn)return null;let a=t.props?.id===void 0?"":String(t.props.id);return a?ln(oi(e,a),t):null}function oi(e,o){let t=bp(e,o);return t&&t.ownerType===sk?t.siblings:[]}function yp(e,o){let t=bp(e,o);return t?t.ancestorTypes.filter(a=>a===sn).length:lk}var lk=1,sk="HeroSlide";function bp(e,o){let t=r=>Array.isArray(r)&&r.length>0&&r.every(n=>!!n&&typeof n=="object"&&typeof n.type=="string"),a=(r,n,s)=>{if(n>12||!r||typeof r!="object")return null;if(t(r)){if(r.some(i=>i?.props?.id===o))return{siblings:r,ownerType:s.at(-1)??null,ancestorTypes:s};for(let i of r){let f=i.type,d=a(i,n+1,[...s,String(f)]);if(d)return d}return null}for(let i of Object.values(r)){let f=a(i,n+1,s);if(f)return f}return null};return a(e,0,[])}import{jsx as ik}from"react/jsx-runtime";var fk="sf-hint-keep";function Sp({children:e}){return ik("span",{className:fk,children:e})}import{jsx as Zo,Fragment as uk,jsxs as Fp}from"react/jsx-runtime";import{useContext as pk,useEffect as mk,useId as xk,useState as Op}from"react";import{SettingsField as hk,SettingsSwitch as Ik}from"efficient-easel/panel";import{AnchorIcon as gk}from"efficient-easel/icons";import{ScreenDocumentContext as yk}from"efficient-easel/screen/components/ScreenDocumentContext";import{Snippet as bk}from"efficient-shell/ui";import{slugify as Sk}from"efficient-shell/format";var fn="homepage";import{slugify as ck}from"efficient-shell/format";var Cp=[{value:"page",label:"Page"},{value:"anchor",label:"Anchor"},{value:"blog",label:"Blog post",needs:"service"},{value:"product",label:"Product",needs:"commerce"},{value:"popup",label:"Popup"},{value:"custom",label:"Custom URL"}];function wp(e){return e.offersCommerce&&e.offersService?Cp:Cp.filter(o=>!o.needs||(o.needs==="commerce"?e.offersCommerce:e.offersService))}var ti="#popup:";function vp(e){return`${ti}${e}`}function kp(e){return e.startsWith(ti)&&e.slice(ti.length).trim()||null}function Ha(e){return e===fn?"/":`/${e}`}function Tp(e){return`/journal/${e}`}function Z6(e){return`/wheels/${e}`}function cn(e,o){return`${Ha(e)}#${o}`}function dk(e){return typeof e=="string"?e.trim():e&&typeof e=="object"&&typeof e.text=="string"?e.text.trim():""}function Pp(...e){let o=new Set,t=[];for(let a of e)for(let r of a?.content??[]){let n=dk(r?.props?.anchor);if(!n)continue;let s=ck(n);!s||o.has(s)||(o.add(s),t.push({slug:s,name:n}))}return t}function Q6(e){let o=e.indexOf("#"),t=o===-1?e:e.slice(0,o),a=t.indexOf("?");return a===-1?t:t.slice(0,a)}function Ep(e){return/^\/wheels\/[^/?#]+(?:[?#].*)?$/.test(e)}import{readHidable as Ck}from"efficient-easel/draw";function Lp({value:e,onChange:o,nameBox:t}){let a=Ck(e).text,[r,n]=Op(!1),s=r||a.trim()!=="",i=xk();return Fp(uk,{children:[Zo(hk,{label:l("Add an anchor"),labelId:i,icon:Zo(gk,{}),action:Zo(Ik,{checked:s,ariaLabelledBy:i,onChange:f=>{n(f),!f&&a!==""&&o("")}})}),s&&t(e,o),s&&Zo(wk,{name:a})]})}function wk({name:e}){let o=pk(yk),t=o?.templateId?"":o?.currentSlug??"",[a,r]=Op("");mk(()=>r(Jr()||window.location.origin),[]);let n=Sk(e);if(!n||!t)return null;let s=`${a}${cn(t,n)}`,i=s.replace(/^https?:\/\//,""),f=i.lastIndexOf("#");return Zo("div",{className:"sf-anchor-link",children:Zo(bk,{value:s,label:l("link"),size:"sm",children:Fp("span",{className:"sf-anchor-link-text",children:[Zo("span",{className:"sf-anchor-link-path",children:i.slice(0,f)}),Zo("span",{className:"sf-anchor-link-hash",children:i.slice(f)})]})})})}import{AdjustIcon as bF,AlignLeftIcon as SF,EyeIcon as CF,AlignSeparateIcon as wF,AnimationIcon as yh,BackgroundIcon as vF,BorderAllIcon as kF,BlockSectionIcon as TF,CartIcon as PF,ColumnWidthsIcon as bh,ColumnsIcon as Sh,CornerIcon as EF,DirectionDownIcon as FF,DirectionLeftIcon as OF,DirectionRightIcon as LF,DirectionUpIcon as AF,DollarIcon as RF,FinishIcon as BF,GapIcon as Ch,GridIcon as _F,GroundIcon as DF,HashIcon as wh,HeightIcon as NF,ImageIcon as MF,ListIcon as HF,LocationIcon as pf,NudgeIcon as WF,PaddingAllIcon as zF,PaddingBottomIcon as vh,PaddingLeftIcon as kh,PaddingRightIcon as Th,PaddingTopIcon as Ph,PageIcon as Eh,PlacementIcon as GF,ProductSizeIcon as UF,StickyIcon as $F,RotateIcon as qF,SquareIcon as jF,TypeIcon as KF,WidthIcon as VF,WrapIcon as YF}from"efficient-easel/icons";import{jsx as te,Fragment as So,jsxs as Co}from"react/jsx-runtime";import{TitleIcon as vk,ButtonIcon as kk,DollarIcon as Tk,HashIcon as Pk,LinkIcon as Ek,NoteIcon as Fk,TagIcon as Ok,TextLinesIcon as Lk}from"efficient-easel/icons";var Ap={body:Lk,button:kk,link:Ek,label:Ok,number:Pk,price:Tk,note:Fk,title:vk},Rp={eyebrow:Co(So,{children:[te("path",{d:"M5 6.5h5"}),te("path",{d:"M5 12.5h14"}),te("path",{d:"M5 18h11"})]}),heading:Co(So,{children:[te("path",{d:"M6.5 5v14"}),te("path",{d:"M17.5 5v14"}),te("path",{d:"M6.5 12h11"})]}),intro:Co(So,{children:[te("path",{d:"M4 5.5v13"}),te("path",{d:"M8 7.5h12"}),te("path",{d:"M8 12h12"}),te("path",{d:"M8 16.5h8"})]}),value:Co(So,{children:[te("rect",{x:"2.5",y:"7",width:"19",height:"10",rx:"2"}),te("path",{d:"M6.5 12h7"})]}),name:Co(So,{children:[te("path",{d:"M6 3.5v17"}),te("path",{d:"M6 5h11.5l-2.6 3.6L17.5 12H6z"})]}),date:Co(So,{children:[te("rect",{x:"4",y:"5.5",width:"16",height:"15",rx:"2"}),te("path",{d:"M4 10.5h16"}),te("path",{d:"M9 3.2v4.4"}),te("path",{d:"M15 3.2v4.4"})]}),caption:Co(So,{children:[te("rect",{x:"3.5",y:"4.5",width:"17",height:"11",rx:"2"}),te("path",{d:"M3.5 12.8l4.2-3.2 3.6 2.8 3.4-2.4 5.8 4"}),te("path",{d:"M6.5 19.5h11"})]}),quote:Co(So,{children:[te("path",{d:"M9.5 5.5C7 7.2 5.5 9.7 5.5 12.8h4v5.7h-5v-5.7"}),te("path",{d:"M19.5 5.5c-2.5 1.7-4 4.2-4 7.3h4v5.7h-5v-5.7"})]}),tag:Co(So,{children:[te("rect",{x:"3",y:"5.5",width:"18",height:"13",rx:"2.5"}),te("path",{d:"M8 9.5h8"}),te("path",{d:"M12 9.5v5"})]}),meta:Co(So,{children:[te("path",{d:"M4 7h16"}),te("path",{d:"M4 14h3.5"}),te("path",{d:"M10.5 14h3"}),te("path",{d:"M17 14h3"})]})};function ai({noun:e,size:o=14,strokeWidth:t=1.8,className:a,style:r}){let n=Ap[e];return n?te("span",{className:a,style:{display:"inline-flex",...r},"aria-hidden":"true",children:te(n,{size:o})}):te("svg",{className:a,style:r,width:o,height:o,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:t,strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:Rp[e]})}var mW=Object.keys(Ap);var xW=Object.keys(Rp);var Ak="#ffffff",Rk=/^#[0-9a-fA-F]{6}$/;function ri(e){return Bk(e)?e:Ak}function Bk(e){return typeof e=="string"&&Rk.test(e)}function IW(e){return{"--bg":ri(e)}}var ni=[{role:"bg",token:"--bg",ink:!1},{role:"fg",token:"--fg",ink:!0},{role:"surface",token:"--site-surface",ink:!1},{role:"surface-2",token:"--site-surface-2",ink:!1},{role:"line",token:"--site-line",ink:!0},{role:"muted",token:"--fg-dim",ink:!0}],_k=ni.filter(e=>e.ink);function Dk(e){let o={color:e.fg};for(let{role:t,token:a}of _k)o[a]=e[t];return o}var Nk={fg:"var(--overlay-fg)",line:"color-mix(in srgb, var(--overlay-fg) 24%, transparent)",muted:"color-mix(in srgb, var(--overlay-fg) 76%, transparent)"},Bp=Object.freeze(Dk(Nk));var dn=-1,Mk="sf-section-accent",_p="Color",Dp=new Set(["CategoryBar","DocTabs"]),SW=new Set(["Flex"]),Hk=0;function li(e){return e===dn?null:typeof e=="number"&&Number.isInteger(e)&&e>=0?e:Hk}function CW(e){return e??dn}function Wk(e){let o=`--theme-preset-${e}`,t={"--sf-sec-accent":`var(${o}-accent)`,"--sf-sec-accent-2":`var(${o}-accent-2)`,"--sf-sec-accent-ink":`var(${o}-accent-ink)`};for(let{role:a}of ni)t[`--sf-sec-${a}`]=`var(${o}-${a}, var(--theme-${a}))`;return t}function wW(e){let o=li(e.sectionAccent);return o===null?null:{className:Mk,style:Wk(o)}}var zk=["fade","rise","scale"],si="none",Np=[{label:"None",value:si},{label:"Fade",value:"fade"},{label:"Rise",value:"rise"},{label:"Scale",value:"scale"}];function TW(e){return zk.includes(e)?e:null}var Mp="data-sf-anim",Wa="data-sf-anim-state";function PW(e){let o=()=>{};if(typeof IntersectionObserver>"u"||!e.getAttribute(Mp))return o;let t=window.innerHeight||document.documentElement.clientHeight;if(e.getBoundingClientRect().top<t)return o;e.setAttribute(Wa,"armed");let a=new IntersectionObserver(r=>{for(let n of r)if(n.isIntersecting){a.disconnect(),Gk(e);break}},{threshold:0});return a.observe(e),()=>{a.disconnect(),e.removeAttribute(Wa)}}function Gk(e){if(!e.getAttribute(Mp))return;e.removeAttribute(Wa),e.offsetWidth,e.setAttribute(Wa,"play");let o=t=>{t.target===e&&(e.removeAttribute(Wa),e.removeEventListener("animationend",o))};e.addEventListener("animationend",o)}var EW=Dp;function fi(e,o){let t=e?.content;if(!Array.isArray(t))return null;for(let a of t){if(!a||typeof a!="object")continue;let r=a.props;if(r?.id===o)return null;if(ii(a,o,0))return r??{}}return null}function ii(e,o,t){if(t>12||!e||typeof e!="object")return!1;if(Array.isArray(e))return e.some(r=>ii(r,o,t+1));let a=e.props;return a&&typeof a=="object"&&a.id===o?!0:Object.values(e).some(r=>ii(r,o,t+1))}import{SettingsDefaultReset as Re,SettingsDrill as XF,SettingsField as se,SettingsGroup as ZF,SettingsGroupSub as QF,SettingsBorder as JF,SettingsSegmented as eO,SettingsSides as oO,SettingsSidesEach as Fh,sidesStartEach as tO,SettingsSwitch as Oh,borderSides as aO,borderStartEach as rO}from"efficient-easel/panel";import{FieldSelect as nO,ListField as lO}from"efficient-easel/fields";import{DisplayChips as sO}from"efficient-shell/ui";function Zt(e){if(!e||typeof e!="object"||Array.isArray(e))return{};let o={};for(let[t,a]of Object.entries(e))typeof a=="boolean"&&(o[t]=a);return o}function un(e,o){return Zt(e)[o]!==!1}function ci(e,o,t){let a=Zt(o)[t];return typeof a=="boolean"?a:un(e,t)}function Hp(e){return Object.values(Zt(e)).some(o=>o===!1)}function Wp(e){return Object.keys(Zt(e)).length>0}function zp(e,o,t){let a={...Zt(e)};return t?delete a[o]:a[o]=!1,Object.keys(a).length?a:void 0}function Gp(e,o,t){return{...Zt(e),[o]:t}}function LW(e,o,t){let a=un(e,t),r=ci(e,o,t);return a&&r?"":!a&&!r?"hidden":a?"max-[720px]:hidden":"min-[720px]:hidden"}import{AlignmentGrid as iO,Checkbox as I8,CornersInput as fO,DatePicker as g8,DateTimePicker as cO,FOCAL_DEFAULT as y8,PictureTiles as Lh,PositionInput as dO,Slider as uO,Tooltip as Ah}from"efficient-shell/ui";import{jsx as No,jsxs as qp}from"react/jsx-runtime";import{ColorPicker as $p,HexInput as $k}from"efficient-shell/ui";import{SettingsDefaultReset as qk,SettingsField as jk}from"efficient-easel/panel";import{typedHex as di}from"efficient-easel/pick";import{typedHex as Uk}from"efficient-easel/pick";function Up(e){let o=new Set,t=[];return ze(e).themes.forEach((a,r)=>{let n=[[l("Theme {n} main color",{n:r+1}),a.accent],[l("Theme {n} text color",{n:r+1}),a.text],[l("Theme {n} background",{n:r+1}),a.background]];for(let[s,i]of n){let f=i?Uk(i):null;!f||o.has(f)||(o.add(f),t.push({name:s,value:f}))}}),t}function Kk({value:e,onChange:o,label:t,id:a,caption:r,inherited:n,ariaLabel:s,opacity:i,onOpacityChange:f}){return No(Yk,{value:e,onChange:o,label:l(s??t),id:a,caption:r,inherited:n,...f?{opacity:i,onOpacityChange:f}:{}})}function Vk(){let{theme:e}=K();return Up(e).map(o=>({value:o.value,label:o.name}))}function Yk({value:e,onChange:o,label:t,id:a,caption:r,inherited:n,opacity:s,onOpacityChange:i}){let f=Vk(),d=e?null:di(n??""),p=r!==void 0&&(!e||di(r)!==di(e))?r:null,x=m=>{m!==e&&o(m)};return i?No("div",{className:"sf-colour",children:No($p,{id:a,value:e,onChange:x,label:t,presets:f,fallback:d??void 0,size:"md",align:"start",showHexInput:!0,opacity:s,onOpacityChange:i})}):qp("div",{className:"sf-colour",children:[No($p,{id:a,value:e,onChange:x,label:t,presets:f,fallback:d??void 0,size:"md",align:"start"}),p!==null?No("span",{className:"sf-colour-caption",children:p}):No("span",{className:"sf-colour-hexwrap",children:No($k,{value:e||d||"",onChange:x,label:l("{label} hex code",{label:t}),placeholder:e||d?void 0:l("Not set"),className:d?"sf-colour-hex is-inherited":"sf-colour-hex",size:"md"})})]})}function je({label:e,icon:o,changed:t,hint:a,onReset:r,resetTo:n,children:s,...i}){return qp(jk,{label:e,icon:o,htmlFor:i.id,changed:t,hint:a,action:r?No(qk,{words:X()?.panel,label:e,changed:!!t,detail:n,onReset:r}):void 0,children:[Kk({...i,label:e}),s]})}function pn({label:e,icon:o,value:t,inherited:a,resetTo:r,onChange:n,onReset:s,hint:i,opacity:f,onOpacityChange:d,changed:p}){let x=!!t;return No(je,{label:e,icon:o,value:t,inherited:x?void 0:a,onChange:n,changed:p??x,onReset:s,resetTo:r,hint:i,...d?{opacity:f,onOpacityChange:d}:{}})}import{jsx as bT}from"react/jsx-runtime";import{useEffect as ST,useState as CT}from"react";import{clearRangeOf as wT,markSelection as vT,useCaretEdit as kT}from"efficient-easel/copy";import{TextToolbar as TT}from"efficient-shell/ui";import{applyMark as QW,markupTools as JW,MARKUP_TOOLS as ez,COPY_FIELD_TOOLS as oz,STOREFRONT_MARKUP as tz,tokenizeInline as az,stripInline as rz,isSafeLinkHref as nz}from"efficient-shell/markup";import{applyMark as sT,clearStyle as iT,markedAt as fT,markupTools as cT,MARKUP_TOOLS as dT,parseMarkup as uT,RETIRED_MARKS as pT,STOREFRONT_MARKUP as mT,tokenizeInline as sz}from"efficient-shell/markup";var bt=["highlight","strong","quiet"],St={highlight:"Highlight",strong:"Bold",quiet:"Quiet"},wo={highlight:{kind:"wordHighlight",delimiter:"@@"},strong:{kind:"wordStrong",delimiter:"++"},quiet:{kind:"wordQuiet",delimiter:"^^"}},jW=Object.fromEntries(bt.map(e=>[wo[e].kind,e])),KW="data-sf-ws",mn=["accent","text","labels"],Yp={accent:"Accent",text:"Text",labels:"Labels"},Qt={accent:"var(--accent)",text:"var(--fg)",labels:"var(--fg-dim)"},Xk=80,Zk=120,Qk=100,Jk=900,eT=.5,oT=3,tT=-.1,aT=.5,rT=3,ui={font:null,size:null,weight:null,bold:null,italic:null,lineGap:null,textGap:null,colour:null},nT={highlight:{...ui},strong:{...ui},quiet:{...ui}};function jp(e,o,t){return typeof e!="number"||!Number.isFinite(e)?null:Math.round(Math.min(Math.max(e,o),t))}function Kp(e,o,t){if(typeof e!="number"||!Number.isFinite(e))return null;let a=10**rT;return Math.round(Math.min(Math.max(e,o),t)*a)/a}function Vp(e){return typeof e=="boolean"?e:null}function lT(e){let o=typeof e?.font=="string"&&Qe.some(a=>a.key===e.font)?e.font:null,t=typeof e?.colour=="string"&&mn.includes(e.colour)?e.colour:null;return{font:o,size:jp(e?.size,Xk,Zk),weight:jp(e?.weight,Qk,Jk),bold:Vp(e?.bold),italic:Vp(e?.italic),lineGap:Kp(e?.lineGap,eT,oT),textGap:Kp(e?.textGap,tT,aT),colour:t}}function Xp(e){let o={};for(let t of bt)o[t]=e&&t in e&&e[t]?lT(e[t]):{...nT[t]};return o}function VW(e){let o=Xp(e),t={};for(let a of bt){let r=o[a],n=`--sf-ws-${a}`;if(r.font){let s=Qe.find(i=>i.key===r.font);s&&(t[`${n}-font`]=`var(${s.cssVar})`)}r.size!==null&&(t[`${n}-size`]=`${r.size/100}em`),r.weight!==null&&(t[`${n}-weight`]=String(r.weight)),r.bold!==null&&(t[`${n}-weight-bold`]=r.bold?"700":"400"),r.italic!==null&&(t[`${n}-style`]=r.italic?"italic":"normal"),r.lineGap!==null&&(t[`${n}-line`]=String(r.lineGap)),r.textGap!==null&&(t[`${n}-track`]=`${r.textGap}em`),r.colour!==null&&(t[`${n}-color`]=Qt[r.colour])}return t}function YW(e){let o=e?.word_styles??void 0,t={};for(let a of bt)o&&a in o&&(t[a]=o[a]??null);return Xp(t)}var xT=new Set(["strong"]),Zp=bt.map(e=>({open:wo[e].delimiter,close:wo[e].delimiter,kind:wo[e].kind,...xT.has(e)?{wordStart:!0}:{}})),fz=[{style:wo.highlight.kind,label:St.highlight,title:`${St.highlight} word style`},{style:wo.strong.kind,label:St.strong,title:`${St.strong} word style`},{style:wo.quiet.kind,label:St.quiet,title:`${St.quiet} word style`}],hT=new Set(Zp.map(e=>e.open)),Ct=[...mT.filter(e=>!hT.has(e.open)),...Zp];function IT(e){return e.bullet?"- ":e.number!=null?`${e.number}. `:""}function gT(e){return uT(typeof e=="string"?e:"",Ct)}var yT=dT.map(e=>e.style).filter(e=>!pT.includes(e)).filter(e=>Ct.some(o=>o.kind===e));function Qp(){return cT(yT)}var Jp=Object.fromEntries(bt.map(e=>[wo[e].kind,wo[e].delimiter]));function em(e,o,t,a){let r=Jp[a];if(!r)return sT(e,o,t,a);let n=e.slice(o,t),s=e.slice(Math.max(0,o-r.length),o),i=e.slice(t,t+r.length);if(s===r&&i===r)return{text:e.slice(0,o-r.length)+n+e.slice(t+r.length),selectionStart:o-r.length,selectionEnd:o-r.length+n.length};let f=n||"styled text";return{text:e.slice(0,o)+r+f+r+e.slice(t),selectionStart:o+r.length,selectionEnd:o+r.length+f.length}}function om(e,o,t,a){let r=Jp[a];return r?o>=r.length&&e.slice(o-r.length,o)===r&&e.slice(t,t+r.length)===r:fT(e,o,t,a)}function za(e){return gT(e).map(o=>IT(o)+am(o.children)).join(`
|
|
2
|
+
`)}function tm(e,o,t){return iT(e,o,t,Ct)}function am(e){return e.map(o=>o.kind==="text"?o.text:am(o.children)).join("")}function PT(e,o,t){return vT(e,o,t,em)}function rm(e,o){let t=wT(o,e.length),a=tm(e,t.start,t.end);return a.text===e?null:a}function ET(e){let[o,t]=CT(null);return ST(()=>{let a=e.current?.ownerDocument??(typeof document>"u"?null:document);if(!a)return;let r=()=>{let n=e.current;if(!n||a.activeElement!==n)return;let s=n.selectionStart??n.value.length,i=n.selectionEnd??s;t(f=>f&&f.start===s&&f.end===i?f:{start:s,end:i})};return a.addEventListener("selectionchange",r),()=>a.removeEventListener("selectionchange",r)},[e]),[o,t]}function FT({target:e,value:o,onChange:t,disabled:a=!1,label:r="Formatting"}){let n=kT({target:e,onChange:t}),[s,i]=ET(e),f=m=>n(h=>{let b=PT(o,m,h);return i({start:b.selectionStart,end:b.selectionEnd}),b}),d=Qp(),p={};if(s)for(let m of d)p[m.style]=om(o,s.start,s.end,m.style);let x=a?null:rm(o,s);return bT(TT,{offered:new Set(d.map(m=>m.style)),onMark:m=>f(m),pressed:p,disabled:a,"aria-label":l(r),className:"sf-markup-bar",clear:x?{onClear:()=>n(()=>{let m=e.current,h=m&&m.ownerDocument.activeElement===m?{start:m.selectionStart??0,end:m.selectionEnd??0}:null,b=rm(o,h)??{text:o,selectionStart:h?.start??0,selectionEnd:h?.end??0};return i({start:b.selectionStart,end:b.selectionEnd}),b})}:void 0})}var pi=FT;import{deviceField as we}from"efficient-easel/screen/lib/document/device-fields";import{NO_CONTROL_FIELD as pO,NoControlMark as Un,noControlField as Qa}from"efficient-easel/screen/lib/document/panel-no-control-mark";var mi="__ownBox";function nm(e){return!!e&&typeof e=="object"&&e[mi]===!0}function xn(e,o,t){return typeof e=="number"?e:typeof o=="number"?o:t}var hn=void 0;import{phoneKey as na}from"efficient-easel/draw";import{jsx as hi,Fragment as AT}from"react/jsx-runtime";import{createContext as RT,useContext as BT}from"react";var In={ProductGrid:{source:{keep:["slug"]}},GalleryItem:{product:{keep:["code","finish"]}},FeaturedCover:{source:{keep:["slug"]}},LongRead:{source:{keep:["slug"]}}},gn={Events:["posts"],SubscribeBlogs:["posts"]};var OT=["anchor"],LT=/^href$|Href$|^url$|Url$|^link$|^mailto$|^tel$/;function Ga(e){return OT.includes(e)||LT.test(e)}var xi={Gallery:{source:{verb:"snapshot",keep:[]}},ProductHero:{source:{verb:"snapshot",keep:[]}},SpecTable:{source:{verb:"snapshot",keep:[]},wheel:{verb:"reference"},finish:{verb:"reference"},size:{verb:"reference"}},CollectionCard:{collection:{verb:"snapshot",keep:[]}},FooterMenu:{menu:{verb:"snapshot",keep:[]}},MenuBlock:{menu:{verb:"snapshot",keep:[]}},ProductGrid:{design_codes:{verb:"reference"}},ProductRef:{code:{verb:"reference"},finish:{verb:"reference"}},FitmentTable:{wheel:{verb:"reference"}},GalleryItem:{fromProduct:{verb:"reference"}},Footprint:{"offices[].group":{verb:"groupKey"},"offices[].lat":{verb:"pii"},"offices[].lng":{verb:"pii"},"offices[].geocode":{verb:"pii"}}};xi.ContactLocations={"locations[].lat":{verb:"pii"},"locations[].lng":{verb:"pii"},"locations[].mapsUrl":{verb:"pii"},"locations[].geocode":{verb:"pii"}};var Cz=Object.fromEntries(Object.entries(In).map(([e,o])=>[e,Object.keys(o)])),wz=Object.fromEntries(Object.entries(gn).map(([e,o])=>[e,[...o]]));import{NoControlMark as _T}from"efficient-easel/screen/lib/document/panel-no-control-mark";var lm=RT(!1);function sm({children:e}){return hi(lm.Provider,{value:!0,children:e})}function DT(){return BT(lm)}function im({name:e,children:o}){return!DT()||!e||!NT(e)||Ga(e)?hi(AT,{children:o}):hi(_T,{})}function NT(e){return/^[A-Za-z0-9_$]+$/u.test(e)}function Qo(e,o,t){return e.some(a=>(typeof a=="object"?a.value:a)===t)?t:o}var Ii="off",gi="none",yi=[{label:"None",value:"off"},{label:"1, 2, 3",value:"plain"},{label:"01, 02, 03",value:"padded"},{label:"N\xB001, N\xB002",value:"numero"}],bi=[{label:"None",value:"none"},{label:"Hairline",value:"hairline"}];function Az(e){return Qo(yi,Ii,e)}function Rz(e){return Qo(bi,gi,e)}var fm="sf-card-index",Ua="sf-card-index",Bz="pointer-events-none absolute left-[18px] top-[18px] z-10 border border-line bg-bg/70 px-2 py-1 font-mono text-[length:var(--size-label,10px)] uppercase tracking-[0.16em] text-fg-dim",MT={plain:`counter(${Ua})`,padded:`counter(${Ua}, decimal-leading-zero)`,numero:`"N\xB0" counter(${Ua}, decimal-leading-zero)`};function _z(e,o){return o==="off"?"":`.${e}{counter-reset:${Ua}}.${e} .${fm}{counter-increment:${Ua}}.${e} .${fm}::before{content:${MT[o]}}`}function Dz(e){return e==="hairline"?"border border-line hover:border-accent":""}var cm=[{value:"1",label:"1st rendering"},{value:"2",label:"2nd rendering"},{value:"3",label:"3rd rendering"},{value:"4",label:"4th rendering"},{value:"5",label:"5th rendering"}];import{SCALAR_TEXT_CONTROLS as mO}from"efficient-easel/draw";import{jsx as vo}from"react/jsx-runtime";import{SettingsDefaultReset as zT,SettingsField as dm}from"efficient-easel/panel";import{useSelectedFields as HT}from"efficient-easel/easel";function Jo(){try{return HT()}catch{return null}}import{FOCAL_DEFAULT as GT}from"efficient-shell/format";import{ImageIcon as um,PlayIcon as pm}from"efficient-easel/icons";import{MediaUploadField as UT}from"efficient-shell/ui";import{useContext as $T}from"react";import{ScreenDocumentContext as qT}from"efficient-easel/screen/components/ScreenDocumentContext";import{phoneKey as jT}from"efficient-easel/draw";import{usePreviewDevice as KT}from"efficient-easel/draw/client";import{requestMediaPick as VT}from"efficient-easel/screen/lib/media-picker";import{useEaselHost as YT}from"efficient-easel/screen/lib/host";import{backendOf as WT}from"efficient-easel/screen/lib/session";var Ce=WT,yn=e=>e.blocks;import{useEaselSession as XT}from"efficient-easel/screen/lib/session-context";function ZT(e,o){let t=Jo(),a=KT()==="mobile";if(!e||!t||o&&!o(t.values??{}))return null;let r=typeof t.values?.[e]=="string"&&t.values[e]?String(t.values[e]):GT,n=jT(e),s=typeof t.values?.[n]=="string"&&t.values[n]?String(t.values[n]):void 0,i=t.onChange;return{phone:a,desktop:r,own:s,focus:a?s??r:r,set:f=>i(a?n:e,f),clear:()=>i(n,hn)}}function mm({value:e,onChange:o,label:t,accept:a,placeholder:r,focusKey:n,focusWhen:s,frameKey:i,fieldKey:f}){let d=YT(),p=XT(),x=l(t),m=a.startsWith("video"),h=ZT(m?void 0:n,s),b=$T(qT),S=bn(),T=i&&f?{video:f,frame:i}:null,F=P=>VT(d,{accept:a,title:x,...P?{file:P}:{}}).then(E=>!E||!T?E?.url??null:(S({[T.video]:E.url,[T.frame]:E.posterUrl??""}),null)),C=T?P=>P?o(P):S({[T.video]:"",[T.frame]:""}):o;if(b&&!b.capabilities.mediaEditing)return vo(dm,{label:x,icon:m?vo(pm,{}):vo(um,{}),children:vo("div",{className:"sf-image-slot-inert",children:m?l("Templates don\u2019t store videos \u2014 this slot stays a placeholder. Each website picks its own after it\u2019s created."):l("Templates don\u2019t store images \u2014 this slot stays a placeholder. Each website picks its own after it\u2019s created.")})});let g=Yo(e),I=h?.phone&&g?vo(zT,{words:X()?.panel,label:l("Image focus"),changed:!!h.own,detail:l("{value} on desktop",{value:h.desktop}),onReset:h.clear}):void 0;return vo(dm,{label:x,icon:m?vo(pm,{}):vo(um,{}),action:I,children:vo("div",{style:{flex:"1 1 auto",minWidth:0},children:vo(UT,{value:g,onChange:C,onPick:F,accept:m?"video/*":"image/*",kind:m?"video":"image",placeholder:r===void 0?void 0:l(r),maxSizeBytes:Ce(p).media.maxUploadBytes,...h?{focus:h.focus,onFocusChange:h.set}:{}})})})}import{jsx as xm}from"react/jsx-runtime";import{useId as QT}from"react";import{FieldSelect as JT}from"efficient-easel/fields";import{SettingsField as eP}from"efficient-easel/panel";function oP(e){return e.map(({value:o,label:t,note:a})=>({value:o,label:t,...a?{meta:a}:{}}))}function hm({label:e,options:o,value:t,onChange:a,emptyLabel:r,icon:n,hint:s}){let i=QT(),f=`${i}-label`,d=`${i}-button`,p=Array.isArray(t)?t:[];return xm(eP,{label:l(e),labelId:f,icon:n,hint:s,children:xm(JT,{id:d,multiple:!0,value:p,options:oP(o),onChange:a,placeholder:r===void 0?l("None"):l(r),ariaLabelledBy:`${f} ${d}`,inline:!0})})}import{jsx as be,jsxs as kt,Fragment as EP}from"react/jsx-runtime";import{useCallback as FP,useContext as OP,useEffect as LP,useId as Lm,useRef as Fm,useState as Om}from"react";import{ThemeIcon as AP}from"efficient-easel/icons";import{SettingsField as RP}from"efficient-easel/panel";import{ScreenDocumentContext as BP}from"efficient-easel/screen/components/ScreenDocumentContext";import{jsx as V,jsxs as et,Fragment as iP}from"react/jsx-runtime";import{Button as Ci,IconButton as fP,Tooltip as cP}from"efficient-shell/ui";import{jsx as wt,jsxs as Im}from"react/jsx-runtime";import{AccentIcon as tP}from"efficient-easel/icons";import{Tooltip as aP}from"efficient-shell/ui";function Si(e){return yo(e).background}function rP(e){let o=Ko(e.accent,Si(e));return o===null?null:{ratio:o,grade:Xt(o)}}function nP(e){let o=Si(e),t=Ko(e.accent,o);return t===null?[]:Pu(e.accent).filter(a=>{let r=Ko(a,o);return r!==null&&r>t&&Xt(r)==="good"})}var lP={good:"Easy to read","large-only":Yt["large-only"],hard:Yt.hard};function gm({value:e,onChange:o}){let t=rP(e),a=t?.grade,r=t&&t.grade!=="good"?nP(e):[];return wt(je,{label:l("Main color"),icon:wt(tP,{}),hint:t?l(lP[t.grade]):void 0,value:e.accent,onChange:n=>o({...e,accent:n}),children:r.length>0?wt("div",{className:"w-full min-w-0",children:Im("div",{className:"sf-readability",children:[wt("p",{className:"sf-readability-advice",children:sP(a,!0)}),wt("div",{className:"sf-readability-suggestions",children:r.map(n=>{let s=Ko(n,Si(e));return wt(aP,{content:l("Use {colour}",{colour:n.toUpperCase()}),children:Im("button",{type:"button",className:"sf-readability-suggestion",onClick:()=>o({...e,accent:n}),children:[wt("span",{className:"sf-readability-chip",style:{background:n},"aria-hidden":!0}),s?`${s.toFixed(1)}:1`:n.toUpperCase()]})},n)})})]})}):null})}function sP(e,o){return e?e==="good"?l("This color reads clearly on your pages."):o?l("This color is hard to read on this theme's page. The buttons below are the same hue, darkened."):l("This color is hard to read on your page background. Pick one further from it \u2014 lighter if your pages are dark, deeper if they are light."):l("Pick a color to see how it reads.")}import{ButtonIcon as dP,ChevronDownIcon as uP,ChevronUpIcon as pP,GroundIcon as mP,LayoutIcon as xP,SquareIcon as hP,TextSmallIcon as IP,TypeIcon as ym}from"efficient-easel/icons";var $a=e=>l("Theme {n}",{n:e+1});function bm({colors:e}){let o=yo(e),t=_a(e)??o.accent;return et("span",{className:"sf-theme-page",style:{background:o.background,color:o.text},"aria-hidden":!0,children:[V("span",{className:"sf-theme-eyebrow",style:{color:o.muted},children:l("label")}),et("span",{className:"sf-theme-headline",children:[l("Heading")," ",V("span",{style:{color:o.accent},children:l("accent")})]}),V("span",{className:"sf-theme-body",children:l("body text")}),et("span",{className:"sf-theme-row",children:[V("span",{className:"sf-theme-btn",style:{background:t,color:Rs(e,o.accent)},children:l("button")}),V("span",{className:"sf-theme-mini",style:{background:o.surface,borderColor:o.line},children:l("card")})]})]})}var wi={"Text color":V(ym,{}),"Label color":V(IP,{}),Background:V(mP,{}),"Panels & cards":V(xP,{}),Borders:V(hP,{}),"Button color":V(dP,{}),"Button text color":V(ym,{})};function gP({label:e,colorKey:o,value:t,onChange:a,idPrefix:r="sf-theme-ink"}){let n=`${r}-${o}`;return V(je,{label:l(e),icon:wi[e],id:n,value:t,onChange:s=>a(o,s)})}function yP({value:e,accent:o,onChange:t,idPrefix:a="sf-theme-ink"}){let r=`${a}-button`,n=/^#[0-9a-fA-F]{6}$/.test(e??""),s=n?e:o;return V(je,{label:l("Button color"),icon:wi["Button color"],id:r,value:s,caption:n?s:l("Main"),onChange:t})}function bP({colors:e,accent:o,onChange:t,idPrefix:a="sf-theme-ink"}){let r=`${a}-button-ink`,n=Eu(e),s=Rs(e,o),i=_a(e)??o,f=Xt(Ko(s,i)??0);return V(je,{label:l("Button text color"),icon:wi["Button text color"],hint:n&&f!=="good"?l("{grade} on the button",{grade:l(Yt[f])}):void 0,id:r,value:s,caption:n?s:l("Auto"),onChange:t})}var SP=[{colour:!0},{label:"Text color",key:"text"},{label:"Label color",key:"muted"},{button:!0},{buttonInk:!0},{moduleBreak:!0},{label:"Background",key:"background"},{label:"Panels & cards",key:"surface"},{label:"Borders",key:"line"}];function vi({colors:e,onChange:o,idPrefix:t}){let a=yo(e);return V(iP,{children:SP.map(r=>"colour"in r?V(gm,{value:e,onChange:o},"colour"):"moduleBreak"in r?V("div",{className:"sf-theme-module-break","aria-hidden":"true"},"module-break"):"button"in r?V(yP,{value:e.button,accent:a.accent,onChange:n=>o({...e,button:n}),idPrefix:t},"button"):"buttonInk"in r?V(bP,{colors:e,accent:a.accent,onChange:n=>o({...e,buttonInk:n}),idPrefix:t},"buttonInk"):V(gP,{label:r.label,colorKey:r.key,value:a[r.key],onChange:(n,s)=>o({...e,[n]:s}),idPrefix:t},r.key))})}function Sn({index:e,colors:o,selected:t,role:a="radio",open:r,editable:n=!0,onPick:s,onEdit:i,onChangeColors:f}){let d=yo(o),p=$a(e),x=e<As.length&&!o.brandInk?As[e]:null,m=Xt(Ko(d.text,d.background)??0),h=x?JSON.stringify(o)!==JSON.stringify(x):!1,b=r!==void 0;return et("div",{className:`sf-theme-card${t?" is-selected":""}`,children:[V("button",{type:"button",role:a,"aria-checked":a==="radio"?t:void 0,"aria-selected":a==="option"?t:void 0,"aria-label":p,className:"sf-theme-pick",onClick:s,children:V(bm,{colors:o})}),et("div",{className:"sf-theme-foot",children:[V("span",{className:"sf-theme-name",children:p}),m!=="good"&&V("span",{className:"sf-theme-warn",children:l(Yt[m])}),n&&i&&b&&V("span",{className:"sf-theme-edit",children:V(cP,{content:r?l("Collapse"):l("Edit colors"),children:V(fP,{size:"sm","aria-expanded":r,"aria-controls":`sf-theme-colours-${e}`,"aria-label":r?l("Collapse {name}",{name:p}):l("Edit colors for {name}",{name:p}),onClick:i,children:r?V(pP,{size:14}):V(uP,{size:14})})})}),n&&i&&!b&&V(Ci,{variant:"secondary",size:"sm",className:"sf-theme-edit","aria-label":l("Edit {name}",{name:p}),onClick:i,children:l("Edit")})]}),r&&et("div",{id:`sf-theme-colours-${e}`,className:"sf-theme-colours",children:[V(vi,{colors:o,onChange:S=>f?.(S)}),x&&V(Ci,{variant:"link",size:"sm",className:"sf-theme-reset",disabled:!h,onClick:()=>f?.({...x}),children:h?l("Reset {name} to the preset",{name:p}):l("Not changed")})]})]})}function Sm({colors:e,name:o,nameId:t,open:a,menuId:r,labelId:n,buttonRef:s,onClick:i,onKeyDown:f,onEdit:d}){return et("div",{className:"sf-secttheme-btn",children:[V("button",{ref:s,type:"button",className:"sf-theme-pick","aria-expanded":a,"aria-controls":r,"aria-labelledby":`${n} ${t}`,onClick:i,onKeyDown:f,children:e?V(bm,{colors:e}):V("span",{className:"sf-secttheme-nopreview","aria-hidden":"true"})}),et("div",{className:"sf-theme-foot",children:[V("span",{id:t,className:"sf-theme-name",children:o}),d&&V(Ci,{variant:"secondary",size:"sm",className:"sf-theme-edit","aria-label":l("Edit {name}",{name:o}),onClick:d,children:l("Edit")}),V("button",{type:"button",className:"sf-secttheme-caret","aria-hidden":"true",tabIndex:-1,onClick:i,children:V("span",{className:"sf-multi-caret",children:"\u25BE"})})]})]})}import{useCallback as Oi,useEffect as Tm,useRef as kn}from"react";import{currentEaselSession as vP}from"efficient-easel/screen/lib/session";import{useEaselSession as kP}from"efficient-easel/screen/lib/session-context";import{useSyncExternalStore as CP}from"react";var wm,ki=null,vt=null,Cn=0,Ti=new Set;function Pi(e){wm=e;for(let o of Ti)o()}function Ei(e){ki=e,Cn+=1,vt&&clearTimeout(vt),vt=null,Pi(void 0)}function vm(e){Cn+=1,Pi(e)}function wn(e=250){ki&&(vt&&clearTimeout(vt),vt=setTimeout(()=>{vt=null;let o=ki;if(!o)return;let t=++Cn;o().then(a=>{t===Cn&&Pi(a)}).catch(()=>{})},e))}function Cm(){return wm}function wP(e){return Ti.add(e),()=>{Ti.delete(e)}}function vn(){return CP(wP,Cm,Cm)}var Fi=new Set;function km(e){return Fi.add(e),()=>{Fi.delete(e)}}async function LG(){let e=(await Promise.allSettled([...Fi].map(async o=>o()))).find(o=>o.status==="rejected");if(e)throw e.reason}import{WebsiteBackendError as TP}from"efficient-easel/screen/lib/backend-error";function Pm(e=vP()){return(o,t,a)=>{let r=Ce(e).theme;return r?r.update(o,a?{siteId:a}:void 0):Promise.reject(new TP("invalid","This backend stores no site theme."))}}function Em(e){return e.themeFromDocument?{status:"skipped",reason:"template"}:e.token?null:{status:"skipped",reason:"no-token"}}async function PP(e,o=Pm()){let{themeFromDocument:t,token:a,siteId:r,patch:n}=e,s=Em({themeFromDocument:t,token:a});if(s)return s;if(Object.keys(n).length===0)return{status:"skipped",reason:"empty"};try{return await o(n,a,r??void 0),{status:"saved"}}catch(i){return{status:"failed",error:i}}}function Jt({themeFromDocument:e,tokenRef:o,siteId:t,onResult:a}){let r=kn(null),n=kn({}),s=kP(),i=kn(a);i.current=a;let f=kn(null),d=Oi(m=>{if(m.status==="skipped"){let h=`skipped:${m.reason}`;if(f.current===h)return;f.current=h}else f.current=null;i.current?.(m)},[]),p=Oi(async()=>{r.current&&(clearTimeout(r.current),r.current=null);let m=n.current;n.current={};let h=await PP({themeFromDocument:e,token:o?.current,siteId:t,patch:m},Pm(s));return d(h),h.status==="saved"&&wn(),h.status==="failed"&&(n.current={...m,...n.current}),h},[e,o,t,d,s]),x=Oi((m,h=!1)=>{let b=Em({themeFromDocument:e,token:o?.current});if(b){d(b);return}n.current={...n.current,...m},r.current&&clearTimeout(r.current),h?p():r.current=setTimeout(()=>{p()},500)},[e,o,p,d]);return Tm(()=>()=>{p()},[p]),Tm(()=>km(async()=>{if(!r.current&&Object.keys(n.current).length===0)return;let m=await p();if(m.status==="failed")throw m.error}),[p]),{persist:x,flush:p}}var _P="Follow the page",QG="Follow the slideshow",DP=e=>l("Editing {name} changes it everywhere.",{name:e});function NP({colors:e}){if(!e)return be("span",{className:"sf-secttheme-chip sf-secttheme-chip--none","aria-hidden":"true"});let o=yo(e);return kt("span",{className:"sf-secttheme-chip","aria-hidden":"true",children:[be("i",{style:{background:o.background}}),be("i",{className:"sf-secttheme-chip-accent",style:{background:o.accent}})]})}function MP({themes:e,value:o,onPick:t,onEdit:a,menuId:r,followLabel:n}){return kt("div",{className:"sf-multi-menu sf-secttheme-menu",id:r,role:"listbox",children:[n!==void 0&&kt(EP,{children:[kt("button",{type:"button",role:"option","aria-selected":o===null,className:`sf-secttheme-item${o===null?" is-active":""}`,onClick:()=>t(dn),children:[be(NP,{}),be("span",{className:"sf-secttheme-name",children:l(n)})]}),be("div",{className:"sf-secttheme-sep",role:"presentation"})]}),o!==null&&e[o]&&be("p",{className:"sf-secttheme-oncard",role:"presentation",children:l("{name} is on this section",{name:$a(o)})}),e.map((s,i)=>i===o?null:be(Sn,{role:"option",index:i,colors:s,selected:!1,onPick:()=>t(i),onEdit:()=>a(i)},i))]})}function HP({index:e,colors:o,onChange:t,onDone:a}){let r=$a(e),n=Lm();return kt("div",{className:"sf-secttheme-sheet",children:[kt("div",{className:"sf-secttheme-sheet-head",children:[be("span",{children:r}),be("button",{type:"button",className:"sf-secttheme-done",onClick:a,children:l("Done")})]}),be("div",{className:"sf-secttheme-rows",children:be(vi,{colors:o,onChange:t,idPrefix:n})}),be("p",{className:"sf-secttheme-warn",children:DP(r)})]})}function Am({value:e,onChange:o,followLabel:t,hint:a}){let{theme:r,setTheme:n}=K(),s=ze(r),i=OP(BP),f=i?.tokenRef,d=i?.siteId??null,p=!i?.capabilities?.hasSiteTheme,{persist:x,flush:m}=Jt({themeFromDocument:p,tokenRef:f,siteId:d}),h=ze(s),b=h.themes,S=li(e),T=S!==null?b[S]:void 0,F=T??(b.length?Vo(h):void 0),[C,g]=Om(!1),[I,P]=Om(null),E=Fm(null),k=Fm(null),A=Lm(),B=FP(()=>{g(!1),P(null)},[]);LP(()=>{if(!C&&I===null)return;let O=N=>{E.current&&!E.current.contains(N.target)&&(m(),B())};return document.addEventListener("mousedown",O),()=>document.removeEventListener("mousedown",O)},[C,I,B,m]);let H=O=>{o(O),B()},v=O=>{if(I===null)return;let N=b.map((M,q)=>q===I?O:M),_={...h,themes:N};n(_),x({selected_preset:_.selected,theme_presets:_.themes})};return kt("div",{className:"sf-secttheme",ref:E,children:[be(RP,{label:l("Theme"),icon:be(AP,{}),labelId:`${A}-label`,hint:a,children:be(Sm,{colors:F,onEdit:S!==null?()=>{P(S),g(!1)}:void 0,name:T?$a(S):l(t??_P),nameId:`${A}-value`,labelId:`${A}-label`,open:C,menuId:A,buttonRef:k,onClick:()=>{P(null),g(O=>!O)},onKeyDown:O=>{O.key==="Escape"&&(C||I!==null)&&(O.preventDefault(),B())}})}),C&&I===null&&be("div",{onKeyDown:O=>{O.key==="Escape"&&(O.preventDefault(),B(),k.current?.focus())},children:be(MP,{themes:b,value:S,onPick:H,onEdit:O=>{P(O),g(!1)},menuId:A,followLabel:t})}),I!==null&&b[I]&&be(HP,{index:I,colors:b[I],onChange:v,onDone:()=>{m(),B(),k.current?.focus()}})]})}import{jsx as Rm}from"react/jsx-runtime";import{useId as WP}from"react";import{FieldSelect as zP}from"efficient-easel/fields";import{SettingsField as GP}from"efficient-easel/panel";function UP(e){return e.map(({value:o,label:t,group:a,thumb:r,meta:n})=>({value:o,label:t,...a!==void 0?{group:a}:{},...r!==void 0?{thumb:r}:{},...n!==void 0?{meta:n}:{}}))}function nU({label:e,options:o,fallback:t,value:a,onChange:r,placeholder:n,bare:s=!1,icon:i}){let f=WP(),d=`${f}-label`,p=`${f}-button`,x=a??"",m=o.some(T=>T.value===x)?x:t,h=l(e),b=n===void 0?void 0:l(n),S=Rm(zP,{id:p,value:m,options:UP(o),onChange:r,placeholder:b,searchPlaceholder:b,...s?{ariaLabel:h}:{ariaLabelledBy:`${d} ${p}`},searchable:!0,groupCount:!0,inline:!0});return s?S:Rm(GP,{label:h,labelId:d,icon:i,children:S})}import{jsx as Et,jsxs as S0}from"react/jsx-runtime";import{SettingsField as ax}from"efficient-easel/panel";import{LinkIcon as C0}from"efficient-easel/icons";import{LinkPicker as w0,TextLinkField as v0}from"efficient-shell/ui";import{useEffect as tx,useMemo as Fn,useRef as k0,useState as En}from"react";import{currentEaselSession as $P}from"efficient-easel/screen/lib/session";function Bm(){return $P().auth.token}import{currentEaselSession as T0}from"efficient-easel/screen/lib/session";import{useScreenDocument as P0}from"efficient-easel/screen/components/ScreenDocumentContext";var qP=()=>({choosePage:l("Choose a page"),chooseSection:l("Choose a section"),noSections:l("No section anchors yet"),sectionHint:l("Jumps to a section on that page."),choosePost:l("Choose a post"),chooseProduct:l("Choose a product"),choosePopup:l("Choose a popup")});function _m(e,o,t){if(!e)return"page";if(kp(e))return"popup";if(e.startsWith("/journal/"))return"blog";if(Ep(e))return"product";if(e.includes("#")){let a=e.slice(0,e.indexOf("#"));if(a===""||a==="/"||o.includes(a))return"anchor"}return e==="/"||o.includes(e)||t&&t.listingPaths.includes(t.targetOf(e))?"page":"custom"}function Li(e,o){let t=qP(),a=e.pages.map(p=>({value:Ha(p.slug),label:p.title})),r=o?.pageOptions?o.pageOptions(a):a,n=r.map(p=>p.value),s=e.pages.map(p=>({label:p.title,options:Pp(...p.docs).map(x=>({value:cn(p.slug,x.slug),label:x.name}))})).filter(p=>p.options.length>0),i=p=>{switch(p){case"page":return{type:"select",options:r,placeholder:t.choosePage};case"anchor":return{type:"groups",groups:s,placeholder:s.length?t.chooseSection:t.noSections};case"blog":return{type:"select",options:e.posts.map(x=>({value:Tp(x.slug),label:x.title||x.slug})),placeholder:t.choosePost};case"product":return{type:"select",options:e.products.map(x=>({value:x.href,label:x.name||x.href})),placeholder:t.chooseProduct};case"popup":return{type:"select",options:(e.popups??[]).map(x=>({value:vp(x.slug),label:x.title||x.slug})),placeholder:t.choosePopup};case"custom":return{type:"text"}}},f=wp(e.offers).map(p=>({value:p.value,label:l(p.label),target:i(p.value),...p.value==="anchor"?{hint:t.sectionHint}:{},...p.value==="blog"||p.value==="product"||p.value==="popup"?{hideWhenEmpty:!0}:{}}));if(!o)return{kinds:f,rules:{kindOf:p=>_m(p,n),targetOf:p=>p,readFilter:()=>null,withFilter:p=>p}};let d=p=>{let x=o.withFilter(p,null);return o.listingPaths.includes(x)?x:p};return{kinds:f,rules:{kindOf:p=>_m(p,n,{listingPaths:o.listingPaths,targetOf:d}),targetOf:d,readFilter:o.readFilter,withFilter:o.withFilter},filtersFor:p=>o.listingPaths.includes(p)?o.filtersFor(p):null}}import{useEaselSession as E0}from"efficient-easel/screen/lib/session-context";var ee=e=>typeof e=="number"&&Number.isFinite(e)?e:void 0;function ke(e,o){if(typeof e=="string")return e||o;if(e&&typeof e=="object"&&"text"in e){let t=e.text;return ne(t)??o}return o}function Dm(e,o){return ee(e)??o}function Tt(e,o){return typeof e=="boolean"?e:o}function Tn(e,o){if(!Array.isArray(e))return o;let t=e.map(a=>typeof a=="string"?a:ke(a?.text,"")).map(a=>a.trim()).filter(Boolean);return t.length?t:o}var Nm="cart-drawer",IU="cart-drawer",jP={kickerBadge:"",kickerText:"Your order",titleLead:"Your",titleAccent:"cart.",subtitleEmpty:"Empty for now.",subtitleOne:"One set in your cart.",subtitleMany:"{count} sets in your cart.",leadTimeValue:"",shipsToFallback:"",promises:[],emptyKicker:"No wheels yet",emptyBody:"Your cart is empty. Pick a wheel to get started."};function gU(e,o){return o===0?e.subtitleEmpty:o===1?e.subtitleOne:e.subtitleMany.replace("{count}",String(o))}function yU(e){let o=e??{},t=jP;return{kickerBadge:ke(o.kickerBadge,t.kickerBadge),kickerText:ke(o.kickerText,t.kickerText),titleLead:ke(o.titleLead,t.titleLead),titleAccent:ke(o.titleAccent,t.titleAccent),subtitleEmpty:ke(o.subtitleEmpty,t.subtitleEmpty),subtitleOne:ke(o.subtitleOne,t.subtitleOne),subtitleMany:ke(o.subtitleMany,t.subtitleMany),leadTimeValue:ke(o.leadTimeValue,t.leadTimeValue),shipsToFallback:ke(o.shipsToFallback,t.shipsToFallback),promises:Tn(o.promises,t.promises),emptyKicker:ke(o.emptyKicker,t.emptyKicker),emptyBody:ke(o.emptyBody,t.emptyBody)}}var Hm=["delay","scroll","exit"],Wm=["all","chosen","except"],zm=["visit","days","never","once"],KP=["all","desktop","phone"],VP=["stop","continue"],Gm={min:0,max:60},Um={min:10,max:90},$m={min:1,max:90},eo={autoOpen:!1,trigger:"delay",autoOpenDelaySec:15,scrollPercent:50,showOn:"all",showOnPages:[],devices:"all",hideAfter:"days",hideDays:7,afterSubmit:"stop",startDate:null,endDate:null};function Je(e,o,t){return typeof o=="string"&&e.includes(o)?o:t}function ea(e,o,t){let a=Dm(e,t);return Math.min(o.max,Math.max(o.min,Math.round(a)))}function YP(e){return typeof e.hideAfter=="string"?Je(zm,e.hideAfter,eo.hideAfter):e.oncePerSession===!0?"visit":e.oncePerSession===!1?"never":eo.hideAfter}function XP(e){return Array.isArray(e)?e.map(o=>typeof o=="string"?o.trim():"").filter(Boolean).map(o=>o.startsWith("/")?o:`/${o}`):[]}function Mm(e){if(typeof e!="string")return null;let o=e.trim();return/^\d{4}-\d{2}-\d{2}$/.test(o)?o:null}function qm(e){let o=e??{},t=eo;return{autoOpen:Tt(o.autoOpen,t.autoOpen),trigger:Je(Hm,o.trigger,t.trigger),autoOpenDelaySec:ea(o.autoOpenDelaySec,Gm,t.autoOpenDelaySec),scrollPercent:ea(o.scrollPercent,Um,t.scrollPercent),showOn:Je(Wm,o.showOn,t.showOn),showOnPages:XP(o.showOnPages),devices:Je(KP,o.devices,t.devices),hideAfter:YP(o),hideDays:ea(o.hideDays,$m,t.hideDays),afterSubmit:Je(VP,o.afterSubmit,t.afterSubmit),startDate:Mm(o.startDate),endDate:Mm(o.endDate)}}var Ai="popup",ZP=Xo,QP=["auto","full"],JP=["inside","outside","none"],e0={min:240,max:1440},o0={min:0,max:100},Ri={placement:"center",fullWidth:!1,width:720,height:"auto",tintColor:"#000000",tintOpacity:60,outsideClick:!0,closeButton:"inside"};function t0(e,o){return typeof e=="string"&&/^#[0-9a-fA-F]{6}$/.test(e.trim())?e.trim():o}function a0(e,o=Ri){let t=e??{},a=o;return{placement:Je(ZP,t.placement,a.placement),fullWidth:Tt(t.fullWidth,a.fullWidth),width:ea(t.width,e0,a.width),height:Je(QP,t.height,a.height),tintColor:t0(t.tintColor,a.tintColor),tintOpacity:ea(t.tintOpacity,o0,a.tintOpacity),outsideClick:Tt(t.outsideClick,a.outsideClick),closeButton:Je(JP,t.closeButton,a.closeButton)}}var Km="consent-banner",FU="consent-banner";var r0=[{value:"bar",label:"Bar"},{value:"card",label:"Card"}],OU="Layout",jm={layout:"bar"},n0=e=>r0.some(o=>o.value===e);function LU(e){let o=ke((e??{}).layout,jm.layout);return{layout:n0(o)?o:jm.layout}}var AU={...Ri,placement:"bottom-center",fullWidth:!0,width:440,tintOpacity:0,outsideClick:!1,closeButton:"none"};var l0="consentWords",s0=["eyebrow","notice","accept","reject","choose"];function Bi(e){let o=(e??{})[l0];return typeof o=="string"&&s0.includes(o)?o:null}function _i(e){let o=e?.props;return o?Bi(o)!==null?!0:Object.values(o).some(t=>Array.isArray(t)&&t.some(a=>a&&typeof a=="object"&&"props"in a&&_i(a))):!1}var i0=["meta","eyebrow","heading","body","statName","statValue","formEyebrow","formHeading","formIntro","fieldLabel","option","finePrint","dismiss","doneHeading","doneBody"],_U={meta:"Meta line",eyebrow:"Eyebrow",heading:"Heading",body:"Body",statName:"Stat name",statValue:"Stat value",formEyebrow:"Form eyebrow",formHeading:"Form heading",formIntro:"Form intro",fieldLabel:"Field label",option:"Option",finePrint:"Fine print",dismiss:"Dismiss link",doneHeading:"Success heading",doneBody:"Success message"},f0={meta:"styleMeta",eyebrow:"styleEyebrow",heading:"styleHeading",body:"styleBody",statName:"styleStatName",statValue:"styleStatValue",formEyebrow:"styleFormEyebrow",formHeading:"styleFormHeading",formIntro:"styleFormIntro",fieldLabel:"styleFieldLabel",option:"styleOption",finePrint:"styleFinePrint",dismiss:"styleDismiss",doneHeading:"styleDoneHeading",doneBody:"styleDoneBody"},DU={meta:{font:"--pp-meta-font",size:"--pp-meta-size"},eyebrow:{font:"--pp-eyebrow-font",size:"--pp-eyebrow-size"},heading:{font:"--pp-heading-font",size:"--pp-heading-size"},body:{font:"--pp-body-font",size:"--pp-body-size"},statName:{font:"--pp-statname-font",size:"--pp-statname-size"},statValue:{font:"--pp-statvalue-font",size:"--pp-statvalue-size"},formEyebrow:{font:"--pp-formeyebrow-font",size:"--pp-formeyebrow-size"},formHeading:{font:"--pp-formheading-font",size:"--pp-formheading-size"},formIntro:{font:"--pp-formintro-font",size:"--pp-formintro-size"},fieldLabel:{font:"--pp-fieldlabel-font",size:"--pp-fieldlabel-size"},option:{font:"--pp-option-font",size:"--pp-option-size"},finePrint:{font:"--pp-fineprint-font",size:"--pp-fineprint-size"},dismiss:{font:"--pp-dismiss-font",size:"--pp-dismiss-size"},doneHeading:{font:"--pp-doneheading-font",size:"--pp-doneheading-size"},doneBody:{font:"--pp-donebody-font",size:"--pp-donebody-size"}};function c0(e){return typeof e=="string"&&Bo.includes(e)?e:null}function Vm(e){let o={};for(let t of i0){let a=c0(e[f0[t]]);a&&(o[t]=a)}return o}var Ym={heading:"Join our email list",placeholder:"Email address",buttonLabel:"Subscribe"},d0={lead:"We accept"},Xm={...d0,methods:[],size:"sm",align:"start",dataSource:"shop-payment-methods"},oa="site-footer";var MU=oa,HU={desktop:!0,tablet:!0,mobile:!0},WU={desktop:!1,tablet:!1,mobile:!1},Di=1,Zm=6,zU=Array.from({length:Zm-Di+1},(e,o)=>Di+o),Pn={desktop:6,tablet:3,mobile:2},u0={2:{desktop:2,tablet:2,mobile:1},3:{desktop:3,tablet:3,mobile:1},4:{desktop:4,tablet:2,mobile:2},5:{desktop:5,tablet:3,mobile:2},6:{desktop:6,tablet:3,mobile:2}},Pt=e=>Math.min(Math.max(Math.round(e),Di),Zm);function GU(e){if(typeof e=="number")return u0[Pt(e)]??{desktop:Pt(e),tablet:Pt(e),mobile:Pt(e)};if(e&&typeof e=="object"){let o=e;return{desktop:Pt(o.desktop??Pn.desktop),tablet:Pt(o.tablet??Pn.tablet),mobile:Pt(o.mobile??Pn.mobile)}}return{...Pn}}var Ni="subscribe-popup",XU="subscribe-popup",p0=[Ni,oa,Nm,Km];function Jm(e){return p0.includes(e)}var m0=["right","left"],x0={metaLabel:"Meta label",issueLabel:"Label",issueNumber:"00",kicker:"Kicker",heading:`Main heading
|
|
3
|
+
*Highlight line*`,deck:"Add a sentence or two of supporting copy.",stats:[{label:"Label",value:"Value"},{label:"Label",value:"Value"},{label:"Label",value:"Value"},{label:"Label",value:"Value"}],formLabel:"Section label",formHeading:"Main heading *highlight*",formIntro:"Add a sentence or two of supporting copy.",firstNameLabel:"Field label",firstNamePlaceholder:"Placeholder",emailLabel:"Field label",emailPlaceholder:"Placeholder",interestsLabel:"Field label",interests:["Option one","Option two","Option three"],frequencyLabel:"Field label",frequencies:["Option one","Option two","Option three"],submitText:"Button label",finePrint:"Fine print",dismissText:"Dismiss link",emailInvalidText:"Enter a valid email address.",submitErrorText:"Could not subscribe right now. Please try again.",successHeading:"Main heading *highlight*",successBody:"Add a sentence or two of supporting copy \u2014 the {email} and {issue} tokens are substituted here.",keepBrowsingText:"Button label",autoOpen:eo.autoOpen,autoOpenDelaySec:eo.autoOpenDelaySec,formSlug:"",trigger:eo.trigger,scrollPercent:eo.scrollPercent,showOn:eo.showOn,showOnPages:[],hideAfter:eo.hideAfter,hideDays:eo.hideDays,formSide:"right",valuePanelOnPhone:!1,sectionAccent:void 0,sectionCorners:void 0,sectionCornerSides:void 0,textStyles:{}},me=ke,h0=Tt,ex=Tn;function Qm(e,o){if(e==null)return o;let t=a=>a.trim()?a:"";if(typeof e=="string")return t(e);if(typeof e=="object"&&"text"in e){let a=e.text;return typeof a=="string"?t(a):""}return o}function I0(e,o){return Array.isArray(e)?ex(e,[]):o}function g0(e,o){return Array.isArray(e)?e.map(t=>{let a=t??{};return{label:me(a.label,""),value:me(a.value,"")}}).filter(t=>t.label||t.value):o}function QU(e){let o=e??{},t=x0,a=qm(o);return{metaLabel:me(o.metaLabel,t.metaLabel),issueLabel:Qm(o.issueLabel,t.issueLabel),issueNumber:Qm(o.issueNumber,t.issueNumber),kicker:me(o.kicker,t.kicker),heading:me(o.heading,t.heading),deck:me(o.deck,t.deck),stats:g0(o.stats,t.stats),formLabel:me(o.formLabel,t.formLabel),formHeading:me(o.formHeading,t.formHeading),formIntro:me(o.formIntro,t.formIntro),firstNameLabel:me(o.firstNameLabel,t.firstNameLabel),firstNamePlaceholder:me(o.firstNamePlaceholder,t.firstNamePlaceholder),emailLabel:me(o.emailLabel,t.emailLabel),emailPlaceholder:me(o.emailPlaceholder,t.emailPlaceholder),interestsLabel:me(o.interestsLabel,t.interestsLabel),interests:ex(o.interests,t.interests),frequencyLabel:me(o.frequencyLabel,t.frequencyLabel),frequencies:I0(o.frequencies,t.frequencies),submitText:me(o.submitText,t.submitText),finePrint:me(o.finePrint,t.finePrint),dismissText:me(o.dismissText,t.dismissText),emailInvalidText:me(o.emailInvalidText,t.emailInvalidText),submitErrorText:me(o.submitErrorText,t.submitErrorText),successHeading:me(o.successHeading,t.successHeading),successBody:me(o.successBody,t.successBody),keepBrowsingText:me(o.keepBrowsingText,t.keepBrowsingText),formSlug:typeof o.formSlug=="string"?o.formSlug.trim():t.formSlug,autoOpen:a.autoOpen,autoOpenDelaySec:a.autoOpenDelaySec,trigger:a.trigger,scrollPercent:a.scrollPercent,showOn:a.showOn,showOnPages:a.showOnPages,hideAfter:a.hideAfter,hideDays:a.hideDays,formSide:Je(m0,o.formSide,t.formSide),valuePanelOnPhone:h0(o.valuePanelOnPhone,t.valuePanelOnPhone),sectionAccent:o.sectionAccent,sectionCorners:o.sectionCorners,sectionCornerSides:o.sectionCornerSides,textStyles:Vm(o)}}function y0(e,o=Math.random){for(;;){let t=`popup-${Math.floor(o()*2176782336).toString(36).padStart(6,"0")}`;if(!e.has(t))return t}}function b0(e){return{root:{props:{title:e,kind:Ai}},content:[],zones:{}}}function ox(e,o,t){return{slug:y0(o,t),title:e,kind:"lightbox",layout:b0(e)}}function Mi(e){return e?.root?.props?.kind===Ai}function rx(e){let o=new Map;return(t="")=>{let a=Bm(),r=o.get(t);if(!r||r.token===null&&a!==null){let n=a||!T0().usesBridgedToken?e(a??"",t).catch(()=>[]):Promise.resolve([]);return o.set(t,{promise:n,token:a}),n}return r.promise}}var F0=rx(async(e,o)=>{let t=o?{siteId:o}:void 0,{pages:a}=Ce();return a.linkTargets?a.linkTargets(t):(await a.list(t)).map(r=>({id:r.id,slug:r.slug,label:r.label,layout:null}))}),O0=rx(async(e,o)=>await Ce().blog?.posts(o?{siteId:o}:void 0)??[]);function L0({value:e,onChange:o,label:t="Link",data:a,filters:r}){let n=Fn(()=>Li(a,r),[a,r]),s=l(t);return Et(ax,{label:s,icon:Et(C0,{}),children:Et(w0,{value:e,onChange:i=>o(i),kinds:n.kinds,rules:n.rules,filtersFor:n.filtersFor,label:s})})}function nx(){let{siteId:e,capabilities:o}=P0(),{offersCommerce:t,hasBlog:a}=o,[r,n]=En([]),[s,i]=En([]),[f,d]=En([]),[p,x]=En(null),m=E0().chrome,h=m?.products?.list,b=m?.linkFilters,S=b?void 0:m?.linkRow,T=k0(!0);tx(()=>(T.current=!0,()=>{T.current=!1}),[]),tx(()=>{let g=!0;return F0(e??void 0).then(I=>g&&T.current&&n(I)),a&&O0(e??void 0).then(I=>g&&T.current&&i(I)),t&&h?.().then(I=>g&&T.current&&d(I)),t&&b?b.load(e).catch(()=>null).then(I=>g&&T.current&&x(()=>I)):x(null),()=>{g=!1}},[e,t,a,h,b]);let F=Fn(()=>({pages:r.filter(g=>!Jm(g.slug)&&!Mi(g.layout)).map(g=>({slug:g.slug,title:g.label,docs:[g.layout]})),popups:r.filter(g=>g.slug===Ni||Mi(g.layout)).map(g=>({slug:g.slug,title:g.label})),posts:a?s.map(g=>({slug:g.slug,title:g.title})):[],products:t?f.map(g=>({href:g.href,name:g.name})):[],offers:{offersCommerce:t,offersService:a}}),[r,s,f,t,a]),C=Fn(()=>p?p(F.pages):null,[p,F]);return{data:F,filters:C,pages:r,offersCommerce:t,HostLinkRow:S}}function I$({label:e,icon:o,text:t,onTextChange:a,link:r,onLinkChange:n}){let{data:s,filters:i}=nx(),f=Fn(()=>Li(s,i),[s,i]),d=l(e);return Et(ax,{label:d,icon:o,children:Et(v0,{label:d,text:t,onTextChange:a,link:r,onLinkChange:p=>n(p),kinds:f.kinds,rules:f.rules,filtersFor:f.filtersFor})})}function lx({value:e,onChange:o,label:t="Link"}){let a=typeof e=="string"?e:"",{data:r,filters:n,pages:s,offersCommerce:i,HostLinkRow:f}=nx(),d=r.pages.map(x=>Ha(x.slug)),p=i&&f&&(a==="/"||d.includes(a))?f:void 0;return S0("div",{children:[Et(L0,{value:a,onChange:o,label:t,data:r,filters:n}),p&&Et(p,{value:a,onChange:o,pages:s})]})}import{UiIcon as dh}from"efficient-easel/draw/client";import{phoneKey as H0,tabletKey as W0}from"efficient-easel/draw";import{AUTO_RULES as A0,FOLLOW_RULES as R0,VIEW_DESKTOP_MIN as B0,VIEW_TABLET_MIN as sx,isAuto as _0,resolveViewValue as D0}from"efficient-easel/draw";var N0="v1";function M0(){return N0==="v2"?A0:R0}var ix=.02,b$=`(min-width: ${sx}px) and (max-width: ${B0-ix}px)`,On=`(max-width: ${sx-ix}px)`;function fx(e,o,t,a,r=M0()){let n=D0(e,o,t,a,r),s={},i=(f,d)=>!_0(f)||d!=null&&d!==o;return i(t,n.tablet)&&(s.tablet=n.tablet),i(a,n.phone)&&(s.phone=n.phone),s}var oo={min:10,max:200,step:10};function z0(e,o){let t=ee(e),a=ee(o);if(!(t===void 0&&a===void 0))return{paddingTop:t,paddingBottom:a}}var G0="sf-pad-top-phone",U0="sf-pad-bottom-phone",$0="--sf-pad-t-phone",q0="--sf-pad-b-phone",j0="sf-pad-left-phone",K0="sf-pad-right-phone",V0="--sf-pad-l-phone",Y0="--sf-pad-r-phone",X0="sf-pad-top-tablet",Z0="sf-pad-bottom-tablet",Q0="sf-pad-left-tablet",J0="sf-pad-right-tablet",eE="--sf-pad-t-tablet",oE="--sf-pad-b-tablet",tE="--sf-pad-l-tablet",aE="--sf-pad-r-tablet";function dx(e){let o=z0(e.top,e.bottom),t=Hi({left:e.left,right:e.right},{top:e.topPhone,bottom:e.bottomPhone,left:e.leftPhone,right:e.rightPhone},{top:e.topTablet,bottom:e.bottomTablet,left:e.leftTablet,right:e.rightTablet},{top:e.top,bottom:e.bottom,left:e.left,right:e.right});return o===void 0&&!t.classes.length&&!Object.keys(t.style).length?null:{className:["sf-section-pad",...t.classes].join(" "),style:{...o,...t.style}}}var rE=[["top","paddingTop",[X0,eE],[G0,$0]],["bottom","paddingBottom",[Z0,oE],[U0,q0]],["left","paddingLeft",[Q0,tE],[j0,V0]],["right","paddingRight",[J0,aE],[K0,Y0]]];function Hi(e,o,t={},a=e){let r={},n={},s=[];for(let[i,f,...d]of rE){let p=ee(e[i]);p!==void 0&&(r[f]=p);let x=fx("spacing",ee(a[i]),ee(t[i]),ee(o[i]));for(let[m,[h,b]]of[["tablet",d[0]],["phone",d[1]]]){let S=x[m];typeof S=="number"&&(s.push(h),n[b]=`${S}px`)}}return{classes:s,style:{...r,...n}}}function cx(e,o,t){let a=ee(e)??t,r=ee(o);return a===void 0?r:r===void 0?a:a+r}function k$(e,o={}){return{top:cx(e.padTop,e.sectionPaddingTop,o.top),bottom:cx(e.padBottom,e.sectionPaddingBottom,o.bottom)}}var nE={top:"sectionPaddingTop",bottom:"sectionPaddingBottom",left:"sectionPaddingLeft",right:"sectionPaddingRight"};function T$(e,o=nE,t=!0){let a={};for(let r of t?["top","bottom","left","right"]:["top","bottom"])a[r]=e[o[r]],a[`${r}Tablet`]=e[W0(o[r])],a[`${r}Phone`]=e[H0(o[r])];return a}function P$(e){return dx(e)}function E$(e,o){let t=a=>typeof a=="number"?a+o:void 0;return dx({...e,top:t(e.top),bottom:t(e.bottom),topTablet:t(e.topTablet),bottomTablet:t(e.bottomTablet),topPhone:t(e.topPhone),bottomPhone:t(e.bottomPhone)})}var ot={top:"buttonPaddingTop",right:"buttonPaddingRight",bottom:"buttonPaddingBottom",left:"buttonPaddingLeft"},lE="px-6 py-4",sE=4,Ln=e=>{let o=new RegExp(`\\bp${e}-(?:\\[(\\d+)px\\]|(\\d+))`).exec(lE);if(!o)throw new Error(`BUTTON_PAD_CLASSES has no p${e}`);return o[1]!==void 0?Number(o[1]):Number(o[2])*sE},R$={top:Ln("y"),right:Ln("x"),bottom:Ln("y"),left:Ln("x")},px="var(--btn)",iE=e=>e&&typeof e=="object"&&(ee(e.width)!==void 0||ne(e.color))?e:void 0,fE=e=>Math.round(Math.min(Math.max(e,0),100));function Wi(e){let o=e.variant==="ghost",t=ee(e.buttonFillOpacity),a=iE(e.buttonBorder),r=ne(e.buttonColor);return{fillOpacity:t!==void 0?fE(t):o?0:100,border:{width:ee(a?.width)??1,color:ne(a?.color)??r??(o?"currentColor":px)},changed:t!==void 0||a!==void 0}}function B$(e){let o=Wi(e);if(!o.changed)return null;let t=ne(e.buttonColor)??px;return{background:o.fillOpacity===0?"transparent":o.fillOpacity===100?t:`color-mix(in srgb, ${t} ${o.fillOpacity}%, transparent)`,borderWidth:o.border.width,borderStyle:"solid",borderColor:o.border.color}}function _$(e){let o={top:e[ot.top],right:e[ot.right],bottom:e[ot.bottom],left:e[ot.left]},t={top:e[`${ot.top}Phone`],right:e[`${ot.right}Phone`],bottom:e[`${ot.bottom}Phone`],left:e[`${ot.left}Phone`]},{classes:a,style:r}=Hi(o,t);return Object.keys(r).length?{className:a.join(" "),style:r}:null}var ux="upper";function mx(e,o,t){let a=e&&typeof e=="object"?e:{},r=ne(a.textStyle),n=r?ne(o?.find(p=>p?.id===r)?.name):void 0,s=r?/^(heading|body)-(\d+)$/.exec(r):null,i=r?n||(s?t.styleName({kind:s[1],n:Number(s[2])}):r):t.noStyle,{cases:f}=t,d=ne(a.case)??ux;return`${i} \xB7 ${f[d]??f[ux]}`}import{usePreviewParts as xO}from"efficient-easel/draw/client";import{encodePartId as hO}from"efficient-easel/draw";import{DEFAULT_EASEL_STRINGS as IO,useEaselStrings as gO}from"efficient-easel/strings";var cE=["auto","fixed","screen"],dE=["px","%"];var uE="var(--sf-header-h, 88px)",zi={min:40,max:2e3,step:10,fallback:600},Gi={min:10,max:200,step:5,fallback:100},pE="sf-section-minh",xx={base:"--sf-section-minh",small:"--sf-section-minh-s"},Ix=e=>typeof e=="string"&&cE.includes(e),mE=e=>typeof e=="string"&&dE.includes(e);function An(e){let o=Ix(e.sectionHeightMode)?e.sectionHeightMode:"auto",t=o==="screen"?"%":mE(e.sectionHeightUnit)?e.sectionHeightUnit:"px",a=o==="screen"?Gi.fallback:zi.fallback,r=typeof e.sectionHeightValue=="number"?e.sectionHeightValue:a;return{mode:o,value:r,unit:t}}function gx(e){let{mode:o,value:t,unit:a}=An(e);if(o==="auto")return;if(o==="fixed"&&a==="px")return[`${t}px`,null];let r=t/100,n=s=>o==="screen"?`(100${s} - ${uE})`:`100${s}`;return[`calc(${n("vh")} * ${r})`,`calc(${n("svh")} * ${r})`]}function xE(e){let o=gx(e);if(!o)return;let[t,a]=o;return{display:"grid",[xx.base]:t,...a?{[xx.small]:a}:{}}}var N$=new Set(["Hero","HeroSingle","IntroBleed","CategoryBar","DocTabs"]),ta="Height",hE="sf-section-minh-phone",hx={base:"--sf-section-minh-p",small:"--sf-section-minh-ps"};function Ui(e){return Ix(e.sectionHeightModePhone)}function M$(e){return An({sectionHeightMode:e.sectionHeightModePhone,sectionHeightValue:e.sectionHeightValuePhone,sectionHeightUnit:e.sectionHeightUnitPhone})}function IE(e){let o=xE(e),t=Ui(e)?gx({sectionHeightMode:e.sectionHeightModePhone,sectionHeightValue:e.sectionHeightValuePhone,sectionHeightUnit:e.sectionHeightUnitPhone}):void 0;if(!o&&!t)return null;let a=[pE],r={...o??{}};return t&&(a.push(hE),r[hx.base]=t[0],t[1]&&(r[hx.small]=t[1])),{className:a.join(" "),style:r}}function H$(e){return IE(e)!==null}var Rn="Stick to top",tt={min:0,max:200,step:4,fallback:0},gE="sf-section-stick",yE="sf-section-stick-phone-on",bE="sf-section-stick-phone-off",yx={desktop:"--sf-stick-distance",phone:"--sf-stick-distance-phone"},G$=new Set(["CategoryBar","DocTabs","IntroBleed"]);function bx(e){let o=ee(e)??tt.fallback;return Math.min(tt.max,Math.max(tt.min,Math.round(o)))}function $i(e){return typeof e.stickTopPhone=="boolean"}function qi(e){let o=e.stickTop===!0,t=bx(e.stickTopDistance),a=$i(e),r=a?e.stickTopPhone===!0:o,n=a?bx(e.stickTopDistancePhone):t;return{desktop:o,desktopDistance:t,phone:r,phoneDistance:n,ownPhone:a}}function U$(e){let o=qi(e);if(!o.desktop&&!o.phone)return null;let t=[gE],a={};return o.desktop&&(a[yx.desktop]=`${o.desktopDistance}px`),(o.ownPhone||o.phone!==o.desktop)&&(t.push(o.phone?yE:bE),o.phone&&(a[yx.phone]=`${o.phoneDistance}px`)),o.desktop||t.push("sf-section-stick-desktop-off"),{className:t.join(" "),style:a}}var SE=["column","row","tabs"],Sx="Direction",CE={column:"Stacked",row:"One row",tabs:"Tabs"},Cx={Flex:SE,HeroGroup:["column","row"]},wE={Flex:"row",HeroGroup:"column"},vE={column:"flex-col",row:"flex-row",tabs:"flex-col"};function Bn(e,o){return Cx[e].includes(o)?o:wE[e]}function q$(e,o){return vE[Bn(e,o)]}function wx(e){return Cx[e].map(o=>({label:CE[o],value:o}))}var ji=[{label:"Start",value:"start"},{label:"Center",value:"center"},{label:"Space between",value:"between"},{label:"End",value:"end"}],Tx=[{label:"Start",value:"start"},{label:"Center",value:"center"},{label:"End",value:"end"},{label:"Stretch",value:"stretch"}],Ki={sectionPaddingTop:0,sectionPaddingBottom:0},Px="Wrap",Vi=[{label:"Wrap",value:"wrap"},{label:"No wrap",value:"nowrap"}],vx={start:"justify-start",center:"justify-center",between:"justify-between",end:"justify-end"},kx={start:"items-start",center:"items-center",end:"items-end",stretch:"items-stretch"};function K$(e,o){let t=typeof e=="string"&&e in vx?vx[e]:"",a=typeof o=="string"&&o in kx?kx[o]:"";return[t,a].filter(Boolean).join(" ")}function V$(e){return e===!0||e==="wrap"?"flex-wrap":""}var Yi="Block widths",_n=[{label:"Fit content",value:"content",weights:null},{label:"Equal",value:"equal",weights:[1,1]},{label:"Big left",value:"bigLeft",weights:[2,1]},{label:"Big right",value:"bigRight",weights:[1,2]},{label:"Bigger left",value:"biggerLeft",weights:[3,1]},{label:"Bigger right",value:"biggerRight",weights:[1,3]}],qa="[&>*]:min-w-0 [&>*]:flex-1 [&>*]:basis-0",kE={equal:qa,bigLeft:`${qa} [&>*:first-child]:min-[800px]:grow-[2]`,bigRight:`${qa} [&>*:last-child]:min-[800px]:grow-[2]`,biggerLeft:`${qa} [&>*:first-child]:min-[800px]:grow-[3]`,biggerRight:`${qa} [&>*:last-child]:min-[800px]:grow-[3]`};function TE(e){return typeof e=="string"?kE[e]??"":""}var PE="[&>*]:min-[800px]:basis-[content]";function Y$(e){return TE(e)===""?PE:""}var Ex="Columns",Xi=1,Fx=3,EE={2:"max-[800px]:flex-wrap [&>*]:max-[800px]:min-w-0 [&>*]:max-[800px]:basis-[calc((100%_-_var(--sf-gap-len,0px))/2)]",3:"max-[800px]:flex-wrap [&>*]:max-[800px]:min-w-0 [&>*]:max-[800px]:basis-[calc((100%_-_var(--sf-gap-len,0px)_*_2)/3)]"};function X$(e){let o=Number(e);return EE[o]??"max-[800px]:flex-col"}var Ox="Block spacing",Zi=[{label:"Each block",value:"each"},{label:"Gap only",value:"gap"}],FE="sf-box-gap-only";function Z$(e){return e==="gap"?FE:""}var OE=["solid","dashed","dotted"],LE=["top","right","bottom","left"],J$="sf-section-border",e7="sf-section-border-self",AE=/^#(?:[0-9a-f]{3}|[0-9a-f]{4}|[0-9a-f]{6}|[0-9a-f]{8})$/i,Lx=e=>typeof e=="number"&&Number.isFinite(e)?`${Math.min(20,Math.max(0,Math.round(e)))}px`:void 0;function Ax(e,{phone:o=!1}={}){if(!e||typeof e!="object")return;let t=o?"-phone":"",a={};for(let r of LE){let n=Lx(e[r])??Lx(e.width);n!==void 0&&(a[`--sf-border-${r}-width${t}`]=n)}return typeof e.style=="string"&&OE.includes(e.style)&&(a[`--sf-border-style${t}`]=e.style),typeof e.color=="string"&&AE.test(e.color)&&(a[`--sf-border-color${t}`]=e.color.toLowerCase()),Object.keys(a).length?a:void 0}function o7(e,o){let t=Ax(e),a=Ax(o,{phone:!0});return t||a?{...t,...a}:void 0}var _x="sf.gapContainer",at={min:-32,max:64,step:2},Dx={Grid:{sm:12,md:24,lg:40},Flex:{sm:12,md:24,lg:40},FooterGroup:{sm:8,md:16,lg:32},HeroGroup:null,Events:null,GalleryB:null,ProductGrid:null},aa={Grid:24,Flex:24,FooterGroup:16,HeroGroup:0,Events:24,GalleryB:8,ProductGrid:2},RE=new Set(["Events","GalleryB"]);function ja(e,o,t){if(typeof o=="number"&&Number.isFinite(o)&&o>=at.min)return o;if(typeof o=="string"){let a=Dx[e]?.[o];if(typeof a=="number")return a}return typeof t=="number"&&Number.isFinite(t)?t:aa[e]}var BE="sf-gap-overlap",_E="--sf-gap-overlap",Nx="--sf-block-gap",DE="--sf-block-gap-rem",Ft={min:0,max:at.max,step:at.step};function NE(e){if(typeof e!="number"||!Number.isFinite(e))return null;let o=Math.min(Math.max(Math.round(e),Ft.min),Ft.max);return o-o%Ft.step}function a7(e){let o=NE(e);return o===null?{}:{[Nx]:`${o}px`,[DE]:`${o/16}rem`}}var Rx="sf-gap-zone",Bx="--sf-gap-len";function Qi(e,o){return typeof o=="number"&&Number.isFinite(o)&&o>=at.min?!0:typeof o=="string"&&typeof Dx[e]?.[o]=="number"}var ME={block:"sf-gap-overlap-block",inline:"sf-gap-overlap-inline",both:"sf-gap-overlap-both"};function r7(e,o,t){if(!Qi(e,o)){let r=`${aa[e]}px`,n=RE.has(e)?`var(--sf-card-gap, ${r})`:r;return{className:` ${Rx}`,style:{[Bx]:`var(${Nx}, ${n})`}}}let a=ja(e,o);return a>=0?{className:` ${Rx}`,style:{[Bx]:`${a}px`}}:{className:` ${BE} ${ME[t]}`,style:{gap:"0px",[_E]:`${-a/2}px`}}}var Mx=["transparent","var(--section-bg)","var(--surface)","var(--surface-2)"],Hx={transparent:"No fill","var(--section-bg)":"Section band","var(--surface)":"Panels and cards","var(--surface-2)":"Second surface"},Dn="var(--section-bg)",Nn="inherit";function l7(e,o){return e===Nn?Dn:e===void 0?o:Mn(e)}var HE=/var\(\s*--(surface-2|surface|line)\s*(?=[,)])/g;function Mn(e){return e.replace(HE,"var(--site-$1")}function Wx(e,o){return e===Nn?!0:e===void 0&&o===Dn}var zx=["transparent","var(--wheel-stage)","var(--surface)","var(--surface-2)"],Gx={transparent:"No fill","var(--wheel-stage)":"Image stage","var(--surface)":"Panels and cards","var(--surface-2)":"Second surface"},ra="var(--wheel-stage)",Hn="transparent",Ka="inherit";function f7(e,o){return Mn(Ji(e,o))}function Ji(e,o){return e===Ka?ra:e==null?o:e===!0?ra:e===!1?Hn:e}function c7(e){return typeof e=="string"&&e!==Ka?Mn(e):ra}function d7(e){return e!==Hn&&e!=="none"&&e!==""}function Ux(e,o){return e===Ka||e===!0?!0:e==null?o===ra:!1}var $x="inherit",Wn="fixed",qx=e=>typeof e!="number"&&e!==Wn,WE="var(--sf-heading-max, 9999px)";function p7(e,o,t,a){if(typeof e=="number")return`${e}px`;if(e===Wn)return o;let r=a?`var(--size-${a}, ${o})`:o;return t==="heading"?`min(${r}, ${WE})`:r}var xe={min:1e3,max:2e3,step:50,default:1600};function zE(e){return{maxWidth:e,marginInline:"auto",width:"100%"}}var jx="--sf-site-width",ef=`var(${jx},${xe.default}px)`,x7=`max-w-[${ef}]`,h7=`max-w-[${xe.default}px]`;function GE(e){return typeof e!="number"||!Number.isFinite(e)?xe.default:Math.round(Math.min(Math.max(e,xe.min),xe.max))}function I7(e){let o=GE(e);return o===xe.default?{}:{[jx]:`${o}px`}}var ko={min:0,max:80,step:4,default:40},Kx="--sf-site-gutter",to=`var(${Kx},${ko.default}px)`,UE=`px-[${to}]`;var rt={md:`min(24px,${to})`,sm:`min(20px,${to})`,frame:`min(24px,${to})`,tabs:`min(16px,${to})`},g7=[[`max-[1100px]:px-[${rt.md}]`,"max-[1100px]:px-6"],[`max-[1100px]:px-[${rt.tabs}]`,"max-[1100px]:px-4"],[`max-[960px]:px-[${rt.frame}]`,"max-[960px]:px-6"],[`max-[900px]:px-[${rt.md}]`,"max-[900px]:px-6"],[`max-[800px]:px-[${rt.md}]`,"max-[800px]:px-6"],[`max-[720px]:px-[${rt.sm}]`,"max-[720px]:px-5"],[`max-[800px]:px-[${rt.sm}]`,"max-[800px]:px-5"],[`max-[640px]:px-[${rt.sm}]`,"max-[640px]:px-5"],[`min-[800px]:px-[${to}]`,"min-[800px]:px-10"],[`max-[720px]:px-[min(24px,${to})]`,"max-[720px]:px-6"],[`max-[800px]:-mx-[min(20px,${to})]`,"max-[800px]:-mx-5"],[`max-[720px]:-mx-[min(20px,${to})]`,"max-[720px]:-mx-5"],[`-mx-[${to}]`,"-mx-10"],[UE,"px-10"]];var y7="mx-auto max-w-[var(--sf-site-width,1600px)] px-[var(--sf-site-gutter,40px)] max-[800px]:px-[min(20px,var(--sf-site-gutter,40px))]",b7="mx-auto max-w-[var(--sf-site-width,1600px)] px-[var(--sf-site-gutter,40px)] max-[1100px]:px-[min(24px,var(--sf-site-gutter,40px))]";function $E(e){return typeof e!="number"||!Number.isFinite(e)?ko.default:Math.round(Math.min(Math.max(e,ko.min),ko.max))}function S7(e){let o=$E(e);return o===ko.default?{}:{[Kx]:`${o}px`}}var Vx=ef,C7=`max-w-[${Vx}]`,w7=`max-w-[min(var(--sf-page-cap,${xe.default}px),${xe.default}px)]`,Yx="--sf-hero-cap",qE=`var(${Yx},none)`,v7=`max-w-[${qE}]`,jE="--sf-hero-bleed-m",KE="--sf-hero-bleed-w",VE="--sf-hero-chrome-x",YE="--sf-hero-chrome-cap";function k7(e){return e===!0?{[Yx]:Vx,[jE]:"auto",[KE]:"100%",[VE]:"24px",[YE]:"none"}:{}}var of=`calc(${ef} - ${to}*2)`,T7=`max-w-[${of.replace(/ /g,"_")}]`;var XE="--sf-chrome-cap",ZE=`var(${XE},${of})`,P7="data-page-width";function E7(e){return e==="full"?"full":null}function F7(e){return e==="full"?null:zE(e==="content"?of:ZE)}function O7(e){if(e==="full")return"full";if(e==="content")return"content"}var QE=["contained","page","full"],Xx=["full","page"],Ho={full:"Full width",page:"Content width"},rf="inherit",JE=e=>typeof e=="string"&&QE.includes(e),nf=e=>e===rf;function Mo(e,o){let t=typeof e.pageWidth=="number"?e.pageWidth:xe.default;return nf(e.widthMode)?{mode:"full",pageWidth:t,inherited:!0}:e.widthMode==="contained"?{mode:"page",pageWidth:t,inherited:!1}:JE(e.widthMode)?{mode:e.widthMode,pageWidth:t,inherited:!1}:e.contained===!0?{mode:"page",pageWidth:t,inherited:!1}:typeof e.fullWidth=="boolean"?{mode:e.fullWidth?"full":"page",pageWidth:t,inherited:!1}:e.contained===!1?{mode:"full",pageWidth:t,inherited:!1}:{mode:o,pageWidth:t,inherited:o==="full"}}function lf(e){return Mo(e,"page").mode==="full"}var Va="site",Zx={Hero:"hero",HeroSingle:"hero",IntroBleed:"scrollOver",SpecStrip:"background",Timeline:"background",Footprint:"background",Prose:"background",ParagraphsA:"background",Cards:"background",KeyFeatures:"background",Chart:"background",Mockup:"background",Testimonials:"background",TitleWithButtons:"background",Countdown:"background",DocMasthead:"background",DocBody:"background",DocMetaCards:"background",Gallery:"background",GalleryB:"background",Reviews:"background",ReviewForm:"background",Form:"background",AppointmentBooking:"background",FAQ:"background",Events:"background",Split:"both",Breadcrumb:"both",Collections:"both",CatalogFilterBar:"both",AlloyWheelsListing:"both",Banner:"contained",Stats:"contained",Logos:"contained",Divider:"contained",OrderSummary:"contained",DeliveryOptions:"contained",PaymentBadges:"contained",CheckoutCTA:"contained",Flex:"contained",Grid:"contained",Manifesto:"contentColumn",SectionHeader:"contentFull",ProductHero:"contentFull",ProductGrid:"productGrid",TimelineTrack:"capped",DetailRows:"capped",FitmentTable:"capped",TyreSizes:"capped",TyreFitment:"capped",EuTyreLabel:"capped",BundleOffer:"capped",CompatibleTyres:"capped",RelatedProducts:"capped",ProcessSteps:"capped",StatsParagraph:"capped",Masthead:"capped",FeaturedCover:"capped",LongRead:"capped",Series:"capped",ContactLocations:"capped",FitmentFinder:"capped",SpecTable:"capped",Subscribe:"capped",SubscribeBlogs:"capped",ContactRouting:"capped",SubmitBuild:"capped"};function eF(e){return Object.prototype.hasOwnProperty.call(Zx,e)}var tf=e=>e==="full"||e==="content",Qx=e=>typeof e=="number"&&Number.isFinite(e)&&e>0,af=({widthMode:e,fullWidth:o,pageWidth:t})=>({widthMode:e,fullWidth:o,pageWidth:t}),oF=["widthMode","contained","fullWidth","pageWidth"];function tF(e,o){if(e==="scrollOver")return o.fullWidth!==void 0&&o.fullWidth!==null;if(nf(o.widthMode))return!1;let t=e==="contentColumn"||e==="contentFull"?af(o):o;return oF.some(a=>t[a]!==void 0&&t[a]!==null)}function aF(e,o){let t={background:null,content:null,contentMax:null};if(!tF(e,o))return t;switch(e){case"hero":return nf(o.widthMode)||o.widthMode!=="full"?t:{...t,background:"full"};case"scrollOver":return o.fullWidth===!1?t:{...t,content:"full"};case"background":return Mo(o,"full").mode==="full"?t:{...t,background:"content"};case"both":return Mo(o,"full").mode==="full"?{...t,content:"full"}:{...t,background:"content"};case"contained":return Mo(o,"page").mode==="full"?{...t,content:"full"}:{...t,background:"content"};case"contentColumn":return Mo(af(o),"page").mode==="full"?{...t,content:"full"}:t;case"contentFull":return Mo(af(o),"full").mode==="full"?{...t,content:"full"}:t;case"productGrid":return Mo(o,"full").mode==="full"?{...t,content:"full"}:{background:"content",content:"content",contentMax:Qx(o.pageWidth)?o.pageWidth:null};case"capped":return t}}function sf(e,o){if(!eF(e))return{background:null,content:null,contentMax:null};let t=Zx[e],a=o,r=aF(t,a),n=a.backgroundWidth===Va?null:tf(a.backgroundWidth)?a.backgroundWidth:r.background;return a.contentWidth===Va?{background:n,content:null,contentMax:null}:tf(a.contentWidth)?{background:n,content:a.contentWidth,contentMax:a.contentWidth==="content"&&Qx(a.contentMax)?a.contentMax:null}:{background:n,content:r.content,contentMax:r.contentMax}}var Jx="siteWidths";function zn(e){return tf(e)?e:null}function eh(e,o){return{[Jx]:{background:zn(e),content:zn(o)}}}function R7(e){let o=e.editor?.metadata?.[Jx];return{background:zn(o?.background),content:zn(o?.content)}}import{jsx as rF}from"react/jsx-runtime";import{createContext as nF,useContext as lF}from"react";var sF=2,iF=sF+1,oh=nF(2);function th({tier:e,children:o}){return rF(oh.Provider,{value:e,children:o})}function ah(e){let o=lF(oh);return iF+Math.max(0,e-o)}import{withStyleKind as yO}from"efficient-easel/style-clipboard";import{useEaselSession as bO}from"efficient-easel/screen/lib/session-context";var ff=e=>!!e&&typeof e=="object"&&typeof e.type=="string"&&!!e.props&&typeof e.props=="object";function cf(e,o){let t=e.components[o]?.label;return typeof t=="string"&&t.trim()?t.trim():o}function fF(e){return e.length>3&&e.endsWith("s")?e.slice(0,-1):e}function df(e,o,t,a){e.forEach((r,n)=>{if(ff(r)){a.push({node:r,list:e,index:n,parent:o,slot:t});for(let[s,i]of Object.entries(r.props))Array.isArray(i)&&i.some(ff)&&df(i,r,s,a)}})}function cF(e){let o=[];df(Array.isArray(e.content)?e.content:[],null,"",o);for(let t of Object.values(e.zones??{}))Array.isArray(t)&&df(t,null,"",o);return o}function nh(e,o){return cF(e).find(t=>String(t.node.props.id)===o)}function lh(e,o,t){if(!t)return null;let a=nh(o,t);if(!a)return null;let r=cf(e,a.node.type),n=a.parent?`${cf(e,a.parent.type)} \xB7 ${fF(a.slot)} ${a.index+1}`:r;return{blockId:t,type:a.node.type,label:n,path:""}}var sh="sfDescribedAs";function Wo(e,o){return{...e,[sh]:o}}var dF=e=>e.filter(o=>!!o&&typeof o=="object"&&"value"in o).map(o=>typeof o.label=="string"?{value:o.value,label:o.label}:{value:o.value});function uF(e){if(!e||typeof e!="object")return null;let o=e;if(typeof o.type!="string")return null;let t=o.type==="custom"?o[sh]:void 0,a={type:t?.type??o.type},r=t?.label??o.label;typeof r=="string"&&(a.label=r);let n=t?.options??o.options;Array.isArray(n)&&(a.options=dF(n));for(let s of["arrayFields","objectFields"]){let i=t?.[s]??o[s];i&&typeof i=="object"&&(a[s]=ih(i))}return a}function ih(e){let o={};for(let[t,a]of Object.entries(e??{})){let r=uF(a);r&&(o[t]=r)}return o}function fh(e){let o={};for(let[t,a]of Object.entries(e.components))a&&(o[t]={label:cf(e,t),fields:ih(a.fields)});return o}function pF(e,o){let t=e;for(let a of o?o.split("."):[]){let r=/^([A-Za-z_][A-Za-z0-9_]*)(?:\[(\d+)\])?$/.exec(a);if(!r||!t||typeof t!="object")return null;t=t[r[1]],r[2]!==void 0&&(t=Array.isArray(t)?t[Number(r[2])]:void 0)}return t&&typeof t=="object"&&!Array.isArray(t)?t:null}function uf(e,o){return e.findIndex(t=>ff(t)&&String(t.props.id)===o)}function rh(e,o,t){let a=o||t;if(!a)return e.length;let r=uf(e,a);if(r<0)throw new Error(`there is no top-level block ${a}`);return o?r+1:r}function ch(e,o,t,a){let r=structuredClone(o),n=Array.isArray(r.content)?r.content:r.content=[];try{t.forEach((s,i)=>{let f=d=>{throw new Error(`change ${i+1}: ${d}`)};switch(s.op){case"set_props":{let d=nh(r,s.block_id)??f(`there is no block ${s.block_id}`);"id"in s.props&&f("a block's id is never changed");let p=pF(d.node.props,s.path)??f(`there is no ${s.path} in that block`);Object.assign(p,structuredClone(s.props));break}case"insert_block":{let d=e.components[s.type]??f(`there is no block type ${s.type}`),p=d.defaultProps&&typeof d.defaultProps=="object"?d.defaultProps:{},x={type:s.type,props:{...structuredClone(p),...structuredClone(s.props),id:a(s.type)}};n.splice(rh(n,s.after,s.before),0,x);break}case"remove_block":{let d=uf(n,s.block_id);d<0&&f(`there is no top-level block ${s.block_id}`),n.splice(d,1);break}case"move_block":{let d=uf(n,s.block_id);d<0&&f(`there is no top-level block ${s.block_id}`);let[p]=n.splice(d,1);n.splice(rh(n,s.after,s.before),0,p);break}default:f(`"${s.op}" is not a change this editor makes`)}})}catch(s){return{ok:!1,reason:s instanceof Error?s.message:String(s)}}return{ok:!0,document:r}}import{TEXT_CONTROL_KINDS as uq,SCALAR_TEXT_CONTROLS as pq}from"efficient-easel/draw";function st(e){for(let[o,t]of Object.entries(e))t&&typeof t=="object"&&!To(t)&&yO(t,`section:${o}`);return e}function Rh(){return null}function gf(e){if(!e.trim())throw new Error("noGlyph() needs a reason naming the ruling that decided it.");return y(Rh,{},e)}function SO(e){return e.type===Rh}function no(e){return SO(e)?void 0:e}function Lt(e,o){return l("{value} from {from}",{value:e,from:o})}function CO(){let{appState:e}=Za(r=>r),o=e.data.root?.props??{},{mode:t,pageWidth:a}=Mo(o,"full");return t==="page"?Lt(`${a}px`,l("the page")):t==="contained"?Lt(l("Contained"),l("the page")):Lt(l("Full"),l("the page"))}function wO(){let{blockGap:e}=K();return e===null?l("this container's own spacing"):Lt(`${e}px`,l("Styles"))}function vO({inherited:e,onReset:o,label:t}){return y(Re,{words:X()?.panel,label:l(t),changed:!e,detail:wO(),onReset:o})}function kO({inherited:e,onReset:o,label:t}){return y(Re,{words:X()?.panel,label:l(t),changed:!e,detail:CO(),onReset:o})}function At({value:e,onChange:o,label:t,placeholder:a,hint:r,multiline:n,hideable:s=!0,markup:i=!0}){let{text:f,hidden:d}=lt(e),p=xf(null),x=xf(null),m=C=>o(s?{text:C,hidden:d}:C),h=()=>o({text:f,hidden:!d}),b=s&&d,S=xF(),T=r?OO(r)?y("span",{className:"sf-hint-keep sf-hint-while-typing",children:l(r)}):y(Sp,{children:l(r)}):void 0,F=d?l("Show {label} on the slide",{label:l(t)}):l("Hide {label} on the slide",{label:l(t)});return y(se,{label:l(t),icon:y(KF,{}),htmlFor:S,className:b?"is-hidden":void 0,hint:T,action:s?y(Ah,{content:F,children:y("button",{type:"button",className:"sf-field-eye","aria-pressed":d,"aria-label":F,onClick:h,children:d?y(dh,{name:"eye-off",size:14}):y(dh,{name:"eye",size:14})})}):void 0,children:zo("div",{className:"sf-copybox",children:[i&&y(pi,{target:n?x:p,value:f,onChange:m}),n?y("textarea",{id:S,ref:x,value:f,placeholder:a===void 0?void 0:l(a),onChange:C=>m(C.target.value)}):y("input",{id:S,ref:p,type:"text",value:f,placeholder:a===void 0?void 0:l(a),onChange:C=>m(C.target.value)})]})})}function sq(e,o){return{...e,[yF]:o}}function iq(e){let o=e[Go];if(!o)throw new Error("withOffPage: the field holds no authored text");return{...e,[Go]:{...o,offPage:!0}}}function $n(e){return!e||typeof e!="object"?!1:e[Go]?.offPage===!0}var Bh="sfPanelOnly";function fq(e){if(!e[Go])throw new Error("withPanelOnly: the field holds no authored text");return{...e,[Bh]:!0}}function _h(e){return!!e&&typeof e=="object"&&e[Bh]===!0}function cq(e){let o=e[Go];if(!o)throw new Error("withIdentifier: the field holds no authored text");return{...e,[Go]:{...o,identifier:!0}}}function mq(e,o){if(!e[Go])throw new Error("inOwnBox: the field holds no authored text");let{[pO]:t,...a}=e;return{...a,[mi]:!0,render:o}}var TO=new Set(mO),hf={type:"radio",options:[{value:!0},{value:!1}]},Dh={text:{type:"object",objectFields:{text:{type:"text"},hidden:hf}},textarea:{type:"object",objectFields:{text:{type:"textarea"},hidden:hf}},plainText:{type:"text"},copyText:{type:"text"},plainTextarea:{type:"textarea"},textList:{type:"array",arrayFields:{text:{type:"text"}}}},Rt=(e,o)=>{let t=Wo({...o,[Go]:e},{...Dh[e.control],label:e.label});if(!TO.has(e.control))return t;let a=o.render;return{...Qa(t,"authored-copy"),render:r=>y(im,{name:r.name,children:a(r)})}},xq="Everything else on this block comes from the linked post. Unlink it to edit by hand.",PO={field:"source.slug",set:!0},hq={not:PO},EO="Select a word, then press the highlighter.",FO=new Set([EO]),OO=e=>FO.has(e);function Iq(e,o,t){return Rt({control:"text",label:e,placeholder:o,hint:t},{type:"custom",render:({value:a,onChange:r})=>y(At,{value:a,onChange:r,label:e,placeholder:o,hint:t})})}function gq(e,o,t){return Rt({control:"textarea",label:e,placeholder:o,hint:t},{type:"custom",render:({value:a,onChange:r})=>y(At,{value:a,onChange:r,label:e,placeholder:o,hint:t,multiline:!0})})}function yq(e,o,t){return Rt({control:"plainText",label:e,placeholder:o,hint:t},{type:"custom",render:({value:a,onChange:r})=>y(At,{value:a,onChange:r,label:e,placeholder:o,hint:t,hideable:!1,markup:!1})})}function bq(e,o,t){return Rt({control:"copyText",label:e,placeholder:o,hint:t},{type:"custom",render:({value:a,onChange:r})=>y(At,{value:a,onChange:r,label:e,placeholder:o,hint:t,hideable:!1})})}function Sq(e){return{type:"custom",[IF]:{label:e},...Wo({},{type:"text",label:e}),render:({value:o,onChange:t})=>y(lx,{value:hF(o),onChange:t,label:e})}}function Cq(e,o,t){return Rt({control:"plainTextarea",label:e,placeholder:o,hint:t},{type:"custom",render:({value:a,onChange:r})=>y(At,{value:a,onChange:r,label:e,placeholder:o,hint:t,multiline:!0,hideable:!1})})}var Nh={Design:bF,Animation:yh};function Mh(e,o){return e.includes("Design")?o!=="Design":null}function Hh(e,o){return{type:"custom",[If]:{label:e,level:o},marker:!0,fold:e,render:()=>y(ro,{})}}function Te(e){return Hh(e,2)}function wq(e){return{type:"custom",render:()=>y(LO,{text:e})}}function LO({text:e}){return y("p",{className:"sf-note",children:l(e)})}function vq(e){return Hh(e,1)}function kq(e){return To(e)!==null&&e?.tabs!==void 0}var uh=new Map;function qn(e,o){let t=`${e}\0${o?o.join(""):""}`,a=uh.get(t)??{type:"custom",tabs:o,[If]:{label:e,level:1},bucket:e,marker:!0,render:()=>y(ro,{})};return uh.set(t,a),a}var ph=new Map;function yf(e){let o=ph.get(e)??{type:"custom",[If]:{label:e,level:1},designGroup:e,marker:!0,...e==="Content"?{}:{fold:e},render:()=>y(ro,{})};return ph.set(e,o),o}function AO(e){let o=e;return o?.marker===!0&&typeof o.fold=="string"?o.fold:null}function Wh(e,o){return AO(e)===o?e:{...e,marker:!0,fold:o,render:()=>y(ro,{})}}function zh(e){let o=e;if(o.marker===!0&&o.fold===void 0)return e;let{fold:t,...a}=e;return{...a,marker:!0,render:()=>y(ro,{})}}function bf({title:e,children:o}){let[t,a]=Xa(()=>!mf.has(e));return y(ZF,{title:e,open:t,onToggle:r=>{a(r),r?mf.delete(e):mf.add(e)},children:o})}var mf=new Set;function Tq({label:e}){return y(QF,{title:l(e),level:ah(2)})}function Gh({swatches:e,current:o,onPick:t,names:a}){let r=e.find(i=>i.toLowerCase()===o.toLowerCase()),n=r?a?.[r]:void 0,s=n?l(n):o;return zo("div",{className:"sf-swatches",children:[e.map(i=>{let f=a?.[i]?l(a[i]):i;return y(Ah,{content:f,children:y("button",{type:"button","aria-pressed":o.toLowerCase()===i.toLowerCase(),className:`sf-swatch ${o.toLowerCase()===i.toLowerCase()?"is-active":""}`,style:{background:i},onClick:()=>t(i),"aria-label":f})},i)}),y("span",{className:"sf-swatch-hex",children:s})]})}function Pq(e,o){return{type:"custom",render:({value:t,onChange:a})=>{let r=Wx(t,o);return y(se,{label:l(e),icon:y(vF,{}),changed:!r,action:y(Re,{words:X()?.panel,label:l(e),changed:!r,detail:l("the theme's section background"),onReset:()=>a(Nn)}),children:Gh({swatches:Mx,current:r?Dn:t??o??"",onPick:a,names:Hx})})}}}function RO(e,o){return{type:"custom",render:({value:t,onChange:a})=>{let r=t,n=Ux(r,o);return y(se,{label:l(e),icon:y(DF,{}),changed:!n,action:y(Re,{words:X()?.panel,label:l(e),changed:!n,detail:l("the theme's image stage"),onReset:()=>a(Ka)}),children:Gh({swatches:zx,current:n?ra:Ji(r,o),onPick:a,names:Gx})})}}}function jn(e=t=>t,o){return st({_gSectionTheme:Te(_p),sectionAccent:{type:"custom",render:({value:t,onChange:a})=>y(Am,{value:e(t),onChange:a,followLabel:o})}})}function De({min:e,max:o,step:t,value:a,onChange:r,suffix:n="",readout:s=!0,notch:i,ariaLabel:f,disabled:d=!1}){let p=i!==void 0&&Number.isFinite(i)&&i>=e&&i<=o;return y("div",{className:p?"sf-slider has-notch":"sf-slider",style:p?{"--sf-notch":(i-e)/(o-e)}:void 0,children:y(uO,{min:e,max:o,step:t,value:a,suffix:n||void 0,showInput:s,label:f===void 0?void 0:l(f),disabled:d,size:"sm",boxSize:"md",className:"sf-slider-track",onChange:x=>{x!==null&&x!==a&&r(x)}})})}function la(e,o,t,a,r,n,s="",i){return{type:"custom",...Wo({},{type:"number",label:e}),render:f=>y(se,{label:l(e),icon:no(o),action:i?i("storedValue"in f?f.storedValue:f.value,f.onChange):void 0,children:De({min:t,max:a,step:r,value:typeof f.value=="number"?f.value:n,suffix:s,ariaLabel:e,onChange:f.onChange})})}}function Uh(e,o){let{min:t,max:a,step:r=1,unsetLabel:n,hint:s,restTrack:i,unsetMark:f,icon:d}=o;return{type:"custom",render:({value:p,onChange:x})=>{let m=typeof p=="number"?p:null,h=m===null;return y(se,{label:l(e),icon:d?no(d):void 0,value:h?f||n===void 0?void 0:l(n):`${m}px`,changed:!h,action:f?gh(f,{changed:!h,onReset:()=>x(null)}):y(Re,{words:X()?.panel,label:l(e),changed:!h,onReset:()=>x(null)}),hint:typeof s=="string"?l(s):s,children:i?i({min:t,max:a,step:r,px:m,label:e,onChange:x}):De({min:t,max:a,step:r,value:m??t,readout:!1,ariaLabel:e,onChange:x})})}}}function Eq(e){let o=la("Gap",y(Ch,{}),at.min,at.max,at.step,aa[e],"px",(t,a)=>y(vO,{inherited:!Qi(e,t),onReset:()=>a(void 0),label:"Gap"}));return{type:"custom",[_x]:e,render:t=>o.render({...t,value:ja(e,t.value,t.field?.siteGap),storedValue:t.value,onChange:a=>t.onChange(a)})}}var Kn="Corners";function Sf(e){return{type:"custom",render:({value:o,onChange:t})=>{let a=typeof o=="number"&&Number.isFinite(o)?o:null,r=a!==null;return y(se,{label:l(Kn),icon:y(EF,{}),changed:r,action:gh(e.mark,{changed:r,onReset:()=>t(null)}),hint:e.hint,children:y(BO,{tier:e,px:a,onRadius:t})})}}}function nt(e){let o=Jo();return[o?.values?.[e],t=>o?.onChange(e,t)]}function bn(){let e=Jo();return o=>e?.onChangeMany(o)}function BO({tier:e,px:o,onRadius:t}){let a=e.useFollowed(),r=e.useClosedReason?e.useClosedReason():null,[n,s]=nt(e.sidesKey),i=_o(n)??[...gt];return y(fO,{label:l(Kn),value:i,corners:op,onChange:f=>{let d=_o(f)??[];s(d.length===gt.length?null:d)},radius:o,onRadiusChange:t,radiusMin:qe,radiusMax:ht,radiusStep:e.step??1,radiusPlaceholder:String(a),disabled:r!==null,disabledReason:r??void 0})}function $h(){return Qa({type:"custom",render:()=>y(Un,{})},"always")}function _O({label:e,changed:o=!1,onReset:t=()=>{}}){let{cornerRadiusPx:a}=K(),r=typeof a=="number"?`${a}px`:l("not set");return y(Re,{words:X()?.panel,label:l(e),changed:o,detail:a==null?l("the built-in corners"):Lt(r,l("Styles")),onReset:t})}function DO(){let{cornerRadiusPx:e}=K();return typeof e=="number"?e:qe}function NO(){return Sf({sidesKey:"sectionCornerSides",useFollowed:DO,useClosedReason:()=>jh()?l(qh):null,mark:y(_O,{label:Kn}),hint:y(MO,{})})}var qh="This section runs edge to edge, so its corners sit off the page. Set Width to Content width to use them.";function jh(){return lf(Po())}function MO(){return y(ro,{children:jh()?qh:"Follows Styles \u25B8 Basics \u25B8 Corners until you set a number here."})}function Vn(){return st({_gShape:Te("Shape"),sectionCorners:NO(),sectionCornerSides:$h(),sectionBorder:mh("desktop"),sectionBorderPhone:mh("mobile")})}var HO=()=>({width:l("Border width"),sides:{top:l("Border top"),right:l("Border right"),bottom:l("Border bottom"),left:l("Border left")},style:l("Border style"),styles:{solid:l("Solid"),dashed:l("Dashed"),dotted:l("Dotted")},color:l("Border color"),unit:"px"});function WO(e){let o=Object.fromEntries(Object.entries(e).filter(([,t])=>t!=null&&t!==""));return Object.keys(o).length?o:void 0}function zO(){let e;try{let o=ze(K().theme);e=o.themes[o.selected]?.line}catch{e=void 0}return e||vu.line}function Kh({value:e,onChange:o,placeholder:t,presets:a,sides:r=!0,styles:n=!0,above:s={}}){let i=e&&typeof e=="object"?e:{},[f,d]=Xa(()=>r?rO(i,s):!1),p=HO(),x=m=>WO(r&&n?m:{width:m.width,color:m.color,...n?{style:m.style}:{}});return y(se,{label:l("Border"),icon:y(kF,{}),action:r?y(Fh,{each:f,label:l("Each side"),onChange:d}):void 0,children:y(JF,{label:l("Border"),value:i,each:f,onChange:m=>o(x(m)),placeholder:t,presets:a,words:p,styles:n,max:20})})}function GO({value:e,onChange:o,tier:t}){let[a]=nt("sectionBorder"),r=zO(),n=t==="mobile"?a&&typeof a=="object"?a:{}:{};return y(Kh,{value:e,onChange:o,placeholder:{sides:aO(n),style:n.style??"solid",color:n.color||r},presets:[r],above:n})}function mh(e){return we(e,{type:"custom",render:({value:o,onChange:t})=>y(GO,{value:o,onChange:t,tier:e})})}function Fq(e){return{type:"custom",render:()=>y(UO,{partKey:e})}}function UO({partKey:e}){let[o]=nt("id"),[t]=nt("_partStyles"),{textStyles:a}=K(),r=gO(),n=null;try{n=xO().select}catch{n=null}let s=t&&typeof t=="object"?t[e]:void 0,i=Array.isArray(a)?a:null;return y(XF,{name:l("Text"),preview:mx(s,i,{noStyle:l("No style"),styleName:r.textStyles.styleName,cases:(r.copy.panel??IO.copy.panel).cases}),onOpen:()=>{n&&typeof o=="string"&&n(hO(o,e))}})}function Oq(){return{type:"custom",render:({value:e,onChange:o})=>y($O,{value:e,onChange:o})}}function $O({value:e,onChange:o}){let[t]=nt("variant"),[a]=nt("buttonColor"),{theme:r}=K(),n=Wi({variant:t,buttonColor:a,buttonBorder:e&&typeof e=="object"?e:{}}).border.width,s=ne(a)??(t==="ghost"?Vo(r).text:Bs(r).fill);return y(Kh,{value:e,onChange:o,placeholder:{sides:{top:n,right:n,bottom:n,left:n},style:"solid",color:s},presets:[s],sides:!1,styles:!1})}function Yn(){return{_gMotion:Te("Motion"),sectionAnimation:vf("Entrance",y(yh,{}),[...Np],si)}}function Cf(){let e=null;try{let{appState:o,selectedItem:t}=Za(r=>r),a=t?.props?.id?String(t.props.id):void 0;e=a?fi(o?.data,a):null}catch{e=null}return e!==null&&lf(e)}function Vh(e){let{cornerRadiusPx:o}=K(),t=Cf(),a=typeof o=="number"?o:e,r=null;try{let{appState:s,selectedItem:i}=Za(d=>d),f=i?.props?.id?String(i.props.id):void 0;r=f?fi(s?.data,f):null}catch{r=null}if(t||!r)return a;let n=r.sectionCorners;return Ks(n)?n:a}function qO({label:e,changed:o=!1,onReset:t=()=>{}}){let a=Cf(),r=Vh(qe),n=a?"Site":"Section";return y(Re,{words:X()?.panel,label:l(e),changed:o,detail:Lt(`${r}px`,a?l("Styles"):l("the section")),onReset:t})}function jO(){return y(ro,{children:Cf()?l("The section is full width, so this card follows Styles \u25B8 Basics \u25B8 Corners."):l("Follows the section's Corners until you set a number here.")})}function KO(){return Sf({sidesKey:"cardCornerSides",useFollowed:()=>Vh(qe),mark:y(qO,{label:Kn}),hint:y(jO,{})})}function VO(){return{type:"custom",render:()=>y(ip,{})}}function Lq(){return{_gShape:Te("Shape"),cardCorners:KO(),cardCornerSides:$h(),cardCornersApplyAll:VO()}}function Aq(){return ao("Justify",y(wF,{}),ji,ji[0].value)}function Rq(){return ao("Item alignment",y(SF,{}),Tx,"stretch")}function Bq(){return ao(Px,y(YF,{}),Vi,Vi[0].value)}function _q(){return{type:"custom",render:({value:e,onChange:o})=>{let t=_n.find(a=>a.value===e)??_n[0];return y(se,{label:l(Yi),icon:y(bh,{}),value:l(t.label),children:y(Lh,{className:"sf-gallery-layouts",label:l(Yi),value:t.value,onChange:o,options:_n.map(a=>({value:a.value,label:l(a.label),picture:y("span",{className:"sf-gallery-pic",children:YO(a.weights).map((r,n)=>y("i",{style:{gridColumn:`span ${r}`}},n))})}))})})}}}function YO(e){if(!e)return[3,4];let o=e.reduce((t,a)=>t+a,0);return e.map(t=>Math.round(t/o*12))}function Dq(){return ao(Ox,y(Ch,{}),Zi,Zi[0].value)}function Nq(){return we("mobile",la(Ex,y(Sh,{}),Xi,Fx,1,Xi))}function Mq(e){let o=vf(Sx,gf("`Direction` names how a container's children run \u2014 a MODIFIER, not a thing. doc/naming.md N10.1 gives the idea a dash in its Glyph column; editor-shell's own `direction` meaning says the bare row is CORRECT and not an omission (SS seat, 2026-09-11)."),wx(e),Bn(e,void 0));return{type:"custom",render:t=>o.render({...t,value:Bn(e,t.value),onChange:a=>t.onChange(a)})}}function Hq(e,o,t,a,r,n){return{type:"custom",render:({value:s,onChange:i})=>y(se,{label:l(e),icon:y(ai,{noun:n}),action:y(Re,{words:X()?.panel,label:l(e),changed:!qx(s),detail:l("the Text style in Styles"),onReset:()=>i($x),defaultAction:{onPress:()=>i(Wn),title:l("Keep this section's own built-in size"),icon:y(TF,{})}}),children:De({min:o,max:t,step:a,value:typeof s=="number"?s:r,suffix:"px",ariaLabel:e,onChange:i})})}}function Wq(){return{_gCellWidth:Te("Cell width"),gridSpan:ao("Positions",y(bh,{}),[{label:"Auto",value:""},...Array.from({length:rn},(e,o)=>({label:o===0?"1 position":`${o+1} positions`,value:String(o+1)}))],"")}}function Po(){let e=null;try{e=Za(o=>o).selectedItem}catch{e=null}return e?.props??{}}function XO({min:e,max:o,step:t,px:a,label:r,onChange:n,desktopKey:s,fallback:i}){let f=Po()[s],d=xn(void 0,f,i);return y(ro,{children:De({min:e,max:o,step:t,value:xn(a,f,i),readout:!1,ariaLabel:r,notch:d,onChange:n})})}function ZO({label:e,desktopKey:o,fallback:t,changed:a=!1,onReset:r=()=>{}}){let n=Po()[o],s=xn(void 0,n,t);return y(Re,{words:X()?.panel,label:l(e),changed:a,detail:l("{value} on desktop",{value:`${s}px`}),onReset:r})}function QO(e){return Uh(e.label,{icon:e.icon,min:e.min,max:e.max,step:e.step,unsetLabel:"Follows Desktop",unsetMark:y(ZO,{label:e.label,desktopKey:e.desktopKey,fallback:e.fallback}),restTrack:o=>y(XO,{...o,desktopKey:e.desktopKey,fallback:e.fallback})})}function zq(e){return{type:"custom",render:({value:o,onChange:t})=>y(e1,{...e,value:o,onChange:t})}}function JO({label:e,icon:o,options:t,value:a,resolved:r,restWord:n,onChange:s}){let i=t.some(f=>f.value===a);return y(se,{label:l(e),icon:no(o),action:y(Re,{words:X()?.panel,label:l(e),changed:i,detail:l("{value} on desktop",{value:l(n)}),onReset:()=>s(void 0)}),children:Ja({options:t,value:i?a:r,onChange:f=>s(f),ariaLabel:e})})}function e1({label:e,icon:o,options:t,desktopKey:a,resolve:r,value:n,onChange:s}){let i=Po()[a],f=r(void 0,i),d=t.find(p=>p.value===f)?.label??"";return y(JO,{label:e,icon:o,options:t,value:n,resolved:f,restWord:d,onChange:s})}var o1={Top:"Padding top",Bottom:"Padding bottom",Left:"Padding left",Right:"Padding right"},t1={Top:Ph,Bottom:vh,Left:kh,Right:Th},a1=e=>{let o=t1[e];return y(o,{})};function Gq(e={}){let o=e.keys?.top??"sectionPaddingTop",t=e.keys?.bottom??"sectionPaddingBottom",a=e.group!==!1,r=T=>o1[T],n=T=>la(r("Top"),y(Ph,{}),oo.min,oo.max,oo.step,T,"px"),s=(T,F,C,g=oo)=>we("mobile",QO({label:r(T),icon:a1(T),desktopKey:F,min:g.min,max:g.max,step:g.step,fallback:C})),i=e.top??oo.min,f=e.bottom??oo.min,d="sectionPaddingLeft",p="sectionPaddingRight",x=e.sideBounds??oo,m=e.side??x.min,h=e.sidePhone??m,b=e.phone===!0,S=T=>b?we("desktop",T):T;return st({...a?{_gSpacing:Te("Padding")}:{},[o]:S(n(i)),...b?{[na(o)]:s("Top",o,i)}:{},...e.only==="top"?{}:{[t]:S(la(r("Bottom"),y(vh,{}),oo.min,oo.max,oo.step,f,"px")),...b?{[na(t)]:s("Bottom",t,f)}:{}},...e.sides?{[d]:S(la(r("Left"),y(kh,{}),x.min,x.max,x.step,m,"px")),...b?{[na(d)]:s("Left",d,h,x)}:{},[p]:S(la(r("Right"),y(Th,{}),x.min,x.max,x.step,m,"px")),...b?{[na(p)]:s("Right",p,h,x)}:{}}:{}})}var Ya=["top","right","bottom","left"],r1={top:"sectionPaddingTop",right:"sectionPaddingRight",bottom:"sectionPaddingBottom",left:"sectionPaddingLeft"},xh=e=>typeof e=="number"?e:null;function n1(e,o,t){let a={};for(let r of Ya)t[r]!==o[r]&&(a[e[r]]=t[r]??void 0);return a}function l1({tier:e,o}){let t=Jo(),a=t?.values??{},r=e==="mobile"?o.phoneKeys:o.keys,n=Object.fromEntries(Ya.map(d=>[d,xh(a[r[d]])])),s=Object.fromEntries(Ya.map(d=>[d,String(e==="mobile"?xh(a[o.keys[d]])??o.fallback[d]:o.fallback[d])])),[i,f]=Xa(()=>tO(n,s));return y(se,{label:l("Padding"),icon:y(zF,{}),action:y(Fh,{each:i,label:l("Each side"),onChange:f}),children:y(oO,{label:l("Padding"),each:i,value:n,placeholder:s,min:o.min,max:o.max,step:o.step,onChange:d=>{let p=n1(r,n,d);Object.keys(p).length&&t?.onChangeMany(p)},words:{sides:{top:l("Padding top"),right:l("Padding right"),bottom:l("Padding bottom"),left:l("Padding left")},vertical:l("Top and bottom"),horizontal:l("Left and right"),unit:"px"}})})}function Xn(e={}){let o={...r1,...e.keys},t={keys:o,phoneKeys:Object.fromEntries(Ya.map(i=>[i,na(o[i])])),fallback:{top:0,right:0,bottom:0,left:0,...e.fallback},min:e.min??0,max:e.max??200,step:e.step??4},a=e.phone!==!1,r=i=>{let f={type:"custom",render:()=>y(l1,{tier:i,o:t})};return a?we(i,f):f},n=()=>Qa({type:"custom",render:()=>y(Un,{})},"always"),s=Ya.filter(i=>i!=="top");return st({...e.group===!1?{}:{_gSpacing:Te("Padding")},[t.keys.top]:r("desktop"),...a?{[t.phoneKeys.top]:r("mobile")}:{},...Object.fromEntries(s.map(i=>[t.keys[i],{...n(),reachedBy:t.keys.top}])),...a?Object.fromEntries(s.map(i=>[t.phoneKeys[i],we("mobile",n())])):{}})}function Uq(e,o){let t=Object.fromEntries(Object.entries(o).map(([n,s])=>[n,n in e&&To(s)?e[n]:s])),a={},r=!1;for(let[n,s]of Object.entries(e)){if(n in o){r||Object.assign(a,t),r=!0;continue}a[n]=s}return r||Object.assign(a,t),a}var hh=e=>typeof e=="number"?e:null;function s1(e,o,t){let a={};for(let r of["x","y"])t[r]!==o[r]&&(a[e[r]]=t[r]??void 0);return a}function i1({o:e}){let o=Jo(),t=o?.values??{},a={x:hh(t[e.keys.x]),y:hh(t[e.keys.y])},r=l(e.label??"Position"),n=!!(a.x||a.y),s=d=>{let p=s1(e.keys,a,d);Object.keys(p).length&&o?.onChangeMany(p)},i=y(dO,{label:r,value:a,onChange:s,words:{x:l("Left and right"),y:l("Up and down"),unit:"px"},placeholder:{x:"0",y:"0"},min:e.min,max:e.max,step:e.step??1}),f=y(Re,{words:X()?.panel,label:r,changed:n,detail:"0 px, 0 px",onReset:()=>s({x:null,y:null})});return e.label===null?zo("div",{className:"sf-position-line",children:[i,f]}):y(se,{label:r,icon:y(WF,{}),changed:n,action:f,children:i})}function $q(e){return{[e.keys.x]:{type:"custom",render:()=>y(i1,{o:e})},[e.keys.y]:{...Qa({type:"custom",render:()=>y(Un,{})},"always"),reachedBy:e.keys.x}}}var f1={contained:"Contained",page:"Page",full:"Full"},Gn="Width";function Zn(e,o=Xx,t=!0){let a=o.map(r=>({label:Ho[r]??f1[r],value:r}));return st({...t?{_gWidth:Te(Gn)}:{},widthMode:{type:"custom",render:({onChange:r,field:n})=>y(se,{label:l(Gn),icon:y(VF,{}),action:t?y(kO,{inherited:n?.inherited??!1,onReset:()=>r(rf),label:Gn}):void 0,children:Ja({options:a,value:n?.currentValue||e,onChange:r,ariaLabel:Gn})})}})}function Qn(){let e=a=>({type:"custom",render:({value:r,onChange:n})=>y(se,{label:ta,icon:no(y(NF,{})),action:a?a(n):void 0,children:Ja({options:[{label:"Auto",value:"auto"},{label:"Fixed",value:"fixed"},{label:"Screen",value:"screen"}],value:["auto","fixed","screen"].includes(r)?r:"auto",onChange:n,ariaLabel:ta})})}),o=()=>({type:"custom",render:({value:a,onChange:r,field:n})=>{let s=n?.unit==="%"?"%":"px",i=s==="%"?Gi:zi;return y("div",{className:"sf-field",children:De({min:i.min,max:i.max,step:i.step,value:typeof a=="number"?a:i.fallback,suffix:s,ariaLabel:ta,onChange:r})})}}),t=()=>vf("Unit",y(wh,{}),[{label:"px",value:"px"},{label:"%",value:"%"}],"px");return st({_gHeight:Te(ta),sectionHeightMode:we("desktop",e()),sectionHeightValue:we("desktop",o()),sectionHeightUnit:we("desktop",t()),sectionHeightModePhone:we("mobile",e(a=>y(c1,{onClear:()=>a(void 0)}))),sectionHeightValuePhone:we("mobile",o()),sectionHeightUnitPhone:we("mobile",t())})}function c1({onClear:e}){let o=Po(),t=Ui(o),a=An(o),r=l("{value} on desktop",{value:a.mode==="auto"?l("Auto"):`${a.value}${a.unit}`});return y(Re,{words:X()?.panel,label:l(ta),changed:t,detail:r,onReset:e})}function wf(){let e=t=>({type:"custom",render:({value:a,onChange:r,id:n,name:s})=>y(d1,{value:a,onChange:r,labelId:`${n??s??"stickTop"}-label`,phone:t})}),o=()=>({type:"custom",render:({value:t,onChange:a})=>y("div",{className:"sf-field",children:De({min:tt.min,max:tt.max,step:tt.step,value:typeof t=="number"?t:tt.fallback,suffix:"px",ariaLabel:l("Distance from top"),onChange:a})})});return{_gStick:Te(Rn),stickTop:we("desktop",e(!1)),stickTopDistance:we("desktop",o()),stickTopPhone:we("mobile",e(!0)),stickTopDistancePhone:we("mobile",o())}}function d1({value:e,onChange:o,labelId:t,phone:a}){let r=Po(),n=qi(r),s=a?n.phone:e===!0;return y(se,{label:l(Rn),labelId:t,icon:no(y($F,{})),action:zo(ro,{children:[a?y(Re,{words:X()?.panel,label:l(Rn),changed:$i(r),detail:l("{value} on desktop",{value:n.desktop?`${n.desktopDistance}px`:l("Off")}),onReset:()=>o(void 0)}):null,y(Oh,{checked:s,onChange:o,ariaLabelledBy:t})]})})}var Ih="e.g. about";function Jn(){return{_gAnchor:Te("Anchor"),anchor:Rt({control:"plainText",label:"Name",placeholder:Ih},{type:"custom",render:({value:e,onChange:o})=>y(Lp,{value:e,onChange:o,nameBox:(t,a)=>y(At,{value:t,onChange:a,label:"Name",placeholder:Ih,hideable:!1,markup:!1})})})}}function qq(e,o,t){return{type:"custom",render:({value:a,onChange:r,id:n,name:s})=>{let i=`${n??s??e}-datetime`,f=Date.parse(typeof a=="string"?a:"");return y(se,{label:l(e),icon:o,htmlFor:i,hint:t===void 0?void 0:l(t),children:y(cO,{id:i,value:Number.isFinite(f)?new Date(f):null,onChange:d=>r(d?d.toISOString():"")})})}}}function Ot(e,o,t){return{type:"custom",...Wo({},{...hf,label:e}),render:({value:a,onChange:r,id:n,name:s})=>{let i=typeof a=="boolean"?a:o,f=`${n??s??e}-label`;return y(se,{label:l(e),labelId:f,icon:t,action:y(Oh,{checked:i,onChange:r,ariaLabelledBy:f})})}}}function Yh(){return{type:"custom",render:({value:e,onChange:o,id:t,name:a})=>{let r=`${String(t??a??"pageBackground")}-colour`;return y(je,{label:l("Background"),icon:y(Eh,{}),id:r,value:ri(e),onChange:o})}}}var jq={follows:"fill"},Kq={follows:"ink"};function Vq(e,o,t,a){if(typeof o!="string"){let r=o.follows;return{type:"custom",render:({value:n,onChange:s})=>y(u1,{label:e,part:r,icon:t,value:n,onChange:s,opacity:a})}}return{type:"custom",render:({value:r,onChange:n})=>y(je,{label:l(e),icon:t,value:r||o,onChange:n})}}function u1({label:e,part:o,icon:t,value:a,onChange:r,opacity:n}){let s=Bs(K().theme),i=o==="fill"?s.fill:s.ink,[f,d]=nt(n?.key??""),[p]=nt(n?.unsetFrom??""),x=typeof f=="number";return y(pn,{label:l(e),icon:t,value:a||"",inherited:i,resetTo:Lt(i.toUpperCase(),l("Styles")),onChange:r,onReset:()=>{r(""),n&&x&&d(void 0)},...n?{opacity:x?f:n.unset(p),onOpacityChange:m=>d(m),changed:!!a||x}:{}})}var p1=[{value:"0% 0%",label:"Top left"},{value:"50% 0%",label:"Top"},{value:"100% 0%",label:"Top right"},{value:"0% 50%",label:"Left"},{value:"50% 50%",label:"Center"},{value:"100% 50%",label:"Right"},{value:"0% 100%",label:"Bottom left"},{value:"50% 100%",label:"Bottom"},{value:"100% 100%",label:"Bottom right"}];function Xh({label:e,value:o,onChange:t,points:a=p1}){let r=a.map(n=>({...n,label:l(n.label),...n.title?{title:l(n.title)}:null}));return y(iO,{label:l(e),value:o,points:r,onChange:t})}function Yq(){return Qa({type:"custom",render:()=>y(Un,{})},"always")}var m1=Js([]);function Xq(e,{stacking:o,fallback:t=nn}){return{type:"custom",render:({value:a,onChange:r})=>{let n=Xo.includes(a)?a:t;return o?y(x1,{label:e,value:n,onChange:r}):Zh({label:e,value:n,onChange:r,points:m1})}}}function x1({label:e,value:o,onChange:t}){let{appState:a,selectedItem:r}=Za(i=>i),n=r?.props?.id?String(r.props.id):void 0,s=n?oi(a?.data,n):[];return Zh({label:e,value:o,onChange:t,points:Js(s,n)})}function Zh({label:e,value:o,onChange:t,points:a}){let r=a.find(n=>n.disabled);return y(se,{label:l(e),icon:y(GF,{}),hint:r?.title?l(r.title):void 0,children:Xh({label:e,value:yt(o),onChange:t,points:a})})}var Zq={top:y(AF,{}),right:y(LF,{}),bottom:y(FF,{}),left:y(OF,{})};function Qq(e,o,t,a,r,n){let s=p=>o.find(x=>x.value===p),i=p=>({value:p,label:"",disabled:!0,title:a}),f=p=>{let x=o.find(h=>h.cell===p);if(!x)return i(`missing-${p}`);let m=n?.[p];return m?{value:x.value,label:x.label,icon:m}:{value:x.value,label:x.label}},d=[i("corner-top-left"),f("top"),i("corner-top-right"),f("left"),i("centre"),f("right"),i("corner-bottom-left"),f("bottom"),i("corner-bottom-right")];return{type:"custom",render:({value:p,onChange:x})=>{let m=o.some(h=>h.value===p)?p:t;return y(se,{label:l(e),icon:r,value:s(m)?.label?l(s(m).label):"",children:Xh({label:e,value:m,onChange:x,points:d})})}}}var h1="\0note";function ao(e,o,t,a,r){return{type:"custom",options:t,fallback:a,...r?{note:r}:{},...Wo({},{type:"select",label:e}),render:({value:n,onChange:s,field:i})=>{let f=i.options??t,d=i.fallback??a,p=f.some(x=>x.value===n)?n:d;return y(se,{label:l(e),icon:no(o),children:y(nO,{value:p,ariaLabel:l(e),onChange:s,options:[...r?[{label:l(r),value:h1,disabled:!0}]:[],...f.map(x=>({label:l(x.label),value:x.value}))]})})}}}function Jq(e,o,t){return{type:"custom",options:o,render:({value:a,onChange:r,field:n})=>y(hm,{label:e,options:(n.options??o).map(s=>({...s,label:l(s.label)})),value:Array.isArray(a)?a:[],onChange:r,...t?{emptyLabel:l(t)}:{}})}}function ej(e,o={}){return{type:"custom",render:({value:t,onChange:a})=>{let r={value:t,onChange:a,...o};return y(e,{...r})}}}function Ja({options:e,value:o,onChange:t,ariaLabel:a,disabled:r=!1}){return y(eO,{options:e.map(n=>n.picture?{id:n.value,label:n.picture,title:l(n.title??n.label)}:{id:n.value,label:l(n.label),title:n.title===void 0?void 0:l(n.title)}),value:o,onChange:t,ariaLabel:l(a),disabled:r})}var oj=[{label:"Image",value:"image"},{label:"Video",value:"video"}];function vf(e,o,t,a){let r=t.map(n=>typeof n=="string"?{label:n,value:n}:n);return{type:"custom",...Wo({},{type:"radio",label:e,options:r.map(n=>({value:n.value,label:n.label}))}),render:({value:n,onChange:s,field:i})=>y(se,{label:l(e),icon:no(o),children:Ja({options:r,value:r.some(f=>f.value===n)?n:n||i?.currentValue||a,onChange:s,ariaLabel:e})})}}function tj(e,o,t){let a=Object.keys(qs).map(r=>({label:qs[r],value:r,picture:t[r]}));return{type:"custom",...Wo({},{type:"radio",label:e,options:a.map(r=>({value:r.value,label:r.label}))}),render:({onChange:r})=>y(I1,{label:e,icon:o,options:a,onChange:r})}}function I1({label:e,icon:o,options:t,onChange:a}){let r=Jo()?.values??{},n=js(r),s=n==="frame"&&!!Yo(r.mediaVideo)&&!Yo(r.videoFrame);return y(se,{label:l(e),icon:no(o),hint:s?l("This video has no frame yet. The slide shows its background colour until one is made."):void 0,children:Ja({options:t,value:n,onChange:a,ariaLabel:e})})}function aj(e,o,t,a={}){return{type:"custom",[gF]:!0,render:({value:r,onChange:n,name:s})=>y(mm,{value:r||"",onChange:n,fieldKey:s,label:e,accept:o,placeholder:t,focusKey:a.focus,focusWhen:a.focusWhen,frameKey:a.frame})}}function rj({value:e,onChange:o,label:t}){let a=e||{},r=!!a.pending,n=r?"var(--fg-dim, #888)":a.ok?"#1d9e75":"#d85a30",s=!!Ce(bO()).geocode,i=(f,d)=>o({...a,[f]:d===""?void 0:Number(d)});return zo(se,{label:l(t),icon:y(pf,{}),children:[s&&zo(ro,{children:[y("button",{type:"button",disabled:r,onClick:()=>o({...a,pending:!0,ok:!1,status:"Finding\u2026"}),style:{width:"100%",display:"flex",alignItems:"center",justifyContent:"center",gap:6,padding:"8px 10px",fontSize:13,cursor:r?"default":"pointer",opacity:r?.6:1,border:"1px solid var(--border-strong, #ccc)",borderRadius:6,background:"transparent",color:"inherit"},children:r?l("Finding\u2026"):l("Find coordinates")}),a.status&&y("div",{style:{marginTop:6,fontSize:12,lineHeight:1.4,color:n},children:l(a.status)}),y("div",{style:{marginTop:6,fontSize:11,color:"var(--fg-dim, #999)"},children:l("Coordinates from OpenStreetMap")})]}),y("button",{type:"button",onClick:()=>o({...a,manual:!a.manual}),style:{marginTop:8,padding:0,border:"none",background:"none",font:"inherit",fontSize:12,color:"var(--sf-accent, #2563eb)",cursor:"pointer",textDecoration:"underline"},children:a.manual?l("Hide manual coordinates"):l("Enter coordinates manually")}),a.manual&&zo("div",{style:{marginTop:8,display:"grid",gap:8},children:[y(se,{label:l("Latitude"),icon:y(pf,{}),children:y("input",{type:"number",step:"any",placeholder:l("e.g. {example}",{example:"34.0990198"}),value:typeof a.lat=="number"?a.lat:"",onChange:f=>i("lat",f.target.value)})}),y(se,{label:l("Longitude"),icon:y(pf,{}),children:y("input",{type:"number",step:"any",placeholder:l("e.g. {example}",{example:"-117.9842833"}),value:typeof a.lng=="number"?a.lng:"",onChange:f=>i("lng",f.target.value)})})]})]})}function g1(e,o){return o===null||o<0||o>=e.length?"":e[o]?.text??""}function y1(e,o,t){let a=e.map(r=>({text:r?.text??""}));return o===null||o<0||o>=e.length?a:a.map((r,n)=>n===o?{text:t}:r)}function b1(e,o,t){if(t===null||t>=o.length)return null;for(let a=0;a<t;a+=1)if(e[a]!==o[a])return null;return e[t]!==o[t]&&o.includes(e[t])||e[t]!==o[t]&&o.length!==e.length?null:t}var kf={label:"Ticker items",icon:y(HF,{})};function nj(e,o,t,a){return{type:"custom",[Go]:{control:"textList",label:e,placeholder:t,itemKey:"text",rendering:a},...Wo({},{...Dh.textList,label:e}),render:({value:r,onChange:n})=>y(Tf,{label:e,icon:no(o),items:Array.isArray(r)?r:[],placeholder:t,onChange:n,markup:a==="markup"})}}function Tf({label:e,icon:o,items:t,placeholder:a,onChange:r,markup:n=!1}){let s=xf(null),[i,f]=Xa(null),d=x=>x.map(m=>({text:m?.text??""})),p=x=>{let m=b1(t,x,i);m===null&&(s.current=null),f(m),r(d(x))};return y(lO,{label:l(e),icon:o,noun:l("item"),items:t,onChange:p,newItem:()=>({text:""}),open:null,onOpen:()=>{},renderItem:()=>null,above:n?y(pi,{target:s,value:g1(t,i),onChange:x=>r(y1(t,i??-1,x)),disabled:i===null,label:i===null?l("Formatting \u2014 click a row first"):l("Formatting \u2014 row {n}",{n:i+1})}):void 0,renderRow:(x,m,h)=>y("input",{type:"text",className:n&&i===m?"sf-list-marking":void 0,value:x?.text??"",placeholder:l(a),"aria-label":l("{label} {n}",{label:l(e),n:m+1}),onChange:b=>h({text:b.target.value}),onFocus:b=>{s.current=b.currentTarget,f(m)}})})}function Qh(e,o){let t=`${e.label} \u2014 row ${o+1}`;return Rt({control:"plainText",label:t,placeholder:e.placeholder,offPage:e.offPage},{type:"custom",render:({value:a,onChange:r})=>y(At,{value:a,onChange:r,label:l("{label} \u2014 row {n}",{label:l(e.label),n:o+1}),placeholder:e.placeholder,hideable:!1,markup:e.rendering==="markup"})})}function Jh(e){return{_gCards:Te("Cards"),coverIndex:ao("Cover image",y(MF,{}),cm,String(1),e?.coverHint??"A card's opening picture \u2014 a card pinned to a finish keeps its own."),imageBackground:RO("Image background",Hn),cardImage:C1(),spinOnHover:Ot("Rotate on hover",e?.spinDefault??!0,y(qF,{}))}}function eI(){return{outline:ao("Card outline",y(jF,{}),bi,gi),indexBadge:ao("Card number",y(wh,{}),yi,Ii),showBadge:Ot("Product badge",!0,y(ai,{noun:"tag"}))}}function oI(e){let o=e&&"bottomDefault"in e?e.bottomDefault:!0,t=e&&"defaults"in e?e.defaults:{showCardSizes:o,showCardBuy:o,showCardPage:o};return{_gShowOnCard:Te("Show on a card"),showCardPrice:Ot("Price",!0,y(RF,{})),showCardFinishes:Ot("Finish swatches",!0,y(BF,{})),showCardSizes:Ot("Sizes",t.showCardSizes,y(UF,{})),showCardBuy:Ot("Buy button",t.showCardBuy,y(PF,{})),showCardPage:Ot("Page button",t.showCardPage,y(Eh,{}))}}function lj(e,o="display"){let t=na(o);return{[o]:we("desktop",{type:"custom",render:({value:a,onChange:r})=>y(tI,{parts:e,changed:Hp(a),shown:n=>un(a,n),onPress:(n,s)=>r(zp(a,n,s)),onReset:()=>r(void 0)})}),[t]:we("mobile",{type:"custom",render:({value:a,onChange:r})=>y(S1,{parts:e,desktopKey:o,value:a,onChange:r})})}}function tI({parts:e,changed:o,shown:t,onPress:a,onReset:r,detail:n}){let s=l("Display");return y(se,{label:s,icon:y(CF,{}),changed:o,action:y(Re,{words:X()?.panel,label:s,changed:o,detail:n,onReset:r}),children:y(sO,{label:s,items:e.map(i=>({id:i.id,label:l(i.label),shown:t(i.id)})),onChange:a})})}function S1({parts:e,desktopKey:o,value:t,onChange:a}){let r=Po()[o];return y(tI,{parts:e,changed:Wp(t),shown:n=>ci(r,t,n),onPress:(n,s)=>a(Gp(t,n,s)),onReset:()=>a(hn),detail:l("the same as Desktop")})}function C1(){return Uh("Card image",{min:qe,max:ht,step:fp,hint:"Rounds the picture. The card's own corner is in Styles."})}function sj(){return Sf({sidesKey:"cornerSides",step:cp,useFollowed:()=>qe,mark:y(w1,{label:dp}),hint:l("Rounds the picture. Left alone it stays square.")})}function w1({label:e,changed:o=!1,onReset:t=()=>{}}){return y(Re,{words:X()?.panel,label:l(e),changed:o,onReset:t})}function ij(){return{type:"custom",render:({value:e,onChange:o})=>y(v1,{value:typeof e=="string"?e:"",onChange:o})}}function v1({value:e,onChange:o}){let[t,a]=Xa(null),r=Ys.filter(s=>t===null||Do[s].across===t),n=e&&e in Do?Do[e]:null;return zo(ro,{children:[y(se,{label:l("Photos in a row"),icon:y(Sh,{}),children:zo("div",{className:"sf-gallery-filter",children:[y("button",{type:"button","aria-pressed":t===null,onClick:()=>a(null),children:l("All")}),pp.map(s=>y("button",{type:"button","aria-pressed":t===s,onClick:()=>a(s),children:s},s))]})}),y(se,{label:l("Layout"),icon:y(_F,{}),value:n?l(n.label):l("Not chosen"),hint:l("{n} of {total} layouts",{n:r.length,total:Ys.length}),children:y(Lh,{className:"sf-gallery-layouts",label:l("Layout"),value:e,onChange:o,onClear:()=>o(""),options:r.map(s=>({value:s,label:l(Do[s].label),picture:y("span",{className:"sf-gallery-pic",children:xp(Do[s]).map(([i,f],d)=>y("i",{style:{gridColumn:`span ${i}`,gridRow:`span ${f}`}},d))})}))})})]})}import{jsx as el,Fragment as k1,jsxs as aI}from"react/jsx-runtime";import{Button as rI,Dialog as T1}from"efficient-shell/ui";function P1(e){return Ae("This site has {n} color theme of its own. Clearing takes them away and puts back the four the shop supplies.","This site has {n} color themes of its own. Clearing takes them away and puts back the four the shop supplies.",e)}function nI({count:e,onCancel:o,onConfirm:t}){return aI(T1,{open:!0,onClose:o,role:"alertdialog",size:"sm",title:l("Clear this site\u2019s colors?"),footer:aI(k1,{children:[el(rI,{variant:"secondary",onClick:o,children:l("Cancel")}),el(rI,{variant:"danger",onClick:t,children:l("Clear colors")})]}),children:[el("p",{children:P1(e)}),el("p",{className:"mt-2 font-medium",children:l("This cannot be undone.")})]})}var R1=gf("the row's whole content is an action; the gutter names a subject and this row has none \u2014 the button's label is the name GG, 2026-09-23"),B1="Reset color",_1={selected:0,themes:[]};function D1(e){e(_1)}function iI({value:e,onChange:o}){let t=e?.themes??[],a=t.length===0,r=ze(e),[n,s]=sI(!1),i=L1(),[f,d]=sI(null),p=(F,C)=>{o({...r,themes:r.themes.map((g,I)=>I===F?C:g)})},x=Vo(r).accent,m=new Set(r.themes.map(F=>F.brandInk).filter(Boolean)),h=ku.filter(F=>!m.has(F)).map(F=>Tu(x,F)),b=[...r.themes,...h],S=F=>{if(F<r.themes.length)return o({...r,selected:F});let C=[...r.themes,b[F]];o({...r,themes:C,selected:C.length-1})},T=()=>{let F=[...r.themes,{...yo(r.themes[r.selected])}];o({...r,themes:F,selected:F.length-1}),d(F.length-1)};return lI(E1,{children:[a?null:sa(O1,{label:l(B1),icon:no(R1),labelId:"sf-theme-reset",action:sa(F1,{label:l("all theme colors"),words:i.panel,changed:!0,onReset:()=>s(!0)})}),n&&sa(nI,{count:t.length,onCancel:()=>s(!1),onConfirm:()=>{s(!1),D1(o)}}),sa("div",{className:"sf-theme-list",role:"radiogroup","aria-label":l("Theme"),children:b.map((F,C)=>sa(Sn,{index:C,colors:F,selected:C===r.selected,open:f===C&&C<r.themes.length,editable:C<r.themes.length,onPick:()=>S(C),onEdit:()=>d(g=>g===C?null:C),onChangeColors:g=>p(C,g)},C))}),lI("button",{type:"button",onClick:T,className:"sf-theme-add",children:[sa(A1,{size:12}),l("Add new theme")]})]})}import{jsx as ol}from"react/jsx-runtime";import{SettingsDefaultReset as N1,SettingsField as M1}from"efficient-easel/panel";import{SquareIcon as H1}from"efficient-easel/icons";var W1="Applies to panels, cards, inputs and buttons. Round things \u2014 color swatches, switches, status dots \u2014 stay round.",Pf="Corners";function fI({value:e,onChange:o,showHint:t=!0}){let a=e===null;return ol(M1,{label:l(Pf),icon:ol(H1,{}),value:a?l("Default"):`${e}px`,changed:!a,action:ol(N1,{words:X()?.panel,label:l(Pf),changed:!a,detail:l("the built-in corners"),onReset:()=>o(null)}),hint:t?l(W1):void 0,children:ol(De,{min:qe,max:ht,step:1,value:e??qe,readout:!1,ariaLabel:l(Pf),onChange:o})})}import{jsx as er}from"react/jsx-runtime";import{SettingsDefaultReset as z1,SettingsField as G1,SettingsSegmented as U1}from"efficient-easel/panel";import{ShadowIcon as $1}from"efficient-easel/icons";var Ef={none:"None",soft:"Soft",lifted:"Lifted"},q1="Applies to cards \u2014 products, brands, journal entries and filter cells. Round things like swatches and status dots are never shadowed.",j1={none:"none",soft:"0 1px 1px rgba(20, 20, 22, 0.10), 0 2px 4px -1px rgba(20, 20, 22, 0.14)",lifted:"0 1px 2px rgba(20, 20, 22, 0.10), 0 4px 7px -2px rgba(20, 20, 22, 0.30)"},K1={labelsPx:90.25,widestLabelPx:34.6};function cI({value:e,onChange:o,showHint:t=!0}){let a=e===null,r=e??Ds;return er(G1,{label:l("Card shadow"),icon:er($1,{}),value:l(Ef[r]),changed:!a,action:er(z1,{words:X()?.panel,label:l("Card shadow"),changed:!a,detail:l(Ef[Ds]),onReset:()=>o(null)}),hint:t?l(q1):void 0,children:er(U1,{options:Bu.map(n=>({id:n,label:l(Ef[n]),icon:er("span",{className:"sf-shadow-chip",style:{boxShadow:j1[n]}})})),value:r,ariaLabel:l("Card shadow"),fit:K1,onChange:o})})}import{jsx as dI}from"react/jsx-runtime";import{ShadowIcon as V1}from"efficient-easel/icons";var Y1="Most useful on a dark theme, where a black shadow cannot be seen. Also used by the Lift hover, even with the card shadow off.";function uI({value:e,onChange:o,showHint:t=!0}){let a=e===null;return dI(pn,{label:l("Shadow color"),icon:dI(V1,{}),value:e??"",inherited:Ms,resetTo:Ms,onChange:o,onReset:()=>o(null),hint:t?l(Y1):void 0})}import{jsx as tl}from"react/jsx-runtime";import{SettingsDefaultReset as X1,SettingsField as Z1}from"efficient-easel/panel";import{AlignSeparateIcon as Q1}from"efficient-easel/icons";var J1="The space between the blocks inside a row, a grid or a box. Default means each one keeps the spacing it already has.",Ff="Block gap",eL=aa.Grid;function pI({value:e,onChange:o,showHint:t=!0}){let a=e===null;return tl(Z1,{label:l(Ff),labelId:"sf-block-gap",icon:tl(Q1,{}),value:a?l("Default"):`${e}px`,changed:!a,action:tl(X1,{words:X()?.panel,label:l(Ff),changed:!a,detail:l("each block's own spacing"),onReset:()=>o(null)}),hint:t?l(J1):void 0,children:tl(De,{min:Ft.min,max:Ft.max,step:Ft.step,value:a?eL:e,readout:!1,ariaLabel:l(Ff),onChange:o})})}import{jsx as al}from"react/jsx-runtime";import{SettingsDefaultReset as oL,SettingsField as tL,SettingsSegmented as aL}from"efficient-easel/panel";import{HoverIcon as rL}from"efficient-easel/icons";var Of={none:"None",lift:"Lift",highlight:"Highlight"},nL="What a card does when a shopper points at it \u2014 or taps it, on a phone. Highlight is the effect your cards already use.";function mI({value:e,onChange:o,showHint:t=!0}){let a=e===null,r=e??Ns;return al(tL,{label:l("Hover effect"),icon:al(rL,{}),value:l(Of[r]),changed:!a,action:al(oL,{words:X()?.panel,label:l("Hover effect"),changed:!a,detail:l(Of[Ns]),onReset:()=>o(null)}),hint:t?l(nL):void 0,children:al(aL,{options:_u.map(n=>({id:n,label:l(Of[n])})),value:r,ariaLabel:l("Hover effect"),onChange:o})})}import{jsx as rl}from"react/jsx-runtime";import{SettingsDefaultReset as lL,SettingsField as sL,SettingsSegmented as iL}from"efficient-easel/panel";import{DropIcon as fL}from"efficient-easel/icons";var Lf="Photography",xI={shot:"As shot",mono:"Black and white"},Af=[{grayscale:!1,label:xI.shot},{grayscale:!0,label:xI.mono}],cL="Black and white photographs return to color on hover. Wheels and tyres keep their real finish either way.";function hI({value:e,onChange:o,showHint:t=!0}){let a=e===null,r=e??!1;return rl(sL,{label:l(Lf),icon:rl(fL,{}),value:l(Af.find(n=>n.grayscale===r).label),changed:!a,action:rl(lL,{words:X()?.panel,label:l(Lf),changed:!a,detail:l(Af.find(n=>!n.grayscale).label),onReset:()=>o(null)}),hint:t?l(cL):void 0,children:rl(iL,{options:Af.map(n=>({id:n.grayscale,label:l(n.label)})),value:r,ariaLabel:l(Lf),onChange:o})})}import{jsx as Rf}from"react/jsx-runtime";import{useId as dL}from"react";import{SettingsField as uL,SettingsSwitch as pL}from"efficient-easel/panel";import{ShareIcon as mL}from"efficient-easel/icons";var xL="Share button",hL="On every blog post.";function II({value:e,onChange:o,showHint:t=!0}){let a=dL();return Rf(uL,{label:l(xL),labelId:a,icon:Rf(mL,{}),action:Rf(pL,{checked:e===!0,onChange:o,ariaLabelledBy:a}),hint:t?l(hL):void 0})}import{jsx as nl}from"react/jsx-runtime";import{SettingsDefaultReset as IL,SettingsField as gL}from"efficient-easel/panel";import{PaddingXIcon as yL}from"efficient-easel/icons";var Bf="Side space",_f=ko.default,bL="The room left at the left and right edge of every page.";function gI({value:e,onChange:o,showHint:t=!0}){let a=e===null;return nl(gL,{label:l(Bf),labelId:"sf-side-space",icon:nl(yL,{}),value:`${e??_f}px`,changed:!a,action:nl(IL,{words:X()?.panel,label:l(Bf),changed:!a,detail:`${_f}px`,onReset:()=>o(null)}),hint:t?l(bL):void 0,children:nl(De,{min:ko.min,max:ko.max,step:ko.step,value:e??_f,readout:!1,ariaLabel:l(Bf),onChange:o})})}import{jsx as Df}from"react/jsx-runtime";import{BACKGROUND_WIDTHS as w9,SettingsBackgroundWidth as SL,SettingsContentWidth as CL}from"efficient-easel/panel";var yI="Width",wL="Background width",vL="Content width";var ll=e=>l(Ho[e==="content"?"page":"full"]),kL=400,bI="Content cannot be wider than the background.",SI="The width of every section's background, until the section sets its own.",CI="The width of every section's content, until the section sets its own.",wI="On phones, content always fills the screen.";function sl({value:e,changed:o,detail:t,onChange:a,onReset:r,disabled:n=!1,hint:s,labelId:i}){return Df(SL,{value:e,changed:o,detail:t,onChange:a,onReset:r,disabled:n,hint:s?l(s):void 0,labelId:i,words:{label:l(wL),full:ll("full"),content:ll("content")},resetWords:X()?.panel})}function il({mode:e,px:o,max:t=xe.max,min:a=kL,changed:r,detail:n,onMode:s,onPx:i,onReset:f,fullClosed:d=!1,disabled:p=!1,hint:x,labelId:m}){let h=l(vL),b=e!=="full"?Df(De,{min:a,max:t,step:xe.step,value:Math.min(Math.max(o,a),t),onChange:i,suffix:"px",ariaLabel:h,disabled:p}):null;return Df(CL,{mode:s?e:void 0,onMode:s,number:b,changed:r,detail:n,onReset:f,fullClosed:d,disabled:p,hint:x?l(x):void 0,labelId:m,words:{label:h,full:ll("full"),content:ll("content")},resetWords:X()?.panel})}import{jsx as ug}from"react/jsx-runtime";import{TextStyleItem as MA,TextStylesGroup as HA}from"efficient-easel/text-styles";import{jsx as AA}from"react/jsx-runtime";import{useState as RA}from"react";import{TextStylesList as BA}from"efficient-easel/text-styles";import{usePreviewDevice as _A}from"efficient-easel/draw/client";import{defaultTextStyles as eg,textStyleCaseCss as TA}from"efficient-easel/text-styles/model";import{textStyleCaseCss as DL,textStyleCaseOfCss as NL}from"efficient-easel/draw";function Nf(e,o){return o?`${e}[${o.index}].${o.rowKey}`:e}function lo(e){let o=/^([A-Za-z0-9_$]+)\[(\d+)\]\.([A-Za-z0-9_$]+)$/u.exec(e);return o?{key:o[1],row:{index:Number(o[2]),rowKey:o[3]}}:{key:e,row:null}}import{decodePartId as zf,encodePartId as pl}from"efficient-easel/draw";import{LINK_FIELD_MARKER as RI,SCAFFOLD_FIELD_MARKER as LI,TEXT_FIELD_MARKER as ml}from"efficient-easel/draw";import{readHidable as BI}from"efficient-easel/draw";import{SCALAR_TEXT_CONTROLS as AL}from"efficient-easel/draw";import{TEXT_FIELD_MARKER as LL}from"efficient-easel/draw";import{TEXT_FIELD_MARKER as vI}from"efficient-easel/draw";import{readHidable as kI}from"efficient-easel/draw";import{SCALAR_TEXT_CONTROLS as TL}from"efficient-easel/draw";var PL=TL,EL=["text","textarea"],FL=["textarea","plainTextarea"];function OL(e){return!e||typeof e!="object"?null:e[vI]?.control??null}function ia(e){let o=OL(e);return o&&PL.includes(o)?o:null}function fl(e){return FL.includes(e)}function TI(e){return!e||typeof e!="object"?void 0:e[vI]?.placeholder}function cl(e){return kI(e).text}function Mf(e,o,t){return EL.includes(e)?{text:t,hidden:kI(o).hidden}:t}function PI(e,o,t,a){return cl(e[o])===a?null:{...e,[o]:Mf(t,e[o],a)}}function dl(e){if(!(!e||typeof e!="object"))return e[LL]}function Hf(e){if(!e||typeof e!="object")return null;let o=e.arrayFields;return o&&typeof o=="object"?o:null}function EI(e,o){if(!Array.isArray(o))return[];let t=dl(e),a=[];if(t?.control==="textList"){let n=t.itemKey??"text";return o.forEach((s,i)=>{let f=ne(s?.[n]);f&&a.push({row:{index:i,rowKey:n},text:f})}),a}let r=Hf(e);return r?(o.forEach((n,s)=>{for(let[i,f]of Object.entries(r)){if(!ia(f))continue;let d=cl(n?.[i])||dl(f)?.placeholder||"";d&&a.push({row:{index:s,rowKey:i},text:d})}}),a):[]}function or(e,o){if(Array.isArray(e))return e[o.index]?.[o.rowKey]}function Wf(e,o,t,a){let r=e[o];return!Array.isArray(r)||t.index<0||t.index>=r.length?null:{...e,[o]:r.map((n,s)=>s===t.index?{...n,[t.rowKey]:a}:n)}}function FI(e,o,t,a,r){let n=or(e[o],t);return cl(n)===r?null:Wf(e,o,t,Mf(a,n,r))}function OI(e,o){return o?`${e} \xB7 row ${o.index+1}`:e}var so="data-sf-part",V9="data-sf-region-part",Y9="data-sf-part-row";function X9(e,o){return`${e}[${o}]`}var Z9="data-sf-part-kind",RL="data-sf-part-style-owner",BL="data-sf-part-style-kind";function Q9(e){for(let o=e;o;o=o.parentElement){let t=o.getAttribute(RL),a=o.getAttribute(BL);if(t&&a)return{owner:t,kind:a};if(o.getAttribute("data-easel-block"))return null}return null}var AI=2;function fa(e){return za(e).replace(/\s+/gu,"")}function ul(e,o,t){let a=e[ml];if(a){if(a.control==="textList"){let n=a.itemKey??"text";if(!Array.isArray(o))return;for(let s of o){let i=s?.[n];typeof i=="string"&&t.push(i)}return}let{text:r}=BI(o);r?t.push(r):a.placeholder&&t.push(a.placeholder);return}if(!e[RI]){if(e.type==="text"||e.type==="textarea"){let r=ne(o);r&&t.push(r);return}if(e.arrayFields&&Array.isArray(o)){for(let r of o)for(let[n,s]of Object.entries(e.arrayFields))ul(s,r?.[n],t);return}if(e.objectFields&&o&&typeof o=="object")for(let[r,n]of Object.entries(e.objectFields))ul(n,o[r],t)}}function _I(e){if(!e||typeof e!="object")return!1;let o=e;return o[RI]?!1:!!o[ml]||o.type==="text"||o.type==="textarea"}function xl(e,o){let t=e[ml];return t?.label?t.label:typeof e.label=="string"?e.label:o}function Gf(e){let o=e.indexOf(" (");return(o>0?e.slice(0,o):e).trim()}function J9(e,o){if(!e)return[];let t=[];for(let[a,r]of Object.entries(e)){if(!r||typeof r!="object"||Ga(a))continue;let n=r,s=[];ul(n,o?.[a],s),!s.length&&n[LI]!==void 0&&ul(n,n[LI],s);let i=xl(n,a),f=new Set;for(let{row:x,text:m}of EI(n,o?.[a])){let h=fa(m);h.length<AI||(f.add(h),t.push({key:a,label:i,texts:[h],row:x}))}let d=new Set(f),p=[];for(let x of s){let m=fa(x);m.length<AI||d.has(m)||(d.add(m),p.push(m))}p.length&&t.push({key:a,label:i,texts:p})}return t}var _L=AL;function DI(e,o){if(!o||typeof o!="object"||Ga(e)||nm(o))return null;let t=o[ml];return!t||!_L.includes(t.control)?null:t}function eK(e,o){let t=DI(e,o);return t!==null&&t.identifier!==!0}function NI(e,o){if(!e)return[];let t=[];for(let[a,r]of Object.entries(e)){let n=DI(a,r);if(!n)continue;let{text:s,hidden:i}=BI(o?.[a]),f=s||n.placeholder||"",d=za(f).replace(/\s+/gu," ").trim();t.push({key:a,label:Gf(xl(r,a)),preview:d,offPage:n.offPage===!0,identifier:n.identifier===!0,hidden:!!i})}return t}var qf="_partStyles",ML="data-sf-part-styled",hl="data-sf-text-style",HL=/^(heading|body)-[1-7]$/;function ca(e){return typeof e=="string"&&HL.test(e)}var gl={heading:"heading-1",heading2:"heading-2",heading3:"heading-3",body:"body-1",label:"body-5"};function WL(e){if(!e)return null;for(let[o,t]of Object.entries(gl))if(t===e)return o;return null}function qI(e){if(ca(e.textStyle))return e.textStyle;let o=e.role&&Bo.includes(e.role)?e.role:null;return o?gl[o]:void 0}var zL=[400,500,600,700],jI=["left","center","right","justify"],MI=5,HI=1e3,GL=-5,UL=10,Kf=0,Vf=64,Yf=2,Xf=120,it=1280,Zf=10,WI={size:{min:MI,max:HI,step:1},sizePhone:{min:MI,max:HI,step:1},padding:{min:Kf,max:Vf,step:Yf},width:{min:Xf,max:it,step:Zf}},$L=.05,qL=.01,jL=["line","letter"],KL=.5,VL=2.5,YL=-1,XL=1,ZL=0,QL=400;function ar(e){return!e||typeof e!="object"||Array.isArray(e)?null:e}function KI(e){return ar(e?.[qf])??{}}function yl(e,o){let t=KI(e);return Object.hasOwn(t,o)?ar(t[o])??{}:{}}function VI(e,o,t){let a={...KI(e)};if(JL(t).length?a[o]=t:delete a[o],!Object.keys(a).length){let{[qf]:r,...n}=e;return n}return{...e,[qf]:a}}function JL(e){return Object.entries(e).filter(([,o])=>o!==void 0)}function eA(e){return jL.includes(e)}var tr=(e,o,t)=>Math.min(t,Math.max(o,e));function oA(e,o){if(eA(e)){let t=Math.round(Number(o));return!Number.isFinite(t)||t===0?null:tr(t,GL,UL)}if(e==="lineHeight"){let t=Number(o);return Number.isFinite(t)?da(tr(t,KL,VL),3):null}if(e==="letterSpacing"){let t=Number(o);return Number.isFinite(t)?da(tr(t,YL,XL),4):null}if(e==="paragraphSpacing"){let t=Math.round(Number(o));return!Number.isFinite(t)||t<=0?null:tr(t,ZL,QL)}if(Object.hasOwn(WI,e)){let{min:t,max:a}=WI[e],r=Math.round(Number(o));return Number.isFinite(r)?tr(r,t,a):null}return e==="italic"?typeof o=="boolean"?o:null:e==="role"?Bo.includes(String(o))?o:null:e==="textStyle"?ca(o)?o:null:o}var tA=["weight","size","sizePhone","line","letter","lineHeight","letterSpacing","paragraphSpacing","padding","width"];function YI(e){let o=null,t=a=>{o??={...e},delete o[a]};for(let a of tA){let r=e[a];r!==void 0&&!(typeof r=="number"&&Number.isFinite(r))&&t(a)}return e.align!==void 0&&!jI.includes(e.align)&&t("align"),e.textStyle!==void 0&&!ca(e.textStyle)&&t("textStyle"),o??e}var aA=[["font","role"],["role","textStyle"],["line","lineHeight"],["letter","letterSpacing"]];function rA(e){let o=[];for(let[t,a]of aA)t===e?o.push(a):a===e&&o.push(t);return o}function ua(e,o,t,a){let r={...yl(e,o)},n=a==null?null:oA(t,a);if(n===null)delete r[t];else{r[t]=n;for(let s of rA(t))delete r[s]}return VI(e,o,r)}function XI(e,o){return VI(e,o,{})}function nA(e){return NL(e)??"none"}function lA(e){return DL(e)??""}var sA={heading:"--font-role-heading",heading2:"--font-role-heading2",heading3:"--font-role-heading3",body:"--font-role-body",accent:"--font-role-accent",label:"--font-role-label"};function iA(e,o){let t=e.role;return t&&Bo.includes(t)?t:o?.blockDrawsStyle?null:WL(e.textStyle)}function iK(e,o){return e==="Text"&&o==="text"}var fA={headingLarge:"min(clamp(64px,9vw,144px), var(--sf-heading-max,9999px))",headingMedium:"min(32px, var(--sf-heading-max,9999px))",headingSmall:"min(24px, var(--sf-heading-max,9999px))",accent:"32px",body:"14px",label:"12px"};function cA(e){let o=Cu[e],t=fA[o];return t?`var(--size-${o}, ${t})`:`var(--size-${o})`}function nr(e){let o={};return typeof e.lineHeight=="number"?o.lineHeight=e.lineHeight:e.line&&(o.lineHeight=da(dA+e.line*$L,3)),typeof e.letterSpacing=="number"?o.letterSpacingEm=e.letterSpacing:e.letter&&(o.letterSpacingEm=da(e.letter*qL,4)),o}var dA=1,lr="--sf-part-para";function zI(e){return e=YI(e),typeof e.sizePhone=="number"&&e.sizePhone>0?{fontSize:`${e.sizePhone}px`}:{}}function uA(e,o){return o&&typeof e.sizePhone=="number"&&e.sizePhone>0?{...e,size:e.sizePhone}:e}function Il(e,o,t){e=YI(e);let a=iA(e,t),r=nr(e),n=e.size?`${e.size}px`:a?cA(a):"";return{fontFamily:e.font?hA(e.font):a?`var(${sA[a]})`:"",fontWeight:e.weight?String(e.weight):"",fontSize:n,minWidth:n?"0":"",overflowWrap:n?"break-word":"",lineHeight:r.lineHeight!==void 0?String(r.lineHeight):"",letterSpacing:r.letterSpacingEm!==void 0?`${r.letterSpacingEm}em`:"",[lr]:e.paragraphSpacing?`${e.paragraphSpacing}px`:"",textTransform:lA(e.case),textAlign:e.align??"",paddingTop:Uf(e.padding),paddingBottom:Uf(e.padding),maxWidth:Uf(e.width),color:pA(e.color),fontStyle:e.italic===!0?"italic":e.italic===!1?"normal":""}}var pA=e=>e===void 0||e===""?"":Object.hasOwn(Qt,e)?Qt[e]:ZI.test(e)?e:"",ZI=/^#[0-9a-fA-F]{6}$/;function fK(e){return ZI.test(e)}var Uf=e=>e===void 0?"":`${e}px`,da=(e,o)=>Number(e.toFixed(o));function cK(e,o){let t=Number.parseFloat(e.fontSize)||16,a=Number.parseFloat(e.lineHeight),r=Number.parseFloat(e.letterSpacing),n=Number.parseFloat(e.paddingTop),s=Number.parseFloat(e.maxWidth);return{fontKey:o,sizePx:t,weight:mA(Number.parseInt(e.fontWeight,10)),lineRatio:Number.isFinite(a)?da(a/t,3):1.2,letterEm:Number.isFinite(r)?da(r/t,4):0,align:xA(e.textAlign),case:nA(e.textTransform),paddingPx:Number.isFinite(n)?Math.round(n):0,widthPx:Number.isFinite(s)&&s<it?Math.round(s):it}}function mA(e){return Number.isFinite(e)?zL.reduce((o,t)=>Math.abs(t-e)<Math.abs(o-e)?t:o):400}function xA(e){for(let o of jI)if(o===e)return o;return e==="end"?"right":"left"}function dK(e,o){let t=GI(e);if(!t)return"";for(let a of Qe)if(GI(o(a.cssVar))===t)return a.key;return""}var GI=e=>(e.split(",")[0]??"").replace(/["']/g,"").replace(/\s+/g," ").trim().toLowerCase();function hA(e){let o=Vt(e);return o?`var(${o.cssVar})`:""}function uK(e,o,t,a){return!o||zf(o)?.nodeId!==e?null:t.find(r=>a(r.getAttribute("class")))??t[0]??null}function pK(e,o,t=()=>rr,a=i=>i,r=yA,n=!1,s=()=>!1){let i=0;for(let{element:f,partId:d}of e){let p=zf(d)?.propKey;if(!p)continue;let x=a(p),m=Object.hasOwn(o,x)?ar(o[x])??{}:{},h=Il(uA(m,n),rr,{blockDrawsStyle:s(p)});ca(m.textStyle)?f.setAttribute?.(hl,m.textStyle):f.removeAttribute?.(hl);let b=$f.some(T=>f.style[T]),S=!1;for(let[T,F]of Object.entries(h))bA(f,T,F),F&&(S=!0);if(b||$f.some(T=>h[T]))for(let T of IA(f,r))for(let F of $f)T.style[F]=h[F]??"";S&&(i+=1)}return i}function IA(e,o){let t=fa(e.textContent??""),a=[],r=e;for(let n=0;n<gA&&o(r);n+=1){let s=r.parentElement;if(!s||fa(s.textContent??"")!==t)break;a.push(s),r=s}return a}var gA=8;function yA(e){let o=e;return typeof window>"u"||!o?.ownerDocument?!1:window.getComputedStyle(o).display==="inline"}var rr={fontKey:"",sizePx:16,weight:400,lineRatio:1,letterEm:0,align:"left",case:"none",paddingPx:0,widthPx:it};function bA(e,o,t){if(!o.startsWith("--")){e.style[o]=t;return}let a=e.style;typeof a.setProperty=="function"?t?a.setProperty(o,t):a.removeProperty?.(o):a[o]=t;let r=e;o===lr&&(t?r.setAttribute?.(UI,""):r.removeAttribute?.(UI))}var UI="data-sf-part-para",SA=Object.keys(Il({},rr)),jf=new Set(["color","overflowWrap",lr,"fontStyle"]),$f=SA.filter(e=>!jf.has(e));function mK(e,o,t,a=n=>n,r=()=>!1){let n=new Map;for(let f of e){let d=Nf(f.key,f.row);for(let p of f.texts){let x=n.get(p);x?(x.keys.add(f.key),x.partKeys.add(d)):n.set(p,{keys:new Set([f.key]),partKeys:new Set([d])})}}let s=new Map;for(let f of Object.keys(o)){if(!CA(f))continue;let d=ar(o[f])??{},p=Il(d,rr),x=zI(d),m=ca(d.textStyle)?d.textStyle:void 0;!Object.values(p).some(Boolean)&&!Object.keys(x).length&&!m||s.set(f,{stamp:$I(t,f),declarations:p,...Object.keys(x).length?{phone:x}:{},...m?{textStyle:m}:{}})}let i=new Map;for(let[f,{keys:d,partKeys:p}]of n){let x=p.size===1?[...p][0]:d.size===1?[...d][0]:null;if(!x)continue;let m=a(x);if(!Object.hasOwn(o,m))continue;let h=ar(o[m])??{},b=Il(h,rr,{blockDrawsStyle:r(x)}),S=zI(h),T=ca(h.textStyle)?h.textStyle:void 0;!Object.values(b).some(Boolean)&&!Object.keys(S).length&&!T||i.set(f,{stamp:$I(t,x),declarations:b,...Object.keys(S).length?{phone:S}:{},...T?{textStyle:T}:{}})}return i.size||s.size?{rules:i,kindRules:s,drawn:new Set(n.keys())}:null}function CA(e){return e.startsWith("@")}function xK(e,o){return e?.kindRules.get(o)??null}function $I(e,o){let t=a=>a.replace(/[^A-Za-z0-9_-]+/g,"-");return`${t(e)}~${t(o)}`}function hK(e){let o=[],t=new Set,a=r=>{let{stamp:n,declarations:s}=r;if(t.has(n))return;t.add(n);let i=Object.entries(s).filter(([,h])=>h!==""),f=h=>h.map(([b,S])=>`${vA(b)}: ${S}`).join("; "),d=`[${ML}="${n}"]`,p=i.filter(([h])=>!jf.has(h)),x=i.filter(([h])=>jf.has(h));p.length&&o.push(`${d}, *:has(> ${d}) { ${f(p)} }`),x.length&&o.push(`${d} { ${f(x)} }`),s[lr]&&o.push(...wA(d));let m=Object.entries(r.phone??{}).filter(([,h])=>h!=="");m.length&&o.push(`@media ${On} { ${d}, *:has(> ${d}) { ${f(m)} } }`)};for(let r of e.rules.values())a(r);for(let r of e.kindRules.values())a(r);return o.join(`
|
|
4
|
+
`)}function wA(e){let o=`var(${lr})`,t=":is([data-sf-bullet], [data-sf-number])";return[`${e} br:not(br + br) { display: block; content: ""; margin-top: ${o} }`,`${e} ${t}:not(:first-child) { margin-top: ${o} }`,`${e} ${t}:not(:last-child) { margin-bottom: ${o} }`]}var vA=e=>e.replace(/[A-Z]/g,o=>`-${o.toLowerCase()}`);function IK(e,o){if(!e)return null;let t=fa(o),a=e.rules.get(t);if(a)return a;if(t.length<kA||e.drawn.has(t))return null;let r=null;for(let[n,s]of e.rules)if(n.includes(t)){if(r&&r.stamp!==s.stamp)return null;r=s}return r}var kA=8;function QI(e){switch(e.id){case"heading-1":return"font-display";case"heading-2":return"font-heading2";case"heading-3":return"font-heading3";case"body-1":return"font-body";case"body-5":return"font-mono";default:return`font-${e.id}`}}var Qf=e=>e==="sentence"?"none":void 0,og=["font","color","size","sizePhone","weight","italic","lineHeight","letterSpacing","paragraphSpacing","letterCase","largestSize"];function Eo(e){let o={};for(let t of og)e[t]!==void 0&&(o[t]=e[t]);return o}function ec(e,o){let{auto:t,...a}=e,r=new Set(o??[]),n=og.filter(s=>r.has(s)&&e.values[s]===void 0);return n.length?{...a,auto:n}:a}function tg(e){let o=e.fonts,t=e.sizes,a=e.typography,r=Nu(e.compression),n={"heading-1":{font:ne(o.heading),size:ee(t.headingLarge),weight:ee(a.weight),lineHeight:r.lineHeight,letterSpacing:r.letterSpacing,letterCase:Qf(a.case),largestSize:ee(a.maxPx)},"heading-2":{font:ne(o.heading2),size:ee(t.headingMedium),weight:ee(a.weight2),lineHeight:r.lineHeight,letterSpacing:r.letterSpacing,letterCase:Qf(a.case2)},"heading-3":{font:ne(o.heading3),size:ee(t.headingSmall),weight:ee(a.weight3),lineHeight:r.lineHeight,letterSpacing:r.letterSpacing,letterCase:Qf(a.case3)},"body-1":{font:ne(o.body),size:ee(t.body)},"body-5":{font:ne(o.label),size:ee(t.label)}};return eg().map(({id:s,kind:i,name:f})=>({id:s,kind:i,name:f,values:Eo(n[s]??{})}))}function oc(e){return Array.isArray(e)&&e.every(o=>o&&typeof o=="object"&&typeof o.id=="string"&&(o.kind==="heading"||o.kind==="body")&&typeof o.name=="string")?e.map(o=>ec({...o,values:Eo(o.values??{})},Array.isArray(o.auto)?o.auto:void 0)):null}function EK(e){return oc(e)??[]}function ag(e){return oc(e)??eg().map(({id:o,kind:t,name:a})=>({id:o,kind:t,name:a,values:{}}))}function ft(e,o){let t=tg(o),a=oc(e);return a?a.map(r=>{let n={...Jf(t,r.id)};for(let s of r.auto??[])delete n[s];return{...r,values:Eo({...n,...r.values})}}):t}var Jf=(e,o)=>e.find(t=>t.id===o)?.values??{},JI=["heading-1","heading-2","heading-3"];function rg({saved:e,old:o,cur:t,next:a,sizeOf:r}){let n=tg(o),s=ag(e),i=ft(s,o),f=[],d=a.map(x=>{let m=t.find(g=>g.id===x.id),h=s.find(g=>g.id===x.id);if(!m||!h)return PA([x],r)[0];let b={...h.values},S=new Set(h.auto??[]),T=x.values,F=m.values,C=[...new Set([...Object.keys(T),...Object.keys(F)])].filter(g=>JSON.stringify(T[g])!==JSON.stringify(F[g]));C.sort((g,I)=>+(g==="letterSpacing")-+(I==="letterSpacing"));for(let g of C){let I=g==="lineSpacing"?"lineHeight":g,P=T[g];if(P===void 0){delete b[I],Jf(n,x.id)[I]!==void 0&&(f.push([x.id,I]),S.add(I));continue}if(S.delete(I),g==="lineSpacing")b.lineHeight=pa(P/100,3);else if(g==="letterSpacing"){let E=i.find(A=>A.id===x.id),k=r({...x,values:Eo({...E?.values??{},...b})});b.letterSpacing=k?pa(P/k,4):0}else b[I]=P}return ec({id:x.id,kind:x.kind,name:x.name,values:Eo(b)},S)}),p=o.compression;if(f.some(([x,m])=>(m==="lineHeight"||m==="letterSpacing")&&JI.includes(x))&&It(p)!=="normal"){for(let x of JI){let m=d.find(b=>b.id===x);if(!m)continue;let h={...m.values};for(let b of["lineHeight","letterSpacing"])f.some(([S,T])=>S===x&&T===b)||h[b]===void 0&&!(m.auto??[]).includes(b)&&(h[b]=Jf(n,x)[b]);m.values=Eo(h)}p="normal"}return{saved:d,old:{...o,compression:p}}}function ng(e,o){let t={text_styles:e.saved};return e.old.compression!==o.compression&&(t.heading_compression=It(e.old.compression)),t}var pa=(e,o)=>Number(e.toFixed(o));function lg(e,o){return e.map(t=>{let{lineHeight:a,letterSpacing:r,...n}=t.values,s={...n};return a!==void 0&&(s.lineSpacing=pa(a*100,1)),r!==void 0&&(s.letterSpacing=pa(r*o(t),2)),{id:t.id,kind:t.kind,name:t.name,values:s}})}function PA(e,o){return e.map(t=>{let{lineSpacing:a,letterSpacing:r,...n}=t.values,s={id:t.id,kind:t.kind,name:t.name,values:Eo({...n})},i={...s.values};if(a!==void 0&&(i.lineHeight=pa(a/100,3)),r!==void 0){let f=o({...s,values:{...s.values}});i.letterSpacing=f?pa(r/f,4):0}return{...s,values:Eo(i)}})}function FK(e){let o={fonts:Ba({heading:e.heading_font??void 0,heading2:e.heading_2_font??void 0,heading3:e.heading_3_font??void 0,body:e.body_font??void 0,accent:e.accent_font??void 0,label:e.label_font??void 0}),sizes:_s({headingLarge:e.heading_size_large_px,headingMedium:e.heading_size_medium_px,headingSmall:e.heading_size_small_px,accent:e.accent_size_px,body:e.body_size_px,label:e.label_size_px}),compression:It(e.heading_compression),typography:Hu(e)},t=e.text_styles??null,a=Array.isArray(t)?tc(ft(t,o),o):o;return{fonts:Ba(a.fonts),sizes:_s(a.sizes),compression:It(a.compression),typography:a.typography,textStyles:t}}function tc(e,o){let t=m=>e.find(h=>h.id===m)?.values??{},a=t("heading-1"),r=t("heading-2"),n=t("heading-3"),s=t("body-1"),i=t("body-5"),f=o.fonts,d=o.sizes,p=o.typography,x=m=>m==="none"?"sentence":"authored";return{fonts:{...f,heading:a.font??f.heading,heading2:r.font??a.font??f.heading2,heading3:n.font??a.font??f.heading3,body:s.font??f.body,label:i.font??f.label},sizes:{...d,headingLarge:a.size??null,headingMedium:r.size??null,headingSmall:n.size??null,body:s.size??null,label:i.size??null},compression:o.compression,typography:{...p,case:x(a.letterCase),weight:a.weight??null,maxPx:a.largestSize??null,weight2:r.weight??null,weight3:n.weight??null,case2:x(r.letterCase),case3:x(n.letterCase)}}}function EA(e){return e==="accent"?"var(--accent)":e==="text"?"var(--fg)":e==="labels"?"var(--fg-dim)":/^#[0-9a-f]{6}$/i.test(e)?e:null}function FA(e){let o=":is([data-sf-bullet], [data-sf-number])";return[`${e} br:not(br + br) { display: block; content: ""; margin-top: var(--sf-part-para) }`,`${e} ${o}:not(:first-child) { margin-top: var(--sf-part-para) }`,`${e} ${o}:not(:last-child) { margin-bottom: var(--sf-part-para) }`]}function OK(e){let o=[];for(let t of e){let a=t.values,r=`.${QI(t)}`,n=`[${hl}="${t.id}"]`,s=`${r}, ${n}`,i=[],f=a.font!==void 0?Qe.find(m=>m.key===a.font)?.cssVar:void 0;if(f&&i.push(`font-family: var(${f})`),a.size!==void 0){let m=a.largestSize!==void 0?Math.min(a.size,a.largestSize):a.size;i.push(`font-size: ${m}px`)}let d=a.color!==void 0?EA(a.color):null;d&&i.push(`color: ${d}`),a.italic===!0&&i.push("font-style: italic"),a.weight!==void 0&&i.push(`font-weight: ${a.weight}`);let p=[];a.lineHeight!==void 0&&p.push(`line-height: ${a.lineHeight}`),a.letterSpacing!==void 0&&p.push(`letter-spacing: ${a.letterSpacing}em`),t.kind==="body"&&i.push(...p);let x=TA(a.letterCase);if(x&&t.kind==="body"&&i.push(`text-transform: ${x}`),a.paragraphSpacing&&i.push(`--sf-part-para: ${a.paragraphSpacing}px`),i.length&&o.push(`${s} { ${i.join("; ")} }`),t.kind==="heading"&&p.length&&o.push(`${s}, ${r}:is(h1, h2, h3, h4), ${n}:is(h1, h2, h3, h4) { ${p.join("; ")} }`),t.kind==="heading"&&x&&o.push(`${n}, ${r}:is(h1, h2, h3, h4) { text-transform: ${x} }`),a.paragraphSpacing&&o.push(...FA(`:is(${s})`)),a.sizePhone!==void 0){let m=OA[t.id],h=[`${s} { font-size: ${a.sizePhone}px }`];m&&h.push(`.sf-themed-content { --size-${m}: ${a.sizePhone}px !important }`),o.push(`@media ${On} { ${h.join(" ")} }`)}}return o.join(`
|
|
5
|
+
`)}var OA={"heading-1":"headingLarge","heading-2":"headingMedium","heading-3":"headingSmall","body-1":"body","body-5":"label"};function LK(e){return e!==!0&&e!==!1?"":`em.text-accent { font-style: ${e?"italic":"normal"} }`}function sg(e){return e?gl[e]:void 0}function ac(e){let o=nr(e);return Eo({font:e.font,color:e.color,size:e.size,weight:e.weight,italic:e.italic,lineHeight:o.lineHeight,letterSpacing:o.letterSpacingEm,paragraphSpacing:e.paragraphSpacing,letterCase:e.case})}function ig(e){return Object.keys(ac(e)).length>0}function fg({saved:e,old:o,styleId:t,values:a}){let r=ag(e);return{saved:LA(r,t,a),old:o}}function LA(e,o,t){return e.map(a=>a.id===o?ec({...a,values:Eo({...a.values,...t})},a.auto):a)}var cg=["font","color","size","weight","emphasis","lineSpacing","letterSpacing","paragraphSpacing","letterCase","largestSize"],DA=["size","lineSpacing","letterSpacing","letterCase"],NA=500,rc=Qe.map(e=>({value:e.key,label:e.label,family:`var(${e.cssVar})`,italic:e.italicLoaded}));function dg({saved:e,old:o,colours:t,sizeOf:a,onChange:r,openId:n,onOpenChange:s,readOnly:i=!1,withoutSize:f=!1}){let[d,p]=RA(null),x=_A()==="mobile",m=ft(e,o),h=lg(m,a);return AA(BA,{styles:h,onChange:b=>r(rg({saved:e,old:o,cur:h,next:b,sizeOf:a})),fonts:rc,colours:t,settings:f?cg.filter(b=>b!=="size"):cg,auto:DA,openId:n===void 0?d:n,onOpenChange:s??p,readOnly:i,device:x?"phone":"desktop",fallback:b=>{let S=m.find(F=>F.id===(b.kind==="heading"?"heading-1":"body-1")),T={};return S?.values.font&&b.id!==S.id&&(T.font=S.values.font),b.kind==="heading"&&(T.weight=NA),T}})}var pg=["font","size","weight","emphasis"],WA=500;function zA({font:e,size:o,weight:t,italic:a}){let r={font:e};return o!==null&&(r.size=o),t!==null&&(r.weight=t),a!==null&&(r.italic=a),{id:"accent",kind:"heading",name:l("Accent"),values:r}}function GA(e,o){let t=[],a=e.values,r=o.values;return r.font!==a.font&&r.font!==void 0&&t.push({key:"font",value:r.font}),r.size!==a.size&&t.push({key:"size",value:r.size??null}),r.weight!==a.weight&&t.push({key:"weight",value:r.weight??null}),r.italic!==a.italic&&t.push({key:"italic",value:r.italic??null}),t}function mg(e){let{headingWeight:o,open:t,onOpenChange:a,onChange:r,withoutSize:n=!1}=e,s=zA(e);return ug(HA,{label:l("Accent"),children:ug(MA,{style:s,fonts:rc,settings:n?pg.filter(i=>i!=="size"):pg,auto:["size"],fallback:()=>({weight:o??WA}),open:t,onOpenChange:a,onChange:i=>GA(s,i).forEach(r)})})}import{EmptyState as vR,Tabs as kR,Tooltip as aY,tabButtonId as TR,tabPanelId as PR}from"efficient-shell/ui";import{ContrastIcon as ER,NoteIcon as FR,SettingsIcon as OR,TypeIcon as LR}from"efficient-easel/icons";function xg(e){switch(e.status){case"saved":return null;case"failed":return{msg:l("Not saved. Try again."),tone:"error"};case"skipped":switch(e.reason){case"empty":return null;case"no-token":return{msg:l("Not saved. Reload the page."),tone:"error"};case"template":return{msg:l("Templates keep their look. Press Done."),tone:"success"}}}}import{jsx as pc}from"react/jsx-runtime";import{ListIcon as uR,PaddingTopIcon as pR}from"efficient-easel/icons";import{jsx as bl}from"react/jsx-runtime";import{SettingsDefaultReset as UA,SettingsField as $A,SettingsSegmented as qA}from"efficient-easel/panel";import{WidthIcon as jA}from"efficient-easel/icons";function hg({value:e,resolved:o,onChange:t,label:a="Width",labelId:r,followsLabel:n,hint:s}){let i=e===void 0,f=i?o:e,d=l(a);return bl($A,{label:d,labelId:r,icon:bl(jA,{}),value:i?n:void 0,changed:!i,action:bl(UA,{words:X()?.panel,label:d,changed:!i,onReset:()=>t(void 0)}),hint:s,children:bl(qA,{options:[{label:l(Ho.full),id:"full"},{label:l(Ho.page),id:"content"}],value:f,ariaLabel:d,onChange:t})})}var Bt="product",Sl="recordType",KA={key:Bt,label:"Product",fields:[]},VA=/^[a-z][a-z0-9]*(-[a-z0-9]+)*$/,YA=/^[a-z][A-Za-z0-9]*$/,XA=["text","date"],Ig=new Map,gg=0;function ZA(e){if(typeof e.key!="string"||!VA.test(e.key))throw new Error(`A record type key is lower-case words joined by hyphens, not ${JSON.stringify(e.key)}.`);if(e.key===Bt)throw new Error("The product record type is the builder's own and is not declared by a host.");if(typeof e.label!="string"||!e.label.trim())throw new Error(`The record type ${e.key} has no label.`);let o=new Set;for(let t of e.fields){if(typeof t.key!="string"||!YA.test(t.key)||o.has(t.key))throw new Error(`The record type ${e.key} has a field key it cannot use: ${JSON.stringify(t.key)}.`);if(!XA.includes(t.kind))throw new Error(`The field ${t.key} of ${e.key} has no kind ${JSON.stringify(t.kind)}.`);o.add(t.key)}return{key:e.key,label:e.label.trim(),fields:e.fields.map(t=>({...t}))}}function JK(e){let o=e.map(ZA);for(let t of o)Ig.set(t.key,t);o.length&&(gg+=1)}function nc(){return[KA,...Ig.values()]}function lc(){return gg}function sc(e){let o=e?.[Sl];return typeof o!="string"?Bt:o.trim()||Bt}function ic(e){return sc(e)===Bt}var fc="product",QA="tyre";var JA="productType",eR={[fc]:"alloy-wheel",[QA]:"tyre"},oR=["alloy-wheel","tyre"];function yg(e,o){return ic(o)?tR(o)??eR[e]??null:null}function tR(e){if(!ic(e))return null;let o=e?.[JA];return typeof o=="string"&&oR.includes(o)?o:null}var Cl=null,bg=null;function aR(e,o){Cl=e,bg=o}function rV(e){aR(e,null)}function nV(){return Cl}function wl(){return bg==="dynamic"||Cl===fc}function lV(e){return yg(Cl??"",e)??"alloy-wheel"}import{HEADER_TYPE as cc,FOOTER_TYPE as rR}from"efficient-easel/draw";var nR=new Set(["Hero","HeroSingle","IntroBleed"]),Sg={min:56,max:140,default:88},fV={min:0,max:120,step:2,default:32},cV=`var(--sf-header-h, ${Sg.default}px)`,lR="--sf-header-set-h",dV="--sf-header-h",uV=`var(${lR}, ${Sg.default}px)`,pV="sf-header-clearance",mV="sf-sticky-underheader";function sR(e){return e?.find(o=>o?.type&&o.type!==cc)??null}function Cg(e){let o=sR(e)?.type;return!o||!nR.has(o)}function xV(e){return!Cg(e)}function hV(e){return!!e?.some(o=>o?.type===cc)}function IV(e){return!e||e.length===0?!1:!e.some(o=>o?.type===cc||o?.type===rR)}var iR=["auto","shared","own"],dc="auto",fR="topSpace",gV="data-top-space";function cR(e){return iR.includes(e)?e:dc}function dR(e,o){let t=cR(e?.props?.[fR]);return t==="own"?!0:t==="shared"?!1:Cg(o)}function yV(e,o){return dR(e,o)?"own":null}function mR(){return{type:"custom",render:({value:e,onChange:o})=>pc(hg,{value:e==="full"?"full":e==="content"?"content":void 0,resolved:"content",label:"Page width",followsLabel:l("Follows the site"),hint:l("Whether this page sits on the site's content column, or runs edge to edge."),onChange:t=>o(t)})}}var xR=[{label:"Auto",value:"auto"},{label:"Shared",value:"shared"},{label:"Its own",value:"own"}],FV={pageBackground:Yh(),topSpace:ao("Top space",pc(pR,{}),xR,dc),widthChoice:mR()},sr=["pageBackground","topSpace","widthChoice"],hR="Record type",uc=new Map,wg=-1;function IR(e){wg!==lc()&&(uc.clear(),wg=lc());let o=nc(),t=o.some(r=>r.key===e)?"":e,a=uc.get(t);return a||(a=ao(hR,pc(uR,{}),[...o.map(r=>({label:r.label,value:r.key})),...t?[{label:t,value:t}]:[]],Bt),uc.set(t,a)),a}var vg=new WeakMap;function OV(e,o){if(!wl()||nc().length<2||Sl in e)return e;let t=IR(sc(o)),a=vg.get(e);if(a&&a.row===t)return a.fields;let r={[Sl]:t,...e};return vg.set(e,{row:t,fields:r}),r}import{previewFrame as AR}from"efficient-easel/screen/lib/document/preview-dom";import{useEasel as gR}from"efficient-easel/easel";function vl({themeFromDocument:e,persist:o}){let{appState:t,dispatch:a}=gR(k=>k),{fonts:r,setFonts:n,sizes:s,setSizes:i,headingCompression:f,setHeadingCompression:d,headingTypography:p,setHeadingTypography:x,textStyles:m,setTextStyles:h}=K(),b=t.data,S=b.root?.props??{},T=e?Ba(S.fonts):r,F=e?Lu:s,C=e?It(S.headingCompression):f,g=e?Mu(S.headingTypography):p,I={fonts:T,sizes:F,compression:C,typography:g},P=e?S.textStyles:m,E=k=>a({type:"replaceRoot",root:{...b.root,props:{...S,...k}},recordHistory:!0});return{fonts:T,sizes:F,compression:C,typography:g,old:I,saved:P,write:(k,A)=>{let B=tc(ft(k.saved,k.old),k.old);e?E({textStyles:k.saved,fonts:B.fonts,headingCompression:B.compression,headingTypography:B.typography}):(h(k.saved),n(B.fonts),i(B.sizes),d(B.compression),x(B.typography)),o(ng(k,I),A)},writeRoot:E}}var xc="sf-site-styles",RR="sf-site-styles-tabpanel",hc=!1,BR="Show hints";function Ic({shown:e,onChange:o}){return Z("div",{className:"sf-hints",children:ct("button",{type:"button","aria-pressed":e,onClick:()=>o(!e),className:`sf-rung sf-hints-toggle${e?" is-active":""}`,children:[Z(FR,{size:13}),l(BR)]})})}var Pg="text",xa="basics",kg="this-page-group",ma=[{id:xa,label:"Basics",icon:Z(OR,{})},{id:"theme",label:"Theme",icon:Z(ER,{})},{id:"text",label:"Text",icon:Z(LR,{})}];function _R({themeFromDocument:e,persist:o}){let{appState:t,dispatch:a}=Tg(d=>d),{theme:r,setTheme:n}=K(),s=t.data,i=s.root?.props??{},f=d=>{if(e){let p={...i,theme:d};a({type:"replaceRoot",root:{...s.root,props:p},recordHistory:!0})}else n(d);o({selected_preset:d.selected,theme_presets:d.themes})};return Z(iI,{value:e?i.theme:r,onChange:f})}function DR({themeFromDocument:e,persist:o}){let[t,a]=kl(null),{theme:r,setFonts:n,setSizes:s,setHeadingTypography:i}=K(),f=vl({themeFromDocument:e,persist:o}),{old:d,saved:p,writeRoot:x}=f,m=f.fonts,h=f.sizes,b=f.typography,S=E=>E.values.size??zR(MR[E.id]??"body")??HR[E.kind],T=E=>f.write(E),F=NR(r),C=E=>{let k={...m,accent:E};e?x({fonts:k}):n(k),o({accent_font:E})},g=E=>{s({...h,accent:E}),o({accent_size_px:E})},I=E=>{let k={...b,weightStrong:E};e?x({headingTypography:k}):i(k),o({heading_weight_strong:E})},P=E=>{let k={...b,italicStrong:E};e?x({headingTypography:k}):i(k),o({accent_italic:E})};return ct(_t,{children:[Z(dg,{saved:p,old:d,colours:F,sizeOf:S,onChange:T,openId:t===mc?null:t,onOpenChange:a,withoutSize:e}),Z(mg,{font:m.accent,size:h.accent,weight:b.weightStrong,italic:b.italicStrong,headingWeight:b.weight,open:t===mc,onOpenChange:E=>a(E?mc:null),onChange:E=>{E.key==="font"?C(E.value):E.key==="size"?g(E.value):E.key==="weight"?I(E.value):P(E.value)},withoutSize:e})]})}var mc="accent";function NR(e){let o=Vo(e);return[{key:"accent",name:l("Accent"),value:o.accent},{key:"text",name:l("Text"),value:o.text},{key:"labels",name:l("Labels"),value:o.muted??o.text}]}var MR={"heading-1":"heading","heading-2":"heading2","heading-3":"heading3","body-1":"body","body-5":"label"},HR={heading:32,body:14},WR={heading:"main h1, main h2",heading2:"main h1, main h2",heading3:"main h1, main h2",accent:"main h1 em, main h2 em",body:"main p",label:"main .mono-eyebrow"};function zR(e){if(typeof document>"u")return null;let o=(AR()?.contentDocument??document).querySelector(WR[e]);if(!o)return null;let t=parseFloat(getComputedStyle(o).fontSize);return Number.isFinite(t)?t:null}function GR({themeFromDocument:e,persist:o,showHint:t}){let{appState:a,dispatch:r}=Tg(m=>m),{cornerRadiusPx:n,setCornerRadiusPx:s}=K(),i=a.data,f=i.root?.props??{},d=f.cornerRadiusPx===void 0?Ru[Au(f.cornerStyle)]:bo(f.cornerRadiusPx),p=e?d:n,x=m=>r({type:"replaceRoot",root:{...i.root,props:{...f,...m}},recordHistory:!0});return Z(fI,{value:p,onChange:m=>{e?x({cornerRadiusPx:m}):s(m),o({corner_radius_px:m})},showHint:t})}function UR(e){return{site_width:e}}function $R({persist:e,showHint:o}){let{siteWidth:t,setSiteWidth:a,sectionBackgroundWidth:r,setSectionBackgroundWidth:n,sectionContentWidth:s,setSectionContentWidth:i}=K(),f=typeof t=="number"?t:xe.default,d=m=>{a(m),e(UR(m),m===null)},p=m=>{n(m),e({section_background_width:m},!0)},x=m=>{i(m),e({section_content_width:m},!0)};return ct(_t,{children:[Z(sl,{value:r??"full",changed:r!==null,detail:l("Full width"),onChange:p,onReset:()=>p(null),hint:o?SI:void 0}),Z(il,{mode:s??"content",px:f,min:xe.min,max:xe.max,changed:typeof t=="number"||s!==null,detail:`${l("Content width")} ${xe.default}px`,onMode:x,onPx:m=>d(m),onReset:()=>{x(null),d(null)},hint:o?CI:void 0})]})}function qR(e){return{block_gap:e}}function jR(e){return{site_gutter:e}}function KR({persist:e,showHint:o}){let{siteGutter:t,setSiteGutter:a}=K();return Z(gI,{value:t,onChange:r=>{a(r),e(jR(r),r===null)},showHint:o})}function VR({persist:e,showHint:o}){let{blockGap:t,setBlockGap:a}=K();return Z(pI,{value:t,onChange:r=>{a(r),e(qR(r),r===null)},showHint:o})}function YR({persist:e,showHint:o=!0}){return ct(_t,{children:[Z($R,{persist:e,showHint:o}),Z(KR,{persist:e,showHint:o}),Z(VR,{persist:e,showHint:o})]})}function XR(e){return{card_shadow:e}}function ZR(e){return e===null?{shadow_color:null}:{shadow_color:Du(e)}}function QR(e){return{hover_effect:e}}function JR({persist:e,showHint:o=!0}){let{cardShadow:t,setCardShadow:a,shadowColor:r,setShadowColor:n,hoverEffect:s,setHoverEffect:i}=K();return ct(_t,{children:[Z(cI,{value:t,onChange:f=>{a(f),e(XR(f),!0)},showHint:o}),Z(uI,{value:r,onChange:f=>{n(f),e(ZR(f),f===null)},showHint:o}),Z(mI,{value:s,onChange:f=>{i(f),e(QR(f),!0)},showHint:o})]})}function eB(e){return{photography_grayscale:e}}function oB({persist:e,showHint:o}){let{photographyGrayscale:t,setPhotographyGrayscale:a}=K();return Z(hI,{value:t,onChange:r=>{a(r),e(eB(r),!0)},showHint:o})}function tB({persist:e,showHint:o=!0}){return Z(_t,{children:Z(oB,{persist:e,showHint:o})})}function aB(e){return{share_button_on_posts:e}}function rB({persist:e,showHint:o=!0}){let{shareButtonOnPosts:t,setShareButtonOnPosts:a}=K();return Z(II,{value:t,onChange:r=>{a(r),e(aB(r),!0)},showHint:o})}function ha(){let{websiteName:e}=K();return e?.trim()||zu}function Tl({themeFromDocument:e=!1,tokenRef:o,siteId:t,onNotify:a,tab:r,onTabChange:n,initialTab:s,revealPageGroup:i=!1,onPageGroupRevealed:f}){let{persist:d}=Jt({themeFromDocument:e,tokenRef:o,siteId:t,onResult:C=>{let g=xg(C);g&&a?.(g.msg,g.tone)}}),[p,x]=kl(s??ma[0].id),m=r!==void 0,h=m?r:p,b=m?n??(()=>{}):x,S=ma.find(C=>C.id===h)??ma[0],[T,F]=kl(hc);return ct(_t,{children:[Z(sB,{activeId:S.id,onSelect:b}),ct("div",{id:PR(xc,S.id),className:RR,role:"tabpanel","aria-labelledby":TR(xc,S.id),children:[h===xa&&ct(_t,{children:[Z(GR,{themeFromDocument:e,persist:d,showHint:T}),!e&&Z(JR,{persist:d,showHint:T}),!e&&Z(YR,{persist:d,showHint:T}),!e&&Z(tB,{persist:d,showHint:T}),!e&&Z(rB,{persist:d,showHint:T}),Z(nB,{reveal:i,onRevealed:f}),Z(Ic,{shown:T,onChange:F})]}),h==="theme"&&Z(_R,{themeFromDocument:e,persist:d}),h==="text"&&Z(DR,{themeFromDocument:e,persist:d})]})]})}function nB({reveal:e,onRevealed:o}){let[t,a]=kl(!0),r=wR(o);return r.current=o,CR(()=>{if(!e)return;a(!0);let n=requestAnimationFrame(()=>{document.getElementById(kg)?.scrollIntoView({block:"start"}),r.current?.()});return()=>cancelAnimationFrame(n)},[e]),Z(SR,{title:l("This page"),open:t,onToggle:a,id:kg,children:Z(lB,{})})}function lB(){let{fields:e,values:o,readOnly:t,onChange:a}=yR(),r=Object.fromEntries(sr.filter(n=>n in e).map(n=>[n,e[n]]));return Object.keys(r).length===0?Z(vR,{variant:"none",icon:!1,message:l("This page has no look of its own to set.")}):Z(bR,{fields:r,values:o,onChange:a,readOnly:t,tabs:!1,idPrefix:"this-page",ariaLabel:l("This page")})}function sB({activeId:e,onSelect:o}){return Z("div",{className:"es-insp-tabs",children:Z(kR,{variant:"underline",block:!0,labelsFit:!0,"aria-label":l("Styles"),idPrefix:xc,value:e,onChange:o,items:ma.map(t=>{let a=l(t.label);return{id:t.id,icon:t.icon,label:a}})})})}import{InspectorIconButton as PB}from"efficient-easel/chrome";import{Button as Kg,Dialog as EB,FormField as FB,Input as Vg,PopupMenu as OB,PopupMenuItem as Yg,toast as Xg}from"efficient-shell/ui";import{LayersTree as LB,TreeGroupLabel as AB,TreeRow as Zg,TreeRowAction as Ll}from"efficient-easel/tree";import{AddIcon as RB,DuplicateIcon as BB,PageIcon as _B,SettingsIcon as DB}from"efficient-easel/icons";import{PagesIcon as NB}from"efficient-easel/rail";import{useEaselHost as MB}from"efficient-easel/screen/lib/host";var gc="Main Pages",iB="Dynamic Pages",yc="dynamic",fB="dynamic";function ir(e){return e.kind===fB}function Eg(e){let o=[],t=[];for(let a of e){if(ir(a)){t.push(a);continue}let r=a.groupKey??(a.group?`folder:${a.group}`:"top"),n=o[o.length-1];n&&n.key===r?n.rows.push(a):o.push({key:r,label:a.group??gc,rows:[a]})}if(t.length){let a=o.findIndex(r=>r.key.startsWith("system:"));o.splice(a===-1?o.length:a,0,{key:yc,label:iB,rows:t})}return o}import{useEaselSession as HB}from"efficient-easel/screen/lib/session-context";import{useCallback as Pl,useEffect as cB,useSyncExternalStore as dB}from"react";import{useScreenDocument as Ag}from"efficient-easel/screen/components/ScreenDocumentContext";var Fg=new WeakMap;function fr(e){let o=Fg.get(e);return o||(o={rows:null,loading:null,listeners:new Set},Fg.set(e,o)),o}function bc(e,o){e.rows=o;for(let t of e.listeners)t()}var El=new Set;function Fl(e,o){o?El.add(e):El.delete(e)}function Og(e){let o=fr(e),t=e.listPages().then(a=>bc(o,El.size?a.filter(r=>!El.has(r.id)):a),()=>bc(o,[])).finally(()=>{o.loading===t&&(o.loading=null)});return o.loading=t,t}var Lg=()=>null,uB=()=>()=>{};function cr(){let{adapter:e,ready:o}=Ag(),t=Pl(i=>{let{listeners:f}=fr(e);return f.add(i),()=>f.delete(i)},[e]),a=Pl(()=>fr(e).rows,[e]),r=dB(o?t:uB,o?a:Lg,Lg);cB(()=>{if(!o)return;let i=fr(e);i.rows===null&&!i.loading&&Og(e)},[e,o]);let n=Pl(()=>o?Og(e):Promise.resolve(),[e,o]),s=Pl(i=>bc(fr(e),i),[e]);return{rows:r,reload:n,setRows:s,getRows:a}}function pB(e,o){return e?.find(t=>t.slug===o)?.label?.trim()||`/${o}`}function Rg(){let{currentSlug:e}=Ag(),{rows:o}=cr();return pB(o,e)}import{useEaselSession as mB}from"efficient-easel/screen/lib/session-context";import{useScreenDocument as xB}from"efficient-easel/screen/components/ScreenDocumentContext";import{slugify as hB}from"efficient-shell/format";var IB=new Set(["normal","dynamic"]);function Bg(e){return!e.kind||IB.has(e.kind)}function Ol(e,o){let t=hB(e)||"page";if(!o.has(t))return t;let a=2;for(;o.has(`${t}-${a}`);)a+=1;return`${t}-${a}`}function _g(e,o){return o.has(e)}function Dg(e,o){return{title:`${e.label||e.slug} copy`,slug:Ol(`${e.slug}-copy`,o)}}function Ng(){let e=mB(),{siteId:o,templateId:t}=xB(),a=Ce(e).pages;if(!(!a.duplicate||t))return(r,n)=>a.duplicate(r.id,{...n,...o?{siteId:o}:{}})}import{jsx as Dt,jsxs as Mg,Fragment as gB}from"react/jsx-runtime";import{useId as Hg,useState as Ia}from"react";import{Button as Wg,Dialog as yB,FormField as zg,Input as Gg,Stack as bB}from"efficient-shell/ui";import{slugify as Ug}from"efficient-shell/format";function $g({source:e,taken:o,duplicate:t,onClose:a,onDuplicated:r}){let n=Hg(),s=Hg(),[i,f]=Ia(null),[d,p]=Ia(""),[x,m]=Ia(""),[h,b]=Ia(!1),[S,T]=Ia(!1),[F,C]=Ia(null);if(e!==i&&(f(e),e)){let E=Dg(e,o);p(E.title),m(E.slug),b(!1),C(null)}let g=_g(x,o),I=!!(e&&d.trim()&&x&&!g&&!S),P=async()=>{if(!(!e||!I)){T(!0),C(null);try{let E=await t(e,{title:d.trim(),slug:x});r(E)}catch{C(l("Couldn\u2019t duplicate the page \u2014 please retry."))}finally{T(!1)}}};return Dt(yB,{open:e!==null,onClose:()=>{S||a()},size:"sm",title:l("Duplicate \u201C{name}\u201D",{name:e?.label??""}),description:l("The copy is a draft and stays hidden until you publish it. It opens in the editor."),footer:Mg(gB,{children:[Dt(Wg,{variant:"secondary",onClick:a,disabled:S,children:l("Cancel")}),Dt(Wg,{onClick:()=>{P()},disabled:!I,loading:S,children:l("Duplicate page")})]}),children:Mg(bB,{gap:4,children:[Dt(zg,{label:l("Title"),htmlFor:n,error:F??void 0,children:Dt(Gg,{id:n,value:d,invalid:!!F,onChange:E=>{p(E.target.value),h||m(Ug(E.target.value))},onKeyDown:E=>{E.key==="Enter"&&P()}})}),Dt(zg,{label:l("URL handle"),htmlFor:s,hint:g?void 0:l("URL: /{slug}",{slug:x}),error:g?l("Another page uses this URL handle."):void 0,children:Dt(Gg,{id:s,value:x,invalid:g,onChange:E=>{b(!0),m(Ug(E.target.value))},onKeyDown:E=>{E.key==="Enter"&&P()}})})]})})}var Qg="sf-editor-pages-collapsed-groups";function Jg({onNavigate:e,onClose:o,activeSurface:t,onPreviewSurface:a}){let r=HB().chrome?.pageRows,n=MB(),{adapter:s,capabilities:i,ready:f,currentSlug:d}=kB(),p=ha(),{rows:x,reload:m,setRows:h,getRows:b}=cr(),[S,T]=dt(""),[F,C]=dt(!1),[g,I]=dt(null),[P,E]=dt(!1),[k,A]=dt(""),B=wB(),H=Ng(),[v,O]=dt(null),[N,_]=dt(()=>{if(typeof window>"u")return new Set;try{let R=window.localStorage.getItem(Qg);return new Set(R?JSON.parse(R):[])}catch{return new Set}});CB(()=>{try{window.localStorage.setItem(Qg,JSON.stringify([...N]))}catch{}},[N]);let M=R=>_(Y=>{let j=new Set(Y);return j.has(R)?j.delete(R):j.add(R),j}),q=jg(()=>Eg(x??[]),[x]),le=S.trim().toLowerCase(),Ye=R=>!le||R.toLowerCase().includes(le),co=R=>le?!0:!N.has(R),_e=jg(()=>new Set((x??[]).map(R=>R.slug)),[x]),uo=()=>{if(i.pageCreationInAdminForm){n.send("storefront-editor:new-page");return}A(""),I(null),E(!0)},Me=async()=>{let R=k.trim();if(!(!R||!f||F||!s.createPage)){C(!0),I(null);try{let Y=await s.createPage({slug:Ol(R,_e),title:R,layout:{}});await m(),E(!1),A(""),e(Y.slug)}catch{I(l("Couldn\u2019t add the page \u2014 please retry."))}finally{C(!1)}}},Ee=i.hasSiteSettings&&!!s.createPage,Ie=async()=>{if(!(!f||F||!s.createPage)){C(!0),I(null);try{let R=await s.createPage(ox(l("New popup"),_e));await m(),e(R.slug)}catch{I(l("Couldn\u2019t add the popup \u2014 please retry."))}finally{C(!1)}}},ye=vB(null),[He,Fe]=dt(null),po=()=>{if(!Ee)return uo();if(He)return Fe(null);let R=ye.current?.getBoundingClientRect();R&&Fe({top:R.bottom+6,right:Math.max(8,window.innerWidth-R.right)})},We=R=>{let Y=x??[],j=s.deletePage;if(!f||F||!j||Y.length<=1)return;let Oe=Y.findIndex(Le=>Le.id===R.id),Io=Y.filter(Le=>Le.id!==R.id),Ze=R.slug===d;Fl(R.id,!0),h(Io),I(null),Ze&&Io[0]&&e(Io[0].slug);let jt=()=>{Fl(R.id,!1);let Le=b()??[];if(Le.some(Xr=>Xr.id===R.id))return;let Ro=[...Le];Ro.splice(Math.max(0,Math.min(Oe,Ro.length)),0,R),h(Ro)};Xg.undoable(l("Deleted \u201C{name}\u201D",{name:R.label}),{actionLabel:l("Undo"),commit:async Le=>{await j(R.id,Le),Fl(R.id,!1)},undo:()=>{jt(),Ze&&e(R.slug)},onFail:()=>{jt(),Xg.error(l("Couldn\u2019t delete the page \u2014 please retry."))}})},$e=R=>n.send("storefront-editor:open-page",{slug:R}),mo=R=>{if(!Ye(R.label))return null;let Y=!t&&R.slug===d,j=i.canDeletePagesInline&&(x??[]).length>1,Oe=ir(R),Io=R.kind==="lightbox",Ze=[...Oe?[{label:l("Dynamic"),tone:"info"}]:[],...Io?[{label:l("Lightbox"),tone:"success"}]:[],...R.draft?[{label:l("draft"),tone:"draft"}]:[]],jt=Ze.length>0?Ze:void 0,Le=!!H&&Bg(R),Ro=Le||i.pageCreationInAdminForm||j?dr(qg,{children:[Le&&ae(Ll,{kind:"plain",label:l("Duplicate \u201C{name}\u201D",{name:R.label}),disabled:F,onClick:()=>O(R),children:ae(BB,{size:13})}),i.pageCreationInAdminForm&&ae(Ll,{kind:"plain",label:l("Page settings for \u201C{name}\u201D",{name:R.label}),onClick:()=>$e(R.slug),children:ae(DB,{size:13})}),j&&ae(Ll,{kind:"delete",label:l("Delete \u201C{name}\u201D",{name:R.label}),disabled:F,onClick:()=>We(R),children:ae(Sc,{name:"trash",size:13,strokeWidth:1.7,rounded:!0})})]}):void 0;return ae(Zg,{icon:ae(_B,{size:14}),name:R.label,selected:Y,onSelect:()=>e(R.slug),badge:jt,actions:Ro,rowProps:{"data-page-slug":R.slug}},R.id)},xo=(R,Y,j)=>{let Oe=j.filter(Boolean);if(Oe.length===0)return null;let Io=co(R);return dr(SB,{children:[ae(AB,{count:Oe.length,countLabel:Ae("{n} page","{n} pages",Oe.length),expanded:Io,onToggle:()=>M(R),children:Y}),Io&&Oe]},R)},Ao=(r?.rows??[]).filter(R=>Ye(R.label)).map(R=>{let Y=t===R.key;return ae(Zg,{icon:R.icon,name:R.label,selected:Y,onSelect:()=>a(R.key),badge:{label:l("Preview"),tone:"warning"},actions:ae(Ll,{kind:"plain",label:l("Open the {name} in a new tab",{name:R.label}),onClick:()=>window.open(R.href,"_blank","noopener,noreferrer"),children:ae(Sc,{name:"external-link",size:13,strokeWidth:1.7,rounded:!0})}),rowProps:{"data-shop-surface":R.key}},R.key)}),Xe=i.hasSiteSettings&&!!r,ho=(()=>{if(x===null)return null;let R=[],Y=!1;for(let j of q){Xe&&!Y&&j.key.startsWith("system:")&&(R.push(xo("shop",r.title,Ao)),Y=!0);let Oe=j.key===yc||j.label===gc?l(j.label):j.label;R.push(xo(j.key,Oe,j.rows.map(mo)))}return Xe&&!Y&&R.push(xo("shop",r.title,Ao)),R})();return dr("div",{className:"sf-pages",children:[ae(TB,{icon:ae(NB,{}),title:l("Pages"),context:p,actions:ae(PB,{buttonRef:ye,label:Ee?l("Add"):l("New page"),hasPopup:Ee?"menu":void 0,expanded:Ee?He!==null:void 0,onClick:po,children:ae(RB,{size:15})})}),He&&ae(OB,{portal:!0,style:{top:He.top,right:He.right},onClose:()=>Fe(null),children:dr("div",{role:"menu","aria-label":l("Add"),children:[ae(Yg,{role:"menuitem",onClick:()=>{Fe(null),uo()},children:l("Page")}),ae(Yg,{role:"menuitem",disabled:F,onClick:()=>{Fe(null),Ie()},children:l("Popup")})]})}),ae("div",{className:"sf-pages-find",children:ae(Vg,{type:"search",leftIcon:ae(Sc,{name:"search",size:14,rounded:!0}),placeholder:l("Search all pages\u2026"),value:S,onChange:R=>T(R.target.value),"aria-label":l("Search all pages")})}),g&&!P&&ae("div",{className:"sf-note sf-note--error",role:"alert",children:g}),ho===null?ae("div",{className:"sf-note",children:l("Loading\u2026")}):ho.some(Boolean)?ae(LB,{ariaLabel:l("Pages"),className:"sf-scroll",children:ho}):ae("div",{className:"sf-note",children:S.trim()?l("No pages match your search"):l("No pages yet. Add one with + above.")}),H&&ae($g,{source:v,taken:_e,duplicate:H,onClose:()=>O(null),onDuplicated:R=>{O(null),m(),e(R.slug)}}),ae(EB,{open:P,onClose:()=>E(!1),size:"sm",title:l("Add a page"),description:l("Give the new template page a name. It starts blank \u2014 add sections once it opens."),footer:dr(qg,{children:[ae(Kg,{variant:"secondary",onClick:()=>E(!1),children:l("Cancel")}),ae(Kg,{onClick:()=>{Me()},disabled:F||!k.trim(),loading:F,children:l("Add page")})]}),children:ae(FB,{label:l("Page name"),htmlFor:B,hint:k.trim()?l("URL: /{slug}",{slug:Ol(k,_e)}):void 0,error:g??void 0,children:ae(Vg,{id:B,value:k,invalid:!!g,onChange:R=>A(R.target.value),onKeyDown:R=>{R.key==="Enter"&&Me()},placeholder:l("e.g. About")})})})]})}import{jsx as WB}from"react/jsx-runtime";import{createContext as zB,useCallback as GB,useContext as UB,useState as $B}from"react";import{useSelectHandler as qB}from"efficient-easel/draw/client";var Al=["chat-bubble-left-right","chat-bubble-oval-left-ellipsis","chat","megaphone","phone","sparkles"],ga=Al[0];var Nt="right";function Rl(e){return Al.includes(e??"")?e:ga}function ey(e){return e==="left"?"left":Nt}function oy(e){return/^#[0-9a-fA-F]{6}$/.test(e??"")?e.toLowerCase():""}var Bl={enabled:!0,title:"",subtitle:"",greeting:"",launcherColor:"",launcherIcon:"",launcherPosition:Nt,launcherLabel:"",showOnPhones:!0};function tX(e){return{enabled:e.enabled,title:e.title,subtitle:e.subtitle,greeting:e.greeting,launcherColor:oy(e.launcherColor),launcherIcon:e.launcherIcon?Rl(e.launcherIcon):"",launcherPosition:ey(e.launcherPosition),launcherLabel:e.launcherLabel??"",showOnPhones:e.showOnPhones!==!1}}var ty=zB({chat:Bl,setChat:()=>{},selected:!1,setSelected:()=>{},select:()=>{},setSelectHandler:()=>{}});function aX({children:e,chat:o=Bl,onChatChange:t}){let[a,r]=$B(!1),n=GB(f=>t?.(f),[t]),{select:s,setSelectHandler:i}=qB();return WB(ty.Provider,{value:{chat:o,setChat:n,selected:a,setSelected:r,select:s,setSelectHandler:i},children:e})}var _l=()=>UB(ty);import{jsx as Cc}from"react/jsx-runtime";import{DesktopIcon as jB,PhoneIcon as KB,TabletIcon as VB}from"efficient-easel/icons";import{VIEW_TIERS as YB,VIEW_TIER_LABEL as XB}from"efficient-easel/draw";var ZB={desktop:Cc(jB,{}),tablet:Cc(VB,{}),mobile:Cc(KB,{})},ay=YB.map(e=>({id:e,get label(){return l(XB[e])},icon:ZB[e]}));import{PreviewDeviceContext as f4}from"efficient-easel/draw/client";import{jsx as QB}from"react/jsx-runtime";import{createContext as JB,useCallback as ry,useContext as e_,useMemo as o_,useRef as t_}from"react";var a_=Object.fromEntries(en.map(e=>[e,{value:"",error:null}])),ny=JB({links:Uu,rows:a_,canSave:!1,saveLink:async()=>({ok:!1,error:"There is no website to save to."}),openPanel:()=>{},setOpenHandler:()=>{}});function pX({children:e,value:o}){let t=t_(()=>{}),a=ry(()=>t.current(),[]),r=ry(s=>{t.current=s},[]),n=o_(()=>({...o,openPanel:a,setOpenHandler:r}),[o,a,r]);return QB(ny.Provider,{value:n,children:e})}var ur=()=>e_(ny);import{jsx as r_}from"react/jsx-runtime";import{createContext as n_,useContext as l_,useMemo as s_,useState as i_}from"react";var ly=n_(null);function IX({children:e}){let[o,t]=i_(null),a=s_(()=>({surface:o,setSurface:t}),[o]);return r_(ly.Provider,{value:a,children:e})}function sy(){return l_(ly)??{surface:null,setSurface:()=>{}}}import{createPreviewSelectionContext as f_}from"efficient-easel/draw/client";var pr="Scrolling Bar",{Provider:bX,useSelection:iy}=f_("selectedHeroId"),SX="data-sf-hero-ticker";function CX(e){return`${e}::ticker`}function wX(e){return!e||!e.endsWith("::ticker")?null:e.slice(0,-8)||null}import{createPreviewSelectionContext as c_}from"efficient-easel/draw/client";var{Provider:TX,useSelection:Dl}=c_("selectedHeroPart");import{isShown as x_,lazyShowWhenContext as h_}from"efficient-shell/format";import{addShowWhenFacts as d_}from"efficient-shell/format";import{showWhenOf as wc,shownForOption as u_,truthy as p_,withRowRules as m_,withRowsShownWhen as Nl,withShowWhen as Ml}from"efficient-shell/format";var OX=d_;function cy(e,o,t){let a=!1,r={};for(let[n,s]of Object.entries(e))x_(wc(s),o??{},t)?r[n]=s:a=!0;return a?r:e}function dy(e,o,t,a){let r=an(o,t,a);return{device:e,parentType:r?.item.type,parent:r?.item.props}}function fy(e,o){if(!e||typeof e!="object")return!1;let t=e;if(typeof t.context=="string"&&(t.context===o||t.context.startsWith(`${o}.`)))return!0;if("not"in t)return fy(t.not,o);for(let a of[t.all,t.any])if(Array.isArray(a)&&a.some(r=>fy(r,o)))return!0;return!1}function NX(e,o={}){return h_({parentType:()=>e.parent?.type??void 0,parent:()=>e.parent?.props??void 0,dynamicPage:()=>wl(),root:()=>e.appState?.data?.root?.props,...o})}var py=["one","side","stacked"];var HX={one:"One",side:"Side by side",stacked:"Stacked"};function my(e){return py.includes(e)?e:"one"}function uy(e){return e==="one"?1:2}function I_(e,o){if(py.includes(e))return e;let t=my(o);return t==="side"?"stacked":t}function vc(e){let o=my(e.mediaLayout);return Math.max(uy(o),uy(I_(e.mediaLayoutPhone,o)))}var mr=["media","image","image2"],ya={media:"Media",image:"Image",image2:"Image 2"},xr={media:"heroMedia",image:"heroImage",image2:"heroImage2"};function Hl(e,o){return e==="image"&&vc(o)>1?"Image 1":ya[e]}var UX="Video file",$X="Upload a video file";function g_(e,o){return{field:"mediaType",is:e,default:o}}var y_=new Set(["HeroSingle"]),xy="heroPart";function b_(e,o){return{...o,[xy]:e}}function qX(e,{parts:o={},onlyFor:t,fallback:a,rules:r}){let n={...e};for(let s of["image","video"])for(let i of t[s])n[i]=Ml(n[i],g_(s,a));for(let[s,i]of Object.entries(r??{}))i&&(n[s]=Ml(n[s],i));for(let s of mr)for(let i of o[s]??[])n[i]=b_(s,n[i]);return n}function S_(e){let o=e?.[xy];return mr.includes(o)?o:null}function hy(e,o){let t={};for(let[a,r]of Object.entries(e))S_(r)===o&&(t[a]=r);return t}function Iy(e){if(!y_.has(e.type))return[];let o=[{part:"media",label:ya.media,depth:0}];return(e.props.mediaType??"image")!=="video"&&(o.push({part:"image",label:Hl("image",e.props),depth:1}),vc(e.props)>1&&o.push({part:"image2",label:Hl("image2",e.props),depth:1})),o}function hr(e,o){return`${e}::${o}`}function gy(e){if(!e)return null;let o=e.lastIndexOf("::");if(o<=0)return null;let t=e.slice(o+2);return mr.includes(t)?{nodeId:e.slice(0,o),part:t}:null}var jX="data-sf-hero-part";import{jsx as oe,jsxs as Wt,Fragment as Zb}from"react/jsx-runtime";import{useState as l2}from"react";import{useEasel as s2,useRootFields as i2}from"efficient-easel/easel";import{Button as f2,EmptyState as c2}from"efficient-shell/ui";function yy({kind:e,pageName:o}){return{name:o?.trim()||l("This page"),kindLabel:ir({kind:e})?l("Template"):l("Page")}}import{headWords as oS,InspectorHead as d2,InspectorIconButton as Qb}from"efficient-easel/chrome";import{DuplicateIcon as u2,TrashIcon as p2}from"efficient-easel/icons";import{panelFieldsOf as m2}from"efficient-easel/screen/lib/document/panel-fields";import{jsx as L,Fragment as Q,jsxs as J}from"react/jsx-runtime";import{BlockBannerIcon as v_,BlockBoxIcon as k_,BlockButtonIcon as T_,BlockDividerIcon as Sy,BlockFooterIcon as Cy,BlockHeadingIcon as P_,BlockProductIcon as E_,BlockSocialIcon as F_,BlockTextIcon as O_,CardPaymentIcon as L_,ChatIcon as A_,GridIcon as R_,ImageIcon as Tc,MediaIcon as B_,PageIcon as __}from"efficient-easel/icons";import{jsx as kc,Fragment as C_,jsxs as w_}from"react/jsx-runtime";var by=w_(C_,{children:[kc("circle",{cx:"9",cy:"20",r:"1.3"}),kc("circle",{cx:"18",cy:"20",r:"1.3"}),kc("path",{d:"M2.5 3.5h3l2.3 11.3a1.6 1.6 0 0 0 1.6 1.3h8.1a1.6 1.6 0 0 0 1.6-1.2L21 7H6"})]});var D_={header:J(Q,{children:[L("rect",{x:"3",y:"5",width:"18",height:"14",rx:"2"}),L("path",{d:"M3 9.5h18"})]}),website:J(Q,{children:[L("circle",{cx:"12",cy:"12",r:"9"}),L("path",{d:"M3 12h18M12 3c2.6 2.7 2.6 15.3 0 18M12 3c-2.6 2.7-2.6 15.3 0 18"})]}),social:J(Q,{children:[L("circle",{cx:"6",cy:"12",r:"2.5"}),L("circle",{cx:"18",cy:"6",r:"2.5"}),L("circle",{cx:"18",cy:"18",r:"2.5"}),L("path",{d:"M8.2 10.8l7.6-3.6M8.2 13.2l7.6 3.6"})]}),ticker:J(Q,{children:[L("rect",{x:"3",y:"8.5",width:"18",height:"7",rx:"2"}),L("path",{d:"M6 12h3.5M11.5 12h2M15.5 12h2.5"})]}),FooterLogo:J(Q,{children:[L("path",{d:"M4 15.5h6M4 18h4"}),L("path",{d:"M14 8.5l3 7 3-7"})]}),FooterMenu:L("path",{d:"M6 7h12M6 11h12M6 15h8M6 19h8"}),FooterGroup:J(Q,{children:[L("rect",{x:"4",y:"4",width:"16",height:"16",rx:"2",strokeDasharray:"3 2.5"}),L("path",{d:"M8 9h8M8 13h8M8 16h5"})]}),FooterText:L("path",{d:"M5 7h14M5 12h14M5 17h9"}),FooterEmailSignup:J(Q,{children:[L("rect",{x:"3",y:"6",width:"18",height:"12",rx:"2"}),L("path",{d:"M3.5 7l8.5 6 8.5-6"})]}),SearchBlock:J(Q,{children:[L("circle",{cx:"11",cy:"11",r:"6"}),L("path",{d:"M20 20l-4.2-4.2"})]}),CartBlock:by,CountrySwitchBlock:J(Q,{children:[L("circle",{cx:"12",cy:"12",r:"8.5"}),L("path",{d:"M3.5 12h17M12 3.5c2.6 2.4 3.6 5.2 3.6 8.5s-1 6.1-3.6 8.5M12 3.5c-2.6 2.4-3.6 5.2-3.6 8.5s1 6.1 3.6 8.5"})]}),AccountBlock:J(Q,{children:[L("circle",{cx:"12",cy:"8",r:"4"}),L("path",{d:"M4.5 20c.8-3.8 3.8-6 7.5-6s6.7 2.2 7.5 6"})]}),ThemeSwitchBlock:J(Q,{children:[L("circle",{cx:"12",cy:"12",r:"8.5"}),L("path",{d:"M12 3.5v17M12 5.5l6 6M12 10.5l5.2 5.2M12 15.5l2.8 2.8"})]}),LegalLineBlock:J(Q,{children:[L("path",{d:"M3 9h18"}),L("path",{d:"M3 14h8M14 14h2M18 14h3"})]}),Hero:J(Q,{children:[L("rect",{x:"3",y:"4",width:"18",height:"16",rx:"2"}),L("path",{d:"M7 13.5h7M7 16.5h10"})]}),HeroSlide:J(Q,{children:[L("rect",{x:"3",y:"5",width:"18",height:"14",rx:"2"}),L("path",{d:"M7 15h6M16 9.5h.01M9.5 12l-2.5 3"})]}),HeroSingle:J(Q,{children:[L("rect",{x:"3",y:"4",width:"18",height:"16",rx:"2"}),L("path",{d:"M10.5 8.5l4 2.5-4 2.5z"}),L("path",{d:"M7 17h7"})]}),Collections:J(Q,{children:[L("rect",{x:"3",y:"5",width:"4.6",height:"14",rx:"1.3"}),L("rect",{x:"9.7",y:"5",width:"4.6",height:"14",rx:"1.3"}),L("rect",{x:"16.4",y:"5",width:"4.6",height:"14",rx:"1.3"})]}),CollectionCard:J(Q,{children:[L("rect",{x:"6",y:"4",width:"12",height:"16",rx:"2"}),L("path",{d:"M9 15h6M9 17.5h4"})]}),AlloyWheelsListing:J(Q,{children:[L("path",{d:"M3 5h5M3 9h5M3 13h5M3 17h5"}),L("rect",{x:"11.5",y:"5",width:"4.2",height:"5",rx:"1"}),L("rect",{x:"17.3",y:"5",width:"4.2",height:"5",rx:"1"}),L("rect",{x:"11.5",y:"12",width:"4.2",height:"5",rx:"1"}),L("rect",{x:"17.3",y:"12",width:"4.2",height:"5",rx:"1"})]}),CatalogFilterBar:J(Q,{children:[L("path",{d:"M3 7h9M15.5 7H21"}),L("circle",{cx:"13.5",cy:"7",r:"1.7"}),L("path",{d:"M3 12h4M10.5 12H21"}),L("circle",{cx:"8.5",cy:"12",r:"1.7"}),L("path",{d:"M3 17h9M15.5 17H21"}),L("circle",{cx:"13.5",cy:"17",r:"1.7"})]}),ProductGrid:J(Q,{children:[L("rect",{x:"3",y:"5",width:"4.8",height:"6",rx:"1"}),L("rect",{x:"9.6",y:"5",width:"4.8",height:"6",rx:"1"}),L("rect",{x:"16.2",y:"5",width:"4.8",height:"6",rx:"1"}),L("rect",{x:"3",y:"13",width:"4.8",height:"6",rx:"1"}),L("rect",{x:"9.6",y:"13",width:"4.8",height:"6",rx:"1"}),L("rect",{x:"16.2",y:"13",width:"4.8",height:"6",rx:"1"})]}),RelatedProducts:J(Q,{children:[L("path",{d:"M3 5h10"}),L("rect",{x:"3",y:"9.5",width:"5",height:"9",rx:"1"}),L("rect",{x:"9.5",y:"9.5",width:"5",height:"9",rx:"1"}),L("rect",{x:"16",y:"9.5",width:"5",height:"9",rx:"1"})]}),Gallery:J(Q,{children:[L("rect",{x:"3",y:"4",width:"11",height:"16",rx:"2"}),L("rect",{x:"15.5",y:"4",width:"5.5",height:"7.5",rx:"1.5"}),L("rect",{x:"15.5",y:"12.5",width:"5.5",height:"7.5",rx:"1.5"})]}),GalleryB:J(Q,{children:[L("rect",{x:"3.5",y:"4",width:"7.5",height:"7.5",rx:"1.5"}),L("rect",{x:"13",y:"4",width:"7.5",height:"7.5",rx:"1.5"}),L("rect",{x:"3.5",y:"12.5",width:"7.5",height:"7.5",rx:"1.5"}),L("rect",{x:"13",y:"12.5",width:"7.5",height:"7.5",rx:"1.5"})]}),GalleryItem:J(Q,{children:[L("rect",{x:"4",y:"5",width:"16",height:"14",rx:"2"}),L("circle",{cx:"9",cy:"10",r:"1.6"}),L("path",{d:"M20 15.5l-4.5-4L7 19"})]}),Events:J(Q,{children:[L("rect",{x:"4",y:"5",width:"16",height:"15",rx:"2"}),L("path",{d:"M4 9.5h16M8.5 3v4M15.5 3v4M8 14h2M14 14h2"})]}),PostCard:J(Q,{children:[L("rect",{x:"4",y:"3.5",width:"16",height:"17",rx:"2"}),L("rect",{x:"6.5",y:"6",width:"11",height:"6",rx:"1"}),L("path",{d:"M6.5 14.5h11M6.5 17.5h7"})]}),Manifesto:J(Q,{children:[L("path",{d:"M7 8h3.2v4c0 1.6-1 2.6-3 3.2"}),L("path",{d:"M14 8h3.2v4c0 1.6-1 2.6-3 3.2"})]}),Stats:J(Q,{children:[L("path",{d:"M3.5 20h17"}),L("path",{d:"M6 20v-7M11 20V7M16 20v-5M20.5 20v-9"})]}),Logos:J(Q,{children:[L("circle",{cx:"6",cy:"12",r:"2.6"}),L("rect",{x:"10",y:"9.4",width:"5.2",height:"5.2",rx:"1.2"}),L("path",{d:"M19 9.2l2.4 5h-4.8z"})]}),Ticker:J(Q,{children:[L("rect",{x:"3",y:"8.5",width:"18",height:"7",rx:"2"}),L("path",{d:"M6 12h3.5M11.5 12h2M15.5 12h2.5"})]}),SectionHeader:J(Q,{children:[L("rect",{x:"3.5",y:"6",width:"5",height:"5",rx:"1.2"}),L("path",{d:"M11 8.5h9M3.5 15.5h17"})]}),IntroBleed:J(Q,{children:[L("rect",{x:"3",y:"4",width:"18",height:"16",rx:"2"}),L("path",{d:"M3 13.5h18M7 16.8h6"})]}),Split:J(Q,{children:[L("rect",{x:"3",y:"5",width:"8",height:"14",rx:"1.5"}),L("path",{d:"M14 8.5h6M14 12h6M14 15.5h4"})]}),Eyebrow:J(Q,{children:[L("path",{d:"M4 8.5h4.5M11 8.5h9"}),L("path",{d:"M4 14.5h16"})]}),HeroGroup:J(Q,{children:[L("rect",{x:"3.5",y:"4.5",width:"17",height:"15",rx:"2"}),L("path",{d:"M7 9h8M7 12.5h10M7 16h6"})]}),Form:J(Q,{children:[L("rect",{x:"3",y:"4",width:"18",height:"16",rx:"2"}),L("path",{d:"M6.5 9h11M6.5 12.5h11"}),L("rect",{x:"6.5",y:"15",width:"6.5",height:"2.6",rx:"1.3"})]}),LogoBlock:L(Q,{children:L("path",{d:"M12 3.5l7.5 3.2v5.1c0 4.2-3.2 7.1-7.5 8.7-4.3-1.6-7.5-4.5-7.5-8.7V6.7z"})}),Spacer:J(Q,{children:[L("path",{d:"M12 4v6M9.5 6.5L12 4l2.5 2.5M12 20v-6M9.5 17.5L12 20l2.5-2.5"}),L("path",{d:"M5 13h14",strokeDasharray:"2 2.5"})]}),ContactRouting:J(Q,{children:[L("rect",{x:"3",y:"4",width:"5",height:"5",rx:"1"}),L("rect",{x:"9.5",y:"4",width:"5",height:"5",rx:"1"}),L("rect",{x:"16",y:"4",width:"5",height:"5",rx:"1"}),L("path",{d:"M4 13.5h11M4 17.5h7"}),L("path",{d:"M17 15l3 2-3 2"})]}),CustomHTML:L("path",{d:"M9 8l-4 4 4 4M15 8l4 4-4 4"})},N_=L("rect",{x:"4",y:"4",width:"16",height:"16",rx:"2.5"}),M_={footer:Cy,Footer:Cy,Divider:Sy,FooterDivider:Sy,Banner:v_,Flex:k_,FooterSocial:F_,FooterPayment:L_,page:__,chat:A_,Heading:P_,Text:O_,ImageBlock:Tc,ButtonBlock:T_,Grid:R_,ProductRef:E_,heroMedia:B_,heroImage:Tc,heroImage2:Tc},H_={MenuBlock:"FooterMenu",EmailFormBlock:"FooterEmailSignup",SocialLogosBlock:"FooterSocial",PaymentLogosBlock:"FooterPayment",SiteHeader:"header",SiteFooter:"footer"};function Mt({type:e,size:o=16,className:t}){let a=H_[e]??e,r=M_[a];return r?L(r,{size:o,className:t}):L("svg",{width:o,height:o,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:1.7,strokeLinecap:"round",strokeLinejoin:"round",className:t,"aria-hidden":"true",children:D_[a]??N_})}import{PanelHideButton as Jb}from"efficient-easel/screen/components/SidePanelHead";import{useEaselSession as x2}from"efficient-easel/screen/lib/session-context";import{jsx as re,jsxs as Ir,Fragment as W_}from"react/jsx-runtime";import{useEffect as z_,useId as wy,useState as G_}from"react";import{IconPicker as U_}from"efficient-shell/ui";import{SettingsDefaultReset as $_,SettingsField as gr,SettingsSegmented as q_,SettingsSwitch as vy}from"efficient-easel/panel";import*as j_ from"efficient-easel/icons";import{ButtonIcon as K_,ButtonIconIcon as V_,EyeIcon as Y_,PhoneIcon as X_,PlacementIcon as Z_,TypeIcon as Q_}from"efficient-easel/icons";var J_="Chat with us",eD="We usually reply within a few minutes",oD="Hi! Ask us anything \u2014 about a wheel, an order, or fitment. Leave your details and we\u2019ll reply.";function Wl({label:e,value:o,placeholder:t,onCommit:a,multiline:r=!1,hint:n}){let[s,i]=G_(o);z_(()=>i(o),[o]);let f=()=>{s!==o&&a(s)};return re(gr,{label:e,icon:re(Q_,{}),changed:o!=="",action:re(yr,{label:e,changed:o!=="",onReset:()=>a("")}),hint:n,children:r?re("textarea",{value:s,placeholder:t,rows:3,onChange:d=>i(d.target.value),onBlur:f,"aria-label":e}):re("input",{type:"text",value:s,placeholder:t,onChange:d=>i(d.target.value),onBlur:f,onKeyDown:d=>{d.key==="Enter"&&d.currentTarget.blur()},"aria-label":e,autoComplete:"off"})})}function yr({label:e,changed:o,onReset:t}){return re($_,{words:X()?.panel,label:e,changed:o,onReset:t})}function tD({label:e,icon:o,checked:t,fallback:a,onChange:r,hint:n}){let s=wy();return re(gr,{label:e,labelId:s,icon:o,changed:t!==a,action:Ir("span",{className:"inline-flex items-center gap-2",children:[re(vy,{checked:t,onChange:r,ariaLabelledBy:s}),re(yr,{label:e,changed:t!==a,onReset:()=>r(a)})]}),hint:n})}function aD(e){let o=e.replace(/(^|-)([a-z])/g,(a,r,n)=>n.toUpperCase()),t=j_[`${o}Icon`];return t?re(t,{size:16}):null}var rD=Al.map(e=>({value:e,icon:aD(e)}));function nD(){let{theme:e}=K(),o=ze(e).themes[0];return _a(o)??o?.accent??""}function ky(){let{chat:e,setChat:o}=_l(),t=wy(),a=nD(),r=e.launcherIcon?Rl(e.launcherIcon):ga;return Ir(W_,{children:[re(gr,{label:l("Show the chat bubble"),labelId:t,icon:re(Y_,{}),changed:!e.enabled,action:Ir("span",{className:"inline-flex items-center gap-2",children:[re(vy,{checked:e.enabled,onChange:n=>o({enabled:n}),ariaLabelledBy:t}),re(yr,{label:l("Show the chat bubble"),changed:!e.enabled,onReset:()=>o({enabled:!0})})]}),hint:e.enabled?l("The floating chat bubble shows in the corner of every page."):l("The chat bubble is hidden across the whole site.")}),Ir(bf,{title:l("Look"),children:[re(je,{label:l("Button color"),icon:re(K_,{}),changed:e.launcherColor!=="",value:e.launcherColor,inherited:a,caption:e.launcherColor?void 0:l("Site button color"),onChange:n=>o({launcherColor:n}),onReset:()=>o({launcherColor:""})}),re(gr,{label:l("Icon"),icon:re(V_,{}),changed:r!==ga,action:re(yr,{label:l("Icon"),changed:r!==ga,onReset:()=>o({launcherIcon:""})}),children:re(U_,{label:l("Icon"),value:r,options:rD,onChange:n=>o({launcherIcon:n===ga?"":n})})}),re(gr,{label:l("Position"),icon:re(Z_,{}),changed:e.launcherPosition!==Nt,action:re(yr,{label:l("Position"),changed:e.launcherPosition!==Nt,onReset:()=>o({launcherPosition:Nt})}),children:re(q_,{options:[{label:l("Right"),id:"right"},{label:l("Left"),id:"left"}],value:e.launcherPosition,ariaLabel:l("Position"),onChange:n=>o({launcherPosition:n})})}),re(Wl,{label:l("Label"),value:e.launcherLabel,placeholder:l("Icon only"),onCommit:n=>o({launcherLabel:n}),hint:l("Shows when a visitor points at the button")}),re(tD,{label:l("Show on phones"),icon:re(X_,{}),checked:e.showOnPhones,fallback:Bl.showOnPhones,onChange:n=>o({showOnPhones:n})})]}),Ir(bf,{title:l("Wording"),children:[re(Wl,{label:l("Title"),value:e.title,placeholder:J_,onCommit:n=>o({title:n})}),re(Wl,{label:l("Subtitle"),value:e.subtitle,placeholder:eD,onCommit:n=>o({subtitle:n})}),re(Wl,{label:l("Greeting message"),value:e.greeting,placeholder:oD,onCommit:n=>o({greeting:n}),multiline:!0}),re("p",{className:"es-field-hint sf-hint-keep",children:l("Leave a field blank to use the built-in wording.")})]})]})}import{jsx as Ht,Fragment as Vc,jsxs as Oy}from"react/jsx-runtime";import{useEffect as _D,useId as Ey,useState as Fy}from"react";import{SettingsField as DD}from"efficient-easel/panel";import{jsx as TD}from"react/jsx-runtime";import{forwardRef as lD,createElement as Pc}from"react";var Ty={outline:{xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},filled:{xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"currentColor",stroke:"none"}};var $=(e,o,t,a)=>{let r=lD(({color:n="currentColor",size:s=24,stroke:i=2,title:f,className:d,children:p,...x},m)=>Pc("svg",{ref:m,...Ty[e],width:s,height:s,className:["tabler-icon",`tabler-icon-${o}`,d].filter(Boolean).join(" "),...e==="filled"?{fill:n}:{strokeWidth:i,stroke:n},...x},[f&&Pc("title",{key:"svg-title"},f),...a.map(([h,b])=>Pc(h,b)),...Array.isArray(p)?p:[p]]));return r.displayName=`${t}`,r};var sD=[["path",{d:"M7 10v4h3v7h4v-7h3l1 -4h-4v-2a1 1 0 0 1 1 -1h3v-4h-3a5 5 0 0 0 -5 5v2h-3",key:"svg-0"}]],Ec=$("outline","brand-facebook","BrandFacebook",sD);var iD=[["path",{d:"M3 7a4 4 0 0 1 4 -4h10a4 4 0 0 1 4 4v10a4 4 0 0 1 -4 4h-10a4 4 0 0 1 -4 -4l0 -10",key:"svg-0"}],["path",{d:"M8.5 12a3.5 3.5 0 1 0 7 0a3.5 3.5 0 0 0 -7 0",key:"svg-1"}],["path",{d:"M17 7v.01",key:"svg-2"}]],Fc=$("outline","brand-instagram","BrandInstagram",iD);var fD=[["path",{d:"M21 10.663c0 -4.224 -4.041 -7.663 -9 -7.663s-9 3.439 -9 7.663c0 3.783 3.201 6.958 7.527 7.56c1.053 .239 .932 .644 .696 2.133c-.039 .238 -.184 .932 .777 .512c.96 -.42 5.18 -3.201 7.073 -5.48c1.304 -1.504 1.927 -3.029 1.927 -4.715v-.01",key:"svg-0"}]],Oc=$("outline","brand-line","BrandLine",fD);var cD=[["path",{d:"M8 11v5",key:"svg-0"}],["path",{d:"M8 8v.01",key:"svg-1"}],["path",{d:"M12 16v-5",key:"svg-2"}],["path",{d:"M16 16v-3a2 2 0 1 0 -4 0",key:"svg-3"}],["path",{d:"M3 7a4 4 0 0 1 4 -4h10a4 4 0 0 1 4 4v10a4 4 0 0 1 -4 4h-10a4 4 0 0 1 -4 -4l0 -10",key:"svg-4"}]],Lc=$("outline","brand-linkedin","BrandLinkedin",cD);var dD=[["path",{d:"M8 20l4 -9",key:"svg-0"}],["path",{d:"M10.7 14c.437 1.263 1.43 2 2.55 2c2.071 0 3.75 -1.554 3.75 -4a5 5 0 1 0 -9.7 1.7",key:"svg-1"}],["path",{d:"M3 12a9 9 0 1 0 18 0a9 9 0 1 0 -18 0",key:"svg-2"}]],Ac=$("outline","brand-pinterest","BrandPinterest",dD);var uD=[["path",{d:"M15 10l-4 4l6 6l4 -16l-18 7l4 2l2 6l3 -4",key:"svg-0"}]],Rc=$("outline","brand-telegram","BrandTelegram",uD);var pD=[["path",{d:"M21 7.917v4.034a9.948 9.948 0 0 1 -5 -1.951v4.5a6.5 6.5 0 1 1 -8 -6.326v4.326a2.5 2.5 0 1 0 4 2v-11.5h4.083a6.005 6.005 0 0 0 4.917 4.917",key:"svg-0"}]],Bc=$("outline","brand-tiktok","BrandTiktok",pD);var mD=[["path",{d:"M16.5 10c3.038 0 5.5 2.015 5.5 4.5c0 1.397 -.778 2.645 -2 3.47l0 2.03l-1.964 -1.178a6.649 6.649 0 0 1 -1.536 .178c-3.038 0 -5.5 -2.015 -5.5 -4.5s2.462 -4.5 5.5 -4.5",key:"svg-0"}],["path",{d:"M11.197 15.698c-.69 .196 -1.43 .302 -2.197 .302a8.008 8.008 0 0 1 -2.612 -.432l-2.388 1.432v-2.801c-1.237 -1.082 -2 -2.564 -2 -4.199c0 -3.314 3.134 -6 7 -6c3.782 0 6.863 2.57 7 5.785l0 .233",key:"svg-1"}],["path",{d:"M10 8h.01",key:"svg-2"}],["path",{d:"M7 8h.01",key:"svg-3"}],["path",{d:"M15 14h.01",key:"svg-4"}],["path",{d:"M18 14h.01",key:"svg-5"}]],_c=$("outline","brand-wechat","BrandWechat",mD);var xD=[["path",{d:"M3 21l1.65 -3.8a9 9 0 1 1 3.4 2.9l-5.05 .9",key:"svg-0"}],["path",{d:"M9 10a.5 .5 0 0 0 1 0v-1a.5 .5 0 0 0 -1 0v1a5 5 0 0 0 5 5h1a.5 .5 0 0 0 0 -1h-1a.5 .5 0 0 0 0 1",key:"svg-1"}]],Dc=$("outline","brand-whatsapp","BrandWhatsapp",xD);var hD=[["path",{d:"M4 4l11.733 16h4.267l-11.733 -16l-4.267 0",key:"svg-0"}],["path",{d:"M4 20l6.768 -6.768m2.46 -2.46l6.772 -6.772",key:"svg-1"}]],Nc=$("outline","brand-x","BrandX",hD);var ID=[["path",{d:"M2 8a4 4 0 0 1 4 -4h12a4 4 0 0 1 4 4v8a4 4 0 0 1 -4 4h-12a4 4 0 0 1 -4 -4v-8",key:"svg-0"}],["path",{d:"M10 9l5 3l-5 3l0 -6",key:"svg-1"}]],Mc=$("outline","brand-youtube","BrandYoutube",ID);var gD=[["path",{d:"M18 2a1 1 0 0 1 .993 .883l.007 .117v4a1 1 0 0 1 -.883 .993l-.117 .007h-3v1h3a1 1 0 0 1 .991 1.131l-.02 .112l-1 4a1 1 0 0 1 -.858 .75l-.113 .007h-2v6a1 1 0 0 1 -.883 .993l-.117 .007h-4a1 1 0 0 1 -.993 -.883l-.007 -.117v-6h-2a1 1 0 0 1 -.993 -.883l-.007 -.117v-4a1 1 0 0 1 .883 -.993l.117 -.007h2v-1a6 6 0 0 1 5.775 -5.996l.225 -.004h3z",key:"svg-0"}]],Hc=$("filled","brand-facebook-filled","BrandFacebookFilled",gD);var yD=[["path",{d:"M16 3a5 5 0 0 1 5 5v8a5 5 0 0 1 -5 5h-8a5 5 0 0 1 -5 -5v-8a5 5 0 0 1 5 -5zm-4 5a4 4 0 0 0 -3.995 3.8l-.005 .2a4 4 0 1 0 4 -4m4.5 -1.5a1 1 0 0 0 -.993 .883l-.007 .127a1 1 0 0 0 1.993 .117l.007 -.127a1 1 0 0 0 -1 -1",key:"svg-0"}]],Wc=$("filled","brand-instagram-filled","BrandInstagramFilled",yD);var bD=[["path",{d:"M17 2a5 5 0 0 1 5 5v10a5 5 0 0 1 -5 5h-10a5 5 0 0 1 -5 -5v-10a5 5 0 0 1 5 -5zm-9 8a1 1 0 0 0 -1 1v5a1 1 0 0 0 2 0v-5a1 1 0 0 0 -1 -1m6 0a3 3 0 0 0 -1.168 .236l-.125 .057a1 1 0 0 0 -1.707 .707v5a1 1 0 0 0 2 0v-3a1 1 0 0 1 2 0v3a1 1 0 0 0 2 0v-3a3 3 0 0 0 -3 -3m-6 -3a1 1 0 0 0 -.993 .883l-.007 .127a1 1 0 0 0 1.993 .117l.007 -.127a1 1 0 0 0 -1 -1",key:"svg-0"}]],zc=$("filled","brand-linkedin-filled","BrandLinkedinFilled",bD);var SD=[["path",{d:"M17 3.34a10 10 0 0 1 -8.512 18.023l2.364 -5.315a3.5 3.5 0 0 0 2.398 .952c2.708 0 4.75 -2.089 4.75 -5a6 6 0 1 0 -11.64 2.041a1 1 0 1 0 1.88 -.682a4 4 0 1 1 7.76 -1.36c0 1.818 -1.156 3.001 -2.75 3.001c-.609 0 -1.153 -.361 -1.478 -1.022l1.142 -2.572a1 1 0 0 0 -1.828 -.812l-4.392 9.882a10 10 0 0 1 -4.694 -8.476l.005 -.324a10 10 0 0 1 14.995 -8.336",key:"svg-0"}]],Gc=$("filled","brand-pinterest-filled","BrandPinterestFilled",SD);var CD=[["path",{d:"M16.083 2h-4.083a1 1 0 0 0 -1 1v11.5a1.5 1.5 0 1 1 -2.519 -1.1l.12 -.1a1 1 0 0 0 .399 -.8v-4.326a1 1 0 0 0 -1.23 -.974a7.5 7.5 0 0 0 1.73 14.8l.243 -.005a7.5 7.5 0 0 0 7.257 -7.495v-2.7l.311 .153c1.122 .53 2.333 .868 3.59 .993a1 1 0 0 0 1.099 -.996v-4.033a1 1 0 0 0 -.834 -.986a5.005 5.005 0 0 1 -4.097 -4.096a1 1 0 0 0 -.986 -.835z",key:"svg-0"}]],Uc=$("filled","brand-tiktok-filled","BrandTiktokFilled",CD);var wD=[["path",{d:"M18.497 4.409a10 10 0 0 1 -10.36 16.828l-.223 -.098l-4.759 .849l-.11 .011a1 1 0 0 1 -.11 0l-.102 -.013l-.108 -.024l-.105 -.037l-.099 -.047l-.093 -.058l-.014 -.011l-.012 -.007l-.086 -.073l-.077 -.08l-.067 -.088l-.056 -.094l-.034 -.07l-.04 -.108l-.028 -.128l-.012 -.102a1 1 0 0 1 0 -.125l.012 -.1l.024 -.11l.045 -.122l1.433 -3.304l-.009 -.014a10 10 0 0 1 1.549 -12.454l.215 -.203a10 10 0 0 1 13.226 -.217m-8.997 3.09a1.5 1.5 0 0 0 -1.5 1.5v1a6 6 0 0 0 6 6h1a1.5 1.5 0 0 0 0 -3h-1l-.144 .007a1.5 1.5 0 0 0 -1.128 .697l-.042 .074l-.022 -.007a4.01 4.01 0 0 1 -2.435 -2.435l-.008 -.023l.075 -.041a1.5 1.5 0 0 0 .704 -1.272v-1a1.5 1.5 0 0 0 -1.5 -1.5",key:"svg-0"}]],$c=$("filled","brand-whatsapp-filled","BrandWhatsappFilled",wD);var vD=[["path",{d:"M8.267 3a1 1 0 0 1 .73 .317l.076 .092l4.274 5.828l5.946 -5.944a1 1 0 0 1 1.497 1.32l-.083 .094l-6.163 6.162l6.262 8.54a1 1 0 0 1 -.697 1.585l-.109 .006h-4.267a1 1 0 0 1 -.73 -.317l-.076 -.092l-4.276 -5.829l-5.944 5.945a1 1 0 0 1 -1.497 -1.32l.083 -.094l6.161 -6.163l-6.26 -8.539a1 1 0 0 1 .697 -1.585l.109 -.006h4.267z",key:"svg-0"}]],qc=$("filled","brand-x-filled","BrandXFilled",vD);var kD=[["path",{d:"M18 3a5 5 0 0 1 5 5v8a5 5 0 0 1 -5 5h-12a5 5 0 0 1 -5 -5v-8a5 5 0 0 1 5 -5zm-9 6v6a1 1 0 0 0 1.514 .857l5 -3a1 1 0 0 0 0 -1.714l-5 -3a1 1 0 0 0 -1.514 .857z",key:"svg-0"}]],jc=$("filled","brand-youtube-filled","BrandYoutubeFilled",kD);var PQ="outline",zl={fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},PD={},Kc={fillRule:"evenodd"},ED=[["path",{...zl,d:"M21 4L3 11L7 13L9 19L12 15L17 20z"}],["path",{...Kc,d:"M21 4L3 11L7 13L9 19L12 15L17 20zM15.212 8.939 10.576 13.576 11.424 14.424 16.061 9.788z"}]],FD=[["path",{...zl,d:["M21 10.663c0 -4.224 -4.041 -7.663 -9 -7.663s-9 3.439 -9 7.663","c0 3.783 3.201 6.958 7.527 7.56c1.053 .239 .932 .644 .696 2.133","c-.039 .238 -.184 .932 .777 .512c.96 -.42 5.18 -3.201 7.073 -5.48","c1.304 -1.504 1.927 -3.029 1.927 -4.715v-.01z"].join("")}],["path",{...PD,d:["M21 10.663c0 -4.224 -4.041 -7.663 -9 -7.663s-9 3.439 -9 7.663","c0 3.783 3.201 6.958 7.527 7.56c1.053 .239 .932 .644 .696 2.133","c-.039 .238 -.184 .932 .777 .512c.96 -.42 5.18 -3.201 7.073 -5.48","c1.304 -1.504 1.927 -3.029 1.927 -4.715v-.01z"].join("")}]],OD=[["path",{...zl,d:["M16.5 10c3.038 0 5.5 2.015 5.5 4.5c0 1.397 -.778 2.645 -2 3.47l0 2.03l-1.964 -1.178","a6.649 6.649 0 0 1 -1.536 .178c-3.038 0 -5.5 -2.015 -5.5 -4.5s2.462 -4.5 5.5 -4.5z"].join("")}],["path",{...zl,d:["M8.319 15.972L7.84 15.918L7.349 15.832L6.865 15.715L6.388 15.568L4 17L4 14.199","L3.559 13.775L3.197 13.356L2.877 12.91L2.603 12.439L2.376 11.946L2.201 11.433","L2.079 10.902L2.016 10.405L2.001 9.897L2.036 9.386L2.12 8.889L2.25 8.405L2.425 7.937","L2.642 7.486L2.9 7.055L3.195 6.645L3.459 6.333L3.744 6.037L4.05 5.757L4.377 5.495","L4.723 5.25L5.086 5.025L5.467 4.819L5.864 4.634L6.275 4.471L6.701 4.331L7.139 4.214","L7.589 4.122L8.05 4.055L8.521 4.014L9.352 4.007L9.815 4.04L10.269 4.098L10.713 4.181","L11.146 4.287L11.567 4.416L11.975 4.567L12.369 4.739L12.748 4.932L13.112 5.143","L13.459 5.374L13.788 5.622L14.172 5.956L14.458 6.241L14.722 6.542L14.965 6.856","L15.217 7.237A8.35 7.35 0 0 0 8.319 15.972z"].join("")}],["path",{...Kc,d:["M8.319 15.972L7.84 15.918L7.349 15.832L6.865 15.715L6.388 15.568L4 17L4 14.199","L3.559 13.775L3.197 13.356L2.877 12.91L2.603 12.439L2.376 11.946L2.201 11.433","L2.079 10.902L2.016 10.405L2.001 9.897L2.036 9.386L2.12 8.889L2.25 8.405L2.425 7.937","L2.642 7.486L2.9 7.055L3.195 6.645L3.459 6.333L3.744 6.037L4.05 5.757L4.377 5.495","L4.723 5.25L5.086 5.025L5.467 4.819L5.864 4.634L6.275 4.471L6.701 4.331L7.139 4.214","L7.589 4.122L8.05 4.055L8.521 4.014L9.352 4.007L9.815 4.04L10.269 4.098L10.713 4.181","L11.146 4.287L11.567 4.416L11.975 4.567L12.369 4.739L12.748 4.932L13.112 5.143","L13.459 5.374L13.788 5.622L14.172 5.956L14.458 6.241L14.722 6.542L14.965 6.856","L15.217 7.237A8.35 7.35 0 0 0 8.319 15.972zM5.25 7.9a0.85 0.85 0 1 0 1.7 0","a0.85 0.85 0 1 0 -1.7 0zM8.25 7.9a0.85 0.85 0 1 0 1.7 0a0.85 0.85 0 1 0 -1.7 0z"].join("")}],["path",{...Kc,d:["M16.5 10c3.038 0 5.5 2.015 5.5 4.5c0 1.397 -.778 2.645 -2 3.47l0 2.03l-1.964 -1.178","a6.649 6.649 0 0 1 -1.536 .178c-3.038 0 -5.5 -2.015 -5.5 -4.5s2.462 -4.5 5.5 -4.5z","M14.15 14a0.85 0.85 0 1 0 1.7 0a0.85 0.85 0 1 0 -1.7 0zM17.15 14","a0.85 0.85 0 1 0 1.7 0a0.85 0.85 0 1 0 -1.7 0z"].join("")}]],LD=$("filled","brand-telegram-filled","BrandTelegramFilled",ED),AD=$("filled","brand-line-filled","BrandLineFilled",FD),RD=$("filled","brand-wechat-filled","BrandWechatFilled",OD),BD={instagram:{outline:Fc,solid:Wc},facebook:{outline:Ec,solid:Hc},tiktok:{outline:Bc,solid:Uc},youtube:{outline:Mc,solid:jc},x:{outline:Nc,solid:qc},linkedin:{outline:Lc,solid:zc},pinterest:{outline:Ac,solid:Gc},whatsapp:{outline:Dc,solid:$c},telegram:{outline:Rc,solid:LD},line:{outline:Oc,solid:AD},wechat:{outline:_c,solid:RD}};function Py({platform:e,iconStyle:o,size:t}){let a=BD[e][o];return TD(a,{size:t,stroke:1.75,"aria-hidden":"true",focusable:"false"})}var ND={instagram:"instagram.com/yourshop",facebook:"facebook.com/yourshop",tiktok:"tiktok.com/@yourshop",youtube:"youtube.com/@yourshop",x:"x.com/yourshop",linkedin:"linkedin.com/company/yourshop",pinterest:"pinterest.com/yourshop",whatsapp:"wa.me/61400000000",telegram:"t.me/yourshop",line:"line.me/ti/p/~yourshop",wechat:"u.wechat.com/your-qr-code-link"};function MD({platform:e}){let{rows:o,saveLink:t}=ur(),{value:a,error:r}=o[e],[n,s]=Fy(a),[i,f]=Fy(!1),d=Ey(),p=Ey();_D(()=>s(a),[a]);let x=async()=>{if(n.trim()===a){n!==a&&s(a);return}f(!0),await t(e,n),f(!1)},m=Gu[e];return Oy(Vc,{children:[Ht(DD,{label:l(m),htmlFor:d,icon:Ht(Py,{platform:e,iconStyle:"outline",size:18}),children:Ht("input",{id:d,type:"text",inputMode:"url",value:n,placeholder:ND[e],onChange:h=>s(h.target.value),onBlur:()=>{x()},onKeyDown:h=>{h.key==="Enter"&&h.currentTarget.blur(),h.key==="Escape"&&(s(a),h.currentTarget.blur())},"aria-invalid":r?!0:void 0,"aria-describedby":r?p:void 0,"aria-busy":i||void 0,autoComplete:"off",spellCheck:!1})}),r&&Ht("p",{id:p,className:"sf-note sf-note--error",role:"alert",children:r})]})}function Ly({unavailable:e}){let{canSave:o}=ur();return!o&&e?Ht(Vc,{children:e}):Oy(Vc,{children:[Ht("p",{className:"es-field-hint sf-hint-keep",children:l("Paste a link to each profile. A platform left empty shows nothing on the site.")}),en.map(t=>Ht(MD,{platform:t},t))]})}import{jsx as br,jsxs as HD}from"react/jsx-runtime";import{useId as WD,useMemo as zD}from"react";import{useEasel as GD}from"efficient-easel/easel";import{SettingsField as UD,SettingsSwitch as $D}from"efficient-easel/panel";import{EyeIcon as qD}from"efficient-easel/icons";var Ay=["","","","","",""];var jD="root:default-zone";function Ry({heroId:e}){let{appState:o,dispatch:t}=GD(p=>p),a=o.data.content??[],r=a.findIndex(p=>p.props.id===e),n=r>=0?a[r]:null,s=n?n.props.showTicker??!0:!0,i=zD(()=>{let p=n?.props.tickerItems;return Array.isArray(p)?p:Ay.map(x=>({text:x}))},[n]),f=WD();if(!n)return br("p",{className:"sf-note",children:l("This ticker\u2019s hero is no longer on the page.")});let d=p=>t({type:"replace",destinationZone:jD,destinationIndex:r,data:{...n,props:{...n.props,...p}}});return HD("div",{children:[br(UD,{label:l("Show ticker"),labelId:f,icon:br(qD,{}),action:br($D,{checked:s,onChange:p=>d({showTicker:p}),ariaLabelledBy:f})}),br(Tf,{label:kf.label,icon:kf.icon,items:i,placeholder:"item",onChange:p=>d({tickerItems:p}),markup:!0})]})}import{jsx as U,Fragment as sd,jsxs as Fo}from"react/jsx-runtime";import{useContext as FN,useEffect as rd,useRef as ON,useState as ib}from"react";import{FieldSelect as LN,InspectorField as AN}from"efficient-easel/fields";import{SettingsField as RN}from"efficient-easel/panel";import{InspectorUpLevel as Yl}from"efficient-easel/chrome";import{StylesIcon as BN,TypeIcon as _N}from"efficient-easel/icons";import{useEasel as DN}from"efficient-easel/easel";import{TextPartPanel as NN}from"efficient-easel/copy";import{Tooltip as MN}from"efficient-shell/ui";import{jsx as od,jsxs as nN}from"react/jsx-runtime";import{COPY_CELLS as Sr,CopyBox as lN}from"efficient-easel/copy";import{PaddingYIcon as sN,WidthIcon as iN}from"efficient-easel/icons";import{useSyncExternalStore as QD}from"react";var Yc="template",_y="Card template",KD=["Text","ImageBlock","ButtonBlock","Flex"],Gl="rowField",VD="rowLinkField";function KQ(){return{type:"slot",allow:[...KD]}}var YD=[{block:"OrderSummary",fields:[{key:"label",label:"Item"},{key:"meta",label:"Meta line"},{key:"amount",label:"Amount"}]}],By=Symbol.for("efficient.card-templates");function Ul(){let e=globalThis,o=e[By];return o||(o=new Map(YD.map(t=>[t.block,t])),e[By]=o),o}function VQ(e){for(let o of e){if(typeof o.block!="string"||!o.block)throw new Error("A card template names no block.");Ul().set(o.block,{block:o.block,fields:o.fields.map(t=>({...t}))})}}function Xc(e){return typeof e=="string"&&Ul().has(e)}function YQ(e,o){let t=Ul().get(e)?.fields??[];return o?t.filter(a=>(a.kind??"text")===o):t}function XQ(e,o){return e?Ul().get(e)?.fields.find(t=>t.key===o)??null:null}function XD(e,o=Gl){let t=e?.[o];return typeof t=="string"?t.trim():""}function ZQ(e){let o={};if(e&&typeof e=="object"&&!Array.isArray(e))for(let[t,a]of Object.entries(e))typeof a=="string"&&(o[t]=a);return o}var ZD={Text:{text:Gl},ImageBlock:{src:Gl},ButtonBlock:{label:Gl,href:VD}};function Dy(e,o,t){let a=ZD[e]?.[t];return!!(a&&XD(o,a))}function QQ(e,o){let t=e?.data?.content;if(!Array.isArray(t)||typeof o!="string")return;let a=(n,s)=>{for(let i of n){if(i?.props?.id===o)return s;for(let[f,d]of Object.entries(i?.props??{})){if(!Array.isArray(d)||!d.length||typeof d[0]!="object"||d[0]===null||!("type"in d[0]))continue;let p=f===Yc&&Xc(i.type)?i:s,x=a(d,p);if(x!==void 0)return x}}},r=a(t,null);return r===void 0?null:r}import{decodePartId as JD}from"efficient-easel/draw";function ba(e,o){let t=dl(e);return t?.control==="textList"?o.rowKey===(t.itemKey??"text")?Qh(t,o.index):null:Hf(e)?.[o.rowKey]??null}function $l(e,o,t){let a=e.node.props,{key:r,row:n}=lo(e.propKey),s=n?FI(a,r,n,e.kind,o):PI(a,r,e.kind,o);return s?(t(e.zone,e.index,{...e.node,props:s}),!0):!1}var eN=["bold","italic","underline","strike","link","sup","sub"],oN=["bullet","number"];function Jc(e,o){return e?[...eN,...o?oN:[]]:[]}function Ny(e,o){let t=JD(e);if(!t?.propKey)return null;let{nodeId:a,propKey:r}=t,n=o.getItemById(a),s=o.getSelectorForId(a);if(!n||!s)return null;let{key:i,row:f}=lo(r),d=o.components[n.type]?.fields?.[i],p=f?ba(d,f):d,x=ia(p);if(!x)return null;let m=n.props??{};if(Bi(m)!==null||!f&&Dy(n.type,m,i)||f&&!(Array.isArray(m[i])&&f.index<m[i].length))return null;let h=f?or(m[i],f):m[i];return{node:n,selector:s,propKey:r,kind:x,stored:h,offPage:$n(p)}}function My(e,o){let t=Ny(e,o);if(!t||t.offPage)return null;let{text:a,hidden:r}=lt(t.stored);if(r)return null;let n=fl(t.kind);return{partId:e,value:a,rules:Ct,multiline:n,offered:Jc(t.kind!=="plainText",n),write:s=>{let i=Ny(e,o);i&&$l({node:i.node,propKey:i.propKey,kind:i.kind,zone:i.selector.zone,index:i.selector.index},s,o.replace)}}}function Hy(e,o,t){return e?.isConnected&&e.getAttribute(so)===t?e:o?.querySelector(`[${so}="${tN(t)}"]`)??null}function tN(e){return e.replace(/["\\]/g,"\\$&")}function Wy(e){let o=e.activeElement;return o?o.tagName==="IFRAME"||!!o.closest(".es-canvas"):!1}var Zc=null,Qc=new Set;function aN(){return Zc}function ed(e){if(e!==Zc){Zc=e;for(let o of Qc)o()}}function rN(e){return Qc.add(e),()=>{Qc.delete(e)}}function zy(){return QD(rN,aN,()=>null)}var fN=["left","center","right","justify"];function td(e,o,t,a={}){let r=nr(e),n=(a.phone?e.sizePhone:void 0)??e.size??o.sizePx;return[a.phone?{...Sr.fontSize,value:e.sizePhone,styleValue:Math.round(o.sizePx),onChange:s=>t({sizePhone:s??null})}:{...Sr.fontSize,value:e.size,styleValue:Math.round(o.sizePx),onChange:s=>t({size:s??null})},{...Sr.lineHeight,value:r.lineHeight,styleValue:o.lineRatio,onChange:s=>t(s===void 0?{lineHeight:null,line:null}:{lineHeight:s})},{...Sr.letterSpacing,scale:n,value:r.letterSpacingEm,styleValue:o.letterEm,onChange:s=>t(s===void 0?{letterSpacing:null,letter:null}:{letterSpacing:s})},{...Sr.paragraphSpacing,value:e.paragraphSpacing,styleValue:0,onChange:s=>t({paragraphSpacing:s??null})},{key:"padding",name:l("Padding"),icon:od(sN,{}),unit:"px",step:Yf,shiftStep:10,min:Kf,max:Vf,value:e.padding,styleValue:o.paddingPx,onChange:s=>t({padding:s??null})},{key:"width",name:l("Width"),icon:od(iN,{}),unit:"px",step:Zf,shiftStep:100,min:Xf,max:it,value:e.width,styleValue:o.widthPx,onChange:s=>t({width:s??null})}]}function Gy({text:e,onTextChange:o,multiline:t,markup:a=!0,styled:r=!0,style:n,base:s,setValue:i,colors:f,placeholder:d,ariaLabel:p,head:x,typedOnCanvas:m=!1}){let h=td(n,s,i),b=Jc(a,t);return nN("div",{className:"sf-part-textbox",children:[x,od(lN,{value:e,onChange:o,multiline:t,placeholder:d,ariaLabel:p,rules:Ct,tools:b,barShows:m?"focus":"always",colors:a?f:[],align:r?{value:n.align??s.align,allow:fN,onChange:S=>i({align:S})}:void 0,letterCase:r?{value:n.case==="capitalize"?"":n.case??"",onChange:S=>i({case:S||null})}:void 0,cells:r?h:void 0})]})}import{UiIcon as fb}from"efficient-easel/draw/client";import{jsx as ql,Fragment as cN,jsxs as dN}from"react/jsx-runtime";import{Button as Uy,Dialog as uN}from"efficient-shell/ui";function $y({styleName:e,onCancel:o,onConfirm:t}){return ql(uN,{open:!0,onClose:o,role:"alertdialog",size:"sm",title:l("Update {style}?",{style:e}),footer:dN(cN,{children:[ql(Uy,{variant:"secondary",onClick:o,children:l("Cancel")}),ql(Uy,{variant:"primary",onClick:t,children:l("Update style")})]}),children:ql("p",{children:l("Every text on the site that follows {style} changes to look like this one. This text\u2019s own changes are cleared, and it keeps following {style}.",{style:e})})})}import{ScreenDocumentContext as HN}from"efficient-easel/screen/components/ScreenDocumentContext";import{usePreviewDevice as WN}from"efficient-easel/draw/client";import{jsx as pN}from"react/jsx-runtime";import{createContext as mN,useContext as xN,useMemo as hN,useState as IN}from"react";var gN={partStyle:null,setPartStyle:()=>{}},qy=mN(gN);function AJ({children:e}){let[o,t]=IN(null),a=hN(()=>({partStyle:o,setPartStyle:t}),[o]);return pN(qy.Provider,{value:a,children:e})}function jy(){return xN(qy)}import{TEXT_FIELD_MARKER as zN}from"efficient-easel/draw";import{useSectionOps as GN}from"efficient-easel/screen/lib/document/use-section-ops";var yN="#9ca3af";function bN(e){return mn.map(o=>({key:o,name:Yp[o],value:e?.[o]||yN}))}function jl(e){return bN(e).map(o=>({name:o.key,label:l(o.name),value:o.value}))}function Vy(e){let o={},t=e.ownerDocument,a=t?.defaultView;if(!t||!a)return o;let r=a.getComputedStyle(e),n=t.createElement("canvas").getContext("2d");for(let s of mn){let i=Qt[s].replace(/^var\((--[\w-]+)\)$/,"$1"),f=r.getPropertyValue(i).trim();if(!f)continue;let d=Ky(f);!d&&n&&(n.fillStyle="#000000",n.fillStyle=f,d=Ky(String(n.fillStyle))),d&&(o[s]=d)}return o}function Ky(e){let o=e.trim().toLowerCase();if(/^#[0-9a-f]{6}$/.test(o))return o;if(/^#[0-9a-f]{3}$/.test(o))return`#${[...o.slice(1)].map(a=>a+a).join("")}`;let t=o.match(/^rgba?\(\s*(\d+)[\s,]+(\d+)[\s,]+(\d+)/);return t?`#${t.slice(1,4).map(a=>Math.min(255,Number(a)).toString(16).padStart(2,"0")).join("")}`:null}var Cr="@name",Yy="@body",Xy="@value",MJ={[Cr]:"Name",[Yy]:"Body",[Xy]:"Value"},SN={TimelineTrack:{"entries.date":Cr,"entries.title":Cr,"entries.blurb":Yy},Footprint:{"offices.city":Cr},Stats:{"items.label":Cr,"items.value":Xy}};function CN(e){let{key:o,row:t}=lo(e);return t?`${o}.${t.rowKey}`:null}function Zy(e,o){if(!e)return o;let t=CN(o);return t?SN[e]?.[t]??o:o}import{useEaselHost as UN}from"efficient-easel/screen/lib/host";function wN(e){let o=new Set([...Object.keys(In[e]??{}),...gn[e]??[]]);for(let[t,a]of Object.entries(xi[e]??{}))a.verb==="snapshot"&&o.add(t);return[...o].sort()}var vN={CollectionCard:"product",FooterMenu:"menu",Gallery:"product",GalleryItem:"product",ProductGrid:"product",ProductHero:"product",SpecTable:"product",Events:"blog",FeaturedCover:"blog",LongRead:"blog",SubscribeBlogs:"blog"},Qy={product:"Synced from the product.",blog:"Synced from the blog post.",menu:"Synced from the site menu."},Jy="Open",eb={product:{type:"storefront-editor:open-product",needsSlug:!0},blog:{type:"storefront-editor:open-post",needsSlug:!0},menu:{type:"storefront-editor:open-menus",needsSlug:!1}};function wr(e){let o=e?.source?.slug;return ne(o)}function vr(e){return vN[e]??null}function ob(e,o){let t=vr(e);return t&&wN(e).includes(o)?t:null}function Kl(e){let o=e?.menu?.id;return ne(o)}var tb="data-sf-spec-region";function $J(e,o,t){if(!e)return;let a=t[e];if(a)return{fontFamily:`var(--font-role-${e})`,fontSize:`var(--size-${a}, ${o.builtIn})`}}function Sa(e){let o=/var\(--size-[A-Za-z]+, ?([0-9.]+px)\)/.exec(e);if(!o)throw new Error(`builtInOf: no --size-* fallback in ${e}`);return o[1]}function kN(e){return`@${e}`}function ad(e,o){if(!o.startsWith("@"))return null;let t=o.slice(1);return t in e?t:null}function TN(e,o){return o&&o in e?o:null}var kr={tag:"text-[length:var(--size-label,13px)]",name:"text-[length:min(var(--size-headingMedium,48px),var(--sf-heading-max,9999px))]",namePhone:"max-[800px]:text-[length:min(var(--size-headingMedium,36px),var(--sf-heading-max,9999px))]",body:"text-[length:var(--size-body,14px)]",price:"text-[length:var(--size-label,15px)]",link:"text-[length:var(--size-label,14px)]"},PN={tag:{label:"Tag",follows:"Labels",builtIn:Sa(kr.tag),writable:!0},name:{label:"Name",follows:"Heading 2",builtIn:Sa(kr.name),writable:!0},body:{label:"Body",follows:"Body",builtIn:Sa(kr.body),writable:!0},price:{label:"Price",follows:"Labels",builtIn:Sa(kr.price),writable:!0},link:{label:"Link",follows:"Labels",builtIn:Sa(kr.link),writable:!0}},ab=PN;var EN={number:{label:"Number",follows:"Labels",builtIn:"14px",writable:!0},question:{label:"Question",follows:"Body",builtIn:"18px",writable:!0},answer:{label:"Answer",follows:"Body",builtIn:"15px",writable:!0}},rb=EN;var ZJ=tb,nb={rowLabel:{label:"Spec row name",follows:"Labels",builtIn:"14px"},rowValue:{label:"Spec row value",follows:"Labels",builtIn:"14px"},diagramTitle:{label:"Diagram title",follows:"Labels",builtIn:"12px"},diagramCallout:{label:"Diagram measurement",follows:"Labels",builtIn:"12px"},diagramStatLabel:{label:"Diagram stat name",follows:"Labels",builtIn:"11px"},diagramStatValue:{label:"Diagram stat value",follows:"Labels",builtIn:"11px"}};var lb={SpecTable:nb,FAQ:rb,Collections:ab};function sb(e){return e&&Object.hasOwn(lb,e)?lb[e]:null}function ld(e){return e?l(e):null}function cb(e){return e.kind==="role"?Os[e.role]:e.kind==="custom"?"Custom":null}function $N(e){let o=e.role;return o&&Bo.includes(o)?{kind:"role",role:o}:null}function qN(e,o){if(!e)return{kind:"unread"};let{faceRole:t,base:a}=e;if(o[t]===a.fontKey)return{kind:"role",role:t};let r=Object.keys(o).filter(n=>o[n]===a.fontKey);return r.length===1?{kind:"role",role:r[0]}:{kind:"custom"}}function nd(e,o,t,a){return $N(yl(e,o))??qN(t,a)}function jN(e,o){if(!e.length)return null;let t=o(e[0]);return e.every(a=>o(a)===t)?t:null}var Vl="";function KN({face:e,base:o,onPick:t}){let a=e.kind==="role"?e.role:Vl,r=[{label:l("No style"),value:Vl},...Bo.map(n=>({label:l(Os[n]),value:n}))];return U(LN,{ariaLabel:l("Style"),value:a,options:r,inline:!0,onChange:n=>t(n===Vl?null:n),renderOption:n=>n.value===Vl?Fo(sd,{children:[U("span",{className:"es-fsel-label sf-part-style-keep",children:n.label}),U("span",{className:"sf-part-style-aside","aria-hidden":"true",children:l("Section\u2019s own")})]}):U("span",{className:"es-fsel-label",style:{fontFamily:`var(--font-role-${n.value})`},children:n.label}),renderValue:()=>U("span",{style:{fontFamily:o?.fontKey?`var(${Vt(o.fontKey)?.cssVar})`:void 0,fontWeight:o?.weight},children:ld(cb(e))}),valueText:n=>ld(cb(e))??n?.label??""})}function VN({sectionName:e,onBack:o,textEditor:t,styleRow:a,children:r}){return Fo("div",{className:"sf-part-panel",children:[U(Yl,{inline:!0,name:l(e),onSelect:o}),t,a,r]})}function Xl({source:e,slug:o,menuId:t}){let a=UN(),r=eb[e],n=!r.needsSlug||!!o;return U("div",{className:"sf-note sf-note--source",children:Fo("p",{className:"es-field-hint sf-hint-keep",children:[l(Qy[e]),n?Fo(sd,{children:[" ",U("button",{type:"button",className:"sf-source-open",onClick:()=>{r.type==="storefront-editor:open-menus"?a.send(r.type,{menuId:t??null}):o&&a.send(r.type,{slug:o})},children:l(Jy)})]}):null]})})}var db=4,YN=120;function XN({region:e,sizePx:o,face:t,base:a,onFollowStyle:r,source:n,slug:s,onBack:i}){let f=e.follows;return Fo("div",{className:"sf-note",children:[U("p",{children:U("strong",{children:l(e.label)})}),U("p",{children:o?l("Its size follows Styles \u25B8 {follows} \u2014 {px}px right now.",{follows:l(f),px:Math.round(o)}):l("Its size follows Styles \u25B8 {follows}.",{follows:l(f)})}),r?U(sd,{children:U(RN,{label:l("Style"),icon:U(BN,{}),hint:l("Every {part} in this section follows it. The face and the size change; the letter case is the section\u2019s own and stays as it is.",{part:l(e.label).toLowerCase()}),children:U(KN,{face:t,base:a,onPick:r})})}):U("p",{className:"es-field-hint sf-hint-keep",children:l("Only the size follows a site style. This section sets its own font, weight and letter case.")}),n?U(Xl,{source:n,slug:s}):null,U(Yl,{inline:!0,name:l("Page"),onSelect:i})]})}function ZN({onBack:e}){return Fo("div",{className:"sf-note",children:[U("p",{children:U("strong",{children:l("This part is no longer here.")})}),U("p",{children:l("The section it belonged to has been changed or removed.")}),U(Yl,{inline:!0,name:l("Page"),onSelect:e})]})}function QN({onBack:e,partId:o,why:t}){return Fo("div",{className:"sf-note",children:[U("p",{children:U("strong",{children:l("This part's settings did not open.")})}),U("p",{children:l("The words are still on your page and nothing has been lost. The editor could not work out which control belongs to them, which is a fault on our side. Go back and click the section to open its settings instead.")}),U("p",{className:"sf-note-detail",children:Fo("code",{children:[o," \u2014 ",t]})}),U(Yl,{inline:!0,name:l("Page"),onSelect:e})]})}function ub({nodeId:e,propKey:o,onBack:t,onEditStyle:a}){let{getItemById:r,getSelectorForId:n,config:s}=DN(W=>W),i=GN(),f=zy(),{partStyle:d}=jy(),{fonts:p,textStyles:x}=K(),m=FN(HN),h=!m?.capabilities?.hasSiteTheme,{persist:b}=Jt({themeFromDocument:h,tokenRef:m?.tokenRef,siteId:m?.siteId??null}),S=vl({themeFromDocument:h,persist:b}),[T,F]=ib(!1),C=WN()==="mobile",g=ON(null),I=r(e),P=n(e),E=I?s.components[I.type]:void 0,{key:k,row:A}=lo(o),B=E?.fields?.[k],H=A?ba(B,A):B,v=pl(e,o),O=I?.props??{},N=ia(H),_=$n(H),M=_I(H),q=I?vr(I.type):null,le=I?ob(I.type,k):null,Ye=A?or(O[k],A):O[k],co=!!A&&!(Array.isArray(O[k])&&A.index<O[k].length);rd(()=>{Wy(document)||g.current?.querySelector(".es-copy [contenteditable='true'], .es-copy textarea, .sf-copybox textarea, .sf-copybox input")?.focus()},[v]);let[_e,uo]=ib(0);rd(()=>uo(0),[v]);let Me=!!I&&!co&&(!P||!H);rd(()=>{if(!Me||_e>=db)return;let W=setTimeout(()=>uo(ge=>ge+1),YN);return()=>clearTimeout(W)},[Me,_e]);let Ee=Me&&_e<db;if(!I||co)return U(ZN,{onBack:t});let Ie=sb(I.type),ye=Ie?ad(Ie,o):null;if(Ie&&ye){let W=d?.partId===v?d:null,ge=Ie[ye],go=ge.writable===!0&&!!P,jo=Fs=>{P&&i.replaceComponent(P.zone,P.index,{...I,props:ua(O,o,"role",Fs)})};return U(XN,{region:ge,sizePx:W?.base.sizePx??null,face:nd(O,o,W,p),base:W?.base??null,onFollowStyle:go?jo:void 0,source:q,slug:wr(O),onBack:t})}if(!P||!H)return Ee?U("div",{className:"sf-note","aria-busy":"true"}):U(QN,{onBack:t,partId:v,why:P?"no field":"no selector"});let He=W=>{i.replaceComponent(P.zone,P.index,{...I,props:W})},Fe=W=>{if(lt(W).hidden!==lt(Ye).hidden||!N){let ge=A?Wf(O,k,A,W):{...O,[k]:W};ge&&He(ge);return}$l({node:I,propKey:o,kind:N,zone:P.zone,index:P.index},lt(W).text,i.replaceComponent)},po=Ye,We=d?.partId===v?d:null,$e=We?.styleOwner,mo=$e?r($e.owner):null,xo=$e&&mo?n($e.owner):null,Ao=!!($e&&mo&&xo),Xe=Ao?mo.props??{}:O,ho=Ao?W=>i.replaceComponent(xo.zone,xo.index,{...mo,props:W}):He,R=Ao?$e.kind:Zy(I?.type,o),Y=yl(Xe,R),j=[{partKey:R,face:nd(Xe,R,We,p),sizeGroup:We?.sizeGroup??null,base:We?.base??eM,style:Y}],Oe=jN(j,W=>W.sizeGroup),Io=jl(We?.inks),Ze=(W,ge)=>{let go=Xe;for(let jo of j)go=ua(go,jo.partKey,W,ge);ho(go)},jt=W=>W?Ze("textStyle",W):Le({textStyle:null,role:null}),Le=W=>{let ge=Xe;for(let go of j)for(let[jo,Fs]of Object.entries(W))ge=ua(ge,go.partKey,jo,Fs??null);ho(ge)},Ro=N==="text"||N==="textarea",{text:Xr,hidden:Kt}=lt(Ye),Zr=H?.[zN]?.label??o,pu=Kt?l("Show {label} on the slide",{label:l(Zr)}):l("Hide {label} on the slide",{label:l(Zr)}),mu=Fo("div",{className:"sf-field-head",children:[U(_N,{}),U("span",{className:"sf-field-label sf-field-label--inline",children:l(Zr)}),Ro&&U(MN,{content:pu,children:U("button",{type:"button",className:"sf-field-eye","aria-pressed":Kt,"aria-label":pu,onClick:()=>Fe({text:Xr,hidden:!Kt}),children:Kt?U(fb,{name:"eye-off",size:14}):U(fb,{name:"eye",size:14})})})]}),xu=!_&&M,uv=!!N&&(_h(H)||_||Kt||!M),hu=nd(Xe,R,We,p),pv=hu.kind==="role"?hu.role:null,Es=qI(Y)??sg(pv),Iu=ft(S.saved,S.old),mv=Object.entries(Y).filter(([W,ge])=>W!=="role"&&W!=="textStyle"&&ge!==void 0).length,xv=()=>{let W=Xe;for(let ge of j){let{role:go,textStyle:jo}=ge.style;W=XI(W,ge.partKey),go&&(W=ua(W,ge.partKey,"role",go)),jo&&(W=ua(W,ge.partKey,"textStyle",jo))}ho(W)},xt=Es,hv=ig(j[0].style),Iv=xt?Iu.find(W=>W.id===xt)?.name??xt:"",gv=()=>{F(!1),xt&&(S.write(fg({saved:S.saved,old:S.old,styleId:xt,values:ac(j[0].style)}),!0),xv())};return Fo(VN,{sectionName:E?.label??I.type,onBack:t,textEditor:U("div",{ref:g,className:"sf-part-text",children:uv?U(Gy,{text:Xr,onTextChange:W=>Fe(Ro?{text:W,hidden:Kt}:W),multiline:fl(N),markup:N!=="plainText",styled:!1,style:j[0].style,base:j[0].base,setValue:Le,colors:Io,placeholder:ld(TI(H))??void 0,ariaLabel:l(Zr),head:mu,typedOnCanvas:f===v}):N?Ro?mu:null:U(AN,{field:H,name:o,value:po,onChange:Fe,id:`sf-part-${e}-${o}`})}),children:[le&&U(Xl,{source:le,slug:wr(O),menuId:Kl(O)}),xu&&U(NN,{style:{value:Es??"",options:[{value:"",label:l("No style"),description:l("Section\u2019s own")},...Iu.map(W=>({value:W.id,label:W.name,description:W.values.font?Vt(W.values.font)?.label:void 0}))],onChange:W=>jt(W||null),changed:mv>0,onEditStyles:a,onUpdateStyle:xt&&hv?()=>F(!0):void 0},font:{value:Y.font??"",styleValue:Vt(j[0].base.fontKey)?.label,options:Qe.map(W=>({label:W.label,value:W.key})),onChange:W=>Ze("font",W||null)},italic:{value:Y.italic,styleValue:JN(x,Es),onChange:W=>Ze("italic",W??null)},cells:td(j[0].style,j[0].base,Le,{phone:C}),align:{value:Y.align??"",styleValue:j[0].base.align,onChange:W=>Ze("align",W||null)},letterCase:{value:Y.case??"",styleValue:j[0].base.case,onChange:W=>Ze("case",W||null)}}),T&&xt&&U($y,{styleName:Iv,onCancel:()=>F(!1),onConfirm:gv}),xu&&Oe===null&&U("p",{className:"es-field-hint sf-hint-keep",children:l("Fixed size \u2014 the site\u2019s Text setting doesn\u2019t resize this.")})]})}function JN(e,o){return!o||!Array.isArray(e)?!1:e.find(t=>t?.id===o)?.values?.italic===!0}var eM={fontKey:"",sizePx:16,weight:400,lineRatio:1.4,letterEm:0,align:"left",case:"none",paddingPx:0,widthPx:it};import{jsx as io,jsxs as id,Fragment as oM}from"react/jsx-runtime";import{useCallback as tM,useRef as aM,useState as Tr}from"react";import{InspectorIconButton as rM}from"efficient-easel/chrome";import{PopupMenu as nM,PopupMenuItem as lM,PopupMenuLabel as Zl}from"efficient-shell/ui";import{CopyToPageIcon as sM}from"efficient-easel/icons";import{useEaselSession as iM}from"efficient-easel/screen/lib/session-context";import{cloneNodeWithFreshIds as fM}from"efficient-easel/screen/lib/document/section-doc";import{FOOTER_TYPE as cM}from"efficient-easel/draw";function pb({node:e,currentSlug:o,siteId:t,tokenRef:a,runAuthed:r,onNotify:n}){let[s,i]=Tr(!1),[f,d]=Tr(null),p=iM(),[x,m]=Tr(!1),[h,b]=Tr(null),S=aM(null),[T,F]=Tr(null),C=tM(async()=>{if(p.usesBridgedToken&&!a.current){m(!0);return}try{d(await Ce(p).pages.list(t?{siteId:t}:void 0))}catch{m(!0)}},[a,t,p]),g=()=>{if(s){i(!1);return}let E=S.current?.getBoundingClientRect();E&&F({top:E.bottom+6,right:Math.max(8,window.innerWidth-E.right)}),d(null),m(!1),C(),i(!0)},I=(f??[]).filter(E=>E.slug!==o),P=async E=>{if(h)return;b(E.slug);let k=fM(e),A=p.documentHooks?.storedNode?.(k)??k,B=Ce(p).pages,H=await r(async()=>{let v=await B.load({id:E.id});if(!v)throw new Error(`Page "${E.slug}" no longer exists.`);let O=v.layout??{},N=Array.isArray(O.content)?[...O.content]:[],_=N.findIndex(M=>M?.type===cM);N.splice(_===-1?N.length:_,0,A),await B.save(E.id,{layout:{root:{},zones:{},...O,content:N}},{version:v.version,clientId:""})});b(null),i(!1),n?.(H?l("Duplicated to \u201C{name}\u201D",{name:E.label}):l("Couldn\u2019t duplicate the section \u2014 please retry"),H?"success":"error")};return id(oM,{children:[io("span",{"data-menu-toggle":!0,style:{display:"contents"},children:io(rM,{buttonRef:S,label:l("Duplicate to another page"),hasPopup:"menu",expanded:s,onClick:g,children:io(sM,{size:15})})}),s&&T&&io(nM,{portal:!0,style:{top:T.top,right:T.right},onClose:()=>i(!1),children:id("div",{role:"menu","aria-label":l("Duplicate to page"),children:[io(Zl,{children:l("Duplicate to page")}),x?io(Zl,{children:l("Couldn\u2019t load pages")}):f===null?io(Zl,{children:l("Loading\u2026")}):I.length===0?io(Zl,{children:l("No other pages")}):I.map(E=>id(lM,{role:"menuitem",disabled:h!==null,onClick:()=>{P(E)},children:[io("span",{className:"min-w-0 flex-1 truncate",children:E.label}),h===E.slug?io("span",{className:"shrink-0 text-xs",children:l("Copying\u2026")}):E.draft&&io("span",{className:"shrink-0 text-xs",children:l("draft")})]},E.id))]})})]})}import{useScreenDocument as h2}from"efficient-easel/screen/components/ScreenDocumentContext";import{useSectionOps as I2}from"efficient-easel/screen/lib/document/use-section-ops";import{SELECTION_MODE as Vte,isSelectionMode as vd}from"efficient-easel/screen/lib/screen-parts";import{usePreviewParts as g2}from"efficient-easel/draw/client";import{jsx as Pr,jsxs as dM}from"react/jsx-runtime";import{SettingsDrill as uM}from"efficient-easel/panel";import{UiIcon as pM}from"efficient-easel/draw/client";var mM="Not shown on the page";function xM({part:e,onOpen:o}){return Pr(uM,{name:l(e.label),preview:e.offPage?l(mM):e.preview||l("Empty"),offPage:e.offPage,status:e.hidden?Pr("span",{className:"sf-entry-eye",role:"img","aria-label":l("Hidden on the page"),children:Pr(pM,{name:"eye-off",size:14})}):void 0,onOpen:()=>o(e.key)})}function fd(e){return e.filter(o=>!o.identifier)}function mb({parts:e,onOpen:o,heading:t=!0}){let a=fd(e);return a.length?dM("div",{className:"sf-entries",children:[t?Pr("h3",{className:"sf-entries-head",children:l("Text")}):null,a.map(r=>Pr(xM,{part:r,onOpen:o},r.key))]}):null}import{HEADER_TYPE as y2,ROOT_ZONE as eS}from"efficient-easel/draw";import{HEADER_TYPE as Ne,FOOTER_TYPE as ce,newNodeId as hM}from"efficient-easel/draw";function Ql(){return{type:Ne,props:{id:hM(Ne)}}}var xb=[{type:"FooterLogo",label:"Logo"},{type:"FooterMenu",label:"Menu"},{type:"FooterText",label:"Text"},{type:"FooterEmailSignup",label:"Email Form"},{type:"FooterSocial",label:"Social Logos"},{type:"FooterPayment",label:"Payment Logos"},{type:"FooterGroup",label:"Footer Box"}],IM=xb.filter(e=>e.type!=="FooterLogo"&&e.type!=="FooterGroup"),gM="FooterGroup",hb="blocks";function Ib(e){return e===ce?xb:e===gM?IM:null}function Jl(){let e=(o,t)=>({type:o,props:{id:`${o}-${crypto.randomUUID()}`,...t}});return[e("FooterLogo",{widthPct:100,align:"left",tagline:""}),e("FooterEmailSignup",{...Ym}),e("FooterPayment",{...Xm})]}var de="SiteHeader",ie="SiteFooter",cd="sections",loe=[de,ie],Ca=e=>e===de||e===ie,gb=e=>`${e}:${cd}`;function yb(e,o,t=[]){return{type:e,props:{id:o,[cd]:t}}}var yM=new Set(["Footer",de,ie]);function wa(e){let o=new Set,t=!1,a=e.filter(r=>{let n=r?.type??"";return n==="Header"?(t=!0,!1):yM.has(n)?o.has(n)?(t=!0,!1):(o.add(n),!0):!0});return t?a:e}function es(e,o){return e.some(t=>t?.type===o.type)?e:o.type===de?[o,...e]:[...e,o]}var bb={[de]:{max:3,takes:["Flex","Ticker"]},[ie]:{max:6,takes:["Flex","Prose","Logos","Divider"]}};function Sb(e,o,t){if(!Ca(e))return!0;let a=bb[e];return t<a.max&&a.takes.includes(o)}function Cb(e,o){let t=o,a=t?.props?.id;if(a==null)return null;let r=e?.content;if(!Array.isArray(r))return null;for(let n of r){if(!Ca(n?.type))continue;let s=n.props?.[cd];if(!Array.isArray(s)||!s.some(f=>f?.props?.id===a))continue;let i=bb[n.type];return i.takes.includes(t?.type??"")?s.length>=i.max?{group:n.type,why:"full"}:null:{group:n.type,why:"type"}}return null}function dd(e){switch(e?.type){case de:case ie:return l("On every page");case Ne:case ce:return l("On every page \xB7 old style");default:return null}}var wb=()=>null,vb=()=>l("Changed on every page");function os(e,o){let t=gp(e,o);if(t)return t;let a=Cb(e,o);if(!a)return null;let r=a.group===de;return a.why==="type"?r?l("The header cannot take another one of these"):l("The footer cannot take another one of these"):r?l("The header holds at most 3 sections"):l("The footer holds at most 6 sections")}import{jsx as as,Fragment as EM,jsxs as FM}from"react/jsx-runtime";import{useState as OM}from"react";import{createNode as LM,newId as AM}from"efficient-easel/data";import{useEasel as RM}from"efficient-easel/easel";import{Banner as BM,Button as ud}from"efficient-shell/ui";import{useScreenDocument as _M}from"efficient-easel/screen/components/ScreenDocumentContext";var ts="Flex",bM={FooterMenu:"MenuBlock",FooterEmailSignup:"EmailFormBlock",FooterSocial:"SocialLogosBlock",FooterPayment:"PaymentLogosBlock"},SM=e=>{let{id:o,...t}=e;return t},kb=e=>typeof e=="string"?e:"",Tb={sm:12,md:13,lg:15},CM="md",Pb=1.5,wM={size:13,lineHeight:Pb,width:280},vM=14,kM=40,TM=e=>e==="center"||e==="right"?e:"left";function PM(e){let o={},t=[["padTop","sectionPaddingTop"],["padRight","sectionPaddingRight"],["padBottom","sectionPaddingBottom"],["padLeft","sectionPaddingLeft"]];for(let[a,r]of t){let n=ee(e[a]);n&&(o[r]=n)}return o}function Eb(e,o){let t=e.props??{},a=bM[e.type];if(a)return[o(a,SM(t))];switch(e.type){case"FooterLogo":{let r=TM(t.align),n=o("LogoBlock",{...t.reverse?{reverse:t.reverse}:{},...typeof t.customColor=="string"&&t.customColor?{customColor:t.customColor}:{},heightPx:Math.round($u*((ee(t.widthPct)??100)/100)),href:"/",align:r,...PM(t)}),s=kb(t.tagline).trim();return s?[n,o("Text",{text:s,tone:"dim",align:r,_partStyles:{text:{...wM}}})]:[n]}case"FooterText":{let r=typeof t.size=="string"&&t.size in Tb?t.size:CM;return[o("Text",{text:kb(t.text),tone:typeof t.tone=="string"?t.tone:"default",_partStyles:{text:{size:Tb[r],lineHeight:Pb}}})]}case"FooterDivider":{let r=ee(t.thickness),n=ee(t.lengthPct);return[o("Divider",{...r!==void 0?{thickness:r}:{},...n!==void 0?{lengthPct:n}:{},...t.hideOnMobile===!0?{hideOnMobile:!0}:{}})]}case"FooterGroup":{let r=Array.isArray(t.blocks)?t.blocks:[];return[o(ts,{direction:t.direction==="horizontal"?"row":"column",gap:ja("FooterGroup",t.gap),align:t.align==="center"||t.align==="end"?t.align:"start",...Ki,content:r.flatMap(n=>Eb(n,o))})]}default:return[]}}function Er(e,o,t){let a=e&&Array.isArray(e.props?.blocks)?e.props.blocks:[],r=d=>o(ts,{direction:"row",wrap:!0,share:"equal",gap:kM,content:d}),n=[],s=[];for(let d of a){let p=Eb(d,o);if(d.type==="FooterDivider"){s.length&&n.push(r(s)),s=[],n.push(...p);continue}p.length<=1?s.push(...p):s.push(o(ts,{direction:"column",gap:vM,align:"stretch",...Ki,content:p}))}(s.length||!n.length)&&n.push(r(s));let i=o(ts,{direction:"column",content:[o("LegalLineBlock")]}),f=yb(ie,t,[...n,i]);return{...f,props:{...f.props,...e?.props?.width==="full"?{fullWidth:!0}:{}}}}function Fb(){let{appState:e,dispatch:o,config:t}=RM(p=>p),{readOnly:a}=_M(),[r,n]=OM(!1),s=e.data.content;if(a||s.some(p=>p.type===ie))return null;let i=s.find(p=>p.type===ce)??null,f=(p,x)=>LM(t,p,x),d=()=>{let p=Er(i,f,AM(ie));o({type:"setData",data:x=>({...x,content:[...es(x.content,p)]}),recordHistory:!0}),n(!1)};return as(BM,{tone:"info",title:l("This footer uses the old layout"),action:r?FM(EM,{children:[as(ud,{variant:"primary",size:"sm",onClick:d,children:l("Switch now")}),as(ud,{variant:"secondary",size:"sm",onClick:()=>n(!1),children:l("Cancel")})]}):as(ud,{variant:"secondary",size:"sm",onClick:()=>n(!0),children:l("Switch to Box footer")}),children:l("Build this footer out of Boxes and blocks, like a page: the same menus, signup, social links and logo, with the copyright as a Legal Line. Your current footer is kept.")})}import{jsx as Cd}from"react/jsx-runtime";import{useLayoutEffect as ZM,useMemo as yd,useRef as QM,useState as bd}from"react";import{useEasel as JM,useSelectedFields as e2}from"efficient-easel/easel";import{Inspector as o2,planFields as Vb}from"efficient-easel/fields";import{jsx as va}from"react/jsx-runtime";import{usePreviewDevice as DM}from"efficient-easel/draw/client";import{NoControlMark as Ob,noControlField as Lb}from"efficient-easel/screen/lib/document/panel-no-control-mark";var pd=e=>l(Ho[e==="content"?"page":"full"]),Ab=e=>`${e} ${l("from Styles")}`;function Rb(){let{siteWidth:e,sectionBackgroundWidth:o,sectionContentWidth:t}=K();return{px:typeof e=="number"?e:xe.default,background:o??"full",content:t??"content"}}function Bb(){try{return DM()==="mobile"}catch{return!1}}function NM({type:e,onChange:o}){let t=Po(),a=Rb(),r=Bb(),n=sf(e,t).background;return va(sl,{value:n??a.background,changed:n!==null,detail:Ab(pd(a.background)),onChange:s=>o(s),onReset:()=>o(Va),disabled:r})}function MM({type:e}){let o=Po(),t=bn(),a=Rb(),r=Bb(),n=sf(e,o),s=(n.background??a.background)==="content",i=n.content??a.content;return va(il,{mode:s&&i==="full"?"content":i,px:n.contentMax??a.px,max:s?a.px:xe.max,changed:n.content!==null,detail:Ab(a.content==="full"?pd("full"):`${pd("content")} ${a.px}px`),fullClosed:s,disabled:r,hint:r?wI:s?bI:void 0,onMode:f=>t(f==="full"?{contentWidth:f,contentMax:null}:{contentWidth:f}),onPx:f=>t({contentWidth:"content",contentMax:f}),onReset:()=>t({contentWidth:Va,contentMax:null})})}function HM(e){return st({_gWidth:Te(yI),backgroundWidth:{type:"custom",render:({onChange:o})=>va(NM,{type:e,onChange:o})},contentWidth:{type:"custom",render:()=>va(MM,{type:e})},contentMax:{...Lb({type:"custom",render:()=>va(Ob,{})},"always"),reachedBy:"contentWidth"},widthMode:{...Lb({type:"custom",render:()=>va(Ob,{})},"always"),reachedBy:"backgroundWidth"}})}var _b=Object.keys(HM(""));import{deviceField as WM,deviceMetaOf as Nb}from"efficient-easel/screen/lib/document/device-fields";import{DESIGN_GROUPS as xd,SETTINGS_BUCKETS as zM}from"efficient-easel/panel";import{BUCKET_KEY as Ge,DESIGN_GROUP_KEY as Fr}from"efficient-easel/screen/lib/document/field-buckets";var Or=zM;var GM="Editor only \u2014 not shown live",hd={"Archive link":"Content",Article:"Content",Blocks:"Content","Blog posts":"Content","Browser mock":"Content",Button:"Content","Call to action":"Content","Car prompt":"Content","Card link":"Content",Cards:"Content","Claims bars":"Content","Contact info":"Content",Content:"Content","Content source":"Content",Contents:"Content",Filters:"Content","Show on a card":"Content",Footnote:"Content",Form:"Content",Founders:"Content","Gallery A":"Content","Gallery B":"Content","Gallery link":"Content",Header:"Content","Header link":"Content","Image caption":"Content","In this issue":"Content",Items:"Content","Kanban columns":"Content",Lead:"Content","Left panel":"Content",Link:"Content",Links:"Content",List:"Content","Message form":"Content",Metadata:"Content",Milestones:"Content","Mockup card":"Content","Newsletter panel":"Content",Offices:"Content",Options:"Content","Others gallery":"Content","Overlay button":"Content",Product:"Content","Product page":"Content",Products:"Content","Pull quote":"Content",Questions:"Content","Recent issues":"Content","Recent posts":"Content",Reviews:"Content","Right panel \xB7 actions":"Content","Right panel \xB7 choices":"Content","Right panel \xB7 form":"Content","Routing groups":"Content",Rows:"Content",Search:"Content",Section:"Content","Section header":"Content",Sections:"Content","Signup form":"Content","Source product":"Content","Stat & note":"Content",Stats:"Content","Submit button":"Content","Success state":"Content",Wheel:"Content",Terminal:"Content",Text:"Content","Text column":"Content","Timeline entries":"Content","Top row":"Content",Total:"Content","Trailing note":"Content","\u201COther\u201D reason":"Content","Background images":"Design",Gallery:"Content",Image:"Content","Image column":"Content",Images:"Content",Logo:"Content",Media:"Content","Background image":"Design",Color:"Design","Image tint":"Design",Style:"Design",Shape:"Design",Shadow:"Design",Texture:"Design","Text style":"Design",Motion:"Animation",Anchor:"Anchor",Arrangement:"Layout","Auto-slide":"Layout",Bar:"Layout","Cell width":"Size",Behavior:"Layout",Schedule:"Layout",Controls:"Layout",Diagram:"Layout",[GM]:"Layout","Filters shown":"Layout","Slide picker":"Layout",Arrows:"Layout","On a phone":"Layout",Placement:"Position",Nudge:"Position","Stick to top":"Position","Image gallery":"Layout",Grid:"Layout",Layout:"Layout",Padding:"Layout",Price:"Layout",Preview:"Layout",Setup:"Layout","Show / hide elements":"Layout","Show in the buy box":"Layout",Visibility:"Layout",Width:"Size",Height:"Size"},Mb={"AlloyWheelsListing._gCards":"Design","ProductGrid._gCards":"Design"},Hb={"Text._gSpacing":"Size","Heading._gSpacing":"Size"};function md(e,o,t){let a=`${e}.${o}`;return Hb[a]??Mb[a]??hd[t]}function Wb(e){return e==="Animation"?[Ge.Animation]:[Ge.Design,Fr[e]]}function rs(...e){let o=[];for(let t of e)for(let a of Object.values(t)){let r=Nb(a),n=To(r?r.inner:a),s=n?hd[n.label]:void 0;if(s)for(let i of Wb(s))o.includes(i)||o.push(i)}return o}var qoe=[...rs(Xn(),Zn("full"),Qn(),Jn(),wf()),...Object.keys(Xn()),...Object.keys(Zn("full")),...Object.keys(Qn()),...Object.keys(Jn()),...Object.keys(wf()),..._b],joe=[...rs(jn()),...Object.keys(jn())],Koe=[...rs(Vn()),...Object.keys(Vn())],Voe=[...rs(Yn()),...Object.keys(Yn())],UM=Object.keys(Jh()),$M=new Set(["cardImage","imageBackground"]),Yoe=[...Wb(md("ProductGrid","_gCards","Cards")??"Design"),...UM.filter(e=>e.startsWith("_g")||$M.has(e))],Xoe=Object.keys(eI()),Zoe=Object.keys(oI({bottomDefault:!0})),qM={"ImageBlock._gStyle":"duplicated the Style bucket header above it (2026-09-04)","ButtonBlock._gStyle":"duplicated the Style bucket header above it (2026-09-04)","HeroGroup._gContent":"duplicated the Content bucket header above it (2026-09-04)","HeroGroup._gLayout":"duplicated the Layout bucket header above it (2026-09-04)","Footer._gLayout":"duplicated the Layout bucket header above it (2026-09-04)","FooterLogo._gContent":"duplicated the Content bucket header above it (2026-09-04)","FooterLogo._gStyle":"duplicated the Style bucket header above it (2026-09-04)","FooterMenu._gContent":"duplicated the Content bucket header above it (2026-09-04)","FooterMenu._gStyle":"duplicated the Style bucket header above it (2026-09-04)","FooterGroup._gLayout":"duplicated the Layout bucket header above it (2026-09-04)","FooterText._gContent":"duplicated the Content bucket header above it (2026-09-04)","FooterText._gStyle":"duplicated the Style bucket header above it (2026-09-04)","FooterSocial._gStyle":"duplicated the Style bucket header above it (born tabbed, 2026-09-17)","FooterSocial._gLayout":"duplicated the Layout bucket header above it (born tabbed, 2026-09-17)","MenuBlock._gContent":"duplicated the Content bucket header above it (born tabbed, H.1)","MenuBlock._gStyle":"duplicated the Style bucket header above it (born tabbed, H.1)","EmailFormBlock._gContent":"duplicated the Content bucket header above it (born tabbed, H.1)","SocialLogosBlock._gStyle":"duplicated the Style bucket header above it (born tabbed, H.1)","SocialLogosBlock._gLayout":"duplicated the Layout bucket header above it (born tabbed, H.1)","SearchBlock._gStyle":"duplicated the Style bucket header above it (born tabbed, H.2)","CartBlock._gStyle":"duplicated the Style bucket header above it (born tabbed, H.2)","CountrySwitchBlock._gStyle":"duplicated the Style bucket header above it (born tabbed with its Show as, 2026-10-17)","Split._gContent":"duplicated the Content bucket header above it (2026-09-04)","Gallery._gVehicleContent":"duplicated the Content bucket header above it (2026-09-04)","Gallery._gWheelContent":"duplicated the Content bucket header above it (2026-09-04)","Gallery._gOthersContent":"duplicated the Content bucket header above it (2026-09-04)","Subscribe._gHeadCopy":"duplicated the Content bucket header above it (2026-09-04)","Subscribe._gLeftCopy":"duplicated the Content bucket header above it (2026-09-04)","Subscribe._gRightCopy":"duplicated the Content bucket header above it (2026-09-04)","CollectionCard._gContent":"duplicated the Content bucket header above it (A Card Sets Its Own Corners)","HeroSlide._gContent":"duplicated the Content bucket header above it (Hero Slide Tabs And Theme)","KeyFeatures._gContent":"duplicated the Content bucket header above it (66049)","KeyFeatures._gStyle":"duplicated the Style bucket header above it (66049)","ParagraphsA._gContent":"duplicated the Content bucket header above it (66049)","ParagraphsA._gStyle":"duplicated the Style bucket header above it (66049)","Chart._gContent":"duplicated the Content bucket header above it (66049)","Chart._gStyle":"duplicated the Style bucket header above it (66049)","Logos._gContent":"duplicated the Content bucket header above it (66049)","Logos._gStyle":"duplicated the Style bucket header above it (66049)","Mockup._gContent":"duplicated the Content bucket header above it (66049)","Mockup._gStyle":"duplicated the Style bucket header above it (66049)","Stats._gContent":"duplicated the Content bucket header above it (66049)","Stats._gStyle":"duplicated the Style bucket header above it (66049)","StatsParagraph._gContent":"duplicated the Content bucket header above it (66049)","StatsParagraph._gStyle":"duplicated the Style bucket header above it (66049)","Testimonials._gContent":"duplicated the Content bucket header above it (66049)","Testimonials._gStyle":"duplicated the Style bucket header above it (66049)","AppointmentBooking._gContent":"duplicated the Content bucket header above it (66050)","BookingBox._gContent":"duplicated the Content bucket header above it ([SPLIT] Booking Form Into Three Boxes) \u2014 the same fault its own section retired in 66050, one level down","FAQ._gContent":"duplicated the Content bucket header above it (66050, family sweep)","FAQ._gLayout":"duplicated the Layout bucket header above it (66050, family sweep)","Form._gContent":"duplicated the Content bucket header above it (66050)","ReviewForm._gContent":"duplicated the Content bucket header above it (66050)","SubmitBuild._gContent":"duplicated the Content bucket header above it (66050)","SubmitBox._gContent":"duplicated the Content bucket header above it ([SPLIT] SubmitBuild Keeps Its Two Columns) \u2014 the same fault its own section retired in 66050, one level down","CheckoutCTA._gContent":"duplicated the Content bucket header above it (66051)","CheckoutCTA._gLayout":"duplicated the Layout bucket header above it (66051)","DeliveryOptions._gContent":"duplicated the Content bucket header above it (66051)","DeliveryOptions._gLayout":"duplicated the Layout bucket header above it (66051)","OrderSummary._gContent":"duplicated the Content bucket header above it (66051)","OrderSummary._gLayout":"duplicated the Layout bucket header above it (66051)","PaymentBadges._gContent":"duplicated the Content bucket header above it (66051)","PaymentBadges._gLayout":"duplicated the Layout bucket header above it (66051)","Collections._gContent":"duplicated the Content bucket header above it (66052)","Collections._gLayout":"duplicated the Layout bucket header above it (66052)","DocMasthead._gContent":"duplicated the Content bucket header above it (66053)","Events._gContent":"duplicated the Content bucket header above it (66054)","Events._gLayout":"duplicated the Layout bucket header above it (66054)","FeaturedCover._gContent":"duplicated the Content bucket header above it (66054)","Series._gStyle":"duplicated the Style bucket header above it (66054)","Flex._gContent":"duplicated the Content bucket header above it (66055)","Flex._gLayout":"duplicated the Layout bucket header above it (66055)","SectionHeader._gContent":"duplicated the Content bucket header above it (66055)","Breadcrumb._gContent":"duplicated the Content bucket header above it (66056)","CategoryBar._gStyle":"duplicated the Style bucket header above it (66056)","Hero._gContent":"duplicated the Content bucket header above it (66056)","Hero._gStyle":"duplicated the Style bucket header above it (66056)","HeroSingle._gStyle":"duplicated the Style bucket header above it (66056)","IntroBleed._gContent":"duplicated the Content bucket header above it (66056)","IntroBleed._gLayout":"duplicated the Layout bucket header above it (66056)","BundleOffer._gLayout":"duplicated the Layout bucket header above it (66059)","ProcessSteps._gContent":"duplicated the Content bucket header above it (66059)","Banner._gContent":"duplicated the Content bucket header above it (66060.1)","Banner._gLayout":"duplicated the Layout bucket header above it, and governed no controls (66060.1)","Manifesto._gContent":"duplicated the Content bucket header above it (66060.1)","SubscribeBlogs._gHeadCopy":"duplicated the Content bucket header above it (66060.1)","SubscribeBlogs._gLeftCopy":"duplicated the Content bucket header above it (66060.1)","SubscribeBlogs._gRightCopy":"duplicated the Content bucket header above it (66060.1)","Ticker._gContent":"duplicated the Content bucket header above it (66060.1)","Ticker._gStyle":"duplicated the Style bucket header above it (66060.1)","Timeline._gContent":"duplicated the Content bucket header above it (66060.1)","TitleWithButtons._gContent":"duplicated the Content bucket header above it (66060.1)","TitleWithButtons._gStyle":"duplicated the Style bucket header above it (66060.1)","Cards._gContent":"duplicated the Content bucket header above it (66218)","Cards._gStyle":"duplicated the Style bucket header above it (66218)","Prose._gContent":"duplicated the Content bucket header above it (66218)","Reviews._gContent":"duplicated the Content bucket header above it (66218)","Reviews._gStyle":"duplicated the Style bucket header above it (66218)"},zb={Content:["Content"],Size:["Size"],Design:["Design","Style"],Layout:["Layout"],Position:["Position"],Anchor:["Anchor"],Animation:["Animation"]},Gb={_gAnchor:"repeated the Anchor group heading above it (two tabs, 11.0.0)"};{let e={...Xn(),...Zn("full"),...Qn(),...Jn(),...jn(),...Vn(),...Yn()};for(let o of Object.keys(Gb)){let t=To(e[o]),a=t?hd[t.label]:void 0;if(!t||t.level!==2||!a||!zb[a].includes(t.label))throw new Error(`INJECTED_RETIRED (lib/document/field-groups.ts) lists "${o}", but no uniform builder makes a level-2 heading by that key whose label repeats its place's word. The heading was renamed, moved or removed and the row is stale \u2014 a list that quietly matches nothing is worse than no list.`)}}var jM=new Set(["_sContent","_sStyle","_sLayout","_sMedia"]),KM=new Map([[Ge.Design,"Content"],[Ge.Animation,"Animation"],...xd.map(e=>[Fr[e],e])]);function Ub(e){let o=new Set([...Object.values(Ge),Fr.Content]);for(let[t,a]of Object.entries(e))if(!o.has(t)&&To(a)?.level===1)return 1;return 2}function VM(e){let o=`${e}.`;return Object.keys(qM).filter(t=>t.startsWith(o)).map(t=>t.slice(o.length))}function YM(e,o){let t=Nb(e),a=Te(o);return t?WM(t.tier,a):a}function XM(e,o){let t=To(o);return t?e==="Content"||e==="Animation"?Wh(o,t.label):zh(o):o}function Db(e){return e==="Design"?xd:["Animation"]}function Qoe(e,o){let t=[],a=new Set(VM(o)),r=new Set,n=!1,s=null;for(let[m,h]of Object.entries(e)){let b=To(h);if(jM.has(m))throw new Error(`${o}.${m}: that key was a tab header until efficient-web-builder 11.0.0, when the panel moved to two tabs (Design \xB7 Animation). Its tab is gone, so the key may not come back. Give the heading a key of the section's own (\`_g\u2026\`), or open a Design group with its own key (\`_dDesign: section("Design")\`, \`_dLayout: section("Layout")\`).`);let S=KM.get(m);if(S!==void 0){if(b?.level!==1)throw new Error(`${o}.${m}: that key is reserved for the ${S} heading of the settings panel, but this field is ${b?`a level-${b.level} "${b.label}" header`:"not a header"}, so it cannot serve as one. Rename the section's own field.`);(m===Ge.Design||m===Ge.Animation)&&(n=!0),t.push(s={place:S,entries:[],adopted:!0});continue}if(!b){s||t.push(s={place:"Content",entries:[]}),s.entries.push([m,h]);continue}if(a.has(m)||m in Gb){let F=md(o,m,b.label);if(b.level!==2||!F||!zb[F].includes(b.label))throw new Error(`${o}.${m}: ${a.has(m)?"RETIRED":"INJECTED_RETIRED"} (lib/document/field-groups.ts) lists this sub-heading as one whose name repeats the place it sits in, but it is a level-${b.level} "${b.label}" header in the ${F??"(unclassified)"} place. Only a level-2 header whose label is one of its place's words (PLACE_WORDS) may be retired \u2014 anything else is a heading a merchant reads for its own sake. Fix the row or drop it.`);a.has(m)&&r.add(m),t.push(s={place:F,entries:[]});continue}let T=md(o,m,b.label);if(!T)throw new Error(`${o}.${m}: the inspector group "${b.label}" is not classified in LABEL_GROUP (lib/document/field-groups.ts), so there is no way to say which of ${[...xd,"Animation"].join(" / ")} its controls belong under. Classify it \u2014 an unclassified group silently lands wherever it was declared, which is the whole bug.`);t.push(s={place:T,entries:[[m,b.level===2?h:YM(h,b.label)]]})}let i=new Set(Object.entries(e).filter(([,m])=>To(m)).map(([m])=>m));for(let[m,h]of[["BLOCK_KEY_GROUP",Hb],["KEY_GROUP",Mb]]){let b=Object.keys(h).filter(S=>S.startsWith(`${o}.`)).filter(S=>!i.has(S.slice(o.length+1)));if(b.length)throw new Error(`${o}: ${m} (lib/document/field-groups.ts) lists ${JSON.stringify(b)}, but no fold header by that key is in this section's panel. Either the heading was renamed or removed and the row is stale, or the row names the wrong key \u2014 an override that quietly matches nothing is worse than no override.`)}let f=n?[]:[...a].filter(m=>!r.has(m));if(f.length)throw new Error(`${o}: RETIRED (lib/document/field-groups.ts) lists ${JSON.stringify(f)}, but this section has no such fold header${f.length>1?"s":""}. Either the heading was renamed or removed and the row is stale, or the row names the wrong section \u2014 a list that quietly matches nothing is worse than no list.`);let d=new Set(t.filter(m=>m.entries.length>0).map(m=>m.place)),p=Or.filter(m=>Db(m).some(h=>d.has(h))),x={};for(let m of p){x[Ge[m]]=qn(m,m===p[0]?p:null);for(let h of Db(m)){if(!d.has(h))continue;let b=t.filter(T=>T.place===h),S=b.findIndex(T=>T.adopted);S>0&&b.unshift(...b.splice(S,1)),m==="Design"&&(x[Fr[h]]=yf(h));for(let T of b)for(let[F,C]of T.entries)x[F]=XM(h,C)}}return x}function Joe(e){return Ge.Design in e?e:{[Ge.Design]:qn("Design",null),[Fr.Content]:yf("Content"),...e}}function ete(e){return Or.some(o=>Ge[o]in e)}function ote(e){let o=Or.filter(a=>Ge[a]in e);if(o.length===0)return e;let t={...e};for(let a of o)t[Ge[a]]=qn(a,a===o[0]?o:null);return t}import{usePreviewDevice as t2}from"efficient-easel/draw/client";var Id=" text",$b="Text";function gd(e){let o=e.rows.filter(t=>t.shown);return o.length===0||o.length===1&&o[0].labelled}function qb(e){return e.filter(gd).map(o=>o.key)}function jb(e,o){let t=null;for(let a of o){let r=e[a];!r||r.marker!==!0||typeof r.fold!="string"||(t??={...e},t[a]={...r,fold:!1})}return t??e}function Kb(e,o){if(e.size!==o.size)return!1;for(let t of e)if(!o.has(t))return!1;return!0}var Sd=new Map,ns=new Set;function a2(e,o){let t=new Map;for(let r of e.querySelectorAll(".es-insp-row[data-field]"))t.set(r.getAttribute("data-field")??"",r);let a=[];for(let[r,n]of o)a.push({key:r,rows:n.map(s=>{let i=t.get(s),f=!!i&&[...i.children].some(p=>!p.hidden),d=i?.querySelector(".es-field-label, .es-list-label")?.textContent?.trim();return{shown:f,labelled:f&&!!d}})});return a}var r2=Object.fromEntries(Or.map(e=>{let o=Nh[e];return[e,Cd(o,{},e)]}));function Lr({entries:e,entryCount:o=0,part:t=null,omit:a}){let{id:r,fields:n,values:s,readOnly:i,onChange:f}=e2(),d=t2(),{appState:p,config:x}=JM(M=>M),m=dy(d,x,p.data.content??[],p.ui.itemSelector),h=hy(n,t),b=yd(()=>a?.length?Object.fromEntries(Object.entries(h).filter(([M])=>!a.includes(M))):h,[h,a]),S=cy(b,s,m),[T,F]=bd(()=>new Set(ns)),[C,g]=bd(()=>new Set),I=QM(null),P=yd(()=>{let M=new Map;for(let q of Vb(S).rows){if(!q.fold)continue;let le=M.get(q.fold.key)??[];le.push(q.name),M.set(q.fold.key,le)}return M},[S]);ZM(()=>{let M=I.current?.parentElement;if(!M)return;let q=new Set(qb(a2(M,P)));g(le=>Kb(le,q)?le:q)});let E=yd(()=>jb(S,C),[S,C]),k={key:Id,rows:Array.from({length:o},()=>({shown:!0,labelled:!0}))},A=gd(k)?void 0:{key:Id,title:$b},[B,H]=bd(()=>Sd.get(r)),v=Sd.get(r),O=Vb(S).buckets,N=v&&O.includes(v)?v:B&&O.includes(B)?B:O[0],_=N===void 0||Mh(O,N)!==!0;return Cd(o2,{fields:E,values:s,onChange:f,readOnly:i,showWhenContext:{...m,node:s},tab:N,onTab:M=>{Sd.set(r,M),H(M)},tabIcons:r2,idPrefix:r,ariaLabel:l("Section settings"),lead:_?e:null,leadFold:A,closedFolds:T,onFold:(M,q)=>{q?ns.delete(M):ns.add(M),F(new Set(ns))},children:Cd("span",{ref:I,hidden:!0})})}import{jsx as wd,jsxs as n2}from"react/jsx-runtime";import{InspectorUpLevel as Yb}from"efficient-easel/chrome";function Xb({nodeId:e,part:o,sectionName:t,onUpToSection:a}){let{select:r}=Dl();return n2("div",{children:[o!=="media"?wd(Yb,{inline:!0,name:l(ya.media),onSelect:()=>r(hr(e,"media"))}):wd(Yb,{inline:!0,name:l(t),onSelect:a}),wd(Lr,{part:o})]})}import{SettingsSwitch as b2}from"efficient-easel/panel";var Td={kind:"header"},Pd={kind:"website"},tS={kind:"website",tab:xa,revealPageGroup:!0},aS={kind:"chat"},rS={kind:"social"},Ar="Part";function S2(e){return l("Part of {name}",{name:l(e)})}function C2(e,o,t){let a=e.describeNode(o);return{name:t,kindLabel:a?S2(a.label):l(Ar)}}function w2(e){switch(e){case"Header":return{title:l("Header settings belong to a website."),own:l("Each website created from this template sets its own header afterwards.")};case"Appearance":return{title:l("Appearance settings belong to a website."),own:l("Each website created from this template sets its own appearance afterwards.")};case"Live chat":return{title:l("Live chat settings belong to a website."),own:l("Each website created from this template sets its own live chat afterwards.")};case"Social link":return{title:l("Social link settings belong to a website."),own:l("Each website created from this template sets its own social link afterwards.")};default:return{title:l("{what} settings belong to a website.",{what:e}),own:l("Each website created from this template sets its own {what} afterwards.",{what:e.toLowerCase()})}}}function nS({what:e}){let o=w2(e);return Wt("div",{className:"sf-note",children:[oe("p",{children:oe("strong",{children:o.title})}),Wt("p",{children:[l("A template is a blueprint \u2014 it has no website of its own, so there is nothing here to change.")," ",o.own]})]})}function kd(e){let o=xr[e];return{name:ya[e],kindLabel:Ar,icon:o,head:(t,a)=>{if(t.kind!==o)return null;let r=a.describeNode(t.nodeId);if(!r)return null;let n=oS({name:l(Hl(e,r.props)),tier:"part",of:l(r.label)},{partOf:({name:s})=>l("Part of {name}",{name:s})});return{name:n.name,kindLabel:n.kind}},render:(t,a)=>t.kind===o?oe(Xb,{nodeId:t.nodeId,part:e,sectionName:a.describeNode(t.nodeId)?.label??"Hero",onUpToSection:()=>a.onSelectNode(t.nodeId)}):null}}var v2={header:{name:"Header",kindLabel:"Site settings",icon:"header",render:(e,o)=>{let t=o.hostPanels?.header;return t?oe(t,{placeholderMode:o.capabilities.placeholderFrames,tokenRef:o.tokenRef,siteId:o.siteId,websiteName:o.websiteName,onOpenWebsiteSettings:o.onOpenWebsiteSettings,onAuthExpired:()=>o.notifyParent("storefront-editor:auth-expired")}):null}},website:{name:"Appearance",kindLabel:"Site settings",icon:"website",render:(e,o)=>oe(Tl,{initialTab:e.tab,revealPageGroup:e.revealPageGroup,themeFromDocument:!o.capabilities.hasSiteTheme,tokenRef:o.tokenRef,siteId:o.siteId,onNotify:o.onNotify},e.tab??"")},chat:{name:"Live chat",kindLabel:"Site settings",icon:"chat",render:()=>oe(ky,{})},social:{name:"Social links",kindLabel:"Site settings",icon:"social",render:()=>oe(Ly,{unavailable:oe(nS,{what:"Social link"})})},ticker:{name:pr,kindLabel:Ar,icon:"ticker",head:(e,o)=>e.kind==="ticker"?C2(o,e.heroId,l(pr)):null,render:e=>oe(Ry,{heroId:e.kind==="ticker"?e.heroId:""})},heroMedia:kd("media"),heroImage:kd("image"),heroImage2:kd("image2"),part:{name:Ar,kindLabel:Ar,icon:"Text",head:(e,o)=>{if(e.kind!=="part")return null;let t=o.describeNode(e.nodeId);if(!t)return null;let{key:a,row:r}=lo(e.propKey),n=r?ba(t.fields[a],r):t.fields[a],s=OI(l(Gf(xl(n??{},a))),r),i=oS({name:s,tier:"part",of:l(t.label)},{partOf:({name:f})=>l("Part of {name}",{name:f})});return{name:i.name,kindLabel:i.kind}},render:(e,o)=>e.kind==="part"?oe(ub,{nodeId:e.nodeId,propKey:e.propKey,onBack:()=>o.onSelectNode(e.nodeId),onEditStyle:o.onOpenSiteStyles}):null}},k2=new Set(["header","website","chat"]);function T2(e,o){if(e==="selection")return null;let t=v2[e];return k2.has(e)&&!o.hasSiteSettings?{...t,kindLabel:"Not part of a template",render:()=>oe(nS,{what:t.name})}:t}function lS({mode:e,onOpenWebsiteSettings:o,onOpenSiteStyles:t,onOpenPageStyles:a,onSelectNode:r,hideNodeActions:n=!1,onNotify:s,onHidePanel:i}){let{capabilities:f,tokenRef:d,notifyParent:p,currentSlug:x,siteId:m,runAuthed:h,readOnly:b,navigate:S}=h2(),{rows:T}=cr(),F=T?.find(Y=>Y.slug===x)??null,C=i2(),g=Object.keys(C.fields).some(Y=>!Y.startsWith("_")&&!sr.includes(Y)),{websiteName:I}=K(),P=I2({readOnly:b}),{select:E}=g2(),{selectedItem:k,getItemById:A,getSelectorForId:B,config:H,appState:v}=s2(Y=>Y),O=m2(H,k?{type:k.type,props:k.props}:null),N=k?NI(O??H.components[k.type]?.fields,k.props):[],_=Y=>H.components[Y]?.label??Y,M=k?B(k.props.id):void 0,q=T2(e.kind,f),le=x2(),Ye={capabilities:f,tokenRef:d,hostPanels:le.chrome?.panels,describeNode:Y=>{let j=A(Y);if(!j)return null;let Oe=H.components[j.type];return{type:j.type,label:Oe?.label??j.type,fields:Oe?.fields??{},props:j.props??{}}},siteId:m,websiteName:I??null,notifyParent:p,onNotify:s,onOpenWebsiteSettings:o,onOpenSiteStyles:t,onSelectNode:r},co=q?.head?.(e,Ye)??null,_e=yy({kind:F?.kind,pageName:F?.label}),uo=co?.name??(q?l(q.name):k?l(_(k.type)):_e.name),Me=co?.kindLabel??(q?l(q.kindLabel):k?M&&M.zone!==eS?l("Block"):l("Section"):_e.kindLabel),Ee=q?q.icon:k?k.type:"page",Ie=q?null:k?H.components[k.type]?.fields??null:H.root?.fields??null,ye=Ie?Ub(Ie):2,He=vd(e)&&k?vr(k.type):null,Fe=!!k&&!!M&&M.zone===eS&&k.type!==ce&&k.type!==y2,po=os(v?.data,k),We=()=>{po||M&&P.duplicateComponent(M.zone,M.index)},$e=()=>{M&&(P.removeComponent(M.zone,M.index),P.select(null))},mo=k?H.components[k.type]?.defaultProps?.previewHover:void 0,xo=vd(e)&&!!k&&!!M&&mo!==void 0,Ao=xo&&k.props.previewHover===!0,Xe=()=>{!k||!M||P.replaceComponent(M.zone,M.index,{...k,props:{...k.props,previewHover:!Ao}})},[ho,R]=l2(hc);return Wt("div",{className:`es-sidepanel es-sidepanel--right sf-panel sf-panel--right${ho||!(!q&&k)?"":" sf-hints-folded"}`,children:[oe(d2,{icon:oe(Mt,{type:Ee,size:15}),name:uo,kind:Me,actions:!n&&vd(e)&&k&&k.type!==ce?Wt(Zb,{children:[oe(Qb,{label:l("Duplicate section"),title:po??void 0,disabled:po!==null,onClick:We,children:oe(u2,{size:15})}),Fe&&f.hasSiteSettings&&oe(pb,{node:k,currentSlug:x,siteId:m??void 0,tokenRef:d,runAuthed:h,onNotify:s}),oe(Qb,{label:l("Remove section"),danger:!0,onClick:$e,children:oe(p2,{size:15})}),i?oe(Jb,{side:"right",onHide:i,divider:!0}):null]}):i?oe(Jb,{side:"right",onHide:i}):void 0}),xo&&Wt("div",{className:"sf-preview-pin",children:[Wt("div",{className:"sf-preview-pin-text",children:[oe("span",{className:"sf-preview-pin-label",children:l("Preview hover state")}),oe("span",{className:"sf-preview-pin-hint",children:l("not shown live")})]}),oe(b2,{checked:Ao,onChange:Xe,ariaLabel:l("Preview hover state")})]}),oe(th,{tier:ye,children:oe("div",{className:"sf-insp-body es-insp-body sf-scroll",children:q?q.render(e,Ye):k?Wt(Zb,{children:[k.type===ce&&f.hasSiteSettings&&oe(Fb,{}),oe(sm,{children:oe(Lr,{entries:oe(mb,{parts:N,heading:!1,onOpen:Y=>E(pl(k.props.id,Y))}),entryCount:fd(N).length})}),He&&oe(Xl,{source:He,slug:wr(k?.props),menuId:Kl(k?.props)}),oe(Ic,{shown:ho,onChange:R})]}):g?oe(Lr,{omit:sr}):oe(c2,{variant:"none",icon:!1,message:l("Select a section or block to edit it."),children:a&&oe(f2,{variant:"secondary",onClick:a,children:l("This page")})})})})]})}import{jsx as c,jsxs as w,Fragment as dS}from"react/jsx-runtime";var Se={dark:"var(--sf-thumb-bar-dark)",soft:"var(--sf-thumb-bar-light)",accent:"var(--sf-thumb-accent)",tint:"var(--sf-thumb-accent-tint)",block:"var(--sf-thumb-block)",line:"var(--sf-thumb-border)",card:"var(--sf-thumb-card)"},Ed="repeating-linear-gradient(135deg,var(--sf-thumb-hatch1) 0,var(--sf-thumb-hatch1) 5px,var(--sf-thumb-hatch2) 5px,var(--sf-thumb-hatch2) 10px)";function D({w:e,h:o,tone:t="dark",r:a=2,style:r}){return c("div",{style:{width:e,height:o,borderRadius:a,background:Se[t],flex:"none",...r}})}var P2={Hero:"hero",HeroSingle:"herosingle",IntroBleed:"intro",Collections:"collections",AlloyWheelsListing:"wheelslisting",CatalogFilterBar:"catalogfilterbar",ProductGrid:"productgrid",FitmentFinder:"fitmentfinder",Gallery:"gallery",GalleryB:"gallerygrid",SpecStrip:"specstrip",ProductHero:"producthero",SpecTable:"spectable",ProcessSteps:"processsteps",DetailRows:"detailrows",FitmentTable:"fitmenttable",CompatibleTyres:"compatibletyres",TyreSizes:"tyresizes",TyreFitment:"tyrefitment",EuTyreLabel:"eutyrelabel",RelatedProducts:"productgrid",BundleOffer:"bundleoffer",OrderSummary:"ordersummary",DeliveryOptions:"deliveryoptions",PaymentBadges:"paymentbadges",CheckoutCTA:"checkoutcta",Manifesto:"manifesto",ParagraphsA:"paragraphs",Prose:"prose",StatsParagraph:"statsparagraph",Chart:"chart",Mockup:"mockup",Footprint:"footprint",Timeline:"timeline",TimelineTrack:"timelinetrack",TitleWithButtons:"titlewithbuttons",Split:"split",Cards:"cards",FAQ:"faq",Testimonials:"testimonials",Masthead:"masthead",Breadcrumb:"breadcrumb",CategoryBar:"categorybar",FeaturedCover:"featuredcover",LongRead:"longread",Series:"series",Subscribe:"subscribe",SubscribeBlogs:"subscribe",Events:"events",DocMasthead:"docmasthead",DocTabs:"doctabs",DocBody:"docbody",DocMetaCards:"docmetacards",Banner:"banner",Stats:"stats",KeyFeatures:"keyfeatures",Logos:"logos",Ticker:"ticker",Countdown:"countdown",Reviews:"reviews",SubmitBuild:"submitbuild",ReviewForm:"reviewform",Form:"form",AppointmentBooking:"appointmentbooking",ContactRouting:"contact",ContactLocations:"contactlocations",Header:"header",Footer:"footer",SectionHeader:"sectionheader",Grid:"grid",Flex:"blanksection",Spacer:"spacer",Divider:"divider",CustomHTML:"customhtml",Heading:"heading",Text:"text",ImageBlock:"image",ButtonBlock:"button",MenuBlock:"menu",EmailFormBlock:"emailform",SocialLogosBlock:"sociallogos",PaymentLogosBlock:"paymentlogos",LegalLineBlock:"legalline",SearchBlock:"search",CartBlock:"cart",CountrySwitchBlock:"countryswitch"},z={position:"absolute",inset:0},u={ink:"var(--sf-thumb-ink)",ink2:"var(--sf-thumb-ink-2)",inkSoft:"var(--sf-thumb-ink-soft)",inkSoft2:"var(--sf-thumb-ink-soft-2)",paper:"var(--sf-thumb-paper)",paper2:"var(--sf-thumb-paper-2)",warm:"var(--sf-thumb-warm)",rust:"var(--sf-thumb-rust)",onInk:"var(--sf-thumb-on-ink)",text:"var(--sf-thumb-scene-text)",muted:"var(--sf-thumb-scene-muted)",rule:"var(--sf-thumb-scene-rule)",mark1:"var(--sf-thumb-mark-1)",mark2:"var(--sf-thumb-mark-2)",card:"var(--sf-thumb-card)",scrim:"var(--sf-thumb-scrim)"},ue=(e,o,t=160)=>({background:`linear-gradient(${t}deg,${e},${o})`});function $o({size:e,style:o}){let t=Math.max(2,Math.round(e*.13)),a=(r,n,s)=>({position:"absolute",inset:r,background:n,borderRadius:t,...s?{mixBlendMode:s}:null});return w("span",{style:{position:"absolute",display:"block",width:e,height:e,...o},children:[c("span",{style:a("8% 26% 30% 6%",u.mark1)}),c("span",{style:a("26% 6% 8% 30%",u.mark2,"multiply")})]})}function ss({children:e}){return c("span",{style:{fontSize:"4.64cqw",fontWeight:700,letterSpacing:"0.06em",textTransform:"uppercase",color:u.muted},children:e})}function sS({over:e,overTone:o,head:t,headSize:a=11.5,cta:r,ctaBg:n,ctaFg:s,tone:i}){return w(dS,{children:[e&&c("span",{style:{fontSize:"3.65cqw",letterSpacing:"0.16em",fontWeight:700,color:o},children:e}),c("span",{style:{fontSize:a,lineHeight:1.15,fontWeight:700,maxWidth:"78%",color:i},children:t}),r&&c("span",{style:{alignSelf:"flex-start",fontSize:"3.65cqw",letterSpacing:"0.12em",fontWeight:700,padding:"4px 8px",borderRadius:2,marginTop:2,background:n,color:s},children:r})]})}function Fd({name:e,price:o}){return w("div",{style:{display:"flex",flexDirection:"column",gap:2,minWidth:0},children:[c("div",{style:{flex:1,minHeight:0,borderRadius:3,position:"relative",overflow:"hidden",...ue(u.paper,u.paper2,150)},children:c($o,{size:34,style:{left:"50%",top:"50%",transform:"translate(-50%,-50%)"}})}),c("span",{style:{fontSize:"3.65cqw",fontWeight:600,color:u.text},children:e}),c("span",{style:{fontSize:"3.65cqw",color:u.muted},children:o})]})}function Uo({k:e,v:o,ok:t}){return w("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",gap:6,padding:"3.5px 2px",borderBottom:`1px solid ${u.rule}`,fontSize:"3.98cqw",color:u.muted},children:[c("span",{children:e}),w("span",{style:{display:"flex",gap:6,alignItems:"center"},children:[c("b",{style:{color:u.text,fontWeight:700},children:o}),t&&c("span",{style:{color:u.rust,fontWeight:700},children:"\u2713"})]})]})}function fe({title:e,children:o}){return w("div",{style:{...z,background:u.card,padding:"9px 10px",display:"flex",flexDirection:"column",gap:6},children:[c(ss,{children:e}),o]})}function iS({size:e=14}){return c("span",{style:{width:e,height:e,borderRadius:"50%",flex:"none",display:"block",background:`linear-gradient(150deg,${u.mark1},${u.mark2})`}})}function Od({filled:e=5,size:o=6}){return w("span",{style:{fontSize:o,letterSpacing:"0.06em",color:u.rust,lineHeight:1},children:["\u2605".repeat(e),c("span",{style:{color:u.mark1},children:"\u2605".repeat(5-e)})]})}function Rr({n:e,label:o,tone:t=u.text}){return w("div",{style:{flex:1,display:"flex",flexDirection:"column",gap:1,minWidth:0},children:[c("b",{style:{fontSize:"8.16cqw",lineHeight:1,color:t},children:e}),c("span",{style:{fontSize:"3.65cqw",letterSpacing:"0.08em",textTransform:"uppercase",opacity:.62,color:t},children:o})]})}function Pe({children:e,w:o}){return c("span",{style:{fontSize:"3.98cqw",lineHeight:1.45,color:u.muted,width:o,display:"block"},children:e})}function ls({label:e,w:o="100%",filled:t}){return w("div",{style:{width:o,display:"flex",flexDirection:"column",gap:2},children:[c("span",{style:{fontSize:"3.32cqw",letterSpacing:"0.08em",textTransform:"uppercase",color:u.muted},children:e}),c("span",{style:{height:9,borderRadius:3,border:`1px solid ${u.rule}`,background:t?u.paper:u.card}})]})}function fS({children:e}){return c("span",{style:{alignSelf:"flex-start",fontSize:"3.65cqw",letterSpacing:"0.12em",fontWeight:700,padding:"5px 9px",borderRadius:2,background:u.text,color:u.onInk},children:e})}var E2={wheelslisting:c(fe,{title:"All wheels",children:c("div",{style:{flex:1,display:"flex",flexDirection:"column",gap:4,justifyContent:"center"},children:[["Ridge 19","20\xD79 +12","$365"],["Ridge 29","18\xD79 +20","$410"],["Ridge 39","17\xD78 \u221210","$455"]].map(([e,o,t])=>w("div",{style:{display:"flex",alignItems:"center",gap:6},children:[c("span",{style:{width:20,height:15,borderRadius:3,flex:"none",position:"relative",overflow:"hidden",...ue(u.paper,u.paper2,150)},children:c($o,{size:12,style:{left:"50%",top:"50%",transform:"translate(-50%,-50%)"}})}),c("b",{style:{flex:1,fontSize:"4.31cqw",color:u.text},children:e}),c("span",{style:{fontSize:"3.65cqw",color:u.muted},children:o}),c("b",{style:{fontSize:"4.31cqw",color:u.text,width:26,textAlign:"right"},children:t})]},e))})}),catalogfilterbar:w("div",{style:{...z,background:u.card,display:"flex",flexDirection:"column",justifyContent:"center",gap:7,padding:"0 11px"},children:[w("div",{style:{display:"flex",gap:4,alignItems:"center"},children:[["20 inch","6\xD7139.7","Black"].map(e=>w("span",{style:{fontSize:"3.65cqw",fontWeight:600,padding:"4px 7px",borderRadius:99,background:u.text,color:u.onInk,display:"flex",gap:4,alignItems:"center"},children:[e,c("span",{style:{opacity:.6},children:"\u2715"})]},e)),c("span",{style:{fontSize:"3.65cqw",color:u.rust,fontWeight:700},children:"Clear"})]}),w("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center"},children:[c("span",{style:{fontSize:"3.65cqw",color:u.muted},children:"128 results"}),c("span",{style:{fontSize:"3.65cqw",color:u.muted,border:`1px solid ${u.rule}`,borderRadius:3,padding:"3px 6px"},children:"Sort: Price \u25BE"})]})]}),fitmentfinder:w("div",{style:{...z,padding:"10px 12px",display:"flex",flexDirection:"column",gap:6,justifyContent:"center",...ue(u.ink,u.inkSoft)},children:[c("span",{style:{fontSize:"5.31cqw",fontWeight:700,color:u.onInk},children:"Will it fit your rig?"}),w("div",{style:{display:"flex",gap:4},children:[["2021","Toyota","Hilux"].map(e=>w("span",{style:{flex:1,fontSize:"3.65cqw",color:u.text,background:u.card,borderRadius:3,padding:"5px 6px",display:"flex",justifyContent:"space-between"},children:[e," ",c("span",{style:{color:u.muted},children:"\u25BE"})]},e)),c("span",{style:{fontSize:"3.65cqw",fontWeight:700,letterSpacing:"0.08em",background:u.warm,color:u.ink,borderRadius:3,padding:"5px 7px"},children:"GO"})]})]}),compatibletyres:c(fe,{title:"Tyres that suit",children:c("div",{style:{flex:1,display:"grid",gridTemplateColumns:"repeat(3,1fr)",gap:5,minHeight:0},children:[["Ridge Grappler","$489"],["Trail Grappler","$525"],["Terra Grappler","$438"]].map(([e,o])=>w("div",{style:{display:"flex",flexDirection:"column",gap:2,minWidth:0},children:[c("div",{style:{flex:1,minHeight:0,borderRadius:3,position:"relative",overflow:"hidden",background:u.ink},children:c("span",{style:{position:"absolute",left:"50%",top:"50%",transform:"translate(-50%,-50%)",width:26,height:26,borderRadius:"50%",border:`5px solid ${u.mark2}`,boxSizing:"border-box"}})}),c("span",{style:{fontSize:"3.32cqw",fontWeight:600,color:u.text,overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis"},children:e}),c("span",{style:{fontSize:"3.32cqw",color:u.muted},children:o})]},e))})}),tyresizes:c(fe,{title:"Available sizes",children:c("div",{style:{flex:1,display:"flex",flexWrap:"wrap",gap:4,alignContent:"center"},children:["265/65R17","285/70R17","265/60R18","275/55R20"].map((e,o)=>c("span",{style:{fontSize:"3.65cqw",fontWeight:600,padding:"5px 7px",borderRadius:3,border:`1px solid ${o===0?u.rust:u.rule}`,color:o===0?u.rust:u.text,background:o===0?u.paper:u.card},children:e},e))})}),tyrefitment:w(fe,{title:"Will it fit your car?",children:[c("div",{style:{display:"flex",gap:3},children:["Make","Model","Year","Trim"].map(e=>w("span",{style:{flex:1,minWidth:0,fontSize:"3.32cqw",color:u.muted,background:u.paper,border:`1px solid ${u.rule}`,borderRadius:3,padding:"4px 5px",display:"flex",justifyContent:"space-between",gap:2,overflow:"hidden",whiteSpace:"nowrap"},children:[e," ",c("span",{style:{color:u.muted},children:"\u25BE"})]},e))}),c("div",{style:{flex:1,display:"flex",flexDirection:"column",gap:2,justifyContent:"center",minHeight:0},children:[["265/65R17","Fits",!0],["285/70R17","Not your size",!1]].map(([e,o,t])=>w("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"baseline",gap:6,borderTop:`1px solid ${u.rule}`,paddingTop:3},children:[c("span",{style:{fontSize:"3.32cqw",fontWeight:600,color:u.text},children:e}),c("span",{style:{fontSize:"3.32cqw",fontWeight:t?700:400,letterSpacing:"0.06em",color:t?u.warm:u.muted},children:o})]},e))})]}),eutyrelabel:w("div",{style:{...z,background:u.card,padding:"9px 11px",display:"flex",gap:8,alignItems:"center"},children:[c("div",{style:{flex:1,display:"flex",flexDirection:"column",gap:1.5},children:[["A","42%"],["B","56%"],["C","70%"],["D","84%"]].map(([e,o],t)=>w("div",{style:{display:"flex",alignItems:"center",gap:3},children:[c("span",{style:{width:o,height:6,borderRadius:"0 2px 2px 0",background:t===1?u.rust:u.mark1}}),c("span",{style:{fontSize:"3.32cqw",fontWeight:700,color:t===1?u.rust:u.muted},children:e})]},e))}),w("div",{style:{flex:"none",display:"flex",flexDirection:"column",gap:3,alignItems:"center"},children:[c("b",{style:{fontSize:"6.63cqw",lineHeight:1,color:u.text},children:"72"}),c("span",{style:{fontSize:"3.32cqw",letterSpacing:"0.08em",color:u.muted},children:"dB"})]})]}),bundleoffer:w("div",{style:{...z,background:u.paper,padding:"9px 11px",display:"flex",flexDirection:"column",gap:5,justifyContent:"center"},children:[c(ss,{children:"Buy it with"}),w("div",{style:{display:"flex",alignItems:"center",gap:5},children:[[0,1].map(e=>c("span",{style:{width:26,height:22,borderRadius:3,flex:"none",position:"relative",overflow:"hidden",background:u.card},children:c($o,{size:17,style:{left:"50%",top:"50%",transform:"translate(-50%,-50%)"}})},e)),c("span",{style:{fontSize:"5.69cqw",fontWeight:700,color:u.muted},children:"+"}),w("div",{style:{flex:1,display:"flex",flexDirection:"column",gap:1},children:[c("span",{style:{fontSize:"3.65cqw",color:u.muted,textDecoration:"line-through"},children:"$1,024"}),c("b",{style:{fontSize:"6.02cqw",color:u.rust,lineHeight:1},children:"$899"})]})]})]}),checkoutcta:w("div",{style:{...z,display:"flex",alignItems:"center",justifyContent:"space-between",padding:"0 13px",gap:8,...ue(u.ink,u.ink2)},children:[w("div",{style:{display:"flex",flexDirection:"column",gap:2},children:[c("span",{style:{fontSize:"3.65cqw",letterSpacing:"0.12em",color:u.warm,fontWeight:700},children:"READY TO ORDER"}),c("b",{style:{fontSize:"6.63cqw",color:u.onInk,lineHeight:1},children:"$1,956"}),c("span",{style:{fontSize:"3.65cqw",color:u.onInk,opacity:.65},children:"4 items \xB7 fitted free"})]}),c("span",{style:{fontSize:"3.65cqw",letterSpacing:"0.12em",fontWeight:700,padding:"6px 10px",borderRadius:2,background:u.warm,color:u.ink,flex:"none"},children:"CHECKOUT"})]}),contact:c(fe,{title:"Who do you need?",children:c("div",{style:{flex:1,display:"flex",flexDirection:"column",gap:4,justifyContent:"center"},children:[["Fitment help","the workshop"],["Order status","the front desk"],["Trade accounts","sales"]].map(([e,o])=>w("div",{style:{display:"flex",alignItems:"center",gap:5},children:[c("b",{style:{flex:1,fontSize:"4.31cqw",color:u.text},children:e}),c("span",{style:{fontSize:"3.65cqw",color:u.muted},children:o}),c("span",{style:{fontSize:"4.64cqw",color:u.rust,lineHeight:1},children:"\u203A"})]},e))})}),contactlocations:c(fe,{title:"Find us",children:c("div",{style:{flex:1,display:"grid",gridTemplateColumns:"repeat(2,1fr)",gap:5,minHeight:0},children:[["Brisbane","7 Kerry Rd","Mon\u2013Sat"],["Townsville","12 Enterprise","Mon\u2013Fri"]].map(([e,o,t])=>w("div",{style:{border:`1px solid ${u.rule}`,borderRadius:4,padding:"5px 6px",display:"flex",flexDirection:"column",gap:1},children:[c("b",{style:{fontSize:"4.31cqw",color:u.text},children:e}),c("span",{style:{fontSize:"3.32cqw",color:u.muted},children:o}),c("span",{style:{fontSize:"3.32cqw",color:u.rust,fontWeight:700},children:t})]},e))})}),form:c(fe,{title:"Send us a message",children:w("div",{style:{flex:1,display:"flex",flexDirection:"column",gap:4,justifyContent:"center"},children:[w("div",{style:{display:"flex",gap:5},children:[c(ls,{label:"Name"}),c(ls,{label:"Email"})]}),c(ls,{label:"Message",filled:!0}),c(fS,{children:"SEND"})]})}),appointmentbooking:c(fe,{title:"Book a fitting",children:w("div",{style:{flex:1,display:"flex",flexDirection:"column",gap:4,justifyContent:"center"},children:[c("div",{style:{display:"flex",gap:3},children:["Mon","Tue","Wed","Thu"].map((e,o)=>c("span",{style:{flex:1,textAlign:"center",fontSize:"3.32cqw",fontWeight:o===2?700:500,padding:"4px 0",borderRadius:3,background:o===2?u.text:u.paper,color:o===2?u.onInk:u.muted},children:e},e))}),c("div",{style:{display:"flex",gap:3},children:["8:00","10:30","13:00","15:30"].map((e,o)=>c("span",{style:{flex:1,textAlign:"center",fontSize:"3.32cqw",padding:"4px 0",borderRadius:3,border:`1px solid ${o===1?u.rust:u.rule}`,color:o===1?u.rust:u.muted,background:o===3?u.paper:u.card,textDecoration:o===3?"line-through":"none"},children:e},e))})]})}),reviewform:c(fe,{title:"Leave a review",children:w("div",{style:{flex:1,display:"flex",flexDirection:"column",gap:5,justifyContent:"center"},children:[c(Od,{filled:4,size:14}),c(ls,{label:"Your review",filled:!0}),c(fS,{children:"POST"})]})}),submitbuild:c(fe,{title:"Show us your build",children:w("div",{style:{flex:1,display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",gap:3,border:`1px dashed ${u.mark1}`,borderRadius:5,background:u.paper},children:[c("span",{style:{fontSize:"6.63cqw",lineHeight:1,color:u.rust,fontWeight:300},children:"+"}),c("span",{style:{fontSize:"3.65cqw",color:u.muted},children:"Drop a photo of your rig"})]})}),masthead:w("div",{style:{...z,background:u.paper,display:"flex",flexDirection:"column",justifyContent:"center",padding:"0 13px",gap:5},children:[c("span",{style:{height:1.5,background:u.text}}),c("span",{style:{fontSize:"7.65cqw",fontWeight:800,letterSpacing:"0.02em",color:u.text,lineHeight:1},children:"THE TRACK"}),w("div",{style:{display:"flex",justifyContent:"space-between",fontSize:"3.65cqw",letterSpacing:"0.1em",textTransform:"uppercase",color:u.muted},children:[c("span",{children:"Issue 14"}),c("span",{children:"Spring 2026"})]}),c("span",{style:{height:1,background:u.rule}})]}),featuredcover:w("div",{style:{...z,overflow:"hidden",...ue(u.ink,u.inkSoft2)},children:[c($o,{size:92,style:{right:-18,top:-14}}),c("div",{style:{position:"absolute",inset:0,background:`linear-gradient(0deg,${u.scrim},transparent 62%)`}}),w("div",{style:{position:"absolute",left:12,right:12,bottom:11,display:"flex",flexDirection:"column",gap:3},children:[c("span",{style:{fontSize:"3.65cqw",letterSpacing:"0.16em",fontWeight:700,color:u.warm},children:"FEATURE"}),c("span",{style:{fontSize:"6.16cqw",lineHeight:1.15,fontWeight:700,color:u.onInk},children:"Four days on the Madigan Line"})]})]}),longread:w("div",{style:{...z,background:u.card,padding:"10px 14px",display:"flex",flexDirection:"column",gap:4,justifyContent:"center"},children:[c("span",{style:{fontSize:"3.65cqw",letterSpacing:"0.14em",fontWeight:700,color:u.rust},children:"12 MIN READ"}),c("span",{style:{fontSize:"6.02cqw",lineHeight:1.15,fontWeight:700,color:u.text},children:"What breaks first, and why"}),c(Pe,{children:"Every failure starts in the same place \u2014 not the rim, not"}),c(Pe,{w:"62%",children:"the tyre, but the bolt nobody re-torqued."})]}),series:c(fe,{title:"Recurring columns",children:c("div",{style:{flex:1,display:"flex",flexDirection:"column",gap:5,justifyContent:"center"},children:[["Shed Notes","Monthly"],["Track Tested","Fortnightly"],["Reader Rigs","Weekly"]].map(([e,o])=>w("div",{style:{display:"flex",alignItems:"center",gap:6},children:[c("span",{style:{width:3,height:12,borderRadius:2,background:u.rust,flex:"none"}}),c("b",{style:{flex:1,fontSize:"4.64cqw",color:u.text},children:e}),c("span",{style:{fontSize:"3.65cqw",letterSpacing:"0.08em",textTransform:"uppercase",color:u.muted},children:o})]},e))})}),events:c(fe,{title:"Latest posts",children:c("div",{style:{flex:1,display:"flex",flexDirection:"column",gap:5,justifyContent:"center"},children:[[u.inkSoft,u.inkSoft2,"Madigan Line, four days"],[u.rust,u.warm,"Why offset beats width"]].map(([e,o,t])=>w("div",{style:{display:"flex",gap:6,alignItems:"center"},children:[c("span",{style:{width:24,height:18,borderRadius:3,flex:"none",...ue(e,o,150)}}),w("div",{style:{display:"flex",flexDirection:"column",gap:1,minWidth:0},children:[c("b",{style:{fontSize:"4.31cqw",color:u.text},children:t}),c("span",{style:{fontSize:"3.65cqw",color:u.muted},children:"4 Sep \xB7 Shed Notes"})]})]},t))})}),docmasthead:w("div",{style:{...z,background:u.card,padding:"12px 14px",display:"flex",flexDirection:"column",gap:5,justifyContent:"center"},children:[c("span",{style:{fontSize:"3.65cqw",letterSpacing:"0.16em",fontWeight:700,color:u.muted},children:"POLICY"}),c("span",{style:{fontSize:"6.49cqw",fontWeight:700,color:u.text,lineHeight:1.1},children:"Returns & refunds"}),c("span",{style:{fontSize:"3.65cqw",color:u.muted},children:"Version 3 \xB7 Updated 4 Sep 2026"}),c("span",{style:{height:2,width:26,background:u.rust,borderRadius:1}})]}),docbody:c("div",{style:{...z,background:u.card,padding:"9px 13px",display:"flex",flexDirection:"column",gap:3,justifyContent:"center"},children:[["1.","You may return an unfitted wheel within 30 days."],["2.","Fitted wheels are covered by the structural warranty."],["3.","Freight on a change of mind is yours."]].map(([e,o])=>w("div",{style:{display:"flex",gap:5},children:[c("b",{style:{fontSize:"3.98cqw",color:u.rust,flex:"none"},children:e}),c(Pe,{children:o})]},e))}),docmetacards:c(fe,{title:"At a glance",children:c("div",{style:{flex:1,display:"grid",gridTemplateColumns:"repeat(2,1fr)",gap:5,minHeight:0},children:[["30 days","To return"],["5 years","Structural"],["Free","Fitting"],["48 hrs","Dispatch"]].map(([e,o])=>w("div",{style:{border:`1px solid ${u.rule}`,borderRadius:4,padding:"5px 6px",display:"flex",flexDirection:"column",gap:1},children:[c("b",{style:{fontSize:"5.31cqw",color:u.text,lineHeight:1},children:e}),c("span",{style:{fontSize:"3.32cqw",letterSpacing:"0.08em",textTransform:"uppercase",color:u.muted},children:o})]},o))})}),doctabs:w("div",{style:{...z,background:u.card,display:"flex",flexDirection:"column",justifyContent:"center",gap:0,padding:"0 11px"},children:[c("div",{style:{display:"flex",gap:0},children:["Returns","Warranty","Shipping"].map((e,o)=>c("span",{style:{fontSize:"3.98cqw",fontWeight:o===0?700:500,padding:"5px 8px",color:o===0?u.text:u.muted,background:o===0?u.paper:"transparent",borderRadius:"4px 4px 0 0",border:`1px solid ${o===0?u.rule:"transparent"}`,borderBottom:"none"},children:e},e))}),c("span",{style:{height:1,background:u.rule}}),w("div",{style:{paddingTop:6,display:"flex",flexDirection:"column",gap:2},children:[c(Pe,{children:"Unfitted wheels come back within 30 days, no questions."}),c(Pe,{w:"58%",children:"Freight on a change of mind is yours."})]})]}),paragraphs:w("div",{style:{...z,background:u.card,padding:"11px 14px",display:"flex",gap:10,alignItems:"center"},children:[c("span",{style:{flex:1,fontSize:"5.86cqw",lineHeight:1.2,fontWeight:700,color:u.text},children:"The right wheel is the boring one."}),w("div",{style:{flex:1,display:"flex",flexDirection:"column"},children:[c(Pe,{children:"Forged, correctly offset, rated for what you actually"}),c(Pe,{children:"carry. Everything else is a photograph."})]})]}),keyfeatures:c(fe,{title:"Key features",children:c("div",{style:{flex:1,display:"flex",flexDirection:"column",gap:4,justifyContent:"center"},children:["Flow-formed barrel","1250 kg per corner","Hub-centric fit"].map(e=>w("div",{style:{display:"flex",gap:6,alignItems:"center"},children:[c("span",{style:{fontSize:"4.64cqw",color:u.rust,fontWeight:700,lineHeight:1},children:"\u2713"}),c("span",{style:{fontSize:"4.31cqw",color:u.text},children:e})]},e))})}),statsparagraph:w("div",{style:{...z,background:u.paper,padding:"10px 12px",display:"flex",gap:10,alignItems:"center"},children:[w("div",{style:{flex:"none",display:"flex",flexDirection:"column",gap:5},children:[c(Rr,{n:"27k",label:"Rigs"}),c(Rr,{n:"4.9",label:"Rating"})]}),w("div",{style:{flex:1,display:"flex",flexDirection:"column"},children:[c(Pe,{children:"Twelve years of fitting the same three questions, and the"}),c(Pe,{children:"answer has not moved: load rating, offset, then looks."})]})]}),chart:w(fe,{title:"Load vs weight",children:[c("div",{style:{flex:1,display:"flex",alignItems:"flex-end",gap:5,paddingBottom:2},children:[38,62,84,71,96].map((e,o)=>c("span",{style:{flex:1,height:`${e}%`,borderRadius:"2px 2px 0 0",background:o===4?u.rust:u.mark1}},o))}),c("span",{style:{height:1,background:u.rule,marginTop:-4}})]}),mockup:c("div",{style:{...z,overflow:"hidden",display:"flex",alignItems:"center",justifyContent:"center",...ue(u.inkSoft,u.ink)},children:w("div",{style:{width:"72%",height:"74%",borderRadius:4,overflow:"hidden",background:u.card,boxShadow:`0 6px 14px ${u.scrim}`},children:[c("div",{style:{height:9,background:u.paper,display:"flex",alignItems:"center",gap:2,padding:"0 4px"},children:[0,1,2].map(e=>c("span",{style:{width:2.5,height:2.5,borderRadius:"50%",background:u.mark1}},e))}),w("div",{style:{padding:5,display:"flex",flexDirection:"column",gap:3},children:[c("span",{style:{height:4,width:"56%",borderRadius:1,background:u.mark2}}),c("span",{style:{height:14,borderRadius:2,...ue(u.paper,u.paper2,150)}}),c("span",{style:{height:3,width:"38%",borderRadius:1,background:u.rust}})]})]})}),manifesto:c("div",{style:{...z,overflow:"hidden",display:"flex",alignItems:"center",padding:"0 16px",...ue(u.ink,u.ink2)},children:w("span",{style:{fontSize:"6.63cqw",lineHeight:1.2,fontWeight:700,color:u.onInk},children:["We build for the ",c("span",{style:{color:u.warm},children:"last"})," ten percent of the track."]})}),timeline:c(fe,{title:"Our story",children:c("div",{style:{flex:1,display:"flex",flexDirection:"column",justifyContent:"center",gap:6,paddingLeft:4},children:[["1998","One shed, one lathe."],["2009","First forged rim."],["2024","27,000 rigs on."]].map(([e,o],t)=>w("div",{style:{display:"flex",gap:7,alignItems:"flex-start",position:"relative"},children:[t<2&&c("span",{style:{position:"absolute",left:3,top:8,bottom:-8,width:1,background:u.rule}}),c("span",{style:{width:7,height:7,borderRadius:"50%",flex:"none",marginTop:1,background:u.rust,zIndex:1}}),w("div",{style:{display:"flex",flexDirection:"column",gap:0,minWidth:0},children:[c("b",{style:{fontSize:"4.64cqw",color:u.text},children:e}),c(Pe,{children:o})]})]},e))})}),timelinetrack:w("div",{style:{...z,padding:"0 12px",display:"flex",flexDirection:"column",gap:10,justifyContent:"center",...ue(u.ink,u.inkSoft)},children:[c("span",{style:{fontSize:"3.98cqw",fontWeight:700,letterSpacing:"0.14em",textTransform:"uppercase",color:u.warm},children:"Milestones"}),w("div",{style:{position:"relative",display:"flex",justifyContent:"space-between",paddingTop:7},children:[c("span",{style:{position:"absolute",left:0,right:0,top:3,height:1,background:u.mark2,opacity:.55}}),["1998","2009","2016","2024"].map((e,o)=>w("div",{style:{display:"flex",flexDirection:"column",alignItems:"center",gap:3,position:"relative"},children:[c("span",{style:{position:"absolute",top:-7,width:6,height:6,borderRadius:"50%",background:o===3?u.warm:u.mark1}}),c("span",{style:{fontSize:"4.31cqw",fontWeight:700,color:o===3?u.warm:u.onInk,opacity:o===3?1:.75},children:e})]},e))]})]}),footprint:w("div",{style:{...z,overflow:"hidden",...ue(u.paper,u.paper2,150)},children:[c("span",{style:{position:"absolute",left:"8%",top:"18%",width:"62%",height:"64%",borderRadius:"48% 52% 40% 60% / 55% 45% 55% 45%",background:u.mark1,opacity:.75}}),c("span",{style:{position:"absolute",left:"52%",top:"52%",width:"34%",height:"34%",borderRadius:"58% 42% 55% 45% / 45% 58% 42% 55%",background:u.mark2,opacity:.55}}),[["26%","38%"],["44%","58%"],["62%","34%"]].map(([e,o])=>c("span",{style:{position:"absolute",left:e,top:o,width:7,height:7,borderRadius:"50% 50% 50% 0",transform:"rotate(-45deg)",background:u.rust}},e)),c("span",{style:{position:"absolute",left:11,bottom:9,fontSize:"4.64cqw",fontWeight:700,color:u.text},children:"3 fitting bays"})]}),banner:w("div",{style:{...z,display:"flex",alignItems:"center",justifyContent:"space-between",padding:"0 13px",gap:8,background:u.rust},children:[w("div",{style:{display:"flex",flexDirection:"column",gap:2},children:[c("b",{style:{fontSize:"6.02cqw",color:u.onInk},children:"End of season \xB7 20% off"}),c("span",{style:{fontSize:"3.98cqw",color:u.onInk,opacity:.8},children:"Fitted free, this month only."})]}),c("span",{style:{fontSize:"3.65cqw",letterSpacing:"0.12em",fontWeight:700,padding:"5px 9px",borderRadius:2,background:u.onInk,color:u.text,flex:"none"},children:"SHOP"})]}),titlewithbuttons:w("div",{style:{...z,background:u.paper,display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",gap:7,padding:"0 14px",textAlign:"center"},children:[c("span",{style:{fontSize:"6.49cqw",lineHeight:1.15,fontWeight:700,color:u.text},children:"Not sure what fits?"}),w("div",{style:{display:"flex",gap:5},children:[c("span",{style:{fontSize:"3.65cqw",letterSpacing:"0.12em",fontWeight:700,padding:"5px 9px",borderRadius:2,background:u.text,color:u.onInk},children:"FIND MY FIT"}),c("span",{style:{fontSize:"3.65cqw",letterSpacing:"0.12em",fontWeight:700,padding:"5px 9px",borderRadius:2,border:`1px solid ${u.text}`,color:u.text},children:"CALL US"})]})]}),ticker:c("div",{style:{...z,overflow:"hidden",background:u.ink,display:"flex",alignItems:"center"},children:c("span",{style:{whiteSpace:"nowrap",fontSize:"6.29cqw",fontWeight:800,letterSpacing:"0.06em",color:u.warm,marginLeft:-14},children:"FREE FITTING \xB7 48HR DISPATCH \xB7 FREE FITTING \xB7 48HR DISPATCH"})}),countdown:w("div",{style:{...z,padding:"10px 12px",display:"flex",flexDirection:"column",alignItems:"center",gap:6,justifyContent:"center",...ue(u.ink,u.ink2)},children:[c("span",{style:{fontSize:"3.65cqw",fontWeight:700,letterSpacing:"0.16em",textTransform:"uppercase",color:u.muted},children:"Back online in"}),c("div",{style:{display:"flex",alignItems:"flex-start",gap:5},children:[["23","Hours"],["59","Minutes"],["48","Seconds"]].map(([e,o],t)=>w("div",{style:{display:"flex",alignItems:"flex-start",gap:5},children:[t>0&&c("b",{style:{fontSize:"9.5cqw",lineHeight:1,color:u.warm},children:":"}),w("div",{style:{display:"flex",flexDirection:"column",alignItems:"center",gap:2},children:[c("b",{style:{fontSize:"11.5cqw",lineHeight:1,color:u.onInk,fontVariantNumeric:"tabular-nums"},children:e}),c("span",{style:{fontSize:"3.2cqw",letterSpacing:"0.1em",textTransform:"uppercase",opacity:.62,color:u.onInk},children:o})]})]},o))})]}),breadcrumb:c("div",{style:{...z,background:u.card,display:"flex",alignItems:"center",padding:"0 13px"},children:w("span",{style:{fontSize:"4.64cqw",color:u.muted},children:["Home ",c("span",{style:{opacity:.5},children:"/"})," Wheels ",c("span",{style:{opacity:.5},children:"/"})," ",c("span",{style:{color:u.text,fontWeight:700},children:"20 inch"})]})}),categorybar:w("div",{style:{...z,background:u.card,display:"flex",flexDirection:"column",justifyContent:"center",gap:7,padding:"0 11px"},children:[c("div",{style:{display:"flex",gap:5},children:["All","Wheels","Tyres","Lift"].map((e,o)=>c("span",{style:{fontSize:"3.98cqw",fontWeight:o===0?700:500,padding:"4px 7px",borderRadius:99,background:o===0?u.text:u.paper,color:o===0?u.onInk:u.muted},children:e},e))}),c("span",{style:{height:1,background:u.rule}})]}),intro:w("div",{style:{...z,overflow:"hidden",background:u.card},children:[c("div",{style:{position:"absolute",inset:0,...ue(u.ink,u.inkSoft2)}}),c($o,{size:64,style:{right:8,top:6}}),w("div",{style:{position:"absolute",left:16,right:16,bottom:8,top:"46%",background:u.paper,borderRadius:6,padding:"8px 11px",display:"flex",flexDirection:"column",gap:2,boxShadow:`0 -4px 10px ${u.scrim}`},children:[c("span",{style:{fontSize:"5.69cqw",fontWeight:700,color:u.text},children:"Since 1998"}),c(Pe,{children:"One shed, one lathe, one idea."}),c(Pe,{w:"66%",children:"It turned out to be right."})]})]}),gallerygrid:c(fe,{title:"From our customers",children:c("div",{style:{flex:1,display:"grid",gridTemplateColumns:"repeat(3,1fr)",gridTemplateRows:"repeat(2,1fr)",gap:4,minHeight:0},children:[[u.rust,u.warm],[u.inkSoft,u.ink],[u.paper2,u.mark2],[u.ink,u.inkSoft2],[u.warm,u.paper2],[u.mark2,u.inkSoft]].map(([e,o],t)=>c("div",{style:{borderRadius:3,...ue(e,o,140+t*22)}},t))})}),gallery:w(fe,{title:"Gallery",children:[c("div",{style:{display:"flex",gap:8,alignItems:"center",marginTop:-2},children:["On the truck","Studio","Close-ups"].map((e,o)=>c("span",{style:{fontSize:"3.98cqw",fontWeight:o===0?700:500,color:o===0?u.text:u.muted,borderBottom:`1.5px solid ${o===0?u.rust:"transparent"}`,paddingBottom:2},children:e},e))}),c("div",{style:{flex:1,display:"grid",gridTemplateColumns:"repeat(3,1fr)",gap:4,minHeight:0},children:[[u.rust,u.warm],[u.ink,u.inkSoft],[u.paper2,u.mark2]].map(([e,o],t)=>c("div",{style:{borderRadius:3,...ue(e,o,150+t*20)}},t))})]}),ordersummary:w(fe,{title:"Order summary",children:[w("div",{style:{display:"flex",gap:6,alignItems:"center",paddingBottom:4},children:[c("span",{style:{width:26,height:26,borderRadius:4,position:"relative",overflow:"hidden",flex:"none",...ue(u.paper,u.paper2,150)},children:c($o,{size:18,style:{left:"50%",top:"50%",transform:"translate(-50%,-50%)"}})}),w("div",{style:{display:"flex",flexDirection:"column",gap:1,minWidth:0},children:[c("b",{style:{fontSize:"4.31cqw",color:u.text},children:"Ridge Grappler"}),c("span",{style:{fontSize:"3.65cqw",color:u.muted},children:"20\xD79 +12 \xB7 qty 4"})]})]}),w("div",{style:{flex:1,minHeight:0,display:"flex",flexDirection:"column",justifyContent:"center"},children:[c(Uo,{k:"Subtotal",v:"$1,956"}),c(Uo,{k:"Fitting",v:"Free"}),w("div",{style:{display:"flex",justifyContent:"space-between",paddingTop:5,fontSize:"4.64cqw"},children:[c("b",{style:{color:u.text},children:"Total"}),c("b",{style:{color:u.text,fontSize:"6.02cqw"},children:"$1,956"})]})]})]}),deliveryoptions:c(fe,{title:"Delivery",children:c("div",{style:{flex:1,display:"flex",flexDirection:"column",gap:4,justifyContent:"center"},children:[["Standard","3\u20135 days","Free",!0],["Express","Next day","$19",!1]].map(([e,o,t,a])=>w("div",{style:{display:"flex",alignItems:"center",gap:6,padding:"5px 6px",borderRadius:4,border:`1px solid ${a?u.rust:u.rule}`,background:a?u.paper:u.card},children:[c("span",{style:{width:7,height:7,borderRadius:"50%",flex:"none",border:`1.5px solid ${a?u.rust:u.mark1}`,background:a?u.rust:"transparent"}}),c("span",{style:{flex:1,fontSize:"4.31cqw",fontWeight:600,color:u.text},children:e}),c("span",{style:{fontSize:"3.98cqw",color:u.muted},children:o}),c("b",{style:{fontSize:"4.31cqw",color:u.text},children:t})]},e))})}),paymentbadges:w("div",{style:{...z,background:u.paper,display:"flex",flexDirection:"column",gap:8,justifyContent:"center",padding:"0 12px"},children:[c(ss,{children:"Ways to pay"}),c("div",{style:{display:"flex",gap:5},children:[["VISA",u.ink],["MC",u.rust],["AMEX",u.inkSoft],["PayPal",u.ink2]].map(([e,o])=>c("span",{style:{flex:1,textAlign:"center",fontSize:"3.65cqw",fontWeight:800,letterSpacing:"0.06em",color:u.onInk,borderRadius:3,padding:"6px 0",background:o},children:e},e))})]}),stats:w("div",{style:{...z,padding:"10px 12px",display:"flex",flexDirection:"column",gap:9,justifyContent:"center",...ue(u.ink,u.ink2)},children:[c("span",{style:{fontSize:"3.98cqw",fontWeight:700,letterSpacing:"0.14em",textTransform:"uppercase",color:u.warm},children:"By the numbers"}),w("div",{style:{display:"flex",gap:8},children:[c(Rr,{n:"27k",label:"Rigs fitted",tone:u.onInk}),c(Rr,{n:"12",label:"Years",tone:u.onInk}),c(Rr,{n:"4.9",label:"Avg rating",tone:u.warm})]})]}),testimonials:w("div",{style:{...z,overflow:"hidden",background:u.paper,padding:"10px 11px",display:"flex",flexDirection:"column",gap:6,justifyContent:"center"},children:[c("span",{style:{position:"absolute",right:10,top:2,fontSize:"22.4cqw",lineHeight:1,fontWeight:800,color:u.rust,opacity:.16},children:"\u201D"}),c(Od,{filled:5,size:7}),c("span",{style:{position:"relative",fontSize:"5.31cqw",lineHeight:1.35,color:u.text,fontWeight:600},children:"\u201CTook them out to the Simpson and back. Not one chip.\u201D"}),w("div",{style:{display:"flex",alignItems:"center",gap:5},children:[c(iS,{}),c("span",{style:{fontSize:"3.98cqw",color:u.muted},children:"Dave M. \xB7 Hilux N80"})]})]}),reviews:w(fe,{title:"Reviews",children:[c("div",{style:{display:"flex",gap:4,height:22},children:[[u.inkSoft,u.inkSoft2],[u.rust,u.warm],[u.ink,u.inkSoft],[u.mark2,u.mark1]].map(([e,o],t)=>c("div",{style:{flex:1,borderRadius:3,...ue(e,o,140+t*15)}},t))}),c("div",{style:{flex:1,display:"flex",flexDirection:"column",gap:5,justifyContent:"center"},children:[["Dave M.",5,"Not one chip after the Simpson."],["Sara K.",4,"Fitted in an hour, no fuss."]].map(([e,o,t])=>w("div",{style:{display:"flex",gap:5,alignItems:"flex-start"},children:[c(iS,{size:12}),w("div",{style:{display:"flex",flexDirection:"column",gap:1,minWidth:0},children:[w("div",{style:{display:"flex",gap:4,alignItems:"center"},children:[c("b",{style:{fontSize:"3.98cqw",color:u.text},children:e}),c(Od,{filled:o})]}),c(Pe,{children:t})]})]},e))})]}),logos:w("div",{style:{...z,display:"flex",flexDirection:"column",gap:9,justifyContent:"center",padding:"0 12px",...ue(u.ink,u.inkSoft)},children:[c("span",{style:{fontSize:"3.98cqw",fontWeight:700,letterSpacing:"0.14em",textTransform:"uppercase",color:u.warm},children:"As fitted by"}),c("div",{style:{display:"grid",gridTemplateColumns:"repeat(4,1fr)",gap:8},children:["ARB","TJM","IRONMAN","OPPOSITE"].map(e=>c("span",{style:{textAlign:"center",fontSize:"4.31cqw",fontWeight:800,letterSpacing:"0.08em",color:u.onInk,opacity:.82},children:e},e))})]}),prose:w("div",{style:{...z,background:u.paper,padding:"11px 14px",display:"flex",flexDirection:"column",gap:4,justifyContent:"center"},children:[c("span",{style:{fontSize:"5.86cqw",fontWeight:700,color:u.text},children:"Why offset matters"}),w("div",{style:{display:"flex",gap:6},children:[c("span",{style:{fontSize:"15.3cqw",lineHeight:.78,fontWeight:800,color:u.rust,marginTop:1},children:"T"}),w("div",{style:{display:"flex",flexDirection:"column"},children:[c(Pe,{children:"he number on the back of your wheel decides whether the"}),c(Pe,{w:"76%",children:"tyre sits under the guard or an inch outside it."})]})]})]}),cards:c(fe,{title:"What you get",children:c("div",{style:{flex:1,display:"grid",gridTemplateColumns:"repeat(3,1fr)",gap:5,minHeight:0},children:[["Fitted free","In store, same day."],["5 yr cover","Structural, no fine print."],["Swap it","30 days, any reason."]].map(([e,o])=>w("div",{style:{border:`1px solid ${u.rule}`,borderRadius:4,padding:6,display:"flex",flexDirection:"column",gap:2},children:[c("span",{style:{width:11,height:11,borderRadius:3,background:u.rust,opacity:.9}}),c("b",{style:{fontSize:"3.98cqw",color:u.text},children:e}),c(Pe,{children:o})]},e))})}),faq:c(fe,{title:"Questions",children:c("div",{style:{flex:1,display:"flex",flexDirection:"column",justifyContent:"center"},children:[["Will these fit my Hilux?",!0],["Do you fit them for me?",!1],["What if I pick wrong?",!1]].map(([e,o])=>w("div",{style:{borderBottom:`1px solid ${u.rule}`,padding:"4px 2px"},children:[w("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",gap:6},children:[c("b",{style:{fontSize:"4.31cqw",color:u.text},children:e}),c("span",{style:{fontSize:"4.64cqw",color:u.muted,lineHeight:1},children:o?"\u2212":"+"})]}),o&&c(Pe,{w:"90%",children:"Use the fitment finder \u2014 it reads your build, not just the model."})]},e))})}),hero:w("div",{style:{...z,overflow:"hidden",...ue(u.ink,u.ink2)},children:[c("div",{style:{...z,background:`linear-gradient(90deg,${u.scrim},transparent 70%)`}}),c("div",{style:{position:"relative",height:"100%",display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"flex-start",padding:"12px 14px",gap:5},children:c(sS,{over:"NEW \xB7 SUMMER",overTone:u.warm,head:"Built for the worst road you own",cta:"SHOP ALL",ctaBg:u.warm,ctaFg:u.ink,tone:u.onInk})}),c($o,{size:104,style:{right:-24,bottom:-30}})]}),herosingle:w("div",{style:{...z,display:"flex",background:u.paper,overflow:"hidden"},children:[c("div",{style:{flex:1,padding:12,display:"flex",flexDirection:"column",gap:5,justifyContent:"center"},children:c(sS,{over:"ALL-TERRAIN",overTone:u.rust,head:"Grip that does not ask",headSize:12,cta:"EXPLORE",ctaBg:u.text,ctaFg:u.onInk,tone:u.text})}),c("div",{style:{flex:1,position:"relative",...ue(u.inkSoft,u.inkSoft2)},children:c($o,{size:74,style:{right:-14,top:16}})})]}),productgrid:c(fe,{title:"Best sellers",children:w("div",{style:{flex:1,display:"grid",gridTemplateColumns:"repeat(3,1fr)",gap:5,minHeight:0},children:[c(Fd,{name:"Ridge 19",price:"$365"}),c(Fd,{name:"Ridge 29",price:"$410"}),c(Fd,{name:"Ridge 39",price:"$455"})]})}),collections:c(fe,{title:"Shop by category",children:c("div",{style:{flex:1,display:"grid",gridTemplateColumns:"repeat(3,1fr)",gap:5,minHeight:0},children:[["Wheels",u.inkSoft,u.inkSoft2],["Tyres",u.rust,u.warm],["Lift kits",u.ink,u.inkSoft]].map(([e,o,t])=>c("div",{style:{borderRadius:4,display:"flex",alignItems:"flex-end",padding:5,color:u.onInk,...ue(o,t)},children:c("span",{style:{fontSize:"3.98cqw",fontWeight:700,letterSpacing:"0.04em"},children:e})},e))})}),producthero:w("div",{style:{...z,display:"flex",background:u.card,overflow:"hidden"},children:[c("div",{style:{flex:1.1,position:"relative",...ue(u.paper,u.paper2,150)},children:c($o,{size:78,style:{left:"50%",top:"50%",transform:"translate(-50%,-50%)"}})}),w("div",{style:{flex:1,padding:"10px 10px 10px 8px",display:"flex",flexDirection:"column",gap:4,justifyContent:"center"},children:[c("span",{style:{fontSize:"3.65cqw",letterSpacing:"0.16em",fontWeight:700,color:u.rust},children:"NITTO"}),c("b",{style:{fontSize:"6.29cqw",color:u.text},children:"Ridge Grappler"}),c("span",{style:{fontSize:"6.63cqw",fontWeight:700,color:u.text},children:"$489"}),c("span",{style:{alignSelf:"flex-start",fontSize:"3.65cqw",letterSpacing:"0.12em",fontWeight:700,padding:"4px 8px",borderRadius:2,background:u.text,color:u.onInk},children:"ADD TO CART"})]})]}),spectable:c(fe,{title:"Specifications",children:w("div",{style:{flex:1,display:"flex",flexDirection:"column",justifyContent:"center"},children:[c(Uo,{k:"Diameter",v:'20"'}),c(Uo,{k:"Width",v:"9.0J"}),c(Uo,{k:"Offset",v:"+12"}),c(Uo,{k:"Load",v:"1250 kg"})]})}),fitmenttable:c(fe,{title:"Will it fit?",children:w("div",{style:{flex:1,display:"flex",flexDirection:"column",justifyContent:"center"},children:[c(Uo,{k:"Hilux N80",v:"20\xD79 +12",ok:!0}),c(Uo,{k:"Ranger PX3",v:"20\xD79 +12",ok:!0}),c(Uo,{k:"LC79",v:"17\xD78 \u221210",ok:!0})]})}),processsteps:w("div",{style:{...z,background:u.paper,padding:10,display:"flex",flexDirection:"column",gap:7,justifyContent:"center"},children:[c(ss,{children:"How it works"}),c("div",{style:{display:"flex",gap:6},children:["Pick your rig","Match the fit","We fit it"].map((e,o)=>w("div",{style:{flex:1,display:"flex",flexDirection:"column",gap:2},children:[c("span",{style:{width:11,height:11,borderRadius:"50%",background:u.text,color:u.onInk,fontSize:"3.98cqw",display:"flex",alignItems:"center",justifyContent:"center",fontWeight:700},children:o+1}),c("span",{style:{fontSize:"3.98cqw",color:u.text,fontWeight:600},children:e})]},e))})]}),detailrows:c("div",{style:{...z,background:u.card,display:"flex",flexDirection:"column",overflow:"hidden"},children:[["Forged, not cast","Half the weight, twice the road.",!1],["Fits your load","Rated to 1250 kg a corner.",!0]].map(([e,o,t])=>{let a=c("div",{style:{flex:1,...ue(t?u.rust:u.inkSoft,t?u.warm:u.inkSoft2)}},"art"),r=w("div",{style:{flex:1.1,padding:8,display:"flex",flexDirection:"column",gap:2,justifyContent:"center"},children:[c("b",{style:{fontSize:"4.64cqw",color:u.text},children:e}),c("span",{style:{fontSize:"3.98cqw",color:u.muted,lineHeight:1.3},children:o})]},"tx");return c("div",{style:{flex:1,display:"flex",minHeight:0},children:t?[r,a]:[a,r]},e)})}),specstrip:c("div",{style:{...z,background:u.ink,color:u.onInk,display:"flex",alignItems:"center",justifyContent:"space-around",padding:"0 8px"},children:[["5 yr","Warranty"],["Free","Fitting"],["48 hr","Dispatch"]].map(([e,o])=>w("div",{style:{display:"flex",flexDirection:"column",alignItems:"center",gap:1},children:[c("b",{style:{fontSize:"5.69cqw",letterSpacing:"0.02em"},children:e}),c("span",{style:{fontSize:"3.65cqw",color:u.mark2,letterSpacing:"0.1em",textTransform:"uppercase"},children:o})]},o))})},cS={subscribe:w("div",{style:{...z,padding:13,display:"flex",flexDirection:"column"},children:[w("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",marginBottom:8},children:[w("div",{style:{display:"flex",alignItems:"center",gap:6},children:[c(D,{w:8,h:8,r:2,tone:"accent"}),c(D,{w:38,h:7,r:3,tone:"dark"}),c(D,{w:16,h:7,r:3,tone:"accent"})]}),c(D,{w:38,h:4,r:2,tone:"soft"})]}),c("div",{style:{height:1,background:Se.line,marginBottom:10}}),w("div",{style:{flex:1,display:"flex",gap:10,border:`1px solid ${Se.line}`,borderRadius:7,padding:10},children:[w("div",{style:{flex:1.1,display:"flex",flexDirection:"column",justifyContent:"center",gap:5},children:[c(D,{w:"46%",h:3,r:2,tone:"accent"}),c(D,{w:"84%",h:8,r:4,tone:"dark"}),c(D,{w:"56%",h:8,r:4,tone:"accent"}),c(D,{w:"96%",h:3,r:2,tone:"soft",style:{marginTop:2}}),w("div",{style:{display:"flex",gap:5,marginTop:4},children:[c("div",{style:{flex:1,height:13,borderRadius:5,border:`1px solid ${Se.line}`,background:Se.block}}),c(D,{w:34,h:13,r:5,tone:"accent"})]})]}),w("div",{style:{flex:1,background:Se.block,borderRadius:6,padding:8,display:"flex",flexDirection:"column",gap:6},children:[c(D,{w:"52%",h:4,r:2,tone:"accent"}),Array.from({length:3}).map((e,o)=>w("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",gap:6,borderTop:o?`1px solid ${Se.line}`:"none",paddingTop:o?4:0},children:[c(D,{w:34,h:4,r:2,tone:"dark"}),c(D,{w:16,h:3,r:2,tone:"soft"})]},o))]})]})]}),split:w("div",{style:{...z,display:"flex"},children:[c("div",{style:{width:"44%",background:Ed}}),w("div",{style:{flex:1,padding:15,display:"flex",flexDirection:"column",justifyContent:"center",gap:7},children:[c(D,{w:"44%",h:5,r:3,tone:"accent"}),c(D,{w:"88%",h:8,r:4,tone:"dark"}),c(D,{w:"70%",h:8,r:4,tone:"dark"}),c(D,{w:"94%",h:5,r:2,tone:"soft",style:{marginTop:2}}),c(D,{w:"80%",h:5,r:2,tone:"soft"}),c(D,{w:"40%",h:13,r:6,tone:"accent",style:{marginTop:5}})]})]}),sectionheader:w(dS,{children:[c(D,{w:"18%",h:6,r:3,tone:"accent",style:{position:"absolute",top:15,right:16}}),w("div",{style:{...z,padding:16,display:"flex",flexDirection:"column",justifyContent:"center",gap:10},children:[w("div",{style:{display:"flex",alignItems:"center",gap:9},children:[c(D,{w:16,h:16,r:4,tone:"accent"}),c(D,{w:"20%",h:9,r:4,tone:"dark"})]}),c(D,{w:"62%",h:10,r:5,tone:"dark"}),c(D,{w:"42%",h:6,r:3,tone:"soft"})]})]}),header:c("div",{style:{...z,padding:14,display:"flex",flexDirection:"column",justifyContent:"center"},children:w("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between"},children:[c(D,{w:"22%",h:12,r:4,tone:"dark"}),w("div",{style:{display:"flex",gap:9,alignItems:"center"},children:[c(D,{w:26,h:6,r:3,tone:"soft"}),c(D,{w:26,h:6,r:3,tone:"soft"}),c(D,{w:26,h:6,r:3,tone:"soft"}),c(D,{w:18,h:14,r:5,tone:"accent"})]})]})}),footer:w("div",{style:{...z,padding:15,display:"flex",flexDirection:"column",justifyContent:"center",gap:12},children:[w("div",{style:{display:"flex",gap:14},children:[w("div",{style:{flex:1.4,display:"flex",flexDirection:"column",gap:6},children:[c(D,{w:"60%",h:9,r:4,tone:"dark"}),c(D,{w:"90%",h:5,r:2,tone:"soft"}),c(D,{w:"70%",h:5,r:2,tone:"soft"})]}),[0,1].map(e=>w("div",{style:{flex:1,display:"flex",flexDirection:"column",gap:6},children:[c(D,{w:"50%",h:6,r:3,tone:"dark"}),c(D,{w:"80%",h:5,r:2,tone:"soft"}),c(D,{w:"66%",h:5,r:2,tone:"soft"})]},e))]}),c("div",{style:{height:1,background:Se.line}}),w("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center"},children:[c(D,{w:"30%",h:5,r:2,tone:"soft"}),c(D,{w:"16%",h:5,r:2,tone:"soft"})]})]}),grid:c("div",{style:{...z,padding:14,display:"grid",gridTemplateColumns:"1fr 1fr",gridTemplateRows:"1fr 1fr",gap:9},children:Array.from({length:4}).map((e,o)=>c("div",{style:{borderRadius:6,background:Se.block}},o))}),blanksection:c("div",{style:{...z,padding:14,display:"flex"},children:w("div",{style:{flex:1,border:`1px dashed ${Se.line}`,borderRadius:7,display:"flex",alignItems:"center",justifyContent:"center",position:"relative"},children:[c(D,{w:14,h:2,r:1,tone:"tint"}),c(D,{w:2,h:14,r:1,tone:"tint",style:{position:"absolute"}})]})}),spacer:w("div",{style:{...z,padding:14,display:"flex",flexDirection:"column",justifyContent:"space-between"},children:[c(D,{w:"100%",h:6,r:3,tone:"soft"}),c(D,{w:16,h:22,r:3,tone:"block",style:{alignSelf:"center"}}),c(D,{w:"100%",h:6,r:3,tone:"soft"})]}),divider:c("div",{style:{...z,padding:14,display:"flex",alignItems:"center"},children:c(D,{w:"100%",h:3,r:2,tone:"dark"})}),customhtml:w("div",{style:{...z,display:"flex",alignItems:"center",justifyContent:"center",gap:8,background:Ed},children:[c(D,{w:5,h:16,r:2,tone:"dark",style:{transform:"skewX(-14deg)"}}),c(D,{w:16,h:10,r:3,tone:"accent"}),c(D,{w:5,h:16,r:2,tone:"dark",style:{transform:"skewX(14deg)"}})]}),heading:c("div",{style:{...z,padding:14,display:"flex",alignItems:"center"},children:c(D,{w:"64%",h:13,r:4,tone:"dark"})}),text:w("div",{style:{...z,padding:16,display:"flex",flexDirection:"column",justifyContent:"center",gap:7},children:[c(D,{w:"100%",h:6,r:3,tone:"soft"}),c(D,{w:"96%",h:6,r:3,tone:"soft"}),c(D,{w:"100%",h:6,r:3,tone:"soft"}),c(D,{w:"58%",h:6,r:3,tone:"soft"})]}),image:c("div",{style:{position:"absolute",inset:14,borderRadius:7,background:Ed}}),button:c("div",{style:{...z,display:"flex",alignItems:"center",justifyContent:"center"},children:c(D,{w:"34%",h:16,r:8,tone:"accent"})}),menu:w("div",{style:{...z,padding:"14px 22%",display:"flex",flexDirection:"column",justifyContent:"center",gap:7},children:[c(D,{w:"48%",h:7,r:3,tone:"dark"}),c(D,{w:"82%",h:5,r:2,tone:"soft"}),c(D,{w:"66%",h:5,r:2,tone:"soft"}),c(D,{w:"74%",h:5,r:2,tone:"soft"}),c(D,{w:"58%",h:5,r:2,tone:"soft"})]}),emailform:w("div",{style:{...z,padding:16,display:"flex",flexDirection:"column",justifyContent:"center",gap:9},children:[c(D,{w:"56%",h:8,r:3,tone:"dark"}),w("div",{style:{display:"flex",gap:6},children:[c("div",{style:{flex:1,height:16,borderRadius:5,border:`1px solid ${Se.line}`}}),c(D,{w:"30%",h:16,r:5,tone:"accent"})]})]}),sociallogos:c("div",{style:{...z,display:"flex",alignItems:"center",justifyContent:"center",gap:9},children:[0,1,2,3].map(e=>c(D,{w:16,h:16,r:8,tone:"dark"},e))}),paymentlogos:w("div",{style:{...z,display:"flex",alignItems:"center",justifyContent:"center",gap:7},children:[c(D,{w:22,h:6,r:2,tone:"soft"}),[0,1,2,3].map(e=>c(D,{w:20,h:13,r:3,tone:"dark"},e))]}),search:c("div",{style:{...z,padding:"0 18%",display:"flex",alignItems:"center"},children:w("div",{style:{flex:1,height:22,borderRadius:11,border:`1px solid ${Se.line}`,display:"flex",alignItems:"center",gap:7,padding:"0 9px"},children:[c("div",{style:{width:9,height:9,borderRadius:5,border:`2px solid ${Se.dark}`}}),c(D,{w:"46%",h:5,r:2,tone:"soft"})]})}),cart:w("div",{style:{...z,display:"flex",alignItems:"center",justifyContent:"center",gap:7},children:[c("div",{style:{width:22,height:18,borderRadius:"3px 3px 6px 6px",border:`2px solid ${Se.dark}`}}),c("div",{style:{padding:"2px 6px",borderRadius:6,border:`1.5px solid ${Se.dark}`},children:c(D,{w:7,h:7,r:2,tone:"dark"})})]}),countryswitch:w("div",{style:{...z,padding:14,display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",gap:5},children:[w("div",{style:{display:"flex",alignItems:"center",gap:6,padding:"4px 8px",border:`1px solid ${Se.line}`},children:[c(D,{w:22,h:6,r:2,tone:"dark"}),c(D,{w:6,h:4,r:1,tone:"soft"})]}),w("div",{style:{width:"46%",display:"flex",flexDirection:"column",gap:4,padding:6,border:`1px solid ${Se.line}`},children:[c(D,{w:"80%",h:4,r:2,tone:"accent"}),c(D,{w:"64%",h:4,r:2,tone:"soft"}),c(D,{w:"72%",h:4,r:2,tone:"soft"})]})]}),legalline:w("div",{style:{...z,padding:16,display:"flex",flexDirection:"column",justifyContent:"center",gap:9},children:[c("div",{style:{height:1,background:Se.line}}),w("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center"},children:[c(D,{w:"38%",h:5,r:2,tone:"soft"}),w("div",{style:{display:"flex",gap:5},children:[c(D,{w:14,h:5,r:2,tone:"soft"}),c(D,{w:14,h:5,r:2,tone:"soft"}),c(D,{w:14,h:5,r:2,tone:"soft"})]})]})]}),fallback:c("div",{style:{position:"absolute",inset:14,borderRadius:8,background:Se.block}})};function uS({type:e}){let o=P2[e]??"",t=E2[o]??cS[o]??cS.fallback;return c("div",{className:"sf-thumb","aria-hidden":"true",style:{position:"absolute",inset:0,background:"var(--sf-thumb-thumb-bg)",pointerEvents:"none",containerType:"inline-size"},children:t})}import{useScreenDocument as Ps}from"efficient-easel/screen/components/ScreenDocumentContext";import{jsx as ka,jsxs as F2}from"react/jsx-runtime";import O2 from"efficient-easel/screen/components/SidePanelHead";import{StylesIcon as L2}from"efficient-easel/rail";import{Tooltip as A2}from"efficient-shell/ui";function pS({tokenRef:e,siteId:o,onClose:t,onNotify:a,tab:r,onTabChange:n,revealPageGroup:s,onPageGroupRevealed:i}){let f=ha();return F2("div",{className:"sf-styles",children:[ka(O2,{icon:ka(L2,{}),title:l("Styles"),context:ka(A2,{content:l("{name} \u2014 renamed in the Console: {place}.",{name:f,place:l("Storefront \u25B8 Sites \u25B8 Settings")}),className:"sf-name-tip",children:ka("span",{className:"sf-name-text",children:f})})}),ka("div",{className:"sf-insp-body es-insp-body sf-scroll",children:ka(Tl,{tokenRef:e,siteId:o,onNotify:a,tab:r,onTabChange:n,revealPageGroup:s,onPageGroupRevealed:i})})]})}import{jsx as ve,jsxs as Gt,Fragment as M2}from"react/jsx-runtime";import{Fragment as ES,useEffect as FS,useRef as Dd}from"react";import{useTreeDrag as OS}from"efficient-easel/drag";import{GlobeIcon as H2,ImageIcon as W2,LocationIcon as z2,MapIcon as G2,TextLinesIcon as U2,TrashIcon as LS}from"efficient-easel/icons";import{Subtree as AS,TreeRow as _r,TreeRowAction as RS,TreeSeam as BS}from"efficient-easel/tree";import{useEaselStrings as $2}from"efficient-easel/strings";import{createPreviewSelectionContext as R2}from"efficient-easel/draw/client";var{Provider:wae,useSelection:mS}=R2("selectedLocationPartId");function xS(e,o,t){return`${e}::${o}::${t}`}function hS(e){if(!e)return null;let o=e.split("::");if(o.length<3)return null;let t=o[o.length-1];if(t!=="image"&&t!=="map")return null;let a=Number(o[o.length-2]);if(!Number.isInteger(a)||a<0)return null;let r=o.slice(0,-2).join("::");return r?{nodeId:r,index:a,part:t}:null}import{isSelectionMode as q2}from"efficient-easel/screen/lib/screen-parts";import{useSyncExternalStore as B2}from"react";var _2={level:"groups"},gS=_2,Ld=new Set;function fo(e){gS=e;for(let o of Ld)o()}function D2(e){return Ld.add(e),()=>{Ld.delete(e)}}var IS=()=>gS;function yS(){return B2(D2,IS,IS)}function bS(e,o,t){let a=[];return e.forEach((r,n)=>{let s=o(r),i=a.find(f=>f.key===s);i||(i={key:s,name:t(r),items:[]},a.push(i)),i.items.push({item:r,index:n})}),a}function Pae(e){if(e<=1)return"grid-cols-1";if(e===2)return"grid-cols-2";if(e===3)return"grid-cols-3";if(e===4)return"grid-cols-4";let o=t=>e%t||t;return o(4)>=o(3)?"grid-cols-4":"grid-cols-3"}var Br=e=>String(e?.group??""),Ad=new WeakMap,N2=0;function is(e){let o=Ad.get(e);return o||(o=`loc${++N2}`,Ad.set(e,o)),o}var SS=(e,o)=>o||e||"Ungrouped",CS={photo:"",group:"",groupName:"",name:"City name",state:"State",country:"Country",timezone:"GMT \xB7 UTC +0",address:`Address line one
|
|
6
|
+
Address line two`,phone:"+00 000 0000",hours:"Mon\u2013Fri 9:00\u201318:00",lat:0,lng:0,mapsUrl:""};function zt(e){return bS(e,Br,o=>String(o?.groupName??"")).map(o=>({key:o.key,name:o.name,cards:o.items.map(t=>t.item)}))}var Rd=e=>e.flatMap(o=>o.cards),wS=(e,o,t)=>Math.min(Math.max(e,o),t);function fs(e,o,t){let a=0;for(let r=0;r<e.length;r++)if(Br(e[r])===o){if(a===t)return r;a++}return-1}function Bd(e,o,t){let a=zt(e);if(o<0||o>=a.length)return e;let[r]=a.splice(o,1),n=wS(o<t?t-1:t,0,a.length);return a.splice(n,0,r),Rd(a)}function _d(e,o,t,a,r){let n=zt(e),s=n.find(x=>x.key===o),i=n.find(x=>x.key===a);if(!s||!i||t<0||t>=s.cards.length)return e;let[f]=s.cards.splice(t,1),d=o===a?f:{...f,group:i.key,groupName:i.name};d!==f&&Ad.set(d,is(f));let p=wS(s===i&&t<r?r-1:r,0,i.cards.length);return i.cards.splice(p,0,d),Rd(n)}function vS(e,o){let t=zt(e),a=t.find(n=>n.key===o),r={...CS,group:o,groupName:a?.name??""};return a?(a.cards.push(r),Rd(t)):[...e,r]}function kS(e){let o=new Set(zt(e).map(r=>r.key)),t=o.size+1,a=`Group ${t}`;for(;o.has(a);)a=`Group ${++t}`;return{cards:[...e,{...CS,group:a,groupName:""}],key:a}}function TS(e,o){return e.filter(t=>Br(t)!==o)}function PS(e,o,t){let a=fs(e,o,t);return a<0?e:e.filter((r,n)=>n!==a)}function Oae(e,o,t){let a=e.flatMap((s,i)=>Br(s)===o?[i]:[]),r=e.slice();a.forEach((s,i)=>{r[s]=t[i]});let n=t.slice(a.length);return[...r.filter(s=>s!==void 0),...n]}function Lae(e,o,t){return o.flatMap(a=>{let r=e.filter(n=>Br(n)===a);return r.length?r:t(a)})}var ds="ContactLocations",cs=e=>({parentId:`locations-${e}`,slot:"groups"}),Nd=(e,o)=>({parentId:`locations-${e}`,slot:`cities:${o}`});function _S(e,o){let{readOnly:t,selected:a}=o,r=$2().tree,n=o.data?.content??[],s=q2(e),i=Dd(null);FS(()=>{let g=a?.type===ds?String(a.props.id):null;g&&g!==i.current&&fo({level:"groups"}),i.current=g},[a?.props.id]);let{selectedLocationPartId:f,setSelectedLocationPartId:d,setSelectHandler:p}=mS(),x=yS(),m=(g,I)=>{let P=n[g];P&&o.replace(g,{type:P.type,props:{...P.props,locations:I}})},h=g=>{let I=n[g]?.props?.locations;return Array.isArray(I)?I:[]},b=OS({keyOf:g=>`group:${g.si}:${g.index}`,readOnly:!!t,canDrop:(g,I)=>I.parentId===cs(g.si).parentId&&I.slot==="groups",onDrop:(g,I)=>{m(g.si,Bd(h(g.si),g.index,I.index)),x.level==="city"&&fo({level:"groups"})},onStep:(g,I)=>{m(g.si,Bd(h(g.si),g.index,I<0?g.index-1:g.index+2)),x.level==="city"&&fo({level:"groups"})}}),S=OS({keyOf:g=>`city:${g.si}:${g.group}:${g.index}`,readOnly:!!t,canDrop:(g,I)=>I.parentId===cs(g.si).parentId&&I.slot.startsWith("cities:"),onDrop:(g,I)=>{let P=I.slot.slice(7);m(g.si,_d(h(g.si),g.group,g.index,P,I.index)),fo({level:"group",key:P})},onStep:(g,I)=>{m(g.si,_d(h(g.si),g.group,g.index,g.group,I<0?g.index-1:g.index+2)),x.level==="city"&&fo({level:"group",key:g.group})}}),T=Dd(n);T.current=n;let F=Dd(()=>{});FS(()=>{p(g=>{let I=hS(g);if(!I)return;let P=T.current.findIndex(E=>E.props?.id===I.nodeId);P<0||F.current(P,{level:I.part,index:I.index})})},[p]);let C=(g,I)=>{i.current=n[g]?.props?.id??null,o.select(g),fo(I),e.reveal();let P=n[g]?.props?.id;typeof P=="string"&&(I.level==="image"||I.level==="map")?d(xS(P,I.index,I.level)):d(null),typeof P=="string"&&o.scrollTo(P)};return F.current=C,{renderLocationTree:(g,I,{rowClick:P,isCollapsed:E,toggleCollapse:k})=>{let A=h(I),B=zt(A),H=String(g.props.id),v=s&&a?.props.id===H,O=_=>ve(BS,{...t?{}:b.seam({place:{...cs(I),index:_}})},`seam:${H}:groups:${_}`),N=(_,M)=>ve(BS,{...t?{}:S.seam({place:{...Nd(I,_),index:M}})},`seam:${H}:cities:${_}:${M}`);return Gt(M2,{children:[ve(_r,{icon:ve(U2,{size:13}),name:l("Texts"),words:r,onSelect:()=>C(I,{level:"texts"}),selected:v&&x.level==="texts",rowProps:{onClick:P(()=>C(I,{level:"texts"}))}}),B.map((_,M)=>{let q=`${H}::grp::${_.key}`,le=E(q),Ye=v&&x.level==="group"&&x.key===_.key,co=_.name||_.key?SS(_.key,_.name):l("Ungrouped"),_e={...Nd(I,_.key),index:_.cards.length},uo=S.row({item:{si:I,group:_.key,index:-1},place:_e,into:_e,canDrag:!1},{onClick:P(()=>C(I,{level:"group",key:_.key}))}),Me=b.row({item:{si:I,index:M},place:{...cs(I),index:M}},uo.rowProps);return Gt(ES,{children:[M===0&&O(0),ve(_r,{icon:ve(H2,{size:13}),name:co,words:r,onSelect:()=>C(I,{level:"group",key:_.key}),selected:Ye,draggable:Me.draggable,dragging:Me.dragging,drop:Me.drop??uo.drop,fold:{open:!le,label:l("group"),onToggle:()=>k(q)},actions:ve(RS,{kind:"delete",label:Ae("Delete {label} group ({n} city)","Delete {label} group ({n} cities)",_.cards.length,{label:co}),onClick:()=>{m(I,TS(A,_.key)),fo({level:"groups"})},children:ve(LS,{size:15})}),rowProps:Me.rowProps,count:_.cards.length,countLabel:Ae("{n} city","{n} cities",_.cards.length)}),!le&&Gt(AS,{children:[_.cards.map((Ee,Ie)=>{let ye=fs(A,_.key,Ie),He=v&&x.level==="city"&&x.index===ye,Fe=String(Ee?.name??"")||l("City"),po=`${H}::city::${is(Ee)}`,We=E(po),{rowProps:$e,...mo}=S.row({item:{si:I,group:_.key,index:Ie},place:{...Nd(I,_.key),index:Ie}},{onClick:P(()=>C(I,{level:"city",index:ye}))});return Gt(ES,{children:[Ie===0&&N(_.key,0),ve(_r,{icon:ve(z2,{size:13}),name:Fe,words:r,onSelect:()=>C(I,{level:"city",index:ye}),selected:He,...mo,fold:{open:!We,label:Fe,onToggle:()=>k(po)},actions:ve(RS,{kind:"delete",label:l("Delete {name}",{name:Fe}),onClick:()=>{m(I,PS(A,_.key,Ie)),fo({level:"group",key:_.key})},children:ve(LS,{size:15})}),rowProps:$e}),!We&&Gt(AS,{children:[ve(_r,{icon:ve(W2,{size:13}),name:l("Image"),words:r,onSelect:()=>C(I,{level:"image",index:ye}),selected:v&&x.level==="image"&&x.index===ye,rowProps:{onClick:P(()=>C(I,{level:"image",index:ye}))}}),ve(_r,{icon:ve(G2,{size:13}),name:l("Map"),words:r,onSelect:()=>C(I,{level:"map",index:ye}),selected:v&&x.level==="map"&&x.index===ye,rowProps:{onClick:P(()=>C(I,{level:"map",index:ye}))}})]}),N(_.key,Ie+1)]},is(Ee))}),Gt("button",{type:"button",className:"sf-add-card",onClick:()=>{let Ee=vS(A,_.key);m(I,Ee);let Ie=zt(Ee).find(ye=>ye.key===_.key);fo(Ie&&Ie.cards.length?{level:"city",index:fs(Ee,_.key,Ie.cards.length-1)}:{level:"group",key:_.key})},children:[ve("span",{className:"sf-plus sf-plus--sm",children:"+"}),l("Add city")]})]}),O(M+1)]},q)}),Gt("button",{type:"button",className:"sf-add-card",onClick:()=>{let{cards:_,key:M}=kS(A);m(I,_),C(I,{level:"group",key:M})},children:[ve("span",{className:"sf-plus sf-plus--sm",children:"+"}),l("Add group")]})]})},sectionPressed:g=>{g?.type===ds&&fo({level:"groups"})}}}import{useEffect as IH,useRef as gH}from"react";import{createNode as $d,newId as qd}from"efficient-easel/data";import{useEaselApi as yH}from"efficient-easel/easel";import{useScreenDocument as bH}from"efficient-easel/screen/components/ScreenDocumentContext";import{useEaselSession as SH}from"efficient-easel/screen/lib/session-context";import{useEffect as pH,useRef as mH}from"react";import{useEasel as xH}from"efficient-easel/easel";import{ROOT_ZONE as Ud}from"efficient-easel/draw";import{readHidable as lH}from"efficient-easel/draw";var DS=["general","commerce","service"],Ta=[{key:"openers",title:"Hero & intros",defaultExpanded:!0,templateable:!0,sections:[{type:"Hero",label:"Hero Slideshow",set:"general"},{type:"HeroSingle",label:"Hero",set:"general"},{type:"IntroBleed",label:"Scroll-Over Text",set:"general"}]},{key:"shop",title:"Shop & galleries",templateable:!0,sections:[{type:"Collections",label:"Collections",set:"commerce"},{type:"AlloyWheelsListing",label:"List",set:"commerce"},{type:"CatalogFilterBar",label:"Catalog Filter Bar",set:"commerce"},{type:"ProductGrid",label:"Product Grid",set:"commerce"},{type:"FitmentFinder",label:"Fitment Form",set:"commerce"},{type:"Gallery",label:"Tabbed Gallery",set:"commerce"},{type:"GalleryB",label:"Customer Photo Grid",set:"commerce"},{type:"SpecStrip",label:"Spec Strip",set:"general"}]},{key:"product",title:"Product page",templateable:!0,sections:[{type:"ProductHero",label:"Product Hero",set:"commerce"},{type:"SpecTable",label:"Spec Table",set:"commerce"},{type:"ProcessSteps",label:"Image & Text Columns",set:"general"},{type:"DetailRows",label:"Feature Rows",set:"commerce"},{type:"FitmentTable",label:"Fitment Table",set:"commerce"},{type:"TyreSizes",label:"Tyre Sizes",set:"commerce"},{type:"TyreFitment",label:"Tyre Fitment Form",set:"commerce"},{type:"EuTyreLabel",label:"EU Tyre Label",set:"commerce"},{type:"RelatedProducts",label:"Related Products",set:"commerce"},{type:"BundleOffer",label:"Bundle Products",set:"commerce"}]},{key:"checkout",title:"Checkout & ordering",templateable:!0,sections:[{type:"OrderSummary",label:"Order Table",set:"general"},{type:"DeliveryOptions",label:"Delivery Options",set:"commerce"},{type:"PaymentBadges",label:"Payment Methods",set:"general"},{type:"CheckoutCTA",label:"Ready-to-Order Banner",set:"commerce"}]},{key:"about",title:"About & brand story",templateable:!0,sections:[{type:"Manifesto",label:"Brand Text",set:"general"},{type:"Timeline",label:"Story Timeline",set:"general"},{type:"Footprint",label:"Locations Map",set:"general"}]},{key:"content",title:"Text & content",templateable:!0,sections:[{type:"Prose",label:"Editorial Text",set:"general"},{type:"ParagraphsA",label:"Lead Text",set:"general"},{type:"Split",label:"Image & Text Split",set:"general"},{type:"Cards",label:"Cards",set:"general"}]},{key:"proof",title:"Stats & social proof",templateable:!0,sections:[{type:"Stats",label:"Stats",set:"general"},{type:"StatsParagraph",label:"Stats with Text",set:"general"},{type:"Chart",label:"Chart",set:"general"},{type:"Mockup",label:"Mockup Card",set:"general"},{type:"Testimonials",label:"Testimonials",set:"general"},{type:"Reviews",label:"Reviews",set:"service"},{type:"Logos",label:"Logos",set:"general"}]},{key:"promo",title:"Promotions & sign-ups",templateable:!0,sections:[{type:"Banner",label:"Banner",set:"general"},{type:"TitleWithButtons",label:"Call-to-Action Heading",set:"general"},{type:"Ticker",label:"Scrolling Bar",set:"general"},{type:"Countdown",label:"Countdown",set:"general"},{type:"Subscribe",label:"Signup Form",set:"service"}]},{key:"blog",title:"Blog & journal",templateable:!0,sections:[{type:"Masthead",label:"Issue Header",set:"general"},{type:"FeaturedCover",label:"Feature Banner",set:"general"},{type:"LongRead",label:"Article Text",set:"general"},{type:"Series",label:"Recurring Columns",set:"general"},{type:"Events",label:"Latest Posts",set:"service"}]},{key:"navigation",title:"Navigation & wayfinding",templateable:!0,sections:[{type:"Breadcrumb",label:"Breadcrumb",set:"general"},{type:"CategoryBar",label:"Category Bar",set:"general"},{type:"DocTabs",label:"Document Tabs",set:"general"}]},{key:"legal",title:"Legal & documents",templateable:!0,sections:[{type:"DocMasthead",label:"Document Header",set:"general"},{type:"DocBody",label:"Document Text",set:"general"},{type:"DocMetaCards",label:"Document Detail Cards",set:"general"}]},{key:"contact",title:"Contact, FAQ & forms",templateable:!0,sections:[{type:"FAQ",label:"Q&A",set:"general"},{type:"ContactRouting",label:"Contact Form",set:"service"},{type:"ContactLocations",label:"Contact / Locations",set:"general"},{type:"SubmitBuild",label:"Photo Submission Form",set:"service"},{type:"ReviewForm",label:"Review Form",set:"service"},{type:"Form",label:"Form",set:"service"},{type:"AppointmentBooking",label:"Booking Form",set:"service"}]},{key:"structure",title:"Layout, structure & embeds",templateable:!1,sections:[{type:"SectionHeader",label:"Section Header",set:"general"},{type:"Flex",label:"Box",set:"general"},{type:"Divider",label:"Divider",set:"general"},{type:"CustomHTML",label:"Custom HTML",set:"general"}]}];function qae(){return Object.fromEntries(Ta.map(e=>[e.key,{title:e.title,components:e.sections.map(o=>o.type),...e.defaultExpanded?{defaultExpanded:!0}:{}}]))}var j2={Grid:'Lewis, 2026-09-14: Box and Grid duplicate each other and it feels confusing. 2026-09-15 he chose the order: give Box uneven widths FIRST, then merge Grid into Box. Shown three ways to pick the widths (mockup "Uneven Box Widths"), he chose A \u2014 shape pictures on the Box\'s `Block widths` row, the same "a row is a shape, pick a picture of it" rule he set for the photo wall on 2026-09-07.\n\nWHAT REPLACES IT: a Box set to One row, with `Block widths` at Equal or a shape (Big left, Big right, Bigger left, Bigger right) and its own `Columns` in the Phone view. Measured on PRODUCTION 2026-09-16 ~09:28 AEST (database `efficient-system`, all 10 tenant schemas, 128 storefront pages, both `layout` and `published_layout` \u2014 256 documents): 2 Grid nodes, and they are ONE Grid counted twice \u2014 the 9DIEM homepage on 9diem.com (`xtreme_mudder` schema), once as draft and once as published. It is top-level, holds three `ImageBlock`s at `columns` 3 \u2014 equal thirds \u2014 and NO block sets `Positions`. A Box draws that with `Block widths` at Equal.\n\n\u26A0\uFE0F THE COUNT MOVES; THE RULE MUST NOT DEPEND ON IT. This entry has already carried three different readings. A local-clone snapshot said no Grid used `Positions`. A PRODUCTION reading on 2026-09-15 ~13:15 AEST found 6 nodes on two sites, 4 of them spanned \u2014 hartesmetal.com.au homepage and about, 4 columns, spans 1 + 3. That one was TRUE when it was taken and stopped being true the same day: those two pages were rebuilt on Box (`Block widths: Bigger right`), and on 2026-09-16 they hold zero Grid nodes and are built from `Flex`. \u26D4 So the rule is NOT "there are still N spanned Grids". NEVER delete the Grid component or its `gridSpan` handling, whatever a census says \u2014 Grid still renders, still edits, still drags, and a merchant may rebuild a page either way on any day. Re-run the census on production before anyone PROPOSES deleting either, and read any number written here as the reading of its own day, not as the state of the world.\n\nWHAT A MERCHANT LOSES: a new Grid, and with it a fixed "N per row" that wraps by itself past three across, and the per-block `Positions` number. Box wraps with `Wrap`, but by content width, not by a fixed count.\n\nTHE TYPE KEY STAYS AND SO DOES THE COMPONENT. Every page holding a Grid still renders through it and can still be edited, dragged and added to; no document is rewritten and NO MIGRATION RUNS \u2014 the owner redoes live sections himself.\n\n\u26A0\uFE0F AND IT STAYS DROPPABLE WHERE IT LIVES. The drop rule in lib/document/config.tsx read the nestable containers off the catalogue\'s `structure` row, so leaving the catalogue would have made every open slot \u2014 a Box included \u2014 refuse a Grid already stored inside one. `scripts/test-retired-grid-stays-editable.tsx` \xA73 pins it.',CompatibleTyres:'Lewis, 2026-09-09: "Do not bother counting. Delete Compatible Tyres and use the new one. The new one needs complete settings \u2014 it must have every setting our cards have." Shown three ways to finish it, he chose C: retire from the menu now, and take styling the card text as its own card.\n\nWHAT REPLACES IT: `RelatedProducts` with its `Show` dropdown set to "Tyres that fit this product". That block is the GENERIC relationship section from card 1128 \u2014 it knows nothing about wheels or tyres, it asks the registry for a relationship by name. The two have rendered through the SAME renderer (`DynamicRelatedProducts`) since that card; this one is the pre-registry one-off that was never removed.\n\n\u26A0\uFE0F THE SWAP WAS NOT SAFE UNTIL #1305, AND SAYING SO IS THE POINT. The first old-versus-new table put in front of the owner was WRONG. `DynamicRelatedProducts` returns EARLY on a tyre answer and draws this component, so the seven card settings, the head split and the Width control all stopped at that call \u2014 nine settings, measured NO EFFECT, on precisely the relationship that replaces this block. #1283 gave the new block the card settings, #1299 the head split and its own Width, #1305 carried all of it onto the tyre branch. Only then was the claim true.\n\nWHAT WAS MEASURED BEFORE RETIRING, four ways, because the premise decides the card:\n \u2022 settable text kinds (SECTION_TEXT_KINDS): both blocks ABSENT \u2014 the map holds only TimelineTrack and Footprint, both AUTHORED lists\n \u2022 read-only text regions: neither `components/CompatibleTyres` nor `components/TyreCard` stamps one\n \u2022 panel rows through resolveFields: this block 31, `RelatedProducts` 42. This block\'s only style-ish key is `_sStyle`, the bucket HEADER, not a control\n \u2022 head text (num/title/description) is authored on both, so `_partStyles` reaches it identically\nSo on the CARD runs the two are zero against zero \u2014 neither can style them \u2014 and everywhere else the new block is ahead. Styling those runs needs a section-level prop family and a paint path for DERIVED text, which no section has yet: a part is anchored by matching an AUTHORED prop\'s string against the DOM, and `lib/document/source-bound-parts` keeps hydrated copy unreachable on purpose so a merchant cannot type into a copy of a product name and lose it at the next sync. That is its own card, and `lib/sections/text-regions` is the read-only half that already ships.\n\nTHE TYPE KEY STAYS AND SO DOES THE COMPONENT, the same contract Subscribe, Split and SubscribeBlogs have. Every page holding a `CompatibleTyres` still renders through it, no published document is rewritten, and NO MIGRATION RUNS \u2014 the owner\'s standing ruling of 2026-09-05: he redoes live sections himself and deletes the old ones when he does. He also said explicitly not to count them first.\n\n\u26A0\uFE0F AND THIS COMPONENT IS LOAD-BEARING FOR ITS OWN REPLACEMENT: `DynamicRelatedProducts` draws it for EVERY tyre answer. Deleting it would blank the block that replaces it, not just the pages still holding this one.',TimelineTrack:"Lewis, 2026-10-09/10 (decisions.md ND, approved): the horizontal year rail and the Story Timeline do one job, so the rail becomes the Story Timeline's fourth Display, Track. Retired by card [MERGE] One Text Block And Click Through Parts (2026-10-22).\n\nWHAT REPLACES IT: a Story Timeline (`Timeline`) with Display set to Track. It draws this section's own component (`components/TimelineTrack`), so for the same words it draws the same bytes: the band colour (`Background color`, the same built-in), the padding, the CTA and each milestone's `Upcoming` switch (shown on each entry under Track only). An entry's `Body` is the rail's blurb. `scripts/test-timeline-track-display.tsx` \xA72 holds the bytes.\n\nWHAT A MERCHANT LOSES on a NEW rail, said plainly: (1) the head cannot move into a box of its own (`headPlacement`); the layered rebuild puts a head in one Box with its content anyway. (2) The year and title of every milestone are not one text kind: each run is styled on its own. (3) The Width rows follow the Story Timeline's family (`background`), not the rail's (`capped`).\n\nTHE TYPE KEY STAYS AND SO DOES THE COMPONENT. Every page holding a Milestone Timeline still renders through it and can still be edited; no document is rewritten and NO MIGRATION RUNS.",Spacer:`Lewis, 2026-10-10 (section-merges.md group 19, approved): one Divider holds space and lines. Style = None (was Spacer) / Line / Stripes; the space above and below as number boxes. Retired by card [MERGE] Spacer Into Divider (2026-10-26).
|
|
7
|
+
|
|
8
|
+
WHAT REPLACES IT: a Divider with Style set to None. It draws no line, only its space, and that space is the Divider's Padding row (top and bottom, each with its phone value): the Spacer's 24 / 48 / 96 / 160 px are None with Padding 12 + 12, 24 + 24, 48 + 48, 80 + 80. \`scripts/test-divider-holds-the-spacer.tsx\` \xA75 holds it.
|
|
9
|
+
|
|
10
|
+
WHAT A MERCHANT LOSES on a NEW space: nothing the Spacer had. Four fixed sizes become any number on the 4px grid, top and bottom apart, and a phone value.
|
|
11
|
+
|
|
12
|
+
NO CONVERTER ROW: 0 Spacer nodes on any page, draft or published, in any schema of the local production clone (read-only count, 2026-10-26), and none in the backend's seed files. It stays in \`scripts/fixtures/section-to-box.baseline.json\` with that reason.
|
|
13
|
+
|
|
14
|
+
THE TYPE KEY STAYS AND SO DOES THE COMPONENT. A Spacer anywhere still renders through it and can still be edited; no document is rewritten.`,KeyFeatures:`Lewis, 2026-10-10 (section-merges.md group 4, approved): one Cards section holds Cards and Key Features; Key Features' diamond cells are the card style "Label only". Retired by card [MERGE] One Text Block And Click Through Parts (2026-10-22).
|
|
15
|
+
|
|
16
|
+
WHAT REPLACES IT: a Cards section with Card style set to Label only. It draws this section's own component (\`components/KeyFeatures\`), so for the same words it draws the same bytes: the pill eyebrow when no look is stored, the columns, each cell's link. A cell's words are the card's \`title\` (row "Feature label"), its link the card's \`href\` (row "Link"), both shown under Label only. \`scripts/test-cards-label-only.tsx\` \xA72 holds the bytes.
|
|
17
|
+
|
|
18
|
+
WHAT A MERCHANT LOSES on a NEW Label only section: nothing this section had. It GAINS the Cards head split (its head can move into a box of its own), which Key Features never had: that head draws the shared \`simple\` head, eyebrow ABOVE the heading, where Key Features drew it beside.
|
|
19
|
+
|
|
20
|
+
THE TYPE KEY STAYS AND SO DOES THE COMPONENT. Every page holding a Key Features still renders through it and can still be edited; no document is rewritten and NO MIGRATION RUNS.`,SubscribeBlogs:"card 66396 \u2014 folded into `Subscribe`, which now chooses its rail's content with a `Type` control (the newsletter's own issues, or live blog posts). The two shared 21 of their fields and rendered THE SAME BYTES from equivalent rows, so offering both asked a merchant to choose between two names for one section. The type key stays because it is stored on published pages, and the component stays because those pages still render through it."},jae=["Grid","Spacer"],Kae=Array.from(new Set([...Ta.flatMap(e=>e.sections.map(o=>o.type)),...Object.keys(j2)])),Vae=Object.fromEntries(Ta.flatMap(e=>e.sections.map(o=>[o.type,o.label]))),K2={Heading:"general",Text:"general",Eyebrow:"general",ImageBlock:"general",LogoBlock:"general",ButtonBlock:"general",PostCard:"general",HeroSlide:"general",HeroGroup:"general",Integrations:"general",Grid:"general",TimelineTrack:"general",KeyFeatures:"general",Spacer:"general",CollectionCard:"commerce",GalleryItem:"commerce",ProductRef:"commerce",CompatibleTyres:"commerce",Header:"commerce",SearchBlock:"commerce",CartBlock:"commerce",CountrySwitchBlock:"commerce",AccountBlock:"commerce",ThemeSwitchBlock:"commerce",ProductGallery:"commerce",EuTyreLabelBlock:"commerce",SubmitBox:"service",BookingBox:"service",SubscribeBlogs:"service",RatingBlock:"service",Footer:"service",FooterLogo:"service",FooterMenu:"service",FooterDivider:"service",FooterGroup:"service",FooterText:"service",FooterEmailSignup:"service",FooterSocial:"service",FooterPayment:"service",MenuBlock:"service",EmailFormBlock:"service",SocialLogosBlock:"service",PaymentLogosBlock:"service",LegalLineBlock:"service",SiteHeader:"service",SiteFooter:"service"},us={...K2,...Object.fromEntries(Ta.flatMap(e=>e.sections.map(o=>[o.type,o.set])))};function NS(e){return Object.prototype.hasOwnProperty.call(us,e)?us[e]:void 0}function Md(e){return Object.keys(us).filter(o=>us[o]===e).sort()}var Yae=Md("general"),Xae=Md("commerce"),Zae=Md("service"),Hd="Flex",ut="Box",Qae=`${ut}es`;function V2(e){return e==="section"?"Blank section":ut}function Wd(e,o,t){return e===Hd?V2(o):t}var pt="content",pe="Flex",Y2="Text & media",X2="Layout & structure",Z2=[{type:"Eyebrow",label:"Eyebrow",retired:!0},{type:"Heading",label:"Heading",retired:!0},{type:"Text",label:"Text"},{type:"ImageBlock",label:"Image"},{type:"LogoBlock",label:"Logo"},{type:"ButtonBlock",label:"Button"},{type:"Form",label:"Form"},{type:"PostCard",label:"Post Card"},{type:"Stats",label:"Stats"},{type:"MenuBlock",label:"Menu"},{type:"EmailFormBlock",label:"Email Form"},{type:"SocialLogosBlock",label:"Social Logos"},{type:"PaymentLogosBlock",label:"Payment Logos"},{type:"LegalLineBlock",label:"Legal Line"},{type:"SearchBlock",label:"Search"},{type:"CartBlock",label:"Cart"},{type:"CountrySwitchBlock",label:"Country Switch"},{type:"AccountBlock",label:"Account"},{type:"ThemeSwitchBlock",label:"Theme Switch"}].map(e=>({...e,group:Y2})),Q2=(Ta.find(e=>e.key==="structure")?.sections??[]).map(e=>({type:e.type,label:e.label,group:X2})),MS=[...Z2,...Q2],zd=[{type:"Eyebrow",label:"Eyebrow",retired:!0},{type:"Heading",label:"Heading",retired:!0},{type:"Text",label:"Text"},{type:"ImageBlock",label:"Image"},{type:"LogoBlock",label:"Logo"},{type:"ButtonBlock",label:"Button"},{type:"HeroGroup",label:ut}],ore=zd.map(e=>e.type),J2=1,eH=zd.filter(e=>e.type!=="HeroGroup");function oH(e){return e<J2?zd:eH}var tH={Flex:{slot:pt,choices:()=>MS},Grid:{slot:pt,choices:()=>MS},HeroGroup:{slot:pt,choices:oH}};function HS(e,o=0){let t=tH[e];return t?{slot:t.slot,choices:t.choices(o)}:null}var mt=()=>({tag:"h2",_partStyles:{text:{textStyle:"heading-2"}}}),Dr=()=>({_partStyles:{text:{textStyle:"body-5",color:"accent",letterSpacing:.3,case:"upper",lineHeight:1.5}}});var aH="inline",rH=[{label:"In this section",value:"inline"},{label:"In its own box",value:"own-box"}];var Oo={ProductGrid:{num:"num",title:"title",description:"description",headRows:["num","title","titleSize","description","linkText","linkHref"],renderer:"ProductGridSection",padKey:"padTop",linkProp:"link"},TyreSizes:{num:"num",title:"title",description:"description",headRows:["num","title","description"],renderer:"DynamicTyreSizes"},FitmentFinder:{num:"num",title:"title",description:"description",headRows:["num","title","description"],renderer:"FitmentFinder"},TyreFitment:{num:"num",title:"title",description:"description",headRows:["num","title","description"],renderer:"DynamicTyreFitment"},BundleOffer:{num:"num",title:"title",description:"description",headRows:["num","title","description"],renderer:"DynamicBundleOffer"},CompatibleTyres:{num:"num",title:"title",description:"description",headRows:["num","title","description"],renderer:"DynamicRelatedProducts"},RelatedProducts:{num:"num",title:"title",description:"description",headRows:["num","title","description"],renderer:"DynamicRelatedProducts"},SpecTable:{num:"num",title:"title",description:"description",headRows:["num","title","description"],renderer:"SpecTable"},FAQ:{num:"num",title:"title",linkProp:"link",headRows:["num","title","linkText","linkHref"],renderer:"FAQ"},GalleryB:{num:"num",title:"title",headRows:["num","title","linkText","linkHref"],renderer:"GalleryGrid"},FitmentTable:{num:"num",title:"title",description:"description",headRows:["num","title","description"],renderer:"FitmentTable"},Events:{num:"num",title:"title",linkProp:"link",headRows:["num","title","linkText","linkHref"],renderer:"Events"},ProcessSteps:{num:"num",title:"title",description:"description",headRows:["num","title","description"],headStyle:"editorial",renderer:"ProcessSteps",padKey:"padTop"},LongRead:{num:"headNum",title:"headTitle",description:"headDesc",headRows:["headNum","headTitle","headDesc"],headStyle:"editorial",renderer:"LongRead"},Series:{num:"headNum",title:"headTitle",description:"headDesc",headRows:["headNum","headTitle","headDesc"],headStyle:"editorial",renderer:"Series"},TimelineTrack:{num:"eyebrow",title:"title",description:"intro",headRows:["eyebrow","title","intro"],headStyle:"editorial",renderer:"TimelineTrack",padKey:"padTop"},StatsParagraph:{num:"eyebrow",title:"title",description:"desc",headRows:["eyebrow","title","desc"],headStyle:"editorial",renderer:"StatsParagraph"},Footprint:{num:"sectionNumber",title:"heading",description:"tagline",headRows:["sectionNumber","heading","tagline"],headStyle:"editorial",renderer:"Footprint",padKey:"padTop"},Collections:{num:"eyebrow",title:"heading",headRows:["eyebrow","heading"],renderer:"Collections"},Cards:{num:"eyebrow",title:"title",headRows:["eyebrow","eyebrowLook","title"],headStyle:"simple",renderer:"Cards"},Testimonials:{num:"eyebrow",title:"title",headRows:["eyebrow","eyebrowLook","title"],headStyle:"simple",renderer:"Testimonials"},Reviews:{num:"eyebrow",title:"title",headRows:["eyebrow","eyebrowLook","title"],headStyle:"simple",renderer:"Reviews"},Prose:{num:"eyebrow",title:"title",headRows:["eyebrow","title"],headStyle:"essay",renderer:"Prose"},ReviewForm:{num:"eyebrow",title:"title",headRows:["eyebrow","title"],headStyle:"simple",renderer:"ReviewForm"},DeliveryOptions:{num:"eyebrow",title:"title",description:"body",headRows:["eyebrow","title","body"],headStyle:"natural",headRowGap:"gap-3",headDescriptionSize:"text-[15px]",renderer:"DeliveryOptions"}},Pa="SectionHeader";function WS(e){return e in Oo}function lre(e){return Qo(rH,aH,e)}var zS=new Set(["Flex"]);function sre(e){return!!e?.type&&zS.has(e.type)}var nH={not:{context:"parentType",in:[...zS]}};function ire(e,o,t){return Nl(e,t,nH)}var GS={not:{field:"headPlacement",is:"own-box"}},fre={not:GS};function cre(e,o,t){return Nl(e,t,GS)}var ps=pe,ms=pt;function sH(e,o){return o===0?`${e}~box`:`${e}~box-${o+1}`}var iH=new Set(["id"]),xs={};function Ire(e){for(let[o,t]of Object.entries(e)){if(o in xs&&xs[o]!==t)throw new Error(`lib/sections/section-to-box: "${o}" already has a row`);xs[o]=t}}function gre(e){let o=Oo[e];if(!o)throw new Error(`lib/sections/section-to-box: "${e}" has no head row in SPLITTABLE_SECTIONS`);let t=[{kind:"text",key:o.num,role:"eyebrow"},{kind:"text",key:o.title,role:"heading"}];return o.description&&t.push({kind:"text",key:o.description,role:"body"}),o.headRows.includes("linkText")&&o.headRows.includes("linkHref")&&t.push({kind:"button",key:"linkText",href:"linkHref"}),t}var Gd=e=>lH(e),yre=e=>Gd(e).text.trim()!=="",fH=e=>e==="heading"?mt():e==="eyebrow"?Dr():{};function cH(e,o,t){let a={...e._partStyles?.text??{},...o??{},...t??{}};return Object.keys(a).length?{_partStyles:{text:a}}:{}}function dH(e,o){if(e===void 0)return{};if(typeof e=="string")return{variant:e};let t=o[e.key];return{variant:typeof t=="string"&&Object.hasOwn(e.map,t)?e.map[t]:e.fallback}}function US(e,o,t,a){let r={...o};for(let n of e){let[s,i,f]=typeof n=="string"?[n,n,void 0]:n;if(t[s]===void 0)continue;let d=f?f(t[s],t):t[s];d===void 0?delete r[i]:r[i]=d,a(s,i,d===void 0)}return r}function uH(e,o,t={}){let a=e.props,r=o.skip?.(a);if(r!==void 0)return{node:e,nodes:[e],carried:[],dropped:[],siteWrites:[],restyled:[],skipped:r};let n=String(a.id??e.type),s=[],i=[],f=[],d=new Set,p=(I,P)=>{s.push({key:I,home:P}),d.add(I)},x=a._partStyles??{},m=0,h=(I,P)=>({type:I,props:{...P,id:`${n}~${I}-${++m}`}}),b=(I,P,E,k,A,B,H)=>{if(A){for(let O of I??[]){let N=typeof O=="string"?O:O[0];E[N]!==void 0&&H(N,`nothing \u2014 the ${k} has no parts, so it is not drawn`)}return}let v=typeof P=="function"?P(a,t):P??{};return US(I??[],v,E,(O,N,_)=>H(O,_?`nothing \u2014 the old value draws nothing (${k}: no ${N})`:`${B}${k}: ${N}`))},S=I=>I.map(P=>{let E={...P.props??{}};for(let[k,A]of Object.entries(P.slots??{}))E[k]=S(A);return h(P.type,E)}),T=(I,P,E)=>{let k=Array.isArray(P[I.key])?P[I.key]:[],A=k.map((O,N)=>{let _=O??{},M=I.item?.(_,N,a)??{},q=F(M.reverse?[...I.parts].reverse():I.parts,_,!1,`item ${N+1}: `);return I.flat?M.props?q.map(le=>({...le,props:{...le.props,...M.props,id:le.props.id}})):q:[h(ps,{name:`${I.name} ${N+1}`,...I.props??{},...M.props??{},[ms]:q})]}),B=I.perRow?.(a),H=I.perRow?Number.isInteger(B)&&B>=1?B:1:0;if(E(I.key,(k.length?I.flat?`each item's parts (${k.length} items), in order`:`one Box per item (${k.length}), its parts inside`:"nothing \u2014 the list is empty")+(H&&k.length?`, in rows of ${H}`:"")),!H)return A.flat();let v=[];for(let O=0;O*H<A.length;O++)v.push(h(ps,{name:`${I.rowName??`${I.name} row`} ${O+1}`,...I.rowProps??{},[ms]:A.slice(O*H,(O+1)*H).flat()}));return v},F=(I,P,E,k)=>{let A=[],B=(v,O)=>E?p(v,O):void 0,H=v=>E?x[v]:void 0;for(let v of I)if(!(v.when&&!v.when(a,E?void 0:P)))switch(v.kind){case"text":{let O=Gd(P[v.key]);if(!O.text.trim()){B(v.key,"nothing \u2014 empty words draw nothing, so no block");break}let N=fH(v.role??"body"),{_partStyles:_,...M}=N,q=cH(N,v.style,H(v.key));if(v.was&&E){let le=q._partStyles?.text??{};f.push({key:v.key,was:v.was,...typeof le.textStyle=="string"?{textStyle:le.textStyle}:{},...ee(le.size)!==void 0?{size:ee(le.size)}:{},...ee(le.sizePhone)!==void 0?{sizePhone:ee(le.sizePhone)}:{}})}A.push(h("Text",{text:O.text,...M,...v.props??{},...q,...O.hidden?{_hidden:!0}:{}})),B(v.key,`${k}Text block: its words${O.hidden?", hidden":""}`);break}case"button":{let O=Gd(P[v.key]);if(!O.text.trim()){B(v.key,"nothing \u2014 no words, no button"),B(v.href,"nothing \u2014 no button to link"),typeof v.variant=="object"&&B(v.variant.key,"nothing \u2014 no button to style");break}let N=typeof P[v.href]=="string"&&P[v.href]?P[v.href]:"#",_={...v.style??{},...H(v.key)??{}};A.push(h("ButtonBlock",{label:O.text,href:N,...v.props??{},...dH(v.variant,P),...Object.keys(_).length?{_partStyles:{label:_}}:{},...O.hidden?{_hidden:!0}:{}})),B(v.key,`${k}Button block: its words`),B(v.href,`${k}Button block: its link`),typeof v.variant=="object"&&B(v.variant.key,`${k}Button block: its Style`);break}case"image":{let O=P[v.key];if(typeof O!="string"||!O){B(v.key,"nothing \u2014 no picture, no block"),v.alt&&B(v.alt,"nothing \u2014 no picture to describe");break}let N=v.alt&&typeof P[v.alt]=="string"?P[v.alt]:"";A.push(h("ImageBlock",{src:O,alt:N,...v.props??{}})),B(v.key,`${k}Image block: its picture`),v.alt&&B(v.alt,`${k}Image block: its alt text`);break}case"list":{A.push(...T(v,P,B));break}case"group":{let O=F(v.parts,P,E,k),N=b(v.box,v.props,P,`${v.name} Box`,!O.length&&!v.keepEmpty,k,B);N&&A.push(h(ps,{name:v.name,...N,[ms]:O}));break}case"block":{let O=v.parts?F(v.parts,P,E,k):[],N=b(v.box,v.props,P,`${v.type} block`,!!v.parts&&!O.length&&!v.keepEmpty,k,B);N&&A.push(h(v.type,{...N,...v.slot?{[v.slot]:O}:{}}));break}case"core":{let O=v.as??e.type,N={headPlacement:"own-box",...v.props??{}};for(let _ of v.keep)P[_]!==void 0&&(N[_]=P[_],B(_,`the ${O} block inside the Box`));for(let[_,M]of Object.entries(v.rename??{}))P[_]!==void 0&&(N[M]=P[_],B(_,`the ${O} block inside the Box: ${M}`));for(let[_,M]of Object.entries(v.slots??{}))N[_]=M.flatMap(q=>"kind"in q?T(q,P,B):S([q]));A.push(h(O,N));break}}return A},C=(I,P)=>{let E=P===0?"Box":`${I.name} Box`,k=F(I.parts,a,!0,P===0?"":`${E}: `),A=typeof I.boxProps=="function"?I.boxProps(a,t):I.boxProps??{},B=US(I.box??[],A,a,(H,v,O)=>p(H,O?`nothing \u2014 the old value draws nothing (${E}: no ${v})`:`${E}: ${v}`));return{type:ps,props:{name:I.name,...B,[ms]:k,id:sH(n,P)}}},g=[o,...o.also??[]].map(C);a._partStyles!==void 0&&p("_partStyles","each old part's style moved to its new part");for(let[I,P]of Object.entries(o.drop??{}))I in a&&(i.push({key:I,why:P}),d.add(I));for(let I of Object.keys(a))iH.has(I)||d.has(I)||i.push({key:I,why:"not in the row \u2014 not carried"});return{node:g[0],nodes:g,carried:s,dropped:i,siteWrites:[...o.site?.(e,t)??[]],restyled:f}}function $S(e){if(!Array.isArray(e))return[];let o=[];return e.forEach((t,a)=>{let r=t&&typeof t.type=="string"?xs[t.type]:void 0;if(!r?.on)return;let n=uH(t,r);n.skipped===void 0&&o.push({index:a,node:n.node,nodes:n.nodes})}),o}function qS(e){let o=xH(a=>a.appState.data.content),t=mH(new Set);pH(()=>{hH($S(o),e,t.current)},[o,e])}function hH(e,o,t){for(let{index:a,nodes:r}of[...e].sort((n,s)=>s.index-n.index)){let n=String(r[0].props.id);t.has(n)||(t.add(n),o.replaceComponent(Ud,a,r[0]),r.slice(1).forEach((s,i)=>{o.insertNode(Ud,a+1+i,s),o.replaceComponent(Ud,a+1+i,s)}))}}import{ROOT_ZONE as Ea,missingPinnedTypes as CH,pinnedDuplicateIds as jd}from"efficient-easel/draw";function jS(e){return!e.docId||e.saveStatus==="saving"?!1:e.seededDocId!==e.docId}function KS(e,o){let t=e.some(i=>i?.type===ie),a=e[e.length-1],r=!t&&a?.type===ce?a:null,n=e.filter(i=>i?.type===ce&&i!==r).map(i=>String(i.props?.id??"")).filter(Boolean),s=o.hasChromeDoc&&!t&&!r;return{remove:n,seedHeader:!e.some(i=>i?.type===Ne),seedFooter:s,seedSiteHeader:s&&!e.some(i=>i?.type===de)}}async function VS(e){let o=e.blocks?.seeds?.siteHeader;if(!o)return!1;let t;try{t=await o({make:e.make,id:e.id,siteId:e.siteId,token:e.token})}catch{return!1}if(!t||t.type!==de||!e.stillOpen())return!1;let a=e.latest();return a.some(r=>r?.type===de)?!1:(e.write(es(a,t)),!0)}function YS(e,o){let{adapter:t,capabilities:a,currentSlug:r,docId:n,data:s,saveStatus:i,siteId:f,tokenRef:d}=bH(),p=SH(),{hasSiteSettings:x,hasPinnedChrome:m}=a;qS(e);let h=!!a.editsPinnedInPlace&&r!==oa,b=r===oa,S=yH().getState,T=gH(null);IH(()=>{if(!jS({docId:n,saveStatus:i,seededDocId:T.current})||(T.current=n,!m))return;let F=S().appState.data,C=F.content,g=s?.content??[],I=(A,B)=>A.some(H=>H?.type===B);if(!x){let A=new Set(jd(C)),B=A.size?C.filter(v=>!A.has(v.props.id)):C;if(A.size&&e.setDocument({...F,content:B}),b)return;let H=CH(B,g);if(H.includes(ce)){let v=B.length,O=e.insertSection(ce,v);e.replaceComponent(Ea,v,{type:ce,props:{id:O,blocks:Jl()}})}H.includes(Ne)&&e.insertNode(Ea,0,Ql());return}if(b){let A=wa(C);if(A!==C&&e.setDocument({...F,content:[...A]}),!A.find(B=>B.type===ce)&&!I(g,ce)&&!I(A,ie)&&!I(g,ie)){let B=(v,O)=>$d(o,v,O),H={type:ce,props:{blocks:Jl()}};e.insertNode(Ea,A.length,Er(H,B,qd(ie)))}return}if(h){let A=!!t?.pinnedChrome?.state().docId,B=KS(C,{hasChromeDoc:A}),H=new Set([...B.remove,...jd(C.filter(O=>!B.remove.includes(String(O.props.id))))]),v=H.size?C.filter(O=>!H.has(String(O.props.id))):C;if(v.length!==C.length&&e.setDocument({...F,content:v}),B.seedFooter&&!I(g,ce)&&!I(g,ie)){let O=(_,M)=>$d(o,_,M),N={type:ce,props:{blocks:Jl()}};e.insertNode(Ea,v.length,Er(N,O,qd(ie)))}if(B.seedHeader&&!I(g,Ne)){let O=v[0]?.type===de?1:0;e.insertNode(Ea,O,Ql())}if(B.seedSiteHeader&&!I(g,de)&&!I(g,ce)&&!I(g,ie)){let O=n;VS({blocks:yn(p),make:(N,_)=>$d(o,N,_),id:qd(de),siteId:f??null,token:d.current,latest:()=>S().appState.data.content,stillOpen:()=>T.current===O,write:N=>{let _=S().appState.data;e.setDocument({..._,content:[...N]})}})}return}let P=C.filter(A=>A.type!==ce),E=new Set(jd(P)),k=E.size?P.filter(A=>!E.has(A.props.id)):P;k.length!==C.length&&e.setDocument({...F,content:k}),!I(k,Ne)&&!I(g,Ne)&&e.insertNode(Ea,0,Ql())},[n,i,s,S,e,x,m,b,h,t,p,f,d])}import{useEffect as XS,useMemo as wH,useRef as ZS}from"react";import{useEasel as vH}from"efficient-easel/easel";import{useEaselHost as kH}from"efficient-easel/screen/lib/host";var Kd=e=>ne(e.requestId)??null;function QS(){let e=kH(),{appState:o,selectedItem:t,dispatch:a,history:r,config:n}=vH(m=>m),s=n,i=ZS({appState:o,dispatch:a,history:r,blockConfig:s});i.current={appState:o,dispatch:a,history:r,blockConfig:s};let f=ZS(new Map),d=t?.props?.id,p=wH(()=>lh(s,o.data,d),[s,o.data,d]),x=p?JSON.stringify(p):"";XS(()=>{e.connected&&e.send("storefront-editor:selection",{selection:p})},[e,x]),XS(()=>e.subscribe(m=>{let{appState:h,dispatch:b,history:S,blockConfig:T}=i.current;switch(m.type){case"storefront-editor:request-document":{let F=Kd(m);if(!F)return;e.send("storefront-editor:document",{requestId:F,document:h.data,blocks:fh(T)});return}case"storefront-editor:apply-page-edits":{let F=Kd(m);if(!F)return;let C=Array.isArray(m.ops)?m.ops:[],g=C.length?ch(T,h.data,C,I=>`${I}-${crypto.randomUUID()}`):{ok:!1,reason:"no changes"};g.ok&&(b({type:"setData",data:g.document,recordHistory:!0}),f.current.set(F,JSON.stringify(g.document.content??[]))),e.send("storefront-editor:page-edits-result",{requestId:F,applied:g.ok,reason:g.ok?null:g.reason});return}case"storefront-editor:undo-page-edits":{let F=Kd(m);if(!F)return;let C=f.current.get(F),g=C!==void 0&&C===JSON.stringify(h.data.content??[]);g&&S.hasPast&&(S.back(),f.current.delete(F)),e.send("storefront-editor:page-edits-result",{requestId:F,applied:g&&S.hasPast,reason:g?null:"the page has changed since"});return}case"storefront-editor:set-right-panel":typeof m.shown=="boolean"&&b({type:"setUi",ui:{rightSideBarVisible:m.shown}});return;default:return}}),[e])}import{useEffect as oC,useState as tC}from"react";var hs=new Map;async function TH(e,o){try{return(await Ce().site.get({siteId:o})).slug?.trim()||null}catch(t){return console.warn("[editor-site-slug] could not resolve the site slug",t),null}}function JS(e,o){let t=hs.get(o);return t||(t=TH(e,o),hs.set(o,t),t.catch(()=>{hs.get(o)===t&&hs.delete(o)})),t}var PH=/^(localhost|(?:[a-z0-9-]+\.)+localhost|127(?:\.\d{1,3}){3}|0\.0\.0\.0|\[::1\]|::1)$/i;function Vd(e){return!!e&&PH.test(e)}function eC(e){let{pageSlug:o,siteSlug:t,hostname:a}=e,r=o===fn?"/":`/${encodeURIComponent(o)}`;if(!Vd(a))return r;let n=t?.trim();return n?`${r}?site=${encodeURIComponent(n)}`:r}function aC(e){let{pageSlug:o,siteId:t,token:a}=e,[r,n]=tC(null),[s,i]=tC(null),f=Jr();oC(()=>i(f?new URL(f).hostname:window.location.hostname),[f]),oC(()=>{if(!Vd(s)||!t||!a){n(null);return}let p=!1;return JS(a,t).then(x=>{p||n(x)}),()=>{p=!0}},[s,t,a]);let d=eC({pageSlug:o,siteSlug:r,hostname:s});return f?`${f}${d}`:d}import{jsx as Nr}from"react/jsx-runtime";import{ExternalIcon as rC}from"efficient-easel/icons";import{EaselIconButton as EH}from"efficient-easel/chrome";import{Tooltip as FH,iconButtonClasses as OH}from"efficient-shell/ui";function LH({pageId:e,liveHref:o,draftLink:t,win:a=window}){let r=a.open("","_blank");if(r)try{r.opener=null}catch{}let n=s=>{r&&!r.closed?r.location.href=s:a.open(s,"_blank","noopener,noreferrer")};return t(e).then(s=>n(s.url??o),()=>n(o))}function nC({liveHref:e,pageId:o,draftLink:t}){return t&&o?Nr(EH,{label:l("Preview your saved draft in a new tab"),tip:l("Open your saved draft in a new tab. Visitors don't see it."),onClick:()=>{LH({pageId:o,liveHref:e,draftLink:t})},children:Nr(rC,{})}):Nr(FH,{content:l("Preview the live site (opens in a new tab)"),side:"bottom",children:Nr("a",{className:OH({className:"es-iconbtn"}),href:e,target:"_blank",rel:"noopener noreferrer","aria-label":l("Preview the live site in a new tab"),children:Nr(rC,{})})})}import{createElement as MH,useCallback as HH,useEffect as kC,useRef as TC,useState as WH}from"react";import{ClockIcon as zH}from"efficient-shell/icons/efficient";import{useScreenDocument as GH}from"efficient-easel/screen/components/ScreenDocumentContext";import{useSyncExternalStore as AH}from"react";import{useScreenDocument as RH}from"efficient-easel/screen/components/ScreenDocumentContext";var BH=()=>()=>{},lC=()=>null;function Is(e){return AH(e?e.subscribe:BH,e?e.state:lC,e?e.state:lC)}function gs(){let{adapter:e}=RH();return e?.pinnedChrome}import{useSyncExternalStore as fC}from"react";var Mr=!1,Fa=null,Yd=new Set;function Wr(){for(let e of Yd)e()}function cC(e){return Yd.add(e),()=>{Yd.delete(e)}}function dC(){Mr||(Mr=!0,Wr())}function uC(){Mr&&(Mr=!1,Wr())}function sC(){return Mr}function pC(){return fC(cC,sC,sC)}function iC(){return Fa}function ys(){Fa&&(Fa=null,Wr())}function mC(){return fC(cC,iC,iC)}var Hr=class extends Error{constructor(){super("The editor's last changes could not be saved, so nothing was restored."),this.name="HeldEditsNotSaved"}};async function xC(e,o,t,{flushSave:a,reload:r}){if(!await a())throw new Hr;let n=await e.restore(o,t);return vm(n.liveState),r(),n}async function hC({access:e,version:o,page:t,...a}){let r=await xC(e,o.id,t?{page:t.id}:{},a);Fa={title:_H(o,t??null),undo:r.undo},Wr()}async function IC({access:e,...o}){let t=Fa?.undo;t&&(await xC(e,t,{},o),Fa=null,Wr())}function gC(e){return e.name?e.name:e.kind==="draft_before_restore"?l("Draft before restore"):l("Version {n}",{n:e.number})}function _H(e,o){return e.kind==="draft_before_restore"?l("Your drafts from before the restore are back"):o?l("{page} from version {n} is now your draft",{page:o.name,n:e.number}):l("Version {n} is now your draft",{n:e.number})}function yC(e){let o=e.changes.filter(a=>a.kind==="page").length,t=[...o?[Ae("{n} page","{n} pages",o)]:[],...e.changes.filter(a=>a.kind!=="page").map(a=>a.name)];if(!t.length)return"";try{return new Intl.ListFormat(Ws(),{type:"conjunction"}).format(t)}catch{return t.join(", ")}}function bC(e){return e.change==="take_down"?l("{name} (taken down)",{name:e.name}):e.name}function SC(e,o=new Date){let t=new Date(e);if(Number.isNaN(t.getTime()))return"";let a=Ws(),r=new Intl.DateTimeFormat(a,{hour:"numeric",minute:"2-digit"}).format(t);if(t.toDateString()===o.toDateString())return l("Today, {time}",{time:r});let n=new Intl.DateTimeFormat(a,{day:"numeric",month:"short",...t.getFullYear()===o.getFullYear()?{}:{year:"numeric"}}).format(t);return l("{day}, {time}",{day:n,time:r})}import{useSyncExternalStore as DH}from"react";var Oa=new Map,Xd=new Set;function Zd(e,o){if(!(Oa.has(e)&&Oa.get(e)===o)){Oa.set(e,o);for(let t of Xd)t()}}function kne(e,o){Zd(e,o)}function Tne(e,o){let t=Oa.get(e);Zd(e,o??(t==="live"?"changed":t))}function Pne(e,o){Zd(e,o??"live")}function Ene(e){return Oa.get(e)}function NH(e){return Xd.add(e),()=>{Xd.delete(e)}}function CC(e){let o=()=>e?Oa.get(e):void 0;return DH(NH,o,o)}function wC(e,o){return e==="live"&&o?"changed":e}function Qd({live:e,onPress:o,busy:t=!1,pinnedUnpublished:a=!1,goingLive:r}){let n=e==="live"&&!a,s=e==="changed"?l("Changes not live yet"):e==="never"?l("Never published"):a?l("Header and footer not live yet"):e==="live"?l("Everything is live"):null;return{label:l("Publish"),tooltip:e==="never"?l("Put this page on your site"):l("Put your changes on your site"),status:s,quiet:n?{label:l("Published"),reason:l("Everything is live")}:null,...r&&r.length?{goingLive:r}:{},onPress:o,busy:t}}function vC(e){return e.map(o=>o.change==="take_down"?l("{name} (taken down)",{name:o.name}):o.name)}function PC(e){let{docId:o,capabilities:t,hasUnsavedEdits:a,onPublish:r,adapter:n}=GH(),s=wC(CC(o??null),a),i=Is(gs()),f=n.siteLiveState;kC(()=>{if(f)return Ei(f),wn(0),()=>Ei(null)},[f]);let d=vn(),[p,x]=WH(!1),m=TC(e);m.current=e;let h=TC(!0);kC(()=>(h.current=!0,()=>{h.current=!1}),[]);let b=HH(()=>{x(!0),r(m.current).then(()=>{ys()}).finally(()=>{h.current&&x(!1)})},[r]);if(t.canPublish){if(f){let S=d===void 0?void 0:a||d.state==="changed"?"changed":"live",T=Qd({live:S,onPress:b,busy:p,goingLive:vC(d?.changes??[])});return n.siteVersions?{...T,menuItems:UH()}:T}return Qd({live:s,onPress:b,busy:p,pinnedUnpublished:i?.unpublished??!1})}}function UH(){return[{key:"version-history",label:l("Version history"),icon:MH(zH),onSelect:dC}]}import{jsx as G,jsxs as Ue,Fragment as Ur}from"react/jsx-runtime";import{useCallback as $H,useEffect as qH,useId as OC,useRef as jH,useState as Ke}from"react";import{Avatar as KH,Banner as zr,Button as Ut,ColoredBadge as Jd,Dialog as LC,Drawer as VH,DropdownMenu as YH,FormField as AC,iconButtonClasses as XH,Inline as eu,Input as ZH,ListRow as QH,Select as JH,SortableList as e5,Stack as Gr}from"efficient-shell/ui";import{EditIcon as o5,EyeIcon as EC,MenuIcon as t5,MoreIcon as a5,PageIcon as RC,RevertIcon as FC,StylesIcon as r5}from"efficient-shell/icons/efficient";import{useScreenDocument as BC}from"efficient-easel/screen/components/ScreenDocumentContext";var n5={page:RC,menu:t5};function l5(e,o){return e.pages.find(t=>t.id===o)??e.pages[0]??null}function s5(e,o){let t=window.open("","_blank");if(t)try{t.opener=null}catch{}return e.preview(o).then(({url:a})=>{t&&!t.closed?t.location.href=a:window.open(a,"_blank","noopener,noreferrer")},a=>{throw t?.close(),a})}function i5({version:e,page:o,waiting:t,busy:a,error:r,onCancel:n,onConfirm:s,onPage:i}){let f=OC();if(!e)return null;let d=e.kind==="draft_before_restore",p=e.number,x=yC(e),m=d?l("Put your drafts back?"):o?l("Restore {page} from version {n}?",{page:o.name,n:p}):l("Restore version {n}?",{n:p}),h=d?l("Your drafts go back to how they were before the restore."):o?l("{page} goes back to version {n} as a draft. Nothing else on your website changes.",{page:o.name,n:p}):x?l("The whole website goes back to version {n} as a draft: {what}.",{n:p,what:x}):l("The whole website goes back to version {n} as a draft.",{n:p}),b=e.deletedPictures??0;return G(LC,{open:!0,onClose:()=>{a||n()},size:"sm",title:m,footer:Ue(Ur,{children:[G(Ut,{variant:"secondary",onClick:n,disabled:a,children:l("Cancel")}),G(Ut,{onClick:s,loading:a,disabled:a,children:l("Restore as draft")})]}),children:Ue(Gr,{gap:4,children:[o&&e.pages.length>1?G(AC,{label:l("Page"),htmlFor:f,children:G(JH,{id:f,value:o.id,options:e.pages.map(S=>({value:S.id,label:S.name})),onChange:i,disabled:a})}):null,G("p",{children:h}),G("p",{children:l("Your live website does not change until you press Publish.")}),b>0?G(zr,{tone:"warning",children:Ae("{n} picture in this version was deleted from the media library. It stays empty.","{n} pictures in this version were deleted from the media library. They stay empty.",b)}):null,t?G(zr,{tone:"info",title:l("Your unpublished changes are kept"),children:l("They are saved in Version history as \u201CDraft before restore\u201D, so you can get them back.")}):null,r?G(zr,{tone:"danger",children:r}):null]})})}function f5({version:e,onCancel:o,onSave:t}){let a=OC(),[r,n]=Ke(null),[s,i]=Ke(""),[f,d]=Ke(!1),[p,x]=Ke(null);if(e!==r&&(n(e),i(e?.name??""),x(null)),!e)return null;let m=s.trim()===e.name,h=async()=>{if(!(f||m)){d(!0),x(null);try{await t(s.trim())}catch{x(l("The name was not saved. Try again."))}finally{d(!1)}}};return G(LC,{open:!0,onClose:()=>{f||o()},size:"sm",title:l("Name this version"),footer:Ue(Ur,{children:[G(Ut,{variant:"secondary",onClick:o,disabled:f,children:l("Cancel")}),G(Ut,{onClick:()=>{h()},loading:f,disabled:f||m,children:l("Save")})]}),children:G(AC,{label:l("Name"),htmlFor:a,hint:l("Named versions are always kept. Leave it empty to take the name away."),error:p??void 0,children:G(ZH,{id:a,value:s,invalid:!!p,onChange:b=>i(b.target.value),onKeyDown:b=>{b.key==="Enter"&&h()}})})})}function c5({version:e,expanded:o,onToggle:t,onPreview:a,onRestore:r,onRestorePage:n,onName:s}){let i=e.kind==="draft_before_restore",f=!e.live,d=e.changes.length,p=[...i?[]:[{key:"preview",label:l("Preview"),icon:G(EC,{}),onSelect:a}],...f?[{key:"restore",label:i?l("Put these drafts back"):l("Restore whole website"),icon:G(FC,{}),onSelect:r}]:[],...f&&!i&&e.pages.length?[{key:"restore-page",label:l("Restore one page only"),icon:G(RC,{}),onSelect:n}]:[],...i?[]:[{type:"divider",key:"divider"},{key:"name",label:l("Name this version"),icon:G(o5,{}),onSelect:s}]];return G(QH,{title:Ue("span",{className:"sf-version-title",children:[G("span",{children:gC(e)}),e.live?G(Jd,{tone:"success",size:"xs",children:l("Live")}):null,e.name?G(Jd,{tone:"neutral",size:"xs",children:l("Version {n}",{n:e.number})}):null,i?G(Jd,{tone:"warning",size:"xs",children:l("Not published")}):null]}),expanded:o,onToggle:t,actions:G(YH,{align:"end","aria-label":l("More"),items:p,triggerClassName:XH({variant:"ghost",size:"sm"}),trigger:G(a5,{})}),below:Ue(Gr,{gap:3,children:[Ue(eu,{gap:2,align:"center",wrap:!0,className:"sf-version-meta",children:[G(KH,{name:e.createdBy,size:"xs"}),G("span",{children:e.createdBy}),G("span",{"aria-hidden":"true",children:"\xB7"}),G("span",{children:SC(e.createdAt)}),d?Ue(Ur,{children:[G("span",{"aria-hidden":"true",children:"\xB7"}),G("span",{children:Ae("{n} change","{n} changes",d)})]}):null]}),o?Ue(Gr,{gap:3,children:[d?G(Gr,{gap:2,children:e.changes.map(x=>{let m=n5[x.kind]??r5;return Ue(eu,{gap:2,align:"center",children:[G(m,{size:16}),G("span",{children:bC(x)})]},`${x.kind}:${x.id}`)})}):null,Ue(eu,{gap:2,children:[i?null:G(Ut,{variant:"secondary",size:"sm",leftIcon:G(EC,{}),onClick:a,children:l("Preview")}),f?G(Ut,{variant:"secondary",size:"sm",leftIcon:G(FC,{}),onClick:r,children:l("Restore")}):null]})]}):null]})})}function d5({open:e,onClose:o,access:t,waiting:a}){let{flushSave:r,reloadFromServer:n,docId:s}=BC(),[i,f]=Ke(null),[d,p]=Ke(!1),[x,m]=Ke(null),[h,b]=Ke(null),[S,T]=Ke(!1),[F,C]=Ke(null),[g,I]=Ke(null),[P,E]=Ke(!1),k=jH(0),A=$H(()=>{let v=++k.current;p(!1),t.list().then(O=>{v===k.current&&f(O)},()=>{v===k.current&&p(!0)})},[t]);qH(()=>{e&&A()},[e,A]);let B=v=>{E(!1),s5(t,v.id).catch(()=>E(!0))},H=async()=>{if(!(!h||S)){T(!0),C(null);try{await hC({access:t,version:h.version,page:h.page,flushSave:r,reload:n}),b(null),o()}catch(v){C(v instanceof Hr?l("Your last changes did not save, so nothing was restored. Try again."):l("The version was not restored. Nothing changed. Try again."))}finally{T(!1)}}};return Ue(Ur,{children:[G(VH,{open:e,onClose:o,side:"right",size:"md",title:l("Version history"),description:Ue(Ur,{children:[l("Every Publish keeps a copy of the whole website: pages, menus and site styles.")," ",l("Products, prices and forms always show as they are now.")]}),footer:G("span",{className:"sf-version-foot",children:l("The newest 30 are kept. Named versions are always kept.")}),children:Ue(Gr,{gap:3,children:[P?G(zr,{tone:"danger",onDismiss:()=>E(!1),children:l("The preview did not open. Try again.")}):null,d?G(zr,{tone:"danger",action:G(Ut,{variant:"secondary",size:"sm",onClick:A,children:l("Try again")}),children:l("Version history did not load.")}):i===null?G("p",{className:"sf-version-foot",children:l("Loading versions")}):i.length===0?G("p",{className:"sf-version-foot",children:l("No versions yet. Every Publish from now on keeps one.")}):G(e5,{"aria-label":l("Versions"),spacing:"comfortable",children:i.map(v=>G(c5,{version:v,expanded:x===v.id,onToggle:()=>m(O=>O===v.id?null:v.id),onPreview:()=>B(v),onRestore:()=>{C(null),b({version:v,page:null})},onRestorePage:()=>{C(null),b({version:v,page:l5(v,s)})},onName:()=>I(v)},v.id))})]})}),G(i5,{version:h?.version??null,page:h?.page??null,waiting:a,busy:S,error:F,onCancel:()=>b(null),onConfirm:()=>{H()},onPage:v=>b(O=>O&&{...O,page:O.version.pages.find(N=>N.id===v)??O.page})}),G(f5,{version:g,onCancel:()=>I(null),onSave:async v=>{await t.name(g.id,v),I(null),A()}})]})}function _C(){let{adapter:e,hasUnsavedEdits:o}=BC(),t=e.siteVersions,a=pC(),r=vn();return t?G(d5,{open:a,onClose:uC,access:t,waiting:o||r?.state==="changed"}):null}import{useEaselSession as iv}from"efficient-easel/screen/lib/session-context";import{buildPaletteSections as Yne,categoryLabel as Xne,paletteWithoutPinned as Zne,pinnedSection as Qne}from"efficient-easel/screen/lib/document/palette-sections";var u5={openers:{label:"Hero & intros",icon:"image"},shop:{label:"Shop & galleries",icon:"bag"},product:{label:"Product page",icon:"box"},checkout:{label:"Checkout & ordering",icon:"bag"},about:{label:"About & brand story",icon:"book"},content:{label:"Text & content",icon:"type"},proof:{label:"Stats & social proof",icon:"star"},promo:{label:"Promotions & sign-ups",icon:"sparkles"},blog:{label:"Blog & journal",icon:"newspaper"},navigation:{label:"Navigation & wayfinding",icon:"bookmark"},legal:{label:"Legal & documents",icon:"file"},contact:{label:"Contact, FAQ & forms",icon:"mail"},structure:{label:"Layout, structure & embeds",icon:"grid"}};function DC(e){return u5[e]?.label}var NC=Hd;import{currentEaselSession as p5}from"efficient-easel/screen/lib/session";var m5={general:!0,commerce:!0,service:!0};function ou(e){let o=e?.sets;return o?Object.fromEntries(DS.map(t=>[t,o.includes(t)])):m5}function ale(e=p5()){return ou(e.blocks)}import{currentEaselSession as cw}from"efficient-easel/screen/lib/session";function Be(e,o,t,a={}){return{type:e,props:{...o(e),id:t(e),...a}}}function MC(e,o,t){return Be(pe,e,o,{...t,sectionPaddingTop:void 0,sectionPaddingBottom:void 0})}var x5={Manifesto:(e,o)=>({type:pe,props:{...e(pe),id:o(pe),direction:"row",share:"equal",sectionHeightMode:"screen",name:"Brand Text",content:[Be(pe,e,o,{direction:"column",justify:"center",blockSpacing:"gap",name:"Text",sectionPaddingTop:100,sectionPaddingBottom:100,sectionPaddingLeft:40,sectionPaddingRight:40,content:[Be("Text",e,o,Dr()),Be("Text",e,o,mt()),Be("Text",e,o),Be("Stats",e,o)]}),MC(e,o,{direction:"column",name:"Picture",content:[]})]}}),Split:(e,o)=>({type:pe,props:{...e(pe),id:o(pe),direction:"row",share:"equal",sectionHeightMode:"screen",sectionHeightValue:70,name:"Image & Text Split",content:[Be(pe,e,o,{direction:"column",justify:"center",blockSpacing:"gap",name:"Text",sectionPaddingTop:100,sectionPaddingBottom:100,sectionPaddingLeft:60,sectionPaddingRight:60,content:[Be("Text",e,o,Dr()),Be("Text",e,o,mt()),Be("Text",e,o),Be("ButtonBlock",e,o)]}),MC(e,o,{direction:"column",name:"Image",content:[Be("ImageBlock",e,o)]})]}}),Subscribe:(e,o)=>({type:pe,props:{...e(pe),id:o(pe),direction:"column",name:"Subscribe",content:[Be("Text",e,o,mt()),Be("Text",e,o),Be("Form",e,o)]}})};function bs(e){return x5[e]??null}import{blockTypesIn as sw}from"efficient-easel/screen/lib/document/block-types-in";import{jsx as qr,jsxs as j5}from"react/jsx-runtime";import{createContext as K5,useContext as V5}from"react";import{jsx as La,jsxs as YC}from"react/jsx-runtime";import{useEffect as au,useRef as A5,useState as $r}from"react";import{jsx as HC}from"react/jsx-runtime";import{createContext as h5,lazy as ule,Suspense as ple,useContext as I5}from"react";var g5={Link:yu,Image:gu},y5=h5(g5);function WC(){return I5(y5)}function mle(e){let{Link:o}=WC();return HC(o,{...e})}function zC(e){let{Image:o}=WC();return HC(o,{...e})}import{jsx as GC,Fragment as b5,jsxs as S5}from"react/jsx-runtime";import{useEffect as C5,useRef as UC,useState as w5}from"react";var v5="#t=0.001",k5=2;function T5(e,o){if(e.readyState<k5||!e.videoWidth||!e.videoHeight)return!1;let t=o.getContext("2d");return t?(o.width=e.videoWidth,o.height=e.videoHeight,t.drawImage(e,0,0,o.width,o.height),!0):!1}function $C({src:e,objectPosition:o="50% 50%",onError:t}){let a=UC(null),r=UC(null),[n,s]=w5(!1);return C5(()=>{let i=a.current,f=r.current;if(n||!i||!f)return;let d=()=>{T5(i,f)&&s(!0)};return d(),i.addEventListener("loadeddata",d),i.addEventListener("seeked",d),()=>{i.removeEventListener("loadeddata",d),i.removeEventListener("seeked",d)}},[n]),S5(b5,{children:[GC("canvas",{ref:r,"aria-hidden":!0,className:"absolute inset-0 z-[3] h-full w-full object-cover",style:{objectPosition:o,visibility:n?"visible":"hidden"}}),!n&&GC("video",{ref:a,src:`${e}${v5}`,muted:!0,playsInline:!0,preload:"auto",className:"hidden",onError:t})]})}import{imageCopyUrl as jC,imageSrcSet as P5}from"efficient-shell/image-copies";var qC;function tu(){return qC===void 0?{}:{host:qC}}var ble="(max-width: 800px) 100vw, min(100vw, 1600px)";function KC(e,{fallbackWidth:o=1280,maxWidth:t}={}){let a=P5(e,{...tu(),...t===void 0?{}:{maxWidth:t}});return a?{src:jC(e,o,tu()),srcSet:a}:{src:e}}function Sle(e){let o=jC(e,1920,tu());return o===e?`url(${e})`:`url("${o}")`}import{formatFocal as E5,parseFocal as F5}from"efficient-shell/format";var O5="sf-focus-phone",L5="--sf-focus-phone";function VC(e){if(typeof e!="string"||!/^\s*-?\d+(\.\d+)?%\s+-?\d+(\.\d+)?%\s*$/.test(e))return{className:"",style:{}};let{x:o,y:t}=F5(e);return{className:O5,style:{[L5]:E5(o,t)}}}var R5=.5;function XC({videoSrc:e,posterSrc:o,showVideo:t=!0,playbackRate:a=R5,objectPosition:r="50% 50%",objectPositionPhone:n,quiet:s=!1}){let i=VC(n),f=o||"",d=e||"",[p,x]=$r(!1),[m,h]=$r(!1),[b,S]=$r(!1),[T,F]=$r(!1),[C,g]=$r(!1),I=A5(null);au(()=>{x(!1),h(!1),S(!1),F(!1)},[e,o]),au(()=>{if(typeof window>"u")return;let k=()=>{let A=window;A.requestIdleCallback?A.requestIdleCallback(()=>g(!0),{timeout:2e3}):setTimeout(()=>g(!0),800)};if(document.readyState==="complete"){k();return}return window.addEventListener("load",k,{once:!0}),()=>window.removeEventListener("load",k)},[]),au(()=>{let k=I.current;if(!k)return;let A=()=>{k.playbackRate=a};return A(),k.addEventListener("loadedmetadata",A),()=>k.removeEventListener("loadedmetadata",A)},[e,a]);let P=bu(f),E=f&&P&&!m?KC(f):{src:f};return YC("div",{className:"absolute inset-0 z-[1]",children:[La("div",{className:"absolute inset-0",style:{background:"var(--site-surface)"}}),f&&(P?La("img",{src:E.src,...E.srcSet?{srcSet:E.srcSet,sizes:"100vw"}:{},alt:"",className:`absolute inset-0 z-[2] h-full w-full object-cover ${i.className}`.trim(),style:{display:p?"none":"block",objectPosition:r,...i.style},onError:()=>E.srcSet?h(!0):x(!0)},f):La(zC,{src:f,alt:"",fill:!0,priority:!0,sizes:"100vw",className:`z-[2] object-cover ${i.className}`.trim(),style:{display:p?"none":"block",objectPosition:r,...i.style},onError:()=>x(!0)},f)),t&&!s&&d&&C&&!b&&YC("video",{ref:I,autoPlay:!0,loop:!0,muted:!0,playsInline:!0,preload:"metadata",className:"absolute inset-0 z-[3] h-full w-full object-cover",style:{objectPosition:r},onError:()=>S(!0),children:[Su(d)&&La("source",{src:d.replace(/\.mp4$/,".av1.mp4"),type:'video/mp4; codecs="av01.0.08M.10"'}),La("source",{src:d,type:"video/mp4"})]},d),t&&s&&d&&C&&!T&&(!f||p)&&La($C,{src:d,objectPosition:r,onError:()=>F(!0)},d)]})}var ZC=["top","middle","bottom"],QC=["left","center","right"],JC="bottom",ew="left",B5={top:"Top",middle:"Middle",bottom:"Bottom"},_5={left:"Left",center:"Center",right:"Right"},Rle="Up and down",Ble="Sideways",D5={top:"flex-start",middle:"center",bottom:"flex-end"},N5={left:"flex-start",center:"center",right:"flex-end"},M5="--sf-hero-phone-y",H5="--sf-hero-phone-x";function W5(e){return ZC.includes(e)?e:JC}function z5(e){return QC.includes(e)?e:ew}function ow(e,o){let t=W5(e),a=z5(o),r={};return t!==JC&&(r[M5]=D5[t]),a!==ew&&(r[H5]=N5[a]),r}function _le(){return ZC.map(e=>({label:B5[e],value:e}))}function Dle(){return QC.map(e=>({label:_5[e],value:e}))}import{hexToRgb as G5}from"efficient-shell/format";var U5=!0,$5="#0A0A0A",q5=[[0,".5"],[30,".1"],[60,".1"],[100,".85"]];function tw(e){let o=G5(e);return o?`${o.r},${o.g},${o.b}`:null}function aw(e){return e==null?U5:e!==!1}function rw(e){let o=(e?tw(e):null)??tw($5);return`linear-gradient(180deg, ${q5.map(([t,a])=>`rgba(${o},${a}) ${t}%`).join(", ")})`}var Y5=K5({});function Kle({name:e,process:o,mediaType:t="video",mediaSrc:a,videoSpeed:r,poster:n,objectPosition:s,objectPositionPhone:i,tintColor:f="#000000",tintOpacity:d=0,groups:p,editing:x=!1,themeClassName:m,themeStyle:h}){let{alignment:b="left",textureOpacity:S,textureOn:T,textureColor:F,quietVideo:C,phoneUpDown:g,phoneSideways:I}=V5(Y5),P=t==="video",E=P?Ra(a):void 0,k=P?Ra(n):Ra(a)??Ra(n),A=typeof r=="number"?r/100:1;return j5("section",{className:m?`relative h-full w-full overflow-hidden ${m}`:"relative h-full w-full overflow-hidden",style:h,"data-slide-name":e??"","data-slide-process":o??"","data-slide-media":E?"video":"still",children:[qr(XC,{videoSrc:E,posterSrc:k,showVideo:P,playbackRate:A,objectPosition:s,objectPositionPhone:P?void 0:i,quiet:C}),d>0&&qr("div",{className:"absolute inset-0 z-[2]",style:{background:f,opacity:Math.min(Math.max(d,0),100)/100}}),aw(T)&&qr("div",{className:"absolute inset-0 z-[2]",style:{background:rw(F),...S!==void 0?{opacity:S/100}:null}}),qr("div",{className:["sf-hero-group-layer absolute inset-0 z-[3] mx-auto max-w-[var(--sf-site-width,1600px)] px-[var(--sf-site-gutter,40px)] pt-[140px] pb-14",x?"sf-hero-group-layer-edit":""].filter(Boolean).join(" "),style:{...Bp,...ow(g,I)},children:p&&qr(p,{className:"sf-hero-group-zone",minEmptyHeight:160})})]})}var nw=Array.from({length:3},(e,o)=>({name:`Slide ${o+1}`,process:"Category",mediaType:"image",mediaVideo:"",poster:""}));import{newNodeId as lw}from"efficient-easel/draw";var X5="ImageBlock",Z5=3,Ss=(e,o,t={})=>({type:e,props:{...o?.(e)??{},id:lw(e),...t}}),Q5=e=>({...e?.(pe)??{},direction:"column",[pt]:[Ss(X5,e),Ss(pe,e,{direction:"column",[pt]:[Ss("Text",e,mt()),Ss("Text",e)]})]}),Lo={Hero:{slot:"slides",childType:"HeroSlide",addLabel:"Add slide",slider:!0,seeds:()=>nw.map(e=>({...e}))},HeroSlide:{slot:"groups",childType:"HeroGroup",addLabel:`Add ${ut.toLowerCase()}`,seeds:()=>[],addBlocked:ln,notice:ei},HeroSingle:{slot:"boxes",childType:"HeroGroup",addLabel:`Add ${ut.toLowerCase()}`,seeds:()=>[],addBlocked:ln,notice:ei},ProcessSteps:{slot:"boxes",childType:pe,addLabel:`Add ${ut.toLowerCase()}`,seeds:e=>Array.from({length:Z5},()=>Q5(e)),skipSeed:e=>Array.isArray(e.steps)&&e.steps.length>0}};function ose(e){for(let[o,t]of Object.entries(e)){if(o in Lo&&Lo[o]!==t)throw new Error(`lib/document/slot-specs: "${o}" already has a slot spec`);Lo[o]=t}}function tse(e,o){let t=Lo[e];return t?{slot:t.slot,children:t.seeds(o).map(a=>({type:t.childType,props:{id:lw(t.childType),...a}}))}:null}var iw=()=>({}),fw=new Map;function J5(e){let o=fw.get(e);if(o)return o;let t=new Set,a=Lo[e];if(a)for(let s of a.seeds(iw))for(let i of sw({type:a.childType,props:s}))t.add(i);let r=bs(e);if(r){let s=0;for(let i of sw(r(iw,f=>`${f}-${s+=1}`)))t.add(i)}t.delete(e);let n=[...t].sort();return fw.set(e,n),n}function e3(e){if(!e||!e.sets&&!e.allow&&!e.deny?.length)return null;let o=ou(e),t=e.allow?new Set(e.allow):null,a=new Set(e.deny??[]),r=new Set(Object.keys(e.host??{})),n=f=>{if(a.has(f))return!1;if(r.has(f))return!0;let d=NS(f);return!d||!o[d]?!1:t?t.has(f):!0},s=new Map,i=f=>{let d=s.get(f);if(d!==void 0)return d;s.set(f,!1);let p=n(f)&&J5(f).every(i);return s.set(f,p),p};return{sets:o,offers:i}}var o3="block-offer";function ru(e=cw()){return e.cache(o3,()=>e3(yn(e)))}function dw(e,o=cw()){let t=ru(o);return t?t.offers(e):!0}function uw(e,o=0){let t=a3(e,o),a=t?ru():null;return t&&a?t3(t,a):t}function t3(e,o){if(e.spec)return o.offers(e.spec.childType)?e:null;let t=e.choices??[],a=t.filter(r=>o.offers(r.type));return a.length===t.length?e:a.length>0?{...e,choices:a}:null}function a3(e,o){let t=Lo[e];if(t)return{source:"section",slot:t.slot,choices:null,spec:t};let a=HS(e,o);if(a)return{source:"container",slot:a.slot,choices:a.choices,spec:null};let r=Ib(e);return r?{source:"footer",slot:hb,choices:r,spec:null}:null}function pw(e){return Xc(e.type)?[{slot:Yc,label:l(_y),rung:!0}]:null}import{useSyncExternalStore as r3}from"react";var nu=null,lu=new Set;function mw(e){if(nu!==e){nu=e;for(let o of lu)o()}}function n3(e){return lu.add(e),()=>{lu.delete(e)}}function Cse(){return r3(n3,()=>nu,()=>null)}function xw(e){return Ma(e)?.ownerId??null}function hw(e,o){let t=e.props;if(e.type==="FooterMenu"){let a=t.menu;return t.heading||a?.name||l("Menu")}if(e.type==="FooterText"){let a=typeof t.text=="string"?t.text.trim():"";return a?a.length>28?`${a.slice(0,28)}\u2026`:a:l("Text")}return e.type==="FooterEmailSignup"?t.heading||l("Email signup"):o(e.type)}var Iw=(e,o,t)=>{if(o!=="block"||e.props?.fromProduct!==!0)return t;let a=e.props.product;return!a?.code||typeof a.name!="string"?t:a.name.trim()||t};var gw="sf-editor-left-view";function yw(){if(typeof window>"u")return"pages";try{let e=window.localStorage.getItem(gw);return e==="sections"||e==="styles"?e:"pages"}catch{return"pages"}}function bw(e){if(!(typeof window>"u"))try{window.localStorage.setItem(gw,e)}catch{}}function Sw(e,o){return e==="styles"&&!o?"sections":e}function Cw(e,o){return e?"sections":o}var ww="Footer",l3=[de,ww,ie],Aa=e=>{let o=e?.content;return Array.isArray(o)?o:[]},$t=e=>{let o=e?.zones;return o&&typeof o=="object"&&!Array.isArray(o)?o:null},jr=e=>{let o=e?.props?.id;return typeof o=="string"?o:void 0},vw=e=>Ma(e)?.ownerId??"";function kw(e){let o=wa(Aa(e)),t=o.some(a=>a?.type===ie);return o.filter(a=>a?.type===de||a?.type===ie||a?.type===ww&&!t)}function su(e,o){let t=new Set,a=r=>{if(Array.isArray(r)){for(let s of r)a(s);return}if(!r||typeof r!="object")return;let n=r;if(typeof n.type=="string"&&n.props&&typeof n.props=="object"){let s=jr(n);s&&t.add(s)}for(let s of Object.values(r))a(s)};if(a(e),o){let r=!0,n=new Set;for(;r;){r=!1;for(let[s,i]of Object.entries(o))n.has(s)||!t.has(vw(s))||(n.add(s),a(i),r=!0)}}return t}function iu(e,o){let t={},a={};for(let[r,n]of Object.entries(e??{}))(o.has(vw(r))?t:a)[r]=n;return{owned:t,rest:a}}function Ose(e,o){if(!o)return e;let t=kw(o);if(!t.length)return e;let a=t.filter(i=>i.type===de),r=t.filter(i=>i.type!==de),n={...e,content:[...a,...Aa(e),...r]},{owned:s}=iu($t(o),su(t,$t(o)));return Object.keys(s).length&&(n.zones={...$t(e)??{},...s}),n}function Lse(e,o){if(!o)return{page:e,chrome:null};let t=kw(o),a=new Set(t.map(jr).filter(C=>!!C)),r=[],n=[];for(let C of Aa(e)){let g=jr(C);g&&a.has(g)||Ca(C?.type)?n.push(C):r.push(C)}let s=new Map(n.map(C=>[jr(C),C])),i=new Set,f=wa(Aa(o)).flatMap(C=>{let g=jr(C);if(!g||!a.has(g))return[C];let I=s.get(g);return I?(i.add(I),[I]):[]});for(let C of n)i.has(C)||f.some(g=>g?.type===C.type)||(f=C.type===de?[C,...f]:[...f,C]);f=wa(f);let d=f.length===Aa(o).length&&f.every((C,g)=>C===Aa(o)[g]),p=$t(e),x=su(f,p),{owned:m,rest:h}=iu(p,x),b=iu($t(o),su(t,$t(o))).owned,S={...o,content:d?o.content:[...f]},T=$t(o);if(T||Object.keys(m).length){let C={};for(let[g,I]of Object.entries(T??{}))g in b?g in m&&(C[g]=m[g]):C[g]=I;for(let[g,I]of Object.entries(m))g in C||(C[g]=I);S.zones=C,T&&s3(S.zones,T)&&(S.zones=T)}let F={...e,content:r};return p&&(Object.keys(h).length||!Object.keys(b).length?F.zones=h:delete F.zones),{page:F,chrome:S}}function s3(e,o){let t=Object.keys(e),a=Object.keys(o);return t.length===a.length&&t.every((r,n)=>r===a[n]&&e[r]===o[r])}function Tw(e,o){return t=>e(t)||t!==void 0&&l3.includes(t)&&o()}var Cs=null;function Rse(e){Cs=e}function Pw(){return!!(Cs&&Cs.state().lockHolder)}function qt(){return Cs!==null}var i3=new Set(["BookingBox","SubmitBox"]);function f3(e){return typeof e=="string"&&i3.has(e)}var c3=Tw(f3,Pw);function Ew(e,o){return c3(e)||_i(o)}import{copyNode as d3}from"efficient-easel/data";var Fw=null;function Hse(e){Fw=e}function qo(){return Fw}var Ow=null;function fu(e){Ow=e}function ws(){return Ow}function Lw(e){let o=typeof e?.props?.id=="string"?e.props.id:null,t=qo(),a=o&&t?t.sectionOf(o):null;if(!t||!a)return null;let r=t.usedOn(a);return r?r.length===1?l("On 1 page"):l("On {count} pages",{count:r.length}):l("On other pages")}var Aw={usedOn:e=>{let o=qo(),t=o?.sectionOf(e.props.id)??null;return!o||!t?null:o.usedOn(t)??[]},openPage:e=>ws()?.openPage(e),adopt:(e,o)=>qo()?.adopt(e.props.id,o),nodeOf:e=>qo()?.place(e)??null,detach:e=>{let o=ws()?.config;return o?d3(e,o):e},removed:()=>ws()?.reload()};import{sharedSectionsOf as c4}from"efficient-easel/screen/lib/shared-sections";import{scrollPreviewToSection as d4,scrollPreviewToTop as ov}from"efficient-easel/screen/lib/document/preview-dom";import{jsx as du,Fragment as M3,jsxs as H3}from"react/jsx-runtime";import{useMemo as Uw,useRef as $w}from"react";import{EaselCanvas as W3,useEaselApi as z3}from"efficient-easel/easel";import{jsx as Nw,Fragment as b3,jsxs as S3}from"react/jsx-runtime";import{useEffect as Mw,useLayoutEffect as C3}from"react";var vs="data-theme",Rw="light";function u3(e){return e.getAttribute(vs)===Rw?"light":"dark"}function p3(e,o){return u3(e)===o?!1:(o==="light"?e.setAttribute(vs,Rw):e.removeAttribute(vs),!0)}function m3(e){return Hs(e).getItem(Ls)}function Kse(e,o){Hs(e).setItem(Ls,o)}function x3(e,o,t=new Date().getHours()){return wu({mode:o.mode,override:m3(e),switchShown:o.switchShown,hour:t})}function Bw(e,o){let t=e.documentElement;if(!t)return()=>{};let a=()=>p3(t,x3(e,o));a();let r=e.defaultView?.MutationObserver;if(!r)return()=>{};let n=new r(a);return n.observe(t,{attributes:!0,attributeFilter:[vs]}),()=>n.disconnect()}var h3="style";function I3(e,o){let t=Ou(o),a=!1;for(let r of Fu){let n=t[r]??"";e.style.getPropertyValue(r)!==n&&(n?e.style.setProperty(r,n):e.style.removeProperty(r),a=!0)}return a}function _w(e,o){let t=e.body;if(!t)return()=>{};let a=()=>I3(t,o);a();let r=e.defaultView?.MutationObserver;if(!r)return()=>{};let n=new r(a);return n.observe(t,{attributes:!0,attributeFilter:[h3]}),()=>n.disconnect()}var g3=String.raw`(function (doc) {
|
|
21
|
+
if (doc.__sfFitWords) return;
|
|
22
|
+
var win = doc.defaultView;
|
|
23
|
+
var SELECTOR = "h1,h2,h3,h4,h5,h6,[class*='font-heading'],[class*='font-display']";
|
|
24
|
+
var MIN_SCALE = 0.3, MIN_PX = 16, SLACK = 1;
|
|
25
|
+
|
|
26
|
+
function measure(el) {
|
|
27
|
+
var widest = 0, current = 0, last = null, split = false, lastBlock = null;
|
|
28
|
+
function blockOf(n) {
|
|
29
|
+
for (var p = n.parentElement; p && p !== el; p = p.parentElement) {
|
|
30
|
+
var d = win.getComputedStyle(p).display;
|
|
31
|
+
if (d.indexOf("inline") !== 0 && d !== "contents") return p;
|
|
32
|
+
}
|
|
33
|
+
return el;
|
|
34
|
+
}
|
|
35
|
+
function close() { if (current > widest) widest = current; current = 0; last = null; }
|
|
36
|
+
var walker = doc.createTreeWalker(el, 5), range = doc.createRange(), node;
|
|
37
|
+
while ((node = walker.nextNode())) {
|
|
38
|
+
if (node.nodeType === 1) {
|
|
39
|
+
if (node.tagName === "BR" || node.tagName === "WBR") close();
|
|
40
|
+
continue;
|
|
41
|
+
}
|
|
42
|
+
var block = blockOf(node);
|
|
43
|
+
if (block !== lastBlock) close();
|
|
44
|
+
lastBlock = block;
|
|
45
|
+
var re = /(\S+)|(\s+)/g, m;
|
|
46
|
+
while ((m = re.exec(node.data))) {
|
|
47
|
+
if (m[2]) { close(); continue; }
|
|
48
|
+
range.setStart(node, m.index);
|
|
49
|
+
range.setEnd(node, m.index + m[0].length);
|
|
50
|
+
var rects = range.getClientRects();
|
|
51
|
+
for (var i = 0; i < rects.length; i++) {
|
|
52
|
+
var r = rects[i];
|
|
53
|
+
if (r.width <= 0) continue;
|
|
54
|
+
current += r.width;
|
|
55
|
+
if (last && r.top > last.top + last.height / 2) split = true;
|
|
56
|
+
last = r;
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
close();
|
|
61
|
+
return { widest: widest, split: split };
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
function lineWidth(el) {
|
|
65
|
+
var cs = win.getComputedStyle(el);
|
|
66
|
+
return el.getBoundingClientRect().width - parseFloat(cs.paddingLeft) - parseFloat(cs.paddingRight)
|
|
67
|
+
- parseFloat(cs.borderLeftWidth) - parseFloat(cs.borderRightWidth);
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
// ⚠️ THE HEADING ELEMENT IS NEVER TOUCHED — no style="", no data-*. This
|
|
71
|
+
// runs before React hydrates, and React 19 in development reports ANY
|
|
72
|
+
// attribute that differs from what it rendered ("a tree hydrated but some
|
|
73
|
+
// attributes didn't match"): first our inline font-size on the hero (which
|
|
74
|
+
// React owns via --heading-size), then, when that moved to a data-sf-fit
|
|
75
|
+
// attribute, the attribute itself. So the fitted size lives only in this
|
|
76
|
+
// script's own stylesheet, in <head>, addressed to each heading by its
|
|
77
|
+
// POSITION (":root>*:nth-child(2)>…"). A position goes stale when the page's
|
|
78
|
+
// structure changes, so the rules are rewritten in the MutationObserver
|
|
79
|
+
// callback, which runs before the next paint. !important so the size also
|
|
80
|
+
// beats a part's own inline size.
|
|
81
|
+
var head = doc.head || doc.documentElement;
|
|
82
|
+
var fitEl = doc.createElement("style");
|
|
83
|
+
fitEl.id = "storefront-fit-words-sizes";
|
|
84
|
+
head.appendChild(fitEl);
|
|
85
|
+
var fitted = new Map(); // heading -> fitted size, e.g. "43.8px"
|
|
86
|
+
|
|
87
|
+
function pathOf(el) {
|
|
88
|
+
var parts = [];
|
|
89
|
+
for (var e = el; e && e.parentElement; e = e.parentElement) {
|
|
90
|
+
var i = 1, s = e;
|
|
91
|
+
while ((s = s.previousElementSibling)) i++;
|
|
92
|
+
parts.unshift("*:nth-child(" + i + ")");
|
|
93
|
+
}
|
|
94
|
+
return ":root>" + parts.join(">");
|
|
95
|
+
}
|
|
96
|
+
function writeRules() {
|
|
97
|
+
var css = "";
|
|
98
|
+
fitted.forEach(function (size, el) {
|
|
99
|
+
if (!el.isConnected) { fitted.delete(el); return; }
|
|
100
|
+
css += pathOf(el) + "{font-size:" + size + " !important}";
|
|
101
|
+
});
|
|
102
|
+
if (fitEl.textContent !== css) fitEl.textContent = css;
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
function unfit(el) {
|
|
106
|
+
if (fitted.delete(el)) writeRules();
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
function fits(el) {
|
|
110
|
+
var m = measure(el);
|
|
111
|
+
return !m.split && m.widest <= lineWidth(el) + SLACK;
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
function fit(el) {
|
|
115
|
+
unfit(el);
|
|
116
|
+
if (lineWidth(el) <= 0) return; // hidden, or not laid out yet
|
|
117
|
+
if (fits(el)) return;
|
|
118
|
+
var set = parseFloat(win.getComputedStyle(el).fontSize);
|
|
119
|
+
if (!set) return;
|
|
120
|
+
var floor = Math.max(set * MIN_SCALE, MIN_PX);
|
|
121
|
+
if (floor >= set) return;
|
|
122
|
+
function size(px) { return Math.floor(px * 10) / 10 + "px"; }
|
|
123
|
+
// The SEARCH tries sizes on the element's own style and then puts that
|
|
124
|
+
// attribute back byte for byte (or removes it, if it had none), so nothing
|
|
125
|
+
// is left for React to see. A trial in a stylesheet instead restyles the
|
|
126
|
+
// whole page per step: a full pass on the Hartes home took 75–160ms at 4x
|
|
127
|
+
// CPU that way.
|
|
128
|
+
var hadStyle = el.hasAttribute("style"), origStyle = el.getAttribute("style");
|
|
129
|
+
function attempt(px) { el.style.setProperty("font-size", size(px), "important"); }
|
|
130
|
+
function done() { if (hadStyle) el.setAttribute("style", origStyle); else el.removeAttribute("style"); }
|
|
131
|
+
attempt(floor);
|
|
132
|
+
if (!fits(el)) { done(); return; } // even the floor does not fit: leave it as set
|
|
133
|
+
var lo = floor, hi = set;
|
|
134
|
+
for (var i = 0; i < 8; i++) {
|
|
135
|
+
var mid = (lo + hi) / 2;
|
|
136
|
+
attempt(mid);
|
|
137
|
+
if (fits(el)) lo = mid; else hi = mid;
|
|
138
|
+
}
|
|
139
|
+
done();
|
|
140
|
+
fitted.set(el, size(lo));
|
|
141
|
+
writeRules();
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
// What each heading measured right after we last fitted it, so the
|
|
145
|
+
// ResizeObserver below can tell a real change (a font swap, a rotate, a
|
|
146
|
+
// container that moved) from the size change our own write just caused.
|
|
147
|
+
var seen = new WeakMap();
|
|
148
|
+
function remember(el) {
|
|
149
|
+
var b = el.getBoundingClientRect();
|
|
150
|
+
seen.set(el, b.width + "x" + b.height);
|
|
151
|
+
}
|
|
152
|
+
function fitAndRemember(el) { fit(el); remember(el); }
|
|
153
|
+
|
|
154
|
+
// ⚠️ A ResizeObserver, NOT fonts.ready or a resize event, and the reason is
|
|
155
|
+
// WHEN it runs: after layout, BEFORE paint. The web font arriving re-wraps a
|
|
156
|
+
// fitted heading, and fonts.ready resolves only after that frame is painted —
|
|
157
|
+
// measured on the Hartes hero: a 42px jump in 2 of 3 loads. A size change
|
|
158
|
+
// reported here is fitted in the same frame, so the broken state is never
|
|
159
|
+
// drawn. It also covers a container that resizes.
|
|
160
|
+
var ro = new win.ResizeObserver(function (entries) {
|
|
161
|
+
for (var i = 0; i < entries.length; i++) {
|
|
162
|
+
var el = entries[i].target;
|
|
163
|
+
var b = el.getBoundingClientRect();
|
|
164
|
+
if (seen.get(el) === b.width + "x" + b.height) continue; // our own write
|
|
165
|
+
fitAndRemember(el);
|
|
166
|
+
}
|
|
167
|
+
});
|
|
168
|
+
// Its own set, not seen: fitAndRemember has written seen by the
|
|
169
|
+
// time watch runs, so a seen test observed no heading at all, and a
|
|
170
|
+
// heading fitted in the fallback face was never fitted again when the web
|
|
171
|
+
// font arrived (hartesmetal.com.au, "FusionForge." with its "." alone).
|
|
172
|
+
var watched = new WeakSet();
|
|
173
|
+
function watch(el) { if (!watched.has(el)) { watched.add(el); ro.observe(el); } }
|
|
174
|
+
|
|
175
|
+
function fitAll() {
|
|
176
|
+
var els = doc.querySelectorAll(SELECTOR);
|
|
177
|
+
for (var i = 0; i < els.length; i++) { fitAndRemember(els[i]); watch(els[i]); }
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
var queued = 0, all = false, touched = new Set();
|
|
181
|
+
function run() {
|
|
182
|
+
queued = 0;
|
|
183
|
+
if (all) { all = false; touched.clear(); fitAll(); return; }
|
|
184
|
+
var els = Array.from(touched);
|
|
185
|
+
touched.clear();
|
|
186
|
+
for (var i = 0; i < els.length; i++) if (els[i].isConnected) { fitAndRemember(els[i]); watch(els[i]); }
|
|
187
|
+
}
|
|
188
|
+
function schedule() { if (!queued) queued = win.requestAnimationFrame(run); }
|
|
189
|
+
function scheduleAll() { all = true; schedule(); }
|
|
190
|
+
|
|
191
|
+
fitAll();
|
|
192
|
+
// A backstop only: a font that changes widths without changing any
|
|
193
|
+
// heading's box is not seen by the ResizeObserver.
|
|
194
|
+
if (doc.fonts && doc.fonts.ready) doc.fonts.ready.then(scheduleAll, function () {});
|
|
195
|
+
|
|
196
|
+
// …and the viewport WIDTH, which the ResizeObserver cannot stand in for: a
|
|
197
|
+
// heading sized to its own text (fit-content, a flex item) keeps the SAME box
|
|
198
|
+
// when the phone turns to 844, so nothing reports a change and it would stay
|
|
199
|
+
// shrunk. The probe's rotate check caught exactly that.
|
|
200
|
+
var lastWidth = win.innerWidth;
|
|
201
|
+
function onResize() {
|
|
202
|
+
if (win.innerWidth === lastWidth) return; // a phone's toolbar changing HEIGHT is not our business
|
|
203
|
+
lastWidth = win.innerWidth;
|
|
204
|
+
scheduleAll();
|
|
205
|
+
}
|
|
206
|
+
win.addEventListener("resize", onResize);
|
|
207
|
+
|
|
208
|
+
var mo = new win.MutationObserver(function (records) {
|
|
209
|
+
// Positions first: a node added or removed anywhere can shift the
|
|
210
|
+
// nth-child path of a fitted heading, and this callback runs before paint.
|
|
211
|
+
if (fitted.size) {
|
|
212
|
+
for (var q = 0; q < records.length; q++) if (records[q].type === "childList") { writeRules(); break; }
|
|
213
|
+
}
|
|
214
|
+
for (var i = 0; i < records.length; i++) {
|
|
215
|
+
var r = records[i];
|
|
216
|
+
var target = r.target.nodeType === 1 ? r.target : r.target.parentElement;
|
|
217
|
+
var own = target && target.closest(SELECTOR);
|
|
218
|
+
if (own) touched.add(own);
|
|
219
|
+
for (var j = 0; j < r.addedNodes.length; j++) {
|
|
220
|
+
var n = r.addedNodes[j];
|
|
221
|
+
if (n.nodeType !== 1) continue;
|
|
222
|
+
if (n.matches(SELECTOR)) touched.add(n);
|
|
223
|
+
var inner = n.querySelectorAll(SELECTOR);
|
|
224
|
+
for (var k = 0; k < inner.length; k++) touched.add(inner[k]);
|
|
225
|
+
}
|
|
226
|
+
}
|
|
227
|
+
if (touched.size) schedule();
|
|
228
|
+
});
|
|
229
|
+
mo.observe(doc.body, { childList: true, subtree: true, characterData: true });
|
|
230
|
+
|
|
231
|
+
doc.__sfFitWords = function stop() {
|
|
232
|
+
win.removeEventListener("resize", onResize);
|
|
233
|
+
ro.disconnect();
|
|
234
|
+
mo.disconnect();
|
|
235
|
+
if (queued) win.cancelAnimationFrame(queued);
|
|
236
|
+
fitted.clear();
|
|
237
|
+
fitEl.remove();
|
|
238
|
+
delete doc.__sfFitWords;
|
|
239
|
+
};
|
|
240
|
+
// For the probe and for debugging: which headings are fitted, at what size,
|
|
241
|
+
// and the sheet that holds it (disable it to read a heading's set size).
|
|
242
|
+
doc.__sfFitWords.fitted = fitted;
|
|
243
|
+
doc.__sfFitWords.sheet = fitEl;
|
|
244
|
+
})(document);`,y3="storefront-fit-words";function Dw(e){let o=e.createElement("script");return o.id=y3,o.textContent=g3,(e.head??e.documentElement).appendChild(o),()=>{e.__sfFitWords?.(),o.remove()}}var w3=`
|
|
245
|
+
[${so}][${so}] { cursor: text; }
|
|
246
|
+
`;function Hw({children:e,document:o}){let{theme:t,themeMode:a,themeSwitchShown:r}=K(),n=ze(t);return Mw(()=>{if(o)return Bw(o,{mode:a,switchShown:r})},[o,a,r]),Mw(()=>{if(o)return _w(o,n)},[o,n]),C3(()=>{if(o)return Dw(o)},[o]),S3(b3,{children:[Nw(Zu,{}),Nw("style",{children:w3}),e]})}import{jsx as cu}from"react/jsx-runtime";import{useEffect as v3,useState as k3}from"react";import{Banner as T3}from"efficient-shell/ui";var ks={load:"The header and footer could not load. They are hidden for now and nothing in them is saved. Reload to try again.",lock:"{name} is editing the header and footer. Nothing you change in them here is saved.",conflict:"The header and footer were changed somewhere else. Nothing you change in them here is saved. Reload to get the latest.",save:"The header and footer did not save. They are sent again with your next change."},P3={load:"{section} could not load. It stays on the page as it was. Reload to try again.",lock:"{name} is editing {section}. Nothing you change in it here is saved.",conflict:"{section} was changed somewhere else. Nothing you change in it here is saved. Reload to get the latest.",save:"{section} did not save. It is sent again with your next change."},E3=ks.load,F3=ks.lock,O3=ks.conflict,L3=ks.save;function A3(e){if(!e)return null;if(e.loadFailed)return l(E3);if(e.lockHolder)return l(F3,{name:e.lockHolder.name||l("Somebody else")});if(e.conflict)return l(O3);if(e.saveFailed)return l(L3);let o=e.sections?.[0];if(!o)return null;let t=o.title||l("A shared section"),a=o.holder?.name||l("Somebody else");return l(P3[o.problem],{section:t,name:a})}function R3({report:e}){let o=A3(Is(e)),[t,a]=k3(null);return v3(()=>{o||a(null)},[o]),!o||t===o?null:cu("aside",{className:"sf-canvas-notice",children:cu(T3,{tone:"warning",onDismiss:()=>a(o),children:o})})}function Ww(){return cu(R3,{report:gs()})}import{jsx as Ts}from"react/jsx-runtime";import{useState as zw}from"react";import{Banner as B3,Button as _3}from"efficient-shell/ui";import{UndoIcon as D3}from"efficient-shell/icons/efficient";import{useScreenDocument as N3}from"efficient-easel/screen/components/ScreenDocumentContext";function Gw(){let e=mC(),{adapter:o,flushSave:t,reloadFromServer:a}=N3(),r=o.siteVersions,[n,s]=zw(!1),[i,f]=zw(!1);if(!e)return null;let d=async()=>{if(!(!r||n)){s(!0),f(!1);try{await IC({access:r,flushSave:t,reload:a})}catch{f(!0)}finally{s(!1)}}};return Ts("aside",{className:"sf-canvas-notice",children:Ts(B3,{tone:i?"danger":"info",title:e.title,onDismiss:ys,action:r&&e.undo?Ts(_3,{variant:"secondary",size:"sm",leftIcon:Ts(D3,{}),loading:n,disabled:n,onClick:()=>{d()},children:l("Undo")}):void 0,children:i?l("Undo did not work. Nothing changed. Try again."):l("Check it with Preview. Press Publish to put it live.")})})}import{usePreviewParts as G3}from"efficient-easel/draw/client";import{useSectionOps as U3}from"efficient-easel/screen/lib/document/use-section-ops";function qw(e){let{mirrorHostStyles:o}=Gs(),t=Ju(),{sectionBackgroundWidth:a,sectionContentWidth:r,themeFromDocument:n}=K(),s=Uw(()=>({...e.metadata??t??{},...eh(n?null:a,n?null:r)}),[e.metadata,t,a,r,n]),i=$w(null),f=$3(i),{onDocument:d}=e,p=x=>{i.current=x,d?.(x)};return H3(M3,{children:[du(Gw,{}),du(Ww,{}),du(W3,{...e,onDocument:p,typing:f,metadata:s,height:"fill",mirrorStyles:o,frameWrapper:Hw})]})}function $3(e){let o=z3(),t=U3(),a=G3(),r=$w({ops:t,parts:a});return r.current={ops:t,parts:a},Uw(()=>{let n={getItemById:i=>o.getState().getItemById(i),getSelectorForId:i=>o.getState().getSelectorForId(i),get components(){return o.getState().config.components},replace:(i,f,d)=>r.current.ops.replaceComponent(i,f,d)},s=(i,f)=>{let d=My(i,n);if(!d)return null;let p=f,x=()=>(p=Hy(p,p?.ownerDocument??e.current,i),p),m=x();return m?{element:x,value:d.value,rules:d.rules,multiline:d.multiline,write:d.write,toolbar:{offered:d.offered,colors:d.offered.length>0?jl(Vy(m)):void 0}}:null};return{at:i=>{let f=i.closest(`[${so}]`),d=f?.getAttribute(so);return f&&d?s(d,f):null},atSelection:()=>{let i=r.current.parts.selectedPartId;return i?s(i,null):null},onChange:i=>{if(!i.typing){ed(null);return}let f=i.element.closest(`[${so}]`)?.getAttribute(so)??null;ed(f),f&&r.current.parts.selectedPartId!==f&&r.current.parts.select(f)}}},[o,e])}var q3=Wu.mediaFields,j3=/video|poster|focal|phone/i;function jw(e){return(q3[e]??[]).find(o=>!o.includes("[]")&&!j3.test(o))??null}var Kw={adds:{kind:"block",type:"ImageBlock"},takes:e=>jw(e.type)!==null,replace:(e,o)=>{let t=jw(e.type);return t?{...e.props,[t]:o.url}:{...e.props}},create:(e,o)=>({type:"ImageBlock",props:{...o.nodeDefaults("ImageBlock"),id:o.newNodeId("ImageBlock"),src:e.url}})};var Vw={Hero:"Full-screen opener with rotating slides.",HeroSingle:"Full-screen image or video with a headline.",IntroBleed:"Full-bleed intro image the next section scrolls over.",Collections:"Product collections in a tidy grid.",AlloyWheelsListing:"A full product-listing page: filter rail, sortable card grid and pagination, from the live catalog. Choose which product types it shows.",CatalogFilterBar:"Filters the collection grids below it \u2014 a sticky row of Pills (the default), or Columns, one per filter you switch on.",ProductGrid:"Hand-picked products in a tidy grid.",FitmentFinder:"A vehicle picker \u2014 make, model, year and trim resolve the OEM stock fitment live.",Gallery:"Two image galleries with tabs and filters.",GalleryB:"Customer photos in a card grid with a click-to-open lightbox.",SpecStrip:"A thin one-line spec strip \u2014 small-caps items spread across the width, as a dark band or a bare hairline row.",ProductHero:"A product hero \u2014 image beside price, bullets and a buy button.",SpecTable:"A spec sheet \u2014 labeled rows of product specifications.",ProcessSteps:"A heading over columns of image, title, blurb and specs.",DetailRows:"Repeating full-width rows \u2014 eyebrow, title and copy beside a numbered close-up image, alternating sides each row.",FitmentTable:"A fitment table \u2014 per-size bolt patterns, offsets and load ratings, filterable by diameter.",CompatibleTyres:"The current product's compatible tyres \u2014 image, size, key specs and price per tyre, with an inquiry link. Display only.",RelatedProducts:"The current product's related items in a tidy row \u2014 the product page's built-in 'Pair with' cross-sell.",OrderSummary:"A display order-summary panel \u2014 items, totals and a note.",DeliveryOptions:"Delivery tiers as cards \u2014 name, window and price, one highlighted.",PaymentBadges:"A payment-methods trust strip with reassurance lines.",CheckoutCTA:"A centered 'ready to order?' headline with the checkout button.",Manifesto:"A bold brand statement beside a full-height image, with a stat strip.",ParagraphsA:"An editorial text panel with a stat strip and founders' note.",StatsParagraph:"An editorial heading and paragraph over a row of theme-color-accented stat cards.",Chart:"A titled chart \u2014 bars, line or donut \u2014 drawn from your own labeled data points.",Mockup:"A headline beside a stylized product-UI mockup card \u2014 spec sheet, fitment, portal, kanban and more.",Prose:"A plain editorial text section \u2014 eyebrow, heading and body copy.",Timeline:"An editorial aside beside a rail-marked timeline of dated entries.",TimelineTrack:"A horizontal year track of milestones \u2014 company history or roadmap.",Footprint:"A world map of your locations with a legend \u2014 designed here, sold worldwide.",TitleWithButtons:"A big headline beside a stack of call-to-action buttons.",Split:"Side-by-side image and text in two columns.",Cards:"A heading over a grid of free-text title-and-blurb cards.",FAQ:"A frequently-asked-questions accordion with a header.",Testimonials:"Customer quotes in a grid \u2014 the quote, a name and a role.",Masthead:"A journal issue header with a lead statement and contents.",Breadcrumb:"A slim trail showing where the reader is (Home / Journal\u2026).",CategoryBar:"A sticky row of category tabs with counts and links.",FeaturedCover:"A featured article \u2014 big cover image beside a headline and dek.",LongRead:"A long-form article spread with a pull-quote and cover image.",Series:"A section heading over a grid of column cards.",Subscribe:"A newsletter signup beside a list of recent issues.",SubscribeBlogs:"A newsletter signup beside your latest blog posts, pulled live.",Events:"Latest journal posts in a three-card row.",DocMasthead:"A document header \u2014 headline, metadata and standfirst.",DocTabs:"A sticky tab bar to switch between documents.",DocBody:"Long-form document body with an 'On this page' contents list.",DocMetaCards:"A three-up meta strip for the foot of a document.",Banner:"Wide promo strip with background image.",Stats:"Highlight key numbers \u2014 years, designs.",Countdown:"Hours, minutes and seconds to a set date and time, then one line.",KeyFeatures:"A theme-color chip and heading over a grid of short feature labels.",Logos:"A row of partner or brand logos.",Ticker:"A scrolling marquee of short phrases, full width.",Reviews:"Approved customer reviews in a star-rated card grid, pulled live.",SubmitBuild:"A 'Show us yours.' headline with a photo-submission form.",ReviewForm:"A write-a-review form \u2014 submissions wait for your approval before they show.",ContactRouting:"Pick who to reach, then a form that routes the message.",ContactLocations:"Your locations as a city gallery plus address and map cards.",SectionHeader:"A numbered section title with optional link.",Grid:"Multi-column container for blocks.",Flex:"An empty section. Add whatever you want inside.",Spacer:"Vertical breathing room between sections.",Divider:"A thin horizontal rule between sections.",CustomHTML:"Drop in your own sanitized HTML.",Heading:"A single heading line.",Text:"A paragraph of body copy.",ImageBlock:"A standalone image, at the width you set.",ButtonBlock:"A call-to-action button."};var K3="Save your page changes first";function Yw(e){return e.hasTrustedConsole?e.canCreatePlatformTemplate?!e.capabilities.canPublish||!e.capabilities.hasSiteSettings?{visible:!1,hiddenReason:"not-a-site-page"}:e.siteId?e.hasUnsavedEdits?{visible:!0,enabled:!1,disabledReason:K3}:{visible:!0,enabled:!0}:{visible:!1,hiddenReason:"no-site"}:{visible:!1,hiddenReason:"not-operator"}:{visible:!1,hiddenReason:"no-console"}}var Xw="storefront-editor:save-as-template";var V3="plain",Zw=[{label:"Plain",value:"plain"},{label:"Filled",value:"filled"},{label:"Line",value:"line"}],Y3="line",X3={KeyFeatures:"filled"};function Kr(e){return X3[e]??V3}function Wie(e,o){return Qo(Zw,Kr(o),e)}function zie(e){return Qo(Zw,Y3,e)}function Qw(e,{nodeDefaults:o,newNodeId:t,sectionLabel:a,blockIsOffered:r}){let n=bs(e);return n?n(o,t):WS(e)&&r(pe)&&r(Pa)?{type:pe,props:{...o(pe),id:t(pe),direction:"column",name:`${a(e)} section`,content:[{type:Pa,props:{...o(Pa),id:t(Pa),...Oo[e]?.headStyle?{headStyle:Oo[e].headStyle}:{},...Oo[e]?.headRowGap?{rowGap:Oo[e].headRowGap}:{},...Oo[e]?.headDescriptionSize?{descriptionSize:Oo[e].headDescriptionSize}:{},...Kr(e)!==Kr(Pa)?{eyebrowLook:Kr(e)}:{}}},{type:e,props:{...o(e),id:t(e),headPlacement:"own-box"}}]}}:Lo[e]?.fixed===!0?{type:e,props:{...o(e),id:t(e),layout:"boxes"}}:null}import{useEffect as Z3,useState as Q3}from"react";import{useEaselSession as J3}from"efficient-easel/screen/lib/session-context";function Jw(){let e=J3().chrome?.products?.list,[o,t]=Q3(null);return Z3(()=>{if(!e)return;let a=!1;return e().then(r=>{a||t(r)}),()=>{a=!0}},[e]),o}function fv({mode:e,open:o}){let{setSelectedHeroId:t,setSelectHandler:a}=iy(),r=sv().tree,n=e,s=n.kind==="ticker"?n.heroId:null,i=Yr(f=>{f&&(o({kind:"ticker",heroId:f}),d4(f))},[o]);return Ve(()=>{t(s)},[s,t]),Ve(()=>{a(i)},[a,i]),{partRows:(f,{rowClick:d})=>{let p=String(f.props.id);return f.type==="Hero"&&he(nv,{icon:he(Mt,{type:"ticker",size:13}),name:l(pr),onSelect:()=>i(p),selected:s===p,rowProps:{onClick:d(()=>i(p))},words:r})}}}function cv({mode:e,select:o}){let{setSelectedHeroPart:t,setSelectHandler:a}=Dl(),r=sv().tree,{appState:n}=lv(m=>m),s=n.data.content??[],i=e4(s);i.current=s;let f=e,d=mr.find(m=>xr[m]===f.kind),p=d&&"nodeId"in f?hr(String(f.nodeId),d):null,x=Yr(m=>{let h=gy(m);if(!h)return;let b=i.current.findIndex(T=>String(T.props.id)===h.nodeId);if(b<0)return;let S={kind:xr[h.part],nodeId:h.nodeId};o({index:b},S)},[o]);return Ve(()=>{t(p)},[p,t]),Ve(()=>{a(x)},[a,x]),{partRows:(m,{rowClick:h})=>{let b=String(m.props.id),S=Iy(m);if(S.length===0)return null;let T=g=>{let I=hr(b,g.part);return he(nv,{icon:he(Mt,{type:g.part==="media"?"heroMedia":"heroImage",size:13}),name:l(g.label),onSelect:()=>x(I),selected:p===I,rowProps:{onClick:h(()=>x(I))},words:r},I)},[F,...C]=S;return Vr(rv,{children:[T(F),C.length>0&&he(i4,{children:C.map(T)})]})}}}function dv(e,o){return{partRows:(t,a)=>Vr(rv,{children:[e.partRows?.(t,a),o.partRows?.(t,a)]})}}function u4(e){let{adapter:o,capabilities:t,currentSlug:a,siteId:r,docId:n,hasUnsavedEdits:s,bridgeCapabilities:i,notifyParent:f,token:d}=Ps(),{hasPreviewLink:p}=t,x=Ce(iv()).preview?.draftLink,m=PC(e.data),h=Yw({hasTrustedConsole:!!d,canCreatePlatformTemplate:i.canCreatePlatformTemplate,capabilities:t,siteId:r,hasUnsavedEdits:s}),b=Yr(()=>{!r||!a||f(Xw,{siteId:r,slug:a})},[f,r,a]),S=aC({pageSlug:a,siteId:r,token:d}),T=o.previewHref?.(a)??S;return{barLead:()=>h.visible&&he(t4,{side:"bottom",content:h.enabled?l("Save this website as a platform template"):l(h.disabledReason),children:he("span",{className:"sf-tip-disabled",tabIndex:h.enabled?void 0:0,children:he(o4,{variant:"secondary",disabled:!h.enabled,onClick:b,rightIcon:he(s4,{size:15}),children:l("Save as Template")})})}),barView:()=>p&&a&&he(nC,{liveHref:T,pageId:n??null,draftLink:x}),mainAction:m}}function p4(e,o){let{capabilities:t,templateId:a,siteId:r,tokenRef:n,navigate:s}=Ps(),{hasSiteTheme:i,explainsSiteSettings:f}=t,d=g=>o.setView(g),[p,x]=ev(ma[0].id),[m,h]=ev(!1),{surface:b,setSurface:S}=sy(),T=()=>{if(i){d("styles"),o.reveal(),ov();return}e.show(Pd),e.reveal(),ov()},F={id:"pages",label:l("Pages"),icon:he(r4,{}),panel:({onHide:g})=>he(Jg,{activeSurface:b,onPreviewSurface:S,onNavigate:I=>{S(null),s(a?{kind:"template",id:a,pageSlug:I}:{kind:"page",slug:I,siteId:r??void 0})},onClose:g})},C=[];return!i&&f&&C.push({id:"appearance",label:l("Appearance"),icon:he(l4,{}),active:e.kind==="website",onSelect:T}),i&&C.push({id:"styles",label:l("Styles"),icon:he(n4,{}),panel:({onHide:g,notify:I})=>he(pS,{tokenRef:n,siteId:r??void 0,onClose:g,onNotify:I,tab:p,onTabChange:x,revealPageGroup:m,onPageGroupRevealed:()=>h(!1)})}),{railLead:[F],railTrail:C,resolveLeftView:g=>Sw(g,i),openSettings:T,openStyles:()=>{x(Pg),d("styles")},openPageStyles:i?()=>{x(xa),h(!0),d("styles"),o.reveal()}:f?()=>{e.show(tS),e.reveal()}:void 0}}function m4(){let{navigate:e,siteId:o,reloadFromServer:t,docId:a}=Ps(),r=lv(s=>s.config),n=iv();Ve(()=>(fu({openPage:s=>e({kind:"page",slug:s.slug,siteId:o??void 0}),reload:()=>{t()},config:r}),()=>fu(null)),[e,o,t,r]),Ve(()=>{let s=qo();if(!s||!a)return;let i=!1;return c4(n).list().then(f=>{i||s.learn(f)}).catch(()=>{}),()=>{i=!0}},[a,n])}function x4(e,o,t,a){let{kind:r,open:n}=e,{selected:s,zoneOf:i}=o;Ve(()=>{mw(s?.type==="BookingBox"&&s.props.region==="confirm"?xw(i(String(s.props.id))):null)},[s?.props.id]);let f=_S(e,o),{capabilities:{hasSiteSettings:d}}=Ps();m4();let{setSelected:p,setSelectHandler:x}=K(),{chat:m,setChat:h,setSelected:b,setSelectHandler:S}=_l(),T=r==="header";Ve(()=>{p(T)},[T,p]),Ve(()=>{x(()=>n(Td))},[x,n]);let F=Yr(()=>n(aS),[n]),C=r==="chat";Ve(()=>{b(C)},[C,b]),Ve(()=>{S(F)},[S,F]);let{setOpenHandler:g}=ur(),I=Yr(()=>n(rS),[n]);Ve(()=>{g(I)},[g,I]);let P=dv(fv(e),cv(e)),E=u4(o),k=p4(e,a),A=t.device;return{...P,...E,...k,hasOwnRows:B=>B.type===ds,ownRows:f.renderLocationTree,sectionPressed:f.sectionPressed,wrap:B=>he(Us.Provider,{value:!0,children:Vr(f4.Provider,{value:A,children:[B,he(_C,{})]})}),addPanelRow:B=>d?Vr("div",{className:"sf-addside-sitewide",children:[he("span",{className:"sf-addside-sitewide-glyph","aria-hidden":"true",children:he(Mt,{type:"chat",size:16})}),Vr("button",{type:"button",className:"sf-addside-sitewide-name",onClick:()=>{B(),F()},children:[l("Live chat"),he("span",{className:"sf-addside-sitewide-desc",children:l("A chat bubble on every page")})]}),he(a4,{checked:m.enabled,onChange:H=>h({enabled:H}),ariaLabel:l("Show the chat bubble on the whole site")})]}):void 0}}var tv=null,uu=new WeakMap;function h4(e){let o=Yu();if(!e||!o)return e;tv!==o&&(tv=o,uu=new WeakMap);let t=uu.get(e);return t||(t={...e,choices:e.choices?e.choices.map(a=>({...a,label:l(a.label)})):null,spec:e.spec?{...e.spec,addLabel:l(e.spec.addLabel)}:null},uu.set(e,t)),t}var I4={isLockedBlock:(e,o)=>Ew(e,o)||!!(o&&qo()?.heldElsewhere(o.props.id)),duplicateBlocked:os,nestDepth:(e,o,t)=>o===sn?yp(e,t):0,newSectionNode:Qw,canAddTo:(e,o)=>h4(uw(e,o)),blockIsOffered:dw,slotsOf:pw},g4=new Proxy(Vw,{get:(e,o)=>{let t=Reflect.get(e,o);return typeof t=="string"?l(t):t}}),y4={labelAtLevel:(e,o,t)=>l(Wd(e,o,t)),descriptions:g4,categoryLabel:e=>{let o=DC(e);return o===void 0?void 0:l(o)},firstSection:NC,blockRowName:hw,rowName:Iw,plainText:za,Icon:Mt,Thumbnail:uS,useProducts:Jw},b4={desktop:2e3,tablet:800,mobile:390},av="desktop",S4={options:ay,initial:av,fluid:av,widths:b4},C4={read:yw,write:e=>bw(e),forSelection:(e,o)=>Cw(e,o)},w4={first:Ne,last:ce,firstGroup:de,lastGroup:ie,isSectionGroup:Ca,sectionGroupZone:gb,panelOf:e=>e===Ne?Td:null,get sharedReach(){return qt()?k4:void 0},get shared(){return qo()?Aw:void 0},get groupTab(){return qt()?wb:void 0},get groupBadge(){return qt()?dd({type:ie})??void 0:void 0},get changeNotice(){return qt()?vb():void 0},get band(){return qt()?v4:void 0},get groupAccepts(){return qt()?Sb:void 0}},v4={foldable:!0},k4=e=>dd(e)??Lw(e);function T4(e){return{...dv(fv(e),cv(e)),openSettings:()=>e.show(Pd)}}function P4(e,o){YS(e,o),QS()}var ice={useOwnerName:ha,useDocumentLabel:Rg,useBridges:x4,useStandaloneBridges:T4,useDocumentPass:P4,blockRules:I4,blockLook:y4,devices:S4,leftView:C4,pinned:w4,Canvas:qw,canvasDrag:{media:Kw},Inspector:lS};export{qae as a,jae as b,Kae as c,Vae as d,ut as e,ou as f,ale as g,Ce as h,yn as i,MS as j,ore as k,mle as l,zC as m,ble as n,KC as o,Sle as p,VC as q,XC as r,JC as s,ew as t,Rle as u,Ble as v,_le as w,Dle as x,U5 as y,$5 as z,Bp as A,Y5 as B,Kle as C,Xo as D,nn as E,ak as F,G6 as G,yt as H,U6 as I,$6 as J,sn as K,yp as L,ose as M,tse as N,e3 as O,mp as P,Jv as Q,B6 as R,rn as S,hp as T,ek as U,ok as V,tk as W,N6 as X,M6 as Y,H6 as Z,W6 as _,wc as $,u_ as aa,p_ as ba,m_ as ca,Nl as da,Ml as ea,OX as fa,de as ga,ie as ha,loe as ia,yb as ja,es as ka,Qo as la,ne as ma,Oo as na,lre as oa,sre as pa,ire as qa,GS as ra,fre as sa,cre as ta,Nf as ua,jW as va,KW as wa,Qt as xa,VW as ya,YW as za,IT as Aa,gT as Ba,za as Ca,Ga as Da,zf as Ea,pl as Fa,so as Ga,V9 as Ha,Y9 as Ia,X9 as Ja,Z9 as Ka,RL as La,BL as Ma,Q9 as Na,fa as Oa,Gf as Pa,J9 as Qa,eK as Ra,On as Sa,ML as Ta,hl as Ua,ca as Va,KI as Wa,yl as Xa,iK as Ya,Il as Za,fK as _a,cK as $a,dK as ab,uK as bb,pK as cb,SA as db,mK as eb,xK as fb,hK as gb,IK as hb,Cr as ib,Yy as jb,Xy as kb,Zy as lb,n6 as mb,f6 as nb,c6 as ob,d6 as pb,xe as qb,zE as rb,ef as sb,GE as tb,I7 as ub,to as vb,y7 as wb,b7 as xb,$E as yb,S7 as zb,Vx as Ab,Yx as Bb,VE as Cb,YE as Db,k7 as Eb,P7 as Fb,E7 as Gb,F7 as Hb,O7 as Ib,Xx as Jb,Ho as Kb,Mo as Lb,lf as Mb,Zx as Nb,eF as Ob,sf as Pb,zn as Qb,R7 as Rb,Fv as Sb,U4 as Tb,dn as Ub,Dp as Vb,SW as Wb,CW as Xb,Wk as Yb,wW as Zb,TW as _b,Mp as $b,PW as ac,Gk as bc,EW as cc,cE as dc,An as ec,N$ as fc,Ui as gc,M$ as hc,IE as ic,H$ as jc,ee as kc,G$ as lc,U$ as mc,J$ as nc,e7 as oc,o7 as pc,dx as qc,k$ as rc,nE as sc,T$ as tc,P$ as uc,E$ as vc,CE as wc,Bn as xc,q$ as yc,wx as zc,O4 as Ac,l as Bc,Ae as Cc,Vy as Dc,AJ as Ec,jy as Fc,Bt as Gc,JK as Hc,sc as Ic,JA as Jc,yg as Kc,aR as Lc,rV as Mc,nV as Nc,wl as Oc,lV as Pc,cy as Qc,fy as Rc,NX as Sc,py as Tc,HX as Uc,my as Vc,I_ as Wc,vc as Xc,ya as Yc,UX as Zc,$X as _c,g_ as $c,qX as ad,hr as bd,gy as cd,jX as dd,pr as ed,bX as fd,iy as gd,SX as hd,CX as id,wX as jd,wae as kd,mS as ld,xS as md,hS as nd,vm as od,wn as pd,km as qd,LG as rd,_P as sd,QG as td,Am as ud,Ov as vd,Lv as wd,j4 as xd,Av as yd,Rv as zd,K4 as Ad,V4 as Bd,Y4 as Cd,X4 as Dd,Z4 as Ed,Q4 as Fd,J4 as Gd,e6 as Hd,o6 as Id,t6 as Jd,E6 as Kd,A6 as Ld,fn as Md,Ha as Nd,Tp as Od,Z6 as Pd,Q6 as Qd,ai as Rd,Bk as Sd,IW as Td,LW as Ud,Ii as Vd,gi as Wd,Az as Xd,Rz as Yd,fm as Zd,Bz as _d,_z as $d,Dz as ae,mm as be,hm as ce,nU as de,Bm as ee,ke as fe,Nm as ge,IU as he,jP as ie,gU as je,yU as ke,Hm as le,Wm as me,zm as ne,Gm as oe,Um as pe,$m as qe,Ai as re,a0 as se,Km as te,FU as ue,r0 as ve,OU as we,LU as xe,l0 as ye,Bi as ze,i0 as Ae,_U as Be,f0 as Ce,DU as De,d0 as Ee,oa as Fe,MU as Ge,HU as He,WU as Ie,zU as Je,Pn as Ke,GU as Le,Ni as Me,XU as Ne,Jm as Oe,x0 as Pe,QU as Qe,Mi as Re,F0 as Se,I$ as Te,ot as Ue,lE as Ve,R$ as We,Wi as Xe,B$ as Ye,_$ as Ze,Ki as _e,K$ as $e,V$ as af,TE as bf,Y$ as cf,X$ as df,Z$ as ef,_x as ff,NE as gf,a7 as hf,Rx as if,Bx as jf,r7 as kf,Dn as lf,Nn as mf,l7 as nf,ra as of,Hn as pf,f7 as qf,c7 as rf,d7 as sf,$x as tf,p7 as uf,lt as vf,To as wf,gf as xf,no as yf,sq as zf,iq as Af,fq as Bf,cq as Cf,mq as Df,xq as Ef,PO as Ff,hq as Gf,Iq as Hf,gq as If,yq as Jf,bq as Kf,Sq as Lf,Cq as Mf,Te as Nf,wq as Of,LO as Pf,vq as Qf,kq as Rf,Tq as Sf,Pq as Tf,jn as Uf,la as Vf,Eq as Wf,$h as Xf,Vn as Yf,Fq as Zf,Oq as _f,Yn as $f,Lq as ag,Aq as bg,Rq as cg,Bq as dg,_q as eg,Dq as fg,Nq as gg,Mq as hg,Hq as ig,Wq as jg,zq as kg,Gq as lg,Xn as mg,Uq as ng,$q as og,Zn as pg,Qn as qg,wf as rg,Jn as sg,qq as tg,Ot as ug,jq as vg,Kq as wg,Vq as xg,Yq as yg,Xq as zg,Zq as Ag,Qq as Bg,ao as Cg,Jq as Dg,ej as Eg,Ja as Fg,oj as Gg,vf as Hg,tj as Ig,aj as Jg,rj as Kg,kf as Lg,nj as Mg,Jh as Ng,eI as Og,oI as Pg,lj as Qg,C1 as Rg,sj as Sg,ij as Tg,HM as Ug,_b as Vg,Ge as Wg,Fr as Xg,GM as Yg,Wb as Zg,qoe as _g,joe as $g,Koe as ah,Voe as bh,Yoe as ch,Xoe as dh,Zoe as eh,Qoe as fh,Joe as gh,ete as hh,ote as ih,Rl as jh,ey as kh,oy as lh,Bl as mh,tX as nh,aX as oh,_l as ph,a_ as qh,pX as rh,ur as sh,IX as th,sy as uh,kne as vh,Tne as wh,Pne as xh,Ene as yh,Ose as zh,Lse as Ah,Hse as Bh,Rse as Ch,TX as Dh,Dl as Eh,z4 as Fh,QI as Gh,EK as Hh,FK as Ih,OK as Jh,LK as Kh,hg as Lh,Sg as Mh,fV as Nh,cV as Oh,lR as Ph,dV as Qh,uV as Rh,pV as Sh,mV as Th,sR as Uh,xV as Vh,hV as Wh,IV as Xh,gV as Yh,dR as Zh,yV as _h,FV as $h,OV as ai,hc as bi,Ic as ci,by as di,PQ as ei,Py as fi,Ay as gi,Yc as hi,Gl as ii,VD as ji,KQ as ki,VQ as li,YQ as mi,XQ as ni,XD as oi,ZQ as pi,QQ as qi,tb as ri,$J as si,kN as ti,TN as ui,kr as vi,PN as wi,EN as xi,ZJ as yi,sb as zi,ce as Ai,Jl as Bi,fo as Ci,yS as Di,bS as Ei,Pae as Fi,Br as Gi,SS as Hi,CS as Ii,Oae as Ji,Lae as Ki,ps as Li,ms as Mi,Ire as Ni,gre as Oi,yre as Pi,JS as Qi,Vd as Ri,eC as Si,uw as Ti,Cse as Ui,vs as Vi,u3 as Wi,p3 as Xi,Kse as Yi,B4 as Zi,M4 as _i,V3 as $i,Zw as aj,Y3 as bj,Kr as cj,Wie as dj,zie as ej,ice as fj};
|