efficient-storefront-blocks 0.76.0 → 0.78.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 +29 -0
- package/dist/chunks/EditorPreviewCheckout-IEFQC4T3.js +4 -0
- package/dist/chunks/{SiteEditorProvider-AJUWZYHT.js → SiteEditorProvider-YTZPWUDV.js} +1 -1
- package/dist/chunks/chunk-4O66UMLS.js +1 -0
- package/dist/chunks/chunk-LZTJCQ4A.js +311 -0
- package/dist/chunks/chunk-MZPZ4B7Y.js +1 -0
- package/dist/chunks/chunk-TI4ZGDSG.js +1 -0
- package/dist/chunks/chunk-WC4XIVX3.js +1 -0
- package/dist/chunks/{fitment-data-IZYCNTET.js → fitment-data-VU5A7VKV.js} +1 -1
- package/dist/editor/components/CategorySource.js +1 -1
- package/dist/editor/lib/document/blocks/commerce/GalleryB/fields.js +1 -1
- package/dist/editor/lib/document/blocks/commerce/ProductGrid/fields.js +1 -1
- package/dist/editor/lib/document/blocks/service/Events/fields.js +1 -1
- package/dist/editor/lib/document/blocks/service/FooterGroup/fields.js +1 -1
- package/dist/editor/lib/document/blocks/service/FooterSocial/fields.js +1 -1
- package/dist/index.js +31 -31
- package/dist/render/app/globals.css +44 -0
- package/dist/render/built-with.json +1 -1
- package/dist/render/components/ChatWidget.js +1 -1
- package/dist/render/components/ConsentPanel.js +1 -1
- package/dist/render/components/Events.d.ts +2 -1
- package/dist/render/components/Events.js +1 -1
- package/dist/render/components/FooterGroup.d.ts +2 -1
- package/dist/render/components/FooterGroup.js +1 -1
- package/dist/render/components/GalleryGrid.d.ts +2 -1
- package/dist/render/components/GalleryGrid.js +1 -1
- package/dist/render/components/Notice.d.ts +6 -0
- package/dist/render/components/Notice.js +1 -0
- package/dist/render/components/ProductGridSection.d.ts +2 -1
- package/dist/render/components/ProductGridSection.js +1 -1
- package/dist/render/components/SubscribePopup.js +2 -2
- package/dist/render/components/TyreFitVerdicts.d.ts +2 -1
- package/dist/render/components/TyreFitVerdicts.js +1 -1
- package/dist/render/components/TyreVehicleFitment.js +1 -1
- package/dist/render/components/WheelCardFrame.d.ts +3 -0
- package/dist/render/components/WheelCardFrame.js +1 -1
- package/dist/render/components/catalog/CatalogFilterBar.js +1 -1
- package/dist/render/components/checkout/CheckoutPageClient.d.ts +4 -0
- package/dist/render/components/checkout/CheckoutPageClient.js +1 -1
- package/dist/render/components/checkout/checkout-parts.js +1 -1
- package/dist/render/components/checkout/checkout-state.d.ts +14 -2
- package/dist/render/components/checkout/checkout-state.js +3 -3
- package/dist/render/components/product-hero/TyreHeroFitment.d.ts +2 -1
- package/dist/render/components/product-hero/TyreHeroFitment.js +1 -1
- package/dist/render/components/product-hero/VehicleQuestion.d.ts +0 -4
- package/dist/render/components/product-hero/VehicleQuestion.js +1 -1
- package/dist/render/components/product-hero/WheelHeroFitment.js +1 -1
- package/dist/render/components/product-hero/trust-bullets.js +1 -1
- package/dist/render/components/useTyreFitAnswer.d.ts +1 -0
- package/dist/render/components/useTyreFitAnswer.js +1 -1
- package/dist/render/lib/api/index.d.ts +7 -3
- package/dist/render/lib/api/index.js +1 -1
- package/dist/render/lib/api/types.d.ts +5 -0
- package/dist/render/lib/checkout/pay-first.d.ts +34 -0
- package/dist/render/lib/checkout/pay-first.js +1 -0
- package/dist/render/lib/document/blocks/commerce/GalleryB/render.js +1 -1
- package/dist/render/lib/document/blocks/commerce/ProductGrid/render.js +1 -1
- package/dist/render/lib/document/blocks/service/Events/render.js +1 -1
- package/dist/render/lib/document/blocks/service/FooterGroup/render.js +1 -1
- package/dist/render/lib/tyres/tyre-fit-copy.js +1 -1
- package/dist/render/lib/tyres/tyre-vehicle-fitment.d.ts +3 -1
- package/dist/render/lib/tyres/tyre-vehicle-fitment.js +1 -1
- package/dist/render/lib/wheels/plp-grid.d.ts +2 -1
- package/dist/render/lib/wheels/plp-grid.js +1 -1
- package/dist/words.d.ts +0 -5
- package/dist/words.js +2 -2
- package/package.json +3 -3
- package/dist/chunks/EditorPreviewCheckout-ANI7HUYX.js +0 -4
- package/dist/chunks/chunk-3IQQNZIM.js +0 -311
- package/dist/chunks/chunk-4F5CAFXO.js +0 -1
- package/dist/chunks/chunk-5NXOTPHK.js +0 -1
- package/dist/chunks/chunk-YAYHH5GY.js +0 -1
- package/dist/chunks/chunk-YFPWVNDB.js +0 -1
- /package/dist/chunks/{chunk-3IQQNZIM.js.LEGAL.txt → chunk-LZTJCQ4A.js.LEGAL.txt} +0 -0
|
@@ -0,0 +1,311 @@
|
|
|
1
|
+
import{$ as zm,B as Am,C as Rm,D as Bm,Da as oe,F as _m,G as lc,Ha as Xm,I as Dm,Ia as Zm,J as go,K as $t,Ka as Qn,L as Nm,La as Qm,M as Wo,Ma as Jm,N as Zn,Q as Mm,R as ic,Ra as ex,U as Hm,V as cc,X as fc,a as Ct,b as rc,fa as jt,h as Pm,ha as Wm,i as ac,j as nc,ja as Gm,k as Ge,l as Em,la as Um,m as Om,ma as ko,n as vr,na as Er,o as zo,oa as $m,p as Tr,pa as Jo,q as Pr,qa as dc,ra as uc,s as Fm,v as va,va as Ta,x as Lm,xa as jm,y as sc,za as qm}from"./chunk-WC4XIVX3.js";import{d as Km,e as Pa,f as Vm,g as Ym,j as Or,n as pc}from"./chunk-TI4ZGDSG.js";var pe=e=>typeof e=="string"&&e?e:void 0;var tx="en",Jn=null,rx=tx,ax=null;function _8(e,o,t){Jn=e??null,rx=o||tx,ax=t??null}function X(){return ax}function mc(){return rx}function nx(){return Jn}function ox(e,o){return o?e.replace(/\{([A-Za-z][A-Za-z0-9_]*)\}/g,(t,r)=>Object.prototype.hasOwnProperty.call(o,r)?String(o[r]):t):e}function l(e,o){let t=Jn?Jn[e]:void 0;if(typeof t=="function"){try{let r=pe(t(o??{}));if(r)return r}catch{}return ox(e,o)}return ox(pe(t)??e,o)}function Ze(e,o,t,r){return l(t===1?e:o,{...r,n:t})}import{jsx as xc,Fragment as P0,jsxs as E0}from"react/jsx-runtime";import{createContext as O0,useContext as F0}from"react";var L0={mirrorHostStyles:!0,css:null,fontHrefs:[]},sx=O0(L0);function H8({value:e,children:o}){return xc(sx.Provider,{value:e,children:o})}function hc(){return F0(sx)}function lx(){let{css:e,fontHrefs:o}=hc();return E0(P0,{children:[o.map(t=>xc("link",{rel:"stylesheet",href:t},t)),e?xc("style",{"data-sf-canvas-css":"",children:e}):null]})}import{jsx as A0}from"react/jsx-runtime";import{createContext as R0,useContext as B0}from"react";var ix=R0(void 0);function U8({metadata:e,children:o}){return A0(ix.Provider,{value:e,children:o})}var cx=()=>B0(ix);import{jsx as Le,Fragment as u0,jsxs as Vn}from"react/jsx-runtime";import{useCallback as Yn,useEffect as Xo,useRef as n8,useState as i0}from"react";import{Button as s8,Tooltip as l8}from"efficient-shell/ui";import{SettingsSwitch as i8}from"efficient-easel/panel";import{PagesIcon as c8,StylesIcon as f8}from"efficient-easel/rail";import{PaletteIcon as d8}from"efficient-shell/icons/efficient";import{TemplateIcon as u8}from"efficient-easel/icons";import{Subtree as p8,TreeRow as p0}from"efficient-easel/tree";import{useEasel as m0}from"efficient-easel/easel";import{useEaselStrings as x0}from"efficient-easel/strings";import{createContext as _0,useContext as D0}from"react";var Ic=_0(!1),q8=()=>D0(Ic);import{jsx as ie,Fragment as Hb,jsxs as Qa}from"react/jsx-runtime";import{Fragment as R2,useEffect as B2,useId as _2,useMemo as zb,useRef as D2,useState as _t}from"react";import{useScreenDocument as Vb}from"efficient-easel/screen/components/ScreenDocumentContext";import{UiIcon as Kd}from"efficient-easel/draw/client";import N2 from"efficient-easel/screen/components/SidePanelHead";import{jsx as Q,Fragment as dr,jsxs as fr}from"react/jsx-runtime";import{useEasel as Lb,useRootFields as NN}from"efficient-easel/easel";import{Inspector as MN}from"efficient-easel/fields";import{SettingsGroup as HN}from"efficient-easel/panel";import{useEffect as zN,useRef as WN,useState as Ol}from"react";import{jsx as Kt,Fragment as hE,jsxs as IE}from"react/jsx-runtime";import{useState as Sx}from"react";import{SettingsDefaultReset as gE,SettingsField as yE}from"efficient-easel/panel";import{useEaselStrings as bE}from"efficient-easel/strings";import{AddIcon as SE}from"efficient-easel/icons";import{Button as CE}from"efficient-shell/ui";import{iconOf as wE,noGlyph as kE}from"efficient-easel/screen/lib/document/box-fields";import{jsx as Z,jsxs as kt,Fragment as J0}from"react/jsx-runtime";import{parseHexColor as eE}from"efficient-shell/format";import{Button as bc,IconButton as oE,Tooltip as tE}from"efficient-shell/ui";import{jsx as wt,jsxs as j0}from"react/jsx-runtime";import{AccentIcon as q0}from"efficient-easel/icons";import{Button as K0,Tooltip as V0}from"efficient-shell/ui";import{jsx as qt,jsxs as ux}from"react/jsx-runtime";import{ColorPicker as M0,HexInput as H0}from"efficient-shell/ui";import{SettingsDefaultReset as z0,SettingsField as W0}from"efficient-easel/panel";import{typedHex as gc}from"efficient-easel/pick";import{typedHex as N0}from"efficient-easel/pick";function fx(e){let o=new Set,t=[];return Ge(e).themes.forEach((r,a)=>{let n=[[l("Theme {n} main color",{n:a+1}),r.accent],[l("Theme {n} text color",{n:a+1}),r.text],[l("Theme {n} background",{n:a+1}),r.background]];for(let[s,i]of n){let c=i?N0(i):null;!c||o.has(c)||(o.add(c),t.push({name:s,value:c}))}}),t}var dx="Not set";function G0({value:e,onChange:o,label:t,id:r,caption:a,inherited:n,ariaLabel:s}){return qt($0,{value:e,onChange:o,label:l(s??t),id:r,caption:a,inherited:n})}function U0(){let{theme:e}=oe();return fx(e).map(o=>({value:o.value,label:o.name}))}function $0({value:e,onChange:o,label:t,id:r,caption:a,inherited:n}){let s=U0(),i=e?null:gc(n??""),c=a!==void 0&&(!e||gc(a)!==gc(e))?a:null,d=m=>{m!==e&&o(m)};return ux("div",{className:"sf-colour",children:[qt(M0,{id:r,value:e,onChange:d,label:t,presets:s,fallback:i??void 0,size:"md",align:"start"}),c!==null?qt("span",{className:"sf-colour-caption",children:c}):qt("span",{className:"sf-colour-hexwrap",children:qt(H0,{value:e||i||"",onChange:d,label:l("{label} hex code",{label:t}),placeholder:e||i?void 0:l(dx),className:i?"sf-colour-hex is-inherited":"sf-colour-hex",size:"md"})})]})}function yo({label:e,icon:o,changed:t,hint:r,onReset:a,resetTo:n,children:s,...i}){return ux(W0,{label:e,icon:o,htmlFor:i.id,changed:t,hint:r,action:a?qt(z0,{words:X()?.panel,label:e,changed:!!t,detail:n,onReset:a}):void 0,children:[G0({...i,label:e}),s]})}function es({label:e,icon:o,value:t,inherited:r,resetTo:a,onChange:n,onReset:s,hint:i}){let c=!!t;return qt(yo,{label:e,icon:o,value:t,inherited:c?void 0:r,onChange:n,changed:c,onReset:s,resetTo:a,hint:i})}function yc(e){return zo(e).background}function Y0(e){let o=Ct(e.accent,yc(e));return o===null?null:{ratio:o,grade:Pr(o)}}function X0(e){let o=yc(e),t=Ct(e.accent,o);return t===null?[]:Fm(e.accent).filter(r=>{let a=Ct(r,o);return a!==null&&a>t&&Pr(a)==="good"})}var Z0={good:"Easy to read","large-only":Tr["large-only"],hard:Tr.hard};function px({value:e,onChange:o}){let t=Y0(e),r=t?.grade,a=t&&t.grade!=="good"?X0(e):[];return wt(yo,{label:l("Main color"),icon:wt(q0,{}),hint:t?l(Z0[t.grade]):void 0,value:e.accent,onChange:n=>o({...e,accent:n}),children:a.length>0?wt("div",{className:"w-full min-w-0",children:j0("div",{className:"sf-readability",children:[wt("p",{className:"sf-readability-advice",children:Q0(r,!0)}),wt("div",{className:"sf-readability-suggestions",children:a.map(n=>{let s=Ct(n,yc(e));return wt(V0,{content:l("Use {colour}",{colour:n.toUpperCase()}),children:wt(K0,{variant:"secondary",className:"sf-readability-suggestion",leftIcon:wt("span",{className:"sf-readability-chip",style:{background:n},"aria-hidden":!0}),onClick:()=>o({...e,accent:n}),children:s?`${s.toFixed(1)}:1`:n.toUpperCase()})},n)})})]})}):null})}function Q0(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 rE,ChevronDownIcon as xx,ChevronUpIcon as aE,GroundIcon as nE,LayoutIcon as sE,SquareIcon as lE,TextSmallIcon as iE,TypeIcon as mx}from"efficient-easel/icons";var Ea=e=>l("Theme {n}",{n:e+1});function hx({colors:e}){let o=zo(e),t=va(e)??o.accent;return kt("span",{className:"sf-theme-page",style:{background:o.background,color:o.text},"aria-hidden":!0,children:[Z("span",{className:"sf-theme-eyebrow",style:{color:o.muted},children:l("label")}),kt("span",{className:"sf-theme-headline",children:[l("Heading")," ",Z("span",{style:{color:o.accent},children:l("accent")})]}),Z("span",{className:"sf-theme-body",children:l("body text")}),kt("span",{className:"sf-theme-row",children:[Z("span",{className:"sf-theme-btn",style:{background:t,color:sc(e,o.accent)},children:l("button")}),Z("span",{className:"sf-theme-mini",style:{background:o.surface,borderColor:o.line},children:l("card")})]})]})}var Sc={"Text color":Z(mx,{}),"Label color":Z(iE,{}),Background:Z(nE,{}),"Panels & cards":Z(sE,{}),Borders:Z(lE,{}),"Button color":Z(rE,{}),"Button text color":Z(mx,{})};function cE({label:e,colorKey:o,value:t,onChange:r,idPrefix:a="sf-theme-ink"}){let n=`${a}-${o}`;return Z(yo,{label:l(e),icon:Sc[e],id:n,value:t,onChange:s=>r(o,s)})}function fE({value:e,accent:o,onChange:t,idPrefix:r="sf-theme-ink"}){let a=`${r}-button`,n=e!==void 0&&eE(e)===e.toLowerCase(),s=n?e:o;return Z(yo,{label:l("Button color"),icon:Sc["Button color"],id:a,value:s,caption:n?s:l("Main"),onChange:t})}function dE({colors:e,accent:o,onChange:t,idPrefix:r="sf-theme-ink"}){let a=`${r}-button-ink`,n=Lm(e),s=sc(e,o),i=va(e)??o,c=Pr(Ct(s,i)??0);return Z(yo,{label:l("Button text color"),icon:Sc["Button text color"],hint:n&&c!=="good"?l("{grade} on the button",{grade:l(Tr[c])}):void 0,id:a,value:s,caption:n?s:l("Auto"),onChange:t})}var uE=[{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 Cc({colors:e,onChange:o,idPrefix:t}){let r=zo(e);return Z(J0,{children:uE.map(a=>"colour"in a?Z(px,{value:e,onChange:o},"colour"):"moduleBreak"in a?Z("div",{className:"sf-theme-module-break","aria-hidden":"true"},"module-break"):"button"in a?Z(fE,{value:e.button,accent:r.accent,onChange:n=>o({...e,button:n}),idPrefix:t},"button"):"buttonInk"in a?Z(dE,{colors:e,accent:r.accent,onChange:n=>o({...e,buttonInk:n}),idPrefix:t},"buttonInk"):Z(cE,{label:a.label,colorKey:a.key,value:r[a.key],onChange:(n,s)=>o({...e,[n]:s}),idPrefix:t},a.key))})}function os({index:e,colors:o,selected:t,role:r="radio",open:a,editable:n=!0,onPick:s,onEdit:i,onChangeColors:c}){let d=zo(o),m=Ea(e),x=e<nc.length&&!o.brandInk?nc[e]:null,u=Pr(Ct(d.text,d.background)??0),h=x?JSON.stringify(o)!==JSON.stringify(x):!1,g=a!==void 0;return kt("div",{className:`sf-theme-card${t?" is-selected":""}`,children:[Z("button",{type:"button",role:r,"aria-checked":r==="radio"?t:void 0,"aria-selected":r==="option"?t:void 0,"aria-label":m,className:"sf-theme-pick",onClick:s,children:Z(hx,{colors:o})}),kt("div",{className:"sf-theme-foot",children:[Z("span",{className:"sf-theme-name",children:m}),u!=="good"&&Z("span",{className:"sf-theme-warn",children:l(Tr[u])}),n&&i&&g&&Z("span",{className:"sf-theme-edit",children:Z(tE,{content:a?l("Collapse"):l("Edit colors"),children:Z(oE,{size:"sm","aria-expanded":a,"aria-controls":`sf-theme-colours-${e}`,"aria-label":a?l("Collapse {name}",{name:m}):l("Edit colors for {name}",{name:m}),onClick:i,children:a?Z(aE,{size:14}):Z(xx,{size:14})})})}),n&&i&&!g&&Z(bc,{variant:"secondary",size:"sm",className:"sf-theme-edit","aria-label":l("Edit {name}",{name:m}),onClick:i,children:l("Edit")})]}),a&&kt("div",{id:`sf-theme-colours-${e}`,className:"sf-theme-colours",children:[Z(Cc,{colors:o,onChange:k=>c?.(k)}),x&&Z(bc,{variant:"link",size:"sm",className:"sf-theme-reset",disabled:!h,onClick:()=>c?.({...x}),children:h?l("Reset {name} to the preset",{name:m}):l("Not changed")})]})]})}function Ix({colors:e,name:o,nameId:t,open:r,menuId:a,labelId:n,buttonRef:s,onClick:i,onKeyDown:c,onEdit:d}){return kt("div",{className:"sf-secttheme-btn",children:[Z("button",{ref:s,type:"button",className:"sf-theme-pick","aria-expanded":r,"aria-controls":a,"aria-labelledby":`${n} ${t}`,onClick:i,onKeyDown:c,children:e?Z(hx,{colors:e}):Z("span",{className:"sf-secttheme-nopreview","aria-hidden":"true"})}),kt("div",{className:"sf-theme-foot",children:[Z("span",{id:t,className:"sf-theme-name",children:o}),d&&Z(bc,{variant:"secondary",size:"sm",className:"sf-theme-edit","aria-label":l("Edit {name}",{name:o}),onClick:d,children:l("Edit")}),Z("button",{type:"button",className:"sf-secttheme-caret","aria-hidden":"true",tabIndex:-1,onClick:i,children:Z(xx,{size:12,className:"sf-multi-caret","aria-hidden":"true"})})]})]})}import{jsx as ts,Fragment as pE,jsxs as gx}from"react/jsx-runtime";import{Button as yx,Dialog as mE}from"efficient-shell/ui";function xE(e){return Ze("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 bx({count:e,onCancel:o,onConfirm:t}){return gx(mE,{open:!0,onClose:o,role:"alertdialog",size:"sm",title:l("Clear this site\u2019s colors?"),footer:gx(pE,{children:[ts(yx,{variant:"secondary",onClick:o,children:l("Cancel")}),ts(yx,{variant:"danger",onClick:t,children:l("Clear colors")})]}),children:[ts("p",{children:xE(e)}),ts("p",{className:"mt-2 font-medium",children:l("This cannot be undone.")})]})}var vE=kE("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"),TE="Reset color",PE={selected:0,themes:[]};function EE(e){e(PE)}function Cx({value:e,onChange:o}){let t=e?.themes??[],r=t.length===0,a=Ge(e),[n,s]=Sx(!1),i=bE(),[c,d]=Sx(null),m=(O,w)=>{o({...a,themes:a.themes.map((I,b)=>b===O?w:I)})},x=vr(a).accent,u=new Set(a.themes.map(O=>O.brandInk).filter(Boolean)),h=Em.filter(O=>!u.has(O)).map(O=>Om(x,O)),g=[...a.themes,...h],k=O=>{if(O<a.themes.length)return o({...a,selected:O});let w=[...a.themes,g[O]];o({...a,themes:w,selected:w.length-1})},P=()=>{let O=[...a.themes,{...zo(a.themes[a.selected])}];o({...a,themes:O,selected:O.length-1}),d(O.length-1)};return IE(hE,{children:[r?null:Kt(yE,{label:l(TE),icon:wE(vE),labelId:"sf-theme-reset",action:Kt(gE,{label:l("all theme colors"),words:i.panel,changed:!0,onReset:()=>s(!0)})}),n&&Kt(bx,{count:t.length,onCancel:()=>s(!1),onConfirm:()=>{s(!1),EE(o)}}),Kt("div",{className:"sf-theme-list",role:"radiogroup","aria-label":l("Theme"),children:g.map((O,w)=>Kt(os,{index:w,colors:O,selected:w===a.selected,open:c===w&&w<a.themes.length,editable:w<a.themes.length,onPick:()=>k(w),onEdit:()=>d(I=>I===w?null:w),onChangeColors:I=>m(w,I)},w))}),Kt(CE,{variant:"secondary",leftIcon:Kt(SE,{}),onClick:P,className:"sf-theme-add",children:l("Add new theme")})]})}import{jsx as fl}from"react/jsx-runtime";import{SettingsDefaultReset as r_,SettingsField as a_}from"efficient-easel/panel";import{SquareIcon as n_}from"efficient-easel/icons";import{jsx as y,jsxs as jr,Fragment as Lt}from"react/jsx-runtime";import{cloneElement as _g,useEffect as QA,useId as Dg,useRef as Qs,useState as Ha}from"react";import{useEasel as Uf}from"efficient-easel/easel";import{toDateKey as HX,fromDateKey as zX}from"efficient-shell/format";function OE(e){return!!e&&typeof e=="object"&&!Array.isArray(e)&&typeof e.src=="string"}function vt(e){return typeof e=="string"?e:OE(e)?e.src:""}function zj(e,o,t){return wc(e,o.split("."),t)}function wc(e,o,t){if(o.length===0)return t(e);let[r,...a]=o,n=r.endsWith("[]"),s=n?r.slice(0,-2):r;if(!e||typeof e!="object"||Array.isArray(e))return e;let i=e;if(!(s in i))return e;let c=i[s];if(n){if(!Array.isArray(c))return e;let m=!1,x=c.map(u=>{let h=wc(u,a,t);return h!==u&&(m=!0),h});return m?{...i,[s]:x}:e}let d=wc(c,a,t);return d===c?e:{...i,[s]:d}}var FE=["upload","youtube"],LE="upload",Uj={upload:"Upload",youtube:"YouTube"},AE=["background","click"],RE="background",$j={background:"Background",click:"Click to play"};function jj(e){return FE.includes(e)?e:LE}function qj(e){return AE.includes(e)?e:RE}var wx=/^[A-Za-z0-9_-]{11}$/,BE=/^(?:www\.|m\.|music\.)?(?:youtube\.com|youtube-nocookie\.com|youtu\.be)$/;function Kj(e){let o=typeof e=="string"?e.trim():"";if(!o)return null;if(wx.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:"||!BE.test(t.hostname))return null;let r=t.pathname.split("/").filter(Boolean),a=t.hostname.endsWith("youtu.be")?r[0]:r[0]==="watch"?t.searchParams.get("v"):r[0]==="embed"||r[0]==="shorts"||r[0]==="live"||r[0]==="v"?r[1]:null;return a&&wx.test(a)?a:null}function Vj(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 Yj(e){return`https://i.ytimg.com/vi/${e}/maxresdefault.jpg`}function Xj(e){return`https://i.ytimg.com/vi/${e}/hqdefault.jpg`}var Zj="Play video";var kc={frame:"Video frame",image:"Image"},Qj={any:[{field:"loadingShows",is:"image"},{all:[{not:{field:"loadingShows",set:!0}},{field:"poster",set:!0}]}]};function vc(e){let o=e.loadingShows;return o==="image"?"image":o!=null&&o!==""?"frame":vt(e.poster)?"image":"frame"}function Jj(e){return vt(vc(e)==="image"?e.poster:e.videoFrame)||void 0}import{readHidable as At,hidableText as JA}from"efficient-easel/draw";import{FOLD_FIELD_MARKER as Ng,LINK_FIELD_MARKER as eR,MEDIA_FIELD_MARKER as oR,SCAFFOLD_FIELD_MARKER as tR,TEXT_FIELD_MARKER as nt,foldMetaOf as st,textFieldIdentifier as qX}from"efficient-easel/draw";import{jsx as Fx}from"react/jsx-runtime";import{useCallback as ME}from"react";import{useEasel as HE}from"efficient-easel/easel";import{SettingsAction as zE}from"efficient-easel/panel";import{CORNER_SIDES as rs,hasCornerSubset as Oa,normalizeCornerSides as Go}from"efficient-easel/screen/lib/content/style-keys";function Tc(e){return typeof e=="number"&&Number.isFinite(e)}function r7(e,o){if(!Tc(e))return;let t=Zn(Wo(e));if(Object.keys(t).length===0)return;let r=t[Pc];if(typeof r!="string")return t;let a=Oa(o)?Vt(r,Go(o)??[]):r;return{...t,[_E]:a}}var _E="--sf-section-radius",Pc="--sf-card-radius";function Vt(e,o){return rs.map(t=>o.includes(t)?e:"0").join(" ")}var kx=[{value:"tl",label:"Top left"},{value:"tr",label:"Top right"},{value:"bl",label:"Bottom left"},{value:"br",label:"Bottom right"}];var DE="--sf-card-box-radius";function Ec(e){return typeof e=="number"&&Number.isFinite(e)}function l7(e,o){if(!Ec(e))return;let t=Zn(Wo(e))[Pc];if(typeof t!="string")return;let r=Oa(o)?Vt(t,Go(o)??[]):t;return{[DE]:r}}function vx(e,o){let t=e.find(n=>n?.props?.id===o);if(!t)return[...e];let r=t.props?.cardCorners,a=t.props?.cardCornerSides;return e.map(n=>n?.props?.id===o?n:{...n,props:{...n.props,cardCorners:r,cardCornerSides:a}})}import{locateNode as NE}from"efficient-easel/draw";function Fa(e){if(!e)return null;let o=e.lastIndexOf(":");return o>0?{ownerId:e.slice(0,o),slot:e.slice(o+1)}:null}function as(e,o,t){let r=Fa(t?.zone),a=r?NE(e,o,r.ownerId):null;return a&&r?{...a,slot:r.slot}:null}function Tx(e,o,t){let r=as(e,o,t),a=r?.slot??"",n=r&&Array.isArray(r.item.props[a])?r.item.props[a]:[],s=t?.index??-1,i=s>=0?n[s]:void 0,c=i?.props?.id?String(i.props.id):"",d=Math.max(n.length-1,0);return!r||!c?{can:!1,reason:"unreachable",others:0}:n.length<=1?{can:!1,reason:"alone",others:d}:Ec(i?.props?.cardCorners)?{can:!0,others:d,zone:r.zone,index:r.index,data:{...r.item,props:{...r.item.props,[a]:vx(n,c)}}}:{can:!1,reason:"unset",others:d}}function Px(e){return e.can?Ze("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 Ex(e){return Ze("Applied to {n} card","Applied to {n} cards",e)}function Ox(e,o){e.can&&o(e.zone,e.index,e.data)}import{useSectionOps as WE}from"efficient-easel/screen/lib/document/use-section-ops";var GE="apply-corners-to-siblings",UE="Apply to all cards";function $E({plan:e,onPress:o}){return Fx(zE,{id:GE,label:l(UE),note:Px(e),disabled:!e.can,doneLabel:Ex(e.others),onPress:o})}function Lx(){let{appState:e,config:o}=HE(n=>n),t=WE(),r=Tx(o,e.data.content??[],e.ui.itemSelector),a=ME(()=>{Ox(r,t.replaceComponent)},[r,t]);return Fx($E,{plan:r,onPress:a})}import{isShown as nO,lazyShowWhenContext as sO}from"efficient-shell/format";var Yt="product",ns="recordType",jE={key:Yt,label:"Product",fields:[]},qE=/^[a-z][a-z0-9]*(-[a-z0-9]+)*$/,KE=/^[a-z][A-Za-z0-9]*$/,VE=["text","date"],Ax=new Map,Rx=0;function YE(e){if(typeof e.key!="string"||!qE.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===Yt)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"||!KE.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(!VE.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 w7(e){let o=e.map(YE);for(let t of o)Ax.set(t.key,t);o.length&&(Rx+=1)}function Oc(){return[jE,...Ax.values()]}function Fc(){return Rx}function Lc(e){let o=e?.[ns];return typeof o!="string"?Yt:o.trim()||Yt}function Ac(e){return Lc(e)===Yt}var Rc="product",XE="tyre";var ZE="productType",QE={[Rc]:"alloy-wheel",[XE]:"tyre"},JE=["alloy-wheel","tyre"];function Bx(e,o){return Ac(o)?eO(o)??QE[e]??null:null}function eO(e){if(!Ac(e))return null;let o=e?.[ZE];return typeof o=="string"&&JE.includes(o)?o:null}var ss=null,_x=null;function oO(e,o){ss=e,_x=o}function E7(e){oO(e,null)}function O7(){return ss}function ls(){return _x==="dynamic"||ss===Rc}function F7(e){return Bx(ss??"",e)??"alloy-wheel"}import{addShowWhenFacts as tO}from"efficient-shell/format";import{showWhenOf as Bc,shownForOption as rO,truthy as aO,withRowRules as _c,withRowsShownWhen as Dc,withShowWhen as Fr}from"efficient-shell/format";var B7=tO;function Nx(e,o,t){let r=!1,a={};for(let[n,s]of Object.entries(e))nO(Bc(s),o??{},t)?a[n]=s:r=!0;return r?a:e}function Mx(e,o,t,r){let a=as(o,t,r);return{device:e,parentType:a?.item.type,parent:a?.item.props}}function Dx(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 Dx(t.not,o);for(let r of[t.all,t.any])if(Array.isArray(r)&&r.some(a=>Dx(a,o)))return!0;return!1}function W7(e,o={}){return sO({parentType:()=>e.parent?.type??void 0,parent:()=>e.parent?.props??void 0,dynamicPage:()=>ls(),root:()=>e.appState?.data?.root?.props,...o})}var Hx=1;function lO(e){return Wo(e)}function $7(e){let o=lO(e);return o===null?{}:{"--sf-card-image-radius":`${o}px`}}var zx=1,Wx="Corners";function iO(e){return Wo(e)}function V7(e,o){let t=iO(e);if(t===null)return null;let r=`${t}px`;return{borderRadius:Oa(o)?Vt(r,Go(o)??[]):r}}var et={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]]}},Nc=Object.keys(et),Ux=[2,3,4,6];function Mc(e,o){return Nc.filter(t=>t===o||e===null||et[t].across===e)}function $x(e){return typeof e!="string"||e===""?null:et[e]??null}function Gx(e,o){return o?6/e.acrossPhone:12/e.across}function jx(e){return[...e.lead??[],...e.desktop]}var cO="sf-wall--";function fO(e){return`${cO}${e}`}function X7(e){let o=et[e],t=`.${fO(e)}`,r=[],a=(n,s,i=[])=>{let c=[],d=n.length,m=i.length;i.forEach(([x,u],h)=>{c.push(`${t} > :nth-child(${h+1}){grid-column:span ${x};grid-row:span ${u}}`)}),n.forEach(([x,u],h)=>{c.push(`${t} > :nth-child(${d}n+${m+h+1}){grid-column:span ${x};grid-row:span ${u}}`)});for(let x=1;x<d;x+=1)c.push(`${t}:has(> :nth-child(${d}n+${m+x}):last-child) > :nth-last-child(-n+${x}){grid-column:span ${s};grid-row:span 1}`);return c};return r.push(`${t}{grid-template-columns:repeat(12,minmax(0,1fr))}`),r.push(...a(o.desktop,Gx(o,!1),o.lead)),r.push("@media (max-width:800px){"),r.push(`${t}{grid-template-columns:repeat(6,minmax(0,1fr))}`),r.push(...a(o.phone,Gx(o,!0),o.leadPhone)),r.push("}"),r.join("")}var is=12,qx=1,dO=3;var uO=3;function Hc(e,o,t){let r=typeof e=="number"?e:Number.parseInt(String(e??""),10);return Number.isFinite(r)?Math.min(t,Math.max(o,Math.trunc(r))):null}function pO(e){return Hc(e,1,is)??uO}function J7(e,o){return Hc(e,qx,dO)??(pO(o)===4?2:qx)}function eq(e){return e==null||e===""?null:Hc(e,1,is)}var oq="data-sf-span";function tq(e){if(!e)return!1;if(e.type==="Grid")return!0;if(e.type==="GalleryB"){if($x(e.props?.layout))return!1;let o=e.props?.columns;return o!=null&&o!==""}return!1}import{jsx as mO}from"react/jsx-runtime";import*as xO from"efficient-easel/icons";function cs(e){let o=e.replace(/(^|-)([a-z])/g,(r,a,n)=>n.toUpperCase()),t=xO[`${o}Icon`];return t?mO(t,{size:16}):null}import{isNodeList as hO}from"efficient-easel/data";var Lr=["top-left","top-center","top-right","left","center","right","bottom-left","bottom-center","bottom-right"],Vx="bottom-left",Ar=4,IO=Ar+1,Kx=40,gO=30,yO=100,bO=60,lq=100;var zc={"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 SO(e){let o=Lr.indexOf(La(e));return{band:Math.floor(o/3),column:["start","center","end"][o%3]}}function CO(e){return 1+SO(e).band*(IO+1)}function iq(e){return CO(e)+1}function La(e){return Lr.includes(e)?e:Vx}function cq(e){let o=typeof e=="number"&&Number.isFinite(e)?e:0;return Math.max(-Kx,Math.min(Kx,Math.round(o)))}function fq(e,o=bO){let t=typeof e=="number"&&Number.isFinite(e)?e:o;return Math.max(gO,Math.min(yO,Math.round(t)))}function Wc(e,o){let t=La(o);return e.filter(r=>La(r?.props?.placement)===t).length}function Yx(e){return`${zc[La(e)]} already holds ${Ar} boxes. Move one somewhere else first.`}function Xx(e,o){let t=e.filter(r=>r?.props?.id!==o);return Lr.map(r=>{let a=Wc(t,r)>=Ar,n=zc[r];return a?{value:r,label:n,disabled:!0,title:Yx(r)}:{value:r,label:n}})}function fs(e,o){let t=o===void 0?Vx:La(o?.props?.placement);return Wc(e,t)>=Ar?Yx(t):null}var ds="HeroGroup";function wO(e){return Lr.map(o=>{let t=Wc(e,o);return{anchor:o,total:t,hidden:t-Ar}}).filter(o=>o.hidden>0)}function Gc(e){let o=wO(e);return o.length===0?null:o.map(({anchor:t,total:r,hidden:a})=>{let n=zc[t],s=a===1?"1 is not shown":`${a} are not shown`;return`${n} holds ${r} boxes. The published page draws the first ${Ar}, so ${s}. ${a===1?"Move it":"Move them"} somewhere else.`}).join(" ")}function Zx(e,o){let t=o;if(t?.type!==ds)return null;let r=t.props?.id===void 0?"":String(t.props.id);return r?fs(Uc(e,r),t):null}function Uc(e,o){let t=Jx(e,o);return t&&t.ownerType===vO?t.siblings:[]}function Qx(e,o){let t=Jx(e,o);return t?t.ancestorTypes.filter(r=>r===ds).length:kO}var kO=1,vO="HeroSlide";function Jx(e,o){let t=(r,a,n)=>{if(a>12||!r||typeof r!="object")return null;if(hO(r)){if(r.some(s=>s?.props?.id===o))return{siblings:r,ownerType:n.at(-1)??null,ancestorTypes:n};for(let s of r){let i=s.type,c=t(s,a+1,[...n,String(i)]);if(c)return c}return null}for(let s of Object.values(r)){let i=t(s,a+1,n);if(i)return i}return null};return t(e,0,[])}import{jsx as TO}from"react/jsx-runtime";var $c="sf-hint-keep";function eh({children:e}){return TO("span",{className:$c,children:e})}import{jsx as Tt,Fragment as OO,jsxs as ih}from"react/jsx-runtime";import{useContext as FO,useEffect as LO,useId as AO,useState as ch}from"react";import{SettingsField as RO,SettingsSwitch as BO}from"efficient-easel/panel";import{AnchorIcon as _O}from"efficient-easel/icons";import{ScreenDocumentContext as DO}from"efficient-easel/screen/components/ScreenDocumentContext";import{Snippet as NO}from"efficient-shell/ui";import{slugify as MO}from"efficient-shell/format";var us="homepage";import{slugify as PO}from"efficient-shell/format";var oh=[{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 th(e){return e.offersCommerce&&e.offersService?oh:oh.filter(o=>!o.needs||(o.needs==="commerce"?e.offersCommerce:e.offersService))}var jc="#popup:";function rh(e){return`${jc}${e}`}function ah(e){return e.startsWith(jc)&&e.slice(jc.length).trim()||null}function Aa(e){return e===us?"/":`/${e}`}function nh(e){return`/journal/${e}`}function Iq(e){return`/wheels/${e}`}function ps(e,o){return`${Aa(e)}#${o}`}function EO(e){return typeof e=="string"?e.trim():e&&typeof e=="object"&&typeof e.text=="string"?e.text.trim():""}function sh(...e){let o=new Set,t=[];for(let r of e)for(let a of r?.content??[]){let n=EO(a?.props?.anchor);if(!n)continue;let s=PO(n);!s||o.has(s)||(o.add(s),t.push({slug:s,name:n}))}return t}function gq(e){let o=e.indexOf("#"),t=o===-1?e:e.slice(0,o),r=t.indexOf("?");return r===-1?t:t.slice(0,r)}function lh(e){return/^\/wheels\/[^/?#]+(?:[?#].*)?$/.test(e)}import{readHidable as HO}from"efficient-easel/draw";function fh({value:e,onChange:o,nameBox:t}){let r=HO(e).text,[a,n]=ch(!1),s=a||r.trim()!=="",i=AO();return ih(OO,{children:[Tt(RO,{label:l("Add an anchor"),labelId:i,icon:Tt(_O,{}),action:Tt(BO,{checked:s,ariaLabelledBy:i,onChange:c=>{n(c),!c&&r!==""&&o("")}})}),s&&t(e,o),s&&Tt(zO,{name:r})]})}function zO({name:e}){let o=FO(DO),t=o?.templateId?"":o?.currentSlug??"",[r,a]=ch("");LO(()=>a(Or()||window.location.origin),[]);let n=MO(e);if(!n||!t)return null;let s=`${r}${ps(t,n)}`,i=s.replace(/^https?:\/\//,""),c=i.lastIndexOf("#");return Tt("div",{className:"sf-anchor-link",children:Tt(NO,{value:s,label:l("link"),size:"sm",children:ih("span",{className:"sf-anchor-link-text",children:[Tt("span",{className:"sf-anchor-link-path",children:i.slice(0,c)}),Tt("span",{className:"sf-anchor-link-hash",children:i.slice(c)})]})})})}import{AdjustIcon as rR,EyeIcon as aR,AnimationIcon as nR,BackgroundIcon as sR,BorderAllIcon as lR,BlockSectionIcon as iR,ColumnWidthsIcon as Mg,ColumnsIcon as cR,CornerIcon as fR,DirectionDownIcon as dR,DirectionLeftIcon as uR,DirectionRightIcon as pR,DirectionUpIcon as mR,EditIcon as xR,GapIcon as hR,GridIcon as IR,GroundIcon as Hg,HashIcon as zg,HeightIcon as gR,ImageIcon as yR,ListIcon as bR,LocationIcon as Eg,PaddingBottomIcon as Wg,PaddingLeftIcon as Gg,PaddingRightIcon as Ug,PaddingTopIcon as $g,PageIcon as SR,StickyIcon as CR,RotateIcon as wR,SearchIcon as kR,SquareIcon as vR,TypeIcon as TR,WidthIcon as PR}from"efficient-easel/icons";import{jsx as ke,Fragment as Xt,jsxs as Zt}from"react/jsx-runtime";import{CaptionIcon as WO,DateIcon as GO,FlagIcon as UO,TitleIcon as $O,ButtonIcon as jO,DollarIcon as qO,HashIcon as KO,LinkIcon as VO,NoteIcon as YO,TagIcon as XO,TextLinesIcon as ZO}from"efficient-easel/icons";var dh={body:ZO,button:jO,link:VO,label:XO,number:KO,price:qO,note:YO,name:UO,date:GO,caption:WO,title:$O},uh={eyebrow:Zt(Xt,{children:[ke("path",{d:"M5 6.5h5"}),ke("path",{d:"M5 12.5h14"}),ke("path",{d:"M5 18h11"})]}),heading:Zt(Xt,{children:[ke("path",{d:"M6.5 5v14"}),ke("path",{d:"M17.5 5v14"}),ke("path",{d:"M6.5 12h11"})]}),intro:Zt(Xt,{children:[ke("path",{d:"M4 5.5v13"}),ke("path",{d:"M8 7.5h12"}),ke("path",{d:"M8 12h12"}),ke("path",{d:"M8 16.5h8"})]}),value:Zt(Xt,{children:[ke("rect",{x:"2.5",y:"7",width:"19",height:"10",rx:"2"}),ke("path",{d:"M6.5 12h7"})]}),quote:Zt(Xt,{children:[ke("path",{d:"M9.5 5.5C7 7.2 5.5 9.7 5.5 12.8h4v5.7h-5v-5.7"}),ke("path",{d:"M19.5 5.5c-2.5 1.7-4 4.2-4 7.3h4v5.7h-5v-5.7"})]}),tag:Zt(Xt,{children:[ke("rect",{x:"3",y:"5.5",width:"18",height:"13",rx:"2.5"}),ke("path",{d:"M8 9.5h8"}),ke("path",{d:"M12 9.5v5"})]}),meta:Zt(Xt,{children:[ke("path",{d:"M4 7h16"}),ke("path",{d:"M4 14h3.5"}),ke("path",{d:"M10.5 14h3"}),ke("path",{d:"M17 14h3"})]})};function qc({noun:e,size:o=14,strokeWidth:t=1.8,className:r,style:a}){let n=dh[e];return n?ke("span",{className:r,style:{display:"inline-flex",...a},"aria-hidden":"true",children:ke(n,{size:o})}):ke("svg",{className:r,style:a,width:o,height:o,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:t,strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:uh[e]})}var Bq=Object.keys(dh);var _q=Object.keys(uh);import{parseHexColor as QO}from"efficient-shell/format";var JO="#ffffff";function Kc(e){return e1(e)?e:JO}function e1(e){return typeof e=="string"&&QO(e)===e.toLowerCase()}function Mq(e){return{"--bg":Kc(e)}}function ph(e,o){let t=e?.content;if(!Array.isArray(t))return null;for(let r of t){if(!r||typeof r!="object")continue;let{type:a,props:n}=r;if(n?.id===o)return null;if(Vc(r,o,0))return{type:typeof a=="string"?a:"",props:n??{}}}return null}function Vc(e,o,t){if(t>12||!e||typeof e!="object")return!1;if(Array.isArray(e))return e.some(a=>Vc(a,o,t+1));let r=e.props;return r&&typeof r=="object"&&r.id===o?!0:Object.values(e).some(a=>Vc(a,o,t+1))}function mh(e,o){let t=e?.content;return Array.isArray(t)?ms(t,o,0)??[]:[]}function ms(e,o,t){if(t>12||!e||typeof e!="object")return null;if(Array.isArray(e)){for(let a of e){let n=ms(a,o,t+1);if(n)return n}return null}let r=e.props;if(r&&typeof r=="object"){if(r.id===o)return[];for(let a of Object.values(r)){let n=ms(a,o,t+1);if(n)return[r,...n]}return null}for(let a of Object.values(e)){let n=ms(a,o,t+1);if(n)return n}return null}import{SettingsDefaultReset as to,SettingsDrill as ER,SettingsField as Be,SettingsGroup as OR,SettingsGroupSub as cZ,SettingsSegmented as FR,SettingsBorder as LR,SettingsSidesEach as AR,SettingsSwitch as $f,borderSides as RR,borderStartEach as BR}from"efficient-easel/panel";import{ListField as _R}from"efficient-easel/fields";import{DisplayChips as DR}from"efficient-shell/ui";function Rr(e){if(!e||typeof e!="object"||Array.isArray(e))return{};let o={};for(let[t,r]of Object.entries(e))typeof r=="boolean"&&(o[t]=r);return o}function xs(e,o){return Rr(e)[o]!==!1}function Yc(e,o,t){let r=Rr(o)[t];return typeof r=="boolean"?r:xs(e,t)}function xh(e){return Object.values(Rr(e)).some(o=>o===!1)}function hh(e){return Object.keys(Rr(e)).length>0}function Ih(e,o,t){let r={...Rr(e)};return t?delete r[o]:r[o]=!1,Object.keys(r).length?r:void 0}function gh(e,o,t){return{...Rr(e),[o]:t}}function Wq(e,o,t){let r=xs(e,t),a=Yc(e,o,t);return r&&a?"":!r&&!a?"hidden":r?"max-[720px]:hidden":"min-[720px]:hidden"}import{AlignmentGrid as NR,Checkbox as mZ,ColorSwatch as MR,CornersInput as HR,DatePicker as xZ,DateTimePicker as zR,FOCAL_DEFAULT as hZ,PictureTiles as WR,IconPicker as GR,IconButton as jg,InputNumber as Og,Slider as UR,Tooltip as Js}from"efficient-shell/ui";import{keptByRow as $R}from"efficient-easel/screen/lib/document/style-fields";import{jsx as w1}from"react/jsx-runtime";import{useEffect as k1,useState as v1}from"react";import{clearRangeOf as T1,markSelection as P1,useCaretEdit as E1}from"efficient-easel/copy";import{TextToolbar as O1}from"efficient-shell/ui";import{applyMark as Vq,markupTools as Yq,MARKUP_TOOLS as Xq,COPY_FIELD_TOOLS as Zq,STOREFRONT_MARKUP as Qq,tokenizeInline as Jq,stripInline as e9,isSafeLinkHref as o9}from"efficient-shell/markup";import{applyMark as u1,clearStyle as p1,markedAt as m1,markupTools as x1,MARKUP_TOOLS as h1,parseMarkup as I1,RETIRED_MARKS as g1,STOREFRONT_MARKUP as y1,tokenizeInline as r9}from"efficient-shell/markup";var Qt=["highlight","strong","quiet"],Jt={highlight:"Highlight",strong:"Bold",quiet:"Quiet"},Uo={highlight:{kind:"wordHighlight",delimiter:"@@"},strong:{kind:"wordStrong",delimiter:"++"},quiet:{kind:"wordQuiet",delimiter:"^^"}},Ch=Object.fromEntries(Qt.map(e=>[Uo[e].kind,e])),wh="data-sf-ws",hs=["accent","text","labels"],kh={accent:"Accent",text:"Text",labels:"Labels"},ot={accent:"var(--accent)",text:"var(--fg)",labels:"var(--fg-dim)"},o1=80,t1=120,r1=100,a1=900,n1=.5,s1=3,l1=-.1,i1=.5,c1=3,Xc={font:null,size:null,weight:null,bold:null,italic:null,lineGap:null,textGap:null,colour:null},f1={highlight:{...Xc},strong:{...Xc},quiet:{...Xc}};function yh(e,o,t){return typeof e!="number"||!Number.isFinite(e)?null:Math.round(Math.min(Math.max(e,o),t))}function bh(e,o,t){if(typeof e!="number"||!Number.isFinite(e))return null;let r=10**c1;return Math.round(Math.min(Math.max(e,o),t)*r)/r}function Sh(e){return typeof e=="boolean"?e:null}function d1(e){let o=typeof e?.font=="string"&&ko.some(r=>r.key===e.font)?e.font:null,t=typeof e?.colour=="string"&&hs.includes(e.colour)?e.colour:null;return{font:o,size:yh(e?.size,o1,t1),weight:yh(e?.weight,r1,a1),bold:Sh(e?.bold),italic:Sh(e?.italic),lineGap:bh(e?.lineGap,n1,s1),textGap:bh(e?.textGap,l1,i1),colour:t}}function vh(e){let o={};for(let t of Qt)o[t]=e&&t in e&&e[t]?d1(e[t]):{...f1[t]};return o}function $q(e){let o=vh(e),t={};for(let r of Qt){let a=o[r],n=`--sf-ws-${r}`;if(a.font){let s=ko.find(i=>i.key===a.font);s&&(t[`${n}-font`]=`var(${s.cssVar})`)}a.size!==null&&(t[`${n}-size`]=`${a.size/100}em`),a.weight!==null&&(t[`${n}-weight`]=String(a.weight)),a.bold!==null&&(t[`${n}-weight-bold`]=a.bold?"700":"400"),a.italic!==null&&(t[`${n}-style`]=a.italic?"italic":"normal"),a.lineGap!==null&&(t[`${n}-line`]=String(a.lineGap)),a.textGap!==null&&(t[`${n}-track`]=`${a.textGap}em`),a.colour!==null&&(t[`${n}-color`]=ot[a.colour])}return t}function jq(e){let o=e?.word_styles??void 0,t={};for(let r of Qt)o&&r in o&&(t[r]=o[r]??null);return vh(t)}var b1=new Set(["strong"]),Th=Qt.map(e=>({open:Uo[e].delimiter,close:Uo[e].delimiter,kind:Uo[e].kind,...b1.has(e)?{wordStart:!0}:{}})),n9=[{style:Uo.highlight.kind,label:Jt.highlight,title:`${Jt.highlight} word style`},{style:Uo.strong.kind,label:Jt.strong,title:`${Jt.strong} word style`},{style:Uo.quiet.kind,label:Jt.quiet,title:`${Jt.quiet} word style`}],S1=new Set(Th.map(e=>e.open)),er=[...y1.filter(e=>!S1.has(e.open)),...Th];function Zc(e){return e.bullet?"- ":e.number!=null?`${e.number}. `:""}function Qc(e){return I1(typeof e=="string"?e:"",er)}var C1=h1.map(e=>e.style).filter(e=>!g1.includes(e)).filter(e=>er.some(o=>o.kind===e));function Ph(){return x1(C1)}var Eh=Object.fromEntries(Qt.map(e=>[Uo[e].kind,Uo[e].delimiter]));function Oh(e,o,t,r){let a=Eh[r];if(!a)return u1(e,o,t,r);let n=e.slice(o,t),s=e.slice(Math.max(0,o-a.length),o),i=e.slice(t,t+a.length);if(s===a&&i===a)return{text:e.slice(0,o-a.length)+n+e.slice(t+a.length),selectionStart:o-a.length,selectionEnd:o-a.length+n.length};let c=n||"styled text";return{text:e.slice(0,o)+a+c+a+e.slice(t),selectionStart:o+a.length,selectionEnd:o+a.length+c.length}}function Fh(e,o,t,r){let a=Eh[r];return a?o>=a.length&&e.slice(o-a.length,o)===a&&e.slice(t,t+a.length)===a:m1(e,o,t,r)}function Ra(e){return Qc(e).map(o=>Zc(o)+Ah(o.children)).join(`
|
|
2
|
+
`)}function Lh(e,o,t){return p1(e,o,t,er)}function Ah(e){return e.map(o=>o.kind==="text"?o.text:Ah(o.children)).join("")}function F1(e,o,t){return P1(e,o,t,Oh)}function Rh(e,o){let t=T1(o,e.length),r=Lh(e,t.start,t.end);return r.text===e?null:r}function L1(e){let[o,t]=v1(null);return k1(()=>{let r=e.current?.ownerDocument??(typeof document>"u"?null:document);if(!r)return;let a=()=>{let n=e.current;if(!n||r.activeElement!==n)return;let s=n.selectionStart??n.value.length,i=n.selectionEnd??s;t(c=>c&&c.start===s&&c.end===i?c:{start:s,end:i})};return r.addEventListener("selectionchange",a),()=>r.removeEventListener("selectionchange",a)},[e]),[o,t]}function A1({target:e,value:o,onChange:t,disabled:r=!1,label:a="Formatting"}){let n=E1({target:e,onChange:t}),[s,i]=L1(e),c=u=>n(h=>{let g=F1(o,u,h);return i({start:g.selectionStart,end:g.selectionEnd}),g}),d=Ph(),m={};if(s)for(let u of d)m[u.style]=Fh(o,s.start,s.end,u.style);let x=r?null:Rh(o,s);return w1(O1,{offered:new Set(d.map(u=>u.style)),onMark:u=>c(u),pressed:m,disabled:r,"aria-label":l(a),className:"sf-markup-bar",clear:x?{onClear:()=>n(()=>{let u=e.current,h=u&&u.ownerDocument.activeElement===u?{start:u.selectionStart??0,end:u.selectionEnd??0}:null,g=Rh(o,h)??{text:o,selectionStart:h?.start??0,selectionEnd:h?.end??0};return i({start:g.selectionStart,end:g.selectionEnd}),g})}:void 0})}var Jc=A1;import{deviceField as Ne}from"efficient-easel/screen/lib/document/device-fields";import{NO_CONTROL_FIELD as jR,NoControlMark as qR,noControlField as qg}from"efficient-easel/screen/lib/document/panel-no-control-mark";var ef="__ownBox";function Bh(e){return!!e&&typeof e=="object"&&e[ef]===!0}function Is(e,o,t){return typeof e=="number"?e:typeof o=="number"?o:t}var gs=void 0;import{phoneKey as $r}from"efficient-easel/draw";import{jsx as tf,Fragment as _1}from"react/jsx-runtime";import{createContext as D1,useContext as N1}from"react";var ys={ProductGrid:{source:{keep:["slug"]}},GalleryItem:{product:{keep:["code","finish"]}},FeaturedCover:{source:{keep:["slug"]}},LongRead:{source:{keep:["slug"]}}},bs={Events:["posts"],SubscribeBlogs:["posts"]};var R1=["anchor"],B1=/^href$|Href$|^url$|Url$|^link$|^mailto$|^tel$/;function Ba(e){return R1.includes(e)||B1.test(e)}var of={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"}}};of.ContactLocations={"locations[].lat":{verb:"pii"},"locations[].lng":{verb:"pii"},"locations[].mapsUrl":{verb:"pii"},"locations[].geocode":{verb:"pii"}};var g9=Object.fromEntries(Object.entries(ys).map(([e,o])=>[e,Object.keys(o)])),y9=Object.fromEntries(Object.entries(bs).map(([e,o])=>[e,[...o]]));import{NoControlMark as M1}from"efficient-easel/screen/lib/document/panel-no-control-mark";var _h=D1(!1);function Dh({children:e}){return tf(_h.Provider,{value:!0,children:e})}function H1(){return N1(_h)}function Nh({name:e,children:o}){return!H1()||!e||!z1(e)||Ba(e)?tf(_1,{children:o}):tf(M1,{})}function z1(e){return/^[A-Za-z0-9_$]+$/u.test(e)}function oo(e,o,t){return e.some(r=>(typeof r=="object"?r.value:r)===t)?t:o}var rf="off",af="none",nf=[{label:"None",value:"off"},{label:"1, 2, 3",value:"plain"},{label:"01, 02, 03",value:"padded"},{label:"N\xB001, N\xB002",value:"numero"}],sf=[{label:"None",value:"none"},{label:"Hairline",value:"hairline"}];function E9(e){return oo(nf,rf,e)}function O9(e){return oo(sf,af,e)}var Mh="sf-card-index",_a="sf-card-index",F9="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",W1={plain:`counter(${_a})`,padded:`counter(${_a}, decimal-leading-zero)`,numero:`"N\xB0" counter(${_a}, decimal-leading-zero)`};function L9(e,o){return o==="off"?"":`.${e}{counter-reset:${_a}}.${e} .${Mh}{counter-increment:${_a}}.${e} .${Mh}::before{content:${W1[o]}}`}function A9(e){return e==="hairline"?"border border-line hover:border-accent":""}var Hh=[{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 KR}from"efficient-easel/draw";import{jsx as $o}from"react/jsx-runtime";import{SettingsDefaultReset as $1,SettingsField as zh}from"efficient-easel/panel";import{useSelectedFields as G1}from"efficient-easel/easel";function Br(){try{return G1()}catch{return null}}import{FOCAL_DEFAULT as j1}from"efficient-shell/format";import{ImageIcon as Wh,PlayIcon as Gh}from"efficient-easel/icons";import{MediaUploadField as q1}from"efficient-shell/ui";import{useContext as K1}from"react";import{ScreenDocumentContext as V1}from"efficient-easel/screen/components/ScreenDocumentContext";import{phoneKey as Y1}from"efficient-easel/draw";import{usePreviewDevice as X1}from"efficient-easel/draw/client";import{requestMediaPick as Z1}from"efficient-easel/screen/lib/media-picker";import{useEaselHost as Q1}from"efficient-easel/screen/lib/host";import{backendOf as U1}from"efficient-easel/screen/lib/session";var He=U1,Ss=e=>e.blocks;import{useEaselSession as J1}from"efficient-easel/screen/lib/session-context";function eF(e,o){let t=Br(),r=X1()==="mobile";if(!e||!t||o&&!o(t.values??{}))return null;let a=typeof t.values?.[e]=="string"&&t.values[e]?String(t.values[e]):j1,n=Y1(e),s=typeof t.values?.[n]=="string"&&t.values[n]?String(t.values[n]):void 0,i=t.onChange;return{phone:r,desktop:a,own:s,focus:r?s??a:a,set:c=>i(r?n:e,c),clear:()=>i(n,gs)}}function Uh({value:e,onChange:o,label:t,accept:r,placeholder:a,focusKey:n,focusWhen:s,frameKey:i,fieldKey:c}){let d=Q1(),m=J1(),x=l(t),u=r.startsWith("video"),h=eF(u?void 0:n,s),g=K1(V1),k=lf(),P=i&&c?{video:c,frame:i}:null,O=v=>Z1(d,{accept:r,title:x,...v?{file:v}:{}}).then(S=>!S||!P?S?.url??null:(k({[P.video]:S.url,[P.frame]:S.posterUrl??""}),null)),w=P?v=>v?o(v):k({[P.video]:"",[P.frame]:""}):o;if(g&&!g.capabilities.mediaEditing)return $o(zh,{label:x,icon:u?$o(Gh,{}):$o(Wh,{}),children:$o("div",{className:"sf-image-slot-inert",children:u?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 I=vt(e),b=h?.phone&&I?$o($1,{words:X()?.panel,label:l("Image focus"),changed:!!h.own,detail:l("{value} on desktop",{value:h.desktop}),onReset:h.clear}):void 0;return $o(zh,{label:x,icon:u?$o(Gh,{}):$o(Wh,{}),action:b,children:$o("div",{style:{flex:"1 1 auto",minWidth:0},children:$o(q1,{value:I,onChange:w,onPick:O,accept:u?"video/*":"image/*",kind:u?"video":"image",placeholder:a===void 0?void 0:l(a),maxSizeBytes:He(m).media.maxUploadBytes,...h?{focus:h.focus,onFocusChange:h.set}:{}})})})}import{jsx as $h}from"react/jsx-runtime";import{useId as oF}from"react";import{FieldSelect as tF}from"efficient-easel/fields";import{SettingsField as rF}from"efficient-easel/panel";function aF(e){return e.map(({value:o,label:t,note:r})=>({value:o,label:t,...r?{meta:r}:{}}))}function jh({label:e,options:o,value:t,onChange:r,emptyLabel:a,icon:n,hint:s}){let i=oF(),c=`${i}-label`,d=`${i}-button`,m=Array.isArray(t)?t:[];return $h(rF,{label:l(e),labelId:c,icon:n,hint:s,children:$h(tF,{id:d,multiple:!0,value:m,options:aF(o),onChange:r,placeholder:a===void 0?l("None"):l(a),ariaLabelledBy:`${c} ${d}`,inline:!0})})}import{jsx as De,jsxs as tr,Fragment as IF}from"react/jsx-runtime";import{useCallback as tI,useContext as gF,useId as nI,useRef as rI,useState as aI}from"react";import{ThemeIcon as yF}from"efficient-easel/icons";import{Button as bF,useClickOutside as SF}from"efficient-shell/ui";import{SettingsField as CF}from"efficient-easel/panel";import{ScreenDocumentContext as wF}from"efficient-easel/screen/components/ScreenDocumentContext";import{useCallback as mf,useEffect as Xh,useRef as vs}from"react";import{currentEaselSession as lF}from"efficient-easel/screen/lib/session";import{useEaselSession as iF}from"efficient-easel/screen/lib/session-context";import{useSyncExternalStore as nF}from"react";var Kh,cf=null,or=null,Cs=0,ff=new Set;function df(e){Kh=e;for(let o of ff)o()}function uf(e){cf=e,Cs+=1,or&&clearTimeout(or),or=null,df(void 0)}function Vh(e){Cs+=1,df(e)}function ws(e=250){cf&&(or&&clearTimeout(or),or=setTimeout(()=>{or=null;let o=cf;if(!o)return;let t=++Cs;o().then(r=>{t===Cs&&df(r)}).catch(()=>{})},e))}function qh(){return Kh}function sF(e){return ff.add(e),()=>{ff.delete(e)}}function ks(){return nF(sF,qh,qh)}var pf=new Set;function Yh(e){return pf.add(e),()=>{pf.delete(e)}}async function uK(){let e=(await Promise.allSettled([...pf].map(async o=>o()))).find(o=>o.status==="rejected");if(e)throw e.reason}import{WebsiteBackendError as cF}from"efficient-easel/screen/lib/backend-error";function Zh(e=lF()){return(o,t,r)=>{let a=He(e).theme;return a?a.update(o,r?{siteId:r}:void 0):Promise.reject(new cF("invalid","This backend stores no site theme."))}}function Qh(e){return e.themeFromDocument?{status:"skipped",reason:"template"}:e.token?null:{status:"skipped",reason:"no-token"}}async function fF(e,o=Zh()){let{themeFromDocument:t,token:r,siteId:a,patch:n}=e,s=Qh({themeFromDocument:t,token:r});if(s)return s;if(Object.keys(n).length===0)return{status:"skipped",reason:"empty"};try{return await o(n,r,a??void 0),{status:"saved"}}catch(i){return{status:"failed",error:i}}}function _r({themeFromDocument:e,tokenRef:o,siteId:t,onResult:r}){let a=vs(null),n=vs({}),s=iF(),i=vs(r);i.current=r;let c=vs(null),d=mf(u=>{if(u.status==="skipped"){let h=`skipped:${u.reason}`;if(c.current===h)return;c.current=h}else c.current=null;i.current?.(u)},[]),m=mf(async()=>{a.current&&(clearTimeout(a.current),a.current=null);let u=n.current;n.current={};let h=await fF({themeFromDocument:e,token:o?.current,siteId:t,patch:u},Zh(s));return d(h),h.status==="saved"&&ws(),h.status==="failed"&&(n.current={...u,...n.current}),h},[e,o,t,d,s]),x=mf((u,h=!1)=>{let g=Qh({themeFromDocument:e,token:o?.current});if(g){d(g);return}n.current={...n.current,...u},a.current&&clearTimeout(a.current),h?m():a.current=setTimeout(()=>{m()},500)},[e,o,m,d]);return Xh(()=>()=>{m()},[m]),Xh(()=>Yh(async()=>{if(!a.current&&Object.keys(n.current).length===0)return;let u=await m();if(u.status==="failed")throw u.error}),[m]),{persist:x,flush:m}}var xf=[{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}],dF=xf.filter(e=>e.ink);function uF(e){let o={color:e.fg};for(let{role:t,token:r}of dF)o[r]=e[t];return o}var pF={fg:"var(--overlay-fg)",line:"color-mix(in srgb, var(--overlay-fg) 24%, transparent)",muted:"color-mix(in srgb, var(--overlay-fg) 76%, transparent)"},Jh=Object.freeze(uF(pF));var Ts=-1,mF="sf-section-accent",eI="Color",oI=new Set(["CategoryBar","DocTabs"]),kK=new Set(["Flex"]),xF=0;function Pt(e){return e===Ts?null:typeof e=="number"&&Number.isInteger(e)&&e>=0?e:xF}function hf(e){return e??Ts}function hF(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:r}of xf)t[`--sf-sec-${r}`]=`var(${o}-${r}, var(--theme-${r}))`;return t}function vK(e){let o=Pt(e.sectionAccent);return o===null?null:{className:mF,style:hF(o)}}var kF="Follow the page",HK="Follow the slideshow",vF=e=>l("Editing {name} changes it everywhere.",{name:e});function TF({colors:e}){if(!e)return De("span",{className:"sf-secttheme-chip sf-secttheme-chip--none","aria-hidden":"true"});let o=zo(e);return tr("span",{className:"sf-secttheme-chip","aria-hidden":"true",children:[De("i",{style:{background:o.background}}),De("i",{className:"sf-secttheme-chip-accent",style:{background:o.accent}})]})}function PF({themes:e,value:o,onPick:t,onEdit:r,menuId:a,followLabel:n}){return tr("div",{className:"sf-multi-menu sf-secttheme-menu",id:a,role:"listbox",children:[n!==void 0&&tr(IF,{children:[tr("button",{type:"button",role:"option","aria-selected":o===null,className:`sf-secttheme-item${o===null?" is-active":""}`,onClick:()=>t(Ts),children:[De(TF,{}),De("span",{className:"sf-secttheme-name",children:l(n)})]}),De("div",{className:"sf-secttheme-sep",role:"presentation"})]}),o!==null&&e[o]&&De("p",{className:"sf-secttheme-oncard",role:"presentation",children:l("{name} is on this section",{name:Ea(o)})}),e.map((s,i)=>i===o?null:De(os,{role:"option",index:i,colors:s,selected:!1,onPick:()=>t(i),onEdit:()=>r(i)},i))]})}function EF({index:e,colors:o,onChange:t,onDone:r}){let a=Ea(e),n=nI();return tr("div",{className:"sf-secttheme-sheet",children:[tr("div",{className:"sf-secttheme-sheet-head",children:[De("span",{children:a}),De(bF,{variant:"secondary",className:"sf-secttheme-done",onClick:r,children:l("Done")})]}),De("div",{className:"sf-secttheme-rows",children:De(Cc,{colors:o,onChange:t,idPrefix:n})}),De("p",{className:"sf-secttheme-warn",children:vF(a)})]})}function sI({value:e,onChange:o,followLabel:t,hint:r}){let{theme:a,setTheme:n}=oe(),s=Ge(a),i=gF(wF),c=i?.tokenRef,d=i?.siteId??null,m=!i?.capabilities?.hasSiteTheme,{persist:x,flush:u}=_r({themeFromDocument:m,tokenRef:c,siteId:d}),h=Ge(s),g=h.themes,k=Pt(e),P=k!==null?g[k]:void 0,O=P??(g.length?vr(h):void 0),[w,I]=aI(!1),[b,v]=aI(null),S=rI(null),E=rI(null),A=nI(),N=tI(()=>{I(!1),v(null)},[]),z=tI(()=>{!w&&b===null||(u(),N())},[w,b,N,u]);SF(S,z);let _=R=>{o(R),N()},T=R=>{if(b===null)return;let F=g.map((U,Y)=>Y===b?R:U),M={...h,themes:F};n(M),x({selected_preset:M.selected,theme_presets:M.themes})};return tr("div",{className:"sf-secttheme",ref:S,children:[De(CF,{label:l("Theme"),icon:De(yF,{}),labelId:`${A}-label`,hint:r,children:De(Ix,{colors:O,onEdit:k!==null?()=>{v(k),I(!1)}:void 0,name:P?Ea(k):l(t??kF),nameId:`${A}-value`,labelId:`${A}-label`,open:w,menuId:A,buttonRef:E,onClick:()=>{v(null),I(R=>!R)},onKeyDown:R=>{R.key==="Escape"&&(w||b!==null)&&(R.preventDefault(),N())}})}),w&&b===null&&De("div",{onKeyDown:R=>{R.key==="Escape"&&(R.preventDefault(),N(),E.current?.focus())},children:De(PF,{themes:g,value:k,onPick:_,onEdit:R=>{v(R),I(!1)},menuId:A,followLabel:t})}),b!==null&&g[b]&&De(EF,{index:b,colors:g[b],onChange:T,onDone:()=>{u(),N(),E.current?.focus()}})]})}import{jsx as lI}from"react/jsx-runtime";import{useId as OF}from"react";import{FieldSelect as FF}from"efficient-easel/fields";import{SettingsField as LF}from"efficient-easel/panel";function AF(e){return e.map(({value:o,label:t,group:r,thumb:a,meta:n})=>({value:o,label:t,...r!==void 0?{group:r}:{},...a!==void 0?{thumb:a}:{},...n!==void 0?{meta:n}:{}}))}function qK({label:e,options:o,fallback:t,value:r,onChange:a,placeholder:n,bare:s=!1,icon:i}){let c=OF(),d=`${c}-label`,m=`${c}-button`,x=r??"",u=o.some(P=>P.value===x)?x:t,h=l(e),g=n===void 0?void 0:l(n),k=lI(FF,{id:m,value:u,options:AF(o),onChange:a,placeholder:g,searchPlaceholder:g,...s?{ariaLabel:h}:{ariaLabelledBy:`${d} ${m}`},searchable:!0,groupCount:!0,inline:!0});return s?k:lI(LF,{label:h,labelId:d,icon:i,children:k})}import{jsx as ar,jsxs as cL}from"react/jsx-runtime";import{SettingsField as AI}from"efficient-easel/panel";import{LinkIcon as fL}from"efficient-easel/icons";import{LinkPicker as dL,TextLinkField as uL}from"efficient-shell/ui";import{useEffect as LI,useMemo as Fs,useRef as pL,useState as Os}from"react";import{currentEaselSession as RF}from"efficient-easel/screen/lib/session";function iI(){return RF().auth.token}import{currentEaselSession as mL}from"efficient-easel/screen/lib/session";import{useScreenDocument as xL}from"efficient-easel/screen/components/ScreenDocumentContext";var BF=()=>({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 cI(e,o,t){if(!e)return"page";if(ah(e))return"popup";if(e.startsWith("/journal/"))return"blog";if(lh(e))return"product";if(e.includes("#")){let r=e.slice(0,e.indexOf("#"));if(r===""||r==="/"||o.includes(r))return"anchor"}return e==="/"||o.includes(e)||t&&t.listingPaths.includes(t.targetOf(e))?"page":"custom"}function If(e,o){let t=BF(),r=e.pages.map(m=>({value:Aa(m.slug),label:m.title})),a=o?.pageOptions?o.pageOptions(r):r,n=a.map(m=>m.value),s=e.pages.map(m=>({label:m.title,options:sh(...m.docs).map(x=>({value:ps(m.slug,x.slug),label:x.name}))})).filter(m=>m.options.length>0),i=m=>{switch(m){case"page":return{type:"select",options:a,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:nh(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:rh(x.slug),label:x.title||x.slug})),placeholder:t.choosePopup};case"custom":return{type:"text"}}},c=th(e.offers).map(m=>({value:m.value,label:l(m.label),target:i(m.value),...m.value==="anchor"?{hint:t.sectionHint}:{},...m.value==="blog"||m.value==="product"||m.value==="popup"?{hideWhenEmpty:!0}:{}}));if(!o)return{kinds:c,rules:{kindOf:m=>cI(m,n),targetOf:m=>m,readFilter:()=>null,withFilter:m=>m}};let d=m=>{let x=o.withFilter(m,null);return o.listingPaths.includes(x)?x:m};return{kinds:c,rules:{kindOf:m=>cI(m,n,{listingPaths:o.listingPaths,targetOf:d}),targetOf:d,readFilter:o.readFilter,withFilter:o.withFilter},filtersFor:m=>o.listingPaths.includes(m)?o.filtersFor(m):null}}import{useEaselSession as hL}from"efficient-easel/screen/lib/session-context";var $=e=>typeof e=="number"&&Number.isFinite(e)?e:void 0;function Ue(e,o){if(typeof e=="string")return e||o;if(e&&typeof e=="object"&&"text"in e){let t=e.text;return pe(t)??o}return o}function fI(e,o){return $(e)??o}function Et(e,o){return typeof e=="boolean"?e:o}function Ps(e,o){if(!Array.isArray(e))return o;let t=e.map(r=>typeof r=="string"?r:Ue(r?.text,"")).map(r=>r.trim()).filter(Boolean);return t.length?t:o}var uI=["delay","scroll","exit"],pI=["all","chosen","except"],mI=["visit","days","never","once"],_F=["all","desktop","phone"],DF=["stop","continue"],xI={min:0,max:60},hI={min:10,max:90},II={min:1,max:90},To={autoOpen:!1,trigger:"delay",autoOpenDelaySec:15,scrollPercent:50,showOn:"all",showOnPages:[],devices:"all",hideAfter:"days",hideDays:7,afterSubmit:"stop",startDate:null,endDate:null};function vo(e,o,t){return typeof o=="string"&&e.includes(o)?o:t}function Dr(e,o,t){let r=fI(e,t);return Math.min(o.max,Math.max(o.min,Math.round(r)))}function NF(e){return typeof e.hideAfter=="string"?vo(mI,e.hideAfter,To.hideAfter):e.oncePerSession===!0?"visit":e.oncePerSession===!1?"never":To.hideAfter}function MF(e){return Array.isArray(e)?e.map(o=>typeof o=="string"?o.trim():"").filter(Boolean).map(o=>o.startsWith("/")?o:`/${o}`):[]}function dI(e){if(typeof e!="string")return null;let o=e.trim();return/^\d{4}-\d{2}-\d{2}$/.test(o)?o:null}function gI(e){let o=e??{},t=To;return{autoOpen:Et(o.autoOpen,t.autoOpen),trigger:vo(uI,o.trigger,t.trigger),autoOpenDelaySec:Dr(o.autoOpenDelaySec,xI,t.autoOpenDelaySec),scrollPercent:Dr(o.scrollPercent,hI,t.scrollPercent),showOn:vo(pI,o.showOn,t.showOn),showOnPages:MF(o.showOnPages),devices:vo(_F,o.devices,t.devices),hideAfter:NF(o),hideDays:Dr(o.hideDays,II,t.hideDays),afterSubmit:vo(DF,o.afterSubmit,t.afterSubmit),startDate:dI(o.startDate),endDate:dI(o.endDate)}}import{parseHexColor as HF}from"efficient-shell/format";var Nr="#000000";var gf="popup",zF=Lr,WF=["auto","full"],GF=["inside","outside","none"],UF={min:240,max:1440},$F={min:0,max:100},Da={placement:"center",fullWidth:!1,width:720,height:"auto",tintColor:Nr,tintOpacity:60,outsideClick:!0,closeButton:"inside"};function jF(e,o){let t=typeof e=="string"?e.trim():"";return t&&HF(t)===t.toLowerCase()?t:o}function yI(e,o=Da){let t=e??{},r=o;return{placement:vo(zF,t.placement,r.placement),fullWidth:Et(t.fullWidth,r.fullWidth),width:Dr(t.width,UF,r.width),height:vo(WF,t.height,r.height),tintColor:jF(t.tintColor,r.tintColor),tintOpacity:Dr(t.tintOpacity,$F,r.tintOpacity),outsideClick:Et(t.outsideClick,r.outsideClick),closeButton:vo(GF,t.closeButton,r.closeButton)}}var bI="cart-drawer",mV="cart-drawer",qF={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 xV(e,o){return o===0?e.subtitleEmpty:o===1?e.subtitleOne:e.subtitleMany.replace("{count}",String(o))}function hV(e){let o=e??{},t=qF;return{kickerBadge:Ue(o.kickerBadge,t.kickerBadge),kickerText:Ue(o.kickerText,t.kickerText),titleLead:Ue(o.titleLead,t.titleLead),titleAccent:Ue(o.titleAccent,t.titleAccent),subtitleEmpty:Ue(o.subtitleEmpty,t.subtitleEmpty),subtitleOne:Ue(o.subtitleOne,t.subtitleOne),subtitleMany:Ue(o.subtitleMany,t.subtitleMany),leadTimeValue:Ue(o.leadTimeValue,t.leadTimeValue),shipsToFallback:Ue(o.shipsToFallback,t.shipsToFallback),promises:Ps(o.promises,t.promises),emptyKicker:Ue(o.emptyKicker,t.emptyKicker),emptyBody:Ue(o.emptyBody,t.emptyBody)}}var IV={...Da,width:520,tintOpacity:68};var CI="consent-banner",SV="consent-banner";var KF=[{value:"bar",label:"Bar"},{value:"card",label:"Card"}],CV="Layout",SI={layout:"bar"},VF=e=>KF.some(o=>o.value===e);function wV(e){let o=Ue((e??{}).layout,SI.layout);return{layout:VF(o)?o:SI.layout}}var kV={...Da,placement:"bottom-center",fullWidth:!0,width:440,tintOpacity:0,outsideClick:!1,closeButton:"none"};var YF="consentWords",XF=["eyebrow","notice","accept","reject","choose"];function yf(e){let o=(e??{})[YF];return typeof o=="string"&&XF.includes(o)?o:null}function bf(e){let o=e?.props;return o?yf(o)!==null?!0:Object.values(o).some(t=>Array.isArray(t)&&t.some(r=>r&&typeof r=="object"&&"props"in r&&bf(r))):!1}var ZF=["meta","eyebrow","heading","body","statName","statValue","formEyebrow","formHeading","formIntro","fieldLabel","option","finePrint","dismiss","doneHeading","doneBody"],PV={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"},QF={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"},EV={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 wI(e){let o={};for(let t of ZF){let r=Jo(e[QF[t]]);r&&(o[t]=r)}return o}var kI={heading:"Join our email list",placeholder:"Email address",buttonLabel:"Subscribe"},JF={lead:"We accept"},vI={...JF,methods:[],size:"sm",align:"start",dataSource:"shop-payment-methods"},Mr="site-footer";var FV=Mr,LV={desktop:!0,tablet:!0,mobile:!0},AV={desktop:!1,tablet:!1,mobile:!1},Sf=1,TI=6,RV=Array.from({length:TI-Sf+1},(e,o)=>Sf+o),Es={desktop:6,tablet:3,mobile:2},eL={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}},rr=e=>Math.min(Math.max(Math.round(e),Sf),TI);function BV(e){if(typeof e=="number")return eL[rr(e)]??{desktop:rr(e),tablet:rr(e),mobile:rr(e)};if(e&&typeof e=="object"){let o=e;return{desktop:rr(o.desktop??Es.desktop),tablet:rr(o.tablet??Es.tablet),mobile:rr(o.mobile??Es.mobile)}}return{...Es}}var Cf="subscribe-popup",GV="subscribe-popup",oL=[Cf,Mr,bI,CI];function EI(e){return oL.includes(e)}var tL=["right","left"],rL={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:To.autoOpen,autoOpenDelaySec:To.autoOpenDelaySec,formSlug:"",trigger:To.trigger,scrollPercent:To.scrollPercent,showOn:To.showOn,showOnPages:[],hideAfter:To.hideAfter,hideDays:To.hideDays,formSide:"right",valuePanelOnPhone:!1,sectionAccent:void 0,sectionCorners:void 0,sectionCornerSides:void 0,textStyles:{}},Pe=Ue,aL=Et,OI=Ps;function PI(e,o){if(e==null)return o;let t=r=>r.trim()?r:"";if(typeof e=="string")return t(e);if(typeof e=="object"&&"text"in e){let r=e.text;return typeof r=="string"?t(r):""}return o}function nL(e,o){return Array.isArray(e)?OI(e,[]):o}function sL(e,o){return Array.isArray(e)?e.map(t=>{let r=t??{};return{label:Pe(r.label,""),value:Pe(r.value,"")}}).filter(t=>t.label||t.value):o}function $V(e){let o=e??{},t=rL,r=gI(o);return{metaLabel:Pe(o.metaLabel,t.metaLabel),issueLabel:PI(o.issueLabel,t.issueLabel),issueNumber:PI(o.issueNumber,t.issueNumber),kicker:Pe(o.kicker,t.kicker),heading:Pe(o.heading,t.heading),deck:Pe(o.deck,t.deck),stats:sL(o.stats,t.stats),formLabel:Pe(o.formLabel,t.formLabel),formHeading:Pe(o.formHeading,t.formHeading),formIntro:Pe(o.formIntro,t.formIntro),firstNameLabel:Pe(o.firstNameLabel,t.firstNameLabel),firstNamePlaceholder:Pe(o.firstNamePlaceholder,t.firstNamePlaceholder),emailLabel:Pe(o.emailLabel,t.emailLabel),emailPlaceholder:Pe(o.emailPlaceholder,t.emailPlaceholder),interestsLabel:Pe(o.interestsLabel,t.interestsLabel),interests:OI(o.interests,t.interests),frequencyLabel:Pe(o.frequencyLabel,t.frequencyLabel),frequencies:nL(o.frequencies,t.frequencies),submitText:Pe(o.submitText,t.submitText),finePrint:Pe(o.finePrint,t.finePrint),dismissText:Pe(o.dismissText,t.dismissText),emailInvalidText:Pe(o.emailInvalidText,t.emailInvalidText),submitErrorText:Pe(o.submitErrorText,t.submitErrorText),successHeading:Pe(o.successHeading,t.successHeading),successBody:Pe(o.successBody,t.successBody),keepBrowsingText:Pe(o.keepBrowsingText,t.keepBrowsingText),formSlug:typeof o.formSlug=="string"?o.formSlug.trim():t.formSlug,autoOpen:r.autoOpen,autoOpenDelaySec:r.autoOpenDelaySec,trigger:r.trigger,scrollPercent:r.scrollPercent,showOn:r.showOn,showOnPages:r.showOnPages,hideAfter:r.hideAfter,hideDays:r.hideDays,formSide:vo(tL,o.formSide,t.formSide),valuePanelOnPhone:aL(o.valuePanelOnPhone,t.valuePanelOnPhone),sectionAccent:o.sectionAccent,sectionCorners:o.sectionCorners,sectionCornerSides:o.sectionCornerSides,textStyles:wI(o)}}function lL(e,o=Math.random){for(;;){let t=`popup-${Math.floor(o()*2176782336).toString(36).padStart(6,"0")}`;if(!e.has(t))return t}}function iL(e){return{root:{props:{title:e,kind:gf}},content:[],zones:{}}}function FI(e,o,t){return{slug:lL(o,t),title:e,kind:"lightbox",layout:iL(e)}}function wf(e){return e?.root?.props?.kind===gf}function RI(e){let o=new Map;return(t="")=>{let r=iI(),a=o.get(t);if(!a||a.token===null&&r!==null){let n=r||!mL().usesBridgedToken?e(r??"",t).catch(()=>[]):Promise.resolve([]);return o.set(t,{promise:n,token:r}),n}return a.promise}}var IL=RI(async(e,o)=>{let t=o?{siteId:o}:void 0,{pages:r}=He();return r.linkTargets?r.linkTargets(t):(await r.list(t)).map(a=>({id:a.id,slug:a.slug,label:a.label,layout:null}))}),gL=RI(async(e,o)=>await He().blog?.posts(o?{siteId:o}:void 0)??[]);function yL({value:e,onChange:o,label:t="Link",data:r,filters:a}){let n=Fs(()=>If(r,a),[r,a]),s=l(t);return ar(AI,{label:s,icon:ar(fL,{}),children:ar(dL,{value:e,onChange:i=>o(i),kinds:n.kinds,rules:n.rules,filtersFor:n.filtersFor,label:s})})}function BI(){let{siteId:e,capabilities:o}=xL(),{offersCommerce:t,hasBlog:r}=o,[a,n]=Os([]),[s,i]=Os([]),[c,d]=Os([]),[m,x]=Os(null),u=hL().chrome,h=u?.products?.list,g=u?.linkFilters,k=g?void 0:u?.linkRow,P=pL(!0);LI(()=>(P.current=!0,()=>{P.current=!1}),[]),LI(()=>{let I=!0;return IL(e??void 0).then(b=>I&&P.current&&n(b)),r&&gL(e??void 0).then(b=>I&&P.current&&i(b)),t&&h?.().then(b=>I&&P.current&&d(b)),t&&g?g.load(e).catch(()=>null).then(b=>I&&P.current&&x(()=>b)):x(null),()=>{I=!1}},[e,t,r,h,g]);let O=Fs(()=>({pages:a.filter(I=>!EI(I.slug)&&!wf(I.layout)).map(I=>({slug:I.slug,title:I.label,docs:[I.layout]})),popups:a.filter(I=>I.slug===Cf||wf(I.layout)).map(I=>({slug:I.slug,title:I.label})),posts:r?s.map(I=>({slug:I.slug,title:I.title})):[],products:t?c.map(I=>({href:I.href,name:I.name})):[],offers:{offersCommerce:t,offersService:r}}),[a,s,c,t,r]),w=Fs(()=>m?m(O.pages):null,[m,O]);return{data:O,filters:w,pages:a,offersCommerce:t,HostLinkRow:k}}function cY({label:e,icon:o,text:t,onTextChange:r,link:a,onLinkChange:n}){let{data:s,filters:i}=BI(),c=Fs(()=>If(s,i),[s,i]),d=l(e);return ar(AI,{label:d,icon:o,children:ar(uL,{label:d,text:t,onTextChange:r,link:a,onLinkChange:m=>n(m),kinds:c.kinds,rules:c.rules,filtersFor:c.filtersFor})})}function _I({value:e,onChange:o,label:t="Link"}){let r=typeof e=="string"?e:"",{data:a,filters:n,pages:s,offersCommerce:i,HostLinkRow:c}=BI(),d=a.pages.map(x=>Aa(x.slug)),m=i&&c&&(r==="/"||d.includes(r))?c:void 0;return cL("div",{children:[ar(yL,{value:r,onChange:o,label:t,data:a,filters:n}),m&&ar(m,{value:r,onChange:o,pages:s})]})}import{UiIcon as Fg}from"efficient-easel/draw/client";import{phoneKey as PL,tabletKey as EL}from"efficient-easel/draw";import{AUTO_RULES as bL,FOLLOW_RULES as SL,VIEW_DESKTOP_MIN as CL,VIEW_TABLET_MIN as DI,isAuto as wL,resolveViewValue as kL}from"efficient-easel/draw";var vL="v1";function TL(){return vL==="v2"?bL:SL}var NI=.02,uY=`(min-width: ${DI}px) and (max-width: ${CL-NI}px)`,Ls=`(max-width: ${DI-NI}px)`;function MI(e,o,t,r,a=TL()){let n=kL(e,o,t,r,a),s={},i=(c,d)=>!wL(c)||d!=null&&d!==o;return i(t,n.tablet)&&(s.tablet=n.tablet),i(r,n.phone)&&(s.phone=n.phone),s}var Po={min:10,max:200,step:10};function OL(e,o){let t=$(e),r=$(o);if(!(t===void 0&&r===void 0))return{paddingTop:t,paddingBottom:r}}var FL="sf-pad-top-phone",LL="sf-pad-bottom-phone",AL="--sf-pad-t-phone",RL="--sf-pad-b-phone",BL="sf-pad-left-phone",_L="sf-pad-right-phone",DL="--sf-pad-l-phone",NL="--sf-pad-r-phone",ML="sf-pad-top-tablet",HL="sf-pad-bottom-tablet",zL="sf-pad-left-tablet",WL="sf-pad-right-tablet",GL="--sf-pad-t-tablet",UL="--sf-pad-b-tablet",$L="--sf-pad-l-tablet",jL="--sf-pad-r-tablet";function As(e){let o=OL(e.top,e.bottom),t=kf({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 qL=[["top","paddingTop",[ML,GL],[FL,AL]],["bottom","paddingBottom",[HL,UL],[LL,RL]],["left","paddingLeft",[zL,$L],[BL,DL]],["right","paddingRight",[WL,jL],[_L,NL]]];function kf(e,o,t={},r=e){let a={},n={},s=[];for(let[i,c,...d]of qL){let m=$(e[i]);m!==void 0&&(a[c]=m);let x=MI("spacing",$(r[i]),$(t[i]),$(o[i]));for(let[u,[h,g]]of[["tablet",d[0]],["phone",d[1]]]){let k=x[u];typeof k=="number"&&(s.push(h),n[g]=`${k}px`)}}return{classes:s,style:{...a,...n}}}function HI(e,o,t){let r=$(e)??t,a=$(o);return r===void 0?a:a===void 0?r:r+a}function Rs(e,o={}){return{top:HI(e.padTop,e.sectionPaddingTop,o.top),bottom:HI(e.padBottom,e.sectionPaddingBottom,o.bottom)}}var vf={top:"sectionPaddingTop",bottom:"sectionPaddingBottom",left:"sectionPaddingLeft",right:"sectionPaddingRight"};function zI(e,o=vf,t=!0){let r={};for(let a of t?["top","bottom","left","right"]:["top","bottom"])r[a]=e[o[a]],r[`${a}Tablet`]=e[EL(o[a])],r[`${a}Phone`]=e[PL(o[a])];return r}function IY(e){return As(e)}function gY(e,o){let t=r=>typeof r=="number"?r+o:void 0;return As({...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)})}import{BUTTON_PAD_KEYS as Bs,buttonBorderOf as KL,buttonFillOpacityOf as VL,buttonPadSidesOf as YL}from"efficient-easel/draw";var XL="px-6 py-4",ZL=4,_s=e=>{let o=new RegExp(`\\bp${e}-(?:\\[(\\d+)px\\]|(\\d+))`).exec(XL);if(!o)throw new Error(`BUTTON_PAD_CLASSES has no p${e}`);return o[1]!==void 0?Number(o[1]):Number(o[2])*ZL},vY={top:_s("y"),right:_s("x"),bottom:_s("y"),left:_s("x")},GI="var(--btn)";function QL(e){let o=e.variant==="ghost",t=VL(e.buttonFillOpacity),r=KL(e.buttonBorder),a=pe(e.buttonColor);return{fillOpacity:t??(o?0:100),border:{width:r?.width??1,color:r?.color??a??(o?"currentColor":GI)},changed:t!==void 0||r!==void 0}}function TY(e){let o=QL(e);if(!o.changed)return null;let t=pe(e.buttonColor)??GI;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}}var JL="var(--sf-button-radius, 0)";function PY(e){let o=$(e.buttonCorners),t=Go(e.buttonCornerSides);if(o===void 0&&t===null)return null;let r=o===void 0?JL:`${Math.max(0,o)}px`;return{borderRadius:t===null?r:Vt(r,t)}}function EY(e){let o=a=>YL({top:e[`${Bs.top}${a}`],right:e[`${Bs.right}${a}`],bottom:e[`${Bs.bottom}${a}`],left:e[`${Bs.left}${a}`]})??{},{classes:t,style:r}=kf(o(""),o("Phone"));return Object.keys(r).length?{className:t.join(" "),style:r}:null}var WI="upper";function UI(e,o,t){let r=e&&typeof e=="object"?e:{},a=pe(r.textStyle),n=a?pe(o?.find(m=>m?.id===a)?.name):void 0,s=a?/^(heading|body)-(\d+)$/.exec(a):null,i=a?n||(s?t.styleName({kind:s[1],n:Number(s[2])}):a):t.noStyle,{cases:c}=t,d=pe(r.case)??WI;return`${i} \xB7 ${c[d]??c[WI]}`}import{usePreviewParts as VR}from"efficient-easel/draw/client";import{encodePartId as YR}from"efficient-easel/draw";import{DEFAULT_EASEL_STRINGS as XR,useEaselStrings as ZR}from"efficient-easel/strings";var eA=["auto","fixed","screen"],oA=["px","%"];var tA="var(--sf-header-h, 88px)",Tf={min:40,max:2e3,step:10,fallback:600},Pf={min:10,max:200,step:5,fallback:100},rA="sf-section-minh",$I={base:"--sf-section-minh",small:"--sf-section-minh-s"},qI=e=>typeof e=="string"&&eA.includes(e),aA=e=>typeof e=="string"&&oA.includes(e);function Ds(e){let o=qI(e.sectionHeightMode)?e.sectionHeightMode:"auto",t=o==="screen"?"%":aA(e.sectionHeightUnit)?e.sectionHeightUnit:"px",r=o==="screen"?Pf.fallback:Tf.fallback,a=typeof e.sectionHeightValue=="number"?e.sectionHeightValue:r;return{mode:o,value:a,unit:t}}function KI(e){let{mode:o,value:t,unit:r}=Ds(e);if(o==="auto")return;if(o==="fixed"&&r==="px")return[`${t}px`,null];let a=t/100,n=s=>o==="screen"?`(100${s} - ${tA})`:`100${s}`;return[`calc(${n("vh")} * ${a})`,`calc(${n("svh")} * ${a})`]}function VI(e){let o=KI(e);if(!o)return;let[t,r]=o;return{display:"grid",[$I.base]:t,...r?{[$I.small]:r}:{}}}var FY=new Set(["Hero","HeroSingle","IntroBleed","CategoryBar","DocTabs"]),Hr="Height",nA="sf-section-minh-phone",jI={base:"--sf-section-minh-p",small:"--sf-section-minh-ps"};function Ef(e){return qI(e.sectionHeightModePhone)}function LY(e){return Ds({sectionHeightMode:e.sectionHeightModePhone,sectionHeightValue:e.sectionHeightValuePhone,sectionHeightUnit:e.sectionHeightUnitPhone})}function sA(e){let o=VI(e),t=Ef(e)?KI({sectionHeightMode:e.sectionHeightModePhone,sectionHeightValue:e.sectionHeightValuePhone,sectionHeightUnit:e.sectionHeightUnitPhone})??(o?["auto",null]:void 0):void 0;if(!o&&!t)return null;let r=[rA],a={...o??{}};return t&&(r.push(nA),a[jI.base]=t[0],t[1]&&(a[jI.small]=t[1])),{className:r.join(" "),style:a}}function lA(e){return sA(e)!==null}var iA="grid",AY="h-full",cA="max-[720px]:grid";function YI(e){return lA(e)?VI(e)?iA:cA:""}var Ns="Stick to top",Ot={min:0,max:200,step:4,fallback:0},fA="sf-section-stick",dA="sf-section-stick-phone-on",uA="sf-section-stick-phone-off",XI={desktop:"--sf-stick-distance",phone:"--sf-stick-distance-phone"},_Y=new Set(["CategoryBar","DocTabs","IntroBleed"]);function ZI(e){let o=$(e)??Ot.fallback;return Math.min(Ot.max,Math.max(Ot.min,Math.round(o)))}function Of(e){return typeof e.stickTopPhone=="boolean"}function Ff(e){let o=e.stickTop===!0,t=ZI(e.stickTopDistance),r=Of(e),a=r?e.stickTopPhone===!0:o,n=r?ZI(e.stickTopDistancePhone):t;return{desktop:o,desktopDistance:t,phone:a,phoneDistance:n,ownPhone:r}}function DY(e){let o=Ff(e);if(!o.desktop&&!o.phone)return null;let t=[fA],r={};return o.desktop&&(r[XI.desktop]=`${o.desktopDistance}px`),(o.ownPhone||o.phone!==o.desktop)&&(t.push(o.phone?dA:uA),o.phone&&(r[XI.phone]=`${o.phoneDistance}px`)),o.desktop||t.push("sf-section-stick-desktop-off"),{className:t.join(" "),style:r}}var pA=["column","row","tabs"];var mA={column:"Stacked",row:"One row",tabs:"Tabs"},QI={Flex:pA,HeroGroup:["column","row"]},xA={Flex:"row",HeroGroup:"column"},hA={column:"flex-col",row:"flex-row",tabs:"flex-col"};function Ms(e,o){return QI[e].includes(o)?o:xA[e]}function MY(e,o){return hA[Ms(e,o)]}function JI(e){return QI[e].map(o=>({label:mA[o],value:o}))}var Na={sectionPaddingTop:0,sectionPaddingBottom:0},eg={start:"justify-start",center:"justify-center",between:"justify-between",end:"justify-end"},og={start:"items-start",center:"items-center",end:"items-end",stretch:"items-stretch"};function zY(e,o){let t=typeof e=="string"&&e in eg?eg[e]:"",r=typeof o=="string"&&o in og?og[o]:"";return[t,r].filter(Boolean).join(" ")}function WY(e){return e===!0||e==="wrap"?"flex-wrap":""}var Hs="Block widths",Lf=[{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]},{label:"2 : 3",value:"twoThree",weights:[2,3]}],zr="[&>*]:min-w-0 [&>*]:flex-1 [&>*]:basis-0",IA={equal:zr,bigLeft:`${zr} [&>*:first-child]:min-[800px]:grow-[2]`,bigRight:`${zr} [&>*:last-child]:min-[800px]:grow-[2]`,biggerLeft:`${zr} [&>*:first-child]:min-[800px]:grow-[3]`,biggerRight:`${zr} [&>*:last-child]:min-[800px]:grow-[3]`,twoThree:`${zr} [&>*:first-child]:min-[800px]:grow-[2] [&>*:last-child]:min-[800px]:grow-[3]`};function gA(e){return typeof e=="string"?IA[e]??"":""}var yA="[&>*]:min-[800px]:basis-[content]";function GY(e){return gA(e)===""?yA:""}var tg="Columns",Af=1,rg=3,ag={2:"max-[800px]:flex-wrap [&>*]:max-[800px]:min-w-0 [&>*]:max-[800px]:basis-[calc((100%_-_var(--sf-gap-len-phone,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-phone,var(--sf-gap-len,0px))_*_2)/3)]"},ng=Lf.filter(e=>e.value==="content"||e.value==="equal"),sg="equal",bA="max-[800px]:flex-wrap [&>*]:max-[800px]:min-w-0 [&>*]:max-[800px]:grow-0 [&>*]:max-[800px]:basis-[content]";function UY(e,o){let t=ag[Number(e)];return t?SA(e,o)?bA:t:"max-[800px]:flex-col"}function SA(e,o){return Number(e)in ag&&o==="content"}var lg="Block spacing",Rf=[{label:"Each block",value:"each"},{label:"Gap only",value:"gap"}],CA="sf-box-gap-only";function $Y(e){return e==="gap"?CA:""}var wA=["solid","dashed","dotted"],kA=["top","right","bottom","left"],qY="sf-section-border",KY="sf-section-border-self",vA=/^#(?:[0-9a-f]{3}|[0-9a-f]{4}|[0-9a-f]{6}|[0-9a-f]{8})$/i,ig=e=>typeof e=="number"&&Number.isFinite(e)?`${Math.min(20,Math.max(0,Math.round(e)))}px`:void 0;function cg(e,{phone:o=!1}={}){if(!e||typeof e!="object")return;let t=o?"-phone":"",r={};for(let a of kA){let n=ig(e[a])??ig(e.width);n!==void 0&&(r[`--sf-border-${a}-width${t}`]=n)}return typeof e.style=="string"&&wA.includes(e.style)&&(r[`--sf-border-style${t}`]=e.style),typeof e.color=="string"&&vA.test(e.color)&&(r[`--sf-border-color${t}`]=e.color.toLowerCase()),Object.keys(r).length?r:void 0}function VY(e,o){let t=cg(e),r=cg(o,{phone:!0});return t||r?{...t,...r}:void 0}var Bf="sf.gapContainer",tt={min:-32,max:64,step:2},ug={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},Wr={Grid:24,Flex:24,FooterGroup:16,HeroGroup:0,Events:24,GalleryB:8,ProductGrid:2},TA=new Set(["Events","GalleryB"]);function Gr(e,o,t){if(typeof o=="number"&&Number.isFinite(o)&&o>=tt.min)return o;if(typeof o=="string"){let r=ug[e]?.[o];if(typeof r=="number")return r}return typeof t=="number"&&Number.isFinite(t)?t:Wr[e]}var PA="sf-gap-overlap",EA="--sf-gap-overlap",pg="--sf-block-gap",OA="--sf-block-gap-rem",nr={min:0,max:tt.max,step:tt.step};function FA(e){if(typeof e!="number"||!Number.isFinite(e))return null;let o=Math.min(Math.max(Math.round(e),nr.min),nr.max);return o-o%nr.step}function XY(e){let o=FA(e);return o===null?{}:{[pg]:`${o}px`,[OA]:`${o/16}rem`}}var fg="sf-gap-zone",dg="--sf-gap-len";function _f(e,o){return typeof o=="number"&&Number.isFinite(o)&&o>=tt.min?!0:typeof o=="string"&&typeof ug[e]?.[o]=="number"}var LA="--sf-gap-len-phone",Df={min:0,max:tt.max,step:tt.step};function zs(e){return typeof e=="number"&&Number.isFinite(e)&&e>=Df.min}function Nf(e,o,t,r){return zs(o)?o:Gr(e,t,r)/2}var AA={block:"sf-gap-overlap-block",inline:"sf-gap-overlap-inline",both:"sf-gap-overlap-both"};function ZY(e,o,t,r){let a=zs(r)?{[LA]:`${r}px`}:{};if(!_f(e,o)){let s=`${Wr[e]}px`,i=TA.has(e)?`var(--sf-card-gap, ${s})`:s;return{className:` ${fg}`,style:{[dg]:`var(${pg}, ${i})`,...a}}}let n=Gr(e,o);return n>=0?{className:` ${fg}`,style:{[dg]:`${n}px`,...a}}:{className:` ${PA} ${AA[t]}`,style:{gap:"0px",[EA]:`${-n/2}px`}}}var mg=["transparent","var(--section-bg)","var(--surface)","var(--surface-2)"],xg={transparent:"No fill","var(--section-bg)":"Section band","var(--surface)":"Panels and cards","var(--surface-2)":"Second surface"},Ws="var(--section-bg)",Gs="inherit";function JY(e,o){return e===Gs?Ws:e===void 0?o:Us(e)}var RA=/var\(\s*--(surface-2|surface|line)\s*(?=[,)])/g;function Us(e){return e.replace(RA,"var(--site-$1")}function hg(e,o){return e===Gs?!0:e===void 0&&o===Ws}var Ig=["transparent","var(--wheel-stage)","var(--surface)","var(--surface-2)"],gg={transparent:"No fill","var(--wheel-stage)":"Image stage","var(--surface)":"Panels and cards","var(--surface-2)":"Second surface"},Ur="var(--wheel-stage)",$s="transparent",Ma="inherit";function tX(e,o){return Us(Mf(e,o))}function Mf(e,o){return e===Ma?Ur:e==null?o:e===!0?Ur:e===!1?$s:e}function rX(e){return typeof e=="string"&&e!==Ma?Us(e):Ur}function aX(e){return e!==$s&&e!=="none"&&e!==""}function yg(e,o){return e===Ma||e===!0?!0:e==null?o===Ur:!1}var bg="inherit",js="fixed",Sg=e=>typeof e!="number"&&e!==js,BA="var(--sf-heading-max, 9999px)";function sX(e,o,t,r){if(typeof e=="number")return`${e}px`;if(e===js)return o;let a=r?`var(--size-${r}, ${o})`:o;return t==="heading"?`min(${a}, ${BA})`:a}var _A=["page","full"],Cg=["full","page"],sr={full:"Full width",page:"Content width"},Hf="inherit",DA=e=>typeof e=="string"&&_A.includes(e),NA=e=>e===Hf;function MA(e,o){return NA(e.widthMode)?{mode:"full",inherited:!0}:DA(e.widthMode)?{mode:e.widthMode,inherited:!1}:{mode:o,inherited:o==="full"}}function iX(e){return MA(e,"page").mode==="full"}var HA={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",ContactCards:"contained",MessagingCards:"contained",OpeningHours:"contained",RateTable:"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 cX(e){return Object.prototype.hasOwnProperty.call(HA,e)}var wg="siteWidths",zA=e=>e==="full"||e==="content";function qs(e){return zA(e)?e:null}function kg(e,o){return{[wg]:{background:qs(e),content:qs(o)}}}function fX(e){let o=e.editor?.metadata?.[wg];return{background:qs(o?.background),content:qs(o?.content)}}import{jsx as WA}from"react/jsx-runtime";import{createContext as GA,useContext as mX}from"react";var UA=2,xX=UA+1,$A=GA(2);function vg({tier:e,children:o}){return WA($A.Provider,{value:e,children:o})}import{useEaselSession as QR}from"efficient-easel/screen/lib/session-context";import{BOX_GAP as JR,describedAs as Ft,group as Eo,iconOf as za,sharedStyleKinds as Wa}from"efficient-easel/screen/lib/document/box-fields";import{createElement as Tg}from"react";import{SettingsField as jA}from"efficient-easel/panel";import{boxFieldBuilders as qA,describedAs as KA,iconOf as VA}from"efficient-easel/screen/lib/document/box-fields";import{IconPicker as YA}from"efficient-shell/ui";var XA=e=>l(e),$e=qA(XA),rt=$e.slider,at=$e.select,Ks=$e.Segmented,Vs=$e.segmented,CX=$e.alignmentField,wX=$e.alignmentFields,kX=$e.blockAlignmentField,vX=$e.blockAlignmentFields,TX=$e.boxJustifyField,PX=$e.boxAlignField,EX=$e.boxWrapField,Pg=$e.directionField,zf=$e.gapField,OX=$e.placementField,FX=$e.PlacementGridView,LX=$e.positionFields,Ys=$e.sidesPaddingFields;function AX(e,o,t,r,a={}){let n=s=>t.some(i=>i.value===s);return{type:"custom",...KA({},{type:"radio",label:e,options:t.map(s=>s.label===void 0?{value:s.value}:{value:s.value,label:s.label})}),render:({value:s,onChange:i,field:c})=>{let d=t.map(u=>({value:u.value,...u.label===void 0?{}:{label:l(u.label)},icon:u.picture})),m=c?.currentValue,x=a.resolve?a.resolve(s)??r:n(s)?s:n(m)?m:r;return Tg(jA,{label:l(e),icon:VA(o)},Tg(YA,{label:l(e),value:x,options:d,onChange:i,emptyValue:a.emptyValue}))}}}import{TEXT_CONTROL_KINDS as dQ,SCALAR_TEXT_CONTROLS as uQ}from"efficient-easel/draw";function Kr(e,o){return l("{value} from {from}",{value:e,from:o})}function eB(){let{blockGap:e}=oe();return e===null?l("this container's own spacing"):Kr(`${e}px`,l("Styles"))}function oB({inherited:e,onReset:o,label:t}){return y(to,{words:X()?.panel,label:l(t),changed:!e,detail:eB(),onReset:o})}function tB(e){return zf({...JR,builtIn:Wr[e],resolve:(o,t)=>Gr(e,o,t?.siteGap),action:(o,t)=>y(oB,{inherited:!_f(e,o),onReset:()=>t(void 0),label:"Gap"}),mark:{[Bf]:e}})}function rB(e){return Fr(Ne("mobile",{[Bf]:e,type:"custom",render:o=>y(nB,{container:e,...o})}),aB)}var aB={not:{field:"gap",in:Array.from({length:-tt.min},(e,o)=>tt.min+o)}};function rQ(e){return{gap:Ne("desktop",tB(e)),[$r("gap")]:rB(e)}}function nB({container:e,...o}){let[t]=qr("gap"),r=o.field?.siteGap,a=Nf(e,void 0,t,r);return zf({...Df,builtIn:a,resolve:n=>Nf(e,n,t,r),action:(n,s)=>y(to,{words:X()?.panel,label:l("Gap"),changed:zs(n),detail:Kr(`${a}px`,l("Desktop")),onReset:()=>s(void 0)})}).render(o)}function aQ(e){return Pg({offered:JI(e),fallback:Ms(e,void 0),resolve:o=>Ms(e,o)})}function nQ(e,o){return Xx(o?Uc(e,o):[],o)}function sB({inherited:e,onReset:o,label:t}){return y(to,{words:X()?.panel,label:l(t),changed:!e,detail:Kr(l("Full"),l("the page")),onReset:o})}function lr({value:e,onChange:o,label:t,placeholder:r,hint:a,multiline:n,hideable:s=!0,markup:i=!0}){let{text:c,hidden:d}=At(e),m=Qs(null),x=Qs(null),u=w=>o(s?{text:w,hidden:d}:w),h=()=>o({text:c,hidden:!d}),g=s&&d,k=Dg(),P=a?dB(a)?y("span",{className:"sf-hint-keep sf-hint-while-typing",children:l(a)}):y(eh,{children:l(a)}):void 0,O=d?l("Show {label} on the slide",{label:l(t)}):l("Hide {label} on the slide",{label:l(t)});return y(Be,{label:l(t),icon:y(TR,{}),htmlFor:k,className:g?"is-hidden":void 0,hint:P,action:s?y(Js,{content:O,children:y(jg,{"aria-pressed":d,"aria-label":O,onClick:h,children:d?y(Fg,{name:"eye-off",size:14}):y(Fg,{name:"eye",size:14})})}):void 0,children:jr("div",{className:"sf-copybox",children:[i&&y(Jc,{target:n?x:m,value:c,onChange:u}),n?y("textarea",{id:k,ref:x,value:c,placeholder:r===void 0?void 0:l(r),onChange:w=>u(w.target.value)}):y("input",{id:k,ref:m,type:"text",value:c,placeholder:r===void 0?void 0:l(r),onChange:w=>u(w.target.value)})]})})}function sQ(e,o){return{...e,[tR]:o}}function lQ(e){let o=e[nt];if(!o)throw new Error("withOffPage: the field holds no authored text");return{...e,[nt]:{...o,offPage:!0}}}function ol(e){return!e||typeof e!="object"?!1:e[nt]?.offPage===!0}var Kg="sfPanelOnly";function iQ(e){if(!e[nt])throw new Error("withPanelOnly: the field holds no authored text");return{...e,[Kg]:!0}}function Vg(e){return!!e&&typeof e=="object"&&e[Kg]===!0}function cQ(e){let o=e[nt];if(!o)throw new Error("withIdentifier: the field holds no authored text");return{...e,[nt]:{...o,identifier:!0}}}function pQ(e,o){if(!e[nt])throw new Error("inOwnBox: the field holds no authored text");let{[jR]:t,...r}=e;return{...r,[ef]:!0,render:o}}var lB=new Set(KR),el={type:"radio",options:[{value:!0},{value:!1}]},Yg={text:{type:"object",objectFields:{text:{type:"text"},hidden:el}},textarea:{type:"object",objectFields:{text:{type:"textarea"},hidden:el}},plainText:{type:"text"},copyText:{type:"text"},plainTextarea:{type:"textarea"},textList:{type:"array",arrayFields:{text:{type:"text"}}}},ir=(e,o)=>{let t=Ft({...o,[nt]:e},{...Yg[e.control],label:e.label});if(!lB.has(e.control))return t;let r=o.render;return{...qg(t,"authored-copy"),render:a=>y(Nh,{name:a.name,children:r(a)})}},mQ="Everything else on this block comes from the linked post. Unlink it to edit by hand.",iB={field:"source.slug",set:!0},xQ={not:iB},cB="Select a word, then press the highlighter.",fB=new Set([cB]),dB=e=>fB.has(e);function hQ(e,o,t){return ir({control:"text",label:e,placeholder:o,hint:t},{type:"custom",render:({value:r,onChange:a})=>y(lr,{value:r,onChange:a,label:e,placeholder:o,hint:t})})}function IQ(e,o,t){return ir({control:"textarea",label:e,placeholder:o,hint:t},{type:"custom",render:({value:r,onChange:a})=>y(lr,{value:r,onChange:a,label:e,placeholder:o,hint:t,multiline:!0})})}function gQ(e,o,t){return ir({control:"plainText",label:e,placeholder:o,hint:t},{type:"custom",render:({value:r,onChange:a})=>y(lr,{value:r,onChange:a,label:e,placeholder:o,hint:t,hideable:!1,markup:!1})})}function yQ(e,o,t){return ir({control:"copyText",label:e,placeholder:o,hint:t},{type:"custom",render:({value:r,onChange:a})=>y(lr,{value:r,onChange:a,label:e,placeholder:o,hint:t,hideable:!1})})}function bQ(e){return{type:"custom",[eR]:{label:e},...Ft({},{type:"text",label:e}),render:({value:o,onChange:t})=>y(_I,{value:JA(o),onChange:t,label:e})}}function SQ(e,o,t){return ir({control:"plainTextarea",label:e,placeholder:o,hint:t},{type:"custom",render:({value:r,onChange:a})=>y(lr,{value:r,onChange:a,label:e,placeholder:o,hint:t,multiline:!0,hideable:!1})})}var Xg={Design:rR,Animation:nR};function Zg(e,o){return e.includes("Design")?o!=="Design":null}function CQ(e){return{type:"custom",render:()=>y(uB,{text:e})}}function uB({text:e}){return y("p",{className:"sf-note",children:l(e)})}function wQ(e){return st(e)!==null&&e?.tabs!==void 0}var Lg=new Map;function tl(e,o){let t=`${e}\0${o?o.join(""):""}`,r=Lg.get(t)??{type:"custom",tabs:o,[Ng]:{label:e,level:1},bucket:e,marker:!0,render:()=>y(Lt,{})};return Lg.set(t,r),r}var Ag=new Map;function jf(e){let o=Ag.get(e)??{type:"custom",[Ng]:{label:e,level:1},designGroup:e,marker:!0,...e==="Content"?{}:{fold:e},render:()=>y(Lt,{})};return Ag.set(e,o),o}function pB(e){let o=e;return o?.marker===!0&&typeof o.fold=="string"?o.fold:null}function Qg(e,o){return pB(e)===o?e:{...e,marker:!0,fold:o,render:()=>y(Lt,{})}}function Jg(e){let o=e;if(o.marker===!0&&o.fold===void 0)return e;let{fold:t,...r}=e;return{...r,marker:!0,render:()=>y(Lt,{})}}function qf({title:e,children:o}){let[t,r]=Ha(()=>!Wf.has(e));return y(OR,{title:e,open:t,onToggle:a=>{r(a),a?Wf.delete(e):Wf.add(e)},children:o})}var Wf=new Set;function ey({swatches:e,current:o,onPick:t,names:r}){let a=e.find(i=>i.toLowerCase()===o.toLowerCase()),n=a?r?.[a]:void 0,s=n?l(n):o;return jr("div",{className:"sf-swatches",children:[e.map(i=>{let c=r?.[i]?l(r[i]):i;return y(Js,{content:c,children:y(MR,{color:i,selected:o.toLowerCase()===i.toLowerCase(),onClick:()=>t(i),"aria-label":c})},i)}),y("span",{className:"sf-swatch-hex",children:s})]})}function kQ(e,o){return{type:"custom",render:({value:t,onChange:r})=>{let a=hg(t,o);return y(Be,{label:l(e),icon:y(sR,{}),changed:!a,action:y(to,{words:X()?.panel,label:l(e),changed:!a,detail:l("the theme's section background"),onReset:()=>r(Gs)}),children:ey({swatches:mg,current:a?Ws:t??o??"",onPick:r,names:xg})})}}}function mB(e,o){return{type:"custom",render:({value:t,onChange:r})=>{let a=t,n=yg(a,o);return y(Be,{label:l(e),icon:y(Hg,{}),changed:!n,action:y(to,{words:X()?.panel,label:l(e),changed:!n,detail:l("the theme's image stage"),onReset:()=>r(Ma)}),children:ey({swatches:Ig,current:n?Ur:Mf(a,o),onPick:r,names:gg})})}}}function rl(e=t=>t,o){return Wa({_gSectionTheme:Eo(eI),sectionAccent:{type:"custom",render:({value:t,onChange:r})=>y(sI,{value:e(t),onChange:r,followLabel:o})}})}function co({min:e,max:o,step:t,value:r,onChange:a,suffix:n="",readout:s=!0,notch:i,ariaLabel:c,disabled:d=!1}){let m=i!==void 0&&Number.isFinite(i)&&i>=e&&i<=o;return y("div",{className:m?"sf-slider has-notch":"sf-slider",style:m?{"--sf-notch":(i-e)/(o-e)}:void 0,children:y(UR,{min:e,max:o,step:t,value:r,suffix:n||void 0,showInput:s,label:c===void 0?void 0:l(c),disabled:d,size:"sm",boxSize:"md",className:"sf-slider-track",onChange:x=>{x!==null&&x!==r&&a(x)}})})}function oy(e,o){let{min:t,max:r,step:a=1,unsetLabel:n,hint:s,restTrack:i,unsetMark:c,icon:d,unit:m="px"}=o;return{type:"custom",render:({value:x,onChange:u})=>{let h=typeof x=="number"?x:null,g=h===null;return y(Be,{label:l(e),icon:d?za(d):void 0,value:g?c||n===void 0?void 0:l(n):`${h}${m}`,changed:!g,action:c?_g(c,{changed:!g,onReset:()=>u(null)}):y(to,{words:X()?.panel,label:l(e),changed:!g,onReset:()=>u(null)}),hint:typeof s=="string"?l(s):s,children:i?i({min:t,max:r,step:a,px:h,label:e,onChange:u}):co({min:t,max:r,step:a,value:h??t,readout:!1,ariaLabel:e,onChange:u})})}}}var al="Corners";function Kf(e){return{type:"custom",render:({value:o,onChange:t})=>{let r=typeof o=="number"&&Number.isFinite(o)?o:null,a=r!==null;return y(Be,{label:l(al),icon:y(fR,{}),changed:a,action:_g(e.mark,{changed:a,onReset:()=>t(null)}),hint:e.hint,children:y(xB,{tier:e,px:r,onRadius:t})})}}}function qr(e){let o=Br();return[o?.values?.[e],t=>o?.onChange(e,t)]}function ty(){return qg({type:"custom",render:()=>y(qR,{})},"always")}function lf(){let e=Br();return o=>e?.onChangeMany(o)}function xB({tier:e,px:o,onRadius:t}){let r=e.useFollowed(),[a,n]=qr(e.sidesKey),s=Go(a)??[...rs];return y(HR,{label:l(al),value:s,corners:kx,onChange:i=>{let c=Go(i)??[];n(c.length===rs.length?null:c)},radius:o,onRadiusChange:t,radiusMin:go,radiusMax:$t,radiusStep:e.step??1,radiusPlaceholder:String(r)})}function ry(){return ty()}function hB({label:e,changed:o=!1,onReset:t=()=>{}}){let{cornerRadiusPx:r}=oe(),a=typeof r=="number"?`${r}px`:l("not set");return y(to,{words:X()?.panel,label:l(e),changed:o,detail:r==null?l("the built-in corners"):Kr(a,l("Styles")),onReset:t})}function IB(){let{cornerRadiusPx:e}=oe();return typeof e=="number"?e:go}function gB(){return Kf({sidesKey:"sectionCornerSides",useFollowed:IB,mark:y(hB,{label:al}),hint:yB})}var yB="Follows Styles \u25B8 Basics \u25B8 Corners until you set a number here.";function nl(){return Wa({_gShape:Eo("Shape"),sectionCorners:gB(),sectionCornerSides:ry(),sectionBorder:Rg("desktop"),sectionBorderPhone:Rg("mobile")})}var bB=()=>({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 SB(e){let o=Object.fromEntries(Object.entries(e).filter(([,t])=>t!=null&&t!==""));return Object.keys(o).length?o:void 0}function CB(){let e;try{let o=Ge(oe().theme);e=o.themes[o.selected]?.line}catch{e=void 0}return e||ac.line}function wB({value:e,onChange:o,placeholder:t,presets:r,sides:a=!0,styles:n=!0,above:s={}}){let i=e&&typeof e=="object"?e:{},[c,d]=Ha(()=>a?BR(i,s):!1),m=bB(),x=u=>SB(a&&n?u:{width:u.width,color:u.color,...n?{style:u.style}:{}});return y(Be,{label:l("Border"),icon:y(lR,{}),action:a?y(AR,{each:c,label:l("Each side"),onChange:d}):void 0,children:y(LR,{label:l("Border"),value:i,each:c,onChange:u=>o(x(u)),placeholder:t,presets:r,words:m,styles:n,max:20})})}function kB({value:e,onChange:o,tier:t}){let[r]=qr("sectionBorder"),a=CB(),n=t==="mobile"?r&&typeof r=="object"?r:{}:{};return y(wB,{value:e,onChange:o,placeholder:{sides:RR(n),style:n.style??"solid",color:n.color||a},presets:[a],above:n})}function Rg(e){return Ne(e,{type:"custom",render:({value:o,onChange:t})=>y(kB,{value:o,onChange:t,tier:e})})}function vQ(e){return{type:"custom",render:()=>y(vB,{partKey:e})}}function vB({partKey:e}){let[o]=qr("id"),[t]=qr("_partStyles"),{textStyles:r}=oe(),a=ZR(),n=null;try{n=VR().select}catch{n=null}let s=t&&typeof t=="object"?t[e]:void 0,i=Array.isArray(r)?r:null;return y(ER,{name:l("Text"),preview:UI(s,i,{noStyle:l("No style"),styleName:a.textStyles.styleName,cases:(a.copy.panel??XR.copy.panel).cases}),onOpen:()=>{n&&typeof o=="string"&&n(YR(o,e))}})}function ay(e){let{cornerRadiusPx:o}=oe(),t=typeof o=="number"?o:e,r=null;try{let{appState:n,selectedItem:s}=Uf(c=>c),i=s?.props?.id?String(s.props.id):void 0;r=i?ph(n?.data,i)?.props??null:null}catch{r=null}if(!r)return t;let a=r.sectionCorners;return Tc(a)?a:t}function TB({label:e,changed:o=!1,onReset:t=()=>{}}){let r=ay(go);return y(to,{words:X()?.panel,label:l(e),changed:o,detail:Kr(`${r}px`,l("the section")),onReset:t})}function PB(){return y(Lt,{children:l("Follows the section's Corners until you set a number here.")})}function EB(){return Kf({sidesKey:"cardCornerSides",useFollowed:()=>ay(go),mark:y(TB,{label:al}),hint:y(PB,{})})}function OB(){return{type:"custom",render:()=>y(Lx,{})}}function TQ(){return{_gShape:Eo("Shape"),cardCorners:EB(),cardCornerSides:ry(),cardCornersApplyAll:OB()}}function FB(e=Lf,o=e[0].value){return Ft({type:"custom",render:({value:t,onChange:r})=>{let a=e.find(n=>n.value===t)??e.find(n=>n.value===o)??e[0];return y(Be,{label:l(Hs),icon:y(Mg,{}),value:l(a.label),children:y(WR,{className:"sf-gallery-layouts",label:l(Hs),value:a.value,onChange:r,options:e.map(n=>({value:n.value,label:l(n.label),picture:y("span",{className:"sf-gallery-pic",children:LB(n.weights).map((s,i)=>y("i",{style:{gridColumn:`span ${s}`}},i))})}))})})}},{type:"select",label:Hs,options:e.map(t=>({value:t.value,label:t.label}))})}function LB(e){if(!e)return[3,4];let o=e.reduce((t,r)=>t+r,0);return e.map(t=>Math.round(t/o*12))}function PQ(){return at(lg,y(hR,{}),Rf,Rf[0].value)}function EQ(){return Ne("mobile",FB(ng,sg))}function OQ(){return Ne("mobile",rt(tg,y(cR,{}),Af,rg,1,Af))}function FQ(e,o,t,r,a,n){return{type:"custom",render:({value:s,onChange:i})=>y(Be,{label:l(e),icon:y(qc,{noun:n}),action:y(to,{words:X()?.panel,label:l(e),changed:!Sg(s),detail:l("the Text style in Styles"),onReset:()=>i(bg),defaultAction:{onPress:()=>i(js),title:l("Keep this section's own built-in size"),icon:y(iR,{})}}),children:co({min:o,max:t,step:r,value:typeof s=="number"?s:a,suffix:"px",ariaLabel:e,onChange:i})})}}function LQ(){return{_gCellWidth:Eo("Cell width"),gridSpan:at("Positions",y(Mg,{}),[{label:"Auto",value:""},...Array.from({length:is},(e,o)=>({label:o===0?"1 position":`${o+1} positions`,value:String(o+1)}))],"")}}function lt(){let e=null;try{e=Uf(o=>o).selectedItem}catch{e=null}return e?.props??{}}function AB({min:e,max:o,step:t,px:r,label:a,onChange:n,desktopKey:s,fallback:i}){let c=lt()[s],d=Is(void 0,c,i);return y(Lt,{children:co({min:e,max:o,step:t,value:Is(r,c,i),readout:!1,ariaLabel:a,notch:d,onChange:n})})}function RB({label:e,desktopKey:o,fallback:t,unit:r="px",changed:a=!1,onReset:n=()=>{}}){let s=lt()[o],i=Is(void 0,s,t);return y(to,{words:X()?.panel,label:l(e),changed:a,detail:l("{value} on desktop",{value:`${i}${r}`}),onReset:n})}function sl(e){return oy(e.label,{icon:e.icon,min:e.min,max:e.max,step:e.step,unit:e.unit,unsetLabel:"Follows Desktop",unsetMark:y(RB,{label:e.label,desktopKey:e.desktopKey,fallback:e.fallback,unit:e.unit}),restTrack:o=>y(AB,{...o,desktopKey:e.desktopKey,fallback:e.fallback})})}var BB={Top:"Padding top",Bottom:"Padding bottom",Left:"Padding left",Right:"Padding right"},_B={Top:$g,Bottom:Wg,Left:Gg,Right:Ug},DB=e=>{let o=_B[e];return y(o,{})};function AQ(e={}){let o=e.keys?.top??"sectionPaddingTop",t=e.keys?.bottom??"sectionPaddingBottom",r=e.group!==!1,a=P=>BB[P],n=P=>rt(a("Top"),y($g,{}),Po.min,Po.max,Po.step,P,"px"),s=(P,O,w,I=Po)=>Ne("mobile",sl({label:a(P),icon:DB(P),desktopKey:O,min:I.min,max:I.max,step:I.step,fallback:w})),i=e.top??Po.min,c=e.bottom??Po.min,d="sectionPaddingLeft",m="sectionPaddingRight",x=e.sideBounds??Po,u=e.side??x.min,h=e.sidePhone??u,g=e.phone===!0,k=P=>g?Ne("desktop",P):P;return Wa({...r?{_gSpacing:Eo("Padding")}:{},[o]:k(n(i)),...g?{[$r(o)]:s("Top",o,i)}:{},...e.only==="top"?{}:{[t]:k(rt(a("Bottom"),y(Wg,{}),Po.min,Po.max,Po.step,c,"px")),...g?{[$r(t)]:s("Bottom",t,c)}:{}},...e.sides?{[d]:k(rt(a("Left"),y(Gg,{}),x.min,x.max,x.step,u,"px")),...g?{[$r(d)]:s("Left",d,h,x)}:{},[m]:k(rt(a("Right"),y(Ug,{}),x.min,x.max,x.step,u,"px")),...g?{[$r(m)]:s("Right",m,h,x)}:{}}:{}})}function RQ(e,o){let t=Object.fromEntries(Object.entries(o).map(([n,s])=>[n,n in e&&st(s)?e[n]:s])),r={},a=!1;for(let[n,s]of Object.entries(e)){if(n in o){a||Object.assign(r,t),a=!0;continue}r[n]=s}return a||Object.assign(r,t),r}var Xs="Width";function ll(e,o=Cg,t=!0){let r=o.map(a=>({label:sr[a],value:a}));return Wa({...t?{_gWidth:Eo(Xs)}:{},widthMode:{type:"custom",render:({onChange:a,field:n})=>y(Be,{label:l(Xs),icon:y(PR,{}),action:t?y(sB,{inherited:n?.inherited??!1,onReset:()=>a(Hf),label:Xs}):void 0,children:Ks({options:r,value:n?.currentValue||e,onChange:a,ariaLabel:Xs})})}})}function il(){let e=r=>({type:"custom",render:({value:a,onChange:n})=>y(Be,{label:Hr,icon:za(y(gR,{})),action:r?r(n):void 0,children:Ks({options:[{label:"Auto",value:"auto"},{label:"Fixed",value:"fixed"},{label:"Screen",value:"screen"}],value:["auto","fixed","screen"].includes(a)?a:"auto",onChange:n,ariaLabel:Hr})})}),o=()=>({type:"custom",render:({value:r,onChange:a,field:n})=>{let s=n?.unit==="%"?"%":"px",i=s==="%"?Pf:Tf;return y("div",{className:"sf-field",children:co({min:i.min,max:i.max,step:i.step,value:typeof r=="number"?r:i.fallback,suffix:s,ariaLabel:Hr,onChange:a})})}}),t=()=>Vs("Unit",y(zg,{}),[{label:"px",value:"px"},{label:"%",value:"%"}],"px");return Wa({_gHeight:Eo(Hr),sectionHeightMode:Ne("desktop",e()),sectionHeightValue:Ne("desktop",o()),sectionHeightUnit:Ne("desktop",t()),sectionHeightModePhone:Ne("mobile",e(r=>y(NB,{onClear:()=>r(void 0)}))),sectionHeightValuePhone:Ne("mobile",o()),sectionHeightUnitPhone:Ne("mobile",t())})}function NB({onClear:e}){let o=lt(),t=Ef(o),r=Ds(o),a=l("{value} on desktop",{value:r.mode==="auto"?l("Auto"):`${r.value}${r.unit}`});return y(to,{words:X()?.panel,label:l(Hr),changed:t,detail:a,onReset:e})}function Vf(){let e=t=>({type:"custom",render:({value:r,onChange:a,id:n,name:s})=>y(MB,{value:r,onChange:a,labelId:`${n??s??"stickTop"}-label`,phone:t})}),o=()=>({type:"custom",render:({value:t,onChange:r})=>y("div",{className:"sf-field",children:co({min:Ot.min,max:Ot.max,step:Ot.step,value:typeof t=="number"?t:Ot.fallback,suffix:"px",ariaLabel:l("Distance from top"),onChange:r})})});return{_gStick:Eo(Ns),stickTop:Ne("desktop",e(!1)),stickTopDistance:Ne("desktop",o()),stickTopPhone:Ne("mobile",e(!0)),stickTopDistancePhone:Ne("mobile",o())}}function MB({value:e,onChange:o,labelId:t,phone:r}){let a=lt(),n=Ff(a),s=r?n.phone:e===!0;return y(Be,{label:l(Ns),labelId:t,icon:za(y(CR,{})),action:jr(Lt,{children:[r?y(to,{words:X()?.panel,label:l(Ns),changed:Of(a),detail:l("{value} on desktop",{value:n.desktop?`${n.desktopDistance}px`:l("Off")}),onReset:()=>o(void 0)}):null,y($f,{checked:s,onChange:o,ariaLabelledBy:t})]})})}var Bg="e.g. about";function cl(){return{_gAnchor:Eo("Anchor"),anchor:ir({control:"plainText",label:"Name",placeholder:Bg},{type:"custom",render:({value:e,onChange:o})=>y(fh,{value:e,onChange:o,nameBox:(t,r)=>y(lr,{value:t,onChange:r,label:"Name",placeholder:Bg,hideable:!1,markup:!1})})})}}function BQ(e,o,t){return{type:"custom",render:({value:r,onChange:a,id:n,name:s})=>{let i=`${n??s??e}-datetime`,c=Date.parse(typeof r=="string"?r:"");return y(Be,{label:l(e),icon:o,htmlFor:i,hint:t===void 0?void 0:l(t),children:y(zR,{id:i,value:Number.isFinite(c)?new Date(c):null,onChange:d=>a(d?d.toISOString():"")})})}}}function ny(e,o,t,r){return{type:"custom",...Ft({},{...el,label:e}),render:({value:a,onChange:n,id:s,name:i})=>{let c=typeof a=="boolean"?a:o,d=`${s??i??e}-label`;return y(Be,{label:l(e),labelId:d,icon:t,hint:r===void 0?void 0:l(r),action:y($f,{checked:c,onChange:n,ariaLabelledBy:d})})}}}function sy(){return{type:"custom",render:({value:e,onChange:o,id:t,name:r})=>{let a=`${String(t??r??"pageBackground")}-colour`;return y(yo,{label:l("Background"),icon:y(SR,{}),id:a,value:Kc(e),onChange:o})}}}function _Q(e,o,t){return{type:"custom",render:({value:r,onChange:a})=>y(yo,{label:l(e),icon:t,value:r||o,onChange:a})}}function DQ(){return{type:"custom",render:({value:e,onChange:o})=>y(HB,{value:typeof e=="string"?e:"",onChange:o})}}function HB({value:e,onChange:o}){let{hex:t,n:r}=WB();return y(es,{label:l("Fill"),icon:y(Hg,{}),value:e,inherited:t,resetTo:Kr(t.toUpperCase(),l("Theme {n} background",{n:r})),onChange:o,onReset:()=>o("")})}function zB(e,o,t){if((e?.content??[]).some(n=>n?.props?.id===o))return Pt(t);let r=mh(e,o);if(r.length===0)return null;let a=Pt(hf(t));if(a!==null)return a;for(let n=r.length-1;n>0;n-=1){let s=Pt(hf(r[n].sectionAccent));if(s!==null)return s}return Pt(r[0].sectionAccent)}function WB(){let e=Ge(oe().theme),[o]=qr("sectionAccent"),t=null;try{let{appState:a,selectedItem:n}=Uf(i=>i),s=n?.props?.id?String(n.props.id):void 0;t=s?zB(a?.data,s,o):null}catch{t=null}let r=t!==null&&e.themes[t]?t:e.selected;return{hex:e.themes[r].background??ac.background,n:r+1}}var GB=[{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 UB({label:e,value:o,onChange:t,points:r=GB}){let a=r.map(n=>({...n,label:l(n.label),...n.title?{title:l(n.title)}:null}));return y(NR,{label:l(e),value:o,points:a,onChange:t})}function NQ(){return ty()}var MQ={top:y(mR,{}),right:y(pR,{}),bottom:y(dR,{}),left:y(uR,{})};function HQ(e,o,t,r,a,n){let s=m=>o.find(x=>x.value===m),i=m=>({value:m,label:"",disabled:!0,title:r}),c=m=>{let x=o.find(h=>h.cell===m);if(!x)return i(`missing-${m}`);let u=n?.[m];return u?{value:x.value,label:x.label,icon:u}:{value:x.value,label:x.label}},d=[i("corner-top-left"),c("top"),i("corner-top-right"),c("left"),i("centre"),c("right"),i("corner-bottom-left"),c("bottom"),i("corner-bottom-right")];return{type:"custom",render:({value:m,onChange:x})=>{let u=o.some(h=>h.value===m)?m:t;return y(Be,{label:l(e),icon:a,value:s(u)?.label?l(s(u).label):"",children:UB({label:e,value:u,onChange:x,points:d})})}}}function zQ(e,o,t){return{type:"custom",options:o,render:({value:r,onChange:a,field:n})=>y(jh,{label:e,options:(n.options??o).map(s=>({...s,label:l(s.label)})),value:Array.isArray(r)?r:[],onChange:a,...t?{emptyLabel:l(t)}:{}})}}function WQ(e,o={}){return{type:"custom",render:({value:t,onChange:r})=>{let a={value:t,onChange:r,...o};return y(e,{...a})}}}var GQ=[{label:"Image",value:"image"},{label:"Video",value:"video"}];function UQ(e,o,t){let r=Object.keys(kc).map(a=>({label:kc[a],value:a,picture:t[a]}));return{type:"custom",...Ft({},{type:"radio",label:e,options:r.map(a=>({value:a.value,label:a.label}))}),render:({onChange:a})=>y($B,{label:e,icon:o,options:r,onChange:a})}}function $B({label:e,icon:o,options:t,onChange:r}){let a=Br()?.values??{},n=vc(a),s=n==="frame"&&!!vt(a.mediaVideo)&&!vt(a.videoFrame);return y(Be,{label:l(e),icon:za(o),hint:s?l("This video has no frame yet. The slide shows its background colour until one is made."):void 0,children:Ks({options:t,value:n,onChange:r,ariaLabel:e})})}function $Q(e,o,t,r={}){return{type:"custom",[oR]:!0,render:({value:a,onChange:n,name:s})=>y(Uh,{value:a||"",onChange:n,fieldKey:s,label:e,accept:o,placeholder:t,focusKey:r.focus,focusWhen:r.focusWhen,frameKey:r.frame})}}function jB(e){let o=l(e.status??"");return e.ok&&typeof e.lat=="number"&&typeof e.lng=="number"?`${o} \xB7 ${e.lat.toFixed(4)}, ${e.lng.toFixed(4)}`:o}function jQ({value:e,onChange:o,label:t}){let r=e||{},a=!!r.pending,n=a?"var(--ink-faint)":r.ok?"var(--status-success-soft-ink)":"var(--status-danger-soft-ink)",s=!!He(QR()).geocode,i=Dg(),c=(d,m)=>o({...r,[d]:m??void 0});return jr(Lt,{children:[y(Be,{label:l(t),icon:y(Eg,{}),action:s?y(Js,{content:l("Find from the address (OpenStreetMap)"),children:y(jg,{"aria-label":l("Find from the address"),"aria-busy":a||void 0,disabled:a,onClick:()=>o({...r,pending:!0,ok:!1,status:"Finding\u2026"}),children:y(kR,{})})}):void 0,children:s&&r.status?y(Js,{content:jB(r),className:"sf-name-tip",children:y("div",{className:`es-field-hint ${$c}`,style:{margin:0,whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",minWidth:0,color:n},children:a?l("Finding\u2026"):l(r.status)})}):null}),y(Be,{label:l("Enter by hand"),labelId:i,icon:y(xR,{}),action:y($f,{checked:!!r.manual,onChange:d=>o({...r,manual:d}),ariaLabelledBy:i})}),r.manual&&y(Be,{label:l("Latitude, longitude"),icon:y(Eg,{}),children:jr("div",{style:{display:"grid",gridTemplateColumns:"1fr 1fr",gap:8,width:"100%",minWidth:0},children:[y(Og,{value:typeof r.lat=="number"?r.lat:null,onChange:d=>c("lat",d),min:-90,max:90,step:1e-4,placeholder:l("Latitude")}),y(Og,{value:typeof r.lng=="number"?r.lng:null,onChange:d=>c("lng",d),min:-180,max:180,step:1e-4,placeholder:l("Longitude")})]})})]})}function qB(e,o){return o===null||o<0||o>=e.length?"":e[o]?.text??""}function KB(e,o,t){let r=e.map(a=>({text:a?.text??""}));return o===null||o<0||o>=e.length?r:r.map((a,n)=>n===o?{text:t}:a)}function VB(e,o,t){if(t===null||t>=o.length)return null;for(let r=0;r<t;r+=1)if(e[r]!==o[r])return null;return e[t]!==o[t]&&o.includes(e[t])||e[t]!==o[t]&&o.length!==e.length?null:t}var Yf={label:"Ticker items",icon:y(bR,{})};function qQ(e,o,t,r){return{type:"custom",[nt]:{control:"textList",label:e,placeholder:t,itemKey:"text",rendering:r},...Ft({},{...Yg.textList,label:e}),render:({value:a,onChange:n})=>y(Xf,{label:e,icon:za(o),items:Array.isArray(a)?a:[],placeholder:t,onChange:n,markup:r==="markup"})}}function Xf({label:e,icon:o,items:t,placeholder:r,onChange:a,markup:n=!1}){let s=Qs(null),[i,c]=Ha(null),d=x=>x.map(u=>({text:u?.text??""})),m=x=>{let u=VB(t,x,i);u===null&&(s.current=null),c(u),a(d(x))};return y(_R,{label:l(e),icon:o,noun:l("item"),items:t,onChange:m,newItem:()=>({text:""}),open:null,onOpen:()=>{},renderItem:()=>null,above:n?y(Jc,{target:s,value:qB(t,i),onChange:x=>a(KB(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,u,h)=>y("input",{type:"text",className:n&&i===u?"sf-list-marking":void 0,value:x?.text??"",placeholder:l(r),"aria-label":l("{label} {n}",{label:l(e),n:u+1}),onChange:g=>h({text:g.target.value}),onFocus:g=>{s.current=g.currentTarget,c(u)}})})}function ly(e,o){let t=`${e.label} \u2014 row ${o+1}`;return ir({control:"plainText",label:t,placeholder:e.placeholder,offPage:e.offPage},{type:"custom",render:({value:r,onChange:a})=>y(lr,{value:r,onChange:a,label:l("{label} \u2014 row {n}",{label:l(e.label),n:o+1}),placeholder:e.placeholder,hideable:!1,markup:e.rendering==="markup"})})}function iy(e){return{_gCards:Eo("Cards"),coverIndex:at("Cover image",y(yR,{}),Hh,String(1),e?.coverHint??"A card's opening picture \u2014 a card pinned to a finish keeps its own."),imageBackground:mB("Image background",$s),cardImage:ZB(),spinOnHover:ny("Rotate on hover",e?.spinDefault??!0,y(wR,{}))}}function cy(){return{outline:at("Card outline",y(vR,{}),sf,af),indexBadge:at("Card number",y(zg,{}),nf,rf),showBadge:ny("Product badge",!0,y(qc,{noun:"tag"}))}}function fy(e){let o=e?.defaults??{showCardSizes:!0,showCardBuy:!0,showCardPage:!0},t=a=>({...el,label:Zs.find(n=>n.id===a).label}),r=a=>Ft($R(Gf),t(a));return{_gShowOnCard:Eo("Show on a card"),[Gf]:Ft({type:"custom",render:()=>y(YB,{rest:{showCardPrice:!0,showCardFinishes:!0,...o}})},t(Gf)),showCardFinishes:r("showCardFinishes"),showCardSizes:r("showCardSizes"),showCardBuy:r("showCardBuy"),showCardPage:r("showCardPage")}}var Gf="showCardPrice",Zs=[{id:"showCardPrice",label:"Price"},{id:"showCardFinishes",label:"Finish swatches"},{id:"showCardSizes",label:"Sizes"},{id:"showCardBuy",label:"Buy button"},{id:"showCardPage",label:"Page button"}];function YB({rest:e}){let o=lt(),t=lf(),r=s=>typeof o[s]=="boolean"?o[s]:void 0,a=s=>r(s)??e[s],n=Zs.some(({id:s})=>r(s)!==void 0&&r(s)!==e[s]);return y(Zf,{parts:Zs,changed:n,shown:a,onPress:(s,i)=>t({[s]:i}),onReset:()=>t(Object.fromEntries(Zs.map(({id:s})=>[s,void 0])))})}function KQ(e,o="display"){let t=$r(o);return{[o]:Ne("desktop",{type:"custom",render:({value:r,onChange:a})=>y(Zf,{parts:e,changed:xh(r),shown:n=>xs(r,n),onPress:(n,s)=>a(Ih(r,n,s)),onReset:()=>a(void 0)})}),[t]:Ne("mobile",{type:"custom",render:({value:r,onChange:a})=>y(XB,{parts:e,desktopKey:o,value:r,onChange:a})})}}function Zf({parts:e,changed:o,shown:t,onPress:r,onReset:a,detail:n}){let s=l("Display");return y(Be,{label:s,icon:y(aR,{}),changed:o,action:y(to,{words:X()?.panel,label:s,changed:o,detail:n,onReset:a}),children:y(DR,{label:s,items:e.map(i=>({id:i.id,label:l(i.label),shown:t(i.id)})),onChange:r})})}function XB({parts:e,desktopKey:o,value:t,onChange:r}){let a=lt()[o];return y(Zf,{parts:e,changed:hh(t),shown:n=>Yc(a,t,n),onPress:(n,s)=>r(gh(t,n,s)),onReset:()=>r(gs),detail:l("the same as Desktop")})}function ZB(){return oy("Card image",{min:go,max:$t,step:Hx,hint:"Rounds the picture. The card's own corner is in Styles."})}function VQ(){return Kf({sidesKey:"cornerSides",step:zx,useFollowed:()=>go,mark:y(QB,{label:Wx}),hint:l("Rounds the picture. Left alone it stays square.")})}function QB({label:e,changed:o=!1,onReset:t=()=>{}}){return y(to,{words:X()?.panel,label:l(e),changed:o,onReset:t})}function YQ(){return{type:"custom",render:({value:e,onChange:o})=>y(t_,{value:typeof e=="string"?e:"",onChange:o})}}function JB({layout:e,width:o}){return y("span",{"aria-hidden":"true",style:{display:"grid",width:o,gridTemplateColumns:"repeat(12, minmax(0, 1fr))",gridAutoRows:6,gridAutoFlow:"row dense",gap:2},children:jx(e).map(([t,r],a)=>y("i",{className:"block rounded-xs bg-current opacity-60",style:{gridColumn:`span ${t}`,gridRow:`span ${r}`}},a))})}var e_={width:"3.5rem",height:"2.5rem"},o_=200;function t_({value:e,onChange:o}){let[t,r]=Ha(null),[a,n]=Ha(4),s=Qs(null);QA(()=>{let u=s.current;if(!u||typeof ResizeObserver!="function")return;let h=()=>n(u.getBoundingClientRect().width>=o_?4:3);h();let g=new ResizeObserver(h);return g.observe(u),()=>g.disconnect()},[]);let i=e&&e in et?e:"",c=Mc(t,i),d=Mc(t,"").length,m=cs("no-symbol"),x=[{value:"",label:l("Not chosen"),icon:m},...c.map(u=>({value:u,label:l(et[u].label),icon:y(JB,{layout:et[u],width:40})}))];return y(Be,{label:l("Layout"),icon:y(IR,{}),value:i?l(et[i].label):l("Not chosen"),children:y("div",{ref:s,style:{flex:"1 1 auto",minWidth:0},children:y(GR,{label:l("Layout"),value:i,emptyValue:"",options:x,onChange:o,columns:a,cell:e_,header:jr("div",{className:"mb-2 flex flex-col gap-1",style:{minWidth:"11rem"},children:[y("span",{className:"text-2xs text-ink-faint",children:l("Photos in a row")}),y(FR,{options:[{id:"all",label:l("All")},...Ux.map(u=>({id:String(u),label:String(u)}))],value:t===null?"all":String(t),ariaLabel:l("Photos in a row"),onChange:u=>r(u==="all"?null:Number(u))}),y("span",{className:"text-2xs text-ink-faint",children:l("{n} of {total} layouts",{n:d,total:Nc.length})})]})})})})}var s_="Applies to panels, cards, inputs and buttons. Round things \u2014 color swatches, switches, status dots \u2014 stay round.",Qf="Corners";function dy({value:e,onChange:o,showHint:t=!0}){let r=e===null;return fl(a_,{label:l(Qf),icon:fl(n_,{}),value:r?l("Default"):`${e}px`,changed:!r,action:fl(r_,{words:X()?.panel,label:l(Qf),changed:!r,detail:l("the built-in corners"),onReset:()=>o(null)}),hint:t?l(s_):void 0,children:fl(co,{min:go,max:$t,step:1,value:e??go,readout:!1,ariaLabel:l(Qf),onChange:o})})}import{jsx as Ga}from"react/jsx-runtime";import{SettingsDefaultReset as l_,SettingsField as i_}from"efficient-easel/panel";import{IconPicker as c_}from"efficient-shell/ui";import{ShadowIcon as f_}from"efficient-easel/icons";var Jf={none:"None",soft:"Soft",lifted:"Lifted"},d_="Applies to cards \u2014 products, brands, journal entries and filter cells. Round things like swatches and status dots are never shadowed.",u_={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)"};function uy({value:e,onChange:o,showHint:t=!0}){let r=e===null,a=e??ic;return Ga(i_,{label:l("Card shadow"),icon:Ga(f_,{}),value:l(Jf[a]),changed:!r,action:Ga(l_,{words:X()?.panel,label:l("Card shadow"),changed:!r,detail:l(Jf[ic]),onReset:()=>o(null)}),hint:t?l(d_):void 0,children:Ga(c_,{label:l("Card shadow"),value:a,options:Mm.map(n=>({value:n,label:l(Jf[n]),icon:Ga("span",{className:"sf-shadow-chip border border-line bg-surface",style:{boxShadow:u_[n]}})})),onChange:o})})}import{jsx as py}from"react/jsx-runtime";import{ShadowIcon as p_}from"efficient-easel/icons";var m_="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 my({value:e,onChange:o,showHint:t=!0}){let r=e===null;return py(es,{label:l("Shadow color"),icon:py(p_,{}),value:e??"",inherited:fc,resetTo:fc,onChange:o,onReset:()=>o(null),hint:t?l(m_):void 0})}import{jsx as dl}from"react/jsx-runtime";import{SettingsDefaultReset as x_,SettingsField as h_}from"efficient-easel/panel";import{AlignSeparateIcon as I_}from"efficient-easel/icons";var g_="The space between the blocks inside a row, a grid or a box. Default means each one keeps the spacing it already has.",ed="Block gap",y_=Wr.Grid;function xy({value:e,onChange:o,showHint:t=!0}){let r=e===null;return dl(h_,{label:l(ed),labelId:"sf-block-gap",icon:dl(I_,{}),value:r?l("Default"):`${e}px`,changed:!r,action:dl(x_,{words:X()?.panel,label:l(ed),changed:!r,detail:l("each block's own spacing"),onReset:()=>o(null)}),hint:t?l(g_):void 0,children:dl(co,{min:nr.min,max:nr.max,step:nr.step,value:r?y_:e,readout:!1,ariaLabel:l(ed),onChange:o})})}import{jsx as ul}from"react/jsx-runtime";import{SettingsDefaultReset as b_,SettingsField as S_,SettingsSegmented as C_}from"efficient-easel/panel";import{HoverIcon as w_}from"efficient-easel/icons";var od={none:"None",lift:"Lift",highlight:"Highlight"},k_="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 hy({value:e,onChange:o,showHint:t=!0}){let r=e===null,a=e??cc;return ul(S_,{label:l("Hover effect"),icon:ul(w_,{}),value:l(od[a]),changed:!r,action:ul(b_,{words:X()?.panel,label:l("Hover effect"),changed:!r,detail:l(od[cc]),onReset:()=>o(null)}),hint:t?l(k_):void 0,children:ul(C_,{options:Hm.map(n=>({id:n,label:l(od[n])})),value:a,ariaLabel:l("Hover effect"),onChange:o})})}import{jsx as pl}from"react/jsx-runtime";import{SettingsDefaultReset as v_,SettingsField as T_,SettingsSegmented as P_}from"efficient-easel/panel";import{DropIcon as E_}from"efficient-easel/icons";var td="Photography",Iy={shot:"As shot",mono:"Black and white"},rd=[{grayscale:!1,label:Iy.shot},{grayscale:!0,label:Iy.mono}],O_="Black and white photographs return to color on hover. Wheels and tyres keep their real finish either way.";function gy({value:e,onChange:o,showHint:t=!0}){let r=e===null,a=e??!1;return pl(T_,{label:l(td),icon:pl(E_,{}),value:l(rd.find(n=>n.grayscale===a).label),changed:!r,action:pl(v_,{words:X()?.panel,label:l(td),changed:!r,detail:l(rd.find(n=>!n.grayscale).label),onReset:()=>o(null)}),hint:t?l(O_):void 0,children:pl(P_,{options:rd.map(n=>({id:n.grayscale,label:l(n.label)})),value:a,ariaLabel:l(td),onChange:o})})}import{jsx as ad}from"react/jsx-runtime";import{useId as F_}from"react";import{SettingsField as L_,SettingsSwitch as A_}from"efficient-easel/panel";import{ShareIcon as R_}from"efficient-easel/icons";var B_="Share button",__="On every blog post.";function yy({value:e,onChange:o,showHint:t=!0}){let r=F_();return ad(L_,{label:l(B_),labelId:r,icon:ad(R_,{}),action:ad(A_,{checked:e===!0,onChange:o,ariaLabelledBy:r}),hint:t?l(__):void 0})}import{jsx as ml}from"react/jsx-runtime";import{SettingsDefaultReset as K_,SettingsField as V_}from"efficient-easel/panel";import{PaddingXIcon as Y_}from"efficient-easel/icons";var je={min:1e3,max:2e3,step:50,default:1600};function D_(e){return{maxWidth:e,marginInline:"auto",width:"100%"}}var by="--sf-site-width",nd=`var(${by},${je.default}px)`,WJ=`max-w-[${nd}]`,GJ=`max-w-[${je.default}px]`;function N_(e){return typeof e!="number"||!Number.isFinite(e)?je.default:Math.round(Math.min(Math.max(e,je.min),je.max))}function UJ(e){let o=N_(e);return o===je.default?{}:{[by]:`${o}px`}}var jo={min:0,max:80,step:4,default:40},Sy="--sf-site-gutter",Oo=`var(${Sy},${jo.default}px)`,M_=`px-[${Oo}]`;var Rt={md:`min(24px,${Oo})`,sm:`min(20px,${Oo})`,frame:`min(24px,${Oo})`,tabs:`min(16px,${Oo})`},$J=[[`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-[${Oo}]`,"min-[800px]:px-10"],[`max-[720px]:px-[min(24px,${Oo})]`,"max-[720px]:px-6"],[`max-[800px]:-mx-[min(20px,${Oo})]`,"max-[800px]:-mx-5"],[`max-[720px]:-mx-[min(20px,${Oo})]`,"max-[720px]:-mx-5"],[`-mx-[${Oo}]`,"-mx-10"],[M_,"px-10"]];var jJ="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))]",qJ="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 H_(e){return typeof e!="number"||!Number.isFinite(e)?jo.default:Math.round(Math.min(Math.max(e,jo.min),jo.max))}function KJ(e){let o=H_(e);return o===jo.default?{}:{[Sy]:`${o}px`}}var Cy=nd,VJ=`max-w-[${Cy}]`,YJ=`max-w-[min(var(--sf-page-cap,${je.default}px),${je.default}px)]`,wy="--sf-hero-cap",z_=`var(${wy},none)`,XJ=`max-w-[${z_}]`,W_="--sf-hero-bleed-m",G_="--sf-hero-bleed-w",U_="--sf-hero-chrome-x",$_="--sf-hero-chrome-cap";function ZJ(e){return e===!0?{[wy]:Cy,[W_]:"auto",[G_]:"100%",[U_]:"24px",[$_]:"none"}:{}}var sd=`calc(${nd} - ${Oo}*2)`,QJ=`max-w-[${sd.replace(/ /g,"_")}]`;var j_="--sf-chrome-cap",q_=`var(${j_},${sd})`,JJ="data-page-width";function eee(e){return e==="full"?"full":null}function oee(e){return e==="full"?null:D_(e==="content"?sd:q_)}function tee(e){if(e==="full")return"full";if(e==="content")return"content"}var ld="Side space",id=jo.default,X_="The room left at the left and right edge of every page.";function ky({value:e,onChange:o,showHint:t=!0}){let r=e===null;return ml(V_,{label:l(ld),labelId:"sf-side-space",icon:ml(Y_,{}),value:`${e??id}px`,changed:!r,action:ml(K_,{words:X()?.panel,label:l(ld),changed:!r,detail:`${id}px`,onReset:()=>o(null)}),hint:t?l(X_):void 0,children:ml(co,{min:jo.min,max:jo.max,step:jo.step,value:e??id,readout:!1,ariaLabel:l(ld),onChange:o})})}import{jsx as cd}from"react/jsx-runtime";import{BACKGROUND_WIDTHS as pee,SettingsBackgroundWidth as Z_,SettingsContentWidth as Q_}from"efficient-easel/panel";var J_="Background width",eD="Content width";var xl=e=>l(sr[e==="content"?"page":"full"]),vy="The width of every section's background.",Ty="The width of every section's content.";function Py({value:e,changed:o,detail:t,onChange:r,onReset:a,hint:n,labelId:s}){return cd(Z_,{value:e,changed:o,detail:t,onChange:r,onReset:a,hint:n?l(n):void 0,labelId:s,words:{label:l(J_),full:xl("full"),content:xl("content")},resetWords:X()?.panel})}function Ey({mode:e,px:o,max:t=je.max,min:r=je.min,changed:a,detail:n,onMode:s,onPx:i,onReset:c,hint:d,labelId:m}){let x=l(eD),u=e!=="full"?cd(co,{min:r,max:t,step:je.step,value:Math.min(Math.max(o,r),t),onChange:i,suffix:"px",ariaLabel:x}):null;return cd(Q_,{mode:e,onMode:s,number:u,changed:a,detail:n,onReset:c,hint:d?l(d):void 0,labelId:m,words:{label:x,full:xl("full"),content:xl("content")},resetWords:X()?.panel})}import{jsx as Sb}from"react/jsx-runtime";import{TextStyleItem as pN,TextStylesGroup as mN}from"efficient-easel/text-styles";import{jsx as lN}from"react/jsx-runtime";import{useState as iN}from"react";import{TextStylesList as cN}from"efficient-easel/text-styles";import{usePreviewDevice as fN}from"efficient-easel/draw/client";import{defaultTextStyles as cb,textStyleCaseCss as oN}from"efficient-easel/text-styles/model";import{parseHexColor as tN}from"efficient-shell/format";import{textStyleCaseCss as dD,textStyleCaseOfCss as uD}from"efficient-easel/draw";import{parseHexColor as pD}from"efficient-shell/format";function fd(e,o){return o?`${e}[${o.index}].${o.rowKey}`:e}function Fo(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 md,encodePartId as bl}from"efficient-easel/draw";import{LINK_FIELD_MARKER as My,SCAFFOLD_FIELD_MARKER as Dy,TEXT_FIELD_MARKER as Sl}from"efficient-easel/draw";import{readHidable as Hy}from"efficient-easel/draw";import{SCALAR_TEXT_CONTROLS as lD}from"efficient-easel/draw";import{TEXT_FIELD_MARKER as sD}from"efficient-easel/draw";import{TEXT_FIELD_MARKER as Oy}from"efficient-easel/draw";import{readHidable as Fy}from"efficient-easel/draw";import{SCALAR_TEXT_CONTROLS as oD}from"efficient-easel/draw";var tD=oD,rD=["text","textarea"],aD=["textarea","plainTextarea"];function nD(e){return!e||typeof e!="object"?null:e[Oy]?.control??null}function Vr(e){let o=nD(e);return o&&tD.includes(o)?o:null}function hl(e){return aD.includes(e)}function Ly(e){return!e||typeof e!="object"?void 0:e[Oy]?.placeholder}function Il(e){return Fy(e).text}function dd(e,o,t){return rD.includes(e)?{text:t,hidden:Fy(o).hidden}:t}function Ay(e,o,t,r){return Il(e[o])===r?null:{...e,[o]:dd(t,e[o],r)}}function gl(e){if(!(!e||typeof e!="object"))return e[sD]}function ud(e){if(!e||typeof e!="object")return null;let o=e.arrayFields;return o&&typeof o=="object"?o:null}function Ry(e,o){if(!Array.isArray(o))return[];let t=gl(e),r=[];if(t?.control==="textList"){let n=t.itemKey??"text";return o.forEach((s,i)=>{let c=pe(s?.[n]);c&&r.push({row:{index:i,rowKey:n},text:c})}),r}let a=ud(e);return a?(o.forEach((n,s)=>{for(let[i,c]of Object.entries(a)){if(!Vr(c))continue;let d=Il(n?.[i])||gl(c)?.placeholder||"";d&&r.push({row:{index:s,rowKey:i},text:d})}}),r):[]}function Ua(e,o){if(Array.isArray(e))return e[o.index]?.[o.rowKey]}function pd(e,o,t,r){let a=e[o];return!Array.isArray(a)||t.index<0||t.index>=a.length?null:{...e,[o]:a.map((n,s)=>s===t.index?{...n,[t.rowKey]:r}:n)}}function By(e,o,t,r,a){let n=Ua(e[o],t);return Il(n)===a?null:pd(e,o,t,dd(r,n,a))}function _y(e,o){return o?`${e} \xB7 row ${o.index+1}`:e}var Lo="data-sf-part",Mee="data-sf-region-part",Hee="data-sf-part-row";function zee(e,o){return`${e}[${o}]`}var Wee="data-sf-part-kind",iD="data-sf-part-style-owner",cD="data-sf-part-style-kind";function Gee(e){for(let o=e;o;o=o.parentElement){let t=o.getAttribute(iD),r=o.getAttribute(cD);if(t&&r)return{owner:t,kind:r};if(o.getAttribute("data-easel-block"))return null}return null}var Ny=2;function Yr(e){return Ra(e).replace(/\s+/gu,"")}function yl(e,o,t){let r=e[Sl];if(r){if(r.control==="textList"){let n=r.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:a}=Hy(o);a?t.push(a):r.placeholder&&t.push(r.placeholder);return}if(!e[My]){if(e.type==="text"||e.type==="textarea"){let a=pe(o);a&&t.push(a);return}if(e.arrayFields&&Array.isArray(o)){for(let a of o)for(let[n,s]of Object.entries(e.arrayFields))yl(s,a?.[n],t);return}if(e.objectFields&&o&&typeof o=="object")for(let[a,n]of Object.entries(e.objectFields))yl(n,o[a],t)}}function zy(e){if(!e||typeof e!="object")return!1;let o=e;return o[My]?!1:!!o[Sl]||o.type==="text"||o.type==="textarea"}function Cl(e,o){let t=e[Sl];return t?.label?t.label:typeof e.label=="string"?e.label:o}function xd(e){let o=e.indexOf(" (");return(o>0?e.slice(0,o):e).trim()}function Uee(e,o){if(!e)return[];let t=[];for(let[r,a]of Object.entries(e)){if(!a||typeof a!="object"||Ba(r))continue;let n=a,s=[];yl(n,o?.[r],s),!s.length&&n[Dy]!==void 0&&yl(n,n[Dy],s);let i=Cl(n,r),c=new Set;for(let{row:x,text:u}of Ry(n,o?.[r])){let h=Yr(u);h.length<Ny||(c.add(h),t.push({key:r,label:i,texts:[h],row:x}))}let d=new Set(c),m=[];for(let x of s){let u=Yr(x);u.length<Ny||d.has(u)||(d.add(u),m.push(u))}m.length&&t.push({key:r,label:i,texts:m})}return t}function hd(e){return!e.offPage&&!e.hidden}var fD=lD;function Wy(e,o){if(!o||typeof o!="object"||Ba(e)||Bh(o))return null;let t=o[Sl];return!t||!fD.includes(t.control)?null:t}function $ee(e,o){let t=Wy(e,o);return t!==null&&t.identifier!==!0}function Gy(e,o){if(!e)return[];let t=[];for(let[r,a]of Object.entries(e)){let n=Wy(r,a);if(!n)continue;let{text:s,hidden:i}=Hy(o?.[r]);if(hd({offPage:n.offPage===!0,hidden:!!i}))continue;let c=s||n.placeholder||"",d=Ra(c).replace(/\s+/gu," ").trim();t.push({key:r,label:xd(Cl(a,r)),preview:d,offPage:n.offPage===!0,identifier:n.identifier===!0,hidden:!!i})}return t}var gd="_partStyles",bd="data-sf-part-styled",Xr="data-sf-text-style",mD=/^(heading|body)-[1-7]$/;function Zr(e){return typeof e=="string"&&mD.test(e)}var vl={heading:"heading-1",heading2:"heading-2",heading3:"heading-3",body:"body-1",label:"body-5"};function xD(e){if(!e)return null;for(let[o,t]of Object.entries(vl))if(t===e)return o;return null}function Qy(e){if(Zr(e.textStyle))return e.textStyle;let o=Jo(e.role);return o?vl[o]:void 0}var hD=[400,500,600,700],wl=["left","center","right","justify"],Uy=5,$y=1e3,ID=-5,gD=10,Sd=0,Cd=64,wd=2,jy={size:{min:Uy,max:$y,step:1},sizePhone:{min:Uy,max:$y,step:1},padding:{min:Sd,max:Cd,step:wd}},yD=.05,bD=.01,SD=["line","letter"],CD=.5,wD=2.5,kD=-1,vD=1,TD=0,PD=400,ED=[...new Set(Object.values(uc))];function ja(e){return!e||typeof e!="object"||Array.isArray(e)?null:e}function Jy(e){return ja(e?.[gd])??{}}function Tl(e,o){let t=Jy(e);return Object.hasOwn(t,o)?ja(t[o])??{}:{}}function eb(e,o,t){let r={...Jy(e)};if(OD(t).length?r[o]=t:delete r[o],!Object.keys(r).length){let{[gd]:a,...n}=e;return n}return{...e,[gd]:r}}function OD(e){return Object.entries(e).filter(([,o])=>o!==void 0)}function FD(e){return SD.includes(e)}var $a=(e,o,t)=>Math.min(t,Math.max(o,e));function LD(e,o){if(FD(e)){let t=Math.round(Number(o));return!Number.isFinite(t)||t===0?null:$a(t,ID,gD)}if(e==="lineHeight"){let t=Number(o);return Number.isFinite(t)?Qr($a(t,CD,wD),3):null}if(e==="letterSpacing"){let t=Number(o);return Number.isFinite(t)?Qr($a(t,kD,vD),4):null}if(e==="paragraphSpacing"){let t=Math.round(Number(o));return!Number.isFinite(t)||t<=0?null:$a(t,TD,PD)}if(Object.hasOwn(jy,e)){let{min:t,max:r}=jy[e],a=Math.round(Number(o));return Number.isFinite(a)?$a(a,t,r):null}return e==="italic"?typeof o=="boolean"?o:null:e==="role"||e==="fontRole"?Jo(o)?o:null:e==="sizeToken"?vd(o)?o:null:e==="textStyle"?Zr(o)?o:null:e==="alignPhone"?wl.includes(o)?o:null:o}var AD=["weight","size","sizePhone","line","letter","lineHeight","letterSpacing","paragraphSpacing","padding"];function kd(e){let o=null,t=r=>{o??={...e},delete o[r]};for(let r of AD){let a=e[r];a!==void 0&&!(typeof a=="number"&&Number.isFinite(a))&&t(r)}return e.align!==void 0&&!wl.includes(e.align)&&t("align"),e.alignPhone!==void 0&&!wl.includes(e.alignPhone)&&t("alignPhone"),e.textStyle!==void 0&&!Zr(e.textStyle)&&t("textStyle"),e.sizeToken!==void 0&&!vd(e.sizeToken)&&t("sizeToken"),e.fontRole!==void 0&&!Jo(e.fontRole)&&t("fontRole"),o??e}function vd(e){if(!e||typeof e!="object")return!1;let{step:o,px:t,stepPhone:r,pxPhone:a,fluid:n}=e,s=c=>typeof c=="number"&&Number.isFinite(c)&&c>0,i=c=>typeof c=="string"&&ED.includes(c);return i(o)&&s(t)&&(r===void 0||i(r))&&(a===void 0||s(a))&&(n===void 0||RD(n,t))}function RD(e,o){if(!e||typeof e!="object"||Array.isArray(e))return!1;let{minPx:t,vw:r,...a}=e;return Object.keys(a).length===0&&typeof t=="number"&&Number.isFinite(t)&&t>0&&t<o&&typeof r=="number"&&Number.isFinite(r)&&r>0&&r<=100}function ob(e){return e?.pxPhone&&vd(e)?{step:e.stepPhone??e.step,px:e.pxPhone}:null}function tb({step:e,px:o,fluid:t}){let r=t?`clamp(${t.minPx}px, ${t.vw}vw, ${o}px)`:`${o}px`,a=`var(--size-${e}, ${r})`;return e.startsWith("heading")?`min(${a}, var(--sf-heading-max,9999px))`:a}var BD=[["font","role"],["font","fontRole"],["role","textStyle"],["line","lineHeight"],["letter","letterSpacing"]];function _D(e){let o=[];for(let[t,r]of BD)t===e?o.push(r):r===e&&o.push(t);return o}function Jr(e,o,t,r){let a={...Tl(e,o)},n=r==null?null:LD(t,r);if(n===null)delete a[t];else{a[t]=n;for(let s of _D(t))delete a[s]}return eb(e,o,a)}function rb(e,o){return eb(e,o,{})}function DD(e){return uD(e)??"none"}function ND(e){return dD(e)??""}var qy={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 MD(e,o){return Jo(e.role)||(o?.blockDrawsStyle?null:xD(e.textStyle))}function ab(e,o){return e==="Text"&&o==="text"}var HD={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 zD(e){let o=uc[e],t=HD[o];return t?`var(--size-${o}, ${t})`:`var(--size-${o})`}function Ka(e){let o={};return typeof e.lineHeight=="number"?o.lineHeight=e.lineHeight:e.line&&(o.lineHeight=Qr(WD+e.line*yD,3)),typeof e.letterSpacing=="number"?o.letterSpacingEm=e.letterSpacing:e.letter&&(o.letterSpacingEm=Qr(e.letter*bD,4)),o}var WD=1,cr="--sf-part-para";function Ky(e){e=kd(e);let o={};if(typeof e.sizePhone=="number"&&e.sizePhone>0)o.fontSize=`${e.sizePhone}px`;else{let t=ob(e.sizeToken);t&&(o.fontSize=tb(t))}return e.alignPhone&&(o.textAlign=e.alignPhone),o}function GD(e,o){if(!o)return e;let t=kd(e),r=e;if(typeof t.sizePhone=="number"&&t.sizePhone>0)r={...r,size:t.sizePhone};else{let a=ob(t.sizeToken);a&&(r={...r,size:void 0,sizeToken:a})}return t.alignPhone&&(r={...r,align:t.alignPhone}),r}function kl(e,o,t){e=kd(e);let r=MD(e,t),a=Ka(e),n=e.size?`${e.size}px`:e.sizeToken?tb(e.sizeToken):r?zD(r):"";return{fontFamily:e.font?qD(e.font):e.fontRole?`var(${qy[e.fontRole]})`:r?`var(${qy[r]})`:"",fontWeight:e.weight?String(e.weight):"",fontSize:n,minWidth:n?"0":"",overflowWrap:n?"break-word":"",lineHeight:a.lineHeight!==void 0?String(a.lineHeight):"",letterSpacing:a.letterSpacingEm!==void 0?`${a.letterSpacingEm}em`:"",[cr]:e.paragraphSpacing?`${e.paragraphSpacing}px`:"",textTransform:ND(e.case),textAlign:e.align??"",paddingTop:Vy(e.padding),paddingBottom:Vy(e.padding),color:UD(e.color),fontStyle:e.italic===!0?"italic":e.italic===!1?"normal":""}}var UD=e=>e===void 0||e===""?"":Object.hasOwn(ot,e)?ot[e]:pD(e)===e.toLowerCase()?e:"",Vy=e=>e===void 0?"":`${e}px`,Qr=(e,o)=>Number(e.toFixed(o));function Jee(e,o){let t=Number.parseFloat(e.fontSize)||16,r=Number.parseFloat(e.lineHeight),a=Number.parseFloat(e.letterSpacing),n=Number.parseFloat(e.paddingTop);return{fontKey:o,sizePx:t,weight:$D(Number.parseInt(e.fontWeight,10)),lineRatio:Number.isFinite(r)?Qr(r/t,3):1.2,letterEm:Number.isFinite(a)?Qr(a/t,4):0,align:jD(e.textAlign),case:DD(e.textTransform),paddingPx:Number.isFinite(n)?Math.round(n):0}}function $D(e){return Number.isFinite(e)?hD.reduce((o,t)=>Math.abs(t-e)<Math.abs(o-e)?t:o):400}function jD(e){for(let o of wl)if(o===e)return o;return e==="end"?"right":"left"}function eoe(e,o){let t=Yy(e);if(!t)return"";for(let r of ko)if(Yy(o(r.cssVar))===t)return r.key;return""}var Yy=e=>(e.split(",")[0]??"").replace(/["']/g,"").replace(/\s+/g," ").trim().toLowerCase();function qD(e){let o=Er(e);return o?`var(${o.cssVar})`:""}function ooe(e,o,t,r){return!o||md(o)?.nodeId!==e?null:t.find(a=>r(a.getAttribute("class")))??t[0]??null}function toe(e,o,t=()=>qa,r=i=>i,a=YD,n=!1,s=()=>!1){let i=0;for(let{element:c,partId:d}of e){let m=md(d)?.propKey;if(!m)continue;let x=r(m),u=Object.hasOwn(o,x)?ja(o[x])??{}:{},h=kl(GD(u,n),qa,{blockDrawsStyle:s(m)});Zr(u.textStyle)?c.setAttribute?.(Xr,u.textStyle):c.removeAttribute?.(Xr);let g=Id.some(P=>c.style[P]),k=!1;for(let[P,O]of Object.entries(h))XD(c,P,O),O&&(k=!0);if(g||Id.some(P=>h[P]))for(let P of KD(c,a))for(let O of Id)P.style[O]=h[O]??"";k&&(i+=1)}return i}function KD(e,o){let t=Yr(e.textContent??""),r=[],a=e;for(let n=0;n<VD&&o(a);n+=1){let s=a.parentElement;if(!s||Yr(s.textContent??"")!==t)break;r.push(s),a=s}return r}var VD=8;function YD(e){let o=e;return typeof window>"u"||!o?.ownerDocument?!1:window.getComputedStyle(o).display==="inline"}var qa={fontKey:"",sizePx:16,weight:400,lineRatio:1,letterEm:0,align:"left",case:"none",paddingPx:0};function XD(e,o,t){if(!o.startsWith("--")){e.style[o]=t;return}let r=e.style;typeof r.setProperty=="function"?t?r.setProperty(o,t):r.removeProperty?.(o):r[o]=t;let a=e;o===cr&&(t?a.setAttribute?.(Xy,""):a.removeAttribute?.(Xy))}var Xy="data-sf-part-para",ZD=Object.keys(kl({},qa)),yd=new Set(["color","overflowWrap",cr,"fontStyle"]),Id=ZD.filter(e=>!yd.has(e));function nb(e,o,t,r=n=>n,a=()=>!1){let n=new Map;for(let c of e){let d=fd(c.key,c.row);for(let m of c.texts){let x=n.get(m);x?(x.keys.add(c.key),x.partKeys.add(d)):n.set(m,{keys:new Set([c.key]),partKeys:new Set([d])})}}let s=new Map;for(let c of Object.keys(o)){if(!QD(c))continue;let d=ja(o[c])??{},m=kl(d,qa),x=Ky(d),u=Zr(d.textStyle)?d.textStyle:void 0;!Object.values(m).some(Boolean)&&!Object.keys(x).length&&!u||s.set(c,{stamp:Zy(t,c),declarations:m,...Object.keys(x).length?{phone:x}:{},...u?{textStyle:u}:{}})}let i=new Map;for(let[c,{keys:d,partKeys:m}]of n){let x=m.size===1?[...m][0]:d.size===1?[...d][0]:null;if(!x)continue;let u=r(x);if(!Object.hasOwn(o,u))continue;let h=ja(o[u])??{},g=kl(h,qa,{blockDrawsStyle:a(x)}),k=Ky(h),P=Zr(h.textStyle)?h.textStyle:void 0;!Object.values(g).some(Boolean)&&!Object.keys(k).length&&!P||i.set(c,{stamp:Zy(t,x),declarations:g,...Object.keys(k).length?{phone:k}:{},...P?{textStyle:P}:{}})}return i.size||s.size?{rules:i,kindRules:s,drawn:new Set(n.keys())}:null}function QD(e){return e.startsWith("@")}function Td(e,o){return e?.kindRules.get(o)??null}function Zy(e,o){let t=r=>r.replace(/[^A-Za-z0-9_-]+/g,"-");return`${t(e)}~${t(o)}`}function Pd(e){let o=[],t=new Set,r=a=>{let{stamp:n,declarations:s}=a;if(t.has(n))return;t.add(n);let i=Object.entries(s).filter(([,h])=>h!==""),c=h=>h.map(([g,k])=>`${JD(g)}: ${k}`).join("; "),d=`[${bd}="${n}"]`,m=i.filter(([h])=>!yd.has(h)),x=i.filter(([h])=>yd.has(h));m.length&&o.push(`${d}, *:has(> ${d}) { ${c(m)} }`),x.length&&o.push(`${d} { ${c(x)} }`),s[cr]&&(o.push(`*:has(> ${d}) { ${cr}: ${s[cr]} }`),o.push(...Ed(d,`*:has(> ${d})`)));let u=Object.entries(a.phone??{}).filter(([,h])=>h!=="");u.length&&o.push(`@media ${Ls} { ${d}, *:has(> ${d}) { ${c(u)} } }`)};for(let a of e.rules.values())r(a);for(let a of e.kindRules.values())r(a);return o.join(`
|
|
4
|
+
`)}function Ed(e,o){let t=`var(${cr})`,r=":is([data-sf-bullet], [data-sf-number])";return[`${e} br:not(br + br) { display: block; content: ""; margin-top: ${t} }`,`${e} ${r}:not(:first-child) { margin-top: ${t} }`,`${e} ${r}:not(:last-child) { margin-bottom: ${t} }`,`:is(${o}) + :is(${o}) { margin-top: ${t} }`]}var JD=e=>e.replace(/[A-Z]/g,o=>`-${o.toLowerCase()}`);function sb(e,o){if(!e)return null;let t=Yr(o),r=e.rules.get(t);if(r)return r;if(t.length<eN||e.drawn.has(t))return null;let a=null;for(let[n,s]of e.rules)if(n.includes(t)){if(a&&a.stamp!==s.stamp)return null;a=s}return a}var eN=8;function lb(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 Od=e=>e==="sentence"?"none":void 0,fb=["font","color","size","sizePhone","weight","italic","lineHeight","letterSpacing","paragraphSpacing","letterCase","largestSize"];function qo(e){let o={};for(let t of fb)e[t]!==void 0&&(o[t]=e[t]);return o}function Ld(e,o){let{auto:t,...r}=e,a=new Set(o??[]),n=fb.filter(s=>a.has(s)&&e.values[s]===void 0);return n.length?{...r,auto:n}:r}function db(e){let o=e.fonts,t=e.sizes,r=e.typography,a=Wm(e.compression),n={"heading-1":{font:pe(o.heading),size:$(t.headingLarge),weight:$(r.weight),lineHeight:a.lineHeight,letterSpacing:a.letterSpacing,letterCase:Od(r.case),largestSize:$(r.maxPx)},"heading-2":{font:pe(o.heading2),size:$(t.headingMedium),weight:$(r.weight2),lineHeight:a.lineHeight,letterSpacing:a.letterSpacing,letterCase:Od(r.case2)},"heading-3":{font:pe(o.heading3),size:$(t.headingSmall),weight:$(r.weight3),lineHeight:a.lineHeight,letterSpacing:a.letterSpacing,letterCase:Od(r.case3)},"body-1":{font:pe(o.body),size:$(t.body)},"body-5":{font:pe(o.label),size:$(t.label)}};return cb().map(({id:s,kind:i,name:c})=>({id:s,kind:i,name:c,values:qo(n[s]??{})}))}function Ad(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=>Ld({...o,values:qo(o.values??{})},Array.isArray(o.auto)?o.auto:void 0)):null}function moe(e){return Ad(e)??[]}function ub(e){return Ad(e)??cb().map(({id:o,kind:t,name:r})=>({id:o,kind:t,name:r,values:{}}))}function Bt(e,o){let t=db(o),r=Ad(e);return r?r.map(a=>{let n={...Fd(t,a.id)};for(let s of a.auto??[])delete n[s];return{...a,values:qo({...n,...a.values})}}):t}var Fd=(e,o)=>e.find(t=>t.id===o)?.values??{},ib=["heading-1","heading-2","heading-3"];function pb({saved:e,old:o,cur:t,next:r,sizeOf:a}){let n=db(o),s=ub(e),i=Bt(s,o),c=[],d=r.map(x=>{let u=t.find(I=>I.id===x.id),h=s.find(I=>I.id===x.id);if(!u||!h)return rN([x],a)[0];let g={...h.values},k=new Set(h.auto??[]),P=x.values,O=u.values,w=[...new Set([...Object.keys(P),...Object.keys(O)])].filter(I=>JSON.stringify(P[I])!==JSON.stringify(O[I]));w.sort((I,b)=>+(I==="letterSpacing")-+(b==="letterSpacing"));for(let I of w){let b=I==="lineSpacing"?"lineHeight":I,v=P[I];if(v===void 0){delete g[b],Fd(n,x.id)[b]!==void 0&&(c.push([x.id,b]),k.add(b));continue}if(k.delete(b),I==="lineSpacing")g.lineHeight=ea(v/100,3);else if(I==="letterSpacing"){let S=i.find(A=>A.id===x.id),E=a({...x,values:qo({...S?.values??{},...g})});g.letterSpacing=E?ea(v/E,4):0}else g[b]=v}return Ld({id:x.id,kind:x.kind,name:x.name,values:qo(g)},k)}),m=o.compression;if(c.some(([x,u])=>(u==="lineHeight"||u==="letterSpacing")&&ib.includes(x))&&jt(m)!=="normal"){for(let x of ib){let u=d.find(g=>g.id===x);if(!u)continue;let h={...u.values};for(let g of["lineHeight","letterSpacing"])c.some(([k,P])=>k===x&&P===g)||h[g]===void 0&&!(u.auto??[]).includes(g)&&(h[g]=Fd(n,x)[g]);u.values=qo(h)}m="normal"}return{saved:d,old:{...o,compression:m}}}function mb(e,o){let t={text_styles:e.saved};return e.old.compression!==o.compression&&(t.heading_compression=jt(e.old.compression)),t}var ea=(e,o)=>Number(e.toFixed(o));function xb(e,o){return e.map(t=>{let{lineHeight:r,letterSpacing:a,...n}=t.values,s={...n};return r!==void 0&&(s.lineSpacing=ea(r*100,1)),a!==void 0&&(s.letterSpacing=ea(a*o(t),2)),{id:t.id,kind:t.kind,name:t.name,values:s}})}function rN(e,o){return e.map(t=>{let{lineSpacing:r,letterSpacing:a,...n}=t.values,s={id:t.id,kind:t.kind,name:t.name,values:qo({...n})},i={...s.values};if(r!==void 0&&(i.lineHeight=ea(r/100,3)),a!==void 0){let c=o({...s,values:{...s.values}});i.letterSpacing=c?ea(a/c,4):0}return{...s,values:qo(i)}})}function xoe(e){let o={fonts:Ta({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:lc({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:jt(e.heading_compression),typography:Um(e)},t=e.text_styles??null,r=Array.isArray(t)?Rd(Bt(t,o),o):o;return{fonts:Ta(r.fonts),sizes:lc(r.sizes),compression:jt(r.compression),typography:r.typography,textStyles:t}}function Rd(e,o){let t=u=>e.find(h=>h.id===u)?.values??{},r=t("heading-1"),a=t("heading-2"),n=t("heading-3"),s=t("body-1"),i=t("body-5"),c=o.fonts,d=o.sizes,m=o.typography,x=u=>u==="none"?"sentence":"authored";return{fonts:{...c,heading:r.font??c.heading,heading2:a.font??r.font??c.heading2,heading3:n.font??r.font??c.heading3,body:s.font??c.body,label:i.font??c.label},sizes:{...d,headingLarge:r.size??null,headingMedium:a.size??null,headingSmall:n.size??null,body:s.size??null,label:i.size??null},compression:o.compression,typography:{...m,case:x(r.letterCase),weight:r.weight??null,maxPx:r.largestSize??null,weight2:a.weight??null,weight3:n.weight??null,case2:x(a.letterCase),case3:x(n.letterCase)}}}function aN(e){return e==="accent"?"var(--accent)":e==="text"?"var(--fg)":e==="labels"?"var(--fg-dim)":tN(e)===e.toLowerCase()?e:null}function hoe(e){let o=[];for(let t of e){let r=t.values,a=`.${lb(t)}`,n=`[${Xr}="${t.id}"]`,s=`${a}, ${n}`,i=[],c=r.font!==void 0?ko.find(u=>u.key===r.font)?.cssVar:void 0;if(c&&i.push(`font-family: var(${c})`),r.size!==void 0){let u=r.largestSize!==void 0?Math.min(r.size,r.largestSize):r.size;i.push(`font-size: ${u}px`)}let d=r.color!==void 0?aN(r.color):null;d&&i.push(`color: ${d}`),r.italic===!0&&i.push("font-style: italic"),r.weight!==void 0&&i.push(`font-weight: ${r.weight}`);let m=[];r.lineHeight!==void 0&&m.push(`line-height: ${r.lineHeight}`),r.letterSpacing!==void 0&&m.push(`letter-spacing: ${r.letterSpacing}em`),t.kind==="body"&&i.push(...m);let x=oN(r.letterCase);if(x&&t.kind==="body"&&i.push(`text-transform: ${x}`),r.paragraphSpacing&&i.push(`--sf-part-para: ${r.paragraphSpacing}px`),i.length&&o.push(`${s} { ${i.join("; ")} }`),t.kind==="heading"&&m.length&&o.push(`${s}, ${a}:is(h1, h2, h3, h4), ${n}:is(h1, h2, h3, h4) { ${m.join("; ")} }`),t.kind==="heading"&&x&&o.push(`${n}, ${a}:is(h1, h2, h3, h4) { text-transform: ${x} }`),r.paragraphSpacing&&(o.push(`*:has(> ${n}) { --sf-part-para: ${r.paragraphSpacing}px }`),o.push(...Ed(`:is(${s})`,`*:has(> ${n})`))),r.sizePhone!==void 0){let u=nN[t.id],h=[`${s} { font-size: ${r.sizePhone}px }`];u&&h.push(`.sf-themed-content { --size-${u}: ${r.sizePhone}px !important }`),o.push(`@media ${Ls} { ${h.join(" ")} }`)}}return o.join(`
|
|
5
|
+
`)}var nN={"heading-1":"headingLarge","heading-2":"headingMedium","heading-3":"headingSmall","body-1":"body","body-5":"label"};function Ioe(e){return e!==!0&&e!==!1?"":`em.text-accent { font-style: ${e?"italic":"normal"} }`}function hb(e){return e?vl[e]:void 0}function Bd(e){let o=Ka(e);return qo({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 Ib(e){return Object.keys(Bd(e)).length>0}function gb({saved:e,old:o,styleId:t,values:r}){let a=ub(e);return{saved:sN(a,t,r),old:o}}function sN(e,o,t){return e.map(r=>r.id===o?Ld({...r,values:qo({...r.values,...t})},r.auto):r)}var yb=["font","color","size","weight","emphasis","lineSpacing","letterSpacing","paragraphSpacing","letterCase","largestSize"],dN=["size","lineSpacing","letterSpacing","letterCase"],uN=500,_d=ko.map(e=>({value:e.key,label:e.label,family:`var(${e.cssVar})`,italic:e.italicLoaded}));function bb({saved:e,old:o,colours:t,sizeOf:r,onChange:a,openId:n,onOpenChange:s,readOnly:i=!1,withoutSize:c=!1}){let[d,m]=iN(null),x=fN()==="mobile",u=Bt(e,o),h=xb(u,r);return lN(cN,{styles:h,onChange:g=>a(pb({saved:e,old:o,cur:h,next:g,sizeOf:r})),fonts:_d,colours:t,settings:c?yb.filter(g=>g!=="size"):yb,auto:dN,openId:n===void 0?d:n,onOpenChange:s??m,readOnly:i,device:x?"phone":"desktop",fallback:g=>{let k=u.find(O=>O.id===(g.kind==="heading"?"heading-1":"body-1")),P={};return k?.values.font&&g.id!==k.id&&(P.font=k.values.font),g.kind==="heading"&&(P.weight=uN),P}})}var Cb=["font","size","weight","emphasis"],xN=500;function hN({font:e,size:o,weight:t,italic:r}){let a={font:e};return o!==null&&(a.size=o),t!==null&&(a.weight=t),r!==null&&(a.italic=r),{id:"accent",kind:"heading",name:l("Accent"),values:a}}function IN(e,o){let t=[],r=e.values,a=o.values;return a.font!==r.font&&a.font!==void 0&&t.push({key:"font",value:a.font}),a.size!==r.size&&t.push({key:"size",value:a.size??null}),a.weight!==r.weight&&t.push({key:"weight",value:a.weight??null}),a.italic!==r.italic&&t.push({key:"italic",value:a.italic??null}),t}function wb(e){let{headingWeight:o,open:t,onOpenChange:r,onChange:a,withoutSize:n=!1}=e,s=hN(e);return Sb(mN,{label:l("Accent"),children:Sb(pN,{style:s,fonts:_d,settings:n?Cb.filter(i=>i!=="size"):Cb,auto:["size"],fallback:()=>({weight:o??xN}),open:t,onOpenChange:r,onChange:i=>IN(s,i).forEach(a)})})}import{Button as GN,EmptyState as UN,Tabs as $N,Tooltip as _te,tabButtonId as jN,tabPanelId as qN}from"efficient-shell/ui";import{ContrastIcon as KN,NoteIcon as VN,SettingsIcon as YN,TypeIcon as XN}from"efficient-easel/icons";function kb(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 Hd}from"react/jsx-runtime";import{ListIcon as FN,PaddingTopIcon as LN}from"efficient-easel/icons";import{jsx as Pl}from"react/jsx-runtime";import{SettingsDefaultReset as gN,SettingsField as yN,SettingsSegmented as bN}from"efficient-easel/panel";import{WidthIcon as SN}from"efficient-easel/icons";function vb({value:e,resolved:o,onChange:t,label:r="Width",labelId:a,followsLabel:n,hint:s}){let i=e===void 0,c=i?o:e,d=l(r);return Pl(yN,{label:d,labelId:a,icon:Pl(SN,{}),value:i?n:void 0,changed:!i,action:Pl(gN,{words:X()?.panel,label:d,changed:!i,onReset:()=>t(void 0)}),hint:s,children:Pl(bN,{options:[{label:l(sr.full),id:"full"},{label:l(sr.page),id:"content"}],value:c,ariaLabel:d,onChange:t})})}import{HEADER_TYPE as Dd,FOOTER_TYPE as CN}from"efficient-easel/draw";var wN=new Set(["Hero","HeroSingle","IntroBleed"]),Tb={min:56,max:140,default:88},zoe={min:0,max:120,step:2,default:32},Woe=`var(--sf-header-h, ${Tb.default}px)`,kN="--sf-header-set-h",Goe="--sf-header-h",Uoe=`var(${kN}, ${Tb.default}px)`,$oe="sf-header-clearance",joe="sf-sticky-underheader";function vN(e){return e?.find(o=>o?.type&&o.type!==Dd)??null}function Pb(e){let o=vN(e)?.type;return!o||!wN.has(o)}function qoe(e){return!Pb(e)}function Koe(e){return!!e?.some(o=>o?.type===Dd)}function Voe(e){return!e||e.length===0?!1:!e.some(o=>o?.type===Dd||o?.type===CN)}var TN=["auto","shared","own"],Nd="auto",PN="topSpace",Yoe="data-top-space";function EN(e){return TN.includes(e)?e:Nd}function ON(e,o){let t=EN(e?.props?.[PN]);return t==="own"?!0:t==="shared"?!1:Pb(o)}function Xoe(e,o){return ON(e,o)?"own":null}function AN(){return{type:"custom",render:({value:e,onChange:o})=>Hd(vb,{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 RN=[{label:"Auto",value:"auto"},{label:"Shared",value:"shared"},{label:"Its own",value:"own"}],lte={pageBackground:sy(),topSpace:at("Top space",Hd(LN,{}),RN,Nd),widthChoice:AN()},Va=["pageBackground","topSpace","widthChoice"],BN="Record type",Md=new Map,Eb=-1;function _N(e){Eb!==Fc()&&(Md.clear(),Eb=Fc());let o=Oc(),t=o.some(a=>a.key===e)?"":e,r=Md.get(t);return r||(r=at(BN,Hd(FN,{}),[...o.map(a=>({label:a.label,value:a.key})),...t?[{label:t,value:t}]:[]],Yt),Md.set(t,r)),r}var Ob=new WeakMap;function ite(e,o){if(!ls()||Oc().length<2||ns in e)return e;let t=_N(Lc(o)),r=Ob.get(e);if(r&&r.row===t)return r.fields;let a={[ns]:t,...e};return Ob.set(e,{row:t,fields:a}),a}import{previewFrame as ZN}from"efficient-easel/screen/lib/document/preview-dom";import{useEasel as DN}from"efficient-easel/easel";function El({themeFromDocument:e,persist:o}){let{appState:t,dispatch:r}=DN(E=>E),{fonts:a,setFonts:n,sizes:s,setSizes:i,headingCompression:c,setHeadingCompression:d,headingTypography:m,setHeadingTypography:x,textStyles:u,setTextStyles:h}=oe(),g=t.data,k=g.root?.props??{},P=e?Ta(k.fonts):a,O=e?_m:s,w=e?jt(k.headingCompression):c,I=e?Gm(k.headingTypography):m,b={fonts:P,sizes:O,compression:w,typography:I},v=e?k.textStyles:u,S=E=>r({type:"replaceRoot",root:{...g.root,props:{...k,...E}},recordHistory:!0});return{fonts:P,sizes:O,compression:w,typography:I,old:b,saved:v,write:(E,A)=>{let N=Rd(Bt(E.saved,E.old),E.old);e?S({textStyles:E.saved,fonts:N.fonts,headingCompression:N.compression,headingTypography:N.typography}):(h(E.saved),n(N.fonts),i(N.sizes),d(N.compression),x(N.typography)),o(mb(E,b),A)},writeRoot:S}}var Wd="sf-site-styles",QN="sf-site-styles-tabpanel",Gd=!1,JN="Show hints";function Ud({shown:e,onChange:o}){return Q("div",{className:"sf-hints",children:Q(GN,{type:"button",variant:"ghost","aria-pressed":e,leftIcon:Q(VN,{size:13}),onClick:()=>o(!e),children:l(JN)})})}var Ab="text",ta="basics",Fb="this-page-group",oa=[{id:ta,label:"Basics",icon:Q(YN,{})},{id:"theme",label:"Theme",icon:Q(KN,{})},{id:"text",label:"Text",icon:Q(XN,{})}];function e2({themeFromDocument:e,persist:o}){let{appState:t,dispatch:r}=Lb(d=>d),{theme:a,setTheme:n}=oe(),s=t.data,i=s.root?.props??{},c=d=>{if(e){let m={...i,theme:d};r({type:"replaceRoot",root:{...s.root,props:m},recordHistory:!0})}else n(d);o({selected_preset:d.selected,theme_presets:d.themes})};return Q(Cx,{value:e?i.theme:a,onChange:c})}function o2({themeFromDocument:e,persist:o}){let[t,r]=Ol(null),{theme:a,setFonts:n,setSizes:s,setHeadingTypography:i}=oe(),c=El({themeFromDocument:e,persist:o}),{old:d,saved:m,writeRoot:x}=c,u=c.fonts,h=c.sizes,g=c.typography,k=S=>S.values.size??s2(r2[S.id]??"body")??a2[S.kind],P=S=>c.write(S),O=t2(a),w=S=>{let E={...u,accent:S};e?x({fonts:E}):n(E),o({accent_font:S})},I=S=>{s({...h,accent:S}),o({accent_size_px:S})},b=S=>{let E={...g,weightStrong:S};e?x({headingTypography:E}):i(E),o({heading_weight_strong:S})},v=S=>{let E={...g,italicStrong:S};e?x({headingTypography:E}):i(E),o({accent_italic:S})};return fr(dr,{children:[Q(bb,{saved:m,old:d,colours:O,sizeOf:k,onChange:P,openId:t===zd?null:t,onOpenChange:r,withoutSize:e}),Q(wb,{font:u.accent,size:h.accent,weight:g.weightStrong,italic:g.italicStrong,headingWeight:g.weight,open:t===zd,onOpenChange:S=>r(S?zd:null),onChange:S=>{S.key==="font"?w(S.value):S.key==="size"?I(S.value):S.key==="weight"?b(S.value):v(S.value)},withoutSize:e})]})}var zd="accent";function t2(e){let o=vr(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 r2={"heading-1":"heading","heading-2":"heading2","heading-3":"heading3","body-1":"body","body-5":"label"},a2={heading:32,body:14},n2={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 s2(e){if(typeof document>"u")return null;let o=(ZN()?.contentDocument??document).querySelector(n2[e]);if(!o)return null;let t=parseFloat(getComputedStyle(o).fontSize);return Number.isFinite(t)?t:null}function l2({themeFromDocument:e,persist:o,showHint:t}){let{appState:r,dispatch:a}=Lb(u=>u),{cornerRadiusPx:n,setCornerRadiusPx:s}=oe(),i=r.data,c=i.root?.props??{},d=c.cornerRadiusPx===void 0?Nm[Dm(c.cornerStyle)]:Wo(c.cornerRadiusPx),m=e?d:n,x=u=>a({type:"replaceRoot",root:{...i.root,props:{...c,...u}},recordHistory:!0});return Q(dy,{value:m,onChange:u=>{e?x({cornerRadiusPx:u}):s(u),o({corner_radius_px:u})},showHint:t})}function i2(e){return{site_width:e}}function c2({persist:e,showHint:o}){let{siteWidth:t,setSiteWidth:r,sectionBackgroundWidth:a,setSectionBackgroundWidth:n,sectionContentWidth:s,setSectionContentWidth:i}=oe(),c=typeof t=="number"?t:je.default,d=u=>{r(u),e(i2(u),u===null)},m=u=>{n(u),e({section_background_width:u},!0)},x=u=>{i(u),e({section_content_width:u},!0)};return fr(dr,{children:[Q(Py,{value:a??"full",changed:a!==null,detail:l("Full width"),onChange:m,onReset:()=>m(null),hint:o?vy:void 0}),Q(Ey,{mode:s??"content",px:c,min:je.min,max:je.max,changed:typeof t=="number"||s!==null,detail:`${l("Content width")} ${je.default}px`,onMode:x,onPx:u=>d(u),onReset:()=>{x(null),d(null)},hint:o?Ty:void 0})]})}function f2(e){return{block_gap:e}}function d2(e){return{site_gutter:e}}function u2({persist:e,showHint:o}){let{siteGutter:t,setSiteGutter:r}=oe();return Q(ky,{value:t,onChange:a=>{r(a),e(d2(a),a===null)},showHint:o})}function p2({persist:e,showHint:o}){let{blockGap:t,setBlockGap:r}=oe();return Q(xy,{value:t,onChange:a=>{r(a),e(f2(a),a===null)},showHint:o})}function m2({persist:e,showHint:o=!0}){return fr(dr,{children:[Q(c2,{persist:e,showHint:o}),Q(u2,{persist:e,showHint:o}),Q(p2,{persist:e,showHint:o})]})}function x2(e){return{card_shadow:e}}function h2(e){return e===null?{shadow_color:null}:{shadow_color:zm(e)}}function I2(e){return{hover_effect:e}}function g2({persist:e,showHint:o=!0}){let{cardShadow:t,setCardShadow:r,shadowColor:a,setShadowColor:n,hoverEffect:s,setHoverEffect:i}=oe();return fr(dr,{children:[Q(uy,{value:t,onChange:c=>{r(c),e(x2(c),!0)},showHint:o}),Q(my,{value:a,onChange:c=>{n(c),e(h2(c),c===null)},showHint:o}),Q(hy,{value:s,onChange:c=>{i(c),e(I2(c),!0)},showHint:o})]})}function y2(e){return{photography_grayscale:e}}function b2({persist:e,showHint:o}){let{photographyGrayscale:t,setPhotographyGrayscale:r}=oe();return Q(gy,{value:t,onChange:a=>{r(a),e(y2(a),!0)},showHint:o})}function S2({persist:e,showHint:o=!0}){return Q(dr,{children:Q(b2,{persist:e,showHint:o})})}function C2(e){return{share_button_on_posts:e}}function w2({persist:e,showHint:o=!0}){let{shareButtonOnPosts:t,setShareButtonOnPosts:r}=oe();return Q(yy,{value:t,onChange:a=>{r(a),e(C2(a),!0)},showHint:o})}function ra(){let{websiteName:e}=oe();return e?.trim()||Zm}function Fl({themeFromDocument:e=!1,tokenRef:o,siteId:t,onNotify:r,tab:a,onTabChange:n,initialTab:s,revealPageGroup:i=!1,onPageGroupRevealed:c}){let{persist:d}=_r({themeFromDocument:e,tokenRef:o,siteId:t,onResult:w=>{let I=kb(w);I&&r?.(I.msg,I.tone)}}),[m,x]=Ol(s??oa[0].id),u=a!==void 0,h=u?a:m,g=u?n??(()=>{}):x,k=oa.find(w=>w.id===h)??oa[0],[P,O]=Ol(Gd);return fr(dr,{children:[Q(T2,{activeId:k.id,onSelect:g}),fr("div",{id:qN(Wd,k.id),className:QN,role:"tabpanel","aria-labelledby":jN(Wd,k.id),children:[h===ta&&fr(dr,{children:[Q(l2,{themeFromDocument:e,persist:d,showHint:P}),!e&&Q(g2,{persist:d,showHint:P}),!e&&Q(m2,{persist:d,showHint:P}),!e&&Q(S2,{persist:d,showHint:P}),!e&&Q(w2,{persist:d,showHint:P}),Q(k2,{reveal:i,onRevealed:c}),Q(Ud,{shown:P,onChange:O})]}),h==="theme"&&Q(e2,{themeFromDocument:e,persist:d}),h==="text"&&Q(o2,{themeFromDocument:e,persist:d})]})]})}function k2({reveal:e,onRevealed:o}){let[t,r]=Ol(!0),a=WN(o);return a.current=o,zN(()=>{if(!e)return;r(!0);let n=requestAnimationFrame(()=>{document.getElementById(Fb)?.scrollIntoView({block:"start"}),a.current?.()});return()=>cancelAnimationFrame(n)},[e]),Q(HN,{title:l("This page"),open:t,onToggle:r,id:Fb,children:Q(v2,{})})}function v2(){let{fields:e,values:o,readOnly:t,onChange:r}=NN(),a=Object.fromEntries(Va.filter(n=>n in e).map(n=>[n,e[n]]));return Object.keys(a).length===0?Q(UN,{variant:"none",icon:!1,message:l("This page has no look of its own to set.")}):Q(MN,{fields:a,values:o,onChange:r,readOnly:t,tabs:!1,idPrefix:"this-page",ariaLabel:l("This page")})}function T2({activeId:e,onSelect:o}){return Q("div",{className:"es-insp-tabs",children:Q($N,{variant:"underline",block:!0,labelsFit:!0,"aria-label":l("Styles"),idPrefix:Wd,value:e,onChange:o,items:oa.map(t=>{let r=l(t.label);return{id:t.id,icon:t.icon,label:r}})})})}import{InspectorIconButton as M2}from"efficient-easel/chrome";import{Button as Wb,Dialog as H2,FormField as z2,Input as Gb,PopupMenu as W2,PopupMenuItem as Ub,toast as $b}from"efficient-shell/ui";import{LayersTree as G2,TreeGroupLabel as U2,TreeRow as jb,TreeRowAction as Bl}from"efficient-easel/tree";import{AddIcon as $2,DuplicateIcon as j2,PageIcon as q2,SettingsIcon as K2}from"efficient-easel/icons";import{PagesIcon as V2}from"efficient-easel/rail";import{useEaselHost as Y2}from"efficient-easel/screen/lib/host";var $d="Main Pages",P2="Dynamic Pages",jd="dynamic",E2="dynamic";function Ya(e){return e.kind===E2}function Rb(e){let o=[],t=[];for(let r of e){if(Ya(r)){t.push(r);continue}let a=r.groupKey??(r.group?`folder:${r.group}`:"top"),n=o[o.length-1];n&&n.key===a?n.rows.push(r):o.push({key:a,label:r.group??$d,rows:[r]})}if(t.length){let r=o.findIndex(a=>a.key.startsWith("system:"));o.splice(r===-1?o.length:r,0,{key:jd,label:P2,rows:t})}return o}import{useEaselSession as Yb}from"efficient-easel/screen/lib/session-context";import{useCallback as Ll,useEffect as O2,useSyncExternalStore as F2}from"react";import{useScreenDocument as Nb}from"efficient-easel/screen/components/ScreenDocumentContext";var Bb=new WeakMap;function Xa(e){let o=Bb.get(e);return o||(o={rows:null,loading:null,listeners:new Set},Bb.set(e,o)),o}function qd(e,o){e.rows=o;for(let t of e.listeners)t()}var Al=new Set;function Rl(e,o){o?Al.add(e):Al.delete(e)}function _b(e){let o=Xa(e),t=e.listPages().then(r=>qd(o,Al.size?r.filter(a=>!Al.has(a.id)):r),()=>qd(o,[])).finally(()=>{o.loading===t&&(o.loading=null)});return o.loading=t,t}var Db=()=>null,L2=()=>()=>{};function Za(){let{adapter:e,ready:o}=Nb(),t=Ll(i=>{let{listeners:c}=Xa(e);return c.add(i),()=>c.delete(i)},[e]),r=Ll(()=>Xa(e).rows,[e]),a=F2(o?t:L2,o?r:Db,Db);O2(()=>{if(!o)return;let i=Xa(e);i.rows===null&&!i.loading&&_b(e)},[e,o]);let n=Ll(()=>o?_b(e):Promise.resolve(),[e,o]),s=Ll(i=>qd(Xa(e),i),[e]);return{rows:a,reload:n,setRows:s,getRows:r}}function A2(e,o){return e?.find(t=>t.slug===o)?.label?.trim()||`/${o}`}function Mb(){let{currentSlug:e}=Nb(),{rows:o}=Za();return A2(o,e)}import{canDuplicatePage as X2,DuplicatePageDialog as Z2,uniqueSlug as qb}from"efficient-easel/page-copy";var Kb="sf-editor-pages-collapsed-groups";function Q2(){let e=Yb(),{siteId:o,templateId:t}=Vb(),r=He(e).pages;if(!(!r.duplicate||t))return(a,n)=>r.duplicate(a.id,{...n,...o?{siteId:o}:{}})}function J2(){try{let e=Or()||(typeof window>"u"?"":window.location.origin);return e?new URL(e).host:""}catch{return""}}function Xb({onNavigate:e,onClose:o,activeSurface:t,onPreviewSurface:r}){let a=Yb().chrome?.pageRows,n=Y2(),{adapter:s,capabilities:i,ready:c,currentSlug:d}=Vb(),m=ra(),{rows:x,reload:u,setRows:h,getRows:g}=Za(),[k,P]=_t(""),[O,w]=_t(!1),[I,b]=_t(null),[v,S]=_t(!1),[E,A]=_t(""),N=_2(),z=Q2(),[_,T]=_t(null),[R,F]=_t(()=>{if(typeof window>"u")return new Set;try{let B=window.localStorage.getItem(Kb);return new Set(B?JSON.parse(B):[])}catch{return new Set}});B2(()=>{try{window.localStorage.setItem(Kb,JSON.stringify([...R]))}catch{}},[R]);let M=B=>F(re=>{let ae=new Set(re);return ae.has(B)?ae.delete(B):ae.add(B),ae}),U=zb(()=>Rb(x??[]),[x]),Y=k.trim().toLowerCase(),me=B=>!Y||B.toLowerCase().includes(Y),Ae=B=>Y?!0:!R.has(B),We=zb(()=>new Set((x??[]).map(B=>B.slug)),[x]),Ve=()=>{if(i.pageCreationInAdminForm){n.send("storefront-editor:new-page");return}A(""),b(null),S(!0)},Ye=async()=>{let B=E.trim();if(!(!B||!c||O||!s.createPage)){w(!0),b(null);try{let re=await s.createPage({slug:qb(B,We),title:B,layout:{}});await u(),S(!1),A(""),e(re.slug)}catch{b(l("Couldn\u2019t add the page \u2014 please retry."))}finally{w(!1)}}},fe=i.hasSiteSettings&&!!s.createPage,_e=async()=>{if(!(!c||O||!s.createPage)){w(!0),b(null);try{let B=await s.createPage(FI(l("New popup"),We));await u(),e(B.slug)}catch{b(l("Couldn\u2019t add the popup \u2014 please retry."))}finally{w(!1)}}},Oe=D2(null),[so,eo]=_t(null),xo=()=>{if(!fe)return Ve();if(so)return eo(null);let B=Oe.current?.getBoundingClientRect();B&&eo({top:B.bottom+6,right:Math.max(8,window.innerWidth-B.right)})},yt=B=>{let re=x??[],ae=s.deletePage;if(!c||O||!ae||re.length<=1)return;let ue=re.findIndex(io=>io.id===B.id),Mo=re.filter(io=>io.id!==B.id),Gt=B.slug===d;Rl(B.id,!0),h(Mo),b(null),Gt&&Mo[0]&&e(Mo[0].slug);let wo=()=>{Rl(B.id,!1);let io=g()??[];if(io.some(ka=>ka.id===B.id))return;let Qo=[...io];Qo.splice(Math.max(0,Math.min(ue,Qo.length)),0,B),h(Qo)};$b.undoable(l("Deleted \u201C{name}\u201D",{name:B.label}),{actionLabel:l("Undo"),commit:async io=>{await ae(B.id,io),Rl(B.id,!1)},undo:()=>{wo(),Gt&&e(B.slug)},onFail:()=>{wo(),$b.error(l("Couldn\u2019t delete the page \u2014 please retry."))}})},ho=B=>n.send("storefront-editor:open-page",{slug:B}),Io=B=>{if(!me(B.label))return null;let re=!t&&B.slug===d,ae=i.canDeletePagesInline&&(x??[]).length>1,ue=Ya(B),Mo=B.kind==="lightbox",Gt=[...ue?[{label:l("Dynamic"),tone:"info"}]:[],...Mo?[{label:l("Lightbox"),tone:"success"}]:[],...B.draft?[{label:l("draft"),tone:"draft"}]:[]],wo=Gt.length>0?Gt:void 0,io=!!z&&X2(B),Qo=io||i.pageCreationInAdminForm||ae?Qa(Hb,{children:[io&&ie(Bl,{kind:"plain",label:l("Duplicate \u201C{name}\u201D",{name:B.label}),disabled:O,onClick:()=>T(B),children:ie(j2,{size:13})}),i.pageCreationInAdminForm&&ie(Bl,{kind:"plain",label:l("Page settings for \u201C{name}\u201D",{name:B.label}),onClick:()=>ho(B.slug),children:ie(K2,{size:13})}),ae&&ie(Bl,{kind:"delete",label:l("Delete \u201C{name}\u201D",{name:B.label}),disabled:O,onClick:()=>yt(B),children:ie(Kd,{name:"trash",size:13,strokeWidth:1.7,rounded:!0})})]}):void 0;return ie(jb,{icon:ie(q2,{size:14}),name:B.label,selected:re,onSelect:()=>e(B.slug),badge:wo,actions:Qo,rowProps:{"data-page-slug":B.slug}},B.id)},Co=(B,re,ae)=>{let ue=ae.filter(Boolean);if(ue.length===0)return null;let Mo=Ae(B);return Qa(R2,{children:[ie(U2,{count:ue.length,countLabel:Ze("{n} page","{n} pages",ue.length),expanded:Mo,onToggle:()=>M(B),children:re}),Mo&&ue]},B)},Zo=(a?.rows??[]).filter(B=>me(B.label)).map(B=>{let re=t===B.key;return ie(jb,{icon:B.icon,name:B.label,selected:re,onSelect:()=>r(B.key),badge:{label:l("Preview"),tone:"warning"},actions:ie(Bl,{kind:"plain",label:l("Open the {name} in a new tab",{name:B.label}),onClick:()=>window.open(B.href,"_blank","noopener,noreferrer"),children:ie(Kd,{name:"external-link",size:13,strokeWidth:1.7,rounded:!0})}),rowProps:{"data-shop-surface":B.key}},B.key)}),bt=i.hasSiteSettings&&!!a,lo=(()=>{if(x===null)return null;let B=[],re=!1;for(let ae of U){bt&&!re&&ae.key.startsWith("system:")&&(B.push(Co("shop",a.title,Zo)),re=!0);let ue=ae.key===jd||ae.label===$d?l(ae.label):ae.label;B.push(Co(ae.key,ue,ae.rows.map(Io)))}return bt&&!re&&B.push(Co("shop",a.title,Zo)),B})();return Qa("div",{className:"sf-pages",children:[ie(N2,{icon:ie(V2,{}),title:l("Pages"),context:m,actions:ie(M2,{buttonRef:Oe,label:fe?l("Add"):l("New page"),hasPopup:fe?"menu":void 0,expanded:fe?so!==null:void 0,onClick:xo,children:ie($2,{size:15})})}),so&&ie(W2,{portal:!0,style:{top:so.top,right:so.right},onClose:()=>eo(null),children:Qa("div",{role:"menu","aria-label":l("Add"),children:[ie(Ub,{role:"menuitem",onClick:()=>{eo(null),Ve()},children:l("Page")}),ie(Ub,{role:"menuitem",disabled:O,onClick:()=>{eo(null),_e()},children:l("Popup")})]})}),ie("div",{className:"sf-pages-find",children:ie(Gb,{type:"search",leftIcon:ie(Kd,{name:"search",size:14,rounded:!0}),placeholder:l("Search all pages\u2026"),value:k,onChange:B=>P(B.target.value),"aria-label":l("Search all pages")})}),I&&!v&&ie("div",{className:"sf-note sf-note--error",role:"alert",children:I}),lo===null?ie("div",{className:"sf-note",children:l("Loading\u2026")}):lo.some(Boolean)?ie(G2,{ariaLabel:l("Pages"),className:"sf-scroll",children:lo}):ie("div",{className:"sf-note",children:k.trim()?l("No pages match your search"):l("No pages yet. Add one with + above.")}),z&&_&&ie(Z2,{source:{title:_.label,slug:_.slug},taken:We,host:J2(),duplicate:B=>z(_,B),onClose:()=>T(null),onDuplicated:B=>{T(null),u(),e(B.slug)}},_.id),ie(H2,{open:v,onClose:()=>S(!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:Qa(Hb,{children:[ie(Wb,{variant:"secondary",onClick:()=>S(!1),children:l("Cancel")}),ie(Wb,{onClick:()=>{Ye()},disabled:O||!E.trim(),loading:O,children:l("Add page")})]}),children:ie(z2,{label:l("Page name"),htmlFor:N,hint:E.trim()?l("URL: /{slug}",{slug:qb(E,We)}):void 0,error:I??void 0,children:ie(Gb,{id:N,value:E,invalid:!!I,onChange:B=>A(B.target.value),onKeyDown:B=>{B.key==="Enter"&&Ye()},placeholder:l("e.g. About")})})})]})}import{jsx as Jb}from"react/jsx-runtime";import{createContext as oM,useCallback as tM,useContext as rM,useMemo as aM,useState as nM}from"react";import{CanvasChromeContext as sM}from"efficient-easel/easel";import{useSelectHandler as lM}from"efficient-easel/draw/client";import{parseHexColor as eM}from"efficient-shell/format";var _l=["chat-bubble-left-right","chat-bubble-oval-left-ellipsis","chat","megaphone","phone","sparkles"],aa=_l[0];var ur="right";function Dl(e){return _l.includes(e??"")?e:aa}function Zb(e){return e==="left"?"left":ur}function Qb(e){return e&&eM(e)===e.toLowerCase()?e.toLowerCase():""}var eS="chat",Nl={enabled:!0,title:"",subtitle:"",greeting:"",launcherColor:"",launcherIcon:"",launcherPosition:ur,launcherLabel:"",showOnPhones:!0};function vre(e){return{enabled:e.enabled,title:e.title,subtitle:e.subtitle,greeting:e.greeting,launcherColor:Qb(e.launcherColor),launcherIcon:e.launcherIcon?Dl(e.launcherIcon):"",launcherPosition:Zb(e.launcherPosition),launcherLabel:e.launcherLabel??"",showOnPhones:e.showOnPhones!==!1}}var oS=oM({chat:Nl,setChat:()=>{},setSelected:()=>{},setSelectHandler:()=>{}});function Tre({children:e,chat:o=Nl,onChatChange:t}){let[r,a]=nM(!1),n=tM(d=>t?.(d),[t]),{select:s,setSelectHandler:i}=lM(),c=aM(()=>({selected:()=>r?eS:null,select:d=>d===eS&&s()}),[r,s]);return Jb(oS.Provider,{value:{chat:o,setChat:n,setSelected:a,setSelectHandler:i},children:Jb(sM.Provider,{value:c,children:e})})}var Ml=()=>rM(oS);import{jsx as Vd}from"react/jsx-runtime";import{DesktopIcon as iM,PhoneIcon as cM,TabletIcon as fM}from"efficient-easel/icons";import{VIEW_TIERS as dM,VIEW_TIER_LABEL as uM}from"efficient-easel/draw";var pM={desktop:Vd(iM,{}),tablet:Vd(fM,{}),mobile:Vd(cM,{})},tS=dM.map(e=>({id:e,get label(){return l(uM[e])},icon:pM[e]}));import{PreviewDeviceContext as m8}from"efficient-easel/draw/client";import{jsx as mM}from"react/jsx-runtime";import{createContext as xM,useCallback as rS,useContext as hM,useMemo as IM,useRef as gM}from"react";var yM=Object.fromEntries(Qn.map(e=>[e,{value:"",error:null}])),aS=xM({links:Jm,rows:yM,canSave:!1,saveLink:async()=>({ok:!1,error:"There is no website to save to."}),openPanel:()=>{},setOpenHandler:()=>{}});function Dre({children:e,value:o}){let t=gM(()=>{}),r=rS(()=>t.current(),[]),a=rS(s=>{t.current=s},[]),n=IM(()=>({...o,openPanel:r,setOpenHandler:a}),[o,r,a]);return mM(aS.Provider,{value:n,children:e})}var Ja=()=>hM(aS);import{jsx as bM}from"react/jsx-runtime";import{createContext as SM,useContext as CM,useMemo as wM,useState as kM}from"react";var nS=SM(null);function zre({children:e}){let[o,t]=kM(null),r=wM(()=>({surface:o,setSurface:t}),[o]);return bM(nS.Provider,{value:r,children:e})}function sS(){return CM(nS)??{surface:null,setSurface:()=>{}}}import{createPreviewSelectionContext as vM}from"efficient-easel/draw/client";var en="Scrolling Bar",{Provider:Ure,useSelection:lS}=vM("selectedHeroId"),$re="data-sf-hero-ticker";function jre(e){return`${e}::ticker`}function qre(e){return!e||!e.endsWith("::ticker")?null:e.slice(0,-8)||null}import{createPreviewSelectionContext as TM}from"efficient-easel/draw/client";var{Provider:Yre,useSelection:Hl}=TM("selectedHeroPart");var cS=["one","side","stacked"];var Zre={one:"One",side:"Side by side",stacked:"Stacked"};function fS(e){return cS.includes(e)?e:"one"}function iS(e){return e==="one"?1:2}function PM(e,o){if(cS.includes(e))return e;let t=fS(o);return t==="side"?"stacked":t}function Yd(e){let o=fS(e.mediaLayout);return Math.max(iS(o),iS(PM(e.mediaLayoutPhone,o)))}var on=["media","image","image2"],na={media:"Media",image:"Image",image2:"Image 2"},tn={media:"heroMedia",image:"heroImage",image2:"heroImage2"};function zl(e,o){return e==="image"&&Yd(o)>1?"Image 1":na[e]}var oae="Video file",tae="Upload a video file";function EM(e,o){return{field:"mediaType",is:e,default:o}}var OM=new Set(["HeroSingle"]),dS="heroPart";function FM(e,o){return{...o,[dS]:e}}function rae(e,{parts:o={},onlyFor:t,fallback:r,rules:a}){let n={...e};for(let s of["image","video"])for(let i of t[s])n[i]=Fr(n[i],EM(s,r));for(let[s,i]of Object.entries(a??{}))i&&(n[s]=Fr(n[s],i));for(let s of on)for(let i of o[s]??[])n[i]=FM(s,n[i]);return n}function LM(e){let o=e?.[dS];return on.includes(o)?o:null}function uS(e,o){let t={};for(let[r,a]of Object.entries(e))LM(a)===o&&(t[r]=a);return t}function pS(e){if(!OM.has(e.type))return[];let o=[{part:"media",label:na.media,depth:0}];return(e.props.mediaType??"image")!=="video"&&(o.push({part:"image",label:zl("image",e.props),depth:1}),Yd(e.props)>1&&o.push({part:"image2",label:zl("image2",e.props),depth:1})),o}function rn(e,o){return`${e}::${o}`}function mS(e){if(!e)return null;let o=e.lastIndexOf("::");if(o<=0)return null;let t=e.slice(o+2);return on.includes(t)?{nodeId:e.slice(0,o),part:t}:null}var aae="data-sf-hero-part";import{jsx as le,jsxs as xr,Fragment as sw}from"react/jsx-runtime";import{useState as r6}from"react";import{useEasel as a6,useRootFields as n6}from"efficient-easel/easel";import{Button as s6,EmptyState as l6}from"efficient-shell/ui";function xS({kind:e,pageName:o}){return{name:o?.trim()||l("This page"),kindLabel:Ya({kind:e})?l("Template"):l("Page")}}import{headWords as fw,InspectorHead as i6,InspectorIconButton as lw}from"efficient-easel/chrome";import{DuplicateIcon as c6,TrashIcon as f6}from"efficient-easel/icons";import{panelFieldsOf as d6}from"efficient-easel/screen/lib/document/panel-fields";import{jsx as L,Fragment as te,jsxs as ne}from"react/jsx-runtime";import{BlockBannerIcon as BM,BlockBoxIcon as _M,BlockButtonIcon as DM,BlockDividerIcon as IS,BlockFooterIcon as gS,BlockHeadingIcon as NM,BlockProductIcon as MM,BlockSocialIcon as HM,BlockTextIcon as zM,CardPaymentIcon as WM,ChatIcon as GM,AccountIcon as UM,GlobeIcon as $M,GridIcon as jM,ImageIcon as Zd,MapIcon as qM,MediaIcon as KM,PageIcon as VM}from"efficient-easel/icons";import{jsx as Xd,Fragment as AM,jsxs as RM}from"react/jsx-runtime";var hS=RM(AM,{children:[Xd("circle",{cx:"9",cy:"20",r:"1.3"}),Xd("circle",{cx:"18",cy:"20",r:"1.3"}),Xd("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 YM={header:ne(te,{children:[L("rect",{x:"3",y:"5",width:"18",height:"14",rx:"2"}),L("path",{d:"M3 9.5h18"})]}),social:ne(te,{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:ne(te,{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:ne(te,{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:ne(te,{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:ne(te,{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:ne(te,{children:[L("circle",{cx:"11",cy:"11",r:"6"}),L("path",{d:"M20 20l-4.2-4.2"})]}),CartBlock:hS,CountrySwitchBlock:ne(te,{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"})]}),ThemeSwitchBlock:ne(te,{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:ne(te,{children:[L("path",{d:"M3 9h18"}),L("path",{d:"M3 14h8M14 14h2M18 14h3"})]}),Hero:ne(te,{children:[L("rect",{x:"3",y:"4",width:"18",height:"16",rx:"2"}),L("path",{d:"M7 13.5h7M7 16.5h10"})]}),HeroSlide:ne(te,{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:ne(te,{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:ne(te,{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:ne(te,{children:[L("rect",{x:"6",y:"4",width:"12",height:"16",rx:"2"}),L("path",{d:"M9 15h6M9 17.5h4"})]}),AlloyWheelsListing:ne(te,{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:ne(te,{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:ne(te,{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:ne(te,{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:ne(te,{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:ne(te,{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:ne(te,{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:ne(te,{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:ne(te,{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:ne(te,{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:ne(te,{children:[L("path",{d:"M3.5 20h17"}),L("path",{d:"M6 20v-7M11 20V7M16 20v-5M20.5 20v-9"})]}),Logos:ne(te,{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:ne(te,{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:ne(te,{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:ne(te,{children:[L("rect",{x:"3",y:"4",width:"18",height:"16",rx:"2"}),L("path",{d:"M3 13.5h18M7 16.8h6"})]}),Split:ne(te,{children:[L("rect",{x:"3",y:"5",width:"8",height:"14",rx:"1.5"}),L("path",{d:"M14 8.5h6M14 12h6M14 15.5h4"})]}),Eyebrow:ne(te,{children:[L("path",{d:"M4 8.5h4.5M11 8.5h9"}),L("path",{d:"M4 14.5h16"})]}),HeroGroup:ne(te,{children:[L("rect",{x:"3.5",y:"4.5",width:"17",height:"15",rx:"2"}),L("path",{d:"M7 9h8M7 12.5h10M7 16h6"})]}),Form:ne(te,{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(te,{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:ne(te,{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:ne(te,{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"})},XM=L("rect",{x:"4",y:"4",width:"16",height:"16",rx:"2.5"}),ZM={footer:gS,Footer:gS,Divider:IS,FooterDivider:IS,Banner:BM,Flex:_M,FooterSocial:HM,FooterPayment:WM,page:VM,website:$M,AccountBlock:UM,chat:GM,Heading:NM,Text:zM,ImageBlock:Zd,ButtonBlock:DM,LocationMap:qM,Grid:jM,ProductRef:MM,heroMedia:KM,heroImage:Zd,heroImage2:Zd},QM={MenuBlock:"FooterMenu",EmailFormBlock:"FooterEmailSignup",SocialLogosBlock:"FooterSocial",PaymentLogosBlock:"FooterPayment",SiteHeader:"header",SiteFooter:"footer"};function pr({type:e,size:o=16,className:t}){let r=QM[e]??e,a=ZM[r];return a?L(a,{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:YM[r]??XM})}import{PanelHideButton as iw}from"efficient-easel/screen/components/SidePanelHead";import{useEaselSession as u6}from"efficient-easel/screen/lib/session-context";import{jsx as ce,jsxs as an,Fragment as JM}from"react/jsx-runtime";import{useEffect as eH,useId as yS,useState as oH}from"react";import{IconPicker as tH}from"efficient-shell/ui";import{SettingsDefaultReset as rH,SettingsField as nn,SettingsSegmented as aH,SettingsSwitch as bS}from"efficient-easel/panel";import{ButtonIcon as nH,ButtonIconIcon as sH,EyeIcon as lH,PhoneIcon as iH,PlacementIcon as cH,TypeIcon as fH}from"efficient-easel/icons";var dH="Chat with us",uH="We usually reply within a few minutes",pH="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:r,multiline:a=!1,hint:n}){let[s,i]=oH(o);eH(()=>i(o),[o]);let c=()=>{s!==o&&r(s)};return ce(nn,{label:e,icon:ce(fH,{}),changed:o!=="",action:ce(sn,{label:e,changed:o!=="",onReset:()=>r("")}),hint:n,children:a?ce("textarea",{value:s,placeholder:t,rows:3,onChange:d=>i(d.target.value),onBlur:c,"aria-label":e}):ce("input",{type:"text",value:s,placeholder:t,onChange:d=>i(d.target.value),onBlur:c,onKeyDown:d=>{d.key==="Enter"&&d.currentTarget.blur()},"aria-label":e,autoComplete:"off"})})}function sn({label:e,changed:o,onReset:t}){return ce(rH,{words:X()?.panel,label:e,changed:o,onReset:t})}function mH({label:e,icon:o,checked:t,fallback:r,onChange:a,hint:n}){let s=yS();return ce(nn,{label:e,labelId:s,icon:o,changed:t!==r,action:an("span",{className:"inline-flex items-center gap-2",children:[ce(bS,{checked:t,onChange:a,ariaLabelledBy:s}),ce(sn,{label:e,changed:t!==r,onReset:()=>a(r)})]}),hint:n})}var xH=_l.map(e=>({value:e,icon:cs(e)}));function hH(){let{theme:e}=oe(),o=Ge(e).themes[0];return va(o)??o?.accent??""}function SS(){let{chat:e,setChat:o}=Ml(),t=yS(),r=hH(),a=e.launcherIcon?Dl(e.launcherIcon):aa;return an(JM,{children:[ce(nn,{label:l("Show the chat bubble"),labelId:t,icon:ce(lH,{}),changed:!e.enabled,action:an("span",{className:"inline-flex items-center gap-2",children:[ce(bS,{checked:e.enabled,onChange:n=>o({enabled:n}),ariaLabelledBy:t}),ce(sn,{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.")}),an(qf,{title:l("Look"),children:[ce(yo,{label:l("Button color"),icon:ce(nH,{}),changed:e.launcherColor!=="",value:e.launcherColor,inherited:r,caption:e.launcherColor?void 0:l("Site button color"),onChange:n=>o({launcherColor:n}),onReset:()=>o({launcherColor:""})}),ce(nn,{label:l("Icon"),icon:ce(sH,{}),changed:a!==aa,action:ce(sn,{label:l("Icon"),changed:a!==aa,onReset:()=>o({launcherIcon:""})}),children:ce(tH,{label:l("Icon"),value:a,options:xH,onChange:n=>o({launcherIcon:n===aa?"":n})})}),ce(nn,{label:l("Position"),icon:ce(cH,{}),changed:e.launcherPosition!==ur,action:ce(sn,{label:l("Position"),changed:e.launcherPosition!==ur,onReset:()=>o({launcherPosition:ur})}),children:ce(aH,{options:[{label:l("Right"),id:"right"},{label:l("Left"),id:"left"}],value:e.launcherPosition,ariaLabel:l("Position"),onChange:n=>o({launcherPosition:n})})}),ce(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")}),ce(mH,{label:l("Show on phones"),icon:ce(iH,{}),checked:e.showOnPhones,fallback:Nl.showOnPhones,onChange:n=>o({showOnPhones:n})})]}),an(qf,{title:l("Wording"),children:[ce(Wl,{label:l("Title"),value:e.title,placeholder:dH,onCommit:n=>o({title:n})}),ce(Wl,{label:l("Subtitle"),value:e.subtitle,placeholder:uH,onCommit:n=>o({subtitle:n})}),ce(Wl,{label:l("Greeting message"),value:e.greeting,placeholder:pH,onCommit:n=>o({greeting:n}),multiline:!0}),ce("p",{className:"es-field-hint sf-hint-keep",children:l("Leave a field blank to use the built-in wording.")})]})]})}import{jsx as mr,Fragment as yu,jsxs as TS}from"react/jsx-runtime";import{useEffect as qH,useId as kS,useState as vS}from"react";import{SettingsField as KH}from"efficient-easel/panel";import{jsx as NH}from"react/jsx-runtime";import{forwardRef as IH,createElement as Qd}from"react";var CS={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 V=(e,o,t,r)=>{let a=IH(({color:n="currentColor",size:s=24,stroke:i=2,title:c,className:d,children:m,...x},u)=>Qd("svg",{ref:u,...CS[e],width:s,height:s,className:["tabler-icon",`tabler-icon-${o}`,d].filter(Boolean).join(" "),...e==="filled"?{fill:n}:{strokeWidth:i,stroke:n},...x},[c&&Qd("title",{key:"svg-title"},c),...r.map(([h,g])=>Qd(h,g)),...Array.isArray(m)?m:[m]]));return a.displayName=`${t}`,a};var gH=[["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"}]],Jd=V("outline","brand-facebook","BrandFacebook",gH);var yH=[["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"}]],eu=V("outline","brand-instagram","BrandInstagram",yH);var bH=[["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"}]],ou=V("outline","brand-line","BrandLine",bH);var SH=[["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"}]],tu=V("outline","brand-linkedin","BrandLinkedin",SH);var CH=[["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"}]],ru=V("outline","brand-pinterest","BrandPinterest",CH);var wH=[["path",{d:"M15 10l-4 4l6 6l4 -16l-18 7l4 2l2 6l3 -4",key:"svg-0"}]],au=V("outline","brand-telegram","BrandTelegram",wH);var kH=[["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"}]],nu=V("outline","brand-tiktok","BrandTiktok",kH);var vH=[["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"}]],su=V("outline","brand-wechat","BrandWechat",vH);var TH=[["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"}]],lu=V("outline","brand-whatsapp","BrandWhatsapp",TH);var PH=[["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"}]],iu=V("outline","brand-x","BrandX",PH);var EH=[["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"}]],cu=V("outline","brand-youtube","BrandYoutube",EH);var OH=[["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"}]],fu=V("filled","brand-facebook-filled","BrandFacebookFilled",OH);var FH=[["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"}]],du=V("filled","brand-instagram-filled","BrandInstagramFilled",FH);var LH=[["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"}]],uu=V("filled","brand-linkedin-filled","BrandLinkedinFilled",LH);var AH=[["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"}]],pu=V("filled","brand-pinterest-filled","BrandPinterestFilled",AH);var RH=[["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"}]],mu=V("filled","brand-tiktok-filled","BrandTiktokFilled",RH);var BH=[["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"}]],xu=V("filled","brand-whatsapp-filled","BrandWhatsappFilled",BH);var _H=[["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"}]],hu=V("filled","brand-x-filled","BrandXFilled",_H);var DH=[["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"}]],Iu=V("filled","brand-youtube-filled","BrandYoutubeFilled",DH);var zne="outline",Gl={fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},MH={},gu={fillRule:"evenodd"},HH=[["path",{...Gl,d:"M21 4L3 11L7 13L9 19L12 15L17 20z"}],["path",{...gu,d:"M21 4L3 11L7 13L9 19L12 15L17 20zM15.212 8.939 10.576 13.576 11.424 14.424 16.061 9.788z"}]],zH=[["path",{...Gl,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",{...MH,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("")}]],WH=[["path",{...Gl,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",{...Gl,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",{...gu,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",{...gu,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("")}]],GH=V("filled","brand-telegram-filled","BrandTelegramFilled",HH),UH=V("filled","brand-line-filled","BrandLineFilled",zH),$H=V("filled","brand-wechat-filled","BrandWechatFilled",WH),jH={instagram:{outline:eu,solid:du},facebook:{outline:Jd,solid:fu},tiktok:{outline:nu,solid:mu},youtube:{outline:cu,solid:Iu},x:{outline:iu,solid:hu},linkedin:{outline:tu,solid:uu},pinterest:{outline:ru,solid:pu},whatsapp:{outline:lu,solid:xu},telegram:{outline:au,solid:GH},line:{outline:ou,solid:UH},wechat:{outline:su,solid:$H}};function wS({platform:e,iconStyle:o,size:t}){let r=jH[e][o];return NH(r,{size:t,stroke:1.75,"aria-hidden":"true",focusable:"false"})}var VH={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 YH({platform:e}){let{rows:o,saveLink:t}=Ja(),{value:r,error:a}=o[e],[n,s]=vS(r),[i,c]=vS(!1),d=kS(),m=kS();qH(()=>s(r),[r]);let x=async()=>{if(n.trim()===r){n!==r&&s(r);return}c(!0),await t(e,n),c(!1)},u=Qm[e];return TS(yu,{children:[mr(KH,{label:l(u),htmlFor:d,icon:mr(wS,{platform:e,iconStyle:"outline",size:18}),children:mr("input",{id:d,type:"text",inputMode:"url",value:n,placeholder:VH[e],onChange:h=>s(h.target.value),onBlur:()=>{x()},onKeyDown:h=>{h.key==="Enter"&&h.currentTarget.blur(),h.key==="Escape"&&(s(r),h.currentTarget.blur())},"aria-invalid":a?!0:void 0,"aria-describedby":a?m:void 0,"aria-busy":i||void 0,autoComplete:"off",spellCheck:!1})}),a&&mr("p",{id:m,className:"sf-note sf-note--error",role:"alert",children:a})]})}function PS({unavailable:e}){let{canSave:o}=Ja();return!o&&e?mr(yu,{children:e}):TS(yu,{children:[mr("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.")}),Qn.map(t=>mr(YH,{platform:t},t))]})}import{jsx as ln,jsxs as QH}from"react/jsx-runtime";import{useId as JH,useMemo as e5}from"react";import{useEasel as o5}from"efficient-easel/easel";import{SettingsField as t5,SettingsSwitch as r5}from"efficient-easel/panel";import{EyeIcon as a5}from"efficient-easel/icons";import{fieldShownInView as n5}from"efficient-easel/fields";import{usePreviewDevice as s5}from"efficient-easel/draw/client";var ES=["","","","","",""];import{Fragment as XH,createElement as ZH}from"react";import{deviceField as bu}from"efficient-easel/screen/lib/document/device-fields";var qe=()=>({type:"custom",render:()=>ZH(XH)});var OS={words:qe(),sourceNote:qe(),style:qe(),font:qe(),italic:qe(),fontSize:bu("each",qe()),lineHeight:qe(),letterSpacing:qe(),paragraphSpacing:qe(),padding:qe(),align:bu("each",qe()),letterCase:qe(),fixedSizeHint:bu("each",qe()),regionNote:qe(),regionStyle:qe()},FS={showTicker:qe(),items:qe()};var l5="root:default-zone";function LS({heroId:e}){let{appState:o,dispatch:t}=o5(u=>u),r=o.data.content??[],a=r.findIndex(u=>u.props.id===e),n=a>=0?r[a]:null,s=n?n.props.showTicker??!0:!0,i=e5(()=>{let u=n?.props.tickerItems;return Array.isArray(u)?u:ES.map(h=>({text:h}))},[n]),c=JH(),d=s5(),m=u=>n5(FS[u],d);if(!n)return ln("p",{className:"sf-note",children:l("This ticker\u2019s hero is no longer on the page.")});let x=u=>t({type:"replace",destinationZone:l5,destinationIndex:a,data:{...n,props:{...n.props,...u}}});return QH("div",{children:[m("showTicker")&&ln(t5,{label:l("Show ticker"),labelId:c,icon:ln(a5,{}),action:ln(r5,{checked:s,onChange:u=>x({showTicker:u}),ariaLabelledBy:c})}),m("items")&&ln(Xf,{label:Yf.label,icon:Yf.icon,items:i,placeholder:"item",onChange:u=>x({tickerItems:u}),markup:!0})]})}import{jsx as K,Fragment as Zl,jsxs as Ao}from"react/jsx-runtime";import{useContext as $5,useEffect as Ou,useRef as j5,useState as iC}from"react";import{FieldSelect as q5,InspectorField as K5,fieldShownInView as V5}from"efficient-easel/fields";import{SettingsField as Y5}from"efficient-easel/panel";import{InspectorUpLevel as Ql}from"efficient-easel/chrome";import{StylesIcon as X5,TypeIcon as Z5}from"efficient-easel/icons";import{useEasel as Q5}from"efficient-easel/easel";import{TextPartPanel as J5}from"efficient-easel/copy";import{Button as e4,IconButton as o4,Tooltip as t4}from"efficient-shell/ui";import{jsx as GS,jsxs as b5}from"react/jsx-runtime";import{COPY_CELLS as cn,CopyBox as S5}from"efficient-easel/copy";import{PaddingYIcon as C5}from"efficient-easel/icons";import{useSyncExternalStore as p5}from"react";import{isNodeList as i5}from"efficient-easel/data";var Su="template",RS="Card template",c5=["Text","ImageBlock","ButtonBlock","Flex"],Ul="rowField",f5="rowLinkField";function pse(){return{type:"slot",allow:[...c5]}}var d5=[{block:"OrderSummary",fields:[{key:"label",label:"Item"},{key:"meta",label:"Meta line"},{key:"amount",label:"Amount"}]}],AS=Symbol.for("efficient.card-templates");function $l(){let e=globalThis,o=e[AS];return o||(o=new Map(d5.map(t=>[t.block,t])),e[AS]=o),o}function mse(e){for(let o of e){if(typeof o.block!="string"||!o.block)throw new Error("A card template names no block.");$l().set(o.block,{block:o.block,fields:o.fields.map(t=>({...t}))})}}function Cu(e){return typeof e=="string"&&$l().has(e)}function xse(e,o){let t=$l().get(e)?.fields??[];return o?t.filter(r=>(r.kind??"text")===o):t}function hse(e,o){return e?$l().get(e)?.fields.find(t=>t.key===o)??null:null}function BS(e,o=Ul){let t=e?.[o];return typeof t=="string"?t.trim():""}function Ise(e){let o={};if(e&&typeof e=="object"&&!Array.isArray(e))for(let[t,r]of Object.entries(e))typeof r=="string"&&(o[t]=r);return o}var _S={Text:{text:Ul},ImageBlock:{src:Ul},ButtonBlock:{label:Ul,href:f5}};function DS(e,o,t){let r=_S[e]?.[t];return!!(r&&BS(o,r))}function u5(e,o){return!o||!e?null:e[o]??""}function gse(e,o,t){if(!t)return o;let r=null;for(let[a,n]of Object.entries(_S[e]??{})){let s=u5(t,BS(o,n));s!==null&&(r??={...o},r[a]=s)}return r??o}function yse(e,o){let t=e?.data?.content;if(!Array.isArray(t)||typeof o!="string")return;let r=(n,s)=>{for(let i of n){if(i?.props?.id===o)return s;for(let[c,d]of Object.entries(i?.props??{})){if(!i5(d))continue;let m=c===Su&&Cu(i.type)?i:s,x=r(d,m);if(x!==void 0)return x}}},a=r(t,null);return a===void 0?null:a}import{decodePartId as m5}from"efficient-easel/draw";function sa(e,o){let t=gl(e);return t?.control==="textList"?o.rowKey===(t.itemKey??"text")?ly(t,o.index):null:ud(e)?.[o.rowKey]??null}function jl(e,o,t){let r=e.node.props,{key:a,row:n}=Fo(e.propKey),s=n?By(r,a,n,e.kind,o):Ay(r,a,e.kind,o);return s?(t(e.zone,e.index,{...e.node,props:s}),!0):!1}var x5=["bold","italic","underline","strike","link","sup","sub"],h5=["bullet","number"];function vu(e,o){return e?[...x5,...o?h5:[]]:[]}function NS(e,o){let t=m5(e);if(!t?.propKey)return null;let{nodeId:r,propKey:a}=t,n=o.getItemById(r),s=o.getSelectorForId(r);if(!n||!s)return null;let{key:i,row:c}=Fo(a),d=o.components[n.type]?.fields?.[i],m=c?sa(d,c):d,x=Vr(m);if(!x)return null;let u=n.props??{};if(yf(u)!==null||!c&&DS(n.type,u,i)||c&&!(Array.isArray(u[i])&&c.index<u[i].length))return null;let h=c?Ua(u[i],c):u[i];return{node:n,selector:s,propKey:a,kind:x,stored:h,offPage:ol(m)}}function MS(e,o){let t=NS(e,o);if(!t)return null;let{text:r,hidden:a}=At(t.stored);if(!hd({offPage:t.offPage,hidden:!!a}))return null;let n=hl(t.kind);return{partId:e,value:r,rules:er,multiline:n,offered:vu(t.kind!=="plainText",n),write:s=>{let i=NS(e,o);i&&jl({node:i.node,propKey:i.propKey,kind:i.kind,zone:i.selector.zone,index:i.selector.index},s,o.replace)}}}function HS(e,o,t){return e?.isConnected&&e.getAttribute(Lo)===t?e:o?.querySelector(`[${Lo}="${I5(t)}"]`)??null}function I5(e){return e.replace(/["\\]/g,"\\$&")}function zS(e){let o=e.activeElement;return o?o.tagName==="IFRAME"||!!o.closest(".es-canvas"):!1}var wu=null,ku=new Set;function g5(){return wu}function Tu(e){if(e!==wu){wu=e;for(let o of ku)o()}}function y5(e){return ku.add(e),()=>{ku.delete(e)}}function WS(){return p5(y5,g5,()=>null)}var w5=["left","center","right","justify"];function Pu(e,o,t,r="desktop"){let a=Ka(e),n=r==="mobile",s=(n?e.sizePhone:void 0)??e.size??o.sizePx;return[n?{...cn.fontSize,key:"fontSize",value:e.sizePhone,styleValue:Math.round(o.sizePx),onChange:i=>t({sizePhone:i??null})}:{...cn.fontSize,key:"fontSize",value:e.size,styleValue:Math.round(o.sizePx),onChange:i=>t({size:i??null})},{...cn.lineHeight,key:"lineHeight",value:a.lineHeight,styleValue:o.lineRatio,onChange:i=>t(i===void 0?{lineHeight:null,line:null}:{lineHeight:i})},{...cn.letterSpacing,key:"letterSpacing",scale:s,value:a.letterSpacingEm,styleValue:o.letterEm,onChange:i=>t(i===void 0?{letterSpacing:null,letter:null}:{letterSpacing:i})},{...cn.paragraphSpacing,key:"paragraphSpacing",value:e.paragraphSpacing,styleValue:0,onChange:i=>t({paragraphSpacing:i??null})},{key:"padding",name:l("Padding"),icon:GS(C5,{}),unit:"px",step:wd,shiftStep:10,min:Sd,max:Cd,value:e.padding,styleValue:o.paddingPx,onChange:i=>t({padding:i??null})}]}function US({text:e,onTextChange:o,multiline:t,markup:r=!0,styled:a=!0,style:n,base:s,setValue:i,colors:c,placeholder:d,ariaLabel:m,head:x,typedOnCanvas:u=!1}){let h=Pu(n,s,i),g=vu(r,t);return b5("div",{className:"sf-part-textbox",children:[x,GS(S5,{value:e,onChange:o,multiline:t,placeholder:d,ariaLabel:m,rules:er,tools:g,barShows:u?"focus":"always",colors:r?c:[],align:a?{value:n.align??s.align,allow:w5,onChange:k=>i({align:k})}:void 0,letterCase:a?{value:n.case==="capitalize"?"":n.case??"",onChange:k=>i({case:k||null})}:void 0,cells:a?h:void 0})]})}import{UiIcon as cC}from"efficient-easel/draw/client";import{jsx as ql,Fragment as k5,jsxs as v5}from"react/jsx-runtime";import{Button as $S,Dialog as T5}from"efficient-shell/ui";function jS({styleName:e,onCancel:o,onConfirm:t}){return ql(T5,{open:!0,onClose:o,role:"alertdialog",size:"sm",title:l("Update {style}?",{style:e}),footer:v5(k5,{children:[ql($S,{variant:"secondary",onClick:o,children:l("Cancel")}),ql($S,{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 r4}from"efficient-easel/screen/components/ScreenDocumentContext";import{usePreviewDevice as a4}from"efficient-easel/draw/client";import{shownTier as fC}from"efficient-easel/screen/lib/document/device-fields";import{jsx as P5}from"react/jsx-runtime";import{createContext as E5,useContext as O5,useMemo as F5,useState as L5}from"react";var A5={partStyle:null,setPartStyle:()=>{}},qS=E5(A5);function Jse({children:e}){let[o,t]=L5(null),r=F5(()=>({partStyle:o,setPartStyle:t}),[o]);return P5(qS.Provider,{value:r,children:e})}function KS(){return O5(qS)}import{TEXT_FIELD_MARKER as n4}from"efficient-easel/draw";import{useSectionOps as s4}from"efficient-easel/screen/lib/document/use-section-ops";import{parseHexColor as R5}from"efficient-shell/format";var B5="#9ca3af";function _5(e){return hs.map(o=>({key:o,name:kh[o],value:e?.[o]||B5}))}function Kl(e){return _5(e).map(o=>({name:o.key,label:l(o.name),value:o.value}))}function YS(e){let o={},t=e.ownerDocument,r=t?.defaultView;if(!t||!r)return o;let a=r.getComputedStyle(e),n=t.createElement("canvas").getContext("2d");for(let s of hs){let i=ot[s].replace(/^var\((--[\w-]+)\)$/,"$1"),c=a.getPropertyValue(i).trim();if(!c)continue;let d=VS(c);!d&&n&&(n.fillStyle="#000000",n.fillStyle=c,d=VS(String(n.fillStyle))),d&&(o[s]=d)}return o}function VS(e){let o=e.trim().toLowerCase();if(o.startsWith("#"))return R5(o);let t=o.match(/^rgba?\(\s*(\d+)[\s,]+(\d+)[\s,]+(\d+)/);return t?`#${t.slice(1,4).map(r=>Math.min(255,Number(r)).toString(16).padStart(2,"0")).join("")}`:null}var fn="@name",XS="@body",ZS="@value",sle={[fn]:"Name",[XS]:"Body",[ZS]:"Value"},D5={TimelineTrack:{"entries.date":fn,"entries.title":fn,"entries.blurb":XS},Footprint:{"offices.city":fn},Stats:{"items.label":fn,"items.value":ZS}};function N5(e){let{key:o,row:t}=Fo(e);return t?`${o}.${t.rowKey}`:null}function Vl(e,o){if(!e)return o;let t=N5(o);return t?D5[e]?.[t]??o:o}import{useEaselHost as l4}from"efficient-easel/screen/lib/host";function M5(e){let o=new Set([...Object.keys(ys[e]??{}),...bs[e]??[]]);for(let[t,r]of Object.entries(of[e]??{}))r.verb==="snapshot"&&o.add(t);return[...o].sort()}var H5={CollectionCard:"product",FooterMenu:"menu",Gallery:"product",GalleryItem:"product",ProductGrid:"product",ProductHero:"product",SpecTable:"product",Events:"blog",FeaturedCover:"blog",LongRead:"blog",SubscribeBlogs:"blog"},QS={product:"Synced from the product.",blog:"Synced from the blog post.",menu:"Synced from the site menu."},JS="Open",eC={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 dn(e){let o=e?.source?.slug;return pe(o)}function un(e){return H5[e]??null}function oC(e,o){let t=un(e);return t&&M5(e).includes(o)?t:null}function Yl(e){let o=e?.menu?.id;return pe(o)}var tC="data-sf-spec-region";function ule(e,o,t){if(!e)return;let r=t[e];if(r)return{fontFamily:`var(--font-role-${e})`,fontSize:`var(--size-${r}, ${o.builtIn})`}}function la(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 z5(e){return`@${e}`}function Eu(e,o){if(!o.startsWith("@"))return null;let t=o.slice(1);return t in e?t:null}function W5(e,o){return o&&o in e?o:null}var pn={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)]"},G5={tag:{label:"Tag",follows:"Labels",builtIn:la(pn.tag),writable:!0},name:{label:"Name",follows:"Heading 2",builtIn:la(pn.name),writable:!0},body:{label:"Body",follows:"Body",builtIn:la(pn.body),writable:!0},price:{label:"Price",follows:"Labels",builtIn:la(pn.price),writable:!0},link:{label:"Link",follows:"Labels",builtIn:la(pn.link),writable:!0}},rC=G5;var U5={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}},aC=U5;var yle=tC,nC={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 sC={SpecTable:nC,FAQ:aC,Collections:rC};function lC(e){return e&&Object.hasOwn(sC,e)?sC[e]:null}function Lu(e){return e?l(e):null}function dC(e){return e.kind==="role"?dc[e.role]:e.kind==="custom"?"Custom":null}function i4(e){let o=Jo(e.role);return o?{kind:"role",role:o}:null}function c4(e,o){if(!e)return{kind:"unread"};let{faceRole:t,base:r}=e;if(o[t]===r.fontKey)return{kind:"role",role:t};let a=Object.keys(o).filter(n=>o[n]===r.fontKey);return a.length===1?{kind:"role",role:a[0]}:{kind:"custom"}}function Fu(e,o,t,r){return i4(Tl(e,o))??c4(t,r)}function f4(e,o){if(!e.length)return null;let t=o(e[0]);return e.every(r=>o(r)===t)?t:null}var Xl="";function d4({face:e,base:o,onPick:t}){let r=e.kind==="role"?e.role:Xl,a=[{label:l("No style"),value:Xl},...$m.map(n=>({label:l(dc[n]),value:n}))];return K(q5,{ariaLabel:l("Style"),value:r,options:a,inline:!0,onChange:n=>t(n===Xl?null:n),renderOption:n=>n.value===Xl?Ao(Zl,{children:[K("span",{className:"es-fsel-label sf-part-style-keep",children:n.label}),K("span",{className:"sf-part-style-aside","aria-hidden":"true",children:l("Section\u2019s own")})]}):K("span",{className:"es-fsel-label",style:{fontFamily:`var(--font-role-${n.value})`},children:n.label}),renderValue:()=>K("span",{style:{fontFamily:o?.fontKey?`var(${Er(o.fontKey)?.cssVar})`:void 0,fontWeight:o?.weight},children:Lu(dC(e))}),valueText:n=>Lu(dC(e))??n?.label??""})}function u4({sectionName:e,onBack:o,textEditor:t,styleRow:r,children:a}){return Ao("div",{className:"sf-part-panel",children:[K(Ql,{inline:!0,name:l(e),onSelect:o}),t,r,a]})}function Jl({source:e,slug:o,menuId:t}){let r=l4(),a=eC[e],n=!a.needsSlug||!!o;return K("div",{className:"sf-note sf-note--source",children:Ao("p",{className:"es-field-hint sf-hint-keep",children:[l(QS[e]),n?Ao(Zl,{children:[" ",K(e4,{type:"button",variant:"link",size:"sm",onClick:()=>{a.type==="storefront-editor:open-menus"?r.send(a.type,{menuId:t??null}):o&&r.send(a.type,{slug:o})},children:l(JS)})]}):null]})})}var uC=4,p4=120;function m4({region:e,sizePx:o,face:t,base:r,onFollowStyle:a,source:n,slug:s,onBack:i,shows:c}){let d=e.follows;return Ao("div",{className:"sf-note",children:[c("regionNote")&&Ao(Zl,{children:[K("p",{children:K("strong",{children:l(e.label)})}),K("p",{children:o?l("Its size follows Styles \u25B8 {follows} \u2014 {px}px right now.",{follows:l(d),px:Math.round(o)}):l("Its size follows Styles \u25B8 {follows}.",{follows:l(d)})})]}),a?c("regionStyle")?K(Zl,{children:K(Y5,{label:l("Style"),icon:K(X5,{}),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:K(d4,{face:t,base:r,onPick:a})})}):null:c("regionNote")&&K("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&&c("sourceNote")?K(Jl,{source:n,slug:s}):null,K(Ql,{inline:!0,name:l("Page"),onSelect:i})]})}function x4({onBack:e}){return Ao("div",{className:"sf-note",children:[K("p",{children:K("strong",{children:l("This part is no longer here.")})}),K("p",{children:l("The section it belonged to has been changed or removed.")}),K(Ql,{inline:!0,name:l("Page"),onSelect:e})]})}function h4({onBack:e,partId:o,why:t}){return Ao("div",{className:"sf-note",children:[K("p",{children:K("strong",{children:l("This part's settings did not open.")})}),K("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.")}),K("p",{className:"sf-note-detail",children:Ao("code",{children:[o," \u2014 ",t]})}),K(Ql,{inline:!0,name:l("Page"),onSelect:e})]})}function pC({nodeId:e,propKey:o,onBack:t,onEditStyle:r}){let{getItemById:a,getSelectorForId:n,config:s}=Q5(W=>W),i=s4(),c=WS(),{partStyle:d}=KS(),{fonts:m,textStyles:x}=oe(),u=$5(r4),h=!u?.capabilities?.hasSiteTheme,{persist:g}=_r({themeFromDocument:h,tokenRef:u?.tokenRef,siteId:u?.siteId??null}),k=El({themeFromDocument:h,persist:g}),[P,O]=iC(!1),w=a4(),I=W=>V5(OS[W],w),b=j5(null),v=a(e),S=n(e),E=v?s.components[v.type]:void 0,{key:A,row:N}=Fo(o),z=E?.fields?.[A],_=N?sa(z,N):z,T=bl(e,o),R=v?.props??{},F=Vr(_),M=ol(_),U=zy(_),Y=v?un(v.type):null,me=v?oC(v.type,A):null,Ae=N?Ua(R[A],N):R[A],We=!!N&&!(Array.isArray(R[A])&&N.index<R[A].length);Ou(()=>{zS(document)||b.current?.querySelector(".es-copy [contenteditable='true'], .es-copy textarea, .sf-copybox textarea, .sf-copybox input")?.focus()},[T]);let[Ve,Ye]=iC(0);Ou(()=>Ye(0),[T]);let fe=!!v&&!We&&(!S||!_);Ou(()=>{if(!fe||Ve>=uC)return;let W=setTimeout(()=>Ye(Re=>Re+1),p4);return()=>clearTimeout(W)},[fe,Ve]);let _e=fe&&Ve<uC;if(!v||We)return K(x4,{onBack:t});let Oe=lC(v.type),so=Oe?Eu(Oe,o):null;if(Oe&&so){let W=d?.partId===T?d:null,Re=Oe[so],Ho=Re.writable===!0&&!!S,St=tc=>{S&&i.replaceComponent(S.zone,S.index,{...v,props:Jr(R,o,"role",tc)})};return K(m4,{region:Re,sizePx:W?.base.sizePx??null,face:Fu(R,o,W,m),base:W?.base??null,onFollowStyle:Ho?St:void 0,source:Y,slug:dn(R),onBack:t,shows:I})}if(!S||!_)return _e?K("div",{className:"sf-note","aria-busy":"true"}):K(h4,{onBack:t,partId:T,why:S?"no field":"no selector"});let eo=W=>{i.replaceComponent(S.zone,S.index,{...v,props:W})},xo=W=>{if(At(W).hidden!==At(Ae).hidden||!F){let Re=N?pd(R,A,N,W):{...R,[A]:W};Re&&eo(Re);return}jl({node:v,propKey:o,kind:F,zone:S.zone,index:S.index},At(W).text,i.replaceComponent)},yt=Ae,ho=d?.partId===T?d:null,Io=ho?.styleOwner,Co=Io?a(Io.owner):null,Zo=Io&&Co?n(Io.owner):null,bt=!!(Io&&Co&&Zo),lo=bt?Co.props??{}:R,B=bt?W=>i.replaceComponent(Zo.zone,Zo.index,{...Co,props:W}):eo,re=bt?Io.kind:Vl(v?.type,o),ae=Tl(lo,re),ue=[{partKey:re,face:Fu(lo,re,ho,m),sizeGroup:ho?.sizeGroup??null,base:ho?.base??g4,style:ae}],Mo=f4(ue,W=>W.sizeGroup),Gt=Kl(ho?.inks),wo=(W,Re)=>{let Ho=lo;for(let St of ue)Ho=Jr(Ho,St.partKey,W,Re);B(Ho)},io=W=>W?wo("textStyle",W):Qo({textStyle:null,role:null}),Qo=W=>{let Re=lo;for(let Ho of ue)for(let[St,tc]of Object.entries(W))Re=Jr(Re,Ho.partKey,St,tc??null);B(Re)},ka=F==="text"||F==="textarea",{text:Sm,hidden:kr}=At(Ae),Xn=_?.[n4]?.label??o,Cm=kr?l("Show {label} on the slide",{label:l(Xn)}):l("Hide {label} on the slide",{label:l(Xn)}),wm=Ao("div",{className:"sf-field-head",children:[K(Z5,{}),K("span",{className:"sf-field-label sf-field-label--inline",children:l(Xn)}),ka&&K(t4,{content:Cm,children:K(o4,{"aria-pressed":kr,"aria-label":Cm,onClick:()=>xo({text:Sm,hidden:!kr}),children:kr?K(cC,{name:"eye-off",size:14}):K(cC,{name:"eye",size:14})})})]}),km=!M&&U,b0=!!F&&(Vg(_)||M||kr||!U),vm=Fu(lo,re,ho,m),S0=vm.kind==="role"?vm.role:null,oc=Qy(ae)??hb(S0),Tm=Bt(k.saved,k.old),C0=Object.entries(ae).filter(([W,Re])=>W!=="role"&&W!=="textStyle"&&Re!==void 0).length,w0=()=>{let W=lo;for(let Re of ue){let{role:Ho,textStyle:St}=Re.style;W=rb(W,Re.partKey),Ho&&(W=Jr(W,Re.partKey,"role",Ho)),St&&(W=Jr(W,Re.partKey,"textStyle",St))}B(W)},Ut=oc,k0=Ib(ue[0].style),v0=Ut?Tm.find(W=>W.id===Ut)?.name??Ut:"",T0=()=>{O(!1),Ut&&(k.write(gb({saved:k.saved,old:k.old,styleId:Ut,values:Bd(ue[0].style)}),!0),w0())};return Ao(u4,{sectionName:E?.label??v.type,onBack:t,textEditor:I("words")?K("div",{ref:b,className:"sf-part-text",children:b0?K(US,{text:Sm,onTextChange:W=>xo(ka?{text:W,hidden:kr}:W),multiline:hl(F),markup:F!=="plainText",styled:!1,style:ue[0].style,base:ue[0].base,setValue:Qo,colors:Gt,placeholder:Lu(Ly(_))??void 0,ariaLabel:l(Xn),head:wm,typedOnCanvas:c===T}):F?ka?wm:null:K(K5,{field:_,name:o,value:yt,onChange:xo,id:`sf-part-${e}-${o}`})}):void 0,children:[me&&I("sourceNote")&&K(Jl,{source:me,slug:dn(R),menuId:Yl(R)}),km&&K(J5,{style:I("style")?{value:oc??"",options:[{value:"",label:l("No style"),description:l("Section\u2019s own")},...Tm.map(W=>({value:W.id,label:W.name,description:W.values.font?Er(W.values.font)?.label:void 0}))],onChange:W=>io(W||null),changed:C0>0,onEditStyles:r,onUpdateStyle:Ut&&k0?()=>O(!0):void 0}:void 0,font:I("font")?{value:ae.font??"",styleValue:Er(ue[0].base.fontKey)?.label,options:ko.map(W=>({label:W.label,value:W.key})),onChange:W=>wo("font",W||null)}:void 0,italic:I("italic")?{value:ae.italic,styleValue:I4(x,oc),onChange:W=>wo("italic",W??null)}:void 0,cells:Pu(ue[0].style,ue[0].base,Qo,fC(w)).filter(W=>I(W.key)),align:I("align")?fC(w)==="mobile"?{value:ae.alignPhone??"",styleValue:ae.align??ue[0].base.align,onChange:W=>wo("alignPhone",W||null)}:{value:ae.align??"",styleValue:ue[0].base.align,onChange:W=>wo("align",W||null)}:void 0,letterCase:I("letterCase")?{value:ae.case??"",styleValue:ue[0].base.case,onChange:W=>wo("case",W||null)}:void 0}),P&&Ut&&K(jS,{styleName:v0,onCancel:()=>O(!1),onConfirm:T0}),km&&Mo===null&&I("fixedSizeHint")&&K("p",{className:"es-field-hint sf-hint-keep",children:l("Fixed size \u2014 the site\u2019s Text setting doesn\u2019t resize this.")})]})}function I4(e,o){return!o||!Array.isArray(e)?!1:e.find(t=>t?.id===o)?.values?.italic===!0}var g4={fontKey:"",sizePx:16,weight:400,lineRatio:1.4,letterEm:0,align:"left",case:"none",paddingPx:0};import{jsx as Ro,jsxs as Au,Fragment as y4}from"react/jsx-runtime";import{useCallback as b4,useRef as S4,useState as mn}from"react";import{InspectorIconButton as C4}from"efficient-easel/chrome";import{PopupMenu as w4,PopupMenuItem as k4,PopupMenuLabel as ei}from"efficient-shell/ui";import{CopyToPageIcon as v4}from"efficient-easel/icons";import{useEaselSession as T4}from"efficient-easel/screen/lib/session-context";import{cloneNodeWithFreshIds as P4}from"efficient-easel/screen/lib/document/section-doc";import{FOOTER_TYPE as E4}from"efficient-easel/draw";function mC({node:e,currentSlug:o,siteId:t,tokenRef:r,runAuthed:a,onNotify:n}){let[s,i]=mn(!1),[c,d]=mn(null),m=T4(),[x,u]=mn(!1),[h,g]=mn(null),k=S4(null),[P,O]=mn(null),w=b4(async()=>{if(m.usesBridgedToken&&!r.current){u(!0);return}try{d(await He(m).pages.list(t?{siteId:t}:void 0))}catch{u(!0)}},[r,t,m]),I=()=>{if(s){i(!1);return}let S=k.current?.getBoundingClientRect();S&&O({top:S.bottom+6,right:Math.max(8,window.innerWidth-S.right)}),d(null),u(!1),w(),i(!0)},b=(c??[]).filter(S=>S.slug!==o),v=async S=>{if(h)return;g(S.slug);let E=P4(e),A=m.documentHooks?.storedNode?.(E)??E,N=He(m).pages,z=await a(async()=>{let _=await N.load({id:S.id});if(!_)throw new Error(`Page "${S.slug}" no longer exists.`);let T=_.layout??{},R=Array.isArray(T.content)?[...T.content]:[],F=R.findIndex(M=>M?.type===E4);R.splice(F===-1?R.length:F,0,A),await N.save(S.id,{layout:{root:{},zones:{},...T,content:R}},{version:_.version,clientId:""})});g(null),i(!1),n?.(z?l("Duplicated to \u201C{name}\u201D",{name:S.label}):l("Couldn\u2019t duplicate the section \u2014 please retry"),z?"success":"error")};return Au(y4,{children:[Ro("span",{"data-menu-toggle":!0,style:{display:"contents"},children:Ro(C4,{buttonRef:k,label:l("Duplicate to another page"),hasPopup:"menu",expanded:s,onClick:I,children:Ro(v4,{size:15})})}),s&&P&&Ro(w4,{portal:!0,style:{top:P.top,right:P.right},onClose:()=>i(!1),children:Au("div",{role:"menu","aria-label":l("Duplicate to page"),children:[Ro(ei,{children:l("Duplicate to page")}),x?Ro(ei,{children:l("Couldn\u2019t load pages")}):c===null?Ro(ei,{children:l("Loading\u2026")}):b.length===0?Ro(ei,{children:l("No other pages")}):b.map(S=>Au(k4,{role:"menuitem",disabled:h!==null,onClick:()=>{v(S)},children:[Ro("span",{className:"min-w-0 flex-1 truncate",children:S.label}),h===S.slug?Ro("span",{className:"shrink-0 text-xs",children:l("Copying\u2026")}):S.draft&&Ro("span",{className:"shrink-0 text-xs",children:l("draft")})]},S.id))]})})]})}import{useScreenDocument as p6}from"efficient-easel/screen/components/ScreenDocumentContext";import{useSectionOps as m6}from"efficient-easel/screen/lib/document/use-section-ops";import{SELECTION_MODE as Nfe,isSelectionMode as Xu}from"efficient-easel/screen/lib/screen-parts";import{usePreviewParts as x6}from"efficient-easel/draw/client";import{jsx as xn,jsxs as O4}from"react/jsx-runtime";import{SettingsDrill as F4}from"efficient-easel/panel";import{UiIcon as L4}from"efficient-easel/draw/client";var A4="Not shown on the page";function R4({part:e,onOpen:o}){return xn(F4,{name:l(e.label),preview:e.offPage?l(A4):e.preview||l("Empty"),offPage:e.offPage,status:e.hidden?xn("span",{className:"sf-entry-eye",role:"img","aria-label":l("Hidden on the page"),children:xn(L4,{name:"eye-off",size:14})}):void 0,onOpen:()=>o(e.key)})}function Ru(e){return e.filter(o=>!o.identifier)}function xC({parts:e,onOpen:o,heading:t=!0}){let r=Ru(e);return r.length?O4("div",{className:"sf-entries",children:[t?xn("h3",{className:"sf-entries-head",children:l("Text")}):null,r.map(a=>xn(R4,{part:a,onOpen:o},a.key))]}):null}import{HEADER_TYPE as h6,ROOT_ZONE as cw}from"efficient-easel/draw";import{HEADER_TYPE as ro,FOOTER_TYPE as ye,newNodeId as B4}from"efficient-easel/draw";function oi(){return{type:ro,props:{id:B4(ro)}}}var hC=[{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"}],_4=hC.filter(e=>e.type!=="FooterLogo"&&e.type!=="FooterGroup"),D4="FooterGroup",IC="blocks";function gC(e){return e===ye?hC:e===D4?_4:null}function ti(){let e=(o,t)=>({type:o,props:{id:`${o}-${crypto.randomUUID()}`,...t}});return[e("FooterLogo",{widthPct:100,align:"left",tagline:""}),e("FooterEmailSignup",{...kI}),e("FooterPayment",{...vI})]}var be="SiteHeader",xe="SiteFooter",Bu="sections",Fie=[be,xe],ia=e=>e===be||e===xe,yC=e=>`${e}:${Bu}`;function bC(e,o,t=[]){return{type:e,props:{id:o,[Bu]:t}}}var N4=new Set(["Footer",be,xe]);function ca(e){let o=new Set,t=!1,r=e.filter(a=>{let n=a?.type??"";return n==="Header"?(t=!0,!1):N4.has(n)?o.has(n)?(t=!0,!1):(o.add(n),!0):!0});return t?r:e}function ri(e,o){return e.some(t=>t?.type===o.type)?e:o.type===be?[o,...e]:[...e,o]}var SC={[be]:{max:3,takes:["Flex","Ticker"]},[xe]:{max:6,takes:["Flex","Prose","Logos","Divider"]}};function CC(e,o,t){if(!ia(e))return!0;let r=SC[e];return t<r.max&&r.takes.includes(o)}function wC(e,o){let t=o,r=t?.props?.id;if(r==null)return null;let a=e?.content;if(!Array.isArray(a))return null;for(let n of a){if(!ia(n?.type))continue;let s=n.props?.[Bu];if(!Array.isArray(s)||!s.some(c=>c?.props?.id===r))continue;let i=SC[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 _u(e){switch(e?.type){case be:case xe:return l("On every page");case ro:case ye:return l("On every page \xB7 old style");default:return null}}var kC=()=>null,vC=()=>l("Changed on every page");function ai(e,o){let t=Zx(e,o);if(t)return t;let r=wC(e,o);if(!r)return null;let a=r.group===be;return r.why==="type"?a?l("The header cannot take another one of these"):l("The footer cannot take another one of these"):a?l("The header holds at most 3 sections"):l("The footer holds at most 6 sections")}import{jsx as si,Fragment as q4,jsxs as K4}from"react/jsx-runtime";import{useState as V4}from"react";import{createNode as Y4,newId as X4}from"efficient-easel/data";import{useEasel as Z4}from"efficient-easel/easel";import{Banner as Q4,Button as Du}from"efficient-shell/ui";import{useScreenDocument as J4}from"efficient-easel/screen/components/ScreenDocumentContext";var ni="Flex",M4={FooterMenu:"MenuBlock",FooterEmailSignup:"EmailFormBlock",FooterSocial:"SocialLogosBlock",FooterPayment:"PaymentLogosBlock"},H4=e=>{let{id:o,...t}=e;return t},TC=e=>typeof e=="string"?e:"",PC={sm:12,md:13,lg:15},z4="md",EC=1.5,W4={size:13,lineHeight:EC,width:280},G4=14,U4=40,$4=e=>e==="center"||e==="right"?e:"left";function j4(e){let o={},t=[["padTop","sectionPaddingTop"],["padRight","sectionPaddingRight"],["padBottom","sectionPaddingBottom"],["padLeft","sectionPaddingLeft"]];for(let[r,a]of t){let n=$(e[r]);n&&(o[a]=n)}return o}function OC(e,o){let t=e.props??{},r=M4[e.type];if(r)return[o(r,H4(t))];switch(e.type){case"FooterLogo":{let a=$4(t.align),n=o("LogoBlock",{...t.reverse?{reverse:t.reverse}:{},...typeof t.customColor=="string"&&t.customColor?{customColor:t.customColor}:{},heightPx:Math.round(ex*(($(t.widthPct)??100)/100)),href:"/",align:a,...j4(t)}),s=TC(t.tagline).trim();return s?[n,o("Text",{text:s,tone:"dim",align:a,_partStyles:{text:{...W4}}})]:[n]}case"FooterText":{let a=typeof t.size=="string"&&t.size in PC?t.size:z4;return[o("Text",{text:TC(t.text),tone:typeof t.tone=="string"?t.tone:"default",_partStyles:{text:{size:PC[a],lineHeight:EC}}})]}case"FooterDivider":{let a=$(t.thickness),n=$(t.lengthPct);return[o("Divider",{...a!==void 0?{thickness:a}:{},...n!==void 0?{lengthPct:n}:{},...t.hideOnMobile===!0?{hideOnMobile:!0}:{}})]}case"FooterGroup":{let a=Array.isArray(t.blocks)?t.blocks:[];return[o(ni,{direction:t.direction==="horizontal"?"row":"column",gap:Gr("FooterGroup",t.gap),align:t.align==="center"||t.align==="end"||t.align==="stretch"?t.align:"start",...Na,content:a.flatMap(n=>OC(n,o))})]}default:return[]}}function hn(e,o,t){let r=e&&Array.isArray(e.props?.blocks)?e.props.blocks:[],a=d=>o(ni,{direction:"row",wrap:!0,share:"equal",gap:U4,content:d}),n=[],s=[];for(let d of r){let m=OC(d,o);if(d.type==="FooterDivider"){s.length&&n.push(a(s)),s=[],n.push(...m);continue}m.length<=1?s.push(...m):s.push(o(ni,{direction:"column",gap:G4,align:"stretch",...Na,content:m}))}(s.length||!n.length)&&n.push(a(s));let i=o(ni,{direction:"column",content:[o("LegalLineBlock")]}),c=bC(xe,t,[...n,i]);return{...c,props:{...c.props,...e?.props?.width==="full"?{fullWidth:!0}:{}}}}function FC(){let{appState:e,dispatch:o,config:t}=Z4(m=>m),{readOnly:r}=J4(),[a,n]=V4(!1),s=e.data.content;if(r||s.some(m=>m.type===xe))return null;let i=s.find(m=>m.type===ye)??null,c=(m,x)=>Y4(t,m,x),d=()=>{let m=hn(i,c,X4(xe));o({type:"setData",data:x=>({...x,content:[...ri(x.content,m)]}),recordHistory:!0}),n(!1)};return si(Q4,{tone:"info",title:l("This footer uses the old layout"),action:a?K4(q4,{children:[si(Du,{variant:"primary",size:"sm",onClick:d,children:l("Switch now")}),si(Du,{variant:"secondary",size:"sm",onClick:()=>n(!1),children:l("Cancel")})]}):si(Du,{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 Vu}from"react/jsx-runtime";import{useLayoutEffect as V3,useMemo as ju,useRef as Y3,useState as qu}from"react";import{useEasel as X3,useSelectedFields as Z3}from"efficient-easel/easel";import{Inspector as Q3,planFields as rw}from"efficient-easel/fields";import{group as D3}from"efficient-easel/screen/lib/document/box-fields";import{deviceField as N3,deviceMetaOf as qC}from"efficient-easel/screen/lib/document/device-fields";import{jsx as q,jsxs as ct}from"react/jsx-runtime";import{phoneKey as Dt}from"efficient-easel/draw";import{SettingsDefaultReset as s3,SettingsField as HC}from"efficient-easel/panel";import{AnimationIcon as zC,ClockIcon as l3,DirectionDownIcon as i3,DirectionIcon as c3,DirectionLeftIcon as f3,DirectionRightIcon as d3,DirectionUpIcon as u3,DurationIcon as p3}from"efficient-easel/icons";import{deviceField as fa}from"efficient-easel/screen/lib/document/device-fields";import{NoControlMark as m3,noControlField as x3}from"efficient-easel/screen/lib/document/panel-no-control-mark";import{describedAs as WC,group as h3,phoneTwinFields as I3}from"efficient-easel/screen/lib/document/box-fields";import{ENTRANCE_FROM as g3,ENTRANCE_FROM_DEFAULT as GC,ENTRANCE_KINDS as ci,ENTRANCE_KINDS_WITH_FROM as DC,MOTION_TIMING as y3,entranceAttrs as b3,playEntrance as S3,readEntrance as C3}from"efficient-shell/format";import{IconPicker as w3}from"efficient-shell/ui";import{jsx as LC}from"react/jsx-runtime";import{ClockIcon as e3,DurationIcon as o3}from"efficient-easel/icons";import{MOTION_TIMING as AC}from"efficient-shell/format";function RC(e){let{min:o,max:t,step:r,default:a}=AC[e].duration;return rt("Duration",LC(o3,{}),o,t,r,a,"s")}function BC(e){let{min:o,max:t,step:r,default:a}=AC[e].delay;return rt("Delay",LC(e3,{}),o,t,r,a,"s")}import{phoneKey as t3}from"efficient-easel/draw";import{readEntrance as r3}from"efficient-shell/format";var Se={kind:"entrance",from:"entranceFrom",duration:"entranceDuration",delay:"entranceDelay"},ii="sectionAnimation",_C=e=>e!=null&&e!=="";function a3(e,o){let t=e[Se[o]];return o==="kind"&&!_C(t)?e[ii]:t}function li(e,o,t){if(t==="phone"){let r=e[t3(Se[o])];if(_C(r))return r}return a3(e,o)}function In(e,o){return r3(li(e,"kind",o),li(e,"from",o),li(e,"duration",o),li(e,"delay",o))}function ice(e){let o=In(e,"desktop"),t=In(e,"phone");return o.kind==="none"&&t.kind==="none"?null:{desktop:o,phone:t}}var n3={...Object.fromEntries([...oI].map(e=>[e,"a root position: sticky bar; an outer box becomes its sticky containing block and the pin collapses (the same fact every wrapper pass excludes it for, lib/content/section-surface)"])),HeroSlide:"a slide is a direct child of the Hero's transform track ([&>*]:basis-full); a wrapper would take its width, and the Hero already moves one slide in at a time",HeroGroup:"a slide box is placed by grid-item properties on its own root (--sf-hg-row, justify-self); a wrapper becomes the grid item and the box loses its anchor (lib/document/blocks/general/HeroGroup/meta)"},cce=new Set(Object.keys(n3));var da={none:"None",fade:"Fade",rise:"Rise",scale:"Scale",glide:"Glide",bounce:"Bounce",flip:"Flip",reveal:"Reveal",spin:"Spin"},k3={top:"Top",bottom:"Bottom",left:"Left",right:"Right"},v3={top:()=>q(i3,{}),bottom:()=>q(u3,{}),left:()=>q(d3,{}),right:()=>q(f3,{})},Hu="Entrance",NC=ci.filter(e=>e!=="none"),Nu=e=>({any:[{field:Se.kind,in:e},{all:[{field:Se.kind,set:!1},{field:ii,in:e}]}]}),MC=e=>({any:[{field:Dt(Se.kind),in:e},{all:[{field:Dt(Se.kind),set:!1},Nu(e)]}]}),T3=[[[Se.from],Nu(DC)],[[Dt(Se.from)],MC(DC)],[[Se.duration,Se.delay],Nu(NC)],[[Dt(Se.duration),Dt(Se.delay)],MC(NC)]],it=({children:e})=>q("svg",{viewBox:"0 0 40 40",width:"40",height:"40",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":!0,children:e}),Bo=({x:e=12,y:o=12,o:t=1})=>q("rect",{x:e,y:o,width:"16",height:"16",rx:"2",opacity:t}),P3={none:q(it,{children:q(Bo,{})}),fade:ct(it,{children:[q(Bo,{x:6,o:.3}),q(Bo,{x:18})]}),rise:ct(it,{children:[q(Bo,{y:20,o:.3}),q(Bo,{y:8}),q("path",{d:"M20 36v-5m-2 2 2-2 2 2"})]}),scale:ct(it,{children:[q("rect",{x:"16",y:"16",width:"8",height:"8",rx:"1",opacity:".35"}),q(Bo,{}),q("path",{d:"M6 6l4 4M34 34l-4-4"})]}),glide:ct(it,{children:[q(Bo,{x:2,o:.3}),q(Bo,{x:20}),q("path",{d:"M4 33h12m-2-2 2 2-2 2"})]}),bounce:ct(it,{children:[q(Bo,{y:6}),q("path",{d:"M8 34c3-6 5-6 8 0s5 6 8 0 5-6 8 0"})]}),flip:ct(it,{children:[q("path",{d:"M12 12l16 4v8l-16 4z",opacity:".35"}),q(Bo,{}),q("path",{d:"M20 4v32",strokeDasharray:"2 2"})]}),reveal:ct(it,{children:[q("rect",{x:"12",y:"12",width:"16",height:"16",rx:"2",strokeDasharray:"2 2",opacity:".5"}),q("path",{d:"M12 22h16v4a2 2 0 0 1-2 2H14a2 2 0 0 1-2-2z",fill:"currentColor",opacity:".35"}),q("path",{d:"M20 36v-5m-2 2 2-2 2 2"})]}),spin:ct(it,{children:[q(Bo,{}),q("path",{d:"M33 14a14 14 0 0 1 0 12m0 0-3-1m3 1 1-3"})]})};function E3({kind:e}){let{attrs:o}=b3(C3(e,GC));return ct("span",{className:"sf-entrance-pic",children:[q("span",{className:"sf-entrance-stage",children:q("i",{...o,children:P3[e]})}),q("span",{className:"sf-entrance-cap",children:l(da[e])})]})}var O3=(e,o)=>{let t=o.querySelector(".sf-entrance-stage > i");t&&S3(t)},F3={width:"3.5rem",height:"4.25rem"};function UC({value:e,onChange:o}){return q(w3,{label:l(Hu),value:e,emptyValue:"none",columns:3,cell:F3,onChange:o,onPreview:O3,tooltips:!1,options:ci.map(t=>({value:t,label:l(da[t]),icon:q(E3,{kind:t})}))})}var Mu="Effect";function L3({value:e,onChange:o}){let t=lt(),r=In({...t,[Se.kind]:e},"desktop").kind;return q(HC,{label:l(Mu),icon:q(zC,{}),value:l(da[r]),children:q(UC,{value:r,onChange:o})})}function A3({value:e,onChange:o}){let t=lt(),r=typeof e=="string"&&ci.includes(e),a=In(t,"desktop").kind;return q(HC,{label:l(Mu),icon:q(zC,{}),value:l(da[r?e:a]),changed:r,action:q(s3,{words:X()?.panel,label:l(Mu),changed:r,detail:l("{value} on desktop",{value:l(da[a])}),onReset:()=>o(void 0)}),children:q(UC,{value:r?e:a,onChange:o})})}var $C={type:"select",label:Hu,options:ci.map(e=>({value:e,label:da[e]}))},R3=()=>WC({type:"custom",render:({value:e,onChange:o})=>q(L3,{value:e,onChange:o})},$C),B3=()=>WC({type:"custom",render:({value:e,onChange:o})=>q(A3,{value:e,onChange:o})},$C),_3=g3.map(e=>({label:k3[e],value:e,picture:v3[e]()}));function fi(){let{duration:e,delay:o}=y3.entrance,t={_gEntrance:h3(Hu),[Se.kind]:fa("desktop",R3()),[ii]:x3({type:"custom",render:()=>q(m3,{})},"always"),[Dt(Se.kind)]:fa("mobile",B3()),...I3(Se.from,Vs("From",q(c3,{}),_3,GC)),[Se.duration]:fa("desktop",RC("entrance")),[Dt(Se.duration)]:fa("mobile",sl({label:"Duration",desktopKey:Se.duration,icon:q(p3,{}),min:e.min,max:e.max,step:e.step,fallback:e.default,unit:"s"})),[Se.delay]:fa("desktop",BC("entrance")),[Dt(Se.delay)]:fa("mobile",sl({label:"Delay",desktopKey:Se.delay,icon:q(l3,{}),min:o.min,max:o.max,step:o.step,fallback:o.default,unit:"s"}))};return _c(t,T3)}import{DESIGN_GROUPS as Wu,SETTINGS_BUCKETS as M3}from"efficient-easel/panel";import{BUCKET_KEY as fo,DESIGN_GROUP_KEY as gn}from"efficient-easel/screen/lib/document/field-buckets";var yn=M3;var H3="Editor only \u2014 not shown live",Gu={"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",Map:"Content",Media:"Content","Background image":"Design",Color:"Design","Image tint":"Design",Style:"Design",Shape:"Design",Shadow:"Design",Texture:"Design","Text style":"Design",Entrance:"Animation",Anchor:"Anchor",Arrangement:"Layout","Auto-slide":"Layout",Bar:"Layout","Cell width":"Size",Behavior:"Layout",Schedule:"Layout",Controls:"Layout",Diagram:"Layout",[H3]:"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",Size:"Size",Height:"Size"},KC={"AlloyWheelsListing._gCards":"Design","ProductGrid._gCards":"Design"},VC={"Text._gSpacing":"Size","Heading._gSpacing":"Size"};function zu(e,o,t){let r=`${e}.${o}`;return VC[r]??KC[r]??Gu[t]}function YC(e){return e==="Animation"?[fo.Animation]:[fo.Design,gn[e]]}function di(...e){let o=[];for(let t of e)for(let r of Object.values(t)){let a=qC(r),n=st(a?a.inner:r),s=n?Gu[n.label]:void 0;if(s)for(let i of YC(s))o.includes(i)||o.push(i)}return o}var Bce=[...di(Ys(),ll("full"),il(),cl(),Vf()),...Object.keys(Ys()),...Object.keys(ll("full")),...Object.keys(il()),...Object.keys(cl()),...Object.keys(Vf())],_ce=[...di(rl()),...Object.keys(rl())],Dce=[...di(nl()),...Object.keys(nl())],Nce=[...di(fi()),...Object.keys(fi())],z3=Object.keys(iy()),W3=new Set(["cardImage","imageBackground"]),Mce=[...YC(zu("ProductGrid","_gCards","Cards")??"Design"),...z3.filter(e=>e.startsWith("_g")||W3.has(e))],Hce=Object.keys(cy()),zce=Object.keys(fy()),G3={"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)"},XC={Content:["Content"],Size:["Size"],Design:["Design","Style"],Layout:["Layout"],Position:["Position"],Anchor:["Anchor"],Animation:["Animation"]},ZC={_gAnchor:"repeated the Anchor group heading above it (two tabs, 11.0.0)"};{let e={...Ys(),...ll("full"),...il(),...cl(),...rl(),...nl(),...fi()};for(let o of Object.keys(ZC)){let t=st(e[o]),r=t?Gu[t.label]:void 0;if(!t||t.level!==2||!r||!XC[r].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 U3=new Set(["_sContent","_sStyle","_sLayout","_sMedia"]),$3=new Map([[fo.Design,"Content"],[fo.Animation,"Animation"],...Wu.map(e=>[gn[e],e])]);function QC(e){let o=new Set([...Object.values(fo),gn.Content]);for(let[t,r]of Object.entries(e))if(!o.has(t)&&st(r)?.level===1)return 1;return 2}function j3(e){let o=`${e}.`;return Object.keys(G3).filter(t=>t.startsWith(o)).map(t=>t.slice(o.length))}function q3(e,o){let t=qC(e),r=D3(o);return t?N3(t.tier,r):r}function K3(e,o){let t=st(o);return t?e==="Content"||e==="Animation"?Qg(o,t.label):Jg(o):o}function jC(e){return e==="Design"?Wu:["Animation"]}function Wce(e,o){let t=[],r=new Set(j3(o)),a=new Set,n=!1,s=null;for(let[u,h]of Object.entries(e)){let g=st(h);if(U3.has(u))throw new Error(`${o}.${u}: 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 k=$3.get(u);if(k!==void 0){if(g?.level!==1)throw new Error(`${o}.${u}: that key is reserved for the ${k} heading of the settings panel, but this field is ${g?`a level-${g.level} "${g.label}" header`:"not a header"}, so it cannot serve as one. Rename the section's own field.`);(u===fo.Design||u===fo.Animation)&&(n=!0),t.push(s={place:k,entries:[],adopted:!0});continue}if(!g){s||t.push(s={place:"Content",entries:[]}),s.entries.push([u,h]);continue}if(r.has(u)||u in ZC){let O=zu(o,u,g.label);if(g.level!==2||!O||!XC[O].includes(g.label))throw new Error(`${o}.${u}: ${r.has(u)?"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-${g.level} "${g.label}" header in the ${O??"(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.`);r.has(u)&&a.add(u),t.push(s={place:O,entries:[]});continue}let P=zu(o,u,g.label);if(!P)throw new Error(`${o}.${u}: the inspector group "${g.label}" is not classified in LABEL_GROUP (lib/document/field-groups.ts), so there is no way to say which of ${[...Wu,"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:P,entries:[[u,g.level===2?h:q3(h,g.label)]]})}let i=new Set(Object.entries(e).filter(([,u])=>st(u)).map(([u])=>u));for(let[u,h]of[["BLOCK_KEY_GROUP",VC],["KEY_GROUP",KC]]){let g=Object.keys(h).filter(k=>k.startsWith(`${o}.`)).filter(k=>!i.has(k.slice(o.length+1)));if(g.length)throw new Error(`${o}: ${u} (lib/document/field-groups.ts) lists ${JSON.stringify(g)}, 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 c=n?[]:[...r].filter(u=>!a.has(u));if(c.length)throw new Error(`${o}: RETIRED (lib/document/field-groups.ts) lists ${JSON.stringify(c)}, but this section has no such fold header${c.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(u=>u.entries.length>0).map(u=>u.place)),m=yn.filter(u=>jC(u).some(h=>d.has(h))),x={};for(let u of m){x[fo[u]]=tl(u,u===m[0]?m:null);for(let h of jC(u)){if(!d.has(h))continue;let g=t.filter(P=>P.place===h),k=g.findIndex(P=>P.adopted);k>0&&g.unshift(...g.splice(k,1)),u==="Design"&&(x[gn[h]]=jf(h));for(let P of g)for(let[O,w]of P.entries)x[O]=K3(h,w)}}return x}function Gce(e){return fo.Design in e?e:{[fo.Design]:tl("Design",null),[gn.Content]:jf("Content"),...e}}function Uce(e){return yn.some(o=>fo[o]in e)}function $ce(e){let o=yn.filter(r=>fo[r]in e);if(o.length===0)return e;let t={...e};for(let r of o)t[fo[r]]=tl(r,r===o[0]?o:null);return t}import{usePreviewDevice as J3}from"efficient-easel/draw/client";var Uu=" text",JC="Text";function $u(e){let o=e.rows.filter(t=>t.shown);return o.length===0||o.length===1&&o[0].labelled}function ew(e){return e.filter($u).map(o=>o.key)}function ow(e,o){let t=null;for(let r of o){let a=e[r];!a||a.marker!==!0||typeof a.fold!="string"||(t??={...e},t[r]={...a,fold:!1})}return t??e}function tw(e,o){if(e.size!==o.size)return!1;for(let t of e)if(!o.has(t))return!1;return!0}var Ku=new Map,ui=new Set;function e6(e,o){let t=new Map;for(let a of e.querySelectorAll(".es-insp-row[data-field]"))t.set(a.getAttribute("data-field")??"",a);let r=[];for(let[a,n]of o)r.push({key:a,rows:n.map(s=>{let i=t.get(s),c=!!i&&[...i.children].some(m=>!m.hidden),d=i?.querySelector(".es-field-label, .es-list-label")?.textContent?.trim();return{shown:c,labelled:c&&!!d}})});return r}var o6=Object.fromEntries(yn.map(e=>{let o=Xg[e];return[e,Vu(o,{},e)]}));function bn({entries:e,entryCount:o=0,part:t=null,omit:r}){let{id:a,fields:n,values:s,readOnly:i,onChange:c}=Z3(),d=J3(),{appState:m,config:x}=X3(M=>M),u=Mx(d,x,m.data.content??[],m.ui.itemSelector),h=uS(n,t),g=ju(()=>r?.length?Object.fromEntries(Object.entries(h).filter(([M])=>!r.includes(M))):h,[h,r]),k=Nx(g,s,u),[P,O]=qu(()=>new Set(ui)),[w,I]=qu(()=>new Set),b=Y3(null),v=ju(()=>{let M=new Map;for(let U of rw(k).rows){if(!U.fold)continue;let Y=M.get(U.fold.key)??[];Y.push(U.name),M.set(U.fold.key,Y)}return M},[k]);V3(()=>{let M=b.current?.parentElement;if(!M)return;let U=new Set(ew(e6(M,v)));I(Y=>tw(Y,U)?Y:U)});let S=ju(()=>ow(k,w),[k,w]),E={key:Uu,rows:Array.from({length:o},()=>({shown:!0,labelled:!0}))},A=$u(E)?void 0:{key:Uu,title:JC},[N,z]=qu(()=>Ku.get(a)),_=Ku.get(a),T=rw(k).buckets,R=_&&T.includes(_)?_:N&&T.includes(N)?N:T[0],F=R===void 0||Zg(T,R)!==!0;return Vu(Q3,{fields:S,values:s,onChange:c,readOnly:i,showWhenContext:{...u,node:s},tab:R,onTab:M=>{Ku.set(a,M),z(M)},tabIcons:o6,idPrefix:a,ariaLabel:l("Section settings"),lead:F?e:null,leadFold:A,closedFolds:P,onFold:(M,U)=>{U?ui.delete(M):ui.add(M),O(new Set(ui))},children:Vu("span",{ref:b,hidden:!0})})}import{jsx as Yu,jsxs as t6}from"react/jsx-runtime";import{InspectorUpLevel as aw}from"efficient-easel/chrome";function nw({nodeId:e,part:o,sectionName:t,onUpToSection:r}){let{select:a}=Hl();return t6("div",{children:[o!=="media"?Yu(aw,{inline:!0,name:l(na.media),onSelect:()=>a(rn(e,"media"))}):Yu(aw,{inline:!0,name:l(t),onSelect:r}),Yu(bn,{part:o})]})}import{SettingsSwitch as I6}from"efficient-easel/panel";var dw={kind:"header"},Qu={kind:"website"},uw={kind:"website",tab:ta,revealPageGroup:!0},pw={kind:"chat"},mw={kind:"social"},Sn="Part";function g6(e){return l("Part of {name}",{name:l(e)})}function y6(e,o,t){let r=e.describeNode(o);return{name:t,kindLabel:r?g6(r.label):l(Sn)}}function b6(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 xw({what:e}){let o=b6(e);return xr("div",{className:"sf-note",children:[le("p",{children:le("strong",{children:o.title})}),xr("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 Zu(e){let o=tn[e];return{name:na[e],kindLabel:Sn,icon:o,head:(t,r)=>{if(t.kind!==o)return null;let a=r.describeNode(t.nodeId);if(!a)return null;let n=fw({name:l(zl(e,a.props)),tier:"part",of:l(a.label)},{partOf:({name:s})=>l("Part of {name}",{name:s})});return{name:n.name,kindLabel:n.kind}},render:(t,r)=>t.kind===o?le(nw,{nodeId:t.nodeId,part:e,sectionName:r.describeNode(t.nodeId)?.label??"Hero",onUpToSection:()=>r.onSelectNode(t.nodeId)}):null}}var S6={header:{name:"Header",kindLabel:"Site settings",icon:"header",render:(e,o)=>{let t=o.hostPanels?.header;return t?le(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)=>le(Fl,{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:()=>le(SS,{})},social:{name:"Social links",kindLabel:"Site settings",icon:"social",render:()=>le(PS,{unavailable:le(xw,{what:"Social link"})})},ticker:{name:en,kindLabel:Sn,icon:"ticker",head:(e,o)=>e.kind==="ticker"?y6(o,e.heroId,l(en)):null,render:e=>le(LS,{heroId:e.kind==="ticker"?e.heroId:""})},heroMedia:Zu("media"),heroImage:Zu("image"),heroImage2:Zu("image2"),part:{name:Sn,kindLabel:Sn,icon:"Text",head:(e,o)=>{if(e.kind!=="part")return null;let t=o.describeNode(e.nodeId);if(!t)return null;let{key:r,row:a}=Fo(e.propKey),n=a?sa(t.fields[r],a):t.fields[r],s=_y(l(xd(Cl(n??{},r))),a),i=fw({name:s,tier:"part",of:l(t.label)},{partOf:({name:c})=>l("Part of {name}",{name:c})});return{name:i.name,kindLabel:i.kind}},render:(e,o)=>e.kind==="part"?le(pC,{nodeId:e.nodeId,propKey:e.propKey,onBack:()=>o.onSelectNode(e.nodeId),onEditStyle:o.onOpenSiteStyles}):null}},C6=new Set(["header","website","chat"]);function w6(e,o){if(e==="selection")return null;let t=S6[e];return C6.has(e)&&!o.hasSiteSettings?{...t,kindLabel:"Not part of a template",render:()=>le(xw,{what:t.name})}:t}function hw({mode:e,onOpenWebsiteSettings:o,onOpenSiteStyles:t,onOpenPageStyles:r,onSelectNode:a,hideNodeActions:n=!1,onNotify:s,onHidePanel:i}){let{capabilities:c,tokenRef:d,notifyParent:m,currentSlug:x,siteId:u,runAuthed:h,readOnly:g,navigate:k}=p6(),{rows:P}=Za(),O=P?.find(re=>re.slug===x)??null,w=n6(),I=Object.keys(w.fields).some(re=>!re.startsWith("_")&&!Va.includes(re)),{websiteName:b}=oe(),v=m6({readOnly:g}),{select:S}=x6(),{selectedItem:E,getItemById:A,getSelectorForId:N,config:z,appState:_}=a6(re=>re),T=d6(z,E?{type:E.type,props:E.props}:null),R=E?Gy(T??z.components[E.type]?.fields,E.props):[],F=re=>z.components[re]?.label??re,M=E?N(E.props.id):void 0,U=w6(e.kind,c),Y=u6(),me={capabilities:c,tokenRef:d,hostPanels:Y.chrome?.panels,describeNode:re=>{let ae=A(re);if(!ae)return null;let ue=z.components[ae.type];return{type:ae.type,label:ue?.label??ae.type,fields:ue?.fields??{},props:ae.props??{}}},siteId:u,websiteName:b??null,notifyParent:m,onNotify:s,onOpenWebsiteSettings:o,onOpenSiteStyles:t,onSelectNode:a},Ae=U?.head?.(e,me)??null,We=xS({kind:O?.kind,pageName:O?.label}),Ve=Ae?.name??(U?l(U.name):E?l(F(E.type)):We.name),Ye=Ae?.kindLabel??(U?l(U.kindLabel):E?M&&M.zone!==cw?l("Block"):l("Section"):We.kindLabel),fe=U?U.icon:E?E.type:"page",_e=U?null:E?z.components[E.type]?.fields??null:z.root?.fields??null,Oe=_e?QC(_e):2,so=Xu(e)&&E?un(E.type):null,eo=!!E&&!!M&&M.zone===cw&&E.type!==ye&&E.type!==h6,xo=ai(_?.data,E),yt=()=>{xo||M&&v.duplicateComponent(M.zone,M.index)},ho=()=>{M&&(v.removeComponent(M.zone,M.index),v.select(null))},Io=E?z.components[E.type]?.defaultProps?.previewHover:void 0,Co=Xu(e)&&!!E&&!!M&&Io!==void 0,Zo=Co&&E.props.previewHover===!0,bt=()=>{!E||!M||v.replaceComponent(M.zone,M.index,{...E,props:{...E.props,previewHover:!Zo}})},[lo,B]=r6(Gd);return xr("div",{className:`es-sidepanel es-sidepanel--right sf-panel sf-panel--right${lo||!(!U&&E)?"":" sf-hints-folded"}`,children:[le(i6,{icon:le(pr,{type:fe,size:15}),name:Ve,kind:Ye,actions:!n&&Xu(e)&&E&&E.type!==ye?xr(sw,{children:[le(lw,{label:l("Duplicate section"),title:xo??void 0,disabled:xo!==null,onClick:yt,children:le(c6,{size:15})}),eo&&c.hasSiteSettings&&le(mC,{node:E,currentSlug:x,siteId:u??void 0,tokenRef:d,runAuthed:h,onNotify:s}),le(lw,{label:l("Remove section"),danger:!0,onClick:ho,children:le(f6,{size:15})}),i?le(iw,{side:"right",onHide:i,divider:!0}):null]}):i?le(iw,{side:"right",onHide:i}):void 0}),Co&&xr("div",{className:"sf-preview-pin",children:[xr("div",{className:"sf-preview-pin-text",children:[le("span",{className:"sf-preview-pin-label",children:l("Preview hover state")}),le("span",{className:"sf-preview-pin-hint",children:l("not shown live")})]}),le(I6,{checked:Zo,onChange:bt,ariaLabel:l("Preview hover state")})]}),le(vg,{tier:Oe,children:le("div",{className:"sf-insp-body es-insp-body sf-scroll",children:U?U.render(e,me):E?xr(sw,{children:[E.type===ye&&c.hasSiteSettings&&le(FC,{}),le(Dh,{children:le(bn,{entries:le(xC,{parts:R,heading:!1,onOpen:re=>S(bl(E.props.id,re))}),entryCount:Ru(R).length})}),so&&le(Jl,{source:so,slug:dn(E?.props),menuId:Yl(E?.props)}),le(Ud,{shown:lo,onChange:B})]}):I?le(bn,{omit:Va}):le(l6,{variant:"none",icon:!1,message:l("Select a section or block to edit it."),children:r&&le(s6,{variant:"secondary",onClick:r,children:l("This page")})})})})]})}import{jsx as f,jsxs as C,Fragment as Sw}from"react/jsx-runtime";var Me={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)"},Ju="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=2,style:a}){return f("div",{style:{width:e,height:o,borderRadius:r,background:Me[t],flex:"none",...a}})}var k6={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",CityPictures:"citypictures",CityMaps:"citymaps",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"},G={position:"absolute",inset:0},p={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)"},Ie=(e,o,t=160)=>({background:`linear-gradient(${t}deg,${e},${o})`});function dt({size:e,style:o}){let t=Math.max(2,Math.round(e*.13)),r=(a,n,s)=>({position:"absolute",inset:a,background:n,borderRadius:t,...s?{mixBlendMode:s}:null});return C("span",{style:{position:"absolute",display:"block",width:e,height:e,...o},children:[f("span",{style:r("8% 26% 30% 6%",p.mark1)}),f("span",{style:r("26% 6% 8% 30%",p.mark2,"multiply")})]})}function mi({children:e}){return f("span",{style:{fontSize:"4.64cqw",fontWeight:700,letterSpacing:"0.06em",textTransform:"uppercase",color:p.muted},children:e})}function Iw({over:e,overTone:o,head:t,headSize:r=11.5,cta:a,ctaBg:n,ctaFg:s,tone:i}){return C(Sw,{children:[e&&f("span",{style:{fontSize:"3.65cqw",letterSpacing:"0.16em",fontWeight:700,color:o},children:e}),f("span",{style:{fontSize:r,lineHeight:1.15,fontWeight:700,maxWidth:"78%",color:i},children:t}),a&&f("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:a})]})}function ep({name:e,price:o}){return C("div",{style:{display:"flex",flexDirection:"column",gap:2,minWidth:0},children:[f("div",{style:{flex:1,minHeight:0,borderRadius:3,position:"relative",overflow:"hidden",...Ie(p.paper,p.paper2,150)},children:f(dt,{size:34,style:{left:"50%",top:"50%",transform:"translate(-50%,-50%)"}})}),f("span",{style:{fontSize:"3.65cqw",fontWeight:600,color:p.text},children:e}),f("span",{style:{fontSize:"3.65cqw",color:p.muted},children:o})]})}function ft({k:e,v:o,ok:t}){return C("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",gap:6,padding:"3.5px 2px",borderBottom:`1px solid ${p.rule}`,fontSize:"3.98cqw",color:p.muted},children:[f("span",{children:e}),C("span",{style:{display:"flex",gap:6,alignItems:"center"},children:[f("b",{style:{color:p.text,fontWeight:700},children:o}),t&&f("span",{style:{color:p.rust,fontWeight:700},children:"\u2713"})]})]})}function de({title:e,children:o}){return C("div",{style:{...G,background:p.card,padding:"9px 10px",display:"flex",flexDirection:"column",gap:6},children:[f(mi,{children:e}),o]})}function gw({size:e=14}){return f("span",{style:{width:e,height:e,borderRadius:"50%",flex:"none",display:"block",background:`linear-gradient(150deg,${p.mark1},${p.mark2})`}})}function op({filled:e=5,size:o=6}){return C("span",{style:{fontSize:o,letterSpacing:"0.06em",color:p.rust,lineHeight:1},children:["\u2605".repeat(e),f("span",{style:{color:p.mark1},children:"\u2605".repeat(5-e)})]})}function Cn({n:e,label:o,tone:t=p.text}){return C("div",{style:{flex:1,display:"flex",flexDirection:"column",gap:1,minWidth:0},children:[f("b",{style:{fontSize:"8.16cqw",lineHeight:1,color:t},children:e}),f("span",{style:{fontSize:"3.65cqw",letterSpacing:"0.08em",textTransform:"uppercase",opacity:.62,color:t},children:o})]})}function Ke({children:e,w:o}){return f("span",{style:{fontSize:"3.98cqw",lineHeight:1.45,color:p.muted,width:o,display:"block"},children:e})}function pi({label:e,w:o="100%",filled:t}){return C("div",{style:{width:o,display:"flex",flexDirection:"column",gap:2},children:[f("span",{style:{fontSize:"3.32cqw",letterSpacing:"0.08em",textTransform:"uppercase",color:p.muted},children:e}),f("span",{style:{height:9,borderRadius:3,border:`1px solid ${p.rule}`,background:t?p.paper:p.card}})]})}function yw({children:e}){return f("span",{style:{alignSelf:"flex-start",fontSize:"3.65cqw",letterSpacing:"0.12em",fontWeight:700,padding:"5px 9px",borderRadius:2,background:p.text,color:p.onInk},children:e})}var v6={wheelslisting:f(de,{title:"All wheels",children:f("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])=>C("div",{style:{display:"flex",alignItems:"center",gap:6},children:[f("span",{style:{width:20,height:15,borderRadius:3,flex:"none",position:"relative",overflow:"hidden",...Ie(p.paper,p.paper2,150)},children:f(dt,{size:12,style:{left:"50%",top:"50%",transform:"translate(-50%,-50%)"}})}),f("b",{style:{flex:1,fontSize:"4.31cqw",color:p.text},children:e}),f("span",{style:{fontSize:"3.65cqw",color:p.muted},children:o}),f("b",{style:{fontSize:"4.31cqw",color:p.text,width:26,textAlign:"right"},children:t})]},e))})}),catalogfilterbar:C("div",{style:{...G,background:p.card,display:"flex",flexDirection:"column",justifyContent:"center",gap:7,padding:"0 11px"},children:[C("div",{style:{display:"flex",gap:4,alignItems:"center"},children:[["20 inch","6\xD7139.7","Black"].map(e=>C("span",{style:{fontSize:"3.65cqw",fontWeight:600,padding:"4px 7px",borderRadius:99,background:p.text,color:p.onInk,display:"flex",gap:4,alignItems:"center"},children:[e,f("span",{style:{opacity:.6},children:"\u2715"})]},e)),f("span",{style:{fontSize:"3.65cqw",color:p.rust,fontWeight:700},children:"Clear"})]}),C("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center"},children:[f("span",{style:{fontSize:"3.65cqw",color:p.muted},children:"128 results"}),f("span",{style:{fontSize:"3.65cqw",color:p.muted,border:`1px solid ${p.rule}`,borderRadius:3,padding:"3px 6px"},children:"Sort: Price \u25BE"})]})]}),fitmentfinder:C("div",{style:{...G,padding:"10px 12px",display:"flex",flexDirection:"column",gap:6,justifyContent:"center",...Ie(p.ink,p.inkSoft)},children:[f("span",{style:{fontSize:"5.31cqw",fontWeight:700,color:p.onInk},children:"Will it fit your rig?"}),C("div",{style:{display:"flex",gap:4},children:[["2021","Toyota","Hilux"].map(e=>C("span",{style:{flex:1,fontSize:"3.65cqw",color:p.text,background:p.card,borderRadius:3,padding:"5px 6px",display:"flex",justifyContent:"space-between"},children:[e," ",f("span",{style:{color:p.muted},children:"\u25BE"})]},e)),f("span",{style:{fontSize:"3.65cqw",fontWeight:700,letterSpacing:"0.08em",background:p.warm,color:p.ink,borderRadius:3,padding:"5px 7px"},children:"GO"})]})]}),compatibletyres:f(de,{title:"Tyres that suit",children:f("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])=>C("div",{style:{display:"flex",flexDirection:"column",gap:2,minWidth:0},children:[f("div",{style:{flex:1,minHeight:0,borderRadius:3,position:"relative",overflow:"hidden",background:p.ink},children:f("span",{style:{position:"absolute",left:"50%",top:"50%",transform:"translate(-50%,-50%)",width:26,height:26,borderRadius:"50%",border:`5px solid ${p.mark2}`,boxSizing:"border-box"}})}),f("span",{style:{fontSize:"3.32cqw",fontWeight:600,color:p.text,overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis"},children:e}),f("span",{style:{fontSize:"3.32cqw",color:p.muted},children:o})]},e))})}),tyresizes:f(de,{title:"Available sizes",children:f("div",{style:{flex:1,display:"flex",flexWrap:"wrap",gap:4,alignContent:"center"},children:["265/65R17","285/70R17","265/60R18","275/55R20"].map((e,o)=>f("span",{style:{fontSize:"3.65cqw",fontWeight:600,padding:"5px 7px",borderRadius:3,border:`1px solid ${o===0?p.rust:p.rule}`,color:o===0?p.rust:p.text,background:o===0?p.paper:p.card},children:e},e))})}),tyrefitment:C(de,{title:"Will it fit your car?",children:[f("div",{style:{display:"flex",gap:3},children:["Make","Model","Year","Trim"].map(e=>C("span",{style:{flex:1,minWidth:0,fontSize:"3.32cqw",color:p.muted,background:p.paper,border:`1px solid ${p.rule}`,borderRadius:3,padding:"4px 5px",display:"flex",justifyContent:"space-between",gap:2,overflow:"hidden",whiteSpace:"nowrap"},children:[e," ",f("span",{style:{color:p.muted},children:"\u25BE"})]},e))}),f("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])=>C("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"baseline",gap:6,borderTop:`1px solid ${p.rule}`,paddingTop:3},children:[f("span",{style:{fontSize:"3.32cqw",fontWeight:600,color:p.text},children:e}),f("span",{style:{fontSize:"3.32cqw",fontWeight:t?700:400,letterSpacing:"0.06em",color:t?p.warm:p.muted},children:o})]},e))})]}),eutyrelabel:C("div",{style:{...G,background:p.card,padding:"9px 11px",display:"flex",gap:8,alignItems:"center"},children:[f("div",{style:{flex:1,display:"flex",flexDirection:"column",gap:1.5},children:[["A","42%"],["B","56%"],["C","70%"],["D","84%"]].map(([e,o],t)=>C("div",{style:{display:"flex",alignItems:"center",gap:3},children:[f("span",{style:{width:o,height:6,borderRadius:"0 2px 2px 0",background:t===1?p.rust:p.mark1}}),f("span",{style:{fontSize:"3.32cqw",fontWeight:700,color:t===1?p.rust:p.muted},children:e})]},e))}),C("div",{style:{flex:"none",display:"flex",flexDirection:"column",gap:3,alignItems:"center"},children:[f("b",{style:{fontSize:"6.63cqw",lineHeight:1,color:p.text},children:"72"}),f("span",{style:{fontSize:"3.32cqw",letterSpacing:"0.08em",color:p.muted},children:"dB"})]})]}),bundleoffer:C("div",{style:{...G,background:p.paper,padding:"9px 11px",display:"flex",flexDirection:"column",gap:5,justifyContent:"center"},children:[f(mi,{children:"Buy it with"}),C("div",{style:{display:"flex",alignItems:"center",gap:5},children:[[0,1].map(e=>f("span",{style:{width:26,height:22,borderRadius:3,flex:"none",position:"relative",overflow:"hidden",background:p.card},children:f(dt,{size:17,style:{left:"50%",top:"50%",transform:"translate(-50%,-50%)"}})},e)),f("span",{style:{fontSize:"5.69cqw",fontWeight:700,color:p.muted},children:"+"}),C("div",{style:{flex:1,display:"flex",flexDirection:"column",gap:1},children:[f("span",{style:{fontSize:"3.65cqw",color:p.muted,textDecoration:"line-through"},children:"$1,024"}),f("b",{style:{fontSize:"6.02cqw",color:p.rust,lineHeight:1},children:"$899"})]})]})]}),checkoutcta:C("div",{style:{...G,display:"flex",alignItems:"center",justifyContent:"space-between",padding:"0 13px",gap:8,...Ie(p.ink,p.ink2)},children:[C("div",{style:{display:"flex",flexDirection:"column",gap:2},children:[f("span",{style:{fontSize:"3.65cqw",letterSpacing:"0.12em",color:p.warm,fontWeight:700},children:"READY TO ORDER"}),f("b",{style:{fontSize:"6.63cqw",color:p.onInk,lineHeight:1},children:"$1,956"}),f("span",{style:{fontSize:"3.65cqw",color:p.onInk,opacity:.65},children:"4 items \xB7 fitted free"})]}),f("span",{style:{fontSize:"3.65cqw",letterSpacing:"0.12em",fontWeight:700,padding:"6px 10px",borderRadius:2,background:p.warm,color:p.ink,flex:"none"},children:"CHECKOUT"})]}),contact:f(de,{title:"Who do you need?",children:f("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])=>C("div",{style:{display:"flex",alignItems:"center",gap:5},children:[f("b",{style:{flex:1,fontSize:"4.31cqw",color:p.text},children:e}),f("span",{style:{fontSize:"3.65cqw",color:p.muted},children:o}),f("span",{style:{fontSize:"4.64cqw",color:p.rust,lineHeight:1},children:"\u203A"})]},e))})}),contactlocations:f(de,{title:"Find us",children:f("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])=>C("div",{style:{border:`1px solid ${p.rule}`,borderRadius:4,padding:"5px 6px",display:"flex",flexDirection:"column",gap:1},children:[f("b",{style:{fontSize:"4.31cqw",color:p.text},children:e}),f("span",{style:{fontSize:"3.32cqw",color:p.muted},children:o}),f("span",{style:{fontSize:"3.32cqw",color:p.rust,fontWeight:700},children:t})]},e))})}),citypictures:f(de,{title:"Our studios",children:C("div",{style:{flex:1,display:"flex",flexDirection:"column",gap:3,minHeight:0},children:[f("span",{style:{fontSize:"3.32cqw",letterSpacing:"0.12em",fontWeight:700,color:p.muted},children:"A \xB7 AMERICAS"}),f("div",{style:{flex:1,display:"grid",gridTemplateColumns:"repeat(3,1fr)",gap:4,minHeight:0},children:["Los Angeles","Miami","Toronto"].map(e=>C("div",{style:{position:"relative",minHeight:0},children:[f(D,{r:3,style:{...G,background:`linear-gradient(transparent 45%,${p.scrim} 45%),${Ie(p.ink,p.inkSoft2).background}`}}),f("b",{style:{position:"absolute",left:5,bottom:4,fontSize:"3.65cqw",color:p.onInk},children:e})]},e))})]})}),citymaps:f(de,{title:"Find us",children:f("div",{style:{flex:1,display:"grid",gridTemplateColumns:"repeat(2,1fr)",gap:5,minHeight:0},children:[["Brisbane","7 Kerry Rd"],["Townsville","12 Enterprise"]].map(([e,o])=>C("div",{style:{position:"relative",padding:"4px 5px",display:"flex",flexDirection:"column",gap:2,minHeight:0},children:[f(D,{r:4,style:{...G,background:"none",border:`1px solid ${p.rule}`}}),f("b",{style:{position:"relative",fontSize:"4.31cqw",color:p.text},children:e}),f("span",{style:{position:"relative",fontSize:"3.32cqw",color:p.muted},children:o}),C("div",{style:{flex:1,minHeight:0,position:"relative"},children:[f(D,{r:3,style:{...G,...Ie(p.paper,p.paper2,150)}}),f(D,{w:"60%",h:"60%",r:8,style:{position:"absolute",left:"12%",top:"20%",background:p.mark1,opacity:.75}}),f(D,{w:6,h:6,r:3,style:{position:"absolute",left:"44%",top:"34%",background:p.rust}})]})]},e))})}),form:f(de,{title:"Send us a message",children:C("div",{style:{flex:1,display:"flex",flexDirection:"column",gap:4,justifyContent:"center"},children:[C("div",{style:{display:"flex",gap:5},children:[f(pi,{label:"Name"}),f(pi,{label:"Email"})]}),f(pi,{label:"Message",filled:!0}),f(yw,{children:"SEND"})]})}),appointmentbooking:f(de,{title:"Book a fitting",children:C("div",{style:{flex:1,display:"flex",flexDirection:"column",gap:4,justifyContent:"center"},children:[f("div",{style:{display:"flex",gap:3},children:["Mon","Tue","Wed","Thu"].map((e,o)=>f("span",{style:{flex:1,textAlign:"center",fontSize:"3.32cqw",fontWeight:o===2?700:500,padding:"4px 0",borderRadius:3,background:o===2?p.text:p.paper,color:o===2?p.onInk:p.muted},children:e},e))}),f("div",{style:{display:"flex",gap:3},children:["8:00","10:30","13:00","15:30"].map((e,o)=>f("span",{style:{flex:1,textAlign:"center",fontSize:"3.32cqw",padding:"4px 0",borderRadius:3,border:`1px solid ${o===1?p.rust:p.rule}`,color:o===1?p.rust:p.muted,background:o===3?p.paper:p.card,textDecoration:o===3?"line-through":"none"},children:e},e))})]})}),reviewform:f(de,{title:"Leave a review",children:C("div",{style:{flex:1,display:"flex",flexDirection:"column",gap:5,justifyContent:"center"},children:[f(op,{filled:4,size:14}),f(pi,{label:"Your review",filled:!0}),f(yw,{children:"POST"})]})}),submitbuild:f(de,{title:"Show us your build",children:C("div",{style:{flex:1,display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",gap:3,border:`1px dashed ${p.mark1}`,borderRadius:5,background:p.paper},children:[f("span",{style:{fontSize:"6.63cqw",lineHeight:1,color:p.rust,fontWeight:300},children:"+"}),f("span",{style:{fontSize:"3.65cqw",color:p.muted},children:"Drop a photo of your rig"})]})}),masthead:C("div",{style:{...G,background:p.paper,display:"flex",flexDirection:"column",justifyContent:"center",padding:"0 13px",gap:5},children:[f("span",{style:{height:1.5,background:p.text}}),f("span",{style:{fontSize:"7.65cqw",fontWeight:800,letterSpacing:"0.02em",color:p.text,lineHeight:1},children:"THE TRACK"}),C("div",{style:{display:"flex",justifyContent:"space-between",fontSize:"3.65cqw",letterSpacing:"0.1em",textTransform:"uppercase",color:p.muted},children:[f("span",{children:"Issue 14"}),f("span",{children:"Spring 2026"})]}),f("span",{style:{height:1,background:p.rule}})]}),featuredcover:C("div",{style:{...G,overflow:"hidden",...Ie(p.ink,p.inkSoft2)},children:[f(dt,{size:92,style:{right:-18,top:-14}}),f("div",{style:{position:"absolute",inset:0,background:`linear-gradient(0deg,${p.scrim},transparent 62%)`}}),C("div",{style:{position:"absolute",left:12,right:12,bottom:11,display:"flex",flexDirection:"column",gap:3},children:[f("span",{style:{fontSize:"3.65cqw",letterSpacing:"0.16em",fontWeight:700,color:p.warm},children:"FEATURE"}),f("span",{style:{fontSize:"6.16cqw",lineHeight:1.15,fontWeight:700,color:p.onInk},children:"Four days on the Madigan Line"})]})]}),longread:C("div",{style:{...G,background:p.card,padding:"10px 14px",display:"flex",flexDirection:"column",gap:4,justifyContent:"center"},children:[f("span",{style:{fontSize:"3.65cqw",letterSpacing:"0.14em",fontWeight:700,color:p.rust},children:"12 MIN READ"}),f("span",{style:{fontSize:"6.02cqw",lineHeight:1.15,fontWeight:700,color:p.text},children:"What breaks first, and why"}),f(Ke,{children:"Every failure starts in the same place \u2014 not the rim, not"}),f(Ke,{w:"62%",children:"the tyre, but the bolt nobody re-torqued."})]}),series:f(de,{title:"Recurring columns",children:f("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])=>C("div",{style:{display:"flex",alignItems:"center",gap:6},children:[f("span",{style:{width:3,height:12,borderRadius:2,background:p.rust,flex:"none"}}),f("b",{style:{flex:1,fontSize:"4.64cqw",color:p.text},children:e}),f("span",{style:{fontSize:"3.65cqw",letterSpacing:"0.08em",textTransform:"uppercase",color:p.muted},children:o})]},e))})}),events:f(de,{title:"Latest posts",children:f("div",{style:{flex:1,display:"flex",flexDirection:"column",gap:5,justifyContent:"center"},children:[[p.inkSoft,p.inkSoft2,"Madigan Line, four days"],[p.rust,p.warm,"Why offset beats width"]].map(([e,o,t])=>C("div",{style:{display:"flex",gap:6,alignItems:"center"},children:[f("span",{style:{width:24,height:18,borderRadius:3,flex:"none",...Ie(e,o,150)}}),C("div",{style:{display:"flex",flexDirection:"column",gap:1,minWidth:0},children:[f("b",{style:{fontSize:"4.31cqw",color:p.text},children:t}),f("span",{style:{fontSize:"3.65cqw",color:p.muted},children:"4 Sep \xB7 Shed Notes"})]})]},t))})}),docmasthead:C("div",{style:{...G,background:p.card,padding:"12px 14px",display:"flex",flexDirection:"column",gap:5,justifyContent:"center"},children:[f("span",{style:{fontSize:"3.65cqw",letterSpacing:"0.16em",fontWeight:700,color:p.muted},children:"POLICY"}),f("span",{style:{fontSize:"6.49cqw",fontWeight:700,color:p.text,lineHeight:1.1},children:"Returns & refunds"}),f("span",{style:{fontSize:"3.65cqw",color:p.muted},children:"Version 3 \xB7 Updated 4 Sep 2026"}),f("span",{style:{height:2,width:26,background:p.rust,borderRadius:1}})]}),docbody:f("div",{style:{...G,background:p.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])=>C("div",{style:{display:"flex",gap:5},children:[f("b",{style:{fontSize:"3.98cqw",color:p.rust,flex:"none"},children:e}),f(Ke,{children:o})]},e))}),docmetacards:f(de,{title:"At a glance",children:f("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])=>C("div",{style:{border:`1px solid ${p.rule}`,borderRadius:4,padding:"5px 6px",display:"flex",flexDirection:"column",gap:1},children:[f("b",{style:{fontSize:"5.31cqw",color:p.text,lineHeight:1},children:e}),f("span",{style:{fontSize:"3.32cqw",letterSpacing:"0.08em",textTransform:"uppercase",color:p.muted},children:o})]},o))})}),doctabs:C("div",{style:{...G,background:p.card,display:"flex",flexDirection:"column",justifyContent:"center",gap:0,padding:"0 11px"},children:[f("div",{style:{display:"flex",gap:0},children:["Returns","Warranty","Shipping"].map((e,o)=>f("span",{style:{fontSize:"3.98cqw",fontWeight:o===0?700:500,padding:"5px 8px",color:o===0?p.text:p.muted,background:o===0?p.paper:"transparent",borderRadius:"4px 4px 0 0",border:`1px solid ${o===0?p.rule:"transparent"}`,borderBottom:"none"},children:e},e))}),f("span",{style:{height:1,background:p.rule}}),C("div",{style:{paddingTop:6,display:"flex",flexDirection:"column",gap:2},children:[f(Ke,{children:"Unfitted wheels come back within 30 days, no questions."}),f(Ke,{w:"58%",children:"Freight on a change of mind is yours."})]})]}),paragraphs:C("div",{style:{...G,background:p.card,padding:"11px 14px",display:"flex",gap:10,alignItems:"center"},children:[f("span",{style:{flex:1,fontSize:"5.86cqw",lineHeight:1.2,fontWeight:700,color:p.text},children:"The right wheel is the boring one."}),C("div",{style:{flex:1,display:"flex",flexDirection:"column"},children:[f(Ke,{children:"Forged, correctly offset, rated for what you actually"}),f(Ke,{children:"carry. Everything else is a photograph."})]})]}),keyfeatures:f(de,{title:"Key features",children:f("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=>C("div",{style:{display:"flex",gap:6,alignItems:"center"},children:[f("span",{style:{fontSize:"4.64cqw",color:p.rust,fontWeight:700,lineHeight:1},children:"\u2713"}),f("span",{style:{fontSize:"4.31cqw",color:p.text},children:e})]},e))})}),statsparagraph:C("div",{style:{...G,background:p.paper,padding:"10px 12px",display:"flex",gap:10,alignItems:"center"},children:[C("div",{style:{flex:"none",display:"flex",flexDirection:"column",gap:5},children:[f(Cn,{n:"27k",label:"Rigs"}),f(Cn,{n:"4.9",label:"Rating"})]}),C("div",{style:{flex:1,display:"flex",flexDirection:"column"},children:[f(Ke,{children:"Twelve years of fitting the same three questions, and the"}),f(Ke,{children:"answer has not moved: load rating, offset, then looks."})]})]}),chart:C(de,{title:"Load vs weight",children:[f("div",{style:{flex:1,display:"flex",alignItems:"flex-end",gap:5,paddingBottom:2},children:[38,62,84,71,96].map((e,o)=>f("span",{style:{flex:1,height:`${e}%`,borderRadius:"2px 2px 0 0",background:o===4?p.rust:p.mark1}},o))}),f("span",{style:{height:1,background:p.rule,marginTop:-4}})]}),mockup:f("div",{style:{...G,overflow:"hidden",display:"flex",alignItems:"center",justifyContent:"center",...Ie(p.inkSoft,p.ink)},children:C("div",{style:{width:"72%",height:"74%",borderRadius:4,overflow:"hidden",background:p.card,boxShadow:`0 6px 14px ${p.scrim}`},children:[f("div",{style:{height:9,background:p.paper,display:"flex",alignItems:"center",gap:2,padding:"0 4px"},children:[0,1,2].map(e=>f("span",{style:{width:2.5,height:2.5,borderRadius:"50%",background:p.mark1}},e))}),C("div",{style:{padding:5,display:"flex",flexDirection:"column",gap:3},children:[f("span",{style:{height:4,width:"56%",borderRadius:1,background:p.mark2}}),f("span",{style:{height:14,borderRadius:2,...Ie(p.paper,p.paper2,150)}}),f("span",{style:{height:3,width:"38%",borderRadius:1,background:p.rust}})]})]})}),manifesto:f("div",{style:{...G,overflow:"hidden",display:"flex",alignItems:"center",padding:"0 16px",...Ie(p.ink,p.ink2)},children:C("span",{style:{fontSize:"6.63cqw",lineHeight:1.2,fontWeight:700,color:p.onInk},children:["We build for the ",f("span",{style:{color:p.warm},children:"last"})," ten percent of the track."]})}),timeline:f(de,{title:"Our story",children:f("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)=>C("div",{style:{display:"flex",gap:7,alignItems:"flex-start",position:"relative"},children:[t<2&&f("span",{style:{position:"absolute",left:3,top:8,bottom:-8,width:1,background:p.rule}}),f("span",{style:{width:7,height:7,borderRadius:"50%",flex:"none",marginTop:1,background:p.rust,zIndex:1}}),C("div",{style:{display:"flex",flexDirection:"column",gap:0,minWidth:0},children:[f("b",{style:{fontSize:"4.64cqw",color:p.text},children:e}),f(Ke,{children:o})]})]},e))})}),timelinetrack:C("div",{style:{...G,padding:"0 12px",display:"flex",flexDirection:"column",gap:10,justifyContent:"center",...Ie(p.ink,p.inkSoft)},children:[f("span",{style:{fontSize:"3.98cqw",fontWeight:700,letterSpacing:"0.14em",textTransform:"uppercase",color:p.warm},children:"Milestones"}),C("div",{style:{position:"relative",display:"flex",justifyContent:"space-between",paddingTop:7},children:[f("span",{style:{position:"absolute",left:0,right:0,top:3,height:1,background:p.mark2,opacity:.55}}),["1998","2009","2016","2024"].map((e,o)=>C("div",{style:{display:"flex",flexDirection:"column",alignItems:"center",gap:3,position:"relative"},children:[f("span",{style:{position:"absolute",top:-7,width:6,height:6,borderRadius:"50%",background:o===3?p.warm:p.mark1}}),f("span",{style:{fontSize:"4.31cqw",fontWeight:700,color:o===3?p.warm:p.onInk,opacity:o===3?1:.75},children:e})]},e))]})]}),footprint:C("div",{style:{...G,overflow:"hidden",...Ie(p.paper,p.paper2,150)},children:[f("span",{style:{position:"absolute",left:"8%",top:"18%",width:"62%",height:"64%",borderRadius:"48% 52% 40% 60% / 55% 45% 55% 45%",background:p.mark1,opacity:.75}}),f("span",{style:{position:"absolute",left:"52%",top:"52%",width:"34%",height:"34%",borderRadius:"58% 42% 55% 45% / 45% 58% 42% 55%",background:p.mark2,opacity:.55}}),[["26%","38%"],["44%","58%"],["62%","34%"]].map(([e,o])=>f("span",{style:{position:"absolute",left:e,top:o,width:7,height:7,borderRadius:"50% 50% 50% 0",transform:"rotate(-45deg)",background:p.rust}},e)),f("span",{style:{position:"absolute",left:11,bottom:9,fontSize:"4.64cqw",fontWeight:700,color:p.text},children:"3 fitting bays"})]}),banner:C("div",{style:{...G,display:"flex",alignItems:"center",justifyContent:"space-between",padding:"0 13px",gap:8,background:p.rust},children:[C("div",{style:{display:"flex",flexDirection:"column",gap:2},children:[f("b",{style:{fontSize:"6.02cqw",color:p.onInk},children:"End of season \xB7 20% off"}),f("span",{style:{fontSize:"3.98cqw",color:p.onInk,opacity:.8},children:"Fitted free, this month only."})]}),f("span",{style:{fontSize:"3.65cqw",letterSpacing:"0.12em",fontWeight:700,padding:"5px 9px",borderRadius:2,background:p.onInk,color:p.text,flex:"none"},children:"SHOP"})]}),titlewithbuttons:C("div",{style:{...G,background:p.paper,display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",gap:7,padding:"0 14px",textAlign:"center"},children:[f("span",{style:{fontSize:"6.49cqw",lineHeight:1.15,fontWeight:700,color:p.text},children:"Not sure what fits?"}),C("div",{style:{display:"flex",gap:5},children:[f("span",{style:{fontSize:"3.65cqw",letterSpacing:"0.12em",fontWeight:700,padding:"5px 9px",borderRadius:2,background:p.text,color:p.onInk},children:"FIND MY FIT"}),f("span",{style:{fontSize:"3.65cqw",letterSpacing:"0.12em",fontWeight:700,padding:"5px 9px",borderRadius:2,border:`1px solid ${p.text}`,color:p.text},children:"CALL US"})]})]}),ticker:f("div",{style:{...G,overflow:"hidden",background:p.ink,display:"flex",alignItems:"center"},children:f("span",{style:{whiteSpace:"nowrap",fontSize:"6.29cqw",fontWeight:800,letterSpacing:"0.06em",color:p.warm,marginLeft:-14},children:"FREE FITTING \xB7 48HR DISPATCH \xB7 FREE FITTING \xB7 48HR DISPATCH"})}),countdown:C("div",{style:{...G,padding:"10px 12px",display:"flex",flexDirection:"column",alignItems:"center",gap:6,justifyContent:"center",...Ie(p.ink,p.ink2)},children:[f("span",{style:{fontSize:"3.65cqw",fontWeight:700,letterSpacing:"0.16em",textTransform:"uppercase",color:p.muted},children:"Back online in"}),f("div",{style:{display:"flex",alignItems:"flex-start",gap:5},children:[["23","Hours"],["59","Minutes"],["48","Seconds"]].map(([e,o],t)=>C("div",{style:{display:"flex",alignItems:"flex-start",gap:5},children:[t>0&&f("b",{style:{fontSize:"9.5cqw",lineHeight:1,color:p.warm},children:":"}),C("div",{style:{display:"flex",flexDirection:"column",alignItems:"center",gap:2},children:[f("b",{style:{fontSize:"11.5cqw",lineHeight:1,color:p.onInk,fontVariantNumeric:"tabular-nums"},children:e}),f("span",{style:{fontSize:"3.2cqw",letterSpacing:"0.1em",textTransform:"uppercase",opacity:.62,color:p.onInk},children:o})]})]},o))})]}),breadcrumb:f("div",{style:{...G,background:p.card,display:"flex",alignItems:"center",padding:"0 13px"},children:C("span",{style:{fontSize:"4.64cqw",color:p.muted},children:["Home ",f("span",{style:{opacity:.5},children:"/"})," Wheels ",f("span",{style:{opacity:.5},children:"/"})," ",f("span",{style:{color:p.text,fontWeight:700},children:"20 inch"})]})}),categorybar:C("div",{style:{...G,background:p.card,display:"flex",flexDirection:"column",justifyContent:"center",gap:7,padding:"0 11px"},children:[f("div",{style:{display:"flex",gap:5},children:["All","Wheels","Tyres","Lift"].map((e,o)=>f("span",{style:{fontSize:"3.98cqw",fontWeight:o===0?700:500,padding:"4px 7px",borderRadius:99,background:o===0?p.text:p.paper,color:o===0?p.onInk:p.muted},children:e},e))}),f("span",{style:{height:1,background:p.rule}})]}),intro:C("div",{style:{...G,overflow:"hidden",background:p.card},children:[f("div",{style:{position:"absolute",inset:0,...Ie(p.ink,p.inkSoft2)}}),f(dt,{size:64,style:{right:8,top:6}}),C("div",{style:{position:"absolute",left:16,right:16,bottom:8,top:"46%",background:p.paper,borderRadius:6,padding:"8px 11px",display:"flex",flexDirection:"column",gap:2,boxShadow:`0 -4px 10px ${p.scrim}`},children:[f("span",{style:{fontSize:"5.69cqw",fontWeight:700,color:p.text},children:"Since 1998"}),f(Ke,{children:"One shed, one lathe, one idea."}),f(Ke,{w:"66%",children:"It turned out to be right."})]})]}),gallerygrid:f(de,{title:"From our customers",children:f("div",{style:{flex:1,display:"grid",gridTemplateColumns:"repeat(3,1fr)",gridTemplateRows:"repeat(2,1fr)",gap:4,minHeight:0},children:[[p.rust,p.warm],[p.inkSoft,p.ink],[p.paper2,p.mark2],[p.ink,p.inkSoft2],[p.warm,p.paper2],[p.mark2,p.inkSoft]].map(([e,o],t)=>f("div",{style:{borderRadius:3,...Ie(e,o,140+t*22)}},t))})}),gallery:C(de,{title:"Gallery",children:[f("div",{style:{display:"flex",gap:8,alignItems:"center",marginTop:-2},children:["On the truck","Studio","Close-ups"].map((e,o)=>f("span",{style:{fontSize:"3.98cqw",fontWeight:o===0?700:500,color:o===0?p.text:p.muted,borderBottom:`1.5px solid ${o===0?p.rust:"transparent"}`,paddingBottom:2},children:e},e))}),f("div",{style:{flex:1,display:"grid",gridTemplateColumns:"repeat(3,1fr)",gap:4,minHeight:0},children:[[p.rust,p.warm],[p.ink,p.inkSoft],[p.paper2,p.mark2]].map(([e,o],t)=>f("div",{style:{borderRadius:3,...Ie(e,o,150+t*20)}},t))})]}),ordersummary:C(de,{title:"Order summary",children:[C("div",{style:{display:"flex",gap:6,alignItems:"center",paddingBottom:4},children:[f("span",{style:{width:26,height:26,borderRadius:4,position:"relative",overflow:"hidden",flex:"none",...Ie(p.paper,p.paper2,150)},children:f(dt,{size:18,style:{left:"50%",top:"50%",transform:"translate(-50%,-50%)"}})}),C("div",{style:{display:"flex",flexDirection:"column",gap:1,minWidth:0},children:[f("b",{style:{fontSize:"4.31cqw",color:p.text},children:"Ridge Grappler"}),f("span",{style:{fontSize:"3.65cqw",color:p.muted},children:"20\xD79 +12 \xB7 qty 4"})]})]}),C("div",{style:{flex:1,minHeight:0,display:"flex",flexDirection:"column",justifyContent:"center"},children:[f(ft,{k:"Subtotal",v:"$1,956"}),f(ft,{k:"Fitting",v:"Free"}),C("div",{style:{display:"flex",justifyContent:"space-between",paddingTop:5,fontSize:"4.64cqw"},children:[f("b",{style:{color:p.text},children:"Total"}),f("b",{style:{color:p.text,fontSize:"6.02cqw"},children:"$1,956"})]})]})]}),deliveryoptions:f(de,{title:"Delivery",children:f("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,r])=>C("div",{style:{display:"flex",alignItems:"center",gap:6,padding:"5px 6px",borderRadius:4,border:`1px solid ${r?p.rust:p.rule}`,background:r?p.paper:p.card},children:[f("span",{style:{width:7,height:7,borderRadius:"50%",flex:"none",border:`1.5px solid ${r?p.rust:p.mark1}`,background:r?p.rust:"transparent"}}),f("span",{style:{flex:1,fontSize:"4.31cqw",fontWeight:600,color:p.text},children:e}),f("span",{style:{fontSize:"3.98cqw",color:p.muted},children:o}),f("b",{style:{fontSize:"4.31cqw",color:p.text},children:t})]},e))})}),paymentbadges:C("div",{style:{...G,background:p.paper,display:"flex",flexDirection:"column",gap:8,justifyContent:"center",padding:"0 12px"},children:[f(mi,{children:"Ways to pay"}),f("div",{style:{display:"flex",gap:5},children:[["VISA",p.ink],["MC",p.rust],["AMEX",p.inkSoft],["PayPal",p.ink2]].map(([e,o])=>f("span",{style:{flex:1,textAlign:"center",fontSize:"3.65cqw",fontWeight:800,letterSpacing:"0.06em",color:p.onInk,borderRadius:3,padding:"6px 0",background:o},children:e},e))})]}),stats:C("div",{style:{...G,padding:"10px 12px",display:"flex",flexDirection:"column",gap:9,justifyContent:"center",...Ie(p.ink,p.ink2)},children:[f("span",{style:{fontSize:"3.98cqw",fontWeight:700,letterSpacing:"0.14em",textTransform:"uppercase",color:p.warm},children:"By the numbers"}),C("div",{style:{display:"flex",gap:8},children:[f(Cn,{n:"27k",label:"Rigs fitted",tone:p.onInk}),f(Cn,{n:"12",label:"Years",tone:p.onInk}),f(Cn,{n:"4.9",label:"Avg rating",tone:p.warm})]})]}),testimonials:C("div",{style:{...G,overflow:"hidden",background:p.paper,padding:"10px 11px",display:"flex",flexDirection:"column",gap:6,justifyContent:"center"},children:[f("span",{style:{position:"absolute",right:10,top:2,fontSize:"22.4cqw",lineHeight:1,fontWeight:800,color:p.rust,opacity:.16},children:"\u201D"}),f(op,{filled:5,size:7}),f("span",{style:{position:"relative",fontSize:"5.31cqw",lineHeight:1.35,color:p.text,fontWeight:600},children:"\u201CTook them out to the Simpson and back. Not one chip.\u201D"}),C("div",{style:{display:"flex",alignItems:"center",gap:5},children:[f(gw,{}),f("span",{style:{fontSize:"3.98cqw",color:p.muted},children:"Dave M. \xB7 Hilux N80"})]})]}),reviews:C(de,{title:"Reviews",children:[f("div",{style:{display:"flex",gap:4,height:22},children:[[p.inkSoft,p.inkSoft2],[p.rust,p.warm],[p.ink,p.inkSoft],[p.mark2,p.mark1]].map(([e,o],t)=>f("div",{style:{flex:1,borderRadius:3,...Ie(e,o,140+t*15)}},t))}),f("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])=>C("div",{style:{display:"flex",gap:5,alignItems:"flex-start"},children:[f(gw,{size:12}),C("div",{style:{display:"flex",flexDirection:"column",gap:1,minWidth:0},children:[C("div",{style:{display:"flex",gap:4,alignItems:"center"},children:[f("b",{style:{fontSize:"3.98cqw",color:p.text},children:e}),f(op,{filled:o})]}),f(Ke,{children:t})]})]},e))})]}),logos:C("div",{style:{...G,display:"flex",flexDirection:"column",gap:9,justifyContent:"center",padding:"0 12px",...Ie(p.ink,p.inkSoft)},children:[f("span",{style:{fontSize:"3.98cqw",fontWeight:700,letterSpacing:"0.14em",textTransform:"uppercase",color:p.warm},children:"As fitted by"}),f("div",{style:{display:"grid",gridTemplateColumns:"repeat(4,1fr)",gap:8},children:["ARB","TJM","IRONMAN","OPPOSITE"].map(e=>f("span",{style:{textAlign:"center",fontSize:"4.31cqw",fontWeight:800,letterSpacing:"0.08em",color:p.onInk,opacity:.82},children:e},e))})]}),prose:C("div",{style:{...G,background:p.paper,padding:"11px 14px",display:"flex",flexDirection:"column",gap:4,justifyContent:"center"},children:[f("span",{style:{fontSize:"5.86cqw",fontWeight:700,color:p.text},children:"Why offset matters"}),C("div",{style:{display:"flex",gap:6},children:[f("span",{style:{fontSize:"15.3cqw",lineHeight:.78,fontWeight:800,color:p.rust,marginTop:1},children:"T"}),C("div",{style:{display:"flex",flexDirection:"column"},children:[f(Ke,{children:"he number on the back of your wheel decides whether the"}),f(Ke,{w:"76%",children:"tyre sits under the guard or an inch outside it."})]})]})]}),cards:f(de,{title:"What you get",children:f("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])=>C("div",{style:{border:`1px solid ${p.rule}`,borderRadius:4,padding:6,display:"flex",flexDirection:"column",gap:2},children:[f("span",{style:{width:11,height:11,borderRadius:3,background:p.rust,opacity:.9}}),f("b",{style:{fontSize:"3.98cqw",color:p.text},children:e}),f(Ke,{children:o})]},e))})}),faq:f(de,{title:"Questions",children:f("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])=>C("div",{style:{borderBottom:`1px solid ${p.rule}`,padding:"4px 2px"},children:[C("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",gap:6},children:[f("b",{style:{fontSize:"4.31cqw",color:p.text},children:e}),f("span",{style:{fontSize:"4.64cqw",color:p.muted,lineHeight:1},children:o?"\u2212":"+"})]}),o&&f(Ke,{w:"90%",children:"Use the fitment finder \u2014 it reads your build, not just the model."})]},e))})}),hero:C("div",{style:{...G,overflow:"hidden",...Ie(p.ink,p.ink2)},children:[f("div",{style:{...G,background:`linear-gradient(90deg,${p.scrim},transparent 70%)`}}),f("div",{style:{position:"relative",height:"100%",display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"flex-start",padding:"12px 14px",gap:5},children:f(Iw,{over:"NEW \xB7 SUMMER",overTone:p.warm,head:"Built for the worst road you own",cta:"SHOP ALL",ctaBg:p.warm,ctaFg:p.ink,tone:p.onInk})}),f(dt,{size:104,style:{right:-24,bottom:-30}})]}),herosingle:C("div",{style:{...G,display:"flex",background:p.paper,overflow:"hidden"},children:[f("div",{style:{flex:1,padding:12,display:"flex",flexDirection:"column",gap:5,justifyContent:"center"},children:f(Iw,{over:"ALL-TERRAIN",overTone:p.rust,head:"Grip that does not ask",headSize:12,cta:"EXPLORE",ctaBg:p.text,ctaFg:p.onInk,tone:p.text})}),f("div",{style:{flex:1,position:"relative",...Ie(p.inkSoft,p.inkSoft2)},children:f(dt,{size:74,style:{right:-14,top:16}})})]}),productgrid:f(de,{title:"Best sellers",children:C("div",{style:{flex:1,display:"grid",gridTemplateColumns:"repeat(3,1fr)",gap:5,minHeight:0},children:[f(ep,{name:"Ridge 19",price:"$365"}),f(ep,{name:"Ridge 29",price:"$410"}),f(ep,{name:"Ridge 39",price:"$455"})]})}),collections:f(de,{title:"Shop by category",children:f("div",{style:{flex:1,display:"grid",gridTemplateColumns:"repeat(3,1fr)",gap:5,minHeight:0},children:[["Wheels",p.inkSoft,p.inkSoft2],["Tyres",p.rust,p.warm],["Lift kits",p.ink,p.inkSoft]].map(([e,o,t])=>f("div",{style:{borderRadius:4,display:"flex",alignItems:"flex-end",padding:5,color:p.onInk,...Ie(o,t)},children:f("span",{style:{fontSize:"3.98cqw",fontWeight:700,letterSpacing:"0.04em"},children:e})},e))})}),producthero:C("div",{style:{...G,display:"flex",background:p.card,overflow:"hidden"},children:[f("div",{style:{flex:1.1,position:"relative",...Ie(p.paper,p.paper2,150)},children:f(dt,{size:78,style:{left:"50%",top:"50%",transform:"translate(-50%,-50%)"}})}),C("div",{style:{flex:1,padding:"10px 10px 10px 8px",display:"flex",flexDirection:"column",gap:4,justifyContent:"center"},children:[f("span",{style:{fontSize:"3.65cqw",letterSpacing:"0.16em",fontWeight:700,color:p.rust},children:"NITTO"}),f("b",{style:{fontSize:"6.29cqw",color:p.text},children:"Ridge Grappler"}),f("span",{style:{fontSize:"6.63cqw",fontWeight:700,color:p.text},children:"$489"}),f("span",{style:{alignSelf:"flex-start",fontSize:"3.65cqw",letterSpacing:"0.12em",fontWeight:700,padding:"4px 8px",borderRadius:2,background:p.text,color:p.onInk},children:"ADD TO CART"})]})]}),spectable:f(de,{title:"Specifications",children:C("div",{style:{flex:1,display:"flex",flexDirection:"column",justifyContent:"center"},children:[f(ft,{k:"Diameter",v:'20"'}),f(ft,{k:"Width",v:"9.0J"}),f(ft,{k:"Offset",v:"+12"}),f(ft,{k:"Load",v:"1250 kg"})]})}),fitmenttable:f(de,{title:"Will it fit?",children:C("div",{style:{flex:1,display:"flex",flexDirection:"column",justifyContent:"center"},children:[f(ft,{k:"Hilux N80",v:"20\xD79 +12",ok:!0}),f(ft,{k:"Ranger PX3",v:"20\xD79 +12",ok:!0}),f(ft,{k:"LC79",v:"17\xD78 \u221210",ok:!0})]})}),processsteps:C("div",{style:{...G,background:p.paper,padding:10,display:"flex",flexDirection:"column",gap:7,justifyContent:"center"},children:[f(mi,{children:"How it works"}),f("div",{style:{display:"flex",gap:6},children:["Pick your rig","Match the fit","We fit it"].map((e,o)=>C("div",{style:{flex:1,display:"flex",flexDirection:"column",gap:2},children:[f("span",{style:{width:11,height:11,borderRadius:"50%",background:p.text,color:p.onInk,fontSize:"3.98cqw",display:"flex",alignItems:"center",justifyContent:"center",fontWeight:700},children:o+1}),f("span",{style:{fontSize:"3.98cqw",color:p.text,fontWeight:600},children:e})]},e))})]}),detailrows:f("div",{style:{...G,background:p.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 r=f("div",{style:{flex:1,...Ie(t?p.rust:p.inkSoft,t?p.warm:p.inkSoft2)}},"art"),a=C("div",{style:{flex:1.1,padding:8,display:"flex",flexDirection:"column",gap:2,justifyContent:"center"},children:[f("b",{style:{fontSize:"4.64cqw",color:p.text},children:e}),f("span",{style:{fontSize:"3.98cqw",color:p.muted,lineHeight:1.3},children:o})]},"tx");return f("div",{style:{flex:1,display:"flex",minHeight:0},children:t?[a,r]:[r,a]},e)})}),specstrip:f("div",{style:{...G,background:p.ink,color:p.onInk,display:"flex",alignItems:"center",justifyContent:"space-around",padding:"0 8px"},children:[["5 yr","Warranty"],["Free","Fitting"],["48 hr","Dispatch"]].map(([e,o])=>C("div",{style:{display:"flex",flexDirection:"column",alignItems:"center",gap:1},children:[f("b",{style:{fontSize:"5.69cqw",letterSpacing:"0.02em"},children:e}),f("span",{style:{fontSize:"3.65cqw",color:p.mark2,letterSpacing:"0.1em",textTransform:"uppercase"},children:o})]},o))})},bw={subscribe:C("div",{style:{...G,padding:13,display:"flex",flexDirection:"column"},children:[C("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",marginBottom:8},children:[C("div",{style:{display:"flex",alignItems:"center",gap:6},children:[f(D,{w:8,h:8,r:2,tone:"accent"}),f(D,{w:38,h:7,r:3,tone:"dark"}),f(D,{w:16,h:7,r:3,tone:"accent"})]}),f(D,{w:38,h:4,r:2,tone:"soft"})]}),f("div",{style:{height:1,background:Me.line,marginBottom:10}}),C("div",{style:{flex:1,display:"flex",gap:10,border:`1px solid ${Me.line}`,borderRadius:7,padding:10},children:[C("div",{style:{flex:1.1,display:"flex",flexDirection:"column",justifyContent:"center",gap:5},children:[f(D,{w:"46%",h:3,r:2,tone:"accent"}),f(D,{w:"84%",h:8,r:4,tone:"dark"}),f(D,{w:"56%",h:8,r:4,tone:"accent"}),f(D,{w:"96%",h:3,r:2,tone:"soft",style:{marginTop:2}}),C("div",{style:{display:"flex",gap:5,marginTop:4},children:[f("div",{style:{flex:1,height:13,borderRadius:5,border:`1px solid ${Me.line}`,background:Me.block}}),f(D,{w:34,h:13,r:5,tone:"accent"})]})]}),C("div",{style:{flex:1,background:Me.block,borderRadius:6,padding:8,display:"flex",flexDirection:"column",gap:6},children:[f(D,{w:"52%",h:4,r:2,tone:"accent"}),Array.from({length:3}).map((e,o)=>C("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",gap:6,borderTop:o?`1px solid ${Me.line}`:"none",paddingTop:o?4:0},children:[f(D,{w:34,h:4,r:2,tone:"dark"}),f(D,{w:16,h:3,r:2,tone:"soft"})]},o))]})]})]}),split:C("div",{style:{...G,display:"flex"},children:[f("div",{style:{width:"44%",background:Ju}}),C("div",{style:{flex:1,padding:15,display:"flex",flexDirection:"column",justifyContent:"center",gap:7},children:[f(D,{w:"44%",h:5,r:3,tone:"accent"}),f(D,{w:"88%",h:8,r:4,tone:"dark"}),f(D,{w:"70%",h:8,r:4,tone:"dark"}),f(D,{w:"94%",h:5,r:2,tone:"soft",style:{marginTop:2}}),f(D,{w:"80%",h:5,r:2,tone:"soft"}),f(D,{w:"40%",h:13,r:6,tone:"accent",style:{marginTop:5}})]})]}),sectionheader:C(Sw,{children:[f(D,{w:"18%",h:6,r:3,tone:"accent",style:{position:"absolute",top:15,right:16}}),C("div",{style:{...G,padding:16,display:"flex",flexDirection:"column",justifyContent:"center",gap:10},children:[C("div",{style:{display:"flex",alignItems:"center",gap:9},children:[f(D,{w:16,h:16,r:4,tone:"accent"}),f(D,{w:"20%",h:9,r:4,tone:"dark"})]}),f(D,{w:"62%",h:10,r:5,tone:"dark"}),f(D,{w:"42%",h:6,r:3,tone:"soft"})]})]}),header:f("div",{style:{...G,padding:14,display:"flex",flexDirection:"column",justifyContent:"center"},children:C("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between"},children:[f(D,{w:"22%",h:12,r:4,tone:"dark"}),C("div",{style:{display:"flex",gap:9,alignItems:"center"},children:[f(D,{w:26,h:6,r:3,tone:"soft"}),f(D,{w:26,h:6,r:3,tone:"soft"}),f(D,{w:26,h:6,r:3,tone:"soft"}),f(D,{w:18,h:14,r:5,tone:"accent"})]})]})}),footer:C("div",{style:{...G,padding:15,display:"flex",flexDirection:"column",justifyContent:"center",gap:12},children:[C("div",{style:{display:"flex",gap:14},children:[C("div",{style:{flex:1.4,display:"flex",flexDirection:"column",gap:6},children:[f(D,{w:"60%",h:9,r:4,tone:"dark"}),f(D,{w:"90%",h:5,r:2,tone:"soft"}),f(D,{w:"70%",h:5,r:2,tone:"soft"})]}),[0,1].map(e=>C("div",{style:{flex:1,display:"flex",flexDirection:"column",gap:6},children:[f(D,{w:"50%",h:6,r:3,tone:"dark"}),f(D,{w:"80%",h:5,r:2,tone:"soft"}),f(D,{w:"66%",h:5,r:2,tone:"soft"})]},e))]}),f("div",{style:{height:1,background:Me.line}}),C("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center"},children:[f(D,{w:"30%",h:5,r:2,tone:"soft"}),f(D,{w:"16%",h:5,r:2,tone:"soft"})]})]}),grid:f("div",{style:{...G,padding:14,display:"grid",gridTemplateColumns:"1fr 1fr",gridTemplateRows:"1fr 1fr",gap:9},children:Array.from({length:4}).map((e,o)=>f("div",{style:{borderRadius:6,background:Me.block}},o))}),blanksection:f("div",{style:{...G,padding:14,display:"flex"},children:C("div",{style:{flex:1,border:`1px dashed ${Me.line}`,borderRadius:7,display:"flex",alignItems:"center",justifyContent:"center",position:"relative"},children:[f(D,{w:14,h:2,r:1,tone:"tint"}),f(D,{w:2,h:14,r:1,tone:"tint",style:{position:"absolute"}})]})}),spacer:C("div",{style:{...G,padding:14,display:"flex",flexDirection:"column",justifyContent:"space-between"},children:[f(D,{w:"100%",h:6,r:3,tone:"soft"}),f(D,{w:16,h:22,r:3,tone:"block",style:{alignSelf:"center"}}),f(D,{w:"100%",h:6,r:3,tone:"soft"})]}),divider:f("div",{style:{...G,padding:14,display:"flex",alignItems:"center"},children:f(D,{w:"100%",h:3,r:2,tone:"dark"})}),customhtml:C("div",{style:{...G,display:"flex",alignItems:"center",justifyContent:"center",gap:8,background:Ju},children:[f(D,{w:5,h:16,r:2,tone:"dark",style:{transform:"skewX(-14deg)"}}),f(D,{w:16,h:10,r:3,tone:"accent"}),f(D,{w:5,h:16,r:2,tone:"dark",style:{transform:"skewX(14deg)"}})]}),heading:f("div",{style:{...G,padding:14,display:"flex",alignItems:"center"},children:f(D,{w:"64%",h:13,r:4,tone:"dark"})}),text:C("div",{style:{...G,padding:16,display:"flex",flexDirection:"column",justifyContent:"center",gap:7},children:[f(D,{w:"100%",h:6,r:3,tone:"soft"}),f(D,{w:"96%",h:6,r:3,tone:"soft"}),f(D,{w:"100%",h:6,r:3,tone:"soft"}),f(D,{w:"58%",h:6,r:3,tone:"soft"})]}),image:f("div",{style:{position:"absolute",inset:14,borderRadius:7,background:Ju}}),button:f("div",{style:{...G,display:"flex",alignItems:"center",justifyContent:"center"},children:f(D,{w:"34%",h:16,r:8,tone:"accent"})}),menu:C("div",{style:{...G,padding:"14px 22%",display:"flex",flexDirection:"column",justifyContent:"center",gap:7},children:[f(D,{w:"48%",h:7,r:3,tone:"dark"}),f(D,{w:"82%",h:5,r:2,tone:"soft"}),f(D,{w:"66%",h:5,r:2,tone:"soft"}),f(D,{w:"74%",h:5,r:2,tone:"soft"}),f(D,{w:"58%",h:5,r:2,tone:"soft"})]}),emailform:C("div",{style:{...G,padding:16,display:"flex",flexDirection:"column",justifyContent:"center",gap:9},children:[f(D,{w:"56%",h:8,r:3,tone:"dark"}),C("div",{style:{display:"flex",gap:6},children:[f("div",{style:{flex:1,height:16,borderRadius:5,border:`1px solid ${Me.line}`}}),f(D,{w:"30%",h:16,r:5,tone:"accent"})]})]}),sociallogos:f("div",{style:{...G,display:"flex",alignItems:"center",justifyContent:"center",gap:9},children:[0,1,2,3].map(e=>f(D,{w:16,h:16,r:8,tone:"dark"},e))}),paymentlogos:C("div",{style:{...G,display:"flex",alignItems:"center",justifyContent:"center",gap:7},children:[f(D,{w:22,h:6,r:2,tone:"soft"}),[0,1,2,3].map(e=>f(D,{w:20,h:13,r:3,tone:"dark"},e))]}),search:f("div",{style:{...G,padding:"0 18%",display:"flex",alignItems:"center"},children:C("div",{style:{flex:1,height:22,borderRadius:11,border:`1px solid ${Me.line}`,display:"flex",alignItems:"center",gap:7,padding:"0 9px"},children:[f("div",{style:{width:9,height:9,borderRadius:5,border:`2px solid ${Me.dark}`}}),f(D,{w:"46%",h:5,r:2,tone:"soft"})]})}),cart:C("div",{style:{...G,display:"flex",alignItems:"center",justifyContent:"center",gap:7},children:[f("div",{style:{width:22,height:18,borderRadius:"3px 3px 6px 6px",border:`2px solid ${Me.dark}`}}),f("div",{style:{padding:"2px 6px",borderRadius:6,border:`1.5px solid ${Me.dark}`},children:f(D,{w:7,h:7,r:2,tone:"dark"})})]}),countryswitch:C("div",{style:{...G,padding:14,display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",gap:5},children:[C("div",{style:{display:"flex",alignItems:"center",gap:6,padding:"4px 8px",border:`1px solid ${Me.line}`},children:[f(D,{w:22,h:6,r:2,tone:"dark"}),f(D,{w:6,h:4,r:1,tone:"soft"})]}),C("div",{style:{width:"46%",display:"flex",flexDirection:"column",gap:4,padding:6,border:`1px solid ${Me.line}`},children:[f(D,{w:"80%",h:4,r:2,tone:"accent"}),f(D,{w:"64%",h:4,r:2,tone:"soft"}),f(D,{w:"72%",h:4,r:2,tone:"soft"})]})]}),legalline:C("div",{style:{...G,padding:16,display:"flex",flexDirection:"column",justifyContent:"center",gap:9},children:[f("div",{style:{height:1,background:Me.line}}),C("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center"},children:[f(D,{w:"38%",h:5,r:2,tone:"soft"}),C("div",{style:{display:"flex",gap:5},children:[f(D,{w:14,h:5,r:2,tone:"soft"}),f(D,{w:14,h:5,r:2,tone:"soft"}),f(D,{w:14,h:5,r:2,tone:"soft"})]})]})]}),fallback:f("div",{style:{position:"absolute",inset:14,borderRadius:8,background:Me.block}})};function Cw({type:e}){let o=k6[e]??"",t=v6[o]??bw[o]??bw.fallback;return f("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 ec}from"efficient-easel/screen/components/ScreenDocumentContext";import{jsx as ua,jsxs as T6}from"react/jsx-runtime";import P6 from"efficient-easel/screen/components/SidePanelHead";import{StylesIcon as E6}from"efficient-easel/rail";import{Tooltip as O6}from"efficient-shell/ui";function ww({tokenRef:e,siteId:o,onClose:t,onNotify:r,tab:a,onTabChange:n,revealPageGroup:s,onPageGroupRevealed:i}){let c=ra();return T6("div",{className:"sf-styles",children:[ua(P6,{icon:ua(E6,{}),title:l("Styles"),context:ua(O6,{content:l("{name} \u2014 renamed in the Console: {place}.",{name:c,place:l("Storefront \u25B8 Sites \u25B8 Settings")}),className:"sf-name-tip",children:ua("span",{className:"sf-name-text",children:c})})}),ua("div",{className:"sf-insp-body es-insp-body sf-scroll",children:ua(Fl,{tokenRef:e,siteId:o,onNotify:r,tab:a,onTabChange:n,revealPageGroup:s,onPageGroupRevealed:i})})]})}import{jsx as ze,jsxs as Ir,Fragment as D6}from"react/jsx-runtime";import{Fragment as Nw,useEffect as Mw,useRef as lp}from"react";import{useTreeDrag as Hw}from"efficient-easel/drag";import{GlobeIcon as N6,ImageIcon as M6,LocationIcon as H6,MapIcon as z6,TextLinesIcon as W6,TrashIcon as zw}from"efficient-easel/icons";import{Subtree as Ww,TreeRow as vn,TreeRowAction as Gw,TreeSeam as Uw}from"efficient-easel/tree";import{useEaselStrings as G6}from"efficient-easel/strings";import{createPreviewSelectionContext as F6}from"efficient-easel/draw/client";var{Provider:ude,useSelection:kw}=F6("selectedLocationPartId");function vw(e,o,t){return`${e}::${o}::${t}`}function Tw(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"&&t!=="city")return null;let r=Number(o[o.length-2]);if(!Number.isInteger(r)||r<0)return null;let a=o.slice(0,-2).join("::");return a?{nodeId:a,index:r,part:t}:null}import{isSelectionMode as U6}from"efficient-easel/screen/lib/screen-parts";import{useSyncExternalStore as L6}from"react";var A6={level:"groups"},Ew=A6,tp=new Set;function _o(e){Ew=e;for(let o of tp)o()}function R6(e){return tp.add(e),()=>{tp.delete(e)}}var Pw=()=>Ew;function Ow(){return L6(R6,Pw,Pw)}function xi(e,o,t){let r=[];return e.forEach((a,n)=>{let s=o(a),i=r.find(c=>c.key===s);i||(i={key:s,name:t(a),items:[]},r.push(i)),i.items.push({item:a,index:n})}),r}function hde(e){return B6[wn(e)]}var B6={1:"grid-cols-1",2:"grid-cols-2",3:"grid-cols-3",4:"grid-cols-4"};function wn(e){if(e<=1)return 1;if(e<=4)return e;let o=t=>e%t||t;return o(4)>=o(3)?4:3}var kn=e=>String(e?.group??""),rp=new WeakMap,_6=0;function hi(e){let o=rp.get(e);return o||(o=`loc${++_6}`,rp.set(e,o)),o}var Fw=(e,o)=>o||e||"Ungrouped",Lw={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 hr(e){return xi(e,kn,o=>String(o?.groupName??"")).map(o=>({key:o.key,name:o.name,cards:o.items.map(t=>t.item)}))}var ap=e=>e.flatMap(o=>o.cards),Aw=(e,o,t)=>Math.min(Math.max(e,o),t);function Ii(e,o,t){let r=0;for(let a=0;a<e.length;a++)if(kn(e[a])===o){if(r===t)return a;r++}return-1}function np(e,o,t){let r=hr(e);if(o<0||o>=r.length)return e;let[a]=r.splice(o,1),n=Aw(o<t?t-1:t,0,r.length);return r.splice(n,0,a),ap(r)}function sp(e,o,t,r,a){let n=hr(e),s=n.find(x=>x.key===o),i=n.find(x=>x.key===r);if(!s||!i||t<0||t>=s.cards.length)return e;let[c]=s.cards.splice(t,1),d=o===r?c:{...c,group:i.key,groupName:i.name};d!==c&&rp.set(d,hi(c));let m=Aw(s===i&&t<a?a-1:a,0,i.cards.length);return i.cards.splice(m,0,d),ap(n)}function Rw(e,o){let t=hr(e),r=t.find(n=>n.key===o),a={...Lw,group:o,groupName:r?.name??""};return r?(r.cards.push(a),ap(t)):[...e,a]}function Bw(e){let o=new Set(hr(e).map(a=>a.key)),t=o.size+1,r=`Group ${t}`;for(;o.has(r);)r=`Group ${++t}`;return{cards:[...e,{...Lw,group:r,groupName:""}],key:r}}function _w(e,o){return e.filter(t=>kn(t)!==o)}function Dw(e,o,t){let r=Ii(e,o,t);return r<0?e:e.filter((a,n)=>n!==r)}function yde(e,o,t){let r=e.flatMap((s,i)=>kn(s)===o?[i]:[]),a=e.slice();r.forEach((s,i)=>{a[s]=t[i]});let n=t.slice(r.length);return[...a.filter(s=>s!==void 0),...n]}function bde(e,o,t){return o.flatMap(r=>{let a=e.filter(n=>kn(n)===r);return a.length?a:t(r)})}var yi="ContactLocations",gi=e=>({parentId:`locations-${e}`,slot:"groups"}),ip=(e,o)=>({parentId:`locations-${e}`,slot:`cities:${o}`});function $w(e,o){let{readOnly:t,selected:r}=o,a=G6().tree,n=o.data?.content??[],s=U6(e),i=lp(null);Mw(()=>{let I=r?.type===yi?String(r.props.id):null;I&&I!==i.current&&_o({level:"groups"}),i.current=I},[r?.props.id]);let{selectedLocationPartId:c,setSelectedLocationPartId:d,setSelectHandler:m}=kw(),x=Ow(),u=(I,b)=>{let v=n[I];v&&o.replace(I,{type:v.type,props:{...v.props,locations:b}})},h=I=>{let b=n[I]?.props?.locations;return Array.isArray(b)?b:[]},g=Hw({keyOf:I=>`group:${I.si}:${I.index}`,readOnly:!!t,canDrop:(I,b)=>b.parentId===gi(I.si).parentId&&b.slot==="groups",onDrop:(I,b)=>{u(I.si,np(h(I.si),I.index,b.index)),x.level==="city"&&_o({level:"groups"})},onStep:(I,b)=>{u(I.si,np(h(I.si),I.index,b<0?I.index-1:I.index+2)),x.level==="city"&&_o({level:"groups"})}}),k=Hw({keyOf:I=>`city:${I.si}:${I.group}:${I.index}`,readOnly:!!t,canDrop:(I,b)=>b.parentId===gi(I.si).parentId&&b.slot.startsWith("cities:"),onDrop:(I,b)=>{let v=b.slot.slice(7);u(I.si,sp(h(I.si),I.group,I.index,v,b.index)),_o({level:"group",key:v})},onStep:(I,b)=>{u(I.si,sp(h(I.si),I.group,I.index,I.group,b<0?I.index-1:I.index+2)),x.level==="city"&&_o({level:"group",key:I.group})}}),P=lp(n);P.current=n;let O=lp(()=>{});Mw(()=>{m(I=>{let b=Tw(I);if(!b)return;let v=P.current.findIndex(S=>S.props?.id===b.nodeId);v<0||O.current(v,{level:b.part,index:b.index})})},[m]);let w=(I,b)=>{i.current=n[I]?.props?.id??null,o.select(I),_o(b),e.reveal();let v=n[I]?.props?.id;typeof v=="string"&&(b.level==="city"||b.level==="image"||b.level==="map")?d(vw(v,b.index,b.level)):d(null),typeof v=="string"&&o.scrollTo(v)};return O.current=w,{renderLocationTree:(I,b,{rowClick:v,isCollapsed:S,toggleCollapse:E})=>{let A=h(b),N=hr(A),z=String(I.props.id),_=s&&r?.props.id===z,T=F=>ze(Uw,{...t?{}:g.seam({place:{...gi(b),index:F}})},`seam:${z}:groups:${F}`),R=(F,M)=>ze(Uw,{...t?{}:k.seam({place:{...ip(b,F),index:M}})},`seam:${z}:cities:${F}:${M}`);return Ir(D6,{children:[ze(vn,{icon:ze(W6,{size:13}),name:l("Texts"),words:a,onSelect:()=>w(b,{level:"texts"}),selected:_&&x.level==="texts",rowProps:{onClick:v(()=>w(b,{level:"texts"}))}}),N.map((F,M)=>{let U=`${z}::grp::${F.key}`,Y=S(U),me=_&&x.level==="group"&&x.key===F.key,Ae=F.name||F.key?Fw(F.key,F.name):l("Ungrouped"),We={...ip(b,F.key),index:F.cards.length},Ve=k.row({item:{si:b,group:F.key,index:-1},place:We,into:We,canDrag:!1},{onClick:v(()=>w(b,{level:"group",key:F.key}))}),Ye=g.row({item:{si:b,index:M},place:{...gi(b),index:M}},Ve.rowProps);return Ir(Nw,{children:[M===0&&T(0),ze(vn,{icon:ze(N6,{size:13}),name:Ae,words:a,onSelect:()=>w(b,{level:"group",key:F.key}),selected:me,draggable:Ye.draggable,dragging:Ye.dragging,drop:Ye.drop??Ve.drop,fold:{open:!Y,label:l("group"),onToggle:()=>E(U)},actions:ze(Gw,{kind:"delete",label:Ze("Delete {label} group ({n} city)","Delete {label} group ({n} cities)",F.cards.length,{label:Ae}),onClick:()=>{u(b,_w(A,F.key)),_o({level:"groups"})},children:ze(zw,{size:15})}),rowProps:Ye.rowProps,count:F.cards.length,countLabel:Ze("{n} city","{n} cities",F.cards.length)}),!Y&&Ir(Ww,{children:[F.cards.map((fe,_e)=>{let Oe=Ii(A,F.key,_e),so=_&&x.level==="city"&&x.index===Oe,eo=String(fe?.name??"")||l("City"),xo=`${z}::city::${hi(fe)}`,yt=S(xo),{rowProps:ho,...Io}=k.row({item:{si:b,group:F.key,index:_e},place:{...ip(b,F.key),index:_e}},{onClick:v(()=>w(b,{level:"city",index:Oe}))});return Ir(Nw,{children:[_e===0&&R(F.key,0),ze(vn,{icon:ze(H6,{size:13}),name:eo,words:a,onSelect:()=>w(b,{level:"city",index:Oe}),selected:so,...Io,fold:{open:!yt,label:eo,onToggle:()=>E(xo)},actions:ze(Gw,{kind:"delete",label:l("Delete {name}",{name:eo}),onClick:()=>{u(b,Dw(A,F.key,_e)),_o({level:"group",key:F.key})},children:ze(zw,{size:15})}),rowProps:ho}),!yt&&Ir(Ww,{children:[ze(vn,{icon:ze(M6,{size:13}),name:l("Image"),words:a,onSelect:()=>w(b,{level:"image",index:Oe}),selected:_&&x.level==="image"&&x.index===Oe,rowProps:{onClick:v(()=>w(b,{level:"image",index:Oe}))}}),ze(vn,{icon:ze(z6,{size:13}),name:l("Map"),words:a,onSelect:()=>w(b,{level:"map",index:Oe}),selected:_&&x.level==="map"&&x.index===Oe,rowProps:{onClick:v(()=>w(b,{level:"map",index:Oe}))}})]}),R(F.key,_e+1)]},hi(fe))}),Ir("button",{type:"button",className:"sf-add-card",onClick:()=>{let fe=Rw(A,F.key);u(b,fe);let _e=hr(fe).find(Oe=>Oe.key===F.key);_o(_e&&_e.cards.length?{level:"city",index:Ii(fe,F.key,_e.cards.length-1)}:{level:"group",key:F.key})},children:[ze("span",{className:"sf-plus sf-plus--sm",children:"+"}),l("Add city")]})]}),T(M+1)]},U)}),Ir("button",{type:"button",className:"sf-add-card",onClick:()=>{let{cards:F,key:M}=Bw(A);u(b,F),w(b,{level:"group",key:M})},children:[ze("span",{className:"sf-plus sf-plus--sm",children:"+"}),l("Add group")]})]})},sectionPressed:I=>{I?.type===yi&&_o({level:"groups"})}}}import{useEffect as hz,useRef as Iz}from"react";import{createNode as hp,newId as Ip}from"efficient-easel/data";import{useEaselApi as gz}from"efficient-easel/easel";import{useScreenDocument as yz}from"efficient-easel/screen/components/ScreenDocumentContext";import{useEaselSession as bz}from"efficient-easel/screen/lib/session-context";import{useEffect as dz,useRef as uz}from"react";import{useEasel as pz}from"efficient-easel/easel";import{ROOT_ZONE as xp}from"efficient-easel/draw";import{readHidable as az}from"efficient-easel/draw";var jw=["general","commerce","service"],Nt=[{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"}]},{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:"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:"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:"Countdown",label:"Countdown",set:"general"}]},{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"}]},{key:"layouts",title:"Layouts",templateable:!0,sections:[{type:"Manifesto",label:"Brand Text",set:"general"},{type:"Split",label:"Image & Text Split",set:"general"},{type:"Subscribe",label:"Signup Form",set:"service"},{type:"Ticker",label:"Scrolling Bar",set:"general"},{type:"SpecStrip",label:"Spec Strip",set:"general"},{type:"TimelineTrack",label:"Milestone Timeline",set:"general"},{type:"Timeline",label:"Story Timeline",set:"general"}]}];function Bde(){return Object.fromEntries(Nt.map(e=>[e.key,{title:e.title,components:e.sections.map(o=>o.type),...e.defaultExpanded?{defaultExpanded:!0}:{}}]))}var $6={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.',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."},_de=["Grid","Spacer"],Dde=Array.from(new Set([...Nt.flatMap(e=>e.sections.map(o=>o.type)),...Object.keys($6)])),qw=Object.fromEntries(Nt.flatMap(e=>e.sections.map(o=>[o.type,o.label]))),j6={Heading:"general",Text:"general",Eyebrow:"general",ImageBlock:"general",LogoBlock:"general",LocationMap:"general",ButtonBlock:"general",PostCard:"general",HeroSlide:"general",HeroGroup:"general",Integrations:"general",Grid:"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"},bi={...j6,...Object.fromEntries(Nt.flatMap(e=>e.sections.map(o=>[o.type,o.set])))};function Kw(e){return Object.prototype.hasOwnProperty.call(bi,e)?bi[e]:void 0}function cp(e){return Object.keys(bi).filter(o=>bi[o]===e).sort()}var Nde=cp("general"),Mde=cp("commerce"),Hde=cp("service"),fp="Flex",Mt="Box",zde=`${Mt}es`;function q6(e){return e==="section"?"Blank section":Mt}function dp(e,o,t){return e===fp?q6(o):t}var Ht="content",ee="Flex",K6="Text & media",V6="Layout & structure",Yw=[{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:"LocationMap",label:"Map"},{type:"ButtonBlock",label:"Button"}],Y6=[...Yw,{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:K6})),X6=(Nt.find(e=>e.key==="structure")?.sections??[]).map(e=>({type:e.type,label:e.label,group:V6})),Vw=[...Y6,...X6],up=[...Yw,{type:"HeroGroup",label:Mt}],Ude=up.map(e=>e.type),Z6=1,Q6=up.filter(e=>e.type!=="HeroGroup");function J6(e){return e<Z6?up:Q6}var ez={Flex:{slot:Ht,choices:()=>Vw},Grid:{slot:Ht,choices:()=>Vw},HeroGroup:{slot:Ht,choices:J6}};function Xw(e,o=0){let t=ez[e];return t?{slot:t.slot,choices:t.choices(o)}:null}var bo=()=>({tag:"h2",_partStyles:{text:{textStyle:"heading-2"}}}),Do=()=>({_partStyles:{text:{textStyle:"body-5",color:"accent",letterSpacing:.3,case:"upper",lineHeight:1.5}}});var oz="inline",tz=[{label:"In this section",value:"inline"},{label:"In its own box",value:"own-box"}];var Qe={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 Zw(e){return e in Qe}function Qw(e){return oo(tz,oz,e)}var rz=new Set(["Flex"]);function Vde(e){return!!e?.type&&rz.has(e.type)}var Jw={not:{field:"headPlacement",is:"own-box"}},Yde={not:Jw};function Xde(e,o,t){return Dc(e,t,Jw)}var ut=ee,pt=Ht;function Tn(e){if(e.theme)return Ge(e.theme);let o=e.site?.themePresets;return o?Ge({selected:e.site?.selectedPreset??0,themes:[...o]}):void 0}function nz(e,o){return o===0?`${e}~box`:`${e}~box-${o+1}`}var ok=new Set(["id"]),ma={},Si=[];function mt(e){for(let[o,t]of Object.entries(e)){if(o in ma&&ma[o]!==t)throw new Error(`lib/sections/section-to-box: "${o}" already has a row`);ma[o]=t}}function Ci(e){return ma[e]}function tk(e){return e in ma&&Si.includes(e)}function nue(e){let o=Qe[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 pp=e=>az(e),Ko=e=>pp(e).text.trim()!=="";function sz(e){if(e.includes("=="))return e;let o=e.indexOf("/"),t=o===-1?e:e.slice(0,o),r=t.trim();if(!r)return e;let a=t.indexOf(r);return`${t.slice(0,a)}==${r}==${t.slice(a+r.length)}${o===-1?"":e.slice(o)}`}var lz=e=>e==="heading"?bo():e==="eyebrow"?Do():{};function iz(e,o,t,r){let a={...e._partStyles?.text??{},...o??{},...t??{}};return(r==="center"||r==="right")&&a.align===void 0&&(a.align=r),Object.keys(a).length?{_partStyles:{text:a}}:{}}function cz(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 ek(e,o,t,r,a={}){let n={...o};for(let s of e){let[i,c,d]=typeof s=="string"?[s,s,void 0]:s;if(t[i]===void 0)continue;let m=d?d(t[i],t,a):t[i];m===void 0?delete n[c]:n[c]=m,r(i,c,m===void 0)}return n}function fz(e){let o=new Set([...ok,"headPlacement","_partStyles",...Object.keys(e.drop??{}),...Object.keys(e.reads??{})]),t=a=>{for(let n of a??[])o.add(typeof n=="string"?n:n[0])},r=a=>{for(let n of a)switch(n.kind){case"text":case"image":o.add(n.key),n.kind==="image"&&n.alt&&o.add(n.alt);break;case"button":o.add(n.key),o.add(n.href),typeof n.variant=="object"&&o.add(n.variant.key);break;case"list":o.add(n.key);break;case"group":case"block":t(n.box),r(n.parts??[]);break;case"core":n.keep!=="rest"&&n.keep.forEach(s=>o.add(s)),Object.keys(n.rename??{}).forEach(s=>o.add(s));for(let s of Object.values(n.slots??{}))for(let i of s)"kind"in i&&o.add(i.key);break}};for(let a of[e,...e.also??[]])t(a.box),r(a.parts);return o}function mp(e,o,t={}){let r=e.props,a=o.skip?.(r);if(a!==void 0)return{node:e,nodes:[e],carried:[],dropped:[],siteWrites:[],restyled:[],skipped:a};let n=String(r.id??e.type),s=[],i=[],c=[],d=new Set,m=(v,S)=>{s.push({key:v,home:S}),d.add(v)},x=r._partStyles??{},u=fz(o),h=0,g=(v,S)=>({type:v,props:{...S,id:`${n}~${v}-${++h}`}}),k=(v,S,E,A,N,z,_)=>{if(N){for(let R of v??[]){let F=typeof R=="string"?R:R[0];E[F]!==void 0&&_(F,`nothing \u2014 the ${A} has no parts, so it is not drawn`)}return}let T=typeof S=="function"?S(r,t):S??{};return ek(v??[],T,E,(R,F,M)=>_(R,M?`nothing \u2014 the old value draws nothing (${A}: no ${F})`:`${z}${A}: ${F}`),t)},P=v=>v.map(S=>{let E={...S.props??{}};for(let[A,N]of Object.entries(S.slots??{}))E[A]=P(N);return g(S.type,E)}),O=(v,S,E)=>{let A=Array.isArray(S[v.key])?S[v.key]:[],N=typeof v.props=="function"?v.props(r,t):v.props??{},z=A.map((F,M)=>{let U=F??{},Y=v.item?.(U,M,r)??{},me=w(Y.reverse?[...v.parts].reverse():v.parts,U,!1,`item ${M+1}: `);return v.flat?Y.props?me.map(Ae=>({...Ae,props:{...Ae.props,...Y.props,id:Ae.props.id}})):me:[g(ut,{name:`${v.name} ${M+1}`,...N,...Y.props??{},[pt]:me})]});if(v.groups){let F=v.groups;return E(v.key,A.length?`one Box per item (${A.length}), in a Box per group`:"nothing \u2014 the list is empty"),xi(A.map(M=>M??{}),F.of,F.of).map((M,U)=>{let Y=M.items.map(fe=>fe.item),me=F.parts?w(F.parts,F.head?.(Y,r)??{},!1,`group ${U+1}: `):[],Ae=M.items.map(fe=>z[fe.index]),We=F.perRow?.(Y.length,r),Ve=Number.isInteger(We)&&We>=1?We:1,Ye=[];if(F.perRow&&Ve<Ae.length)for(let fe=0;fe*Ve<Ae.length;fe++)Ye.push(Ae.slice(fe*Ve,(fe+1)*Ve).flat());return g(ut,{name:`${F.name} ${U+1}`,...F.props??{},[pt]:[...me,g(ut,{name:`${F.itemsName} ${U+1}`,...F.itemsProps?.(Y.length,r)??{},[pt]:Ye.length?Ye.map((fe,_e)=>g(ut,{name:`${F.rowName??`${F.itemsName} row`} ${_e+1}`,...F.rowProps??{},[pt]:fe})):Ae.flat()})]})})}let _=v.perRow?.(r),T=v.perRow?Number.isInteger(_)&&_>=1?_:1:0;if(E(v.key,(A.length?v.flat?`each item's parts (${A.length} items), in order`:`one Box per item (${A.length}), its parts inside`:"nothing \u2014 the list is empty")+(T&&A.length?`, in rows of ${T}`:"")),!T)return z.flat();let R=[];for(let F=0;F*T<z.length;F++)R.push(g(ut,{name:`${v.rowName??`${v.name} row`} ${F+1}`,...v.rowProps??{},[pt]:z.slice(F*T,(F+1)*T).flat()}));return R},w=(v,S,E,A)=>{let N=[],z=(T,R)=>E?m(T,R):void 0,_=T=>E?x[T]:void 0;for(let T of v)if(!(T.when&&!T.when(r,E?void 0:S)))switch(T.kind){case"text":{let R=pp(S[T.key]);if(!R.text.trim()){z(T.key,"nothing \u2014 empty words draw nothing, so no block");break}let F=lz(T.role??"body"),{_partStyles:M,...U}=F,Y=iz(F,T.style,_(T.key),T.props?.align);if(T.was&&E){let me=Y._partStyles?.text??{};c.push({key:T.key,was:T.was,...typeof me.textStyle=="string"?{textStyle:me.textStyle}:{},...$(me.size)!==void 0?{size:$(me.size)}:{},...$(me.sizePhone)!==void 0?{sizePhone:$(me.sizePhone)}:{}})}N.push(g("Text",{text:T.mark==="accentLead"?sz(R.text):R.text,...U,...T.props??{},...Y,...R.hidden?{_hidden:!0}:{}})),z(T.key,`${A}Text block: its words${R.hidden?", hidden":""}`);break}case"button":{let R=pp(S[T.key]);if(!R.text.trim()){z(T.key,"nothing \u2014 no words, no button"),z(T.href,"nothing \u2014 no button to link"),typeof T.variant=="object"&&z(T.variant.key,"nothing \u2014 no button to style");break}let F=typeof S[T.href]=="string"&&S[T.href]?S[T.href]:"#",M={...T.style??{},..._(T.key)??{}};N.push(g("ButtonBlock",{label:R.text,href:F,...typeof T.props=="function"?T.props(S,t):T.props??{},...cz(T.variant,S),...Object.keys(M).length?{_partStyles:{label:M}}:{},...R.hidden?{_hidden:!0}:{}})),z(T.key,`${A}Button block: its words`),z(T.href,`${A}Button block: its link`),typeof T.variant=="object"&&z(T.variant.key,`${A}Button block: its Style`);break}case"image":{let R=S[T.key];if(typeof R!="string"||!R){z(T.key,"nothing \u2014 no picture, no block"),T.alt&&z(T.alt,"nothing \u2014 no picture to describe");break}let F=T.alt&&typeof S[T.alt]=="string"?S[T.alt]:"";N.push(g("ImageBlock",{src:R,alt:F,...T.props??{}})),z(T.key,`${A}Image block: its picture`),T.alt&&z(T.alt,`${A}Image block: its alt text`);break}case"list":{N.push(...O(T,S,z));break}case"group":{let R=w(T.parts,S,E,A),F=k(T.box,T.props,S,`${T.name} Box`,!R.length&&!T.keepEmpty,A,z);F&&N.push(g(ut,{name:T.name,...F,[pt]:R}));break}case"block":{let R=T.parts?w(T.parts,S,E,A):[],F=k(T.box,T.props,S,`${T.type} block`,!!T.parts&&!R.length&&!T.keepEmpty,A,z);F&&N.push(g(T.type,{...F,...T.slot?{[T.slot]:R}:{}}));break}case"core":{let R=T.as??e.type,F={headPlacement:"own-box",...T.props??{}},M=T.keep==="rest"?Object.keys(S).filter(U=>!u.has(U)&&!(U in F)):T.keep;for(let U of M)S[U]!==void 0&&(F[U]=S[U],z(U,`the ${R} block inside the Box`));if(T.keep==="rest"){for(let Y of Object.keys(T.props??{}))S[Y]!==void 0&&!u.has(Y)&&z(Y,`nothing \u2014 the ${R} block inside the Box has the row's own value`);S.headPlacement!==void 0&&z("headPlacement",`the ${R} block inside the Box: own-box`);let U=Object.fromEntries(Object.entries(x).filter(([Y])=>!u.has(Y)));Object.keys(U).length&&(F._partStyles=U)}for(let[U,Y]of Object.entries(T.rename??{}))S[U]!==void 0&&(F[Y]=S[U],z(U,`the ${R} block inside the Box: ${Y}`));for(let[U,Y]of Object.entries(T.slots??{}))F[U]=Y.flatMap(me=>"kind"in me?O(me,S,z):P([me]));N.push(g(R,F));break}}return N},I=(v,S)=>{let E=S===0?"Box":`${v.name} Box`,A=w(v.parts,r,!0,S===0?"":`${E}: `),N=typeof v.boxProps=="function"?v.boxProps(r,t):v.boxProps??{},z=ek(v.box??[],N,r,(_,T,R)=>m(_,R?`nothing \u2014 the old value draws nothing (${E}: no ${T})`:`${E}: ${T}`),t);return{type:ut,props:{name:v.name,...z,[pt]:A,id:nz(n,S)}}},b=[o,...o.also??[]].map(I);r._partStyles!==void 0&&m("_partStyles","each old part's style moved to its new part");for(let[v,S]of Object.entries(o.reads??{}))r[v]!==void 0&&m(v,S);for(let[v,S]of Object.entries(o.drop??{}))v in r&&(i.push({key:v,why:S}),d.add(v));for(let v of Object.keys(r))ok.has(v)||d.has(v)||i.push({key:v,why:"not in the row \u2014 not carried"});return{node:b[0],nodes:b,carried:s,dropped:i,siteWrites:[...o.site?.(e,t)??[]],restyled:c}}function rk(e,o=Si,t={}){if(!Array.isArray(e))return[];let r=[];return e.forEach((a,n)=>{let s=a&&typeof a.type=="string"&&o.includes(a.type)?ma[a.type]:void 0;if(!s)return;let i=mp(a,s,t);i.skipped===void 0&&r.push({index:n,node:i.node,nodes:i.nodes})}),r}function ak(e){let o=pz(s=>s.appState.data.content),{theme:t,themeRow:r,themeFromDocument:a}=oe(),n=uz(new Set);dz(()=>{let s=mz({theme:t,themeRow:r,themeFromDocument:a});s&&xz(rk(o,void 0,s),e,n.current)},[o,e,t,r,a])}function mz(e){return e.themeFromDocument||e.themeRow==="none"?{}:e.themeRow==="read"?{theme:e.theme}:null}function xz(e,o,t){for(let{index:r,nodes:a}of[...e].sort((n,s)=>s.index-n.index)){let n=String(a[0].props.id);t.has(n)||(t.add(n),o.replaceComponent(xp,r,a[0]),a.slice(1).forEach((s,i)=>{o.insertNode(xp,r+1+i,s),o.replaceComponent(xp,r+1+i,s)}))}}import{ROOT_ZONE as xa,missingPinnedTypes as Sz,pinnedDuplicateIds as gp}from"efficient-easel/draw";function nk(e){return!e.docId||e.saveStatus==="saving"?!1:e.seededDocId!==e.docId}function sk(e,o){let t=e.some(i=>i?.type===xe),r=e[e.length-1],a=!t&&r?.type===ye?r:null,n=e.filter(i=>i?.type===ye&&i!==a).map(i=>String(i.props?.id??"")).filter(Boolean),s=o.hasChromeDoc&&!t&&!a;return{remove:n,seedHeader:!e.some(i=>i?.type===ro),seedFooter:s,seedSiteHeader:s&&!e.some(i=>i?.type===be)}}async function lk(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!==be||!e.stillOpen())return!1;let r=e.latest();return r.some(a=>a?.type===be)?!1:(e.write(ri(r,t)),!0)}function ik(e,o){let{adapter:t,capabilities:r,currentSlug:a,docId:n,data:s,saveStatus:i,siteId:c,tokenRef:d}=yz(),m=bz(),{hasSiteSettings:x,hasPinnedChrome:u}=r;ak(e);let h=!!r.editsPinnedInPlace&&a!==Mr,g=a===Mr,k=gz().getState,P=Iz(null);hz(()=>{if(!nk({docId:n,saveStatus:i,seededDocId:P.current})||(P.current=n,!u))return;let O=k().appState.data,w=O.content,I=s?.content??[],b=(A,N)=>A.some(z=>z?.type===N);if(!x){let A=new Set(gp(w)),N=A.size?w.filter(_=>!A.has(_.props.id)):w;if(A.size&&e.setDocument({...O,content:N}),g)return;let z=Sz(N,I);if(z.includes(ye)){let _=N.length,T=e.insertSection(ye,_);e.replaceComponent(xa,_,{type:ye,props:{id:T,blocks:ti()}})}z.includes(ro)&&e.insertNode(xa,0,oi());return}if(g){let A=ca(w);if(A!==w&&e.setDocument({...O,content:[...A]}),!A.find(N=>N.type===ye)&&!b(I,ye)&&!b(A,xe)&&!b(I,xe)){let N=(_,T)=>hp(o,_,T),z={type:ye,props:{blocks:ti()}};e.insertNode(xa,A.length,hn(z,N,Ip(xe)))}return}if(h){let A=!!t?.pinnedChrome?.state().docId,N=sk(w,{hasChromeDoc:A}),z=new Set([...N.remove,...gp(w.filter(T=>!N.remove.includes(String(T.props.id))))]),_=z.size?w.filter(T=>!z.has(String(T.props.id))):w;if(_.length!==w.length&&e.setDocument({...O,content:_}),N.seedFooter&&!b(I,ye)&&!b(I,xe)){let T=(F,M)=>hp(o,F,M),R={type:ye,props:{blocks:ti()}};e.insertNode(xa,_.length,hn(R,T,Ip(xe)))}if(N.seedHeader&&!b(I,ro)){let T=_[0]?.type===be?1:0;e.insertNode(xa,T,oi())}if(N.seedSiteHeader&&!b(I,be)&&!b(I,ye)&&!b(I,xe)){let T=n;lk({blocks:Ss(m),make:(R,F)=>hp(o,R,F),id:Ip(be),siteId:c??null,token:d.current,latest:()=>k().appState.data.content,stillOpen:()=>P.current===T,write:R=>{let F=k().appState.data;e.setDocument({...F,content:[...R]})}})}return}let v=w.filter(A=>A.type!==ye),S=new Set(gp(v)),E=S.size?v.filter(A=>!S.has(A.props.id)):v;E.length!==w.length&&e.setDocument({...O,content:E}),!b(E,ro)&&!b(I,ro)&&e.insertNode(xa,0,oi())},[n,i,s,k,e,x,u,g,h,t,m,c,d])}import{useEffect as xk,useMemo as Ez,useRef as hk}from"react";import{useEasel as Oz}from"efficient-easel/easel";import{useEaselHost as Fz}from"efficient-easel/screen/lib/host";import{FIELD_DESCRIPTION_MARKER as Cz}from"efficient-easel/screen/lib/host";import{isNode as yp}from"efficient-easel/data";function bp(e,o){let t=e.components[o]?.label;return typeof t=="string"&&t.trim()?t.trim():o}function wz(e){return e.length>3&&e.endsWith("s")?e.slice(0,-1):e}function Sp(e,o,t,r){e.forEach((a,n)=>{if(yp(a)){r.push({node:a,list:e,index:n,parent:o,slot:t});for(let[s,i]of Object.entries(a.props))Array.isArray(i)&&i.some(yp)&&Sp(i,a,s,r)}})}function kz(e){let o=[];Sp(Array.isArray(e.content)?e.content:[],null,"",o);for(let t of Object.values(e.zones??{}))Array.isArray(t)&&Sp(t,null,"",o);return o}function fk(e,o){return kz(e).find(t=>String(t.node.props.id)===o)}function dk(e,o,t){if(!t)return null;let r=fk(o,t);if(!r)return null;let a=bp(e,r.node.type),n=r.parent?`${bp(e,r.parent.type)} \xB7 ${wz(r.slot)} ${r.index+1}`:a;return{blockId:t,type:r.node.type,label:n,path:""}}var vz=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 Tz(e){if(!e||typeof e!="object")return null;let o=e;if(typeof o.type!="string")return null;let t=o.type==="custom"?o[Cz]:void 0,r={type:t?.type??o.type},a=t?.label??o.label;typeof a=="string"&&(r.label=a);let n=t?.options??o.options;Array.isArray(n)&&(r.options=vz(n));for(let s of["arrayFields","objectFields"]){let i=t?.[s]??o[s];i&&typeof i=="object"&&(r[s]=uk(i))}return r}function uk(e){let o={};for(let[t,r]of Object.entries(e??{})){let a=Tz(r);a&&(o[t]=a)}return o}function pk(e){let o={};for(let[t,r]of Object.entries(e.components))r&&(o[t]={label:bp(e,t),fields:uk(r.fields)});return o}function Pz(e,o){let t=e;for(let r of o?o.split("."):[]){let a=/^([A-Za-z_][A-Za-z0-9_]*)(?:\[(\d+)\])?$/.exec(r);if(!a||!t||typeof t!="object")return null;t=t[a[1]],a[2]!==void 0&&(t=Array.isArray(t)?t[Number(a[2])]:void 0)}return t&&typeof t=="object"&&!Array.isArray(t)?t:null}function Cp(e,o){return e.findIndex(t=>yp(t)&&String(t.props.id)===o)}function ck(e,o,t){let r=o||t;if(!r)return e.length;let a=Cp(e,r);if(a<0)throw new Error(`there is no top-level block ${r}`);return o?a+1:a}function mk(e,o,t,r){let a=structuredClone(o),n=Array.isArray(a.content)?a.content:a.content=[];try{t.forEach((s,i)=>{let c=d=>{throw new Error(`change ${i+1}: ${d}`)};switch(s.op){case"set_props":{let d=fk(a,s.block_id)??c(`there is no block ${s.block_id}`);"id"in s.props&&c("a block's id is never changed");let m=Pz(d.node.props,s.path)??c(`there is no ${s.path} in that block`);Object.assign(m,structuredClone(s.props));break}case"insert_block":{let d=e.components[s.type]??c(`there is no block type ${s.type}`),m=d.defaultProps&&typeof d.defaultProps=="object"?d.defaultProps:{},x={type:s.type,props:{...structuredClone(m),...structuredClone(s.props),id:r(s.type)}};n.splice(ck(n,s.after,s.before),0,x);break}case"remove_block":{let d=Cp(n,s.block_id);d<0&&c(`there is no top-level block ${s.block_id}`),n.splice(d,1);break}case"move_block":{let d=Cp(n,s.block_id);d<0&&c(`there is no top-level block ${s.block_id}`);let[m]=n.splice(d,1);n.splice(ck(n,s.after,s.before),0,m);break}default:c(`"${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:a}}var wp=e=>pe(e.requestId)??null;function Ik(){let e=Fz(),{appState:o,selectedItem:t,dispatch:r,history:a,config:n}=Oz(u=>u),s=n,i=hk({appState:o,dispatch:r,history:a,blockConfig:s});i.current={appState:o,dispatch:r,history:a,blockConfig:s};let c=hk(new Map),d=t?.props?.id,m=Ez(()=>dk(s,o.data,d),[s,o.data,d]),x=m?JSON.stringify(m):"";xk(()=>{e.connected&&e.send("storefront-editor:selection",{selection:m})},[e,x]),xk(()=>e.subscribe(u=>{let{appState:h,dispatch:g,history:k,blockConfig:P}=i.current;switch(u.type){case"storefront-editor:request-document":{let O=wp(u);if(!O)return;e.send("storefront-editor:document",{requestId:O,document:h.data,blocks:pk(P)});return}case"storefront-editor:apply-page-edits":{let O=wp(u);if(!O)return;let w=Array.isArray(u.ops)?u.ops:[],I=w.length?mk(P,h.data,w,b=>`${b}-${crypto.randomUUID()}`):{ok:!1,reason:"no changes"};I.ok&&(g({type:"setData",data:I.document,recordHistory:!0}),c.current.set(O,JSON.stringify(I.document.content??[]))),e.send("storefront-editor:page-edits-result",{requestId:O,applied:I.ok,reason:I.ok?null:I.reason});return}case"storefront-editor:undo-page-edits":{let O=wp(u);if(!O)return;let w=c.current.get(O),I=w!==void 0&&w===JSON.stringify(h.data.content??[]);I&&k.hasPast&&(k.back(),c.current.delete(O)),e.send("storefront-editor:page-edits-result",{requestId:O,applied:I&&k.hasPast,reason:I?null:"the page has changed since"});return}case"storefront-editor:set-right-panel":typeof u.shown=="boolean"&&g({type:"setUi",ui:{rightSideBarVisible:u.shown}});return;default:return}}),[e])}import{useEffect as bk,useState as Sk}from"react";var wi=new Map;async function Lz(e,o){try{return(await He().site.get({siteId:o})).slug?.trim()||null}catch(t){return console.warn("[editor-site-slug] could not resolve the site slug",t),null}}function gk(e,o){let t=wi.get(o);return t||(t=Lz(e,o),wi.set(o,t),t.catch(()=>{wi.get(o)===t&&wi.delete(o)})),t}var Az=/^(localhost|(?:[a-z0-9-]+\.)+localhost|127(?:\.\d{1,3}){3}|0\.0\.0\.0|\[::1\]|::1)$/i;function kp(e){return!!e&&Az.test(e)}function yk(e){let{pageSlug:o,siteSlug:t,hostname:r}=e,a=o===us?"/":`/${encodeURIComponent(o)}`;if(!kp(r))return a;let n=t?.trim();return n?`${a}?site=${encodeURIComponent(n)}`:a}function Ck(e){let{pageSlug:o,siteId:t,token:r}=e,[a,n]=Sk(null),[s,i]=Sk(null),c=Or();bk(()=>i(c?new URL(c).hostname:window.location.hostname),[c]),bk(()=>{if(!kp(s)||!t||!r){n(null);return}let m=!1;return gk(r,t).then(x=>{m||n(x)}),()=>{m=!0}},[s,t,r]);let d=yk({pageSlug:o,siteSlug:a,hostname:s});return c?`${c}${d}`:d}import{jsx as Pn}from"react/jsx-runtime";import{ExternalIcon as wk}from"efficient-easel/icons";import{EaselIconButton as Rz}from"efficient-easel/chrome";import{Tooltip as Bz,iconButtonClasses as _z}from"efficient-shell/ui";function Dz({pageId:e,liveHref:o,draftLink:t,win:r=window}){let a=r.open("","_blank");if(a)try{a.opener=null}catch{}let n=s=>{a&&!a.closed?a.location.href=s:r.open(s,"_blank","noopener,noreferrer")};return t(e).then(s=>n(s.url??o),()=>n(o))}function kk({liveHref:e,pageId:o,draftLink:t}){return t&&o?Pn(Rz,{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:()=>{Dz({pageId:o,liveHref:e,draftLink:t})},children:Pn(wk,{})}):Pn(Bz,{content:l("Preview the live site (opens in a new tab)"),side:"bottom",children:Pn("a",{className:_z({className:"es-iconbtn"}),href:e,target:"_blank",rel:"noopener noreferrer","aria-label":l("Preview the live site in a new tab"),children:Pn(wk,{})})})}import{createElement as Uz,useCallback as $z,useEffect as $k,useRef as jk,useState as jz}from"react";import{ClockIcon as qz}from"efficient-shell/icons/efficient";import{useScreenDocument as Kz}from"efficient-easel/screen/components/ScreenDocumentContext";import{useSyncExternalStore as Nz}from"react";import{useScreenDocument as Mz}from"efficient-easel/screen/components/ScreenDocumentContext";var Hz=()=>()=>{},vk=()=>null;function ki(e){return Nz(e?e.subscribe:Hz,e?e.state:vk,e?e.state:vk)}function vi(){let{adapter:e}=Mz();return e?.pinnedChrome}import{useSyncExternalStore as Ek}from"react";var En=!1,ha=null,vp=new Set;function Fn(){for(let e of vp)e()}function Ok(e){return vp.add(e),()=>{vp.delete(e)}}function Fk(){En||(En=!0,Fn())}function Lk(){En&&(En=!1,Fn())}function Tk(){return En}function Ak(){return Ek(Ok,Tk,Tk)}function Pk(){return ha}function Ti(){ha&&(ha=null,Fn())}function Rk(){return Ek(Ok,Pk,Pk)}var On=class extends Error{constructor(){super("The editor's last changes could not be saved, so nothing was restored."),this.name="HeldEditsNotSaved"}};async function Bk(e,o,t,{flushSave:r,reload:a}){if(!await r())throw new On;let n=await e.restore(o,t);return Vh(n.liveState),a(),n}async function _k({access:e,version:o,page:t,...r}){let a=await Bk(e,o.id,t?{page:t.id}:{},r);ha={title:zz(o,t??null),undo:a.undo},Fn()}async function Dk({access:e,...o}){let t=ha?.undo;t&&(await Bk(e,t,{},o),ha=null,Fn())}function Nk(e){return e.name?e.name:e.kind==="draft_before_restore"?l("Draft before restore"):l("Version {n}",{n:e.number})}function zz(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 Mk(e){let o=e.changes.filter(r=>r.kind==="page").length,t=[...o?[Ze("{n} page","{n} pages",o)]:[],...e.changes.filter(r=>r.kind!=="page").map(r=>r.name)];if(!t.length)return"";try{return new Intl.ListFormat(mc(),{type:"conjunction"}).format(t)}catch{return t.join(", ")}}function Hk(e){return e.change==="take_down"?l("{name} (taken down)",{name:e.name}):e.name}function zk(e,o=new Date){let t=new Date(e);if(Number.isNaN(t.getTime()))return"";let r=mc(),a=new Intl.DateTimeFormat(r,{hour:"numeric",minute:"2-digit"}).format(t);if(t.toDateString()===o.toDateString())return l("Today, {time}",{time:a});let n=new Intl.DateTimeFormat(r,{day:"numeric",month:"short",...t.getFullYear()===o.getFullYear()?{}:{year:"numeric"}}).format(t);return l("{day}, {time}",{day:n,time:a})}import{useSyncExternalStore as Wz}from"react";var Ia=new Map,Tp=new Set;function Pp(e,o){if(!(Ia.has(e)&&Ia.get(e)===o)){Ia.set(e,o);for(let t of Tp)t()}}function xpe(e,o){Pp(e,o)}function hpe(e,o){let t=Ia.get(e);Pp(e,o??(t==="live"?"changed":t))}function Ipe(e,o){Pp(e,o??"live")}function gpe(e){return Ia.get(e)}function Gz(e){return Tp.add(e),()=>{Tp.delete(e)}}function Wk(e){let o=()=>e?Ia.get(e):void 0;return Wz(Gz,o,o)}function Gk(e,o){return e==="live"&&o?"changed":e}function Ep({live:e,onPress:o,busy:t=!1,pinnedUnpublished:r=!1,goingLive:a}){let n=e==="live"&&!r,s=e==="changed"?l("Changes not live yet"):e==="never"?l("Never published"):r?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,...a&&a.length?{goingLive:a}:{},onPress:o,busy:t}}function Uk(e){return e.map(o=>o.change==="take_down"?l("{name} (taken down)",{name:o.name}):o.name)}function qk(e){let{docId:o,capabilities:t,hasUnsavedEdits:r,onPublish:a,adapter:n}=Kz(),s=Gk(Wk(o??null),r),i=ki(vi()),c=n.siteLiveState;$k(()=>{if(c)return uf(c),ws(0),()=>uf(null)},[c]);let d=ks(),[m,x]=jz(!1),u=jk(e);u.current=e;let h=jk(!0);$k(()=>(h.current=!0,()=>{h.current=!1}),[]);let g=$z(()=>{x(!0),a(u.current).then(()=>{Ti()}).finally(()=>{h.current&&x(!1)})},[a]);if(t.canPublish){if(c){let k=d===void 0?void 0:r||d.state==="changed"?"changed":"live",P=Ep({live:k,onPress:g,busy:m,goingLive:Uk(d?.changes??[])});return n.siteVersions?{...P,menuItems:Vz()}:P}return Ep({live:s,onPress:g,busy:m,pinnedUnpublished:i?.unpublished??!1})}}function Vz(){return[{key:"version-history",label:l("Version history"),icon:Uz(qz),onSelect:Fk}]}import{jsx as j,jsxs as uo,Fragment as Rn}from"react/jsx-runtime";import{useCallback as Yz,useEffect as Xz,useId as Yk,useRef as Zz,useState as So}from"react";import{Avatar as Qz,Banner as Ln,Button as gr,ColoredBadge as Op,Dialog as Xk,Drawer as Jz,DropdownMenu as eW,FormField as Zk,iconButtonClasses as oW,Inline as Fp,Input as tW,ListRow as rW,Select as aW,SortableList as nW,Stack as An}from"efficient-shell/ui";import{EditIcon as sW,EyeIcon as Kk,MenuIcon as lW,MoreIcon as iW,PageIcon as Qk,RevertIcon as Vk,StylesIcon as cW}from"efficient-shell/icons/efficient";import{useScreenDocument as Jk}from"efficient-easel/screen/components/ScreenDocumentContext";var fW={page:Qk,menu:lW};function dW(e,o){return e.pages.find(t=>t.id===o)??e.pages[0]??null}function uW(e,o){let t=window.open("","_blank");if(t)try{t.opener=null}catch{}return e.preview(o).then(({url:r})=>{t&&!t.closed?t.location.href=r:window.open(r,"_blank","noopener,noreferrer")},r=>{throw t?.close(),r})}function pW({version:e,page:o,waiting:t,busy:r,error:a,onCancel:n,onConfirm:s,onPage:i}){let c=Yk();if(!e)return null;let d=e.kind==="draft_before_restore",m=e.number,x=Mk(e),u=d?l("Put your drafts back?"):o?l("Restore {page} from version {n}?",{page:o.name,n:m}):l("Restore version {n}?",{n:m}),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:m}):x?l("The whole website goes back to version {n} as a draft: {what}.",{n:m,what:x}):l("The whole website goes back to version {n} as a draft.",{n:m}),g=e.deletedPictures??0;return j(Xk,{open:!0,onClose:()=>{r||n()},size:"sm",title:u,footer:uo(Rn,{children:[j(gr,{variant:"secondary",onClick:n,disabled:r,children:l("Cancel")}),j(gr,{onClick:s,loading:r,disabled:r,children:l("Restore as draft")})]}),children:uo(An,{gap:4,children:[o&&e.pages.length>1?j(Zk,{label:l("Page"),htmlFor:c,children:j(aW,{id:c,value:o.id,options:e.pages.map(k=>({value:k.id,label:k.name})),onChange:i,disabled:r})}):null,j("p",{children:h}),j("p",{children:l("Your live website does not change until you press Publish.")}),g>0?j(Ln,{tone:"warning",children:Ze("{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.",g)}):null,t?j(Ln,{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,a?j(Ln,{tone:"danger",children:a}):null]})})}function mW({version:e,onCancel:o,onSave:t}){let r=Yk(),[a,n]=So(null),[s,i]=So(""),[c,d]=So(!1),[m,x]=So(null);if(e!==a&&(n(e),i(e?.name??""),x(null)),!e)return null;let u=s.trim()===e.name,h=async()=>{if(!(c||u)){d(!0),x(null);try{await t(s.trim())}catch{x(l("The name was not saved. Try again."))}finally{d(!1)}}};return j(Xk,{open:!0,onClose:()=>{c||o()},size:"sm",title:l("Name this version"),footer:uo(Rn,{children:[j(gr,{variant:"secondary",onClick:o,disabled:c,children:l("Cancel")}),j(gr,{onClick:()=>{h()},loading:c,disabled:c||u,children:l("Save")})]}),children:j(Zk,{label:l("Name"),htmlFor:r,hint:l("Named versions are always kept. Leave it empty to take the name away."),error:m??void 0,children:j(tW,{id:r,value:s,invalid:!!m,onChange:g=>i(g.target.value),onKeyDown:g=>{g.key==="Enter"&&h()}})})})}function xW({version:e,expanded:o,onToggle:t,onPreview:r,onRestore:a,onRestorePage:n,onName:s}){let i=e.kind==="draft_before_restore",c=!e.live,d=e.changes.length,m=[...i?[]:[{key:"preview",label:l("Preview"),icon:j(Kk,{}),onSelect:r}],...c?[{key:"restore",label:i?l("Put these drafts back"):l("Restore whole website"),icon:j(Vk,{}),onSelect:a}]:[],...c&&!i&&e.pages.length?[{key:"restore-page",label:l("Restore one page only"),icon:j(Qk,{}),onSelect:n}]:[],...i?[]:[{type:"divider",key:"divider"},{key:"name",label:l("Name this version"),icon:j(sW,{}),onSelect:s}]];return j(rW,{title:uo("span",{className:"sf-version-title",children:[j("span",{children:Nk(e)}),e.live?j(Op,{tone:"success",size:"xs",children:l("Live")}):null,e.name?j(Op,{tone:"neutral",size:"xs",children:l("Version {n}",{n:e.number})}):null,i?j(Op,{tone:"warning",size:"xs",children:l("Not published")}):null]}),expanded:o,onToggle:t,actions:j(eW,{align:"end","aria-label":l("More"),items:m,triggerClassName:oW({variant:"ghost",size:"sm"}),trigger:j(iW,{})}),below:uo(An,{gap:3,children:[uo(Fp,{gap:2,align:"center",wrap:!0,className:"sf-version-meta",children:[j(Qz,{name:e.createdBy,size:"xs"}),j("span",{children:e.createdBy}),j("span",{"aria-hidden":"true",children:"\xB7"}),j("span",{children:zk(e.createdAt)}),d?uo(Rn,{children:[j("span",{"aria-hidden":"true",children:"\xB7"}),j("span",{children:Ze("{n} change","{n} changes",d)})]}):null]}),o?uo(An,{gap:3,children:[d?j(An,{gap:2,children:e.changes.map(x=>{let u=fW[x.kind]??cW;return uo(Fp,{gap:2,align:"center",children:[j(u,{size:16}),j("span",{children:Hk(x)})]},`${x.kind}:${x.id}`)})}):null,uo(Fp,{gap:2,children:[i?null:j(gr,{variant:"secondary",size:"sm",leftIcon:j(Kk,{}),onClick:r,children:l("Preview")}),c?j(gr,{variant:"secondary",size:"sm",leftIcon:j(Vk,{}),onClick:a,children:l("Restore")}):null]})]}):null]})})}function hW({open:e,onClose:o,access:t,waiting:r}){let{flushSave:a,reloadFromServer:n,docId:s}=Jk(),[i,c]=So(null),[d,m]=So(!1),[x,u]=So(null),[h,g]=So(null),[k,P]=So(!1),[O,w]=So(null),[I,b]=So(null),[v,S]=So(!1),E=Zz(0),A=Yz(()=>{let _=++E.current;m(!1),t.list().then(T=>{_===E.current&&c(T)},()=>{_===E.current&&m(!0)})},[t]);Xz(()=>{e&&A()},[e,A]);let N=_=>{S(!1),uW(t,_.id).catch(()=>S(!0))},z=async()=>{if(!(!h||k)){P(!0),w(null);try{await _k({access:t,version:h.version,page:h.page,flushSave:a,reload:n}),g(null),o()}catch(_){w(_ instanceof On?l("Your last changes did not save, so nothing was restored. Try again."):l("The version was not restored. Nothing changed. Try again."))}finally{P(!1)}}};return uo(Rn,{children:[j(Jz,{open:e,onClose:o,side:"right",size:"md",title:l("Version history"),description:uo(Rn,{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:j("span",{className:"sf-version-foot",children:l("The newest 30 are kept. Named versions are always kept.")}),children:uo(An,{gap:3,children:[v?j(Ln,{tone:"danger",onDismiss:()=>S(!1),children:l("The preview did not open. Try again.")}):null,d?j(Ln,{tone:"danger",action:j(gr,{variant:"secondary",size:"sm",onClick:A,children:l("Try again")}),children:l("Version history did not load.")}):i===null?j("p",{className:"sf-version-foot",children:l("Loading versions")}):i.length===0?j("p",{className:"sf-version-foot",children:l("No versions yet. Every Publish from now on keeps one.")}):j(nW,{"aria-label":l("Versions"),spacing:"comfortable",children:i.map(_=>j(xW,{version:_,expanded:x===_.id,onToggle:()=>u(T=>T===_.id?null:_.id),onPreview:()=>N(_),onRestore:()=>{w(null),g({version:_,page:null})},onRestorePage:()=>{w(null),g({version:_,page:dW(_,s)})},onName:()=>b(_)},_.id))})]})}),j(pW,{version:h?.version??null,page:h?.page??null,waiting:r,busy:k,error:O,onCancel:()=>g(null),onConfirm:()=>{z()},onPage:_=>g(T=>T&&{...T,page:T.version.pages.find(R=>R.id===_)??T.page})}),j(mW,{version:I,onCancel:()=>b(null),onSave:async _=>{await t.name(I.id,_),b(null),A()}})]})}function ev(){let{adapter:e,hasUnsavedEdits:o}=Jk(),t=e.siteVersions,r=Ak(),a=ks();return t?j(hW,{open:r,onClose:Lk,access:t,waiting:o||a?.state==="changed"}):null}import{useEaselSession as h0}from"efficient-easel/screen/lib/session-context";import{buildPaletteSections as Hpe,categoryLabel as zpe,paletteWithoutPinned as Wpe,pinnedSection as Gpe}from"efficient-easel/screen/lib/document/palette-sections";var IW={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"},layouts:{label:"Layouts",icon:"layers"}};function ov(e){return IW[e]?.label}var tv=fp;import{currentEaselSession as gW}from"efficient-easel/screen/lib/session";var yW={general:!0,commerce:!0,service:!0};function Lp(e){let o=e?.sets;return o?Object.fromEntries(jw.map(t=>[t,o.includes(t)])):yW}function Kpe(e=gW()){return Lp(e.blocks)}import{currentEaselSession as hP}from"efficient-easel/screen/lib/session";var Ap="small",Rp="dot",bW=[{label:"Small",value:"small"},{label:"Display",value:"display"}],SW=[{label:"Dot \u25CF",value:"dot"},{label:"Cross \u2715",value:"cross"},{label:"Slash /",value:"slash"},{label:"Triangle \u25BC",value:"triangle"},{label:"None",value:"none"}],Xpe={dot:"\u25CF",cross:"\u2715",slash:"/",triangle:"\u25BC",none:""},CW={small:"font-mono text-[length:var(--size-label,14px)] uppercase tracking-[0.25em] max-[800px]:text-[length:var(--size-label,12px)]",display:"font-display font-medium text-[length:var(--size-headingMedium,44px)] uppercase leading-none tracking-[0.005em] max-[800px]:text-[length:var(--size-headingMedium,28px)]"},wW={small:{dot:"",cross:"text-[0.77em]",slash:"text-[0.77em]",triangle:"",none:""},display:{dot:"text-[0.3em]",cross:"text-[0.64em]",slash:"text-[0.64em]",triangle:"text-[0.3em]",none:""}};function Zpe(e){return oo(bW,Ap,e)}function rv(e){return oo(SW,Rp,e)}function Qpe(e){return CW[e]}function Jpe(e,o){return wW[e][o]}import{MOTION_EASING as kW,MOTION_TIMING as av,motionSeconds as nv}from"efficient-shell/format";var vW="none",TW=[{label:"None",value:"none"},{label:"Scroll",value:"scroll"}];function rme(e){return oo(TW,vW,e)}var ame={field:"loop",is:"scroll"},Bp="left",PW=[{label:"Left",value:"left",cell:"left"},{label:"Right",value:"right",cell:"right"},{label:"Up",value:"up",cell:"top"},{label:"Down",value:"down",cell:"bottom"}],EW={left:"storefront-ticker",right:"storefront-ticker-right",up:"storefront-ticker-up",down:"storefront-ticker-down"};function nme(e){return oo(PW,Bp,e)}function sme(e){return e==="up"||e==="down"}function lme(e){return nv("loop","duration",e.loopDuration!=null?e.loopDuration:e.speed)}var ime=av.loop.duration.default,OW=av.loop.delay.default;function cme(e){return nv("loop","delay",e.loopDelay)}function fme(e,o,t=OW){return`${EW[e]} ${o}s ${kW.loop}${t?` ${t}s`:""} infinite`}var sv=[{text:"Ticker item"},{text:"Ticker item"},{text:"Ticker item"},{text:"Ticker item"}],mme={label:"Scrolling Bar",defaultProps:{items:[],tone:"scrim",borders:!0,size:Ap,separator:Rp,scrollDirection:Bp}};var lv=()=>[{text:l("Spec label"),tone:"normal"},{text:l("Spec value"),tone:"muted"},{text:l("Spec label"),tone:"normal"},{text:l("Spec value"),tone:"muted"}],Ime={label:"Spec Strip",defaultProps:{cells:[{text:"",tone:"normal"},{text:"",tone:"normal"}],fill:"dark"}};var Pi={direction:"column",justify:"between",gap:14,sectionPaddingLeft:14,sectionPaddingRight:14,sectionPaddingLeftPhone:0,sectionHeightMode:"fixed",sectionHeightValue:280,sectionHeightUnit:"px",sectionHeightModePhone:"auto"},Bn={name:"Year and title",direction:"column",gap:14};var _n={direction:"row",share:"content",align:"center"},Dn={top:16,bottom:16,topPhone:12,bottomPhone:12},Ei={wrap:"nowrap",gap:128,separator:"dot",sectionBorder:{top:1,bottom:1}},Oi={textStyle:"body-5",letterSpacing:.25,case:"upper",lineHeight:1.5},iv={textStyle:"heading-3",letterSpacing:.005,case:"upper",lineHeight:1},Nn={top:16,bottom:16,topPhone:12,bottomPhone:12},Fi={justify:"between",wrap:"wrap",gap:32,separator:"none"},Mn={textStyle:"body-5",letterSpacing:.1,case:"upper",lineHeight:1.5};function J(e,o,t,r={}){return{type:e,props:{...o(e),id:t(e),...r}}}function cv(e,o,t){return J(ee,e,o,{...t,sectionPaddingTop:void 0,sectionPaddingBottom:void 0})}var dv={Manifesto:(e,o)=>({type:ee,props:{...e(ee),id:o(ee),direction:"row",share:"equal",sectionHeightMode:"screen",name:"Brand Text",content:[J(ee,e,o,{direction:"column",justify:"center",blockSpacing:"gap",name:"Text",sectionPaddingTop:100,sectionPaddingBottom:100,sectionPaddingLeft:40,sectionPaddingRight:40,content:[J("Text",e,o,Do()),J("Text",e,o,bo()),J("Text",e,o),J("Stats",e,o)]}),cv(e,o,{direction:"column",name:"Picture",content:[]})]}}),Split:(e,o)=>({type:ee,props:{...e(ee),id:o(ee),direction:"row",share:"equal",sectionHeightMode:"screen",sectionHeightValue:70,name:"Image & Text Split",content:[J(ee,e,o,{direction:"column",justify:"center",blockSpacing:"gap",name:"Text",sectionPaddingTop:100,sectionPaddingBottom:100,sectionPaddingLeft:60,sectionPaddingRight:60,content:[J("Text",e,o,Do()),J("Text",e,o,bo()),J("Text",e,o),J("ButtonBlock",e,o)]}),cv(e,o,{direction:"column",name:"Image",content:[J("ImageBlock",e,o)]})]}}),Subscribe:(e,o)=>({type:ee,props:{...e(ee),id:o(ee),direction:"column",name:"Subscribe",content:[J("Text",e,o,bo()),J("Text",e,o),J("Form",e,o)]}}),Ticker:(e,o)=>fv("Scrolling Bar",Ei,Dn,sv.map(t=>({text:t.text,style:Oi,muted:!0})),e,o),SpecStrip:(e,o)=>fv("Spec Strip",{...Fi,sectionBorder:{top:1}},Nn,lv().map(t=>({text:t.text??"",style:Mn,muted:t.tone==="muted"})),e,o),TimelineTrack:(e,o)=>{let t=r=>J(ee,e,o,{...Pi,name:"Year",sectionPaddingTop:0,sectionPaddingBottom:0,...r?{upcoming:!0}:{},content:[J(ee,e,o,{...Bn,sectionPaddingTop:0,sectionPaddingBottom:0,content:[J("Text",e,o,Do()),J("Text",e,o,bo())]}),J("Text",e,o)]});return{type:ee,props:{...e(ee),id:o(ee),direction:"column",gap:48,name:"Milestone Timeline",content:[J(ee,e,o,{direction:"row",align:"end",justify:"between",share:"content",name:"Heading",content:[J("Text",e,o,Do()),J("Text",e,o,bo()),J("Text",e,o)]}),J(ee,e,o,{direction:"row",share:"equal",gap:0,line:!0,name:"Years",content:[t(!1),t(!1),t(!0)]}),J("ButtonBlock",e,o)]}}},Timeline:(e,o)=>{let t=()=>J(ee,e,o,{direction:"row",share:"biggerRight",gap:24,name:"Chapter",content:[J("Text",e,o,Do()),J(ee,e,o,{direction:"column",gap:12,name:"Words",content:[J("Text",e,o,bo()),J("Text",e,o)]})]});return{type:ee,props:{...e(ee),id:o(ee),direction:"row",share:"bigRight",gap:48,name:"Story Timeline",content:[J(ee,e,o,{direction:"column",gap:24,name:"Heading",content:[J("Text",e,o,Do()),J("Text",e,o,bo()),J("Text",e,o),J("ImageBlock",e,o),J("ButtonBlock",e,o)]}),J(ee,e,o,{direction:"column",gap:48,line:!1,name:"Chapters",content:[t(),t(),t()]})]}}}};function fv(e,o,t,r,a,n){return J(ee,a,n,{..._n,...o,blockSpacing:"gap",padV2:!0,name:e,sectionPaddingTop:t.top,sectionPaddingBottom:t.bottom,sectionPaddingTopPhone:t.topPhone,sectionPaddingBottomPhone:t.bottomPhone,content:r.map(s=>J("Text",a,n,{text:s.text,...s.muted?{tone:"dim"}:{},_partStyles:{text:s.style}}))})}function uv(e){return dv[e]??null}import{phoneKey as DW}from"efficient-easel/draw";var pv={label:"Button",defaultProps:{label:"",href:"#",variant:"primary",align:"left",contained:!0}};var mv={label:"Text",defaultProps:{text:"",align:"left",tone:"default",tag:"p",contained:!0}};import{jsx as LW}from"react/jsx-runtime";function Li(e){return`color-mix(in srgb, var(--overlay-scrim) ${Math.round(Math.min(1,Math.max(0,e))*1e3)/10}%, transparent)`}var Ame="sf-card",xv={min:0,max:100,step:5,fallback:0,unit:"%"},Rme=[{label:"Even",value:"even"},{label:"From the bottom",value:"bottom"}],FW="68%",Bme={desktop:20,phone:20,side:40,sidePhone:24},_me="sf-box-sides";function hv(e){return typeof e=="string"&&e.trim()!==""}function Dme(e,o){let t=typeof e=="number"?e:Number.parseFloat(String(e??""));if(!Number.isFinite(t)||t<=0)return null;let r=(Math.min(xv.max,Math.max(xv.min,t))/100).toFixed(2);return o!=="bottom"?{background:Li(Number(r))}:{background:`linear-gradient(0deg, ${Li(Number(r))} 0%, ${Li(0)} ${FW})`}}function Nme(e,o){let t={"top-left":["start","start"],"top-center":["center","start"],"top-right":["end","start"],left:["start","center"],center:["center","center"],right:["end","center"],"bottom-left":["start","end"],"bottom-center":["center","end"],"bottom-right":["end","end"]},[r,a]=t[e]??t.center,[n,s]=o==="column"?[a,r]:[r,a],i={start:"justify-start",center:"justify-center",end:"justify-end"},c={start:"items-start",center:"items-center",end:"items-end"};return`${i[n]} ${c[s]}`}var Ai={ParagraphsA:{top:60,bottom:80},StatsParagraph:{top:120,bottom:120},Timeline:{top:120,bottom:120},Footprint:{top:120,bottom:120},TimelineTrack:{top:120,bottom:120},TitleWithButtons:{top:140,bottom:140},ProcessSteps:{top:120,bottom:120},DetailRows:{top:100,bottom:100}},Iv=new Set(Object.keys(Ai)),yv=new Set(["Flex","Text","Heading"]),AW=new Set(["Divider"]),RW=new Set(["Hero","HeroSingle","IntroBleed","CategoryBar","DocTabs"]),gv=new Set(["ProductGrid"]);function _p(e,o,t=!1){let r=e.render;e.render=a=>{if(o?.(a))return r(a);let n=As(zI(a,vf,t)),s=r(a),i=YI(a);return n?LW("div",{className:i?`${n.className} ${i}`:n.className,style:n.style,children:s}):s}}var Ume={name:"sectionPadding",applies:(e,o,t)=>o.isSection(e)&&!RW.has(e)&&!!t&&typeof t.render=="function",panel(e,o,t){Iv.has(o)||gv.has(o)||(e.fields={...e.fields,...t.sidesPaddingFields()})},draw(e,o){if(Iv.has(o)){let t=e.render,r=Ai[o];e.render=a=>{let n=Rs(a,r);return t({...a,padTop:n.top,padBottom:n.bottom})};return}if(gv.has(o)){_p(e);return}yv.has(o)||AW.has(o)||_p(e,o==="Flex"?t=>hv(t.bgImage):void 0,!0)}},BW=["Heading","Text"],_W=["LogoBlock"],$me={name:"blockPadding",applies:(e,o,t)=>(BW.includes(e)||_W.includes(e))&&!!t&&typeof t.render=="function",panel(e,o,t){e.fields={...e.fields,...t.sidesPaddingFields()}},draw(e,o){yv.has(o)||_p(e,void 0,!0)}};var{text:txe,tag:rxe,...NW}=mv.defaultProps,se=NW,Ce={...se,tone:"dim"},{label:axe,href:nxe,...MW}=pv.defaultProps,po=MW,yr={buttonFillOpacity:0,buttonBorder:{width:0},buttonPaddingTop:0,buttonPaddingRight:0,buttonPaddingBottom:0,buttonPaddingLeft:0},bv={justify:"start",align:"stretch",wrap:!1,blockSpacing:"gap",padV2:!0},H={...bv,direction:"column",...Na},he={...bv,sectionAccent:0},ge=["gridSpan","sectionHeightMode","sectionHeightValue","sectionHeightUnit","sectionHeightModePhone","sectionHeightValuePhone","sectionHeightUnitPhone","sectionCorners","sectionCornerSides","sectionBorder","sectionBorderPhone","sectionAccent","stickTop","stickTopDistance","stickTopPhone","stickTopDistancePhone","anchor","sectionAnimation","_hidden",...Object.values(Se).flatMap(e=>[e,DW(e)]),"widthFit","widthFitPhone","width","widthPhone","minWidth","minWidthPhone","maxWidth","maxWidthPhone"],ga="a section width key, ignored since efficient-web-builder 45 (every section, and a section's root Box, follows Site styles only; Lewis 2026-10-29), so dropping it changes nothing",ve={sectionSurface:"read by nothing in src/ (searched 2026-10-24): a retired theme key that draws nothing today, so dropping it changes nothing",widthMode:ga,fullWidth:ga,pageWidth:ga,backgroundWidth:ga,contentWidth:ga,contentMax:ga},Ee=Object.fromEntries(["sectionPaddingLeft","sectionPaddingRight","sectionPaddingLeftPhone","sectionPaddingRightPhone"].map(e=>[e,"needs Box side padding outside its gutter: the old section added it outside its frame, a Box's side padding replaces the gutter. 0 live nodes store it (JJ's read-only export, 2026-10-24)"]));function Fe(e,o){let t=$(e.sectionPaddingTop)??0,r=$(e.sectionPaddingBottom)??0;return{sectionPaddingTop:t+o.top,sectionPaddingBottom:r+o.bottom,sectionPaddingTopPhone:($(e.sectionPaddingTopPhone)??t)+o.topPhone,sectionPaddingBottomPhone:($(e.sectionPaddingBottomPhone)??r)+o.bottomPhone}}var Je=e=>["sectionPaddingTop","sectionPaddingBottom","sectionPaddingTopPhone","sectionPaddingBottomPhone"].map(o=>[o,o,(t,r)=>Fe(r,typeof e=="function"?e(r):e)[o]]);function ao(e,o){let t=Rs(e,Ai[o]);return{sectionPaddingTop:t.top,sectionPaddingBottom:t.bottom}}var zt=e=>[["padTop","sectionPaddingTop",(o,t)=>ao(t,e).sectionPaddingTop],["padBottom","sectionPaddingBottom",(o,t)=>ao(t,e).sectionPaddingBottom],["sectionPaddingTop","sectionPaddingTop",(o,t)=>ao(t,e).sectionPaddingTop],["sectionPaddingBottom","sectionPaddingBottom",(o,t)=>ao(t,e).sectionPaddingBottom]],HW={kind:"heading-case-upper",styles:["heading-1","heading-2","heading-3"]},xt=e=>o=>Ko(o.props[e])?[HW]:[],Te=(e,o)=>({kind:"text",key:e,role:"eyebrow",props:se,...o?{style:o}:{}}),Sv=e=>e.background!=="transparent",ya=(e,o)=>typeof e=="number"&&Number.isInteger(e)&&e>=0?e:Tn(o)?.selected??0,br=(e,o)=>{let t=Tn(o)?.themes;return t&&Sv(e)?Am(t,ya(e.sectionAccent,o)):-1},Ri=(e,o,t)=>{let r=br(o,t);return r>=0?r:e},Dp=(e,o)=>{let t=br(e,o);return t>=0?{sectionAccent:t}:{}},Bi=(e,o)=>Sv(e.props)&&br(e.props,o)<0?[{kind:"band-preset",page:ya(e.props.sectionAccent,o)}]:[];import{jsx as ba,Fragment as lG,jsxs as Up}from"react/jsx-runtime";import{jsx as Wp,jsxs as rG}from"react/jsx-runtime";import{jsx as zW}from"react/jsx-runtime";function Cv(){return zW("span",{className:"block h-px w-[30px] bg-current"})}import{jsx as we,jsxs as zp}from"react/jsx-runtime";import{Fragment as Lv}from"react";import{parseHexColor as VW}from"efficient-shell/format";import{Fragment as qW,jsx as Mp}from"react/jsx-runtime";import{Fragment as wv,jsx as Hn,jsxs as WW}from"react/jsx-runtime";import{createContext as Np,useContext as zn,useId as GW,useMemo as UW}from"react";var _i=Np(null),kv=Np(null),vv=Np(null);function pxe({needles:e,styles:o,type:t,children:r}){let a=GW(),n=JSON.stringify([a,e,o,t]),s=UW(()=>nb(e,o,a,i=>Vl(t,i),i=>ab(t,i)),[n]);return s?WW(wv,{children:[Hn("style",{href:`${$W}${a}-${jW(Pd(s))}`,precedence:Tv,dangerouslySetInnerHTML:{__html:Pd(s).replace(/</g,"\\3c ")}}),Hn(_i.Provider,{value:s,children:r})]}):Hn(wv,{children:r})}var Tv="sf-part-styles",$W=`${Tv}-`;function jW(e){let o=2166136261;for(let t=0;t<e.length;t+=1)o^=e.charCodeAt(t),o=Math.imul(o,16777619);return(o>>>0).toString(36)}function Pv(e){let o=zn(_i),t=zn(kv),r=sb(o,e);return r&&r.stamp!==t?r:null}function mxe(e){return Td(zn(_i),e)}function Ev({stamp:e,children:o}){return Hn(kv.Provider,{value:e,children:o})}function xxe({children:e}){let o=zn(_i);return Hn(vv.Provider,{value:o,children:e})}function hxe(e){return Td(zn(vv),e)}function Wn({value:e,children:o}){let t=Pv(e);return t?Mp(Ev,{stamp:t.stamp,children:Mp("span",{[bd]:t.stamp,...t.textStyle?{[Xr]:t.textStyle}:{},children:o})}):Mp(qW,{children:o})}import{jsx as Hp,Fragment as KW}from"react/jsx-runtime";function Ov({className:e=""}){return Hp("sup",{className:`text-accent tracking-normal text-[length:min(1em,max(0.75em,11px))] ${e}`,children:"\xAE"})}function Di(e){if(!e.includes("\xAE"))return e;let o=e.split("\xAE"),t=[];return o.forEach((r,a)=>{r&&t.push(r),a<o.length-1&&t.push(Hp(Ov,{},`r${a}`))}),Hp(KW,{children:t})}var wxe=Ov;function Sr(e,o=!1){let t=tG(o),r=Qc(e);if(r.length===1){let[n]=r,s=Zc(n),i=s?eG(s,n.children):n.children;return we(Wn,{value:e,children:Ni(i,t)})}let a=[];return r.forEach((n,s)=>{if(n.bullet){a.push(we("span",{"data-sf-bullet":"",className:YW,children:Ni(n.children,t)},s));return}if(n.number!=null){a.push(zp("span",{"data-sf-number":n.number,className:XW,children:[zp("span",{className:ZW,children:[n.number,"."]}),Ni(n.children,t)]},s));return}s>0&&!QW(r[s-1])&&a.push(we("br",{},`br${s}`)),a.push(we(Lv,{children:Ni(n.children,t)},s))}),we(Wn,{value:e,children:a})}var YW="relative block pl-6 before:absolute before:left-1.5 before:font-bold before:text-accent before:content-['\xB7']",XW="relative block pl-[2em]",ZW="absolute left-0 w-[1.6em] text-right tabular-nums";function QW(e){return e.bullet||e.number!=null}var JW="text-accent underline underline-offset-[0.18em]";function eG(e,o){let[t,...r]=o;return t?.kind==="text"?[{kind:"text",text:`${e}${t.text}`},...r]:[{kind:"text",text:e},...o]}function oG(e){if(e)return VW(e)===e.toLowerCase()?e:Object.hasOwn(ot,e)?ot[e]:void 0}function Ni(e,o){let t=[],r=!1;return e.forEach((a,n)=>{if(a.kind==="text"){t.push(we("span",{children:Di(a.text)},n)),r=!0;return}r||t.push(we("span",{},`e${n}`)),t.push(Av(a,n,o)),r=!1}),r||t.push(we("span",{},"end")),t}function Fv(e,o){return e.length===1&&e[0].kind==="text"?Di(e[0].text):e.map((t,r)=>t.kind==="text"?we(Lv,{children:Di(t.text)},r):Av(t,r,o))}function tG(e){return e?"font-normal italic text-accent":"not-italic text-accent"}function Axe(e){return we(Wn,{value:e,children:we("span",{children:e})})}function Av(e,o,t){if(e.kind==="link")return we("a",{href:e.href,className:JW,children:Fv(e.children,t)},o);let r=Fv(e.children,t),a=Ch[e.kind];if(a)return we("span",{[wh]:a,children:r},o);switch(e.kind){case"underline":return we("u",{children:r},o);case"sup":return we("sup",{children:r},o);case"sub":return we("sub",{children:r},o);case"color":{let n=oG(e.color);return n?we("span",{style:{color:n},children:r},o):we("span",{children:r},o)}case"accent":case"highlight":return we("em",{className:t,children:r},o);case"bold":return we("strong",{className:"font-semibold",children:r},o);case"italic":return we("em",{className:"italic",children:r},o);case"strike":return we("s",{className:"line-through",children:r},o);default:return we("span",{children:r},o)}}function Rv(e,o=!0){let t=e.split(`
|
|
21
|
+
`);return we(Wn,{value:e,children:t.map((r,a)=>zp("span",{children:[Sr(r,o),a<t.length-1?we("br",{}):null]},a))})}function Bv(e){return e.split(/\n\s*\n/).map(o=>o.trim()).filter(Boolean)}var Gp={labelUpTo800:"max-[800px]:text-[length:var(--size-label,12px)]",labelSmall:"text-[length:var(--size-label,12px)]",labelLarge:"text-[length:var(--size-label,14px)]"};function aG(e,o){return`font-mono text-[length:var(--size-label,${e}px)] uppercase tracking-[0.3em] text-accent`}var nG=`inline-block w-fit bg-accent px-3.5 py-1.5 font-mono ${Gp.labelSmall} font-semibold uppercase tracking-[0.16em] text-bg`,sG=`flex items-center gap-3.5 font-mono ${Gp.labelLarge} uppercase tracking-[0.3em] opacity-80 ${Gp.labelUpTo800} max-[800px]:tracking-[0.25em]`;function _v({text:e,look:o="plain",size:t=13,scaled:r=!0,className:a="",classNameAfter:n=""}){if(o==="line")return rG("div",{className:[a,sG,n].filter(Boolean).join(" "),children:[Wp(Cv,{}),Wp("span",{children:Sr(e)})]});let s=o==="filled"?nG:aG(t,r);return Wp("span",{className:[a,s,n].filter(Boolean).join(" "),children:Sr(e)})}var Mi={headingMediumUpTo800:"max-[800px]:text-[length:min(var(--size-headingMedium,32px),var(--sf-heading-max,9999px))]",headingMedium:"text-[length:min(var(--size-headingMedium,44px),var(--sf-heading-max,9999px))]",body:"text-[length:var(--size-body,15px)]",headingSmall:"text-[length:var(--size-headingSmall,20px)]"},iG="mx-auto max-w-[var(--sf-site-width,1600px)] px-[var(--sf-site-gutter,40px)] py-[72px] max-[960px]:px-[min(24px,var(--sf-site-gutter,40px))]",cG="mx-auto max-w-[var(--sf-site-width,1600px)] px-[var(--sf-site-gutter,40px)] pt-0 pb-[72px] max-[960px]:px-[min(24px,var(--sf-site-gutter,40px))]";function $p(e){return Math.min(4,Math.max(2,e??3))}function Gxe({look:e,eyebrow:o,title:t,items:r,columns:a,omitHead:n=!1,editing:s=!1}={}){let i=$p(a),c=(r??[]).filter(m=>s||(m.title??"").trim()||(m.body??"").trim()),d=!!(o??"").trim()||!!(t??"").trim();return!s&&!d&&c.length===0?null:ba("section",{className:"relative z-[2] bg-surface",children:Up("div",{className:n?cG:iG,children:[n?null:Up(lG,{children:[(o??"").trim()&&ba(_v,{text:o??"",look:e,className:"mb-4 block"}),(t??"").trim()&&ba("h2",{className:`mb-9 font-heading2 ${Mi.headingMedium} font-medium uppercase leading-none tracking-[-0.02em] text-fg max-[800px]:mb-7 ${Mi.headingMediumUpTo800}`,children:Rv(t??"",!1)})]}),c.length>0&&ba("div",{className:"sf-card grid grid-cols-1 gap-px border border-line bg-line min-[700px]:[grid-template-columns:repeat(var(--cd-cols),minmax(0,1fr))]",style:{"--cd-cols":String(i)},children:c.map((m,x)=>{let u=(m.title??"").trim()||(s?l("Card title"):""),h=(m.body??"").trim()||(s?l("A short line about this card."):"");return Up("div",{className:"bg-bg p-8 max-[800px]:p-7",children:[u&&ba("div",{className:`mb-3 font-heading3 ${Mi.headingSmall} font-medium uppercase tracking-[0.02em] text-fg`,children:Sr(u)}),h&&ba("p",{className:`${Mi.body} leading-[1.6] text-fg-dim`,children:Sr(h)})]},x)})})]})})}var $xe={eyebrow:"Label",title:"Section *heading.*"},Dv={label:"Cards",defaultProps:{eyebrow:"",title:"",items:[],columns:3}};var Kxe={eyebrow:"Highlight",title:"Key *features.*"},Vxe=()=>[{label:l("Feature label one")},{label:l("Feature label two")},{label:l("Feature label three")},{label:l("Feature label four")},{label:l("Feature label five")},{label:l("Feature label six")}],Nv={label:"Key Features",defaultProps:{eyebrow:"",title:"",items:[],columns:3}};function qp(e){if(e==="ProductGrid")return"shelf";let o=Qe[e]?.headStyle;return o==="editorial"||o==="simple"||o==="essay"?o:"standard"}var zv={standard:64,editorial:60,simple:36,essay:28,shelf:20},fG={SectionHeader:"accent",FAQ:"accent",FitmentFinder:"accent",FitmentTable:"accent",SpecTable:"accent",RelatedProducts:"accent",Collections:"accentNum"};function dG(e){if(e==="SectionHeader")return{num:"num",title:"title",description:"description",link:!0};let o=Qe[e];if(!o)throw new Error(`section-head-looks: "${e}" has no head row in SPLITTABLE_SECTIONS`);return{num:o.num,title:o.title,description:o.description,link:o.headRows.includes("linkText")&&o.headRows.includes("linkHref")}}function Wv(e,o,t){let r=`editorial:${e}|${o}|${t}`,a=Hi.get(r);if(a)return a;let n=$v({num:e,title:o,description:t,link:!1});return Hi.set(r,n),n}var Kp={top:0,right:0,bottom:1,left:0},Xe=(e,o,t,r)=>({sizeToken:{step:e,px:o,...r?{stepPhone:r}:{},...t?{pxPhone:t}:{}}}),Gv=(e,o,t,r)=>({sizeToken:{step:e,px:r,fluid:{minPx:o,vw:t}}}),zi=(e,o,t={})=>Te(e,{...Xe("label",o),...t}),Wi=(e,o)=>({kind:"text",key:e,role:"heading",props:se,style:{textStyle:"heading-2",...o}}),Vp=(e,o,t,r)=>({kind:"text",key:e,props:{...Ce,align:"right",maxWidth:t},style:{textStyle:"body-5",fontRole:"heading",...Xe("body",o),...r}}),Uv={...po,align:"right",...yr,icon:"arrow-right",iconPosition:"after"},jp=e=>({kind:"button",key:"linkText",href:"linkHref",variant:"ghost",props:Uv,style:{textStyle:"body-5",color:"labels",...Xe("label",e),letterSpacing:.2,case:"upper"}}),Mv=(e,o,t)=>{let r=t.role==="heading"?{tag:"h2"}:{};return{kind:"block",type:"Text",when:a=>a[e]===void 0,props:{...se,...r,...t.props,text:o,_partStyles:{text:{...t.role==="eyebrow"?uG(Do()):{},...t.style}}}}},uG=e=>e._partStyles.text??{};function pG(e,o){let t=fG[e],r=t==="accent",a=zi(o.num,14,{color:r?"accent":"labels"}),n=t==="accentNum"&&a.kind==="text"?{...a,mark:"accentLead"}:a,s=Wi(o.title,r?{...Gv("headingMedium",36,5,64),case:"upper",lineHeight:.95,letterSpacing:-.025}:{...Xe("headingMedium",56,36),case:"none",lineHeight:1,letterSpacing:-.03}),i=e==="Collections";return{kind:"group",name:"Header",props:{...H,direction:"row",align:"end",justify:"between",gap:40,share:"content",sectionBorder:Kp,sectionPaddingBottom:24,sectionPaddingBottomPhone:20},parts:[{kind:"group",name:"Title",props:{...H,direction:"row",align:"end",gap:40,share:"content"},parts:[{kind:"group",name:"Number",props:{...H,align:"start",gap:12},parts:[{kind:"image",key:"logoSrc",alt:"logoAlt",props:{aspect:"auto",contained:!1}},n,...i?[Mv(o.num,"==01== / Collections",n)]:[]]},s,...i?[Mv(o.title,`Three ranges,
|
|
22
|
+
one standard.`,s)]:[]]},{kind:"group",name:"Words",props:{...H,align:"end",gap:12},parts:[...o.description?[Vp(o.description,14,340,{lineHeight:1.5})]:[],...o.link?[jp(14)]:[],...i?[{kind:"block",type:"ButtonBlock",props:{...Uv,variant:"ghost",label:"View all",href:"/wheels",_partStyles:{label:jp(14).style}}}]:[]]}]}}function $v(e){return{kind:"group",name:"Header",props:{...H,direction:"row",align:"end",justify:"between",gap:40,share:"content",sectionBorder:Kp,sectionPaddingBottom:32},parts:[{kind:"group",name:"Title",props:{...H,direction:"row",align:"end",gap:40,share:"content"},parts:[{kind:"group",name:"Number",props:{...H,sectionPaddingBottom:8},parts:[zi(e.num,13)]},Wi(e.title,{...Gv("headingMedium",40,5.5,80),case:"upper",weight:500,lineHeight:1,letterSpacing:-.03})]},{kind:"group",name:"Words",props:{...H,align:"end",sectionPaddingBottom:4},parts:e.description?[Vp(e.description,14,360,{lineHeight:1.5})]:[]}]}}function Hv(e,o){return{kind:"group",name:"Header",props:{...H,gap:16},parts:[zi(e.num,13),Wi(e.title,o)]}}var jv=[["para",{textStyle:"body-5",...Xe("label",13),case:"upper",weight:400,lineHeight:1,letterSpacing:.22}],["sm",{...Xe("headingMedium",40,28),case:"none",weight:500,lineHeight:1,letterSpacing:-.03}],["md",{...Xe("headingMedium",48,32),case:"none",weight:500,lineHeight:1,letterSpacing:-.03}],["lg",{...Xe("headingMedium",56,36),case:"none",weight:500,lineHeight:1,letterSpacing:-.03}],["xl",{...Xe("headingMedium",64,40),case:"none",weight:500,lineHeight:1,letterSpacing:-.03}]],mG=e=>jv.some(([o])=>o===e.titleSize)?e.titleSize:"lg";function xG(e){return{kind:"group",name:"Header",props:{...H,direction:"row",align:"center",justify:"between",gap:16,share:"content",stickTop:!0,sectionBorder:Kp,sectionPaddingTop:12,sectionPaddingBottom:12},parts:[{kind:"group",name:"Title",props:{...H,direction:"row",align:"end",gap:24,share:"content"},parts:[zi(e.num,13,{color:"labels",letterSpacing:.22,lineHeight:1}),...jv.map(([o,t])=>({...Wi(e.title,t),when:r=>mG(r)===o}))]},{kind:"group",name:"Words",props:{...H,direction:"row",align:"center",justify:"end",gap:20,share:"content"},parts:[...e.description?[Vp(e.description,13,340,{lineHeight:1.4})]:[],...e.link?[jp(13)]:[]]}]}}var Hi=new Map;function Vo(e){let o=Hi.get(e);if(o)return o;let t=dG(e),r=qp(e),a=r==="editorial"?$v(t):r==="simple"?Hv(t,{...Xe("headingMedium",44,32),case:"upper",weight:500,lineHeight:1,letterSpacing:-.02}):r==="essay"?Hv(t,{...Xe("headingMedium",38,28,"headingSmall"),case:"upper",lineHeight:1,letterSpacing:-.02}):r==="shelf"?xG(t):pG(e,t);return Hi.set(e,a),a}var ht=(e,o,t,r)=>({sectionBorder:{top:e,right:o,bottom:t,left:r}}),Jv=(e,o=e)=>({sectionPaddingTop:e,sectionPaddingRight:e,sectionPaddingBottom:e,sectionPaddingLeft:e,sectionPaddingTopPhone:o,sectionPaddingRightPhone:o,sectionPaddingBottomPhone:o,sectionPaddingLeftPhone:o}),eT=e=>o=>$p($(o.columns)??$(e.columns)),Yp=e=>({kind:"group",name:"Grid",props:{...H,gap:0,...ht(1,0,0,1)},parts:[e]}),Gi={...H,direction:"row",gap:0,share:"equal"},oT="its head sits in a Box of its own above it (own-box): the row draws the head inline",tT=e=>Qw(e.headPlacement)==="own-box",rT="inline is the head the row draws; an own-box node is skipped (`skip`)",hG=e=>({kind:"group",name:"Heading",props:e,parts:[Te("eyebrow"),{kind:"text",key:"title",role:"heading",props:se,style:{textStyle:"heading-3"},was:{size:44}}]}),qv={top:72,bottom:72,topPhone:72,bottomPhone:72},IG={...H,gap:12,...Jv(32,28),...ht(0,1,1,0)},gG={name:"Cards",boxProps:e=>({...he,direction:"column",gap:36,...Fe(e,qv)}),box:[...ge,...Je(qv)],skip:e=>tT(e)?oT:typeof e.dataSource=="string"&&e.dataSource?"its cards come from a source: a data list, which waits for the card template on Cards":e.cardStyle==="label-only"?"Label only is Key Features' look: no live node holds it, so it has no row of its own yet":void 0,parts:[Vo("Cards"),Yp({kind:"list",key:"items",name:"Card",perRow:eT(Dv.defaultProps),rowName:"Row",rowProps:Gi,props:IG,parts:[{kind:"text",key:"title",props:se,style:{textStyle:"heading-3"},was:{size:20}},{kind:"text",key:"body",props:Ce,style:{textStyle:"body-1"},was:{size:15}}]})],site:xt("title"),drop:{...ve,...Ee,columns:"the rows of N: one Row Box per `columns` cards, which the Box draws as N equal blocks",cardStyle:"the standard card is what the row draws; a Label only node is skipped (0 live nodes)",dataSource:"an empty source is typed cards, what the row draws; a sourced node is skipped (0 live nodes)",dataSourceOptions:"read only with a source; a sourced node is skipped (0 live nodes)",headPlacement:rT,eyebrowLook:"needs the eyebrow's Filled look on a Text block: Plain is the eyebrow start look the row draws; 2 of 62 live nodes store it (JJ's export, 2026-10-24)"}},Kv={top:76,bottom:76,topPhone:76,bottomPhone:76},yG={...H,direction:"row",align:"center",gap:16,sectionPaddingTop:32,sectionPaddingRight:28,sectionPaddingBottom:32,sectionPaddingLeft:28,...ht(0,1,1,0)},Vv={textStyle:"body-1",color:"text"},Yv=(e,o)=>typeof o?.href=="string"&&o.href.trim()!=="",bG={name:"Key Features",boxProps:e=>({...he,direction:"column",gap:44,...ht(1,0,1,0),...Fe(e,Kv)}),box:[...ge,...Je(Kv)],parts:[hG({...H,direction:"row",align:"end",gap:20,wrap:!0,share:"content"}),Yp({kind:"list",key:"items",name:"Feature",perRow:eT(Nv.defaultProps),rowName:"Row",rowProps:Gi,props:yG,parts:[{kind:"button",key:"label",href:"href",when:Yv,variant:"ghost",props:{...po,...yr,icon:"none"},style:Vv},{kind:"text",key:"label",when:(e,o)=>!Yv(e,o),props:se,style:Vv,was:{size:17}}]})],site:xt("title"),drop:{...ve,...Ee,columns:"the rows of N: one Row Box per `columns` cells, which the Box draws as N equal blocks",eyebrowLook:"needs the eyebrow's Filled look on a Text block: Filled is Key Features' own default (lib/sections/section-eyebrow-look), so 20 of 21 published nodes draw it with nothing stored; the row draws the Plain start look (JJ's export, 2026-10-24)"}},Xv={top:120,bottom:120,topPhone:80,bottomPhone:80},SG={...H,gap:16,sectionPaddingTop:36,sectionPaddingRight:28,sectionPaddingBottom:32,sectionPaddingLeft:28,...ht(0,1,1,0)},Zv={...H,direction:"row",justify:"between",gap:12,share:"content"},CG={name:"Recurring Columns",boxProps:e=>({...he,direction:"column",gap:60,...ht(0,0,1,0),...Fe(e,Xv)}),box:[...ge,...Je(Xv)],skip:e=>tT(e)?oT:void 0,parts:[Vo("Series"),Yp({kind:"list",key:"cards",name:"Column",perRow:()=>4,rowName:"Row",rowProps:Gi,props:SG,parts:[{kind:"group",name:"Top",props:Zv,parts:[Te("num"),Te("since")]},{kind:"text",key:"title",props:{...se,tag:"h3"},style:{textStyle:"heading-3"},was:{size:28}},{kind:"text",key:"desc",props:Ce,style:{textStyle:"body-5"},was:{size:14}},{kind:"group",name:"Footer",props:{...Zv,justify:"start",align:"center",gap:8,sectionPaddingTop:16,...ht(1,0,0,0)},parts:[Te("entries",{color:"text"}),Te("entriesLabel",{color:"labels"})]}]})],site:xt("headTitle"),drop:{...ve,...Ee,headPlacement:rT,viewLabel:"the ONE label every card's footer repeated: a block per card would be N copies of one words. Empty on every live node (3 of 3 store it hidden or empty, JJ's export, 2026-10-24)",background:"needs a Box background ink (the section stores a theme token, `var(--section-bg)` on 3 of 3 live nodes): the Box's theme draws its background"}},Qv={top:60,bottom:60,topPhone:40,bottomPhone:40},wG={...H,gap:8,...Jv(24),...ht(1,1,1,1)},kG={name:"Document Detail Cards",boxProps:e=>({...he,direction:"column",gap:40,...ht(0,0,1,0),...Fe(e,Qv)}),box:[...ge,...Je(Qv)],parts:[{kind:"list",key:"cards",name:"Card",perRow:()=>3,rowName:"Row",rowProps:{...Gi,gap:40},props:wG,parts:[Te("label"),{kind:"text",key:"value",props:se,style:{textStyle:"heading-3"},was:{size:20}},{kind:"text",key:"desc",props:Ce,style:{textStyle:"body-5",italic:!0},was:{size:14}}]}],drop:{...ve,...Ee}},aT={Cards:gG,KeyFeatures:bG,Series:CG,DocMetaCards:kG};import{phoneKey as vG}from"efficient-easel/draw";var Xp=e=>typeof e=="string"?e.trim():"";function nT(e){let o=`${Xp(e.prefix)}${Xp(e.value)}`,t=Xp(e.suffix);return e.emphasizeAll===!0?o?`==_${o}_==`:"":`${o}${t?`==_${t}_==`:""}`}var Zp={kind:"block",type:"Text",props:{...se,_partStyles:{text:{textStyle:"heading-1",case:"none",lineHeight:.9,letterSpacing:-.04}}},box:[["value","text",(e,o)=>nT(o)]],when:(e,o)=>o!==void 0&&typeof o.value=="string"&&nT(o)!==""},sT=e=>Ko(e?.supSuffix),TG={name:"Stats with Text",boxProps:e=>({...he,direction:"column",gap:60,sectionBorder:{bottom:1},...ao(e,"StatsParagraph")}),box:[...ge,...zt("StatsParagraph")],parts:[Vo("StatsParagraph"),{kind:"group",name:"Stats",props:{...H,gap:0},parts:[{kind:"list",key:"stats",name:"Stat",perRow:()=>4,rowName:"Stats row",rowProps:{...H,direction:"row",gap:0,share:"equal"},props:{...H,justify:"between",gap:12,sectionPaddingTop:48,sectionPaddingBottom:48,sectionPaddingLeft:32,sectionPaddingRight:32,sectionBorder:{top:1,right:1,bottom:1,left:1}},parts:[{...Zp,when:(e,o)=>!sT(o)&&Zp.when(e,o)},{kind:"group",name:"Figure",props:{...H,direction:"row",align:"start",gap:32,share:"content",phoneRow:2,[vG("share")]:"content"},when:(e,o)=>sT(o),parts:[Zp,{kind:"text",key:"supSuffix",props:se,style:{textStyle:"body-5",color:"accent",letterSpacing:.18,lineHeight:1,padding:18}}]},{kind:"group",name:"Words",props:{...H,gap:4},parts:[{kind:"text",key:"label",props:se,style:{textStyle:"body-1",letterSpacing:-.01},was:{size:16}},Te("sub",{color:"labels",letterSpacing:.24})]}]}]}],drop:{...ve,...Ee,background:"needs a Box fill: the old band painted this colour (the theme's section band, `var(--section-bg)`, or none) behind the head and round the cards, and a Box paints only its theme's page colour",headPlacement:"needs a row per head placement: an own-box Stats with Text draws no head (its words sit in a Section Header above it), the row always draws the head"}},lT={StatsParagraph:TG};var cT={contained:!1},fT=(e,o)=>({logos:[{kind:"list",key:e,name:"Logo",flat:!0,parts:[{kind:"block",type:"LogoBlock",box:["src",[o,"alt"]],when:(t,r)=>Ko(r?.src)||Ko(r?.[o])}]}]}),Qp=e=>{let o=$(e.bandPadding)??40;return{top:o,bottom:o,topPhone:o,bottomPhone:o}},PG={...Te("heading",{color:"labels",letterSpacing:.2}),props:{...se,align:"center"}},EG={name:"Logos",boxProps:e=>({...he,direction:"column",gap:32,...Fe(e,Qp(e))}),box:[...ge,...Je(Qp),["bandPadding","sectionPaddingTop",(e,o)=>Fe(o,Qp(o)).sectionPaddingTop]],parts:[PG,{kind:"core",keep:["columns","logoHeight","grayscale"],rename:{logosPerRow:"columns"},props:cT,slots:fT("items","alt")}],drop:{...ve,...Ee,contained:"the Box draws the site frame now; the Logos block inside it fills the Box's column (`contained: false`)",headPlacement:"a Logos band has no split head (not in SPLITTABLE_SECTIONS): no stored node can hold one, and the converted block stores own-box"}},iT={top:24,bottom:24,topPhone:24,bottomPhone:24},OG={name:"Payment Methods",boxProps:e=>({...he,direction:"column",...Fe(e,iT)}),box:[...ge,...Je(iT)],skip:e=>Ko(e.dataSource)?"its payment methods come from a data source (a venue's Setup): a sourced list needs the card template (plan \xA73.2), not built yet":void 0,parts:[{kind:"group",name:"Methods",props:{...H,align:"center",gap:20,sectionBorder:{top:1,bottom:1},sectionPaddingTop:32,sectionPaddingBottom:32},parts:[{...Te("heading",{color:"labels"}),props:{...se,align:"center"}},{kind:"core",keep:[],as:"Logos",props:{...cT,look:"cards",grayscale:!1},slots:fT("badges","label")},{kind:"group",name:"Reassurance",props:{...H,direction:"row",wrap:!0,justify:"center",gap:24},parts:[{kind:"list",key:"assurances",name:"Line",flat:!0,parts:[{kind:"text",key:"text",props:{...se,align:"center"},style:{size:13,color:"labels"}}]}]}]}],drop:{...ve,...Ee,contained:"the Box draws the site frame now; the Logos block inside it fills the Box's column (`contained: false`)",dataSource:"empty: no source, so the authored badges above are the list (a node that names a source is skipped, see `skip`)"}},dT={Logos:EG,PaymentBadges:OG};var uT=e=>e.size==="display",pT=(e,o)=>({kind:"list",key:"items",name:"Item",flat:!0,when:o,parts:[{kind:"text",key:"text",props:Ce,style:e}]}),FG={name:"Scrolling Bar",boxProps:e=>({...he,..._n,...Ei,...Fe(e,Dn)}),box:[["separator","separator",e=>rv(e)],["borders","sectionBorder",e=>e===!1?void 0:{top:1,bottom:1}],...ge,["tone","sectionAccent",(e,o)=>o.sectionAccent!==void 0?$(o.sectionAccent):e==="plain"?-1:void 0],...Je(Dn)],parts:[pT(Oi,e=>!uT(e)),pT(iv,uT)],drop:{...ve,...Ee,scrollDirection:"carried to Loop \u203A Direction (the Box's Animation tab) by this row once the Box Loop build PR (Panels And Popups director) is merged; the row stays OFF until then",speed:"carried to Loop \u203A Duration (the Box's Animation tab) by this row once the Box Loop build PR (Panels And Popups director) is merged; the row stays OFF until then",join:"the band sitting inside its neighbour: absent on all 18 live Tickers (JJ 2026-10-27), and not the separator",size:"each item's Text style: Small \u2192 Body 5, Display \u2192 Heading 3"}},mT=e=>e?.tone==="muted",LG={name:"Spec Strip",boxProps:e=>({...he,..._n,...Fi,...e.fill==="none"?{sectionBorder:{top:1}}:{},...Fe(e,Nn)}),box:[...ge,...Je(Nn)],parts:[{kind:"list",key:"cells",name:"Cell",flat:!0,parts:[{kind:"text",key:"text",props:se,style:Mn,when:(e,o)=>!mT(o)},{kind:"text",key:"text",props:Ce,style:Mn,when:(e,o)=>mT(o)}]}],drop:{...ve,...Ee,fill:"None \u2192 no fill and a line on top. Dark band \u2192 the Box follows its theme: the old fixed `plate-band` colour has no home (no site write adds a theme preset since 8622589f); the merchant picks a dark theme on the Box"}},xT={Ticker:FG,SpecStrip:LG};var AG="jetbrains-mono",IT="space-grotesk",It=(e,o,t={})=>({textStyle:"body-5",font:AG,size:e,sizePhone:e,letterSpacing:o,lineHeight:1.5,weight:400,...t}),$i=(e,o,t,r)=>({font:IT,size:e,sizePhone:o,case:"upper",weight:500,letterSpacing:t,lineHeight:r}),Gn=(e,o,t,r={})=>({textStyle:"body-1",font:IT,size:e,sizePhone:o,weight:400,case:"none",lineHeight:t,...r}),no=(e,o,t={})=>({kind:"text",key:e,props:se,style:o,...t}),hT=(e,o)=>o?.future===!0,gT=(e,o)=>{let t=Tn(o)?.themes[ya(e.sectionAccent,o)]?.line;return t?{buttonBorder:{width:1,color:t}}:{}},Ui=e=>Bv(typeof e?.body=="string"?e.body:""),RG={name:"Milestone Timeline",boxProps:(e,o)=>{let t=br(e,o);return{...he,direction:"column",gap:60,sectionBorder:{bottom:1},...ao(e,"TimelineTrack"),...t>=0?{sectionAccent:t}:{}}},box:[...ge.filter(e=>e!=="sectionAccent"),["sectionAccent","sectionAccent",Ri],...zt("TimelineTrack")],parts:[{kind:"group",name:"Heading",props:{...H,direction:"row",align:"end",justify:"between",gap:40,share:"content",sectionPaddingBottom:32,sectionBorder:{bottom:1}},parts:[{kind:"group",name:"Title",props:{...H,direction:"row",align:"end",gap:40,share:"content"},parts:[no("eyebrow",It(13,.3,{case:"upper",color:"accent",padding:8}),{role:"eyebrow"}),no("title",{textStyle:"heading-2",...$i(79,40,-.03,1)},{role:"heading"})]},no("intro",Gn(14,14,1.5),{props:{...Ce,align:"right",maxWidth:360}})]},{kind:"group",name:"Years",props:{...H,direction:"row",share:"equal",gap:0,line:!0},parts:[{kind:"list",key:"entries",name:"Year",props:{...H,...Pi},item:e=>({props:e.future===!0?{upcoming:!0}:{}}),parts:[{kind:"group",name:Bn.name,props:{...H,...Bn},parts:[no("date",It(13,.22,{color:"accent"}),{when:(e,o)=>!hT(e,o)}),no("date",It(13,.22,{color:"labels"}),{when:hT}),no("title",{textStyle:"heading-3",...$i(20,20,-.02,1.1)},{role:"heading"})]},no("blurb",Gn(13,13,1.55),{props:Ce})]}]},{kind:"button",key:"ctaText",href:"ctaHref",variant:"ghost",props:(e,o)=>({...po,align:"right",...gT(e,o)}),style:It(13,.3,{case:"upper"})}],site:(e,o)=>[...xt("title")(e),...Bi(e,o)],drop:{...ve,...Ee,background:"the band is the Box's theme: the site's band preset (`sectionAccent`), or a declared band-preset write (`lib/theme` `bandPresetIndex`)",headPlacement:"needs a row per head placement: an own-box Milestone Timeline draws no head (its words sit in a Section Header above it), the row always draws the head"}},BG={name:"Story Timeline",skip:e=>{let o=typeof e.layout=="string"?e.layout:"split";return o==="split"?void 0:`display "${o}": not converted (0 live pages; Spine and Alternating are not offered, a Track story is not stored anywhere)`},boxProps:e=>({...he,direction:"row",share:"twoThree",gap:80,align:"start",...ao(e,"Timeline")}),box:[...ge,...zt("Timeline")],parts:[{kind:"group",name:"Heading",props:{...H,gap:24},parts:[no("eyebrow",It(12,.3,{case:"upper",color:"accent"}),{role:"eyebrow"}),no("title",{textStyle:"heading-2",...$i(72,40,-.03,.94)},{role:"heading"}),no("intro",Gn(14,14,1.6),{props:{...Ce,maxWidth:360}}),{kind:"group",name:"Picture",keepEmpty:!0,box:[["imageSrc","bgImage"]],props:{...H,sectionBorder:{top:1,right:1,bottom:1,left:1},darken:75,darkenStyle:"bottom",placement:"bottom-center",sectionHeightMode:"fixed",sectionHeightValue:667,sectionHeightUnit:"px",sectionHeightModePhone:"fixed",sectionHeightValuePhone:419,sectionHeightUnitPhone:"px",sectionPaddingTop:12,sectionPaddingBottom:12,sectionPaddingLeft:16,sectionPaddingRight:16,sectionPaddingTopPhone:12,sectionPaddingBottomPhone:12,sectionPaddingLeftPhone:16,sectionPaddingRightPhone:16},when:e=>typeof e.imageSrc=="string"&&e.imageSrc.trim()!=="",parts:[{kind:"group",name:"Caption",props:{...H,direction:"row",justify:"between",align:"center",gap:12,share:"content",phoneRow:2},parts:[no("imageCaption",It(11,.24,{case:"upper",color:"text"})),no("imageMeta",It(11,.24,{case:"upper",color:"accent"}),{props:{...se,align:"right"}})]}]},{kind:"button",key:"ctaText",href:"ctaHref",variant:"ghost",props:(e,o)=>({...po,...gT(e,o)}),style:It(13,.3,{case:"upper"})}]},{kind:"group",name:"Chapters",props:{...H,gap:48,line:!1},parts:[{kind:"list",key:"entries",name:"Chapter",props:{...H,direction:"row",gap:24,share:"biggerRight",align:"start"},parts:[no("date",It(13,.24,{color:"accent"})),{kind:"group",name:"Words",props:{...H,gap:14},parts:[no("title",{textStyle:"heading-3",...$i(24,20,-.02,1.5)},{role:"heading"}),{kind:"block",type:"Text",props:{...se,_partStyles:{text:Gn(17,16,1.6)}},box:[["body","text",(e,o)=>Ui(o)[0]??""]],when:(e,o)=>Ui(o).length>0},{kind:"block",type:"Text",props:{...Ce,_partStyles:{text:Gn(17,16,1.6,{paragraphSpacing:14})}},box:[["body","text",(e,o)=>Ui(o).slice(1).join(`
|
|
23
|
+
|
|
24
|
+
`)]],when:(e,o)=>Ui(o).length>1}]}]}]}],site:xt("title"),drop:{...ve,...Ee,layout:"Split is the only display converted (see skip); the Box's own arrangement replaces it"}},yT={TimelineTrack:RG,Timeline:BG};var _G="dataSource";var DG="dataRows",NG=/^[a-z][a-z0-9]*(-[a-z0-9]+)*$/,MG=Symbol.for("efficient.block-sources");function ji(){let e=globalThis;return e[MG]??={sources:new Map,revision:0}}function HG(e){if(typeof e.key!="string"||!NG.test(e.key))throw new Error(`A block source key is lower-case words joined by hyphens, not ${JSON.stringify(e.key)}.`);if(typeof e.label!="string"||!e.label.trim())throw new Error(`The block source ${e.key} has no label.`);if(!Array.isArray(e.blocks)||!e.blocks.length||e.blocks.some(o=>typeof o!="string"||!o))throw new Error(`The block source ${e.key} names no block it can fill.`);return{key:e.key,label:e.label.trim(),blocks:[...e.blocks],...e.sample?{sample:e.sample.map(o=>bT(o)).filter(o=>o!==null)}:{}}}function Ehe(e){let o=e.map(HG),t=ji();for(let r of o)t.sources.set(r.key,r);o.length&&(t.revision+=1)}function Ohe(e){let o=[...ji().sources.values()];return e===void 0?o:o.filter(t=>t.blocks.includes(e))}function zG(e){return ji().sources.get(e)??null}function Fhe(){return ji().revision}function qi(e){let o=e?.[_G];return typeof o=="string"?o.trim():""}function bT(e){if(!e||typeof e!="object"||Array.isArray(e))return null;let o={};for(let[t,r]of Object.entries(e)){let a=pe(r);a&&(o[t]=a)}return Object.keys(o).length?o:null}function WG(e){let o=e?.[DG];return Array.isArray(o)?o.map(bT).filter(t=>t!==null):null}function Lhe(e,o,t=[]){let r=WG(e);if(r!==null&&(r.length||!o))return{rows:r,sample:!1};if(!o)return{rows:[],sample:!1};let a=zG(qi(e))?.sample;return{rows:a?.length?a:t,sample:!0}}import{slugify as Nhe}from"efficient-shell/format";import{rootIsDark as GG}from"efficient-shell/format";function Bhe(e="auto"){return e==="light"?!0:e==="dark"?!1:!GG({whenUnset:!0})}function ST(e,o){return Number.isFinite(e)&&Number.isFinite(o)&&!(e===0&&o===0)}function Jp(e){let o=Number.parseFloat(e??"");return Number.isFinite(o)?o:0}var UG=["tall","square","wide"],$G="tall";function CT(e){return UG.includes(String(e??""))?String(e):$G}var Hhe={sectionNumber:"\xB7 Locations",heading:"Our *locations.*",tagline:"Visit us in person \u2014 find your nearest studio below.",galleryKicker:"Gallery",galleryHint:"Hover to see in colour \xB7 click to jump",mapTheme:"auto"},zhe=[{photo:"",group:"",groupName:"",name:"City name",state:"State",country:"Country",timezone:"GMT \xB7 UTC +0",address:`Address line one
|
|
25
|
+
Address line two`,phone:"+00 000 0000",hours:"Mon\u2013Fri 9:00\u201318:00",lat:0,lng:0,mapsUrl:""},{photo:"",group:"",groupName:"",name:"City name",state:"State",country:"Country",timezone:"GMT \xB7 UTC +0",address:`Address line one
|
|
26
|
+
Address line two`,phone:"+00 000 0000",hours:"Mon\u2013Fri 9:00\u201318:00",lat:0,lng:0,mapsUrl:""}],jG=/^https?:\/\//i;function Whe(e){let o=(e.mapsUrl??"").trim();return{photo:"",group:"",groupName:"",name:e.name??"",state:e.state??"",country:e.country??"",timezone:"",address:e.address??"",phone:e.phone??"",hours:e.hours??"",lat:Jp(e.lat),lng:Jp(e.lng),mapsUrl:jG.test(o)?o:""}}function em(e){let o=String(e??"").split(" \xB7 ");return{state:(o[0]??"").trim(),country:(o[1]??"").trim()}}var Ghe="other",Uhe={routingNumber:"02 \xB7 Routing",routingTagline:"What can we help you with?",groups:[{id:"fitment",eyebrow:"A \xB7 Label",title:"Group one",copy:"Short description of this routing group.",response:"< 48h"},{id:"trade",eyebrow:"B \xB7 Label",title:"Group two",copy:"Short description of this routing group.",response:"< 24h"},{id:"press",eyebrow:"C \xB7 Label",title:"Group three",copy:"Short description of this routing group.",response:"< 48h"},{id:"order",eyebrow:"D \xB7 Label",title:"Group four",copy:"Short description of this routing group.",response:"< 24h"}],formNumber:"03 \xB7 Message",formHeading:"Send *a note.*",metaLines:["Encrypted in transit","Stored 12 months"],showOther:!0,otherLabel:"Other",otherNoteTitle:"No matching team",otherNoteBody:"Tell us what you need in the message field below \u2014 we'll route it to whoever can help.",buttonText:"Send Message \u2192",consent:"By submitting, you agree to our privacy policy. We never share contact details with third parties.",channels:[{label:"Team one",value:"team-one@email.com",href:"mailto:team-one@email.com",sub:"Detail \xB7 Detail",groupId:"fitment"},{label:"Team two",value:"team-two@email.com",href:"mailto:team-two@email.com",sub:"Detail \xB7 Detail",groupId:"trade"},{label:"Team three",value:"team-three@email.com",href:"mailto:team-three@email.com",sub:"Detail \xB7 Detail",groupId:"press"},{label:"Team four",value:"team-four@email.com",href:"mailto:team-four@email.com",sub:"Detail \xB7 Detail",groupId:"order"},{label:"Phone",value:"+1 (000) 000-0000",href:"tel:+10000000000",sub:"Mon\u2013Fri \xB7 9:00\u201318:00"}]};function wT(e){let o=String(e??"").replace(/[^+\d]/g,"");return o?`tel:${o}`:void 0}var mo=e=>typeof e=="string"?e:e==null?"":String(e),rm=e=>Array.isArray(e.locations)?e.locations.map(o=>o??{}):[],Sa=e=>mo(e.group),RT=e=>`loc-${e}`,BT=e=>mo(e.state).trim()||em(mo(e.region)).state,_T=e=>mo(e.country).trim()||em(mo(e.region)).country,kT=e=>[BT(e),_T(e)].filter(Boolean).join(" \xB7 "),qG=e=>rm(e).some(o=>mo(o.photo).trim()!==""),KG=e=>rm(e).some(o=>ST(Number(o.lat),Number(o.lng))),VG=(e,o)=>rm(e).filter(t=>Sa(t)===Sa(o)).length,YG=(e,o)=>VG(e,o)===1?"wide":CT(e.imageShape),om={top:100,bottom:100,topPhone:60,bottomPhone:60},vT=48,No=(e,o={})=>({textStyle:"body-5",...Xe("label",e),case:"upper",...o}),am={top:1,right:1,bottom:1,left:1},tm=(e,o)=>({sectionPaddingTop:e,sectionPaddingBottom:e,sectionPaddingLeft:o,sectionPaddingRight:o,sectionPaddingTopPhone:e,sectionPaddingBottomPhone:e,sectionPaddingLeftPhone:o,sectionPaddingRightPhone:o}),nm={...H,direction:"row",share:"equal",gap:0},DT=(e,o={})=>t=>t>wn(t)?{...H,gap:0}:{...nm,...o,...e&&t>1?{phoneRow:e}:{}},XG=250,TT={wrap:!0},ZG={kind:"group",name:"Gallery",props:{...H,gap:20},when:qG,parts:[{kind:"group",name:"Gallery head",props:{...H,direction:"row",justify:"between",align:"end",gap:24,share:"content",sectionBorder:{bottom:1},sectionPaddingBottom:16},parts:[Te("galleryKicker",No(12,{color:"accent",letterSpacing:.3})),{kind:"text",key:"galleryHint",props:{...Ce,align:"right"},style:No(11,{letterSpacing:.22})}]},{kind:"group",name:"Groups",props:{...H,gap:24},parts:[{kind:"list",key:"locations",name:"City picture",props:{...H,darken:85,darkenStyle:"bottom",placement:"bottom-left",sectionBorder:am,...tm(12,12)},item:(e,o,t)=>({props:{...mo(e.photo).trim()?{bgImage:mo(e.photo)}:{},link:`#${RT(o)}`,boxShape:YG(t,e)}}),parts:[{kind:"text",key:"name",props:se,style:No(11,{letterSpacing:.22,color:"text"})}],groups:{of:Sa,name:"Group",props:{...H,gap:10},head:e=>({label:Sa(e[0]??{})}),parts:[Te("label",No(11,{color:"accent",letterSpacing:.3}))],itemsName:"Cities",itemsProps:DT(2),perRow:wn,rowName:"Row",rowProps:{...nm,phoneRow:2}}}]}]},QG={kind:"group",name:"Words",props:{...H,gap:12,...tm(28,28),sectionBorder:{bottom:1},sectionHeightMode:"fixed",sectionHeightValue:280,sectionHeightUnit:"px",sectionHeightModePhone:"auto"},parts:[{kind:"group",name:"Name row",props:{...H,direction:"row",justify:"between",align:"start",gap:14,share:"content",wrap:!0},parts:[{kind:"group",name:"Name",props:{...H,gap:6},parts:[{kind:"text",key:"name",role:"heading",props:se,style:{textStyle:"heading-3",...Xe("headingSmall",30),case:"upper",weight:500,lineHeight:1,letterSpacing:-.02}},{kind:"block",type:"Text",props:{...se,_partStyles:{text:No(12,{color:"accent",letterSpacing:.24})}},box:["region","state","country"].map(e=>[e,"text",(o,t)=>kT(t)]),when:(e,o)=>kT(o??{})!==""}]},{kind:"group",name:"Time zone",props:{...H,sectionBorder:am,...tm(6,10)},parts:[{kind:"text",key:"timezone",props:Ce,style:No(12,{letterSpacing:.22})}]}]},{kind:"text",key:"address",props:Ce,style:{textStyle:"body-5",fontRole:"heading",...Xe("body",14),lineHeight:1.5}},{kind:"block",type:"ButtonBlock",props:{...po,...yr,variant:"ghost",arrow:!1,_partStyles:{label:No(13,{letterSpacing:.18,color:"text"})}},box:[["phone","label"],["phone","href",e=>wT(mo(e))??"#"]],when:(e,o)=>mo(o?.phone).trim()!==""},{kind:"text",key:"hours",props:Ce,style:No(12,{letterSpacing:.18,lineHeight:1.7})}]},JG={kind:"block",type:"LocationMap",props:e=>({mapTheme:typeof e.mapTheme=="string"?e.mapTheme:"auto"}),box:["name","lat","lng","mapsUrl","geocode",...["region","state"].map(e=>[e,"state",(o,t)=>BT(t)]),...["region","country"].map(e=>[e,"country",(o,t)=>_T(t)])]},eU={kind:"list",key:"locations",name:"City",props:(e,o)=>({...H,gap:0,sectionBorder:am,jumpHighlight:!0,minWidth:XG,sectionAccent:br(e,o)>=0?ya(e.sectionAccent,o):-1}),item:(e,o)=>({props:{anchor:RT(o)}}),parts:[QG,JG],groups:{of:Sa,name:"Group",props:{...H,gap:20},head:e=>{let o=e[0]??{};return{key:Sa(o),groupName:mo(o.groupName),count:`${e.length} location${e.length===1?"":"s"}`}},parts:[{kind:"group",name:"Group head",props:{...H,direction:"row",justify:"between",align:"end",gap:16,share:"content",sectionBorder:{bottom:1},sectionPaddingBottom:16},when:(e,o)=>mo(o?.key).trim()!=="",parts:[Te("key",No(13,{color:"accent",letterSpacing:.3})),{kind:"text",key:"groupName",role:"heading",props:se,style:{textStyle:"heading-3",...Xe("headingSmall",24),case:"upper",weight:500,letterSpacing:-.01}},{kind:"text",key:"count",props:Ce,style:No(12,{letterSpacing:.22})}]}],itemsName:"Cities",itemsProps:DT(void 0,TT),perRow:wn,rowName:"Row",rowProps:{...nm,...TT}}},PT=No(10,{letterSpacing:.25}),oU={kind:"block",type:ut,props:{...H,name:"Credit",direction:"row",justify:"end",align:"center",gap:6,share:"content",wrap:!0},when:KG,slot:pt,keepEmpty:!0,parts:[{kind:"block",type:"Text",props:{...Ce,text:"Location coordinates \xA9",_partStyles:{text:PT}}},{kind:"block",type:"ButtonBlock",props:{...po,...yr,variant:"ghost",arrow:!1,label:"OpenStreetMap contributors",href:"https://www.openstreetmap.org/copyright",_partStyles:{label:{...PT,color:"labels"}}}}]},ET=(e,o)=>Object.fromEntries(o.filter(t=>e[t]!==void 0).map(t=>[t,e[t]])),OT=["sectionPaddingTop","sectionPaddingTopPhone"],FT=["sectionPaddingBottom","sectionPaddingBottomPhone"],LT=e=>e.map(o=>[o,o,(t,r)=>Fe(r,om)[o]]),AT=["sectionAccent","sectionAccent",Ri],tU=["gridSpan","_hidden"],rU={name:"City pictures",skip:e=>qi(e)?`fed by the data source "${qi(e)}": its cities are read as the page is served, not stored on the node`:void 0,boxProps:(e,o)=>({...he,direction:"column",gap:40,anchor:"studios",...ET(Fe(e,om),OT),sectionPaddingBottom:vT,sectionPaddingBottomPhone:vT,...Dp(e,o)}),box:[...ge.filter(e=>e!=="sectionAccent"&&e!=="anchor"),AT,["anchor","anchor",e=>mo(e).trim()?e:"studios"],...LT(OT)],parts:[Wv("sectionNumber","heading","tagline"),ZG],also:[{name:"City maps",boxProps:(e,o)=>({...he,direction:"column",gap:40,sectionBorder:{bottom:1},sectionPaddingTop:0,sectionPaddingTopPhone:0,...ET(Fe(e,om),FT),...Dp(e,o)}),box:[...tU,AT,...LT(FT)],parts:[eU,oU]}],reads:{mapTheme:"City maps Box: each Map block's Map theme",imageShape:"City pictures Box: each picture Box's Box shape"},site:Bi,drop:{...ve,...Ee,apiKey:"a stored Google Maps key from before the map needed none: the website's one map (components/SiteMap) takes no key, and a key is a credential, never page content",mapId:"a Google Maps style id from the same retired map: nothing in src/ reads it",gallery:"the retired separate tile list: the wall is derived from the cities (`components/ContactLocations`), nothing in src/ reads it",dataSource:"always empty here: a node fed by a source is skipped (see skip)"}},NT={ContactLocations:rU};var aU=["Collections","Events","FAQ","FitmentFinder","FitmentTable","Footprint","GalleryB","LongRead","ProcessSteps","ProductGrid","RelatedProducts","SpecTable"],Wt=(e,o)=>()=>({top:e,topPhone:o}),MT=e=>o=>{let t=ao(o,e).sectionPaddingTop;return{top:t,topPhone:t}},nU={Collections:Wt(120,70),Events:Wt(120,70),FAQ:Wt(120,70),GalleryB:Wt(120,70),FitmentTable:Wt(120,80),SpecTable:Wt(120,80),LongRead:Wt(120,80),FitmentFinder:e=>e.layout==="bar"?{top:32,topPhone:20}:{top:80,topPhone:60},RelatedProducts:Wt(0,0),Footprint:MT("Footprint"),ProcessSteps:MT("ProcessSteps"),ProductGrid:e=>({top:$(e.padTop)??120,topPhone:0})};function sU(e){let o=Qe[e],t=nU[e];if(!o||!t)throw new Error(`section-to-box-rows-head: "${e}" has no head row or no head room`);let r=o.padKey,a=Vo(e),n=o.headRows.filter(s=>![o.num,o.title,o.description,"linkText","linkHref"].includes(s));return{name:qw[e]??e,boxProps:s=>{let i=t(s);return{...he,direction:"column",gap:zv[qp(e)],sectionPaddingTop:i.top,sectionPaddingTopPhone:i.topPhone}},box:[...ge,...r?[[r,"sectionPaddingTop",(s,i)=>t(i).top]]:[]],parts:[a,{kind:"core",keep:"rest",...r?{props:{[r]:0}}:{}}],...n.length?{drop:Object.fromEntries(n.map(s=>[s,"a head setting: the Header Box's Text parts draw it (lib/document/blocks/general/section-head-looks)"]))}:{}}}var HT=Object.fromEntries(aU.map(e=>[e,sU(e)]));var zT={top:72,bottom:72,topPhone:72,bottomPhone:72},lU={name:"Editorial Text",boxProps:e=>({...he,direction:"column",gap:28,sectionBorder:{top:1},...Fe(e,zT)}),box:[["topBorder","sectionBorder",e=>e===!1?void 0:{top:1}],...ge,...Je(zT)],parts:[Vo("Prose"),{kind:"text",key:"body",props:{...Ce,maxWidth:680},style:{textStyle:"body-1",lineHeight:1.7,paragraphSpacing:18},was:{size:16}}],drop:{...ve,...Ee,headPlacement:"needs a row per head placement: an own-box Prose draws no head (its words sit in a Section Header above it), the row always draws the head. 0 of 123 live nodes store it (JJ's export, 2026-10-24)"}},iU={buttonPaddingTop:20,buttonPaddingBottom:20,buttonPaddingLeft:28,buttonPaddingRight:28},WT=(e,o)=>({kind:"list",key:"buttons",name:"Button",flat:!0,when:e,parts:[{kind:"button",key:"label",href:"href",variant:{key:"variant",map:{primary:"primary",outline:"ghost"},fallback:"ghost"},style:{letterSpacing:.3},props:{...po,...iU,...o}}]}),sm=e=>Ko(e.title),cU={name:"Call-to-Action Heading",boxProps:e=>({...he,direction:"row",align:"center",justify:sm(e)?"between":"end",gap:60,share:"content",sectionBorder:{bottom:1},...ao(e,"TitleWithButtons")}),box:[...ge,...zt("TitleWithButtons")],parts:[{kind:"group",name:"Title",props:H,parts:[{kind:"text",key:"title",role:"heading",props:{...se,maxWidth:1e3},style:{textStyle:"heading-1",lineHeight:.94,letterSpacing:-.035}}]},{kind:"group",name:"Buttons",props:{...H,gap:14},parts:[WT(sm,{widthFit:"fill",iconPosition:"end"}),WT(e=>!sm(e),{})]}],site:xt("title"),drop:{...ve,buttonsAlign:"moves the buttons only when there is no heading (4 of 128 live nodes), where the Box puts them at the end. 0 of 128 live nodes store it (JJ's export, 2026-10-24)",buttonsAlignPhone:"the phone's own side of `buttonsAlign`, read only with no heading; no old node stores it (it is new with the Phone view's Block alignment row), so nothing moves"}},GT={top:40,bottom:64,topPhone:24,bottomPhone:36},fU={name:"Section Header",boxProps:e=>({...he,direction:"column",gap:0,...Fe(e,GT)}),box:[...ge,...Je(GT)],parts:[Vo("SectionHeader")],drop:{...ve,...Ee,headStyle:"needs a row per head look: the row draws the standard look; the editorial, simple, statement, natural and essay looks are other layouts. 0 of 69 live nodes store it (JJ's export, 2026-10-24)",eyebrowLook:"read only by the simple, statement, natural and essay looks, which this row does not draw. 0 of 69 live nodes store it",rowGap:"read only by the natural look, which this row does not draw. 0 of 69 live nodes store it",descriptionSize:"read only by the natural look, which this row does not draw. 0 of 69 live nodes store it",numStyle:"Solid (the default; 4 of 69 live nodes store it) IS the eyebrow Text the row draws; Outlined (0 live) needs an outlined-number text look"}},dU={name:"Lead Text",boxProps:e=>({...he,direction:"column",gap:40,sectionBorder:{bottom:1},...ao(e,"ParagraphsA")}),box:[...ge,...zt("ParagraphsA")],parts:[{kind:"group",name:"Numbers",props:{...H,direction:"row",justify:"between",gap:60,share:"content",sectionBorder:{bottom:1},sectionPaddingBottom:40},parts:[Te("eyebrow",{color:"labels",letterSpacing:.24}),{kind:"group",name:"Stats",props:{...H,align:"end"},parts:[{kind:"list",key:"stats",name:"Stat",props:{...H,direction:"row",share:"content",justify:"end",gap:8},parts:[Te("value",{color:"text",letterSpacing:.18,lineHeight:1.8}),Te("label",{color:"labels",letterSpacing:.18,lineHeight:1.8})]}]}]},{kind:"group",name:"Words",props:{...H,direction:"row",align:"end",gap:60,share:"bigLeft"},parts:[{kind:"text",key:"lead",props:{...se,maxWidth:780},style:{textStyle:"body-1",lineHeight:1.45,letterSpacing:-.005,paragraphSpacing:0},was:{size:22,sizePhone:20}},{kind:"group",name:"Founders",props:{...H,gap:8},parts:[{kind:"group",name:"Note",props:{...H,gap:6},parts:[{kind:"text",key:"foundersHeading",props:se,style:{textStyle:"body-1",weight:500,letterSpacing:-.01,lineHeight:1.7},was:{size:18,sizePhone:16}},{kind:"text",key:"foundersBody",props:Ce,style:{textStyle:"body-5",lineHeight:1.7},was:{size:14,sizePhone:12}}]},Te("attribution",{letterSpacing:.24,lineHeight:1.7})]}]}],drop:{...ve}},UT={top:24,bottom:24,topPhone:24,bottomPhone:24},uU={name:"Banner",boxProps:e=>({...he,direction:"column",gap:0,...Fe(e,UT)}),box:[...ge,"contained",...Je(UT)],parts:[{kind:"group",name:"Card",keepEmpty:!0,props:{...H,gap:28,placement:"top-left",darken:60,darkenStyle:"even",sectionBorder:{width:1},sectionPaddingTop:64,sectionPaddingBottom:64,sectionPaddingTopPhone:40,sectionPaddingBottomPhone:40,sectionPaddingLeft:40,sectionPaddingRight:40,sectionPaddingLeftPhone:24,sectionPaddingRightPhone:24},box:[["imageSrc","bgImage"],["overlay","darken",e=>Math.min(Math.max($(e)??60,0),100)]],parts:[{kind:"group",name:"Words",props:{...H,gap:20},parts:[Te("eyebrow"),{kind:"text",key:"title",role:"heading",props:{...se,maxWidth:680},style:{weight:500,lineHeight:1.05,letterSpacing:-.03,case:"none"}},{kind:"text",key:"body",props:{...Ce,maxWidth:680},style:{textStyle:"body-1",lineHeight:1.6},was:{size:16}}]},{kind:"button",key:"ctaText",href:"ctaHref",variant:"primary",props:po}]}],drop:{...ve,...Ee}},lm={Prose:lU,TitleWithButtons:cU,SectionHeader:fU,ParagraphsA:dU,Banner:uU};function gIe(){mt(lm),mt(lT),mt(dT),mt(aT),mt(xT),mt(yT),mt(NT),mt(HT)}import{isNodeList as pU}from"efficient-easel/data";var mU=Object.keys(lm);function $T(e,o,t){let r={};for(let a of Object.keys(o(e.type)))r[a]=void 0;for(let[a,n]of Object.entries(e.props))r[a]=pU(n)?n.map(s=>$T(s,o,t)):n;return r.id=t(e.type),{type:e.type,props:r}}function im(e,o,t=0){return(r,a)=>{let{nodes:n}=mp({type:e,props:{...r(e),id:a(e)}},o);return $T(n[t],r,a)}}function xU(e){return mU.includes(e)}function hU(e){if(!xU(e)||!tk(e))return null;let o=Ci(e);return o?im(e,o):null}function Ki(e){return uv(e)??hU(e)}import{blockTypesIn as pP}from"efficient-easel/screen/lib/document/block-types-in";import{jsx as $n,jsxs as qU}from"react/jsx-runtime";import{createContext as KU,useContext as VU}from"react";import{jsx as Ca,jsxs as oP}from"react/jsx-runtime";import{useEffect as fm,useRef as RU,useState as Un}from"react";import{jsx as jT}from"react/jsx-runtime";import{createContext as IU,lazy as OIe,Suspense as FIe,useContext as gU}from"react";var yU={Link:qm,Image:jm},bU=IU(yU);function qT(){return gU(bU)}function LIe(e){let{Link:o}=qT();return jT(o,{...e})}function KT(e){let{Image:o}=qT();return jT(o,{...e})}import{jsx as VT,Fragment as SU,jsxs as CU}from"react/jsx-runtime";import{useEffect as wU,useRef as YT,useState as kU}from"react";var vU="#t=0.001",TU=2;function PU(e,o){if(e.readyState<TU||!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 XT({src:e,objectPosition:o="50% 50%",onError:t}){let r=YT(null),a=YT(null),[n,s]=kU(!1);return wU(()=>{let i=r.current,c=a.current;if(n||!i||!c)return;let d=()=>{PU(i,c)&&s(!0)};return d(),i.addEventListener("loadeddata",d),i.addEventListener("seeked",d),()=>{i.removeEventListener("loadeddata",d),i.removeEventListener("seeked",d)}},[n]),CU(SU,{children:[VT("canvas",{ref:a,"aria-hidden":!0,className:"absolute inset-0 z-[3] h-full w-full object-cover",style:{objectPosition:o,visibility:n?"visible":"hidden"}}),!n&&VT("video",{ref:r,src:`${e}${vU}`,muted:!0,playsInline:!0,preload:"auto",className:"hidden",onError:t})]})}import{imageCopyUrl as QT,imageSrcSet as EU}from"efficient-shell/image-copies";var ZT;function cm(){return ZT===void 0?{}:{host:ZT}}var NIe="(max-width: 800px) 100vw, min(100vw, 1600px)";function JT(e,{fallbackWidth:o=1280,maxWidth:t}={}){let r=EU(e,{...cm(),...t===void 0?{}:{maxWidth:t}});return r?{src:QT(e,o,cm()),srcSet:r}:{src:e}}function MIe(e){let o=QT(e,1920,cm());return o===e?`url(${e})`:`url("${o}")`}import{formatFocal as OU,parseFocal as FU}from"efficient-shell/format";var LU="sf-focus-phone",AU="--sf-focus-phone";function eP(e){if(typeof e!="string"||!/^\s*-?\d+(\.\d+)?%\s+-?\d+(\.\d+)?%\s*$/.test(e))return{className:"",style:{}};let{x:o,y:t}=FU(e);return{className:LU,style:{[AU]:OU(o,t)}}}var BU=.5;function tP({videoSrc:e,posterSrc:o,showVideo:t=!0,playbackRate:r=BU,objectPosition:a="50% 50%",objectPositionPhone:n,quiet:s=!1}){let i=eP(n),c=o||"",d=e||"",[m,x]=Un(!1),[u,h]=Un(!1),[g,k]=Un(!1),[P,O]=Un(!1),[w,I]=Un(!1),b=RU(null);fm(()=>{x(!1),h(!1),k(!1),O(!1)},[e,o]),fm(()=>{if(typeof window>"u")return;let E=()=>{let A=window;A.requestIdleCallback?A.requestIdleCallback(()=>I(!0),{timeout:2e3}):setTimeout(()=>I(!0),800)};if(document.readyState==="complete"){E();return}return window.addEventListener("load",E,{once:!0}),()=>window.removeEventListener("load",E)},[]),fm(()=>{let E=b.current;if(!E)return;let A=()=>{E.playbackRate=r};return A(),E.addEventListener("loadedmetadata",A),()=>E.removeEventListener("loadedmetadata",A)},[e,r]);let v=Km(c),S=c&&v&&!u?JT(c):{src:c};return oP("div",{className:"absolute inset-0 z-[1]",children:[Ca("div",{className:"absolute inset-0",style:{background:"var(--site-surface)"}}),c&&(v?Ca("img",{src:S.src,...S.srcSet?{srcSet:S.srcSet,sizes:"100vw"}:{},alt:"",className:`absolute inset-0 z-[2] h-full w-full object-cover ${i.className}`.trim(),style:{display:m?"none":"block",objectPosition:a,...i.style},onError:()=>S.srcSet?h(!0):x(!0)},c):Ca(KT,{src:c,alt:"",fill:!0,priority:!0,sizes:"100vw",className:`z-[2] object-cover ${i.className}`.trim(),style:{display:m?"none":"block",objectPosition:a,...i.style},onError:()=>x(!0)},c)),t&&!s&&d&&w&&!g&&oP("video",{ref:b,autoPlay:!0,loop:!0,muted:!0,playsInline:!0,preload:"metadata",className:"absolute inset-0 z-[3] h-full w-full object-cover",style:{objectPosition:a},onError:()=>k(!0),children:[Vm(d)&&Ca("source",{src:d.replace(/\.mp4$/,".av1.mp4"),type:'video/mp4; codecs="av01.0.08M.10"'}),Ca("source",{src:d,type:"video/mp4"})]},d),t&&s&&d&&w&&!P&&(!c||m)&&Ca(XT,{src:d,objectPosition:a,onError:()=>O(!0)},d)]})}var rP=["top","middle","bottom"],aP=["left","center","right"],nP="bottom",sP="left",_U={top:"Top",middle:"Middle",bottom:"Bottom"},DU={left:"Left",center:"Center",right:"Right"},XIe="Up and down",ZIe="Sideways",NU={top:"flex-start",middle:"center",bottom:"flex-end"},MU={left:"flex-start",center:"center",right:"flex-end"},HU="--sf-hero-phone-y",zU="--sf-hero-phone-x";function WU(e){return rP.includes(e)?e:nP}function GU(e){return aP.includes(e)?e:sP}function lP(e,o){let t=WU(e),r=GU(o),a={};return t!==nP&&(a[HU]=NU[t]),r!==sP&&(a[zU]=MU[r]),a}function QIe(){return rP.map(e=>({label:_U[e],value:e}))}function JIe(){return aP.map(e=>({label:DU[e],value:e}))}import{hexToRgb as UU}from"efficient-shell/format";var $U=!0;var jU=[[0,".5"],[30,".1"],[60,".1"],[100,".85"]];function iP(e){let o=UU(e);return o?`${o.r},${o.g},${o.b}`:null}function cP(e){return e==null?$U:e!==!1}function fP(e){let o=(e?iP(e):null)??iP(Nr);return`linear-gradient(180deg, ${jU.map(([t,r])=>`rgba(${o},${r}) ${t}%`).join(", ")})`}var YU=KU({});function uge({name:e,process:o,mediaType:t="video",mediaSrc:r,videoSpeed:a,poster:n,objectPosition:s,objectPositionPhone:i,tintColor:c=Nr,tintOpacity:d=0,groups:m,editing:x=!1,themeClassName:u,themeStyle:h}){let{alignment:g="left",textureOpacity:k,textureOn:P,textureColor:O,quietVideo:w,phoneUpDown:I,phoneSideways:b}=VU(YU),v=t==="video",S=v?Pa(r):void 0,E=v?Pa(n):Pa(r)??Pa(n),A=typeof a=="number"?a/100:1;return qU("section",{className:u?`relative h-full w-full overflow-hidden ${u}`:"relative h-full w-full overflow-hidden",style:h,"data-slide-name":e??"","data-slide-process":o??"","data-slide-media":S?"video":"still",children:[$n(tP,{videoSrc:S,posterSrc:E,showVideo:v,playbackRate:A,objectPosition:s,objectPositionPhone:v?void 0:i,quiet:w}),d>0&&$n("div",{className:"absolute inset-0 z-[2]",style:{background:c,opacity:Math.min(Math.max(d,0),100)/100}}),cP(P)&&$n("div",{className:"absolute inset-0 z-[2]",style:{background:fP(O),...k!==void 0?{opacity:k/100}:null}}),$n("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:{...Jh,...lP(I,b)},children:m&&$n(m,{className:"sf-hero-group-zone",minEmptyHeight:160})})]})}var dP=Array.from({length:3},(e,o)=>({name:`Slide ${o+1}`,process:"Category",mediaType:"image",mediaVideo:"",poster:""}));import{newNodeId as uP}from"efficient-easel/draw";var XU="ImageBlock",ZU=3,Vi=(e,o,t={})=>({type:e,props:{...o?.(e)??{},id:uP(e),...t}}),QU=e=>({...e?.(ee)??{},direction:"column",[Ht]:[Vi(XU,e),Vi(ee,e,{direction:"column",[Ht]:[Vi("Text",e,bo()),Vi("Text",e)]})]}),Yo={Hero:{slot:"slides",childType:"HeroSlide",addLabel:"Add slide",slider:!0,seeds:()=>dP.map(e=>({...e}))},HeroSlide:{slot:"groups",childType:"HeroGroup",addLabel:`Add ${Mt.toLowerCase()}`,seeds:()=>[],addBlocked:fs,notice:Gc},HeroSingle:{slot:"boxes",childType:"HeroGroup",addLabel:`Add ${Mt.toLowerCase()}`,seeds:()=>[],addBlocked:fs,notice:Gc},ProcessSteps:{slot:"boxes",childType:ee,addLabel:`Add ${Mt.toLowerCase()}`,seeds:e=>Array.from({length:ZU},()=>QU(e)),skipSeed:e=>Array.isArray(e.steps)&&e.steps.length>0}};function bge(e){for(let[o,t]of Object.entries(e)){if(o in Yo&&Yo[o]!==t)throw new Error(`lib/document/slot-specs: "${o}" already has a slot spec`);Yo[o]=t}}function Sge(e,o){let t=Yo[e];return t?{slot:t.slot,children:t.seeds(o).map(r=>({type:t.childType,props:{id:uP(t.childType),...r}}))}:null}var mP=()=>({}),xP=new Map;function JU(e){let o=xP.get(e);if(o)return o;let t=new Set,r=Yo[e];if(r)for(let s of r.seeds(mP))for(let i of pP({type:r.childType,props:s}))t.add(i);let a=Ki(e);if(a){let s=0;for(let i of pP(a(mP,c=>`${c}-${s+=1}`)))t.add(i)}t.delete(e);let n=[...t].sort();return xP.set(e,n),n}function e$(e){if(!e||!e.sets&&!e.allow&&!e.deny?.length)return null;let o=Lp(e),t=e.allow?new Set(e.allow):null,r=new Set(e.deny??[]),a=new Set(Object.keys(e.host??{})),n=c=>{if(r.has(c))return!1;if(a.has(c))return!0;let d=Kw(c);return!d||!o[d]?!1:t?t.has(c):!0},s=new Map,i=c=>{let d=s.get(c);if(d!==void 0)return d;s.set(c,!1);let m=n(c)&&JU(c).every(i);return s.set(c,m),m};return{sets:o,offers:i}}var o$="block-offer";function dm(e=hP()){return e.cache(o$,()=>e$(Ss(e)))}function IP(e,o=hP()){let t=dm(o);return t?t.offers(e):!0}function gP(e,o=0){let t=r$(e,o),r=t?dm():null;return t&&r?t$(t,r):t}function t$(e,o){if(e.spec)return o.offers(e.spec.childType)?e:null;let t=e.choices??[],r=t.filter(a=>o.offers(a.type));return r.length===t.length?e:r.length>0?{...e,choices:r}:null}function r$(e,o){let t=Yo[e];if(t)return{source:"section",slot:t.slot,choices:null,spec:t};let r=Xw(e,o);if(r)return{source:"container",slot:r.slot,choices:r.choices,spec:null};let a=gC(e);return a?{source:"footer",slot:IC,choices:a,spec:null}:null}function yP(e){return Cu(e.type)?[{slot:Su,label:l(RS),rung:!0}]:null}import{useSyncExternalStore as a$}from"react";var um=null,pm=new Set;function bP(e){if(um!==e){um=e;for(let o of pm)o()}}function n$(e){return pm.add(e),()=>{pm.delete(e)}}function Wge(){return a$(n$,()=>um,()=>null)}function SP(e){return Fa(e)?.ownerId??null}function CP(e,o){let t=e.props;if(e.type==="FooterMenu"){let r=t.menu;return t.heading||r?.name||l("Menu")}if(e.type==="FooterText"){let r=typeof t.text=="string"?t.text.trim():"";return r?r.length>28?`${r.slice(0,28)}\u2026`:r:l("Text")}return e.type==="FooterEmailSignup"?t.heading||l("Email signup"):o(e.type)}var wP=(e,o,t)=>{if(o!=="block"||e.props?.fromProduct!==!0)return t;let r=e.props.product;return!r?.code||typeof r.name!="string"?t:r.name.trim()||t};var kP="sf-editor-left-view";function vP(){if(typeof window>"u")return"pages";try{let e=window.localStorage.getItem(kP);return e==="sections"||e==="styles"?e:"pages"}catch{return"pages"}}function TP(e){if(!(typeof window>"u"))try{window.localStorage.setItem(kP,e)}catch{}}function PP(e,o){return e==="styles"&&!o?"sections":e}function EP(e,o){return e?"sections":o}import{isNode as s$}from"efficient-easel/data";var OP="Footer",l$=[be,OP,xe],wa=e=>{let o=e?.content;return Array.isArray(o)?o:[]},Cr=e=>{let o=e?.zones;return o&&typeof o=="object"&&!Array.isArray(o)?o:null},jn=e=>{let o=e?.props?.id;return typeof o=="string"?o:void 0},FP=e=>Fa(e)?.ownerId??"";function LP(e){let o=ca(wa(e)),t=o.some(r=>r?.type===xe);return o.filter(r=>r?.type===be||r?.type===xe||r?.type===OP&&!t)}function mm(e,o){let t=new Set,r=a=>{if(Array.isArray(a)){for(let n of a)r(n);return}if(!(!a||typeof a!="object")){if(s$(a)){let n=jn(a);n&&t.add(n)}for(let n of Object.values(a))r(n)}};if(r(e),o){let a=!0,n=new Set;for(;a;){a=!1;for(let[s,i]of Object.entries(o))n.has(s)||!t.has(FP(s))||(n.add(s),r(i),a=!0)}}return t}function xm(e,o){let t={},r={};for(let[a,n]of Object.entries(e??{}))(o.has(FP(a))?t:r)[a]=n;return{owned:t,rest:r}}function Xge(e,o){if(!o)return e;let t=LP(o);if(!t.length)return e;let r=t.filter(i=>i.type===be),a=t.filter(i=>i.type!==be),n={...e,content:[...r,...wa(e),...a]},{owned:s}=xm(Cr(o),mm(t,Cr(o)));return Object.keys(s).length&&(n.zones={...Cr(e)??{},...s}),n}function Zge(e,o){if(!o)return{page:e,chrome:null};let t=LP(o),r=new Set(t.map(jn).filter(w=>!!w)),a=[],n=[];for(let w of wa(e)){let I=jn(w);I&&r.has(I)||ia(w?.type)?n.push(w):a.push(w)}let s=new Map(n.map(w=>[jn(w),w])),i=new Set,c=ca(wa(o)).flatMap(w=>{let I=jn(w);if(!I||!r.has(I))return[w];let b=s.get(I);return b?(i.add(b),[b]):[]});for(let w of n)i.has(w)||c.some(I=>I?.type===w.type)||(c=w.type===be?[w,...c]:[...c,w]);c=ca(c);let d=c.length===wa(o).length&&c.every((w,I)=>w===wa(o)[I]),m=Cr(e),x=mm(c,m),{owned:u,rest:h}=xm(m,x),g=xm(Cr(o),mm(t,Cr(o))).owned,k={...o,content:d?o.content:[...c]},P=Cr(o);if(P||Object.keys(u).length){let w={};for(let[I,b]of Object.entries(P??{}))I in g?I in u&&(w[I]=u[I]):w[I]=b;for(let[I,b]of Object.entries(u))I in w||(w[I]=b);k.zones=w,P&&i$(k.zones,P)&&(k.zones=P)}let O={...e,content:a};return m&&(Object.keys(h).length||!Object.keys(g).length?O.zones=h:delete O.zones),{page:O,chrome:k}}function i$(e,o){let t=Object.keys(e),r=Object.keys(o);return t.length===r.length&&t.every((a,n)=>a===r[n]&&e[a]===o[a])}function AP(e,o){return t=>e(t)||t!==void 0&&l$.includes(t)&&o()}var Yi=null;function Jge(e){Yi=e}function RP(){return!!(Yi&&Yi.state().lockHolder)}function wr(){return Yi!==null}var c$=new Set(["BookingBox","SubmitBox"]);function f$(e){return typeof e=="string"&&c$.has(e)}var d$=AP(f$,RP);function BP(e,o){return d$(e)||bf(o)}import{copyNode as u$}from"efficient-easel/data";var _P=null;function nye(e){_P=e}function gt(){return _P}var DP=null;function hm(e){DP=e}function Xi(){return DP}function NP(e){let o=typeof e?.props?.id=="string"?e.props.id:null,t=gt(),r=o&&t?t.sectionOf(o):null;if(!t||!r)return null;let a=t.usedOn(r);return a?a.length===1?l("On 1 page"):l("On {count} pages",{count:a.length}):l("On other pages")}var MP={usedOn:e=>{let o=gt(),t=o?.sectionOf(e.props.id)??null;return!o||!t?null:o.usedOn(t)??[]},openPage:e=>Xi()?.openPage(e),adopt:(e,o)=>gt()?.adopt(e.props.id,o),nodeOf:e=>gt()?.place(e)??null,detach:e=>{let o=Xi()?.config;return o?u$(e,o):e},removed:()=>Xi()?.reload()};import{sharedSectionsOf as x8}from"efficient-easel/screen/lib/shared-sections";import{scrollPreviewToSection as h8,scrollPreviewToTop as c0}from"efficient-easel/screen/lib/document/preview-dom";import{jsx as ym,Fragment as H$,jsxs as z$}from"react/jsx-runtime";import{useEffect as W$,useMemo as XP,useRef as ZP}from"react";import{EaselCanvas as G$,useEaselApi as U$}from"efficient-easel/easel";import{jsx as UP,Fragment as S$,jsxs as C$}from"react/jsx-runtime";import{useEffect as $P,useLayoutEffect as w$}from"react";var Zi="data-theme",HP="light";function p$(e){return e.getAttribute(Zi)===HP?"light":"dark"}function m$(e,o){return p$(e)===o?!1:(o==="light"?e.setAttribute(Zi,HP):e.removeAttribute(Zi),!0)}function x$(e){return pc(e).getItem(rc)}function pye(e,o){pc(e).setItem(rc,o)}function h$(e,o,t=new Date().getHours()){return Pm({mode:o.mode,override:x$(e),switchShown:o.switchShown,hour:t})}function zP(e,o){let t=e.documentElement;if(!t)return()=>{};let r=()=>m$(t,h$(e,o));r();let a=e.defaultView?.MutationObserver;if(!a)return()=>{};let n=new a(r);return n.observe(t,{attributes:!0,attributeFilter:[Zi]}),()=>n.disconnect()}var I$="style";function g$(e,o){let t=Bm(o),r=!1;for(let a of Rm){let n=t[a]??"";e.style.getPropertyValue(a)!==n&&(n?e.style.setProperty(a,n):e.style.removeProperty(a),r=!0)}return r}function WP(e,o){let t=e.body;if(!t)return()=>{};let r=()=>g$(t,o);r();let a=e.defaultView?.MutationObserver;if(!a)return()=>{};let n=new a(r);return n.observe(t,{attributes:!0,attributeFilter:[I$]}),()=>n.disconnect()}var y$=String.raw`(function (doc) {
|
|
27
|
+
if (doc.__sfFitWords) return;
|
|
28
|
+
var win = doc.defaultView;
|
|
29
|
+
var SELECTOR = "h1,h2,h3,h4,h5,h6,[class*='font-heading'],[class*='font-display']";
|
|
30
|
+
// Body text a block asked to shrink (its Text group's Shrink to fit), beside
|
|
31
|
+
// the headings: what this script may fit at all. modeOf() decides each one.
|
|
32
|
+
var SHRINK_BODY = "[data-fit] p,[data-fit] li,[data-fit-phone] p,[data-fit-phone] li";
|
|
33
|
+
var CANDIDATES = SELECTOR + "," + SHRINK_BODY;
|
|
34
|
+
var MIN_SCALE = 0.3, MIN_PX = 16, SLACK = 1, PHONE_BELOW = 800;
|
|
35
|
+
|
|
36
|
+
// A block's own answer (lib/content/block-size, the wrapper's attributes):
|
|
37
|
+
// data-fit "wrap" | "shrink" and data-fit-min, each with its phone twin read
|
|
38
|
+
// under 800px. With none, a heading shrinks and body text wraps, as always.
|
|
39
|
+
function phone() { return win.innerWidth < PHONE_BELOW; }
|
|
40
|
+
function own(el, attr) {
|
|
41
|
+
var holder = el.closest("[" + attr + "],[" + attr + "-phone]");
|
|
42
|
+
if (!holder) return null;
|
|
43
|
+
return (phone() && holder.getAttribute(attr + "-phone")) || holder.getAttribute(attr);
|
|
44
|
+
}
|
|
45
|
+
function modeOf(el) {
|
|
46
|
+
var mode = own(el, "data-fit");
|
|
47
|
+
if (mode === "wrap" || mode === "shrink") return mode;
|
|
48
|
+
return el.matches(SELECTOR) ? "shrink" : "wrap";
|
|
49
|
+
}
|
|
50
|
+
function floorOf(el, set) {
|
|
51
|
+
var min = parseFloat(own(el, "data-fit-min"));
|
|
52
|
+
return min >= 0 ? min : Math.max(set * MIN_SCALE, MIN_PX);
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
function measure(el) {
|
|
56
|
+
var widest = 0, current = 0, last = null, split = false, lastBlock = null;
|
|
57
|
+
function blockOf(n) {
|
|
58
|
+
for (var p = n.parentElement; p && p !== el; p = p.parentElement) {
|
|
59
|
+
var d = win.getComputedStyle(p).display;
|
|
60
|
+
if (d.indexOf("inline") !== 0 && d !== "contents") return p;
|
|
61
|
+
}
|
|
62
|
+
return el;
|
|
63
|
+
}
|
|
64
|
+
function close() { if (current > widest) widest = current; current = 0; last = null; }
|
|
65
|
+
var walker = doc.createTreeWalker(el, 5), range = doc.createRange(), node;
|
|
66
|
+
while ((node = walker.nextNode())) {
|
|
67
|
+
if (node.nodeType === 1) {
|
|
68
|
+
if (node.tagName === "BR" || node.tagName === "WBR") close();
|
|
69
|
+
continue;
|
|
70
|
+
}
|
|
71
|
+
var block = blockOf(node);
|
|
72
|
+
if (block !== lastBlock) close();
|
|
73
|
+
lastBlock = block;
|
|
74
|
+
var re = /(\S+)|(\s+)/g, m;
|
|
75
|
+
while ((m = re.exec(node.data))) {
|
|
76
|
+
if (m[2]) { close(); continue; }
|
|
77
|
+
range.setStart(node, m.index);
|
|
78
|
+
range.setEnd(node, m.index + m[0].length);
|
|
79
|
+
var rects = range.getClientRects();
|
|
80
|
+
for (var i = 0; i < rects.length; i++) {
|
|
81
|
+
var r = rects[i];
|
|
82
|
+
if (r.width <= 0) continue;
|
|
83
|
+
current += r.width;
|
|
84
|
+
if (last && r.top > last.top + last.height / 2) split = true;
|
|
85
|
+
last = r;
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
close();
|
|
90
|
+
return { widest: widest, split: split };
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
function lineWidth(el) {
|
|
94
|
+
var cs = win.getComputedStyle(el);
|
|
95
|
+
return el.getBoundingClientRect().width - parseFloat(cs.paddingLeft) - parseFloat(cs.paddingRight)
|
|
96
|
+
- parseFloat(cs.borderLeftWidth) - parseFloat(cs.borderRightWidth);
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
// ⚠️ THE HEADING ELEMENT IS NEVER TOUCHED — no style="", no data-*. This
|
|
100
|
+
// runs before React hydrates, and React 19 in development reports ANY
|
|
101
|
+
// attribute that differs from what it rendered ("a tree hydrated but some
|
|
102
|
+
// attributes didn't match"): first our inline font-size on the hero (which
|
|
103
|
+
// React owns via --heading-size), then, when that moved to a data-sf-fit
|
|
104
|
+
// attribute, the attribute itself. So the fitted size lives only in this
|
|
105
|
+
// script's own stylesheet, in <head>, addressed to each heading by its
|
|
106
|
+
// POSITION (":root>*:nth-child(2)>…"). A position goes stale when the page's
|
|
107
|
+
// structure changes, so the rules are rewritten in the MutationObserver
|
|
108
|
+
// callback, which runs before the next paint. !important so the size also
|
|
109
|
+
// beats a part's own inline size.
|
|
110
|
+
var head = doc.head || doc.documentElement;
|
|
111
|
+
var fitEl = doc.createElement("style");
|
|
112
|
+
fitEl.id = "storefront-fit-words-sizes";
|
|
113
|
+
head.appendChild(fitEl);
|
|
114
|
+
// heading -> [[element, fitted size]]: the heading and each Text part inside
|
|
115
|
+
// it that holds its own size (a span [data-sf-part-styled]), e.g.
|
|
116
|
+
// [[h2, "43.8px"], [span, "43.8px"]]. Sizing the heading alone leaves such
|
|
117
|
+
// a part at its own size, and the word still breaks (card C25, Spec Table).
|
|
118
|
+
var fitted = new Map();
|
|
119
|
+
|
|
120
|
+
function pathOf(el) {
|
|
121
|
+
var parts = [];
|
|
122
|
+
for (var e = el; e && e.parentElement; e = e.parentElement) {
|
|
123
|
+
var i = 1, s = e;
|
|
124
|
+
while ((s = s.previousElementSibling)) i++;
|
|
125
|
+
parts.unshift("*:nth-child(" + i + ")");
|
|
126
|
+
}
|
|
127
|
+
return ":root>" + parts.join(">");
|
|
128
|
+
}
|
|
129
|
+
function writeRules() {
|
|
130
|
+
var css = "";
|
|
131
|
+
fitted.forEach(function (sizes, el) {
|
|
132
|
+
if (!el.isConnected) { fitted.delete(el); return; }
|
|
133
|
+
for (var i = 0; i < sizes.length; i++) css += pathOf(sizes[i][0]) + "{font-size:" + sizes[i][1] + " !important}";
|
|
134
|
+
});
|
|
135
|
+
if (fitEl.textContent !== css) fitEl.textContent = css;
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
function unfit(el) {
|
|
139
|
+
if (fitted.delete(el)) writeRules();
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
function fits(el) {
|
|
143
|
+
var m = measure(el);
|
|
144
|
+
return !m.split && m.widest <= lineWidth(el) + SLACK;
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
function fit(el) {
|
|
148
|
+
unfit(el);
|
|
149
|
+
if (modeOf(el) !== "shrink") return; // the block's own Wrap
|
|
150
|
+
if (lineWidth(el) <= 0) return; // hidden, or not laid out yet
|
|
151
|
+
if (fits(el)) return;
|
|
152
|
+
var set = parseFloat(win.getComputedStyle(el).fontSize);
|
|
153
|
+
if (!set) return;
|
|
154
|
+
var floor = floorOf(el, set);
|
|
155
|
+
if (floor >= set) return;
|
|
156
|
+
function size(px) { return Math.floor(px * 10) / 10 + "px"; }
|
|
157
|
+
// The SEARCH tries sizes on the element's own style and then puts that
|
|
158
|
+
// attribute back byte for byte (or removes it, if it had none), so nothing
|
|
159
|
+
// is left for React to see. A trial in a stylesheet instead restyles the
|
|
160
|
+
// whole page per step: a full pass on the Hartes home took 75–160ms at 4x
|
|
161
|
+
// CPU that way.
|
|
162
|
+
// Every trial scales the heading AND each part inside it that holds its
|
|
163
|
+
// own size, by the same ratio, so a part keeps its proportion to the
|
|
164
|
+
// heading.
|
|
165
|
+
var carriers = [el].concat(Array.prototype.slice.call(el.querySelectorAll("[data-sf-part-styled]")));
|
|
166
|
+
var base = carriers.map(function (c) { return parseFloat(win.getComputedStyle(c).fontSize) || set; });
|
|
167
|
+
var saved = carriers.map(function (c) { return c.hasAttribute("style") ? c.getAttribute("style") : null; });
|
|
168
|
+
function attempt(px) {
|
|
169
|
+
for (var i = 0; i < carriers.length; i++) carriers[i].style.setProperty("font-size", size(base[i] * px / set), "important");
|
|
170
|
+
}
|
|
171
|
+
function done() {
|
|
172
|
+
for (var i = 0; i < carriers.length; i++) {
|
|
173
|
+
if (saved[i] !== null) carriers[i].setAttribute("style", saved[i]); else carriers[i].removeAttribute("style");
|
|
174
|
+
}
|
|
175
|
+
}
|
|
176
|
+
attempt(floor);
|
|
177
|
+
if (!fits(el)) { done(); return; } // even the floor does not fit: leave it as set
|
|
178
|
+
var lo = floor, hi = set;
|
|
179
|
+
for (var i = 0; i < 8; i++) {
|
|
180
|
+
var mid = (lo + hi) / 2;
|
|
181
|
+
attempt(mid);
|
|
182
|
+
if (fits(el)) lo = mid; else hi = mid;
|
|
183
|
+
}
|
|
184
|
+
done();
|
|
185
|
+
fitted.set(el, carriers.map(function (c, i) { return [c, size(base[i] * lo / set)]; }));
|
|
186
|
+
writeRules();
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
// What each heading measured right after we last fitted it, so the
|
|
190
|
+
// ResizeObserver below can tell a real change (a font swap, a rotate, a
|
|
191
|
+
// container that moved) from the size change our own write just caused.
|
|
192
|
+
var seen = new WeakMap();
|
|
193
|
+
function remember(el) {
|
|
194
|
+
var b = el.getBoundingClientRect();
|
|
195
|
+
seen.set(el, b.width + "x" + b.height);
|
|
196
|
+
}
|
|
197
|
+
function fitAndRemember(el) { fit(el); remember(el); }
|
|
198
|
+
|
|
199
|
+
// ⚠️ A ResizeObserver, NOT fonts.ready or a resize event, and the reason is
|
|
200
|
+
// WHEN it runs: after layout, BEFORE paint. The web font arriving re-wraps a
|
|
201
|
+
// fitted heading, and fonts.ready resolves only after that frame is painted —
|
|
202
|
+
// measured on the Hartes hero: a 42px jump in 2 of 3 loads. A size change
|
|
203
|
+
// reported here is fitted in the same frame, so the broken state is never
|
|
204
|
+
// drawn. It also covers a container that resizes.
|
|
205
|
+
var ro = new win.ResizeObserver(function (entries) {
|
|
206
|
+
for (var i = 0; i < entries.length; i++) {
|
|
207
|
+
var el = entries[i].target;
|
|
208
|
+
var b = el.getBoundingClientRect();
|
|
209
|
+
if (seen.get(el) === b.width + "x" + b.height) continue; // our own write
|
|
210
|
+
fitAndRemember(el);
|
|
211
|
+
}
|
|
212
|
+
});
|
|
213
|
+
// Its own set, not seen: fitAndRemember has written seen by the
|
|
214
|
+
// time watch runs, so a seen test observed no heading at all, and a
|
|
215
|
+
// heading fitted in the fallback face was never fitted again when the web
|
|
216
|
+
// font arrived (hartesmetal.com.au, "FusionForge." with its "." alone).
|
|
217
|
+
var watched = new WeakSet();
|
|
218
|
+
function watch(el) { if (!watched.has(el)) { watched.add(el); ro.observe(el); } }
|
|
219
|
+
|
|
220
|
+
function fitAll() {
|
|
221
|
+
var els = doc.querySelectorAll(CANDIDATES);
|
|
222
|
+
for (var i = 0; i < els.length; i++) {
|
|
223
|
+
if (modeOf(els[i]) === "shrink") { fitAndRemember(els[i]); watch(els[i]); }
|
|
224
|
+
else unfit(els[i]); // Wrap here (a phone value may differ from the desktop's)
|
|
225
|
+
}
|
|
226
|
+
}
|
|
227
|
+
|
|
228
|
+
var queued = 0, all = false, touched = new Set();
|
|
229
|
+
function run() {
|
|
230
|
+
queued = 0;
|
|
231
|
+
if (all) { all = false; touched.clear(); fitAll(); return; }
|
|
232
|
+
var els = Array.from(touched);
|
|
233
|
+
touched.clear();
|
|
234
|
+
for (var i = 0; i < els.length; i++) {
|
|
235
|
+
if (!els[i].isConnected) continue;
|
|
236
|
+
if (modeOf(els[i]) === "shrink") { fitAndRemember(els[i]); watch(els[i]); }
|
|
237
|
+
else unfit(els[i]);
|
|
238
|
+
}
|
|
239
|
+
}
|
|
240
|
+
function schedule() { if (!queued) queued = win.requestAnimationFrame(run); }
|
|
241
|
+
function scheduleAll() { all = true; schedule(); }
|
|
242
|
+
|
|
243
|
+
fitAll();
|
|
244
|
+
// A backstop only: a font that changes widths without changing any
|
|
245
|
+
// heading's box is not seen by the ResizeObserver.
|
|
246
|
+
if (doc.fonts && doc.fonts.ready) doc.fonts.ready.then(scheduleAll, function () {});
|
|
247
|
+
|
|
248
|
+
// …and the viewport WIDTH, which the ResizeObserver cannot stand in for: a
|
|
249
|
+
// heading sized to its own text (fit-content, a flex item) keeps the SAME box
|
|
250
|
+
// when the phone turns to 844, so nothing reports a change and it would stay
|
|
251
|
+
// shrunk. The probe's rotate check caught exactly that.
|
|
252
|
+
var lastWidth = win.innerWidth;
|
|
253
|
+
function onResize() {
|
|
254
|
+
if (win.innerWidth === lastWidth) return; // a phone's toolbar changing HEIGHT is not our business
|
|
255
|
+
lastWidth = win.innerWidth;
|
|
256
|
+
scheduleAll();
|
|
257
|
+
}
|
|
258
|
+
win.addEventListener("resize", onResize);
|
|
259
|
+
|
|
260
|
+
var mo = new win.MutationObserver(function (records) {
|
|
261
|
+
// Positions first: a node added or removed anywhere can shift the
|
|
262
|
+
// nth-child path of a fitted heading, and this callback runs before paint.
|
|
263
|
+
if (fitted.size) {
|
|
264
|
+
for (var q = 0; q < records.length; q++) if (records[q].type === "childList") { writeRules(); break; }
|
|
265
|
+
}
|
|
266
|
+
for (var i = 0; i < records.length; i++) {
|
|
267
|
+
var r = records[i];
|
|
268
|
+
// A block's Wrap / Shrink to fit or Min font size changed in the editor:
|
|
269
|
+
// only a data-fit attribute moved, so every heading is measured again.
|
|
270
|
+
if (r.type === "attributes") { scheduleAll(); continue; }
|
|
271
|
+
var target = r.target.nodeType === 1 ? r.target : r.target.parentElement;
|
|
272
|
+
var owner = target && target.closest(CANDIDATES);
|
|
273
|
+
if (owner) touched.add(owner);
|
|
274
|
+
for (var j = 0; j < r.addedNodes.length; j++) {
|
|
275
|
+
var n = r.addedNodes[j];
|
|
276
|
+
if (n.nodeType !== 1) continue;
|
|
277
|
+
if (n.matches(CANDIDATES)) touched.add(n);
|
|
278
|
+
var inner = n.querySelectorAll(CANDIDATES);
|
|
279
|
+
for (var k = 0; k < inner.length; k++) touched.add(inner[k]);
|
|
280
|
+
}
|
|
281
|
+
}
|
|
282
|
+
if (touched.size) schedule();
|
|
283
|
+
});
|
|
284
|
+
mo.observe(doc.body, {
|
|
285
|
+
childList: true,
|
|
286
|
+
subtree: true,
|
|
287
|
+
characterData: true,
|
|
288
|
+
attributes: true,
|
|
289
|
+
attributeFilter: ["data-fit", "data-fit-phone", "data-fit-min", "data-fit-min-phone"],
|
|
290
|
+
});
|
|
291
|
+
|
|
292
|
+
doc.__sfFitWords = function stop() {
|
|
293
|
+
win.removeEventListener("resize", onResize);
|
|
294
|
+
ro.disconnect();
|
|
295
|
+
mo.disconnect();
|
|
296
|
+
if (queued) win.cancelAnimationFrame(queued);
|
|
297
|
+
fitted.clear();
|
|
298
|
+
fitEl.remove();
|
|
299
|
+
delete doc.__sfFitWords;
|
|
300
|
+
};
|
|
301
|
+
// For the probe and for debugging: which headings are fitted, at what size,
|
|
302
|
+
// and the sheet that holds it (disable it to read a heading's set size).
|
|
303
|
+
doc.__sfFitWords.fitted = fitted;
|
|
304
|
+
doc.__sfFitWords.sheet = fitEl;
|
|
305
|
+
// …and the two questions a block's own answer changes, for the guard
|
|
306
|
+
// (scripts/test-block-size.tsx §5): which mode an element is in, and its floor.
|
|
307
|
+
doc.__sfFitWords.modeOf = modeOf;
|
|
308
|
+
doc.__sfFitWords.floorOf = floorOf;
|
|
309
|
+
})(document);`,b$="storefront-fit-words";function GP(e){let o=e.createElement("script");return o.id=b$,o.textContent=y$,(e.head??e.documentElement).appendChild(o),()=>{e.__sfFitWords?.(),o.remove()}}var k$=`
|
|
310
|
+
[${Lo}][${Lo}] { cursor: text; }
|
|
311
|
+
`;function jP({children:e,document:o}){let{theme:t,themeMode:r,themeSwitchShown:a}=oe(),n=Ge(t);return $P(()=>{if(o)return zP(o,{mode:r,switchShown:a})},[o,r,a]),$P(()=>{if(o)return WP(o,n)},[o,n]),w$(()=>{if(o)return GP(o)},[o]),C$(S$,{children:[UP(lx,{}),UP("style",{children:k$}),e]})}import{jsx as Im}from"react/jsx-runtime";import{useEffect as v$,useState as T$}from"react";import{Banner as P$}from"efficient-shell/ui";var Qi={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."},E$={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."},O$=Qi.load,F$=Qi.lock,L$=Qi.conflict,A$=Qi.save;function R$(e){if(!e)return null;if(e.loadFailed)return l(O$);if(e.lockHolder)return l(F$,{name:e.lockHolder.name||l("Somebody else")});if(e.conflict)return l(L$);if(e.saveFailed)return l(A$);let o=e.sections?.[0];if(!o)return null;let t=o.title||l("A shared section"),r=o.holder?.name||l("Somebody else");return l(E$[o.problem],{section:t,name:r})}function B$({report:e}){let o=R$(ki(e)),[t,r]=T$(null);return v$(()=>{o||r(null)},[o]),!o||t===o?null:Im("aside",{className:"sf-canvas-notice",children:Im(P$,{tone:"warning",onDismiss:()=>r(o),children:o})})}function qP(){return Im(B$,{report:vi()})}import{jsx as Ji}from"react/jsx-runtime";import{useState as KP}from"react";import{Banner as _$,Button as D$}from"efficient-shell/ui";import{UndoIcon as N$}from"efficient-shell/icons/efficient";import{useScreenDocument as M$}from"efficient-easel/screen/components/ScreenDocumentContext";function VP(){let e=Rk(),{adapter:o,flushSave:t,reloadFromServer:r}=M$(),a=o.siteVersions,[n,s]=KP(!1),[i,c]=KP(!1);if(!e)return null;let d=async()=>{if(!(!a||n)){s(!0),c(!1);try{await Dk({access:a,flushSave:t,reload:r})}catch{c(!0)}finally{s(!1)}}};return Ji("aside",{className:"sf-canvas-notice",children:Ji(_$,{tone:i?"danger":"info",title:e.title,onDismiss:Ti,action:a&&e.undo?Ji(D$,{variant:"secondary",size:"sm",leftIcon:Ji(N$,{}),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 $$}from"efficient-easel/draw/client";import{useSectionOps as j$}from"efficient-easel/screen/lib/document/use-section-ops";var YP=null;function gm(e){YP=e}function Hye(){return YP}function QP(e){let{mirrorHostStyles:o}=hc(),t=cx(),{sectionBackgroundWidth:r,themeFromDocument:a}=oe(),n=Xm(),s=XP(()=>({...e.metadata??t??{},...kg(a?null:r,n)}),[e.metadata,t,r,n,a]);W$(()=>(gm(n),()=>gm(null)),[n]);let i=ZP(null),c=q$(i),{onDocument:d}=e,m=x=>{i.current=x,d?.(x)};return z$(H$,{children:[ym(VP,{}),ym(qP,{}),ym(G$,{...e,onDocument:m,typing:c,metadata:s,height:"fill",mirrorStyles:o,frameWrapper:jP})]})}function q$(e){let o=U$(),t=j$(),r=$$(),a=ZP({ops:t,parts:r});return a.current={ops:t,parts:r},XP(()=>{let n={getItemById:i=>o.getState().getItemById(i),getSelectorForId:i=>o.getState().getSelectorForId(i),get components(){return o.getState().config.components},replace:(i,c,d)=>a.current.ops.replaceComponent(i,c,d)},s=(i,c)=>{let d=MS(i,n);if(!d)return null;let m=c,x=()=>(m=HS(m,m?.ownerDocument??e.current,i),m),u=x();return u?{element:x,value:d.value,rules:d.rules,multiline:d.multiline,write:d.write,toolbar:{offered:d.offered,colors:d.offered.length>0?Kl(YS(u)):void 0}}:null};return{at:i=>{let c=i.closest(`[${Lo}]`),d=c?.getAttribute(Lo);return c&&d?s(d,c):null},atSelection:()=>{let i=a.current.parts.selectedPartId;return i?s(i,null):null},onChange:i=>{if(!i.typing){Tu(null);return}let c=i.element.closest(`[${Lo}]`)?.getAttribute(Lo)??null;Tu(c),c&&a.current.parts.selectedPartId!==c&&a.current.parts.select(c)}}},[o,e])}var K$=Ym.mediaFields,V$=/video|poster|focal|phone/i;function JP(e){return(K$[e]??[]).find(o=>!o.includes("[]")&&!V$.test(o))??null}var e0={adds:{kind:"block",type:"ImageBlock"},takes:e=>JP(e.type)!==null,replace:(e,o)=>{let t=JP(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 o0={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 Y$="Save your page changes first";function t0(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:Y$}:{visible:!0,enabled:!0}:{visible:!1,hiddenReason:"no-site"}:{visible:!1,hiddenReason:"not-operator"}:{visible:!1,hiddenReason:"no-console"}}var r0="storefront-editor:save-as-template";var qn="ContactLocations",X$="CityPictures",Z$="CityMaps",Q$=[{key:X$,label:"City pictures",desc:"A wall of city photos, grouped by region. Each photo links to its city's card."},{key:Z$,label:"City maps",desc:"A card per city, grouped by region: address, phone, hours and a map."}];function a0(e=Si){let o=Nt.find(t=>t.sections.some(r=>r.type===qn))?.key;return!e.includes(qn)||!o?[]:Q$.map(({key:t,label:r,desc:a},n)=>({key:t,label:r,cat:o,after:qn,desc:a,alias:"locations offices stores branches",insert:s=>{let i=Ci(qn);return i?im(qn,i,n)(s.nodeDefaults,s.newNodeId):null}}))}var J$="plain",n0=[{label:"Plain",value:"plain"},{label:"Filled",value:"filled"},{label:"Line",value:"line"}],e8="line",o8={KeyFeatures:"filled"};function Kn(e){return o8[e]??J$}function pbe(e,o){return oo(n0,Kn(o),e)}function mbe(e){return oo(n0,e8,e)}function s0(e,{nodeDefaults:o,newNodeId:t,sectionLabel:r,blockIsOffered:a}){let n=Ki(e);return n?n(o,t):Zw(e)&&a(ee)&&a(pa)?{type:ee,props:{...o(ee),id:t(ee),direction:"column",name:`${r(e)} section`,content:[{type:pa,props:{...o(pa),id:t(pa),...Qe[e]?.headStyle?{headStyle:Qe[e].headStyle}:{},...Qe[e]?.headRowGap?{rowGap:Qe[e].headRowGap}:{},...Qe[e]?.headDescriptionSize?{descriptionSize:Qe[e].headDescriptionSize}:{},...Kn(e)!==Kn(pa)?{eyebrowLook:Kn(e)}:{}}},{type:e,props:{...o(e),id:t(e),headPlacement:"own-box"}}]}}:Yo[e]?.fixed===!0?{type:e,props:{...o(e),id:t(e),layout:"boxes"}}:null}import{useEffect as t8,useState as r8}from"react";import{useEaselSession as a8}from"efficient-easel/screen/lib/session-context";function l0(){let e=a8().chrome?.products?.list,[o,t]=r8(null);return t8(()=>{if(!e)return;let r=!1;return e().then(a=>{r||t(a)}),()=>{r=!0}},[e]),o}function I0({mode:e,open:o}){let{setSelectedHeroId:t,setSelectHandler:r}=lS(),a=x0().tree,n=e,s=n.kind==="ticker"?n.heroId:null,i=Yn(c=>{c&&(o({kind:"ticker",heroId:c}),h8(c))},[o]);return Xo(()=>{t(s)},[s,t]),Xo(()=>{r(i)},[r,i]),{partRows:(c,{rowClick:d})=>{let m=String(c.props.id);return c.type==="Hero"&&Le(p0,{icon:Le(pr,{type:"ticker",size:13}),name:l(en),onSelect:()=>i(m),selected:s===m,rowProps:{onClick:d(()=>i(m))},words:a})}}}function g0({mode:e,select:o}){let{setSelectedHeroPart:t,setSelectHandler:r}=Hl(),a=x0().tree,{appState:n}=m0(u=>u),s=n.data.content??[],i=n8(s);i.current=s;let c=e,d=on.find(u=>tn[u]===c.kind),m=d&&"nodeId"in c?rn(String(c.nodeId),d):null,x=Yn(u=>{let h=mS(u);if(!h)return;let g=i.current.findIndex(P=>String(P.props.id)===h.nodeId);if(g<0)return;let k={kind:tn[h.part],nodeId:h.nodeId};o({index:g},k)},[o]);return Xo(()=>{t(m)},[m,t]),Xo(()=>{r(x)},[r,x]),{partRows:(u,{rowClick:h})=>{let g=String(u.props.id),k=pS(u);if(k.length===0)return null;let P=I=>{let b=rn(g,I.part);return Le(p0,{icon:Le(pr,{type:I.part==="media"?"heroMedia":"heroImage",size:13}),name:l(I.label),onSelect:()=>x(b),selected:m===b,rowProps:{onClick:h(()=>x(b))},words:a},b)},[O,...w]=k;return Vn(u0,{children:[P(O),w.length>0&&Le(p8,{children:w.map(P)})]})}}}function y0(e,o){return{partRows:(t,r)=>Vn(u0,{children:[e.partRows?.(t,r),o.partRows?.(t,r)]})}}function I8(e){let{adapter:o,capabilities:t,currentSlug:r,siteId:a,docId:n,hasUnsavedEdits:s,bridgeCapabilities:i,notifyParent:c,token:d}=ec(),{hasPreviewLink:m}=t,x=He(h0()).preview?.draftLink,u=qk(e.data),h=t0({hasTrustedConsole:!!d,canCreatePlatformTemplate:i.canCreatePlatformTemplate,capabilities:t,siteId:a,hasUnsavedEdits:s}),g=Yn(()=>{!a||!r||c(r0,{siteId:a,slug:r})},[c,a,r]),k=Ck({pageSlug:r,siteId:a,token:d}),P=o.previewHref?.(r)??k;return{barLead:()=>h.visible&&Le(l8,{side:"bottom",content:h.enabled?l("Save this website as a platform template"):l(h.disabledReason),children:Le("span",{className:"sf-tip-disabled",tabIndex:h.enabled?void 0:0,children:Le(s8,{variant:"secondary",disabled:!h.enabled,onClick:g,rightIcon:Le(u8,{size:15}),children:l("Save as Template")})})}),barView:()=>m&&r&&Le(kk,{liveHref:P,pageId:n??null,draftLink:x}),mainAction:u}}function g8(e,o){let{capabilities:t,templateId:r,siteId:a,tokenRef:n,navigate:s}=ec(),{hasSiteTheme:i,explainsSiteSettings:c}=t,d=I=>o.setView(I),[m,x]=i0(oa[0].id),[u,h]=i0(!1),{surface:g,setSurface:k}=sS(),P=()=>{if(i){d("styles"),o.reveal(),c0();return}e.show(Qu),e.reveal(),c0()},O={id:"pages",label:l("Pages"),icon:Le(c8,{}),panel:({onHide:I})=>Le(Xb,{activeSurface:g,onPreviewSurface:k,onNavigate:b=>{k(null),s(r?{kind:"template",id:r,pageSlug:b}:{kind:"page",slug:b,siteId:a??void 0})},onClose:I})},w=[];return!i&&c&&w.push({id:"appearance",label:l("Appearance"),icon:Le(d8,{}),active:e.kind==="website",onSelect:P}),i&&w.push({id:"styles",label:l("Styles"),icon:Le(f8,{}),panel:({onHide:I,notify:b})=>Le(ww,{tokenRef:n,siteId:a??void 0,onClose:I,onNotify:b,tab:m,onTabChange:x,revealPageGroup:u,onPageGroupRevealed:()=>h(!1)})}),{railLead:[O],railTrail:w,resolveLeftView:I=>PP(I,i),openSettings:P,openStyles:()=>{x(Ab),d("styles")},openPageStyles:i?()=>{x(ta),h(!0),d("styles"),o.reveal()}:c?()=>{e.show(uw),e.reveal()}:void 0}}function y8(){let{navigate:e,siteId:o,reloadFromServer:t,docId:r}=ec(),a=m0(s=>s.config),n=h0();Xo(()=>(hm({openPage:s=>e({kind:"page",slug:s.slug,siteId:o??void 0}),reload:()=>{t()},config:a}),()=>hm(null)),[e,o,t,a]),Xo(()=>{let s=gt();if(!s||!r)return;let i=!1;return x8(n).list().then(c=>{i||s.learn(c)}).catch(()=>{}),()=>{i=!0}},[r,n])}function b8(e,o,t,r){let{kind:a,open:n}=e,{selected:s,zoneOf:i}=o;Xo(()=>{bP(s?.type==="BookingBox"&&s.props.region==="confirm"?SP(i(String(s.props.id))):null)},[s?.props.id]);let c=$w(e,o),{capabilities:{hasSiteSettings:d}}=ec();y8();let{chat:m,setChat:x,setSelected:u,setSelectHandler:h}=Ml(),g=Yn(()=>n(pw),[n]),k=a==="chat";Xo(()=>{u(k)},[k,u]),Xo(()=>{h(g)},[h,g]);let{setOpenHandler:P}=Ja(),O=Yn(()=>n(mw),[n]);Xo(()=>{P(O)},[P,O]);let w=y0(I0(e),g0(e)),I=I8(o),b=g8(e,r),v=t.device;return{...w,...I,...b,hasOwnRows:S=>S.type===yi,ownRows:c.renderLocationTree,sectionPressed:c.sectionPressed,wrap:S=>Le(Ic.Provider,{value:!0,children:Vn(m8.Provider,{value:v,children:[S,Le(ev,{})]})}),addPanelRow:S=>d?Vn("div",{className:"sf-addside-sitewide",children:[Le("span",{className:"sf-addside-sitewide-glyph","aria-hidden":"true",children:Le(pr,{type:"chat",size:16})}),Vn("button",{type:"button",className:"sf-addside-sitewide-name",onClick:()=>{S(),g()},children:[l("Live chat"),Le("span",{className:"sf-addside-sitewide-desc",children:l("A chat bubble on every page")})]}),Le(i8,{checked:m.enabled,onChange:E=>x({enabled:E}),ariaLabel:l("Show the chat bubble on the whole site")})]}):void 0}}var f0=null,bm=new WeakMap;function S8(e){let o=nx();if(!e||!o)return e;f0!==o&&(f0=o,bm=new WeakMap);let t=bm.get(e);return t||(t={...e,choices:e.choices?e.choices.map(r=>({...r,label:l(r.label)})):null,spec:e.spec?{...e.spec,addLabel:l(e.spec.addLabel)}:null},bm.set(e,t)),t}var C8={isLockedBlock:(e,o)=>BP(e,o)||!!(o&>()?.heldElsewhere(o.props.id)),duplicateBlocked:ai,nestDepth:(e,o,t)=>o===ds?Qx(e,t):0,newSectionNode:s0,canAddTo:(e,o)=>S8(gP(e,o)),blockIsOffered:IP,slotsOf:yP},w8=new Proxy(o0,{get:(e,o)=>{let t=Reflect.get(e,o);return typeof t=="string"?l(t):t}}),k8={labelAtLevel:(e,o,t)=>l(dp(e,o,t)),descriptions:w8,categoryLabel:e=>{let o=ov(e);return o===void 0?void 0:l(o)},firstSection:tv,blockRowName:CP,rowName:wP,plainText:Ra,Icon:pr,Thumbnail:Cw,useProducts:l0,presets:a0()},v8={desktop:2e3,tablet:800,mobile:390},d0="desktop",T8={options:tS,initial:d0,fluid:d0,widths:v8},P8={read:vP,write:e=>TP(e),forSelection:(e,o)=>EP(e,o)},E8={first:ro,last:ye,firstGroup:be,lastGroup:xe,isSectionGroup:ia,sectionGroupZone:yC,panelOf:e=>e===ro?dw:null,get sharedReach(){return wr()?F8:void 0},get shared(){return gt()?MP:void 0},get groupTab(){return wr()?kC:void 0},get groupBadge(){return wr()?_u({type:xe})??void 0:void 0},get changeNotice(){return wr()?vC():void 0},get band(){return wr()?O8:void 0},get groupAccepts(){return wr()?CC:void 0}},O8={foldable:!0},F8=e=>_u(e)??NP(e);function L8(e){return{...y0(I0(e),g0(e)),openSettings:()=>e.show(Qu)}}function A8(e,o){ik(e,o),Ik()}var _Se={useOwnerName:ra,useDocumentLabel:Mb,useBridges:b8,useStandaloneBridges:L8,useDocumentPass:A8,blockRules:C8,blockLook:k8,devices:T8,leftView:P8,pinned:E8,Canvas:QP,canvasDrag:{media:e0},Inspector:hw};export{Bde as a,_de as b,Dde as c,qw as d,Mt as e,Lp as f,Kpe as g,He as h,Ss as i,ee as j,Vw as k,Ude as l,Xw as m,oo as n,Bc as o,rO as p,aO as q,_c as r,Dc as s,Fr as t,B7 as u,pe as v,Qe as w,Qw as x,Vde as y,Jw as z,Yde as A,Xde as B,$ as C,xi as D,hde as E,ut as F,pt as G,mt as H,nue as I,Ap as J,Rp as K,bW as L,SW as M,Xpe as N,Zpe as O,rv as P,Qpe as Q,Jpe as R,vW as S,TW as T,rme as U,ame as V,Bp as W,PW as X,nme as Y,sme as Z,lme as _,ime as $,OW as aa,cme as ba,fme as ca,sv as da,mme as ea,_8 as fa,l as ga,Ze as ha,lv as ia,Ime as ja,Jh as ka,Ts as la,oI as ma,kK as na,hf as oa,hF as pa,vK as qa,ice as ra,cce as sa,zY as ta,WY as ua,gA as va,GY as wa,UY as xa,SA as ya,$Y as za,Ls as Aa,As as Ba,zI as Ca,IY as Da,gY as Ea,pv as Fa,mv as Ga,Li as Ha,Ame as Ia,xv as Ja,Rme as Ka,Bme as La,_me as Ma,hv as Na,Dme as Oa,Nme as Pa,eA as Qa,Ds as Ra,FY as Sa,Ef as Ta,LY as Ua,sA as Va,lA as Wa,AY as Xa,YI as Ya,Ai as Za,yv as _a,Ume as $a,$me as ab,se as bb,Ce as cb,H as db,he as eb,ge as fb,ve as gb,Ee as hb,Fe as ib,Je as jb,xt as kb,$q as lb,jq as mb,Qc as nb,Ra as ob,fd as pb,Ba as qb,md as rb,bl as sb,Lo as tb,Mee as ub,Hee as vb,zee as wb,Wee as xb,iD as yb,cD as zb,Gee as Ab,Yr as Bb,xd as Cb,Uee as Db,$ee as Eb,bd as Fb,Xr as Gb,Zr as Hb,Jy as Ib,Tl as Jb,ab as Kb,kl as Lb,Jee as Mb,eoe as Nb,ooe as Ob,toe as Pb,ZD as Qb,fn as Rb,XS as Sb,ZS as Tb,Vl as Ub,pxe as Vb,mxe as Wb,xxe as Xb,hxe as Yb,Wn as Zb,Di as _b,wxe as $b,Sr as ac,Axe as bc,Rv as cc,Bv as dc,_v as ec,$p as fc,Gxe as gc,$xe as hc,Dv as ic,Kxe as jc,Vxe as kc,Nv as lc,_G as mc,DG as nc,Ehe as oc,Ohe as pc,Fhe as qc,qi as rc,Lhe as sc,Bhe as tc,ST as uc,Jp as vc,CT as wc,Hhe as xc,zhe as yc,Whe as zc,em as Ac,Ghe as Bc,Uhe as Cc,wT as Dc,gIe as Ec,LIe as Fc,KT as Gc,NIe as Hc,JT as Ic,MIe as Jc,eP as Kc,tP as Lc,nP as Mc,sP as Nc,XIe as Oc,ZIe as Pc,QIe as Qc,JIe as Rc,Nr as Sc,$U as Tc,YU as Uc,uge as Vc,Lr as Wc,Vx as Xc,Kx as Yc,gO as Zc,yO as _c,bO as $c,lq as ad,SO as bd,iq as cd,La as dd,cq as ed,fq as fd,ds as gd,Qx as hd,bge as id,Sge as jd,e$ as kd,mA as ld,Ms as md,MY as nd,JI as od,$x as pd,fO as qd,X7 as rd,is as sd,qx as td,dO as ud,uO as vd,pO as wd,J7 as xd,eq as yd,oq as zd,tq as Ad,be as Bd,xe as Cd,Fie as Dd,bC as Ed,ri as Fd,Su as Gd,Ul as Hd,f5 as Id,pse as Jd,mse as Kd,xse as Ld,hse as Md,BS as Nd,Ise as Od,u5 as Pd,gse as Qd,yse as Rd,r7 as Sd,l7 as Td,OE as Ud,zj as Vd,_Y as Wd,DY as Xd,qY as Yd,KY as Zd,VY as _d,D_ as $d,nd as ae,N_ as be,UJ as ce,Oo as de,jJ as ee,qJ as fe,H_ as ge,KJ as he,Cy as ie,wy as je,U_ as ke,$_ as le,ZJ as me,JJ as ne,eee as oe,oee as pe,tee as qe,Cg as re,sr as se,MA as te,iX as ue,HA as ve,cX as we,qs as xe,fX as ye,Hye as ze,YS as Ae,Jse as Be,KS as Ce,Yt as De,w7 as Ee,Lc as Fe,ZE as Ge,Bx as He,oO as Ie,E7 as Je,O7 as Ke,ls as Le,F7 as Me,Nx as Ne,Dx as Oe,W7 as Pe,cS as Qe,Zre as Re,fS as Se,PM as Te,Yd as Ue,na as Ve,oae as We,tae as Xe,EM as Ye,rae as Ze,rn as _e,mS as $e,aae as af,en as bf,Ure as cf,lS as df,$re as ef,jre as ff,qre as gf,ude as hf,kw as if,vw as jf,Tw as kf,XA as lf,rt as mf,at as nf,Ks as of,Vs as pf,CX as qf,wX as rf,vX as sf,TX as tf,PX as uf,EX as vf,OX as wf,LX as xf,Ys as yf,AX as zf,RC as Af,BC as Bf,FE as Cf,LE as Df,Uj as Ef,AE as Ff,RE as Gf,$j as Hf,jj as If,qj as Jf,Kj as Kf,Vj as Lf,Yj as Mf,Xj as Nf,Zj as Of,Qj as Pf,Jj as Qf,$7 as Rf,V7 as Sf,cs as Tf,us as Uf,Aa as Vf,nh as Wf,Iq as Xf,gq as Yf,qc as Zf,e1 as _f,Mq as $f,Wq as ag,U0 as bg,rf as cg,af as dg,E9 as eg,O9 as fg,Mh as gg,F9 as hg,L9 as ig,A9 as jg,Uh as kg,jh as lg,Vh as mg,ws as ng,Yh as og,uK as pg,kF as qg,HK as rg,sI as sg,qK as tg,iI as ug,uI as vg,pI as wg,mI as xg,xI as yg,hI as zg,II as Ag,gf as Bg,yI as Cg,bI as Dg,mV as Eg,qF as Fg,xV as Gg,hV as Hg,CI as Ig,SV as Jg,KF as Kg,CV as Lg,wV as Mg,YF as Ng,yf as Og,ZF as Pg,PV as Qg,QF as Rg,EV as Sg,JF as Tg,Mr as Ug,FV as Vg,LV as Wg,AV as Xg,RV as Yg,Es as Zg,BV as _g,Cf as $g,GV as ah,EI as bh,rL as ch,$V as dh,wf as eh,IL as fh,cY as gh,XL as hh,vY as ih,QL as jh,TY as kh,PY as lh,EY as mh,Bf as nh,FA as oh,XY as ph,fg as qh,dg as rh,LA as sh,ZY as th,Ws as uh,Gs as vh,JY as wh,Ur as xh,$s as yh,tX as zh,rX as Ah,aX as Bh,bg as Ch,sX as Dh,At as Eh,st as Fh,Kr as Gh,rQ as Hh,aQ as Ih,nQ as Jh,sQ as Kh,lQ as Lh,iQ as Mh,cQ as Nh,pQ as Oh,mQ as Ph,iB as Qh,xQ as Rh,hQ as Sh,IQ as Th,gQ as Uh,yQ as Vh,bQ as Wh,SQ as Xh,CQ as Yh,uB as Zh,wQ as _h,qf as $h,kQ as ai,rl as bi,qr as ci,ry as di,nl as ei,vQ as fi,TQ as gi,FB as hi,PQ as ii,EQ as ji,OQ as ki,FQ as li,LQ as mi,AQ as ni,RQ as oi,Xs as pi,ll as qi,il as ri,Vf as si,cl as ti,BQ as ui,ny as vi,_Q as wi,DQ as xi,NQ as yi,MQ as zi,HQ as Ai,zQ as Bi,WQ as Ci,GQ as Di,UQ as Ei,$Q as Fi,jQ as Gi,Yf as Hi,qQ as Ii,iy as Ji,cy as Ki,fy as Li,KQ as Mi,ZB as Ni,VQ as Oi,YQ as Pi,fi as Qi,fo as Ri,gn as Si,H3 as Ti,YC as Ui,Bce as Vi,_ce as Wi,Dce as Xi,Nce as Yi,Mce as Zi,Hce as _i,zce as $i,Wce as aj,Gce as bj,Uce as cj,$ce as dj,Dl as ej,Zb as fj,Qb as gj,eS as hj,Nl as ij,vre as jj,Tre as kj,Ml as lj,yM as mj,Dre as nj,Ja as oj,zre as pj,sS as qj,xpe as rj,hpe as sj,Ipe as tj,gpe as uj,Xge as vj,Zge as wj,nye as xj,Jge as yj,Yre as zj,Hl as Aj,q8 as Bj,lb as Cj,moe as Dj,xoe as Ej,hoe as Fj,Ioe as Gj,vb as Hj,Tb as Ij,zoe as Jj,Woe as Kj,kN as Lj,Goe as Mj,Uoe as Nj,$oe as Oj,joe as Pj,vN as Qj,qoe as Rj,Koe as Sj,Voe as Tj,Yoe as Uj,ON as Vj,Xoe as Wj,lte as Xj,ite as Yj,Gd as Zj,Ud as _j,hS as $j,zne as ak,wS as bk,ES as ck,tC as dk,ule as ek,z5 as fk,W5 as gk,pn as hk,G5 as ik,U5 as jk,yle as kk,lC as lk,ye as mk,ti as nk,_o as ok,Ow as pk,kn as qk,Fw as rk,Lw as sk,yde as tk,bde as uk,gk as vk,kp as wk,yk as xk,gP as yk,Wge as zk,Zi as Ak,p$ as Bk,m$ as Ck,pye as Dk,H8 as Ek,U8 as Fk,J$ as Gk,n0 as Hk,e8 as Ik,Kn as Jk,pbe as Kk,mbe as Lk,_Se as Mk};
|