efficient-web-builder 0.0.0 → 0.7.1
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 +230 -0
- package/LICENSE +10 -0
- package/README.md +230 -2
- package/dist/chunks/EditorPreviewCheckout-NMJHO2WR.js +4 -0
- package/dist/chunks/PreviewFooter-E3AVT663.js +1 -0
- package/dist/chunks/SectionEditorShell-CNJJULHO.js +1 -0
- package/dist/chunks/SiteEditorProvider-4NZYBEVE.js +1 -0
- package/dist/chunks/StorefrontEditorChrome-OF6DKLWG.js +1 -0
- package/dist/chunks/chunk-6C5FL63W.js +2 -0
- package/dist/chunks/chunk-A2QNXDQ6.js +11 -0
- package/dist/chunks/chunk-G3X5WFSD.js +1 -0
- package/dist/chunks/chunk-INA2LIFW.js +230 -0
- package/dist/chunks/chunk-JSOIOPWC.js +1 -0
- package/dist/chunks/chunk-NTGUUW2T.js +1 -0
- package/dist/chunks/chunk-PAXN7G3Y.js +1 -0
- package/dist/chunks/chunk-QVG6K5WY.js +15 -0
- package/dist/chunks/chunk-QVG6K5WY.js.LEGAL.txt +27 -0
- package/dist/chunks/chunk-UBYBQ3KR.js +1 -0
- package/dist/chunks/chunk-V2G3QFLM.js +143 -0
- package/dist/chunks/chunk-V2G3QFLM.js.LEGAL.txt +4 -0
- package/dist/chunks/chunk-Y6SLVHK3.js +1 -0
- package/dist/chunks/chunk-YMLSAFSM.js +1 -0
- package/dist/chunks/fitment-data-6OYGRNMJ.js +1 -0
- package/dist/chunks/gallery-builds-data-SWA6XKFF.js +1 -0
- package/dist/chunks/headers-3CAQXQEY.js +1 -0
- package/dist/chunks/render-client-O7623TWA.js +1 -0
- package/dist/contract.d.ts +48 -0
- package/dist/contract.js +1 -0
- package/dist/editor.css +1 -0
- package/dist/index.d.ts +541 -0
- package/dist/index.js +10844 -0
- package/package.json +47 -3
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use client";import{r as m}from"./chunk-V2G3QFLM.js";import{l as g}from"./chunk-6C5FL63W.js";import"./chunk-G3X5WFSD.js";import{of as a,wb as s}from"./chunk-QVG6K5WY.js";import"./chunk-JSOIOPWC.js";import{ad as d,fd as f,rd as c,xc as u}from"./chunk-A2QNXDQ6.js";import"./chunk-PAXN7G3Y.js";import"./chunk-UBYBQ3KR.js";import"./chunk-Y6SLVHK3.js";import{Render as I}from"efficient-easel/render";import{jsx as p}from"react/jsx-runtime";function i({footerBlock:r,rootProps:e,headerSettings:o,siteName:t,legalName:l,foundedYear:n,socialLinks:h}){let v=a({root:{props:{...e??{},kind:s}},content:[r],zones:{}});return p(d.Provider,{value:{logoUrl:o?.logoUrl??null,logoReversed:o?.logoReversed??null,logoInkIsDark:o?.logoInkIsDark??null,siteName:t,legalName:l??null,foundedYear:n??null,socialLinks:h??f},children:p(I,{config:m,data:v})})}import{jsx as k}from"react/jsx-runtime";function P(){let{footerBlock:r,editFooter:e}=g(),{settings:o,websiteName:t}=c();if(!r)return null;let l=o?{logoUrl:o.logoUrl,logoReversed:o.logoReversed??null,logoInkIsDark:o.logoInkIsDark??null}:null;return k("div",{className:"sf-preview-footer-pick",onClick:e?n=>{n.stopPropagation(),e()}:void 0,style:e?{cursor:"pointer"}:void 0,title:e?"Edit the site footer \u2192":void 0,children:k(i,{footerBlock:r,headerSettings:l,siteName:t?.trim()||u})})}export{P as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use client";import{A as Ae,B as Re,D as Me,E as xe,e as v,f as _,n as Ee,p as Ce,t as he,v as f,w as E,x as Ie}from"./chunk-INA2LIFW.js";import"./chunk-NTGUUW2T.js";import{a as ve}from"./chunk-G3X5WFSD.js";import{Aj as be,La as ue,Oh as Te,Sj as w,if as ge,kf as ye,lf as ke,mc as fe,mk as Pe,ok as we,qf as Se,wj as P}from"./chunk-QVG6K5WY.js";import{Ea as ae,Ia as de,Ka as pe,La as me}from"./chunk-A2QNXDQ6.js";import"./chunk-PAXN7G3Y.js";import"./chunk-UBYBQ3KR.js";import"./chunk-Y6SLVHK3.js";import{Fragment as Ne,useCallback as je,useEffect as x,useRef as Le,useState as Oe}from"react";import{SaveState as Ze}from"efficient-easel/chrome";import{parseZoneKey as N,zoneKey as et}from"efficient-easel/data";import{useTreeDrag as tt}from"efficient-easel/drag";import{TrashIcon as $e}from"efficient-easel/icons";import{LayersTree as ot,Subtree as Be,TreeRow as L,TreeRowAction as ze,TreeSeam as nt}from"efficient-easel/tree";import{saveIndicator as rt}from"efficient-easel/autosave";import{useEasel as st}from"efficient-easel/easel";import{Fragment as De,jsx as n,jsxs as k}from"react/jsx-runtime";var O=$=>C=>{C.target.closest(".es-tree-select, button")||$()};function it(){let{saveState:$,readOnly:C}=Se(),i=ue(),{appState:Fe,selectedItem:b,config:B}=st(e=>e),[T,c]=Oe(f),[K,W]=Oe(null),r=Fe.data.content?.[0]??null,g=r?.props.id??null,S=r?.type===pe,He=r?.type===me,U=Le(null),z=Le(null);Me(z);let Y=ge(),h=ke();x(()=>{let e=z.current;if(!h||!e)return;let t=o=>{o.key==="Escape"&&ye()};return e.addEventListener("keydown",t),()=>e.removeEventListener("keydown",t)},[h]),x(()=>{if(g&&U.current!==g){if(U.current=g,S){c(E);return}b||i.select({index:0})}},[g,b,i,S]);let{setSelectedHeroId:q,setSelectHandler:V}=we(),D=T.kind==="ticker"?T.heroId:null,I=je(e=>{e&&(c(t=>t.kind==="ticker"&&t.heroId===e?t:{kind:"ticker",heroId:e}),v(e))},[]);x(()=>{q(D)},[D,q]),x(()=>{V(I)},[V,I]);let{selectNode:_e}=Re({mode:T,setMode:c,onOpenPart:v}),F=e=>B.components[e]?.label??e,G=e=>fe(e,"section",F(e)),Ke=()=>{if(S){c(E);return}c(f),i.select({index:0})},J=!S&&T.kind==="puck"&&b?.props.id===g,a=r?w(r.type)?.spec??null:null,d=r&&a?`${r.props.id}:${a.slot}`:null,Q=r&&a&&Array.isArray(r.props[a.slot])?r.props[a.slot]:[],H=e=>Te(e,F),X=(e,t)=>{!r||!a||!d||(c(f),a.slider?(_(String(r.props.id),e),i.select({index:e,zone:d}),v(String(r.props.id))):(i.select({index:e,zone:d}),v(t)))},j=()=>{if(!r||!a||!d)return;let e=Q.length;i.insertComponent(d,a.childType,e),c(f),a.slider?requestAnimationFrame(()=>{_(String(r.props.id),e),i.select({index:e,zone:d})}):i.select({index:e,zone:d})},We=e=>{d&&(i.removeComponent(d,e),c(f),i.select(null))},Z=e=>ae(B,e),ee=e=>{let{parentId:t,slot:o}=N(e),s=m=>{if(!m)return null;if(String(m.props.id)===t)return m;for(let p of Z(m.type)){let u=Array.isArray(m.props[p])?m.props[p]:[];for(let y of u){let M=s(y);if(M)return M}}return null},l=s(r)?.props[o];return Array.isArray(l)?l.length:0},te=(e,t,o)=>{let s=Math.min(Math.max(o,0),ee(e)),l=t<s?s-1:s;l!==t&&(i.reorderComponent(e,t,l),c(f),i.select({index:l,zone:e}))},A=tt({keyOf:e=>e.id,readOnly:!!C,canDrop:(e,t)=>et(t)===e.zone&&t.index>=0&&t.index<=ee(e.zone),onDrop:(e,t)=>te(e.zone,e.index,t.index),onStep:(e,t)=>te(e.zone,e.index,t<0?e.index-1:e.index+2)}),R=(e,t)=>n(nt,{...C?{}:A.seam({place:{...N(e),index:t}})},`seam:${e}:${t}`),Ue=e=>Z(e.type).flatMap(t=>(Array.isArray(e.props[t])?e.props[t]:[]).map((s,l)=>({child:s,zone:`${e.props.id}:${t}`,index:l}))),oe=e=>{let t=e.props;if(e.type==="FooterMenu"){let o=t.menu;return t.heading||o?.name||"Menu"}if(e.type==="FooterText"){let o=typeof t.text=="string"?t.text.trim():"";return o?o.length>28?`${o.slice(0,28)}\u2026`:o:"Text"}return e.type==="FooterEmailSignup"?t.heading||"Email signup":F(e.type)},ne=(e,t,o)=>{c(f),i.select({index:t,zone:e}),v(o)},re=(e,t,o)=>{i.insertComponent(e,t,o),c(f),i.select({index:o,zone:e}),W(null)},Ye=(e,t)=>{i.removeComponent(e,t),c(f),i.select(null)},qe=(e,t,o)=>n(ve,{choices:o,open:K===e,onToggle:()=>W(K===e?null:e),onPick:s=>re(e,s,t)}),se=(e,t)=>{let o=Ue(e),s=w(e.type),l=s?.choices??null,m=s?.source==="footer"?oe:H;return k(De,{children:[o.map(({child:p,zone:u,index:y})=>{let M=b?.props.id===p.props.id,Je=de(B,p.type,t),ie=m(p),le=String(p.props.id),ce=()=>ne(u,y,le),{rowProps:Qe,...Xe}=A.row({item:{id:le,zone:u,index:y},place:{...N(u),index:y}},{onClick:O(ce)});return k(Ne,{children:[y===0&&R(u,0),n(L,{icon:n(P,{type:p.type,size:13}),name:ie,selected:M,onSelect:ce,...Xe,actions:n(ze,{kind:"delete",label:`Delete ${ie}`,onClick:()=>Ye(u,y),children:n($e,{size:13})}),rowProps:Qe}),Je&&n(Be,{children:se(p,t+1)}),R(u,y+1)]},String(p.props.id??`${u}-${y}`))}),s&&l?qe(`${e.props.id}:${s.slot}`,o.length,l):null]})},Ve=r?.type==="HeroSingle",Ge=!!r&&(!!a||He||S||Ve);return k("div",{ref:z,className:"sf-editor es-editor",style:he(Ce),children:[n("div",{className:"sf-section-bar",children:n(Ze,{...rt($),role:"status"})}),k("div",{className:"sf-body",children:[h&&Y?n("aside",{className:"es-sidepanel es-sidepanel--left sf-panel sf-panel--left",children:n(Ee,{panel:Y,pick:h})}):Ge&&r&&k("aside",{className:"es-sidepanel es-sidepanel--left sf-panel sf-panel--left",children:[n("div",{className:"sf-panel-head",children:n("button",{type:"button",className:`sf-panel-title sf-panel-title--btn ${J?"is-selected":""}`,"aria-pressed":J,title:S?"Header settings":`${G(r.type)} settings`,onClick:Ke,children:G(r.type)})}),n(ot,{className:"sf-tree sf-scroll",rootProps:A.rootProps(),children:n(Be,{children:S?n(L,{icon:n(P,{type:"header",size:13}),name:"Header settings",selected:T.kind==="header",onSelect:()=>c(E),rowProps:{onClick:O(()=>c(E))}}):a?k(De,{children:[Q.map((e,t)=>{let o=b?.props.id===e.props.id,s=H(e),l=String(e.props.id),m=()=>X(t,l),{rowProps:p,...u}=A.row({item:{id:l,zone:d,index:t},place:{...N(d),index:t}},{onClick:O(m)});return k(Ne,{children:[t===0&&R(d,0),n(L,{icon:n(P,{type:e.type,size:13}),name:s,selected:o,onSelect:m,...u,actions:n(ze,{kind:"delete",label:`Delete ${s}`,onClick:()=>We(t),children:n($e,{size:13})}),rowProps:p}),R(d,t+1)]},String(e.props.id??t))}),k("button",{type:"button",className:"sf-add-card",onClick:j,children:[n("span",{className:"sf-plus sf-plus--sm",children:"+"}),a.addLabel]}),r.type==="Hero"&&g&&n(L,{icon:n(P,{type:"ticker",size:13}),name:Pe,selected:D===g,onSelect:()=>I(g),rowProps:{onClick:O(()=>I(g))}})]}):se(r,1)})})]}),n("div",{className:"sf-center",children:n("div",{className:"sf-preview-host",children:n(xe,{})})}),n(be,{value:{selectChild:(e,t,o,s)=>w(s)?.source==="section"?X(t,o):ne(e,t,o),addChild:(e,t,o,s,l)=>w(l)?.source==="section"?j():re(`${e}:${t}`,o,s),childRowName:H,blockRowName:oe},children:n(Ae,{mode:T,onOpenWebsiteSettings:()=>c(Ie),onSelectNode:_e,hideNodeActions:!0})})]})]})}export{it as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use client";import{b as n}from"./chunk-UBYBQ3KR.js";import"./chunk-Y6SLVHK3.js";import{useEffect as r,useState as u}from"react";import{createEasel as c,EaselProvider as p}from"efficient-easel/easel";import{jsx as E}from"react/jsx-runtime";function m({config:a,data:d,onChange:o,permissions:e,children:f}){let[t]=u(()=>c({config:a,data:d,permissions:e}));r(()=>{t.setConfig(a)},[t,a]),r(()=>{if(!o)return;let i=t.getState().appState.data;return t.subscribe(()=>{let s=t.getState().appState.data;s!==i&&(i=s,o(s))})},[t,o]),r(()=>{e&&t.setPermissions(e)},[t,e]);let l=n();return E(p,{easel:t,hotkeys:l.ownsDocument,children:f})}export{m as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use client";import{A as ta,B as na,C as oa,D as ia,E as sa,a as bt,b as Ko,c as qr,d as Vr,e as Vt,f as Uo,g as Un,h as Yn,i as Gr,j as Kr,k as Ur,l as Xn,m as Yr,n as Yo,o as Xo,p as vt,q as Zo,r as Jo,s as Qo,t as Xr,u as Zr,v as Le,w as Jn,x as Jr,y as Qr,z as ea}from"./chunk-INA2LIFW.js";import{a as _r,b as jr}from"./chunk-YMLSAFSM.js";import{g as Zn}from"./chunk-NTGUUW2T.js";import{B as qo,C as jo,D as Vo,E as Go,F as Dr,G as zr,H as Or,I as Br,K as $r,L as Fr,M as Wr,a as Et,b as jt,c as mr,h as yr,j as hr,l as vr,n as Sr,o as kr,q as Cr,r as Ar,t as Ke,u as Nr,y as _o,z as Lr}from"./chunk-6C5FL63W.js";import{$b as un,Ah as dr,Aj as Tr,Cj as Ir,Dj as Pr,Eb as Ws,Ig as rr,La as $s,Nj as Rr,Oh as cr,Ph as pr,Qh as ur,Qj as Er,Rj as Wo,Sh as Gn,Sj as Pe,Zb as _s,Zf as ir,_b as qs,_f as sr,ac as js,bc as Vs,cj as br,df as Zs,ei as gn,hb as dn,hi as fr,if as Js,ih as ar,ii as mn,jb as Fs,jc as Gs,jh as lr,kb as cn,kf as fn,ki as yn,lf as Qs,li as Ho,mc as _t,mf as er,mk as Mr,ni as gr,ok as Hr,pc as Ks,pj as xr,q as Ls,qf as qt,r as Ds,rc as Us,s as qn,sc as Ys,tf as nr,uc as Xs,va as Os,vb as pn,wj as be,xj as $o,yf as or,yj as wr,zf as Mo,zi as Kn,zj as Fo}from"./chunk-QVG6K5WY.js";import{Ea as Vn,Fa as Oo,Ha as Bs,Ia as Ms,Ja as Wt,Ka as Fe,La as oe,Lc as We,Ma as P,Oa as Bo,Pa as Hs,rd as tr}from"./chunk-A2QNXDQ6.js";import{C as zs,T as jn}from"./chunk-PAXN7G3Y.js";import{b as Ft}from"./chunk-UBYBQ3KR.js";import"./chunk-Y6SLVHK3.js";import{Fragment as Ut,useCallback as De,useEffect as $,useLayoutEffect as hc,useMemo as yi,useRef as de,useState as ce}from"react";import{PagesIcon as bc,LayersIcon as Qa,StylesIcon as vc,MediaIcon as el,SitemapIcon as xc}from"efficient-easel/rail";import{LayersTree as Sc,Subtree as at,TreeGroupLabel as io,TreeRow as we,TreeRowAction as so,TreeSeam as hi}from"efficient-easel/tree";import{DeviceSwitch as kc,EaselIconButton as tl,EaselTopBar as wc,InspectorIconButton as Cc,PanelResizeHandle as nl,SaveState as ol,SaveStateToggle as Tc,TopBarCluster as il,TopBarDivider as Ic,TopBarRail as Pc}from"efficient-easel/chrome";import{ExternalIcon as Rc,ImageIcon as Ec,RedoIcon as Ac,TextLinesIcon as Nc,TrashIcon as bi,UndoIcon as Lc}from"efficient-easel/icons";import{saveIndicator as Dc}from"efficient-easel/autosave";import{EditNotice as Ul}from"efficient-easel/chrome";import{jsx as Yl}from"react/jsx-runtime";function ei(){let{capabilities:n,access:s,takeOverEditing:a,viewReadOnly:m,saveConflict:u,reloadFromServer:f}=qt();return n.hasEditGuard?Yl(Ul,{access:s,conflict:u,noun:"page",onTakeOver:a,onViewReadOnly:m,onReload:f}):null}import{DesktopIcon as Xl,PhoneIcon as Zl,TabletIcon as Jl}from"efficient-easel/icons";import{jsx as ti}from"react/jsx-runtime";var Ql={desktop:ti(Xl,{}),tablet:ti(Jl,{}),mobile:ti(Zl,{})},ra=ir.map(n=>({id:n,label:sr[n],icon:Ql[n]}));import{useEffect as od,useMemo as ha,useState as id}from"react";import{useEasel as sd}from"efficient-easel/easel";import{AddPanel as rd}from"efficient-easel/drag";import{AddIcon as ad}from"efficient-easel/icons";import{Fragment as pa,jsx as t,jsxs as d}from"react/jsx-runtime";var re={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)"},ni="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 S({w:n,h:s,tone:a="dark",r:m=2,style:u}){return t("div",{style:{width:n,height:s,borderRadius:m,background:re[a],flex:"none",...u}})}var ed={Hero:"hero",HeroSingle:"herosingle",IntroBleed:"intro",Collections:"collections",AlloyWheelsListing:"wheelslisting",CatalogFilterBar:"catalogfilterbar",ProductGrid:"productgrid",BrandStrip:"brandstrip",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",Reviews:"reviews",SubmitBuild:"submitbuild",ReviewForm:"reviewform",Form:"form",AppointmentBooking:"appointmentbooking",ContactRouting:"contact",ContactLocations:"contactlocations",Header:"header",Footer:"footer",SectionHeader:"sectionheader",Grid:"grid",Flex:"blanksection",Spacer:"spacer",Divider:"divider",CustomHTML:"customhtml",Heading:"heading",Text:"text",ImageBlock:"image",ButtonBlock:"button",MenuBlock:"menu",EmailFormBlock:"emailform",SocialLogosBlock:"sociallogos",LegalLineBlock:"legalline",SearchBlock:"search",CartBlock:"cart",CountrySwitchBlock:"countryswitch"},I={position:"absolute",inset:0},i={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)"},X=(n,s,a=160)=>({background:`linear-gradient(${a}deg,${n},${s})`});function rt({size:n,style:s}){let a=Math.max(2,Math.round(n*.13)),m=(u,f,b)=>({position:"absolute",inset:u,background:f,borderRadius:a,...b?{mixBlendMode:b}:null});return d("span",{style:{position:"absolute",display:"block",width:n,height:n,...s},children:[t("span",{style:m("8% 26% 30% 6%",i.mark1)}),t("span",{style:m("26% 6% 8% 30%",i.mark2,"multiply")})]})}function bn({children:n}){return t("span",{style:{fontSize:"4.64cqw",fontWeight:700,letterSpacing:"0.06em",textTransform:"uppercase",color:i.muted},children:n})}function aa({over:n,overTone:s,head:a,headSize:m=11.5,cta:u,ctaBg:f,ctaFg:b,tone:R}){return d(pa,{children:[n&&t("span",{style:{fontSize:"3.65cqw",letterSpacing:"0.16em",fontWeight:700,color:s},children:n}),t("span",{style:{fontSize:m,lineHeight:1.15,fontWeight:700,maxWidth:"78%",color:R},children:a}),u&&t("span",{style:{alignSelf:"flex-start",fontSize:"3.65cqw",letterSpacing:"0.12em",fontWeight:700,padding:"4px 8px",borderRadius:2,marginTop:2,background:f,color:b},children:u})]})}function oi({name:n,price:s}){return d("div",{style:{display:"flex",flexDirection:"column",gap:2,minWidth:0},children:[t("div",{style:{flex:1,minHeight:0,borderRadius:3,position:"relative",overflow:"hidden",...X(i.paper,i.paper2,150)},children:t(rt,{size:34,style:{left:"50%",top:"50%",transform:"translate(-50%,-50%)"}})}),t("span",{style:{fontSize:"3.65cqw",fontWeight:600,color:i.text},children:n}),t("span",{style:{fontSize:"3.65cqw",color:i.muted},children:s})]})}function st({k:n,v:s,ok:a}){return d("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",gap:6,padding:"3.5px 2px",borderBottom:`1px solid ${i.rule}`,fontSize:"3.98cqw",color:i.muted},children:[t("span",{children:n}),d("span",{style:{display:"flex",gap:6,alignItems:"center"},children:[t("b",{style:{color:i.text,fontWeight:700},children:s}),a&&t("span",{style:{color:i.rust,fontWeight:700},children:"\u2713"})]})]})}function q({title:n,children:s}){return d("div",{style:{...I,background:i.card,padding:"9px 10px",display:"flex",flexDirection:"column",gap:6},children:[t(bn,{children:n}),s]})}function la({size:n=14}){return t("span",{style:{width:n,height:n,borderRadius:"50%",flex:"none",display:"block",background:`linear-gradient(150deg,${i.mark1},${i.mark2})`}})}function ii({filled:n=5,size:s=6}){return d("span",{style:{fontSize:s,letterSpacing:"0.06em",color:i.rust,lineHeight:1},children:["\u2605".repeat(n),t("span",{style:{color:i.mark1},children:"\u2605".repeat(5-n)})]})}function hn({n,label:s,tone:a=i.text}){return d("div",{style:{flex:1,display:"flex",flexDirection:"column",gap:1,minWidth:0},children:[t("b",{style:{fontSize:"8.16cqw",lineHeight:1,color:a},children:n}),t("span",{style:{fontSize:"3.65cqw",letterSpacing:"0.08em",textTransform:"uppercase",opacity:.62,color:a},children:s})]})}function ge({children:n,w:s}){return t("span",{style:{fontSize:"3.98cqw",lineHeight:1.45,color:i.muted,width:s,display:"block"},children:n})}function Qn({label:n,w:s="100%",filled:a}){return d("div",{style:{width:s,display:"flex",flexDirection:"column",gap:2},children:[t("span",{style:{fontSize:"3.32cqw",letterSpacing:"0.08em",textTransform:"uppercase",color:i.muted},children:n}),t("span",{style:{height:9,borderRadius:3,border:`1px solid ${i.rule}`,background:a?i.paper:i.card}})]})}function da({children:n}){return t("span",{style:{alignSelf:"flex-start",fontSize:"3.65cqw",letterSpacing:"0.12em",fontWeight:700,padding:"5px 9px",borderRadius:2,background:i.text,color:i.onInk},children:n})}var td={wheelslisting:t(q,{title:"All wheels",children:t("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(([n,s,a])=>d("div",{style:{display:"flex",alignItems:"center",gap:6},children:[t("span",{style:{width:20,height:15,borderRadius:3,flex:"none",position:"relative",overflow:"hidden",...X(i.paper,i.paper2,150)},children:t(rt,{size:12,style:{left:"50%",top:"50%",transform:"translate(-50%,-50%)"}})}),t("b",{style:{flex:1,fontSize:"4.31cqw",color:i.text},children:n}),t("span",{style:{fontSize:"3.65cqw",color:i.muted},children:s}),t("b",{style:{fontSize:"4.31cqw",color:i.text,width:26,textAlign:"right"},children:a})]},n))})}),catalogfilterbar:d("div",{style:{...I,background:i.card,display:"flex",flexDirection:"column",justifyContent:"center",gap:7,padding:"0 11px"},children:[d("div",{style:{display:"flex",gap:4,alignItems:"center"},children:[["20 inch","6\xD7139.7","Black"].map(n=>d("span",{style:{fontSize:"3.65cqw",fontWeight:600,padding:"4px 7px",borderRadius:99,background:i.text,color:i.onInk,display:"flex",gap:4,alignItems:"center"},children:[n,t("span",{style:{opacity:.6},children:"\u2715"})]},n)),t("span",{style:{fontSize:"3.65cqw",color:i.rust,fontWeight:700},children:"Clear"})]}),d("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center"},children:[t("span",{style:{fontSize:"3.65cqw",color:i.muted},children:"128 results"}),t("span",{style:{fontSize:"3.65cqw",color:i.muted,border:`1px solid ${i.rule}`,borderRadius:3,padding:"3px 6px"},children:"Sort: Price \u25BE"})]})]}),fitmentfinder:d("div",{style:{...I,padding:"10px 12px",display:"flex",flexDirection:"column",gap:6,justifyContent:"center",...X(i.ink,i.inkSoft)},children:[t("span",{style:{fontSize:"5.31cqw",fontWeight:700,color:i.onInk},children:"Will it fit your rig?"}),d("div",{style:{display:"flex",gap:4},children:[["2021","Toyota","Hilux"].map(n=>d("span",{style:{flex:1,fontSize:"3.65cqw",color:i.text,background:i.card,borderRadius:3,padding:"5px 6px",display:"flex",justifyContent:"space-between"},children:[n," ",t("span",{style:{color:i.muted},children:"\u25BE"})]},n)),t("span",{style:{fontSize:"3.65cqw",fontWeight:700,letterSpacing:"0.08em",background:i.warm,color:i.ink,borderRadius:3,padding:"5px 7px"},children:"GO"})]})]}),compatibletyres:t(q,{title:"Tyres that suit",children:t("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(([n,s])=>d("div",{style:{display:"flex",flexDirection:"column",gap:2,minWidth:0},children:[t("div",{style:{flex:1,minHeight:0,borderRadius:3,position:"relative",overflow:"hidden",background:i.ink},children:t("span",{style:{position:"absolute",left:"50%",top:"50%",transform:"translate(-50%,-50%)",width:26,height:26,borderRadius:"50%",border:`5px solid ${i.mark2}`,boxSizing:"border-box"}})}),t("span",{style:{fontSize:"3.32cqw",fontWeight:600,color:i.text,overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis"},children:n}),t("span",{style:{fontSize:"3.32cqw",color:i.muted},children:s})]},n))})}),tyresizes:t(q,{title:"Available sizes",children:t("div",{style:{flex:1,display:"flex",flexWrap:"wrap",gap:4,alignContent:"center"},children:["265/65R17","285/70R17","265/60R18","275/55R20"].map((n,s)=>t("span",{style:{fontSize:"3.65cqw",fontWeight:600,padding:"5px 7px",borderRadius:3,border:`1px solid ${s===0?i.rust:i.rule}`,color:s===0?i.rust:i.text,background:s===0?i.paper:i.card},children:n},n))})}),tyrefitment:d(q,{title:"Will it fit your car?",children:[t("div",{style:{display:"flex",gap:3},children:["Make","Model","Year","Trim"].map(n=>d("span",{style:{flex:1,minWidth:0,fontSize:"3.32cqw",color:i.muted,background:i.paper,border:`1px solid ${i.rule}`,borderRadius:3,padding:"4px 5px",display:"flex",justifyContent:"space-between",gap:2,overflow:"hidden",whiteSpace:"nowrap"},children:[n," ",t("span",{style:{color:i.muted},children:"\u25BE"})]},n))}),t("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(([n,s,a])=>d("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"baseline",gap:6,borderTop:`1px solid ${i.rule}`,paddingTop:3},children:[t("span",{style:{fontSize:"3.32cqw",fontWeight:600,color:i.text},children:n}),t("span",{style:{fontSize:"3.32cqw",fontWeight:a?700:400,letterSpacing:"0.06em",color:a?i.warm:i.muted},children:s})]},n))})]}),eutyrelabel:d("div",{style:{...I,background:i.card,padding:"9px 11px",display:"flex",gap:8,alignItems:"center"},children:[t("div",{style:{flex:1,display:"flex",flexDirection:"column",gap:1.5},children:[["A","42%"],["B","56%"],["C","70%"],["D","84%"]].map(([n,s],a)=>d("div",{style:{display:"flex",alignItems:"center",gap:3},children:[t("span",{style:{width:s,height:6,borderRadius:"0 2px 2px 0",background:a===1?i.rust:i.mark1}}),t("span",{style:{fontSize:"3.32cqw",fontWeight:700,color:a===1?i.rust:i.muted},children:n})]},n))}),d("div",{style:{flex:"none",display:"flex",flexDirection:"column",gap:3,alignItems:"center"},children:[t("b",{style:{fontSize:"6.63cqw",lineHeight:1,color:i.text},children:"72"}),t("span",{style:{fontSize:"3.32cqw",letterSpacing:"0.08em",color:i.muted},children:"dB"})]})]}),bundleoffer:d("div",{style:{...I,background:i.paper,padding:"9px 11px",display:"flex",flexDirection:"column",gap:5,justifyContent:"center"},children:[t(bn,{children:"Buy it with"}),d("div",{style:{display:"flex",alignItems:"center",gap:5},children:[[0,1].map(n=>t("span",{style:{width:26,height:22,borderRadius:3,flex:"none",position:"relative",overflow:"hidden",background:i.card},children:t(rt,{size:17,style:{left:"50%",top:"50%",transform:"translate(-50%,-50%)"}})},n)),t("span",{style:{fontSize:"5.69cqw",fontWeight:700,color:i.muted},children:"+"}),d("div",{style:{flex:1,display:"flex",flexDirection:"column",gap:1},children:[t("span",{style:{fontSize:"3.65cqw",color:i.muted,textDecoration:"line-through"},children:"$1,024"}),t("b",{style:{fontSize:"6.02cqw",color:i.rust,lineHeight:1},children:"$899"})]})]})]}),checkoutcta:d("div",{style:{...I,display:"flex",alignItems:"center",justifyContent:"space-between",padding:"0 13px",gap:8,...X(i.ink,i.ink2)},children:[d("div",{style:{display:"flex",flexDirection:"column",gap:2},children:[t("span",{style:{fontSize:"3.65cqw",letterSpacing:"0.12em",color:i.warm,fontWeight:700},children:"READY TO ORDER"}),t("b",{style:{fontSize:"6.63cqw",color:i.onInk,lineHeight:1},children:"$1,956"}),t("span",{style:{fontSize:"3.65cqw",color:i.onInk,opacity:.65},children:"4 items \xB7 fitted free"})]}),t("span",{style:{fontSize:"3.65cqw",letterSpacing:"0.12em",fontWeight:700,padding:"6px 10px",borderRadius:2,background:i.warm,color:i.ink,flex:"none"},children:"CHECKOUT"})]}),contact:t(q,{title:"Who do you need?",children:t("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(([n,s])=>d("div",{style:{display:"flex",alignItems:"center",gap:5},children:[t("b",{style:{flex:1,fontSize:"4.31cqw",color:i.text},children:n}),t("span",{style:{fontSize:"3.65cqw",color:i.muted},children:s}),t("span",{style:{fontSize:"4.64cqw",color:i.rust,lineHeight:1},children:"\u203A"})]},n))})}),contactlocations:t(q,{title:"Find us",children:t("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(([n,s,a])=>d("div",{style:{border:`1px solid ${i.rule}`,borderRadius:4,padding:"5px 6px",display:"flex",flexDirection:"column",gap:1},children:[t("b",{style:{fontSize:"4.31cqw",color:i.text},children:n}),t("span",{style:{fontSize:"3.32cqw",color:i.muted},children:s}),t("span",{style:{fontSize:"3.32cqw",color:i.rust,fontWeight:700},children:a})]},n))})}),form:t(q,{title:"Send us a message",children:d("div",{style:{flex:1,display:"flex",flexDirection:"column",gap:4,justifyContent:"center"},children:[d("div",{style:{display:"flex",gap:5},children:[t(Qn,{label:"Name"}),t(Qn,{label:"Email"})]}),t(Qn,{label:"Message",filled:!0}),t(da,{children:"SEND"})]})}),appointmentbooking:t(q,{title:"Book a fitting",children:d("div",{style:{flex:1,display:"flex",flexDirection:"column",gap:4,justifyContent:"center"},children:[t("div",{style:{display:"flex",gap:3},children:["Mon","Tue","Wed","Thu"].map((n,s)=>t("span",{style:{flex:1,textAlign:"center",fontSize:"3.32cqw",fontWeight:s===2?700:500,padding:"4px 0",borderRadius:3,background:s===2?i.text:i.paper,color:s===2?i.onInk:i.muted},children:n},n))}),t("div",{style:{display:"flex",gap:3},children:["8:00","10:30","13:00","15:30"].map((n,s)=>t("span",{style:{flex:1,textAlign:"center",fontSize:"3.32cqw",padding:"4px 0",borderRadius:3,border:`1px solid ${s===1?i.rust:i.rule}`,color:s===1?i.rust:i.muted,background:s===3?i.paper:i.card,textDecoration:s===3?"line-through":"none"},children:n},n))})]})}),reviewform:t(q,{title:"Leave a review",children:d("div",{style:{flex:1,display:"flex",flexDirection:"column",gap:5,justifyContent:"center"},children:[t(ii,{filled:4,size:14}),t(Qn,{label:"Your review",filled:!0}),t(da,{children:"POST"})]})}),submitbuild:t(q,{title:"Show us your build",children:d("div",{style:{flex:1,display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",gap:3,border:`1px dashed ${i.mark1}`,borderRadius:5,background:i.paper},children:[t("span",{style:{fontSize:"6.63cqw",lineHeight:1,color:i.rust,fontWeight:300},children:"+"}),t("span",{style:{fontSize:"3.65cqw",color:i.muted},children:"Drop a photo of your rig"})]})}),masthead:d("div",{style:{...I,background:i.paper,display:"flex",flexDirection:"column",justifyContent:"center",padding:"0 13px",gap:5},children:[t("span",{style:{height:1.5,background:i.text}}),t("span",{style:{fontSize:"7.65cqw",fontWeight:800,letterSpacing:"0.02em",color:i.text,lineHeight:1},children:"THE TRACK"}),d("div",{style:{display:"flex",justifyContent:"space-between",fontSize:"3.65cqw",letterSpacing:"0.1em",textTransform:"uppercase",color:i.muted},children:[t("span",{children:"Issue 14"}),t("span",{children:"Spring 2026"})]}),t("span",{style:{height:1,background:i.rule}})]}),featuredcover:d("div",{style:{...I,overflow:"hidden",...X(i.ink,i.inkSoft2)},children:[t(rt,{size:92,style:{right:-18,top:-14}}),t("div",{style:{position:"absolute",inset:0,background:`linear-gradient(0deg,${i.scrim},transparent 62%)`}}),d("div",{style:{position:"absolute",left:12,right:12,bottom:11,display:"flex",flexDirection:"column",gap:3},children:[t("span",{style:{fontSize:"3.65cqw",letterSpacing:"0.16em",fontWeight:700,color:i.warm},children:"FEATURE"}),t("span",{style:{fontSize:"6.16cqw",lineHeight:1.15,fontWeight:700,color:i.onInk},children:"Four days on the Madigan Line"})]})]}),longread:d("div",{style:{...I,background:i.card,padding:"10px 14px",display:"flex",flexDirection:"column",gap:4,justifyContent:"center"},children:[t("span",{style:{fontSize:"3.65cqw",letterSpacing:"0.14em",fontWeight:700,color:i.rust},children:"12 MIN READ"}),t("span",{style:{fontSize:"6.02cqw",lineHeight:1.15,fontWeight:700,color:i.text},children:"What breaks first, and why"}),t(ge,{children:"Every failure starts in the same place \u2014 not the rim, not"}),t(ge,{w:"62%",children:"the tyre, but the bolt nobody re-torqued."})]}),series:t(q,{title:"Recurring columns",children:t("div",{style:{flex:1,display:"flex",flexDirection:"column",gap:5,justifyContent:"center"},children:[["Shed Notes","Monthly"],["Track Tested","Fortnightly"],["Reader Rigs","Weekly"]].map(([n,s])=>d("div",{style:{display:"flex",alignItems:"center",gap:6},children:[t("span",{style:{width:3,height:12,borderRadius:2,background:i.rust,flex:"none"}}),t("b",{style:{flex:1,fontSize:"4.64cqw",color:i.text},children:n}),t("span",{style:{fontSize:"3.65cqw",letterSpacing:"0.08em",textTransform:"uppercase",color:i.muted},children:s})]},n))})}),events:t(q,{title:"Latest posts",children:t("div",{style:{flex:1,display:"flex",flexDirection:"column",gap:5,justifyContent:"center"},children:[[i.inkSoft,i.inkSoft2,"Madigan Line, four days"],[i.rust,i.warm,"Why offset beats width"]].map(([n,s,a])=>d("div",{style:{display:"flex",gap:6,alignItems:"center"},children:[t("span",{style:{width:24,height:18,borderRadius:3,flex:"none",...X(n,s,150)}}),d("div",{style:{display:"flex",flexDirection:"column",gap:1,minWidth:0},children:[t("b",{style:{fontSize:"4.31cqw",color:i.text},children:a}),t("span",{style:{fontSize:"3.65cqw",color:i.muted},children:"4 Sep \xB7 Shed Notes"})]})]},a))})}),docmasthead:d("div",{style:{...I,background:i.card,padding:"12px 14px",display:"flex",flexDirection:"column",gap:5,justifyContent:"center"},children:[t("span",{style:{fontSize:"3.65cqw",letterSpacing:"0.16em",fontWeight:700,color:i.muted},children:"POLICY"}),t("span",{style:{fontSize:"6.49cqw",fontWeight:700,color:i.text,lineHeight:1.1},children:"Returns & refunds"}),t("span",{style:{fontSize:"3.65cqw",color:i.muted},children:"Version 3 \xB7 Updated 4 Sep 2026"}),t("span",{style:{height:2,width:26,background:i.rust,borderRadius:1}})]}),docbody:t("div",{style:{...I,background:i.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(([n,s])=>d("div",{style:{display:"flex",gap:5},children:[t("b",{style:{fontSize:"3.98cqw",color:i.rust,flex:"none"},children:n}),t(ge,{children:s})]},n))}),docmetacards:t(q,{title:"At a glance",children:t("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(([n,s])=>d("div",{style:{border:`1px solid ${i.rule}`,borderRadius:4,padding:"5px 6px",display:"flex",flexDirection:"column",gap:1},children:[t("b",{style:{fontSize:"5.31cqw",color:i.text,lineHeight:1},children:n}),t("span",{style:{fontSize:"3.32cqw",letterSpacing:"0.08em",textTransform:"uppercase",color:i.muted},children:s})]},s))})}),doctabs:d("div",{style:{...I,background:i.card,display:"flex",flexDirection:"column",justifyContent:"center",gap:0,padding:"0 11px"},children:[t("div",{style:{display:"flex",gap:0},children:["Returns","Warranty","Shipping"].map((n,s)=>t("span",{style:{fontSize:"3.98cqw",fontWeight:s===0?700:500,padding:"5px 8px",color:s===0?i.text:i.muted,background:s===0?i.paper:"transparent",borderRadius:"4px 4px 0 0",border:`1px solid ${s===0?i.rule:"transparent"}`,borderBottom:"none"},children:n},n))}),t("span",{style:{height:1,background:i.rule}}),d("div",{style:{paddingTop:6,display:"flex",flexDirection:"column",gap:2},children:[t(ge,{children:"Unfitted wheels come back within 30 days, no questions."}),t(ge,{w:"58%",children:"Freight on a change of mind is yours."})]})]}),paragraphs:d("div",{style:{...I,background:i.card,padding:"11px 14px",display:"flex",gap:10,alignItems:"center"},children:[t("span",{style:{flex:1,fontSize:"5.86cqw",lineHeight:1.2,fontWeight:700,color:i.text},children:"The right wheel is the boring one."}),d("div",{style:{flex:1,display:"flex",flexDirection:"column"},children:[t(ge,{children:"Forged, correctly offset, rated for what you actually"}),t(ge,{children:"carry. Everything else is a photograph."})]})]}),keyfeatures:t(q,{title:"Key features",children:t("div",{style:{flex:1,display:"flex",flexDirection:"column",gap:4,justifyContent:"center"},children:["Flow-formed barrel","1250 kg per corner","Hub-centric fit"].map(n=>d("div",{style:{display:"flex",gap:6,alignItems:"center"},children:[t("span",{style:{fontSize:"4.64cqw",color:i.rust,fontWeight:700,lineHeight:1},children:"\u2713"}),t("span",{style:{fontSize:"4.31cqw",color:i.text},children:n})]},n))})}),statsparagraph:d("div",{style:{...I,background:i.paper,padding:"10px 12px",display:"flex",gap:10,alignItems:"center"},children:[d("div",{style:{flex:"none",display:"flex",flexDirection:"column",gap:5},children:[t(hn,{n:"27k",label:"Rigs"}),t(hn,{n:"4.9",label:"Rating"})]}),d("div",{style:{flex:1,display:"flex",flexDirection:"column"},children:[t(ge,{children:"Twelve years of fitting the same three questions, and the"}),t(ge,{children:"answer has not moved: load rating, offset, then looks."})]})]}),chart:d(q,{title:"Load vs weight",children:[t("div",{style:{flex:1,display:"flex",alignItems:"flex-end",gap:5,paddingBottom:2},children:[38,62,84,71,96].map((n,s)=>t("span",{style:{flex:1,height:`${n}%`,borderRadius:"2px 2px 0 0",background:s===4?i.rust:i.mark1}},s))}),t("span",{style:{height:1,background:i.rule,marginTop:-4}})]}),mockup:t("div",{style:{...I,overflow:"hidden",display:"flex",alignItems:"center",justifyContent:"center",...X(i.inkSoft,i.ink)},children:d("div",{style:{width:"72%",height:"74%",borderRadius:4,overflow:"hidden",background:i.card,boxShadow:`0 6px 14px ${i.scrim}`},children:[t("div",{style:{height:9,background:i.paper,display:"flex",alignItems:"center",gap:2,padding:"0 4px"},children:[0,1,2].map(n=>t("span",{style:{width:2.5,height:2.5,borderRadius:"50%",background:i.mark1}},n))}),d("div",{style:{padding:5,display:"flex",flexDirection:"column",gap:3},children:[t("span",{style:{height:4,width:"56%",borderRadius:1,background:i.mark2}}),t("span",{style:{height:14,borderRadius:2,...X(i.paper,i.paper2,150)}}),t("span",{style:{height:3,width:"38%",borderRadius:1,background:i.rust}})]})]})}),manifesto:t("div",{style:{...I,overflow:"hidden",display:"flex",alignItems:"center",padding:"0 16px",...X(i.ink,i.ink2)},children:d("span",{style:{fontSize:"6.63cqw",lineHeight:1.2,fontWeight:700,color:i.onInk},children:["We build for the ",t("span",{style:{color:i.warm},children:"last"})," ten percent of the track."]})}),timeline:t(q,{title:"Our story",children:t("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(([n,s],a)=>d("div",{style:{display:"flex",gap:7,alignItems:"flex-start",position:"relative"},children:[a<2&&t("span",{style:{position:"absolute",left:3,top:8,bottom:-8,width:1,background:i.rule}}),t("span",{style:{width:7,height:7,borderRadius:"50%",flex:"none",marginTop:1,background:i.rust,zIndex:1}}),d("div",{style:{display:"flex",flexDirection:"column",gap:0,minWidth:0},children:[t("b",{style:{fontSize:"4.64cqw",color:i.text},children:n}),t(ge,{children:s})]})]},n))})}),timelinetrack:d("div",{style:{...I,padding:"0 12px",display:"flex",flexDirection:"column",gap:10,justifyContent:"center",...X(i.ink,i.inkSoft)},children:[t("span",{style:{fontSize:"3.98cqw",fontWeight:700,letterSpacing:"0.14em",textTransform:"uppercase",color:i.warm},children:"Milestones"}),d("div",{style:{position:"relative",display:"flex",justifyContent:"space-between",paddingTop:7},children:[t("span",{style:{position:"absolute",left:0,right:0,top:3,height:1,background:i.mark2,opacity:.55}}),["1998","2009","2016","2024"].map((n,s)=>d("div",{style:{display:"flex",flexDirection:"column",alignItems:"center",gap:3,position:"relative"},children:[t("span",{style:{position:"absolute",top:-7,width:6,height:6,borderRadius:"50%",background:s===3?i.warm:i.mark1}}),t("span",{style:{fontSize:"4.31cqw",fontWeight:700,color:s===3?i.warm:i.onInk,opacity:s===3?1:.75},children:n})]},n))]})]}),footprint:d("div",{style:{...I,overflow:"hidden",...X(i.paper,i.paper2,150)},children:[t("span",{style:{position:"absolute",left:"8%",top:"18%",width:"62%",height:"64%",borderRadius:"48% 52% 40% 60% / 55% 45% 55% 45%",background:i.mark1,opacity:.75}}),t("span",{style:{position:"absolute",left:"52%",top:"52%",width:"34%",height:"34%",borderRadius:"58% 42% 55% 45% / 45% 58% 42% 55%",background:i.mark2,opacity:.55}}),[["26%","38%"],["44%","58%"],["62%","34%"]].map(([n,s])=>t("span",{style:{position:"absolute",left:n,top:s,width:7,height:7,borderRadius:"50% 50% 50% 0",transform:"rotate(-45deg)",background:i.rust}},n)),t("span",{style:{position:"absolute",left:11,bottom:9,fontSize:"4.64cqw",fontWeight:700,color:i.text},children:"3 fitting bays"})]}),banner:d("div",{style:{...I,display:"flex",alignItems:"center",justifyContent:"space-between",padding:"0 13px",gap:8,background:i.rust},children:[d("div",{style:{display:"flex",flexDirection:"column",gap:2},children:[t("b",{style:{fontSize:"6.02cqw",color:i.onInk},children:"End of season \xB7 20% off"}),t("span",{style:{fontSize:"3.98cqw",color:i.onInk,opacity:.8},children:"Fitted free, this month only."})]}),t("span",{style:{fontSize:"3.65cqw",letterSpacing:"0.12em",fontWeight:700,padding:"5px 9px",borderRadius:2,background:i.onInk,color:i.text,flex:"none"},children:"SHOP"})]}),titlewithbuttons:d("div",{style:{...I,background:i.paper,display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",gap:7,padding:"0 14px",textAlign:"center"},children:[t("span",{style:{fontSize:"6.49cqw",lineHeight:1.15,fontWeight:700,color:i.text},children:"Not sure what fits?"}),d("div",{style:{display:"flex",gap:5},children:[t("span",{style:{fontSize:"3.65cqw",letterSpacing:"0.12em",fontWeight:700,padding:"5px 9px",borderRadius:2,background:i.text,color:i.onInk},children:"FIND MY FIT"}),t("span",{style:{fontSize:"3.65cqw",letterSpacing:"0.12em",fontWeight:700,padding:"5px 9px",borderRadius:2,border:`1px solid ${i.text}`,color:i.text},children:"CALL US"})]})]}),ticker:t("div",{style:{...I,overflow:"hidden",background:i.ink,display:"flex",alignItems:"center"},children:t("span",{style:{whiteSpace:"nowrap",fontSize:"6.29cqw",fontWeight:800,letterSpacing:"0.06em",color:i.warm,marginLeft:-14},children:"FREE FITTING \xB7 48HR DISPATCH \xB7 FREE FITTING \xB7 48HR DISPATCH"})}),breadcrumb:t("div",{style:{...I,background:i.card,display:"flex",alignItems:"center",padding:"0 13px"},children:d("span",{style:{fontSize:"4.64cqw",color:i.muted},children:["Home ",t("span",{style:{opacity:.5},children:"/"})," Wheels ",t("span",{style:{opacity:.5},children:"/"})," ",t("span",{style:{color:i.text,fontWeight:700},children:"20 inch"})]})}),categorybar:d("div",{style:{...I,background:i.card,display:"flex",flexDirection:"column",justifyContent:"center",gap:7,padding:"0 11px"},children:[t("div",{style:{display:"flex",gap:5},children:["All","Wheels","Tyres","Lift"].map((n,s)=>t("span",{style:{fontSize:"3.98cqw",fontWeight:s===0?700:500,padding:"4px 7px",borderRadius:99,background:s===0?i.text:i.paper,color:s===0?i.onInk:i.muted},children:n},n))}),t("span",{style:{height:1,background:i.rule}})]}),intro:d("div",{style:{...I,overflow:"hidden",background:i.card},children:[t("div",{style:{position:"absolute",inset:0,...X(i.ink,i.inkSoft2)}}),t(rt,{size:64,style:{right:8,top:6}}),d("div",{style:{position:"absolute",left:16,right:16,bottom:8,top:"46%",background:i.paper,borderRadius:6,padding:"8px 11px",display:"flex",flexDirection:"column",gap:2,boxShadow:`0 -4px 10px ${i.scrim}`},children:[t("span",{style:{fontSize:"5.69cqw",fontWeight:700,color:i.text},children:"Since 1998"}),t(ge,{children:"One shed, one lathe, one idea."}),t(ge,{w:"66%",children:"It turned out to be right."})]})]}),gallerygrid:t(q,{title:"From our customers",children:t("div",{style:{flex:1,display:"grid",gridTemplateColumns:"repeat(3,1fr)",gridTemplateRows:"repeat(2,1fr)",gap:4,minHeight:0},children:[[i.rust,i.warm],[i.inkSoft,i.ink],[i.paper2,i.mark2],[i.ink,i.inkSoft2],[i.warm,i.paper2],[i.mark2,i.inkSoft]].map(([n,s],a)=>t("div",{style:{borderRadius:3,...X(n,s,140+a*22)}},a))})}),gallery:d(q,{title:"Gallery",children:[t("div",{style:{display:"flex",gap:8,alignItems:"center",marginTop:-2},children:["On the truck","Studio","Close-ups"].map((n,s)=>t("span",{style:{fontSize:"3.98cqw",fontWeight:s===0?700:500,color:s===0?i.text:i.muted,borderBottom:`1.5px solid ${s===0?i.rust:"transparent"}`,paddingBottom:2},children:n},n))}),t("div",{style:{flex:1,display:"grid",gridTemplateColumns:"repeat(3,1fr)",gap:4,minHeight:0},children:[[i.rust,i.warm],[i.ink,i.inkSoft],[i.paper2,i.mark2]].map(([n,s],a)=>t("div",{style:{borderRadius:3,...X(n,s,150+a*20)}},a))})]}),ordersummary:d(q,{title:"Order summary",children:[d("div",{style:{display:"flex",gap:6,alignItems:"center",paddingBottom:4},children:[t("span",{style:{width:26,height:26,borderRadius:4,position:"relative",overflow:"hidden",flex:"none",...X(i.paper,i.paper2,150)},children:t(rt,{size:18,style:{left:"50%",top:"50%",transform:"translate(-50%,-50%)"}})}),d("div",{style:{display:"flex",flexDirection:"column",gap:1,minWidth:0},children:[t("b",{style:{fontSize:"4.31cqw",color:i.text},children:"Ridge Grappler"}),t("span",{style:{fontSize:"3.65cqw",color:i.muted},children:"20\xD79 +12 \xB7 qty 4"})]})]}),d("div",{style:{flex:1,minHeight:0,display:"flex",flexDirection:"column",justifyContent:"center"},children:[t(st,{k:"Subtotal",v:"$1,956"}),t(st,{k:"Fitting",v:"Free"}),d("div",{style:{display:"flex",justifyContent:"space-between",paddingTop:5,fontSize:"4.64cqw"},children:[t("b",{style:{color:i.text},children:"Total"}),t("b",{style:{color:i.text,fontSize:"6.02cqw"},children:"$1,956"})]})]})]}),deliveryoptions:t(q,{title:"Delivery",children:t("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(([n,s,a,m])=>d("div",{style:{display:"flex",alignItems:"center",gap:6,padding:"5px 6px",borderRadius:4,border:`1px solid ${m?i.rust:i.rule}`,background:m?i.paper:i.card},children:[t("span",{style:{width:7,height:7,borderRadius:"50%",flex:"none",border:`1.5px solid ${m?i.rust:i.mark1}`,background:m?i.rust:"transparent"}}),t("span",{style:{flex:1,fontSize:"4.31cqw",fontWeight:600,color:i.text},children:n}),t("span",{style:{fontSize:"3.98cqw",color:i.muted},children:s}),t("b",{style:{fontSize:"4.31cqw",color:i.text},children:a})]},n))})}),paymentbadges:d("div",{style:{...I,background:i.paper,display:"flex",flexDirection:"column",gap:8,justifyContent:"center",padding:"0 12px"},children:[t(bn,{children:"Ways to pay"}),t("div",{style:{display:"flex",gap:5},children:[["VISA",i.ink],["MC",i.rust],["AMEX",i.inkSoft],["PayPal",i.ink2]].map(([n,s])=>t("span",{style:{flex:1,textAlign:"center",fontSize:"3.65cqw",fontWeight:800,letterSpacing:"0.06em",color:i.onInk,borderRadius:3,padding:"6px 0",background:s},children:n},n))})]}),stats:d("div",{style:{...I,padding:"10px 12px",display:"flex",flexDirection:"column",gap:9,justifyContent:"center",...X(i.ink,i.ink2)},children:[t("span",{style:{fontSize:"3.98cqw",fontWeight:700,letterSpacing:"0.14em",textTransform:"uppercase",color:i.warm},children:"By the numbers"}),d("div",{style:{display:"flex",gap:8},children:[t(hn,{n:"27k",label:"Rigs fitted",tone:i.onInk}),t(hn,{n:"12",label:"Years",tone:i.onInk}),t(hn,{n:"4.9",label:"Avg rating",tone:i.warm})]})]}),testimonials:d("div",{style:{...I,overflow:"hidden",background:i.paper,padding:"10px 11px",display:"flex",flexDirection:"column",gap:6,justifyContent:"center"},children:[t("span",{style:{position:"absolute",right:10,top:2,fontSize:"22.4cqw",lineHeight:1,fontWeight:800,color:i.rust,opacity:.16},children:"\u201D"}),t(ii,{filled:5,size:7}),t("span",{style:{position:"relative",fontSize:"5.31cqw",lineHeight:1.35,color:i.text,fontWeight:600},children:"\u201CTook them out to the Simpson and back. Not one chip.\u201D"}),d("div",{style:{display:"flex",alignItems:"center",gap:5},children:[t(la,{}),t("span",{style:{fontSize:"3.98cqw",color:i.muted},children:"Dave M. \xB7 Hilux N80"})]})]}),reviews:d(q,{title:"Reviews",children:[t("div",{style:{display:"flex",gap:4,height:22},children:[[i.inkSoft,i.inkSoft2],[i.rust,i.warm],[i.ink,i.inkSoft],[i.mark2,i.mark1]].map(([n,s],a)=>t("div",{style:{flex:1,borderRadius:3,...X(n,s,140+a*15)}},a))}),t("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(([n,s,a])=>d("div",{style:{display:"flex",gap:5,alignItems:"flex-start"},children:[t(la,{size:12}),d("div",{style:{display:"flex",flexDirection:"column",gap:1,minWidth:0},children:[d("div",{style:{display:"flex",gap:4,alignItems:"center"},children:[t("b",{style:{fontSize:"3.98cqw",color:i.text},children:n}),t(ii,{filled:s})]}),t(ge,{children:a})]})]},n))})]}),logos:d("div",{style:{...I,display:"flex",flexDirection:"column",gap:9,justifyContent:"center",padding:"0 12px",...X(i.ink,i.inkSoft)},children:[t("span",{style:{fontSize:"3.98cqw",fontWeight:700,letterSpacing:"0.14em",textTransform:"uppercase",color:i.warm},children:"As fitted by"}),t("div",{style:{display:"grid",gridTemplateColumns:"repeat(4,1fr)",gap:8},children:["ARB","TJM","IRONMAN","OPPOSITE"].map(n=>t("span",{style:{textAlign:"center",fontSize:"4.31cqw",fontWeight:800,letterSpacing:"0.08em",color:i.onInk,opacity:.82},children:n},n))})]}),prose:d("div",{style:{...I,background:i.paper,padding:"11px 14px",display:"flex",flexDirection:"column",gap:4,justifyContent:"center"},children:[t("span",{style:{fontSize:"5.86cqw",fontWeight:700,color:i.text},children:"Why offset matters"}),d("div",{style:{display:"flex",gap:6},children:[t("span",{style:{fontSize:"15.3cqw",lineHeight:.78,fontWeight:800,color:i.rust,marginTop:1},children:"T"}),d("div",{style:{display:"flex",flexDirection:"column"},children:[t(ge,{children:"he number on the back of your wheel decides whether the"}),t(ge,{w:"76%",children:"tyre sits under the guard or an inch outside it."})]})]})]}),cards:t(q,{title:"What you get",children:t("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(([n,s])=>d("div",{style:{border:`1px solid ${i.rule}`,borderRadius:4,padding:6,display:"flex",flexDirection:"column",gap:2},children:[t("span",{style:{width:11,height:11,borderRadius:3,background:i.rust,opacity:.9}}),t("b",{style:{fontSize:"3.98cqw",color:i.text},children:n}),t(ge,{children:s})]},n))})}),faq:t(q,{title:"Questions",children:t("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(([n,s])=>d("div",{style:{borderBottom:`1px solid ${i.rule}`,padding:"4px 2px"},children:[d("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",gap:6},children:[t("b",{style:{fontSize:"4.31cqw",color:i.text},children:n}),t("span",{style:{fontSize:"4.64cqw",color:i.muted,lineHeight:1},children:s?"\u2212":"+"})]}),s&&t(ge,{w:"90%",children:"Use the fitment finder \u2014 it reads your build, not just the model."})]},n))})}),hero:d("div",{style:{...I,overflow:"hidden",...X(i.ink,i.ink2)},children:[t("div",{style:{...I,background:`linear-gradient(90deg,${i.scrim},transparent 70%)`}}),t("div",{style:{position:"relative",height:"100%",display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"flex-start",padding:"12px 14px",gap:5},children:t(aa,{over:"NEW \xB7 SUMMER",overTone:i.warm,head:"Built for the worst road you own",cta:"SHOP ALL",ctaBg:i.warm,ctaFg:i.ink,tone:i.onInk})}),t(rt,{size:104,style:{right:-24,bottom:-30}})]}),herosingle:d("div",{style:{...I,display:"flex",background:i.paper,overflow:"hidden"},children:[t("div",{style:{flex:1,padding:12,display:"flex",flexDirection:"column",gap:5,justifyContent:"center"},children:t(aa,{over:"ALL-TERRAIN",overTone:i.rust,head:"Grip that does not ask",headSize:12,cta:"EXPLORE",ctaBg:i.text,ctaFg:i.onInk,tone:i.text})}),t("div",{style:{flex:1,position:"relative",...X(i.inkSoft,i.inkSoft2)},children:t(rt,{size:74,style:{right:-14,top:16}})})]}),productgrid:t(q,{title:"Best sellers",children:d("div",{style:{flex:1,display:"grid",gridTemplateColumns:"repeat(3,1fr)",gap:5,minHeight:0},children:[t(oi,{name:"Ridge 19",price:"$365"}),t(oi,{name:"Ridge 29",price:"$410"}),t(oi,{name:"Ridge 39",price:"$455"})]})}),collections:t(q,{title:"Shop by category",children:t("div",{style:{flex:1,display:"grid",gridTemplateColumns:"repeat(3,1fr)",gap:5,minHeight:0},children:[["Wheels",i.inkSoft,i.inkSoft2],["Tyres",i.rust,i.warm],["Lift kits",i.ink,i.inkSoft]].map(([n,s,a])=>t("div",{style:{borderRadius:4,display:"flex",alignItems:"flex-end",padding:5,color:i.onInk,...X(s,a)},children:t("span",{style:{fontSize:"3.98cqw",fontWeight:700,letterSpacing:"0.04em"},children:n})},n))})}),producthero:d("div",{style:{...I,display:"flex",background:i.card,overflow:"hidden"},children:[t("div",{style:{flex:1.1,position:"relative",...X(i.paper,i.paper2,150)},children:t(rt,{size:78,style:{left:"50%",top:"50%",transform:"translate(-50%,-50%)"}})}),d("div",{style:{flex:1,padding:"10px 10px 10px 8px",display:"flex",flexDirection:"column",gap:4,justifyContent:"center"},children:[t("span",{style:{fontSize:"3.65cqw",letterSpacing:"0.16em",fontWeight:700,color:i.rust},children:"NITTO"}),t("b",{style:{fontSize:"6.29cqw",color:i.text},children:"Ridge Grappler"}),t("span",{style:{fontSize:"6.63cqw",fontWeight:700,color:i.text},children:"$489"}),t("span",{style:{alignSelf:"flex-start",fontSize:"3.65cqw",letterSpacing:"0.12em",fontWeight:700,padding:"4px 8px",borderRadius:2,background:i.text,color:i.onInk},children:"ADD TO CART"})]})]}),spectable:t(q,{title:"Specifications",children:d("div",{style:{flex:1,display:"flex",flexDirection:"column",justifyContent:"center"},children:[t(st,{k:"Diameter",v:'20"'}),t(st,{k:"Width",v:"9.0J"}),t(st,{k:"Offset",v:"+12"}),t(st,{k:"Load",v:"1250 kg"})]})}),fitmenttable:t(q,{title:"Will it fit?",children:d("div",{style:{flex:1,display:"flex",flexDirection:"column",justifyContent:"center"},children:[t(st,{k:"Hilux N80",v:"20\xD79 +12",ok:!0}),t(st,{k:"Ranger PX3",v:"20\xD79 +12",ok:!0}),t(st,{k:"LC79",v:"17\xD78 \u221210",ok:!0})]})}),brandstrip:d("div",{style:{...I,background:i.paper,display:"flex",flexDirection:"column",gap:8,justifyContent:"center",padding:"0 12px"},children:[t(bn,{children:"Brands we carry"}),t("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center"},children:["NITTO","BFG","FUEL","TOYO"].map(n=>t("span",{style:{fontSize:"4.64cqw",fontWeight:800,letterSpacing:"0.1em",color:i.mark2},children:n},n))})]}),processsteps:d("div",{style:{...I,background:i.paper,padding:10,display:"flex",flexDirection:"column",gap:7,justifyContent:"center"},children:[t(bn,{children:"How it works"}),t("div",{style:{display:"flex",gap:6},children:["Pick your rig","Match the fit","We fit it"].map((n,s)=>d("div",{style:{flex:1,display:"flex",flexDirection:"column",gap:2},children:[t("span",{style:{width:11,height:11,borderRadius:"50%",background:i.text,color:i.onInk,fontSize:"3.98cqw",display:"flex",alignItems:"center",justifyContent:"center",fontWeight:700},children:s+1}),t("span",{style:{fontSize:"3.98cqw",color:i.text,fontWeight:600},children:n})]},n))})]}),detailrows:t("div",{style:{...I,background:i.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(([n,s,a])=>{let m=t("div",{style:{flex:1,...X(a?i.rust:i.inkSoft,a?i.warm:i.inkSoft2)}},"art"),u=d("div",{style:{flex:1.1,padding:8,display:"flex",flexDirection:"column",gap:2,justifyContent:"center"},children:[t("b",{style:{fontSize:"4.64cqw",color:i.text},children:n}),t("span",{style:{fontSize:"3.98cqw",color:i.muted,lineHeight:1.3},children:s})]},"tx");return t("div",{style:{flex:1,display:"flex",minHeight:0},children:a?[u,m]:[m,u]},n)})}),specstrip:t("div",{style:{...I,background:i.ink,color:i.onInk,display:"flex",alignItems:"center",justifyContent:"space-around",padding:"0 8px"},children:[["5 yr","Warranty"],["Free","Fitting"],["48 hr","Dispatch"]].map(([n,s])=>d("div",{style:{display:"flex",flexDirection:"column",alignItems:"center",gap:1},children:[t("b",{style:{fontSize:"5.69cqw",letterSpacing:"0.02em"},children:n}),t("span",{style:{fontSize:"3.65cqw",color:i.mark2,letterSpacing:"0.1em",textTransform:"uppercase"},children:s})]},s))})},ca={subscribe:d("div",{style:{...I,padding:13,display:"flex",flexDirection:"column"},children:[d("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",marginBottom:8},children:[d("div",{style:{display:"flex",alignItems:"center",gap:6},children:[t(S,{w:8,h:8,r:2,tone:"accent"}),t(S,{w:38,h:7,r:3,tone:"dark"}),t(S,{w:16,h:7,r:3,tone:"accent"})]}),t(S,{w:38,h:4,r:2,tone:"soft"})]}),t("div",{style:{height:1,background:re.line,marginBottom:10}}),d("div",{style:{flex:1,display:"flex",gap:10,border:`1px solid ${re.line}`,borderRadius:7,padding:10},children:[d("div",{style:{flex:1.1,display:"flex",flexDirection:"column",justifyContent:"center",gap:5},children:[t(S,{w:"46%",h:3,r:2,tone:"accent"}),t(S,{w:"84%",h:8,r:4,tone:"dark"}),t(S,{w:"56%",h:8,r:4,tone:"accent"}),t(S,{w:"96%",h:3,r:2,tone:"soft",style:{marginTop:2}}),d("div",{style:{display:"flex",gap:5,marginTop:4},children:[t("div",{style:{flex:1,height:13,borderRadius:5,border:`1px solid ${re.line}`,background:re.block}}),t(S,{w:34,h:13,r:5,tone:"accent"})]})]}),d("div",{style:{flex:1,background:re.block,borderRadius:6,padding:8,display:"flex",flexDirection:"column",gap:6},children:[t(S,{w:"52%",h:4,r:2,tone:"accent"}),Array.from({length:3}).map((n,s)=>d("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",gap:6,borderTop:s?`1px solid ${re.line}`:"none",paddingTop:s?4:0},children:[t(S,{w:34,h:4,r:2,tone:"dark"}),t(S,{w:16,h:3,r:2,tone:"soft"})]},s))]})]})]}),split:d("div",{style:{...I,display:"flex"},children:[t("div",{style:{width:"44%",background:ni}}),d("div",{style:{flex:1,padding:15,display:"flex",flexDirection:"column",justifyContent:"center",gap:7},children:[t(S,{w:"44%",h:5,r:3,tone:"accent"}),t(S,{w:"88%",h:8,r:4,tone:"dark"}),t(S,{w:"70%",h:8,r:4,tone:"dark"}),t(S,{w:"94%",h:5,r:2,tone:"soft",style:{marginTop:2}}),t(S,{w:"80%",h:5,r:2,tone:"soft"}),t(S,{w:"40%",h:13,r:6,tone:"accent",style:{marginTop:5}})]})]}),sectionheader:d(pa,{children:[t(S,{w:"18%",h:6,r:3,tone:"accent",style:{position:"absolute",top:15,right:16}}),d("div",{style:{...I,padding:16,display:"flex",flexDirection:"column",justifyContent:"center",gap:10},children:[d("div",{style:{display:"flex",alignItems:"center",gap:9},children:[t(S,{w:16,h:16,r:4,tone:"accent"}),t(S,{w:"20%",h:9,r:4,tone:"dark"})]}),t(S,{w:"62%",h:10,r:5,tone:"dark"}),t(S,{w:"42%",h:6,r:3,tone:"soft"})]})]}),header:t("div",{style:{...I,padding:14,display:"flex",flexDirection:"column",justifyContent:"center"},children:d("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between"},children:[t(S,{w:"22%",h:12,r:4,tone:"dark"}),d("div",{style:{display:"flex",gap:9,alignItems:"center"},children:[t(S,{w:26,h:6,r:3,tone:"soft"}),t(S,{w:26,h:6,r:3,tone:"soft"}),t(S,{w:26,h:6,r:3,tone:"soft"}),t(S,{w:18,h:14,r:5,tone:"accent"})]})]})}),footer:d("div",{style:{...I,padding:15,display:"flex",flexDirection:"column",justifyContent:"center",gap:12},children:[d("div",{style:{display:"flex",gap:14},children:[d("div",{style:{flex:1.4,display:"flex",flexDirection:"column",gap:6},children:[t(S,{w:"60%",h:9,r:4,tone:"dark"}),t(S,{w:"90%",h:5,r:2,tone:"soft"}),t(S,{w:"70%",h:5,r:2,tone:"soft"})]}),[0,1].map(n=>d("div",{style:{flex:1,display:"flex",flexDirection:"column",gap:6},children:[t(S,{w:"50%",h:6,r:3,tone:"dark"}),t(S,{w:"80%",h:5,r:2,tone:"soft"}),t(S,{w:"66%",h:5,r:2,tone:"soft"})]},n))]}),t("div",{style:{height:1,background:re.line}}),d("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center"},children:[t(S,{w:"30%",h:5,r:2,tone:"soft"}),t(S,{w:"16%",h:5,r:2,tone:"soft"})]})]}),grid:t("div",{style:{...I,padding:14,display:"grid",gridTemplateColumns:"1fr 1fr",gridTemplateRows:"1fr 1fr",gap:9},children:Array.from({length:4}).map((n,s)=>t("div",{style:{borderRadius:6,background:re.block}},s))}),blanksection:t("div",{style:{...I,padding:14,display:"flex"},children:d("div",{style:{flex:1,border:`1px dashed ${re.line}`,borderRadius:7,display:"flex",alignItems:"center",justifyContent:"center",position:"relative"},children:[t(S,{w:14,h:2,r:1,tone:"tint"}),t(S,{w:2,h:14,r:1,tone:"tint",style:{position:"absolute"}})]})}),spacer:d("div",{style:{...I,padding:14,display:"flex",flexDirection:"column",justifyContent:"space-between"},children:[t(S,{w:"100%",h:6,r:3,tone:"soft"}),t(S,{w:16,h:22,r:3,tone:"block",style:{alignSelf:"center"}}),t(S,{w:"100%",h:6,r:3,tone:"soft"})]}),divider:t("div",{style:{...I,padding:14,display:"flex",alignItems:"center"},children:t(S,{w:"100%",h:3,r:2,tone:"dark"})}),customhtml:d("div",{style:{...I,display:"flex",alignItems:"center",justifyContent:"center",gap:8,background:ni},children:[t(S,{w:5,h:16,r:2,tone:"dark",style:{transform:"skewX(-14deg)"}}),t(S,{w:16,h:10,r:3,tone:"accent"}),t(S,{w:5,h:16,r:2,tone:"dark",style:{transform:"skewX(14deg)"}})]}),heading:t("div",{style:{...I,padding:14,display:"flex",alignItems:"center"},children:t(S,{w:"64%",h:13,r:4,tone:"dark"})}),text:d("div",{style:{...I,padding:16,display:"flex",flexDirection:"column",justifyContent:"center",gap:7},children:[t(S,{w:"100%",h:6,r:3,tone:"soft"}),t(S,{w:"96%",h:6,r:3,tone:"soft"}),t(S,{w:"100%",h:6,r:3,tone:"soft"}),t(S,{w:"58%",h:6,r:3,tone:"soft"})]}),image:t("div",{style:{position:"absolute",inset:14,borderRadius:7,background:ni}}),button:t("div",{style:{...I,display:"flex",alignItems:"center",justifyContent:"center"},children:t(S,{w:"34%",h:16,r:8,tone:"accent"})}),menu:d("div",{style:{...I,padding:"14px 22%",display:"flex",flexDirection:"column",justifyContent:"center",gap:7},children:[t(S,{w:"48%",h:7,r:3,tone:"dark"}),t(S,{w:"82%",h:5,r:2,tone:"soft"}),t(S,{w:"66%",h:5,r:2,tone:"soft"}),t(S,{w:"74%",h:5,r:2,tone:"soft"}),t(S,{w:"58%",h:5,r:2,tone:"soft"})]}),emailform:d("div",{style:{...I,padding:16,display:"flex",flexDirection:"column",justifyContent:"center",gap:9},children:[t(S,{w:"56%",h:8,r:3,tone:"dark"}),d("div",{style:{display:"flex",gap:6},children:[t("div",{style:{flex:1,height:16,borderRadius:5,border:`1px solid ${re.line}`}}),t(S,{w:"30%",h:16,r:5,tone:"accent"})]})]}),sociallogos:t("div",{style:{...I,display:"flex",alignItems:"center",justifyContent:"center",gap:9},children:[0,1,2,3].map(n=>t(S,{w:16,h:16,r:8,tone:"dark"},n))}),search:t("div",{style:{...I,padding:"0 18%",display:"flex",alignItems:"center"},children:d("div",{style:{flex:1,height:22,borderRadius:11,border:`1px solid ${re.line}`,display:"flex",alignItems:"center",gap:7,padding:"0 9px"},children:[t("div",{style:{width:9,height:9,borderRadius:5,border:`2px solid ${re.dark}`}}),t(S,{w:"46%",h:5,r:2,tone:"soft"})]})}),cart:d("div",{style:{...I,display:"flex",alignItems:"center",justifyContent:"center",gap:7},children:[t("div",{style:{width:22,height:18,borderRadius:"3px 3px 6px 6px",border:`2px solid ${re.dark}`}}),t("div",{style:{padding:"2px 6px",borderRadius:6,border:`1.5px solid ${re.dark}`},children:t(S,{w:7,h:7,r:2,tone:"dark"})})]}),countryswitch:d("div",{style:{...I,padding:14,display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",gap:5},children:[d("div",{style:{display:"flex",alignItems:"center",gap:6,padding:"4px 8px",border:`1px solid ${re.line}`},children:[t(S,{w:22,h:6,r:2,tone:"dark"}),t(S,{w:6,h:4,r:1,tone:"soft"})]}),d("div",{style:{width:"46%",display:"flex",flexDirection:"column",gap:4,padding:6,border:`1px solid ${re.line}`},children:[t(S,{w:"80%",h:4,r:2,tone:"accent"}),t(S,{w:"64%",h:4,r:2,tone:"soft"}),t(S,{w:"72%",h:4,r:2,tone:"soft"})]})]}),legalline:d("div",{style:{...I,padding:16,display:"flex",flexDirection:"column",justifyContent:"center",gap:9},children:[t("div",{style:{height:1,background:re.line}}),d("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center"},children:[t(S,{w:"38%",h:5,r:2,tone:"soft"}),d("div",{style:{display:"flex",gap:5},children:[t(S,{w:14,h:5,r:2,tone:"soft"}),t(S,{w:14,h:5,r:2,tone:"soft"}),t(S,{w:14,h:5,r:2,tone:"soft"})]})]})]}),fallback:t("div",{style:{position:"absolute",inset:14,borderRadius:8,background:re.block}})};function eo({type:n}){let s=ed[n]??"",a=td[s]??ca[s]??ca.fallback;return t("div",{className:"sf-thumb","aria-hidden":"true",style:{position:"absolute",inset:0,background:"var(--sf-thumb-thumb-bg)",pointerEvents:"none",containerType:"inline-size"},children:a})}var nd={openers:{label:"Hero & intros",icon:"image"},shop:{label:"Shop & galleries",icon:"bag"},product:{label:"Product page",icon:"box"},checkout:{label:"Checkout & ordering",icon:"bag"},about:{label:"About & brand story",icon:"book"},content:{label:"Text & content",icon:"type"},proof:{label:"Stats & social proof",icon:"star"},promo:{label:"Promotions & sign-ups",icon:"sparkles"},blog:{label:"Blog & journal",icon:"newspaper"},navigation:{label:"Navigation & wayfinding",icon:"bookmark"},legal:{label:"Legal & documents",icon:"file"},contact:{label:"Contact, FAQ & forms",icon:"mail"},structure:{label:"Layout, structure & embeds",icon:"grid"}};function ua(n,s={}){let a=n.categories??{},m=n.components,u=[];for(let[f,b]of Object.entries(a))for(let R of b?.components??[]){let C=m[R];if(!C)continue;let M=C.label??R,A=_t(R,"section",M);u.push({type:R,cat:f,catLabel:si(n,f),name:A,desc:s[R]??"",...A===M?{}:{alias:M}})}return u}function si(n,s){return nd[s]?.label??n.categories?.[s]?.title??s}var fa=Gs;function ga(n){return n.find(s=>s.type===fa)??null}function ma(n){return n.filter(s=>s.type!==fa)}var ya={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.",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."};import{Fragment as pd,jsx as Ue,jsxs as to}from"react/jsx-runtime";var ld=n=>`section:${n}`,dd=n=>`block:${n}`,cd=n=>`template:${n}`;function ri({blocks:n,blocksOnly:s,at:a,onAdd:m,itemFor:u,session:f,siteWide:b,onClose:R,onHide:C,readOnly:M}){let A=sd(E=>E.config),H=Ks(),[te,Ee]=id([]);od(()=>{let E=!1,J=Er(H);return jr.list().then(W=>{if(E)return;let F=A.components;Ee(W.filter(Y=>Y.node?.type&&F[Y.node.type]&&(!J||Pr(Y.node).every(J.offers))))}).catch(()=>{}),()=>{E=!0}},[A,H]);let ae=ha(()=>ua(A,ya),[A]),ve=E=>_t(E,"section",A.components[E]?.label??E),ie=E=>({type:ld(E.type),label:E.name,cover:Ue(eo,{type:E.type}),title:E.desc?`${E.name} \u2014 ${E.desc}`:`Add ${E.name}`,keywords:[E.alias??"",E.desc,E.type,E.catLabel].filter(Boolean)}),pe=ha(()=>{let E=[];if(n&&n.choices.length>0&&wr(n.choices).forEach((F,Y)=>{E.push({title:Y===0?`Inside ${n.parentName}${F.group?` \xB7 ${F.group}`:""}`:F.group??"",tiles:F.items.map(ue=>({type:dd(ue.type),label:ue.label,icon:Ue(be,{type:ue.type,size:18}),title:`Add ${ue.label}`}))})}),s)return E;let J=ga(ae);J&&E.push({title:"Start blank",tiles:[ie(J)]}),te.length>0&&E.push({title:"Your templates",tiles:te.map(F=>({type:cd(F.id),label:F.name,cover:Ue(eo,{type:F.node.type}),keywords:[ve(F.node.type),F.node.type]}))});let W=ma(ae);for(let F of Object.keys(A.categories??{})){let Y=W.filter(ue=>ue.cat===F);Y.length!==0&&E.push({title:si(A,F),tiles:Y.map(ie)})}return E},[n,s,te,ae,A]),ze=E=>{let J=E.indexOf(":"),W=E.slice(0,J),F=E.slice(J+1);if(W==="section")return{kind:"section",type:F};if(W==="block")return{kind:"block",type:F};if(W==="template"){let Y=te.find(ue=>ue.id===F);return Y?{kind:"template",template:Y}:null}return null};return to(pd,{children:[Ue(bt,{icon:Ue(ad,{size:15}),title:"Add",context:s?"Blocks for this place":"Sections and blocks",actions:Ue(qr,{label:"Done",description:"Close Add and go back",onClick:R}),onHide:C}),to("div",{className:"sf-addside sf-scroll",children:[Ue(rd,{groups:pe,session:f,itemFor:E=>u(ze(E)??{kind:"section",type:E}),onInsert:E=>{let J=ze(E);J&&m(J)},at:a,hint:s?"Drag into the page, or click to add.":"Drag onto the page, or click to add.",searchLabel:s?"Search blocks":"Search sections",readOnly:M}),b&&!s?to("div",{className:"sf-addside-sitewide",children:[Ue("span",{className:"sf-addside-sitewide-glyph","aria-hidden":"true",children:Ue(be,{type:"chat",size:16})}),to("button",{type:"button",className:"sf-addside-sitewide-name",onClick:b.onOpenChat,children:["Live chat",Ue("span",{className:"sf-addside-sitewide-desc",children:"A chat bubble on every page"})]}),Ue(lr,{value:b.chatEnabled,onChange:b.onToggleChat,label:"Show the chat bubble on the whole site"})]}):null]})]})}import{useCallback as ud,useEffect as ba,useMemo as va,useState as At}from"react";import{InspectorIconButton as fd}from"efficient-easel/chrome";import{AddIcon as gd}from"efficient-easel/icons";import{PagesIcon as md}from"efficient-easel/rail";import{jsx as D,jsxs as Re}from"react/jsx-runtime";var yd={cart:Re("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:1.7,strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[D("circle",{cx:"9",cy:"20",r:"1.4"}),D("circle",{cx:"18",cy:"20",r:"1.4"}),D("path",{d:"M2 3h2.2l2.1 12.3a1.6 1.6 0 0 0 1.6 1.3h8.6a1.6 1.6 0 0 0 1.6-1.2L21.5 7H5.3"})]}),checkout:Re("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:1.7,strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[D("rect",{x:"2.5",y:"5",width:"19",height:"14",rx:"2"}),D("path",{d:"M2.5 9.5h19"})]})},xa="sf-editor-pages-collapsed-groups",hd=n=>n.toLowerCase().trim().replace(/[^a-z0-9]+/g,"-").replace(/^-+|-+$/g,""),Sa=(n,s)=>{let a=hd(n)||"page";if(!s.has(a))return a;let m=2;for(;s.has(`${a}-${m}`);)m+=1;return`${a}-${m}`};function ai({onNavigate:n,onClose:s,activeSurface:a,onPreviewSurface:m}){let u=Ft(),{adapter:f,capabilities:b,ready:R,currentSlug:C}=qt(),M=Xn(),[A,H]=At(null),[te,Ee]=At(""),[ae,ve]=At(!1),[ie,pe]=At(null),[ze,E]=At(!1),[J,W]=At(""),F=ud(async()=>{if(R)try{H(await f.listPages())}catch{H([])}},[f,R]);ba(()=>{H(null),F()},[F]);let[Y,ue]=At(()=>{if(typeof window>"u")return new Set;try{let x=window.localStorage.getItem(xa);return new Set(x?JSON.parse(x):[])}catch{return new Set}});ba(()=>{try{window.localStorage.setItem(xa,JSON.stringify([...Y]))}catch{}},[Y]);let k=x=>ue(ne=>{let w=new Set(ne);return w.has(x)?w.delete(x):w.add(x),w}),j=va(()=>Vs(A??[]),[A]),V=te.trim().toLowerCase(),Q=x=>!V||x.toLowerCase().includes(V),_e=x=>V?!0:!Y.has(x),Ce=va(()=>new Set((A??[]).map(x=>x.slug)),[A]),ye=()=>{if(b.pageCreationInAdminForm){u.send("storefront-editor:new-page");return}W(""),pe(null),E(!0)},fe=async()=>{let x=J.trim();if(!(!x||!R||ae||!f.createPage)){ve(!0),pe(null);try{let ne=await f.createPage({slug:Sa(x,Ce),title:x,layout:{}});await F(),E(!1),W(""),n(ne.slug)}catch{pe("Couldn\u2019t add the page \u2014 please retry.")}finally{ve(!1)}}},G=async x=>{if(!(!R||ae||!f.deletePage||(A??[]).length<=1)){ve(!0);try{await f.deletePage(x.id);let ne=(A??[]).filter(w=>w.id!==x.id);H(ne),pe(null),x.slug===C&&ne[0]&&n(ne[0].slug)}catch{pe("Couldn\u2019t delete the page \u2014 please retry.")}finally{ve(!1)}}},Oe=x=>u.send("storefront-editor:open-page",{slug:x}),ee=x=>{if(!Q(x.label))return null;let ne=!a&&x.slug===C,w=b.canDeletePagesInline&&(A??[]).length>1;return Re("div",{className:`sf-row sf-prow ${ne?"is-selected":""}`,onClick:()=>n(x.slug),children:[D("span",{className:"sf-chip",children:D(bd,{})}),D("span",{className:"sf-row-name",children:x.label}),qs(x)&&D("span",{className:"sf-badge-dynamic",children:"Dynamic"}),x.kind==="lightbox"&&D("span",{className:"sf-badge-lightbox",children:"Lightbox"}),x.draft&&D("span",{className:"sf-page-draft",children:"draft"}),b.pageCreationInAdminForm&&D("button",{type:"button",className:"sf-page-edit",title:`Edit \u201C${x.label}\u201D in the admin`,"aria-label":`Edit ${x.label} in the admin`,onClick:Ye=>{Ye.stopPropagation(),Oe(x.slug)},children:D(We,{name:"pencil",size:13,strokeWidth:1.7,rounded:!0})}),w&&D("button",{type:"button",className:"sf-page-edit sf-page-edit--danger",disabled:ae,title:`Delete \u201C${x.label}\u201D`,"aria-label":`Delete ${x.label}`,onClick:Ye=>{Ye.stopPropagation(),G(x)},children:D(We,{name:"trash",size:13,strokeWidth:1.7,rounded:!0})})]},x.id)},lt=(x,ne,w)=>{let Ye=w.filter(Boolean);if(Ye.length===0)return null;let U=_e(x);return Re("div",{className:"sf-pgroup",children:[Re("button",{type:"button",className:"sf-pgroup-head","aria-expanded":U,onClick:()=>k(x),children:[D(We,{name:"chevron-right",size:10,strokeWidth:2.6,rounded:!0,style:{transform:U?"rotate(90deg)":"none",transition:"transform 0.14s"}}),D("span",{className:"sf-pgroup-label",children:ne}),D("span",{className:"sf-pgroup-count",children:Ye.length})]}),U&&D("div",{className:"sf-pgroup-body",children:Ye})]},x)},xe=kr.filter(x=>Q(x.label)).map(x=>{let ne=a===x.key;return Re("div",{className:`sf-row sf-prow sf-prow--shop ${ne?"is-selected":""}`,onClick:()=>m(x.key),title:`Preview the ${x.label} in the canvas`,children:[D("span",{className:"sf-chip",children:yd[x.key]}),D("span",{className:"sf-row-name",children:x.label}),D("span",{className:"sf-badge-preview",children:"Preview"}),D("a",{className:"sf-page-edit",href:x.href,target:"_blank",rel:"noopener noreferrer",title:`Open the ${x.label} in a new tab`,"aria-label":`Open the ${x.label} in a new tab`,onClick:w=>w.stopPropagation(),children:D(We,{name:"external-link",size:13,strokeWidth:1.7,rounded:!0})})]},x.key)}),he=(()=>{if(A===null)return null;let x=[],ne=!1;for(let w of j)b.hasSiteSettings&&!ne&&w.key.startsWith("system:")&&(x.push(lt("shop","Shop",xe)),ne=!0),x.push(lt(w.key,w.label,w.rows.map(ee)));return b.hasSiteSettings&&!ne&&x.push(lt("shop","Shop",xe)),x})();return Re("div",{className:"sf-pages",children:[D(bt,{icon:D(md,{}),title:"Pages",context:M,actions:D(fd,{label:"New page",onClick:ye,children:D(gd,{size:15})}),onHide:s}),Re("div",{className:"sf-pages-search",children:[D(We,{name:"search",size:14,rounded:!0}),D("input",{type:"search",className:"sf-pages-search-input",placeholder:"Search all pages\u2026",value:te,onChange:x=>Ee(x.target.value),"aria-label":"Search all pages"})]}),Re("div",{className:"sf-pages-list sf-scroll",children:[ie&&!ze&&D("div",{className:"sf-note sf-note--error",role:"alert",children:ie}),he===null?D("div",{className:"sf-note",children:"Loading\u2026"}):he.some(Boolean)?he:D("div",{className:"sf-note",children:te.trim()?"No pages match your search":"No pages yet"})]}),Re("button",{type:"button",className:"sf-pages-new",onClick:ye,children:[D("span",{className:"sf-plus",children:"+"}),"New page"]}),ze&&D("div",{className:"fixed inset-0 z-[200] flex items-center justify-center bg-black/30 p-4",role:"dialog","aria-modal":"true","aria-labelledby":"sf-add-page-title",onClick:()=>E(!1),children:Re("div",{className:"w-full max-w-sm rounded-lg bg-white p-5 shadow-xl",onClick:x=>x.stopPropagation(),children:[D("h2",{id:"sf-add-page-title",className:"text-[15px] font-semibold text-zinc-900",children:"Add a page"}),D("p",{className:"mt-1 text-[13px] leading-relaxed text-zinc-600",children:"Give the new template page a name. It starts blank \u2014 add sections once it opens."}),D("input",{autoFocus:!0,value:J,onChange:x=>W(x.target.value),onKeyDown:x=>{x.key==="Enter"&&fe(),x.key==="Escape"&&E(!1)},placeholder:"e.g. About",className:"mt-3 w-full rounded-md border border-zinc-300 px-3 py-2 text-[13px] text-zinc-900 outline-none focus:border-blue-500"}),J.trim()&&Re("p",{className:"mt-1.5 text-[12px] text-zinc-400",children:["URL: /",Sa(J,Ce)]}),ie&&D("p",{className:"mt-2 text-[12px] text-red-600",role:"alert",children:ie}),Re("div",{className:"mt-4 flex justify-end gap-2",children:[D("button",{type:"button",onClick:()=>E(!1),className:"rounded-md border border-zinc-300 px-3 py-[7px] text-[13px] font-medium text-zinc-700 transition-colors hover:bg-zinc-100",children:"Cancel"}),D("button",{type:"button",onClick:()=>{fe()},disabled:ae||!J.trim(),className:"rounded-md bg-blue-600 px-3 py-[7px] text-[13px] font-medium text-white transition-colors hover:bg-blue-700 disabled:opacity-60",children:ae?"Adding\u2026":"Add page"})]})]})})]})}function bd(){return Re("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:1.7,strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[D("path",{d:"M14 3H7a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2V8z"}),D("path",{d:"M14 3v5h5"})]})}import{StylesIcon as vd}from"efficient-easel/rail";import{jsx as vn,jsxs as xd}from"react/jsx-runtime";function li({tokenRef:n,siteId:s,onClose:a,onNotify:m,tab:u,onTabChange:f}){let b=Xn();return xd("div",{className:"sf-styles",children:[vn(bt,{icon:vn(vd,{}),title:"Site styles",context:vn("span",{title:`${b} \u2014 renamed in the Console: Storefront \u25B8 Sites \u25B8 Settings.`,children:b}),onHide:a}),vn("div",{className:"sf-insp-body sf-scroll",children:vn(Yr,{tokenRef:n,siteId:s,onNotify:m,tab:u,onTabChange:f})})]})}import{useEffect as wa,useMemo as Cd,useRef as Ca,useState as Td}from"react";import{useTreeDrag as Id}from"efficient-easel/drag";import{useCallback as Sd,useEffect as kd,useState as wd}from"react";function ka(n,s,a=!0){let[m,u]=wd(null),f=Sd(async()=>{let b=n.current;if(b)try{u(await jn.listPages(b,s))}catch{u([])}},[n,s]);return kd(()=>{if(!a||m!==null)return;if(n.current){f();return}let b=setInterval(()=>{n.current&&(clearInterval(b),f())},300);return()=>clearInterval(b)},[a,m,f,n]),{pages:m,reload:f}}import{jsx as Z,jsxs as Qe}from"react/jsx-runtime";var Ta=n=>n===Fe||n===oe;function Pd(n,s){return(n??[]).map((a,m)=>({id:String(a.props?.id??`${a.type}-${m}`),type:a.type,label:s(a.type),hidden:!!a.props?._hidden,pinned:Ta(a.type)}))}function Rd(n,s,a){if(s===a||s<0||s>=n.length)return null;let m=n[0]?.type===Fe?1:0,u=n[n.length-1]?.type===oe?n.length-1:n.length;if(s<m||s>=u)return null;let f=Math.max(m,Math.min(a,u)),b=n.slice(),[R]=b.splice(s,1);return b.splice(f>s?f-1:f,0,R),b.every((C,M)=>C===n[M])?null:b}function di({tokenRef:n,siteId:s,currentSlug:a,liveContent:m,labelForType:u,onOpenPage:f,onClose:b,pages:R}){let C=Ft(),{pages:M,reload:A}=ka(n,s,R===void 0),H=R??M;wa(()=>{let k=j=>{j.key==="Escape"&&b()};return document.addEventListener("keydown",k),()=>document.removeEventListener("keydown",k)},[b]),wa(()=>{let k=document.activeElement;return ae.current?.focus(),()=>k?.focus?.()},[]);let[te,Ee]=Td({}),ae=Ca(null),ve=Ca({}),ie=Cd(()=>H?js(H.filter(k=>k.slug!==pn)):[],[H]),pe=k=>{if(k.slug===a)return m;if(te[k.id])return te[k.id];let j=k.layout?.content;return Array.isArray(j)?j:[]},ze=k=>Ee(j=>{let{[k]:V,...Q}=j;return Q}),E=(k,j,V)=>{let Q=n.current;if(!Q)return;let _e=Rd(pe(k),j,V);if(!_e)return;Ee(ye=>({...ye,[k.id]:_e}));let Ce=Zs({...k.layout,content:_e});jn.saveLayout(k.id,Ce,Q,ve.current[k.id]??k.updated_at??"").then(ye=>(ye?.updated_at&&(ve.current[k.id]=ye.updated_at),A())).then(()=>ze(k.id)).catch(()=>{delete ve.current[k.id],ze(k.id),A()})},J=(k,j)=>{if(k.slug===a)return!1;let V=pe(k)[j]?.type;return V!==void 0&&!Ta(V)},W=Id({keyOf:k=>`${k.pageId}:${k.index}`,canDrop:(k,j)=>j.parentId===k.pageId,onDrop:(k,j)=>{let V=H?.find(Q=>Q.id===k.pageId);V&&E(V,k.index,j.index)},onStep:(k,j)=>{let V=H?.find(Q=>Q.id===k.pageId);V&&E(V,k.index,j<0?k.index-1:k.index+2)}}),F=()=>C.send("storefront-editor:new-page"),Y=k=>C.send("storefront-editor:open-page",{slug:k}),ue=k=>{let j=k.slug===a,V=Pd(pe(k),u);return Qe("div",{className:`sf-sm-card ${j?"is-open":""}`,children:[Qe("div",{className:"sf-sm-card-head",children:[Z("button",{type:"button",className:"sf-sm-card-title",title:`Open \u201C${un(k)}\u201D`,onClick:()=>f(k.slug),children:Z("span",{className:"sf-sm-card-name",children:un(k)})}),!k.is_published&&Z("span",{className:"sf-sm-draft",children:"Draft"}),Z("button",{type:"button",className:"sf-sm-edit",title:`Edit \u201C${un(k)}\u201D in the admin`,"aria-label":`Edit ${un(k)} in the admin`,onClick:()=>Y(k.slug),children:Z(We,{name:"pencil",size:13,strokeWidth:1.7,rounded:!0})})]}),Z("div",{className:"sf-sm-secs",children:V.length===0?Z("div",{className:"sf-sm-empty",children:"No sections yet"}):V.map((Q,_e)=>{let Ce=J(k,_e),ye=W.row({item:{pageId:k.id,index:_e},place:{parentId:k.id,slot:"content",index:_e},canDrag:Ce}),fe=ye.drop==="before"&&!ye.dragging,G=ye.drop==="after"&&!ye.dragging;return Qe("div",{className:`sf-sm-sec ${Q.hidden?"is-hidden":""} ${Q.pinned?"is-pinned":""} ${ye.dragging?"is-dragging":""} ${fe?"is-over-before":""} ${G?"is-over-after":""}`,...Ce?ye.rowProps:{},title:Ce?"Drag to reorder \xB7 \u2325\u2191 \u2325\u2193":Q.pinned?"Pinned":"Open in the editor to reorder",children:[Ce&&Z("button",{type:"button",className:"sf-sm-grip","aria-label":`Reorder ${Q.label} \u2014 drag the row, or press Alt+\u2191 / Alt+\u2193`,"aria-keyshortcuts":"Alt+ArrowUp Alt+ArrowDown",title:"Drag to reorder \xB7 \u2325\u2191 \u2325\u2193",onClick:Oe=>Oe.stopPropagation(),children:"\u22EE\u22EE"}),Z("span",{className:"sf-sm-sec-chip",children:Z(be,{type:Q.type,size:13})}),Z("span",{className:"sf-sm-sec-name",children:Q.label}),Q.hidden&&Z("span",{className:"sf-sm-sec-eye",title:"Hidden",children:Z(We,{name:"eye-off",size:13,rounded:!0})})]},Q.id)})}),j&&Z("div",{className:"sf-sm-editing",children:"Editing here"})]},k.id)};return Qe("div",{className:"sf-sitemap",role:"dialog","aria-modal":"true","aria-label":"Visual sitemap",tabIndex:-1,ref:ae,children:[Qe("div",{className:"sf-sm-head",children:[Z("span",{className:"sf-sm-title",children:"Visual sitemap"}),Qe("div",{className:"sf-sm-head-actions",children:[Qe("button",{type:"button",className:"sf-sm-newpage",onClick:F,children:[Z("span",{className:"sf-plus","aria-hidden":"true",children:"+"})," New page"]}),Z("button",{type:"button",className:"sf-x",title:"Close sitemap","aria-label":"Close sitemap",onClick:b,children:"\u2715"})]})]}),Z("div",{className:"sf-sm-body sf-scroll",children:H===null?Z("div",{className:"sf-note",children:"Loading\u2026"}):ie.length===0?Z("div",{className:"sf-note",children:"No pages yet"}):ie.map(({key:k,group:j,pages:V})=>Qe("section",{className:"sf-sm-group",children:[Z("div",{className:"sf-sm-group-title",children:j??_s}),Qe("div",{className:"sf-sm-grid",children:[V.map(ue),!j&&Qe("button",{type:"button",className:"sf-sm-addcard",onClick:F,children:[Z("span",{className:"sf-sm-addcard-plus","aria-hidden":"true",children:"+"}),Z("span",{children:"New page"})]})]})]},k))})]})}import{useEasel as Dd}from"efficient-easel/easel";function Ed(n){return n.replace(/<[^>]+>/g," ").replace(/\s+/g," ").trim()}function Ad(n){let s=[],a=/<h([1-6])\b[^>]*>([\s\S]*?)<\/h\1>/gi,m;for(;m=a.exec(n);)s.push({level:Number(m[1]),text:Ed(m[2])||"(empty)"});return s}var Nd=new Set(["SubmitBuild"]),Ld={AlloyWheelsListing:1,DocMasthead:1,AppointmentBooking:2,BookingBox:2,SubmitBox:2,Banner:2,BundleOffer:2,Cards:2,Chart:2,CheckoutCTA:2,CollectionCard:3,Collections:2,CompatibleTyres:2,ContactLocations:2,ContactRouting:2,DeliveryOptions:2,DetailRows:2,DocBody:2,EuTyreLabel:2,Events:2,FAQ:2,FeaturedCover:2,FitmentFinder:2,FitmentTable:2,FooterEmailSignup:4,FooterMenu:4,Footprint:2,Form:2,Gallery:2,GalleryB:2,GalleryItem:2,Integrations:2,IntroBleed:2,KeyFeatures:2,Logos:2,LongRead:2,Manifesto:2,Mockup:2,OrderSummary:2,PostCard:2,ProcessSteps:2,ProductGrid:2,Prose:2,RelatedProducts:2,ReviewForm:2,Reviews:2,SectionHeader:2,Series:2,SpecTable:2,Split:2,StatsParagraph:2,SubmitBuild:2,Subscribe:2,SubscribeBlogs:2,Testimonials:2,Timeline:2,TimelineTrack:2,TitleWithButtons:2,TyreFitment:2,TyreSizes:2};function ci(n,s){let a=[];for(let m of n??[]){let u=m,f=u.props??{};switch(u.type){case"Heading":{let{text:b,hidden:R}=qn(f.text);if(R)break;a.push({level:Number(f.level)||2,text:b||"(empty heading)"})}break;case"Hero":a.push({level:1,text:"Hero (brand headline)"});break;case"CustomHTML":a.push(...Ad(qn(f.html).text));break;default:{let b=Ld[u.type??""],R=qn(f.title??f.heading),C=R.text.trim();if(!b||R.hidden)break;C?a.push({level:b,text:C}):Nd.has(u.type??"")&&a.push({level:b,text:String(u.type)});break}}for(let b of Vn(s,u.type??"")){let R=f[b];Array.isArray(R)&&a.push(...ci(R,s))}}return a}import{jsx as Gt,jsxs as no}from"react/jsx-runtime";function pi(){let{appState:n,config:s}=Dd(f=>f),a=n?.data,m=ci(a?.content??[],s),u=m.filter(f=>f.level===1).length;return no("div",{className:"px-4 py-3 text-[13px] text-zinc-600",children:[no("div",{className:"mb-2 flex items-center justify-between text-[11px] font-semibold uppercase tracking-wide text-zinc-500",children:[Gt("span",{children:"Heading outline"}),Gt("span",{children:m.length})]}),u!==1&&Gt("div",{className:"mb-2 rounded bg-amber-50 px-2 py-1 text-[12px] text-amber-700",children:u===0?"No H1 \u2014 add one for SEO.":`${u} H1s \u2014 a page should have exactly one.`}),m.length===0?Gt("p",{className:"text-zinc-400",children:"No headings yet."}):Gt("ul",{className:"space-y-1",children:m.map((f,b)=>no("li",{className:"flex items-baseline gap-2",style:{paddingLeft:`${(f.level-1)*12}px`},children:[no("span",{className:"shrink-0 font-mono text-[11px] text-zinc-400",children:["H",f.level]}),Gt("span",{className:"truncate text-zinc-700",children:f.text})]},b))})]})}var zd=new Set(["BookingBox","SubmitBox"]);function Kt(n){return typeof n=="string"&&zd.has(n)}import{useCallback as Ia,useState as Od}from"react";import{EaselContextMenu as Bd}from"efficient-easel/menu";import{AddIcon as Md,CopyIcon as Pa,LayersIcon as Hd,PasteIcon as Ea,RedoIcon as $d,SettingsIcon as Fd,UndoIcon as Wd}from"efficient-easel/icons";import{ROOT_ID as _d,ROOT_SLOT as qd,zoneKey as Aa}from"efficient-easel/data";import{createNodeClipboard as jd,nodeMenuItems as Vd}from"efficient-easel/node-ops";import{styleMenuItems as Gd}from"efficient-easel/style-clipboard";import{framePointToHost as Kd,useCanvasEvent as ui}from"efficient-easel/canvas";import{jsx as et}from"react/jsx-runtime";function Ud(n,s){let a=[],m=new Set,u={zone:s.zone,index:s.index};for(;u;){let f=n.nodeAt(u.zone,u.index);if(!f||m.has(f.props.id)||(m.add(f.props.id),a.push({zone:u.zone,index:u.index,node:f,parentType:null}),u.zone===P))break;let b=u.zone.lastIndexOf(":");if(b<=0)break;u=n.locate(u.zone.slice(0,b))}for(let f=0;f<a.length-1;f+=1)a[f].parentType=a[f+1].node.type;return a}var Na=jd();function La(n,s,a){if(s===P){let{floor:u,cap:f}=n.sectionBand();return{parentId:_d,slot:qd,index:Math.min(Math.max(a,u),f)}}let m=s.lastIndexOf(":");return{parentId:s.slice(0,m),slot:s.slice(m+1),index:a}}function Yd(n,s){let{zone:a,index:m}=s,u=n.nodeAt(a,m);if(!u)return[];let f=u.props.id,b=n.labelOf(u.type,a),R=!!u.props._hidden,C=n.nodeOps,M=n.isPinned(u,a),A=Kt(u.type),H=!M&&!A&&!Fs(n.document,u),te=Ud(n,s),Ee=C.held,ae=Ee&&!M&&Aa(Ee.from)===a?La(n,a,m+1):null,ve=n.style?Gd({held:n.style.held(),canCopy:n.style.canCopy(u,a),onCopy:()=>n.style?.copy(u,a),onPaste:()=>n.style?.paste(a,m,u)}):[];return Vd({title:b,layer:{group:"pick",items:te.map((ie,pe)=>({label:n.rowNameOf(ie.node,ie.zone),checked:pe===0,onClick:()=>n.selectAt(ie.zone,ie.index,ie.node.props.id,ie.parentType)}))},actions:{addInside:Pe(u.type)?()=>n.openAddInside(a,m):void 0,duplicate:H?()=>C.duplicate(f):void 0,moveUp:C.canStep(f,-1)?()=>C.step(f,-1):void 0,moveDown:C.canStep(f,1)?()=>C.step(f,1):void 0,copy:M?void 0:()=>C.copy(f,b),cut:H?()=>C.cut(f,b):void 0,paste:Ee&&ae?{label:Ee.label,run:()=>C.paste(ae)}:void 0,rename:n.renamePropOf(u,a)?()=>n.beginRename(a,m):void 0,hide:!A&&!M?{hidden:R,run:()=>C.setProps(f,{_hidden:!R})}:void 0,delete:H?()=>C.remove(f):void 0},style:ve,pinnedLine:M?"Pinned \u2014 can\u2019t be moved or deleted":void 0})}function Xd(n){let s=[];n.history.hasPast&&s.push({label:"Undo",icon:et(Wd,{}),shortcut:"\u2318Z",onClick:n.history.back}),n.history.hasFuture&&s.push({label:"Redo",icon:et($d,{}),shortcut:"\u21E7\u2318Z",onClick:n.history.forward});let a=[{label:"Add section",icon:et(Md,{}),onClick:n.openAddSection}],m=n.nodeOps.held;if(m&&Aa(m.from)===P){let R=La(n,P,n.sectionBand().cap);a.push({label:`Paste ${m.label}`,icon:et(Ea,{}),shortcut:"\u2318V",onClick:()=>n.nodeOps.paste(R)})}let u=[{label:"Page settings",icon:et(Fd,{}),onClick:n.openPageSettings},{label:"Collapse all layers",icon:et(Hd,{}),onClick:n.collapseAll}],f=[s,a,u].filter(R=>R.length>0),b={label:"\u2014",onClick:()=>{}};return f.flatMap((R,C)=>C?[b,...R]:R)}function Zd(n,s){let a=s.selectionStart??0,m=s.selectionEnd??0,u=s.value.slice(a,m),f=A=>{s.focus(),s.setRangeText(A,a,m,"end"),s.dispatchEvent(new Event("input",{bubbles:!0}))},b=[];u&&(b.push({label:"Copy",icon:et(Pa,{}),shortcut:"\u2318C",onClick:()=>navigator.clipboard?.writeText(u)}),b.push({label:"Cut",icon:et(Pa,{}),shortcut:"\u2318X",onClick:()=>{navigator.clipboard?.writeText(u),f("")}})),b.push({label:"Paste",icon:et(Ea,{}),shortcut:"\u2318V",onClick:()=>{navigator.clipboard?.readText().then(A=>{A&&f(A)}).catch(()=>n.onPasteRefused())}});let R=s.value?[{label:"Select all",shortcut:"\u2318A",onClick:()=>{s.focus(),s.select()}}]:[],C=[b,R].filter(A=>A.length>0),M={label:"\u2014",onClick:()=>{}};return C.flatMap((A,H)=>H?[M,...A]:A)}function Jd(n){let s=n?.closest?.("input, textarea");return!s||s instanceof HTMLInputElement&&!["text","search","url","email","tel","number",""].includes(s.type)?null:s}function Ra(n){return n.shiftKey}function Da(n,s){let[a,m]=Od(null),u=Ia(()=>m(null),[]),f=Ia(C=>{if(Ra(C))return;let M=C.target,A=Jd(M);if(A){C.preventDefault(),m({kind:"input",x:C.clientX,y:C.clientY,el:A});return}let H=M?.closest?.("[data-node-id]")?.getAttribute("data-node-id"),te=H?n.locate(H):null;C.preventDefault(),m(te?{kind:"node",x:C.clientX,y:C.clientY,...te}:{kind:"empty",x:C.clientX,y:C.clientY})},[n]);ui(s,"contextmenu",C=>{if(Ra(C)||!s)return;let A=(C.target?.closest?.("[data-puck-component]")??null)?.getAttribute("data-puck-component"),H=A?n.locate(A):null;C.preventDefault();let te=Kd(s.frame,C.clientX,C.clientY);m(H?{kind:"node",...te,...H}:{kind:"empty",...te})}),ui(s,"mousedown",u),ui(s,"scroll",u,{on:"window"});let R=a?et(Bd,{x:a.x,y:a.y,items:a.kind==="node"?Yd(n,a):a.kind==="input"?Zd(n,a.el):Xd(n),onClose:u}):null;return{onEditorContextMenu:f,menu:R,closeMenu:u}}function za(n,s){let a=!1,m={...n.props};for(let u of s){let f=Array.isArray(n.props[u])?n.props[u]:[],b=new Set,R=f.filter(C=>{let M=C?.props?.id;return!M||b.has(M)?!1:(b.add(M),!0)});R.length!==f.length&&(m[u]=R,a=!0)}return a?m:null}var Qd=".es-tree",ec=".es-tree-row.is-selected";function Oa(n,s,a){return!n||!s?!1:n.index===s.index&&(n.zone??a)===(s.zone??a)}function tc(n,s){if(typeof n.getBoundingClientRect!="function"||typeof s.getBoundingClientRect!="function")return!1;let a=n.getBoundingClientRect(),m=s.getBoundingClientRect();return!a.height||!m.height?!1:m.top>=a.top&&m.bottom<=a.bottom}function Ba(n=typeof document>"u"?void 0:document){let s=n?.querySelector(Qd),a=s?.querySelector(ec);return a?(tc(s,a)||a.scrollIntoView({block:"center",inline:"nearest"}),!0):!1}function Ma(n,s){return n.kind==="part"?n.nodeId??null:n.kind!=="puck"||s==null?null:String(s)}import{useEffect as $a,useState as Fa}from"react";var nc=/^(localhost|(?:[a-z0-9-]+\.)+localhost|127(?:\.\d{1,3}){3}|0\.0\.0\.0|\[::1\]|::1)$/i;function fi(n){return!!n&&nc.test(n)}function Ha(n){let{pageSlug:s,siteSlug:a,hostname:m}=n,u=s===Ws?"/":`/${encodeURIComponent(s)}`;if(!fi(m))return u;let f=a?.trim();return f?`${u}?site=${encodeURIComponent(f)}`:u}function Wa(n){let{pageSlug:s,siteId:a,token:m}=n,[u,f]=Fa(null),[b,R]=Fa(null),C=zs();$a(()=>R(C?new URL(C).hostname:window.location.hostname),[C]),$a(()=>{if(!fi(b)||!a||!m){f(null);return}let A=!1;return _r(m,a).then(H=>{A||f(H)}),()=>{A=!0}},[b,a,m]);let M=Ha({pageSlug:s,siteSlug:u,hostname:b});return C?`${C}${M}`:M}var _a="sf-editor-left-view";function qa(){if(typeof window>"u")return"pages";try{let n=window.localStorage.getItem(_a);return n==="sections"||n==="styles"||n==="media"?n:"pages"}catch{return"pages"}}function ja(n){if(!(typeof window>"u"))try{window.localStorage.setItem(_a,n)}catch{}}function Va(n,s,a=!1){return n==="styles"&&!s||n==="media"&&!a?"sections":n}function Ga(n,s){return n?"sections":s}import{jsx as Ka}from"react/jsx-runtime";var oc="M6 3h12a1 1 0 0 1 1 1v17l-7-4-7 4V4a1 1 0 0 1 1-1z";function gi({size:n=15,className:s,strokeWidth:a=1.7}){return Ka("svg",{width:n,height:n,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:a,strokeLinecap:"round",strokeLinejoin:"round",className:s,"aria-hidden":"true",focusable:"false",children:Ka("path",{d:oc})})}var ic="Save your page changes first";function Ua(n){return n.hasTrustedConsole?n.canCreatePlatformTemplate?!n.capabilities.canPublish||!n.capabilities.hasSiteSettings?{visible:!1,hiddenReason:"not-a-site-page"}:n.siteId?n.hasUnsavedEdits?{visible:!0,enabled:!1,disabledReason:ic}:{visible:!0,enabled:!0}:{visible:!1,hiddenReason:"no-site"}:{visible:!1,hiddenReason:"not-operator"}:{visible:!1,hiddenReason:"no-console"}}var Ya="storefront-editor:save-as-template";import{heldStyle as zc,styleShortcut as Oc}from"efficient-easel/style-clipboard";import{BLOCK_SELECTOR as Bc,useCanvasEvent as Mc,useCanvasFrame as Hc}from"efficient-easel/canvas";import{createNode as $c,DataError as Fc,newId as Wc,parseZoneKey as xt,ROOT_ID as _c,ROOT_SLOT as qc,zoneKey as tt}from"efficient-easel/data";import{CanvasDragLayer as jc,createDragSession as Vc,gapToMoveIndex as Gc,useTreeDrag as vi}from"efficient-easel/drag";import{toItemSelector as Kc,useNodeOps as Uc}from"efficient-easel/node-ops";import{useEasel as Yc,useEaselApi as Xc}from"efficient-easel/easel";import{fieldKind as sc,STYLE_KIND as Xa,copyStyle as rc,heldStyle as ac,pasteMessage as lc,planPaste as dc}from"efficient-easel/style-clipboard";var cc=new Set([Gn.Style,Gn.Layout]),pc=new Set(Object.values(Gn)),uc=new Set(Object.keys(ar())),fc=new Set(["focal","imageFocal"]),gc=[dr,Ls,Ds];function Za(n){return`site:${n??""}`}function mc(n){if(!n||typeof n!="object")return null;let s=n,a=Mo(n)??n,m=s[Xa]??a[Xa];if(typeof m=="string")return m;let u=s.options??a.options;return Array.isArray(u)?`choice:${u.map(b=>String(b?.value)).sort().join("|")}`:sc(a)}function yc(n){let s=n,a=Mo(n);return gc.some(m=>m in s||a&&m in a)}function oo(n,s){let a=Zr(n,s)??{},m=[],u=!1;for(let[f,b]of Object.entries(a)){if(pc.has(f)){u=cc.has(f);continue}!u||!b||typeof b!="object"||f.startsWith("_")||rr(b)||uc.has(f)||fc.has(f)||yc(b)||b.type!=="slot"&&m.push({path:[f],kind:mc(b),counted:or(b)?.tier!=="mobile"})}return m}function mi(n,s,a,m){rc({scope:s,type:a.type,label:m,rows:oo(n,a),props:a.props})}function Ja(n,s,a,m){let u=ac(s);if(!u)return null;let f=dc(u,{type:a.type,rows:oo(n,a),props:a.props});return{...f,message:lc(f,u.sourceLabel,m)}}import{Fragment as me,jsx as c,jsxs as N}from"react/jsx-runtime";function Zc({saveState:n,notSaving:s,onToggle:a,onRetry:m}){if(s)return c(ol,{tone:n.pending?"off-unsaved":"off",label:"Not saving \u2014 see the notice above",role:"status"});let{tone:u,label:f}=Dc(n);return N(me,{children:[c(Tc,{pressed:n.paused,onToggle:a,title:n.paused?"Auto-save is off \u2014 click to turn it back on (saves your held edits)":"Auto-save is on \u2014 click to pause it",children:c(ol,{tone:u,label:f})}),n.failed&&!n.paused&&c("button",{type:"button",className:"es-btn-ghost",onClick:m,children:"Retry now"})]})}function Jc(){return N("svg",{width:"17",height:"17",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:1.7,strokeLinecap:"round",strokeLinejoin:"round",children:[c("path",{d:"M12 3a9 9 0 0 0 0 18 2.3 2.3 0 0 0 2.3-2.3c0-.55-.22-1.05-.57-1.42-.34-.37-.56-.87-.56-1.43A2.35 2.35 0 0 1 15.6 13.5H18a3 3 0 0 0 3-3c0-4.14-4-7.5-9-7.5z"}),c("circle",{cx:"7.7",cy:"11.3",r:"1.05",fill:"currentColor",stroke:"none"}),c("circle",{cx:"12",cy:"8",r:"1.05",fill:"currentColor",stroke:"none"}),c("circle",{cx:"16",cy:"11",r:"1.05",fill:"currentColor",stroke:"none"})]})}function Qc({size:n=13}){return N("svg",{width:n,height:n,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:1.7,strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[c("circle",{cx:"12",cy:"12",r:"9"}),c("path",{d:"M3 12h18M12 3c2.6 2.6 2.6 15.4 0 18M12 3c-2.6 2.6-2.6 15.4 0 18"})]})}function ep({size:n=13}){return N("svg",{width:n,height:n,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:1.7,strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[c("path",{d:"M12 21s6-5 6-10a6 6 0 10-12 0c0 5 6 10 6 10z"}),c("circle",{cx:"12",cy:"11",r:"2"})]})}function tp({size:n=13}){return N("svg",{width:n,height:n,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:1.7,strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[c("path",{d:"M9 4 3 6.5v13L9 17l6 3 6-2.5v-13L15 7z"}),c("path",{d:"M9 4v13M15 7v13"})]})}function np({expand:n}){return c("svg",{width:"15",height:"15",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:1.9,strokeLinecap:"round",strokeLinejoin:"round",children:n?N(me,{children:[c("path",{d:"M8 9l4-4 4 4"}),c("path",{d:"M8 15l4 4 4-4"})]}):N(me,{children:[c("path",{d:"M8 4l4 4 4-4"}),c("path",{d:"M8 20l4-4 4 4"}),c("path",{d:"M5 12h14"})]})})}var ro=n=>({parentId:`locations-${n}`,slot:"groups"}),xi=(n,s)=>({parentId:`locations-${n}`,slot:`cities:${s}`});function op(n,s){if(n.length!==s.length)return!1;for(let a=0;a<n.length;a++)if(n[a].top!==s[a].top||n[a].index!==s[a].index)return!1;return!0}function ip(){let n=Ft(),{adapter:s,capabilities:a,templateId:m,currentSlug:u,siteId:f,tokenRef:b,onPublish:R,saveStatus:C,saveState:M,saveConflict:A,retrySave:H,hasUnsavedEdits:te,bridgeCapabilities:Ee,notifyParent:ae,token:ve,toggleAutoSave:ie,navigate:pe,docId:ze,data:E,footerOriginSlug:J,readOnly:W}=qt(),{canPublish:F,hasSiteSettings:Y,hasSiteTheme:ue,mediaEditing:k,hasEditGuard:j,hasPinnedChrome:V,explainsSiteSettings:Q,hasPreviewLink:_e}=a,Ce=Ua({hasTrustedConsole:!!ve,canCreatePlatformTemplate:Ee.canCreatePlatformTemplate,capabilities:a,siteId:f,hasUnsavedEdits:te}),ye=De(()=>{!f||!u||ae(Ya,{siteId:f,slug:u})},[ae,f,u]),{appState:fe,dispatch:G,history:Oe,selectedItem:ee,getSelectorForId:lt,config:xe}=Yc(e=>e),he=u===pn,x=$s({readOnly:W}),ne=de(null),w=yi(()=>({...x,select:e=>{ne.current=e,x.select(e)}}),[x]),Ye=fe.ui,U=Ye.leftSideBarVisible,St=Ye.rightSideBarVisible,[kt,sl]=ce("desktop"),Yt=Js(),Si=k&&Yt!==null,qe=Qs(),[Nt,xn]=ce(qa),[rl,ki]=ce(Ur[0].id),wt=Va(Nt,ue,Si);$(()=>{ja(Nt)},[Nt]);let[ao,Ct]=ce(!1),[wi,al]=ce(0),{surface:ll,setSurface:Ci}=Sr(),lo=de(null),Xt=de(null),nt=Hc(Xt,{readySelector:Bc}),Be=oa(Xt);ia(Xt);let[Ae,Zt]=ce(!1),dt=de(!1),ct=de(!1),[K,ot]=ce(null),Sn=K&&K.zone===P?K.index:null,Ti=e=>ot(e===null?null:{zone:P,index:e}),[Ii,Pi]=ce([]),[je,le]=ce(Le),co=je.kind==="puck",po=je.kind==="ticker"?je.heroId:null,Lt=Ma(je,ee?.props.id),pt=de(null),uo=de(null),[Ri,Ei]=ce(null);$(()=>{Ri&&(Ba(),Ei(null))},[Ri]);let Ai=de(lt);Ai.current=lt;let kn=De((e,{scroll:o})=>{xn(p=>Ga(e,p)),o&&Ei(e);let r=[],l=e;for(let p=0;p<4;p++){let g=Ai.current(l)?.zone;if(!g||!g.includes(":"))break;let h=g.split(":")[0];r.push(h),l=h}r.length!==0&&Tn(p=>{if(r.every(h=>!p.has(h)))return p;let g=new Set(p);return r.forEach(h=>g.delete(h)),g})},[]);$(()=>{le(ee?.type===Fe?Jn:Le),yr(ee?.type==="BookingBox"&&ee.props.region==="confirm"?hr(lt(String(ee.props.id))?.zone):null);let e=ee?.type==="ContactLocations"?String(ee.props.id):null;e&&e!==uo.current&&Ke({level:"groups"}),uo.current=e;let o=ee?.props.id;he&&typeof o=="string"&&(pt.current?.(),pt.current=Yn(o));let r=ne.current;if(ne.current=null,!o)return;let l=lt(o);kn(String(o),{scroll:!Oa(r,l??null,P)})},[ee?.props.id,he,kn]);let{setSelected:Ni,setSelectHandler:Li}=tr(),{chat:dl,setChat:cl,setSelected:Di,setSelectHandler:zi}=xr(),{setSelectedHeroId:Oi,setSelectHandler:Bi}=Hr(),{editFooter:Mi}=vr(),{selectedLocationPartId:pl,setSelectedLocationPartId:Hi,setSelectHandler:$i}=$r(),Fi=je.kind==="header";$(()=>{Ni(Fi)},[Fi,Ni]),$(()=>{Li(()=>{le(Jn),G({type:"setUi",ui:{rightSideBarVisible:!0}})})},[Li,G]);let fo=De(()=>{le(e=>e.kind==="chat"?e:Qr),G({type:"setUi",ui:{rightSideBarVisible:!0}})},[G]),Wi=je.kind==="chat";$(()=>{Di(Wi)},[Wi,Di]),$(()=>{zi(fo)},[zi,fo]);let{setOpenHandler:_i}=br(),qi=De(()=>{le(e=>e.kind==="social"?e:ea),G({type:"setUi",ui:{rightSideBarVisible:!0}})},[G]);$(()=>{_i(qi)},[_i,qi]);let wn=De(e=>{e&&(le(o=>o.kind==="ticker"&&o.heroId===e?o:{kind:"ticker",heroId:e}),G({type:"setUi",ui:{rightSideBarVisible:!0}}),Vt(e))},[G]);$(()=>{Oi(po)},[po,Oi]),$(()=>{Bi(wn)},[Bi,wn]);let ul=De(e=>{G({type:"setUi",ui:{rightSideBarVisible:!0}}),Vt(e),kn(e,{scroll:!0})},[G,kn]),{selectNode:fl,openPartId:sp}=na({mode:je,setMode:le,onOpenPart:ul}),[ji,Vi]=ce(null),Gi="sf-editor-collapsed-sections",[Cn,Tn]=ce(()=>{if(typeof window>"u")return new Set;try{let e=window.localStorage.getItem(Gi);return new Set(e?JSON.parse(e):[])}catch{return new Set}});$(()=>{try{window.localStorage.setItem(Gi,JSON.stringify([...Cn]))}catch{}},[Cn]);let[Dt,gl]=ce(()=>{if(typeof window>"u")return{...vt};try{let e=window.localStorage.getItem(Xo);if(!e)return{...vt};let o=JSON.parse(e);return{left:Zo(Number(o.left)||vt.left),right:Zo(Number(o.right)||vt.right)}}catch{return{...vt}}});$(()=>{let e=setTimeout(()=>{try{window.localStorage.setItem(Xo,JSON.stringify(Dt))}catch{}},300);return()=>clearTimeout(e)},[Dt]);let In=De((e,o)=>gl(r=>{let l=typeof o=="function"?o(r[e]):o;return r[e]===l?r:{...r,[e]:l}}),[]),ml=De(e=>In("left",e),[In]),yl=De(e=>In("right",e),[In]),Tt=e=>Cn.has(e),ut=e=>Tn(o=>{let r=new Set(o);return r.has(e)?r.delete(e):r.add(e),r}),Ki=de(!1),go=de(null);$(()=>{if(Ki.current&&!Ae){let e=go.current;((e&&e.isConnected&&!e.closest('[aria-hidden="true"]')?e:null)??Xt.current?.querySelector('button[aria-label="Add"]'))?.focus(),go.current=null}Ki.current=Ae},[Ae]),$(()=>{if(!Ae||!Be)return;let e=o=>{o.key==="Escape"&&On()};return Be.addEventListener("keydown",e),()=>Be.removeEventListener("keydown",e)},[Ae,Be]),$(()=>{U||!Ae||(Zt(!1),ot(null),dt.current=!1)},[U]),$(()=>{if(!qe){ct.current&&G({type:"setUi",ui:{leftSideBarVisible:!1}}),ct.current=!1;return}Ae&&(Zt(!1),ot(null),ct.current=dt.current,dt.current=!1),Ct(!1),U||(ct.current=!0,G({type:"setUi",ui:{leftSideBarVisible:!0}}))},[qe]),$(()=>{U||!qe||(ct.current=!1,fn())},[U]),$(()=>{if(!qe||!Be)return;let e=o=>{o.key==="Escape"&&fn()};return Be.addEventListener("keydown",e),()=>Be.removeEventListener("keydown",e)},[qe,Be]);let[Pn,Ui]=ce(null),[hl,bl]=ce(0),Jt=de(null),It=(e,o="success")=>{Ui({msg:e,tone:o}),bl(r=>r+1),Jt.current&&clearTimeout(Jt.current),Jt.current=setTimeout(()=>Ui(null),o==="error"?3200:1900)};$(()=>()=>{Jt.current&&clearTimeout(Jt.current)},[]);let Qt=de(null),[zt,Yi]=ce(0),[mo,Xi]=ce(0),Me=Nr();$(()=>{let e=Qt.current;if(!e)return;let o=()=>{Yi(e.clientWidth),Xi(e.clientHeight)};o();let r=new ResizeObserver(o);return r.observe(e),()=>r.disconnect()},[]),hc(()=>{Qt.current&&(Yi(Qt.current.clientWidth),Xi(Qt.current.clientHeight))},[Dt,U,St]);let Zi={desktop:2e3,tablet:800,mobile:390},yo=kt==="desktop"?zt>0?zt:Zi.desktop:Zi[kt],en=zt>0?Math.min(zt/yo,2):1,Ji=yo*en,vl=zt>0&&Ji>zt+1,xl={width:Ji,height:mo||"100%",flex:"none",position:"relative"},Sl={width:yo,height:mo?mo/en:"100%",maxHeight:"none",transform:en!==1?`scale(${en})`:void 0,transformOrigin:"top left"},kl=Wa({pageSlug:u,siteId:f,token:ve}),wl=s.previewHref?.(u)??kl,ft=()=>G({type:"setUi",ui:{leftSideBarVisible:!U}}),Qi=()=>G({type:"setUi",ui:{rightSideBarVisible:!St}}),Rn=e=>{if(!(Ae&&(Zt(!1),ot(null),dt.current=!1,U&&Nt===e))&&!(qe&&(ct.current=!1,fn(),U&&Nt===e))){if(U&&Nt===e){ft();return}Ct(!1),xn(e),U||G({type:"setUi",ui:{leftSideBarVisible:!0}})}},Cl=()=>{Ct(!1),er(n,{accept:"image/*",title:"Media library"})},es=()=>{le(Le),w.select(null),Un()},ts=()=>{le(Jn),St||G({type:"setUi",ui:{rightSideBarVisible:!0}})},ns=()=>{if(ue){Ct(!1),xn("styles"),U||G({type:"setUi",ui:{leftSideBarVisible:!0}}),Un();return}le(Jr),St||G({type:"setUi",ui:{rightSideBarVisible:!0}}),Un()},z=fe.data.content??[],gt=()=>{let e=z.findIndex(r=>r.type===Fe),o=z.findIndex(r=>r.type===oe);return{floor:e>=0?e+1:0,cap:o>=0?o:z.length}},os=xe,ho=Uc({data:fe.data,config:os,readOnly:!!W,clipboard:Na,afterRemove:"none",stepBounds:(e,o)=>{if(e.parentId!==_c||e.slot!==qc)return{min:0,max:o-1};let{floor:r,cap:l}=gt();return{min:r,max:l-1}},commit:(e,{select:o})=>{if(o!==void 0){le(Le);let r=o?.kind==="node"?Kc(e,os,o):null;w.select(r&&r.zone===P?{index:r.index}:r)}w.commitDocument(e)}}),Tl=(e,o)=>{let r=se(e)[o]?.props?.id;r!=null&&ho.remove(String(r))},Ve=e=>xe.components[e]?.label??e,Pt=De(e=>xe.components[e]?.defaultProps??{},[xe]),Te=e=>_t(e,"section",Ve(e)),tn=e=>ur({type:e.type,props:e.props??{}},Te(e.type)),{nodeAddresses:En,zoneItems:is}=yi(()=>{let e=new Map,o=new Map,r=(l,p,g)=>{o.set(p,l),l.forEach((h,v)=>{let y=String(h.props?.id??"");if(y&&e.set(y,{zone:p,index:v}),g>=Bs)return;let L=new Map;for(let{child:O,zone:T}of Oo(xe,h))L.set(T,[...L.get(T)??[],O]);for(let[O,T]of L)r(T,O,g+1)})};return r(z,P,0),{nodeAddresses:e,zoneItems:o}},[z,xe]),se=De(e=>is.get(e)??[],[is]),ss=Os(),Il=yi(()=>{let e=new Map;for(let o of ss??[])e.set(o.slug,o.name);return e},[ss]),An=e=>cr(e,Ve,o=>Il.get(o)),rs=(e,o)=>o===P?null:pr(xe.components[e.type]?.fields),Pl=(e,o,r)=>{let l=se(e)[o];if(!l)return;let p=rs(l,e);p&&w.replaceComponent(e,o,{...l,props:{...l.props,[p]:r.trim()}})},Rl=(e,o,r,l)=>{if(!(ji?.zone===e&&ji.index===o))return;let g=(h,v)=>{Vi(null),v&&Pl(e,o,h)};return c("input",{className:"es-tree-rename",defaultValue:l,autoFocus:!0,"aria-label":"Rename",onClick:h=>h.stopPropagation(),onBlur:h=>g(h.currentTarget.value,!0),onKeyDown:h=>{h.key==="Enter"?(h.preventDefault(),g(h.currentTarget.value,!0)):h.key==="Escape"&&(h.preventDefault(),g("",!1))}},r)},El=()=>Tn(new Set(se(P).map(e=>String(e.props.id)))),Nn=Za(f),Ln=xe,bo=(e,o)=>o===P?Te(e):Ve(e),as=(e,o,r)=>{let l=Ja(Ln,Nn,r,bo(r.type,e));l&&(l.changed&&w.replaceComponent(e,o,{...r,props:{...l.props,id:r.props.id}}),It(l.message))},ls=Da({nodesIn:se,nodeAt:(e,o)=>se(e)[o]??null,labelOf:(e,o)=>o===P?Te(e):Ve(e),renamePropOf:rs,beginRename:(e,o)=>Vi({zone:e,index:o}),history:{hasPast:Oe.hasPast,hasFuture:Oe.hasFuture,back:()=>Oe.back(),forward:()=>Oe.forward()},openAddSection:()=>{w.select(null),on(null)},openPageSettings:()=>{w.select(null),le(Le)},collapseAll:El,onPasteRefused:()=>It("Your browser won\u2019t let us read the clipboard \u2014 press \u2318V","error"),document:fe.data,nodeOps:ho,isPinned:(e,o)=>o===P&&(e.type===Fe||e.type===oe),sectionBand:gt,openAddInside:(e,o)=>{e===P?mt(o):w.select({zone:e,index:o}),on(null)},locate:e=>En.get(e)??null,rowNameOf:(e,o)=>o===P?tn(e):An(e),selectAt:(e,o,r,l)=>{e===P?mt(o):sn(e,o,r,l??"")},style:{held:()=>zc(Nn),canCopy:e=>oo(Ln,e).some(o=>o.counted!==!1),copy:(e,o)=>mi(Ln,Nn,e,bo(e.type,o)),paste:(e,o,r)=>as(e,o,r)}},nt),ds=de({copy:(e,o)=>{},paste:(e,o,r)=>{},at:()=>null,readOnly:!1});$(()=>{ds.current={copy:(e,o)=>mi(Ln,Nn,e,bo(e.type,o)),paste:as,at:()=>{let e=fe.ui.itemSelector;if(!e)return null;let o=e.zone??P,r=se(o)[e.index];return r?{zone:o,index:e.index,node:r}:null},readOnly:!!W}});let vo=De(e=>{let o=Oc(e);if(!o)return;let r=ds.current,l=r.at();l&&(e.preventDefault(),o==="copy"?r.copy(l.node,l.zone):r.readOnly||r.paste(l.zone,l.index,l.node))},[]);$(()=>{if(!Be)return;let e=o=>vo(o);return Be.addEventListener("keydown",e),()=>Be.removeEventListener("keydown",e)},[vo,Be]),Mc(nt,"keydown",vo);let Al=z.map(e=>e.props.id).join("|");$(()=>{let e=nt?.document??null,o=nt?.window??null,r=0,l=[],p=()=>{if(!e){Pi(T=>T.length?[]:T);return}let v=z.findIndex(T=>T.type===oe),y=v>=0?v:z.length,L=T=>{let B=z[T]?.props?.id;if(B==null)return null;let _=e.querySelector(`[data-puck-component="${CSS.escape(String(B))}"]`);return _?_.getBoundingClientRect():null},O=[];for(let T=1;T<=y;T++){let B=L(T),_=L(T-1);!B&&!_||O.push({top:Math.round(B?B.top:_.bottom),index:T})}Pi(T=>op(T,O)?T:O)},g=()=>{cancelAnimationFrame(r),r=requestAnimationFrame(p)};if(!e||!o){p();return}o.addEventListener("scroll",g,{passive:!0});let h=new ResizeObserver(g);return h.observe(e.documentElement),p(),l.push(setTimeout(p,150),setTimeout(p,450)),()=>{cancelAnimationFrame(r),l.forEach(clearTimeout),o.removeEventListener("scroll",g),h.disconnect()}},[nt,Al,kt,en,U,St,ee?.props.id]);let Nl=()=>{let e=nt?.document;if(!e)return null;let o=4,r=z.findIndex(g=>g.type===oe),l=r>=0?r:z.length,p=null;for(let g=0;g<l;g++){let h=z[g]?.props?.id;if(h==null)continue;let v=e.querySelector(`[data-puck-component="${CSS.escape(String(h))}"]`);if(!v)continue;let y=v.getBoundingClientRect().top;y<=o&&(p===null||y>p.offset)&&(p={id:String(h),offset:y})}if(!p){let g=ee?.props?.id??z[0]?.props?.id;g!=null&&(p={id:String(g),offset:0})}return p},Ll=()=>{lo.current=Nl(),al(e=>e+1)},xo=nt?.document??null,nn=nt?.window??null;$(()=>{let e=lo.current;if(!e||!xo||!nn)return;let o=[],r=()=>{let l=xo.querySelector(`[data-puck-component="${CSS.escape(e.id)}"]`);if(!l)return!1;let p=l.getBoundingClientRect().top-e.offset;return Math.abs(p)>1&&nn.scrollTo({left:nn.scrollX,top:nn.scrollY+p,behavior:"instant"}),!0};return lo.current=null,r()&&o.push(setTimeout(r,150),setTimeout(r,450)),()=>o.forEach(clearTimeout)},[xo,nn]);let So=e=>{if(!he){Vt(e);return}pt.current?.(),pt.current=Yn(e)};$(()=>{if(!he||!J)return;let e=z.find(o=>o.type===oe)?.props?.id;if(e)return pt.current?.(),pt.current=Yn(String(e)),()=>{pt.current?.(),pt.current=null}},[he,J,wi]),$(()=>{if(!(he||!Us()))return Gr(()=>Ys())},[]);let mt=e=>{le(Le),w.select({index:e}),z[e]?.type==="ContactLocations"&&Ke({level:"groups"});let o=z[e]?.props?.id;o&&So(o)},cs=e=>{let{floor:o,cap:r}=gt(),l=g=>Math.min(Math.max(o,g),r);if(typeof e=="number")return l(e);let p=ee&&je.kind!=="header"?z.findIndex(g=>g.props.id===ee.props.id):-1;return l(p>=0?p+1:r)},ps=(e,o)=>{let{floor:r,cap:l}=gt(),p=Math.min(Math.max(o,r),l),g=e<p?p-1:p;return g===e?{moved:!1,dest:e}:(w.reorderComponent(P,e,g),w.select({index:g}),{moved:!0,dest:g})},Dl=(e,o)=>{let r=Te(z[e]?.type??""),l=ps(e,o<0?e-1:e+2);if(!l.moved){It(`\u201C${r}\u201D is already ${o<0?"first":"last"}`);return}let{floor:p,cap:g}=gt();It(`Moved \u201C${r}\u201D to position ${l.dest-p+1} of ${g-p}`)},Dn=(e,o,r)=>{le(Le),w.select({index:e}),Vt(o),It(`Added \u201C${r}\u201D section`)},ko=(e,o)=>{let r=cs(o),l=Ir(e);if(l){let h=l(Pt,Wt),v=w.insertNode(P,r,h);return Dn(r,v,Te(e)),r}if(mr(e)&&Wo(gn)&&Wo(jt)){let h={type:gn,props:{...Pt(gn),id:Wt(gn),direction:"column",name:`${Te(e)} section`,content:[{type:jt,props:{...Pt(jt),id:Wt(jt),...Et[e]?.headStyle?{headStyle:Et[e].headStyle}:{},...Et[e]?.headRowGap?{rowGap:Et[e].headRowGap}:{},...Et[e]?.headDescriptionSize?{descriptionSize:Et[e].headDescriptionSize}:{},...Kn(e)!==Kn(jt)?{eyebrowLook:Kn(e)}:{}}},{type:e,props:{...Pt(e),id:Wt(e),headPlacement:"own-box"}}]}},v=w.insertNode(P,r,h);return Dn(r,v,Te(e)),r}let g=Rr[e]?.fixed===!0?w.insertNode(P,r,{type:e,props:{...Pt(e),id:Wt(e),layout:"boxes"}}):w.insertSection(e,r);return Dn(r,g,Te(e)),r},wo=(e,o,r)=>{let l=cs(r),p=w.insertNode(P,l,o);return Dn(l,p,e),l},on=e=>zn(P,e),zn=(e,o)=>{go.current=document.activeElement??null,qe&&(dt.current=ct.current,ct.current=!1,fn()),ot(o===null?null:{zone:e,index:o}),Zt(!0),U||(dt.current=!0,G({type:"setUi",ui:{leftSideBarVisible:!0}}))},On=()=>{Zt(!1),ot(null),dt.current&&G({type:"setUi",ui:{leftSideBarVisible:!1}}),dt.current=!1},zl=e=>{if(Sn===null){ko(e);return}let o=ko(e,Sn);Ti(o+1)},Ol=(e,o)=>{if(Sn===null){wo(e,o);return}let r=wo(e,o,Sn);Ti(r+1)},us=(e,o,r)=>{if(e.kind==="section")w.insertComponent(o,e.type,r);else if(e.kind==="template")w.insertNode(o,r,Zn(e.template.node));else return;le(Le),w.select({index:r,zone:o})},Bl=e=>{let o=Xe(e.zone);if(o)return`Adding to ${Ve(o.type)}`;if(e.zone===P){let l=z[e.index];return l&&l.type!==oe?`Adding before ${Te(l.type)}`:"Adding at the end of the page"}let r=Mt(e.zone);return r?`Adding to ${r.parentName}`:"Adding here"},Ml=e=>{if(K&&e.kind!=="block"&&Xe(K.zone)){us(e,K.zone,K.index),ot({zone:K.zone,index:K.index+1});return}if(e.kind==="section")return zl(e.type);if(e.kind==="template")return Ol(e.template.name,Zn(e.template.node));if(K&&K.zone!==P){let o=Mt(K.zone);if(!o)return;o.target.spec?Ot(o.parentId,o.target.slot,e.type,K.index,o.parent.type):Po(K.zone,e.type,K.index),ot({zone:K.zone,index:K.index+1});return}Ns?.onPick(e.type)},Se=e=>o=>{o.target.closest(".es-tree-select")||e()},fs=()=>Mi?Mi():pe({kind:"page",slug:pn,siteId:f??void 0}),Bn=(e,o,r)=>c(so,{kind:"delete",label:`Delete ${r}`,onClick:()=>Tl(e,o),children:c(bi,{size:15})}),Mn=(e,o,r,l)=>{let p=!!r.props._hidden;return c(so,{kind:"eye",label:p?`Show ${l}`:`Hide ${l}`,onClick:()=>Hl(e,o,r),children:p?c(We,{name:"eye-off",size:14}):c(We,{name:"eye",size:14})})},gs=e=>{let o=Te(z[e]?.type??""),r=o?`Add section before ${o}`:"Add section here";return Fn(P,e,()=>on(e),r)},Hl=(e,o,r)=>{w.replaceComponent(e,o,{...r,props:{...r.props,_hidden:!r.props._hidden}})},Co=e=>Vn(xe,e),yt=e=>Oo(xe,e),To=(e,o,r)=>{let l=Ms(xe,e.type,o)&&(r||yt(e).length>0);return{collapsible:l,folded:l&&Tt(String(e.props.id))}},Io=(e,o,r)=>yt(e).flatMap(({child:l})=>To(l,o,r(l.type)).collapsible?[String(l.props.id),...Io(l,o+1,r)]:[]),Hn=e=>yt(e).length>0||!!Pe(e.type),$n=e=>!!Pe(e),sn=(e,o,r,l)=>{if(le(Le),Pe(l)?.spec?.slider){let p=e.split(":")[0];Uo(p,o),w.select({index:o,zone:e}),Vt(p)}else w.select({index:o,zone:e}),So(r)},Ot=(e,o,r,l,p)=>{let g=`${e}:${o}`;w.insertComponent(g,r,l),Pe(p)?.spec?.slider?requestAnimationFrame(()=>{Uo(e,l),w.select({index:l,zone:g})}):w.select({index:l,zone:g})},Po=(e,o,r)=>{w.insertComponent(e,o,r),le(Le),w.select({index:r,zone:e})},ms=de(new Set);$(()=>{z.forEach(e=>{let o=Pe(e.type)?.spec;if(!o)return;let r=e.props.id;if(ms.current.has(r)||(ms.current.add(r),(Array.isArray(e.props[o.slot])?e.props[o.slot]:[]).length>0)||o.skipSeed?.(e.props))return;let p=`${r}:${o.slot}`,g=o.legacy?.(e.props)??[];(g.length?g:o.seeds(Pt)).forEach((v,y)=>w.seedChild(p,y,o.childType,v))})},[z,w,Pt]);let ys=de(new Set);$(()=>{z.forEach((e,o)=>{let r=e.props.id;if(ys.current.has(r))return;let l=za(e,Co(e.type));ys.current.add(r),l&&w.replaceComponent(P,o,{...e,props:l})})},[z,w]);let hs=Xc().getState,bs=de(null);$(()=>{if(!Xs({docId:ze,saveStatus:C,seededDocId:bs.current})||(bs.current=ze,!V))return;let e=hs().appState.data,o=e.content,r=E?.content??[],l=(v,y)=>v.some(L=>L?.type===y);if(!Y){let v=new Set(Bo(o)),y=v.size?o.filter(O=>!v.has(O.props.id)):o;v.size&&w.setDocument({...e,content:y});let L=Hs(y,r);if(L.includes(oe)){let O=y.length,T=w.insertSection(oe,O);w.replaceComponent(P,O,{type:oe,props:{id:T,blocks:Fo()}})}L.includes(Fe)&&w.insertNode(P,0,$o());return}if(he){let v=gr(o);if(v!==o&&w.setDocument({...e,content:[...v]}),!v.find(L=>L.type===oe)&&!l(r,oe)&&!l(v,mn)&&!l(r,mn)){let L=(T,B)=>$c(xe,T,B),O={type:oe,props:{blocks:Fo()}};w.insertNode(P,v.length,Vr(O,L,Wc(mn)))}return}let p=o.filter(v=>v.type!==oe),g=new Set(Bo(p)),h=g.size?p.filter(v=>!g.has(v.props.id)):p;h.length!==o.length&&w.setDocument({...e,content:h}),!l(h,Fe)&&!l(r,Fe)&&w.insertNode(P,0,$o())},[ze,C,E,hs,w,Y,V,he]);let Bt=z.findIndex(e=>e.type===oe),He=Bt>=0?z[Bt]:null,vs=z.find(e=>e.type===fr)??null,xs=z.find(e=>e.type===mn)??null,Ss=Bt>=0?Bt:z.length,it=[];z.forEach(e=>{e.type!==oe&&(Hn(e)&&it.push(String(e.props.id)),it.push(...Io(e,1,$n)))}),He&&(it.push(String(He.props.id)),it.push(...Io(He,1,$n)));let Ro=it.length>0&&it.every(e=>Cn.has(e)),$l=()=>Tn(e=>{let o=new Set(it);return Ro?new Set([...e].filter(r=>!o.has(r))):new Set([...e,...it])}),ks=e=>{let o=e.props;if(e.type==="FooterMenu"){let r=o.menu;return o.heading||r?.name||"Menu"}if(e.type==="FooterText"){let r=typeof o.text=="string"?o.text.trim():"";return r?r.length>28?`${r.slice(0,28)}\u2026`:r:"Text"}return e.type==="FooterEmailSignup"?o.heading||"Email signup":Ve(e.type)},ws=(e,o,r,l)=>{let p=se(e)[r];if(!p)return;let g={...xt(e),index:r},h={...xt(o),index:Math.min(Math.max(l,0),se(o).length)},v=Gc(g,h);if(!(e===o&&v===r))try{ho.move(String(p.props.id),{...h,index:v})}catch(y){if(!(y instanceof Fc))throw y}},Fl=(e,o,r)=>{if(e===o)return!0;let l=se(e)[r];if(!l)return!1;let p=o.split(":")[0],g=En.get(p),h=g?se(g.zone)[g.index]:void 0;if(!h||Wl(l).has(o))return!1;let v=Pe(h.type,h.type===dn?cn(fe?.data,p):0);return!(!v||!(v.choices?v.choices.some(L=>L.type===l.type):v.spec?.childType===l.type)||v.spec?.addBlocked?.(se(o),l))},Wl=e=>{let o=new Set,r=l=>{for(let{child:p,zone:g}of yt(l))o.add(g),r(p)};for(let l of Co(e.type))o.add(`${e.props.id}:${l}`);return r(e),o},Cs=e=>{let o=e.slice(0,e.indexOf(":"));for(let r=0;r<64;r++){let l=En.get(o);if(!l)return null;if(l.zone===P)return o;o=l.zone.slice(0,l.zone.indexOf(":"))}return null},Xe=e=>{let o=e.slice(0,e.indexOf(":")),r=z.find(l=>yn(l.type)&&String(l.props.id)===o);return r&&Ho(o)===e?r:null},Eo=(e,o)=>{if(e.add)return _l(e.add,o);let r=tt(o);if(yn(e.type))return!1;let l=Xe(r),p=Xe(e.zone);if(l||p)return!l||!p?!1:o.index>=0&&o.index<=se(r).length;if(e.zone===P||r===P){if(e.zone!==r)return!1;let{floor:h,cap:v}=gt();return o.index>=h&&o.index<=v}if(o.index<0||o.index>se(r).length)return!1;if(e.zone===r)return!0;let g=He?String(He.props.id):null;return g&&(Cs(e.zone)===g||Cs(r)===g)?!1:Fl(e.zone,r,e.index)},Mt=e=>{let o=e.slice(0,e.indexOf(":")),r=En.get(o),l=r?se(r.zone)[r.index]:void 0;if(!r||!l)return null;let p=Pe(l.type,l.type===dn?cn(fe?.data,o):0);if(!p||`${o}:${p.slot}`!==e||p.source==="footer")return null;let g=p.choices??(p.spec?[{type:p.spec.childType,label:Ve(p.spec.childType)}]:[]);return{parent:l,parentId:o,target:p,choices:g,parentName:r.zone===P?Te(l.type):Ve(l.type)}},_l=(e,o)=>{let r=tt(o);if(e.kind!=="block"){if(Xe(r))return o.index>=0&&o.index<=se(r).length;if(r!==P)return!1;let{floor:p,cap:g}=gt();return o.index>=p&&o.index<=g}if(r===P)return!1;let l=Mt(r);return!l||!l.choices.some(p=>p.type===e.type)?!1:!l.target.spec?.addBlocked?.(se(r))},ql=(e,o)=>{if(e.kind!=="block"&&Xe(tt(o))){us(e,tt(o),o.index);return}if(e.kind==="section"){ko(e.type,o.index);return}if(e.kind==="template"){wo(e.template.name,Zn(e.template.node),o.index);return}let r=tt(o),l=Mt(r);l&&(l.target.spec?Ot(l.parentId,l.target.slot,e.type,o.index,l.parent.type):Po(r,e.type,o.index))},Ts=(e,o)=>{if(e.add){ql(e.add,o);return}e.zone===P?ps(e.index,o.index):ws(e.zone,tt(o),e.index,o.index)},[Ao]=ce(()=>Vc()),Ht=vi({keyOf:e=>e.id,readOnly:!!W,session:Ao,canDrop:Eo,onDrop:Ts,onStep:(e,o)=>{e.zone===P?Dl(e.index,o):ws(e.zone,e.zone,e.index,o<0?e.index-1:e.index+2)}}),jl=De(e=>{let{floor:o,cap:r}=gt(),l=[];for(let g of e.nodes){let h=tt(g.place),v=se(h)[g.place.index];if(!v||String(v.props.id)!==g.id||v.type===Fe||v.type===oe||Kt(v.type)||yn(v.type))continue;let y=!!Xe(h),L=h===P||y;h===P&&r-o<2||l.push({key:g.id,item:{id:g.id,zone:h,index:g.place.index,type:v.type},box:g.box,label:L?Te(v.type):An(v),from:g.place})}let p=e.zones.filter(g=>g.children.length>0||!!Mt(tt(g.list))?.choices.length||!!Xe(tt(g.list)));return{sources:l,zones:p}},[fe.data]),Vl=e=>{le(Le),w.select(e.zone===P?{index:e.index}:{index:e.index,zone:e.zone})},Fn=(e,o,r,l)=>c(hi,{...W?{}:Ht.seam({place:{...xt(e),index:o}}),onAdd:W?void 0:r,label:l},`seam:${e}:${o}`),ht=(e,o)=>{let r=z[e];r&&w.replaceComponent(P,e,{type:r.type,props:{...r.props,locations:o}})},rn=e=>{let o=z[e]?.props?.locations;return Array.isArray(o)?o:[]},Is=vi({keyOf:e=>`group:${e.si}:${e.index}`,readOnly:!!W,canDrop:(e,o)=>o.parentId===ro(e.si).parentId&&o.slot==="groups",onDrop:(e,o)=>{ht(e.si,Vo(rn(e.si),e.index,o.index)),Me.level==="city"&&Ke({level:"groups"})},onStep:(e,o)=>{ht(e.si,Vo(rn(e.si),e.index,o<0?e.index-1:e.index+2)),Me.level==="city"&&Ke({level:"groups"})}}),No=vi({keyOf:e=>`city:${e.si}:${e.group}:${e.index}`,readOnly:!!W,canDrop:(e,o)=>o.parentId===ro(e.si).parentId&&o.slot.startsWith("cities:"),onDrop:(e,o)=>{let r=o.slot.slice(7);ht(e.si,Go(rn(e.si),e.group,e.index,r,o.index)),Ke({level:"group",key:r})},onStep:(e,o)=>{ht(e.si,Go(rn(e.si),e.group,e.index,e.group,o<0?e.index-1:e.index+2)),Me.level==="city"&&Ke({level:"group",key:e.group})}}),Ps=de(z);Ps.current=z;let Rs=de(()=>{});$(()=>{$i(e=>{let o=Wr(e);if(!o)return;let r=Ps.current.findIndex(l=>l.props?.id===o.nodeId);r<0||Rs.current(r,{level:o.part,index:o.index})})},[$i]);let $e=(e,o)=>{le(Le),uo.current=z[e]?.props?.id??null,w.select({index:e}),Ke(o),St||G({type:"setUi",ui:{rightSideBarVisible:!0}});let r=z[e]?.props?.id;typeof r=="string"&&(o.level==="image"||o.level==="map")?Hi(Fr(r,o.index,o.level)):Hi(null),typeof r=="string"&&So(r)};Rs.current=$e;let Gl=(e,o)=>{let r=rn(o),l=qo(r),p=String(e.props.id),g=co&&ee?.props.id===p,h=y=>c(hi,{...W?{}:Is.seam({place:{...ro(o),index:y}})},`seam:${p}:groups:${y}`),v=(y,L)=>c(hi,{...W?{}:No.seam({place:{...xi(o,y),index:L}})},`seam:${p}:cities:${y}:${L}`);return N(me,{children:[c(we,{icon:c(Nc,{size:13}),name:"Texts",onSelect:()=>$e(o,{level:"texts"}),selected:g&&Me.level==="texts",rowProps:{onClick:Se(()=>$e(o,{level:"texts"}))}}),l.map((y,L)=>{let O=`${p}::grp::${y.key}`,T=Tt(O),B=g&&Me.level==="group"&&Me.key===y.key,_=Lr(y.key,y.name),Ze={...xi(o,y.key),index:y.cards.length},Ge=No.row({item:{si:o,group:y.key,index:-1},place:Ze,into:Ze,canDrag:!1},{onClick:Se(()=>$e(o,{level:"group",key:y.key}))}),ke=Is.row({item:{si:o,index:L},place:{...ro(o),index:L}},Ge.rowProps);return N(Ut,{children:[L===0&&h(0),c(we,{icon:c(Qc,{size:13}),name:_,onSelect:()=>$e(o,{level:"group",key:y.key}),selected:B,draggable:ke.draggable,dragging:ke.dragging,drop:ke.drop??Ge.drop,fold:{open:!T,label:"group",onToggle:()=>ut(O)},actions:c(so,{kind:"delete",label:`Delete ${_} group (${y.cards.length} ${y.cards.length===1?"city":"cities"})`,onClick:()=>{ht(o,Or(r,y.key)),Ke({level:"groups"})},children:c(bi,{size:15})}),rowProps:ke.rowProps,children:c("span",{className:"es-group-count",children:y.cards.length})}),!T&&N(at,{children:[y.cards.map((Je,Ne)=>{let Ie=jo(r,y.key,Ne),an=g&&Me.level==="city"&&Me.index===Ie,Rt=String(Je?.name??"")||"City",ln=`${p}::city::${_o(Je)}`,Wn=Tt(ln),{rowProps:_n,...zo}=No.row({item:{si:o,group:y.key,index:Ne},place:{...xi(o,y.key),index:Ne}},{onClick:Se(()=>$e(o,{level:"city",index:Ie}))});return N(Ut,{children:[Ne===0&&v(y.key,0),c(we,{icon:c(ep,{size:13}),name:Rt,onSelect:()=>$e(o,{level:"city",index:Ie}),selected:an,...zo,fold:{open:!Wn,label:Rt,onToggle:()=>ut(ln)},actions:c(so,{kind:"delete",label:`Delete ${Rt}`,onClick:()=>{ht(o,Br(r,y.key,Ne)),Ke({level:"group",key:y.key})},children:c(bi,{size:15})}),rowProps:_n}),!Wn&&N(at,{children:[c(we,{icon:c(Ec,{size:13}),name:"Image",onSelect:()=>$e(o,{level:"image",index:Ie}),selected:g&&Me.level==="image"&&Me.index===Ie,rowProps:{onClick:Se(()=>$e(o,{level:"image",index:Ie}))}}),c(we,{icon:c(tp,{size:13}),name:"Map",onSelect:()=>$e(o,{level:"map",index:Ie}),selected:g&&Me.level==="map"&&Me.index===Ie,rowProps:{onClick:Se(()=>$e(o,{level:"map",index:Ie}))}})]}),v(y.key,Ne+1)]},_o(Je))}),N("button",{type:"button",className:"sf-add-card",onClick:()=>{let Je=Dr(r,y.key);ht(o,Je);let Ne=qo(Je).find(Ie=>Ie.key===y.key);Ke(Ne&&Ne.cards.length?{level:"city",index:jo(Je,y.key,Ne.cards.length-1)}:{level:"group",key:y.key})},children:[c("span",{className:"sf-plus sf-plus--sm",children:"+"}),"Add city"]})]}),h(L+1)]},O)}),N("button",{type:"button",className:"sf-add-card",onClick:()=>{let{cards:y,key:L}=zr(r);ht(o,y),$e(o,{level:"group",key:L})},children:[c("span",{className:"sf-plus sf-plus--sm",children:"+"}),"Add group"]})]})},Es=e=>{let o=String(e.props.id),r=z.findIndex(y=>String(y.props.id)===o),l=Ho(o),p=se(l),g=Tt(o),h=Ve(e.type),v=y=>Fn(l,y,()=>zn(l,y),"Add section here");return N(me,{children:[c(we,{icon:c(be,{type:e.type,size:13}),name:h,onSelect:()=>mt(r),selected:Lt===o,rowProps:{"data-node-id":o,onClick:Se(()=>mt(r))},fold:{open:!g,label:"section",onToggle:()=>ut(o)}}),!g&&N(at,{children:[p.map((y,L)=>{let O=String(y.props.id),T=tn(y),B=Hn(y),_=B&&Tt(O),Ze=()=>sn(l,L,O,e.type),{rowProps:Ge,...ke}=Ht.row({item:{id:O,zone:l,index:L,type:y.type},place:{...xt(l),index:L}},{"data-node-id":O,onClick:Se(Ze)});return N(Ut,{children:[v(L),c(we,{icon:c(be,{type:y.type,size:13}),name:T,onSelect:Ze,selected:Lt===O,hidden:!!y.props._hidden,...ke,fold:B?{open:!_,label:"section",onToggle:()=>ut(O)}:void 0,actions:N(me,{children:[Bn(l,L,T),Mn(l,L,y,T)]}),rowProps:Ge}),B&&!_&&c(at,{children:Lo(y,2)})]},O)}),v(p.length)]})]})},As=(e,o)=>{let r=yt(e),l=(h,v)=>Fn(h,v),p=Pe(e.type),g=p?`${e.props.id}:${p.slot}`:null;return N(me,{children:[r.map(({child:h,zone:v,index:y})=>{let L=Lt===String(h.props.id),{collapsible:O,folded:T}=To(h,o,$n(h.type)),B=String(h.props.id),_=ks(h),Ze=()=>sn(v,y,B,e.type),{rowProps:Ge,...ke}=Ht.row({item:{id:B,zone:v,index:y,type:h.type},place:{...xt(v),index:y}},{"data-node-id":B,onClick:Se(Ze)});return N(Ut,{children:[y===0&&l(v,0),c(we,{icon:c(be,{type:h.type,size:13}),name:_,onSelect:Ze,selected:L,hidden:!!h.props._hidden,...ke,fold:O?{open:!T,label:"group",onToggle:()=>ut(B)}:void 0,actions:N(me,{children:[Bn(v,y,_),Mn(v,y,h,_)]}),rowProps:Ge}),O&&!T&&c(at,{children:As(h,o+1)}),l(v,y+1)]},String(h.props.id??`${v}-${y}`))}),g&&!r.some(h=>h.zone===g)?l(g,0):null]})},Lo=(e,o)=>{let r=yt(e),l=Pe(e.type,e.type===dn?cn(fe?.data,String(e.props.id)):0),p=l?.spec??null,g=p&&Array.isArray(e.props[p.slot])?e.props[p.slot]:[],h=l&&l.choices?{slot:l.slot,choices:l.choices}:null,v=String(e.props.id),y=p&&!p.fixed?`${v}:${p.slot}`:null,L=h?`${v}:${h.slot}`:null,O=(T,B)=>{let _=T===y&&p&&!p.addBlocked?.(g)?()=>Ot(e.props.id,p.slot,p.childType,B,e.type):T===L?()=>zn(T,B):void 0;return Fn(T,B,_,T===y&&p?p.addLabel:"Add block here")};return N(me,{children:[r.map(({child:T,zone:B,index:_})=>{let Ze=Lt===String(T.props.id),Ge=An(T),ke=String(T.props.id),{collapsible:Je,folded:Ne}=To(T,o,$n(T.type)),Ie=Co(T.type),an=Ie.length===1?`${ke}:${Ie[0]}`:null,Rt=an?{...xt(an),index:se(an).length}:void 0,ln=Ht.dragging,Wn=Rt&&ln&&Eo(ln,Rt)?Rt:void 0,_n=()=>sn(B,_,ke,e.type),{rowProps:zo,...Kl}=Ht.row({item:{id:ke,zone:B,index:_,type:T.type},place:{...xt(B),index:_},into:Wn,canDrag:!Kt(T.type)},{"data-node-id":ke,onClick:Se(_n)});return N(Ut,{children:[_===0&&O(B,0),c(we,{icon:c(be,{type:T.type,size:13}),name:Ge,onSelect:_n,nameSlot:Rl(B,_,ke,Ge),selected:Ze,hidden:!!T.props._hidden,...Kl,fold:Je?{open:!Ne,label:"group",onToggle:()=>ut(ke)}:void 0,actions:Kt(T.type)?void 0:N(me,{children:[Bn(B,_,Ge),Mn(B,_,T,Ge)]}),rowProps:zo}),Je&&!Ne&&c(at,{children:Lo(T,o+1)}),O(B,_+1)]},String(T.props.id??`${B}-${_}`))}),p&&!p.fixed&&c(Cr,{small:!0,label:p.addLabel,blocked:p.addBlocked?.(g)??null,onAdd:()=>Ot(e.props.id,p.slot,p.childType,g.length,e.type)}),L&&!r.some(T=>T.zone===L)?O(L,0):null]})},Ns=(()=>{if(!ee||!co)return null;let e=String(ee.type),o=String(ee.props.id),r=Pe(e,e===dn?cn(fe?.data,o):0);if(!r||r.source==="footer")return null;let l=z.some(h=>String(h.props?.id)===o),p=Array.isArray(ee.props[r.slot])?ee.props[r.slot]:[];if(r.spec?.addBlocked?.(p))return null;let g=r.choices??(r.spec?[{type:r.spec.childType,label:Ve(r.spec.childType)}]:[]);return g.length===0?null:{parentName:l?Te(e):Ve(e),choices:g,onPick:h=>{r.spec?Ot(o,r.slot,h,p.length,e):Po(`${o}:${r.slot}`,h,p.length)}}})(),Do=Ae||qe!==null,$t=[{id:"add",label:"Add",icon:c("span",{className:"sf-rail-plus","aria-hidden":"true",children:"+"}),active:Ae,onSelect:()=>Ae?On():on(null)},{id:"pages",label:"Pages",icon:c(bc,{}),active:U&&!Do&&wt==="pages",onSelect:()=>Rn("pages")},{id:"sections",label:"Layers",icon:c(Qa,{}),active:U&&!Do&&wt==="sections",onSelect:()=>Rn("sections")}];return!ue&&Q&&$t.push({id:"appearance",label:"Appearance",icon:c(Jc,{}),active:je.kind==="website",onSelect:ns}),Y&&$t.push({id:"sitemap",label:"Visual sitemap",icon:c(xc,{}),active:ao,onSelect:()=>{let e=!ao;Ct(e),e&&U&&G({type:"setUi",ui:{leftSideBarVisible:!1}})}}),ue&&$t.push({id:"styles",label:"Site styles",icon:c(vc,{}),active:U&&!Do&&wt==="styles",onSelect:()=>Rn("styles")}),Si?$t.push({id:"media",label:"Media library",icon:c(el,{}),active:U&&!Ae&&(qe!==null||wt==="media"),onSelect:()=>Rn("media")}):k&&$t.push({id:"media",label:"Media library",icon:c(el,{}),onSelect:Cl}),c(Ar.Provider,{value:!0,children:c(nr.Provider,{value:kt,children:N("div",{ref:Xt,className:"sf-editor es-editor",style:Xr(Dt),onContextMenu:ls.onEditorContextMenu,children:[Y&&ao&&c(di,{tokenRef:b,siteId:f??void 0,currentSlug:u,liveContent:z,labelForType:Te,onOpenPage:e=>{pe({kind:"page",slug:e,siteId:f??void 0}),Ct(!1)},onClose:()=>Ct(!1)}),N(wc,{children:[c(Pc,{items:$t,ariaLabel:"Left panel views"}),N(il,{children:[c(tl,{label:"Undo",disabled:!Oe.hasPast,onClick:()=>Oe.back(),children:c(Lc,{})}),c(tl,{label:"Redo",disabled:!Oe.hasFuture,onClick:()=>Oe.forward(),children:c(Ac,{})}),c(Ic,{}),c(kc,{devices:ra,value:kt,onChange:sl})]}),N(il,{kind:"right",style:{minWidth:300},children:[c(Zc,{saveState:M,notSaving:!!W||A!=null,onToggle:ie,onRetry:H}),Ce.visible&&N("button",{type:"button",className:"es-btn-ghost",disabled:!Ce.enabled,title:Ce.enabled?"Save this website as a platform template":Ce.disabledReason,onClick:ye,children:["Save as Template",c(gi,{})]}),c("button",{type:"button",className:"es-btn-ghost",title:"Refresh the preview (reloads the canvas, keeps your place)",onClick:Ll,children:"Refresh"}),_e&&u&&N("a",{className:"es-btn-ghost",href:wl,target:"_blank",rel:"noopener noreferrer",title:"Preview the live site (opens in a new tab)","aria-label":"Preview the live site in a new tab",children:["Preview",c(Rc,{size:15})]}),c("button",{type:"button",className:"es-btn-primary",onClick:()=>{R(fe.data)},children:F?"Publish":"Save"})]})]}),c(ei,{}),N("div",{className:"sf-body",children:[U?N(me,{children:[c("div",{className:"es-sidepanel es-sidepanel--left sf-panel sf-panel--left",children:Ae?c(ri,{blocks:K&&K.zone!==P&&!Xe(K.zone)?Mt(K.zone):Ns,blocksOnly:!!(K&&K.zone!==P&&!Xe(K.zone)),at:K?{label:Bl(K),onClear:()=>ot(null)}:void 0,onAdd:Ml,itemFor:e=>({id:`new:${e.kind}:${e.kind==="template"?e.template.id:e.type}`,zone:"",index:-1,type:e.kind==="template"?e.template.node.type:e.type,add:e}),session:Ao,siteWide:Y?{chatEnabled:dl.enabled,onToggleChat:e=>cl({enabled:e}),onOpenChat:()=>{On(),fo()}}:void 0,onClose:On,onHide:ft,readOnly:!!W}):qe&&Yt?c(Yo,{panel:Yt,pick:qe,onHide:ft}):wt==="pages"?c(ai,{activeSurface:ll,onPreviewSurface:Ci,onNavigate:e=>{Ci(null),pe(m?{kind:"template",id:m,pageSlug:e}:{kind:"page",slug:e,siteId:f??void 0})},onClose:ft}):wt==="styles"?c(li,{tokenRef:b,siteId:f??void 0,onClose:ft,onNotify:It,tab:rl,onTabChange:ki}):wt==="media"&&Yt?c(Yo,{panel:Yt,pick:null,onHide:ft}):N(me,{children:[c(bt,{icon:c(Qa,{}),title:"Layers",context:`/${u}`,actions:it.length>0?c(Cc,{label:Ro?"Expand all sections":"Collapse all sections",onClick:$l,children:c(np,{expand:Ro})}):void 0,onHide:ft}),N(Sc,{className:"sf-tree sf-scroll",children:[c(we,{icon:c(be,{type:"page",size:13}),name:"Page settings",onSelect:es,selected:!ee&&co,rowProps:{onClick:Se(es)}}),vs&&N(me,{children:[c(io,{children:"Header"}),Es(vs)]}),!he&&V&&N(me,{children:[c(io,{children:"Header"}),c(we,{icon:c(be,{type:"header",size:13}),name:"Header",onSelect:ts,selected:je.kind==="header",rowProps:{onClick:Se(ts)}})]}),!he&&N(io,{children:["Template \xB7 ",j?"Home page":"Template"]}),z.map((e,o)=>{if(e.type===Fe||e.type===oe||yn(e.type))return null;let r=Lt===String(e.props.id),l=!!e.props._hidden,p=yt(e),g=String(e.props.id),h=e.type==="ContactLocations",v=Hn(e)||h,y=v&&Tt(g),{rowProps:L,...O}=Ht.row({item:{id:g,zone:P,index:o,type:e.type},place:{...xt(P),index:o}},{"data-node-id":g,onClick:Se(()=>mt(o))});return N(Ut,{children:[o>0&&gs(o),c(we,{icon:c(be,{type:e.type,size:13}),name:tn(e),onSelect:()=>mt(o),selected:r,hidden:l,...O,fold:v?{open:!y,label:"section",onToggle:()=>ut(g)}:void 0,actions:N(me,{children:[Bn(P,o,tn(e)),Mn(P,o,e,tn(e))]}),rowProps:L}),Hn(e)&&!y&&N(at,{children:[Lo(e,1),e.type==="Hero"&&c(we,{icon:c(be,{type:"ticker",size:13}),name:Mr,onSelect:()=>wn(g),selected:po===g,rowProps:{onClick:Se(()=>wn(g))}})]}),h&&!y&&c(at,{children:Gl(e,o)})]},String(e.props.id??o))}),!he&&Ss>0&&gs(Ss),V&&c(io,{children:"Footer"}),He&&(()=>{let e=String(He.props.id),o=yt(He).length>0||!!Pe(He.type),r=o&&Tt(e);return N(me,{children:[c(we,{icon:c(be,{type:"footer",size:13}),name:"Footer",onSelect:()=>mt(Bt),selected:Lt===String(He.props.id),fold:o?{open:!r,label:"section",onToggle:()=>ut(e)}:void 0,rowProps:{onClick:Se(()=>mt(Bt))}}),o&&!r&&c(at,{children:As(He,1)})]})})(),!he&&!He&&V&&c(we,{icon:c(be,{type:"footer",size:13}),name:"Footer",onSelect:fs,rowProps:{onClick:Se(fs),title:"Edit the site footer"}}),xs&&Es(xs),c("div",{className:"sf-tree-tool",children:c(pi,{})})]})]})}),c(nl,{side:"left",width:Dt.left,min:Qo,max:Jo,defaultWidth:vt.left,label:"Resize Sections panel",onResize:ml})]}):c(Ko,{side:"left",onShow:ft}),c("div",{ref:Qt,className:"sf-center sf-scroll",style:{overflowX:vl?"auto":"hidden",overflowY:"hidden"},children:c("div",{className:"sf-frame-scaler",style:xl,children:c("div",{className:`sf-frame ${kt==="desktop"?"":`sf-frame--${kt}`}`,style:Sl,children:N("div",{className:"sf-preview-host",children:[c(sa,{},wi),c(jc,{canvas:nt,session:Ao,model:jl,canDrop:Eo,onDrop:Ts,onPick:Vl,onZoneAdd:e=>zn(tt(e),0),readOnly:!!W,revision:fe.data}),Ii.length>0&&c("div",{className:"sf-preview-gaps","aria-hidden":"true",children:Ii.map(e=>N("button",{type:"button",tabIndex:-1,className:"sf-preview-gap",style:{top:e.top},title:"Add section here",onClick:()=>on(e.index),children:[c("span",{className:"sf-preview-gap-line"}),N("span",{className:"sf-preview-gap-pill",children:[c("span",{className:"sf-preview-gap-plus",children:"+"}),c("span",{className:"sf-preview-gap-label",children:"Add section"})]})]},e.index))})]})})})}),St?N(me,{children:[c(Tr,{value:{selectChild:sn,addChild:Ot,childRowName:An,blockRowName:ks},children:c(ta,{mode:je,onOpenWebsiteSettings:ns,onOpenSiteStyles:()=>{ki(Kr),xn("styles")},onSelectNode:fl,onNotify:It,onHidePanel:Qi})}),c(nl,{side:"right",width:Dt.right,min:Qo,max:Jo,defaultWidth:vt.right,label:"Resize settings panel",onResize:yl})]}):c(Ko,{side:"right",onShow:Qi})]}),Pn&&N("div",{className:`sf-toast ${Pn.tone==="error"?"sf-toast--error":""}`,role:"status",children:[c("span",{className:"sf-toast-check","aria-hidden":"true",children:Pn.tone==="error"?"!":"\u2713"}),Pn.msg]},hl),ls.menu]})})})}export{ip as default};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{Nb as b,pd as x}from"./chunk-A2QNXDQ6.js";var F="inline",N=[{label:"In this section",value:"inline"},{label:"In its own box",value:"own-box"}];var B={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"}},ae="SectionHeader";function le(e){return e in B}function E(e){return b(N,F,e)}var G=new Set(["Flex"]);function H(e){return!!e?.type&&G.has(e.type)}function ce(e,t,n){if(!H(t))return e;let o={};for(let[r,i]of Object.entries(e))n.includes(r)||(o[r]=i);return o}function ue(e,t,n){if(E(t)!=="own-box")return e;let o={};for(let[r,i]of Object.entries(e))n.includes(r)||(o[r]=i);return o}import{useSyncExternalStore as O}from"react";var p=null,m=new Set;function me(e){if(p!==e){p=e;for(let t of m)t()}}function I(e){return m.add(e),()=>{m.delete(e)}}function fe(){return O(I,()=>p,()=>null)}function ye(e){if(!e)return null;let t=e.lastIndexOf(":");return t>0?e.slice(0,t):null}import{createContext as _,useCallback as D,useContext as A,useState as f}from"react";import{jsx as K}from"react/jsx-runtime";var w=_({footerBlock:null,setFooterBlock:()=>{},headerGroup:null,setHeaderGroup:()=>{},refreshToken:0,refreshFooter:()=>{}});function Se({children:e,editFooter:t}){let[n,o]=f(null),[r,i]=f(null),[a,s]=f(0),l=D(()=>s(c=>c+1),[]);return K(w.Provider,{value:{footerBlock:n,setFooterBlock:o,headerGroup:r,setHeaderGroup:i,editFooter:t,refreshToken:a,refreshFooter:l},children:e})}var be=()=>A(w);import{createContext as M,useContext as U,useMemo as $,useState as z}from"react";import{jsx as Y}from"react/jsx-runtime";var C=M(null);function ke({children:e}){let[t,n]=z(null),o=$(()=>({surface:t,setSurface:n}),[t]);return Y(C.Provider,{value:o,children:e})}function ve(){return U(C)??{surface:null,setSurface:()=>{}}}import{jsx as j,jsxs as Q}from"react/jsx-runtime";function W({label:e,blocked:t,onAdd:n,small:o=!1}){return Q("button",{type:"button",className:"sf-add-card",disabled:t!==null,title:t??void 0,onClick:n,children:[j("span",{className:o?"sf-plus sf-plus--sm":"sf-plus",children:"+"}),e]})}import{createContext as q,useContext as V}from"react";var Z=q(!1),Ne=()=>V(Z);import{useSyncExternalStore as J}from"react";var X={level:"groups"},v=X,y=new Set;function Ge(e){v=e;for(let t of y)t()}function ee(e){return y.add(e),()=>{y.delete(e)}}var k=()=>v;function He(){return J(ee,k,k)}function T(e,t,n){let o=[];return e.forEach((r,i)=>{let a=t(r),s=o.find(l=>l.key===a);s||(s={key:a,name:n(r),items:[]},o.push(s)),s.items.push({item:r,index:i})}),o}function Ie(e){if(e<=1)return"grid-cols-1";if(e===2)return"grid-cols-2";if(e===3)return"grid-cols-3";if(e===4)return"grid-cols-4";let t=n=>e%n||n;return t(4)>=t(3)?"grid-cols-4":"grid-cols-3"}var g=e=>String(e?.group??""),h=new WeakMap,te=0;function ne(e){let t=h.get(e);return t||(t=`loc${++te}`,h.set(e,t)),t}var Ae=(e,t)=>t||e||"Ungrouped",P={photo:"",group:"",groupName:"",name:"City name",state:"State",country:"Country",timezone:"GMT \xB7 UTC +0",address:`Address line one
|
|
2
|
+
Address line two`,phone:"+00 000 0000",hours:"Mon\u2013Fri 9:00\u201318:00",lat:0,lng:0,mapsUrl:""};function u(e){return T(e,g,t=>String(t?.groupName??"")).map(t=>({key:t.key,name:t.name,cards:t.items.map(n=>n.item)}))}var S=e=>e.flatMap(t=>t.cards),L=(e,t,n)=>Math.min(Math.max(e,t),n);function oe(e,t,n){let o=0;for(let r=0;r<e.length;r++)if(g(e[r])===t){if(o===n)return r;o++}return-1}function Ke(e,t,n){let o=u(e);if(t<0||t>=o.length)return e;let[r]=o.splice(t,1),i=L(t<n?n-1:n,0,o.length);return o.splice(i,0,r),S(o)}function Me(e,t,n,o,r){let i=u(e),a=i.find(d=>d.key===t),s=i.find(d=>d.key===o);if(!a||!s||n<0||n>=a.cards.length)return e;let[l]=a.cards.splice(n,1),c=t===o?l:{...l,group:s.key,groupName:s.name};c!==l&&h.set(c,ne(l));let R=L(a===s&&n<r?r-1:r,0,s.cards.length);return s.cards.splice(R,0,c),S(i)}function Ue(e,t){let n=u(e),o=n.find(i=>i.key===t),r={...P,group:t,groupName:o?.name??""};return o?(o.cards.push(r),S(n)):[...e,r]}function $e(e){let t=new Set(u(e).map(r=>r.key)),n=t.size+1,o=`Group ${n}`;for(;t.has(o);)o=`Group ${++n}`;return{cards:[...e,{...P,group:o,groupName:""}],key:o}}function ze(e,t){return e.filter(n=>g(n)!==t)}function Ye(e,t,n){let o=oe(e,t,n);return o<0?e:e.filter((r,i)=>i!==o)}var{Provider:Qe,useSelection:qe}=x("selectedLocationPartId");function Ve(e,t,n){return`${e}::${t}::${n}`}function Ze(e){if(!e)return null;let t=e.split("::");if(t.length<3)return null;let n=t[t.length-1];if(n!=="image"&&n!=="map")return null;let o=Number(t[t.length-2]);if(!Number.isInteger(o)||o<0)return null;let r=t.slice(0,-2).join("::");return r?{nodeId:r,index:o,part:n}:null}var re=[{key:"cart",label:"Cart",href:"/?cart=open"},{key:"checkout",label:"Checkout",href:"/checkout"}],ie=Object.fromEntries(re.map(e=>[e.key,e]));function Xe(e){return ie[e]}export{B as a,ae as b,le as c,E as d,H as e,ce as f,ue as g,me as h,fe as i,ye as j,Se as k,be as l,ke as m,ve as n,re as o,Xe as p,W as q,Z as r,Ne as s,Ge as t,He as u,T as v,Ie as w,g as x,ne as y,Ae as z,P as A,u as B,oe as C,Ke as D,Me as E,Ue as F,$e as G,ze as H,Ye as I,Qe as J,qe as K,Ve as L,Ze as M};
|