efficient-storefront-blocks 0.98.0 → 0.99.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (96) hide show
  1. package/CHANGELOG.md +33 -0
  2. package/dist/chunks/{EditorPreviewCheckout-2FW4VEOK.js → EditorPreviewCheckout-J76THKIJ.js} +1 -1
  3. package/dist/chunks/{SiteEditorProvider-LW5QSBKM.js → SiteEditorProvider-YAIB64UV.js} +1 -1
  4. package/dist/chunks/chunk-EIBYUCDE.js +1 -0
  5. package/dist/chunks/chunk-GOVYQQA4.js +1 -0
  6. package/dist/chunks/{chunk-4QN263UJ.js → chunk-KRMWJLBM.js} +2 -2
  7. package/dist/chunks/{fitment-data-BRGBDG7Y.js → fitment-data-OUHMES66.js} +1 -1
  8. package/dist/contract.js +1 -1
  9. package/dist/editor/components/GalleryShowcaseSource.js +1 -1
  10. package/dist/editor/lib/document/blocks/commerce/SearchBlock/fields.js +1 -1
  11. package/dist/editor/lib/document/blocks/service/BookingBox/fields.js +1 -1
  12. package/dist/editor/lib/document/blocks/service/SiteHeader/fields.js +1 -1
  13. package/dist/editor/lib/document/blocks/service/SubmitBox/fields.js +1 -1
  14. package/dist/editor/lib/document/config.js +1 -1
  15. package/dist/editor/lib/document/popup-look-fields.d.ts +1 -0
  16. package/dist/editor/lib/document/popup-look-fields.js +1 -1
  17. package/dist/editor/lib/document/text-kind-style-rows.d.ts +5 -0
  18. package/dist/editor/lib/document/text-kind-style-rows.js +1 -0
  19. package/dist/editor/lib/storefront-editor-words.d.ts +3 -2
  20. package/dist/editor/lib/storefront-editor-words.js +1 -1
  21. package/dist/index.js +31 -31
  22. package/dist/links.js +1 -1
  23. package/dist/render/app/globals.css +136 -12
  24. package/dist/render/built-with.json +1 -1
  25. package/dist/render/components/CatalogFilterBarSection.js +1 -1
  26. package/dist/render/components/ChatWidget.js +1 -1
  27. package/dist/render/components/CurrencyContext.d.ts +3 -0
  28. package/dist/render/components/CurrencyContext.js +1 -1
  29. package/dist/render/components/FooterMenu.d.ts +5 -3
  30. package/dist/render/components/FooterMenu.js +1 -1
  31. package/dist/render/components/FormBlock.d.ts +4 -1
  32. package/dist/render/components/FormBlock.js +1 -1
  33. package/dist/render/components/Header.js +1 -1
  34. package/dist/render/components/HeaderToolBlocks.d.ts +4 -2
  35. package/dist/render/components/HeaderToolBlocks.js +1 -1
  36. package/dist/render/components/HeaderTools.d.ts +7 -2
  37. package/dist/render/components/HeaderTools.js +1 -1
  38. package/dist/render/components/PhoneSheet.d.ts +16 -0
  39. package/dist/render/components/PhoneSheet.js +1 -0
  40. package/dist/render/components/PreOrderPanel.js +1 -1
  41. package/dist/render/components/ProductGridSection.js +1 -1
  42. package/dist/render/components/ProductRef.js +1 -1
  43. package/dist/render/components/SectionGroupBody.d.ts +2 -1
  44. package/dist/render/components/SectionGroupBody.js +1 -1
  45. package/dist/render/components/Subscribe.d.ts +1 -0
  46. package/dist/render/components/Subscribe.js +1 -1
  47. package/dist/render/components/catalog/CatalogFilterBar.d.ts +5 -1
  48. package/dist/render/components/catalog/CatalogFilterBar.js +1 -1
  49. package/dist/render/components/catalog/CatalogFilterContext.d.ts +2 -0
  50. package/dist/render/components/catalog/CatalogFilterContext.js +1 -1
  51. package/dist/render/components/catalog/FilterPill.js +1 -1
  52. package/dist/render/components/catalog/PriceRange.d.ts +6 -1
  53. package/dist/render/components/catalog/PriceRange.js +1 -1
  54. package/dist/render/components/catalog/ShopperFilters.js +1 -1
  55. package/dist/render/components/fitment/PickerField.js +1 -1
  56. package/dist/render/components/formSubmission.d.ts +4 -2
  57. package/dist/render/components/formSubmission.js +1 -1
  58. package/dist/render/components/pdp-dynamic/DynamicSpecTable.d.ts +0 -3
  59. package/dist/render/components/pdp-dynamic/DynamicSpecTable.js +1 -1
  60. package/dist/render/components/pdp-dynamic/DynamicWheelDiagram.js +1 -1
  61. package/dist/render/components/submit/SubmitRegions.js +1 -1
  62. package/dist/render/components/wheels-plp/AlloyWheelsListing.js +1 -1
  63. package/dist/render/components/wheels-plp/PlpActiveChips.d.ts +2 -1
  64. package/dist/render/components/wheels-plp/PlpActiveChips.js +1 -1
  65. package/dist/render/components/wheels-plp/PlpSidebar.d.ts +15 -7
  66. package/dist/render/components/wheels-plp/PlpSidebar.js +1 -1
  67. package/dist/render/components/wheels-plp/useVehicleCatalog.d.ts +6 -1
  68. package/dist/render/components/wheels-plp/useVehicleCatalog.js +1 -1
  69. package/dist/render/lib/api/index.d.ts +1 -1
  70. package/dist/render/lib/api/index.js +1 -1
  71. package/dist/render/lib/booking/text-kinds.js +1 -1
  72. package/dist/render/lib/content/article-page-seed.js +1 -1
  73. package/dist/render/lib/content/menu-row.d.ts +16 -0
  74. package/dist/render/lib/content/menu-row.js +1 -1
  75. package/dist/render/lib/content/text-kind-vars.d.ts +4 -0
  76. package/dist/render/lib/content/text-kind-vars.js +1 -0
  77. package/dist/render/lib/document/blocks/commerce/SearchBlock/render.js +1 -1
  78. package/dist/render/lib/document/blocks/service/SiteHeader/render.js +1 -1
  79. package/dist/render/lib/document/footer-page-blocks.js +1 -1
  80. package/dist/render/lib/document/section-to-box-rows-service.js +1 -1
  81. package/dist/render/lib/popup/text-kind-style.js +1 -1
  82. package/dist/render/lib/submit/text-kinds.js +1 -1
  83. package/dist/render/lib/wheels/catalog-filters-to-listing.d.ts +1 -1
  84. package/dist/render/lib/wheels/catalog-filters-to-listing.js +1 -1
  85. package/dist/render/lib/wheels/plp-filters.d.ts +5 -0
  86. package/dist/render/lib/wheels/plp-filters.js +1 -1
  87. package/dist/render/lib/wheels/wheel-sheet.d.ts +3 -0
  88. package/dist/render/lib/wheels/wheel-sheet.js +1 -0
  89. package/dist/words.d.ts +3 -2
  90. package/dist/words.js +1 -1
  91. package/package.json +2 -2
  92. package/dist/chunks/chunk-PWSMCGXO.js +0 -1
  93. package/dist/chunks/chunk-SEIKSSUW.js +0 -1
  94. /package/dist/chunks/{chunk-XEZ7BYVZ.js → chunk-B2IYTOE3.js} +0 -0
  95. /package/dist/chunks/{chunk-4QN263UJ.js.LEGAL.txt → chunk-KRMWJLBM.js.LEGAL.txt} +0 -0
  96. /package/dist/chunks/{chunk-GOHV3G3C.js → chunk-QP2F42DV.js} +0 -0
@@ -1,4 +1,4 @@
1
- import{$ as Zd,$b as lk,Ab as Zn,Ad as Qn,Ba as Le,Bd as vk,Ca as eo,Cd as sc,Da as MC,Db as ek,Dd as Tk,Ea as Vn,Eb as wh,Fa as HC,Fc as fk,Ga as _a,Gd as Pk,Hb as ok,I as Xt,Ib as Ch,Ja as Kr,Ka as Ih,L as jn,Ld as lc,M as _t,N as bl,Qa as WC,Ra as UC,Rc as pk,Rd as ic,Sa as bh,Sb as Aa,Sc as Ph,Ta as uo,Tc as uk,Ua as GC,Ub as tk,Uc as Eh,Va as zC,Vc as mk,W as Oa,Wa as Yn,Wb as rk,Wc as hk,Wd as es,Xa as $o,Xc as xk,Y as uh,Yb as ak,Yc as nc,Z as mh,Za as qn,Zb as nk,_a as Xn,_b as sk,_c as gk,_d as Vr,a as G,ae as Yr,b as He,bb as $C,bc as Jt,be as dc,c as Ot,cc as ik,d as $n,de as Ek,e as OC,ea as hh,eb as yl,f as Sr,fa as Jd,fc as dk,fd as Oh,g as fh,ga as LC,gb as KC,gc as Qt,h as Kn,ha as FC,hb as yh,hc as kh,he as Ok,ia as BC,ja as xh,je as _k,ka as DC,kb as Qd,kc as vh,l as Il,lb as jC,lc as wr,mb as VC,mc as oc,n as j,nb as YC,nc as Ko,ne as ge,o as qd,ob as ec,oc as Ie,pb as qC,pc as tc,q as Xd,qb as XC,qc as ck,qd as Ik,rc as Sl,rd as bk,re as Bk,sb as ZC,sc as tt,sd as yk,se as Dk,t as io,tb as Sh,tc as wl,u as _C,uc as rc,ud as Sk,ue as pc,v as AC,vb as JC,vc as Jn,vd as wk,ve as Nk,wa as NC,wb as No,wc as Th,wd as Ck,we as Mk,x as RC,xa as gh,xb as jr,yb as QC,yc as ac,yd as kk,z as ph,zb as Zt}from"./chunk-XEZ7BYVZ.js";import{c as Ak,d as cc,e as fc,i as Rk,j as qr,k as Lk,l as Fk,p as _h}from"./chunk-GOHV3G3C.js";var Z=e=>typeof e=="string"&&e?e:void 0;var Wk="en",uc=null,Uk=Wk,Gk=null;function Mue(e,o,t){uc=e??null,Uk=o||Wk,Gk=t??null}function se(){return Gk}function Ah(){return Uk}function zk(){return uc}function Hk(e,o){return o?e.replace(/\{([A-Za-z][A-Za-z0-9_]*)\}/g,(t,r)=>He(o,r)?String(G(o,r)):t):e}function i(e,o){let t=uc?G(uc,e):void 0;if(typeof t=="function"){try{let r=Z(t(o??{}));if(r)return r}catch{}return Hk(e,o)}return Hk(Z(t)??e,o)}function Mo(e,o,t,r){return i(t===1?e:o,{...r,n:t})}import{jsx as Rh,Fragment as w6,jsxs as C6}from"react/jsx-runtime";import{createContext as k6,useContext as v6}from"react";var T6={mirrorHostStyles:!0,css:null,fontHrefs:[]},$k=k6(T6);function Gue({value:e,children:o}){return Rh($k.Provider,{value:e,children:o})}function Lh(){return v6($k)}function Kk(){let{css:e,fontHrefs:o}=Lh();return C6(w6,{children:[o.map(t=>Rh("link",{rel:"stylesheet",href:t},t)),e?Rh("style",{"data-sf-canvas-css":"",children:e}):null]})}import{jsx as P6}from"react/jsx-runtime";import{createContext as E6,useContext as O6}from"react";var jk=E6(void 0);function jue({metadata:e,children:o}){return P6(jk.Provider,{value:e,children:o})}var Vk=()=>O6(jk);import{jsx as ko,Fragment as o6,jsxs as Vd}from"react/jsx-runtime";import{useCallback as hl,useEffect as br,useRef as cue,useState as Z5}from"react";import{SettingsSwitch as fue}from"efficient-easel/panel";import{PagesIcon as pue,StylesIcon as uue}from"efficient-easel/rail";import{PaletteIcon as mue}from"efficient-shell/icons/efficient";import{Subtree as hue,TreeRow as t6}from"efficient-easel/tree";import{useEasel as r6}from"efficient-easel/easel";import{useEaselStrings as a6}from"efficient-easel/strings";import{createContext as _6,useContext as A6}from"react";var Fh=_6(!1),que=()=>A6(Fh);import{useMemo as R6,useRef as L6}from"react";import{useEaselApi as F6}from"efficient-easel/easel";import{useSectionOps as B6}from"efficient-easel/screen/lib/document/use-section-ops";function mc(){let e=F6(),o=B6(),t=L6(o);return t.current=o,R6(()=>({getItemById:r=>e.getState().getItemById(r),getSelectorForId:r=>e.getState().getSelectorForId(r),get components(){return e.getState().config.components},replace:(r,a,n)=>t.current.replaceComponent(r,a,n)}),[e])}import{encodePartId as o7}from"efficient-easel/draw";import{insertAt as t7,moveTo as r7,removeAt as a7}from"efficient-easel/fields";function er(e,o){let t=globalThis,r=Symbol.for(e),a=t[r];return a===void 0&&(a=o(),t[r]=a),a}function Cl(){return er("efficient.slot-field-blocks",()=>new Set)}var mo="dataSource",Cr="dataSourceOptions",D6="dataRows",At="countKey",kl="counts",lme="location-payment-methods",Xk="shop-payment-methods",ime="delivery-options",Zk="blog-categories",Bh="dealers";function N6(e){return typeof e.open=="function"}var Jk=/^[a-z][a-z0-9]*(-[a-z0-9]+)*$/;function Qk(e){return typeof e=="string"&&Jk.test(e)}var Yk=new Set([Bh]);function vl(){return er("efficient.block-sources",()=>({sources:new Map,revision:0}))}var M6=e=>[e?.key,e?.label,e?.value].every(o=>typeof o=="string"&&o.trim()!==""),H6=e=>[e?.key,e?.label].every(o=>typeof o=="string"&&o.trim()!==""),qk=e=>typeof e=="string"&&e.trim()!=="";function W6(e){if(!e||!qk(e.label))return null;if(N6(e))return{label:e.label.trim(),open:e.open};let o=e.href;return qk(o)?{label:e.label.trim(),href:o.trim()}:null}function U6(e){if(typeof e.key!="string"||!Jk.test(e.key))throw new Error(`A block source key is lower-case words joined by hyphens, not ${JSON.stringify(e.key)}.`);if(typeof e.label!="string"||!e.label.trim())throw new Error(`The block source ${e.key} has no label.`);if(!Array.isArray(e.blocks)||!e.blocks.length||e.blocks.some(r=>typeof r!="string"||!r))throw new Error(`The block source ${e.key} names no block it can fill.`);let o=e.blocks.find(r=>Cl().has(r));if(o)throw new Error(`The block source ${e.key} names ${o}, whose card template declares slot fields: slot fields take the place of a source's fields, so a block with slot fields reads no source.`);let t=W6(e.edit);return{key:e.key,label:e.label.trim(),blocks:[...e.blocks],...e.sample?{sample:e.sample.map(r=>tv(r)).filter(r=>r!==null)}:{},...Array.isArray(e.choices)?{choices:e.choices.filter(M6)}:{},...Array.isArray(e.fields)?{fields:e.fields.filter(H6).map(r=>({...r}))}:{},...t?{edit:t}:{},...typeof e.useRows=="function"?{useRows:e.useRows}:{},...Array.isArray(e.records)?{records:e.records.filter(r=>typeof r=="string"&&r.trim()!=="").map(r=>r.trim())}:{}}}function dme(e){let o=e.map(U6),t=vl();for(let r of o)t.sources.set(r.key,r);o.length&&(t.revision+=1)}function ev(e){let o=[...vl().sources.values()],t=[...o.filter(r=>!Yk.has(r.key)),...o.filter(r=>Yk.has(r.key))];return e===void 0?t:t.filter(r=>r.blocks.includes(e))}function hc(e){return vl().sources.get(e)??null}function ov(e){return vl().sources.get(e)?.choices??[]}function cme(){return vl().revision}function oo(e){let o=e?.[mo];return typeof o=="string"?o.trim():""}function tv(e){if(!e||typeof e!="object"||Array.isArray(e))return null;let o={};for(let[t,r]of Object.entries(e)){let a=Z(r);a&&(o[t]=a)}return Object.keys(o).length?o:null}function G6(e){let o=e?.[D6];return Array.isArray(o)?o.map(tv).filter(t=>t!==null):null}function fme(e,o,t=[]){let r=G6(e);if(r!==null&&(r.length||!o))return{rows:r,sample:!1};if(!o)return{rows:[],sample:!1};let a=hc(oo(e))?.sample;return{rows:a?.length?a:t,sample:!0}}import{isNodeList as c3}from"efficient-easel/data";var rv=["general","commerce","service"],Xr=[{key:"openers",title:"Hero & intros",defaultExpanded:!0,templateable:!0,sections:[{type:"Hero",label:"Hero",set:"general"},{type:"HeroSingle",label:"Hero Single",set:"general"},{type:"IntroBleed",label:"Scroll-Over Text",set:"general"}]},{key:"shop",title:"Shop & galleries",templateable:!0,sections:[{type:"Collections",label:"Collections",set:"commerce"},{type:"AlloyWheelsListing",label:"List",set:"commerce"},{type:"CatalogFilterBar",label:"Catalog Filter Bar",set:"commerce"},{type:"ProductGrid",label:"Product Grid",set:"commerce"},{type:"FitmentFinder",label:"Fitment Form",set:"commerce"},{type:"GalleryB",label:"Gallery",set:"commerce"}]},{key:"product",title:"Product page",templateable:!0,sections:[{type:"ProductHero",label:"Product Hero",set:"commerce"},{type:"SpecTable",label:"Spec Table",set:"commerce"},{type:"ProcessSteps",label:"Image & Text Columns",set:"general"},{type:"DetailRows",label:"Feature Rows",set:"commerce"},{type:"FitmentTable",label:"Fitment Table",set:"commerce"},{type:"TyreSizes",label:"Tyre Sizes",set:"commerce"}]},{key:"checkout",title:"Checkout & ordering",templateable:!0,sections:[{type:"OrderSummary",label:"Order Table",set:"general"},{type:"CheckoutCTA",label:"Ready-to-Order Banner",set:"commerce"}]},{key:"about",title:"About & brand story",templateable:!0,sections:[{type:"Footprint",label:"Locations Map",set:"general"}]},{key:"content",title:"Text & content",templateable:!0,sections:[{type:"Cards",label:"Cards",set:"general"}]},{key:"proof",title:"Stats & social proof",templateable:!0,sections:[{type:"Stats",label:"Stats",set:"general"},{type:"Chart",label:"Chart",set:"general"},{type:"Mockup",label:"Mockup Card",set:"general"},{type:"Reviews",label:"Reviews",set:"service"}]},{key:"promo",title:"Promotions & sign-ups",templateable:!0,sections:[{type:"Countdown",label:"Countdown",set:"general"}]},{key:"blog",title:"Blog & journal",templateable:!0,sections:[{type:"FeaturedCover",label:"Feature Banner",set:"general"},{type:"LongRead",label:"Article Text",set:"general"},{type:"ArticleBody",label:"Article Body",set:"service"},{type:"Events",label:"Latest Posts",set:"service"}]},{key:"navigation",title:"Navigation & wayfinding",templateable:!0,sections:[{type:"Breadcrumb",label:"Breadcrumb",set:"general"}]},{key:"legal",title:"Legal & documents",templateable:!0,sections:[{type:"DocBody",label:"Document Text",set:"general"}]},{key:"contact",title:"Contact, FAQ & forms",templateable:!0,sections:[{type:"FAQ",label:"Q&A",set:"general"},{type:"ContactRouting",label:"Contact Form",set:"service"},{type:"ContactLocations",label:"Contact / Locations",set:"general"},{type:"SubmitBuild",label:"Photo Submission Form",set:"service"},{type:"ReviewForm",label:"Review Form",set:"service"},{type:"Form",label:"Form",set:"service"},{type:"AppointmentBooking",label:"Booking Form",set:"service"}]},{key:"structure",title:"Layout, structure & embeds",templateable:!1,sections:[{type:"SectionHeader",label:"Section Header",set:"general"},{type:"Flex",label:"Box",set:"general"},{type:"Divider",label:"Divider",set:"general"},{type:"CustomHTML",label:"Custom HTML",set:"general"}]},{key:"layouts",title:"Layouts",templateable:!0,sections:[{type:"Manifesto",label:"Brand Text",set:"general"},{type:"Split",label:"Image & Text Split",set:"general"},{type:"Subscribe",label:"Signup Form",set:"service"},{type:"Ticker",label:"Scrolling Bar",set:"general"},{type:"SpecStrip",label:"Spec Strip",set:"general"},{type:"TimelineTrack",label:"Milestone Timeline",set:"general"},{type:"Timeline",label:"Story Timeline",set:"general"},{type:"Logos",label:"Logos",set:"general"},{type:"DocMasthead",label:"Page Header",set:"general"},{type:"DocTabs",label:"Tab Bar",set:"general"},{type:"Prose",label:"Editorial Text",set:"general"},{type:"ParagraphsA",label:"Lead Text",set:"general"},{type:"TitleWithButtons",label:"Call-to-Action Heading",set:"general"},{type:"Banner",label:"Banner",set:"general"}]}];function mme(){return Object.fromEntries(Xr.map(e=>[e.key,{title:e.title,components:e.sections.map(o=>o.type),...e.defaultExpanded?{defaultExpanded:!0}:{}}]))}var z6="2027-02-05",av={CategoryBar:{label:"Category bar",note:`The reviewer, 2026-11-06 (the page headers and the tab bars become TWO Layouts rows, Page Header and Tab Bar): Category Bar folds into the Tab Bar. Retired from the Add menu with no second preset.
1
+ import{$ as Zd,$b as lk,Ab as Zn,Ad as Qn,Ba as Le,Bd as vk,Ca as eo,Cd as sc,Da as MC,Db as ek,Dd as Tk,Ea as Vn,Eb as wh,Fa as HC,Fc as fk,Ga as _a,Gd as Pk,Hb as ok,I as Xt,Ib as Ch,Ja as Kr,Ka as Ih,L as jn,Ld as lc,M as _t,N as bl,Qa as WC,Ra as UC,Rc as pk,Rd as ic,Sa as bh,Sb as Aa,Sc as Ph,Ta as uo,Tc as uk,Ua as GC,Ub as tk,Uc as Eh,Va as zC,Vc as mk,W as Oa,Wa as Yn,Wb as rk,Wc as hk,Wd as es,Xa as $o,Xc as xk,Y as uh,Yb as ak,Yc as nc,Z as mh,Za as qn,Zb as nk,_a as Xn,_b as sk,_c as gk,_d as Vr,a as G,ae as Yr,b as He,bb as $C,bc as Jt,be as dc,c as Ot,cc as ik,d as $n,de as Ek,e as OC,ea as hh,eb as yl,f as Sr,fa as Jd,fc as dk,fd as Oh,g as fh,ga as LC,gb as KC,gc as Qt,h as Kn,ha as FC,hb as yh,hc as kh,he as Ok,ia as BC,ja as xh,je as _k,ka as DC,kb as Qd,kc as vh,l as Il,lb as jC,lc as wr,mb as VC,mc as oc,n as j,nb as YC,nc as Ko,ne as ge,o as qd,ob as ec,oc as Ie,pb as qC,pc as tc,q as Xd,qb as XC,qc as ck,qd as Ik,rc as Sl,rd as bk,re as Bk,sb as ZC,sc as tt,sd as yk,se as Dk,t as io,tb as Sh,tc as wl,u as _C,uc as rc,ud as Sk,ue as pc,v as AC,vb as JC,vc as Jn,vd as wk,ve as Nk,wa as NC,wb as No,wc as Th,wd as Ck,we as Mk,x as RC,xa as gh,xb as jr,yb as QC,yc as ac,yd as kk,z as ph,zb as Zt}from"./chunk-B2IYTOE3.js";import{c as Ak,d as cc,e as fc,i as Rk,j as qr,k as Lk,l as Fk,p as _h}from"./chunk-QP2F42DV.js";var Z=e=>typeof e=="string"&&e?e:void 0;var Wk="en",uc=null,Uk=Wk,Gk=null;function Mue(e,o,t){uc=e??null,Uk=o||Wk,Gk=t??null}function se(){return Gk}function Ah(){return Uk}function zk(){return uc}function Hk(e,o){return o?e.replace(/\{([A-Za-z][A-Za-z0-9_]*)\}/g,(t,r)=>He(o,r)?String(G(o,r)):t):e}function i(e,o){let t=uc?G(uc,e):void 0;if(typeof t=="function"){try{let r=Z(t(o??{}));if(r)return r}catch{}return Hk(e,o)}return Hk(Z(t)??e,o)}function Mo(e,o,t,r){return i(t===1?e:o,{...r,n:t})}import{jsx as Rh,Fragment as w6,jsxs as C6}from"react/jsx-runtime";import{createContext as k6,useContext as v6}from"react";var T6={mirrorHostStyles:!0,css:null,fontHrefs:[]},$k=k6(T6);function Gue({value:e,children:o}){return Rh($k.Provider,{value:e,children:o})}function Lh(){return v6($k)}function Kk(){let{css:e,fontHrefs:o}=Lh();return C6(w6,{children:[o.map(t=>Rh("link",{rel:"stylesheet",href:t},t)),e?Rh("style",{"data-sf-canvas-css":"",children:e}):null]})}import{jsx as P6}from"react/jsx-runtime";import{createContext as E6,useContext as O6}from"react";var jk=E6(void 0);function jue({metadata:e,children:o}){return P6(jk.Provider,{value:e,children:o})}var Vk=()=>O6(jk);import{jsx as ko,Fragment as o6,jsxs as Vd}from"react/jsx-runtime";import{useCallback as hl,useEffect as br,useRef as cue,useState as Z5}from"react";import{SettingsSwitch as fue}from"efficient-easel/panel";import{PagesIcon as pue,StylesIcon as uue}from"efficient-easel/rail";import{PaletteIcon as mue}from"efficient-shell/icons/efficient";import{Subtree as hue,TreeRow as t6}from"efficient-easel/tree";import{useEasel as r6}from"efficient-easel/easel";import{useEaselStrings as a6}from"efficient-easel/strings";import{createContext as _6,useContext as A6}from"react";var Fh=_6(!1),que=()=>A6(Fh);import{useMemo as R6,useRef as L6}from"react";import{useEaselApi as F6}from"efficient-easel/easel";import{useSectionOps as B6}from"efficient-easel/screen/lib/document/use-section-ops";function mc(){let e=F6(),o=B6(),t=L6(o);return t.current=o,R6(()=>({getItemById:r=>e.getState().getItemById(r),getSelectorForId:r=>e.getState().getSelectorForId(r),get components(){return e.getState().config.components},replace:(r,a,n)=>t.current.replaceComponent(r,a,n)}),[e])}import{encodePartId as o7}from"efficient-easel/draw";import{insertAt as t7,moveTo as r7,removeAt as a7}from"efficient-easel/fields";function er(e,o){let t=globalThis,r=Symbol.for(e),a=t[r];return a===void 0&&(a=o(),t[r]=a),a}function Cl(){return er("efficient.slot-field-blocks",()=>new Set)}var mo="dataSource",Cr="dataSourceOptions",D6="dataRows",At="countKey",kl="counts",lme="location-payment-methods",Xk="shop-payment-methods",ime="delivery-options",Zk="blog-categories",Bh="dealers";function N6(e){return typeof e.open=="function"}var Jk=/^[a-z][a-z0-9]*(-[a-z0-9]+)*$/;function Qk(e){return typeof e=="string"&&Jk.test(e)}var Yk=new Set([Bh]);function vl(){return er("efficient.block-sources",()=>({sources:new Map,revision:0}))}var M6=e=>[e?.key,e?.label,e?.value].every(o=>typeof o=="string"&&o.trim()!==""),H6=e=>[e?.key,e?.label].every(o=>typeof o=="string"&&o.trim()!==""),qk=e=>typeof e=="string"&&e.trim()!=="";function W6(e){if(!e||!qk(e.label))return null;if(N6(e))return{label:e.label.trim(),open:e.open};let o=e.href;return qk(o)?{label:e.label.trim(),href:o.trim()}:null}function U6(e){if(typeof e.key!="string"||!Jk.test(e.key))throw new Error(`A block source key is lower-case words joined by hyphens, not ${JSON.stringify(e.key)}.`);if(typeof e.label!="string"||!e.label.trim())throw new Error(`The block source ${e.key} has no label.`);if(!Array.isArray(e.blocks)||!e.blocks.length||e.blocks.some(r=>typeof r!="string"||!r))throw new Error(`The block source ${e.key} names no block it can fill.`);let o=e.blocks.find(r=>Cl().has(r));if(o)throw new Error(`The block source ${e.key} names ${o}, whose card template declares slot fields: slot fields take the place of a source's fields, so a block with slot fields reads no source.`);let t=W6(e.edit);return{key:e.key,label:e.label.trim(),blocks:[...e.blocks],...e.sample?{sample:e.sample.map(r=>tv(r)).filter(r=>r!==null)}:{},...Array.isArray(e.choices)?{choices:e.choices.filter(M6)}:{},...Array.isArray(e.fields)?{fields:e.fields.filter(H6).map(r=>({...r}))}:{},...t?{edit:t}:{},...typeof e.useRows=="function"?{useRows:e.useRows}:{},...Array.isArray(e.records)?{records:e.records.filter(r=>typeof r=="string"&&r.trim()!=="").map(r=>r.trim())}:{}}}function dme(e){let o=e.map(U6),t=vl();for(let r of o)t.sources.set(r.key,r);o.length&&(t.revision+=1)}function ev(e){let o=[...vl().sources.values()],t=[...o.filter(r=>!Yk.has(r.key)),...o.filter(r=>Yk.has(r.key))];return e===void 0?t:t.filter(r=>r.blocks.includes(e))}function hc(e){return vl().sources.get(e)??null}function ov(e){return vl().sources.get(e)?.choices??[]}function cme(){return vl().revision}function oo(e){let o=e?.[mo];return typeof o=="string"?o.trim():""}function tv(e){if(!e||typeof e!="object"||Array.isArray(e))return null;let o={};for(let[t,r]of Object.entries(e)){let a=Z(r);a&&(o[t]=a)}return Object.keys(o).length?o:null}function G6(e){let o=e?.[D6];return Array.isArray(o)?o.map(tv).filter(t=>t!==null):null}function fme(e,o,t=[]){let r=G6(e);if(r!==null&&(r.length||!o))return{rows:r,sample:!1};if(!o)return{rows:[],sample:!1};let a=hc(oo(e))?.sample;return{rows:a?.length?a:t,sample:!0}}import{isNodeList as c3}from"efficient-easel/data";var rv=["general","commerce","service"],Xr=[{key:"openers",title:"Hero & intros",defaultExpanded:!0,templateable:!0,sections:[{type:"Hero",label:"Hero",set:"general"},{type:"HeroSingle",label:"Hero Single",set:"general"},{type:"IntroBleed",label:"Scroll-Over Text",set:"general"}]},{key:"shop",title:"Shop & galleries",templateable:!0,sections:[{type:"Collections",label:"Collections",set:"commerce"},{type:"AlloyWheelsListing",label:"List",set:"commerce"},{type:"CatalogFilterBar",label:"Catalog Filter Bar",set:"commerce"},{type:"ProductGrid",label:"Product Grid",set:"commerce"},{type:"FitmentFinder",label:"Fitment Form",set:"commerce"},{type:"GalleryB",label:"Gallery",set:"commerce"}]},{key:"product",title:"Product page",templateable:!0,sections:[{type:"ProductHero",label:"Product Hero",set:"commerce"},{type:"SpecTable",label:"Spec Table",set:"commerce"},{type:"ProcessSteps",label:"Image & Text Columns",set:"general"},{type:"DetailRows",label:"Feature Rows",set:"commerce"},{type:"FitmentTable",label:"Fitment Table",set:"commerce"},{type:"TyreSizes",label:"Tyre Sizes",set:"commerce"}]},{key:"checkout",title:"Checkout & ordering",templateable:!0,sections:[{type:"OrderSummary",label:"Order Table",set:"general"},{type:"CheckoutCTA",label:"Ready-to-Order Banner",set:"commerce"}]},{key:"about",title:"About & brand story",templateable:!0,sections:[{type:"Footprint",label:"Locations Map",set:"general"}]},{key:"content",title:"Text & content",templateable:!0,sections:[{type:"Cards",label:"Cards",set:"general"}]},{key:"proof",title:"Stats & social proof",templateable:!0,sections:[{type:"Stats",label:"Stats",set:"general"},{type:"Chart",label:"Chart",set:"general"},{type:"Mockup",label:"Mockup Card",set:"general"},{type:"Reviews",label:"Reviews",set:"service"}]},{key:"promo",title:"Promotions & sign-ups",templateable:!0,sections:[{type:"Countdown",label:"Countdown",set:"general"}]},{key:"blog",title:"Blog & journal",templateable:!0,sections:[{type:"FeaturedCover",label:"Feature Banner",set:"general"},{type:"LongRead",label:"Article Text",set:"general"},{type:"ArticleBody",label:"Article Body",set:"service"},{type:"Events",label:"Latest Posts",set:"service"}]},{key:"navigation",title:"Navigation & wayfinding",templateable:!0,sections:[{type:"Breadcrumb",label:"Breadcrumb",set:"general"}]},{key:"legal",title:"Legal & documents",templateable:!0,sections:[{type:"DocBody",label:"Document Text",set:"general"}]},{key:"contact",title:"Contact, FAQ & forms",templateable:!0,sections:[{type:"FAQ",label:"Q&A",set:"general"},{type:"ContactRouting",label:"Contact Form",set:"service"},{type:"ContactLocations",label:"Contact / Locations",set:"general"},{type:"SubmitBuild",label:"Photo Submission Form",set:"service"},{type:"ReviewForm",label:"Review Form",set:"service"},{type:"Form",label:"Form",set:"service"},{type:"AppointmentBooking",label:"Booking Form",set:"service"}]},{key:"structure",title:"Layout, structure & embeds",templateable:!1,sections:[{type:"SectionHeader",label:"Section Header",set:"general"},{type:"Flex",label:"Box",set:"general"},{type:"Divider",label:"Divider",set:"general"},{type:"CustomHTML",label:"Custom HTML",set:"general"}]},{key:"layouts",title:"Layouts",templateable:!0,sections:[{type:"Manifesto",label:"Brand Text",set:"general"},{type:"Split",label:"Image & Text Split",set:"general"},{type:"Subscribe",label:"Signup Form",set:"service"},{type:"Ticker",label:"Scrolling Bar",set:"general"},{type:"SpecStrip",label:"Spec Strip",set:"general"},{type:"TimelineTrack",label:"Milestone Timeline",set:"general"},{type:"Timeline",label:"Story Timeline",set:"general"},{type:"Logos",label:"Logos",set:"general"},{type:"DocMasthead",label:"Page Header",set:"general"},{type:"DocTabs",label:"Tab Bar",set:"general"},{type:"Prose",label:"Editorial Text",set:"general"},{type:"ParagraphsA",label:"Lead Text",set:"general"},{type:"TitleWithButtons",label:"Call-to-Action Heading",set:"general"},{type:"Banner",label:"Banner",set:"general"}]}];function mme(){return Object.fromEntries(Xr.map(e=>[e.key,{title:e.title,components:e.sections.map(o=>o.type),...e.defaultExpanded?{defaultExpanded:!0}:{}}]))}var z6="2027-02-05",av={CategoryBar:{label:"Category bar",note:`The reviewer, 2026-11-06 (the page headers and the tab bars become TWO Layouts rows, Page Header and Tab Bar): Category Bar folds into the Tab Bar. Retired from the Add menu with no second preset.
2
2
 
3
3
  WHAT REPLACES IT: Tab Bar, a Box pinned under the header that stays above the sections after it, with a line below, holding the Menu block (One row, Menu style Tabs, Current page). Set the Menu's content to Blog categories: the blog's own categories, most posts first, each with its count in its cell (the host seeds the count card, Count on). Its converter row (\`section-to-box-rows-tabbar\` \`categoryBar\`, OFF) draws that bar for a stored page that moves later.
4
4
 
@@ -70,7 +70,7 @@ WHAT A MERCHANT LOSES: the label as a section of its own, with its fixed head ("
70
70
 
71
71
  NO CONVERTER ROW: 0 EU Tyre Labels are stored on the US and AU sites (inovit_us and inovit_au, \`layout\` and \`published_layout\`; read only, 2026-11-10). Old sites stay as they are (owner, 2026-11-06).
72
72
 
73
- THE TYPE KEY STAYS AND SO DOES THE COMPONENT (efficient-storefront-blocks EuTyreLabels). A stored EU Tyre Label still renders through it and can still be edited, its width, heading level, settings groups and cover included; no document is rewritten.`},PaymentBadges:{label:"Payment Methods",note:"Owner, 2026-10-10: Logos and Payment Methods are one block, and a payment wall is a Logos block with the payment chip for its look. 2026-11-07: the dot before each line is a Mark Box at full strength (approved).\n\nWHAT REPLACES IT: the Logos row (Layouts group), Logo style Cards. Field by field, as its converter row (`section-to-box-rows-logos`) moves it: `heading` is a Text block; each of `badges` is a Logo block in the wall, its name the Logo's name and its `src` the Logo's picture; `dataSource` is the wall's own Logo content row (\"Ways to pay here\" or \"Ways to pay at checkout\", served by the backend to Logos too), and the wall draws ONE Logo card template per served method, the same chip; `assurances` are a Reassurance Box of lines, each a Mark Box (an empty Box, 4 x 4, Corners 2, Fill main) before a Text; `contained` is the Box's site frame. A press of this type lays down that Box (SECTION_TO_BOX_PRESS).\n\nWHAT A MERCHANT LOSES: the 60% and 70% opacity of the old dot and words (a Box and a Text have no opacity: the dot is the main colour, the words the label ink) and the 4px gap between wrapped lines (a Box has one Gap). No field is lost.\n\n4 Payment Methods nodes are stored on the US sites, all on template pages, draft only, all fed by a source; 0 on pages (read only, 2026-11-07). Old sites stay as they are (owner, 2026-11-06); moving a page is a separate write.\n\nTHE TYPE KEY STAYS AND SO DOES THE COMPONENT. A stored Payment Methods node still renders through it, its dot included, and can still be edited; no document is rewritten."},Gallery:{label:"Tabbed Gallery",note:'Owner, 2026-10-10 (approved): the Tabbed Gallery goes into the Customer Photo Grid, and the one that is left is called Gallery; its vehicle / wheel / others halves become a Tabs list, and its wall becomes one of the photo layouts. Retired from the Add menu with no preset row and no migration.\n\nWHAT REPLACES IT, field by field: the Gallery (`GalleryB`). `mode` both = a Box in Tabs mode with one Gallery per panel; one mode = one Gallery, no Tabs Box. `vehicleTabLabel` / `wheelTabLabel` = the Box\'s panel names, Tab shape "Large tabs" (this strip is the Tabbed Gallery\'s own, class for class); `showTabs` off = the Box Stacked. `source` (one product, or All products and a `category`) = each Gallery\'s `dataSource: "product-pictures"`, with `product`, `designCode`, `mediaZone` (lifestyle = the vehicle half, photos = the wheel half, others) and `category`; it reads live on every view, nothing is baked. `kicker`, the titles, `*Body1` / `*Body2` = Text blocks in the panel\'s Box (Heading N, Body N); `showIntro` off = the Layers eye. `*Stats` = a Stats block; `breadcrumbLabel` = a Breadcrumb block; `showFilters`, `showCount`, `showSort` = a Filter chips block over the Gallery (`showCount`, `showSort`). A card\'s `image`, `photos`, `href`, `name`, `meta`, `process` (the Tag) and `eyebrow` (the caption line over the title) = a Gallery Item\'s, or the served row\'s. The wall (two half, then thirds, 4:3, one across on a phone) = layout "Two, then threes" (`twoThenThreesPhoto`), the default for product pictures. Words at rest, the tile number, the hover zoom and the lightbox\'s "View product" are the Gallery card\'s. `previewTab` = the Box Tabs pane switch; `previewHover` = the Gallery\'s own. `anchor`, `sectionAccent` and `_partStyles` are the same injected keys on the Box and the Gallery.\n\nWHAT A MERCHANT LOSES: the per-tab note under each tab ("N items \xB7 Community photos" / "Featured photos", desktop only): Large tabs draws the letter and the name only. Accepted only because nothing stored moves now. \u26D4 A "Tab note" Box setting MUST exist before the /gallery move: a moved page with no home for it loses a line the shopper sees. Also lost: the empty line ("No items in this gallery yet." / "No items match this filter."); an empty Gallery draws nothing, and the chips come from the tiles, so "no match" cannot happen.\n\nNO CONVERTER ROW: no stored node is rewritten and SECTION_TO_BOX_ON stays without it (owner, 2026-11-06: old sites stay as they are). 2 Tabbed Gallery nodes are stored on the US sites, both top level, draft equal to published (read only, 2026-11-08): `Gallery-f1eb706a` (inovit.com /gallery: mode both, every show flag on, All products, 10 + 10 cards, 20 of 20 with a caption, 3 + 3 stats) and `Gallery-ce49eb98` (hartesmetal.com /gallery: mode vehicles, count and stats on, All products, 49 cards, 0 with a caption, 2 stats).\n\nTHE MOVE RECIPE, for the day the owner orders the /gallery move (a live write, his word): a Box in Tabs mode (inovit) or one Gallery (hartes); each Gallery `dataSource: "product-pictures"`, `mediaZone` lifestyle / photos, and `displayPhone: {tag:true}` (a new Gallery stores `{tag:false}`, and the Tabbed Gallery drew its Tag at every width). The captions: the stored ones are frozen copies that live only in the page; a product-pictures row serves its media group\'s `vehicle` as `eyebrow`, and that is empty on every group today (the editor\'s product binding clears `eyebrow` and reads only `vehicle`). So carry them as typed Gallery Items with the stored `eyebrow` copies, OR fill each media group\'s `vehicle` first (a data write). It needs efficient-storefront-blocks 0.91.0 (the photo layout default and the stored cards kept on open) and the backend\'s product-pictures source (106.0.0).\n\nTHE TYPE KEY STAYS AND SO DOES THE COMPONENT (efficient-storefront-blocks GalleryShowcase). A stored Tabbed Gallery still renders through it and can still be edited, its source row, cover, width, heading level and settings groups included; in Layers it keeps its block\'s own label, "Tabbed Gallery". Delete the component only when the last stored `Gallery` node is gone.'}},Nh=Object.fromEntries(Object.entries(av).map(([e,o])=>[e,o.note])),hme=["Grid","Spacer","TyreFitment"],xme=Array.from(new Set([...Xr.flatMap(e=>e.sections.map(o=>o.type)),...Object.keys(Nh)])),$6=Object.fromEntries(Object.entries(av).map(([e,o])=>[e,o.label])),xc={...$6,...Object.fromEntries(Xr.flatMap(e=>e.sections.map(o=>[o.type,o.label])))},K6={Heading:"general",Text:"general",Eyebrow:"general",ImageBlock:"general",LogoBlock:"general",LocationMap:"general",Contents:"general",ListSearch:"general",ButtonBlock:"general",CardList:"general",PostCard:"general",HeroSlide:"general",HeroGroup:"general",Integrations:"general",Grid:"general",KeyFeatures:"general",Spacer:"general",Series:"general",DocMetaCards:"general",StatsParagraph:"general",Testimonials:"general",Masthead:"general",CategoryBar:"general",CollectionCard:"commerce",GalleryItem:"commerce",ProductRef:"commerce",CompatibleTyres:"commerce",DeliveryOptions:"commerce",Header:"commerce",SearchBlock:"commerce",CartBlock:"commerce",CountrySwitchBlock:"commerce",AccountBlock:"commerce",ThemeSwitchBlock:"commerce",ProductGallery:"commerce",EuTyreLabelBlock:"commerce",SubmitBox:"service",BookingBox:"service",SubscribeBlogs:"service",RatingBlock:"service",Footer:"service",FooterLogo:"service",FooterMenu:"service",FooterDivider:"service",FooterGroup:"service",FooterText:"service",FooterEmailSignup:"service",FooterSocial:"service",FooterPayment:"service",MenuBlock:"service",MenuLinkBlock:"service",ProductPrice:"commerce",ProductSize:"commerce",ProductColour:"commerce",ProductPicture:"commerce",ProductEyebrow:"commerce",ProductName:"commerce",ProductSpecs:"commerce",ProductBuy:"commerce",FitmentPicker:"commerce",StockFitment:"commerce",RelatedProducts:"commerce",BundleOffer:"commerce",TyreFitment:"commerce",EuTyreLabel:"commerce",PaymentBadges:"general",Gallery:"commerce",EmailFormBlock:"service",SocialLogosBlock:"service",PaymentLogosBlock:"service",LegalLineBlock:"service",SiteHeader:"service",SiteFooter:"service"},Dh={...K6,...Object.fromEntries(Xr.flatMap(e=>e.sections.map(o=>[o.type,o.set])))};function nv(e){return G(Dh,e)}function Mh(e){return Object.keys(Dh).filter(o=>G(Dh,o)===e).sort()}var gme=Mh("general"),Ime=Mh("commerce"),bme=Mh("service"),Hh="Flex",kr="Box",yme=`${kr}es`;function j6(e){return e==="section"?"Blank section":kr}function Wh(e,o,t){return e===Hh?j6(o):t}var re="content",K="Flex",V6="Text & media",Y6="Layout & structure",lv=[{type:"Eyebrow",label:"Eyebrow",retired:!0},{type:"Heading",label:"Heading",retired:!0},{type:"Text",label:"Text"},{type:"ImageBlock",label:"Image"},{type:"LogoBlock",label:"Logo"},{type:"LocationMap",label:"Map"},{type:"ButtonBlock",label:"Button"},{type:"Contents",label:"Contents"}],q6=[...lv,{type:"ListSearch",label:"List search"},{type:"Form",label:"Form"},{type:"PostCard",label:"Post Card"},{type:"Stats",label:"Stats",retired:!0},{type:"MenuBlock",label:"Menu"},{type:"EmailFormBlock",label:"Email Form"},{type:"SocialLogosBlock",label:"Social Logos"},{type:"PaymentLogosBlock",label:"Payment Logos",retired:!0},{type:"LegalLineBlock",label:"Legal Line"},{type:"SearchBlock",label:"Search"},{type:"CartBlock",label:"Cart"},{type:"CountrySwitchBlock",label:"Country Switch"},{type:"AccountBlock",label:"Account"},{type:"ThemeSwitchBlock",label:"Theme Switch"}].map(e=>({...e,group:V6})),X6=(Xr.find(e=>e.key==="structure")?.sections??[]).map(e=>({type:e.type,label:e.label,group:Y6})),sv=[...q6,...X6],Uh=[...lv,{type:"HeroGroup",label:kr}],kme=Uh.map(e=>e.type),Z6=1,J6=Uh.filter(e=>e.type!=="HeroGroup");function Q6(e){return e<Z6?Uh:J6}var eW={Flex:{slot:re,choices:()=>sv},Grid:{slot:re,choices:()=>sv},HeroGroup:{slot:re,choices:Q6}};function iv(e,o=0){let t=G(eW,e);return t?{slot:t.slot,choices:t.choices(o)}:null}import{applyMark as Ame,markupTools as Rme,MARKUP_TOOLS as Lme,COPY_FIELD_TOOLS as Fme,STOREFRONT_MARKUP as Bme,tokenizeInline as Dme,stripInline as Nme,isSafeLinkHref as hv}from"efficient-shell/markup";import{applyMark as uW,clearStyle as mW,markedAt as hW,markupTools as xW,MARKUP_TOOLS as gW,parseMarkup as IW,RETIRED_MARKS as bW,STOREFRONT_MARKUP as yW,tokenizeInline as Hme}from"efficient-shell/markup";var Ra=["highlight","strong","quiet"],La={highlight:"Highlight",strong:"Bold",quiet:"Quiet"},or={highlight:{kind:"wordHighlight",delimiter:"@@"},strong:{kind:"wordStrong",delimiter:"++"},quiet:{kind:"wordQuiet",delimiter:"^^"}},pv=Object.fromEntries(Ra.map(e=>[or[e].kind,e])),uv="data-sf-ws",oW=["accent","text","labels"],Zr={accent:"var(--accent)",text:"var(--fg)",labels:"var(--fg-dim)"},tW=80,rW=120,aW=100,nW=900,sW=.5,lW=3,iW=-.1,dW=.5,cW=3,Gh={font:null,size:null,weight:null,bold:null,italic:null,lineGap:null,textGap:null,colour:null},fW={highlight:{...Gh},strong:{...Gh},quiet:{...Gh}};function dv(e,o,t){return typeof e!="number"||!Number.isFinite(e)?null:Math.round(Math.min(Math.max(e,o),t))}function cv(e,o,t){if(typeof e!="number"||!Number.isFinite(e))return null;let r=10**cW;return Math.round(Math.min(Math.max(e,o),t)*r)/r}function fv(e){return typeof e=="boolean"?e:null}function pW(e){let o=typeof e?.font=="string"&&Ot.some(r=>r.key===e.font)?e.font:null,t=typeof e?.colour=="string"&&oW.includes(e.colour)?e.colour:null;return{font:o,size:dv(e?.size,tW,rW),weight:dv(e?.weight,aW,nW),bold:fv(e?.bold),italic:fv(e?.italic),lineGap:cv(e?.lineGap,sW,lW),textGap:cv(e?.textGap,iW,dW),colour:t}}function mv(e){let o={};for(let t of Ra)o[t]=e&&t in e&&e[t]?pW(e[t]):{...fW[t]};return o}function Pme(e){let o=mv(e),t={};for(let r of Ra){let a=o[r],n=`--sf-ws-${r}`;if(a.font){let s=Ot.find(l=>l.key===a.font);s&&(t[`${n}-font`]=`var(${s.cssVar})`)}a.size!==null&&(t[`${n}-size`]=`${a.size/100}em`),a.weight!==null&&(t[`${n}-weight`]=String(a.weight)),a.bold!==null&&(t[`${n}-weight-bold`]=a.bold?"700":"400"),a.italic!==null&&(t[`${n}-style`]=a.italic?"italic":"normal"),a.lineGap!==null&&(t[`${n}-line`]=String(a.lineGap)),a.textGap!==null&&(t[`${n}-track`]=`${a.textGap}em`),a.colour!==null&&(t[`${n}-color`]=Zr[a.colour])}return t}function Eme(e){let o=e?.word_styles??void 0,t={};for(let r of Ra)o&&r in o&&(t[r]=o[r]??null);return mv(t)}var SW=new Set(["strong"]),xv=Ra.map(e=>({open:or[e].delimiter,close:or[e].delimiter,kind:or[e].kind,...SW.has(e)?{wordStart:!0}:{}})),Ume=[{style:or.highlight.kind,label:La.highlight,title:`${La.highlight} word style`},{style:or.strong.kind,label:La.strong,title:`${La.strong} word style`},{style:or.quiet.kind,label:La.quiet,title:`${La.quiet} word style`}],wW=new Set(xv.map(e=>e.open)),Fa=[...yW.filter(e=>!wW.has(e.open)),...xv];function zh(e){return e.bullet?"- ":e.number!=null?`${e.number}. `:""}function os(e){return IW(typeof e=="string"?e:"",Fa)}var CW=gW.map(e=>e.style).filter(e=>!bW.includes(e)).filter(e=>Fa.some(o=>o.kind===e));function gv(){return xW(CW)}var Iv=Object.fromEntries(Ra.map(e=>[or[e].kind,or[e].delimiter]));function bv(e,o,t,r){let a=Iv[r];if(!a)return uW(e,o,t,r);let n=e.slice(o,t),s=e.slice(Math.max(0,o-a.length),o),l=e.slice(t,t+a.length);if(s===a&&l===a)return{text:e.slice(0,o-a.length)+n+e.slice(t+a.length),selectionStart:o-a.length,selectionEnd:o-a.length+n.length};let d=n||"styled text";return{text:e.slice(0,o)+a+d+a+e.slice(t),selectionStart:o+a.length,selectionEnd:o+a.length+d.length}}function yv(e,o,t,r){let a=Iv[r];return a?o>=a.length&&e.slice(o-a.length,o)===a&&e.slice(t,t+a.length)===a:hW(e,o,t,r)}function Ba(e){return e.replace(/==(.+?)==/g,(o,t)=>t.startsWith("_")&&t.endsWith("_")?o:`==_${t}_==`)}function vr(e){return os(e).map(o=>zh(o)+wv(o.children)).join(`
73
+ THE TYPE KEY STAYS AND SO DOES THE COMPONENT (efficient-storefront-blocks EuTyreLabels). A stored EU Tyre Label still renders through it and can still be edited, its width, heading level, settings groups and cover included; no document is rewritten.`},PaymentBadges:{label:"Payment Methods",note:"Owner, 2026-10-10: Logos and Payment Methods are one block, and a payment wall is a Logos block with the payment chip for its look. 2026-11-07: the dot before each line is a Mark Box at full strength (approved).\n\nWHAT REPLACES IT: the Logos row (Layouts group), Logo style Cards. Field by field, as its converter row (`section-to-box-rows-logos`) moves it: `heading` is a Text block; each of `badges` is a Logo block in the wall, its name the Logo's name and its `src` the Logo's picture; `dataSource` is the wall's own Logo content row (\"Ways to pay here\" or \"Ways to pay at checkout\", served by the backend to Logos too), and the wall draws ONE Logo card template per served method, the same chip; `assurances` are a Reassurance Box of lines, each a Mark Box (an empty Box, 4 x 4, Corners 2, Fill main) before a Text; `contained` is the Box's site frame. A press of this type lays down that Box (SECTION_TO_BOX_PRESS).\n\nWHAT A MERCHANT LOSES: the 60% and 70% opacity of the old dot and words (a Box and a Text have no opacity: the dot is the main colour, the words the label ink) and the 4px gap between wrapped lines (a Box has one Gap). No field is lost.\n\n4 Payment Methods nodes are stored on the US sites, all on template pages, draft only, all fed by a source; 0 on pages (read only, 2026-11-07). Old sites stay as they are (owner, 2026-11-06); moving a page is a separate write.\n\nTHE TYPE KEY STAYS AND SO DOES THE COMPONENT. A stored Payment Methods node still renders through it, its dot included, and can still be edited; no document is rewritten."},Gallery:{label:"Tabbed Gallery",note:'Owner, 2026-10-10 (approved): the Tabbed Gallery goes into the Customer Photo Grid, and the one that is left is called Gallery; its vehicle / wheel / others halves become a Tabs list, and its wall becomes one of the photo layouts. Retired from the Add menu with no preset row and no migration.\n\nWHAT REPLACES IT, field by field: the Gallery (`GalleryB`). `mode` both = a Box in Tabs mode with one Gallery per panel; one mode = one Gallery, no Tabs Box. `vehicleTabLabel` / `wheelTabLabel` = the Box\'s panel names, Tab shape "Large tabs" (this strip is the Tabbed Gallery\'s own, class for class); `showTabs` off = the Box Stacked. `source` (one product, or All products and a `category`) = each Gallery\'s `dataSource: "product-pictures"`, with `product`, `designCode`, `mediaZone` (lifestyle = the vehicle half, photos = the wheel half, others) and `category`; it reads live on every view, nothing is baked. `kicker`, the titles, `*Body1` / `*Body2` = Text blocks in the panel\'s Box (Heading N, Body N); `showIntro` off = the Layers eye. `*Stats` = a Stats block; `breadcrumbLabel` = a Breadcrumb block; `showFilters`, `showCount`, `showSort` = a Filter chips block over the Gallery (`showCount`, `showSort`). A card\'s `image`, `photos`, `href`, `name`, `meta`, `process` (the Tag) and `eyebrow` (the caption line over the title) = a Gallery Item\'s, or the served row\'s. The wall (two half, then thirds, 4:3, one across on a phone) = layout "Two, then threes" (`twoThenThreesPhoto`), the default for product pictures. Words at rest, the tile number, the hover zoom and the lightbox\'s "View product" are the Gallery card\'s. `previewTab` = the Box Tabs pane switch; `previewHover` = the Gallery\'s own. `anchor`, `sectionAccent` and `_partStyles` are the same injected keys on the Box and the Gallery.\n\nWHAT A MERCHANT LOSES: the per-tab note under each tab ("N items \xB7 Community photos" / "Featured photos", desktop only): Large tabs draws the letter and the name only. Accepted only because nothing stored moves now. \u26D4 A "Tab note" Box setting MUST exist before the /gallery move: a moved page with no home for it loses a line the shopper sees. Also lost: the empty line ("No items in this gallery yet." / "No items match this filter."); an empty Gallery draws nothing, and the chips come from the tiles, so "no match" cannot happen.\n\nNO CONVERTER ROW: no stored node is rewritten and SECTION_TO_BOX_ON stays without it (owner, 2026-11-06: old sites stay as they are). 2 Tabbed Gallery nodes are stored on the US sites, both top level, draft equal to published (read only, 2026-11-08): `Gallery-f1eb706a` (inovit.com /gallery: mode both, every show flag on, All products, 10 + 10 cards, 20 of 20 with a caption, 3 + 3 stats) and `Gallery-ce49eb98` (hartesmetal.com /gallery: mode vehicles, count and stats on, All products, 49 cards, 0 with a caption, 2 stats).\n\nTHE MOVE RECIPE, for the day the owner orders the /gallery move (a live write, his word): a Box in Tabs mode (inovit) or one Gallery (hartes); each Gallery `dataSource: "product-pictures"`, `mediaZone` lifestyle / photos, and `displayPhone: {tag:true}` (a new Gallery stores `{tag:false}`, and the Tabbed Gallery drew its Tag at every width). The captions: the stored ones are frozen copies that live only in the page; a product-pictures row serves its media group\'s `vehicle` as `eyebrow`, and that is empty on every group today (the editor\'s product binding clears `eyebrow` and reads only `vehicle`). So carry them as typed Gallery Items with the stored `eyebrow` copies, OR fill each media group\'s `vehicle` first (a data write). It needs efficient-storefront-blocks 0.91.0 (the photo layout default and the stored cards kept on open) and the backend\'s product-pictures source (106.0.0).\n\nTHE TYPE KEY STAYS AND SO DOES THE COMPONENT (efficient-storefront-blocks GalleryShowcase). A stored Tabbed Gallery still renders through it and can still be edited, its source row, cover, width, heading level and settings groups included; in Layers it keeps its block\'s own label, "Tabbed Gallery". Delete the component only when the last stored `Gallery` node is gone.'}},Nh=Object.fromEntries(Object.entries(av).map(([e,o])=>[e,o.note])),hme=["Grid","Spacer","TyreFitment"],xme=Array.from(new Set([...Xr.flatMap(e=>e.sections.map(o=>o.type)),...Object.keys(Nh)])),$6=Object.fromEntries(Object.entries(av).map(([e,o])=>[e,o.label])),xc={...$6,...Object.fromEntries(Xr.flatMap(e=>e.sections.map(o=>[o.type,o.label])))},K6={Heading:"general",Text:"general",Eyebrow:"general",ImageBlock:"general",LogoBlock:"general",LocationMap:"general",Contents:"general",ListSearch:"general",ButtonBlock:"general",CardList:"general",PostCard:"general",HeroSlide:"general",HeroGroup:"general",Integrations:"general",Grid:"general",KeyFeatures:"general",Spacer:"general",Series:"general",DocMetaCards:"general",StatsParagraph:"general",Testimonials:"general",Masthead:"general",CategoryBar:"general",CollectionCard:"commerce",GalleryItem:"commerce",ProductRef:"commerce",CompatibleTyres:"commerce",DeliveryOptions:"commerce",Header:"commerce",SearchBlock:"commerce",CartBlock:"commerce",CountrySwitchBlock:"commerce",AccountBlock:"commerce",ThemeSwitchBlock:"commerce",ProductGallery:"commerce",EuTyreLabelBlock:"commerce",WheelDiagram:"commerce",SubmitBox:"service",BookingBox:"service",SubscribeBlogs:"service",RatingBlock:"service",Footer:"service",FooterLogo:"service",FooterMenu:"service",FooterDivider:"service",FooterGroup:"service",FooterText:"service",FooterEmailSignup:"service",FooterSocial:"service",FooterPayment:"service",MenuBlock:"service",MenuLinkBlock:"service",ProductPrice:"commerce",ProductSize:"commerce",ProductColour:"commerce",ProductPicture:"commerce",ProductEyebrow:"commerce",ProductName:"commerce",ProductSpecs:"commerce",ProductBuy:"commerce",FitmentPicker:"commerce",StockFitment:"commerce",RelatedProducts:"commerce",BundleOffer:"commerce",TyreFitment:"commerce",EuTyreLabel:"commerce",PaymentBadges:"general",Gallery:"commerce",EmailFormBlock:"service",SocialLogosBlock:"service",PaymentLogosBlock:"service",LegalLineBlock:"service",SiteHeader:"service",SiteFooter:"service"},Dh={...K6,...Object.fromEntries(Xr.flatMap(e=>e.sections.map(o=>[o.type,o.set])))};function nv(e){return G(Dh,e)}function Mh(e){return Object.keys(Dh).filter(o=>G(Dh,o)===e).sort()}var gme=Mh("general"),Ime=Mh("commerce"),bme=Mh("service"),Hh="Flex",kr="Box",yme=`${kr}es`;function j6(e){return e==="section"?"Blank section":kr}function Wh(e,o,t){return e===Hh?j6(o):t}var re="content",K="Flex",V6="Text & media",Y6="Layout & structure",lv=[{type:"Eyebrow",label:"Eyebrow",retired:!0},{type:"Heading",label:"Heading",retired:!0},{type:"Text",label:"Text"},{type:"ImageBlock",label:"Image"},{type:"LogoBlock",label:"Logo"},{type:"LocationMap",label:"Map"},{type:"ButtonBlock",label:"Button"},{type:"Contents",label:"Contents"}],q6=[...lv,{type:"ListSearch",label:"List search"},{type:"Form",label:"Form"},{type:"PostCard",label:"Post Card"},{type:"Stats",label:"Stats",retired:!0},{type:"MenuBlock",label:"Menu"},{type:"EmailFormBlock",label:"Email Form"},{type:"SocialLogosBlock",label:"Social Logos"},{type:"PaymentLogosBlock",label:"Payment Logos",retired:!0},{type:"LegalLineBlock",label:"Legal Line"},{type:"SearchBlock",label:"Search"},{type:"CartBlock",label:"Cart"},{type:"CountrySwitchBlock",label:"Country Switch"},{type:"AccountBlock",label:"Account"},{type:"ThemeSwitchBlock",label:"Theme Switch"}].map(e=>({...e,group:V6})),X6=(Xr.find(e=>e.key==="structure")?.sections??[]).map(e=>({type:e.type,label:e.label,group:Y6})),sv=[...q6,...X6],Uh=[...lv,{type:"HeroGroup",label:kr}],kme=Uh.map(e=>e.type),Z6=1,J6=Uh.filter(e=>e.type!=="HeroGroup");function Q6(e){return e<Z6?Uh:J6}var eW={Flex:{slot:re,choices:()=>sv},Grid:{slot:re,choices:()=>sv},HeroGroup:{slot:re,choices:Q6}};function iv(e,o=0){let t=G(eW,e);return t?{slot:t.slot,choices:t.choices(o)}:null}import{applyMark as Ame,markupTools as Rme,MARKUP_TOOLS as Lme,COPY_FIELD_TOOLS as Fme,STOREFRONT_MARKUP as Bme,tokenizeInline as Dme,stripInline as Nme,isSafeLinkHref as hv}from"efficient-shell/markup";import{applyMark as uW,clearStyle as mW,markedAt as hW,markupTools as xW,MARKUP_TOOLS as gW,parseMarkup as IW,RETIRED_MARKS as bW,STOREFRONT_MARKUP as yW,tokenizeInline as Hme}from"efficient-shell/markup";var Ra=["highlight","strong","quiet"],La={highlight:"Highlight",strong:"Bold",quiet:"Quiet"},or={highlight:{kind:"wordHighlight",delimiter:"@@"},strong:{kind:"wordStrong",delimiter:"++"},quiet:{kind:"wordQuiet",delimiter:"^^"}},pv=Object.fromEntries(Ra.map(e=>[or[e].kind,e])),uv="data-sf-ws",oW=["accent","text","labels"],Zr={accent:"var(--accent)",text:"var(--fg)",labels:"var(--fg-dim)"},tW=80,rW=120,aW=100,nW=900,sW=.5,lW=3,iW=-.1,dW=.5,cW=3,Gh={font:null,size:null,weight:null,bold:null,italic:null,lineGap:null,textGap:null,colour:null},fW={highlight:{...Gh},strong:{...Gh},quiet:{...Gh}};function dv(e,o,t){return typeof e!="number"||!Number.isFinite(e)?null:Math.round(Math.min(Math.max(e,o),t))}function cv(e,o,t){if(typeof e!="number"||!Number.isFinite(e))return null;let r=10**cW;return Math.round(Math.min(Math.max(e,o),t)*r)/r}function fv(e){return typeof e=="boolean"?e:null}function pW(e){let o=typeof e?.font=="string"&&Ot.some(r=>r.key===e.font)?e.font:null,t=typeof e?.colour=="string"&&oW.includes(e.colour)?e.colour:null;return{font:o,size:dv(e?.size,tW,rW),weight:dv(e?.weight,aW,nW),bold:fv(e?.bold),italic:fv(e?.italic),lineGap:cv(e?.lineGap,sW,lW),textGap:cv(e?.textGap,iW,dW),colour:t}}function mv(e){let o={};for(let t of Ra)o[t]=e&&t in e&&e[t]?pW(e[t]):{...fW[t]};return o}function Pme(e){let o=mv(e),t={};for(let r of Ra){let a=o[r],n=`--sf-ws-${r}`;if(a.font){let s=Ot.find(l=>l.key===a.font);s&&(t[`${n}-font`]=`var(${s.cssVar})`)}a.size!==null&&(t[`${n}-size`]=`${a.size/100}em`),a.weight!==null&&(t[`${n}-weight`]=String(a.weight)),a.bold!==null&&(t[`${n}-weight-bold`]=a.bold?"700":"400"),a.italic!==null&&(t[`${n}-style`]=a.italic?"italic":"normal"),a.lineGap!==null&&(t[`${n}-line`]=String(a.lineGap)),a.textGap!==null&&(t[`${n}-track`]=`${a.textGap}em`),a.colour!==null&&(t[`${n}-color`]=Zr[a.colour])}return t}function Eme(e){let o=e?.word_styles??void 0,t={};for(let r of Ra)o&&r in o&&(t[r]=o[r]??null);return mv(t)}var SW=new Set(["strong"]),xv=Ra.map(e=>({open:or[e].delimiter,close:or[e].delimiter,kind:or[e].kind,...SW.has(e)?{wordStart:!0}:{}})),Ume=[{style:or.highlight.kind,label:La.highlight,title:`${La.highlight} word style`},{style:or.strong.kind,label:La.strong,title:`${La.strong} word style`},{style:or.quiet.kind,label:La.quiet,title:`${La.quiet} word style`}],wW=new Set(xv.map(e=>e.open)),Fa=[...yW.filter(e=>!wW.has(e.open)),...xv];function zh(e){return e.bullet?"- ":e.number!=null?`${e.number}. `:""}function os(e){return IW(typeof e=="string"?e:"",Fa)}var CW=gW.map(e=>e.style).filter(e=>!bW.includes(e)).filter(e=>Fa.some(o=>o.kind===e));function gv(){return xW(CW)}var Iv=Object.fromEntries(Ra.map(e=>[or[e].kind,or[e].delimiter]));function bv(e,o,t,r){let a=Iv[r];if(!a)return uW(e,o,t,r);let n=e.slice(o,t),s=e.slice(Math.max(0,o-a.length),o),l=e.slice(t,t+a.length);if(s===a&&l===a)return{text:e.slice(0,o-a.length)+n+e.slice(t+a.length),selectionStart:o-a.length,selectionEnd:o-a.length+n.length};let d=n||"styled text";return{text:e.slice(0,o)+a+d+a+e.slice(t),selectionStart:o+a.length,selectionEnd:o+a.length+d.length}}function yv(e,o,t,r){let a=Iv[r];return a?o>=a.length&&e.slice(o-a.length,o)===a&&e.slice(t,t+a.length)===a:hW(e,o,t,r)}function Ba(e){return e.replace(/==(.+?)==/g,(o,t)=>t.startsWith("_")&&t.endsWith("_")?o:`==_${t}_==`)}function vr(e){return os(e).map(o=>zh(o)+wv(o.children)).join(`
74
74
  `)}function Sv(e,o,t){return mW(e,o,t,Fa)}function wv(e){return e.map(o=>o.kind==="text"?o.text:wv(o.children)).join("")}function Gme(e){let o=t=>t.some(r=>r.kind==="link"||"children"in r&&o(r.children));return os(e).some(t=>o(t.children))}var tr={min:0,max:360,step:1},Cv="angle";function Kme(e){let o=j(e);if(o===void 0)return null;let t=Math.min(tr.max,Math.max(tr.min,o));return t===tr.min||t===tr.max?null:{rotate:`${t}deg`}}import{MEDIA_ZONES as kW,MEDIA_ZONE_LABELS as vW}from"efficient-easel/screen/lib/content/media-zones";import{HOVER_MOTION as TW,hoverKindsOf as Ic,motionSeconds as gc}from"efficient-shell/format";var qe="hover",Pr="_gHover",Na={none:"None",nextImage:"Show next image",rotate:"Rotate",zoom:"Zoom",lift:"Lift",mono:"Black and white"},rr="highlight",Kh="Highlight",jh=["none",rr],Vh={none:Na.none,[rr]:Kh};function PW(e){return e[qe]===rr?rr:"none"}var Zme="transition-colors hover:bg-[var(--sf-hl-bg)]! hover:[--fg:var(--sf-hl-ink)] active:bg-[var(--sf-hl-bg)]! active:[--fg:var(--sf-hl-ink)]",Jme="hover:[--fg:var(--sf-hl-ink)]! hover:[--fg-dim:inherit]! hover:[--site-line:inherit]! hover:[color:inherit]! active:[--fg:var(--sf-hl-ink)]! active:[--fg-dim:inherit]! active:[--site-line:inherit]! active:[color:inherit]!";function Qme(e,o){return PW(e)!==rr?null:{"--sf-hl-bg":o("surface"),"--sf-hl-ink":o("main")}}var bc=Ic(["none","lift"]);function Tv(e){let o=e[qe];return bc.includes(o)?o:"none"}var yc=Ic(["none","nextImage","rotate"]),Se={kind:qe,angle:"hoverAngle",duration:"hoverDuration",delay:"hoverDelay",mediaKind:"hoverKind",mediaGroup:"hoverGroup",cover:"hoverCover"},Tl="spinOnHover",kv=tr,Pv={ProductGrid:"rotate",RelatedProducts:"rotate",AlloyWheelsListing:"none"},Ev=Object.keys(Pv);function Yh(e){return Pv[e]??"none"}var qh=TW.rotateFallbackDeg,EW=e=>e==="rendering"?"renderings":e,OW=e=>e==="renderings"?"rendering":e,Sc=Object.freeze(kW.filter(e=>e!=="videos").map(EW)),Ov=Object.freeze(Object.fromEntries(Sc.map(e=>[e,vW[OW(e)]]))),Xh=["finish","first"],_v={finish:"Same finish",first:"First group"},Zh=["card","picture"],Av={card:"Whole card",picture:"Picture"},Da={kind:"photos",group:"finish",cover:"card"},$h=(e,o,t)=>e.includes(o)?o:t;function Rv(e){return{kind:$h(Sc,e[Se.mediaKind],Da.kind),group:$h(Xh,e[Se.mediaGroup],Da.group),cover:$h(Zh,e[Se.cover],Da.cover)}}function wc(){return{field:Se.kind,is:"nextImage"}}function Jh(e,o){let t=e[Se.kind];if(yc.includes(t))return t;let r=e[Tl];return typeof r=="boolean"?r?"rotate":"none":o}function Qh(e){let o=j(e);return o===void 0?qh:Math.min(kv.max,Math.max(kv.min,o))}function ehe(e,o){let t=Yh(o),r=Jh(e,t);return{kind:r,angle:r==="rotate"?Qh(e[Se.angle]):null,duration:gc("hover","duration",r==="rotate"?e[Se.duration]:void 0),delay:gc("hover","delay",r==="rotate"?e[Se.delay]:void 0),...r==="nextImage"?{media:Rv(e)}:{}}}function Lv(e){let o={field:Se.kind,in:[...yc]};return{any:[{field:Se.kind,is:"rotate"},{all:[{not:o},e==="rotate"?{not:{field:Tl,is:!1}}:{field:Tl,is:!0}]}]}}var Cc=Ic(["none","mono"]),kc=Ic(["none","nextImage","mono"]),Fv={ImageBlock:"none",Manifesto:"none",Split:"none",ContactLocations:"mono"},ohe=Object.keys(Fv);function ex(e){return Fv[e]??"none"}var Pl={zoom:"hoverZoom",darken:"hoverDarken"},Tr={min:100,max:150,step:1,unit:"%"};function _W(e){let o=j(e[Pl.zoom]);if(o===void 0)return null;let t=Math.min(Tr.max,Math.max(Tr.min,o));return t===Tr.min?null:String(t/100)}function AW(e){let o=j(e[Pl.darken]);return o!==void 0&&o>0?o:null}var Ma="hoverShow",ox="cardHover",tx="always",vc=["ImageBlock","Flex"];function rx(e,o,t=Cc){let r=e[qe];return t.includes(r)?r:o}function Bv(e,o=""){let t=vc.includes(o)?kc:Cc,r=rx(e,ex(o),t),a=r==="mono";return{kind:r,duration:gc("hover","duration",a?e[Se.duration]:void 0),delay:gc("hover","delay",a?e[Se.delay]:void 0),...r==="nextImage"?{media:Rv(e),...o==="Flex"?vv(e):{}}:vv(e)}}function vv(e){let o=_W(e),t=AW(e);return{...o?{zoom:o}:{},...t?{darken:t}:{}}}function Dv(){return{not:{field:qe,is:"nextImage"}}}function ax(e){return e==="none"?{field:qe,in:["mono","nextImage"]}:{not:{field:qe,is:"none"}}}function Nv(e){return e==="none"?{field:qe,is:"mono"}:{not:{field:qe,in:["none","nextImage"]}}}var Mv={label:"Text",defaultProps:{text:"",align:"left",tone:"default",tag:"p",contained:!0}};var{text:she,tag:lhe,...RW}=Mv.defaultProps,H=RW,X={...H,tone:"dim"},Tc={justify:"start",align:"stretch",wrap:!1,blockSpacing:"gap",padV2:!0},_={...Tc,direction:"column",...bl},We=(e,o=e,t=e,r=o)=>({sectionPaddingTop:e,sectionPaddingRight:o,sectionPaddingBottom:e,sectionPaddingLeft:o,sectionPaddingTopPhone:t,sectionPaddingRightPhone:r,sectionPaddingBottomPhone:t,sectionPaddingLeftPhone:r}),ar=e=>({fillColor:e}),Pc=(e,o,t={})=>({..._,widthFit:"fixed",width:e,minWidth:e,sectionHeightMode:"fixed",sectionHeightValue:e,sectionHeightUnit:"px",...ar(o),...t}),N=(e,o,t,r)=>({sizeToken:{step:e,px:o,...r?{stepPhone:r}:{},...t?{pxPhone:t}:{}}}),Hv={case:"upper"},vo={textStyle:"body-5",...Hv},El=(e,o)=>({...N("label",e,o),letterSpacing:.2,...Hv}),Rt=(e,o)=>({...vo,...El(e,o)});function ao(e,o,t=""){return e.map((r,a)=>{let n=t?`${t}.${a}`:String(a),s={...r.props??{}};for(let[l,d]of Object.entries(r.slots??{}))s[l]=ao(d,o,n);return{type:r.type,props:{...s,id:o(r.type,n)}}})}var Jr=()=>({tag:"h2",_partStyles:{text:{textStyle:"heading-2"}}}),Lt=()=>({_partStyles:{text:{...vo,color:"accent",letterSpacing:.3,lineHeight:1.5}}});var LW={..._,gap:12,gapPhone:12,...We(32,32,28,28)},FW={textStyle:"heading-3",...N("headingSmall",20),weight:500,case:"upper",lineHeight:1.5,letterSpacing:.02},_l={textStyle:"body-1",...N("body",15),lineHeight:1.6},ne=(e,o,t,r=!1)=>({type:"Text",props:{...o,text:"",[Fo]:e,_partStyles:{text:{...r?Lt()._partStyles?.text??{}:{},...t}}}}),Qr={title:"title",body:"body"},Ec={title:"name",body:"note"},nx=(e=Qr)=>({type:K,props:{...LW,name:"Card"},slots:{[re]:[ne(e.title,{...H,tag:"p",widthFit:"fill"},FW),ne(e.body,{...X,tag:"p",widthFit:"fill"},_l)]}}),Oc=(e,o)=>ao([nx(o)],e),Ol={label:Qr.title,href:"href"},BW={textStyle:"body-1",fontRole:"heading",color:"text",...N("body",17),weight:500,case:"upper",letterSpacing:.06,lineHeight:1.5},DW=Pc(9,"main",{[Cv]:45}),sx=(e=!1)=>({type:K,props:{..._,name:"Card",direction:"row",align:"center",gap:16,gapPhone:16,phoneRow:2,sharePhone:"content",wrapPhone:!1,...We(32,28),[nr]:Ol.href,...e?{[qe]:rr}:{}},slots:{[re]:[{type:K,props:{...DW,name:"Mark"}},ne(Ol.label,{...H,tag:"p",widthFit:"fill"},BW)]}}),Wv=e=>(o,t)=>t==="0"?`${e}~card`:`${e}~card.${t.slice(2)}`,Uv=(e,o=!1)=>ao([sx(o)],e);function zv(e,o){if(e!=="Cards")return o;if(o.template!==void 0)return Gv(o);let t=Z(o.id)??"Cards",r=Wv(t);if(o.cardStyle==="label-only"){let n=Array.isArray(o.items)&&o.items.some(s=>Z(s?.href)!==void 0);return Gv({...o,template:Uv(r,n)})}let a=oo(o)?Ec:Qr;return{...o,template:Oc(r,a)}}var NW=e=>{let[o,t]=e?[Qr,Ec]:[Ec,Qr];return new Map([[o.title,t.title],[o.body,t.body]])};function $v(e,o){let t=null;return e.forEach((r,a)=>{let n=r?.props;if(!n)return;let s=n,l=n[Fo];r.type==="Text"&&typeof l=="string"&&o.has(l)&&(s={...s,[Fo]:o.get(l)});let d=n[re];if(Array.isArray(d)){let c=$v(d,o);c!==d&&(s={...s,[re]:c})}s!==n&&(t??=[...e],t[a]={...r,props:s})}),t??e}function Gv(e,o){if(!Array.isArray(e.template))return e;let t=NW(!!oo(e)),r=o?new Map([...t].filter(([n,s])=>o(s)&&!o(n))):t;if(!r.size)return e;let a=$v(e.template,r);return a===e.template?e:{...e,template:a}}var MW="label";function Kv(e){if(e.template!==void 0)return e;let o=Z(e.id)??"CardList",t={type:K,props:{..._,name:"Item"},slots:{[re]:[ne(MW,{...H,tag:"p"},_l)]}};return{...e,template:ao([t],(r,a)=>a==="0"?`${o}~item`:`${o}~item.${a.slice(2)}`)}}var Al="ArticleBody",HW={textStyle:"heading-3",...N("headingSmall",20),weight:500,lineHeight:1.4,align:"center"},WW={..._l,align:"center"},jv=640,UW=()=>[ne("heading",{...H,tag:"h2",align:"center",maxWidth:jv},HW),ne("paragraph",{...X,tag:"p",align:"center",maxWidth:jv},WW)],lx=e=>ao(UW(),e);function GW(e){return lx((o,t)=>`${e}~${t==="0"?"heading":"paragraph"}`)}function Vv(e){if(e.template!==void 0)return e;let o=typeof e.id=="string"&&e.id.trim()?e.id:Al;return{...e,template:GW(o)}}var zW="label",_c=()=>({type:"LogoBlock",props:{[Fo]:zW}}),Yv=e=>{let o=Z(e.id)??"Logos";return{...e,template:ao([_c()],()=>`${o}~logo`)}};function qv(e){return!oo(e)||e.template!==void 0?e:Yv(e)}function Dhe(e){if(!oo(e))return e;let o=e.template;return o!==void 0&&!(Array.isArray(o)&&o.length===0)?e:Yv(e)}import{addShowWhenFacts as $W}from"efficient-shell/format";import{showWhenOf as ix,shownForOption as dx,truthy as KW,withRowRules as Ha,withRowsShownWhen as ea,withShowWhen as Xe}from"efficient-shell/format";var Whe=$W;function Rl(e,o,t){return e.slice(0,-1).reduceRight((r,a)=>({any:[{all:[o(a),t(a)]},{all:[{not:o(a)},r]}]}),t(e[e.length-1]))}var jW="inline",VW=[{label:"In this section",value:"inline"},{label:"In its own box",value:"own-box"}];var sr={ProductGrid:{num:"num",title:"title",description:"description",headRows:["num","title","titleSize","description","linkText","linkHref"],renderer:"ProductGridSection",padKey:"padTop",linkProp:"link"},TyreSizes:{num:"num",title:"title",description:"description",headRows:["num","title","description"],renderer:"DynamicTyreSizes"},FitmentFinder:{num:"num",title:"title",description:"description",headRows:["num","title","description"],renderer:"FitmentFinder"},TyreFitment:{num:"num",title:"title",description:"description",headRows:["num","title","description"],renderer:"DynamicTyreFitment"},BundleOffer:{num:"num",title:"title",description:"description",headRows:["num","title","description"],renderer:"DynamicRelatedProducts"},CompatibleTyres:{num:"num",title:"title",description:"description",headRows:["num","title","description"],renderer:"DynamicRelatedProducts"},RelatedProducts:{num:"num",title:"title",description:"description",headRows:["num","title","description"],renderer:"DynamicRelatedProducts"},SpecTable:{num:"num",title:"title",description:"description",headRows:["num","title","description"],renderer:"SpecTable"},FAQ:{num:"num",title:"title",linkProp:"link",headRows:["num","title","linkText","linkHref"],renderer:"FAQ"},GalleryB:{num:"num",title:"title",headRows:["num","title","linkText","linkHref"],renderer:"GalleryGrid"},FitmentTable:{num:"num",title:"title",description:"description",headRows:["num","title","description"],renderer:"FitmentTable"},Events:{num:"num",title:"title",linkProp:"link",headRows:["num","title","linkText","linkHref"],renderer:"Events"},ProcessSteps:{num:"num",title:"title",description:"description",headRows:["num","title","description"],headStyle:"editorial",renderer:"ProcessSteps",padKey:"padTop"},LongRead:{num:"headNum",title:"headTitle",description:"headDesc",headRows:["headNum","headTitle","headDesc"],headStyle:"editorial",renderer:"LongRead"},Series:{num:"headNum",title:"headTitle",description:"headDesc",headRows:["headNum","headTitle","headDesc"],headStyle:"editorial",renderer:"Series"},TimelineTrack:{num:"eyebrow",title:"title",description:"intro",headRows:["eyebrow","title","intro"],headStyle:"editorial",renderer:"TimelineTrack",padKey:"padTop"},StatsParagraph:{num:"eyebrow",title:"title",description:"desc",headRows:["eyebrow","title","desc"],headStyle:"editorial",renderer:"StatsParagraph"},Footprint:{num:"sectionNumber",title:"heading",description:"tagline",headRows:["sectionNumber","heading","tagline"],headStyle:"editorial",renderer:"Footprint",padKey:"padTop"},Collections:{num:"eyebrow",title:"heading",headRows:["eyebrow","heading"],renderer:"Collections"},Cards:{num:"eyebrow",title:"title",headRows:["eyebrow","eyebrowLook","title"],headStyle:"simple",renderer:"Cards"},Testimonials:{num:"eyebrow",title:"title",headRows:["eyebrow","eyebrowLook","title"],headStyle:"simple",renderer:"Testimonials"},Reviews:{num:"eyebrow",title:"title",headRows:["eyebrow","eyebrowLook","title"],headStyle:"simple",renderer:"Reviews"},Prose:{num:"eyebrow",title:"title",headRows:["eyebrow","title"],headStyle:"essay",renderer:"Prose"},ReviewForm:{num:"eyebrow",title:"title",headRows:["eyebrow","title"],headStyle:"simple",renderer:"ReviewForm"},DeliveryOptions:{num:"eyebrow",title:"title",description:"body",headRows:["eyebrow","title","body"],headStyle:"natural",headRowGap:"gap-3",headDescriptionSize:"text-[15px]",renderer:"DeliveryOptions"}},ts="SectionHeader";function Xv(e){return He(sr,e)}function Ac(e){return io(VW,jW,e)}var YW=new Set(["Flex"]);function Khe(e){return!!e?.type&&YW.has(e.type)}var Zv={not:{field:"headPlacement",is:"own-box"}},jhe={not:Zv};function Vhe(e,o,t){return ea(e,t,Zv)}var Rc="data-sf-spec-region";function Jv(e){return e.writable===!0&&e.sized===!0}function Lc(e,o,t){if(!e)return;let r=t[e];if(r)return{fontFamily:`var(--font-role-${e})`,fontSize:`var(--size-${r}, ${o.builtIn})`}}function rs(e){let o=/var\(--size-[A-Za-z]+, ?([0-9.]+px)\)/.exec(e);if(!o)throw new Error(`builtInOf: no --size-* fallback in ${e}`);return o[1]}function Ll(e){return`@${e}`}function Fl(e,o){if(!o.startsWith("@"))return null;let t=o.slice(1);return t in e?t:null}function qW(e,o){return o&&o in e?o:null}var cx={number:{label:"Number",follows:"Labels",builtIn:"14px",writable:!0,sized:!0},question:{label:"Question",follows:"Body",builtIn:"18px",writable:!0,sized:!0},answer:{label:"Answer",follows:"Body",builtIn:"15px",writable:!0,sized:!0}},Qv=cx;var XW="question",ZW="answer",JW={textStyle:"body-1",fontRole:"heading",...N("body",18,15),weight:500,case:"upper",letterSpacing:.02,lineHeight:1.5},QW={textStyle:"body-1",...N("body",15),lineHeight:1.7};function eT(){return Object.keys(cx).map(Ll)}var fx=()=>({type:K,props:{..._,gap:0,name:"Question"},slots:{rowTitle:[ne(XW,{...H,tag:"p",widthFit:"fill"},JW)],[re]:[ne(ZW,{...X,tag:"p",widthFit:"fill",maxWidth:760},QW)]}});function e3(e){return Ac(e.headPlacement)==="own-box"?!1:["num","title","linkText"].some(o=>Z(e[o])!==void 0)}function oT(e){if(e.template!==void 0||e3(e))return e;let o=Z(e.id)??"FAQ",t=0;return{...e,template:ao([fx()],r=>r===K?`${o}~row`:`${o}~row.${t++}`)}}var o3=["below","left","right"];function t3(e){return o3.includes(e)?e:"below"}function px(e){return t3(e)!=="below"}function ux(e){return Array.isArray(e)?e.map(ux):!e||typeof e!="object"?e:Object.fromEntries(Object.entries(e).filter(([o,t])=>o!=="id"&&t!==void 0&&!(Array.isArray(t)&&t.length===0)).sort(([o],[t])=>o<t?-1:o>t?1:0).map(([o,t])=>[o,ux(t)]))}var oa=e=>JSON.stringify(ux(e));var aT=e=>oo(e)===Bh,Fc=El(11),r3={textStyle:"body-1",...N("body",18),weight:500,lineHeight:1.2},nT=()=>({type:K,props:{..._,gap:8,gapPhone:8,...We(20,24,20,20),name:"Office"},slots:{[re]:[ne("badge",{...H,tag:"p",widthFit:"fill"},Fc,!0),ne("role",{...H,tag:"p",widthFit:"fill"},Fc,!0),ne("city",{...H,tag:"p",widthFit:"fill"},r3),ne("country",{...X,tag:"p",widthFit:"fill"},Fc),ne("address",{...X,tag:"p",widthFit:"fill"},Fc),{type:"ButtonBlock",props:{variant:"link",label:"",href:"",[Fo]:"linkLabel",[nr]:"href"}}]}}),sT={textStyle:"body-1",fontRole:"heading",...N("body",16),weight:500,lineHeight:1.25},hx={textStyle:"body-1",...N("body",14),lineHeight:1.5},a3=()=>({type:K,props:{..._,gap:4,gapPhone:4,...We(16,4),sectionBorder:{bottom:1},name:"Office"},slots:{[re]:[ne("city",{...H,tag:"p",widthFit:"fill"},sT),ne("address",{...X,tag:"p",widthFit:"fill"},hx),ne("phone",{...X,tag:"p",widthFit:"fill"},hx)]}});function lT(e){let o=Z(e.id)??"Footprint",t=0;return ao([a3()],r=>r===K?`${o}~office`:`${o}~office.${t++}`)}function iT(e){return Array.isArray(e.template)&&e.template.length>0&&oa(e.template)===oa(lT(e))}var dT=e=>e===void 0||Array.isArray(e)&&e.length===0;function tT(e){return px(e.listPosition)?!dT(e.template)||aT(e)?e:{...e,template:lT(e)}:iT(e)?{...e,template:[]}:e}var n3=sT,s3=hx,l3={textFit:"line"},xx=(e,o,t="",r={},a={})=>{let n=ne(e,{...o?X:H,tag:"p",...r},{...s3,...a});return t?{...n,props:{...n.props,[nr]:t}}:n},mx=(e,o,t,r)=>({type:K,props:{..._,gap:0,gapPhone:0,[Bl]:[e],name:r},slots:{[re]:[xx(e,o,t,l3,{align:"right"})]}}),i3=e=>({type:K,props:{..._,direction:"row",justify:"between",share:"content",phoneRow:2,sharePhone:"content",wrapPhone:"nowrap",gap:12,gapPhone:12,...e?We(20,24):{...We(16,4),sectionBorder:{bottom:1}},name:"Dealer"},slots:{[re]:[{type:K,props:{..._,justify:"center",gap:0,gapPhone:0,widthFit:"fill",name:"Dealer words"},slots:{[re]:[{type:K,props:{..._,gap:4,gapPhone:4,widthFit:"fill",name:"Dealer name"},slots:{[re]:[ne("name",{...H,tag:"p",widthFit:"fill"},n3),xx("address",!0)]}},xx("place",!0,"",{widthFit:"fill"})]}},{type:K,props:{..._,align:"end",gap:4,gapPhone:4,name:"Dealer contact"},slots:{[re]:[mx("distance",!0,"","Dealer distance"),mx("phone",!1,"phoneHref","Dealer phone"),mx("website",!1,"websiteHref","Dealer website")]}}]}}),d3=e=>{let o=i3(e),t={type:K,props:{..._,...We(0,12),name:"Dealer"},slots:{[re]:[{...o,props:{...o.props,name:"Dealer row"}}]}};return e?o:t};function gx(e,o){let t=Z(e.id)??"Footprint",r=0;return ao([d3(o)],(a,n)=>n==="0"?`${t}~dealer`:`${t}~dealer.${r++}`)}function rT(e){if(!Array.isArray(e.template)||e.template.length===0)return!1;let o=oa(e.template);return o===oa(gx(e,!0))||o===oa(gx(e,!1))}function cT(e){if(aT(e)){let t=gx(e,!px(e.listPosition));return!(dT(e.template)||iT(e)||rT(e))||oa(e.template??[])===oa(t)?e:{...e,template:t}}if(!rT(e))return tT(e);let o={...e,template:[]};return tT(o)}var go="template",f3="Card template",Ho="CardList",fT=["Text","ImageBlock","ButtonBlock","Flex"],Fo="rowField",nr="rowLinkField";function pT(){return{type:"slot",allow:[...fT]}}var p3=fT.filter(e=>e!=="ButtonBlock"),Dl="items",uT="itemFields";function Oxe(){return{type:"slot",allow:[...p3]}}var u3=[{block:"OrderSummary",typedRows:"rows",linesBetween:!0,fields:[{key:"label",label:"Item"},{key:"meta",label:"Meta line"},{key:"amount",label:"Amount"}]},{block:"FAQ",typedRows:"items",fields:[{key:"question",label:"Question"},{key:"answer",label:"Answer",multiline:!0}],seedOnInsert:e=>oT(e)},{block:"Footprint",typedRows:"offices",fields:[{key:"badge",label:"HQ",plain:!0},{key:"role",label:"Role"},{key:"city",label:"City"},{key:"country",label:"Region \xB7 country"},{key:"address",label:"Address"},{key:"phone",label:"Phone"},{key:"linkLabel",label:"Button"},{key:"href",label:"Link",kind:"link"}],seed:e=>cT(e)},{block:"Cards",typedRows:"items",fields:[{key:"num",label:"Number"},{key:"since",label:"Corner note"},{key:"label",label:"Label"},{key:"title",label:"Card title"},{key:"value",label:"Value"},{key:"body",label:"Card body",multiline:!0},{key:"href",label:"Link",kind:"link"},{key:"count",label:"Count"},{key:"badge",label:"Highlight badge",everySource:!0,plain:!0}],seed:e=>zv("Cards",e)},{block:"ProcessSteps",fields:[{key:"eyebrow",label:"Eyebrow"},{key:"title",label:"Title",mark:"accentItalic"},{key:"copy",label:"Body",multiline:!0},{key:"image",label:"Image",kind:"image",alt:"title"},{key:"tag",label:"Image tag"},{key:"specs",label:"Specs",kind:"list",fields:[{key:"label",label:"Label"},{key:"value",label:"Value"}]}],blocks:[{type:Ho,label:"Card list"}]},{block:"Logos",fields:[{key:"label",label:"Name"},{key:"kind",label:"Kind"}],seed:e=>qv(e)},{block:Ho,fields:[{key:"badge",label:"Highlight badge",everySource:!0,plain:!0}],typedRows:Dl,seed:e=>Kv(e)},{block:Al,fields:[{key:"heading",label:"Subhead"},{key:"paragraph",label:"Paragraph",multiline:!0}],seed:e=>Vv(e)}];function jo(){return er("efficient.card-templates",()=>new Map(u3.map(e=>[e.block,e])))}function _xe(e){for(let o of e){if(typeof o.block!="string"||!o.block)throw new Error("A card template names no block.");let t=[];for(let s of o.blocks??[]){if(typeof s?.type!="string"||!s.type)throw new Error(`The card template of ${o.block} names an empty block.`);t.some(l=>l.type===s.type)||t.push({type:s.type,label:s.label||s.type})}let r=[];for(let s of o.slots??[]){if(typeof s?.slot!="string"||!s.slot)throw new Error(`The card template of ${o.block} names an empty slot.`);let l=Z(s.label),d=Array.isArray(s.fields)?{fields:s.fields.map(c=>({...c}))}:null;r.some(c=>c.slot===s.slot)||r.push({slot:s.slot,...l?{label:l}:null,...d})}let a=r.some(s=>s.fields);if(a&&(o.fields.some(s=>s.everySource)||ev(o.block).length))throw new Error(`The card template of ${o.block} declares slot fields, but the block reads a source: slot fields take the place of a source's fields, so a block with slot fields reads no source.`);a?Cl().add(o.block):Cl().delete(o.block);let n=Z(o.typedRows);jo().set(o.block,{block:o.block,...r.length?{slots:r}:{},fields:o.fields.map(s=>({...s})),blocks:t,typedRows:n,...o.seed?{seed:o.seed}:{},...o.seedOnInsert?{seedOnInsert:o.seedOnInsert}:{},...o.linesBetween===!0?{linesBetween:!0}:{}})}}function Ix(e,o){let t=e?jo().get(e)?.seed:void 0;return t?t(o):o}function mT(e,o){let t=bx(e),r=(t.length?t:[go]).filter(l=>o[l]===void 0||Array.isArray(o[l])&&o[l].length===0);if(!r.length)return o;let a={...o};for(let l of r)delete a[l];let n=e?jo().get(e)?.seedOnInsert:void 0,s=n?n(a):Ix(e,a);return s===a?o:s}function hT(){for(let e of jo().values())if(e.blocks?.length)return!0;return!1}function xT(e){return jo().get(e)?.blocks??[]}function Axe(e){for(let o of jo().values())if(o.blocks?.some(t=>t.type===e))return!0;return!1}function gT(e){return typeof e=="string"&&jo().get(e)?.typedRows||""}function Rxe(e){return typeof e=="string"&&jo().get(e)?.linesBetween===!0}function IT(e){return typeof e=="string"&&jo().has(e)}var m3=[{slot:go}];function Bc(e){if(typeof e!="string")return[];let o=jo().get(e);return o?o.slots??m3:[]}function bx(e){return Bc(e).map(o=>o.slot)}function h3(e,o){return Bc(e).some(t=>t.slot===o)}function bT(e,o){let t=Bc(e).find(r=>r.slot===o);return t?t.label??f3:null}function yx(e,o){return o?Bc(e).find(t=>t.slot===o)?.fields:void 0}function x3(e,o){let t=jo().get(e)?.fields??[];return o?t.filter(r=>(r.kind??"text")===o):t}function g3(e,o){if(typeof e!="string")return"";let t=yx(e,o);return(t?t.filter(r=>r.kind==="list"):x3(e,"list"))[0]?.key??""}function I3(e,o,t){return rt(e)||g3(o,t)}function yT(e,o,t){let r=typeof e?.type=="string"?e.type:"";if(!r)return[];let a=yx(r,t);if(a)return o?a.filter(d=>(d.kind??"text")===o):a;let n=jo().get(r)?.fields??[],s=hc(oo(e?.props))?.fields,l=s?.length?[...s.map(d=>({...d})),...n.filter(d=>d.everySource&&!s.some(c=>c.key===d.key))]:n;return o?l.filter(d=>(d.kind??"text")===o):l}function b3(e,o,t,r){if(!e)return null;let a=yx(e,r);return a?a.find(n=>n.key===o)??null:t?yT(t).find(n=>n.key===o)??null:jo().get(e)?.fields.find(n=>n.key===o)??null}function Dc(e,o){return!e||!o?null:e.fields?.find(t=>t.key===o)??b3(e.ownerType,o,e.owner,e.slot)}function Lxe(e,o){return Dc(e,o)?.plain===!0}function rt(e,o=Fo){let t=e?.[o];return typeof t=="string"?t.trim():""}function Nl(e,o){return e.key||String(o+1)}function Sx(e){let o={};if(e&&typeof e=="object"&&!Array.isArray(e))for(let[t,r]of Object.entries(e))typeof r=="string"&&(o[t]=r);return o}var Bl="hideWhenRowEmpty";function Fxe(e,o){let t=e[Bl];return!o||!Array.isArray(t)||!t.length?!1:t.every(r=>typeof r!="string"||!o[r]?.trim())}var ST={Text:{text:Fo,href:nr},ImageBlock:{src:Fo,href:nr},ButtonBlock:{label:Fo,href:nr},LogoBlock:{alt:Fo,href:nr},Breadcrumb:{currentCrumb:Fo}};var y3=new Set(["ButtonBlock.label","LogoBlock.alt"]);function Bxe(e,o,t){return Ml(e,o,t)&&!y3.has(`${e}.${t}`)}function Ml(e,o,t){return wx(e,o,t)!==""}function wx(e,o,t){let r=ST[e]?.[t];return r?rt(o,r):""}function Hl(e,o){return!o||!e?null:e[o]??""}function S3(e,o){return Hl(e,o)?.trim()||void 0}function Dxe(e,o,t,r,a,n){if(!t)return o;let s=null;for(let[l,d]of Object.entries(ST[e]??{})){let c=rt(o,d),f=Hl(t,c);if(f!==null){if(s??={...o},d===nr){s[l]=S3(t,c);continue}s[l]=Dc({ownerType:r,fields:a,slot:n},c)?.mark==="accentItalic"?Ba(f):f}}return s??o}function Nc(e,o){let t=e?.data?.content;if(!Array.isArray(t)||typeof o!="string")return;let r=(n,s)=>{for(let l of n){if(l?.props?.id===o)return s;for(let[d,c]of Object.entries(l?.props??{})){if(!c3(c))continue;let f=h3(l.type,d)?{owner:l,slot:d,direct:!0,nested:s!==null,underBox:!1}:s&&{owner:s.owner,slot:s.slot,direct:!1,nested:s.nested,underBox:s.underBox||l.type===K},u=r(c,f);if(u!==void 0)return u}}},a=r(t,null);return a===void 0?null:a}function Wl(e,o){let t=Nc(e,o);return t&&t.owner}function Cx(e,o){let t=Nc(e,o);return t&&t.slot}function kx(e,o){let t=Nc(e,o);return t&&(t.direct?t.owner:null)}function Nxe(e,o){let t=Nc(e,o);if(t!==void 0)return t===null?{inCopy:!1,nestedCopy:!1,underBox:!1}:{inCopy:!0,nestedCopy:t.nested,underBox:t.underBox}}function wT(e,o,t){if(o?.type!==Ho)return[];let r=Wl(e,o.props?.id);if(!r){let l=hc(oo(o.props))?.fields,d=l?.length?l.map(u=>({...u})):w3(o.props),c=(jo().get(Ho)?.fields??[]).filter(u=>u.everySource&&!d.some(p=>p.key===u.key)),f=[...d,...c];return t?f.filter(u=>(u.kind??"text")===t):f}let a=Cx(e,o.props?.id)??void 0,n=I3(o.props,r.type,a),s=n&&yT(r,"list",a).find(l=>l.key===n)?.fields||[];return t?s.filter(l=>(l.kind??"text")===t):s}function Mc(e,o){return{[Fo]:"",[Dl]:e.map(t=>({...t})),[uT]:o.map(t=>({...t}))}}function w3(e,o){let t=e?.[uT];if(!Array.isArray(t))return[];let r=t.flatMap(a=>{if(!a||typeof a!="object")return[];let{key:n,label:s,kind:l,multiline:d,alt:c,next:f}=a;if(typeof n!="string"||!n||typeof s!="string")return[];let u=l==="image"||l==="link"||l==="colour"?l:void 0;return[{key:n,label:s,...u?{kind:u}:{},...d===!0?{multiline:!0}:{},...typeof c=="string"&&c?{alt:c}:{},...typeof f=="string"&&f?{next:f}:{}}]});return o?r.filter(a=>(a.kind??"text")===o):r}import{useSyncExternalStore as YY}from"react";import{isNodeList as Hc}from"efficient-easel/data";var CT="Flex";function as(e,o){return rt(e)?typeof e?.[At]=="string"?vx(o?.[At]):"":vx(e?.[At])}var vx=e=>typeof e=="string"?e.trim():"",C3=e=>e.type===Ho&&Array.isArray(e.props?.[Dl])&&e.props[Dl].some(o=>vx(o?.[At])!==""),k3=new Intl.NumberFormat("en-US");function v3(e){return/^\d+$/.test(e)?k3.format(Number(e)):e}function Gxe(e,o){let t=o?o.find(r=>r.key===e)?.value:ov(kl).find(r=>r.key===e)?.value;return t===void 0?null:v3(t)}var T3={[At]:"any"};function Tx(e,o=!1){let t=e.props;if(!t)return{node:e,names:!1};let r=e.type==="Text"&&(as(t)!==""||o&&as(t,T3)!==""),a=o||C3(e),n=t;for(let[l,d]of Object.entries(t)){if(!Hc(d))continue;let c=d.map(f=>Tx(f,a));c.some(f=>f.names)&&(r=!0),c.some((f,u)=>f.node!==d[u])&&(n={...n,[l]:c.map(f=>f.node)})}if(e.type!==CT)return{node:n===t?e:{...e,props:n},names:r};let s=oo(n);if(r&&!s&&(n={...n,[mo]:kl}),!r&&s===kl){let{[mo]:l,...d}=n;n=d}return{node:n===t?e:{...e,props:n},names:!1}}function kT(e,o,t){for(let r of e){if(r?.props?.id===o)return t;for(let a of Object.values(r?.props??{})){if(!Hc(a))continue;let n=kT(a,o,r.type===CT?r:t);if(n!==void 0)return n}}}function zxe(e,o){if(!Hc(e))return!0;let t=kT(e,o,null);if(t===void 0)return!0;if(t===null)return!1;let r=oo(t.props);return!r||r===kl}function vT(e){let o=e?.content;if(!Hc(o))return e;let t=o.map(r=>Tx(r));return t.every((r,a)=>r.node===o[a])?e:{...e,content:t.map(r=>r.node)}}function TT(e){return Tx(e).node}import{jsx as v,jsxs as Fr,Fragment as Nr}from"react/jsx-runtime";import{cloneElement as PI,createContext as sV,useContext as _0,useEffect as lV,useId as A0,useRef as mi,useState as hi}from"react";import{useEasel as ep,useSelectedHost as Qa}from"efficient-easel/easel";import{PIN_LENGTH as Xf,toDateKey as Jve,fromDateKey as Qve}from"efficient-shell/format";function P3(e){return!!e&&typeof e=="object"&&!Array.isArray(e)&&typeof e.src=="string"}function Wo(e){return typeof e=="string"?e:P3(e)?e.src:""}function Kxe(e,o,t){return Px(e,o.split("."),t)}function Px(e,o,t){if(o.length===0)return t(e);let[r,...a]=o,n=r.endsWith("[]"),s=n?r.slice(0,-2):r;if(!e||typeof e!="object"||Array.isArray(e))return e;let l=e;if(!(s in l))return e;let d=l[s];if(n){if(!Array.isArray(d))return e;let f=!1,u=d.map(p=>{let h=Px(p,a,t);return h!==p&&(f=!0),h});return f?{...l,[s]:u}:e}let c=Px(d,a,t);return c===d?e:{...l,[s]:c}}var E3=["upload","youtube"],O3="upload",Yxe={upload:"Upload",youtube:"YouTube"},_3=["background","click"],A3="background",qxe={background:"Background",click:"Click to play"};function ET(e){return E3.includes(e)?e:O3}function OT(e){return _3.includes(e)?e:A3}var PT=/^[A-Za-z0-9_-]{11}$/,R3=/^(?:www\.|m\.|music\.)?(?:youtube\.com|youtube-nocookie\.com|youtu\.be)$/;function _T(e){let o=typeof e=="string"?e.trim():"";if(!o)return null;if(PT.test(o))return o;let t;try{t=new URL(/^[a-z]+:\/\//i.test(o)?o:`https://${o}`)}catch{return null}if(t.protocol!=="https:"&&t.protocol!=="http:"||!R3.test(t.hostname))return null;let r=t.pathname.split("/").filter(Boolean),a=t.hostname.endsWith("youtu.be")?r[0]:r[0]==="watch"?t.searchParams.get("v"):r[0]==="embed"||r[0]==="shorts"||r[0]==="live"||r[0]==="v"?r[1]:null;return a&&PT.test(a)?a:null}function Ex(e,o){let t=o==="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}?${t}`}function AT(e){return`https://i.ytimg.com/vi/${e}/maxresdefault.jpg`}function RT(e){return`https://i.ytimg.com/vi/${e}/hqdefault.jpg`}var Ox="Play video";var _x={frame:"Video frame",image:"Image"},Xxe={any:[{field:"loadingShows",is:"image"},{all:[{not:{field:"loadingShows",set:!0}},{field:"poster",set:!0}]}]};function Ul(e){let o=e.loadingShows;return o==="image"?"image":o!=null&&o!==""?"frame":Wo(e.poster)?"image":"frame"}function Zxe(e){let[o,t]=Ul(e)==="image"?[e.poster,e.videoFrame]:[e.videoFrame,e.poster];return Wo(o)||Wo(t)||void 0}function LT(e){if(Wo(e.mediaVideo)){if(Ul(e)==="frame")return Wo(e.videoFrame)?void 0:Wo(e.poster)?"frame-missing-image":"frame-missing-surface";if(!Wo(e.poster))return Wo(e.videoFrame)?"image-missing-frame":"image-missing-surface"}}var Wc="videoFrames",Ax="videoFramesNotOwn";function FT(e,o,t){let r=Wo(e.mediaVideo);if(!r||!o||Ul(e)!=="frame"||Wo(e.videoFrame))return;let a=o[r],n=!!Wo(e.poster);if(a?.state==="ready")return null;if(n)return!a||a.state==="pending"?void 0:"image-no-frame";if(!a)return t?"save-makes-frame":void 0;switch(a.state){case"pending":return a.noted!=="save"&&t?"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 L3(e,o){let t=Wo(e),r=t&&o?o[t]:void 0;return r?.state==="ready"&&r.frame?r.frame:void 0}function Jxe(e,o,t){let r=t?.[Ax];if(!(Array.isArray(r)&&r.includes(e)))return L3(o,t?.[Wc])}import{useSyncExternalStore as F3}from"react";function Uc(){let e=new Map,o=new Set,t=r=>(o.add(r),()=>{o.delete(r)});return{get:r=>e.get(r),has:r=>e.has(r),set(r,a){if(!(e.has(r)&&e.get(r)===a)){e.set(r,a);for(let n of o)n()}},use(r){let a=()=>r?e.get(r):void 0;return F3(t,a,a)}}}var Ue="SiteHeader",Fe="SiteFooter",Rx="sections",tge=[Ue,Fe],ns=e=>e===Ue||e===Fe,BT=e=>`${e}:${Rx}`;function DT(e,o,t=[]){return{type:e,props:{id:o,[Rx]:t}}}var B3=new Set(["Footer",Ue,Fe]);function ss(e){let o=new Set,t=!1,r=e.filter(a=>{let n=a?.type??"";return n==="Header"?(t=!0,!1):B3.has(n)?o.has(n)?(t=!0,!1):(o.add(n),!0):!0});return t?r:e}function Gc(e,o){return e.some(t=>t?.type===o.type)?e:o.type===Ue?[o,...e]:[...e,o]}var NT={[Ue]:{max:3,takes:["Flex","Ticker"]},[Fe]:{max:6,takes:["Flex","Prose","Logos","Divider"]}};function MT(e,o,t){if(!ns(e))return!0;let r=NT[e];return t<r.max&&r.takes.includes(o)}function HT(e,o){let t=o,r=t?.props?.id;if(r==null)return null;let a=e?.content;if(!Array.isArray(a))return null;for(let n of a){if(!ns(n?.type))continue;let s=n.props?.[Rx];if(!Array.isArray(s)||!s.some(d=>d?.props?.id===r))continue;let l=NT[n.type];return l.takes.includes(t?.type??"")?s.length>=l.max?{group:n.type,why:"full"}:null:{group:n.type,why:"type"}}return null}import{locateNode as D3}from"efficient-easel/draw";function Gl(e){if(!e)return null;let o=e.lastIndexOf(":");return o>0?{ownerId:e.slice(0,o),slot:e.slice(o+1)}:null}function zc(e,o,t){let r=Gl(t?.zone),a=r?D3(e,o,r.ownerId):null;return a&&r?{...a,slot:r.slot}:null}import{isNode as N3}from"efficient-easel/data";var WT="Footer",UT=[Ue,WT,Fe],Wa=e=>{let o=e?.content;return Array.isArray(o)?o:[]},ta=e=>{let o=e?.zones;return o&&typeof o=="object"&&!Array.isArray(o)?o:null},ls=e=>{let o=e?.props?.id;return typeof o=="string"?o:void 0},GT=e=>Gl(e)?.ownerId??"";function zT(e){let o=ss(Wa(e)),t=o.some(r=>r?.type===Fe);return o.filter(r=>r?.type===Ue||r?.type===Fe||r?.type===WT&&!t)}function $c(e,o){let t=new Set,r=a=>{if(Array.isArray(a)){for(let n of a)r(n);return}if(!(!a||typeof a!="object")){if(N3(a)){let n=ls(a);n&&t.add(n)}for(let n of Object.values(a))r(n)}};if(r(e),o){let a=!0,n=new Set;for(;a;){a=!1;for(let[s,l]of Object.entries(o))n.has(s)||!t.has(GT(s))||(n.add(s),r(l),a=!0)}}return t}function $T(e,o){let t=Wa(e).filter(r=>{let a=ls(r);return typeof r?.type=="string"&&UT.includes(r.type)||a!==void 0&&o(a)});return t.length?$c(t,ta(e)):new Set}function Lx(e,o){let t={},r={};for(let[a,n]of Object.entries(e??{}))(o.has(GT(a))?t:r)[a]=n;return{owned:t,rest:r}}function KT(e,o){if(!o)return e;let t=zT(o);if(!t.length)return e;let r=t.filter(l=>l.type===Ue),a=t.filter(l=>l.type!==Ue),n={...e,content:[...r,...Wa(e),...a]},{owned:s}=Lx(ta(o),$c(t,ta(o)));return Object.keys(s).length&&(n.zones={...ta(e)??{},...s}),n}function Fx(e,o){if(!o)return{page:e,chrome:null};let t=zT(o),r=new Set(t.map(ls).filter(k=>!!k)),a=[],n=[];for(let k of Wa(e)){let y=ls(k);y&&r.has(y)||ns(k?.type)?n.push(k):a.push(k)}let s=new Map(n.map(k=>[ls(k),k])),l=new Set,d=ss(Wa(o)).flatMap(k=>{let y=ls(k);if(!y||!r.has(y))return[k];let b=s.get(y);return b?(l.add(b),[b]):[]});for(let k of n)l.has(k)||d.some(y=>y?.type===k.type)||(d=k.type===Ue?[k,...d]:[...d,k]);d=ss(d);let c=d.length===Wa(o).length&&d.every((k,y)=>k===Wa(o)[y]),f=ta(e),u=$c(d,f),{owned:p,rest:h}=Lx(f,u),g=Lx(ta(o),$c(t,ta(o))).owned,I={...o,content:c?o.content:[...d]},C=ta(o);if(C||Object.keys(p).length){let k={};for(let[y,b]of Object.entries(C??{}))y in g?y in p&&(k[y]=p[y]):k[y]=b;for(let[y,b]of Object.entries(p))y in k||(k[y]=b);I.zones=k,C&&M3(I.zones,C)&&(I.zones=C)}let S={...e,content:a};return f&&(Object.keys(h).length||!Object.keys(g).length?S.zones=h:delete S.zones),{page:S,chrome:I}}function M3(e,o){let t=Object.keys(e),r=Object.keys(o);return t.length===r.length&&t.every((a,n)=>a===r[n]&&e[a]===o[a])}function jT(e,o){return t=>e(t)||t!==void 0&&UT.includes(t)&&o()}var VT=null;function Bx(e){VT=e}function Ft(){return VT}var YT=null;function Dx(e){YT=e}function Kc(){return YT}var Nx=Uc();function qT(e,o,t){if(!o)return;let r={...Nx.get(e)};for(let[a,n]of Object.entries(o))r[a]={...n,noted:t};Nx.set(e,r)}function XT(e,o){qT(e,o,"load")}function ZT(e,o){qT(e,o,"save")}function jc(e){return Nx.use(e)}var Mx=e=>!!Ft()?.sectionOf(e);function JT(e,o=Mx){return $T(e,o)}function QT(e,o,t,r=Mx){if(t)return e&&JT(o,r).has(e)?void 0:t}function eP(e,o,t=Mx){if(!e)return{};let r=[...JT(o,t)];return r.length?{[Wc]:e,[Ax]:r}:{[Wc]:e}}import{ScreenDocumentContext as iV}from"efficient-easel/screen/components/ScreenDocumentContext";import{readHidable as ma,hidableText as dV}from"efficient-easel/draw";import{FOLD_FIELD_MARKER as R0,LINK_FIELD_MARKER as cV,MEDIA_FIELD_MARKER as fV,SCAFFOLD_FIELD_MARKER as pV,TEXT_FIELD_MARKER as Br,foldMetaOf as ha,textFieldIdentifier as lTe}from"efficient-easel/draw";import{jsx as lP}from"react/jsx-runtime";import{useCallback as z3}from"react";import{useEasel as $3}from"efficient-easel/easel";import{SettingsAction as K3}from"efficient-easel/panel";import{isLengthUnit as U3}from"efficient-easel/screen/lib/content/length-units";import{CORNER_SIDES as Vc,hasCornerSubset as zl,normalizeCornerSides as lr}from"efficient-easel/screen/lib/content/style-keys";import{isLengthUnit as H3}from"efficient-easel/screen/lib/content/length-units";var $l={kind:"radius",unitKey:"sectionCornersUnit"};function Hx(e){return typeof e=="number"&&Number.isFinite(e)}function bge(e,o,t){if(!Hx(e))return;let r=H3(t)&&t!=="px"?Zn(e,t):Zn(Zt(e));if(Object.keys(r).length===0)return;let a=r[Wx];if(typeof a!="string")return r;let n=zl(o)?Ua(a,lr(o)??[]):a;return{...r,[W3]:n}}var W3="--sf-section-radius",Wx="--sf-card-radius";function Ua(e,o){return Vc.map(t=>o.includes(t)?e:"0").join(" ")}var oP=[{value:"tl",label:"Top left"},{value:"tr",label:"Top right"},{value:"bl",label:"Bottom left"},{value:"br",label:"Bottom right"}];var Kl={kind:"radius",unitKey:"cardCornersUnit"},G3="--sf-card-box-radius";function Ux(e){return typeof e=="number"&&Number.isFinite(e)}function kge(e,o,t){if(!Ux(e))return;let r=(U3(t)&&t!=="px"?Zn(e,t):Zn(Zt(e)))[Wx];if(typeof r!="string")return;let a=zl(o)?Ua(r,lr(o)??[]):r;return{[G3]:a}}function tP(e,o){let t=e.find(s=>s?.props?.id===o);if(!t)return[...e];let r=t.props?.cardCorners,a=t.props?.cardCornerSides,n=t.props?.[Kl.unitKey];return e.map(s=>s?.props?.id===o?s:{...s,props:{...s.props,cardCorners:r,cardCornerSides:a,[Kl.unitKey]:n}})}function rP(e,o,t){let r=zc(e,o,t),a=r?.slot??"",n=r&&Array.isArray(r.item.props[a])?r.item.props[a]:[],s=t?.index??-1,l=s>=0?n[s]:void 0,d=l?.props?.id?String(l.props.id):"",c=Math.max(n.length-1,0);return!r||!d?{can:!1,reason:"unreachable",others:0}:n.length<=1?{can:!1,reason:"alone",others:c}:Ux(l?.props?.cardCorners)?{can:!0,others:c,zone:r.zone,index:r.index,data:{...r.item,props:{...r.item.props,[a]:tP(n,d)}}}:{can:!1,reason:"unset",others:c}}function aP(e){return e.can?Mo("Gives the other card this card's Corners.","Gives the other {n} cards this card's Corners.",e.others):e.reason==="alone"?i("This is the only card in the section."):e.reason==="unset"?i("Set this card's corners first."):i("This card is not in a section that can share corners.")}function nP(e){return Mo("Applied to {n} card","Applied to {n} cards",e)}function sP(e,o){e.can&&o(e.zone,e.index,e.data)}import{useSectionOps as j3}from"efficient-easel/screen/lib/document/use-section-ops";var V3="apply-corners-to-siblings",Y3="Apply to all cards";function q3({plan:e,onPress:o}){return lP(K3,{id:V3,label:i(Y3),note:aP(e),disabled:!e.can,doneLabel:nP(e.others),onPress:o})}function iP(){let{appState:e,config:o}=$3(n=>n),t=j3(),r=rP(o,e.data.content??[],e.ui.itemSelector),a=z3(()=>{sP(r,t.replaceComponent)},[r,t]);return lP(q3,{plan:r,onPress:a})}import{isShown as IP,lazyShowWhenContext as iU}from"efficient-shell/format";var ra="product",Yc="recordType",dP={key:ra,label:"Product",fields:[]},X3=/^[a-z][a-z0-9]*(-[a-z0-9]+)*$/,Z3=/^[a-z][A-Za-z0-9]*$/,J3=["text","date","images"],Gx=new Map,cP=0;function Q3(e){if(typeof e.key!="string"||!X3.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===ra)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 o=new Set;for(let t of e.fields){if(typeof t.key!="string"||!Z3.test(t.key)||o.has(t.key))throw new Error(`The record type ${e.key} has a field key it cannot use: ${JSON.stringify(t.key)}.`);if(!J3.includes(t.kind))throw new Error(`The field ${t.key} of ${e.key} has no kind ${JSON.stringify(t.kind)}.`);o.add(t.key)}return{key:e.key,label:e.label.trim(),fields:e.fields.map(t=>({...t}))}}function Mge(e){let o=e.map(Q3);for(let t of o)Gx.set(t.key,t);o.length&&(cP+=1)}function zx(){return[dP,...Gx.values()]}function eU(e){return e===ra?dP:Gx.get(e)??null}function $x(){return cP}function jl(e){let o=e?.[Yc];return typeof o!="string"?ra:o.trim()||ra}function Kx(e){return jl(e)===ra}function Hge(e,o){let t=eU(e)?.fields??[];return o?t.filter(r=>o.includes(r.kind)):t}var qc="product",fP="tyre",oU=[qc,fP];function Gge(e){return oU.includes(e)}var tU="productType",rU={[qc]:"alloy-wheel",[fP]:"tyre"},aU=["alloy-wheel","tyre"];function pP(e,o){return Kx(o)?uP(o)??rU[e]??null:null}function uP(e){if(!Kx(e))return null;let o=e?.[tU];return typeof o=="string"&&aU.includes(o)?o:null}function zge(e){let o=e?.root;return uP(o?.props)}var jx="Main Pages",nU="Dynamic Pages",Vx="dynamic",sU="dynamic";function Ga(e){return e.kind===sU}var Yx="lightbox";function mP(e){return e.kind===Yx}function hP(e){let o=[],t=[];for(let r of e){if(Ga(r)){t.push(r);continue}let a=r.groupKey??(r.group?`folder:${r.group}`:"top"),n=o[o.length-1];n&&n.key===a?n.rows.push(r):o.push({key:a,label:r.group??jx,rows:[r]})}if(t.length){let r=o.findIndex(a=>a.key.startsWith("system:"));o.splice(r===-1?o.length:r,0,{key:Vx,label:nU,rows:t})}return o}var Xc=null,xP=null;function lU(e,o){Xc=e,xP=o}function qge(e){lU(e,null)}function Xge(){return Xc}function Vl(){return Ga({kind:xP})||Xc===qc}function Zge(e){return pP(Xc??"",e)??"alloy-wheel"}function Jge(e){return Vl()?jl(e):null}function qx(e,o,t){let r=!1,a={};for(let[n,s]of Object.entries(e)){if(!IP(ix(s),o??{},t)){r=!0;continue}let l=dU(s,o?.[n],o??{},t);l!==s&&(r=!0),a[n]=l}return r?a:e}function dU(e,o,t,r){let a=e?.options;if(!Array.isArray(a))return e;let n=a.filter(s=>s?.value===o||!s?.showWhen||IP(s.showWhen,t,r));return n.length===a.length?e:{...e,options:n}}function bP(e,o,t,r){let a=zc(o,t,r);return{device:e,parentType:a?.item.type,parent:a?.item.props}}function gP(e,o){if(!e||typeof e!="object")return!1;let t=e;if(typeof t.context=="string"&&(t.context===o||t.context.startsWith(`${o}.`)))return!0;if("not"in t)return gP(t.not,o);for(let r of[t.all,t.any])if(Array.isArray(r)&&r.some(a=>gP(a,o)))return!0;return!1}function nIe(e,o={}){return iU({parentType:()=>e.parent?.type??void 0,parent:()=>e.parent?.props??void 0,dynamicPage:()=>Vl(),root:()=>e.appState?.data?.root?.props,...o})}import{isLengthUnit as cU}from"efficient-easel/screen/lib/content/length-units";var yP=1,fU="cardImageUnit",Xx={kind:"radius",unitKey:fU},SP={kind:"radius"};function pU(e){return Zt(e)}function fIe(e,o){if(cU(o)&&o!=="px"){let r=j(e);return r!==void 0&&r>=0?{"--sf-card-image-radius":Le(r,o)}:{}}let t=pU(e);return t===null?{}:{"--sf-card-image-radius":`${t}px`}}import{isLengthUnit as uU}from"efficient-easel/screen/lib/content/length-units";var wP={kind:"radius",unitKey:"cornersUnit"},CP=1,kP="Corners";function mU(e){return Zt(e)}function IIe(e,o,t){let r=uU(t)&&t!=="px"?j(e):void 0,a=r===void 0?mU(e):null;if(r===void 0&&a===null)return null;let n=r!==void 0?Le(Math.max(0,r),t):`${a}px`;return{borderRadius:zl(o)?Ua(n,lr(o)??[]):n}}var TP=12,PP=6,hU=800,aa={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"}},Zx=Object.keys(aa),EP=[2,3,4,6];function Jx(e,o){return Zx.filter(t=>t===o||e===null||aa[t].across===e)}function OP(e){return typeof e!="string"||e===""?null:aa[e]??null}function vP(e,o){return o?PP/e.acrossPhone:TP/e.across}function Qx(e){return e.ratio?gk.find(o=>o.shape===e.ratio)?.ratio??null:null}function _P(e){return[...e.lead??[],...e.desktop]}var xU="sf-wall--";function gU(e){return`${xU}${e}`}function SIe(e){let o=aa[e],t=`.${gU(e)}`,r=[],a=(l,d,c)=>`${t}:has(> :nth-child(${l}n+${d+c}):last-child) > :nth-last-child(-n+${c})`,n=(l,d,c=[])=>{let f=[],u=l.length,p=c.length;c.forEach(([h,g],I)=>{f.push(`${t} > :nth-child(${I+1}){grid-column:span ${h};grid-row:span ${g}}`)}),l.forEach(([h,g],I)=>{f.push(`${t} > :nth-child(${u}n+${p+I+1}){grid-column:span ${h};grid-row:span ${g}}`)});for(let h=1;h<u;h+=1)f.push(`${a(u,p,h)}{grid-column:span ${d};grid-row:span 1}`);return f};r.push(`${t}{grid-template-columns:repeat(${TP},minmax(0,1fr))}`);let s=Qx(o);if(s&&(r.push(`${t}${t}{grid-auto-rows:auto}`),r.push(`${t}${t} > *{aspect-ratio:${s[0]}/${s[1]};height:auto}`)),r.push(...n(o.desktop,vP(o,!1),o.lead)),r.push(`@media (max-width:${hU}px){`),r.push(`${t}{grid-template-columns:repeat(${PP},minmax(0,1fr))}`),r.push(...n(o.phone,vP(o,!0),o.leadPhone)),o.phone.length===1&&!o.leadPhone?.length){let[l,d]=o.phone[0],c=o.lead?.length??0;for(let f=1;f<o.desktop.length;f+=1)r.push(`${a(o.desktop.length,c,f)}{grid-column:span ${l};grid-row:span ${d}}`)}return r.push("}"),r.join("")}var Zc=12,AP=1,IU=3;var bU=3;function eg(e,o,t){let r=typeof e=="number"?e:Number.parseInt(String(e??""),10);return Number.isFinite(r)?Math.min(t,Math.max(o,Math.trunc(r))):null}function yU(e){return eg(e,1,Zc)??bU}function kIe(e,o){return eg(e,AP,IU)??(yU(o)===4?2:AP)}function vIe(e){return e==null||e===""?null:eg(e,1,Zc)}var TIe="data-sf-span";function PIe(e){if(!e)return!1;if(e.type==="Grid")return!0;if(e.type==="GalleryB"){if(OP(e.props?.layout))return!1;let o=e.props?.columns;return o!=null&&o!==""}return!1}import{jsx as SU}from"react/jsx-runtime";import*as wU from"efficient-easel/icons";function Jc(e){let o=e.replace(/(^|-)([a-z])/g,(r,a,n)=>n.toUpperCase()),t=wU[`${o}Icon`];return t?SU(t,{size:16}):null}import{jsx as na,Fragment as vU,jsxs as HP}from"react/jsx-runtime";import{useContext as TU,useEffect as PU,useId as EU,useState as WP}from"react";import{SettingsField as OU,SettingsSwitch as _U}from"efficient-easel/panel";import{AnchorIcon as AU}from"efficient-easel/icons";import{ScreenDocumentContext as RU}from"efficient-easel/screen/components/ScreenDocumentContext";import{Snippet as LU}from"efficient-shell/ui";import{slugify as FU}from"efficient-shell/format";import{slugify as CU}from"efficient-shell/format";function Yl(e){return typeof e=="string"?e.trim():e&&typeof e=="object"&&typeof e.text=="string"?e.text.trim():""}var Qc=e=>CU(Yl(e));var ef="homepage";import{slugify as kU}from"efficient-shell/format";var RP=[{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 LP(e){return e.offersCommerce&&e.offersService?RP:RP.filter(o=>!o.needs||(o.needs==="commerce"?e.offersCommerce:e.offersService))}var og="#popup:";function FP(e){return`${og}${e}`}function BP(e){return e.startsWith(og)&&e.slice(og.length).trim()||null}function ql(e){return e===ef?"/":`/${e}`}function DP(e){return`/journal/${e}`}function NIe(e){return`/wheels/${e}`}function of(e,o){return`${ql(e)}#${o}`}function NP(...e){let o=new Set,t=[];for(let r of e)for(let a of r?.content??[]){let n=Yl(a?.props?.anchor);if(!n)continue;let s=kU(n);!s||o.has(s)||(o.add(s),t.push({slug:s,name:n}))}return t}function MIe(e){let o=e.indexOf("#"),t=o===-1?e:e.slice(0,o),r=t.indexOf("?");return r===-1?t:t.slice(0,r)}function MP(e){return/^\/wheels\/[^/?#]+(?:[?#].*)?$/.test(e)}import{readHidable as BU}from"efficient-easel/draw";function UP({value:e,onChange:o,nameBox:t}){let r=BU(e).text,[a,n]=WP(!1),s=a||r.trim()!=="",l=EU();return HP(vU,{children:[na(OU,{label:i("Add an anchor"),labelId:l,icon:na(AU,{}),action:na(_U,{checked:s,ariaLabelledBy:l,onChange:d=>{n(d),!d&&r!==""&&o("")}})}),s&&t(e,o),s&&na(DU,{name:r})]})}function DU({name:e}){let o=TU(RU),t=o?.templateId?"":o?.currentSlug??"",[r,a]=WP("");PU(()=>a(cc()),[]);let n=FU(e);if(!n||!t)return null;let s=`${r}${of(t,n)}`,l=s.replace(/^https?:\/\//,""),d=l.lastIndexOf("#");return na("div",{className:"sf-anchor-link",children:na(LU,{value:s,label:i("link"),size:"sm",children:HP("span",{className:"sf-anchor-link-text",children:[na("span",{className:"sf-anchor-link-path",children:l.slice(0,d)}),na("span",{className:"sf-anchor-link-hash",children:l.slice(d)})]})})})}import{jsx as ir,jsxs as NU}from"react/jsx-runtime";import{Fragment as MU}from"react";import{Button as tf,Tooltip as HU}from"efficient-shell/ui";function GP({status:e,statusText:o,onRefresh:t,busy:r=!1,edit:a,hint:n,spaced:s=!0,compact:l=!1,oneLine:d=!1}){return l?ir("div",{className:`sf-blogsource sf-blogsource--compact${d?" sf-blogsource--line":""}`,style:s?{marginTop:8}:void 0,children:ir(HU,{content:n,className:d?"sf-name-tip":void 0,children:ir("p",{className:"sf-blogsource-status","data-state":e,children:[o?ir(MU,{children:o},"status"):null,t?ir(tf,{variant:"link",size:"sm",className:"sf-blogsource-link",onClick:t,disabled:r,children:i("Refresh now")},"refresh"):null,a?ir(tf,{variant:"link",size:"sm",className:"sf-blogsource-link",onClick:a.onClick,children:a.label},"edit"):null].filter(Boolean).flatMap((c,f)=>f?[" \xB7 ",c]:[c])})})}):NU("div",{className:"sf-blogsource",style:s?{marginTop:9}:void 0,children:[ir("p",{className:"sf-blogsource-status","data-state":e,children:o}),t?ir(tf,{variant:"secondary",className:"sf-blogsource-action",onClick:t,disabled:r,children:i("Refresh now")}):null,a?ir(tf,{variant:"secondary",className:"sf-blogsource-action",onClick:a.onClick,children:a.label}):null,ir("p",{className:"es-field-hint",children:n})]})}import{AdjustIcon as uV,EyeIcon as mV,AnimationIcon as hV,BackgroundIcon as y0,BorderAllIcon as xV,BlockSectionIcon as gV,ColumnWidthsIcon as EI,ColumnsIcon as L0,CornerIcon as F0,DirectionDownIcon as IV,DirectionLeftIcon as bV,DirectionRightIcon as yV,DirectionUpIcon as SV,EditIcon as wV,GapIcon as CV,GridIcon as kV,GroundIcon as kI,HashIcon as vV,HeightIcon as B0,ImageIcon as TV,ListIcon as PV,LocationIcon as S0,PaddingBottomIcon as D0,PaddingLeftIcon as N0,PaddingRightIcon as M0,PaddingTopIcon as OI,PageIcon as EV,StickyIcon as H0,SearchIcon as OV,SquareIcon as _V,TypeIcon as AV,WidthIcon as RV}from"efficient-easel/icons";import{jsx as $e,Fragment as za,jsxs as $a}from"react/jsx-runtime";import{CaptionIcon as WU,DateIcon as UU,FlagIcon as GU,TitleIcon as zU,ButtonIcon as $U,DollarIcon as KU,HashIcon as jU,LinkIcon as VU,NoteIcon as YU,TagIcon as qU,TextLinesIcon as XU}from"efficient-easel/icons";var zP={body:XU,button:$U,link:VU,label:qU,number:jU,price:KU,note:YU,name:GU,date:UU,caption:WU,title:zU},$P={eyebrow:$a(za,{children:[$e("path",{d:"M5 6.5h5"}),$e("path",{d:"M5 12.5h14"}),$e("path",{d:"M5 18h11"})]}),heading:$a(za,{children:[$e("path",{d:"M6.5 5v14"}),$e("path",{d:"M17.5 5v14"}),$e("path",{d:"M6.5 12h11"})]}),intro:$a(za,{children:[$e("path",{d:"M4 5.5v13"}),$e("path",{d:"M8 7.5h12"}),$e("path",{d:"M8 12h12"}),$e("path",{d:"M8 16.5h8"})]}),value:$a(za,{children:[$e("rect",{x:"2.5",y:"7",width:"19",height:"10",rx:"2"}),$e("path",{d:"M6.5 12h7"})]}),quote:$a(za,{children:[$e("path",{d:"M9.5 5.5C7 7.2 5.5 9.7 5.5 12.8h4v5.7h-5v-5.7"}),$e("path",{d:"M19.5 5.5c-2.5 1.7-4 4.2-4 7.3h4v5.7h-5v-5.7"})]}),tag:$a(za,{children:[$e("rect",{x:"3",y:"5.5",width:"18",height:"13",rx:"2.5"}),$e("path",{d:"M8 9.5h8"}),$e("path",{d:"M12 9.5v5"})]}),meta:$a(za,{children:[$e("path",{d:"M4 7h16"}),$e("path",{d:"M4 14h3.5"}),$e("path",{d:"M10.5 14h3"}),$e("path",{d:"M17 14h3"})]})};function tg({noun:e,size:o=14,strokeWidth:t=1.8,className:r,style:a}){let n=zP[e];return n?$e("span",{className:r,style:{display:"inline-flex",...a},"aria-hidden":"true",children:$e(n,{size:o})}):$e("svg",{className:r,style:a,width:o,height:o,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:t,strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:$P[e]})}var nbe=Object.keys(zP);var sbe=Object.keys($P);import{parseHexColor as aG}from"efficient-shell/format";import{parseHexColor as qP}from"efficient-shell/format";import{COLOR_SLOTS as XP,FILL_COLOR_SLOTS as oG,colorRole as tG,fillColorRole as ZP}from"efficient-shell/markup";import{parseHexColor as KP}from"efficient-shell/format";import{FILL_COLOR_SLOTS as ZU}from"efficient-shell/markup";var rf=e=>{let o=nk.find(t=>t.role===e);return o?`var(${o.token})`:""},JU=e=>rf(e)?`var(--theme-${e})`:"",QU={main:{ink:Zr.accent,page:Zr.accent,key:"accent",label:()=>i("Main"),words:e=>i("Theme {n} main color",{n:e})},text:{ink:Zr.text,page:Zr.text,key:"text",label:()=>i("Text"),words:e=>i("Theme {n} text color",{n:e})},background:{ink:rf("bg"),page:JU("bg"),key:"background",label:()=>i("Background"),words:e=>i("Theme {n} background",{n:e})},muted:{ink:Zr.labels,page:Zr.labels,key:"muted",label:()=>i("Muted"),words:e=>i("Theme {n} muted color",{n:e})},surface:{ink:rf("surface"),page:rf("surface"),key:"surface",label:()=>i("Surface"),words:e=>i("Theme {n} surface color",{n:e})}};function sa(e){return G(QU,e)}var rg="#9ca3af";function is(e,o,t){let r=sa(e);return r?{hex:KP(o[r.key]??"")??"",words:r.words(t)}:null}function jP(e,o){return ZU.flatMap(t=>{let r=is(t,e,o);return r&&sa(t)?.ink?[{name:t,label:r.words,value:r.hex||rg}]:[]})}var eG=["main","text","background"];function VP(e){let o=new Set,t=[];return uo(e).themes.forEach((r,a)=>{for(let n of eG){let s=sa(n),l=s?r[s.key]:void 0,d=typeof l=="string"&&l?KP(l):null;!s||!d||o.has(d)||(o.add(d),t.push({value:d,label:s.words(a+1)}))}}),t}function Er(e){return sa(e)?.ink??""}function dr(e){if(typeof e!="string")return null;let o=ZP(e.trim());return o?.kind==="slot"&&Er(o.slot)?o.slot:null}var rG={accent:"main",labels:"muted"};function at(e){return G(rG,e)??e}function ds(e){if(!e)return"";if(e.startsWith("#"))return qP(e)===e.toLowerCase()?e:"";let o=tG(at(e));return o?.kind==="slot"?Er(o.slot):""}function cs(e,o=XP){return o.flatMap(t=>{let r=sa(t);return r?.ink?[{name:t,label:r.label(),value:e?.[t]||rg}]:[]})}function JP(e){let o=ZP(at(e));return o?.kind==="slot"?Er(o.slot):""}function ag(e){let o=e?.trim();return o?oG.find(t=>Er(t)===o)??null:null}function QP(e){let o={},t=e.ownerDocument,r=t?.defaultView;if(!t||!r)return o;let a=r.getComputedStyle(e),n=t.createElement("canvas").getContext("2d");for(let s of XP){let l=Er(s);if(!l)continue;let d=l.replace(/^var\((--[\w-]+)\)$/,"$1"),c=a.getPropertyValue(d).trim();if(!c)continue;let f=YP(c);!f&&n&&(n.fillStyle="#000000",n.fillStyle=c,f=YP(String(n.fillStyle))),f&&(o[s]=f)}return o}function YP(e){let o=e.trim().toLowerCase();if(o.startsWith("#"))return qP(o);let t=o.match(/^rgba?\(\s*(\d+)[\s,]+(\d+)[\s,]+(\d+)/);return t?`#${t.slice(1,4).map(r=>Math.min(255,Number(r)).toString(16).padStart(2,"0")).join("")}`:null}var nG="#ffffff";function ng(e){return eE(e)||(sG(e)?e:nG)}function eE(e){let o=dr(e);return o?sa(o)?.page??"":""}function sG(e){return typeof e=="string"&&aG(e)===e.toLowerCase()||eE(e)!==""}function kbe(e){return{"--bg":ng(e)}}import{parseHexColor as lG}from"efficient-shell/format";import{fillColorRole as iG}from"efficient-shell/markup";function Ka(e,o,t,r){let a=r??t??o,n=t!==null&&t!==o,s=a!==null&&a!==o;return{className:[n?e.tabletClass:"",s?e.phoneClass:""].filter(Boolean).join(" "),style:{...n?{[e.tabletVar]:t}:{},...s?{[e.phoneVar]:a}:{}}}}var Fbe="sf-card",la={min:0,max:100,step:5,fallback:0,unit:"%"},dG=[{label:"Even",value:"even"},{label:"From the bottom",value:"bottom"}],cG="68%",Bbe={desktop:20,phone:20,side:40,sidePhone:24},Dbe="sf-box-sides";function lg(e){return typeof e=="string"&&e.trim()!==""}function Nbe(e){return lg(typeof e?.bgImage=="string"?e.bgImage:null)||af(e)}function af(e){return rt(e,qd)!==""}function Mbe(e,o){return o||!af(e)?e:{...e,[qd]:""}}function Hbe(e,o){return Hl(o,rt(e,qd))?.trim()||null}function oE(e,o){let t=typeof e=="number"?e:Number.parseFloat(String(e??""));if(!Number.isFinite(t)||t<=0)return null;let r=(Math.min(la.max,Math.max(la.min,t))/100).toFixed(2);return o!=="bottom"?{background:nc(Number(r))}:{background:`linear-gradient(0deg, ${nc(Number(r))} 0%, ${nc(0)} ${cG})`}}var nf=e=>typeof e=="string"?lG(e.trim()):null,sg=e=>{let o=nf(e);if(o!==null||typeof e!="string")return o;let t=e.trim();return t&&!t.startsWith("#")&&JP(t)||null},sf=e=>{if(typeof e!="string")return null;let o=iG(at(e.trim()));return o?.kind==="slot"?o.slot:null},fG="swatch";function Wbe(e,o){if(!o)return null;let t=Hl(o,rt(e,fG)),r=dr(t);return nf(t)??(r&&Er(r)||null)}var pG={tabletClass:"sf-fill-tablet",tabletVar:"--sf-fill-tablet",phoneClass:"sf-fill-phone",phoneVar:"--sf-fill-phone"};function Ube(e,o,t){return Ka(pG,sg(e),sg(o),sg(t))}var uG={tabletClass:"sf-wash-tablet",tabletVar:"--sf-wash-tablet",phoneClass:"sf-wash-phone",phoneVar:"--sf-wash-phone"};function Gbe(e){let o=oE(e.darken,e.darkenStyle);if(!o)return{className:"",style:{}};let t=(u,p)=>String(oE(u,p)?.background??"none"),r=u=>(typeof u=="number"||typeof u=="string"&&u.trim()!=="")&&Number.isFinite(Number(u))?u:void 0,a=u=>dG.some(p=>p.value===u)?u:void 0,[n,s,l,d]=[r(e.darkenTablet),a(e.darkenStyleTablet),r(e.darkenPhone),a(e.darkenStylePhone)],c=n??e.darken,f=s??e.darkenStyle;return Ka(uG,String(o.background),n!==void 0||s!==void 0?t(c,f):null,l!==void 0||d!==void 0?t(l??c,d??f):null)}function zbe(e,o){let t={"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"]},[r,a]=t[e]??t.center,[n,s]=o==="column"?[a,r]:[r,a],l={start:"justify-start",center:"justify-center",end:"justify-end"},d={start:"items-start",center:"items-center",end:"items-end"};return`${l[n]} ${d[s]}`}function tE(e,o){let t=e?.content;if(!Array.isArray(t))return null;for(let r of t){if(!r||typeof r!="object")continue;let{type:a,props:n}=r;if(n?.id===o)return null;if(ig(r,o,0))return{type:typeof a=="string"?a:"",props:n??{}}}return null}function ig(e,o,t){if(t>12||!e||typeof e!="object")return!1;if(Array.isArray(e))return e.some(a=>ig(a,o,t+1));let r=e.props;return r&&typeof r=="object"&&r.id===o?!0:Object.values(e).some(a=>ig(a,o,t+1))}function rE(e,o){let t=e?.content;return Array.isArray(t)?lf(t,o,0)??[]:[]}function lf(e,o,t){if(t>12||!e||typeof e!="object")return null;if(Array.isArray(e)){for(let a of e){let n=lf(a,o,t+1);if(n)return n}return null}let r=e.props;if(r&&typeof r=="object"){if(r.id===o)return[];for(let a of Object.values(r)){let n=lf(a,o,t+1);if(n)return[r,...n]}return null}for(let a of Object.values(e)){let n=lf(a,o,t+1);if(n)return n}return null}import{SettingsDefaultReset as Do,SettingsDrill as LV,SettingsField as co,SettingsGroup as FV,SettingsSegmented as BV,SettingsBorder as DV,SettingsSidesEach as NV,SettingsSwitch as _I,borderSides as MV,borderStartEach as HV}from"efficient-easel/panel";import{ListField as WV}from"efficient-easel/fields";import{DisplayChips as UV}from"efficient-shell/ui";import{HIDDEN_KEY as mG,hiddenInEveryView as hG,hiddenInView as dg,hiddenKeyOf as aE}from"efficient-easel/screen/lib/content/view-hide";var xG={"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"},gG={"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"},nE=e=>(e.desktop?"1":"0")+(e.tablet?"1":"0")+(e.mobile?"1":"0");function df(e,{atSectionLine:o=!1}={}){return(o?gG:xG)[nE(e)]}var fs=[mG,aE("tablet"),aE("mobile")];function sE(e){return{desktop:dg(e,"desktop"),tablet:dg(e,"tablet"),mobile:dg(e,"mobile")}}function Xl(e){return hG(e)}function Vbe(e){let o=sE(e);return["desktop","tablet","mobile"].filter(t=>o[t]).join(" ")}var IG={"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!"},bG={"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 Ybe(e,{atSectionLine:o=!1}={}){return(o?bG:IG)[nE(sE(e))]}function ps(e){if(!e||typeof e!="object"||Array.isArray(e))return{};let o={};for(let[t,r]of Object.entries(e))typeof r=="boolean"&&(o[t]=r);return o}function cf(e,o){return ps(e)[o]!==!1}function cg(e,o,t){let r=ps(o)[t];return typeof r=="boolean"?r:cf(e,t)}function lE(e){return Object.values(ps(e)).some(o=>o===!1)}function iE(e){return Object.keys(ps(e)).length>0}function dE(e,o,t){let r={...ps(e)};return t?delete r[o]:r[o]=!1,Object.keys(r).length?r:void 0}function cE(e,o,t){return{...ps(e),[o]:t}}function Zbe(e,o,t,{atSectionLine:r=!0}={}){let a=!cf(e,t);return df({desktop:a,tablet:a,mobile:!cg(e,o,t)},{atSectionLine:r})}import{ColorSwatch as GV,CornersInput as zV,DatePicker as _Te,DateTimePicker as $V,FOCAL_DEFAULT as ATe,IconPicker as W0,COLUMN_COUNT_MAX as w0,COLUMN_SHARE_MIN as KV,COLUMN_SHARES_EQUAL as jV,resolveColumnShares as U0,WidthsBar as VV,useShellStrings as YV,IconButton as G0,InputNumber as C0,Slider as qV,Tooltip as AI}from"efficient-shell/ui";import{backendOf as yG}from"efficient-easel/screen/lib/session";var Ze=yG,ff=e=>e.blocks;async function fE(e){let o=e.trim();if(!o)return null;let t=Ze().geocode;if(!t)throw new Error("geocode_unavailable");return t.locate(o)}var fg="Lookup busy \u2014 try again in a moment.",pf=e=>typeof e=="number"&&Number.isFinite(e);function aye(e){return e.some(o=>{let t=o?.geocode;return t?t.pending||t.manual&&t.lat===void 0&&t.lng===void 0?!0:pf(t.lat)&&t.lat!==o.lat||pf(t.lng)&&t.lng!==o.lng:!1})}async function nye(e,o,{geocode:t=fE,courtesyGapMs:r=1100}={}){let a=s=>new Promise(l=>setTimeout(l,s)),n=e.slice();if(e.some(s=>s?.geocode?.pending)){let s=[],l=!1;for(let d of e){if(!d?.geocode?.pending){s.push(d);continue}l&&r>0&&await a(r),l=!0;try{let c=await t(o(d));s.push(c?{...d,lat:c.lat,lng:c.lng,geocode:{...d.geocode,pending:!1,ok:!0,status:`Found \u2014 ${c.label.split(",").slice(0,3).join(",").trim()}`,lat:c.lat,lng:c.lng}}:{...d,geocode:{...d.geocode,pending:!1,ok:!1,status:"No match \u2014 check the address and try again."}})}catch{s.push({...d,geocode:{...d.geocode,pending:!1,ok:!1,status:fg}})}}n=s}return n.map(s=>{let l=s?.geocode;if(!l)return s;if(l.manual&&l.lat===void 0&&l.lng===void 0)return{...s,geocode:{...l,lat:s.lat,lng:s.lng}};let d=pf(l.lat)&&l.lat!==s.lat?l.lat:s.lat,c=pf(l.lng)&&l.lng!==s.lng?l.lng:s.lng;return d!==s.lat||c!==s.lng?{...s,lat:d,lng:c}:s})}import{jsx as Vo,jsxs as ug}from"react/jsx-runtime";import{useRef as SG}from"react";import{ColorPicker as wG,ColorPickerPanel as CG,ColorSwatch as kG,HexInput as vG,Popover as TG,Tooltip as PG,colorFill as EG,colorSwatchClasses as OG,useShellStrings as _G}from"efficient-shell/ui";import{SettingsDefaultReset as AG,SettingsField as RG}from"efficient-easel/panel";import{typedHex as pg}from"efficient-easel/pick";var pE="Not set";function LG({value:e,onChange:o,label:t,id:r,caption:a,inherited:n,ariaLabel:s,choices:l}){return Vo(BG,{value:e,onChange:o,label:i(s??t),id:r,caption:a,inherited:n,choices:l})}function FG(){let{theme:e}=ge();return VP(e)}function BG({value:e,onChange:o,label:t,id:r,caption:a,inherited:n,choices:s}){let l=FG(),d=e?null:pg(n??""),c=a!==void 0&&(!e||pg(a)!==pg(e))?a:null,f=u=>{u!==e&&o(u)};return ug("div",{className:"sf-colour",children:[s?Vo(DG,{id:r,value:e,onChange:o,label:t,presets:l,follows:d,choices:s}):Vo(wG,{id:r,value:e,onChange:f,label:t,presets:l,fallback:d??void 0,size:"md",align:"start"}),c!==null?Vo("span",{className:"sf-colour-caption",children:c}):Vo("span",{className:"sf-colour-hexwrap",children:Vo(vG,{value:e||d||"",onChange:f,label:i("{label} hex code",{label:t}),placeholder:e||d?void 0:i(pE),className:d?"sf-colour-hex is-inherited":"sf-colour-hex",size:"md"})})]})}function DG({value:e,onChange:o,label:t,id:r,presets:a,follows:n,choices:s}){let l=_G().color,d=e||n||"",c=s.findIndex(p=>p.selected),f=c>=0,u=SG(c);return f&&(u.current=c),Vo(TG,{id:r,trigger:Vo("span",{"aria-hidden":"true",className:"absolute inset-0",style:EG(d)}),triggerLabel:l.swatch(t,d.toUpperCase()||l.none),triggerClassName:OG({size:"md"}),"aria-label":l.panel(t),align:"start",children:ug("div",{className:"sf-colour-window",children:[Vo("div",{role:"group","aria-label":t,className:"sf-colour-choices",children:s.map(p=>Vo(PG,{content:p.label,children:Vo(kG,{color:p.color,"aria-label":p.label,selected:p.selected,onClick:()=>{p.selected||p.onPick()}})},p.label))}),Vo(CG,{value:f?"":e,onChange:o,label:t,presets:a,fallback:(f?d:n)??void 0},u.current)]})})}function Yo({label:e,icon:o,changed:t,hint:r,onReset:a,resetTo:n,children:s,...l}){return ug(RG,{label:e,icon:o,htmlFor:l.id,changed:t,hint:r,action:a?Vo(AG,{words:se()?.panel,label:e,changed:!!t,detail:n,onReset:a}):void 0,children:[LG({...l,label:e}),s]})}function Zl({label:e,icon:o,value:t,inherited:r,resetTo:a,onChange:n,onReset:s,hint:l,choices:d}){let c=!!t;return Vo(Yo,{label:e,icon:o,value:t,inherited:c?void 0:r,onChange:n,changed:c,onReset:s,resetTo:a,hint:l,choices:d})}import{keptByRow as vI}from"efficient-easel/screen/lib/document/style-fields";import{jsx as NG}from"react/jsx-runtime";import{useEffect as MG,useState as HG}from"react";import{clearRangeOf as WG,markSelection as UG,useCaretEdit as GG}from"efficient-easel/copy";import{TextToolbar as zG}from"efficient-shell/ui";function $G(e,o,t){return UG(e,o,t,bv)}function uE(e,o){let t=WG(o,e.length),r=Sv(e,t.start,t.end);return r.text===e?null:r}function KG(e){let[o,t]=HG(null);return MG(()=>{let r=e.current?.ownerDocument??(typeof document>"u"?null:document);if(!r)return;let a=()=>{let n=e.current;if(!n||r.activeElement!==n)return;let s=n.selectionStart??n.value.length,l=n.selectionEnd??s;t(d=>d&&d.start===s&&d.end===l?d:{start:s,end:l})};return r.addEventListener("selectionchange",a),()=>r.removeEventListener("selectionchange",a)},[e]),[o,t]}function jG({target:e,value:o,onChange:t,disabled:r=!1,label:a="Formatting"}){let n=GG({target:e,onChange:t}),[s,l]=KG(e),d=p=>n(h=>{let g=$G(o,p,h);return l({start:g.selectionStart,end:g.selectionEnd}),g}),c=gv(),f={};if(s)for(let p of c)f[p.style]=yv(o,s.start,s.end,p.style);let u=r?null:uE(o,s);return NG(zG,{offered:new Set(c.map(p=>p.style)),onMark:p=>d(p),pressed:f,disabled:r,"aria-label":i(a),className:"sf-markup-bar",clear:u?{onClear:()=>n(()=>{let p=e.current,h=p&&p.ownerDocument.activeElement===p?{start:p.selectionStart??0,end:p.selectionEnd??0}:null,g=uE(o,h)??{text:o,selectionStart:h?.start??0,selectionEnd:h?.end??0};return l({start:g.selectionStart,end:g.selectionEnd}),g})}:void 0})}var mg=jG;import{deviceField as mt}from"efficient-easel/screen/lib/document/device-fields";import{NO_CONTROL_FIELD as XV,NoControlMark as ZV,noControlField as z0}from"efficient-easel/screen/lib/document/panel-no-control-mark";var hg="__ownBox";function mE(e){return!!e&&typeof e=="object"&&e[hg]===!0}var xg="sfPanelOnly";function us(e){return!!e&&typeof e=="object"&&e[xg]===!0}function uf(e,o,t){return typeof e=="number"?e:typeof o=="number"?o:t}var mf=void 0;import{phoneKey as Cs,tabletKey as RI,viewKeyAt as LI}from"efficient-easel/draw";import{jsx as hf,Fragment as VG,jsxs as YG}from"react/jsx-runtime";import{useRef as qG}from"react";import{SettingsDefaultReset as XG}from"efficient-easel/panel";import{effectTiles as ZG}from"efficient-easel/screen/lib/document/effect-tiles";import{VIEW_KEY_ACCESS as hE,describedAs as JG,onDesktopWords as QG,phoneTwinFields as xE}from"efficient-easel/screen/lib/document/box-fields";function ez({row:e,read:o,...t}){let r=o(To(),t.followsView??"desktop");return e({...t,follows:r})}function Or(e,o){return Object.fromEntries(Ko.map(t=>{let r=Ie(e,t);return[r,xE(e,o(t),hE)[r]]}))}function xf(e,o,t){let r=o.render,a={...o,render:n=>hf(ez,{...n,row:r,read:t})};return Or(e,n=>n==="desktop"?o:a)}function oz({spec:e,...o}){let t=e.values.includes(o.value),r="follows"in o,a=e.read(To(),o.followsView??"desktop"),n=t?o.value:a,s=qG(null),{preview:l}=e,d=ZG({label:i(e.label),options:e.values.map(f=>({value:f,label:i(e.word(f)),picture:e.picture(f)})),fallback:e.fallback,onPreview:l?f=>s.current&&l(s.current,f):void 0}).render,c=d({value:n,onChange:f=>o.onChange(f??e.fallback)});return YG(VG,{children:[l?hf("div",{ref:s,style:{display:"contents"},children:c}):c,r&&t&&hf(XG,{words:se()?.panel,label:i(e.tileWord),changed:!0,detail:QG(f=>i(f),i(e.word(a)),o.followsView),onReset:()=>o.onChange(void 0)})]})}function gf(e,o){let t=JG({type:"custom",render:r=>hf(oz,{...r,spec:o})},{type:"select",label:o.label,options:o.values.map(r=>({value:r,label:o.word(r)}))});return xE(e,t,hE)}import{jsx as Ig,Fragment as az}from"react/jsx-runtime";import{createContext as nz,useContext as sz}from"react";var If={ProductGrid:{source:{keep:["slug"]}},GalleryItem:{product:{keep:["code","finish"]}},FeaturedCover:{source:{keep:["slug"]}},LongRead:{source:{keep:["slug"]}}},bf={Events:["posts"],SubscribeBlogs:["posts"]};var tz=["anchor"],rz=/^href$|Href$|^url$|Url$|^link$|^mailto$|^tel$/;function Jl(e){return tz.includes(e)||rz.test(e)}var gg={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"}}};gg.ContactLocations={"locations[].lat":{verb:"pii"},"locations[].lng":{verb:"pii"},"locations[].mapsUrl":{verb:"pii"},"locations[].geocode":{verb:"pii"}};var Hye=Object.fromEntries(Object.entries(If).map(([e,o])=>[e,Object.keys(o)])),Wye=Object.fromEntries(Object.entries(bf).map(([e,o])=>[e,[...o]]));import{NoControlMark as lz}from"efficient-easel/screen/lib/document/panel-no-control-mark";var gE=nz(!1);function IE({children:e}){return Ig(gE.Provider,{value:!0,children:e})}function iz(){return sz(gE)}function bE({name:e,children:o}){return!iz()||!e||!dz(e)||Jl(e)?Ig(az,{children:o}):Ig(lz,{})}function dz(e){return/^[A-Za-z0-9_$]+$/u.test(e)}var bg="off",SE="none",yg=[{label:"None",value:"off"},{label:"1, 2, 3",value:"plain"},{label:"01, 02, 03",value:"padded"},{label:"N\xB001, N\xB002",value:"numero"}],wE=[{label:"None",value:"none"},{label:"Hairline",value:"hairline"}];function Yye(e){return io(yg,bg,e)}var yE="sf-card-index",Ql="sf-card-index",qye="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",cz={plain:`counter(${Ql})`,padded:`counter(${Ql}, decimal-leading-zero)`,numero:`"N\xB0" counter(${Ql}, decimal-leading-zero)`};function Xye(e,o){return o==="off"?"":`.${e}{counter-reset:${Ql}}.${e} .${yE}{counter-increment:${Ql}}.${e} .${yE}::before{content:${cz[o]}}`}function Zye(e){return e==="hairline"?"border border-line hover:border-accent":""}var CE=[{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 JV}from"efficient-easel/draw";import{jsx as qo}from"react/jsx-runtime";import{SettingsDefaultReset as Iz,SettingsField as Sg}from"efficient-easel/panel";import{useSelectedHost as bz}from"efficient-easel/easel";import{FOCAL_DEFAULT as yz}from"efficient-shell/format";import{ImageIcon as wg,PlayIcon as vE}from"efficient-easel/icons";import{ImageFocusPoint as Sz,MediaUploadField as wz}from"efficient-shell/ui";import{useContext as Cz}from"react";import{ScreenDocumentContext as kz}from"efficient-easel/screen/components/ScreenDocumentContext";import{tabletKey as vz,viewKeyAt as Tz}from"efficient-easel/draw";import{usePreviewDevice as Pz}from"efficient-easel/draw/client";import{formatFocal as fz,parseFocal as pz}from"efficient-shell/format";var uz="sf-focus-phone",mz="--sf-focus-phone",hz="sf-focus-tablet",xz="--sf-focus-tablet",ei=e=>{if(typeof e!="string"||!/^\s*-?\d+(\.\d+)?%\s+-?\d+(\.\d+)?%\s*$/.test(e))return null;let{x:o,y:t}=pz(e);return fz(o,t)};function kE(e,o){return Ka(gz,null,ei(o),ei(e))}var gz={tabletClass:hz,tabletVar:xz,phoneClass:uz,phoneVar:mz};import{shownTier as Cg}from"efficient-easel/screen/lib/document/device-fields";import{onDesktopWords as Ez}from"efficient-easel/screen/lib/document/box-fields";import{requestMediaPick as Oz}from"efficient-easel/screen/lib/media-picker";import{useEaselHost as _z}from"efficient-easel/screen/lib/host";import{useEaselSession as Az}from"efficient-easel/screen/lib/session-context";function Rz(e,o,t,r=!0){let a=Cg(t),n=typeof e[o]=="string"&&e[o]?String(e[o]):yz;if(a==="desktop")return{ownView:!1,followed:n,followsView:"desktop",own:void 0,focus:n,key:o};let s=Tz(o,a),l=ei(e[s])??void 0,d=a==="mobile"&&r?ei(e[vz(o)])??void 0:void 0,c=d??n;return{ownView:!0,followed:c,followsView:d?"tablet":"desktop",own:l,focus:l??c,key:s}}function Lz(e,o,t){let r=bz();if(!o||!r)return null;let a=r.values??{};if(t&&!t(a,Cg(e)))return null;let n=Rz(a,o,e,t?t(a,"tablet"):!0),s=r.onChange;return{...n,set:l=>s(n.key,l),clear:()=>s(n.key,mf)}}function TE({value:e,onChange:o,label:t,accept:r,placeholder:a,focusKey:n,focusWhen:s,frameKey:l,fieldKey:d}){let c=_z(),f=Az(),u=i(t),p=Pz(),h=r.startsWith("video"),g=Lz(p,h?void 0:n,s),I=!!n&&Cg(p)!=="desktop",C=Cz(kz),S=ia(),k=l&&d?{video:d,frame:l}:null,y=T=>Oz(c,{accept:r,title:u,...T?{file:T}:{}}).then(M=>!M||!k?M?.url??null:(S({[k.video]:M.url,[k.frame]:M.posterUrl??""}),null)),b=k?T=>T?o(T):S({[k.video]:"",[k.frame]:""}):o,O=Wo(e);if(I&&(!g||!O))return null;if(C&&!C.capabilities.mediaEditing)return qo(Sg,{label:u,icon:h?qo(vE,{}):qo(wg,{}),children:qo("div",{className:"sf-image-slot-inert",children:h?i("Templates don\u2019t store videos \u2014 this slot stays a placeholder. Each website picks its own after it\u2019s created."):i("Templates don\u2019t store images \u2014 this slot stays a placeholder. Each website picks its own after it\u2019s created.")})});let W=g?.ownView&&O?qo(Iz,{words:se()?.panel,label:i("Image focus"),changed:!!g.own,detail:Ez(T=>i(T),g.followed,g.followsView),onReset:g.clear}):void 0;return I&&g?qo(Sg,{label:u,icon:qo(wg,{}),action:W,children:qo("div",{style:{flex:"1 1 auto",minWidth:0},children:qo(Sz,{value:g.focus,onChange:g.set,label:i("Image focus"),image:O,hint:null})})}):qo(Sg,{label:u,icon:h?qo(vE,{}):qo(wg,{}),children:qo("div",{style:{flex:"1 1 auto",minWidth:0},children:qo(wz,{value:O,onChange:b,onPick:y,accept:h?"video/*":"image/*",kind:h?"video":"image",placeholder:a===void 0?void 0:i(a),maxSizeBytes:Ze(f).media.maxUploadBytes,...g?{focus:g.focus,onFocusChange:g.set}:{}})})})}import{jsx as PE}from"react/jsx-runtime";import{useId as Fz}from"react";import{FieldSelect as Bz}from"efficient-easel/fields";import{SettingsField as Dz}from"efficient-easel/panel";function Nz(e){return e.map(({value:o,label:t,note:r})=>({value:o,label:t,...r?{meta:r}:{}}))}function EE({label:e,options:o,value:t,onChange:r,emptyLabel:a,icon:n,hint:s}){let l=Fz(),d=`${l}-label`,c=`${l}-button`,f=Array.isArray(t)?t:[];return PE(Dz,{label:i(e),labelId:d,icon:n,hint:s,children:PE(Bz,{id:c,multiple:!0,value:f,options:Nz(o),onChange:r,placeholder:a===void 0?i("None"):i(a),ariaLabelledBy:`${d} ${c}`,inline:!0})})}import{jsx as ho,jsxs as Va,Fragment as p$}from"react/jsx-runtime";import{useCallback as UE,useContext as u$,useId as $E,useRef as GE,useState as zE}from"react";import{ThemeIcon as m$}from"efficient-easel/icons";import{Button as h$,useClickOutside as x$}from"efficient-shell/ui";import{SettingsField as g$}from"efficient-easel/panel";import{ScreenDocumentContext as I$}from"efficient-easel/screen/components/ScreenDocumentContext";import{jsx as fe,jsxs as ca,Fragment as jz}from"react/jsx-runtime";import{parseHexColor as Vz}from"efficient-shell/format";import{Button as vg,IconButton as Yz,Tooltip as qz}from"efficient-shell/ui";import{jsx as da,jsxs as Mz}from"react/jsx-runtime";import{AccentIcon as Hz}from"efficient-easel/icons";import{Button as Wz,Tooltip as Uz}from"efficient-shell/ui";function kg(e){return $o(e).background}function Gz(e){let o=Kr(e.accent,kg(e));return o===null?null:{ratio:o,grade:Xn(o)}}function zz(e){let o=kg(e),t=Kr(e.accent,o);return t===null?[]:$C(e.accent).filter(r=>{let a=Kr(r,o);return a!==null&&a>t&&Xn(a)==="good"})}var $z={good:"Easy to read","large-only":qn["large-only"],hard:qn.hard};function OE({value:e,onChange:o}){let t=Gz(e),r=t?.grade,a=t&&t.grade!=="good"?zz(e):[];return da(Yo,{label:i("Main color"),icon:da(Hz,{}),hint:t?i($z[t.grade]):void 0,value:e.accent,onChange:n=>o({...e,accent:n}),children:a.length>0?da("div",{className:"w-full min-w-0",children:Mz("div",{className:"sf-readability",children:[da("p",{className:"sf-readability-advice",children:Kz(r,!0)}),da("div",{className:"sf-readability-suggestions",children:a.map(n=>{let s=Kr(n,kg(e));return da(Uz,{content:i("Use {colour}",{colour:n.toUpperCase()}),children:da(Wz,{variant:"secondary",className:"sf-readability-suggestion",leftIcon:da("span",{className:"sf-readability-chip",style:{background:n},"aria-hidden":!0}),onClick:()=>o({...e,accent:n}),children:s?`${s.toFixed(1)}:1`:n.toUpperCase()})},n)})})]})}):null})}function Kz(e,o){return e?e==="good"?i("This color reads clearly on your pages."):o?i("This color is hard to read on this theme's page. The buttons below are the same hue, darkened."):i("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."):i("Pick a color to see how it reads.")}import{ButtonIcon as Xz,ChevronDownIcon as AE,ChevronUpIcon as Zz,GroundIcon as Jz,LayoutIcon as Qz,SquareIcon as e$,TextSmallIcon as o$,TypeIcon as _E}from"efficient-easel/icons";var oi=e=>i("Theme {n}",{n:e+1});function RE({colors:e}){let o=$o(e),t=yl(e)??o.accent;return ca("span",{className:"sf-theme-page",style:{background:o.background,color:o.text},"aria-hidden":!0,children:[fe("span",{className:"sf-theme-eyebrow",style:{color:o.muted},children:i("label")}),ca("span",{className:"sf-theme-headline",children:[i("Heading")," ",fe("span",{style:{color:o.accent},children:i("main")})]}),fe("span",{className:"sf-theme-body",children:i("body text")}),ca("span",{className:"sf-theme-row",children:[fe("span",{className:"sf-theme-btn",style:{background:t,color:yh(e,o.accent)},children:i("button")}),fe("span",{className:"sf-theme-mini",style:{background:o.surface,borderColor:o.line},children:i("card")})]})]})}var Tg={"Text color":fe(_E,{}),"Label color":fe(o$,{}),Background:fe(Jz,{}),"Panels & cards":fe(Qz,{}),Borders:fe(e$,{}),"Button color":fe(Xz,{}),"Button text color":fe(_E,{})};function t$({label:e,colorKey:o,value:t,onChange:r,idPrefix:a="sf-theme-ink"}){let n=`${a}-${o}`;return fe(Yo,{label:i(e),icon:Tg[e],id:n,value:t,onChange:s=>r(o,s)})}function r$({value:e,accent:o,onChange:t,idPrefix:r="sf-theme-ink"}){let a=`${r}-button`,n=e!==void 0&&Vz(e)===e.toLowerCase(),s=n?e:o;return fe(Yo,{label:i("Button color"),icon:Tg["Button color"],id:a,value:s,caption:n?s:i("Main"),onChange:t})}function a$({colors:e,accent:o,onChange:t,idPrefix:r="sf-theme-ink"}){let a=`${r}-button-ink`,n=KC(e),s=yh(e,o),l=yl(e)??o,d=Xn(Kr(s,l)??0);return fe(Yo,{label:i("Button text color"),icon:Tg["Button text color"],hint:n&&d!=="good"?i("{grade} on the button",{grade:i(qn[d])}):void 0,id:a,value:s,caption:n?s:i("Auto"),onChange:t})}var n$=[{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 Pg({colors:e,onChange:o,idPrefix:t}){let r=$o(e);return fe(jz,{children:n$.map(a=>"colour"in a?fe(OE,{value:e,onChange:o},"colour"):"moduleBreak"in a?fe("div",{className:"sf-theme-module-break","aria-hidden":"true"},"module-break"):"button"in a?fe(r$,{value:e.button,accent:r.accent,onChange:n=>o({...e,button:n}),idPrefix:t},"button"):"buttonInk"in a?fe(a$,{colors:e,accent:r.accent,onChange:n=>o({...e,buttonInk:n}),idPrefix:t},"buttonInk"):fe(t$,{label:a.label,colorKey:a.key,value:r[a.key],onChange:(n,s)=>o({...e,[n]:s}),idPrefix:t},a.key))})}function yf({index:e,colors:o,selected:t,role:r="radio",open:a,editable:n=!0,onPick:s,onEdit:l,onChangeColors:d}){let c=$o(o),f=oi(e),u=e<bh.length&&!o.brandInk?bh[e]:null,p=Xn(Kr(c.text,c.background)??0),h=u?JSON.stringify(o)!==JSON.stringify(u):!1,g=a!==void 0;return ca("div",{className:`sf-theme-card${t?" is-selected":""}`,children:[fe("button",{type:"button",role:r,"aria-checked":r==="radio"?t:void 0,"aria-selected":r==="option"?t:void 0,"aria-label":f,className:"sf-theme-pick",onClick:s,children:fe(RE,{colors:o})}),ca("div",{className:"sf-theme-foot",children:[fe("span",{className:"sf-theme-name",children:f}),p!=="good"&&fe("span",{className:"sf-theme-warn",children:i(qn[p])}),n&&l&&g&&fe("span",{className:"sf-theme-edit",children:fe(qz,{content:a?i("Collapse"):i("Edit colors"),children:fe(Yz,{size:"sm","aria-expanded":a,"aria-controls":`sf-theme-colours-${e}`,"aria-label":a?i("Collapse {name}",{name:f}):i("Edit colors for {name}",{name:f}),onClick:l,children:a?fe(Zz,{size:14}):fe(AE,{size:14})})})}),n&&l&&!g&&fe(vg,{variant:"secondary",size:"sm",className:"sf-theme-edit","aria-label":i("Edit {name}",{name:f}),onClick:l,children:i("Edit")})]}),a&&ca("div",{id:`sf-theme-colours-${e}`,className:"sf-theme-colours",children:[fe(Pg,{colors:o,onChange:I=>d?.(I)}),u&&fe(vg,{variant:"link",size:"sm",className:"sf-theme-reset",disabled:!h,onClick:()=>d?.({...u}),children:h?i("Reset {name} to the preset",{name:f}):i("Not changed")})]})]})}function LE({colors:e,name:o,nameId:t,open:r,menuId:a,labelId:n,buttonRef:s,onClick:l,onKeyDown:d,onEdit:c}){return ca("div",{className:"sf-secttheme-btn",children:[fe("button",{ref:s,type:"button",className:"sf-theme-pick","aria-expanded":r,"aria-controls":a,"aria-labelledby":`${n} ${t}`,onClick:l,onKeyDown:d,children:e?fe(RE,{colors:e}):fe("span",{className:"sf-secttheme-nopreview","aria-hidden":"true"})}),ca("div",{className:"sf-theme-foot",children:[fe("span",{id:t,className:"sf-theme-name",children:o}),c&&fe(vg,{variant:"secondary",size:"sm",className:"sf-theme-edit","aria-label":i("Edit {name}",{name:o}),onClick:c,children:i("Edit")}),fe("button",{type:"button",className:"sf-secttheme-caret","aria-hidden":"true",tabIndex:-1,onClick:l,children:fe(AE,{size:12,className:"sf-multi-caret","aria-hidden":"true"})})]})]})}import{useCallback as Lg,useEffect as ME,useRef as kf}from"react";import{currentEaselSession as i$}from"efficient-easel/screen/lib/session";import{useEaselSession as d$}from"efficient-easel/screen/lib/session-context";import{useSyncExternalStore as s$}from"react";var BE,Eg=null,ja=null,Sf=0,Og=new Set;function _g(e){BE=e;for(let o of Og)o()}function Ag(e){Eg=e,Sf+=1,ja&&clearTimeout(ja),ja=null,_g(void 0)}function wf(e){Sf+=1,_g(e)}function _r(e=250){Eg&&(ja&&clearTimeout(ja),ja=setTimeout(()=>{ja=null;let o=Eg;if(!o)return;let t=++Sf;o().then(r=>{t===Sf&&_g(r)}).catch(()=>{})},e))}function FE(){return BE}function l$(e){return Og.add(e),()=>{Og.delete(e)}}function Cf(){return s$(l$,FE,FE)}var Rg=new Set;function DE(e){return Rg.add(e),()=>{Rg.delete(e)}}async function NE(){let e=(await Promise.allSettled([...Rg].map(async o=>o()))).find(o=>o.status==="rejected");if(e)throw e.reason}import{WebsiteBackendError as c$}from"efficient-easel/screen/lib/backend-error";function HE(e=i$()){return(o,t,r)=>{let a=Ze(e).theme;return a?a.update(o,r?{siteId:r}:void 0):Promise.reject(new c$("invalid","This backend stores no site theme."))}}function WE(e){return e.themeFromDocument?{status:"skipped",reason:"template"}:e.token?null:{status:"skipped",reason:"no-token"}}async function f$(e,o=HE()){let{themeFromDocument:t,token:r,siteId:a,patch:n}=e,s=WE({themeFromDocument:t,token:r});if(s)return s;if(Object.keys(n).length===0)return{status:"skipped",reason:"empty"};try{return await o(n,r,a??void 0),{status:"saved"}}catch(l){return{status:"failed",error:l}}}function ms({themeFromDocument:e,tokenRef:o,siteId:t,onResult:r}){let a=kf(null),n=kf({}),s=d$(),l=kf(r);l.current=r;let d=kf(null),c=Lg(p=>{if(p.status==="skipped"){let h=`skipped:${p.reason}`;if(d.current===h)return;d.current=h}else d.current=null;l.current?.(p)},[]),f=Lg(async()=>{a.current&&(clearTimeout(a.current),a.current=null);let p=n.current;n.current={};let h=await f$({themeFromDocument:e,token:o?.current,siteId:t,patch:p},HE(s));return c(h),h.status==="saved"&&_r(),h.status==="failed"&&(n.current={...p,...n.current}),h},[e,o,t,c,s]),u=Lg((p,h=!1)=>{let g=WE({themeFromDocument:e,token:o?.current});if(g){c(g);return}n.current={...n.current,...p},a.current&&clearTimeout(a.current),h?f():a.current=setTimeout(()=>{f()},500)},[e,o,f,c]);return ME(()=>()=>{f()},[f]),ME(()=>DE(async()=>{if(!a.current&&Object.keys(n.current).length===0)return;let p=await f();if(p.status==="failed")throw p.error}),[f]),{persist:u,flush:f}}var b$="Follow the page",xwe="Follow the slideshow",y$=e=>i("Editing {name} changes it everywhere.",{name:e});function S$({colors:e}){if(!e)return ho("span",{className:"sf-secttheme-chip sf-secttheme-chip--none","aria-hidden":"true"});let o=$o(e);return Va("span",{className:"sf-secttheme-chip","aria-hidden":"true",children:[ho("i",{style:{background:o.background}}),ho("i",{className:"sf-secttheme-chip-accent",style:{background:o.accent}})]})}function w$({themes:e,value:o,onPick:t,onEdit:r,menuId:a,followLabel:n}){return Va("div",{className:"sf-multi-menu sf-secttheme-menu",id:a,role:"listbox",children:[n!==void 0&&Va(p$,{children:[Va("button",{type:"button",role:"option","aria-selected":o===null,className:`sf-secttheme-item${o===null?" is-active":""}`,onClick:()=>t(Jt),children:[ho(S$,{}),ho("span",{className:"sf-secttheme-name",children:i(n)})]}),ho("div",{className:"sf-secttheme-sep",role:"presentation"})]}),o!==null&&e[o]&&ho("p",{className:"sf-secttheme-oncard",role:"presentation",children:i("{name} is on this section",{name:oi(o)})}),e.map((s,l)=>l===o?null:ho(yf,{role:"option",index:l,colors:s,selected:!1,onPick:()=>t(l),onEdit:()=>r(l)},l))]})}function C$({index:e,colors:o,onChange:t,onDone:r}){let a=oi(e),n=$E();return Va("div",{className:"sf-secttheme-sheet",children:[Va("div",{className:"sf-secttheme-sheet-head",children:[ho("span",{children:a}),ho(h$,{variant:"secondary",className:"sf-secttheme-done",onClick:r,children:i("Done")})]}),ho("div",{className:"sf-secttheme-rows",children:ho(Pg,{colors:o,onChange:t,idPrefix:n})}),ho("p",{className:"sf-secttheme-warn",children:y$(a)})]})}function KE({value:e,onChange:o,followLabel:t,hint:r}){let{theme:a,setTheme:n}=ge(),s=uo(a),l=u$(I$),d=l?.tokenRef,c=l?.siteId??null,f=!l?.capabilities?.hasSiteTheme,{persist:u,flush:p}=ms({themeFromDocument:f,tokenRef:d,siteId:c}),h=uo(s),g=h.themes,I=Qt(e),C=I!==null?g[I]:void 0,S=C??(g.length?Yn(h):void 0),[k,y]=zE(!1),[b,O]=zE(null),W=GE(null),T=GE(null),M=$E(),P=UE(()=>{y(!1),O(null)},[]),F=UE(()=>{!k&&b===null||(p(),P())},[k,b,P,p]);x$(W,F);let w=A=>{o(A),P()},E=A=>{if(b===null)return;let L=g.map(($,q)=>q===b?A:$),U={...h,themes:L};n(U),u({selected_preset:U.selected,theme_presets:U.themes})};return Va("div",{className:"sf-secttheme",ref:W,children:[ho(g$,{label:i("Theme"),icon:ho(m$,{}),labelId:`${M}-label`,hint:r,children:ho(LE,{colors:S,onEdit:I!==null?()=>{O(I),y(!1)}:void 0,name:C?oi(I):i(t??b$),nameId:`${M}-value`,labelId:`${M}-label`,open:k,menuId:M,buttonRef:T,onClick:()=>{O(null),y(A=>!A)},onKeyDown:A=>{A.key==="Escape"&&(k||b!==null)&&(A.preventDefault(),P())}})}),k&&b===null&&ho("div",{onKeyDown:A=>{A.key==="Escape"&&(A.preventDefault(),P(),T.current?.focus())},children:ho(w$,{themes:g,value:I,onPick:w,onEdit:A=>{O(A),y(!1)},menuId:M,followLabel:t})}),b!==null&&g[b]&&ho(C$,{index:b,colors:g[b],onChange:E,onDone:()=>{p(),P(),T.current?.focus()}})]})}import{jsx as jE}from"react/jsx-runtime";import{useId as k$}from"react";import{FieldSelect as v$}from"efficient-easel/fields";import{SettingsField as T$}from"efficient-easel/panel";function P$(e){return e.map(({value:o,label:t,group:r,thumb:a,meta:n})=>({value:o,label:t,...r!==void 0?{group:r}:{},...a!==void 0?{thumb:a}:{},...n!==void 0?{meta:n}:{}}))}function Cwe({label:e,options:o,fallback:t,value:r,onChange:a,placeholder:n,bare:s=!1,icon:l}){let d=k$(),c=`${d}-label`,f=`${d}-button`,u=r??"",p=o.some(C=>C.value===u)?u:t,h=i(e),g=n===void 0?void 0:i(n),I=jE(v$,{id:f,value:p,options:P$(o),onChange:a,placeholder:g,searchPlaceholder:g,...s?{ariaLabel:h}:{ariaLabelledBy:`${c} ${f}`},searchable:!0,groupCount:!0,inline:!0});return s?I:jE(T$,{label:h,labelId:c,icon:l,children:I})}import{jsx as qa,jsxs as sK}from"react/jsx-runtime";import{SettingsField as hO}from"efficient-easel/panel";import{LinkIcon as lK}from"efficient-easel/icons";import{LinkPicker as iK,TextLinkField as dK}from"efficient-shell/ui";import{useEffect as mO,useMemo as Of,useRef as cK,useState as Ef}from"react";import{currentEaselSession as E$}from"efficient-easel/screen/lib/session";function VE(){return E$().auth.token}import{currentEaselSession as fK}from"efficient-easel/screen/lib/session";import{useScreenDocument as pK}from"efficient-easel/screen/components/ScreenDocumentContext";var O$=()=>({choosePage:i("Choose a page"),chooseSection:i("Choose a section"),noSections:i("No section anchors yet"),sectionHint:i("Jumps to a section on that page."),choosePost:i("Choose a post"),chooseProduct:i("Choose a product"),choosePopup:i("Choose a popup")});function YE(e,o,t){if(!e)return"page";if(BP(e))return"popup";if(e.startsWith("/journal/"))return"blog";if(MP(e))return"product";if(e.includes("#")){let r=e.slice(0,e.indexOf("#"));if(r===""||r==="/"||o.includes(r))return"anchor"}return e==="/"||o.includes(e)||t&&t.listingPaths.includes(t.targetOf(e))?"page":"custom"}function Fg(e,o){let t=O$(),r=e.pages.map(f=>({value:ql(f.slug),label:f.title})),a=o?.pageOptions?o.pageOptions(r):r,n=a.map(f=>f.value),s=e.pages.map(f=>({label:f.title,options:NP(...f.docs).map(u=>({value:of(f.slug,u.slug),label:u.name}))})).filter(f=>f.options.length>0),l=f=>{switch(f){case"page":return{type:"select",options:a,placeholder:t.choosePage};case"anchor":return{type:"groups",groups:s,placeholder:s.length?t.chooseSection:t.noSections};case"blog":return{type:"select",options:e.posts.map(u=>({value:DP(u.slug),label:u.title||u.slug})),placeholder:t.choosePost};case"product":return{type:"select",options:e.products.map(u=>({value:u.href,label:u.name||u.href})),placeholder:t.chooseProduct};case"popup":return{type:"select",options:(e.popups??[]).map(u=>({value:FP(u.slug),label:u.title||u.slug})),placeholder:t.choosePopup};case"custom":return{type:"text"}}},d=LP(e.offers).map(f=>({value:f.value,label:i(f.label),target:l(f.value),...f.value==="anchor"?{hint:t.sectionHint}:{},...f.value==="blog"||f.value==="product"||f.value==="popup"?{hideWhenEmpty:!0}:{}}));if(!o)return{kinds:d,rules:{kindOf:f=>YE(f,n),targetOf:f=>f,readFilter:()=>null,withFilter:f=>f}};let c=f=>{let u=o.withFilter(f,null);return o.listingPaths.includes(u)?u:f};return{kinds:d,rules:{kindOf:f=>YE(f,n,{listingPaths:o.listingPaths,targetOf:c}),targetOf:c,readFilter:o.readFilter,withFilter:o.withFilter},filtersFor:f=>o.listingPaths.includes(f)?o.filtersFor(f):null}}import{useEaselSession as uK}from"efficient-easel/screen/lib/session-context";function Po(e,o){if(typeof e=="string")return e||o;if(e&&typeof e=="object"&&"text"in e){let t=e.text;return Z(t)??o}return o}function qE(e,o){return j(e)??o}function Ar(e,o){return typeof e=="boolean"?e:o}function vf(e,o){if(!Array.isArray(e))return o;let t=e.map(r=>typeof r=="string"?r:Po(r?.text,"")).map(r=>r.trim()).filter(Boolean);return t.length?t:o}var ZE=["delay","scroll","exit"],JE=["all","chosen","except"],QE=["visit","days","never","once"],_$=["all","desktop","phone"],A$=["stop","continue"],eO={min:0,max:60},oO={min:10,max:90},tO={min:1,max:90},Bt={autoOpen:!1,trigger:"delay",autoOpenDelaySec:15,scrollPercent:50,showOn:"all",showOnPages:[],devices:"all",hideAfter:"days",hideDays:7,afterSubmit:"stop",startDate:null,endDate:null};function nt(e,o,t){return typeof o=="string"&&e.includes(o)?o:t}function hs(e,o,t){let r=qE(e,t);return Math.min(o.max,Math.max(o.min,Math.round(r)))}function R$(e){return typeof e.hideAfter=="string"?nt(QE,e.hideAfter,Bt.hideAfter):e.oncePerSession===!0?"visit":e.oncePerSession===!1?"never":Bt.hideAfter}function L$(e){return Array.isArray(e)?e.map(o=>typeof o=="string"?o.trim():"").filter(Boolean).map(o=>o.startsWith("/")?o:`/${o}`):[]}function XE(e){if(typeof e!="string")return null;let o=e.trim();return/^\d{4}-\d{2}-\d{2}$/.test(o)?o:null}function rO(e){let o=e??{},t=Bt;return{autoOpen:Ar(o.autoOpen,t.autoOpen),trigger:nt(ZE,o.trigger,t.trigger),autoOpenDelaySec:hs(o.autoOpenDelaySec,eO,t.autoOpenDelaySec),scrollPercent:hs(o.scrollPercent,oO,t.scrollPercent),showOn:nt(JE,o.showOn,t.showOn),showOnPages:L$(o.showOnPages),devices:nt(_$,o.devices,t.devices),hideAfter:R$(o),hideDays:hs(o.hideDays,tO,t.hideDays),afterSubmit:nt(A$,o.afterSubmit,t.afterSubmit),startDate:XE(o.startDate),endDate:XE(o.endDate)}}import{parseHexColor as F$}from"efficient-shell/format";var Dt="#000000";var Bg="popup",B$=fk,D$=["auto","full"],N$=["inside","outside","none"],M$={min:240,max:1440},H$={min:0,max:100},ti={placement:"center",fullWidth:!1,width:720,height:"auto",tintColor:Dt,tintOpacity:60,outsideClick:!0,closeButton:"inside"};function W$(e,o){let t=typeof e=="string"?e.trim():"";return t&&F$(t)===t.toLowerCase()?t:o}function Dg(e,o=ti){let t=e??{},r=o;return{placement:nt(B$,t.placement,r.placement),fullWidth:Ar(t.fullWidth,r.fullWidth),width:hs(t.width,M$,r.width),height:nt(D$,t.height,r.height),tintColor:W$(t.tintColor,r.tintColor),tintOpacity:hs(t.tintOpacity,H$,r.tintOpacity),outsideClick:Ar(t.outsideClick,r.outsideClick),closeButton:nt(N$,t.closeButton,r.closeButton)}}var aO="cart-drawer",Kwe="cart-drawer",U$={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 jwe(e,o){return o===0?e.subtitleEmpty:o===1?e.subtitleOne:e.subtitleMany.replace("{count}",String(o))}function Vwe(e){let o=e??{},t=U$;return{kickerBadge:Po(o.kickerBadge,t.kickerBadge),kickerText:Po(o.kickerText,t.kickerText),titleLead:Po(o.titleLead,t.titleLead),titleAccent:Po(o.titleAccent,t.titleAccent),subtitleEmpty:Po(o.subtitleEmpty,t.subtitleEmpty),subtitleOne:Po(o.subtitleOne,t.subtitleOne),subtitleMany:Po(o.subtitleMany,t.subtitleMany),leadTimeValue:Po(o.leadTimeValue,t.leadTimeValue),shipsToFallback:Po(o.shipsToFallback,t.shipsToFallback),promises:vf(o.promises,t.promises),emptyKicker:Po(o.emptyKicker,t.emptyKicker),emptyBody:Po(o.emptyBody,t.emptyBody)}}var G$=["right","left"],z$={...ti,width:520,tintOpacity:68};function Ywe(e){let o=e??{};return{...Dg(o,z$),placement:nt(G$,o.placement,"right"),height:"full",fullWidth:!1,autoOpen:Ar(o.autoOpen,!0)}}var sO="consent-banner",Jwe="consent-banner";var $$=[{value:"bar",label:"Bar"},{value:"card",label:"Card"}],Qwe="Layout",nO={layout:"bar"},K$=e=>$$.some(o=>o.value===e);function eCe(e){let o=Po((e??{}).layout,nO.layout);return{layout:K$(o)?o:nO.layout}}var oCe={...ti,placement:"bottom-center",fullWidth:!0,width:440,tintOpacity:0,outsideClick:!1,closeButton:"none"};var j$="consentWords",V$=["eyebrow","notice","accept","reject","choose"];function Ng(e){let o=(e??{})[j$];return typeof o=="string"&&V$.includes(o)?o:null}function Mg(e){let o=e?.props;return o?Ng(o)!==null?!0:Object.values(o).some(t=>Array.isArray(t)&&t.some(r=>r&&typeof r=="object"&&"props"in r&&Mg(r))):!1}var Y$=["meta","eyebrow","heading","body","statName","statValue","formEyebrow","formHeading","formIntro","fieldLabel","option","finePrint","dismiss","doneHeading","doneBody"],aCe={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"},q$={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"},nCe={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 lO(e){let o={};for(let t of Y$){let r=Sr(e[q$[t]]);r&&(o[t]=r)}return o}var iO={heading:"Join our email list",placeholder:"Email address",buttonLabel:"Subscribe"},X$={lead:"We accept"},Pf={...X$,methods:[],size:"sm",align:"start",dataSource:Xk},Nt="site-footer";var iCe=Nt,dCe={desktop:!0,tablet:!0,mobile:!0},cCe={desktop:!1,tablet:!1,mobile:!1},Hg=1,dO=6,fCe=Array.from({length:dO-Hg+1},(e,o)=>Hg+o),Tf={desktop:6,tablet:3,mobile:2},Z$={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}},Ya=e=>Math.min(Math.max(Math.round(e),Hg),dO);function pCe(e){if(typeof e=="number")return Z$[Ya(e)]??{desktop:Ya(e),tablet:Ya(e),mobile:Ya(e)};if(e&&typeof e=="object"){let o=e;return{desktop:Ya(o.desktop??Tf.desktop),tablet:Ya(o.tablet??Tf.tablet),mobile:Ya(o.mobile??Tf.mobile)}}return{...Tf}}var Wg="subscribe-popup",yCe="subscribe-popup",J$=[Wg,Nt,aO,sO];function fO(e){return J$.includes(e)}var Q$=["right","left"],eK={metaLabel:"Meta label",issueLabel:"Label",issueNumber:"00",kicker:"Kicker",heading:`Main heading
75
75
  *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:Bt.autoOpen,autoOpenDelaySec:Bt.autoOpenDelaySec,formSlug:"",trigger:Bt.trigger,scrollPercent:Bt.scrollPercent,showOn:Bt.showOn,showOnPages:[],hideAfter:Bt.hideAfter,hideDays:Bt.hideDays,formSide:"right",valuePanelOnPhone:!1,sectionAccent:void 0,sectionCorners:void 0,sectionCornerSides:void 0,textStyles:{}},Je=Po,oK=Ar,pO=vf;function cO(e,o){if(e==null)return o;let t=r=>r.trim()?r:"";if(typeof e=="string")return t(e);if(typeof e=="object"&&"text"in e){let r=e.text;return typeof r=="string"?t(r):""}return o}function tK(e,o){return Array.isArray(e)?pO(e,[]):o}function rK(e,o){return Array.isArray(e)?e.map(t=>{let r=t??{};return{label:Je(r.label,""),value:Je(r.value,"")}}).filter(t=>t.label||t.value):o}function wCe(e){let o=e??{},t=eK,r=rO(o);return{metaLabel:Je(o.metaLabel,t.metaLabel),issueLabel:cO(o.issueLabel,t.issueLabel),issueNumber:cO(o.issueNumber,t.issueNumber),kicker:Je(o.kicker,t.kicker),heading:Je(o.heading,t.heading),deck:Je(o.deck,t.deck),stats:rK(o.stats,t.stats),formLabel:Je(o.formLabel,t.formLabel),formHeading:Je(o.formHeading,t.formHeading),formIntro:Je(o.formIntro,t.formIntro),firstNameLabel:Je(o.firstNameLabel,t.firstNameLabel),firstNamePlaceholder:Je(o.firstNamePlaceholder,t.firstNamePlaceholder),emailLabel:Je(o.emailLabel,t.emailLabel),emailPlaceholder:Je(o.emailPlaceholder,t.emailPlaceholder),interestsLabel:Je(o.interestsLabel,t.interestsLabel),interests:pO(o.interests,t.interests),frequencyLabel:Je(o.frequencyLabel,t.frequencyLabel),frequencies:tK(o.frequencies,t.frequencies),submitText:Je(o.submitText,t.submitText),finePrint:Je(o.finePrint,t.finePrint),dismissText:Je(o.dismissText,t.dismissText),emailInvalidText:Je(o.emailInvalidText,t.emailInvalidText),submitErrorText:Je(o.submitErrorText,t.submitErrorText),successHeading:Je(o.successHeading,t.successHeading),successBody:Je(o.successBody,t.successBody),keepBrowsingText:Je(o.keepBrowsingText,t.keepBrowsingText),formSlug:typeof o.formSlug=="string"?o.formSlug.trim():t.formSlug,autoOpen:r.autoOpen,autoOpenDelaySec:r.autoOpenDelaySec,trigger:r.trigger,scrollPercent:r.scrollPercent,showOn:r.showOn,showOnPages:r.showOnPages,hideAfter:r.hideAfter,hideDays:r.hideDays,formSide:nt(Q$,o.formSide,t.formSide),valuePanelOnPhone:oK(o.valuePanelOnPhone,t.valuePanelOnPhone),sectionAccent:o.sectionAccent,sectionCorners:o.sectionCorners,sectionCornerSides:o.sectionCornerSides,textStyles:lO(o)}}function aK(e,o=Math.random){for(;;){let t=`popup-${Math.floor(o()*2176782336).toString(36).padStart(6,"0")}`;if(!e.has(t))return t}}function nK(e){return{root:{props:{title:e,kind:Bg}},content:[],zones:{}}}function uO(e,o,t){return{slug:aK(o,t),title:e,kind:Yx,layout:nK(e)}}function ri(e){return e?.root?.props?.kind===Bg}function xO(e){let o=new Map;return(t="")=>{let r=VE(),a=o.get(t);if(!a||a.token===null&&r!==null){let n=r||!fK().usesBridgedToken?e(r??"",t).catch(()=>[]):Promise.resolve([]);return o.set(t,{promise:n,token:r}),n}return a.promise}}var mK=xO(async(e,o)=>{let t=o?{siteId:o}:void 0,{pages:r}=Ze();return r.linkTargets?r.linkTargets(t):(await r.list(t)).map(a=>({id:a.id,slug:a.slug,label:a.label,layout:null}))}),hK=xO(async(e,o)=>await Ze().blog?.posts(o?{siteId:o}:void 0)??[]);function xK({value:e,onChange:o,label:t="Link",data:r,filters:a}){let n=Of(()=>Fg(r,a),[r,a]),s=i(t);return qa(hO,{label:s,icon:qa(lK,{}),children:qa(iK,{value:e,onChange:l=>o(l),kinds:n.kinds,rules:n.rules,filtersFor:n.filtersFor,label:s})})}function gO(){let{siteId:e,capabilities:o}=pK(),{offersCommerce:t,hasBlog:r}=o,[a,n]=Ef([]),[s,l]=Ef([]),[d,c]=Ef([]),[f,u]=Ef(null),p=uK().chrome,h=p?.products?.list,g=p?.linkFilters,I=g?void 0:p?.linkRow,C=cK(!0);mO(()=>(C.current=!0,()=>{C.current=!1}),[]),mO(()=>{let y=!0;return mK(e??void 0).then(b=>y&&C.current&&n(b)),r&&hK(e??void 0).then(b=>y&&C.current&&l(b)),t&&h?.().then(b=>y&&C.current&&c(b)),t&&g?g.load(e).catch(()=>null).then(b=>y&&C.current&&u(()=>b)):u(null),()=>{y=!1}},[e,t,r,h,g]);let S=Of(()=>({pages:a.filter(y=>!fO(y.slug)&&!ri(y.layout)).map(y=>({slug:y.slug,title:y.label,docs:[y.layout]})),popups:a.filter(y=>y.slug===Wg||ri(y.layout)).map(y=>({slug:y.slug,title:y.label})),posts:r?s.map(y=>({slug:y.slug,title:y.title})):[],products:t?d.map(y=>({href:y.href,name:y.name})):[],offers:{offersCommerce:t,offersService:r}}),[a,s,d,t,r]),k=Of(()=>f?f(S.pages):null,[f,S]);return{data:S,filters:k,pages:a,offersCommerce:t,HostLinkRow:I}}function GCe({label:e,icon:o,text:t,onTextChange:r,link:a,onLinkChange:n}){let{data:s,filters:l}=gO(),d=Of(()=>Fg(s,l),[s,l]),c=i(e);return qa(hO,{label:c,icon:o,children:qa(dK,{label:c,text:t,onTextChange:r,link:a,onLinkChange:f=>n(f),kinds:d.kinds,rules:d.rules,filtersFor:d.filtersFor})})}function IO({value:e,onChange:o,label:t="Link"}){let r=typeof e=="string"?e:"",{data:a,filters:n,pages:s,offersCommerce:l,HostLinkRow:d}=gO(),c=a.pages.map(u=>ql(u.slug)),f=l&&d&&(r==="/"||c.includes(r))?d:void 0;return sK("div",{children:[qa(xK,{value:r,onChange:o,label:t,data:a,filters:n}),f&&qa(f,{value:r,onChange:o,pages:s})]})}import{UiIcon as k0}from"efficient-easel/draw/client";import{phoneKey as PO,resolveViewValue as EK,tabletKey as EO,viewKeyAt as ai}from"efficient-easel/draw";import{SECTION_PAD_UNIT_KEY as OK,SITE_SIDE as _K,convertLength as AK,isLengthUnit as RK,isSiteSide as _O,sideLengthAt as LK,sideValueAt as FK,withLength as jg}from"efficient-easel/screen/lib/content/length-units";var Io={min:1e3,max:2e3,step:50,default:1600};function gK(e){return{maxWidth:e,marginInline:"auto",width:"100%"}}var Ug="--sf-site-width",zg=`var(${Ug},${Io.default}px)`,KCe="100vw",jCe=`max-w-[${zg}]`,VCe=`max-w-[${Io.default}px]`;function wO(e){return typeof e!="number"||!Number.isFinite(e)?Io.default:Math.round(Math.min(Math.max(e,Io.min),Io.max))}function YCe(e,o){let t=_a(e,o,"size",Io,{floor:!0});if(t!==null)return{[Ug]:t};let r=wO(e);return r===Io.default?{}:{[Ug]:`${r}px`}}var dt={min:0,max:80,step:4,default:40},Gg="--sf-site-gutter",fa={min:0,max:24,step:4},bO="--sf-site-gutter-phone",IK="max-view-tablet:[--sf-site-gutter:var(--sf-site-gutter-phone)]!",st=`var(${Gg},${dt.default}px)`,bK=`px-[${st}]`;var cr={md:`min(24px,${st})`,sm:`min(20px,${st})`,frame:`min(24px,${st})`,tabs:`min(16px,${st})`},qCe=[[`max-view-desktop:px-[${cr.md}]`,"max-view-desktop:px-6"],[`max-view-desktop:px-[${cr.tabs}]`,"max-view-desktop:px-4"],[`max-[960px]:px-[${cr.frame}]`,"max-[960px]:px-6"],[`max-[900px]:px-[${cr.md}]`,"max-[900px]:px-6"],[`max-view-wide:px-[${cr.md}]`,"max-view-wide:px-6"],[`max-view-tablet:px-[${cr.sm}]`,"max-view-tablet:px-5"],[`max-view-wide:px-[${cr.sm}]`,"max-view-wide:px-5"],[`max-[640px]:px-[${cr.sm}]`,"max-[640px]:px-5"],[`view-wide:px-[${st}]`,"view-wide:px-10"],[`max-view-tablet:px-[min(24px,${st})]`,"max-view-tablet:px-6"],[`max-view-wide:-mx-[min(20px,${st})]`,"max-view-wide:-mx-5"],[`max-view-tablet:-mx-[min(20px,${st})]`,"max-view-tablet:-mx-5"],[`-mx-[${st}]`,"-mx-10"],[bK,"px-10"]];var CO="max-view-wide:px-[min(20px,var(--sf-site-gutter,40px))]";function $g(e){return yK[e??"box"]}var yO="var(--sf-pad-site,var(--sf-box-g,var(--sf-site-gutter,40px)))",SO="[--sf-edge-g:var(--sf-pad-site)]",yK={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:yO,edge:SO,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:yO,edge:SO,frame:CO}},XCe=`mx-auto max-w-[var(--sf-site-width,1600px)] px-[var(--sf-site-gutter,40px)] ${CO}`,ZCe="[--sf-box-g:var(--sf-site-gutter,40px)] [&>*]:[--sf-site-gutter:0px]";var JCe="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 _f(e){return typeof e!="number"||!Number.isFinite(e)?dt.default:Math.round(Math.min(Math.max(e,dt.min),dt.max))}function QCe(e,o){let t=_a(e,o,"spacing",dt);if(t!==null)return{[Gg]:t};let r=_f(e);return r===dt.default?{}:{[Gg]:`${r}px`}}function Af(e){return typeof e!="number"||!Number.isFinite(e)?null:Math.round(Math.min(Math.max(e,fa.min),fa.max))}function kO(e){return typeof e=="number"&&Number.isFinite(e)?wO(e):null}function eke(e,o){let t=_a(e,o,"spacing",fa);if(t!==null)return{[bO]:t};let r=Af(e);return r===null?{}:{[bO]:`${r}px`}}function oke(e){return Af(e)===null?"":IK}function Rf(e){return Math.min(fa.max,_f(e))}var vO=zg,tke=`max-w-[${vO}]`,rke=`max-w-[min(var(--sf-page-cap,${Io.default}px),${Io.default}px)]`,TO="--sf-hero-cap",SK=`var(${TO},none)`,ake=`max-w-[${SK}]`,wK="--sf-hero-bleed-m",CK="--sf-hero-bleed-w",kK="--sf-hero-chrome-x",vK="--sf-hero-chrome-cap";function nke(e){return e===!0?{[TO]:vO,[wK]:"auto",[CK]:"100%",[kK]:"24px",[vK]:"none"}:{}}var Kg=`calc(${zg} - ${st}*2)`,ske=`max-w-[${Kg.replace(/ /g,"_")}]`;var TK="--sf-chrome-cap",PK=`var(${TK},${Kg})`,lke="data-page-width";function ike(e){return e==="full"?"full":null}function dke(e){return e==="full"?null:gK(e==="content"?Kg:PK)}function cke(e){if(e==="full")return"full";if(e==="content")return"content"}var ct={min:10,max:200,step:10};function BK(e,o,t,r=0){let a=j(e),n=j(o);if(a===void 0&&n===void 0)return;let s=Lf(t),l=d=>d===void 0?void 0:s==="px"?d:jg(d,s,r);return{paddingTop:l(a),paddingBottom:l(n)}}var Lf=e=>eo(e),DK="sf-pad-top-phone",NK="sf-pad-bottom-phone",MK="--sf-pad-t-phone",HK="--sf-pad-b-phone",WK="sf-pad-left-phone",UK="sf-pad-right-phone",GK="--sf-pad-l-phone",zK="--sf-pad-r-phone",$K="sf-pad-top-tablet",KK="sf-pad-bottom-tablet",jK="sf-pad-left-tablet",VK="sf-pad-right-tablet",YK="--sf-pad-t-tablet",qK="--sf-pad-b-tablet",XK="--sf-pad-l-tablet",ZK="--sf-pad-r-tablet";function Bf(e){let o={desktop:e.unit,tablet:e.unitTablet,phone:e.unitPhone},t=BK(e.top,e.bottom,e.unit,e.frame),r=Vg({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},o,e.frame,e.sideSpace);return t===void 0&&!r.classes.length&&!Object.keys(r.style).length?null:{className:["sf-section-pad",...r.classes].join(" "),style:{...t,...r.style}}}var JK=e=>_O(e)?e:j(e),QK=[["top","paddingTop",[$K,YK],[DK,MK]],["bottom","paddingBottom",[KK,qK],[NK,HK]],["left","paddingLeft",[jK,XK],[WK,GK]],["right","paddingRight",[VK,ZK],[UK,zK]]];function Ike(e,o,t){return!RK(o)||o==="px"?e:AK(e,"px",o,t,{min:0,max:ct.max,step:1})}function ej(e,o,t,r={},a=0){let n=(h,g)=>{if(g==="px")return`${h}px`;let I=jg(h,g,a);return typeof I=="number"?`${I}px`:I},s={n:e,[EO("n")]:o,[PO("n")]:t,u:r.desktop,[EO("u")]:r.tablet,[PO("u")]:r.phone},l=EK("spacing",j(e),j(o),j(t),jn()),d=(h,g,I)=>{if(FK(s,{side:"n"},h,"side",["side"])?.value===_K)return $g().value;let C=LK(s,{side:"n"},"u",h,"side");if(!C)return;let S=g!==null&&!I&&C.unit==="px"&&typeof l[g]=="number";return n(S?l[g]:C.value,C.unit)},c=d("desktop",null,!0),f={},u=d("tablet","tablet",o!==void 0);u!==void 0&&(o!==void 0||u!==c)&&(f.tablet=u);let p=d("mobile","phone",t!==void 0);return p!==void 0&&(t!==void 0||p!==c)&&(f.phone=p),f}function Vg(e,o,t={},r=e,a={},n=0,s="box"){let l={},d={},c=[],f=$g(s),u=!1;for(let[p,h,...g]of QK){let I=p==="left"||p==="right"?JK:j,C=I(e[p]),S=p==="top"||p==="bottom"?n:0;_O(C)?(l[h]=f.value,u=!0):C!==void 0&&(l[h]=Lf(a.desktop)==="px"?C:jg(C,Lf(a.desktop),S));let k=ej(I(r[p]),I(t[p]),I(o[p]),a,S);for(let[y,[b,O]]of[["tablet",g[0]],["phone",g[1]]]){let W=k[y];W!==void 0&&(c.push(b),d[O]=W,W===f.value&&(u=!0))}}return u&&c.push(...f.className.split(" ")),{classes:c,style:{...l,...d}}}function OO(e,o,t){let r=j(e)??t,a=j(o);return r===void 0?a:a===void 0?r:r+a}function Df(e,o={}){return{top:OO(e.padTop,e.sectionPaddingTop,o.top),bottom:OO(e.padBottom,e.sectionPaddingBottom,o.bottom)}}var Ff={top:"sectionPaddingTop",bottom:"sectionPaddingBottom",left:"sectionPaddingLeft",right:"sectionPaddingRight"};function AO(e,o=Ff,t=!0,r=o===Ff?OK:void 0){let a={};if(r){e[r]!==void 0&&(a.unit=e[r]);for(let n of["tablet","mobile"])e[ai(r,n)]!==void 0&&(a[ai("unit",n)]=e[ai(r,n)])}for(let n of t?["top","bottom","left","right"]:["top","bottom"]){a[n]=e[o[n]];for(let s of["tablet","mobile"])a[ai(n,s)]=e[ai(o[n],s)]}return a}function bke(e){return Bf(e)}function yke(e,o){let t=(r,a)=>typeof r!="number"?void 0:Lf(a)==="px"?r+o:r;return Bf({...e,frame:o,top:t(e.top,e.unit),bottom:t(e.bottom,e.unit),topTablet:t(e.topTablet,e.unitTablet),bottomTablet:t(e.bottomTablet,e.unitTablet),topPhone:t(e.topPhone,e.unitPhone),bottomPhone:t(e.bottomPhone,e.unitPhone)})}import{BUTTON_PAD_KEYS as Nf,buttonBorderOf as oj,buttonFillOpacityOf as tj,buttonPadSidesOf as rj,viewKeyAt as aj}from"efficient-easel/draw";import{BUTTON_PAD_UNIT_KEY as Yg,lengthOf as nj}from"efficient-easel/screen/lib/content/length-units";var sj="px-6 py-4",lj=4,Mf=e=>{let o=new RegExp(`\\bp${e}-(?:\\[(\\d+)px\\]|(\\d+))`).exec(sj);if(!o)throw new Error(`BUTTON_PAD_CLASSES has no p${e}`);return o[1]!==void 0?Number(o[1]):Number(o[2])*lj},Oke={top:Mf("y"),right:Mf("x"),bottom:Mf("y"),left:Mf("x")},LO="var(--btn)";function ij(e){let o=e.variant==="ghost",t=tj(e.buttonFillOpacity),r=oj(e.buttonBorder),a=Z(e.buttonColor);return{fillOpacity:t??(o?0:100),border:{width:r?.width??1,color:r?.color??a??(o?"currentColor":LO)},changed:t!==void 0||r!==void 0}}function _ke(e){let o=ij(e);if(!o.changed)return null;let t=Z(e.buttonColor)??LO;return{background:o.fillOpacity===0?"transparent":o.fillOpacity===100?t:`color-mix(in srgb, ${t} ${o.fillOpacity}%, transparent)`,borderWidth:nj(o.border.width,eo(e.buttonBorderUnit)),borderStyle:"solid",borderColor:o.border.color}}var dj="var(--sf-button-radius, 0)";function Ake(e){let o=j(e.buttonCorners),t=lr(e.buttonCornerSides);if(o===void 0&&t===null)return null;let r=o===void 0?dj:Le(Math.max(0,o),e.buttonCornersUnit);return{borderRadius:t===null?r:Ua(r,t)}}function Rke(e){let o=(s,l)=>e[aj(s,l)],t=s=>rj({top:o(Nf.top,s),right:o(Nf.right,s),bottom:o(Nf.bottom,s),left:o(Nf.left,s)})??{},r={desktop:o(Yg,"desktop"),tablet:o(Yg,"tablet"),phone:o(Yg,"mobile")},{classes:a,style:n}=Vg(t("desktop"),t("mobile"),t("tablet"),void 0,r);return Object.keys(n).length?{className:a.join(" "),style:n}:null}var RO="upper";function FO(e,o,t){let r=e&&typeof e=="object"?e:{},a=Z(r.textStyle),n=a?Z(o?.find(f=>f?.id===a)?.name):void 0,s=a?/^(heading|body)-(\d+)$/.exec(a):null,l=a?n||(s?t.styleName({kind:s[1],n:Number(s[2])}):a):t.noStyle,{cases:d}=t,c=Z(r.case)??RO;return`${l} \xB7 ${d[c]??d[RO]}`}import{usePreviewParts as QV}from"efficient-easel/draw/client";import{encodePartId as e8}from"efficient-easel/draw";import{DEFAULT_EASEL_STRINGS as o8,useEaselStrings as t8}from"efficient-easel/strings";import{PIN_STICK_VAR as cj,PIN_TRACK_POSITION_VAR as fj,pinAttrs as BO,pinStickVars as pj,readPin as Zg}from"efficient-shell/format";var Mke="Stick to top",ft={min:0,max:200,step:4,fallback:0},ni={kind:"position",unitKey:"stickTopDistanceUnit"},DO=Vn(ni),[uj,mj,hj]=DO,Jg="Pin while scrolling",NO="Scroll",Mt={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"},Xa="stickTopScreens",xj=[Xa,"stickTopScreensTablet","stickTopScreensPhone"],Qg="Screens",eI="stickTopStop",xs="screen",MO="Pin stops at",HO=[{value:"header",label:"Under the header"},{value:xs,label:"Screen top"}],WO="header",UO="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 oI(e){return e===xs?xs:"header"}function GO(e){return e===xs?xs:void 0}var si="stickAbove",zO="Stays above",$O="On: the pinned box stays on top, and the sections after it scroll under it.";function gj(e){return e.stickAbove===!0}var KO=["stickTop","stickTopDistance","stickTopTablet","stickTopDistanceTablet","stickTopPhone","stickTopDistancePhone",...DO,...xj,eI,si],Hke=new Set(["IntroBleed"]),Wke=new Set(["CategoryBar","DocTabs","Contents"]);function Ij(e){return typeof e.stickTop=="boolean"?e.stickTop:e.sticky!==!1}var qg=e=>Zg(!0,e).length,tI={any:["stickTop","stickTopTablet","stickTopPhone"].map(e=>({field:e,is:!0}))},jO={all:[{not:{field:"stickTop",in:[!0,!1]}},{not:{field:"sticky",is:!1}}]};function Xg(e,o="px"){let t=j(e)??ft.fallback;return o!=="px"?Math.max(ft.min,t):Math.min(ft.max,Math.max(ft.min,Math.round(t)))}function rI(e){return typeof e.stickTopTablet=="boolean"}function aI(e){return typeof e.stickTopPhone=="boolean"}function gs(e,o={}){let t=o.intro?Ij(e):e.stickTop===!0,r=e,a=eo(r[uj]),n=Xg(e.stickTopDistance,a),s=qg(e.stickTopScreens),l=rI(e),d=l?e.stickTopTablet===!0:t,c=l?eo(r[mj]):a,f=l?Xg(e.stickTopDistanceTablet,c):n,u=l?qg(e.stickTopScreensTablet):s,p=aI(e),h=p?e.stickTopPhone===!0:d,g=p?eo(r[hj]):c,I=p?Xg(e.stickTopDistancePhone,g):f,C=p?qg(e.stickTopScreensPhone):u;return{desktop:t,desktopDistance:n,desktopUnit:a,desktopScreens:s,tablet:d,tabletDistance:f,tabletUnit:c,tabletScreens:u,ownTablet:l,phone:h,phoneDistance:I,phoneUnit:g,phoneScreens:C,ownPhone:p}}function Uke(e,o={}){let t=gs(e,{intro:o.atScreenTop});if(!t.desktop&&!t.tablet&&!t.phone)return null;let r=o.atScreenTop===!0&&typeof e.stickTop!="boolean",a=t.desktop&&t.desktopScreens>0||t.tablet&&t.tabletScreens>0||t.phone&&t.phoneScreens>0,n=o.above===!0&&gj(e),s=o.track===!0&&!r&&a&&!n,l=(u,p,h,g)=>Ka({tabletClass:"",tabletVar:`${u}-tablet`,phoneClass:"",phoneVar:`${u}-phone`},p,h,g).style,d={...o.atScreenTop||oI(e.stickTopStop)===xs?{[Mt.header]:"0px"}:{},[Mt.distance]:Le(t.desktopDistance,t.desktopUnit),...l(Mt.distance,Le(t.desktopDistance,t.desktopUnit),Le(t.tabletDistance,t.tabletUnit),Le(t.phoneDistance,t.phoneUnit))};if(s){let u=h=>h?"1":"0",p={...d,...t.desktop?{}:{[Mt.on]:"0"},...l(Mt.on,u(t.desktop),u(t.tablet),u(t.phone)),[Mt.length]:String(t.desktopScreens),...l(Mt.length,String(t.desktopScreens),String(t.tabletScreens),String(t.phoneScreens)),...bj(t.desktop&&t.desktopScreens===0,t.tablet&&t.tabletScreens===0,t.phone&&t.phoneScreens===0,l)};return{attrs:BO(Zg(!0),"track").attrs,style:p}}let c=u=>u?"sticky":"static",f={...d,...t.desktop?{}:{[Mt.position]:"static"},...l(Mt.position,c(t.desktop),c(t.tablet),c(t.phone))};return{attrs:BO(Zg(!0),"stick",n?{above:n}:{}).attrs,style:f}}function bj(e,o,t,r){let a=[[Mt.stick,cj],[Mt.trackPosition,fj]],[n,s,l]=[e,o,t].map(pj);return Object.fromEntries(a.flatMap(([d,c])=>[...e?[[d,n[c]]]:[],...Object.entries(r(d,n[c],s[c],l[c]))]))}var yj=["column","row","tabs","accordion"];var Sj={column:"Stacked",row:"One row",tabs:"Tabs",accordion:"Accordion"},VO={Flex:yj,HeroGroup:["column","row"]},wj={Flex:"row",HeroGroup:"column"},Cj={column:"flex-col",row:"flex-row",tabs:"flex-col",accordion:"flex-col"};function Is(e,o){return VO[e].includes(o)?o:wj[e]}function zke(e,o){return Cj[Is(e,o)]}function YO(e){return VO[e].map(o=>({label:Sj[o],value:o}))}import{viewKeyAt as nI}from"efficient-easel/screen/lib/content/view-tiers";var Wf=20,kj=["solid","dashed","dotted"],Uf=["top","right","bottom","left"],Vke="sf-section-border",Yke="sf-section-border-self",vj=/^#(?:[0-9a-f]{3}|[0-9a-f]{4}|[0-9a-f]{6}|[0-9a-f]{8})$/i,Tj=e=>typeof e=="number"&&Number.isFinite(e)?`${Math.min(Wf,Math.max(0,Math.round(e)))}px`:void 0,li={kind:"border",unitKey:"sectionBorderUnit"},XO=Vn(li);function qke(e){let o=li.unitKey;return{desktop:e[nI(o,"desktop")],tablet:e[nI(o,"tablet")],phone:e[nI(o,"mobile")]}}var qO=(e,o)=>o==="px"?Tj(e):typeof e=="number"&&Number.isFinite(e)?Le(Math.max(0,e),o):void 0;function Hf(e,{phone:o=!1,tablet:t=!1,unit:r}={}){if(!e||typeof e!="object")return;let a=o?"-phone":t?"-tablet":"",n={},s=eo(r);for(let l of Uf){let d=qO(e[l],s)??qO(e.width,s);d!==void 0&&(n[`--sf-border-${l}-width${a}`]=d)}return typeof e.style=="string"&&kj.includes(e.style)&&(n[`--sf-border-style${a}`]=e.style),typeof e.color=="string"&&vj.test(e.color)&&(n[`--sf-border-color${a}`]=e.color.toLowerCase()),Object.keys(n).length?n:void 0}function sI(e){let{width:o,...t}=e;return typeof o!="number"?e:{...t,...Object.fromEntries(Uf.map(r=>[r,t[r]??o]))}}function Xke(e,o,t,r={}){let a=Hf(e,{unit:r.desktop}),n=Hf(t,{tablet:!0,unit:r.tablet}),s=Hf(t,{phone:!0,unit:r.tablet}),l=Hf(o,{phone:!0,unit:r.phone}),d=s||l?{...s,...l}:void 0;return a||n||d?{...a,...n,...d}:void 0}var Gf="sf.gapContainer",Lr={min:-32,max:64,step:2},r0={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},bs={Grid:24,Flex:24,FooterGroup:16,HeroGroup:0,Events:24,GalleryB:8,ProductGrid:2},Pj=new Set(["Events","GalleryB"]);function Za(e,o,t){if(typeof o=="number"&&Number.isFinite(o)&&o>=Lr.min)return o;if(typeof o=="string"){let r=r0[e]?.[o];if(typeof r=="number")return r}return typeof t=="number"&&Number.isFinite(t)?t:bs[e]}var Ej="sf-gap-overlap",Oj="--sf-gap-overlap",lI="--sf-block-gap",ZO="--sf-block-gap-rem",Rr={min:0,max:Lr.max,step:Lr.step};function ii(e){if(typeof e!="number"||!Number.isFinite(e))return null;let o=Math.min(Math.max(Math.round(e),Rr.min),Rr.max);return o-o%Rr.step}function Qke(e,o){let t=_a(e,o,"gap",Rr);if(t!==null)return{[lI]:t,[ZO]:t};let r=ii(e);return r===null?{}:{[lI]:`${r}px`,[ZO]:`${r/16}rem`}}var JO="--sf-block-gap-phone",QO="--sf-block-gap-phone-rem",_j="--sf-block-gap-on-phone",Aj="max-view-tablet:[--sf-block-gap-on-phone:var(--sf-block-gap-phone)]";function eve(e,o){let t=_a(e,o,"gap",Rr);if(t!==null)return{[JO]:t,[QO]:t};let r=ii(e);return r===null?{}:{[JO]:`${r}px`,[QO]:`${r/16}rem`}}function ove(e){return ii(e)===null?"":Aj}var e0="sf-gap-zone",o0="--sf-gap-len";function zf(e,o){return typeof o=="number"&&Number.isFinite(o)&&o>=Lr.min?!0:typeof o=="string"&&typeof r0[e]?.[o]=="number"}var t0="--sf-gap-len-phone",Rj="--sf-gap-len-tablet",di={min:0,max:Lr.max,step:Lr.step};function pa(e){return typeof e=="number"&&Number.isFinite(e)&&e>=di.min}function iI(e){return e/2}function dI(e,o,t){return pa(t)&&!zf(e,o)}function cI(e,o,t,r,a){return pa(o)?o:dI(e,t,a)?a:iI(Za(e,t,r))}var Lj={block:"sf-gap-overlap-block",inline:"sf-gap-overlap-inline",both:"sf-gap-overlap-both"};function tve(e,o,t,r,a){let n={...pa(r)?{[t0]:`${r}px`}:null,...pa(a)?{[Rj]:`${a}px`}:null};if(!zf(e,o)){let l=`${bs[e]}px`,d=Pj.has(e)?`var(--sf-card-gap, ${l})`:l;return{className:` ${e0}`,style:{[o0]:`var(${lI}, ${d})`,[t0]:`var(${_j})`,...n}}}let s=Za(e,o);return s>=0?{className:` ${e0}`,style:{[o0]:`${s}px`,...n}}:{className:` ${Ej} ${Lj[t]}`,style:{gap:"0px",[Oj]:`${-s/2}px`}}}import{parseHexColor as Fj}from"efficient-shell/format";var Bo="var(--section-bg)",ci="inherit";function fr(e,o){return e===ci?Bo:e===void 0?o:$f(e)}var Bj=/var\(\s*--(surface-2|surface|line)\s*(?=[,)])/g;function $f(e){let o=dr(e);return o?Er(o):e.replace(Bj,"var(--site-$1")}var Dj={"var(--section-bg)":"band","var(--site-surface)":"surface","var(--site-surface-2)":"surface2"};function fI(e,o,t){let r=fr(e,o);if(!r||r==="transparent")return t.background.toLowerCase();let a=r.trim(),n=a.startsWith("#")?Fj(a):null;if(n)return n.toLowerCase();let s=Dj[a.replace(/\s+/g,"")];return(s?t[s]:t.background).toLowerCase()}var pI="transparent";function a0(e,o){let t=fr(e,o);return!t||t===pI?"none":t===Bo?"band":null}function n0(e,o,t=o){let r=n=>!n||n==="transparent",a=fr(e,o);return a===t||r(a)&&r(t)}var s0=["transparent","var(--wheel-stage)","var(--surface)","var(--surface-2)"],l0={transparent:"No fill","var(--wheel-stage)":"Image stage","var(--surface)":"Panels and cards","var(--surface-2)":"Second surface"},ys="var(--wheel-stage)",Kf="transparent",fi="inherit";function ive(e,o){return $f(uI(e,o))}function uI(e,o){return e===fi?ys:e==null?o:e===!0?ys:e===!1?Kf:e}function dve(e){return typeof e=="string"&&e!==fi?$f(e):ys}function cve(e){return e!==Kf&&e!=="none"&&e!==""}function i0(e,o){return e===fi||e===!0?!0:e==null?o===ys:!1}var d0="inherit",jf="fixed",c0=e=>typeof e!="number"&&e!==jf,Nj="var(--sf-heading-max, 9999px)";function uve(e,o,t,r,a){if(typeof e=="number")return Le(e,a);if(e===jf)return o;let n=r?`var(--size-${r}, ${o})`:o;return t==="heading"?`min(${n}, ${Nj})`:n}var mI={kind:"fontSize",unitKey:"titleSizeUnit"},hI={kind:"fontSize",unitKey:"bodySizeUnit"},Mj=["desktop","mobile"],f0=[mI,hI].flatMap(e=>Vn(e,Mj));function xI(e){let o=(t,r)=>MC(e,t,r);return{titleDesktop:o(mI,"desktop"),titleMobile:o(mI,"mobile"),bodyDesktop:o(hI,"desktop"),bodyMobile:o(hI,"mobile")}}var Hj=["page","full"],p0=["full","page"],Ja={full:"Full",page:"Content"},gI="inherit",Wj=e=>typeof e=="string"&&Hj.includes(e),Uj=e=>e===gI;function Gj(e,o){return Uj(e.widthMode)?{mode:"full",inherited:!0}:Wj(e.widthMode)?{mode:e.widthMode,inherited:!1}:{mode:o,inherited:o==="full"}}function Ive(e){return Gj(e,"page").mode==="full"}var zj={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 bve(e){return He(zj,e)}var to={background:"sectionBackgroundWidth",content:"sectionContentWidth",contentMax:"sectionContentMax",contentMaxUnit:"sectionContentMaxUnit"},yve={kind:"size",unitKey:to.contentMaxUnit};function $j(e){let o=e[to.contentMaxUnit],t=eo(o),r=e[to.contentMax],a=t==="px"?kO(r):typeof r=="number"&&Number.isFinite(r)&&r>0?r:null,n=Ss(e[to.content])??(a===null?null:"content");return{background:Ss(e[to.background]),content:n,contentMax:n==="content"?a:null,contentMaxUnit:t}}function Sve(e){let o=$j(e);return o.content===null&&e.fullWidth===!0?{...o,content:"full"}:o}function wve(e){return e.background!==null||e.content!==null}var Cve=e=>({[to.background]:e}),kve=e=>e==="full"?{[to.content]:e,[to.contentMax]:void 0,[to.contentMaxUnit]:void 0}:{[to.content]:e},vve=e=>({[to.content]:"content",[to.contentMax]:e}),Tve=e=>e==="background"?{[to.background]:void 0}:{[to.content]:void 0,[to.contentMax]:void 0,[to.contentMaxUnit]:void 0},u0="siteWidths",Kj=e=>e==="full"||e==="content";function Ss(e){return Kj(e)?e:null}function m0(e,o){return{[u0]:{background:Ss(e),content:Ss(o)}}}function Pve(e){let o=e.editor?.metadata?.[u0];return{background:Ss(o?.background),content:Ss(o?.content)}}import{useEaselSession as r8}from"efficient-easel/screen/lib/session-context";import{BOX_GAP as a8,describedAs as ua,group as Ht,iconOf as ks,sharedStyleKinds as Ii}from"efficient-easel/screen/lib/document/box-fields";import{VIEW_KEY_ACCESS as $0,onDesktopWords as en,phoneTwinFields as TI,saidAlignmentGrid as n8,useLengthUnit as s8}from"efficient-easel/screen/lib/document/box-fields";import{createElement as pt}from"react";import{SettingsDefaultReset as jj,SettingsField as Vj}from"efficient-easel/panel";import{boxFieldBuilders as Yj,describedAs as qj,iconOf as Xj,onDesktopWords as Zj}from"efficient-easel/screen/lib/document/box-fields";import{LENGTH_KIND_UNITS as Jj}from"efficient-easel/screen/lib/content/length-units";import{IconPicker as Qj,Tooltip as eV,useShellStrings as oV}from"efficient-shell/ui";import{RotateIcon as tV}from"efficient-easel/icons";var h0=e=>i(e),pi=Jj,bo=Yj(h0,{lengthUnits:pi}),Eo=bo.slider,ut=bo.select,Vf=bo.Segmented,ws=bo.segmented,Nve=bo.alignmentField,Mve=bo.alignmentFields,Hve=bo.blockAlignmentField,Wve=bo.blockAlignmentFields,Uve=bo.boxJustifyField,Gve=bo.boxAlignField,zve=bo.boxWrapField,x0=bo.directionField,Yf=bo.gapField,$ve=bo.placementField,Kve=bo.PlacementGridView,jve=bo.positionFields,qf=bo.sidesPaddingFields,ui=bo.lengthUnitFields;function g0(e,o){return Eo("Angle",pt(tV),tr.min,tr.max,tr.step,e,"\xB0",o)}var rV={width:"3.5rem",height:"2.75rem"};function II({value:e}){return oV().iconNames[e]??e}function bI(e,o,t){return pt(eV,{content:t,className:"sf-pick-tip",children:pt("span",{className:"sf-pick"},pt("span",{className:"sf-pick-pic"},e),pt("span",{className:"sf-pick-cap"},o))})}function aV(e){let o=t=>t.label===void 0?pt(II,{value:t.value}):i(t.label);return e.map(t=>({value:t.value,...t.label===void 0?{}:{label:i(t.hint??t.label)},icon:bI(t.picture,o(t),t.hint===void 0?o(t):i(t.hint))}))}function I0(e,o){return pt("span",{className:"sf-pick"},pt("span",{className:"sf-pick-pic"},e),pt("span",{className:"sf-pick-cap sf-pick-cap-closed"},o))}function b0(e,o,t,r,a={}){let n=d=>t.some(c=>c.value===d),s=d=>a.resolve?a.resolve(d):n(d)?d:void 0,l=t.map(d=>({value:d.value,...d.label===void 0?{}:{label:d.label},...d.showWhen?{showWhen:d.showWhen}:{}}));return{type:"custom",...qj({},{type:"radio",label:e,options:l}),options:l,render:d=>{let{value:c,onChange:f,field:u}=d,p=u?.options,h=aV(t.filter(b=>!p||p.some(O=>O.value===b.value))),g="follows"in d,I=g?s(a.phoneRest?a.phoneRest(d.follows):d.follows)??r:void 0,C=u?.currentValue,S=s(c)??I??s(C)??r,k=c!=null&&c!=="",y=I===void 0?void 0:t.find(b=>b.value===I);return pt(Vj,{label:i(e),icon:Xj(o),action:g?pt(jj,{words:se()?.panel,label:i(e),changed:k,detail:y?.label!==void 0?Zj(h0,i(y.label),d.followsView):void 0,disabled:d.readOnly===!0,onReset:()=>f(void 0)}):void 0},pt(Qj,{label:i(e),value:S,options:h,onChange:f,columns:a.columns,cell:a.cell??rV,tooltips:!1,disabled:d.readOnly===!0}))}}}import{VIEW_ABOVE as yI}from"efficient-easel/screen/lib/content/length-units";import{TEXT_CONTROL_KINDS as NPe,SCALAR_TEXT_CONTROLS as MPe}from"efficient-easel/draw";function on(e,o){return i("{value} from {from}",{value:e,from:o})}function l8(){let{blockGap:e}=ge();return e===null?i("this container's own spacing"):on(`${e}px`,i("Styles"))}function i8({inherited:e,onReset:o,label:t}){return v(Do,{words:se()?.panel,label:i(t),changed:!e,detail:l8(),onReset:o})}function d8(e){return Yf({...a8,builtIn:bs[e],resolve:(o,t)=>Za(e,o,t?.siteGap),action:(o,t)=>v(i8,{inherited:!zf(e,o),onReset:()=>t(void 0),label:"Gap"}),mark:{[Gf]:e}})}function c8(e){return Xe(mt("mobile",{[Gf]:e,type:"custom",render:o=>v(u8,{container:e,...o})}),K0)}function f8(e){return Xe(mt("tablet",{[Gf]:e,type:"custom",render:o=>v(p8,{container:e,...o})}),K0)}var K0={not:{field:"gap",in:Array.from({length:-Lr.min},(e,o)=>Lr.min+o)}};function OPe(e){return{gap:mt("desktop",d8(e)),[RI("gap")]:f8(e),[Cs("gap")]:c8(e)}}function p8({container:e,...o}){let[t]=Dr("gap"),{siteGap:r}=o.field??{},a=Math.max(di.min,Za(e,t,r));return Yf({...di,builtIn:a,resolve:n=>pa(n)?n:a,action:(n,s)=>v(Do,{words:se()?.panel,label:i("Gap"),changed:pa(n),detail:en(l=>i(l),`${a}px`),onReset:()=>s(void 0)})}).render(o)}function u8({container:e,...o}){let[t]=Dr("gap"),{siteGap:r,siteGapPhone:a}=o.field??{},n=cI(e,void 0,t,r,a);return Yf({...di,builtIn:n,resolve:s=>cI(e,s,t,r,a),action:(s,l)=>v(Do,{words:se()?.panel,label:i("Gap"),changed:pa(s),detail:on(`${n}px`,dI(e,t,a)?i("Styles"):i("Desktop")),onReset:()=>l(void 0)})}).render(o)}function _Pe(e){return x0({offered:YO(e),fallback:Is(e,void 0),resolve:o=>Is(e,o)})}function APe(e,o){return pk(o?hk(e,o):[],o)}function m8({inherited:e,onReset:o,label:t}){return v(Do,{words:se()?.panel,label:i(t),changed:!e,detail:on(i("Full"),i("the page")),onReset:o})}function tn({value:e,onChange:o,label:t,placeholder:r,hint:a,multiline:n,hideable:s=!0,markup:l=!0}){let{text:d,hidden:c}=ma(e),f=mi(null),u=mi(null),p=k=>o(s?{text:k,hidden:c}:k),h=()=>o({text:d,hidden:!c}),g=s&&c,I=A0(),C=a?b8(a)?v("span",{className:"sf-hint-while-typing",children:i(a)}):i(a):void 0,S=c?i("Show {label} on the slide",{label:i(t)}):i("Hide {label} on the slide",{label:i(t)});return v(co,{label:i(t),icon:v(AV,{}),htmlFor:I,className:g?"is-hidden":void 0,hint:C,action:s?v(AI,{content:S,children:v(G0,{"aria-pressed":c,"aria-label":S,onClick:h,children:c?v(k0,{name:"eye-off",size:14}):v(k0,{name:"eye",size:14})})}):void 0,children:Fr("div",{className:"sf-copybox",children:[l&&v(mg,{target:n?u:f,value:d,onChange:p}),n?v("textarea",{id:I,ref:u,value:d,placeholder:r===void 0?void 0:i(r),onChange:k=>p(k.target.value)}):v("input",{id:I,ref:f,type:"text",value:d,placeholder:r===void 0?void 0:i(r),onChange:k=>p(k.target.value)})]})})}function RPe(e,o){return{...e,[pV]:o}}function LPe(e){let o=e[Br];if(!o)throw new Error("withOffPage: the field holds no authored text");return{...e,[Br]:{...o,offPage:!0}}}function op(e){return!e||typeof e!="object"?!1:e[Br]?.offPage===!0}function FPe(e){if(!e[Br])throw new Error("withPanelOnly: the field holds no authored text");return{...e,[xg]:!0}}function j0(e){return us(e)}function BPe(e){let o=e[Br];if(!o)throw new Error("withIdentifier: the field holds no authored text");return{...e,[Br]:{...o,identifier:!0}}}function HPe(e,o){if(!e[Br])throw new Error("inOwnBox: the field holds no authored text");let{[XV]:t,...r}=e;return{...r,[hg]:!0,render:o}}var h8=new Set(JV),Qf={type:"radio",options:[{value:!0},{value:!1}]},V0={text:{type:"object",objectFields:{text:{type:"text"},hidden:Qf}},textarea:{type:"object",objectFields:{text:{type:"textarea"},hidden:Qf}},plainText:{type:"text"},copyText:{type:"text"},plainTextarea:{type:"textarea"},textList:{type:"array",arrayFields:{text:{type:"text"}}}},rn=(e,o)=>{let t=ua({...o,[Br]:e},{...V0[e.control],label:e.label});if(!h8.has(e.control))return t;let r=o.render;return{...z0(t,"authored-copy"),render:a=>v(bE,{name:a.name,children:r(a)})}},WPe="Everything else on this block comes from the linked post. Unlink it to edit by hand.",x8={field:"source.slug",set:!0},UPe={not:x8},g8="Select a word, then press the highlighter.",I8=new Set([g8]),b8=e=>I8.has(e);function GPe(e,o,t){return rn({control:"text",label:e,placeholder:o,hint:t},{type:"custom",render:({value:r,onChange:a})=>v(tn,{value:r,onChange:a,label:e,placeholder:o,hint:t})})}function zPe(e,o,t){return rn({control:"textarea",label:e,placeholder:o,hint:t},{type:"custom",render:({value:r,onChange:a})=>v(tn,{value:r,onChange:a,label:e,placeholder:o,hint:t,multiline:!0})})}function $Pe(e,o,t){return rn({control:"plainText",label:e,placeholder:o,hint:t},{type:"custom",render:({value:r,onChange:a})=>v(tn,{value:r,onChange:a,label:e,placeholder:o,hint:t,hideable:!1,markup:!1})})}function KPe(e,o,t){return rn({control:"copyText",label:e,placeholder:o,hint:t},{type:"custom",render:({value:r,onChange:a})=>v(tn,{value:r,onChange:a,label:e,placeholder:o,hint:t,hideable:!1})})}function jPe(e){return{type:"custom",[cV]:{label:e},...ua({},{type:"text",label:e}),render:({value:o,onChange:t})=>v(IO,{value:dV(o),onChange:t,label:e})}}function VPe(e,o,t){return rn({control:"plainTextarea",label:e,placeholder:o,hint:t},{type:"custom",render:({value:r,onChange:a})=>v(tn,{value:r,onChange:a,label:e,placeholder:o,hint:t,multiline:!0,hideable:!1})})}var Y0={Design:uV,Animation:hV};function YPe(e){return{type:"custom",render:()=>v(y8,{text:e})}}function y8({text:e}){return v("p",{className:"sf-note",children:i(e)})}function qPe(e){return ha(e)!==null&&e?.tabs!==void 0}var v0=new Map;function tp(e,o){let t=`${e}\0${o?o.join(""):""}`,r=v0.get(t)??{type:"custom",tabs:o,[R0]:{label:e,level:1},bucket:e,marker:!0,render:()=>v(Nr,{})};return v0.set(t,r),r}var T0=new Map;function FI(e){let o=T0.get(e)??{type:"custom",[R0]:{label:e,level:1},designGroup:e,marker:!0,...e==="Content"?{}:{fold:e},render:()=>v(Nr,{})};return T0.set(e,o),o}function S8(e){let o=e;return o?.marker===!0&&typeof o.fold=="string"?o.fold:null}function q0(e,o){return S8(e)===o?e:{...e,marker:!0,fold:o,render:()=>v(Nr,{})}}function X0(e){let o=e;if(o.marker===!0&&o.fold===void 0)return e;let{fold:t,...r}=e;return{...r,marker:!0,render:()=>v(Nr,{})}}function BI({title:e,children:o}){let[t,r]=hi(()=>!SI.has(e));return v(FV,{title:e,open:t,onToggle:a=>{r(a),a?SI.delete(e):SI.add(e)},children:o})}var SI=new Set;function w8({swatches:e,current:o,onPick:t,names:r}){let a=e.find(l=>l.toLowerCase()===o.toLowerCase()),n=a?r?.[a]:void 0,s=n?i(n):o;return Fr("div",{className:"sf-swatches",children:[e.map(l=>{let d=r?.[l]?i(r[l]):l;return v(AI,{content:d,children:v(GV,{color:l,selected:o.toLowerCase()===l.toLowerCase(),onClick:()=>t(l),"aria-label":d})},l)}),v("span",{className:"sf-swatch-hex",children:s})]})}function XPe(e,o,t=!1){return{type:"custom",render:({value:r,onChange:a})=>v(C8,{label:e,builtIn:o,followsBand:t,value:r,onChange:a})}}function C8({label:e,builtIn:o,followsBand:t,value:r,onChange:a}){let n=typeof r=="string"?r:void 0,{colors:s,n:l}=UI(),d={background:s.background,surface:s.surface,surface2:Qd(s),band:jC(s)},c=t?Bo:o,f=n0(n,o,c),u=fI(void 0,c,d),p=t?ci:void 0,h=c===Bo?i("the theme's section background"):i("Theme {n} background",{n:l}),g=k8(n,o,s,l,d,a),I=on(u.toUpperCase(),h),C=dr(n),S=C?is(C,s,l):null;return S?v(Yo,{label:i(e),icon:v(y0,{}),value:S.hex,caption:S.words,onChange:a,changed:!0,onReset:()=>a(p),resetTo:I,choices:g}):v(Zl,{label:i(e),icon:v(y0,{}),value:f?"":fI(n,o,d),inherited:u,resetTo:I,onChange:a,onReset:()=>a(p),choices:g})}function k8(e,o,t,r,a,n){let s=a0(e,o);return[{label:i("No fill"),color:"",selected:s==="none",onPick:()=>n(pI)},{label:`${i("Section band")} \xB7 ${a.band.toUpperCase()}`,color:a.band,selected:s==="band",onPick:()=>n(Bo)},...WI(dr(e)??"",t,r,n)]}function v8(e,o){return{type:"custom",render:({value:t,onChange:r})=>{let a=t,n=i0(a,o);return v(co,{label:i(e),icon:v(kI,{}),changed:!n,action:v(Do,{words:se()?.panel,label:i(e),changed:!n,detail:i("the theme's image stage"),onReset:()=>r(fi)}),children:w8({swatches:s0,current:n?ys:uI(a,o),onPick:r,names:l0})})}}}function rp(e=t=>t,o){return Ii({_gSectionTheme:Ht(ik),sectionAccent:{type:"custom",render:({value:t,onChange:r})=>v(KE,{value:e(t),onChange:r,followLabel:o})}})}function ap(e){let o=To(),t=wr(e?.view),r=s=>LI(e.valueKey,s),a=e.numbersIn??(s=>j(o[r(s)])!==void 0),n=e.followsView??W8(t,a);return s8({props:{value:void 0,onChange:()=>{},field:{}},row:e.valueKey?e.row:void 0,table:pi,label:i(e.label),grid:e.grid,hasOwn:a(t),view:{tier:t,numbersIn:a,followsView:n},convertTo:e.convertTo??(s=>{let l=j(o[r(t)]);return l===void 0?{}:{[r(t)]:s(l)}})})}function Xo({min:e,max:o,step:t,value:r,onChange:a,suffix:n="",readout:s=!0,notch:l,ariaLabel:d,disabled:c=!1,placeholder:f,placeholderWord:u,onClear:p,units:h}){let g=l!==void 0&&Number.isFinite(l)&&l>=e&&l<=o;return v("div",{className:g?"sf-slider has-notch":"sf-slider",style:g?{"--sf-notch":(l-e)/(o-e)}:void 0,children:v(qV,{min:e,max:o,step:t,value:r,...r===null&&f!==void 0?{placeholderValue:f}:{},...u?{emptyLabel:i(u)}:{},suffix:n||void 0,...h?{units:h}:{},showInput:s,label:d===void 0?void 0:i(d),disabled:c,size:"sm",boxSize:"md",className:"sf-slider-track",onChange:I=>{I===null?p?.():I!==r&&a(I)}})})}function T8(e,o){let{min:t,max:r,step:a=1,unsetLabel:n,hint:s,restTrack:l,unsetMark:d,icon:c,unit:f="px"}=o;return{type:"custom",render:({value:u,onChange:p})=>{let h=typeof u=="number"?u:null,g=h===null;return v(co,{label:i(e),icon:c?ks(c):void 0,value:g?d||n===void 0?void 0:i(n):`${h}${f}`,changed:!g,action:d?PI(d,{changed:!g,onReset:()=>p(null)}):v(Do,{words:se()?.panel,label:i(e),changed:!g,onReset:()=>p(null)}),hint:typeof s=="string"?i(s):s,children:l?l({min:t,max:r,step:a,px:h,label:e,onChange:p}):Xo({min:t,max:r,step:a,value:h??t,readout:!1,ariaLabel:e,onChange:p})})}}}var xi="Corners",P8={kind:"radius"};function DI(e){return{type:"custom",render:o=>{let{value:t,onChange:r}=o,a=typeof t=="number"&&Number.isFinite(t)?t:null,n=a!==null;return v(co,{label:i(xi),icon:v(F0,{}),changed:n,action:PI(e.mark,{changed:n,onReset:()=>r(null)}),hint:e.hint,children:v(E8,{tier:e,px:a,name:o.name,onRadius:r})})}}}function Dr(e){let o=Qa();return[o?.values?.[e],t=>o?.onChange(e,t)]}function Z0(){return z0({type:"custom",render:()=>v(ZV,{})},"always")}function ia(){let e=Qa();return o=>e?.onChangeMany(o)}function E8({tier:e,px:o,name:t,onRadius:r}){let a=e.useFollowed(),[n,s]=Dr(e.sidesKey),l=ia(),d=ap({row:e.row??P8,label:xi,grid:{min:No,max:jr,step:e.step??1},valueKey:t??"",view:"desktop"}),c=lr(n)??[...Vc];return v(zV,{label:i(xi),value:c,corners:oP,onChange:f=>{let u=lr(f)??[];s(u.length===Vc.length?null:u)},radius:o,onRadiusChange:d&&t?f=>l({[t]:f,...d.unitPatch(f===null)}):r,radiusMin:d?.grid.min??No,radiusMax:d?.grid.max??jr,radiusStep:d?.grid.step??e.step??1,radiusPlaceholder:d&&d.unit!=="px"?"\u2013":String(a),...d?{radiusUnit:d.unit,units:d.units}:{}})}function J0(e,o){return ui(e,o)}function Q0(){return Z0()}function O8({label:e,changed:o=!1,onReset:t=()=>{}}){let{cornerRadiusPx:r}=ge(),a=typeof r=="number"?`${r}px`:i("not set");return v(Do,{words:se()?.panel,label:i(e),changed:o,detail:r==null?i("the built-in corners"):on(a,i("Styles")),onReset:t})}function _8(){let{cornerRadiusPx:e}=ge();return typeof e=="number"?e:No}function A8(){return DI({sidesKey:"sectionCornerSides",row:$l,useFollowed:_8,mark:v(O8,{label:xi}),hint:R8})}var R8="Follows Styles \u25B8 Basics \u25B8 Corners until you set a number here.";function np(){return Ii({_gShape:Ht("Shape"),sectionCorners:A8(),...J0($l,"sectionCorners"),sectionCornerSides:Q0(),...Or("sectionBorder",H8),...ui(li,"sectionBorder",{tablet:!0,phone:!0})})}var L8=()=>({width:i("Border width"),sides:{top:i("Border top"),right:i("Border right"),bottom:i("Border bottom"),left:i("Border left")},style:i("Border style"),styles:{solid:i("Solid"),dashed:i("Dashed"),dotted:i("Dotted")},color:i("Border color"),unit:"px"});function F8(e){let o=Object.fromEntries(Object.entries(e).filter(([,t])=>t!=null&&t!==""));return Object.keys(o).length?o:void 0}function B8(){let e;try{let o=uo(ge().theme);e=o.themes[o.selected]?.line}catch{e=void 0}return e||UC.line}function D8({value:e,onChange:o,placeholder:t,presets:r,sides:a=!0,styles:n=!0,above:s={},length:l}){let d=e&&typeof e=="object"?e:{},[c,f]=hi(()=>a?HV(d,s):!1),u=L8(),p=h=>F8(a&&n?h:{width:h.width,color:h.color,...n?{style:h.style}:{}});return v(co,{label:i("Border"),icon:v(xV,{}),action:a?v(NV,{each:c,label:i("Each side"),onChange:f}):void 0,children:v(DV,{label:i("Border"),value:d,each:c,onChange:h=>o(p(h)),placeholder:t,presets:r,words:l?{...u,unit:l.unit}:u,styles:n,max:l?.grid.max??Wf,...l?{step:l.grid.step,units:l.units}:{}})})}function N8({value:e,onChange:o,view:t}){let[r]=Dr("sectionBorder"),[a]=Dr(RI("sectionBorder")),n=B8(),s=p=>p&&typeof p=="object"?p:{},l=t==="phone"?{...sI(s(r)),...sI(s(a))}:t==="tablet"?s(r):{},d=To(),c=ia(),f=Ie("sectionBorder",t),u=ap({row:li,label:"Border",grid:{min:0,max:Wf,step:1},valueKey:"sectionBorder",view:t,numbersIn:p=>wI(d[LI("sectionBorder",p)]),convertTo:p=>{let h=s(d[f]);return wI(h)?{[f]:M8(h,p)}:{}}});return v(D8,{value:e,length:u,onChange:u?p=>c({[f]:p,...u.unitPatch(!wI(p))}):o,placeholder:{sides:MV(l),style:l.style??"solid",color:l.color||n},presets:[n],above:l})}var e_=["width",...Uf];function wI(e){if(!e||typeof e!="object")return!1;let o=e;return e_.some(t=>j(o[t])!==void 0)}function M8(e,o){let t={...e};for(let r of e_){let a=j(t[r]);a!==void 0&&(t[r]=o(a))}return t}function H8(e){return{type:"custom",render:({value:o,onChange:t})=>v(N8,{value:o,onChange:t,view:e})}}function W8(e,o){let t=yI[e];for(;t&&yI[t]!==null&&!o(t);)t=yI[t];return t??e}function ZPe(e){return{type:"custom",render:()=>v(U8,{partKey:e})}}function U8({partKey:e}){let[o]=Dr("id"),[t]=Dr("_partStyles"),{textStyles:r}=ge(),a=t8(),n=null;try{n=QV().select}catch{n=null}let s=t&&typeof t=="object"?t[e]:void 0,l=Array.isArray(r)?r:null;return v(LV,{name:i("Text"),preview:FO(s,l,{noStyle:i("No style"),styleName:a.textStyles.styleName,cases:(a.copy.panel??o8.copy.panel).cases}),onOpen:()=>{n&&typeof o=="string"&&n(e8(o,e))}})}function o_(e){let{cornerRadiusPx:o}=ge(),t=typeof o=="number"?o:e,r=null;try{let{appState:n,selectedItem:s}=ep(d=>d),l=s?.props?.id?String(s.props.id):void 0;r=l?tE(n?.data,l)?.props??null:null}catch{r=null}if(!r)return t;let a=r.sectionCorners;return Hx(a)?a:t}function G8({label:e,changed:o=!1,onReset:t=()=>{}}){let r=o_(No);return v(Do,{words:se()?.panel,label:i(e),changed:o,detail:on(`${r}px`,i("the section")),onReset:t})}function z8(){return v(Nr,{children:i("Follows the section's Corners until you set a number here.")})}function $8(){return DI({sidesKey:"cardCornerSides",row:Kl,useFollowed:()=>o_(No),mark:v(G8,{label:xi}),hint:v(z8,{})})}function K8(){return{type:"custom",render:()=>v(iP,{})}}function JPe(){return{_gShape:Ht("Shape"),cardCorners:$8(),...J0(Kl,"cardCorners"),cardCornerSides:Q0(),cardCornersApplyAll:K8()}}function j8(){return ua({type:"custom",render:e=>v(Y8,{...e})},{type:"select",label:Oa,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 V8(e,o){let t=mh(e);if(t!=="custom")return i(uh.find(a=>a.value===t)?.label??"");let r=U0(Zd(e,o),o);return r?[...r,100-r.reduce((a,n)=>a+n,0)].join(" / "):i("Custom")}function Y8(e){let{value:o,onChange:t}=e,[r]=Dr("content"),a=Array.isArray(r)?r.length:0,n="follows"in e,s=o!=null,l=s?o:n?e.follows:void 0,d=mh(l),c=a>=2&&a<=w0,f=()=>[...jV[a]??[]],u=mi(null),p=S=>{let k=u.current;k&&JSON.stringify(S)===JSON.stringify(k.shares)?t(k.value):S&&t(S)},h=S=>{S===d||S==="custom"&&!c||t(S==="custom"?f():S)},g=i("The width bar works for 2 to {count} blocks.",{count:w0}),I=s&&(n||o!=="content"),C=YV().widths.hint(a,KV);return v(co,{label:i(Oa),icon:v(EI,{}),changed:I,hint:d!=="custom"?void 0:c?C:g,action:v(Do,{words:se()?.panel,label:i(Oa),changed:I,disabled:e.readOnly===!0,detail:n?en(S=>i(S),V8(e.follows,a),e.followsView):i("Fit content"),onReset:()=>t(void 0)}),children:Fr("div",{className:"sf-share-row",children:[v("div",{className:"sf-share-pick",children:v(W0,{label:i(Oa),value:d,options:uh.map(S=>({value:S.value,label:S.value==="custom"&&!c?g:i(S.label),icon:bI(v("span",{className:"sf-gallery-pic sf-share-pic",children:t_(S.weights).map((k,y)=>v("i",{style:{gridColumn:`span ${k}`}},y))}),i(S.label),S.value==="custom"&&!c?g:i(S.label))})),onChange:h,columns:3,cell:r_,tooltips:!1,disabled:e.readOnly===!0})}),d==="custom"&&c?v("div",{onFocus:()=>{u.current={value:o,shares:U0(Zd(l,a),a)}},onBlur:()=>{u.current=null},children:v(VV,{label:i(Oa),count:a,value:Zd(l,a),onChange:p,readOnly:e.readOnly===!0})}):null]})})}function t_(e){if(!e)return[3,4];let o=e.reduce((t,r)=>t+r,0);return e.map(t=>Math.round(t/o*12))}function QPe(){return ut(NC,v(CV,{}),gh,gh[0].value)}function eEe(){return mt("mobile",b0(Oa,v(EI,{}),FC.map(e=>({label:e.label,value:e.value,picture:v("span",{className:"sf-gallery-pic sf-share-pic",children:t_(e.weights).map((o,t)=>v("i",{style:{gridColumn:`span ${o}`}},t))})})),BC,{columns:2,cell:r_}))}var r_={width:"5.75rem",height:"3.25rem"};function oEe(){return TI("share",j8(),$0)[RI("share")]}function q8(){return mt("mobile",Eo(hh,v(L0,{}),Jd,LC,1,Jd,"",{clear:{phoneFollows:!1,hint:Jd}}))}var P0={read:e=>e.phoneRow,write:(e,o,t)=>({phoneRow:t}),fieldKey:()=>"phoneRow",ownField:!0};function tEe(){let e=Eo(hh,v(L0,{}),xh,DC,1,xh,"",{clear:{emptyLabel:"Auto"}}),o=TI("columns",e,{...P0,tablet:$0.tablet}),t=TI("columns",e,P0,{phoneRow:q8()});return{...o,phoneRow:t.phoneRow}}function rEe(e,o,t,r,a,n,s){return{type:"custom",render:({value:l,onChange:d,name:c})=>v(X8,{label:e,min:o,max:t,step:r,fallback:a,role:n,value:l,onChange:d,name:c??"",length:s})}}function X8({label:e,min:o,max:t,step:r,fallback:a,role:n,value:s,onChange:l,name:d,length:c}){let f=To(),u=ia(),p=wr(c?.view),h=ap({row:c?.row??{kind:"fontSize"},label:e,grid:{min:o,max:t,step:r},valueKey:c?d:"",view:c?.view??"desktop",numbersIn:I=>I===p&&typeof f[d]=="number",followsView:p,convertTo:I=>typeof f[d]=="number"?{[d]:I(f[d])}:{}}),g=I=>h?u({[d]:I,...h.unitPatch(typeof I!="number")}):l(I);return v(co,{label:i(e),icon:v(tg,{noun:n}),action:v(Do,{words:se()?.panel,label:i(e),changed:!c0(s),detail:i("the Text style in Styles"),onReset:()=>g(d0),defaultAction:{onPress:()=>g(jf),title:i("Keep this section's own built-in size"),icon:v(gV,{})}}),children:Xo({min:h?.grid.min??o,max:h?.grid.max??t,step:h?.grid.step??r,value:typeof s=="number"?s:a,...h?{suffix:h.unit,units:h.units}:{suffix:"px"},ariaLabel:e,onChange:g})})}function aEe(){return{_gCellWidth:Ht("Cell width"),gridSpan:ut("Positions",v(EI,{}),[{label:"Auto",value:""},...Array.from({length:Zc},(e,o)=>({label:o===0?"1 position":`${o+1} positions`,value:String(o+1)}))],"")}}function To(){let e=null,o=null;try{e=_0(NI),o=ep(t=>t).selectedItem}catch{o=null}return e??o?.props??{}}var NI=sV(null);function Z8({min:e,max:o,step:t,px:r,label:a,onChange:n,desktopKey:s,fallback:l}){let d=To()[s],c=uf(void 0,d,l);return v(Nr,{children:Xo({min:e,max:o,step:t,value:uf(r,d,l),readout:!1,ariaLabel:a,notch:c,onChange:n})})}function J8({label:e,desktopKey:o,fallback:t,unit:r="px",changed:a=!1,onReset:n=()=>{}}){let s=To()[o],l=uf(void 0,s,t);return v(Do,{words:se()?.panel,label:i(e),changed:a,detail:en(d=>i(d),`${l}${r}`),onReset:n})}function Q8(e){return T8(e.label,{icon:e.icon,min:e.min,max:e.max,step:e.step,unit:e.unit,unsetLabel:"Follows Desktop",unsetMark:v(J8,{label:e.label,desktopKey:e.desktopKey,fallback:e.fallback,unit:e.unit}),restTrack:o=>v(Z8,{...o,desktopKey:e.desktopKey,fallback:e.fallback})})}var eY={Top:"Padding top",Bottom:"Padding bottom",Left:"Padding left",Right:"Padding right"},oY={Top:OI,Bottom:D0,Left:N0,Right:M0},tY=e=>{let o=oY[e];return v(o,{})};function nEe(e={}){let o=e.keys?.top??"sectionPaddingTop",t=e.keys?.bottom??"sectionPaddingBottom",r=e.group!==!1,a=C=>eY[C],n=C=>Eo(a("Top"),v(OI,{}),ct.min,ct.max,ct.step,C,"px"),s=(C,S,k,y=ct)=>mt("mobile",Q8({label:a(C),icon:tY(C),desktopKey:S,min:y.min,max:y.max,step:y.step,fallback:k})),l=e.top??ct.min,d=e.bottom??ct.min,c="sectionPaddingLeft",f="sectionPaddingRight",u=e.sideBounds??ct,p=e.side??u.min,h=e.sidePhone??p,g=e.phone===!0,I=C=>g?mt("desktop",C):C;return Ii({...r?{_gSpacing:Ht("Padding")}:{},[o]:I(n(l)),...g?{[Cs(o)]:s("Top",o,l)}:{},...e.only==="top"?{}:{[t]:I(Eo(a("Bottom"),v(D0,{}),ct.min,ct.max,ct.step,d,"px")),...g?{[Cs(t)]:s("Bottom",t,d)}:{}},...e.sides?{[c]:I(Eo(a("Left"),v(N0,{}),u.min,u.max,u.step,p,"px")),...g?{[Cs(c)]:s("Left",c,h,u)}:{},[f]:I(Eo(a("Right"),v(M0,{}),u.min,u.max,u.step,p,"px")),...g?{[Cs(f)]:s("Right",f,h,u)}:{}}:{}})}function sEe(e,o){let t=Object.fromEntries(Object.entries(o).map(([n,s])=>[n,n in e&&ha(s)?e[n]:s])),r={},a=!1;for(let[n,s]of Object.entries(e)){if(n in o){a||Object.assign(r,t),a=!0;continue}r[n]=s}return a||Object.assign(r,t),r}var Zf="Width";function sp(e,o=p0,t=!0){let r=o.map(a=>({label:Ja[a],value:a}));return Ii({...t?{_gWidth:Ht(Zf)}:{},widthMode:{type:"custom",render:({onChange:a,field:n})=>v(co,{label:i(Zf),icon:v(RV,{}),action:t?v(m8,{inherited:n?.inherited??!1,onReset:()=>a(gI),label:Zf}):void 0,children:Vf({options:r,value:n?.currentValue||e,onChange:a,ariaLabel:Zf})})}})}function lp({fill:e=!1}={}){let o=(a,n)=>({type:"custom",render:({value:s,onChange:l})=>v(rY,{value:s,onChange:l,view:a,badge:n,fill:e})}),t=()=>vI("sectionHeightMode"),r=()=>vI("sectionHeightMode");return Ii({_gHeight:Ht(Qn),...Or("sectionHeightMode",a=>a==="desktop"?o(a):o(a,n=>v(lY,{view:a,onClear:()=>n(void 0)}))),...Or("sectionHeightValue",t),...Or("sectionHeightUnit",r)})}function rY({value:e,onChange:o,view:t,badge:r,fill:a=!1}){let n=To(),{mode:s,number:l,unit:d}=aY(t,n,e);return v(co,{label:Qn,icon:ks(v(B0,{})),action:r?r(o):void 0,children:Fr("div",{className:"es-width-stack",children:[Vf({options:[{label:"Auto",value:"auto"},{label:"Fixed",value:"fixed"},{label:"Screen",value:"screen"},...a?[{label:"Fill",value:"fill"}]:[]],value:s,onChange:o,ariaLabel:Qn}),l?v(sY,{view:t,mode:s,menu:d}):null]})})}function a_(e,o){return e==="phone"&&sc(o)?Tk(o):kk(o)}function ip(e,o){return e==="desktop"||(e==="tablet"?sc(o):vk(o))?null:a_(e,o)}function aY(e,o,t){let r=(a=>Sk.includes(a))(t)?t:ip(e,o)?.mode??"auto";return{mode:r,number:r!=="auto"&&r!=="fill",unit:r==="fixed"}}function nY(e,o,t,r){let a=ip(e,o);return!a||e==="desktop"?null:r===void 0?{}:{[Ie("sectionHeightMode",e)]:a.mode,...a.mode==="fixed"?{[Ie("sectionHeightUnit",e)]:a.unit}:{},...t==="sectionHeightUnit"?{[Ie("sectionHeightValue",e)]:a.value}:{},[Ie(t,e)]:r}}function E0(e,o,t){let r=Qa(),a=ip(e,To());return!r||!a?{followed:null,write:t}:{followed:a,write:n=>r.onChangeMany(s=>{let l=nY(e,s,o,n);return l===null?{[Ie(o,e)]:n}:Object.keys(l).length?l:null})}}function sY({view:e,mode:o,menu:t}){let r=Qa(),a=To(),n=Ie("sectionHeightValue",e),s=Ie("sectionHeightUnit",e),l=C=>S=>r?.onChangeMany(()=>({[C]:S})),{followed:d,write:c}=E0(e,"sectionHeightValue",l(n)),{write:f}=E0(e,"sectionHeightUnit",l(s)),u=o==="screen"?"%":a[s],p=(d?d.unit:u)==="%"?"%":"px",h=p==="%"?Ck:wk,g=a[n],I=t?{options:["px","%"],label:i("Unit"),onChange:C=>f(C)}:void 0;return Xo({min:h.min,max:h.max,step:h.step,value:d?null:typeof g=="number"?g:h.fallback,...d?{placeholder:d.value}:{},suffix:p,...I?{units:I}:{},ariaLabel:Qn,onChange:c})}function lY({view:e,onClear:o}){let t=To(),r=ip(e,t)===null,a=e==="phone"&&sc(t),n=a_(e,t),s=en(l=>i(l),n.mode==="auto"?i("Auto"):`${n.value}${n.unit}`,a?"tablet":"desktop");return v(Do,{words:se()?.panel,label:i(Qn),changed:r,detail:s,onReset:o})}function MI(e={}){let o=e.intro===!0,t=n=>({type:"custom",render:({value:s,onChange:l,id:d,name:c})=>v(mY,{value:s,onChange:l,labelId:`${d??c??"stickTop"}-label`,view:n,intro:o})}),r=n=>({type:"custom",render:({value:s,onChange:l})=>v(fY,{value:s,onChange:l,view:n,intro:o})}),a=n=>({type:"custom",render:({value:s,onChange:l})=>v(pY,{value:s,onChange:l,view:n,intro:o})});return{_gStick:Ht(NO,{dot:o?cY:tI}),...Or("stickTop",t),...Or("stickTopDistance",r),...ui(ni,"stickTopDistance",{tablet:!0,phone:!0}),...e.screens?Or(Xa,a):{},...o?{}:{[eI]:iY()},...o||e.above===!1?{}:{[si]:dY()}}}function iY(){let e=ut(MO,v(OI,{}),HO,WO);return mt("desktop",{...e,render:o=>{let t=e.render({...o,value:oI(o.value),onChange:r=>o.onChange(GO(r))});return PI(t,{hint:i(UO)})}})}function dY(){let e=s_(zO,!1,v(H0,{}),$O);return mt("desktop",{...e,render:o=>e.render({...o,onChange:t=>o.onChange(t===!0?!0:void 0)})})}var cY={any:[tI,jO]};function n_(e,o,t,r,a){let n=Qa(),s=To(),l=e==="desktop"||gi(e,s)?null:HI(e,gs(s,{intro:r}));return{followed:l,write:(l||a)&&n?d=>n.onChangeMany(c=>{let f=uY(e,c,d,o,r),u=f===null?{[Ie(o,e)]:d}:f;return Object.keys(u).length?{...u,...a?.(d)??{}}:null}):t}}function fY({value:e,onChange:o,view:t,intro:r}){let a=To(),n=gs(a,{intro:r}),s=f=>{let u=oc(f);return u==="desktop"||gi(u,a)},l=ap({row:ni,label:"Distance from top",grid:{min:ft.min,max:ft.max,step:ft.step},valueKey:"stickTopDistance",view:t,numbersIn:f=>s(f)&&j(a[LI("stickTopDistance",f)])!==void 0,followsView:t==="phone"&&n.ownTablet?"tablet":"desktop"}),{followed:d,write:c}=n_(t,"stickTopDistance",o,r,l?f=>l.unitPatch(f===void 0):void 0);return v("div",{className:"sf-field",children:Xo({min:l?.grid.min??ft.min,max:l?.grid.max??ft.max,step:l?.grid.step??ft.step,value:d?null:typeof e=="number"?e:ft.fallback,...d?{placeholder:d.distance}:{},...l?{suffix:l.unit,units:l.units}:{suffix:"px"},ariaLabel:i("Distance from top"),onChange:c})})}function pY({value:e,onChange:o,view:t,intro:r}){let{followed:a,write:n}=n_(t,Xa,o,r);return v(co,{label:i(Qg),icon:ks(v(B0,{})),children:Xo({min:Xf.min,max:Xf.max,step:Xf.step,value:a?null:j(e)??Xf.default,...a?{placeholder:a.screens}:{},ariaLabel:i(Qg),onChange:n})})}function gi(e,o){return e==="tablet"?rI(o):aI(o)}function HI(e,o){return e==="phone"?{on:o.tablet,distance:o.tabletDistance,unit:o.tabletUnit,screens:o.tabletScreens}:{on:o.desktop,distance:o.desktopDistance,unit:o.desktopUnit,screens:o.desktopScreens}}function uY(e,o,t,r="stickTopDistance",a=!1){if(e==="desktop"||gi(e,o))return null;if(t===void 0)return{};let n=HI(e,gs(o,{intro:a})),s=e==="phone"&&gi("tablet",o)?f=>Ie(f,"tablet"):f=>f,l=(f,u)=>o[s(f)]==null?{}:{[Ie(f,e)]:u},d=ni.unitKey,c=o[s(d)]==null?{}:{[Ie(d,e)]:n.unit};return{[Ie("stickTop",e)]:!0,...l("stickTopDistance",n.distance),...c,...l(Xa,n.screens),[Ie(r,e)]:t}}function mY({value:e,onChange:o,labelId:t,view:r,intro:a}){let n=To(),s=gs(n,{intro:a}),l=r==="phone"?s.phone:r==="tablet"?s.tablet:a?s.desktop:e===!0,d=r==="phone"&&s.ownTablet,c=r==="desktop"?null:HI(r,s),f=c?.on?Le(c.distance,c.unit):i("Off");return v(co,{label:i(Jg),labelId:t,icon:ks(v(H0,{})),action:Fr(Nr,{children:[r!=="desktop"?v(Do,{words:se()?.panel,label:i(Jg),changed:gi(r,n),detail:en(u=>i(u),f,d?"tablet":"desktop"),onReset:()=>o(void 0)}):null,v(_I,{checked:l,onChange:o,ariaLabelledBy:t})]})})}var O0="e.g. about";function dp(){return{_gAnchor:Ht("Anchor"),anchor:rn({control:"plainText",label:"Name",placeholder:O0},{type:"custom",render:({value:e,onChange:o})=>v(UP,{value:e,onChange:o,nameBox:(t,r)=>v(tn,{value:t,onChange:r,label:"Name",placeholder:O0,hideable:!1,markup:!1})})})}}function lEe(e,o,t){return{type:"custom",render:({value:r,onChange:a,id:n,name:s})=>{let l=`${n??s??e}-datetime`,d=Date.parse(typeof r=="string"?r:"");return v(co,{label:i(e),icon:o,htmlFor:l,hint:t===void 0?void 0:i(t),children:v($V,{id:l,value:Number.isFinite(d)?new Date(d):null,onChange:c=>a(c?c.toISOString():"")})})}}}function s_(e,o,t,r){return{type:"custom",...ua({},{...Qf,label:e}),render:a=>{let{value:n,onChange:s,id:l,name:d}=a,c="follows"in a,f=a,u=typeof n=="boolean",p=typeof f.follows=="boolean"?f.follows:o,h=u?n:c?p:o,g=`${l??d??e}-label`,I=f.readOnly===!0,C=v(_I,{checked:h,onChange:s,disabled:I,ariaLabelledBy:g});return v(co,{label:i(e),labelId:g,icon:t,hint:r===void 0?void 0:i(r),action:c?Fr(Nr,{children:[v(Do,{words:se()?.panel,label:i(e),changed:u,detail:f.followsNoView?i(p?"On":"Off"):en(S=>i(S),i(p?"On":"Off"),f.followsView),disabled:I,onReset:()=>s(void 0)}),C]}):C})}}}function l_(){return{type:"custom",render:({value:e,onChange:o,id:t,name:r})=>{let a=`${String(t??r??"pageBackground")}-colour`;return v(hY,{label:"Background",icon:v(EV,{}),id:a,value:e,shown:ng(e),onChange:o})}}}function iEe(e,o,t){return{type:"custom",render:({value:r,onChange:a})=>v(Yo,{label:i(e),icon:t,value:r||o,onChange:a})}}function hY({label:e,icon:o,id:t,value:r,shown:a,onChange:n}){let{colors:s,n:l}=UI(),d=dr(r),c=d?is(d,s,l):null;return v(Yo,{label:i(e),icon:o,id:t,value:c?c.hex:a,caption:c?.words,onChange:n,choices:WI(d??"",s,l,n)})}function dEe(){return{type:"custom",render:e=>{let{value:o,onChange:t}=e,r=e;return v(xY,{value:typeof o=="string"?o:"",onChange:t,twin:"follows"in e?{follows:r.follows,view:r.followsView}:void 0})}}}function WI(e,o,t,r){let a=sf(e);return jP(o,t).map(n=>({label:n.label,color:n.value,selected:a===n.name,onPick:()=>r(n.name)}))}function xY({value:e,onChange:o,twin:t}){let{colors:r,n:a}=UI(),n=r.background,s=on(n.toUpperCase(),i("Theme {n} background",{n:a})),l=sf(e),d=l?is(l,r,a):null,c=WI(e,r,a,o),f=t?()=>o(void 0):()=>o(""),u=n,p=s;if(t){let h=sf(t.follows),g=nf(t.follows),I=h?is(h,r,a):g?{hex:g,words:g.toUpperCase()}:null;u=I?.hex??n,p=en(C=>i(C),I?I.words:s,t.view)}return d?v(Yo,{label:i("Fill"),icon:v(kI,{}),value:d.hex,caption:d.words,onChange:o,changed:!0,onReset:f,resetTo:p,choices:c}):v(Zl,{label:i("Fill"),icon:v(kI,{}),value:e,inherited:u,resetTo:p,onChange:o,onReset:f,choices:c})}function gY(e,o,t){if((e?.content??[]).some(n=>n?.props?.id===o))return Qt(t);let r=rE(e,o);if(r.length===0)return null;let a=Qt(kh(t));if(a!==null)return a;for(let n=r.length-1;n>0;n-=1){let s=Qt(kh(r[n].sectionAccent));if(s!==null)return s}return Qt(r[0].sectionAccent)}function UI(){let e=uo(ge().theme),[o]=Dr("sectionAccent"),t=null;try{let{appState:a,selectedItem:n}=ep(l=>l),s=n?.props?.id?String(n.props.id):void 0;t=s?gY(a?.data,s,o):null}catch{t=null}let r=t!==null&&e.themes[t]?t:e.selected;return{colors:$o(e.themes[r]),n:r+1}}function cEe(){return Z0()}var i_={top:v(SV,{}),right:v(yV,{}),bottom:v(IV,{}),left:v(bV,{})};function d_(e,o,t,r,a,n,s){let l=u=>o.find(p=>p.value===u),d=u=>({value:u,label:"",disabled:!0,title:r}),c=u=>{let p=o.find(g=>g.cell===u);if(!p)return d(`missing-${u}`);let h=n?.[u];return h?{value:p.value,label:p.label,icon:h}:{value:p.value,label:p.label}},f=[d("corner-top-left"),c("top"),d("corner-top-right"),c("left"),d("centre"),c("right"),d("corner-bottom-left"),c("bottom"),d("corner-bottom-right")];return{type:"custom",render:({value:u,onChange:p})=>{let h=o.some(g=>g.value===u)?u:t;return v(co,{label:i(e),icon:a,value:l(h)?.label?i(l(h).label):s?i(s):"",children:n8(i,{label:e,value:h,onChange:p,points:f})})}}}function fEe(e,o,t){return{type:"custom",options:o,render:({value:r,onChange:a,field:n})=>v(EE,{label:e,options:(n.options??o).map(s=>({...s,label:i(s.label)})),value:Array.isArray(r)?r:[],onChange:a,...t?{emptyLabel:i(t)}:{}})}}function pEe(e,o={}){return{type:"custom",render:({value:t,onChange:r})=>{let a={value:t,onChange:r,...o};return v(e,{...a})}}}var uEe=[{label:"Image",value:"image"},{label:"Video",value:"video"}];function mEe(e,o,t){let r=Object.keys(_x).map(a=>({label:_x[a],value:a,picture:t[a]}));return{type:"custom",...ua({},{type:"radio",label:e,options:r.map(a=>({value:a.value,label:a.label}))}),render:({onChange:a})=>v(bY,{label:e,icon:o,options:r,onChange:a})}}function IY(e,o,t){let r=FT(e,o,t);if(r!==void 0)return r==="save-makes-frame"?i("A frame is made from this video when you save the page."):r==="starts-dark"?i("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."):r==="outside"?i("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."):r==="unsupported"?i("This video's file type gives no frame. The slide shows its background colour while the video loads. Choose Image to show a picture."):r==="failed"?i("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."):r==="image-no-frame"?i("The slide shows your Image while the video loads, because this video has no frame."):void 0;let a=LT(e);return a==="frame-missing-image"?i("This video has no frame yet. The slide shows its image until one is made."):a==="frame-missing-surface"?i("This video has no frame yet. The slide shows its background colour until one is made."):a==="image-missing-frame"?i("No image yet. The slide shows the video's frame until you choose one."):a==="image-missing-surface"?i("No image yet. The slide shows its background colour until you choose one."):void 0}function bY({label:e,icon:o,options:t,onChange:r}){let a=Qa(),n=a?.values??{},s=Ul(n),l=_0(iV),d=jc(l?.docId??null),c=null;try{c=ep(u=>u.appState.data)}catch{c=null}let f=QT(a?.id,c,d);return v(co,{label:i(e),icon:ks(o),hint:IY(n,f,l?.hasUnsavedEdits??!1),children:Vf({options:t,value:s,onChange:r,ariaLabel:e})})}function hEe(e,o,t,r={}){let a={type:"custom",[fV]:!0,render:({value:n,onChange:s,name:l})=>v(TE,{value:n||"",onChange:s,fieldKey:l,label:e,accept:o,placeholder:t,focusKey:r.focus,focusWhen:r.focusWhen,frameKey:r.frame}),...r.focus?{focusKey:r.focus}:{},...r.focusWhen?{focusWhen:r.focusWhen}:{}};return r.focus?mt("each",a):a}function yY(e){let o=i(e.status??"");return e.ok&&typeof e.lat=="number"&&typeof e.lng=="number"?`${o} \xB7 ${e.lat.toFixed(4)}, ${e.lng.toFixed(4)}`:o}function xEe({value:e,onChange:o,label:t}){let r=e||{},a=Qa(),n=a?a.values!==a.node.props:!0,s=!!r.pending&&n,l=!!r.pending&&!n,d=!!Ze(r8()).geocode,c=A0(),f=(u,p)=>o({...r,[u]:p??void 0});return Fr(Nr,{children:[v(co,{label:i(t),icon:v(S0,{}),action:d?v(AI,{content:i("Find from the address (OpenStreetMap)"),children:v(G0,{"aria-label":i("Find from the address"),"aria-busy":s||void 0,disabled:s,onClick:()=>o({...r,pending:!0,ok:!1,status:"Finding\u2026"}),children:v(OV,{})})}):void 0,children:d&&r.status?v(GP,{compact:!0,oneLine:!0,spaced:!1,status:s?"busy":r.ok&&!l?"found":"notfound",statusText:s?i("Finding\u2026"):l?i(fg):i(r.status),hint:yY(r)}):null}),v(co,{label:i("Enter by hand"),labelId:c,icon:v(wV,{}),action:v(_I,{checked:!!r.manual,onChange:u=>o({...r,manual:u}),ariaLabelledBy:c})}),r.manual&&v(co,{label:i("Latitude, longitude"),icon:v(S0,{}),children:Fr("div",{style:{display:"grid",gridTemplateColumns:"1fr 1fr",gap:8,width:"100%",minWidth:0},children:[v(C0,{value:typeof r.lat=="number"?r.lat:null,onChange:u=>f("lat",u),min:-90,max:90,step:1e-4,placeholder:i("Latitude")}),v(C0,{value:typeof r.lng=="number"?r.lng:null,onChange:u=>f("lng",u),min:-180,max:180,step:1e-4,placeholder:i("Longitude")})]})})]})}function SY(e,o){return o===null||o<0||o>=e.length?"":e[o]?.text??""}function wY(e,o,t){let r=e.map(a=>({text:a?.text??""}));return o===null||o<0||o>=e.length?r:r.map((a,n)=>n===o?{text:t}:a)}function CY(e,o,t){if(t===null||t>=o.length)return null;for(let r=0;r<t;r+=1)if(e[r]!==o[r])return null;return e[t]!==o[t]&&o.includes(e[t])||e[t]!==o[t]&&o.length!==e.length?null:t}var GI={label:"Ticker items",icon:v(PV,{})};function gEe(e,o,t,r){return{type:"custom",[Br]:{control:"textList",label:e,placeholder:t,itemKey:"text",rendering:r},...ua({},{...V0.textList,label:e}),render:({value:a,onChange:n})=>v(zI,{label:e,icon:ks(o),items:Array.isArray(a)?a:[],placeholder:t,onChange:n,markup:r==="markup"})}}function zI({label:e,icon:o,items:t,placeholder:r,onChange:a,markup:n=!1}){let s=mi(null),[l,d]=hi(null),c=u=>u.map(p=>({text:p?.text??""})),f=u=>{let p=CY(t,u,l);p===null&&(s.current=null),d(p),a(c(u))};return v(WV,{label:i(e),icon:o,noun:i("item"),items:t,onChange:f,newItem:()=>({text:""}),open:null,onOpen:()=>{},renderItem:()=>null,above:n?v(mg,{target:s,value:SY(t,l),onChange:u=>a(wY(t,l??-1,u)),disabled:l===null,label:l===null?i("Formatting \u2014 click a row first"):i("Formatting \u2014 row {n}",{n:l+1})}):void 0,renderRow:(u,p,h)=>v("input",{type:"text",className:n&&l===p?"sf-list-marking":void 0,value:u?.text??"",placeholder:i(r),"aria-label":i("{label} {n}",{label:i(e),n:p+1}),onChange:g=>h({text:g.target.value}),onFocus:g=>{s.current=g.currentTarget,d(p)}})})}function c_(e,o){let t=`${e.label} \u2014 row ${o+1}`;return rn({control:"plainText",label:t,placeholder:e.placeholder,offPage:e.offPage},{type:"custom",render:({value:r,onChange:a})=>v(tn,{value:r,onChange:a,label:i("{label} \u2014 row {n}",{label:i(e.label),n:o+1}),placeholder:e.placeholder,hideable:!1,markup:e.rendering==="markup"})})}function f_(e){return{_gCards:Ht("Cards"),coverIndex:ut("Cover image",v(TV,{}),CE,String(1),e?.coverHint??"A card's opening picture \u2014 a card pinned to a finish keeps its own."),imageBackground:v8("Image background",Kf),cardImage:u_()}}function IEe(){return{outline:ut("Card outline",v(_V,{}),wE,SE),indexBadge:ut("Card number",v(vV,{}),yg,bg),showBadge:s_("Product badge",!0,v(tg,{noun:"tag"}))}}function p_(e){let o=e?.defaults??{showCardSizes:!0,showCardBuy:!0,showCardPage:!0},t=a=>({...Qf,label:Jf.find(n=>n.id===a).label}),r=a=>ua(vI(CI),t(a));return{_gShowOnCard:Ht("Show on a card"),[CI]:ua({type:"custom",render:()=>v(kY,{rest:{showCardPrice:!0,showCardFinishes:!0,...o}})},t(CI)),showCardFinishes:r("showCardFinishes"),showCardSizes:r("showCardSizes"),showCardBuy:r("showCardBuy"),showCardPage:r("showCardPage")}}var CI="showCardPrice",Jf=[{id:"showCardPrice",label:"Price"},{id:"showCardFinishes",label:"Finish swatches"},{id:"showCardSizes",label:"Sizes"},{id:"showCardBuy",label:"Buy button"},{id:"showCardPage",label:"Page button"}];function kY({rest:e}){let o=To(),t=ia(),r=s=>typeof o[s]=="boolean"?o[s]:void 0,a=s=>r(s)??e[s],n=Jf.some(({id:s})=>r(s)!==void 0&&r(s)!==e[s]);return v(vs,{parts:Jf,changed:n,shown:a,onPress:(s,l)=>t({[s]:l}),onReset:()=>t(Object.fromEntries(Jf.map(({id:s})=>[s,void 0])))})}function bEe(e,o="display"){let t=Cs(o);return{[o]:mt("desktop",{type:"custom",render:({value:r,onChange:a})=>v(vs,{parts:e,changed:lE(r),shown:n=>cf(r,n),onPress:(n,s)=>a(dE(r,n,s)),onReset:()=>a(void 0)})}),[t]:mt("mobile",{type:"custom",render:({value:r,onChange:a})=>v(vY,{parts:e,desktopKey:o,value:r,onChange:a})})}}function vs({parts:e,changed:o,shown:t,onPress:r,onReset:a,detail:n,disabledReason:s}){let l=i("Display");return v(co,{label:l,icon:v(mV,{}),changed:o,action:v(Do,{words:se()?.panel,label:l,changed:o,detail:n,onReset:a}),children:v(UV,{label:l,items:e.map(d=>({id:d.id,label:i(d.label),shown:t(d.id),...s?{disabled:!0,disabledReason:i(s)}:{}})),onChange:r})})}function vY({parts:e,desktopKey:o,value:t,onChange:r}){let a=To()[o];return v(vs,{parts:e,changed:iE(t),shown:n=>cg(a,t,n),onPress:(n,s)=>r(cE(t,n,s)),onReset:()=>r(mf),detail:i("the same as Desktop")})}function u_(e=SP){return Eo("Card image",v(F0,{}),No,jr,yP,No,e,{clear:{hint:No},hint:"Rounds the picture. The card's own corner is in Styles."})}function TY(){return ui(Xx,"cardImage")}function yEe(){return{cardImage:u_(Xx),...TY()}}function SEe(){return DI({sidesKey:"cornerSides",row:wP,step:CP,useFollowed:()=>No,mark:v(PY,{label:kP}),hint:i("Rounds the picture. Left alone it stays square.")})}function PY({label:e,changed:o=!1,onReset:t=()=>{}}){return v(Do,{words:se()?.panel,label:i(e),changed:o,onReset:t})}function wEe(){return{type:"custom",render:({value:e,onChange:o})=>v(AY,{value:typeof e=="string"?e:"",onChange:o})}}function EY({layout:e,width:o}){let t=Qx(e),r=t?`${t[0]}/${t[1]}`:void 0;return v("span",{"aria-hidden":"true",style:{display:"grid",width:o,gridTemplateColumns:"repeat(12, minmax(0, 1fr))",gridAutoRows:r?"auto":6,gridAutoFlow:"row dense",gap:2},children:_P(e).map(([a,n],s)=>v("i",{className:"block rounded-xs bg-current opacity-60",style:{gridColumn:`span ${a}`,gridRow:`span ${n}`,aspectRatio:r}},s))})}var OY={width:"3.5rem",height:"2.5rem"},_Y=200;function AY({value:e,onChange:o}){let[t,r]=hi(null),[a,n]=hi(4),s=mi(null);lV(()=>{let h=s.current;if(!h||typeof ResizeObserver!="function")return;let g=()=>n(h.getBoundingClientRect().width>=_Y?4:3);g();let I=new ResizeObserver(g);return I.observe(h),()=>I.disconnect()},[]);let l=e?G(aa,e):void 0,d=l?e:"",c=Jx(t,d),f=Jx(t,"").length,u=Jc("no-symbol"),p=[{value:"",label:i("Not chosen"),icon:I0(u,i("Not chosen"))},...c.map(h=>({value:h,label:i(aa[h].label),icon:v(EY,{layout:aa[h],width:40})}))];return v(co,{label:i("Layout"),icon:v(kV,{}),value:l?i(l.label):void 0,children:v("div",{ref:s,style:{flex:"1 1 auto",minWidth:0},children:v(W0,{label:i("Layout"),value:d,options:p,onChange:o,columns:a,cell:OY,header:Fr("div",{className:"mb-2 flex flex-col gap-1",style:{minWidth:"11rem"},children:[v("span",{className:"text-2xs text-ink-faint",children:i("Photos in a row")}),v(BV,{options:[{id:"all",label:i("All")},...EP.map(h=>({id:String(h),label:String(h)}))],value:t===null?"all":String(t),ariaLabel:i("Photos in a row"),onChange:h=>r(h==="all"?null:Number(h))}),v("span",{className:"text-2xs text-ink-faint",children:i("{n} of {total} layouts",{n:f,total:Zx.length})})]})})})})}import{decodePartId as qY}from"efficient-easel/draw";import{decodePartId as VI,encodePartId as mp}from"efficient-easel/draw";import{LINK_FIELD_MARKER as C_,SCAFFOLD_FIELD_MARKER as S_,TEXT_FIELD_MARKER as hp}from"efficient-easel/draw";import{readHidable as k_}from"efficient-easel/draw";import{SCALAR_TEXT_CONTROLS as MY}from"efficient-easel/draw";import{TEXT_FIELD_MARKER as NY}from"efficient-easel/draw";import{TEXT_FIELD_MARKER as m_}from"efficient-easel/draw";import{readHidable as h_}from"efficient-easel/draw";import{SCALAR_TEXT_CONTROLS as RY}from"efficient-easel/draw";var LY=RY,FY=["text","textarea"],BY=["textarea","plainTextarea"];function DY(e){return!e||typeof e!="object"?null:e[m_]?.control??null}function Ts(e){let o=DY(e);return o&&LY.includes(o)?o:null}function cp(e){return BY.includes(e)}function x_(e){return!e||typeof e!="object"?void 0:e[m_]?.placeholder}function fp(e){return h_(e).text}function $I(e,o,t){return FY.includes(e)?{text:t,hidden:h_(o).hidden}:t}function g_(e,o,t,r){return fp(e[o])===r?null:{...e,[o]:$I(t,e[o],r)}}function Ps(e,o){return o?`${e}[${o.index}].${o.rowKey}`:e}function Wt(e){let o=/^([A-Za-z0-9_$]+)\[(\d+)\]\.([A-Za-z0-9_$]+)$/u.exec(e);return o?{key:o[1],row:{index:Number(o[2]),rowKey:o[3]}}:{key:e,row:null}}function pp(e){if(!(!e||typeof e!="object"))return e[NY]}function KI(e){if(!e||typeof e!="object")return null;let o=e.arrayFields;return o&&typeof o=="object"?o:null}function I_(e,o){if(!Array.isArray(o))return[];let t=pp(e),r=[];if(t?.control==="textList"){let n=t.itemKey??"text";return o.forEach((s,l)=>{let d=Z(s?.[n]);d&&r.push({row:{index:l,rowKey:n},text:d})}),r}let a=KI(e);return a?(o.forEach((n,s)=>{for(let[l,d]of Object.entries(a)){if(!Ts(d))continue;let c=fp(n?.[l])||pp(d)?.placeholder||"";c&&r.push({row:{index:s,rowKey:l},text:c})}}),r):[]}function bi(e,o){if(Array.isArray(e))return e[o.index]?.[o.rowKey]}function jI(e,o,t,r){let a=e[o];return!Array.isArray(a)||t.index<0||t.index>=a.length?null:{...e,[o]:a.map((n,s)=>s===t.index?{...n,[t.rowKey]:r}:n)}}function b_(e,o,t,r,a){let n=bi(e[o],t);return fp(n)===a?null:jI(e,o,t,$I(r,n,a))}function y_(e,o){return o?`${e} \xB7 row ${o.index+1}`:e}var Ut="data-sf-part",$Ee="data-sf-region-part",KEe="data-sf-part-row";function jEe(e,o){return`${e}[${o}]`}var VEe="data-sf-part-kind",HY="data-sf-part-style-owner",WY="data-sf-part-style-kind";function YEe(e){for(let o=e;o;o=o.parentElement){let t=o.getAttribute(HY),r=o.getAttribute(WY);if(t&&r)return{owner:t,kind:r};if(o.getAttribute("data-easel-block"))return null}return null}var w_=2;function Es(e){return vr(e).replace(/\s+/gu,"")}function up(e,o,t){let r=e[hp];if(r){if(r.control==="textList"){let n=r.itemKey??"text";if(!Array.isArray(o))return;for(let s of o){let l=s?.[n];typeof l=="string"&&t.push(l)}return}let{text:a}=k_(o);a?t.push(a):r.placeholder&&t.push(r.placeholder);return}if(!e[C_]){if(e.type==="text"||e.type==="textarea"){let a=Z(o);a&&t.push(a);return}if(e.arrayFields&&Array.isArray(o)){for(let a of o)for(let[n,s]of Object.entries(e.arrayFields))up(s,a?.[n],t);return}if(e.objectFields&&o&&typeof o=="object")for(let[a,n]of Object.entries(e.objectFields))up(n,o[a],t)}}function YI(e){if(!e||typeof e!="object")return!1;let o=e;return o[C_]?!1:!!o[hp]||o.type==="text"||o.type==="textarea"}function xp(e,o){let t=e[hp];return t?.label?t.label:typeof e.label=="string"?e.label:o}function qI(e){let o=e.indexOf(" (");return(o>0?e.slice(0,o):e).trim()}function qEe(e,o,t){if(!e)return[];let r=[];for(let[a,n]of Object.entries(e)){if(!n||typeof n!="object"||Jl(a))continue;let s=n,l=[];up(s,o?.[a],l),!l.length&&s[S_]!==void 0&&up(s,s[S_],l);let d=xp(s,a);if(t?.(a)&&YI(s)){l.length&&r.push({key:a,label:d,texts:[],keyed:!0});continue}let c=new Set;for(let{row:p,text:h}of I_(s,o?.[a])){let g=Es(h);g.length<w_||(c.add(g),r.push({key:a,label:d,texts:[g],row:p}))}let f=new Set(c),u=[];for(let p of l){let h=Es(p);h.length<w_||f.has(h)||(f.add(h),u.push(h))}u.length&&r.push({key:a,label:d,texts:u})}return r}function XI(e){return!e.offPage&&!e.hidden&&e.panelOnly!==!0}var UY=MY;function v_(e,o){if(!o||typeof o!="object"||Jl(e)||mE(o))return null;let t=o[hp];return!t||!UY.includes(t.control)?null:t}function XEe(e,o){let t=v_(e,o);return t!==null&&t.identifier!==!0}function T_(e,o){if(!e)return[];let t=[];for(let[r,a]of Object.entries(e)){let n=v_(r,a);if(!n)continue;let{text:s,hidden:l}=k_(o?.[r]);if(XI({offPage:n.offPage===!0,hidden:!!l,panelOnly:us(a)}))continue;let d=s||n.placeholder||"",c=vr(d).replace(/\s+/gu," ").trim();t.push({key:r,label:qI(xp(a,r)),preview:c,offPage:n.offPage===!0,identifier:n.identifier===!0,hidden:!!l})}return t}function Os(e,o){let t=pp(e);return t?.control==="textList"?o.rowKey===(t.itemKey??"text")?c_(t,o.index):null:KI(e)?.[o.rowKey]??null}function gp(e,o,t){let r=e.node.props,{key:a,row:n}=Wt(e.propKey),s=n?b_(r,a,n,e.kind,o):g_(r,a,e.kind,o);return s?(t(e.zone,e.index,{...e.node,props:s}),!0):!1}import{readHidable as __}from"efficient-easel/draw";import{isNodeList as GY}from"efficient-easel/data";var ZI=e=>String(e+1).padStart(2,"0"),aOe=[{label:"01 \xB7",value:"two-digit"},{label:"1.",value:"plain"}],JI="two-digit",P_=e=>e==="plain"?"plain":JI,Ip=(e,o)=>e==="plain"?`${o+1}.`:ZI(o);var eb="Contents",QI="Flex",E_="Text",zY="numberForm",hOe="_contentsEntries",xOe="_kickerNumber",A_="data-sf-kicker-number",$Y=e=>__(e).text.trim(),R_=e=>Qc(e?.anchor),O_=e=>String(e.props?.id??""),KY=e=>!__(e.props?.text).hidden&&!as(e.props)&&!rt(e.props);function yi(e){return Object.values(e.props??{}).filter(GY)}function L_(e){for(let o of yi(e))for(let t of o){if(Xl(t.props??{}))continue;if(t.type===E_&&KY(t))return t;if(t.type===E_)continue;let r=L_(t);if(r)return r}}function F_(e){return yi(e).some(o=>o.some(t=>t&&!Xl(t.props??{})&&(t.type===eb||F_(t))))}var B_=e=>e.type===QI&&Is(QI,e.props?.direction)==="row";function D_(e){return yi(e).some(o=>o.some(t=>t&&!Xl(t.props??{})&&(t.type===eb||!B_(t)&&D_(t))))}function jY(e){let o=[],t=(r,a)=>{for(let n of r){if(!n||Xl(n.props??{}))continue;if(n.type===eb){a.open={contents:n,sections:a.waiting??[]},a.waiting=null,o.push(a.open);continue}if(B_(n)&&D_(n)){let l={inRow:!0,open:null,waiting:[]};for(let d of yi(n))t(d,l);a.inRow||(a.open=null);continue}let s=a.open?.sections??a.waiting;if(n.type===QI&&R_(n.props)&&s&&!F_(n)){s.push({box:n,kicker:L_(n)});continue}for(let l of yi(n))t(l,a)}};return t(e,{inRow:!1,open:null,waiting:null}),o}function VY(e){return e.map(o=>({label:o.kicker?vr($Y(o.kicker.props?.text)):"",anchor:R_(o.box.props)}))}function gOe(e){let o=e?.length?jY(e):[];if(!o.length)return null;let t=new Map,r=new Map;for(let a of o){let n=O_(a.contents);n&&t.set(n,VY(a.sections));let s=P_(a.contents.props?.[zY]);a.sections.forEach((l,d)=>{let c=l.kicker?O_(l.kicker):"";c&&r.set(c,Ip(s,d))})}return{entries:t,numbers:r}}var IOe=e=>e.endsWith(".")?`${e} `:`${e} \xB7 `;var XY=`[${A_}]`,ZY=["bold","italic","underline","strike","link","sup","sub"],JY=["bullet","number"];function rb(e,o){return e?[...ZY,...o?JY:[]]:[]}function N_(e,o){let t=qY(e);if(!t?.propKey)return null;let{nodeId:r,propKey:a}=t,n=o.getItemById(r),s=o.getSelectorForId(r);if(!n||!s)return null;let{key:l,row:d}=Wt(a),c=o.components[n.type]?.fields?.[l],f=d?Os(c,d):c,u=Ts(f);if(!u)return null;let p=n.props??{};if(Ng(p)!==null||!d&&Ml(n.type,p,l)||n.type==="Text"&&l==="text"&&as(p)||d&&!(Array.isArray(p[l])&&d.index<p[l].length))return null;let h=d?bi(p[l],d):p[l];return{node:n,selector:s,propKey:a,kind:u,stored:h,offPage:op(f),panelOnly:us(f)}}function bp(e,o){let t=N_(e,o);if(!t)return null;let{text:r,hidden:a}=ma(t.stored);if(!XI({offPage:t.offPage,hidden:!!a,panelOnly:t.panelOnly}))return null;let n=cp(t.kind);return{partId:e,value:r,rules:Fa,multiline:n,skip:XY,offered:rb(t.kind!=="plainText",n),write:s=>{let l=N_(e,o);l&&gp({node:l.node,propKey:l.propKey,kind:l.kind,zone:l.selector.zone,index:l.selector.index},s,o.replace)}}}function ab(e,o,t){return e?.isConnected&&e.getAttribute(Ut)===t?e:o?.querySelector(`[${Ut}="${yp(t)}"]`)??null}function yp(e){return e.replace(/["\\]/g,"\\$&")}function M_(e){let o=e.activeElement;return o?o.tagName==="IFRAME"||!!o.closest(".es-canvas"):!1}var ob=null,tb=new Set;function QY(){return ob}function nb(e){if(e!==ob){ob=e;for(let o of tb)o()}}function e7(e){return tb.add(e),()=>{tb.delete(e)}}function H_(){return YY(e7,QY,()=>null)}function W_(e,o){if(e.outer)return null;let t=o.getItemById(e.ownerId);if(!t)return null;let r=gT(t.type);return!r||oo(t.props)?null:{node:t,rows:r}}function n7(e,o){let t=W_(e,o),r=o.getItemById(e.nodeId);if(!t||!r)return null;let a=wx(r.type,r.props,e.key);if(!a)return null;let n=t.node.props[t.rows];return!Array.isArray(n)||e.index<0||e.index>=n.length?null:o7(e.ownerId,Ps(t.rows,{index:e.index,rowKey:a}))}function Sp(e,o){let t=n7(e,o);return t?bp(t,o):null}function U_(e,o){return Sp(e,o)?.value}function G_(e,o){let t=Sp(e,o);return t?(t.write(e.text),!0):!1}function z_(e,o){let t=W_(e,o),r=t&&o.getSelectorForId(e.ownerId);if(!t||!r)return!1;let a=t.node.props,n=a[t.rows],s=e.index;if(!Array.isArray(n)||s<0||s>=n.length)return!1;let l;switch(e.action){case"addAfter":{let d=o.components[t.node.type]?.fields?.[t.rows];l=t7(n,s+1,{...d?.defaultItemProps??{}});break}case"moveEarlier":case"moveLater":{let d=e.action==="moveEarlier"?s-1:s+1;if(d<0||d>=n.length)return!1;l=r7(n,s,d);break}case"delete":l=a7(n,s);break;default:return!1}return o.replace(r.zone,r.index,{...t.node,props:{...a,[t.rows]:l}}),!0}import{jsx as ke,Fragment as wR,jsxs as _i}from"react/jsx-runtime";import{Fragment as BX,useEffect as DX,useId as NX,useMemo as CR,useRef as MX,useState as xa}from"react";import{useScreenDocument as AR}from"efficient-easel/screen/components/ScreenDocumentContext";import{UiIcon as Zb}from"efficient-easel/draw/client";import HX from"efficient-easel/screen/components/SidePanelHead";import{jsx as be,Fragment as Ns,jsxs as fn}from"react/jsx-runtime";import{useEasel as mR,useRootFields as U9}from"efficient-easel/easel";import{Inspector as G9}from"efficient-easel/fields";import{SettingsGroup as z9}from"efficient-easel/panel";import{useEffect as $9,useRef as K9,useState as Yb}from"react";import{jsx as an,Fragment as d7,jsxs as c7}from"react/jsx-runtime";import{useState as V_}from"react";import{SettingsDefaultReset as f7,SettingsField as p7}from"efficient-easel/panel";import{useEaselStrings as u7}from"efficient-easel/strings";import{AddIcon as m7}from"efficient-easel/icons";import{Button as h7}from"efficient-shell/ui";import{iconOf as x7,noGlyph as g7}from"efficient-easel/screen/lib/document/box-fields";import{jsx as wp,Fragment as s7,jsxs as $_}from"react/jsx-runtime";import{Button as K_,Dialog as l7}from"efficient-shell/ui";function i7(e){return Mo("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 j_({count:e,onCancel:o,onConfirm:t}){return $_(l7,{open:!0,onClose:o,role:"alertdialog",size:"sm",title:i("Clear this site\u2019s colors?"),footer:$_(s7,{children:[wp(K_,{variant:"secondary",onClick:o,children:i("Cancel")}),wp(K_,{variant:"danger",onClick:t,children:i("Clear colors")})]}),children:[wp("p",{children:i7(e)}),wp("p",{className:"mt-2 font-medium",children:i("This cannot be undone.")})]})}var I7=g7("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"),b7="Reset color",y7={selected:0,themes:[]};function S7(e){e(y7)}function Y_({value:e,onChange:o}){let t=e?.themes??[],r=t.length===0,a=uo(e),[n,s]=V_(!1),l=u7(),[d,c]=V_(null),f=(S,k)=>{o({...a,themes:a.themes.map((y,b)=>b===S?k:y)})},u=Yn(a).accent,p=new Set(a.themes.map(S=>S.brandInk).filter(Boolean)),h=GC.filter(S=>!p.has(S)).map(S=>zC(u,S)),g=[...a.themes,...h],I=S=>{if(S<a.themes.length)return o({...a,selected:S});let k=[...a.themes,g[S]];o({...a,themes:k,selected:k.length-1})},C=()=>{let S=[...a.themes,{...$o(a.themes[a.selected])}];o({...a,themes:S,selected:S.length-1}),c(S.length-1)};return c7(d7,{children:[r?null:an(p7,{label:i(b7),icon:x7(I7),labelId:"sf-theme-reset",action:an(f7,{label:i("all theme colors"),words:l.panel,changed:!0,onReset:()=>s(!0)})}),n&&an(j_,{count:t.length,onCancel:()=>s(!1),onConfirm:()=>{s(!1),S7(o)}}),an("div",{className:"sf-theme-list",role:"radiogroup","aria-label":i("Theme"),children:g.map((S,k)=>an(yf,{index:k,colors:S,selected:k===a.selected,open:d===k&&k<a.themes.length,editable:k<a.themes.length,onPick:()=>I(k),onEdit:()=>c(y=>y===k?null:k),onChangeColors:y=>f(k,y)},k))}),an(h7,{variant:"secondary",leftIcon:an(m7,{}),onClick:C,className:"sf-theme-add",children:i("Add new theme")})]})}import{jsx as Cp}from"react/jsx-runtime";import{SettingsDefaultReset as w7,SettingsField as C7}from"efficient-easel/panel";import{SquareIcon as k7}from"efficient-easel/icons";var v7="Applies to panels, cards, inputs and buttons. Round things \u2014 color swatches, switches, status dots \u2014 stay round.",sb="Corners";function q_({value:e,onChange:o}){let t=e===null;return Cp(C7,{label:i(sb),icon:Cp(k7,{}),changed:!t,action:Cp(w7,{words:se()?.panel,label:i(sb),changed:!t,detail:i("the built-in corners"),onReset:()=>o(null)}),hint:i(v7),children:Cp(Xo,{min:No,max:jr,step:1,value:e,...e===null?{}:{suffix:"px"},placeholder:No,placeholderWord:"Auto",onClear:()=>o(null),ariaLabel:i(sb),onChange:o})})}import{jsx as Si}from"react/jsx-runtime";import{SettingsDefaultReset as T7,SettingsField as P7}from"efficient-easel/panel";import{IconPicker as E7}from"efficient-shell/ui";import{ShadowIcon as O7}from"efficient-easel/icons";import{SHADOW_PREVIEW as _7}from"efficient-easel/screen/lib/document/shadow-values";var lb={none:"None",soft:"Soft",lifted:"Lifted"},A7="Applies to cards \u2014 products, brands, journal entries and filter cells. Round things like swatches and status dots are never shadowed.";function X_({value:e,onChange:o}){let t=e===null,r=e??wh;return Si(P7,{label:i("Card shadow"),icon:Si(O7,{}),value:i(lb[r]),changed:!t,action:Si(T7,{words:se()?.panel,label:i("Card shadow"),changed:!t,detail:i(lb[wh]),onReset:()=>o(null)}),hint:i(A7),children:Si(E7,{label:i("Card shadow"),value:r,options:ek.map(a=>({value:a,label:i(lb[a]),icon:Si("span",{className:"sf-shadow-chip border border-line bg-surface",style:{boxShadow:_7[a]}})})),onChange:o})})}import{jsx as Z_}from"react/jsx-runtime";import{ShadowIcon as R7}from"efficient-easel/icons";import{DEFAULT_SHADOW_COLOR as J_}from"efficient-easel/screen/lib/document/shadow-values";var L7="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 Q_({value:e,onChange:o}){let t=e===null;return Z_(Zl,{label:i("Shadow color"),icon:Z_(R7,{}),value:e??"",inherited:J_,resetTo:J_,onChange:o,onReset:()=>o(null),hint:i(L7)})}import{jsx as vp}from"react/jsx-runtime";import{SettingsDefaultReset as F7,SettingsField as B7}from"efficient-easel/panel";import{AlignSeparateIcon as D7}from"efficient-easel/icons";function kp(e,o){return e==="tablet"?null:e==="mobile"?o.phone:o.desktop}var N7="The space between the blocks inside a row, a grid or a box. Auto means each one keeps the spacing it already has.",M7="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.",ib="Block gap",eA=bs.Grid;function oA(e,o){return kp(e,{desktop:{key:"block_gap",value:o.gap,followsPx:null},phone:{key:"block_gap_phone",value:o.phone,followsPx:o.gap===null?null:iI(o.gap)}})}function tA({value:e,onChange:o,followsPx:t=null}){let r=e===null,a=t===null?null:`${t}px`,n=t===null?eA:ii(t)??eA;return vp(B7,{label:i(ib),labelId:"sf-block-gap",icon:vp(D7,{}),changed:!r,action:vp(F7,{words:se()?.panel,label:i(ib),changed:!r,detail:a??i("each block's own spacing"),onReset:()=>o(null)}),hint:i(a===null?N7:M7),children:vp(Xo,{min:Rr.min,max:Rr.max,step:Rr.step,value:e,...e===null&&t===null?{}:{suffix:"px"},placeholder:n,...t===null?{placeholderWord:"Auto"}:t===n?{}:{placeholderWord:String(t)},onClear:()=>o(null),ariaLabel:i(ib),onChange:o})})}import{jsx as Tp}from"react/jsx-runtime";import{SettingsDefaultReset as H7,SettingsField as W7,SettingsSegmented as U7}from"efficient-easel/panel";import{HoverIcon as G7}from"efficient-easel/icons";var db={none:Na.none,lift:Na.lift,highlight:Kh},z7="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 rA({value:e,onChange:o}){let t=e===null,r=e??Ch;return Tp(W7,{label:i("Hover effect"),icon:Tp(G7,{}),value:i(db[r]),changed:!t,action:Tp(H7,{words:se()?.panel,label:i("Hover effect"),changed:!t,detail:i(db[Ch]),onReset:()=>o(null)}),hint:i(z7),children:Tp(U7,{options:ok.map(a=>({id:a,label:i(db[a])})),value:r,ariaLabel:i("Hover effect"),onChange:o})})}import{jsx as Pp}from"react/jsx-runtime";import{SettingsDefaultReset as $7,SettingsField as K7,SettingsSegmented as j7}from"efficient-easel/panel";import{DropIcon as V7}from"efficient-easel/icons";var cb="Photography",aA={shot:"As shot",mono:"Black and white"},fb=[{grayscale:!1,label:aA.shot},{grayscale:!0,label:aA.mono}],Y7="Black and white photographs return to color on hover. Wheels and tyres keep their real finish either way.";function nA({value:e,onChange:o}){let t=e===null,r=e??!1;return Pp(K7,{label:i(cb),icon:Pp(V7,{}),value:i(fb.find(a=>a.grayscale===r).label),changed:!t,action:Pp($7,{words:se()?.panel,label:i(cb),changed:!t,detail:i(fb.find(a=>!a.grayscale).label),onReset:()=>o(null)}),hint:i(Y7),children:Pp(j7,{options:fb.map(a=>({id:a.grayscale,label:i(a.label)})),value:r,ariaLabel:i(cb),onChange:o})})}import{jsx as pb}from"react/jsx-runtime";import{useId as q7}from"react";import{SettingsField as X7,SettingsSwitch as Z7}from"efficient-easel/panel";import{ShareIcon as J7}from"efficient-easel/icons";var Q7="Share button",eq="On every blog post.";function sA({value:e,onChange:o}){let t=q7();return pb(X7,{label:i(Q7),labelId:t,icon:pb(J7,{}),action:pb(Z7,{checked:e===!0,onChange:o,ariaLabelledBy:t}),hint:i(eq)})}import{usePreviewDevice as qb}from"efficient-easel/draw/client";import{jsx as Ep}from"react/jsx-runtime";import{SettingsDefaultReset as oq,SettingsField as tq}from"efficient-easel/panel";import{PaddingXIcon as rq}from"efficient-easel/icons";var ub="Side space",lA=dt.default,aq="The room left at the left and right edge of every page.";function iA(e,o){return kp(e,{desktop:{key:"site_gutter",value:o.gutter,unsetPx:lA,bounds:dt},phone:{key:"site_gutter_phone",value:o.phone,unsetPx:Rf(o.gutter),bounds:fa}})}function dA({value:e,onChange:o,unsetPx:t=lA,bounds:r=dt}){let a=e===null;return Ep(tq,{label:i(ub),labelId:"sf-side-space",icon:Ep(rq,{}),changed:!a,action:Ep(oq,{words:se()?.panel,label:i(ub),changed:!a,detail:`${t}px`,onReset:()=>o(null)}),hint:i(aq),children:Ep(Xo,{min:r.min,max:r.max,step:r.step,value:e,suffix:"px",placeholder:t,onClear:()=>o(null),ariaLabel:i(ub),onChange:o})})}import{jsx as mb}from"react/jsx-runtime";import{BACKGROUND_WIDTHS as i_e,SettingsBackgroundWidth as nq,SettingsContentWidth as sq}from"efficient-easel/panel";var lq="Background width",iq="Content width";var Op=e=>i(Ja[e==="content"?"page":"full"]),cA="The width of every section's background.",fA="The width of every section's content.";function pA({value:e,changed:o,detail:t,onChange:r,onReset:a,hint:n,labelId:s}){return mb(nq,{value:e,changed:o,detail:t,onChange:r,onReset:a,hint:n?i(n):void 0,labelId:s,words:{label:i(lq),full:Op("full"),content:Op("content")},resetWords:se()?.panel})}function uA({mode:e,px:o,max:t=Io.max,min:r=Io.min,changed:a,detail:n,fullClosed:s,onMode:l,onPx:d,onReset:c,hint:f,labelId:u,length:p}){let h=i(iq),g=p?.grid.min??r,I=p?.grid.max??t,C=e!=="full"?mb(Xo,{min:g,max:I,step:p?.grid.step??Io.step,value:Math.min(Math.max(o,g),I),onChange:d,...p?{suffix:p.unit,units:p.units}:{suffix:"px"},ariaLabel:h}):null;return mb(sq,{mode:e,onMode:l,number:C,changed:a,detail:n,fullClosed:s,onReset:c,hint:f?i(f):void 0,labelId:u,words:{label:h,full:Op("full"),content:Op("content")},resetWords:se()?.panel})}import{jsx as eR}from"react/jsx-runtime";import{TextStyleItem as g9,TextStylesGroup as I9}from"efficient-easel/text-styles";import{jsx as f9}from"react/jsx-runtime";import{useState as p9}from"react";import{TextStylesList as u9}from"efficient-easel/text-styles";import{usePreviewDevice as m9}from"efficient-easel/draw/client";import{defaultTextStyles as WA,textStyleCaseCss as n9}from"efficient-easel/text-styles/model";import{resolveViewValue as UA}from"efficient-easel/draw";import{VIEW_DESKTOP_MIN as mA,VIEW_TABLET_MIN as hA}from"efficient-easel/draw";var _p=.02,xA=`(min-width: ${Xt}px) and (max-width: ${mA-_p}px)`,gA=`(max-width: ${Xt-_p}px)`,Ap=`(min-width: ${hA}px) and (max-width: ${mA-_p}px)`,Rp=`(max-width: ${hA-_p}px)`;import{textStyleCaseCss as dq,textStyleCaseOfCss as cq,viewKeyAt as kA}from"efficient-easel/draw";function _s(e){return!e||typeof e!="object"||Array.isArray(e)?null:e}function As(e,o){return _s(e?.[o])??{}}function Lp(e,o,t){let r=As(e,o);return _s(G(r,t))??{}}function Fp(e,o,t,r){let{[t]:a,...n}=As(e,o),s=r?{...n,[t]:r}:n,{[o]:l,...d}=e;return Object.keys(s).length?{...d,[o]:s}:d}import{isLengthUnit as yb}from"efficient-easel/screen/lib/content/length-units";var ki="_partStyles",Sb="data-sf-part-styled",Rs="data-sf-text-style",fq=/^(heading|body)-[1-7]$/;function ln(e){return typeof e=="string"&&fq.test(e)}var Bp={heading:"heading-1",heading2:"heading-2",heading3:"heading-3",body:"body-1",label:"body-5"};function pq(e){if(!e)return null;for(let[o,t]of Object.entries(Bp))if(t===e)return o;return null}function wb(e){if(ln(e.textStyle))return e.textStyle;let o=Sr(e.role);return o?Bp[o]:void 0}var uq=[400,500,600,700],Ci=["left","center","right","justify"],hb=5,xb=1e3,mq=-5,hq=10,Cb=0,kb=64,vb=2,IA={size:{min:hb,max:xb,step:1},sizeTablet:{min:hb,max:xb,step:1},sizePhone:{min:hb,max:xb,step:1},padding:{min:Cb,max:kb,step:vb}},xq=.05,gq=.01,Iq=["line","letter"],bq=.5,yq=2.5,Sq=-1,wq=1,Cq=0,kq=400,vq=[...new Set(Object.values(Kn))];function vA(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 R_e(e){return As(e,ki)}function vi(e,o){return Lp(e,ki,o)}function TA(e,o,t){return Fp(e,ki,o,Tq(t).length?t:null)}function Tq(e){return Object.entries(e).filter(([,o])=>o!==void 0)}function Pq(e){return Iq.includes(e)}var wi=(e,o,t)=>Math.min(t,Math.max(o,e)),Eq=["sizeUnit","sizeUnitTablet","sizeUnitPhone"];function gb(e){let o=kA("sizeUnit",e),t=Eq.find(r=>r===o);if(!t)throw new Error(`a part stores no unit key ${o}`);return t}var ht={size:gb("desktop"),sizeTablet:gb("tablet"),sizePhone:gb("mobile"),paragraphSpacing:"paragraphSpacingUnit",padding:"paddingUnit"},PA=Object.values(ht);function pr(e,o){return eo(e[ht[o]])}function Oq(e,o,t={}){if(PA.includes(e))return yb(o)&&o!=="px"?o:null;if(He(ht,e)&&pr(t,e)!=="px"){let r=sn(Number(o),2);return!Number.isFinite(r)||r<0||r===0&&e!=="padding"?null:r}if(Pq(e)){let r=Math.round(Number(o));return!Number.isFinite(r)||r===0?null:wi(r,mq,hq)}if(e==="lineHeight"){let r=Number(o);return Number.isFinite(r)?sn(wi(r,bq,yq),3):null}if(e==="letterSpacing"){let r=Number(o);return Number.isFinite(r)?sn(wi(r,Sq,wq),4):null}if(e==="paragraphSpacing"){let r=Math.round(Number(o));return!Number.isFinite(r)||r<=0?null:wi(r,Cq,kq)}if(He(IA,e)){let{min:r,max:a}=IA[e],n=Math.round(Number(o));return Number.isFinite(n)?wi(n,r,a):null}return e==="italic"?typeof o=="boolean"?o:null:e==="role"||e==="fontRole"?Sr(o)?o:null:e==="sizeToken"?Tb(o)?o:null:e==="textStyle"?ln(o)?o:null:e==="alignPhone"||e==="alignTablet"?Ci.includes(o)?o:null:o}var _q=["weight","size","sizeTablet","sizePhone","line","letter","lineHeight","letterSpacing","paragraphSpacing","padding"];function Ls(e){let o=null,t=r=>{o??={...e},delete o[r]};for(let r of _q){let a=e[r];a!==void 0&&!(typeof a=="number"&&Number.isFinite(a))&&t(r)}e.align!==void 0&&!Ci.includes(e.align)&&t("align"),e.alignTablet!==void 0&&!Ci.includes(e.alignTablet)&&t("alignTablet"),e.alignPhone!==void 0&&!Ci.includes(e.alignPhone)&&t("alignPhone"),e.textStyle!==void 0&&!ln(e.textStyle)&&t("textStyle"),e.sizeToken!==void 0&&!Tb(e.sizeToken)&&t("sizeToken"),e.fontRole!==void 0&&!Sr(e.fontRole)&&t("fontRole");for(let r of PA)e[r]!==void 0&&!yb(e[r])&&t(r);return o??e}function Tb(e){if(!e||typeof e!="object")return!1;let{step:o,px:t,stepPhone:r,pxPhone:a,fluid:n}=e,s=d=>typeof d=="number"&&Number.isFinite(d)&&d>0,l=d=>typeof d=="string"&&vq.includes(d);return l(o)&&s(t)&&(r===void 0||l(r))&&(a===void 0||s(a))&&(n===void 0||Aq(n,t))}function Aq(e,o){if(!e||typeof e!="object"||Array.isArray(e))return!1;let{minPx:t,vw:r,...a}=e;return Object.keys(a).length===0&&typeof t=="number"&&Number.isFinite(t)&&t>0&&t<o&&typeof r=="number"&&Number.isFinite(r)&&r>0&&r<=100}function Pb(e){return e?.pxPhone&&Tb(e)?{step:e.stepPhone??e.step,px:e.pxPhone}:null}function EA({step:e,px:o,fluid:t}){let r=t?`clamp(${t.minPx}px, ${t.vw}vw, ${o}px)`:`${o}px`,a=`var(--size-${e}, ${r})`;return e.startsWith("heading")?`min(${a}, var(--sf-heading-max,9999px))`:a}var Rq=[["font","role"],["font","fontRole"],["role","textStyle"],["line","lineHeight"],["letter","letterSpacing"]];function Lq(e){let o=[];for(let[t,r]of Rq)t===e?o.push(r):r===e&&o.push(t);return o}function dn(e,o,t,r){let a={...vi(e,o)},n=r==null?null:Oq(t,r,a);if(n===null)delete a[t];else{a[t]=n;for(let s of Lq(t))delete a[s]}return TA(e,o,a)}function OA(e,o){return TA(e,o,{})}function Fq(e){return cq(e)??"none"}function Bq(e){return dq(e)??""}var bA={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 Dq(e,o){return Sr(e.role)||(o?.blockDrawsStyle?null:pq(e.textStyle))}function _A(e,o){return e==="Text"&&o==="text"}var Nq={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 Mq(e){let o=Kn[e],t=G(Nq,o);return t?`var(--size-${o}, ${t})`:`var(--size-${o})`}function Ti(e){let o={};return typeof e.lineHeight=="number"?o.lineHeight=e.lineHeight:e.line&&(o.lineHeight=sn(Hq+e.line*xq,3)),typeof e.letterSpacing=="number"?o.letterSpacingEm=e.letterSpacing:e.letter&&(o.letterSpacingEm=sn(e.letter*gq,4)),o}var Hq=1,nn="--sf-part-para";function Wq(e){e=Ls(e);let o={};if(typeof e.sizePhone=="number"&&e.sizePhone>0)o.fontSize=Le(e.sizePhone,pr(e,"sizePhone"));else{let r=Pb(e.sizeToken);if(r)o.fontSize=EA(r);else{let a=Np(e);a!==void 0&&(o.fontSize=Le(a,pr(e,"sizeTablet")))}}let t=e.alignPhone??Dp(e);return t&&(o.textAlign=t),o}function Dp(e){return e.alignTablet&&e.alignTablet!==e.align?e.alignTablet:void 0}function Np(e){let o=e.sizeTablet!==void 0&&pr(e,"sizeTablet")!==pr(e,"size")?e.sizeTablet:_t("textSize",e.size,e.sizeTablet,void 0).tablet;return o&&o>0?o:void 0}function Uq(e){let o=Ls(e),t={},r=Np(o);r!==void 0&&(t.fontSize=Le(r,pr(o,"sizeTablet")));let a=Dp(o);return a&&(t.textAlign=a),t}function AA(e,o){if(o==="desktop")return;let t=Ls(e);return(o==="mobile"?Dp(t):void 0)??t.align}function Gq(e,o){if(o==="desktop")return e;let t=Ls(e),r=Np(t),a=Dp(t);if(o==="tablet"){let l=e;return r!==void 0&&(l={...l,size:r,sizeUnit:t[ht.sizeTablet]}),a&&(l={...l,align:a}),l}let n=e;if(typeof t.sizePhone=="number"&&t.sizePhone>0)n={...n,size:t.sizePhone,sizeUnit:t[ht.sizePhone]};else{let l=Pb(t.sizeToken);l?n={...n,size:void 0,sizeToken:l}:r!==void 0&&(n={...n,size:r,sizeUnit:t[ht.sizeTablet]})}let s=t.alignPhone??a;return s&&(n={...n,align:s}),n}function Eb(e,o,t){return _b(Gq(e,o),Mp,t)}function Ob(e){return kA("size",e)}function RA(e,o){if(o==="desktop")return null;let t=Ls(e);if(o==="mobile"){if(Pb(t.sizeToken))return null;let r=Np(t);if(r!==void 0)return{px:r,view:"tablet"}}return typeof t.size=="number"&&t.size>0?{px:t.size,view:"desktop"}:null}function LA(e,o){let t=Ob(o);if(!He(e,t))return e;let r={...e};return delete r[t],r}function L_e(e,o,t){let r=Eb(LA(e,o),o,t);return{fontFamily:r.fontFamily,fontSize:r.fontSize}}function _b(e,o,t){e=Ls(e);let r=Dq(e,t),a=Ti(e),n=e.size?Le(e.size,pr(e,"size")):e.sizeToken?EA(e.sizeToken):r?Mq(r):"";return{fontFamily:e.font?jq(e.font):e.fontRole?`var(${bA[e.fontRole]})`:r?`var(${bA[r]})`:"",fontWeight:e.weight?String(e.weight):"",fontSize:n,minWidth:n?"0":"",overflowWrap:n?"break-word":"",lineHeight:a.lineHeight!==void 0?String(a.lineHeight):"",letterSpacing:a.letterSpacingEm!==void 0?`${a.letterSpacingEm}em`:"",[nn]:e.paragraphSpacing?Le(e.paragraphSpacing,pr(e,"paragraphSpacing")):"",textTransform:Bq(e.case),textAlign:e.align??"",paddingTop:yA(e.padding,pr(e,"padding")),paddingBottom:yA(e.padding,pr(e,"padding")),color:zq(e.color),fontStyle:e.italic===!0?"italic":e.italic===!1?"normal":""}}var zq=e=>ds(e),yA=(e,o)=>e===void 0?"":Le(e,o),sn=(e,o)=>Number(e.toFixed(o));function F_e(e,o){let t=Number.parseFloat(e.fontSize)||16,r=Number.parseFloat(e.lineHeight),a=Number.parseFloat(e.letterSpacing),n=Number.parseFloat(e.paddingTop);return{fontKey:o,sizePx:t,weight:$q(Number.parseInt(e.fontWeight,10)),lineRatio:Number.isFinite(r)?sn(r/t,3):1.2,letterEm:Number.isFinite(a)?sn(a/t,4):0,align:Kq(e.textAlign),case:Fq(e.textTransform),paddingPx:Number.isFinite(n)?Math.round(n):0}}function $q(e){return Number.isFinite(e)?uq.reduce((o,t)=>Math.abs(t-e)<Math.abs(o-e)?t:o):400}function Kq(e){for(let o of Ci)if(o===e)return o;return e==="end"?"right":"left"}function B_e(e,o){let t=SA(e);if(!t)return"";for(let r of Ot)if(SA(o(r.cssVar))===t)return r.key;return""}var SA=e=>(e.split(",")[0]??"").replace(/["']/g,"").replace(/\s+/g," ").trim().toLowerCase();function jq(e){let o=$n(e);return o?`var(${o.cssVar})`:""}function D_e(e,o,t,r){return!o||VI(o)?.nodeId!==e?null:t.find(a=>r(a.getAttribute("class")))??t[0]??null}function Vq(e,o){return _s(G(e,o))??{}}function N_e(e,o,t=()=>Mp,r=l=>l,a=Xq,n="desktop",s=()=>!1){let l=0;for(let{element:d,partId:c}of e){let f=VI(c)?.propKey;if(!f)continue;let u=Vq(o,r(f)),p=Eb(u,n,{blockDrawsStyle:s(f)});ln(u.textStyle)?d.setAttribute?.(Rs,u.textStyle):d.removeAttribute?.(Rs);let h=Ib.some(I=>d.style[I]),g=!1;for(let[I,C]of Object.entries(p))Qq(d,I,C),C&&(g=!0);if(h||Ib.some(I=>p[I]))for(let I of Yq(d,a))for(let C of Ib)I.style[C]=p[C]??"";g&&(l+=1)}return l}function Yq(e,o){let t=Es(e.textContent??""),r=[],a=e;for(let n=0;n<qq&&o(a);n+=1){let s=a.parentElement;if(!s||Es(s.textContent??"")!==t)break;r.push(s),a=s}return r}var qq=8;function Xq(e){let o=e;return typeof window>"u"||!o?.ownerDocument?!1:window.getComputedStyle(o).display==="inline"}var Mp={fontKey:"",sizePx:16,weight:400,lineRatio:1,letterEm:0,align:"left",case:"none",paddingPx:0};function Zq(e){if(!e||typeof e!="object")return null;let o={};ln(e.textStyle)&&(o.textStyle=e.textStyle),typeof e.size=="number"&&e.size>0&&(o.size=e.size),typeof e.sizeTablet=="number"&&e.sizeTablet>0&&(o.sizeTablet=e.sizeTablet),typeof e.sizePhone=="number"&&e.sizePhone>0&&(o.sizePhone=e.sizePhone);for(let t of["size","sizeTablet","sizePhone"]){let r=ht[t];o[t]!==void 0&&yb(e[r])&&(o[r]=e[r])}return Object.keys(o).length?o:null}function Jq(e,o){let t=Zq(e);if(!t)return{};let r=Eb(t,o);return{...r.fontFamily?{fontFamily:r.fontFamily}:{},...r.fontSize?{fontSize:r.fontSize}:{}}}function FA(e){return ln(e?.textStyle)||!!e?.role||typeof e?.size=="number"&&e.size>0}function M_e(e,o,t){if(!e||typeof e!="object")return{};let r=Lc(e.role,o,Kn)??{},a=o.sized?Jq(LA(e,t),t):{};return{...r,...a}}function H_e(e,o,t){t.fontFamily&&e.fontFamily===t.fontFamily&&(e.fontFamily=o.fontFamily),t.fontSize&&e.fontSize===t.fontSize&&(e.fontSize=o.fontSize)}function Qq(e,o,t){if(!o.startsWith("--")){e.style[o]=t;return}let r=e.style;typeof r.setProperty=="function"?t?r.setProperty(o,t):r.removeProperty?.(o):r[o]=t;let a=e;o===nn&&(t?a.setAttribute?.(wA,""):a.removeAttribute?.(wA))}var wA="data-sf-part-para",e9=Object.keys(_b({},Mp)),bb=new Set(["color","overflowWrap",nn,"fontStyle"]),Ib=e9.filter(e=>!bb.has(e));function BA(e,o,t,r=l=>l,a=()=>!1,n=()=>null,s=[]){let l=new Map;for(let u of e){let p=Ps(u.key,u.row);for(let h of u.texts){let g=l.get(h);g?(g.keys.add(u.key),g.partKeys.add(p)):l.set(h,{keys:new Set([u.key]),partKeys:new Set([p])})}}let d=new Map;for(let u of new Set([...Object.keys(o),...s])){if(!o9(u))continue;let p=CA(t,u,_s(o[u])??{},!1,n(u));p&&d.set(u,p)}let c=u=>{let p=r(u),h=n(p);if(!He(o,p)&&!h)return null;let g=_s(o[p])??{};return CA(t,u,g,a(u),h)},f=new Map;for(let[u,{keys:p,partKeys:h}]of l){let g=h.size===1?[...h][0]:p.size===1?[...p][0]:null;if(!g)continue;let I=c(g);I&&f.set(u,I)}for(let u of e){if(!u.keyed)continue;let p=c(Ps(u.key,u.row));p&&d.set(u.key,p)}return f.size||d.size?{rules:f,kindRules:d,drawn:new Set(l.keys())}:null}function CA(e,o,t,r,a){let n=_b(t,Mp,{blockDrawsStyle:r}),s=Uq(t),l=Wq(t),d=ln(t.textStyle)?t.textStyle:void 0;return!Object.values(n).some(Boolean)&&!Object.keys(s).length&&!Object.keys(l).length&&!d&&!a?null:{stamp:t9(e,o),declarations:n,...Object.keys(s).length?{tablet:s}:{},...Object.keys(l).length?{phone:l}:{},...d?{textStyle:d}:{},...a?{motion:a}:{}}}function o9(e){return e.startsWith("@")}function Ab(e,o){return e?.kindRules.get(o)??null}function t9(e,o){let t=r=>r.replace(/[^A-Za-z0-9_-]+/g,"-");return`${t(e)}~${t(o)}`}function Rb(e){return e?{tablet:xA,phone:gA}:{tablet:Ap,phone:Rp}}function DA(e,{inBox:o=!1}={}){let{tablet:t,phone:r}=Rb(o),a=[],n=new Set,s=l=>{let{stamp:d,declarations:c}=l;if(n.has(d))return;n.add(d);let f=Object.entries(c).filter(([,S])=>S!==""),u=S=>S.map(([k,y])=>`${r9(k)}: ${y}`).join("; "),p=`[${Sb}="${d}"]`,h=f.filter(([S])=>!bb.has(S)),g=f.filter(([S])=>bb.has(S));h.length&&a.push(`${p}, *:has(> ${p}) { ${u(h)} }`),g.length&&a.push(`${p} { ${u(g)} }`),c[nn]&&(a.push(`*:has(> ${p}) { ${nn}: ${c[nn]} }`),a.push(...Hp(p,`*:has(> ${p})`)));let I=Object.entries(l.tablet??{}).filter(([,S])=>S!=="");I.length&&a.push(`@media ${t} { ${p}, *:has(> ${p}) { ${u(I)} } }`);let C=Object.entries(l.phone??{}).filter(([,S])=>S!=="");C.length&&a.push(`@media ${r} { ${p}, *:has(> ${p}) { ${u(C)} } }`)};for(let l of e.rules.values())s(l);for(let l of e.kindRules.values())s(l);return a.join(`
76
76
  `)}function Hp(e,o){let t=`var(${nn})`,r=":is([data-sf-bullet], [data-sf-number])";return[`${e} br:not(br + br) { display: block; content: ""; margin-top: ${t} }`,`${e} ${r}:not(:first-child) { margin-top: ${t} }`,`${e} ${r}:not(:last-child) { margin-bottom: ${t} }`,`:is(${o}) + :is(${o}) { margin-top: ${t} }`]}var r9=e=>e.replace(/[A-Z]/g,o=>`-${o.toLowerCase()}`);function NA(e,o){if(!e)return null;let t=Es(o),r=e.rules.get(t);if(r)return r;if(t.length<a9||e.drawn.has(t))return null;let a=null;for(let[n,s]of e.rules)if(n.includes(t)){if(a&&a.stamp!==s.stamp)return null;a=s}return a}var a9=8;function MA(e){switch(e.id){case"heading-1":return"font-display";case"heading-2":return"font-heading2";case"heading-3":return"font-heading3";case"body-1":return"font-body";case"body-5":return"font-mono";default:return`font-${e.id}`}}var Lb=e=>e==="sentence"?"none":void 0,GA=["font","color","size","sizeTablet","sizePhone","weight","italic","lineHeight","lineHeightTablet","lineHeightPhone","letterSpacing","letterSpacingTablet","letterSpacingPhone","paragraphSpacing","paragraphSpacingTablet","paragraphSpacingPhone","letterCase","largestSize","largestSizeTablet","largestSizePhone"],Fs=["desktop","tablet","phone"],cn=(e,o)=>Ie(e,o);function Db(e,o,t,r=jn()){return UA("textSize",o,e.sizeTablet,e.sizePhone,r)[t]}var s9=[["lineSpacing","lineHeight","line"],["letterSpacing","letterSpacing","letter"]];function Fb(e){for(let[o,t,r]of s9)for(let a of Fs)if(e===cn(o,a))return{key:Ie(t,a),view:a,spacing:r};return{key:e,view:"desktop",spacing:null}}function ur(e){let o={};for(let t of GA)e[t]!==void 0&&(o[t]=e[t]);return o}function Nb(e,o){let{auto:t,...r}=e,a=new Set(o??[]),n=GA.filter(s=>a.has(s)&&e.values[s]===void 0);return n.length?{...r,auto:n}:r}function zA(e){let o=e.fonts,t=e.sizes,r=e.typography,a=tk(e.compression),n={"heading-1":{font:Z(o.heading),size:j(t.headingLarge),weight:j(r.weight),lineHeight:a.lineHeight,letterSpacing:a.letterSpacing,letterCase:Lb(r.case),largestSize:j(r.maxPx)},"heading-2":{font:Z(o.heading2),size:j(t.headingMedium),weight:j(r.weight2),lineHeight:a.lineHeight,letterSpacing:a.letterSpacing,letterCase:Lb(r.case2)},"heading-3":{font:Z(o.heading3),size:j(t.headingSmall),weight:j(r.weight3),lineHeight:a.lineHeight,letterSpacing:a.letterSpacing,letterCase:Lb(r.case3)},"body-1":{font:Z(o.body),size:j(t.body)},"body-5":{font:Z(o.label),size:j(t.label)}};return WA().map(({id:s,kind:l,name:d})=>({id:s,kind:l,name:d,values:ur(n[s]??{})}))}function Mb(e){return Array.isArray(e)&&e.every(o=>o&&typeof o=="object"&&typeof o.id=="string"&&(o.kind==="heading"||o.kind==="body")&&typeof o.name=="string")?e.map(o=>Nb({...o,values:ur(o.values??{})},Array.isArray(o.auto)?o.auto:void 0)):null}function Q_e(e){return Mb(e)??[]}function $A(e){return Mb(e)??WA().map(({id:o,kind:t,name:r})=>({id:o,kind:t,name:r,values:{}}))}function Mr(e,o){let t=zA(o),r=Mb(e);return r?r.map(a=>{let n={...Bb(t,a.id)};for(let s of a.auto??[])delete n[s];return{...a,values:ur({...n,...a.values})}}):t}var Bb=(e,o)=>e.find(t=>t.id===o)?.values??{},HA=["heading-1","heading-2","heading-3"];function KA({saved:e,old:o,cur:t,next:r,sizeOf:a,panelView:n="desktop"}){let s=zA(o),l=$A(e),d=Mr(l,o),c=[],f=r.map(p=>{let h=t.find(O=>O.id===p.id),g=l.find(O=>O.id===p.id);if(!h||!g){let O=l9([p],a,n)[0],W=O.values.color;return W===void 0?O:{...O,values:{...O.values,color:at(W)}}}let I={...g.values},C=new Set(g.auto??[]),S=p.values,k=h.values,y=[...new Set([...Object.keys(S),...Object.keys(k)])].filter(O=>JSON.stringify(S[O])!==JSON.stringify(k[O])),b=O=>Fb(O).spacing==="letter";y.sort((O,W)=>Number(b(O))-Number(b(W)));for(let O of y){let{key:W,view:T,spacing:M}=Fb(O),P=W,F=S[O];if(F===void 0){delete I[P],Bb(s,p.id)[P]!==void 0&&(c.push([p.id,P]),C.add(P));continue}if(C.delete(P),M==="line")I[P]=Bs(F/100,3);else if(M==="letter"){let w={...d.find(L=>L.id===p.id)?.values??{}};for(let L of y)S[L]===void 0&&delete w[Fb(L).key];let E=ur({...w,...I}),A=Db(E,a({...p,values:E}),T);I[P]=A?Bs(F/A,4):0}else I[P]=F}return Nb({id:p.id,kind:p.kind,name:p.name,values:ur(I)},C)}),u=o.compression;if(c.some(([p,h])=>(h==="lineHeight"||h==="letterSpacing")&&HA.includes(p))&&Aa(u)!=="normal"){for(let p of HA){let h=f.find(I=>I.id===p);if(!h)continue;let g={...h.values};for(let I of["lineHeight","letterSpacing"])c.some(([C,S])=>C===p&&S===I)||g[I]===void 0&&!(h.auto??[]).includes(I)&&(g[I]=Bb(s,p)[I]);h.values=ur(g)}u="normal"}return{saved:f,old:{...o,compression:u}}}function jA(e,o){let t={text_styles:e.saved};return e.old.compression!==o.compression&&(t.heading_compression=Aa(e.old.compression)),t}var Bs=(e,o)=>Number(e.toFixed(o)),VA=(e,o)=>Fs.indexOf(e)<Fs.indexOf(o)?o:e;function YA(e,o,t="desktop"){return e.map(r=>{let a={...r.values},n=o(r);for(let s of Fs){let l=Ie("lineHeight",s),d=r.values[l],c=r.values[Ie("letterSpacing",s)];delete a[l],d!==void 0&&(a[cn("lineSpacing",s)]=Bs(d*100,1));let f=VA(s,t);c!==void 0&&(a[cn("letterSpacing",s)]=Bs(c*Db(r.values,n,f),f===s?2:4))}return{id:r.id,kind:r.kind,name:r.name,values:a}})}function l9(e,o,t="desktop"){return e.map(r=>{let a=r.values,n={...a};for(let c of Fs)delete n[cn("lineSpacing",c)],delete n[cn("letterSpacing",c)];let s={id:r.id,kind:r.kind,name:r.name,values:ur(n)},l={...s.values},d=o({...s,values:{...s.values}});for(let c of Fs){let f=a[cn("lineSpacing",c)],u=a[cn("letterSpacing",c)];if(typeof f=="number"&&(l[Ie("lineHeight",c)]=Bs(f/100,3)),typeof u=="number"){let p=Db(s.values,d,VA(c,t));l[Ie("letterSpacing",c)]=p?Bs(u/p,4):0}}return{...s,values:ur(l)}})}function eAe(e){let o={fonts:Il({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:Sh({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:Aa(e.heading_compression),typography:ak(e)},t=e.text_styles??null,r=Array.isArray(t)?Hb(Mr(t,o),o):o;return{fonts:Il(r.fonts),sizes:Sh(r.sizes),compression:Aa(r.compression),typography:r.typography,textStyles:t}}function Hb(e,o){let t=p=>e.find(h=>h.id===p)?.values??{},r=t("heading-1"),a=t("heading-2"),n=t("heading-3"),s=t("body-1"),l=t("body-5"),d=o.fonts,c=o.sizes,f=o.typography,u=p=>p==="none"?"sentence":"authored";return{fonts:{...d,heading:r.font??d.heading,heading2:a.font??r.font??d.heading2,heading3:n.font??r.font??d.heading3,body:s.font??d.body,label:l.font??d.label},sizes:{...c,headingLarge:r.size??null,headingMedium:a.size??null,headingSmall:n.size??null,body:s.size??null,label:l.size??null},compression:o.compression,typography:{...f,case:u(r.letterCase),weight:r.weight??null,maxPx:r.largestSize??null,weight2:a.weight??null,weight3:n.weight??null,case2:u(a.letterCase),case3:u(n.letterCase)}}}function oAe(e){let o=[];for(let t of e){let r=t.values,a=`.${MA(t)}`,n=`[${Rs}="${t.id}"]`,s=`${a}, ${n}`,l=[],d=r.font!==void 0?Ot.find(p=>p.key===r.font)?.cssVar:void 0;if(d&&l.push(`font-family: var(${d})`),r.size!==void 0){let p=r.largestSize!==void 0?Math.min(r.size,r.largestSize):r.size;l.push(`font-size: ${p}px`)}let c=ds(r.color);c&&l.push(`color: ${c}`),r.italic===!0&&l.push("font-style: italic"),r.weight!==void 0&&l.push(`font-weight: ${r.weight}`);let f=[];r.lineHeight!==void 0&&f.push(`line-height: ${r.lineHeight}`),r.letterSpacing!==void 0&&f.push(`letter-spacing: ${r.letterSpacing}em`),t.kind==="body"&&l.push(...f);let u=n9(r.letterCase);u&&t.kind==="body"&&l.push(`text-transform: ${u}`),r.paragraphSpacing&&l.push(`--sf-part-para: ${r.paragraphSpacing}px`),l.length&&o.push(`${s} { ${l.join("; ")} }`),t.kind==="heading"&&f.length&&o.push(`${s}, ${a}:is(h1, h2, h3, h4), ${n}:is(h1, h2, h3, h4) { ${f.join("; ")} }`),t.kind==="heading"&&u&&o.push(`${n}, ${a}:is(h1, h2, h3, h4) { text-transform: ${u} }`),r.paragraphSpacing&&(o.push(`*:has(> ${n}) { --sf-part-para: ${r.paragraphSpacing}px }`),o.push(...Hp(`:is(${s})`,`*:has(> ${n})`))),o.push(...i9(t,s,a,n))}return o.join(`