efficient-storefront-blocks 0.125.12 → 0.125.13
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 +8 -0
- package/dist/chunks/{CustomHtmlCodeWindow-ZSVS5DI6.js → CustomHtmlCodeWindow-GU7XJD4P.js} +1 -1
- package/dist/chunks/{EditorPreviewCheckout-NDZUORUC.js → EditorPreviewCheckout-YNOXGBF3.js} +1 -1
- package/dist/chunks/SiteEditorProvider-2DLGUDDP.js +1 -0
- package/dist/chunks/{chunk-ICWPUDN3.js → chunk-4HZIV5UO.js} +1 -1
- package/dist/chunks/chunk-4R75CGDP.js +9 -0
- package/dist/chunks/{chunk-R3WKYZOZ.js → chunk-AKQZ7SOP.js} +1 -1
- package/dist/chunks/{chunk-3LWDFU5Y.js → chunk-LHRUHC3R.js} +1 -1
- package/dist/chunks/{chunk-HOKKFWPX.js → chunk-NJMMRTE4.js} +1 -1
- package/dist/chunks/{chunk-YU4MIT6K.js → chunk-QZV32ZUO.js} +1 -1
- package/dist/chunks/chunk-RCG52BYQ.js +337 -0
- package/dist/chunks/{chunk-Y7DFVCVM.js → chunk-SVVQDQP3.js} +1 -1
- package/dist/chunks/{fitment-data-ANJWNG4T.js → fitment-data-4BSUUSAX.js} +1 -1
- package/dist/chunks/{section-css-style-7ROA6NKG.js → section-css-style-6XARTNKW.js} +1 -1
- package/dist/index.js +4 -4
- package/dist/render/built-with.json +1 -1
- package/dist/routine-index.json +1 -1
- package/dist/value-index.json +1 -1
- package/dist/words.d.ts +4 -0
- package/dist/words.js +2 -2
- package/package.json +3 -3
- package/dist/chunks/SiteEditorProvider-CIZSA67M.js +0 -1
- package/dist/chunks/chunk-RCOLM57Z.js +0 -9
- package/dist/chunks/chunk-SPLS5ZLA.js +0 -337
- /package/dist/chunks/{chunk-3DDOV7FZ.js → chunk-DET7LVPH.js} +0 -0
- /package/dist/chunks/{chunk-SRHU2S3G.js → chunk-E4ZWGCLS.js} +0 -0
- /package/dist/chunks/{chunk-3LWDFU5Y.js.LEGAL.txt → chunk-LHRUHC3R.js.LEGAL.txt} +0 -0
- /package/dist/chunks/{chunk-SPLS5ZLA.js.LEGAL.txt → chunk-RCG52BYQ.js.LEGAL.txt} +0 -0
- /package/dist/chunks/{chunk-RJM55KDO.js → chunk-UIWK6VX2.js} +0 -0
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import{b as pu,c as fu,d as Cu,e as Ou,g as Ks,h as Pu,i as ku}from"./chunk-Y7DFVCVM.js";import{$ as ge,$f as Ms,$g as gt,$h as wu,Aa as Pc,Ac as _o,Ag as Gs,Ah as bu,Bc as Ic,Ca as O,Cb as Ac,Cc as Nc,Ce as zc,Da as bo,Dc as Lc,Dd as Rs,E as Tc,Eb as Ut,Ec as ks,Fb as He,Fc as Dc,Ia as ws,Id as le,If as Vc,Jf as Bs,Ka as kc,Kf as ke,Kg as ht,Kh as Ws,Ld as Bc,Lf as Yc,Lh as vo,Mf as Xc,Mg as ru,Mh as yu,Nf as Wt,Nh as $,Ob as yo,Of as ce,Og as iu,Qg as lu,Rc as Fc,Rf as Kt,Rh as Su,Sc as As,Sd as Hc,Sf as jt,Sg as cu,Sh as _u,Th as Tu,Uh as Eu,Vd as Mc,Vf as qc,Wg as uu,Wh as xu,Xg as du,Ye as Eo,Yf as Hs,Yh as Yt,Zh as vu,_f as Zc,_h as wo,aa as Ec,ah as zs,b as W,ba as xc,c as Ye,ca as vc,cg as Jc,dg as Qc,dh as mu,ea as dt,ee as Is,ef as Ds,ga as go,hc as Rc,i as mc,ka as _n,kg as eu,l as mo,le as To,lg as $s,li as B,m as hc,n as gc,ne as Gt,ng as tu,oa as pt,oc as ft,oe as mt,of as M,og as ae,p as bc,pf as F,pg as nu,ph as hu,q as yc,qc as Cs,qf as Wc,qg as ou,qi as Ru,r as Sc,rc as Os,re as $c,rf as zt,rg as Ae,se as Ns,sf as Kc,sg as Vt,t as ho,tc as So,te as Uc,tf as Fs,u as _c,uf as En,va as wc,vf as jc,vg as au,vh as gu,wa as Cc,we as Gc,wg as Us,xa as Oc,xb as Tn,xe as Ls,yf as Xe,yh as xo,za as vs,zc as Ps,zf as qe,zg as su}from"./chunk-R3WKYZOZ.js";import{a as j,b as he}from"./chunk-RJM55KDO.js";import{d as Au}from"./chunk-3DDOV7FZ.js";var Nu="en",Co=null,Lu=Nu,Du=null;function WI(e,t,n){Co=e??null,Lu=t||Nu,Du=n??null}function P(){return Du}function KI(){return Lu}function jI(){return Co}function Iu(e,t){return t?e.replace(/\{([A-Za-z][A-Za-z0-9_]*)\}/g,(n,o)=>he(t,o)?String(j(t,o)):n):e}function c(e,t){let n=Co?j(Co,e):void 0;if(typeof n=="function"){try{let o=W(n(t??{}));if(o)return o}catch{}return Iu(e,t)}return Iu(W(n)??e,t)}function xn(e,t,n,o){return c(n===1?e:t,{...o,n})}import{parseHexColor as $u}from"efficient-shell/format";import{COLOR_SLOTS as Uu,FILL_COLOR_SLOTS as $b,colorRole as Ub,fillColorRole as Gu}from"efficient-shell/markup";import{parseHexColor as Fu}from"efficient-shell/format";import{FILL_COLOR_SLOTS as Fb}from"efficient-shell/markup";var Oo=e=>{let t=cu.find(n=>n.role===e);return t?`var(${t.token})`:""},Bb=e=>Oo(e)?`var(--theme-${e})`:"",Hb={main:{ink:pt.accent,page:pt.accent,key:"accent",label:()=>c("Main"),words:e=>c("Theme {n} main color",{n:e})},text:{ink:pt.text,page:pt.text,key:"text",label:()=>c("Text"),words:e=>c("Theme {n} text color",{n:e})},background:{ink:Oo("bg"),page:Bb("bg"),key:"background",label:()=>c("Background"),words:e=>c("Theme {n} background",{n:e})},muted:{ink:pt.labels,page:pt.labels,key:"muted",label:()=>c("Muted"),words:e=>c("Theme {n} muted color",{n:e})},surface:{ink:Oo("surface"),page:Oo("surface"),key:"surface",label:()=>c("Surface"),words:e=>c("Theme {n} surface color",{n:e})}};function Ze(e){return j(Hb,e)}var js="#9ca3af";function Xt(e,t,n){let o=Ze(e);return o?{hex:Fu(t[o.key]??"")??"",words:o.words(n)}:null}function Bu(e,t){return Fb.flatMap(n=>{let o=Xt(n,e,t);return o&&Ze(n)?.ink?[{name:n,label:o.words,value:o.hex||js}]:[]})}var Mb=["main","text","background"];function Hu(e){let t=new Set,n=[];return ke(e).themes.forEach((o,a)=>{for(let s of Mb){let r=Ze(s),i=r?o[r.key]:void 0,l=typeof i=="string"&&i?Fu(i):null;!r||!l||t.has(l)||(t.add(l),n.push({value:l,label:r.words(a+1)}))}}),n}function Me(e){return Ze(e)?.ink??""}function Re(e){if(typeof e!="string")return null;let t=Gu(e.trim());return t?.kind==="slot"&&Me(t.slot)?t.slot:null}var Gb={accent:"main",labels:"muted"};function $e(e){return j(Gb,e)??e}function Po(e){if(!e)return"";if(e.startsWith("#"))return $u(e)===e.toLowerCase()?e:"";let t=Ub($e(e));return t?.kind==="slot"?Me(t.slot):""}function zu(e,t=Uu){return t.flatMap(n=>{let o=Ze(n);return o?.ink?[{name:n,label:o.label(),value:e?.[n]||js}]:[]})}function Wu(e){let t=Gu($e(e));return t?.kind==="slot"?Me(t.slot):""}function r0(e){let t=e?.trim();return t?$b.find(n=>Me(n)===t)??null:null}function i0(e){let t={},n=e.ownerDocument,o=n?.defaultView;if(!n||!o)return t;let a=o.getComputedStyle(e),s=n.createElement("canvas").getContext("2d");for(let r of Uu){let i=Me(r);if(!i)continue;let l=i.replace(/^var\((--[\w-]+)\)$/,"$1"),u=a.getPropertyValue(l).trim();if(!u)continue;let d=Mu(u);!d&&s&&(s.fillStyle="#000000",s.fillStyle=u,d=Mu(String(s.fillStyle))),d&&(t[r]=d)}return t}function Mu(e){let t=e.trim().toLowerCase();if(t.startsWith("#"))return $u(t);let n=t.match(/^rgba?\(\s*(\d+)[\s,]+(\d+)[\s,]+(\d+)/);return n?`#${n.slice(1,4).map(o=>Math.min(255,Number(o)).toString(16).padStart(2,"0")).join("")}`:null}var ko="sf.gapContainer",Ue={min:-32,max:64,step:2},Zu={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},zb=new Set(["Events","GalleryB"]);function vn(e,t,n){if(typeof t=="number"&&Number.isFinite(t)&&t>=Ue.min)return t;if(typeof t=="string"){let o=Zu[e]?.[t];if(typeof o=="number")return o}return typeof n=="number"&&Number.isFinite(n)?n:qt[e]}var Wb="sf-gap-overlap",Kb="--sf-gap-overlap",Vs="--sf-block-gap",Ku="--sf-block-gap-rem",be={min:0,max:Ue.max,step:Ue.step};function wn(e){if(typeof e!="number"||!Number.isFinite(e))return null;let t=Math.min(Math.max(Math.round(e),be.min),be.max);return t-t%be.step}function u0(e,t){let n=En(e,t,"gap",be);if(n!==null)return{[Vs]:n,[Ku]:n};let o=wn(e);return o===null?{}:{[Vs]:`${o}px`,[Ku]:`${o/16}rem`}}var ju="--sf-block-gap-phone",Vu="--sf-block-gap-phone-rem",jb="--sf-block-gap-on-phone",Vb="max-view-tablet:[--sf-block-gap-on-phone:var(--sf-block-gap-phone)]",Yb="max-view-wide:[&_[data-sf-line~=edge]:not([data-sf-line~=edge]_*)]:[--sf-block-gap-on-phone:var(--sf-block-gap-phone)]";function d0(e,t){let n=En(e,t,"gap",be);if(n!==null)return{[ju]:n,[Vu]:n};let o=wn(e);return o===null?{}:{[ju]:`${o}px`,[Vu]:`${o/16}rem`}}function p0(e){return wn(e)===null?"":`${Vb} ${Yb}`}var Yu="sf-gap-zone",Xu="--sf-gap-len";function Ao(e,t){return typeof t=="number"&&Number.isFinite(t)&&t>=Ue.min?!0:typeof t=="string"&&typeof Zu[e]?.[t]=="number"}var qu="--sf-gap-len-phone",Xb="--sf-gap-len-tablet",Cn={min:0,max:Ue.max,step:Ue.step};function Je(e){return typeof e=="number"&&Number.isFinite(e)&&e>=Cn.min}function Ys(e){return e/2}function Xs(e,t,n){return Je(n)&&!Ao(e,t)}function qs(e,t,n,o,a){return Je(t)?t:Xs(e,n,a)?a:Ys(vn(e,n,o))}var qb={block:"sf-gap-overlap-block",inline:"sf-gap-overlap-inline",both:"sf-gap-overlap-both"};function f0(e,t,n,o,a){let s={...Je(o)?{[qu]:`${o}px`}:null,...Je(a)?{[Xb]:`${a}px`}:null};if(!Ao(e,t)){let i=`${qt[e]}px`,l=zb.has(e)?`var(--sf-card-gap, ${i})`:i;return{className:` ${Yu}`,style:{[Xu]:`var(${Vs}, ${l})`,[qu]:`var(${jb})`,...s}}}let r=vn(e,t);return r>=0?{className:` ${Yu}`,style:{[Xu]:`${r}px`,...s}}:{className:` ${Wb} ${qb[n]}`,style:{gap:"0px",[Kb]:`${-r/2}px`}}}import{jsx as Js,Fragment as ay,jsxs as sy}from"react/jsx-runtime";import{createContext as ry,useContext as iy,useMemo as ly}from"react";var Zb=4,Jb={sans:"Arial",condensed:"Arial Narrow",serif:"Times New Roman",mono:"Courier New"},Qb={sans:"sans-serif",serif:"serif",mono:"monospace"},ey="latin",ty=/^\/(?![\/\\])[^\s"'()\\<>:]+$/,ny=/^U\+[0-9A-Fa-f?]{1,6}(?:-[0-9A-Fa-f]{1,6})?(?:\s*,\s*U\+[0-9A-Fa-f?]{1,6}(?:-[0-9A-Fa-f]{1,6})?)*$/,Zs=e=>`"${Pu(e)}"`,Ju=e=>`${e} Fallback`;function oy(e){return typeof e?.url=="string"&&ty.test(e.url)&&typeof e.unicodeRange=="string"&&ny.test(e.unicodeRange.trim())&&Number.isInteger(e.weight)&&e.weight>=1&&e.weight<=1e3&&(e.style==="normal"||e.style==="italic")}var Ro=e=>`${e}%`,Io=e=>typeof e=="number"&&Number.isFinite(e);function Qu(e,t){let n={css:"",vars:{},preload:[]};if(e.siteFonts.size===0)return n;let o=[],a=[];for(let s of new Set(t)){let r=e.siteFonts.get(s),i=e.byKey.get(s);if(!r||!i)continue;let l=Zs(r.family);for(let p of r.files??[])oy(p)&&(o.push(`@font-face { font-family: ${l}; src: url("${p.url}") format("woff2"); font-weight: ${p.weight}; font-style: ${p.style}; unicode-range: ${p.unicodeRange.trim()}; font-display: swap; }`),p.subset===ey&&a.push(p));let u=r.fallbackMetrics,d=!!u&&Io(u.ascent)&&Io(u.descent)&&Io(u.lineGap)&&Io(u.sizeAdjust);if(d){let p=Jb[r.condensed?"condensed":i.category];o.push(`@font-face { font-family: ${Zs(Ju(r.family))}; src: local("${p}"); ascent-override: ${Ro(u.ascent)}; descent-override: ${Ro(u.descent)}; line-gap-override: ${Ro(u.lineGap)}; size-adjust: ${Ro(u.sizeAdjust)}; }`)}n.vars[i.cssVar]=Ks([l,...d?[Zs(Ju(r.family))]:[],Qb[i.category]].join(", "))}return n.css=Ks(o.join(`
|
|
2
|
-
`)),n.preload=[...a.filter(s=>s.style==="normal"),...a.filter(s=>s.style!=="normal")].slice(0,Zb),n}var td=ry(ge);function E0({siteFonts:e,children:t}){let n=ly(()=>Ec(e),[e]);return Js(td.Provider,{value:n,children:t})}function On(){return iy(td)}var ed="sf-site-fonts";function x0({usedKeys:e,preload:t=!0}){let n=On(),o=Qu(n,e),a=Object.entries(o.vars),s=[o.css,a.length?`:root { ${a.map(([r,i])=>`${r}: ${i}`).join("; ")} }`:""].filter(Boolean).join(`
|
|
3
|
-
`);return s?sy(ay,{children:[(t?o.preload:[]).map(r=>Js("link",{rel:"preload",as:"font",type:"font/woff2",href:r.url,crossOrigin:""},r.id)),Js("style",{href:`${ed}-${ku(s)}`,precedence:ed,dangerouslySetInnerHTML:{__html:s}})]}):null}import{jsx as Y,jsxs as yt,Fragment as Qy}from"react/jsx-runtime";import{useCallback as gd,useContext as eS,useId as Sd,useRef as bd,useState as yd}from"react";import{ThemeIcon as tS}from"efficient-easel/icons";import{Button as nS,useClickOutside as oS}from"efficient-shell/ui";import{SettingsField as aS}from"efficient-easel/panel";import{ScreenDocumentContext as sS}from"efficient-easel/screen/components/ScreenDocumentContext";import{jsx as k,jsxs as et,Fragment as Iy}from"react/jsx-runtime";import{parseHexColor as Ny}from"efficient-shell/format";import{Button as nr,IconButton as Ly,Tooltip as Dy}from"efficient-shell/ui";import{jsx as Qe,jsxs as vy}from"react/jsx-runtime";import{AccentIcon as wy}from"efficient-easel/icons";import{Button as Cy,Tooltip as Oy}from"efficient-shell/ui";import{jsx as se,jsxs as er}from"react/jsx-runtime";import{useRef as cy}from"react";import{ColorPicker as uy,ColorPickerPanel as dy,ColorSwatch as py,HexInput as fy,Popover as my,Tooltip as hy,colorFill as gy,colorSwatchClasses as by,useShellStrings as yy}from"efficient-shell/ui";import{SettingsDefaultReset as Sy,SettingsField as _y}from"efficient-easel/panel";import{typedHex as Qs}from"efficient-easel/pick";var nd="Not set";function od({value:e,onChange:t,label:n,id:o,caption:a,inherited:s,ariaLabel:r,choices:i}){return se(Ey,{value:e,onChange:t,label:c(r??n),id:o,caption:a,inherited:s,choices:i})}function Ty(){let{theme:e}=B();return Hu(e)}function Ey({value:e,onChange:t,label:n,id:o,caption:a,inherited:s,choices:r}){let i=Ty(),l=e?null:Qs(s??""),u=a!==void 0&&(!e||Qs(a)!==Qs(e))?a:null,d=p=>{p!==e&&t(p)};return er("div",{className:"sf-colour",children:[r?se(xy,{id:o,value:e,onChange:t,label:n,presets:i,follows:l,choices:r}):se(uy,{id:o,value:e,onChange:d,label:n,presets:i,fallback:l??void 0,size:"md",align:"start"}),u!==null?se("span",{className:"sf-colour-caption",children:u}):se("span",{className:"sf-colour-hexwrap",children:se(fy,{value:e||l||"",onChange:d,label:c("{label} hex code",{label:n}),placeholder:e||l?void 0:c(nd),className:l?"sf-colour-hex is-inherited":"sf-colour-hex",size:"md"})})]})}function xy({value:e,onChange:t,label:n,id:o,presets:a,follows:s,choices:r}){let i=yy().color,l=e||s||"",u=r.findIndex(f=>f.selected),d=u>=0,p=cy(u);return d&&(p.current=u),se(my,{id:o,trigger:se("span",{"aria-hidden":"true",className:"absolute inset-0",style:gy(l)}),triggerLabel:i.swatch(n,l.toUpperCase()||i.none),triggerClassName:by({size:"md"}),"aria-label":i.panel(n),align:"start",children:er("div",{className:"sf-colour-window",children:[se("div",{role:"group","aria-label":n,className:"sf-colour-choices",children:r.map(f=>se(hy,{content:f.label,children:se(py,{color:f.color,"aria-label":f.label,selected:f.selected,onClick:()=>{f.selected||f.onPick()}})},f.label))}),se(dy,{value:d?"":e,onChange:t,label:n,presets:a,fallback:(d?l:s)??void 0},p.current)]})})}function ye({label:e,icon:t,changed:n,hint:o,onReset:a,resetTo:s,children:r,...i}){return se(_y,{label:e,icon:t,htmlFor:i.id,changed:n,hint:o,action:a?se(Sy,{words:P()?.panel,label:e,changed:!!n,detail:s,onReset:a}):void 0,children:r?er("div",{className:"es-width-stack",children:[od({...i,label:e}),r]}):od({...i,label:e})})}function Pn({label:e,icon:t,value:n,inherited:o,resetTo:a,onChange:s,onReset:r,hint:i,choices:l,children:u}){let d=!!n;return se(ye,{label:e,icon:t,value:n,inherited:d?void 0:o,onChange:s,changed:d,onReset:r,resetTo:a,hint:i,choices:l,children:u})}function tr(e){return ce(e).background}function Py(e){let t=Xe(e.accent,tr(e));return t===null?null:{ratio:t,grade:jt(t)}}function ky(e){let t=tr(e),n=Xe(e.accent,t);return n===null?[]:qc(e.accent).filter(o=>{let a=Xe(o,t);return a!==null&&a>n&&jt(a)==="good"})}var Ay={good:"Easy to read","large-only":Kt["large-only"],hard:Kt.hard};function ad({value:e,onChange:t}){let n=Py(e),o=n?.grade,a=n&&n.grade!=="good"?ky(e):[];return Qe(ye,{label:c("Main color"),icon:Qe(wy,{}),hint:n?c(Ay[n.grade]):void 0,value:e.accent,onChange:s=>t({...e,accent:s}),children:a.length>0?Qe("div",{className:"w-full min-w-0",children:vy("div",{className:"sf-readability",children:[Qe("p",{className:"sf-readability-advice",children:Ry(o,!0)}),Qe("div",{className:"sf-readability-suggestions",children:a.map(s=>{let r=Xe(s,tr(e));return Qe(Oy,{content:c("Use {colour}",{colour:s.toUpperCase()}),children:Qe(Cy,{variant:"secondary",className:"sf-readability-suggestion",leftIcon:Qe("span",{className:"sf-readability-chip",style:{background:s},"aria-hidden":!0}),onClick:()=>t({...e,accent:s}),children:r?`${r.toFixed(1)}:1`:s.toUpperCase()})},s)})})]})}):null})}function Ry(e,t){return e?e==="good"?c("This color reads clearly on your pages."):t?c("This color is hard to read on this theme's page. The buttons below are the same hue, darkened."):c("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."):c("Pick a color to see how it reads.")}import{ButtonIcon as Fy,ChevronDownIcon as rd,ChevronUpIcon as By,GroundIcon as Hy,LayoutIcon as My,SquareIcon as $y,TextSmallIcon as Uy,TypeIcon as sd}from"efficient-easel/icons";var kn=e=>c("Theme {n}",{n:e+1});function id({colors:e}){let t=ce(e),n=Hs(e)??t.accent;return et("span",{className:"sf-theme-page",style:{background:t.background,color:t.text},"aria-hidden":!0,children:[k("span",{className:"sf-theme-eyebrow",style:{color:t.muted},children:c("label")}),et("span",{className:"sf-theme-headline",children:[c("Heading")," ",k("span",{style:{color:t.accent},children:c("main")})]}),k("span",{className:"sf-theme-body",children:c("body text")}),et("span",{className:"sf-theme-row",children:[k("span",{className:"sf-theme-btn",style:{background:n,color:Ms(e,t.accent)},children:c("button")}),k("span",{className:"sf-theme-mini",style:{background:t.surface,borderColor:t.line},children:c("card")})]})]})}var or={"Text color":k(sd,{}),"Label color":k(Uy,{}),Background:k(Hy,{}),"Panels & cards":k(My,{}),Borders:k($y,{}),"Button color":k(Fy,{}),"Button text color":k(sd,{})};function Gy({label:e,colorKey:t,value:n,onChange:o,idPrefix:a="sf-theme-ink"}){let s=`${a}-${t}`;return k(ye,{label:c(e),icon:or[e],id:s,value:n,onChange:r=>o(t,r)})}function zy({value:e,accent:t,onChange:n,idPrefix:o="sf-theme-ink"}){let a=`${o}-button`,s=e!==void 0&&Ny(e)===e.toLowerCase(),r=s?e:t;return k(ye,{label:c("Button color"),icon:or["Button color"],id:a,value:r,caption:s?r:c("Main"),onChange:n})}function Wy({colors:e,accent:t,onChange:n,idPrefix:o="sf-theme-ink"}){let a=`${o}-button-ink`,s=Zc(e),r=Ms(e,t),i=Hs(e)??t,l=jt(Xe(r,i)??0);return k(ye,{label:c("Button text color"),icon:or["Button text color"],hint:s&&l!=="good"?c("{grade} on the button",{grade:c(Kt[l])}):void 0,id:a,value:r,caption:s?r:c("Auto"),onChange:n})}var Ky=[{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 ar({colors:e,onChange:t,idPrefix:n}){let o=ce(e);return k(Iy,{children:Ky.map(a=>"colour"in a?k(ad,{value:e,onChange:t},"colour"):"moduleBreak"in a?k("div",{className:"sf-theme-module-break","aria-hidden":"true"},"module-break"):"button"in a?k(zy,{value:e.button,accent:o.accent,onChange:s=>t({...e,button:s}),idPrefix:n},"button"):"buttonInk"in a?k(Wy,{colors:e,accent:o.accent,onChange:s=>t({...e,buttonInk:s}),idPrefix:n},"buttonInk"):k(Gy,{label:a.label,colorKey:a.key,value:o[a.key],onChange:(s,r)=>t({...e,[s]:r}),idPrefix:n},a.key))})}function No({index:e,colors:t,selected:n,role:o="radio",open:a,editable:s=!0,onPick:r,onEdit:i,onChangeColors:l}){let u=ce(t),d=kn(e),p=e<Bs.length&&!t.brandInk?Bs[e]:null,f=jt(Xe(u.text,u.background)??0),m=p?JSON.stringify(t)!==JSON.stringify(p):!1,b=a!==void 0;return et("div",{className:`sf-theme-card${n?" is-selected":""}`,children:[k("button",{type:"button",role:o,"aria-checked":o==="radio"?n:void 0,"aria-selected":o==="option"?n:void 0,"aria-label":d,className:"sf-theme-pick",onClick:r,children:k(id,{colors:t})}),et("div",{className:"sf-theme-foot",children:[k("span",{className:"sf-theme-name",children:d}),f!=="good"&&k("span",{className:"sf-theme-warn",children:c(Kt[f])}),s&&i&&b&&k("span",{className:"sf-theme-edit",children:k(Dy,{content:a?c("Collapse"):c("Edit colors"),children:k(Ly,{size:"sm","aria-expanded":a,"aria-controls":`sf-theme-colours-${e}`,"aria-label":a?c("Collapse {name}",{name:d}):c("Edit colors for {name}",{name:d}),onClick:i,children:a?k(By,{size:14}):k(rd,{size:14})})})}),s&&i&&!b&&k(nr,{variant:"secondary",size:"sm",className:"sf-theme-edit","aria-label":c("Edit {name}",{name:d}),onClick:i,children:c("Edit")})]}),a&&et("div",{id:`sf-theme-colours-${e}`,className:"sf-theme-colours",children:[k(ar,{colors:t,onChange:y=>l?.(y)}),p&&k(nr,{variant:"link",size:"sm",className:"sf-theme-reset",disabled:!m,onClick:()=>l?.({...p}),children:m?c("Reset {name} to the preset",{name:d}):c("Not changed")})]})]})}function ld({colors:e,name:t,nameId:n,open:o,menuId:a,labelId:s,buttonRef:r,onClick:i,onKeyDown:l,onEdit:u}){return et("div",{className:"sf-secttheme-btn",children:[k("button",{ref:r,type:"button",className:"sf-theme-pick","aria-expanded":o,"aria-controls":a,"aria-labelledby":`${s} ${n}`,onClick:i,onKeyDown:l,children:e?k(id,{colors:e}):k("span",{className:"sf-secttheme-nopreview","aria-hidden":"true"})}),et("div",{className:"sf-theme-foot",children:[k("span",{id:n,className:"sf-theme-name",children:t}),u&&k(nr,{variant:"secondary",size:"sm",className:"sf-theme-edit","aria-label":c("Edit {name}",{name:t}),onClick:u,children:c("Edit")}),k("button",{type:"button",className:"sf-secttheme-caret","aria-hidden":"true",tabIndex:-1,onClick:i,children:k(rd,{size:12,className:"sf-multi-caret","aria-hidden":"true"})})]})]})}import{useCallback as cr,useEffect as fd,useRef as Do}from"react";import{currentEaselSession as Xy}from"efficient-easel/screen/lib/session";import{backendOf as jy}from"efficient-easel/screen/lib/session";var xe=jy,Q0=e=>e.blocks;import{useEaselSession as qy}from"efficient-easel/screen/lib/session-context";import{useSyncExternalStore as Vy}from"react";var ud,sr=null,bt=null,Lo=0,rr=new Set;function ir(e){ud=e;for(let t of rr)t()}function nN(e){sr=e,Lo+=1,bt&&clearTimeout(bt),bt=null,ir(void 0)}function oN(e){Lo+=1,ir(e)}function dd(e=250){sr&&(bt&&clearTimeout(bt),bt=setTimeout(()=>{bt=null;let t=sr;if(!t)return;let n=++Lo;t().then(o=>{n===Lo&&ir(o)}).catch(()=>{})},e))}function cd(){return ud}function Yy(e){return rr.add(e),()=>{rr.delete(e)}}function aN(){return Vy(Yy,cd,cd)}var lr=new Set;function pd(e){return lr.add(e),()=>{lr.delete(e)}}async function rN(){let e=(await Promise.allSettled([...lr].map(async t=>t()))).find(t=>t.status==="rejected");if(e)throw e.reason}import{WebsiteBackendError as Zy}from"efficient-easel/screen/lib/backend-error";function md(e=Xy()){return(t,n,o)=>{let a=xe(e).theme;return a?a.update(t,o?{siteId:o}:void 0):Promise.reject(new Zy("invalid","This backend stores no site theme."))}}function hd(e){return e.themeFromDocument?{status:"skipped",reason:"template"}:e.token?null:{status:"skipped",reason:"no-token"}}async function Jy(e,t=md()){let{themeFromDocument:n,token:o,siteId:a,patch:s}=e,r=hd({themeFromDocument:n,token:o});if(r)return r;if(Object.keys(s).length===0)return{status:"skipped",reason:"empty"};try{return await t(s,o,a??void 0),{status:"saved"}}catch(i){return{status:"failed",error:i}}}function Fo({themeFromDocument:e,tokenRef:t,siteId:n,onResult:o}){let a=Do(null),s=Do({}),r=qy(),i=Do(o);i.current=o;let l=Do(null),u=cr(f=>{if(f.status==="skipped"){let m=`skipped:${f.reason}`;if(l.current===m)return;l.current=m}else l.current=null;i.current?.(f)},[]),d=cr(async()=>{a.current&&(clearTimeout(a.current),a.current=null);let f=s.current;s.current={};let m=await Jy({themeFromDocument:e,token:t?.current,siteId:n,patch:f},md(r));return u(m),m.status==="saved"&&dd(),m.status==="failed"&&(s.current={...f,...s.current}),m},[e,t,n,u,r]),p=cr((f,m=!1)=>{let b=hd({themeFromDocument:e,token:t?.current});if(b){u(b);return}s.current={...s.current,...f},a.current&&clearTimeout(a.current),m?d():a.current=setTimeout(()=>{d()},500)},[e,t,d,u]);return fd(()=>()=>{d()},[d]),fd(()=>pd(async()=>{if(!a.current&&Object.keys(s.current).length===0)return;let f=await d();if(f.status==="failed")throw f.error}),[d]),{persist:p,flush:d}}var rS="Follow the page",PN="Follow the slideshow",iS=e=>c("Editing {name} changes it everywhere.",{name:e});function lS({colors:e}){if(!e)return Y("span",{className:"sf-secttheme-chip sf-secttheme-chip--none","aria-hidden":"true"});let t=ce(e);return yt("span",{className:"sf-secttheme-chip","aria-hidden":"true",children:[Y("i",{style:{background:t.background}}),Y("i",{className:"sf-secttheme-chip-accent",style:{background:t.accent}})]})}function cS({themes:e,value:t,onPick:n,onEdit:o,menuId:a,followLabel:s}){return yt("div",{className:"sf-multi-menu sf-secttheme-menu",id:a,role:"listbox",children:[s!==void 0&&yt(Qy,{children:[yt("button",{type:"button",role:"option","aria-selected":t===null,className:`sf-secttheme-item${t===null?" is-active":""}`,onClick:()=>n(uu),children:[Y(lS,{}),Y("span",{className:"sf-secttheme-name",children:c(s)})]}),Y("div",{className:"sf-secttheme-sep",role:"presentation"})]}),t!==null&&e[t]&&Y("p",{className:"sf-secttheme-oncard",role:"presentation",children:c("{name} is on this section",{name:kn(t)})}),e.map((r,i)=>i===t?null:Y(No,{role:"option",index:i,colors:r,selected:!1,onPick:()=>n(i),onEdit:o?()=>o(i):void 0},i))]})}function uS({index:e,colors:t,onChange:n,onDone:o}){let a=kn(e),s=Sd();return yt("div",{className:"sf-secttheme-sheet",children:[yt("div",{className:"sf-secttheme-sheet-head",children:[Y("span",{children:a}),Y(nS,{variant:"secondary",className:"sf-secttheme-done",onClick:o,children:c("Done")})]}),Y("div",{className:"sf-secttheme-rows",children:Y(ar,{colors:t,onChange:n,idPrefix:s})}),Y("p",{className:"sf-secttheme-warn",children:iS(a)})]})}function _d({value:e,onChange:t,followLabel:n,hint:o,canEdit:a=!0}){let{theme:s,setTheme:r}=B(),i=ke(s),l=eS(sS),u=l?.tokenRef,d=l?.siteId??null,p=!l?.capabilities?.hasSiteTheme,{persist:f,flush:m}=Fo({themeFromDocument:p,tokenRef:u,siteId:d}),b=ke(i),y=b.themes,T=gt(e),S=T!==null?y[T]:void 0,E=S??(y.length?Wt(b):void 0),[x,v]=yd(!1),[w,I]=yd(null),C=bd(null),D=bd(null),z=Sd(),Ee=gd(()=>{v(!1),I(null)},[]),uo=gd(()=>{!x&&w===null||(m(),Ee())},[x,w,Ee,m]);oS(C,uo);let po=X=>{t(X),Ee()},fo=X=>{if(w===null)return;let Nb=y.map((Lb,Db)=>Db===w?X:Lb),xs={...b,themes:Nb};r(xs),f({selected_preset:xs.selected,theme_presets:xs.themes})};return yt("div",{className:"sf-secttheme",ref:C,children:[Y(aS,{label:c("Theme"),icon:Y(tS,{}),labelId:`${z}-label`,hint:o,children:Y(ld,{colors:E,onEdit:a&&T!==null?()=>{I(T),v(!1)}:void 0,name:S?kn(T):c(n??rS),nameId:`${z}-value`,labelId:`${z}-label`,open:x,menuId:z,buttonRef:D,onClick:()=>{I(null),v(X=>!X)},onKeyDown:X=>{X.key==="Escape"&&(x||w!==null)&&(X.preventDefault(),Ee())}})}),x&&w===null&&Y("div",{onKeyDown:X=>{X.key==="Escape"&&(X.preventDefault(),Ee(),D.current?.focus())},children:Y(cS,{themes:y,value:T,onPick:po,onEdit:a?X=>{I(X),v(!1)}:void 0,menuId:z,followLabel:n})}),a&&w!==null&&y[w]&&Y(uS,{index:w,colors:y[w],onChange:fo,onDone:()=>{m(),Ee(),D.current?.focus()}})]})}import{defaultTextStyles as Qd,textStyleCaseCss as D_}from"efficient-easel/text-styles/model";import{resolveViewValue as ep}from"efficient-easel/draw";import{VIEW_DESKTOP_MIN as Td,VIEW_TABLET_MIN as Ed}from"efficient-easel/draw";var Bo=.02,xd=`(min-width: ${Tn}px) and (max-width: ${Td-Bo}px)`,vd=`(max-width: ${Tn-Bo}px)`,Ho=`(min-width: ${Ed}px) and (max-width: ${Td-Bo}px)`,Mo=`(max-width: ${Ed-Bo}px)`;import{textStyleCaseCss as RS,textStyleCaseOfCss as IS,viewKeyAt as Vd}from"efficient-easel/draw";function $o(e,t){return t?`${e}[${t.index}].${t.rowKey}`:e}function dS(e){let t=/^([A-Za-z0-9_$]+)\[(\d+)\]\.([A-Za-z0-9_$]+)$/u.exec(e);return t?{key:t[1],row:{index:Number(t[2]),rowKey:t[3]}}:{key:e,row:null}}import{decodePartId as fr,encodePartId as a1}from"efficient-easel/draw";import{LINK_FIELD_MARKER as Dd,SCAFFOLD_FIELD_MARKER as Nd,TEXT_FIELD_MARKER as Wo}from"efficient-easel/draw";import{readHidable as Fd}from"efficient-easel/draw";import{SCALAR_TEXT_CONTROLS as vS}from"efficient-easel/draw";var wd={ProductGrid:{source:{keep:["slug"]}},GalleryItem:{product:{keep:["code","finish"]}},FeaturedCover:{source:{keep:["slug"]}},LongRead:{source:{keep:["slug"]}}},Cd={Events:["posts"],SubscribeBlogs:["posts"]};var pS=["anchor"],fS=/^href$|Href$|^url$|Url$|^link$|^mailto$|^tel$/;function An(e){return pS.includes(e)||fS.test(e)}var mS={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"}}};mS.ContactLocations={"locations[].lat":{verb:"pii"},"locations[].lng":{verb:"pii"},"locations[].mapsUrl":{verb:"pii"},"locations[].geocode":{verb:"pii"}};var HN=Object.fromEntries(Object.entries(wd).map(([e,t])=>[e,Object.keys(t)])),MN=Object.fromEntries(Object.entries(Cd).map(([e,t])=>[e,[...t]]));var ur="__ownBox";function Od(e){return!!e&&typeof e=="object"&&e[ur]===!0}var dr="sfPanelOnly";function Uo(e){return!!e&&typeof e=="object"&&e[dr]===!0}import{TEXT_FIELD_MARKER as _S}from"efficient-easel/draw";import{TEXT_FIELD_MARKER as Pd}from"efficient-easel/draw";import{readHidable as kd}from"efficient-easel/draw";import{SCALAR_TEXT_CONTROLS as hS}from"efficient-easel/draw";var gS=hS,bS=["text","textarea"],yS=["textarea","plainTextarea"];function SS(e){return!e||typeof e!="object"?null:e[Pd]?.control??null}function Ad(e){let t=SS(e);return t&&gS.includes(t)?t:null}function jN(e){return yS.includes(e)}function VN(e){return!e||typeof e!="object"?void 0:e[Pd]?.placeholder}function Go(e){return kd(e).text}function pr(e,t,n){return bS.includes(e)?{text:n,hidden:kd(t).hidden}:n}function YN(e,t,n,o){return Go(e[t])===o?null:{...e,[t]:pr(n,e[t],o)}}function Rd(e){if(!(!e||typeof e!="object"))return e[_S]}function TS(e){if(!e||typeof e!="object")return null;let t=e.arrayFields;return t&&typeof t=="object"?t:null}function Id(e,t){if(!Array.isArray(t))return[];let n=Rd(e),o=[];if(n?.control==="textList"){let s=n.itemKey??"text";return t.forEach((r,i)=>{let l=W(r?.[s]);l&&o.push({row:{index:i,rowKey:s},text:l})}),o}let a=TS(e);return a?(t.forEach((s,r)=>{for(let[i,l]of Object.entries(a)){if(!Ad(l))continue;let u=Go(s?.[i])||Rd(l)?.placeholder||"";u&&o.push({row:{index:r,rowKey:i},text:u})}}),o):[]}function ES(e,t){if(Array.isArray(e))return e[t.index]?.[t.rowKey]}function xS(e,t,n,o){let a=e[t];return!Array.isArray(a)||n.index<0||n.index>=a.length?null:{...e,[t]:a.map((s,r)=>r===n.index?{...s,[n.rowKey]:o}:s)}}function e1(e,t,n,o,a){let s=ES(e[t],n);return Go(s)===a?null:xS(e,t,n,pr(o,s,a))}function t1(e,t){return t?`${e} \xB7 row ${t.index+1}`:e}var m1="data-sf-part",h1="data-sf-region-part",g1="data-sf-part-row";function b1(e,t){return`${e}[${t}]`}var y1="data-sf-part-kind",wS="data-sf-part-style-owner",CS="data-sf-part-style-kind";function S1(e){for(let t=e;t;t=t.parentElement){let n=t.getAttribute(wS),o=t.getAttribute(CS);if(n&&o)return{owner:n,kind:o};if(t.getAttribute("data-easel-block"))return null}return null}var Ld=2;function Zt(e){return vs(e).replace(/\s+/gu,"")}function zo(e,t,n){let o=e[Wo];if(o){if(o.control==="textList"){let s=o.itemKey??"text";if(!Array.isArray(t))return;for(let r of t){let i=r?.[s];typeof i=="string"&&n.push(i)}return}let{text:a}=Fd(t);a?n.push(a):o.placeholder&&n.push(o.placeholder);return}if(!e[Dd]){if(e.type==="text"||e.type==="textarea"){let a=W(t);a&&n.push(a);return}if(e.arrayFields&&Array.isArray(t)){for(let a of t)for(let[s,r]of Object.entries(e.arrayFields))zo(r,a?.[s],n);return}if(e.objectFields&&t&&typeof t=="object")for(let[a,s]of Object.entries(e.objectFields))zo(s,t[a],n)}}function OS(e){if(!e||typeof e!="object")return!1;let t=e;return t[Dd]?!1:!!t[Wo]||t.type==="text"||t.type==="textarea"}function Bd(e,t){let n=e[Wo];return n?.label?n.label:typeof e.label=="string"?e.label:t}function PS(e){let t=e.indexOf(" (");return(t>0?e.slice(0,t):e).trim()}function _1(e,t,n){if(!e)return[];let o=[];for(let[a,s]of Object.entries(e)){if(!s||typeof s!="object"||An(a))continue;let r=s,i=[];zo(r,t?.[a],i),!i.length&&r[Nd]!==void 0&&zo(r,r[Nd],i);let l=Bd(r,a);if(n?.(a)&&OS(r)){i.length&&o.push({key:a,label:l,texts:[],keyed:!0});continue}let u=new Set;for(let{row:f,text:m}of Id(r,t?.[a])){let b=Zt(m);b.length<Ld||(u.add(b),o.push({key:a,label:l,texts:[b],row:f}))}let d=new Set(u),p=[];for(let f of i){let m=Zt(f);m.length<Ld||d.has(m)||(d.add(m),p.push(m))}p.length&&o.push({key:a,label:l,texts:p})}return o}function kS(e){return!e.offPage&&!e.hidden&&e.panelOnly!==!0}var AS=vS;function Hd(e,t){if(!t||typeof t!="object"||An(e)||Od(t))return null;let n=t[Wo];return!n||!AS.includes(n.control)?null:n}function T1(e,t){let n=Hd(e,t);return n!==null&&n.identifier!==!0}function E1(e,t){if(!e)return[];let n=[];for(let[o,a]of Object.entries(e)){let s=Hd(o,a);if(!s)continue;let{text:r,hidden:i}=Fd(t?.[o]);if(kS({offPage:s.offPage===!0,hidden:!!i,panelOnly:Uo(a)}))continue;let l=r||s.placeholder||"",u=vs(l).replace(/\s+/gu," ").trim();n.push({key:o,label:PS(Bd(a,o)),preview:u,offPage:s.offPage===!0,identifier:s.identifier===!0,hidden:!!i})}return n}function Jt(e){return!e||typeof e!="object"||Array.isArray(e)?null:e}function Ko(e,t){return Jt(e?.[t])??{}}function Md(e,t,n){let o=Ko(e,t);return Jt(j(o,n))??{}}function $d(e,t,n,o){let{[n]:a,...s}=Ko(e,t),r=o?{...s,[n]:o}:s,{[t]:i,...l}=e;return Object.keys(r).length?{...l,[t]:r}:l}import{isLengthUnit as Sr}from"efficient-easel/screen/lib/content/length-units";var _r="_partStyles",NS="data-sf-part-styled",jo="data-sf-text-style",LS=/^(heading|body)-[1-7]$/;function Et(e){return typeof e=="string"&&LS.test(e)}var Vo={heading:"heading-1",heading2:"heading-2",heading3:"heading-3",body:"body-1",label:"body-5"};function DS(e){if(!e)return null;for(let[t,n]of Object.entries(Vo))if(n===e)return t;return null}function B1(e){if(Et(e.textStyle))return e.textStyle;let t=dt(e.role);return t?Vo[t]:void 0}var FS=[400,500,600,700],In=["left","center","right","justify"],mr=5,hr=1e3,BS=-5,HS=10,MS=0,$S=64,US=2,Ud={size:{min:mr,max:hr,step:1},sizeTablet:{min:mr,max:hr,step:1},sizePhone:{min:mr,max:hr,step:1},padding:{min:MS,max:$S,step:US}},GS=.05,zS=.01,WS=["line","letter"],KS=.5,jS=2.5,VS=-1,YS=1,XS=0,qS=400,ZS=[...new Set(Object.values(go))];function H1(e){return[`${e} { transition: translate var(--page-motion-hover-duration) var(--page-ease-media) var(--page-motion-hover-delay) }`,`${e}:hover, ${e}:active { translate: 0 calc(-1 * var(--page-hover-lift)) }`]}function M1(e){return Ko(e,_r)}function JS(e,t){return Md(e,_r,t)}function Yd(e,t,n){return $d(e,_r,t,QS(n).length?n:null)}function QS(e){return Object.entries(e).filter(([,t])=>t!==void 0)}function e_(e){return WS.includes(e)}var Rn=(e,t,n)=>Math.min(n,Math.max(t,e)),t_=["sizeUnit","sizeUnitTablet","sizeUnitPhone"];function gr(e){let t=Vd("sizeUnit",e),n=t_.find(o=>o===t);if(!n)throw new Error(`a part stores no unit key ${t}`);return n}var St={size:gr("desktop"),sizeTablet:gr("tablet"),sizePhone:gr("mobile"),paragraphSpacing:"paragraphSpacingUnit",padding:"paddingUnit"},Xd=Object.values(St);function Ie(e,t){return F(e[St[t]])}function n_(e,t,n={}){if(Xd.includes(e))return Sr(t)&&t!=="px"?t:null;if(he(St,e)&&Ie(n,e)!=="px"){let o=Tt(Number(t),2);return!Number.isFinite(o)||o<0||o===0&&e!=="padding"?null:o}if(e_(e)){let o=Math.round(Number(t));return!Number.isFinite(o)||o===0?null:Rn(o,BS,HS)}if(e==="lineHeight"){let o=Number(t);return Number.isFinite(o)?Tt(Rn(o,KS,jS),3):null}if(e==="letterSpacing"){let o=Number(t);return Number.isFinite(o)?Tt(Rn(o,VS,YS),4):null}if(e==="paragraphSpacing"){let o=Math.round(Number(t));return!Number.isFinite(o)||o<=0?null:Rn(o,XS,qS)}if(he(Ud,e)){let{min:o,max:a}=Ud[e],s=Math.round(Number(t));return Number.isFinite(s)?Rn(s,o,a):null}return e==="italic"?typeof t=="boolean"?t:null:e==="role"||e==="fontRole"?dt(t)?t:null:e==="sizeToken"?Tr(t)?t:null:e==="textStyle"?Et(t)?t:null:e==="alignPhone"||e==="alignTablet"?In.includes(t)?t:null:t}var o_=["weight","size","sizeTablet","sizePhone","line","letter","lineHeight","letterSpacing","paragraphSpacing","padding"];function Qt(e){let t=null,n=o=>{t??={...e},delete t[o]};for(let o of o_){let a=e[o];a!==void 0&&!(typeof a=="number"&&Number.isFinite(a))&&n(o)}e.align!==void 0&&!In.includes(e.align)&&n("align"),e.alignTablet!==void 0&&!In.includes(e.alignTablet)&&n("alignTablet"),e.alignPhone!==void 0&&!In.includes(e.alignPhone)&&n("alignPhone"),e.textStyle!==void 0&&!Et(e.textStyle)&&n("textStyle"),e.sizeToken!==void 0&&!Tr(e.sizeToken)&&n("sizeToken"),e.fontRole!==void 0&&!dt(e.fontRole)&&n("fontRole");for(let o of Xd)e[o]!==void 0&&!Sr(e[o])&&n(o);return t??e}function Tr(e){if(!e||typeof e!="object")return!1;let{step:t,px:n,stepPhone:o,pxPhone:a,fluid:s}=e,r=l=>typeof l=="number"&&Number.isFinite(l)&&l>0,i=l=>typeof l=="string"&&ZS.includes(l);return i(t)&&r(n)&&(o===void 0||i(o))&&(a===void 0||r(a))&&(s===void 0||a_(s,n))}function a_(e,t){if(!e||typeof e!="object"||Array.isArray(e))return!1;let{minPx:n,vw:o,...a}=e;return Object.keys(a).length===0&&typeof n=="number"&&Number.isFinite(n)&&n>0&&n<t&&typeof o=="number"&&Number.isFinite(o)&&o>0&&o<=100}function Er(e){return e?.pxPhone&&Tr(e)?{step:e.stepPhone??e.step,px:e.pxPhone}:null}function qd({step:e,px:t,fluid:n}){let o=n?`clamp(${n.minPx}px, ${n.vw}vw, ${t}px)`:`${t}px`,a=`var(--size-${e}, ${o})`;return e.startsWith("heading")?`min(${a}, var(--sf-heading-max,9999px))`:a}var s_=[["font","role"],["font","fontRole"],["role","textStyle"],["line","lineHeight"],["letter","letterSpacing"]];function r_(e){let t=[];for(let[n,o]of s_)n===e?t.push(o):o===e&&t.push(n);return t}function $1(e,t,n,o){let a={...JS(e,t)},s=o==null?null:n_(n,o,a);if(s===null)delete a[n];else{a[n]=s;for(let r of r_(n))delete a[r]}return Yd(e,t,a)}function U1(e,t){return Yd(e,t,{})}function i_(e){return IS(e)??"none"}function l_(e){return RS(e)??""}var Gd={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 c_(e,t){return dt(e.role)||(t?.blockDrawsStyle?null:DS(e.textStyle))}var u_="--sf-part-size-cap";function xr(e,t){return e&&t?.sizeCap?`min(${e}, var(${u_}, ${e}))`:e}function G1(e,t){return e?.[t]===!0}function z1(e,t){return e==="Text"&&t==="text"}var d_={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 p_(e){let t=go[e],n=j(d_,t);return n?`var(--size-${t}, ${n})`:`var(--size-${t})`}function vr(e){let t={};return typeof e.lineHeight=="number"?t.lineHeight=e.lineHeight:e.line&&(t.lineHeight=Tt(f_+e.line*GS,3)),typeof e.letterSpacing=="number"?t.letterSpacingEm=e.letterSpacing:e.letter&&(t.letterSpacingEm=Tt(e.letter*zS,4)),t}var f_=1,_t="--sf-part-para";function m_(e,t){e=Qt(e);let n={};if(typeof e.sizePhone=="number"&&e.sizePhone>0)n.fontSize=M(e.sizePhone,Ie(e,"sizePhone"));else{let a=Er(e.sizeToken);if(a)n.fontSize=qd(a);else{let s=Xo(e);s!==void 0&&(n.fontSize=M(s,Ie(e,"sizeTablet")))}}n.fontSize&&(n.fontSize=xr(n.fontSize,t));let o=e.alignPhone??Yo(e);return o&&(n.textAlign=o),n}function Yo(e){return e.alignTablet&&e.alignTablet!==e.align?e.alignTablet:void 0}function Xo(e){let t=e.sizeTablet!==void 0&&Ie(e,"sizeTablet")!==Ie(e,"size")?e.sizeTablet:He("textSize",e.size,e.sizeTablet,void 0).tablet;return t&&t>0?t:void 0}function h_(e,t){let n=Qt(e),o={},a=Xo(n);a!==void 0&&(o.fontSize=xr(M(a,Ie(n,"sizeTablet")),t));let s=Yo(n);return s&&(o.textAlign=s),o}function W1(e,t){if(t==="desktop")return;let n=Qt(e);return(t==="mobile"?Yo(n):void 0)??n.align}function g_(e,t){if(t==="desktop")return e;let n=Qt(e),o=Xo(n),a=Yo(n);if(t==="tablet"){let i=e;return o!==void 0&&(i={...i,size:o,sizeUnit:n[St.sizeTablet]}),a&&(i={...i,align:a}),i}let s=e;if(typeof n.sizePhone=="number"&&n.sizePhone>0)s={...s,size:n.sizePhone,sizeUnit:n[St.sizePhone]};else{let i=Er(n.sizeToken);i?s={...s,size:void 0,sizeToken:i}:o!==void 0&&(s={...s,size:o,sizeUnit:n[St.sizeTablet]})}let r=n.alignPhone??a;return r&&(s={...s,align:r}),s}function wr(e,t,n){return Cr(g_(e,t),qo,n)}function b_(e){return Vd("size",e)}function K1(e,t){if(t==="desktop")return null;let n=Qt(e);if(t==="mobile"){if(Er(n.sizeToken))return null;let o=Xo(n);if(o!==void 0)return{px:o,view:"tablet"}}return typeof n.size=="number"&&n.size>0?{px:n.size,view:"desktop"}:null}function Zd(e,t){let n=b_(t);if(!he(e,n))return e;let o={...e};return delete o[n],o}function j1(e,t,n){let o=wr(Zd(e,t),t,n);return{fontFamily:o.fontFamily,fontSize:o.fontSize}}function Cr(e,t,n){e=Qt(e);let o=c_(e,n),a=vr(e),s=xr(e.size?M(e.size,Ie(e,"size")):e.sizeToken?qd(e.sizeToken):o?p_(o):"",n);return{fontFamily:e.font?T_(e.font,n?.fonts):e.fontRole?`var(${Gd[e.fontRole]})`:o?`var(${Gd[o]})`:"",fontWeight:e.weight?String(e.weight):"",fontSize:s,minWidth:s?"0":"",overflowWrap:s?"break-word":"",lineHeight:a.lineHeight!==void 0?String(a.lineHeight):"",letterSpacing:a.letterSpacingEm!==void 0?`${a.letterSpacingEm}em`:"",[_t]:e.paragraphSpacing?M(e.paragraphSpacing,Ie(e,"paragraphSpacing")):"",textTransform:l_(e.case),textAlign:e.align??"",paddingTop:zd(e.padding,Ie(e,"padding")),paddingBottom:zd(e.padding,Ie(e,"padding")),color:y_(e.color),fontStyle:e.italic===!0?"italic":e.italic===!1?"normal":""}}var y_=e=>Po(e),zd=(e,t)=>e===void 0?"":M(e,t),Tt=(e,t)=>Number(e.toFixed(t));function V1(e,t){let n=Number.parseFloat(e.fontSize)||16,o=Number.parseFloat(e.lineHeight),a=Number.parseFloat(e.letterSpacing),s=Number.parseFloat(e.paddingTop);return{fontKey:t,sizePx:n,weight:S_(Number.parseInt(e.fontWeight,10)),lineRatio:Number.isFinite(o)?Tt(o/n,3):1.2,letterEm:Number.isFinite(a)?Tt(a/n,4):0,align:__(e.textAlign),case:i_(e.textTransform),paddingPx:Number.isFinite(s)?Math.round(s):0}}function S_(e){return Number.isFinite(e)?FS.reduce((t,n)=>Math.abs(n-e)<Math.abs(t-e)?n:t):400}function __(e){for(let t of In)if(t===e)return t;return e==="end"?"right":"left"}function Y1(e,t,n=ge){let o=Wd(e);if(!o)return"";for(let a of n.options)if(Wd(t(a.cssVar))===o)return a.key;return""}var Wd=e=>(e.split(",")[0]??"").replace(/["']/g,"").replace(/\s+/g," ").trim().toLowerCase();function T_(e,t=ge){let n=vc(e,t);return n?`var(${n.cssVar})`:""}function X1(e,t,n,o){return!t||fr(t)?.nodeId!==e?null:n.find(a=>o(a.getAttribute("class")))??n[0]??null}function E_(e,t){return Jt(j(e,t))??{}}function q1(e,t,n=()=>qo,o=u=>u,a=w_,s="desktop",r=()=>!1,i=()=>!1,l=ge){let u=0;for(let{element:d,partId:p}of e){let f=fr(p)?.propKey;if(!f)continue;let m=E_(t,o(f)),b=wr(m,s,{blockDrawsStyle:r(f),sizeCap:i(f),fonts:l});Et(m.textStyle)?d.setAttribute?.(jo,m.textStyle):d.removeAttribute?.(jo);let y=br.some(S=>d.style[S]),T=!1;for(let[S,E]of Object.entries(b))P_(d,S,E),E&&(T=!0);if(y||br.some(S=>b[S]))for(let S of x_(d,a))for(let E of br)S.style[E]=b[E]??"";T&&(u+=1)}return u}function x_(e,t){let n=Zt(e.textContent??""),o=[],a=e;for(let s=0;s<v_&&t(a);s+=1){let r=a.parentElement;if(!r||Zt(r.textContent??"")!==n)break;o.push(r),a=r}return o}var v_=8;function w_(e){let t=e;return typeof window>"u"||!t?.ownerDocument?!1:window.getComputedStyle(t).display==="inline"}var qo={fontKey:"",sizePx:16,weight:400,lineRatio:1,letterEm:0,align:"left",case:"none",paddingPx:0};function C_(e){if(!e||typeof e!="object")return null;let t={};Et(e.textStyle)&&(t.textStyle=e.textStyle),typeof e.size=="number"&&e.size>0&&(t.size=e.size),typeof e.sizeTablet=="number"&&e.sizeTablet>0&&(t.sizeTablet=e.sizeTablet),typeof e.sizePhone=="number"&&e.sizePhone>0&&(t.sizePhone=e.sizePhone);for(let n of["size","sizeTablet","sizePhone"]){let o=St[n];t[n]!==void 0&&Sr(e[o])&&(t[o]=e[o])}return Object.keys(t).length?t:null}function O_(e,t,n){let o=C_(e);if(!o)return{};let a=wr(o,t,{...n?.sizeCap?{sizeCap:!0}:{},...n?.fonts?{fonts:n.fonts}:{}});return{...a.fontFamily?{fontFamily:a.fontFamily}:{},...a.fontSize?{fontSize:a.fontSize}:{}}}function Z1(e){return Et(e?.textStyle)||!!e?.role||typeof e?.size=="number"&&e.size>0}function J1(e,t,n,o){if(!e||typeof e!="object")return{};let a=Mc(e.role,t,go)??{},s=t.sized?O_(Zd(e,n),n,o?{fonts:o}:void 0):{};return{...a,...s}}function Q1(e,t,n){n.fontFamily&&e.fontFamily===n.fontFamily&&(e.fontFamily=t.fontFamily),n.fontSize&&e.fontSize===n.fontSize&&(e.fontSize=t.fontSize)}function P_(e,t,n){if(!t.startsWith("--")){e.style[t]=n;return}let o=e.style;typeof o.setProperty=="function"?n?o.setProperty(t,n):o.removeProperty?.(t):o[t]=n;let a=e;t===_t&&(n?a.setAttribute?.(Kd,""):a.removeAttribute?.(Kd))}var Kd="data-sf-part-para",k_=Object.keys(Cr({},qo)),yr=new Set(["color","overflowWrap",_t,"fontStyle"]),br=k_.filter(e=>!yr.has(e));function eL(e,t,n,o=u=>u,a=()=>!1,s=()=>null,r=[],i=()=>!1,l=ge){let u=new Map;for(let m of e){let b=$o(m.key,m.row);for(let y of m.texts){let T=u.get(y);T?(T.keys.add(m.key),T.partKeys.add(b)):u.set(y,{keys:new Set([m.key]),partKeys:new Set([b])})}}let d=new Map;for(let m of new Set([...Object.keys(t),...r])){if(!A_(m))continue;let b=jd(n,m,Jt(t[m])??{},{blockDrawsStyle:!1,sizeCap:i(m),fonts:l},s(m));b&&d.set(m,b)}let p=m=>{let b=o(m),y=s(b);if(!he(t,b)&&!y)return null;let T=Jt(t[b])??{};return jd(n,m,T,{blockDrawsStyle:a(m),sizeCap:i(m),fonts:l},y)},f=new Map;for(let[m,{keys:b,partKeys:y}]of u){let T=y.size===1?[...y][0]:b.size===1?[...b][0]:null;if(!T)continue;let S=p(T);S&&f.set(m,S)}for(let m of e){if(!m.keyed)continue;let b=p($o(m.key,m.row));b&&d.set(m.key,b)}return f.size||d.size?{rules:f,kindRules:d,drawn:new Set(u.keys())}:null}function jd(e,t,n,o,a){let s=Cr(n,qo,o),r=h_(n,o),i=m_(n,o),l=Et(n.textStyle)?n.textStyle:void 0;return!Object.values(s).some(Boolean)&&!Object.keys(r).length&&!Object.keys(i).length&&!l&&!a?null:{stamp:R_(e,t),declarations:s,...Object.keys(r).length?{tablet:r}:{},...Object.keys(i).length?{phone:i}:{},...l?{textStyle:l}:{},...a?{motion:a}:{}}}function A_(e){return e.startsWith("@")}function tL(e,t){return e?.kindRules.get(t)??null}function R_(e,t){let n=o=>o.replace(/[^A-Za-z0-9_-]+/g,"-");return`${n(e)}~${n(t)}`}function I_(e){return e?{tablet:xd,phone:vd}:{tablet:Ho,phone:Mo}}function nL(e,{inBox:t=!1}={}){let{tablet:n,phone:o}=I_(t),a=[],s=new Set,r=i=>{let{stamp:l,declarations:u}=i;if(s.has(l))return;s.add(l);let d=Object.entries(u).filter(([,S])=>S!==""),p=S=>S.map(([E,x])=>`${N_(E)}: ${x}`).join("; "),f=`[${NS}="${l}"]`,m=d.filter(([S])=>!yr.has(S)),b=d.filter(([S])=>yr.has(S));m.length&&a.push(`${f}, *:has(> ${f}) { ${p(m)} }`),b.length&&a.push(`${f} { ${p(b)} }`),u[_t]&&(a.push(`*:has(> ${f}) { ${_t}: ${u[_t]} }`),a.push(...Zo(f,`*:has(> ${f})`)));let y=Object.entries(i.tablet??{}).filter(([,S])=>S!=="");y.length&&a.push(`@media ${n} { ${f}, *:has(> ${f}) { ${p(y)} } }`);let T=Object.entries(i.phone??{}).filter(([,S])=>S!=="");T.length&&a.push(`@media ${o} { ${f}, *:has(> ${f}) { ${p(T)} } }`)};for(let i of e.rules.values())r(i);for(let i of e.kindRules.values())r(i);return a.join(`
|
|
4
|
-
`)}function Zo(e,t){let n=`var(${_t})`,o=":is([data-sf-bullet], [data-sf-number])";return[`${e} br:not(br + br) { display: block; content: ""; margin-top: ${n} }`,`${e} ${o}:not(:first-child) { margin-top: ${n} }`,`${e} ${o}:not(:last-child) { margin-bottom: ${n} }`,`:is(${t}) + :is(${t}) { margin-top: ${n} }`]}var N_=e=>e.replace(/[A-Z]/g,t=>`-${t.toLowerCase()}`);function oL(e,t){if(!e)return null;let n=Zt(t),o=e.rules.get(n);if(o)return o;if(n.length<L_||e.drawn.has(n))return null;let a=null;for(let[s,r]of e.rules)if(s.includes(n)){if(a&&a.stamp!==r.stamp)return null;a=r}return a}var L_=8;var Or=e=>e==="sentence"?"none":void 0,tp=["font","color","size","sizeTablet","sizePhone","weight","italic","lineHeight","lineHeightTablet","lineHeightPhone","letterSpacing","letterSpacingTablet","letterSpacingPhone","paragraphSpacing","paragraphSpacingTablet","paragraphSpacingPhone","letterCase","largestSize","largestSizeTablet","largestSizePhone"],en=["desktop","tablet","phone"],xt=(e,t)=>$(e,t);function Ar(e,t,n,o=Ut()){return ep("textSize",t,e.sizeTablet,e.sizePhone,o)[n]}var F_=[["lineSpacing","lineHeight","line"],["letterSpacing","letterSpacing","letter"]];function Pr(e){for(let[t,n,o]of F_)for(let a of en)if(e===xt(t,a))return{key:$(n,a),view:a,spacing:o};return{key:e,view:"desktop",spacing:null}}function Ne(e){let t={};for(let n of tp)e[n]!==void 0&&(t[n]=e[n]);return t}function Rr(e,t){let{auto:n,...o}=e,a=new Set(t??[]),s=tp.filter(r=>a.has(r)&&e.values[r]===void 0);return s.length?{...o,auto:s}:o}function np(e){let t=e.fonts,n=e.sizes,o=e.typography,a=ru(e.compression),s={"heading-1":{font:W(t.heading),size:O(n.headingLarge),weight:O(o.weight),lineHeight:a.lineHeight,letterSpacing:a.letterSpacing,letterCase:Or(o.case),largestSize:O(o.maxPx)},"heading-2":{font:W(t.heading2),size:O(n.headingMedium),weight:O(o.weight2),lineHeight:a.lineHeight,letterSpacing:a.letterSpacing,letterCase:Or(o.case2)},"heading-3":{font:W(t.heading3),size:O(n.headingSmall),weight:O(o.weight3),lineHeight:a.lineHeight,letterSpacing:a.letterSpacing,letterCase:Or(o.case3)},"body-1":{font:W(t.body),size:O(n.body)},"body-5":{font:W(t.label),size:O(n.label)}};return Qd().map(({id:r,kind:i,name:l})=>({id:r,kind:i,name:l,values:Ne(s[r]??{})}))}function Ir(e){return Array.isArray(e)&&e.every(t=>t&&typeof t=="object"&&typeof t.id=="string"&&(t.kind==="heading"||t.kind==="body")&&typeof t.name=="string")?e.map(t=>Rr({...t,values:Ne(t.values??{})},Array.isArray(t.auto)?t.auto:void 0)):null}function gL(e){return Ir(e)??[]}function op(e){return Ir(e)??Qd().map(({id:t,kind:n,name:o})=>({id:t,kind:n,name:o,values:{}}))}function nn(e,t){let n=np(t),o=Ir(e);return o?o.map(a=>{let s={...kr(n,a.id)};for(let r of a.auto??[])delete s[r];return{...a,values:Ne({...s,...a.values})}}):n}var kr=(e,t)=>e.find(n=>n.id===t)?.values??{},Jd=["heading-1","heading-2","heading-3"];function ap({saved:e,old:t,cur:n,next:o,sizeOf:a,panelView:s="desktop"}){let r=np(t),i=op(e),l=nn(i,t),u=[],d=o.map(f=>{let m=n.find(w=>w.id===f.id),b=i.find(w=>w.id===f.id);if(!m||!b){let w=B_([f],a,s)[0],I=w.values.color;return I===void 0?w:{...w,values:{...w.values,color:$e(I)}}}let y={...b.values},T=new Set(b.auto??[]),S=f.values,E=m.values,x=[...new Set([...Object.keys(S),...Object.keys(E)])].filter(w=>JSON.stringify(S[w])!==JSON.stringify(E[w])),v=w=>Pr(w).spacing==="letter";x.sort((w,I)=>Number(v(w))-Number(v(I)));for(let w of x){let{key:I,view:C,spacing:D}=Pr(w),z=I,Ee=S[w];if(Ee===void 0){delete y[z],kr(r,f.id)[z]!==void 0&&(u.push([f.id,z]),T.add(z));continue}if(T.delete(z),D==="line")y[z]=tn(Ee/100,3);else if(D==="letter"){let uo={...l.find(X=>X.id===f.id)?.values??{}};for(let X of x)S[X]===void 0&&delete uo[Pr(X).key];let po=Ne({...uo,...y}),fo=Ar(po,a({...f,values:po}),C);y[z]=fo?tn(Ee/fo,4):0}else y[z]=Ee}return Rr({id:f.id,kind:f.kind,name:f.name,values:Ne(y)},T)}),p=t.compression;if(u.some(([f,m])=>(m==="lineHeight"||m==="letterSpacing")&&Jd.includes(f))&&ht(p)!=="normal"){for(let f of Jd){let m=d.find(y=>y.id===f);if(!m)continue;let b={...m.values};for(let y of["lineHeight","letterSpacing"])u.some(([T,S])=>T===f&&S===y)||b[y]===void 0&&!(m.auto??[]).includes(y)&&(b[y]=kr(r,f)[y]);m.values=Ne(b)}p="normal"}return{saved:d,old:{...t,compression:p}}}function sp(e,t){let n={text_styles:e.saved};return e.old.compression!==t.compression&&(n.heading_compression=ht(e.old.compression)),n}var tn=(e,t)=>Number(e.toFixed(t)),rp=(e,t)=>en.indexOf(e)<en.indexOf(t)?t:e;function ip(e,t,n="desktop"){return e.map(o=>{let a={...o.values},s=t(o);for(let r of en){let i=$("lineHeight",r),l=o.values[i],u=o.values[$("letterSpacing",r)];delete a[i],l!==void 0&&(a[xt("lineSpacing",r)]=tn(l*100,1));let d=rp(r,n);u!==void 0&&(a[xt("letterSpacing",r)]=tn(u*Ar(o.values,s,d),d===r?2:4))}return{id:o.id,kind:o.kind,name:o.name,values:a}})}function B_(e,t,n="desktop"){return e.map(o=>{let a=o.values,s={...a};for(let u of en)delete s[xt("lineSpacing",u)],delete s[xt("letterSpacing",u)];let r={id:o.id,kind:o.kind,name:o.name,values:Ne(s)},i={...r.values},l=t({...r,values:{...r.values}});for(let u of en){let d=a[xt("lineSpacing",u)],p=a[xt("letterSpacing",u)];if(typeof d=="number"&&(i[$("lineHeight",u)]=tn(d/100,3)),typeof p=="number"){let f=Ar(r.values,l,rp(u,n));i[$("letterSpacing",u)]=f?tn(p/f,4):0}}return{...r,values:Ne(i)}})}function bL(e,t=ge){let n={fonts:_n({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},t),sizes:$s({headingLarge:e.heading_size_large_px,headingMedium:e.heading_size_medium_px,headingSmall:e.heading_size_small_px,accent:e.accent_size_px,body:e.body_size_px,label:e.label_size_px}),compression:ht(e.heading_compression),typography:lu(e)},o=e.text_styles??null,a=Array.isArray(o)?Nr(nn(o,n),n):n;return{fonts:_n(a.fonts,t),sizes:$s(a.sizes),compression:ht(a.compression),typography:a.typography,textStyles:o}}function Nr(e,t){let n=f=>e.find(m=>m.id===f)?.values??{},o=n("heading-1"),a=n("heading-2"),s=n("heading-3"),r=n("body-1"),i=n("body-5"),l=t.fonts,u=t.sizes,d=t.typography,p=f=>f==="none"?"sentence":"authored";return{fonts:{...l,heading:o.font??l.heading,heading2:a.font??o.font??l.heading2,heading3:s.font??o.font??l.heading3,body:r.font??l.body,label:i.font??l.label},sizes:{...u,headingLarge:o.size??null,headingMedium:a.size??null,headingSmall:s.size??null,body:r.size??null,label:i.size??null},compression:t.compression,typography:{...d,case:p(o.letterCase),weight:o.weight??null,maxPx:o.largestSize??null,weight2:a.weight??null,weight3:s.weight??null,case2:p(a.letterCase),case3:p(s.letterCase)}}}function yL(e,t=ge){let n=[];for(let o of e){let a=o.values,s=`.${Cu(o)}`,r=`[${jo}="${o.id}"]`,i=`${s}, ${r}`,l=[],u=a.font!==void 0?t.byKey.get(a.font)?.cssVar:void 0;if(u&&l.push(`font-family: var(${u})`),a.size!==void 0){let m=a.largestSize!==void 0?Math.min(a.size,a.largestSize):a.size;l.push(`font-size: ${m}px`)}let d=Po(a.color);d&&l.push(`color: ${d}`),a.italic===!0&&l.push("font-style: italic"),a.weight!==void 0&&l.push(`font-weight: ${a.weight}`);let p=[];a.lineHeight!==void 0&&p.push(`line-height: ${a.lineHeight}`),a.letterSpacing!==void 0&&p.push(`letter-spacing: ${a.letterSpacing}em`),o.kind==="body"&&l.push(...p);let f=D_(a.letterCase);f&&o.kind==="body"&&l.push(`text-transform: ${f}`),a.paragraphSpacing&&l.push(`--sf-part-para: ${a.paragraphSpacing}px`),l.length&&n.push(`${i} { ${l.join("; ")} }`),o.kind==="heading"&&p.length&&n.push(`${i}, ${s}:is(h1, h2, h3, h4), ${r}:is(h1, h2, h3, h4) { ${p.join("; ")} }`),o.kind==="heading"&&f&&n.push(`${r}, ${s}:is(h1, h2, h3, h4) { text-transform: ${f} }`),a.paragraphSpacing&&(n.push(`*:has(> ${r}) { --sf-part-para: ${a.paragraphSpacing}px }`),n.push(...Zo(`:is(${i})`,`*:has(> ${r})`))),n.push(...H_(o,i,s,r))}return n.join(`
|
|
5
|
-
`)}function H_(e,t,n,o){let a=e.values,s=He("textSize",a.size,a.sizeTablet,a.sizePhone),r=He("textSize",a.largestSize,a.largestSizeTablet,a.largestSizePhone),i=He("same",a.lineHeight,a.lineHeightTablet,a.lineHeightPhone),l=He("same",a.letterSpacing,a.letterSpacingTablet,a.letterSpacingPhone),u=He("spacing",a.paragraphSpacing,a.paragraphSpacingTablet,a.paragraphSpacingPhone),d=ep("textSize",a.size,a.sizeTablet,a.sizePhone,Ut()),p=M_[e.id],f=[];for(let[m,b]of[["tablet",Ho],["phone",Mo]]){let y=[],T=[],S=d[m],E=r[m],x=s[m]===void 0&&E===void 0||S===void 0?void 0:E===void 0?S:Math.min(S,E);x!==void 0&&T.push(`font-size: ${x}px`);let v=[];i[m]!==void 0&&v.push(`line-height: ${i[m]}`),l[m]!==void 0&&v.push(`letter-spacing: ${l[m]}em`),e.kind==="body"&&T.push(...v),u[m]!==void 0&&T.push(`--sf-part-para: ${u[m]}px`),T.length&&y.push(`${t} { ${T.join("; ")} }`),e.kind==="heading"&&v.length&&y.push(`${t}, ${n}:is(h1, h2, h3, h4), ${o}:is(h1, h2, h3, h4) { ${v.join("; ")} }`),u[m]!==void 0&&y.push(`*:has(> ${o}) { --sf-part-para: ${u[m]}px }`),u[m]!==void 0&&!a.paragraphSpacing&&y.push(...Zo(`:is(${t})`,`*:has(> ${o})`)),x!==void 0&&p&&y.push(`.sf-themed-content { --size-${p}: ${x}px !important }`),y.length&&f.push(`@media ${b} { ${y.join(" ")} }`)}return f}var M_=Object.fromEntries(Object.entries(Ou).map(([e,{step:t}])=>[e,t]));function SL(e){return e!==!0&&e!==!1?"":`em.text-accent { font-style: ${e?"italic":"normal"} }`}function _L(e){return e?Vo[e]:void 0}function $_(e){let t=vr(e);return Ne({font:e.font,color:e.color===void 0?void 0:$e(e.color),size:e.size,weight:e.weight,italic:e.italic,lineHeight:t.lineHeight,letterSpacing:t.letterSpacingEm,paragraphSpacing:e.paragraphSpacing,letterCase:e.case})}function TL(e){return Object.keys($_(e)).length>0}function EL({saved:e,old:t,styleId:n,values:o}){let a=op(e);return{saved:U_(a,n,o),old:t}}function U_(e,t,n){return e.map(o=>o.id===t?Rr({...o,values:Ne({...o.values,...n})},o.auto):o)}import{jsx as G_}from"react/jsx-runtime";import{useMemo as z_,useState as W_}from"react";import{TextStylesList as K_}from"efficient-easel/text-styles";import{usePreviewDevice as j_}from"efficient-easel/draw/client";var lp=["font","color","size","weight","emphasis","lineSpacing","letterSpacing","paragraphSpacing","letterCase","largestSize"],V_=["size","lineSpacing","letterSpacing","letterCase"],Y_=500;function Jo(e=ge){return xc(e).map(t=>({value:t.key,label:t.label,family:`var(${t.cssVar})`,italic:t.italicLoaded}))}var IL=Jo();function cp({saved:e,old:t,colours:n,colourNameOf:o,sizeOf:a,onChange:s,openId:r,onOpenChange:i,readOnly:l=!1,withoutSize:u=!1,onPick:d}){let p=j_(),f=On(),m=z_(()=>Jo(f),[f]),[b,y]=W_(null),T=nn(e,t),S=vo(p),E=ip(T,a,S);return G_(K_,{styles:E,onChange:x=>s(ap({saved:e,old:t,cur:E,next:x,sizeOf:a,panelView:S})),fonts:m,colours:n,colourNameOf:o,settings:u?lp.filter(x=>x!=="size"):lp,auto:V_,openId:r===void 0?b:r,onOpenChange:i??y,readOnly:l,device:S,onPick:d?x=>{let v=T.find(w=>w.id===x.id);v&&d(v)}:void 0,fallback:x=>{let v=T.find(I=>I.id===(x.kind==="heading"?"heading-1":"body-1")),w={};return v?.values.font&&x.id!==v.id&&(w.font=v.values.font),x.kind==="heading"&&(w.weight=Y_),w}})}var up="background";function dp(e){let t=ce(Wt(e));return zu({main:t.accent,text:t.text,background:t.background,muted:t.muted}).map(n=>({key:n.name,name:n.label??n.name,value:n.value}))}function pp(e){return dp(e).filter(t=>t.key!==up)}function fp(e){let t=dp(e).filter(n=>n.key===up);return n=>{let o=$e(n);return t.find(a=>a.key===o)?.value??o}}import{useEasel as X_}from"efficient-easel/easel";function mp({themeFromDocument:e,persist:t}){let{appState:n,dispatch:o}=X_(C=>C),{fonts:a,setFonts:s,sizes:r,setSizes:i,headingCompression:l,setHeadingCompression:u,headingTypography:d,setHeadingTypography:p,textStyles:f,setTextStyles:m}=B(),b=n.data,y=b.root?.props??{},T=e?_n(y.fonts):a,S=e?eu:r,E=e?ht(y.headingCompression):l,x=e?iu(y.headingTypography):d,v={fonts:T,sizes:S,compression:E,typography:x},w=e?y.textStyles:f,I=C=>o({type:"replaceRoot",root:{...b.root,props:{...y,...C}},recordHistory:!0});return{fonts:T,sizes:S,compression:E,typography:x,old:v,saved:w,write:(C,D)=>{let z=Nr(nn(C.saved,C.old),C.old);e?I({textStyles:C.saved,fonts:z.fonts,headingCompression:z.compression,headingTypography:z.typography}):(m(C.saved),s(z.fonts),i(z.sizes),u(z.compression),p(z.typography)),t(sp(C,v),D)},writeRoot:I}}import{jsx as L,Fragment as Sn,jsxs as $t}from"react/jsx-runtime";import{useEasel as Rb,useRootFields as nI}from"efficient-easel/easel";import{Inspector as oI}from"efficient-easel/fields";import{SettingsGroup as aI}from"efficient-easel/panel";import{useEffect as sI,useRef as rI,useState as pc}from"react";import{jsx as vt,Fragment as Q_,jsxs as eT}from"react/jsx-runtime";import{useState as yp}from"react";import{SettingsDefaultReset as tT,SettingsField as nT}from"efficient-easel/panel";import{useEaselStrings as oT}from"efficient-easel/strings";import{AddIcon as aT}from"efficient-easel/icons";import{Button as sT}from"efficient-shell/ui";import{iconOf as rT,noGlyph as iT}from"efficient-easel/screen/lib/document/box-fields";import{jsx as Qo,Fragment as q_,jsxs as hp}from"react/jsx-runtime";import{Button as gp,Dialog as Z_}from"efficient-shell/ui";function J_(e){return xn("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 bp({count:e,onCancel:t,onConfirm:n}){return hp(Z_,{open:!0,onClose:t,role:"alertdialog",size:"sm",title:c("Clear this site\u2019s colors?"),footer:hp(q_,{children:[Qo(gp,{variant:"secondary",onClick:t,children:c("Cancel")}),Qo(gp,{variant:"danger",onClick:n,children:c("Clear colors")})]}),children:[Qo("p",{children:J_(e)}),Qo("p",{className:"mt-2 font-medium",children:c("This cannot be undone.")})]})}var lT=iT("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"),cT="Reset color",uT={selected:0,themes:[]};function dT(e){e(uT)}function Sp({value:e,onChange:t}){let n=e?.themes??[],o=n.length===0,a=ke(e),[s,r]=yp(!1),i=oT(),[l,u]=yp(null),d=(S,E)=>{t({...a,themes:a.themes.map((x,v)=>v===S?E:x)})},p=Wt(a).accent,f=new Set(a.themes.map(S=>S.brandInk).filter(Boolean)),m=Yc.filter(S=>!f.has(S)).map(S=>Xc(p,S)),b=[...a.themes,...m],y=S=>{if(S<a.themes.length)return t({...a,selected:S});let E=[...a.themes,b[S]];t({...a,themes:E,selected:E.length-1})},T=()=>{let S=[...a.themes,{...ce(a.themes[a.selected])}];t({...a,themes:S,selected:S.length-1}),u(S.length-1)};return eT(Q_,{children:[o?null:vt(nT,{label:c(cT),icon:rT(lT),labelId:"sf-theme-reset",action:vt(tT,{label:c("all theme colors"),words:i.panel,changed:!0,onReset:()=>r(!0)})}),s&&vt(bp,{count:n.length,onCancel:()=>r(!1),onConfirm:()=>{r(!1),dT(t)}}),vt("div",{className:"sf-theme-list",role:"radiogroup","aria-label":c("Theme"),children:b.map((S,E)=>vt(No,{index:E,colors:S,selected:E===a.selected,open:l===E&&E<a.themes.length,editable:E<a.themes.length,onPick:()=>y(E),onEdit:()=>u(x=>x===E?null:E),onChangeColors:x=>d(E,x)},E))}),vt(sT,{variant:"secondary",leftIcon:vt(aT,{}),onClick:T,className:"sf-theme-add",children:c("Add new theme")})]})}import{jsx as ls}from"react/jsx-runtime";import{SettingsDefaultReset as lA,SettingsField as cA}from"efficient-easel/panel";import{SquareIcon as uA}from"efficient-easel/icons";import{jsx as g,jsxs as Ke,Fragment as Ve}from"react/jsx-runtime";import{parseOption as Tp}from"efficient-shell/format";var Lr=["image","video"],Ep={image:"imageFocal",image2:"imageFocal2"},pT={HeroSingle:"image",HeroSlide:"video"};function rD(e,t){return Tp(Lr,pT[e],t)}var xp=["one","side","stacked"],fT="one",iD={one:"One",side:"Side by side",stacked:"Stacked"};function vp(e){return Tp(xp,fT,e)}function _p(e){return e==="one"?1:2}function mT(e,t){if(xp.includes(e))return e;let n=vp(t);return n==="side"?"stacked":n}function lD(e){let t=vp(e.mediaLayout);return Math.max(_p(t),_p(mT(e.mediaLayoutPhone,t)))}import{cloneElement as kl,createContext as kO,useContext as Zh,useEffect as AO,useId as Jh,useRef as no,useState as oo}from"react";import{useEasel as as,useSelectedHost as Lt}from"efficient-easel/easel";import{PIN_LENGTH as Za,toDateKey as pW,fromDateKey as fW,parseOption as RO}from"efficient-shell/format";function hT(e){return!!e&&typeof e=="object"&&!Array.isArray(e)&&typeof e.src=="string"}function re(e){return typeof e=="string"?e:hT(e)?e.src:""}function uD(e,t,n){return Dr(e,t.split("."),n)}function Dr(e,t,n){if(t.length===0)return n(e);let[o,...a]=t,s=o.endsWith("[]"),r=s?o.slice(0,-2):o;if(!e||typeof e!="object"||Array.isArray(e))return e;let i=e;if(!(r in i))return e;let l=i[r];if(s){if(!Array.isArray(l))return e;let d=!1,p=l.map(f=>{let m=Dr(f,a,n);return m!==f&&(d=!0),m});return d?{...i,[r]:p}:e}let u=Dr(l,a,n);return u===l?e:{...i,[r]:u}}import{parseOption as Cp}from"efficient-shell/format";var gT=["upload","youtube"],bT="upload",mD={upload:"Upload",youtube:"YouTube"},yT=["background","click"],ST="background",hD={background:"Background",click:"Click to play"};function gD(e){return Cp(gT,bT,e)}function bD(e){return Cp(yT,ST,e)}var wp=/^[A-Za-z0-9_-]{11}$/,_T=/^(?:www\.|m\.|music\.)?(?:youtube\.com|youtube-nocookie\.com|youtu\.be)$/;function yD(e){let t=typeof e=="string"?e.trim():"";if(!t)return null;if(wp.test(t))return t;let n;try{n=new URL(/^[a-z]+:\/\//i.test(t)?t:`https://${t}`)}catch{return null}if(n.protocol!=="https:"&&n.protocol!=="http:"||!_T.test(n.hostname))return null;let o=n.pathname.split("/").filter(Boolean),a=n.hostname.endsWith("youtu.be")?o[0]:o[0]==="watch"?n.searchParams.get("v"):o[0]==="embed"||o[0]==="shorts"||o[0]==="live"||o[0]==="v"?o[1]:null;return a&&wp.test(a)?a:null}function SD(e,t){let n=t==="click"?"autoplay=1&playsinline=1&rel=0":`autoplay=1&mute=1&loop=1&playlist=${e}&controls=0&playsinline=1&rel=0&disablekb=1`;return`https://www.youtube-nocookie.com/embed/${e}?${n}`}function _D(e){return`https://i.ytimg.com/vi/${e}/maxresdefault.jpg`}function TD(e){return`https://i.ytimg.com/vi/${e}/hqdefault.jpg`}var ED="Play video";var Fr={frame:"Video frame",image:"Image"},xD={any:[{field:"loadingShows",is:"image"},{all:[{not:{field:"loadingShows",set:!0}},{field:"poster",set:!0}]}]};function Nn(e){let t=e.loadingShows;return t==="image"?"image":t!=null&&t!==""?"frame":re(e.poster)?"image":"frame"}function vD(e,t="desktop"){let[n,o]=t==="phone"?[e.posterPhone,e.videoFramePhone]:[e.poster,e.videoFrame],[a,s]=Nn(e)==="image"?[n,o]:[o,n];return re(a)||re(s)||void 0}function Op(e){if(re(e.mediaVideo)){if(Nn(e)==="frame")return re(e.videoFrame)?void 0:re(e.poster)?"frame-missing-image":"frame-missing-surface";if(!re(e.poster))return re(e.videoFrame)?"image-missing-frame":"image-missing-surface"}}var ea="videoFrames",Br="videoFramesNotOwn";function Pp(e,t,n){let o=re(e.mediaVideo);if(!o||!t||Nn(e)!=="frame"||re(e.videoFrame))return;let a=t[o],s=!!re(e.poster);if(a?.state==="ready")return null;if(s)return!a||a.state==="pending"?void 0:"image-no-frame";if(!a)return n?"save-makes-frame":void 0;switch(a.state){case"pending":return a.noted!=="save"&&n?"save-makes-frame":null;case"dark":return"starts-dark";case"outside":return"outside";case"unsupported":return"unsupported";case"failed":return"failed";default:return null}}function TT(e,t){let n=re(e),o=n&&t?t[n]:void 0;return o?.state==="ready"&&o.frame?o.frame:void 0}function wD(e,t,n){let o=n?.[Br];if(!(Array.isArray(o)&&o.includes(e)))return TT(t,n?.[ea])}import{useSyncExternalStore as ET}from"react";function kp(){let e=new Map,t=new Set,n=o=>(t.add(o),()=>{t.delete(o)});return{get:o=>e.get(o),has:o=>e.has(o),set(o,a){if(!(e.has(o)&&e.get(o)===a)){e.set(o,a);for(let s of t)s()}},use(o){let a=()=>o?e.get(o):void 0;return ET(n,a,a)}}}import{zoneKey as xT}from"efficient-easel/data";var ve="SiteHeader",Ge="SiteFooter",Hr="sections",AD=[ve,Ge],ta=e=>e===ve||e===Ge,RD=e=>xT({parentId:e,slot:Hr});function ID(e,t,n=[]){return{type:e,props:{id:t,[Hr]:n}}}var vT=new Set(["Footer",ve,Ge]);function na(e){let t=new Set,n=!1,o=e.filter(a=>{let s=a?.type??"";return s==="Header"?(n=!0,!1):vT.has(s)?t.has(s)?(n=!0,!1):(t.add(s),!0):!0});return n?o:e}function ND(e,t){return e.some(n=>n?.type===t.type)?e:t.type===ve?[t,...e]:[...e,t]}var Ap={[ve]:{max:3,takes:["Flex","Ticker"]},[Ge]:{max:6,takes:["Flex","Prose","Logos","Divider"]}};function LD(e,t,n){if(!ta(e))return!0;let o=Ap[e];return n<o.max&&o.takes.includes(t)}function DD(e,t){let n=t,o=n?.props?.id;if(o==null)return null;let a=e?.content;if(!Array.isArray(a))return null;for(let s of a){if(!ta(s?.type))continue;let r=s.props?.[Hr];if(!Array.isArray(r)||!r.some(l=>l?.props?.id===o))continue;let i=Ap[s.type];return i.takes.includes(n?.type??"")?r.length>=i.max?{group:s.type,why:"full"}:null:{group:s.type,why:"type"}}return null}import{locateNode as wT}from"efficient-easel/draw";function Mr(e){if(!e)return null;let t=e.lastIndexOf(":");return t>0?{ownerId:e.slice(0,t),slot:e.slice(t+1)}:null}function oa(e,t,n){let o=Mr(n?.zone),a=o?wT(e,t,o.ownerId):null;return a&&o?{...a,slot:o.slot}:null}import{isNode as eE}from"efficient-easel/data";import{convertLength as CT,rowGrid as OT}from"efficient-easel/screen/lib/content/length-units";var V={min:1e3,max:2e3,step:50,default:1600};function PT(e){return{maxWidth:e,marginInline:"auto",width:"100%"}}var Gr="--sf-site-width",Wr=`var(${Gr},${V.default}px)`,GD="100vw",zD=`max-w-[${Wr}]`,WD=`max-w-[${V.default}px]`;function Ip(e){return typeof e!="number"||!Number.isFinite(e)?V.default:Math.round(Math.min(Math.max(e,V.min),V.max))}function KD(e,t){let n=En(e,t,"size",V);if(n!==null)return{[Gr]:n};let o=Ip(e);return o===V.default?{}:{[Gr]:`${o}px`}}var ie={min:0,max:80,step:4,default:40,typedMax:Number.POSITIVE_INFINITY},zr="--sf-site-gutter",Le={min:0,max:24,step:4,typedMax:Number.POSITIVE_INFINITY},kT=OT({kind:"spacing"},"vw",ie).max;function Np(e,t){return e<=t?`${e}px`:`min(${e}px, ${kT}vw)`}var Rp="--sf-site-gutter-phone",AT="max-view-tablet:[--sf-site-gutter:var(--sf-site-gutter-phone)]!",RT="max-view-wide:[&_[data-sf-line~=edge]:not([data-sf-line~=edge]_*)]:[--sf-site-gutter:var(--sf-site-gutter-phone)]",we=`var(${zr},${ie.default}px)`,IT=`px-[${we}]`;var tt={md:`min(24px,${we})`,sm:`min(20px,${we})`,frame:`min(24px,${we})`,tabs:`min(16px,${we})`},jD=[[`max-view-desktop:px-[${tt.md}]`,"max-view-desktop:px-6"],[`max-view-desktop:px-[${tt.tabs}]`,"max-view-desktop:px-4"],[`max-[960px]:px-[${tt.frame}]`,"max-[960px]:px-6"],[`max-[900px]:px-[${tt.md}]`,"max-[900px]:px-6"],[`max-view-wide:px-[${tt.md}]`,"max-view-wide:px-6"],[`max-view-tablet:px-[${tt.sm}]`,"max-view-tablet:px-5"],[`max-view-wide:px-[${tt.sm}]`,"max-view-wide:px-5"],[`max-[640px]:px-[${tt.sm}]`,"max-[640px]:px-5"],[`view-wide:px-[${we}]`,"view-wide:px-10"],[`max-view-tablet:px-[min(24px,${we})]`,"max-view-tablet:px-6"],[`max-view-wide:-mx-[min(20px,${we})]`,"max-view-wide:-mx-5"],[`max-view-tablet:-mx-[min(20px,${we})]`,"max-view-tablet:-mx-5"],[`-mx-[${we}]`,"-mx-10"],[IT,"px-10"]];var wt="sideSpaceOnce",VD="data-sf-side",NT="once";function YD(e){if(!(!e||typeof e!="object"))return e[wt]===!0?NT:void 0}var Lp="max-view-wide:px-[min(20px,var(--sf-site-gutter,40px))]";function Kr(e){return Dn[e??"box"]}var aa="[[data-sf-side=once]_&]:max-view-wide:px-[var(--sf-site-gutter-phone,min(24px,var(--sf-site-gutter,40px)))]",Ln="[[data-sf-side=once]_&]:max-view-wide:px-[var(--sf-site-gutter-phone,min(20px,var(--sf-site-gutter,40px)))]",sa={"max-[960px]":aa,"max-[900px]":aa,"max-view-desktop":aa,"max-[1100px]":aa,"max-view-wide":Ln,"max-view-tablet":Ln,"max-[720px]":Ln,"max-[640px]":Ln,"max-[800px]":Ln},$r="var(--sf-pad-site,var(--sf-box-g,var(--sf-site-gutter,40px)))",Ur="[--sf-edge-g:var(--sf-pad-site)]",Dn={box:{className:"[--sf-pad-site:var(--sf-box-g,var(--sf-site-gutter,40px))] max-[960px]:[--sf-pad-site:min(24px,var(--sf-box-g,var(--sf-site-gutter,40px)))]",value:$r,edge:Ur,frame:"max-[960px]:px-[min(24px,var(--sf-site-gutter,40px))]",once:"[[data-sf-side=once]_&]:max-view-wide:[--sf-pad-site:var(--sf-site-gutter-phone,min(24px,var(--sf-box-g,var(--sf-site-gutter,40px))))]",onceFrame:sa["max-[960px]"],onceGutter:"[[data-sf-side=once]_&]:max-[960px]:[--sf-box-g:min(24px,var(--sf-site-gutter,40px))] [[data-sf-side=once]_&]:max-view-wide:[--sf-box-g:var(--sf-site-gutter-phone,min(24px,var(--sf-site-gutter,40px)))]"},site:{className:"[--sf-pad-site:var(--sf-box-g,var(--sf-site-gutter,40px))] max-view-wide:[--sf-pad-site:min(20px,var(--sf-box-g,var(--sf-site-gutter,40px)))]",value:$r,edge:Ur,frame:Lp,once:"[[data-sf-side=once]_&]:max-view-wide:[--sf-pad-site:var(--sf-site-gutter-phone,min(20px,var(--sf-box-g,var(--sf-site-gutter,40px))))]",onceFrame:sa["max-view-wide"],onceGutter:"[[data-sf-side=once]_&]:max-view-wide:[--sf-box-g:var(--sf-site-gutter-phone,min(20px,var(--sf-site-gutter,40px)))]"},none:{className:"[--sf-pad-site:0px] max-view-wide:[--sf-pad-site:min(20px,var(--sf-box-g,var(--sf-site-gutter,40px)))]",value:$r,edge:Ur,frame:"view-wide:px-0 max-view-wide:px-[min(20px,var(--sf-site-gutter,40px))]",once:"[[data-sf-side=once]_&]:max-view-wide:[--sf-pad-site:var(--sf-site-gutter-phone,min(20px,var(--sf-box-g,var(--sf-site-gutter,40px))))]",onceFrame:sa["max-view-wide"],onceGutter:"[[data-sf-side=once]_&]:max-view-wide:[--sf-box-g:var(--sf-site-gutter-phone,min(20px,var(--sf-site-gutter,40px)))]"}},XD=`mx-auto max-w-[var(--sf-site-width,1600px)] px-[var(--sf-site-gutter,40px)] ${Lp}`,qD="[--sf-box-g:var(--sf-site-gutter,40px)] [&>*]:[--sf-site-gutter:0px]",LT="[[data-sf-side=once]_&]:[&>*]:[--sf-site-gutter-phone:0px]";function ZD(e){return`${LT} ${Dn[e].onceGutter}`}var DT="[[data-sf-side=once]_&]:[--sf-box-g:var(--sf-site-gutter,40px)] [[data-sf-side=once]_&]:[&>*]:[--sf-site-gutter:0px] [[data-sf-side=once]_&]:[&>*]:[--sf-site-gutter-phone:0px]",FT="[[data-sf-side=once]_&]:max-view-wide:-mx-[var(--sf-site-gutter-phone,min(20px,var(--sf-site-gutter,40px)))]",BT=/^([^\s:]+):px-\[min\((?:20|24)px,var\(--sf-site-gutter,40px\)\)\]$/,HT="max-view-wide:-mx-[min(20px,var(--sf-site-gutter,40px))]";function MT(e){if(!e)return"";let t=[];for(let n of e.split(/\s+/)){let o=BT.exec(n)?.[1],a=o?j(sa,o):void 0;a?t.push(a):n===HT&&t.push(FT)}return t.join(" ")}var JD="[[data-sf-side=once]_&]:[--sf-pad-site:inherit]",QD="[[data-sf-side=once]_&]:[--sf-edge-g:var(--sf-box-g,var(--sf-site-gutter,40px))]";function $T(e){if(!e)return"";let t=e.split(" "),n=["none","site","box"].find(o=>Dn[o].className.split(" ").every(a=>t.includes(a)));return n?`${DT} ${Dn[n].once} ${Dn[n].onceGutter}`:""}function eF(e,t){let n=t?[$T(e),MT(e)].filter(Boolean).join(" "):"";return n?`${e} ${n}`:e}var tF="mx-auto max-w-[var(--sf-site-width,1600px)] px-[var(--sf-site-gutter,40px)] max-view-desktop:px-[min(24px,var(--sf-site-gutter,40px))]";function Dp(e){return typeof e!="number"||!Number.isFinite(e)?ie.default:Math.round(Math.min(Math.max(e,ie.min),ie.typedMax))}function Fp(e,t,n){let o=Fs(e,t,"spacing",n);return o===null?null:M(o,"vw")}function nF(e,t){let n=Fp(e,t,ie);if(n!==null)return{[zr]:n};let o=Dp(e);return o===ie.default?{}:{[zr]:Np(o,ie.max)}}function Bp(e){return typeof e!="number"||!Number.isFinite(e)?null:Math.round(Math.min(Math.max(e,Le.min),Le.typedMax))}function Hp(e){return typeof e=="number"&&Number.isFinite(e)?Ip(e):null}function oF(e,t){let n=Fp(e,t,Le);if(n!==null)return{[Rp]:n};let o=Bp(e);return o===null?{}:{[Rp]:Np(o,Le.max)}}function aF(e){return Bp(e)===null?"":`${AT} ${RT}`}function Mp(e,t){let n=Fs(e,t,"spacing",ie),o=n===null?Dp(e):CT(n,F(t),"px","mobile",Le);return Math.min(Le.max,o)}var $p=Wr,sF=`max-w-[${$p}]`,rF=`max-w-[min(var(--sf-page-cap,${V.default}px),${V.default}px)]`,Up="--sf-hero-cap",UT=`var(${Up},none)`,iF=`max-w-[${UT}]`,GT="--sf-hero-bleed-m",zT="--sf-hero-bleed-w",WT="--sf-hero-chrome-x",KT="--sf-hero-chrome-cap";function lF(e){return e===!0?{[Up]:$p,[GT]:"auto",[zT]:"100%",[WT]:"24px",[KT]:"none"}:{}}var jr=`calc(${Wr} - ${we}*2)`,cF=`max-w-[${jr.replace(/ /g,"_")}]`;var jT="--sf-chrome-cap",VT=`var(${jT},${jr})`,uF="data-page-width";function dF(e){return e==="full"?"full":null}function pF(e){return e==="full"?null:PT(e==="content"?jr:VT)}function fF(e){if(e==="full")return"full";if(e==="content")return"content"}var gF="data-sf-site-css",YT="site",Fn="siteCustomCss";function XT(e){return e&&typeof e=="object"?fu(e,Fn):""}function bF(e){return XT(e)?YT:void 0}var qT=["tall","square","wide"],ZT="tall";function _F(e){return qT.includes(String(e??""))?String(e):ZT}var TF={sectionNumber:"\xB7 Locations",heading:"Our *locations.*",tagline:"Visit us in person \u2014 find your nearest studio below.",galleryKicker:"Gallery",galleryHint:"Hover to see in colour \xB7 click to jump",mapTheme:"auto"},EF=[{photo:"",group:"",groupName:"",name:"City name",state:"State",country:"Country",timezone:"GMT \xB7 UTC +0",address:`Address line one
|
|
6
|
-
Address line two`,phone:"+00 000 0000",hours:"Mon\u2013Fri 9:00\u201318:00",lat:0,lng:0,mapsUrl:""},{photo:"",group:"",groupName:"",name:"City name",state:"State",country:"Country",timezone:"GMT \xB7 UTC +0",address:`Address line one
|
|
7
|
-
Address line two`,phone:"+00 000 0000",hours:"Mon\u2013Fri 9:00\u201318:00",lat:0,lng:0,mapsUrl:""}],JT=/^https?:\/\//i;function xF(e){let t=(e.mapsUrl??"").trim();return{photo:"",group:"",groupName:"",name:e.name??"",state:e.state??"",country:e.country??"",timezone:"",address:e.address??"",phone:e.phone??"",hours:e.hours??"",lat:Is(e.lat),lng:Is(e.lng),mapsUrl:JT.test(t)?t:""}}function Gp(e){let t=String(e??"").split(" \xB7 ");return{state:(t[0]??"").trim(),country:(t[1]??"").trim()}}var vF="other",wF={routingNumber:"02 \xB7 Routing",routingTagline:"What can we help you with?",groups:[{id:"fitment",eyebrow:"A \xB7 Label",title:"Group one",copy:"Short description of this routing group.",response:"< 48h"},{id:"trade",eyebrow:"B \xB7 Label",title:"Group two",copy:"Short description of this routing group.",response:"< 24h"},{id:"press",eyebrow:"C \xB7 Label",title:"Group three",copy:"Short description of this routing group.",response:"< 48h"},{id:"order",eyebrow:"D \xB7 Label",title:"Group four",copy:"Short description of this routing group.",response:"< 24h"}],formNumber:"03 \xB7 Message",formHeading:"Send *a note.*",metaLines:["Encrypted in transit","Stored 12 months"],showOther:!0,otherLabel:"Other",otherNoteTitle:"No matching team",otherNoteBody:"Tell us what you need in the message field below \u2014 we'll route it to whoever can help.",buttonText:"Send Message \u2192",consent:"By submitting, you agree to our privacy policy. We never share contact details with third parties.",channels:[{label:"Team one",value:"team-one@email.com",href:"mailto:team-one@email.com",sub:"Detail \xB7 Detail",groupId:"fitment"},{label:"Team two",value:"team-two@email.com",href:"mailto:team-two@email.com",sub:"Detail \xB7 Detail",groupId:"trade"},{label:"Team three",value:"team-three@email.com",href:"mailto:team-three@email.com",sub:"Detail \xB7 Detail",groupId:"press"},{label:"Team four",value:"team-four@email.com",href:"mailto:team-four@email.com",sub:"Detail \xB7 Detail",groupId:"order"},{label:"Phone",value:"+1 (000) 000-0000",href:"tel:+10000000000",sub:"Mon\u2013Fri \xB7 9:00\u201318:00"}]};var nt="siteOffices",on=e=>typeof e=="string"?e:"",zp=e=>O(e)??0;function QT(e){if(!e||typeof e!="object"||Array.isArray(e))return null;let t=e;return{role:on(t.role),city:on(t.city),country:on(t.country),address:on(t.address),phone:on(t.phone),group:on(t.group),hq:t.hq===!0,lat:zp(t.lat),lng:zp(t.lng)}}function AF(e){let t=e&&typeof e=="object"?e[nt]:void 0;return Array.isArray(t)?t.map(QT).filter(n=>n!==null):[]}function RF(e){let{state:t,country:n}=e.country.includes(" \xB7 ")?Gp(e.country):{state:"",country:e.country.trim()};return{photo:"",group:e.group??"",groupName:"",name:e.city,state:t,country:n,timezone:"",address:e.address??"",phone:e.phone??"",hours:"",lat:e.lat,lng:e.lng,mapsUrl:""}}var Wp={key:hc,label:"Site offices",blocks:["Footprint","ContactLocations"]};var Yr="Footer",Kp=[ve,Yr,Ge],Bn=[wt,nt,Fn],tE=[Ge,Yr],Xr=e=>tE.includes(e?.type??"");function nE(e){let t=e?.props;if(!t||!Bn.some(o=>o in t))return e;let n={};for(let[o,a]of Object.entries(t))Bn.includes(o)||(n[o]=a);return{...e,props:n}}function oE(e,t){let n=Bn.filter(a=>t&&a in t);if(!n.length)return e;let o={...e.props??{}};for(let a of n)o[a]=t[a];return{...e,props:o}}function MF(e){return Array.isArray(e)?e.find(t=>Xr(t))?.props??null:null}function aE(e,t){if(!t)return e;let n=Bn.filter(a=>a in t&&(!e||JSON.stringify(e[a])!==JSON.stringify(t[a])));if(!n.length)return e;let o={...e??{}};for(let a of n)o[a]=t[a];return o}var ot=e=>{let t=e?.content;return Array.isArray(t)?t:[]},at=e=>{let t=e?.zones;return t&&typeof t=="object"&&!Array.isArray(t)?t:null},an=e=>{let t=e?.props?.id;return typeof t=="string"?t:void 0},jp=e=>Mr(e)?.ownerId??"";function Vp(e){let t=na(ot(e)),n=t.some(o=>o?.type===Ge);return t.filter(o=>o?.type===ve||o?.type===Ge||o?.type===Yr&&!n)}function ra(e,t){let n=new Set,o=a=>{if(Array.isArray(a)){for(let s of a)o(s);return}if(!(!a||typeof a!="object")){if(eE(a)){let s=an(a);s&&n.add(s)}for(let s of Object.values(a))o(s)}};if(o(e),t){let a=!0,s=new Set;for(;a;){a=!1;for(let[r,i]of Object.entries(t))s.has(r)||!n.has(jp(r))||(s.add(r),o(i),a=!0)}}return n}function Yp(e,t){let n=ot(e).filter(o=>{let a=an(o);return typeof o?.type=="string"&&Kp.includes(o.type)||a!==void 0&&t(a)});return n.length?ra(n,at(e)):new Set}function Vr(e,t){let n={},o={};for(let[a,s]of Object.entries(e??{}))(t.has(jp(a))?n:o)[a]=s;return{owned:n,rest:o}}function Xp(e){let t=e?.root,n=t&&typeof t=="object"?t.props:void 0;return n&&typeof n=="object"&&!Array.isArray(n)?n:null}function $F(e,t){if(!t)return e;let n=Vp(t);if(!n.length)return e;let o=n.filter(l=>l.type===ve),a=Xp(t),s=n.filter(l=>l.type!==ve).map(l=>Xr(l)?oE(l,a):l),r={...e,content:[...o,...ot(e),...s]},{owned:i}=Vr(at(t),ra(n,at(t)));return Object.keys(i).length&&(r.zones={...at(e)??{},...i}),r}function UF(e,t){if(!t)return{page:e,chrome:null};let n=Vp(t),o=new Set(n.map(an).filter(v=>!!v)),a=[],s=[],r=null;for(let v of ot(e)){let w=an(v),I=w&&o.has(w)||ta(v?.type);if(I&&Xr(v)&&!r){r={};for(let D of Bn)v.props&&D in v.props&&(r[D]=v.props[D])}let C=nE(v);I?s.push(C):a.push(C)}let i=new Map(s.map(v=>[an(v),v])),l=new Set,u=na(ot(t)).flatMap(v=>{let w=an(v);if(!w||!o.has(w))return[v];let I=i.get(w);return I?(l.add(I),[I]):[]});for(let v of s)l.has(v)||u.some(w=>w?.type===v.type)||(u=v.type===ve?[v,...u]:[...u,v]);u=na(u);let d=u.length===ot(t).length&&u.every((v,w)=>v===ot(t)[w]||JSON.stringify(v)===JSON.stringify(ot(t)[w])),p=at(e),f=ra(u,p),{owned:m,rest:b}=Vr(p,f),y=Vr(at(t),ra(n,at(t))).owned,T={...t,content:d?t.content:[...u]},S=sE(t,r);S!==t.root&&(T.root=S);let E=at(t);if(E||Object.keys(m).length){let v={};for(let[w,I]of Object.entries(E??{}))w in y?w in m&&(v[w]=m[w]):v[w]=I;for(let[w,I]of Object.entries(m))w in v||(v[w]=I);T.zones=v,E&&rE(T.zones,E)&&(T.zones=E)}let x={...e,content:a};return p&&(Object.keys(b).length||!Object.keys(y).length?x.zones=b:delete x.zones),{page:x,chrome:T}}function sE(e,t){let n=Xp(e),o=aE(n,t);return o===n?e.root:{...e.root&&typeof e.root=="object"?e.root:{},props:o}}function rE(e,t){let n=Object.keys(e),o=Object.keys(t);return n.length===o.length&&n.every((a,s)=>a===o[s]&&e[a]===t[a])}function GF(e,t){return n=>e(n)||n!==void 0&&Kp.includes(n)&&t()}var qp=null;function WF(e){qp=e}function Zp(){return qp}var Jp=null;function KF(e){Jp=e}function jF(){return Jp}var qr=kp();function Qp(e,t,n){if(!t)return;let o={...qr.get(e)};for(let[a,s]of Object.entries(t))o[a]={...s,noted:n};qr.set(e,o)}function JF(e,t){Qp(e,t,"load")}function QF(e,t){Qp(e,t,"save")}function ef(e){return qr.use(e)}var Zr=e=>!!Zp()?.sectionOf(e);function tf(e,t=Zr){return Yp(e,t)}function nf(e,t,n,o=Zr){if(n)return e&&tf(t,o).has(e)?void 0:n}function eB(e,t,n=Zr){if(!e)return{};let o=[...tf(t,n)];return o.length?{[ea]:e,[Br]:o}:{[ea]:e}}import{ScreenDocumentContext as IO}from"efficient-easel/screen/components/ScreenDocumentContext";import{readHidable as NO,hidableText as LO}from"efficient-easel/draw";import{FOLD_FIELD_MARKER as Qh,LINK_FIELD_MARKER as DO,MEDIA_FIELD_MARKER as FO,SCAFFOLD_FIELD_MARKER as BO,TEXT_FIELD_MARKER as je,foldMetaOf as eg,textFieldIdentifier as TW}from"efficient-easel/draw";import{jsx as uf}from"react/jsx-runtime";import{useCallback as dE}from"react";import{useEasel as pE}from"efficient-easel/easel";import{SettingsAction as fE}from"efficient-easel/panel";import{isLengthUnit as cE}from"efficient-easel/screen/lib/content/length-units";import{CORNER_SIDES as ia,hasCornerSubset as Hn,normalizeCornerSides as De}from"efficient-easel/screen/lib/content/style-keys";import{isLengthUnit as iE}from"efficient-easel/screen/lib/content/length-units";var Jr={kind:"radius",unitKey:"sectionCornersUnit"};function Qr(e){return typeof e=="number"&&Number.isFinite(e)}function sB(e,t,n){if(!Qr(e))return;let o=iE(n)&&n!=="px"?Vt(e,n):Vt(Ae(e));if(Object.keys(o).length===0)return;let a=o[ei];if(typeof a!="string")return o;let s=Hn(t)?Ct(a,De(t)??[]):a;return{...o,[lE]:s}}var lE="--sf-section-radius",ei="--sf-card-radius";function Ct(e,t){return ia.map(n=>t.includes(n)?e:"0").join(" ")}var of=[{value:"tl",label:"Top left"},{value:"tr",label:"Top right"},{value:"bl",label:"Bottom left"},{value:"br",label:"Bottom right"}];var Mn={kind:"radius",unitKey:"cardCornersUnit"},uE="--sf-card-box-radius";function ti(e){return typeof e=="number"&&Number.isFinite(e)}function uB(e,t,n){if(!ti(e))return;let o=(cE(n)&&n!=="px"?Vt(e,n):Vt(Ae(e)))[ei];if(typeof o!="string")return;let a=Hn(t)?Ct(o,De(t)??[]):o;return{[uE]:a}}function af(e,t){let n=e.find(r=>r?.props?.id===t);if(!n)return[...e];let o=n.props?.cardCorners,a=n.props?.cardCornerSides,s=n.props?.[Mn.unitKey];return e.map(r=>r?.props?.id===t?r:{...r,props:{...r.props,cardCorners:o,cardCornerSides:a,[Mn.unitKey]:s}})}function sf(e,t,n){let o=oa(e,t,n),a=o?.slot??"",s=o&&Array.isArray(o.item.props[a])?o.item.props[a]:[],r=n?.index??-1,i=r>=0?s[r]:void 0,l=i?.props?.id?String(i.props.id):"",u=Math.max(s.length-1,0);return!o||!l?{can:!1,reason:"unreachable",others:0}:s.length<=1?{can:!1,reason:"alone",others:u}:ti(i?.props?.cardCorners)?{can:!0,others:u,zone:o.zone,index:o.index,data:{...o.item,props:{...o.item.props,[a]:af(s,l)}}}:{can:!1,reason:"unset",others:u}}function rf(e){return e.can?xn("Gives the other card this card's Corners.","Gives the other {n} cards this card's Corners.",e.others):e.reason==="alone"?c("This is the only card in the section."):e.reason==="unset"?c("Set this card's corners first."):c("This card is not in a section that can share corners.")}function lf(e){return xn("Applied to {n} card","Applied to {n} cards",e)}function cf(e,t){e.can&&t(e.zone,e.index,e.data)}import{useSectionOps as mE}from"efficient-easel/screen/lib/document/use-section-ops";var hE="apply-corners-to-siblings",gE="Apply to all cards";function bE({plan:e,onPress:t}){return uf(fE,{id:hE,label:c(gE),note:rf(e),disabled:!e.can,doneLabel:lf(e.others),onPress:t})}function df(){let{appState:e,config:t}=pE(s=>s),n=mE(),o=sf(t,e.data.content??[],e.ui.itemSelector),a=dE(()=>{cf(o,n.replaceComponent)},[o,n]);return uf(bE,{plan:o,onPress:a})}import{isShown as _f,lazyShowWhenContext as IE}from"efficient-shell/format";var st="product",la="recordType",pf={key:st,label:"Product",fields:[]},yE=/^[a-z][a-z0-9]*(-[a-z0-9]+)*$/,SE=/^[a-z][A-Za-z0-9]*$/,_E=["text","date","images"],ni=new Map,ff=0;function TE(e){if(typeof e.key!="string"||!yE.test(e.key))throw new Error(`A record type key is lower-case words joined by hyphens, not ${JSON.stringify(e.key)}.`);if(e.key===st)throw new Error("The product record type is the builder's own and is not declared by a host.");if(typeof e.label!="string"||!e.label.trim())throw new Error(`The record type ${e.key} has no label.`);let t=new Set;for(let n of e.fields){if(typeof n.key!="string"||!SE.test(n.key)||t.has(n.key))throw new Error(`The record type ${e.key} has a field key it cannot use: ${JSON.stringify(n.key)}.`);if(!_E.includes(n.kind))throw new Error(`The field ${n.key} of ${e.key} has no kind ${JSON.stringify(n.kind)}.`);t.add(n.key)}return{key:e.key,label:e.label.trim(),fields:e.fields.map(n=>({...n}))}}function vB(e){let t=e.map(TE);for(let n of t)ni.set(n.key,n);t.length&&(ff+=1)}function oi(){return[pf,...ni.values()]}function EE(e){return e===st?pf:ni.get(e)??null}function ai(){return ff}function $n(e){let t=e?.[la];return typeof t!="string"?st:t.trim()||st}function si(e){return $n(e)===st}function wB(e,t){let n=EE(e)?.fields??[];return t?n.filter(o=>t.includes(o.kind)):n}var ca="product",mf="tyre",xE=[ca,mf];function PB(e){return xE.includes(e)}var vE="productType",wE={[ca]:"alloy-wheel",[mf]:"tyre"},CE=["alloy-wheel","tyre"];function hf(e,t){return si(t)?gf(t)??wE[e]??null:null}function gf(e){if(!si(e))return null;let t=e?.[vE];return typeof t=="string"&&CE.includes(t)?t:null}function kB(e){let t=e?.root;return gf(t?.props)}var OE="Main Pages",PE="Dynamic Pages",kE="dynamic",AE="dynamic";function ri(e){return e.kind===AE}var ii="lightbox";function RB(e){return e.kind===ii}function IB(e){let t=[],n=[];for(let o of e){if(ri(o)){n.push(o);continue}let a=o.groupKey??(o.group?`folder:${o.group}`:"top"),s=t[t.length-1];s&&s.key===a?s.rows.push(o):t.push({key:a,label:o.group??OE,rows:[o]})}if(n.length){let o=t.findIndex(a=>a.key.startsWith("system:"));t.splice(o===-1?t.length:o,0,{key:kE,label:PE,rows:n})}return t}var ua=null,bf=null;function RE(e,t){ua=e,bf=t}function BB(e){RE(e,null)}function HB(){return ua}function Un(){return ri({kind:bf})||ua===ca}function MB(e){return hf(ua??"",e)??"alloy-wheel"}function yf(e){return Un()?$n(e):null}function ZB(e,t,n){let o=!1,a={};for(let[s,r]of Object.entries(e)){if(!_f(Rs(r),t??{},n)){o=!0;continue}let i=NE(r,t?.[s],t??{},n);i!==r&&(o=!0),a[s]=i}return o?a:e}function NE(e,t,n,o){let a=e?.options;if(!Array.isArray(a))return e;let s=a.filter(r=>r?.value===t||!r?.showWhen||_f(r.showWhen,n,o));return s.length===a.length?e:{...e,options:s}}function JB(e,t,n,o){let a=oa(t,n,o);return{device:e,parentType:a?.item.type,parent:a?.item.props}}function Sf(e,t){if(!e||typeof e!="object")return!1;let n=e;if(typeof n.context=="string"&&(n.context===t||n.context.startsWith(`${t}.`)))return!0;if("not"in n)return Sf(n.not,t);for(let o of[n.all,n.any])if(Array.isArray(o)&&o.some(a=>Sf(a,t)))return!0;return!1}function QB(e,t={}){return IE({parentType:()=>e.parent?.type??void 0,parent:()=>e.parent?.props??void 0,dynamicPage:()=>Un(),root:()=>e.appState?.data?.root?.props,...t})}import{isLengthUnit as LE}from"efficient-easel/screen/lib/content/length-units";var Tf=1,DE="cardImageUnit",li={kind:"radius",unitKey:DE},Ef={kind:"radius"};function FE(e){return Ae(e)}function sH(e,t){if(LE(t)&&t!=="px"){let o=O(e);return o!==void 0&&o>=0?{"--sf-card-image-radius":M(o,t)}:{}}let n=FE(e);return n===null?{}:{"--sf-card-image-radius":`${n}px`}}import{isLengthUnit as BE}from"efficient-easel/screen/lib/content/length-units";var xf={kind:"radius",unitKey:"cornersUnit"},vf=1,wf="Corners";function HE(e){return Ae(e)}function pH(e,t,n){let o=BE(n)&&n!=="px"?O(e):void 0,a=o===void 0?HE(e):null;if(o===void 0&&a===null)return null;let s=o!==void 0?M(Math.max(0,o),n):`${a}px`;return{borderRadius:Hn(t)?Ct(s,De(t)??[]):s}}import{phoneKey as Nf}from"efficient-easel/screen/lib/content/view-tiers";var Of=12,sn=6,ME=Tn,da={twoAcross:{label:"Two across",across:2,acrossPhone:2,desktop:[[6,1],[6,1]],phone:[[3,1],[3,1]]},zigzag:{label:"Zigzag",across:2,acrossPhone:2,desktop:[[8,1],[4,1],[4,1],[8,1]],phone:[[4,1],[2,1],[2,1],[4,1]]},brick:{label:"Brick",across:2,acrossPhone:2,desktop:[[5,1],[7,1],[7,1],[5,1]],phone:[[2,1],[4,1],[4,1],[2,1]]},twoTall:{label:"Two tall",across:2,acrossPhone:2,desktop:[[6,2],[6,2]],phone:[[3,2],[3,2]]},offsetTall:{label:"Offset tall",across:2,acrossPhone:2,desktop:[[5,2],[7,1],[3,1],[4,1]],phone:[[3,2],[3,1],[3,1]]},ladder:{label:"Ladder",across:2,acrossPhone:2,desktop:[[3,2],[9,1],[5,1],[4,1]],phone:[[2,2],[4,1],[2,1],[2,1]]},threeAcross:{label:"Three across",across:3,acrossPhone:3,desktop:[[4,1],[4,1],[4,1]],phone:[[2,1],[2,1],[2,1]]},bigLeft:{label:"Big left",across:3,acrossPhone:3,desktop:[[6,1],[3,1],[3,1]],phone:[[4,1],[1,1],[1,1]]},bigRight:{label:"Big right",across:3,acrossPhone:3,desktop:[[3,1],[3,1],[6,1]],phone:[[1,1],[1,1],[4,1]]},threeStagger:{label:"Three stagger",across:3,acrossPhone:3,desktop:[[5,1],[4,1],[3,1],[3,1],[4,1],[5,1]],phone:[[3,1],[2,1],[1,1],[1,1],[2,1],[3,1]]},threeLadder:{label:"Three ladder",across:3,acrossPhone:3,desktop:[[3,1],[4,1],[5,1],[5,1],[4,1],[3,1]],phone:[[1,1],[2,1],[3,1],[3,1],[2,1],[1,1]]},tallMiddle:{label:"Tall middle",across:3,acrossPhone:3,desktop:[[4,1],[4,2],[4,1],[4,1],[4,1]],phone:[[2,1],[2,2],[2,1],[2,1],[2,1]]},fourAcross:{label:"Four across",across:4,acrossPhone:2,desktop:[[3,1],[3,1],[3,1],[3,1]],phone:[[3,1],[3,1]]},bigFirst:{label:"Big first",across:4,acrossPhone:2,desktop:[[6,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1]],phone:[[6,1],[3,1],[3,1]]},fourStagger:{label:"Four stagger",across:4,acrossPhone:2,desktop:[[4,1],[3,1],[2,1],[3,1],[2,1],[3,1],[4,1],[3,1]],phone:[[4,1],[2,1],[2,1],[4,1]]},tallFirst:{label:"Tall first",across:4,acrossPhone:2,desktop:[[3,2],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1]],phone:[[3,2],[3,1],[3,1]]},oneThenFour:{label:"One then four",across:4,acrossPhone:2,desktop:[[12,1],[3,1],[3,1],[3,1],[3,1]],phone:[[6,1],[3,1],[3,1]]},sixAcross:{label:"Six across",across:6,acrossPhone:3,desktop:[[2,1],[2,1],[2,1],[2,1],[2,1],[2,1]],phone:[[2,1],[2,1],[2,1]]},sixStagger:{label:"Six stagger",across:6,acrossPhone:6,desktop:[[3,1],[2,1],[1,1],[2,1],[1,1],[3,1],[1,1],[3,1],[2,1],[2,1],[1,1],[3,1]],phone:[[1,1],[1,1],[1,1],[1,1],[1,1],[1,1]]},twoThenThrees:{label:"Two, then threes",across:3,acrossPhone:3,lead:[[6,1],[6,1]],desktop:[[4,1],[4,1],[4,1]],leadPhone:[[3,1],[3,1]],phone:[[2,1],[2,1],[2,1]]},twoThenThreesPhoto:{label:"Two, then threes \xB7 photo",across:3,acrossPhone:1,lead:[[6,1],[6,1]],desktop:[[4,1],[4,1],[4,1]],phone:[[6,1]],ratio:"landscape"}},Pf=["phone","acrossPhone","leadPhone"];var $E=new Set(Pf),Gn=Object.fromEntries(Object.entries(da).map(([e,t])=>[e,Object.fromEntries(Object.entries(t).filter(([n])=>!$E.has(n)))])),ci=Object.keys(da),kf=[2,3,4,6];function ui(e,t){return ci.filter(n=>n===t||e===null||Gn[n].across===e)}function Af(e){let t=e.layout;return typeof t=="string"&&he(da,t)?t:null}function di(e){let t=Af(e);return t?UE(t,e.layoutPhone):null}var pa={oneAcross:{label:"One across",phone:[[sn,2]],acrossPhone:1}};function Rf(e){return typeof e=="string"&&he(pa,e)?e:null}function Cf(e,t){return t?sn/e.acrossPhone:Of/e.across}function pi(e){return e.ratio?bu.find(t=>t.shape===e.ratio)?.ratio??null:null}function If(e){return[...e.lead??[],...e.desktop]}function UE(e,t){let n=da[e],o=Rf(t);if(!o)return n;let{phone:a,acrossPhone:s}=pa[o],r=Object.fromEntries(Pf.map(i=>[i,void 0]));return{...n,...r,phone:a,acrossPhone:s}}var GE="sf-wall--";function zE(e){let t=Af(e);if(!t)return"";let n=Rf(e.layoutPhone);return`${GE}${t}${n?`--${n}`:""}`}function bH(e){let t=di(e);if(!t)return"";let n=`.${zE(e)}`,o=[],a=(i,l,u)=>`${n}:has(> :nth-child(${i}n+${l+u}):last-child) > :nth-last-child(-n+${u})`,s=(i,l,u=[])=>{let d=[],p=i.length,f=u.length;u.forEach(([m,b],y)=>{d.push(`${n} > :nth-child(${y+1}){grid-column:span ${m};grid-row:span ${b}}`)}),i.forEach(([m,b],y)=>{d.push(`${n} > :nth-child(${p}n+${f+y+1}){grid-column:span ${m};grid-row:span ${b}}`)});for(let m=1;m<p;m+=1)d.push(`${a(p,f,m)}{grid-column:span ${l};grid-row:span 1}`);return d};o.push(`${n}{grid-template-columns:repeat(${Of},minmax(0,1fr))}`);let r=pi(t);if(r&&(o.push(`${n}${n}{grid-auto-rows:auto}`),o.push(`${n}${n} > *{aspect-ratio:${r[0]}/${r[1]};height:auto}`)),o.push(...s(t.desktop,Cf(t,!1),t.lead)),o.push(`@media (max-width:${ME}px){`),o.push(`${n}{grid-template-columns:repeat(${sn},minmax(0,1fr))}`),o.push(...s(t.phone,Cf(t,!0),t.leadPhone)),t.phone.length===1&&!t.leadPhone?.length){let[i,l]=t.phone[0],u=t.lead?.length??0;for(let d=1;d<t.desktop.length;d+=1)o.push(`${a(t.desktop.length,u,d)}{grid-column:span ${i};grid-row:span ${l}}`)}return o.push("}"),o.join("")}var fa=12,Lf=1,ma=3;var WE=3;function rn(e,t,n){let o=typeof e=="number"?e:Number.parseInt(String(e??""),10);return Number.isFinite(o)?Math.min(n,Math.max(t,Math.trunc(o))):null}function KE(e){return rn(e,1,fa)??WE}function TH(e,t){return rn(e,Lf,ma)??(KE(t)===4?2:Lf)}function EH(e){return e==null||e===""?null:rn(e,1,fa)}var xH="data-sf-span",ha=4;function jE(e){return e==null||e===""?null:rn(e,1,ha)}var vH="data-sf-row-span",fi="gridTileAt",mi=48;function wH(e){return e==null||e===""?null:rn(e,1,mi)}var CH="--sf-tile-at";function OH(e){return e==null||e===""?null:rn(e,1,ma)}function PH(e){return jE(e)}var kH="data-sf-span-phone",AH="data-sf-row-span-phone",RH=["gridSpan","gridRowSpan",fi,Nf("gridSpan"),Nf("gridRowSpan")];function IH(e,t){if(!e)return!1;if(VE(e,t)||e.type==="Grid")return!0;if(e.type==="GalleryB"){if(di(e.props??{}))return!1;let n=e.props?.columns;return n!=null&&n!==""}return!1}var Df=new Map;function NH(e,t){Df.set(e,[...t])}function VE(e,t){if(!e||typeof e.type!="string"||typeof t!="string")return!1;let n=Df.get(e.type);return n?n.some(o=>{let a=e.props?.[o];return Array.isArray(a)&&a.some(s=>s?.props?.id===t)}):!1}import{jsx as YE}from"react/jsx-runtime";import*as XE from"efficient-easel/icons";function Ff(e){let t=e.replace(/(^|-)([a-z])/g,(o,a,s)=>s.toUpperCase()),n=XE[`${t}Icon`];return n?YE(n,{size:16}):null}import{jsx as rt,Fragment as JE,jsxs as Kf}from"react/jsx-runtime";import{useContext as QE,useEffect as ex,useId as tx,useState as jf}from"react";import{SettingsField as nx,SettingsSwitch as ox}from"efficient-easel/panel";import{AnchorIcon as ax}from"efficient-easel/icons";import{ScreenDocumentContext as sx}from"efficient-easel/screen/components/ScreenDocumentContext";import{Snippet as rx}from"efficient-shell/ui";import{slugify as ix}from"efficient-shell/format";import{slugify as qE}from"efficient-shell/format";function hi(e){return typeof e=="string"?e.trim():e&&typeof e=="object"&&typeof e.text=="string"?e.text.trim():""}var HH=e=>qE(hi(e));var Bf="homepage";import{slugify as ZE}from"efficient-shell/format";var Hf=[{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 Mf(e){return e.offersCommerce&&e.offersService?Hf:Hf.filter(t=>!t.needs||(t.needs==="commerce"?e.offersCommerce:e.offersService))}var gi="#popup:";function $f(e){return`${gi}${e}`}function Uf(e){return e.startsWith(gi)&&e.slice(gi.length).trim()||null}function zn(e){return e===Bf?"/":`/${e}`}function Gf(e){return`/journal/${e}`}function WH(e){return`/wheels/${e}`}function ga(e,t){return`${zn(e)}#${t}`}function zf(...e){let t=new Set,n=[];for(let o of e)for(let a of o?.content??[]){let s=hi(a?.props?.anchor);if(!s)continue;let r=ZE(s);!r||t.has(r)||(t.add(r),n.push({slug:r,name:s}))}return n}function KH(e){let t=e.indexOf("#"),n=t===-1?e:e.slice(0,t),o=n.indexOf("?");return o===-1?n:n.slice(0,o)}function Wf(e){return/^\/wheels\/[^/?#]+(?:[?#].*)?$/.test(e)}import{readHidable as lx}from"efficient-easel/draw";function Vf({value:e,onChange:t,nameBox:n}){let o=lx(e).text,[a,s]=jf(!1),r=a||o.trim()!=="",i=tx();return Kf(JE,{children:[rt(nx,{label:c("Add an anchor"),labelId:i,icon:rt(ax,{}),action:rt(ox,{checked:r,ariaLabelledBy:i,onChange:l=>{s(l),!l&&o!==""&&t("")}})}),r&&n(e,t),r&&rt(cx,{name:o})]})}function cx({name:e}){let t=QE(sx),n=t?.templateId?"":t?.currentSlug??"",[o,a]=jf("");ex(()=>a(Au()),[]);let s=ix(e);if(!s||!n)return null;let r=`${o}${ga(n,s)}`,i=r.replace(/^https?:\/\//,""),l=i.lastIndexOf("#");return rt("div",{className:"sf-anchor-link",children:rt(rx,{value:r,label:c("link"),size:"sm",children:Kf("span",{className:"sf-anchor-link-text",children:[rt("span",{className:"sf-anchor-link-path",children:i.slice(0,l)}),rt("span",{className:"sf-anchor-link-hash",children:i.slice(l)})]})})})}import{jsx as Fe,jsxs as ux}from"react/jsx-runtime";import{Fragment as dx}from"react";import{Button as ba,Tooltip as px}from"efficient-shell/ui";function ya({status:e,statusText:t,onRefresh:n,busy:o=!1,edit:a,hint:s,spaced:r=!0,compact:i=!1,oneLine:l=!1}){return i?Fe("div",{className:`sf-blogsource sf-blogsource--compact${l?" sf-blogsource--line":""}`,style:r?{marginTop:8}:void 0,children:Fe(px,{content:s,className:l?"sf-name-tip":void 0,children:Fe("p",{className:"sf-blogsource-status","data-state":e,children:[t?Fe(dx,{children:t},"status"):null,n?Fe(ba,{variant:"link",size:"sm",className:"sf-blogsource-link",onClick:n,disabled:o,children:c("Refresh now")},"refresh"):null,a?Fe(ba,{variant:"link",size:"sm",className:"sf-blogsource-link",onClick:a.onClick,children:a.label},"edit"):null].filter(Boolean).flatMap((u,d)=>d?[" \xB7 ",u]:[u])})})}):ux("div",{className:"sf-blogsource",style:r?{marginTop:9}:void 0,children:[Fe("p",{className:"sf-blogsource-status","data-state":e,children:t}),n?Fe(ba,{variant:"secondary",className:"sf-blogsource-action",onClick:n,disabled:o,children:c("Refresh now")}):null,a?Fe(ba,{variant:"secondary",className:"sf-blogsource-action",onClick:a.onClick,children:a.label}):null,Fe("p",{className:"es-field-hint",children:s})]})}import{AdjustIcon as HO,EyeIcon as MO,AnimationIcon as $O,BackgroundIcon as $h,BorderAllIcon as UO,BlockSectionIcon as GO,ColumnWidthsIcon as ts,ColumnsIcon as tg,CornerIcon as ng,DirectionDownIcon as zO,DirectionLeftIcon as WO,DirectionRightIcon as KO,DirectionUpIcon as jO,EditIcon as VO,GapIcon as YO,GridIcon as og,GroundIcon as Cl,HashIcon as ag,HeightIcon as ns,ImageIcon as XO,ListIcon as qO,LocationIcon as Uh,PaddingBottomIcon as sg,PaddingLeftIcon as rg,PaddingRightIcon as ig,PaddingTopIcon as Al,PageIcon as ZO,PhoneIcon as JO,StickyIcon as lg,SearchIcon as QO,SquareIcon as eP,TypeIcon as tP,WidthIcon as nP}from"efficient-easel/icons";import{jsx as U,Fragment as Ot,jsxs as Pt}from"react/jsx-runtime";import{CaptionIcon as fx,DateIcon as mx,FlagIcon as hx,TitleIcon as gx,ButtonIcon as bx,DollarIcon as yx,HashIcon as Sx,LinkIcon as _x,NoteIcon as Tx,TagIcon as Ex,TextLinesIcon as xx}from"efficient-easel/icons";var Yf={body:xx,button:bx,link:_x,label:Ex,number:Sx,price:yx,note:Tx,name:hx,date:mx,caption:fx,title:gx},Xf={eyebrow:Pt(Ot,{children:[U("path",{d:"M5 6.5h5"}),U("path",{d:"M5 12.5h14"}),U("path",{d:"M5 18h11"})]}),heading:Pt(Ot,{children:[U("path",{d:"M6.5 5v14"}),U("path",{d:"M17.5 5v14"}),U("path",{d:"M6.5 12h11"})]}),intro:Pt(Ot,{children:[U("path",{d:"M4 5.5v13"}),U("path",{d:"M8 7.5h12"}),U("path",{d:"M8 12h12"}),U("path",{d:"M8 16.5h8"})]}),value:Pt(Ot,{children:[U("rect",{x:"2.5",y:"7",width:"19",height:"10",rx:"2"}),U("path",{d:"M6.5 12h7"})]}),quote:Pt(Ot,{children:[U("path",{d:"M9.5 5.5C7 7.2 5.5 9.7 5.5 12.8h4v5.7h-5v-5.7"}),U("path",{d:"M19.5 5.5c-2.5 1.7-4 4.2-4 7.3h4v5.7h-5v-5.7"})]}),tag:Pt(Ot,{children:[U("rect",{x:"3",y:"5.5",width:"18",height:"13",rx:"2.5"}),U("path",{d:"M8 9.5h8"}),U("path",{d:"M12 9.5v5"})]}),meta:Pt(Ot,{children:[U("path",{d:"M4 7h16"}),U("path",{d:"M4 14h3.5"}),U("path",{d:"M10.5 14h3"}),U("path",{d:"M17 14h3"})]})};function bi({noun:e,size:t=14,strokeWidth:n=1.8,className:o,style:a}){let s=Yf[e];return s?U("span",{className:o,style:{display:"inline-flex",...a},"aria-hidden":"true",children:U(s,{size:t})}):U("svg",{className:o,style:a,width:t,height:t,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:n,strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:Xf[e]})}var pM=Object.keys(Yf);var fM=Object.keys(Xf);import{parseHexColor as vx}from"efficient-shell/format";var wx="#ffffff";function yi(e){return qf(e)||(Cx(e)?e:wx)}function qf(e){let t=Re(e);return t?Ze(t)?.page??"":""}function Cx(e){return typeof e=="string"&&vx(e)===e.toLowerCase()||qf(e)!==""}function yM(e){return{"--bg":yi(e)}}import{parseHexColor as Ox}from"efficient-shell/format";import{fillColorRole as Px}from"efficient-shell/markup";function kt(e,t,n,o){let a=o??n??t,s=n!==null&&n!==t,r=a!==null&&a!==t;return{className:[s?e.tabletClass:"",r?e.phoneClass:""].filter(Boolean).join(" "),style:{...s?{[e.tabletVar]:n}:{},...r?{[e.phoneVar]:a}:{}}}}var Si=[{label:"Even",value:"even"},{label:"From the bottom",value:"bottom"}];var RM="sf-card",IM="[--sf-card-lift:none] [--sf-card-shadow-hover:var(--sf-card-shadow,none)]",Zf={min:0,max:100,step:5,fallback:0,unit:"%"},kx="68%",LM={desktop:20,phone:20,side:40,sidePhone:24},DM="sf-box-sides";function Ax(e){return typeof e=="string"&&e.trim()!==""}function FM(e){return Ax(typeof e?.bgImage=="string"?e.bgImage:null)||Qf(e)}function Qf(e){return Eo(e,yo)!==""}function BM(e,t){return t||!Qf(e)?e:{...e,[yo]:""}}function HM(e,t){return Ds(t,Eo(e,yo))?.trim()||null}function Jf(e,t){let n=typeof e=="number"?e:Number.parseFloat(String(e??""));if(!Number.isFinite(n)||n<=0)return null;let o=(Math.min(Zf.max,Math.max(Zf.min,n))/100).toFixed(2);return t!=="bottom"?{background:xo(Number(o))}:{background:`linear-gradient(0deg, ${xo(Number(o))} 0%, ${xo(0)} ${kx})`}}var Sa=[{label:"Flat",value:"",hint:"One colour from top to bottom"},{label:"Fade",value:"down",hint:"The colour fades into the page colour at the bottom"}],em="fillFade",_i=Sa[1].value,_a=e=>e===_i?_i:Sa[0].value,Rx=[{mix:"12%",at:"50%"},{mix:"19%",at:"70%"},{mix:"50%",at:"95%"}];function MM(e){return _a(e)!==_i?null:{backgroundImage:`linear-gradient(to bottom, transparent, ${Rx.map(t=>`color-mix(in srgb, var(--bg) ${t.mix}, transparent) ${t.at}`).join(", ")})`}}var Ta=e=>typeof e=="string"?Ox(e.trim()):null,Wn=e=>{let t=Ta(e);if(t!==null||typeof e!="string")return t;let n=e.trim();return n&&!n.startsWith("#")&&Wu(n)||null},Ea=e=>{if(typeof e!="string")return null;let t=Px($e(e.trim()));return t?.kind==="slot"?t.slot:null},Ti="swatch";function $M(e,t){if(!t)return null;let n=Ds(t,Eo(e,Ti)),o=Re(n);return Ta(n)??(o&&Me(o)||null)}var Ix={tabletClass:"sf-fill-tablet",tabletVar:"--sf-fill-tablet",phoneClass:"sf-fill-phone",phoneVar:"--sf-fill-phone"};function UM(e,t,n){return kt(Ix,Wn(e),Wn(t),Wn(n))}var Nx={tabletClass:"sf-wash-tablet",tabletVar:"--sf-wash-tablet",phoneClass:"sf-wash-phone",phoneVar:"--sf-wash-phone"};function GM(e){let t=Jf(e.darken,e.darkenStyle);if(!t)return{className:"",style:{}};let n=(p,f)=>String(Jf(p,f)?.background??"none"),o=p=>(typeof p=="number"||typeof p=="string"&&p.trim()!=="")&&Number.isFinite(Number(p))?p:void 0,a=p=>Si.some(f=>f.value===p)?p:void 0,[s,r,i,l]=[o(e.darkenTablet),a(e.darkenStyleTablet),o(e.darkenPhone),a(e.darkenStylePhone)],u=s??e.darken,d=r??e.darkenStyle;return kt(Nx,String(t.background),s!==void 0||r!==void 0?n(u,d):null,i!==void 0||l!==void 0?n(i??u,l??d):null)}function zM(e,t){let n={"top-left":["start","start"],"top-center":["center","start"],"top-right":["end","start"],left:["start","center"],center:["center","center"],right:["end","center"],"bottom-left":["start","end"],"bottom-center":["center","end"],"bottom-right":["end","end"]},[o,a]=n[e]??n.center,[s,r]=t==="column"?[a,o]:[o,a];return Rc(s,r)}function tm(e,t){let n=e?.content;if(!Array.isArray(n))return null;for(let o of n){if(!o||typeof o!="object")continue;let{type:a,props:s}=o;if(s?.id===t)return null;if(Ei(o,t,0))return{type:typeof a=="string"?a:"",props:s??{}}}return null}function Ei(e,t,n){if(n>12||!e||typeof e!="object")return!1;if(Array.isArray(e))return e.some(a=>Ei(a,t,n+1));let o=e.props;return o&&typeof o=="object"&&o.id===t?!0:Object.values(e).some(a=>Ei(a,t,n+1))}function nm(e,t){let n=e?.content;return Array.isArray(n)?xa(n,t,0)??[]:[]}function xa(e,t,n){if(n>12||!e||typeof e!="object")return null;if(Array.isArray(e)){for(let a of e){let s=xa(a,t,n+1);if(s)return s}return null}let o=e.props;if(o&&typeof o=="object"){if(o.id===t)return[];for(let a of Object.values(o)){let s=xa(a,t,n+1);if(s)return[o,...s]}return null}for(let a of Object.values(e)){let s=xa(a,t,n+1);if(s)return s}return null}import{SettingsDefaultReset as oe,SettingsDrill as oP,SettingsField as K,SettingsGroup as aP,SettingsSegmented as sP,SettingsBorder as rP,SettingsSidesEach as iP,SettingsSwitch as Rl,borderSides as lP,borderStartEach as cP}from"efficient-easel/panel";import{ListField as uP}from"efficient-easel/fields";import{CodeIcon as dP}from"efficient-shell/icons/efficient";import{DisplayChips as pP}from"efficient-shell/ui";import{HIDDEN_KEY as Lx,hiddenInEveryView as Dx,hiddenInView as xi,hiddenKeyOf as om}from"efficient-easel/screen/lib/content/view-hide";import{VIEW_TIERS as Fx}from"efficient-easel/screen/lib/content/view-tiers";var Bx={"000":"",100:"view-desktop:hidden","010":"view-wide:max-view-desktop:hidden","001":"max-view-wide:hidden",110:"view-wide:hidden","011":"max-view-desktop:hidden",101:"view-desktop:hidden max-view-wide:hidden",111:"hidden"},Hx={"000":"",100:"view-desktop:hidden","010":"view-tablet:max-view-desktop:hidden","001":"max-view-tablet:hidden",110:"view-tablet:hidden","011":"max-view-desktop:hidden",101:"view-desktop:hidden max-view-tablet:hidden",111:"hidden"},am=e=>(e.desktop?"1":"0")+(e.tablet?"1":"0")+(e.mobile?"1":"0");function sm(e,{atSectionLine:t=!1}={}){return(t?Hx:Bx)[am(e)]}var YM=[Lx,om("tablet"),om("mobile")];function rm(e){return{desktop:xi(e,"desktop"),tablet:xi(e,"tablet"),mobile:xi(e,"mobile")}}function XM(e){return Dx(e)}function qM(e){let t=rm(e);return Fx.filter(n=>t[n]).join(" ")}var Mx={"000":"",100:"view-desktop:hidden!","010":"view-wide:max-view-desktop:hidden!","001":"max-view-wide:hidden!",110:"view-wide:hidden!","011":"max-view-desktop:hidden!",101:"view-desktop:hidden! max-view-wide:hidden!",111:"hidden!"},$x={"000":"",100:"view-desktop:hidden!","010":"view-tablet:max-view-desktop:hidden!","001":"max-view-tablet:hidden!",110:"view-tablet:hidden!","011":"max-view-desktop:hidden!",101:"view-desktop:hidden! max-view-tablet:hidden!",111:"hidden!"};function ZM(e,{atSectionLine:t=!1}={}){return(t?$x:Mx)[am(rm(e))]}function ln(e){if(!e||typeof e!="object"||Array.isArray(e))return{};let t={};for(let[n,o]of Object.entries(e))typeof o=="boolean"&&(t[n]=o);return t}function va(e,t){return ln(e)[t]!==!1}function vi(e,t,n){let o=ln(t)[n];return typeof o=="boolean"?o:va(e,n)}function im(e){return Object.values(ln(e)).some(t=>t===!1)}function lm(e){return Object.keys(ln(e)).length>0}function cm(e,t,n){let o={...ln(e)};return n?delete o[t]:o[t]=!1,Object.keys(o).length?o:void 0}function um(e,t,n){return{...ln(e),[t]:n}}function e$(e,t,n,{atSectionLine:o=!0}={}){let a=!va(e,n);return sm({desktop:a,tablet:a,mobile:!vi(e,t,n)},{atSectionLine:o})}import{ColorSwatch as fP,CornersInput as mP,DatePicker as jW,DateTimePicker as hP,FOCAL_DEFAULT as VW,IconPicker as cg,COLUMN_COUNT_MAX as Gh,COLUMN_SHARE_MIN as gP,COLUMN_SHARES_EQUAL as bP,resolveColumnShares as ug,WidthsBar as yP,useShellStrings as SP,IconButton as dg,InputNumber as zh,Slider as _P,Textarea as TP,Tooltip as Il}from"efficient-shell/ui";async function dm(e){let t=e.trim();if(!t)return null;let n=xe().geocode;if(!n)throw new Error("geocode_unavailable");return n.locate(t)}var wi="Lookup busy \u2014 try again in a moment.",wa=e=>typeof e=="number"&&Number.isFinite(e);function Ca(e){return e.some(t=>{let n=t?.geocode;return n?n.pending||n.manual&&n.lat===void 0&&n.lng===void 0?!0:wa(n.lat)&&n.lat!==t.lat||wa(n.lng)&&n.lng!==t.lng:!1})}async function pm(e,t,{geocode:n=dm,courtesyGapMs:o=1100}={}){let a=r=>new Promise(i=>setTimeout(i,r)),s=e.slice();if(e.some(r=>r?.geocode?.pending)){let r=[],i=!1;for(let l of e){if(!l?.geocode?.pending){r.push(l);continue}i&&o>0&&await a(o),i=!0;try{let u=await n(t(l));r.push(u?{...l,lat:u.lat,lng:u.lng,geocode:{...l.geocode,pending:!1,ok:!0,status:`Found \u2014 ${u.label.split(",").slice(0,3).join(",").trim()}`,lat:u.lat,lng:u.lng}}:{...l,geocode:{...l.geocode,pending:!1,ok:!1,status:"No match \u2014 check the address and try again."}})}catch{r.push({...l,geocode:{...l.geocode,pending:!1,ok:!1,status:wi}})}}s=r}return s.map(r=>{let i=r?.geocode;if(!i)return r;if(i.manual&&i.lat===void 0&&i.lng===void 0)return{...r,geocode:{...i,lat:r.lat,lng:r.lng}};let l=wa(i.lat)&&i.lat!==r.lat?i.lat:r.lat,u=wa(i.lng)&&i.lng!==r.lng?i.lng:r.lng;return l!==r.lat||u!==r.lng?{...r,lat:l,lng:u}:r})}import{keptByRow as Ol}from"efficient-easel/screen/lib/document/style-fields";import{jsx as Ux}from"react/jsx-runtime";import{useEffect as Gx,useState as zx}from"react";import{clearRangeOf as Wx,markSelection as Kx,useCaretEdit as jx}from"efficient-easel/copy";import{TextToolbar as Vx}from"efficient-shell/ui";function Yx(e,t,n){return Kx(e,t,n,Cc)}function fm(e,t){let n=Wx(t,e.length),o=Pc(e,n.start,n.end);return o.text===e?null:o}function Xx(e){let[t,n]=zx(null);return Gx(()=>{let o=e.current?.ownerDocument??(typeof document>"u"?null:document);if(!o)return;let a=()=>{let s=e.current;if(!s||o.activeElement!==s)return;let r=s.selectionStart??s.value.length,i=s.selectionEnd??r;n(l=>l&&l.start===r&&l.end===i?l:{start:r,end:i})};return o.addEventListener("selectionchange",a),()=>o.removeEventListener("selectionchange",a)},[e]),[t,n]}function qx({target:e,value:t,onChange:n,disabled:o=!1,label:a="Formatting"}){let s=jx({target:e,onChange:n}),[r,i]=Xx(e),l=f=>s(m=>{let b=Yx(t,f,m);return i({start:b.selectionStart,end:b.selectionEnd}),b}),u=wc(),d={};if(r)for(let f of u)d[f.style]=Oc(t,r.start,r.end,f.style);let p=o?null:fm(t,r);return Ux(Vx,{offered:new Set(u.map(f=>f.style)),onMark:f=>l(f),pressed:d,disabled:o,"aria-label":c(a),className:"sf-markup-bar",clear:p?{onClear:()=>s(()=>{let f=e.current,m=f&&f.ownerDocument.activeElement===f?{start:f.selectionStart??0,end:f.selectionEnd??0}:null,b=fm(t,m)??{text:t,selectionStart:m?.start??0,selectionEnd:m?.end??0};return i({start:b.selectionStart,end:b.selectionEnd}),b})}:void 0})}var Ci=qx;import{deviceField as ee}from"efficient-easel/screen/lib/document/device-fields";import{NO_CONTROL_FIELD as EP,NoControlMark as xP,noControlField as pg}from"efficient-easel/screen/lib/document/panel-no-control-mark";function Oa(e,t,n){return typeof e=="number"?e:typeof t=="number"?t:n}var Pa=void 0;import{phoneKey as it,tabletKey as Nl,viewKeyAt as Ll}from"efficient-easel/draw";import{jsx as ka,Fragment as Zx,jsxs as Jx}from"react/jsx-runtime";import{useRef as Qx}from"react";import{SettingsDefaultReset as ev}from"efficient-easel/panel";import{effectTiles as tv}from"efficient-easel/screen/lib/document/effect-tiles";import{VIEW_KEY_ACCESS as mm,describedAs as nv,onDesktopWords as ov,phoneTwinFields as hm}from"efficient-easel/screen/lib/document/box-fields";function av({row:e,read:t,...n}){let o=t(Z(),n.followsView??"desktop");return e({...n,follows:o})}function ze(e,t){return Object.fromEntries(yu.map(n=>{let o=$(e,n);return[o,hm(e,t(n),mm)[o]]}))}function E$(e,t,n){let o=t.render,a={...t,render:s=>ka(av,{...s,row:o,read:n})};return ze(e,s=>s==="desktop"?t:a)}function sv({spec:e,...t}){let n=e.values.includes(t.value),o="follows"in t,a=e.read(Z(),t.followsView??"desktop"),s=n?t.value:a,r=Qx(null),{preview:i}=e,l=tv({label:c(e.label),options:e.values.map(d=>({value:d,label:c(e.word(d)),picture:e.picture(d)})),fallback:e.fallback,onPreview:i?d=>r.current&&i(r.current,d):void 0}).render,u=l({value:s,onChange:d=>t.onChange(d??e.fallback)});return Jx(Zx,{children:[i?ka("div",{ref:r,style:{display:"contents"},children:u}):u,o&&n&&ka(ev,{words:P()?.panel,label:c(e.tileWord),changed:!0,detail:ov(d=>c(d),c(e.word(a)),t.followsView),onReset:()=>t.onChange(void 0)})]})}function x$(e,t){let n=nv({type:"custom",render:o=>ka(sv,{...o,spec:t})},{type:"select",label:t.label,options:t.values.map(o=>({value:o,label:t.word(o)}))});return hm(e,n,mm)}import{jsx as Oi,Fragment as rv}from"react/jsx-runtime";import{createContext as iv,useContext as lv}from"react";import{NoControlMark as cv}from"efficient-easel/screen/lib/document/panel-no-control-mark";var gm=iv(!1);function k$({children:e}){return Oi(gm.Provider,{value:!0,children:e})}function uv(){return lv(gm)}function bm({name:e,children:t}){return!uv()||!e||!dv(e)||An(e)?Oi(rv,{children:t}):Oi(cv,{})}function dv(e){return/^[A-Za-z0-9_$]+$/u.test(e)}import{parseOption as pv}from"efficient-shell/format";var Pi="off",Sm="none",ki=[{label:"None",value:"off"},{label:"1, 2, 3",value:"plain"},{label:"01, 02, 03",value:"padded"},{label:"N\xB001, N\xB002",value:"numero"}],_m=[{label:"None",value:"none"},{label:"Hairline",value:"hairline"}];function I$(e){return pv(ki,Pi,e)}var ym="sf-card-index",Kn="sf-card-index",N$="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",fv={plain:`counter(${Kn})`,padded:`counter(${Kn}, decimal-leading-zero)`,numero:`"N\xB0" counter(${Kn}, decimal-leading-zero)`};function L$(e,t){return t==="off"?"":`.${e}{counter-reset:${Kn}}.${e} .${ym}{counter-increment:${Kn}}.${e} .${ym}::before{content:${fv[t]}}`}function D$(e){return e==="hairline"?"border border-line hover:border-accent":""}var Tm=[{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 vP}from"efficient-easel/draw";import{jsx as ue}from"react/jsx-runtime";import{SettingsDefaultReset as Tv,SettingsField as Ai}from"efficient-easel/panel";import{useSelectedHost as Ev}from"efficient-easel/easel";import{FOCAL_DEFAULT as xv}from"efficient-shell/format";import{ImageIcon as Ri,PlayIcon as Em}from"efficient-easel/icons";import{ImageFocusPoint as vv,MediaUploadField as wv}from"efficient-shell/ui";import{useContext as Cv}from"react";import{ScreenDocumentContext as Ov}from"efficient-easel/screen/components/ScreenDocumentContext";import{tabletKey as Pv,viewKeyAt as kv}from"efficient-easel/draw";import{usePreviewDevice as Av}from"efficient-easel/draw/client";import{formatFocal as mv,parseFocal as hv}from"efficient-shell/format";var gv="sf-focus-phone",bv="--sf-focus-phone",yv="sf-focus-tablet",Sv="--sf-focus-tablet",jn=e=>{if(typeof e!="string"||!/^\s*-?\d+(\.\d+)?%\s+-?\d+(\.\d+)?%\s*$/.test(e))return null;let{x:t,y:n}=hv(e);return mv(t,n)};function $$(e,t){return kt(_v,null,jn(t),jn(e))}var _v={tabletClass:yv,tabletVar:Sv,phoneClass:gv,phoneVar:bv};import{shownTier as Ii}from"efficient-easel/screen/lib/document/device-fields";import{onDesktopWords as Rv}from"efficient-easel/screen/lib/document/box-fields";import{requestMediaPick as Iv}from"efficient-easel/screen/lib/media-picker";import{useEaselHost as Nv}from"efficient-easel/screen/lib/host";import{useEaselSession as Lv}from"efficient-easel/screen/lib/session-context";function Dv(e,t,n,o=!0){let a=Ii(n),s=typeof e[t]=="string"&&e[t]?String(e[t]):xv;if(a==="desktop")return{ownView:!1,followed:s,followsView:"desktop",own:void 0,focus:s,key:t};let r=kv(t,a),i=jn(e[r])??void 0,l=a==="mobile"&&o?jn(e[Pv(t)])??void 0:void 0,u=l??s;return{ownView:!0,followed:u,followsView:l?"tablet":"desktop",own:i,focus:i??u,key:r}}function Fv(e,t,n){let o=Ev();if(!t||!o)return null;let a=o.values??{};if(n&&!n(a,Ii(e)))return null;let s=Dv(a,t,e,n?n(a,"tablet"):!0),r=o.onChange;return{...s,set:i=>r(s.key,i),clear:()=>r(s.key,Pa)}}function xm({value:e,onChange:t,label:n,accept:o,placeholder:a,focusKey:s,focusWhen:r,frameKey:i,fieldKey:l}){let u=Nv(),d=Lv(),p=c(n),f=Av(),m=o.startsWith("video"),b=Fv(f,m?void 0:s,r),y=!!s&&Ii(f)!=="desktop",T=Cv(Ov),S=cn(),E=i&&l?{video:l,frame:i}:null,x=C=>Iv(u,{accept:o,title:p,...C?{file:C}:{}}).then(D=>!D||!E?D?.url??null:(S({[E.video]:D.url,[E.frame]:D.posterUrl??""}),null)),v=E?C=>C?t(C):S({[E.video]:"",[E.frame]:""}):t,w=re(e);if(y&&(!b||!w))return null;if(T&&!T.capabilities.mediaEditing)return ue(Ai,{label:p,icon:m?ue(Em,{}):ue(Ri,{}),children:ue("div",{className:"sf-image-slot-inert",children:m?c("Templates don\u2019t store videos \u2014 this slot stays a placeholder. Each website picks its own after it\u2019s created."):c("Templates don\u2019t store images \u2014 this slot stays a placeholder. Each website picks its own after it\u2019s created.")})});let I=b?.ownView&&w?ue(Tv,{words:P()?.panel,label:c("Image focus"),changed:!!b.own,detail:Rv(C=>c(C),b.followed,b.followsView),onReset:b.clear}):void 0;return y&&b?ue(Ai,{label:p,icon:ue(Ri,{}),action:I,children:ue("div",{style:{flex:"1 1 auto",minWidth:0},children:ue(vv,{value:b.focus,onChange:b.set,label:c("Image focus"),image:w,hint:null})})}):ue(Ai,{label:p,icon:m?ue(Em,{}):ue(Ri,{}),children:ue("div",{style:{flex:"1 1 auto",minWidth:0},children:ue(wv,{value:w,onChange:v,onPick:x,accept:m?"video/*":"image/*",kind:m?"video":"image",placeholder:a===void 0?void 0:c(a),maxSizeBytes:xe(d).media.maxUploadBytes,...b?{focus:b.focus,onFocusChange:b.set}:{}})})})}import{jsx as vm}from"react/jsx-runtime";import{useId as Bv}from"react";import{FieldSelect as Hv}from"efficient-easel/fields";import{SettingsField as Mv}from"efficient-easel/panel";function $v(e){return e.map(({value:t,label:n,note:o})=>({value:t,label:n,...o?{meta:o}:{}}))}function wm({label:e,options:t,value:n,onChange:o,emptyLabel:a,icon:s,hint:r}){let i=Bv(),l=`${i}-label`,u=`${i}-button`,d=Array.isArray(n)?n:[];return vm(Mv,{label:c(e),labelId:l,icon:s,hint:r,children:vm(Hv,{id:u,multiple:!0,value:d,options:$v(t),onChange:o,placeholder:a===void 0?c("None"):c(a),ariaLabelledBy:`${l} ${u}`,inline:!0})})}import{jsx as Cm}from"react/jsx-runtime";import{useId as Uv}from"react";import{FieldSelect as Gv}from"efficient-easel/fields";import{SettingsField as zv}from"efficient-easel/panel";function Wv(e){return e.map(({value:t,label:n,group:o,thumb:a,meta:s})=>({value:t,label:n,...o!==void 0?{group:o}:{},...a!==void 0?{thumb:a}:{},...s!==void 0?{meta:s}:{}}))}function TU({label:e,options:t,fallback:n,value:o,onChange:a,placeholder:s,bare:r=!1,icon:i}){let l=Uv(),u=`${l}-label`,d=`${l}-button`,p=o??"",f=t.some(T=>T.value===p)?p:n,m=c(e),b=s===void 0?void 0:c(s),y=Cm(Gv,{id:d,value:f,options:Wv(t),onChange:a,placeholder:b,searchPlaceholder:b,...r?{ariaLabel:m}:{ariaLabelledBy:`${u} ${d}`},searchable:!0,groupCount:!0,inline:!0});return r?y:Cm(zv,{label:m,labelId:u,icon:i,children:y})}import{jsx as Rt,jsxs as ww}from"react/jsx-runtime";import{SettingsField as Ym}from"efficient-easel/panel";import{LinkIcon as Cw}from"efficient-easel/icons";import{LinkPicker as Ow,TextLinkField as Pw}from"efficient-shell/ui";import{useEffect as Vm,useMemo as Na,useRef as kw,useState as Ia}from"react";import{currentEaselSession as Kv}from"efficient-easel/screen/lib/session";function Om(){return Kv().auth.token}import{currentEaselSession as Aw}from"efficient-easel/screen/lib/session";import{useScreenDocument as Rw}from"efficient-easel/screen/components/ScreenDocumentContext";var jv=()=>({choosePage:c("Choose a page"),chooseSection:c("Choose a section"),noSections:c("No section anchors yet"),sectionHint:c("Jumps to a section on that page."),choosePost:c("Choose a post"),chooseProduct:c("Choose a product"),choosePopup:c("Choose a popup")});function Pm(e,t,n){if(!e)return"page";if(Uf(e))return"popup";if(e.startsWith("/journal/"))return"blog";if(Wf(e))return"product";if(e.includes("#")){let o=e.slice(0,e.indexOf("#"));if(o===""||o==="/"||t.includes(o))return"anchor"}return e==="/"||t.includes(e)||n&&n.listingPaths.includes(n.targetOf(e))?"page":"custom"}function Ni(e,t){let n=jv(),o=e.pages.map(d=>({value:zn(d.slug),label:d.title})),a=t?.pageOptions?t.pageOptions(o):o,s=a.map(d=>d.value),r=e.pages.map(d=>({label:d.title,options:zf(...d.docs).map(p=>({value:ga(d.slug,p.slug),label:p.name}))})).filter(d=>d.options.length>0),i=d=>{switch(d){case"page":return{type:"select",options:a,placeholder:n.choosePage};case"anchor":return{type:"groups",groups:r,placeholder:r.length?n.chooseSection:n.noSections};case"blog":return{type:"select",options:e.posts.map(p=>({value:Gf(p.slug),label:p.title||p.slug})),placeholder:n.choosePost};case"product":return{type:"select",options:e.products.map(p=>({value:p.href,label:p.name||p.href})),placeholder:n.chooseProduct};case"popup":return{type:"select",options:(e.popups??[]).map(p=>({value:$f(p.slug),label:p.title||p.slug})),placeholder:n.choosePopup};case"custom":return{type:"text"}}},l=Mf(e.offers).map(d=>({value:d.value,label:c(d.label),target:i(d.value),...d.value==="anchor"?{hint:n.sectionHint}:{},...d.value==="blog"||d.value==="product"||d.value==="popup"?{hideWhenEmpty:!0}:{}}));if(!t)return{kinds:l,rules:{kindOf:d=>Pm(d,s),targetOf:d=>d,readFilter:()=>null,withFilter:d=>d}};let u=d=>{let p=t.withFilter(d,null);return t.listingPaths.includes(p)?p:d};return{kinds:l,rules:{kindOf:d=>Pm(d,s,{listingPaths:t.listingPaths,targetOf:u}),targetOf:u,readFilter:t.readFilter,withFilter:t.withFilter},filtersFor:d=>t.listingPaths.includes(d)?t.filtersFor(d):null}}import{useEaselSession as Iw}from"efficient-easel/screen/lib/session-context";function J(e,t){if(typeof e=="string")return e||t;if(e&&typeof e=="object"&&"text"in e){let n=e.text;return W(n)??t}return t}function km(e,t){return O(e)??t}function We(e,t){return typeof e=="boolean"?e:t}function Aa(e,t){if(!Array.isArray(e))return t;let n=e.map(o=>typeof o=="string"?o:J(o?.text,"")).map(o=>o.trim()).filter(Boolean);return n.length?n:t}var Rm=["delay","scroll","exit"],Im=["all","chosen","except"],Nm=["visit","days","never","once"],Vv=["all","desktop","phone"],Yv=["stop","continue"],Lm={min:0,max:60},Dm={min:10,max:90},Fm={min:1,max:90},Ce={autoOpen:!1,trigger:"delay",autoOpenDelaySec:15,scrollPercent:50,showOn:"all",showOnPages:[],devices:"all",hideAfter:"days",hideDays:7,afterSubmit:"stop",startDate:null,endDate:null};function pe(e,t,n){return typeof t=="string"&&e.includes(t)?t:n}function un(e,t,n){let o=km(e,n);return Math.min(t.max,Math.max(t.min,Math.round(o)))}function Xv(e){return typeof e.hideAfter=="string"?pe(Nm,e.hideAfter,Ce.hideAfter):e.oncePerSession===!0?"visit":e.oncePerSession===!1?"never":Ce.hideAfter}function qv(e){return Array.isArray(e)?e.map(t=>typeof t=="string"?t.trim():"").filter(Boolean).map(t=>t.startsWith("/")?t:`/${t}`):[]}function Am(e){if(typeof e!="string")return null;let t=e.trim();return/^\d{4}-\d{2}-\d{2}$/.test(t)?t:null}function Bm(e){let t=e??{},n=Ce;return{autoOpen:We(t.autoOpen,n.autoOpen),trigger:pe(Rm,t.trigger,n.trigger),autoOpenDelaySec:un(t.autoOpenDelaySec,Lm,n.autoOpenDelaySec),scrollPercent:un(t.scrollPercent,Dm,n.scrollPercent),showOn:pe(Im,t.showOn,n.showOn),showOnPages:qv(t.showOnPages),devices:pe(Vv,t.devices,n.devices),hideAfter:Xv(t),hideDays:un(t.hideDays,Fm,n.hideDays),afterSubmit:pe(Yv,t.afterSubmit,n.afterSubmit),startDate:Am(t.startDate),endDate:Am(t.endDate)}}import{parseHexColor as Zv}from"efficient-shell/format";var Hm="#000000";var Li="popup",Jv=mu,Qv=["auto","full"],ew=["inside","outside","none"],tw={min:240,max:1440},nw={min:0,max:100},Vn={placement:"center",fullWidth:!1,width:720,height:"auto",tintColor:Hm,tintOpacity:60,outsideClick:!0,closeButton:"inside"};function ow(e,t){let n=typeof e=="string"?e.trim():"";return n&&Zv(n)===n.toLowerCase()?n:t}function Di(e,t=Vn){let n=e??{},o=t;return{placement:pe(Jv,n.placement,o.placement),fullWidth:We(n.fullWidth,o.fullWidth),width:un(n.width,tw,o.width),height:pe(Qv,n.height,o.height),tintColor:ow(n.tintColor,o.tintColor),tintOpacity:un(n.tintOpacity,nw,o.tintOpacity),outsideClick:We(n.outsideClick,o.outsideClick),closeButton:pe(ew,n.closeButton,o.closeButton)}}var Mm="cart-drawer",zU="cart-drawer",aw={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 WU(e,t){return t===0?e.subtitleEmpty:t===1?e.subtitleOne:e.subtitleMany.replace("{count}",String(t))}function KU(e){let t=e??{},n=aw;return{kickerBadge:J(t.kickerBadge,n.kickerBadge),kickerText:J(t.kickerText,n.kickerText),titleLead:J(t.titleLead,n.titleLead),titleAccent:J(t.titleAccent,n.titleAccent),subtitleEmpty:J(t.subtitleEmpty,n.subtitleEmpty),subtitleOne:J(t.subtitleOne,n.subtitleOne),subtitleMany:J(t.subtitleMany,n.subtitleMany),leadTimeValue:J(t.leadTimeValue,n.leadTimeValue),shipsToFallback:J(t.shipsToFallback,n.shipsToFallback),promises:Aa(t.promises,n.promises),emptyKicker:J(t.emptyKicker,n.emptyKicker),emptyBody:J(t.emptyBody,n.emptyBody)}}var sw=["right","left"],rw={...Vn,width:520,tintOpacity:68};function jU(e){let t=e??{};return{...Di(t,rw),placement:pe(sw,t.placement,"right"),height:"full",fullWidth:!1,autoOpen:We(t.autoOpen,!0)}}var Um="consent-banner",qU="consent-banner";var iw=[{value:"bar",label:"Bar"},{value:"card",label:"Card"}],ZU="Layout",$m={layout:"bar"},lw=e=>iw.some(t=>t.value===e);function JU(e){let t=J((e??{}).layout,$m.layout);return{layout:lw(t)?t:$m.layout}}var QU={...Vn,placement:"bottom-center",fullWidth:!0,width:440,tintOpacity:0,outsideClick:!1,closeButton:"none"};var cw="consentWords",uw=["eyebrow","notice","accept","reject","choose"];function dw(e){let t=(e??{})[cw];return typeof t=="string"&&uw.includes(t)?t:null}function pw(e){let t=e?.props;return t?dw(t)!==null?!0:Object.values(t).some(n=>Array.isArray(n)&&n.some(o=>o&&typeof o=="object"&&"props"in o&&pw(o))):!1}var fw=["meta","eyebrow","heading","body","statName","statValue","formEyebrow","formHeading","formIntro","fieldLabel","option","finePrint","dismiss","doneHeading","doneBody"],nG={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"},mw={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"},oG={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 Gm(e){let t={};for(let n of fw){let o=dt(e[mw[n]]);o&&(t[n]=o)}return t}var rG={heading:"Join our email list",placeholder:"Email address",buttonLabel:"Subscribe"},hw={lead:"We accept"},iG={...hw,methods:[],size:"sm",align:"start",dataSource:mc},Bi="site-footer";var Hi=Bi,lG={desktop:!0,tablet:!0,mobile:!0},cG={desktop:!1,tablet:!1,mobile:!1},Fi=1,zm=6,uG=Array.from({length:zm-Fi+1},(e,t)=>Fi+t),Ra={desktop:6,tablet:3,mobile:2},gw={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}},At=e=>Math.min(Math.max(Math.round(e),Fi),zm);function dG(e){if(typeof e=="number")return gw[At(e)]??{desktop:At(e),tablet:At(e),mobile:At(e)};if(e&&typeof e=="object"){let t=e;return{desktop:At(t.desktop??Ra.desktop),tablet:At(t.tablet??Ra.tablet),mobile:At(t.mobile??Ra.mobile)}}return{...Ra}}var Mi="subscribe-popup",SG="subscribe-popup",bw=[Mi,Bi,Mm,Um];function Km(e){return bw.includes(e)}var yw=["right","left"],Sw={metaLabel:"Meta label",issueLabel:"Label",issueNumber:"00",kicker:"Kicker",heading:`Main heading
|
|
8
|
-
*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:Ce.autoOpen,autoOpenDelaySec:Ce.autoOpenDelaySec,formSlug:"",trigger:Ce.trigger,scrollPercent:Ce.scrollPercent,showOn:Ce.showOn,showOnPages:[],hideAfter:Ce.hideAfter,hideDays:Ce.hideDays,formSide:"right",valuePanelOnPhone:!1,sectionAccent:void 0,sectionCorners:void 0,sectionCornerSides:void 0,textStyles:{}},G=J,_w=We,jm=Aa;function Wm(e,t){if(e==null)return t;let n=o=>o.trim()?o:"";if(typeof e=="string")return n(e);if(typeof e=="object"&&"text"in e){let o=e.text;return typeof o=="string"?n(o):""}return t}function Tw(e,t){return Array.isArray(e)?jm(e,[]):t}function Ew(e,t){return Array.isArray(e)?e.map(n=>{let o=n??{};return{label:G(o.label,""),value:G(o.value,"")}}).filter(n=>n.label||n.value):t}function TG(e){let t=e??{},n=Sw,o=Bm(t);return{metaLabel:G(t.metaLabel,n.metaLabel),issueLabel:Wm(t.issueLabel,n.issueLabel),issueNumber:Wm(t.issueNumber,n.issueNumber),kicker:G(t.kicker,n.kicker),heading:G(t.heading,n.heading),deck:G(t.deck,n.deck),stats:Ew(t.stats,n.stats),formLabel:G(t.formLabel,n.formLabel),formHeading:G(t.formHeading,n.formHeading),formIntro:G(t.formIntro,n.formIntro),firstNameLabel:G(t.firstNameLabel,n.firstNameLabel),firstNamePlaceholder:G(t.firstNamePlaceholder,n.firstNamePlaceholder),emailLabel:G(t.emailLabel,n.emailLabel),emailPlaceholder:G(t.emailPlaceholder,n.emailPlaceholder),interestsLabel:G(t.interestsLabel,n.interestsLabel),interests:jm(t.interests,n.interests),frequencyLabel:G(t.frequencyLabel,n.frequencyLabel),frequencies:Tw(t.frequencies,n.frequencies),submitText:G(t.submitText,n.submitText),finePrint:G(t.finePrint,n.finePrint),dismissText:G(t.dismissText,n.dismissText),emailInvalidText:G(t.emailInvalidText,n.emailInvalidText),submitErrorText:G(t.submitErrorText,n.submitErrorText),successHeading:G(t.successHeading,n.successHeading),successBody:G(t.successBody,n.successBody),keepBrowsingText:G(t.keepBrowsingText,n.keepBrowsingText),formSlug:typeof t.formSlug=="string"?t.formSlug.trim():n.formSlug,autoOpen:o.autoOpen,autoOpenDelaySec:o.autoOpenDelaySec,trigger:o.trigger,scrollPercent:o.scrollPercent,showOn:o.showOn,showOnPages:o.showOnPages,hideAfter:o.hideAfter,hideDays:o.hideDays,formSide:pe(yw,t.formSide,n.formSide),valuePanelOnPhone:_w(t.valuePanelOnPhone,n.valuePanelOnPhone),sectionAccent:t.sectionAccent,sectionCorners:t.sectionCorners,sectionCornerSides:t.sectionCornerSides,textStyles:Gm(t)}}function xw(e,t=Math.random){for(;;){let n=`popup-${Math.floor(t()*2176782336).toString(36).padStart(6,"0")}`;if(!e.has(n))return n}}function vw(e){return{root:{props:{title:e,kind:Li}},content:[],zones:{}}}function wG(e,t,n){return{slug:xw(t,n),title:e,kind:ii,layout:vw(e)}}function $i(e){return e?.root?.props?.kind===Li}function Xm(e){let t=new Map;return(n="")=>{let o=Om(),a=t.get(n);if(!a||a.token===null&&o!==null){let s=o||!Aw().usesBridgedToken?e(o??"",n).catch(()=>[]):Promise.resolve([]);return t.set(n,{promise:s,token:o}),s}return a.promise}}var Nw=Xm(async(e,t)=>{let n=t?{siteId:t}:void 0,{pages:o}=xe();return o.linkTargets?o.linkTargets(n):(await o.list(n)).map(a=>({id:a.id,slug:a.slug,label:a.label,layout:null}))}),Lw=Xm(async(e,t)=>await xe().blog?.posts(t?{siteId:t}:void 0)??[]);function Dw({value:e,onChange:t,label:n="Link",data:o,filters:a}){let s=Na(()=>Ni(o,a),[o,a]),r=c(n);return Rt(Ym,{label:r,icon:Rt(Cw,{}),children:Rt(Ow,{value:e,onChange:i=>t(i),kinds:s.kinds,rules:s.rules,filtersFor:s.filtersFor,label:r})})}function qm(){let{siteId:e,capabilities:t}=Rw(),{offersCommerce:n,hasBlog:o}=t,[a,s]=Ia([]),[r,i]=Ia([]),[l,u]=Ia([]),[d,p]=Ia(null),f=Iw().chrome,m=f?.products?.list,b=f?.linkFilters,y=b?void 0:f?.linkRow,T=kw(!0);Vm(()=>(T.current=!0,()=>{T.current=!1}),[]),Vm(()=>{let x=!0;return Nw(e??void 0).then(v=>x&&T.current&&s(v)),o&&Lw(e??void 0).then(v=>x&&T.current&&i(v)),n&&m?.().then(v=>x&&T.current&&u(v)),n&&b?b.load(e).catch(()=>null).then(v=>x&&T.current&&p(()=>v)):p(null),()=>{x=!1}},[e,n,o,m,b]);let S=Na(()=>({pages:a.filter(x=>!Km(x.slug)&&!$i(x.layout)).map(x=>({slug:x.slug,title:x.label,docs:[x.layout]})),popups:a.filter(x=>x.slug===Mi||$i(x.layout)).map(x=>({slug:x.slug,title:x.label})),posts:o?r.map(x=>({slug:x.slug,title:x.title})):[],products:n?l.map(x=>({href:x.href,name:x.name})):[],offers:{offersCommerce:n,offersService:o}}),[a,r,l,n,o]),E=Na(()=>d?d(S.pages):null,[d,S]);return{data:S,filters:E,pages:a,offersCommerce:n,HostLinkRow:y}}function GG({label:e,icon:t,text:n,onTextChange:o,link:a,onLinkChange:s}){let{data:r,filters:i}=qm(),l=Na(()=>Ni(r,i),[r,i]),u=c(e);return Rt(Ym,{label:u,icon:t,children:Rt(Pw,{label:u,text:n,onTextChange:o,link:a,onLinkChange:d=>s(d),kinds:l.kinds,rules:l.rules,filtersFor:l.filtersFor})})}function Zm({value:e,onChange:t,label:n="Link"}){let o=typeof e=="string"?e:"",{data:a,filters:s,pages:r,offersCommerce:i,HostLinkRow:l}=qm(),u=a.pages.map(p=>zn(p.slug)),d=i&&l&&(o==="/"||u.includes(o))?l:void 0;return ww("div",{children:[Rt(Dw,{value:o,onChange:t,label:n,data:a,filters:s}),d&&Rt(d,{value:o,onChange:t,pages:r})]})}import{UiIcon as Wh}from"efficient-easel/draw/client";import{VIEW_TIERS as Fa,phoneKey as Jm,resolveViewValue as Fw,tabletKey as Qm,viewKeyAt as H}from"efficient-easel/draw";import{SECTION_PAD_UNIT_KEY as oh,SITE_SIDE as Bw,VIEW_ABOVE as Hw,convertLength as ah,isLengthUnit as Mw,isSiteSide as sh,sideLengthAt as $w,sideValueAt as Uw,withLength as Ba}from"efficient-easel/screen/lib/content/length-units";var fe={min:10,max:200,step:10};function Gw(e,t,n,o=0){let a=O(e),s=O(t);if(a===void 0&&s===void 0)return;let r=It(n),i=l=>l===void 0?void 0:r==="px"?l:Ba(l,r,o);return{paddingTop:i(a),paddingBottom:i(s)}}var It=e=>F(e),Ui=(e,t)=>typeof e=="object"?e[t]:e??0,zw=e=>typeof e=="object"&&e!==null&&"top"in e,Yn=(e,t,n)=>zw(e)?Ui(e[t],n):Ui(e,n),Ww={top:"top",bottom:"bottom"};function Kw(e,t,n,o){let a=O(e),s=O(t);if(a===void 0&&s===void 0)return;let r=It(n),i=(l,u)=>l===void 0?void 0:r==="px"?l:Ba(l,r,u);return{paddingTop:i(a,o("top","desktop")),paddingBottom:i(s,o("bottom","desktop"))}}var jw="sf-pad-top-phone",Vw="sf-pad-bottom-phone",Yw="--sf-pad-t-phone",Xw="--sf-pad-b-phone",qw="sf-pad-left-phone",Zw="sf-pad-right-phone",Jw="--sf-pad-l-phone",Qw="--sf-pad-r-phone",eC="sf-pad-top-tablet",tC="sf-pad-bottom-tablet",nC="sf-pad-left-tablet",oC="sf-pad-right-tablet",aC="--sf-pad-t-tablet",sC="--sf-pad-b-tablet",rC="--sf-pad-l-tablet",iC="--sf-pad-r-tablet",Ki="sf-section-pad";function ji(e){let t={desktop:e.unit,tablet:e.unitTablet,phone:e.unitPhone},n=e.totals?.length||typeof e.frame=="object"?(s,r)=>e.totals?.includes(H(s,r))?0:Yn(e.frame,s,r):e.frame,o=typeof n=="function"?Kw(e.top,e.bottom,e.unit,n):Gw(e.top,e.bottom,e.unit,n),a=Vi({left:e.left,right:e.right},{top:e.topPhone,bottom:e.bottomPhone,left:e.leftPhone,right:e.rightPhone},{top:e.topTablet,bottom:e.bottomTablet,left:e.leftTablet,right:e.rightTablet},{top:e.top,bottom:e.bottom,left:e.left,right:e.right},t,n,e.sideSpace);return o===void 0&&!a.classes.length&&!Object.keys(a.style).length?null:{className:[Ki,...a.classes].join(" "),style:{...o,...a.style}}}var lC=e=>sh(e)?e:O(e),cC=[["top","paddingTop",[eC,aC],[jw,Yw]],["bottom","paddingBottom",[tC,sC],[Vw,Xw]],["left","paddingLeft",[nC,rC],[qw,Jw]],["right","paddingRight",[oC,iC],[Zw,Qw]]];function Gi(e,t,n){return!Mw(t)||t==="px"?e:ah(e,"px",t,n,{min:0,max:fe.max,step:1})}var rh=e=>{let t=Hw[e];return t?[e,...rh(t)]:[e]},La=Object.fromEntries(Fa.map(e=>[e,rh(e)]));function uC(e,t,n,o={},a=0){let s={desktop:!0,tablet:t!==void 0,mobile:n!==void 0},r=(b,y,T)=>{if(y==="px")return`${b}px`;let S=La[T].find(x=>s[x])??"desktop",E=Ba(b,y,Ui(a,S));return typeof E=="number"?`${E}px`:E},i={n:e,[Qm("n")]:t,[Jm("n")]:n,u:o.desktop,[Qm("u")]:o.tablet,[Jm("u")]:o.phone},l=Fw("spacing",O(e),O(t),O(n),Ut()),u=(b,y,T)=>{if(Uw(i,{side:"n"},b,"side",["side"])?.value===Bw)return Kr().value;let S=$w(i,{side:"n"},"u",b,"side");if(!S)return;let E=y!==null&&!T&&S.unit==="px"&&typeof l[y]=="number";return r(E?l[y]:S.value,S.unit,b)},d=u("desktop",null,!0),p={},f=u("tablet","tablet",t!==void 0);f!==void 0&&(t!==void 0||f!==d)&&(p.tablet=f);let m=u("mobile","phone",n!==void 0);return m!==void 0&&(n!==void 0||m!==d)&&(p.phone=m),p}function Vi(e,t,n={},o=e,a={},s=0,r="box"){let i={},l={},u=[],d=Kr(r),p=!1;for(let[f,m,...b]of cC){let y=f==="left"||f==="right"?lC:O,T=y(e[f]),S=j(Ww,f),E=S?typeof s=="function"?{desktop:s(S,"desktop"),tablet:s(S,"tablet"),mobile:s(S,"mobile")}:s:0,x=typeof E=="object"?E.desktop:E;sh(T)?(i[m]=d.value,p=!0):T!==void 0&&(i[m]=It(a.desktop)==="px"?T:Ba(T,It(a.desktop),x));let v=uC(y(o[f]),y(n[f]),y(t[f]),a,E);for(let[w,[I,C]]of[["tablet",b[0]],["phone",b[1]]]){let D=v[w];D!==void 0&&(u.push(I),l[C]=D,D===d.value&&(p=!0))}}return p&&u.push(...d.className.split(" ")),{classes:u,style:{...i,...l}}}var ih={top:"padTop",bottom:"padBottom",left:"padLeft",right:"padRight"},Yi="padUnit";function dC(e,t){let n=e[Yi],o=(a,s,r)=>{let i=O(a)??(r===void 0?void 0:Gi(r,n,"desktop")),l=O(s);return l===void 0?i:(i??0)+Gi(l,n,"desktop")};return{top:o(e.padTop,e.sectionPaddingTop,t.top),bottom:o(e.padBottom,e.sectionPaddingBottom,t.bottom)}}function JG(e,t,n={}){let o=dC(e,t),a={...pC(e,ih,!0,Yi),top:o.top,bottom:o.bottom};n.noTop&&Object.assign(a,{top:0,topTablet:void 0,topPhone:void 0});let s=ji(a),r=s?s.className.split(" ").filter(i=>i!==Ki):[];return{...r.length?{className:r.join(" ")}:{},style:s?.style??{}}}var Da={top:"sectionPaddingTop",bottom:"sectionPaddingBottom",left:"sectionPaddingLeft",right:"sectionPaddingRight"},QG=[...["top","bottom","left","right"].map(e=>[ih[e],Da[e]]),[Yi,oh]].flatMap(([e,t])=>[[e,t],...["tablet","mobile"].map(n=>[H(e,n),H(t,n)])]);function pC(e,t=Da,n=!0,o=t===Da?oh:void 0){let a={};if(o){e[o]!==void 0&&(a.unit=e[o]);for(let r of["tablet","mobile"])e[H(o,r)]!==void 0&&(a[H("unit",r)]=e[H(o,r)])}for(let r of n?["top","bottom","left","right"]:["top","bottom"]){a[r]=e[t[r]];for(let i of["tablet","mobile"])a[H(r,i)]=e[H(t[r],i)]}let s=e[fC];if(Array.isArray(s)){let r=lh.flatMap(i=>Fa.filter(l=>s.includes(H(t[i],l))).map(l=>H(i,l)));r.length&&(a.totals=r)}return a}var fC="padTotal",lh=["top","bottom"];function e2(e=Da){return lh.flatMap(t=>Fa.map(n=>H(e[t],n)))}var zi=16,Wi=24,mC={text:zi,heading:Wi,line:0},eh={all:{12:"py-3",16:"py-4",24:"py-6"},edge:{12:"max-view-wide:py-3"}},hC={[zi]:eh.all[zi],[Wi]:eh.all[Wi],[mC.line]:""};function t2(e,t){return{className:hC[t]??"",...e?{pad:{values:e,frame:t}}:{}}}var n2=e=>({desktop:e.top,tablet:e.top,mobile:e.topPhone});function o2(e,t){if(!t)return{root:nh(e.values,e.frame),outer:null};if(!e.values.totals?.length)return{root:null,outer:th(e.values)};let n=e.values,{top:o,bottom:a,topTablet:s,bottomTablet:r,topPhone:i,bottomPhone:l,left:u,right:d,leftTablet:p,rightTablet:f,leftPhone:m,rightPhone:b,...y}=n,T={...y,top:o,bottom:a,topTablet:s,bottomTablet:r,topPhone:i,bottomPhone:l},S=nh(e.drawsFrame?gC(T,e.frame):T,e.frame),E=S&&e.drawsFrame?{...S,className:S.className.split(" ").filter(v=>v!==Ki).join(" ")}:S,x=["tablet","mobile"].some(v=>["top","bottom"].some(w=>typeof n[H(w,v)]=="number"&&!n.totals?.includes(H(w,v))));return{root:E&&e.edge&&E.className&&!x?{...E,attrs:Ac}:E,outer:th({...y,totals:void 0,left:u,right:d,leftTablet:p,rightTablet:f,leftPhone:m,rightPhone:b})}}function gC(e,t){let n={...e},o=[...e.totals??[]];for(let a of Fa)for(let s of["top","bottom"]){if(La[a].some(l=>O(e[H(s,l)])!==void 0))continue;let r=l=>Yn(t,s,l),i=La[a][1];i&&r(i)===r(a)||(n[H(s,a)]=Gi(r(a),e[H("unit",a)],a),o.push(H(s,a)))}return{...n,totals:o}}function bC(e,t){let n={...e};for(let o of["tablet","mobile"]){let a=H("unit",o),s=["top","bottom","left","right"].some(r=>O(e[H(r,o)])!==void 0);for(let r of["top","bottom"]){if(O(n[H(r,o)])!==void 0)continue;let i=La[o].slice(1).find(d=>O(n[H(r,d)])!==void 0);if(!i||Yn(t,r,i)===Yn(t,r,o)||e.totals?.includes(H(r,i)))continue;let l=O(n[H(r,i)]),u=It(n[H("unit",i)]);if(s){let d=It(n[a]);n[H(r,o)]=u===d?l:ah(l,u,d,o,{min:0,max:fe.max,step:1})}else n[H(r,o)]=l,n[a]=n[H("unit",i)]}}return n}function th(e){return ji(e)}function nh(e,t){let n=typeof t=="object"?bC(e,t):e,o=(a,s,r,i,l)=>typeof a!="number"?void 0:It(s)==="px"&&!n.totals?.includes(r)?a+Yn(t,i,l):a;return ji({...n,frame:t,top:o(n.top,n.unit,"top","top","desktop"),bottom:o(n.bottom,n.unit,"bottom","bottom","desktop"),topTablet:o(n.topTablet,n.unitTablet,"topTablet","top","tablet"),bottomTablet:o(n.bottomTablet,n.unitTablet,"bottomTablet","bottom","tablet"),topPhone:o(n.topPhone,n.unitPhone,"topPhone","top","mobile"),bottomPhone:o(n.bottomPhone,n.unitPhone,"bottomPhone","bottom","mobile")})}import{BUTTON_PAD_KEYS as Ha,buttonBorderOf as yC,buttonFillOpacityOf as SC,buttonPadSidesOf as _C,viewKeyAt as TC}from"efficient-easel/draw";import{BUTTON_PAD_UNIT_KEY as Xi,lengthOf as EC}from"efficient-easel/screen/lib/content/length-units";var xC="px-6 py-4",vC=4,Ma=e=>{let t=new RegExp(`\\bp${e}-(?:\\[(\\d+)px\\]|(\\d+))`).exec(xC);if(!t)throw new Error(`BUTTON_PAD_CLASSES has no p${e}`);return t[1]!==void 0?Number(t[1]):Number(t[2])*vC},p2={top:Ma("y"),right:Ma("x"),bottom:Ma("y"),left:Ma("x")},uh="var(--btn)";function wC(e){let t=e.variant==="ghost",n=SC(e.buttonFillOpacity),o=yC(e.buttonBorder),a=W(e.buttonColor);return{fillOpacity:n??(t?0:100),border:{width:o?.width??1,color:o?.color??a??(t?"currentColor":uh)},changed:n!==void 0||o!==void 0}}function f2(e){let t=wC(e);if(!t.changed)return null;let n=W(e.buttonColor)??uh;return{background:t.fillOpacity===0?"transparent":t.fillOpacity===100?n:`color-mix(in srgb, ${n} ${t.fillOpacity}%, transparent)`,borderWidth:EC(t.border.width,F(e.buttonBorderUnit)),borderStyle:"solid",borderColor:t.border.color}}var CC="var(--sf-button-radius, 0)";function m2(e){let t=O(e.buttonCorners),n=De(e.buttonCornerSides);if(t===void 0&&n===null)return null;let o=t===void 0?CC:M(Math.max(0,t),e.buttonCornersUnit);return{borderRadius:n===null?o:Ct(o,n)}}function h2(e){let t=(r,i)=>e[TC(r,i)],n=r=>_C({top:t(Ha.top,r),right:t(Ha.right,r),bottom:t(Ha.bottom,r),left:t(Ha.left,r)})??{},o={desktop:t(Xi,"desktop"),tablet:t(Xi,"tablet"),phone:t(Xi,"mobile")},{classes:a,style:s}=Vi(n("desktop"),n("mobile"),n("tablet"),void 0,o);return Object.keys(s).length?{className:a.join(" "),style:s}:null}var ch="upper";function dh(e,t,n){let o=e&&typeof e=="object"?e:{},a=W(o.textStyle),s=a?W(t?.find(d=>d?.id===a)?.name):void 0,r=a?/^(heading|body)-(\d+)$/.exec(a):null,i=a?s||(r?n.styleName({kind:r[1],n:Number(r[2])}):a):n.noStyle,{cases:l}=n,u=W(o.case)??ch;return`${i} \xB7 ${l[u]??l[ch]}`}import{usePreviewParts as wP}from"efficient-easel/draw/client";import{encodePartId as CP}from"efficient-easel/draw";import{DEFAULT_EASEL_STRINGS as OP,useEaselStrings as PP}from"efficient-easel/strings";import{PIN_STICK_VAR as OC,PIN_TRACK_POSITION_VAR as PC,pinAttrs as ph,pinStickVars as kC,readPin as Ji}from"efficient-shell/format";var T2="Stick to top",Se={min:0,max:200,step:4,fallback:0},Xn={kind:"position",unitKey:"stickTopDistanceUnit"},fh=zt(Xn),[AC,RC,IC]=fh,Qi="Pin while scrolling",mh="Scroll",Oe={distance:"--sf-pin-distance",position:"--sf-pin-position",on:"--sf-pin-on",length:"--sf-pin-length",stick:"--sf-pin-stick",trackPosition:"--sf-pin-track-position",header:"--sf-pin-header"},qn="stickTopScreens",NC=[qn,"stickTopScreensTablet","stickTopScreensPhone"],el="Screens",tl="stickTopStop",dn="screen",hh="Pin stops at",gh=[{value:"header",label:"Under the header"},{value:dn,label:"Screen top"}],bh="header",yh="Under the header: the section stops below the site header. Screen top: it stops at the top edge of the screen, under a see-through header.";function nl(e){return e===dn?dn:"header"}function Sh(e){return e===dn?dn:void 0}var ol="stickAbove",_h="Stays above",Th="On: the pinned box stays on top, and the sections after it scroll under it.";function LC(e){return e.stickAbove===!0}var E2=["stickTop","stickTopDistance","stickTopTablet","stickTopDistanceTablet","stickTopPhone","stickTopDistancePhone",...fh,...NC,tl,ol],x2=new Set(["IntroBleed"]),v2=new Set(["CategoryBar","DocTabs","Contents"]);function DC(e){return typeof e.stickTop=="boolean"?e.stickTop:e.sticky!==!1}var qi=e=>Ji(!0,e).length,al={any:["stickTop","stickTopTablet","stickTopPhone"].map(e=>({field:e,is:!0}))},Eh={all:[{not:{field:"stickTop",in:[!0,!1]}},{not:{field:"sticky",is:!1}}]};function Zi(e,t="px"){let n=O(e)??Se.fallback;return t!=="px"?Math.max(Se.min,n):Math.min(Se.max,Math.max(Se.min,Math.round(n)))}function sl(e){return typeof e.stickTopTablet=="boolean"}function rl(e){return typeof e.stickTopPhone=="boolean"}function pn(e,t={}){let n=t.intro?DC(e):e.stickTop===!0,o=e,a=F(o[AC]),s=Zi(e.stickTopDistance,a),r=qi(e.stickTopScreens),i=sl(e),l=i?e.stickTopTablet===!0:n,u=i?F(o[RC]):a,d=i?Zi(e.stickTopDistanceTablet,u):s,p=i?qi(e.stickTopScreensTablet):r,f=rl(e),m=f?e.stickTopPhone===!0:l,b=f?F(o[IC]):u,y=f?Zi(e.stickTopDistancePhone,b):d,T=f?qi(e.stickTopScreensPhone):p;return{desktop:n,desktopDistance:s,desktopUnit:a,desktopScreens:r,tablet:l,tabletDistance:d,tabletUnit:u,tabletScreens:p,ownTablet:i,phone:m,phoneDistance:y,phoneUnit:b,phoneScreens:T,ownPhone:f}}function w2(e,t={}){let n=pn(e,{intro:t.atScreenTop});if(!n.desktop&&!n.tablet&&!n.phone)return null;let o=t.atScreenTop===!0&&typeof e.stickTop!="boolean",a=n.desktop&&n.desktopScreens>0||n.tablet&&n.tabletScreens>0||n.phone&&n.phoneScreens>0,s=t.above===!0&&LC(e),r=t.track===!0&&!o&&a&&!s,i=(p,f,m,b)=>kt({tabletClass:"",tabletVar:`${p}-tablet`,phoneClass:"",phoneVar:`${p}-phone`},f,m,b).style,l={...t.atScreenTop||nl(e.stickTopStop)===dn?{[Oe.header]:"0px"}:{},[Oe.distance]:M(n.desktopDistance,n.desktopUnit),...i(Oe.distance,M(n.desktopDistance,n.desktopUnit),M(n.tabletDistance,n.tabletUnit),M(n.phoneDistance,n.phoneUnit))};if(r){let p=m=>m?"1":"0",f={...l,...n.desktop?{}:{[Oe.on]:"0"},...i(Oe.on,p(n.desktop),p(n.tablet),p(n.phone)),[Oe.length]:String(n.desktopScreens),...i(Oe.length,String(n.desktopScreens),String(n.tabletScreens),String(n.phoneScreens)),...FC(n.desktop&&n.desktopScreens===0,n.tablet&&n.tabletScreens===0,n.phone&&n.phoneScreens===0,i)};return{attrs:ph(Ji(!0),"track").attrs,style:f}}let u=p=>p?"sticky":"static",d={...l,...n.desktop?{}:{[Oe.position]:"static"},...i(Oe.position,u(n.desktop),u(n.tablet),u(n.phone))};return{attrs:ph(Ji(!0),"stick",s?{above:s}:{}).attrs,style:d}}function FC(e,t,n,o){let a=[[Oe.stick,OC],[Oe.trackPosition,PC]],[s,r,i]=[e,t,n].map(kC);return Object.fromEntries(a.flatMap(([l,u])=>[...e?[[l,s[u]]]:[],...Object.entries(o(l,s[u],r[u],i[u]))]))}import{parseOption as BC}from"efficient-shell/format";var HC=["column","row","tabs","accordion"];var MC={column:"Stacked",row:"One row",tabs:"Tabs",accordion:"Accordion"},xh={Flex:HC,HeroGroup:["column","row"]},$C={Flex:"row",HeroGroup:"column"},UC={column:"flex-col",row:"flex-row",tabs:"flex-col",accordion:"flex-col"};function $a(e,t){return BC(xh[e],$C[e],t)}function P2(e,t){return UC[$a(e,t)]}function vh(e){return xh[e].map(t=>({label:MC[t],value:t}))}import{viewKeyAt as il}from"efficient-easel/screen/lib/content/view-tiers";import{BORDER_WIDTH_MAX as Ga}from"efficient-easel/screen/lib/content/style-keys";var GC=["solid","dashed","dotted"],za=["top","right","bottom","left"],N2="sf-section-border",L2="sf-section-border-self",zC=/^#(?:[0-9a-f]{3}|[0-9a-f]{4}|[0-9a-f]{6}|[0-9a-f]{8})$/i,WC=e=>typeof e=="number"&&Number.isFinite(e)?`${Math.min(Ga,Math.max(0,Math.round(e)))}px`:void 0,Zn={kind:"border",unitKey:"sectionBorderUnit"},D2=zt(Zn);function F2(e){let t=Zn.unitKey;return{desktop:e[il(t,"desktop")],tablet:e[il(t,"tablet")],phone:e[il(t,"mobile")]}}var wh=(e,t)=>t==="px"?WC(e):typeof e=="number"&&Number.isFinite(e)?M(Math.max(0,e),t):void 0;function Ua(e,{phone:t=!1,tablet:n=!1,unit:o}={}){if(!e||typeof e!="object")return;let a=t?"-phone":n?"-tablet":"",s={},r=F(o);for(let i of za){let l=wh(e[i],r)??wh(e.width,r);l!==void 0&&(s[`--sf-border-${i}-width${a}`]=l)}return typeof e.style=="string"&&GC.includes(e.style)&&(s[`--sf-border-style${a}`]=e.style),typeof e.color=="string"&&zC.test(e.color)&&(s[`--sf-border-color${a}`]=e.color.toLowerCase()),Object.keys(s).length?s:void 0}function ll(e){let{width:t,...n}=e;return typeof t!="number"?e:{...n,...Object.fromEntries(za.map(o=>[o,n[o]??t]))}}function B2(e,t,n,o={}){let a=Ua(e,{unit:o.desktop}),s=Ua(n,{tablet:!0,unit:o.tablet}),r=Ua(n,{phone:!0,unit:o.tablet}),i=Ua(t,{phone:!0,unit:o.phone}),l=r||i?{...r,...i}:void 0;return a||s||l?{...a,...s,...l}:void 0}import{parseHexColor as KC}from"efficient-shell/format";var fn="var(--section-bg)",cl="inherit";function ul(e,t){return e===cl?fn:e===void 0?t:Wa(e)}var jC=/var\(\s*--(surface-2|surface|line)\s*(?=[,)])/g;function Wa(e){let t=Re(e);return t?Me(t):e.replace(jC,"var(--site-$1")}var VC={"var(--section-bg)":"band","var(--site-surface)":"surface","var(--site-surface-2)":"surface2"};function dl(e,t,n){let o=ul(e,t);if(!o||o==="transparent")return n.background.toLowerCase();let a=o.trim(),s=a.startsWith("#")?KC(a):null;if(s)return s.toLowerCase();let r=VC[a.replace(/\s+/g,"")];return(r?n[r]:n.background).toLowerCase()}var pl="transparent";function Ch(e,t){let n=ul(e,t);return!n||n===pl?"none":n===fn?"band":null}function Oh(e,t,n=t){let o=s=>!s||s==="transparent",a=ul(e,t);return a===n||o(a)&&o(n)}var Ph=["transparent","var(--wheel-stage)","var(--surface)","var(--surface-2)"],kh={transparent:"No fill","var(--wheel-stage)":"Image stage","var(--surface)":"Panels and cards","var(--surface-2)":"Second surface"},mn="var(--wheel-stage)",Ka="transparent",Jn="inherit";function z2(e,t){return Wa(fl(e,t))}function fl(e,t){return e===Jn?mn:e==null?t:e===!0?mn:e===!1?Ka:e}function W2(e){return typeof e=="string"&&e!==Jn?Wa(e):mn}function K2(e){return e!==Ka&&e!=="none"&&e!==""}function Ah(e,t){return e===Jn||e===!0?!0:e==null?t===mn:!1}var Rh="inherit",ja="fixed",Ih=e=>typeof e!="number"&&e!==ja,YC="var(--sf-heading-max, 9999px)";function Y2(e,t,n,o,a){if(typeof e=="number")return M(e,a);if(e===ja)return t;let s=o?`var(--size-${o}, ${t})`:t;return n==="heading"?`min(${s}, ${YC})`:s}var ml={kind:"fontSize",unitKey:"titleSizeUnit"},hl={kind:"fontSize",unitKey:"bodySizeUnit"},XC=["desktop","mobile"],X2=[ml,hl].flatMap(e=>zt(e,XC));function q2(e){let t=(n,o)=>Wc(e,n,o);return{titleDesktop:t(ml,"desktop"),titleMobile:t(ml,"mobile"),bodyDesktop:t(hl,"desktop"),bodyMobile:t(hl,"mobile")}}var qC=["page","full"],Nh=["full","page"],Nt={full:"Full",page:"Content"},gl="inherit",ZC=e=>typeof e=="string"&&qC.includes(e),JC=e=>e===gl;function QC(e,t){return JC(e.widthMode)?{mode:"full",inherited:!0}:ZC(e.widthMode)?{mode:e.widthMode,inherited:!1}:{mode:t,inherited:t==="full"}}function tz(e){return QC(e,"page").mode==="full"}var eO={CustomHTML:"rawMarkup",Hero:"hero",HeroSingle:"hero",IntroBleed:"scrollOver",SpecStrip:"background",Timeline:"background",Footprint:"background",Prose:"background",ParagraphsA:"background",Cards:"background",KeyFeatures:"background",Chart:"background",Mockup:"background",Testimonials:"background",TitleWithButtons:"background",Countdown:"background",DocMasthead:"background",DocBody:"background",DocMetaCards:"background",Gallery:"background",GalleryB:"background",Reviews:"background",ReviewForm:"background",Form:"background",AppointmentBooking:"background",FAQ:"background",Events:"background",Split:"both",Breadcrumb:"both",Collections:"both",CatalogFilterBar:"both",AlloyWheelsListing:"both",Banner:"contained",Stats:"contained",Logos:"contained",Divider:"contained",OrderSummary:"contained",DeliveryOptions:"contained",PaymentBadges:"contained",CheckoutCTA:"contained",Flex:"contained",Grid:"contained",ContactCards:"contained",MessagingCards:"contained",OpeningHours:"contained",RateTable:"contained",Manifesto:"contentColumn",SectionHeader:"contentFull",ProductHero:"contentFull",ProductGrid:"productGrid",TimelineTrack:"capped",DetailRows:"capped",FitmentTable:"capped",TyreSizes:"capped",TyreFitment:"capped",EuTyreLabel:"capped",BundleOffer:"capped",CompatibleTyres:"capped",RelatedProducts:"capped",ProcessSteps:"capped",StatsParagraph:"capped",Masthead:"capped",FeaturedCover:"capped",LongRead:"capped",Series:"capped",ContactLocations:"capped",FitmentFinder:"capped",SpecTable:"capped",Subscribe:"capped",SubscribeBlogs:"capped",ContactRouting:"capped",SubmitBuild:"capped"};function nz(e){return he(eO,e)}var te={background:"sectionBackgroundWidth",content:"sectionContentWidth",contentMax:"sectionContentMax",contentMaxUnit:"sectionContentMaxUnit"},oz={kind:"size",unitKey:te.contentMaxUnit};function tO(e){let t=e[te.contentMaxUnit],n=F(t),o=e[te.contentMax],a=n==="px"?Hp(o):typeof o=="number"&&Number.isFinite(o)&&o>0?o:null,s=hn(e[te.content])??(a===null?null:"content");return{background:hn(e[te.background]),content:s,contentMax:s==="content"?a:null,contentMaxUnit:n}}function az(e){let t=tO(e);return t.content===null&&e.fullWidth===!0?{...t,content:"full"}:t}function sz(e){return e.background!==null||e.content!==null}var rz=e=>({[te.background]:e}),iz=e=>e==="full"?{[te.content]:e,[te.contentMax]:void 0,[te.contentMaxUnit]:void 0}:{[te.content]:e},lz=e=>({[te.content]:"content",[te.contentMax]:e}),cz=e=>e==="background"?{[te.background]:void 0}:{[te.content]:void 0,[te.contentMax]:void 0,[te.contentMaxUnit]:void 0},Lh="siteWidths",nO=e=>e==="full"||e==="content";function hn(e){return nO(e)?e:null}function uz(e,t){return{[Lh]:{background:hn(e),content:hn(t)}}}function dz(e){let t=e.editor?.metadata?.[Lh];return{background:hn(t?.background),content:hn(t?.content)}}import{useEaselSession as kP}from"efficient-easel/screen/lib/session-context";import{BOX_GAP as AP,describedAs as lt,group as Te,iconOf as Dt,sharedStyleKinds as ro}from"efficient-easel/screen/lib/document/box-fields";import{VIEW_KEY_ACCESS as fg,onDesktopWords as Ft,phoneTwinFields as Pl,saidAlignmentGrid as RP,useLengthUnit as IP}from"efficient-easel/screen/lib/document/box-fields";import{createElement as _e}from"react";import{SettingsDefaultReset as oO,SettingsField as aO}from"efficient-easel/panel";import{boxFieldBuilders as sO,describedAs as rO,iconOf as iO,onDesktopWords as lO}from"efficient-easel/screen/lib/document/box-fields";import{LENGTH_KIND_UNITS as cO}from"efficient-easel/screen/lib/content/length-units";import{IconPicker as uO,Tooltip as dO,useShellStrings as pO}from"efficient-shell/ui";import{RotateIcon as fO}from"efficient-easel/icons";var Dh=e=>c(e),Qn=cO,q=sO(Dh,{lengthUnits:Qn}),Be=q.slider,ne=q.select,eo=q.Segmented,gn=q.segmented,Tz=q.alignmentField,Ez=q.alignmentFields,xz=q.blockAlignmentField,vz=q.blockAlignmentFields,wz=q.boxJustifyField,Cz=q.boxAlignField,Oz=q.boxWrapField,Fh=q.directionField,Va=q.gapField,Pz=q.placementField,kz=q.PlacementGridView,Az=q.positionFields,Rz=q.sidesPaddingFields,to=q.lengthUnitFields;function Iz(e,t){return Be("Angle",_e(fO),bo.min,bo.max,bo.step,e,"\xB0",t)}var bl=Symbol("efficient-web-builder.picture-picker-row"),mO={width:"3.5rem",height:"2.75rem",words:!0};function hO({value:e}){return pO().iconNames[e]??e}function yl(e,t,n){return _e(dO,{content:n,className:"sf-pick-tip",children:_e("span",{className:"sf-pick"},_e("span",{className:"sf-pick-pic"},e),_e("span",{className:"sf-pick-cap"},t))})}function gO(e){let t=n=>n.label===void 0?_e(hO,{value:n.value}):c(n.label);return e.map(n=>({value:n.value,...n.label===void 0?{}:{label:c(n.hint??n.label)},icon:yl(n.picture,t(n),n.hint===void 0?t(n):c(n.hint))}))}function Bh(e,t){return _e("span",{className:"sf-pick"},_e("span",{className:"sf-pick-pic"},e),_e("span",{className:"sf-pick-cap sf-pick-cap-closed"},t))}function Sl(e,t,n,o,a={}){let s=l=>n.some(u=>u.value===l),r=l=>a.resolve?a.resolve(l):s(l)?l:void 0,i=n.map(l=>({value:l.value,...l.label===void 0?{}:{label:l.label},...l.showWhen?{showWhen:l.showWhen}:{}}));return{type:"custom",[bl]:!0,...rO({},{type:"radio",label:e,options:i}),options:i,render:l=>{let{value:u,onChange:d,field:p}=l,f=p?.options,m=gO(n.filter(v=>!f||f.some(w=>w.value===v.value))),b="follows"in l,y=b?r(a.phoneRest?a.phoneRest(l.follows):l.follows)??o:void 0,T=p?.currentValue,S=r(u)??y??r(T)??o,E=u!=null&&u!=="",x=y===void 0?void 0:n.find(v=>v.value===y);return _e(aO,{label:c(e),icon:iO(t),action:b?_e(oO,{words:P()?.panel,label:c(e),changed:E,detail:x?.label!==void 0?lO(Dh,c(x.label),l.followsView):void 0,disabled:l.readOnly===!0,onReset:()=>d(void 0)}):void 0},_e(uO,{label:c(e),value:S,options:m,onChange:d,columns:a.columns,cell:a.cell??mO,tooltips:!1,disabled:l.readOnly===!0}))}}}import{VIEW_ABOVE as El}from"efficient-easel/screen/lib/content/length-units";import{jsx as h,jsxs as R}from"react/jsx-runtime";import{NoSymbolIcon as wO}from"efficient-easel/icons";import{useId as CO}from"react";import{parseOption as Hh}from"efficient-shell/format";var bO="line",yO=[{label:"None",value:"none"},{label:"Line",value:"line"},{label:"Stripes \xB7 fine",value:"stripes-fine"},{label:"Stripes \xB7 medium",value:"stripes-medium"},{label:"Stripes \xB7 bold",value:"stripes-bold"}],_l={"stripes-fine":{ink:4,period:12},"stripes-medium":{ink:8,period:18},"stripes-bold":{ink:14,period:28}},Dz=28,SO="-45deg",_O="color-mix(in oklab, var(--accent) 50%, var(--bg))";function TO(e){return e!=="line"&&e!=="none"}var EO={sm:24,md:48,lg:80},xO="md",vO=Object.keys(EO);function Fz(e){return Hh(vO,xO,e)}function Bz(e){return Hh(yO,bO,e)}function Hz(e){if(!TO(e))return null;let{ink:t,period:n}=_l[e];return`repeating-linear-gradient(${SO}, ${_O} 0 ${t}px, transparent ${t}px ${n}px)`}var Mz={kind:"border",unitKey:"thicknessUnit"},$z={kind:"size",base:"%",unitKey:"lengthPctUnit"};var Ya=44,Xa=28;function A({children:e}){return h("svg",{width:Ya,height:Xa,viewBox:`0 0 ${Ya} ${Xa}`,"aria-hidden":"true",fill:"currentColor",stroke:"currentColor",strokeWidth:1.25,children:e})}var _=({x:e,y:t,w:n,t:o=2,faint:a=!1})=>h("rect",{x:e,y:t,width:n,height:o,rx:o/2,stroke:"none",opacity:a?.45:1}),N=({x:e,y:t,w:n,h:o})=>h("rect",{x:e,y:t,width:n,height:o,rx:2,fill:"none"}),me=({x:e,y:t})=>h("circle",{cx:e,cy:t,r:1.75,stroke:"none"}),Q=({x1:e,y1:t,x2:n,y2:o})=>h("line",{x1:e,y1:t,x2:n,y2:o});function Tl(e){let t=20/sn,n=5,o=1,a=[],s=0,r=0,i=0;for(let[d,p]of e)s+d>sn&&(r+=i*(n+o),s=0,i=0),a.push({x:12+s*t,y:r,w:d*t-o,h:p*n+(p-1)*o}),s+=d,i=Math.max(i,p);let l=r+i*(n+o)-o,u=(Xa-l)/2;return h(A,{children:a.map((d,p)=>h("rect",{x:d.x,y:u+d.y,width:d.w,height:d.h,rx:1,stroke:"none",opacity:.6},p))})}var Vz={bars:R(A,{children:[h(_,{x:8,y:14,w:5,t:10}),h(_,{x:16,y:8,w:5,t:16}),h(_,{x:24,y:18,w:5,t:6}),h(_,{x:32,y:11,w:5,t:13})]}),line:R(A,{children:[h("polyline",{points:"6,22 14,15 22,18 30,8 38,11",fill:"none",strokeWidth:1.75,strokeLinejoin:"round"}),h(Q,{x1:6,y1:25,x2:38,y2:25})]}),donut:R(A,{children:[h("circle",{cx:22,cy:14,r:9,fill:"none",strokeWidth:5,opacity:.45}),h("circle",{cx:22,cy:14,r:9,fill:"none",strokeWidth:5,strokeDasharray:"34 57",transform:"rotate(-90 22 14)"})]})};function Yz(e){if(e==="none")return h("span",{style:{display:"flex",width:Ya,height:Xa,alignItems:"center",justifyContent:"center"},children:h(wO,{size:20})});if(e==="line")return h(A,{children:h(Q,{x1:4,y1:14,x2:40,y2:14})});let{ink:t,period:n}=_l[e],o=.4,a=[];for(let s=-12;s<Ya;s+=n*o)a.push(h("polygon",{points:`${s},22 ${s+t*o},22 ${s+t*o+10},6 ${s+10},6`,stroke:"none"},s));return h(OO,{children:a})}function OO({children:e}){let t=`sf-div-${CO().replace(/[^\w-]/g,"")}`;return R(A,{children:[h("clipPath",{id:t,children:h("rect",{x:4,y:6,width:36,height:16,rx:2})}),h("g",{clipPath:`url(#${t})`,children:e})]})}var qa=({x:e,y:t,w:n,h:o})=>h("rect",{x:e,y:t,width:n,height:o,rx:2,stroke:"none",opacity:.3}),Xz={tabs:R(A,{children:[h(_,{x:5,y:10,w:9}),h(_,{x:18,y:10,w:9,faint:!0}),h(_,{x:31,y:10,w:9,faint:!0}),h(Q,{x1:4,y1:17,x2:40,y2:17}),h(_,{x:4,y:16,w:11,t:2})]}),largeTabs:R(A,{children:[h(Q,{x1:4,y1:5,x2:40,y2:5}),h(me,{x:7,y:10}),h(_,{x:11,y:9,w:16}),h(_,{x:31,y:9,w:9,faint:!0}),h(Q,{x1:4,y1:14,x2:40,y2:14}),h(me,{x:7,y:19}),h(_,{x:11,y:18,w:13,faint:!0}),h(_,{x:31,y:18,w:9,faint:!0}),h(Q,{x1:4,y1:23,x2:40,y2:23})]})},qz={card:R(A,{children:[h(N,{x:10,y:3,w:24,h:22}),h(qa,{x:12,y:5,w:20,h:10}),h(_,{x:13,y:18,w:16}),h(_,{x:13,y:21,w:11,t:1.5,faint:!0})]}),cover:R(A,{children:[h(qa,{x:10,y:3,w:24,h:22}),h(N,{x:10,y:3,w:24,h:22}),h(_,{x:13,y:17,w:16}),h(_,{x:13,y:21,w:11,t:1.5})]})},Zz={cards:R(A,{children:[h(N,{x:3,y:5,w:11,h:18}),h(N,{x:17,y:5,w:11,h:18}),h(N,{x:31,y:5,w:11,h:18}),h(_,{x:5,y:9,w:7}),h(_,{x:19,y:9,w:7}),h(_,{x:33,y:9,w:7}),h(_,{x:5,y:13,w:5,t:1.5,faint:!0}),h(_,{x:19,y:13,w:5,t:1.5,faint:!0}),h(_,{x:33,y:13,w:5,t:1.5,faint:!0})]}),"label-only":R(A,{children:[h("path",{d:"M8.5 7l3 3-3 3-3-3zM22.5 7l3 3-3 3-3-3zM36.5 7l3 3-3 3-3-3z",stroke:"none"}),h(_,{x:5,y:18,w:7}),h(_,{x:19,y:18,w:7}),h(_,{x:33,y:18,w:7})]})},Jz={table:R(A,{children:[h(N,{x:3,y:5,w:38,h:18}),h(Q,{x1:15.7,y1:5,x2:15.7,y2:23}),h(Q,{x1:28.3,y1:5,x2:28.3,y2:23}),h("path",{d:"M15.7 5v18M28.3 5v18",fill:"none",strokeWidth:2.5}),h(_,{x:6,y:9,w:6,t:3}),h(_,{x:19,y:9,w:6,t:3}),h(_,{x:31,y:9,w:6,t:3}),h(_,{x:6,y:18,w:7,t:1.5,faint:!0}),h(_,{x:19,y:18,w:7,t:1.5,faint:!0}),h(_,{x:31,y:18,w:7,t:1.5,faint:!0})]}),list:R(A,{children:[h(Q,{x1:3,y1:7,x2:13,y2:7}),h(Q,{x1:17,y1:7,x2:27,y2:7}),h(Q,{x1:31,y1:7,x2:41,y2:7}),h(_,{x:3,y:11,w:6,t:3}),h(_,{x:17,y:11,w:6,t:3}),h(_,{x:31,y:11,w:6,t:3}),h(_,{x:3,y:17,w:8,t:1.5,faint:!0}),h(_,{x:17,y:17,w:8,t:1.5,faint:!0}),h(_,{x:31,y:17,w:8,t:1.5,faint:!0})]})},Qz={plain:R(A,{children:[h(_,{x:5,y:12,w:9,t:4}),h(_,{x:18,y:12,w:9,t:4}),h(_,{x:31,y:12,w:9,t:4})]}),cards:R(A,{children:[h(N,{x:3,y:7,w:11,h:14}),h(N,{x:17,y:7,w:11,h:14}),h(N,{x:31,y:7,w:11,h:14}),h(_,{x:5,y:13,w:7}),h(_,{x:19,y:13,w:7}),h(_,{x:33,y:13,w:7})]}),marks:R(A,{children:[h(_,{x:8,y:12,w:6,t:4}),h(_,{x:17,y:12,w:6,t:4}),h(_,{x:26,y:12,w:6,t:4}),h(_,{x:35,y:12,w:3,t:4})]}),chips:R(A,{children:[h(N,{x:3,y:9,w:18,h:10}),h(N,{x:23,y:9,w:18,h:10}),h(me,{x:7,y:14}),h(_,{x:10,y:13,w:8}),h(me,{x:27,y:14}),h(_,{x:30,y:13,w:8})]})},eW={overlay:R(A,{children:[h(qa,{x:4,y:3,w:36,h:22}),h(N,{x:4,y:3,w:36,h:22}),h(_,{x:8,y:15,w:18,t:3}),h(_,{x:8,y:20,w:12})]}),stacked:R(A,{children:[h(_,{x:4,y:3,w:18,t:3}),h(_,{x:4,y:8,w:12}),h(qa,{x:4,y:13,w:36,h:12}),h(N,{x:4,y:13,w:36,h:12})]})},tW={split:R(A,{children:[h(_,{x:4,y:6,w:12,t:3}),h(_,{x:4,y:11,w:9,faint:!0}),h(Q,{x1:20,y1:4,x2:20,y2:24}),h(_,{x:24,y:6,w:16}),h(_,{x:24,y:10,w:11,faint:!0}),h(_,{x:24,y:17,w:16}),h(_,{x:24,y:21,w:11,faint:!0})]}),spine:R(A,{children:[h(Q,{x1:9,y1:4,x2:9,y2:24}),h(me,{x:9,y:8}),h(_,{x:14,y:7,w:24}),h(me,{x:9,y:14}),h(_,{x:14,y:13,w:20}),h(me,{x:9,y:20}),h(_,{x:14,y:19,w:24})]}),alternating:R(A,{children:[h(Q,{x1:22,y1:4,x2:22,y2:24}),h(me,{x:22,y:8}),h(_,{x:4,y:7,w:14}),h(me,{x:22,y:14}),h(_,{x:26,y:13,w:14}),h(me,{x:22,y:20}),h(_,{x:4,y:19,w:14})]}),track:R(A,{children:[h(Q,{x1:4,y1:12,x2:40,y2:12}),h(me,{x:8,y:12}),h(me,{x:22,y:12}),h(me,{x:36,y:12}),h(_,{x:4,y:17,w:8}),h(_,{x:18,y:17,w:8}),h(_,{x:32,y:17,w:8}),h(_,{x:4,y:21,w:6,faint:!0}),h(_,{x:18,y:21,w:6,faint:!0}),h(_,{x:32,y:21,w:6,faint:!0})]})},nW={standard:R(A,{children:[h(_,{x:4,y:5,w:10,t:1.5,faint:!0}),h(_,{x:4,y:10,w:28,t:4}),h(_,{x:4,y:18,w:34,faint:!0}),h(_,{x:4,y:22,w:24,faint:!0})]}),editorial:R(A,{children:[h(_,{x:4,y:5,w:5,t:1.5,faint:!0}),h(_,{x:4,y:10,w:20,t:5}),h(_,{x:28,y:11,w:12,faint:!0}),h(_,{x:28,y:15,w:9,faint:!0}),h(Q,{x1:4,y1:22,x2:40,y2:22})]}),simple:R(A,{children:[h(_,{x:4,y:8,w:10,t:1.5,faint:!0}),h(_,{x:4,y:13,w:26,t:4})]}),statement:R(A,{children:[h(_,{x:4,y:6,w:36,t:7}),h(_,{x:4,y:16,w:24,t:7})]}),natural:R(A,{children:[h(_,{x:4,y:8,w:22,t:3}),h(_,{x:4,y:15,w:34,faint:!0}),h(_,{x:4,y:19,w:28,faint:!0})]}),essay:R(A,{children:[h(_,{x:4,y:5,w:24,t:4}),h(_,{x:4,y:13,w:36,faint:!0}),h(_,{x:4,y:17,w:36,faint:!0}),h(_,{x:4,y:21,w:30,faint:!0})]})},oW={"spec-card":R(A,{children:[h(N,{x:4,y:3,w:36,h:22}),h(_,{x:8,y:7,w:14}),h(N,{x:8,y:12,w:8,h:9}),h(N,{x:18,y:12,w:8,h:9}),h(N,{x:28,y:12,w:8,h:9})]}),fitment:R(A,{children:[h(N,{x:4,y:4,w:10,h:5}),h(N,{x:16,y:4,w:10,h:5}),h(N,{x:28,y:4,w:10,h:5}),h(_,{x:4,y:14,w:34,faint:!0}),h(_,{x:4,y:18,w:34,faint:!0}),h(_,{x:4,y:22,w:34,faint:!0})]}),portal:R(A,{children:[h(N,{x:4,y:3,w:36,h:22}),h(_,{x:8,y:7,w:10,t:4}),h(_,{x:8,y:14,w:16,faint:!0}),h(_,{x:26,y:18,w:10,t:4})]}),kanban:R(A,{children:[h(N,{x:4,y:3,w:10,h:22}),h(N,{x:17,y:3,w:10,h:22}),h(N,{x:30,y:3,w:10,h:22}),h(_,{x:6,y:6,w:6,t:4}),h(_,{x:6,y:12,w:6,t:4}),h(_,{x:19,y:6,w:6,t:4}),h(_,{x:32,y:6,w:6,t:4}),h(_,{x:32,y:12,w:6,t:4})]}),claims:R(A,{children:[h(_,{x:4,y:5,w:12,faint:!0}),h(_,{x:20,y:4,w:18,t:4}),h(_,{x:4,y:12,w:12,faint:!0}),h(_,{x:20,y:11,w:10,t:4}),h(_,{x:4,y:19,w:12,faint:!0}),h(_,{x:20,y:18,w:14,t:4})]}),browser:R(A,{children:[h(N,{x:4,y:3,w:36,h:22}),h(Q,{x1:4,y1:8,x2:40,y2:8}),h(_,{x:8,y:11,w:28,t:5,faint:!0}),h(N,{x:8,y:18,w:8,h:4}),h(N,{x:18,y:18,w:8,h:4}),h(N,{x:28,y:18,w:8,h:4})]}),terminal:R(A,{children:[h(N,{x:4,y:3,w:36,h:22}),h("polyline",{points:"8,9 11,11 8,13",fill:"none"}),h(_,{x:13,y:10,w:14}),h(_,{x:8,y:16,w:22,faint:!0}),h(_,{x:8,y:20,w:16,faint:!0})]})},Mh={width:"5.75rem",height:"3.75rem",words:!0},aW={width:"8.5rem",height:"3.75rem",words:!0},sW={columns:R(A,{children:[h(N,{x:3,y:4,w:11,h:8}),h(N,{x:17,y:4,w:11,h:8}),h(N,{x:31,y:4,w:11,h:8}),h(_,{x:3,y:16,w:9}),h(_,{x:17,y:16,w:9}),h(_,{x:31,y:16,w:9}),h(_,{x:3,y:20,w:7,t:1.5,faint:!0}),h(_,{x:17,y:20,w:7,t:1.5,faint:!0}),h(_,{x:31,y:20,w:7,t:1.5,faint:!0})]}),"rows-left":R(A,{children:[h(N,{x:6,y:3,w:14,h:9}),h(_,{x:24,y:5,w:14}),h(_,{x:24,y:9,w:10,t:1.5,faint:!0}),h(N,{x:24,y:16,w:14,h:9}),h(_,{x:6,y:18,w:14}),h(_,{x:6,y:22,w:10,t:1.5,faint:!0})]}),"rows-right":R(A,{children:[h(N,{x:24,y:3,w:14,h:9}),h(_,{x:6,y:5,w:14}),h(_,{x:6,y:9,w:10,t:1.5,faint:!0}),h(N,{x:6,y:16,w:14,h:9}),h(_,{x:24,y:18,w:14}),h(_,{x:24,y:22,w:10,t:1.5,faint:!0})]})};import{TEXT_CONTROL_KINDS as tK,SCALAR_TEXT_CONTROLS as nK}from"efficient-easel/draw";function Bt(e,t){return c("{value} from {from}",{value:e,from:t})}function NP(){let{blockGap:e}=B();return e===null?c("this container's own spacing"):Bt(`${e}px`,c("Styles"))}function LP({inherited:e,onReset:t,label:n}){return g(oe,{words:P()?.panel,label:c(n),changed:!e,detail:NP(),onReset:t})}function DP(e){return Va({...AP,builtIn:qt[e],resolve:(t,n)=>vn(e,t,n?.siteGap),action:(t,n)=>g(LP,{inherited:!Ao(e,t),onReset:()=>n(void 0),label:"Gap"}),mark:{[ko]:e}})}function FP(e){return le(ee("mobile",{[ko]:e,type:"custom",render:t=>g(MP,{container:e,...t})}),mg)}function BP(e){return le(ee("tablet",{[ko]:e,type:"custom",render:t=>g(HP,{container:e,...t})}),mg)}var mg={not:{field:"gap",in:Array.from({length:-Ue.min},(e,t)=>Ue.min+t)}};function j4(e){return{gap:ee("desktop",DP(e)),[Nl("gap")]:BP(e),[it("gap")]:FP(e)}}function HP({container:e,...t}){let[n]=Pe("gap"),{siteGap:o}=t.field??{},a=Math.max(Cn.min,vn(e,n,o));return Va({...Cn,builtIn:a,resolve:s=>Je(s)?s:a,action:(s,r)=>g(oe,{words:P()?.panel,label:c("Gap"),changed:Je(s),detail:Ft(i=>c(i),`${a}px`),onReset:()=>r(void 0)})}).render(t)}function MP({container:e,...t}){let[n]=Pe("gap"),{siteGap:o,siteGapPhone:a}=t.field??{},s=qs(e,void 0,n,o,a);return Va({...Cn,builtIn:s,resolve:r=>qs(e,r,n,o,a),action:(r,i)=>g(oe,{words:P()?.panel,label:c("Gap"),changed:Je(r),detail:Bt(`${s}px`,Xs(e,n,a)?c("Styles"):c("Desktop")),onReset:()=>i(void 0)})}).render(t)}function V4(e){return Fh({offered:vh(e),fallback:$a(e,void 0),resolve:t=>$a(e,t)})}function Y4(e,t){return hu(t?gu(e,t):[],t)}function $P({inherited:e,onReset:t,label:n}){return g(oe,{words:P()?.panel,label:c(n),changed:!e,detail:Bt(c("Full"),c("the page")),onReset:t})}function Ht({value:e,onChange:t,label:n,placeholder:o,hint:a,multiline:s,hideable:r=!0,markup:i=!0}){let{text:l,hidden:u}=NO(e),d=no(null),p=no(null),f=E=>t(r?{text:E,hidden:u}:E),m=()=>t({text:l,hidden:!u}),b=r&&u,y=Jh(),T=a?KP(a)?g("span",{className:"sf-hint-while-typing",children:c(a)}):c(a):void 0,S=u?c("Show {label} on the slide",{label:c(n)}):c("Hide {label} on the slide",{label:c(n)});return g(K,{label:c(n),icon:g(tP,{}),htmlFor:y,className:b?"is-hidden":void 0,hint:T,action:r?g(Il,{content:S,children:g(dg,{"aria-pressed":u,"aria-label":S,onClick:m,children:u?g(Wh,{name:"eye-off",size:14}):g(Wh,{name:"eye",size:14})})}):void 0,children:Ke("div",{className:"sf-copybox",children:[i&&g(Ci,{target:s?p:d,value:l,onChange:f}),s?g("textarea",{id:y,ref:p,value:l,placeholder:o===void 0?void 0:c(o),onChange:E=>f(E.target.value)}):g("input",{id:y,ref:d,type:"text",value:l,placeholder:o===void 0?void 0:c(o),onChange:E=>f(E.target.value)})]})})}function X4(e,t){return{...e,[BO]:t}}function q4(e){let t=e[je];if(!t)throw new Error("withOffPage: the field holds no authored text");return{...e,[je]:{...t,offPage:!0}}}function Z4(e){return!e||typeof e!="object"?!1:e[je]?.offPage===!0}function Dl(e){if(!e[je])throw new Error("withPanelOnly: the field holds no authored text");return{...e,[dr]:!0}}function J4(e){return Uo(e)}function Q4(e){let t=e[je];if(!t)throw new Error("withIdentifier: the field holds no authored text");return{...e,[je]:{...t,identifier:!0}}}function oK(e,t){if(!e[je])throw new Error("inOwnBox: the field holds no authored text");let{[EP]:n,...o}=e;return{...o,[ur]:!0,render:t}}var UP=new Set(vP),os={type:"radio",options:[{value:!0},{value:!1}]},hg={text:{type:"object",objectFields:{text:{type:"text"},hidden:os}},textarea:{type:"object",objectFields:{text:{type:"textarea"},hidden:os}},plainText:{type:"text"},copyText:{type:"text"},plainTextarea:{type:"textarea"},textList:{type:"array",arrayFields:{text:{type:"text"}}}},Mt=(e,t)=>{let n=lt({...t,[je]:e},{...hg[e.control],label:e.label});if(!UP.has(e.control))return n;let o=t.render;return{...pg(n,"authored-copy"),render:a=>g(bm,{name:a.name,children:o(a)})}},aK="Everything else on this block comes from the linked post. Unlink it to edit by hand.",GP={field:"source.slug",set:!0},sK={not:GP},zP="Select a word, then press the highlighter.",WP=new Set([zP]),KP=e=>WP.has(e);function ss(e,t,n){return Mt({control:"text",label:e,placeholder:t,hint:n},{type:"custom",render:({value:o,onChange:a})=>g(Ht,{value:o,onChange:a,label:e,placeholder:t,hint:n})})}function Fl(e,t,n){return Mt({control:"textarea",label:e,placeholder:t,hint:n},{type:"custom",render:({value:o,onChange:a})=>g(Ht,{value:o,onChange:a,label:e,placeholder:t,hint:n,multiline:!0})})}function bn(e,t,n){return Mt({control:"plainText",label:e,placeholder:t,hint:n},{type:"custom",render:({value:o,onChange:a})=>g(Ht,{value:o,onChange:a,label:e,placeholder:t,hint:n,hideable:!1,markup:!1})})}function gg(e,t,n){return Mt({control:"copyText",label:e,placeholder:t,hint:n},{type:"custom",render:({value:o,onChange:a})=>g(Ht,{value:o,onChange:a,label:e,placeholder:t,hint:n,hideable:!1})})}function rK(e){return{type:"custom",[DO]:{label:e},...lt({},{type:"text",label:e}),render:({value:t,onChange:n})=>g(Zm,{value:LO(t),onChange:n,label:e})}}function iK(e,t,n){return Mt({control:"plainTextarea",label:e,placeholder:t,hint:n},{type:"custom",render:({value:o,onChange:a})=>g(Ht,{value:o,onChange:a,label:e,placeholder:t,hint:n,multiline:!0,hideable:!1})})}var lK={Design:HO,Animation:$O};function cK(e,t){return{type:"custom",render:()=>g(jP,{text:e,values:t})}}function jP({text:e,values:t}){return g("p",{className:"sf-note",children:c(e,t)})}function uK(e){return eg(e)!==null&&e?.tabs!==void 0}var Kh=new Map;function dK(e,t){let n=`${e}\0${t?t.join(""):""}`,o=Kh.get(n)??{type:"custom",tabs:t,[Qh]:{label:e,level:1},bucket:e,marker:!0,render:()=>g(Ve,{})};return Kh.set(n,o),o}var jh=new Map;function pK(e){let t=jh.get(e)??{type:"custom",[Qh]:{label:e,level:1},designGroup:e,marker:!0,...e==="Content"?{}:{fold:e},render:()=>g(Ve,{})};return jh.set(e,t),t}function VP(e){let t=e;return t?.marker===!0&&typeof t.fold=="string"?t.fold:null}function fK(e,t){return VP(e)===t?e:{...e,marker:!0,fold:t,render:()=>g(Ve,{})}}function mK(e){let t=e;if(t.marker===!0&&t.fold===void 0)return e;let{fold:n,...o}=e;return{...o,marker:!0,render:()=>g(Ve,{})}}function hK({title:e,children:t}){let[n,o]=oo(()=>!xl.has(e));return g(aP,{title:e,open:n,onToggle:a=>{o(a),a?xl.delete(e):xl.add(e)},children:t})}var xl=new Set;function YP({swatches:e,current:t,onPick:n,names:o}){let a=e.find(i=>i.toLowerCase()===t.toLowerCase()),s=a?o?.[a]:void 0,r=s?c(s):t;return Ke("div",{className:"sf-swatches",children:[e.map(i=>{let l=o?.[i]?c(o[i]):i;return g(Il,{content:l,children:g(fP,{color:i,selected:t.toLowerCase()===i.toLowerCase(),onClick:()=>n(i),"aria-label":l})},i)}),g("span",{className:"sf-swatch-hex",children:r})]})}function gK(e,t,n=!1){return{type:"custom",render:({value:o,onChange:a})=>g(XP,{label:e,builtIn:t,followsBand:n,value:o,onChange:a})}}function XP({label:e,builtIn:t,followsBand:n,value:o,onChange:a}){let s=typeof o=="string"?o:void 0,{colors:r,n:i}=Ul(),l={background:r.background,surface:r.surface,surface2:Jc(r),band:Qc(r)},u=n?fn:t,d=Oh(s,t,u),p=dl(void 0,u,l),f=n?cl:void 0,m=u===fn?c("the theme's section background"):c("Theme {n} background",{n:i}),b=qP(s,t,r,i,l,a),y=Bt(p.toUpperCase(),m),T=Re(s),S=T?Xt(T,r,i):null;return S?g(ye,{label:c(e),icon:g($h,{}),value:S.hex,caption:S.words,onChange:a,changed:!0,onReset:()=>a(f),resetTo:y,choices:b}):g(Pn,{label:c(e),icon:g($h,{}),value:d?"":dl(s,t,l),inherited:p,resetTo:y,onChange:a,onReset:()=>a(f),choices:b})}function qP(e,t,n,o,a,s){let r=Ch(e,t);return[{label:c("No fill"),color:"",selected:r==="none",onPick:()=>s(pl)},{label:`${c("Section band")} \xB7 ${a.band.toUpperCase()}`,color:a.band,selected:r==="band",onPick:()=>s(fn)},...$l(Re(e)??"",n,o,s)]}function ZP(e,t){return{type:"custom",render:({value:n,onChange:o})=>{let a=n,s=Ah(a,t);return g(K,{label:c(e),icon:g(Cl,{}),changed:!s,action:g(oe,{words:P()?.panel,label:c(e),changed:!s,detail:c("the theme's image stage"),onReset:()=>o(Jn)}),children:YP({swatches:Ph,current:s?mn:fl(a,t),onPick:o,names:kh})})}}}function bK(e=n=>n,t){return ro({_gSectionTheme:Te(du),sectionAccent:{type:"custom",render:({value:n,onChange:o})=>g(_d,{value:e(n),onChange:o,followLabel:t})}})}function rs(e){let t=Z(),n=Ws(e?.view),o=r=>Ll(e.valueKey,r),a=e.numbersIn??(r=>O(t[o(r)])!==void 0),s=e.followsView??pk(n,a);return IP({props:{value:void 0,onChange:()=>{},field:{}},row:e.valueKey?e.row:void 0,table:Qn,label:c(e.label),grid:e.grid,hasOwn:a(n),view:{tier:n,numbersIn:a,followsView:s},convertTo:e.convertTo??(r=>{let i=O(t[o(n)]);return i===void 0?{}:{[o(n)]:r(i)}})})}function de({min:e,max:t,step:n,value:o,onChange:a,suffix:s="",readout:r=!0,notch:i,ariaLabel:l,disabled:u=!1,placeholder:d,placeholderWord:p,onClear:f,units:m,inputMax:b}){let y=i!==void 0&&Number.isFinite(i)&&i>=e&&i<=t;return g("div",{className:y?"sf-slider has-notch":"sf-slider",style:y?{"--sf-notch":(i-e)/(t-e)}:void 0,children:g(_P,{min:e,max:t,step:n,value:o,...o===null&&d!==void 0?{placeholderValue:d}:{},...p?{emptyLabel:c(p)}:{},suffix:s||void 0,...m?{units:m}:{},...b!==void 0?{inputMax:b}:{},showInput:r,label:l===void 0?void 0:c(l),disabled:u,size:"sm",boxSize:"md",className:"sf-slider-track",onChange:T=>{T===null?f?.():T!==o&&a(T)}})})}function JP(e,t){let{min:n,max:o,step:a=1,unsetLabel:s,hint:r,restTrack:i,unsetMark:l,icon:u,unit:d="px"}=t;return{type:"custom",render:({value:p,onChange:f})=>{let m=typeof p=="number"?p:null,b=m===null;return g(K,{label:c(e),icon:u?Dt(u):void 0,value:b?l||s===void 0?void 0:c(s):`${m}${d}`,changed:!b,action:l?kl(l,{changed:!b,onReset:()=>f(null)}):g(oe,{words:P()?.panel,label:c(e),changed:!b,onReset:()=>f(null)}),hint:typeof r=="string"?c(r):r,children:i?i({min:n,max:o,step:a,px:m,label:e,onChange:f}):de({min:n,max:o,step:a,value:m??n,readout:!1,ariaLabel:e,onChange:f})})}}}var ao="Corners",QP={kind:"radius"};function Bl(e){return{type:"custom",render:t=>{let{value:n,onChange:o}=t,a=typeof n=="number"&&Number.isFinite(n)?n:null,s=a!==null;return g(K,{label:c(ao),icon:g(ng,{}),changed:s,action:kl(e.mark,{changed:s,onReset:()=>o(null)}),hint:e.hint,children:g(ek,{tier:e,px:a,name:t.name,onRadius:o})})}}}function Pe(e){let t=Lt();return[t?.values?.[e],n=>t?.onChange(e,n)]}function bg(){return pg({type:"custom",render:()=>g(xP,{})},"always")}function cn(){let e=Lt();return t=>e?.onChangeMany(t)}function ek({tier:e,px:t,name:n,onRadius:o}){let a=e.useFollowed(),[s,r]=Pe(e.sidesKey),i=cn(),l=rs({row:e.row??QP,label:ao,grid:{min:ae,max:qe,step:e.step??1},valueKey:n??"",view:"desktop"}),u=De(s)??[...ia];return g(mP,{label:c(ao),value:u,corners:of,onChange:d=>{let p=De(d)??[];r(p.length===ia.length?null:p)},radius:t,onRadiusChange:l&&n?d=>i({[n]:d,...l.unitPatch(d===null)}):o,radiusMin:l?.grid.min??ae,radiusMax:l?.grid.max??qe,radiusStep:l?.grid.step??e.step??1,radiusPlaceholder:l&&l.unit!=="px"?"\u2013":String(a),...l?{radiusUnit:l.unit,units:l.units}:{}})}function yg(e,t){return to(e,t)}function Sg(){return bg()}function tk({label:e,changed:t=!1,onReset:n=()=>{}}){let{cornerRadiusPx:o}=B(),a=typeof o=="number"?`${o}px`:c("not set");return g(oe,{words:P()?.panel,label:c(e),changed:t,detail:o==null?c("the built-in corners"):Bt(a,c("Styles")),onReset:n})}function nk(){let{cornerRadiusPx:e}=B();return typeof e=="number"?e:ae}function ok(){return Bl({sidesKey:"sectionCornerSides",row:Jr,useFollowed:nk,mark:g(tk,{label:ao}),hint:ak})}var ak="Follows Styles \u25B8 Basics \u25B8 Corners until you set a number here.";function yK(){return ro({_gShape:Te("Shape"),sectionCorners:ok(),...yg(Jr,"sectionCorners"),sectionCornerSides:Sg(),...ze("sectionBorder",dk),...to(Zn,"sectionBorder",{tablet:!0,phone:!0})})}var sk=()=>({width:c("Border width"),sides:{top:c("Border top"),right:c("Border right"),bottom:c("Border bottom"),left:c("Border left")},style:c("Border style"),styles:{solid:c("Solid"),dashed:c("Dashed"),dotted:c("Dotted")},color:c("Border color"),unit:"px"});function rk(e){let t=Object.fromEntries(Object.entries(e).filter(([,n])=>n!=null&&n!==""));return Object.keys(t).length?t:void 0}function ik(){let e;try{let t=ke(B().theme);e=t.themes[t.selected]?.line}catch{e=void 0}return e||Vc.line}function lk({value:e,onChange:t,placeholder:n,presets:o,sides:a=!0,styles:s=!0,above:r={},length:i}){let l=e&&typeof e=="object"?e:{},[u,d]=oo(()=>a?cP(l,r):!1),p=sk(),f=m=>rk(a&&s?m:{width:m.width,color:m.color,...s?{style:m.style}:{}});return g(K,{label:c("Border"),icon:g(UO,{}),action:a?g(iP,{each:u,label:c("Each side"),onChange:d}):void 0,children:g(rP,{label:c("Border"),value:l,each:u,onChange:m=>t(f(m)),placeholder:n,presets:o,words:i?{...p,unit:i.unit}:p,styles:s,max:i?.grid.max??Ga,...i?{step:i.grid.step,units:i.units}:{}})})}function ck({value:e,onChange:t,view:n}){let[o]=Pe("sectionBorder"),[a]=Pe(Nl("sectionBorder")),s=ik(),r=f=>f&&typeof f=="object"?f:{},i=n==="phone"?{...ll(r(o)),...ll(r(a))}:n==="tablet"?r(o):{},l=Z(),u=cn(),d=$("sectionBorder",n),p=rs({row:Zn,label:"Border",grid:{min:0,max:Ga,step:1},valueKey:"sectionBorder",view:n,numbersIn:f=>vl(l[Ll("sectionBorder",f)]),convertTo:f=>{let m=r(l[d]);return vl(m)?{[d]:uk(m,f)}:{}}});return g(lk,{value:e,length:p,onChange:p?f=>u({[d]:f,...p.unitPatch(!vl(f))}):t,placeholder:{sides:lP(i),style:i.style??"solid",color:i.color||s},presets:[s],above:i})}var _g=["width",...za];function vl(e){if(!e||typeof e!="object")return!1;let t=e;return _g.some(n=>O(t[n])!==void 0)}function uk(e,t){let n={...e};for(let o of _g){let a=O(n[o]);a!==void 0&&(n[o]=t(a))}return n}function dk(e){return{type:"custom",render:({value:t,onChange:n})=>g(ck,{value:t,onChange:n,view:e})}}function pk(e,t){let n=El[e];for(;n&&El[n]!==null&&!t(n);)n=El[n];return n??e}function SK(e){return{type:"custom",render:()=>g(fk,{partKey:e})}}function fk({partKey:e}){let[t]=Pe("id"),[n]=Pe("_partStyles"),{textStyles:o}=B(),a=PP(),s=null;try{s=wP().select}catch{s=null}let r=n&&typeof n=="object"?n[e]:void 0,i=Array.isArray(o)?o:null;return g(oP,{name:c("Text"),preview:dh(r,i,{noStyle:c("No style"),styleName:a.textStyles.styleName,cases:(a.copy.panel??OP.copy.panel).cases}),onOpen:()=>{s&&typeof t=="string"&&s(CP(t,e))}})}function Tg(e){let{cornerRadiusPx:t}=B(),n=typeof t=="number"?t:e,o=null;try{let{appState:s,selectedItem:r}=as(l=>l),i=r?.props?.id?String(r.props.id):void 0;o=i?tm(s?.data,i)?.props??null:null}catch{o=null}if(!o)return n;let a=o.sectionCorners;return Qr(a)?a:n}function mk({label:e,changed:t=!1,onReset:n=()=>{}}){let o=Tg(ae);return g(oe,{words:P()?.panel,label:c(e),changed:t,detail:Bt(`${o}px`,c("the section")),onReset:n})}function hk(){return g(Ve,{children:c("Follows the section's Corners until you set a number here.")})}function gk(){return Bl({sidesKey:"cardCornerSides",row:Mn,useFollowed:()=>Tg(ae),mark:g(mk,{label:ao}),hint:g(hk,{})})}function bk(){return{type:"custom",render:()=>g(df,{})}}function _K(){return{_gShape:Te("Shape"),cardCorners:gk(),...yg(Mn,"cardCorners"),cardCornerSides:Sg(),cardCornersApplyAll:bk()}}function yk(){return lt({type:"custom",[bl]:!0,render:e=>g(_k,{...e})},{type:"select",label:ft,options:[{value:"content",label:"Fit content"},{value:"equal",label:"Equal"},{value:[50],label:"Custom: the width of each block in %, the last block left out"}]})}function Sk(e,t){let n=Os(e);if(n!=="custom")return c(Cs.find(a=>a.value===n)?.label??"");let o=ug(So(e,t),t);return o?[...o,100-o.reduce((a,s)=>a+s,0)].join(" / "):c("Custom")}function _k(e){let{value:t,onChange:n}=e,[o]=Pe("content"),a=Array.isArray(o)?o.length:0,s="follows"in e,r=t!=null,i=r?t:s?e.follows:void 0,l=Os(i),u=a>=2&&a<=Gh,d=()=>[...bP[a]??[]],p=no(null),f=S=>{let E=p.current;E&&JSON.stringify(S)===JSON.stringify(E.shares)?n(E.value):S&&n(S)},m=S=>{S===l||S==="custom"&&!u||n(S==="custom"?d():S)},b=c("The width bar works for 2 to {count} blocks.",{count:Gh}),y=r&&(s||t!=="content"),T=SP().widths.hint(a,gP);return g(K,{label:c(ft),icon:g(ts,{}),changed:y,hint:l!=="custom"?void 0:u?T:b,action:g(oe,{words:P()?.panel,label:c(ft),changed:y,disabled:e.readOnly===!0,detail:s?Ft(S=>c(S),Sk(e.follows,a),e.followsView):c("Fit content"),onReset:()=>n(void 0)}),children:Ke("div",{className:"sf-share-row",children:[g("div",{className:"sf-share-pick",children:g(cg,{label:c(ft),value:l,options:Cs.map(S=>({value:S.value,label:S.value==="custom"&&!u?b:c(S.label),icon:yl(g("span",{className:"sf-gallery-pic sf-share-pic",children:Eg(S.weights).map((E,x)=>g("i",{style:{gridColumn:`span ${E}`}},x))}),c(S.label),S.value==="custom"&&!u?b:c(S.label))})),onChange:m,columns:3,cell:xg,tooltips:!1,disabled:e.readOnly===!0})}),l==="custom"&&u?g("div",{onFocus:()=>{p.current={value:t,shares:ug(So(i,a),a)}},onBlur:()=>{p.current=null},children:g(yP,{label:c(ft),count:a,value:So(i,a),onChange:f,readOnly:e.readOnly===!0})}):null]})})}function Eg(e){if(!e)return[3,4];let t=e.reduce((n,o)=>n+o,0);return e.map(n=>Math.round(n/t*12))}function TK(){return ne(Fc,g(YO,{}),As,As[0].value)}function EK(e){return ne("On a phone",g(JO,{}),[{label:"In the header",value:"header"},{label:"In the menu",value:"menu"}],e)}function xK(){return ee("mobile",Sl(ft,g(ts,{}),Nc.map(e=>({label:e.label,value:e.value,picture:g("span",{className:"sf-gallery-pic sf-share-pic",children:Eg(e.weights).map((t,n)=>g("i",{style:{gridColumn:`span ${t}`}},n))})})),Lc,{columns:2,cell:xg}))}var xg={width:"5.75rem",height:"3.25rem",words:!0};function vK(){return Pl("share",yk(),fg)[Nl("share")]}function Tk(){return ee("mobile",Be(Ps,g(tg,{}),_o,Ic,1,_o,"",{clear:{phoneFollows:!1,hint:_o}}))}var Vh={read:e=>e.phoneRow,write:(e,t,n)=>({phoneRow:n}),fieldKey:()=>"phoneRow",ownField:!0};function wK(){let e=Be(Ps,g(tg,{}),ks,Dc,1,ks,"",{clear:{emptyLabel:"Auto"}}),t=Pl("columns",e,{...Vh,tablet:fg.tablet}),n=Pl("columns",e,Vh,{phoneRow:Tk()});return{...t,phoneRow:n.phoneRow}}function CK(e,t,n,o,a,s,r){return{type:"custom",render:({value:i,onChange:l,name:u})=>g(Ek,{label:e,min:t,max:n,step:o,fallback:a,role:s,value:i,onChange:l,name:u??"",length:r})}}function Ek({label:e,min:t,max:n,step:o,fallback:a,role:s,value:r,onChange:i,name:l,length:u}){let d=Z(),p=cn(),f=Ws(u?.view),m=rs({row:u?.row??{kind:"fontSize"},label:e,grid:{min:t,max:n,step:o},valueKey:u?l:"",view:u?.view??"desktop",numbersIn:y=>y===f&&typeof d[l]=="number",followsView:f,convertTo:y=>typeof d[l]=="number"?{[l]:y(d[l])}:{}}),b=y=>m?p({[l]:y,...m.unitPatch(typeof y!="number")}):i(y);return g(K,{label:c(e),icon:g(bi,{noun:s}),action:g(oe,{words:P()?.panel,label:c(e),changed:!Ih(r),detail:c("the Text style in Styles"),onReset:()=>b(Rh),defaultAction:{onPress:()=>b(ja),title:c("Keep this section's own built-in size"),icon:g(GO,{})}}),children:de({min:m?.grid.min??t,max:m?.grid.max??n,step:m?.grid.step??o,value:typeof r=="number"?r:a,...m?{suffix:m.unit,units:m.units}:{suffix:"px"},ariaLabel:e,onChange:b})})}function Ja(e,t,n){return[{label:"Auto",value:""},...Array.from({length:e},(o,a)=>({label:a===0?`1 ${t}`:`${a+1} ${n}`,value:String(a+1)}))]}function OK(){return{_gCellWidth:Te("Cell size"),gridSpan:ee("desktop",ne("Positions",g(ts,{}),Ja(fa,"position","positions"),"")),gridRowSpan:ee("desktop",ne("Rows tall",g(ns,{}),Ja(ha,"row","rows"),"")),[fi]:Be("At card",g(ag,{}),1,mi,1,1,""),[it("gridSpan")]:ee("mobile",ne("Positions",g(ts,{}),[{label:"Full row",value:""},...Ja(ma,"position","positions").slice(1)],"")),[it("gridRowSpan")]:ee("mobile",ne("Rows tall",g(ns,{}),Ja(ha,"row","rows"),""))}}function Z(){let e=null,t=null;try{e=Zh(xk),t=as(n=>n).selectedItem}catch{t=null}return e??t?.props??{}}var xk=kO(null);function vk({min:e,max:t,step:n,px:o,label:a,onChange:s,desktopKey:r,fallback:i}){let l=Z()[r],u=Oa(void 0,l,i);return g(Ve,{children:de({min:e,max:t,step:n,value:Oa(o,l,i),readout:!1,ariaLabel:a,notch:u,onChange:s})})}function wk({label:e,desktopKey:t,fallback:n,unit:o="px",changed:a=!1,onReset:s=()=>{}}){let r=Z()[t],i=Oa(void 0,r,n);return g(oe,{words:P()?.panel,label:c(e),changed:a,detail:Ft(l=>c(l),`${i}${o}`),onReset:s})}function Ck(e){return JP(e.label,{icon:e.icon,min:e.min,max:e.max,step:e.step,unit:e.unit,unsetLabel:"Follows Desktop",unsetMark:g(wk,{label:e.label,desktopKey:e.desktopKey,fallback:e.fallback,unit:e.unit}),restTrack:t=>g(vk,{...t,desktopKey:e.desktopKey,fallback:e.fallback})})}var Ok={Top:"Padding top",Bottom:"Padding bottom",Left:"Padding left",Right:"Padding right"},Pk={Top:Al,Bottom:sg,Left:rg,Right:ig},kk=e=>{let t=Pk[e];return g(t,{})};function PK(e={}){let t=e.keys?.top??"sectionPaddingTop",n=e.keys?.bottom??"sectionPaddingBottom",o=e.group!==!1,a=T=>Ok[T],s=T=>Be(a("Top"),g(Al,{}),fe.min,fe.max,fe.step,T,"px"),r=(T,S,E,x=fe)=>ee("mobile",Ck({label:a(T),icon:kk(T),desktopKey:S,min:x.min,max:x.max,step:x.step,fallback:E})),i=e.top??fe.min,l=e.bottom??fe.min,u="sectionPaddingLeft",d="sectionPaddingRight",p=e.sideBounds??fe,f=e.side??p.min,m=e.sidePhone??f,b=e.phone===!0,y=T=>b?ee("desktop",T):T;return ro({...o?{_gSpacing:Te("Padding")}:{},[t]:y(s(i)),...b?{[it(t)]:r("Top",t,i)}:{},...e.only==="top"?{}:{[n]:y(Be(a("Bottom"),g(sg,{}),fe.min,fe.max,fe.step,l,"px")),...b?{[it(n)]:r("Bottom",n,l)}:{}},...e.sides?{[u]:y(Be(a("Left"),g(rg,{}),p.min,p.max,p.step,f,"px")),...b?{[it(u)]:r("Left",u,m,p)}:{},[d]:y(Be(a("Right"),g(ig,{}),p.min,p.max,p.step,f,"px")),...b?{[it(d)]:r("Right",d,m,p)}:{}}:{}})}function kK(e,t){let n=Object.fromEntries(Object.entries(t).map(([s,r])=>[s,s in e&&eg(r)?e[s]:r])),o={},a=!1;for(let[s,r]of Object.entries(e)){if(s in t){a||Object.assign(o,n),a=!0;continue}o[s]=r}return a||Object.assign(o,n),o}var Qa="Width";function AK(e,t=Nh,n=!0){let o=t.map(a=>({label:Nt[a],value:a}));return ro({...n?{_gWidth:Te(Qa)}:{},widthMode:{type:"custom",render:({onChange:a,field:s})=>g(K,{label:c(Qa),icon:g(nP,{}),action:n?g($P,{inherited:s?.inherited??!1,onReset:()=>a(gl),label:Qa}):void 0,children:eo({options:o,value:s?.currentValue||e,onChange:a,ariaLabel:Qa})})}})}function RK({fill:e=!1}={}){let t=(a,s)=>({type:"custom",render:({value:r,onChange:i})=>g(Ak,{value:r,onChange:i,view:a,badge:s,fill:e})}),n=()=>Ol("sectionHeightMode"),o=()=>Ol("sectionHeightMode");return ro({_gHeight:Te(Yt),...ze("sectionHeightMode",a=>a==="desktop"?t(a):t(a,s=>g(Lk,{view:a,onClear:()=>s(void 0)}))),...ze("sectionHeightValue",n),...ze("sectionHeightUnit",o)})}function Ak({value:e,onChange:t,view:n,badge:o,fill:a=!1}){let s=Z(),{mode:r,number:i,unit:l}=Rk(n,s,e);return g(K,{label:Yt,icon:Dt(g(ns,{})),action:o?o(t):void 0,children:Ke("div",{className:"es-width-stack",children:[eo({options:[{label:"Auto",value:"auto"},{label:"Fixed",value:"fixed"},{label:"Screen",value:"screen"},...a?[{label:"Fill",value:"fill"}]:[]],value:r,onChange:t,ariaLabel:Yt}),i?g(Nk,{view:n,mode:r,menu:l}):null]})})}function vg(e,t){return e==="phone"&&wo(t)?wu(t):xu(t)}function is(e,t){return e==="desktop"||(e==="tablet"?wo(t):vu(t))?null:vg(e,t)}function Rk(e,t,n){let o=(a=>Su.includes(a))(n)?n:is(e,t)?.mode??"auto";return{mode:o,number:o!=="auto"&&o!=="fill",unit:o==="fixed"}}function Ik(e,t,n,o){let a=is(e,t);return!a||e==="desktop"?null:o===void 0?{}:{[$("sectionHeightMode",e)]:a.mode,...a.mode==="fixed"?{[$("sectionHeightUnit",e)]:a.unit}:{},...n==="sectionHeightUnit"?{[$("sectionHeightValue",e)]:a.value}:{},[$(n,e)]:o}}function Yh(e,t,n){let o=Lt(),a=is(e,Z());return!o||!a?{followed:null,write:n}:{followed:a,write:s=>o.onChangeMany(r=>{let i=Ik(e,r,t,s);return i===null?{[$(t,e)]:s}:Object.keys(i).length?i:null})}}function Nk({view:e,mode:t,menu:n}){let o=Lt(),a=Z(),s=$("sectionHeightValue",e),r=$("sectionHeightUnit",e),i=T=>S=>o?.onChangeMany(()=>({[T]:S})),{followed:l,write:u}=Yh(e,"sectionHeightValue",i(s)),{write:d}=Yh(e,"sectionHeightUnit",i(r)),p=t==="screen"?"%":a[r],f=RO(_u,"px",l?l.unit:p),m=f==="%"?Eu:Tu,b=a[s],y=n?{options:["px","%"],label:c("Unit"),onChange:T=>d(T)}:void 0;return de({min:m.min,max:m.max,step:m.step,value:l?null:typeof b=="number"?b:m.fallback,...l?{placeholder:l.value}:{},suffix:f,...y?{units:y}:{},ariaLabel:Yt,onChange:u})}function Lk({view:e,onClear:t}){let n=Z(),o=is(e,n)===null,a=e==="phone"&&wo(n),s=vg(e,n),r=Ft(i=>c(i),s.mode==="auto"?c("Auto"):`${s.value}${s.unit}`,a?"tablet":"desktop");return g(oe,{words:P()?.panel,label:c(Yt),changed:o,detail:r,onReset:t})}function IK(e={}){let t=e.intro===!0,n=s=>({type:"custom",render:({value:r,onChange:i,id:l,name:u})=>g(Uk,{value:r,onChange:i,labelId:`${l??u??"stickTop"}-label`,view:s,intro:t})}),o=s=>({type:"custom",render:({value:r,onChange:i})=>g(Hk,{value:r,onChange:i,view:s,intro:t})}),a=s=>({type:"custom",render:({value:r,onChange:i})=>g(Mk,{value:r,onChange:i,view:s,intro:t})});return{_gStick:Te(mh,{dot:t?Bk:al}),...ze("stickTop",n),...ze("stickTopDistance",o),...to(Xn,"stickTopDistance",{tablet:!0,phone:!0}),...e.screens?ze(qn,a):{},...t?{}:{[tl]:Dk()},...t||e.above===!1?{}:{[ol]:Fk()}}}function Dk(){let e=ne(hh,g(Al,{}),gh,bh);return ee("desktop",{...e,render:t=>{let n=e.render({...t,value:nl(t.value),onChange:o=>t.onChange(Sh(o))});return kl(n,{hint:c(yh)})}})}function Fk(){let e=ct(_h,!1,g(lg,{}),Th);return ee("desktop",{...e,render:t=>e.render({...t,onChange:n=>t.onChange(n===!0?!0:void 0)})})}var Bk={any:[al,Eh]};function wg(e,t,n,o,a){let s=Lt(),r=Z(),i=e==="desktop"||so(e,r)?null:Hl(e,pn(r,{intro:o}));return{followed:i,write:(i||a)&&s?l=>s.onChangeMany(u=>{let d=$k(e,u,l,t,o),p=d===null?{[$(t,e)]:l}:d;return Object.keys(p).length?{...p,...a?.(l)??{}}:null}):n}}function Hk({value:e,onChange:t,view:n,intro:o}){let a=Z(),s=pn(a,{intro:o}),r=d=>{let p=vo(d);return p==="desktop"||so(p,a)},i=rs({row:Xn,label:"Distance from top",grid:{min:Se.min,max:Se.max,step:Se.step},valueKey:"stickTopDistance",view:n,numbersIn:d=>r(d)&&O(a[Ll("stickTopDistance",d)])!==void 0,followsView:n==="phone"&&s.ownTablet?"tablet":"desktop"}),{followed:l,write:u}=wg(n,"stickTopDistance",t,o,i?d=>i.unitPatch(d===void 0):void 0);return g("div",{className:"sf-field",children:de({min:i?.grid.min??Se.min,max:i?.grid.max??Se.max,step:i?.grid.step??Se.step,value:l?null:typeof e=="number"?e:Se.fallback,...l?{placeholder:l.distance}:{},...i?{suffix:i.unit,units:i.units}:{suffix:"px"},ariaLabel:c("Distance from top"),onChange:u})})}function Mk({value:e,onChange:t,view:n,intro:o}){let{followed:a,write:s}=wg(n,qn,t,o);return g(K,{label:c(el),icon:Dt(g(ns,{})),children:de({min:Za.min,max:Za.max,step:Za.step,value:a?null:O(e)??Za.default,...a?{placeholder:a.screens}:{},ariaLabel:c(el),onChange:s})})}function so(e,t){return e==="tablet"?sl(t):rl(t)}function Hl(e,t){return e==="phone"?{on:t.tablet,distance:t.tabletDistance,unit:t.tabletUnit,screens:t.tabletScreens}:{on:t.desktop,distance:t.desktopDistance,unit:t.desktopUnit,screens:t.desktopScreens}}function $k(e,t,n,o="stickTopDistance",a=!1){if(e==="desktop"||so(e,t))return null;if(n===void 0)return{};let s=Hl(e,pn(t,{intro:a})),r=e==="phone"&&so("tablet",t)?d=>$(d,"tablet"):d=>d,i=(d,p)=>t[r(d)]==null?{}:{[$(d,e)]:p},l=Xn.unitKey,u=t[r(l)]==null?{}:{[$(l,e)]:s.unit};return{[$("stickTop",e)]:!0,...i("stickTopDistance",s.distance),...u,...i(qn,s.screens),[$(o,e)]:n}}function Uk({value:e,onChange:t,labelId:n,view:o,intro:a}){let s=Z(),r=pn(s,{intro:a}),i=o==="phone"?r.phone:o==="tablet"?r.tablet:a?r.desktop:e===!0,l=o==="phone"&&r.ownTablet,u=o==="desktop"?null:Hl(o,r),d=u?.on?M(u.distance,u.unit):c("Off");return g(K,{label:c(Qi),labelId:n,icon:Dt(g(lg,{})),action:Ke(Ve,{children:[o!=="desktop"?g(oe,{words:P()?.panel,label:c(Qi),changed:so(o,s),detail:Ft(p=>c(p),d,l?"tablet":"desktop"),onReset:()=>t(void 0)}):null,g(Rl,{checked:i,onChange:t,ariaLabelledBy:n})]})})}var Xh="e.g. about";function NK(){return{_gAnchor:Te("Anchor"),anchor:Mt({control:"plainText",label:"Name",placeholder:Xh},{type:"custom",render:({value:e,onChange:t})=>g(Vf,{value:e,onChange:t,nameBox:(n,o)=>g(Ht,{value:n,onChange:o,label:"Name",placeholder:Xh,hideable:!1,markup:!1})})})}}function LK(){return{_gAdvanced:Te("Advanced"),[pu]:Ml}}var Ml={type:"custom",render:({value:e,onChange:t})=>g(K,{label:c("Custom CSS"),icon:Dt(g(dP,{})),children:g(TP,{"aria-label":c("Custom CSS"),spellCheck:!1,autoGrow:!0,className:"font-mono",value:typeof e=="string"?e:"",onChange:n=>t(n.target.value)})})};function DK(e,t,n){return{type:"custom",render:({value:o,onChange:a,id:s,name:r})=>{let i=`${s??r??e}-datetime`,l=Date.parse(typeof o=="string"?o:"");return g(K,{label:c(e),icon:t,htmlFor:i,hint:n===void 0?void 0:c(n),children:g(hP,{id:i,value:Number.isFinite(l)?new Date(l):null,onChange:u=>a(u?u.toISOString():"")})})}}}function ct(e,t,n,o){return{type:"custom",...lt({},{...os,label:e}),render:a=>{let{value:s,onChange:r,id:i,name:l}=a,u="follows"in a,d=a,p=typeof s=="boolean",f=typeof d.follows=="boolean"?d.follows:t,m=p?s:u?f:t,b=`${i??l??e}-label`,y=d.readOnly===!0,T=g(Rl,{checked:m,onChange:r,disabled:y,ariaLabelledBy:b});return g(K,{label:c(e),labelId:b,icon:n,hint:o===void 0?void 0:c(o),action:u?Ke(Ve,{children:[g(oe,{words:P()?.panel,label:c(e),changed:p,detail:d.followsNoView?c(f?"On":"Off"):Ft(S=>c(S),c(f?"On":"Off"),d.followsView),disabled:y,onReset:()=>r(void 0)}),T]}):T})}}}function Cg(){return{type:"custom",render:({value:e,onChange:t,id:n,name:o})=>{let a=`${String(n??o??"pageBackground")}-colour`;return g(Gk,{label:"Background",icon:g(ZO,{}),id:a,value:e,shown:yi(e),onChange:t})}}}function FK(e,t,n){return{type:"custom",render:({value:o,onChange:a})=>g(ye,{label:c(e),icon:n,value:o||t,onChange:a})}}function Gk({label:e,icon:t,id:n,value:o,shown:a,onChange:s}){let{colors:r,n:i}=Ul(),l=Re(o),u=l?Xt(l,r,i):null;return g(ye,{label:c(e),icon:t,id:n,value:u?u.hex:a,caption:u?.words,onChange:s,choices:$l(l??"",r,i,s)})}function BK(){return{type:"custom",render:e=>{let{value:t,onChange:n}=e,o=e;return g(zk,{value:typeof t=="string"?t:"",onChange:n,twin:"follows"in e?{follows:o.follows,view:o.followsView}:void 0})}}}function $l(e,t,n,o){let a=Ea(e);return Bu(t,n).map(s=>({label:s.label,color:s.value,selected:a===s.name,onPick:()=>o(s.name)}))}function zk({value:e,onChange:t,twin:n}){let{colors:o,n:a}=Ul(),s=o.background,r=Bt(s.toUpperCase(),c("Theme {n} background",{n:a})),[i,l]=Pe(em),[u]=Pe(Ti),d=typeof u=="string"&&u.trim()!=="",p=_a(i),f=v=>l(_a(v)||void 0),m=Ea(e),b=m?Xt(m,o,a):null,y=$l(e,o,a,t),T=n?()=>t(void 0):()=>t(""),S=s,E=r;if(n){let v=Ea(n.follows),w=Ta(n.follows),I=v?Xt(v,o,a):w?{hex:w,words:w.toUpperCase()}:null;S=I?.hex??s,E=Ft(C=>c(C),I?I.words:r,n.view)}let x=!n&&(Wn(e)||d)?g(Wk,{value:p,onChange:f}):null;return b?g(ye,{label:c("Fill"),icon:g(Cl,{}),value:b.hex,caption:b.words,onChange:t,changed:!0,onReset:T,resetTo:E,choices:y,children:x}):g(Pn,{label:c("Fill"),icon:g(Cl,{}),value:e,inherited:S,resetTo:E,onChange:t,onReset:T,choices:y,children:x})}function Wk({value:e,onChange:t}){return eo({options:Sa.map(n=>({label:n.label,value:n.value,hint:n.hint})),value:e,onChange:t,ariaLabel:c("Fill")})}function Kk(e,t,n){if((e?.content??[]).some(s=>s?.props?.id===t))return gt(n);let o=nm(e,t);if(o.length===0)return null;let a=gt(zs(n));if(a!==null)return a;for(let s=o.length-1;s>0;s-=1){let r=gt(zs(o[s].sectionAccent));if(r!==null)return r}return gt(o[0].sectionAccent)}function Ul(){let e=ke(B().theme),[t]=Pe("sectionAccent"),n=null;try{let{appState:a,selectedItem:s}=as(i=>i),r=s?.props?.id?String(s.props.id):void 0;n=r?Kk(a?.data,r,t):null}catch{n=null}let o=n!==null&&e.themes[n]?n:e.selected;return{colors:ce(e.themes[o]),n:o+1}}function HK(){return bg()}var MK={top:g(jO,{}),right:g(KO,{}),bottom:g(zO,{}),left:g(WO,{})};function $K(e,t,n,o,a,s,r){let i=p=>t.find(f=>f.value===p),l=p=>({value:p,label:"",disabled:!0,title:o}),u=p=>{let f=t.find(b=>b.cell===p);if(!f)return l(`missing-${p}`);let m=s?.[p];return m?{value:f.value,label:f.label,icon:m}:{value:f.value,label:f.label}},d=[l("corner-top-left"),u("top"),l("corner-top-right"),u("left"),l("centre"),u("right"),l("corner-bottom-left"),u("bottom"),l("corner-bottom-right")];return{type:"custom",render:({value:p,onChange:f})=>{let m=t.some(b=>b.value===p)?p:n;return g(K,{label:c(e),icon:a,value:i(m)?.label?c(i(m).label):r?c(r):"",children:RP(c,{label:e,value:m,onChange:f,points:d})})}}}function UK(e,t,n){return{type:"custom",options:t,render:({value:o,onChange:a,field:s})=>g(wm,{label:e,options:(s.options??t).map(r=>({...r,label:c(r.label)})),value:Array.isArray(o)?o:[],onChange:a,...n?{emptyLabel:c(n)}:{}})}}function Og(e,t={}){return{type:"custom",render:({value:n,onChange:o})=>{let a={value:n,onChange:o,...t};return g(e,{...a})}}}var jk={image:"Image",video:"Video"},GK=Lr.map(e=>({label:jk[e],value:e}));function zK(e,t,n){let o=Object.keys(Fr).map(a=>({label:Fr[a],value:a,picture:n[a]}));return{type:"custom",...lt({},{type:"radio",label:e,options:o.map(a=>({value:a.value,label:a.label}))}),render:({onChange:a})=>g(Yk,{label:e,icon:t,options:o,onChange:a})}}function Vk(e,t,n){let o=Pp(e,t,n);if(o!==void 0)return o==="save-makes-frame"?c("A frame is made from this video when you save the page."):o==="starts-dark"?c("This video starts dark, so no frame was made. The slide shows its background colour while the video loads. Choose Image to show a picture."):o==="outside"?c("This video is on another website, so no frame can be made. The slide shows its background colour while the video loads. Choose Image to show a picture."):o==="unsupported"?c("This video's file type gives no frame. The slide shows its background colour while the video loads. Choose Image to show a picture."):o==="failed"?c("No frame could be made from this video. It is tried again the next time you save the page. The slide shows its background colour while the video loads."):o==="image-no-frame"?c("The slide shows your Image while the video loads, because this video has no frame."):void 0;let a=Op(e);return a==="frame-missing-image"?c("This video has no frame yet. The slide shows its image until one is made."):a==="frame-missing-surface"?c("This video has no frame yet. The slide shows its background colour until one is made."):a==="image-missing-frame"?c("No image yet. The slide shows the video's frame until you choose one."):a==="image-missing-surface"?c("No image yet. The slide shows its background colour until you choose one."):void 0}function Yk({label:e,icon:t,options:n,onChange:o}){let a=Lt(),s=a?.values??{},r=Nn(s),i=Zh(IO),l=ef(i?.docId??null),u=null;try{u=as(p=>p.appState.data)}catch{u=null}let d=nf(a?.id,u,l);return g(K,{label:c(e),icon:Dt(t),hint:Vk(s,d,i?.hasUnsavedEdits??!1),children:eo({options:n,value:r,onChange:o,ariaLabel:e})})}function WK(e,t,n,o={}){let a={type:"custom",[FO]:!0,render:({value:s,onChange:r,name:i})=>g(xm,{value:s||"",onChange:r,fieldKey:i,label:e,accept:t,placeholder:n,focusKey:o.focus,focusWhen:o.focusWhen,frameKey:o.frame}),...o.focus?{focusKey:o.focus}:{},...o.focusWhen?{focusWhen:o.focusWhen}:{}};return o.focus?ee("each",a):a}var KK={HeroSingle:[Ep.image],HeroSlide:["videoFrame","videoFramePhone"],ContactLocations:["locations[].photo"],ProcessSteps:["steps[].image"]};function Xk(e){let t=c(e.status??"");return e.ok&&typeof e.lat=="number"&&typeof e.lng=="number"?`${t} \xB7 ${e.lat.toFixed(4)}, ${e.lng.toFixed(4)}`:t}function Pg({value:e,onChange:t,label:n}){let o=e||{},a=Lt(),s=a?a.values!==a.node.props:!0,r=!!o.pending&&s,i=!!o.pending&&!s,l=!!xe(kP()).geocode,u=Jh(),d=(p,f)=>t({...o,[p]:f??void 0});return Ke(Ve,{children:[g(K,{label:c(n),icon:g(Uh,{}),action:l?g(Il,{content:c("Find from the address (OpenStreetMap)"),children:g(dg,{"aria-label":c("Find from the address"),"aria-busy":r||void 0,disabled:r,onClick:()=>t({...o,pending:!0,ok:!1,status:"Finding\u2026"}),children:g(QO,{})})}):void 0,children:l&&o.status?g(ya,{compact:!0,oneLine:!0,spaced:!1,status:r?"busy":o.ok&&!i?"found":"notfound",statusText:r?c("Finding\u2026"):i?c(wi):c(o.status),hint:Xk(o)}):null}),g(K,{label:c("Enter by hand"),labelId:u,icon:g(VO,{}),action:g(Rl,{checked:!!o.manual,onChange:p=>t({...o,manual:p}),ariaLabelledBy:u})}),o.manual&&g(K,{label:c("Latitude, longitude"),icon:g(Uh,{}),children:Ke("div",{style:{display:"grid",gridTemplateColumns:"1fr 1fr",gap:8,width:"100%",minWidth:0},children:[g(zh,{value:typeof o.lat=="number"?o.lat:null,onChange:p=>d("lat",p),min:-90,max:90,step:1e-4,placeholder:c("Latitude")}),g(zh,{value:typeof o.lng=="number"?o.lng:null,onChange:p=>d("lng",p),min:-180,max:180,step:1e-4,placeholder:c("Longitude")})]})})]})}function qk(e,t){return t===null||t<0||t>=e.length?"":e[t]?.text??""}function Zk(e,t,n){let o=e.map(a=>({text:a?.text??""}));return t===null||t<0||t>=e.length?o:o.map((a,s)=>s===t?{text:n}:a)}function Jk(e,t,n){if(n===null||n>=t.length)return null;for(let o=0;o<n;o+=1)if(e[o]!==t[o])return null;return e[n]!==t[n]&&t.includes(e[n])||e[n]!==t[n]&&t.length!==e.length?null:n}var jK={label:"Ticker items",icon:g(qO,{})};function VK(e,t,n,o){return{type:"custom",[je]:{control:"textList",label:e,placeholder:n,itemKey:"text",rendering:o},...lt({},{...hg.textList,label:e}),render:({value:a,onChange:s})=>g(Qk,{label:e,icon:Dt(t),items:Array.isArray(a)?a:[],placeholder:n,onChange:s,markup:o==="markup"})}}function Qk({label:e,icon:t,items:n,placeholder:o,onChange:a,markup:s=!1}){let r=no(null),[i,l]=oo(null),u=p=>p.map(f=>({text:f?.text??""})),d=p=>{let f=Jk(n,p,i);f===null&&(r.current=null),l(f),a(u(p))};return g(uP,{label:c(e),icon:t,noun:c("item"),items:n,onChange:d,newItem:()=>({text:""}),open:null,onOpen:()=>{},renderItem:()=>null,above:s?g(Ci,{target:r,value:qk(n,i),onChange:p=>a(Zk(n,i??-1,p)),disabled:i===null,label:i===null?c("Formatting \u2014 click a row first"):c("Formatting \u2014 row {n}",{n:i+1})}):void 0,renderRow:(p,f,m)=>g("input",{type:"text",className:s&&i===f?"sf-list-marking":void 0,value:p?.text??"",placeholder:c(o),"aria-label":c("{label} {n}",{label:c(e),n:f+1}),onChange:b=>m({text:b.target.value}),onFocus:b=>{r.current=b.currentTarget,l(f)}})})}function YK(e,t){let n=`${e.label} \u2014 row ${t+1}`;return Mt({control:"plainText",label:n,placeholder:e.placeholder,offPage:e.offPage},{type:"custom",render:({value:o,onChange:a})=>g(Ht,{value:o,onChange:a,label:c("{label} \u2014 row {n}",{label:c(e.label),n:t+1}),placeholder:e.placeholder,hideable:!1,markup:e.rendering==="markup"})})}function XK(e){return{_gCards:Te("Cards"),coverIndex:ne("Cover image",g(XO,{}),Tm,String(1),e?.coverHint??"A card's opening picture \u2014 a card pinned to a finish keeps its own."),imageBackground:ZP("Image background",Ka),cardImage:kg()}}function qK(){return{outline:ne("Card outline",g(eP,{}),_m,Sm),indexBadge:ne("Card number",g(ag,{}),ki,Pi),showBadge:ct("Product badge",!0,g(bi,{noun:"tag"}))}}function ZK(e){let t=e?.defaults??{showCardSizes:!0,showCardBuy:!0,showCardPage:!0},n=a=>({...os,label:es.find(s=>s.id===a).label}),o=a=>lt(Ol(wl),n(a));return{_gShowOnCard:Te("Show on a card"),[wl]:lt({type:"custom",render:()=>g(eA,{rest:{showCardPrice:!0,showCardFinishes:!0,...t}})},n(wl)),showCardFinishes:o("showCardFinishes"),showCardSizes:o("showCardSizes"),showCardBuy:o("showCardBuy"),showCardPage:o("showCardPage")}}var wl="showCardPrice",es=[{id:"showCardPrice",label:"Price"},{id:"showCardFinishes",label:"Finish swatches"},{id:"showCardSizes",label:"Sizes"},{id:"showCardBuy",label:"Buy button"},{id:"showCardPage",label:"Page button"}];function eA({rest:e}){let t=Z(),n=cn(),o=r=>typeof t[r]=="boolean"?t[r]:void 0,a=r=>o(r)??e[r],s=es.some(({id:r})=>o(r)!==void 0&&o(r)!==e[r]);return g(Gl,{parts:es,changed:s,shown:a,onPress:(r,i)=>n({[r]:i}),onReset:()=>n(Object.fromEntries(es.map(({id:r})=>[r,void 0])))})}function JK(e,t="display"){let n=it(t);return{[t]:ee("desktop",{type:"custom",render:({value:o,onChange:a})=>g(Gl,{parts:e,changed:im(o),shown:s=>va(o,s),onPress:(s,r)=>a(cm(o,s,r)),onReset:()=>a(void 0)})}),[n]:ee("mobile",{type:"custom",render:({value:o,onChange:a})=>g(tA,{parts:e,desktopKey:t,value:o,onChange:a})})}}function Gl({parts:e,changed:t,shown:n,onPress:o,onReset:a,detail:s,disabledReason:r}){let i=c("Display");return g(K,{label:i,icon:g(MO,{}),changed:t,action:g(oe,{words:P()?.panel,label:i,changed:t,detail:s,onReset:a}),children:g(pP,{label:i,items:e.map(l=>({id:l.id,label:c(l.label),shown:n(l.id),...r?{disabled:!0,disabledReason:c(r)}:{}})),onChange:o})})}function tA({parts:e,desktopKey:t,value:n,onChange:o}){let a=Z()[t];return g(Gl,{parts:e,changed:lm(n),shown:s=>vi(a,n,s),onPress:(s,r)=>o(um(n,s,r)),onReset:()=>o(Pa),detail:c("the same as Desktop")})}function kg(e=Ef){return Be("Card image",g(ng,{}),ae,qe,Tf,ae,e,{clear:{hint:ae},hint:"Rounds the picture. The card's own corner is in Styles."})}function nA(){return to(li,"cardImage")}function QK(){return{cardImage:kg(li),...nA()}}function ej(){return Bl({sidesKey:"cornerSides",row:xf,step:vf,useFollowed:()=>ae,mark:g(oA,{label:wf}),hint:c("Rounds the picture. Left alone it stays square.")})}function oA({label:e,changed:t=!1,onReset:n=()=>{}}){return g(oe,{words:P()?.panel,label:c(e),changed:t,onReset:n})}function tj(){return{type:"custom",render:({value:e,onChange:t})=>g(iA,{value:typeof e=="string"?e:"",onChange:t})}}var qh="own";function nj(){let e=[{value:qh,label:"Layout's own",picture:Tl(Array.from({length:8},()=>[3,1]))},...Object.entries(pa).map(([t,n])=>({value:t,label:n.label,picture:Tl([...n.phone,...n.phone])}))];return ee("mobile",Sl("Layout",g(og,{}),e,qh,{columns:2,cell:Mh}))}function aA({layout:e,width:t}){let n=pi(e),o=n?`${n[0]}/${n[1]}`:void 0;return g("span",{"aria-hidden":"true",style:{display:"grid",width:t,gridTemplateColumns:"repeat(12, minmax(0, 1fr))",gridAutoRows:o?"auto":6,gridAutoFlow:"row dense",gap:2},children:If(e).map(([a,s],r)=>g("i",{className:"block rounded-xs bg-current opacity-60",style:{gridColumn:`span ${a}`,gridRow:`span ${s}`,aspectRatio:o}},r))})}var sA={width:"3.5rem",height:"2.5rem",words:!1},rA=200;function iA({value:e,onChange:t}){let[n,o]=oo(null),[a,s]=oo(4),r=no(null);AO(()=>{let m=r.current;if(!m||typeof ResizeObserver!="function")return;let b=()=>s(m.getBoundingClientRect().width>=rA?4:3);b();let y=new ResizeObserver(b);return y.observe(m),()=>y.disconnect()},[]);let i=e?j(Gn,e):void 0,l=i?e:"",u=ui(n,l),d=ui(n,"").length,p=Ff("no-symbol"),f=[{value:"",label:c("Not chosen"),icon:Bh(p,c("Not chosen"))},...u.map(m=>({value:m,label:c(Gn[m].label),icon:g(aA,{layout:Gn[m],width:40})}))];return g(K,{label:c("Layout"),icon:g(og,{}),value:i?c(i.label):void 0,children:g("div",{ref:r,style:{flex:"1 1 auto",minWidth:0},children:g(cg,{label:c("Layout"),value:l,options:f,onChange:t,columns:a,cell:sA,header:Ke("div",{className:"mb-2 flex flex-col gap-1",style:{minWidth:"11rem"},children:[g("span",{className:"text-2xs text-ink-faint",children:c("Photos in a row")}),g(sP,{options:[{id:"all",label:c("All")},...kf.map(m=>({id:String(m),label:String(m)}))],value:n===null?"all":String(n),ariaLabel:c("Photos in a row"),onChange:m=>o(m==="all"?null:Number(m))}),g("span",{className:"text-2xs text-ink-faint",children:c("{n} of {total} layouts",{n:d,total:ci.length})})]})})})})}var dA="Applies to panels, cards, inputs and buttons. Round things \u2014 color swatches, switches, status dots \u2014 stay round.",zl="Corners";function Ag({value:e,onChange:t,length:n}){let o=e===null;return ls(cA,{label:c(zl),icon:ls(uA,{}),changed:!o,action:ls(lA,{words:P()?.panel,label:c(zl),changed:!o,detail:c("the built-in corners"),onReset:()=>t(null)}),hint:c(dA),children:ls(de,{min:n?.grid.min??ae,max:n?.grid.max??qe,step:n?.grid.step??1,value:e,...e===null?{}:{suffix:n?.unit??"px",...n?{units:n.units}:{}},placeholder:ae,placeholderWord:"Auto",onClear:()=>t(null),ariaLabel:c(zl),onChange:t})})}import{jsx as io}from"react/jsx-runtime";import{SettingsDefaultReset as pA,SettingsField as fA}from"efficient-easel/panel";import{IconPicker as mA}from"efficient-shell/ui";import{ShadowIcon as hA}from"efficient-easel/icons";import{SHADOW_PREVIEW as gA}from"efficient-easel/screen/lib/document/shadow-values";var Wl={none:"None",soft:"Soft",lifted:"Lifted"},bA="Applies to cards \u2014 products, brands, journal entries and filter cells. Round things like swatches and status dots are never shadowed.";function Rg({value:e,onChange:t}){let n=e===null,o=e??Us;return io(fA,{label:c("Card shadow"),icon:io(hA,{}),value:c(Wl[o]),changed:!n,action:io(pA,{words:P()?.panel,label:c("Card shadow"),changed:!n,detail:c(Wl[Us]),onReset:()=>t(null)}),hint:c(bA),children:io(mA,{label:c("Card shadow"),value:o,options:au.map(a=>({value:a,label:c(Wl[a]),icon:io("span",{className:"sf-shadow-chip border border-line bg-surface",style:{boxShadow:gA[a]}})})),onChange:t})})}import{jsx as Ig}from"react/jsx-runtime";import{ShadowIcon as yA}from"efficient-easel/icons";import{DEFAULT_SHADOW_COLOR as Ng}from"efficient-easel/screen/lib/document/shadow-values";var SA="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 Lg({value:e,onChange:t}){let n=e===null;return Ig(Pn,{label:c("Shadow color"),icon:Ig(yA,{}),value:e??"",inherited:Ng,resetTo:Ng,onChange:t,onReset:()=>t(null),hint:c(SA)})}import{jsx as us}from"react/jsx-runtime";import{SettingsDefaultReset as _A,SettingsField as TA}from"efficient-easel/panel";import{AlignSeparateIcon as EA}from"efficient-easel/icons";function cs(e,t){return e==="tablet"?null:e==="mobile"?t.phone:t.desktop}var xA="The space between the blocks inside a row, a grid or a box. Auto means each one keeps the spacing it already has.",vA="The space between the blocks inside a row, a grid or a box, on a phone. Until you set it, a phone uses half the desktop gap.",Kl="Block gap",Dg=qt.Grid;function Fg(e,t){return cs(e,{desktop:{key:"block_gap",value:t.gap,followsPx:null},phone:{key:"block_gap_phone",value:t.phone,followsPx:t.gap===null?null:Ys(t.gap)}})}function Bg({value:e,onChange:t,followsPx:n=null,length:o,followsUnit:a="px"}){let s=e===null,r=n===null?null:`${n}${a}`,i=a==="px"&&(o?.unit??"px")==="px",l=n===null?Dg:i?wn(n)??Dg:n;return us(TA,{label:c(Kl),labelId:"sf-block-gap",icon:us(EA,{}),changed:!s,action:us(_A,{words:P()?.panel,label:c(Kl),changed:!s,detail:r??c("each block's own spacing"),onReset:()=>t(null)}),hint:c(r===null?xA:vA),children:us(de,{min:(o?.grid??be).min,max:(o?.grid??be).max,step:(o?.grid??be).step,value:e,...e===null&&n===null?{}:{suffix:o?.unit??"px",...o?{units:o.units}:{}},placeholder:l,...n===null?{placeholderWord:"Auto"}:i&&n===l?{}:{placeholderWord:String(n)},onClear:()=>t(null),ariaLabel:c(Kl),onChange:t})})}import{jsx as ds}from"react/jsx-runtime";import{SettingsDefaultReset as wA,SettingsField as CA,SettingsSegmented as OA}from"efficient-easel/panel";import{HoverIcon as PA}from"efficient-easel/icons";var jl={none:ws.none,lift:ws.lift,highlight:kc},kA="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 Hg({value:e,onChange:t}){let n=e===null,o=e??Gs;return ds(CA,{label:c("Hover effect"),icon:ds(PA,{}),value:c(jl[o]),changed:!n,action:ds(wA,{words:P()?.panel,label:c("Hover effect"),changed:!n,detail:c(jl[Gs]),onReset:()=>t(null)}),hint:c(kA),children:ds(OA,{options:su.map(a=>({id:a,label:c(jl[a])})),value:o,ariaLabel:c("Hover effect"),onChange:t})})}import{jsx as ps}from"react/jsx-runtime";import{SettingsDefaultReset as AA,SettingsField as RA,SettingsSegmented as IA}from"efficient-easel/panel";import{DropIcon as NA}from"efficient-easel/icons";var Vl="Photography",Mg={shot:"As shot",mono:"Black and white"},Yl=[{grayscale:!1,label:Mg.shot},{grayscale:!0,label:Mg.mono}],LA="Black and white photographs return to color on hover. Wheels and tyres keep their real finish either way.";function $g({value:e,onChange:t}){let n=e===null,o=e??!1;return ps(RA,{label:c(Vl),icon:ps(NA,{}),value:c(Yl.find(a=>a.grayscale===o).label),changed:!n,action:ps(AA,{words:P()?.panel,label:c(Vl),changed:!n,detail:c(Yl.find(a=>!a.grayscale).label),onReset:()=>t(null)}),hint:c(LA),children:ps(IA,{options:Yl.map(a=>({id:a.grayscale,label:c(a.label)})),value:o,ariaLabel:c(Vl),onChange:t})})}import{jsx as Xl}from"react/jsx-runtime";import{useId as DA}from"react";import{SettingsField as FA,SettingsSwitch as BA}from"efficient-easel/panel";import{ShareIcon as HA}from"efficient-easel/icons";var MA="Share button",$A="On every blog post.";function Ug({value:e,onChange:t}){let n=DA();return Xl(FA,{label:c(MA),labelId:n,icon:Xl(HA,{}),action:Xl(BA,{checked:e===!0,onChange:t,ariaLabelledBy:n}),hint:c($A)})}import{usePreviewDevice as fc}from"efficient-easel/draw/client";import{jsx as fs}from"react/jsx-runtime";import{SettingsDefaultReset as UA,SettingsField as GA}from"efficient-easel/panel";import{PaddingXIcon as zA}from"efficient-easel/icons";var ql="Side space",Gg=ie.default,WA="The room left at the left and right edge of every page.";function zg(e,t){return cs(e,{desktop:{key:"site_gutter",value:t.gutter,unsetPx:Gg,bounds:ie},phone:{key:"site_gutter_phone",value:t.phone,unsetPx:Mp(t.gutter,t.gutterUnit),bounds:Le}})}function Wg({value:e,onChange:t,unsetPx:n=Gg,bounds:o=ie,length:a,restsOn:s=n}){let r=e===null;return fs(GA,{label:c(ql),labelId:"sf-side-space",icon:fs(zA,{}),changed:!r,action:fs(UA,{words:P()?.panel,label:c(ql),changed:!r,detail:`${n}px`,onReset:()=>t(null)}),hint:c(WA),children:fs(de,{min:(a?.grid??o).min,max:(a?.grid??o).max,step:(a?.grid??o).step,value:e,suffix:a?.unit??"px",...a?{units:a.units}:{},...o.typedMax!==void 0&&(a?.unit??"px")==="px"?{inputMax:o.typedMax}:{},placeholder:s,onClear:()=>t(null),ariaLabel:c(ql),onChange:t})})}import{jsx as Zl}from"react/jsx-runtime";import{BACKGROUND_WIDTHS as l3,SettingsBackgroundWidth as KA,SettingsContentWidth as jA}from"efficient-easel/panel";var VA="Background width",YA="Content width";var ms=e=>c(Nt[e==="content"?"page":"full"]),Kg="The width of every section's background.",jg="The width of every section's content.";function Vg({value:e,changed:t,detail:n,onChange:o,onReset:a,hint:s,labelId:r}){return Zl(KA,{value:e,changed:t,detail:n,onChange:o,onReset:a,hint:s?c(s):void 0,labelId:r,words:{label:c(VA),full:ms("full"),content:ms("content")},resetWords:P()?.panel})}function Yg({mode:e,px:t,max:n=V.max,min:o=V.min,changed:a,detail:s,fullClosed:r,onMode:i,onPx:l,onReset:u,hint:d,labelId:p,length:f}){let m=c(YA),b=f?.grid.min??o,y=f?.grid.max??n,T=e!=="full"?Zl(de,{min:b,max:y,step:f?.grid.step??V.step,value:Math.min(Math.max(t,b),y),onChange:l,...f?{suffix:f.unit,units:f.units}:{suffix:"px"},ariaLabel:m}):null;return Zl(jA,{mode:e,onMode:i,number:T,changed:a,detail:s,fullClosed:r,onReset:u,hint:d?c(d):void 0,labelId:p,words:{label:m,full:ms("full"),content:ms("content")},resetWords:P()?.panel})}import{jsx as Xg}from"react/jsx-runtime";import{useMemo as XA}from"react";import{TextStyleItem as qA,TextStylesGroup as ZA}from"efficient-easel/text-styles";var qg=["font","size","weight","emphasis"],JA=500;function QA({font:e,size:t,weight:n,italic:o}){let a={font:e};return t!==null&&(a.size=t),n!==null&&(a.weight=n),o!==null&&(a.italic=o),{id:"accent",kind:"heading",name:c("Emphasis"),values:a}}function eR(e,t){let n=[],o=e.values,a=t.values;return a.font!==o.font&&a.font!==void 0&&n.push({key:"font",value:a.font}),a.size!==o.size&&n.push({key:"size",value:a.size??null}),a.weight!==o.weight&&n.push({key:"weight",value:a.weight??null}),a.italic!==o.italic&&n.push({key:"italic",value:a.italic??null}),n}function Zg(e){let{headingWeight:t,open:n,onOpenChange:o,onChange:a,withoutSize:s=!1}=e,r=QA(e),i=On(),l=XA(()=>Jo(i),[i]);return Xg(ZA,{label:c("Emphasis"),children:Xg(qA,{style:r,fonts:l,settings:s?qg.filter(u=>u!=="size"):qg,auto:["size"],fallback:()=>({weight:t??JA}),open:n,onOpenChange:o,onChange:u=>eR(r,u).forEach(a)})})}import{viewKeyAt as nb}from"efficient-easel/draw";import{shownUnitAt as rR,unitKeyOnWrite as iR}from"efficient-easel/screen/lib/content/length-units";import{convertRowLength as tR,rowUnits as nR,unitPickPatch as oR}from"efficient-easel/screen/lib/content/length-units";import{viewKeyAt as aR}from"efficient-easel/draw";var sR=["cornerRadius","siteWidth","siteGutter","siteGutterPhone","blockGap","blockGapPhone"],hs={cornerRadius:{number:"corner_radius_px",kind:"radius",grid:nu,tier:"desktop"},siteWidth:{number:"site_width",kind:"size",grid:V,tier:"desktop"},siteGutter:{number:"site_gutter",kind:"spacing",grid:ie,tier:"desktop"},siteGutterPhone:{number:"site_gutter_phone",kind:"spacing",grid:Le,tier:"mobile"},blockGap:{number:"block_gap",kind:"gap",grid:be,tier:"desktop"},blockGapPhone:{number:"block_gap_phone",kind:"gap",grid:be,tier:"mobile"}};function gs(e){return{number:hs[e].number,unit:jc[`${e}Unit`]}}function Jg(e,t,n){let o=F(n),{number:a,unit:s}=gs(e);return{[a]:t,[s]:t===null||o==="px"?null:o}}function bs(e,t,n,o){let{kind:a,grid:s,tier:r}=hs[e],i=F(n),l=F(o),u=s.typedMax,d=u!==void 0&&l==="px"?{...s,max:u}:s;return i===l?t:tR(t,i,l,r,{kind:a},d)}function Qg(e,t,n,o){let{number:a,unit:s}=gs(e),r=oR({[a]:t},i=>bs(e,i,n,o),s,F(o),"px");return{[a]:r[a],[s]:r[s]??null}}function eb(e,t){let{kind:n,grid:o}=hs[e];return Kc(n,F(t),o)}function tb(e){return nR({kind:hs[e].kind},Qn)}function Jl(e,t){let n=aR(e,t);if(!sR.includes(n))throw new Error(`no site length row ${n}`);return n}function lo(e,t,n,o,a){let{siteLengthUnits:s,setSiteLengthUnits:r}=B(),i=`${e}Unit`,l=s[i],u=rR({n:a?.figure??null,u:a?.unit??null,[nb("n","mobile")]:t,[nb("u","mobile")]:l??null},{n:"n"},"u","mobile"),d=b=>r({[i]:b==="px"?null:b}),p=b=>{n(b);let y=iR(i,l,u,"px",b===null);i in y&&d(y[i]==null?null:F(y[i])),o(Jg(e,b,u),b===null)},f=b=>{let y=F(b);if(y===u||(d(y),t===null))return;let T=Qg(e,t,u,y);n(T[gs(e).number]),o(T,!0)},m=a?a.unit===u?a.figure:bs(e,a.figure,a.unit,u):null;return{length:{unit:u,grid:eb(e,u),units:{options:tb(e),onChange:f,label:c("Unit")}},write:p,rest:m,shown:b=>bs(e,b,"px",u)}}import{EmptyState as iI,SliderGroup as lI,Tabs as cI,Tooltip as WY,tabButtonId as uI,tabPanelId as dI}from"efficient-shell/ui";import{ContrastIcon as pI,SettingsIcon as fI,TypeIcon as mI}from"efficient-easel/icons";function ob(e){switch(e.status){case"saved":return null;case"failed":return{msg:c("Not saved. Try again."),tone:"error"};case"skipped":switch(e.reason){case"empty":return null;case"no-token":return{msg:c("Not saved. Reload the page."),tone:"error"};case"template":return{msg:c("Templates keep their look. Press Done."),tone:"success"}}}}import{jsx as Ts}from"react/jsx-runtime";import{ListIcon as WR,PaddingTopIcon as KR,PaddingXIcon as jR}from"efficient-easel/icons";import{jsx as ys}from"react/jsx-runtime";import{SettingsDefaultReset as lR,SettingsField as cR,SettingsSegmented as uR}from"efficient-easel/panel";import{WidthIcon as dR}from"efficient-easel/icons";function ab({value:e,resolved:t,onChange:n,label:o="Width",labelId:a,followsLabel:s,hint:r}){let i=e===void 0,l=i?t:e,u=c(o);return ys(cR,{label:u,labelId:a,icon:ys(dR,{}),value:i?s:void 0,changed:!i,action:ys(lR,{words:P()?.panel,label:u,changed:!i,onReset:()=>n(void 0)}),hint:r,children:ys(uR,{options:[{label:c(Nt.full),id:"full"},{label:c(Nt.page),id:"content"}],value:l,ariaLabel:u,onChange:n})})}import{group as VR}from"efficient-easel/screen/lib/document/box-fields";import{jsx as ut}from"react/jsx-runtime";import{ColumnsIcon as xR,HeadquartersIcon as vR,HeightIcon as wR,LayoutIcon as CR,LocationIcon as OR,MapIcon as PR,SearchIcon as kR,ThemeIcon as AR}from"efficient-easel/icons";import{group as nc}from"efficient-easel/screen/lib/document/box-fields";import{deviceField as yn}from"efficient-easel/screen/lib/document/device-fields";import{jsx as ec}from"react/jsx-runtime";import{ListIcon as pR}from"efficient-easel/icons";import{NoControlMark as fR,noControlField as mR}from"efficient-easel/screen/lib/document/panel-no-control-mark";function pb(e,t){return ne(e,ec(pR,{}),[{label:t,value:""}],"")}var hR="_sourceEdit";function Q3(){return mR({type:"custom",render:()=>ec(fR,{})},"always")}var sb=new Map,rb=new WeakMap,ib=(e,t)=>({type:"custom",render:()=>ec(ya,{compact:!0,status:"ok",hint:c("Where this content is edited."),edit:{label:e,onClick:t}})});function gR(e){if(gc(e)){let o=rb.get(e.open);o||rb.set(e.open,o=new Map);let a=o.get(e.label);return a||o.set(e.label,a=ib(e.label,e.open)),a}let t=`${e.label}\0${e.href}`,n=sb.get(t);return n||(n=ib(e.label,()=>window.open(e.href,"_blank","noopener")),sb.set(t,n)),n}var lb=new WeakMap,cb=-1,Ql={},ub=new WeakMap;function fb(e,t,n){return yc(e).filter(o=>!o.records||o.key===t||n!==null&&o.records.includes(n))}function bR(e,t,n,o){cb!==ho()&&(cb=ho(),Ql={});let a=lb.get(t);(!a||ub.get(a)!==Ql)&&(a=new Map,ub.set(a,Ql),lb.set(t,a));let s=fb(e,n,o),r=n&&!s.some(u=>u.key===n)?n:"",i=`${e}\0${r}\0${o??""}\0${s.map(u=>u.key).join(",")}`,l=a.get(i);return l||(l={...t,options:[...t.options,...s.map(u=>({label:u.label,value:u.key})),...r?[{label:r,value:r}]:[]]},a.set(i,l)),l}var db=new WeakMap,yR={not:{field:Ye,set:!0}};function mb(e,t,n,o={}){let a=t[Ye];if(!a)return t;let s=_c(n),r=yf(o.root),i=fb(e,s,r).length>0||s!=="",l=i?bR(e,a,s,r):null,u=db.get(t);u||db.set(t,u=new Map);let d=`${ho()}\0${i?"1":"0"}\0${s}\0${(o.hides??[]).join(",")}\0${r??""}`,p=u.get(d);if(p)return p;let f=new Set(o.hides??[]),m=s?Sc(s)?.edit:void 0,b={};for(let[y,T]of Object.entries(t))y===Ye?l&&(b[y]=l):y===hR?m&&(b[y]=gR(m)):b[y]=f.has(y)&&T&&typeof T=="object"?le(T,yR):T;return u.set(d,b),b}import{createContext as SR,useContext as _R}from"react";var hb=SR(null),oV=hb.Provider,aV=()=>_R(hb);function sV(e){let t=[];for(let n of e)n.placement!=="located"&&n.placement!=="approximate"||n.lat===null||n.lng===null||t.push({key:n.id,label:n.name,lat:n.lat,lng:n.lng,glyph:"",tone:"",approximate:n.placement==="approximate"});return t}function TR(e){return e===null||!Number.isFinite(e)?"":e<10?`${e.toFixed(1)} km`:`${Math.round(e)} km`}function rV(e,t){let n=[e.city,[e.state,e.postcode].filter(Boolean).join(" ")].filter(Boolean).join(" ");return{name:e.name,address:e.address,place:n,distance:t?TR(e.distanceKm):"",phone:e.phone,phoneHref:e.phone?`tel:${e.phone.replace(/[^\d+]/g,"")}`:"",website:e.website.replace(/^https?:\/\//,"").replace(/\/$/,""),websiteHref:e.website&&!/^[a-z][a-z\d+.-]*:/i.test(e.website)?`https://${e.website}`:e.website}}var ER=[{key:"name",label:"Dealer name",plain:!0},{key:"address",label:"Address"},{key:"place",label:"City \xB7 state \xB7 postcode",plain:!0},{key:"distance",label:"Distance",plain:!0},{key:"phone",label:"Phone"},{key:"phoneHref",label:"Phone link",kind:"link"},{key:"website",label:"Website",plain:!0},{key:"websiteHref",label:"Website link",kind:"link"}],gb={key:mo,label:"Dealers",blocks:["Footprint"],fields:ER};function iV(e){return[e.name,e.city].filter(Boolean).join(", ")}var cV={text:"Button label",href:"#"},uV=e=>e.replace(/\*([^*]+)\*/g,"==$1=="),co={eyebrow:"Eyebrow",heading:"Main heading",accent:"Highlight line",body:"Add a sentence or two of supporting copy.",button:"Button label",link:"#",sectionHeading:"Section heading",slideName:"Slide name",boxName:"Box name",headingAccent:"Section heading *here.*",sectionNumber:"Section number",imageCaption:"Image caption",bookingConfirmation:"Thanks \u2014 we'll email you to confirm.",imageMeta:"Image meta",label:"Label",value:"Value",viewAll:"View all",date:"Month DD, YYYY",category:"Category"};var Ss={sectionNumber:co.sectionNumber,heading:`${co.heading}
|
|
9
|
-
*${co.accent}*`,tagline:co.body},tc=Tc.Footprint,hV={label:"Locations Map",fields:tc,defaultProps:{sectionNumber:"",heading:"",tagline:"",offices:[],mapTheme:To.mapTheme,padTop:120,padBottom:120,search:!1,searchHint:"",noMatchText:"",listPosition:"below",showDistance:!0}};var yb={field:Ye,is:mo,default:""},oc={field:Gt,is:mt,default:mt},RR={field:Gt,is:"list",default:mt},IR={field:Gt,is:"map",default:mt},Sb={all:[oc,{field:"listPosition",in:["left","right"],default:"below"}]},_b={any:[{all:[yb,{not:IR}]},Sb]},NR={any:[{all:[oc,{field:"listPosition",is:"below",default:"below"}]},RR]},bb={all:[_b,{field:"search",is:!0,default:!1}]};bc([gb,Wp]);async function ac(e){return Ca(e)?pm(e,t=>[t.address,t.city,t.country].map(n=>String(n??"").replace(/\*/g,"").trim()).filter(Boolean).join(", ")):e}var LR={fields:{_gContent:nc("Section"),sectionNumber:ss("Section number",Ss.sectionNumber),heading:Fl("Heading",Ss.heading),tagline:Fl("Body",Ss.tagline),_gOffices:nc("Offices"),[Ye]:pb("Office content","Manual"),offices:{type:"array",label:"Offices",arrayFields:{role:bn("Role"),city:bn("City"),country:bn("Region \xB7 country"),address:gg("Address"),phone:bn("Phone"),group:bn("Group"),hq:ct("HQ",!1,ut(vR,{})),geocode:Og(Pg,{label:"Coordinates"})},defaultItemProps:{role:"Sales & Distribution",city:"City",country:"Country",address:"",phone:"",group:"",hq:!1,lat:0,lng:0},getItemSummary:e=>e?.city||"Office"},...tc,[Gt]:gn("Shows",ut(PR,{}),[{label:"Map and list",value:mt},{label:"Map only",value:"map"},{label:"List only",value:"list"}],mt),mapTheme:gn("Map theme",ut(AR,{}),[{label:"Auto",value:"auto"},{label:"Dark",value:"dark"},{label:"Light",value:"light"}],To.mapTheme),_gList:nc("List"),listPosition:yn("desktop",le(gn("Position",ut(CR,{}),[{label:"Left",value:"left"},{label:"Right",value:"right"},{label:"Below",value:"below"}],"below"),oc)),listColumns:yn("desktop",le(gn("Columns",ut(xR,{}),[{label:"Auto",value:Ls},...Gc.map(e=>({label:String(e),value:String(e)}))],Ls),NR)),[$c]:yn("desktop",le(gn("Map height",ut(wR,{}),[{label:"Fixed",value:Ns},{label:"Full height",value:Uc}],Ns),Sb)),search:yn("desktop",le(ct("Search",!1,ut(kR,{})),_b)),searchHint:yn("desktop",le(Dl(ss("Hint","Type a postcode or address")),bb)),noMatchText:yn("desktop",le(Dl(ss("No match","No place found. Try another postcode.")),bb)),showDistance:le(ct("Distance",!0,ut(OR,{})),yb)},resolveData:async(e,t)=>{let n=t?.changed,o=e.props;if(n?.listPosition===!0||n?.[Gt]===!0||n?.[Ye]===!0){let i=zc(o);i!==o&&(e={...e,props:i})}let a=e.props,s=a.offices??[],r=await ac(s);return r===s?e:{...e,props:{...a,offices:[...r]}}},resolveFields:(e,{fields:t})=>Hc(mb("Footprint",t,e.props,{hides:["offices"]}),e.props.headPlacement,Bc.Footprint.headRows)},Tb=LR.fields.offices;var _s=null;function LV(e){_s=e}function DV(){return!!(_s&&_s.state().lockHolder)}function sc(){return _s!==null}import{BUCKET_KEY as YR}from"efficient-easel/screen/lib/document/field-buckets";import{HEADER_TYPE as rc,FOOTER_TYPE as DR}from"efficient-easel/draw";import{parseOption as FR}from"efficient-shell/format";var BR=new Set(["Hero","HeroSingle","IntroBleed"]),Eb={min:56,max:140,default:88},MV={min:0,max:120,step:2,default:32},$V=`var(--sf-header-h, ${Eb.default}px)`,HR="--sf-header-set-h",UV="--sf-header-h",GV=`var(${HR}, ${Eb.default}px)`,zV="sf-header-clearance",WV="sf-sticky-underheader";function MR(e){return e?.find(t=>t?.type&&t.type!==rc)??null}function xb(e){let t=MR(e)?.type;return!t||!BR.has(t)}function KV(e){return!xb(e)}function jV(e){return!!e?.some(t=>t?.type===rc)}function VV(e){return!e||e.length===0?!1:!e.some(t=>t?.type===rc||t?.type===DR)}var $R=["auto","shared","own"],ic="auto",UR="topSpace",YV="data-top-space";function GR(e){return FR($R,ic,e)}function zR(e,t){let n=GR(e?.props?.[UR]);return n==="own"?!0:n==="shared"?!1:xb(t)}function XV(e,t){return zR(e,t)?"own":null}function XR(){return{type:"custom",render:({value:e,onChange:t})=>Ts(ab,{value:e==="full"?"full":e==="content"?"content":void 0,resolved:"content",label:"Page width",followsLabel:c("Follows the site"),hint:c("Whether this page sits on the site's content column, or runs edge to edge."),onChange:n=>t(n)})}}var qR=[{label:"Auto",value:"auto"},{label:"Shared",value:"shared"},{label:"Its own",value:"own"}],hY={pageBackground:Cg(),topSpace:ne("Top space",Ts(KR,{}),qR,ic),widthChoice:XR()},Pb=["pageBackground","topSpace","widthChoice"],ZR="Record type",lc=new Map,vb=-1;function JR(e){vb!==ai()&&(lc.clear(),vb=ai());let t=oi(),n=t.some(a=>a.key===e)?"":e,o=lc.get(n);return o||(o=ne(ZR,Ts(WR,{}),[...t.map(a=>({label:a.label,value:a.key})),...n?[{label:n,value:n}]:[]],st),lc.set(n,o)),o}var wb=new WeakMap;function gY(e,t){if(!Un()||oi().length<2||la in e)return e;let n=JR($n(t)),o=wb.get(e);if(o&&o.row===n)return o.fields;let a={[la]:n,...e};return wb.set(e,{row:n,fields:a}),a}var QR="On: the site's Side space is counted once at each edge of every page. Off: as before.",eI=ct("Count side space once",!1,Ts(jR,{}),QR),cc={_gWebsite:VR("Website"),[wt]:eI,[nt]:Tb,[Fn]:Ml},Cb=new WeakMap;function bY(e,t){if(t?.kind!==Hi||wt in e)return e;let n=Cb.get(e);return n||(n={...e,...cc},Cb.set(e,n)),n}function yY(e){if(!sc()||wt in e)return e;let t=Ob.get(e);if(!t){t={};let n=!1;for(let[o,a]of Object.entries(e))o===tI&&!n&&(Object.assign(t,cc),n=!0),t[o]=a;n||Object.assign(t,cc),Ob.set(e,t)}return t}var tI=YR.Animation,Ob=new WeakMap;function SY(e){return sc()?kb(e):e}function kb(e){let t=e?.props;if(!t||!Array.isArray(t[nt]))return e;let n=t[nt];return Ca(n)?ac(n).then(o=>({...e,props:{...t,[nt]:[...o]}})):e}function _Y(e){return e?.props?.kind===Hi?kb(e):e}import{previewFrame as hI}from"efficient-easel/screen/lib/document/preview-dom";import{pictureShadowColor as gI}from"efficient-easel/screen/lib/document/shadow-values";var dc="sf-site-styles",bI="sf-site-styles-tabpanel",s5="text",Ib="basics",Ab="this-page-group",Es=[{id:Ib,label:"Basics",icon:L(fI,{})},{id:"theme",label:"Theme",icon:L(pI,{})},{id:"text",label:"Text",icon:L(mI,{})}];function yI({themeFromDocument:e,persist:t}){let{appState:n,dispatch:o}=Rb(u=>u),{theme:a,setTheme:s}=B(),r=n.data,i=r.root?.props??{},l=u=>{if(e){let d={...i,theme:u};o({type:"replaceRoot",root:{...r.root,props:d},recordHistory:!0})}else s(u);t({selected_preset:u.selected,theme_presets:u.themes})};return L(Sp,{value:e?i.theme:a,onChange:l})}function SI({themeFromDocument:e,persist:t}){let[n,o]=pc(null),{theme:a,setFonts:s,setSizes:r,setHeadingTypography:i}=B(),l=mp({themeFromDocument:e,persist:t}),{old:u,saved:d,writeRoot:p}=l,f=l.fonts,m=l.sizes,b=l.typography,y=EI,T=C=>l.write(C),S=pp(a),E=fp(a),x=C=>{let D={...f,accent:C};e?p({fonts:D}):s(D),t({accent_font:C})},v=C=>{r({...m,accent:C}),t({accent_size_px:C})},w=C=>{let D={...b,weightStrong:C};e?p({headingTypography:D}):i(D),t({heading_weight_strong:C})},I=C=>{let D={...b,italicStrong:C};e?p({headingTypography:D}):i(D),t({accent_italic:C})};return $t(Sn,{children:[L(cp,{saved:d,old:u,colours:S,colourNameOf:E,sizeOf:y,onChange:T,openId:n===uc?null:n,onOpenChange:o,withoutSize:e}),L(Zg,{font:f.accent,size:m.accent,weight:b.weightStrong,italic:b.italicStrong,headingWeight:b.weight,open:n===uc,onOpenChange:C=>o(C?uc:null),onChange:C=>{C.key==="font"?x(C.value):C.key==="size"?v(C.value):C.key==="weight"?w(C.value):I(C.value)},withoutSize:e})]})}var uc="accent",_I={"heading-1":"heading","heading-2":"heading2","heading-3":"heading3","body-1":"body","body-5":"label"},TI={heading:32,body:14};function EI(e){return e.values.size??vI(j(_I,e.id)??"body")??TI[e.kind]}var xI={heading:"main h1, main h2",heading2:"main h1, main h2",heading3:"main h1, main h2",accent:"main h1 em, main h2 em",body:"main p",label:"main .mono-eyebrow"};function vI(e){if(typeof document>"u")return null;let t=(hI()?.contentDocument??document).querySelector(xI[e]);if(!t)return null;let n=parseFloat(getComputedStyle(t).fontSize);return Number.isFinite(n)?n:null}function wI({themeFromDocument:e,persist:t}){let{appState:n,dispatch:o}=Rb(f=>f),{cornerRadiusPx:a,setCornerRadiusPx:s}=B(),r=n.data,i=r.root?.props??{},l=i.cornerRadiusPx===void 0?ou[tu(i.cornerStyle)]:Ae(i.cornerRadiusPx),u=e?l:a,d=lo("cornerRadius",a,s,t),p=f=>o({type:"replaceRoot",root:{...r.root,props:{...i,...f}},recordHistory:!0});return L(Ag,{value:u,onChange:f=>{e?(p({cornerRadiusPx:f}),t({corner_radius_px:f})):d.write(f)},...e?{}:{length:d.length}})}function CI({persist:e}){let{siteWidth:t,setSiteWidth:n,sectionBackgroundWidth:o,setSectionBackgroundWidth:a,sectionContentWidth:s,setSectionContentWidth:r}=B(),i=fc(),l=lo("siteWidth",t??null,n,e);if(i!=="desktop")return null;let u=typeof t=="number"?t:l.shown(V.default),d=l.write,p=m=>{a(m),e({section_background_width:m},!0)},f=m=>{r(m),e({section_content_width:m},!0)};return $t(Sn,{children:[L(Vg,{value:o??"full",changed:o!==null,detail:c("Full width"),onChange:p,onReset:()=>p(null),hint:Kg}),L(Yg,{mode:s??"content",px:u,min:V.min,max:V.max,changed:typeof t=="number"||s!==null,detail:`${c("Content width")} ${V.default}px`,onMode:f,onPx:m=>d(m),onReset:()=>{f(null),d(null)},hint:jg,length:l.length})]})}function OI({persist:e}){let{siteGutter:t,siteGutterPhone:n,setSiteGutter:o,setSiteGutterPhone:a,siteLengthUnits:s}=B(),r=zg(fc(),{gutter:t,phone:n,gutterUnit:s.siteGutterUnit}),i=r?.key==="site_gutter_phone",l=lo(Jl("siteGutter",i?"mobile":"desktop"),r?.value??null,i?a:o,e);return r?L(Wg,{value:r.value,onChange:l.write,unsetPx:r.unsetPx,restsOn:l.shown(r.unsetPx),bounds:r.bounds,length:l.length}):null}function PI({persist:e}){let{blockGap:t,blockGapPhone:n,setBlockGap:o,setBlockGapPhone:a,siteLengthUnits:s}=B(),r=Fg(fc(),{gap:t,phone:n}),i=r?.key==="block_gap_phone",l=r?.followsPx==null?null:{figure:r.followsPx,unit:F(s.blockGapUnit)},u=lo(Jl("blockGap",i?"mobile":"desktop"),r?.value??null,i?a:o,e,l);return r?L(Bg,{value:r.value,onChange:u.write,followsPx:u.rest,followsUnit:u.length.unit,length:u.length}):null}function kI({persist:e}){return $t(Sn,{children:[L(CI,{persist:e}),L(OI,{persist:e}),L(PI,{persist:e})]})}function AI(e){return{card_shadow:e}}function RI(e){return e===null?{shadow_color:null}:{shadow_color:gI(e)}}function II(e){return{hover_effect:e}}function NI({persist:e}){let{cardShadow:t,setCardShadow:n,shadowColor:o,setShadowColor:a,hoverEffect:s,setHoverEffect:r}=B();return $t(Sn,{children:[L(Rg,{value:t,onChange:i=>{n(i),e(AI(i),!0)}}),L(Lg,{value:o,onChange:i=>{a(i),e(RI(i),i===null)}}),L(Hg,{value:s,onChange:i=>{r(i),e(II(i),!0)}})]})}function LI(e){return{photography_grayscale:e}}function DI({persist:e}){let{photographyGrayscale:t,setPhotographyGrayscale:n}=B();return L($g,{value:t,onChange:o=>{n(o),e(LI(o),!0)}})}function FI({persist:e}){return L(Sn,{children:L(DI,{persist:e})})}function BI(e){return{share_button_on_posts:e}}function HI({persist:e}){let{shareButtonOnPosts:t,setShareButtonOnPosts:n}=B();return L(Ug,{value:t,onChange:o=>{n(o),e(BI(o),!0)}})}function r5(){let{websiteName:e}=B();return e?.trim()||Ru}function i5({themeFromDocument:e=!1,tokenRef:t,siteId:n,onNotify:o,tab:a,onTabChange:s,initialTab:r,revealPageGroup:i=!1,onPageGroupRevealed:l}){let{persist:u}=Fo({themeFromDocument:e,tokenRef:t,siteId:n,onResult:T=>{let S=ob(T);S&&o?.(S.msg,S.tone)}}),[d,p]=pc(r??Es[0].id),f=a!==void 0,m=f?a:d,b=f?s??(()=>{}):p,y=Es.find(T=>T.id===m)??Es[0];return $t(lI,{children:[L(UI,{activeId:y.id,onSelect:b}),$t("div",{id:dI(dc,y.id),className:bI,role:"tabpanel","aria-labelledby":uI(dc,y.id),children:[m===Ib&&$t(Sn,{children:[L(wI,{themeFromDocument:e,persist:u}),!e&&L(NI,{persist:u}),!e&&L(kI,{persist:u}),!e&&L(FI,{persist:u}),!e&&L(HI,{persist:u}),L(MI,{reveal:i,onRevealed:l})]}),m==="theme"&&L(yI,{themeFromDocument:e,persist:u}),m==="text"&&L(SI,{themeFromDocument:e,persist:u})]})]})}function MI({reveal:e,onRevealed:t}){let[n,o]=pc(!0),a=rI(t);return a.current=t,sI(()=>{if(!e)return;o(!0);let s=requestAnimationFrame(()=>{document.getElementById(Ab)?.scrollIntoView({block:"start"}),a.current?.()});return()=>cancelAnimationFrame(s)},[e]),L(aI,{title:c("This page"),open:n,onToggle:o,id:Ab,children:L($I,{})})}function $I(){let{fields:e,values:t,readOnly:n,onChange:o}=nI(),a=Object.fromEntries(Pb.filter(s=>s in e).map(s=>[s,e[s]]));return Object.keys(a).length===0?L(iI,{variant:"none",icon:!1,message:c("This page has no look of its own to set.")}):L(oI,{fields:a,values:t,onChange:o,readOnly:n,tabs:!1,idPrefix:"this-page",ariaLabel:c("This page")})}function UI({activeId:e,onSelect:t}){return L("div",{className:"es-insp-tabs",children:L(cI,{variant:"underline",block:!0,labelsFit:!0,"aria-label":c("Styles"),idPrefix:dc,value:e,onChange:t,items:Es.map(n=>{let o=c(n.label);return{id:n.id,icon:n.icon,label:o}})})})}export{xe as a,Q0 as b,WI as c,P as d,KI as e,jI as f,c as g,xn as h,V as i,PT as j,Wr as k,GD as l,Ip as m,KD as n,ie as o,Le as p,we as q,tt as r,VD as s,NT as t,YD as u,Kr as v,XD as w,qD as x,ZD as y,DT as z,JD as A,QD as B,eF as C,tF as D,Dp as E,nF as F,Bp as G,oF as H,aF as I,Mp as J,$p as K,Up as L,WT as M,KT as N,lF as O,uF as P,dF as Q,pF as R,fF as S,Nh as T,Nt as U,QC as V,tz as W,eO as X,nz as Y,te as Z,oz as _,tO as $,az as aa,sz as ba,rz as ca,iz as da,lz as ea,cz as fa,hn as ga,uz as ha,dz as ia,ci as ja,di as ka,Cf as la,pi as ma,zE as na,bH as oa,fa as pa,Lf as qa,ma as ra,WE as sa,KE as ta,TH as ua,EH as va,xH as wa,jE as xa,vH as ya,fi as za,wH as Aa,CH as Ba,OH as Ca,PH as Da,kH as Ea,AH as Fa,RH as Ga,IH as Ha,NH as Ia,VE as Ja,Lr as Ka,Ep as La,pT as Ma,rD as Na,xp as Oa,fT as Pa,iD as Qa,vp as Ra,mT as Sa,lD as Ta,T2 as Ua,qn as Va,NC as Wa,tl as Xa,dn as Ya,ol as Za,E2 as _a,x2 as $a,v2 as ab,al as bb,Eh as cb,w2 as db,De as eb,Jr as fb,sB as gb,Ct as hb,N2 as ib,L2 as jb,D2 as kb,F2 as lb,B2 as mb,Yn as nb,ji as ob,lC as pb,Gi as qb,Vi as rb,ih as sb,Yi as tb,dC as ub,JG as vb,Da as wb,QG as xb,pC as yb,fC as zb,e2 as Ab,mC as Bb,eh as Cb,t2 as Db,n2 as Eb,o2 as Fb,gF as Gb,YT as Hb,XT as Ib,bF as Jb,$e as Kb,Po as Lb,zu as Mb,r0 as Nb,i0 as Ob,Mu as Pb,Si as Qb,RM as Rb,IM as Sb,Zf as Tb,LM as Ub,DM as Vb,Ax as Wb,FM as Xb,Qf as Yb,BM as Zb,HM as _b,Jf as $b,em as ac,MM as bc,Wn as cc,Ti as dc,$M as ec,UM as fc,GM as gc,zM as hc,$o as ic,dS as jc,wd as kc,Cd as lc,An as mc,mS as nc,Uo as oc,Ad as pc,jN as qc,VN as rc,pr as sc,YN as tc,Rd as uc,TS as vc,ES as wc,xS as xc,e1 as yc,t1 as zc,fr as Ac,a1 as Bc,m1 as Cc,h1 as Dc,g1 as Ec,b1 as Fc,y1 as Gc,wS as Hc,CS as Ic,S1 as Jc,Zt as Kc,OS as Lc,Bd as Mc,PS as Nc,_1 as Oc,kS as Pc,T1 as Qc,E1 as Rc,vd as Sc,Mo as Tc,Ko as Uc,Md as Vc,$d as Wc,_r as Xc,NS as Yc,jo as Zc,Et as _c,B1 as $c,MS as ad,$S as bd,US as cd,H1 as dd,M1 as ed,JS as fd,St as gd,$1 as hd,U1 as id,u_ as jd,G1 as kd,z1 as ld,vr as md,W1 as nd,wr as od,b_ as pd,K1 as qd,j1 as rd,Cr as sd,V1 as td,Y1 as ud,X1 as vd,E_ as wd,q1 as xd,C_ as yd,O_ as zd,Z1 as Ad,J1 as Bd,Q1 as Cd,k_ as Dd,eL as Ed,tL as Fd,I_ as Gd,nL as Hd,oL as Id,fn as Jd,cl as Kd,ul as Ld,sm as Md,YM as Nd,rm as Od,XM as Pd,qM as Qd,ZM as Rd,hi as Sd,HH as Td,rG as Ud,hw as Vd,iG as Wd,Bi as Xd,Hi as Yd,lG as Zd,cG as _d,uG as $d,Ra as ae,dG as be,ko as ce,qt as de,vn as ee,Vs as fe,wn as ge,u0 as he,d0 as ie,p0 as je,Yu as ke,Xu as le,qu as me,f0 as ne,ve as oe,Ge as pe,Hr as qe,AD as re,ta as se,RD as te,ID as ue,na as ve,ND as we,LD as xe,DD as ye,E0 as ze,On as Ae,x0 as Be,cV as Ce,uV as De,co as Ee,_F as Fe,TF as Ge,EF as He,xF as Ie,Gp as Je,vF as Ke,wF as Le,Rh as Me,Y2 as Ne,ml as Oe,hl as Pe,X2 as Qe,q2 as Re,$$ as Se,Eb as Te,MV as Ue,$V as Ve,HR as We,UV as Xe,GV as Ye,zV as Ze,WV as _e,MR as $e,KV as af,jV as bf,VV as cf,YV as df,zR as ef,XV as ff,st as gf,vB as hf,EE as if,ai as jf,$n as kf,wB as lf,PB as mf,vE as nf,hf as of,kB as pf,OE as qf,kE as rf,ri as sf,RB as tf,IB as uf,RE as vf,BB as wf,HB as xf,Un as yf,MB as zf,yf as Af,Mr as Bf,ZB as Cf,JB as Df,Sf as Ef,QB as Ff,hT as Gf,re as Hf,uD as If,gT as Jf,bT as Kf,mD as Lf,yT as Mf,ST as Nf,hD as Of,gD as Pf,bD as Qf,yD as Rf,SD as Sf,_D as Tf,TD as Uf,ED as Vf,xD as Wf,vD as Xf,wD as Yf,Hm as Zf,MC as _f,$a as $f,P2 as ag,uB as bg,Dh as cg,Qn as dg,Be as eg,ne as fg,eo as gg,gn as hg,Tz as ig,Ez as jg,vz as kg,wz as lg,Cz as mg,Oz as ng,Pz as og,Az as pg,Rz as qg,to as rg,Iz as sg,hO as tg,gO as ug,Bh as vg,Sl as wg,kp as xg,AF as yg,RF as zg,tE as Ag,nE as Bg,MF as Cg,aE as Dg,Xp as Eg,$F as Fg,UF as Gg,GF as Hg,WF as Ig,Zp as Jg,KF as Kg,jF as Lg,JF as Mg,QF as Ng,ef as Og,eB as Pg,sH as Qg,xf as Rg,pH as Sg,Ff as Tg,Bf as Ug,zn as Vg,Gf as Wg,WH as Xg,KH as Yg,ya as Zg,bi as _g,Cx as $g,yM as ah,nm as bh,e$ as ch,Ca as dh,pm as eh,Ty as fh,ye as gh,Pn as hh,k$ as ih,Pi as jh,ki as kh,I$ as lh,ym as mh,N$ as nh,L$ as oh,D$ as ph,xm as qh,wm as rh,nN as sh,oN as th,dd as uh,aN as vh,pd as wh,rN as xh,Fo as yh,rS as zh,PN as Ah,_d as Bh,TU as Ch,Om as Dh,Rm as Eh,Im as Fh,Nm as Gh,Lm as Hh,Dm as Ih,Fm as Jh,Li as Kh,tw as Lh,nw as Mh,Vn as Nh,Di as Oh,Mm as Ph,zU as Qh,aw as Rh,WU as Sh,KU as Th,jU as Uh,Um as Vh,qU as Wh,iw as Xh,ZU as Yh,JU as Zh,cw as _h,dw as $h,pw as ai,fw as bi,nG as ci,mw as di,oG as ei,Mi as fi,SG as gi,Km as hi,Sw as ii,TG as ji,wG as ki,$i as li,Nw as mi,GG as ni,xC as oi,p2 as pi,wC as qi,f2 as ri,m2 as si,h2 as ti,mn as ui,Ka as vi,z2 as wi,W2 as xi,K2 as yi,bO as zi,yO as Ai,Dz as Bi,EO as Ci,xO as Di,Fz as Ei,Bz as Fi,Hz as Gi,Mz as Hi,$z as Ii,Vz as Ji,Yz as Ki,Xz as Li,qz as Mi,Zz as Ni,Jz as Oi,Qz as Pi,eW as Qi,tW as Ri,nW as Si,oW as Ti,Mh as Ui,aW as Vi,sW as Wi,NO as Xi,LO as Yi,eg as Zi,Bt as _i,j4 as $i,V4 as aj,Y4 as bj,X4 as cj,q4 as dj,Z4 as ej,Dl as fj,J4 as gj,Q4 as hj,oK as ij,aK as jj,GP as kj,sK as lj,ss as mj,Fl as nj,bn as oj,gg as pj,rK as qj,iK as rj,lK as sj,cK as tj,jP as uj,uK as vj,dK as wj,pK as xj,fK as yj,mK as zj,hK as Aj,gK as Bj,bK as Cj,rs as Dj,de as Ej,Pe as Fj,bg as Gj,cn as Hj,yg as Ij,Sg as Jj,yK as Kj,SK as Lj,_K as Mj,yk as Nj,TK as Oj,EK as Pj,xK as Qj,vK as Rj,wK as Sj,CK as Tj,OK as Uj,Z as Vj,xk as Wj,PK as Xj,kK as Yj,Qa as Zj,AK as _j,RK as $j,IK as ak,NK as bk,LK as ck,DK as dk,ct as ek,FK as fk,Gk as gk,BK as hk,HK as ik,MK as jk,$K as kk,UK as lk,Og as mk,GK as nk,zK as ok,WK as pk,Pg as qk,jK as rk,VK as sk,Qk as tk,YK as uk,XK as vk,qK as wk,ZK as xk,JK as yk,Gl as zk,kg as Ak,QK as Bk,ej as Ck,tj as Dk,nj as Ek,E$ as Fk,x$ as Gk,LV as Hk,DV as Ik,sc as Jk,YA as Kk,Vg as Lk,Yg as Mk,ql as Nk,gL as Ok,nn as Pk,bL as Qk,yL as Rk,SL as Sk,_L as Tk,$_ as Uk,TL as Vk,EL as Wk,cp as Xk,ab as Yk,pb as Zk,hR as _k,Q3 as $k,yR as al,mb as bl,aV as cl,sV as dl,rV as el,ER as fl,iV as gl,Ss as hl,hV as il,LR as jl,hY as kl,Pb as ll,gY as ml,bY as nl,yY as ol,SY as pl,_Y as ql,pp as rl,fp as sl,mp as tl,s5 as ul,Ib as vl,Es as wl,EI as xl,r5 as yl,i5 as zl};
|