efficient-storefront-blocks 0.37.0 → 0.38.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +111 -0
- package/dist/chunks/{EditorPreviewCheckout-SKKKKPGY.js → EditorPreviewCheckout-G6POTPY5.js} +1 -1
- package/dist/chunks/{SiteEditorProvider-5GEAEYON.js → SiteEditorProvider-WZNKW4ZJ.js} +1 -1
- package/dist/chunks/chunk-P4R7UXX3.js +249 -0
- package/dist/chunks/{chunk-XPQ4SKME.js → chunk-TWJV44ND.js} +1 -1
- package/dist/chunks/{chunk-5XTSI7QI.js → chunk-ZCVIYNS6.js} +1 -1
- package/dist/chunks/{fitment-data-LCDKZQGW.js → fitment-data-AEPN4DNQ.js} +1 -1
- package/dist/editor.css +1 -1
- package/dist/index.js +63 -39
- package/dist/words.d.ts +2 -0
- package/dist/words.js +1 -1
- package/package.json +1 -1
- package/dist/chunks/chunk-4EH3ICKL.js +0 -249
- /package/dist/chunks/{SectionEditorShell-MADEVNR6.js → SectionEditorShell-LNTTPTET.js} +0 -0
- /package/dist/chunks/{chunk-4EH3ICKL.js.LEGAL.txt → chunk-P4R7UXX3.js.LEGAL.txt} +0 -0
- /package/dist/chunks/{chunk-VUQAJ7FV.js → chunk-UX74DN6T.js} +0 -0
- /package/dist/chunks/{chunk-JBQJN7EB.js → chunk-VRSJK3KG.js} +0 -0
|
@@ -0,0 +1,249 @@
|
|
|
1
|
+
import{$ as nt,A as ad,Aa as Cd,B as nd,Ba as vd,C as ya,Ca as wd,D as So,Da as kd,E as Go,F as vt,G as wt,Ga as Td,I as ld,Ja as Ca,Ka as Fd,L as Ol,Ma as re,N as sd,Na as Ed,O as Al,Pa as va,Q as id,Qa as Pd,R as fd,Ra as Ld,T as cd,U as dd,V as ud,W as pd,Z as md,_ as ro,a as Kc,aa as xd,ba as Co,c as Vc,ca as Sa,d as Ir,e as Zc,ea as Id,f as Qc,fa as Bl,g as Jc,h as fo,i as _o,ia as hd,j as ba,ja as Dl,k as ed,la as _l,n as Ct,o as Pl,p as od,pa as gd,r as Ll,ua as Nl,va as bd,w as td,x as rd,xa as yd,y as Rl,z as co,za as Sd}from"./chunk-VRSJK3KG.js";import{a as jc,c as io,l as Xc,m as xr,n as Yc,q as Rd,u as Ml}from"./chunk-UX74DN6T.js";var wa=null,Ny="en",Ad=null;function RD(e,o,t){wa=e??null,Ny=o||"en",Ad=t??null}function ee(){return Ad}function Bd(){return wa}function Od(e,o){return o?e.replace(/\{([A-Za-z][A-Za-z0-9_]*)\}/g,(t,r)=>Object.prototype.hasOwnProperty.call(o,r)?String(o[r]):t):e}function l(e,o){let t=wa?wa[e]:void 0;if(typeof t=="function"){try{let r=t(o??{});if(typeof r=="string"&&r)return r}catch{}return Od(e,o)}return Od(typeof t=="string"&&t?t:e,o)}function lt(e,o,t,r){return l(t===1?e:o,{...r,n:t})}import{EaselSessionProvider as BD,useEaselSession as Be}from"efficient-easel/screen/lib/session-context";import{hostLoadRefusalOf as My,hostUnreachableMessage as Hy,isBackendError as Wy,provideHostFailures as Gy,readHostFailure as zy,STATUS_UNREACHABLE as Uy,WebsiteBackendError as Hl}from"efficient-easel/screen/lib/backend-error";import{createEaselHost as GD,DETACHED_EASEL_HOST as zD,EaselHostContext as UD,EaselHostProvider as qD,useEaselHost as kt}from"efficient-easel/screen/lib/host";function Ge(e,o){if(typeof e=="string")return e||o;if(e&&typeof e=="object"&&"text"in e){let t=e.text;return typeof t=="string"&&t?t:o}return o}function Dd(e,o){return typeof e=="number"&&Number.isFinite(e)?e:o}function _d(e,o){return typeof e=="boolean"?e:o}function ka(e,o){if(!Array.isArray(e))return o;let t=e.map(r=>typeof r=="string"?r:Ge(r?.text,"")).map(r=>r.trim()).filter(Boolean);return t.length?t:o}var Nd="cart-drawer",VD="cart-drawer";var qy={kickerBadge:"",kickerText:"Your order",titleLead:"Your",titleAccent:"cart.",subtitleEmpty:"Empty for now.",subtitleOne:"One set in your cart.",subtitleMany:"{count} sets in your cart.",leadTimeValue:"",shipsToFallback:"",promises:[],emptyKicker:"No wheels yet",emptyBody:"Your cart is empty. Pick a wheel to get started."};function XD(e,o){return o===0?e.subtitleEmpty:o===1?e.subtitleOne:e.subtitleMany.replace("{count}",String(o))}function YD(e){let o=e??{},t=qy;return{kickerBadge:Ge(o.kickerBadge,t.kickerBadge),kickerText:Ge(o.kickerText,t.kickerText),titleLead:Ge(o.titleLead,t.titleLead),titleAccent:Ge(o.titleAccent,t.titleAccent),subtitleEmpty:Ge(o.subtitleEmpty,t.subtitleEmpty),subtitleOne:Ge(o.subtitleOne,t.subtitleOne),subtitleMany:Ge(o.subtitleMany,t.subtitleMany),leadTimeValue:Ge(o.leadTimeValue,t.leadTimeValue),shipsToFallback:Ge(o.shipsToFallback,t.shipsToFallback),promises:ka(o.promises,t.promises),emptyKicker:Ge(o.emptyKicker,t.emptyKicker),emptyBody:Ge(o.emptyBody,t.emptyBody)}}var $y=["meta","eyebrow","heading","body","statName","statValue","formEyebrow","formHeading","formIntro","fieldLabel","option","finePrint","dismiss","doneHeading","doneBody"],JD={meta:"Meta line",eyebrow:"Eyebrow",heading:"Heading",body:"Body",statName:"Stat name",statValue:"Stat value",formEyebrow:"Form eyebrow",formHeading:"Form heading",formIntro:"Form intro",fieldLabel:"Field label",option:"Option",finePrint:"Fine print",dismiss:"Dismiss link",doneHeading:"Success heading",doneBody:"Success message"},jy={meta:"styleMeta",eyebrow:"styleEyebrow",heading:"styleHeading",body:"styleBody",statName:"styleStatName",statValue:"styleStatValue",formEyebrow:"styleFormEyebrow",formHeading:"styleFormHeading",formIntro:"styleFormIntro",fieldLabel:"styleFieldLabel",option:"styleOption",finePrint:"styleFinePrint",dismiss:"styleDismiss",doneHeading:"styleDoneHeading",doneBody:"styleDoneBody"},e_={meta:{font:"--pp-meta-font",size:"--pp-meta-size"},eyebrow:{font:"--pp-eyebrow-font",size:"--pp-eyebrow-size"},heading:{font:"--pp-heading-font",size:"--pp-heading-size"},body:{font:"--pp-body-font",size:"--pp-body-size"},statName:{font:"--pp-statname-font",size:"--pp-statname-size"},statValue:{font:"--pp-statvalue-font",size:"--pp-statvalue-size"},formEyebrow:{font:"--pp-formeyebrow-font",size:"--pp-formeyebrow-size"},formHeading:{font:"--pp-formheading-font",size:"--pp-formheading-size"},formIntro:{font:"--pp-formintro-font",size:"--pp-formintro-size"},fieldLabel:{font:"--pp-fieldlabel-font",size:"--pp-fieldlabel-size"},option:{font:"--pp-option-font",size:"--pp-option-size"},finePrint:{font:"--pp-fineprint-font",size:"--pp-fineprint-size"},dismiss:{font:"--pp-dismiss-font",size:"--pp-dismiss-size"},doneHeading:{font:"--pp-doneheading-font",size:"--pp-doneheading-size"},doneBody:{font:"--pp-donebody-font",size:"--pp-donebody-size"}};function Ky(e){return typeof e=="string"&&_o.includes(e)?e:null}function Md(e){let o={};for(let t of $y){let r=Ky(e[jy[t]]);r&&(o[t]=r)}return o}var Tt="site-footer";var t_=Tt,r_={desktop:!0,tablet:!0,mobile:!0},a_={desktop:!1,tablet:!1,mobile:!1},Wl=1,Hd=6,n_=Array.from({length:Hd-Wl+1},(e,o)=>Wl+o),Ta={desktop:6,tablet:3,mobile:2},Vy={2:{desktop:2,tablet:2,mobile:1},3:{desktop:3,tablet:3,mobile:1},4:{desktop:4,tablet:2,mobile:2},5:{desktop:5,tablet:3,mobile:2},6:{desktop:6,tablet:3,mobile:2}},st=e=>Math.min(Math.max(Math.round(e),Wl),Hd);function l_(e){if(typeof e=="number")return Vy[st(e)]??{desktop:st(e),tablet:st(e),mobile:st(e)};if(e&&typeof e=="object"){let o=e;return{desktop:st(o.desktop??Ta.desktop),tablet:st(o.tablet??Ta.tablet),mobile:st(o.mobile??Ta.mobile)}}return{...Ta}}var Xy="subscribe-popup",u_="subscribe-popup";var Yy=[Xy,Tt,Nd];function zd(e){return Yy.includes(e)}var Zy=["delay","scroll","exit"],Qy=["all","chosen"],Jy=["visit","days","never"],eS=["right","left"],oS={min:0,max:60},tS={min:10,max:90},rS={min:1,max:90},zl={metaLabel:"Meta label",issueLabel:"Label",issueNumber:"00",kicker:"Kicker",heading:`Main heading
|
|
2
|
+
*Highlight line*`,deck:"Add a sentence or two of supporting copy.",stats:[{label:"Label",value:"Value"},{label:"Label",value:"Value"},{label:"Label",value:"Value"},{label:"Label",value:"Value"}],formLabel:"Section label",formHeading:"Main heading *highlight*",formIntro:"Add a sentence or two of supporting copy.",firstNameLabel:"Field label",firstNamePlaceholder:"Placeholder",emailLabel:"Field label",emailPlaceholder:"Placeholder",interestsLabel:"Field label",interests:["Option one","Option two","Option three"],frequencyLabel:"Field label",frequencies:["Option one","Option two","Option three"],submitText:"Button label",finePrint:"Fine print",dismissText:"Dismiss link",emailInvalidText:"Enter a valid email address.",submitErrorText:"Could not subscribe right now. Please try again.",successHeading:"Main heading *highlight*",successBody:"Add a sentence or two of supporting copy \u2014 the {email} and {issue} tokens are substituted here.",keepBrowsingText:"Button label",autoOpen:!1,autoOpenDelaySec:15,formSlug:"",trigger:"delay",scrollPercent:50,showOn:"all",showOnPages:[],hideAfter:"days",hideDays:7,formSide:"right",valuePanelOnPhone:!1,sectionAccent:void 0,sectionCorners:void 0,sectionCornerSides:void 0,textStyles:{}},ge=Ge,aS=Dd,Wd=_d,Ud=ka;function Fa(e,o,t){return typeof o=="string"&&e.includes(o)?o:t}function Gl(e,o,t){let r=aS(e,t);return Math.min(o.max,Math.max(o.min,Math.round(r)))}function nS(e){return typeof e.hideAfter=="string"?Fa(Jy,e.hideAfter,zl.hideAfter):e.oncePerSession===!0?"visit":e.oncePerSession===!1?"never":zl.hideAfter}function lS(e){return Array.isArray(e)?e.map(o=>typeof o=="string"?o.trim():"").filter(Boolean).map(o=>o.startsWith("/")?o:`/${o}`):[]}function Gd(e,o){if(e==null)return o;let t=r=>r.trim()?r:"";if(typeof e=="string")return t(e);if(typeof e=="object"&&"text"in e){let r=e.text;return typeof r=="string"?t(r):""}return o}function sS(e,o){return Array.isArray(e)?Ud(e,[]):o}function iS(e,o){return Array.isArray(e)?e.map(t=>{let r=t??{};return{label:ge(r.label,""),value:ge(r.value,"")}}).filter(t=>t.label||t.value):o}function p_(e){let o=e??{},t=zl;return{metaLabel:ge(o.metaLabel,t.metaLabel),issueLabel:Gd(o.issueLabel,t.issueLabel),issueNumber:Gd(o.issueNumber,t.issueNumber),kicker:ge(o.kicker,t.kicker),heading:ge(o.heading,t.heading),deck:ge(o.deck,t.deck),stats:iS(o.stats,t.stats),formLabel:ge(o.formLabel,t.formLabel),formHeading:ge(o.formHeading,t.formHeading),formIntro:ge(o.formIntro,t.formIntro),firstNameLabel:ge(o.firstNameLabel,t.firstNameLabel),firstNamePlaceholder:ge(o.firstNamePlaceholder,t.firstNamePlaceholder),emailLabel:ge(o.emailLabel,t.emailLabel),emailPlaceholder:ge(o.emailPlaceholder,t.emailPlaceholder),interestsLabel:ge(o.interestsLabel,t.interestsLabel),interests:Ud(o.interests,t.interests),frequencyLabel:ge(o.frequencyLabel,t.frequencyLabel),frequencies:sS(o.frequencies,t.frequencies),submitText:ge(o.submitText,t.submitText),finePrint:ge(o.finePrint,t.finePrint),dismissText:ge(o.dismissText,t.dismissText),emailInvalidText:ge(o.emailInvalidText,t.emailInvalidText),submitErrorText:ge(o.submitErrorText,t.submitErrorText),successHeading:ge(o.successHeading,t.successHeading),successBody:ge(o.successBody,t.successBody),keepBrowsingText:ge(o.keepBrowsingText,t.keepBrowsingText),formSlug:typeof o.formSlug=="string"?o.formSlug.trim():t.formSlug,autoOpen:Wd(o.autoOpen,t.autoOpen),autoOpenDelaySec:Gl(o.autoOpenDelaySec,oS,t.autoOpenDelaySec),trigger:Fa(Zy,o.trigger,t.trigger),scrollPercent:Gl(o.scrollPercent,tS,t.scrollPercent),showOn:Fa(Qy,o.showOn,t.showOn),showOnPages:lS(o.showOnPages),hideAfter:nS(o),hideDays:Gl(o.hideDays,rS,t.hideDays),formSide:Fa(eS,o.formSide,t.formSide),valuePanelOnPhone:Wd(o.valuePanelOnPhone,t.valuePanelOnPhone),sectionAccent:o.sectionAccent,sectionCorners:o.sectionCorners,sectionCornerSides:o.sectionCornerSides,textStyles:Md(o)}}import{jsx as Ul,Fragment as fS,jsxs as cS}from"react/jsx-runtime";import{createContext as dS,useContext as uS}from"react";var pS={mirrorHostStyles:!0,css:null,fontHrefs:[]},qd=dS(pS);function h_({value:e,children:o}){return Ul(qd.Provider,{value:e,children:o})}function ql(){return uS(qd)}function $d(){let{css:e,fontHrefs:o}=ql();return cS(fS,{children:[o.map(t=>Ul("link",{rel:"stylesheet",href:t},t)),e?Ul("style",{"data-sf-canvas-css":"",children:e}):null]})}import{jsx as mS}from"react/jsx-runtime";import{createContext as xS,useContext as IS}from"react";var jd=xS(void 0);function S_({metadata:e,children:o}){return mS(jd.Provider,{value:e,children:o})}var Kd=()=>IS(jd);import{jsx as Ce,jsxs as $c}from"react/jsx-runtime";import{useCallback as Tl,useEffect as tt,useState as fD}from"react";import{Button as cD,Tooltip as dD}from"efficient-shell/ui";import{SettingsSwitch as uD}from"efficient-easel/panel";import{PagesIcon as pD,StylesIcon as mD}from"efficient-easel/rail";import{TreeRow as xD}from"efficient-easel/tree";import{useEaselStrings as ID}from"efficient-easel/strings";import{createContext as hS,useContext as gS}from"react";var $l=hS(!1),w_=()=>gS($l);import{jsx as Q,Fragment as mf,jsxs as Qt}from"react/jsx-runtime";import{Fragment as qE,useEffect as $E,useId as jE,useMemo as TI,useState as Zt}from"react";import{ScreenDocumentContext as Ea,ScreenDocumentProvider as F_,useScreenDocument as we}from"efficient-easel/screen/components/ScreenDocumentContext";import{default as ze}from"efficient-easel/screen/components/UiIcon";import{default as Pa,PanelHideButton as jl,PanelModeExit as O_,PanelShowStrip as A_}from"efficient-easel/screen/components/SidePanelHead";import{jsx as oe,jsxs as Xt,Fragment as jr}from"react/jsx-runtime";import{useEasel as nf}from"efficient-easel/easel";import{useEffect as sE,useRef as bI,useState as zn}from"react";import{jsx as Qo,jsxs as ox,Fragment as Zk}from"react/jsx-runtime";import{useState as tx}from"react";import{SettingsDefaultReset as Qk,SettingsField as Jk}from"efficient-easel/panel";import{useEaselStrings as e1}from"efficient-easel/strings";import{jsx as I,jsxs as _t,Fragment as Yo}from"react/jsx-runtime";import{cloneElement as gm,useId as e0,useRef as ri,useState as ln}from"react";import{useEasel as Nt,useSelectedFields as bm}from"efficient-easel/easel";import{hidableText as Vd,readHidable as Ue}from"efficient-easel/screen/lib/puck/hidable";import{ANCHOR_FIELD_KEYS as M_,FOLD_FIELD_MARKER as La,foldMetaOf as vo,LINK_FIELD_MARKER as hr,MEDIA_FIELD_MARKER as Xd,SCAFFOLD_FIELD_MARKER as gr,TEXT_FIELD_MARKER as Se,textFieldIdentifier as bS}from"efficient-easel/screen/lib/puck/field-markers";import{jsx as ru}from"react/jsx-runtime";import{useCallback as vS,useEffect as wS,useRef as kS,useState as TS}from"react";import{useEasel as FS}from"efficient-easel/easel";import{SettingsAction as ES}from"efficient-easel/panel";function Kl(e){return typeof e=="number"&&Number.isFinite(e)}function G_(e,o){if(!Kl(e))return;let t=Sa(Co(e));if(Object.keys(t).length===0)return;let r=t[Ra];if(typeof r!="string")return t;let a=Ft(o)?Et(r,wo(o)??[]):r;return{...t,[yS]:a}}var yS="--sf-section-radius",Ra="--sf-card-radius",zo=["tl","tr","br","bl"];function wo(e){if(!Array.isArray(e))return null;let o=e.filter(t=>zo.includes(t));return zo.filter(t=>o.includes(t))}function Ft(e){let o=wo(e);return o!==null&&o.length<zo.length}function Et(e,o){return zo.map(t=>o.includes(t)?e:"0").join(" ")}var Vl=[{value:"tl",label:"Top left"},{value:"tr",label:"Top right"},{value:"bl",label:"Bottom left"},{value:"br",label:"Bottom right"}];var SS="--sf-card-box-radius",CS="--sf-site-card-radius",j_="sf-section-bleeds";function Xl(e){return typeof e=="number"&&Number.isFinite(e)}function K_(e,o){if(!Xl(e))return;let t=Sa(Co(e))[Ra];if(typeof t!="string")return;let r=Ft(o)?Et(t,wo(o)??[]):t;return{[SS]:r}}function V_(e){let o=e[Ra];return typeof o=="string"?{[CS]:o}:{}}function Yd(e,o){let t=e.find(n=>n?.props?.id===o);if(!t)return[...e];let r=t.props?.cardCorners,a=t.props?.cardCornerSides;return e.map(n=>n?.props?.id===o?n:{...n,props:{...n.props,cardCorners:r,cardCornerSides:a}})}import{childSlotsOf as Z_,FOOTER_TYPE as ae,HEADER_TYPE as ke,locateNode as Zd,missingPinnedTypes as Qd,nestsInTree as Q_,newNodeId as br,pinnedDuplicateIds as Oa,pinnedDuplicateIndices as J_,ROOT_ZONE as ko,slotFieldsOf as eN,TREE_MAX_DEPTH as oN}from"efficient-easel/screen/lib/puck/content-tree";function Jd(e,o,t){let r=t?.zone??"",a=r.lastIndexOf(":"),n=a>0?r.slice(0,a):"",s=a>0?r.slice(a+1):"",i=n?Zd(e,o,n):null,c=i&&Array.isArray(i.item.props[s])?i.item.props[s]:[],u=t?.index??-1,p=u>=0?c[u]:void 0,m=p?.props?.id?String(p.props.id):"",x=Math.max(c.length-1,0);return!i||!m?{can:!1,reason:"unreachable",others:0}:c.length<=1?{can:!1,reason:"alone",others:x}:Xl(p?.props?.cardCorners)?{can:!0,others:x,zone:i.zone,index:i.index,data:{...i.item,props:{...i.item.props,[s]:Yd(c,m)}}}:{can:!1,reason:"unset",others:x}}function eu(e){return e.can?lt("Gives the other card this card's Corners.","Gives the other {n} cards this card's Corners.",e.others):e.reason==="alone"?l("This is the only card in the section."):e.reason==="unset"?l("Set this card's corners first."):l("This card is not in a section that can share corners.")}function ou(e){return lt("Applied to {n} card","Applied to {n} cards",e)}function tu(e,o){e.can&&o(e.zone,e.index,e.data)}import{useSectionOps as Uo}from"efficient-easel/screen/lib/puck/use-section-ops";var PS=2200,LS="apply-corners-to-siblings",RS="Apply to all cards";function OS({plan:e,doneCount:o,onPress:t}){return ru(ES,{id:LS,label:l(RS),note:eu(e),disabled:!e.can,done:o!==null,doneLabel:ou(o??0),onPress:t})}function au(){let{appState:e,config:o}=FS(c=>c),t=Uo(),[r,a]=TS(null),n=kS(null);wS(()=>()=>{n.current&&clearTimeout(n.current)},[]);let s=Jd(o,e.data.content??[],e.ui.itemSelector),i=vS(()=>{tu(s,t.replaceComponent),s.can&&(a(s.others),n.current&&clearTimeout(n.current),n.current=setTimeout(()=>a(null),PS))},[s,t]);return ru(OS,{plan:s,doneCount:r,onPress:i})}var nu=1;function AS(e){return Co(e)}function gN(e){let o=AS(e);return o===null?{}:{"--sf-card-image-radius":`${o}px`}}var lu=1,su="Corners";function BS(e){return Co(e)}function CN(e,o){let t=BS(e);if(t===null)return null;let r=`${t}px`;return{borderRadius:Ft(o)?Et(r,wo(o)??[]):r}}var To={twoAcross:{label:"Two across",across:2,acrossPhone:2,desktop:[[6,1],[6,1]],phone:[[3,1],[3,1]]},zigzag:{label:"Zigzag",across:2,acrossPhone:2,desktop:[[8,1],[4,1],[4,1],[8,1]],phone:[[4,1],[2,1],[2,1],[4,1]]},brick:{label:"Brick",across:2,acrossPhone:2,desktop:[[5,1],[7,1],[7,1],[5,1]],phone:[[2,1],[4,1],[4,1],[2,1]]},twoTall:{label:"Two tall",across:2,acrossPhone:2,desktop:[[6,2],[6,2]],phone:[[3,2],[3,2]]},offsetTall:{label:"Offset tall",across:2,acrossPhone:2,desktop:[[5,2],[7,1],[3,1],[4,1]],phone:[[3,2],[3,1],[3,1]]},ladder:{label:"Ladder",across:2,acrossPhone:2,desktop:[[3,2],[9,1],[5,1],[4,1]],phone:[[2,2],[4,1],[2,1],[2,1]]},threeAcross:{label:"Three across",across:3,acrossPhone:3,desktop:[[4,1],[4,1],[4,1]],phone:[[2,1],[2,1],[2,1]]},bigLeft:{label:"Big left",across:3,acrossPhone:3,desktop:[[6,1],[3,1],[3,1]],phone:[[4,1],[1,1],[1,1]]},bigRight:{label:"Big right",across:3,acrossPhone:3,desktop:[[3,1],[3,1],[6,1]],phone:[[1,1],[1,1],[4,1]]},threeStagger:{label:"Three stagger",across:3,acrossPhone:3,desktop:[[5,1],[4,1],[3,1],[3,1],[4,1],[5,1]],phone:[[3,1],[2,1],[1,1],[1,1],[2,1],[3,1]]},threeLadder:{label:"Three ladder",across:3,acrossPhone:3,desktop:[[3,1],[4,1],[5,1],[5,1],[4,1],[3,1]],phone:[[1,1],[2,1],[3,1],[3,1],[2,1],[1,1]]},tallMiddle:{label:"Tall middle",across:3,acrossPhone:3,desktop:[[4,1],[4,2],[4,1],[4,1],[4,1]],phone:[[2,1],[2,2],[2,1],[2,1],[2,1]]},fourAcross:{label:"Four across",across:4,acrossPhone:2,desktop:[[3,1],[3,1],[3,1],[3,1]],phone:[[3,1],[3,1]]},bigFirst:{label:"Big first",across:4,acrossPhone:2,desktop:[[6,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1]],phone:[[6,1],[3,1],[3,1]]},fourStagger:{label:"Four stagger",across:4,acrossPhone:2,desktop:[[4,1],[3,1],[2,1],[3,1],[2,1],[3,1],[4,1],[3,1]],phone:[[4,1],[2,1],[2,1],[4,1]]},tallFirst:{label:"Tall first",across:4,acrossPhone:2,desktop:[[3,2],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1]],phone:[[3,2],[3,1],[3,1]]},oneThenFour:{label:"One then four",across:4,acrossPhone:2,desktop:[[12,1],[3,1],[3,1],[3,1],[3,1]],phone:[[6,1],[3,1],[3,1]]},sixAcross:{label:"Six across",across:6,acrossPhone:3,desktop:[[2,1],[2,1],[2,1],[2,1],[2,1],[2,1]],phone:[[2,1],[2,1],[2,1]]},sixStagger:{label:"Six stagger",across:6,acrossPhone:6,desktop:[[3,1],[2,1],[1,1],[2,1],[1,1],[3,1],[1,1],[3,1],[2,1],[2,1],[1,1],[3,1]],phone:[[1,1],[1,1],[1,1],[1,1],[1,1],[1,1]]}},Yl=Object.keys(To),fu=[2,3,4,6];function cu(e){return typeof e!="string"||e===""?null:To[e]??null}function iu(e,o){return o?6/e.acrossPhone:12/e.across}var DS="sf-wall--";function _S(e){return`${DS}${e}`}function wN(e){let o=To[e],t=`.${_S(e)}`,r=[],a=(n,s)=>{let i=[],c=n.length;n.forEach(([u,p],m)=>{i.push(`${t} > :nth-child(${c}n+${m+1}){grid-column:span ${u};grid-row:span ${p}}`)});for(let u=1;u<c;u+=1)i.push(`${t}:has(> :nth-child(${c}n+${u}):last-child) > :nth-last-child(-n+${u}){grid-column:span ${s};grid-row:span 1}`);return i};return r.push(`${t}{grid-template-columns:repeat(12,minmax(0,1fr))}`),r.push(...a(o.desktop,iu(o,!1))),r.push("@media (max-width:800px){"),r.push(`${t}{grid-template-columns:repeat(6,minmax(0,1fr))}`),r.push(...a(o.phone,iu(o,!0))),r.push("}"),r.join("")}var Aa=12,du=1,NS=3;var MS=3;function Zl(e,o,t){let r=typeof e=="number"?e:Number.parseInt(String(e??""),10);return Number.isFinite(r)?Math.min(t,Math.max(o,Math.trunc(r))):null}function HS(e){return Zl(e,1,Aa)??MS}function FN(e,o){return Zl(e,du,NS)??(HS(o)===4?2:du)}function EN(e){return e==null||e===""?null:Zl(e,1,Aa)}var PN="data-sf-span";function LN(e){if(!e)return!1;if(e.type==="Grid")return!0;if(e.type==="GalleryB"){if(cu(e.props?.layout))return!1;let o=e.props?.columns;return o!=null&&o!==""}return!1}var uo=["top-left","top-center","top-right","left","center","right","bottom-left","bottom-center","bottom-right"],Ba="bottom-left";var yr={"top-left":"Top left","top-center":"Top center","top-right":"Top right",left:"Left",center:"Center",right:"Right","bottom-left":"Bottom left","bottom-center":"Bottom center","bottom-right":"Bottom right"};function WS(e){let o=uo.indexOf(it(e));return{band:Math.floor(o/3),column:["start","center","end"][o%3]}}function GS(e){return 1+WS(e).band*6}function ON(e){return GS(e)+1}function it(e){return uo.includes(e)?e:Ba}function AN(e){let o=typeof e=="number"&&Number.isFinite(e)?e:0;return Math.max(-40,Math.min(40,Math.round(o)))}function BN(e,o=60){let t=typeof e=="number"&&Number.isFinite(e)?e:o;return Math.max(30,Math.min(100,Math.round(t)))}function Ql(e,o){let t=it(o);return e.filter(r=>it(r?.props?.placement)===t).length}function uu(e){return`${yr[it(e)]} already holds 4 boxes. Move one somewhere else first.`}function Jl(e,o){let t=e.filter(r=>r?.props?.id!==o);return uo.map(r=>{let a=Ql(t,r)>=4,n=yr[r];return a?{value:r,label:n,disabled:!0,title:uu(r)}:{value:r,label:n}})}function Da(e,o){let t=o===void 0?Ba:it(o?.props?.placement);return Ql(e,t)>=4?uu(t):null}var _a="HeroGroup";function zS(e){return uo.map(o=>{let t=Ql(e,o);return{anchor:o,total:t,hidden:t-4}}).filter(o=>o.hidden>0)}function es(e){let o=zS(e);return o.length===0?null:o.map(({anchor:t,total:r,hidden:a})=>{let n=yr[t],s=a===1?"1 is not shown":`${a} are not shown`;return`${n} holds ${r} boxes. The published page draws the first 4, so ${s}. ${a===1?"Move it":"Move them"} somewhere else.`}).join(" ")}function pu(e,o){let t=o;if(t?.type!==_a)return null;let r=t.props?.id===void 0?"":String(t.props.id);return r?Da(os(e,r),t):null}function os(e,o){let t=xu(e,o);return t&&t.ownerType===qS?t.siblings:[]}function mu(e,o){let t=xu(e,o);return t?t.ancestorTypes.filter(r=>r===_a).length:US}var US=1,qS="HeroSlide";function xu(e,o){let t=a=>Array.isArray(a)&&a.length>0&&a.every(n=>!!n&&typeof n=="object"&&typeof n.type=="string"),r=(a,n,s)=>{if(n>12||!a||typeof a!="object")return null;if(t(a)){if(a.some(i=>i?.props?.id===o))return{siblings:a,ownerType:s.at(-1)??null,ancestorTypes:s};for(let i of a){let c=i.type,u=r(i,n+1,[...s,String(c)]);if(u)return u}return null}for(let i of Object.values(a)){let c=r(i,n+1,s);if(c)return c}return null};return r(e,0,[])}import{jsx as $S}from"react/jsx-runtime";var jS="sf-hint-keep";function Iu({children:e}){return $S("span",{className:jS,children:e})}import{AdjustIcon as o0,AlignLeftIcon as t0,EyeIcon as r0,AlignSeparateIcon as a0,AnimationIcon as ym,BackgroundIcon as n0,BorderAllIcon as l0,BlockSectionIcon as s0,CartIcon as i0,ColumnWidthsIcon as Sm,ColumnsIcon as f0,CornerIcon as c0,DirectionDownIcon as d0,DirectionLeftIcon as u0,DirectionRightIcon as p0,DirectionUpIcon as m0,DollarIcon as x0,FinishIcon as I0,GapIcon as Cm,GridIcon as h0,GroundIcon as g0,HashIcon as vm,HeightIcon as b0,ImageIcon as y0,ListIcon as S0,LocationIcon as ti,PaddingAllIcon as C0,PaddingBottomIcon as wm,PaddingLeftIcon as km,PaddingRightIcon as Tm,PaddingTopIcon as Fm,PageIcon as Em,PhoneIcon as v0,PlacementIcon as w0,ProductSizeIcon as k0,RotateIcon as T0,SquareIcon as F0,TypeIcon as E0,WidthIcon as P0,WrapIcon as L0}from"efficient-easel/icons";import{jsx as Z,Fragment as Fo,jsxs as Eo}from"react/jsx-runtime";import{TitleIcon as KS,ButtonIcon as VS,DollarIcon as XS,HashIcon as YS,LinkIcon as ZS,NoteIcon as QS,TagIcon as JS,TextLinesIcon as eC}from"efficient-easel/icons";var hu={body:eC,button:VS,link:ZS,label:JS,number:YS,price:XS,note:QS,title:KS},gu={eyebrow:Eo(Fo,{children:[Z("path",{d:"M5 6.5h5"}),Z("path",{d:"M5 12.5h14"}),Z("path",{d:"M5 18h11"})]}),heading:Eo(Fo,{children:[Z("path",{d:"M6.5 5v14"}),Z("path",{d:"M17.5 5v14"}),Z("path",{d:"M6.5 12h11"})]}),intro:Eo(Fo,{children:[Z("path",{d:"M4 5.5v13"}),Z("path",{d:"M8 7.5h12"}),Z("path",{d:"M8 12h12"}),Z("path",{d:"M8 16.5h8"})]}),value:Eo(Fo,{children:[Z("rect",{x:"2.5",y:"7",width:"19",height:"10",rx:"2"}),Z("path",{d:"M6.5 12h7"})]}),name:Eo(Fo,{children:[Z("path",{d:"M6 3.5v17"}),Z("path",{d:"M6 5h11.5l-2.6 3.6L17.5 12H6z"})]}),date:Eo(Fo,{children:[Z("rect",{x:"4",y:"5.5",width:"16",height:"15",rx:"2"}),Z("path",{d:"M4 10.5h16"}),Z("path",{d:"M9 3.2v4.4"}),Z("path",{d:"M15 3.2v4.4"})]}),caption:Eo(Fo,{children:[Z("rect",{x:"3.5",y:"4.5",width:"17",height:"11",rx:"2"}),Z("path",{d:"M3.5 12.8l4.2-3.2 3.6 2.8 3.4-2.4 5.8 4"}),Z("path",{d:"M6.5 19.5h11"})]}),quote:Eo(Fo,{children:[Z("path",{d:"M9.5 5.5C7 7.2 5.5 9.7 5.5 12.8h4v5.7h-5v-5.7"}),Z("path",{d:"M19.5 5.5c-2.5 1.7-4 4.2-4 7.3h4v5.7h-5v-5.7"})]}),tag:Eo(Fo,{children:[Z("rect",{x:"3",y:"5.5",width:"18",height:"13",rx:"2.5"}),Z("path",{d:"M8 9.5h8"}),Z("path",{d:"M12 9.5v5"})]}),meta:Eo(Fo,{children:[Z("path",{d:"M4 7h16"}),Z("path",{d:"M4 14h3.5"}),Z("path",{d:"M10.5 14h3"}),Z("path",{d:"M17 14h3"})]})};function ts({noun:e,size:o=14,strokeWidth:t=1.8,className:r,style:a}){let n=hu[e];return n?Z("span",{className:r,style:{display:"inline-flex",...a},"aria-hidden":"true",children:Z(n,{size:o})}):Z("svg",{className:r,style:a,width:o,height:o,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:t,strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:gu[e]})}var WN=Object.keys(hu);var GN=Object.keys(gu);var oC="#ffffff",tC=/^#[0-9a-fA-F]{6}$/;function rs(e){return rC(e)?e:oC}function rC(e){return typeof e=="string"&&tC.test(e)}function UN(e){return{"--bg":rs(e)}}var as=[{role:"bg",token:"--bg",ink:!1},{role:"fg",token:"--fg",ink:!0},{role:"surface",token:"--site-surface",ink:!1},{role:"surface-2",token:"--site-surface-2",ink:!1},{role:"line",token:"--site-line",ink:!0},{role:"muted",token:"--fg-dim",ink:!0}],aC=as.filter(e=>e.ink);function nC(e){let o={color:e.fg};for(let{role:t,token:r}of aC)o[r]=e[t];return o}var lC={fg:"var(--overlay-fg)",line:"color-mix(in srgb, var(--overlay-fg) 24%, transparent)",muted:"color-mix(in srgb, var(--overlay-fg) 76%, transparent)"},bu=Object.freeze(nC(lC));var Na=-1,sC="sf-section-accent",yu="Color",Su=new Set(["CategoryBar","DocTabs"]),KN=new Set(["Flex"]),iC=0;function ns(e){return e===Na?null:typeof e=="number"&&Number.isInteger(e)&&e>=0?e:iC}function VN(e){return e??Na}function fC(e){let o=`--theme-preset-${e}`,t={"--sf-sec-accent":`var(${o}-accent)`,"--sf-sec-accent-2":`var(${o}-accent-2)`,"--sf-sec-accent-ink":`var(${o}-accent-ink)`};for(let{role:r}of as)t[`--sf-sec-${r}`]=`var(${o}-${r}, var(--theme-${r}))`;return t}function XN(e){let o=ns(e.sectionAccent);return o===null?null:{className:sC,style:fC(o)}}var cC=["fade","rise","scale"],ls="none",Cu=[{label:"None",value:ls},{label:"Fade",value:"fade"},{label:"Rise",value:"rise"},{label:"Scale",value:"scale"}];function QN(e){return cC.includes(e)?e:null}var vu="data-sf-anim",Sr="data-sf-anim-state";function JN(e){let o=()=>{};if(typeof IntersectionObserver>"u"||!e.getAttribute(vu))return o;let t=window.innerHeight||document.documentElement.clientHeight;if(e.getBoundingClientRect().top<t)return o;e.setAttribute(Sr,"armed");let r=new IntersectionObserver(a=>{for(let n of a)if(n.isIntersecting){r.disconnect(),dC(e);break}},{threshold:0});return r.observe(e),()=>{r.disconnect(),e.removeAttribute(Sr)}}function dC(e){if(!e.getAttribute(vu))return;e.removeAttribute(Sr),e.offsetWidth,e.setAttribute(Sr,"play");let o=t=>{t.target===e&&(e.removeAttribute(Sr),e.removeEventListener("animationend",o))};e.addEventListener("animationend",o)}var e2=Su;function is(e,o){let t=e?.content;if(!Array.isArray(t))return null;for(let r of t){if(!r||typeof r!="object")continue;let a=r.props;if(a?.id===o)return null;if(ss(r,o,0))return a??{}}return null}function ss(e,o,t){if(t>12||!e||typeof e!="object")return!1;if(Array.isArray(e))return e.some(a=>ss(a,o,t+1));let r=e.props;return r&&typeof r=="object"&&r.id===o?!0:Object.values(e).some(a=>ss(a,o,t+1))}import{SettingsDefaultReset as lo,SettingsField as ie,SettingsGroupHead as R0,SettingsGroupSub as O0,SettingsBorder as A0,SettingsSegmented as B0,SettingsSides as D0,SettingsSidesEach as Pm,sidesStartEach as _0,SettingsSwitch as N0,borderSides as M0,borderStartEach as H0}from"efficient-easel/panel";import{FieldSelect as W0,ListField as G0}from"efficient-easel/fields";import{DisplayChips as z0}from"efficient-shell/ui";function Pt(e){if(!e||typeof e!="object"||Array.isArray(e))return{};let o={};for(let[t,r]of Object.entries(e))typeof r=="boolean"&&(o[t]=r);return o}function Ma(e,o){return Pt(e)[o]!==!1}function fs(e,o,t){let r=Pt(o)[t];return typeof r=="boolean"?r:Ma(e,t)}function wu(e){return Object.values(Pt(e)).some(o=>o===!1)}function ku(e){return Object.keys(Pt(e)).length>0}function Tu(e,o,t){let r={...Pt(e)};return t?delete r[o]:r[o]=!1,Object.keys(r).length?r:void 0}function Fu(e,o,t){return{...Pt(e),[o]:t}}function r2(e,o,t){let r=Ma(e,t),a=fs(e,o,t);return r&&a?"":!r&&!a?"hidden":r?"max-[720px]:hidden":"min-[720px]:hidden"}import{AlignmentGrid as U0,Checkbox as $4,CornersInput as q0,DateTimePicker as $0,FOCAL_DEFAULT as j0,Slider as K0,Tooltip as sn}from"efficient-shell/ui";import{jsx as Cr,jsxs as pC}from"react/jsx-runtime";import{ColorPicker as mC,HexInput as xC}from"efficient-shell/ui";import{typedHex as cs}from"efficient-easel/pick";import{typedHex as uC}from"efficient-easel/pick";function Eu(e){let o=new Set,t=[];return co(e).themes.forEach((r,a)=>{let n=[[l("Theme {n} main color",{n:a+1}),r.accent],[l("Theme {n} text color",{n:a+1}),r.text],[l("Theme {n} background",{n:a+1}),r.background]];for(let[s,i]of n){let c=i?uC(i):null;!c||o.has(c)||(o.add(c),t.push({name:s,value:c}))}}),t}function po({value:e,onChange:o,label:t,id:r,caption:a,inherited:n,after:s,ariaLabel:i}){return Cr(hC,{value:e,onChange:o,label:l(i??t),id:r,caption:a,inherited:n,after:s})}function IC(){let{theme:e}=re();return Eu(e).map(o=>({value:o.value,label:o.name}))}function hC({value:e,onChange:o,label:t,id:r,caption:a,inherited:n,after:s}){let i=IC(),c=e?null:cs(n??""),u=a!==void 0&&(!e||cs(a)!==cs(e))?a:null,p=m=>{m!==e&&o(m)};return pC("div",{className:"sf-colour",children:[Cr(mC,{id:r,value:e,onChange:p,label:t,presets:i,fallback:c??void 0,size:"sm",align:"end"}),u!==null?Cr("span",{className:"sf-colour-caption",children:u}):Cr("span",{className:"sf-colour-hexwrap",children:Cr(xC,{value:e||c||"",onChange:p,label:l("{label} hex code",{label:t}),placeholder:e||c?void 0:l("Not set"),className:c?"sf-colour-hex is-inherited":"sf-colour-hex",size:"sm"})}),s]})}import{jsx as De,Fragment as xs,jsxs as Is}from"react/jsx-runtime";import{useEffect as FC,useState as EC}from"react";import{MarkBar as PC,markSelection as LC,useCaretEdit as RC}from"efficient-easel/copy";import{RevertIcon as OC}from"efficient-easel/icons";import{IconButton as AC,Tooltip as BC}from"efficient-shell/ui";import{applyMark as y2,markupTools as S2,MARKUP_TOOLS as C2,COPY_FIELD_TOOLS as v2,STOREFRONT_MARKUP as w2,tokenizeInline as k2,stripInline as T2,isSafeLinkHref as F2}from"efficient-easel/markup";import{applyMark as gC,markedAt as bC,markupTools as yC,MARKUP_TOOLS as SC,parseMarkup as CC,RETIRED_MARKS as vC,STOREFRONT_MARKUP as wC,tokenizeInline as P2}from"efficient-easel/markup";var Ha=["highlight","strong","quiet"],ft={highlight:"Highlight",strong:"Bold",quiet:"Quiet"},Po={highlight:{kind:"wordHighlight",delimiter:"@@"},strong:{kind:"wordStrong",delimiter:"++"},quiet:{kind:"wordQuiet",delimiter:"^^"}},Pu=Object.fromEntries(Ha.map(e=>[Po[e].kind,e])),Lu="data-sf-ws",us=["accent","text","labels"],Ru={accent:"Accent",text:"Text",labels:"Labels"},qo={accent:"var(--accent)",text:"var(--fg)",labels:"var(--fg-dim)"};var ds={font:null,size:null,weight:null,bold:null,italic:null,lineGap:null,textGap:null,colour:null},h2={highlight:{...ds},strong:{...ds},quiet:{...ds}};var Ou=Ha.map(e=>({open:Po[e].delimiter,close:Po[e].delimiter,kind:Po[e].kind})),R2=[{style:Po.highlight.kind,label:ft.highlight,title:`${ft.highlight} word style`},{style:Po.strong.kind,label:ft.strong,title:`${ft.strong} word style`},{style:Po.quiet.kind,label:ft.quiet,title:`${ft.quiet} word style`}],kC=new Set(Ou.map(e=>e.open)),Lt=[...wC.filter(e=>!kC.has(e.open)),...Ou];function ps(e){return e.bullet?"- ":e.number!=null?`${e.number}. `:""}function ms(e){return CC(typeof e=="string"?e:"",Lt)}var TC=SC.map(e=>e.style).filter(e=>!vC.includes(e)).filter(e=>Lt.some(o=>o.kind===e));function Au(){return yC(TC)}var Bu=Object.fromEntries(Ha.map(e=>[Po[e].kind,Po[e].delimiter]));function Du(e,o,t,r){let a=Bu[r];if(!a)return gC(e,o,t,r);let n=e.slice(o,t),s=e.slice(Math.max(0,o-a.length),o),i=e.slice(t,t+a.length);if(s===a&&i===a)return{text:e.slice(0,o-a.length)+n+e.slice(t+a.length),selectionStart:o-a.length,selectionEnd:o-a.length+n.length};let c=n||"styled text";return{text:e.slice(0,o)+a+c+a+e.slice(t),selectionStart:o+a.length,selectionEnd:o+a.length+c.length}}function _u(e,o,t,r){let a=Bu[r];return a?o>=a.length&&e.slice(o-a.length,o)===a&&e.slice(t,t+a.length)===a:bC(e,o,t,r)}function ct(e){return ms(e).map(o=>ps(o)+Nu(o.children)).join(`
|
|
3
|
+
`)}function Nu(e){return e.map(o=>o.kind==="text"?o.text:Nu(o.children)).join("")}function DC({style:e}){let o=t=>De("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:1.9,strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:t});switch(e){case"bold":return o(De("path",{d:"M7 5h6.5a3.5 3.5 0 0 1 0 7H7zm0 7h7.5a3.5 3.5 0 0 1 0 7H7z"}));case"italic":return o(Is(xs,{children:[De("line",{x1:"10",y1:"5",x2:"19",y2:"5"}),De("line",{x1:"5",y1:"19",x2:"14",y2:"19"}),De("line",{x1:"14",y1:"5",x2:"10",y2:"19"})]}));case"strike":return o(Is(xs,{children:[De("path",{d:"M16.5 6.5A4.2 4.2 0 0 0 12.7 4.7C10 4.7 8.4 6 8.4 7.9c0 1.6 1.2 2.5 3.4 3.1"}),De("path",{d:"M7.6 17.4A4.4 4.4 0 0 0 11.7 19.3c2.8 0 4.5-1.4 4.5-3.4 0-1-.4-1.8-1.2-2.4"}),De("line",{x1:"4",y1:"12",x2:"20",y2:"12"})]}));case"highlight":return o(Is(xs,{children:[De("path",{d:"M14.5 4.5l5 5-8 8H6.5v-5z"}),De("line",{x1:"4",y1:"21",x2:"20",y2:"21"})]}));default:return null}}var _C=["bold","italic","strike","highlight"],NC=Object.fromEntries(_C.map(e=>[e,De(DC,{style:e},e)])),Mu="Clear formatting";function MC(e,o,t){return LC(e,o,t,Du)}function HC(e){let[o,t]=EC(null);return FC(()=>{let r=e.current?.ownerDocument??(typeof document>"u"?null:document);if(!r)return;let a=()=>{let n=e.current;if(!n||r.activeElement!==n)return;let s=n.selectionStart??n.value.length,i=n.selectionEnd??s;t(c=>c&&c.start===s&&c.end===i?c:{start:s,end:i})};return r.addEventListener("selectionchange",a),()=>r.removeEventListener("selectionchange",a)},[e]),[o,t]}function WC({target:e,value:o,onChange:t,disabled:r=!1,label:a="Formatting"}){let n=RC({target:e,onChange:t}),[s,i]=HC(e),c=x=>n(g=>{let C=MC(o,x,g);return i({start:C.selectionStart,end:C.selectionEnd}),C}),u=Au(),p={};if(s)for(let x of u)p[x.style]=_u(o,s.start,s.end,x.style);let m=ct(o);return De(PC,{tools:u,onApply:c,pressed:p,disabled:r,glyphs:NC,ariaLabel:l(a),actions:De("span",{className:"sf-markup-clear",children:De(BC,{content:l(Mu),children:De(AC,{size:"sm",onMouseDown:x=>x.preventDefault(),onClick:()=>t(m),disabled:r||m===o,"aria-label":l(Mu),children:De(OC,{size:14})})})})})}var hs=WC;import{DEVICE_FIELD_MARKER as z2,DEVICE_HIDDEN_ATTR as U2,DEVICE_NOTE as q2,deviceField as _e,deviceMetaOf as gs,deviceNote as $2,shownTier as j2,withoutDeviceGate as K2}from"efficient-easel/screen/lib/puck/device-fields";import{NO_CONTROL_ATTR as Y2,NO_CONTROL_FIELD as Hu,noControlField as Wa,NoControlMark as vr,noControlMetaOf as Z2}from"efficient-easel/screen/lib/puck/panel-no-control-mark";var bs="__ownBox";function Wu(e){return!!e&&typeof e=="object"&&e[bs]===!0}function dt(e){return`${e}Phone`}function Ga(e,o,t){return typeof e=="number"?e:typeof o=="number"?o:t}var Gu=void 0;import{jsx as Cs,Fragment as UC}from"react/jsx-runtime";import{createContext as qC,useContext as $C}from"react";var ys={ProductGrid:{source:{keep:["slug"]}},GalleryItem:{product:{keep:["code","finish"]}},FeaturedCover:{source:{keep:["slug"]}},LongRead:{source:{keep:["slug"]}}},Ss={Events:["posts"],SubscribeBlogs:["posts"]};var GC=["anchor"],zC=/^href$|Href$|^url$|Url$|^link$|^mailto$|^tel$/;function wr(e){return GC.includes(e)||zC.test(e)}var zu={Gallery:{source:{verb:"snapshot",keep:[]}},ProductHero:{source:{verb:"snapshot",keep:[]}},SpecTable:{source:{verb:"snapshot",keep:[]},wheel:{verb:"reference"},finish:{verb:"reference"},size:{verb:"reference"}},CollectionCard:{collection:{verb:"snapshot",keep:[]}},FooterMenu:{menu:{verb:"snapshot",keep:[]}},MenuBlock:{menu:{verb:"snapshot",keep:[]}},BrandStrip:{picks:{verb:"reference"}},ProductGrid:{design_codes:{verb:"reference"}},ProductRef:{code:{verb:"reference"},finish:{verb:"reference"}},FitmentTable:{wheel:{verb:"reference"}},GalleryItem:{fromProduct:{verb:"reference"}},Footprint:{"offices[].group":{verb:"groupKey"},"offices[].lat":{verb:"pii"},"offices[].lng":{verb:"pii"},"offices[].geocode":{verb:"pii"}}};zu.ContactLocations={"locations[].lat":{verb:"pii"},"locations[].lng":{verb:"pii"},"locations[].mapsUrl":{verb:"pii"},"locations[].geocode":{verb:"pii"}};var rM=Object.fromEntries(Object.entries(ys).map(([e,o])=>[e,Object.keys(o)])),aM=Object.fromEntries(Object.entries(Ss).map(([e,o])=>[e,[...o]]));var Uu=qC(!1);function qu({children:e}){return Cs(Uu.Provider,{value:!0,children:e})}function jC(){return $C(Uu)}function $u({name:e,children:o}){return!jC()||!e||wr(e)?Cs(UC,{children:o}):Cs(vr,{})}function to(e,o,t){return e.some(r=>(typeof r=="object"?r.value:r)===t)?t:o}var vs="off",ws="none",ks=[{label:"None",value:"off"},{label:"1, 2, 3",value:"plain"},{label:"01, 02, 03",value:"padded"},{label:"N\xB001, N\xB002",value:"numero"}],Ts=[{label:"None",value:"none"},{label:"Hairline",value:"hairline"}];function pM(e){return to(ks,vs,e)}function mM(e){return to(Ts,ws,e)}var ju="sf-card-index",kr="sf-card-index",xM="pointer-events-none absolute left-[18px] top-[18px] z-10 border border-line bg-bg/70 px-2 py-1 font-mono text-[length:var(--size-label,10px)] uppercase tracking-[0.16em] text-fg-dim",KC={plain:`counter(${kr})`,padded:`counter(${kr}, decimal-leading-zero)`,numero:`"N\xB0" counter(${kr}, decimal-leading-zero)`};function IM(e,o){return o==="off"?"":`.${e}{counter-reset:${kr}}.${e} .${ju}{counter-increment:${kr}}.${e} .${ju}::before{content:${KC[o]}}`}function hM(e){return e==="hairline"?"border border-line hover:border-accent":""}var Ku=[{value:"1",label:"1st rendering"},{value:"2",label:"2nd rendering"},{value:"3",label:"3rd rendering"},{value:"4",label:"4th rendering"},{value:"5",label:"5th rendering"}];import{SCALAR_TEXT_CONTROLS as ut,TEXT_CONTROL_KINDS as VC}from"efficient-easel/screen/lib/puck/text-control-kinds";import{jsx as Fs}from"react/jsx-runtime";import{useState as QC}from"react";import{Button as JC,ImageFocusPoint as ev}from"efficient-shell/ui";import{jsx as ao,jsxs as Vu}from"react/jsx-runtime";import{ChevronIcon as XC}from"efficient-easel/icons";import{Tooltip as YC}from"efficient-shell/ui";function za({styleKey:e,label:o,icon:t,value:r,sampleStyle:a,open:n,onToggle:s,saved:i=!1,children:c}){return Vu("div",{"data-sf-style-row":e,className:`sf-style-row${n?" is-open":""}`,children:[Vu("button",{type:"button",className:"sf-style-head","aria-expanded":n,onClick:s,children:[ao("span",{className:"sf-style-caret","aria-hidden":"true",children:ao(XC,{size:13})}),t?ao("span",{className:"es-field-icon",children:t}):null,ao("span",{className:"sf-style-name",children:l(o)}),r!=null?typeof r=="string"?ao(YC,{content:r,className:"sf-style-sample-tip",children:ao("span",{className:"sf-style-sample",style:a,children:r})}):ao("span",{className:"sf-style-sample",style:a,children:r}):null,ao("span",{className:`sf-style-slot${i?" is-saved":""}`,children:ao(ZC,{})})]}),n&&ao("div",{className:"sf-style-body",children:c})]})}function ZC(){return ao("svg",{viewBox:"0 0 24 24",width:"14",height:"14",fill:"none",stroke:"currentColor",strokeWidth:3,strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:ao("polyline",{points:"20 6 9 17 4 12"})})}function Xu({label:e,value:o,onChange:t,image:r}){let[a,n]=QC(!1);return Fs(za,{styleKey:"imageFocal",label:e,value:o,sampleStyle:{fontSize:11,fontVariantNumeric:"tabular-nums"},open:a,onToggle:()=>n(s=>!s),children:a?Fs(ev,{label:l(e),value:o,onChange:t,image:r,emptyText:l("Choose a background image first \u2014 there\u2019s nothing to focus yet."),actions:Fs(JC,{variant:"secondary",size:"sm",onClick:()=>n(!1),children:l("Done")})}):null})}import{jsx as no,jsxs as ov}from"react/jsx-runtime";import{SettingsField as Zu}from"efficient-easel/panel";import{ImageIcon as Qu,PlayIcon as Ju}from"efficient-easel/icons";import{ImageBox as tv}from"efficient-easel/pick";import{useEaselStrings as rv}from"efficient-easel/strings";import{useContext as av,useState as ep}from"react";import{FileIntakeAlert as nv,useFileIntake as lv}from"efficient-shell/file-intake";import{requestMediaPick as Es,resolveMediaPick as BM}from"efficient-easel/screen/lib/media-picker";var Ke=jc,Yu=e=>e.blocks;function op({value:e,onChange:o,label:t,accept:r,placeholder:a}){let n=kt(),s=Be(),i=rv(),c=l(t),[u,p]=ep(!1),[m,x]=ep(null),g=r.startsWith("video"),C=av(Ea),w=lv({accept:r,maxSizeBytes:Ke(s).media.maxUploadBytes,acceptHint:g?l("videos only"):l("images only"),multiple:!1,disabled:u,onAccept:([v])=>{x(null),p(!0),Es(n,{accept:r,title:c,file:v}).then(S=>{S&&o(S.url)}).catch(()=>x(l("Couldn\u2019t open the media picker \u2014 please try again."))).finally(()=>p(!1))}}),b=()=>(w.clearRejections(),x(null),Es(n,{accept:r,title:c}).then(v=>v?.url??null));return C&&!C.capabilities.mediaEditing?no(Zu,{label:c,icon:g?no(Ju,{}):no(Qu,{}),children:no("div",{className:"sf-image-slot-inert",children:g?l("Templates don\u2019t store videos \u2014 this slot stays a placeholder. Each website picks its own after it\u2019s created."):l("Templates don\u2019t store images \u2014 this slot stays a placeholder. Each website picks its own after it\u2019s created.")})}):ov("div",{children:[no(Zu,{label:c,icon:g?no(Ju,{}):no(Qu,{}),children:no("div",{className:`sf-image-drop${w.dragOver?" is-dragover":""}`,...w.zoneProps,children:no(tv,{value:e,onChange:o,label:c,kind:g?"video":"image",placeholder:a===void 0?void 0:l(a),openLibrary:u?void 0:b,words:i.pick.image})})}),u&&no("div",{className:"sf-image-status",role:"status",children:l("Opening the picker\u2026")}),m&&no("div",{className:"sf-image-status sf-image-status--error",role:"alert",children:m}),no(nv,{rejections:w.rejections,className:"sf-image-status sf-image-status--error"})]})}import{jsx as tp}from"react/jsx-runtime";import{useId as sv}from"react";import{FieldSelect as iv}from"efficient-easel/fields";import{SettingsField as fv}from"efficient-easel/panel";function cv(e){return e.map(({value:o,label:t,note:r})=>({value:o,label:t,...r?{meta:r}:{}}))}function rp({label:e,options:o,value:t,onChange:r,emptyLabel:a,icon:n,hint:s}){let i=sv(),c=`${i}-label`,u=`${i}-button`,p=Array.isArray(t)?t:[];return tp(fv,{label:l(e),labelId:c,icon:n,hint:s,children:tp(iv,{id:u,multiple:!0,value:p,options:cv(o),onChange:r,placeholder:a===void 0?l("None"):l(a),ariaLabelledBy:`${c} ${u}`,inline:!0})})}import{jsx as Te,jsxs as pt,Fragment as Rv}from"react/jsx-runtime";import{useCallback as Ov,useContext as Av,useEffect as Bv,useId as pp,useRef as dp,useState as up}from"react";import{ThemeIcon as Dv}from"efficient-easel/icons";import{SettingsField as _v}from"efficient-easel/panel";import{jsx as z,jsxs as jo,Fragment as gv}from"react/jsx-runtime";import{SettingsField as Rs,SettingsGroupSub as bv}from"efficient-easel/panel";import{Button as Ls}from"efficient-shell/ui";import{jsx as $o,jsxs as ap}from"react/jsx-runtime";import{SettingsField as dv}from"efficient-easel/panel";import{AccentIcon as uv}from"efficient-easel/icons";import{Tooltip as pv}from"efficient-shell/ui";function Ps(e){return So(e).background}function mv(e){let o=Go(e.accent,Ps(e));return o===null?null:{ratio:o,grade:wt(o)}}function xv(e){let o=Ps(e),t=Go(e.accent,o);return t===null?[]:ld(e.accent).filter(r=>{let a=Go(r,o);return a!==null&&a>t&&wt(a)==="good"})}var Iv={good:"Easy to read","large-only":vt["large-only"],hard:vt.hard};function np({value:e,onChange:o}){let t=mv(e),r=t?.grade,a=t&&t.grade!=="good"?xv(e):[];return $o(dv,{label:l("Main color"),icon:$o(uv,{}),hint:t?l(Iv[t.grade]):void 0,action:$o(po,{value:e.accent,onChange:n=>o({...e,accent:n}),label:l("Main color")}),children:a.length>0?$o("div",{className:"w-full min-w-0",children:ap("div",{className:"sf-readability",children:[$o("p",{className:"sf-readability-advice",children:hv(r,!0)}),$o("div",{className:"sf-readability-suggestions",children:a.map(n=>{let s=Go(n,Ps(e));return $o(pv,{content:l("Use {colour}",{colour:n.toUpperCase()}),children:ap("button",{type:"button",className:"sf-readability-suggestion",onClick:()=>o({...e,accent:n}),children:[$o("span",{className:"sf-readability-chip",style:{background:n},"aria-hidden":!0}),s?`${s.toFixed(1)}:1`:n.toUpperCase()]})},n)})})]})}):null})}function hv(e,o){return e?e==="good"?l("This color reads clearly on your pages."):o?l("This color is hard to read on this theme's page. The buttons below are the same hue, darkened."):l("This color is hard to read on your page background. Pick one further from it \u2014 lighter if your pages are dark, deeper if they are light."):l("Pick a color to see how it reads.")}import{ButtonIcon as yv,GroundIcon as Sv,LayoutIcon as Cv,SquareIcon as vv,TextSmallIcon as wv,TypeIcon as lp}from"efficient-easel/icons";var Tr=e=>l("Theme {n}",{n:e+1});function sp({colors:e}){let o=So(e),t=Ol(e)??o.accent;return jo("span",{className:"sf-theme-page",style:{background:o.background,color:o.text},"aria-hidden":!0,children:[z("span",{className:"sf-theme-eyebrow",style:{color:o.muted},children:l("label")}),jo("span",{className:"sf-theme-headline",children:[l("Heading")," ",z("span",{style:{color:o.accent},children:l("accent")})]}),z("span",{className:"sf-theme-body",children:l("body text")}),jo("span",{className:"sf-theme-row",children:[z("span",{className:"sf-theme-btn",style:{background:t,color:Al(e,o.accent)},children:l("button")}),z("span",{className:"sf-theme-mini",style:{background:o.surface,borderColor:o.line},children:l("card")})]})]})}var Os={"Text color":z(lp,{}),"Label color":z(wv,{}),Background:z(Sv,{}),"Panels & cards":z(Cv,{}),Borders:z(vv,{}),"Button color":z(yv,{}),"Button text color":z(lp,{})};function kv({label:e,colorKey:o,value:t,onChange:r,idPrefix:a="sf-theme-ink"}){let n=`${a}-${o}`;return z(Rs,{label:l(e),icon:Os[e],htmlFor:n,action:z(po,{id:n,label:l(e),value:t,onChange:s=>r(o,s)})})}function Tv({value:e,accent:o,onChange:t,idPrefix:r="sf-theme-ink"}){let a=`${r}-button`,n=/^#[0-9a-fA-F]{6}$/.test(e??""),s=n?e:o;return z(Rs,{label:l("Button color"),icon:Os["Button color"],htmlFor:a,action:z(po,{id:a,label:l("Button color"),value:s,caption:n?s:l("Main"),onChange:t})})}function Fv({colors:e,accent:o,onChange:t,idPrefix:r="sf-theme-ink"}){let a=`${r}-button-ink`,n=sd(e),s=Al(e,o),i=Ol(e)??o,c=wt(Go(s,i)??0);return z(Rs,{label:l("Button text color"),icon:Os["Button text color"],hint:n&&c!=="good"?l("{grade} on the button",{grade:l(vt[c])}):void 0,htmlFor:a,action:z(po,{id:a,label:l("Button text color"),value:s,caption:n?s:l("Auto"),onChange:t})})}var Ev=[{colour:!0},{label:"Text color",key:"text"},{label:"Label color",key:"muted"},{button:!0},{buttonInk:!0},{group:"Surfaces"},{label:"Background",key:"background"},{label:"Panels & cards",key:"surface"},{label:"Borders",key:"line"}];function As({colors:e,onChange:o,idPrefix:t}){let r=So(e);return z(gv,{children:Ev.map(a=>"colour"in a?z(np,{value:e,onChange:o},"colour"):"group"in a?z(bv,{title:l(a.group)},a.group):"button"in a?z(Tv,{value:e.button,accent:r.accent,onChange:n=>o({...e,button:n}),idPrefix:t},"button"):"buttonInk"in a?z(Fv,{colors:e,accent:r.accent,onChange:n=>o({...e,buttonInk:n}),idPrefix:t},"buttonInk"):z(kv,{label:a.label,colorKey:a.key,value:r[a.key],onChange:(n,s)=>o({...e,[n]:s}),idPrefix:t},a.key))})}function Ua({index:e,colors:o,selected:t,role:r="radio",open:a,editable:n=!0,onPick:s,onEdit:i,onChangeColors:c}){let u=So(o),p=Tr(e),m=e<Rl.length&&!o.brandInk?Rl[e]:null,x=wt(Go(u.text,u.background)??0),g=m?JSON.stringify(o)!==JSON.stringify(m):!1,C=a!==void 0;return jo("div",{className:`sf-theme-card${t?" is-selected":""}`,children:[z("button",{type:"button",role:r,"aria-checked":r==="radio"?t:void 0,"aria-selected":r==="option"?t:void 0,"aria-label":p,className:"sf-theme-pick",onClick:s,children:z(sp,{colors:o})}),jo("div",{className:"sf-theme-foot",children:[z("span",{className:"sf-theme-name",children:p}),x!=="good"&&z("span",{className:"sf-theme-warn",children:l(vt[x])}),n&&i&&z(Ls,{variant:a?"primary":"secondary",size:"sm",className:"sf-theme-edit","aria-expanded":C?a:void 0,"aria-controls":C?`sf-theme-colours-${e}`:void 0,"aria-label":a?l("Done {name}",{name:p}):l("Edit {name}",{name:p}),onClick:i,children:a?l("Done"):l("Edit")})]}),a&&jo("div",{id:`sf-theme-colours-${e}`,className:"sf-theme-colours",children:[z(As,{colors:o,onChange:w=>c?.(w)}),m&&z(Ls,{variant:"link",size:"sm",className:"sf-theme-reset",disabled:!g,onClick:()=>c?.({...m}),children:g?l("Reset {name} to the preset",{name:p}):l("Not changed")})]})]})}function ip({colors:e,name:o,nameId:t,open:r,menuId:a,labelId:n,buttonRef:s,onClick:i,onKeyDown:c,onEdit:u}){return jo("div",{className:"sf-secttheme-btn",children:[z("button",{ref:s,type:"button",className:"sf-theme-pick","aria-expanded":r,"aria-controls":a,"aria-labelledby":`${n} ${t}`,onClick:i,onKeyDown:c,children:e?z(sp,{colors:e}):z("span",{className:"sf-secttheme-nopreview","aria-hidden":"true"})}),jo("div",{className:"sf-theme-foot",children:[z("span",{id:t,className:"sf-theme-name",children:o}),u&&z(Ls,{variant:"secondary",size:"sm",className:"sf-theme-edit","aria-label":l("Edit {name}",{name:o}),onClick:u,children:l("Edit")}),z("button",{type:"button",className:"sf-secttheme-caret","aria-hidden":"true",tabIndex:-1,onClick:i,children:z("span",{className:"sf-multi-caret",children:"\u25BE"})})]})]})}import{useCallback as Bs,useEffect as Pv,useRef as qa}from"react";function fp(e=io()){return(o,t,r)=>{let a=Ke(e).theme;return a?a.update(o,r?{siteId:r}:void 0):Promise.reject(new Hl("invalid","This backend stores no site theme."))}}function cp(e){return e.themeFromDocument?{status:"skipped",reason:"template"}:e.token?null:{status:"skipped",reason:"no-token"}}async function Lv(e,o=fp()){let{themeFromDocument:t,token:r,siteId:a,patch:n}=e,s=cp({themeFromDocument:t,token:r});if(s)return s;if(Object.keys(n).length===0)return{status:"skipped",reason:"empty"};try{return await o(n,r,a??void 0),{status:"saved"}}catch(i){return{status:"failed",error:i}}}function $a({themeFromDocument:e,tokenRef:o,siteId:t,onResult:r}){let a=qa(null),n=qa({}),s=Be(),i=qa(r);i.current=r;let c=qa(null),u=Bs(x=>{if(x.status==="skipped"){let g=`skipped:${x.reason}`;if(c.current===g)return;c.current=g}else c.current=null;i.current?.(x)},[]),p=Bs(async()=>{a.current&&(clearTimeout(a.current),a.current=null);let x=n.current;n.current={};let g=await Lv({themeFromDocument:e,token:o?.current,siteId:t,patch:x},fp(s));return u(g),g},[e,o,t,u,s]),m=Bs((x,g=!1)=>{let C=cp({themeFromDocument:e,token:o?.current});if(C){u(C);return}n.current={...n.current,...x},a.current&&clearTimeout(a.current),g?p():a.current=setTimeout(()=>{p()},500)},[e,o,p,u]);return Pv(()=>()=>{p()},[p]),{persist:m,flush:p}}var Nv="Follow the page",MH="Follow the slideshow",Mv=e=>l("Editing {name} changes it everywhere.",{name:e});function Hv({colors:e}){if(!e)return Te("span",{className:"sf-secttheme-chip sf-secttheme-chip--none","aria-hidden":"true"});let o=So(e);return pt("span",{className:"sf-secttheme-chip","aria-hidden":"true",children:[Te("i",{style:{background:o.background}}),Te("i",{className:"sf-secttheme-chip-accent",style:{background:o.accent}})]})}function Wv({themes:e,value:o,onPick:t,onEdit:r,menuId:a,followLabel:n}){return pt("div",{className:"sf-multi-menu sf-secttheme-menu",id:a,role:"listbox",children:[n!==void 0&&pt(Rv,{children:[pt("button",{type:"button",role:"option","aria-selected":o===null,className:`sf-secttheme-item${o===null?" is-active":""}`,onClick:()=>t(Na),children:[Te(Hv,{}),Te("span",{className:"sf-secttheme-name",children:l(n)})]}),Te("div",{className:"sf-secttheme-sep",role:"presentation"})]}),o!==null&&e[o]&&Te("p",{className:"sf-secttheme-oncard",role:"presentation",children:l("{name} is on this section",{name:Tr(o)})}),e.map((s,i)=>i===o?null:Te(Ua,{role:"option",index:i,colors:s,selected:!1,onPick:()=>t(i),onEdit:()=>r(i)},i))]})}function Gv({index:e,colors:o,onChange:t,onDone:r}){let a=Tr(e),n=pp();return pt("div",{className:"sf-secttheme-sheet",children:[pt("div",{className:"sf-secttheme-sheet-head",children:[Te("span",{children:a}),Te("button",{type:"button",className:"sf-secttheme-done",onClick:r,children:l("Done")})]}),Te("div",{className:"sf-secttheme-rows",children:Te(As,{colors:o,onChange:t,idPrefix:n})}),Te("p",{className:"sf-secttheme-warn",children:Mv(a)})]})}function mp({value:e,onChange:o,followLabel:t,hint:r}){let{theme:a,setTheme:n}=re(),s=co(a),i=Av(Ea),c=i?.tokenRef,u=i?.siteId??null,p=!i?.capabilities?.hasSiteTheme,{persist:m,flush:x}=$a({themeFromDocument:p,tokenRef:c,siteId:u}),g=co(s),C=g.themes,w=ns(e),b=w!==null?C[w]:void 0,v=b??(C.length?ya(g):void 0),[S,h]=up(!1),[k,P]=up(null),F=dp(null),A=dp(null),O=pp(),B=Ov(()=>{h(!1),P(null)},[]);Bv(()=>{if(!S&&k===null)return;let j=he=>{F.current&&!F.current.contains(he.target)&&(x(),B())};return document.addEventListener("mousedown",j),()=>document.removeEventListener("mousedown",j)},[S,k,B,x]);let U=j=>{o(j),B()},me=j=>{if(k===null)return;let he=C.map((ne,Oe)=>Oe===k?j:ne),_={...g,themes:he};n(_),m({selected_preset:_.selected,theme_presets:_.themes})};return pt("div",{className:"sf-secttheme",ref:F,children:[Te(_v,{label:l("Theme"),icon:Te(Dv,{}),labelId:`${O}-label`,hint:r,children:Te(ip,{colors:v,onEdit:w!==null?()=>{P(w),h(!1)}:void 0,name:b?Tr(w):l(t??Nv),nameId:`${O}-value`,labelId:`${O}-label`,open:S,menuId:O,buttonRef:A,onClick:()=>{P(null),h(j=>!j)},onKeyDown:j=>{j.key==="Escape"&&(S||k!==null)&&(j.preventDefault(),B())}})}),S&&k===null&&Te("div",{onKeyDown:j=>{j.key==="Escape"&&(j.preventDefault(),B(),A.current?.focus())},children:Te(Wv,{themes:C,value:w,onPick:U,onEdit:j=>{P(j),h(!1)},menuId:O,followLabel:t})}),k!==null&&C[k]&&Te(Gv,{index:k,colors:C[k],onChange:me,onDone:()=>{x(),B(),A.current?.focus()}})]})}import{jsx as xp}from"react/jsx-runtime";import{useId as zv}from"react";import{FieldSelect as Uv}from"efficient-easel/fields";import{SettingsField as qv}from"efficient-easel/panel";function $v(e){return e.map(({value:o,label:t,group:r,thumb:a,meta:n})=>({value:o,label:t,...r!==void 0?{group:r}:{},...a!==void 0?{thumb:a}:{},...n!==void 0?{meta:n}:{}}))}function jv({label:e,options:o,fallback:t,value:r,onChange:a,placeholder:n,bare:s=!1,icon:i}){let c=zv(),u=`${c}-label`,p=`${c}-button`,m=r??"",x=o.some(b=>b.value===m)?m:t,g=l(e),C=n===void 0?void 0:l(n),w=xp(Uv,{id:p,value:x,options:$v(o),onChange:a,placeholder:C,searchPlaceholder:C,...s?{ariaLabel:g}:{ariaLabelledBy:`${u} ${p}`},searchable:!0,groupCount:!0,inline:!0});return s?w:xp(qv,{label:g,labelId:u,icon:i,children:w})}import{jsx as mt,jsxs as Yv}from"react/jsx-runtime";import{SettingsField as kp}from"efficient-easel/panel";import{LinkIcon as Zv}from"efficient-easel/icons";import{LinkPicker as Qv,TextLinkField as Jv}from"efficient-shell/ui";import{useEffect as wp,useMemo as Va,useRef as ew,useState as Ka}from"react";function Ip(){return io().auth.token}var ja="homepage";function hp(e){return(e??"").toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/^-+|-+$/g,"")}var gp=[{value:"page",label:"Page"},{value:"anchor",label:"Anchor"},{value:"blog",label:"Blog post",needs:"service"},{value:"product",label:"Product",needs:"commerce"},{value:"custom",label:"Custom URL"}];function bp(e){return e.offersCommerce&&e.offersService?gp:gp.filter(o=>!o.needs||(o.needs==="commerce"?e.offersCommerce:e.offersService))}function Fr(e){return e===ja?"/":`/${e}`}function yp(e){return`/journal/${e}`}function QH(e){return`/wheels/${e}`}function Sp(e,o){return`${Fr(e)}#${o}`}function Kv(e){return hp(e)}function Vv(e){return typeof e=="string"?e.trim():e&&typeof e=="object"&&typeof e.text=="string"?e.text.trim():""}function Cp(...e){let o=new Set,t=[];for(let r of e)for(let a of r?.content??[]){let n=Vv(a?.props?.anchor);if(!n)continue;let s=Kv(n);!s||o.has(s)||(o.add(s),t.push({slug:s,name:n}))}return t}function JH(e){let o=e.indexOf("#"),t=o===-1?e:e.slice(0,o),r=t.indexOf("?");return r===-1?t:t.slice(0,r)}var Xv=()=>({choosePage:l("Choose a page"),chooseSection:l("Choose a section"),noSections:l("No section anchors yet"),sectionHint:l("Jumps to a section on that page."),choosePost:l("Choose a post"),chooseProduct:l("Choose a product")});function vp(e,o,t){if(!e)return"page";if(e.startsWith("/journal/"))return"blog";if(e.startsWith("/wheels/"))return"product";if(e.includes("#")){let r=e.slice(0,e.indexOf("#"));if(r===""||r==="/"||o.includes(r))return"anchor"}return e==="/"||o.includes(e)||t&&t.listingPaths.includes(t.targetOf(e))?"page":"custom"}function Ds(e,o){let t=Xv(),r=e.pages.map(p=>({value:Fr(p.slug),label:p.title})),a=o?.pageOptions?o.pageOptions(r):r,n=a.map(p=>p.value),s=e.pages.map(p=>({label:p.title,options:Cp(...p.docs).map(m=>({value:Sp(p.slug,m.slug),label:m.name}))})).filter(p=>p.options.length>0),i=p=>{switch(p){case"page":return{type:"select",options:a,placeholder:t.choosePage};case"anchor":return{type:"groups",groups:s,placeholder:s.length?t.chooseSection:t.noSections};case"blog":return{type:"select",options:e.posts.map(m=>({value:yp(m.slug),label:m.title||m.slug})),placeholder:t.choosePost};case"product":return{type:"select",options:e.products.map(m=>({value:m.href,label:m.name||m.href})),placeholder:t.chooseProduct};case"custom":return{type:"text"}}},c=bp(e.offers).map(p=>({value:p.value,label:l(p.label),target:i(p.value),...p.value==="anchor"?{hint:t.sectionHint}:{},...p.value==="blog"||p.value==="product"?{hideWhenEmpty:!0}:{}}));if(!o)return{kinds:c,rules:{kindOf:p=>vp(p,n),targetOf:p=>p,readFilter:()=>null,withFilter:p=>p}};let u=p=>{let m=o.withFilter(p,null);return o.listingPaths.includes(m)?m:p};return{kinds:c,rules:{kindOf:p=>vp(p,n,{listingPaths:o.listingPaths,targetOf:u}),targetOf:u,readFilter:o.readFilter,withFilter:o.withFilter},filtersFor:p=>o.listingPaths.includes(p)?o.filtersFor(p):null}}function Tp(e){let o=new Map;return(t="")=>{let r=Ip(),a=o.get(t);if(!a||a.token===null&&r!==null){let n=r||!io().usesBridgedToken?e(r??"",t).catch(()=>[]):Promise.resolve([]);return o.set(t,{promise:n,token:r}),n}return a.promise}}var ow=Tp(async(e,o)=>{let t=o?{siteId:o}:void 0,{pages:r}=Ke();return r.linkTargets?r.linkTargets(t):(await r.list(t)).map(a=>({id:a.id,slug:a.slug,label:a.label,layout:null}))}),tw=Tp(async(e,o)=>await Ke().blog?.posts(o?{siteId:o}:void 0)??[]);function rw({value:e,onChange:o,label:t="Link",data:r,filters:a}){let n=Va(()=>Ds(r,a),[r,a]),s=l(t);return mt(kp,{label:s,icon:mt(Zv,{}),children:mt(Qv,{value:e,onChange:i=>o(i),kinds:n.kinds,rules:n.rules,filtersFor:n.filtersFor,label:s})})}function Fp(){let{siteId:e,capabilities:o}=we(),{offersCommerce:t,hasBlog:r}=o,[a,n]=Ka([]),[s,i]=Ka([]),[c,u]=Ka([]),[p,m]=Ka(null),x=Be().chrome,g=x?.products?.list,C=x?.linkFilters,w=C?void 0:x?.linkRow,b=ew(!0);wp(()=>(b.current=!0,()=>{b.current=!1}),[]),wp(()=>{let h=!0;return ow(e??void 0).then(k=>h&&b.current&&n(k)),r&&tw(e??void 0).then(k=>h&&b.current&&i(k)),t&&g?.().then(k=>h&&b.current&&u(k)),t&&C?C.load(e).catch(()=>null).then(k=>h&&b.current&&m(()=>k)):m(null),()=>{h=!1}},[e,t,r,g,C]);let v=Va(()=>({pages:a.filter(h=>!zd(h.slug)).map(h=>({slug:h.slug,title:h.label,docs:[h.layout]})),posts:r?s.map(h=>({slug:h.slug,title:h.title})):[],products:t?c.map(h=>({href:h.href,name:h.name})):[],offers:{offersCommerce:t,offersService:r}}),[a,s,c,t,r]),S=Va(()=>p?p(v.pages):null,[p,v]);return{data:v,filters:S,pages:a,offersCommerce:t,HostLinkRow:w}}function g5({label:e,icon:o,text:t,onTextChange:r,link:a,onLinkChange:n}){let{data:s,filters:i}=Fp(),c=Va(()=>Ds(s,i),[s,i]),u=l(e);return mt(kp,{label:u,icon:o,children:mt(Jv,{label:u,text:t,onTextChange:r,link:a,onLinkChange:p=>n(p),kinds:c.kinds,rules:c.rules,filtersFor:c.filtersFor})})}function Ep({value:e,onChange:o,label:t="Link"}){let r=typeof e=="string"?e:"",{data:a,filters:n,pages:s,offersCommerce:i,HostLinkRow:c}=Fp(),u=a.pages.map(m=>Fr(m.slug)),p=i&&c&&(r==="/"||u.includes(r))?c:void 0;return Yv("div",{children:[mt(rw,{value:r,onChange:o,label:t,data:a,filters:n}),p&&mt(p,{value:r,onChange:o,pages:s})]})}var mo={min:10,max:200,step:10};function Pp(e,o){let t=typeof e=="number"?e:void 0,r=typeof o=="number"?o:void 0;if(!(t===void 0&&r===void 0))return{paddingTop:t,paddingBottom:r}}var aw="sf-pad-top-phone",nw="sf-pad-bottom-phone",lw="--sf-pad-t-phone",sw="--sf-pad-b-phone",iw="sf-pad-left-phone",fw="sf-pad-right-phone",cw="--sf-pad-l-phone",dw="--sf-pad-r-phone";function y5(e,o,t,r,a,n,s,i){let c=Pp(e,o)??{},u={},p=["sf-section-pad"];typeof t=="number"&&(p.push(aw),u[lw]=`${t}px`),typeof r=="number"&&(p.push(nw),u[sw]=`${r}px`);let m={};return typeof a=="number"&&(m.paddingLeft=a),typeof n=="number"&&(m.paddingRight=n),typeof s=="number"&&(p.push(iw),u[cw]=`${s}px`),typeof i=="number"&&(p.push(fw),u[dw]=`${i}px`),p.length===1&&Pp(e,o)===void 0&&!Object.keys(m).length?null:{className:p.join(" "),style:{...c,...m,...u}}}var Lp=e=>typeof e=="number"?e:void 0;function Rp(e,o,t){let r=Lp(e)??t,a=Lp(o);return r===void 0?a:a===void 0?r:r+a}function S5(e,o={}){return{top:Rp(e.padTop,e.sectionPaddingTop,o.top),bottom:Rp(e.padBottom,e.sectionPaddingBottom,o.bottom)}}var uw=["auto","fixed","screen"],pw=["px","%"];var mw="var(--sf-header-h, 88px)",_s={min:40,max:2e3,step:10,fallback:600},Ns={min:10,max:200,step:5,fallback:100},xw="sf-section-minh",Op={base:"--sf-section-minh",small:"--sf-section-minh-s"},Bp=e=>typeof e=="string"&&uw.includes(e),Iw=e=>typeof e=="string"&&pw.includes(e);function Xa(e){let o=Bp(e.sectionHeightMode)?e.sectionHeightMode:"auto",t=o==="screen"?"%":Iw(e.sectionHeightUnit)?e.sectionHeightUnit:"px",r=o==="screen"?Ns.fallback:_s.fallback,a=typeof e.sectionHeightValue=="number"?e.sectionHeightValue:r;return{mode:o,value:a,unit:t}}function Dp(e){let{mode:o,value:t,unit:r}=Xa(e);if(o==="auto")return;if(o==="fixed"&&r==="px")return[`${t}px`,null];let a=t/100,n=s=>o==="screen"?`(100${s} - ${mw})`:`100${s}`;return[`calc(${n("vh")} * ${a})`,`calc(${n("svh")} * ${a})`]}function hw(e){let o=Dp(e);if(!o)return;let[t,r]=o;return{display:"grid",[Op.base]:t,...r?{[Op.small]:r}:{}}}var v5=new Set(["Hero","HeroSingle","IntroBleed","CategoryBar","DocTabs"]),Rt="Height",gw="sf-section-minh-phone",Ap={base:"--sf-section-minh-p",small:"--sf-section-minh-ps"};function Ms(e){return Bp(e.sectionHeightModePhone)}function w5(e){return Xa({sectionHeightMode:e.sectionHeightModePhone,sectionHeightValue:e.sectionHeightValuePhone,sectionHeightUnit:e.sectionHeightUnitPhone})}function bw(e){let o=hw(e),t=Ms(e)?Dp({sectionHeightMode:e.sectionHeightModePhone,sectionHeightValue:e.sectionHeightValuePhone,sectionHeightUnit:e.sectionHeightUnitPhone}):void 0;if(!o&&!t)return null;let r=[xw],a={...o??{}};return t&&(r.push(gw),a[Ap.base]=t[0],t[1]&&(a[Ap.small]=t[1])),{className:r.join(" "),style:a}}function k5(e){return bw(e)!==null}var yw=["column","row","tabs"],_p="Direction",Sw={column:"Stacked",row:"One row",tabs:"Tabs"},Np={Flex:yw,HeroGroup:["column","row"]},Cw={Flex:"row",HeroGroup:"column"},vw={column:"flex-col",row:"flex-row",tabs:"flex-col"};function Ya(e,o){return Np[e].includes(o)?o:Cw[e]}function F5(e,o){return vw[Ya(e,o)]}function Mp(e){return Np[e].map(o=>({label:Sw[o],value:o}))}var Hs=[{label:"Start",value:"start"},{label:"Center",value:"center"},{label:"Space between",value:"between"},{label:"End",value:"end"}],Gp=[{label:"Start",value:"start"},{label:"Center",value:"center"},{label:"Stretch",value:"stretch"}],zp="Wrap",Ws=[{label:"Wrap",value:"wrap"},{label:"No wrap",value:"nowrap"}],Hp={start:"justify-start",center:"justify-center",between:"justify-between",end:"justify-end"},Wp={start:"items-start",center:"items-center",stretch:"items-stretch"};function P5(e,o){let t=typeof e=="string"&&e in Hp?Hp[e]:"",r=typeof o=="string"&&o in Wp?Wp[o]:"";return[t,r].filter(Boolean).join(" ")}function L5(e){return e===!0||e==="wrap"?"flex-wrap":""}var Gs="Block widths",Za=[{label:"Fit content",value:"content",weights:null},{label:"Equal",value:"equal",weights:[1,1]},{label:"Big left",value:"bigLeft",weights:[2,1]},{label:"Big right",value:"bigRight",weights:[1,2]},{label:"Bigger left",value:"biggerLeft",weights:[3,1]},{label:"Bigger right",value:"biggerRight",weights:[1,3]}],Er="[&>*]:min-w-0 [&>*]:flex-1 [&>*]:basis-0",ww={equal:Er,bigLeft:`${Er} [&>*:first-child]:min-[800px]:grow-[2]`,bigRight:`${Er} [&>*:last-child]:min-[800px]:grow-[2]`,biggerLeft:`${Er} [&>*:first-child]:min-[800px]:grow-[3]`,biggerRight:`${Er} [&>*:last-child]:min-[800px]:grow-[3]`};function R5(e){return typeof e=="string"?ww[e]??"":""}var Up="Columns on phone",zs=1,qp=3,kw={2:"max-[800px]:flex-wrap [&>*]:max-[800px]:min-w-0 [&>*]:max-[800px]:basis-[calc((100%_-_var(--sf-gap-len,0px))/2)]",3:"max-[800px]:flex-wrap [&>*]:max-[800px]:min-w-0 [&>*]:max-[800px]:basis-[calc((100%_-_var(--sf-gap-len,0px)_*_2)/3)]"};function O5(e){let o=Number(e);return kw[o]??"max-[800px]:flex-col"}var $p="Block spacing",Us=[{label:"Each block",value:"each"},{label:"Gap only",value:"gap"}],Tw="sf-box-gap-only";function A5(e){return e==="gap"?Tw:""}var Fw=["solid","dashed","dotted"],Ew=["top","right","bottom","left"],D5="sf-section-border",Pw=/^#(?:[0-9a-f]{3}|[0-9a-f]{4}|[0-9a-f]{6}|[0-9a-f]{8})$/i,jp=e=>typeof e=="number"&&Number.isFinite(e)?`${Math.min(20,Math.max(0,Math.round(e)))}px`:void 0;function Kp(e,{phone:o=!1}={}){if(!e||typeof e!="object")return;let t=o?"-phone":"",r={};for(let a of Ew){let n=jp(e[a])??jp(e.width);n!==void 0&&(r[`--sf-border-${a}-width${t}`]=n)}return typeof e.style=="string"&&Fw.includes(e.style)&&(r[`--sf-border-style${t}`]=e.style),typeof e.color=="string"&&Pw.test(e.color)&&(r[`--sf-border-color${t}`]=e.color.toLowerCase()),Object.keys(r).length?r:void 0}function _5(e,o){let t=Kp(e),r=Kp(o,{phone:!0});return t||r?{...t,...r}:void 0}var Yp="sf.gapContainer",Ko={min:-32,max:64,step:2},Zp={Grid:{sm:12,md:24,lg:40},Flex:{sm:12,md:24,lg:40},FooterGroup:{sm:8,md:16,lg:32},HeroGroup:null,Events:null,GalleryB:null,ProductGrid:null},Ot={Grid:24,Flex:24,FooterGroup:16,HeroGroup:0,Events:24,GalleryB:8,ProductGrid:2},Lw=new Set(["Events","GalleryB"]);function qs(e,o,t){if(typeof o=="number"&&Number.isFinite(o)&&o>=Ko.min)return o;if(typeof o=="string"){let r=Zp[e]?.[o];if(typeof r=="number")return r}return typeof t=="number"&&Number.isFinite(t)?t:Ot[e]}var Rw="sf-gap-overlap",Ow="--sf-gap-overlap",Qp="--sf-block-gap",Aw="--sf-block-gap-rem",xt={min:0,max:Ko.max,step:Ko.step};function Bw(e){if(typeof e!="number"||!Number.isFinite(e))return null;let o=Math.min(Math.max(Math.round(e),xt.min),xt.max);return o-o%xt.step}function M5(e){let o=Bw(e);return o===null?{}:{[Qp]:`${o}px`,[Aw]:`${o/16}rem`}}var Vp="sf-gap-zone",Xp="--sf-gap-len";function $s(e,o){return typeof o=="number"&&Number.isFinite(o)&&o>=Ko.min?!0:typeof o=="string"&&typeof Zp[e]?.[o]=="number"}var Dw={block:"sf-gap-overlap-block",inline:"sf-gap-overlap-inline",both:"sf-gap-overlap-both"};function H5(e,o,t){if(!$s(e,o)){let a=`${Ot[e]}px`,n=Lw.has(e)?`var(--sf-card-gap, ${a})`:a;return{className:` ${Vp}`,style:{[Xp]:`var(${Qp}, ${n})`}}}let r=qs(e,o);return r>=0?{className:` ${Vp}`,style:{[Xp]:`${r}px`}}:{className:` ${Rw} ${Dw[t]}`,style:{gap:"0px",[Ow]:`${-r/2}px`}}}var Jp=["transparent","var(--section-bg)","var(--surface)","var(--surface-2)"],em={transparent:"No fill","var(--section-bg)":"Section band","var(--surface)":"Panels and cards","var(--surface-2)":"Second surface"},Qa="var(--section-bg)",Ja="inherit";function G5(e,o){return e===Ja?Qa:e===void 0?o:en(e)}var _w=/var\(\s*--(surface-2|surface|line)\s*(?=[,)])/g;function en(e){return e.replace(_w,"var(--site-$1")}function om(e,o){return e===Ja?!0:e===void 0&&o===Qa}var tm=["transparent","var(--wheel-stage)","var(--surface)","var(--surface-2)"],rm={transparent:"No fill","var(--wheel-stage)":"Image stage","var(--surface)":"Panels and cards","var(--surface-2)":"Second surface"},At="var(--wheel-stage)",on="transparent",Pr="inherit";function q5(e,o){return en(js(e,o))}function js(e,o){return e===Pr?At:e==null?o:e===!0?At:e===!1?on:e}function $5(e){return typeof e=="string"&&e!==Pr?en(e):At}function j5(e){return e!==on&&e!=="none"&&e!==""}function am(e,o){return e===Pr||e===!0?!0:e==null?o===At:!1}var nm="inherit",tn="fixed",lm=e=>typeof e!="number"&&e!==tn,Nw="var(--sf-heading-max, 9999px)";function V5(e,o,t,r){if(typeof e=="number")return`${e}px`;if(e===tn)return o;let a=r?`var(--size-${r}, ${o})`:o;return t==="heading"?`min(${a}, ${Nw})`:a}var Ne={min:1e3,max:2e3,step:50,default:1600};function sm(e){return{maxWidth:e,marginInline:"auto",width:"100%"}}function Y5(e,o){if(e!==!1)return null;let t=typeof o=="number"?o:Ne.default;return sm(t)}var im="--sf-site-width",rn=`var(${im},${Ne.default}px)`,Z5=`max-w-[${rn}]`,Q5=`max-w-[${Ne.default}px]`;function Mw(e){return typeof e!="number"||!Number.isFinite(e)?Ne.default:Math.round(Math.min(Math.max(e,Ne.min),Ne.max))}function J5(e){let o=Mw(e);return o===Ne.default?{}:{[im]:`${o}px`}}var Lo={min:0,max:80,step:4,default:40},fm="--sf-site-gutter",Ve=`var(${fm},${Lo.default}px)`,Hw=`px-[${Ve}]`;var Vo={md:`min(24px,${Ve})`,sm:`min(20px,${Ve})`,frame:`min(24px,${Ve})`,tabs:`min(16px,${Ve})`},e4=[[`max-[1100px]:px-[${Vo.md}]`,"max-[1100px]:px-6"],[`max-[1100px]:px-[${Vo.tabs}]`,"max-[1100px]:px-4"],[`max-[960px]:px-[${Vo.frame}]`,"max-[960px]:px-6"],[`max-[900px]:px-[${Vo.md}]`,"max-[900px]:px-6"],[`max-[800px]:px-[${Vo.md}]`,"max-[800px]:px-6"],[`max-[720px]:px-[${Vo.sm}]`,"max-[720px]:px-5"],[`max-[800px]:px-[${Vo.sm}]`,"max-[800px]:px-5"],[`max-[640px]:px-[${Vo.sm}]`,"max-[640px]:px-5"],[`min-[800px]:px-[${Ve}]`,"min-[800px]:px-10"],[`max-[720px]:px-[min(24px,${Ve})]`,"max-[720px]:px-6"],[`max-[800px]:-mx-[min(20px,${Ve})]`,"max-[800px]:-mx-5"],[`max-[720px]:-mx-[min(20px,${Ve})]`,"max-[720px]:-mx-5"],[`-mx-[${Ve}]`,"-mx-10"],[Hw,"px-10"]];function Ww(e){return typeof e!="number"||!Number.isFinite(e)?Lo.default:Math.round(Math.min(Math.max(e,Lo.min),Lo.max))}function o4(e){let o=Ww(e);return o===Lo.default?{}:{[fm]:`${o}px`}}var an=`min(var(--sf-page-cap,${rn}),${rn})`,t4=`max-w-[${an}]`,r4=`max-w-[min(var(--sf-page-cap,${Ne.default}px),${Ne.default}px)]`,cm="--sf-hero-cap",Gw=`var(${cm},none)`,a4=`max-w-[${Gw}]`,Ks="--sf-hero-bleed-m",Vs="--sf-hero-bleed-w",n4=`var(${Ks},calc(50% - 50vw))`,l4=`var(${Vs},100vw)`,s4=`mx-[var(${Ks},calc(50%_-_50vw))]`,i4=`w-[var(${Vs},100vw)]`,Xs="--sf-hero-chrome-x",Ys="--sf-hero-chrome-cap";function f4(e){return e===!0?{[cm]:an,[Ks]:"auto",[Vs]:"100%",[Xs]:"24px",[Ys]:"none"}:{}}var Zs=`calc(${rn} - ${Ve}*2)`,c4=`max-w-[${Zs.replace(/ /g,"_")}]`;var zw="--sf-chrome-cap",Uw=`var(${zw},${Zs})`,d4="data-page-width";function u4(e){return e==="full"?"full":null}function p4(e){return e==="full"?null:sm(e==="content"?Zs:Uw)}function m4(e){if(e==="full")return"full";if(e==="content")return"content"}var qw=["contained","page","full"],dm=["full","page"],Lr={full:"Full width",page:"Content width"},Qs="inherit",$w=e=>typeof e=="string"&&qw.includes(e),jw=e=>e===Qs;function Js(e,o){let t=typeof e.pageWidth=="number"?e.pageWidth:Ne.default;return jw(e.widthMode)?{mode:"full",pageWidth:t,inherited:!0}:e.widthMode==="contained"?{mode:"page",pageWidth:t,inherited:!1}:$w(e.widthMode)?{mode:e.widthMode,pageWidth:t,inherited:!1}:e.contained===!0?{mode:"page",pageWidth:t,inherited:!1}:typeof e.fullWidth=="boolean"?{mode:e.fullWidth?"full":"page",pageWidth:t,inherited:!1}:e.contained===!1?{mode:"full",pageWidth:t,inherited:!1}:{mode:o,pageWidth:t,inherited:o==="full"}}function ei(e){return Js(e,"page").mode==="full"}import{jsx as Kw}from"react/jsx-runtime";import{createContext as Vw,useContext as Xw}from"react";var Yw=2,Zw=Yw+1,um=Vw(2);function pm({tier:e,children:o}){return Kw(um.Provider,{value:e,children:o})}function oi(e){let o=Xw(um);return Zw+Math.max(0,e-o)}import{withStyleKind as V0}from"efficient-easel/style-clipboard";function Mt(e){for(let[o,t]of Object.entries(e))t&&typeof t=="object"&&!vo(t)&&V0(t,`section:${o}`);return e}function Lm(){return null}function ai(e){if(!e.trim())throw new Error("noGlyph() needs a reason naming the ruling that decided it.");return I(Lm,{},e)}function X0(e){return e.type===Lm}function Zo(e){return X0(e)?void 0:e}function Dt(e,o){return l("{value} from {from}",{value:e,from:o})}function Y0(){let{appState:e}=Nt(a=>a),o=e.data.root?.props??{},{mode:t,pageWidth:r}=Js(o,"full");return t==="page"?Dt(`${r}px`,l("the page")):t==="contained"?Dt(l("Contained"),l("the page")):Dt(l("Full"),l("the page"))}function Z0(){let{blockGap:e}=re();return e===null?l("this container's own spacing"):Dt(`${e}px`,l("Site styles"))}function Q0({inherited:e,onReset:o,label:t}){return I(lo,{words:ee()?.panel,label:l(t),changed:!e,detail:Z0(),onReset:o})}function J0({inherited:e,onReset:o,label:t}){return I(lo,{words:ee()?.panel,label:l(t),changed:!e,detail:Y0(),onReset:o})}function Ht({value:e,onChange:o,label:t,placeholder:r,hint:a,multiline:n,hideable:s=!0,markup:i=!0}){let{text:c,hidden:u}=Ue(e),p=ri(null),m=ri(null),x=S=>o(s?{text:S,hidden:u}:S),g=()=>o({text:c,hidden:!u}),C=s&&u,w=e0(),b=a?ak(a)?I("span",{className:"sf-hint-keep sf-hint-while-typing",children:l(a)}):I(Iu,{children:l(a)}):void 0,v=u?l("Show {label} on the slide",{label:l(t)}):l("Hide {label} on the slide",{label:l(t)});return I(ie,{label:l(t),icon:I(E0,{}),htmlFor:w,className:C?"is-hidden":void 0,hint:b,action:s?I(sn,{content:v,children:I("button",{type:"button",className:"sf-field-eye","aria-pressed":u,"aria-label":v,onClick:g,children:u?I(ze,{name:"eye-off",size:14}):I(ze,{name:"eye",size:14})})}):void 0,children:_t("div",{className:"sf-copybox",children:[i&&I(hs,{target:n?m:p,value:c,onChange:x}),n?I("textarea",{id:w,ref:m,value:c,placeholder:r===void 0?void 0:l(r),onChange:S=>x(S.target.value)}):I("input",{id:w,ref:p,type:"text",value:c,placeholder:r===void 0?void 0:l(r),onChange:S=>x(S.target.value)})]})})}function k3(e,o){return{...e,[gr]:o}}function T3(e){let o=e[Se];if(!o)throw new Error("withOffPage: the field holds no authored text");return{...e,[Se]:{...o,offPage:!0}}}function fn(e){return!e||typeof e!="object"?!1:e[Se]?.offPage===!0}var Rm="sfPanelOnly";function F3(e){if(!e[Se])throw new Error("withPanelOnly: the field holds no authored text");return{...e,[Rm]:!0}}function Om(e){return!!e&&typeof e=="object"&&e[Rm]===!0}function E3(e){let o=e[Se];if(!o)throw new Error("withIdentifier: the field holds no authored text");return{...e,[Se]:{...o,identifier:!0}}}function L3(e,o){if(!e[Se])throw new Error("inOwnBox: the field holds no authored text");let{[Hu]:t,...r}=e;return{...r,[bs]:!0,render:o}}var ek=new Set(ut),Wt=(e,o)=>{let t={...o,[Se]:e};if(!ek.has(e.control))return t;let r=o.render;return{...Wa(t,"authored-copy"),render:a=>I($u,{name:a.name,children:r(a)})}},R3="Everything else on this block comes from the linked post. Unlink it to edit by hand.",ok="Select a word, then press the highlighter.",tk="A short name so a link can jump straight to this section, like yoursite.com/page#about.",rk=new Set([ok]),ak=e=>rk.has(e);function O3(e,o,t){return Wt({control:"text",label:e,placeholder:o,hint:t},{type:"custom",render:({value:r,onChange:a})=>I(Ht,{value:r,onChange:a,label:e,placeholder:o,hint:t})})}function A3(e,o,t){return Wt({control:"textarea",label:e,placeholder:o,hint:t},{type:"custom",render:({value:r,onChange:a})=>I(Ht,{value:r,onChange:a,label:e,placeholder:o,hint:t,multiline:!0})})}function nk(e,o,t){return Wt({control:"plainText",label:e,placeholder:o,hint:t},{type:"custom",render:({value:r,onChange:a})=>I(Ht,{value:r,onChange:a,label:e,placeholder:o,hint:t,hideable:!1,markup:!1})})}function B3(e,o,t){return Wt({control:"copyText",label:e,placeholder:o,hint:t},{type:"custom",render:({value:r,onChange:a})=>I(Ht,{value:r,onChange:a,label:e,placeholder:o,hint:t,hideable:!1})})}function D3(e){return{type:"custom",[hr]:{label:e},render:({value:o,onChange:t})=>I(Ep,{value:Vd(o),onChange:t,label:e})}}function _3(e,o,t){return Wt({control:"plainTextarea",label:e,placeholder:o,hint:t},{type:"custom",render:({value:r,onChange:a})=>I(Ht,{value:r,onChange:a,label:e,placeholder:o,hint:t,multiline:!0,hideable:!1})})}var Am={Design:o0,Animation:ym};function Bm(e,o){return e.includes("Design")?o!=="Design":null}function lk({label:e}){return I(R0,{title:l(e),level:oi(1)})}function sk({level:e,label:o}){return e===1?I(lk,{label:o}):I(Or,{label:o})}function Dm(e,o){return{type:"custom",[La]:{label:e,level:o},render:()=>I(sk,{level:o,label:e})}}function Xe(e){return Dm(e,2)}function N3(e){return{type:"custom",render:()=>I(ik,{text:e})}}function ik({text:e}){return I("p",{className:"sf-note",children:l(e)})}function M3(e){return Dm(e,1)}function H3(e){return vo(e)!==null&&e?.tabs!==void 0}var mm=new Map;function cn(e,o){let t=`${e}\0${o?o.join(""):""}`,r=mm.get(t)??{type:"custom",tabs:o,[La]:{label:e,level:1},bucket:e,marker:!0,render:()=>I(Yo,{})};return mm.set(t,r),r}var xm=new Map;function ni(e){let o=xm.get(e)??{type:"custom",[La]:{label:e,level:1},designGroup:e,marker:!0,...e==="Content"?{}:{fold:e},render:()=>I(Yo,{})};return xm.set(e,o),o}function fk(e){let o=e;return o?.marker===!0&&typeof o.fold=="string"?o.fold:null}function _m(e,o){return fk(e)===o?e:{...e,marker:!0,fold:o,render:()=>I(Yo,{})}}function Nm(e){let o=e;if(o.marker===!0&&o.fold===void 0)return e;let{fold:t,...r}=e;return{...r,marker:!0,render:()=>I(Yo,{})}}function Or({label:e}){return I(O0,{title:l(e),level:oi(2)})}function Mm({swatches:e,current:o,onPick:t,names:r}){let a=e.find(i=>i.toLowerCase()===o.toLowerCase()),n=a?r?.[a]:void 0,s=n?l(n):o;return _t("div",{className:"sf-swatches",children:[e.map(i=>{let c=r?.[i]?l(r[i]):i;return I(sn,{content:c,children:I("button",{type:"button","aria-pressed":o.toLowerCase()===i.toLowerCase(),className:`sf-swatch ${o.toLowerCase()===i.toLowerCase()?"is-active":""}`,style:{background:i},onClick:()=>t(i),"aria-label":c})},i)}),I("span",{className:"sf-swatch-hex",children:s})]})}function W3(e,o){return{type:"custom",render:({value:t,onChange:r})=>{let a=om(t,o);return I(ie,{label:l(e),icon:I(n0,{}),changed:!a,action:I(lo,{words:ee()?.panel,label:l(e),changed:!a,detail:l("the theme's section background"),onReset:()=>r(Ja)}),children:Mm({swatches:Jp,current:a?Qa:t??o??"",onPick:r,names:em})})}}}function ck(e,o){return{type:"custom",render:({value:t,onChange:r})=>{let a=t,n=am(a,o);return I(ie,{label:l(e),icon:I(g0,{}),changed:!n,action:I(lo,{words:ee()?.panel,label:l(e),changed:!n,detail:l("the theme's image stage"),onReset:()=>r(Pr)}),children:Mm({swatches:tm,current:n?At:js(a,o),onPick:r,names:rm})})}}}function dn(e=t=>t,o){return Mt({_gSectionTheme:Xe(yu),sectionAccent:{type:"custom",render:({value:t,onChange:r})=>I(mp,{value:e(t),onChange:r,followLabel:o})}})}function qe({min:e,max:o,step:t,value:r,onChange:a,suffix:n="",readout:s=!0,notch:i,ariaLabel:c,disabled:u=!1}){let p=i!==void 0&&Number.isFinite(i)&&i>=e&&i<=o;return I("div",{className:p?"sf-slider has-notch":"sf-slider",style:p?{"--sf-notch":(i-e)/(o-e)}:void 0,children:I(K0,{min:e,max:o,step:t,value:r,suffix:n||void 0,showInput:s,label:c===void 0?void 0:l(c),disabled:u,size:"sm",className:"sf-slider-track",onChange:m=>{m!==null&&m!==r&&a(m)}})})}function Bt(e,o,t,r,a,n,s="",i){return{type:"custom",render:c=>I(ie,{label:l(e),icon:Zo(o),action:i?i("storedValue"in c?c.storedValue:c.value,c.onChange):void 0,children:qe({min:t,max:r,step:a,value:typeof c.value=="number"?c.value:n,suffix:s,ariaLabel:e,onChange:c.onChange})})}}function Hm(e,o){let{min:t,max:r,step:a=1,unsetLabel:n,hint:s,restTrack:i,unsetMark:c,icon:u}=o;return{type:"custom",render:({value:p,onChange:m})=>{let x=typeof p=="number"?p:null,g=x===null;return I(ie,{label:l(e),icon:u?Zo(u):void 0,value:g?c||n===void 0?void 0:l(n):`${x}px`,changed:!g,action:c?gm(c,{changed:!g,onReset:()=>m(null)}):I(lo,{words:ee()?.panel,label:l(e),changed:!g,onReset:()=>m(null)}),hint:typeof s=="string"?l(s):s,children:i?i({min:t,max:r,step:a,px:x,label:e,onChange:m}):qe({min:t,max:r,step:a,value:x??t,readout:!1,ariaLabel:e,onChange:m})})}}}function G3(e){let o=Bt("Gap",I(Cm,{}),Ko.min,Ko.max,Ko.step,Ot[e],"px",(t,r)=>I(Q0,{inherited:!$s(e,t),onReset:()=>r(void 0),label:"Gap"}));return{type:"custom",[Yp]:e,render:t=>o.render({...t,value:qs(e,t.value,t.field?.siteGap),storedValue:t.value,onChange:r=>t.onChange(r)})}}var un="Corners";function li(e){return{type:"custom",render:({value:o,onChange:t})=>{let r=typeof o=="number"&&Number.isFinite(o)?o:null,a=r!==null;return I(ie,{label:l(un),icon:I(c0,{}),changed:a,action:gm(e.mark,{changed:a,onReset:()=>t(null)}),hint:e.hint,children:I(dk,{tier:e,px:r,onRadius:t})})}}}function Wm(e){let o=null;try{o=bm()}catch{o=null}return[o?.values?.[e],t=>o?.onChange(e,t)]}function dk({tier:e,px:o,onRadius:t}){let r=e.useFollowed(),a=e.useClosedReason?e.useClosedReason():null,[n,s]=Wm(e.sidesKey),i=wo(n)??[...zo];return I(q0,{label:l(un),value:i,corners:Vl,onChange:c=>{let u=wo(c)??[];s(u.length===zo.length?null:u)},radius:o,onRadiusChange:t,radiusMin:ro,radiusMax:nt,radiusStep:e.step??1,radiusPlaceholder:String(r),disabled:a!==null,disabledReason:a??void 0})}function Gm(){return Wa({type:"custom",render:()=>I(vr,{})},"always")}function uk({label:e,changed:o=!1,onReset:t=()=>{}}){let{cornerRadiusPx:r}=re(),a=typeof r=="number"?`${r}px`:l("not set");return I(lo,{words:ee()?.panel,label:l(e),changed:o,detail:r==null?l("the built-in corners"):Dt(a,l("Site styles")),onReset:t})}function pk(){let{cornerRadiusPx:e}=re();return typeof e=="number"?e:ro}function mk(){return li({sidesKey:"sectionCornerSides",useFollowed:pk,useClosedReason:()=>Um()?l(zm):null,mark:I(uk,{label:un}),hint:I(xk,{})})}var zm="This section runs edge to edge, so its corners sit off the page. Set Width to Content width to use them.";function Um(){return ei(Ar())}function xk(){return I(Yo,{children:Um()?zm:"Follows Site styles \u25B8 Basics \u25B8 Corners until you set a number here."})}function pn(){return Mt({_gShape:Xe("Shape"),sectionCorners:mk(),sectionCornerSides:Gm(),sectionBorder:Im("desktop"),sectionBorderPhone:Im("mobile")})}var Ik=()=>({width:l("Border width"),sides:{top:l("Border top"),right:l("Border right"),bottom:l("Border bottom"),left:l("Border left")},style:l("Border style"),styles:{solid:l("Solid"),dashed:l("Dashed"),dotted:l("Dotted")},color:l("Border color"),unit:"px"});function hk(e){let o=Object.fromEntries(Object.entries(e).filter(([,t])=>t!=null&&t!==""));return Object.keys(o).length?o:void 0}function gk(){let e;try{let o=co(re().theme);e=o.themes[o.selected]?.line}catch{e=void 0}return e||rd.line}function bk({value:e,onChange:o,tier:t}){let[r]=Wm("sectionBorder"),a=gk(),n=e&&typeof e=="object"?e:{},s=t==="mobile"?r&&typeof r=="object"?r:{}:{},[i,c]=ln(()=>H0(n,s)),u=Ik();return I(ie,{label:l("Border"),icon:I(l0,{}),action:I(Pm,{each:i,label:l("Each side"),onChange:c}),children:I(A0,{label:l("Border"),value:n,each:i,onChange:p=>o(hk(p)),placeholder:{sides:M0(s),style:s.style??"solid",color:s.color||a},presets:[a],words:u,max:20})})}function Im(e){return _e(e,{type:"custom",render:({value:o,onChange:t})=>I(bk,{value:o,onChange:t,tier:e})})}function mn(){return{_gMotion:Xe("Motion"),sectionAnimation:fi("Entrance",I(ym,{}),[...Cu],ls)}}function si(){let e=null;try{let{appState:o,selectedItem:t}=Nt(a=>a),r=t?.props?.id?String(t.props.id):void 0;e=r?is(o?.data,r):null}catch{e=null}return e!==null&&ei(e)}function qm(e){let{cornerRadiusPx:o}=re(),t=si(),r=typeof o=="number"?o:e,a=null;try{let{appState:s,selectedItem:i}=Nt(u=>u),c=i?.props?.id?String(i.props.id):void 0;a=c?is(s?.data,c):null}catch{a=null}if(t||!a)return r;let n=a.sectionCorners;return Kl(n)?n:r}function yk({label:e,changed:o=!1,onReset:t=()=>{}}){let r=si(),a=qm(ro),n=r?"Site":"Section";return I(lo,{words:ee()?.panel,label:l(e),changed:o,detail:Dt(`${a}px`,r?l("Site styles"):l("the section")),onReset:t})}function Sk(){return I(Yo,{children:si()?l("The section is full width, so this card follows Site styles \u25B8 Basics \u25B8 Corners."):l("Follows the section's Corners until you set a number here.")})}function Ck(){return li({sidesKey:"cardCornerSides",useFollowed:()=>qm(ro),mark:I(yk,{label:un}),hint:I(Sk,{})})}function vk(){return{type:"custom",render:()=>I(au,{})}}function z3(){return{_gShape:Xe("Shape"),cardCorners:Ck(),cardCornerSides:Gm(),cardCornersApplyAll:vk()}}function U3(){return Xo("Justify",I(a0,{}),Hs,Hs[0].value)}function q3(){return Xo("Item alignment",I(t0,{}),Gp,"stretch")}function $3(){return Xo(zp,I(L0,{}),Ws,Ws[0].value)}function j3(){return{type:"custom",render:({value:e,onChange:o})=>{let t=Za.find(r=>r.value===e)??Za[0];return I(ie,{label:l(Gs),icon:I(Sm,{}),value:l(t.label),children:I("div",{className:"sf-gallery-layouts",role:"group","aria-label":l(Gs),children:Za.map(r=>I(sn,{content:l(r.label),className:"sf-tile-tip",children:I("button",{type:"button","aria-pressed":t.value===r.value,"aria-label":l(r.label),onClick:()=>o(r.value),children:I("span",{className:"sf-gallery-pic",children:wk(r.weights).map((a,n)=>I("i",{style:{gridColumn:`span ${a}`}},n))})})},r.value))})})}}}function wk(e){if(!e)return[3,4];let o=e.reduce((t,r)=>t+r,0);return e.map(t=>Math.round(t/o*12))}function K3(){return Xo($p,I(Cm,{}),Us,Us[0].value)}function V3(){return Bt(Up,I(v0,{}),zs,qp,1,zs)}function X3(e){let o=fi(_p,ai("`Direction` names how a container's children run \u2014 a MODIFIER, not a thing. doc/naming.md N10.1 gives the idea a dash in its Glyph column; editor-shell's own `direction` meaning says the bare row is CORRECT and not an omission (SS seat, 2026-09-11)."),Mp(e),Ya(e,void 0));return{type:"custom",render:t=>o.render({...t,value:Ya(e,t.value),onChange:r=>t.onChange(r)})}}function Y3(e,o,t,r,a,n){return{type:"custom",render:({value:s,onChange:i})=>I(ie,{label:l(e),icon:I(ts,{noun:n}),action:I(lo,{words:ee()?.panel,label:l(e),changed:!lm(s),detail:l("the Text style in Site styles"),onReset:()=>i(nm),defaultAction:{onPress:()=>i(tn),title:l("Keep this section's own built-in size"),icon:I(s0,{})}}),children:qe({min:o,max:t,step:r,value:typeof s=="number"?s:a,suffix:"px",ariaLabel:e,onChange:i})})}}function Z3(){return{_gCellWidth:Xe("Cell width"),gridSpan:Xo("Positions",I(Sm,{}),[{label:"Auto",value:""},...Array.from({length:Aa},(e,o)=>({label:o===0?"1 position":`${o+1} positions`,value:String(o+1)}))],"")}}function Ar(){let e=null;try{e=Nt(o=>o).selectedItem}catch{e=null}return e?.props??{}}function kk({min:e,max:o,step:t,px:r,label:a,onChange:n,desktopKey:s,fallback:i}){let c=Ar()[s],u=Ga(void 0,c,i);return I(Yo,{children:qe({min:e,max:o,step:t,value:Ga(r,c,i),readout:!1,ariaLabel:a,notch:u,onChange:n})})}function Tk({label:e,desktopKey:o,fallback:t,changed:r=!1,onReset:a=()=>{}}){let n=Ar()[o],s=Ga(void 0,n,t);return I(lo,{words:ee()?.panel,label:l(e),changed:r,detail:l("{value} on desktop",{value:`${s}px`}),onReset:a})}function Fk(e){return Hm(e.label,{icon:e.icon,min:e.min,max:e.max,step:e.step,unsetLabel:"Follows Desktop",unsetMark:I(Tk,{label:e.label,desktopKey:e.desktopKey,fallback:e.fallback}),restTrack:o=>I(kk,{...o,desktopKey:e.desktopKey,fallback:e.fallback})})}var Ek={Top:"Padding top",Bottom:"Padding bottom",Left:"Padding left",Right:"Padding right"},Pk={Top:Fm,Bottom:wm,Left:km,Right:Tm},Lk=e=>{let o=Pk[e];return I(o,{})};function Q3(e={}){let o=e.keys?.top??"sectionPaddingTop",t=e.keys?.bottom??"sectionPaddingBottom",r=e.group!==!1,a=b=>Ek[b],n=b=>Bt(a("Top"),I(Fm,{}),mo.min,mo.max,mo.step,b,"px"),s=(b,v,S,h=mo)=>_e("mobile",Fk({label:a(b),icon:Lk(b),desktopKey:v,min:h.min,max:h.max,step:h.step,fallback:S})),i=e.top??mo.min,c=e.bottom??mo.min,u="sectionPaddingLeft",p="sectionPaddingRight",m=e.sideBounds??mo,x=e.side??m.min,g=e.sidePhone??x,C=e.phone===!0,w=b=>C?_e("desktop",b):b;return Mt({...r?{_gSpacing:Xe("Padding")}:{},[o]:w(n(i)),...C?{[dt(o)]:s("Top",o,i)}:{},...e.only==="top"?{}:{[t]:w(Bt(a("Bottom"),I(wm,{}),mo.min,mo.max,mo.step,c,"px")),...C?{[dt(t)]:s("Bottom",t,c)}:{}},...e.sides?{[u]:w(Bt(a("Left"),I(km,{}),m.min,m.max,m.step,x,"px")),...C?{[dt(u)]:s("Left",u,g,m)}:{},[p]:w(Bt(a("Right"),I(Tm,{}),m.min,m.max,m.step,x,"px")),...C?{[dt(p)]:s("Right",p,g,m)}:{}}:{}})}var Rr=["top","right","bottom","left"],Rk={top:"sectionPaddingTop",right:"sectionPaddingRight",bottom:"sectionPaddingBottom",left:"sectionPaddingLeft"},hm=e=>typeof e=="number"?e:null;function Ok(e,o,t){let r={};for(let a of Rr)t[a]!==o[a]&&(r[e[a]]=t[a]??void 0);return r}function Ak({tier:e,o}){let t=null;try{t=bm()}catch{t=null}let r=t?.values??{},a=e==="mobile"?o.phoneKeys:o.keys,n=Object.fromEntries(Rr.map(u=>[u,hm(r[a[u]])])),s=Object.fromEntries(Rr.map(u=>[u,String(e==="mobile"?hm(r[o.keys[u]])??o.fallback[u]:o.fallback[u])])),[i,c]=ln(()=>_0(n,s));return I(ie,{label:l("Padding"),icon:I(C0,{}),action:I(Pm,{each:i,label:l("Each side"),onChange:c}),children:I(D0,{label:l("Padding"),each:i,value:n,placeholder:s,min:o.min,max:o.max,step:o.step,onChange:u=>{let p=Ok(a,n,u);Object.keys(p).length&&t?.onChangeMany(p)},words:{sides:{top:l("Padding top"),right:l("Padding right"),bottom:l("Padding bottom"),left:l("Padding left")},vertical:l("Top and bottom"),horizontal:l("Left and right"),unit:"px"}})})}function xn(e={}){let o={...Rk,...e.keys},t={keys:o,phoneKeys:Object.fromEntries(Rr.map(i=>[i,dt(o[i])])),fallback:{top:0,right:0,bottom:0,left:0,...e.fallback},min:e.min??0,max:e.max??200,step:e.step??4},r=e.phone!==!1,a=i=>{let c={type:"custom",render:()=>I(Ak,{tier:i,o:t})};return r?_e(i,c):c},n=()=>Wa({type:"custom",render:()=>I(vr,{})},"always"),s=Rr.filter(i=>i!=="top");return Mt({...e.group===!1?{}:{_gSpacing:Xe("Padding")},[t.keys.top]:a("desktop"),...r?{[t.phoneKeys.top]:a("mobile")}:{},...Object.fromEntries(s.map(i=>[t.keys[i],{...n(),reachedBy:t.keys.top}])),...r?Object.fromEntries(s.map(i=>[t.phoneKeys[i],_e("mobile",n())])):{}})}var Bk={contained:"Contained",page:"Page",full:"Full"},nn="Width";function In(e,o=dm,t=!0){let r=o.map(a=>({label:Lr[a]??Bk[a],value:a}));return Mt({...t?{_gWidth:Xe(nn)}:{},widthMode:{type:"custom",render:({onChange:a,field:n})=>I(ie,{label:l(nn),icon:I(P0,{}),action:t?I(J0,{inherited:n?.inherited??!1,onReset:()=>a(Qs),label:nn}):void 0,children:ii({options:r,value:n?.currentValue||e,onChange:a,ariaLabel:nn})})}})}function hn(){let e=r=>({type:"custom",render:({value:a,onChange:n})=>I(ie,{label:Rt,icon:Zo(I(b0,{})),action:r?r(n):void 0,children:ii({options:[{label:"Auto",value:"auto"},{label:"Fixed",value:"fixed"},{label:"Screen",value:"screen"}],value:["auto","fixed","screen"].includes(a)?a:"auto",onChange:n,ariaLabel:Rt})})}),o=()=>({type:"custom",render:({value:r,onChange:a,field:n})=>{let s=n?.unit==="%"?"%":"px",i=s==="%"?Ns:_s;return I("div",{className:"sf-field",children:qe({min:i.min,max:i.max,step:i.step,value:typeof r=="number"?r:i.fallback,suffix:s,ariaLabel:Rt,onChange:a})})}}),t=()=>fi("Unit",I(vm,{}),[{label:"px",value:"px"},{label:"%",value:"%"}],"px");return Mt({_gHeight:Xe(Rt),sectionHeightMode:_e("desktop",e()),sectionHeightValue:_e("desktop",o()),sectionHeightUnit:_e("desktop",t()),sectionHeightModePhone:_e("mobile",e(r=>I(Dk,{onClear:()=>r(void 0)}))),sectionHeightValuePhone:_e("mobile",o()),sectionHeightUnitPhone:_e("mobile",t())})}function Dk({onClear:e}){let o=Ar(),t=Ms(o),r=Xa(o),a=l("{value} on desktop",{value:r.mode==="auto"?l("Auto"):`${r.value}${r.unit}`});return I(lo,{words:ee()?.panel,label:l(Rt),changed:t,detail:a,onReset:e})}function gn(){return{_gAnchor:Xe("Anchor"),anchor:nk("Anchor name","e.g. about",tk)}}function J3(e,o,t){return{type:"custom",render:({value:r,onChange:a,id:n,name:s})=>{let i=`${n??s??e}-datetime`,c=Date.parse(typeof r=="string"?r:"");return I(ie,{label:l(e),icon:o,htmlFor:i,hint:t===void 0?void 0:l(t),children:I($0,{id:i,value:Number.isFinite(c)?new Date(c):null,onChange:u=>a(u?u.toISOString():"")})})}}}function It(e,o,t){return{type:"custom",render:({value:r,onChange:a,id:n,name:s})=>{let i=typeof r=="boolean"?r:o,c=`${n??s??e}-label`;return I(ie,{label:l(e),labelId:c,icon:t,action:I(N0,{checked:i,onChange:a,ariaLabelledBy:c})})}}}function e6(){return{type:"custom",render:({value:e,onChange:o,id:t,name:r})=>{let a=`${String(t??r??"pageBackground")}-colour`;return I(ie,{label:l("Background"),icon:I(Em,{}),htmlFor:a,action:I(po,{id:a,label:"Background",value:rs(e),onChange:o})})}}}function o6(e,o){return{type:"custom",render:({value:t,onChange:r})=>I(ie,{label:l(e),action:po({value:t||o,onChange:r,label:e})})}}var _k=[{value:"0% 0%",label:"Top left"},{value:"50% 0%",label:"Top"},{value:"100% 0%",label:"Top right"},{value:"0% 50%",label:"Left"},{value:"50% 50%",label:"Center"},{value:"100% 50%",label:"Right"},{value:"0% 100%",label:"Bottom left"},{value:"50% 100%",label:"Bottom"},{value:"100% 100%",label:"Bottom right"}];function $m({label:e,value:o,onChange:t,points:r=_k}){let a=r.map(n=>({...n,label:l(n.label),...n.title?{title:l(n.title)}:null}));return I(U0,{label:l(e),value:o,points:a,onChange:t})}function t6(e,o=j0,t="mediaImage"){return{type:"custom",render:({value:r,onChange:a})=>I("div",{className:"sf-focal-row",children:I(Nk,{label:e,value:r||o,onChange:a,imageProp:t})})}}function Nk({label:e,value:o,onChange:t,imageProp:r}){let{selectedItem:a}=Nt(s=>s),n=a?.props?.[r];return I(Xu,{label:e,value:o,onChange:t,image:typeof n=="string"?n:void 0})}var Mk=Jl([]);function r6(e,{stacking:o,fallback:t=Ba}){return{type:"custom",render:({value:r,onChange:a})=>{let n=uo.includes(r)?r:t;return o?I(Hk,{label:e,value:n,onChange:a}):jm({label:e,value:n,onChange:a,points:Mk})}}}function Hk({label:e,value:o,onChange:t}){let{appState:r,selectedItem:a}=Nt(i=>i),n=a?.props?.id?String(a.props.id):void 0,s=n?os(r?.data,n):[];return jm({label:e,value:o,onChange:t,points:Jl(s,n)})}function jm({label:e,value:o,onChange:t,points:r}){let a=r.find(n=>n.disabled);return I(ie,{label:l(e),icon:I(w0,{}),hint:a?.title?l(a.title):void 0,children:$m({label:e,value:it(o),onChange:t,points:r})})}var a6={top:I(m0,{}),right:I(p0,{}),bottom:I(d0,{}),left:I(u0,{})};function n6(e,o,t,r,a,n){let s=p=>o.find(m=>m.value===p),i=p=>({value:p,label:"",disabled:!0,title:r}),c=p=>{let m=o.find(g=>g.cell===p);if(!m)return i(`missing-${p}`);let x=n?.[p];return x?{value:m.value,label:m.label,icon:x}:{value:m.value,label:m.label}},u=[i("corner-top-left"),c("top"),i("corner-top-right"),c("left"),i("centre"),c("right"),i("corner-bottom-left"),c("bottom"),i("corner-bottom-right")];return{type:"custom",render:({value:p,onChange:m})=>{let x=o.some(g=>g.value===p)?p:t;return I(ie,{label:l(e),icon:a,value:s(x)?.label?l(s(x).label):"",children:$m({label:e,value:x,onChange:m,points:u})})}}}var Wk="\0note";function Xo(e,o,t,r,a){return{type:"custom",options:t,fallback:r,...a?{note:a}:{},render:({value:n,onChange:s,field:i})=>{let c=i.options??t,u=i.fallback??r,p=c.some(m=>m.value===n)?n:u;return I(ie,{label:l(e),icon:Zo(o),children:I(W0,{value:p,ariaLabel:l(e),onChange:s,options:[...a?[{label:l(a),value:Wk,disabled:!0}]:[],...c.map(m=>({label:l(m.label),value:m.value}))]})})}}}function l6(e,o,t){return{type:"custom",options:o,render:({value:r,onChange:a,field:n})=>I(rp,{label:e,options:(n.options??o).map(s=>({...s,label:l(s.label)})),value:Array.isArray(r)?r:[],onChange:a,...t?{emptyLabel:l(t)}:{}})}}function s6(e,o={}){return{type:"custom",render:({value:t,onChange:r})=>{let a={value:t,onChange:r,...o};return I(e,{...a})}}}function ii({options:e,value:o,onChange:t,ariaLabel:r,disabled:a=!1}){return I(B0,{options:e.map(n=>n.picture?{id:n.value,label:n.picture,title:l(n.title??n.label)}:{id:n.value,label:l(n.label),title:n.title===void 0?void 0:l(n.title)}),value:o,onChange:t,ariaLabel:l(r),disabled:a})}var i6=[{label:"Image",value:"image"},{label:"Video",value:"video"}];function fi(e,o,t,r){let a=t.map(n=>typeof n=="string"?{label:n,value:n}:n);return{type:"custom",render:({value:n,onChange:s,field:i})=>I(ie,{label:l(e),icon:Zo(o),children:ii({options:a,value:a.some(c=>c.value===n)?n:n||i?.currentValue||r,onChange:s,ariaLabel:e})})}}function f6(e,o,t){return{type:"custom",[Xd]:!0,render:({value:r,onChange:a})=>I(op,{value:r||"",onChange:a,label:e,accept:o,placeholder:t})}}function c6({value:e,onChange:o,label:t}){let r=e||{},a=!!r.pending,n=a?"var(--fg-dim, #888)":r.ok?"#1d9e75":"#d85a30",s=(i,c)=>o({...r,[i]:c===""?void 0:Number(c)});return _t(ie,{label:l(t),icon:I(ti,{}),children:[I("button",{type:"button",disabled:a,onClick:()=>o({...r,pending:!0,ok:!1,status:"Finding\u2026"}),style:{width:"100%",display:"flex",alignItems:"center",justifyContent:"center",gap:6,padding:"8px 10px",fontSize:13,cursor:a?"default":"pointer",opacity:a?.6:1,border:"1px solid var(--border-strong, #ccc)",borderRadius:6,background:"transparent",color:"inherit"},children:a?l("Finding\u2026"):l("Find coordinates")}),r.status&&I("div",{style:{marginTop:6,fontSize:12,lineHeight:1.4,color:n},children:l(r.status)}),I("div",{style:{marginTop:6,fontSize:11,color:"var(--fg-dim, #999)"},children:l("Coordinates from OpenStreetMap")}),I("button",{type:"button",onClick:()=>o({...r,manual:!r.manual}),style:{marginTop:8,padding:0,border:"none",background:"none",font:"inherit",fontSize:12,color:"var(--sf-accent, #2563eb)",cursor:"pointer",textDecoration:"underline"},children:r.manual?l("Hide manual coordinates"):l("Enter coordinates manually")}),r.manual&&_t("div",{style:{marginTop:8,display:"grid",gap:8},children:[I(ie,{label:l("Latitude"),icon:I(ti,{}),children:I("input",{type:"number",step:"any",placeholder:l("e.g. {example}",{example:"34.0990198"}),value:typeof r.lat=="number"?r.lat:"",onChange:i=>s("lat",i.target.value)})}),I(ie,{label:l("Longitude"),icon:I(ti,{}),children:I("input",{type:"number",step:"any",placeholder:l("e.g. {example}",{example:"-117.9842833"}),value:typeof r.lng=="number"?r.lng:"",onChange:i=>s("lng",i.target.value)})})]})]})}function Gk(e,o){return o===null||o<0||o>=e.length?"":e[o]?.text??""}function zk(e,o,t){let r=e.map(a=>({text:a?.text??""}));return o===null||o<0||o>=e.length?r:r.map((a,n)=>n===o?{text:t}:a)}function Uk(e,o,t){if(t===null||t>=o.length)return null;for(let r=0;r<t;r+=1)if(e[r]!==o[r])return null;return e[t]!==o[t]&&o.includes(e[t])||e[t]!==o[t]&&o.length!==e.length?null:t}var ci={label:"Ticker items",icon:I(S0,{})};function d6(e,o,t,r){return{type:"custom",[Se]:{control:"textList",label:e,placeholder:t,itemKey:"text",rendering:r},render:({value:a,onChange:n})=>I(di,{label:e,icon:Zo(o),items:Array.isArray(a)?a:[],placeholder:t,onChange:n,markup:r==="markup"})}}function di({label:e,icon:o,items:t,placeholder:r,onChange:a,markup:n=!1}){let s=ri(null),[i,c]=ln(null),u=m=>m.map(x=>({text:x?.text??""})),p=m=>{let x=Uk(t,m,i);x===null&&(s.current=null),c(x),a(u(m))};return I(G0,{label:l(e),icon:o,noun:l("item"),items:t,onChange:p,newItem:()=>({text:""}),open:null,onOpen:()=>{},renderItem:()=>null,above:n?I(hs,{target:s,value:Gk(t,i),onChange:m=>a(zk(t,i??-1,m)),disabled:i===null,label:i===null?l("Formatting \u2014 click a row first"):l("Formatting \u2014 row {n}",{n:i+1})}):void 0,renderRow:(m,x,g)=>I("input",{type:"text",className:n&&i===x?"sf-list-marking":void 0,value:m?.text??"",placeholder:l(r),"aria-label":l("{label} {n}",{label:l(e),n:x+1}),onChange:C=>g({text:C.target.value}),onFocus:C=>{s.current=C.currentTarget,c(x)}})})}function Km(e,o){let t=`${e.label} \u2014 row ${o+1}`;return Wt({control:"plainText",label:t,placeholder:e.placeholder,offPage:e.offPage},{type:"custom",render:({value:r,onChange:a})=>I(Ht,{value:r,onChange:a,label:l("{label} \u2014 row {n}",{label:l(e.label),n:o+1}),placeholder:e.placeholder,hideable:!1,markup:e.rendering==="markup"})})}function Vm(e){return{_gCards:Xe("Cards"),coverIndex:Xo("Cover image",I(y0,{}),Ku,String(1),e?.coverHint??"A card's opening picture \u2014 a card pinned to a finish keeps its own."),imageBackground:ck("Image background",on),cardImage:$k(),spinOnHover:It("Rotate on hover",e?.spinDefault??!0,I(T0,{}))}}function Xm(){return{outline:Xo("Card outline",I(F0,{}),Ts,ws),indexBadge:Xo("Card number",I(vm,{}),ks,vs),showBadge:It("Product badge",!0,I(ts,{noun:"tag"}))}}function Ym(e){let o=e?.bottomDefault??!0;return{_gShowOnCard:Xe("Show on a card"),showCardPrice:It("Price",!0,I(x0,{})),showCardFinishes:It("Finish swatches",!0,I(I0,{})),showCardSizes:It("Sizes",o,I(k0,{})),showCardBuy:It("Buy button",o,I(i0,{})),showCardPage:It("Page button",o,I(Em,{}))}}function u6(e,o="display"){let t=dt(o);return{[o]:_e("desktop",{type:"custom",render:({value:r,onChange:a})=>I(Zm,{parts:e,changed:wu(r),shown:n=>Ma(r,n),onPress:(n,s)=>a(Tu(r,n,s)),onReset:()=>a(void 0)})}),[t]:_e("mobile",{type:"custom",render:({value:r,onChange:a})=>I(qk,{parts:e,desktopKey:o,value:r,onChange:a})})}}function Zm({parts:e,changed:o,shown:t,onPress:r,onReset:a,detail:n}){let s=l("Display");return I(ie,{label:s,icon:I(r0,{}),changed:o,action:I(lo,{words:ee()?.panel,label:s,changed:o,detail:n,onReset:a}),children:I(z0,{label:s,items:e.map(i=>({id:i.id,label:l(i.label),shown:t(i.id)})),onChange:r})})}function qk({parts:e,desktopKey:o,value:t,onChange:r}){let a=Ar()[o];return I(Zm,{parts:e,changed:ku(t),shown:n=>fs(a,t,n),onPress:(n,s)=>r(Fu(t,n,s)),onReset:()=>r(Gu),detail:l("the same as Desktop")})}function $k(){return Hm("Card image",{min:ro,max:nt,step:nu,hint:"Rounds the picture. The card's own corner is in Site styles."})}function p6(){return li({sidesKey:"cornerSides",step:lu,useFollowed:()=>ro,mark:I(jk,{label:su}),hint:l("Rounds the picture. Left alone it stays square.")})}function jk({label:e,changed:o=!1,onReset:t=()=>{}}){return I(lo,{words:ee()?.panel,label:l(e),changed:o,onReset:t})}function m6(){return{type:"custom",render:({value:e,onChange:o})=>I(Kk,{value:typeof e=="string"?e:"",onChange:o})}}function Kk({value:e,onChange:o}){let[t,r]=ln(null),a=Yl.filter(s=>t===null||To[s].across===t),n=e&&e in To?To[e]:null;return _t(Yo,{children:[I(ie,{label:l("Photos in a row"),icon:I(f0,{}),children:_t("div",{className:"sf-gallery-filter",children:[I("button",{type:"button","aria-pressed":t===null,onClick:()=>r(null),children:l("All")}),fu.map(s=>I("button",{type:"button","aria-pressed":t===s,onClick:()=>r(s),children:s},s))]})}),I(ie,{label:l("Layout"),icon:I(h0,{}),value:n?l(n.label):l("Not chosen"),hint:l("{n} of {total} layouts",{n:a.length,total:Yl.length}),children:I("div",{className:"sf-gallery-layouts",children:a.map(s=>I(sn,{content:l(To[s].label),className:"sf-tile-tip",children:I("button",{type:"button","aria-pressed":e===s,"aria-label":l(To[s].label),onClick:()=>o(e===s?"":s),children:I("span",{className:"sf-gallery-pic",children:To[s].desktop.map(([i,c],u)=>I("i",{style:{gridColumn:`span ${i}`,gridRow:`span ${c}`}},u))})})},s))})})]})}import{jsx as bn,Fragment as Vk,jsxs as Qm}from"react/jsx-runtime";import{Button as Jm,Dialog as Xk}from"efficient-shell/ui";function Yk(e){return lt("This site has {n} color theme of its own. Clearing takes them away and puts back the four the shop supplies.","This site has {n} color themes of its own. Clearing takes them away and puts back the four the shop supplies.",e)}function ex({count:e,onCancel:o,onConfirm:t}){return Qm(Xk,{open:!0,onClose:o,role:"alertdialog",size:"sm",title:l("Clear this site\u2019s colors?"),footer:Qm(Vk,{children:[bn(Jm,{variant:"secondary",onClick:o,children:l("Cancel")}),bn(Jm,{variant:"danger",onClick:t,children:l("Clear colors")})]}),children:[bn("p",{children:Yk(e)}),bn("p",{className:"mt-2 font-medium",children:l("This cannot be undone.")})]})}var o1=ai("the row's whole content is an action; the gutter names a subject and this row has none \u2014 the button's label is the name GG, 2026-09-23");function t1(){return Qo("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",children:Qo("path",{d:"M12 5v14M5 12h14"})})}var r1="Reset color",a1={selected:0,themes:[]};function n1(e){e(a1)}function rx({value:e,onChange:o}){let t=e?.themes??[],r=t.length===0,a=co(e),[n,s]=tx(!1),i=e1(),[c,u]=tx(null),p=(v,S)=>{o({...a,themes:a.themes.map((h,k)=>k===v?S:h)})},m=ya(a).accent,x=new Set(a.themes.map(v=>v.brandInk).filter(Boolean)),g=ad.filter(v=>!x.has(v)).map(v=>nd(m,v)),C=[...a.themes,...g],w=v=>{if(v<a.themes.length)return o({...a,selected:v});let S=[...a.themes,C[v]];o({...a,themes:S,selected:S.length-1})},b=()=>{let v=[...a.themes,{...So(a.themes[a.selected])}];o({...a,themes:v,selected:v.length-1}),u(v.length-1)};return ox(Zk,{children:[r?null:Qo(Jk,{label:l(r1),icon:Zo(o1),labelId:"sf-theme-reset",action:Qo(Qk,{label:l("all theme colors"),words:i.panel,changed:!0,onReset:()=>s(!0)})}),n&&Qo(ex,{count:t.length,onCancel:()=>s(!1),onConfirm:()=>{s(!1),n1(o)}}),Qo("div",{className:"sf-theme-list",role:"radiogroup","aria-label":l("Theme"),children:C.map((v,S)=>Qo(Ua,{index:S,colors:v,selected:S===a.selected,open:c===S&&S<a.themes.length,editable:S<a.themes.length,onPick:()=>w(S),onEdit:()=>u(h=>h===S?null:S),onChangeColors:h=>p(S,h)},S))}),ox("button",{type:"button",onClick:b,className:"sf-theme-add",children:[Qo(t1,{}),l("Add new theme")]})]})}import{jsx as yn}from"react/jsx-runtime";import{SettingsDefaultReset as l1,SettingsField as s1}from"efficient-easel/panel";import{SquareIcon as i1}from"efficient-easel/icons";var f1="Applies to panels, cards, inputs and buttons. Round things \u2014 color swatches, switches, status dots \u2014 stay round.",ui="Corners";function ax({value:e,onChange:o,showHint:t=!0}){let r=e===null;return yn(s1,{label:l(ui),icon:yn(i1,{}),value:r?void 0:`${e}px`,changed:!r,action:yn(l1,{words:ee()?.panel,label:l(ui),changed:!r,detail:l("the built-in corners"),onReset:()=>o(null)}),hint:t?l(f1):void 0,children:yn(qe,{min:ro,max:nt,step:1,value:e??ro,readout:!1,ariaLabel:l(ui),onChange:o})})}import{jsx as Br}from"react/jsx-runtime";import{SettingsDefaultReset as c1,SettingsField as d1,SettingsSegmented as u1}from"efficient-easel/panel";import{ShadowIcon as p1}from"efficient-easel/icons";var pi={none:"None",soft:"Soft",lifted:"Lifted"},m1="Applies to cards \u2014 products, brands, journal entries and filter cells. Round things like swatches and status dots are never shadowed.",x1={none:"none",soft:"0 1px 1px rgba(20, 20, 22, 0.10), 0 2px 4px -1px rgba(20, 20, 22, 0.14)",lifted:"0 1px 2px rgba(20, 20, 22, 0.10), 0 4px 7px -2px rgba(20, 20, 22, 0.30)"},I1={labelsPx:90.25,widestLabelPx:34.6};function nx({value:e,onChange:o,showHint:t=!0}){let r=e===null,a=e??Bl;return Br(d1,{label:l("Card shadow"),icon:Br(p1,{}),value:l(pi[a]),changed:!r,action:Br(c1,{words:ee()?.panel,label:l("Card shadow"),changed:!r,detail:l(pi[Bl]),onReset:()=>o(null)}),hint:t?l(m1):void 0,children:Br(u1,{options:Id.map(n=>({id:n,label:l(pi[n]),icon:Br("span",{className:"sf-shadow-chip",style:{boxShadow:x1[n]}})})),value:a,ariaLabel:l("Card shadow"),fit:I1,onChange:o})})}import{jsx as mi}from"react/jsx-runtime";import{SettingsDefaultReset as h1,SettingsField as g1}from"efficient-easel/panel";import{ShadowIcon as b1}from"efficient-easel/icons";var y1="Most useful on a dark theme, where a black shadow cannot be seen. Also used by the Lift hover, even with the card shadow off.";function lx({value:e,onChange:o,showHint:t=!0}){let r=e===null;return mi(g1,{label:l("Shadow color"),icon:mi(b1,{}),changed:!r,action:po({value:e??"",inherited:r?_l:void 0,onChange:o,label:"Shadow color",after:mi(h1,{words:ee()?.panel,label:l("Shadow color"),changed:!r,detail:_l,onReset:()=>o(null)})}),hint:t?l(y1):void 0})}import{jsx as Sn}from"react/jsx-runtime";import{SettingsDefaultReset as S1,SettingsField as C1}from"efficient-easel/panel";import{AlignSeparateIcon as v1}from"efficient-easel/icons";var w1="The space between the blocks inside a row, a grid or a box. Default means each one keeps the spacing it already has.",xi="Block gap",k1=Ot.Grid;function sx({value:e,onChange:o,showHint:t=!0}){let r=e===null;return Sn(C1,{label:l(xi),labelId:"sf-block-gap",icon:Sn(v1,{}),value:r?void 0:`${e}px`,changed:!r,action:Sn(S1,{words:ee()?.panel,label:l(xi),changed:!r,detail:l("each block's own spacing"),onReset:()=>o(null)}),hint:t?l(w1):void 0,children:Sn(qe,{min:xt.min,max:xt.max,step:xt.step,value:r?k1:e,readout:!1,ariaLabel:l(xi),onChange:o})})}import{jsx as Cn}from"react/jsx-runtime";import{SettingsDefaultReset as T1,SettingsField as F1,SettingsSegmented as E1}from"efficient-easel/panel";import{HoverIcon as P1}from"efficient-easel/icons";var Ii={none:"None",lift:"Lift",highlight:"Highlight"},L1="What a card does when a shopper points at it \u2014 or taps it, on a phone. Highlight is the effect your cards already use.";function ix({value:e,onChange:o,showHint:t=!0}){let r=e===null,a=e??Dl;return Cn(F1,{label:l("Hover effect"),icon:Cn(P1,{}),value:l(Ii[a]),changed:!r,action:Cn(T1,{words:ee()?.panel,label:l("Hover effect"),changed:!r,detail:l(Ii[Dl]),onReset:()=>o(null)}),hint:t?l(L1):void 0,children:Cn(E1,{options:hd.map(n=>({id:n,label:l(Ii[n])})),value:a,ariaLabel:l("Hover effect"),onChange:o})})}import{jsx as vn}from"react/jsx-runtime";import{SettingsDefaultReset as R1,SettingsField as O1,SettingsSegmented as A1}from"efficient-easel/panel";import{ImageIcon as B1}from"efficient-easel/icons";var hi="Hero image",gi=[{followsWidth:!1,label:Lr.full},{followsWidth:!0,label:Lr.page}],D1="Whether the big picture at the top of a page runs edge to edge, or sits inside the page width. The words follow the page width either way.";function fx({value:e,onChange:o,showHint:t=!0}){let r=e===null,a=e??!1;return vn(O1,{label:l(hi),icon:vn(B1,{}),value:l(gi.find(n=>n.followsWidth===a).label),changed:!r,action:vn(R1,{words:ee()?.panel,label:l(hi),changed:!r,detail:l(gi.find(n=>!n.followsWidth).label),onReset:()=>o(null)}),hint:t?l(D1):void 0,children:vn(A1,{options:gi.map(n=>({id:n.followsWidth,label:l(n.label)})),value:a,ariaLabel:l(hi),onChange:o})})}import{jsx as wn}from"react/jsx-runtime";import{SettingsDefaultReset as _1,SettingsField as N1,SettingsSegmented as M1}from"efficient-easel/panel";import{DropIcon as H1}from"efficient-easel/icons";var bi="Photography",cx={shot:"As shot",mono:"Black and white"},yi=[{grayscale:!1,label:cx.shot},{grayscale:!0,label:cx.mono}],W1="Black and white photographs return to color on hover. Wheels and tyres keep their real finish either way.";function dx({value:e,onChange:o,showHint:t=!0}){let r=e===null,a=e??!1;return wn(N1,{label:l(bi),icon:wn(H1,{}),value:l(yi.find(n=>n.grayscale===a).label),changed:!r,action:wn(_1,{words:ee()?.panel,label:l(bi),changed:!r,detail:l(yi.find(n=>!n.grayscale).label),onReset:()=>o(null)}),hint:t?l(W1):void 0,children:wn(M1,{options:yi.map(n=>({id:n.grayscale,label:l(n.label)})),value:a,ariaLabel:l(bi),onChange:o})})}import{jsx as kn}from"react/jsx-runtime";import{SettingsDefaultReset as G1,SettingsField as z1}from"efficient-easel/panel";import{PaddingXIcon as U1}from"efficient-easel/icons";var Si="Side space",Ci=Lo.default,q1="The room left at the left and right edge of every page.";function ux({value:e,onChange:o,showHint:t=!0}){let r=e===null;return kn(z1,{label:l(Si),labelId:"sf-side-space",icon:kn(U1,{}),value:`${e??Ci}px`,changed:!r,action:kn(G1,{words:ee()?.panel,label:l(Si),changed:!r,detail:`${Ci}px`,onReset:()=>o(null)}),hint:t?l(q1):void 0,children:kn(qe,{min:Lo.min,max:Lo.max,step:Lo.step,value:e??Ci,readout:!1,ariaLabel:l(Si),onChange:o})})}import{jsx as Tn}from"react/jsx-runtime";import{SettingsDefaultReset as $1,SettingsField as j1}from"efficient-easel/panel";import{WidthIcon as K1}from"efficient-easel/icons";var vi="Content width",wi=Ne.default,V1="The standard width every page on this site renders at.";function px({value:e,onChange:o,showHint:t=!0}){let r=e===null;return Tn(j1,{label:l(vi),labelId:"sf-site-width",icon:Tn(K1,{}),value:`${e??wi}px`,changed:!r,action:Tn($1,{words:ee()?.panel,label:l(vi),changed:!r,detail:`${wi}px`,onReset:()=>o(null)}),hint:t?l(V1):void 0,children:Tn(qe,{min:Ne.min,max:Ne.max,step:Ne.step,value:e??wi,readout:!1,ariaLabel:l(vi),onChange:o})})}import{jsx as W,jsxs as Wn,Fragment as of}from"react/jsx-runtime";import{FieldSelect as MF}from"efficient-easel/fields";import{SettingsField as Gn}from"efficient-easel/panel";import{Tooltip as uI}from"efficient-shell/ui";import{AccentIcon as HF,CaseIcon as WF,StylesIcon as GF,TextLinesIcon as mI,TextSizeIcon as $r,TextSmallIcon as zF,TypeIcon as UF,WeightIcon as qF}from"efficient-easel/icons";import{jsx as M,Fragment as ef,jsxs as Ro}from"react/jsx-runtime";import{useEffect as Zi,useRef as IF,useState as hF}from"react";import{jsx as Gt,jsxs as mx}from"react/jsx-runtime";import{Tooltip as X1}from"efficient-shell/ui";function zt({label:e,onClear:o,what:t="override"}){let r=l(e),a=t==="override"?l("Clear override"):t==="change"?l("Clear change"):l("Clear {what}",{what:t}),n=t==="override"?l("Clear override: {label}",{label:r}):t==="change"?l("Clear change: {label}",{label:r}):l("Clear {what}: {label}",{what:t,label:r});return Gt(X1,{content:a,children:Gt("button",{type:"button",className:"sf-part-mark","aria-label":n,onClick:o,children:Gt(Y1,{})})})}function Y1(){return mx("svg",{width:"12",height:"12",viewBox:"0 0 16 16","aria-hidden":"true",children:[Gt("circle",{className:"sf-part-mark-dot",cx:"8",cy:"8",r:"3",fill:"currentColor"}),mx("g",{className:"sf-part-mark-arrow",fill:"none",stroke:"currentColor",strokeWidth:1.8,strokeLinecap:"round",children:[Gt("path",{d:"M13 8a5 5 0 1 1-1.6-3.7"}),Gt("path",{d:"M13 2.5V5h-2.6"})]})]})}import{FieldSelect as gF,InspectorField as bF}from"efficient-easel/fields";import{SettingsField as yF}from"efficient-easel/panel";import{InspectorUpLevel as Mn}from"efficient-easel/chrome";import{StylesIcon as SF,TypeIcon as CF}from"efficient-easel/icons";import{useEasel as vF}from"efficient-easel/easel";import{TextPartPanel as wF}from"efficient-easel/copy";import{Tooltip as kF}from"efficient-shell/ui";import{jsx as Vi,jsxs as ZT}from"react/jsx-runtime";import{COPY_CELLS as zr,CopyBox as QT}from"efficient-easel/copy";import{PaddingYIcon as JT,WidthIcon as eF}from"efficient-easel/icons";import{useSyncExternalStore as aT}from"react";import{decodePartId as ht,encodePartId as Dr,PART_SEP as HW}from"efficient-easel/screen/lib/puck/part-id";var Z1=ut,Q1=["text","textarea"],J1=["textarea","plainTextarea"];function eT(e){return!e||typeof e!="object"?null:e[Se]?.control??null}function Ut(e){let o=eT(e);return o&&Z1.includes(o)?o:null}function Fn(e){return J1.includes(e)}function xx(e){return!e||typeof e!="object"?void 0:e[Se]?.placeholder}function En(e){return Ue(e).text}function ki(e,o,t){return Q1.includes(e)?{text:t,hidden:Ue(o).hidden}:t}function Ix(e,o,t,r){return En(e[o])===r?null:{...e,[o]:ki(t,e[o],r)}}function Ti(e,o){return o?`${e}[${o.index}].${o.rowKey}`:e}function xo(e){let o=/^([A-Za-z0-9_$]+)\[(\d+)\]\.([A-Za-z0-9_$]+)$/u.exec(e);return o?{key:o[1],row:{index:Number(o[2]),rowKey:o[3]}}:{key:e,row:null}}function Fi(e){if(!(!e||typeof e!="object"))return e[Se]}function Ei(e){if(!e||typeof e!="object")return null;let o=e.arrayFields;return o&&typeof o=="object"?o:null}function hx(e,o){if(!Array.isArray(o))return[];let t=Fi(e),r=[];if(t?.control==="textList"){let n=t.itemKey??"text";return o.forEach((s,i)=>{let c=s?.[n];typeof c=="string"&&c&&r.push({row:{index:i,rowKey:n},text:c})}),r}let a=Ei(e);return a?(o.forEach((n,s)=>{for(let[i,c]of Object.entries(a)){if(!Ut(c))continue;let u=En(n?.[i]);u&&r.push({row:{index:s,rowKey:i},text:u})}}),r):[]}function _r(e,o){if(Array.isArray(e))return e[o.index]?.[o.rowKey]}function Pi(e,o,t,r){let a=e[o];return!Array.isArray(a)||t.index<0||t.index>=a.length?null:{...e,[o]:a.map((n,s)=>s===t.index?{...n,[t.rowKey]:r}:n)}}function gx(e,o,t,r,a){let n=_r(e[o],t);return En(n)===a?null:Pi(e,o,t,ki(r,n,a))}function bx(e,o){return o?`${e} \xB7 row ${o.index+1}`:e}var Io="data-sf-part",Ye="data-sf-part-selected",aG="data-sf-part-kind",oT="data-sf-part-style-owner",tT="data-sf-part-style-kind";function nG(e){for(let o=e;o;o=o.parentElement){let t=o.getAttribute(oT),r=o.getAttribute(tT);if(t&&r)return{owner:t,kind:r};if(o.getAttribute("data-puck-component"))return null}return null}var yx=2;function Sx(e,o){if(!e)return!1;let t=ht(e);return!!t?.propKey&&t.nodeId===o}function qt(e){return ct(e).replace(/\s+/gu,"")}function Pn(e,o,t){let r=e[Se];if(r){if(r.control==="textList"){let n=r.itemKey??"text";if(!Array.isArray(o))return;for(let s of o){let i=s?.[n];typeof i=="string"&&t.push(i)}return}let{text:a}=Ue(o);a?t.push(a):r.placeholder&&t.push(r.placeholder);return}if(!e[hr]){if(e.type==="text"||e.type==="textarea"){typeof o=="string"&&o&&t.push(o);return}if(e.arrayFields&&Array.isArray(o)){for(let a of o)for(let[n,s]of Object.entries(e.arrayFields))Pn(s,a?.[n],t);return}if(e.objectFields&&o&&typeof o=="object")for(let[a,n]of Object.entries(e.objectFields))Pn(n,o[a],t)}}function Cx(e){if(!e||typeof e!="object")return!1;let o=e;return o[hr]?!1:!!o[Se]||o.type==="text"||o.type==="textarea"}function Ln(e,o){let t=e[Se];return t?.label?t.label:typeof e.label=="string"?e.label:o}function Li(e){let o=e.indexOf(" (");return(o>0?e.slice(0,o):e).trim()}function lG(e,o){if(!e)return[];let t=[];for(let[r,a]of Object.entries(e)){if(!a||typeof a!="object"||wr(r))continue;let n=a,s=[];Pn(n,o?.[r],s),!s.length&&n[gr]!==void 0&&Pn(n,n[gr],s);let i=Ln(n,r),c=new Set;for(let{row:m,text:x}of hx(n,o?.[r])){let g=qt(x);g.length<yx||(c.add(g),t.push({key:r,label:i,texts:[g],row:m}))}let u=new Set(c),p=[];for(let m of s){let x=qt(m);x.length<yx||u.has(x)||(u.add(x),p.push(x))}p.length&&t.push({key:r,label:i,texts:p})}return t}var rT=ut;function vx(e,o){if(!o||typeof o!="object"||wr(e)||Wu(o))return null;let t=o[Se];return!t||!rT.includes(t.control)?null:t}function sG(e,o){let t=vx(e,o);return t!==null&&t.identifier!==!0}function wx(e,o){if(!e)return[];let t=[];for(let[r,a]of Object.entries(e)){let n=vx(r,a);if(!n)continue;let{text:s,hidden:i}=Ue(o?.[r]),c=s||n.placeholder||"",u=ct(c).replace(/\s+/gu," ").trim();t.push({key:r,label:Li(Ln(a,r)),preview:u,offPage:n.offPage===!0,identifier:n.identifier===!0,hidden:!!i})}return t}function $t(e,o){let t=Fi(e);return t?.control==="textList"?o.rowKey===(t.itemKey??"text")?Km(t,o.index):null:Ei(e)?.[o.rowKey]??null}function Rn(e,o,t){let r=e.node.props,{key:a,row:n}=xo(e.propKey),s=n?gx(r,a,n,e.kind,o):Ix(r,a,e.kind,o);return s?(t(e.zone,e.index,{...e.node,props:s}),!0):!1}var nT=["bold","italic","underline","strike","link","sup","sub"],lT=["bullet","number"];function Ai(e,o){return e?[...nT,...o?lT:[]]:[]}function kx(e,o){let t=ht(e);if(!t?.propKey)return null;let{nodeId:r,propKey:a}=t,n=o.getItemById(r),s=o.getSelectorForId(r);if(!n||!s)return null;let{key:i,row:c}=xo(a),u=o.components[n.type]?.fields?.[i],p=c?$t(u,c):u,m=Ut(p);if(!m)return null;let x=n.props??{};if(c&&!(Array.isArray(x[i])&&c.index<x[i].length))return null;let g=c?_r(x[i],c):x[i];return{node:n,selector:s,propKey:a,kind:m,stored:g,offPage:fn(p)}}function Tx(e,o){let t=kx(e,o);if(!t||t.offPage)return null;let{text:r,hidden:a}=Ue(t.stored);if(a)return null;let n=Fn(t.kind);return{partId:e,value:r,rules:Lt,multiline:n,offered:Ai(t.kind!=="plainText",n),write:s=>{let i=kx(e,o);i&&Rn({node:i.node,propKey:i.propKey,kind:i.kind,zone:i.selector.zone,index:i.selector.index},s,o.replace)}}}function Fx(e,o,t){return e?.isConnected&&e.getAttribute(Io)===t?e:o?.querySelector(`[${Io}="${sT(t)}"]`)??null}function sT(e){return e.replace(/["\\]/g,"\\$&")}function Ex(e){let o=e.activeElement;return o?o.tagName==="IFRAME"||!!o.closest(".es-canvas"):!1}var Ri=null,Oi=new Set;function iT(){return Ri}function Bi(e){if(e!==Ri){Ri=e;for(let o of Oi)o()}}function fT(e){return Oi.add(e),()=>{Oi.delete(e)}}function Px(){return aT(fT,iT,()=>null)}var Ni="_partStyles",Wi="data-sf-part-styled",cT=["none","upper","capitalize","lower"],dT=[400,500,600,700],uT=["left","center","right","justify"],Lx=5,Rx=1e3,pT=-5,mT=10,Gi=0,zi=64,Ui=2,qi=120,Jo=1280,$i=10,Ox={size:{min:Lx,max:Rx,step:1},sizePhone:{min:Lx,max:Rx,step:1},padding:{min:Gi,max:zi,step:Ui},width:{min:qi,max:Jo,step:$i}},xT=.05,IT=.01,hT=["line","letter"],gT=.5,bT=2.5,yT=-1,ST=1,CT=0,vT=400,Mi={none:"none",upper:"uppercase",capitalize:"capitalize",lower:"lowercase"};function Mr(e){return!e||typeof e!="object"||Array.isArray(e)?null:e}function Nx(e){return Mr(e?.[Ni])??{}}function An(e,o){let t=Nx(e);return Object.hasOwn(t,o)?Mr(t[o])??{}:{}}function Mx(e,o,t){let r={...Nx(e)};if(wT(t).length?r[o]=t:delete r[o],!Object.keys(r).length){let{[Ni]:a,...n}=e;return n}return{...e,[Ni]:r}}function wT(e){return Object.entries(e).filter(([,o])=>o!==void 0)}function kT(e){return hT.includes(e)}var Nr=(e,o,t)=>Math.min(t,Math.max(o,e));function TT(e,o){if(kT(e)){let t=Math.round(Number(o));return!Number.isFinite(t)||t===0?null:Nr(t,pT,mT)}if(e==="lineHeight"){let t=Number(o);return Number.isFinite(t)?jt(Nr(t,gT,bT),3):null}if(e==="letterSpacing"){let t=Number(o);return Number.isFinite(t)?jt(Nr(t,yT,ST),4):null}if(e==="paragraphSpacing"){let t=Math.round(Number(o));return!Number.isFinite(t)||t<=0?null:Nr(t,CT,vT)}if(Object.hasOwn(Ox,e)){let{min:t,max:r}=Ox[e],a=Math.round(Number(o));return Number.isFinite(a)?Nr(a,t,r):null}return e==="italic"?typeof o=="boolean"?o:null:e==="role"?_o.includes(String(o))?o:null:o}var FT=[["font","role"],["line","lineHeight"],["letter","letterSpacing"]];function ET(e){let o=[];for(let[t,r]of FT)t===e?o.push(r):r===e&&o.push(t);return o}function Wr(e,o,t,r){let a={...An(e,o)},n=r==null?null:TT(t,r);if(n===null)delete a[t];else{a[t]=n;for(let s of ET(t))delete a[s]}return Mx(e,o,a)}function Hx(e,o){return Mx(e,o,{})}function PT(e){for(let o of cT)if(Mi[o]===e)return o;return"none"}function LT(e){return!e||!Object.hasOwn(Mi,e)?"":Mi[e]}var RT={heading:"--font-role-heading",heading2:"--font-role-heading2",heading3:"--font-role-heading3",body:"--font-role-body",accent:"--font-role-accent",label:"--font-role-label"};function OT(e){let o=e.role;return o&&_o.includes(o)?o:null}var AT={headingLarge:"min(clamp(64px,9vw,144px), var(--sf-heading-max,9999px))",headingMedium:"min(32px, var(--sf-heading-max,9999px))",headingSmall:"min(24px, var(--sf-heading-max,9999px))",accent:"32px",body:"14px",label:"12px"};function BT(e){let o=ed[e],t=AT[o];return t?`var(--size-${o}, ${t})`:`var(--size-${o})`}function ji(e){let o={};return typeof e.lineHeight=="number"?o.lineHeight=e.lineHeight:e.line&&(o.lineHeight=jt(DT+e.line*xT,3)),typeof e.letterSpacing=="number"?o.letterSpacingEm=e.letterSpacing:e.letter&&(o.letterSpacingEm=jt(e.letter*IT,4)),o}var DT=1,Gr="--sf-part-para",_T="(max-width: 719.98px)";function Ax(e){return typeof e.sizePhone=="number"&&e.sizePhone>0?{fontSize:`${e.sizePhone}px`}:{}}function NT(e,o){return o&&typeof e.sizePhone=="number"&&e.sizePhone>0?{...e,size:e.sizePhone}:e}function On(e,o){let t=OT(e),r=ji(e),a=e.size?`${e.size}px`:t?BT(t):"";return{fontFamily:e.font?GT(e.font):t?`var(${RT[t]})`:"",fontWeight:e.weight?String(e.weight):"",fontSize:a,minWidth:a?"0":"",overflowWrap:a?"break-word":"",lineHeight:r.lineHeight!==void 0?String(r.lineHeight):"",letterSpacing:r.letterSpacingEm!==void 0?`${r.letterSpacingEm}em`:"",[Gr]:e.paragraphSpacing?`${e.paragraphSpacing}px`:"",textTransform:LT(e.case),textAlign:e.align??"",paddingTop:Di(e.padding),paddingBottom:Di(e.padding),maxWidth:Di(e.width),color:MT(e.color),fontStyle:e.italic===!0?"italic":e.italic===!1?"normal":""}}var MT=e=>e===void 0||e===""?"":Object.hasOwn(qo,e)?qo[e]:Wx.test(e)?e:"",Wx=/^#[0-9a-fA-F]{6}$/;function Gx(e){return Wx.test(e)}var Di=e=>e===void 0?"":`${e}px`,jt=(e,o)=>Number(e.toFixed(o));function PG(e,o){let t=Number.parseFloat(e.fontSize)||16,r=Number.parseFloat(e.lineHeight),a=Number.parseFloat(e.letterSpacing),n=Number.parseFloat(e.paddingTop),s=Number.parseFloat(e.maxWidth);return{fontKey:o,sizePx:t,weight:HT(Number.parseInt(e.fontWeight,10)),lineRatio:Number.isFinite(r)?jt(r/t,3):1.2,letterEm:Number.isFinite(a)?jt(a/t,4):0,align:WT(e.textAlign),case:PT(e.textTransform),paddingPx:Number.isFinite(n)?Math.round(n):0,widthPx:Number.isFinite(s)&&s<Jo?Math.round(s):Jo}}function HT(e){return Number.isFinite(e)?dT.reduce((o,t)=>Math.abs(t-e)<Math.abs(o-e)?t:o):400}function WT(e){for(let o of uT)if(o===e)return o;return e==="end"?"right":"left"}function LG(e,o){let t=Bx(e);if(!t)return"";for(let r of Ir)if(Bx(o(r.cssVar))===t)return r.key;return""}var Bx=e=>(e.split(",")[0]??"").replace(/["']/g,"").replace(/\s+/g," ").trim().toLowerCase();function GT(e){let o=fo(e);return o?`var(${o.cssVar})`:""}function RG(e,o,t,r){return!o||ht(o)?.nodeId!==e?null:t.find(a=>r(a.getAttribute("class")))??t[0]??null}function OG(e,o,t=()=>Hr,r=s=>s,a=qT,n=!1){let s=0;for(let{element:i,partId:c}of e){let u=ht(c)?.propKey;if(!u)continue;let p=r(u),m=Object.hasOwn(o,p)?Mr(o[p])??{}:{},x=On(NT(m,n),Hr),g=_i.some(w=>i.style[w]),C=!1;for(let[w,b]of Object.entries(x))$T(i,w,b),b&&(C=!0);if(g||_i.some(w=>x[w]))for(let w of zT(i,a))for(let b of _i)w.style[b]=x[b]??"";C&&(s+=1)}return s}function zT(e,o){let t=qt(e.textContent??""),r=[],a=e;for(let n=0;n<UT&&o(a);n+=1){let s=a.parentElement;if(!s||qt(s.textContent??"")!==t)break;r.push(s),a=s}return r}var UT=8;function qT(e){let o=e;return typeof window>"u"||!o?.ownerDocument?!1:window.getComputedStyle(o).display==="inline"}var Hr={fontKey:"",sizePx:16,weight:400,lineRatio:1,letterEm:0,align:"left",case:"none",paddingPx:0,widthPx:Jo};function $T(e,o,t){if(!o.startsWith("--")){e.style[o]=t;return}let r=e.style;typeof r.setProperty=="function"?t?r.setProperty(o,t):r.removeProperty?.(o):r[o]=t;let a=e;o===Gr&&(t?a.setAttribute?.(Dx,""):a.removeAttribute?.(Dx))}var Dx="data-sf-part-para",jT=Object.keys(On({},Hr)),Hi=new Set(["color","overflowWrap",Gr,"fontStyle"]),_i=jT.filter(e=>!Hi.has(e));function zx(e,o,t,r=a=>a){let a=new Map;for(let i of e){let c=Ti(i.key,i.row);for(let u of i.texts){let p=a.get(u);p?(p.keys.add(i.key),p.partKeys.add(c)):a.set(u,{keys:new Set([i.key]),partKeys:new Set([c])})}}let n=new Map;for(let i of Object.keys(o)){if(!KT(i))continue;let c=Mr(o[i])??{},u=On(c,Hr),p=Ax(c);!Object.values(u).some(Boolean)&&!Object.keys(p).length||n.set(i,{stamp:_x(t,i),declarations:u,...Object.keys(p).length?{phone:p}:{}})}let s=new Map;for(let[i,{keys:c,partKeys:u}]of a){let p=u.size===1?[...u][0]:c.size===1?[...c][0]:null;if(!p)continue;let m=r(p);if(!Object.hasOwn(o,m))continue;let x=Mr(o[m])??{},g=On(x,Hr),C=Ax(x);!Object.values(g).some(Boolean)&&!Object.keys(C).length||s.set(i,{stamp:_x(t,p),declarations:g,...Object.keys(C).length?{phone:C}:{}})}return s.size||n.size?{rules:s,kindRules:n,drawn:new Set(a.keys())}:null}function KT(e){return e.startsWith("@")}function Ki(e,o){return e?.kindRules.get(o)??null}function _x(e,o){let t=r=>r.replace(/[^A-Za-z0-9_-]+/g,"-");return`${t(e)}~${t(o)}`}function Ux(e){let o=[],t=new Set,r=a=>{let{stamp:n,declarations:s}=a;if(t.has(n))return;t.add(n);let i=Object.entries(s).filter(([,g])=>g!==""),c=g=>g.map(([C,w])=>`${XT(C)}: ${w}`).join("; "),u=`[${Wi}="${n}"]`,p=i.filter(([g])=>!Hi.has(g)),m=i.filter(([g])=>Hi.has(g));p.length&&o.push(`${u}, *:has(> ${u}) { ${c(p)} }`),m.length&&o.push(`${u} { ${c(m)} }`),s[Gr]&&o.push(...VT(u));let x=Object.entries(a.phone??{}).filter(([,g])=>g!=="");x.length&&o.push(`@media ${_T} { ${u}, *:has(> ${u}) { ${c(x)} } }`)};for(let a of e.rules.values())r(a);for(let a of e.kindRules.values())r(a);return o.join(`
|
|
4
|
+
`)}function VT(e){let o=`var(${Gr})`,t=":is([data-sf-bullet], [data-sf-number])";return[`${e} br:not(br + br) { display: block; content: ""; margin-top: ${o} }`,`${e} ${t}:not(:first-child) { margin-top: ${o} }`,`${e} ${t}:not(:last-child) { margin-bottom: ${o} }`]}var XT=e=>e.replace(/[A-Z]/g,o=>`-${o.toLowerCase()}`);function qx(e,o){if(!e)return null;let t=qt(o),r=e.rules.get(t);if(r)return r;if(t.length<YT||e.drawn.has(t))return null;let a=null;for(let[n,s]of e.rules)if(n.includes(t)){if(a&&a.stamp!==s.stamp)return null;a=s}return a}var YT=8;var oF=["left","center","right","justify"];function Xi(e,o,t,r={}){let a=ji(e),n=(r.phone?e.sizePhone:void 0)??e.size??o.sizePx;return[r.phone?{...zr.fontSize,value:e.sizePhone,styleValue:Math.round(o.sizePx),onChange:s=>t({sizePhone:s??null})}:{...zr.fontSize,value:e.size,styleValue:Math.round(o.sizePx),onChange:s=>t({size:s??null})},{...zr.lineHeight,value:a.lineHeight,styleValue:o.lineRatio,onChange:s=>t(s===void 0?{lineHeight:null,line:null}:{lineHeight:s})},{...zr.letterSpacing,scale:n,value:a.letterSpacingEm,styleValue:o.letterEm,onChange:s=>t(s===void 0?{letterSpacing:null,letter:null}:{letterSpacing:s})},{...zr.paragraphSpacing,value:e.paragraphSpacing,styleValue:0,onChange:s=>t({paragraphSpacing:s??null})},{key:"padding",name:l("Padding"),icon:Vi(JT,{}),unit:"px",step:Ui,shiftStep:10,min:Gi,max:zi,value:e.padding,styleValue:o.paddingPx,onChange:s=>t({padding:s??null})},{key:"width",name:l("Width"),icon:Vi(eF,{}),unit:"px",step:$i,shiftStep:100,min:qi,max:Jo,value:e.width,styleValue:o.widthPx,onChange:s=>t({width:s??null})}]}function $x({text:e,onTextChange:o,multiline:t,markup:r=!0,styled:a=!0,style:n,base:s,setValue:i,colors:c,placeholder:u,ariaLabel:p,head:m,typedOnCanvas:x=!1}){let g=Xi(n,s,i),C=Ai(r,t);return ZT("div",{className:"sf-part-textbox",children:[m,Vi(QT,{value:e,onChange:o,multiline:t,placeholder:u,ariaLabel:p,rules:Lt,tools:C,barShows:x?"focus":"always",colors:r?c:[],align:a?{value:n.align??s.align,allow:oF,onChange:w=>i({align:w})}:void 0,letterCase:a?{value:n.case==="capitalize"?"":n.case??"",onChange:w=>i({case:w||null})}:void 0,cells:a?g:void 0})]})}import{PreviewDeviceContext as jx,usePreviewDevice as Kx}from"efficient-easel/screen/components/PreviewDeviceContext";import{jsx as tF}from"react/jsx-runtime";import{createContext as rF,useContext as aF,useMemo as nF,useState as lF}from"react";var sF={partStyle:null,setPartStyle:()=>{}},Vx=rF(sF);function jG({children:e}){let[o,t]=lF(null),r=nF(()=>({partStyle:o,setPartStyle:t}),[o]);return tF(Vx.Provider,{value:r,children:e})}function Xx(){return aF(Vx)}var iF="#9ca3af";function Zx(e){return us.map(o=>({key:o,name:Ru[o],value:e?.[o]||iF}))}function XG(e){let o={},t=e.ownerDocument,r=t?.defaultView;if(!t||!r)return o;let a=r.getComputedStyle(e),n=t.createElement("canvas").getContext("2d");for(let s of us){let i=qo[s].replace(/^var\((--[\w-]+)\)$/,"$1"),c=a.getPropertyValue(i).trim();if(!c)continue;let u=Yx(c);!u&&n&&(n.fillStyle="#000000",n.fillStyle=c,u=Yx(String(n.fillStyle))),u&&(o[s]=u)}return o}function Yx(e){let o=e.trim().toLowerCase();if(/^#[0-9a-f]{6}$/.test(o))return o;if(/^#[0-9a-f]{3}$/.test(o))return`#${[...o.slice(1)].map(r=>r+r).join("")}`;let t=o.match(/^rgba?\(\s*(\d+)[\s,]+(\d+)[\s,]+(\d+)/);return t?`#${t.slice(1,4).map(r=>Math.min(255,Number(r)).toString(16).padStart(2,"0")).join("")}`:null}var Ur="@name",Qx="@body",Jx="@value",QG={[Ur]:"Name",[Qx]:"Body",[Jx]:"Value"},fF={TimelineTrack:{"entries.date":Ur,"entries.title":Ur,"entries.blurb":Qx},Footprint:{"offices.city":Ur},Stats:{"items.label":Ur,"items.value":Jx}};function cF(e){let{key:o,row:t}=xo(e);return t?`${o}.${t.rowKey}`:null}function Bn(e,o){if(!e)return o;let t=cF(o);return t?fF[e]?.[t]??o:o}var dF={CollectionCard:"product",FooterMenu:"menu",Gallery:"product",GalleryItem:"product",ProductGrid:"product",ProductHero:"product",SpecTable:"product",Events:"blog",FeaturedCover:"blog",LongRead:"blog",SubscribeBlogs:"blog"},eI={product:"Synced from the product.",blog:"Synced from the blog post.",menu:"Synced from the site menu."},oI="Open",tI={product:{type:"storefront-editor:open-product",needsSlug:!0},blog:{type:"storefront-editor:open-post",needsSlug:!0},menu:{type:"storefront-editor:open-menus",needsSlug:!1}};function qr(e){let o=e?.source?.slug;return typeof o=="string"&&o.length>0?o:void 0}function Dn(e){return dF[e]??null}var uF={tag:{label:"Tag",follows:"Labels",builtIn:"13px",writable:!0},name:{label:"Name",follows:"Heading 2",builtIn:"48px",writable:!0},body:{label:"Body",follows:"Body",builtIn:"14px",writable:!0},price:{label:"Price",follows:"Labels",builtIn:"15px",writable:!0},link:{label:"Link",follows:"Labels",builtIn:"14px",writable:!0}},rI=uF;var pF={number:{label:"Number",follows:"Labels",builtIn:"14px",writable:!0},question:{label:"Question",follows:"Body",builtIn:"18px",writable:!0},answer:{label:"Answer",follows:"Body",builtIn:"15px",writable:!0}},aI=pF;var _n="data-sf-spec-region";function nz(e,o,t){if(!e)return;let r=t[e];if(r)return{fontFamily:`var(--font-role-${e})`,fontSize:`var(--size-${r}, ${o.builtIn})`}}function mF(e){return`@${e}`}function Yi(e,o){if(!o.startsWith("@"))return null;let t=o.slice(1);return t in e?t:null}function nI(e,o){return o&&o in e?o:null}function xF(e,o){let t=o?.closest(`[${_n}]`)?.getAttribute(_n);return nI(e,t??null)}var fz=_n;var lI={rowLabel:{label:"Spec row name",follows:"Labels",builtIn:"14px"},rowValue:{label:"Spec row value",follows:"Labels",builtIn:"14px"},diagramTitle:{label:"Diagram title",follows:"Labels",builtIn:"12px"},diagramCallout:{label:"Diagram measurement",follows:"Labels",builtIn:"12px"},diagramStatLabel:{label:"Diagram stat name",follows:"Labels",builtIn:"11px"},diagramStatValue:{label:"Diagram stat value",follows:"Labels",builtIn:"11px"}};var sI={SpecTable:lI,FAQ:aI,Collections:rI};function iI(e){return e&&Object.hasOwn(sI,e)?sI[e]:null}function Ji(e){return e?l(e):null}function fI(e){return e.kind==="role"?ba[e.role]:e.kind==="custom"?"Custom":null}function TF(e){let o=e.role;return o&&_o.includes(o)?{kind:"role",role:o}:null}function FF(e,o){if(!e)return{kind:"unread"};let{faceRole:t,base:r}=e;if(o[t]===r.fontKey)return{kind:"role",role:t};let a=Object.keys(o).filter(n=>o[n]===r.fontKey);return a.length===1?{kind:"role",role:a[0]}:{kind:"custom"}}function Qi(e,o,t,r){return TF(An(e,o))??FF(t,r)}function EF(e,o){if(!e.length)return null;let t=o(e[0]);return e.every(r=>o(r)===t)?t:null}var Nn="";function PF({face:e,base:o,onPick:t}){let r=e.kind==="role"?e.role:Nn,a=[{label:l("No style"),value:Nn},..._o.map(n=>({label:l(ba[n]),value:n}))];return M(gF,{ariaLabel:l("Style"),value:r,options:a,inline:!0,onChange:n=>t(n===Nn?null:n),renderOption:n=>n.value===Nn?Ro(ef,{children:[M("span",{className:"es-fsel-label sf-part-style-keep",children:n.label}),M("span",{className:"sf-part-style-aside","aria-hidden":"true",children:l("Section\u2019s own")})]}):M("span",{className:"es-fsel-label",style:{fontFamily:`var(--font-role-${n.value})`},children:n.label}),renderValue:()=>M("span",{style:{fontFamily:o?.fontKey?`var(${fo(o.fontKey)?.cssVar})`:void 0,fontWeight:o?.weight},children:Ji(fI(e))}),valueText:n=>Ji(fI(e))??n?.label??""})}function LF({sectionName:e,onBack:o,textEditor:t,styleRow:r,children:a}){return Ro("div",{className:"sf-part-panel",children:[M(Mn,{inline:!0,name:l(e),onSelect:o}),t,r,a]})}function Hn({source:e,slug:o}){let t=kt(),r=tI[e],a=!r.needsSlug||!!o;return M("div",{className:"sf-note sf-note--source",children:Ro("p",{className:"es-field-hint sf-hint-keep",children:[l(eI[e]),a?Ro(ef,{children:[" ",M("button",{type:"button",className:"sf-source-open",onClick:()=>{r.type==="storefront-editor:open-menus"?t.send(r.type):o&&t.send(r.type,{slug:o})},children:l(oI)})]}):null]})})}var cI=4,RF=120;function OF({region:e,sizePx:o,face:t,base:r,onFollowStyle:a,source:n,slug:s,onBack:i}){let c=e.follows;return Ro("div",{className:"sf-note",children:[M("p",{children:M("strong",{children:l(e.label)})}),M("p",{children:o?l("Its size follows Site styles \u25B8 {follows} \u2014 {px}px right now.",{follows:l(c),px:Math.round(o)}):l("Its size follows Site styles \u25B8 {follows}.",{follows:l(c)})}),a?M(ef,{children:M(yF,{label:l("Style"),icon:M(SF,{}),hint:l("Every {part} in this section follows it. The face and the size change; the letter case is the section\u2019s own and stays as it is.",{part:l(e.label).toLowerCase()}),children:M(PF,{face:t,base:r,onPick:a})})}):M("p",{className:"es-field-hint sf-hint-keep",children:l("Only the size follows a site style. This section sets its own font, weight and letter case.")}),n?M(Hn,{source:n,slug:s}):null,M(Mn,{inline:!0,name:l("Page"),onSelect:i})]})}function AF({onBack:e}){return Ro("div",{className:"sf-note",children:[M("p",{children:M("strong",{children:l("This part is no longer here.")})}),M("p",{children:l("The section it belonged to has been changed or removed.")}),M(Mn,{inline:!0,name:l("Page"),onSelect:e})]})}function BF({onBack:e,partId:o,why:t}){return Ro("div",{className:"sf-note",children:[M("p",{children:M("strong",{children:l("This part's settings did not open.")})}),M("p",{children:l("The words are still on your page and nothing has been lost. The editor could not work out which control belongs to them, which is a fault on our side. Go back and click the section to open its settings instead.")}),M("p",{className:"sf-note-detail",children:Ro("code",{children:[o," \u2014 ",t]})}),M(Mn,{inline:!0,name:l("Page"),onSelect:e})]})}function dI({nodeId:e,propKey:o,onBack:t,onEditStyle:r}){let{getItemById:a,getSelectorForId:n,config:s}=vF(R=>R),i=Uo(),c=Px(),{partStyle:u}=Xx(),{fonts:p,textStyles:m}=re(),x=Kx()==="mobile",g=IF(null),C=a(e),w=n(e),b=C?s.components[C.type]:void 0,{key:v,row:S}=xo(o),h=b?.fields?.[v],k=S?$t(h,S):h,P=Dr(e,o),F=C?.props??{},A=Ut(k),O=fn(k),B=Cx(k),U=C?Dn(C.type):null,me=S?_r(F[v],S):F[v],j=!!S&&!(Array.isArray(F[v])&&S.index<F[v].length);Zi(()=>{Ex(document)||g.current?.querySelector(".es-copy [contenteditable='true'], .es-copy textarea, .sf-copybox textarea, .sf-copybox input")?.focus()},[P]);let[he,_]=hF(0);Zi(()=>_(0),[P]);let ne=!!C&&!j&&(!w||!k);Zi(()=>{if(!ne||he>=cI)return;let R=setTimeout(()=>_(ce=>ce+1),RF);return()=>clearTimeout(R)},[ne,he]);let Oe=ne&&he<cI;if(!C||j)return M(AF,{onBack:t});let We=iI(C.type),bo=We?Yi(We,o):null;if(We&&bo){let R=u?.partId===P?u:null,ce=We[bo],oo=ce.writable===!0&&!!w,Do=El=>{w&&i.replaceComponent(w.zone,w.index,{...C,props:Wr(F,o,"role",El)})};return M(OF,{region:ce,sizePx:R?.base.sizePx??null,face:Qi(F,o,R,p),base:R?.base??null,onFollowStyle:oo?Do:void 0,source:U,slug:qr(F),onBack:t})}if(!w||!k)return Oe?M("div",{className:"sf-note","aria-busy":"true"}):M(BF,{onBack:t,partId:P,why:w?"no field":"no selector"});let $e=R=>{i.replaceComponent(w.zone,w.index,{...C,props:R})},Ae=R=>{if(Ue(R).hidden!==Ue(me).hidden||!A){let ce=S?Pi(F,v,S,R):{...F,[v]:R};ce&&$e(ce);return}Rn({node:C,propKey:o,kind:A,zone:w.zone,index:w.index},Ue(R).text,i.replaceComponent)},Qe=me,Ee=u?.partId===P?u:null,fe=Ee?.styleOwner,ye=fe?a(fe.owner):null,xe=fe&&ye?n(fe.owner):null,je=!!(fe&&ye&&xe),E=je?ye.props??{}:F,te=je?R=>i.replaceComponent(xe.zone,xe.index,{...ye,props:R}):$e,X=je?fe.kind:Bn(C?.type,o),Y=An(E,X),q=[{partKey:X,face:Qi(E,X,Ee,p),sizeGroup:Ee?.sizeGroup??null,base:Ee?.base??NF,style:Y}],ve=EF(q,R=>R.sizeGroup),Je=Zx(Ee?.inks),Pe=(R,ce)=>{let oo=E;for(let Do of q)oo=Wr(oo,Do.partKey,R,ce);te(oo)},Wo=R=>Pe("role",R),rt=R=>{let ce=E;for(let oo of q)for(let[Do,El]of Object.entries(R))ce=Wr(ce,oo.partKey,Do,El??null);te(ce)},mr=A==="text"||A==="textarea",{text:at,hidden:eo}=Ue(me),yo=k?.[Se]?.label??o,Ia=eo?l("Show {label} on the slide",{label:l(yo)}):l("Hide {label} on the slide",{label:l(yo)}),ha=Ro("div",{className:"sf-field-head",children:[M(CF,{}),M("span",{className:"sf-field-label sf-field-label--inline",children:l(yo)}),mr&&M(kF,{content:Ia,children:M("button",{type:"button",className:"sf-field-eye","aria-pressed":eo,"aria-label":Ia,onClick:()=>Ae({text:at,hidden:!eo}),children:eo?M(ze,{name:"eye-off",size:14}):M(ze,{name:"eye",size:14})})})]}),ga=!O&&B,Fl=!!A&&(Om(k)||O||eo||!B||A!=="plainText"),N=Qi(E,X,Ee,p),G=N.kind==="role"?N.role:null,V=Object.entries(Y).filter(([R,ce])=>R!=="role"&&ce!==void 0).length,se=()=>{let R=E;for(let ce of q){let oo=ce.style.role;R=Hx(R,ce.partKey),oo&&(R=Wr(R,ce.partKey,"role",oo))}te(R)};return Ro(LF,{sectionName:b?.label??C.type,onBack:t,textEditor:M("div",{ref:g,className:"sf-part-text",children:Fl?M($x,{text:at,onTextChange:R=>Ae(mr?{text:R,hidden:eo}:R),multiline:Fn(A),markup:A!=="plainText",styled:!1,style:q[0].style,base:q[0].base,setValue:rt,colors:Je.map(R=>({name:R.key,label:l(R.name),value:R.value})),placeholder:Ji(xx(k))??void 0,ariaLabel:l(yo),head:ha,typedOnCanvas:c===P}):A?mr?ha:null:M(bF,{field:k,name:o,value:Qe,onChange:Ae,id:`sf-part-${e}-${o}`})}),children:[U&&M(Hn,{source:U,slug:qr(F)}),ga&&M(wF,{style:{value:G??"",options:[{value:"",label:l("No style"),description:l("Section\u2019s own")},..._o.map(R=>({value:R,label:l(ba[R]),description:fo(p[R])?.label}))],onChange:R=>Wo(R||null),changed:V>0,onClearChanges:V>0?se:void 0,onEditStyles:r},font:{value:Y.font??"",styleValue:fo(q[0].base.fontKey)?.label,options:Ir.map(R=>({label:R.label,value:R.key})),onChange:R=>Pe("font",R||null)},italic:{value:Y.italic,styleValue:_F(m,G),onChange:R=>Pe("italic",R??null)},cells:Xi(q[0].style,q[0].base,rt,{phone:x}),align:{value:Y.align??"",styleValue:q[0].base.align,onChange:R=>Pe("align",R||null)},letterCase:{value:Y.case??"",styleValue:q[0].base.case,onChange:R=>Pe("case",R||null)}}),ga&&ve===null&&M("p",{className:"es-field-hint sf-hint-keep",children:l("Fixed size \u2014 the site\u2019s Text setting doesn\u2019t resize this.")})]})}var DF={heading:"heading-1",heading2:"heading-2",heading3:"heading-3",body:"body-1",label:"body-5"};function _F(e,o){let t=o?DF[o]:void 0;return!t||!Array.isArray(e)?!1:e.find(r=>r?.id===t)?.values?.italic===!0}var NF={fontKey:"",sizePx:16,weight:400,lineRatio:1.4,letterEm:0,align:"left",case:"none",paddingPx:0,widthPx:Jo};var $F=[{role:"heading",title:"Heading 1",group:"heading",step:"headingLarge",base:17,icon:W($r,{})},{role:"heading2",title:"Heading 2",group:"heading",step:"headingMedium",base:15,icon:W($r,{})},{role:"heading3",title:"Heading 3",group:"heading",step:"headingSmall",base:13,icon:W($r,{})},{role:"accent",title:"Accent",step:"accent",base:15,icon:W(HF,{})},{role:"body",title:"Body",group:"body",step:"body",base:14,icon:W(mI,{})},{role:"label",title:"Labels",group:"label",step:"label",base:11,icon:W(zF,{})}];var jF=9,Kt=500,KF=100,VF=80,XF=4,YF=600,ZF=700,QF=400,JF="0.18em";function eE({id:e,value:o,onChange:t}){let r=Qc().flatMap(([n,s])=>s.map(i=>({label:i.label,value:i.key,group:l(Zc[n])}))),a=(n,s)=>W("span",{style:{fontFamily:`var(${fo(n)?.cssVar??"--font-body"})`},children:s});return W(MF,{id:e,value:o,onChange:t,options:r,renderOption:n=>a(n.value,n.label),renderValue:n=>n?a(n.value,n.label):null})}function oE({label:e,icon:o,readout:t,min:r,max:a,step:n,value:s,onChange:i,action:c,hint:u}){return W(Gn,{label:l(e),icon:o,value:t,action:c,hint:u,children:W(qe,{min:r,max:a,step:n,value:s,readout:!1,ariaLabel:l(e),onChange:i})})}function tf({label:e,icon:o,value:t,fallback:r,min:a,max:n,step:s,suffix:i="",hint:c,onChange:u}){let p=t===null;return W(oE,{label:e,icon:o,readout:p?l("Auto"):`${t}${i}`,min:a,max:n,step:s,value:p?r:t,onChange:u,action:p?null:W(zt,{label:e,what:"change",onClear:()=>u(null)}),hint:c})}function pI({label:e,icon:o,options:t,value:r,onChange:a,hint:n,action:s}){return W(Gn,{label:l(e),icon:o,value:tE(t.find(i=>i.value===r)?.label),hint:n,action:s,children:W("div",{className:"sf-rungs",children:t.map(i=>W("button",{type:"button","aria-pressed":i.value===r,onClick:()=>a(i.value),className:`sf-rung${i.value===r?" is-active":""}`,children:l(i.label)},i.value))})})}var tE=e=>e===void 0?void 0:l(e),rE=[{value:"authored",label:"As designed"},{value:"sentence",label:"As typed"}],aE=[{value:"normal",label:"Normal"},{value:"tight",label:"Tight"},{value:"compressed",label:"Compressed"}];function nE({fontKey:e,weight:o,fallbackWeight:t,onWeight:r}){let a=(o??t)>=YF,n=Jc(e),s=fo(e)?.label??l("This face");return W(Gn,{label:l("Style"),icon:W(GF,{}),value:a?l("Bold"):l("Normal"),hint:l("Bold is the weight above \u2014 one value, two ways to set it."),children:Wn("div",{className:"sf-rungs",children:[W(uI,{content:l("Bold"),className:"sf-rung-tip",children:W("button",{type:"button","aria-pressed":a,"aria-label":l("Bold"),onClick:()=>r(a?QF:ZF),className:`sf-rung sf-rung--glyph${a?" is-active":""}`,style:{fontWeight:700},children:"B"})}),W(uI,{className:"sf-rung-tip",content:n?l("Italic is not saved yet \u2014 the theme row has no column for it (card 66162.b)."):l("{face} is loaded without an italic, so it cannot be set in italic. Slanting it would deform the letters rather than style them.",{face:s}),children:W("span",{className:"sf-tip-disabled",tabIndex:0,children:W("button",{type:"button","aria-pressed":!1,"aria-label":l("Italic"),disabled:!0,className:"sf-rung sf-rung--glyph",style:{fontStyle:"italic"},children:"I"})})})]})})}function xI({fonts:e,compression:o,headingTypography:t,openRole:r,onOpenRole:a,onFontChange:n,sizes:s,onSizeChange:i,onCompressionChange:c,onHeadingTypographyChange:u,livePx:p,savedRole:m=null}){let x=b=>u({...t,...b}),g=b=>b==="accent"?"weightStrong":b==="heading2"?"weight2":b==="heading3"?"weight3":"weight",C=b=>b==="heading2"?"case2":b==="heading3"?"case3":"case",w=yd(o);return W("div",{className:"sf-style-list",children:$F.map(b=>{let v=r===b.role;return W(za,{styleKey:b.role,label:b.title,icon:b.icon,value:fo(e[b.role])?.label??e[b.role],sampleStyle:lE(b,e,t,w),open:v,onToggle:()=>a(v?null:b.role),saved:m===b.role,children:v&&Wn(of,{children:[W(Gn,{label:l("Font"),icon:W(UF,{}),htmlFor:`sf-font-${b.role}`,action:e[b.role]===Pl[b.role]?null:W(zt,{label:"Font",what:"change",onClear:()=>n(b.role,Pl[b.role])}),children:W(eE,{id:`sf-font-${b.role}`,value:e[b.role],onChange:S=>n(b.role,S)})}),b.step&&i&&W(tf,{label:"Size",icon:W($r,{}),value:s[b.step],fallback:b.base*2,min:dd,max:ud,step:pd,suffix:"px",hint:s[b.step]===null?l("Auto = this style states no size, and text following it keeps the size its section drew."):l("The size a text takes when you set it to follow this style. Sections keep their own sizes."),onChange:S=>i(b.step,S)}),(Ct(b.role)||b.role==="accent")&&Wn(of,{children:[W(tf,{label:"Weight",icon:W(qF,{}),value:t[g(b.role)],fallback:Ct(b.role)?Kt:t.weight??Kt,min:Sd,max:Cd,step:KF,hint:b.role==="accent"?l("Auto = the accent phrase takes the heading's own weight."):void 0,onChange:S=>x({[g(b.role)]:S})}),W(nE,{fontKey:e[b.role],weight:t[g(b.role)],fallbackWeight:Ct(b.role)?Kt:t.weight??Kt,onWeight:S=>x({[g(b.role)]:S})})]}),Ct(b.role)&&Wn(of,{children:[W(pI,{label:"Line & text gap",icon:W(mI,{}),options:aE,value:o,onChange:c,hint:w.lineHeight===void 0?l("The built-in spacing."):l("Line gap {line} \xB7 text gap {letter}em.",{line:w.lineHeight,letter:String(w.letterSpacing)}),action:o===Nl?null:W(zt,{label:"Line & text gap",what:"change",onClear:()=>c(Nl)})}),W(pI,{label:"Capitals",icon:W(WF,{}),options:rE,value:t[C(b.role)],onChange:S=>x({[C(b.role)]:S}),hint:l("The only setting that changes a heading's capitals."),action:t[C(b.role)]==="authored"?null:W(zt,{label:"Capitals",what:"change",onClear:()=>x({[C(b.role)]:"authored"})})}),W(tf,{label:"Largest size",icon:W($r,{}),value:t.maxPx,fallback:VF,min:vd,max:wd,step:XF,suffix:"px",hint:l("Caps the biggest heading on the site. Auto = each section's own."),onChange:S=>x({maxPx:S})})]})]})},b.role)})})}function lE(e,o,t,r){let a=Math.max(jF,e.base),n={fontFamily:`var(${fo(o[e.role])?.cssVar??"--font-body"})`,fontSize:`${a.toFixed(1)}px`,lineHeight:1.15};return Ct(e.role)?(n.fontWeight=t.weight??Kt,n.textTransform=t.case==="sentence"?"none":"uppercase",r.letterSpacing!==void 0&&(n.letterSpacing=`${r.letterSpacing}em`)):e.role==="accent"?(n.fontWeight=t.weightStrong??t.weight??Kt,r.letterSpacing!==void 0&&(n.letterSpacing=`${r.letterSpacing}em`)):e.role==="label"&&(n.textTransform="uppercase",n.letterSpacing=JF),n}import{SettingsTabs as iE}from"efficient-easel/panel";import{Tooltip as OU,tabButtonId as fE,tabPanelId as cE}from"efficient-shell/ui";import{ContrastIcon as dE,NoteIcon as uE,SettingsIcon as pE,TypeIcon as mE}from"efficient-easel/icons";function II(e){switch(e.status){case"saved":return null;case"failed":return{msg:l("Not saved. Try again."),tone:"error"};case"skipped":switch(e.reason){case"empty":return null;case"no-token":return{msg:l("Not saved. Reload the page."),tone:"error"};case"template":return{msg:l("Templates keep their look. Press Done."),tone:"success"}}}}import{gotoPreviewSlide as dU,pinPreviewToBottom as uU,pinPreviewToSection as pU,previewFrame as hI,scrollPreviewToSection as gI,scrollPreviewToTop as rf}from"efficient-easel/screen/lib/puck/preview-dom";var af="sf-site-styles",xE="sf-site-styles-tabpanel",lf=!1,IE="Show hints";function sf({shown:e,onChange:o}){return oe("div",{className:"sf-hints",children:Xt("button",{type:"button","aria-pressed":e,onClick:()=>o(!e),className:`sf-rung sf-hints-toggle${e?" is-active":""}`,children:[oe(uE,{size:13}),l(IE)]})})}var yI="text",Vt=[{id:"basics",label:"Basics",icon:oe(pE,{})},{id:"theme",label:"Theme",icon:oe(dE,{})},{id:"text",label:"Text",icon:oe(mE,{})}];function hE({themeFromDocument:e,persist:o}){let{appState:t,dispatch:r}=nf(u=>u),{theme:a,setTheme:n}=re(),s=t.data,i=s.root?.props??{},c=u=>{if(e){let p={...i,theme:u};r({type:"replaceRoot",root:{...s.root,props:p},recordHistory:!0})}else n(u);o({selected_preset:u.selected,theme_presets:u.themes})};return oe(rx,{value:e?i.theme:a,onChange:c})}function gE(e,o){let[t,r]=zn(null),a=bI(null),n=JSON.stringify(e),s=bI(o);return s.current=o,sE(()=>{if(a.current===null){a.current=n;return}if(a.current===n)return;a.current=n;let i=window.setTimeout(()=>r(s.current),700),c=window.setTimeout(()=>r(null),2200);return()=>{window.clearTimeout(i),window.clearTimeout(c)}},[n]),t}function bE({themeFromDocument:e,persist:o}){let{appState:t,dispatch:r}=nf(F=>F),[a,n]=zn(null),{fonts:s,setFonts:i,sizes:c,setSizes:u,headingCompression:p,setHeadingCompression:m,headingTypography:x,setHeadingTypography:g}=re(),C=t.data,w=C.root?.props??{},b=e?od(w.fonts):s,v=e?cd:c,S=e?bd(w.headingCompression):p,h=e?kd(w.headingTypography):x,k=F=>r({type:"replaceRoot",root:{...C.root,props:{...w,...F}},recordHistory:!0}),P=gE({curFonts:b,curCompression:S,curTypography:h},a);return oe(xI,{fonts:b,sizes:v,compression:S,headingTypography:h,openRole:a,onOpenRole:n,onFontChange:(F,A)=>{let O={...b,[F]:A};e?k({fonts:O}):i(O),o({heading_font:O.heading,body_font:O.body,accent_font:O.accent,label_font:O.label})},onSizeChange:e?void 0:(F,A)=>{let O={...v,[F]:A};u(O),o({heading_size_large_px:O.headingLarge,heading_size_medium_px:O.headingMedium,heading_size_small_px:O.headingSmall,accent_size_px:O.accent,body_size_px:O.body,label_size_px:O.label})},onCompressionChange:F=>{e?k({headingCompression:F}):m(F),o({heading_compression:F})},onHeadingTypographyChange:F=>{e?k({headingTypography:F}):g(F),o(Td(F))},livePx:SE,savedRole:P})}var yE={heading:"main h1, main h2",heading2:"main h1, main h2",heading3:"main h1, main h2",accent:"main h1 em, main h2 em",body:"main p",label:"main .mono-eyebrow"};function SE(e){if(typeof document>"u")return null;let o=(hI()?.contentDocument??document).querySelector(yE[e]);if(!o)return null;let t=parseFloat(getComputedStyle(o).fontSize);return Number.isFinite(t)?t:null}function CE({themeFromDocument:e,persist:o,showHint:t}){let{appState:r,dispatch:a}=nf(x=>x),{cornerRadiusPx:n,setCornerRadiusPx:s}=re(),i=r.data,c=i.root?.props??{},u=c.cornerRadiusPx===void 0?xd[md(c.cornerStyle)]:Co(c.cornerRadiusPx),p=e?u:n,m=x=>a({type:"replaceRoot",root:{...i.root,props:{...c,...x}},recordHistory:!0});return oe(ax,{value:p,onChange:x=>{e?m({cornerRadiusPx:x}):s(x),o({corner_radius_px:x})},showHint:t})}function vE(e){return{site_width:e}}function wE({persist:e,showHint:o}){let{siteWidth:t,setSiteWidth:r}=re();return oe(px,{value:t,onChange:a=>{r(a),e(vE(a),a===null)},showHint:o})}function kE(e){return{block_gap:e}}function TE(e){return{site_gutter:e}}function FE({persist:e,showHint:o}){let{siteGutter:t,setSiteGutter:r}=re();return oe(ux,{value:t,onChange:a=>{r(a),e(TE(a),a===null)},showHint:o})}function EE({persist:e,showHint:o}){let{blockGap:t,setBlockGap:r}=re();return oe(sx,{value:t,onChange:a=>{r(a),e(kE(a),a===null)},showHint:o})}function PE({persist:e,showHint:o}){let{heroBackgroundFollowsWidth:t,setHeroBackgroundFollowsWidth:r}=re();return oe(fx,{value:t,onChange:a=>{r(a),e({hero_background_follows_width:a},!0)},showHint:o})}function LE({persist:e,showHint:o=!0}){return Xt(jr,{children:[oe(wE,{persist:e,showHint:o}),oe(FE,{persist:e,showHint:o}),oe(EE,{persist:e,showHint:o}),oe(PE,{persist:e,showHint:o})]})}function RE(e){return{card_shadow:e}}function OE(e){return e===null?{shadow_color:null}:{shadow_color:gd(e)}}function AE(e){return{hover_effect:e}}function BE({persist:e,showHint:o=!0}){let{cardShadow:t,setCardShadow:r,shadowColor:a,setShadowColor:n,hoverEffect:s,setHoverEffect:i}=re();return Xt(jr,{children:[oe(nx,{value:t,onChange:c=>{r(c),e(RE(c),!0)},showHint:o}),oe(lx,{value:a,onChange:c=>{n(c),e(OE(c),c===null)},showHint:o}),oe(ix,{value:s,onChange:c=>{i(c),e(AE(c),!0)},showHint:o})]})}function DE(e){return{photography_grayscale:e}}function _E({persist:e,showHint:o}){let{photographyGrayscale:t,setPhotographyGrayscale:r}=re();return oe(dx,{value:t,onChange:a=>{r(a),e(DE(a),!0)},showHint:o})}function NE({persist:e,showHint:o=!0}){return oe(jr,{children:oe(_E,{persist:e,showHint:o})})}function Yt(){let{websiteName:e}=re();return e?.trim()||Ed}function Un({themeFromDocument:e=!1,tokenRef:o,siteId:t,onNotify:r,tab:a,onTabChange:n}){let{persist:s}=$a({themeFromDocument:e,tokenRef:o,siteId:t,onResult:w=>{let b=II(w);b&&r?.(b.msg,b.tone)}}),[i,c]=zn(Vt[0].id),u=a!==void 0,p=u?a:i,m=u?n??(()=>{}):c,x=Vt.find(w=>w.id===p)??Vt[0],[g,C]=zn(lf);return Xt(jr,{children:[oe(iE,{items:Vt.map(w=>({...w,label:l(w.label)})),activeId:x.id,onSelect:m,ariaLabel:l("Site styles"),idPrefix:af}),Xt("div",{id:cE(af,x.id),className:xE,role:"tabpanel","aria-labelledby":fE(af,x.id),children:[p==="basics"&&Xt(jr,{children:[oe(CE,{themeFromDocument:e,persist:s,showHint:g}),!e&&oe(BE,{persist:s,showHint:g}),!e&&oe(LE,{persist:s,showHint:g}),!e&&oe(NE,{persist:s,showHint:g}),oe(sf,{shown:g,onChange:C})]}),p==="theme"&&oe(hE,{themeFromDocument:e,persist:s}),p==="text"&&oe(bE,{themeFromDocument:e,persist:s})]})]})}import{InspectorIconButton as KE}from"efficient-easel/chrome";import{Button as FI,Dialog as VE,FormField as XE,Input as EI,toast as PI}from"efficient-shell/ui";import{LayersTree as YE,TreeGroupLabel as ZE,TreeRow as LI,TreeRowAction as xf}from"efficient-easel/tree";import{AddIcon as QE}from"efficient-easel/icons";import{PagesIcon as JE}from"efficient-easel/rail";var ff="Main Pages",ME="Dynamic Pages",cf="dynamic",HE="dynamic";function df(e){return e.kind===HE}function SI(e){let o=[],t=[];for(let r of e){if(df(r)){t.push(r);continue}let a=r.groupKey??(r.group?`folder:${r.group}`:"top"),n=o[o.length-1];n&&n.key===a?n.rows.push(r):o.push({key:a,label:r.group??ff,rows:[r]})}if(t.length){let r=o.findIndex(a=>a.key.startsWith("system:"));o.splice(r===-1?o.length:r,0,{key:cf,label:ME,rows:t})}return o}import{useCallback as qn,useEffect as WE,useSyncExternalStore as GE}from"react";var CI=new WeakMap;function Kr(e){let o=CI.get(e);return o||(o={rows:null,loading:null,listeners:new Set},CI.set(e,o)),o}function uf(e,o){e.rows=o;for(let t of e.listeners)t()}var $n=new Set;function jn(e,o){o?$n.add(e):$n.delete(e)}function vI(e){let o=Kr(e),t=e.listPages().then(r=>uf(o,$n.size?r.filter(a=>!$n.has(a.id)):r),()=>uf(o,[])).finally(()=>{o.loading===t&&(o.loading=null)});return o.loading=t,t}var wI=()=>null,zE=()=>()=>{};function pf(){let{adapter:e,ready:o}=we(),t=qn(i=>{let{listeners:c}=Kr(e);return c.add(i),()=>c.delete(i)},[e]),r=qn(()=>Kr(e).rows,[e]),a=GE(o?t:zE,o?r:wI,wI);WE(()=>{if(!o)return;let i=Kr(e);i.rows===null&&!i.loading&&vI(e)},[e,o]);let n=qn(()=>o?vI(e):Promise.resolve(),[e,o]),s=qn(i=>uf(Kr(e),i),[e]);return{rows:a,reload:n,setRows:s,getRows:r}}function UE(e,o){return e?.find(t=>t.slug===o)?.label?.trim()||`/${o}`}function kI(){let{currentSlug:e}=we(),{rows:o}=pf();return UE(o,e)}var RI="sf-editor-pages-collapsed-groups",eP=e=>e.toLowerCase().trim().replace(/[^a-z0-9]+/g,"-").replace(/^-+|-+$/g,""),OI=(e,o)=>{let t=eP(e)||"page";if(!o.has(t))return t;let r=2;for(;o.has(`${t}-${r}`);)r+=1;return`${t}-${r}`};function AI({onNavigate:e,onClose:o,activeSurface:t,onPreviewSurface:r}){let a=Be().chrome?.pageRows,n=kt(),{adapter:s,capabilities:i,ready:c,currentSlug:u}=we(),p=Yt(),{rows:m,reload:x,setRows:g,getRows:C}=pf(),[w,b]=Zt(""),[v,S]=Zt(!1),[h,k]=Zt(null),[P,F]=Zt(!1),[A,O]=Zt(""),B=jE(),[U,me]=Zt(()=>{if(typeof window>"u")return new Set;try{let E=window.localStorage.getItem(RI);return new Set(E?JSON.parse(E):[])}catch{return new Set}});$E(()=>{try{window.localStorage.setItem(RI,JSON.stringify([...U]))}catch{}},[U]);let j=E=>me(te=>{let X=new Set(te);return X.has(E)?X.delete(E):X.add(E),X}),he=TI(()=>SI(m??[]),[m]),_=w.trim().toLowerCase(),ne=E=>!_||E.toLowerCase().includes(_),Oe=E=>_?!0:!U.has(E),We=TI(()=>new Set((m??[]).map(E=>E.slug)),[m]),bo=()=>{if(i.pageCreationInAdminForm){n.send("storefront-editor:new-page");return}O(""),k(null),F(!0)},$e=async()=>{let E=A.trim();if(!(!E||!c||v||!s.createPage)){S(!0),k(null);try{let te=await s.createPage({slug:OI(E,We),title:E,layout:{}});await x(),F(!1),O(""),e(te.slug)}catch{k(l("Couldn\u2019t add the page \u2014 please retry."))}finally{S(!1)}}},Ae=E=>{let te=m??[],X=s.deletePage;if(!c||v||!X||te.length<=1)return;let Y=te.findIndex(Pe=>Pe.id===E.id),q=te.filter(Pe=>Pe.id!==E.id),ve=E.slug===u;jn(E.id,!0),g(q),k(null),ve&&q[0]&&e(q[0].slug);let Je=()=>{jn(E.id,!1);let Pe=C()??[];if(Pe.some(rt=>rt.id===E.id))return;let Wo=[...Pe];Wo.splice(Math.max(0,Math.min(Y,Wo.length)),0,E),g(Wo)};PI.undoable(l("Deleted \u201C{name}\u201D",{name:E.label}),{actionLabel:l("Undo"),commit:async Pe=>{await X(E.id,Pe),jn(E.id,!1)},undo:()=>{Je(),ve&&e(E.slug)},onFail:()=>{Je(),PI.error(l("Couldn\u2019t delete the page \u2014 please retry."))}})},Qe=E=>n.send("storefront-editor:open-page",{slug:E}),Ee=E=>{if(!ne(E.label))return null;let te=!t&&E.slug===u,X=i.canDeletePagesInline&&(m??[]).length>1,Y=df(E),q=E.kind==="lightbox",ve=Y||q||E.draft?Qt(mf,{children:[Y&&Q("span",{className:"sf-badge-dynamic",children:l("Dynamic")}),q&&Q("span",{className:"sf-badge-lightbox",children:l("Lightbox")}),E.draft&&Q("span",{className:"sf-page-draft",children:l("draft")})]}):void 0,Je=i.pageCreationInAdminForm||X?Qt(mf,{children:[i.pageCreationInAdminForm&&Q(xf,{kind:"plain",label:l("Edit \u201C{name}\u201D in {place}",{name:E.label,place:l("the admin")}),onClick:()=>Qe(E.slug),children:Q(ze,{name:"pencil",size:13,strokeWidth:1.7,rounded:!0})}),X&&Q(xf,{kind:"delete",label:l("Delete \u201C{name}\u201D",{name:E.label}),disabled:v,onClick:()=>Ae(E),children:Q(ze,{name:"trash",size:13,strokeWidth:1.7,rounded:!0})})]}):void 0;return Q(LI,{icon:Q(oP,{}),name:E.label,selected:te,onSelect:()=>e(E.slug),preview:ve,actions:Je,rowProps:{"data-page-slug":E.slug}},E.id)},fe=(E,te,X)=>{let Y=X.filter(Boolean);if(Y.length===0)return null;let q=Oe(E);return Qt(qE,{children:[Q(ZE,{count:Y.length,expanded:q,onToggle:()=>j(E),children:te}),q&&Y]},E)},ye=(a?.rows??[]).filter(E=>ne(E.label)).map(E=>{let te=t===E.key;return Q(LI,{icon:E.icon,name:E.label,selected:te,onSelect:()=>r(E.key),preview:Q("span",{className:"sf-badge-preview",children:l("Preview")}),actions:Q(xf,{kind:"plain",label:l("Open the {name} in a new tab",{name:E.label}),onClick:()=>window.open(E.href,"_blank","noopener,noreferrer"),children:Q(ze,{name:"external-link",size:13,strokeWidth:1.7,rounded:!0})}),rowProps:{"data-shop-surface":E.key}},E.key)}),xe=i.hasSiteSettings&&!!a,je=(()=>{if(m===null)return null;let E=[],te=!1;for(let X of he){xe&&!te&&X.key.startsWith("system:")&&(E.push(fe("shop",a.title,ye)),te=!0);let Y=X.key===cf||X.label===ff?l(X.label):X.label;E.push(fe(X.key,Y,X.rows.map(Ee)))}return xe&&!te&&E.push(fe("shop",a.title,ye)),E})();return Qt("div",{className:"sf-pages",children:[Q(Pa,{icon:Q(JE,{}),title:l("Pages"),context:p,actions:Q(KE,{label:l("New page"),onClick:bo,children:Q(QE,{size:15})}),onHide:o}),Q("div",{className:"sf-pages-find",children:Q(EI,{type:"search",leftIcon:Q(ze,{name:"search",size:14,rounded:!0}),placeholder:l("Search all pages\u2026"),value:w,onChange:E=>b(E.target.value),"aria-label":l("Search all pages")})}),h&&!P&&Q("div",{className:"sf-note sf-note--error",role:"alert",children:h}),je===null?Q("div",{className:"sf-note",children:l("Loading\u2026")}):je.some(Boolean)?Q(YE,{ariaLabel:l("Pages"),className:"sf-scroll",children:je}):Q("div",{className:"sf-note",children:w.trim()?l("No pages match your search"):l("No pages yet. Add one with + above.")}),Q(VE,{open:P,onClose:()=>F(!1),size:"sm",title:l("Add a page"),description:l("Give the new template page a name. It starts blank \u2014 add sections once it opens."),footer:Qt(mf,{children:[Q(FI,{variant:"secondary",onClick:()=>F(!1),children:l("Cancel")}),Q(FI,{onClick:()=>{$e()},disabled:v||!A.trim(),loading:v,children:l("Add page")})]}),children:Q(XE,{label:l("Page name"),htmlFor:B,hint:A.trim()?l("URL: /{slug}",{slug:OI(A,We)}):void 0,error:h??void 0,children:Q(EI,{id:B,value:A,invalid:!!h,onChange:E=>O(E.target.value),onKeyDown:E=>{E.key==="Enter"&&$e()},placeholder:l("e.g. About")})})})]})}function oP(){return Qt("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:[Q("path",{d:"M14 3H7a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2V8z"}),Q("path",{d:"M14 3v5h5"})]})}import{jsx as tP}from"react/jsx-runtime";import{createContext as rP,useCallback as aP,useContext as nP,useState as lP}from"react";var BI={enabled:!0,title:"",subtitle:"",greeting:""},DI=rP({chat:BI,setChat:()=>{},selected:!1,setSelected:()=>{},select:()=>{},setSelectHandler:()=>{}});function u7({children:e,chat:o=BI,onChatChange:t}){let[r,a]=lP(!1),n=aP(c=>t?.(c),[t]),{select:s,setSelectHandler:i}=Fd();return tP(DI.Provider,{value:{chat:o,setChat:n,selected:r,setSelected:a,select:s,setSelectHandler:i},children:e})}var Kn=()=>nP(DI);import{jsx as If}from"react/jsx-runtime";import{DesktopIcon as sP,PhoneIcon as iP,TabletIcon as fP}from"efficient-easel/icons";import{VIEW_DESKTOP_MIN as x7,VIEW_TABLET_MIN as I7,VIEW_TIER_LABEL as _I,VIEW_TIERS as NI,viewTierForWidth as h7}from"efficient-easel/screen/lib/content/view-tiers";var cP={desktop:If(sP,{}),tablet:If(fP,{}),mobile:If(iP,{})},MI=NI.map(e=>({id:e,get label(){return l(_I[e])},icon:cP[e]}));import{jsx as dP}from"react/jsx-runtime";import{createContext as uP,useCallback as HI,useContext as pP,useMemo as mP,useRef as xP}from"react";var IP=Object.fromEntries(va.map(e=>[e,{value:"",error:null}])),WI=uP({links:Ld,rows:IP,canSave:!1,saveLink:async()=>({ok:!1,error:"There is no website to save to."}),openPanel:()=>{},setOpenHandler:()=>{}});function F7({children:e,value:o}){let t=xP(()=>{}),r=HI(()=>t.current(),[]),a=HI(s=>{t.current=s},[]),n=mP(()=>({...o,openPanel:r,setOpenHandler:a}),[o,r,a]);return dP(WI.Provider,{value:n,children:e})}var Vr=()=>pP(WI);import{jsx as hP}from"react/jsx-runtime";import{createContext as gP,useContext as bP,useMemo as yP,useState as SP}from"react";var GI=gP(null);function R7({children:e}){let[o,t]=SP(null),r=yP(()=>({surface:o,setSurface:t}),[o]);return hP(GI.Provider,{value:r,children:e})}function zI(){return bP(GI)??{surface:null,setSurface:()=>{}}}var Xr="Scrolling Bar",{Provider:B7,useSelection:Vn}=Ca("selectedHeroId");import{jsx as J,jsxs as bt,Fragment as xc}from"react/jsx-runtime";import{useState as tA}from"react";import{useEasel as rA}from"efficient-easel/easel";import{headWords as aA,InspectorHead as nA,InspectorIconButton as $g}from"efficient-easel/chrome";import{DuplicateIcon as lA,TrashIcon as sA}from"efficient-easel/icons";import{panelFieldsOf as UI}from"efficient-easel/screen/lib/puck/panel-fields";import{jsx as T,Fragment as $,jsxs as K}from"react/jsx-runtime";import{BlockBannerIcon as wP,BlockBoxIcon as kP,BlockButtonIcon as TP,BlockDividerIcon as $I,BlockFooterIcon as jI,BlockHeadingIcon as FP,BlockProductIcon as EP,BlockSocialIcon as PP,BlockTextIcon as LP,ChatIcon as RP,GridIcon as OP,ImageIcon as AP,PageIcon as BP}from"efficient-easel/icons";import{jsx as hf,Fragment as CP,jsxs as vP}from"react/jsx-runtime";var qI=vP(CP,{children:[hf("circle",{cx:"9",cy:"20",r:"1.3"}),hf("circle",{cx:"18",cy:"20",r:"1.3"}),hf("path",{d:"M2.5 3.5h3l2.3 11.3a1.6 1.6 0 0 0 1.6 1.3h8.1a1.6 1.6 0 0 0 1.6-1.2L21 7H6"})]});var DP={header:K($,{children:[T("rect",{x:"3",y:"5",width:"18",height:"14",rx:"2"}),T("path",{d:"M3 9.5h18"})]}),website:K($,{children:[T("circle",{cx:"12",cy:"12",r:"9"}),T("path",{d:"M3 12h18M12 3c2.6 2.7 2.6 15.3 0 18M12 3c-2.6 2.7-2.6 15.3 0 18"})]}),social:K($,{children:[T("circle",{cx:"6",cy:"12",r:"2.5"}),T("circle",{cx:"18",cy:"6",r:"2.5"}),T("circle",{cx:"18",cy:"18",r:"2.5"}),T("path",{d:"M8.2 10.8l7.6-3.6M8.2 13.2l7.6 3.6"})]}),ticker:K($,{children:[T("rect",{x:"3",y:"8.5",width:"18",height:"7",rx:"2"}),T("path",{d:"M6 12h3.5M11.5 12h2M15.5 12h2.5"})]}),FooterLogo:K($,{children:[T("path",{d:"M4 15.5h6M4 18h4"}),T("path",{d:"M14 8.5l3 7 3-7"})]}),FooterMenu:T("path",{d:"M6 7h12M6 11h12M6 15h8M6 19h8"}),FooterGroup:K($,{children:[T("rect",{x:"4",y:"4",width:"16",height:"16",rx:"2",strokeDasharray:"3 2.5"}),T("path",{d:"M8 9h8M8 13h8M8 16h5"})]}),FooterText:T("path",{d:"M5 7h14M5 12h14M5 17h9"}),FooterEmailSignup:K($,{children:[T("rect",{x:"3",y:"6",width:"18",height:"12",rx:"2"}),T("path",{d:"M3.5 7l8.5 6 8.5-6"})]}),SearchBlock:K($,{children:[T("circle",{cx:"11",cy:"11",r:"6"}),T("path",{d:"M20 20l-4.2-4.2"})]}),CartBlock:qI,CountrySwitchBlock:K($,{children:[T("circle",{cx:"12",cy:"12",r:"8.5"}),T("path",{d:"M3.5 12h17M12 3.5c2.6 2.4 3.6 5.2 3.6 8.5s-1 6.1-3.6 8.5M12 3.5c-2.6 2.4-3.6 5.2-3.6 8.5s1 6.1 3.6 8.5"})]}),LegalLineBlock:K($,{children:[T("path",{d:"M3 9h18"}),T("path",{d:"M3 14h8M14 14h2M18 14h3"})]}),Hero:K($,{children:[T("rect",{x:"3",y:"4",width:"18",height:"16",rx:"2"}),T("path",{d:"M7 13.5h7M7 16.5h10"})]}),HeroSlide:K($,{children:[T("rect",{x:"3",y:"5",width:"18",height:"14",rx:"2"}),T("path",{d:"M7 15h6M16 9.5h.01M9.5 12l-2.5 3"})]}),HeroSingle:K($,{children:[T("rect",{x:"3",y:"4",width:"18",height:"16",rx:"2"}),T("path",{d:"M10.5 8.5l4 2.5-4 2.5z"}),T("path",{d:"M7 17h7"})]}),Collections:K($,{children:[T("rect",{x:"3",y:"5",width:"4.6",height:"14",rx:"1.3"}),T("rect",{x:"9.7",y:"5",width:"4.6",height:"14",rx:"1.3"}),T("rect",{x:"16.4",y:"5",width:"4.6",height:"14",rx:"1.3"})]}),CollectionCard:K($,{children:[T("rect",{x:"6",y:"4",width:"12",height:"16",rx:"2"}),T("path",{d:"M9 15h6M9 17.5h4"})]}),AlloyWheelsListing:K($,{children:[T("path",{d:"M3 5h5M3 9h5M3 13h5M3 17h5"}),T("rect",{x:"11.5",y:"5",width:"4.2",height:"5",rx:"1"}),T("rect",{x:"17.3",y:"5",width:"4.2",height:"5",rx:"1"}),T("rect",{x:"11.5",y:"12",width:"4.2",height:"5",rx:"1"}),T("rect",{x:"17.3",y:"12",width:"4.2",height:"5",rx:"1"})]}),CatalogFilterBar:K($,{children:[T("path",{d:"M3 7h9M15.5 7H21"}),T("circle",{cx:"13.5",cy:"7",r:"1.7"}),T("path",{d:"M3 12h4M10.5 12H21"}),T("circle",{cx:"8.5",cy:"12",r:"1.7"}),T("path",{d:"M3 17h9M15.5 17H21"}),T("circle",{cx:"13.5",cy:"17",r:"1.7"})]}),ProductGrid:K($,{children:[T("rect",{x:"3",y:"5",width:"4.8",height:"6",rx:"1"}),T("rect",{x:"9.6",y:"5",width:"4.8",height:"6",rx:"1"}),T("rect",{x:"16.2",y:"5",width:"4.8",height:"6",rx:"1"}),T("rect",{x:"3",y:"13",width:"4.8",height:"6",rx:"1"}),T("rect",{x:"9.6",y:"13",width:"4.8",height:"6",rx:"1"}),T("rect",{x:"16.2",y:"13",width:"4.8",height:"6",rx:"1"})]}),RelatedProducts:K($,{children:[T("path",{d:"M3 5h10"}),T("rect",{x:"3",y:"9.5",width:"5",height:"9",rx:"1"}),T("rect",{x:"9.5",y:"9.5",width:"5",height:"9",rx:"1"}),T("rect",{x:"16",y:"9.5",width:"5",height:"9",rx:"1"})]}),Gallery:K($,{children:[T("rect",{x:"3",y:"4",width:"11",height:"16",rx:"2"}),T("rect",{x:"15.5",y:"4",width:"5.5",height:"7.5",rx:"1.5"}),T("rect",{x:"15.5",y:"12.5",width:"5.5",height:"7.5",rx:"1.5"})]}),GalleryB:K($,{children:[T("rect",{x:"3.5",y:"4",width:"7.5",height:"7.5",rx:"1.5"}),T("rect",{x:"13",y:"4",width:"7.5",height:"7.5",rx:"1.5"}),T("rect",{x:"3.5",y:"12.5",width:"7.5",height:"7.5",rx:"1.5"}),T("rect",{x:"13",y:"12.5",width:"7.5",height:"7.5",rx:"1.5"})]}),GalleryItem:K($,{children:[T("rect",{x:"4",y:"5",width:"16",height:"14",rx:"2"}),T("circle",{cx:"9",cy:"10",r:"1.6"}),T("path",{d:"M20 15.5l-4.5-4L7 19"})]}),Events:K($,{children:[T("rect",{x:"4",y:"5",width:"16",height:"15",rx:"2"}),T("path",{d:"M4 9.5h16M8.5 3v4M15.5 3v4M8 14h2M14 14h2"})]}),PostCard:K($,{children:[T("rect",{x:"4",y:"3.5",width:"16",height:"17",rx:"2"}),T("rect",{x:"6.5",y:"6",width:"11",height:"6",rx:"1"}),T("path",{d:"M6.5 14.5h11M6.5 17.5h7"})]}),Manifesto:K($,{children:[T("path",{d:"M7 8h3.2v4c0 1.6-1 2.6-3 3.2"}),T("path",{d:"M14 8h3.2v4c0 1.6-1 2.6-3 3.2"})]}),Stats:K($,{children:[T("path",{d:"M3.5 20h17"}),T("path",{d:"M6 20v-7M11 20V7M16 20v-5M20.5 20v-9"})]}),Logos:K($,{children:[T("circle",{cx:"6",cy:"12",r:"2.6"}),T("rect",{x:"10",y:"9.4",width:"5.2",height:"5.2",rx:"1.2"}),T("path",{d:"M19 9.2l2.4 5h-4.8z"})]}),Ticker:K($,{children:[T("rect",{x:"3",y:"8.5",width:"18",height:"7",rx:"2"}),T("path",{d:"M6 12h3.5M11.5 12h2M15.5 12h2.5"})]}),SectionHeader:K($,{children:[T("rect",{x:"3.5",y:"6",width:"5",height:"5",rx:"1.2"}),T("path",{d:"M11 8.5h9M3.5 15.5h17"})]}),IntroBleed:K($,{children:[T("rect",{x:"3",y:"4",width:"18",height:"16",rx:"2"}),T("path",{d:"M3 13.5h18M7 16.8h6"})]}),Split:K($,{children:[T("rect",{x:"3",y:"5",width:"8",height:"14",rx:"1.5"}),T("path",{d:"M14 8.5h6M14 12h6M14 15.5h4"})]}),Eyebrow:K($,{children:[T("path",{d:"M4 8.5h4.5M11 8.5h9"}),T("path",{d:"M4 14.5h16"})]}),HeroGroup:K($,{children:[T("rect",{x:"3.5",y:"4.5",width:"17",height:"15",rx:"2"}),T("path",{d:"M7 9h8M7 12.5h10M7 16h6"})]}),Form:K($,{children:[T("rect",{x:"3",y:"4",width:"18",height:"16",rx:"2"}),T("path",{d:"M6.5 9h11M6.5 12.5h11"}),T("rect",{x:"6.5",y:"15",width:"6.5",height:"2.6",rx:"1.3"})]}),LogoBlock:T($,{children:T("path",{d:"M12 3.5l7.5 3.2v5.1c0 4.2-3.2 7.1-7.5 8.7-4.3-1.6-7.5-4.5-7.5-8.7V6.7z"})}),Spacer:K($,{children:[T("path",{d:"M12 4v6M9.5 6.5L12 4l2.5 2.5M12 20v-6M9.5 17.5L12 20l2.5-2.5"}),T("path",{d:"M5 13h14",strokeDasharray:"2 2.5"})]}),ContactRouting:K($,{children:[T("rect",{x:"3",y:"4",width:"5",height:"5",rx:"1"}),T("rect",{x:"9.5",y:"4",width:"5",height:"5",rx:"1"}),T("rect",{x:"16",y:"4",width:"5",height:"5",rx:"1"}),T("path",{d:"M4 13.5h11M4 17.5h7"}),T("path",{d:"M17 15l3 2-3 2"})]}),CustomHTML:T("path",{d:"M9 8l-4 4 4 4M15 8l4 4-4 4"})},_P=T("rect",{x:"4",y:"4",width:"16",height:"16",rx:"2.5"}),NP={footer:jI,Footer:jI,Divider:$I,FooterDivider:$I,Banner:wP,Flex:kP,FooterSocial:PP,page:BP,chat:RP,Heading:FP,Text:LP,ImageBlock:AP,ButtonBlock:TP,Grid:OP,ProductRef:EP},MP={MenuBlock:"FooterMenu",EmailFormBlock:"FooterEmailSignup",SocialLogosBlock:"FooterSocial",SiteHeader:"header",SiteFooter:"footer"};function Jt({type:e,size:o=16,className:t}){let r=MP[e]??e,a=NP[r];return a?T(a,{size:o,className:t}):T("svg",{width:o,height:o,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:1.7,strokeLinecap:"round",strokeLinejoin:"round",className:t,"aria-hidden":"true",children:DP[r]??_P})}import{jsx as so,Fragment as HP,jsxs as WP}from"react/jsx-runtime";import{useEffect as GP,useId as zP,useState as UP}from"react";import{SettingsField as KI,SettingsSwitch as qP}from"efficient-easel/panel";import{EyeIcon as $P,TypeIcon as jP}from"efficient-easel/icons";var KP="Chat with us",VP="We usually reply within a few minutes",XP="Hi! Ask us anything \u2014 about a wheel, an order, or fitment. Leave your details and we\u2019ll reply.";function gf({label:e,value:o,placeholder:t,onCommit:r,multiline:a=!1}){let[n,s]=UP(o);GP(()=>s(o),[o]);let i=()=>{n!==o&&r(n)};return so(KI,{label:e,icon:so(jP,{}),children:a?so("textarea",{value:n,placeholder:t,rows:3,onChange:c=>s(c.target.value),onBlur:i,"aria-label":e}):so("input",{type:"text",value:n,placeholder:t,onChange:c=>s(c.target.value),onBlur:i,onKeyDown:c=>{c.key==="Enter"&&c.currentTarget.blur()},"aria-label":e,autoComplete:"off"})})}function VI(){let{chat:e,setChat:o}=Kn(),t=zP();return WP(HP,{children:[so(KI,{label:l("Show the chat bubble"),labelId:t,icon:so($P,{}),action:so(qP,{checked:e.enabled,onChange:r=>o({enabled:r}),ariaLabelledBy:t}),hint:e.enabled?l("The floating chat bubble shows in the corner of every page."):l("The chat bubble is hidden across the whole site.")}),so(Or,{label:"Wording"}),so(gf,{label:l("Title"),value:e.title,placeholder:KP,onCommit:r=>o({title:r})}),so(gf,{label:l("Subtitle"),value:e.subtitle,placeholder:VP,onCommit:r=>o({subtitle:r})}),so(gf,{label:l("Greeting message"),value:e.greeting,placeholder:XP,onCommit:r=>o({greeting:r}),multiline:!0}),so("p",{className:"es-field-hint sf-hint-keep",children:l("Leave a field blank to use the built-in wording.")})]})}import{jsx as gt,Fragment as Wf,jsxs as JI}from"react/jsx-runtime";import{useEffect as kL,useId as ZI,useState as QI}from"react";import{SettingsField as TL}from"efficient-easel/panel";import{jsx as IL}from"react/jsx-runtime";import{forwardRef as YP,createElement as bf}from"react";var XI={outline:{xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},filled:{xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"currentColor",stroke:"none"}};var H=(e,o,t,r)=>{let a=YP(({color:n="currentColor",size:s=24,stroke:i=2,title:c,className:u,children:p,...m},x)=>bf("svg",{ref:x,...XI[e],width:s,height:s,className:["tabler-icon",`tabler-icon-${o}`,u].filter(Boolean).join(" "),...e==="filled"?{fill:n}:{strokeWidth:i,stroke:n},...m},[c&&bf("title",{key:"svg-title"},c),...r.map(([g,C])=>bf(g,C)),...Array.isArray(p)?p:[p]]));return a.displayName=`${t}`,a};var ZP=[["path",{d:"M7 10v4h3v7h4v-7h3l1 -4h-4v-2a1 1 0 0 1 1 -1h3v-4h-3a5 5 0 0 0 -5 5v2h-3",key:"svg-0"}]],yf=H("outline","brand-facebook","BrandFacebook",ZP);var QP=[["path",{d:"M3 7a4 4 0 0 1 4 -4h10a4 4 0 0 1 4 4v10a4 4 0 0 1 -4 4h-10a4 4 0 0 1 -4 -4l0 -10",key:"svg-0"}],["path",{d:"M8.5 12a3.5 3.5 0 1 0 7 0a3.5 3.5 0 0 0 -7 0",key:"svg-1"}],["path",{d:"M17 7v.01",key:"svg-2"}]],Sf=H("outline","brand-instagram","BrandInstagram",QP);var JP=[["path",{d:"M21 10.663c0 -4.224 -4.041 -7.663 -9 -7.663s-9 3.439 -9 7.663c0 3.783 3.201 6.958 7.527 7.56c1.053 .239 .932 .644 .696 2.133c-.039 .238 -.184 .932 .777 .512c.96 -.42 5.18 -3.201 7.073 -5.48c1.304 -1.504 1.927 -3.029 1.927 -4.715v-.01",key:"svg-0"}]],Cf=H("outline","brand-line","BrandLine",JP);var eL=[["path",{d:"M8 11v5",key:"svg-0"}],["path",{d:"M8 8v.01",key:"svg-1"}],["path",{d:"M12 16v-5",key:"svg-2"}],["path",{d:"M16 16v-3a2 2 0 1 0 -4 0",key:"svg-3"}],["path",{d:"M3 7a4 4 0 0 1 4 -4h10a4 4 0 0 1 4 4v10a4 4 0 0 1 -4 4h-10a4 4 0 0 1 -4 -4l0 -10",key:"svg-4"}]],vf=H("outline","brand-linkedin","BrandLinkedin",eL);var oL=[["path",{d:"M8 20l4 -9",key:"svg-0"}],["path",{d:"M10.7 14c.437 1.263 1.43 2 2.55 2c2.071 0 3.75 -1.554 3.75 -4a5 5 0 1 0 -9.7 1.7",key:"svg-1"}],["path",{d:"M3 12a9 9 0 1 0 18 0a9 9 0 1 0 -18 0",key:"svg-2"}]],wf=H("outline","brand-pinterest","BrandPinterest",oL);var tL=[["path",{d:"M15 10l-4 4l6 6l4 -16l-18 7l4 2l2 6l3 -4",key:"svg-0"}]],kf=H("outline","brand-telegram","BrandTelegram",tL);var rL=[["path",{d:"M21 7.917v4.034a9.948 9.948 0 0 1 -5 -1.951v4.5a6.5 6.5 0 1 1 -8 -6.326v4.326a2.5 2.5 0 1 0 4 2v-11.5h4.083a6.005 6.005 0 0 0 4.917 4.917",key:"svg-0"}]],Tf=H("outline","brand-tiktok","BrandTiktok",rL);var aL=[["path",{d:"M16.5 10c3.038 0 5.5 2.015 5.5 4.5c0 1.397 -.778 2.645 -2 3.47l0 2.03l-1.964 -1.178a6.649 6.649 0 0 1 -1.536 .178c-3.038 0 -5.5 -2.015 -5.5 -4.5s2.462 -4.5 5.5 -4.5",key:"svg-0"}],["path",{d:"M11.197 15.698c-.69 .196 -1.43 .302 -2.197 .302a8.008 8.008 0 0 1 -2.612 -.432l-2.388 1.432v-2.801c-1.237 -1.082 -2 -2.564 -2 -4.199c0 -3.314 3.134 -6 7 -6c3.782 0 6.863 2.57 7 5.785l0 .233",key:"svg-1"}],["path",{d:"M10 8h.01",key:"svg-2"}],["path",{d:"M7 8h.01",key:"svg-3"}],["path",{d:"M15 14h.01",key:"svg-4"}],["path",{d:"M18 14h.01",key:"svg-5"}]],Ff=H("outline","brand-wechat","BrandWechat",aL);var nL=[["path",{d:"M3 21l1.65 -3.8a9 9 0 1 1 3.4 2.9l-5.05 .9",key:"svg-0"}],["path",{d:"M9 10a.5 .5 0 0 0 1 0v-1a.5 .5 0 0 0 -1 0v1a5 5 0 0 0 5 5h1a.5 .5 0 0 0 0 -1h-1a.5 .5 0 0 0 0 1",key:"svg-1"}]],Ef=H("outline","brand-whatsapp","BrandWhatsapp",nL);var lL=[["path",{d:"M4 4l11.733 16h4.267l-11.733 -16l-4.267 0",key:"svg-0"}],["path",{d:"M4 20l6.768 -6.768m2.46 -2.46l6.772 -6.772",key:"svg-1"}]],Pf=H("outline","brand-x","BrandX",lL);var sL=[["path",{d:"M2 8a4 4 0 0 1 4 -4h12a4 4 0 0 1 4 4v8a4 4 0 0 1 -4 4h-12a4 4 0 0 1 -4 -4v-8",key:"svg-0"}],["path",{d:"M10 9l5 3l-5 3l0 -6",key:"svg-1"}]],Lf=H("outline","brand-youtube","BrandYoutube",sL);var iL=[["path",{d:"M18 2a1 1 0 0 1 .993 .883l.007 .117v4a1 1 0 0 1 -.883 .993l-.117 .007h-3v1h3a1 1 0 0 1 .991 1.131l-.02 .112l-1 4a1 1 0 0 1 -.858 .75l-.113 .007h-2v6a1 1 0 0 1 -.883 .993l-.117 .007h-4a1 1 0 0 1 -.993 -.883l-.007 -.117v-6h-2a1 1 0 0 1 -.993 -.883l-.007 -.117v-4a1 1 0 0 1 .883 -.993l.117 -.007h2v-1a6 6 0 0 1 5.775 -5.996l.225 -.004h3z",key:"svg-0"}]],Rf=H("filled","brand-facebook-filled","BrandFacebookFilled",iL);var fL=[["path",{d:"M16 3a5 5 0 0 1 5 5v8a5 5 0 0 1 -5 5h-8a5 5 0 0 1 -5 -5v-8a5 5 0 0 1 5 -5zm-4 5a4 4 0 0 0 -3.995 3.8l-.005 .2a4 4 0 1 0 4 -4m4.5 -1.5a1 1 0 0 0 -.993 .883l-.007 .127a1 1 0 0 0 1.993 .117l.007 -.127a1 1 0 0 0 -1 -1",key:"svg-0"}]],Of=H("filled","brand-instagram-filled","BrandInstagramFilled",fL);var cL=[["path",{d:"M17 2a5 5 0 0 1 5 5v10a5 5 0 0 1 -5 5h-10a5 5 0 0 1 -5 -5v-10a5 5 0 0 1 5 -5zm-9 8a1 1 0 0 0 -1 1v5a1 1 0 0 0 2 0v-5a1 1 0 0 0 -1 -1m6 0a3 3 0 0 0 -1.168 .236l-.125 .057a1 1 0 0 0 -1.707 .707v5a1 1 0 0 0 2 0v-3a1 1 0 0 1 2 0v3a1 1 0 0 0 2 0v-3a3 3 0 0 0 -3 -3m-6 -3a1 1 0 0 0 -.993 .883l-.007 .127a1 1 0 0 0 1.993 .117l.007 -.127a1 1 0 0 0 -1 -1",key:"svg-0"}]],Af=H("filled","brand-linkedin-filled","BrandLinkedinFilled",cL);var dL=[["path",{d:"M17 3.34a10 10 0 0 1 -8.512 18.023l2.364 -5.315a3.5 3.5 0 0 0 2.398 .952c2.708 0 4.75 -2.089 4.75 -5a6 6 0 1 0 -11.64 2.041a1 1 0 1 0 1.88 -.682a4 4 0 1 1 7.76 -1.36c0 1.818 -1.156 3.001 -2.75 3.001c-.609 0 -1.153 -.361 -1.478 -1.022l1.142 -2.572a1 1 0 0 0 -1.828 -.812l-4.392 9.882a10 10 0 0 1 -4.694 -8.476l.005 -.324a10 10 0 0 1 14.995 -8.336",key:"svg-0"}]],Bf=H("filled","brand-pinterest-filled","BrandPinterestFilled",dL);var uL=[["path",{d:"M16.083 2h-4.083a1 1 0 0 0 -1 1v11.5a1.5 1.5 0 1 1 -2.519 -1.1l.12 -.1a1 1 0 0 0 .399 -.8v-4.326a1 1 0 0 0 -1.23 -.974a7.5 7.5 0 0 0 1.73 14.8l.243 -.005a7.5 7.5 0 0 0 7.257 -7.495v-2.7l.311 .153c1.122 .53 2.333 .868 3.59 .993a1 1 0 0 0 1.099 -.996v-4.033a1 1 0 0 0 -.834 -.986a5.005 5.005 0 0 1 -4.097 -4.096a1 1 0 0 0 -.986 -.835z",key:"svg-0"}]],Df=H("filled","brand-tiktok-filled","BrandTiktokFilled",uL);var pL=[["path",{d:"M18.497 4.409a10 10 0 0 1 -10.36 16.828l-.223 -.098l-4.759 .849l-.11 .011a1 1 0 0 1 -.11 0l-.102 -.013l-.108 -.024l-.105 -.037l-.099 -.047l-.093 -.058l-.014 -.011l-.012 -.007l-.086 -.073l-.077 -.08l-.067 -.088l-.056 -.094l-.034 -.07l-.04 -.108l-.028 -.128l-.012 -.102a1 1 0 0 1 0 -.125l.012 -.1l.024 -.11l.045 -.122l1.433 -3.304l-.009 -.014a10 10 0 0 1 1.549 -12.454l.215 -.203a10 10 0 0 1 13.226 -.217m-8.997 3.09a1.5 1.5 0 0 0 -1.5 1.5v1a6 6 0 0 0 6 6h1a1.5 1.5 0 0 0 0 -3h-1l-.144 .007a1.5 1.5 0 0 0 -1.128 .697l-.042 .074l-.022 -.007a4.01 4.01 0 0 1 -2.435 -2.435l-.008 -.023l.075 -.041a1.5 1.5 0 0 0 .704 -1.272v-1a1.5 1.5 0 0 0 -1.5 -1.5",key:"svg-0"}]],_f=H("filled","brand-whatsapp-filled","BrandWhatsappFilled",pL);var mL=[["path",{d:"M8.267 3a1 1 0 0 1 .73 .317l.076 .092l4.274 5.828l5.946 -5.944a1 1 0 0 1 1.497 1.32l-.083 .094l-6.163 6.162l6.262 8.54a1 1 0 0 1 -.697 1.585l-.109 .006h-4.267a1 1 0 0 1 -.73 -.317l-.076 -.092l-4.276 -5.829l-5.944 5.945a1 1 0 0 1 -1.497 -1.32l.083 -.094l6.161 -6.163l-6.26 -8.539a1 1 0 0 1 .697 -1.585l.109 -.006h4.267z",key:"svg-0"}]],Nf=H("filled","brand-x-filled","BrandXFilled",mL);var xL=[["path",{d:"M18 3a5 5 0 0 1 5 5v8a5 5 0 0 1 -5 5h-12a5 5 0 0 1 -5 -5v-8a5 5 0 0 1 5 -5zm-9 6v6a1 1 0 0 0 1.514 .857l5 -3a1 1 0 0 0 0 -1.714l-5 -3a1 1 0 0 0 -1.514 .857z",key:"svg-0"}]],Mf=H("filled","brand-youtube-filled","BrandYoutubeFilled",xL);var fq="outline",Xn={fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},hL={},Hf={fillRule:"evenodd"},gL=[["path",{...Xn,d:"M21 4L3 11L7 13L9 19L12 15L17 20z"}],["path",{...Hf,d:"M21 4L3 11L7 13L9 19L12 15L17 20zM15.212 8.939 10.576 13.576 11.424 14.424 16.061 9.788z"}]],bL=[["path",{...Xn,d:["M21 10.663c0 -4.224 -4.041 -7.663 -9 -7.663s-9 3.439 -9 7.663","c0 3.783 3.201 6.958 7.527 7.56c1.053 .239 .932 .644 .696 2.133","c-.039 .238 -.184 .932 .777 .512c.96 -.42 5.18 -3.201 7.073 -5.48","c1.304 -1.504 1.927 -3.029 1.927 -4.715v-.01z"].join("")}],["path",{...hL,d:["M21 10.663c0 -4.224 -4.041 -7.663 -9 -7.663s-9 3.439 -9 7.663","c0 3.783 3.201 6.958 7.527 7.56c1.053 .239 .932 .644 .696 2.133","c-.039 .238 -.184 .932 .777 .512c.96 -.42 5.18 -3.201 7.073 -5.48","c1.304 -1.504 1.927 -3.029 1.927 -4.715v-.01z"].join("")}]],yL=[["path",{...Xn,d:["M16.5 10c3.038 0 5.5 2.015 5.5 4.5c0 1.397 -.778 2.645 -2 3.47l0 2.03l-1.964 -1.178","a6.649 6.649 0 0 1 -1.536 .178c-3.038 0 -5.5 -2.015 -5.5 -4.5s2.462 -4.5 5.5 -4.5z"].join("")}],["path",{...Xn,d:["M8.319 15.972L7.84 15.918L7.349 15.832L6.865 15.715L6.388 15.568L4 17L4 14.199","L3.559 13.775L3.197 13.356L2.877 12.91L2.603 12.439L2.376 11.946L2.201 11.433","L2.079 10.902L2.016 10.405L2.001 9.897L2.036 9.386L2.12 8.889L2.25 8.405L2.425 7.937","L2.642 7.486L2.9 7.055L3.195 6.645L3.459 6.333L3.744 6.037L4.05 5.757L4.377 5.495","L4.723 5.25L5.086 5.025L5.467 4.819L5.864 4.634L6.275 4.471L6.701 4.331L7.139 4.214","L7.589 4.122L8.05 4.055L8.521 4.014L9.352 4.007L9.815 4.04L10.269 4.098L10.713 4.181","L11.146 4.287L11.567 4.416L11.975 4.567L12.369 4.739L12.748 4.932L13.112 5.143","L13.459 5.374L13.788 5.622L14.172 5.956L14.458 6.241L14.722 6.542L14.965 6.856","L15.217 7.237A8.35 7.35 0 0 0 8.319 15.972z"].join("")}],["path",{...Hf,d:["M8.319 15.972L7.84 15.918L7.349 15.832L6.865 15.715L6.388 15.568L4 17L4 14.199","L3.559 13.775L3.197 13.356L2.877 12.91L2.603 12.439L2.376 11.946L2.201 11.433","L2.079 10.902L2.016 10.405L2.001 9.897L2.036 9.386L2.12 8.889L2.25 8.405L2.425 7.937","L2.642 7.486L2.9 7.055L3.195 6.645L3.459 6.333L3.744 6.037L4.05 5.757L4.377 5.495","L4.723 5.25L5.086 5.025L5.467 4.819L5.864 4.634L6.275 4.471L6.701 4.331L7.139 4.214","L7.589 4.122L8.05 4.055L8.521 4.014L9.352 4.007L9.815 4.04L10.269 4.098L10.713 4.181","L11.146 4.287L11.567 4.416L11.975 4.567L12.369 4.739L12.748 4.932L13.112 5.143","L13.459 5.374L13.788 5.622L14.172 5.956L14.458 6.241L14.722 6.542L14.965 6.856","L15.217 7.237A8.35 7.35 0 0 0 8.319 15.972zM5.25 7.9a0.85 0.85 0 1 0 1.7 0","a0.85 0.85 0 1 0 -1.7 0zM8.25 7.9a0.85 0.85 0 1 0 1.7 0a0.85 0.85 0 1 0 -1.7 0z"].join("")}],["path",{...Hf,d:["M16.5 10c3.038 0 5.5 2.015 5.5 4.5c0 1.397 -.778 2.645 -2 3.47l0 2.03l-1.964 -1.178","a6.649 6.649 0 0 1 -1.536 .178c-3.038 0 -5.5 -2.015 -5.5 -4.5s2.462 -4.5 5.5 -4.5z","M14.15 14a0.85 0.85 0 1 0 1.7 0a0.85 0.85 0 1 0 -1.7 0zM17.15 14","a0.85 0.85 0 1 0 1.7 0a0.85 0.85 0 1 0 -1.7 0z"].join("")}]],SL=H("filled","brand-telegram-filled","BrandTelegramFilled",gL),CL=H("filled","brand-line-filled","BrandLineFilled",bL),vL=H("filled","brand-wechat-filled","BrandWechatFilled",yL),wL={instagram:{outline:Sf,solid:Of},facebook:{outline:yf,solid:Rf},tiktok:{outline:Tf,solid:Df},youtube:{outline:Lf,solid:Mf},x:{outline:Pf,solid:Nf},linkedin:{outline:vf,solid:Af},pinterest:{outline:wf,solid:Bf},whatsapp:{outline:Ef,solid:_f},telegram:{outline:kf,solid:SL},line:{outline:Cf,solid:CL},wechat:{outline:Ff,solid:vL}};function YI({platform:e,iconStyle:o,size:t}){let r=wL[e][o];return IL(r,{size:t,stroke:1.75,"aria-hidden":"true",focusable:"false"})}var FL={instagram:"instagram.com/yourshop",facebook:"facebook.com/yourshop",tiktok:"tiktok.com/@yourshop",youtube:"youtube.com/@yourshop",x:"x.com/yourshop",linkedin:"linkedin.com/company/yourshop",pinterest:"pinterest.com/yourshop",whatsapp:"wa.me/61400000000",telegram:"t.me/yourshop",line:"line.me/ti/p/~yourshop",wechat:"u.wechat.com/your-qr-code-link"};function EL({platform:e}){let{rows:o,saveLink:t}=Vr(),{value:r,error:a}=o[e],[n,s]=QI(r),[i,c]=QI(!1),u=ZI(),p=ZI();kL(()=>s(r),[r]);let m=async()=>{if(n.trim()===r){n!==r&&s(r);return}c(!0),await t(e,n),c(!1)},x=Pd[e];return JI(Wf,{children:[gt(TL,{label:l(x),htmlFor:u,icon:gt(YI,{platform:e,iconStyle:"outline",size:18}),children:gt("input",{id:u,type:"text",inputMode:"url",value:n,placeholder:FL[e],onChange:g=>s(g.target.value),onBlur:()=>{m()},onKeyDown:g=>{g.key==="Enter"&&g.currentTarget.blur(),g.key==="Escape"&&(s(r),g.currentTarget.blur())},"aria-invalid":a?!0:void 0,"aria-describedby":a?p:void 0,"aria-busy":i||void 0,autoComplete:"off",spellCheck:!1})}),a&>("p",{id:p,className:"sf-note sf-note--error",role:"alert",children:a})]})}function eh({unavailable:e}){let{canSave:o}=Vr();return!o&&e?gt(Wf,{children:e}):JI(Wf,{children:[gt("p",{className:"es-field-hint sf-hint-keep",children:l("Paste a link to each profile. A platform left empty shows nothing on the site.")}),va.map(t=>gt(EL,{platform:t},t))]})}import{jsx as rr,jsxs as iO}from"react/jsx-runtime";import{useId as fO,useMemo as cO}from"react";import{useEasel as dO}from"efficient-easel/easel";import{SettingsField as uO,SettingsSwitch as pO}from"efficient-easel/panel";import{EyeIcon as mO}from"efficient-easel/icons";import{jsx as Oo,jsxs as al}from"react/jsx-runtime";import{useCallback as or,useEffect as tr,useId as oO,useRef as No,useState as ra}from"react";var oh="data-puck-overlay-portal";function Yn(e){return e.setAttribute(oh,"true"),()=>e.removeAttribute(oh)}import{jsx as Jr,jsxs as bh}from"react/jsx-runtime";var Gf="small",zf="dot",PL=[{label:"Small",value:"small"},{label:"Display",value:"display"}],LL=[{label:"Dot \u25CF",value:"dot"},{label:"Cross \u2715",value:"cross"},{label:"Slash /",value:"slash"},{label:"Triangle \u25BC",value:"triangle"},{label:"None",value:"none"}],th={dot:"\u25CF",cross:"\u2715",slash:"/",triangle:"\u25BC",none:""},RL={small:"font-mono text-[length:var(--size-label,14px)] uppercase tracking-[0.25em] max-[800px]:text-[length:var(--size-label,12px)]",display:"font-display font-medium text-[length:var(--size-headingMedium,44px)] uppercase leading-none tracking-[0.005em] max-[800px]:text-[length:var(--size-headingMedium,28px)]"},OL={small:{dot:"",cross:"text-[0.77em]",slash:"text-[0.77em]",triangle:"",none:""},display:{dot:"text-[0.3em]",cross:"text-[0.64em]",slash:"text-[0.64em]",triangle:"text-[0.3em]",none:""}};function rh(e){return to(PL,Gf,e)}function ah(e){return to(LL,zf,e)}function nh(e){return RL[e]}function lh(e,o){return OL[e][o]}var Uf="left",AL=[{label:"Left",value:"left",cell:"left"},{label:"Right",value:"right",cell:"right"},{label:"Up",value:"up",cell:"top"},{label:"Down",value:"down",cell:"bottom"}],BL={left:"storefront-ticker",right:"storefront-ticker-right",up:"storefront-ticker-up",down:"storefront-ticker-down"};function sh(e){return to(AL,Uf,e)}function ih(e){return e==="up"||e==="down"}function fh(e,o){return`${BL[e]} ${o}s linear infinite`}import{jsx as de,jsxs as Kf}from"react/jsx-runtime";import{Fragment as hh}from"react";import{Fragment as ML,jsx as $f}from"react/jsx-runtime";import{Fragment as ch,jsx as Yr,jsxs as DL}from"react/jsx-runtime";import{createContext as qf,useContext as Zr,useId as _L,useMemo as NL}from"react";var Zn=qf(null),dh=qf(null),uh=qf(null);function Eq({needles:e,styles:o,type:t,children:r}){let a=_L(),n=JSON.stringify([a,e,o,t]),s=NL(()=>zx(e,o,a,i=>Bn(t,i)),[n]);return s?DL(ch,{children:[Yr("style",{"data-sf-part-styles":"",dangerouslySetInnerHTML:{__html:Ux(s)}}),Yr(Zn.Provider,{value:s,children:r})]}):Yr(ch,{children:r})}function ph(e){let o=Zr(Zn),t=Zr(dh),r=qx(o,e);return r&&r.stamp!==t?r:null}function Pq(e){return Ki(Zr(Zn),e)}function mh({stamp:e,children:o}){return Yr(dh.Provider,{value:e,children:o})}function Lq({children:e}){let o=Zr(Zn);return Yr(uh.Provider,{value:o,children:e})}function Rq(e){return Ki(Zr(uh),e)}function Qr({value:e,children:o}){let t=ph(e);return t?$f(mh,{stamp:t.stamp,children:$f("span",{[Wi]:t.stamp,children:o})}):$f(ML,{children:o})}import{jsx as jf,Fragment as HL}from"react/jsx-runtime";function xh({className:e=""}){return jf("sup",{className:`text-accent tracking-normal ${e}`,children:"\xAE"})}function Qn(e){if(!e.includes("\xAE"))return e;let o=e.split("\xAE"),t=[];return o.forEach((r,a)=>{r&&t.push(r),a<o.length-1&&t.push(jf(xh,{},`r${a}`))}),jf(HL,{children:t})}var Mq=xh;function Vf(e,o=!1){let t=KL(o),r=ms(e);if(r.length===1){let[n]=r,s=ps(n),i=s?$L(s,n.children):n.children;return de(Qr,{value:e,children:Jn(i,t)})}let a=[];return r.forEach((n,s)=>{if(n.bullet){a.push(de("span",{"data-sf-bullet":"",className:WL,children:Jn(n.children,t)},s));return}if(n.number!=null){a.push(Kf("span",{"data-sf-number":n.number,className:GL,children:[Kf("span",{className:zL,children:[n.number,"."]}),Jn(n.children,t)]},s));return}s>0&&!UL(r[s-1])&&a.push(de("br",{},`br${s}`)),a.push(de(hh,{children:Jn(n.children,t)},s))}),de(Qr,{value:e,children:a})}var WL="relative block pl-6 before:absolute before:left-1.5 before:font-bold before:text-accent before:content-['\xB7']",GL="relative block pl-[2em]",zL="absolute left-0 w-[1.6em] text-right tabular-nums";function UL(e){return e.bullet||e.number!=null}var qL="text-accent underline underline-offset-[0.18em]";function $L(e,o){let[t,...r]=o;return t?.kind==="text"?[{kind:"text",text:`${e}${t.text}`},...r]:[{kind:"text",text:e},...o]}function jL(e){if(e)return Gx(e)?e:Object.hasOwn(qo,e)?qo[e]:void 0}function Jn(e,o){let t=[],r=!1;return e.forEach((a,n)=>{if(a.kind==="text"){t.push(de("span",{children:Qn(a.text)},n)),r=!0;return}r||t.push(de("span",{},`e${n}`)),t.push(gh(a,n,o)),r=!1}),r||t.push(de("span",{},"end")),t}function Ih(e,o){return e.length===1&&e[0].kind==="text"?Qn(e[0].text):e.map((t,r)=>t.kind==="text"?de(hh,{children:Qn(t.text)},r):gh(t,r,o))}function KL(e){return e?"font-normal italic text-accent":"not-italic text-accent"}function Kq(e){return de(Qr,{value:e,children:de("span",{children:e})})}function gh(e,o,t){if(e.kind==="link")return de("a",{href:e.href,className:qL,children:Ih(e.children,t)},o);let r=Ih(e.children,t),a=Pu[e.kind];if(a)return de("span",{[Lu]:a,children:r},o);switch(e.kind){case"underline":return de("u",{children:r},o);case"sup":return de("sup",{children:r},o);case"sub":return de("sub",{children:r},o);case"color":{let n=jL(e.color);return n?de("span",{style:{color:n},children:r},o):de("span",{children:r},o)}case"accent":case"highlight":return de("em",{className:t,children:r},o);case"bold":return de("strong",{className:"font-semibold",children:r},o);case"italic":return de("em",{className:"italic",children:r},o);case"strike":return de("s",{className:"line-through",children:r},o);default:return de("span",{children:r},o)}}function Vq(e,o=!0){let t=e.split(`
|
|
5
|
+
`);return de(Qr,{value:e,children:t.map((r,a)=>Kf("span",{children:[Vf(r,o),a<t.length-1?de("br",{}):null]},a))})}function Xq(e){return e.split(/\n\s*\n/).map(o=>o.trim()).filter(Boolean)}var VL={"themed-band":"text-fg/70","themed-section":"text-fg-dim","dark-media":"text-overlay-fg/70"};function yh({items:e,separator:o=zf,size:t=Gf,durationSec:r=50,scroll:a=Uf,backdrop:n="themed-band",className:s}){let i=rh(t),c=sh(a),u=ah(o),p=`text-accent ${lh(i,u)}`.trim(),m=th[u],x=m===""?Jr("span",{}):Jr("span",{className:p,children:m}),g=ih(c),C=g?"inline-flex flex-col items-center gap-[60px] pb-[60px] max-[800px]:gap-8 max-[800px]:pb-8":"inline-flex items-center gap-[60px] pr-[60px] max-[800px]:gap-8 max-[800px]:pr-8",w=g?"inline-flex flex-col items-center gap-[60px] max-[800px]:gap-8":"inline-flex items-center gap-[60px] max-[800px]:gap-8",b=v=>Jr("span",{className:C,children:e.map((S,h)=>{let k=typeof S=="string"?S:S.text,P=typeof S=="object"&&S.gold;return bh("span",{className:w,children:[Jr("span",{className:P?"text-accent":void 0,children:Vf(k)}),x]},h)})},v);return Jr("div",{className:`overflow-hidden ${s??""}`,children:bh("div",{className:`flex ${g?"flex-col ":""}whitespace-nowrap ${nh(i)} ${VL[n]}`,style:{animation:fh(c,r)},children:[b("a"),b("b")]})})}import{jsx as ea,jsxs as gR}from"react/jsx-runtime";import{createContext as bR,useContext as yR}from"react";import{jsx as er,jsxs as Fh}from"react/jsx-runtime";import{useEffect as Xf,useRef as lR,useState as el}from"react";import{jsx as Sh}from"react/jsx-runtime";import{createContext as XL,lazy as l9,Suspense as s9,useContext as YL}from"react";var ZL={Link:Vc,Image:Kc},QL=XL(ZL);function Ch(){return YL(QL)}function i9(e){let{Link:o}=Ch();return Sh(o,{...e})}function vh(e){let{Image:o}=Ch();return Sh(o,{...e})}import{jsx as wh,Fragment as JL,jsxs as eR}from"react/jsx-runtime";import{useEffect as oR,useRef as kh,useState as tR}from"react";var rR="#t=0.001",aR=2;function nR(e,o){if(e.readyState<aR||!e.videoWidth||!e.videoHeight)return!1;let t=o.getContext("2d");return t?(o.width=e.videoWidth,o.height=e.videoHeight,t.drawImage(e,0,0,o.width,o.height),!0):!1}function Th({src:e,objectPosition:o="50% 50%",onError:t}){let r=kh(null),a=kh(null),[n,s]=tR(!1);return oR(()=>{let i=r.current,c=a.current;if(n||!i||!c)return;let u=()=>{nR(i,c)&&s(!0)};return u(),i.addEventListener("loadeddata",u),i.addEventListener("seeked",u),()=>{i.removeEventListener("loadeddata",u),i.removeEventListener("seeked",u)}},[n]),eR(JL,{children:[wh("canvas",{ref:a,"aria-hidden":!0,className:"absolute inset-0 z-[3] h-full w-full object-cover",style:{objectPosition:o,visibility:n?"visible":"hidden"}}),!n&&wh("video",{ref:r,src:`${e}${rR}`,muted:!0,playsInline:!0,preload:"auto",className:"hidden",onError:t})]})}var sR=.5;function Eh({videoSrc:e,posterSrc:o,showVideo:t=!0,playbackRate:r=sR,objectPosition:a="50% 50%",quiet:n=!1}){let s=o||"",i=e||"",[c,u]=el(!1),[p,m]=el(!1),[x,g]=el(!1),[C,w]=el(!1),b=lR(null);Xf(()=>{u(!1),m(!1),g(!1)},[e,o]),Xf(()=>{if(typeof window>"u")return;let S=()=>{let h=window;h.requestIdleCallback?h.requestIdleCallback(()=>w(!0),{timeout:2e3}):setTimeout(()=>w(!0),800)};if(document.readyState==="complete"){S();return}return window.addEventListener("load",S,{once:!0}),()=>window.removeEventListener("load",S)},[]),Xf(()=>{let S=b.current;if(!S)return;let h=()=>{S.playbackRate=r};return h(),S.addEventListener("loadedmetadata",h),()=>S.removeEventListener("loadedmetadata",h)},[e,r]);let v=Xc(s);return Fh("div",{className:"absolute inset-0 z-[1]",children:[er("div",{className:"absolute inset-0",style:{background:"var(--site-surface)"}}),s&&(v?er("img",{src:s,alt:"",className:"absolute inset-0 z-[2] h-full w-full object-cover",style:{display:c?"none":"block",objectPosition:a},onError:()=>u(!0)},s):er(vh,{src:s,alt:"",fill:!0,priority:!0,sizes:"100vw",className:"z-[2] object-cover",style:{display:c?"none":"block",objectPosition:a},onError:()=>u(!0)},s)),t&&!n&&i&&C&&!p&&Fh("video",{ref:b,autoPlay:!0,loop:!0,muted:!0,playsInline:!0,preload:"metadata",className:"absolute inset-0 z-[3] h-full w-full object-cover",style:{objectPosition:a},onError:()=>m(!0),children:[Yc(i)&&er("source",{src:i.replace(/\.mp4$/,".av1.mp4"),type:'video/mp4; codecs="av01.0.08M.10"'}),er("source",{src:i,type:"video/mp4"})]},i),t&&n&&i&&C&&!x&&(!s||c)&&er(Th,{src:i,objectPosition:a,onError:()=>g(!0)},i)]})}var Ph=["top","middle","bottom"],Lh=["left","center","right"],Rh="bottom",Oh="left",iR={top:"Top",middle:"Middle",bottom:"Bottom"},fR={left:"Left",center:"Center",right:"Right"};var b9="Up and down",y9="Sideways",cR={top:"flex-start",middle:"center",bottom:"flex-end"},dR={left:"flex-start",center:"center",right:"flex-end"},uR="--sf-hero-phone-y",pR="--sf-hero-phone-x";function mR(e){return Ph.includes(e)?e:Rh}function xR(e){return Lh.includes(e)?e:Oh}function Ah(e,o){let t=mR(e),r=xR(o),a={};return t!==Rh&&(a[uR]=cR[t]),r!==Oh&&(a[pR]=dR[r]),a}function S9(){return Ph.map(e=>({label:iR[e],value:e}))}function C9(){return Lh.map(e=>({label:fR[e],value:e}))}var IR="#0A0A0A",hR=[[0,".5"],[30,".1"],[60,".1"],[100,".85"]];function Bh(e){let o=e.trim().replace(/^#/,""),t=o.length===3?o.split("").map(a=>a+a).join(""):o;if(!/^[0-9a-fA-F]{6}$/.test(t))return null;let r=Number.parseInt(t,16);return`${r>>16&255},${r>>8&255},${r&255}`}function Dh(e){return e==null?!0:e!==!1}function _h(e){let o=(e?Bh(e):null)??Bh(IR);return`linear-gradient(180deg, ${hR.map(([t,r])=>`rgba(${o},${r}) ${t}%`).join(", ")})`}var Yf=bR({});function O9({name:e,process:o,mediaType:t="video",mediaSrc:r,videoSpeed:a,poster:n,objectPosition:s,tintColor:i="#000000",tintOpacity:c=0,groups:u,editing:p=!1,themeClassName:m,themeStyle:x}){let{alignment:g="left",textureOpacity:C,textureOn:w,textureColor:b,quietVideo:v,phoneUpDown:S,phoneSideways:h}=yR(Yf),k=t==="video",P=k?xr(r):void 0,F=k?xr(n):xr(r)??xr(n),A=typeof a=="number"?a/100:1;return gR("section",{className:m?`relative h-full w-full overflow-hidden ${m}`:"relative h-full w-full overflow-hidden",style:x,"data-slide-name":e??"","data-slide-process":o??"","data-slide-media":P?"video":"still",children:[ea(Eh,{videoSrc:P,posterSrc:F,showVideo:k,playbackRate:A,objectPosition:s,quiet:v}),c>0&&ea("div",{className:"absolute inset-0 z-[2]",style:{background:i,opacity:Math.min(Math.max(c,0),100)/100}}),Dh(w)&&ea("div",{className:"absolute inset-0 z-[2]",style:{background:_h(b),...C!==void 0?{opacity:C/100}:null}}),ea("div",{className:["sf-hero-group-layer absolute inset-0 z-[3] mx-auto max-w-[min(var(--sf-page-cap,var(--sf-site-width,1600px)),var(--sf-site-width,1600px))] px-[var(--sf-site-gutter,40px)] pt-[140px] pb-14",p?"sf-hero-group-layer-edit":""].filter(Boolean).join(" "),style:{...bu,...Ah(S,h)},children:u&&ea(u,{className:"sf-hero-group-zone",minEmptyHeight:160})})]})}var Nh=Array.from({length:3},(e,o)=>({name:`Slide ${o+1}`,process:"Category",mediaType:"image",mediaVideo:"",poster:""}));import{jsx as Zf}from"react/jsx-runtime";var SR={"top-left":"left-0 top-[120px]","top-center":"left-1/2 top-[120px] -translate-x-1/2","top-right":"right-0 top-[120px]",left:"left-0 top-1/2 -translate-y-1/2",center:"left-1/2 top-1/2 -translate-x-1/2 -translate-y-1/2",right:"right-0 top-1/2 -translate-y-1/2","bottom-left":"left-0 bottom-[120px]","bottom-center":"left-1/2 bottom-[120px] -translate-x-1/2","bottom-right":"right-0 bottom-[120px]"},CR=`calc(${an} - ${Ve}*2)`,Mh=`var(${Xs},${Ve})`,_9=`pointer-events-none absolute inset-y-0 left-[${Mh}] right-[${Mh}] z-[6] mx-auto max-w-[var(${Ys},${CR.replace(/ /g,"_")})]`;function ol(e,o){return`pointer-events-auto absolute ${SR[e]} z-[6] sf-hero-overlay-rail flex ${o}`}function Hh(e){return uo.includes(e)?e:null}var vR="bottom-right",wR=["outline","solid","square","bare"],kR="outline",W9={outline:"Outline",solid:"Solid",square:"Square",bare:"Bare"},G9=!1,Wh=["prev","next"],Gh={prev:"Previous slide",next:"Next slide"};function TR(e){return wR.includes(e)?e:kR}function FR(e){return Hh(e)??vR}var ER="flex-row items-center gap-2";function zh(e){return ol(FR(e),ER)}var PR={outline:"grid h-10 w-10 cursor-pointer place-items-center rounded-full border border-overlay-chrome/60 text-overlay-fg transition-colors hover:border-overlay-chrome hover:bg-overlay-scrim/30",solid:"grid h-10 w-10 cursor-pointer place-items-center rounded-full border border-overlay-chrome bg-overlay-chrome text-overlay-scrim transition-colors hover:bg-overlay-chrome/85",square:"grid h-10 w-10 cursor-pointer place-items-center rounded-md border border-overlay-chrome/60 text-overlay-fg transition-colors hover:border-overlay-chrome hover:bg-overlay-scrim/30",bare:"grid h-10 w-10 cursor-pointer place-items-center text-overlay-fg transition-colors hover:text-overlay-chrome"};function Uh(e){return PR[TR(e)]}function qh(e){return e.shown===!0&&(e.count??0)>1}function tl(e,o,t){if(t<=1)return o;let r=Math.min(Math.max(o,0),t-1);return e==="prev"?(r-1+t)%t:(r+1)%t}function $h({shape:e,placement:o,ref:t}){let r=Uh(e);return Zf("div",{ref:t,className:zh(o),style:{color:"var(--overlay-fg)"},children:Wh.map(a=>Zf("button",{type:"button","data-hero-nav":a,"aria-label":Gh[a],className:r,children:Zf(ze,{name:"chevron-right",size:18,rounded:!0,style:a==="prev"?{rotate:"180deg"}:void 0})},a))})}import{jsx as Le,jsxs as Qf,Fragment as oa}from"react/jsx-runtime";var LR=uo;var RR="top-right",OR=["cards","dots","numbers","bar","tabs"],AR=["cards","dots","numbers","bar"],jh="cards",X9={cards:"Cards",dots:"Dots",numbers:"Numbers",bar:"Bar",tabs:"Tabs"},Y9=!0;function rl(e){return OR.includes(e)?e:jh}function Kh(e){return AR.includes(e)?e:jh}function BR(e){return LR.includes(e)?e:RR}var Vh={cards:"flex-col gap-2.5",dots:"flex-row items-center gap-2",numbers:"flex-col gap-2",bar:"h-0.5 w-[34%] max-w-[420px] gap-px overflow-hidden rounded-full",tabs:"flex-row items-stretch w-full overflow-x-auto"};function Xh(e,o){return ol(BR(o),Vh[rl(e)])}function Yh(e){return`flex ${Vh[rl(e)]}`}function Zh(e){return e.shown!==!1&&(e.count??0)>1}function DR(e){return{name:e.dataset.slideName||"",process:e.dataset.slideProcess||"",video:e.dataset.slideMedia==="video"}}function _R(e,o){return e===o?!0:e.length!==o.length?!1:e.every((t,r)=>t.name===o[r].name&&t.process===o[r].process&&t.video===o[r].video)}function Qh(e,o){let t=Array.from(o,DR);return _R(e,t)?e:t}function Jh({slides:e,active:o,shape:t,placement:r,ref:a,tone:n="media",label:s}){let i=rl(t),c=n==="surface"?{"--overlay-fg":"var(--fg)","--overlay-chrome":"var(--fg)","--overlay-scrim":"var(--site-surface-2)"}:void 0;return Qf("aside",{ref:a,"aria-label":s??"Featured slides",className:n==="surface"?Yh(i):Xh(i,r),style:{color:"var(--overlay-fg)",...c},children:[i==="cards"&&Le(NR,{slides:e,active:o}),i==="dots"&&Le(MR,{count:e.length,active:o}),i==="numbers"&&Le(HR,{count:e.length,active:o}),i==="bar"&&Le(WR,{count:e.length,active:o}),i==="tabs"&&Le(GR,{slides:e,active:o})]})}function NR({slides:e,active:o}){return Qf(oa,{children:[Le("span",{className:"mb-1 font-mono text-[length:var(--size-label,10px)] uppercase tracking-[0.28em] text-overlay-chrome/55",children:"Reel \xB7 pick a slide"}),e.map((t,r)=>{let a=r===o;return Qf("button",{type:"button","data-idx":r,"aria-pressed":a,"aria-label":`Go to ${t.name||`slide ${r+1}`}`,className:["group flex w-[170px] cursor-pointer flex-col items-start gap-0.5 border bg-overlay-scrim/55 px-3 py-2.5 text-left transition-all motion-reduce:transition-none max-[1100px]:w-[140px]",a?"border-accent bg-overlay-scrim/70":"border-overlay-chrome/15 hover:border-overlay-chrome/45 hover:bg-overlay-scrim/70"].join(" "),children:[Le("span",{className:["font-display text-[length:var(--size-body,13px)] font-medium uppercase leading-tight tracking-[-0.01em]",a?"text-accent":"text-overlay-fg"].join(" "),children:t.name||`Slide ${r+1}`}),Le("span",{className:"font-mono text-[length:var(--size-label,9px)] uppercase tracking-[0.2em] text-overlay-chrome/55",children:a?"\u25B6 Now playing":t.process||" "})]},r)})]})}function MR({count:e,active:o}){return Le(oa,{children:Array.from({length:e},(t,r)=>Le("button",{type:"button","data-idx":r,"aria-pressed":r===o,"aria-label":`Go to slide ${r+1}`,className:`h-2 cursor-pointer rounded-full transition-all motion-reduce:transition-none ${r===o?"w-5 bg-accent":"w-2 bg-overlay-chrome/45 hover:bg-overlay-chrome/70"}`},r))})}function HR({count:e,active:o}){return Le(oa,{children:Array.from({length:e},(t,r)=>Le("button",{type:"button","data-idx":r,"aria-pressed":r===o,"aria-label":`Go to slide ${r+1}`,className:`cursor-pointer font-mono text-[length:var(--size-label,11px)] leading-none tracking-[0.06em] transition-colors ${r===o?"text-overlay-fg":"text-overlay-chrome/45 hover:text-overlay-chrome/80"}`,children:String(r+1).padStart(2,"0")},r))})}function WR({count:e,active:o}){return Le(oa,{children:Array.from({length:e},(t,r)=>Le("button",{type:"button","data-idx":r,"aria-pressed":r===o,"aria-label":`Go to slide ${r+1}`,className:`h-full flex-1 cursor-pointer transition-colors ${r<=o?"bg-overlay-fg":"bg-overlay-chrome/25"}`},r))})}function GR({slides:e,active:o}){return Le(oa,{children:e.map((t,r)=>{let a=r===o;return Le("button",{type:"button","data-idx":r,"aria-pressed":a,className:["flex min-w-[140px] flex-1 cursor-pointer items-end px-6 py-7 text-left transition-colors",r>0?"border-l border-overlay-chrome/15":"",a?"bg-overlay-scrim/70":"hover:bg-overlay-scrim/40"].join(" "),children:Le("span",{className:["font-heading3 text-[length:var(--size-headingSmall,24px)] font-medium uppercase leading-tight tracking-[-0.02em]",a?"text-overlay-fg":"text-overlay-chrome/55"].join(" "),children:t.name})},r)})})}import{useEffect as zR,useState as UR}from"react";var eg="(prefers-reduced-motion: reduce)";function qR(){return globalThis.window?.matchMedia?.(eg)?.matches??!1}function t$(){return qR()?"auto":"smooth"}function og(){let[e,o]=UR(!1);return zR(()=>{let t=globalThis.window?.matchMedia?.(eg);if(!t||(o(t.matches),typeof t.addEventListener!="function"))return;let r=a=>o(a.matches);return t.addEventListener("change",r),()=>t.removeEventListener("change",r)},[]),e}var ta={accent:"#2563eb",accentTint:"#eff6ff",accentText:"#1d4ed8",appBg:"#f9fafb",previewBg:"#f3f4f6",panel:"#ffffff",fieldBg:"#ffffff",inputBorder:"#d1d5db",text:"#111827",text2:"#374151",muted:"#6b7280",line:"#e5e7eb",chipBg:"#f3f4f6",chipFg:"#6b7280",panelRadius:12,rowRadius:8,panelShadow:"0 1px 2px rgba(0,0,0,.05), 0 10px 30px rgba(0,0,0,.06)",topbarShadow:"0 1px 3px rgba(0,0,0,.06)",panelGap:10,leftWidth:288,rightWidth:308,topbarHeight:52,labelFont:"-apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif"};var tg={min:40,max:100,step:5,fallback:100,unit:"vh"};function Jf(e){return`${typeof e=="number"?e:tg.fallback}${tg.unit}`}function rg(...e){return e.some(o=>typeof o=="number")}var $R=new Set(["Hero","HeroSingle","IntroBleed"]),ag={min:56,max:140,default:88},s$={min:0,max:120,step:2,default:28},ng=`var(--sf-header-h, ${ag.default}px)`,jR="--sf-header-set-h",i$="--sf-header-h",f$=`var(${jR}, ${ag.default}px)`,c$="sf-header-clearance",d$="sf-sticky-underheader";function KR(e){return e?.find(o=>o?.type&&o.type!==ke)??null}function lg(e){let o=KR(e)?.type;return!o||!$R.has(o)}function u$(e){return!lg(e)}function p$(e){return!!e?.some(o=>o?.type===ke)}function m$(e){return!e||e.length===0?!1:!e.some(o=>o?.type===ke||o?.type===ae)}var VR=["auto","shared","own"],XR="auto",YR="topSpace",x$="data-top-space";function ZR(e){return VR.includes(e)?e:XR}function QR(e,o){let t=ZR(e?.props?.[YR]);return t==="own"?!0:t==="shared"?!1:lg(o)}function I$(e,o){return QR(e,o)?"own":null}var JR=40;function eO(e,o){return Math.abs(e)<=JR||Math.abs(e)<=Math.abs(o)?null:e<0?"next":"prev"}function sg(e,o,t,r){let a=eO(e,o);return a?tl(a,t,r):t}function ig(e){return(e.count??0)>1&&e.editing!==!0}function fg(e){return e.editing!==!0?!1:(e.slides??[])[e.shown??0]?.video===!0}function cg(e){return e.editing!==!0?!1:!(e.playing===!0&&e.controlShown===!0)}import{HERO_SLIDER_GOTO_EVENT as ec}from"efficient-easel/screen/lib/puck/preview-events";var tO=`
|
|
6
|
+
.hero-ticker-pick { cursor: pointer; }
|
|
7
|
+
.hero-ticker-pick:hover {
|
|
8
|
+
outline: 2px solid color-mix(in srgb, ${ta.accent} 45%, transparent);
|
|
9
|
+
outline-offset: -2px;
|
|
10
|
+
}
|
|
11
|
+
.hero-ticker-pick[data-selected] {
|
|
12
|
+
outline: 2px solid ${ta.accent};
|
|
13
|
+
outline-offset: -2px;
|
|
14
|
+
}
|
|
15
|
+
`,rO="Play video",aO="Hold video",nO="flex h-7 cursor-pointer items-center gap-1.5 rounded-full border border-overlay-chrome/25 bg-overlay-scrim/80 px-[11px] font-mono text-[11px] leading-none tracking-[0.05em] text-overlay-fg",lO=()=>l("item"),oc=["","","","","",""],dg=new Map;function sO(e,o){let t=e?.ownerDocument?.defaultView;if(t)return t.addEventListener(ec,o),()=>t.removeEventListener(ec,o)}function G$({slides:e,alignment:o,textureOpacity:t,showTexture:r,textureColor:a,phoneUpDown:n,phoneSideways:s,autoplay:i,autoplayInterval:c,showTicker:u,tickerItems:p,heightDesktop:m,heightMobile:x,showPicker:g,pickerShape:C,pickerPlacement:w,showArrows:b,arrowsShape:v,arrowsPlacement:S,editing:h}){let k=rg(m,x),P=k?"h-[var(--sf-hero-h-m)] min-[720px]:h-[var(--sf-hero-h-d)]":"h-screen min-h-[680px]",F=k?{"--sf-hero-h-d":Jf(m),"--sf-hero-h-m":Jf(x)}:void 0,A=(p??oc.map(N=>({text:N}))).map(N=>N?.text?.trim()?N.text:h?lO():"").filter(Boolean),O=u!==!1,B=No(null),U=No(null),me=No(null),j=No(null),he=No(null),_=oO(),ne=No(_),[Oe,We]=ra([]),[bo,$e]=ra(0),Ae=No(0),[Qe,Ee]=ra(!1),[fe,ye]=ra(!1),[xe,je]=ra(null),E=og(),{selectedHeroId:te,select:X}=Vn(),Y=or(()=>B.current?.querySelector(".hero-track")??null,[]),q=or((N,G=!1)=>{$e(N),Ae.current=N,dg.set(ne.current,N);let V=B.current?.querySelector(".hero-track");if(V)if(G){let se=V.style.transition;V.style.transition="none",V.style.transform=`translateX(-${Math.max(0,N)*100}%)`,V.offsetHeight,V.style.transition=se}else V.style.transform=`translateX(-${Math.max(0,N)*100}%)`},[]);tr(()=>{let N=B.current,G=N?.getAttribute("data-puck-component")||N?.closest("[data-puck-component]")?.getAttribute("data-puck-component")||_;ne.current=G,je(G);let V=dg.get(G);typeof V=="number"&&($e(V),Ae.current=V)},[]),tr(()=>{let N=Y();if(!N)return;let G=()=>{We(se=>Qh(se,N.querySelectorAll("[data-slide-name]")))};G();let V=new MutationObserver(G);return V.observe(N,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["data-slide-name","data-slide-process","data-slide-media"]}),()=>{V.disconnect()}},[Y]),tr(()=>{if(!h)return;let N=G=>{let V=G.detail;if(!V||typeof V.index!="number")return;let se=B.current,R=se?.getAttribute("data-puck-component")||se?.closest("[data-puck-component]")?.getAttribute("data-puck-component")||ne.current;V.id&&V.id!==R||q(V.index,!0)};return sO(B.current,N)},[h,q]);let ve=Oe.length,Je=Math.min(Math.max(bo,0),Math.max(0,ve-1)),Pe=Zh({shown:g,count:ve}),Wo=qh({shown:b,count:ve}),rt=fg({editing:h,shown:Je,slides:Oe}),mr=cg({editing:h,playing:fe,controlShown:rt}),at=ig({count:ve,editing:h}),eo=No(null),yo=No(null),Ia=or(N=>{if(eo.current=null,yo.current=null,!at||N.touches.length!==1)return;let G=N.touches[0];eo.current={x:G.clientX,y:G.clientY},yo.current={x:G.clientX,y:G.clientY}},[at]),ha=or(N=>{if(!eo.current)return;if(N.touches.length!==1){eo.current=null;return}let G=N.touches[0];yo.current={x:G.clientX,y:G.clientY}},[]),ga=or(()=>{let N=eo.current,G=yo.current;if(eo.current=null,yo.current=null,!at||!N||!G)return;let V=sg(G.x-N.x,G.y-N.y,Ae.current,ve);V!==Ae.current&&q(V)},[at,ve,q]);tr(()=>{if(h||!i||Qe||E||ve<=1)return;let N=Math.max(1,typeof c=="number"?c:6)*1e3,G=window.setTimeout(()=>q((Je+1)%ve),N);return()=>window.clearTimeout(G)},[h,i,c,Qe,E,ve,Je,q]),tr(()=>{let N=[U.current,me.current,j.current].filter(Boolean),G=N.map(se=>Yn(se)),V=se=>{let R=se.target,ce=R.closest("[data-hero-nav]"),oo=ce??R.closest("[data-idx]");if(!oo)return;se.stopPropagation(),se.preventDefault();let Do=ce?tl(ce.dataset.heroNav,Ae.current,ve):Number(oo.dataset.idx);Number.isNaN(Do)||(q(Do,h),Y()?.querySelectorAll("[data-slide-name]")[Do]?.click())};return N.forEach(se=>se.addEventListener("click",V,{capture:!0})),()=>{G.forEach(se=>se?.()),N.forEach(se=>se.removeEventListener("click",V,{capture:!0}))}},[ve,q,Y,h]),tr(()=>{if(!h)return;let N=he.current;if(!N)return;let G=Yn(N),V=se=>{se.stopPropagation(),se.preventDefault();let R=B.current,ce=R?.getAttribute("data-puck-component")||R?.closest("[data-puck-component]")?.getAttribute("data-puck-component")||ne.current;X(ce)};return N.addEventListener("click",V,{capture:!0}),()=>{G?.(),N.removeEventListener("click",V,{capture:!0})}},[h,X,O,A.length]);let Fl=or(N=>{if(!N)return;let G=Yn(N),V=se=>{se.stopPropagation(),se.preventDefault(),ye(R=>!R)};return N.addEventListener("click",V,{capture:!0}),()=>{G?.(),N.removeEventListener("click",V,{capture:!0})}},[]);return Oo(Yf.Provider,{value:{alignment:o,textureOpacity:t,textureOn:r,textureColor:a,quietVideo:mr,phoneUpDown:n,phoneSideways:s},children:al("div",{ref:B,className:`relative mx-[var(--sf-hero-bleed-m,calc(50%_-_50vw))] w-[var(--sf-hero-bleed-w,100vw)] ${P} max-w-[var(--sf-hero-cap,none)] overflow-hidden`,style:F,onMouseEnter:()=>Ee(!0),onMouseLeave:()=>Ee(!1),onTouchStart:Ia,onTouchMove:ha,onTouchEnd:ga,children:[Oo(e,{className:"hero-track flex h-full [&>*]:h-full [&>*]:min-w-full [&>*]:shrink-0 [&>*]:basis-full",style:{transform:`translateX(-${Je*100}%)`,transition:E?"none":"transform 600ms cubic-bezier(.22,.61,.36,1)"},minEmptyHeight:400}),rt&&Oo("div",{ref:Fl,"data-hero-video-control":fe?"playing":"held",className:"sf-hero-video-control absolute left-6 z-[7]",style:{top:`calc(${ng} + 16px)`},children:al("button",{type:"button",className:nO,children:[Oo("span",{"aria-hidden":"true",children:fe?"\u275A\u275A":"\u25B6"}),l(fe?aO:rO)]})}),(Pe||Wo)&&al("div",{className:"pointer-events-none absolute inset-y-0 left-[var(--sf-hero-chrome-x,var(--sf-site-gutter,40px))] right-[var(--sf-hero-chrome-x,var(--sf-site-gutter,40px))] z-[6] mx-auto max-w-[var(--sf-hero-chrome-cap,calc(min(var(--sf-page-cap,var(--sf-site-width,1600px)),var(--sf-site-width,1600px))_-_var(--sf-site-gutter,40px)*2))]",children:[Pe&&Oo(Jh,{ref:U,slides:Oe,active:Je,shape:Kh(C),placement:w}),Wo&&Oo($h,{ref:j,shape:v,placement:S})]}),Pe&&Oo("div",{ref:me,className:"sf-hero-phone-dots absolute bottom-[80px] left-1/2 z-[6] hidden -translate-x-1/2 items-center gap-2",children:Oe.map((N,G)=>Oo("button",{type:"button","data-idx":G,"aria-label":`Go to slide ${G+1}`,className:`h-2 rounded-full transition-all motion-reduce:transition-none ${G===Je?"w-5 bg-accent":"w-2 bg-white/45 hover:bg-white/70"}`},G))}),O&&A.length>0&&al("div",{ref:he,className:`sf-hero-ticker absolute inset-x-0 bottom-0 z-[5] border-t border-overlay-chrome/10 py-3.5${h?" hero-ticker-pick":""}`,"data-selected":h&&xe!=null&&te===xe?"":void 0,style:{background:"rgba(10,10,10,.55)"},children:[h&&Oo("style",{children:tO}),Oo(yh,{items:A,backdrop:"dark-media"})]})]})})}var xO="root:default-zone";function ug({heroId:e}){let{appState:o,dispatch:t}=dO(p=>p),r=o.data.content??[],a=r.findIndex(p=>p.props.id===e),n=a>=0?r[a]:null,s=n?n.props.showTicker??!0:!0,i=cO(()=>{let p=n?.props.tickerItems;return Array.isArray(p)?p:oc.map(m=>({text:m}))},[n]),c=fO();if(!n)return rr("p",{className:"sf-note",children:l("This ticker\u2019s hero is no longer on the page.")});let u=p=>t({type:"replace",destinationZone:xO,destinationIndex:a,data:{...n,props:{...n.props,...p}}});return iO("div",{children:[rr(Or,{label:"Ticker"}),rr(uO,{label:l("Show ticker"),labelId:c,icon:rr(mO,{}),action:rr(pO,{checked:s,onChange:p=>u({showTicker:p}),ariaLabelledBy:c})}),rr(di,{label:ci.label,icon:ci.icon,items:i,placeholder:"item",onChange:p=>u({tickerItems:p}),markup:!0})]})}import{jsx as ho,jsxs as tc,Fragment as IO}from"react/jsx-runtime";import{useCallback as hO,useRef as gO,useState as aa}from"react";import{InspectorIconButton as bO}from"efficient-easel/chrome";import{PopupMenu as yO,PopupMenuItem as SO,PopupMenuLabel as nl}from"efficient-shell/ui";import{CopyToPageIcon as CO}from"efficient-easel/icons";import{cloneNodeWithFreshIds as pg,docToNode as J$,nodeToDoc as ej}from"efficient-easel/screen/lib/puck/section-doc";function mg({node:e,currentSlug:o,siteId:t,tokenRef:r,runAuthed:a,onNotify:n}){let[s,i]=aa(!1),[c,u]=aa(null),p=Be(),[m,x]=aa(!1),[g,C]=aa(null),w=gO(null),[b,v]=aa(null),S=hO(async()=>{if(p.usesBridgedToken&&!r.current){x(!0);return}try{u(await Ke(p).pages.list(t?{siteId:t}:void 0))}catch{x(!0)}},[r,t,p]),h=()=>{if(s){i(!1);return}let F=w.current?.getBoundingClientRect();F&&v({top:F.bottom+6,right:Math.max(8,window.innerWidth-F.right)}),u(null),x(!1),S(),i(!0)},k=(c??[]).filter(F=>F.slug!==o),P=async F=>{if(g)return;C(F.slug);let A=pg(e),O=p.documentHooks?.storedNode?.(A)??A,B=Ke(p).pages,U=await a(async()=>{let me=await B.load({id:F.id});if(!me)throw new Error(`Page "${F.slug}" no longer exists.`);let j=me.layout??{},he=Array.isArray(j.content)?[...j.content]:[],_=he.findIndex(ne=>ne?.type===ae);he.splice(_===-1?he.length:_,0,O),await B.save(F.id,{layout:{root:{},zones:{},...j,content:he}},{version:me.version,clientId:""})});C(null),i(!1),n?.(U?l("Duplicated to \u201C{name}\u201D",{name:F.label}):l("Couldn\u2019t duplicate the section \u2014 please retry"),U?"success":"error")};return tc(IO,{children:[ho("span",{"data-menu-toggle":!0,style:{display:"contents"},children:ho(bO,{buttonRef:w,label:l("Duplicate to another page"),hasPopup:"menu",expanded:s,onClick:h,children:ho(CO,{size:15})})}),s&&b&&ho(yO,{portal:!0,style:{top:b.top,right:b.right},onClose:()=>i(!1),children:tc("div",{role:"menu","aria-label":l("Duplicate to page"),children:[ho(nl,{children:l("Duplicate to page")}),m?ho(nl,{children:l("Couldn\u2019t load pages")}):c===null?ho(nl,{children:l("Loading\u2026")}):k.length===0?ho(nl,{children:l("No other pages")}):k.map(F=>tc(SO,{role:"menuitem",disabled:g!==null,onClick:()=>{P(F)},children:[ho("span",{className:"min-w-0 flex-1 truncate",children:F.label}),g===F.slug?ho("span",{className:"shrink-0 text-xs",children:l("Copying\u2026")}):F.draft&&ho("span",{className:"shrink-0 text-xs",children:l("draft")})]},F.id))]})})]})}import{ScreenPartsProvider as mj,sameInspectorMode as xj,SELECTION_MODE as xg,useScreenParts as Ij,useScreenBlockLook as hj,useScreenBlockRules as gj,useScreenBridges as bj,useScreenCanvasFrame as yj,useScreenDevices as Sj,useScreenDocumentPass as Cj,useScreenInspectorPanel as vj,useScreenLeftView as wj,useScreenOwnerName as kj,useScreenPinned as Tj,useStandaloneScreenBridges as Fj}from"efficient-easel/screen/lib/screen-parts";import{PreviewPartsProvider as Lj,usePreviewParts as na}from"efficient-easel/screen/components/PreviewPartsContext";import{jsx as la,jsxs as vO}from"react/jsx-runtime";import{SettingsDrill as wO}from"efficient-easel/panel";var kO="Not shown on the page";function TO({part:e,onOpen:o}){return la(wO,{name:l(e.label),preview:e.offPage?l(kO):e.preview||l("Empty"),offPage:e.offPage,status:e.hidden?la("span",{className:"sf-entry-eye",role:"img","aria-label":l("Hidden on the page"),children:la(ze,{name:"eye-off",size:14})}):void 0,onOpen:()=>o(e.key)})}function rc(e){return e.filter(o=>!o.identifier)}function Ig({parts:e,onOpen:o,heading:t=!0}){let r=rc(e);return r.length?vO("div",{className:"sf-entries",children:[t?la("h3",{className:"sf-entries-head",children:l("Text")}):null,r.map(a=>la(TO,{part:a,onOpen:o},a.key))]}):null}import{blockRuns as FO}from"efficient-easel/screen/lib/puck/block-choice";function ll(){return{type:ke,props:{id:br(ke)}}}var hg=[{type:"FooterLogo",label:"Logo"},{type:"FooterMenu",label:"Menu"},{type:"FooterText",label:"Text"},{type:"FooterEmailSignup",label:"Email Form"},{type:"FooterSocial",label:"Social Logos"},{type:"FooterGroup",label:"Footer Box"},{type:"FooterDivider",label:"Divider"}],EO=hg.filter(e=>e.type!=="FooterLogo"&&e.type!=="FooterGroup"),PO="FooterGroup",gg="blocks";function bg(e){return e===ae?hg:e===PO?EO:null}function sl(){let e=(o,t)=>({type:o,props:{id:`${o}-${crypto.randomUUID()}`,...t}});return[e("FooterLogo",{widthPct:100,align:"left",tagline:""}),e("FooterGroup",{direction:"vertical",align:"start",blocks:[e("FooterText",{text:"Join our email list",size:"md",tone:"default"}),e("FooterEmailSignup",{heading:"",placeholder:"Email address",buttonLabel:"Subscribe"})]})]}var Me="SiteHeader",ue="SiteFooter",ac="sections",zj=[Me,ue],ar=e=>e===Me||e===ue,yg=e=>`${e}:${ac}`;function Sg(e,o,t=[]){return{type:e,props:{id:o,[ac]:t}}}var LO=new Set(["Footer",Me,ue]);function nr(e){let o=new Set,t=!1,r=e.filter(a=>{let n=a?.type??"";return n==="Header"?(t=!0,!1):LO.has(n)?o.has(n)?(t=!0,!1):(o.add(n),!0):!0});return t?r:e}function Cg(e,o){return e.some(t=>t?.type===o.type)?e:o.type===Me?[o,...e]:[...e,o]}var vg={[Me]:{max:3,takes:["Flex","Ticker"]},[ue]:{max:6,takes:["Flex","Prose","Logos","Divider"]}};function wg(e,o,t){if(!ar(e))return!0;let r=vg[e];return t<r.max&&r.takes.includes(o)}function kg(e,o){let t=o,r=t?.props?.id;if(r==null)return null;let a=e?.content;if(!Array.isArray(a))return null;for(let n of a){if(!ar(n?.type))continue;let s=n.props?.[ac];if(!Array.isArray(s)||!s.some(c=>c?.props?.id===r))continue;let i=vg[n.type];return i.takes.includes(t?.type??"")?s.length>=i.max?{group:n.type,why:"full"}:null:{group:n.type,why:"type"}}return null}function Tg(e){switch(e?.type){case Me:return l("Header \xB7 on every page");case ue:return l("Footer \xB7 on every page");case ke:return l("Header \xB7 on every page \xB7 old style");case ae:return l("Footer \xB7 on every page \xB7 old style");default:return null}}var Fg=()=>l("Every page"),Eg=()=>l("Changed on every page");function il(e,o){let t=pu(e,o);if(t)return t;let r=kg(e,o);if(!r)return null;let a=r.group===Me;return r.why==="type"?a?l("The header cannot take another one of these"):l("The footer cannot take another one of these"):a?l("The header holds at most 3 sections"):l("The footer holds at most 6 sections")}import{jsx as cl,Fragment as AO,jsxs as BO}from"react/jsx-runtime";import{useState as DO}from"react";import{createNode as _O,newId as NO}from"efficient-easel/data";import{useEasel as MO}from"efficient-easel/easel";import{Banner as HO,Button as nc}from"efficient-shell/ui";var fl="Flex",RO={FooterMenu:"MenuBlock",FooterEmailSignup:"EmailFormBlock",FooterSocial:"SocialLogosBlock"},OO=e=>{let{id:o,...t}=e;return t},Pg=e=>typeof e=="string"?e:"";function Lg(e,o){let t=e.props??{},r=RO[e.type];if(r)return[o(r,OO(t))];switch(e.type){case"FooterLogo":{let a=o("LogoBlock",t.reverse?{reverse:t.reverse}:{}),n=Pg(t.tagline).trim();return n?[a,o("Text",{text:n,tone:"dim",align:t.align==="center"?"center":"left"})]:[a]}case"FooterText":return[o("Text",{text:Pg(t.text),tone:typeof t.tone=="string"?t.tone:"default"})];case"FooterDivider":return[o("Divider")];case"FooterGroup":{let a=Array.isArray(t.blocks)?t.blocks:[];return[o(fl,{direction:t.direction==="horizontal"?"row":"column",content:a.flatMap(n=>Lg(n,o))})]}default:return[]}}function sa(e,o,t){let r=(e&&Array.isArray(e.props?.blocks)?e.props.blocks:[]).flatMap(s=>{let i=Lg(s,o);return i.length<=1?i:[o(fl,{direction:"column",content:i})]}),a=o(fl,{direction:"row",wrap:!0,share:"equal",content:r}),n=o(fl,{direction:"column",content:[o("LegalLineBlock")]});return Sg(ue,t,[a,n])}function Rg(){let{appState:e,dispatch:o,config:t}=MO(p=>p),{readOnly:r}=we(),[a,n]=DO(!1),s=e.data.content;if(r||s.some(p=>p.type===ue))return null;let i=s.find(p=>p.type===ae)??null,c=(p,m)=>_O(t,p,m),u=()=>{let p=sa(i,c,NO(ue));o({type:"setData",data:m=>({...m,content:[...Cg(m.content,p)]}),recordHistory:!0}),n(!1)};return cl(HO,{tone:"info",title:l("This footer uses the old layout"),action:a?BO(AO,{children:[cl(nc,{variant:"primary",size:"sm",onClick:u,children:l("Switch now")}),cl(nc,{variant:"secondary",size:"sm",onClick:()=>n(!1),children:l("Cancel")})]}):cl(nc,{variant:"secondary",size:"sm",onClick:()=>n(!0),children:l("Switch to Box footer")}),children:l("Build this footer out of Boxes and blocks, like a page: the same menus, signup, social links and logo, with the copyright as a Legal Line. Your current footer is kept.")})}import{jsx as pc}from"react/jsx-runtime";import{useLayoutEffect as YO,useMemo as Ug,useRef as ZO,useState as dc}from"react";import{useSelectedFields as QO}from"efficient-easel/easel";import{Inspector as JO,planFields as qg}from"efficient-easel/fields";import{DESIGN_GROUPS as sc,SETTINGS_BUCKETS as WO}from"efficient-easel/panel";import{BUCKET_KEY as Ze,DESIGN_GROUP_KEY as lr}from"efficient-easel/screen/lib/puck/field-buckets";var ia=WO;var GO="Editor only \u2014 not shown live",ic={"Archive link":"Content",Article:"Content",Blocks:"Content","Blog posts":"Content","Browser mock":"Content",Button:"Content","Call to action":"Content","Car prompt":"Content","Card link":"Content",Cards:"Content","Claims bars":"Content","Contact info":"Content",Content:"Content","Content source":"Content",Contents:"Content",Filters:"Content","Show on a card":"Content",Footnote:"Content",Form:"Content",Founders:"Content","Gallery A":"Content","Gallery B":"Content","Gallery link":"Content",Header:"Content","Header link":"Content","Image caption":"Content","In this issue":"Content",Items:"Content","Kanban columns":"Content",Lead:"Content","Left panel":"Content",Link:"Content",Links:"Content","Message form":"Content",Metadata:"Content",Milestones:"Content","Mockup card":"Content","Newsletter panel":"Content",Offices:"Content",Options:"Content","Others gallery":"Content","Overlay button":"Content",Product:"Content","Product page":"Content",Products:"Content","Pull quote":"Content",Questions:"Content","Recent issues":"Content","Recent posts":"Content",Reviews:"Content","Right panel \xB7 actions":"Content","Right panel \xB7 choices":"Content","Right panel \xB7 form":"Content","Routing groups":"Content",Rows:"Content",Section:"Content","Section header":"Content",Sections:"Content","Signup form":"Content","Source product":"Content","Stat & note":"Content",Stats:"Content","Submit button":"Content","Success state":"Content",Wheel:"Content",Terminal:"Content",Text:"Content","Text column":"Content","Timeline entries":"Content","Top row":"Content",Total:"Content","Trailing note":"Content","\u201COther\u201D reason":"Content","Background images":"Design",Gallery:"Content",Image:"Content","Image column":"Content",Images:"Content",Logo:"Content",Media:"Content","Background image":"Design",Color:"Design","Image tint":"Design",Style:"Design",Shape:"Design",Texture:"Design","Text style":"Design",Motion:"Animation",Anchor:"Anchor",Arrangement:"Layout","Auto-slide":"Layout",Bar:"Layout","Cell width":"Size",Behavior:"Layout",Controls:"Layout",Diagram:"Layout",[GO]:"Layout","Filters shown":"Layout","Slide picker":"Layout",Arrows:"Layout","On a phone":"Layout",Nudge:"Position","Image gallery":"Layout",Grid:"Layout",Layout:"Layout",Padding:"Layout",Price:"Layout",Preview:"Layout",Setup:"Layout","Show / hide elements":"Layout","Show in the buy box":"Layout",Visibility:"Layout",Width:"Size",Height:"Size"},Ag={"AlloyWheelsListing._gCards":"Design","ProductGrid._gCards":"Design"},Bg={"Text._gSpacing":"Size","Heading._gSpacing":"Size"};function lc(e,o,t){let r=`${e}.${o}`;return Bg[r]??Ag[r]??ic[t]}function Dg(e){return e==="Animation"?[Ze.Animation]:[Ze.Design,lr[e]]}function dl(...e){let o=[];for(let t of e)for(let r of Object.values(t)){let a=gs(r),n=vo(a?a.inner:r),s=n?ic[n.label]:void 0;if(s)for(let i of Dg(s))o.includes(i)||o.push(i)}return o}var mK=[...dl(xn(),In("full"),hn(),gn()),...Object.keys(xn()),...Object.keys(In("full")),...Object.keys(hn()),...Object.keys(gn())],xK=[...dl(dn()),...Object.keys(dn())],IK=[...dl(pn()),...Object.keys(pn())],hK=[...dl(mn()),...Object.keys(mn())],zO=Object.keys(Vm()),UO=new Set(["cardImage","imageBackground"]),gK=[...Dg(lc("ProductGrid","_gCards","Cards")??"Design"),...zO.filter(e=>e.startsWith("_g")||UO.has(e))],bK=Object.keys(Xm()),yK=Object.keys(Ym({bottomDefault:!0})),qO={"ImageBlock._gStyle":"duplicated the Style bucket header above it (2026-09-04)","ButtonBlock._gStyle":"duplicated the Style bucket header above it (2026-09-04)","HeroGroup._gContent":"duplicated the Content bucket header above it (2026-09-04)","HeroGroup._gLayout":"duplicated the Layout bucket header above it (2026-09-04)","Footer._gLayout":"duplicated the Layout bucket header above it (2026-09-04)","FooterLogo._gContent":"duplicated the Content bucket header above it (2026-09-04)","FooterLogo._gStyle":"duplicated the Style bucket header above it (2026-09-04)","FooterMenu._gContent":"duplicated the Content bucket header above it (2026-09-04)","FooterMenu._gStyle":"duplicated the Style bucket header above it (2026-09-04)","FooterGroup._gLayout":"duplicated the Layout bucket header above it (2026-09-04)","FooterText._gContent":"duplicated the Content bucket header above it (2026-09-04)","FooterText._gStyle":"duplicated the Style bucket header above it (2026-09-04)","FooterSocial._gStyle":"duplicated the Style bucket header above it (born tabbed, 2026-09-17)","FooterSocial._gLayout":"duplicated the Layout bucket header above it (born tabbed, 2026-09-17)","MenuBlock._gContent":"duplicated the Content bucket header above it (born tabbed, H.1)","MenuBlock._gStyle":"duplicated the Style bucket header above it (born tabbed, H.1)","EmailFormBlock._gContent":"duplicated the Content bucket header above it (born tabbed, H.1)","SocialLogosBlock._gStyle":"duplicated the Style bucket header above it (born tabbed, H.1)","SocialLogosBlock._gLayout":"duplicated the Layout bucket header above it (born tabbed, H.1)","SearchBlock._gStyle":"duplicated the Style bucket header above it (born tabbed, H.2)","CartBlock._gStyle":"duplicated the Style bucket header above it (born tabbed, H.2)","Split._gContent":"duplicated the Content bucket header above it (2026-09-04)","Gallery._gVehicleContent":"duplicated the Content bucket header above it (2026-09-04)","Gallery._gWheelContent":"duplicated the Content bucket header above it (2026-09-04)","Gallery._gOthersContent":"duplicated the Content bucket header above it (2026-09-04)","Subscribe._gHeadCopy":"duplicated the Content bucket header above it (2026-09-04)","Subscribe._gLeftCopy":"duplicated the Content bucket header above it (2026-09-04)","Subscribe._gRightCopy":"duplicated the Content bucket header above it (2026-09-04)","CollectionCard._gContent":"duplicated the Content bucket header above it (A Card Sets Its Own Corners)","HeroSlide._gContent":"duplicated the Content bucket header above it (Hero Slide Tabs And Theme)","BrandStrip._gContent":"duplicated the Content bucket header above it (66338)","BrandStrip._gStyle":"duplicated the Style bucket header above it (66338)","BrandStrip._gLayout":"duplicated the Layout bucket header above it (66338)","KeyFeatures._gContent":"duplicated the Content bucket header above it (66049)","KeyFeatures._gStyle":"duplicated the Style bucket header above it (66049)","ParagraphsA._gContent":"duplicated the Content bucket header above it (66049)","ParagraphsA._gStyle":"duplicated the Style bucket header above it (66049)","Chart._gContent":"duplicated the Content bucket header above it (66049)","Chart._gStyle":"duplicated the Style bucket header above it (66049)","Logos._gContent":"duplicated the Content bucket header above it (66049)","Logos._gStyle":"duplicated the Style bucket header above it (66049)","Mockup._gContent":"duplicated the Content bucket header above it (66049)","Mockup._gStyle":"duplicated the Style bucket header above it (66049)","Stats._gContent":"duplicated the Content bucket header above it (66049)","Stats._gStyle":"duplicated the Style bucket header above it (66049)","StatsParagraph._gContent":"duplicated the Content bucket header above it (66049)","StatsParagraph._gStyle":"duplicated the Style bucket header above it (66049)","Testimonials._gContent":"duplicated the Content bucket header above it (66049)","Testimonials._gStyle":"duplicated the Style bucket header above it (66049)","AppointmentBooking._gContent":"duplicated the Content bucket header above it (66050)","BookingBox._gContent":"duplicated the Content bucket header above it ([SPLIT] Booking Form Into Three Boxes) \u2014 the same fault its own section retired in 66050, one level down","FAQ._gContent":"duplicated the Content bucket header above it (66050, family sweep)","FAQ._gLayout":"duplicated the Layout bucket header above it (66050, family sweep)","Form._gContent":"duplicated the Content bucket header above it (66050)","ReviewForm._gContent":"duplicated the Content bucket header above it (66050)","SubmitBuild._gContent":"duplicated the Content bucket header above it (66050)","SubmitBox._gContent":"duplicated the Content bucket header above it ([SPLIT] SubmitBuild Keeps Its Two Columns) \u2014 the same fault its own section retired in 66050, one level down","CheckoutCTA._gContent":"duplicated the Content bucket header above it (66051)","CheckoutCTA._gLayout":"duplicated the Layout bucket header above it (66051)","DeliveryOptions._gContent":"duplicated the Content bucket header above it (66051)","DeliveryOptions._gLayout":"duplicated the Layout bucket header above it (66051)","OrderSummary._gContent":"duplicated the Content bucket header above it (66051)","OrderSummary._gLayout":"duplicated the Layout bucket header above it (66051)","PaymentBadges._gContent":"duplicated the Content bucket header above it (66051)","PaymentBadges._gLayout":"duplicated the Layout bucket header above it (66051)","Collections._gContent":"duplicated the Content bucket header above it (66052)","Collections._gLayout":"duplicated the Layout bucket header above it (66052)","DocMasthead._gContent":"duplicated the Content bucket header above it (66053)","Events._gContent":"duplicated the Content bucket header above it (66054)","Events._gLayout":"duplicated the Layout bucket header above it (66054)","FeaturedCover._gContent":"duplicated the Content bucket header above it (66054)","Series._gStyle":"duplicated the Style bucket header above it (66054)","Flex._gContent":"duplicated the Content bucket header above it (66055)","Flex._gLayout":"duplicated the Layout bucket header above it (66055)","SectionHeader._gContent":"duplicated the Content bucket header above it (66055)","Breadcrumb._gContent":"duplicated the Content bucket header above it (66056)","CategoryBar._gStyle":"duplicated the Style bucket header above it (66056)","Hero._gContent":"duplicated the Content bucket header above it (66056)","Hero._gStyle":"duplicated the Style bucket header above it (66056)","HeroSingle._gStyle":"duplicated the Style bucket header above it (66056)","IntroBleed._gContent":"duplicated the Content bucket header above it (66056)","IntroBleed._gLayout":"duplicated the Layout bucket header above it (66056)","BundleOffer._gLayout":"duplicated the Layout bucket header above it (66059)","ProcessSteps._gContent":"duplicated the Content bucket header above it (66059)","Banner._gContent":"duplicated the Content bucket header above it (66060.1)","Banner._gLayout":"duplicated the Layout bucket header above it, and governed no controls (66060.1)","Manifesto._gContent":"duplicated the Content bucket header above it (66060.1)","SubscribeBlogs._gHeadCopy":"duplicated the Content bucket header above it (66060.1)","SubscribeBlogs._gLeftCopy":"duplicated the Content bucket header above it (66060.1)","SubscribeBlogs._gRightCopy":"duplicated the Content bucket header above it (66060.1)","Ticker._gContent":"duplicated the Content bucket header above it (66060.1)","Ticker._gStyle":"duplicated the Style bucket header above it (66060.1)","Timeline._gContent":"duplicated the Content bucket header above it (66060.1)","TitleWithButtons._gContent":"duplicated the Content bucket header above it (66060.1)","TitleWithButtons._gStyle":"duplicated the Style bucket header above it (66060.1)","Cards._gContent":"duplicated the Content bucket header above it (66218)","Cards._gStyle":"duplicated the Style bucket header above it (66218)","Prose._gContent":"duplicated the Content bucket header above it (66218)","Reviews._gContent":"duplicated the Content bucket header above it (66218)","Reviews._gStyle":"duplicated the Style bucket header above it (66218)"},_g={Content:["Content"],Size:["Size"],Design:["Design","Style"],Layout:["Layout"],Position:["Position"],Anchor:["Anchor"],Animation:["Animation"]},Ng={_gAnchor:"repeated the Anchor group heading above it (two tabs, 11.0.0)"};{let e={...xn(),...In("full"),...hn(),...gn(),...dn(),...pn(),...mn()};for(let o of Object.keys(Ng)){let t=vo(e[o]),r=t?ic[t.label]:void 0;if(!t||t.level!==2||!r||!_g[r].includes(t.label))throw new Error(`INJECTED_RETIRED (lib/puck/field-groups.ts) lists "${o}", but no uniform builder makes a level-2 heading by that key whose label repeats its place's word. The heading was renamed, moved or removed and the row is stale \u2014 a list that quietly matches nothing is worse than no list.`)}}var $O=new Set(["_sContent","_sStyle","_sLayout","_sMedia"]),jO=new Map([[Ze.Design,"Content"],[Ze.Animation,"Animation"],...sc.map(e=>[lr[e],e])]);function Mg(e){let o=new Set([...Object.values(Ze),lr.Content]);for(let[t,r]of Object.entries(e))if(!o.has(t)&&vo(r)?.level===1)return 1;return 2}function KO(e){let o=`${e}.`;return Object.keys(qO).filter(t=>t.startsWith(o)).map(t=>t.slice(o.length))}function VO(e,o){let t=gs(e),r=Xe(o);return t?_e(t.tier,r):r}function XO(e,o){let t=vo(o);return t?e==="Content"||e==="Animation"?_m(o,t.label):Nm(o):o}function Og(e){return e==="Design"?sc:["Animation"]}function SK(e,o){let t=[],r=new Set(KO(o)),a=new Set,n=!1,s=null;for(let[x,g]of Object.entries(e)){let C=vo(g);if($O.has(x))throw new Error(`${o}.${x}: that key was a tab header until efficient-web-builder 11.0.0, when the panel moved to two tabs (Design \xB7 Animation). Its tab is gone, so the key may not come back. Give the heading a key of the section's own (\`_g\u2026\`), or open a Design group with its own key (\`_dDesign: section("Design")\`, \`_dLayout: section("Layout")\`).`);let w=jO.get(x);if(w!==void 0){if(C?.level!==1)throw new Error(`${o}.${x}: that key is reserved for the ${w} heading of the settings panel, but this field is ${C?`a level-${C.level} "${C.label}" header`:"not a header"}, so it cannot serve as one. Rename the section's own field.`);(x===Ze.Design||x===Ze.Animation)&&(n=!0),t.push(s={place:w,entries:[],adopted:!0});continue}if(!C){s||t.push(s={place:"Content",entries:[]}),s.entries.push([x,g]);continue}if(r.has(x)||x in Ng){let v=lc(o,x,C.label);if(C.level!==2||!v||!_g[v].includes(C.label))throw new Error(`${o}.${x}: ${r.has(x)?"RETIRED":"INJECTED_RETIRED"} (lib/puck/field-groups.ts) lists this sub-heading as one whose name repeats the place it sits in, but it is a level-${C.level} "${C.label}" header in the ${v??"(unclassified)"} place. Only a level-2 header whose label is one of its place's words (PLACE_WORDS) may be retired \u2014 anything else is a heading a merchant reads for its own sake. Fix the row or drop it.`);r.has(x)&&a.add(x),t.push(s={place:v,entries:[]});continue}let b=lc(o,x,C.label);if(!b)throw new Error(`${o}.${x}: the inspector group "${C.label}" is not classified in LABEL_GROUP (lib/puck/field-groups.ts), so there is no way to say which of ${[...sc,"Animation"].join(" / ")} its controls belong under. Classify it \u2014 an unclassified group silently lands wherever it was declared, which is the whole bug.`);t.push(s={place:b,entries:[[x,C.level===2?g:VO(g,C.label)]]})}let i=new Set(Object.entries(e).filter(([,x])=>vo(x)).map(([x])=>x));for(let[x,g]of[["BLOCK_KEY_GROUP",Bg],["KEY_GROUP",Ag]]){let C=Object.keys(g).filter(w=>w.startsWith(`${o}.`)).filter(w=>!i.has(w.slice(o.length+1)));if(C.length)throw new Error(`${o}: ${x} (lib/puck/field-groups.ts) lists ${JSON.stringify(C)}, but no fold header by that key is in this section's panel. Either the heading was renamed or removed and the row is stale, or the row names the wrong key \u2014 an override that quietly matches nothing is worse than no override.`)}let c=n?[]:[...r].filter(x=>!a.has(x));if(c.length)throw new Error(`${o}: RETIRED (lib/puck/field-groups.ts) lists ${JSON.stringify(c)}, but this section has no such fold header${c.length>1?"s":""}. Either the heading was renamed or removed and the row is stale, or the row names the wrong section \u2014 a list that quietly matches nothing is worse than no list.`);let u=new Set(t.filter(x=>x.entries.length>0).map(x=>x.place)),p=ia.filter(x=>Og(x).some(g=>u.has(g))),m={};for(let x of p){m[Ze[x]]=cn(x,x===p[0]?p:null);for(let g of Og(x)){if(!u.has(g))continue;let C=t.filter(b=>b.place===g),w=C.findIndex(b=>b.adopted);w>0&&C.unshift(...C.splice(w,1)),x==="Design"&&(m[lr[g]]=ni(g));for(let b of C)for(let[v,S]of b.entries)m[v]=XO(g,S)}}return m}function CK(e){return Ze.Design in e?e:{[Ze.Design]:cn("Design",null),[lr.Content]:ni("Content"),...e}}function vK(e){return ia.some(o=>Ze[o]in e)}function wK(e){let o=ia.filter(r=>Ze[r]in e);if(o.length===0)return e;let t={...e};for(let r of o)t[Ze[r]]=cn(r,r===o[0]?o:null);return t}var fc=" text",Hg="Text";function cc(e){let o=e.rows.filter(t=>t.shown);return o.length===0||o.length===1&&o[0].labelled}function Wg(e){return e.filter(cc).map(o=>o.key)}function Gg(e,o){let t=null;for(let r of o){let a=e[r];!a||a.marker!==!0||typeof a.fold!="string"||(t??={...e},t[r]={...a,fold:!1})}return t??e}function zg(e,o){if(e.size!==o.size)return!1;for(let t of e)if(!o.has(t))return!1;return!0}var uc=new Map,ul=new Set;function eA(e,o){let t=new Map;for(let a of e.querySelectorAll(".es-insp-row[data-field]"))t.set(a.getAttribute("data-field")??"",a);let r=[];for(let[a,n]of o)r.push({key:a,rows:n.map(s=>{let i=t.get(s),c=!!i&&[...i.children].some(p=>!p.hidden),u=i?.querySelector(".es-field-label, .es-list-label")?.textContent?.trim();return{shown:c,labelled:c&&!!u}})});return r}var oA=Object.fromEntries(ia.map(e=>{let o=Am[e];return[e,pc(o,{},e)]}));function mc({entries:e,entryCount:o=0}){let{id:t,fields:r,values:a,readOnly:n,onChange:s}=QO(),[i,c]=dc(()=>new Set(ul)),[u,p]=dc(()=>new Set),m=ZO(null),x=Ug(()=>{let F=new Map;for(let A of qg(r).rows){if(!A.fold)continue;let O=F.get(A.fold.key)??[];O.push(A.name),F.set(A.fold.key,O)}return F},[r]);YO(()=>{let F=m.current?.parentElement;if(!F)return;let A=new Set(Wg(eA(F,x)));p(O=>zg(O,A)?O:A)});let g=Ug(()=>Gg(r,u),[r,u]),C={key:fc,rows:Array.from({length:o},()=>({shown:!0,labelled:!0}))},w=cc(C)?void 0:{key:fc,title:Hg},[b,v]=dc(()=>uc.get(t)),S=uc.get(t),h=qg(r).buckets,k=S&&h.includes(S)?S:b&&h.includes(b)?b:h[0],P=k===void 0||Bm(h,k)!==!0;return pc(JO,{fields:g,values:a,onChange:s,readOnly:n,tab:k,onTab:F=>{uc.set(t,F),v(F)},tabIcons:oA,idPrefix:t,ariaLabel:l("Section settings"),lead:P?e:null,leadFold:w,closedFolds:i,onFold:(F,A)=>{A?ul.delete(F):ul.add(F),c(new Set(ul))},children:pc("span",{ref:m,hidden:!0})})}import{SettingsSwitch as iA}from"efficient-easel/panel";var jg=xg,Ic={kind:"header"},hc={kind:"website"},Kg={kind:"chat"},Vg={kind:"social"},pl="Part";function fA(e){return l("Part of {name}",{name:l(e)})}function cA(e,o,t){let r=e.describeNode(o);return{name:t,kindLabel:r?fA(r.label):l(pl)}}function dA(e){switch(e){case"Header":return{title:l("Header settings belong to a website."),own:l("Each website created from this template sets its own header afterwards.")};case"Appearance":return{title:l("Appearance settings belong to a website."),own:l("Each website created from this template sets its own appearance afterwards.")};case"Live chat":return{title:l("Live chat settings belong to a website."),own:l("Each website created from this template sets its own live chat afterwards.")};case"Social link":return{title:l("Social link settings belong to a website."),own:l("Each website created from this template sets its own social link afterwards.")};default:return{title:l("{what} settings belong to a website.",{what:e}),own:l("Each website created from this template sets its own {what} afterwards.",{what:e.toLowerCase()})}}}function Xg({what:e}){let o=dA(e);return bt("div",{className:"sf-note",children:[J("p",{children:J("strong",{children:o.title})}),bt("p",{children:[l("A template is a blueprint \u2014 it has no website of its own, so there is nothing here to change.")," ",o.own]})]})}var uA={header:{name:"Header",kindLabel:"Site settings",icon:"header",render:(e,o)=>{let t=o.hostPanels?.header;return t?J(t,{placeholderMode:o.capabilities.placeholderFrames,tokenRef:o.tokenRef,siteId:o.siteId,websiteName:o.websiteName,onOpenWebsiteSettings:o.onOpenWebsiteSettings,onAuthExpired:()=>o.notifyParent("storefront-editor:auth-expired")}):null}},website:{name:"Appearance",kindLabel:"Site settings",icon:"website",render:(e,o)=>J(Un,{themeFromDocument:!o.capabilities.hasSiteTheme,tokenRef:o.tokenRef,siteId:o.siteId,onNotify:o.onNotify})},chat:{name:"Live chat",kindLabel:"Site settings",icon:"chat",render:()=>J(VI,{})},social:{name:"Social links",kindLabel:"Site settings",icon:"social",render:()=>J(eh,{unavailable:J(Xg,{what:"Social link"})})},ticker:{name:Xr,kindLabel:pl,icon:"ticker",head:(e,o)=>e.kind==="ticker"?cA(o,e.heroId,l(Xr)):null,render:e=>J(ug,{heroId:e.kind==="ticker"?e.heroId:""})},part:{name:pl,kindLabel:pl,icon:"Text",head:(e,o)=>{if(e.kind!=="part")return null;let t=o.describeNode(e.nodeId);if(!t)return null;let{key:r,row:a}=xo(e.propKey),n=a?$t(t.fields[r],a):t.fields[r],s=bx(l(Li(Ln(n??{},r))),a),i=aA({name:s,tier:"part",of:l(t.label)},{partOf:({name:c})=>l("Part of {name}",{name:c})});return{name:i.name,kindLabel:i.kind}},render:(e,o)=>e.kind==="part"?J(dI,{nodeId:e.nodeId,propKey:e.propKey,onBack:()=>o.onSelectNode(e.nodeId),onEditStyle:o.onOpenSiteStyles}):null}},pA=new Set(["header","website","chat"]);function mA(e,o){if(e==="puck")return null;let t=uA[e];return pA.has(e)&&!o.hasSiteSettings?{...t,kindLabel:"Not part of a template",render:()=>J(Xg,{what:t.name})}:t}function Yg({mode:e,onOpenWebsiteSettings:o,onOpenSiteStyles:t,onSelectNode:r,hideNodeActions:a=!1,onNotify:n,onHidePanel:s}){let{capabilities:i,tokenRef:c,notifyParent:u,currentSlug:p,siteId:m,runAuthed:x,readOnly:g}=we(),{websiteName:C}=re(),w=Uo({readOnly:g}),{select:b}=na(),{selectedItem:v,getItemById:S,getSelectorForId:h,config:k,appState:P}=rA(Y=>Y),F=UI(k,v?{type:v.type,props:v.props}:null),A=v?wx(F??k.components[v.type]?.fields,v.props):[],O=Y=>k.components[Y]?.label??Y,B=v?h(v.props.id):void 0,U=mA(e.kind,i),me=Be(),j={capabilities:i,tokenRef:c,hostPanels:me.chrome?.panels,describeNode:Y=>{let q=S(Y);if(!q)return null;let ve=k.components[q.type];return{type:q.type,label:ve?.label??q.type,fields:ve?.fields??{}}},siteId:m,websiteName:C??null,notifyParent:u,onNotify:n,onOpenWebsiteSettings:o,onOpenSiteStyles:t,onSelectNode:r},he=U?.head?.(e,j)??null,_=he?.name??(U?l(U.name):v?l(O(v.type)):l("Page settings")),ne=he?.kindLabel??(U?l(U.kindLabel):v?B&&B.zone!==ko?l("Block"):l("Section"):l("Page")),Oe=U?U.icon:v?v.type:"page",We=U?null:v?k.components[v.type]?.fields??null:k.root?.fields??null,bo=We?Mg(We):2,$e=e.kind==="puck"&&v?Dn(v.type):null,Ae=!!v&&!!B&&B.zone===ko&&v.type!==ae&&v.type!==ke,Qe=il(P?.data,v),Ee=()=>{Qe||B&&w.duplicateComponent(B.zone,B.index)},fe=()=>{B&&(w.removeComponent(B.zone,B.index),w.select(null))},ye=v?k.components[v.type]?.defaultProps?.previewHover:void 0,xe=e.kind==="puck"&&!!v&&!!B&&ye!==void 0,je=xe&&v.props.previewHover===!0,E=()=>{!v||!B||w.replaceComponent(B.zone,B.index,{...v,props:{...v.props,previewHover:!je}})},[te,X]=tA(lf);return bt("div",{className:`es-sidepanel es-sidepanel--right sf-panel sf-panel--right${te||!(!U&&v)?"":" sf-hints-folded"}`,children:[J(nA,{icon:J(Jt,{type:Oe,size:15}),name:_,kind:ne,actions:!a&&e.kind==="puck"&&v&&v.type!==ae?bt(xc,{children:[J($g,{label:l("Duplicate section"),title:Qe??void 0,disabled:Qe!==null,onClick:Ee,children:J(lA,{size:15})}),Ae&&i.hasSiteSettings&&J(mg,{node:v,currentSlug:p,siteId:m??void 0,tokenRef:c,runAuthed:x,onNotify:n}),J($g,{label:l("Remove section"),danger:!0,onClick:fe,children:J(sA,{size:15})}),s?J(jl,{side:"right",onHide:s,divider:!0}):null]}):s?J(jl,{side:"right",onHide:s}):void 0}),xe&&bt("div",{className:"sf-preview-pin",children:[bt("div",{className:"sf-preview-pin-text",children:[J("span",{className:"sf-preview-pin-label",children:l("Preview hover state")}),J("span",{className:"sf-preview-pin-hint",children:l("not shown live")})]}),J(iA,{checked:je,onChange:E,ariaLabel:l("Preview hover state")})]}),J(pm,{tier:bo,children:J("div",{className:"sf-insp-body es-insp-body sf-scroll",children:U?U.render(e,j):v?bt(xc,{children:[v.type===ae&&i.hasSiteSettings&&J(Rg,{}),J(qu,{children:J(mc,{entries:J(Ig,{parts:A,heading:!1,onOpen:Y=>b(Dr(v.props.id,Y))}),entryCount:rc(A).length})}),$e&&J(Hn,{source:$e,slug:qr(v?.props)}),J(sf,{shown:te,onChange:X})]}):J(xc,{children:J(mc,{})})})})]})}import{jsx as f,jsxs as y,Fragment as ob}from"react/jsx-runtime";var Fe={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)"},gc="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 L({w:e,h:o,tone:t="dark",r=2,style:a}){return f("div",{style:{width:e,height:o,borderRadius:r,background:Fe[t],flex:"none",...a}})}var xA={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",Countdown:"countdown",Reviews:"reviews",SubmitBuild:"submitbuild",ReviewForm:"reviewform",Form:"form",AppointmentBooking:"appointmentbooking",ContactRouting:"contact",ContactLocations:"contactlocations",Header:"header",Footer:"footer",SectionHeader:"sectionheader",Grid:"grid",Flex:"blanksection",Spacer:"spacer",Divider:"divider",CustomHTML:"customhtml",Heading:"heading",Text:"text",ImageBlock:"image",ButtonBlock:"button",MenuBlock:"menu",EmailFormBlock:"emailform",SocialLogosBlock:"sociallogos",LegalLineBlock:"legalline",SearchBlock:"search",CartBlock:"cart",CountrySwitchBlock:"countryswitch"},D={position:"absolute",inset:0},d={ink:"var(--sf-thumb-ink)",ink2:"var(--sf-thumb-ink-2)",inkSoft:"var(--sf-thumb-ink-soft)",inkSoft2:"var(--sf-thumb-ink-soft-2)",paper:"var(--sf-thumb-paper)",paper2:"var(--sf-thumb-paper-2)",warm:"var(--sf-thumb-warm)",rust:"var(--sf-thumb-rust)",onInk:"var(--sf-thumb-on-ink)",text:"var(--sf-thumb-scene-text)",muted:"var(--sf-thumb-scene-muted)",rule:"var(--sf-thumb-scene-rule)",mark1:"var(--sf-thumb-mark-1)",mark2:"var(--sf-thumb-mark-2)",card:"var(--sf-thumb-card)",scrim:"var(--sf-thumb-scrim)"},Ie=(e,o,t=160)=>({background:`linear-gradient(${t}deg,${e},${o})`});function Ho({size:e,style:o}){let t=Math.max(2,Math.round(e*.13)),r=(a,n,s)=>({position:"absolute",inset:a,background:n,borderRadius:t,...s?{mixBlendMode:s}:null});return y("span",{style:{position:"absolute",display:"block",width:e,height:e,...o},children:[f("span",{style:r("8% 26% 30% 6%",d.mark1)}),f("span",{style:r("26% 6% 8% 30%",d.mark2,"multiply")})]})}function ca({children:e}){return f("span",{style:{fontSize:"4.64cqw",fontWeight:700,letterSpacing:"0.06em",textTransform:"uppercase",color:d.muted},children:e})}function Zg({over:e,overTone:o,head:t,headSize:r=11.5,cta:a,ctaBg:n,ctaFg:s,tone:i}){return y(ob,{children:[e&&f("span",{style:{fontSize:"3.65cqw",letterSpacing:"0.16em",fontWeight:700,color:o},children:e}),f("span",{style:{fontSize:r,lineHeight:1.15,fontWeight:700,maxWidth:"78%",color:i},children:t}),a&&f("span",{style:{alignSelf:"flex-start",fontSize:"3.65cqw",letterSpacing:"0.12em",fontWeight:700,padding:"4px 8px",borderRadius:2,marginTop:2,background:n,color:s},children:a})]})}function bc({name:e,price:o}){return y("div",{style:{display:"flex",flexDirection:"column",gap:2,minWidth:0},children:[f("div",{style:{flex:1,minHeight:0,borderRadius:3,position:"relative",overflow:"hidden",...Ie(d.paper,d.paper2,150)},children:f(Ho,{size:34,style:{left:"50%",top:"50%",transform:"translate(-50%,-50%)"}})}),f("span",{style:{fontSize:"3.65cqw",fontWeight:600,color:d.text},children:e}),f("span",{style:{fontSize:"3.65cqw",color:d.muted},children:o})]})}function Mo({k:e,v:o,ok:t}){return y("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",gap:6,padding:"3.5px 2px",borderBottom:`1px solid ${d.rule}`,fontSize:"3.98cqw",color:d.muted},children:[f("span",{children:e}),y("span",{style:{display:"flex",gap:6,alignItems:"center"},children:[f("b",{style:{color:d.text,fontWeight:700},children:o}),t&&f("span",{style:{color:d.rust,fontWeight:700},children:"\u2713"})]})]})}function le({title:e,children:o}){return y("div",{style:{...D,background:d.card,padding:"9px 10px",display:"flex",flexDirection:"column",gap:6},children:[f(ca,{children:e}),o]})}function Qg({size:e=14}){return f("span",{style:{width:e,height:e,borderRadius:"50%",flex:"none",display:"block",background:`linear-gradient(150deg,${d.mark1},${d.mark2})`}})}function yc({filled:e=5,size:o=6}){return y("span",{style:{fontSize:o,letterSpacing:"0.06em",color:d.rust,lineHeight:1},children:["\u2605".repeat(e),f("span",{style:{color:d.mark1},children:"\u2605".repeat(5-e)})]})}function fa({n:e,label:o,tone:t=d.text}){return y("div",{style:{flex:1,display:"flex",flexDirection:"column",gap:1,minWidth:0},children:[f("b",{style:{fontSize:"8.16cqw",lineHeight:1,color:t},children:e}),f("span",{style:{fontSize:"3.65cqw",letterSpacing:"0.08em",textTransform:"uppercase",opacity:.62,color:t},children:o})]})}function Re({children:e,w:o}){return f("span",{style:{fontSize:"3.98cqw",lineHeight:1.45,color:d.muted,width:o,display:"block"},children:e})}function ml({label:e,w:o="100%",filled:t}){return y("div",{style:{width:o,display:"flex",flexDirection:"column",gap:2},children:[f("span",{style:{fontSize:"3.32cqw",letterSpacing:"0.08em",textTransform:"uppercase",color:d.muted},children:e}),f("span",{style:{height:9,borderRadius:3,border:`1px solid ${d.rule}`,background:t?d.paper:d.card}})]})}function Jg({children:e}){return f("span",{style:{alignSelf:"flex-start",fontSize:"3.65cqw",letterSpacing:"0.12em",fontWeight:700,padding:"5px 9px",borderRadius:2,background:d.text,color:d.onInk},children:e})}var IA={wheelslisting:f(le,{title:"All wheels",children:f("div",{style:{flex:1,display:"flex",flexDirection:"column",gap:4,justifyContent:"center"},children:[["Ridge 19","20\xD79 +12","$365"],["Ridge 29","18\xD79 +20","$410"],["Ridge 39","17\xD78 \u221210","$455"]].map(([e,o,t])=>y("div",{style:{display:"flex",alignItems:"center",gap:6},children:[f("span",{style:{width:20,height:15,borderRadius:3,flex:"none",position:"relative",overflow:"hidden",...Ie(d.paper,d.paper2,150)},children:f(Ho,{size:12,style:{left:"50%",top:"50%",transform:"translate(-50%,-50%)"}})}),f("b",{style:{flex:1,fontSize:"4.31cqw",color:d.text},children:e}),f("span",{style:{fontSize:"3.65cqw",color:d.muted},children:o}),f("b",{style:{fontSize:"4.31cqw",color:d.text,width:26,textAlign:"right"},children:t})]},e))})}),catalogfilterbar:y("div",{style:{...D,background:d.card,display:"flex",flexDirection:"column",justifyContent:"center",gap:7,padding:"0 11px"},children:[y("div",{style:{display:"flex",gap:4,alignItems:"center"},children:[["20 inch","6\xD7139.7","Black"].map(e=>y("span",{style:{fontSize:"3.65cqw",fontWeight:600,padding:"4px 7px",borderRadius:99,background:d.text,color:d.onInk,display:"flex",gap:4,alignItems:"center"},children:[e,f("span",{style:{opacity:.6},children:"\u2715"})]},e)),f("span",{style:{fontSize:"3.65cqw",color:d.rust,fontWeight:700},children:"Clear"})]}),y("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center"},children:[f("span",{style:{fontSize:"3.65cqw",color:d.muted},children:"128 results"}),f("span",{style:{fontSize:"3.65cqw",color:d.muted,border:`1px solid ${d.rule}`,borderRadius:3,padding:"3px 6px"},children:"Sort: Price \u25BE"})]})]}),fitmentfinder:y("div",{style:{...D,padding:"10px 12px",display:"flex",flexDirection:"column",gap:6,justifyContent:"center",...Ie(d.ink,d.inkSoft)},children:[f("span",{style:{fontSize:"5.31cqw",fontWeight:700,color:d.onInk},children:"Will it fit your rig?"}),y("div",{style:{display:"flex",gap:4},children:[["2021","Toyota","Hilux"].map(e=>y("span",{style:{flex:1,fontSize:"3.65cqw",color:d.text,background:d.card,borderRadius:3,padding:"5px 6px",display:"flex",justifyContent:"space-between"},children:[e," ",f("span",{style:{color:d.muted},children:"\u25BE"})]},e)),f("span",{style:{fontSize:"3.65cqw",fontWeight:700,letterSpacing:"0.08em",background:d.warm,color:d.ink,borderRadius:3,padding:"5px 7px"},children:"GO"})]})]}),compatibletyres:f(le,{title:"Tyres that suit",children:f("div",{style:{flex:1,display:"grid",gridTemplateColumns:"repeat(3,1fr)",gap:5,minHeight:0},children:[["Ridge Grappler","$489"],["Trail Grappler","$525"],["Terra Grappler","$438"]].map(([e,o])=>y("div",{style:{display:"flex",flexDirection:"column",gap:2,minWidth:0},children:[f("div",{style:{flex:1,minHeight:0,borderRadius:3,position:"relative",overflow:"hidden",background:d.ink},children:f("span",{style:{position:"absolute",left:"50%",top:"50%",transform:"translate(-50%,-50%)",width:26,height:26,borderRadius:"50%",border:`5px solid ${d.mark2}`,boxSizing:"border-box"}})}),f("span",{style:{fontSize:"3.32cqw",fontWeight:600,color:d.text,overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis"},children:e}),f("span",{style:{fontSize:"3.32cqw",color:d.muted},children:o})]},e))})}),tyresizes:f(le,{title:"Available sizes",children:f("div",{style:{flex:1,display:"flex",flexWrap:"wrap",gap:4,alignContent:"center"},children:["265/65R17","285/70R17","265/60R18","275/55R20"].map((e,o)=>f("span",{style:{fontSize:"3.65cqw",fontWeight:600,padding:"5px 7px",borderRadius:3,border:`1px solid ${o===0?d.rust:d.rule}`,color:o===0?d.rust:d.text,background:o===0?d.paper:d.card},children:e},e))})}),tyrefitment:y(le,{title:"Will it fit your car?",children:[f("div",{style:{display:"flex",gap:3},children:["Make","Model","Year","Trim"].map(e=>y("span",{style:{flex:1,minWidth:0,fontSize:"3.32cqw",color:d.muted,background:d.paper,border:`1px solid ${d.rule}`,borderRadius:3,padding:"4px 5px",display:"flex",justifyContent:"space-between",gap:2,overflow:"hidden",whiteSpace:"nowrap"},children:[e," ",f("span",{style:{color:d.muted},children:"\u25BE"})]},e))}),f("div",{style:{flex:1,display:"flex",flexDirection:"column",gap:2,justifyContent:"center",minHeight:0},children:[["265/65R17","Fits",!0],["285/70R17","Not your size",!1]].map(([e,o,t])=>y("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"baseline",gap:6,borderTop:`1px solid ${d.rule}`,paddingTop:3},children:[f("span",{style:{fontSize:"3.32cqw",fontWeight:600,color:d.text},children:e}),f("span",{style:{fontSize:"3.32cqw",fontWeight:t?700:400,letterSpacing:"0.06em",color:t?d.warm:d.muted},children:o})]},e))})]}),eutyrelabel:y("div",{style:{...D,background:d.card,padding:"9px 11px",display:"flex",gap:8,alignItems:"center"},children:[f("div",{style:{flex:1,display:"flex",flexDirection:"column",gap:1.5},children:[["A","42%"],["B","56%"],["C","70%"],["D","84%"]].map(([e,o],t)=>y("div",{style:{display:"flex",alignItems:"center",gap:3},children:[f("span",{style:{width:o,height:6,borderRadius:"0 2px 2px 0",background:t===1?d.rust:d.mark1}}),f("span",{style:{fontSize:"3.32cqw",fontWeight:700,color:t===1?d.rust:d.muted},children:e})]},e))}),y("div",{style:{flex:"none",display:"flex",flexDirection:"column",gap:3,alignItems:"center"},children:[f("b",{style:{fontSize:"6.63cqw",lineHeight:1,color:d.text},children:"72"}),f("span",{style:{fontSize:"3.32cqw",letterSpacing:"0.08em",color:d.muted},children:"dB"})]})]}),bundleoffer:y("div",{style:{...D,background:d.paper,padding:"9px 11px",display:"flex",flexDirection:"column",gap:5,justifyContent:"center"},children:[f(ca,{children:"Buy it with"}),y("div",{style:{display:"flex",alignItems:"center",gap:5},children:[[0,1].map(e=>f("span",{style:{width:26,height:22,borderRadius:3,flex:"none",position:"relative",overflow:"hidden",background:d.card},children:f(Ho,{size:17,style:{left:"50%",top:"50%",transform:"translate(-50%,-50%)"}})},e)),f("span",{style:{fontSize:"5.69cqw",fontWeight:700,color:d.muted},children:"+"}),y("div",{style:{flex:1,display:"flex",flexDirection:"column",gap:1},children:[f("span",{style:{fontSize:"3.65cqw",color:d.muted,textDecoration:"line-through"},children:"$1,024"}),f("b",{style:{fontSize:"6.02cqw",color:d.rust,lineHeight:1},children:"$899"})]})]})]}),checkoutcta:y("div",{style:{...D,display:"flex",alignItems:"center",justifyContent:"space-between",padding:"0 13px",gap:8,...Ie(d.ink,d.ink2)},children:[y("div",{style:{display:"flex",flexDirection:"column",gap:2},children:[f("span",{style:{fontSize:"3.65cqw",letterSpacing:"0.12em",color:d.warm,fontWeight:700},children:"READY TO ORDER"}),f("b",{style:{fontSize:"6.63cqw",color:d.onInk,lineHeight:1},children:"$1,956"}),f("span",{style:{fontSize:"3.65cqw",color:d.onInk,opacity:.65},children:"4 items \xB7 fitted free"})]}),f("span",{style:{fontSize:"3.65cqw",letterSpacing:"0.12em",fontWeight:700,padding:"6px 10px",borderRadius:2,background:d.warm,color:d.ink,flex:"none"},children:"CHECKOUT"})]}),contact:f(le,{title:"Who do you need?",children:f("div",{style:{flex:1,display:"flex",flexDirection:"column",gap:4,justifyContent:"center"},children:[["Fitment help","the workshop"],["Order status","the front desk"],["Trade accounts","sales"]].map(([e,o])=>y("div",{style:{display:"flex",alignItems:"center",gap:5},children:[f("b",{style:{flex:1,fontSize:"4.31cqw",color:d.text},children:e}),f("span",{style:{fontSize:"3.65cqw",color:d.muted},children:o}),f("span",{style:{fontSize:"4.64cqw",color:d.rust,lineHeight:1},children:"\u203A"})]},e))})}),contactlocations:f(le,{title:"Find us",children:f("div",{style:{flex:1,display:"grid",gridTemplateColumns:"repeat(2,1fr)",gap:5,minHeight:0},children:[["Brisbane","7 Kerry Rd","Mon\u2013Sat"],["Townsville","12 Enterprise","Mon\u2013Fri"]].map(([e,o,t])=>y("div",{style:{border:`1px solid ${d.rule}`,borderRadius:4,padding:"5px 6px",display:"flex",flexDirection:"column",gap:1},children:[f("b",{style:{fontSize:"4.31cqw",color:d.text},children:e}),f("span",{style:{fontSize:"3.32cqw",color:d.muted},children:o}),f("span",{style:{fontSize:"3.32cqw",color:d.rust,fontWeight:700},children:t})]},e))})}),form:f(le,{title:"Send us a message",children:y("div",{style:{flex:1,display:"flex",flexDirection:"column",gap:4,justifyContent:"center"},children:[y("div",{style:{display:"flex",gap:5},children:[f(ml,{label:"Name"}),f(ml,{label:"Email"})]}),f(ml,{label:"Message",filled:!0}),f(Jg,{children:"SEND"})]})}),appointmentbooking:f(le,{title:"Book a fitting",children:y("div",{style:{flex:1,display:"flex",flexDirection:"column",gap:4,justifyContent:"center"},children:[f("div",{style:{display:"flex",gap:3},children:["Mon","Tue","Wed","Thu"].map((e,o)=>f("span",{style:{flex:1,textAlign:"center",fontSize:"3.32cqw",fontWeight:o===2?700:500,padding:"4px 0",borderRadius:3,background:o===2?d.text:d.paper,color:o===2?d.onInk:d.muted},children:e},e))}),f("div",{style:{display:"flex",gap:3},children:["8:00","10:30","13:00","15:30"].map((e,o)=>f("span",{style:{flex:1,textAlign:"center",fontSize:"3.32cqw",padding:"4px 0",borderRadius:3,border:`1px solid ${o===1?d.rust:d.rule}`,color:o===1?d.rust:d.muted,background:o===3?d.paper:d.card,textDecoration:o===3?"line-through":"none"},children:e},e))})]})}),reviewform:f(le,{title:"Leave a review",children:y("div",{style:{flex:1,display:"flex",flexDirection:"column",gap:5,justifyContent:"center"},children:[f(yc,{filled:4,size:14}),f(ml,{label:"Your review",filled:!0}),f(Jg,{children:"POST"})]})}),submitbuild:f(le,{title:"Show us your build",children:y("div",{style:{flex:1,display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",gap:3,border:`1px dashed ${d.mark1}`,borderRadius:5,background:d.paper},children:[f("span",{style:{fontSize:"6.63cqw",lineHeight:1,color:d.rust,fontWeight:300},children:"+"}),f("span",{style:{fontSize:"3.65cqw",color:d.muted},children:"Drop a photo of your rig"})]})}),masthead:y("div",{style:{...D,background:d.paper,display:"flex",flexDirection:"column",justifyContent:"center",padding:"0 13px",gap:5},children:[f("span",{style:{height:1.5,background:d.text}}),f("span",{style:{fontSize:"7.65cqw",fontWeight:800,letterSpacing:"0.02em",color:d.text,lineHeight:1},children:"THE TRACK"}),y("div",{style:{display:"flex",justifyContent:"space-between",fontSize:"3.65cqw",letterSpacing:"0.1em",textTransform:"uppercase",color:d.muted},children:[f("span",{children:"Issue 14"}),f("span",{children:"Spring 2026"})]}),f("span",{style:{height:1,background:d.rule}})]}),featuredcover:y("div",{style:{...D,overflow:"hidden",...Ie(d.ink,d.inkSoft2)},children:[f(Ho,{size:92,style:{right:-18,top:-14}}),f("div",{style:{position:"absolute",inset:0,background:`linear-gradient(0deg,${d.scrim},transparent 62%)`}}),y("div",{style:{position:"absolute",left:12,right:12,bottom:11,display:"flex",flexDirection:"column",gap:3},children:[f("span",{style:{fontSize:"3.65cqw",letterSpacing:"0.16em",fontWeight:700,color:d.warm},children:"FEATURE"}),f("span",{style:{fontSize:"6.16cqw",lineHeight:1.15,fontWeight:700,color:d.onInk},children:"Four days on the Madigan Line"})]})]}),longread:y("div",{style:{...D,background:d.card,padding:"10px 14px",display:"flex",flexDirection:"column",gap:4,justifyContent:"center"},children:[f("span",{style:{fontSize:"3.65cqw",letterSpacing:"0.14em",fontWeight:700,color:d.rust},children:"12 MIN READ"}),f("span",{style:{fontSize:"6.02cqw",lineHeight:1.15,fontWeight:700,color:d.text},children:"What breaks first, and why"}),f(Re,{children:"Every failure starts in the same place \u2014 not the rim, not"}),f(Re,{w:"62%",children:"the tyre, but the bolt nobody re-torqued."})]}),series:f(le,{title:"Recurring columns",children:f("div",{style:{flex:1,display:"flex",flexDirection:"column",gap:5,justifyContent:"center"},children:[["Shed Notes","Monthly"],["Track Tested","Fortnightly"],["Reader Rigs","Weekly"]].map(([e,o])=>y("div",{style:{display:"flex",alignItems:"center",gap:6},children:[f("span",{style:{width:3,height:12,borderRadius:2,background:d.rust,flex:"none"}}),f("b",{style:{flex:1,fontSize:"4.64cqw",color:d.text},children:e}),f("span",{style:{fontSize:"3.65cqw",letterSpacing:"0.08em",textTransform:"uppercase",color:d.muted},children:o})]},e))})}),events:f(le,{title:"Latest posts",children:f("div",{style:{flex:1,display:"flex",flexDirection:"column",gap:5,justifyContent:"center"},children:[[d.inkSoft,d.inkSoft2,"Madigan Line, four days"],[d.rust,d.warm,"Why offset beats width"]].map(([e,o,t])=>y("div",{style:{display:"flex",gap:6,alignItems:"center"},children:[f("span",{style:{width:24,height:18,borderRadius:3,flex:"none",...Ie(e,o,150)}}),y("div",{style:{display:"flex",flexDirection:"column",gap:1,minWidth:0},children:[f("b",{style:{fontSize:"4.31cqw",color:d.text},children:t}),f("span",{style:{fontSize:"3.65cqw",color:d.muted},children:"4 Sep \xB7 Shed Notes"})]})]},t))})}),docmasthead:y("div",{style:{...D,background:d.card,padding:"12px 14px",display:"flex",flexDirection:"column",gap:5,justifyContent:"center"},children:[f("span",{style:{fontSize:"3.65cqw",letterSpacing:"0.16em",fontWeight:700,color:d.muted},children:"POLICY"}),f("span",{style:{fontSize:"6.49cqw",fontWeight:700,color:d.text,lineHeight:1.1},children:"Returns & refunds"}),f("span",{style:{fontSize:"3.65cqw",color:d.muted},children:"Version 3 \xB7 Updated 4 Sep 2026"}),f("span",{style:{height:2,width:26,background:d.rust,borderRadius:1}})]}),docbody:f("div",{style:{...D,background:d.card,padding:"9px 13px",display:"flex",flexDirection:"column",gap:3,justifyContent:"center"},children:[["1.","You may return an unfitted wheel within 30 days."],["2.","Fitted wheels are covered by the structural warranty."],["3.","Freight on a change of mind is yours."]].map(([e,o])=>y("div",{style:{display:"flex",gap:5},children:[f("b",{style:{fontSize:"3.98cqw",color:d.rust,flex:"none"},children:e}),f(Re,{children:o})]},e))}),docmetacards:f(le,{title:"At a glance",children:f("div",{style:{flex:1,display:"grid",gridTemplateColumns:"repeat(2,1fr)",gap:5,minHeight:0},children:[["30 days","To return"],["5 years","Structural"],["Free","Fitting"],["48 hrs","Dispatch"]].map(([e,o])=>y("div",{style:{border:`1px solid ${d.rule}`,borderRadius:4,padding:"5px 6px",display:"flex",flexDirection:"column",gap:1},children:[f("b",{style:{fontSize:"5.31cqw",color:d.text,lineHeight:1},children:e}),f("span",{style:{fontSize:"3.32cqw",letterSpacing:"0.08em",textTransform:"uppercase",color:d.muted},children:o})]},o))})}),doctabs:y("div",{style:{...D,background:d.card,display:"flex",flexDirection:"column",justifyContent:"center",gap:0,padding:"0 11px"},children:[f("div",{style:{display:"flex",gap:0},children:["Returns","Warranty","Shipping"].map((e,o)=>f("span",{style:{fontSize:"3.98cqw",fontWeight:o===0?700:500,padding:"5px 8px",color:o===0?d.text:d.muted,background:o===0?d.paper:"transparent",borderRadius:"4px 4px 0 0",border:`1px solid ${o===0?d.rule:"transparent"}`,borderBottom:"none"},children:e},e))}),f("span",{style:{height:1,background:d.rule}}),y("div",{style:{paddingTop:6,display:"flex",flexDirection:"column",gap:2},children:[f(Re,{children:"Unfitted wheels come back within 30 days, no questions."}),f(Re,{w:"58%",children:"Freight on a change of mind is yours."})]})]}),paragraphs:y("div",{style:{...D,background:d.card,padding:"11px 14px",display:"flex",gap:10,alignItems:"center"},children:[f("span",{style:{flex:1,fontSize:"5.86cqw",lineHeight:1.2,fontWeight:700,color:d.text},children:"The right wheel is the boring one."}),y("div",{style:{flex:1,display:"flex",flexDirection:"column"},children:[f(Re,{children:"Forged, correctly offset, rated for what you actually"}),f(Re,{children:"carry. Everything else is a photograph."})]})]}),keyfeatures:f(le,{title:"Key features",children:f("div",{style:{flex:1,display:"flex",flexDirection:"column",gap:4,justifyContent:"center"},children:["Flow-formed barrel","1250 kg per corner","Hub-centric fit"].map(e=>y("div",{style:{display:"flex",gap:6,alignItems:"center"},children:[f("span",{style:{fontSize:"4.64cqw",color:d.rust,fontWeight:700,lineHeight:1},children:"\u2713"}),f("span",{style:{fontSize:"4.31cqw",color:d.text},children:e})]},e))})}),statsparagraph:y("div",{style:{...D,background:d.paper,padding:"10px 12px",display:"flex",gap:10,alignItems:"center"},children:[y("div",{style:{flex:"none",display:"flex",flexDirection:"column",gap:5},children:[f(fa,{n:"27k",label:"Rigs"}),f(fa,{n:"4.9",label:"Rating"})]}),y("div",{style:{flex:1,display:"flex",flexDirection:"column"},children:[f(Re,{children:"Twelve years of fitting the same three questions, and the"}),f(Re,{children:"answer has not moved: load rating, offset, then looks."})]})]}),chart:y(le,{title:"Load vs weight",children:[f("div",{style:{flex:1,display:"flex",alignItems:"flex-end",gap:5,paddingBottom:2},children:[38,62,84,71,96].map((e,o)=>f("span",{style:{flex:1,height:`${e}%`,borderRadius:"2px 2px 0 0",background:o===4?d.rust:d.mark1}},o))}),f("span",{style:{height:1,background:d.rule,marginTop:-4}})]}),mockup:f("div",{style:{...D,overflow:"hidden",display:"flex",alignItems:"center",justifyContent:"center",...Ie(d.inkSoft,d.ink)},children:y("div",{style:{width:"72%",height:"74%",borderRadius:4,overflow:"hidden",background:d.card,boxShadow:`0 6px 14px ${d.scrim}`},children:[f("div",{style:{height:9,background:d.paper,display:"flex",alignItems:"center",gap:2,padding:"0 4px"},children:[0,1,2].map(e=>f("span",{style:{width:2.5,height:2.5,borderRadius:"50%",background:d.mark1}},e))}),y("div",{style:{padding:5,display:"flex",flexDirection:"column",gap:3},children:[f("span",{style:{height:4,width:"56%",borderRadius:1,background:d.mark2}}),f("span",{style:{height:14,borderRadius:2,...Ie(d.paper,d.paper2,150)}}),f("span",{style:{height:3,width:"38%",borderRadius:1,background:d.rust}})]})]})}),manifesto:f("div",{style:{...D,overflow:"hidden",display:"flex",alignItems:"center",padding:"0 16px",...Ie(d.ink,d.ink2)},children:y("span",{style:{fontSize:"6.63cqw",lineHeight:1.2,fontWeight:700,color:d.onInk},children:["We build for the ",f("span",{style:{color:d.warm},children:"last"})," ten percent of the track."]})}),timeline:f(le,{title:"Our story",children:f("div",{style:{flex:1,display:"flex",flexDirection:"column",justifyContent:"center",gap:6,paddingLeft:4},children:[["1998","One shed, one lathe."],["2009","First forged rim."],["2024","27,000 rigs on."]].map(([e,o],t)=>y("div",{style:{display:"flex",gap:7,alignItems:"flex-start",position:"relative"},children:[t<2&&f("span",{style:{position:"absolute",left:3,top:8,bottom:-8,width:1,background:d.rule}}),f("span",{style:{width:7,height:7,borderRadius:"50%",flex:"none",marginTop:1,background:d.rust,zIndex:1}}),y("div",{style:{display:"flex",flexDirection:"column",gap:0,minWidth:0},children:[f("b",{style:{fontSize:"4.64cqw",color:d.text},children:e}),f(Re,{children:o})]})]},e))})}),timelinetrack:y("div",{style:{...D,padding:"0 12px",display:"flex",flexDirection:"column",gap:10,justifyContent:"center",...Ie(d.ink,d.inkSoft)},children:[f("span",{style:{fontSize:"3.98cqw",fontWeight:700,letterSpacing:"0.14em",textTransform:"uppercase",color:d.warm},children:"Milestones"}),y("div",{style:{position:"relative",display:"flex",justifyContent:"space-between",paddingTop:7},children:[f("span",{style:{position:"absolute",left:0,right:0,top:3,height:1,background:d.mark2,opacity:.55}}),["1998","2009","2016","2024"].map((e,o)=>y("div",{style:{display:"flex",flexDirection:"column",alignItems:"center",gap:3,position:"relative"},children:[f("span",{style:{position:"absolute",top:-7,width:6,height:6,borderRadius:"50%",background:o===3?d.warm:d.mark1}}),f("span",{style:{fontSize:"4.31cqw",fontWeight:700,color:o===3?d.warm:d.onInk,opacity:o===3?1:.75},children:e})]},e))]})]}),footprint:y("div",{style:{...D,overflow:"hidden",...Ie(d.paper,d.paper2,150)},children:[f("span",{style:{position:"absolute",left:"8%",top:"18%",width:"62%",height:"64%",borderRadius:"48% 52% 40% 60% / 55% 45% 55% 45%",background:d.mark1,opacity:.75}}),f("span",{style:{position:"absolute",left:"52%",top:"52%",width:"34%",height:"34%",borderRadius:"58% 42% 55% 45% / 45% 58% 42% 55%",background:d.mark2,opacity:.55}}),[["26%","38%"],["44%","58%"],["62%","34%"]].map(([e,o])=>f("span",{style:{position:"absolute",left:e,top:o,width:7,height:7,borderRadius:"50% 50% 50% 0",transform:"rotate(-45deg)",background:d.rust}},e)),f("span",{style:{position:"absolute",left:11,bottom:9,fontSize:"4.64cqw",fontWeight:700,color:d.text},children:"3 fitting bays"})]}),banner:y("div",{style:{...D,display:"flex",alignItems:"center",justifyContent:"space-between",padding:"0 13px",gap:8,background:d.rust},children:[y("div",{style:{display:"flex",flexDirection:"column",gap:2},children:[f("b",{style:{fontSize:"6.02cqw",color:d.onInk},children:"End of season \xB7 20% off"}),f("span",{style:{fontSize:"3.98cqw",color:d.onInk,opacity:.8},children:"Fitted free, this month only."})]}),f("span",{style:{fontSize:"3.65cqw",letterSpacing:"0.12em",fontWeight:700,padding:"5px 9px",borderRadius:2,background:d.onInk,color:d.text,flex:"none"},children:"SHOP"})]}),titlewithbuttons:y("div",{style:{...D,background:d.paper,display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",gap:7,padding:"0 14px",textAlign:"center"},children:[f("span",{style:{fontSize:"6.49cqw",lineHeight:1.15,fontWeight:700,color:d.text},children:"Not sure what fits?"}),y("div",{style:{display:"flex",gap:5},children:[f("span",{style:{fontSize:"3.65cqw",letterSpacing:"0.12em",fontWeight:700,padding:"5px 9px",borderRadius:2,background:d.text,color:d.onInk},children:"FIND MY FIT"}),f("span",{style:{fontSize:"3.65cqw",letterSpacing:"0.12em",fontWeight:700,padding:"5px 9px",borderRadius:2,border:`1px solid ${d.text}`,color:d.text},children:"CALL US"})]})]}),ticker:f("div",{style:{...D,overflow:"hidden",background:d.ink,display:"flex",alignItems:"center"},children:f("span",{style:{whiteSpace:"nowrap",fontSize:"6.29cqw",fontWeight:800,letterSpacing:"0.06em",color:d.warm,marginLeft:-14},children:"FREE FITTING \xB7 48HR DISPATCH \xB7 FREE FITTING \xB7 48HR DISPATCH"})}),countdown:y("div",{style:{...D,padding:"10px 12px",display:"flex",flexDirection:"column",alignItems:"center",gap:6,justifyContent:"center",...Ie(d.ink,d.ink2)},children:[f("span",{style:{fontSize:"3.65cqw",fontWeight:700,letterSpacing:"0.16em",textTransform:"uppercase",color:d.muted},children:"Back online in"}),f("div",{style:{display:"flex",alignItems:"flex-start",gap:5},children:[["23","Hours"],["59","Minutes"],["48","Seconds"]].map(([e,o],t)=>y("div",{style:{display:"flex",alignItems:"flex-start",gap:5},children:[t>0&&f("b",{style:{fontSize:"9.5cqw",lineHeight:1,color:d.warm},children:":"}),y("div",{style:{display:"flex",flexDirection:"column",alignItems:"center",gap:2},children:[f("b",{style:{fontSize:"11.5cqw",lineHeight:1,color:d.onInk,fontVariantNumeric:"tabular-nums"},children:e}),f("span",{style:{fontSize:"3.2cqw",letterSpacing:"0.1em",textTransform:"uppercase",opacity:.62,color:d.onInk},children:o})]})]},o))})]}),breadcrumb:f("div",{style:{...D,background:d.card,display:"flex",alignItems:"center",padding:"0 13px"},children:y("span",{style:{fontSize:"4.64cqw",color:d.muted},children:["Home ",f("span",{style:{opacity:.5},children:"/"})," Wheels ",f("span",{style:{opacity:.5},children:"/"})," ",f("span",{style:{color:d.text,fontWeight:700},children:"20 inch"})]})}),categorybar:y("div",{style:{...D,background:d.card,display:"flex",flexDirection:"column",justifyContent:"center",gap:7,padding:"0 11px"},children:[f("div",{style:{display:"flex",gap:5},children:["All","Wheels","Tyres","Lift"].map((e,o)=>f("span",{style:{fontSize:"3.98cqw",fontWeight:o===0?700:500,padding:"4px 7px",borderRadius:99,background:o===0?d.text:d.paper,color:o===0?d.onInk:d.muted},children:e},e))}),f("span",{style:{height:1,background:d.rule}})]}),intro:y("div",{style:{...D,overflow:"hidden",background:d.card},children:[f("div",{style:{position:"absolute",inset:0,...Ie(d.ink,d.inkSoft2)}}),f(Ho,{size:64,style:{right:8,top:6}}),y("div",{style:{position:"absolute",left:16,right:16,bottom:8,top:"46%",background:d.paper,borderRadius:6,padding:"8px 11px",display:"flex",flexDirection:"column",gap:2,boxShadow:`0 -4px 10px ${d.scrim}`},children:[f("span",{style:{fontSize:"5.69cqw",fontWeight:700,color:d.text},children:"Since 1998"}),f(Re,{children:"One shed, one lathe, one idea."}),f(Re,{w:"66%",children:"It turned out to be right."})]})]}),gallerygrid:f(le,{title:"From our customers",children:f("div",{style:{flex:1,display:"grid",gridTemplateColumns:"repeat(3,1fr)",gridTemplateRows:"repeat(2,1fr)",gap:4,minHeight:0},children:[[d.rust,d.warm],[d.inkSoft,d.ink],[d.paper2,d.mark2],[d.ink,d.inkSoft2],[d.warm,d.paper2],[d.mark2,d.inkSoft]].map(([e,o],t)=>f("div",{style:{borderRadius:3,...Ie(e,o,140+t*22)}},t))})}),gallery:y(le,{title:"Gallery",children:[f("div",{style:{display:"flex",gap:8,alignItems:"center",marginTop:-2},children:["On the truck","Studio","Close-ups"].map((e,o)=>f("span",{style:{fontSize:"3.98cqw",fontWeight:o===0?700:500,color:o===0?d.text:d.muted,borderBottom:`1.5px solid ${o===0?d.rust:"transparent"}`,paddingBottom:2},children:e},e))}),f("div",{style:{flex:1,display:"grid",gridTemplateColumns:"repeat(3,1fr)",gap:4,minHeight:0},children:[[d.rust,d.warm],[d.ink,d.inkSoft],[d.paper2,d.mark2]].map(([e,o],t)=>f("div",{style:{borderRadius:3,...Ie(e,o,150+t*20)}},t))})]}),ordersummary:y(le,{title:"Order summary",children:[y("div",{style:{display:"flex",gap:6,alignItems:"center",paddingBottom:4},children:[f("span",{style:{width:26,height:26,borderRadius:4,position:"relative",overflow:"hidden",flex:"none",...Ie(d.paper,d.paper2,150)},children:f(Ho,{size:18,style:{left:"50%",top:"50%",transform:"translate(-50%,-50%)"}})}),y("div",{style:{display:"flex",flexDirection:"column",gap:1,minWidth:0},children:[f("b",{style:{fontSize:"4.31cqw",color:d.text},children:"Ridge Grappler"}),f("span",{style:{fontSize:"3.65cqw",color:d.muted},children:"20\xD79 +12 \xB7 qty 4"})]})]}),y("div",{style:{flex:1,minHeight:0,display:"flex",flexDirection:"column",justifyContent:"center"},children:[f(Mo,{k:"Subtotal",v:"$1,956"}),f(Mo,{k:"Fitting",v:"Free"}),y("div",{style:{display:"flex",justifyContent:"space-between",paddingTop:5,fontSize:"4.64cqw"},children:[f("b",{style:{color:d.text},children:"Total"}),f("b",{style:{color:d.text,fontSize:"6.02cqw"},children:"$1,956"})]})]})]}),deliveryoptions:f(le,{title:"Delivery",children:f("div",{style:{flex:1,display:"flex",flexDirection:"column",gap:4,justifyContent:"center"},children:[["Standard","3\u20135 days","Free",!0],["Express","Next day","$19",!1]].map(([e,o,t,r])=>y("div",{style:{display:"flex",alignItems:"center",gap:6,padding:"5px 6px",borderRadius:4,border:`1px solid ${r?d.rust:d.rule}`,background:r?d.paper:d.card},children:[f("span",{style:{width:7,height:7,borderRadius:"50%",flex:"none",border:`1.5px solid ${r?d.rust:d.mark1}`,background:r?d.rust:"transparent"}}),f("span",{style:{flex:1,fontSize:"4.31cqw",fontWeight:600,color:d.text},children:e}),f("span",{style:{fontSize:"3.98cqw",color:d.muted},children:o}),f("b",{style:{fontSize:"4.31cqw",color:d.text},children:t})]},e))})}),paymentbadges:y("div",{style:{...D,background:d.paper,display:"flex",flexDirection:"column",gap:8,justifyContent:"center",padding:"0 12px"},children:[f(ca,{children:"Ways to pay"}),f("div",{style:{display:"flex",gap:5},children:[["VISA",d.ink],["MC",d.rust],["AMEX",d.inkSoft],["PayPal",d.ink2]].map(([e,o])=>f("span",{style:{flex:1,textAlign:"center",fontSize:"3.65cqw",fontWeight:800,letterSpacing:"0.06em",color:d.onInk,borderRadius:3,padding:"6px 0",background:o},children:e},e))})]}),stats:y("div",{style:{...D,padding:"10px 12px",display:"flex",flexDirection:"column",gap:9,justifyContent:"center",...Ie(d.ink,d.ink2)},children:[f("span",{style:{fontSize:"3.98cqw",fontWeight:700,letterSpacing:"0.14em",textTransform:"uppercase",color:d.warm},children:"By the numbers"}),y("div",{style:{display:"flex",gap:8},children:[f(fa,{n:"27k",label:"Rigs fitted",tone:d.onInk}),f(fa,{n:"12",label:"Years",tone:d.onInk}),f(fa,{n:"4.9",label:"Avg rating",tone:d.warm})]})]}),testimonials:y("div",{style:{...D,overflow:"hidden",background:d.paper,padding:"10px 11px",display:"flex",flexDirection:"column",gap:6,justifyContent:"center"},children:[f("span",{style:{position:"absolute",right:10,top:2,fontSize:"22.4cqw",lineHeight:1,fontWeight:800,color:d.rust,opacity:.16},children:"\u201D"}),f(yc,{filled:5,size:7}),f("span",{style:{position:"relative",fontSize:"5.31cqw",lineHeight:1.35,color:d.text,fontWeight:600},children:"\u201CTook them out to the Simpson and back. Not one chip.\u201D"}),y("div",{style:{display:"flex",alignItems:"center",gap:5},children:[f(Qg,{}),f("span",{style:{fontSize:"3.98cqw",color:d.muted},children:"Dave M. \xB7 Hilux N80"})]})]}),reviews:y(le,{title:"Reviews",children:[f("div",{style:{display:"flex",gap:4,height:22},children:[[d.inkSoft,d.inkSoft2],[d.rust,d.warm],[d.ink,d.inkSoft],[d.mark2,d.mark1]].map(([e,o],t)=>f("div",{style:{flex:1,borderRadius:3,...Ie(e,o,140+t*15)}},t))}),f("div",{style:{flex:1,display:"flex",flexDirection:"column",gap:5,justifyContent:"center"},children:[["Dave M.",5,"Not one chip after the Simpson."],["Sara K.",4,"Fitted in an hour, no fuss."]].map(([e,o,t])=>y("div",{style:{display:"flex",gap:5,alignItems:"flex-start"},children:[f(Qg,{size:12}),y("div",{style:{display:"flex",flexDirection:"column",gap:1,minWidth:0},children:[y("div",{style:{display:"flex",gap:4,alignItems:"center"},children:[f("b",{style:{fontSize:"3.98cqw",color:d.text},children:e}),f(yc,{filled:o})]}),f(Re,{children:t})]})]},e))})]}),logos:y("div",{style:{...D,display:"flex",flexDirection:"column",gap:9,justifyContent:"center",padding:"0 12px",...Ie(d.ink,d.inkSoft)},children:[f("span",{style:{fontSize:"3.98cqw",fontWeight:700,letterSpacing:"0.14em",textTransform:"uppercase",color:d.warm},children:"As fitted by"}),f("div",{style:{display:"grid",gridTemplateColumns:"repeat(4,1fr)",gap:8},children:["ARB","TJM","IRONMAN","OPPOSITE"].map(e=>f("span",{style:{textAlign:"center",fontSize:"4.31cqw",fontWeight:800,letterSpacing:"0.08em",color:d.onInk,opacity:.82},children:e},e))})]}),prose:y("div",{style:{...D,background:d.paper,padding:"11px 14px",display:"flex",flexDirection:"column",gap:4,justifyContent:"center"},children:[f("span",{style:{fontSize:"5.86cqw",fontWeight:700,color:d.text},children:"Why offset matters"}),y("div",{style:{display:"flex",gap:6},children:[f("span",{style:{fontSize:"15.3cqw",lineHeight:.78,fontWeight:800,color:d.rust,marginTop:1},children:"T"}),y("div",{style:{display:"flex",flexDirection:"column"},children:[f(Re,{children:"he number on the back of your wheel decides whether the"}),f(Re,{w:"76%",children:"tyre sits under the guard or an inch outside it."})]})]})]}),cards:f(le,{title:"What you get",children:f("div",{style:{flex:1,display:"grid",gridTemplateColumns:"repeat(3,1fr)",gap:5,minHeight:0},children:[["Fitted free","In store, same day."],["5 yr cover","Structural, no fine print."],["Swap it","30 days, any reason."]].map(([e,o])=>y("div",{style:{border:`1px solid ${d.rule}`,borderRadius:4,padding:6,display:"flex",flexDirection:"column",gap:2},children:[f("span",{style:{width:11,height:11,borderRadius:3,background:d.rust,opacity:.9}}),f("b",{style:{fontSize:"3.98cqw",color:d.text},children:e}),f(Re,{children:o})]},e))})}),faq:f(le,{title:"Questions",children:f("div",{style:{flex:1,display:"flex",flexDirection:"column",justifyContent:"center"},children:[["Will these fit my Hilux?",!0],["Do you fit them for me?",!1],["What if I pick wrong?",!1]].map(([e,o])=>y("div",{style:{borderBottom:`1px solid ${d.rule}`,padding:"4px 2px"},children:[y("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",gap:6},children:[f("b",{style:{fontSize:"4.31cqw",color:d.text},children:e}),f("span",{style:{fontSize:"4.64cqw",color:d.muted,lineHeight:1},children:o?"\u2212":"+"})]}),o&&f(Re,{w:"90%",children:"Use the fitment finder \u2014 it reads your build, not just the model."})]},e))})}),hero:y("div",{style:{...D,overflow:"hidden",...Ie(d.ink,d.ink2)},children:[f("div",{style:{...D,background:`linear-gradient(90deg,${d.scrim},transparent 70%)`}}),f("div",{style:{position:"relative",height:"100%",display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"flex-start",padding:"12px 14px",gap:5},children:f(Zg,{over:"NEW \xB7 SUMMER",overTone:d.warm,head:"Built for the worst road you own",cta:"SHOP ALL",ctaBg:d.warm,ctaFg:d.ink,tone:d.onInk})}),f(Ho,{size:104,style:{right:-24,bottom:-30}})]}),herosingle:y("div",{style:{...D,display:"flex",background:d.paper,overflow:"hidden"},children:[f("div",{style:{flex:1,padding:12,display:"flex",flexDirection:"column",gap:5,justifyContent:"center"},children:f(Zg,{over:"ALL-TERRAIN",overTone:d.rust,head:"Grip that does not ask",headSize:12,cta:"EXPLORE",ctaBg:d.text,ctaFg:d.onInk,tone:d.text})}),f("div",{style:{flex:1,position:"relative",...Ie(d.inkSoft,d.inkSoft2)},children:f(Ho,{size:74,style:{right:-14,top:16}})})]}),productgrid:f(le,{title:"Best sellers",children:y("div",{style:{flex:1,display:"grid",gridTemplateColumns:"repeat(3,1fr)",gap:5,minHeight:0},children:[f(bc,{name:"Ridge 19",price:"$365"}),f(bc,{name:"Ridge 29",price:"$410"}),f(bc,{name:"Ridge 39",price:"$455"})]})}),collections:f(le,{title:"Shop by category",children:f("div",{style:{flex:1,display:"grid",gridTemplateColumns:"repeat(3,1fr)",gap:5,minHeight:0},children:[["Wheels",d.inkSoft,d.inkSoft2],["Tyres",d.rust,d.warm],["Lift kits",d.ink,d.inkSoft]].map(([e,o,t])=>f("div",{style:{borderRadius:4,display:"flex",alignItems:"flex-end",padding:5,color:d.onInk,...Ie(o,t)},children:f("span",{style:{fontSize:"3.98cqw",fontWeight:700,letterSpacing:"0.04em"},children:e})},e))})}),producthero:y("div",{style:{...D,display:"flex",background:d.card,overflow:"hidden"},children:[f("div",{style:{flex:1.1,position:"relative",...Ie(d.paper,d.paper2,150)},children:f(Ho,{size:78,style:{left:"50%",top:"50%",transform:"translate(-50%,-50%)"}})}),y("div",{style:{flex:1,padding:"10px 10px 10px 8px",display:"flex",flexDirection:"column",gap:4,justifyContent:"center"},children:[f("span",{style:{fontSize:"3.65cqw",letterSpacing:"0.16em",fontWeight:700,color:d.rust},children:"NITTO"}),f("b",{style:{fontSize:"6.29cqw",color:d.text},children:"Ridge Grappler"}),f("span",{style:{fontSize:"6.63cqw",fontWeight:700,color:d.text},children:"$489"}),f("span",{style:{alignSelf:"flex-start",fontSize:"3.65cqw",letterSpacing:"0.12em",fontWeight:700,padding:"4px 8px",borderRadius:2,background:d.text,color:d.onInk},children:"ADD TO CART"})]})]}),spectable:f(le,{title:"Specifications",children:y("div",{style:{flex:1,display:"flex",flexDirection:"column",justifyContent:"center"},children:[f(Mo,{k:"Diameter",v:'20"'}),f(Mo,{k:"Width",v:"9.0J"}),f(Mo,{k:"Offset",v:"+12"}),f(Mo,{k:"Load",v:"1250 kg"})]})}),fitmenttable:f(le,{title:"Will it fit?",children:y("div",{style:{flex:1,display:"flex",flexDirection:"column",justifyContent:"center"},children:[f(Mo,{k:"Hilux N80",v:"20\xD79 +12",ok:!0}),f(Mo,{k:"Ranger PX3",v:"20\xD79 +12",ok:!0}),f(Mo,{k:"LC79",v:"17\xD78 \u221210",ok:!0})]})}),brandstrip:y("div",{style:{...D,background:d.paper,display:"flex",flexDirection:"column",gap:8,justifyContent:"center",padding:"0 12px"},children:[f(ca,{children:"Brands we carry"}),f("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center"},children:["NITTO","BFG","FUEL","TOYO"].map(e=>f("span",{style:{fontSize:"4.64cqw",fontWeight:800,letterSpacing:"0.1em",color:d.mark2},children:e},e))})]}),processsteps:y("div",{style:{...D,background:d.paper,padding:10,display:"flex",flexDirection:"column",gap:7,justifyContent:"center"},children:[f(ca,{children:"How it works"}),f("div",{style:{display:"flex",gap:6},children:["Pick your rig","Match the fit","We fit it"].map((e,o)=>y("div",{style:{flex:1,display:"flex",flexDirection:"column",gap:2},children:[f("span",{style:{width:11,height:11,borderRadius:"50%",background:d.text,color:d.onInk,fontSize:"3.98cqw",display:"flex",alignItems:"center",justifyContent:"center",fontWeight:700},children:o+1}),f("span",{style:{fontSize:"3.98cqw",color:d.text,fontWeight:600},children:e})]},e))})]}),detailrows:f("div",{style:{...D,background:d.card,display:"flex",flexDirection:"column",overflow:"hidden"},children:[["Forged, not cast","Half the weight, twice the road.",!1],["Fits your load","Rated to 1250 kg a corner.",!0]].map(([e,o,t])=>{let r=f("div",{style:{flex:1,...Ie(t?d.rust:d.inkSoft,t?d.warm:d.inkSoft2)}},"art"),a=y("div",{style:{flex:1.1,padding:8,display:"flex",flexDirection:"column",gap:2,justifyContent:"center"},children:[f("b",{style:{fontSize:"4.64cqw",color:d.text},children:e}),f("span",{style:{fontSize:"3.98cqw",color:d.muted,lineHeight:1.3},children:o})]},"tx");return f("div",{style:{flex:1,display:"flex",minHeight:0},children:t?[a,r]:[r,a]},e)})}),specstrip:f("div",{style:{...D,background:d.ink,color:d.onInk,display:"flex",alignItems:"center",justifyContent:"space-around",padding:"0 8px"},children:[["5 yr","Warranty"],["Free","Fitting"],["48 hr","Dispatch"]].map(([e,o])=>y("div",{style:{display:"flex",flexDirection:"column",alignItems:"center",gap:1},children:[f("b",{style:{fontSize:"5.69cqw",letterSpacing:"0.02em"},children:e}),f("span",{style:{fontSize:"3.65cqw",color:d.mark2,letterSpacing:"0.1em",textTransform:"uppercase"},children:o})]},o))})},eb={subscribe:y("div",{style:{...D,padding:13,display:"flex",flexDirection:"column"},children:[y("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",marginBottom:8},children:[y("div",{style:{display:"flex",alignItems:"center",gap:6},children:[f(L,{w:8,h:8,r:2,tone:"accent"}),f(L,{w:38,h:7,r:3,tone:"dark"}),f(L,{w:16,h:7,r:3,tone:"accent"})]}),f(L,{w:38,h:4,r:2,tone:"soft"})]}),f("div",{style:{height:1,background:Fe.line,marginBottom:10}}),y("div",{style:{flex:1,display:"flex",gap:10,border:`1px solid ${Fe.line}`,borderRadius:7,padding:10},children:[y("div",{style:{flex:1.1,display:"flex",flexDirection:"column",justifyContent:"center",gap:5},children:[f(L,{w:"46%",h:3,r:2,tone:"accent"}),f(L,{w:"84%",h:8,r:4,tone:"dark"}),f(L,{w:"56%",h:8,r:4,tone:"accent"}),f(L,{w:"96%",h:3,r:2,tone:"soft",style:{marginTop:2}}),y("div",{style:{display:"flex",gap:5,marginTop:4},children:[f("div",{style:{flex:1,height:13,borderRadius:5,border:`1px solid ${Fe.line}`,background:Fe.block}}),f(L,{w:34,h:13,r:5,tone:"accent"})]})]}),y("div",{style:{flex:1,background:Fe.block,borderRadius:6,padding:8,display:"flex",flexDirection:"column",gap:6},children:[f(L,{w:"52%",h:4,r:2,tone:"accent"}),Array.from({length:3}).map((e,o)=>y("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",gap:6,borderTop:o?`1px solid ${Fe.line}`:"none",paddingTop:o?4:0},children:[f(L,{w:34,h:4,r:2,tone:"dark"}),f(L,{w:16,h:3,r:2,tone:"soft"})]},o))]})]})]}),split:y("div",{style:{...D,display:"flex"},children:[f("div",{style:{width:"44%",background:gc}}),y("div",{style:{flex:1,padding:15,display:"flex",flexDirection:"column",justifyContent:"center",gap:7},children:[f(L,{w:"44%",h:5,r:3,tone:"accent"}),f(L,{w:"88%",h:8,r:4,tone:"dark"}),f(L,{w:"70%",h:8,r:4,tone:"dark"}),f(L,{w:"94%",h:5,r:2,tone:"soft",style:{marginTop:2}}),f(L,{w:"80%",h:5,r:2,tone:"soft"}),f(L,{w:"40%",h:13,r:6,tone:"accent",style:{marginTop:5}})]})]}),sectionheader:y(ob,{children:[f(L,{w:"18%",h:6,r:3,tone:"accent",style:{position:"absolute",top:15,right:16}}),y("div",{style:{...D,padding:16,display:"flex",flexDirection:"column",justifyContent:"center",gap:10},children:[y("div",{style:{display:"flex",alignItems:"center",gap:9},children:[f(L,{w:16,h:16,r:4,tone:"accent"}),f(L,{w:"20%",h:9,r:4,tone:"dark"})]}),f(L,{w:"62%",h:10,r:5,tone:"dark"}),f(L,{w:"42%",h:6,r:3,tone:"soft"})]})]}),header:f("div",{style:{...D,padding:14,display:"flex",flexDirection:"column",justifyContent:"center"},children:y("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between"},children:[f(L,{w:"22%",h:12,r:4,tone:"dark"}),y("div",{style:{display:"flex",gap:9,alignItems:"center"},children:[f(L,{w:26,h:6,r:3,tone:"soft"}),f(L,{w:26,h:6,r:3,tone:"soft"}),f(L,{w:26,h:6,r:3,tone:"soft"}),f(L,{w:18,h:14,r:5,tone:"accent"})]})]})}),footer:y("div",{style:{...D,padding:15,display:"flex",flexDirection:"column",justifyContent:"center",gap:12},children:[y("div",{style:{display:"flex",gap:14},children:[y("div",{style:{flex:1.4,display:"flex",flexDirection:"column",gap:6},children:[f(L,{w:"60%",h:9,r:4,tone:"dark"}),f(L,{w:"90%",h:5,r:2,tone:"soft"}),f(L,{w:"70%",h:5,r:2,tone:"soft"})]}),[0,1].map(e=>y("div",{style:{flex:1,display:"flex",flexDirection:"column",gap:6},children:[f(L,{w:"50%",h:6,r:3,tone:"dark"}),f(L,{w:"80%",h:5,r:2,tone:"soft"}),f(L,{w:"66%",h:5,r:2,tone:"soft"})]},e))]}),f("div",{style:{height:1,background:Fe.line}}),y("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center"},children:[f(L,{w:"30%",h:5,r:2,tone:"soft"}),f(L,{w:"16%",h:5,r:2,tone:"soft"})]})]}),grid:f("div",{style:{...D,padding:14,display:"grid",gridTemplateColumns:"1fr 1fr",gridTemplateRows:"1fr 1fr",gap:9},children:Array.from({length:4}).map((e,o)=>f("div",{style:{borderRadius:6,background:Fe.block}},o))}),blanksection:f("div",{style:{...D,padding:14,display:"flex"},children:y("div",{style:{flex:1,border:`1px dashed ${Fe.line}`,borderRadius:7,display:"flex",alignItems:"center",justifyContent:"center",position:"relative"},children:[f(L,{w:14,h:2,r:1,tone:"tint"}),f(L,{w:2,h:14,r:1,tone:"tint",style:{position:"absolute"}})]})}),spacer:y("div",{style:{...D,padding:14,display:"flex",flexDirection:"column",justifyContent:"space-between"},children:[f(L,{w:"100%",h:6,r:3,tone:"soft"}),f(L,{w:16,h:22,r:3,tone:"block",style:{alignSelf:"center"}}),f(L,{w:"100%",h:6,r:3,tone:"soft"})]}),divider:f("div",{style:{...D,padding:14,display:"flex",alignItems:"center"},children:f(L,{w:"100%",h:3,r:2,tone:"dark"})}),customhtml:y("div",{style:{...D,display:"flex",alignItems:"center",justifyContent:"center",gap:8,background:gc},children:[f(L,{w:5,h:16,r:2,tone:"dark",style:{transform:"skewX(-14deg)"}}),f(L,{w:16,h:10,r:3,tone:"accent"}),f(L,{w:5,h:16,r:2,tone:"dark",style:{transform:"skewX(14deg)"}})]}),heading:f("div",{style:{...D,padding:14,display:"flex",alignItems:"center"},children:f(L,{w:"64%",h:13,r:4,tone:"dark"})}),text:y("div",{style:{...D,padding:16,display:"flex",flexDirection:"column",justifyContent:"center",gap:7},children:[f(L,{w:"100%",h:6,r:3,tone:"soft"}),f(L,{w:"96%",h:6,r:3,tone:"soft"}),f(L,{w:"100%",h:6,r:3,tone:"soft"}),f(L,{w:"58%",h:6,r:3,tone:"soft"})]}),image:f("div",{style:{position:"absolute",inset:14,borderRadius:7,background:gc}}),button:f("div",{style:{...D,display:"flex",alignItems:"center",justifyContent:"center"},children:f(L,{w:"34%",h:16,r:8,tone:"accent"})}),menu:y("div",{style:{...D,padding:"14px 22%",display:"flex",flexDirection:"column",justifyContent:"center",gap:7},children:[f(L,{w:"48%",h:7,r:3,tone:"dark"}),f(L,{w:"82%",h:5,r:2,tone:"soft"}),f(L,{w:"66%",h:5,r:2,tone:"soft"}),f(L,{w:"74%",h:5,r:2,tone:"soft"}),f(L,{w:"58%",h:5,r:2,tone:"soft"})]}),emailform:y("div",{style:{...D,padding:16,display:"flex",flexDirection:"column",justifyContent:"center",gap:9},children:[f(L,{w:"56%",h:8,r:3,tone:"dark"}),y("div",{style:{display:"flex",gap:6},children:[f("div",{style:{flex:1,height:16,borderRadius:5,border:`1px solid ${Fe.line}`}}),f(L,{w:"30%",h:16,r:5,tone:"accent"})]})]}),sociallogos:f("div",{style:{...D,display:"flex",alignItems:"center",justifyContent:"center",gap:9},children:[0,1,2,3].map(e=>f(L,{w:16,h:16,r:8,tone:"dark"},e))}),search:f("div",{style:{...D,padding:"0 18%",display:"flex",alignItems:"center"},children:y("div",{style:{flex:1,height:22,borderRadius:11,border:`1px solid ${Fe.line}`,display:"flex",alignItems:"center",gap:7,padding:"0 9px"},children:[f("div",{style:{width:9,height:9,borderRadius:5,border:`2px solid ${Fe.dark}`}}),f(L,{w:"46%",h:5,r:2,tone:"soft"})]})}),cart:y("div",{style:{...D,display:"flex",alignItems:"center",justifyContent:"center",gap:7},children:[f("div",{style:{width:22,height:18,borderRadius:"3px 3px 6px 6px",border:`2px solid ${Fe.dark}`}}),f("div",{style:{padding:"2px 6px",borderRadius:6,border:`1.5px solid ${Fe.dark}`},children:f(L,{w:7,h:7,r:2,tone:"dark"})})]}),countryswitch:y("div",{style:{...D,padding:14,display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",gap:5},children:[y("div",{style:{display:"flex",alignItems:"center",gap:6,padding:"4px 8px",border:`1px solid ${Fe.line}`},children:[f(L,{w:22,h:6,r:2,tone:"dark"}),f(L,{w:6,h:4,r:1,tone:"soft"})]}),y("div",{style:{width:"46%",display:"flex",flexDirection:"column",gap:4,padding:6,border:`1px solid ${Fe.line}`},children:[f(L,{w:"80%",h:4,r:2,tone:"accent"}),f(L,{w:"64%",h:4,r:2,tone:"soft"}),f(L,{w:"72%",h:4,r:2,tone:"soft"})]})]}),legalline:y("div",{style:{...D,padding:16,display:"flex",flexDirection:"column",justifyContent:"center",gap:9},children:[f("div",{style:{height:1,background:Fe.line}}),y("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center"},children:[f(L,{w:"38%",h:5,r:2,tone:"soft"}),y("div",{style:{display:"flex",gap:5},children:[f(L,{w:14,h:5,r:2,tone:"soft"}),f(L,{w:14,h:5,r:2,tone:"soft"}),f(L,{w:14,h:5,r:2,tone:"soft"})]})]})]}),fallback:f("div",{style:{position:"absolute",inset:14,borderRadius:8,background:Fe.block}})};function tb({type:e}){let o=xA[e]??"",t=IA[o]??eb[o]??eb.fallback;return f("div",{className:"sf-thumb","aria-hidden":"true",style:{position:"absolute",inset:0,background:"var(--sf-thumb-thumb-bg)",pointerEvents:"none",containerType:"inline-size"},children:t})}import{jsx as sr,jsxs as hA}from"react/jsx-runtime";import{StylesIcon as gA}from"efficient-easel/rail";import{Tooltip as bA}from"efficient-shell/ui";function rb({tokenRef:e,siteId:o,onClose:t,onNotify:r,tab:a,onTabChange:n}){let s=Yt();return hA("div",{className:"sf-styles",children:[sr(Pa,{icon:sr(gA,{}),title:l("Site styles"),context:sr(bA,{content:l("{name} \u2014 renamed in the Console: {place}.",{name:s,place:l("Storefront \u25B8 Sites \u25B8 Settings")}),className:"sf-name-tip",children:sr("span",{className:"sf-name-text",children:s})}),onHide:t}),sr("div",{className:"sf-insp-body sf-scroll",children:sr(Un,{tokenRef:e,siteId:o,onNotify:r,tab:a,onTabChange:n})})]})}import{jsx as ab}from"react/jsx-runtime";var yA="M6 3h12a1 1 0 0 1 1 1v17l-7-4-7 4V4a1 1 0 0 1 1-1z";function nb({size:e=15,className:o,strokeWidth:t=1.7}){return ab("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:t,strokeLinecap:"round",strokeLinejoin:"round",className:o,"aria-hidden":"true",focusable:"false",children:ab("path",{d:yA})})}import{jsx as pe,jsxs as Ao,Fragment as kA}from"react/jsx-runtime";import{Fragment as yb,useEffect as Sb,useRef as Tc}from"react";import{useTreeDrag as Cb}from"efficient-easel/drag";import{ImageIcon as TA,TextLinesIcon as FA,TrashIcon as vb}from"efficient-easel/icons";import{Subtree as wb,TreeRow as ua,TreeRowAction as kb,TreeSeam as Tb}from"efficient-easel/tree";import{useEaselStrings as EA}from"efficient-easel/strings";var{Provider:RV,useSelection:lb}=Ca("selectedLocationPartId");function sb(e,o,t){return`${e}::${o}::${t}`}function ib(e){if(!e)return null;let o=e.split("::");if(o.length<3)return null;let t=o[o.length-1];if(t!=="image"&&t!=="map")return null;let r=Number(o[o.length-2]);if(!Number.isInteger(r)||r<0)return null;let a=o.slice(0,-2).join("::");return a?{nodeId:a,index:r,part:t}:null}import{useSyncExternalStore as SA}from"react";var CA={level:"groups"},cb=CA,Sc=new Set;function go(e){cb=e;for(let o of Sc)o()}function vA(e){return Sc.add(e),()=>{Sc.delete(e)}}var fb=()=>cb;function db(){return SA(vA,fb,fb)}function ub(e,o,t){let r=[];return e.forEach((a,n)=>{let s=o(a),i=r.find(c=>c.key===s);i||(i={key:s,name:t(a),items:[]},r.push(i)),i.items.push({item:a,index:n})}),r}function DV(e){if(e<=1)return"grid-cols-1";if(e===2)return"grid-cols-2";if(e===3)return"grid-cols-3";if(e===4)return"grid-cols-4";let o=t=>e%t||t;return o(4)>=o(3)?"grid-cols-4":"grid-cols-3"}var da=e=>String(e?.group??""),Cc=new WeakMap,wA=0;function xl(e){let o=Cc.get(e);return o||(o=`loc${++wA}`,Cc.set(e,o)),o}var pb=(e,o)=>o||e||"Ungrouped",mb={photo:"",group:"",groupName:"",name:"City name",state:"State",country:"Country",timezone:"GMT \xB7 UTC +0",address:`Address line one
|
|
16
|
+
Address line two`,phone:"+00 000 0000",hours:"Mon\u2013Fri 9:00\u201318:00",lat:0,lng:0,mapsUrl:""};function yt(e){return ub(e,da,o=>String(o?.groupName??"")).map(o=>({key:o.key,name:o.name,cards:o.items.map(t=>t.item)}))}var vc=e=>e.flatMap(o=>o.cards),xb=(e,o,t)=>Math.min(Math.max(e,o),t);function Il(e,o,t){let r=0;for(let a=0;a<e.length;a++)if(da(e[a])===o){if(r===t)return a;r++}return-1}function wc(e,o,t){let r=yt(e);if(o<0||o>=r.length)return e;let[a]=r.splice(o,1),n=xb(o<t?t-1:t,0,r.length);return r.splice(n,0,a),vc(r)}function kc(e,o,t,r,a){let n=yt(e),s=n.find(m=>m.key===o),i=n.find(m=>m.key===r);if(!s||!i||t<0||t>=s.cards.length)return e;let[c]=s.cards.splice(t,1),u=o===r?c:{...c,group:i.key,groupName:i.name};u!==c&&Cc.set(u,xl(c));let p=xb(s===i&&t<a?a-1:a,0,i.cards.length);return i.cards.splice(p,0,u),vc(n)}function Ib(e,o){let t=yt(e),r=t.find(n=>n.key===o),a={...mb,group:o,groupName:r?.name??""};return r?(r.cards.push(a),vc(t)):[...e,a]}function hb(e){let o=new Set(yt(e).map(a=>a.key)),t=o.size+1,r=`Group ${t}`;for(;o.has(r);)r=`Group ${++t}`;return{cards:[...e,{...mb,group:r,groupName:""}],key:r}}function gb(e,o){return e.filter(t=>da(t)!==o)}function bb(e,o,t){let r=Il(e,o,t);return r<0?e:e.filter((a,n)=>n!==r)}function MV(e,o,t){let r=e.flatMap((s,i)=>da(s)===o?[i]:[]),a=e.slice();r.forEach((s,i)=>{a[s]=t[i]});let n=t.slice(r.length);return[...a.filter(s=>s!==void 0),...n]}function HV(e,o,t){return o.flatMap(r=>{let a=e.filter(n=>da(n)===r);return a.length?a:t(r)})}var gl="ContactLocations";function PA({size:e=13}){return Ao("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:1.7,strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[pe("circle",{cx:"12",cy:"12",r:"9"}),pe("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 LA({size:e=13}){return Ao("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:1.7,strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[pe("path",{d:"M12 21s6-5 6-10a6 6 0 10-12 0c0 5 6 10 6 10z"}),pe("circle",{cx:"12",cy:"11",r:"2"})]})}function RA({size:e=13}){return Ao("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:1.7,strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[pe("path",{d:"M9 4 3 6.5v13L9 17l6 3 6-2.5v-13L15 7z"}),pe("path",{d:"M9 4v13M15 7v13"})]})}var hl=e=>({parentId:`locations-${e}`,slot:"groups"}),Fc=(e,o)=>({parentId:`locations-${e}`,slot:`cities:${o}`});function Fb(e,o){let{readOnly:t,selected:r}=o,a=EA().tree,n=o.data?.content??[],s=e.kind===jg.kind,i=Tc(null);Sb(()=>{let h=r?.type===gl?String(r.props.id):null;h&&h!==i.current&&go({level:"groups"}),i.current=h},[r?.props.id]);let{selectedLocationPartId:c,setSelectedLocationPartId:u,setSelectHandler:p}=lb(),m=db(),x=(h,k)=>{let P=n[h];P&&o.replace(h,{type:P.type,props:{...P.props,locations:k}})},g=h=>{let k=n[h]?.props?.locations;return Array.isArray(k)?k:[]},C=Cb({keyOf:h=>`group:${h.si}:${h.index}`,readOnly:!!t,canDrop:(h,k)=>k.parentId===hl(h.si).parentId&&k.slot==="groups",onDrop:(h,k)=>{x(h.si,wc(g(h.si),h.index,k.index)),m.level==="city"&&go({level:"groups"})},onStep:(h,k)=>{x(h.si,wc(g(h.si),h.index,k<0?h.index-1:h.index+2)),m.level==="city"&&go({level:"groups"})}}),w=Cb({keyOf:h=>`city:${h.si}:${h.group}:${h.index}`,readOnly:!!t,canDrop:(h,k)=>k.parentId===hl(h.si).parentId&&k.slot.startsWith("cities:"),onDrop:(h,k)=>{let P=k.slot.slice(7);x(h.si,kc(g(h.si),h.group,h.index,P,k.index)),go({level:"group",key:P})},onStep:(h,k)=>{x(h.si,kc(g(h.si),h.group,h.index,h.group,k<0?h.index-1:h.index+2)),m.level==="city"&&go({level:"group",key:h.group})}}),b=Tc(n);b.current=n;let v=Tc(()=>{});Sb(()=>{p(h=>{let k=ib(h);if(!k)return;let P=b.current.findIndex(F=>F.props?.id===k.nodeId);P<0||v.current(P,{level:k.part,index:k.index})})},[p]);let S=(h,k)=>{i.current=n[h]?.props?.id??null,o.select(h),go(k),e.reveal();let P=n[h]?.props?.id;typeof P=="string"&&(k.level==="image"||k.level==="map")?u(sb(P,k.index,k.level)):u(null),typeof P=="string"&&o.scrollTo(P)};return v.current=S,{renderLocationTree:(h,k,{rowClick:P,isCollapsed:F,toggleCollapse:A})=>{let O=g(k),B=yt(O),U=String(h.props.id),me=s&&r?.props.id===U,j=_=>pe(Tb,{...t?{}:C.seam({place:{...hl(k),index:_}})},`seam:${U}:groups:${_}`),he=(_,ne)=>pe(Tb,{...t?{}:w.seam({place:{...Fc(k,_),index:ne}})},`seam:${U}:cities:${_}:${ne}`);return Ao(kA,{children:[pe(ua,{icon:pe(FA,{size:13}),name:l("Texts"),words:a,onSelect:()=>S(k,{level:"texts"}),selected:me&&m.level==="texts",rowProps:{onClick:P(()=>S(k,{level:"texts"}))}}),B.map((_,ne)=>{let Oe=`${U}::grp::${_.key}`,We=F(Oe),bo=me&&m.level==="group"&&m.key===_.key,$e=_.name||_.key?pb(_.key,_.name):l("Ungrouped"),Ae={...Fc(k,_.key),index:_.cards.length},Qe=w.row({item:{si:k,group:_.key,index:-1},place:Ae,into:Ae,canDrag:!1},{onClick:P(()=>S(k,{level:"group",key:_.key}))}),Ee=C.row({item:{si:k,index:ne},place:{...hl(k),index:ne}},Qe.rowProps);return Ao(yb,{children:[ne===0&&j(0),pe(ua,{icon:pe(PA,{size:13}),name:$e,words:a,onSelect:()=>S(k,{level:"group",key:_.key}),selected:bo,draggable:Ee.draggable,dragging:Ee.dragging,drop:Ee.drop??Qe.drop,fold:{open:!We,label:l("group"),onToggle:()=>A(Oe)},actions:pe(kb,{kind:"delete",label:lt("Delete {label} group ({n} city)","Delete {label} group ({n} cities)",_.cards.length,{label:$e}),onClick:()=>{x(k,gb(O,_.key)),go({level:"groups"})},children:pe(vb,{size:15})}),rowProps:Ee.rowProps,children:pe("span",{className:"es-group-count",children:_.cards.length})}),!We&&Ao(wb,{children:[_.cards.map((fe,ye)=>{let xe=Il(O,_.key,ye),je=me&&m.level==="city"&&m.index===xe,E=String(fe?.name??"")||l("City"),te=`${U}::city::${xl(fe)}`,X=F(te),{rowProps:Y,...q}=w.row({item:{si:k,group:_.key,index:ye},place:{...Fc(k,_.key),index:ye}},{onClick:P(()=>S(k,{level:"city",index:xe}))});return Ao(yb,{children:[ye===0&&he(_.key,0),pe(ua,{icon:pe(LA,{size:13}),name:E,words:a,onSelect:()=>S(k,{level:"city",index:xe}),selected:je,...q,fold:{open:!X,label:E,onToggle:()=>A(te)},actions:pe(kb,{kind:"delete",label:l("Delete {name}",{name:E}),onClick:()=>{x(k,bb(O,_.key,ye)),go({level:"group",key:_.key})},children:pe(vb,{size:15})}),rowProps:Y}),!X&&Ao(wb,{children:[pe(ua,{icon:pe(TA,{size:13}),name:l("Image"),words:a,onSelect:()=>S(k,{level:"image",index:xe}),selected:me&&m.level==="image"&&m.index===xe,rowProps:{onClick:P(()=>S(k,{level:"image",index:xe}))}}),pe(ua,{icon:pe(RA,{size:13}),name:l("Map"),words:a,onSelect:()=>S(k,{level:"map",index:xe}),selected:me&&m.level==="map"&&m.index===xe,rowProps:{onClick:P(()=>S(k,{level:"map",index:xe}))}})]}),he(_.key,ye+1)]},xl(fe))}),Ao("button",{type:"button",className:"sf-add-card",onClick:()=>{let fe=Ib(O,_.key);x(k,fe);let ye=yt(fe).find(xe=>xe.key===_.key);go(ye&&ye.cards.length?{level:"city",index:Il(fe,_.key,ye.cards.length-1)}:{level:"group",key:_.key})},children:[pe("span",{className:"sf-plus sf-plus--sm",children:"+"}),l("Add city")]})]}),j(ne+1)]},Oe)}),Ao("button",{type:"button",className:"sf-add-card",onClick:()=>{let{cards:_,key:ne}=hb(O);x(k,_),S(k,{level:"group",key:ne})},children:[pe("span",{className:"sf-plus sf-plus--sm",children:"+"}),l("Add group")]})]})},sectionPressed:h=>{h?.type===gl&&go({level:"groups"})}}}import{useEffect as DA,useRef as _A}from"react";import{createNode as Lb,newId as Rb}from"efficient-easel/data";import{useEaselApi as NA}from"efficient-easel/easel";import{resetForDocumentSwitch as OA,saveStatusForNewDocument as AA,saveStatusOf as BA}from"efficient-easel/screen/lib/document-switch";function Eb(e){return!e.docId||e.saveStatus==="saving"?!1:e.seededDocId!==e.docId}function Pb(e,o){let t=e.some(n=>n?.type===ue),r=e[e.length-1],a=!t&&r?.type===ae?r:null;return{remove:e.filter(n=>n?.type===ae&&n!==a).map(n=>String(n.props?.id??"")).filter(Boolean),seedHeader:!e.some(n=>n?.type===ke),seedFooter:o.hasChromeDoc&&!t&&!a}}function Ob(e,o){let{adapter:t,capabilities:r,currentSlug:a,docId:n,data:s,saveStatus:i}=we(),{hasSiteSettings:c,hasPinnedChrome:u}=r,p=!!r.editsPinnedInPlace&&a!==Tt,m=a===Tt,x=NA().getState,g=_A(null);DA(()=>{if(!Eb({docId:n,saveStatus:i,seededDocId:g.current})||(g.current=n,!u))return;let C=x().appState.data,w=C.content,b=s?.content??[],v=(P,F)=>P.some(A=>A?.type===F);if(!c){let P=new Set(Oa(w)),F=P.size?w.filter(O=>!P.has(O.props.id)):w;P.size&&e.setDocument({...C,content:F});let A=Qd(F,b);if(A.includes(ae)){let O=F.length,B=e.insertSection(ae,O);e.replaceComponent(ko,O,{type:ae,props:{id:B,blocks:sl()}})}A.includes(ke)&&e.insertNode(ko,0,ll());return}if(m){let P=nr(w);if(P!==w&&e.setDocument({...C,content:[...P]}),!P.find(F=>F.type===ae)&&!v(b,ae)&&!v(P,ue)&&!v(b,ue)){let F=(O,B)=>Lb(o,O,B),A={type:ae,props:{blocks:sl()}};e.insertNode(ko,P.length,sa(A,F,Rb(ue)))}return}if(p){let P=!!t?.pinnedChrome?.state().docId,F=Pb(w,{hasChromeDoc:P}),A=new Set([...F.remove,...Oa(w.filter(B=>!F.remove.includes(String(B.props.id))))]),O=A.size?w.filter(B=>!A.has(String(B.props.id))):w;if(O.length!==w.length&&e.setDocument({...C,content:O}),F.seedFooter&&!v(b,ae)&&!v(b,ue)){let B=(me,j)=>Lb(o,me,j),U={type:ae,props:{blocks:sl()}};e.insertNode(ko,O.length,sa(U,B,Rb(ue)))}if(F.seedHeader&&!v(b,ke)){let B=O[0]?.type==="SiteHeader"?1:0;e.insertNode(ko,B,ll())}return}let S=w.filter(P=>P.type!==ae),h=new Set(Oa(S)),k=h.size?S.filter(P=>!h.has(P.props.id)):S;k.length!==w.length&&e.setDocument({...C,content:k}),!v(k,ke)&&!v(b,ke)&&e.insertNode(ko,0,ll())},[n,i,s,x,e,c,u,m,p,t])}import{useEffect as Db,useState as _b}from"react";var bl=new Map;async function MA(e,o){try{return(await Ke().site.get({siteId:o})).slug?.trim()||null}catch(t){return console.warn("[editor-site-slug] could not resolve the site slug",t),null}}function Ab(e,o){let t=bl.get(o);return t||(t=MA(e,o),bl.set(o,t),t.catch(()=>{bl.get(o)===t&&bl.delete(o)})),t}var HA=/^(localhost|(?:[a-z0-9-]+\.)+localhost|127(?:\.\d{1,3}){3}|0\.0\.0\.0|\[::1\]|::1)$/i;function Ec(e){return!!e&&HA.test(e)}function Bb(e){let{pageSlug:o,siteSlug:t,hostname:r}=e,a=o===ja?"/":`/${encodeURIComponent(o)}`;if(!Ec(r))return a;let n=t?.trim();return n?`${a}?site=${encodeURIComponent(n)}`:a}function Nb(e){let{pageSlug:o,siteId:t,token:r}=e,[a,n]=_b(null),[s,i]=_b(null),c=Rd();Db(()=>i(c?new URL(c).hostname:window.location.hostname),[c]),Db(()=>{if(!Ec(s)||!t||!r){n(null);return}let p=!1;return Ab(r,t).then(m=>{p||n(m)}),()=>{p=!0}},[s,t,r]);let u=Bb({pageSlug:o,siteSlug:a,hostname:s});return c?`${c}${u}`:u}import{jsx as pa,jsxs as WA}from"react/jsx-runtime";import{ExternalIcon as Mb}from"efficient-easel/icons";import{Button as GA,Tooltip as Hb,buttonClasses as zA}from"efficient-shell/ui";function UA({pageId:e,liveHref:o,draftLink:t,win:r=window}){let a=r.open("","_blank");if(a)try{a.opener=null}catch{}let n=s=>{a&&!a.closed?a.location.href=s:r.open(s,"_blank","noopener,noreferrer")};return t(e).then(s=>n(s.url??o),()=>n(o))}function Wb({liveHref:e,pageId:o,draftLink:t}){return t&&o?pa(Hb,{content:l("Open your saved draft in a new tab. Visitors don't see it."),children:pa(GA,{variant:"secondary",onClick:()=>{UA({pageId:o,liveHref:e,draftLink:t})},rightIcon:pa(Mb,{size:15}),"aria-label":l("Preview your saved draft in a new tab"),children:l("Preview")})}):pa(Hb,{content:l("Preview the live site (opens in a new tab)"),children:WA("a",{className:zA({variant:"secondary"}),href:e,target:"_blank",rel:"noopener noreferrer","aria-label":l("Preview the live site in a new tab"),children:[l("Preview"),pa(Mb,{size:15})]})})}import{useCallback as jA,useEffect as KA,useRef as qb,useState as VA}from"react";import{useSyncExternalStore as qA}from"react";var ir=new Map,Pc=new Set;function Lc(e,o){if(!(ir.has(e)&&ir.get(e)===o)){ir.set(e,o);for(let t of Pc)t()}}function BX(e,o){Lc(e,o)}function DX(e,o){let t=ir.get(e);Lc(e,o??(t==="live"?"changed":t))}function _X(e,o){Lc(e,o??"live")}function NX(e){return ir.get(e)}function $A(e){return Pc.add(e),()=>{Pc.delete(e)}}function Gb(e){let o=()=>e?ir.get(e):void 0;return qA($A,o,o)}function zb(e,o){return e==="live"&&o?"changed":e}function Ub({live:e,onPress:o,busy:t=!1}){let r=e==="live"?l("Everything is live"):e==="changed"?l("Changes not live yet"):e==="never"?l("Never published"):null;return{label:l("Publish"),tooltip:e==="never"?l("Put this page on your site"):l("Put your changes on your site"),status:r,quiet:e==="live"?{label:l("Published"),reason:l("Everything is live")}:null,onPress:o,busy:t}}function $b(e){let{docId:o,capabilities:t,hasUnsavedEdits:r,onPublish:a}=we(),n=zb(Gb(o??null),r),[s,i]=VA(!1),c=qb(e);c.current=e;let u=qb(!0);KA(()=>(u.current=!0,()=>{u.current=!1}),[]);let p=jA(()=>{i(!0),a(c.current).finally(()=>{u.current&&i(!1)})},[a]);if(t.canPublish)return Ub({live:n,onPress:p,busy:s})}import{buildPaletteSections as XA,categoryLabel as YA,matchesQuery as ZA,paletteWithoutPinned as QA,pinnedSection as JA}from"efficient-easel/screen/lib/puck/palette-sections";var jb=["general","commerce","service"],fr=[{key:"openers",title:"Hero & intros",defaultExpanded:!0,templateable:!0,sections:[{type:"Hero",label:"Hero Slideshow",set:"general"},{type:"HeroSingle",label:"Hero",set:"general"},{type:"IntroBleed",label:"Scroll-Over Text",set:"general"}]},{key:"shop",title:"Shop & galleries",templateable:!0,sections:[{type:"Collections",label:"Collections",set:"commerce"},{type:"BrandStrip",label:"Brand Strip",set:"commerce"},{type:"AlloyWheelsListing",label:"List",set:"commerce"},{type:"CatalogFilterBar",label:"Catalog Filter Bar",set:"commerce"},{type:"ProductGrid",label:"Product Grid",set:"commerce"},{type:"FitmentFinder",label:"Fitment Form",set:"commerce"},{type:"Gallery",label:"Tabbed Gallery",set:"commerce"},{type:"GalleryB",label:"Customer Photo Grid",set:"commerce"},{type:"SpecStrip",label:"Spec Strip",set:"general"}]},{key:"product",title:"Product page",templateable:!0,sections:[{type:"ProductHero",label:"Product Hero",set:"commerce"},{type:"SpecTable",label:"Spec Table",set:"commerce"},{type:"ProcessSteps",label:"Image & Text Columns",set:"general"},{type:"DetailRows",label:"Feature Rows",set:"commerce"},{type:"FitmentTable",label:"Fitment Table",set:"commerce"},{type:"TyreSizes",label:"Tyre Sizes",set:"commerce"},{type:"TyreFitment",label:"Tyre Fitment Form",set:"commerce"},{type:"EuTyreLabel",label:"EU Tyre Label",set:"commerce"},{type:"RelatedProducts",label:"Related Products",set:"commerce"},{type:"BundleOffer",label:"Bundle Products",set:"commerce"}]},{key:"checkout",title:"Checkout & ordering",templateable:!0,sections:[{type:"OrderSummary",label:"Order Table",set:"general"},{type:"DeliveryOptions",label:"Delivery Options",set:"commerce"},{type:"PaymentBadges",label:"Payment Methods",set:"general"},{type:"CheckoutCTA",label:"Ready-to-Order Banner",set:"commerce"}]},{key:"about",title:"About & brand story",templateable:!0,sections:[{type:"Manifesto",label:"Brand Text",set:"general"},{type:"Timeline",label:"Story Timeline",set:"general"},{type:"TimelineTrack",label:"Milestone Timeline",set:"general"},{type:"Footprint",label:"Locations Map",set:"general"}]},{key:"content",title:"Text & content",templateable:!0,sections:[{type:"Prose",label:"Editorial Text",set:"general"},{type:"ParagraphsA",label:"Lead Text",set:"general"},{type:"Split",label:"Image & Text Split",set:"general"},{type:"Cards",label:"Cards",set:"general"},{type:"KeyFeatures",label:"Key Features",set:"general"}]},{key:"proof",title:"Stats & social proof",templateable:!0,sections:[{type:"Stats",label:"Stats",set:"general"},{type:"StatsParagraph",label:"Stats with Text",set:"general"},{type:"Chart",label:"Chart",set:"general"},{type:"Mockup",label:"Mockup Card",set:"general"},{type:"Testimonials",label:"Testimonials",set:"general"},{type:"Reviews",label:"Reviews",set:"service"},{type:"Logos",label:"Logos",set:"general"}]},{key:"promo",title:"Promotions & sign-ups",templateable:!0,sections:[{type:"Banner",label:"Banner",set:"general"},{type:"TitleWithButtons",label:"Call-to-Action Heading",set:"general"},{type:"Ticker",label:"Scrolling Bar",set:"general"},{type:"Countdown",label:"Countdown",set:"general"},{type:"Subscribe",label:"Signup Form",set:"service"}]},{key:"blog",title:"Blog & journal",templateable:!0,sections:[{type:"Masthead",label:"Issue Header",set:"general"},{type:"FeaturedCover",label:"Feature Banner",set:"general"},{type:"LongRead",label:"Article Text",set:"general"},{type:"Series",label:"Recurring Columns",set:"general"},{type:"Events",label:"Latest Posts",set:"service"}]},{key:"navigation",title:"Navigation & wayfinding",templateable:!0,sections:[{type:"Breadcrumb",label:"Breadcrumb",set:"general"},{type:"CategoryBar",label:"Category Bar",set:"general"},{type:"DocTabs",label:"Document Tabs",set:"general"}]},{key:"legal",title:"Legal & documents",templateable:!0,sections:[{type:"DocMasthead",label:"Document Header",set:"general"},{type:"DocBody",label:"Document Text",set:"general"},{type:"DocMetaCards",label:"Document Detail Cards",set:"general"}]},{key:"contact",title:"Contact, FAQ & forms",templateable:!0,sections:[{type:"FAQ",label:"Q&A",set:"general"},{type:"ContactRouting",label:"Contact Form",set:"service"},{type:"ContactLocations",label:"Contact / Locations",set:"general"},{type:"SubmitBuild",label:"Photo Submission Form",set:"service"},{type:"ReviewForm",label:"Review Form",set:"service"},{type:"Form",label:"Form",set:"service"},{type:"AppointmentBooking",label:"Booking Form",set:"service"}]},{key:"structure",title:"Layout, structure & embeds",templateable:!1,sections:[{type:"SectionHeader",label:"Section Header",set:"general"},{type:"Flex",label:"Box",set:"general"},{type:"Spacer",label:"Spacer",set:"general"},{type:"Divider",label:"Divider",set:"general"},{type:"CustomHTML",label:"Custom HTML",set:"general"}]}];function $X(){return Object.fromEntries(fr.map(e=>[e.key,{title:e.title,components:e.sections.map(o=>o.type),...e.defaultExpanded?{defaultExpanded:!0}:{}}]))}var eB={Grid:'Lewis, 2026-09-14: Box and Grid duplicate each other and it feels confusing. 2026-09-15 he chose the order: give Box uneven widths FIRST, then merge Grid into Box. Shown three ways to pick the widths (mockup "Uneven Box Widths"), he chose A \u2014 shape pictures on the Box\'s `Block widths` row, the same "a row is a shape, pick a picture of it" rule he set for the photo wall on 2026-09-07.\n\nWHAT REPLACES IT: a Box set to One row, with `Block widths` at Equal or a shape (Big left, Big right, Bigger left, Bigger right) and its own `Columns on phone`. Measured on PRODUCTION 2026-09-16 ~09:28 AEST (database `efficient-system`, all 10 tenant schemas, 128 storefront pages, both `layout` and `published_layout` \u2014 256 documents): 2 Grid nodes, and they are ONE Grid counted twice \u2014 the 9DIEM homepage on 9diem.com (`xtreme_mudder` schema), once as draft and once as published. It is top-level, holds three `ImageBlock`s at `columns` 3 \u2014 equal thirds \u2014 and NO block sets `Positions`. A Box draws that with `Block widths` at Equal.\n\n\u26A0\uFE0F THE COUNT MOVES; THE RULE MUST NOT DEPEND ON IT. This entry has already carried three different readings. A local-clone snapshot said no Grid used `Positions`. A PRODUCTION reading on 2026-09-15 ~13:15 AEST found 6 nodes on two sites, 4 of them spanned \u2014 hartesmetal.com.au homepage and about, 4 columns, spans 1 + 3. That one was TRUE when it was taken and stopped being true the same day: those two pages were rebuilt on Box (`Block widths: Bigger right`), and on 2026-09-16 they hold zero Grid nodes and are built from `Flex`. \u26D4 So the rule is NOT "there are still N spanned Grids". NEVER delete the Grid component or its `gridSpan` handling, whatever a census says \u2014 Grid still renders, still edits, still drags, and a merchant may rebuild a page either way on any day. Re-run the census on production before anyone PROPOSES deleting either, and read any number written here as the reading of its own day, not as the state of the world.\n\nWHAT A MERCHANT LOSES: a new Grid, and with it a fixed "N per row" that wraps by itself past three across, and the per-block `Positions` number. Box wraps with `Wrap`, but by content width, not by a fixed count.\n\nTHE TYPE KEY STAYS AND SO DOES THE COMPONENT. Every page holding a Grid still renders through it and can still be edited, dragged and added to; no document is rewritten and NO MIGRATION RUNS \u2014 the owner redoes live sections himself.\n\n\u26A0\uFE0F AND IT STAYS DROPPABLE WHERE IT LIVES. The drop rule in lib/puck/config.tsx read the nestable containers off the catalogue\'s `structure` row, so leaving the catalogue would have made every open slot \u2014 a Box included \u2014 refuse a Grid already stored inside one. `scripts/test-retired-grid-stays-editable.tsx` \xA73 pins it.',CompatibleTyres:'Lewis, 2026-09-09: "Do not bother counting. Delete Compatible Tyres and use the new one. The new one needs complete settings \u2014 it must have every setting our cards have." Shown three ways to finish it, he chose C: retire from the menu now, and take styling the card text as its own card.\n\nWHAT REPLACES IT: `RelatedProducts` with its `Show` dropdown set to "Tyres that fit this product". That block is the GENERIC relationship section from card 1128 \u2014 it knows nothing about wheels or tyres, it asks the registry for a relationship by name. The two have rendered through the SAME renderer (`DynamicRelatedProducts`) since that card; this one is the pre-registry one-off that was never removed.\n\n\u26A0\uFE0F THE SWAP WAS NOT SAFE UNTIL #1305, AND SAYING SO IS THE POINT. The first old-versus-new table put in front of the owner was WRONG. `DynamicRelatedProducts` returns EARLY on a tyre answer and draws this component, so the seven card settings, the head split and the Width control all stopped at that call \u2014 nine settings, measured NO EFFECT, on precisely the relationship that replaces this block. #1283 gave the new block the card settings, #1299 the head split and its own Width, #1305 carried all of it onto the tyre branch. Only then was the claim true.\n\nWHAT WAS MEASURED BEFORE RETIRING, four ways, because the premise decides the card:\n \u2022 settable text kinds (SECTION_TEXT_KINDS): both blocks ABSENT \u2014 the map holds only TimelineTrack and Footprint, both AUTHORED lists\n \u2022 read-only text regions: neither `components/CompatibleTyres` nor `components/TyreCard` stamps one\n \u2022 panel rows through resolveFields: this block 31, `RelatedProducts` 42. This block\'s only style-ish key is `_sStyle`, the bucket HEADER, not a control\n \u2022 head text (num/title/description) is authored on both, so `_partStyles` reaches it identically\nSo on the CARD runs the two are zero against zero \u2014 neither can style them \u2014 and everywhere else the new block is ahead. Styling those runs needs a section-level prop family and a paint path for DERIVED text, which no section has yet: a part is anchored by matching an AUTHORED prop\'s string against the DOM, and `lib/puck/source-bound-parts` keeps hydrated copy unreachable on purpose so a merchant cannot type into a copy of a product name and lose it at the next sync. That is its own card, and `lib/sections/text-regions` is the read-only half that already ships.\n\nTHE TYPE KEY STAYS AND SO DOES THE COMPONENT, the same contract Subscribe, Split and SubscribeBlogs have. Every page holding a `CompatibleTyres` still renders through it, no published document is rewritten, and NO MIGRATION RUNS \u2014 the owner\'s standing ruling of 2026-09-05: he redoes live sections himself and deletes the old ones when he does. He also said explicitly not to count them first.\n\n\u26A0\uFE0F AND THIS COMPONENT IS LOAD-BEARING FOR ITS OWN REPLACEMENT: `DynamicRelatedProducts` draws it for EVERY tyre answer. Deleting it would blank the block that replaces it, not just the pages still holding this one.',SubscribeBlogs:"card 66396 \u2014 folded into `Subscribe`, which now chooses its rail's content with a `Type` control (the newsletter's own issues, or live blog posts). The two shared 21 of their fields and rendered THE SAME BYTES from equivalent rows, so offering both asked a merchant to choose between two names for one section. The type key stays because it is stored on published pages, and the component stays because those pages still render through it."},jX=["Grid"],KX=Array.from(new Set([...fr.flatMap(e=>e.sections.map(o=>o.type)),...Object.keys(eB)])),VX=Object.fromEntries(fr.flatMap(e=>e.sections.map(o=>[o.type,o.label]))),oB={Heading:"general",Text:"general",Eyebrow:"general",ImageBlock:"general",LogoBlock:"general",ButtonBlock:"general",PostCard:"general",HeroSlide:"general",HeroGroup:"general",Integrations:"general",Grid:"general",CollectionCard:"commerce",GalleryItem:"commerce",ProductRef:"commerce",CompatibleTyres:"commerce",Header:"commerce",SearchBlock:"commerce",CartBlock:"commerce",CountrySwitchBlock:"commerce",AccountBlock:"commerce",ThemeSwitchBlock:"commerce",SubmitBox:"service",BookingBox:"service",SubscribeBlogs:"service",Footer:"service",FooterLogo:"service",FooterMenu:"service",FooterDivider:"service",FooterGroup:"service",FooterText:"service",FooterEmailSignup:"service",FooterSocial:"service",MenuBlock:"service",EmailFormBlock:"service",SocialLogosBlock:"service",LegalLineBlock:"service",SiteHeader:"service",SiteFooter:"service"},yl={...oB,...Object.fromEntries(fr.flatMap(e=>e.sections.map(o=>[o.type,o.set])))};function Kb(e){return Object.prototype.hasOwnProperty.call(yl,e)?yl[e]:void 0}function Rc(e){return Object.keys(yl).filter(o=>yl[o]===e).sort()}var XX=Rc("general"),YX=Rc("commerce"),ZX=Rc("service"),Oc="Flex",et="Box",QX=`${et}es`;function tB(e){return e==="section"?"Blank section":et}function Ac(e,o,t){return e===Oc?tB(o):t}var rB={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 Vb(e){return rB[e]?.label}var Xb=Oc;var aB={general:!0,commerce:!0,service:!0};function Bc(e){let o=e?.sets;return o?Object.fromEntries(jb.map(t=>[t,o.includes(t)])):aB}function lY(e=io()){return Bc(e.blocks)}var cr="content",be="Flex",nB="Text & media",lB="Layout & structure",sB=[{type:"Eyebrow",label:"Eyebrow"},{type:"Heading",label:"Heading"},{type:"Text",label:"Text"},{type:"ImageBlock",label:"Image"},{type:"LogoBlock",label:"Logo"},{type:"ButtonBlock",label:"Button"},{type:"Form",label:"Form"},{type:"PostCard",label:"Post Card"},{type:"Stats",label:"Stats"},{type:"MenuBlock",label:"Menu"},{type:"EmailFormBlock",label:"Email Form"},{type:"SocialLogosBlock",label:"Social Logos"},{type:"LegalLineBlock",label:"Legal Line"},{type:"SearchBlock",label:"Search"},{type:"CartBlock",label:"Cart"},{type:"CountrySwitchBlock",label:"Country Switch"}].map(e=>({...e,group:nB})),iB=(fr.find(e=>e.key==="structure")?.sections??[]).map(e=>({type:e.type,label:e.label,group:lB})),Yb=[...sB,...iB],Dc=[{type:"Eyebrow",label:"Eyebrow"},{type:"Heading",label:"Heading"},{type:"Text",label:"Text"},{type:"ImageBlock",label:"Image"},{type:"LogoBlock",label:"Logo"},{type:"ButtonBlock",label:"Button"},{type:"HeroGroup",label:et}],fY=Dc.map(e=>e.type),fB=1,cB=Dc.filter(e=>e.type!=="HeroGroup");function dB(e){return e<fB?Dc:cB}var uB={Flex:{slot:cr,choices:()=>Yb},Grid:{slot:cr,choices:()=>Yb},HeroGroup:{slot:cr,choices:dB}};function Zb(e,o=0){let t=uB[e];return t?{slot:t.slot,choices:t.choices(o)}:null}function He(e,o,t,r={}){return{type:e,props:{...o(e),id:t(e),...r}}}var pB={Manifesto:(e,o)=>({type:be,props:{...e(be),id:o(be),direction:"row",share:"equal",sectionHeightMode:"screen",name:"Brand Text",content:[He(be,e,o,{direction:"column",justify:"center",blockSpacing:"gap",name:"Text",sectionPaddingTop:100,sectionPaddingBottom:100,sectionPaddingLeft:40,sectionPaddingRight:40,content:[He("Eyebrow",e,o,{eyebrowLook:"plain"}),He("Heading",e,o),He("Text",e,o),He("Stats",e,o)]}),He(be,e,o,{direction:"column",name:"Picture",content:[]})]}}),Split:(e,o)=>({type:be,props:{...e(be),id:o(be),direction:"row",share:"equal",sectionHeightMode:"screen",sectionHeightValue:70,name:"Image & Text Split",content:[He(be,e,o,{direction:"column",justify:"center",blockSpacing:"gap",name:"Text",sectionPaddingTop:100,sectionPaddingBottom:100,sectionPaddingLeft:60,sectionPaddingRight:60,content:[He("Eyebrow",e,o,{eyebrowLook:"plain"}),He("Heading",e,o),He("Text",e,o),He("ButtonBlock",e,o)]}),He(be,e,o,{direction:"column",name:"Image",content:[He("ImageBlock",e,o)]})]}}),Subscribe:(e,o)=>({type:be,props:{...e(be),id:o(be),direction:"column",name:"Subscribe",content:[He("Heading",e,o),He("Text",e,o),He("Form",e,o)]}})};function Sl(e){return pB[e]??null}import{blockTypesIn as _c}from"efficient-easel/screen/lib/puck/block-types-in";var mB="ImageBlock",xB=3,Cl=(e,o,t={})=>({type:e,props:{...o?.(e)??{},id:br(e),...t}}),IB=e=>({...e?.(be)??{},direction:"column",[cr]:[Cl(mB,e),Cl(be,e,{direction:"column",[cr]:[Cl("Heading",e),Cl("Text",e)]})]}),Bo={Hero:{slot:"slides",childType:"HeroSlide",addLabel:"Add slide",slider:!0,seeds:()=>Nh.map(e=>({...e}))},HeroSlide:{slot:"groups",childType:"HeroGroup",addLabel:`Add ${et.toLowerCase()}`,seeds:()=>[],addBlocked:Da,notice:es},HeroSingle:{slot:"boxes",childType:"HeroGroup",addLabel:`Add ${et.toLowerCase()}`,seeds:()=>[],addBlocked:Da,notice:es},ProcessSteps:{slot:"boxes",childType:be,addLabel:`Add ${et.toLowerCase()}`,seeds:e=>Array.from({length:xB},()=>IB(e)),skipSeed:e=>Array.isArray(e.steps)&&e.steps.length>0}};function yY(e){for(let[o,t]of Object.entries(e)){if(o in Bo&&Bo[o]!==t)throw new Error(`lib/puck/slot-specs: "${o}" already has a slot spec`);Bo[o]=t}}function SY(e,o){let t=Bo[e];return t?{slot:t.slot,children:t.seeds(o).map(r=>({type:t.childType,props:{id:br(t.childType),...r}}))}:null}var Qb=()=>({}),Jb=new Map;function hB(e){let o=Jb.get(e);if(o)return o;let t=new Set,r=Bo[e];if(r)for(let s of r.seeds(Qb))for(let i of _c({type:r.childType,props:s}))t.add(i);let a=Sl(e);if(a){let s=0;for(let i of _c(a(Qb,c=>`${c}-${s+=1}`)))t.add(i)}t.delete(e);let n=[...t].sort();return Jb.set(e,n),n}function gB(e){if(!e||!e.sets&&!e.allow&&!e.deny?.length)return null;let o=Bc(e),t=e.allow?new Set(e.allow):null,r=new Set(e.deny??[]),a=new Set(Object.keys(e.host??{})),n=c=>{if(r.has(c))return!1;if(a.has(c))return!0;let u=Kb(c);return!u||!o[u]?!1:t?t.has(c):!0},s=new Map,i=c=>{let u=s.get(c);if(u!==void 0)return u;s.set(c,!1);let p=n(c)&&hB(c).every(i);return s.set(c,p),p};return{sets:o,offers:i}}var bB="block-offer";function Nc(e=io()){return e.cache(bB,()=>gB(Yu(e)))}function ey(e,o=io()){let t=Nc(o);return t?t.offers(e):!0}function oy(e,o=0){let t=SB(e,o),r=t?Nc():null;return t&&r?yB(t,r):t}function yB(e,o){if(e.spec)return o.offers(e.spec.childType)?e:null;let t=e.choices??[],r=t.filter(a=>o.offers(a.type));return r.length===t.length?e:r.length>0?{...e,choices:r}:null}function SB(e,o){let t=Bo[e];if(t)return{source:"section",slot:t.slot,choices:null,spec:t};let r=Zb(e,o);if(r)return{source:"container",slot:r.slot,choices:r.choices,spec:null};let a=bg(e);return a?{source:"footer",slot:gg,choices:a,spec:null}:null}import{useSyncExternalStore as CB}from"react";var Mc=null,Hc=new Set;function ty(e){if(Mc!==e){Mc=e;for(let o of Hc)o()}}function vB(e){return Hc.add(e),()=>{Hc.delete(e)}}function NY(){return CB(vB,()=>Mc,()=>null)}function ry(e){if(!e)return null;let o=e.lastIndexOf(":");return o>0?e.slice(0,o):null}function ay(e,o){let t=e.props;if(e.type==="FooterMenu"){let r=t.menu;return t.heading||r?.name||l("Menu")}if(e.type==="FooterText"){let r=typeof t.text=="string"?t.text.trim():"";return r?r.length>28?`${r.slice(0,28)}\u2026`:r:l("Text")}return e.type==="FooterEmailSignup"?t.heading||l("Email signup"):o(e.type)}var ny="sf-editor-left-view";function ly(){if(typeof window>"u")return"pages";try{let e=window.localStorage.getItem(ny);return e==="sections"||e==="styles"||e==="media"?e:"pages"}catch{return"pages"}}function sy(e){if(!(typeof window>"u"))try{window.localStorage.setItem(ny,e)}catch{}}function iy(e,o,t=!1){return e==="styles"&&!o||e==="media"&&!t?"sections":e}function fy(e,o){return e?"sections":o}var cy="Footer",wB=[Me,cy,ue],dr=e=>{let o=e?.content;return Array.isArray(o)?o:[]},St=e=>{let o=e?.zones;return o&&typeof o=="object"&&!Array.isArray(o)?o:null},ma=e=>{let o=e?.props?.id;return typeof o=="string"?o:void 0},dy=e=>e.slice(0,Math.max(0,e.lastIndexOf(":")));function uy(e){let o=nr(dr(e)),t=o.some(r=>r?.type===ue);return o.filter(r=>r?.type===Me||r?.type===ue||r?.type===cy&&!t)}function Wc(e,o){let t=new Set,r=a=>{if(Array.isArray(a)){for(let s of a)r(s);return}if(!a||typeof a!="object")return;let n=a;if(typeof n.type=="string"&&n.props&&typeof n.props=="object"){let s=ma(n);s&&t.add(s)}for(let s of Object.values(a))r(s)};if(r(e),o){let a=!0,n=new Set;for(;a;){a=!1;for(let[s,i]of Object.entries(o))n.has(s)||!t.has(dy(s))||(n.add(s),r(i),a=!0)}}return t}function Gc(e,o){let t={},r={};for(let[a,n]of Object.entries(e??{}))(o.has(dy(a))?t:r)[a]=n;return{owned:t,rest:r}}function UY(e,o){if(!o)return e;let t=uy(o);if(!t.length)return e;let r=t.filter(i=>i.type===Me),a=t.filter(i=>i.type!==Me),n={...e,content:[...r,...dr(e),...a]},{owned:s}=Gc(St(o),Wc(t,St(o)));return Object.keys(s).length&&(n.zones={...St(e)??{},...s}),n}function qY(e,o){if(!o)return{page:e,chrome:null};let t=uy(o),r=new Set(t.map(ma).filter(S=>!!S)),a=[],n=[];for(let S of dr(e)){let h=ma(S);h&&r.has(h)||ar(S?.type)?n.push(S):a.push(S)}let s=new Map(n.map(S=>[ma(S),S])),i=new Set,c=nr(dr(o)).flatMap(S=>{let h=ma(S);if(!h||!r.has(h))return[S];let k=s.get(h);return k?(i.add(k),[k]):[]});for(let S of n)i.has(S)||c.some(h=>h?.type===S.type)||(c=S.type===Me?[S,...c]:[...c,S]);c=nr(c);let u=c.length===dr(o).length&&c.every((S,h)=>S===dr(o)[h]),p=St(e),m=Wc(c,p),{owned:x,rest:g}=Gc(p,m),C=Gc(St(o),Wc(t,St(o))).owned,w={...o,content:u?o.content:[...c]},b=St(o);if(b||Object.keys(x).length){let S={};for(let[h,k]of Object.entries(b??{}))h in C?h in x&&(S[h]=x[h]):S[h]=k;for(let[h,k]of Object.entries(x))h in S||(S[h]=k);w.zones=S,b&&kB(w.zones,b)&&(w.zones=b)}let v={...e,content:a};return p&&(Object.keys(g).length||!Object.keys(C).length?v.zones=g:delete v.zones),{page:v,chrome:w}}function kB(e,o){let t=Object.keys(e),r=Object.keys(o);return t.length===r.length&&t.every((a,n)=>a===r[n]&&e[a]===o[a])}function py(e,o){return t=>e(t)||t!==void 0&&wB.includes(t)&&o()}var vl=null;function jY(e){vl=e}function my(){return!!(vl&&vl.state().lockHolder)}function ur(){return vl!==null}var TB=new Set(["BookingBox","SubmitBox"]);function FB(e){return typeof e=="string"&&TB.has(e)}var xy=py(FB,my);import{Fragment as Uc,jsx as kl,jsxs as jB}from"react/jsx-runtime";import{useMemo as KB,useRef as ky}from"react";import{EaselCanvas as VB,useEaselApi as XB}from"efficient-easel/easel";import{jsx as yy,Fragment as _B,jsxs as NB}from"react/jsx-runtime";import{useEffect as Sy,useLayoutEffect as MB}from"react";var wl="data-theme",Iy="light";function EB(e){return e.getAttribute(wl)===Iy?"light":"dark"}function PB(e,o){return EB(e)===o?!1:(o==="light"?e.setAttribute(wl,Iy):e.removeAttribute(wl),!0)}function LB(e){return Ml(e).getItem(Ll)}function JY(e,o){Ml(e).setItem(Ll,o)}function RB(e,o,t=new Date().getHours()){return td({mode:o.mode,override:LB(e),switchShown:o.switchShown,hour:t})}function hy(e,o){let t=e.documentElement;if(!t)return()=>{};let r=()=>PB(t,RB(e,o));r();let a=e.defaultView?.MutationObserver;if(!a)return()=>{};let n=new a(r);return n.observe(t,{attributes:!0,attributeFilter:[wl]}),()=>n.disconnect()}var OB="style";function AB(e,o){let t=fd(o),r=!1;for(let a of id){let n=t[a]??"";e.style.getPropertyValue(a)!==n&&(n?e.style.setProperty(a,n):e.style.removeProperty(a),r=!0)}return r}function gy(e,o){let t=e.body;if(!t)return()=>{};let r=()=>AB(t,o);r();let a=e.defaultView?.MutationObserver;if(!a)return()=>{};let n=new a(r);return n.observe(t,{attributes:!0,attributeFilter:[OB]}),()=>n.disconnect()}var BB=String.raw`(function (doc) {
|
|
17
|
+
if (doc.__sfFitWords) return;
|
|
18
|
+
var win = doc.defaultView;
|
|
19
|
+
var SELECTOR = "h1,h2,h3,h4,h5,h6,[class*='font-heading'],[class*='font-display']";
|
|
20
|
+
var MIN_SCALE = 0.3, MIN_PX = 16, SLACK = 1;
|
|
21
|
+
|
|
22
|
+
function measure(el) {
|
|
23
|
+
var widest = 0, current = 0, last = null, split = false, lastBlock = null;
|
|
24
|
+
function blockOf(n) {
|
|
25
|
+
for (var p = n.parentElement; p && p !== el; p = p.parentElement) {
|
|
26
|
+
var d = win.getComputedStyle(p).display;
|
|
27
|
+
if (d.indexOf("inline") !== 0 && d !== "contents") return p;
|
|
28
|
+
}
|
|
29
|
+
return el;
|
|
30
|
+
}
|
|
31
|
+
function close() { if (current > widest) widest = current; current = 0; last = null; }
|
|
32
|
+
var walker = doc.createTreeWalker(el, 5), range = doc.createRange(), node;
|
|
33
|
+
while ((node = walker.nextNode())) {
|
|
34
|
+
if (node.nodeType === 1) {
|
|
35
|
+
if (node.tagName === "BR" || node.tagName === "WBR") close();
|
|
36
|
+
continue;
|
|
37
|
+
}
|
|
38
|
+
var block = blockOf(node);
|
|
39
|
+
if (block !== lastBlock) close();
|
|
40
|
+
lastBlock = block;
|
|
41
|
+
var re = /(\S+)|(\s+)/g, m;
|
|
42
|
+
while ((m = re.exec(node.data))) {
|
|
43
|
+
if (m[2]) { close(); continue; }
|
|
44
|
+
range.setStart(node, m.index);
|
|
45
|
+
range.setEnd(node, m.index + m[0].length);
|
|
46
|
+
var rects = range.getClientRects();
|
|
47
|
+
for (var i = 0; i < rects.length; i++) {
|
|
48
|
+
var r = rects[i];
|
|
49
|
+
if (r.width <= 0) continue;
|
|
50
|
+
current += r.width;
|
|
51
|
+
if (last && r.top > last.top + last.height / 2) split = true;
|
|
52
|
+
last = r;
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
close();
|
|
57
|
+
return { widest: widest, split: split };
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
function lineWidth(el) {
|
|
61
|
+
var cs = win.getComputedStyle(el);
|
|
62
|
+
return el.getBoundingClientRect().width - parseFloat(cs.paddingLeft) - parseFloat(cs.paddingRight)
|
|
63
|
+
- parseFloat(cs.borderLeftWidth) - parseFloat(cs.borderRightWidth);
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
// ⚠️ THE HEADING ELEMENT IS NEVER TOUCHED — no style="", no data-*. This
|
|
67
|
+
// runs before React hydrates, and React 19 in development reports ANY
|
|
68
|
+
// attribute that differs from what it rendered ("a tree hydrated but some
|
|
69
|
+
// attributes didn't match"): first our inline font-size on the hero (which
|
|
70
|
+
// React owns via --heading-size), then, when that moved to a data-sf-fit
|
|
71
|
+
// attribute, the attribute itself. So the fitted size lives only in this
|
|
72
|
+
// script's own stylesheet, in <head>, addressed to each heading by its
|
|
73
|
+
// POSITION (":root>*:nth-child(2)>…"). A position goes stale when the page's
|
|
74
|
+
// structure changes, so the rules are rewritten in the MutationObserver
|
|
75
|
+
// callback, which runs before the next paint. !important so the size also
|
|
76
|
+
// beats a part's own inline size.
|
|
77
|
+
var head = doc.head || doc.documentElement;
|
|
78
|
+
var fitEl = doc.createElement("style");
|
|
79
|
+
fitEl.id = "storefront-fit-words-sizes";
|
|
80
|
+
head.appendChild(fitEl);
|
|
81
|
+
var fitted = new Map(); // heading -> fitted size, e.g. "43.8px"
|
|
82
|
+
|
|
83
|
+
function pathOf(el) {
|
|
84
|
+
var parts = [];
|
|
85
|
+
for (var e = el; e && e.parentElement; e = e.parentElement) {
|
|
86
|
+
var i = 1, s = e;
|
|
87
|
+
while ((s = s.previousElementSibling)) i++;
|
|
88
|
+
parts.unshift("*:nth-child(" + i + ")");
|
|
89
|
+
}
|
|
90
|
+
return ":root>" + parts.join(">");
|
|
91
|
+
}
|
|
92
|
+
function writeRules() {
|
|
93
|
+
var css = "";
|
|
94
|
+
fitted.forEach(function (size, el) {
|
|
95
|
+
if (!el.isConnected) { fitted.delete(el); return; }
|
|
96
|
+
css += pathOf(el) + "{font-size:" + size + " !important}";
|
|
97
|
+
});
|
|
98
|
+
if (fitEl.textContent !== css) fitEl.textContent = css;
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
function unfit(el) {
|
|
102
|
+
if (fitted.delete(el)) writeRules();
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
function fits(el) {
|
|
106
|
+
var m = measure(el);
|
|
107
|
+
return !m.split && m.widest <= lineWidth(el) + SLACK;
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
function fit(el) {
|
|
111
|
+
unfit(el);
|
|
112
|
+
if (lineWidth(el) <= 0) return; // hidden, or not laid out yet
|
|
113
|
+
if (fits(el)) return;
|
|
114
|
+
var set = parseFloat(win.getComputedStyle(el).fontSize);
|
|
115
|
+
if (!set) return;
|
|
116
|
+
var floor = Math.max(set * MIN_SCALE, MIN_PX);
|
|
117
|
+
if (floor >= set) return;
|
|
118
|
+
function size(px) { return Math.floor(px * 10) / 10 + "px"; }
|
|
119
|
+
// The SEARCH tries sizes on the element's own style and then puts that
|
|
120
|
+
// attribute back byte for byte (or removes it, if it had none), so nothing
|
|
121
|
+
// is left for React to see. A trial in a stylesheet instead restyles the
|
|
122
|
+
// whole page per step: a full pass on the Hartes home took 75–160ms at 4x
|
|
123
|
+
// CPU that way.
|
|
124
|
+
var hadStyle = el.hasAttribute("style"), origStyle = el.getAttribute("style");
|
|
125
|
+
function attempt(px) { el.style.setProperty("font-size", size(px), "important"); }
|
|
126
|
+
function done() { if (hadStyle) el.setAttribute("style", origStyle); else el.removeAttribute("style"); }
|
|
127
|
+
attempt(floor);
|
|
128
|
+
if (!fits(el)) { done(); return; } // even the floor does not fit: leave it as set
|
|
129
|
+
var lo = floor, hi = set;
|
|
130
|
+
for (var i = 0; i < 8; i++) {
|
|
131
|
+
var mid = (lo + hi) / 2;
|
|
132
|
+
attempt(mid);
|
|
133
|
+
if (fits(el)) lo = mid; else hi = mid;
|
|
134
|
+
}
|
|
135
|
+
done();
|
|
136
|
+
fitted.set(el, size(lo));
|
|
137
|
+
writeRules();
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
// What each heading measured right after we last fitted it, so the
|
|
141
|
+
// ResizeObserver below can tell a real change (a font swap, a rotate, a
|
|
142
|
+
// container that moved) from the size change our own write just caused.
|
|
143
|
+
var seen = new WeakMap();
|
|
144
|
+
function remember(el) {
|
|
145
|
+
var b = el.getBoundingClientRect();
|
|
146
|
+
seen.set(el, b.width + "x" + b.height);
|
|
147
|
+
}
|
|
148
|
+
function fitAndRemember(el) { fit(el); remember(el); }
|
|
149
|
+
|
|
150
|
+
// ⚠️ A ResizeObserver, NOT fonts.ready or a resize event, and the reason is
|
|
151
|
+
// WHEN it runs: after layout, BEFORE paint. The web font arriving re-wraps a
|
|
152
|
+
// fitted heading, and fonts.ready resolves only after that frame is painted —
|
|
153
|
+
// measured on the Hartes hero: a 42px jump in 2 of 3 loads. A size change
|
|
154
|
+
// reported here is fitted in the same frame, so the broken state is never
|
|
155
|
+
// drawn. It also covers a container that resizes.
|
|
156
|
+
var ro = new win.ResizeObserver(function (entries) {
|
|
157
|
+
for (var i = 0; i < entries.length; i++) {
|
|
158
|
+
var el = entries[i].target;
|
|
159
|
+
var b = el.getBoundingClientRect();
|
|
160
|
+
if (seen.get(el) === b.width + "x" + b.height) continue; // our own write
|
|
161
|
+
fitAndRemember(el);
|
|
162
|
+
}
|
|
163
|
+
});
|
|
164
|
+
function watch(el) { if (!seen.has(el)) { remember(el); ro.observe(el); } }
|
|
165
|
+
|
|
166
|
+
function fitAll() {
|
|
167
|
+
var els = doc.querySelectorAll(SELECTOR);
|
|
168
|
+
for (var i = 0; i < els.length; i++) { fitAndRemember(els[i]); watch(els[i]); }
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
var queued = 0, all = false, touched = new Set();
|
|
172
|
+
function run() {
|
|
173
|
+
queued = 0;
|
|
174
|
+
if (all) { all = false; touched.clear(); fitAll(); return; }
|
|
175
|
+
var els = Array.from(touched);
|
|
176
|
+
touched.clear();
|
|
177
|
+
for (var i = 0; i < els.length; i++) if (els[i].isConnected) { fitAndRemember(els[i]); watch(els[i]); }
|
|
178
|
+
}
|
|
179
|
+
function schedule() { if (!queued) queued = win.requestAnimationFrame(run); }
|
|
180
|
+
function scheduleAll() { all = true; schedule(); }
|
|
181
|
+
|
|
182
|
+
fitAll();
|
|
183
|
+
// A backstop only: a font that changes widths without changing any
|
|
184
|
+
// heading's box is not seen by the ResizeObserver.
|
|
185
|
+
if (doc.fonts && doc.fonts.ready) doc.fonts.ready.then(scheduleAll, function () {});
|
|
186
|
+
|
|
187
|
+
// …and the viewport WIDTH, which the ResizeObserver cannot stand in for: a
|
|
188
|
+
// heading sized to its own text (fit-content, a flex item) keeps the SAME box
|
|
189
|
+
// when the phone turns to 844, so nothing reports a change and it would stay
|
|
190
|
+
// shrunk. The probe's rotate check caught exactly that.
|
|
191
|
+
var lastWidth = win.innerWidth;
|
|
192
|
+
function onResize() {
|
|
193
|
+
if (win.innerWidth === lastWidth) return; // a phone's toolbar changing HEIGHT is not our business
|
|
194
|
+
lastWidth = win.innerWidth;
|
|
195
|
+
scheduleAll();
|
|
196
|
+
}
|
|
197
|
+
win.addEventListener("resize", onResize);
|
|
198
|
+
|
|
199
|
+
var mo = new win.MutationObserver(function (records) {
|
|
200
|
+
// Positions first: a node added or removed anywhere can shift the
|
|
201
|
+
// nth-child path of a fitted heading, and this callback runs before paint.
|
|
202
|
+
if (fitted.size) {
|
|
203
|
+
for (var q = 0; q < records.length; q++) if (records[q].type === "childList") { writeRules(); break; }
|
|
204
|
+
}
|
|
205
|
+
for (var i = 0; i < records.length; i++) {
|
|
206
|
+
var r = records[i];
|
|
207
|
+
var target = r.target.nodeType === 1 ? r.target : r.target.parentElement;
|
|
208
|
+
var own = target && target.closest(SELECTOR);
|
|
209
|
+
if (own) touched.add(own);
|
|
210
|
+
for (var j = 0; j < r.addedNodes.length; j++) {
|
|
211
|
+
var n = r.addedNodes[j];
|
|
212
|
+
if (n.nodeType !== 1) continue;
|
|
213
|
+
if (n.matches(SELECTOR)) touched.add(n);
|
|
214
|
+
var inner = n.querySelectorAll(SELECTOR);
|
|
215
|
+
for (var k = 0; k < inner.length; k++) touched.add(inner[k]);
|
|
216
|
+
}
|
|
217
|
+
}
|
|
218
|
+
if (touched.size) schedule();
|
|
219
|
+
});
|
|
220
|
+
mo.observe(doc.body, { childList: true, subtree: true, characterData: true });
|
|
221
|
+
|
|
222
|
+
doc.__sfFitWords = function stop() {
|
|
223
|
+
win.removeEventListener("resize", onResize);
|
|
224
|
+
ro.disconnect();
|
|
225
|
+
mo.disconnect();
|
|
226
|
+
if (queued) win.cancelAnimationFrame(queued);
|
|
227
|
+
fitted.clear();
|
|
228
|
+
fitEl.remove();
|
|
229
|
+
delete doc.__sfFitWords;
|
|
230
|
+
};
|
|
231
|
+
// For the probe and for debugging: which headings are fitted, at what size,
|
|
232
|
+
// and the sheet that holds it (disable it to read a heading's set size).
|
|
233
|
+
doc.__sfFitWords.fitted = fitted;
|
|
234
|
+
doc.__sfFitWords.sheet = fitEl;
|
|
235
|
+
})(document);`,DB="storefront-fit-words";function by(e){let o=e.createElement("script");return o.id=DB,o.textContent=BB,(e.head??e.documentElement).appendChild(o),()=>{e.__sfFitWords?.(),o.remove()}}var HB=`
|
|
236
|
+
[${Io}][${Io}] { cursor: text; }
|
|
237
|
+
[${Ye}][${Ye}][${Ye}] {
|
|
238
|
+
outline: 1px solid ${ta.accent};
|
|
239
|
+
outline-offset: 2px;
|
|
240
|
+
}
|
|
241
|
+
[${Ye}][${Ye}]:has([${Ye}]),
|
|
242
|
+
[data-puck-overlay-portal][data-puck-overlay-portal]:has([${Ye}]) {
|
|
243
|
+
outline: none;
|
|
244
|
+
}
|
|
245
|
+
[${Ye}][${Ye}][${Ye}][data-es-typing],
|
|
246
|
+
[data-es-typing] [${Ye}][${Ye}][${Ye}] {
|
|
247
|
+
outline: none;
|
|
248
|
+
}
|
|
249
|
+
`;function Cy({children:e,document:o}){let{theme:t,themeMode:r,themeSwitchShown:a}=re(),n=co(t);return Sy(()=>{if(o)return hy(o,{mode:r,switchShown:a})},[o,r,a]),Sy(()=>{if(o)return gy(o,n)},[o,n]),MB(()=>{if(o)return by(o)},[o]),NB(_B,{children:[yy($d,{}),yy("style",{children:HB}),e]})}import{jsx as zc}from"react/jsx-runtime";import{useEffect as WB,useState as GB,useSyncExternalStore as zB}from"react";import{Banner as UB}from"efficient-shell/ui";var qB=()=>()=>{},vy=()=>!1;function $B({report:e}){let o=zB(e?e.subscribe:qB,e?()=>e.state().loadFailed:vy,e?()=>e.state().loadFailed:vy),[t,r]=GB(!1);return WB(()=>{o||r(!1)},[o]),!o||t?null:zc("aside",{className:"sf-canvas-notice",children:zc(UB,{tone:"warning",onDismiss:()=>r(!0),children:l("The header and footer could not load. They are hidden for now and nothing in them is saved. Reload to try again.")})})}function wy(){let{adapter:e}=we();return zc($B,{report:e?.pinnedChrome})}function YB({children:e,componentId:o}){let{selectedPartId:t}=na();return Sx(t,o)?kl(Uc,{}):kl(Uc,{children:e})}function Ty(e){let{mirrorHostStyles:o}=ql(),t=Kd(),r=ky(null),a=ZB(r),{onDocument:n}=e,s=i=>{r.current=i,n?.(i)};return jB(Uc,{children:[kl(wy,{}),kl(VB,{...e,onDocument:s,typing:a,metadata:e.metadata??t,height:"fill",mirrorStyles:o,frameWrapper:Cy,overlay:YB})]})}function ZB(e){let o=XB(),t=Uo(),r=na(),a=ky({ops:t,parts:r});return a.current={ops:t,parts:r},KB(()=>{let n={getItemById:i=>o.getState().getItemById(i),getSelectorForId:i=>o.getState().getSelectorForId(i),get components(){return o.getState().config.components},replace:(i,c,u)=>a.current.ops.replaceComponent(i,c,u)},s=(i,c)=>{let u=Tx(i,n);if(!u)return null;let p=c,m=()=>(p=Fx(p,p?.ownerDocument??e.current,i),p);return m()?{element:m,value:u.value,rules:u.rules,multiline:u.multiline,write:u.write,toolbar:{offered:u.offered}}:null};return{at:i=>{let c=i.closest(`[${Io}]`),u=c?.getAttribute(Io);return c&&u?s(u,c):null},atSelection:()=>{let i=a.current.parts.selectedPartId;return i?s(i,null):null},onChange:i=>{if(!i.typing){Bi(null);return}let c=i.element.closest(`[${Io}]`)?.getAttribute(Io)??null;Bi(c),c&&a.current.parts.selectedPartId!==c&&a.current.parts.select(c)}}},[o,e])}var Fy={Hero:"Full-screen opener with rotating slides.",HeroSingle:"Full-screen image or video with a headline.",IntroBleed:"Full-bleed intro image the next section scrolls over.",Collections:"Product collections in a tidy grid.",AlloyWheelsListing:"A full product-listing page: filter rail, sortable card grid and pagination, from the live catalog. Choose which product types it shows.",CatalogFilterBar:"Filters the collection grids below it \u2014 a sticky row of Pills (the default), or Columns, one per filter you switch on.",ProductGrid:"Hand-picked products in a tidy grid.",FitmentFinder:"A vehicle picker \u2014 make, model, year and trim resolve the OEM stock fitment live.",Gallery:"Two image galleries with tabs and filters.",GalleryB:"Customer photos in a card grid with a click-to-open lightbox.",SpecStrip:"A thin one-line spec strip \u2014 small-caps items spread across the width, as a dark band or a bare hairline row.",ProductHero:"A product hero \u2014 image beside price, bullets and a buy button.",SpecTable:"A spec sheet \u2014 labeled rows of product specifications.",ProcessSteps:"A heading over columns of image, title, blurb and specs.",DetailRows:"Repeating full-width rows \u2014 eyebrow, title and copy beside a numbered close-up image, alternating sides each row.",FitmentTable:"A fitment table \u2014 per-size bolt patterns, offsets and load ratings, filterable by diameter.",CompatibleTyres:"The current product's compatible tyres \u2014 image, size, key specs and price per tyre, with an inquiry link. Display only.",RelatedProducts:"The current product's related items in a tidy row \u2014 the product page's built-in 'Pair with' cross-sell.",OrderSummary:"A display order-summary panel \u2014 items, totals and a note.",DeliveryOptions:"Delivery tiers as cards \u2014 name, window and price, one highlighted.",PaymentBadges:"A payment-methods trust strip with reassurance lines.",CheckoutCTA:"A centered 'ready to order?' headline with the checkout button.",Manifesto:"A bold brand statement beside a full-height image, with a stat strip.",ParagraphsA:"An editorial text panel with a stat strip and founders' note.",StatsParagraph:"An editorial heading and paragraph over a row of theme-color-accented stat cards.",Chart:"A titled chart \u2014 bars, line or donut \u2014 drawn from your own labeled data points.",Mockup:"A headline beside a stylized product-UI mockup card \u2014 spec sheet, fitment, portal, kanban and more.",Prose:"A plain editorial text section \u2014 eyebrow, heading and body copy.",Timeline:"An editorial aside beside a rail-marked timeline of dated entries.",TimelineTrack:"A horizontal year track of milestones \u2014 company history or roadmap.",Footprint:"A world map of your locations with a legend \u2014 designed here, sold worldwide.",TitleWithButtons:"A big headline beside a stack of call-to-action buttons.",Split:"Side-by-side image and text in two columns.",Cards:"A heading over a grid of free-text title-and-blurb cards.",FAQ:"A frequently-asked-questions accordion with a header.",Testimonials:"Customer quotes in a grid \u2014 the quote, a name and a role.",Masthead:"A journal issue header with a lead statement and contents.",Breadcrumb:"A slim trail showing where the reader is (Home / Journal\u2026).",CategoryBar:"A sticky row of category tabs with counts and links.",FeaturedCover:"A featured article \u2014 big cover image beside a headline and dek.",LongRead:"A long-form article spread with a pull-quote and cover image.",Series:"A section heading over a grid of column cards.",Subscribe:"A newsletter signup beside a list of recent issues.",SubscribeBlogs:"A newsletter signup beside your latest blog posts, pulled live.",Events:"Latest journal posts in a three-card row.",DocMasthead:"A document header \u2014 headline, metadata and standfirst.",DocTabs:"A sticky tab bar to switch between documents.",DocBody:"Long-form document body with an 'On this page' contents list.",DocMetaCards:"A three-up meta strip for the foot of a document.",Banner:"Wide promo strip with background image.",Stats:"Highlight key numbers \u2014 years, designs.",Countdown:"Hours, minutes and seconds to a set date and time, then one line.",KeyFeatures:"A theme-color chip and heading over a grid of short feature labels.",Logos:"A row of partner or brand logos.",Ticker:"A scrolling marquee of short phrases, full width.",Reviews:"Approved customer reviews in a star-rated card grid, pulled live.",SubmitBuild:"A 'Show us yours.' headline with a photo-submission form.",ReviewForm:"A write-a-review form \u2014 submissions wait for your approval before they show.",ContactRouting:"Pick who to reach, then a form that routes the message.",ContactLocations:"Your locations as a city gallery plus address and map cards.",SectionHeader:"A numbered section title with optional link.",Grid:"Multi-column container for blocks.",Flex:"An empty section. Add whatever you want inside.",Spacer:"Vertical breathing room between sections.",Divider:"A thin horizontal rule between sections.",CustomHTML:"Drop in your own sanitized HTML.",Heading:"A single heading line.",Text:"A paragraph of body copy.",ImageBlock:"A standalone image, at the width you set.",ButtonBlock:"A call-to-action button."};var QB="Save your page changes first";function Ey(e){return e.hasTrustedConsole?e.canCreatePlatformTemplate?!e.capabilities.canPublish||!e.capabilities.hasSiteSettings?{visible:!1,hiddenReason:"not-a-site-page"}:e.siteId?e.hasUnsavedEdits?{visible:!0,enabled:!1,disabledReason:QB}:{visible:!0,enabled:!0}:{visible:!1,hiddenReason:"no-site"}:{visible:!1,hiddenReason:"not-operator"}:{visible:!1,hiddenReason:"no-console"}}var Py="storefront-editor:save-as-template";var JB="plain",Ly=[{label:"Plain",value:"plain"},{label:"Filled",value:"filled"},{label:"Line",value:"line"}],eD="line",oD={KeyFeatures:"filled"};function xa(e){return oD[e]??JB}function AZ(e,o){return to(Ly,xa(o),e)}function BZ(e){return to(Ly,eD,e)}var tD="inline",rD=[{label:"In this section",value:"inline"},{label:"In its own box",value:"own-box"}];var ot={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"}},pr="SectionHeader";function Ry(e){return e in ot}function aD(e){return to(rD,tD,e)}var nD=new Set(["Flex"]);function lD(e){return!!e?.type&&nD.has(e.type)}function NZ(e,o,t){if(!lD(o))return e;let r={};for(let[a,n]of Object.entries(e))t.includes(a)||(r[a]=n);return r}function MZ(e,o,t){if(aD(o)!=="own-box")return e;let r={};for(let[a,n]of Object.entries(e))t.includes(a)||(r[a]=n);return r}function Oy(e,{nodeDefaults:o,newNodeId:t,sectionLabel:r,blockIsOffered:a}){let n=Sl(e);return n?n(o,t):Ry(e)&&a(be)&&a(pr)?{type:be,props:{...o(be),id:t(be),direction:"column",name:`${r(e)} section`,content:[{type:pr,props:{...o(pr),id:t(pr),...ot[e]?.headStyle?{headStyle:ot[e].headStyle}:{},...ot[e]?.headRowGap?{rowGap:ot[e].headRowGap}:{},...ot[e]?.headDescriptionSize?{descriptionSize:ot[e].headDescriptionSize}:{},...xa(e)!==xa(pr)?{eyebrowLook:xa(e)}:{}}},{type:e,props:{...o(e),id:t(e),headPlacement:"own-box"}}]}}:Bo[e]?.fixed===!0?{type:e,props:{...o(e),id:t(e),layout:"boxes"}}:null}import{useEffect as sD,useState as iD}from"react";function Ay(){let e=Be().chrome?.products?.list,[o,t]=iD(null);return sD(()=>{if(!e)return;let r=!1;return e().then(a=>{r||t(a)}),()=>{r=!0}},[e]),o}function _y({mode:e,open:o}){let{setSelectedHeroId:t,setSelectHandler:r}=Vn(),a=ID().tree,n=e,s=n.kind==="ticker"?n.heroId:null,i=Tl(c=>{c&&(o({kind:"ticker",heroId:c}),gI(c))},[o]);return tt(()=>{t(s)},[s,t]),tt(()=>{r(i)},[r,i]),{partRows:(c,{rowClick:u})=>{let p=String(c.props.id);return c.type==="Hero"&&Ce(xD,{icon:Ce(Jt,{type:"ticker",size:13}),name:l(Xr),onSelect:()=>i(p),selected:s===p,rowProps:{onClick:u(()=>i(p))},words:a})}}}function hD(e){let{adapter:o,capabilities:t,currentSlug:r,siteId:a,docId:n,hasUnsavedEdits:s,bridgeCapabilities:i,notifyParent:c,token:u}=we(),{hasPreviewLink:p}=t,m=Ke(Be()).preview?.draftLink,x=$b(e.data),g=Ey({hasTrustedConsole:!!u,canCreatePlatformTemplate:i.canCreatePlatformTemplate,capabilities:t,siteId:a,hasUnsavedEdits:s}),C=Tl(()=>{!a||!r||c(Py,{siteId:a,slug:r})},[c,a,r]),w=Nb({pageSlug:r,siteId:a,token:u}),b=o.previewHref?.(r)??w;return{barLead:()=>g.visible&&Ce(dD,{side:"bottom",content:g.enabled?l("Save this website as a platform template"):l(g.disabledReason),children:Ce("span",{className:"sf-tip-disabled",tabIndex:g.enabled?void 0:0,children:Ce(cD,{variant:"secondary",disabled:!g.enabled,onClick:C,rightIcon:Ce(nb,{}),children:l("Save as Template")})})}),barTrail:()=>p&&r&&Ce(Wb,{liveHref:b,pageId:n??null,draftLink:m}),mainAction:x}}function gD(){return $c("svg",{width:"17",height:"17",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:1.7,strokeLinecap:"round",strokeLinejoin:"round",children:[Ce("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"}),Ce("circle",{cx:"7.7",cy:"11.3",r:"1.05",fill:"currentColor",stroke:"none"}),Ce("circle",{cx:"12",cy:"8",r:"1.05",fill:"currentColor",stroke:"none"}),Ce("circle",{cx:"16",cy:"11",r:"1.05",fill:"currentColor",stroke:"none"})]})}function bD(e,o){let{capabilities:t,templateId:r,siteId:a,tokenRef:n,navigate:s}=we(),{hasSiteTheme:i,explainsSiteSettings:c}=t,u=v=>o.setView(v),[p,m]=fD(Vt[0].id),{surface:x,setSurface:g}=zI(),C=()=>{if(i){u("styles"),o.reveal(),rf();return}e.show(hc),e.reveal(),rf()},w={id:"pages",label:l("Pages"),icon:Ce(pD,{}),panel:({onHide:v})=>Ce(AI,{activeSurface:x,onPreviewSurface:g,onNavigate:S=>{g(null),s(r?{kind:"template",id:r,pageSlug:S}:{kind:"page",slug:S,siteId:a??void 0})},onClose:v})},b=[];return!i&&c&&b.push({id:"appearance",label:l("Appearance"),icon:Ce(gD,{}),active:e.kind==="website",onSelect:C}),i&&b.push({id:"styles",label:l("Site styles"),icon:Ce(mD,{}),panel:({onHide:v,notify:S})=>Ce(rb,{tokenRef:n,siteId:a??void 0,onClose:v,onNotify:S,tab:p,onTabChange:m})}),{railLead:[w],railTrail:b,resolveLeftView:(v,S)=>iy(v,i,S),openSettings:C,openStyles:()=>{m(yI),u("styles")}}}function yD(e,o,t,r){let{kind:a,open:n}=e,{selected:s,zoneOf:i}=o;tt(()=>{ty(s?.type==="BookingBox"&&s.props.region==="confirm"?ry(i(String(s.props.id))):null)},[s?.props.id]);let c=Fb(e,o),{capabilities:{hasSiteSettings:u}}=we(),{setSelected:p,setSelectHandler:m}=re(),{chat:x,setChat:g,setSelected:C,setSelectHandler:w}=Kn(),b=a==="header";tt(()=>{p(b)},[b,p]),tt(()=>{m(()=>n(Ic))},[m,n]);let v=Tl(()=>n(Kg),[n]),S=a==="chat";tt(()=>{C(S)},[S,C]),tt(()=>{w(v)},[w,v]);let{setOpenHandler:h}=Vr(),k=Tl(()=>n(Vg),[n]);tt(()=>{h(k)},[h,k]);let P=_y(e),F=hD(o),A=bD(e,r),O=t.device;return{...P,...F,...A,hasOwnRows:B=>B.type===gl,ownRows:c.renderLocationTree,sectionPressed:c.sectionPressed,wrap:B=>Ce($l.Provider,{value:!0,children:Ce(jx.Provider,{value:O,children:B})}),addPanelRow:B=>u?$c("div",{className:"sf-addside-sitewide",children:[Ce("span",{className:"sf-addside-sitewide-glyph","aria-hidden":"true",children:Ce(Jt,{type:"chat",size:16})}),$c("button",{type:"button",className:"sf-addside-sitewide-name",onClick:()=>{B(),v()},children:[l("Live chat"),Ce("span",{className:"sf-addside-sitewide-desc",children:l("A chat bubble on every page")})]}),Ce(uD,{checked:x.enabled,onChange:U=>g({enabled:U}),ariaLabel:l("Show the chat bubble on the whole site")})]}):void 0}}var By=null,qc=new WeakMap;function SD(e){let o=Bd();if(!e||!o)return e;By!==o&&(By=o,qc=new WeakMap);let t=qc.get(e);return t||(t={...e,choices:e.choices?e.choices.map(r=>({...r,label:l(r.label)})):null,spec:e.spec?{...e.spec,addLabel:l(e.spec.addLabel)}:null},qc.set(e,t)),t}var CD={isLockedBlock:xy,duplicateBlocked:il,nestDepth:(e,o,t)=>o===_a?mu(e,t):0,newSectionNode:Oy,canAddTo:(e,o)=>SD(oy(e,o)),blockIsOffered:ey},vD=new Proxy(Fy,{get:(e,o)=>{let t=Reflect.get(e,o);return typeof t=="string"?l(t):t}}),wD={labelAtLevel:(e,o,t)=>l(Ac(e,o,t)),descriptions:vD,categoryLabel:e=>{let o=Vb(e);return o===void 0?void 0:l(o)},firstSection:Xb,blockRowName:ay,plainText:ct,Icon:Jt,Thumbnail:tb,useProducts:Ay},kD={desktop:2e3,tablet:800,mobile:390},Dy="desktop",TD={options:MI,initial:Dy,fluid:Dy,widths:kD},FD={read:ly,write:e=>sy(e),forSelection:(e,o)=>fy(e,o)},ED={first:ke,last:ae,firstGroup:Me,lastGroup:ue,isSectionGroup:ar,sectionGroupZone:yg,panelOf:e=>e===ke?Ic:null,get groupTab(){return ur()?Tg:void 0},get groupBadge(){return ur()?Fg():void 0},get changeNotice(){return ur()?Eg():void 0},get band(){return ur()?PD:void 0},get groupAccepts(){return ur()?wg:void 0}},PD={foldable:!0};function LD(e){return{..._y(e),openSettings:()=>e.show(hc)}}var KQ={useOwnerName:Yt,useDocumentLabel:kI,useBridges:yD,useStandaloneBridges:LD,useDocumentPass:Ob,blockRules:CD,blockLook:wD,devices:TD,leftView:FD,pinned:ED,Canvas:Ty,Inspector:Yg};export{$X as a,jX as b,KX as c,VX as d,et as e,Bc as f,lY as g,Ke as h,Yu as i,Yb as j,fY as k,i9 as l,vh as m,Eh as n,Rh as o,Oh as p,b9 as q,y9 as r,S9 as s,C9 as t,IR as u,bu as v,O9 as w,Ba as x,WS as y,ON as z,it as A,AN as B,BN as C,_a as D,mu as E,ae as F,br as G,ko as H,yY as I,SY as J,gB as K,cu as L,_S as M,wN as N,Aa as O,du as P,NS as Q,MS as R,HS as S,FN as T,EN as U,PN as V,LN as W,Me as X,ue as Y,zj as Z,Sg as _,Cg as $,to as aa,ot as ba,aD as ca,lD as da,NZ as ea,MZ as fa,XG as ga,Yn as ha,Lj as ia,na as ja,jG as ka,Xx as la,Kx as ma,Dr as na,Ti as oa,ms as pa,ct as qa,vo as ra,Vd as sa,Ue as ta,wr as ua,Io as va,Ye as wa,aG as xa,oT as ya,tT as za,nG as Aa,qt as Ba,lG as Ca,sG as Da,Wi as Ea,Nx as Fa,On as Ga,PG as Ha,LG as Ia,RG as Ja,OG as Ka,jT as La,Ur as Ma,Qx as Na,Jx as Oa,Bn as Pa,Eq as Qa,Pq as Ra,Lq as Sa,Rq as Ta,G_ as Ua,j_ as Va,K_ as Wa,V_ as Xa,Ne as Ya,sm as Za,Y5 as _a,rn as $a,Mw as ab,J5 as bb,Ww as cb,o4 as db,cm as eb,Xs as fb,Ys as gb,f4 as hb,d4 as ib,u4 as jb,p4 as kb,m4 as lb,Lr as mb,Js as nb,ei as ob,ja as pb,hp as qb,Fr as rb,yp as sb,QH as tb,Kv as ub,JH as vb,Na as wb,Su as xb,KN as yb,VN as zb,fC as Ab,XN as Bb,QN as Cb,vu as Db,JN as Eb,dC as Fb,e2 as Gb,Xa as Hb,v5 as Ib,Ms as Jb,w5 as Kb,bw as Lb,k5 as Mb,D5 as Nb,_5 as Ob,y5 as Pb,S5 as Qb,Sw as Rb,Ya as Sb,F5 as Tb,Mp as Ub,Ea as Vb,we as Wb,RD as Xb,ee as Yb,l as Zb,lt as _b,BD as $b,Be as ac,Wy as bc,Gy as cc,Hl as dc,Nv as ec,MH as fc,mp as gc,Uo as hc,gN as ic,CN as jc,ts as kc,rC as lc,UN as mc,r2 as nc,_e as oc,gs as pc,$2 as qc,Wa as rc,vr as sc,Z2 as tc,vs as uc,ws as vc,pM as wc,mM as xc,ju as yc,xM as zc,IM as Ac,hM as Bc,Es as Cc,GD as Dc,qD as Ec,kt as Fc,op as Gc,rp as Hc,jv as Ic,Ip as Jc,Ge as Kc,Nd as Lc,VD as Mc,qy as Nc,XD as Oc,YD as Pc,$y as Qc,JD as Rc,jy as Sc,e_ as Tc,Tt as Uc,t_ as Vc,r_ as Wc,a_ as Xc,n_ as Yc,Ta as Zc,l_ as _c,Xy as $c,u_ as ad,zd as bd,oS as cd,tS as dd,rS as ed,zl as fd,p_ as gd,ow as hd,g5 as id,ze as jd,P5 as kd,L5 as ld,R5 as md,O5 as nd,A5 as od,Yp as pd,Bw as qd,M5 as rd,H5 as sd,Qa as td,Ja as ud,G5 as vd,At as wd,on as xd,q5 as yd,$5 as zd,j5 as Ad,nm as Bd,V5 as Cd,j0 as Dd,ai as Ed,Zo as Fd,k3 as Gd,T3 as Hd,F3 as Id,E3 as Jd,L3 as Kd,R3 as Ld,O3 as Md,A3 as Nd,nk as Od,B3 as Pd,D3 as Qd,_3 as Rd,Xe as Sd,N3 as Td,ik as Ud,M3 as Vd,H3 as Wd,Or as Xd,W3 as Yd,dn as Zd,Bt as _d,G3 as $d,Gm as ae,pn as be,mn as ce,z3 as de,U3 as ee,q3 as fe,$3 as ge,j3 as he,K3 as ie,V3 as je,X3 as ke,Y3 as le,Z3 as me,Q3 as ne,xn as oe,In as pe,hn as qe,gn as re,J3 as se,It as te,e6 as ue,o6 as ve,t6 as we,r6 as xe,a6 as ye,n6 as ze,Xo as Ae,l6 as Be,s6 as Ce,ii as De,i6 as Ee,fi as Fe,f6 as Ge,c6 as He,ci as Ie,d6 as Je,Vm as Ke,Xm as Le,Ym as Me,u6 as Ne,$k as Oe,p6 as Pe,m6 as Qe,Ze as Re,lr as Se,GO as Te,Dg as Ue,mK as Ve,xK as We,IK as Xe,hK as Ye,gK as Ze,bK as _e,yK as $e,SK as af,CK as bf,vK as cf,wK as df,BI as ef,u7 as ff,Kn as gf,IP as hf,F7 as if,Vr as jf,R7 as kf,zI as lf,BX as mf,DX as nf,_X as of,NX as pf,UY as qf,qY as rf,jY as sf,B7 as tf,RV as uf,lb as vf,sb as wf,w_ as xf,uF as yf,pF as zf,_n as Af,nz as Bf,mF as Cf,nI as Df,xF as Ef,fz as Ff,iI as Gf,lf as Hf,sf as If,_I as Jf,NI as Kf,h7 as Lf,qI as Mf,fq as Nf,YI as Of,Gf as Pf,zf as Qf,PL as Rf,LL as Sf,Uf as Tf,AL as Uf,Qr as Vf,Qn as Wf,Mq as Xf,Vf as Yf,Kq as Zf,Vq as _f,Xq as $f,yh as ag,vR as bg,wR as cg,kR as dg,W9 as eg,G9 as fg,RR as gg,AR as hg,jh as ig,X9 as jg,Y9 as kg,Jh as lg,t$ as mg,ta as ng,tg as og,Jf as pg,rg as qg,ag as rg,s$ as sg,ng as tg,jR as ug,i$ as vg,f$ as wg,c$ as xg,d$ as yg,KR as zg,u$ as Ag,p$ as Bg,m$ as Cg,XR as Dg,x$ as Eg,QR as Fg,I$ as Gg,oc as Hg,G$ as Ig,J$ as Jg,ej as Kg,sl as Lg,go as Mg,db as Ng,ub as Og,DV as Pg,da as Qg,pb as Rg,mb as Sg,MV as Tg,HV as Ug,BA as Vg,Ab as Wg,Ec as Xg,Bb as Yg,oy as Zg,NY as _g,wl as $g,EB as ah,PB as bh,JY as ch,h_ as dh,S_ as eh,JB as fh,Ly as gh,eD as hh,xa as ih,AZ as jh,BZ as kh,KQ as lh};
|