efficient-storefront-blocks 0.125.0 → 0.125.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (39) hide show
  1. package/CHANGELOG.md +29 -0
  2. package/dist/chunks/{CustomHtmlCodeWindow-ROUI64CY.js → CustomHtmlCodeWindow-VRZ524JP.js} +1 -1
  3. package/dist/chunks/{EditorPreviewCheckout-F2HXHGBN.js → EditorPreviewCheckout-3TKWZ44N.js} +1 -1
  4. package/dist/chunks/SiteEditorProvider-OBXLJM7I.js +1 -0
  5. package/dist/chunks/chunk-4KN3VTQU.js +7 -0
  6. package/dist/chunks/{chunk-MU65AZLZ.js → chunk-6ABZ7XWF.js} +1 -1
  7. package/dist/chunks/{chunk-ESVLXH7T.js → chunk-FNCEZSDY.js} +1 -1
  8. package/dist/chunks/{chunk-2KEZPQPW.js → chunk-HQFRQZ6J.js} +1 -1
  9. package/dist/chunks/chunk-J6SPMJBT.js +337 -0
  10. package/dist/chunks/{chunk-T2LZCAFH.js → chunk-PULBLZRR.js} +1 -1
  11. package/dist/chunks/{chunk-O3YXHDC6.js → chunk-TVMCJUOE.js} +1 -1
  12. package/dist/chunks/{fitment-data-X7PIIXMU.js → fitment-data-C2NHZBPR.js} +1 -1
  13. package/dist/chunks/{section-css-style-Q23EN42Q.js → section-css-style-BECHWIDU.js} +1 -1
  14. package/dist/contract.js +1 -1
  15. package/dist/editor/components/HeaderSettingsPanel.js +1 -1
  16. package/dist/editor/lib/efficient-block-sources.js +1 -1
  17. package/dist/index.js +27 -27
  18. package/dist/render/built-with.json +1 -1
  19. package/dist/render/components/HeaderToolBlocks.d.ts +2 -1
  20. package/dist/render/components/HeaderToolBlocks.js +1 -1
  21. package/dist/render/components/HeaderTools.d.ts +2 -1
  22. package/dist/render/components/card-pieces/HeadlineName.js +1 -1
  23. package/dist/render/lib/content/header-bar.d.ts +1 -0
  24. package/dist/render/lib/content/header-bar.js +1 -1
  25. package/dist/render/lib/document/linked-hero-hydrate.d.ts +2 -1
  26. package/dist/render/lib/document/linked-hero-hydrate.js +1 -1
  27. package/dist/routine-index.json +1 -1
  28. package/dist/value-index.json +1 -1
  29. package/dist/words.d.ts +4 -0
  30. package/dist/words.js +3 -3
  31. package/package.json +4 -4
  32. package/dist/chunks/SiteEditorProvider-B7766ULW.js +0 -1
  33. package/dist/chunks/chunk-SEA3MICI.js +0 -7
  34. package/dist/chunks/chunk-WWQ5LOLU.js +0 -337
  35. /package/dist/chunks/{chunk-AUQZLQEO.js → chunk-7UJXVH57.js} +0 -0
  36. /package/dist/chunks/{chunk-NMB6BD73.js → chunk-EZ5QLDA5.js} +0 -0
  37. /package/dist/chunks/{chunk-ESVLXH7T.js.LEGAL.txt → chunk-FNCEZSDY.js.LEGAL.txt} +0 -0
  38. /package/dist/chunks/{chunk-WWQ5LOLU.js.LEGAL.txt → chunk-J6SPMJBT.js.LEGAL.txt} +0 -0
  39. /package/dist/chunks/{chunk-KFZLLS45.js → chunk-UV27QVUD.js} +0 -0
