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