efficient-storefront-blocks 0.65.0 → 0.66.2
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 +59 -0
- package/README.md +0 -1
- package/dist/chunks/EditorPreviewCheckout-HAUEGHGC.js +4 -0
- package/dist/chunks/{SiteEditorProvider-ZYGNRWSB.js → SiteEditorProvider-KOPR3UDU.js} +1 -1
- package/dist/chunks/{chunk-I7BIOONR.js → chunk-S66TL4Z3.js} +1 -1
- package/dist/chunks/{chunk-YAO6XQYA.js → chunk-TAGGXC3A.js} +1 -1
- package/dist/chunks/chunk-VEI75RPM.js +1 -0
- package/dist/chunks/{chunk-OU2WWXMT.js → chunk-Z7PJKX2P.js} +1 -1
- package/dist/chunks/{fitment-data-IKFCBT6E.js → fitment-data-UQDOQP66.js} +1 -1
- package/dist/consent.js +1 -1
- package/dist/editor/components/CollectionPicker.js +1 -1
- package/dist/editor/components/EditProductLink.js +1 -1
- package/dist/editor/components/FormPicker.js +1 -1
- package/dist/editor/components/GalleryProductBinding.d.ts +1 -1
- package/dist/editor/components/GalleryProductBinding.js +1 -1
- package/dist/editor/components/GalleryShowcaseSource.d.ts +1 -1
- package/dist/editor/components/GalleryShowcaseSource.js +1 -1
- package/dist/editor/components/HeaderSettingsPanel.js +1 -1
- package/dist/editor/components/MenuLinkRangeField.js +1 -1
- package/dist/editor/components/PerViewStepperField.js +1 -1
- package/dist/editor/lib/puck/blocks/service/ContactRouting/fields.js +1 -1
- package/dist/editor/lib/puck/config.d.ts +0 -4
- package/dist/editor/lib/puck/config.js +1 -1
- package/dist/editor/lib/storefront-editor-words.d.ts +2 -4
- package/dist/editor/lib/storefront-editor-words.js +1 -1
- package/dist/index.d.ts +0 -17
- package/dist/index.js +43 -43
- package/dist/render/app/globals.css +18 -4
- package/dist/render/built-with.json +1 -1
- package/dist/render/components/CartContext.d.ts +5 -0
- package/dist/render/components/CartContext.js +1 -1
- package/dist/render/components/ContactRouting.d.ts +11 -1
- package/dist/render/components/ContactRouting.js +1 -1
- package/dist/render/components/DetailRows.d.ts +2 -0
- package/dist/render/components/DetailRows.js +1 -1
- package/dist/render/components/Events.d.ts +11 -1
- package/dist/render/components/Events.js +1 -1
- package/dist/render/components/GalleryGrid.d.ts +4 -1
- package/dist/render/components/GalleryGrid.js +1 -1
- package/dist/render/components/GalleryItem.d.ts +1 -0
- package/dist/render/components/GalleryItem.js +1 -1
- package/dist/render/components/ProductGallery.js +1 -1
- package/dist/render/components/ProductGridSection.js +1 -1
- package/dist/render/components/checkout/CheckoutPageClient.js +3 -3
- package/dist/render/components/fitment/FitmentPickerGrid.js +1 -1
- package/dist/render/components/fitment/PickerField.js +1 -1
- package/dist/render/components/pdp-dynamic/DynamicDetailRows.js +1 -1
- package/dist/render/components/pdp-dynamic/DynamicGalleryGrid.d.ts +2 -0
- package/dist/render/components/pdp-dynamic/DynamicGalleryGrid.js +1 -1
- package/dist/render/components/pdp-dynamic/RecordPhotoGallery.d.ts +12 -0
- package/dist/render/components/pdp-dynamic/RecordPhotoGallery.js +1 -0
- package/dist/render/lib/api/types.d.ts +1 -0
- package/dist/render/lib/checkout/match-subdivision.d.ts +2 -0
- package/dist/render/lib/checkout/match-subdivision.js +1 -0
- package/dist/render/lib/consent/choice.d.ts +0 -2
- package/dist/render/lib/consent/choice.js +1 -1
- package/dist/render/lib/consent/rules.d.ts +0 -1
- package/dist/render/lib/consent/rules.js +1 -1
- package/dist/render/lib/content/source-values.d.ts +4 -0
- package/dist/render/lib/content/source-values.js +1 -0
- package/dist/render/lib/content/stock-words.d.ts +0 -4
- package/dist/render/lib/content/stock-words.js +1 -1
- package/dist/render/lib/puck/blocks/commerce/GalleryB/render.js +1 -1
- package/dist/render/lib/puck/blocks/commerce/GalleryItem/render.js +1 -1
- package/dist/render/lib/puck/blocks/service/Events/render.js +1 -1
- package/dist/render/lib/puck/blocks/text-part-shapes.json +6 -3
- package/dist/render/lib/puck/current-record.d.ts +1 -0
- package/dist/render/lib/puck/current-record.js +1 -1
- package/dist/render/lib/sections/fill-row.d.ts +8 -0
- package/dist/render/lib/sections/fill-row.js +1 -1
- package/dist/render/lib/sections/grid-no-hole.d.ts +12 -0
- package/dist/render/lib/sections/grid-no-hole.js +1 -0
- package/dist/render/lib/sections/own-padding.d.ts +3 -0
- package/dist/render/lib/sections/own-padding.js +1 -0
- package/dist/render/lib/wheels/catalog-filters-to-listing.d.ts +0 -1
- package/dist/render/lib/wheels/catalog-filters-to-listing.js +1 -1
- package/dist/render/lib/wheels/catalog-filters.d.ts +0 -1
- package/dist/render/lib/wheels/catalog-filters.js +1 -1
- package/dist/words.d.ts +3 -4
- package/dist/words.js +2 -2
- package/package.json +1 -1
- package/dist/chunks/EditorPreviewCheckout-4KZCYPQT.js +0 -4
- package/dist/chunks/chunk-GR7OHU32.js +0 -1
- /package/dist/chunks/{chunk-B44XQA2J.js → chunk-IHYVLVY3.js} +0 -0
- /package/dist/chunks/{chunk-YAO6XQYA.js.LEGAL.txt → chunk-TAGGXC3A.js.LEGAL.txt} +0 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{$ as Fs,A as Uo,Aa as yu,B as Ut,C as $t,Ca as Ya,Da as bu,E as au,Ea as Su,H as Lr,J as nu,Ja as Cu,K as Ts,L as lu,N as su,O as iu,Q as fu,R as Ps,T as cu,U as Ue,V as ft,W as du,X as ho,Y as Ka,_ as uu,a as Yd,c as Xd,ca as pu,d as Xe,da as Es,e as zt,f as Oo,fa as Os,g as ws,h as Jd,ja as mu,l as Or,n as vs,pa as ct,ra as xu,s as eu,t as ou,ta as Iu,u as ks,v as He,va as hu,w as tu,x as ru,y as Gt,z as Io,za as V}from"./chunk-I7BIOONR.js";import{d as Zd,e as Er,f as Qd,g as gu,j as Va,n as Ls}from"./chunk-B44XQA2J.js";var Xa=null,vu="en",ku=null;function GH(e,o,t){Xa=e??null,vu=o||"en",ku=t??null}function X(){return ku}function Rs(){return vu}function Tu(){return Xa}function wu(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=Xa?Xa[e]:void 0;if(typeof t=="function"){try{let r=t(o??{});if(typeof r=="string"&&r)return r}catch{}return wu(e,o)}return wu(typeof t=="string"&&t?t:e,o)}function $e(e,o,t,r){return l(t===1?e:o,{...r,n:t})}import{jsx as As,Fragment as bw,jsxs as Sw}from"react/jsx-runtime";import{createContext as Cw,useContext as ww}from"react";var vw={mirrorHostStyles:!0,css:null,fontHrefs:[]},Pu=Cw(vw);function jH({value:e,children:o}){return As(Pu.Provider,{value:e,children:o})}function Bs(){return ww(Pu)}function Fu(){let{css:e,fontHrefs:o}=Bs();return Sw(bw,{children:[o.map(t=>As("link",{rel:"stylesheet",href:t},t)),e?As("style",{"data-sf-canvas-css":"",children:e}):null]})}import{jsx as kw}from"react/jsx-runtime";import{createContext as Tw,useContext as Pw}from"react";var Eu=Tw(void 0);function XH({metadata:e,children:o}){return kw(Eu.Provider,{value:e,children:o})}var Ou=()=>Pw(Eu);import{jsx as me,Fragment as nw,jsxs as Ua}from"react/jsx-runtime";import{useCallback as $a,useEffect as Ke,useRef as pH,useState as mH}from"react";import{Button as xH,Tooltip as IH}from"efficient-shell/ui";import{SettingsSwitch as hH}from"efficient-easel/panel";import{PagesIcon as gH,StylesIcon as yH}from"efficient-easel/rail";import{PaletteIcon as bH}from"efficient-shell/icons/efficient";import{TemplateIcon as SH}from"efficient-easel/icons";import{Subtree as CH,TreeRow as lw}from"efficient-easel/tree";import{useEasel as sw}from"efficient-easel/easel";import{useEaselStrings as iw}from"efficient-easel/strings";import{createContext as Fw,useContext as Ew}from"react";var Ds=Fw(!1),JH=()=>Ew(Ds);import{jsx as ee,Fragment as Yh,jsxs as na}from"react/jsx-runtime";import{Fragment as KL,useEffect as VL,useId as YL,useMemo as Xh,useRef as XL,useState as at}from"react";import{useScreenDocument as ZL}from"efficient-easel/screen/components/ScreenDocumentContext";import{UiIcon as kl}from"efficient-easel/draw/client";import QL from"efficient-easel/screen/components/SidePanelHead";import{jsx as Q,jsxs as rt,Fragment as Et}from"react/jsx-runtime";import{useEasel as Bh}from"efficient-easel/easel";import{useState as jf}from"react";import{jsx as tr,jsxs as TI,Fragment as M1}from"react/jsx-runtime";import{useState as PI}from"react";import{SettingsDefaultReset as H1,SettingsField as W1}from"efficient-easel/panel";import{useEaselStrings as z1}from"efficient-easel/strings";import{AddIcon as G1}from"efficient-easel/icons";import{jsx as h,jsxs as Do,Fragment as oo}from"react/jsx-runtime";import{cloneElement as zx,useId as LP,useRef as Ji,useState as jr}from"react";import{useEasel as Kr,useSelectedFields as of}from"efficient-easel/easel";import{readHidable as Jo,hidableText as RP}from"efficient-easel/draw";import{FOLD_FIELD_MARKER as tf,LINK_FIELD_MARKER as AP,MEDIA_FIELD_MARKER as BP,SCAFFOLD_FIELD_MARKER as DP,TEXT_FIELD_MARKER as _o,foldMetaOf as No,textFieldIdentifier as FG}from"efficient-easel/draw";import{jsx as Nu}from"react/jsx-runtime";import{useCallback as Bw,useEffect as Dw,useRef as _w,useState as Nw}from"react";import{useEasel as Mw}from"efficient-easel/easel";import{SettingsAction as Hw}from"efficient-easel/panel";function _s(e){return typeof e=="number"&&Number.isFinite(e)}function t5(e,o){if(!_s(e))return;let t=Ka(ho(e));if(Object.keys(t).length===0)return;let r=t[Za];if(typeof r!="string")return t;let a=Rr(o)?Ar(r,Lo(o)??[]):r;return{...t,[Ow]:a}}var Ow="--sf-section-radius",Za="--sf-card-radius",dt=["tl","tr","br","bl"];function Lo(e){if(!Array.isArray(e))return null;let o=e.filter(t=>dt.includes(t));return dt.filter(t=>o.includes(t))}function Rr(e){let o=Lo(e);return o!==null&&o.length<dt.length}function Ar(e,o){return dt.map(t=>o.includes(t)?e:"0").join(" ")}var Lu=[{value:"tl",label:"Top left"},{value:"tr",label:"Top right"},{value:"bl",label:"Bottom left"},{value:"br",label:"Bottom right"}];var Lw="--sf-card-box-radius",Rw="--sf-site-card-radius",l5="sf-section-bleeds";function Ns(e){return typeof e=="number"&&Number.isFinite(e)}function s5(e,o){if(!Ns(e))return;let t=Ka(ho(e))[Za];if(typeof t!="string")return;let r=Rr(o)?Ar(t,Lo(o)??[]):t;return{[Lw]:r}}function i5(e){let o=e[Za];return typeof o=="string"?{[Rw]:o}:{}}function Ru(e,o){let t=e.find(n=>n?.props?.id===o);if(!t)return[...e];let r=t.props?.cardCorners,a=t.props?.cardCornerSides;return e.map(n=>n?.props?.id===o?n:{...n,props:{...n.props,cardCorners:r,cardCornerSides:a}})}import{locateNode as Aw}from"efficient-easel/draw";function Br(e){if(!e)return null;let o=e.lastIndexOf(":");return o>0?{ownerId:e.slice(0,o),slot:e.slice(o+1)}:null}function Qa(e,o,t){let r=Br(t?.zone),a=r?Aw(e,o,r.ownerId):null;return a&&r?{...a,slot:r.slot}:null}function Au(e,o,t){let r=Qa(e,o,t),a=r?.slot??"",n=r&&Array.isArray(r.item.props[a])?r.item.props[a]:[],s=t?.index??-1,i=s>=0?n[s]:void 0,f=i?.props?.id?String(i.props.id):"",d=Math.max(n.length-1,0);return!r||!f?{can:!1,reason:"unreachable",others:0}:n.length<=1?{can:!1,reason:"alone",others:d}:Ns(i?.props?.cardCorners)?{can:!0,others:d,zone:r.zone,index:r.index,data:{...r.item,props:{...r.item.props,[a]:Ru(n,f)}}}:{can:!1,reason:"unset",others:d}}function Bu(e){return e.can?$e("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 Du(e){return $e("Applied to {n} card","Applied to {n} cards",e)}function _u(e,o){e.can&&o(e.zone,e.index,e.data)}import{useSectionOps as Ww}from"efficient-easel/screen/lib/puck/use-section-ops";var zw=2200,Gw="apply-corners-to-siblings",Uw="Apply to all cards";function $w({plan:e,doneCount:o,onPress:t}){return Nu(Hw,{id:Gw,label:l(Uw),note:Bu(e),disabled:!e.can,done:o!==null,doneLabel:Du(o??0),onPress:t})}function Mu(){let{appState:e,config:o}=Mw(f=>f),t=Ww(),[r,a]=Nw(null),n=_w(null);Dw(()=>()=>{n.current&&clearTimeout(n.current)},[]);let s=Au(o,e.data.content??[],e.ui.itemSelector),i=Bw(()=>{_u(s,t.replaceComponent),s.can&&(a(s.others),n.current&&clearTimeout(n.current),n.current=setTimeout(()=>a(null),zw))},[s,t]);return Nu($w,{plan:s,doneCount:r,onPress:i})}var Hu=1;function qw(e){return ho(e)}function k5(e){let o=qw(e);return o===null?{}:{"--sf-card-image-radius":`${o}px`}}var Wu=1,zu="Corners";function jw(e){return ho(e)}function E5(e,o){let t=jw(e);if(t===null)return null;let r=`${t}px`;return{borderRadius:Rr(o)?Ar(r,Lo(o)??[]):r}}var Ro={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]]}},Ms=Object.keys(Ro),Uu=[2,3,4,6];function $u(e){return typeof e!="string"||e===""?null:Ro[e]??null}function Gu(e,o){return o?6/e.acrossPhone:12/e.across}var Kw="sf-wall--";function Vw(e){return`${Kw}${e}`}function L5(e){let o=Ro[e],t=`.${Vw(e)}`,r=[],a=(n,s)=>{let i=[],f=n.length;n.forEach(([d,p],m)=>{i.push(`${t} > :nth-child(${f}n+${m+1}){grid-column:span ${d};grid-row:span ${p}}`)});for(let d=1;d<f;d+=1)i.push(`${t}:has(> :nth-child(${f}n+${d}):last-child) > :nth-last-child(-n+${d}){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,Gu(o,!1))),r.push("@media (max-width:800px){"),r.push(`${t}{grid-template-columns:repeat(6,minmax(0,1fr))}`),r.push(...a(o.phone,Gu(o,!0))),r.push("}"),r.join("")}var Ja=12,qu=1,Yw=3;var Xw=3;function Hs(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 Zw(e){return Hs(e,1,Ja)??Xw}function B5(e,o){return Hs(e,qu,Yw)??(Zw(o)===4?2:qu)}function D5(e){return e==null||e===""?null:Hs(e,1,Ja)}var _5="data-sf-span";function N5(e){if(!e)return!1;if(e.type==="Grid")return!0;if(e.type==="GalleryB"){if($u(e.props?.layout))return!1;let o=e.props?.columns;return o!=null&&o!==""}return!1}var $o=["top-left","top-center","top-right","left","center","right","bottom-left","bottom-center","bottom-right"],en="bottom-left";var Ws={"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 Qw(e){let o=$o.indexOf(ut(e));return{band:Math.floor(o/3),column:["start","center","end"][o%3]}}function Jw(e){return 1+Qw(e).band*6}function H5(e){return Jw(e)+1}function ut(e){return $o.includes(e)?e:en}function W5(e){let o=typeof e=="number"&&Number.isFinite(e)?e:0;return Math.max(-40,Math.min(40,Math.round(o)))}function z5(e,o=60){let t=typeof e=="number"&&Number.isFinite(e)?e:o;return Math.max(30,Math.min(100,Math.round(t)))}function zs(e,o){let t=ut(o);return e.filter(r=>ut(r?.props?.placement)===t).length}function ju(e){return`${Ws[ut(e)]} already holds 4 boxes. Move one somewhere else first.`}function Gs(e,o){let t=e.filter(r=>r?.props?.id!==o);return $o.map(r=>{let a=zs(t,r)>=4,n=Ws[r];return a?{value:r,label:n,disabled:!0,title:ju(r)}:{value:r,label:n}})}function on(e,o){let t=o===void 0?en:ut(o?.props?.placement);return zs(e,t)>=4?ju(t):null}var tn="HeroGroup";function ev(e){return $o.map(o=>{let t=zs(e,o);return{anchor:o,total:t,hidden:t-4}}).filter(o=>o.hidden>0)}function Us(e){let o=ev(e);return o.length===0?null:o.map(({anchor:t,total:r,hidden:a})=>{let n=Ws[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 Ku(e,o){let t=o;if(t?.type!==tn)return null;let r=t.props?.id===void 0?"":String(t.props.id);return r?on($s(e,r),t):null}function $s(e,o){let t=Yu(e,o);return t&&t.ownerType===tv?t.siblings:[]}function Vu(e,o){let t=Yu(e,o);return t?t.ancestorTypes.filter(r=>r===tn).length:ov}var ov=1,tv="HeroSlide";function Yu(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 f=i.type,d=r(i,n+1,[...s,String(f)]);if(d)return d}return null}for(let i of Object.values(a)){let f=r(i,n+1,s);if(f)return f}return null};return r(e,0,[])}import{jsx as rv}from"react/jsx-runtime";var av="sf-hint-keep";function Xu({children:e}){return rv("span",{className:av,children:e})}import{jsx as qo,Fragment as lv,jsxs as ap}from"react/jsx-runtime";import{useContext as sv,useEffect as iv,useId as fv,useState as np}from"react";import{SettingsField as cv,SettingsSwitch as dv}from"efficient-easel/panel";import{AnchorIcon as uv}from"efficient-easel/icons";import{ScreenDocumentContext as pv}from"efficient-easel/screen/components/ScreenDocumentContext";import{Snippet as mv}from"efficient-shell/ui";var rn="homepage";function pt(e){return(e??"").toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/^-+|-+$/g,"")}var Zu=[{value:"page",label:"Page"},{value:"anchor",label:"Anchor"},{value:"blog",label:"Blog post",needs:"service"},{value:"product",label:"Product",needs:"commerce"},{value:"popup",label:"Popup"},{value:"custom",label:"Custom URL"}];function Qu(e){return e.offersCommerce&&e.offersService?Zu:Zu.filter(o=>!o.needs||(o.needs==="commerce"?e.offersCommerce:e.offersService))}var qs="#popup:";function Ju(e){return`${qs}${e}`}function ep(e){return e.startsWith(qs)&&e.slice(qs.length).trim()||null}function Dr(e){return e===rn?"/":`/${e}`}function op(e){return`/journal/${e}`}function Y5(e){return`/wheels/${e}`}function an(e,o){return`${Dr(e)}#${o}`}function js(e){return pt(e)}function nv(e){return typeof e=="string"?e.trim():e&&typeof e=="object"&&typeof e.text=="string"?e.text.trim():""}function tp(...e){let o=new Set,t=[];for(let r of e)for(let a of r?.content??[]){let n=nv(a?.props?.anchor);if(!n)continue;let s=js(n);!s||o.has(s)||(o.add(s),t.push({slug:s,name:n}))}return t}function X5(e){let o=e.indexOf("#"),t=o===-1?e:e.slice(0,o),r=t.indexOf("?");return r===-1?t:t.slice(0,r)}function rp(e){return/^\/wheels\/[^/?#]+(?:[?#].*)?$/.test(e)}import{readHidable as xv}from"efficient-easel/draw";function lp({value:e,onChange:o,nameBox:t}){let r=xv(e).text,[a,n]=np(!1),s=a||r.trim()!=="",i=fv();return ap(lv,{children:[qo(cv,{label:l("Add an anchor"),labelId:i,icon:qo(uv,{}),action:qo(dv,{checked:s,ariaLabelledBy:i,onChange:f=>{n(f),!f&&r!==""&&o("")}})}),s&&t(e,o),s&&qo(Iv,{name:r})]})}function Iv({name:e}){let o=sv(pv),t=o?.templateId?"":o?.currentSlug??"",[r,a]=np("");iv(()=>a(Va()||window.location.origin),[]);let n=js(e);if(!n||!t)return null;let s=`${r}${an(t,n)}`,i=s.replace(/^https?:\/\//,""),f=i.lastIndexOf("#");return qo("div",{className:"sf-anchor-link",children:qo(mv,{value:s,label:l("link"),size:"sm",children:ap("span",{className:"sf-anchor-link-text",children:[qo("span",{className:"sf-anchor-link-path",children:i.slice(0,f)}),qo("span",{className:"sf-anchor-link-hash",children:i.slice(f)})]})})})}import{AdjustIcon as _P,AlignLeftIcon as NP,EyeIcon as MP,AlignSeparateIcon as HP,AnimationIcon as Gx,BackgroundIcon as WP,BorderAllIcon as zP,BlockSectionIcon as GP,CartIcon as UP,ColumnWidthsIcon as Ux,ColumnsIcon as $P,CornerIcon as qP,DirectionDownIcon as jP,DirectionLeftIcon as KP,DirectionRightIcon as VP,DirectionUpIcon as YP,DollarIcon as XP,FinishIcon as ZP,GapIcon as $x,GridIcon as QP,GroundIcon as JP,HashIcon as qx,HeightIcon as eF,ImageIcon as oF,ListIcon as tF,LocationIcon as Zi,NudgeIcon as rF,PaddingAllIcon as aF,PaddingBottomIcon as jx,PaddingLeftIcon as Kx,PaddingRightIcon as Vx,PaddingTopIcon as Yx,PageIcon as Xx,PhoneIcon as nF,PlacementIcon as lF,ProductSizeIcon as sF,StickyIcon as iF,RotateIcon as fF,SquareIcon as cF,TypeIcon as dF,WidthIcon as uF,WrapIcon as pF}from"efficient-easel/icons";import{jsx as J,Fragment as go,jsxs as yo}from"react/jsx-runtime";import{TitleIcon as hv,ButtonIcon as gv,DollarIcon as yv,HashIcon as bv,LinkIcon as Sv,NoteIcon as Cv,TagIcon as wv,TextLinesIcon as vv}from"efficient-easel/icons";var sp={body:vv,button:gv,link:Sv,label:wv,number:bv,price:yv,note:Cv,title:hv},ip={eyebrow:yo(go,{children:[J("path",{d:"M5 6.5h5"}),J("path",{d:"M5 12.5h14"}),J("path",{d:"M5 18h11"})]}),heading:yo(go,{children:[J("path",{d:"M6.5 5v14"}),J("path",{d:"M17.5 5v14"}),J("path",{d:"M6.5 12h11"})]}),intro:yo(go,{children:[J("path",{d:"M4 5.5v13"}),J("path",{d:"M8 7.5h12"}),J("path",{d:"M8 12h12"}),J("path",{d:"M8 16.5h8"})]}),value:yo(go,{children:[J("rect",{x:"2.5",y:"7",width:"19",height:"10",rx:"2"}),J("path",{d:"M6.5 12h7"})]}),name:yo(go,{children:[J("path",{d:"M6 3.5v17"}),J("path",{d:"M6 5h11.5l-2.6 3.6L17.5 12H6z"})]}),date:yo(go,{children:[J("rect",{x:"4",y:"5.5",width:"16",height:"15",rx:"2"}),J("path",{d:"M4 10.5h16"}),J("path",{d:"M9 3.2v4.4"}),J("path",{d:"M15 3.2v4.4"})]}),caption:yo(go,{children:[J("rect",{x:"3.5",y:"4.5",width:"17",height:"11",rx:"2"}),J("path",{d:"M3.5 12.8l4.2-3.2 3.6 2.8 3.4-2.4 5.8 4"}),J("path",{d:"M6.5 19.5h11"})]}),quote:yo(go,{children:[J("path",{d:"M9.5 5.5C7 7.2 5.5 9.7 5.5 12.8h4v5.7h-5v-5.7"}),J("path",{d:"M19.5 5.5c-2.5 1.7-4 4.2-4 7.3h4v5.7h-5v-5.7"})]}),tag:yo(go,{children:[J("rect",{x:"3",y:"5.5",width:"18",height:"13",rx:"2.5"}),J("path",{d:"M8 9.5h8"}),J("path",{d:"M12 9.5v5"})]}),meta:yo(go,{children:[J("path",{d:"M4 7h16"}),J("path",{d:"M4 14h3.5"}),J("path",{d:"M10.5 14h3"}),J("path",{d:"M17 14h3"})]})};function Ks({noun:e,size:o=14,strokeWidth:t=1.8,className:r,style:a}){let n=sp[e];return n?J("span",{className:r,style:{display:"inline-flex",...a},"aria-hidden":"true",children:J(n,{size:o})}):J("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:ip[e]})}var d3=Object.keys(sp);var u3=Object.keys(ip);var kv="#ffffff",Tv=/^#[0-9a-fA-F]{6}$/;function Vs(e){return Pv(e)?e:kv}function Pv(e){return typeof e=="string"&&Tv.test(e)}function m3(e){return{"--bg":Vs(e)}}var Ys=[{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}],Fv=Ys.filter(e=>e.ink);function Ev(e){let o={color:e.fg};for(let{role:t,token:r}of Fv)o[r]=e[t];return o}var Ov={fg:"var(--overlay-fg)",line:"color-mix(in srgb, var(--overlay-fg) 24%, transparent)",muted:"color-mix(in srgb, var(--overlay-fg) 76%, transparent)"},fp=Object.freeze(Ev(Ov));var nn=-1,Lv="sf-section-accent",cp="Color",dp=new Set(["CategoryBar","DocTabs"]),g3=new Set(["Flex"]),Rv=0;function Xs(e){return e===nn?null:typeof e=="number"&&Number.isInteger(e)&&e>=0?e:Rv}function y3(e){return e??nn}function Av(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 Ys)t[`--sf-sec-${r}`]=`var(${o}-${r}, var(--theme-${r}))`;return t}function b3(e){let o=Xs(e.sectionAccent);return o===null?null:{className:Lv,style:Av(o)}}var Bv=["fade","rise","scale"],Zs="none",up=[{label:"None",value:Zs},{label:"Fade",value:"fade"},{label:"Rise",value:"rise"},{label:"Scale",value:"scale"}];function w3(e){return Bv.includes(e)?e:null}var pp="data-sf-anim",_r="data-sf-anim-state";function v3(e){let o=()=>{};if(typeof IntersectionObserver>"u"||!e.getAttribute(pp))return o;let t=window.innerHeight||document.documentElement.clientHeight;if(e.getBoundingClientRect().top<t)return o;e.setAttribute(_r,"armed");let r=new IntersectionObserver(a=>{for(let n of a)if(n.isIntersecting){r.disconnect(),Dv(e);break}},{threshold:0});return r.observe(e),()=>{r.disconnect(),e.removeAttribute(_r)}}function Dv(e){if(!e.getAttribute(pp))return;e.removeAttribute(_r),e.offsetWidth,e.setAttribute(_r,"play");let o=t=>{t.target===e&&(e.removeAttribute(_r),e.removeEventListener("animationend",o))};e.addEventListener("animationend",o)}var k3=dp;function Js(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(Qs(r,o,0))return a??{}}return null}function Qs(e,o,t){if(t>12||!e||typeof e!="object")return!1;if(Array.isArray(e))return e.some(a=>Qs(a,o,t+1));let r=e.props;return r&&typeof r=="object"&&r.id===o?!0:Object.values(e).some(a=>Qs(a,o,t+1))}import{SettingsDefaultReset as Ee,SettingsField as re,SettingsGroup as mF,SettingsGroupSub as xF,SettingsBorder as IF,SettingsSegmented as hF,SettingsSides as gF,SettingsSidesEach as Zx,sidesStartEach as yF,SettingsSwitch as Qx,borderSides as bF,borderStartEach as SF}from"efficient-easel/panel";import{FieldSelect as CF,ListField as wF}from"efficient-easel/fields";import{DisplayChips as vF}from"efficient-shell/ui";function qt(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 ln(e,o){return qt(e)[o]!==!1}function ei(e,o,t){let r=qt(o)[t];return typeof r=="boolean"?r:ln(e,t)}function mp(e){return Object.values(qt(e)).some(o=>o===!1)}function xp(e){return Object.keys(qt(e)).length>0}function Ip(e,o,t){let r={...qt(e)};return t?delete r[o]:r[o]=!1,Object.keys(r).length?r:void 0}function hp(e,o,t){return{...qt(e),[o]:t}}function F3(e,o,t){let r=ln(e,t),a=ei(e,o,t);return r&&a?"":!r&&!a?"hidden":r?"max-[720px]:hidden":"min-[720px]:hidden"}import{AlignmentGrid as kF,Checkbox as VG,CornersInput as TF,DateTimePicker as PF,FOCAL_DEFAULT as YG,PictureTiles as Jx,PositionInput as FF,Slider as EF,Tooltip as eI}from"efficient-shell/ui";import{jsx as mt,jsxs as yp}from"react/jsx-runtime";import{ColorPicker as Nv,HexInput as Mv}from"efficient-shell/ui";import{SettingsDefaultReset as Hv,SettingsField as Wv}from"efficient-easel/panel";import{typedHex as oi}from"efficient-easel/pick";import{typedHex as _v}from"efficient-easel/pick";function gp(e){let o=new Set,t=[];return He(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 f=i?_v(i):null;!f||o.has(f)||(o.add(f),t.push({name:s,value:f}))}}),t}function zv({value:e,onChange:o,label:t,id:r,caption:a,inherited:n,ariaLabel:s}){return mt(Uv,{value:e,onChange:o,label:l(s??t),id:r,caption:a,inherited:n})}function Gv(){let{theme:e}=V();return gp(e).map(o=>({value:o.value,label:o.name}))}function Uv({value:e,onChange:o,label:t,id:r,caption:a,inherited:n}){let s=Gv(),i=e?null:oi(n??""),f=a!==void 0&&(!e||oi(a)!==oi(e))?a:null,d=p=>{p!==e&&o(p)};return yp("div",{className:"sf-colour",children:[mt(Nv,{id:r,value:e,onChange:d,label:t,presets:s,fallback:i??void 0,size:"md",align:"start"}),f!==null?mt("span",{className:"sf-colour-caption",children:f}):mt("span",{className:"sf-colour-hexwrap",children:mt(Mv,{value:e||i||"",onChange:d,label:l("{label} hex code",{label:t}),placeholder:e||i?void 0:l("Not set"),className:i?"sf-colour-hex is-inherited":"sf-colour-hex",size:"md"})})]})}function qe({label:e,icon:o,changed:t,hint:r,onReset:a,resetTo:n,children:s,...i}){return yp(Wv,{label:e,icon:o,htmlFor:i.id,changed:t,hint:r,action:a?mt(Hv,{words:X()?.panel,label:e,changed:!!t,detail:n,onReset:a}):void 0,children:[zv({...i,label:e}),s]})}function sn({label:e,icon:o,value:t,inherited:r,resetTo:a,onChange:n,onReset:s,hint:i}){let f=!!t;return mt(qe,{label:e,icon:o,value:t,inherited:f?void 0:r,onChange:n,changed:f,onReset:s,resetTo:a,hint:i})}import{jsx as Nr}from"react/jsx-runtime";import{useEffect as pk,useState as mk}from"react";import{markSelection as xk,useCaretEdit as Ik}from"efficient-easel/copy";import{RevertIcon as hk}from"efficient-easel/icons";import{IconButton as gk,TextToolbar as yk,Tooltip as bk}from"efficient-shell/ui";import{applyMark as Y3,markupTools as X3,MARKUP_TOOLS as Z3,COPY_FIELD_TOOLS as Q3,STOREFRONT_MARKUP as J3,tokenizeInline as e4,stripInline as o4,isSafeLinkHref as t4}from"efficient-shell/markup";import{applyMark as ok,markedAt as tk,markupTools as rk,MARKUP_TOOLS as ak,parseMarkup as nk,RETIRED_MARKS as lk,STOREFRONT_MARKUP as sk,tokenizeInline as a4}from"efficient-shell/markup";var xt=["highlight","strong","quiet"],It={highlight:"Highlight",strong:"Bold",quiet:"Quiet"},bo={highlight:{kind:"wordHighlight",delimiter:"@@"},strong:{kind:"wordStrong",delimiter:"++"},quiet:{kind:"wordQuiet",delimiter:"^^"}},U3=Object.fromEntries(xt.map(e=>[bo[e].kind,e])),$3="data-sf-ws",fn=["accent","text","labels"],wp={accent:"Accent",text:"Text",labels:"Labels"},jt={accent:"var(--accent)",text:"var(--fg)",labels:"var(--fg-dim)"},$v=80,qv=120,jv=100,Kv=900,Vv=.5,Yv=3,Xv=-.1,Zv=.5,Qv=3,ti={font:null,size:null,weight:null,bold:null,italic:null,lineGap:null,textGap:null,colour:null},Jv={highlight:{...ti},strong:{...ti},quiet:{...ti}};function bp(e,o,t){return typeof e!="number"||!Number.isFinite(e)?null:Math.round(Math.min(Math.max(e,o),t))}function Sp(e,o,t){if(typeof e!="number"||!Number.isFinite(e))return null;let r=10**Qv;return Math.round(Math.min(Math.max(e,o),t)*r)/r}function Cp(e){return typeof e=="boolean"?e:null}function ek(e){let o=typeof e?.font=="string"&&Xe.some(r=>r.key===e.font)?e.font:null,t=typeof e?.colour=="string"&&fn.includes(e.colour)?e.colour:null;return{font:o,size:bp(e?.size,$v,qv),weight:bp(e?.weight,jv,Kv),bold:Cp(e?.bold),italic:Cp(e?.italic),lineGap:Sp(e?.lineGap,Vv,Yv),textGap:Sp(e?.textGap,Xv,Zv),colour:t}}function vp(e){let o={};for(let t of xt)o[t]=e&&t in e&&e[t]?ek(e[t]):{...Jv[t]};return o}function q3(e){let o=vp(e),t={};for(let r of xt){let a=o[r],n=`--sf-ws-${r}`;if(a.font){let s=Xe.find(i=>i.key===a.font);s&&(t[`${n}-font`]=`var(${s.cssVar})`)}a.size!==null&&(t[`${n}-size`]=`${a.size/100}em`),a.weight!==null&&(t[`${n}-weight`]=String(a.weight)),a.bold!==null&&(t[`${n}-weight-bold`]=a.bold?"700":"400"),a.italic!==null&&(t[`${n}-style`]=a.italic?"italic":"normal"),a.lineGap!==null&&(t[`${n}-line`]=String(a.lineGap)),a.textGap!==null&&(t[`${n}-track`]=`${a.textGap}em`),a.colour!==null&&(t[`${n}-color`]=jt[a.colour])}return t}function j3(e){let o=e?.word_styles??void 0,t={};for(let r of xt)o&&r in o&&(t[r]=o[r]??null);return vp(t)}var ik=new Set(["strong"]),kp=xt.map(e=>({open:bo[e].delimiter,close:bo[e].delimiter,kind:bo[e].kind,...ik.has(e)?{wordStart:!0}:{}})),l4=[{style:bo.highlight.kind,label:It.highlight,title:`${It.highlight} word style`},{style:bo.strong.kind,label:It.strong,title:`${It.strong} word style`},{style:bo.quiet.kind,label:It.quiet,title:`${It.quiet} word style`}],fk=new Set(kp.map(e=>e.open)),Kt=[...sk.filter(e=>!fk.has(e.open)),...kp];function ck(e){return e.bullet?"- ":e.number!=null?`${e.number}. `:""}function dk(e){return nk(typeof e=="string"?e:"",Kt)}var uk=ak.map(e=>e.style).filter(e=>!lk.includes(e)).filter(e=>Kt.some(o=>o.kind===e));function Tp(){return rk(uk)}var Pp=Object.fromEntries(xt.map(e=>[bo[e].kind,bo[e].delimiter]));function Fp(e,o,t,r){let a=Pp[r];if(!a)return ok(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 f=n||"styled text";return{text:e.slice(0,o)+a+f+a+e.slice(t),selectionStart:o+a.length,selectionEnd:o+a.length+f.length}}function Ep(e,o,t,r){let a=Pp[r];return a?o>=a.length&&e.slice(o-a.length,o)===a&&e.slice(t,t+a.length)===a:tk(e,o,t,r)}function ht(e){return dk(e).map(o=>ck(o)+Op(o.children)).join(`
|
|
1
|
+
import{$ as Fs,A as Uo,Aa as yu,B as Ut,C as $t,Ca as Ya,Da as bu,E as au,Ea as Su,H as Lr,J as nu,Ja as Cu,K as Ts,L as lu,N as su,O as iu,Q as fu,R as Ps,T as cu,U as Ue,V as ft,W as du,X as ho,Y as Ka,_ as uu,a as Yd,c as Xd,ca as pu,d as Xe,da as Es,e as zt,f as Oo,fa as Os,g as ws,h as Jd,ja as mu,l as Or,n as vs,pa as ct,ra as xu,s as eu,t as ou,ta as Iu,u as ks,v as He,va as hu,w as tu,x as ru,y as Gt,z as Io,za as V}from"./chunk-S66TL4Z3.js";import{d as Zd,e as Er,f as Qd,g as gu,j as Va,n as Ls}from"./chunk-IHYVLVY3.js";var Xa=null,vu="en",ku=null;function GH(e,o,t){Xa=e??null,vu=o||"en",ku=t??null}function X(){return ku}function Rs(){return vu}function Tu(){return Xa}function wu(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=Xa?Xa[e]:void 0;if(typeof t=="function"){try{let r=t(o??{});if(typeof r=="string"&&r)return r}catch{}return wu(e,o)}return wu(typeof t=="string"&&t?t:e,o)}function $e(e,o,t,r){return l(t===1?e:o,{...r,n:t})}import{jsx as As,Fragment as bw,jsxs as Sw}from"react/jsx-runtime";import{createContext as Cw,useContext as ww}from"react";var vw={mirrorHostStyles:!0,css:null,fontHrefs:[]},Pu=Cw(vw);function jH({value:e,children:o}){return As(Pu.Provider,{value:e,children:o})}function Bs(){return ww(Pu)}function Fu(){let{css:e,fontHrefs:o}=Bs();return Sw(bw,{children:[o.map(t=>As("link",{rel:"stylesheet",href:t},t)),e?As("style",{"data-sf-canvas-css":"",children:e}):null]})}import{jsx as kw}from"react/jsx-runtime";import{createContext as Tw,useContext as Pw}from"react";var Eu=Tw(void 0);function XH({metadata:e,children:o}){return kw(Eu.Provider,{value:e,children:o})}var Ou=()=>Pw(Eu);import{jsx as me,Fragment as nw,jsxs as Ua}from"react/jsx-runtime";import{useCallback as $a,useEffect as Ke,useRef as pH,useState as mH}from"react";import{Button as xH,Tooltip as IH}from"efficient-shell/ui";import{SettingsSwitch as hH}from"efficient-easel/panel";import{PagesIcon as gH,StylesIcon as yH}from"efficient-easel/rail";import{PaletteIcon as bH}from"efficient-shell/icons/efficient";import{TemplateIcon as SH}from"efficient-easel/icons";import{Subtree as CH,TreeRow as lw}from"efficient-easel/tree";import{useEasel as sw}from"efficient-easel/easel";import{useEaselStrings as iw}from"efficient-easel/strings";import{createContext as Fw,useContext as Ew}from"react";var Ds=Fw(!1),JH=()=>Ew(Ds);import{jsx as ee,Fragment as Yh,jsxs as na}from"react/jsx-runtime";import{Fragment as KL,useEffect as VL,useId as YL,useMemo as Xh,useRef as XL,useState as at}from"react";import{useScreenDocument as ZL}from"efficient-easel/screen/components/ScreenDocumentContext";import{UiIcon as kl}from"efficient-easel/draw/client";import QL from"efficient-easel/screen/components/SidePanelHead";import{jsx as Q,jsxs as rt,Fragment as Et}from"react/jsx-runtime";import{useEasel as Bh}from"efficient-easel/easel";import{useState as jf}from"react";import{jsx as tr,jsxs as TI,Fragment as M1}from"react/jsx-runtime";import{useState as PI}from"react";import{SettingsDefaultReset as H1,SettingsField as W1}from"efficient-easel/panel";import{useEaselStrings as z1}from"efficient-easel/strings";import{AddIcon as G1}from"efficient-easel/icons";import{jsx as h,jsxs as Do,Fragment as oo}from"react/jsx-runtime";import{cloneElement as zx,useId as LP,useRef as Ji,useState as jr}from"react";import{useEasel as Kr,useSelectedFields as of}from"efficient-easel/easel";import{readHidable as Jo,hidableText as RP}from"efficient-easel/draw";import{FOLD_FIELD_MARKER as tf,LINK_FIELD_MARKER as AP,MEDIA_FIELD_MARKER as BP,SCAFFOLD_FIELD_MARKER as DP,TEXT_FIELD_MARKER as _o,foldMetaOf as No,textFieldIdentifier as FG}from"efficient-easel/draw";import{jsx as Nu}from"react/jsx-runtime";import{useCallback as Bw,useEffect as Dw,useRef as _w,useState as Nw}from"react";import{useEasel as Mw}from"efficient-easel/easel";import{SettingsAction as Hw}from"efficient-easel/panel";function _s(e){return typeof e=="number"&&Number.isFinite(e)}function t5(e,o){if(!_s(e))return;let t=Ka(ho(e));if(Object.keys(t).length===0)return;let r=t[Za];if(typeof r!="string")return t;let a=Rr(o)?Ar(r,Lo(o)??[]):r;return{...t,[Ow]:a}}var Ow="--sf-section-radius",Za="--sf-card-radius",dt=["tl","tr","br","bl"];function Lo(e){if(!Array.isArray(e))return null;let o=e.filter(t=>dt.includes(t));return dt.filter(t=>o.includes(t))}function Rr(e){let o=Lo(e);return o!==null&&o.length<dt.length}function Ar(e,o){return dt.map(t=>o.includes(t)?e:"0").join(" ")}var Lu=[{value:"tl",label:"Top left"},{value:"tr",label:"Top right"},{value:"bl",label:"Bottom left"},{value:"br",label:"Bottom right"}];var Lw="--sf-card-box-radius",Rw="--sf-site-card-radius",l5="sf-section-bleeds";function Ns(e){return typeof e=="number"&&Number.isFinite(e)}function s5(e,o){if(!Ns(e))return;let t=Ka(ho(e))[Za];if(typeof t!="string")return;let r=Rr(o)?Ar(t,Lo(o)??[]):t;return{[Lw]:r}}function i5(e){let o=e[Za];return typeof o=="string"?{[Rw]:o}:{}}function Ru(e,o){let t=e.find(n=>n?.props?.id===o);if(!t)return[...e];let r=t.props?.cardCorners,a=t.props?.cardCornerSides;return e.map(n=>n?.props?.id===o?n:{...n,props:{...n.props,cardCorners:r,cardCornerSides:a}})}import{locateNode as Aw}from"efficient-easel/draw";function Br(e){if(!e)return null;let o=e.lastIndexOf(":");return o>0?{ownerId:e.slice(0,o),slot:e.slice(o+1)}:null}function Qa(e,o,t){let r=Br(t?.zone),a=r?Aw(e,o,r.ownerId):null;return a&&r?{...a,slot:r.slot}:null}function Au(e,o,t){let r=Qa(e,o,t),a=r?.slot??"",n=r&&Array.isArray(r.item.props[a])?r.item.props[a]:[],s=t?.index??-1,i=s>=0?n[s]:void 0,f=i?.props?.id?String(i.props.id):"",d=Math.max(n.length-1,0);return!r||!f?{can:!1,reason:"unreachable",others:0}:n.length<=1?{can:!1,reason:"alone",others:d}:Ns(i?.props?.cardCorners)?{can:!0,others:d,zone:r.zone,index:r.index,data:{...r.item,props:{...r.item.props,[a]:Ru(n,f)}}}:{can:!1,reason:"unset",others:d}}function Bu(e){return e.can?$e("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 Du(e){return $e("Applied to {n} card","Applied to {n} cards",e)}function _u(e,o){e.can&&o(e.zone,e.index,e.data)}import{useSectionOps as Ww}from"efficient-easel/screen/lib/puck/use-section-ops";var zw=2200,Gw="apply-corners-to-siblings",Uw="Apply to all cards";function $w({plan:e,doneCount:o,onPress:t}){return Nu(Hw,{id:Gw,label:l(Uw),note:Bu(e),disabled:!e.can,done:o!==null,doneLabel:Du(o??0),onPress:t})}function Mu(){let{appState:e,config:o}=Mw(f=>f),t=Ww(),[r,a]=Nw(null),n=_w(null);Dw(()=>()=>{n.current&&clearTimeout(n.current)},[]);let s=Au(o,e.data.content??[],e.ui.itemSelector),i=Bw(()=>{_u(s,t.replaceComponent),s.can&&(a(s.others),n.current&&clearTimeout(n.current),n.current=setTimeout(()=>a(null),zw))},[s,t]);return Nu($w,{plan:s,doneCount:r,onPress:i})}var Hu=1;function qw(e){return ho(e)}function k5(e){let o=qw(e);return o===null?{}:{"--sf-card-image-radius":`${o}px`}}var Wu=1,zu="Corners";function jw(e){return ho(e)}function E5(e,o){let t=jw(e);if(t===null)return null;let r=`${t}px`;return{borderRadius:Rr(o)?Ar(r,Lo(o)??[]):r}}var Ro={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]]}},Ms=Object.keys(Ro),Uu=[2,3,4,6];function $u(e){return typeof e!="string"||e===""?null:Ro[e]??null}function Gu(e,o){return o?6/e.acrossPhone:12/e.across}var Kw="sf-wall--";function Vw(e){return`${Kw}${e}`}function L5(e){let o=Ro[e],t=`.${Vw(e)}`,r=[],a=(n,s)=>{let i=[],f=n.length;n.forEach(([d,p],m)=>{i.push(`${t} > :nth-child(${f}n+${m+1}){grid-column:span ${d};grid-row:span ${p}}`)});for(let d=1;d<f;d+=1)i.push(`${t}:has(> :nth-child(${f}n+${d}):last-child) > :nth-last-child(-n+${d}){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,Gu(o,!1))),r.push("@media (max-width:800px){"),r.push(`${t}{grid-template-columns:repeat(6,minmax(0,1fr))}`),r.push(...a(o.phone,Gu(o,!0))),r.push("}"),r.join("")}var Ja=12,qu=1,Yw=3;var Xw=3;function Hs(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 Zw(e){return Hs(e,1,Ja)??Xw}function B5(e,o){return Hs(e,qu,Yw)??(Zw(o)===4?2:qu)}function D5(e){return e==null||e===""?null:Hs(e,1,Ja)}var _5="data-sf-span";function N5(e){if(!e)return!1;if(e.type==="Grid")return!0;if(e.type==="GalleryB"){if($u(e.props?.layout))return!1;let o=e.props?.columns;return o!=null&&o!==""}return!1}var $o=["top-left","top-center","top-right","left","center","right","bottom-left","bottom-center","bottom-right"],en="bottom-left";var Ws={"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 Qw(e){let o=$o.indexOf(ut(e));return{band:Math.floor(o/3),column:["start","center","end"][o%3]}}function Jw(e){return 1+Qw(e).band*6}function H5(e){return Jw(e)+1}function ut(e){return $o.includes(e)?e:en}function W5(e){let o=typeof e=="number"&&Number.isFinite(e)?e:0;return Math.max(-40,Math.min(40,Math.round(o)))}function z5(e,o=60){let t=typeof e=="number"&&Number.isFinite(e)?e:o;return Math.max(30,Math.min(100,Math.round(t)))}function zs(e,o){let t=ut(o);return e.filter(r=>ut(r?.props?.placement)===t).length}function ju(e){return`${Ws[ut(e)]} already holds 4 boxes. Move one somewhere else first.`}function Gs(e,o){let t=e.filter(r=>r?.props?.id!==o);return $o.map(r=>{let a=zs(t,r)>=4,n=Ws[r];return a?{value:r,label:n,disabled:!0,title:ju(r)}:{value:r,label:n}})}function on(e,o){let t=o===void 0?en:ut(o?.props?.placement);return zs(e,t)>=4?ju(t):null}var tn="HeroGroup";function ev(e){return $o.map(o=>{let t=zs(e,o);return{anchor:o,total:t,hidden:t-4}}).filter(o=>o.hidden>0)}function Us(e){let o=ev(e);return o.length===0?null:o.map(({anchor:t,total:r,hidden:a})=>{let n=Ws[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 Ku(e,o){let t=o;if(t?.type!==tn)return null;let r=t.props?.id===void 0?"":String(t.props.id);return r?on($s(e,r),t):null}function $s(e,o){let t=Yu(e,o);return t&&t.ownerType===tv?t.siblings:[]}function Vu(e,o){let t=Yu(e,o);return t?t.ancestorTypes.filter(r=>r===tn).length:ov}var ov=1,tv="HeroSlide";function Yu(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 f=i.type,d=r(i,n+1,[...s,String(f)]);if(d)return d}return null}for(let i of Object.values(a)){let f=r(i,n+1,s);if(f)return f}return null};return r(e,0,[])}import{jsx as rv}from"react/jsx-runtime";var av="sf-hint-keep";function Xu({children:e}){return rv("span",{className:av,children:e})}import{jsx as qo,Fragment as lv,jsxs as ap}from"react/jsx-runtime";import{useContext as sv,useEffect as iv,useId as fv,useState as np}from"react";import{SettingsField as cv,SettingsSwitch as dv}from"efficient-easel/panel";import{AnchorIcon as uv}from"efficient-easel/icons";import{ScreenDocumentContext as pv}from"efficient-easel/screen/components/ScreenDocumentContext";import{Snippet as mv}from"efficient-shell/ui";var rn="homepage";function pt(e){return(e??"").toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/^-+|-+$/g,"")}var Zu=[{value:"page",label:"Page"},{value:"anchor",label:"Anchor"},{value:"blog",label:"Blog post",needs:"service"},{value:"product",label:"Product",needs:"commerce"},{value:"popup",label:"Popup"},{value:"custom",label:"Custom URL"}];function Qu(e){return e.offersCommerce&&e.offersService?Zu:Zu.filter(o=>!o.needs||(o.needs==="commerce"?e.offersCommerce:e.offersService))}var qs="#popup:";function Ju(e){return`${qs}${e}`}function ep(e){return e.startsWith(qs)&&e.slice(qs.length).trim()||null}function Dr(e){return e===rn?"/":`/${e}`}function op(e){return`/journal/${e}`}function Y5(e){return`/wheels/${e}`}function an(e,o){return`${Dr(e)}#${o}`}function js(e){return pt(e)}function nv(e){return typeof e=="string"?e.trim():e&&typeof e=="object"&&typeof e.text=="string"?e.text.trim():""}function tp(...e){let o=new Set,t=[];for(let r of e)for(let a of r?.content??[]){let n=nv(a?.props?.anchor);if(!n)continue;let s=js(n);!s||o.has(s)||(o.add(s),t.push({slug:s,name:n}))}return t}function X5(e){let o=e.indexOf("#"),t=o===-1?e:e.slice(0,o),r=t.indexOf("?");return r===-1?t:t.slice(0,r)}function rp(e){return/^\/wheels\/[^/?#]+(?:[?#].*)?$/.test(e)}import{readHidable as xv}from"efficient-easel/draw";function lp({value:e,onChange:o,nameBox:t}){let r=xv(e).text,[a,n]=np(!1),s=a||r.trim()!=="",i=fv();return ap(lv,{children:[qo(cv,{label:l("Add an anchor"),labelId:i,icon:qo(uv,{}),action:qo(dv,{checked:s,ariaLabelledBy:i,onChange:f=>{n(f),!f&&r!==""&&o("")}})}),s&&t(e,o),s&&qo(Iv,{name:r})]})}function Iv({name:e}){let o=sv(pv),t=o?.templateId?"":o?.currentSlug??"",[r,a]=np("");iv(()=>a(Va()||window.location.origin),[]);let n=js(e);if(!n||!t)return null;let s=`${r}${an(t,n)}`,i=s.replace(/^https?:\/\//,""),f=i.lastIndexOf("#");return qo("div",{className:"sf-anchor-link",children:qo(mv,{value:s,label:l("link"),size:"sm",children:ap("span",{className:"sf-anchor-link-text",children:[qo("span",{className:"sf-anchor-link-path",children:i.slice(0,f)}),qo("span",{className:"sf-anchor-link-hash",children:i.slice(f)})]})})})}import{AdjustIcon as _P,AlignLeftIcon as NP,EyeIcon as MP,AlignSeparateIcon as HP,AnimationIcon as Gx,BackgroundIcon as WP,BorderAllIcon as zP,BlockSectionIcon as GP,CartIcon as UP,ColumnWidthsIcon as Ux,ColumnsIcon as $P,CornerIcon as qP,DirectionDownIcon as jP,DirectionLeftIcon as KP,DirectionRightIcon as VP,DirectionUpIcon as YP,DollarIcon as XP,FinishIcon as ZP,GapIcon as $x,GridIcon as QP,GroundIcon as JP,HashIcon as qx,HeightIcon as eF,ImageIcon as oF,ListIcon as tF,LocationIcon as Zi,NudgeIcon as rF,PaddingAllIcon as aF,PaddingBottomIcon as jx,PaddingLeftIcon as Kx,PaddingRightIcon as Vx,PaddingTopIcon as Yx,PageIcon as Xx,PhoneIcon as nF,PlacementIcon as lF,ProductSizeIcon as sF,StickyIcon as iF,RotateIcon as fF,SquareIcon as cF,TypeIcon as dF,WidthIcon as uF,WrapIcon as pF}from"efficient-easel/icons";import{jsx as J,Fragment as go,jsxs as yo}from"react/jsx-runtime";import{TitleIcon as hv,ButtonIcon as gv,DollarIcon as yv,HashIcon as bv,LinkIcon as Sv,NoteIcon as Cv,TagIcon as wv,TextLinesIcon as vv}from"efficient-easel/icons";var sp={body:vv,button:gv,link:Sv,label:wv,number:bv,price:yv,note:Cv,title:hv},ip={eyebrow:yo(go,{children:[J("path",{d:"M5 6.5h5"}),J("path",{d:"M5 12.5h14"}),J("path",{d:"M5 18h11"})]}),heading:yo(go,{children:[J("path",{d:"M6.5 5v14"}),J("path",{d:"M17.5 5v14"}),J("path",{d:"M6.5 12h11"})]}),intro:yo(go,{children:[J("path",{d:"M4 5.5v13"}),J("path",{d:"M8 7.5h12"}),J("path",{d:"M8 12h12"}),J("path",{d:"M8 16.5h8"})]}),value:yo(go,{children:[J("rect",{x:"2.5",y:"7",width:"19",height:"10",rx:"2"}),J("path",{d:"M6.5 12h7"})]}),name:yo(go,{children:[J("path",{d:"M6 3.5v17"}),J("path",{d:"M6 5h11.5l-2.6 3.6L17.5 12H6z"})]}),date:yo(go,{children:[J("rect",{x:"4",y:"5.5",width:"16",height:"15",rx:"2"}),J("path",{d:"M4 10.5h16"}),J("path",{d:"M9 3.2v4.4"}),J("path",{d:"M15 3.2v4.4"})]}),caption:yo(go,{children:[J("rect",{x:"3.5",y:"4.5",width:"17",height:"11",rx:"2"}),J("path",{d:"M3.5 12.8l4.2-3.2 3.6 2.8 3.4-2.4 5.8 4"}),J("path",{d:"M6.5 19.5h11"})]}),quote:yo(go,{children:[J("path",{d:"M9.5 5.5C7 7.2 5.5 9.7 5.5 12.8h4v5.7h-5v-5.7"}),J("path",{d:"M19.5 5.5c-2.5 1.7-4 4.2-4 7.3h4v5.7h-5v-5.7"})]}),tag:yo(go,{children:[J("rect",{x:"3",y:"5.5",width:"18",height:"13",rx:"2.5"}),J("path",{d:"M8 9.5h8"}),J("path",{d:"M12 9.5v5"})]}),meta:yo(go,{children:[J("path",{d:"M4 7h16"}),J("path",{d:"M4 14h3.5"}),J("path",{d:"M10.5 14h3"}),J("path",{d:"M17 14h3"})]})};function Ks({noun:e,size:o=14,strokeWidth:t=1.8,className:r,style:a}){let n=sp[e];return n?J("span",{className:r,style:{display:"inline-flex",...a},"aria-hidden":"true",children:J(n,{size:o})}):J("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:ip[e]})}var d3=Object.keys(sp);var u3=Object.keys(ip);var kv="#ffffff",Tv=/^#[0-9a-fA-F]{6}$/;function Vs(e){return Pv(e)?e:kv}function Pv(e){return typeof e=="string"&&Tv.test(e)}function m3(e){return{"--bg":Vs(e)}}var Ys=[{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}],Fv=Ys.filter(e=>e.ink);function Ev(e){let o={color:e.fg};for(let{role:t,token:r}of Fv)o[r]=e[t];return o}var Ov={fg:"var(--overlay-fg)",line:"color-mix(in srgb, var(--overlay-fg) 24%, transparent)",muted:"color-mix(in srgb, var(--overlay-fg) 76%, transparent)"},fp=Object.freeze(Ev(Ov));var nn=-1,Lv="sf-section-accent",cp="Color",dp=new Set(["CategoryBar","DocTabs"]),g3=new Set(["Flex"]),Rv=0;function Xs(e){return e===nn?null:typeof e=="number"&&Number.isInteger(e)&&e>=0?e:Rv}function y3(e){return e??nn}function Av(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 Ys)t[`--sf-sec-${r}`]=`var(${o}-${r}, var(--theme-${r}))`;return t}function b3(e){let o=Xs(e.sectionAccent);return o===null?null:{className:Lv,style:Av(o)}}var Bv=["fade","rise","scale"],Zs="none",up=[{label:"None",value:Zs},{label:"Fade",value:"fade"},{label:"Rise",value:"rise"},{label:"Scale",value:"scale"}];function w3(e){return Bv.includes(e)?e:null}var pp="data-sf-anim",_r="data-sf-anim-state";function v3(e){let o=()=>{};if(typeof IntersectionObserver>"u"||!e.getAttribute(pp))return o;let t=window.innerHeight||document.documentElement.clientHeight;if(e.getBoundingClientRect().top<t)return o;e.setAttribute(_r,"armed");let r=new IntersectionObserver(a=>{for(let n of a)if(n.isIntersecting){r.disconnect(),Dv(e);break}},{threshold:0});return r.observe(e),()=>{r.disconnect(),e.removeAttribute(_r)}}function Dv(e){if(!e.getAttribute(pp))return;e.removeAttribute(_r),e.offsetWidth,e.setAttribute(_r,"play");let o=t=>{t.target===e&&(e.removeAttribute(_r),e.removeEventListener("animationend",o))};e.addEventListener("animationend",o)}var k3=dp;function Js(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(Qs(r,o,0))return a??{}}return null}function Qs(e,o,t){if(t>12||!e||typeof e!="object")return!1;if(Array.isArray(e))return e.some(a=>Qs(a,o,t+1));let r=e.props;return r&&typeof r=="object"&&r.id===o?!0:Object.values(e).some(a=>Qs(a,o,t+1))}import{SettingsDefaultReset as Ee,SettingsField as re,SettingsGroup as mF,SettingsGroupSub as xF,SettingsBorder as IF,SettingsSegmented as hF,SettingsSides as gF,SettingsSidesEach as Zx,sidesStartEach as yF,SettingsSwitch as Qx,borderSides as bF,borderStartEach as SF}from"efficient-easel/panel";import{FieldSelect as CF,ListField as wF}from"efficient-easel/fields";import{DisplayChips as vF}from"efficient-shell/ui";function qt(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 ln(e,o){return qt(e)[o]!==!1}function ei(e,o,t){let r=qt(o)[t];return typeof r=="boolean"?r:ln(e,t)}function mp(e){return Object.values(qt(e)).some(o=>o===!1)}function xp(e){return Object.keys(qt(e)).length>0}function Ip(e,o,t){let r={...qt(e)};return t?delete r[o]:r[o]=!1,Object.keys(r).length?r:void 0}function hp(e,o,t){return{...qt(e),[o]:t}}function F3(e,o,t){let r=ln(e,t),a=ei(e,o,t);return r&&a?"":!r&&!a?"hidden":r?"max-[720px]:hidden":"min-[720px]:hidden"}import{AlignmentGrid as kF,Checkbox as VG,CornersInput as TF,DateTimePicker as PF,FOCAL_DEFAULT as YG,PictureTiles as Jx,PositionInput as FF,Slider as EF,Tooltip as eI}from"efficient-shell/ui";import{jsx as mt,jsxs as yp}from"react/jsx-runtime";import{ColorPicker as Nv,HexInput as Mv}from"efficient-shell/ui";import{SettingsDefaultReset as Hv,SettingsField as Wv}from"efficient-easel/panel";import{typedHex as oi}from"efficient-easel/pick";import{typedHex as _v}from"efficient-easel/pick";function gp(e){let o=new Set,t=[];return He(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 f=i?_v(i):null;!f||o.has(f)||(o.add(f),t.push({name:s,value:f}))}}),t}function zv({value:e,onChange:o,label:t,id:r,caption:a,inherited:n,ariaLabel:s}){return mt(Uv,{value:e,onChange:o,label:l(s??t),id:r,caption:a,inherited:n})}function Gv(){let{theme:e}=V();return gp(e).map(o=>({value:o.value,label:o.name}))}function Uv({value:e,onChange:o,label:t,id:r,caption:a,inherited:n}){let s=Gv(),i=e?null:oi(n??""),f=a!==void 0&&(!e||oi(a)!==oi(e))?a:null,d=p=>{p!==e&&o(p)};return yp("div",{className:"sf-colour",children:[mt(Nv,{id:r,value:e,onChange:d,label:t,presets:s,fallback:i??void 0,size:"md",align:"start"}),f!==null?mt("span",{className:"sf-colour-caption",children:f}):mt("span",{className:"sf-colour-hexwrap",children:mt(Mv,{value:e||i||"",onChange:d,label:l("{label} hex code",{label:t}),placeholder:e||i?void 0:l("Not set"),className:i?"sf-colour-hex is-inherited":"sf-colour-hex",size:"md"})})]})}function qe({label:e,icon:o,changed:t,hint:r,onReset:a,resetTo:n,children:s,...i}){return yp(Wv,{label:e,icon:o,htmlFor:i.id,changed:t,hint:r,action:a?mt(Hv,{words:X()?.panel,label:e,changed:!!t,detail:n,onReset:a}):void 0,children:[zv({...i,label:e}),s]})}function sn({label:e,icon:o,value:t,inherited:r,resetTo:a,onChange:n,onReset:s,hint:i}){let f=!!t;return mt(qe,{label:e,icon:o,value:t,inherited:f?void 0:r,onChange:n,changed:f,onReset:s,resetTo:a,hint:i})}import{jsx as Nr}from"react/jsx-runtime";import{useEffect as pk,useState as mk}from"react";import{markSelection as xk,useCaretEdit as Ik}from"efficient-easel/copy";import{RevertIcon as hk}from"efficient-easel/icons";import{IconButton as gk,TextToolbar as yk,Tooltip as bk}from"efficient-shell/ui";import{applyMark as Y3,markupTools as X3,MARKUP_TOOLS as Z3,COPY_FIELD_TOOLS as Q3,STOREFRONT_MARKUP as J3,tokenizeInline as e4,stripInline as o4,isSafeLinkHref as t4}from"efficient-shell/markup";import{applyMark as ok,markedAt as tk,markupTools as rk,MARKUP_TOOLS as ak,parseMarkup as nk,RETIRED_MARKS as lk,STOREFRONT_MARKUP as sk,tokenizeInline as a4}from"efficient-shell/markup";var xt=["highlight","strong","quiet"],It={highlight:"Highlight",strong:"Bold",quiet:"Quiet"},bo={highlight:{kind:"wordHighlight",delimiter:"@@"},strong:{kind:"wordStrong",delimiter:"++"},quiet:{kind:"wordQuiet",delimiter:"^^"}},U3=Object.fromEntries(xt.map(e=>[bo[e].kind,e])),$3="data-sf-ws",fn=["accent","text","labels"],wp={accent:"Accent",text:"Text",labels:"Labels"},jt={accent:"var(--accent)",text:"var(--fg)",labels:"var(--fg-dim)"},$v=80,qv=120,jv=100,Kv=900,Vv=.5,Yv=3,Xv=-.1,Zv=.5,Qv=3,ti={font:null,size:null,weight:null,bold:null,italic:null,lineGap:null,textGap:null,colour:null},Jv={highlight:{...ti},strong:{...ti},quiet:{...ti}};function bp(e,o,t){return typeof e!="number"||!Number.isFinite(e)?null:Math.round(Math.min(Math.max(e,o),t))}function Sp(e,o,t){if(typeof e!="number"||!Number.isFinite(e))return null;let r=10**Qv;return Math.round(Math.min(Math.max(e,o),t)*r)/r}function Cp(e){return typeof e=="boolean"?e:null}function ek(e){let o=typeof e?.font=="string"&&Xe.some(r=>r.key===e.font)?e.font:null,t=typeof e?.colour=="string"&&fn.includes(e.colour)?e.colour:null;return{font:o,size:bp(e?.size,$v,qv),weight:bp(e?.weight,jv,Kv),bold:Cp(e?.bold),italic:Cp(e?.italic),lineGap:Sp(e?.lineGap,Vv,Yv),textGap:Sp(e?.textGap,Xv,Zv),colour:t}}function vp(e){let o={};for(let t of xt)o[t]=e&&t in e&&e[t]?ek(e[t]):{...Jv[t]};return o}function q3(e){let o=vp(e),t={};for(let r of xt){let a=o[r],n=`--sf-ws-${r}`;if(a.font){let s=Xe.find(i=>i.key===a.font);s&&(t[`${n}-font`]=`var(${s.cssVar})`)}a.size!==null&&(t[`${n}-size`]=`${a.size/100}em`),a.weight!==null&&(t[`${n}-weight`]=String(a.weight)),a.bold!==null&&(t[`${n}-weight-bold`]=a.bold?"700":"400"),a.italic!==null&&(t[`${n}-style`]=a.italic?"italic":"normal"),a.lineGap!==null&&(t[`${n}-line`]=String(a.lineGap)),a.textGap!==null&&(t[`${n}-track`]=`${a.textGap}em`),a.colour!==null&&(t[`${n}-color`]=jt[a.colour])}return t}function j3(e){let o=e?.word_styles??void 0,t={};for(let r of xt)o&&r in o&&(t[r]=o[r]??null);return vp(t)}var ik=new Set(["strong"]),kp=xt.map(e=>({open:bo[e].delimiter,close:bo[e].delimiter,kind:bo[e].kind,...ik.has(e)?{wordStart:!0}:{}})),l4=[{style:bo.highlight.kind,label:It.highlight,title:`${It.highlight} word style`},{style:bo.strong.kind,label:It.strong,title:`${It.strong} word style`},{style:bo.quiet.kind,label:It.quiet,title:`${It.quiet} word style`}],fk=new Set(kp.map(e=>e.open)),Kt=[...sk.filter(e=>!fk.has(e.open)),...kp];function ck(e){return e.bullet?"- ":e.number!=null?`${e.number}. `:""}function dk(e){return nk(typeof e=="string"?e:"",Kt)}var uk=ak.map(e=>e.style).filter(e=>!lk.includes(e)).filter(e=>Kt.some(o=>o.kind===e));function Tp(){return rk(uk)}var Pp=Object.fromEntries(xt.map(e=>[bo[e].kind,bo[e].delimiter]));function Fp(e,o,t,r){let a=Pp[r];if(!a)return ok(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 f=n||"styled text";return{text:e.slice(0,o)+a+f+a+e.slice(t),selectionStart:o+a.length,selectionEnd:o+a.length+f.length}}function Ep(e,o,t,r){let a=Pp[r];return a?o>=a.length&&e.slice(o-a.length,o)===a&&e.slice(t,t+a.length)===a:tk(e,o,t,r)}function ht(e){return dk(e).map(o=>ck(o)+Op(o.children)).join(`
|
|
2
2
|
`)}function Op(e){return e.map(o=>o.kind==="text"?o.text:Op(o.children)).join("")}var Lp="Clear formatting";function Sk(e,o,t){return xk(e,o,t,Fp)}function Ck(e){let[o,t]=mk(null);return pk(()=>{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(f=>f&&f.start===s&&f.end===i?f:{start:s,end:i})};return r.addEventListener("selectionchange",a),()=>r.removeEventListener("selectionchange",a)},[e]),[o,t]}function wk({target:e,value:o,onChange:t,disabled:r=!1,label:a="Formatting"}){let n=Ik({target:e,onChange:t}),[s,i]=Ck(e),f=x=>n(I=>{let y=Sk(o,x,I);return i({start:y.selectionStart,end:y.selectionEnd}),y}),d=Tp(),p={};if(s)for(let x of d)p[x.style]=Ep(o,s.start,s.end,x.style);let m=ht(o);return Nr(yk,{offered:new Set(d.map(x=>x.style)),onMark:x=>f(x),pressed:p,disabled:r,"aria-label":l(a),className:"sf-markup-bar",last:Nr("span",{className:"sf-markup-clear",children:Nr(bk,{content:l(Lp),children:Nr(gk,{size:"sm",onMouseDown:x=>x.preventDefault(),onClick:()=>t(m),disabled:r||m===o,"aria-label":l(Lp),children:Nr(hk,{size:14})})})})})}var ri=wk;import{deviceField as we}from"efficient-easel/screen/lib/puck/device-fields";import{NO_CONTROL_FIELD as OF,NoControlMark as Dn,noControlField as Vr}from"efficient-easel/screen/lib/puck/panel-no-control-mark";var ai="__ownBox";function Rp(e){return!!e&&typeof e=="object"&&e[ai]===!0}function Ao(e){return`${e}Phone`}function cn(e,o,t){return typeof e=="number"?e:typeof o=="number"?o:t}var dn=void 0;import{jsx as li,Fragment as Tk}from"react/jsx-runtime";import{createContext as Pk,useContext as Fk}from"react";var un={ProductGrid:{source:{keep:["slug"]}},GalleryItem:{product:{keep:["code","finish"]}},FeaturedCover:{source:{keep:["slug"]}},LongRead:{source:{keep:["slug"]}}},pn={Events:["posts"],SubscribeBlogs:["posts"]};var vk=["anchor"],kk=/^href$|Href$|^url$|Url$|^link$|^mailto$|^tel$/;function Mr(e){return vk.includes(e)||kk.test(e)}var ni={Gallery:{source:{verb:"snapshot",keep:[]}},ProductHero:{source:{verb:"snapshot",keep:[]}},SpecTable:{source:{verb:"snapshot",keep:[]},wheel:{verb:"reference"},finish:{verb:"reference"},size:{verb:"reference"}},CollectionCard:{collection:{verb:"snapshot",keep:[]}},FooterMenu:{menu:{verb:"snapshot",keep:[]}},MenuBlock:{menu:{verb:"snapshot",keep:[]}},ProductGrid:{design_codes:{verb:"reference"}},ProductRef:{code:{verb:"reference"},finish:{verb:"reference"}},FitmentTable:{wheel:{verb:"reference"}},GalleryItem:{fromProduct:{verb:"reference"}},Footprint:{"offices[].group":{verb:"groupKey"},"offices[].lat":{verb:"pii"},"offices[].lng":{verb:"pii"},"offices[].geocode":{verb:"pii"}}};ni.ContactLocations={"locations[].lat":{verb:"pii"},"locations[].lng":{verb:"pii"},"locations[].mapsUrl":{verb:"pii"},"locations[].geocode":{verb:"pii"}};var b4=Object.fromEntries(Object.entries(un).map(([e,o])=>[e,Object.keys(o)])),S4=Object.fromEntries(Object.entries(pn).map(([e,o])=>[e,[...o]]));import{NoControlMark as Ek}from"efficient-easel/screen/lib/puck/panel-no-control-mark";var Ap=Pk(!1);function Bp({children:e}){return li(Ap.Provider,{value:!0,children:e})}function Ok(){return Fk(Ap)}function Dp({name:e,children:o}){return!Ok()||!e||!Lk(e)||Mr(e)?li(Tk,{children:o}):li(Ek,{})}function Lk(e){return/^[A-Za-z0-9_$]+$/u.test(e)}function jo(e,o,t){return e.some(r=>(typeof r=="object"?r.value:r)===t)?t:o}var si="off",ii="none",fi=[{label:"None",value:"off"},{label:"1, 2, 3",value:"plain"},{label:"01, 02, 03",value:"padded"},{label:"N\xB001, N\xB002",value:"numero"}],ci=[{label:"None",value:"none"},{label:"Hairline",value:"hairline"}];function O4(e){return jo(fi,si,e)}function L4(e){return jo(ci,ii,e)}var _p="sf-card-index",Hr="sf-card-index",R4="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",Rk={plain:`counter(${Hr})`,padded:`counter(${Hr}, decimal-leading-zero)`,numero:`"N\xB0" counter(${Hr}, decimal-leading-zero)`};function A4(e,o){return o==="off"?"":`.${e}{counter-reset:${Hr}}.${e} .${_p}{counter-increment:${Hr}}.${e} .${_p}::before{content:${Rk[o]}}`}function B4(e){return e==="hairline"?"border border-line hover:border-accent":""}var Np=[{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 LF}from"efficient-easel/draw";import{jsx as So}from"react/jsx-runtime";import{SettingsDefaultReset as Dk,SettingsField as Hp}from"efficient-easel/panel";import{useSelectedFields as _k}from"efficient-easel/easel";import{FOCAL_DEFAULT as Nk}from"efficient-shell/format";import{ImageIcon as Wp,PlayIcon as zp}from"efficient-easel/icons";import{MediaUploadField as Mk}from"efficient-shell/ui";import{useContext as Hk}from"react";import{ScreenDocumentContext as Wk}from"efficient-easel/screen/components/ScreenDocumentContext";import{usePreviewDevice as zk}from"efficient-easel/draw/client";import{requestMediaPick as Gk}from"efficient-easel/screen/lib/media-picker";import{useEaselHost as Uk}from"efficient-easel/screen/lib/host";function Ak(e){return!!e&&typeof e=="object"&&!Array.isArray(e)&&typeof e.src=="string"}function Mp(e){return typeof e=="string"?e:Ak(e)?e.src:""}function N4(e,o,t){return di(e,o.split("."),t)}function di(e,o,t){if(o.length===0)return t(e);let[r,...a]=o,n=r.endsWith("[]"),s=n?r.slice(0,-2):r;if(!e||typeof e!="object"||Array.isArray(e))return e;let i=e;if(!(s in i))return e;let f=i[s];if(n){if(!Array.isArray(f))return e;let p=!1,m=f.map(x=>{let I=di(x,a,t);return I!==x&&(p=!0),I});return p?{...i,[s]:m}:e}let d=di(f,a,t);return d===f?e:{...i,[s]:d}}import{backendOf as Bk}from"efficient-easel/screen/lib/session";var Se=Bk,mn=e=>e.blocks;import{useEaselSession as $k}from"efficient-easel/screen/lib/session-context";function qk(e,o){let t=null;try{t=_k()}catch{t=null}let r=zk()==="mobile";if(!e||!t||o&&!o(t.values??{}))return null;let a=typeof t.values?.[e]=="string"&&t.values[e]?String(t.values[e]):Nk,n=Ao(e),s=typeof t.values?.[n]=="string"&&t.values[n]?String(t.values[n]):void 0,i=t.onChange;return{phone:r,desktop:a,own:s,focus:r?s??a:a,set:f=>i(r?n:e,f),clear:()=>i(n,dn)}}function Gp({value:e,onChange:o,label:t,accept:r,placeholder:a,focusKey:n,focusWhen:s}){let i=Uk(),f=$k(),d=l(t),p=r.startsWith("video"),m=qk(p?void 0:n,s),x=Hk(Wk),I=v=>Gk(i,{accept:r,title:d,...v?{file:v}:{}}).then(k=>k?.url??null);if(x&&!x.capabilities.mediaEditing)return So(Hp,{label:d,icon:p?So(zp,{}):So(Wp,{}),children:So("div",{className:"sf-image-slot-inert",children:p?l("Templates don\u2019t store videos \u2014 this slot stays a placeholder. Each website picks its own after it\u2019s created."):l("Templates don\u2019t store images \u2014 this slot stays a placeholder. Each website picks its own after it\u2019s created.")})});let y=Mp(e),w=m?.phone&&y?So(Dk,{words:X()?.panel,label:l("Image focus"),changed:!!m.own,detail:l("{value} on desktop",{value:m.desktop}),onReset:m.clear}):void 0;return So(Hp,{label:d,icon:p?So(zp,{}):So(Wp,{}),action:w,children:So("div",{style:{flex:"1 1 auto",minWidth:0},children:So(Mk,{value:y,onChange:o,onPick:I,accept:p?"video/*":"image/*",kind:p?"video":"image",placeholder:a===void 0?void 0:l(a),maxSizeBytes:Se(f).media.maxUploadBytes,...m?{focus:m.focus,onFocusChange:m.set}:{}})})})}import{jsx as Up}from"react/jsx-runtime";import{useId as jk}from"react";import{FieldSelect as Kk}from"efficient-easel/fields";import{SettingsField as Vk}from"efficient-easel/panel";function Yk(e){return e.map(({value:o,label:t,note:r})=>({value:o,label:t,...r?{meta:r}:{}}))}function $p({label:e,options:o,value:t,onChange:r,emptyLabel:a,icon:n,hint:s}){let i=jk(),f=`${i}-label`,d=`${i}-button`,p=Array.isArray(t)?t:[];return Up(Vk,{label:l(e),labelId:f,icon:n,hint:s,children:Up(Kk,{id:d,multiple:!0,value:p,options:Yk(o),onChange:r,placeholder:a===void 0?l("None"):l(a),ariaLabelledBy:`${f} ${d}`,inline:!0})})}import{jsx as ge,jsxs as bt,Fragment as CT}from"react/jsx-runtime";import{useCallback as wT,useContext as vT,useEffect as kT,useId as nm,useRef as rm,useState as am}from"react";import{ThemeIcon as TT}from"efficient-easel/icons";import{SettingsField as PT}from"efficient-easel/panel";import{ScreenDocumentContext as FT}from"efficient-easel/screen/components/ScreenDocumentContext";import{jsx as j,jsxs as Ko,Fragment as tT}from"react/jsx-runtime";import{Button as pi,IconButton as rT,Tooltip as aT}from"efficient-shell/ui";import{jsx as gt,jsxs as qp}from"react/jsx-runtime";import{AccentIcon as Xk}from"efficient-easel/icons";import{Tooltip as Zk}from"efficient-shell/ui";function ui(e){return Io(e).background}function Qk(e){let o=Uo(e.accent,ui(e));return o===null?null:{ratio:o,grade:$t(o)}}function Jk(e){let o=ui(e),t=Uo(e.accent,o);return t===null?[]:au(e.accent).filter(r=>{let a=Uo(r,o);return a!==null&&a>t&&$t(a)==="good"})}var eT={good:"Easy to read","large-only":Ut["large-only"],hard:Ut.hard};function jp({value:e,onChange:o}){let t=Qk(e),r=t?.grade,a=t&&t.grade!=="good"?Jk(e):[];return gt(qe,{label:l("Main color"),icon:gt(Xk,{}),hint:t?l(eT[t.grade]):void 0,value:e.accent,onChange:n=>o({...e,accent:n}),children:a.length>0?gt("div",{className:"w-full min-w-0",children:qp("div",{className:"sf-readability",children:[gt("p",{className:"sf-readability-advice",children:oT(r,!0)}),gt("div",{className:"sf-readability-suggestions",children:a.map(n=>{let s=Uo(n,ui(e));return gt(Zk,{content:l("Use {colour}",{colour:n.toUpperCase()}),children:qp("button",{type:"button",className:"sf-readability-suggestion",onClick:()=>o({...e,accent:n}),children:[gt("span",{className:"sf-readability-chip",style:{background:n},"aria-hidden":!0}),s?`${s.toFixed(1)}:1`:n.toUpperCase()]})},n)})})]})}):null})}function oT(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 nT,ChevronDownIcon as lT,ChevronUpIcon as sT,GroundIcon as iT,LayoutIcon as fT,SquareIcon as cT,TextSmallIcon as dT,TypeIcon as Kp}from"efficient-easel/icons";var Wr=e=>l("Theme {n}",{n:e+1});function Vp({colors:e}){let o=Io(e),t=Lr(e)??o.accent;return Ko("span",{className:"sf-theme-page",style:{background:o.background,color:o.text},"aria-hidden":!0,children:[j("span",{className:"sf-theme-eyebrow",style:{color:o.muted},children:l("label")}),Ko("span",{className:"sf-theme-headline",children:[l("Heading")," ",j("span",{style:{color:o.accent},children:l("accent")})]}),j("span",{className:"sf-theme-body",children:l("body text")}),Ko("span",{className:"sf-theme-row",children:[j("span",{className:"sf-theme-btn",style:{background:t,color:Ts(e,o.accent)},children:l("button")}),j("span",{className:"sf-theme-mini",style:{background:o.surface,borderColor:o.line},children:l("card")})]})]})}var mi={"Text color":j(Kp,{}),"Label color":j(dT,{}),Background:j(iT,{}),"Panels & cards":j(fT,{}),Borders:j(cT,{}),"Button color":j(nT,{}),"Button text color":j(Kp,{})};function uT({label:e,colorKey:o,value:t,onChange:r,idPrefix:a="sf-theme-ink"}){let n=`${a}-${o}`;return j(qe,{label:l(e),icon:mi[e],id:n,value:t,onChange:s=>r(o,s)})}function pT({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 j(qe,{label:l("Button color"),icon:mi["Button color"],id:a,value:s,caption:n?s:l("Main"),onChange:t})}function mT({colors:e,accent:o,onChange:t,idPrefix:r="sf-theme-ink"}){let a=`${r}-button-ink`,n=nu(e),s=Ts(e,o),i=Lr(e)??o,f=$t(Uo(s,i)??0);return j(qe,{label:l("Button text color"),icon:mi["Button text color"],hint:n&&f!=="good"?l("{grade} on the button",{grade:l(Ut[f])}):void 0,id:a,value:s,caption:n?s:l("Auto"),onChange:t})}var xT=[{colour:!0},{label:"Text color",key:"text"},{label:"Label color",key:"muted"},{button:!0},{buttonInk:!0},{moduleBreak:!0},{label:"Background",key:"background"},{label:"Panels & cards",key:"surface"},{label:"Borders",key:"line"}];function xi({colors:e,onChange:o,idPrefix:t}){let r=Io(e);return j(tT,{children:xT.map(a=>"colour"in a?j(jp,{value:e,onChange:o},"colour"):"moduleBreak"in a?j("div",{className:"sf-theme-module-break","aria-hidden":"true"},"module-break"):"button"in a?j(pT,{value:e.button,accent:r.accent,onChange:n=>o({...e,button:n}),idPrefix:t},"button"):"buttonInk"in a?j(mT,{colors:e,accent:r.accent,onChange:n=>o({...e,buttonInk:n}),idPrefix:t},"buttonInk"):j(uT,{label:a.label,colorKey:a.key,value:r[a.key],onChange:(n,s)=>o({...e,[n]:s}),idPrefix:t},a.key))})}function xn({index:e,colors:o,selected:t,role:r="radio",open:a,editable:n=!0,onPick:s,onEdit:i,onChangeColors:f}){let d=Io(o),p=Wr(e),m=e<ks.length&&!o.brandInk?ks[e]:null,x=$t(Uo(d.text,d.background)??0),I=m?JSON.stringify(o)!==JSON.stringify(m):!1,y=a!==void 0;return Ko("div",{className:`sf-theme-card${t?" is-selected":""}`,children:[j("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:j(Vp,{colors:o})}),Ko("div",{className:"sf-theme-foot",children:[j("span",{className:"sf-theme-name",children:p}),x!=="good"&&j("span",{className:"sf-theme-warn",children:l(Ut[x])}),n&&i&&y&&j("span",{className:"sf-theme-edit",children:j(aT,{content:a?l("Collapse"):l("Edit colors"),children:j(rT,{size:"sm","aria-expanded":a,"aria-controls":`sf-theme-colours-${e}`,"aria-label":a?l("Collapse {name}",{name:p}):l("Edit colors for {name}",{name:p}),onClick:i,children:a?j(sT,{size:14}):j(lT,{size:14})})})}),n&&i&&!y&&j(pi,{variant:"secondary",size:"sm",className:"sf-theme-edit","aria-label":l("Edit {name}",{name:p}),onClick:i,children:l("Edit")})]}),a&&Ko("div",{id:`sf-theme-colours-${e}`,className:"sf-theme-colours",children:[j(xi,{colors:o,onChange:w=>f?.(w)}),m&&j(pi,{variant:"link",size:"sm",className:"sf-theme-reset",disabled:!I,onClick:()=>f?.({...m}),children:I?l("Reset {name} to the preset",{name:p}):l("Not changed")})]})]})}function Yp({colors:e,name:o,nameId:t,open:r,menuId:a,labelId:n,buttonRef:s,onClick:i,onKeyDown:f,onEdit:d}){return Ko("div",{className:"sf-secttheme-btn",children:[j("button",{ref:s,type:"button",className:"sf-theme-pick","aria-expanded":r,"aria-controls":a,"aria-labelledby":`${n} ${t}`,onClick:i,onKeyDown:f,children:e?j(Vp,{colors:e}):j("span",{className:"sf-secttheme-nopreview","aria-hidden":"true"})}),Ko("div",{className:"sf-theme-foot",children:[j("span",{id:t,className:"sf-theme-name",children:o}),d&&j(pi,{variant:"secondary",size:"sm",className:"sf-theme-edit","aria-label":l("Edit {name}",{name:o}),onClick:d,children:l("Edit")}),j("button",{type:"button",className:"sf-secttheme-caret","aria-hidden":"true",tabIndex:-1,onClick:i,children:j("span",{className:"sf-multi-caret",children:"\u25BE"})})]})]})}import{useCallback as Si,useEffect as em,useRef as yn}from"react";import{currentEaselSession as gT}from"efficient-easel/screen/lib/session";import{useEaselSession as yT}from"efficient-easel/screen/lib/session-context";import{useSyncExternalStore as IT}from"react";var Zp,Ii=null,yt=null,In=0,hi=new Set;function gi(e){Zp=e;for(let o of hi)o()}function yi(e){Ii=e,In+=1,yt&&clearTimeout(yt),yt=null,gi(void 0)}function Qp(e){In+=1,gi(e)}function hn(e=250){Ii&&(yt&&clearTimeout(yt),yt=setTimeout(()=>{yt=null;let o=Ii;if(!o)return;let t=++In;o().then(r=>{t===In&&gi(r)}).catch(()=>{})},e))}function Xp(){return Zp}function hT(e){return hi.add(e),()=>{hi.delete(e)}}function gn(){return IT(hT,Xp,Xp)}var bi=new Set;function Jp(e){return bi.add(e),()=>{bi.delete(e)}}async function P6(){let e=(await Promise.allSettled([...bi].map(async o=>o()))).find(o=>o.status==="rejected");if(e)throw e.reason}import{WebsiteBackendError as bT}from"efficient-easel/screen/lib/backend-error";function om(e=gT()){return(o,t,r)=>{let a=Se(e).theme;return a?a.update(o,r?{siteId:r}:void 0):Promise.reject(new bT("invalid","This backend stores no site theme."))}}function tm(e){return e.themeFromDocument?{status:"skipped",reason:"template"}:e.token?null:{status:"skipped",reason:"no-token"}}async function ST(e,o=om()){let{themeFromDocument:t,token:r,siteId:a,patch:n}=e,s=tm({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 Vt({themeFromDocument:e,tokenRef:o,siteId:t,onResult:r}){let a=yn(null),n=yn({}),s=yT(),i=yn(r);i.current=r;let f=yn(null),d=Si(x=>{if(x.status==="skipped"){let I=`skipped:${x.reason}`;if(f.current===I)return;f.current=I}else f.current=null;i.current?.(x)},[]),p=Si(async()=>{a.current&&(clearTimeout(a.current),a.current=null);let x=n.current;n.current={};let I=await ST({themeFromDocument:e,token:o?.current,siteId:t,patch:x},om(s));return d(I),I.status==="saved"&&hn(),I.status==="failed"&&(n.current={...x,...n.current}),I},[e,o,t,d,s]),m=Si((x,I=!1)=>{let y=tm({themeFromDocument:e,token:o?.current});if(y){d(y);return}n.current={...n.current,...x},a.current&&clearTimeout(a.current),I?p():a.current=setTimeout(()=>{p()},500)},[e,o,p,d]);return em(()=>()=>{p()},[p]),em(()=>Jp(async()=>{if(!a.current&&Object.keys(n.current).length===0)return;let x=await p();if(x.status==="failed")throw x.error}),[p]),{persist:m,flush:p}}var ET="Follow the page",V6="Follow the slideshow",OT=e=>l("Editing {name} changes it everywhere.",{name:e});function LT({colors:e}){if(!e)return ge("span",{className:"sf-secttheme-chip sf-secttheme-chip--none","aria-hidden":"true"});let o=Io(e);return bt("span",{className:"sf-secttheme-chip","aria-hidden":"true",children:[ge("i",{style:{background:o.background}}),ge("i",{className:"sf-secttheme-chip-accent",style:{background:o.accent}})]})}function RT({themes:e,value:o,onPick:t,onEdit:r,menuId:a,followLabel:n}){return bt("div",{className:"sf-multi-menu sf-secttheme-menu",id:a,role:"listbox",children:[n!==void 0&&bt(CT,{children:[bt("button",{type:"button",role:"option","aria-selected":o===null,className:`sf-secttheme-item${o===null?" is-active":""}`,onClick:()=>t(nn),children:[ge(LT,{}),ge("span",{className:"sf-secttheme-name",children:l(n)})]}),ge("div",{className:"sf-secttheme-sep",role:"presentation"})]}),o!==null&&e[o]&&ge("p",{className:"sf-secttheme-oncard",role:"presentation",children:l("{name} is on this section",{name:Wr(o)})}),e.map((s,i)=>i===o?null:ge(xn,{role:"option",index:i,colors:s,selected:!1,onPick:()=>t(i),onEdit:()=>r(i)},i))]})}function AT({index:e,colors:o,onChange:t,onDone:r}){let a=Wr(e),n=nm();return bt("div",{className:"sf-secttheme-sheet",children:[bt("div",{className:"sf-secttheme-sheet-head",children:[ge("span",{children:a}),ge("button",{type:"button",className:"sf-secttheme-done",onClick:r,children:l("Done")})]}),ge("div",{className:"sf-secttheme-rows",children:ge(xi,{colors:o,onChange:t,idPrefix:n})}),ge("p",{className:"sf-secttheme-warn",children:OT(a)})]})}function lm({value:e,onChange:o,followLabel:t,hint:r}){let{theme:a,setTheme:n}=V(),s=He(a),i=vT(FT),f=i?.tokenRef,d=i?.siteId??null,p=!i?.capabilities?.hasSiteTheme,{persist:m,flush:x}=Vt({themeFromDocument:p,tokenRef:f,siteId:d}),I=He(s),y=I.themes,w=Xs(e),v=w!==null?y[w]:void 0,k=v??(y.length?Gt(I):void 0),[C,g]=am(!1),[b,O]=am(null),F=rm(null),L=rm(null),P=nm(),M=wT(()=>{g(!1),O(null)},[]);kT(()=>{if(!C&&b===null)return;let A=W=>{F.current&&!F.current.contains(W.target)&&(x(),M())};return document.addEventListener("mousedown",A),()=>document.removeEventListener("mousedown",A)},[C,b,M,x]);let z=A=>{o(A),M()},B=A=>{if(b===null)return;let W=y.map((te,ie)=>ie===b?A:te),D={...I,themes:W};n(D),m({selected_preset:D.selected,theme_presets:D.themes})};return bt("div",{className:"sf-secttheme",ref:F,children:[ge(PT,{label:l("Theme"),icon:ge(TT,{}),labelId:`${P}-label`,hint:r,children:ge(Yp,{colors:k,onEdit:w!==null?()=>{O(w),g(!1)}:void 0,name:v?Wr(w):l(t??ET),nameId:`${P}-value`,labelId:`${P}-label`,open:C,menuId:P,buttonRef:L,onClick:()=>{O(null),g(A=>!A)},onKeyDown:A=>{A.key==="Escape"&&(C||b!==null)&&(A.preventDefault(),M())}})}),C&&b===null&&ge("div",{onKeyDown:A=>{A.key==="Escape"&&(A.preventDefault(),M(),L.current?.focus())},children:ge(RT,{themes:y,value:w,onPick:z,onEdit:A=>{O(A),g(!1)},menuId:P,followLabel:t})}),b!==null&&y[b]&&ge(AT,{index:b,colors:y[b],onChange:B,onDone:()=>{x(),M(),L.current?.focus()}})]})}import{jsx as sm}from"react/jsx-runtime";import{useId as BT}from"react";import{FieldSelect as DT}from"efficient-easel/fields";import{SettingsField as _T}from"efficient-easel/panel";function NT(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 oW({label:e,options:o,fallback:t,value:r,onChange:a,placeholder:n,bare:s=!1,icon:i}){let f=BT(),d=`${f}-label`,p=`${f}-button`,m=r??"",x=o.some(v=>v.value===m)?m:t,I=l(e),y=n===void 0?void 0:l(n),w=sm(DT,{id:p,value:x,options:NT(o),onChange:a,placeholder:y,searchPlaceholder:y,...s?{ariaLabel:I}:{ariaLabelledBy:`${d} ${p}`},searchable:!0,groupCount:!0,inline:!0});return s?w:sm(_T,{label:I,labelId:d,icon:i,children:w})}import{jsx as wt,jsxs as u0}from"react/jsx-runtime";import{SettingsField as Em}from"efficient-easel/panel";import{LinkIcon as p0}from"efficient-easel/icons";import{LinkPicker as m0,TextLinkField as x0}from"efficient-shell/ui";import{useEffect as Fm,useMemo as wn,useRef as I0,useState as Cn}from"react";import{currentEaselSession as MT}from"efficient-easel/screen/lib/session";function im(){return MT().auth.token}import{currentEaselSession as h0}from"efficient-easel/screen/lib/session";import{useScreenDocument as g0}from"efficient-easel/screen/components/ScreenDocumentContext";var HT=()=>({choosePage:l("Choose a page"),chooseSection:l("Choose a section"),noSections:l("No section anchors yet"),sectionHint:l("Jumps to a section on that page."),choosePost:l("Choose a post"),chooseProduct:l("Choose a product"),choosePopup:l("Choose a popup")});function fm(e,o,t){if(!e)return"page";if(ep(e))return"popup";if(e.startsWith("/journal/"))return"blog";if(rp(e))return"product";if(e.includes("#")){let r=e.slice(0,e.indexOf("#"));if(r===""||r==="/"||o.includes(r))return"anchor"}return e==="/"||o.includes(e)||t&&t.listingPaths.includes(t.targetOf(e))?"page":"custom"}function Ci(e,o){let t=HT(),r=e.pages.map(p=>({value:Dr(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:tp(...p.docs).map(m=>({value:an(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:op(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"popup":return{type:"select",options:(e.popups??[]).map(m=>({value:Ju(m.slug),label:m.title||m.slug})),placeholder:t.choosePopup};case"custom":return{type:"text"}}},f=Qu(e.offers).map(p=>({value:p.value,label:l(p.label),target:i(p.value),...p.value==="anchor"?{hint:t.sectionHint}:{},...p.value==="blog"||p.value==="product"||p.value==="popup"?{hideWhenEmpty:!0}:{}}));if(!o)return{kinds:f,rules:{kindOf:p=>fm(p,n),targetOf:p=>p,readFilter:()=>null,withFilter:p=>p}};let d=p=>{let m=o.withFilter(p,null);return o.listingPaths.includes(m)?m:p};return{kinds:f,rules:{kindOf:p=>fm(p,n,{listingPaths:o.listingPaths,targetOf:d}),targetOf:d,readFilter:o.readFilter,withFilter:o.withFilter},filtersFor:p=>o.listingPaths.includes(p)?o.filtersFor(p):null}}import{useEaselSession as y0}from"efficient-easel/screen/lib/session-context";function Ce(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 cm(e,o){return typeof e=="number"&&Number.isFinite(e)?e:o}function St(e,o){return typeof e=="boolean"?e:o}function bn(e,o){if(!Array.isArray(e))return o;let t=e.map(r=>typeof r=="string"?r:Ce(r?.text,"")).map(r=>r.trim()).filter(Boolean);return t.length?t:o}var dm="cart-drawer",cW="cart-drawer";var WT={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 dW(e,o){return o===0?e.subtitleEmpty:o===1?e.subtitleOne:e.subtitleMany.replace("{count}",String(o))}function uW(e){let o=e??{},t=WT;return{kickerBadge:Ce(o.kickerBadge,t.kickerBadge),kickerText:Ce(o.kickerText,t.kickerText),titleLead:Ce(o.titleLead,t.titleLead),titleAccent:Ce(o.titleAccent,t.titleAccent),subtitleEmpty:Ce(o.subtitleEmpty,t.subtitleEmpty),subtitleOne:Ce(o.subtitleOne,t.subtitleOne),subtitleMany:Ce(o.subtitleMany,t.subtitleMany),leadTimeValue:Ce(o.leadTimeValue,t.leadTimeValue),shipsToFallback:Ce(o.shipsToFallback,t.shipsToFallback),promises:bn(o.promises,t.promises),emptyKicker:Ce(o.emptyKicker,t.emptyKicker),emptyBody:Ce(o.emptyBody,t.emptyBody)}}var pm="consent-banner",xW="consent-banner";var zT=[{value:"bar",label:"Bar"},{value:"card",label:"Card"}],IW="Layout",um={layout:"bar"},GT=e=>zT.some(o=>o.value===e);function hW(e){let o=Ce((e??{}).layout,um.layout);return{layout:GT(o)?o:um.layout}}var UT=["meta","eyebrow","heading","body","statName","statValue","formEyebrow","formHeading","formIntro","fieldLabel","option","finePrint","dismiss","doneHeading","doneBody"],bW={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"},$T={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"},SW={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 qT(e){return typeof e=="string"&&Oo.includes(e)?e:null}function mm(e){let o={};for(let t of UT){let r=qT(e[$T[t]]);r&&(o[t]=r)}return o}var Im=["delay","scroll","exit"],hm=["all","chosen","except"],gm=["visit","days","never","once"],jT=["all","desktop","phone"],KT=["stop","continue"],ym={min:0,max:60},bm={min:10,max:90},Sm={min:1,max:90},Qe={autoOpen:!1,trigger:"delay",autoOpenDelaySec:15,scrollPercent:50,showOn:"all",showOnPages:[],devices:"all",hideAfter:"days",hideDays:7,afterSubmit:"stop",startDate:null,endDate:null};function Ze(e,o,t){return typeof o=="string"&&e.includes(o)?o:t}function Yt(e,o,t){let r=cm(e,t);return Math.min(o.max,Math.max(o.min,Math.round(r)))}function VT(e){return typeof e.hideAfter=="string"?Ze(gm,e.hideAfter,Qe.hideAfter):e.oncePerSession===!0?"visit":e.oncePerSession===!1?"never":Qe.hideAfter}function YT(e){return Array.isArray(e)?e.map(o=>typeof o=="string"?o.trim():"").filter(Boolean).map(o=>o.startsWith("/")?o:`/${o}`):[]}function xm(e){if(typeof e!="string")return null;let o=e.trim();return/^\d{4}-\d{2}-\d{2}$/.test(o)?o:null}function Cm(e){let o=e??{},t=Qe;return{autoOpen:St(o.autoOpen,t.autoOpen),trigger:Ze(Im,o.trigger,t.trigger),autoOpenDelaySec:Yt(o.autoOpenDelaySec,ym,t.autoOpenDelaySec),scrollPercent:Yt(o.scrollPercent,bm,t.scrollPercent),showOn:Ze(hm,o.showOn,t.showOn),showOnPages:YT(o.showOnPages),devices:Ze(jT,o.devices,t.devices),hideAfter:VT(o),hideDays:Yt(o.hideDays,Sm,t.hideDays),afterSubmit:Ze(KT,o.afterSubmit,t.afterSubmit),startDate:xm(o.startDate),endDate:xm(o.endDate)}}var Xt="site-footer";var kW=Xt,TW={desktop:!0,tablet:!0,mobile:!0},PW={desktop:!1,tablet:!1,mobile:!1},wi=1,wm=6,FW=Array.from({length:wm-wi+1},(e,o)=>wi+o),Sn={desktop:6,tablet:3,mobile:2},XT={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}},Ct=e=>Math.min(Math.max(Math.round(e),wi),wm);function EW(e){if(typeof e=="number")return XT[Ct(e)]??{desktop:Ct(e),tablet:Ct(e),mobile:Ct(e)};if(e&&typeof e=="object"){let o=e;return{desktop:Ct(o.desktop??Sn.desktop),tablet:Ct(o.tablet??Sn.tablet),mobile:Ct(o.mobile??Sn.mobile)}}return{...Sn}}var vi="subscribe-popup",NW="subscribe-popup";var ZT=[vi,Xt,dm,pm];function km(e){return ZT.includes(e)}var QT=["right","left"],JT={metaLabel:"Meta label",issueLabel:"Label",issueNumber:"00",kicker:"Kicker",heading:`Main heading
|
|
3
3
|
*Highlight line*`,deck:"Add a sentence or two of supporting copy.",stats:[{label:"Label",value:"Value"},{label:"Label",value:"Value"},{label:"Label",value:"Value"},{label:"Label",value:"Value"}],formLabel:"Section label",formHeading:"Main heading *highlight*",formIntro:"Add a sentence or two of supporting copy.",firstNameLabel:"Field label",firstNamePlaceholder:"Placeholder",emailLabel:"Field label",emailPlaceholder:"Placeholder",interestsLabel:"Field label",interests:["Option one","Option two","Option three"],frequencyLabel:"Field label",frequencies:["Option one","Option two","Option three"],submitText:"Button label",finePrint:"Fine print",dismissText:"Dismiss link",emailInvalidText:"Enter a valid email address.",submitErrorText:"Could not subscribe right now. Please try again.",successHeading:"Main heading *highlight*",successBody:"Add a sentence or two of supporting copy \u2014 the {email} and {issue} tokens are substituted here.",keepBrowsingText:"Button label",autoOpen:Qe.autoOpen,autoOpenDelaySec:Qe.autoOpenDelaySec,formSlug:"",trigger:Qe.trigger,scrollPercent:Qe.scrollPercent,showOn:Qe.showOn,showOnPages:[],hideAfter:Qe.hideAfter,hideDays:Qe.hideDays,formSide:"right",valuePanelOnPhone:!1,sectionAccent:void 0,sectionCorners:void 0,sectionCornerSides:void 0,textStyles:{}},ce=Ce,e0=St,Tm=bn;function vm(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 o0(e,o){return Array.isArray(e)?Tm(e,[]):o}function t0(e,o){return Array.isArray(e)?e.map(t=>{let r=t??{};return{label:ce(r.label,""),value:ce(r.value,"")}}).filter(t=>t.label||t.value):o}function HW(e){let o=e??{},t=JT,r=Cm(o);return{metaLabel:ce(o.metaLabel,t.metaLabel),issueLabel:vm(o.issueLabel,t.issueLabel),issueNumber:vm(o.issueNumber,t.issueNumber),kicker:ce(o.kicker,t.kicker),heading:ce(o.heading,t.heading),deck:ce(o.deck,t.deck),stats:t0(o.stats,t.stats),formLabel:ce(o.formLabel,t.formLabel),formHeading:ce(o.formHeading,t.formHeading),formIntro:ce(o.formIntro,t.formIntro),firstNameLabel:ce(o.firstNameLabel,t.firstNameLabel),firstNamePlaceholder:ce(o.firstNamePlaceholder,t.firstNamePlaceholder),emailLabel:ce(o.emailLabel,t.emailLabel),emailPlaceholder:ce(o.emailPlaceholder,t.emailPlaceholder),interestsLabel:ce(o.interestsLabel,t.interestsLabel),interests:Tm(o.interests,t.interests),frequencyLabel:ce(o.frequencyLabel,t.frequencyLabel),frequencies:o0(o.frequencies,t.frequencies),submitText:ce(o.submitText,t.submitText),finePrint:ce(o.finePrint,t.finePrint),dismissText:ce(o.dismissText,t.dismissText),emailInvalidText:ce(o.emailInvalidText,t.emailInvalidText),submitErrorText:ce(o.submitErrorText,t.submitErrorText),successHeading:ce(o.successHeading,t.successHeading),successBody:ce(o.successBody,t.successBody),keepBrowsingText:ce(o.keepBrowsingText,t.keepBrowsingText),formSlug:typeof o.formSlug=="string"?o.formSlug.trim():t.formSlug,autoOpen:r.autoOpen,autoOpenDelaySec:r.autoOpenDelaySec,trigger:r.trigger,scrollPercent:r.scrollPercent,showOn:r.showOn,showOnPages:r.showOnPages,hideAfter:r.hideAfter,hideDays:r.hideDays,formSide:Ze(QT,o.formSide,t.formSide),valuePanelOnPhone:e0(o.valuePanelOnPhone,t.valuePanelOnPhone),sectionAccent:o.sectionAccent,sectionCorners:o.sectionCorners,sectionCornerSides:o.sectionCornerSides,textStyles:mm(o)}}var ki="popup",r0=$o,a0=["auto","full"],n0=["inside","outside","none"],l0={min:240,max:1440},s0={min:0,max:100},i0={placement:"center",fullWidth:!1,width:720,height:"auto",tintColor:"#000000",tintOpacity:60,outsideClick:!0,closeButton:"inside"};function f0(e,o){return typeof e=="string"&&/^#[0-9a-fA-F]{6}$/.test(e.trim())?e.trim():o}function $W(e){let o=e??{},t=i0;return{placement:Ze(r0,o.placement,t.placement),fullWidth:St(o.fullWidth,t.fullWidth),width:Yt(o.width,l0,t.width),height:Ze(a0,o.height,t.height),tintColor:f0(o.tintColor,t.tintColor),tintOpacity:Yt(o.tintOpacity,s0,t.tintOpacity),outsideClick:St(o.outsideClick,t.outsideClick),closeButton:Ze(n0,o.closeButton,t.closeButton)}}function c0(e,o=Math.random){for(;;){let t=`popup-${Math.floor(o()*2176782336).toString(36).padStart(6,"0")}`;if(!e.has(t))return t}}function d0(e){return{root:{props:{title:e,kind:ki}},content:[],zones:{}}}function Pm(e,o,t){return{slug:c0(o,t),title:e,kind:"lightbox",layout:d0(e)}}function Ti(e){return e?.root?.props?.kind===ki}function Om(e){let o=new Map;return(t="")=>{let r=im(),a=o.get(t);if(!a||a.token===null&&r!==null){let n=r||!h0().usesBridgedToken?e(r??"",t).catch(()=>[]):Promise.resolve([]);return o.set(t,{promise:n,token:r}),n}return a.promise}}var b0=Om(async(e,o)=>{let t=o?{siteId:o}:void 0,{pages:r}=Se();return r.linkTargets?r.linkTargets(t):(await r.list(t)).map(a=>({id:a.id,slug:a.slug,label:a.label,layout:null}))}),S0=Om(async(e,o)=>await Se().blog?.posts(o?{siteId:o}:void 0)??[]);function C0({value:e,onChange:o,label:t="Link",data:r,filters:a}){let n=wn(()=>Ci(r,a),[r,a]),s=l(t);return wt(Em,{label:s,icon:wt(p0,{}),children:wt(m0,{value:e,onChange:i=>o(i),kinds:n.kinds,rules:n.rules,filtersFor:n.filtersFor,label:s})})}function Lm(){let{siteId:e,capabilities:o}=g0(),{offersCommerce:t,hasBlog:r}=o,[a,n]=Cn([]),[s,i]=Cn([]),[f,d]=Cn([]),[p,m]=Cn(null),x=y0().chrome,I=x?.products?.list,y=x?.linkFilters,w=y?void 0:x?.linkRow,v=I0(!0);Fm(()=>(v.current=!0,()=>{v.current=!1}),[]),Fm(()=>{let g=!0;return b0(e??void 0).then(b=>g&&v.current&&n(b)),r&&S0(e??void 0).then(b=>g&&v.current&&i(b)),t&&I?.().then(b=>g&&v.current&&d(b)),t&&y?y.load(e).catch(()=>null).then(b=>g&&v.current&&m(()=>b)):m(null),()=>{g=!1}},[e,t,r,I,y]);let k=wn(()=>({pages:a.filter(g=>!km(g.slug)&&!Ti(g.layout)).map(g=>({slug:g.slug,title:g.label,docs:[g.layout]})),popups:a.filter(g=>g.slug===vi||Ti(g.layout)).map(g=>({slug:g.slug,title:g.label})),posts:r?s.map(g=>({slug:g.slug,title:g.title})):[],products:t?f.map(g=>({href:g.href,name:g.name})):[],offers:{offersCommerce:t,offersService:r}}),[a,s,f,t,r]),C=wn(()=>p?p(k.pages):null,[p,k]);return{data:k,filters:C,pages:a,offersCommerce:t,HostLinkRow:w}}function fz({label:e,icon:o,text:t,onTextChange:r,link:a,onLinkChange:n}){let{data:s,filters:i}=Lm(),f=wn(()=>Ci(s,i),[s,i]),d=l(e);return wt(Em,{label:d,icon:o,children:wt(x0,{label:d,text:t,onTextChange:r,link:a,onLinkChange:p=>n(p),kinds:f.kinds,rules:f.rules,filtersFor:f.filtersFor})})}function Rm({value:e,onChange:o,label:t="Link"}){let r=typeof e=="string"?e:"",{data:a,filters:n,pages:s,offersCommerce:i,HostLinkRow:f}=Lm(),d=a.pages.map(m=>Dr(m.slug)),p=i&&f&&(r==="/"||d.includes(r))?f:void 0;return u0("div",{children:[wt(C0,{value:r,onChange:o,label:t,data:a,filters:n}),p&&wt(p,{value:r,onChange:o,pages:s})]})}import{UiIcon as Bx}from"efficient-easel/draw/client";var Je={min:10,max:200,step:10};function Am(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 w0="sf-pad-top-phone",v0="sf-pad-bottom-phone",k0="--sf-pad-t-phone",T0="--sf-pad-b-phone",P0="sf-pad-left-phone",F0="sf-pad-right-phone",E0="--sf-pad-l-phone",O0="--sf-pad-r-phone";function _m(e,o,t,r,a,n,s,i){let f=Am(e,o)??{},d={},p=["sf-section-pad"];typeof t=="number"&&(p.push(w0),d[k0]=`${t}px`),typeof r=="number"&&(p.push(v0),d[T0]=`${r}px`);let m={};return typeof a=="number"&&(m.paddingLeft=a),typeof n=="number"&&(m.paddingRight=n),typeof s=="number"&&(p.push(P0),d[E0]=`${s}px`),typeof i=="number"&&(p.push(F0),d[O0]=`${i}px`),p.length===1&&Am(e,o)===void 0&&!Object.keys(m).length?null:{className:p.join(" "),style:{...f,...m,...d}}}var Bm=e=>typeof e=="number"?e:void 0;function Dm(e,o,t){let r=Bm(e)??t,a=Bm(o);return r===void 0?a:a===void 0?r:r+a}function dz(e,o={}){return{top:Dm(e.padTop,e.sectionPaddingTop,o.top),bottom:Dm(e.padBottom,e.sectionPaddingBottom,o.bottom)}}function uz(e){return{top:e.sectionPaddingTop,bottom:e.sectionPaddingBottom,topPhone:e.sectionPaddingTopPhone,bottomPhone:e.sectionPaddingBottomPhone,left:e.sectionPaddingLeft,right:e.sectionPaddingRight,leftPhone:e.sectionPaddingLeftPhone,rightPhone:e.sectionPaddingRightPhone}}function pz(e){return _m(e.top,e.bottom,e.topPhone,e.bottomPhone,e.left,e.right,e.leftPhone,e.rightPhone)}function mz(e,o){let t=r=>typeof r=="number"?r+o:void 0;return _m(t(e.top),t(e.bottom),t(e.topPhone),t(e.bottomPhone),e.left,e.right,e.leftPhone,e.rightPhone)}var L0=["auto","fixed","screen"],R0=["px","%"];var A0="var(--sf-header-h, 88px)",Pi={min:40,max:2e3,step:10,fallback:600},Fi={min:10,max:200,step:5,fallback:100},B0="sf-section-minh",Nm={base:"--sf-section-minh",small:"--sf-section-minh-s"},Hm=e=>typeof e=="string"&&L0.includes(e),D0=e=>typeof e=="string"&&R0.includes(e);function vn(e){let o=Hm(e.sectionHeightMode)?e.sectionHeightMode:"auto",t=o==="screen"?"%":D0(e.sectionHeightUnit)?e.sectionHeightUnit:"px",r=o==="screen"?Fi.fallback:Pi.fallback,a=typeof e.sectionHeightValue=="number"?e.sectionHeightValue:r;return{mode:o,value:a,unit:t}}function Wm(e){let{mode:o,value:t,unit:r}=vn(e);if(o==="auto")return;if(o==="fixed"&&r==="px")return[`${t}px`,null];let a=t/100,n=s=>o==="screen"?`(100${s} - ${A0})`:`100${s}`;return[`calc(${n("vh")} * ${a})`,`calc(${n("svh")} * ${a})`]}function _0(e){let o=Wm(e);if(!o)return;let[t,r]=o;return{display:"grid",[Nm.base]:t,...r?{[Nm.small]:r}:{}}}var Iz=new Set(["Hero","HeroSingle","IntroBleed","CategoryBar","DocTabs"]),Zt="Height",N0="sf-section-minh-phone",Mm={base:"--sf-section-minh-p",small:"--sf-section-minh-ps"};function Ei(e){return Hm(e.sectionHeightModePhone)}function hz(e){return vn({sectionHeightMode:e.sectionHeightModePhone,sectionHeightValue:e.sectionHeightValuePhone,sectionHeightUnit:e.sectionHeightUnitPhone})}function M0(e){let o=_0(e),t=Ei(e)?Wm({sectionHeightMode:e.sectionHeightModePhone,sectionHeightValue:e.sectionHeightValuePhone,sectionHeightUnit:e.sectionHeightUnitPhone}):void 0;if(!o&&!t)return null;let r=[B0],a={...o??{}};return t&&(r.push(N0),a[Mm.base]=t[0],t[1]&&(a[Mm.small]=t[1])),{className:r.join(" "),style:a}}function gz(e){return M0(e)!==null}var kn="Stick to top",Vo={min:0,max:200,step:4,fallback:0},H0="sf-section-stick",W0="sf-section-stick-phone-on",z0="sf-section-stick-phone-off",zm={desktop:"--sf-stick-distance",phone:"--sf-stick-distance-phone"},bz=new Set(["CategoryBar","DocTabs","IntroBleed"]);function Gm(e){let o=typeof e=="number"&&Number.isFinite(e)?e:Vo.fallback;return Math.min(Vo.max,Math.max(Vo.min,Math.round(o)))}function Oi(e){return typeof e.stickTopPhone=="boolean"}function Li(e){let o=e.stickTop===!0,t=Gm(e.stickTopDistance),r=Oi(e),a=r?e.stickTopPhone===!0:o,n=r?Gm(e.stickTopDistancePhone):t;return{desktop:o,desktopDistance:t,phone:a,phoneDistance:n,ownPhone:r}}function Sz(e){let o=Li(e);if(!o.desktop&&!o.phone)return null;let t=[H0],r={};return o.desktop&&(r[zm.desktop]=`${o.desktopDistance}px`),(o.ownPhone||o.phone!==o.desktop)&&(t.push(o.phone?W0:z0),o.phone&&(r[zm.phone]=`${o.phoneDistance}px`)),o.desktop||t.push("sf-section-stick-desktop-off"),{className:t.join(" "),style:r}}var G0=["column","row","tabs"],Um="Direction",U0={column:"Stacked",row:"One row",tabs:"Tabs"},$m={Flex:G0,HeroGroup:["column","row"]},$0={Flex:"row",HeroGroup:"column"},q0={column:"flex-col",row:"flex-row",tabs:"flex-col"};function Tn(e,o){return $m[e].includes(o)?o:$0[e]}function wz(e,o){return q0[Tn(e,o)]}function qm(e){return $m[e].map(o=>({label:U0[o],value:o}))}var Ri=[{label:"Start",value:"start"},{label:"Center",value:"center"},{label:"Space between",value:"between"},{label:"End",value:"end"}],Vm=[{label:"Start",value:"start"},{label:"Center",value:"center"},{label:"End",value:"end"},{label:"Stretch",value:"stretch"}],Ym="Wrap",Ai=[{label:"Wrap",value:"wrap"},{label:"No wrap",value:"nowrap"}],jm={start:"justify-start",center:"justify-center",between:"justify-between",end:"justify-end"},Km={start:"items-start",center:"items-center",end:"items-end",stretch:"items-stretch"};function kz(e,o){let t=typeof e=="string"&&e in jm?jm[e]:"",r=typeof o=="string"&&o in Km?Km[o]:"";return[t,r].filter(Boolean).join(" ")}function Tz(e){return e===!0||e==="wrap"?"flex-wrap":""}var Bi="Block widths",Pn=[{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]}],zr="[&>*]:min-w-0 [&>*]:flex-1 [&>*]:basis-0",j0={equal:zr,bigLeft:`${zr} [&>*:first-child]:min-[800px]:grow-[2]`,bigRight:`${zr} [&>*:last-child]:min-[800px]:grow-[2]`,biggerLeft:`${zr} [&>*:first-child]:min-[800px]:grow-[3]`,biggerRight:`${zr} [&>*:last-child]:min-[800px]:grow-[3]`};function Pz(e){return typeof e=="string"?j0[e]??"":""}var Xm="Columns on phone",Di=1,Zm=3,K0={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 Fz(e){let o=Number(e);return K0[o]??"max-[800px]:flex-col"}var Qm="Block spacing",_i=[{label:"Each block",value:"each"},{label:"Gap only",value:"gap"}],V0="sf-box-gap-only";function Ez(e){return e==="gap"?V0:""}var Y0=["solid","dashed","dotted"],X0=["top","right","bottom","left"],Lz="sf-section-border",Rz="sf-section-border-self",Z0=/^#(?:[0-9a-f]{3}|[0-9a-f]{4}|[0-9a-f]{6}|[0-9a-f]{8})$/i,Jm=e=>typeof e=="number"&&Number.isFinite(e)?`${Math.min(20,Math.max(0,Math.round(e)))}px`:void 0;function ex(e,{phone:o=!1}={}){if(!e||typeof e!="object")return;let t=o?"-phone":"",r={};for(let a of X0){let n=Jm(e[a])??Jm(e.width);n!==void 0&&(r[`--sf-border-${a}-width${t}`]=n)}return typeof e.style=="string"&&Y0.includes(e.style)&&(r[`--sf-border-style${t}`]=e.style),typeof e.color=="string"&&Z0.test(e.color)&&(r[`--sf-border-color${t}`]=e.color.toLowerCase()),Object.keys(r).length?r:void 0}function Az(e,o){let t=ex(e),r=ex(o,{phone:!0});return t||r?{...t,...r}:void 0}var rx="sf.gapContainer",Yo={min:-32,max:64,step:2},ax={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},Qt={Grid:24,Flex:24,FooterGroup:16,HeroGroup:0,Events:24,GalleryB:8,ProductGrid:2},Q0=new Set(["Events","GalleryB"]);function Gr(e,o,t){if(typeof o=="number"&&Number.isFinite(o)&&o>=Yo.min)return o;if(typeof o=="string"){let r=ax[e]?.[o];if(typeof r=="number")return r}return typeof t=="number"&&Number.isFinite(t)?t:Qt[e]}var J0="sf-gap-overlap",eP="--sf-gap-overlap",nx="--sf-block-gap",oP="--sf-block-gap-rem",vt={min:0,max:Yo.max,step:Yo.step};function tP(e){if(typeof e!="number"||!Number.isFinite(e))return null;let o=Math.min(Math.max(Math.round(e),vt.min),vt.max);return o-o%vt.step}function Dz(e){let o=tP(e);return o===null?{}:{[nx]:`${o}px`,[oP]:`${o/16}rem`}}var ox="sf-gap-zone",tx="--sf-gap-len";function Ni(e,o){return typeof o=="number"&&Number.isFinite(o)&&o>=Yo.min?!0:typeof o=="string"&&typeof ax[e]?.[o]=="number"}var rP={block:"sf-gap-overlap-block",inline:"sf-gap-overlap-inline",both:"sf-gap-overlap-both"};function _z(e,o,t){if(!Ni(e,o)){let a=`${Qt[e]}px`,n=Q0.has(e)?`var(--sf-card-gap, ${a})`:a;return{className:` ${ox}`,style:{[tx]:`var(${nx}, ${n})`}}}let r=Gr(e,o);return r>=0?{className:` ${ox}`,style:{[tx]:`${r}px`}}:{className:` ${J0} ${rP[t]}`,style:{gap:"0px",[eP]:`${-r/2}px`}}}var lx=["transparent","var(--section-bg)","var(--surface)","var(--surface-2)"],sx={transparent:"No fill","var(--section-bg)":"Section band","var(--surface)":"Panels and cards","var(--surface-2)":"Second surface"},Fn="var(--section-bg)",En="inherit";function Mz(e,o){return e===En?Fn:e===void 0?o:On(e)}var aP=/var\(\s*--(surface-2|surface|line)\s*(?=[,)])/g;function On(e){return e.replace(aP,"var(--site-$1")}function ix(e,o){return e===En?!0:e===void 0&&o===Fn}var fx=["transparent","var(--wheel-stage)","var(--surface)","var(--surface-2)"],cx={transparent:"No fill","var(--wheel-stage)":"Image stage","var(--surface)":"Panels and cards","var(--surface-2)":"Second surface"},Jt="var(--wheel-stage)",Ln="transparent",Ur="inherit";function zz(e,o){return On(Mi(e,o))}function Mi(e,o){return e===Ur?Jt:e==null?o:e===!0?Jt:e===!1?Ln:e}function Gz(e){return typeof e=="string"&&e!==Ur?On(e):Jt}function Uz(e){return e!==Ln&&e!=="none"&&e!==""}function dx(e,o){return e===Ur||e===!0?!0:e==null?o===Jt:!1}var ux="inherit",Rn="fixed",px=e=>typeof e!="number"&&e!==Rn,nP="var(--sf-heading-max, 9999px)";function qz(e,o,t,r){if(typeof e=="number")return`${e}px`;if(e===Rn)return o;let a=r?`var(--size-${r}, ${o})`:o;return t==="heading"?`min(${a}, ${nP})`:a}var pe={min:1e3,max:2e3,step:50,default:1600};function lP(e){return{maxWidth:e,marginInline:"auto",width:"100%"}}var mx="--sf-site-width",Hi=`var(${mx},${pe.default}px)`,Kz=`max-w-[${Hi}]`,Vz=`max-w-[${pe.default}px]`;function sP(e){return typeof e!="number"||!Number.isFinite(e)?pe.default:Math.round(Math.min(Math.max(e,pe.min),pe.max))}function Yz(e){let o=sP(e);return o===pe.default?{}:{[mx]:`${o}px`}}var Co={min:0,max:80,step:4,default:40},xx="--sf-site-gutter",eo=`var(${xx},${Co.default}px)`,iP=`px-[${eo}]`;var Xo={md:`min(24px,${eo})`,sm:`min(20px,${eo})`,frame:`min(24px,${eo})`,tabs:`min(16px,${eo})`},Xz=[[`max-[1100px]:px-[${Xo.md}]`,"max-[1100px]:px-6"],[`max-[1100px]:px-[${Xo.tabs}]`,"max-[1100px]:px-4"],[`max-[960px]:px-[${Xo.frame}]`,"max-[960px]:px-6"],[`max-[900px]:px-[${Xo.md}]`,"max-[900px]:px-6"],[`max-[800px]:px-[${Xo.md}]`,"max-[800px]:px-6"],[`max-[720px]:px-[${Xo.sm}]`,"max-[720px]:px-5"],[`max-[800px]:px-[${Xo.sm}]`,"max-[800px]:px-5"],[`max-[640px]:px-[${Xo.sm}]`,"max-[640px]:px-5"],[`min-[800px]:px-[${eo}]`,"min-[800px]:px-10"],[`max-[720px]:px-[min(24px,${eo})]`,"max-[720px]:px-6"],[`max-[800px]:-mx-[min(20px,${eo})]`,"max-[800px]:-mx-5"],[`max-[720px]:-mx-[min(20px,${eo})]`,"max-[720px]:-mx-5"],[`-mx-[${eo}]`,"-mx-10"],[iP,"px-10"]];var Zz="mx-auto max-w-[var(--sf-site-width,1600px)] px-[var(--sf-site-gutter,40px)] max-[800px]:px-[min(20px,var(--sf-site-gutter,40px))]",Qz="mx-auto max-w-[var(--sf-site-width,1600px)] px-[var(--sf-site-gutter,40px)] max-[1100px]:px-[min(24px,var(--sf-site-gutter,40px))]";function fP(e){return typeof e!="number"||!Number.isFinite(e)?Co.default:Math.round(Math.min(Math.max(e,Co.min),Co.max))}function Jz(e){let o=fP(e);return o===Co.default?{}:{[xx]:`${o}px`}}var Ix=Hi,eG=`max-w-[${Ix}]`,oG=`max-w-[min(var(--sf-page-cap,${pe.default}px),${pe.default}px)]`,hx="--sf-hero-cap",cP=`var(${hx},none)`,tG=`max-w-[${cP}]`,Wi="--sf-hero-bleed-m",zi="--sf-hero-bleed-w",rG=`var(${Wi},calc(50% - 50vw))`,aG=`var(${zi},100vw)`,nG=`mx-[var(${Wi},calc(50%_-_50vw))]`,lG=`w-[var(${zi},100vw)]`,dP="--sf-hero-chrome-x",uP="--sf-hero-chrome-cap";function sG(e){return e===!0?{[hx]:Ix,[Wi]:"auto",[zi]:"100%",[dP]:"24px",[uP]:"none"}:{}}var Gi=`calc(${Hi} - ${eo}*2)`,iG=`max-w-[${Gi.replace(/ /g,"_")}]`;var pP="--sf-chrome-cap",mP=`var(${pP},${Gi})`,fG="data-page-width";function cG(e){return e==="full"?"full":null}function dG(e){return e==="full"?null:lP(e==="content"?Gi:mP)}function uG(e){if(e==="full")return"full";if(e==="content")return"content"}var xP=["contained","page","full"],yx=["full","page"],er={full:"Full width",page:"Content width"},$i="inherit",IP=e=>typeof e=="string"&&xP.includes(e),bx=e=>e===$i;function Bo(e,o){let t=typeof e.pageWidth=="number"?e.pageWidth:pe.default;return bx(e.widthMode)?{mode:"full",pageWidth:t,inherited:!0}:e.widthMode==="contained"?{mode:"page",pageWidth:t,inherited:!1}:IP(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 qi(e){return Bo(e,"page").mode==="full"}var $r="site",Sx={Hero:"hero",HeroSingle:"hero",IntroBleed:"scrollOver",SpecStrip:"background",Timeline:"background",Footprint:"background",Prose:"background",ParagraphsA:"background",Cards:"background",KeyFeatures:"background",Chart:"background",Mockup:"background",Testimonials:"background",TitleWithButtons:"background",Countdown:"background",DocMasthead:"background",DocBody:"background",DocMetaCards:"background",Gallery:"background",GalleryB:"background",Reviews:"background",ReviewForm:"background",Form:"background",AppointmentBooking:"background",FAQ:"background",Events:"background",Split:"both",Breadcrumb:"both",Collections:"both",CatalogFilterBar:"both",AlloyWheelsListing:"both",Banner:"contained",Stats:"contained",Logos:"contained",Divider:"contained",OrderSummary:"contained",DeliveryOptions:"contained",PaymentBadges:"contained",CheckoutCTA:"contained",Flex:"contained",Grid:"contained",Manifesto:"contentColumn",SectionHeader:"contentFull",ProductHero:"contentFull",ProductGrid:"productGrid",TimelineTrack:"capped",DetailRows:"capped",FitmentTable:"capped",TyreSizes:"capped",TyreFitment:"capped",EuTyreLabel:"capped",BundleOffer:"capped",CompatibleTyres:"capped",RelatedProducts:"capped",ProcessSteps:"capped",StatsParagraph:"capped",Masthead:"capped",FeaturedCover:"capped",LongRead:"capped",Series:"capped",ContactLocations:"capped",FitmentFinder:"capped",SpecTable:"capped",Subscribe:"capped",SubscribeBlogs:"capped",ContactRouting:"capped",SubmitBuild:"capped"};function hP(e){return Object.prototype.hasOwnProperty.call(Sx,e)}var Ui=e=>e==="full"||e==="content",gP=e=>typeof e=="number"&&Number.isFinite(e)&&e>0,gx=({widthMode:e,fullWidth:o,pageWidth:t})=>({widthMode:e,fullWidth:o,pageWidth:t});function yP(e,o){let t={background:null,content:null,contentMax:null};switch(e){case"hero":return bx(o.widthMode)||o.widthMode!=="full"?t:{...t,background:"full"};case"scrollOver":return o.fullWidth===!1?t:{...t,content:"full"};case"background":return Bo(o,"full").mode==="full"?t:{...t,background:"content"};case"both":return Bo(o,"full").mode==="full"?{...t,content:"full"}:{...t,background:"content"};case"contained":return Bo(o,"page").mode==="full"?{...t,content:"full"}:{...t,background:"content"};case"contentColumn":return Bo(gx(o),"page").mode==="full"?{...t,content:"full"}:t;case"contentFull":return Bo(gx(o),"full").mode==="full"?{...t,content:"full"}:t;case"productGrid":{let r=Bo(o,"full");return r.mode==="full"?{...t,content:"full"}:{background:"content",content:"content",contentMax:r.pageWidth}}case"capped":return{...t,background:"content"}}}function ji(e,o){if(!hP(e))return{background:null,content:null,contentMax:null};let t=Sx[e],r=o,a=yP(t,r),n=r.backgroundWidth===$r?null:Ui(r.backgroundWidth)?r.backgroundWidth:a.background;return r.contentWidth===$r?{background:n,content:null,contentMax:null}:Ui(r.contentWidth)?{background:n,content:r.contentWidth,contentMax:r.contentWidth==="content"&&gP(r.contentMax)?r.contentMax:null}:{background:n,content:a.content,contentMax:a.contentMax}}var Cx="siteWidths";function An(e){return Ui(e)?e:null}function wx(e,o){return{[Cx]:{background:An(e),content:An(o)}}}function xG(e){let o=e.puck?.metadata?.[Cx];return{background:An(o?.background),content:An(o?.content)}}import{jsx as bP}from"react/jsx-runtime";import{createContext as SP,useContext as CP}from"react";var wP=2,vP=wP+1,vx=SP(2);function kx({tier:e,children:o}){return bP(vx.Provider,{value:e,children:o})}function Tx(e){let o=CP(vx);return vP+Math.max(0,e-o)}import{withStyleKind as RF}from"efficient-easel/style-clipboard";import{useEaselSession as AF}from"efficient-easel/screen/lib/session-context";var Ki=e=>!!e&&typeof e=="object"&&typeof e.type=="string"&&!!e.props&&typeof e.props=="object";function Vi(e,o){let t=e.components[o]?.label;return typeof t=="string"&&t.trim()?t.trim():o}function kP(e){return e.length>3&&e.endsWith("s")?e.slice(0,-1):e}function Yi(e,o,t,r){e.forEach((a,n)=>{if(Ki(a)){r.push({node:a,list:e,index:n,parent:o,slot:t});for(let[s,i]of Object.entries(a.props))Array.isArray(i)&&i.some(Ki)&&Yi(i,a,s,r)}})}function TP(e){let o=[];Yi(Array.isArray(e.content)?e.content:[],null,"",o);for(let t of Object.values(e.zones??{}))Array.isArray(t)&&Yi(t,null,"",o);return o}function Fx(e,o){return TP(e).find(t=>String(t.node.props.id)===o)}function Ex(e,o,t){if(!t)return null;let r=Fx(o,t);if(!r)return null;let a=Vi(e,r.node.type),n=r.parent?`${Vi(e,r.parent.type)} \xB7 ${kP(r.slot)} ${r.index+1}`:a;return{blockId:t,type:r.node.type,label:n,path:""}}var Ox="sfDescribedAs";function Zo(e,o){return{...e,[Ox]:o}}var PP=e=>e.filter(o=>!!o&&typeof o=="object"&&"value"in o).map(o=>typeof o.label=="string"?{value:o.value,label:o.label}:{value:o.value});function FP(e){if(!e||typeof e!="object")return null;let o=e;if(typeof o.type!="string")return null;let t=o.type==="custom"?o[Ox]:void 0,r={type:t?.type??o.type},a=t?.label??o.label;typeof a=="string"&&(r.label=a);let n=t?.options??o.options;Array.isArray(n)&&(r.options=PP(n));for(let s of["arrayFields","objectFields"]){let i=t?.[s]??o[s];i&&typeof i=="object"&&(r[s]=Lx(i))}return r}function Lx(e){let o={};for(let[t,r]of Object.entries(e??{})){let a=FP(r);a&&(o[t]=a)}return o}function Rx(e){let o={};for(let[t,r]of Object.entries(e.components))r&&(o[t]={label:Vi(e,t),fields:Lx(r.fields)});return o}function EP(e,o){let t=e;for(let r of o?o.split("."):[]){let a=/^([A-Za-z_][A-Za-z0-9_]*)(?:\[(\d+)\])?$/.exec(r);if(!a||!t||typeof t!="object")return null;t=t[a[1]],a[2]!==void 0&&(t=Array.isArray(t)?t[Number(a[2])]:void 0)}return t&&typeof t=="object"&&!Array.isArray(t)?t:null}function Xi(e,o){return e.findIndex(t=>Ki(t)&&String(t.props.id)===o)}function Px(e,o,t){let r=o||t;if(!r)return e.length;let a=Xi(e,r);if(a<0)throw new Error(`there is no top-level block ${r}`);return o?a+1:a}function Ax(e,o,t,r){let a=structuredClone(o),n=Array.isArray(a.content)?a.content:a.content=[];try{t.forEach((s,i)=>{let f=d=>{throw new Error(`change ${i+1}: ${d}`)};switch(s.op){case"set_props":{let d=Fx(a,s.block_id)??f(`there is no block ${s.block_id}`);"id"in s.props&&f("a block's id is never changed");let p=EP(d.node.props,s.path)??f(`there is no ${s.path} in that block`);Object.assign(p,structuredClone(s.props));break}case"insert_block":{let d=e.components[s.type]??f(`there is no block type ${s.type}`),p=d.defaultProps&&typeof d.defaultProps=="object"?d.defaultProps:{},m={type:s.type,props:{...structuredClone(p),...structuredClone(s.props),id:r(s.type)}};n.splice(Px(n,s.after,s.before),0,m);break}case"remove_block":{let d=Xi(n,s.block_id);d<0&&f(`there is no top-level block ${s.block_id}`),n.splice(d,1);break}case"move_block":{let d=Xi(n,s.block_id);d<0&&f(`there is no top-level block ${s.block_id}`);let[p]=n.splice(d,1);n.splice(Px(n,s.after,s.before),0,p);break}default:f(`"${s.op}" is not a change this editor makes`)}})}catch(s){return{ok:!1,reason:s instanceof Error?s.message:String(s)}}return{ok:!0,document:a}}import{TEXT_CONTROL_KINDS as DU,SCALAR_TEXT_CONTROLS as _U}from"efficient-easel/draw";function et(e){for(let[o,t]of Object.entries(e))t&&typeof t=="object"&&!No(t)&&RF(t,`section:${o}`);return e}function oI(){return null}function rf(e){if(!e.trim())throw new Error("noGlyph() needs a reason naming the ruling that decided it.");return h(oI,{},e)}function BF(e){return e.type===oI}function wo(e){return BF(e)?void 0:e}function Tt(e,o){return l("{value} from {from}",{value:e,from:o})}function DF(){let{appState:e}=Kr(a=>a),o=e.data.root?.props??{},{mode:t,pageWidth:r}=Bo(o,"full");return t==="page"?Tt(`${r}px`,l("the page")):t==="contained"?Tt(l("Contained"),l("the page")):Tt(l("Full"),l("the page"))}function _F(){let{blockGap:e}=V();return e===null?l("this container's own spacing"):Tt(`${e}px`,l("Styles"))}function NF({inherited:e,onReset:o,label:t}){return h(Ee,{words:X()?.panel,label:l(t),changed:!e,detail:_F(),onReset:o})}function MF({inherited:e,onReset:o,label:t}){return h(Ee,{words:X()?.panel,label:l(t),changed:!e,detail:DF(),onReset:o})}function Pt({value:e,onChange:o,label:t,placeholder:r,hint:a,multiline:n,hideable:s=!0,markup:i=!0}){let{text:f,hidden:d}=Jo(e),p=Ji(null),m=Ji(null),x=C=>o(s?{text:C,hidden:d}:C),I=()=>o({text:f,hidden:!d}),y=s&&d,w=LP(),v=a?UF(a)?h("span",{className:"sf-hint-keep sf-hint-while-typing",children:l(a)}):h(Xu,{children:l(a)}):void 0,k=d?l("Show {label} on the slide",{label:l(t)}):l("Hide {label} on the slide",{label:l(t)});return h(re,{label:l(t),icon:h(dF,{}),htmlFor:w,className:y?"is-hidden":void 0,hint:v,action:s?h(eI,{content:k,children:h("button",{type:"button",className:"sf-field-eye","aria-pressed":d,"aria-label":k,onClick:I,children:d?h(Bx,{name:"eye-off",size:14}):h(Bx,{name:"eye",size:14})})}):void 0,children:Do("div",{className:"sf-copybox",children:[i&&h(ri,{target:n?m:p,value:f,onChange:x}),n?h("textarea",{id:w,ref:m,value:f,placeholder:r===void 0?void 0:l(r),onChange:C=>x(C.target.value)}):h("input",{id:w,ref:p,type:"text",value:f,placeholder:r===void 0?void 0:l(r),onChange:C=>x(C.target.value)})]})})}function OU(e,o){return{...e,[DP]:o}}function LU(e){let o=e[_o];if(!o)throw new Error("withOffPage: the field holds no authored text");return{...e,[_o]:{...o,offPage:!0}}}function _n(e){return!e||typeof e!="object"?!1:e[_o]?.offPage===!0}var tI="sfPanelOnly";function RU(e){if(!e[_o])throw new Error("withPanelOnly: the field holds no authored text");return{...e,[tI]:!0}}function rI(e){return!!e&&typeof e=="object"&&e[tI]===!0}function AU(e){let o=e[_o];if(!o)throw new Error("withIdentifier: the field holds no authored text");return{...e,[_o]:{...o,identifier:!0}}}function NU(e,o){if(!e[_o])throw new Error("inOwnBox: the field holds no authored text");let{[OF]:t,...r}=e;return{...r,[ai]:!0,render:o}}var HF=new Set(LF),ef={type:"radio",options:[{value:!0},{value:!1}]},aI={text:{type:"object",objectFields:{text:{type:"text"},hidden:ef}},textarea:{type:"object",objectFields:{text:{type:"textarea"},hidden:ef}},plainText:{type:"text"},copyText:{type:"text"},plainTextarea:{type:"textarea"},textList:{type:"array",arrayFields:{text:{type:"text"}}}},Ft=(e,o)=>{let t=Zo({...o,[_o]:e},{...aI[e.control],label:e.label});if(!HF.has(e.control))return t;let r=o.render;return{...Vr(t,"authored-copy"),render:a=>h(Dp,{name:a.name,children:r(a)})}},MU="Everything else on this block comes from the linked post. Unlink it to edit by hand.",WF={field:"source.slug",set:!0},HU={not:WF},zF="Select a word, then press the highlighter.",GF=new Set([zF]),UF=e=>GF.has(e);function WU(e,o,t){return Ft({control:"text",label:e,placeholder:o,hint:t},{type:"custom",render:({value:r,onChange:a})=>h(Pt,{value:r,onChange:a,label:e,placeholder:o,hint:t})})}function zU(e,o,t){return Ft({control:"textarea",label:e,placeholder:o,hint:t},{type:"custom",render:({value:r,onChange:a})=>h(Pt,{value:r,onChange:a,label:e,placeholder:o,hint:t,multiline:!0})})}function GU(e,o,t){return Ft({control:"plainText",label:e,placeholder:o,hint:t},{type:"custom",render:({value:r,onChange:a})=>h(Pt,{value:r,onChange:a,label:e,placeholder:o,hint:t,hideable:!1,markup:!1})})}function UU(e,o,t){return Ft({control:"copyText",label:e,placeholder:o,hint:t},{type:"custom",render:({value:r,onChange:a})=>h(Pt,{value:r,onChange:a,label:e,placeholder:o,hint:t,hideable:!1})})}function $U(e){return{type:"custom",[AP]:{label:e},...Zo({},{type:"text",label:e}),render:({value:o,onChange:t})=>h(Rm,{value:RP(o),onChange:t,label:e})}}function qU(e,o,t){return Ft({control:"plainTextarea",label:e,placeholder:o,hint:t},{type:"custom",render:({value:r,onChange:a})=>h(Pt,{value:r,onChange:a,label:e,placeholder:o,hint:t,multiline:!0,hideable:!1})})}var nI={Design:_P,Animation:Gx};function lI(e,o){return e.includes("Design")?o!=="Design":null}function sI(e,o){return{type:"custom",[tf]:{label:e,level:o},marker:!0,fold:e,render:()=>h(oo,{})}}function ve(e){return sI(e,2)}function jU(e){return{type:"custom",render:()=>h($F,{text:e})}}function $F({text:e}){return h("p",{className:"sf-note",children:l(e)})}function KU(e){return sI(e,1)}function VU(e){return No(e)!==null&&e?.tabs!==void 0}var Dx=new Map;function Nn(e,o){let t=`${e}\0${o?o.join(""):""}`,r=Dx.get(t)??{type:"custom",tabs:o,[tf]:{label:e,level:1},bucket:e,marker:!0,render:()=>h(oo,{})};return Dx.set(t,r),r}var _x=new Map;function af(e){let o=_x.get(e)??{type:"custom",[tf]:{label:e,level:1},designGroup:e,marker:!0,...e==="Content"?{}:{fold:e},render:()=>h(oo,{})};return _x.set(e,o),o}function qF(e){let o=e;return o?.marker===!0&&typeof o.fold=="string"?o.fold:null}function iI(e,o){return qF(e)===o?e:{...e,marker:!0,fold:o,render:()=>h(oo,{})}}function fI(e){let o=e;if(o.marker===!0&&o.fold===void 0)return e;let{fold:t,...r}=e;return{...r,marker:!0,render:()=>h(oo,{})}}function nf({title:e,children:o}){let[t,r]=jr(()=>!Qi.has(e));return h(mF,{title:e,open:t,onToggle:a=>{r(a),a?Qi.delete(e):Qi.add(e)},children:o})}var Qi=new Set;function YU({label:e}){return h(xF,{title:l(e),level:Tx(2)})}function cI({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 Do("div",{className:"sf-swatches",children:[e.map(i=>{let f=r?.[i]?l(r[i]):i;return h(eI,{content:f,children:h("button",{type:"button","aria-pressed":o.toLowerCase()===i.toLowerCase(),className:`sf-swatch ${o.toLowerCase()===i.toLowerCase()?"is-active":""}`,style:{background:i},onClick:()=>t(i),"aria-label":f})},i)}),h("span",{className:"sf-swatch-hex",children:s})]})}function XU(e,o){return{type:"custom",render:({value:t,onChange:r})=>{let a=ix(t,o);return h(re,{label:l(e),icon:h(WP,{}),changed:!a,action:h(Ee,{words:X()?.panel,label:l(e),changed:!a,detail:l("the theme's section background"),onReset:()=>r(En)}),children:cI({swatches:lx,current:a?Fn:t??o??"",onPick:r,names:sx})})}}}function jF(e,o){return{type:"custom",render:({value:t,onChange:r})=>{let a=t,n=dx(a,o);return h(re,{label:l(e),icon:h(JP,{}),changed:!n,action:h(Ee,{words:X()?.panel,label:l(e),changed:!n,detail:l("the theme's image stage"),onReset:()=>r(Ur)}),children:cI({swatches:fx,current:n?Jt:Mi(a,o),onPick:r,names:cx})})}}}function Mn(e=t=>t,o){return et({_gSectionTheme:ve(cp),sectionAccent:{type:"custom",render:({value:t,onChange:r})=>h(lm,{value:e(t),onChange:r,followLabel:o})}})}function Ae({min:e,max:o,step:t,value:r,onChange:a,suffix:n="",readout:s=!0,notch:i,ariaLabel:f,disabled:d=!1}){let p=i!==void 0&&Number.isFinite(i)&&i>=e&&i<=o;return h("div",{className:p?"sf-slider has-notch":"sf-slider",style:p?{"--sf-notch":(i-e)/(o-e)}:void 0,children:h(EF,{min:e,max:o,step:t,value:r,suffix:n||void 0,showInput:s,label:f===void 0?void 0:l(f),disabled:d,size:"sm",boxSize:"md",className:"sf-slider-track",onChange:m=>{m!==null&&m!==r&&a(m)}})})}function or(e,o,t,r,a,n,s="",i){return{type:"custom",...Zo({},{type:"number",label:e}),render:f=>h(re,{label:l(e),icon:wo(o),action:i?i("storedValue"in f?f.storedValue:f.value,f.onChange):void 0,children:Ae({min:t,max:r,step:a,value:typeof f.value=="number"?f.value:n,suffix:s,ariaLabel:e,onChange:f.onChange})})}}function dI(e,o){let{min:t,max:r,step:a=1,unsetLabel:n,hint:s,restTrack:i,unsetMark:f,icon:d}=o;return{type:"custom",render:({value:p,onChange:m})=>{let x=typeof p=="number"?p:null,I=x===null;return h(re,{label:l(e),icon:d?wo(d):void 0,value:I?f||n===void 0?void 0:l(n):`${x}px`,changed:!I,action:f?zx(f,{changed:!I,onReset:()=>m(null)}):h(Ee,{words:X()?.panel,label:l(e),changed:!I,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}):Ae({min:t,max:r,step:a,value:x??t,readout:!1,ariaLabel:e,onChange:m})})}}}function ZU(e){let o=or("Gap",h($x,{}),Yo.min,Yo.max,Yo.step,Qt[e],"px",(t,r)=>h(NF,{inherited:!Ni(e,t),onReset:()=>r(void 0),label:"Gap"}));return{type:"custom",[rx]:e,render:t=>o.render({...t,value:Gr(e,t.value,t.field?.siteGap),storedValue:t.value,onChange:r=>t.onChange(r)})}}var Hn="Corners";function lf(e){return{type:"custom",render:({value:o,onChange:t})=>{let r=typeof o=="number"&&Number.isFinite(o)?o:null,a=r!==null;return h(re,{label:l(Hn),icon:h(qP,{}),changed:a,action:zx(e.mark,{changed:a,onReset:()=>t(null)}),hint:e.hint,children:h(KF,{tier:e,px:r,onRadius:t})})}}}function Wn(e){let o=null;try{o=of()}catch{o=null}return[o?.values?.[e],t=>o?.onChange(e,t)]}function KF({tier:e,px:o,onRadius:t}){let r=e.useFollowed(),a=e.useClosedReason?e.useClosedReason():null,[n,s]=Wn(e.sidesKey),i=Lo(n)??[...dt];return h(TF,{label:l(Hn),value:i,corners:Lu,onChange:f=>{let d=Lo(f)??[];s(d.length===dt.length?null:d)},radius:o,onRadiusChange:t,radiusMin:Ue,radiusMax:ft,radiusStep:e.step??1,radiusPlaceholder:String(r),disabled:a!==null,disabledReason:a??void 0})}function uI(){return Vr({type:"custom",render:()=>h(Dn,{})},"always")}function VF({label:e,changed:o=!1,onReset:t=()=>{}}){let{cornerRadiusPx:r}=V(),a=typeof r=="number"?`${r}px`:l("not set");return h(Ee,{words:X()?.panel,label:l(e),changed:o,detail:r==null?l("the built-in corners"):Tt(a,l("Styles")),onReset:t})}function YF(){let{cornerRadiusPx:e}=V();return typeof e=="number"?e:Ue}function XF(){return lf({sidesKey:"sectionCornerSides",useFollowed:YF,useClosedReason:()=>mI()?l(pI):null,mark:h(VF,{label:Hn}),hint:h(ZF,{})})}var pI="This section runs edge to edge, so its corners sit off the page. Set Width to Content width to use them.";function mI(){return qi(vo())}function ZF(){return h(oo,{children:mI()?pI:"Follows Styles \u25B8 Basics \u25B8 Corners until you set a number here."})}function zn(){return et({_gShape:ve("Shape"),sectionCorners:XF(),sectionCornerSides:uI(),sectionBorder:Nx("desktop"),sectionBorderPhone:Nx("mobile")})}var QF=()=>({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 JF(e){let o=Object.fromEntries(Object.entries(e).filter(([,t])=>t!=null&&t!==""));return Object.keys(o).length?o:void 0}function e1(){let e;try{let o=He(V().theme);e=o.themes[o.selected]?.line}catch{e=void 0}return e||ou.line}function o1({value:e,onChange:o,tier:t}){let[r]=Wn("sectionBorder"),a=e1(),n=e&&typeof e=="object"?e:{},s=t==="mobile"?r&&typeof r=="object"?r:{}:{},[i,f]=jr(()=>SF(n,s)),d=QF();return h(re,{label:l("Border"),icon:h(zP,{}),action:h(Zx,{each:i,label:l("Each side"),onChange:f}),children:h(IF,{label:l("Border"),value:n,each:i,onChange:p=>o(JF(p)),placeholder:{sides:bF(s),style:s.style??"solid",color:s.color||a},presets:[a],words:d,max:20})})}function Nx(e){return we(e,{type:"custom",render:({value:o,onChange:t})=>h(o1,{value:o,onChange:t,tier:e})})}function Gn(){return{_gMotion:ve("Motion"),sectionAnimation:cf("Entrance",h(Gx,{}),[...up],Zs)}}function sf(){let e=null;try{let{appState:o,selectedItem:t}=Kr(a=>a),r=t?.props?.id?String(t.props.id):void 0;e=r?Js(o?.data,r):null}catch{e=null}return e!==null&&qi(e)}function xI(e){let{cornerRadiusPx:o}=V(),t=sf(),r=typeof o=="number"?o:e,a=null;try{let{appState:s,selectedItem:i}=Kr(d=>d),f=i?.props?.id?String(i.props.id):void 0;a=f?Js(s?.data,f):null}catch{a=null}if(t||!a)return r;let n=a.sectionCorners;return _s(n)?n:r}function t1({label:e,changed:o=!1,onReset:t=()=>{}}){let r=sf(),a=xI(Ue),n=r?"Site":"Section";return h(Ee,{words:X()?.panel,label:l(e),changed:o,detail:Tt(`${a}px`,r?l("Styles"):l("the section")),onReset:t})}function r1(){return h(oo,{children:sf()?l("The section is full width, so this card follows Styles \u25B8 Basics \u25B8 Corners."):l("Follows the section's Corners until you set a number here.")})}function a1(){return lf({sidesKey:"cardCornerSides",useFollowed:()=>xI(Ue),mark:h(t1,{label:Hn}),hint:h(r1,{})})}function n1(){return{type:"custom",render:()=>h(Mu,{})}}function QU(){return{_gShape:ve("Shape"),cardCorners:a1(),cardCornerSides:uI(),cardCornersApplyAll:n1()}}function JU(){return Qo("Justify",h(HP,{}),Ri,Ri[0].value)}function e$(){return Qo("Item alignment",h(NP,{}),Vm,"stretch")}function o$(){return Qo(Ym,h(pF,{}),Ai,Ai[0].value)}function t$(){return{type:"custom",render:({value:e,onChange:o})=>{let t=Pn.find(r=>r.value===e)??Pn[0];return h(re,{label:l(Bi),icon:h(Ux,{}),value:l(t.label),children:h(Jx,{className:"sf-gallery-layouts",label:l(Bi),value:t.value,onChange:o,options:Pn.map(r=>({value:r.value,label:l(r.label),picture:h("span",{className:"sf-gallery-pic",children:l1(r.weights).map((a,n)=>h("i",{style:{gridColumn:`span ${a}`}},n))})}))})})}}}function l1(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 r$(){return Qo(Qm,h($x,{}),_i,_i[0].value)}function a$(){return or(Xm,h(nF,{}),Di,Zm,1,Di)}function n$(e){let o=cf(Um,rf("`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)."),qm(e),Tn(e,void 0));return{type:"custom",render:t=>o.render({...t,value:Tn(e,t.value),onChange:r=>t.onChange(r)})}}function l$(e,o,t,r,a,n){return{type:"custom",render:({value:s,onChange:i})=>h(re,{label:l(e),icon:h(Ks,{noun:n}),action:h(Ee,{words:X()?.panel,label:l(e),changed:!px(s),detail:l("the Text style in Styles"),onReset:()=>i(ux),defaultAction:{onPress:()=>i(Rn),title:l("Keep this section's own built-in size"),icon:h(GP,{})}}),children:Ae({min:o,max:t,step:r,value:typeof s=="number"?s:a,suffix:"px",ariaLabel:e,onChange:i})})}}function s$(){return{_gCellWidth:ve("Cell width"),gridSpan:Qo("Positions",h(Ux,{}),[{label:"Auto",value:""},...Array.from({length:Ja},(e,o)=>({label:o===0?"1 position":`${o+1} positions`,value:String(o+1)}))],"")}}function vo(){let e=null;try{e=Kr(o=>o).selectedItem}catch{e=null}return e?.props??{}}function s1({min:e,max:o,step:t,px:r,label:a,onChange:n,desktopKey:s,fallback:i}){let f=vo()[s],d=cn(void 0,f,i);return h(oo,{children:Ae({min:e,max:o,step:t,value:cn(r,f,i),readout:!1,ariaLabel:a,notch:d,onChange:n})})}function i1({label:e,desktopKey:o,fallback:t,changed:r=!1,onReset:a=()=>{}}){let n=vo()[o],s=cn(void 0,n,t);return h(Ee,{words:X()?.panel,label:l(e),changed:r,detail:l("{value} on desktop",{value:`${s}px`}),onReset:a})}function f1(e){return dI(e.label,{icon:e.icon,min:e.min,max:e.max,step:e.step,unsetLabel:"Follows Desktop",unsetMark:h(i1,{label:e.label,desktopKey:e.desktopKey,fallback:e.fallback}),restTrack:o=>h(s1,{...o,desktopKey:e.desktopKey,fallback:e.fallback})})}function i$(e){return{type:"custom",render:({value:o,onChange:t})=>h(d1,{...e,value:o,onChange:t})}}function c1({label:e,icon:o,options:t,value:r,resolved:a,restWord:n,onChange:s}){let i=t.some(f=>f.value===r);return h(re,{label:l(e),icon:wo(o),action:h(Ee,{words:X()?.panel,label:l(e),changed:i,detail:l("{value} on desktop",{value:l(n)}),onReset:()=>s(void 0)}),children:Kn({options:t,value:i?r:a,onChange:f=>s(f),ariaLabel:e})})}function d1({label:e,icon:o,options:t,desktopKey:r,resolve:a,value:n,onChange:s}){let i=vo()[r],f=a(void 0,i),d=t.find(p=>p.value===f)?.label??"";return h(c1,{label:e,icon:o,options:t,value:n,resolved:f,restWord:d,onChange:s})}var u1={Top:"Padding top",Bottom:"Padding bottom",Left:"Padding left",Right:"Padding right"},p1={Top:Yx,Bottom:jx,Left:Kx,Right:Vx},m1=e=>{let o=p1[e];return h(o,{})};function f$(e={}){let o=e.keys?.top??"sectionPaddingTop",t=e.keys?.bottom??"sectionPaddingBottom",r=e.group!==!1,a=v=>u1[v],n=v=>or(a("Top"),h(Yx,{}),Je.min,Je.max,Je.step,v,"px"),s=(v,k,C,g=Je)=>we("mobile",f1({label:a(v),icon:m1(v),desktopKey:k,min:g.min,max:g.max,step:g.step,fallback:C})),i=e.top??Je.min,f=e.bottom??Je.min,d="sectionPaddingLeft",p="sectionPaddingRight",m=e.sideBounds??Je,x=e.side??m.min,I=e.sidePhone??x,y=e.phone===!0,w=v=>y?we("desktop",v):v;return et({...r?{_gSpacing:ve("Padding")}:{},[o]:w(n(i)),...y?{[Ao(o)]:s("Top",o,i)}:{},...e.only==="top"?{}:{[t]:w(or(a("Bottom"),h(jx,{}),Je.min,Je.max,Je.step,f,"px")),...y?{[Ao(t)]:s("Bottom",t,f)}:{}},...e.sides?{[d]:w(or(a("Left"),h(Kx,{}),m.min,m.max,m.step,x,"px")),...y?{[Ao(d)]:s("Left",d,I,m)}:{},[p]:w(or(a("Right"),h(Vx,{}),m.min,m.max,m.step,x,"px")),...y?{[Ao(p)]:s("Right",p,I,m)}:{}}:{}})}var qr=["top","right","bottom","left"],x1={top:"sectionPaddingTop",right:"sectionPaddingRight",bottom:"sectionPaddingBottom",left:"sectionPaddingLeft"},Mx=e=>typeof e=="number"?e:null;function I1(e,o,t){let r={};for(let a of qr)t[a]!==o[a]&&(r[e[a]]=t[a]??void 0);return r}function h1({tier:e,o}){let t=null;try{t=of()}catch{t=null}let r=t?.values??{},a=e==="mobile"?o.phoneKeys:o.keys,n=Object.fromEntries(qr.map(d=>[d,Mx(r[a[d]])])),s=Object.fromEntries(qr.map(d=>[d,String(e==="mobile"?Mx(r[o.keys[d]])??o.fallback[d]:o.fallback[d])])),[i,f]=jr(()=>yF(n,s));return h(re,{label:l("Padding"),icon:h(aF,{}),action:h(Zx,{each:i,label:l("Each side"),onChange:f}),children:h(gF,{label:l("Padding"),each:i,value:n,placeholder:s,min:o.min,max:o.max,step:o.step,onChange:d=>{let p=I1(a,n,d);Object.keys(p).length&&t?.onChangeMany(p)},words:{sides:{top:l("Padding top"),right:l("Padding right"),bottom:l("Padding bottom"),left:l("Padding left")},vertical:l("Top and bottom"),horizontal:l("Left and right"),unit:"px"}})})}function Un(e={}){let o={...x1,...e.keys},t={keys:o,phoneKeys:Object.fromEntries(qr.map(i=>[i,Ao(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 f={type:"custom",render:()=>h(h1,{tier:i,o:t})};return r?we(i,f):f},n=()=>Vr({type:"custom",render:()=>h(Dn,{})},"always"),s=qr.filter(i=>i!=="top");return et({...e.group===!1?{}:{_gSpacing:ve("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],we("mobile",n())])):{}})}var Hx=e=>typeof e=="number"?e:null;function g1(e,o,t){let r={};for(let a of["x","y"])t[a]!==o[a]&&(r[e[a]]=t[a]??void 0);return r}function y1({o:e}){let o=null;try{o=of()}catch{o=null}let t=o?.values??{},r={x:Hx(t[e.keys.x]),y:Hx(t[e.keys.y])},a=l(e.label??"Position"),n=!!(r.x||r.y),s=d=>{let p=g1(e.keys,r,d);Object.keys(p).length&&o?.onChangeMany(p)},i=h(FF,{label:a,value:r,onChange:s,words:{x:l("Left and right"),y:l("Up and down"),unit:"px"},placeholder:{x:"0",y:"0"},min:e.min,max:e.max,step:e.step??1}),f=h(Ee,{words:X()?.panel,label:a,changed:n,detail:"0 px, 0 px",onReset:()=>s({x:null,y:null})});return e.label===null?Do("div",{className:"sf-position-line",children:[i,f]}):h(re,{label:a,icon:h(rF,{}),changed:n,action:f,children:i})}function c$(e){return{[e.keys.x]:{type:"custom",render:()=>h(y1,{o:e})},[e.keys.y]:{...Vr({type:"custom",render:()=>h(Dn,{})},"always"),reachedBy:e.keys.x}}}var b1={contained:"Contained",page:"Page",full:"Full"},Bn="Width";function $n(e,o=yx,t=!0){let r=o.map(a=>({label:er[a]??b1[a],value:a}));return et({...t?{_gWidth:ve(Bn)}:{},widthMode:{type:"custom",render:({onChange:a,field:n})=>h(re,{label:l(Bn),icon:h(uF,{}),action:t?h(MF,{inherited:n?.inherited??!1,onReset:()=>a($i),label:Bn}):void 0,children:Kn({options:r,value:n?.currentValue||e,onChange:a,ariaLabel:Bn})})}})}function qn(){let e=r=>({type:"custom",render:({value:a,onChange:n})=>h(re,{label:Zt,icon:wo(h(eF,{})),action:r?r(n):void 0,children:Kn({options:[{label:"Auto",value:"auto"},{label:"Fixed",value:"fixed"},{label:"Screen",value:"screen"}],value:["auto","fixed","screen"].includes(a)?a:"auto",onChange:n,ariaLabel:Zt})})}),o=()=>({type:"custom",render:({value:r,onChange:a,field:n})=>{let s=n?.unit==="%"?"%":"px",i=s==="%"?Fi:Pi;return h("div",{className:"sf-field",children:Ae({min:i.min,max:i.max,step:i.step,value:typeof r=="number"?r:i.fallback,suffix:s,ariaLabel:Zt,onChange:a})})}}),t=()=>cf("Unit",h(qx,{}),[{label:"px",value:"px"},{label:"%",value:"%"}],"px");return et({_gHeight:ve(Zt),sectionHeightMode:we("desktop",e()),sectionHeightValue:we("desktop",o()),sectionHeightUnit:we("desktop",t()),sectionHeightModePhone:we("mobile",e(r=>h(S1,{onClear:()=>r(void 0)}))),sectionHeightValuePhone:we("mobile",o()),sectionHeightUnitPhone:we("mobile",t())})}function S1({onClear:e}){let o=vo(),t=Ei(o),r=vn(o),a=l("{value} on desktop",{value:r.mode==="auto"?l("Auto"):`${r.value}${r.unit}`});return h(Ee,{words:X()?.panel,label:l(Zt),changed:t,detail:a,onReset:e})}function ff(){let e=t=>({type:"custom",render:({value:r,onChange:a,id:n,name:s})=>h(C1,{value:r,onChange:a,labelId:`${n??s??"stickTop"}-label`,phone:t})}),o=()=>({type:"custom",render:({value:t,onChange:r})=>h("div",{className:"sf-field",children:Ae({min:Vo.min,max:Vo.max,step:Vo.step,value:typeof t=="number"?t:Vo.fallback,suffix:"px",ariaLabel:l("Distance from top"),onChange:r})})});return{_gStick:ve(kn),stickTop:we("desktop",e(!1)),stickTopDistance:we("desktop",o()),stickTopPhone:we("mobile",e(!0)),stickTopDistancePhone:we("mobile",o())}}function C1({value:e,onChange:o,labelId:t,phone:r}){let a=vo(),n=Li(a),s=r?n.phone:e===!0;return h(re,{label:l(kn),labelId:t,icon:wo(h(iF,{})),action:Do(oo,{children:[r?h(Ee,{words:X()?.panel,label:l(kn),changed:Oi(a),detail:l("{value} on desktop",{value:n.desktop?`${n.desktopDistance}px`:l("Off")}),onReset:()=>o(void 0)}):null,h(Qx,{checked:s,onChange:o,ariaLabelledBy:t})]})})}var Wx="e.g. about";function jn(){return{_gAnchor:ve("Anchor"),anchor:Ft({control:"plainText",label:"Name",placeholder:Wx},{type:"custom",render:({value:e,onChange:o})=>h(lp,{value:e,onChange:o,nameBox:(t,r)=>h(Pt,{value:t,onChange:r,label:"Name",placeholder:Wx,hideable:!1,markup:!1})})})}}function d$(e,o,t){return{type:"custom",render:({value:r,onChange:a,id:n,name:s})=>{let i=`${n??s??e}-datetime`,f=Date.parse(typeof r=="string"?r:"");return h(re,{label:l(e),icon:o,htmlFor:i,hint:t===void 0?void 0:l(t),children:h(PF,{id:i,value:Number.isFinite(f)?new Date(f):null,onChange:d=>a(d?d.toISOString():"")})})}}}function kt(e,o,t){return{type:"custom",...Zo({},{...ef,label:e}),render:({value:r,onChange:a,id:n,name:s})=>{let i=typeof r=="boolean"?r:o,f=`${n??s??e}-label`;return h(re,{label:l(e),labelId:f,icon:t,action:h(Qx,{checked:i,onChange:a,ariaLabelledBy:f})})}}}function u$(){return{type:"custom",render:({value:e,onChange:o,id:t,name:r})=>{let a=`${String(t??r??"pageBackground")}-colour`;return h(qe,{label:l("Background"),icon:h(Xx,{}),id:a,value:Vs(e),onChange:o})}}}var p$={follows:"fill"},m$={follows:"ink"};function x$(e,o,t){if(typeof o!="string"){let r=o.follows;return{type:"custom",render:({value:a,onChange:n})=>h(w1,{label:e,part:r,icon:t,value:a,onChange:n})}}return{type:"custom",render:({value:r,onChange:a})=>h(qe,{label:l(e),icon:t,value:r||o,onChange:a})}}function w1({label:e,part:o,icon:t,value:r,onChange:a}){let n=lu(V().theme),s=o==="fill"?n.fill:n.ink;return h(sn,{label:l(e),icon:t,value:r||"",inherited:s,resetTo:Tt(s.toUpperCase(),l("Styles")),onChange:a,onReset:()=>a("")})}var v1=[{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 II({label:e,value:o,onChange:t,points:r=v1}){let a=r.map(n=>({...n,label:l(n.label),...n.title?{title:l(n.title)}:null}));return h(kF,{label:l(e),value:o,points:a,onChange:t})}function I$(){return Vr({type:"custom",render:()=>h(Dn,{})},"always")}var k1=Gs([]);function h$(e,{stacking:o,fallback:t=en}){return{type:"custom",render:({value:r,onChange:a})=>{let n=$o.includes(r)?r:t;return o?h(T1,{label:e,value:n,onChange:a}):hI({label:e,value:n,onChange:a,points:k1})}}}function T1({label:e,value:o,onChange:t}){let{appState:r,selectedItem:a}=Kr(i=>i),n=a?.props?.id?String(a.props.id):void 0,s=n?$s(r?.data,n):[];return hI({label:e,value:o,onChange:t,points:Gs(s,n)})}function hI({label:e,value:o,onChange:t,points:r}){let a=r.find(n=>n.disabled);return h(re,{label:l(e),icon:h(lF,{}),hint:a?.title?l(a.title):void 0,children:II({label:e,value:ut(o),onChange:t,points:r})})}var g$={top:h(YP,{}),right:h(VP,{}),bottom:h(jP,{}),left:h(KP,{})};function y$(e,o,t,r,a,n){let s=p=>o.find(m=>m.value===p),i=p=>({value:p,label:"",disabled:!0,title:r}),f=p=>{let m=o.find(I=>I.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}},d=[i("corner-top-left"),f("top"),i("corner-top-right"),f("left"),i("centre"),f("right"),i("corner-bottom-left"),f("bottom"),i("corner-bottom-right")];return{type:"custom",render:({value:p,onChange:m})=>{let x=o.some(I=>I.value===p)?p:t;return h(re,{label:l(e),icon:a,value:s(x)?.label?l(s(x).label):"",children:II({label:e,value:x,onChange:m,points:d})})}}}var P1="\0note";function Qo(e,o,t,r,a){return{type:"custom",options:t,fallback:r,...a?{note:a}:{},...Zo({},{type:"select",label:e}),render:({value:n,onChange:s,field:i})=>{let f=i.options??t,d=i.fallback??r,p=f.some(m=>m.value===n)?n:d;return h(re,{label:l(e),icon:wo(o),children:h(CF,{value:p,ariaLabel:l(e),onChange:s,options:[...a?[{label:l(a),value:P1,disabled:!0}]:[],...f.map(m=>({label:l(m.label),value:m.value}))]})})}}}function b$(e,o,t){return{type:"custom",options:o,render:({value:r,onChange:a,field:n})=>h($p,{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 S$(e,o={}){return{type:"custom",render:({value:t,onChange:r})=>{let a={value:t,onChange:r,...o};return h(e,{...a})}}}function Kn({options:e,value:o,onChange:t,ariaLabel:r,disabled:a=!1}){return h(hF,{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 C$=[{label:"Image",value:"image"},{label:"Video",value:"video"}];function cf(e,o,t,r){let a=t.map(n=>typeof n=="string"?{label:n,value:n}:n);return{type:"custom",...Zo({},{type:"radio",label:e,options:a.map(n=>({value:n.value,label:n.label}))}),render:({value:n,onChange:s,field:i})=>h(re,{label:l(e),icon:wo(o),children:Kn({options:a,value:a.some(f=>f.value===n)?n:n||i?.currentValue||r,onChange:s,ariaLabel:e})})}}function w$(e,o,t,r={}){return{type:"custom",[BP]:!0,render:({value:a,onChange:n})=>h(Gp,{value:a||"",onChange:n,label:e,accept:o,placeholder:t,focusKey:r.focus,focusWhen:r.focusWhen})}}function v$({value:e,onChange:o,label:t}){let r=e||{},a=!!r.pending,n=a?"var(--fg-dim, #888)":r.ok?"#1d9e75":"#d85a30",s=!!Se(AF()).geocode,i=(f,d)=>o({...r,[f]:d===""?void 0:Number(d)});return Do(re,{label:l(t),icon:h(Zi,{}),children:[s&&Do(oo,{children:[h("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&&h("div",{style:{marginTop:6,fontSize:12,lineHeight:1.4,color:n},children:l(r.status)}),h("div",{style:{marginTop:6,fontSize:11,color:"var(--fg-dim, #999)"},children:l("Coordinates from OpenStreetMap")})]}),h("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&&Do("div",{style:{marginTop:8,display:"grid",gap:8},children:[h(re,{label:l("Latitude"),icon:h(Zi,{}),children:h("input",{type:"number",step:"any",placeholder:l("e.g. {example}",{example:"34.0990198"}),value:typeof r.lat=="number"?r.lat:"",onChange:f=>i("lat",f.target.value)})}),h(re,{label:l("Longitude"),icon:h(Zi,{}),children:h("input",{type:"number",step:"any",placeholder:l("e.g. {example}",{example:"-117.9842833"}),value:typeof r.lng=="number"?r.lng:"",onChange:f=>i("lng",f.target.value)})})]})]})}function F1(e,o){return o===null||o<0||o>=e.length?"":e[o]?.text??""}function E1(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 O1(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 df={label:"Ticker items",icon:h(tF,{})};function k$(e,o,t,r){return{type:"custom",[_o]:{control:"textList",label:e,placeholder:t,itemKey:"text",rendering:r},...Zo({},{...aI.textList,label:e}),render:({value:a,onChange:n})=>h(uf,{label:e,icon:wo(o),items:Array.isArray(a)?a:[],placeholder:t,onChange:n,markup:r==="markup"})}}function uf({label:e,icon:o,items:t,placeholder:r,onChange:a,markup:n=!1}){let s=Ji(null),[i,f]=jr(null),d=m=>m.map(x=>({text:x?.text??""})),p=m=>{let x=O1(t,m,i);x===null&&(s.current=null),f(x),a(d(m))};return h(wF,{label:l(e),icon:o,noun:l("item"),items:t,onChange:p,newItem:()=>({text:""}),open:null,onOpen:()=>{},renderItem:()=>null,above:n?h(ri,{target:s,value:F1(t,i),onChange:m=>a(E1(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,I)=>h("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:y=>I({text:y.target.value}),onFocus:y=>{s.current=y.currentTarget,f(x)}})})}function gI(e,o){let t=`${e.label} \u2014 row ${o+1}`;return Ft({control:"plainText",label:t,placeholder:e.placeholder,offPage:e.offPage},{type:"custom",render:({value:r,onChange:a})=>h(Pt,{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 yI(e){return{_gCards:ve("Cards"),coverIndex:Qo("Cover image",h(oF,{}),Np,String(1),e?.coverHint??"A card's opening picture \u2014 a card pinned to a finish keeps its own."),imageBackground:jF("Image background",Ln),cardImage:R1(),spinOnHover:kt("Rotate on hover",e?.spinDefault??!0,h(fF,{}))}}function bI(){return{outline:Qo("Card outline",h(cF,{}),ci,ii),indexBadge:Qo("Card number",h(qx,{}),fi,si),showBadge:kt("Product badge",!0,h(Ks,{noun:"tag"}))}}function SI(e){let o=e&&"bottomDefault"in e?e.bottomDefault:!0,t=e&&"defaults"in e?e.defaults:{showCardSizes:o,showCardBuy:o,showCardPage:o};return{_gShowOnCard:ve("Show on a card"),showCardPrice:kt("Price",!0,h(XP,{})),showCardFinishes:kt("Finish swatches",!0,h(ZP,{})),showCardSizes:kt("Sizes",t.showCardSizes,h(sF,{})),showCardBuy:kt("Buy button",t.showCardBuy,h(UP,{})),showCardPage:kt("Page button",t.showCardPage,h(Xx,{}))}}function T$(e,o="display"){let t=Ao(o);return{[o]:we("desktop",{type:"custom",render:({value:r,onChange:a})=>h(CI,{parts:e,changed:mp(r),shown:n=>ln(r,n),onPress:(n,s)=>a(Ip(r,n,s)),onReset:()=>a(void 0)})}),[t]:we("mobile",{type:"custom",render:({value:r,onChange:a})=>h(L1,{parts:e,desktopKey:o,value:r,onChange:a})})}}function CI({parts:e,changed:o,shown:t,onPress:r,onReset:a,detail:n}){let s=l("Display");return h(re,{label:s,icon:h(MP,{}),changed:o,action:h(Ee,{words:X()?.panel,label:s,changed:o,detail:n,onReset:a}),children:h(vF,{label:s,items:e.map(i=>({id:i.id,label:l(i.label),shown:t(i.id)})),onChange:r})})}function L1({parts:e,desktopKey:o,value:t,onChange:r}){let a=vo()[o];return h(CI,{parts:e,changed:xp(t),shown:n=>ei(a,t,n),onPress:(n,s)=>r(hp(t,n,s)),onReset:()=>r(dn),detail:l("the same as Desktop")})}function R1(){return dI("Card image",{min:Ue,max:ft,step:Hu,hint:"Rounds the picture. The card's own corner is in Styles."})}function P$(){return lf({sidesKey:"cornerSides",step:Wu,useFollowed:()=>Ue,mark:h(A1,{label:zu}),hint:l("Rounds the picture. Left alone it stays square.")})}function A1({label:e,changed:o=!1,onReset:t=()=>{}}){return h(Ee,{words:X()?.panel,label:l(e),changed:o,onReset:t})}function F$(){return{type:"custom",render:({value:e,onChange:o})=>h(B1,{value:typeof e=="string"?e:"",onChange:o})}}function B1({value:e,onChange:o}){let[t,r]=jr(null),a=Ms.filter(s=>t===null||Ro[s].across===t),n=e&&e in Ro?Ro[e]:null;return Do(oo,{children:[h(re,{label:l("Photos in a row"),icon:h($P,{}),children:Do("div",{className:"sf-gallery-filter",children:[h("button",{type:"button","aria-pressed":t===null,onClick:()=>r(null),children:l("All")}),Uu.map(s=>h("button",{type:"button","aria-pressed":t===s,onClick:()=>r(s),children:s},s))]})}),h(re,{label:l("Layout"),icon:h(QP,{}),value:n?l(n.label):l("Not chosen"),hint:l("{n} of {total} layouts",{n:a.length,total:Ms.length}),children:h(Jx,{className:"sf-gallery-layouts",label:l("Layout"),value:e,onChange:o,onClear:()=>o(""),options:a.map(s=>({value:s,label:l(Ro[s].label),picture:h("span",{className:"sf-gallery-pic",children:Ro[s].desktop.map(([i,f],d)=>h("i",{style:{gridColumn:`span ${i}`,gridRow:`span ${f}`}},d))})}))})})]})}import{jsx as Vn,Fragment as D1,jsxs as wI}from"react/jsx-runtime";import{Button as vI,Dialog as _1}from"efficient-shell/ui";function N1(e){return $e("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 kI({count:e,onCancel:o,onConfirm:t}){return wI(_1,{open:!0,onClose:o,role:"alertdialog",size:"sm",title:l("Clear this site\u2019s colors?"),footer:wI(D1,{children:[Vn(vI,{variant:"secondary",onClick:o,children:l("Cancel")}),Vn(vI,{variant:"danger",onClick:t,children:l("Clear colors")})]}),children:[Vn("p",{children:N1(e)}),Vn("p",{className:"mt-2 font-medium",children:l("This cannot be undone.")})]})}var U1=rf("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"),$1="Reset color",q1={selected:0,themes:[]};function j1(e){e(q1)}function FI({value:e,onChange:o}){let t=e?.themes??[],r=t.length===0,a=He(e),[n,s]=PI(!1),i=z1(),[f,d]=PI(null),p=(k,C)=>{o({...a,themes:a.themes.map((g,b)=>b===k?C:g)})},m=Gt(a).accent,x=new Set(a.themes.map(k=>k.brandInk).filter(Boolean)),I=tu.filter(k=>!x.has(k)).map(k=>ru(m,k)),y=[...a.themes,...I],w=k=>{if(k<a.themes.length)return o({...a,selected:k});let C=[...a.themes,y[k]];o({...a,themes:C,selected:C.length-1})},v=()=>{let k=[...a.themes,{...Io(a.themes[a.selected])}];o({...a,themes:k,selected:k.length-1}),d(k.length-1)};return TI(M1,{children:[r?null:tr(W1,{label:l($1),icon:wo(U1),labelId:"sf-theme-reset",action:tr(H1,{label:l("all theme colors"),words:i.panel,changed:!0,onReset:()=>s(!0)})}),n&&tr(kI,{count:t.length,onCancel:()=>s(!1),onConfirm:()=>{s(!1),j1(o)}}),tr("div",{className:"sf-theme-list",role:"radiogroup","aria-label":l("Theme"),children:y.map((k,C)=>tr(xn,{index:C,colors:k,selected:C===a.selected,open:f===C&&C<a.themes.length,editable:C<a.themes.length,onPick:()=>w(C),onEdit:()=>d(g=>g===C?null:C),onChangeColors:g=>p(C,g)},C))}),TI("button",{type:"button",onClick:v,className:"sf-theme-add",children:[tr(G1,{size:12}),l("Add new theme")]})]})}import{jsx as Yn}from"react/jsx-runtime";import{SettingsDefaultReset as K1,SettingsField as V1}from"efficient-easel/panel";import{SquareIcon as Y1}from"efficient-easel/icons";var X1="Applies to panels, cards, inputs and buttons. Round things \u2014 color swatches, switches, status dots \u2014 stay round.",pf="Corners";function EI({value:e,onChange:o,showHint:t=!0}){let r=e===null;return Yn(V1,{label:l(pf),icon:Yn(Y1,{}),value:r?l("Default"):`${e}px`,changed:!r,action:Yn(K1,{words:X()?.panel,label:l(pf),changed:!r,detail:l("the built-in corners"),onReset:()=>o(null)}),hint:t?l(X1):void 0,children:Yn(Ae,{min:Ue,max:ft,step:1,value:e??Ue,readout:!1,ariaLabel:l(pf),onChange:o})})}import{jsx as Yr}from"react/jsx-runtime";import{SettingsDefaultReset as Z1,SettingsField as Q1,SettingsSegmented as J1}from"efficient-easel/panel";import{ShadowIcon as eE}from"efficient-easel/icons";var mf={none:"None",soft:"Soft",lifted:"Lifted"},oE="Applies to cards \u2014 products, brands, journal entries and filter cells. Round things like swatches and status dots are never shadowed.",tE={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)"},rE={labelsPx:90.25,widestLabelPx:34.6};function OI({value:e,onChange:o,showHint:t=!0}){let r=e===null,a=e??Fs;return Yr(Q1,{label:l("Card shadow"),icon:Yr(eE,{}),value:l(mf[a]),changed:!r,action:Yr(Z1,{words:X()?.panel,label:l("Card shadow"),changed:!r,detail:l(mf[Fs]),onReset:()=>o(null)}),hint:t?l(oE):void 0,children:Yr(J1,{options:uu.map(n=>({id:n,label:l(mf[n]),icon:Yr("span",{className:"sf-shadow-chip",style:{boxShadow:tE[n]}})})),value:a,ariaLabel:l("Card shadow"),fit:rE,onChange:o})})}import{jsx as LI}from"react/jsx-runtime";import{ShadowIcon as aE}from"efficient-easel/icons";var nE="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 RI({value:e,onChange:o,showHint:t=!0}){let r=e===null;return LI(sn,{label:l("Shadow color"),icon:LI(aE,{}),value:e??"",inherited:Os,resetTo:Os,onChange:o,onReset:()=>o(null),hint:t?l(nE):void 0})}import{jsx as Xn}from"react/jsx-runtime";import{SettingsDefaultReset as lE,SettingsField as sE}from"efficient-easel/panel";import{AlignSeparateIcon as iE}from"efficient-easel/icons";var fE="The space between the blocks inside a row, a grid or a box. Default means each one keeps the spacing it already has.",xf="Block gap",cE=Qt.Grid;function AI({value:e,onChange:o,showHint:t=!0}){let r=e===null;return Xn(sE,{label:l(xf),labelId:"sf-block-gap",icon:Xn(iE,{}),value:r?l("Default"):`${e}px`,changed:!r,action:Xn(lE,{words:X()?.panel,label:l(xf),changed:!r,detail:l("each block's own spacing"),onReset:()=>o(null)}),hint:t?l(fE):void 0,children:Xn(Ae,{min:vt.min,max:vt.max,step:vt.step,value:r?cE:e,readout:!1,ariaLabel:l(xf),onChange:o})})}import{jsx as Zn}from"react/jsx-runtime";import{SettingsDefaultReset as dE,SettingsField as uE,SettingsSegmented as pE}from"efficient-easel/panel";import{HoverIcon as mE}from"efficient-easel/icons";var If={none:"None",lift:"Lift",highlight:"Highlight"},xE="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 BI({value:e,onChange:o,showHint:t=!0}){let r=e===null,a=e??Es;return Zn(uE,{label:l("Hover effect"),icon:Zn(mE,{}),value:l(If[a]),changed:!r,action:Zn(dE,{words:X()?.panel,label:l("Hover effect"),changed:!r,detail:l(If[Es]),onReset:()=>o(null)}),hint:t?l(xE):void 0,children:Zn(pE,{options:pu.map(n=>({id:n,label:l(If[n])})),value:a,ariaLabel:l("Hover effect"),onChange:o})})}import{jsx as Qn}from"react/jsx-runtime";import{SettingsDefaultReset as IE,SettingsField as hE,SettingsSegmented as gE}from"efficient-easel/panel";import{DropIcon as yE}from"efficient-easel/icons";var hf="Photography",DI={shot:"As shot",mono:"Black and white"},gf=[{grayscale:!1,label:DI.shot},{grayscale:!0,label:DI.mono}],bE="Black and white photographs return to color on hover. Wheels and tyres keep their real finish either way.";function _I({value:e,onChange:o,showHint:t=!0}){let r=e===null,a=e??!1;return Qn(hE,{label:l(hf),icon:Qn(yE,{}),value:l(gf.find(n=>n.grayscale===a).label),changed:!r,action:Qn(IE,{words:X()?.panel,label:l(hf),changed:!r,detail:l(gf.find(n=>!n.grayscale).label),onReset:()=>o(null)}),hint:t?l(bE):void 0,children:Qn(gE,{options:gf.map(n=>({id:n.grayscale,label:l(n.label)})),value:a,ariaLabel:l(hf),onChange:o})})}import{jsx as yf}from"react/jsx-runtime";import{useId as SE}from"react";import{SettingsField as CE,SettingsSwitch as wE}from"efficient-easel/panel";import{ShareIcon as vE}from"efficient-easel/icons";var kE="Share button",TE="On every blog post.";function NI({value:e,onChange:o,showHint:t=!0}){let r=SE();return yf(CE,{label:l(kE),labelId:r,icon:yf(vE,{}),action:yf(wE,{checked:e===!0,onChange:o,ariaLabelledBy:r}),hint:t?l(TE):void 0})}import{jsx as Jn}from"react/jsx-runtime";import{SettingsDefaultReset as PE,SettingsField as FE}from"efficient-easel/panel";import{PaddingXIcon as EE}from"efficient-easel/icons";var bf="Side space",Sf=Co.default,OE="The room left at the left and right edge of every page.";function MI({value:e,onChange:o,showHint:t=!0}){let r=e===null;return Jn(FE,{label:l(bf),labelId:"sf-side-space",icon:Jn(EE,{}),value:`${e??Sf}px`,changed:!r,action:Jn(PE,{words:X()?.panel,label:l(bf),changed:!r,detail:`${Sf}px`,onReset:()=>o(null)}),hint:t?l(OE):void 0,children:Jn(Ae,{min:Co.min,max:Co.max,step:Co.step,value:e??Sf,readout:!1,ariaLabel:l(bf),onChange:o})})}import{jsx as Cf}from"react/jsx-runtime";import{BACKGROUND_WIDTHS as U7,SettingsBackgroundWidth as LE,SettingsContentWidth as RE}from"efficient-easel/panel";var HI="Width",AE="Background width",BE="Content width";var el=e=>l(er[e==="content"?"page":"full"]),DE=400,WI="Content cannot be wider than the background.",zI="The width of every section's background, until the section sets its own.",GI="The width of every section's content, until the section sets its own.",UI="On phones, content always fills the screen.";function ol({value:e,changed:o,detail:t,onChange:r,onReset:a,disabled:n=!1,hint:s,labelId:i}){return Cf(LE,{value:e,changed:o,detail:t,onChange:r,onReset:a,disabled:n,hint:s?l(s):void 0,labelId:i,words:{label:l(AE),full:el("full"),content:el("content")},resetWords:X()?.panel})}function tl({mode:e,px:o,max:t=pe.max,min:r=DE,changed:a,detail:n,onMode:s,onPx:i,onReset:f,fullClosed:d=!1,disabled:p=!1,hint:m,labelId:x}){let I=l(BE),y=e!=="full"?Cf(Ae,{min:r,max:t,step:pe.step,value:Math.min(Math.max(o,r),t),onChange:i,suffix:"px",ariaLabel:I,disabled:p}):null;return Cf(RE,{mode:s?e:void 0,onMode:s,number:y,changed:a,detail:n,onReset:f,fullClosed:d,disabled:p,hint:m?l(m):void 0,labelId:x,words:{label:I,full:el("full"),content:el("content")},resetWords:X()?.panel})}import{jsx as Oh}from"react/jsx-runtime";import{TextStyleItem as VO,TextStylesGroup as YO}from"efficient-easel/text-styles";import{jsx as GO}from"react/jsx-runtime";import{useState as UO}from"react";import{TextStylesList as $O}from"efficient-easel/text-styles";import{usePreviewDevice as qO}from"efficient-easel/draw/client";import{defaultTextStyles as _O,textStyleCaseCss as NO}from"efficient-easel/text-styles/model";import{textStyleCaseCss as jE,textStyleCaseOfCss as KE}from"efficient-easel/draw";function wf(e,o){return o?`${e}[${o.index}].${o.rowKey}`:e}function to(e){let o=/^([A-Za-z0-9_$]+)\[(\d+)\]\.([A-Za-z0-9_$]+)$/u.exec(e);return o?{key:o[1],row:{index:Number(o[2]),rowKey:o[3]}}:{key:e,row:null}}import{decodePartId as sl,encodePartId as il}from"efficient-easel/draw";import{LINK_FIELD_MARKER as JI,SCAFFOLD_FIELD_MARKER as ZI,TEXT_FIELD_MARKER as fl}from"efficient-easel/draw";import{readHidable as eh}from"efficient-easel/draw";import{SCALAR_TEXT_CONTROLS as GE}from"efficient-easel/draw";import{TEXT_FIELD_MARKER as zE}from"efficient-easel/draw";import{TEXT_FIELD_MARKER as $I}from"efficient-easel/draw";import{readHidable as qI}from"efficient-easel/draw";import{SCALAR_TEXT_CONTROLS as _E}from"efficient-easel/draw";var NE=_E,ME=["text","textarea"],HE=["textarea","plainTextarea"];function WE(e){return!e||typeof e!="object"?null:e[$I]?.control??null}function rr(e){let o=WE(e);return o&&NE.includes(o)?o:null}function rl(e){return HE.includes(e)}function jI(e){return!e||typeof e!="object"?void 0:e[$I]?.placeholder}function al(e){return qI(e).text}function vf(e,o,t){return ME.includes(e)?{text:t,hidden:qI(o).hidden}:t}function KI(e,o,t,r){return al(e[o])===r?null:{...e,[o]:vf(t,e[o],r)}}function nl(e){if(!(!e||typeof e!="object"))return e[zE]}function kf(e){if(!e||typeof e!="object")return null;let o=e.arrayFields;return o&&typeof o=="object"?o:null}function VI(e,o){if(!Array.isArray(o))return[];let t=nl(e),r=[];if(t?.control==="textList"){let n=t.itemKey??"text";return o.forEach((s,i)=>{let f=s?.[n];typeof f=="string"&&f&&r.push({row:{index:i,rowKey:n},text:f})}),r}let a=kf(e);return a?(o.forEach((n,s)=>{for(let[i,f]of Object.entries(a)){if(!rr(f))continue;let d=al(n?.[i])||nl(f)?.placeholder||"";d&&r.push({row:{index:s,rowKey:i},text:d})}}),r):[]}function Xr(e,o){if(Array.isArray(e))return e[o.index]?.[o.rowKey]}function Tf(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 YI(e,o,t,r,a){let n=Xr(e[o],t);return al(n)===a?null:Tf(e,o,t,vf(r,n,a))}function XI(e,o){return o?`${e} \xB7 row ${o.index+1}`:e}var ro="data-sf-part",uq="data-sf-region-part",pq="data-sf-part-row";function mq(e,o){return`${e}[${o}]`}var Be="data-sf-part-selected",xq="data-sf-part-kind",UE="data-sf-part-style-owner",$E="data-sf-part-style-kind";function Iq(e){for(let o=e;o;o=o.parentElement){let t=o.getAttribute(UE),r=o.getAttribute($E);if(t&&r)return{owner:t,kind:r};if(o.getAttribute("data-puck-component"))return null}return null}var QI=2;function oh(e,o){if(!e)return!1;let t=sl(e);return!!t?.propKey&&t.nodeId===o}function ar(e){return ht(e).replace(/\s+/gu,"")}function ll(e,o,t){let r=e[fl];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}=eh(o);a?t.push(a):r.placeholder&&t.push(r.placeholder);return}if(!e[JI]){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))ll(s,a?.[n],t);return}if(e.objectFields&&o&&typeof o=="object")for(let[a,n]of Object.entries(e.objectFields))ll(n,o[a],t)}}function th(e){if(!e||typeof e!="object")return!1;let o=e;return o[JI]?!1:!!o[fl]||o.type==="text"||o.type==="textarea"}function cl(e,o){let t=e[fl];return t?.label?t.label:typeof e.label=="string"?e.label:o}function Pf(e){let o=e.indexOf(" (");return(o>0?e.slice(0,o):e).trim()}function hq(e,o){if(!e)return[];let t=[];for(let[r,a]of Object.entries(e)){if(!a||typeof a!="object"||Mr(r))continue;let n=a,s=[];ll(n,o?.[r],s),!s.length&&n[ZI]!==void 0&&ll(n,n[ZI],s);let i=cl(n,r),f=new Set;for(let{row:m,text:x}of VI(n,o?.[r])){let I=ar(x);I.length<QI||(f.add(I),t.push({key:r,label:i,texts:[I],row:m}))}let d=new Set(f),p=[];for(let m of s){let x=ar(m);x.length<QI||d.has(x)||(d.add(x),p.push(x))}p.length&&t.push({key:r,label:i,texts:p})}return t}var qE=GE;function rh(e,o){if(!o||typeof o!="object"||Mr(e)||Rp(o))return null;let t=o[fl];return!t||!qE.includes(t.control)?null:t}function gq(e,o){let t=rh(e,o);return t!==null&&t.identifier!==!0}function ah(e,o){if(!e)return[];let t=[];for(let[r,a]of Object.entries(e)){let n=rh(r,a);if(!n)continue;let{text:s,hidden:i}=eh(o?.[r]),f=s||n.placeholder||"",d=ht(f).replace(/\s+/gu," ").trim();t.push({key:r,label:Pf(cl(a,r)),preview:d,offPage:n.offPage===!0,identifier:n.identifier===!0,hidden:!!i})}return t}var Of="_partStyles",VE="data-sf-part-styled",dl="data-sf-text-style",YE=/^(heading|body)-[1-7]$/;function nr(e){return typeof e=="string"&&YE.test(e)}var pl={heading:"heading-1",heading2:"heading-2",heading3:"heading-3",body:"body-1",label:"body-5"};function XE(e){if(!e)return null;for(let[o,t]of Object.entries(pl))if(t===e)return o;return null}function uh(e){if(nr(e.textStyle))return e.textStyle;let o=e.role&&Oo.includes(e.role)?e.role:null;return o?pl[o]:void 0}var ZE=[400,500,600,700],ph=["left","center","right","justify"],nh=5,lh=1e3,QE=-5,JE=10,Rf=0,Af=64,Bf=2,Df=120,ot=1280,_f=10,sh={size:{min:nh,max:lh,step:1},sizePhone:{min:nh,max:lh,step:1},padding:{min:Rf,max:Af,step:Bf},width:{min:Df,max:ot,step:_f}},eO=.05,oO=.01,tO=["line","letter"],rO=.5,aO=2.5,nO=-1,lO=1,sO=0,iO=400;function Qr(e){return!e||typeof e!="object"||Array.isArray(e)?null:e}function mh(e){return Qr(e?.[Of])??{}}function ml(e,o){let t=mh(e);return Object.hasOwn(t,o)?Qr(t[o])??{}:{}}function xh(e,o,t){let r={...mh(e)};if(fO(t).length?r[o]=t:delete r[o],!Object.keys(r).length){let{[Of]:a,...n}=e;return n}return{...e,[Of]:r}}function fO(e){return Object.entries(e).filter(([,o])=>o!==void 0)}function cO(e){return tO.includes(e)}var Zr=(e,o,t)=>Math.min(t,Math.max(o,e));function dO(e,o){if(cO(e)){let t=Math.round(Number(o));return!Number.isFinite(t)||t===0?null:Zr(t,QE,JE)}if(e==="lineHeight"){let t=Number(o);return Number.isFinite(t)?lr(Zr(t,rO,aO),3):null}if(e==="letterSpacing"){let t=Number(o);return Number.isFinite(t)?lr(Zr(t,nO,lO),4):null}if(e==="paragraphSpacing"){let t=Math.round(Number(o));return!Number.isFinite(t)||t<=0?null:Zr(t,sO,iO)}if(Object.hasOwn(sh,e)){let{min:t,max:r}=sh[e],a=Math.round(Number(o));return Number.isFinite(a)?Zr(a,t,r):null}return e==="italic"?typeof o=="boolean"?o:null:e==="role"?Oo.includes(String(o))?o:null:e==="textStyle"?nr(o)?o:null:o}var uO=["weight","size","sizePhone","line","letter","lineHeight","letterSpacing","paragraphSpacing","padding","width"];function Ih(e){let o=null,t=r=>{o??={...e},delete o[r]};for(let r of uO){let a=e[r];a!==void 0&&!(typeof a=="number"&&Number.isFinite(a))&&t(r)}return e.align!==void 0&&!ph.includes(e.align)&&t("align"),e.textStyle!==void 0&&!nr(e.textStyle)&&t("textStyle"),o??e}var pO=[["font","role"],["role","textStyle"],["line","lineHeight"],["letter","letterSpacing"]];function mO(e){let o=[];for(let[t,r]of pO)t===e?o.push(r):r===e&&o.push(t);return o}function sr(e,o,t,r){let a={...ml(e,o)},n=r==null?null:dO(t,r);if(n===null)delete a[t];else{a[t]=n;for(let s of mO(t))delete a[s]}return xh(e,o,a)}function hh(e,o){return xh(e,o,{})}function xO(e){return KE(e)??"none"}function IO(e){return jE(e)??""}var hO={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 gO(e,o){let t=e.role;return t&&Oo.includes(t)?t:o?.blockDrawsStyle?null:XE(e.textStyle)}function kq(e,o){return e==="Text"&&o==="text"}var yO={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 bO(e){let o=Jd[e],t=yO[o];return t?`var(--size-${o}, ${t})`:`var(--size-${o})`}function ea(e){let o={};return typeof e.lineHeight=="number"?o.lineHeight=e.lineHeight:e.line&&(o.lineHeight=lr(SO+e.line*eO,3)),typeof e.letterSpacing=="number"?o.letterSpacingEm=e.letterSpacing:e.letter&&(o.letterSpacingEm=lr(e.letter*oO,4)),o}var SO=1,oa="--sf-part-para",Nf="(max-width: 719.98px)";function ih(e){return e=Ih(e),typeof e.sizePhone=="number"&&e.sizePhone>0?{fontSize:`${e.sizePhone}px`}:{}}function CO(e,o){return o&&typeof e.sizePhone=="number"&&e.sizePhone>0?{...e,size:e.sizePhone}:e}function ul(e,o,t){e=Ih(e);let r=gO(e,t),a=ea(e),n=e.size?`${e.size}px`:r?bO(r):"";return{fontFamily:e.font?TO(e.font):r?`var(${hO[r]})`:"",fontWeight:e.weight?String(e.weight):"",fontSize:n,minWidth:n?"0":"",overflowWrap:n?"break-word":"",lineHeight:a.lineHeight!==void 0?String(a.lineHeight):"",letterSpacing:a.letterSpacingEm!==void 0?`${a.letterSpacingEm}em`:"",[oa]:e.paragraphSpacing?`${e.paragraphSpacing}px`:"",textTransform:IO(e.case),textAlign:e.align??"",paddingTop:Ff(e.padding),paddingBottom:Ff(e.padding),maxWidth:Ff(e.width),color:wO(e.color),fontStyle:e.italic===!0?"italic":e.italic===!1?"normal":""}}var wO=e=>e===void 0||e===""?"":Object.hasOwn(jt,e)?jt[e]:gh.test(e)?e:"",gh=/^#[0-9a-fA-F]{6}$/;function Tq(e){return gh.test(e)}var Ff=e=>e===void 0?"":`${e}px`,lr=(e,o)=>Number(e.toFixed(o));function Pq(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:vO(Number.parseInt(e.fontWeight,10)),lineRatio:Number.isFinite(r)?lr(r/t,3):1.2,letterEm:Number.isFinite(a)?lr(a/t,4):0,align:kO(e.textAlign),case:xO(e.textTransform),paddingPx:Number.isFinite(n)?Math.round(n):0,widthPx:Number.isFinite(s)&&s<ot?Math.round(s):ot}}function vO(e){return Number.isFinite(e)?ZE.reduce((o,t)=>Math.abs(t-e)<Math.abs(o-e)?t:o):400}function kO(e){for(let o of ph)if(o===e)return o;return e==="end"?"right":"left"}function Fq(e,o){let t=fh(e);if(!t)return"";for(let r of Xe)if(fh(o(r.cssVar))===t)return r.key;return""}var fh=e=>(e.split(",")[0]??"").replace(/["']/g,"").replace(/\s+/g," ").trim().toLowerCase();function TO(e){let o=zt(e);return o?`var(${o.cssVar})`:""}function Eq(e,o,t,r){return!o||sl(o)?.nodeId!==e?null:t.find(a=>r(a.getAttribute("class")))??t[0]??null}function Oq(e,o,t=()=>Jr,r=i=>i,a=EO,n=!1,s=()=>!1){let i=0;for(let{element:f,partId:d}of e){let p=sl(d)?.propKey;if(!p)continue;let m=r(p),x=Object.hasOwn(o,m)?Qr(o[m])??{}:{},I=ul(CO(x,n),Jr,{blockDrawsStyle:s(p)});nr(x.textStyle)?f.setAttribute?.(dl,x.textStyle):f.removeAttribute?.(dl);let y=Ef.some(v=>f.style[v]),w=!1;for(let[v,k]of Object.entries(I))OO(f,v,k),k&&(w=!0);if(y||Ef.some(v=>I[v]))for(let v of PO(f,a))for(let k of Ef)v.style[k]=I[k]??"";w&&(i+=1)}return i}function PO(e,o){let t=ar(e.textContent??""),r=[],a=e;for(let n=0;n<FO&&o(a);n+=1){let s=a.parentElement;if(!s||ar(s.textContent??"")!==t)break;r.push(s),a=s}return r}var FO=8;function EO(e){let o=e;return typeof window>"u"||!o?.ownerDocument?!1:window.getComputedStyle(o).display==="inline"}var Jr={fontKey:"",sizePx:16,weight:400,lineRatio:1,letterEm:0,align:"left",case:"none",paddingPx:0,widthPx:ot};function OO(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===oa&&(t?a.setAttribute?.(ch,""):a.removeAttribute?.(ch))}var ch="data-sf-part-para",LO=Object.keys(ul({},Jr)),Lf=new Set(["color","overflowWrap",oa,"fontStyle"]),Ef=LO.filter(e=>!Lf.has(e));function Lq(e,o,t,r=n=>n,a=()=>!1){let n=new Map;for(let f of e){let d=wf(f.key,f.row);for(let p of f.texts){let m=n.get(p);m?(m.keys.add(f.key),m.partKeys.add(d)):n.set(p,{keys:new Set([f.key]),partKeys:new Set([d])})}}let s=new Map;for(let f of Object.keys(o)){if(!RO(f))continue;let d=Qr(o[f])??{},p=ul(d,Jr),m=ih(d),x=nr(d.textStyle)?d.textStyle:void 0;!Object.values(p).some(Boolean)&&!Object.keys(m).length&&!x||s.set(f,{stamp:dh(t,f),declarations:p,...Object.keys(m).length?{phone:m}:{},...x?{textStyle:x}:{}})}let i=new Map;for(let[f,{keys:d,partKeys:p}]of n){let m=p.size===1?[...p][0]:d.size===1?[...d][0]:null;if(!m)continue;let x=r(m);if(!Object.hasOwn(o,x))continue;let I=Qr(o[x])??{},y=ul(I,Jr,{blockDrawsStyle:a(m)}),w=ih(I),v=nr(I.textStyle)?I.textStyle:void 0;!Object.values(y).some(Boolean)&&!Object.keys(w).length&&!v||i.set(f,{stamp:dh(t,m),declarations:y,...Object.keys(w).length?{phone:w}:{},...v?{textStyle:v}:{}})}return i.size||s.size?{rules:i,kindRules:s,drawn:new Set(n.keys())}:null}function RO(e){return e.startsWith("@")}function Rq(e,o){return e?.kindRules.get(o)??null}function dh(e,o){let t=r=>r.replace(/[^A-Za-z0-9_-]+/g,"-");return`${t(e)}~${t(o)}`}function Aq(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(([,I])=>I!==""),f=I=>I.map(([y,w])=>`${BO(y)}: ${w}`).join("; "),d=`[${VE}="${n}"]`,p=i.filter(([I])=>!Lf.has(I)),m=i.filter(([I])=>Lf.has(I));p.length&&o.push(`${d}, *:has(> ${d}) { ${f(p)} }`),m.length&&o.push(`${d} { ${f(m)} }`),s[oa]&&o.push(...AO(d));let x=Object.entries(a.phone??{}).filter(([,I])=>I!=="");x.length&&o.push(`@media ${Nf} { ${d}, *:has(> ${d}) { ${f(x)} } }`)};for(let a of e.rules.values())r(a);for(let a of e.kindRules.values())r(a);return o.join(`
|
|
4
4
|
`)}function AO(e){let o=`var(${oa})`,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 BO=e=>e.replace(/[A-Z]/g,o=>`-${o.toLowerCase()}`);function Bq(e,o){if(!e)return null;let t=ar(o),r=e.rules.get(t);if(r)return r;if(t.length<DO||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 DO=8;function yh(e){switch(e.id){case"heading-1":return"font-display";case"heading-2":return"font-heading2";case"heading-3":return"font-heading3";case"body-1":return"font-body";case"body-5":return"font-mono";default:return`font-${e.id}`}}var Mf=e=>e==="sentence"?"none":void 0,Mo=e=>typeof e=="number"&&Number.isFinite(e)?e:void 0,ta=e=>typeof e=="string"&&e?e:void 0,Sh=["font","color","size","sizePhone","weight","italic","lineHeight","letterSpacing","paragraphSpacing","letterCase","largestSize"];function ko(e){let o={};for(let t of Sh)e[t]!==void 0&&(o[t]=e[t]);return o}function Wf(e,o){let{auto:t,...r}=e,a=new Set(o??[]),n=Sh.filter(s=>a.has(s)&&e.values[s]===void 0);return n.length?{...r,auto:n}:r}function zf(e){let o=e.fonts,t=e.sizes,r=e.typography,a=xu(e.compression),n={"heading-1":{font:ta(o.heading),size:Mo(t.headingLarge),weight:Mo(r.weight),lineHeight:a.lineHeight,letterSpacing:a.letterSpacing,letterCase:Mf(r.case),largestSize:Mo(r.maxPx)},"heading-2":{font:ta(o.heading2),size:Mo(t.headingMedium),weight:Mo(r.weight2),lineHeight:a.lineHeight,letterSpacing:a.letterSpacing,letterCase:Mf(r.case2)},"heading-3":{font:ta(o.heading3),size:Mo(t.headingSmall),weight:Mo(r.weight3),lineHeight:a.lineHeight,letterSpacing:a.letterSpacing,letterCase:Mf(r.case3)},"body-1":{font:ta(o.body),size:Mo(t.body)},"body-5":{font:ta(o.label),size:Mo(t.label)}};return _O().map(({id:s,kind:i,name:f})=>({id:s,kind:i,name:f,values:ko(n[s]??{})}))}function xl(e){return Array.isArray(e)&&e.every(o=>o&&typeof o=="object"&&typeof o.id=="string"&&(o.kind==="heading"||o.kind==="body")&&typeof o.name=="string")?e.map(o=>Wf({...o,values:ko(o.values??{})},Array.isArray(o.auto)?o.auto:void 0)):null}function Gq(e){return xl(e)??[]}function tt(e,o){let t=zf(o),r=xl(e);return r?r.map(a=>{let n={...Hf(t,a.id)};for(let s of a.auto??[])delete n[s];return{...a,values:ko({...n,...a.values})}}):t}var Hf=(e,o)=>e.find(t=>t.id===o)?.values??{},bh=["heading-1","heading-2","heading-3"];function Ch({saved:e,old:o,cur:t,next:r,sizeOf:a}){let n=zf(o),s=xl(e)??n.map(m=>({...m,values:{}})),i=tt(s,o),f=[],d=r.map(m=>{let x=t.find(g=>g.id===m.id),I=s.find(g=>g.id===m.id);if(!x||!I)return MO([m],a)[0];let y={...I.values},w=new Set(I.auto??[]),v=m.values,k=x.values,C=[...new Set([...Object.keys(v),...Object.keys(k)])].filter(g=>JSON.stringify(v[g])!==JSON.stringify(k[g]));C.sort((g,b)=>+(g==="letterSpacing")-+(b==="letterSpacing"));for(let g of C){let b=g==="lineSpacing"?"lineHeight":g,O=v[g];if(O===void 0){delete y[b],Hf(n,m.id)[b]!==void 0&&(f.push([m.id,b]),w.add(b));continue}if(w.delete(b),g==="lineSpacing")y.lineHeight=ir(O/100,3);else if(g==="letterSpacing"){let F=i.find(P=>P.id===m.id),L=a({...m,values:ko({...F?.values??{},...y})});y.letterSpacing=L?ir(O/L,4):0}else y[b]=O}return Wf({id:m.id,kind:m.kind,name:m.name,values:ko(y)},w)}),p=o.compression;if(f.some(([m,x])=>(x==="lineHeight"||x==="letterSpacing")&&bh.includes(m))&&ct(p)!=="normal"){for(let m of bh){let x=d.find(y=>y.id===m);if(!x)continue;let I={...x.values};for(let y of["lineHeight","letterSpacing"])f.some(([w,v])=>w===m&&v===y)||I[y]===void 0&&!(x.auto??[]).includes(y)&&(I[y]=Hf(n,m)[y]);x.values=ko(I)}p="normal"}return{saved:d,old:{...o,compression:p}}}function wh(e,o){let t={text_styles:e.saved};return e.old.compression!==o.compression&&(t.heading_compression=ct(e.old.compression)),t}var ir=(e,o)=>Number(e.toFixed(o));function vh(e,o){return e.map(t=>{let{lineHeight:r,letterSpacing:a,...n}=t.values,s={...n};return r!==void 0&&(s.lineSpacing=ir(r*100,1)),a!==void 0&&(s.letterSpacing=ir(a*o(t),2)),{id:t.id,kind:t.kind,name:t.name,values:s}})}function MO(e,o){return e.map(t=>{let{lineSpacing:r,letterSpacing:a,...n}=t.values,s={id:t.id,kind:t.kind,name:t.name,values:ko({...n})},i={...s.values};if(r!==void 0&&(i.lineHeight=ir(r/100,3)),a!==void 0){let f=o({...s,values:{...s.values}});i.letterSpacing=f?ir(a/f,4):0}return{...s,values:ko(i)}})}function Uq(e){let o={fonts:Or({heading:e.heading_font??void 0,heading2:e.heading_2_font??void 0,heading3:e.heading_3_font??void 0,body:e.body_font??void 0,accent:e.accent_font??void 0,label:e.label_font??void 0}),sizes:Ps({headingLarge:e.heading_size_large_px,headingMedium:e.heading_size_medium_px,headingSmall:e.heading_size_small_px,accent:e.accent_size_px,body:e.body_size_px,label:e.label_size_px}),compression:ct(e.heading_compression),typography:hu(e)},t=e.text_styles??null,r=Array.isArray(t)?Gf(tt(t,o),o):o;return{fonts:Or(r.fonts),sizes:Ps(r.sizes),compression:ct(r.compression),typography:r.typography,textStyles:t}}function Gf(e,o){let t=x=>e.find(I=>I.id===x)?.values??{},r=t("heading-1"),a=t("heading-2"),n=t("heading-3"),s=t("body-1"),i=t("body-5"),f=o.fonts,d=o.sizes,p=o.typography,m=x=>x==="none"?"sentence":"authored";return{fonts:{...f,heading:r.font??f.heading,heading2:a.font??r.font??f.heading2,heading3:n.font??r.font??f.heading3,body:s.font??f.body,label:i.font??f.label},sizes:{...d,headingLarge:r.size??null,headingMedium:a.size??null,headingSmall:n.size??null,body:s.size??null,label:i.size??null},compression:o.compression,typography:{...p,case:m(r.letterCase),weight:r.weight??null,maxPx:r.largestSize??null,weight2:a.weight??null,weight3:n.weight??null,case2:m(a.letterCase),case3:m(n.letterCase)}}}function HO(e){return e==="accent"?"var(--accent)":e==="text"?"var(--fg)":e==="labels"?"var(--fg-dim)":/^#[0-9a-f]{6}$/i.test(e)?e:null}function WO(e){let o=":is([data-sf-bullet], [data-sf-number])";return[`${e} br:not(br + br) { display: block; content: ""; margin-top: var(--sf-part-para) }`,`${e} ${o}:not(:first-child) { margin-top: var(--sf-part-para) }`,`${e} ${o}:not(:last-child) { margin-bottom: var(--sf-part-para) }`]}function $q(e){let o=[];for(let t of e){let r=t.values,a=`.${yh(t)}`,n=`[${dl}="${t.id}"]`,s=`${a}, ${n}`,i=[],f=r.font!==void 0?Xe.find(x=>x.key===r.font)?.cssVar:void 0;if(f&&i.push(`font-family: var(${f})`),r.size!==void 0){let x=r.largestSize!==void 0?Math.min(r.size,r.largestSize):r.size;i.push(`font-size: ${x}px`)}let d=r.color!==void 0?HO(r.color):null;d&&i.push(`color: ${d}`),r.italic===!0&&i.push("font-style: italic"),r.weight!==void 0&&i.push(`font-weight: ${r.weight}`);let p=[];r.lineHeight!==void 0&&p.push(`line-height: ${r.lineHeight}`),r.letterSpacing!==void 0&&p.push(`letter-spacing: ${r.letterSpacing}em`),t.kind==="body"&&i.push(...p);let m=NO(r.letterCase);if(m&&i.push(`text-transform: ${m}`),r.paragraphSpacing&&i.push(`--sf-part-para: ${r.paragraphSpacing}px`),i.length&&o.push(`${s} { ${i.join("; ")} }`),t.kind==="heading"&&p.length&&o.push(`${s}, ${a}:is(h1, h2, h3, h4), ${n}:is(h1, h2, h3, h4) { ${p.join("; ")} }`),r.paragraphSpacing&&o.push(...WO(`:is(${s})`)),r.sizePhone!==void 0){let x=zO[t.id],I=[`${s} { font-size: ${r.sizePhone}px }`];x&&I.push(`.sf-themed-content { --size-${x}: ${r.sizePhone}px !important }`),o.push(`@media ${Nf} { ${I.join(" ")} }`)}}return o.join(`
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{f as ft,i as pe,q as pt,s as mt,t as gt,v as B}from"./chunk-Z7PJKX2P.js";import{Aa as fe,Ba as ct,Ea as $e,Fa as dt,Ia as Be,Ja as We}from"./chunk-S66TL4Z3.js";import{j as ut,l as oe}from"./chunk-IHYVLVY3.js";import{createContext as cn,useContext as xt,useEffect as dn,useMemo as ge,useState as bt}from"react";function ht(e,t){return e.map(n=>({partNumber:n.partNumber,quantity:n.wheels*t}))}function ie(e,t){if(e.length===0)return null;let n=0;for(let r of e){let o=r.prices?.[t];if(typeof o!="number"||!Number.isFinite(o)||o<=0)return null;n+=o*r.wheels}return n}var Ge=4,_r=1,Nr={unit:"set",spares:0,spareSide:"left"};function yt(e){return e.unit==="single"?1:Ge+e.spares}function Rr(e,t){return[{partNumber:e.partNumber,wheels:yt(t),prices:e.prices}]}function Lr(e,t){let n=yt(t)-Ge;if(n<=0||e.length===0)return e;let r=ln(e),o=r?r[t.spareSide]:0;return e.map((i,a)=>a===o?{...i,wheels:i.wheels+n}:i)}function ln(e){let t,n;for(let r=0;r<e.length;r+=1){let o=e[r].hand;if(o!=="left"&&o!=="right")continue;if((o==="left"?t:n)!==void 0)return null;o==="left"?t=r:n=r}return t!==void 0&&n!==void 0?{left:t,right:n}:null}function un(e,t){return t.spares>0?`${e} + spare`:e}function Ir(e){return e.unit==="single"?"Single":un(`Set of ${Ge}`,e)}var Ar="data-add-to-basket",qe=9,Ne="en";function me(e,t,n=0){return new Intl.NumberFormat(Ne,{style:"currency",currency:t,minimumFractionDigits:0,maximumFractionDigits:n}).format(e)}function kr(e,t){return new Intl.NumberFormat(Ne,{style:"currency",currency:t}).format(e)}import{jsx as gn}from"react/jsx-runtime";var fn="storefront-country",Ct=fn,Ke=cn(null);function pn(e){return St(e,"catalogue")}function mn(e){return St(e,"money")}function St(e,t){let n=new Map(e.map(o=>[o.code,o.decimalPlaces])),r=new Map;return(o,i)=>{if(!i)return"";let a=r.get(i);if(!a){let l=n.get(i)??0;a=new Intl.NumberFormat(Ne,{style:"currency",currency:i,minimumFractionDigits:t==="money"?l:0,maximumFractionDigits:l}),r.set(i,a)}return a.format(o)}}function Fr({children:e,currencies:t,countries:n,defaultCurrency:r,defaultCountry:o}){let i=ge(()=>t??[],[t]),a=ge(()=>n??[],[n]),l=ge(()=>r||i.find(b=>b.isDefault)?.code||i[0]?.code||"",[r,i]),c=ge(()=>o||a.find(b=>b.isDefault)?.code||a[0]?.code||"",[o,a]),[u,f]=bt(c),[d,S]=bt(!1);dn(()=>{let b=oe.getItem(Ct);b&&a.some(P=>P.code===b)&&f(b),S(!0)},[a]);function N(b){f(b),oe.setItem(Ct,b)}let C=ge(()=>{let b=a.find(v=>v.code===u)??null,P=b?.currency,O=P&&i.some(v=>v.code===P)?P:l,M=pn(i),I=mn(i);return{country:u,currency:O,setCountry:N,currencies:i,countries:a,activeCountry:b,formatPrice:(v,x)=>M(v,x??O),formatMoney:(v,x)=>I(v,x??O),ready:d}},[u,i,a,l,d]);return gn(Ke.Provider,{value:C,children:e})}function vt(){let e=xt(Ke);if(!e)throw new Error("useCurrency must be used within a CurrencyProvider");return e}function Ur(){return xt(Ke)?.country??""}import{createContext as In,useCallback as _,useContext as An,useEffect as Z,useMemo as Mt,useRef as Ie,useState as L}from"react";function Pt(e,t){return e.valid?!1:e.reason==="firstOrderOnly"?!0:e.reason==="notEligible"&&!t}var wt="We'll confirm this discount when you place your order.",Wr="Confirmed at checkout";function Gr(e){return e&&(e.valid||e.deferred)?e.code:void 0}var Et="coupon_code: ";function qr(e){return!(e instanceof pe)||e.status!==400||!e.message.startsWith(Et)?null:e.message.slice(Et.length)}function _t(e,t){return e.map(n=>({qty:n.qty,slug:n.slug,name:`${n.name.lead}${n.name.accent}`.trim(),finish:n.finishName,size:n.size,kind:n.kind,sku:n.sku,pack:n.pack,priceLabel:t(n)}))}var Re="Price on request",yn="Request a quote",bn="from ",Vr="From ",Yr="each",Nt="Free";function ze(e){return typeof e=="number"&&Number.isFinite(e)&&e>0}function Xe(e,t){let n=e?.[t];return ze(n)?n:null}function Qr(e,t,n,r){let o=Xe(e,n),i=Xe(t,n);return o===null&&i===null?0:o===null?1:i===null?-1:r==="asc"?o-i:i-o}function jr(e,t,n,r){if(n==null&&r==null)return!0;let o=Xe(e,t);return!(o===null||n!=null&&o<n||r!=null&&o>r)}var Cn={priced:!1,unit:null,was:null,onSale:!1,setTotal:null};function xn(e,t,n){if(!ze(e))return Cn;let r=ze(t)&&t>e?t:null;return{priced:!0,unit:e,was:r,onSale:r!==null,setTotal:n!=null?e*n:null}}function Zr(e,t,n=""){return!e.priced||e.unit==null?Re:`${n}${me(e.unit,t)}`}function Jr(e,t){return e.was==null?null:me(e.was,t)}function Sn(e,t,n=1){let r=ie(e,t);if(r===null)return{priced:!1,unit:null,isFrom:!1,setTotal:null};let o=e.reduce((a,l)=>a+l.wheels,0),i=Math.min(...e.map(a=>a.prices[t]));return{priced:!0,unit:i,isFrom:i*o!==r,setTotal:r*n}}var vn={priced:!1,unit:null,isFrom:!1,was:null,onSale:!1,setTotal:null};function eo(e,t,n,r=1){let o=xn(e.prices[n],e.msrpPrices?.[n],4),i=o.setTotal==null?null:o.setTotal*r;if(!t)return{priced:o.priced,unit:o.unit,isFrom:!0,was:o.was,onSale:o.onSale,setTotal:null,fromSetTotal:i};let a=Sn(t.components,n,r);return a.priced?{priced:!0,unit:a.unit,isFrom:a.isFrom,was:null,onSale:!1,setTotal:a.setTotal,fromSetTotal:i}:{...vn,fromSetTotal:i}}function En(e,t){return!e.priced||e.unit==null?Re:`${e.isFrom?bn:""}${me(e.unit,t)}`}function to(e,t){return e.was==null?null:me(e.was,t)}function no(e,t){return!e.priced||e.unit==null?yn:En(e,t)}var Pn=/^[^@\s]+@[^@\s]+\.[^@\s]+$/;function Rt(e){return Pn.test(e.trim())}var Lt="sf:ga-purchases",wn=20;function At(){return typeof window>"u"||window.parent!==window}function he(...e){try{if(At()||typeof window.gtag!="function")return;window.gtag(...e)}catch{}}function _n(e,t){let n=e.config.find(r=>r.gold)?.label;return{item_id:`${e.slug}|${e.finishName}|${e.size}`,item_name:`${e.name.lead}${e.name.accent}`.trim(),...n?{item_variant:n}:{},price:ie(e.components,t)??0,quantity:e.qty}}function Ve(e,t){return e.filter(Le).map(n=>_n(n,t))}function lo(e){he("event","view_item",{currency:e.currency,value:e.pricePerSet,items:[{item_id:e.itemId,item_name:e.itemName,...e.variant?{item_variant:e.variant}:{},price:e.pricePerSet,quantity:1}]})}function kt(e,t){let n=Ve([e],t);n.length!==0&&he("event","add_to_cart",{currency:t,value:n[0].price*n[0].quantity,items:n})}function uo(e){let t=Ve(e.lines,e.currency);t.length!==0&&he("event","begin_checkout",{currency:e.currency,value:e.value,...e.coupon?{coupon:e.coupon}:{},items:t})}var It=new Set;function Nn(e){if(It.has(e))return!1;It.add(e);try{let t=JSON.parse(oe.getItem(Lt)??"[]");if(t.includes(e))return!1;oe.setItem(Lt,JSON.stringify([...t,e].slice(-wn)))}catch{}return!0}function co(e){let t=e.confirmation;if(At()||!Nn(t.orderNumber))return;let n=t.currency,r=Number(t.grandTotal);he("event","purchase",{transaction_id:t.orderNumber,currency:n,value:r,shipping:Number(t.freightCharge),...t.couponCode?{coupon:t.couponCode}:{},items:Ve(e.lines,n)}),e.adsSendTo&&he("event","conversion",{send_to:e.adsSendTo,transaction_id:t.orderNumber,currency:n,value:r})}var Rn="Arranged after review",Tt="Calculated at checkout",Ln=Tt,mo=Tt;function Ot({quoted:e,optionCount:t,chosenAmount:n,couponWaivesFreight:r}){return e&&t===0?"arranged":r?"free":n===void 0?"pending":n===0?"free":"charged"}function go(e){switch(e){case"arranged":return Rn;case"pending":return Ln;case"free":return Nt;case"charged":return null}}import{jsx as Mn}from"react/jsx-runtime";var kn=400,Tn=400,On=1500;function Le(e){return(e.components?.length??0)>0}function Dt(e,t){return{code:e,valid:t.valid,deferred:Pt(t,t.askedAsShopper),message:t.message||void 0,effects:t.effects??void 0}}function Ut(e,t){return ie(e.components,t)}function Ye(e,t){let n=Ut(e,t);return n===null?null:n*e.qty}function Ft(e){return e!=="tyre"}var Ht=In(null);function No({children:e,preview:t=!1}){let{currency:n,country:r,formatMoney:o}=vt(),[i,a]=L(t),[l,c]=L([]),[u,f]=L([]),[d,S]=L([]),[N,C]=L(!1),[b,P]=L(!1),[O,M]=L(!1),[I,v]=L(!1),[x,W]=L(null),[A,G]=L(void 0),[y,w]=L(null),[m,q]=L(null),[J,U]=L(!1),[D,Se]=L(null),X=Ie(void 0),K=_(()=>a(!0),[]),se=_(()=>a(!1),[]),ee=_(()=>a(s=>!s),[]);Z(()=>{t||typeof window>"u"||new URLSearchParams(window.location.search).get("cart")==="open"&&K()},[K,t]);let ve=_(s=>{w(p=>p?.country===s?.country&&p?.subdivision===s?.subdivision?p:s)},[]),H=_(s=>{v(!0),Ft(s)&&M(!0)},[]),Ee=O||l.some(s=>Ft(s.kind)),F=I||l.length>0;Z(()=>{if(t||!Ee||N)return;let s=!0;return B.listWheels().then(p=>{s&&(f(p),C(!0))}),()=>{s=!1}},[t,Ee,N]),Z(()=>{if(t||!F||b)return;let s=!0;return B.listBundles().then(p=>{s&&(S(p),P(!0))}),()=>{s=!1}},[t,F,b]);let z=x?.deliveryOptions??[];Z(()=>{x&&Se(s=>s&&z.some(p=>p.id===s)?s:z[0]?.id??null)},[x]);let V=_(()=>l.filter(Le).flatMap(s=>ht(s.components,s.qty)),[l]),le=_(async(s,p)=>{let h=s.trim().toUpperCase();if(!h)return;let g=V();if(g.length===0){q({code:h,valid:!1,message:"Add a wheel to the cart first."});return}U(!0),X.current=p;try{let R=await B.validateCoupon({code:h,items:g,currency:n,shippingMethodId:D??void 0,customerEmail:p});q(Dt(h,R))}catch{q({code:h,valid:!1,message:"Could not check that code. Please try again."})}finally{U(!1)}},[V,n,D]),ue=_(()=>{q(null),X.current=void 0},[]),ce=_(s=>{if(!m)return;let{code:p}=m;q(h=>h&&h.code===p?{code:p,valid:!1,refused:!0,message:s}:h)},[m]);Z(()=>{if(!m||m.refused)return;let s=m.code,p=g=>g!==null&&g.code===s&&!g.refused,h=setTimeout(async()=>{let g=V();if(g.length===0){q(R=>p(R)?{code:s,valid:!1,message:"Add a wheel to the cart first."}:R);return}U(!0);try{let R=await B.validateCoupon({code:s,items:g,currency:n,shippingMethodId:D??void 0,customerEmail:X.current});q(de=>p(de)?Dt(s,R):de)}catch{}finally{U(!1)}},kn);return()=>clearTimeout(h)},[l,n,D]);let te=m&&!m.refused?m.code:void 0;Z(()=>{if(t)return;let s=!0,p=setTimeout(async()=>{let h=V();if(h.length===0){W(null),G(void 0);return}try{let g=await B.quoteCart({items:h,currency:n,shippingMethodId:D??void 0,couponCode:te,customerEmail:X.current||void 0,country:y?.country||r||void 0,subdivision:y?.country&&y.subdivision||void 0});if(!s)return;W(g)}catch{if(!s)return}G(te)},Tn);return()=>{s=!1,clearTimeout(p)}},[l,n,D,te,r,y]);let Y=_(s=>{c(p=>{let h=p.findIndex(g=>g.id===s.id);return h===-1?[...p,s]:p.map((g,R)=>R===h?{...g,qty:Math.min(qe,g.qty+s.qty)}:g)}),kt(s,n)},[n]),Pe=_(s=>{c(p=>p.filter(h=>h.id!==s))},[]),we=_((s,p)=>{let h=Math.max(1,Math.min(qe,p));c(g=>g.map(R=>R.id===s?{...R,qty:h}:R))},[]),E=_(s=>{c(s)},[]),[k,ne]=L(null),nt=Ie(null);nt.current=k;let $=Ie(null),Fe=Ie(""),rt=_((s,p)=>{let h=s.trim().toLowerCase();Rt(h)&&ne(g=>g&&g.email===h&&g.firstName===(p??"")?g:{email:h,firstName:p??""})},[]);Z(()=>{if(t||!k)return;let s=_t(l.filter(Le),g=>Ye(g,n)===null?Re:o(Ye(g,n),n)),p={email:k.email,firstName:k.firstName,currency:n,items:s},h=JSON.stringify(p);if(h!==Fe.current)return $.current&&clearTimeout($.current),$.current=setTimeout(()=>{$.current=null,Fe.current=h,B.captureCart(p).catch(g=>{})},On),()=>{$.current&&(clearTimeout($.current),$.current=null)}},[l,k,n,t]);let ot=_(()=>{$.current&&(clearTimeout($.current),$.current=null);let s=nt.current;s&&(Fe.current="",B.captureCart({email:s.email,firstName:s.firstName,currency:n,items:[]}).catch(p=>{}))},[n]),it=Mt(()=>{let s=l.reduce((T,re)=>{let _e=Ye(re,n);return _e===null?T:T+_e},0),p=l.some(T=>Ut(T,n)===null),h=l.reduce((T,re)=>T+re.qty,0),g=m?.valid?m.effects:void 0,R=g?Math.min(s,Number(g.discountAmount)):0,de=x?.bundleDiscount??0,nn=x?.appliedBundles??[],Ue=!!g?.freeShipping,st=z.find(T=>T.id===D),lt=Ue?0:x?.shipping??st?.amount??0,rn=Ot({quoted:x!==null,optionCount:z.length,chosenAmount:st?.amount,couponWaivesFreight:Ue}),He={};for(let T of g?.freeUnits??[])He[T.partNumber]=(He[T.partNumber]??0)+T.quantity;let on=x?.tax??null,an=x?x.grandTotal:s-R-de+lt;return{sets:h,units:l.reduce((T,re)=>T+(re.components??[]).reduce((_e,sn)=>_e+sn.wheels*re.qty,0),0),subtotal:s,hasUnpricedLine:p,discount:R,bundleDiscount:de,appliedBundles:nn,shipping:lt,freeShipping:Ue,shippingStatus:rn,freeUnitsByPartNumber:He,tax:on,grand:an,repricing:!!m?.refused&&x!==null&&A===m?.code,currency:n}},[l,n,m,z,D,x,A]),at=_(s=>{Y(s),K()},[Y,K]),tn=Mt(()=>({isOpen:i,preview:t,open:K,close:se,toggle:ee,items:l,catalog:u,bundles:d,warmCatalog:H,add:Y,addAndOpen:at,remove:Pe,setQty:we,replaceItems:E,identify:rt,clearCapturedCart:ot,coupon:m,applyCoupon:le,removeCoupon:ue,refuseCoupon:ce,couponBusy:J,deliveryOptions:z,setQuoteDestination:ve,shippingMethodId:D,setShippingMethodId:Se,totals:it}),[i,t,K,se,ee,l,u,d,H,Y,at,Pe,we,E,rt,ot,m,le,ue,ce,J,z,ve,D,it]);return Mn(Ht.Provider,{value:tn,children:e})}function $t(){let e=An(Ht);if(!e)throw new Error("useCart() must be called inside <CartProvider>. Mount the provider in app/layout.tsx.");return e}import{cache as zn}from"react";function Bt(e,t,n,r){for(;e.size>=t;){let o,i;for(let[l,c]of e){if(c.expiresAt<=r){o=l;break}i===void 0&&n(l)&&(i=l)}let a=o??i??e.keys().next().value;if(a===void 0)return;e.delete(a)}}var Dn=6e4,Fn=5e3,Un=500,Ae=new Map;async function Hn(e){let{host:t,matchesRequestHost:n}=await pt();if(!t)return"";let r=await mt();return r?`${e}|slug:${encodeURIComponent(t)}/${encodeURIComponent(r)}`:n?`${e}|host:${t}`:`${e}|xhost:${t}`}var $n=e=>e.includes("|slug:")||e.includes("|xhost:");async function Wt(e,t){if(await gt()!==null)return t();let n=await Hn(e);if(!n)return t();let r=Date.now(),o=Ae.get(n);if(o&&o.expiresAt>r)return o.load;let i=await t(),a=i.outcome.state==="failed",l=a?Fn:Dn,c=Ae.get(n)?.lastGood,u=i.outcome.state==="ok"?i:a?c:void 0,f=a&&u?u:i;return Bt(Ae,Un,$n,r),Ae.set(n,{load:f,expiresAt:r+l,lastGood:u}),f}var Bn=404;function Wn(e){if(e instanceof pe&&e.status===Bn)return{state:"absent"};let t=e instanceof pe?e.status:-1,n=e instanceof Error?e.message:String(e);return{state:"failed",status:t,detail:n}}var Gn="[storefront:chrome-load-failed]";function qn(e,t){console.error(`${Gn} ${e} status=${t.status} \u2014 serving fallback chrome`,t.detail)}async function Gt(e,t,n,r){try{let o=await t();return r?.(o)?{value:o,outcome:{state:"absent"}}:{value:o,outcome:{state:"ok"}}}catch(o){let i=Wn(o);return i.state==="failed"&&qn(e,i),{value:n,outcome:i}}}function Kn(e){return e==="production"?"silent":"banner"}var Mo=Kn("production");function Xn(e,t){return e?.trim()||t}function Go({legalName:e,foundedYear:t,siteName:n},r=new Date().getFullYear()){let o=Xn(e,n);return`\xA9 ${t&&t<r?`${t}\u2013${r}`:`${r}`} ${o}`}var Vn={name:fe,legalName:null,foundedYear:null,faviconUrl:null,currencies:[],defaultCurrency:null,countries:[],defaultCountry:null,commerceEnabled:!0,cardPayments:!1,paymentMethods:[],paypalClientId:null,paypalEnvironment:null,squareApplicationId:null,squareLocationId:null,squareEnvironment:null,ga4MeasurementId:null,googleAdsId:null,googleAdsConversionLabel:null,metaPixelId:null,consentEnabled:!1,consentPrivacyPage:null,consentNoticeOptOut:!1,socialLinks:$e},qo=zn(async()=>Wt("site",()=>Gt("site",async()=>{let e=await B.getSite();return{name:ct(e.name),legalName:e.legalName?.trim()||null,foundedYear:e.foundedYear??null,faviconUrl:e.faviconUrl??null,currencies:e.currencies??[],defaultCurrency:e.defaultCurrency??null,countries:e.countries??[],defaultCountry:e.defaultCountry??null,commerceEnabled:e.commerceEnabled??!0,cardPayments:e.cardPayments??!1,paymentMethods:e.paymentMethods??(e.cardPayments?["card"]:[]),paypalClientId:e.paypalClientId??null,paypalEnvironment:e.paypalEnvironment??null,squareApplicationId:e.squareApplicationId??null,squareLocationId:e.squareLocationId??null,squareEnvironment:e.squareEnvironment??null,ga4MeasurementId:e.ga4MeasurementId??null,googleAdsId:e.googleAdsId??null,googleAdsConversionLabel:(e.googleAdsId?e.googleAdsConversionLabel:null)??null,metaPixelId:e.metaPixelId??null,consentEnabled:e.consentEnabled??!1,consentPrivacyPage:e.consentPrivacyPage??null,consentNoticeOptOut:e.consentNoticeOptOut??!1,socialLinks:dt(e.socialLinks)}},Vn)));var Ko={name:fe,legalName:null,foundedYear:null,faviconUrl:null,currencies:[{code:"USD",symbol:"$",decimalPlaces:2,isDefault:!0}],defaultCurrency:"USD",countries:[{code:"US",name:"United States",currency:"USD",url:"",isDefault:!0,chargeTax:!1,taxDisplay:"none",taxName:"",taxRate:null,postalLabel:"Zip Code"}],defaultCountry:"US",commerceEnabled:!0,cardPayments:!0,paymentMethods:["card"],paypalClientId:null,paypalEnvironment:null,squareApplicationId:null,squareLocationId:null,squareEnvironment:null,ga4MeasurementId:null,googleAdsId:null,googleAdsConversionLabel:null,metaPixelId:null,consentEnabled:!1,consentPrivacyPage:null,consentNoticeOptOut:!1,socialLinks:$e};import{jsx as be,jsxs as Qe}from"react/jsx-runtime";import{useEffect as ke,useId as Zn,useRef as Kt,useState as Te}from"react";import{efficientClientOpen as Yn}from"efficient-easel/screen/lib/session";var ye=new Map,Qn=64;async function jn(e){if(!Yn())return null;try{let t=await fetch(`${ut()}/logo-analysis.json?url=${encodeURIComponent(e)}`);if(!t.ok)return null;let n=await t.json();if(!n||typeof n!="object")return null;let{reversed:r,inkIsDark:o}=n;return typeof r!="string"?null:{reversed:r,inkIsDark:typeof o=="boolean"?o:null}}catch{return null}}function qt(e){let t=ye.get(e);if(t)return t;let n=jn(e);if(ye.set(e,n),ye.size>Qn){let r=ye.keys().next();r.done||ye.delete(r.value)}return n}var Jn=202/22,er=.88,ai=16,tr="invert(1)";function si({variant:e="header",scrolled:t=!0,src:n,reverse:r=!1,color:o=null,onLightSurface:i,reversedSrc:a,inkIsDark:l,size:c="medium",sizePx:u,wordmark:f,siteName:d=fe,fitToContainer:S=!1,fitWordmarkToContainer:N=!1,fitFloorPx:C}){let b=f&&f.trim()?f.trim():d,[P,O]=Te(!1),M=Kt(null),I=E=>{M.current=E};ke(()=>{let E=M.current?.ownerDocument??document,k=()=>{O(E.documentElement.getAttribute("data-theme")==="light")};k();let ne=new MutationObserver(k);return ne.observe(E.documentElement,{attributes:!0,attributeFilter:["data-theme"]}),()=>ne.disconnect()},[]);let v=n&&n.trim()?n.trim():null,x=!!v&&ft(v),W=i??(P&&t),A=o&&o.trim()?o.trim():null,G=r&&!A,y=`logo-color-${Zn().replace(/[^A-Za-z0-9_-]/g,"")}`,w=G&&x&&v&&a!=null?{reversed:a,inkIsDark:l??null}:null,m=w!==null,[q,J]=Te(null);ke(()=>{if(!G||!v||!x||m){J(null);return}let E=!1;return J(null),qt(v).then(k=>{E||J(k)}),()=>{E=!0}},[G,v,x,m]);let U=w??q,D=!!U&&U.inkIsDark!==null&&(W?!U.inkIsDark:U.inkIsDark),Se=G&&!!v&&!x&&!W,X=D&&U?U.reversed:v,K=X?[X]:[],[se,ee]=Te(0);ke(()=>{ee(0)},[v,D]);let ve=e==="footer"?We:Be[c],H=u&&u>0?u:ve,Ee=Math.round(H*Jn),F=se<K.length?K[se]:null,[z,V]=Te(X),le=F!==null&&F===z,ue=Kt(null);ke(()=>{let E=ue.current;if(!E||!E.complete)return;if(E.naturalWidth>0||E.naturalHeight>0){V(F);return}let k=!1;return E.decode().then(()=>!k&&V(F),()=>!k&&ee(ne=>ne+1)),()=>{k=!0}},[F]);let ce=S||N,te=`calc(100cqi / ${((b.length+1)*er).toFixed(2)})`,Y=ce&&C&&C>0?Math.min(C,H):null,Pe=ce?Y===null?`min(${H}px, ${te})`:`clamp(${Y}px, ${te}, ${H}px)`:`${H}px`,we=Qe("span",{className:`font-display font-bold tracking-[0.18em] ${Y===null?"whitespace-nowrap":"whitespace-normal"}`,style:{fontSize:Pe,lineHeight:1,...A?{color:A}:{}},"aria-label":b,children:[b,be("span",{className:"text-accent",style:A?{color:A}:void 0,children:"."})]});return Qe("span",{ref:I,className:"inline-flex items-center",children:[!le&&we,A&&F&&be("svg",{"aria-hidden":"true",focusable:"false",width:"0",height:"0",style:{position:"absolute"},children:Qe("filter",{id:y,colorInterpolationFilters:"sRGB",children:[be("feFlood",{style:{floodColor:A}}),be("feComposite",{in2:"SourceAlpha",operator:"in"})]})}),F&&be("img",{ref:ue,src:F,alt:b,width:Ee,height:H,className:"shrink-0 object-contain",style:{...le?{height:`${H}px`,width:"auto",...S?{maxWidth:"100cqi"}:{}}:{display:"none"},...Se?{filter:tr}:{},...A?{filter:`url(#${y})`}:{}},onLoad:()=>V(F),onError:()=>ee(E=>E+1)},F)]})}import{jsx as Ce,jsxs as rr}from"react/jsx-runtime";function nr({spokes:e,mesh:t=!1,className:n}){let a=c=>Math.round(c*1e3)/1e3,l=[];for(let c=0;c<e;c++){let u=c/e*Math.PI*2-Math.PI/2;if(l.push({x1:a(100+Math.cos(u)*22),y1:a(100+Math.sin(u)*22),x2:a(100+Math.cos(u)*86),y2:a(100+Math.sin(u)*86),main:!0}),t){let f=u+Math.PI/e;l.push({x1:a(100+Math.cos(f)*22*1.4),y1:a(100+Math.sin(f)*22*1.4),x2:a(100+Math.cos(f)*78),y2:a(100+Math.sin(f)*78),main:!1})}}return rr("svg",{viewBox:"0 0 200 200",fill:"none",stroke:"currentColor",className:n??"block h-[70%] w-[70%] transition-transform duration-700 [transition-timing-function:cubic-bezier(.2,.6,.2,1)]",children:[Ce("circle",{cx:100,cy:100,r:92,strokeWidth:2}),Ce("circle",{cx:100,cy:100,r:84,strokeWidth:1,opacity:.4}),Ce("circle",{cx:100,cy:100,r:22,strokeWidth:2}),Ce("circle",{cx:100,cy:100,r:6,fill:"currentColor"}),l.map((c,u)=>Ce("line",{x1:c.x1,y1:c.y1,x2:c.x2,y2:c.y2,stroke:"currentColor",strokeWidth:c.main?6:3,strokeLinecap:"round",opacity:c.main?1:.5},u))]})}var di="#c9a461",zt=[{f:"black",label:"Black",hex:"#171717"},{f:"silver",label:"Silver",hex:"#cccccc"},{f:"bronze",label:"Bronze",hex:"#8a6438"},{f:"graphite",label:"Graphite",hex:"#3a3c3f"},{f:"red",label:"Candy Red",hex:"#7a0f14"}],fi={name:"",color:"var(--fg)",family:"silver",src:""};function or(e,t){let n=r=>{let o=zt.findIndex(i=>i.f===r);return o===-1?zt.length:o};return n(e)-n(t)||e.localeCompare(t)}function pi(e){let t=new Set;for(let n of e)for(let r of n.finishes??[])r?.family&&t.add(r.family);return[...t].sort(or)}import{useState as ir}from"react";import{jsx as ae,jsxs as je}from"react/jsx-runtime";function ar({customerEmail:e}){let{coupon:t,applyCoupon:n,removeCoupon:r,couponBusy:o}=$t(),[i,a]=ir("");async function l(){o||!i.trim()||(await n(i,e),a(""))}return je("div",{className:"flex flex-col gap-2",children:[t===null?je("div",{className:"flex border border-line",children:[ae("input",{type:"text",value:i,onChange:c=>a(c.target.value),onKeyDown:c=>{c.key==="Enter"&&(c.preventDefault(),l())},placeholder:"Coupon code","aria-label":"Coupon code",className:"flex-1 bg-transparent px-4 py-4 font-mono text-[11px] uppercase tracking-[0.18em] text-fg outline-none placeholder:text-fg-dim"}),ae("button",{type:"button",onClick:()=>{l()},disabled:o,className:"border-l border-line px-4 font-mono text-[10px] uppercase tracking-[0.26em] text-btn transition-colors hover:bg-btn hover:text-btn-ink disabled:cursor-wait disabled:opacity-60",children:o?"\u2026":"Apply"})]}):je("div",{className:["flex items-center justify-between gap-3 border px-4 py-3",t.valid?"border-accent":"border-line"].join(" "),style:t.valid?{background:"color-mix(in oklab, var(--accent) 8%, transparent)"}:void 0,children:[ae("span",{className:["font-mono text-[11px] uppercase tracking-[0.22em]",t.valid?"text-accent":t.deferred?"text-fg":"text-fg-dim line-through"].join(" "),children:t.code}),ae("button",{type:"button",onClick:r,"aria-label":`Remove coupon ${t.code}`,className:"font-mono text-[12px] text-fg-dim transition-colors hover:text-fg",children:"\u2715"})]}),t?.deferred?ae("p",{className:"font-mono text-[10px] uppercase tracking-[0.18em] text-fg-dim",children:wt}):t&&!t.valid&&t.message&&ae("p",{className:"font-mono text-[10px] uppercase tracking-[0.18em] text-alert",children:t.message})]})}var Ze="Ads on. Shopper can opt out.",Oe="Ads and analytics off until Accept",sr={us:{region:"us",name:"United States",model:"opt-out",law:"California CCPA / CPRA, other state laws",beforeChoice:Ze,footerLink:"Do Not Sell or Share My Personal Information",panelEyebrow:"Do not sell or share",adsRowName:"Sale or sharing for ads"},ca:{region:"ca",name:"Canada",model:"opt-in",law:"PIPEDA, Quebec Law 25",beforeChoice:Oe,footerLink:"Privacy choices",panelEyebrow:"Privacy choices",adsRowName:"Advertising"},au:{region:"au",name:"Australia",model:"opt-out",law:"Privacy Act 1988 (APPs)",beforeChoice:Ze,footerLink:"Privacy choices",panelEyebrow:"Privacy choices",adsRowName:"Advertising"},nz:{region:"nz",name:"New Zealand",model:"opt-out",law:"Privacy Act 2020",beforeChoice:Ze,footerLink:"Privacy choices",panelEyebrow:"Privacy choices",adsRowName:"Advertising"},uk:{region:"uk",name:"United Kingdom",model:"opt-in",law:"PECR, UK GDPR",beforeChoice:Oe,footerLink:"Cookie settings",panelEyebrow:"Cookie settings",adsRowName:"Advertising"},eu:{region:"eu",name:"European Union",model:"opt-in",law:"ePrivacy Directive, GDPR",beforeChoice:Oe,footerLink:"Cookie settings",panelEyebrow:"Cookie settings",adsRowName:"Advertising"},other:{region:"other",name:"All other countries",model:"opt-in",law:"Safe default",beforeChoice:Oe,footerLink:"Cookie settings",panelEyebrow:"Cookie settings",adsRowName:"Advertising"}};function lr(e){let t=[...e.googleAds?["Google"]:[],...e.meta?["Facebook","Instagram"]:[]];return t.length<=1?t.join(""):`${t.slice(0,-1).join(", ")} and ${t[t.length-1]}`}function xi(e,t,n){let r=lr(n),o=r?`We use cookies to count visits and to show you ${t} ads on ${r}.`:"We use cookies to count visits.";return e.model==="opt-in"?{heading:r?"Cookies and ads":"Cookies",before:`${o} Nothing loads until you choose. You can change this at any time with `,link:e.footerLink,after:" at the bottom of every page."}:{heading:r?"Cookies and ads":"Cookies",before:`${o} You can say no at any time: choose Privacy choices, or use `,link:e.footerLink,after:" at the bottom of every page."}}var Si={accept:"Accept all",reject:"Reject all",choose:"Choose",save:"Save",ok:"OK",privacyChoices:"Privacy choices",privacyPolicy:"Privacy Policy",alwaysOn:"Always on"};var ur={asked:!1,region:"other",model:"opt-in",analytics:!0,ads:!0,chosen:!0,gpc:!1};var cr=ur;function wi(e=cr){if(e.asked)return e.ads?"granted":"denied"}function Ni(){let e=typeof crypto<"u"?crypto:void 0;if(typeof e?.randomUUID=="function")return e.randomUUID();let t=new Uint8Array(16);if(typeof e?.getRandomValues=="function")e.getRandomValues(t);else for(let r=0;r<t.length;r++)t[r]=Math.floor(Math.random()*256);t[6]=t[6]&15|64,t[8]=t[8]&63|128;let n=Array.from(t,r=>r.toString(16).padStart(2,"0")).join("");return`${n.slice(0,8)}-${n.slice(8,12)}-${n.slice(12,16)}-${n.slice(16,20)}-${n.slice(20)}`}import{Children as fr,isValidElement as pr,useEffect as Vt,useId as mr,useLayoutEffect as jt,useRef as Q,useState as Yt}from"react";var Me=(e,t)=>!!e[t]&&!e[t].disabled;function Je(e,t,n){let r=e.length;for(let o=1;o<=r;o++){let i=((t+n*o)%r+r)%r;if(Me(e,i))return i}return t}function et(e,t){return Je(e,t===1?-1:e.length,t)}function tt(e,t){return Me(e,t)?t:Math.max(et(e,1),0)}function Xt(e,t,n){let{open:r,focus:o}=e,i=a=>({...e,...a});if(t.length===1&&/\S/.test(t)){let a=e.typed+t.toLowerCase(),l=n.findIndex((c,u)=>Me(n,u)&&c.label.toLowerCase().startsWith(a));return{state:i({open:!0,typed:a,focus:l>=0?l:o}),handled:!0}}if(!r)return t==="ArrowDown"||t==="ArrowUp"||t==="Enter"||t===" "?{state:i({open:!0,typed:""}),handled:!0}:{state:e,handled:!1};switch(t){case"ArrowDown":return{state:i({focus:Je(n,o,1)}),handled:!0};case"ArrowUp":return{state:i({focus:Je(n,o,-1)}),handled:!0};case"Home":return{state:i({focus:et(n,1)}),handled:!0};case"End":return{state:i({focus:et(n,-1)}),handled:!0};case"Enter":case" ":return Me(n,o)?{state:i({open:!1,typed:""}),commit:o,refocus:!0,handled:!0}:{state:e,handled:!0};case"Escape":return{state:i({open:!1,typed:""}),refocus:!0,handled:!0};case"Tab":return{state:i({open:!1,typed:""}),handled:!1};default:return{state:e,handled:!1}}}import{placeMenu as gr}from"efficient-shell/ui";import{Fragment as Sr,jsx as j,jsxs as Zt}from"react/jsx-runtime";var Qt={body:"text-[length:var(--size-body,14px)]",label:"text-[length:var(--size-label,13px)]"};function hr({items:e,value:t,onPick:n,open:r,onOpen:o,onClose:i}){let[a,l]=Yt(!1),c=r!==void 0,u=c?r:a,[f,d]=Yt(0),S=Q({text:"",timer:0}),N=Q(null),C=Q(null),b=Q(null),P=mr(),O=Q(null),M=e.findIndex(y=>y.value===t),I=y=>{y!==u&&(c||l(y),y?o?.():i?.())},v=y=>{let w=e[y];!w||w.disabled||(n(w.value),I(!1),C.current?.focus())},x=y=>{let w={open:u,focus:u?f:tt(e,M),typed:S.current.text},m=Xt(w,y,e);return!m.handled&&m.state.open===u?!1:(m.state.typed!==w.typed&&(S.current.text=m.state.typed,window.clearTimeout(S.current.timer),S.current.timer=window.setTimeout(()=>{S.current.text=""},500)),d(m.state.focus),m.commit!==void 0?v(m.commit):I(m.state.open),m.refocus&&C.current?.focus(),m.handled)},W=Q(x);W.current=x;let A=Q(()=>I(!1));A.current=()=>I(!1);let G=y=>{u||(O.current=y.nativeEvent,W.current(y.key)&&y.preventDefault())};return Vt(()=>{if(!u)return;let y=m=>{N.current?.contains(m.target)||A.current()},w=m=>{m!==O.current&&W.current(m.key)&&m.preventDefault()};return document.addEventListener("mousedown",y),document.addEventListener("keydown",w),()=>{document.removeEventListener("mousedown",y),document.removeEventListener("keydown",w)}},[u]),Vt(()=>{u&&(S.current.text||d(tt(e,M)))},[u]),jt(()=>{if(!u||!b.current)return;b.current.children.item(f)?.scrollIntoView({block:"nearest"})},[f,u]),{open:u,toggle:()=>I(!u),close:()=>I(!1),focusIdx:f,setFocusIdx:d,pick:y=>v(e.findIndex(w=>w.value===y)),wrapRef:N,triggerRef:C,listRef:b,listId:P,onTriggerKeyDown:G,activeId:u?`${P}-${f}`:void 0}}var yr={select:{list:"absolute left-0 top-full z-50 mt-1 max-h-[280px] w-max min-w-full overflow-y-auto border-2 border-accent bg-bg shadow-xl",item:(e,t,n)=>["px-3 py-3 font-mono text-[13px] font-semibold uppercase tracking-[0.1em] transition-colors whitespace-nowrap",n?"cursor-not-allowed opacity-40":"cursor-pointer",e&&!n?"bg-accent text-bg":"bg-bg text-fg"].join(" ")},cell:{list:"absolute left-0 top-full z-50 mt-1 max-h-[320px] w-max min-w-full overflow-y-auto border-2 border-accent bg-bg shadow-xl",item:e=>[`cursor-pointer whitespace-nowrap px-6 py-3 font-mono ${Qt.label} font-semibold uppercase tracking-[0.1em] transition-colors`,e?"bg-accent text-bg":"bg-bg text-fg"].join(" "),pickerMarker:!0},hairline:{list:"absolute left-0 top-full z-50 max-h-[320px] w-full overflow-y-auto border border-line bg-bg shadow-[0_6px_20px_rgba(0,0,0,0.10)]",item:(e,t)=>[`flex cursor-pointer items-center justify-between gap-4 border-b border-line px-4 py-3 text-left ${Qt.body} transition-colors last:border-b-0`,t?"border-fg font-medium text-fg":e?"border-fg text-fg":"text-fg-dim"].join(" "),pickerMarker:!0},region:{list:"absolute right-0 top-full z-[200] mt-2 flex min-w-[240px] flex-col border border-line bg-surface text-fg",item:(e,t,n,r)=>["flex w-full cursor-pointer items-center gap-3 px-4 py-3 text-left transition-colors","font-mono text-[13px] uppercase tracking-[0.18em]",e?"bg-surface-2 text-fg":"",r?"":"border-b border-line",t?"text-accent":""].join(" "),itemStyle:e=>e?void 0:{color:"color-mix(in oklab, currentColor 80%, transparent)"}}};function br(e,t){jt(()=>{let n=e.current,r=n?.ownerDocument.defaultView;if(!n||!r)return;let o=()=>{let i=n.style;i.top=i.bottom=i.marginTop=i.marginBottom=i.maxHeight=i.overflowY=i.translate="";let a=n.offsetParent??n.parentElement;if(!a)return;let l=a.getBoundingClientRect(),c=n.getBoundingClientRect(),u=Math.abs(c.right-l.right)<Math.abs(c.left-l.left)?"end":"start",f=gr({trigger:{left:l.left,right:l.right,top:l.top,bottom:l.bottom},menu:{width:c.width,height:c.height},bounds:{left:0,top:0,right:r.innerWidth,bottom:r.innerHeight},align:u,side:"bottom"});if(f.side==="top"){i.top="auto",i.bottom="100%",i.marginTop="0px";let S=f.top+Math.min(c.height,f.maxHeight);i.marginBottom=`${Math.max(0,l.top-S)}px`}f.maxHeight<c.height&&(i.maxHeight=`${f.maxHeight}px`,i.overflowY="auto");let d=f.left-c.left;d&&(i.translate=`${d}px`)};return o(),r.addEventListener("resize",o),r.addEventListener("scroll",o,!0),()=>{r.removeEventListener("resize",o),r.removeEventListener("scroll",o,!0)}},[e,t])}function Cr({id:e,tone:t,items:n,value:r,focusIdx:o,onFocus:i,onPick:a,listRef:l,ariaLabel:c}){let u=yr[t],f=Q(null);return br(f,n.length),j("ul",{ref:d=>{f.current=d,l&&(l.current=d)},id:e,role:"listbox","aria-label":c,...u.pickerMarker?{"data-picker-menu":""}:{},className:u.list,children:n.map((d,S)=>{let N=d.value===r;return j("li",{id:`${e}-${S}`,role:"option","aria-selected":N,"aria-disabled":d.disabled||void 0,onMouseEnter:()=>!d.disabled&&i(S),onMouseDown:C=>{C.preventDefault(),d.disabled||a(d.value)},className:u.item(S===o,N&&d.value!=="",!!d.disabled,S===n.length-1),style:u.itemStyle?.(N),children:d.meta===void 0?d.label:Zt(Sr,{children:[d.lead,j("span",{className:"flex-1 whitespace-nowrap",children:d.label}),j("span",{className:"ml-auto text-[12px] opacity-50",children:d.meta})]})},`${d.value}_${S}`)})})}function xr({value:e,onChange:t,disabled:n,children:r,className:o,style:i,name:a,id:l,"aria-label":c}){let u=fr.toArray(r).flatMap(C=>{if(!pr(C))return[];if(C.type!=="option")return[];let P=C.props,O=P.value!==void 0?String(P.value):"",M=P.children,I=typeof M=="string"||typeof M=="number"?String(M):O;return[{value:O,label:I,disabled:!!P.disabled}]}),f=e??"",d=hr({items:u,value:f,onPick:C=>t?.({target:{value:C}})}),N=u.find(C=>C.value===f)?.label??u[0]?.label??"";return Zt("div",{ref:d.wrapRef,className:"relative",children:[a&&j("input",{type:"hidden",name:a,value:f}),j("button",{ref:C=>{d.triggerRef.current=C},type:"button",disabled:n,"aria-haspopup":"listbox","aria-expanded":d.open,"aria-controls":d.open?d.listId:void 0,"aria-activedescendant":d.activeId,"aria-label":c,id:l,onClick:()=>!n&&d.toggle(),onKeyDown:C=>!n&&d.onTriggerKeyDown(C),className:`block w-full ${o??""}`,style:i,children:j("span",{className:"block w-full truncate text-left",children:N})}),d.open&&j(Cr,{id:d.listId,tone:"select",items:u,value:f,focusIdx:d.focusIdx,onFocus:d.setFocusIdx,onPick:d.pick,listRef:d.listRef})]})}import{jsx as xe,jsxs as De}from"react/jsx-runtime";var vr="font-mono text-[length:var(--size-label,12px)]",Er="font-semibold uppercase tracking-[0.22em] text-fg";function Jt(e){return`${e??vr} ${Er}`}function en(){return xe("span",{className:"text-accent",children:" *"})}function Pr({children:e,required:t,labelFace:n}){return De("span",{className:Jt(n),children:[e,t?xe(en,{}):null]})}function wr({label:e,required:t,hint:n,separate:r,htmlFor:o,labelFace:i,className:a,children:l}){let c=a?`flex flex-col gap-2 ${a}`:"flex flex-col gap-2",u=n?xe("span",{className:"font-mono text-[11px] uppercase tracking-[0.22em] text-fg-dim",children:n}):null;return r||n?De("div",{className:c,children:[De("label",{htmlFor:o,className:Jt(i),children:[e,t?xe(en,{}):null]}),l,u]}):De("label",{htmlFor:o,className:c,children:[xe(Pr,{required:t,labelFace:i,children:e}),l]})}export{Wr as a,Gr as b,qr as c,ht as d,Ge as e,_r as f,Nr as g,Rr as h,Lr as i,ln as j,un as k,Ir as l,Ar as m,qe as n,Ne as o,me as p,kr as q,Re as r,yn as s,bn as t,Vr as u,Yr as v,Nt as w,Xe as x,Qr as y,jr as z,xn as A,Zr as B,Jr as C,Sn as D,eo as E,En as F,to as G,no as H,Rt as I,lo as J,uo as K,co as L,mo as M,go as N,Fr as O,vt as P,Ur as Q,Le as R,Ye as S,No as T,$t as U,Go as V,Vn as W,Ko as X,ai as Y,si as Z,nr as _,di as $,zt as aa,fi as ba,or as ca,pi as da,ar as ea,sr as fa,xi as ga,Si as ha,ur as ia,wi as ja,Ni as ka,hr as la,Cr as ma,xr as na,Pr as oa,wr as pa};
|