@@ -1,7 +0,0 @@
1
- import{b as qc,c as Zc,d as uu,e as du}from"./chunk-KFZLLS45.js";import{$g as Ls,Aa as dc,Ac as hc,Bb as fc,Bc as gc,Be as Cc,Ca as O,Cc as bc,Cd as xs,Da as fo,Db as Ut,Dc as Ts,E as rc,Eb as Be,Ec as yc,Hd as le,Hf as Rc,Ia as bs,If as Ps,Jf as Pe,Jg as ft,Jh as Ds,Ka as pc,Kd as _c,Kf as Ic,Kh as _o,L as j,Lf as Nc,Lg as Wc,Lh as nu,M as he,Mf as zt,Mh as U,Nb as mo,Nf as ce,Ng as Kc,Pg as jc,Qc as Sc,Qf as Wt,Qh as ou,Rc as Es,Rd as Tc,Rf as Kt,Rg as Vc,Rh as au,Sh as su,Th as ru,Ud as Ec,Uf as Lc,Vg as Yc,Vh as iu,Wg as Xc,Xe as yo,Xf as ks,Xh as Vt,Yh as lu,Zf as Dc,Zh as To,_f as As,_g as mt,_h as cu,b as W,ba as Mt,bg as Fc,c as je,ca as ic,cg as Bc,ch as Jc,de as vs,df as Os,ea as lt,ga as po,gc as mc,i as Ql,jg as Hc,ka as _n,ke as bo,kg as Rs,ki as D,l as co,m as ec,me as Gt,mg as Mc,n as tc,nc as ut,ne as dt,nf as M,ng as oe,oa as ct,of as L,og as Uc,oh as Qc,p as nc,pc as ys,pf as Oc,pg as Gc,pi as fu,q as oc,qc as Ss,qe as xc,qf as $t,qg as ke,r as ac,re as ws,rf as Pc,rg as jt,sc as ho,se as vc,sf as kc,t as uo,tf as pt,u as sc,uf as Ac,ug as $c,uh as eu,va as lc,ve as wc,vg as Is,wa as cc,we as Cs,xa as uc,xb as Tn,xf as Ve,xh as So,yc as _s,yf as Ye,yg as zc,za as gs,zc as go,zg as Ns,zh as tu}from"./chunk-MU65AZLZ.js";import{d as pu}from"./chunk-AUQZLQEO.js";var hu="en",Eo=null,gu=hu,bu=null;function eI(e,t,n){Eo=e??null,gu=t||hu,bu=n??null}function P(){return bu}function tI(){return gu}function nI(){return Eo}function mu(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=Eo?j(Eo,e):void 0;if(typeof n=="function"){try{let o=W(n(t??{}));if(o)return o}catch{}return mu(e,t)}return mu(W(n)??e,t)}function En(e,t,n,o){return c(n===1?e:t,{...o,n})}import{parseHexColor as Eu}from"efficient-shell/format";import{COLOR_SLOTS as xu,FILL_COLOR_SLOTS as bb,colorRole as yb,fillColorRole as vu}from"efficient-shell/markup";import{parseHexColor as yu}from"efficient-shell/format";import{FILL_COLOR_SLOTS as fb}from"efficient-shell/markup";var xo=e=>{let t=Vc.find(n=>n.role===e);return t?`var(${t.token})`:""},mb=e=>xo(e)?`var(--theme-${e})`:"",hb={main:{ink:ct.accent,page:ct.accent,key:"accent",label:()=>c("Main"),words:e=>c("Theme {n} main color",{n:e})},text:{ink:ct.text,page:ct.text,key:"text",label:()=>c("Text"),words:e=>c("Theme {n} text color",{n:e})},background:{ink:xo("bg"),page:mb("bg"),key:"background",label:()=>c("Background"),words:e=>c("Theme {n} background",{n:e})},muted:{ink:ct.labels,page:ct.labels,key:"muted",label:()=>c("Muted"),words:e=>c("Theme {n} muted color",{n:e})},surface:{ink:xo("surface"),page:xo("surface"),key:"surface",label:()=>c("Surface"),words:e=>c("Theme {n} surface color",{n:e})}};function Xe(e){return j(hb,e)}var Fs="#9ca3af";function Yt(e,t,n){let o=Xe(e);return o?{hex:yu(t[o.key]??"")??"",words:o.words(n)}:null}function Su(e,t){return fb.flatMap(n=>{let o=Yt(n,e,t);return o&&Xe(n)?.ink?[{name:n,label:o.words,value:o.hex||Fs}]:[]})}var gb=["main","text","background"];function _u(e){let t=new Set,n=[];return Pe(e).themes.forEach((o,a)=>{for(let s of gb){let r=Xe(s),i=r?o[r.key]:void 0,l=typeof i=="string"&&i?yu(i):null;!r||!l||t.has(l)||(t.add(l),n.push({value:l,label:r.words(a+1)}))}}),n}function He(e){return Xe(e)?.ink??""}function Ae(e){if(typeof e!="string")return null;let t=vu(e.trim());return t?.kind==="slot"&&He(t.slot)?t.slot:null}var Sb={accent:"main",labels:"muted"};function Me(e){return j(Sb,e)??e}function vo(e){if(!e)return"";if(e.startsWith("#"))return Eu(e)===e.toLowerCase()?e:"";let t=yb(Me(e));return t?.kind==="slot"?He(t.slot):""}function wu(e,t=xu){return t.flatMap(n=>{let o=Xe(n);return o?.ink?[{name:n,label:o.label(),value:e?.[n]||Fs}]:[]})}function Cu(e){let t=vu(Me(e));return t?.kind==="slot"?He(t.slot):""}function gI(e){let t=e?.trim();return t?bb.find(n=>He(n)===t)??null:null}function bI(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 xu){let i=He(r);if(!i)continue;let l=i.replace(/^var\((--[\w-]+)\)$/,"$1"),u=a.getPropertyValue(l).trim();if(!u)continue;let d=Tu(u);!d&&s&&(s.fillStyle="#000000",s.fillStyle=u,d=Tu(String(s.fillStyle))),d&&(t[r]=d)}return t}function Tu(e){let t=e.trim().toLowerCase();if(t.startsWith("#"))return Eu(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 wo="sf.gapContainer",Ue={min:-32,max:64,step:2},Nu={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},Xt={Grid:24,Flex:24,FooterGroup:16,HeroGroup:0,Events:24,GalleryB:8,ProductGrid:2},_b=new Set(["Events","GalleryB"]);function xn(e,t,n){if(typeof t=="number"&&Number.isFinite(t)&&t>=Ue.min)return t;if(typeof t=="string"){let o=Nu[e]?.[t];if(typeof o=="number")return o}return typeof n=="number"&&Number.isFinite(n)?n:Xt[e]}var Tb="sf-gap-overlap",Eb="--sf-gap-overlap",Bs="--sf-block-gap",Ou="--sf-block-gap-rem",ge={min:0,max:Ue.max,step:Ue.step};function vn(e){if(typeof e!="number"||!Number.isFinite(e))return null;let t=Math.min(Math.max(Math.round(e),ge.min),ge.max);return t-t%ge.step}function _I(e,t){let n=pt(e,t,"gap",ge);if(n!==null)return{[Bs]:n,[Ou]:n};let o=vn(e);return o===null?{}:{[Bs]:`${o}px`,[Ou]:`${o/16}rem`}}var Pu="--sf-block-gap-phone",ku="--sf-block-gap-phone-rem",xb="--sf-block-gap-on-phone",vb="max-view-tablet:[--sf-block-gap-on-phone:var(--sf-block-gap-phone)]",wb="max-view-wide:[&_[data-sf-line~=edge]:not([data-sf-line~=edge]_*)]:[--sf-block-gap-on-phone:var(--sf-block-gap-phone)]";function TI(e,t){let n=pt(e,t,"gap",ge);if(n!==null)return{[Pu]:n,[ku]:n};let o=vn(e);return o===null?{}:{[Pu]:`${o}px`,[ku]:`${o/16}rem`}}function EI(e){return vn(e)===null?"":`${vb} ${wb}`}var Au="sf-gap-zone",Ru="--sf-gap-len";function Co(e,t){return typeof t=="number"&&Number.isFinite(t)&&t>=Ue.min?!0:typeof t=="string"&&typeof Nu[e]?.[t]=="number"}var Iu="--sf-gap-len-phone",Cb="--sf-gap-len-tablet",wn={min:0,max:Ue.max,step:Ue.step};function qe(e){return typeof e=="number"&&Number.isFinite(e)&&e>=wn.min}function Hs(e){return e/2}function Ms(e,t,n){return qe(n)&&!Co(e,t)}function Us(e,t,n,o,a){return qe(t)?t:Ms(e,n,a)?a:Hs(xn(e,n,o))}var Ob={block:"sf-gap-overlap-block",inline:"sf-gap-overlap-inline",both:"sf-gap-overlap-both"};function xI(e,t,n,o,a){let s={...qe(o)?{[Iu]:`${o}px`}:null,...qe(a)?{[Cb]:`${a}px`}:null};if(!Co(e,t)){let i=`${Xt[e]}px`,l=_b.has(e)?`var(--sf-card-gap, ${i})`:i;return{className:` ${Au}`,style:{[Ru]:`var(${Bs}, ${l})`,[Iu]:`var(${xb})`,...s}}}let r=xn(e,t);return r>=0?{className:` ${Au}`,style:{[Ru]:`${r}px`,...s}}:{className:` ${Tb} ${Ob[n]}`,style:{gap:"0px",[Eb]:`${-r/2}px`}}}import{jsx as Y,jsxs as gt,Fragment as yy}from"react/jsx-runtime";import{useCallback as Yu,useContext as Sy,useId as Zu,useRef as Xu,useState as qu}from"react";import{ThemeIcon as _y}from"efficient-easel/icons";import{Button as Ty,useClickOutside as Ey}from"efficient-shell/ui";import{SettingsField as xy}from"efficient-easel/panel";import{ScreenDocumentContext as vy}from"efficient-easel/screen/components/ScreenDocumentContext";import{jsx as k,jsxs as Je,Fragment as Zb}from"react/jsx-runtime";import{parseHexColor as Jb}from"efficient-shell/format";import{Button as Ws,IconButton as Qb,Tooltip as ey}from"efficient-shell/ui";import{jsx as Ze,jsxs as zb}from"react/jsx-runtime";import{AccentIcon as Wb}from"efficient-easel/icons";import{Button as Kb,Tooltip as jb}from"efficient-shell/ui";import{jsx as ae,jsxs as $s}from"react/jsx-runtime";import{useRef as Pb}from"react";import{ColorPicker as kb,ColorPickerPanel as Ab,ColorSwatch as Rb,HexInput as Ib,Popover as Nb,Tooltip as Lb,colorFill as Db,colorSwatchClasses as Fb,useShellStrings as Bb}from"efficient-shell/ui";import{SettingsDefaultReset as Hb,SettingsField as Mb}from"efficient-easel/panel";import{typedHex as Gs}from"efficient-easel/pick";var Lu="Not set";function Du({value:e,onChange:t,label:n,id:o,caption:a,inherited:s,ariaLabel:r,choices:i}){return ae(Gb,{value:e,onChange:t,label:c(r??n),id:o,caption:a,inherited:s,choices:i})}function Ub(){let{theme:e}=D();return _u(e)}function Gb({value:e,onChange:t,label:n,id:o,caption:a,inherited:s,choices:r}){let i=Ub(),l=e?null:Gs(s??""),u=a!==void 0&&(!e||Gs(a)!==Gs(e))?a:null,d=f=>{f!==e&&t(f)};return $s("div",{className:"sf-colour",children:[r?ae($b,{id:o,value:e,onChange:t,label:n,presets:i,follows:l,choices:r}):ae(kb,{id:o,value:e,onChange:d,label:n,presets:i,fallback:l??void 0,size:"md",align:"start"}),u!==null?ae("span",{className:"sf-colour-caption",children:u}):ae("span",{className:"sf-colour-hexwrap",children:ae(Ib,{value:e||l||"",onChange:d,label:c("{label} hex code",{label:n}),placeholder:e||l?void 0:c(Lu),className:l?"sf-colour-hex is-inherited":"sf-colour-hex",size:"md"})})]})}function $b({value:e,onChange:t,label:n,id:o,presets:a,follows:s,choices:r}){let i=Bb().color,l=e||s||"",u=r.findIndex(p=>p.selected),d=u>=0,f=Pb(u);return d&&(f.current=u),ae(Nb,{id:o,trigger:ae("span",{"aria-hidden":"true",className:"absolute inset-0",style:Db(l)}),triggerLabel:i.swatch(n,l.toUpperCase()||i.none),triggerClassName:Fb({size:"md"}),"aria-label":i.panel(n),align:"start",children:$s("div",{className:"sf-colour-window",children:[ae("div",{role:"group","aria-label":n,className:"sf-colour-choices",children:r.map(p=>ae(Lb,{content:p.label,children:ae(Rb,{color:p.color,"aria-label":p.label,selected:p.selected,onClick:()=>{p.selected||p.onPick()}})},p.label))}),ae(Ab,{value:d?"":e,onChange:t,label:n,presets:a,fallback:(d?l:s)??void 0},f.current)]})})}function be({label:e,icon:t,changed:n,hint:o,onReset:a,resetTo:s,children:r,...i}){return ae(Mb,{label:e,icon:t,htmlFor:i.id,changed:n,hint:o,action:a?ae(Hb,{words:P()?.panel,label:e,changed:!!n,detail:s,onReset:a}):void 0,children:r?$s("div",{className:"es-width-stack",children:[Du({...i,label:e}),r]}):Du({...i,label:e})})}function Cn({label:e,icon:t,value:n,inherited:o,resetTo:a,onChange:s,onReset:r,hint:i,choices:l,children:u}){let d=!!n;return ae(be,{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 zs(e){return ce(e).background}function Vb(e){let t=Ve(e.accent,zs(e));return t===null?null:{ratio:t,grade:Kt(t)}}function Yb(e){let t=zs(e),n=Ve(e.accent,t);return n===null?[]:Lc(e.accent).filter(o=>{let a=Ve(o,t);return a!==null&&a>n&&Kt(a)==="good"})}var Xb={good:"Easy to read","large-only":Wt["large-only"],hard:Wt.hard};function Fu({value:e,onChange:t}){let n=Vb(e),o=n?.grade,a=n&&n.grade!=="good"?Yb(e):[];return Ze(be,{label:c("Main color"),icon:Ze(Wb,{}),hint:n?c(Xb[n.grade]):void 0,value:e.accent,onChange:s=>t({...e,accent:s}),children:a.length>0?Ze("div",{className:"w-full min-w-0",children:zb("div",{className:"sf-readability",children:[Ze("p",{className:"sf-readability-advice",children:qb(o,!0)}),Ze("div",{className:"sf-readability-suggestions",children:a.map(s=>{let r=Ve(s,zs(e));return Ze(jb,{content:c("Use {colour}",{colour:s.toUpperCase()}),children:Ze(Kb,{variant:"secondary",className:"sf-readability-suggestion",leftIcon:Ze("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 qb(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 ty,ChevronDownIcon as Hu,ChevronUpIcon as ny,GroundIcon as oy,LayoutIcon as ay,SquareIcon as sy,TextSmallIcon as ry,TypeIcon as Bu}from"efficient-easel/icons";var On=e=>c("Theme {n}",{n:e+1});function Mu({colors:e}){let t=ce(e),n=ks(e)??t.accent;return Je("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")}),Je("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")}),Je("span",{className:"sf-theme-row",children:[k("span",{className:"sf-theme-btn",style:{background:n,color:As(e,t.accent)},children:c("button")}),k("span",{className:"sf-theme-mini",style:{background:t.surface,borderColor:t.line},children:c("card")})]})]})}var Ks={"Text color":k(Bu,{}),"Label color":k(ry,{}),Background:k(oy,{}),"Panels & cards":k(ay,{}),Borders:k(sy,{}),"Button color":k(ty,{}),"Button text color":k(Bu,{})};function iy({label:e,colorKey:t,value:n,onChange:o,idPrefix:a="sf-theme-ink"}){let s=`${a}-${t}`;return k(be,{label:c(e),icon:Ks[e],id:s,value:n,onChange:r=>o(t,r)})}function ly({value:e,accent:t,onChange:n,idPrefix:o="sf-theme-ink"}){let a=`${o}-button`,s=e!==void 0&&Jb(e)===e.toLowerCase(),r=s?e:t;return k(be,{label:c("Button color"),icon:Ks["Button color"],id:a,value:r,caption:s?r:c("Main"),onChange:n})}function cy({colors:e,accent:t,onChange:n,idPrefix:o="sf-theme-ink"}){let a=`${o}-button-ink`,s=Dc(e),r=As(e,t),i=ks(e)??t,l=Kt(Ve(r,i)??0);return k(be,{label:c("Button text color"),icon:Ks["Button text color"],hint:s&&l!=="good"?c("{grade} on the button",{grade:c(Wt[l])}):void 0,id:a,value:r,caption:s?r:c("Auto"),onChange:n})}var uy=[{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 js({colors:e,onChange:t,idPrefix:n}){let o=ce(e);return k(Zb,{children:uy.map(a=>"colour"in a?k(Fu,{value:e,onChange:t},"colour"):"moduleBreak"in a?k("div",{className:"sf-theme-module-break","aria-hidden":"true"},"module-break"):"button"in a?k(ly,{value:e.button,accent:o.accent,onChange:s=>t({...e,button:s}),idPrefix:n},"button"):"buttonInk"in a?k(cy,{colors:e,accent:o.accent,onChange:s=>t({...e,buttonInk:s}),idPrefix:n},"buttonInk"):k(iy,{label:a.label,colorKey:a.key,value:o[a.key],onChange:(s,r)=>t({...e,[s]:r}),idPrefix:n},a.key))})}function Oo({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=On(e),f=e<Ps.length&&!t.brandInk?Ps[e]:null,p=Kt(Ve(u.text,u.background)??0),m=f?JSON.stringify(t)!==JSON.stringify(f):!1,b=a!==void 0;return Je("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(Mu,{colors:t})}),Je("div",{className:"sf-theme-foot",children:[k("span",{className:"sf-theme-name",children:d}),p!=="good"&&k("span",{className:"sf-theme-warn",children:c(Wt[p])}),s&&i&&b&&k("span",{className:"sf-theme-edit",children:k(ey,{content:a?c("Collapse"):c("Edit colors"),children:k(Qb,{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(ny,{size:14}):k(Hu,{size:14})})})}),s&&i&&!b&&k(Ws,{variant:"secondary",size:"sm",className:"sf-theme-edit","aria-label":c("Edit {name}",{name:d}),onClick:i,children:c("Edit")})]}),a&&Je("div",{id:`sf-theme-colours-${e}`,className:"sf-theme-colours",children:[k(js,{colors:t,onChange:y=>l?.(y)}),f&&k(Ws,{variant:"link",size:"sm",className:"sf-theme-reset",disabled:!m,onClick:()=>l?.({...f}),children:m?c("Reset {name} to the preset",{name:d}):c("Not changed")})]})]})}function Uu({colors:e,name:t,nameId:n,open:o,menuId:a,labelId:s,buttonRef:r,onClick:i,onKeyDown:l,onEdit:u}){return Je("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(Mu,{colors:e}):k("span",{className:"sf-secttheme-nopreview","aria-hidden":"true"})}),Je("div",{className:"sf-theme-foot",children:[k("span",{id:n,className:"sf-theme-name",children:t}),u&&k(Ws,{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(Hu,{size:12,className:"sf-multi-caret","aria-hidden":"true"})})]})]})}import{useCallback as Zs,useEffect as Ku,useRef as ko}from"react";import{currentEaselSession as my}from"efficient-easel/screen/lib/session";import{backendOf as dy}from"efficient-easel/screen/lib/session";var Ee=dy,QI=e=>e.blocks;import{useEaselSession as hy}from"efficient-easel/screen/lib/session-context";import{useSyncExternalStore as py}from"react";var $u,Vs=null,ht=null,Po=0,Ys=new Set;function Xs(e){$u=e;for(let t of Ys)t()}function n0(e){Vs=e,Po+=1,ht&&clearTimeout(ht),ht=null,Xs(void 0)}function o0(e){Po+=1,Xs(e)}function zu(e=250){Vs&&(ht&&clearTimeout(ht),ht=setTimeout(()=>{ht=null;let t=Vs;if(!t)return;let n=++Po;t().then(o=>{n===Po&&Xs(o)}).catch(()=>{})},e))}function Gu(){return $u}function fy(e){return Ys.add(e),()=>{Ys.delete(e)}}function a0(){return py(fy,Gu,Gu)}var qs=new Set;function Wu(e){return qs.add(e),()=>{qs.delete(e)}}async function r0(){let e=(await Promise.allSettled([...qs].map(async t=>t()))).find(t=>t.status==="rejected");if(e)throw e.reason}import{WebsiteBackendError as gy}from"efficient-easel/screen/lib/backend-error";function ju(e=my()){return(t,n,o)=>{let a=Ee(e).theme;return a?a.update(t,o?{siteId:o}:void 0):Promise.reject(new gy("invalid","This backend stores no site theme."))}}function Vu(e){return e.themeFromDocument?{status:"skipped",reason:"template"}:e.token?null:{status:"skipped",reason:"no-token"}}async function by(e,t=ju()){let{themeFromDocument:n,token:o,siteId:a,patch:s}=e,r=Vu({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 Ao({themeFromDocument:e,tokenRef:t,siteId:n,onResult:o}){let a=ko(null),s=ko({}),r=hy(),i=ko(o);i.current=o;let l=ko(null),u=Zs(p=>{if(p.status==="skipped"){let m=`skipped:${p.reason}`;if(l.current===m)return;l.current=m}else l.current=null;i.current?.(p)},[]),d=Zs(async()=>{a.current&&(clearTimeout(a.current),a.current=null);let p=s.current;s.current={};let m=await by({themeFromDocument:e,token:t?.current,siteId:n,patch:p},ju(r));return u(m),m.status==="saved"&&zu(),m.status==="failed"&&(s.current={...p,...s.current}),m},[e,t,n,u,r]),f=Zs((p,m=!1)=>{let b=Vu({themeFromDocument:e,token:t?.current});if(b){u(b);return}s.current={...s.current,...p},a.current&&clearTimeout(a.current),m?d():a.current=setTimeout(()=>{d()},500)},[e,t,d,u]);return Ku(()=>()=>{d()},[d]),Ku(()=>Wu(async()=>{if(!a.current&&Object.keys(s.current).length===0)return;let p=await d();if(p.status==="failed")throw p.error}),[d]),{persist:f,flush:d}}var wy="Follow the page",P0="Follow the slideshow",Cy=e=>c("Editing {name} changes it everywhere.",{name:e});function Oy({colors:e}){if(!e)return Y("span",{className:"sf-secttheme-chip sf-secttheme-chip--none","aria-hidden":"true"});let t=ce(e);return gt("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 Py({themes:e,value:t,onPick:n,onEdit:o,menuId:a,followLabel:s}){return gt("div",{className:"sf-multi-menu sf-secttheme-menu",id:a,role:"listbox",children:[s!==void 0&&gt(yy,{children:[gt("button",{type:"button",role:"option","aria-selected":t===null,className:`sf-secttheme-item${t===null?" is-active":""}`,onClick:()=>n(Yc),children:[Y(Oy,{}),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:On(t)})}),e.map((r,i)=>i===t?null:Y(Oo,{role:"option",index:i,colors:r,selected:!1,onPick:()=>n(i),onEdit:o?()=>o(i):void 0},i))]})}function ky({index:e,colors:t,onChange:n,onDone:o}){let a=On(e),s=Zu();return gt("div",{className:"sf-secttheme-sheet",children:[gt("div",{className:"sf-secttheme-sheet-head",children:[Y("span",{children:a}),Y(Ty,{variant:"secondary",className:"sf-secttheme-done",onClick:o,children:c("Done")})]}),Y("div",{className:"sf-secttheme-rows",children:Y(js,{colors:t,onChange:n,idPrefix:s})}),Y("p",{className:"sf-secttheme-warn",children:Cy(a)})]})}function Ju({value:e,onChange:t,followLabel:n,hint:o,canEdit:a=!0}){let{theme:s,setTheme:r}=D(),i=Pe(s),l=Sy(vy),u=l?.tokenRef,d=l?.siteId??null,f=!l?.capabilities?.hasSiteTheme,{persist:p,flush:m}=Ao({themeFromDocument:f,tokenRef:u,siteId:d}),b=Pe(i),y=b.themes,T=mt(e),S=T!==null?y[T]:void 0,E=S??(y.length?zt(b):void 0),[x,v]=qu(!1),[C,H]=qu(null),w=Xu(null),B=Xu(null),z=Zu(),Te=Yu(()=>{v(!1),H(null)},[]),ro=Yu(()=>{!x&&C===null||(m(),Te())},[x,C,Te,m]);Ey(w,ro);let io=X=>{t(X),Te()},lo=X=>{if(C===null)return;let ub=y.map((db,pb)=>pb===C?X:db),hs={...b,themes:ub};r(hs),p({selected_preset:hs.selected,theme_presets:hs.themes})};return gt("div",{className:"sf-secttheme",ref:w,children:[Y(xy,{label:c("Theme"),icon:Y(_y,{}),labelId:`${z}-label`,hint:o,children:Y(Uu,{colors:E,onEdit:a&&T!==null?()=>{H(T),v(!1)}:void 0,name:S?On(T):c(n??wy),nameId:`${z}-value`,labelId:`${z}-label`,open:x,menuId:z,buttonRef:B,onClick:()=>{H(null),v(X=>!X)},onKeyDown:X=>{X.key==="Escape"&&(x||C!==null)&&(X.preventDefault(),Te())}})}),x&&C===null&&Y("div",{onKeyDown:X=>{X.key==="Escape"&&(X.preventDefault(),Te(),B.current?.focus())},children:Y(Py,{themes:y,value:T,onPick:io,onEdit:a?X=>{H(X),v(!1)}:void 0,menuId:z,followLabel:n})}),a&&C!==null&&y[C]&&Y(ky,{index:C,colors:y[C],onChange:lo,onDone:()=>{m(),Te(),B.current?.focus()}})]})}import{defaultTextStyles as Rd,textStyleCaseCss as e_}from"efficient-easel/text-styles/model";import{resolveViewValue as Id}from"efficient-easel/draw";import{VIEW_DESKTOP_MIN as Qu,VIEW_TABLET_MIN as ed}from"efficient-easel/draw";var Ro=.02,td=`(min-width: ${Tn}px) and (max-width: ${Qu-Ro}px)`,nd=`(max-width: ${Tn-Ro}px)`,Io=`(min-width: ${ed}px) and (max-width: ${Qu-Ro}px)`,No=`(max-width: ${ed-Ro}px)`;import{textStyleCaseCss as qy,textStyleCaseOfCss as Zy,viewKeyAt as wd}from"efficient-easel/draw";function Lo(e,t){return t?`${e}[${t.index}].${t.rowKey}`:e}function Ay(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 tr,encodePartId as aN}from"efficient-easel/draw";import{LINK_FIELD_MARKER as fd,SCAFFOLD_FIELD_MARKER as dd,TEXT_FIELD_MARKER as Ho}from"efficient-easel/draw";import{readHidable as md}from"efficient-easel/draw";import{SCALAR_TEXT_CONTROLS as zy}from"efficient-easel/draw";var od={ProductGrid:{source:{keep:["slug"]}},GalleryItem:{product:{keep:["code","finish"]}},FeaturedCover:{source:{keep:["slug"]}},LongRead:{source:{keep:["slug"]}}},ad={Events:["posts"],SubscribeBlogs:["posts"]};var Ry=["anchor"],Iy=/^href$|Href$|^url$|Url$|^link$|^mailto$|^tel$/;function Pn(e){return Ry.includes(e)||Iy.test(e)}var Ny={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"}}};Ny.ContactLocations={"locations[].lat":{verb:"pii"},"locations[].lng":{verb:"pii"},"locations[].mapsUrl":{verb:"pii"},"locations[].geocode":{verb:"pii"}};var H0=Object.fromEntries(Object.entries(od).map(([e,t])=>[e,Object.keys(t)])),M0=Object.fromEntries(Object.entries(ad).map(([e,t])=>[e,[...t]]));var Js="__ownBox";function sd(e){return!!e&&typeof e=="object"&&e[Js]===!0}var Qs="sfPanelOnly";function Do(e){return!!e&&typeof e=="object"&&e[Qs]===!0}import{TEXT_FIELD_MARKER as My}from"efficient-easel/draw";import{TEXT_FIELD_MARKER as rd}from"efficient-easel/draw";import{readHidable as id}from"efficient-easel/draw";import{SCALAR_TEXT_CONTROLS as Ly}from"efficient-easel/draw";var Dy=Ly,Fy=["text","textarea"],By=["textarea","plainTextarea"];function Hy(e){return!e||typeof e!="object"?null:e[rd]?.control??null}function ld(e){let t=Hy(e);return t&&Dy.includes(t)?t:null}function j0(e){return By.includes(e)}function V0(e){return!e||typeof e!="object"?void 0:e[rd]?.placeholder}function Fo(e){return id(e).text}function er(e,t,n){return Fy.includes(e)?{text:n,hidden:id(t).hidden}:n}function Y0(e,t,n,o){return Fo(e[t])===o?null:{...e,[t]:er(n,e[t],o)}}function cd(e){if(!(!e||typeof e!="object"))return e[My]}function Uy(e){if(!e||typeof e!="object")return null;let t=e.arrayFields;return t&&typeof t=="object"?t:null}function ud(e,t){if(!Array.isArray(t))return[];let n=cd(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=Uy(e);return a?(t.forEach((s,r)=>{for(let[i,l]of Object.entries(a)){if(!ld(l))continue;let u=Fo(s?.[i])||cd(l)?.placeholder||"";u&&o.push({row:{index:r,rowKey:i},text:u})}}),o):[]}function Gy(e,t){if(Array.isArray(e))return e[t.index]?.[t.rowKey]}function $y(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 eN(e,t,n,o,a){let s=Gy(e[t],n);return Fo(s)===a?null:$y(e,t,n,er(o,s,a))}function tN(e,t){return t?`${e} \xB7 row ${t.index+1}`:e}var mN="data-sf-part",hN="data-sf-region-part",gN="data-sf-part-row";function bN(e,t){return`${e}[${t}]`}var yN="data-sf-part-kind",Wy="data-sf-part-style-owner",Ky="data-sf-part-style-kind";function SN(e){for(let t=e;t;t=t.parentElement){let n=t.getAttribute(Wy),o=t.getAttribute(Ky);if(n&&o)return{owner:n,kind:o};if(t.getAttribute("data-easel-block"))return null}return null}var pd=2;function qt(e){return gs(e).replace(/\s+/gu,"")}function Bo(e,t,n){let o=e[Ho];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}=md(t);a?n.push(a):o.placeholder&&n.push(o.placeholder);return}if(!e[fd]){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))Bo(r,a?.[s],n);return}if(e.objectFields&&t&&typeof t=="object")for(let[a,s]of Object.entries(e.objectFields))Bo(s,t[a],n)}}function jy(e){if(!e||typeof e!="object")return!1;let t=e;return t[fd]?!1:!!t[Ho]||t.type==="text"||t.type==="textarea"}function hd(e,t){let n=e[Ho];return n?.label?n.label:typeof e.label=="string"?e.label:t}function Vy(e){let t=e.indexOf(" (");return(t>0?e.slice(0,t):e).trim()}function _N(e,t,n){if(!e)return[];let o=[];for(let[a,s]of Object.entries(e)){if(!s||typeof s!="object"||Pn(a))continue;let r=s,i=[];Bo(r,t?.[a],i),!i.length&&r[dd]!==void 0&&Bo(r,r[dd],i);let l=hd(r,a);if(n?.(a)&&jy(r)){i.length&&o.push({key:a,label:l,texts:[],keyed:!0});continue}let u=new Set;for(let{row:p,text:m}of ud(r,t?.[a])){let b=qt(m);b.length<pd||(u.add(b),o.push({key:a,label:l,texts:[b],row:p}))}let d=new Set(u),f=[];for(let p of i){let m=qt(p);m.length<pd||d.has(m)||(d.add(m),f.push(m))}f.length&&o.push({key:a,label:l,texts:f})}return o}function Yy(e){return!e.offPage&&!e.hidden&&e.panelOnly!==!0}var Xy=zy;function gd(e,t){if(!t||typeof t!="object"||Pn(e)||sd(t))return null;let n=t[Ho];return!n||!Xy.includes(n.control)?null:n}function TN(e,t){let n=gd(e,t);return n!==null&&n.identifier!==!0}function EN(e,t){if(!e)return[];let n=[];for(let[o,a]of Object.entries(e)){let s=gd(o,a);if(!s)continue;let{text:r,hidden:i}=md(t?.[o]);if(Yy({offPage:s.offPage===!0,hidden:!!i,panelOnly:Do(a)}))continue;let l=r||s.placeholder||"",u=gs(l).replace(/\s+/gu," ").trim();n.push({key:o,label:Vy(hd(a,o)),preview:u,offPage:s.offPage===!0,identifier:s.identifier===!0,hidden:!!i})}return n}function Zt(e){return!e||typeof e!="object"||Array.isArray(e)?null:e}function Mo(e,t){return Zt(e?.[t])??{}}function bd(e,t,n){let o=Mo(e,t);return Zt(j(o,n))??{}}function yd(e,t,n,o){let{[n]:a,...s}=Mo(e,t),r=o?{...s,[n]:o}:s,{[t]:i,...l}=e;return Object.keys(r).length?{...l,[t]:r}:l}import{isLengthUnit as ir}from"efficient-easel/screen/lib/content/length-units";var lr="_partStyles",Jy="data-sf-part-styled",Uo="data-sf-text-style",Qy=/^(heading|body)-[1-7]$/;function _t(e){return typeof e=="string"&&Qy.test(e)}var Go={heading:"heading-1",heading2:"heading-2",heading3:"heading-3",body:"body-1",label:"body-5"};function eS(e){if(!e)return null;for(let[t,n]of Object.entries(Go))if(n===e)return t;return null}function BN(e){if(_t(e.textStyle))return e.textStyle;let t=lt(e.role);return t?Go[t]:void 0}var tS=[400,500,600,700],An=["left","center","right","justify"],nr=5,or=1e3,nS=-5,oS=10,aS=0,sS=64,rS=2,Sd={size:{min:nr,max:or,step:1},sizeTablet:{min:nr,max:or,step:1},sizePhone:{min:nr,max:or,step:1},padding:{min:aS,max:sS,step:rS}},iS=.05,lS=.01,cS=["line","letter"],uS=.5,dS=2.5,pS=-1,fS=1,mS=0,hS=400,gS=[...new Set(Object.values(po))];function HN(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 MN(e){return Mo(e,lr)}function bS(e,t){return bd(e,lr,t)}function Cd(e,t,n){return yd(e,lr,t,yS(n).length?n:null)}function yS(e){return Object.entries(e).filter(([,t])=>t!==void 0)}function SS(e){return cS.includes(e)}var kn=(e,t,n)=>Math.min(n,Math.max(t,e)),_S=["sizeUnit","sizeUnitTablet","sizeUnitPhone"];function ar(e){let t=wd("sizeUnit",e),n=_S.find(o=>o===t);if(!n)throw new Error(`a part stores no unit key ${t}`);return n}var bt={size:ar("desktop"),sizeTablet:ar("tablet"),sizePhone:ar("mobile"),paragraphSpacing:"paragraphSpacingUnit",padding:"paddingUnit"},Od=Object.values(bt);function Re(e,t){return L(e[bt[t]])}function TS(e,t,n={}){if(Od.includes(e))return ir(t)&&t!=="px"?t:null;if(he(bt,e)&&Re(n,e)!=="px"){let o=St(Number(t),2);return!Number.isFinite(o)||o<0||o===0&&e!=="padding"?null:o}if(SS(e)){let o=Math.round(Number(t));return!Number.isFinite(o)||o===0?null:kn(o,nS,oS)}if(e==="lineHeight"){let o=Number(t);return Number.isFinite(o)?St(kn(o,uS,dS),3):null}if(e==="letterSpacing"){let o=Number(t);return Number.isFinite(o)?St(kn(o,pS,fS),4):null}if(e==="paragraphSpacing"){let o=Math.round(Number(t));return!Number.isFinite(o)||o<=0?null:kn(o,mS,hS)}if(he(Sd,e)){let{min:o,max:a}=Sd[e],s=Math.round(Number(t));return Number.isFinite(s)?kn(s,o,a):null}return e==="italic"?typeof t=="boolean"?t:null:e==="role"||e==="fontRole"?lt(t)?t:null:e==="sizeToken"?cr(t)?t:null:e==="textStyle"?_t(t)?t:null:e==="alignPhone"||e==="alignTablet"?An.includes(t)?t:null:t}var ES=["weight","size","sizeTablet","sizePhone","line","letter","lineHeight","letterSpacing","paragraphSpacing","padding"];function Jt(e){let t=null,n=o=>{t??={...e},delete t[o]};for(let o of ES){let a=e[o];a!==void 0&&!(typeof a=="number"&&Number.isFinite(a))&&n(o)}e.align!==void 0&&!An.includes(e.align)&&n("align"),e.alignTablet!==void 0&&!An.includes(e.alignTablet)&&n("alignTablet"),e.alignPhone!==void 0&&!An.includes(e.alignPhone)&&n("alignPhone"),e.textStyle!==void 0&&!_t(e.textStyle)&&n("textStyle"),e.sizeToken!==void 0&&!cr(e.sizeToken)&&n("sizeToken"),e.fontRole!==void 0&&!lt(e.fontRole)&&n("fontRole");for(let o of Od)e[o]!==void 0&&!ir(e[o])&&n(o);return t??e}function cr(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"&&gS.includes(l);return i(t)&&r(n)&&(o===void 0||i(o))&&(a===void 0||r(a))&&(s===void 0||xS(s,n))}function xS(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 ur(e){return e?.pxPhone&&cr(e)?{step:e.stepPhone??e.step,px:e.pxPhone}:null}function Pd({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 vS=[["font","role"],["font","fontRole"],["role","textStyle"],["line","lineHeight"],["letter","letterSpacing"]];function wS(e){let t=[];for(let[n,o]of vS)n===e?t.push(o):o===e&&t.push(n);return t}function UN(e,t,n,o){let a={...bS(e,t)},s=o==null?null:TS(n,o,a);if(s===null)delete a[n];else{a[n]=s;for(let r of wS(n))delete a[r]}return Cd(e,t,a)}function GN(e,t){return Cd(e,t,{})}function CS(e){return Zy(e)??"none"}function OS(e){return qy(e)??""}var _d={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 PS(e,t){return lt(e.role)||(t?.blockDrawsStyle?null:eS(e.textStyle))}var kS="--sf-part-size-cap";function dr(e,t){return e&&t?.sizeCap?`min(${e}, var(${kS}, ${e}))`:e}function $N(e,t){return e?.[t]===!0}function zN(e,t){return e==="Text"&&t==="text"}var AS={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 RS(e){let t=po[e],n=j(AS,t);return n?`var(--size-${t}, ${n})`:`var(--size-${t})`}function pr(e){let t={};return typeof e.lineHeight=="number"?t.lineHeight=e.lineHeight:e.line&&(t.lineHeight=St(IS+e.line*iS,3)),typeof e.letterSpacing=="number"?t.letterSpacingEm=e.letterSpacing:e.letter&&(t.letterSpacingEm=St(e.letter*lS,4)),t}var IS=1,yt="--sf-part-para";function NS(e,t){e=Jt(e);let n={};if(typeof e.sizePhone=="number"&&e.sizePhone>0)n.fontSize=M(e.sizePhone,Re(e,"sizePhone"));else{let a=ur(e.sizeToken);if(a)n.fontSize=Pd(a);else{let s=zo(e);s!==void 0&&(n.fontSize=M(s,Re(e,"sizeTablet")))}}n.fontSize&&(n.fontSize=dr(n.fontSize,t));let o=e.alignPhone??$o(e);return o&&(n.textAlign=o),n}function $o(e){return e.alignTablet&&e.alignTablet!==e.align?e.alignTablet:void 0}function zo(e){let t=e.sizeTablet!==void 0&&Re(e,"sizeTablet")!==Re(e,"size")?e.sizeTablet:Be("textSize",e.size,e.sizeTablet,void 0).tablet;return t&&t>0?t:void 0}function LS(e,t){let n=Jt(e),o={},a=zo(n);a!==void 0&&(o.fontSize=dr(M(a,Re(n,"sizeTablet")),t));let s=$o(n);return s&&(o.textAlign=s),o}function WN(e,t){if(t==="desktop")return;let n=Jt(e);return(t==="mobile"?$o(n):void 0)??n.align}function DS(e,t){if(t==="desktop")return e;let n=Jt(e),o=zo(n),a=$o(n);if(t==="tablet"){let i=e;return o!==void 0&&(i={...i,size:o,sizeUnit:n[bt.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[bt.sizePhone]};else{let i=ur(n.sizeToken);i?s={...s,size:void 0,sizeToken:i}:o!==void 0&&(s={...s,size:o,sizeUnit:n[bt.sizeTablet]})}let r=n.alignPhone??a;return r&&(s={...s,align:r}),s}function fr(e,t,n){return mr(DS(e,t),Wo,n)}function FS(e){return wd("size",e)}function KN(e,t){if(t==="desktop")return null;let n=Jt(e);if(t==="mobile"){if(ur(n.sizeToken))return null;let o=zo(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 kd(e,t){let n=FS(t);if(!he(e,n))return e;let o={...e};return delete o[n],o}function jN(e,t,n){let o=fr(kd(e,t),t,n);return{fontFamily:o.fontFamily,fontSize:o.fontSize}}function mr(e,t,n){e=Jt(e);let o=PS(e,n),a=pr(e),s=dr(e.size?M(e.size,Re(e,"size")):e.sizeToken?Pd(e.sizeToken):o?RS(o):"",n);return{fontFamily:e.font?US(e.font):e.fontRole?`var(${_d[e.fontRole]})`:o?`var(${_d[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`:"",[yt]:e.paragraphSpacing?M(e.paragraphSpacing,Re(e,"paragraphSpacing")):"",textTransform:OS(e.case),textAlign:e.align??"",paddingTop:Td(e.padding,Re(e,"padding")),paddingBottom:Td(e.padding,Re(e,"padding")),color:BS(e.color),fontStyle:e.italic===!0?"italic":e.italic===!1?"normal":""}}var BS=e=>vo(e),Td=(e,t)=>e===void 0?"":M(e,t),St=(e,t)=>Number(e.toFixed(t));function VN(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:HS(Number.parseInt(e.fontWeight,10)),lineRatio:Number.isFinite(o)?St(o/n,3):1.2,letterEm:Number.isFinite(a)?St(a/n,4):0,align:MS(e.textAlign),case:CS(e.textTransform),paddingPx:Number.isFinite(s)?Math.round(s):0}}function HS(e){return Number.isFinite(e)?tS.reduce((t,n)=>Math.abs(n-e)<Math.abs(t-e)?n:t):400}function MS(e){for(let t of An)if(t===e)return t;return e==="end"?"right":"left"}function YN(e,t){let n=Ed(e);if(!n)return"";for(let o of Mt)if(Ed(t(o.cssVar))===n)return o.key;return""}var Ed=e=>(e.split(",")[0]??"").replace(/["']/g,"").replace(/\s+/g," ").trim().toLowerCase();function US(e){let t=ic(e);return t?`var(${t.cssVar})`:""}function XN(e,t,n,o){return!t||tr(t)?.nodeId!==e?null:n.find(a=>o(a.getAttribute("class")))??n[0]??null}function GS(e,t){return Zt(j(e,t))??{}}function qN(e,t,n=()=>Wo,o=l=>l,a=WS,s="desktop",r=()=>!1,i=()=>!1){let l=0;for(let{element:u,partId:d}of e){let f=tr(d)?.propKey;if(!f)continue;let p=GS(t,o(f)),m=fr(p,s,{blockDrawsStyle:r(f),sizeCap:i(f)});_t(p.textStyle)?u.setAttribute?.(Uo,p.textStyle):u.removeAttribute?.(Uo);let b=sr.some(T=>u.style[T]),y=!1;for(let[T,S]of Object.entries(m))VS(u,T,S),S&&(y=!0);if(b||sr.some(T=>m[T]))for(let T of $S(u,a))for(let S of sr)T.style[S]=m[S]??"";y&&(l+=1)}return l}function $S(e,t){let n=qt(e.textContent??""),o=[],a=e;for(let s=0;s<zS&&t(a);s+=1){let r=a.parentElement;if(!r||qt(r.textContent??"")!==n)break;o.push(r),a=r}return o}var zS=8;function WS(e){let t=e;return typeof window>"u"||!t?.ownerDocument?!1:window.getComputedStyle(t).display==="inline"}var Wo={fontKey:"",sizePx:16,weight:400,lineRatio:1,letterEm:0,align:"left",case:"none",paddingPx:0};function KS(e){if(!e||typeof e!="object")return null;let t={};_t(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=bt[n];t[n]!==void 0&&ir(e[o])&&(t[o]=e[o])}return Object.keys(t).length?t:null}function jS(e,t,n){let o=KS(e);if(!o)return{};let a=fr(o,t,n?.sizeCap?{sizeCap:!0}:void 0);return{...a.fontFamily?{fontFamily:a.fontFamily}:{},...a.fontSize?{fontSize:a.fontSize}:{}}}function ZN(e){return _t(e?.textStyle)||!!e?.role||typeof e?.size=="number"&&e.size>0}function JN(e,t,n){if(!e||typeof e!="object")return{};let o=Ec(e.role,t,po)??{},a=t.sized?jS(kd(e,n),n):{};return{...o,...a}}function QN(e,t,n){n.fontFamily&&e.fontFamily===n.fontFamily&&(e.fontFamily=t.fontFamily),n.fontSize&&e.fontSize===n.fontSize&&(e.fontSize=t.fontSize)}function VS(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===yt&&(n?a.setAttribute?.(xd,""):a.removeAttribute?.(xd))}var xd="data-sf-part-para",YS=Object.keys(mr({},Wo)),rr=new Set(["color","overflowWrap",yt,"fontStyle"]),sr=YS.filter(e=>!rr.has(e));function e1(e,t,n,o=l=>l,a=()=>!1,s=()=>null,r=[],i=()=>!1){let l=new Map;for(let p of e){let m=Lo(p.key,p.row);for(let b of p.texts){let y=l.get(b);y?(y.keys.add(p.key),y.partKeys.add(m)):l.set(b,{keys:new Set([p.key]),partKeys:new Set([m])})}}let u=new Map;for(let p of new Set([...Object.keys(t),...r])){if(!XS(p))continue;let m=vd(n,p,Zt(t[p])??{},{blockDrawsStyle:!1,sizeCap:i(p)},s(p));m&&u.set(p,m)}let d=p=>{let m=o(p),b=s(m);if(!he(t,m)&&!b)return null;let y=Zt(t[m])??{};return vd(n,p,y,{blockDrawsStyle:a(p),sizeCap:i(p)},b)},f=new Map;for(let[p,{keys:m,partKeys:b}]of l){let y=b.size===1?[...b][0]:m.size===1?[...m][0]:null;if(!y)continue;let T=d(y);T&&f.set(p,T)}for(let p of e){if(!p.keyed)continue;let m=d(Lo(p.key,p.row));m&&u.set(p.key,m)}return f.size||u.size?{rules:f,kindRules:u,drawn:new Set(l.keys())}:null}function vd(e,t,n,o,a){let s=mr(n,Wo,o),r=LS(n,o),i=NS(n,o),l=_t(n.textStyle)?n.textStyle:void 0;return!Object.values(s).some(Boolean)&&!Object.keys(r).length&&!Object.keys(i).length&&!l&&!a?null:{stamp:qS(e,t),declarations:s,...Object.keys(r).length?{tablet:r}:{},...Object.keys(i).length?{phone:i}:{},...l?{textStyle:l}:{},...a?{motion:a}:{}}}function XS(e){return e.startsWith("@")}function t1(e,t){return e?.kindRules.get(t)??null}function qS(e,t){let n=o=>o.replace(/[^A-Za-z0-9_-]+/g,"-");return`${n(e)}~${n(t)}`}function ZS(e){return e?{tablet:td,phone:nd}:{tablet:Io,phone:No}}function n1(e,{inBox:t=!1}={}){let{tablet:n,phone:o}=ZS(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!==""),f=S=>S.map(([E,x])=>`${JS(E)}: ${x}`).join("; "),p=`[${Jy}="${l}"]`,m=d.filter(([S])=>!rr.has(S)),b=d.filter(([S])=>rr.has(S));m.length&&a.push(`${p}, *:has(> ${p}) { ${f(m)} }`),b.length&&a.push(`${p} { ${f(b)} }`),u[yt]&&(a.push(`*:has(> ${p}) { ${yt}: ${u[yt]} }`),a.push(...Ko(p,`*:has(> ${p})`)));let y=Object.entries(i.tablet??{}).filter(([,S])=>S!=="");y.length&&a.push(`@media ${n} { ${p}, *:has(> ${p}) { ${f(y)} } }`);let T=Object.entries(i.phone??{}).filter(([,S])=>S!=="");T.length&&a.push(`@media ${o} { ${p}, *:has(> ${p}) { ${f(T)} } }`)};for(let i of e.rules.values())r(i);for(let i of e.kindRules.values())r(i);return a.join(`
2
- `)}function Ko(e,t){let n=`var(${yt})`,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 JS=e=>e.replace(/[A-Z]/g,t=>`-${t.toLowerCase()}`);function o1(e,t){if(!e)return null;let n=qt(t),o=e.rules.get(n);if(o)return o;if(n.length<QS||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 QS=8;var hr=e=>e==="sentence"?"none":void 0,Nd=["font","color","size","sizeTablet","sizePhone","weight","italic","lineHeight","lineHeightTablet","lineHeightPhone","letterSpacing","letterSpacingTablet","letterSpacingPhone","paragraphSpacing","paragraphSpacingTablet","paragraphSpacingPhone","letterCase","largestSize","largestSizeTablet","largestSizePhone"],Qt=["desktop","tablet","phone"],Tt=(e,t)=>U(e,t);function yr(e,t,n,o=Ut()){return Id("textSize",t,e.sizeTablet,e.sizePhone,o)[n]}var t_=[["lineSpacing","lineHeight","line"],["letterSpacing","letterSpacing","letter"]];function gr(e){for(let[t,n,o]of t_)for(let a of Qt)if(e===Tt(t,a))return{key:U(n,a),view:a,spacing:o};return{key:e,view:"desktop",spacing:null}}function Ie(e){let t={};for(let n of Nd)e[n]!==void 0&&(t[n]=e[n]);return t}function Sr(e,t){let{auto:n,...o}=e,a=new Set(t??[]),s=Nd.filter(r=>a.has(r)&&e.values[r]===void 0);return s.length?{...o,auto:s}:o}function Ld(e){let t=e.fonts,n=e.sizes,o=e.typography,a=Wc(e.compression),s={"heading-1":{font:W(t.heading),size:O(n.headingLarge),weight:O(o.weight),lineHeight:a.lineHeight,letterSpacing:a.letterSpacing,letterCase:hr(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:hr(o.case2)},"heading-3":{font:W(t.heading3),size:O(n.headingSmall),weight:O(o.weight3),lineHeight:a.lineHeight,letterSpacing:a.letterSpacing,letterCase:hr(o.case3)},"body-1":{font:W(t.body),size:O(n.body)},"body-5":{font:W(t.label),size:O(n.label)}};return Rd().map(({id:r,kind:i,name:l})=>({id:r,kind:i,name:l,values:Ie(s[r]??{})}))}function _r(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=>Sr({...t,values:Ie(t.values??{})},Array.isArray(t.auto)?t.auto:void 0)):null}function g1(e){return _r(e)??[]}function Dd(e){return _r(e)??Rd().map(({id:t,kind:n,name:o})=>({id:t,kind:n,name:o,values:{}}))}function tn(e,t){let n=Ld(t),o=_r(e);return o?o.map(a=>{let s={...br(n,a.id)};for(let r of a.auto??[])delete s[r];return{...a,values:Ie({...s,...a.values})}}):n}var br=(e,t)=>e.find(n=>n.id===t)?.values??{},Ad=["heading-1","heading-2","heading-3"];function Fd({saved:e,old:t,cur:n,next:o,sizeOf:a,panelView:s="desktop"}){let r=Ld(t),i=Dd(e),l=tn(i,t),u=[],d=o.map(p=>{let m=n.find(C=>C.id===p.id),b=i.find(C=>C.id===p.id);if(!m||!b){let C=n_([p],a,s)[0],H=C.values.color;return H===void 0?C:{...C,values:{...C.values,color:Me(H)}}}let y={...b.values},T=new Set(b.auto??[]),S=p.values,E=m.values,x=[...new Set([...Object.keys(S),...Object.keys(E)])].filter(C=>JSON.stringify(S[C])!==JSON.stringify(E[C])),v=C=>gr(C).spacing==="letter";x.sort((C,H)=>Number(v(C))-Number(v(H)));for(let C of x){let{key:H,view:w,spacing:B}=gr(C),z=H,Te=S[C];if(Te===void 0){delete y[z],br(r,p.id)[z]!==void 0&&(u.push([p.id,z]),T.add(z));continue}if(T.delete(z),B==="line")y[z]=en(Te/100,3);else if(B==="letter"){let ro={...l.find(X=>X.id===p.id)?.values??{}};for(let X of x)S[X]===void 0&&delete ro[gr(X).key];let io=Ie({...ro,...y}),lo=yr(io,a({...p,values:io}),w);y[z]=lo?en(Te/lo,4):0}else y[z]=Te}return Sr({id:p.id,kind:p.kind,name:p.name,values:Ie(y)},T)}),f=t.compression;if(u.some(([p,m])=>(m==="lineHeight"||m==="letterSpacing")&&Ad.includes(p))&&ft(f)!=="normal"){for(let p of Ad){let m=d.find(y=>y.id===p);if(!m)continue;let b={...m.values};for(let y of["lineHeight","letterSpacing"])u.some(([T,S])=>T===p&&S===y)||b[y]===void 0&&!(m.auto??[]).includes(y)&&(b[y]=br(r,p)[y]);m.values=Ie(b)}f="normal"}return{saved:d,old:{...t,compression:f}}}function Bd(e,t){let n={text_styles:e.saved};return e.old.compression!==t.compression&&(n.heading_compression=ft(e.old.compression)),n}var en=(e,t)=>Number(e.toFixed(t)),Hd=(e,t)=>Qt.indexOf(e)<Qt.indexOf(t)?t:e;function Md(e,t,n="desktop"){return e.map(o=>{let a={...o.values},s=t(o);for(let r of Qt){let i=U("lineHeight",r),l=o.values[i],u=o.values[U("letterSpacing",r)];delete a[i],l!==void 0&&(a[Tt("lineSpacing",r)]=en(l*100,1));let d=Hd(r,n);u!==void 0&&(a[Tt("letterSpacing",r)]=en(u*yr(o.values,s,d),d===r?2:4))}return{id:o.id,kind:o.kind,name:o.name,values:a}})}function n_(e,t,n="desktop"){return e.map(o=>{let a=o.values,s={...a};for(let u of Qt)delete s[Tt("lineSpacing",u)],delete s[Tt("letterSpacing",u)];let r={id:o.id,kind:o.kind,name:o.name,values:Ie(s)},i={...r.values},l=t({...r,values:{...r.values}});for(let u of Qt){let d=a[Tt("lineSpacing",u)],f=a[Tt("letterSpacing",u)];if(typeof d=="number"&&(i[U("lineHeight",u)]=en(d/100,3)),typeof f=="number"){let p=yr(r.values,l,Hd(u,n));i[U("letterSpacing",u)]=p?en(f/p,4):0}}return{...r,values:Ie(i)}})}function b1(e){let t={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}),sizes:Rs({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:ft(e.heading_compression),typography:jc(e)},n=e.text_styles??null,o=Array.isArray(n)?Tr(tn(n,t),t):t;return{fonts:_n(o.fonts),sizes:Rs(o.sizes),compression:ft(o.compression),typography:o.typography,textStyles:n}}function Tr(e,t){let n=p=>e.find(m=>m.id===p)?.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,f=p=>p==="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:f(o.letterCase),weight:o.weight??null,maxPx:o.largestSize??null,weight2:a.weight??null,weight3:s.weight??null,case2:f(a.letterCase),case3:f(s.letterCase)}}}function y1(e){let t=[];for(let n of e){let o=n.values,a=`.${uu(n)}`,s=`[${Uo}="${n.id}"]`,r=`${a}, ${s}`,i=[],l=o.font!==void 0?Mt.find(p=>p.key===o.font)?.cssVar:void 0;if(l&&i.push(`font-family: var(${l})`),o.size!==void 0){let p=o.largestSize!==void 0?Math.min(o.size,o.largestSize):o.size;i.push(`font-size: ${p}px`)}let u=vo(o.color);u&&i.push(`color: ${u}`),o.italic===!0&&i.push("font-style: italic"),o.weight!==void 0&&i.push(`font-weight: ${o.weight}`);let d=[];o.lineHeight!==void 0&&d.push(`line-height: ${o.lineHeight}`),o.letterSpacing!==void 0&&d.push(`letter-spacing: ${o.letterSpacing}em`),n.kind==="body"&&i.push(...d);let f=e_(o.letterCase);f&&n.kind==="body"&&i.push(`text-transform: ${f}`),o.paragraphSpacing&&i.push(`--sf-part-para: ${o.paragraphSpacing}px`),i.length&&t.push(`${r} { ${i.join("; ")} }`),n.kind==="heading"&&d.length&&t.push(`${r}, ${a}:is(h1, h2, h3, h4), ${s}:is(h1, h2, h3, h4) { ${d.join("; ")} }`),n.kind==="heading"&&f&&t.push(`${s}, ${a}:is(h1, h2, h3, h4) { text-transform: ${f} }`),o.paragraphSpacing&&(t.push(`*:has(> ${s}) { --sf-part-para: ${o.paragraphSpacing}px }`),t.push(...Ko(`:is(${r})`,`*:has(> ${s})`))),t.push(...o_(n,r,a,s))}return t.join(`
3
- `)}function o_(e,t,n,o){let a=e.values,s=Be("textSize",a.size,a.sizeTablet,a.sizePhone),r=Be("textSize",a.largestSize,a.largestSizeTablet,a.largestSizePhone),i=Be("same",a.lineHeight,a.lineHeightTablet,a.lineHeightPhone),l=Be("same",a.letterSpacing,a.letterSpacingTablet,a.letterSpacingPhone),u=Be("spacing",a.paragraphSpacing,a.paragraphSpacingTablet,a.paragraphSpacingPhone),d=Id("textSize",a.size,a.sizeTablet,a.sizePhone,Ut()),f=a_[e.id],p=[];for(let[m,b]of[["tablet",Io],["phone",No]]){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(...Ko(`:is(${t})`,`*:has(> ${o})`)),x!==void 0&&f&&y.push(`.sf-themed-content { --size-${f}: ${x}px !important }`),y.length&&p.push(`@media ${b} { ${y.join(" ")} }`)}return p}var a_=Object.fromEntries(Object.entries(du).map(([e,{step:t}])=>[e,t]));function S1(e){return e!==!0&&e!==!1?"":`em.text-accent { font-style: ${e?"italic":"normal"} }`}function _1(e){return e?Go[e]:void 0}function s_(e){let t=pr(e);return Ie({font:e.font,color:e.color===void 0?void 0:Me(e.color),size:e.size,weight:e.weight,italic:e.italic,lineHeight:t.lineHeight,letterSpacing:t.letterSpacingEm,paragraphSpacing:e.paragraphSpacing,letterCase:e.case})}function T1(e){return Object.keys(s_(e)).length>0}function E1({saved:e,old:t,styleId:n,values:o}){let a=Dd(e);return{saved:r_(a,n,o),old:t}}function r_(e,t,n){return e.map(o=>o.id===t?Sr({...o,values:Ie({...o.values,...n})},o.auto):o)}import{jsx as i_}from"react/jsx-runtime";import{useState as l_}from"react";import{TextStylesList as c_}from"efficient-easel/text-styles";import{usePreviewDevice as u_}from"efficient-easel/draw/client";var Ud=["font","color","size","weight","emphasis","lineSpacing","letterSpacing","paragraphSpacing","letterCase","largestSize"],d_=["size","lineSpacing","letterSpacing","letterCase"],p_=500,Er=Mt.map(e=>({value:e.key,label:e.label,family:`var(${e.cssVar})`,italic:e.italicLoaded}));function Gd({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 f=u_(),[p,m]=l_(null),b=tn(e,t),y=_o(f),T=Md(b,a,y);return i_(c_,{styles:T,onChange:S=>s(Fd({saved:e,old:t,cur:T,next:S,sizeOf:a,panelView:y})),fonts:Er,colours:n,colourNameOf:o,settings:u?Ud.filter(S=>S!=="size"):Ud,auto:d_,openId:r===void 0?p:r,onOpenChange:i??m,readOnly:l,device:y,onPick:d?S=>{let E=b.find(x=>x.id===S.id);E&&d(E)}:void 0,fallback:S=>{let E=b.find(v=>v.id===(S.kind==="heading"?"heading-1":"body-1")),x={};return E?.values.font&&S.id!==E.id&&(x.font=E.values.font),S.kind==="heading"&&(x.weight=p_),x}})}var $d="background";function zd(e){let t=ce(zt(e));return wu({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 Wd(e){return zd(e).filter(t=>t.key!==$d)}function Kd(e){let t=zd(e).filter(n=>n.key===$d);return n=>{let o=Me(n);return t.find(a=>a.key===o)?.value??o}}import{useEasel as f_}from"efficient-easel/easel";function jd({themeFromDocument:e,persist:t}){let{appState:n,dispatch:o}=f_(w=>w),{fonts:a,setFonts:s,sizes:r,setSizes:i,headingCompression:l,setHeadingCompression:u,headingTypography:d,setHeadingTypography:f,textStyles:p,setTextStyles:m}=D(),b=n.data,y=b.root?.props??{},T=e?_n(y.fonts):a,S=e?Hc:r,E=e?ft(y.headingCompression):l,x=e?Kc(y.headingTypography):d,v={fonts:T,sizes:S,compression:E,typography:x},C=e?y.textStyles:p,H=w=>o({type:"replaceRoot",root:{...b.root,props:{...y,...w}},recordHistory:!0});return{fonts:T,sizes:S,compression:E,typography:x,old:v,saved:C,write:(w,B)=>{let z=Tr(tn(w.saved,w.old),w.old);e?H({textStyles:w.saved,fonts:z.fonts,headingCompression:z.compression,headingTypography:z.typography}):(m(w.saved),s(z.fonts),i(z.sizes),u(z.compression),f(z.typography)),t(Bd(w,v),B)},writeRoot:H}}import{jsx as N,Fragment as Sn,jsxs as Ht}from"react/jsx-runtime";import{useEasel as lb,useRootFields as pR}from"efficient-easel/easel";import{Inspector as fR}from"efficient-easel/fields";import{SettingsGroup as mR}from"efficient-easel/panel";import{useEffect as hR,useRef as gR,useState as Zl}from"react";import{jsx as Et,Fragment as b_,jsxs as y_}from"react/jsx-runtime";import{useState as qd}from"react";import{SettingsDefaultReset as S_,SettingsField as __}from"efficient-easel/panel";import{useEaselStrings as T_}from"efficient-easel/strings";import{AddIcon as E_}from"efficient-easel/icons";import{Button as x_}from"efficient-shell/ui";import{iconOf as v_,noGlyph as w_}from"efficient-easel/screen/lib/document/box-fields";import{jsx as jo,Fragment as m_,jsxs as Vd}from"react/jsx-runtime";import{Button as Yd,Dialog as h_}from"efficient-shell/ui";function g_(e){return En("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 Xd({count:e,onCancel:t,onConfirm:n}){return Vd(h_,{open:!0,onClose:t,role:"alertdialog",size:"sm",title:c("Clear this site\u2019s colors?"),footer:Vd(m_,{children:[jo(Yd,{variant:"secondary",onClick:t,children:c("Cancel")}),jo(Yd,{variant:"danger",onClick:n,children:c("Clear colors")})]}),children:[jo("p",{children:g_(e)}),jo("p",{className:"mt-2 font-medium",children:c("This cannot be undone.")})]})}var C_=w_("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"),O_="Reset color",P_={selected:0,themes:[]};function k_(e){e(P_)}function Zd({value:e,onChange:t}){let n=e?.themes??[],o=n.length===0,a=Pe(e),[s,r]=qd(!1),i=T_(),[l,u]=qd(null),d=(S,E)=>{t({...a,themes:a.themes.map((x,v)=>v===S?E:x)})},f=zt(a).accent,p=new Set(a.themes.map(S=>S.brandInk).filter(Boolean)),m=Ic.filter(S=>!p.has(S)).map(S=>Nc(f,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 y_(b_,{children:[o?null:Et(__,{label:c(O_),icon:v_(C_),labelId:"sf-theme-reset",action:Et(S_,{label:c("all theme colors"),words:i.panel,changed:!0,onReset:()=>r(!0)})}),s&&Et(Xd,{count:n.length,onCancel:()=>r(!1),onConfirm:()=>{r(!1),k_(t)}}),Et("div",{className:"sf-theme-list",role:"radiogroup","aria-label":c("Theme"),children:b.map((S,E)=>Et(Oo,{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))}),Et(x_,{variant:"secondary",leftIcon:Et(E_,{}),onClick:T,className:"sf-theme-add",children:c("Add new theme")})]})}import{jsx as ts}from"react/jsx-runtime";import{SettingsDefaultReset as mk,SettingsField as hk}from"efficient-easel/panel";import{SquareIcon as gk}from"efficient-easel/icons";import{jsx as g,jsxs as ze,Fragment as Ke}from"react/jsx-runtime";import{parseOption as Qd}from"efficient-shell/format";var xr=["image","video"],ep={image:"imageFocal",image2:"imageFocal2"},A_={HeroSingle:"image",HeroSlide:"video"};function aL(e,t){return Qd(xr,A_[e],t)}var tp=["one","side","stacked"],R_="one",sL={one:"One",side:"Side by side",stacked:"Stacked"};function np(e){return Qd(tp,R_,e)}function Jd(e){return e==="one"?1:2}function I_(e,t){if(tp.includes(e))return e;let n=np(t);return n==="side"?"stacked":n}function rL(e){let t=np(e.mediaLayout);return Math.max(Jd(t),Jd(I_(e.mediaLayoutPhone,t)))}import{cloneElement as hl,createContext as FC,useContext as Oh,useEffect as BC,useId as Ph,useRef as Jn,useState as Qn}from"react";import{useEasel as Za,useSelectedHost as It}from"efficient-easel/easel";import{PIN_LENGTH as Wa,toDateKey as z$,fromDateKey as W$,parseOption as HC}from"efficient-shell/format";function N_(e){return!!e&&typeof e=="object"&&!Array.isArray(e)&&typeof e.src=="string"}function se(e){return typeof e=="string"?e:N_(e)?e.src:""}function lL(e,t,n){return vr(e,t.split("."),n)}function vr(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,f=l.map(p=>{let m=vr(p,a,n);return m!==p&&(d=!0),m});return d?{...i,[r]:f}:e}let u=vr(l,a,n);return u===l?e:{...i,[r]:u}}import{parseOption as ap}from"efficient-shell/format";var L_=["upload","youtube"],D_="upload",pL={upload:"Upload",youtube:"YouTube"},F_=["background","click"],B_="background",fL={background:"Background",click:"Click to play"};function mL(e){return ap(L_,D_,e)}function hL(e){return ap(F_,B_,e)}var op=/^[A-Za-z0-9_-]{11}$/,H_=/^(?:www\.|m\.|music\.)?(?:youtube\.com|youtube-nocookie\.com|youtu\.be)$/;function gL(e){let t=typeof e=="string"?e.trim():"";if(!t)return null;if(op.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:"||!H_.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&&op.test(a)?a:null}function bL(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 yL(e){return`https://i.ytimg.com/vi/${e}/maxresdefault.jpg`}function SL(e){return`https://i.ytimg.com/vi/${e}/hqdefault.jpg`}var _L="Play video";var wr={frame:"Video frame",image:"Image"},TL={any:[{field:"loadingShows",is:"image"},{all:[{not:{field:"loadingShows",set:!0}},{field:"poster",set:!0}]}]};function Rn(e){let t=e.loadingShows;return t==="image"?"image":t!=null&&t!==""?"frame":se(e.poster)?"image":"frame"}function EL(e,t="desktop"){let[n,o]=t==="phone"?[e.posterPhone,e.videoFramePhone]:[e.poster,e.videoFrame],[a,s]=Rn(e)==="image"?[n,o]:[o,n];return se(a)||se(s)||void 0}function sp(e){if(se(e.mediaVideo)){if(Rn(e)==="frame")return se(e.videoFrame)?void 0:se(e.poster)?"frame-missing-image":"frame-missing-surface";if(!se(e.poster))return se(e.videoFrame)?"image-missing-frame":"image-missing-surface"}}var Vo="videoFrames",Cr="videoFramesNotOwn";function rp(e,t,n){let o=se(e.mediaVideo);if(!o||!t||Rn(e)!=="frame"||se(e.videoFrame))return;let a=t[o],s=!!se(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 M_(e,t){let n=se(e),o=n&&t?t[n]:void 0;return o?.state==="ready"&&o.frame?o.frame:void 0}function xL(e,t,n){let o=n?.[Cr];if(!(Array.isArray(o)&&o.includes(e)))return M_(t,n?.[Vo])}import{useSyncExternalStore as U_}from"react";function ip(){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 U_(n,a,a)}}}import{zoneKey as G_}from"efficient-easel/data";var xe="SiteHeader",Qe="SiteFooter",Or="sections",PL=[xe,Qe],Yo=e=>e===xe||e===Qe,kL=e=>G_({parentId:e,slot:Or});function AL(e,t,n=[]){return{type:e,props:{id:t,[Or]:n}}}var $_=new Set(["Footer",xe,Qe]);function Xo(e){let t=new Set,n=!1,o=e.filter(a=>{let s=a?.type??"";return s==="Header"?(n=!0,!1):$_.has(s)?t.has(s)?(n=!0,!1):(t.add(s),!0):!0});return n?o:e}function RL(e,t){return e.some(n=>n?.type===t.type)?e:t.type===xe?[t,...e]:[...e,t]}var lp={[xe]:{max:3,takes:["Flex","Ticker"]},[Qe]:{max:6,takes:["Flex","Prose","Logos","Divider"]}};function IL(e,t,n){if(!Yo(e))return!0;let o=lp[e];return n<o.max&&o.takes.includes(t)}function NL(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(!Yo(s?.type))continue;let r=s.props?.[Or];if(!Array.isArray(r)||!r.some(l=>l?.props?.id===o))continue;let i=lp[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 z_}from"efficient-easel/draw";function Pr(e){if(!e)return null;let t=e.lastIndexOf(":");return t>0?{ownerId:e.slice(0,t),slot:e.slice(t+1)}:null}function qo(e,t,n){let o=Pr(n?.zone),a=o?z_(e,t,o.ownerId):null;return a&&o?{...a,slot:o.slot}:null}import{isNode as W_}from"efficient-easel/data";var cp="Footer",up=[xe,cp,Qe],xt=e=>{let t=e?.content;return Array.isArray(t)?t:[]},et=e=>{let t=e?.zones;return t&&typeof t=="object"&&!Array.isArray(t)?t:null},nn=e=>{let t=e?.props?.id;return typeof t=="string"?t:void 0},dp=e=>Pr(e)?.ownerId??"";function pp(e){let t=Xo(xt(e)),n=t.some(o=>o?.type===Qe);return t.filter(o=>o?.type===xe||o?.type===Qe||o?.type===cp&&!n)}function Zo(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(W_(a)){let s=nn(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(dp(r))||(s.add(r),o(i),a=!0)}}return n}function fp(e,t){let n=xt(e).filter(o=>{let a=nn(o);return typeof o?.type=="string"&&up.includes(o.type)||a!==void 0&&t(a)});return n.length?Zo(n,et(e)):new Set}function kr(e,t){let n={},o={};for(let[a,s]of Object.entries(e??{}))(t.has(dp(a))?n:o)[a]=s;return{owned:n,rest:o}}function UL(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 GL(e,t){if(!t)return e;let n=pp(t);if(!n.length)return e;let o=n.filter(i=>i.type===xe),a=n.filter(i=>i.type!==xe),s={...e,content:[...o,...xt(e),...a]},{owned:r}=kr(et(t),Zo(n,et(t)));return Object.keys(r).length&&(s.zones={...et(e)??{},...r}),s}function $L(e,t){if(!t)return{page:e,chrome:null};let n=pp(t),o=new Set(n.map(nn).filter(E=>!!E)),a=[],s=[];for(let E of xt(e)){let x=nn(E);x&&o.has(x)||Yo(E?.type)?s.push(E):a.push(E)}let r=new Map(s.map(E=>[nn(E),E])),i=new Set,l=Xo(xt(t)).flatMap(E=>{let x=nn(E);if(!x||!o.has(x))return[E];let v=r.get(x);return v?(i.add(v),[v]):[]});for(let E of s)i.has(E)||l.some(x=>x?.type===E.type)||(l=E.type===xe?[E,...l]:[...l,E]);l=Xo(l);let u=l.length===xt(t).length&&l.every((E,x)=>E===xt(t)[x]),d=et(e),f=Zo(l,d),{owned:p,rest:m}=kr(d,f),b=kr(et(t),Zo(n,et(t))).owned,y={...t,content:u?t.content:[...l]},T=et(t);if(T||Object.keys(p).length){let E={};for(let[x,v]of Object.entries(T??{}))x in b?x in p&&(E[x]=p[x]):E[x]=v;for(let[x,v]of Object.entries(p))x in E||(E[x]=v);y.zones=E,T&&K_(y.zones,T)&&(y.zones=T)}let S={...e,content:a};return d&&(Object.keys(m).length||!Object.keys(b).length?S.zones=m:delete S.zones),{page:S,chrome:y}}function K_(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 zL(e,t){return n=>e(n)||n!==void 0&&up.includes(n)&&t()}var mp=null;function KL(e){mp=e}function hp(){return mp}var gp=null;function jL(e){gp=e}function VL(){return gp}var Ar=ip();function bp(e,t,n){if(!t)return;let o={...Ar.get(e)};for(let[a,s]of Object.entries(t))o[a]={...s,noted:n};Ar.set(e,o)}function QL(e,t){bp(e,t,"load")}function eD(e,t){bp(e,t,"save")}function yp(e){return Ar.use(e)}var Rr=e=>!!hp()?.sectionOf(e);function Sp(e,t=Rr){return fp(e,t)}function _p(e,t,n,o=Rr){if(n)return e&&Sp(t,o).has(e)?void 0:n}function tD(e,t,n=Rr){if(!e)return{};let o=[...Sp(t,n)];return o.length?{[Vo]:e,[Cr]:o}:{[Vo]:e}}import{ScreenDocumentContext as MC}from"efficient-easel/screen/components/ScreenDocumentContext";import{readHidable as UC,hidableText as GC}from"efficient-easel/draw";import{FOLD_FIELD_MARKER as kh,LINK_FIELD_MARKER as $C,MEDIA_FIELD_MARKER as zC,SCAFFOLD_FIELD_MARKER as WC,TEXT_FIELD_MARKER as We,foldMetaOf as Ah,textFieldIdentifier as J$}from"efficient-easel/draw";import{jsx as Op}from"react/jsx-runtime";import{useCallback as q_}from"react";import{useEasel as Z_}from"efficient-easel/easel";import{SettingsAction as J_}from"efficient-easel/panel";import{isLengthUnit as Y_}from"efficient-easel/screen/lib/content/length-units";import{CORNER_SIDES as Jo,hasCornerSubset as In,normalizeCornerSides as Ne}from"efficient-easel/screen/lib/content/style-keys";import{isLengthUnit as j_}from"efficient-easel/screen/lib/content/length-units";var Ir={kind:"radius",unitKey:"sectionCornersUnit"};function Nr(e){return typeof e=="number"&&Number.isFinite(e)}function rD(e,t,n){if(!Nr(e))return;let o=j_(n)&&n!=="px"?jt(e,n):jt(ke(e));if(Object.keys(o).length===0)return;let a=o[Lr];if(typeof a!="string")return o;let s=In(t)?vt(a,Ne(t)??[]):a;return{...o,[V_]:s}}var V_="--sf-section-radius",Lr="--sf-card-radius";function vt(e,t){return Jo.map(n=>t.includes(n)?e:"0").join(" ")}var Tp=[{value:"tl",label:"Top left"},{value:"tr",label:"Top right"},{value:"bl",label:"Bottom left"},{value:"br",label:"Bottom right"}];var Nn={kind:"radius",unitKey:"cardCornersUnit"},X_="--sf-card-box-radius";function Dr(e){return typeof e=="number"&&Number.isFinite(e)}function dD(e,t,n){if(!Dr(e))return;let o=(Y_(n)&&n!=="px"?jt(e,n):jt(ke(e)))[Lr];if(typeof o!="string")return;let a=In(t)?vt(o,Ne(t)??[]):o;return{[X_]:a}}function Ep(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?.[Nn.unitKey];return e.map(r=>r?.props?.id===t?r:{...r,props:{...r.props,cardCorners:o,cardCornerSides:a,[Nn.unitKey]:s}})}function xp(e,t,n){let o=qo(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}:Dr(i?.props?.cardCorners)?{can:!0,others:u,zone:o.zone,index:o.index,data:{...o.item,props:{...o.item.props,[a]:Ep(s,l)}}}:{can:!1,reason:"unset",others:u}}function vp(e){return e.can?En("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 wp(e){return En("Applied to {n} card","Applied to {n} cards",e)}function Cp(e,t){e.can&&t(e.zone,e.index,e.data)}import{useSectionOps as Q_}from"efficient-easel/screen/lib/document/use-section-ops";var eT="apply-corners-to-siblings",tT="Apply to all cards";function nT({plan:e,onPress:t}){return Op(J_,{id:eT,label:c(tT),note:vp(e),disabled:!e.can,doneLabel:wp(e.others),onPress:t})}function Pp(){let{appState:e,config:t}=Z_(s=>s),n=Q_(),o=xp(t,e.data.content??[],e.ui.itemSelector),a=q_(()=>{Cp(o,n.replaceComponent)},[o,n]);return Op(nT,{plan:o,onPress:a})}import{isShown as Bp,lazyShowWhenContext as bT}from"efficient-shell/format";var tt="product",Qo="recordType",kp={key:tt,label:"Product",fields:[]},oT=/^[a-z][a-z0-9]*(-[a-z0-9]+)*$/,aT=/^[a-z][A-Za-z0-9]*$/,sT=["text","date","images"],Fr=new Map,Ap=0;function rT(e){if(typeof e.key!="string"||!oT.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===tt)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"||!aT.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(!sT.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 wD(e){let t=e.map(rT);for(let n of t)Fr.set(n.key,n);t.length&&(Ap+=1)}function Br(){return[kp,...Fr.values()]}function iT(e){return e===tt?kp:Fr.get(e)??null}function Hr(){return Ap}function Ln(e){let t=e?.[Qo];return typeof t!="string"?tt:t.trim()||tt}function Mr(e){return Ln(e)===tt}function CD(e,t){let n=iT(e)?.fields??[];return t?n.filter(o=>t.includes(o.kind)):n}var ea="product",Rp="tyre",lT=[ea,Rp];function kD(e){return lT.includes(e)}var cT="productType",uT={[ea]:"alloy-wheel",[Rp]:"tyre"},dT=["alloy-wheel","tyre"];function Ip(e,t){return Mr(t)?Np(t)??uT[e]??null:null}function Np(e){if(!Mr(e))return null;let t=e?.[cT];return typeof t=="string"&&dT.includes(t)?t:null}function AD(e){let t=e?.root;return Np(t?.props)}var pT="Main Pages",fT="Dynamic Pages",mT="dynamic",hT="dynamic";function Ur(e){return e.kind===hT}var Gr="lightbox";function ID(e){return e.kind===Gr}function ND(e){let t=[],n=[];for(let o of e){if(Ur(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??pT,rows:[o]})}if(n.length){let o=t.findIndex(a=>a.key.startsWith("system:"));t.splice(o===-1?t.length:o,0,{key:mT,label:fT,rows:n})}return t}var ta=null,Lp=null;function gT(e,t){ta=e,Lp=t}function HD(e){gT(e,null)}function MD(){return ta}function Dn(){return Ur({kind:Lp})||ta===ea}function UD(e){return Ip(ta??"",e)??"alloy-wheel"}function Dp(e){return Dn()?Ln(e):null}function JD(e,t,n){let o=!1,a={};for(let[s,r]of Object.entries(e)){if(!Bp(xs(r),t??{},n)){o=!0;continue}let i=yT(r,t?.[s],t??{},n);i!==r&&(o=!0),a[s]=i}return o?a:e}function yT(e,t,n,o){let a=e?.options;if(!Array.isArray(a))return e;let s=a.filter(r=>r?.value===t||!r?.showWhen||Bp(r.showWhen,n,o));return s.length===a.length?e:{...e,options:s}}function QD(e,t,n,o){let a=qo(t,n,o);return{device:e,parentType:a?.item.type,parent:a?.item.props}}function Fp(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 Fp(n.not,t);for(let o of[n.all,n.any])if(Array.isArray(o)&&o.some(a=>Fp(a,t)))return!0;return!1}function eF(e,t={}){return bT({parentType:()=>e.parent?.type??void 0,parent:()=>e.parent?.props??void 0,dynamicPage:()=>Dn(),root:()=>e.appState?.data?.root?.props,...t})}import{isLengthUnit as ST}from"efficient-easel/screen/lib/content/length-units";var Hp=1,_T="cardImageUnit",$r={kind:"radius",unitKey:_T},Mp={kind:"radius"};function TT(e){return ke(e)}function rF(e,t){if(ST(t)&&t!=="px"){let o=O(e);return o!==void 0&&o>=0?{"--sf-card-image-radius":M(o,t)}:{}}let n=TT(e);return n===null?{}:{"--sf-card-image-radius":`${n}px`}}import{isLengthUnit as ET}from"efficient-easel/screen/lib/content/length-units";var Up={kind:"radius",unitKey:"cornersUnit"},Gp=1,$p="Corners";function xT(e){return ke(e)}function fF(e,t,n){let o=ET(n)&&n!=="px"?O(e):void 0,a=o===void 0?xT(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:In(t)?vt(s,Ne(t)??[]):s}}import{phoneKey as qp}from"efficient-easel/screen/lib/content/view-tiers";var Wp=12,on=6,vT=Tn,na={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"}},Kp=["phone","acrossPhone","leadPhone"];var wT=new Set(Kp),Fn=Object.fromEntries(Object.entries(na).map(([e,t])=>[e,Object.fromEntries(Object.entries(t).filter(([n])=>!wT.has(n)))])),zr=Object.keys(na),jp=[2,3,4,6];function Wr(e,t){return zr.filter(n=>n===t||e===null||Fn[n].across===e)}function Vp(e){let t=e.layout;return typeof t=="string"&&he(na,t)?t:null}function Kr(e){let t=Vp(e);return t?CT(t,e.layoutPhone):null}var oa={oneAcross:{label:"One across",phone:[[on,2]],acrossPhone:1}};function Yp(e){return typeof e=="string"&&he(oa,e)?e:null}function zp(e,t){return t?on/e.acrossPhone:Wp/e.across}function jr(e){return e.ratio?tu.find(t=>t.shape===e.ratio)?.ratio??null:null}function Xp(e){return[...e.lead??[],...e.desktop]}function CT(e,t){let n=na[e],o=Yp(t);if(!o)return n;let{phone:a,acrossPhone:s}=oa[o],r=Object.fromEntries(Kp.map(i=>[i,void 0]));return{...n,...r,phone:a,acrossPhone:s}}var OT="sf-wall--";function PT(e){let t=Vp(e);if(!t)return"";let n=Yp(e.layoutPhone);return`${OT}${t}${n?`--${n}`:""}`}function yF(e){let t=Kr(e);if(!t)return"";let n=`.${PT(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=[],f=i.length,p=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(${f}n+${p+y+1}){grid-column:span ${m};grid-row:span ${b}}`)});for(let m=1;m<f;m+=1)d.push(`${a(f,p,m)}{grid-column:span ${l};grid-row:span 1}`);return d};o.push(`${n}{grid-template-columns:repeat(${Wp},minmax(0,1fr))}`);let r=jr(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,zp(t,!1),t.lead)),o.push(`@media (max-width:${vT}px){`),o.push(`${n}{grid-template-columns:repeat(${on},minmax(0,1fr))}`),o.push(...s(t.phone,zp(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 aa=12,Zp=1,sa=3;var kT=3;function an(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 AT(e){return an(e,1,aa)??kT}function EF(e,t){return an(e,Zp,sa)??(AT(t)===4?2:Zp)}function xF(e){return e==null||e===""?null:an(e,1,aa)}var vF="data-sf-span",ra=4;function RT(e){return e==null||e===""?null:an(e,1,ra)}var wF="data-sf-row-span",Vr="gridTileAt",Yr=48;function CF(e){return e==null||e===""?null:an(e,1,Yr)}var OF="--sf-tile-at";function PF(e){return e==null||e===""?null:an(e,1,sa)}function kF(e){return RT(e)}var AF="data-sf-span-phone",RF="data-sf-row-span-phone",IF=["gridSpan","gridRowSpan",Vr,qp("gridSpan"),qp("gridRowSpan")];function NF(e,t){if(!e)return!1;if(IT(e,t)||e.type==="Grid")return!0;if(e.type==="GalleryB"){if(Kr(e.props??{}))return!1;let n=e.props?.columns;return n!=null&&n!==""}return!1}var Jp=new Map;function LF(e,t){Jp.set(e,[...t])}function IT(e,t){if(!e||typeof e.type!="string"||typeof t!="string")return!1;let n=Jp.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 NT}from"react/jsx-runtime";import*as LT from"efficient-easel/icons";function Qp(e){let t=e.replace(/(^|-)([a-z])/g,(o,a,s)=>s.toUpperCase()),n=LT[`${t}Icon`];return n?NT(n,{size:16}):null}import{jsx as nt,Fragment as BT,jsxs as cf}from"react/jsx-runtime";import{useContext as HT,useEffect as MT,useId as UT,useState as uf}from"react";import{SettingsField as GT,SettingsSwitch as $T}from"efficient-easel/panel";import{AnchorIcon as zT}from"efficient-easel/icons";import{ScreenDocumentContext as WT}from"efficient-easel/screen/components/ScreenDocumentContext";import{Snippet as KT}from"efficient-shell/ui";import{slugify as jT}from"efficient-shell/format";import{slugify as DT}from"efficient-shell/format";function Xr(e){return typeof e=="string"?e.trim():e&&typeof e=="object"&&typeof e.text=="string"?e.text.trim():""}var MF=e=>DT(Xr(e));var ef="homepage";import{slugify as FT}from"efficient-shell/format";var tf=[{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 nf(e){return e.offersCommerce&&e.offersService?tf:tf.filter(t=>!t.needs||(t.needs==="commerce"?e.offersCommerce:e.offersService))}var qr="#popup:";function of(e){return`${qr}${e}`}function af(e){return e.startsWith(qr)&&e.slice(qr.length).trim()||null}function Bn(e){return e===ef?"/":`/${e}`}function sf(e){return`/journal/${e}`}function KF(e){return`/wheels/${e}`}function ia(e,t){return`${Bn(e)}#${t}`}function rf(...e){let t=new Set,n=[];for(let o of e)for(let a of o?.content??[]){let s=Xr(a?.props?.anchor);if(!s)continue;let r=FT(s);!r||t.has(r)||(t.add(r),n.push({slug:r,name:s}))}return n}function jF(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 lf(e){return/^\/wheels\/[^/?#]+(?:[?#].*)?$/.test(e)}import{readHidable as VT}from"efficient-easel/draw";function df({value:e,onChange:t,nameBox:n}){let o=VT(e).text,[a,s]=uf(!1),r=a||o.trim()!=="",i=UT();return cf(BT,{children:[nt(GT,{label:c("Add an anchor"),labelId:i,icon:nt(zT,{}),action:nt($T,{checked:r,ariaLabelledBy:i,onChange:l=>{s(l),!l&&o!==""&&t("")}})}),r&&n(e,t),r&&nt(YT,{name:o})]})}function YT({name:e}){let t=HT(WT),n=t?.templateId?"":t?.currentSlug??"",[o,a]=uf("");MT(()=>a(pu()),[]);let s=jT(e);if(!s||!n)return null;let r=`${o}${ia(n,s)}`,i=r.replace(/^https?:\/\//,""),l=i.lastIndexOf("#");return nt("div",{className:"sf-anchor-link",children:nt(KT,{value:r,label:c("link"),size:"sm",children:cf("span",{className:"sf-anchor-link-text",children:[nt("span",{className:"sf-anchor-link-path",children:i.slice(0,l)}),nt("span",{className:"sf-anchor-link-hash",children:i.slice(l)})]})})})}import{jsx as Le,jsxs as XT}from"react/jsx-runtime";import{Fragment as qT}from"react";import{Button as la,Tooltip as ZT}from"efficient-shell/ui";function ca({status:e,statusText:t,onRefresh:n,busy:o=!1,edit:a,hint:s,spaced:r=!0,compact:i=!1,oneLine:l=!1}){return i?Le("div",{className:`sf-blogsource sf-blogsource--compact${l?" sf-blogsource--line":""}`,style:r?{marginTop:8}:void 0,children:Le(ZT,{content:s,className:l?"sf-name-tip":void 0,children:Le("p",{className:"sf-blogsource-status","data-state":e,children:[t?Le(qT,{children:t},"status"):null,n?Le(la,{variant:"link",size:"sm",className:"sf-blogsource-link",onClick:n,disabled:o,children:c("Refresh now")},"refresh"):null,a?Le(la,{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])})})}):XT("div",{className:"sf-blogsource",style:r?{marginTop:9}:void 0,children:[Le("p",{className:"sf-blogsource-status","data-state":e,children:t}),n?Le(la,{variant:"secondary",className:"sf-blogsource-action",onClick:n,disabled:o,children:c("Refresh now")}):null,a?Le(la,{variant:"secondary",className:"sf-blogsource-action",onClick:a.onClick,children:a.label}):null,Le("p",{className:"es-field-hint",children:s})]})}import{AdjustIcon as KC,EyeIcon as jC,AnimationIcon as VC,BackgroundIcon as gh,BorderAllIcon as YC,BlockSectionIcon as XC,ColumnWidthsIcon as Ya,ColumnsIcon as Rh,CornerIcon as Ih,DirectionDownIcon as qC,DirectionLeftIcon as ZC,DirectionRightIcon as JC,DirectionUpIcon as QC,EditIcon as eO,GapIcon as tO,GridIcon as Nh,GroundIcon as pl,HashIcon as Lh,HeightIcon as Xa,ImageIcon as nO,ListIcon as oO,LocationIcon as bh,PaddingBottomIcon as Dh,PaddingLeftIcon as Fh,PaddingRightIcon as Bh,PaddingTopIcon as gl,PageIcon as aO,PhoneIcon as dz,StickyIcon as Hh,SearchIcon as sO,SquareIcon as rO,TypeIcon as iO,WidthIcon as lO}from"efficient-easel/icons";import{jsx as G,Fragment as wt,jsxs as Ct}from"react/jsx-runtime";import{CaptionIcon as JT,DateIcon as QT,FlagIcon as eE,TitleIcon as tE,ButtonIcon as nE,DollarIcon as oE,HashIcon as aE,LinkIcon as sE,NoteIcon as rE,TagIcon as iE,TextLinesIcon as lE}from"efficient-easel/icons";var pf={body:lE,button:nE,link:sE,label:iE,number:aE,price:oE,note:rE,name:eE,date:QT,caption:JT,title:tE},ff={eyebrow:Ct(wt,{children:[G("path",{d:"M5 6.5h5"}),G("path",{d:"M5 12.5h14"}),G("path",{d:"M5 18h11"})]}),heading:Ct(wt,{children:[G("path",{d:"M6.5 5v14"}),G("path",{d:"M17.5 5v14"}),G("path",{d:"M6.5 12h11"})]}),intro:Ct(wt,{children:[G("path",{d:"M4 5.5v13"}),G("path",{d:"M8 7.5h12"}),G("path",{d:"M8 12h12"}),G("path",{d:"M8 16.5h8"})]}),value:Ct(wt,{children:[G("rect",{x:"2.5",y:"7",width:"19",height:"10",rx:"2"}),G("path",{d:"M6.5 12h7"})]}),quote:Ct(wt,{children:[G("path",{d:"M9.5 5.5C7 7.2 5.5 9.7 5.5 12.8h4v5.7h-5v-5.7"}),G("path",{d:"M19.5 5.5c-2.5 1.7-4 4.2-4 7.3h4v5.7h-5v-5.7"})]}),tag:Ct(wt,{children:[G("rect",{x:"3",y:"5.5",width:"18",height:"13",rx:"2.5"}),G("path",{d:"M8 9.5h8"}),G("path",{d:"M12 9.5v5"})]}),meta:Ct(wt,{children:[G("path",{d:"M4 7h16"}),G("path",{d:"M4 14h3.5"}),G("path",{d:"M10.5 14h3"}),G("path",{d:"M17 14h3"})]})};function Zr({noun:e,size:t=14,strokeWidth:n=1.8,className:o,style:a}){let s=pf[e];return s?G("span",{className:o,style:{display:"inline-flex",...a},"aria-hidden":"true",children:G(s,{size:t})}):G("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:ff[e]})}var fB=Object.keys(pf);var mB=Object.keys(ff);import{parseHexColor as cE}from"efficient-shell/format";var uE="#ffffff";function Jr(e){return mf(e)||(dE(e)?e:uE)}function mf(e){let t=Ae(e);return t?Xe(t)?.page??"":""}function dE(e){return typeof e=="string"&&cE(e)===e.toLowerCase()||mf(e)!==""}function SB(e){return{"--bg":Jr(e)}}import{parseHexColor as pE}from"efficient-shell/format";import{fillColorRole as fE}from"efficient-shell/markup";function Ot(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 Qr=[{label:"Even",value:"even"},{label:"From the bottom",value:"bottom"}];var IB="sf-card",NB="[--sf-card-lift:none] [--sf-card-shadow-hover:var(--sf-card-shadow,none)]",hf={min:0,max:100,step:5,fallback:0,unit:"%"},mE="68%",DB={desktop:20,phone:20,side:40,sidePhone:24},FB="sf-box-sides";function hE(e){return typeof e=="string"&&e.trim()!==""}function BB(e){return hE(typeof e?.bgImage=="string"?e.bgImage:null)||bf(e)}function bf(e){return yo(e,mo)!==""}function HB(e,t){return t||!bf(e)?e:{...e,[mo]:""}}function MB(e,t){return Os(t,yo(e,mo))?.trim()||null}function gf(e,t){let n=typeof e=="number"?e:Number.parseFloat(String(e??""));if(!Number.isFinite(n)||n<=0)return null;let o=(Math.min(hf.max,Math.max(hf.min,n))/100).toFixed(2);return t!=="bottom"?{background:So(Number(o))}:{background:`linear-gradient(0deg, ${So(Number(o))} 0%, ${So(0)} ${mE})`}}var ua=[{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"}],yf="fillFade",ei=ua[1].value,da=e=>e===ei?ei:ua[0].value,gE=[{mix:"12%",at:"50%"},{mix:"19%",at:"70%"},{mix:"50%",at:"95%"}];function UB(e){return da(e)!==ei?null:{backgroundImage:`linear-gradient(to bottom, transparent, ${gE.map(t=>`color-mix(in srgb, var(--bg) ${t.mix}, transparent) ${t.at}`).join(", ")})`}}var pa=e=>typeof e=="string"?pE(e.trim()):null,Hn=e=>{let t=pa(e);if(t!==null||typeof e!="string")return t;let n=e.trim();return n&&!n.startsWith("#")&&Cu(n)||null},fa=e=>{if(typeof e!="string")return null;let t=fE(Me(e.trim()));return t?.kind==="slot"?t.slot:null},ti="swatch";function GB(e,t){if(!t)return null;let n=Os(t,yo(e,ti)),o=Ae(n);return pa(n)??(o&&He(o)||null)}var bE={tabletClass:"sf-fill-tablet",tabletVar:"--sf-fill-tablet",phoneClass:"sf-fill-phone",phoneVar:"--sf-fill-phone"};function $B(e,t,n){return Ot(bE,Hn(e),Hn(t),Hn(n))}var yE={tabletClass:"sf-wash-tablet",tabletVar:"--sf-wash-tablet",phoneClass:"sf-wash-phone",phoneVar:"--sf-wash-phone"};function zB(e){let t=gf(e.darken,e.darkenStyle);if(!t)return{className:"",style:{}};let n=(f,p)=>String(gf(f,p)?.background??"none"),o=f=>(typeof f=="number"||typeof f=="string"&&f.trim()!=="")&&Number.isFinite(Number(f))?f:void 0,a=f=>Qr.some(p=>p.value===f)?f: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 Ot(yE,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 WB(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 mc(s,r)}function Sf(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(ni(o,t,0))return{type:typeof a=="string"?a:"",props:s??{}}}return null}function ni(e,t,n){if(n>12||!e||typeof e!="object")return!1;if(Array.isArray(e))return e.some(a=>ni(a,t,n+1));let o=e.props;return o&&typeof o=="object"&&o.id===t?!0:Object.values(e).some(a=>ni(a,t,n+1))}function _f(e,t){let n=e?.content;return Array.isArray(n)?ma(n,t,0)??[]:[]}function ma(e,t,n){if(n>12||!e||typeof e!="object")return null;if(Array.isArray(e)){for(let a of e){let s=ma(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=ma(a,t,n+1);if(s)return[o,...s]}return null}for(let a of Object.values(e)){let s=ma(a,t,n+1);if(s)return s}return null}import{SettingsDefaultReset as ne,SettingsDrill as cO,SettingsField as K,SettingsGroup as uO,SettingsSegmented as dO,SettingsBorder as pO,SettingsSidesEach as fO,SettingsSwitch as bl,borderSides as mO,borderStartEach as hO}from"efficient-easel/panel";import{ListField as gO}from"efficient-easel/fields";import{CodeIcon as bO}from"efficient-shell/icons/efficient";import{DisplayChips as yO}from"efficient-shell/ui";import{HIDDEN_KEY as SE,hiddenInEveryView as _E,hiddenInView as oi,hiddenKeyOf as Tf}from"efficient-easel/screen/lib/content/view-hide";import{VIEW_TIERS as TE}from"efficient-easel/screen/lib/content/view-tiers";var EE={"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"},xE={"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"},Ef=e=>(e.desktop?"1":"0")+(e.tablet?"1":"0")+(e.mobile?"1":"0");function xf(e,{atSectionLine:t=!1}={}){return(t?xE:EE)[Ef(e)]}var XB=[SE,Tf("tablet"),Tf("mobile")];function vf(e){return{desktop:oi(e,"desktop"),tablet:oi(e,"tablet"),mobile:oi(e,"mobile")}}function qB(e){return _E(e)}function ZB(e){let t=vf(e);return TE.filter(n=>t[n]).join(" ")}var vE={"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!"},wE={"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 JB(e,{atSectionLine:t=!1}={}){return(t?wE:vE)[Ef(vf(e))]}function sn(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 ha(e,t){return sn(e)[t]!==!1}function ai(e,t,n){let o=sn(t)[n];return typeof o=="boolean"?o:ha(e,n)}function wf(e){return Object.values(sn(e)).some(t=>t===!1)}function Cf(e){return Object.keys(sn(e)).length>0}function Of(e,t,n){let o={...sn(e)};return n?delete o[t]:o[t]=!1,Object.keys(o).length?o:void 0}function Pf(e,t,n){return{...sn(e),[t]:n}}function tH(e,t,n,{atSectionLine:o=!0}={}){let a=!ha(e,n);return xf({desktop:a,tablet:a,mobile:!ai(e,t,n)},{atSectionLine:o})}import{ColorSwatch as SO,CornersInput as _O,DatePicker as vz,DateTimePicker as TO,FOCAL_DEFAULT as wz,IconPicker as Mh,COLUMN_COUNT_MAX as yh,COLUMN_SHARE_MIN as EO,COLUMN_SHARES_EQUAL as xO,resolveColumnShares as Uh,WidthsBar as vO,useShellStrings as wO,IconButton as Gh,InputNumber as Sh,Slider as CO,Textarea as OO,Tooltip as yl}from"efficient-shell/ui";async function kf(e){let t=e.trim();if(!t)return null;let n=Ee().geocode;if(!n)throw new Error("geocode_unavailable");return n.locate(t)}var si="Lookup busy \u2014 try again in a moment.",ga=e=>typeof e=="number"&&Number.isFinite(e);function ba(e){return e.some(t=>{let n=t?.geocode;return n?n.pending||n.manual&&n.lat===void 0&&n.lng===void 0?!0:ga(n.lat)&&n.lat!==t.lat||ga(n.lng)&&n.lng!==t.lng:!1})}async function Af(e,t,{geocode:n=kf,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:si}})}}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=ga(i.lat)&&i.lat!==r.lat?i.lat:r.lat,u=ga(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 fl}from"efficient-easel/screen/lib/document/style-fields";import{jsx as CE}from"react/jsx-runtime";import{useEffect as OE,useState as PE}from"react";import{clearRangeOf as kE,markSelection as AE,useCaretEdit as RE}from"efficient-easel/copy";import{TextToolbar as IE}from"efficient-shell/ui";function NE(e,t,n){return AE(e,t,n,cc)}function Rf(e,t){let n=kE(t,e.length),o=dc(e,n.start,n.end);return o.text===e?null:o}function LE(e){let[t,n]=PE(null);return OE(()=>{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 DE({target:e,value:t,onChange:n,disabled:o=!1,label:a="Formatting"}){let s=RE({target:e,onChange:n}),[r,i]=LE(e),l=p=>s(m=>{let b=NE(t,p,m);return i({start:b.selectionStart,end:b.selectionEnd}),b}),u=lc(),d={};if(r)for(let p of u)d[p.style]=uc(t,r.start,r.end,p.style);let f=o?null:Rf(t,r);return CE(IE,{offered:new Set(u.map(p=>p.style)),onMark:p=>l(p),pressed:d,disabled:o,"aria-label":c(a),className:"sf-markup-bar",clear:f?{onClear:()=>s(()=>{let p=e.current,m=p&&p.ownerDocument.activeElement===p?{start:p.selectionStart??0,end:p.selectionEnd??0}:null,b=Rf(t,m)??{text:t,selectionStart:m?.start??0,selectionEnd:m?.end??0};return i({start:b.selectionStart,end:b.selectionEnd}),b})}:void 0})}var ri=DE;import{deviceField as ee}from"efficient-easel/screen/lib/document/device-fields";import{NO_CONTROL_FIELD as PO,NoControlMark as kO,noControlField as $h}from"efficient-easel/screen/lib/document/panel-no-control-mark";function ya(e,t,n){return typeof e=="number"?e:typeof t=="number"?t:n}var Sa=void 0;import{phoneKey as at,tabletKey as Sl,viewKeyAt as _l}from"efficient-easel/draw";import{jsx as _a,Fragment as FE,jsxs as BE}from"react/jsx-runtime";import{useRef as HE}from"react";import{SettingsDefaultReset as ME}from"efficient-easel/panel";import{effectTiles as UE}from"efficient-easel/screen/lib/document/effect-tiles";import{VIEW_KEY_ACCESS as If,describedAs as GE,onDesktopWords as $E,phoneTwinFields as Nf}from"efficient-easel/screen/lib/document/box-fields";function zE({row:e,read:t,...n}){let o=t(Z(),n.followsView??"desktop");return e({...n,follows:o})}function Ge(e,t){return Object.fromEntries(nu.map(n=>{let o=U(e,n);return[o,Nf(e,t(n),If)[o]]}))}function xH(e,t,n){let o=t.render,a={...t,render:s=>_a(zE,{...s,row:o,read:n})};return Ge(e,s=>s==="desktop"?t:a)}function WE({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=HE(null),{preview:i}=e,l=UE({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 BE(FE,{children:[i?_a("div",{ref:r,style:{display:"contents"},children:u}):u,o&&n&&_a(ME,{words:P()?.panel,label:c(e.tileWord),changed:!0,detail:$E(d=>c(d),c(e.word(a)),t.followsView),onReset:()=>t.onChange(void 0)})]})}function vH(e,t){let n=GE({type:"custom",render:o=>_a(WE,{...o,spec:t})},{type:"select",label:t.label,options:t.values.map(o=>({value:o,label:t.word(o)}))});return Nf(e,n,If)}import{jsx as ii,Fragment as KE}from"react/jsx-runtime";import{createContext as jE,useContext as VE}from"react";import{NoControlMark as YE}from"efficient-easel/screen/lib/document/panel-no-control-mark";var Lf=jE(!1);function AH({children:e}){return ii(Lf.Provider,{value:!0,children:e})}function XE(){return VE(Lf)}function Df({name:e,children:t}){return!XE()||!e||!qE(e)||Pn(e)?ii(KE,{children:t}):ii(YE,{})}function qE(e){return/^[A-Za-z0-9_$]+$/u.test(e)}import{parseOption as ZE}from"efficient-shell/format";var li="off",Bf="none",ci=[{label:"None",value:"off"},{label:"1, 2, 3",value:"plain"},{label:"01, 02, 03",value:"padded"},{label:"N\xB001, N\xB002",value:"numero"}],Hf=[{label:"None",value:"none"},{label:"Hairline",value:"hairline"}];function NH(e){return ZE(ci,li,e)}var Ff="sf-card-index",Mn="sf-card-index",LH="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",JE={plain:`counter(${Mn})`,padded:`counter(${Mn}, decimal-leading-zero)`,numero:`"N\xB0" counter(${Mn}, decimal-leading-zero)`};function DH(e,t){return t==="off"?"":`.${e}{counter-reset:${Mn}}.${e} .${Ff}{counter-increment:${Mn}}.${e} .${Ff}::before{content:${JE[t]}}`}function FH(e){return e==="hairline"?"border border-line hover:border-accent":""}var Mf=[{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 AO}from"efficient-easel/draw";import{jsx as ue}from"react/jsx-runtime";import{SettingsDefaultReset as rx,SettingsField as ui}from"efficient-easel/panel";import{useSelectedHost as ix}from"efficient-easel/easel";import{FOCAL_DEFAULT as lx}from"efficient-shell/format";import{ImageIcon as di,PlayIcon as Uf}from"efficient-easel/icons";import{ImageFocusPoint as cx,MediaUploadField as ux}from"efficient-shell/ui";import{useContext as dx}from"react";import{ScreenDocumentContext as px}from"efficient-easel/screen/components/ScreenDocumentContext";import{tabletKey as fx,viewKeyAt as mx}from"efficient-easel/draw";import{usePreviewDevice as hx}from"efficient-easel/draw/client";import{formatFocal as QE,parseFocal as ex}from"efficient-shell/format";var tx="sf-focus-phone",nx="--sf-focus-phone",ox="sf-focus-tablet",ax="--sf-focus-tablet",Un=e=>{if(typeof e!="string"||!/^\s*-?\d+(\.\d+)?%\s+-?\d+(\.\d+)?%\s*$/.test(e))return null;let{x:t,y:n}=ex(e);return QE(t,n)};function GH(e,t){return Ot(sx,null,Un(t),Un(e))}var sx={tabletClass:ox,tabletVar:ax,phoneClass:tx,phoneVar:nx};import{shownTier as pi}from"efficient-easel/screen/lib/document/device-fields";import{onDesktopWords as gx}from"efficient-easel/screen/lib/document/box-fields";import{requestMediaPick as bx}from"efficient-easel/screen/lib/media-picker";import{useEaselHost as yx}from"efficient-easel/screen/lib/host";import{useEaselSession as Sx}from"efficient-easel/screen/lib/session-context";function _x(e,t,n,o=!0){let a=pi(n),s=typeof e[t]=="string"&&e[t]?String(e[t]):lx;if(a==="desktop")return{ownView:!1,followed:s,followsView:"desktop",own:void 0,focus:s,key:t};let r=mx(t,a),i=Un(e[r])??void 0,l=a==="mobile"&&o?Un(e[fx(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 Tx(e,t,n){let o=ix();if(!t||!o)return null;let a=o.values??{};if(n&&!n(a,pi(e)))return null;let s=_x(a,t,e,n?n(a,"tablet"):!0),r=o.onChange;return{...s,set:i=>r(s.key,i),clear:()=>r(s.key,Sa)}}function Gf({value:e,onChange:t,label:n,accept:o,placeholder:a,focusKey:s,focusWhen:r,frameKey:i,fieldKey:l}){let u=yx(),d=Sx(),f=c(n),p=hx(),m=o.startsWith("video"),b=Tx(p,m?void 0:s,r),y=!!s&&pi(p)!=="desktop",T=dx(px),S=rn(),E=i&&l?{video:l,frame:i}:null,x=w=>bx(u,{accept:o,title:f,...w?{file:w}:{}}).then(B=>!B||!E?B?.url??null:(S({[E.video]:B.url,[E.frame]:B.posterUrl??""}),null)),v=E?w=>w?t(w):S({[E.video]:"",[E.frame]:""}):t,C=se(e);if(y&&(!b||!C))return null;if(T&&!T.capabilities.mediaEditing)return ue(ui,{label:f,icon:m?ue(Uf,{}):ue(di,{}),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 H=b?.ownView&&C?ue(rx,{words:P()?.panel,label:c("Image focus"),changed:!!b.own,detail:gx(w=>c(w),b.followed,b.followsView),onReset:b.clear}):void 0;return y&&b?ue(ui,{label:f,icon:ue(di,{}),action:H,children:ue("div",{style:{flex:"1 1 auto",minWidth:0},children:ue(cx,{value:b.focus,onChange:b.set,label:c("Image focus"),image:C,hint:null})})}):ue(ui,{label:f,icon:m?ue(Uf,{}):ue(di,{}),children:ue("div",{style:{flex:"1 1 auto",minWidth:0},children:ue(ux,{value:C,onChange:v,onPick:x,accept:m?"video/*":"image/*",kind:m?"video":"image",placeholder:a===void 0?void 0:c(a),maxSizeBytes:Ee(d).media.maxUploadBytes,...b?{focus:b.focus,onFocusChange:b.set}:{}})})})}import{jsx as $f}from"react/jsx-runtime";import{useId as Ex}from"react";import{FieldSelect as xx}from"efficient-easel/fields";import{SettingsField as vx}from"efficient-easel/panel";function wx(e){return e.map(({value:t,label:n,note:o})=>({value:t,label:n,...o?{meta:o}:{}}))}function zf({label:e,options:t,value:n,onChange:o,emptyLabel:a,icon:s,hint:r}){let i=Ex(),l=`${i}-label`,u=`${i}-button`,d=Array.isArray(n)?n:[];return $f(vx,{label:c(e),labelId:l,icon:s,hint:r,children:$f(xx,{id:u,multiple:!0,value:d,options:wx(t),onChange:o,placeholder:a===void 0?c("None"):c(a),ariaLabelledBy:`${l} ${u}`,inline:!0})})}import{jsx as Wf}from"react/jsx-runtime";import{useId as Cx}from"react";import{FieldSelect as Ox}from"efficient-easel/fields";import{SettingsField as Px}from"efficient-easel/panel";function kx(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 EM({label:e,options:t,fallback:n,value:o,onChange:a,placeholder:s,bare:r=!1,icon:i}){let l=Cx(),u=`${l}-label`,d=`${l}-button`,f=o??"",p=t.some(T=>T.value===f)?f:n,m=c(e),b=s===void 0?void 0:c(s),y=Wf(Ox,{id:d,value:p,options:kx(t),onChange:a,placeholder:b,searchPlaceholder:b,...r?{ariaLabel:m}:{ariaLabelledBy:`${u} ${d}`},searchable:!0,groupCount:!0,inline:!0});return r?y:Wf(Px,{label:m,labelId:u,icon:i,children:y})}import{jsx as kt,jsxs as uv}from"react/jsx-runtime";import{SettingsField as pm}from"efficient-easel/panel";import{LinkIcon as dv}from"efficient-easel/icons";import{LinkPicker as pv,TextLinkField as fv}from"efficient-shell/ui";import{useEffect as dm,useMemo as va,useRef as mv,useState as xa}from"react";import{currentEaselSession as Ax}from"efficient-easel/screen/lib/session";function Kf(){return Ax().auth.token}import{currentEaselSession as hv}from"efficient-easel/screen/lib/session";import{useScreenDocument as gv}from"efficient-easel/screen/components/ScreenDocumentContext";var Rx=()=>({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 jf(e,t,n){if(!e)return"page";if(af(e))return"popup";if(e.startsWith("/journal/"))return"blog";if(lf(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 fi(e,t){let n=Rx(),o=e.pages.map(d=>({value:Bn(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:rf(...d.docs).map(f=>({value:ia(d.slug,f.slug),label:f.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(f=>({value:sf(f.slug),label:f.title||f.slug})),placeholder:n.choosePost};case"product":return{type:"select",options:e.products.map(f=>({value:f.href,label:f.name||f.href})),placeholder:n.chooseProduct};case"popup":return{type:"select",options:(e.popups??[]).map(f=>({value:of(f.slug),label:f.title||f.slug})),placeholder:n.choosePopup};case"custom":return{type:"text"}}},l=nf(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=>jf(d,s),targetOf:d=>d,readFilter:()=>null,withFilter:d=>d}};let u=d=>{let f=t.withFilter(d,null);return t.listingPaths.includes(f)?f:d};return{kinds:l,rules:{kindOf:d=>jf(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 bv}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 Vf(e,t){return O(e)??t}function $e(e,t){return typeof e=="boolean"?e:t}function Ta(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 Xf=["delay","scroll","exit"],qf=["all","chosen","except"],Zf=["visit","days","never","once"],Ix=["all","desktop","phone"],Nx=["stop","continue"],Jf={min:0,max:60},Qf={min:10,max:90},em={min:1,max:90},ve={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 ln(e,t,n){let o=Vf(e,n);return Math.min(t.max,Math.max(t.min,Math.round(o)))}function Lx(e){return typeof e.hideAfter=="string"?pe(Zf,e.hideAfter,ve.hideAfter):e.oncePerSession===!0?"visit":e.oncePerSession===!1?"never":ve.hideAfter}function Dx(e){return Array.isArray(e)?e.map(t=>typeof t=="string"?t.trim():"").filter(Boolean).map(t=>t.startsWith("/")?t:`/${t}`):[]}function Yf(e){if(typeof e!="string")return null;let t=e.trim();return/^\d{4}-\d{2}-\d{2}$/.test(t)?t:null}function tm(e){let t=e??{},n=ve;return{autoOpen:$e(t.autoOpen,n.autoOpen),trigger:pe(Xf,t.trigger,n.trigger),autoOpenDelaySec:ln(t.autoOpenDelaySec,Jf,n.autoOpenDelaySec),scrollPercent:ln(t.scrollPercent,Qf,n.scrollPercent),showOn:pe(qf,t.showOn,n.showOn),showOnPages:Dx(t.showOnPages),devices:pe(Ix,t.devices,n.devices),hideAfter:Lx(t),hideDays:ln(t.hideDays,em,n.hideDays),afterSubmit:pe(Nx,t.afterSubmit,n.afterSubmit),startDate:Yf(t.startDate),endDate:Yf(t.endDate)}}import{parseHexColor as Fx}from"efficient-shell/format";var nm="#000000";var mi="popup",Bx=Jc,Hx=["auto","full"],Mx=["inside","outside","none"],Ux={min:240,max:1440},Gx={min:0,max:100},Gn={placement:"center",fullWidth:!1,width:720,height:"auto",tintColor:nm,tintOpacity:60,outsideClick:!0,closeButton:"inside"};function $x(e,t){let n=typeof e=="string"?e.trim():"";return n&&Fx(n)===n.toLowerCase()?n:t}function hi(e,t=Gn){let n=e??{},o=t;return{placement:pe(Bx,n.placement,o.placement),fullWidth:$e(n.fullWidth,o.fullWidth),width:ln(n.width,Ux,o.width),height:pe(Hx,n.height,o.height),tintColor:$x(n.tintColor,o.tintColor),tintOpacity:ln(n.tintOpacity,Gx,o.tintOpacity),outsideClick:$e(n.outsideClick,o.outsideClick),closeButton:pe(Mx,n.closeButton,o.closeButton)}}var om="cart-drawer",WM="cart-drawer",zx={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 KM(e,t){return t===0?e.subtitleEmpty:t===1?e.subtitleOne:e.subtitleMany.replace("{count}",String(t))}function jM(e){let t=e??{},n=zx;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:Ta(t.promises,n.promises),emptyKicker:J(t.emptyKicker,n.emptyKicker),emptyBody:J(t.emptyBody,n.emptyBody)}}var Wx=["right","left"],Kx={...Gn,width:520,tintOpacity:68};function VM(e){let t=e??{};return{...hi(t,Kx),placement:pe(Wx,t.placement,"right"),height:"full",fullWidth:!1,autoOpen:$e(t.autoOpen,!0)}}var sm="consent-banner",ZM="consent-banner";var jx=[{value:"bar",label:"Bar"},{value:"card",label:"Card"}],JM="Layout",am={layout:"bar"},Vx=e=>jx.some(t=>t.value===e);function QM(e){let t=J((e??{}).layout,am.layout);return{layout:Vx(t)?t:am.layout}}var eU={...Gn,placement:"bottom-center",fullWidth:!0,width:440,tintOpacity:0,outsideClick:!1,closeButton:"none"};var Yx="consentWords",Xx=["eyebrow","notice","accept","reject","choose"];function qx(e){let t=(e??{})[Yx];return typeof t=="string"&&Xx.includes(t)?t:null}function Zx(e){let t=e?.props;return t?qx(t)!==null?!0:Object.values(t).some(n=>Array.isArray(n)&&n.some(o=>o&&typeof o=="object"&&"props"in o&&Zx(o))):!1}var Jx=["meta","eyebrow","heading","body","statName","statValue","formEyebrow","formHeading","formIntro","fieldLabel","option","finePrint","dismiss","doneHeading","doneBody"],oU={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"},Qx={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"},aU={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 rm(e){let t={};for(let n of Jx){let o=lt(e[Qx[n]]);o&&(t[n]=o)}return t}var iU={heading:"Join our email list",placeholder:"Email address",buttonLabel:"Subscribe"},ev={lead:"We accept"},lU={...ev,methods:[],size:"sm",align:"start",dataSource:Ql},bi="site-footer";var yi=bi,cU={desktop:!0,tablet:!0,mobile:!0},uU={desktop:!1,tablet:!1,mobile:!1},gi=1,im=6,dU=Array.from({length:im-gi+1},(e,t)=>gi+t),Ea={desktop:6,tablet:3,mobile:2},tv={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}},Pt=e=>Math.min(Math.max(Math.round(e),gi),im);function pU(e){if(typeof e=="number")return tv[Pt(e)]??{desktop:Pt(e),tablet:Pt(e),mobile:Pt(e)};if(e&&typeof e=="object"){let t=e;return{desktop:Pt(t.desktop??Ea.desktop),tablet:Pt(t.tablet??Ea.tablet),mobile:Pt(t.mobile??Ea.mobile)}}return{...Ea}}var Si="subscribe-popup",_U="subscribe-popup",nv=[Si,bi,om,sm];function cm(e){return nv.includes(e)}var ov=["right","left"],av={metaLabel:"Meta label",issueLabel:"Label",issueNumber:"00",kicker:"Kicker",heading:`Main heading
4
- *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:ve.autoOpen,autoOpenDelaySec:ve.autoOpenDelaySec,formSlug:"",trigger:ve.trigger,scrollPercent:ve.scrollPercent,showOn:ve.showOn,showOnPages:[],hideAfter:ve.hideAfter,hideDays:ve.hideDays,formSide:"right",valuePanelOnPhone:!1,sectionAccent:void 0,sectionCorners:void 0,sectionCornerSides:void 0,textStyles:{}},$=J,sv=$e,um=Ta;function lm(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 rv(e,t){return Array.isArray(e)?um(e,[]):t}function iv(e,t){return Array.isArray(e)?e.map(n=>{let o=n??{};return{label:$(o.label,""),value:$(o.value,"")}}).filter(n=>n.label||n.value):t}function EU(e){let t=e??{},n=av,o=tm(t);return{metaLabel:$(t.metaLabel,n.metaLabel),issueLabel:lm(t.issueLabel,n.issueLabel),issueNumber:lm(t.issueNumber,n.issueNumber),kicker:$(t.kicker,n.kicker),heading:$(t.heading,n.heading),deck:$(t.deck,n.deck),stats:iv(t.stats,n.stats),formLabel:$(t.formLabel,n.formLabel),formHeading:$(t.formHeading,n.formHeading),formIntro:$(t.formIntro,n.formIntro),firstNameLabel:$(t.firstNameLabel,n.firstNameLabel),firstNamePlaceholder:$(t.firstNamePlaceholder,n.firstNamePlaceholder),emailLabel:$(t.emailLabel,n.emailLabel),emailPlaceholder:$(t.emailPlaceholder,n.emailPlaceholder),interestsLabel:$(t.interestsLabel,n.interestsLabel),interests:um(t.interests,n.interests),frequencyLabel:$(t.frequencyLabel,n.frequencyLabel),frequencies:rv(t.frequencies,n.frequencies),submitText:$(t.submitText,n.submitText),finePrint:$(t.finePrint,n.finePrint),dismissText:$(t.dismissText,n.dismissText),emailInvalidText:$(t.emailInvalidText,n.emailInvalidText),submitErrorText:$(t.submitErrorText,n.submitErrorText),successHeading:$(t.successHeading,n.successHeading),successBody:$(t.successBody,n.successBody),keepBrowsingText:$(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(ov,t.formSide,n.formSide),valuePanelOnPhone:sv(t.valuePanelOnPhone,n.valuePanelOnPhone),sectionAccent:t.sectionAccent,sectionCorners:t.sectionCorners,sectionCornerSides:t.sectionCornerSides,textStyles:rm(t)}}function lv(e,t=Math.random){for(;;){let n=`popup-${Math.floor(t()*2176782336).toString(36).padStart(6,"0")}`;if(!e.has(n))return n}}function cv(e){return{root:{props:{title:e,kind:mi}},content:[],zones:{}}}function CU(e,t,n){return{slug:lv(t,n),title:e,kind:Gr,layout:cv(e)}}function _i(e){return e?.root?.props?.kind===mi}function fm(e){let t=new Map;return(n="")=>{let o=Kf(),a=t.get(n);if(!a||a.token===null&&o!==null){let s=o||!hv().usesBridgedToken?e(o??"",n).catch(()=>[]):Promise.resolve([]);return t.set(n,{promise:s,token:o}),s}return a.promise}}var yv=fm(async(e,t)=>{let n=t?{siteId:t}:void 0,{pages:o}=Ee();return o.linkTargets?o.linkTargets(n):(await o.list(n)).map(a=>({id:a.id,slug:a.slug,label:a.label,layout:null}))}),Sv=fm(async(e,t)=>await Ee().blog?.posts(t?{siteId:t}:void 0)??[]);function _v({value:e,onChange:t,label:n="Link",data:o,filters:a}){let s=va(()=>fi(o,a),[o,a]),r=c(n);return kt(pm,{label:r,icon:kt(dv,{}),children:kt(pv,{value:e,onChange:i=>t(i),kinds:s.kinds,rules:s.rules,filtersFor:s.filtersFor,label:r})})}function mm(){let{siteId:e,capabilities:t}=gv(),{offersCommerce:n,hasBlog:o}=t,[a,s]=xa([]),[r,i]=xa([]),[l,u]=xa([]),[d,f]=xa(null),p=bv().chrome,m=p?.products?.list,b=p?.linkFilters,y=b?void 0:p?.linkRow,T=mv(!0);dm(()=>(T.current=!0,()=>{T.current=!1}),[]),dm(()=>{let x=!0;return yv(e??void 0).then(v=>x&&T.current&&s(v)),o&&Sv(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&&f(()=>v)):f(null),()=>{x=!1}},[e,n,o,m,b]);let S=va(()=>({pages:a.filter(x=>!cm(x.slug)&&!_i(x.layout)).map(x=>({slug:x.slug,title:x.label,docs:[x.layout]})),popups:a.filter(x=>x.slug===Si||_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=va(()=>d?d(S.pages):null,[d,S]);return{data:S,filters:E,pages:a,offersCommerce:n,HostLinkRow:y}}function zU({label:e,icon:t,text:n,onTextChange:o,link:a,onLinkChange:s}){let{data:r,filters:i}=mm(),l=va(()=>fi(r,i),[r,i]),u=c(e);return kt(pm,{label:u,icon:t,children:kt(fv,{label:u,text:n,onTextChange:o,link:a,onLinkChange:d=>s(d),kinds:l.kinds,rules:l.rules,filtersFor:l.filtersFor})})}function hm({value:e,onChange:t,label:n="Link"}){let o=typeof e=="string"?e:"",{data:a,filters:s,pages:r,offersCommerce:i,HostLinkRow:l}=mm(),u=a.pages.map(f=>Bn(f.slug)),d=i&&l&&(o==="/"||u.includes(o))?l:void 0;return uv("div",{children:[kt(_v,{value:o,onChange:t,label:n,data:a,filters:s}),d&&kt(d,{value:o,onChange:t,pages:r})]})}import{UiIcon as _h}from"efficient-easel/draw/client";import{VIEW_TIERS as ka,phoneKey as Pm,resolveViewValue as zv,tabletKey as km,viewKeyAt as F}from"efficient-easel/draw";import{SECTION_PAD_UNIT_KEY as Nm,SITE_SIDE as Wv,VIEW_ABOVE as Kv,convertLength as Lm,isLengthUnit as jv,isSiteSide as Dm,sideLengthAt as Vv,sideValueAt as Yv,withLength as Aa}from"efficient-easel/screen/lib/content/length-units";import{convertLength as Tv,rowGrid as Ev}from"efficient-easel/screen/lib/content/length-units";var V={min:1e3,max:2e3,step:50,default:1600};function xv(e){return{maxWidth:e,marginInline:"auto",width:"100%"}}var Ti="--sf-site-width",vi=`var(${Ti},${V.default}px)`,YU="100vw",XU=`max-w-[${vi}]`,qU=`max-w-[${V.default}px]`;function Sm(e){return typeof e!="number"||!Number.isFinite(e)?V.default:Math.round(Math.min(Math.max(e,V.min),V.max))}function ZU(e,t){let n=pt(e,t,"size",V);if(n!==null)return{[Ti]:n};let o=Sm(e);return o===V.default?{}:{[Ti]:`${o}px`}}var re={min:0,max:80,step:4,default:40,typedMax:Number.POSITIVE_INFINITY},Ei="--sf-site-gutter",De={min:0,max:24,step:4,typedMax:Number.POSITIVE_INFINITY},vv=Ev({kind:"spacing"},"vw",re).max;function _m(e,t){return e<=t?`${e}px`:`min(${e}px, ${vv}vw)`}var gm="--sf-site-gutter-phone",wv="max-view-tablet:[--sf-site-gutter:var(--sf-site-gutter-phone)]!",Cv="max-view-wide:[&_[data-sf-line~=edge]:not([data-sf-line~=edge]_*)]:[--sf-site-gutter:var(--sf-site-gutter-phone)]",we=`var(${Ei},${re.default}px)`,Ov=`px-[${we}]`;var ot={md:`min(24px,${we})`,sm:`min(20px,${we})`,frame:`min(24px,${we})`,tabs:`min(16px,${we})`},JU=[[`max-view-desktop:px-[${ot.md}]`,"max-view-desktop:px-6"],[`max-view-desktop:px-[${ot.tabs}]`,"max-view-desktop:px-4"],[`max-[960px]:px-[${ot.frame}]`,"max-[960px]:px-6"],[`max-[900px]:px-[${ot.md}]`,"max-[900px]:px-6"],[`max-view-wide:px-[${ot.md}]`,"max-view-wide:px-6"],[`max-view-tablet:px-[${ot.sm}]`,"max-view-tablet:px-5"],[`max-view-wide:px-[${ot.sm}]`,"max-view-wide:px-5"],[`max-[640px]:px-[${ot.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"],[Ov,"px-10"]];var Ca="sideSpaceOnce",QU="data-sf-side",Pv="once";function eG(e){if(!(!e||typeof e!="object"))return e[Ca]===!0?Pv:void 0}var Tm="max-view-wide:px-[min(20px,var(--sf-site-gutter,40px))]";function wi(e){return zn[e??"box"]}var wa="[[data-sf-side=once]_&]:max-view-wide:px-[var(--sf-site-gutter-phone,min(24px,var(--sf-site-gutter,40px)))]",$n="[[data-sf-side=once]_&]:max-view-wide:px-[var(--sf-site-gutter-phone,min(20px,var(--sf-site-gutter,40px)))]",xi={"max-[960px]":wa,"max-[900px]":wa,"max-view-desktop":wa,"max-[1100px]":wa,"max-view-wide":$n,"max-view-tablet":$n,"max-[720px]":$n,"max-[640px]":$n,"max-[800px]":$n},bm="var(--sf-pad-site,var(--sf-box-g,var(--sf-site-gutter,40px)))",ym="[--sf-edge-g:var(--sf-pad-site)]",zn={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:bm,edge:ym,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:xi["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:bm,edge:ym,frame:Tm,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:xi["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)))]"}},tG=`mx-auto max-w-[var(--sf-site-width,1600px)] px-[var(--sf-site-gutter,40px)] ${Tm}`,nG="[--sf-box-g:var(--sf-site-gutter,40px)] [&>*]:[--sf-site-gutter:0px]",kv="[[data-sf-side=once]_&]:[&>*]:[--sf-site-gutter-phone:0px]";function oG(e){return`${kv} ${zn[e].onceGutter}`}var Av="[[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]",Rv="[[data-sf-side=once]_&]:max-view-wide:-mx-[var(--sf-site-gutter-phone,min(20px,var(--sf-site-gutter,40px)))]",Iv=/^([^\s:]+):px-\[min\((?:20|24)px,var\(--sf-site-gutter,40px\)\)\]$/,Nv="max-view-wide:-mx-[min(20px,var(--sf-site-gutter,40px))]";function Lv(e){if(!e)return"";let t=[];for(let n of e.split(/\s+/)){let o=Iv.exec(n)?.[1],a=o?j(xi,o):void 0;a?t.push(a):n===Nv&&t.push(Rv)}return t.join(" ")}var aG="[[data-sf-side=once]_&]:[--sf-pad-site:inherit]",sG="[[data-sf-side=once]_&]:[--sf-edge-g:var(--sf-box-g,var(--sf-site-gutter,40px))]";function Dv(e){if(!e)return"";let t=e.split(" "),n=["site","box"].find(o=>zn[o].className.split(" ").every(a=>t.includes(a)));return n?`${Av} ${zn[n].once} ${zn[n].onceGutter}`:""}function rG(e,t){let n=t?[Dv(e),Lv(e)].filter(Boolean).join(" "):"";return n?`${e} ${n}`:e}var iG="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 Em(e){return typeof e!="number"||!Number.isFinite(e)?re.default:Math.round(Math.min(Math.max(e,re.min),re.typedMax))}function lG(e,t){let n=pt(e,t,"spacing",re);if(n!==null)return{[Ei]:n};let o=Em(e);return o===re.default?{}:{[Ei]:_m(o,re.max)}}function xm(e){return typeof e!="number"||!Number.isFinite(e)?null:Math.round(Math.min(Math.max(e,De.min),De.typedMax))}function vm(e){return typeof e=="number"&&Number.isFinite(e)?Sm(e):null}function cG(e,t){let n=pt(e,t,"spacing",De);if(n!==null)return{[gm]:n};let o=xm(e);return o===null?{}:{[gm]:_m(o,De.max)}}function uG(e){return xm(e)===null?"":`${wv} ${Cv}`}function wm(e,t){let n=kc(e,t,"spacing",re),o=n===null?Em(e):Tv(n,L(t),"px","mobile",De);return Math.min(De.max,o)}var Cm=vi,dG=`max-w-[${Cm}]`,pG=`max-w-[min(var(--sf-page-cap,${V.default}px),${V.default}px)]`,Om="--sf-hero-cap",Fv=`var(${Om},none)`,fG=`max-w-[${Fv}]`,Bv="--sf-hero-bleed-m",Hv="--sf-hero-bleed-w",Mv="--sf-hero-chrome-x",Uv="--sf-hero-chrome-cap";function mG(e){return e===!0?{[Om]:Cm,[Bv]:"auto",[Hv]:"100%",[Mv]:"24px",[Uv]:"none"}:{}}var Ci=`calc(${vi} - ${we}*2)`,hG=`max-w-[${Ci.replace(/ /g,"_")}]`;var Gv="--sf-chrome-cap",$v=`var(${Gv},${Ci})`,gG="data-page-width";function bG(e){return e==="full"?"full":null}function yG(e){return e==="full"?null:xv(e==="content"?Ci:$v)}function SG(e){if(e==="full")return"full";if(e==="content")return"content"}var fe={min:10,max:200,step:10};function Xv(e,t,n,o=0){let a=O(e),s=O(t);if(a===void 0&&s===void 0)return;let r=At(n),i=l=>l===void 0?void 0:r==="px"?l:Aa(l,r,o);return{paddingTop:i(a),paddingBottom:i(s)}}var At=e=>L(e),Oi=(e,t)=>typeof e=="object"?e[t]:e??0,qv=e=>typeof e=="object"&&e!==null&&"top"in e,Wn=(e,t,n)=>qv(e)?Oi(e[t],n):Oi(e,n),Zv={top:"top",bottom:"bottom"};function Jv(e,t,n,o){let a=O(e),s=O(t);if(a===void 0&&s===void 0)return;let r=At(n),i=(l,u)=>l===void 0?void 0:r==="px"?l:Aa(l,r,u);return{paddingTop:i(a,o("top","desktop")),paddingBottom:i(s,o("bottom","desktop"))}}var Qv="sf-pad-top-phone",ew="sf-pad-bottom-phone",tw="--sf-pad-t-phone",nw="--sf-pad-b-phone",ow="sf-pad-left-phone",aw="sf-pad-right-phone",sw="--sf-pad-l-phone",rw="--sf-pad-r-phone",iw="sf-pad-top-tablet",lw="sf-pad-bottom-tablet",cw="sf-pad-left-tablet",uw="sf-pad-right-tablet",dw="--sf-pad-t-tablet",pw="--sf-pad-b-tablet",fw="--sf-pad-l-tablet",mw="--sf-pad-r-tablet",Ri="sf-section-pad";function Ii(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(F(s,r))?0:Wn(e.frame,s,r):e.frame,o=typeof n=="function"?Jv(e.top,e.bottom,e.unit,n):Xv(e.top,e.bottom,e.unit,n),a=Ni({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:[Ri,...a.classes].join(" "),style:{...o,...a.style}}}var hw=e=>Dm(e)?e:O(e),gw=[["top","paddingTop",[iw,dw],[Qv,tw]],["bottom","paddingBottom",[lw,pw],[ew,nw]],["left","paddingLeft",[cw,fw],[ow,sw]],["right","paddingRight",[uw,mw],[aw,rw]]];function Pi(e,t,n){return!jv(t)||t==="px"?e:Lm(e,"px",t,n,{min:0,max:fe.max,step:1})}var Fm=e=>{let t=Kv[e];return t?[e,...Fm(t)]:[e]},Oa=Object.fromEntries(ka.map(e=>[e,Fm(e)]));function bw(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=Oa[T].find(x=>s[x])??"desktop",E=Aa(b,y,Oi(a,S));return typeof E=="number"?`${E}px`:E},i={n:e,[km("n")]:t,[Pm("n")]:n,u:o.desktop,[km("u")]:o.tablet,[Pm("u")]:o.phone},l=zv("spacing",O(e),O(t),O(n),Ut()),u=(b,y,T)=>{if(Yv(i,{side:"n"},b,"side",["side"])?.value===Wv)return wi().value;let S=Vv(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),f={},p=u("tablet","tablet",t!==void 0);p!==void 0&&(t!==void 0||p!==d)&&(f.tablet=p);let m=u("mobile","phone",n!==void 0);return m!==void 0&&(n!==void 0||m!==d)&&(f.phone=m),f}function Ni(e,t,n={},o=e,a={},s=0,r="box"){let i={},l={},u=[],d=wi(r),f=!1;for(let[p,m,...b]of gw){let y=p==="left"||p==="right"?hw:O,T=y(e[p]),S=j(Zv,p),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;Dm(T)?(i[m]=d.value,f=!0):T!==void 0&&(i[m]=At(a.desktop)==="px"?T:Aa(T,At(a.desktop),x));let v=bw(y(o[p]),y(n[p]),y(t[p]),a,E);for(let[C,[H,w]]of[["tablet",b[0]],["phone",b[1]]]){let B=v[C];B!==void 0&&(u.push(H),l[w]=B,B===d.value&&(f=!0))}}return f&&u.push(...d.className.split(" ")),{classes:u,style:{...i,...l}}}var Bm={top:"padTop",bottom:"padBottom",left:"padLeft",right:"padRight"},Li="padUnit";function yw(e,t){let n=e[Li],o=(a,s,r)=>{let i=O(a)??(r===void 0?void 0:Pi(r,n,"desktop")),l=O(s);return l===void 0?i:(i??0)+Pi(l,n,"desktop")};return{top:o(e.padTop,e.sectionPaddingTop,t.top),bottom:o(e.padBottom,e.sectionPaddingBottom,t.bottom)}}function kG(e,t,n={}){let o=yw(e,t),a={...Sw(e,Bm,!0,Li),top:o.top,bottom:o.bottom};n.noTop&&Object.assign(a,{top:0,topTablet:void 0,topPhone:void 0});let s=Ii(a),r=s?s.className.split(" ").filter(i=>i!==Ri):[];return{...r.length?{className:r.join(" ")}:{},style:s?.style??{}}}var Pa={top:"sectionPaddingTop",bottom:"sectionPaddingBottom",left:"sectionPaddingLeft",right:"sectionPaddingRight"},AG=[...["top","bottom","left","right"].map(e=>[Bm[e],Pa[e]]),[Li,Nm]].flatMap(([e,t])=>[[e,t],...["tablet","mobile"].map(n=>[F(e,n),F(t,n)])]);function Sw(e,t=Pa,n=!0,o=t===Pa?Nm:void 0){let a={};if(o){e[o]!==void 0&&(a.unit=e[o]);for(let r of["tablet","mobile"])e[F(o,r)]!==void 0&&(a[F("unit",r)]=e[F(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[F(r,i)]=e[F(t[r],i)]}let s=e[_w];if(Array.isArray(s)){let r=Hm.flatMap(i=>ka.filter(l=>s.includes(F(t[i],l))).map(l=>F(i,l)));r.length&&(a.totals=r)}return a}var _w="padTotal",Hm=["top","bottom"];function RG(e=Pa){return Hm.flatMap(t=>ka.map(n=>F(e[t],n)))}var ki=16,Ai=24,Tw={text:ki,heading:Ai,line:0},Am={all:{12:"py-3",16:"py-4",24:"py-6"},edge:{12:"max-view-wide:py-3"}},Ew={[ki]:Am.all[ki],[Ai]:Am.all[Ai],[Tw.line]:""};function IG(e,t){return{className:Ew[t]??"",...e?{pad:{values:e,frame:t}}:{}}}var NG=e=>({desktop:e.top,tablet:e.top,mobile:e.topPhone});function LG(e,t){if(!t)return{root:Im(e.values,e.frame),outer:null};if(!e.values.totals?.length)return{root:null,outer:Rm(e.values)};let n=e.values,{top:o,bottom:a,topTablet:s,bottomTablet:r,topPhone:i,bottomPhone:l,left:u,right:d,leftTablet:f,rightTablet:p,leftPhone:m,rightPhone:b,...y}=n,T={...y,top:o,bottom:a,topTablet:s,bottomTablet:r,topPhone:i,bottomPhone:l},S=Im(e.drawsFrame?xw(T,e.frame):T,e.frame),E=S&&e.drawsFrame?{...S,className:S.className.split(" ").filter(v=>v!==Ri).join(" ")}:S,x=["tablet","mobile"].some(v=>["top","bottom"].some(C=>typeof n[F(C,v)]=="number"&&!n.totals?.includes(F(C,v))));return{root:E&&e.edge&&E.className&&!x?{...E,attrs:fc}:E,outer:Rm({...y,totals:void 0,left:u,right:d,leftTablet:f,rightTablet:p,leftPhone:m,rightPhone:b})}}function xw(e,t){let n={...e},o=[...e.totals??[]];for(let a of ka)for(let s of["top","bottom"]){if(Oa[a].some(l=>O(e[F(s,l)])!==void 0))continue;let r=l=>Wn(t,s,l),i=Oa[a][1];i&&r(i)===r(a)||(n[F(s,a)]=Pi(r(a),e[F("unit",a)],a),o.push(F(s,a)))}return{...n,totals:o}}function vw(e,t){let n={...e};for(let o of["tablet","mobile"]){let a=F("unit",o),s=["top","bottom","left","right"].some(r=>O(e[F(r,o)])!==void 0);for(let r of["top","bottom"]){if(O(n[F(r,o)])!==void 0)continue;let i=Oa[o].slice(1).find(d=>O(n[F(r,d)])!==void 0);if(!i||Wn(t,r,i)===Wn(t,r,o)||e.totals?.includes(F(r,i)))continue;let l=O(n[F(r,i)]),u=At(n[F("unit",i)]);if(s){let d=At(n[a]);n[F(r,o)]=u===d?l:Lm(l,u,d,o,{min:0,max:fe.max,step:1})}else n[F(r,o)]=l,n[a]=n[F("unit",i)]}}return n}function Rm(e){return Ii(e)}function Im(e,t){let n=typeof t=="object"?vw(e,t):e,o=(a,s,r,i,l)=>typeof a!="number"?void 0:At(s)==="px"&&!n.totals?.includes(r)?a+Wn(t,i,l):a;return Ii({...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 Ra,buttonBorderOf as ww,buttonFillOpacityOf as Cw,buttonPadSidesOf as Ow,viewKeyAt as Pw}from"efficient-easel/draw";import{BUTTON_PAD_UNIT_KEY as Di,lengthOf as kw}from"efficient-easel/screen/lib/content/length-units";var Aw="px-6 py-4",Rw=4,Ia=e=>{let t=new RegExp(`\\bp${e}-(?:\\[(\\d+)px\\]|(\\d+))`).exec(Aw);if(!t)throw new Error(`BUTTON_PAD_CLASSES has no p${e}`);return t[1]!==void 0?Number(t[1]):Number(t[2])*Rw},zG={top:Ia("y"),right:Ia("x"),bottom:Ia("y"),left:Ia("x")},Um="var(--btn)";function Iw(e){let t=e.variant==="ghost",n=Cw(e.buttonFillOpacity),o=ww(e.buttonBorder),a=W(e.buttonColor);return{fillOpacity:n??(t?0:100),border:{width:o?.width??1,color:o?.color??a??(t?"currentColor":Um)},changed:n!==void 0||o!==void 0}}function WG(e){let t=Iw(e);if(!t.changed)return null;let n=W(e.buttonColor)??Um;return{background:t.fillOpacity===0?"transparent":t.fillOpacity===100?n:`color-mix(in srgb, ${n} ${t.fillOpacity}%, transparent)`,borderWidth:kw(t.border.width,L(e.buttonBorderUnit)),borderStyle:"solid",borderColor:t.border.color}}var Nw="var(--sf-button-radius, 0)";function KG(e){let t=O(e.buttonCorners),n=Ne(e.buttonCornerSides);if(t===void 0&&n===null)return null;let o=t===void 0?Nw:M(Math.max(0,t),e.buttonCornersUnit);return{borderRadius:n===null?o:vt(o,n)}}function jG(e){let t=(r,i)=>e[Pw(r,i)],n=r=>Ow({top:t(Ra.top,r),right:t(Ra.right,r),bottom:t(Ra.bottom,r),left:t(Ra.left,r)})??{},o={desktop:t(Di,"desktop"),tablet:t(Di,"tablet"),phone:t(Di,"mobile")},{classes:a,style:s}=Ni(n("desktop"),n("mobile"),n("tablet"),void 0,o);return Object.keys(s).length?{className:a.join(" "),style:s}:null}var Mm="upper";function Gm(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)??Mm;return`${i} \xB7 ${l[u]??l[Mm]}`}import{usePreviewParts as RO}from"efficient-easel/draw/client";import{encodePartId as IO}from"efficient-easel/draw";import{DEFAULT_EASEL_STRINGS as NO,useEaselStrings as LO}from"efficient-easel/strings";import{PIN_STICK_VAR as Lw,PIN_TRACK_POSITION_VAR as Dw,pinAttrs as $m,pinStickVars as Fw,readPin as Hi}from"efficient-shell/format";var JG="Stick to top",ye={min:0,max:200,step:4,fallback:0},Kn={kind:"position",unitKey:"stickTopDistanceUnit"},zm=$t(Kn),[Bw,Hw,Mw]=zm,Mi="Pin while scrolling",Wm="Scroll",Ce={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"},jn="stickTopScreens",Uw=[jn,"stickTopScreensTablet","stickTopScreensPhone"],Ui="Screens",Gi="stickTopStop",cn="screen",Km="Pin stops at",jm=[{value:"header",label:"Under the header"},{value:cn,label:"Screen top"}],Vm="header",Ym="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 $i(e){return e===cn?cn:"header"}function Xm(e){return e===cn?cn:void 0}var zi="stickAbove",qm="Stays above",Zm="On: the pinned box stays on top, and the sections after it scroll under it.";function Gw(e){return e.stickAbove===!0}var QG=["stickTop","stickTopDistance","stickTopTablet","stickTopDistanceTablet","stickTopPhone","stickTopDistancePhone",...zm,...Uw,Gi,zi],e2=new Set(["IntroBleed"]),t2=new Set(["CategoryBar","DocTabs","Contents"]);function $w(e){return typeof e.stickTop=="boolean"?e.stickTop:e.sticky!==!1}var Fi=e=>Hi(!0,e).length,Wi={any:["stickTop","stickTopTablet","stickTopPhone"].map(e=>({field:e,is:!0}))},Jm={all:[{not:{field:"stickTop",in:[!0,!1]}},{not:{field:"sticky",is:!1}}]};function Bi(e,t="px"){let n=O(e)??ye.fallback;return t!=="px"?Math.max(ye.min,n):Math.min(ye.max,Math.max(ye.min,Math.round(n)))}function Ki(e){return typeof e.stickTopTablet=="boolean"}function ji(e){return typeof e.stickTopPhone=="boolean"}function un(e,t={}){let n=t.intro?$w(e):e.stickTop===!0,o=e,a=L(o[Bw]),s=Bi(e.stickTopDistance,a),r=Fi(e.stickTopScreens),i=Ki(e),l=i?e.stickTopTablet===!0:n,u=i?L(o[Hw]):a,d=i?Bi(e.stickTopDistanceTablet,u):s,f=i?Fi(e.stickTopScreensTablet):r,p=ji(e),m=p?e.stickTopPhone===!0:l,b=p?L(o[Mw]):u,y=p?Bi(e.stickTopDistancePhone,b):d,T=p?Fi(e.stickTopScreensPhone):f;return{desktop:n,desktopDistance:s,desktopUnit:a,desktopScreens:r,tablet:l,tabletDistance:d,tabletUnit:u,tabletScreens:f,ownTablet:i,phone:m,phoneDistance:y,phoneUnit:b,phoneScreens:T,ownPhone:p}}function n2(e,t={}){let n=un(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&&Gw(e),r=t.track===!0&&!o&&a&&!s,i=(f,p,m,b)=>Ot({tabletClass:"",tabletVar:`${f}-tablet`,phoneClass:"",phoneVar:`${f}-phone`},p,m,b).style,l={...t.atScreenTop||$i(e.stickTopStop)===cn?{[Ce.header]:"0px"}:{},[Ce.distance]:M(n.desktopDistance,n.desktopUnit),...i(Ce.distance,M(n.desktopDistance,n.desktopUnit),M(n.tabletDistance,n.tabletUnit),M(n.phoneDistance,n.phoneUnit))};if(r){let f=m=>m?"1":"0",p={...l,...n.desktop?{}:{[Ce.on]:"0"},...i(Ce.on,f(n.desktop),f(n.tablet),f(n.phone)),[Ce.length]:String(n.desktopScreens),...i(Ce.length,String(n.desktopScreens),String(n.tabletScreens),String(n.phoneScreens)),...zw(n.desktop&&n.desktopScreens===0,n.tablet&&n.tabletScreens===0,n.phone&&n.phoneScreens===0,i)};return{attrs:$m(Hi(!0),"track").attrs,style:p}}let u=f=>f?"sticky":"static",d={...l,...n.desktop?{}:{[Ce.position]:"static"},...i(Ce.position,u(n.desktop),u(n.tablet),u(n.phone))};return{attrs:$m(Hi(!0),"stick",s?{above:s}:{}).attrs,style:d}}function zw(e,t,n,o){let a=[[Ce.stick,Lw],[Ce.trackPosition,Dw]],[s,r,i]=[e,t,n].map(Fw);return Object.fromEntries(a.flatMap(([l,u])=>[...e?[[l,s[u]]]:[],...Object.entries(o(l,s[u],r[u],i[u]))]))}import{parseOption as Ww}from"efficient-shell/format";var Kw=["column","row","tabs","accordion"];var jw={column:"Stacked",row:"One row",tabs:"Tabs",accordion:"Accordion"},Qm={Flex:Kw,HeroGroup:["column","row"]},Vw={Flex:"row",HeroGroup:"column"},Yw={column:"flex-col",row:"flex-row",tabs:"flex-col",accordion:"flex-col"};function Na(e,t){return Ww(Qm[e],Vw[e],t)}function s2(e,t){return Yw[Na(e,t)]}function eh(e){return Qm[e].map(t=>({label:jw[t],value:t}))}import{viewKeyAt as Vi}from"efficient-easel/screen/lib/content/view-tiers";import{BORDER_WIDTH_MAX as Da}from"efficient-easel/screen/lib/content/style-keys";var Xw=["solid","dashed","dotted"],Fa=["top","right","bottom","left"],u2="sf-section-border",d2="sf-section-border-self",qw=/^#(?:[0-9a-f]{3}|[0-9a-f]{4}|[0-9a-f]{6}|[0-9a-f]{8})$/i,Zw=e=>typeof e=="number"&&Number.isFinite(e)?`${Math.min(Da,Math.max(0,Math.round(e)))}px`:void 0,Vn={kind:"border",unitKey:"sectionBorderUnit"},p2=$t(Vn);function f2(e){let t=Vn.unitKey;return{desktop:e[Vi(t,"desktop")],tablet:e[Vi(t,"tablet")],phone:e[Vi(t,"mobile")]}}var th=(e,t)=>t==="px"?Zw(e):typeof e=="number"&&Number.isFinite(e)?M(Math.max(0,e),t):void 0;function La(e,{phone:t=!1,tablet:n=!1,unit:o}={}){if(!e||typeof e!="object")return;let a=t?"-phone":n?"-tablet":"",s={},r=L(o);for(let i of Fa){let l=th(e[i],r)??th(e.width,r);l!==void 0&&(s[`--sf-border-${i}-width${a}`]=l)}return typeof e.style=="string"&&Xw.includes(e.style)&&(s[`--sf-border-style${a}`]=e.style),typeof e.color=="string"&&qw.test(e.color)&&(s[`--sf-border-color${a}`]=e.color.toLowerCase()),Object.keys(s).length?s:void 0}function Yi(e){let{width:t,...n}=e;return typeof t!="number"?e:{...n,...Object.fromEntries(Fa.map(o=>[o,n[o]??t]))}}function m2(e,t,n,o={}){let a=La(e,{unit:o.desktop}),s=La(n,{tablet:!0,unit:o.tablet}),r=La(n,{phone:!0,unit:o.tablet}),i=La(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 Jw}from"efficient-shell/format";var dn="var(--section-bg)",Xi="inherit";function qi(e,t){return e===Xi?dn:e===void 0?t:Ba(e)}var Qw=/var\(\s*--(surface-2|surface|line)\s*(?=[,)])/g;function Ba(e){let t=Ae(e);return t?He(t):e.replace(Qw,"var(--site-$1")}var eC={"var(--section-bg)":"band","var(--site-surface)":"surface","var(--site-surface-2)":"surface2"};function Zi(e,t,n){let o=qi(e,t);if(!o||o==="transparent")return n.background.toLowerCase();let a=o.trim(),s=a.startsWith("#")?Jw(a):null;if(s)return s.toLowerCase();let r=eC[a.replace(/\s+/g,"")];return(r?n[r]:n.background).toLowerCase()}var Ji="transparent";function nh(e,t){let n=qi(e,t);return!n||n===Ji?"none":n===dn?"band":null}function oh(e,t,n=t){let o=s=>!s||s==="transparent",a=qi(e,t);return a===n||o(a)&&o(n)}var ah=["transparent","var(--wheel-stage)","var(--surface)","var(--surface-2)"],sh={transparent:"No fill","var(--wheel-stage)":"Image stage","var(--surface)":"Panels and cards","var(--surface-2)":"Second surface"},pn="var(--wheel-stage)",Ha="transparent",Yn="inherit";function _2(e,t){return Ba(Qi(e,t))}function Qi(e,t){return e===Yn?pn:e==null?t:e===!0?pn:e===!1?Ha:e}function T2(e){return typeof e=="string"&&e!==Yn?Ba(e):pn}function E2(e){return e!==Ha&&e!=="none"&&e!==""}function rh(e,t){return e===Yn||e===!0?!0:e==null?t===pn:!1}var ih="inherit",Ma="fixed",lh=e=>typeof e!="number"&&e!==Ma,tC="var(--sf-heading-max, 9999px)";function w2(e,t,n,o,a){if(typeof e=="number")return M(e,a);if(e===Ma)return t;let s=o?`var(--size-${o}, ${t})`:t;return n==="heading"?`min(${s}, ${tC})`:s}var el={kind:"fontSize",unitKey:"titleSizeUnit"},tl={kind:"fontSize",unitKey:"bodySizeUnit"},nC=["desktop","mobile"],C2=[el,tl].flatMap(e=>$t(e,nC));function O2(e){let t=(n,o)=>Oc(e,n,o);return{titleDesktop:t(el,"desktop"),titleMobile:t(el,"mobile"),bodyDesktop:t(tl,"desktop"),bodyMobile:t(tl,"mobile")}}var oC=["page","full"],ch=["full","page"],Rt={full:"Full",page:"Content"},nl="inherit",aC=e=>typeof e=="string"&&oC.includes(e),sC=e=>e===nl;function rC(e,t){return sC(e.widthMode)?{mode:"full",inherited:!0}:aC(e.widthMode)?{mode:e.widthMode,inherited:!1}:{mode:t,inherited:t==="full"}}function I2(e){return rC(e,"page").mode==="full"}var iC={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 N2(e){return he(iC,e)}var te={background:"sectionBackgroundWidth",content:"sectionContentWidth",contentMax:"sectionContentMax",contentMaxUnit:"sectionContentMaxUnit"},L2={kind:"size",unitKey:te.contentMaxUnit};function lC(e){let t=e[te.contentMaxUnit],n=L(t),o=e[te.contentMax],a=n==="px"?vm(o):typeof o=="number"&&Number.isFinite(o)&&o>0?o:null,s=fn(e[te.content])??(a===null?null:"content");return{background:fn(e[te.background]),content:s,contentMax:s==="content"?a:null,contentMaxUnit:n}}function D2(e){let t=lC(e);return t.content===null&&e.fullWidth===!0?{...t,content:"full"}:t}function F2(e){return e.background!==null||e.content!==null}var B2=e=>({[te.background]:e}),H2=e=>e==="full"?{[te.content]:e,[te.contentMax]:void 0,[te.contentMaxUnit]:void 0}:{[te.content]:e},M2=e=>({[te.content]:"content",[te.contentMax]:e}),U2=e=>e==="background"?{[te.background]:void 0}:{[te.content]:void 0,[te.contentMax]:void 0,[te.contentMaxUnit]:void 0},uh="siteWidths",cC=e=>e==="full"||e==="content";function fn(e){return cC(e)?e:null}function G2(e,t){return{[uh]:{background:fn(e),content:fn(t)}}}function $2(e){let t=e.editor?.metadata?.[uh];return{background:fn(t?.background),content:fn(t?.content)}}import{useEaselSession as DO}from"efficient-easel/screen/lib/session-context";import{BOX_GAP as FO,describedAs as st,group as _e,iconOf as Nt,sharedStyleKinds as no}from"efficient-easel/screen/lib/document/box-fields";import{VIEW_KEY_ACCESS as zh,onDesktopWords as Lt,phoneTwinFields as ml,saidAlignmentGrid as BO,useLengthUnit as HO}from"efficient-easel/screen/lib/document/box-fields";import{createElement as Se}from"react";import{SettingsDefaultReset as uC,SettingsField as dC}from"efficient-easel/panel";import{boxFieldBuilders as pC,describedAs as fC,iconOf as mC,onDesktopWords as hC}from"efficient-easel/screen/lib/document/box-fields";import{LENGTH_KIND_UNITS as gC}from"efficient-easel/screen/lib/content/length-units";import{IconPicker as bC,Tooltip as yC,useShellStrings as SC}from"efficient-shell/ui";import{RotateIcon as _C}from"efficient-easel/icons";var dh=e=>c(e),Xn=gC,q=pC(dh,{lengthUnits:Xn}),Fe=q.slider,ie=q.select,qn=q.Segmented,mn=q.segmented,J2=q.alignmentField,Q2=q.alignmentFields,e$=q.blockAlignmentField,t$=q.blockAlignmentFields,n$=q.boxJustifyField,o$=q.boxAlignField,a$=q.boxWrapField,ph=q.directionField,Ua=q.gapField,s$=q.placementField,r$=q.PlacementGridView,i$=q.positionFields,l$=q.sidesPaddingFields,Zn=q.lengthUnitFields;function c$(e,t){return Fe("Angle",Se(_C),fo.min,fo.max,fo.step,e,"\xB0",t)}var ol=Symbol("efficient-web-builder.picture-picker-row"),TC={width:"3.5rem",height:"2.75rem",words:!0};function EC({value:e}){return SC().iconNames[e]??e}function al(e,t,n){return Se(yC,{content:n,className:"sf-pick-tip",children:Se("span",{className:"sf-pick"},Se("span",{className:"sf-pick-pic"},e),Se("span",{className:"sf-pick-cap"},t))})}function xC(e){let t=n=>n.label===void 0?Se(EC,{value:n.value}):c(n.label);return e.map(n=>({value:n.value,...n.label===void 0?{}:{label:c(n.hint??n.label)},icon:al(n.picture,t(n),n.hint===void 0?t(n):c(n.hint))}))}function fh(e,t){return Se("span",{className:"sf-pick"},Se("span",{className:"sf-pick-pic"},e),Se("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",[ol]:!0,...fC({},{type:"radio",label:e,options:i}),options:i,render:l=>{let{value:u,onChange:d,field:f}=l,p=f?.options,m=xC(n.filter(v=>!p||p.some(C=>C.value===v.value))),b="follows"in l,y=b?r(a.phoneRest?a.phoneRest(l.follows):l.follows)??o:void 0,T=f?.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 Se(dC,{label:c(e),icon:mC(t),action:b?Se(uC,{words:P()?.panel,label:c(e),changed:E,detail:x?.label!==void 0?hC(dh,c(x.label),l.followsView):void 0,disabled:l.readOnly===!0,onReset:()=>d(void 0)}):void 0},Se(bC,{label:c(e),value:S,options:m,onChange:d,columns:a.columns,cell:a.cell??TC,tooltips:!1,disabled:l.readOnly===!0}))}}}import{VIEW_ABOVE as ll}from"efficient-easel/screen/lib/content/length-units";import{jsx as h,jsxs as R}from"react/jsx-runtime";import{NoSymbolIcon as IC}from"efficient-easel/icons";import{useId as NC}from"react";import{parseOption as mh}from"efficient-shell/format";var vC="line",wC=[{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"}],rl={"stripes-fine":{ink:4,period:12},"stripes-medium":{ink:8,period:18},"stripes-bold":{ink:14,period:28}},p$=28,CC="-45deg",OC="color-mix(in oklab, var(--accent) 50%, var(--bg))";function PC(e){return e!=="line"&&e!=="none"}var kC={sm:24,md:48,lg:80},AC="md",RC=Object.keys(kC);function f$(e){return mh(RC,AC,e)}function m$(e){return mh(wC,vC,e)}function h$(e){if(!PC(e))return null;let{ink:t,period:n}=rl[e];return`repeating-linear-gradient(${CC}, ${OC} 0 ${t}px, transparent ${t}px ${n}px)`}var g$={kind:"border",unitKey:"thicknessUnit"},b$={kind:"size",base:"%",unitKey:"lengthPctUnit"};var Ga=44,$a=28;function A({children:e}){return h("svg",{width:Ga,height:$a,viewBox:`0 0 ${Ga} ${$a}`,"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}),I=({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 il(e){let t=20/on,n=5,o=1,a=[],s=0,r=0,i=0;for(let[d,f]of e)s+d>on&&(r+=i*(n+o),s=0,i=0),a.push({x:12+s*t,y:r,w:d*t-o,h:f*n+(f-1)*o}),s+=d,i=Math.max(i,f);let l=r+i*(n+o)-o,u=($a-l)/2;return h(A,{children:a.map((d,f)=>h("rect",{x:d.x,y:u+d.y,width:d.w,height:d.h,rx:1,stroke:"none",opacity:.6},f))})}var v$={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 w$(e){if(e==="none")return h("span",{style:{display:"flex",width:Ga,height:$a,alignItems:"center",justifyContent:"center"},children:h(IC,{size:20})});if(e==="line")return h(A,{children:h(Q,{x1:4,y1:14,x2:40,y2:14})});let{ink:t,period:n}=rl[e],o=.4,a=[];for(let s=-12;s<Ga;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(LC,{children:a})}function LC({children:e}){let t=`sf-div-${NC().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 za=({x:e,y:t,w:n,h:o})=>h("rect",{x:e,y:t,width:n,height:o,rx:2,stroke:"none",opacity:.3}),C$={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})]})},O$={card:R(A,{children:[h(I,{x:10,y:3,w:24,h:22}),h(za,{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(za,{x:10,y:3,w:24,h:22}),h(I,{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})]})},P$={cards:R(A,{children:[h(I,{x:3,y:5,w:11,h:18}),h(I,{x:17,y:5,w:11,h:18}),h(I,{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})]})},k$={table:R(A,{children:[h(I,{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})]})},A$={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(I,{x:3,y:7,w:11,h:14}),h(I,{x:17,y:7,w:11,h:14}),h(I,{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(I,{x:3,y:9,w:18,h:10}),h(I,{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})]})},R$={overlay:R(A,{children:[h(za,{x:4,y:3,w:36,h:22}),h(I,{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(za,{x:4,y:13,w:36,h:12}),h(I,{x:4,y:13,w:36,h:12})]})},I$={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})]})},N$={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})]})},L$={"spec-card":R(A,{children:[h(I,{x:4,y:3,w:36,h:22}),h(_,{x:8,y:7,w:14}),h(I,{x:8,y:12,w:8,h:9}),h(I,{x:18,y:12,w:8,h:9}),h(I,{x:28,y:12,w:8,h:9})]}),fitment:R(A,{children:[h(I,{x:4,y:4,w:10,h:5}),h(I,{x:16,y:4,w:10,h:5}),h(I,{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(I,{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(I,{x:4,y:3,w:10,h:22}),h(I,{x:17,y:3,w:10,h:22}),h(I,{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(I,{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(I,{x:8,y:18,w:8,h:4}),h(I,{x:18,y:18,w:8,h:4}),h(I,{x:28,y:18,w:8,h:4})]}),terminal:R(A,{children:[h(I,{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})]})},hh={width:"5.75rem",height:"3.75rem",words:!0},D$={width:"8.5rem",height:"3.75rem",words:!0},F$={columns:R(A,{children:[h(I,{x:3,y:4,w:11,h:8}),h(I,{x:17,y:4,w:11,h:8}),h(I,{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(I,{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(I,{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(I,{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(I,{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 NW,SCALAR_TEXT_CONTROLS as LW}from"efficient-easel/draw";function Dt(e,t){return c("{value} from {from}",{value:e,from:t})}function MO(){let{blockGap:e}=D();return e===null?c("this container's own spacing"):Dt(`${e}px`,c("Styles"))}function UO({inherited:e,onReset:t,label:n}){return g(ne,{words:P()?.panel,label:c(n),changed:!e,detail:MO(),onReset:t})}function GO(e){return Ua({...FO,builtIn:Xt[e],resolve:(t,n)=>xn(e,t,n?.siteGap),action:(t,n)=>g(UO,{inherited:!Co(e,t),onReset:()=>n(void 0),label:"Gap"}),mark:{[wo]:e}})}function $O(e){return le(ee("mobile",{[wo]:e,type:"custom",render:t=>g(KO,{container:e,...t})}),Wh)}function zO(e){return le(ee("tablet",{[wo]:e,type:"custom",render:t=>g(WO,{container:e,...t})}),Wh)}var Wh={not:{field:"gap",in:Array.from({length:-Ue.min},(e,t)=>Ue.min+t)}};function vW(e){return{gap:ee("desktop",GO(e)),[Sl("gap")]:zO(e),[at("gap")]:$O(e)}}function WO({container:e,...t}){let[n]=Oe("gap"),{siteGap:o}=t.field??{},a=Math.max(wn.min,xn(e,n,o));return Ua({...wn,builtIn:a,resolve:s=>qe(s)?s:a,action:(s,r)=>g(ne,{words:P()?.panel,label:c("Gap"),changed:qe(s),detail:Lt(i=>c(i),`${a}px`),onReset:()=>r(void 0)})}).render(t)}function KO({container:e,...t}){let[n]=Oe("gap"),{siteGap:o,siteGapPhone:a}=t.field??{},s=Us(e,void 0,n,o,a);return Ua({...wn,builtIn:s,resolve:r=>Us(e,r,n,o,a),action:(r,i)=>g(ne,{words:P()?.panel,label:c("Gap"),changed:qe(r),detail:Dt(`${s}px`,Ms(e,n,a)?c("Styles"):c("Desktop")),onReset:()=>i(void 0)})}).render(t)}function wW(e){return ph({offered:eh(e),fallback:Na(e,void 0),resolve:t=>Na(e,t)})}function CW(e,t){return Qc(t?eu(e,t):[],t)}function jO({inherited:e,onReset:t,label:n}){return g(ne,{words:P()?.panel,label:c(n),changed:!e,detail:Dt(c("Full"),c("the page")),onReset:t})}function Ft({value:e,onChange:t,label:n,placeholder:o,hint:a,multiline:s,hideable:r=!0,markup:i=!0}){let{text:l,hidden:u}=UC(e),d=Jn(null),f=Jn(null),p=E=>t(r?{text:E,hidden:u}:E),m=()=>t({text:l,hidden:!u}),b=r&&u,y=Ph(),T=a?ZO(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(iO,{}),htmlFor:y,className:b?"is-hidden":void 0,hint:T,action:r?g(yl,{content:S,children:g(Gh,{"aria-pressed":u,"aria-label":S,onClick:m,children:u?g(_h,{name:"eye-off",size:14}):g(_h,{name:"eye",size:14})})}):void 0,children:ze("div",{className:"sf-copybox",children:[i&&g(ri,{target:s?f:d,value:l,onChange:p}),s?g("textarea",{id:y,ref:f,value:l,placeholder:o===void 0?void 0:c(o),onChange:E=>p(E.target.value)}):g("input",{id:y,ref:d,type:"text",value:l,placeholder:o===void 0?void 0:c(o),onChange:E=>p(E.target.value)})]})})}function OW(e,t){return{...e,[WC]:t}}function PW(e){let t=e[We];if(!t)throw new Error("withOffPage: the field holds no authored text");return{...e,[We]:{...t,offPage:!0}}}function kW(e){return!e||typeof e!="object"?!1:e[We]?.offPage===!0}function Tl(e){if(!e[We])throw new Error("withPanelOnly: the field holds no authored text");return{...e,[Qs]:!0}}function AW(e){return Do(e)}function RW(e){let t=e[We];if(!t)throw new Error("withIdentifier: the field holds no authored text");return{...e,[We]:{...t,identifier:!0}}}function DW(e,t){if(!e[We])throw new Error("inOwnBox: the field holds no authored text");let{[PO]:n,...o}=e;return{...o,[Js]:!0,render:t}}var VO=new Set(AO),qa={type:"radio",options:[{value:!0},{value:!1}]},Kh={text:{type:"object",objectFields:{text:{type:"text"},hidden:qa}},textarea:{type:"object",objectFields:{text:{type:"textarea"},hidden:qa}},plainText:{type:"text"},copyText:{type:"text"},plainTextarea:{type:"textarea"},textList:{type:"array",arrayFields:{text:{type:"text"}}}},Bt=(e,t)=>{let n=st({...t,[We]:e},{...Kh[e.control],label:e.label});if(!VO.has(e.control))return n;let o=t.render;return{...$h(n,"authored-copy"),render:a=>g(Df,{name:a.name,children:o(a)})}},FW="Everything else on this block comes from the linked post. Unlink it to edit by hand.",YO={field:"source.slug",set:!0},BW={not:YO},XO="Select a word, then press the highlighter.",qO=new Set([XO]),ZO=e=>qO.has(e);function Ja(e,t,n){return Bt({control:"text",label:e,placeholder:t,hint:n},{type:"custom",render:({value:o,onChange:a})=>g(Ft,{value:o,onChange:a,label:e,placeholder:t,hint:n})})}function El(e,t,n){return Bt({control:"textarea",label:e,placeholder:t,hint:n},{type:"custom",render:({value:o,onChange:a})=>g(Ft,{value:o,onChange:a,label:e,placeholder:t,hint:n,multiline:!0})})}function hn(e,t,n){return Bt({control:"plainText",label:e,placeholder:t,hint:n},{type:"custom",render:({value:o,onChange:a})=>g(Ft,{value:o,onChange:a,label:e,placeholder:t,hint:n,hideable:!1,markup:!1})})}function jh(e,t,n){return Bt({control:"copyText",label:e,placeholder:t,hint:n},{type:"custom",render:({value:o,onChange:a})=>g(Ft,{value:o,onChange:a,label:e,placeholder:t,hint:n,hideable:!1})})}function HW(e){return{type:"custom",[$C]:{label:e},...st({},{type:"text",label:e}),render:({value:t,onChange:n})=>g(hm,{value:GC(t),onChange:n,label:e})}}function MW(e,t,n){return Bt({control:"plainTextarea",label:e,placeholder:t,hint:n},{type:"custom",render:({value:o,onChange:a})=>g(Ft,{value:o,onChange:a,label:e,placeholder:t,hint:n,multiline:!0,hideable:!1})})}var UW={Design:KC,Animation:VC};function GW(e,t){return{type:"custom",render:()=>g(JO,{text:e,values:t})}}function JO({text:e,values:t}){return g("p",{className:"sf-note",children:c(e,t)})}function $W(e){return Ah(e)!==null&&e?.tabs!==void 0}var Th=new Map;function zW(e,t){let n=`${e}\0${t?t.join(""):""}`,o=Th.get(n)??{type:"custom",tabs:t,[kh]:{label:e,level:1},bucket:e,marker:!0,render:()=>g(Ke,{})};return Th.set(n,o),o}var Eh=new Map;function WW(e){let t=Eh.get(e)??{type:"custom",[kh]:{label:e,level:1},designGroup:e,marker:!0,...e==="Content"?{}:{fold:e},render:()=>g(Ke,{})};return Eh.set(e,t),t}function QO(e){let t=e;return t?.marker===!0&&typeof t.fold=="string"?t.fold:null}function KW(e,t){return QO(e)===t?e:{...e,marker:!0,fold:t,render:()=>g(Ke,{})}}function jW(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(Ke,{})}}function VW({title:e,children:t}){let[n,o]=Qn(()=>!cl.has(e));return g(uO,{title:e,open:n,onToggle:a=>{o(a),a?cl.delete(e):cl.add(e)},children:t})}var cl=new Set;function eP({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 ze("div",{className:"sf-swatches",children:[e.map(i=>{let l=o?.[i]?c(o[i]):i;return g(yl,{content:l,children:g(SO,{color:i,selected:t.toLowerCase()===i.toLowerCase(),onClick:()=>n(i),"aria-label":l})},i)}),g("span",{className:"sf-swatch-hex",children:r})]})}function YW(e,t,n=!1){return{type:"custom",render:({value:o,onChange:a})=>g(tP,{label:e,builtIn:t,followsBand:n,value:o,onChange:a})}}function tP({label:e,builtIn:t,followsBand:n,value:o,onChange:a}){let s=typeof o=="string"?o:void 0,{colors:r,n:i}=Ol(),l={background:r.background,surface:r.surface,surface2:Fc(r),band:Bc(r)},u=n?dn:t,d=oh(s,t,u),f=Zi(void 0,u,l),p=n?Xi:void 0,m=u===dn?c("the theme's section background"):c("Theme {n} background",{n:i}),b=nP(s,t,r,i,l,a),y=Dt(f.toUpperCase(),m),T=Ae(s),S=T?Yt(T,r,i):null;return S?g(be,{label:c(e),icon:g(gh,{}),value:S.hex,caption:S.words,onChange:a,changed:!0,onReset:()=>a(p),resetTo:y,choices:b}):g(Cn,{label:c(e),icon:g(gh,{}),value:d?"":Zi(s,t,l),inherited:f,resetTo:y,onChange:a,onReset:()=>a(p),choices:b})}function nP(e,t,n,o,a,s){let r=nh(e,t);return[{label:c("No fill"),color:"",selected:r==="none",onPick:()=>s(Ji)},{label:`${c("Section band")} \xB7 ${a.band.toUpperCase()}`,color:a.band,selected:r==="band",onPick:()=>s(dn)},...Cl(Ae(e)??"",n,o,s)]}function oP(e,t){return{type:"custom",render:({value:n,onChange:o})=>{let a=n,s=rh(a,t);return g(K,{label:c(e),icon:g(pl,{}),changed:!s,action:g(ne,{words:P()?.panel,label:c(e),changed:!s,detail:c("the theme's image stage"),onReset:()=>o(Yn)}),children:eP({swatches:ah,current:s?pn:Qi(a,t),onPick:o,names:sh})})}}}function XW(e=n=>n,t){return no({_gSectionTheme:_e(Xc),sectionAccent:{type:"custom",render:({value:n,onChange:o})=>g(Ju,{value:e(n),onChange:o,followLabel:t})}})}function Qa(e){let t=Z(),n=Ds(e?.view),o=r=>_l(e.valueKey,r),a=e.numbersIn??(r=>O(t[o(r)])!==void 0),s=e.followsView??yP(n,a);return HO({props:{value:void 0,onChange:()=>{},field:{}},row:e.valueKey?e.row:void 0,table:Xn,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:f,onClear:p,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(CO,{min:e,max:t,step:n,value:o,...o===null&&d!==void 0?{placeholderValue:d}:{},...f?{emptyLabel:c(f)}:{},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?p?.():T!==o&&a(T)}})})}function aP(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:f,onChange:p})=>{let m=typeof f=="number"?f:null,b=m===null;return g(K,{label:c(e),icon:u?Nt(u):void 0,value:b?l||s===void 0?void 0:c(s):`${m}${d}`,changed:!b,action:l?hl(l,{changed:!b,onReset:()=>p(null)}):g(ne,{words:P()?.panel,label:c(e),changed:!b,onReset:()=>p(null)}),hint:typeof r=="string"?c(r):r,children:i?i({min:n,max:o,step:a,px:m,label:e,onChange:p}):de({min:n,max:o,step:a,value:m??n,readout:!1,ariaLabel:e,onChange:p})})}}}var eo="Corners",sP={kind:"radius"};function xl(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(eo),icon:g(Ih,{}),changed:s,action:hl(e.mark,{changed:s,onReset:()=>o(null)}),hint:e.hint,children:g(rP,{tier:e,px:a,name:t.name,onRadius:o})})}}}function Oe(e){let t=It();return[t?.values?.[e],n=>t?.onChange(e,n)]}function Vh(){return $h({type:"custom",render:()=>g(kO,{})},"always")}function rn(){let e=It();return t=>e?.onChangeMany(t)}function rP({tier:e,px:t,name:n,onRadius:o}){let a=e.useFollowed(),[s,r]=Oe(e.sidesKey),i=rn(),l=Qa({row:e.row??sP,label:eo,grid:{min:oe,max:Ye,step:e.step??1},valueKey:n??"",view:"desktop"}),u=Ne(s)??[...Jo];return g(_O,{label:c(eo),value:u,corners:Tp,onChange:d=>{let f=Ne(d)??[];r(f.length===Jo.length?null:f)},radius:t,onRadiusChange:l&&n?d=>i({[n]:d,...l.unitPatch(d===null)}):o,radiusMin:l?.grid.min??oe,radiusMax:l?.grid.max??Ye,radiusStep:l?.grid.step??e.step??1,radiusPlaceholder:l&&l.unit!=="px"?"\u2013":String(a),...l?{radiusUnit:l.unit,units:l.units}:{}})}function Yh(e,t){return Zn(e,t)}function Xh(){return Vh()}function iP({label:e,changed:t=!1,onReset:n=()=>{}}){let{cornerRadiusPx:o}=D(),a=typeof o=="number"?`${o}px`:c("not set");return g(ne,{words:P()?.panel,label:c(e),changed:t,detail:o==null?c("the built-in corners"):Dt(a,c("Styles")),onReset:n})}function lP(){let{cornerRadiusPx:e}=D();return typeof e=="number"?e:oe}function cP(){return xl({sidesKey:"sectionCornerSides",row:Ir,useFollowed:lP,mark:g(iP,{label:eo}),hint:uP})}var uP="Follows Styles \u25B8 Basics \u25B8 Corners until you set a number here.";function qW(){return no({_gShape:_e("Shape"),sectionCorners:cP(),...Yh(Ir,"sectionCorners"),sectionCornerSides:Xh(),...Ge("sectionBorder",bP),...Zn(Vn,"sectionBorder",{tablet:!0,phone:!0})})}var dP=()=>({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 pP(e){let t=Object.fromEntries(Object.entries(e).filter(([,n])=>n!=null&&n!==""));return Object.keys(t).length?t:void 0}function fP(){let e;try{let t=Pe(D().theme);e=t.themes[t.selected]?.line}catch{e=void 0}return e||Rc.line}function mP({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]=Qn(()=>a?hO(l,r):!1),f=dP(),p=m=>pP(a&&s?m:{width:m.width,color:m.color,...s?{style:m.style}:{}});return g(K,{label:c("Border"),icon:g(YC,{}),action:a?g(fO,{each:u,label:c("Each side"),onChange:d}):void 0,children:g(pO,{label:c("Border"),value:l,each:u,onChange:m=>t(p(m)),placeholder:n,presets:o,words:i?{...f,unit:i.unit}:f,styles:s,max:i?.grid.max??Da,...i?{step:i.grid.step,units:i.units}:{}})})}function hP({value:e,onChange:t,view:n}){let[o]=Oe("sectionBorder"),[a]=Oe(Sl("sectionBorder")),s=fP(),r=p=>p&&typeof p=="object"?p:{},i=n==="phone"?{...Yi(r(o)),...Yi(r(a))}:n==="tablet"?r(o):{},l=Z(),u=rn(),d=U("sectionBorder",n),f=Qa({row:Vn,label:"Border",grid:{min:0,max:Da,step:1},valueKey:"sectionBorder",view:n,numbersIn:p=>ul(l[_l("sectionBorder",p)]),convertTo:p=>{let m=r(l[d]);return ul(m)?{[d]:gP(m,p)}:{}}});return g(mP,{value:e,length:f,onChange:f?p=>u({[d]:p,...f.unitPatch(!ul(p))}):t,placeholder:{sides:mO(i),style:i.style??"solid",color:i.color||s},presets:[s],above:i})}var qh=["width",...Fa];function ul(e){if(!e||typeof e!="object")return!1;let t=e;return qh.some(n=>O(t[n])!==void 0)}function gP(e,t){let n={...e};for(let o of qh){let a=O(n[o]);a!==void 0&&(n[o]=t(a))}return n}function bP(e){return{type:"custom",render:({value:t,onChange:n})=>g(hP,{value:t,onChange:n,view:e})}}function yP(e,t){let n=ll[e];for(;n&&ll[n]!==null&&!t(n);)n=ll[n];return n??e}function ZW(e){return{type:"custom",render:()=>g(SP,{partKey:e})}}function SP({partKey:e}){let[t]=Oe("id"),[n]=Oe("_partStyles"),{textStyles:o}=D(),a=LO(),s=null;try{s=RO().select}catch{s=null}let r=n&&typeof n=="object"?n[e]:void 0,i=Array.isArray(o)?o:null;return g(cO,{name:c("Text"),preview:Gm(r,i,{noStyle:c("No style"),styleName:a.textStyles.styleName,cases:(a.copy.panel??NO.copy.panel).cases}),onOpen:()=>{s&&typeof t=="string"&&s(IO(t,e))}})}function Zh(e){let{cornerRadiusPx:t}=D(),n=typeof t=="number"?t:e,o=null;try{let{appState:s,selectedItem:r}=Za(l=>l),i=r?.props?.id?String(r.props.id):void 0;o=i?Sf(s?.data,i)?.props??null:null}catch{o=null}if(!o)return n;let a=o.sectionCorners;return Nr(a)?a:n}function _P({label:e,changed:t=!1,onReset:n=()=>{}}){let o=Zh(oe);return g(ne,{words:P()?.panel,label:c(e),changed:t,detail:Dt(`${o}px`,c("the section")),onReset:n})}function TP(){return g(Ke,{children:c("Follows the section's Corners until you set a number here.")})}function EP(){return xl({sidesKey:"cardCornerSides",row:Nn,useFollowed:()=>Zh(oe),mark:g(_P,{label:eo}),hint:g(TP,{})})}function xP(){return{type:"custom",render:()=>g(Pp,{})}}function JW(){return{_gShape:_e("Shape"),cardCorners:EP(),...Yh(Nn,"cardCorners"),cardCornerSides:Xh(),cardCornersApplyAll:xP()}}function vP(){return st({type:"custom",[ol]:!0,render:e=>g(CP,{...e})},{type:"select",label:ut,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 wP(e,t){let n=Ss(e);if(n!=="custom")return c(ys.find(a=>a.value===n)?.label??"");let o=Uh(ho(e,t),t);return o?[...o,100-o.reduce((a,s)=>a+s,0)].join(" / "):c("Custom")}function CP(e){let{value:t,onChange:n}=e,[o]=Oe("content"),a=Array.isArray(o)?o.length:0,s="follows"in e,r=t!=null,i=r?t:s?e.follows:void 0,l=Ss(i),u=a>=2&&a<=yh,d=()=>[...xO[a]??[]],f=Jn(null),p=S=>{let E=f.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:yh}),y=r&&(s||t!=="content"),T=wO().widths.hint(a,EO);return g(K,{label:c(ut),icon:g(Ya,{}),changed:y,hint:l!=="custom"?void 0:u?T:b,action:g(ne,{words:P()?.panel,label:c(ut),changed:y,disabled:e.readOnly===!0,detail:s?Lt(S=>c(S),wP(e.follows,a),e.followsView):c("Fit content"),onReset:()=>n(void 0)}),children:ze("div",{className:"sf-share-row",children:[g("div",{className:"sf-share-pick",children:g(Mh,{label:c(ut),value:l,options:ys.map(S=>({value:S.value,label:S.value==="custom"&&!u?b:c(S.label),icon:al(g("span",{className:"sf-gallery-pic sf-share-pic",children:Jh(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:Qh,tooltips:!1,disabled:e.readOnly===!0})}),l==="custom"&&u?g("div",{onFocus:()=>{f.current={value:t,shares:Uh(ho(i,a),a)}},onBlur:()=>{f.current=null},children:g(vO,{label:c(ut),count:a,value:ho(i,a),onChange:p,readOnly:e.readOnly===!0})}):null]})})}function Jh(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 QW(){return ie(Sc,g(tO,{}),Es,Es[0].value)}function e4(){return ee("mobile",sl(ut,g(Ya,{}),gc.map(e=>({label:e.label,value:e.value,picture:g("span",{className:"sf-gallery-pic sf-share-pic",children:Jh(e.weights).map((t,n)=>g("i",{style:{gridColumn:`span ${t}`}},n))})})),bc,{columns:2,cell:Qh}))}var Qh={width:"5.75rem",height:"3.25rem",words:!0};function t4(){return ml("share",vP(),zh)[Sl("share")]}function OP(){return ee("mobile",Fe(_s,g(Rh,{}),go,hc,1,go,"",{clear:{phoneFollows:!1,hint:go}}))}var xh={read:e=>e.phoneRow,write:(e,t,n)=>({phoneRow:n}),fieldKey:()=>"phoneRow",ownField:!0};function n4(){let e=Fe(_s,g(Rh,{}),Ts,yc,1,Ts,"",{clear:{emptyLabel:"Auto"}}),t=ml("columns",e,{...xh,tablet:zh.tablet}),n=ml("columns",e,xh,{phoneRow:OP()});return{...t,phoneRow:n.phoneRow}}function o4(e,t,n,o,a,s,r){return{type:"custom",render:({value:i,onChange:l,name:u})=>g(PP,{label:e,min:t,max:n,step:o,fallback:a,role:s,value:i,onChange:l,name:u??"",length:r})}}function PP({label:e,min:t,max:n,step:o,fallback:a,role:s,value:r,onChange:i,name:l,length:u}){let d=Z(),f=rn(),p=Ds(u?.view),m=Qa({row:u?.row??{kind:"fontSize"},label:e,grid:{min:t,max:n,step:o},valueKey:u?l:"",view:u?.view??"desktop",numbersIn:y=>y===p&&typeof d[l]=="number",followsView:p,convertTo:y=>typeof d[l]=="number"?{[l]:y(d[l])}:{}}),b=y=>m?f({[l]:y,...m.unitPatch(typeof y!="number")}):i(y);return g(K,{label:c(e),icon:g(Zr,{noun:s}),action:g(ne,{words:P()?.panel,label:c(e),changed:!lh(r),detail:c("the Text style in Styles"),onReset:()=>b(ih),defaultAction:{onPress:()=>b(Ma),title:c("Keep this section's own built-in size"),icon:g(XC,{})}}),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 Ka(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 a4(){return{_gCellWidth:_e("Cell size"),gridSpan:ee("desktop",ie("Positions",g(Ya,{}),Ka(aa,"position","positions"),"")),gridRowSpan:ee("desktop",ie("Rows tall",g(Xa,{}),Ka(ra,"row","rows"),"")),[Vr]:Fe("At card",g(Lh,{}),1,Yr,1,1,""),[at("gridSpan")]:ee("mobile",ie("Positions",g(Ya,{}),[{label:"Full row",value:""},...Ka(sa,"position","positions").slice(1)],"")),[at("gridRowSpan")]:ee("mobile",ie("Rows tall",g(Xa,{}),Ka(ra,"row","rows"),""))}}function Z(){let e=null,t=null;try{e=Oh(kP),t=Za(n=>n).selectedItem}catch{t=null}return e??t?.props??{}}var kP=FC(null);function AP({min:e,max:t,step:n,px:o,label:a,onChange:s,desktopKey:r,fallback:i}){let l=Z()[r],u=ya(void 0,l,i);return g(Ke,{children:de({min:e,max:t,step:n,value:ya(o,l,i),readout:!1,ariaLabel:a,notch:u,onChange:s})})}function RP({label:e,desktopKey:t,fallback:n,unit:o="px",changed:a=!1,onReset:s=()=>{}}){let r=Z()[t],i=ya(void 0,r,n);return g(ne,{words:P()?.panel,label:c(e),changed:a,detail:Lt(l=>c(l),`${i}${o}`),onReset:s})}function IP(e){return aP(e.label,{icon:e.icon,min:e.min,max:e.max,step:e.step,unit:e.unit,unsetLabel:"Follows Desktop",unsetMark:g(RP,{label:e.label,desktopKey:e.desktopKey,fallback:e.fallback,unit:e.unit}),restTrack:t=>g(AP,{...t,desktopKey:e.desktopKey,fallback:e.fallback})})}var NP={Top:"Padding top",Bottom:"Padding bottom",Left:"Padding left",Right:"Padding right"},LP={Top:gl,Bottom:Dh,Left:Fh,Right:Bh},DP=e=>{let t=LP[e];return g(t,{})};function s4(e={}){let t=e.keys?.top??"sectionPaddingTop",n=e.keys?.bottom??"sectionPaddingBottom",o=e.group!==!1,a=T=>NP[T],s=T=>Fe(a("Top"),g(gl,{}),fe.min,fe.max,fe.step,T,"px"),r=(T,S,E,x=fe)=>ee("mobile",IP({label:a(T),icon:DP(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",f=e.sideBounds??fe,p=e.side??f.min,m=e.sidePhone??p,b=e.phone===!0,y=T=>b?ee("desktop",T):T;return no({...o?{_gSpacing:_e("Padding")}:{},[t]:y(s(i)),...b?{[at(t)]:r("Top",t,i)}:{},...e.only==="top"?{}:{[n]:y(Fe(a("Bottom"),g(Dh,{}),fe.min,fe.max,fe.step,l,"px")),...b?{[at(n)]:r("Bottom",n,l)}:{}},...e.sides?{[u]:y(Fe(a("Left"),g(Fh,{}),f.min,f.max,f.step,p,"px")),...b?{[at(u)]:r("Left",u,m,f)}:{},[d]:y(Fe(a("Right"),g(Bh,{}),f.min,f.max,f.step,p,"px")),...b?{[at(d)]:r("Right",d,m,f)}:{}}:{}})}function r4(e,t){let n=Object.fromEntries(Object.entries(t).map(([s,r])=>[s,s in e&&Ah(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 ja="Width";function i4(e,t=ch,n=!0){let o=t.map(a=>({label:Rt[a],value:a}));return no({...n?{_gWidth:_e(ja)}:{},widthMode:{type:"custom",render:({onChange:a,field:s})=>g(K,{label:c(ja),icon:g(lO,{}),action:n?g(jO,{inherited:s?.inherited??!1,onReset:()=>a(nl),label:ja}):void 0,children:qn({options:o,value:s?.currentValue||e,onChange:a,ariaLabel:ja})})}})}function l4({fill:e=!1}={}){let t=(a,s)=>({type:"custom",render:({value:r,onChange:i})=>g(FP,{value:r,onChange:i,view:a,badge:s,fill:e})}),n=()=>fl("sectionHeightMode"),o=()=>fl("sectionHeightMode");return no({_gHeight:_e(Vt),...Ge("sectionHeightMode",a=>a==="desktop"?t(a):t(a,s=>g(UP,{view:a,onClear:()=>s(void 0)}))),...Ge("sectionHeightValue",n),...Ge("sectionHeightUnit",o)})}function FP({value:e,onChange:t,view:n,badge:o,fill:a=!1}){let s=Z(),{mode:r,number:i,unit:l}=BP(n,s,e);return g(K,{label:Vt,icon:Nt(g(Xa,{})),action:o?o(t):void 0,children:ze("div",{className:"es-width-stack",children:[qn({options:[{label:"Auto",value:"auto"},{label:"Fixed",value:"fixed"},{label:"Screen",value:"screen"},...a?[{label:"Fill",value:"fill"}]:[]],value:r,onChange:t,ariaLabel:Vt}),i?g(MP,{view:n,mode:r,menu:l}):null]})})}function eg(e,t){return e==="phone"&&To(t)?cu(t):iu(t)}function es(e,t){return e==="desktop"||(e==="tablet"?To(t):lu(t))?null:eg(e,t)}function BP(e,t,n){let o=(a=>ou.includes(a))(n)?n:es(e,t)?.mode??"auto";return{mode:o,number:o!=="auto"&&o!=="fill",unit:o==="fixed"}}function HP(e,t,n,o){let a=es(e,t);return!a||e==="desktop"?null:o===void 0?{}:{[U("sectionHeightMode",e)]:a.mode,...a.mode==="fixed"?{[U("sectionHeightUnit",e)]:a.unit}:{},...n==="sectionHeightUnit"?{[U("sectionHeightValue",e)]:a.value}:{},[U(n,e)]:o}}function vh(e,t,n){let o=It(),a=es(e,Z());return!o||!a?{followed:null,write:n}:{followed:a,write:s=>o.onChangeMany(r=>{let i=HP(e,r,t,s);return i===null?{[U(t,e)]:s}:Object.keys(i).length?i:null})}}function MP({view:e,mode:t,menu:n}){let o=It(),a=Z(),s=U("sectionHeightValue",e),r=U("sectionHeightUnit",e),i=T=>S=>o?.onChangeMany(()=>({[T]:S})),{followed:l,write:u}=vh(e,"sectionHeightValue",i(s)),{write:d}=vh(e,"sectionHeightUnit",i(r)),f=t==="screen"?"%":a[r],p=HC(au,"px",l?l.unit:f),m=p==="%"?ru:su,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:p,...y?{units:y}:{},ariaLabel:Vt,onChange:u})}function UP({view:e,onClear:t}){let n=Z(),o=es(e,n)===null,a=e==="phone"&&To(n),s=eg(e,n),r=Lt(i=>c(i),s.mode==="auto"?c("Auto"):`${s.value}${s.unit}`,a?"tablet":"desktop");return g(ne,{words:P()?.panel,label:c(Vt),changed:o,detail:r,onReset:t})}function c4(e={}){let t=e.intro===!0,n=s=>({type:"custom",render:({value:r,onChange:i,id:l,name:u})=>g(VP,{value:r,onChange:i,labelId:`${l??u??"stickTop"}-label`,view:s,intro:t})}),o=s=>({type:"custom",render:({value:r,onChange:i})=>g(WP,{value:r,onChange:i,view:s,intro:t})}),a=s=>({type:"custom",render:({value:r,onChange:i})=>g(KP,{value:r,onChange:i,view:s,intro:t})});return{_gStick:_e(Wm,{dot:t?zP:Wi}),...Ge("stickTop",n),...Ge("stickTopDistance",o),...Zn(Kn,"stickTopDistance",{tablet:!0,phone:!0}),...e.screens?Ge(jn,a):{},...t?{}:{[Gi]:GP()},...t||e.above===!1?{}:{[zi]:$P()}}}function GP(){let e=ie(Km,g(gl,{}),jm,Vm);return ee("desktop",{...e,render:t=>{let n=e.render({...t,value:$i(t.value),onChange:o=>t.onChange(Xm(o))});return hl(n,{hint:c(Ym)})}})}function $P(){let e=rt(qm,!1,g(Hh,{}),Zm);return ee("desktop",{...e,render:t=>e.render({...t,onChange:n=>t.onChange(n===!0?!0:void 0)})})}var zP={any:[Wi,Jm]};function tg(e,t,n,o,a){let s=It(),r=Z(),i=e==="desktop"||to(e,r)?null:vl(e,un(r,{intro:o}));return{followed:i,write:(i||a)&&s?l=>s.onChangeMany(u=>{let d=jP(e,u,l,t,o),f=d===null?{[U(t,e)]:l}:d;return Object.keys(f).length?{...f,...a?.(l)??{}}:null}):n}}function WP({value:e,onChange:t,view:n,intro:o}){let a=Z(),s=un(a,{intro:o}),r=d=>{let f=_o(d);return f==="desktop"||to(f,a)},i=Qa({row:Kn,label:"Distance from top",grid:{min:ye.min,max:ye.max,step:ye.step},valueKey:"stickTopDistance",view:n,numbersIn:d=>r(d)&&O(a[_l("stickTopDistance",d)])!==void 0,followsView:n==="phone"&&s.ownTablet?"tablet":"desktop"}),{followed:l,write:u}=tg(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??ye.min,max:i?.grid.max??ye.max,step:i?.grid.step??ye.step,value:l?null:typeof e=="number"?e:ye.fallback,...l?{placeholder:l.distance}:{},...i?{suffix:i.unit,units:i.units}:{suffix:"px"},ariaLabel:c("Distance from top"),onChange:u})})}function KP({value:e,onChange:t,view:n,intro:o}){let{followed:a,write:s}=tg(n,jn,t,o);return g(K,{label:c(Ui),icon:Nt(g(Xa,{})),children:de({min:Wa.min,max:Wa.max,step:Wa.step,value:a?null:O(e)??Wa.default,...a?{placeholder:a.screens}:{},ariaLabel:c(Ui),onChange:s})})}function to(e,t){return e==="tablet"?Ki(t):ji(t)}function vl(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 jP(e,t,n,o="stickTopDistance",a=!1){if(e==="desktop"||to(e,t))return null;if(n===void 0)return{};let s=vl(e,un(t,{intro:a})),r=e==="phone"&&to("tablet",t)?d=>U(d,"tablet"):d=>d,i=(d,f)=>t[r(d)]==null?{}:{[U(d,e)]:f},l=Kn.unitKey,u=t[r(l)]==null?{}:{[U(l,e)]:s.unit};return{[U("stickTop",e)]:!0,...i("stickTopDistance",s.distance),...u,...i(jn,s.screens),[U(o,e)]:n}}function VP({value:e,onChange:t,labelId:n,view:o,intro:a}){let s=Z(),r=un(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:vl(o,r),d=u?.on?M(u.distance,u.unit):c("Off");return g(K,{label:c(Mi),labelId:n,icon:Nt(g(Hh,{})),action:ze(Ke,{children:[o!=="desktop"?g(ne,{words:P()?.panel,label:c(Mi),changed:to(o,s),detail:Lt(f=>c(f),d,l?"tablet":"desktop"),onReset:()=>t(void 0)}):null,g(bl,{checked:i,onChange:t,ariaLabelledBy:n})]})})}var wh="e.g. about";function u4(){return{_gAnchor:_e("Anchor"),anchor:Bt({control:"plainText",label:"Name",placeholder:wh},{type:"custom",render:({value:e,onChange:t})=>g(df,{value:e,onChange:t,nameBox:(n,o)=>g(Ft,{value:n,onChange:o,label:"Name",placeholder:wh,hideable:!1,markup:!1})})})}}function d4(){return{_gAdvanced:_e("Advanced"),[qc]:wl}}var wl={type:"custom",render:({value:e,onChange:t})=>g(K,{label:c("Custom CSS"),icon:Nt(g(bO,{})),children:g(OO,{"aria-label":c("Custom CSS"),spellCheck:!1,autoGrow:!0,className:"font-mono",value:typeof e=="string"?e:"",onChange:n=>t(n.target.value)})})};function p4(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(TO,{id:i,value:Number.isFinite(l)?new Date(l):null,onChange:u=>a(u?u.toISOString():"")})})}}}function rt(e,t,n,o){return{type:"custom",...st({},{...qa,label:e}),render:a=>{let{value:s,onChange:r,id:i,name:l}=a,u="follows"in a,d=a,f=typeof s=="boolean",p=typeof d.follows=="boolean"?d.follows:t,m=f?s:u?p:t,b=`${i??l??e}-label`,y=d.readOnly===!0,T=g(bl,{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?ze(Ke,{children:[g(ne,{words:P()?.panel,label:c(e),changed:f,detail:d.followsNoView?c(p?"On":"Off"):Lt(S=>c(S),c(p?"On":"Off"),d.followsView),disabled:y,onReset:()=>r(void 0)}),T]}):T})}}}function ng(){return{type:"custom",render:({value:e,onChange:t,id:n,name:o})=>{let a=`${String(n??o??"pageBackground")}-colour`;return g(YP,{label:"Background",icon:g(aO,{}),id:a,value:e,shown:Jr(e),onChange:t})}}}function f4(e,t,n){return{type:"custom",render:({value:o,onChange:a})=>g(be,{label:c(e),icon:n,value:o||t,onChange:a})}}function YP({label:e,icon:t,id:n,value:o,shown:a,onChange:s}){let{colors:r,n:i}=Ol(),l=Ae(o),u=l?Yt(l,r,i):null;return g(be,{label:c(e),icon:t,id:n,value:u?u.hex:a,caption:u?.words,onChange:s,choices:Cl(l??"",r,i,s)})}function m4(){return{type:"custom",render:e=>{let{value:t,onChange:n}=e,o=e;return g(XP,{value:typeof t=="string"?t:"",onChange:n,twin:"follows"in e?{follows:o.follows,view:o.followsView}:void 0})}}}function Cl(e,t,n,o){let a=fa(e);return Su(t,n).map(s=>({label:s.label,color:s.value,selected:a===s.name,onPick:()=>o(s.name)}))}function XP({value:e,onChange:t,twin:n}){let{colors:o,n:a}=Ol(),s=o.background,r=Dt(s.toUpperCase(),c("Theme {n} background",{n:a})),[i,l]=Oe(yf),[u]=Oe(ti),d=typeof u=="string"&&u.trim()!=="",f=da(i),p=v=>l(da(v)||void 0),m=fa(e),b=m?Yt(m,o,a):null,y=Cl(e,o,a,t),T=n?()=>t(void 0):()=>t(""),S=s,E=r;if(n){let v=fa(n.follows),C=pa(n.follows),H=v?Yt(v,o,a):C?{hex:C,words:C.toUpperCase()}:null;S=H?.hex??s,E=Lt(w=>c(w),H?H.words:r,n.view)}let x=!n&&(Hn(e)||d)?g(qP,{value:f,onChange:p}):null;return b?g(be,{label:c("Fill"),icon:g(pl,{}),value:b.hex,caption:b.words,onChange:t,changed:!0,onReset:T,resetTo:E,choices:y,children:x}):g(Cn,{label:c("Fill"),icon:g(pl,{}),value:e,inherited:S,resetTo:E,onChange:t,onReset:T,choices:y,children:x})}function qP({value:e,onChange:t}){return qn({options:ua.map(n=>({label:n.label,value:n.value,hint:n.hint})),value:e,onChange:t,ariaLabel:c("Fill")})}function ZP(e,t,n){if((e?.content??[]).some(s=>s?.props?.id===t))return mt(n);let o=_f(e,t);if(o.length===0)return null;let a=mt(Ls(n));if(a!==null)return a;for(let s=o.length-1;s>0;s-=1){let r=mt(Ls(o[s].sectionAccent));if(r!==null)return r}return mt(o[0].sectionAccent)}function Ol(){let e=Pe(D().theme),[t]=Oe("sectionAccent"),n=null;try{let{appState:a,selectedItem:s}=Za(i=>i),r=s?.props?.id?String(s.props.id):void 0;n=r?ZP(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 h4(){return Vh()}var g4={top:g(QC,{}),right:g(JC,{}),bottom:g(qC,{}),left:g(ZC,{})};function b4(e,t,n,o,a,s,r){let i=f=>t.find(p=>p.value===f),l=f=>({value:f,label:"",disabled:!0,title:o}),u=f=>{let p=t.find(b=>b.cell===f);if(!p)return l(`missing-${f}`);let m=s?.[f];return m?{value:p.value,label:p.label,icon:m}:{value:p.value,label:p.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:f,onChange:p})=>{let m=t.some(b=>b.value===f)?f:n;return g(K,{label:c(e),icon:a,value:i(m)?.label?c(i(m).label):r?c(r):"",children:BO(c,{label:e,value:m,onChange:p,points:d})})}}}function y4(e,t,n){return{type:"custom",options:t,render:({value:o,onChange:a,field:s})=>g(zf,{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 JP={image:"Image",video:"Video"},S4=xr.map(e=>({label:JP[e],value:e}));function _4(e,t,n){let o=Object.keys(wr).map(a=>({label:wr[a],value:a,picture:n[a]}));return{type:"custom",...st({},{type:"radio",label:e,options:o.map(a=>({value:a.value,label:a.label}))}),render:({onChange:a})=>g(ek,{label:e,icon:t,options:o,onChange:a})}}function QP(e,t,n){let o=rp(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=sp(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 ek({label:e,icon:t,options:n,onChange:o}){let a=It(),s=a?.values??{},r=Rn(s),i=Oh(MC),l=yp(i?.docId??null),u=null;try{u=Za(f=>f.appState.data)}catch{u=null}let d=_p(a?.id,u,l);return g(K,{label:c(e),icon:Nt(t),hint:QP(s,d,i?.hasUnsavedEdits??!1),children:qn({options:n,value:r,onChange:o,ariaLabel:e})})}function T4(e,t,n,o={}){let a={type:"custom",[zC]:!0,render:({value:s,onChange:r,name:i})=>g(Gf,{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 E4={HeroSingle:[ep.image],HeroSlide:["videoFrame","videoFramePhone"],ContactLocations:["locations[].photo"],ProcessSteps:["steps[].image"]};function tk(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 ag({value:e,onChange:t,label:n}){let o=e||{},a=It(),s=a?a.values!==a.node.props:!0,r=!!o.pending&&s,i=!!o.pending&&!s,l=!!Ee(DO()).geocode,u=Ph(),d=(f,p)=>t({...o,[f]:p??void 0});return ze(Ke,{children:[g(K,{label:c(n),icon:g(bh,{}),action:l?g(yl,{content:c("Find from the address (OpenStreetMap)"),children:g(Gh,{"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(sO,{})})}):void 0,children:l&&o.status?g(ca,{compact:!0,oneLine:!0,spaced:!1,status:r?"busy":o.ok&&!i?"found":"notfound",statusText:r?c("Finding\u2026"):i?c(si):c(o.status),hint:tk(o)}):null}),g(K,{label:c("Enter by hand"),labelId:u,icon:g(eO,{}),action:g(bl,{checked:!!o.manual,onChange:f=>t({...o,manual:f}),ariaLabelledBy:u})}),o.manual&&g(K,{label:c("Latitude, longitude"),icon:g(bh,{}),children:ze("div",{style:{display:"grid",gridTemplateColumns:"1fr 1fr",gap:8,width:"100%",minWidth:0},children:[g(Sh,{value:typeof o.lat=="number"?o.lat:null,onChange:f=>d("lat",f),min:-90,max:90,step:1e-4,placeholder:c("Latitude")}),g(Sh,{value:typeof o.lng=="number"?o.lng:null,onChange:f=>d("lng",f),min:-180,max:180,step:1e-4,placeholder:c("Longitude")})]})})]})}function nk(e,t){return t===null||t<0||t>=e.length?"":e[t]?.text??""}function ok(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 ak(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 x4={label:"Ticker items",icon:g(oO,{})};function v4(e,t,n,o){return{type:"custom",[We]:{control:"textList",label:e,placeholder:n,itemKey:"text",rendering:o},...st({},{...Kh.textList,label:e}),render:({value:a,onChange:s})=>g(sk,{label:e,icon:Nt(t),items:Array.isArray(a)?a:[],placeholder:n,onChange:s,markup:o==="markup"})}}function sk({label:e,icon:t,items:n,placeholder:o,onChange:a,markup:s=!1}){let r=Jn(null),[i,l]=Qn(null),u=f=>f.map(p=>({text:p?.text??""})),d=f=>{let p=ak(n,f,i);p===null&&(r.current=null),l(p),a(u(f))};return g(gO,{label:c(e),icon:t,noun:c("item"),items:n,onChange:d,newItem:()=>({text:""}),open:null,onOpen:()=>{},renderItem:()=>null,above:s?g(ri,{target:r,value:nk(n,i),onChange:f=>a(ok(n,i??-1,f)),disabled:i===null,label:i===null?c("Formatting \u2014 click a row first"):c("Formatting \u2014 row {n}",{n:i+1})}):void 0,renderRow:(f,p,m)=>g("input",{type:"text",className:s&&i===p?"sf-list-marking":void 0,value:f?.text??"",placeholder:c(o),"aria-label":c("{label} {n}",{label:c(e),n:p+1}),onChange:b=>m({text:b.target.value}),onFocus:b=>{r.current=b.currentTarget,l(p)}})})}function w4(e,t){let n=`${e.label} \u2014 row ${t+1}`;return Bt({control:"plainText",label:n,placeholder:e.placeholder,offPage:e.offPage},{type:"custom",render:({value:o,onChange:a})=>g(Ft,{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 C4(e){return{_gCards:_e("Cards"),coverIndex:ie("Cover image",g(nO,{}),Mf,String(1),e?.coverHint??"A card's opening picture \u2014 a card pinned to a finish keeps its own."),imageBackground:oP("Image background",Ha),cardImage:sg()}}function O4(){return{outline:ie("Card outline",g(rO,{}),Hf,Bf),indexBadge:ie("Card number",g(Lh,{}),ci,li),showBadge:rt("Product badge",!0,g(Zr,{noun:"tag"}))}}function P4(e){let t=e?.defaults??{showCardSizes:!0,showCardBuy:!0,showCardPage:!0},n=a=>({...qa,label:Va.find(s=>s.id===a).label}),o=a=>st(fl(dl),n(a));return{_gShowOnCard:_e("Show on a card"),[dl]:st({type:"custom",render:()=>g(rk,{rest:{showCardPrice:!0,showCardFinishes:!0,...t}})},n(dl)),showCardFinishes:o("showCardFinishes"),showCardSizes:o("showCardSizes"),showCardBuy:o("showCardBuy"),showCardPage:o("showCardPage")}}var dl="showCardPrice",Va=[{id:"showCardPrice",label:"Price"},{id:"showCardFinishes",label:"Finish swatches"},{id:"showCardSizes",label:"Sizes"},{id:"showCardBuy",label:"Buy button"},{id:"showCardPage",label:"Page button"}];function rk({rest:e}){let t=Z(),n=rn(),o=r=>typeof t[r]=="boolean"?t[r]:void 0,a=r=>o(r)??e[r],s=Va.some(({id:r})=>o(r)!==void 0&&o(r)!==e[r]);return g(Pl,{parts:Va,changed:s,shown:a,onPress:(r,i)=>n({[r]:i}),onReset:()=>n(Object.fromEntries(Va.map(({id:r})=>[r,void 0])))})}function k4(e,t="display"){let n=at(t);return{[t]:ee("desktop",{type:"custom",render:({value:o,onChange:a})=>g(Pl,{parts:e,changed:wf(o),shown:s=>ha(o,s),onPress:(s,r)=>a(Of(o,s,r)),onReset:()=>a(void 0)})}),[n]:ee("mobile",{type:"custom",render:({value:o,onChange:a})=>g(ik,{parts:e,desktopKey:t,value:o,onChange:a})})}}function Pl({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(jC,{}),changed:t,action:g(ne,{words:P()?.panel,label:i,changed:t,detail:s,onReset:a}),children:g(yO,{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 ik({parts:e,desktopKey:t,value:n,onChange:o}){let a=Z()[t];return g(Pl,{parts:e,changed:Cf(n),shown:s=>ai(a,n,s),onPress:(s,r)=>o(Pf(n,s,r)),onReset:()=>o(Sa),detail:c("the same as Desktop")})}function sg(e=Mp){return Fe("Card image",g(Ih,{}),oe,Ye,Hp,oe,e,{clear:{hint:oe},hint:"Rounds the picture. The card's own corner is in Styles."})}function lk(){return Zn($r,"cardImage")}function A4(){return{cardImage:sg($r),...lk()}}function R4(){return xl({sidesKey:"cornerSides",row:Up,step:Gp,useFollowed:()=>oe,mark:g(ck,{label:$p}),hint:c("Rounds the picture. Left alone it stays square.")})}function ck({label:e,changed:t=!1,onReset:n=()=>{}}){return g(ne,{words:P()?.panel,label:c(e),changed:t,onReset:n})}function I4(){return{type:"custom",render:({value:e,onChange:t})=>g(fk,{value:typeof e=="string"?e:"",onChange:t})}}var Ch="own";function N4(){let e=[{value:Ch,label:"Layout's own",picture:il(Array.from({length:8},()=>[3,1]))},...Object.entries(oa).map(([t,n])=>({value:t,label:n.label,picture:il([...n.phone,...n.phone])}))];return ee("mobile",sl("Layout",g(Nh,{}),e,Ch,{columns:2,cell:hh}))}function uk({layout:e,width:t}){let n=jr(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:Xp(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 dk={width:"3.5rem",height:"2.5rem",words:!1},pk=200;function fk({value:e,onChange:t}){let[n,o]=Qn(null),[a,s]=Qn(4),r=Jn(null);BC(()=>{let m=r.current;if(!m||typeof ResizeObserver!="function")return;let b=()=>s(m.getBoundingClientRect().width>=pk?4:3);b();let y=new ResizeObserver(b);return y.observe(m),()=>y.disconnect()},[]);let i=e?j(Fn,e):void 0,l=i?e:"",u=Wr(n,l),d=Wr(n,"").length,f=Qp("no-symbol"),p=[{value:"",label:c("Not chosen"),icon:fh(f,c("Not chosen"))},...u.map(m=>({value:m,label:c(Fn[m].label),icon:g(uk,{layout:Fn[m],width:40})}))];return g(K,{label:c("Layout"),icon:g(Nh,{}),value:i?c(i.label):void 0,children:g("div",{ref:r,style:{flex:"1 1 auto",minWidth:0},children:g(Mh,{label:c("Layout"),value:l,options:p,onChange:t,columns:a,cell:dk,header:ze("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(dO,{options:[{id:"all",label:c("All")},...jp.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:zr.length})})]})})})})}var bk="Applies to panels, cards, inputs and buttons. Round things \u2014 color swatches, switches, status dots \u2014 stay round.",kl="Corners";function rg({value:e,onChange:t,length:n}){let o=e===null;return ts(hk,{label:c(kl),icon:ts(gk,{}),changed:!o,action:ts(mk,{words:P()?.panel,label:c(kl),changed:!o,detail:c("the built-in corners"),onReset:()=>t(null)}),hint:c(bk),children:ts(de,{min:n?.grid.min??oe,max:n?.grid.max??Ye,step:n?.grid.step??1,value:e,...e===null?{}:{suffix:n?.unit??"px",...n?{units:n.units}:{}},placeholder:oe,placeholderWord:"Auto",onClear:()=>t(null),ariaLabel:c(kl),onChange:t})})}import{jsx as oo}from"react/jsx-runtime";import{SettingsDefaultReset as yk,SettingsField as Sk}from"efficient-easel/panel";import{IconPicker as _k}from"efficient-shell/ui";import{ShadowIcon as Tk}from"efficient-easel/icons";import{SHADOW_PREVIEW as Ek}from"efficient-easel/screen/lib/document/shadow-values";var Al={none:"None",soft:"Soft",lifted:"Lifted"},xk="Applies to cards \u2014 products, brands, journal entries and filter cells. Round things like swatches and status dots are never shadowed.";function ig({value:e,onChange:t}){let n=e===null,o=e??Is;return oo(Sk,{label:c("Card shadow"),icon:oo(Tk,{}),value:c(Al[o]),changed:!n,action:oo(yk,{words:P()?.panel,label:c("Card shadow"),changed:!n,detail:c(Al[Is]),onReset:()=>t(null)}),hint:c(xk),children:oo(_k,{label:c("Card shadow"),value:o,options:$c.map(a=>({value:a,label:c(Al[a]),icon:oo("span",{className:"sf-shadow-chip border border-line bg-surface",style:{boxShadow:Ek[a]}})})),onChange:t})})}import{jsx as lg}from"react/jsx-runtime";import{ShadowIcon as vk}from"efficient-easel/icons";import{DEFAULT_SHADOW_COLOR as cg}from"efficient-easel/screen/lib/document/shadow-values";var wk="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 ug({value:e,onChange:t}){let n=e===null;return lg(Cn,{label:c("Shadow color"),icon:lg(vk,{}),value:e??"",inherited:cg,resetTo:cg,onChange:t,onReset:()=>t(null),hint:c(wk)})}import{jsx as os}from"react/jsx-runtime";import{SettingsDefaultReset as Ck,SettingsField as Ok}from"efficient-easel/panel";import{AlignSeparateIcon as Pk}from"efficient-easel/icons";function ns(e,t){return e==="tablet"?null:e==="mobile"?t.phone:t.desktop}var kk="The space between the blocks inside a row, a grid or a box. Auto means each one keeps the spacing it already has.",Ak="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.",Rl="Block gap",dg=Xt.Grid;function pg(e,t){return ns(e,{desktop:{key:"block_gap",value:t.gap,followsPx:null},phone:{key:"block_gap_phone",value:t.phone,followsPx:t.gap===null?null:Hs(t.gap)}})}function fg({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?vn(n)??dg:n;return os(Ok,{label:c(Rl),labelId:"sf-block-gap",icon:os(Pk,{}),changed:!s,action:os(Ck,{words:P()?.panel,label:c(Rl),changed:!s,detail:r??c("each block's own spacing"),onReset:()=>t(null)}),hint:c(r===null?kk:Ak),children:os(de,{min:(o?.grid??ge).min,max:(o?.grid??ge).max,step:(o?.grid??ge).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(Rl),onChange:t})})}import{jsx as as}from"react/jsx-runtime";import{SettingsDefaultReset as Rk,SettingsField as Ik,SettingsSegmented as Nk}from"efficient-easel/panel";import{HoverIcon as Lk}from"efficient-easel/icons";var Il={none:bs.none,lift:bs.lift,highlight:pc},Dk="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 mg({value:e,onChange:t}){let n=e===null,o=e??Ns;return as(Ik,{label:c("Hover effect"),icon:as(Lk,{}),value:c(Il[o]),changed:!n,action:as(Rk,{words:P()?.panel,label:c("Hover effect"),changed:!n,detail:c(Il[Ns]),onReset:()=>t(null)}),hint:c(Dk),children:as(Nk,{options:zc.map(a=>({id:a,label:c(Il[a])})),value:o,ariaLabel:c("Hover effect"),onChange:t})})}import{jsx as ss}from"react/jsx-runtime";import{SettingsDefaultReset as Fk,SettingsField as Bk,SettingsSegmented as Hk}from"efficient-easel/panel";import{DropIcon as Mk}from"efficient-easel/icons";var Nl="Photography",hg={shot:"As shot",mono:"Black and white"},Ll=[{grayscale:!1,label:hg.shot},{grayscale:!0,label:hg.mono}],Uk="Black and white photographs return to color on hover. Wheels and tyres keep their real finish either way.";function gg({value:e,onChange:t}){let n=e===null,o=e??!1;return ss(Bk,{label:c(Nl),icon:ss(Mk,{}),value:c(Ll.find(a=>a.grayscale===o).label),changed:!n,action:ss(Fk,{words:P()?.panel,label:c(Nl),changed:!n,detail:c(Ll.find(a=>!a.grayscale).label),onReset:()=>t(null)}),hint:c(Uk),children:ss(Hk,{options:Ll.map(a=>({id:a.grayscale,label:c(a.label)})),value:o,ariaLabel:c(Nl),onChange:t})})}import{jsx as Dl}from"react/jsx-runtime";import{useId as Gk}from"react";import{SettingsField as $k,SettingsSwitch as zk}from"efficient-easel/panel";import{ShareIcon as Wk}from"efficient-easel/icons";var Kk="Share button",jk="On every blog post.";function bg({value:e,onChange:t}){let n=Gk();return Dl($k,{label:c(Kk),labelId:n,icon:Dl(Wk,{}),action:Dl(zk,{checked:e===!0,onChange:t,ariaLabelledBy:n}),hint:c(jk)})}import{usePreviewDevice as Jl}from"efficient-easel/draw/client";import{jsx as rs}from"react/jsx-runtime";import{SettingsDefaultReset as Vk,SettingsField as Yk}from"efficient-easel/panel";import{PaddingXIcon as Xk}from"efficient-easel/icons";var Fl="Side space",yg=re.default,qk="The room left at the left and right edge of every page.";function Sg(e,t){return ns(e,{desktop:{key:"site_gutter",value:t.gutter,unsetPx:yg,bounds:re},phone:{key:"site_gutter_phone",value:t.phone,unsetPx:wm(t.gutter,t.gutterUnit),bounds:De}})}function _g({value:e,onChange:t,unsetPx:n=yg,bounds:o=re,length:a,restsOn:s=n}){let r=e===null;return rs(Yk,{label:c(Fl),labelId:"sf-side-space",icon:rs(Xk,{}),changed:!r,action:rs(Vk,{words:P()?.panel,label:c(Fl),changed:!r,detail:`${n}px`,onReset:()=>t(null)}),hint:c(qk),children:rs(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(Fl),onChange:t})})}import{jsx as Bl}from"react/jsx-runtime";import{BACKGROUND_WIDTHS as MK,SettingsBackgroundWidth as Zk,SettingsContentWidth as Jk}from"efficient-easel/panel";var Qk="Background width",eA="Content width";var is=e=>c(Rt[e==="content"?"page":"full"]),Tg="The width of every section's background.",Eg="The width of every section's content.";function xg({value:e,changed:t,detail:n,onChange:o,onReset:a,hint:s,labelId:r}){return Bl(Zk,{value:e,changed:t,detail:n,onChange:o,onReset:a,hint:s?c(s):void 0,labelId:r,words:{label:c(Qk),full:is("full"),content:is("content")},resetWords:P()?.panel})}function vg({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:f,length:p}){let m=c(eA),b=p?.grid.min??o,y=p?.grid.max??n,T=e!=="full"?Bl(de,{min:b,max:y,step:p?.grid.step??V.step,value:Math.min(Math.max(t,b),y),onChange:l,...p?{suffix:p.unit,units:p.units}:{suffix:"px"},ariaLabel:m}):null;return Bl(Jk,{mode:e,onMode:i,number:T,changed:a,detail:s,fullClosed:r,onReset:u,hint:d?c(d):void 0,labelId:f,words:{label:m,full:is("full"),content:is("content")},resetWords:P()?.panel})}import{jsx as wg}from"react/jsx-runtime";import{TextStyleItem as tA,TextStylesGroup as nA}from"efficient-easel/text-styles";var Cg=["font","size","weight","emphasis"],oA=500;function aA({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 sA(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 Og(e){let{headingWeight:t,open:n,onOpenChange:o,onChange:a,withoutSize:s=!1}=e,r=aA(e);return wg(nA,{label:c("Emphasis"),children:wg(tA,{style:r,fonts:Er,settings:s?Cg.filter(i=>i!=="size"):Cg,auto:["size"],fallback:()=>({weight:t??oA}),open:n,onOpenChange:o,onChange:i=>sA(r,i).forEach(a)})})}import{viewKeyAt as Ig}from"efficient-easel/draw";import{shownUnitAt as dA,unitKeyOnWrite as pA}from"efficient-easel/screen/lib/content/length-units";import{convertRowLength as rA,rowUnits as iA,unitPickPatch as lA}from"efficient-easel/screen/lib/content/length-units";import{viewKeyAt as cA}from"efficient-easel/draw";var uA=["cornerRadius","siteWidth","siteGutter","siteGutterPhone","blockGap","blockGapPhone"],ls={cornerRadius:{number:"corner_radius_px",kind:"radius",grid:Uc,tier:"desktop"},siteWidth:{number:"site_width",kind:"size",grid:V,tier:"desktop"},siteGutter:{number:"site_gutter",kind:"spacing",grid:re,tier:"desktop"},siteGutterPhone:{number:"site_gutter_phone",kind:"spacing",grid:De,tier:"mobile"},blockGap:{number:"block_gap",kind:"gap",grid:ge,tier:"desktop"},blockGapPhone:{number:"block_gap_phone",kind:"gap",grid:ge,tier:"mobile"}};function cs(e){return{number:ls[e].number,unit:Ac[`${e}Unit`]}}function Pg(e,t,n){let o=L(n),{number:a,unit:s}=cs(e);return{[a]:t,[s]:t===null||o==="px"?null:o}}function us(e,t,n,o){let{kind:a,grid:s,tier:r}=ls[e],i=L(n),l=L(o),u=s.typedMax,d=u!==void 0&&l==="px"?{...s,max:u}:s;return i===l?t:rA(t,i,l,r,{kind:a},d)}function kg(e,t,n,o){let{number:a,unit:s}=cs(e),r=lA({[a]:t},i=>us(e,i,n,o),s,L(o),"px");return{[a]:r[a],[s]:r[s]??null}}function Ag(e,t){let{kind:n,grid:o}=ls[e];return Pc(n,L(t),o)}function Rg(e){return iA({kind:ls[e].kind},Xn)}function Hl(e,t){let n=cA(e,t);if(!uA.includes(n))throw new Error(`no site length row ${n}`);return n}function ao(e,t,n,o,a){let{siteLengthUnits:s,setSiteLengthUnits:r}=D(),i=`${e}Unit`,l=s[i],u=dA({n:a?.figure??null,u:a?.unit??null,[Ig("n","mobile")]:t,[Ig("u","mobile")]:l??null},{n:"n"},"u","mobile"),d=b=>r({[i]:b==="px"?null:b}),f=b=>{n(b);let y=pA(i,l,u,"px",b===null);i in y&&d(y[i]==null?null:L(y[i])),o(Pg(e,b,u),b===null)},p=b=>{let y=L(b);if(y===u||(d(y),t===null))return;let T=kg(e,t,u,y);n(T[cs(e).number]),o(T,!0)},m=a?a.unit===u?a.figure:us(e,a.figure,a.unit,u):null;return{length:{unit:u,grid:Ag(e,u),units:{options:Rg(e),onChange:p,label:c("Unit")}},write:f,rest:m,shown:b=>us(e,b,"px",u)}}import{EmptyState as bR,SliderGroup as yR,Tabs as SR,Tooltip as AV,tabButtonId as _R,tabPanelId as TR}from"efficient-shell/ui";import{ContrastIcon as ER,SettingsIcon as xR,TypeIcon as vR}from"efficient-easel/icons";function Ng(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 fs}from"react/jsx-runtime";import{ListIcon as tR,PaddingTopIcon as nR,PaddingXIcon as oR}from"efficient-easel/icons";import{jsx as ds}from"react/jsx-runtime";import{SettingsDefaultReset as fA,SettingsField as mA,SettingsSegmented as hA}from"efficient-easel/panel";import{WidthIcon as gA}from"efficient-easel/icons";function Lg({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 ds(mA,{label:u,labelId:a,icon:ds(gA,{}),value:i?s:void 0,changed:!i,action:ds(fA,{words:P()?.panel,label:u,changed:!i,onReset:()=>n(void 0)}),hint:r,children:ds(hA,{options:[{label:c(Rt.full),id:"full"},{label:c(Rt.page),id:"content"}],value:l,ariaLabel:u,onChange:n})})}var bA=["tall","square","wide"],yA="tall";function _j(e){return bA.includes(String(e??""))?String(e):yA}var Tj={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"},Ej=[{photo:"",group:"",groupName:"",name:"City name",state:"State",country:"Country",timezone:"GMT \xB7 UTC +0",address:`Address line one
5
- 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
6
- Address line two`,phone:"+00 000 0000",hours:"Mon\u2013Fri 9:00\u201318:00",lat:0,lng:0,mapsUrl:""}],SA=/^https?:\/\//i;function xj(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:vs(e.lat),lng:vs(e.lng),mapsUrl:SA.test(t)?t:""}}function Dg(e){let t=String(e??"").split(" \xB7 ");return{state:(t[0]??"").trim(),country:(t[1]??"").trim()}}var vj="other",wj={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 bn="siteOffices",gn=e=>typeof e=="string"?e:"",Fg=e=>O(e)??0;function _A(e){if(!e||typeof e!="object"||Array.isArray(e))return null;let t=e;return{role:gn(t.role),city:gn(t.city),country:gn(t.country),address:gn(t.address),phone:gn(t.phone),group:gn(t.group),hq:t.hq===!0,lat:Fg(t.lat),lng:Fg(t.lng)}}function Aj(e){let t=e&&typeof e=="object"?e[bn]:void 0;return Array.isArray(t)?t.map(_A).filter(n=>n!==null):[]}function Rj(e){let{state:t,country:n}=e.country.includes(" \xB7 ")?Dg(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 Bg={key:ec,label:"Site offices",blocks:["Footprint","ContactLocations"]};var Lj="data-sf-site-css",TA="site",Ml="siteCustomCss";function EA(e){return e&&typeof e=="object"?Zc(e,Ml):""}function Dj(e){return EA(e)?TA:void 0}import{group as aR}from"efficient-easel/screen/lib/document/box-fields";import{jsx as it}from"react/jsx-runtime";import{ColumnsIcon as LA,HeadquartersIcon as DA,HeightIcon as FA,LayoutIcon as BA,LocationIcon as HA,MapIcon as MA,SearchIcon as UA,ThemeIcon as GA}from"efficient-easel/icons";import{group as zl}from"efficient-easel/screen/lib/document/box-fields";import{deviceField as yn}from"efficient-easel/screen/lib/document/device-fields";import{jsx as Gl}from"react/jsx-runtime";import{ListIcon as xA}from"efficient-easel/icons";import{NoControlMark as vA,noControlField as wA}from"efficient-easel/screen/lib/document/panel-no-control-mark";function Kg(e,t){return ie(e,Gl(xA,{}),[{label:t,value:""}],"")}var CA="_sourceEdit";function jj(){return wA({type:"custom",render:()=>Gl(vA,{})},"always")}var Hg=new Map,Mg=new WeakMap,Ug=(e,t)=>({type:"custom",render:()=>Gl(ca,{compact:!0,status:"ok",hint:c("Where this content is edited."),edit:{label:e,onClick:t}})});function OA(e){if(tc(e)){let o=Mg.get(e.open);o||Mg.set(e.open,o=new Map);let a=o.get(e.label);return a||o.set(e.label,a=Ug(e.label,e.open)),a}let t=`${e.label}\0${e.href}`,n=Hg.get(t);return n||(n=Ug(e.label,()=>window.open(e.href,"_blank","noopener")),Hg.set(t,n)),n}var Gg=new WeakMap,$g=-1,Ul={},zg=new WeakMap;function jg(e,t,n){return oc(e).filter(o=>!o.records||o.key===t||n!==null&&o.records.includes(n))}function PA(e,t,n,o){$g!==uo()&&($g=uo(),Ul={});let a=Gg.get(t);(!a||zg.get(a)!==Ul)&&(a=new Map,zg.set(a,Ul),Gg.set(t,a));let s=jg(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 Wg=new WeakMap,kA={not:{field:je,set:!0}};function Vg(e,t,n,o={}){let a=t[je];if(!a)return t;let s=sc(n),r=Dp(o.root),i=jg(e,s,r).length>0||s!=="",l=i?PA(e,a,s,r):null,u=Wg.get(t);u||Wg.set(t,u=new Map);let d=`${uo()}\0${i?"1":"0"}\0${s}\0${(o.hides??[]).join(",")}\0${r??""}`,f=u.get(d);if(f)return f;let p=new Set(o.hides??[]),m=s?ac(s)?.edit:void 0,b={};for(let[y,T]of Object.entries(t))y===je?l&&(b[y]=l):y===CA?m&&(b[y]=OA(m)):b[y]=p.has(y)&&T&&typeof T=="object"?le(T,kA):T;return u.set(d,b),b}import{createContext as AA,useContext as RA}from"react";var Yg=AA(null),qj=Yg.Provider,Zj=()=>RA(Yg);function Jj(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 IA(e){return e===null||!Number.isFinite(e)?"":e<10?`${e.toFixed(1)} km`:`${Math.round(e)} km`}function Qj(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?IA(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 NA=[{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"}],Xg={key:co,label:"Dealers",blocks:["Footprint"],fields:NA};function e3(e){return[e.name,e.city].filter(Boolean).join(", ")}var n3={text:"Button label",href:"#"},o3=e=>e.replace(/\*([^*]+)\*/g,"==$1=="),so={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 ps={sectionNumber:so.sectionNumber,heading:`${so.heading}
7
- *${so.accent}*`,tagline:so.body},$l=rc.Footprint,l3={label:"Locations Map",fields:$l,defaultProps:{sectionNumber:"",heading:"",tagline:"",offices:[],mapTheme:bo.mapTheme,padTop:120,padBottom:120,search:!1,searchHint:"",noMatchText:"",listPosition:"below",showDistance:!0}};var Zg={field:je,is:co,default:""},Wl={field:Gt,is:dt,default:dt},$A={field:Gt,is:"list",default:dt},zA={field:Gt,is:"map",default:dt},Jg={all:[Wl,{field:"listPosition",in:["left","right"],default:"below"}]},Qg={any:[{all:[Zg,{not:zA}]},Jg]},WA={any:[{all:[Wl,{field:"listPosition",is:"below",default:"below"}]},$A]},qg={all:[Qg,{field:"search",is:!0,default:!1}]};nc([Xg,Bg]);async function Kl(e){return ba(e)?Af(e,t=>[t.address,t.city,t.country].map(n=>String(n??"").replace(/\*/g,"").trim()).filter(Boolean).join(", ")):e}var KA={fields:{_gContent:zl("Section"),sectionNumber:Ja("Section number",ps.sectionNumber),heading:El("Heading",ps.heading),tagline:El("Body",ps.tagline),_gOffices:zl("Offices"),[je]:Kg("Office content","Manual"),offices:{type:"array",label:"Offices",arrayFields:{role:hn("Role"),city:hn("City"),country:hn("Region \xB7 country"),address:jh("Address"),phone:hn("Phone"),group:hn("Group"),hq:rt("HQ",!1,it(DA,{})),geocode:og(ag,{label:"Coordinates"})},defaultItemProps:{role:"Sales & Distribution",city:"City",country:"Country",address:"",phone:"",group:"",hq:!1,lat:0,lng:0},getItemSummary:e=>e?.city||"Office"},...$l,[Gt]:mn("Shows",it(MA,{}),[{label:"Map and list",value:dt},{label:"Map only",value:"map"},{label:"List only",value:"list"}],dt),mapTheme:mn("Map theme",it(GA,{}),[{label:"Auto",value:"auto"},{label:"Dark",value:"dark"},{label:"Light",value:"light"}],bo.mapTheme),_gList:zl("List"),listPosition:yn("desktop",le(mn("Position",it(BA,{}),[{label:"Left",value:"left"},{label:"Right",value:"right"},{label:"Below",value:"below"}],"below"),Wl)),listColumns:yn("desktop",le(mn("Columns",it(LA,{}),[{label:"Auto",value:Cs},...wc.map(e=>({label:String(e),value:String(e)}))],Cs),WA)),[xc]:yn("desktop",le(mn("Map height",it(FA,{}),[{label:"Fixed",value:ws},{label:"Full height",value:vc}],ws),Jg)),search:yn("desktop",le(rt("Search",!1,it(UA,{})),Qg)),searchHint:yn("desktop",le(Tl(Ja("Hint","Type a postcode or address")),qg)),noMatchText:yn("desktop",le(Tl(Ja("No match","No place found. Try another postcode.")),qg)),showDistance:le(rt("Distance",!0,it(HA,{})),Zg)},resolveData:async(e,t)=>{let n=t?.changed,o=e.props;if(n?.listPosition===!0||n?.[Gt]===!0||n?.[je]===!0){let i=Cc(o);i!==o&&(e={...e,props:i})}let a=e.props,s=a.offices??[],r=await Kl(s);return r===s?e:{...e,props:{...a,offices:[...r]}}},resolveFields:(e,{fields:t})=>Tc(Vg("Footprint",t,e.props,{hides:["offices"]}),e.props.headPlacement,_c.Footprint.headRows)},eb=KA.fields.offices;import{HEADER_TYPE as jl,FOOTER_TYPE as jA}from"efficient-easel/draw";import{parseOption as VA}from"efficient-shell/format";var YA=new Set(["Hero","HeroSingle","IntroBleed"]),tb={min:56,max:140,default:88},k3={min:0,max:120,step:2,default:32},A3=`var(--sf-header-h, ${tb.default}px)`,XA="--sf-header-set-h",R3="--sf-header-h",I3=`var(${XA}, ${tb.default}px)`,N3="sf-header-clearance",L3="sf-sticky-underheader";function qA(e){return e?.find(t=>t?.type&&t.type!==jl)??null}function nb(e){let t=qA(e)?.type;return!t||!YA.has(t)}function D3(e){return!nb(e)}function F3(e){return!!e?.some(t=>t?.type===jl)}function B3(e){return!e||e.length===0?!1:!e.some(t=>t?.type===jl||t?.type===jA)}var ZA=["auto","shared","own"],Vl="auto",JA="topSpace",H3="data-top-space";function QA(e){return VA(ZA,Vl,e)}function eR(e,t){let n=QA(e?.props?.[JA]);return n==="own"?!0:n==="shared"?!1:nb(t)}function M3(e,t){return eR(e,t)?"own":null}function sR(){return{type:"custom",render:({value:e,onChange:t})=>fs(Lg,{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 rR=[{label:"Auto",value:"auto"},{label:"Shared",value:"shared"},{label:"Its own",value:"own"}],oV={pageBackground:ng(),topSpace:ie("Top space",fs(nR,{}),rR,Vl),widthChoice:sR()},rb=["pageBackground","topSpace","widthChoice"],iR="Record type",Yl=new Map,ob=-1;function lR(e){ob!==Hr()&&(Yl.clear(),ob=Hr());let t=Br(),n=t.some(a=>a.key===e)?"":e,o=Yl.get(n);return o||(o=ie(iR,fs(tR,{}),[...t.map(a=>({label:a.label,value:a.key})),...n?[{label:n,value:n}]:[]],tt),Yl.set(n,o)),o}var ab=new WeakMap;function aV(e,t){if(!Dn()||Br().length<2||Qo in e)return e;let n=lR(Ln(t)),o=ab.get(e);if(o&&o.row===n)return o.fields;let a={[Qo]:n,...e};return ab.set(e,{row:n,fields:a}),a}var cR="On: the site's Side space is counted once at each edge of every page. Off: as before.",uR=rt("Count side space once",!1,fs(oR,{}),cR),dR={_gWebsite:aR("Website"),[Ca]:uR,[bn]:eb,[Ml]:wl},sb=new WeakMap;function sV(e,t){if(t?.kind!==yi||Ca in e)return e;let n=sb.get(e);return n||(n={...e,...dR},sb.set(e,n)),n}function rV(e){let t=e?.props;if(t?.kind!==yi||!Array.isArray(t[bn]))return e;let n=t[bn];return ba(n)?Kl(n).then(o=>({...e,props:{...t,[bn]:[...o]}})):e}import{previewFrame as wR}from"efficient-easel/screen/lib/document/preview-dom";import{pictureShadowColor as CR}from"efficient-easel/screen/lib/document/shadow-values";var ql="sf-site-styles",OR="sf-site-styles-tabpanel",KV="text",cb="basics",ib="this-page-group",ms=[{id:cb,label:"Basics",icon:N(xR,{})},{id:"theme",label:"Theme",icon:N(ER,{})},{id:"text",label:"Text",icon:N(vR,{})}];function PR({themeFromDocument:e,persist:t}){let{appState:n,dispatch:o}=lb(u=>u),{theme:a,setTheme:s}=D(),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 N(Zd,{value:e?i.theme:a,onChange:l})}function kR({themeFromDocument:e,persist:t}){let[n,o]=Zl(null),{theme:a,setFonts:s,setSizes:r,setHeadingTypography:i}=D(),l=jd({themeFromDocument:e,persist:t}),{old:u,saved:d,writeRoot:f}=l,p=l.fonts,m=l.sizes,b=l.typography,y=IR,T=w=>l.write(w),S=Wd(a),E=Kd(a),x=w=>{let B={...p,accent:w};e?f({fonts:B}):s(B),t({accent_font:w})},v=w=>{r({...m,accent:w}),t({accent_size_px:w})},C=w=>{let B={...b,weightStrong:w};e?f({headingTypography:B}):i(B),t({heading_weight_strong:w})},H=w=>{let B={...b,italicStrong:w};e?f({headingTypography:B}):i(B),t({accent_italic:w})};return Ht(Sn,{children:[N(Gd,{saved:d,old:u,colours:S,colourNameOf:E,sizeOf:y,onChange:T,openId:n===Xl?null:n,onOpenChange:o,withoutSize:e}),N(Og,{font:p.accent,size:m.accent,weight:b.weightStrong,italic:b.italicStrong,headingWeight:b.weight,open:n===Xl,onOpenChange:w=>o(w?Xl:null),onChange:w=>{w.key==="font"?x(w.value):w.key==="size"?v(w.value):w.key==="weight"?C(w.value):H(w.value)},withoutSize:e})]})}var Xl="accent",AR={"heading-1":"heading","heading-2":"heading2","heading-3":"heading3","body-1":"body","body-5":"label"},RR={heading:32,body:14};function IR(e){return e.values.size??LR(j(AR,e.id)??"body")??RR[e.kind]}var NR={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 LR(e){if(typeof document>"u")return null;let t=(wR()?.contentDocument??document).querySelector(NR[e]);if(!t)return null;let n=parseFloat(getComputedStyle(t).fontSize);return Number.isFinite(n)?n:null}function DR({themeFromDocument:e,persist:t}){let{appState:n,dispatch:o}=lb(p=>p),{cornerRadiusPx:a,setCornerRadiusPx:s}=D(),r=n.data,i=r.root?.props??{},l=i.cornerRadiusPx===void 0?Gc[Mc(i.cornerStyle)]:ke(i.cornerRadiusPx),u=e?l:a,d=ao("cornerRadius",a,s,t),f=p=>o({type:"replaceRoot",root:{...r.root,props:{...i,...p}},recordHistory:!0});return N(rg,{value:u,onChange:p=>{e?(f({cornerRadiusPx:p}),t({corner_radius_px:p})):d.write(p)},...e?{}:{length:d.length}})}function FR({persist:e}){let{siteWidth:t,setSiteWidth:n,sectionBackgroundWidth:o,setSectionBackgroundWidth:a,sectionContentWidth:s,setSectionContentWidth:r}=D(),i=Jl(),l=ao("siteWidth",t??null,n,e);if(i!=="desktop")return null;let u=typeof t=="number"?t:l.shown(V.default),d=l.write,f=m=>{a(m),e({section_background_width:m},!0)},p=m=>{r(m),e({section_content_width:m},!0)};return Ht(Sn,{children:[N(xg,{value:o??"full",changed:o!==null,detail:c("Full width"),onChange:f,onReset:()=>f(null),hint:Tg}),N(vg,{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:p,onPx:m=>d(m),onReset:()=>{p(null),d(null)},hint:Eg,length:l.length})]})}function BR({persist:e}){let{siteGutter:t,siteGutterPhone:n,setSiteGutter:o,setSiteGutterPhone:a,siteLengthUnits:s}=D(),r=Sg(Jl(),{gutter:t,phone:n,gutterUnit:s.siteGutterUnit}),i=r?.key==="site_gutter_phone",l=ao(Hl("siteGutter",i?"mobile":"desktop"),r?.value??null,i?a:o,e);return r?N(_g,{value:r.value,onChange:l.write,unsetPx:r.unsetPx,restsOn:l.shown(r.unsetPx),bounds:r.bounds,length:l.length}):null}function HR({persist:e}){let{blockGap:t,blockGapPhone:n,setBlockGap:o,setBlockGapPhone:a,siteLengthUnits:s}=D(),r=pg(Jl(),{gap:t,phone:n}),i=r?.key==="block_gap_phone",l=r?.followsPx==null?null:{figure:r.followsPx,unit:L(s.blockGapUnit)},u=ao(Hl("blockGap",i?"mobile":"desktop"),r?.value??null,i?a:o,e,l);return r?N(fg,{value:r.value,onChange:u.write,followsPx:u.rest,followsUnit:u.length.unit,length:u.length}):null}function MR({persist:e}){return Ht(Sn,{children:[N(FR,{persist:e}),N(BR,{persist:e}),N(HR,{persist:e})]})}function UR(e){return{card_shadow:e}}function GR(e){return e===null?{shadow_color:null}:{shadow_color:CR(e)}}function $R(e){return{hover_effect:e}}function zR({persist:e}){let{cardShadow:t,setCardShadow:n,shadowColor:o,setShadowColor:a,hoverEffect:s,setHoverEffect:r}=D();return Ht(Sn,{children:[N(ig,{value:t,onChange:i=>{n(i),e(UR(i),!0)}}),N(ug,{value:o,onChange:i=>{a(i),e(GR(i),i===null)}}),N(mg,{value:s,onChange:i=>{r(i),e($R(i),!0)}})]})}function WR(e){return{photography_grayscale:e}}function KR({persist:e}){let{photographyGrayscale:t,setPhotographyGrayscale:n}=D();return N(gg,{value:t,onChange:o=>{n(o),e(WR(o),!0)}})}function jR({persist:e}){return N(Sn,{children:N(KR,{persist:e})})}function VR(e){return{share_button_on_posts:e}}function YR({persist:e}){let{shareButtonOnPosts:t,setShareButtonOnPosts:n}=D();return N(bg,{value:t,onChange:o=>{n(o),e(VR(o),!0)}})}function jV(){let{websiteName:e}=D();return e?.trim()||fu}function VV({themeFromDocument:e=!1,tokenRef:t,siteId:n,onNotify:o,tab:a,onTabChange:s,initialTab:r,revealPageGroup:i=!1,onPageGroupRevealed:l}){let{persist:u}=Ao({themeFromDocument:e,tokenRef:t,siteId:n,onResult:T=>{let S=Ng(T);S&&o?.(S.msg,S.tone)}}),[d,f]=Zl(r??ms[0].id),p=a!==void 0,m=p?a:d,b=p?s??(()=>{}):f,y=ms.find(T=>T.id===m)??ms[0];return Ht(yR,{children:[N(ZR,{activeId:y.id,onSelect:b}),Ht("div",{id:TR(ql,y.id),className:OR,role:"tabpanel","aria-labelledby":_R(ql,y.id),children:[m===cb&&Ht(Sn,{children:[N(DR,{themeFromDocument:e,persist:u}),!e&&N(zR,{persist:u}),!e&&N(MR,{persist:u}),!e&&N(jR,{persist:u}),!e&&N(YR,{persist:u}),N(XR,{reveal:i,onRevealed:l})]}),m==="theme"&&N(PR,{themeFromDocument:e,persist:u}),m==="text"&&N(kR,{themeFromDocument:e,persist:u})]})]})}function XR({reveal:e,onRevealed:t}){let[n,o]=Zl(!0),a=gR(t);return a.current=t,hR(()=>{if(!e)return;o(!0);let s=requestAnimationFrame(()=>{document.getElementById(ib)?.scrollIntoView({block:"start"}),a.current?.()});return()=>cancelAnimationFrame(s)},[e]),N(mR,{title:c("This page"),open:n,onToggle:o,id:ib,children:N(qR,{})})}function qR(){let{fields:e,values:t,readOnly:n,onChange:o}=pR(),a=Object.fromEntries(rb.filter(s=>s in e).map(s=>[s,e[s]]));return Object.keys(a).length===0?N(bR,{variant:"none",icon:!1,message:c("This page has no look of its own to set.")}):N(fR,{fields:a,values:t,onChange:o,readOnly:n,tabs:!1,idPrefix:"this-page",ariaLabel:c("This page")})}function ZR({activeId:e,onSelect:t}){return N("div",{className:"es-insp-tabs",children:N(SR,{variant:"underline",block:!0,labelsFit:!0,"aria-label":c("Styles"),idPrefix:ql,value:e,onChange:t,items:ms.map(n=>{let o=c(n.label);return{id:n.id,icon:n.icon,label:o}})})})}export{Ee as a,QI as b,eI as c,P as d,tI as e,nI as f,c as g,En as h,V as i,xv as j,vi as k,YU as l,Sm as m,ZU as n,re as o,De as p,we as q,ot as r,QU as s,Pv as t,eG as u,wi as v,tG as w,nG as x,oG as y,Av as z,aG as A,sG as B,rG as C,iG as D,Em as E,lG as F,xm as G,cG as H,uG as I,wm as J,Cm as K,Om as L,Mv as M,Uv as N,mG as O,gG as P,bG as Q,yG as R,SG as S,ch as T,Rt as U,rC as V,I2 as W,iC as X,N2 as Y,te as Z,L2 as _,lC as $,D2 as aa,F2 as ba,B2 as ca,H2 as da,M2 as ea,U2 as fa,fn as ga,G2 as ha,$2 as ia,zr as ja,Kr as ka,zp as la,jr as ma,PT as na,yF as oa,aa as pa,Zp as qa,sa as ra,kT as sa,AT as ta,EF as ua,xF as va,vF as wa,RT as xa,wF as ya,Vr as za,CF as Aa,OF as Ba,PF as Ca,kF as Da,AF as Ea,RF as Fa,IF as Ga,NF as Ha,LF as Ia,IT as Ja,xr as Ka,ep as La,A_ as Ma,aL as Na,tp as Oa,R_ as Pa,sL as Qa,np as Ra,I_ as Sa,rL as Ta,JG as Ua,jn as Va,Uw as Wa,Gi as Xa,cn as Ya,zi as Za,QG as _a,e2 as $a,t2 as ab,Wi as bb,Jm as cb,n2 as db,Ne as eb,Ir as fb,rD as gb,vt as hb,u2 as ib,d2 as jb,p2 as kb,f2 as lb,m2 as mb,Wn as nb,Ii as ob,hw as pb,Pi as qb,Ni as rb,Bm as sb,Li as tb,yw as ub,kG as vb,Pa as wb,AG as xb,Sw as yb,_w as zb,RG as Ab,Tw as Bb,Am as Cb,IG as Db,NG as Eb,LG as Fb,Lj as Gb,TA as Hb,EA as Ib,Dj as Jb,Me as Kb,vo as Lb,wu as Mb,gI as Nb,bI as Ob,Tu as Pb,Qr as Qb,IB as Rb,NB as Sb,hf as Tb,DB as Ub,FB as Vb,hE as Wb,BB as Xb,bf as Yb,HB as Zb,MB as _b,gf as $b,yf as ac,UB as bc,Hn as cc,ti as dc,GB as ec,$B as fc,zB as gc,WB as hc,Lo as ic,Ay as jc,od as kc,ad as lc,Pn as mc,Ny as nc,Do as oc,ld as pc,j0 as qc,V0 as rc,er as sc,Y0 as tc,cd as uc,Uy as vc,Gy as wc,$y as xc,eN as yc,tN as zc,tr as Ac,aN as Bc,mN as Cc,hN as Dc,gN as Ec,bN as Fc,yN as Gc,Wy as Hc,Ky as Ic,SN as Jc,qt as Kc,jy as Lc,hd as Mc,Vy as Nc,_N as Oc,Yy as Pc,TN as Qc,EN as Rc,nd as Sc,No as Tc,Mo as Uc,bd as Vc,yd as Wc,lr as Xc,Jy as Yc,Uo as Zc,_t as _c,BN as $c,aS as ad,sS as bd,rS as cd,HN as dd,MN as ed,bS as fd,bt as gd,UN as hd,GN as id,kS as jd,$N as kd,zN as ld,pr as md,WN as nd,fr as od,FS as pd,KN as qd,jN as rd,mr as sd,VN as td,YN as ud,XN as vd,GS as wd,qN as xd,KS as yd,jS as zd,ZN as Ad,JN as Bd,QN as Cd,YS as Dd,e1 as Ed,t1 as Fd,ZS as Gd,n1 as Hd,o1 as Id,dn as Jd,Xi as Kd,qi as Ld,xf as Md,XB as Nd,vf as Od,qB as Pd,ZB as Qd,JB as Rd,Xr as Sd,MF as Td,iU as Ud,ev as Vd,lU as Wd,bi as Xd,yi as Yd,cU as Zd,uU as _d,dU as $d,Ea as ae,pU as be,wo as ce,Xt as de,xn as ee,Bs as fe,vn as ge,_I as he,TI as ie,EI as je,Au as ke,Ru as le,Iu as me,xI as ne,xe as oe,Qe as pe,Or as qe,PL as re,Yo as se,kL as te,AL as ue,Xo as ve,RL as we,IL as xe,NL as ye,n3 as ze,o3 as Ae,so as Be,_j as Ce,Tj as De,Ej as Ee,xj as Fe,Dg as Ge,vj as He,wj as Ie,ih as Je,w2 as Ke,el as Le,tl as Me,C2 as Ne,O2 as Oe,GH as Pe,tb as Qe,k3 as Re,A3 as Se,XA as Te,R3 as Ue,I3 as Ve,N3 as We,L3 as Xe,qA as Ye,D3 as Ze,F3 as _e,B3 as $e,H3 as af,eR as bf,M3 as cf,tt as df,wD as ef,iT as ff,Hr as gf,Ln as hf,CD as if,kD as jf,cT as kf,Ip as lf,AD as mf,pT as nf,mT as of,Ur as pf,ID as qf,ND as rf,gT as sf,HD as tf,MD as uf,Dn as vf,UD as wf,Dp as xf,Pr as yf,JD as zf,QD as Af,Fp as Bf,eF as Cf,N_ as Df,se as Ef,lL as Ff,L_ as Gf,D_ as Hf,pL as If,F_ as Jf,B_ as Kf,fL as Lf,mL as Mf,hL as Nf,gL as Of,bL as Pf,yL as Qf,SL as Rf,_L as Sf,TL as Tf,EL as Uf,xL as Vf,nm as Wf,jw as Xf,Na as Yf,s2 as Zf,dD as _f,dh as $f,Xn as ag,Fe as bg,ie as cg,qn as dg,mn as eg,J2 as fg,Q2 as gg,t$ as hg,n$ as ig,o$ as jg,a$ as kg,s$ as lg,i$ as mg,l$ as ng,Zn as og,c$ as pg,EC as qg,xC as rg,fh as sg,sl as tg,ip as ug,UL as vg,GL as wg,$L as xg,zL as yg,KL as zg,hp as Ag,jL as Bg,VL as Cg,QL as Dg,eD as Eg,yp as Fg,tD as Gg,rF as Hg,Up as Ig,fF as Jg,Qp as Kg,ef as Lg,Bn as Mg,sf as Ng,KF as Og,jF as Pg,ca as Qg,Zr as Rg,dE as Sg,SB as Tg,_f as Ug,tH as Vg,ba as Wg,Af as Xg,Ub as Yg,be as Zg,Cn as _g,AH as $g,li as ah,ci as bh,NH as ch,Ff as dh,LH as eh,DH as fh,FH as gh,Gf as hh,zf as ih,n0 as jh,o0 as kh,zu as lh,a0 as mh,Wu as nh,r0 as oh,Ao as ph,wy as qh,P0 as rh,Ju as sh,EM as th,Kf as uh,Xf as vh,qf as wh,Zf as xh,Jf as yh,Qf as zh,em as Ah,mi as Bh,Ux as Ch,Gx as Dh,Gn as Eh,hi as Fh,om as Gh,WM as Hh,zx as Ih,KM as Jh,jM as Kh,VM as Lh,sm as Mh,ZM as Nh,jx as Oh,JM as Ph,QM as Qh,Yx as Rh,qx as Sh,Zx as Th,Jx as Uh,oU as Vh,Qx as Wh,aU as Xh,Si as Yh,_U as Zh,cm as _h,av as $h,EU as ai,CU as bi,_i as ci,yv as di,zU as ei,Aw as fi,zG as gi,Iw as hi,WG as ii,KG as ji,jG as ki,pn as li,Ha as mi,_2 as ni,T2 as oi,E2 as pi,vC as qi,wC as ri,p$ as si,kC as ti,AC as ui,f$ as vi,m$ as wi,h$ as xi,g$ as yi,b$ as zi,v$ as Ai,w$ as Bi,C$ as Ci,O$ as Di,P$ as Ei,k$ as Fi,A$ as Gi,R$ as Hi,I$ as Ii,N$ as Ji,L$ as Ki,hh as Li,D$ as Mi,F$ as Ni,UC as Oi,GC as Pi,Ah as Qi,Dt as Ri,vW as Si,wW as Ti,CW as Ui,OW as Vi,PW as Wi,kW as Xi,Tl as Yi,AW as Zi,RW as _i,DW as $i,FW as aj,YO as bj,BW as cj,Ja as dj,El as ej,hn as fj,jh as gj,HW as hj,MW as ij,UW as jj,GW as kj,JO as lj,$W as mj,zW as nj,WW as oj,KW as pj,jW as qj,VW as rj,YW as sj,XW as tj,Qa as uj,de as vj,Oe as wj,Vh as xj,rn as yj,Yh as zj,Xh as Aj,qW as Bj,ZW as Cj,JW as Dj,vP as Ej,QW as Fj,e4 as Gj,t4 as Hj,n4 as Ij,o4 as Jj,a4 as Kj,Z as Lj,kP as Mj,s4 as Nj,r4 as Oj,ja as Pj,i4 as Qj,l4 as Rj,c4 as Sj,u4 as Tj,d4 as Uj,p4 as Vj,rt as Wj,f4 as Xj,YP as Yj,m4 as Zj,h4 as _j,g4 as $j,b4 as ak,y4 as bk,og as ck,S4 as dk,_4 as ek,T4 as fk,ag as gk,x4 as hk,v4 as ik,sk as jk,w4 as kk,C4 as lk,O4 as mk,P4 as nk,k4 as ok,Pl as pk,sg as qk,A4 as rk,R4 as sk,I4 as tk,N4 as uk,xH as vk,vH as wk,eA as xk,xg as yk,vg as zk,Fl as Ak,g1 as Bk,tn as Ck,b1 as Dk,y1 as Ek,S1 as Fk,_1 as Gk,s_ as Hk,T1 as Ik,E1 as Jk,Gd as Kk,Lg as Lk,Aj as Mk,Rj as Nk,Kg as Ok,CA as Pk,jj as Qk,kA as Rk,Vg as Sk,Zj as Tk,Jj as Uk,Qj as Vk,NA as Wk,e3 as Xk,ps as Yk,l3 as Zk,KA as _k,oV as $k,rb as al,aV as bl,sV as cl,rV as dl,Wd as el,Kd as fl,jd as gl,KV as hl,cb as il,ms as jl,IR as kl,jV as ll,VV as ml};