efficient-storefront-blocks 0.84.0 → 0.86.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.
- package/CHANGELOG.md +23 -0
- package/dist/chunks/{EditorPreviewCheckout-3NVDTH56.js → EditorPreviewCheckout-4LNXFNN7.js} +1 -1
- package/dist/chunks/{SiteEditorProvider-77K7CGYZ.js → SiteEditorProvider-A2HMVDKS.js} +1 -1
- package/dist/chunks/{chunk-F3MB7QCR.js → chunk-ALMIS7CK.js} +1 -1
- package/dist/chunks/{chunk-VYOK2XBF.js → chunk-EUKK2IN6.js} +1 -1
- package/dist/chunks/chunk-FJRKNPNN.js +340 -0
- package/dist/chunks/chunk-SLRULFYY.js +1 -0
- package/dist/chunks/{chunk-VJLQXB7I.js → chunk-TGBNREUJ.js} +1 -1
- package/dist/chunks/{fitment-data-PWXEDMOA.js → fitment-data-TSYW6AFA.js} +1 -1
- package/dist/contract.js +2 -2
- package/dist/editor/lib/document/blocks/commerce/DetailRows/fields.js +1 -1
- package/dist/editor/lib/document/blocks/commerce/FitmentPicker/fields.d.ts +2 -0
- package/dist/editor/lib/document/blocks/commerce/FitmentPicker/fields.js +1 -0
- package/dist/editor/lib/document/blocks/commerce/FitmentTable/fields.js +1 -1
- package/dist/editor/lib/document/blocks/commerce/ProductGrid/fields.js +1 -1
- package/dist/editor/lib/document/blocks/commerce/SpecTable/fields.js +1 -1
- package/dist/editor/lib/document/blocks/commerce/StockFitment/fields.d.ts +2 -0
- package/dist/editor/lib/document/blocks/commerce/StockFitment/fields.js +1 -0
- package/dist/editor/lib/document/blocks/commerce/index.d.ts +1 -1
- package/dist/editor/lib/document/blocks/commerce/index.js +1 -1
- package/dist/editor/lib/document/blocks/commerce/page-rules.d.ts +5 -0
- package/dist/editor/lib/document/blocks/commerce/page-rules.js +1 -1
- package/dist/editor/lib/document/blocks/service/ArticleBody/fields.d.ts +2 -0
- package/dist/editor/lib/document/blocks/service/ArticleBody/fields.js +1 -0
- package/dist/editor/lib/document/blocks/service/SiteFooter/fields.js +1 -1
- package/dist/editor/lib/document/blocks/service/SiteHeader/fields.js +1 -1
- package/dist/editor/lib/document/blocks/service/index.d.ts +1 -1
- package/dist/editor/lib/document/blocks/service/index.js +1 -1
- package/dist/editor/lib/document/box-header.d.ts +1 -1
- package/dist/editor/lib/document/box-header.js +1 -1
- package/dist/editor/lib/document/config.d.ts +1 -0
- package/dist/editor/lib/document/config.js +1 -1
- package/dist/editor/lib/document/popup-look-fields.d.ts +4 -0
- package/dist/editor/lib/document/popup-look-fields.js +1 -0
- package/dist/editor/lib/efficient-backend.js +1 -1
- package/dist/editor/lib/efficient-block-sources.js +1 -1
- package/dist/editor/lib/storefront-editor-words.d.ts +21 -1
- package/dist/editor/lib/storefront-editor-words.js +1 -1
- package/dist/editor.css +1 -1
- package/dist/index.js +134 -58
- package/dist/render/app/globals.css +156 -0
- package/dist/render/built-with.json +1 -1
- package/dist/render/components/ArticleBody.d.ts +7 -0
- package/dist/render/components/ArticleBody.js +1 -0
- package/dist/render/components/BoxHeaderBar.d.ts +2 -1
- package/dist/render/components/BoxHeaderBar.js +1 -1
- package/dist/render/components/CartContext.d.ts +1 -0
- package/dist/render/components/CartContext.js +1 -1
- package/dist/render/components/CartDrawer.d.ts +4 -3
- package/dist/render/components/CartDrawer.js +1 -4
- package/dist/render/components/DetailRows.d.ts +6 -1
- package/dist/render/components/DetailRows.js +1 -1
- package/dist/render/components/PopupFrame.d.ts +10 -1
- package/dist/render/components/PopupFrame.js +5 -1
- package/dist/render/components/ProductGridSection.d.ts +2 -1
- package/dist/render/components/ProductGridSection.js +1 -1
- package/dist/render/components/PublishedHeader.js +1 -1
- package/dist/render/components/Reviews.d.ts +1 -0
- package/dist/render/components/Reviews.js +1 -1
- package/dist/render/components/SectionBand.d.ts +2 -1
- package/dist/render/components/SectionBand.js +1 -1
- package/dist/render/components/SectionBandChoice.d.ts +2 -1
- package/dist/render/components/SectionBandChoice.js +1 -1
- package/dist/render/components/SectionGroupBody.d.ts +2 -2
- package/dist/render/components/SectionGroupBody.js +1 -1
- package/dist/render/components/SpecTable.d.ts +3 -1
- package/dist/render/components/SpecTable.js +1 -1
- package/dist/render/components/TyreSizeGrid.d.ts +17 -0
- package/dist/render/components/TyreSizeGrid.js +1 -0
- package/dist/render/components/fitment/FitmentPickerGrid.d.ts +5 -1
- package/dist/render/components/fitment/FitmentPickerGrid.js +1 -1
- package/dist/render/components/fitment/FitmentPickerPart.d.ts +8 -0
- package/dist/render/components/fitment/FitmentPickerPart.js +1 -0
- package/dist/render/components/fitment/StockFitmentPart.d.ts +4 -0
- package/dist/render/components/fitment/StockFitmentPart.js +1 -0
- package/dist/render/components/fitment/useVehicleFit.d.ts +2 -1
- package/dist/render/components/fitment/useVehicleFit.js +1 -1
- package/dist/render/components/pdp-dynamic/DynamicDetailRows.d.ts +2 -0
- package/dist/render/components/pdp-dynamic/DynamicDetailRows.js +1 -1
- package/dist/render/components/pdp-dynamic/DynamicFitmentTable.d.ts +5 -0
- package/dist/render/components/pdp-dynamic/DynamicFitmentTable.js +1 -1
- package/dist/render/components/pdp-dynamic/DynamicSpecTable.d.ts +1 -0
- package/dist/render/components/pdp-dynamic/DynamicSpecTable.js +1 -1
- package/dist/render/components/pdp-dynamic/DynamicTyreSizes.js +1 -1
- package/dist/render/components/pdp-dynamic/FitmentTableBlock.d.ts +3 -1
- package/dist/render/components/pdp-dynamic/FitmentTableBlock.js +1 -1
- package/dist/render/lib/content/article-body-seed.d.ts +9 -0
- package/dist/render/lib/content/article-body-seed.js +1 -0
- package/dist/render/lib/content/article-body.d.ts +8 -0
- package/dist/render/lib/content/article-body.js +5 -0
- package/dist/render/lib/content/article-page-seed.d.ts +12 -0
- package/dist/render/lib/content/article-page-seed.js +1 -0
- package/dist/render/lib/document/blocks/commerce/DetailRows/meta.d.ts +6 -0
- package/dist/render/lib/document/blocks/commerce/DetailRows/meta.js +1 -1
- package/dist/render/lib/document/blocks/commerce/DetailRows/render.js +1 -1
- package/dist/render/lib/document/blocks/commerce/FitmentPicker/meta.d.ts +2 -0
- package/dist/render/lib/document/blocks/commerce/FitmentPicker/meta.js +1 -0
- package/dist/render/lib/document/blocks/commerce/FitmentPicker/render.d.ts +2 -0
- package/dist/render/lib/document/blocks/commerce/FitmentPicker/render.js +1 -0
- package/dist/render/lib/document/blocks/commerce/FitmentTable/meta.js +1 -1
- package/dist/render/lib/document/blocks/commerce/FitmentTable/render.js +1 -1
- package/dist/render/lib/document/blocks/commerce/ProductGrid/render.js +1 -1
- package/dist/render/lib/document/blocks/commerce/SpecTable/render.js +1 -1
- package/dist/render/lib/document/blocks/commerce/StockFitment/meta.d.ts +2 -0
- package/dist/render/lib/document/blocks/commerce/StockFitment/meta.js +1 -0
- package/dist/render/lib/document/blocks/commerce/StockFitment/render.d.ts +2 -0
- package/dist/render/lib/document/blocks/commerce/StockFitment/render.js +1 -0
- package/dist/render/lib/document/blocks/commerce/metas.d.ts +2 -0
- package/dist/render/lib/document/blocks/commerce/metas.js +1 -1
- package/dist/render/lib/document/blocks/commerce/renders.d.ts +2 -0
- package/dist/render/lib/document/blocks/commerce/renders.js +1 -1
- package/dist/render/lib/document/blocks/service/ArticleBody/meta.d.ts +8 -0
- package/dist/render/lib/document/blocks/service/ArticleBody/meta.js +1 -0
- package/dist/render/lib/document/blocks/service/ArticleBody/render.d.ts +2 -0
- package/dist/render/lib/document/blocks/service/ArticleBody/render.js +1 -0
- package/dist/render/lib/document/blocks/service/SiteFooter/render.js +1 -1
- package/dist/render/lib/document/blocks/service/SiteHeader/render.js +1 -1
- package/dist/render/lib/document/blocks/service/metas.d.ts +1 -0
- package/dist/render/lib/document/blocks/service/metas.js +1 -1
- package/dist/render/lib/document/blocks/service/renders.d.ts +1 -0
- package/dist/render/lib/document/blocks/service/renders.js +1 -1
- package/dist/render/lib/document/card-templates.js +1 -1
- package/dist/render/lib/document/current-record.d.ts +4 -15
- package/dist/render/lib/document/current-record.js +1 -1
- package/dist/render/lib/document/lazy-draws.js +1 -1
- package/dist/render/lib/document/render-config.d.ts +1 -0
- package/dist/render/lib/document/render-config.js +1 -1
- package/dist/render/lib/document/section-to-box-rows-detail.d.ts +2 -0
- package/dist/render/lib/document/section-to-box-rows-detail.js +1 -0
- package/dist/render/lib/document/section-to-box-rows-reviews.js +1 -1
- package/dist/render/lib/document/section-to-box-rows-spec.js +1 -1
- package/dist/render/lib/document/storefront-root.js +1 -1
- package/dist/render/lib/sections/product-grid-columns.d.ts +5 -0
- package/dist/render/lib/sections/product-grid-columns.js +1 -0
- package/dist/render/lib/sections/section-band.d.ts +6 -0
- package/dist/render/lib/sections/section-band.js +1 -1
- package/dist/render/lib/sections/spec-table-band.d.ts +4 -0
- package/dist/render/lib/sections/spec-table-band.js +1 -0
- package/dist/render/lib/wheels/vehicle-memory.d.ts +13 -0
- package/dist/render/lib/wheels/vehicle-memory.js +1 -1
- package/dist/words.d.ts +58 -12
- package/dist/words.js +5 -5
- package/package.json +5 -4
- package/dist/chunks/chunk-5EQD5D3L.js +0 -340
- package/dist/chunks/chunk-DQFD2BJD.js +0 -1
- /package/dist/chunks/{chunk-5EQD5D3L.js.LEGAL.txt → chunk-FJRKNPNN.js.LEGAL.txt} +0 -0
|
@@ -0,0 +1,340 @@
|
|
|
1
|
+
import{A as ja,B as Ka,Ba as gy,D as ty,Fa as ce,G as as,I as ry,J as Uu,Ja as wy,Ka as Cy,M as Ci,Ma as ki,N as ay,Na as vy,O as ny,Oa as ky,P as sy,Q as ly,S as iy,T as ju,Ta as Ty,V as cy,W as Mo,X as Br,Y as dy,Z as gt,_ as vi,a as Zo,b as Ga,ba as fy,c as Zb,ca as Ku,d as Lt,e as zu,f as $a,fa as uy,ga as qu,ia as Vu,j as rs,l as tr,m as Gu,ma as py,s as Jb,sa as Dr,t as Qb,u as $u,ua as my,v as lo,w as ey,wa as hy,x as oy,y as Ua,ya as xy,z as yo,za as Iy}from"./chunk-EUKK2IN6.js";import{d as by,e as rr,f as yy,g as Sy,j as qa,n as Yu}from"./chunk-ALMIS7CK.js";var oe=e=>typeof e=="string"&&e?e:void 0;var Ey="en",Ti=null,Oy=Ey,_y=null;function tre(e,o,t){Ti=e??null,Oy=o||Ey,_y=t??null}function Q(){return _y}function Xu(){return Oy}function Ry(){return Ti}function Py(e,o){return o?e.replace(/\{([A-Za-z][A-Za-z0-9_]*)\}/g,(t,r)=>Object.prototype.hasOwnProperty.call(o,r)?String(o[r]):t):e}function i(e,o){let t=Ti?Ti[e]:void 0;if(typeof t=="function"){try{let r=oe(t(o??{}));if(r)return r}catch{}return Py(e,o)}return Py(oe(t)??e,o)}function xo(e,o,t,r){return i(t===1?e:o,{...r,n:t})}import{jsx as Zu,Fragment as aD,jsxs as nD}from"react/jsx-runtime";import{createContext as sD,useContext as lD}from"react";var iD={mirrorHostStyles:!0,css:null,fontHrefs:[]},Ay=sD(iD);function sre({value:e,children:o}){return Zu(Ay.Provider,{value:e,children:o})}function Ju(){return lD(Ay)}function Fy(){let{css:e,fontHrefs:o}=Ju();return nD(aD,{children:[o.map(t=>Zu("link",{rel:"stylesheet",href:t},t)),e?Zu("style",{"data-sf-canvas-css":"",children:e}):null]})}import{jsx as cD}from"react/jsx-runtime";import{createContext as dD,useContext as fD}from"react";var Ly=dD(void 0);function dre({metadata:e,children:o}){return cD(Ly.Provider,{value:e,children:o})}var By=()=>fD(Ly);import{jsx as so,Fragment as NB,jsxs as yi}from"react/jsx-runtime";import{useCallback as os,useEffect as Ft,useRef as Ote,useState as FB}from"react";import{SettingsSwitch as _te}from"efficient-easel/panel";import{PagesIcon as Rte,StylesIcon as Ate}from"efficient-easel/rail";import{PaletteIcon as Fte}from"efficient-shell/icons/efficient";import{Subtree as Lte,TreeRow as MB}from"efficient-easel/tree";import{useEasel as HB}from"efficient-easel/easel";import{useEaselStrings as WB}from"efficient-easel/strings";import{createContext as uD,useContext as pD}from"react";var Qu=uD(!1),pre=()=>pD(Qu);import{useMemo as mD,useRef as hD}from"react";import{useEaselApi as xD}from"efficient-easel/easel";import{useSectionOps as ID}from"efficient-easel/screen/lib/document/use-section-ops";function Pi(){let e=xD(),o=ID(),t=hD(o);return t.current=o,mD(()=>({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 eG}from"efficient-easel/draw";import{insertAt as oG,moveTo as tG,removeAt as rG}from"efficient-easel/fields";function ar(e,o){let t=globalThis,r=Symbol.for(e),a=t[r];return a===void 0&&(a=o(),t[r]=a),a}var Ei="dataSource";var gD="dataRows",Nr="countKey",ns="counts",bD=/^[a-z][a-z0-9]*(-[a-z0-9]+)*$/;function ss(){return ar("efficient.block-sources",()=>({sources:new Map,revision:0}))}var yD=e=>[e?.key,e?.label,e?.value].every(o=>typeof o=="string"&&o.trim()!==""),SD=e=>[e?.key,e?.label].every(o=>typeof o=="string"&&o.trim()!==""),wD=e=>[e?.label,e?.href].every(o=>typeof o=="string"&&o.trim()!=="");function CD(e){if(typeof e.key!="string"||!bD.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(o=>typeof o!="string"||!o))throw new Error(`The block source ${e.key} names no block it can fill.`);return{key:e.key,label:e.label.trim(),blocks:[...e.blocks],...e.sample?{sample:e.sample.map(o=>Ny(o)).filter(o=>o!==null)}:{},...Array.isArray(e.choices)?{choices:e.choices.filter(yD)}:{},...Array.isArray(e.fields)?{fields:e.fields.filter(SD).map(o=>({...o}))}:{},...wD(e.edit)?{edit:{label:e.edit.label.trim(),href:e.edit.href.trim()}}:{}}}function wre(e){let o=e.map(CD),t=ss();for(let r of o)t.sources.set(r.key,r);o.length&&(t.revision+=1)}function Cre(e){let o=[...ss().sources.values()];return e===void 0?o:o.filter(t=>t.blocks.includes(e))}function ep(e){return ss().sources.get(e)??null}function Dy(e){return ss().sources.get(e)?.choices??[]}function vre(){return ss().revision}function So(e){let o=e?.[Ei];return typeof o=="string"?o.trim():""}function Ny(e){if(!e||typeof e!="object"||Array.isArray(e))return null;let o={};for(let[t,r]of Object.entries(e)){let a=oe(r);a&&(o[t]=a)}return Object.keys(o).length?o:null}function vD(e){let o=e?.[gD];return Array.isArray(o)?o.map(Ny).filter(t=>t!==null):null}function kre(e,o,t=[]){let r=vD(e);if(r!==null&&(r.length||!o))return{rows:r,sample:!1};if(!o)return{rows:[],sample:!1};let a=ep(So(e))?.sample;return{rows:a?.length?a:t,sample:!0}}import{isNodeList as $N}from"efficient-easel/data";var My=["general","commerce","service"],nr=[{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:"Gallery",label:"Tabbed Gallery",set:"commerce"},{type:"GalleryB",label:"Customer Photo Grid",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"},{type:"TyreFitment",label:"Tyre Fitment Form",set:"commerce"},{type:"EuTyreLabel",label:"EU Tyre Label",set:"commerce"},{type:"RelatedProducts",label:"Related Products",set:"commerce"},{type:"BundleOffer",label:"Bundle Products",set:"commerce"}]},{key:"checkout",title:"Checkout & ordering",templateable:!0,sections:[{type:"OrderSummary",label:"Order Table",set:"general"},{type:"PaymentBadges",label:"Payment Methods",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:"Prose",label:"Editorial Text",set:"general"},{type:"ParagraphsA",label:"Lead Text",set:"general"},{type:"Cards",label:"Cards",set:"general"}]},{key:"proof",title:"Stats & social proof",templateable:!0,sections:[{type:"Stats",label:"Stats",set:"general"},{type:"StatsParagraph",label:"Stats with Text",set:"general"},{type:"Chart",label:"Chart",set:"general"},{type:"Mockup",label:"Mockup Card",set:"general"},{type:"Testimonials",label:"Testimonials",set:"general"},{type:"Reviews",label:"Reviews",set:"service"},{type:"Logos",label:"Logos",set:"general"}]},{key:"promo",title:"Promotions & sign-ups",templateable:!0,sections:[{type:"Banner",label:"Banner",set:"general"},{type:"TitleWithButtons",label:"Call-to-Action Heading",set:"general"},{type:"Countdown",label:"Countdown",set:"general"}]},{key:"blog",title:"Blog & journal",templateable:!0,sections:[{type:"Masthead",label:"Issue Header",set:"general"},{type:"FeaturedCover",label:"Feature Banner",set:"general"},{type:"LongRead",label:"Article Text",set:"general"},{type:"Events",label:"Latest Posts",set:"service"}]},{key:"navigation",title:"Navigation & wayfinding",templateable:!0,sections:[{type:"Breadcrumb",label:"Breadcrumb",set:"general"},{type:"CategoryBar",label:"Category Bar",set:"general"},{type:"DocTabs",label:"Document Tabs",set:"general"}]},{key:"legal",title:"Legal & documents",templateable:!0,sections:[{type:"DocMasthead",label:"Document Header",set:"general"},{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"}]}];function Pre(){return Object.fromEntries(nr.map(e=>[e.key,{title:e.title,components:e.sections.map(o=>o.type),...e.defaultExpanded?{defaultExpanded:!0}:{}}]))}var kD={Grid:'Lewis, 2026-09-14: Box and Grid duplicate each other and it feels confusing. 2026-09-15 he chose the order: give Box uneven widths FIRST, then merge Grid into Box. Shown three ways to pick the widths (mockup "Uneven Box Widths"), he chose A \u2014 shape pictures on the Box\'s `Block widths` row, the same "a row is a shape, pick a picture of it" rule he set for the photo wall on 2026-09-07.\n\nWHAT REPLACES IT: a Box set to One row, with `Block widths` at Equal or Custom, and its own `Columns` in the Phone view. Measured on PRODUCTION 2026-09-16 ~09:28 AEST (database `efficient-system`, all 10 tenant schemas, 128 storefront pages, both `layout` and `published_layout` \u2014 256 documents): 2 Grid nodes, and they are ONE Grid counted twice \u2014 the 9DIEM homepage on 9diem.com (`xtreme_mudder` schema), once as draft and once as published. It is top-level, holds three `ImageBlock`s at `columns` 3 \u2014 equal thirds \u2014 and NO block sets `Positions`. A Box draws that with `Block widths` at Equal.\n\n\u26A0\uFE0F THE COUNT MOVES; THE RULE MUST NOT DEPEND ON IT. This entry has already carried three different readings. A local-clone snapshot said no Grid used `Positions`. A PRODUCTION reading on 2026-09-15 ~13:15 AEST found 6 nodes on two sites, 4 of them spanned \u2014 hartesmetal.com.au homepage and about, 4 columns, spans 1 + 3. That one was TRUE when it was taken and stopped being true the same day: those two pages were rebuilt on Box (`Block widths: Bigger right`), and on 2026-09-16 they hold zero Grid nodes and are built from `Flex`. \u26D4 So the rule is NOT "there are still N spanned Grids". NEVER delete the Grid component or its `gridSpan` handling, whatever a census says \u2014 Grid still renders, still edits, still drags, and a merchant may rebuild a page either way on any day. Re-run the census on production before anyone PROPOSES deleting either, and read any number written here as the reading of its own day, not as the state of the world.\n\nWHAT A MERCHANT LOSES: a new Grid, and with it a fixed "N per row" that wraps by itself past three across, and the per-block `Positions` number. Box wraps with `Wrap`, but by content width, not by a fixed count.\n\nTHE TYPE KEY STAYS AND SO DOES THE COMPONENT. Every page holding a Grid still renders through it and can still be edited, dragged and added to; no document is rewritten and NO MIGRATION RUNS \u2014 the owner redoes live sections himself.\n\n\u26A0\uFE0F AND IT STAYS DROPPABLE WHERE IT LIVES. The drop rule in lib/document/config.tsx read the nestable containers off the catalogue\'s `structure` row, so leaving the catalogue would have made every open slot \u2014 a Box included \u2014 refuse a Grid already stored inside one. `scripts/test-retired-grid-stays-editable.tsx` \xA73 pins it.',CompatibleTyres:'Lewis, 2026-09-09: "Do not bother counting. Delete Compatible Tyres and use the new one. The new one needs complete settings \u2014 it must have every setting our cards have." Shown three ways to finish it, he chose C: retire from the menu now, and take styling the card text as its own card.\n\nWHAT REPLACES IT: `RelatedProducts` with its `Show` dropdown set to "Tyres that fit this product". That block is the GENERIC relationship section from card 1128 \u2014 it knows nothing about wheels or tyres, it asks the registry for a relationship by name. The two have rendered through the SAME renderer (`DynamicRelatedProducts`) since that card; this one is the pre-registry one-off that was never removed.\n\n\u26A0\uFE0F THE SWAP WAS NOT SAFE UNTIL #1305, AND SAYING SO IS THE POINT. The first old-versus-new table put in front of the owner was WRONG. `DynamicRelatedProducts` returns EARLY on a tyre answer and draws this component, so the seven card settings, the head split and the Width control all stopped at that call \u2014 nine settings, measured NO EFFECT, on precisely the relationship that replaces this block. #1283 gave the new block the card settings, #1299 the head split and its own Width, #1305 carried all of it onto the tyre branch. Only then was the claim true.\n\nWHAT WAS MEASURED BEFORE RETIRING, four ways, because the premise decides the card:\n \u2022 settable text kinds (SECTION_TEXT_KINDS): both blocks ABSENT \u2014 the map holds only TimelineTrack and Footprint, both AUTHORED lists\n \u2022 read-only text regions: neither `components/CompatibleTyres` nor `components/TyreCard` stamps one\n \u2022 panel rows through resolveFields: this block 31, `RelatedProducts` 42. This block\'s only style-ish key is `_sStyle`, the bucket HEADER, not a control\n \u2022 head text (num/title/description) is authored on both, so `_partStyles` reaches it identically\nSo on the CARD runs the two are zero against zero \u2014 neither can style them \u2014 and everywhere else the new block is ahead. Styling those runs needs a section-level prop family and a paint path for DERIVED text, which no section has yet: a part is anchored by matching an AUTHORED prop\'s string against the DOM, and `lib/document/source-bound-parts` keeps hydrated copy unreachable on purpose so a merchant cannot type into a copy of a product name and lose it at the next sync. That is its own card, and `lib/sections/text-regions` is the read-only half that already ships.\n\nTHE TYPE KEY STAYS AND SO DOES THE COMPONENT, the same contract Subscribe, Split and SubscribeBlogs have. Every page holding a `CompatibleTyres` still renders through it, no published document is rewritten, and NO MIGRATION RUNS \u2014 the owner\'s standing ruling of 2026-09-05: he redoes live sections himself and deletes the old ones when he does. He also said explicitly not to count them first.\n\n\u26A0\uFE0F AND THIS COMPONENT IS LOAD-BEARING FOR ITS OWN REPLACEMENT: `DynamicRelatedProducts` draws it for EVERY tyre answer. Deleting it would blank the block that replaces it, not just the pages still holding this one.',Spacer:`Lewis, 2026-10-10 (section-merges.md group 19, approved): one Divider holds space and lines. Style = None (was Spacer) / Line / Stripes; the space above and below as number boxes. Retired by card [MERGE] Spacer Into Divider (2026-10-26).
|
|
2
|
+
|
|
3
|
+
WHAT REPLACES IT: a Divider with Style set to None. It draws no line, only its space, and that space is the Divider's Padding row (top and bottom, each with its phone value): the Spacer's 24 / 48 / 96 / 160 px are None with Padding 12 + 12, 24 + 24, 48 + 48, 80 + 80. \`scripts/test-divider-holds-the-spacer.tsx\` \xA75 holds it.
|
|
4
|
+
|
|
5
|
+
WHAT A MERCHANT LOSES on a NEW space: nothing the Spacer had. Four fixed sizes become any number on the 4px grid, top and bottom apart, and a phone value.
|
|
6
|
+
|
|
7
|
+
NO CONVERTER ROW: 0 Spacer nodes on any page, draft or published, in any schema of the local production clone (read-only count, 2026-10-26), and none in the backend's seed files. This entry is its reason in the guard (\`scripts/test-section-to-box.tsx\` \xA75: a retired type is accounted for).
|
|
8
|
+
|
|
9
|
+
THE TYPE KEY STAYS AND SO DOES THE COMPONENT. A Spacer anywhere still renders through it and can still be edited; no document is rewritten.`,KeyFeatures:`Lewis, 2026-10-10 (section-merges.md group 4, approved): one Cards section holds Cards and Key Features; Key Features' diamond cells are the card style "Label only". Retired by card [MERGE] One Text Block And Click Through Parts (2026-10-22).
|
|
10
|
+
|
|
11
|
+
WHAT REPLACES IT: a Cards section with Card style set to Label only. It draws this section's own component (\`components/KeyFeatures\`), so for the same words it draws the same bytes: the pill eyebrow when no look is stored, the columns, each cell's link. A cell's words are the card's \`title\` (row "Feature label"), its link the card's \`href\` (row "Link"), both shown under Label only. \`scripts/test-cards-label-only.tsx\` \xA72 holds the bytes.
|
|
12
|
+
|
|
13
|
+
WHAT A MERCHANT LOSES on a NEW Label only section: nothing this section had. It GAINS the Cards head split (its head can move into a box of its own), which Key Features never had: that head draws the shared \`simple\` head, eyebrow ABOVE the heading, where Key Features drew it beside.
|
|
14
|
+
|
|
15
|
+
THE TYPE KEY STAYS AND SO DOES THE COMPONENT. Every page holding a Key Features still renders through it and can still be edited; no document is rewritten and NO MIGRATION RUNS.`,DeliveryOptions:`Lewis, 2026-10-10 (section-merges.md group 4, approved): one Cards section holds the five card grids \u2014 Cards, Key Features, Document Detail Cards, Recurring Columns and Delivery Options. Card content = Manual / Delivery options; the card's parts are Display chips; one Highlighted card row with its Highlight badge. Retired by card [MERGE] Delivery Options, Detail Cards And Recurring Columns Into Cards (M3, 2026-11-04).
|
|
16
|
+
|
|
17
|
+
WHAT REPLACES IT: Cards with Card content set to Delivery options, drawn from its card template: the backend's \`delivery-options\` rows (name, price, time, note), one card each, in the website's own currency. The one Highlighted card row and the Highlight badge replace the per-option Highlight switch.
|
|
18
|
+
|
|
19
|
+
WHAT A MERCHANT LOSES: more than one highlighted option (Lewis approved ONE Highlighted card row, 2026-10-10). No stored node held two.
|
|
20
|
+
|
|
21
|
+
NO CONVERTER ROW: 0 DeliveryOptions nodes on the US sites, draft or published (read only, 2026-11-04). This entry is its reason in the guard (\`scripts/test-section-to-box.tsx\` \xA75).
|
|
22
|
+
|
|
23
|
+
THE TYPE KEY STAYS AND SO DOES THE COMPONENT (efficient-storefront-blocks). A Delivery Options anywhere still renders through it and can still be edited; no document is rewritten.`,Series:`Lewis, 2026-10-10 (section-merges.md group 4, approved): one Cards section holds the five card grids \u2014 Cards, Key Features, Document Detail Cards, Recurring Columns and Delivery Options. Card content = Manual / Delivery options; the card's parts are Display chips; one Highlighted card row with its Highlight badge. Retired by card [MERGE] Delivery Options, Detail Cards And Recurring Columns Into Cards (M3, 2026-11-04).
|
|
24
|
+
|
|
25
|
+
WHAT REPLACES IT: Cards drawn from its card template. A column's number is Number, its "Right Top Text" Corner note, its title Card title, its words Card body, its count and label one Count, and the one \`viewLabel\` a plain Text typed once in the template, so every card shows it; the background is the Box's. The converter row (\`section-to-box-rows-cards.ts\`, OFF) lays down that Cards inside a Box.
|
|
26
|
+
|
|
27
|
+
WHAT A MERCHANT LOSES (the LOOK GAPS in that file): the grid takes the Cards block's own gaps and breakpoints; a short row no longer keeps 4 columns; the count is one plain Text, its figure no longer in the text ink; a card with no count still draws the footer line.
|
|
28
|
+
|
|
29
|
+
THE TYPE KEY STAYS AND SO DOES THE COMPONENT. Every page holding a Recurring Columns still renders through it and can still be edited; no document is rewritten.`,DocMetaCards:`Lewis, 2026-10-10 (section-merges.md group 4, approved): one Cards section holds the five card grids \u2014 Cards, Key Features, Document Detail Cards, Recurring Columns and Delivery Options. Card content = Manual / Delivery options; the card's parts are Display chips; one Highlighted card row with its Highlight badge. Retired by card [MERGE] Delivery Options, Detail Cards And Recurring Columns Into Cards (M3, 2026-11-04).
|
|
30
|
+
|
|
31
|
+
WHAT REPLACES IT: Cards drawn from its card template, each card a Label, a Value and a Card body. The converter row (\`section-to-box-rows-cards.ts\`, OFF) lays down that Cards inside a Box.
|
|
32
|
+
|
|
33
|
+
WHAT A MERCHANT LOSES (the LOOK GAPS in that file): the grid takes the Cards block's own gaps and breakpoints, not the old 40 (16 on a phone).
|
|
34
|
+
|
|
35
|
+
THE TYPE KEY STAYS AND SO DOES THE COMPONENT. Every page holding a Document Detail Cards still renders through it and can still be edited; no document is rewritten.`,SubscribeBlogs:"card 66396 \u2014 folded into `Subscribe`, which now chooses its rail's content with a `Type` control (the newsletter's own issues, or live blog posts). The two shared 21 of their fields and rendered THE SAME BYTES from equivalent rows, so offering both asked a merchant to choose between two names for one section. The type key stays because it is stored on published pages, and the component stays because those pages still render through it."},Ere=["Grid","Spacer"],Ore=Array.from(new Set([...nr.flatMap(e=>e.sections.map(o=>o.type)),...Object.keys(kD)])),_i=Object.fromEntries(nr.flatMap(e=>e.sections.map(o=>[o.type,o.label]))),TD={Heading:"general",Text:"general",Eyebrow:"general",ImageBlock:"general",LogoBlock:"general",LocationMap:"general",Contents:"general",ButtonBlock:"general",PostCard:"general",HeroSlide:"general",HeroGroup:"general",Integrations:"general",Grid:"general",KeyFeatures:"general",Spacer:"general",Series:"general",DocMetaCards:"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",ArticleBody:"service",ProductPrice:"commerce",ProductSize:"commerce",ProductColour:"commerce",EmailFormBlock:"service",SocialLogosBlock:"service",PaymentLogosBlock:"service",LegalLineBlock:"service",SiteHeader:"service",SiteFooter:"service"},Oi={...TD,...Object.fromEntries(nr.flatMap(e=>e.sections.map(o=>[o.type,o.set])))};function Hy(e){return Object.prototype.hasOwnProperty.call(Oi,e)?Oi[e]:void 0}function op(e){return Object.keys(Oi).filter(o=>Oi[o]===e).sort()}var _re=op("general"),Rre=op("commerce"),Are=op("service"),tp="Flex",Bt="Box",Fre=`${Bt}es`;function PD(e){return e==="section"?"Blank section":Bt}function rp(e,o,t){return e===tp?PD(o):t}var je="content",V="Flex",ED="Text & media",OD="Layout & structure",zy=[{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"}],_D=[...zy,{type:"Form",label:"Form"},{type:"PostCard",label:"Post Card"},{type:"Stats",label:"Stats"},{type:"MenuBlock",label:"Menu"},{type:"EmailFormBlock",label:"Email Form"},{type:"SocialLogosBlock",label:"Social Logos"},{type:"PaymentLogosBlock",label:"Payment Logos"},{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:ED})),RD=(nr.find(e=>e.key==="structure")?.sections??[]).map(e=>({type:e.type,label:e.label,group:OD})),Wy=[..._D,...RD],ap=[...zy,{type:"HeroGroup",label:Bt}],Dre=ap.map(e=>e.type),AD=1,FD=ap.filter(e=>e.type!=="HeroGroup");function LD(e){return e<AD?ap:FD}var BD={Flex:{slot:je,choices:()=>Wy},Grid:{slot:je,choices:()=>Wy},HeroGroup:{slot:je,choices:LD}};function Gy(e,o=0){let t=BD[e];return t?{slot:t.slot,choices:t.choices(o)}:null}import{applyMark as $re,markupTools as Ure,MARKUP_TOOLS as jre,COPY_FIELD_TOOLS as Kre,STOREFRONT_MARKUP as qre,tokenizeInline as Vre,stripInline as Yre,isSafeLinkHref as Yy}from"efficient-shell/markup";import{applyMark as VD,clearStyle as YD,markedAt as XD,markupTools as ZD,MARKUP_TOOLS as JD,parseMarkup as QD,RETIRED_MARKS as eN,STOREFRONT_MARKUP as oN,tokenizeInline as Zre}from"efficient-shell/markup";var Mr=["highlight","strong","quiet"],Hr={highlight:"Highlight",strong:"Bold",quiet:"Quiet"},bt={highlight:{kind:"wordHighlight",delimiter:"@@"},strong:{kind:"wordStrong",delimiter:"++"},quiet:{kind:"wordQuiet",delimiter:"^^"}},Ky=Object.fromEntries(Mr.map(e=>[bt[e].kind,e])),qy="data-sf-ws",DD=["accent","text","labels"],ls={accent:"var(--accent)",text:"var(--fg)",labels:"var(--fg-dim)"},ND=80,MD=120,HD=100,WD=900,zD=.5,GD=3,$D=-.1,UD=.5,jD=3,np={font:null,size:null,weight:null,bold:null,italic:null,lineGap:null,textGap:null,colour:null},KD={highlight:{...np},strong:{...np},quiet:{...np}};function $y(e,o,t){return typeof e!="number"||!Number.isFinite(e)?null:Math.round(Math.min(Math.max(e,o),t))}function Uy(e,o,t){if(typeof e!="number"||!Number.isFinite(e))return null;let r=10**jD;return Math.round(Math.min(Math.max(e,o),t)*r)/r}function jy(e){return typeof e=="boolean"?e:null}function qD(e){let o=typeof e?.font=="string"&&Zo.some(r=>r.key===e.font)?e.font:null,t=typeof e?.colour=="string"&&DD.includes(e.colour)?e.colour:null;return{font:o,size:$y(e?.size,ND,MD),weight:$y(e?.weight,HD,WD),bold:jy(e?.bold),italic:jy(e?.italic),lineGap:Uy(e?.lineGap,zD,GD),textGap:Uy(e?.textGap,$D,UD),colour:t}}function Vy(e){let o={};for(let t of Mr)o[t]=e&&t in e&&e[t]?qD(e[t]):{...KD[t]};return o}function Hre(e){let o=Vy(e),t={};for(let r of Mr){let a=o[r],n=`--sf-ws-${r}`;if(a.font){let s=Zo.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`]=ls[a.colour])}return t}function Wre(e){let o=e?.word_styles??void 0,t={};for(let r of Mr)o&&r in o&&(t[r]=o[r]??null);return Vy(t)}var tN=new Set(["strong"]),Xy=Mr.map(e=>({open:bt[e].delimiter,close:bt[e].delimiter,kind:bt[e].kind,...tN.has(e)?{wordStart:!0}:{}})),Qre=[{style:bt.highlight.kind,label:Hr.highlight,title:`${Hr.highlight} word style`},{style:bt.strong.kind,label:Hr.strong,title:`${Hr.strong} word style`},{style:bt.quiet.kind,label:Hr.quiet,title:`${Hr.quiet} word style`}],rN=new Set(Xy.map(e=>e.open)),Wr=[...oN.filter(e=>!rN.has(e.open)),...Xy];function sp(e){return e.bullet?"- ":e.number!=null?`${e.number}. `:""}function is(e){return QD(typeof e=="string"?e:"",Wr)}var aN=JD.map(e=>e.style).filter(e=>!eN.includes(e)).filter(e=>Wr.some(o=>o.kind===e));function Zy(){return ZD(aN)}var Jy=Object.fromEntries(Mr.map(e=>[bt[e].kind,bt[e].delimiter]));function Qy(e,o,t,r){let a=Jy[r];if(!a)return VD(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 c=n||"styled text";return{text:e.slice(0,o)+a+c+a+e.slice(t),selectionStart:o+a.length,selectionEnd:o+a.length+c.length}}function eS(e,o,t,r){let a=Jy[r];return a?o>=a.length&&e.slice(o-a.length,o)===a&&e.slice(t,t+a.length)===a:XD(e,o,t,r)}function Ri(e){return e.replace(/==(.+?)==/g,(o,t)=>t.startsWith("_")&&t.endsWith("_")?o:`==_${t}_==`)}function zr(e){return is(e).map(o=>sp(o)+tS(o.children)).join(`
|
|
36
|
+
`)}function oS(e,o,t){return YD(e,o,t,Wr)}function tS(e){return e.map(o=>o.kind==="text"?o.text:tS(o.children)).join("")}function to(e,o,t){return e.some(r=>(typeof r=="object"?r.value:r)===t)?t:o}var lp="small",ip="dot",nN=[{label:"Small",value:"small"},{label:"Display",value:"display"}],cp=[{label:"Dot \u25CF",value:"dot"},{label:"Cross \u2715",value:"cross"},{label:"Slash /",value:"slash"},{label:"Triangle \u25BC",value:"triangle"},{label:"None",value:"none"}],Ai={dot:"\u25CF",cross:"\u2715",slash:"/",triangle:"\u25BC",none:""},sN={small:"font-mono text-[length:var(--size-label,14px)] uppercase tracking-[0.25em] max-view-wide:text-[length:var(--size-label,12px)]",display:"font-display font-medium text-[length:var(--size-headingMedium,44px)] uppercase leading-none tracking-[0.005em] max-view-wide:text-[length:var(--size-headingMedium,28px)]"},lN={small:{dot:"",cross:"text-[0.77em]",slash:"text-[0.77em]",triangle:"",none:""},display:{dot:"text-[0.3em]",cross:"text-[0.64em]",slash:"text-[0.64em]",triangle:"text-[0.3em]",none:""}};function rae(e){return to(nN,lp,e)}function cs(e){return to(cp,ip,e)}function aae(e){return sN[e]}function rS(e,o){return lN[e][o]}var lae=[{value:"none"},{value:"dot"},{value:"cross"},{value:"slash"},{value:"triangle"}];function aS(e){return cp.some(o=>o.value===e)?cs(e):void 0}var iN="overflow-x-clip [&>*]:shrink-0 [&>*]:max-view-wide:basis-[content] [&>*_:is(p,h1,h2,h3,h4,h5,h6)]:max-w-none [&>*_:is(.sf-button-block>div)]:font-mono [&>*_:is(.sf-button-block>div)]:text-[length:var(--size-label,14px)] [&>*_:is(.sf-button-block>div)]:tracking-[0.2em] [&>*+*_:is(:is(p,h1,h2,h3,h4,h5,h6):first-child,.sf-button-block>div)]:before:inline-flex [&>*+*_:is(:is(p,h1,h2,h3,h4,h5,h6):first-child,.sf-button-block>div)]:before:items-center [&>*+*_:is(:is(p,h1,h2,h3,h4,h5,h6):first-child,.sf-button-block>div)]:before:align-top [&>*+*_:is(:is(p,h1,h2,h3,h4,h5,h6):first-child,.sf-button-block>div)]:before:h-[calc(1lh/var(--sf-sep-k,1))] [&>*+*_:is(:is(p,h1,h2,h3,h4,h5,h6):first-child,.sf-button-block>div)]:before:mr-[var(--sf-gap-len,0px)] [&>*+*_:is(:is(p,h1,h2,h3,h4,h5,h6):first-child,.sf-button-block>div)]:max-view-wide:before:mr-[var(--sf-gap-len-phone,calc(var(--sf-gap-len,0px)/2))] [&>*+*_:is(:is(p,h1,h2,h3,h4,h5,h6):first-child,.sf-button-block>div)]:before:text-accent [&>*+*_:is(:is(p,h1,h2,h3,h4,h5,h6):first-child,.sf-button-block>div)]:before:text-[length:calc(var(--sf-sep-k,1)*1em)] [&>*+*_:is(:is(p,h1,h2,h3,h4,h5,h6):first-child,.sf-button-block>div)]:before:content-[var(--sf-sep-mark)]";function Gr(e,o){return e==="row"&&aS(o)!==void 0}function iae(e,o){return Gr(e,o)?iN:""}var cN="[&>*:last-child_:is(:is(p,h1,h2,h3,h4,h5,h6):first-child,.sf-button-block>div)]:after:inline-flex [&>*:last-child_:is(:is(p,h1,h2,h3,h4,h5,h6):first-child,.sf-button-block>div)]:after:items-center [&>*:last-child_:is(:is(p,h1,h2,h3,h4,h5,h6):first-child,.sf-button-block>div)]:after:align-top [&>*:last-child_:is(:is(p,h1,h2,h3,h4,h5,h6):first-child,.sf-button-block>div)]:after:h-[calc(1lh/var(--sf-sep-k,1))] [&>*:last-child_:is(:is(p,h1,h2,h3,h4,h5,h6):first-child,.sf-button-block>div)]:after:ml-[var(--sf-gap-len,0px)] [&>*:last-child_:is(:is(p,h1,h2,h3,h4,h5,h6):first-child,.sf-button-block>div)]:max-view-wide:after:ml-[var(--sf-gap-len-phone,calc(var(--sf-gap-len,0px)/2))] [&>*:last-child_:is(:is(p,h1,h2,h3,h4,h5,h6):first-child,.sf-button-block>div)]:after:text-accent [&>*:last-child_:is(:is(p,h1,h2,h3,h4,h5,h6):first-child,.sf-button-block>div)]:after:text-[length:calc(var(--sf-sep-k,1)*1em)] [&>*:last-child_:is(:is(p,h1,h2,h3,h4,h5,h6):first-child,.sf-button-block>div)]:after:content-[var(--sf-sep-mark)]";function cae(e,o){return Gr(e,o)?cN:""}function dae(e,o){if(!Gr(e,o))return{};let t=aS(o),r=/^text-\[([\d.]+)em\]$/.exec(rS("small",t))?.[1],a=Ai[t];return{"--sf-sep-mark":a===""?"none":JSON.stringify(a),...r?{"--sf-sep-k":r}:{}}}import{AUTO_RULES as uN,FOLLOW_RULES as pN,isAuto as mN,resolveViewValue as hN}from"efficient-easel/screen/lib/content/view-tiers";import{VIEW_DESKTOP_MIN as dN,VIEW_TABLET_MIN as nS}from"efficient-easel/screen/lib/content/view-tiers";var dp="v1",fN=e=>e==="v2"?nS:800,Fi={"view-tablet":nS,"view-desktop":dN,"view-wide":fN(dp)};function pae(e){let o=e.startsWith("max-"),t=o?e.slice(4):e;if(t in Fi)return{px:Fi[t],max:o};let r=/^(max|min)-\[(\d+)px\]$/.exec(e);return r?{px:Number(r[2]),max:r[1]==="max"}:void 0}function $r(){return dp==="v2"?uN:pN}function Jo(e,o,t,r,a=$r()){let n=hN(e,o,t,r,a),s={},l=(c,d)=>!mN(c)||d!=null&&d!==o;return l(t,n.tablet)&&(s.tablet=n.tablet),l(r,n.phone)&&(s.phone=n.phone),s}var us={sectionPaddingTop:0,sectionPaddingBottom:0},ds={start:"justify-start",center:"justify-center",between:"justify-between",end:"justify-end"},fs={start:"items-start",center:"items-center",end:"items-end",stretch:"items-stretch"};function yae(e,o){let t=typeof e=="string"&&e in ds?ds[e]:"",r=typeof o=="string"&&o in fs?fs[o]:"";return[t,r].filter(Boolean).join(" ")}function xN(e){return e===!0||e==="wrap"?"flex-wrap":""}var IN={start:"view-tablet:max-view-desktop:justify-start!",center:"view-tablet:max-view-desktop:justify-center!",between:"view-tablet:max-view-desktop:justify-between!",end:"view-tablet:max-view-desktop:justify-end!"},gN={start:"max-view-tablet:justify-start",center:"max-view-tablet:justify-center",between:"max-view-tablet:justify-between",end:"max-view-tablet:justify-end"},bN={start:"view-tablet:max-view-desktop:items-start!",center:"view-tablet:max-view-desktop:items-center!",end:"view-tablet:max-view-desktop:items-end!",stretch:"view-tablet:max-view-desktop:items-stretch!"},yN={start:"max-view-tablet:items-start",center:"max-view-tablet:items-center",end:"max-view-tablet:items-end",stretch:"max-view-tablet:items-stretch"},SN={wrap:"view-tablet:max-view-desktop:flex-wrap!",nowrap:"view-tablet:max-view-desktop:flex-nowrap!"};function Kr(e,o){return typeof o=="string"&&Object.prototype.hasOwnProperty.call(e,o)?o:void 0}function fp(e,o,t){let r=Jo("same",e,o,t),a={};return r.tablet!==void 0&&r.tablet!==e&&(a.tablet=r.tablet),r.phone!==void 0&&r.phone!==e&&(a.phone=r.phone),a}function up(e,o,t){return[e.tablet?o[e.tablet]:"",e.phone?t[e.phone]:""].filter(Boolean).join(" ")}function wN(e,o,t){return fp(Kr(ds,e)??"start",Kr(ds,o),Kr(ds,t))}function Sae(e,o,t){return up(wN(e,o,t),IN,gN)}function wae(e,o,t){let r=Kr(fs,e)??"stretch";if(r==="stretch")return"";let a=fp(r,Kr(fs,o),Kr(fs,t));return up(a,bN,yN)}function CN(e){if(e===!0||e==="wrap")return"wrap";if(e===!1||e==="nowrap")return"nowrap"}function Cae(e,o){let t=xN(e)===""?"nowrap":"wrap",r=CN(o);return r&&r!==t?SN[r]:""}var qr="Block widths",cS=[{label:"Fit content",value:"content",weights:null},{label:"Equal",value:"equal",weights:[1,1]},{value:"bigLeft",weights:[2,1]},{value:"bigRight",weights:[1,2]},{value:"biggerLeft",weights:[3,1]},{value:"biggerRight",weights:[1,3]},{value:"twoThree",weights:[2,3]}],pp=[{label:"Fit content",value:"content",weights:null},{label:"Equal",value:"equal",weights:[1,1]},{label:"Custom",value:"custom",weights:[2,1]}];function mp(e){return Array.isArray(e)?"custom":e==="equal"?"equal":typeof e=="string"&&e in Bi?"custom":"content"}var dS=4,sS=10;function vN(e,o){if(!Number.isInteger(o)||o<2||o>dS||e.length!==o-1||!e.every(a=>typeof a=="number"&&Number.isFinite(a)))return;let t=[],r=0;return e.forEach((a,n)=>{let s=100-r-sS*(o-1-n),l=Math.min(s,Math.max(sS,Math.round(a)));t.push(l),r+=l}),t}function lS(e,o,t){if(!Array.isArray(o))return;let r=vN(o,t),a=r?[...r,100-r.reduce((s,l)=>s+l,0)]:[],n={};for(let s=0;s<dS;s+=1)n[`--${e}-${s+1}`]=a[s]??1;return n}function vae(e,o,t){let r=lS("sf-share",e,t),a=lS("sf-share-tablet",o,t);return r||a?{...r,...a}:void 0}function kN(e,o){let t=Array.from({length:o},()=>1),r=cS.find(s=>s.value===e);if(!r?.weights||o<1)return t;let[a,n]=r.weights;return a>1&&(t[0]=a),n>1&&(t[o-1]=n),t}function Li(e,o){if(typeof e!="string"||!(e in Bi)||e==="equal")return e;let t=kN(e,o),r=t.reduce((a,n)=>a+n,0);return t.slice(0,-1).map(a=>Math.round(a/r*100))}var Ur="[&>*]:min-w-0 [&>*]:flex-1 [&>*]:basis-0",Bi={equal:Ur,bigLeft:`${Ur} [&>*:first-child]:view-wide:grow-[2]`,bigRight:`${Ur} [&>*:last-child]:view-wide:grow-[2]`,biggerLeft:`${Ur} [&>*:first-child]:view-wide:grow-[3]`,biggerRight:`${Ur} [&>*:last-child]:view-wide:grow-[3]`,twoThree:`${Ur} [&>*:first-child]:view-wide:grow-[2] [&>*:last-child]:view-wide:grow-[3]`},TN=`${Ur} [&>*:nth-child(1)]:view-wide:grow-[var(--sf-share-1,1)] [&>*:nth-child(2)]:view-wide:grow-[var(--sf-share-2,1)] [&>*:nth-child(3)]:view-wide:grow-[var(--sf-share-3,1)] [&>*:nth-child(4)]:view-wide:grow-[var(--sf-share-4,1)]`;function PN(e){return Array.isArray(e)?TN:typeof e=="string"?Bi[e]??"":""}var kae={all:[{context:"parentType",is:"Flex"},{context:"parent.direction",is:"row"},{any:[{not:{context:"parent.align",set:!0}},{context:"parent.align",is:"stretch"}]},{not:{context:"parent.separator",set:!0}},{not:{context:"parent.loop",is:"scroll"}},{not:{context:"parent.line",is:!0}},{not:{context:"parent.bgImage",set:!0}},{any:[{context:"parent.columns",in:[2,3,4,5,6]},{all:[{not:{context:"parent.columns",is:1}},{context:"parent.share",in:Object.keys(Bi)}]}]}]},fS="view-tablet:max-view-desktop:flex-row!",jr=`${fS} [&>*:nth-child(n)]:view-tablet:max-view-desktop:min-w-0! [&>*:nth-child(n)]:view-tablet:max-view-desktop:grow! [&>*:nth-child(n)]:view-tablet:max-view-desktop:basis-0!`,uS={content:`${fS} [&>*:nth-child(n)]:view-tablet:max-view-desktop:grow-0! [&>*:nth-child(n)]:view-tablet:max-view-desktop:basis-[content]!`,equal:jr,bigLeft:`${jr} [&>*:first-child:nth-child(n)]:view-tablet:max-view-desktop:grow-[2]!`,bigRight:`${jr} [&>*:last-child:nth-child(n)]:view-tablet:max-view-desktop:grow-[2]!`,biggerLeft:`${jr} [&>*:first-child:nth-child(n)]:view-tablet:max-view-desktop:grow-[3]!`,biggerRight:`${jr} [&>*:last-child:nth-child(n)]:view-tablet:max-view-desktop:grow-[3]!`,twoThree:`${jr} [&>*:first-child:nth-child(n)]:view-tablet:max-view-desktop:grow-[2]! [&>*:last-child:nth-child(n)]:view-tablet:max-view-desktop:grow-[3]!`},EN=`${jr} [&>*:nth-child(1):nth-child(n)]:view-tablet:max-view-desktop:grow-[var(--sf-share-tablet-1,1)]! [&>*:nth-child(2):nth-child(n)]:view-tablet:max-view-desktop:grow-[var(--sf-share-tablet-2,1)]! [&>*:nth-child(3):nth-child(n)]:view-tablet:max-view-desktop:grow-[var(--sf-share-tablet-3,1)]! [&>*:nth-child(4):nth-child(n)]:view-tablet:max-view-desktop:grow-[var(--sf-share-tablet-4,1)]!`;function ON(e){return Array.isArray(e)||typeof e=="string"&&e in uS?e:null}function Tae(e){if(e.direction!=="row"||Gr(e.direction,e.separator)||e.loop==="scroll"||e.line===!0||IS(e.columns)!==""||gS(e.columnsTablet)!=="")return"";let o=ON(e.shareTablet);return o===null?"":typeof o=="string"?uS[o]:EN}var _N="[&>*]:view-wide:basis-[content]";function Pae(e){return PN(e)===""?_N:""}var hp="Columns",Di=1,pS=3,xp={2:"max-view-wide:flex-wrap [&>*]:max-view-wide:min-w-0 [&>*]:max-view-wide:basis-[calc((100%_-_var(--sf-gap-len-phone,var(--sf-gap-len,0px)))/2)]",3:"max-view-wide:flex-wrap [&>*]:max-view-wide:min-w-0 [&>*]:max-view-wide:basis-[calc((100%_-_var(--sf-gap-len-phone,var(--sf-gap-len,0px))_*_2)/3)]"},mS=cS.filter(e=>e.value==="content"||e.value==="equal"),hS="equal",Ip=1,xS=6,Va="view-wide:flex-wrap [&>*]:view-wide:min-w-0 [&>*]:view-wide:grow-0!",RN={1:`${Va} [&>*]:view-wide:basis-[calc(100%/1)]!`,2:`${Va} [&>*]:view-wide:basis-[calc((100%_-_var(--sf-gap-len,0px))/2)]!`,3:`${Va} [&>*]:view-wide:basis-[calc((100%_-_var(--sf-gap-len,0px)_*_2)/3)]!`,4:`${Va} [&>*]:view-wide:basis-[calc((100%_-_var(--sf-gap-len,0px)_*_3)/4)]!`,5:`${Va} [&>*]:view-wide:basis-[calc((100%_-_var(--sf-gap-len,0px)_*_4)/5)]!`,6:`${Va} [&>*]:view-wide:basis-[calc((100%_-_var(--sf-gap-len,0px)_*_5)/6)]!`};function IS(e){return typeof e=="number"?RN[e]??"":""}var AN={1:"view-tablet:max-view-desktop:flex-row! view-tablet:max-view-desktop:flex-wrap! [&>*:nth-child(n)]:view-tablet:max-view-desktop:min-w-0! [&>*:nth-child(n)]:view-tablet:max-view-desktop:grow-0! [&>*:nth-child(n)]:view-tablet:max-view-desktop:basis-[calc(100%/1)]!",2:"view-tablet:max-view-desktop:flex-row! view-tablet:max-view-desktop:flex-wrap! [&>*:nth-child(n)]:view-tablet:max-view-desktop:min-w-0! [&>*:nth-child(n)]:view-tablet:max-view-desktop:grow-0! [&>*:nth-child(n)]:view-tablet:max-view-desktop:basis-[calc((100%_-_var(--sf-gap-len-tablet,var(--sf-gap-len,0px)))/2)]!",3:"view-tablet:max-view-desktop:flex-row! view-tablet:max-view-desktop:flex-wrap! [&>*:nth-child(n)]:view-tablet:max-view-desktop:min-w-0! [&>*:nth-child(n)]:view-tablet:max-view-desktop:grow-0! [&>*:nth-child(n)]:view-tablet:max-view-desktop:basis-[calc((100%_-_var(--sf-gap-len-tablet,var(--sf-gap-len,0px))_*_2)/3)]!",4:"view-tablet:max-view-desktop:flex-row! view-tablet:max-view-desktop:flex-wrap! [&>*:nth-child(n)]:view-tablet:max-view-desktop:min-w-0! [&>*:nth-child(n)]:view-tablet:max-view-desktop:grow-0! [&>*:nth-child(n)]:view-tablet:max-view-desktop:basis-[calc((100%_-_var(--sf-gap-len-tablet,var(--sf-gap-len,0px))_*_3)/4)]!",5:"view-tablet:max-view-desktop:flex-row! view-tablet:max-view-desktop:flex-wrap! [&>*:nth-child(n)]:view-tablet:max-view-desktop:min-w-0! [&>*:nth-child(n)]:view-tablet:max-view-desktop:grow-0! [&>*:nth-child(n)]:view-tablet:max-view-desktop:basis-[calc((100%_-_var(--sf-gap-len-tablet,var(--sf-gap-len,0px))_*_4)/5)]!",6:"view-tablet:max-view-desktop:flex-row! view-tablet:max-view-desktop:flex-wrap! [&>*:nth-child(n)]:view-tablet:max-view-desktop:min-w-0! [&>*:nth-child(n)]:view-tablet:max-view-desktop:grow-0! [&>*:nth-child(n)]:view-tablet:max-view-desktop:basis-[calc((100%_-_var(--sf-gap-len-tablet,var(--sf-gap-len,0px))_*_5)/6)]!"};function gS(e){return typeof e=="number"?AN[e]??"":""}function Eae(e){return e.direction!=="row"||Gr(e.direction,e.separator)||e.loop==="scroll"||e.line===!0?"":gS(e.columnsTablet)}function Oae(e){return e.direction!=="row"||Gr(e.direction,e.separator)||e.loop==="scroll"||e.line===!0?"":IS(e.columns)}var FN="max-view-wide:flex-wrap [&>*]:max-view-wide:min-w-0 [&>*]:max-view-wide:grow-0 [&>*]:max-view-wide:basis-[content]",LN={2:"max-view-wide:flex-nowrap [&>*]:max-view-wide:min-w-0 [&>*]:max-view-wide:basis-[calc((100%_-_var(--sf-gap-len-phone,var(--sf-gap-len,0px)))/2)]",3:"max-view-wide:flex-nowrap [&>*]:max-view-wide:min-w-0 [&>*]:max-view-wide:basis-[calc((100%_-_var(--sf-gap-len-phone,var(--sf-gap-len,0px))_*_2)/3)]"},BN="max-view-wide:flex-nowrap [&>*]:max-view-wide:grow-0 [&>*]:max-view-wide:basis-[content]";function DN(e){return e===!1||e==="nowrap"}function _ae(e,o,t){let r=xp[Number(e)];if(!r)return"max-view-wide:flex-col";let a=DN(t);return bS(e,o)?a?BN:FN:a?LN[Number(e)]:r}function Rae(e,o){return Number(e)in xp&&!bS(e,o)}function bS(e,o){return Number(e)in xp&&o==="content"}var yS="Block spacing",gp=[{label:"Each block",value:"each"},{label:"Gap only",value:"gap"}],NN="sf-box-gap-only";function Aae(e){return e==="gap"?NN:""}var iS={each:"sf-box-each-tablet",gap:"sf-box-gap-only-tablet"},MN={each:"sf-box-each-phone",gap:"sf-box-gap-only-phone"};function Fae(e,o,t){let r=n=>Kr(iS,n),a=fp(e==="gap"?"gap":"each",r(o),r(t));return up(a,iS,MN)}var SS={label:"Text",defaultProps:{text:"",align:"left",tone:"default",tag:"p",contained:!0}};var{text:Mae,tag:Hae,...HN}=SS.defaultProps,K=HN,de={...K,tone:"dim"},Ni={justify:"start",align:"stretch",wrap:!1,blockSpacing:"gap",padV2:!0},D={...Ni,direction:"column",...us},Ho=(e,o=e,t=e,r=o)=>({sectionPaddingTop:e,sectionPaddingRight:o,sectionPaddingBottom:e,sectionPaddingLeft:o,sectionPaddingTopPhone:t,sectionPaddingRightPhone:r,sectionPaddingBottomPhone:t,sectionPaddingLeftPhone:r}),G=(e,o,t,r)=>({sizeToken:{step:e,px:o,...r?{stepPhone:r}:{},...t?{pxPhone:t}:{}}});function ps(e,o,t=""){return e.map((r,a)=>{let n=t?`${t}.${a}`:String(a),s={...r.props??{}};for(let[l,c]of Object.entries(r.slots??{}))s[l]=ps(c,o,n);return{type:r.type,props:{...s,id:o(r.type,n)}}})}var Wo=()=>({tag:"h2",_partStyles:{text:{textStyle:"heading-2"}}}),Io=()=>({_partStyles:{text:{textStyle:"body-5",color:"accent",letterSpacing:.3,case:"upper",lineHeight:1.5}}});var bp={...D,gap:12,gapPhone:12,...Ho(32,32,28,28)},yp={textStyle:"heading-3",...G("headingSmall",20),weight:500,case:"upper",lineHeight:1.5,letterSpacing:.02},Sp={textStyle:"body-1",...G("body",15),lineHeight:1.6},Qo=(e,o,t,r=!1)=>({type:"Text",props:{...o,text:"",[yt]:e,_partStyles:{text:{...r?Io()._partStyles?.text??{}:{},...t}}}}),ms={title:"title",body:"body"},Mi={title:"name",body:"note"},WN=(e=ms)=>({type:V,props:{...bp,name:"Card"},slots:{[je]:[Qo(e.title,{...K,tag:"p",widthFit:"fill"},yp),Qo(e.body,{...de,tag:"p",widthFit:"fill"},Sp)]}}),Hi=(e,o)=>ps([WN(o)],e);function wS(e,o){if(e!=="Cards")return o;if(o.template!==void 0)return GN(o);let t=oe(o.id)??"Cards",r=So(o)?Mi:ms;return{...o,template:Hi((a,n)=>n==="0"?`${t}~card`:`${t}~card.${n.slice(2)}`,r)}}var zN=e=>{let[o,t]=e?[ms,Mi]:[Mi,ms];return new Map([[o.title,t.title],[o.body,t.body]])};function CS(e,o){let t=null;return e.forEach((r,a)=>{let n=r?.props;if(!n)return;let s=n,l=n[yt];r.type==="Text"&&typeof l=="string"&&o.has(l)&&(s={...s,[yt]:o.get(l)});let c=n[je];if(Array.isArray(c)){let d=CS(c,o);d!==c&&(s={...s,[je]:d})}s!==n&&(t??=[...e],t[a]={...r,props:s})}),t??e}function GN(e){if(!Array.isArray(e.template))return e;let o=CS(e.template,zN(!!So(e)));return o===e.template?e:{...e,template:o}}var Wi="template",vS="Card template",UN=["Text","ImageBlock","ButtonBlock","Flex"],yt="rowField",jN="rowLinkField";function kS(){return{type:"slot",allow:[...UN]}}var KN=[{block:"OrderSummary",typedRows:"rows",fields:[{key:"label",label:"Item"},{key:"meta",label:"Meta line"},{key:"amount",label:"Amount"}]},{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}],seed:e=>wS("Cards",e)}];function St(){return ar("efficient.card-templates",()=>new Map(KN.map(e=>[e.block,e])))}function sne(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 a of o.blocks??[]){if(typeof a?.type!="string"||!a.type)throw new Error(`The card template of ${o.block} names an empty block.`);t.some(n=>n.type===a.type)||t.push({type:a.type,label:a.label||a.type})}let r=oe(o.typedRows);St().set(o.block,{block:o.block,fields:o.fields.map(a=>({...a})),blocks:t,typedRows:r,...o.seed?{seed:o.seed}:{}})}}function qN(e,o){let t=e?St().get(e)?.seed:void 0;return t?t(o):o}function TS(e,o){if(!(o.template===void 0||Array.isArray(o.template)&&o.template.length===0))return o;let{template:t,...r}=o,a=qN(e,r);return a===r?o:a}function PS(){for(let e of St().values())if(e.blocks?.length)return!0;return!1}function ES(e){return St().get(e)?.blocks??[]}function lne(e){for(let o of St().values())if(o.blocks?.some(t=>t.type===e))return!0;return!1}function OS(e){return typeof e=="string"&&St().get(e)?.typedRows||""}function wp(e){return typeof e=="string"&&St().has(e)}function ine(e,o){let t=St().get(e)?.fields??[];return o?t.filter(r=>(r.kind??"text")===o):t}function VN(e,o){let t=typeof e?.type=="string"?e.type:"";if(!t)return[];let r=St().get(t)?.fields??[],a=ep(So(e?.props))?.fields,n=a?.length?[...a.map(s=>({...s})),...r.filter(s=>s.everySource&&!a.some(l=>l.key===s.key))]:r;return o?n.filter(s=>(s.kind??"text")===o):n}function Cp(e,o,t){return e?t?VN(t).find(r=>r.key===o)??null:St().get(e)?.fields.find(r=>r.key===o)??null:null}function sr(e,o=yt){let t=e?.[o];return typeof t=="string"?t.trim():""}function cne(e,o){return e.key||String(o+1)}function dne(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}function fne(e,o,t=""){let r=o&&e&&typeof e=="object"?e[o]:void 0;if(!Array.isArray(r))return"";for(let a of r){let n=typeof a=="string"?a:a?.src,s=oe(typeof n=="string"?n.trim():void 0);if(s&&s!==t.trim())return s}return""}var _S={Text:{text:yt},ImageBlock:{src:yt},ButtonBlock:{label:yt,href:jN},Breadcrumb:{currentCrumb:yt}};function RS(e,o,t){return vp(e,o,t)!==""}function vp(e,o,t){let r=_S[e]?.[t];return r?sr(o,r):""}function YN(e,o){return!o||!e?null:e[o]??""}function une(e,o,t,r){if(!t)return o;let a=null;for(let[n,s]of Object.entries(_S[e]??{})){let l=sr(o,s),c=YN(t,l);c!==null&&(a??={...o},a[n]=r&&Cp(r,l)?.mark==="accentItalic"?Ri(c):c)}return a??o}function kp(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[c,d]of Object.entries(l?.props??{})){if(!$N(d))continue;let f=c===Wi&&wp(l.type)?{owner:l,direct:!0,nested:s!==null,underBox:!1}:s&&{owner:s.owner,direct:!1,nested:s.nested,underBox:s.underBox||l.type===V},m=r(d,f);if(m!==void 0)return m}}},a=r(t,null);return a===void 0?null:a}function zi(e,o){let t=kp(e,o);return t&&t.owner}function pne(e,o){let t=kp(e,o);return t&&(t.direct?t.owner:null)}function mne(e,o){let t=kp(e,o);if(t!==void 0)return t===null?{inCopy:!1,nestedCopy:!1,underBox:!1}:{inCopy:!0,nestedCopy:t.nested,underBox:t.underBox}}import{useSyncExternalStore as qz}from"react";import{isNodeList as Gi}from"efficient-easel/data";var AS="Flex";function hs(e){if(sr(e))return"";let o=e?.[Nr];return typeof o=="string"?o.trim():""}var XN=new Intl.NumberFormat("en-US");function ZN(e){return/^\d+$/.test(e)?XN.format(Number(e)):e}function bne(e,o){let t=o?o.find(r=>r.key===e)?.value:Dy(ns).find(r=>r.key===e)?.value;return t===void 0?null:ZN(t)}function Tp(e){let o=e.props;if(!o)return{node:e,names:!1};let t=e.type==="Text"&&hs(o)!=="",r=o;for(let[n,s]of Object.entries(o)){if(!Gi(s))continue;let l=s.map(Tp);l.some(c=>c.names)&&(t=!0),l.some((c,d)=>c.node!==s[d])&&(r={...r,[n]:l.map(c=>c.node)})}if(e.type!==AS)return{node:r===o?e:{...e,props:r},names:t};let a=So(r);if(t&&!a&&(r={...r,[Ei]:ns}),!t&&a===ns){let{[Ei]:n,...s}=r;r=s}return{node:r===o?e:{...e,props:r},names:!1}}function FS(e,o,t){for(let r of e){if(r?.props?.id===o)return t;for(let a of Object.values(r?.props??{})){if(!Gi(a))continue;let n=FS(a,o,r.type===AS?r:t);if(n!==void 0)return n}}}function yne(e,o){if(!Gi(e))return!0;let t=FS(e,o,null);if(t===void 0)return!0;if(t===null)return!1;let r=So(t.props);return!r||r===ns}function LS(e){let o=e?.content;if(!Gi(o))return e;let t=o.map(Tp);return t.every((r,a)=>r.node===o[a])?e:{...e,content:t.map(r=>r.node)}}function BS(e){return Tp(e).node}import{jsx as S,jsxs as Ir,Fragment as Ut}from"react/jsx-runtime";import{cloneElement as nk,createContext as f6,useContext as u6,useEffect as p6,useId as sk,useRef as Ws,useState as zs}from"react";import{useEasel as fh,useSelectedHost as dn}from"efficient-easel/easel";import{toDateKey as fpe,fromDateKey as upe}from"efficient-shell/format";function JN(e){return!!e&&typeof e=="object"&&!Array.isArray(e)&&typeof e.src=="string"}function lr(e){return typeof e=="string"?e:JN(e)?e.src:""}function wne(e,o,t){return Pp(e,o.split("."),t)}function Pp(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 c=l[s];if(n){if(!Array.isArray(c))return e;let f=!1,m=c.map(u=>{let x=Pp(u,a,t);return x!==u&&(f=!0),x});return f?{...l,[s]:m}:e}let d=Pp(c,a,t);return d===c?e:{...l,[s]:d}}var QN=["upload","youtube"],e2="upload",kne={upload:"Upload",youtube:"YouTube"},o2=["background","click"],t2="background",Tne={background:"Background",click:"Click to play"};function NS(e){return QN.includes(e)?e:e2}function MS(e){return o2.includes(e)?e:t2}var DS=/^[A-Za-z0-9_-]{11}$/,r2=/^(?:www\.|m\.|music\.)?(?:youtube\.com|youtube-nocookie\.com|youtu\.be)$/;function HS(e){let o=typeof e=="string"?e.trim():"";if(!o)return null;if(DS.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:"||!r2.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&&DS.test(a)?a:null}function Ep(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 WS(e){return`https://i.ytimg.com/vi/${e}/maxresdefault.jpg`}function zS(e){return`https://i.ytimg.com/vi/${e}/hqdefault.jpg`}var Op="Play video";var _p={frame:"Video frame",image:"Image"},Pne={any:[{field:"loadingShows",is:"image"},{all:[{not:{field:"loadingShows",set:!0}},{field:"poster",set:!0}]}]};function Rp(e){let o=e.loadingShows;return o==="image"?"image":o!=null&&o!==""?"frame":lr(e.poster)?"image":"frame"}function Ene(e){return lr(Rp(e)==="image"?e.poster:e.videoFrame)||void 0}import{readHidable as br,hidableText as m6}from"efficient-easel/draw";import{FOLD_FIELD_MARKER as lk,LINK_FIELD_MARKER as h6,MEDIA_FIELD_MARKER as x6,SCAFFOLD_FIELD_MARKER as I6,TEXT_FIELD_MARKER as Gt,foldMetaOf as jt,textFieldIdentifier as gpe}from"efficient-easel/draw";import{jsx as VS}from"react/jsx-runtime";import{useCallback as l2}from"react";import{useEasel as i2}from"efficient-easel/easel";import{SettingsAction as c2}from"efficient-easel/panel";import{CORNER_SIDES as $i,hasCornerSubset as xs,normalizeCornerSides as wt}from"efficient-easel/screen/lib/content/style-keys";function Ap(e){return typeof e=="number"&&Number.isFinite(e)}function Ane(e,o){if(!Ap(e))return;let t=vi(gt(e));if(Object.keys(t).length===0)return;let r=t[Fp];if(typeof r!="string")return t;let a=xs(o)?Vr(r,wt(o)??[]):r;return{...t,[a2]:a}}var a2="--sf-section-radius",Fp="--sf-card-radius";function Vr(e,o){return $i.map(t=>o.includes(t)?e:"0").join(" ")}var GS=[{value:"tl",label:"Top left"},{value:"tr",label:"Top right"},{value:"bl",label:"Bottom left"},{value:"br",label:"Bottom right"}];var n2="--sf-card-box-radius";function Lp(e){return typeof e=="number"&&Number.isFinite(e)}function Dne(e,o){if(!Lp(e))return;let t=vi(gt(e))[Fp];if(typeof t!="string")return;let r=xs(o)?Vr(t,wt(o)??[]):t;return{[n2]:r}}function $S(e,o){let t=e.find(n=>n?.props?.id===o);if(!t)return[...e];let r=t.props?.cardCorners,a=t.props?.cardCornerSides;return e.map(n=>n?.props?.id===o?n:{...n,props:{...n.props,cardCorners:r,cardCornerSides:a}})}import{locateNode as s2}from"efficient-easel/draw";function Is(e){if(!e)return null;let o=e.lastIndexOf(":");return o>0?{ownerId:e.slice(0,o),slot:e.slice(o+1)}:null}function Ui(e,o,t){let r=Is(t?.zone),a=r?s2(e,o,r.ownerId):null;return a&&r?{...a,slot:r.slot}:null}function US(e,o,t){let r=Ui(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,c=l?.props?.id?String(l.props.id):"",d=Math.max(n.length-1,0);return!r||!c?{can:!1,reason:"unreachable",others:0}:n.length<=1?{can:!1,reason:"alone",others:d}:Lp(l?.props?.cardCorners)?{can:!0,others:d,zone:r.zone,index:r.index,data:{...r.item,props:{...r.item.props,[a]:$S(n,c)}}}:{can:!1,reason:"unset",others:d}}function jS(e){return e.can?xo("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 KS(e){return xo("Applied to {n} card","Applied to {n} cards",e)}function qS(e,o){e.can&&o(e.zone,e.index,e.data)}import{useSectionOps as d2}from"efficient-easel/screen/lib/document/use-section-ops";var f2="apply-corners-to-siblings",u2="Apply to all cards";function p2({plan:e,onPress:o}){return VS(c2,{id:f2,label:i(u2),note:jS(e),disabled:!e.can,doneLabel:KS(e.others),onPress:o})}function YS(){let{appState:e,config:o}=i2(n=>n),t=d2(),r=US(o,e.data.content??[],e.ui.itemSelector),a=l2(()=>{qS(r,t.replaceComponent)},[r,t]);return VS(p2,{plan:r,onPress:a})}import{isShown as nw,lazyShowWhenContext as O2}from"efficient-shell/format";var ir="product",ji="recordType",XS={key:ir,label:"Product",fields:[]},m2=/^[a-z][a-z0-9]*(-[a-z0-9]+)*$/,h2=/^[a-z][A-Za-z0-9]*$/,x2=["text","date","images"],Bp=new Map,ZS=0;function I2(e){if(typeof e.key!="string"||!m2.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===ir)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"||!h2.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(!x2.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 Jne(e){let o=e.map(I2);for(let t of o)Bp.set(t.key,t);o.length&&(ZS+=1)}function Dp(){return[XS,...Bp.values()]}function g2(e){return e===ir?XS:Bp.get(e)??null}function Np(){return ZS}function gs(e){let o=e?.[ji];return typeof o!="string"?ir:o.trim()||ir}function Mp(e){return gs(e)===ir}function Qne(e,o){let t=g2(e)?.fields??[];return o?t.filter(r=>o.includes(r.kind)):t}var Ki="product",JS="tyre",b2=[Ki,JS];function tse(e){return b2.includes(e)}var y2="productType",S2={[Ki]:"alloy-wheel",[JS]:"tyre"},w2=["alloy-wheel","tyre"];function QS(e,o){return Mp(o)?ew(o)??S2[e]??null:null}function ew(e){if(!Mp(e))return null;let o=e?.[y2];return typeof o=="string"&&w2.includes(o)?o:null}function rse(e){let o=e?.root;return ew(o?.props)}var Hp="Main Pages",C2="Dynamic Pages",Wp="dynamic",v2="dynamic";function Yr(e){return e.kind===v2}var zp="lightbox";function ow(e){return e.kind===zp}function tw(e){let o=[],t=[];for(let r of e){if(Yr(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??Hp,rows:[r]})}if(t.length){let r=o.findIndex(a=>a.key.startsWith("system:"));o.splice(r===-1?o.length:r,0,{key:Wp,label:C2,rows:t})}return o}var qi=null,rw=null;function k2(e,o){qi=e,rw=o}function cse(e){k2(e,null)}function dse(){return qi}function bs(){return Yr({kind:rw})||qi===Ki}function fse(e){return QS(qi??"",e)??"alloy-wheel"}function use(e){return bs()?gs(e):null}import{addShowWhenFacts as T2}from"efficient-shell/format";import{showWhenOf as Gp,shownForOption as P2,truthy as $p,withRowRules as Up,withRowsShownWhen as ys,withShowWhen as Xe}from"efficient-shell/format";var xse=T2;function E2(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]))}function jp(e,o,t){let r=!1,a={};for(let[n,s]of Object.entries(e)){if(!nw(Gp(s),o??{},t)){r=!0;continue}let l=_2(s,o?.[n],o??{},t);l!==s&&(r=!0),a[n]=l}return r?a:e}function _2(e,o,t,r){let a=e?.options;if(!Array.isArray(a))return e;let n=a.filter(s=>s?.value===o||!s?.showWhen||nw(s.showWhen,t,r));return n.length===a.length?e:{...e,options:n}}function sw(e,o,t,r){let a=Ui(o,t,r);return{device:e,parentType:a?.item.type,parent:a?.item.props}}function aw(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 aw(t.not,o);for(let r of[t.all,t.any])if(Array.isArray(r)&&r.some(a=>aw(a,o)))return!0;return!1}function Cse(e,o={}){return O2({parentType:()=>e.parent?.type??void 0,parent:()=>e.parent?.props??void 0,dynamicPage:()=>bs(),root:()=>e.appState?.data?.root?.props,...o})}var lw=1;function R2(e){return gt(e)}function Tse(e){let o=R2(e);return o===null?{}:{"--sf-card-image-radius":`${o}px`}}var iw=1,cw="Corners";function A2(e){return gt(e)}function _se(e,o){let t=A2(e);if(t===null)return null;let r=`${t}px`;return{borderRadius:xs(o)?Vr(r,wt(o)??[]):r}}var Dt={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]]}},Kp=Object.keys(Dt),fw=[2,3,4,6];function qp(e,o){return Kp.filter(t=>t===o||e===null||Dt[t].across===e)}function uw(e){return typeof e!="string"||e===""?null:Dt[e]??null}function dw(e,o){return o?6/e.acrossPhone:12/e.across}function pw(e){return[...e.lead??[],...e.desktop]}var F2="sf-wall--";function L2(e){return`${F2}${e}`}function Ase(e){let o=Dt[e],t=`.${L2(e)}`,r=[],a=(n,s,l=[])=>{let c=[],d=n.length,f=l.length;l.forEach(([m,u],x)=>{c.push(`${t} > :nth-child(${x+1}){grid-column:span ${m};grid-row:span ${u}}`)}),n.forEach(([m,u],x)=>{c.push(`${t} > :nth-child(${d}n+${f+x+1}){grid-column:span ${m};grid-row:span ${u}}`)});for(let m=1;m<d;m+=1)c.push(`${t}:has(> :nth-child(${d}n+${f+m}):last-child) > :nth-last-child(-n+${m}){grid-column:span ${s};grid-row:span 1}`);return c};return r.push(`${t}{grid-template-columns:repeat(12,minmax(0,1fr))}`),r.push(...a(o.desktop,dw(o,!1),o.lead)),r.push("@media (max-width:800px){"),r.push(`${t}{grid-template-columns:repeat(6,minmax(0,1fr))}`),r.push(...a(o.phone,dw(o,!0),o.leadPhone)),r.push("}"),r.join("")}var Vi=12,mw=1,B2=3;var D2=3;function Vp(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 N2(e){return Vp(e,1,Vi)??D2}function Bse(e,o){return Vp(e,mw,B2)??(N2(o)===4?2:mw)}function Dse(e){return e==null||e===""?null:Vp(e,1,Vi)}var Nse="data-sf-span";function Mse(e){if(!e)return!1;if(e.type==="Grid")return!0;if(e.type==="GalleryB"){if(uw(e.props?.layout))return!1;let o=e.props?.columns;return o!=null&&o!==""}return!1}import{jsx as M2}from"react/jsx-runtime";import*as H2 from"efficient-easel/icons";function Yi(e){let o=e.replace(/(^|-)([a-z])/g,(r,a,n)=>n.toUpperCase()),t=H2[`${o}Icon`];return t?M2(t,{size:16}):null}import{isNodeList as W2}from"efficient-easel/data";var Ya=["top-left","top-center","top-right","left","center","right","bottom-left","bottom-center","bottom-right"],xw="bottom-left",Xa=4,z2=Xa+1,hw=40,G2=30,$2=100,U2=60,$se=100;var Yp={"top-left":"Top left","top-center":"Top center","top-right":"Top right",left:"Left",center:"Center",right:"Right","bottom-left":"Bottom left","bottom-center":"Bottom center","bottom-right":"Bottom right"};function j2(e){let o=Ya.indexOf(Ss(e));return{band:Math.floor(o/3),column:["start","center","end"][o%3]}}function K2(e){return 1+j2(e).band*(z2+1)}function Use(e){return K2(e)+1}function Ss(e){return Ya.includes(e)?e:xw}function jse(e){let o=typeof e=="number"&&Number.isFinite(e)?e:0;return Math.max(-hw,Math.min(hw,Math.round(o)))}function Kse(e,o=U2){let t=typeof e=="number"&&Number.isFinite(e)?e:o;return Math.max(G2,Math.min($2,Math.round(t)))}function Xp(e,o){let t=Ss(o);return e.filter(r=>Ss(r?.props?.placement)===t).length}function Iw(e){return`${Yp[Ss(e)]} already holds ${Xa} boxes. Move one somewhere else first.`}function gw(e,o){let t=e.filter(r=>r?.props?.id!==o);return Ya.map(r=>{let a=Xp(t,r)>=Xa,n=Yp[r];return a?{value:r,label:n,disabled:!0,title:Iw(r)}:{value:r,label:n}})}function Xi(e,o){let t=o===void 0?xw:Ss(o?.props?.placement);return Xp(e,t)>=Xa?Iw(t):null}var Zi="HeroGroup";function q2(e){return Ya.map(o=>{let t=Xp(e,o);return{anchor:o,total:t,hidden:t-Xa}}).filter(o=>o.hidden>0)}function Zp(e){let o=q2(e);return o.length===0?null:o.map(({anchor:t,total:r,hidden:a})=>{let n=Yp[t],s=a===1?"1 is not shown":`${a} are not shown`;return`${n} holds ${r} boxes. The published page draws the first ${Xa}, so ${s}. ${a===1?"Move it":"Move them"} somewhere else.`}).join(" ")}function bw(e,o){let t=o;if(t?.type!==Zi)return null;let r=t.props?.id===void 0?"":String(t.props.id);return r?Xi(Jp(e,r),t):null}function Jp(e,o){let t=Sw(e,o);return t&&t.ownerType===Y2?t.siblings:[]}function yw(e,o){let t=Sw(e,o);return t?t.ancestorTypes.filter(r=>r===Zi).length:V2}var V2=1,Y2="HeroSlide";function Sw(e,o){let t=(r,a,n)=>{if(a>12||!r||typeof r!="object")return null;if(W2(r)){if(r.some(s=>s?.props?.id===o))return{siblings:r,ownerType:n.at(-1)??null,ancestorTypes:n};for(let s of r){let l=s.type,c=t(s,a+1,[...n,String(l)]);if(c)return c}return null}for(let s of Object.values(r)){let l=t(s,a+1,n);if(l)return l}return null};return t(e,0,[])}import{jsx as X2}from"react/jsx-runtime";var Qp="sf-hint-keep";function ww({children:e}){return X2("span",{className:Qp,children:e})}import{jsx as cr,Fragment as Q2,jsxs as Rw}from"react/jsx-runtime";import{useContext as eM,useEffect as oM,useId as tM,useState as Aw}from"react";import{SettingsField as rM,SettingsSwitch as aM}from"efficient-easel/panel";import{AnchorIcon as nM}from"efficient-easel/icons";import{ScreenDocumentContext as sM}from"efficient-easel/screen/components/ScreenDocumentContext";import{Snippet as lM}from"efficient-shell/ui";import{slugify as iM}from"efficient-shell/format";import{slugify as Z2}from"efficient-shell/format";function ws(e){return typeof e=="string"?e.trim():e&&typeof e=="object"&&typeof e.text=="string"?e.text.trim():""}var Cw=e=>Z2(ws(e));var Ji="homepage";import{slugify as J2}from"efficient-shell/format";var vw=[{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 kw(e){return e.offersCommerce&&e.offersService?vw:vw.filter(o=>!o.needs||(o.needs==="commerce"?e.offersCommerce:e.offersService))}var em="#popup:";function Tw(e){return`${em}${e}`}function Pw(e){return e.startsWith(em)&&e.slice(em.length).trim()||null}function Cs(e){return e===Ji?"/":`/${e}`}function Ew(e){return`/journal/${e}`}function tle(e){return`/wheels/${e}`}function Qi(e,o){return`${Cs(e)}#${o}`}function Ow(...e){let o=new Set,t=[];for(let r of e)for(let a of r?.content??[]){let n=ws(a?.props?.anchor);if(!n)continue;let s=J2(n);!s||o.has(s)||(o.add(s),t.push({slug:s,name:n}))}return t}function rle(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 _w(e){return/^\/wheels\/[^/?#]+(?:[?#].*)?$/.test(e)}import{readHidable as cM}from"efficient-easel/draw";function Fw({value:e,onChange:o,nameBox:t}){let r=cM(e).text,[a,n]=Aw(!1),s=a||r.trim()!=="",l=tM();return Rw(Q2,{children:[cr(rM,{label:i("Add an anchor"),labelId:l,icon:cr(nM,{}),action:cr(aM,{checked:s,ariaLabelledBy:l,onChange:c=>{n(c),!c&&r!==""&&o("")}})}),s&&t(e,o),s&&cr(dM,{name:r})]})}function dM({name:e}){let o=eM(sM),t=o?.templateId?"":o?.currentSlug??"",[r,a]=Aw("");oM(()=>a(qa()||window.location.origin),[]);let n=iM(e);if(!n||!t)return null;let s=`${r}${Qi(t,n)}`,l=s.replace(/^https?:\/\//,""),c=l.lastIndexOf("#");return cr("div",{className:"sf-anchor-link",children:cr(lM,{value:s,label:i("link"),size:"sm",children:Rw("span",{className:"sf-anchor-link-text",children:[cr("span",{className:"sf-anchor-link-path",children:l.slice(0,c)}),cr("span",{className:"sf-anchor-link-hash",children:l.slice(c)})]})})})}import{AdjustIcon as g6,EyeIcon as b6,AnimationIcon as y6,BackgroundIcon as S6,BorderAllIcon as w6,BlockSectionIcon as C6,ColumnWidthsIcon as uh,ColumnsIcon as ik,CornerIcon as v6,DirectionDownIcon as k6,DirectionLeftIcon as T6,DirectionRightIcon as P6,DirectionUpIcon as E6,EditIcon as O6,GapIcon as _6,GridIcon as R6,GroundIcon as ck,HashIcon as dk,HeightIcon as A6,ImageIcon as F6,ListIcon as L6,LocationIcon as Zv,PaddingBottomIcon as fk,PaddingLeftIcon as uk,PaddingRightIcon as pk,PaddingTopIcon as mk,PageIcon as B6,StickyIcon as D6,SearchIcon as N6,SquareIcon as M6,TypeIcon as H6,WidthIcon as W6}from"efficient-easel/icons";import{jsx as He,Fragment as Xr,jsxs as Zr}from"react/jsx-runtime";import{CaptionIcon as fM,DateIcon as uM,FlagIcon as pM,TitleIcon as mM,ButtonIcon as hM,DollarIcon as xM,HashIcon as IM,LinkIcon as gM,NoteIcon as bM,TagIcon as yM,TextLinesIcon as SM}from"efficient-easel/icons";var Lw={body:SM,button:hM,link:gM,label:yM,number:IM,price:xM,note:bM,name:pM,date:uM,caption:fM,title:mM},Bw={eyebrow:Zr(Xr,{children:[He("path",{d:"M5 6.5h5"}),He("path",{d:"M5 12.5h14"}),He("path",{d:"M5 18h11"})]}),heading:Zr(Xr,{children:[He("path",{d:"M6.5 5v14"}),He("path",{d:"M17.5 5v14"}),He("path",{d:"M6.5 12h11"})]}),intro:Zr(Xr,{children:[He("path",{d:"M4 5.5v13"}),He("path",{d:"M8 7.5h12"}),He("path",{d:"M8 12h12"}),He("path",{d:"M8 16.5h8"})]}),value:Zr(Xr,{children:[He("rect",{x:"2.5",y:"7",width:"19",height:"10",rx:"2"}),He("path",{d:"M6.5 12h7"})]}),quote:Zr(Xr,{children:[He("path",{d:"M9.5 5.5C7 7.2 5.5 9.7 5.5 12.8h4v5.7h-5v-5.7"}),He("path",{d:"M19.5 5.5c-2.5 1.7-4 4.2-4 7.3h4v5.7h-5v-5.7"})]}),tag:Zr(Xr,{children:[He("rect",{x:"3",y:"5.5",width:"18",height:"13",rx:"2.5"}),He("path",{d:"M8 9.5h8"}),He("path",{d:"M12 9.5v5"})]}),meta:Zr(Xr,{children:[He("path",{d:"M4 7h16"}),He("path",{d:"M4 14h3.5"}),He("path",{d:"M10.5 14h3"}),He("path",{d:"M17 14h3"})]})};function om({noun:e,size:o=14,strokeWidth:t=1.8,className:r,style:a}){let n=Lw[e];return n?He("span",{className:r,style:{display:"inline-flex",...a},"aria-hidden":"true",children:He(n,{size:o})}):He("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:Bw[e]})}var ble=Object.keys(Lw);var yle=Object.keys(Bw);import{parseHexColor as wM}from"efficient-shell/format";var CM="#ffffff";function tm(e){return vM(e)?e:CM}function vM(e){return typeof e=="string"&&wM(e)===e.toLowerCase()}function Cle(e){return{"--bg":tm(e)}}function Dw(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(rm(r,o,0))return{type:typeof a=="string"?a:"",props:n??{}}}return null}function rm(e,o,t){if(t>12||!e||typeof e!="object")return!1;if(Array.isArray(e))return e.some(a=>rm(a,o,t+1));let r=e.props;return r&&typeof r=="object"&&r.id===o?!0:Object.values(e).some(a=>rm(a,o,t+1))}function Nw(e,o){let t=e?.content;return Array.isArray(t)?ec(t,o,0)??[]:[]}function ec(e,o,t){if(t>12||!e||typeof e!="object")return null;if(Array.isArray(e)){for(let a of e){let n=ec(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=ec(a,o,t+1);if(n)return[r,...n]}return null}for(let a of Object.values(e)){let n=ec(a,o,t+1);if(n)return n}return null}import{SettingsDefaultReset as ho,SettingsDrill as z6,SettingsField as Je,SettingsGroup as G6,SettingsGroupSub as Bpe,SettingsSegmented as $6,SettingsBorder as U6,SettingsSidesEach as j6,SettingsSwitch as ph,borderSides as K6,borderStartEach as q6}from"efficient-easel/panel";import{ListField as V6}from"efficient-easel/fields";import{DisplayChips as Y6}from"efficient-shell/ui";function Za(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 oc(e,o){return Za(e)[o]!==!1}function am(e,o,t){let r=Za(o)[t];return typeof r=="boolean"?r:oc(e,t)}function Mw(e){return Object.values(Za(e)).some(o=>o===!1)}function Hw(e){return Object.keys(Za(e)).length>0}function Ww(e,o,t){let r={...Za(e)};return t?delete r[o]:r[o]=!1,Object.keys(r).length?r:void 0}function zw(e,o,t){return{...Za(e),[o]:t}}function Tle(e,o,t){let r=oc(e,t),a=am(e,o,t);return r&&a?"":!r&&!a?"hidden":r?"max-view-tablet:hidden":"view-tablet:hidden"}import{AlignmentGrid as X6,Checkbox as Wpe,ColorSwatch as Z6,CornersInput as J6,DatePicker as zpe,DateTimePicker as Q6,FOCAL_DEFAULT as Gpe,IconPicker as hk,COLUMN_COUNT_MAX as Jv,COLUMN_SHARE_MIN as eW,COLUMN_SHARES_EQUAL as oW,resolveColumnShares as xk,WidthsBar as tW,useShellStrings as rW,IconButton as Ik,InputNumber as Qv,Slider as aW,Tooltip as Wc}from"efficient-shell/ui";import{backendOf as kM}from"efficient-easel/screen/lib/session";var ze=kM,tc=e=>e.blocks;async function Gw(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 nm="Lookup busy \u2014 try again in a moment.",rc=e=>typeof e=="number"&&Number.isFinite(e);function Fle(e){return e.some(o=>{let t=o?.geocode;return t?t.pending||t.manual&&t.lat===void 0&&t.lng===void 0?!0:rc(t.lat)&&t.lat!==o.lat||rc(t.lng)&&t.lng!==o.lng:!1})}async function Lle(e,o,{geocode:t=Gw,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 c of e){if(!c?.geocode?.pending){s.push(c);continue}l&&r>0&&await a(r),l=!0;try{let d=await t(o(c));s.push(d?{...c,lat:d.lat,lng:d.lng,geocode:{...c.geocode,pending:!1,ok:!0,status:`Found \u2014 ${d.label.split(",").slice(0,3).join(",").trim()}`,lat:d.lat,lng:d.lng}}:{...c,geocode:{...c.geocode,pending:!1,ok:!1,status:"No match \u2014 check the address and try again."}})}catch{s.push({...c,geocode:{...c.geocode,pending:!1,ok:!1,status:nm}})}}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 c=rc(l.lat)&&l.lat!==s.lat?l.lat:s.lat,d=rc(l.lng)&&l.lng!==s.lng?l.lng:s.lng;return c!==s.lat||d!==s.lng?{...s,lat:c,lng:d}:s})}import{jsx as wo,jsxs as lm}from"react/jsx-runtime";import{useRef as PM}from"react";import{ColorPicker as EM,ColorPickerPanel as OM,ColorSwatch as _M,HexInput as RM,Popover as AM,Tooltip as FM,colorFill as LM,colorSwatchClasses as BM,useShellStrings as DM}from"efficient-shell/ui";import{SettingsDefaultReset as NM,SettingsField as MM}from"efficient-easel/panel";import{typedHex as sm}from"efficient-easel/pick";import{typedHex as TM}from"efficient-easel/pick";function $w(e){let o=new Set,t=[];return lo(e).themes.forEach((r,a)=>{let n=[[i("Theme {n} main color",{n:a+1}),r.accent],[i("Theme {n} text color",{n:a+1}),r.text],[i("Theme {n} background",{n:a+1}),r.background]];for(let[s,l]of n){let c=l?TM(l):null;!c||o.has(c)||(o.add(c),t.push({name:s,value:c}))}}),t}var Uw="Not set";function HM({value:e,onChange:o,label:t,id:r,caption:a,inherited:n,ariaLabel:s,choices:l}){return wo(zM,{value:e,onChange:o,label:i(s??t),id:r,caption:a,inherited:n,choices:l})}function WM(){let{theme:e}=ce();return $w(e).map(o=>({value:o.value,label:o.name}))}function zM({value:e,onChange:o,label:t,id:r,caption:a,inherited:n,choices:s}){let l=WM(),c=e?null:sm(n??""),d=a!==void 0&&(!e||sm(a)!==sm(e))?a:null,f=m=>{m!==e&&o(m)};return lm("div",{className:"sf-colour",children:[s?wo(GM,{id:r,value:e,onChange:o,label:t,presets:l,follows:c,choices:s}):wo(EM,{id:r,value:e,onChange:f,label:t,presets:l,fallback:c??void 0,size:"md",align:"start"}),d!==null?wo("span",{className:"sf-colour-caption",children:d}):wo("span",{className:"sf-colour-hexwrap",children:wo(RM,{value:e||c||"",onChange:f,label:i("{label} hex code",{label:t}),placeholder:e||c?void 0:i(Uw),className:c?"sf-colour-hex is-inherited":"sf-colour-hex",size:"md"})})]})}function GM({value:e,onChange:o,label:t,id:r,presets:a,follows:n,choices:s}){let l=DM().color,c=e||n||"",d=s.findIndex(u=>u.selected),f=d>=0,m=PM(d);return f&&(m.current=d),wo(AM,{id:r,trigger:wo("span",{"aria-hidden":"true",className:"absolute inset-0",style:LM(c)}),triggerLabel:l.swatch(t,c.toUpperCase()||l.none),triggerClassName:BM({size:"md"}),"aria-label":l.panel(t),align:"start",children:lm("div",{className:"sf-colour-window",children:[wo("div",{role:"group","aria-label":t,className:"sf-colour-choices",children:s.map(u=>wo(FM,{content:u.label,children:wo(_M,{color:u.color,"aria-label":u.label,selected:u.selected,onClick:()=>{u.selected||u.onPick()}})},u.label))}),wo(OM,{value:f?"":e,onChange:o,label:t,presets:a,fallback:(f?c:n)??void 0},m.current)]})})}function zo({label:e,icon:o,changed:t,hint:r,onReset:a,resetTo:n,children:s,...l}){return lm(MM,{label:e,icon:o,htmlFor:l.id,changed:t,hint:r,action:a?wo(NM,{words:Q()?.panel,label:e,changed:!!t,detail:n,onReset:a}):void 0,children:[HM({...l,label:e}),s]})}function vs({label:e,icon:o,value:t,inherited:r,resetTo:a,onChange:n,onReset:s,hint:l,choices:c}){let d=!!t;return wo(zo,{label:e,icon:o,value:t,inherited:d?void 0:r,onChange:n,changed:d,onReset:s,resetTo:a,hint:l,choices:c})}import{keptByRow as nW}from"efficient-easel/screen/lib/document/style-fields";import{jsx as $M}from"react/jsx-runtime";import{useEffect as UM,useState as jM}from"react";import{clearRangeOf as KM,markSelection as qM,useCaretEdit as VM}from"efficient-easel/copy";import{TextToolbar as YM}from"efficient-shell/ui";function XM(e,o,t){return qM(e,o,t,Qy)}function jw(e,o){let t=KM(o,e.length),r=oS(e,t.start,t.end);return r.text===e?null:r}function ZM(e){let[o,t]=jM(null);return UM(()=>{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(c=>c&&c.start===s&&c.end===l?c:{start:s,end:l})};return r.addEventListener("selectionchange",a),()=>r.removeEventListener("selectionchange",a)},[e]),[o,t]}function JM({target:e,value:o,onChange:t,disabled:r=!1,label:a="Formatting"}){let n=VM({target:e,onChange:t}),[s,l]=ZM(e),c=u=>n(x=>{let I=XM(o,u,x);return l({start:I.selectionStart,end:I.selectionEnd}),I}),d=Zy(),f={};if(s)for(let u of d)f[u.style]=eS(o,s.start,s.end,u.style);let m=r?null:jw(o,s);return $M(YM,{offered:new Set(d.map(u=>u.style)),onMark:u=>c(u),pressed:f,disabled:r,"aria-label":i(a),className:"sf-markup-bar",clear:m?{onClear:()=>n(()=>{let u=e.current,x=u&&u.ownerDocument.activeElement===u?{start:u.selectionStart??0,end:u.selectionEnd??0}:null,I=jw(o,x)??{text:o,selectionStart:x?.start??0,selectionEnd:x?.end??0};return l({start:I.selectionStart,end:I.selectionEnd}),I})}:void 0})}var im=JM;import{deviceField as vt}from"efficient-easel/screen/lib/document/device-fields";import{NO_CONTROL_FIELD as sW,NoControlMark as lW,noControlField as gk}from"efficient-easel/screen/lib/document/panel-no-control-mark";var cm="__ownBox";function Kw(e){return!!e&&typeof e=="object"&&e[cm]===!0}function ac(e,o,t){return typeof e=="number"?e:typeof o=="number"?o:t}var nc=void 0;import{phoneKey as zt,tabletKey as cn}from"efficient-easel/draw";import{jsx as fm,Fragment as oH}from"react/jsx-runtime";import{createContext as tH,useContext as rH}from"react";var sc={ProductGrid:{source:{keep:["slug"]}},GalleryItem:{product:{keep:["code","finish"]}},FeaturedCover:{source:{keep:["slug"]}},LongRead:{source:{keep:["slug"]}}},lc={Events:["posts"],SubscribeBlogs:["posts"]};var QM=["anchor"],eH=/^href$|Href$|^url$|Url$|^link$|^mailto$|^tel$/;function ks(e){return QM.includes(e)||eH.test(e)}var dm={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"}}};dm.ContactLocations={"locations[].lat":{verb:"pii"},"locations[].lng":{verb:"pii"},"locations[].mapsUrl":{verb:"pii"},"locations[].geocode":{verb:"pii"}};var iie=Object.fromEntries(Object.entries(sc).map(([e,o])=>[e,Object.keys(o)])),cie=Object.fromEntries(Object.entries(lc).map(([e,o])=>[e,[...o]]));import{NoControlMark as aH}from"efficient-easel/screen/lib/document/panel-no-control-mark";var qw=tH(!1);function Vw({children:e}){return fm(qw.Provider,{value:!0,children:e})}function nH(){return rH(qw)}function Yw({name:e,children:o}){return!nH()||!e||!sH(e)||ks(e)?fm(oH,{children:o}):fm(aH,{})}function sH(e){return/^[A-Za-z0-9_$]+$/u.test(e)}var um="off",pm="none",mm=[{label:"None",value:"off"},{label:"1, 2, 3",value:"plain"},{label:"01, 02, 03",value:"padded"},{label:"N\xB001, N\xB002",value:"numero"}],hm=[{label:"None",value:"none"},{label:"Hairline",value:"hairline"}];function Iie(e){return to(mm,um,e)}function gie(e){return to(hm,pm,e)}var Xw="sf-card-index",Ts="sf-card-index",bie="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",lH={plain:`counter(${Ts})`,padded:`counter(${Ts}, decimal-leading-zero)`,numero:`"N\xB0" counter(${Ts}, decimal-leading-zero)`};function yie(e,o){return o==="off"?"":`.${e}{counter-reset:${Ts}}.${e} .${Xw}{counter-increment:${Ts}}.${e} .${Xw}::before{content:${lH[o]}}`}function Sie(e){return e==="hairline"?"border border-line hover:border-accent":""}var Zw=[{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 iW}from"efficient-easel/draw";import{jsx as Co}from"react/jsx-runtime";import{SettingsDefaultReset as mH,SettingsField as xm}from"efficient-easel/panel";import{useSelectedHost as hH}from"efficient-easel/easel";import{FOCAL_DEFAULT as xH}from"efficient-shell/format";import{ImageIcon as Im,PlayIcon as Qw}from"efficient-easel/icons";import{ImageFocusPoint as IH,MediaUploadField as gH}from"efficient-shell/ui";import{useContext as bH}from"react";import{ScreenDocumentContext as yH}from"efficient-easel/screen/components/ScreenDocumentContext";import{phoneKey as SH,tabletKey as eC}from"efficient-easel/draw";import{usePreviewDevice as wH}from"efficient-easel/draw/client";import{formatFocal as iH,parseFocal as cH}from"efficient-shell/format";var dH="sf-focus-phone",fH="--sf-focus-phone",uH="sf-focus-tablet",pH="--sf-focus-tablet",Ps=e=>{if(typeof e!="string"||!/^\s*-?\d+(\.\d+)?%\s+-?\d+(\.\d+)?%\s*$/.test(e))return null;let{x:o,y:t}=cH(e);return iH(o,t)};function Jw(e,o){let t=Ps(o),r=Ps(e)??t;return{className:[t?uH:"",r?dH:""].filter(Boolean).join(" "),style:{...t?{[pH]:t}:{},...r?{[fH]:r}:{}}}}import{shownTier as gm}from"efficient-easel/screen/lib/document/device-fields";import{onDesktopWords as CH}from"efficient-easel/screen/lib/document/box-fields";import{requestMediaPick as vH}from"efficient-easel/screen/lib/media-picker";import{useEaselHost as kH}from"efficient-easel/screen/lib/host";import{useEaselSession as TH}from"efficient-easel/screen/lib/session-context";function PH(e,o,t,r=!0){let a=gm(t),n=typeof e[o]=="string"&&e[o]?String(e[o]):xH;if(a==="desktop")return{ownView:!1,followed:n,followsView:"desktop",own:void 0,focus:n,key:o};let s=a==="tablet"?eC(o):SH(o),l=Ps(e[s])??void 0,c=a==="mobile"&&r?Ps(e[eC(o)])??void 0:void 0,d=c??n;return{ownView:!0,followed:d,followsView:c?"tablet":"desktop",own:l,focus:l??d,key:s}}function EH(e,o,t){let r=hH();if(!o||!r)return null;let a=r.values??{};if(t&&!t(a,gm(e)))return null;let n=PH(a,o,e,t?t(a,"tablet"):!0),s=r.onChange;return{...n,set:l=>s(n.key,l),clear:()=>s(n.key,nc)}}function oC({value:e,onChange:o,label:t,accept:r,placeholder:a,focusKey:n,focusWhen:s,frameKey:l,fieldKey:c}){let d=kH(),f=TH(),m=i(t),u=wH(),x=r.startsWith("video"),I=EH(u,x?void 0:n,s),b=!!n&&gm(u)!=="desktop",v=bH(yH),C=bm(),w=l&&c?{video:c,frame:l}:null,g=P=>vH(d,{accept:r,title:m,...P?{file:P}:{}}).then(L=>!L||!w?L?.url??null:(C({[w.video]:L.url,[w.frame]:L.posterUrl??""}),null)),k=w?P=>P?o(P):C({[w.video]:"",[w.frame]:""}):o,T=lr(e);if(b&&(!I||!T))return null;if(v&&!v.capabilities.mediaEditing)return Co(xm,{label:m,icon:x?Co(Qw,{}):Co(Im,{}),children:Co("div",{className:"sf-image-slot-inert",children:x?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 F=I?.ownView&&T?Co(mH,{words:Q()?.panel,label:i("Image focus"),changed:!!I.own,detail:CH(P=>i(P),I.followed,I.followsView),onReset:I.clear}):void 0;return b&&I?Co(xm,{label:m,icon:Co(Im,{}),action:F,children:Co("div",{style:{flex:"1 1 auto",minWidth:0},children:Co(IH,{value:I.focus,onChange:I.set,label:i("Image focus"),image:T,hint:null})})}):Co(xm,{label:m,icon:x?Co(Qw,{}):Co(Im,{}),children:Co("div",{style:{flex:"1 1 auto",minWidth:0},children:Co(gH,{value:T,onChange:k,onPick:g,accept:x?"video/*":"image/*",kind:x?"video":"image",placeholder:a===void 0?void 0:i(a),maxSizeBytes:ze(f).media.maxUploadBytes,...I?{focus:I.focus,onFocusChange:I.set}:{}})})})}import{jsx as tC}from"react/jsx-runtime";import{useId as OH}from"react";import{FieldSelect as _H}from"efficient-easel/fields";import{SettingsField as RH}from"efficient-easel/panel";function AH(e){return e.map(({value:o,label:t,note:r})=>({value:o,label:t,...r?{meta:r}:{}}))}function rC({label:e,options:o,value:t,onChange:r,emptyLabel:a,icon:n,hint:s}){let l=OH(),c=`${l}-label`,d=`${l}-button`,f=Array.isArray(t)?t:[];return tC(RH,{label:i(e),labelId:c,icon:n,hint:s,children:tC(_H,{id:d,multiple:!0,value:f,options:AH(o),onChange:r,placeholder:a===void 0?i("None"):i(a),ariaLabelledBy:`${c} ${d}`,inline:!0})})}import{jsx as Ze,jsxs as Qr,Fragment as u5}from"react/jsx-runtime";import{useCallback as bC,useContext as p5,useId as wC,useRef as yC,useState as SC}from"react";import{ThemeIcon as m5}from"efficient-easel/icons";import{Button as h5,useClickOutside as x5}from"efficient-shell/ui";import{SettingsField as I5}from"efficient-easel/panel";import{ScreenDocumentContext as g5}from"efficient-easel/screen/components/ScreenDocumentContext";import{jsx as re,jsxs as fr,Fragment as zH}from"react/jsx-runtime";import{parseHexColor as GH}from"efficient-shell/format";import{Button as Sm,IconButton as $H,Tooltip as UH}from"efficient-shell/ui";import{jsx as dr,jsxs as FH}from"react/jsx-runtime";import{AccentIcon as LH}from"efficient-easel/icons";import{Button as BH,Tooltip as DH}from"efficient-shell/ui";function ym(e){return yo(e).background}function NH(e){let o=tr(e.accent,ym(e));return o===null?null:{ratio:o,grade:Ka(o)}}function MH(e){let o=ym(e),t=tr(e.accent,o);return t===null?[]:ty(e.accent).filter(r=>{let a=tr(r,o);return a!==null&&a>t&&Ka(a)==="good"})}var HH={good:"Easy to read","large-only":ja["large-only"],hard:ja.hard};function aC({value:e,onChange:o}){let t=NH(e),r=t?.grade,a=t&&t.grade!=="good"?MH(e):[];return dr(zo,{label:i("Main color"),icon:dr(LH,{}),hint:t?i(HH[t.grade]):void 0,value:e.accent,onChange:n=>o({...e,accent:n}),children:a.length>0?dr("div",{className:"w-full min-w-0",children:FH("div",{className:"sf-readability",children:[dr("p",{className:"sf-readability-advice",children:WH(r,!0)}),dr("div",{className:"sf-readability-suggestions",children:a.map(n=>{let s=tr(n,ym(e));return dr(DH,{content:i("Use {colour}",{colour:n.toUpperCase()}),children:dr(BH,{variant:"secondary",className:"sf-readability-suggestion",leftIcon:dr("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 WH(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 jH,ChevronDownIcon as sC,ChevronUpIcon as KH,GroundIcon as qH,LayoutIcon as VH,SquareIcon as YH,TextSmallIcon as XH,TypeIcon as nC}from"efficient-easel/icons";var Es=e=>i("Theme {n}",{n:e+1});function lC({colors:e}){let o=yo(e),t=as(e)??o.accent;return fr("span",{className:"sf-theme-page",style:{background:o.background,color:o.text},"aria-hidden":!0,children:[re("span",{className:"sf-theme-eyebrow",style:{color:o.muted},children:i("label")}),fr("span",{className:"sf-theme-headline",children:[i("Heading")," ",re("span",{style:{color:o.accent},children:i("main")})]}),re("span",{className:"sf-theme-body",children:i("body text")}),fr("span",{className:"sf-theme-row",children:[re("span",{className:"sf-theme-btn",style:{background:t,color:Uu(e,o.accent)},children:i("button")}),re("span",{className:"sf-theme-mini",style:{background:o.surface,borderColor:o.line},children:i("card")})]})]})}var wm={"Text color":re(nC,{}),"Label color":re(XH,{}),Background:re(qH,{}),"Panels & cards":re(VH,{}),Borders:re(YH,{}),"Button color":re(jH,{}),"Button text color":re(nC,{})};function ZH({label:e,colorKey:o,value:t,onChange:r,idPrefix:a="sf-theme-ink"}){let n=`${a}-${o}`;return re(zo,{label:i(e),icon:wm[e],id:n,value:t,onChange:s=>r(o,s)})}function JH({value:e,accent:o,onChange:t,idPrefix:r="sf-theme-ink"}){let a=`${r}-button`,n=e!==void 0&&GH(e)===e.toLowerCase(),s=n?e:o;return re(zo,{label:i("Button color"),icon:wm["Button color"],id:a,value:s,caption:n?s:i("Main"),onChange:t})}function QH({colors:e,accent:o,onChange:t,idPrefix:r="sf-theme-ink"}){let a=`${r}-button-ink`,n=ry(e),s=Uu(e,o),l=as(e)??o,c=Ka(tr(s,l)??0);return re(zo,{label:i("Button text color"),icon:wm["Button text color"],hint:n&&c!=="good"?i("{grade} on the button",{grade:i(ja[c])}):void 0,id:a,value:s,caption:n?s:i("Auto"),onChange:t})}var e5=[{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 Cm({colors:e,onChange:o,idPrefix:t}){let r=yo(e);return re(zH,{children:e5.map(a=>"colour"in a?re(aC,{value:e,onChange:o},"colour"):"moduleBreak"in a?re("div",{className:"sf-theme-module-break","aria-hidden":"true"},"module-break"):"button"in a?re(JH,{value:e.button,accent:r.accent,onChange:n=>o({...e,button:n}),idPrefix:t},"button"):"buttonInk"in a?re(QH,{colors:e,accent:r.accent,onChange:n=>o({...e,buttonInk:n}),idPrefix:t},"buttonInk"):re(ZH,{label:a.label,colorKey:a.key,value:r[a.key],onChange:(n,s)=>o({...e,[n]:s}),idPrefix:t},a.key))})}function ic({index:e,colors:o,selected:t,role:r="radio",open:a,editable:n=!0,onPick:s,onEdit:l,onChangeColors:c}){let d=yo(o),f=Es(e),m=e<$u.length&&!o.brandInk?$u[e]:null,u=Ka(tr(d.text,d.background)??0),x=m?JSON.stringify(o)!==JSON.stringify(m):!1,I=a!==void 0;return fr("div",{className:`sf-theme-card${t?" is-selected":""}`,children:[re("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:re(lC,{colors:o})}),fr("div",{className:"sf-theme-foot",children:[re("span",{className:"sf-theme-name",children:f}),u!=="good"&&re("span",{className:"sf-theme-warn",children:i(ja[u])}),n&&l&&I&&re("span",{className:"sf-theme-edit",children:re(UH,{content:a?i("Collapse"):i("Edit colors"),children:re($H,{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?re(KH,{size:14}):re(sC,{size:14})})})}),n&&l&&!I&&re(Sm,{variant:"secondary",size:"sm",className:"sf-theme-edit","aria-label":i("Edit {name}",{name:f}),onClick:l,children:i("Edit")})]}),a&&fr("div",{id:`sf-theme-colours-${e}`,className:"sf-theme-colours",children:[re(Cm,{colors:o,onChange:b=>c?.(b)}),m&&re(Sm,{variant:"link",size:"sm",className:"sf-theme-reset",disabled:!x,onClick:()=>c?.({...m}),children:x?i("Reset {name} to the preset",{name:f}):i("Not changed")})]})]})}function iC({colors:e,name:o,nameId:t,open:r,menuId:a,labelId:n,buttonRef:s,onClick:l,onKeyDown:c,onEdit:d}){return fr("div",{className:"sf-secttheme-btn",children:[re("button",{ref:s,type:"button",className:"sf-theme-pick","aria-expanded":r,"aria-controls":a,"aria-labelledby":`${n} ${t}`,onClick:l,onKeyDown:c,children:e?re(lC,{colors:e}):re("span",{className:"sf-secttheme-nopreview","aria-hidden":"true"})}),fr("div",{className:"sf-theme-foot",children:[re("span",{id:t,className:"sf-theme-name",children:o}),d&&re(Sm,{variant:"secondary",size:"sm",className:"sf-theme-edit","aria-label":i("Edit {name}",{name:o}),onClick:d,children:i("Edit")}),re("button",{type:"button",className:"sf-secttheme-caret","aria-hidden":"true",tabIndex:-1,onClick:l,children:re(sC,{size:12,className:"sf-multi-caret","aria-hidden":"true"})})]})]})}import{useCallback as Om,useEffect as pC,useRef as uc}from"react";import{currentEaselSession as r5}from"efficient-easel/screen/lib/session";import{useEaselSession as a5}from"efficient-easel/screen/lib/session-context";import{useSyncExternalStore as o5}from"react";var dC,vm=null,Jr=null,cc=0,km=new Set;function Tm(e){dC=e;for(let o of km)o()}function Pm(e){vm=e,cc+=1,Jr&&clearTimeout(Jr),Jr=null,Tm(void 0)}function dc(e){cc+=1,Tm(e)}function Nt(e=250){vm&&(Jr&&clearTimeout(Jr),Jr=setTimeout(()=>{Jr=null;let o=vm;if(!o)return;let t=++cc;o().then(r=>{t===cc&&Tm(r)}).catch(()=>{})},e))}function cC(){return dC}function t5(e){return km.add(e),()=>{km.delete(e)}}function fc(){return o5(t5,cC,cC)}var Em=new Set;function fC(e){return Em.add(e),()=>{Em.delete(e)}}async function uC(){let e=(await Promise.allSettled([...Em].map(async o=>o()))).find(o=>o.status==="rejected");if(e)throw e.reason}import{WebsiteBackendError as n5}from"efficient-easel/screen/lib/backend-error";function mC(e=r5()){return(o,t,r)=>{let a=ze(e).theme;return a?a.update(o,r?{siteId:r}:void 0):Promise.reject(new n5("invalid","This backend stores no site theme."))}}function hC(e){return e.themeFromDocument?{status:"skipped",reason:"template"}:e.token?null:{status:"skipped",reason:"no-token"}}async function s5(e,o=mC()){let{themeFromDocument:t,token:r,siteId:a,patch:n}=e,s=hC({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 Ja({themeFromDocument:e,tokenRef:o,siteId:t,onResult:r}){let a=uc(null),n=uc({}),s=a5(),l=uc(r);l.current=r;let c=uc(null),d=Om(u=>{if(u.status==="skipped"){let x=`skipped:${u.reason}`;if(c.current===x)return;c.current=x}else c.current=null;l.current?.(u)},[]),f=Om(async()=>{a.current&&(clearTimeout(a.current),a.current=null);let u=n.current;n.current={};let x=await s5({themeFromDocument:e,token:o?.current,siteId:t,patch:u},mC(s));return d(x),x.status==="saved"&&Nt(),x.status==="failed"&&(n.current={...u,...n.current}),x},[e,o,t,d,s]),m=Om((u,x=!1)=>{let I=hC({themeFromDocument:e,token:o?.current});if(I){d(I);return}n.current={...n.current,...u},a.current&&clearTimeout(a.current),x?f():a.current=setTimeout(()=>{f()},500)},[e,o,f,d]);return pC(()=>()=>{f()},[f]),pC(()=>fC(async()=>{if(!a.current&&Object.keys(n.current).length===0)return;let u=await f();if(u.status==="failed")throw u.error}),[f]),{persist:m,flush:f}}var _m=[{role:"bg",token:"--bg",ink:!1},{role:"fg",token:"--fg",ink:!0},{role:"surface",token:"--site-surface",ink:!1},{role:"surface-2",token:"--site-surface-2",ink:!1},{role:"line",token:"--site-line",ink:!0},{role:"muted",token:"--fg-dim",ink:!0}],l5=_m.filter(e=>e.ink);function i5(e){let o={color:e.fg};for(let{role:t,token:r}of l5)o[r]=e[t];return o}var c5={fg:"var(--overlay-fg)",line:"color-mix(in srgb, var(--overlay-fg) 24%, transparent)",muted:"color-mix(in srgb, var(--overlay-fg) 76%, transparent)"},xC=Object.freeze(i5(c5));var ur=-1,d5="sf-section-accent",IC="Color",gC=new Set(["CategoryBar","DocTabs"]),Oce=new Set(["Flex"]),Rm=0;function et(e){return e===ur?null:typeof e=="number"&&Number.isInteger(e)&&e>=0?e:Rm}function Am(e){return e??ur}function f5(e){let o=`--theme-preset-${e}`,t={"--sf-sec-accent":`var(${o}-accent)`,"--sf-sec-accent-2":`var(${o}-accent-2)`,"--sf-sec-accent-ink":`var(${o}-accent-ink)`};for(let{role:r}of _m)t[`--sf-sec-${r}`]=`var(${o}-${r}, var(--theme-${r}))`;return t}function _ce(e){let o=et(e.sectionAccent);return o===null?null:{className:d5,style:f5(o)}}var b5="Follow the page",Uce="Follow the slideshow",y5=e=>i("Editing {name} changes it everywhere.",{name:e});function S5({colors:e}){if(!e)return Ze("span",{className:"sf-secttheme-chip sf-secttheme-chip--none","aria-hidden":"true"});let o=yo(e);return Qr("span",{className:"sf-secttheme-chip","aria-hidden":"true",children:[Ze("i",{style:{background:o.background}}),Ze("i",{className:"sf-secttheme-chip-accent",style:{background:o.accent}})]})}function w5({themes:e,value:o,onPick:t,onEdit:r,menuId:a,followLabel:n}){return Qr("div",{className:"sf-multi-menu sf-secttheme-menu",id:a,role:"listbox",children:[n!==void 0&&Qr(u5,{children:[Qr("button",{type:"button",role:"option","aria-selected":o===null,className:`sf-secttheme-item${o===null?" is-active":""}`,onClick:()=>t(ur),children:[Ze(S5,{}),Ze("span",{className:"sf-secttheme-name",children:i(n)})]}),Ze("div",{className:"sf-secttheme-sep",role:"presentation"})]}),o!==null&&e[o]&&Ze("p",{className:"sf-secttheme-oncard",role:"presentation",children:i("{name} is on this section",{name:Es(o)})}),e.map((s,l)=>l===o?null:Ze(ic,{role:"option",index:l,colors:s,selected:!1,onPick:()=>t(l),onEdit:()=>r(l)},l))]})}function C5({index:e,colors:o,onChange:t,onDone:r}){let a=Es(e),n=wC();return Qr("div",{className:"sf-secttheme-sheet",children:[Qr("div",{className:"sf-secttheme-sheet-head",children:[Ze("span",{children:a}),Ze(h5,{variant:"secondary",className:"sf-secttheme-done",onClick:r,children:i("Done")})]}),Ze("div",{className:"sf-secttheme-rows",children:Ze(Cm,{colors:o,onChange:t,idPrefix:n})}),Ze("p",{className:"sf-secttheme-warn",children:y5(a)})]})}function CC({value:e,onChange:o,followLabel:t,hint:r}){let{theme:a,setTheme:n}=ce(),s=lo(a),l=p5(g5),c=l?.tokenRef,d=l?.siteId??null,f=!l?.capabilities?.hasSiteTheme,{persist:m,flush:u}=Ja({themeFromDocument:f,tokenRef:c,siteId:d}),x=lo(s),I=x.themes,b=et(e),v=b!==null?I[b]:void 0,C=v??(I.length?Ua(x):void 0),[w,g]=SC(!1),[k,T]=SC(null),F=yC(null),P=yC(null),L=wC(),E=bC(()=>{g(!1),T(null)},[]),R=bC(()=>{!w&&k===null||(u(),E())},[w,k,E,u]);x5(F,R);let N=_=>{o(_),E()},y=_=>{if(k===null)return;let A=I.map((Z,q)=>q===k?_:Z),H={...x,themes:A};n(H),m({selected_preset:H.selected,theme_presets:H.themes})};return Qr("div",{className:"sf-secttheme",ref:F,children:[Ze(I5,{label:i("Theme"),icon:Ze(m5,{}),labelId:`${L}-label`,hint:r,children:Ze(iC,{colors:C,onEdit:b!==null?()=>{T(b),g(!1)}:void 0,name:v?Es(b):i(t??b5),nameId:`${L}-value`,labelId:`${L}-label`,open:w,menuId:L,buttonRef:P,onClick:()=>{T(null),g(_=>!_)},onKeyDown:_=>{_.key==="Escape"&&(w||k!==null)&&(_.preventDefault(),E())}})}),w&&k===null&&Ze("div",{onKeyDown:_=>{_.key==="Escape"&&(_.preventDefault(),E(),P.current?.focus())},children:Ze(w5,{themes:I,value:b,onPick:N,onEdit:_=>{T(_),g(!1)},menuId:L,followLabel:t})}),k!==null&&I[k]&&Ze(C5,{index:k,colors:I[k],onChange:y,onDone:()=>{u(),E(),P.current?.focus()}})]})}import{jsx as vC}from"react/jsx-runtime";import{useId as v5}from"react";import{FieldSelect as k5}from"efficient-easel/fields";import{SettingsField as T5}from"efficient-easel/panel";function P5(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 Zce({label:e,options:o,fallback:t,value:r,onChange:a,placeholder:n,bare:s=!1,icon:l}){let c=v5(),d=`${c}-label`,f=`${c}-button`,m=r??"",u=o.some(v=>v.value===m)?m:t,x=i(e),I=n===void 0?void 0:i(n),b=vC(k5,{id:f,value:u,options:P5(o),onChange:a,placeholder:I,searchPlaceholder:I,...s?{ariaLabel:x}:{ariaLabelledBy:`${d} ${f}`},searchable:!0,groupCount:!0,inline:!0});return s?b:vC(T5,{label:x,labelId:d,icon:l,children:b})}import{jsx as oa,jsxs as s4}from"react/jsx-runtime";import{SettingsField as VC}from"efficient-easel/panel";import{LinkIcon as l4}from"efficient-easel/icons";import{LinkPicker as i4,TextLinkField as c4}from"efficient-shell/ui";import{useEffect as qC,useMemo as xc,useRef as d4,useState as hc}from"react";import{currentEaselSession as E5}from"efficient-easel/screen/lib/session";function kC(){return E5().auth.token}import{currentEaselSession as f4}from"efficient-easel/screen/lib/session";import{useScreenDocument as u4}from"efficient-easel/screen/components/ScreenDocumentContext";var O5=()=>({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 TC(e,o,t){if(!e)return"page";if(Pw(e))return"popup";if(e.startsWith("/journal/"))return"blog";if(_w(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 Fm(e,o){let t=O5(),r=e.pages.map(f=>({value:Cs(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:Ow(...f.docs).map(m=>({value:Qi(f.slug,m.slug),label:m.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(m=>({value:Ew(m.slug),label:m.title||m.slug})),placeholder:t.choosePost};case"product":return{type:"select",options:e.products.map(m=>({value:m.href,label:m.name||m.href})),placeholder:t.chooseProduct};case"popup":return{type:"select",options:(e.popups??[]).map(m=>({value:Tw(m.slug),label:m.title||m.slug})),placeholder:t.choosePopup};case"custom":return{type:"text"}}},c=kw(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:c,rules:{kindOf:f=>TC(f,n),targetOf:f=>f,readFilter:()=>null,withFilter:f=>f}};let d=f=>{let m=o.withFilter(f,null);return o.listingPaths.includes(m)?m:f};return{kinds:c,rules:{kindOf:f=>TC(f,n,{listingPaths:o.listingPaths,targetOf:d}),targetOf:d,readFilter:o.readFilter,withFilter:o.withFilter},filtersFor:f=>o.listingPaths.includes(f)?o.filtersFor(f):null}}import{useEaselSession as p4}from"efficient-easel/screen/lib/session-context";var U=e=>typeof e=="number"&&Number.isFinite(e)?e:void 0;function io(e,o){if(typeof e=="string")return e||o;if(e&&typeof e=="object"&&"text"in e){let t=e.text;return oe(t)??o}return o}function PC(e,o){return U(e)??o}function Mt(e,o){return typeof e=="boolean"?e:o}function pc(e,o){if(!Array.isArray(e))return o;let t=e.map(r=>typeof r=="string"?r:io(r?.text,"")).map(r=>r.trim()).filter(Boolean);return t.length?t:o}var OC=["delay","scroll","exit"],_C=["all","chosen","except"],RC=["visit","days","never","once"],_5=["all","desktop","phone"],R5=["stop","continue"],AC={min:0,max:60},FC={min:10,max:90},LC={min:1,max:90},ot={autoOpen:!1,trigger:"delay",autoOpenDelaySec:15,scrollPercent:50,showOn:"all",showOnPages:[],devices:"all",hideAfter:"days",hideDays:7,afterSubmit:"stop",startDate:null,endDate:null};function Ao(e,o,t){return typeof o=="string"&&e.includes(o)?o:t}function Qa(e,o,t){let r=PC(e,t);return Math.min(o.max,Math.max(o.min,Math.round(r)))}function A5(e){return typeof e.hideAfter=="string"?Ao(RC,e.hideAfter,ot.hideAfter):e.oncePerSession===!0?"visit":e.oncePerSession===!1?"never":ot.hideAfter}function F5(e){return Array.isArray(e)?e.map(o=>typeof o=="string"?o.trim():"").filter(Boolean).map(o=>o.startsWith("/")?o:`/${o}`):[]}function EC(e){if(typeof e!="string")return null;let o=e.trim();return/^\d{4}-\d{2}-\d{2}$/.test(o)?o:null}function BC(e){let o=e??{},t=ot;return{autoOpen:Mt(o.autoOpen,t.autoOpen),trigger:Ao(OC,o.trigger,t.trigger),autoOpenDelaySec:Qa(o.autoOpenDelaySec,AC,t.autoOpenDelaySec),scrollPercent:Qa(o.scrollPercent,FC,t.scrollPercent),showOn:Ao(_C,o.showOn,t.showOn),showOnPages:F5(o.showOnPages),devices:Ao(_5,o.devices,t.devices),hideAfter:A5(o),hideDays:Qa(o.hideDays,LC,t.hideDays),afterSubmit:Ao(R5,o.afterSubmit,t.afterSubmit),startDate:EC(o.startDate),endDate:EC(o.endDate)}}import{parseHexColor as L5}from"efficient-shell/format";var tt="#000000";var Lm="popup",B5=Ya,D5=["auto","full"],N5=["inside","outside","none"],M5={min:240,max:1440},H5={min:0,max:100},Os={placement:"center",fullWidth:!1,width:720,height:"auto",tintColor:tt,tintOpacity:60,outsideClick:!0,closeButton:"inside"};function W5(e,o){let t=typeof e=="string"?e.trim():"";return t&&L5(t)===t.toLowerCase()?t:o}function Bm(e,o=Os){let t=e??{},r=o;return{placement:Ao(B5,t.placement,r.placement),fullWidth:Mt(t.fullWidth,r.fullWidth),width:Qa(t.width,M5,r.width),height:Ao(D5,t.height,r.height),tintColor:W5(t.tintColor,r.tintColor),tintOpacity:Qa(t.tintOpacity,H5,r.tintOpacity),outsideClick:Mt(t.outsideClick,r.outsideClick),closeButton:Ao(N5,t.closeButton,r.closeButton)}}var DC="cart-drawer",yde="cart-drawer",z5={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 Sde(e,o){return o===0?e.subtitleEmpty:o===1?e.subtitleOne:e.subtitleMany.replace("{count}",String(o))}function wde(e){let o=e??{},t=z5;return{kickerBadge:io(o.kickerBadge,t.kickerBadge),kickerText:io(o.kickerText,t.kickerText),titleLead:io(o.titleLead,t.titleLead),titleAccent:io(o.titleAccent,t.titleAccent),subtitleEmpty:io(o.subtitleEmpty,t.subtitleEmpty),subtitleOne:io(o.subtitleOne,t.subtitleOne),subtitleMany:io(o.subtitleMany,t.subtitleMany),leadTimeValue:io(o.leadTimeValue,t.leadTimeValue),shipsToFallback:io(o.shipsToFallback,t.shipsToFallback),promises:pc(o.promises,t.promises),emptyKicker:io(o.emptyKicker,t.emptyKicker),emptyBody:io(o.emptyBody,t.emptyBody)}}var G5=["right","left"],$5={...Os,width:520,tintOpacity:68};function Cde(e){let o=e??{};return{...Bm(o,$5),placement:Ao(G5,o.placement,"right"),height:"full",fullWidth:!1,autoOpen:Mt(o.autoOpen,!0)}}var MC="consent-banner",Pde="consent-banner";var U5=[{value:"bar",label:"Bar"},{value:"card",label:"Card"}],Ede="Layout",NC={layout:"bar"},j5=e=>U5.some(o=>o.value===e);function Ode(e){let o=io((e??{}).layout,NC.layout);return{layout:j5(o)?o:NC.layout}}var _de={...Os,placement:"bottom-center",fullWidth:!0,width:440,tintOpacity:0,outsideClick:!1,closeButton:"none"};var K5="consentWords",q5=["eyebrow","notice","accept","reject","choose"];function Dm(e){let o=(e??{})[K5];return typeof o=="string"&&q5.includes(o)?o:null}function Nm(e){let o=e?.props;return o?Dm(o)!==null?!0:Object.values(o).some(t=>Array.isArray(t)&&t.some(r=>r&&typeof r=="object"&&"props"in r&&Nm(r))):!1}var V5=["meta","eyebrow","heading","body","statName","statValue","formEyebrow","formHeading","formIntro","fieldLabel","option","finePrint","dismiss","doneHeading","doneBody"],Fde={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"},Y5={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"},Lde={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 HC(e){let o={};for(let t of V5){let r=Lt(e[Y5[t]]);r&&(o[t]=r)}return o}var WC={heading:"Join our email list",placeholder:"Email address",buttonLabel:"Subscribe"},X5={lead:"We accept"},zC={...X5,methods:[],size:"sm",align:"start",dataSource:"shop-payment-methods"},rt="site-footer";var Dde=rt,Nde={desktop:!0,tablet:!0,mobile:!0},Mde={desktop:!1,tablet:!1,mobile:!1},Mm=1,GC=6,Hde=Array.from({length:GC-Mm+1},(e,o)=>Mm+o),mc={desktop:6,tablet:3,mobile:2},Z5={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}},ea=e=>Math.min(Math.max(Math.round(e),Mm),GC);function Wde(e){if(typeof e=="number")return Z5[ea(e)]??{desktop:ea(e),tablet:ea(e),mobile:ea(e)};if(e&&typeof e=="object"){let o=e;return{desktop:ea(o.desktop??mc.desktop),tablet:ea(o.tablet??mc.tablet),mobile:ea(o.mobile??mc.mobile)}}return{...mc}}var Hm="subscribe-popup",Vde="subscribe-popup",J5=[Hm,rt,DC,MC];function UC(e){return J5.includes(e)}var Q5=["right","left"],e4={metaLabel:"Meta label",issueLabel:"Label",issueNumber:"00",kicker:"Kicker",heading:`Main heading
|
|
37
|
+
*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:ot.autoOpen,autoOpenDelaySec:ot.autoOpenDelaySec,formSlug:"",trigger:ot.trigger,scrollPercent:ot.scrollPercent,showOn:ot.showOn,showOnPages:[],hideAfter:ot.hideAfter,hideDays:ot.hideDays,formSide:"right",valuePanelOnPhone:!1,sectionAccent:void 0,sectionCorners:void 0,sectionCornerSides:void 0,textStyles:{}},Ge=io,o4=Mt,jC=pc;function $C(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 t4(e,o){return Array.isArray(e)?jC(e,[]):o}function r4(e,o){return Array.isArray(e)?e.map(t=>{let r=t??{};return{label:Ge(r.label,""),value:Ge(r.value,"")}}).filter(t=>t.label||t.value):o}function Xde(e){let o=e??{},t=e4,r=BC(o);return{metaLabel:Ge(o.metaLabel,t.metaLabel),issueLabel:$C(o.issueLabel,t.issueLabel),issueNumber:$C(o.issueNumber,t.issueNumber),kicker:Ge(o.kicker,t.kicker),heading:Ge(o.heading,t.heading),deck:Ge(o.deck,t.deck),stats:r4(o.stats,t.stats),formLabel:Ge(o.formLabel,t.formLabel),formHeading:Ge(o.formHeading,t.formHeading),formIntro:Ge(o.formIntro,t.formIntro),firstNameLabel:Ge(o.firstNameLabel,t.firstNameLabel),firstNamePlaceholder:Ge(o.firstNamePlaceholder,t.firstNamePlaceholder),emailLabel:Ge(o.emailLabel,t.emailLabel),emailPlaceholder:Ge(o.emailPlaceholder,t.emailPlaceholder),interestsLabel:Ge(o.interestsLabel,t.interestsLabel),interests:jC(o.interests,t.interests),frequencyLabel:Ge(o.frequencyLabel,t.frequencyLabel),frequencies:t4(o.frequencies,t.frequencies),submitText:Ge(o.submitText,t.submitText),finePrint:Ge(o.finePrint,t.finePrint),dismissText:Ge(o.dismissText,t.dismissText),emailInvalidText:Ge(o.emailInvalidText,t.emailInvalidText),submitErrorText:Ge(o.submitErrorText,t.submitErrorText),successHeading:Ge(o.successHeading,t.successHeading),successBody:Ge(o.successBody,t.successBody),keepBrowsingText:Ge(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:Ao(Q5,o.formSide,t.formSide),valuePanelOnPhone:o4(o.valuePanelOnPhone,t.valuePanelOnPhone),sectionAccent:o.sectionAccent,sectionCorners:o.sectionCorners,sectionCornerSides:o.sectionCornerSides,textStyles:HC(o)}}function a4(e,o=Math.random){for(;;){let t=`popup-${Math.floor(o()*2176782336).toString(36).padStart(6,"0")}`;if(!e.has(t))return t}}function n4(e){return{root:{props:{title:e,kind:Lm}},content:[],zones:{}}}function KC(e,o,t){return{slug:a4(o,t),title:e,kind:zp,layout:n4(e)}}function _s(e){return e?.root?.props?.kind===Lm}function YC(e){let o=new Map;return(t="")=>{let r=kC(),a=o.get(t);if(!a||a.token===null&&r!==null){let n=r||!f4().usesBridgedToken?e(r??"",t).catch(()=>[]):Promise.resolve([]);return o.set(t,{promise:n,token:r}),n}return a.promise}}var m4=YC(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}))}),h4=YC(async(e,o)=>await ze().blog?.posts(o?{siteId:o}:void 0)??[]);function x4({value:e,onChange:o,label:t="Link",data:r,filters:a}){let n=xc(()=>Fm(r,a),[r,a]),s=i(t);return oa(VC,{label:s,icon:oa(l4,{}),children:oa(i4,{value:e,onChange:l=>o(l),kinds:n.kinds,rules:n.rules,filtersFor:n.filtersFor,label:s})})}function XC(){let{siteId:e,capabilities:o}=u4(),{offersCommerce:t,hasBlog:r}=o,[a,n]=hc([]),[s,l]=hc([]),[c,d]=hc([]),[f,m]=hc(null),u=p4().chrome,x=u?.products?.list,I=u?.linkFilters,b=I?void 0:u?.linkRow,v=d4(!0);qC(()=>(v.current=!0,()=>{v.current=!1}),[]),qC(()=>{let g=!0;return m4(e??void 0).then(k=>g&&v.current&&n(k)),r&&h4(e??void 0).then(k=>g&&v.current&&l(k)),t&&x?.().then(k=>g&&v.current&&d(k)),t&&I?I.load(e).catch(()=>null).then(k=>g&&v.current&&m(()=>k)):m(null),()=>{g=!1}},[e,t,r,x,I]);let C=xc(()=>({pages:a.filter(g=>!UC(g.slug)&&!_s(g.layout)).map(g=>({slug:g.slug,title:g.label,docs:[g.layout]})),popups:a.filter(g=>g.slug===Hm||_s(g.layout)).map(g=>({slug:g.slug,title:g.label})),posts:r?s.map(g=>({slug:g.slug,title:g.title})):[],products:t?c.map(g=>({href:g.href,name:g.name})):[],offers:{offersCommerce:t,offersService:r}}),[a,s,c,t,r]),w=xc(()=>f?f(C.pages):null,[f,C]);return{data:C,filters:w,pages:a,offersCommerce:t,HostLinkRow:b}}function xfe({label:e,icon:o,text:t,onTextChange:r,link:a,onLinkChange:n}){let{data:s,filters:l}=XC(),c=xc(()=>Fm(s,l),[s,l]),d=i(e);return oa(VC,{label:d,icon:o,children:oa(c4,{label:d,text:t,onTextChange:r,link:a,onLinkChange:f=>n(f),kinds:c.kinds,rules:c.rules,filtersFor:c.filtersFor})})}function ZC({value:e,onChange:o,label:t="Link"}){let r=typeof e=="string"?e:"",{data:a,filters:n,pages:s,offersCommerce:l,HostLinkRow:c}=XC(),d=a.pages.map(m=>Cs(m.slug)),f=l&&c&&(r==="/"||d.includes(r))?c:void 0;return s4("div",{children:[oa(x4,{value:r,onChange:o,label:t,data:a,filters:n}),f&&oa(f,{value:r,onChange:o,pages:s})]})}import{UiIcon as ek}from"efficient-easel/draw/client";import{phoneKey as Rs,resolveViewValue as I4,tabletKey as As}from"efficient-easel/draw";import{SECTION_PAD_UNIT_KEY as g4,convertLength as b4,isLengthUnit as QC,sideLengthAt as y4,withLength as Wm}from"efficient-easel/screen/lib/content/length-units";var Go={min:10,max:200,step:10};function S4(e,o,t,r=0){let a=U(e),n=U(o);if(a===void 0&&n===void 0)return;let s=Ic(t),l=c=>c===void 0?void 0:s==="px"?c:Wm(c,s,r);return{paddingTop:l(a),paddingBottom:l(n)}}var Ic=e=>QC(e)?e:"px",w4="sf-pad-top-phone",C4="sf-pad-bottom-phone",v4="--sf-pad-t-phone",k4="--sf-pad-b-phone",T4="sf-pad-left-phone",P4="sf-pad-right-phone",E4="--sf-pad-l-phone",O4="--sf-pad-r-phone",_4="sf-pad-top-tablet",R4="sf-pad-bottom-tablet",A4="sf-pad-left-tablet",F4="sf-pad-right-tablet",L4="--sf-pad-t-tablet",B4="--sf-pad-b-tablet",D4="--sf-pad-l-tablet",N4="--sf-pad-r-tablet";function bc(e){let o={desktop:e.unit,tablet:e.unitTablet,phone:e.unitPhone},t=S4(e.top,e.bottom,e.unit,e.frame),r=zm({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);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 M4=[["top","paddingTop",[_4,L4],[w4,v4]],["bottom","paddingBottom",[R4,B4],[C4,k4]],["left","paddingLeft",[A4,D4],[T4,E4]],["right","paddingRight",[F4,N4],[P4,O4]]];function wfe(e,o,t){return!QC(o)||o==="px"?e:b4(e,"px",o,t,{min:0,max:Go.max,step:1})}function H4(e,o,t,r={},a=0){let n=(x,I)=>{if(I==="px")return`${x}px`;let b=Wm(x,I,a);return typeof b=="number"?`${b}px`:b},s={n:e,[As("n")]:o,[Rs("n")]:t,u:r.desktop,[As("u")]:r.tablet,[Rs("u")]:r.phone},l=I4("spacing",e,o,t,$r()),c=(x,I,b)=>{let v=y4(s,{side:"n"},"u",x,"side");if(!v)return;let C=I!==null&&!b&&v.unit==="px"&&typeof l[I]=="number";return n(C?l[I]:v.value,v.unit)},d=c("desktop",null,!0),f={},m=c("tablet","tablet",o!==void 0);m!==void 0&&(o!==void 0||m!==d)&&(f.tablet=m);let u=c("mobile","phone",t!==void 0);return u!==void 0&&(t!==void 0||u!==d)&&(f.phone=u),f}function zm(e,o,t={},r=e,a={},n=0){let s={},l={},c=[];for(let[d,f,...m]of M4){let u=U(e[d]),x=d==="top"||d==="bottom"?n:0;u!==void 0&&(s[f]=Ic(a.desktop)==="px"?u:Wm(u,Ic(a.desktop),x));let I=H4(U(r[d]),U(t[d]),U(o[d]),a,x);for(let[b,[v,C]]of[["tablet",m[0]],["phone",m[1]]]){let w=I[b];w!==void 0&&(c.push(v),l[C]=w)}}return{classes:c,style:{...s,...l}}}function JC(e,o,t){let r=U(e)??t,a=U(o);return r===void 0?a:a===void 0?r:r+a}function yc(e,o={}){return{top:JC(e.padTop,e.sectionPaddingTop,o.top),bottom:JC(e.padBottom,e.sectionPaddingBottom,o.bottom)}}var gc={top:"sectionPaddingTop",bottom:"sectionPaddingBottom",left:"sectionPaddingLeft",right:"sectionPaddingRight"};function ev(e,o=gc,t=!0,r=o===gc?g4:void 0){let a={};r&&(e[r]!==void 0&&(a.unit=e[r]),e[As(r)]!==void 0&&(a.unitTablet=e[As(r)]),e[Rs(r)]!==void 0&&(a.unitPhone=e[Rs(r)]));for(let n of t?["top","bottom","left","right"]:["top","bottom"])a[n]=e[o[n]],a[`${n}Tablet`]=e[As(o[n])],a[`${n}Phone`]=e[Rs(o[n])];return a}function ov(e){return bc(e)}function tv(e,o){let t=(r,a)=>typeof r!="number"?void 0:Ic(a)==="px"?r+o:r;return bc({...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 Sc,buttonBorderOf as W4,buttonFillOpacityOf as z4,buttonPadSidesOf as G4}from"efficient-easel/draw";import{BUTTON_PAD_UNIT_KEY as Gm}from"efficient-easel/screen/lib/content/length-units";var $4="px-6 py-4",U4=4,wc=e=>{let o=new RegExp(`\\bp${e}-(?:\\[(\\d+)px\\]|(\\d+))`).exec($4);if(!o)throw new Error(`BUTTON_PAD_CLASSES has no p${e}`);return o[1]!==void 0?Number(o[1]):Number(o[2])*U4},_fe={top:wc("y"),right:wc("x"),bottom:wc("y"),left:wc("x")},av="var(--btn)";function j4(e){let o=e.variant==="ghost",t=z4(e.buttonFillOpacity),r=W4(e.buttonBorder),a=oe(e.buttonColor);return{fillOpacity:t??(o?0:100),border:{width:r?.width??1,color:r?.color??a??(o?"currentColor":av)},changed:t!==void 0||r!==void 0}}function Rfe(e){let o=j4(e);if(!o.changed)return null;let t=oe(e.buttonColor)??av;return{background:o.fillOpacity===0?"transparent":o.fillOpacity===100?t:`color-mix(in srgb, ${t} ${o.fillOpacity}%, transparent)`,borderWidth:o.border.width,borderStyle:"solid",borderColor:o.border.color}}var K4="var(--sf-button-radius, 0)";function Afe(e){let o=U(e.buttonCorners),t=wt(e.buttonCornerSides);if(o===void 0&&t===null)return null;let r=o===void 0?K4:`${Math.max(0,o)}px`;return{borderRadius:t===null?r:Vr(r,t)}}function Ffe(e){let o=n=>G4({top:e[`${Sc.top}${n}`],right:e[`${Sc.right}${n}`],bottom:e[`${Sc.bottom}${n}`],left:e[`${Sc.left}${n}`]})??{},t={desktop:e[Gm],tablet:e[`${Gm}Tablet`],phone:e[`${Gm}Phone`]},{classes:r,style:a}=zm(o(""),o("Phone"),o("Tablet"),void 0,t);return Object.keys(a).length?{className:r.join(" "),style:a}:null}var rv="upper";function nv(e,o,t){let r=e&&typeof e=="object"?e:{},a=oe(r.textStyle),n=a?oe(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:c}=t,d=oe(r.case)??rv;return`${l} \xB7 ${c[d]??c[rv]}`}import{usePreviewParts as cW}from"efficient-easel/draw/client";import{encodePartId as dW}from"efficient-easel/draw";import{DEFAULT_EASEL_STRINGS as fW,useEaselStrings as uW}from"efficient-easel/strings";import{LENGTH_UNITS as q4}from"efficient-easel/screen/lib/content/length-units";var V4=["auto","fixed","screen"],Y4=q4.filter(e=>e==="px"||e==="%"),X4="svh",Z4="vh",J4="var(--sf-header-h, 88px)",$m={min:40,max:2e3,step:10,fallback:600},Um={min:10,max:200,step:5,fallback:100},Q4="sf-section-minh",Cc="grid-cols-[minmax(0,1fr)]",sv={base:"--sf-section-minh",small:"--sf-section-minh-s"},jm=e=>typeof e=="string"&&V4.includes(e),e3=e=>typeof e=="string"&&Y4.includes(e);function Fs(e){let o=jm(e.sectionHeightMode)?e.sectionHeightMode:"auto",t=o==="screen"?"%":e3(e.sectionHeightUnit)?e.sectionHeightUnit:"px",r=o==="screen"?Um.fallback:$m.fallback,a=typeof e.sectionHeightValue=="number"?e.sectionHeightValue:r;return{mode:o,value:a,unit:t}}function cv(e){let{mode:o,value:t,unit:r}=Fs(e);if(o==="auto")return;if(o==="fixed"&&r==="px")return[`${t}px`,null];let a=t/100,n=s=>o==="screen"?`(100${s} - ${J4})`:`100${s}`;return[`calc(${n(Z4)} * ${a})`,`calc(${n(X4)} * ${a})`]}function dv(e){let o=cv(e);if(!o)return;let[t,r]=o;return{display:"grid",[sv.base]:t,...r?{[sv.small]:r}:{}}}var Dfe=new Set(["Hero","HeroSingle","IntroBleed","CategoryBar","DocTabs"]),en="Height",fv="sf-section-minh-phone",lv={base:"--sf-section-minh-p",small:"--sf-section-minh-ps"};function Km(e){return jm(e.sectionHeightModePhone)}function Nfe(e){return Fs({sectionHeightMode:e.sectionHeightModePhone,sectionHeightValue:e.sectionHeightValuePhone,sectionHeightUnit:e.sectionHeightUnitPhone})}var uv="sf-section-minh-tablet",iv={base:"--sf-section-minh-t",small:"--sf-section-minh-ts"};function Ls(e){return jm(e.sectionHeightModeTablet)}function pv(e){return Fs({sectionHeightMode:e.sectionHeightModeTablet,sectionHeightValue:e.sectionHeightValueTablet,sectionHeightUnit:e.sectionHeightUnitTablet})}function mv(e){let o=dv(e),t=(l,c,d)=>cv({sectionHeightMode:l,sectionHeightValue:c,sectionHeightUnit:d})??(o?["auto",null]:void 0),r=Ls(e)?t(e.sectionHeightModeTablet,e.sectionHeightValueTablet,e.sectionHeightUnitTablet):void 0,a=Km(e)?t(e.sectionHeightModePhone,e.sectionHeightValuePhone,e.sectionHeightUnitPhone):r;if(!o&&!r&&!a)return null;let n=[Q4,Cc],s={...o??{}};return r&&(n.push(uv),s[iv.base]=r[0],r[1]&&(s[iv.small]=r[1])),a&&(n.push(fv),s[lv.base]=a[0],a[1]&&(s[lv.small]=a[1])),{className:n.join(" "),style:s}}function Mfe(e){return mv(e)!==null}var o3=`grid ${Cc}`,hv="h-full",t3="view-tablet:max-view-desktop:grid",xv="max-view-tablet:grid",r3=`${xv} ${Cc}`;function Iv(e){let o=mv(e);if(!o)return"";if(dv(e))return o3;let t=o.className.split(" ");if(!t.includes(uv))return r3;let r=t.includes(fv);return[t3,r?xv:"",Cc].filter(Boolean).join(" ")}var vc="Stick to top",pr={min:0,max:200,step:4,fallback:0},a3="sf-section-stick",zfe="sf-scroll-over",n3="sf-section-stick-tablet-on",s3="sf-section-stick-tablet-off",l3="sf-section-stick-phone-on",i3="sf-section-stick-phone-off",qm={desktop:"--sf-stick-distance",tablet:"--sf-stick-distance-tablet",phone:"--sf-stick-distance-phone"},Gfe=new Set(["CategoryBar","DocTabs","IntroBleed","Contents"]);function Vm(e){let o=U(e)??pr.fallback;return Math.min(pr.max,Math.max(pr.min,Math.round(o)))}function Ym(e){return typeof e.stickTopTablet=="boolean"}function Xm(e){return typeof e.stickTopPhone=="boolean"}function kc(e){let o=e.stickTop===!0,t=Vm(e.stickTopDistance),r=Ym(e),a=r?e.stickTopTablet===!0:o,n=r?Vm(e.stickTopDistanceTablet):t,s=Xm(e),l=s?e.stickTopPhone===!0:a,c=s?Vm(e.stickTopDistancePhone):n;return{desktop:o,desktopDistance:t,tablet:a,tabletDistance:n,ownTablet:r,phone:l,phoneDistance:c,ownPhone:s}}function $fe(e){let o=kc(e);if(!o.desktop&&!o.tablet&&!o.phone)return null;let t=[a3],r={};return o.desktop&&(r[qm.desktop]=`${o.desktopDistance}px`),o.ownTablet&&(t.push(o.tablet?n3:s3),o.tablet&&(r[qm.tablet]=`${o.tabletDistance}px`)),(o.ownPhone||o.ownTablet||o.phone!==o.desktop)&&(t.push(o.phone?l3:i3),o.phone&&(r[qm.phone]=`${o.phoneDistance}px`)),o.desktop||t.push("sf-section-stick-desktop-off"),{className:t.join(" "),style:r}}var c3=["column","row","tabs","accordion"];var d3={column:"Stacked",row:"One row",tabs:"Tabs",accordion:"Accordion"},gv={Flex:c3,HeroGroup:["column","row"]},f3={Flex:"row",HeroGroup:"column"},u3={column:"flex-col",row:"flex-row",tabs:"flex-col",accordion:"flex-col"};function on(e,o){return gv[e].includes(o)?o:f3[e]}function jfe(e,o){return u3[on(e,o)]}function bv(e){return gv[e].map(o=>({label:d3[o],value:o}))}var p3=["solid","dashed","dotted"],Sv=["top","right","bottom","left"],wv="sf-section-border",Cv="sf-section-border-self",m3=/^#(?:[0-9a-f]{3}|[0-9a-f]{4}|[0-9a-f]{6}|[0-9a-f]{8})$/i,yv=e=>typeof e=="number"&&Number.isFinite(e)?`${Math.min(20,Math.max(0,Math.round(e)))}px`:void 0;function tn(e,{phone:o=!1,tablet:t=!1}={}){if(!e||typeof e!="object")return;let r=o?"-phone":t?"-tablet":"",a={};for(let n of Sv){let s=yv(e[n])??yv(e.width);s!==void 0&&(a[`--sf-border-${n}-width${r}`]=s)}return typeof e.style=="string"&&p3.includes(e.style)&&(a[`--sf-border-style${r}`]=e.style),typeof e.color=="string"&&m3.test(e.color)&&(a[`--sf-border-color${r}`]=e.color.toLowerCase()),Object.keys(a).length?a:void 0}function Zm(e){let{width:o,...t}=e;return typeof o!="number"?e:{...t,...Object.fromEntries(Sv.map(r=>[r,t[r]??o]))}}function qfe(e,o,t){let r=tn(e),a=tn(t,{tablet:!0}),n=tn(t,{phone:!0})||tn(o,{phone:!0})?{...tn(t,{phone:!0}),...tn(o,{phone:!0})}:void 0;return r||a||n?{...r,...a,...n}:void 0}var Tc="sf.gapContainer",Ht={min:-32,max:64,step:2},Pv={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},rn={Grid:24,Flex:24,FooterGroup:16,HeroGroup:0,Events:24,GalleryB:8,ProductGrid:2},h3=new Set(["Events","GalleryB"]);function ra(e,o,t){if(typeof o=="number"&&Number.isFinite(o)&&o>=Ht.min)return o;if(typeof o=="string"){let r=Pv[e]?.[o];if(typeof r=="number")return r}return typeof t=="number"&&Number.isFinite(t)?t:rn[e]}var x3="sf-gap-overlap",I3="--sf-gap-overlap",Ev="--sf-block-gap",g3="--sf-block-gap-rem",ta={min:0,max:Ht.max,step:Ht.step};function Bs(e){if(typeof e!="number"||!Number.isFinite(e))return null;let o=Math.min(Math.max(Math.round(e),ta.min),ta.max);return o-o%ta.step}function Yfe(e){let o=Bs(e);return o===null?{}:{[Ev]:`${o}px`,[g3]:`${o/16}rem`}}var b3="--sf-block-gap-phone",y3="--sf-block-gap-phone-rem",S3="--sf-block-gap-on-phone",w3="max-view-tablet:[--sf-block-gap-on-phone:var(--sf-block-gap-phone)]";function Xfe(e){let o=Bs(e);return o===null?{}:{[b3]:`${o}px`,[y3]:`${o/16}rem`}}function Zfe(e){return Bs(e)===null?"":w3}var vv="sf-gap-zone",kv="--sf-gap-len";function Pc(e,o){return typeof o=="number"&&Number.isFinite(o)&&o>=Ht.min?!0:typeof o=="string"&&typeof Pv[e]?.[o]=="number"}var Tv="--sf-gap-len-phone",C3="--sf-gap-len-tablet",Ds={min:0,max:Ht.max,step:Ht.step};function mr(e){return typeof e=="number"&&Number.isFinite(e)&&e>=Ds.min}function Jm(e){return e/2}function Qm(e,o,t){return mr(t)&&!Pc(e,o)}function eh(e,o,t,r,a){return mr(o)?o:Qm(e,t,a)?a:Jm(ra(e,t,r))}var v3={block:"sf-gap-overlap-block",inline:"sf-gap-overlap-inline",both:"sf-gap-overlap-both"};function Jfe(e,o,t,r,a){let n={...mr(r)?{[Tv]:`${r}px`}:null,...mr(a)?{[C3]:`${a}px`}:null};if(!Pc(e,o)){let l=`${rn[e]}px`,c=h3.has(e)?`var(--sf-card-gap, ${l})`:l;return{className:` ${vv}`,style:{[kv]:`var(${Ev}, ${c})`,[Tv]:`var(${S3})`,...n}}}let s=ra(e,o);return s>=0?{className:` ${vv}`,style:{[kv]:`${s}px`,...n}}:{className:` ${x3} ${v3[t]}`,style:{gap:"0px",[I3]:`${-s/2}px`}}}import{parseHexColor as k3}from"efficient-shell/format";var mo="var(--section-bg)",oh="inherit";function Ct(e,o){return e===oh?mo:e===void 0?o:Ec(e)}var T3=/var\(\s*--(surface-2|surface|line)\s*(?=[,)])/g;function Ec(e){return e.replace(T3,"var(--site-$1")}var P3={"var(--section-bg)":"band","var(--site-surface)":"surface","var(--site-surface-2)":"surface2"};function th(e,o,t){let r=Ct(e,o);if(!r||r==="transparent")return t.background.toLowerCase();let a=r.trim(),n=a.startsWith("#")?k3(a):null;if(n)return n.toLowerCase();let s=P3[a.replace(/\s+/g,"")];return(s?t[s]:t.background).toLowerCase()}var rh="transparent";function Ov(e,o){let t=Ct(e,o);return!t||t===rh?"none":t===mo?"band":null}function _v(e,o,t=o){let r=n=>!n||n==="transparent",a=Ct(e,o);return a===t||r(a)&&r(t)}var Rv=["transparent","var(--wheel-stage)","var(--surface)","var(--surface-2)"],Av={transparent:"No fill","var(--wheel-stage)":"Image stage","var(--surface)":"Panels and cards","var(--surface-2)":"Second surface"},an="var(--wheel-stage)",Oc="transparent",Ns="inherit";function rue(e,o){return Ec(ah(e,o))}function ah(e,o){return e===Ns?an:e==null?o:e===!0?an:e===!1?Oc:e}function aue(e){return typeof e=="string"&&e!==Ns?Ec(e):an}function nue(e){return e!==Oc&&e!=="none"&&e!==""}function Fv(e,o){return e===Ns||e===!0?!0:e==null?o===an:!1}var Lv="inherit",_c="fixed",Bv=e=>typeof e!="number"&&e!==_c,E3="var(--sf-heading-max, 9999px)";function lue(e,o,t,r){if(typeof e=="number")return`${e}px`;if(e===_c)return o;let a=r?`var(--size-${r}, ${o})`:o;return t==="heading"?`min(${a}, ${E3})`:a}var co={min:1e3,max:2e3,step:50,default:1600};function O3(e){return{maxWidth:e,marginInline:"auto",width:"100%"}}var Dv="--sf-site-width",nh=`var(${Dv},${co.default}px)`,cue=`max-w-[${nh}]`,due=`max-w-[${co.default}px]`;function Nv(e){return typeof e!="number"||!Number.isFinite(e)?co.default:Math.round(Math.min(Math.max(e,co.min),co.max))}function fue(e){let o=Nv(e);return o===co.default?{}:{[Dv]:`${o}px`}}var Wt={min:0,max:80,step:4,default:40},Mv="--sf-site-gutter",Ms={min:0,max:24,step:4},_3="--sf-site-gutter-phone",R3="max-view-tablet:[--sf-site-gutter:var(--sf-site-gutter-phone)]!",at=`var(${Mv},${Wt.default}px)`,A3=`px-[${at}]`;var hr={md:`min(24px,${at})`,sm:`min(20px,${at})`,frame:`min(24px,${at})`,tabs:`min(16px,${at})`},uue=[[`max-view-desktop:px-[${hr.md}]`,"max-view-desktop:px-6"],[`max-view-desktop:px-[${hr.tabs}]`,"max-view-desktop:px-4"],[`max-[960px]:px-[${hr.frame}]`,"max-[960px]:px-6"],[`max-[900px]:px-[${hr.md}]`,"max-[900px]:px-6"],[`max-view-wide:px-[${hr.md}]`,"max-view-wide:px-6"],[`max-view-tablet:px-[${hr.sm}]`,"max-view-tablet:px-5"],[`max-view-wide:px-[${hr.sm}]`,"max-view-wide:px-5"],[`max-[640px]:px-[${hr.sm}]`,"max-[640px]:px-5"],[`view-wide:px-[${at}]`,"view-wide:px-10"],[`max-view-tablet:px-[min(24px,${at})]`,"max-view-tablet:px-6"],[`max-view-wide:-mx-[min(20px,${at})]`,"max-view-wide:-mx-5"],[`max-view-tablet:-mx-[min(20px,${at})]`,"max-view-tablet:-mx-5"],[`-mx-[${at}]`,"-mx-10"],[A3,"px-10"]];var pue="mx-auto max-w-[var(--sf-site-width,1600px)] px-[var(--sf-site-gutter,40px)] max-view-wide:px-[min(20px,var(--sf-site-gutter,40px))]",Hv="[--sf-box-g:var(--sf-site-gutter,40px)] [&>*]:[--sf-site-gutter:0px]";var mue="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 Rc(e){return typeof e!="number"||!Number.isFinite(e)?Wt.default:Math.round(Math.min(Math.max(e,Wt.min),Wt.max))}function hue(e){let o=Rc(e);return o===Wt.default?{}:{[Mv]:`${o}px`}}function Ac(e){return typeof e!="number"||!Number.isFinite(e)?null:Math.round(Math.min(Math.max(e,Ms.min),Ms.max))}function Wv(e){return typeof e=="number"&&Number.isFinite(e)?Nv(e):null}function xue(e){let o=Ac(e);return o===null?{}:{[_3]:`${o}px`}}function Iue(e){return Ac(e)===null?"":R3}function Fc(e){return Math.min(Ms.max,Rc(e))}var zv=nh,gue=`max-w-[${zv}]`,bue=`max-w-[min(var(--sf-page-cap,${co.default}px),${co.default}px)]`,Gv="--sf-hero-cap",F3=`var(${Gv},none)`,yue=`max-w-[${F3}]`,L3="--sf-hero-bleed-m",B3="--sf-hero-bleed-w",D3="--sf-hero-chrome-x",N3="--sf-hero-chrome-cap";function Sue(e){return e===!0?{[Gv]:zv,[L3]:"auto",[B3]:"100%",[D3]:"24px",[N3]:"none"}:{}}var sh=`calc(${nh} - ${at}*2)`,wue=`max-w-[${sh.replace(/ /g,"_")}]`;var M3="--sf-chrome-cap",H3=`var(${M3},${sh})`,Cue="data-page-width";function vue(e){return e==="full"?"full":null}function kue(e){return e==="full"?null:O3(e==="content"?sh:H3)}function Tue(e){if(e==="full")return"full";if(e==="content")return"content"}var W3=["page","full"],$v=["full","page"],aa={full:"Full",page:"Content"},lh="inherit",z3=e=>typeof e=="string"&&W3.includes(e),G3=e=>e===lh;function $3(e,o){return G3(e.widthMode)?{mode:"full",inherited:!0}:z3(e.widthMode)?{mode:e.widthMode,inherited:!1}:{mode:o,inherited:o==="full"}}function Oue(e){return $3(e,"page").mode==="full"}var U3={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 _ue(e){return Object.prototype.hasOwnProperty.call(U3,e)}var ro={background:"sectionBackgroundWidth",content:"sectionContentWidth",contentMax:"sectionContentMax"};function Lc(e){let o=Wv(e[ro.contentMax]),t=nn(e[ro.content])??(o===null?null:"content");return{background:nn(e[ro.background]),content:t,contentMax:t==="content"?o:null}}function Rue(e){let o=Lc(e);return o.content===null&&e.fullWidth===!0?{...o,content:"full"}:o}function Aue(e){return e.background!==null||e.content!==null}var Fue=e=>({[ro.background]:e}),Lue=e=>e==="full"?{[ro.content]:e,[ro.contentMax]:void 0}:{[ro.content]:e},Bue=e=>({[ro.content]:"content",[ro.contentMax]:e}),Due=e=>e==="background"?{[ro.background]:void 0}:{[ro.content]:void 0,[ro.contentMax]:void 0},Uv="siteWidths",j3=e=>e==="full"||e==="content";function nn(e){return j3(e)?e:null}function jv(e,o){return{[Uv]:{background:nn(e),content:nn(o)}}}function Nue(e){let o=e.editor?.metadata?.[Uv];return{background:nn(o?.background),content:nn(o?.content)}}import{jsx as K3}from"react/jsx-runtime";import{createContext as q3,useContext as zue}from"react";var V3=2,Gue=V3+1,Y3=q3(2);function Kv({tier:e,children:o}){return K3(Y3.Provider,{value:e,children:o})}import{useEaselSession as pW}from"efficient-easel/screen/lib/session-context";import{BOX_GAP as mW,describedAs as gr,group as lt,iconOf as Gs,sharedStyleKinds as $s}from"efficient-easel/screen/lib/document/box-fields";import{VIEW_KEY_ACCESS as mh,onDesktopWords as fn,phoneTwinFields as zc}from"efficient-easel/screen/lib/document/box-fields";import{createElement as nt}from"react";import{SettingsDefaultReset as X3,SettingsField as Z3}from"efficient-easel/panel";import{boxFieldBuilders as J3,describedAs as Q3,iconOf as e6,onDesktopWords as o6}from"efficient-easel/screen/lib/document/box-fields";import{LENGTH_UNITS as t6}from"efficient-easel/screen/lib/content/length-units";import{IconPicker as r6,Tooltip as a6,useShellStrings as n6}from"efficient-shell/ui";var qv=e=>i(e),s6=t6,fo=J3(qv,{paddingUnits:s6}),vo=fo.slider,st=fo.select,Bc=fo.Segmented,sn=fo.segmented,Xue=fo.alignmentField,Zue=fo.alignmentFields,Jue=fo.blockAlignmentField,Que=fo.blockAlignmentFields,epe=fo.boxJustifyField,ope=fo.boxAlignField,tpe=fo.boxWrapField,Vv=fo.directionField,Dc=fo.gapField,rpe=fo.placementField,ape=fo.PlacementGridView,npe=fo.positionFields,Nc=fo.sidesPaddingFields,l6={width:"3.5rem",height:"2.75rem"};function ih({value:e}){return n6().iconNames[e]??e}function Hs(e,o,t){return nt(a6,{content:t,className:"sf-pick-tip",children:nt("span",{className:"sf-pick"},nt("span",{className:"sf-pick-pic"},e),nt("span",{className:"sf-pick-cap"},o))})}function i6(e){let o=t=>t.label===void 0?nt(ih,{value:t.value}):i(t.label);return e.map(t=>({value:t.value,...t.label===void 0?{}:{label:i(t.hint??t.label)},icon:Hs(t.picture,o(t),t.hint===void 0?o(t):i(t.hint))}))}function Yv(e,o){return nt("span",{className:"sf-pick"},nt("span",{className:"sf-pick-pic"},e),nt("span",{className:"sf-pick-cap sf-pick-cap-closed"},o))}function Xv(e,o,t,r,a={}){let n=c=>t.some(d=>d.value===c),s=c=>a.resolve?a.resolve(c):n(c)?c:void 0,l=t.map(c=>({value:c.value,...c.label===void 0?{}:{label:c.label},...c.showWhen?{showWhen:c.showWhen}:{}}));return{type:"custom",...Q3({},{type:"radio",label:e,options:l}),options:l,render:c=>{let{value:d,onChange:f,field:m}=c,u=m?.options,x=i6(t.filter(k=>!u||u.some(T=>T.value===k.value))),I="follows"in c,b=I?s(a.phoneRest?a.phoneRest(c.follows):c.follows)??r:void 0,v=m?.currentValue,C=s(d)??b??s(v)??r,w=d!=null&&d!=="",g=b===void 0?void 0:t.find(k=>k.value===b);return nt(Z3,{label:i(e),icon:e6(o),action:I?nt(X3,{words:Q()?.panel,label:i(e),changed:w,detail:g?.label!==void 0?o6(qv,i(g.label),c.followsView):void 0,disabled:c.readOnly===!0,onReset:()=>f(void 0)}):void 0},nt(r6,{label:i(e),value:C,options:x,onChange:f,columns:a.columns,cell:a.cell??l6,tooltips:!1,disabled:c.readOnly===!0}))}}}import{TEXT_CONTROL_KINDS as Hme,SCALAR_TEXT_CONTROLS as Wme}from"efficient-easel/draw";function na(e,o){return i("{value} from {from}",{value:e,from:o})}function hW(){let{blockGap:e}=ce();return e===null?i("this container's own spacing"):na(`${e}px`,i("Styles"))}function xW({inherited:e,onReset:o,label:t}){return S(ho,{words:Q()?.panel,label:i(t),changed:!e,detail:hW(),onReset:o})}function IW(e){return Dc({...mW,builtIn:rn[e],resolve:(o,t)=>ra(e,o,t?.siteGap),action:(o,t)=>S(xW,{inherited:!Pc(e,o),onReset:()=>t(void 0),label:"Gap"}),mark:{[Tc]:e}})}function gW(e){return Xe(vt("mobile",{[Tc]:e,type:"custom",render:o=>S(SW,{container:e,...o})}),bk)}function bW(e){return Xe(vt("tablet",{[Tc]:e,type:"custom",render:o=>S(yW,{container:e,...o})}),bk)}var bk={not:{field:"gap",in:Array.from({length:-Ht.min},(e,o)=>Ht.min+o)}};function Rme(e){return{gap:vt("desktop",IW(e)),[cn("gap")]:bW(e),[zt("gap")]:gW(e)}}function yW({container:e,...o}){let[t]=$t("gap"),{siteGap:r}=o.field??{},a=Math.max(Ds.min,ra(e,t,r));return Dc({...Ds,builtIn:a,resolve:n=>mr(n)?n:a,action:(n,s)=>S(ho,{words:Q()?.panel,label:i("Gap"),changed:mr(n),detail:fn(l=>i(l),`${a}px`),onReset:()=>s(void 0)})}).render(o)}function SW({container:e,...o}){let[t]=$t("gap"),{siteGap:r,siteGapPhone:a}=o.field??{},n=eh(e,void 0,t,r,a);return Dc({...Ds,builtIn:n,resolve:s=>eh(e,s,t,r,a),action:(s,l)=>S(ho,{words:Q()?.panel,label:i("Gap"),changed:mr(s),detail:na(`${n}px`,Qm(e,t,a)?i("Styles"):i("Desktop")),onReset:()=>l(void 0)})}).render(o)}function Ame(e){return Vv({offered:bv(e),fallback:on(e,void 0),resolve:o=>on(e,o)})}function Fme(e,o){return gw(o?Jp(e,o):[],o)}function wW({inherited:e,onReset:o,label:t}){return S(ho,{words:Q()?.panel,label:i(t),changed:!e,detail:na(i("Full"),i("the page")),onReset:o})}function sa({value:e,onChange:o,label:t,placeholder:r,hint:a,multiline:n,hideable:s=!0,markup:l=!0}){let{text:c,hidden:d}=br(e),f=Ws(null),m=Ws(null),u=w=>o(s?{text:w,hidden:d}:w),x=()=>o({text:c,hidden:!d}),I=s&&d,b=sk(),v=a?PW(a)?S("span",{className:"sf-hint-keep sf-hint-while-typing",children:i(a)}):S(ww,{children:i(a)}):void 0,C=d?i("Show {label} on the slide",{label:i(t)}):i("Hide {label} on the slide",{label:i(t)});return S(Je,{label:i(t),icon:S(H6,{}),htmlFor:b,className:I?"is-hidden":void 0,hint:v,action:s?S(Wc,{content:C,children:S(Ik,{"aria-pressed":d,"aria-label":C,onClick:x,children:d?S(ek,{name:"eye-off",size:14}):S(ek,{name:"eye",size:14})})}):void 0,children:Ir("div",{className:"sf-copybox",children:[l&&S(im,{target:n?m:f,value:c,onChange:u}),n?S("textarea",{id:b,ref:m,value:c,placeholder:r===void 0?void 0:i(r),onChange:w=>u(w.target.value)}):S("input",{id:b,ref:f,type:"text",value:c,placeholder:r===void 0?void 0:i(r),onChange:w=>u(w.target.value)})]})})}function Lme(e,o){return{...e,[I6]:o}}function Bme(e){let o=e[Gt];if(!o)throw new Error("withOffPage: the field holds no authored text");return{...e,[Gt]:{...o,offPage:!0}}}function $c(e){return!e||typeof e!="object"?!1:e[Gt]?.offPage===!0}var yk="sfPanelOnly";function Dme(e){if(!e[Gt])throw new Error("withPanelOnly: the field holds no authored text");return{...e,[yk]:!0}}function Sk(e){return!!e&&typeof e=="object"&&e[yk]===!0}function Nme(e){let o=e[Gt];if(!o)throw new Error("withIdentifier: the field holds no authored text");return{...e,[Gt]:{...o,identifier:!0}}}function zme(e,o){if(!e[Gt])throw new Error("inOwnBox: the field holds no authored text");let{[sW]:t,...r}=e;return{...r,[cm]:!0,render:o}}var CW=new Set(iW),Gc={type:"radio",options:[{value:!0},{value:!1}]},wk={text:{type:"object",objectFields:{text:{type:"text"},hidden:Gc}},textarea:{type:"object",objectFields:{text:{type:"textarea"},hidden:Gc}},plainText:{type:"text"},copyText:{type:"text"},plainTextarea:{type:"textarea"},textList:{type:"array",arrayFields:{text:{type:"text"}}}},la=(e,o)=>{let t=gr({...o,[Gt]:e},{...wk[e.control],label:e.label});if(!CW.has(e.control))return t;let r=o.render;return{...gk(t,"authored-copy"),render:a=>S(Yw,{name:a.name,children:r(a)})}},Gme="Everything else on this block comes from the linked post. Unlink it to edit by hand.",vW={field:"source.slug",set:!0},$me={not:vW},kW="Select a word, then press the highlighter.",TW=new Set([kW]),PW=e=>TW.has(e);function Ume(e,o,t){return la({control:"text",label:e,placeholder:o,hint:t},{type:"custom",render:({value:r,onChange:a})=>S(sa,{value:r,onChange:a,label:e,placeholder:o,hint:t})})}function jme(e,o,t){return la({control:"textarea",label:e,placeholder:o,hint:t},{type:"custom",render:({value:r,onChange:a})=>S(sa,{value:r,onChange:a,label:e,placeholder:o,hint:t,multiline:!0})})}function Kme(e,o,t){return la({control:"plainText",label:e,placeholder:o,hint:t},{type:"custom",render:({value:r,onChange:a})=>S(sa,{value:r,onChange:a,label:e,placeholder:o,hint:t,hideable:!1,markup:!1})})}function qme(e,o,t){return la({control:"copyText",label:e,placeholder:o,hint:t},{type:"custom",render:({value:r,onChange:a})=>S(sa,{value:r,onChange:a,label:e,placeholder:o,hint:t,hideable:!1})})}function Vme(e){return{type:"custom",[h6]:{label:e},...gr({},{type:"text",label:e}),render:({value:o,onChange:t})=>S(ZC,{value:m6(o),onChange:t,label:e})}}function Yme(e,o,t){return la({control:"plainTextarea",label:e,placeholder:o,hint:t},{type:"custom",render:({value:r,onChange:a})=>S(sa,{value:r,onChange:a,label:e,placeholder:o,hint:t,multiline:!0,hideable:!1})})}var Ck={Design:g6,Animation:y6};function Xme(e){return{type:"custom",render:()=>S(EW,{text:e})}}function EW({text:e}){return S("p",{className:"sf-note",children:i(e)})}function Zme(e){return jt(e)!==null&&e?.tabs!==void 0}var ok=new Map;function Uc(e,o){let t=`${e}\0${o?o.join(""):""}`,r=ok.get(t)??{type:"custom",tabs:o,[lk]:{label:e,level:1},bucket:e,marker:!0,render:()=>S(Ut,{})};return ok.set(t,r),r}var tk=new Map;function hh(e){let o=tk.get(e)??{type:"custom",[lk]:{label:e,level:1},designGroup:e,marker:!0,...e==="Content"?{}:{fold:e},render:()=>S(Ut,{})};return tk.set(e,o),o}function OW(e){let o=e;return o?.marker===!0&&typeof o.fold=="string"?o.fold:null}function vk(e,o){return OW(e)===o?e:{...e,marker:!0,fold:o,render:()=>S(Ut,{})}}function kk(e){let o=e;if(o.marker===!0&&o.fold===void 0)return e;let{fold:t,...r}=e;return{...r,marker:!0,render:()=>S(Ut,{})}}function xh({title:e,children:o}){let[t,r]=zs(()=>!ch.has(e));return S(G6,{title:e,open:t,onToggle:a=>{r(a),a?ch.delete(e):ch.add(e)},children:o})}var ch=new Set;function _W({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 Ir("div",{className:"sf-swatches",children:[e.map(l=>{let c=r?.[l]?i(r[l]):l;return S(Wc,{content:c,children:S(Z6,{color:l,selected:o.toLowerCase()===l.toLowerCase(),onClick:()=>t(l),"aria-label":c})},l)}),S("span",{className:"sf-swatch-hex",children:s})]})}function Jme(e,o,t=!1){return{type:"custom",render:({value:r,onChange:a})=>S(RW,{label:e,builtIn:o,followsBand:t,value:r,onChange:a})}}function RW({label:e,builtIn:o,followsBand:t,value:r,onChange:a}){let n=typeof r=="string"?r:void 0,{colors:s,n:l}=Dk(),c={background:s.background,surface:s.surface,surface2:Ci(s),band:ay(s)},d=t?mo:o,f=_v(n,o,d),m=th(void 0,d,c),u=t?oh:void 0,x=Ov(n,o),I=d===mo?i("the theme's section background"):i("Theme {n} background",{n:l});return S(vs,{label:i(e),icon:S(S6,{}),value:f?"":th(n,o,c),inherited:m,resetTo:na(m.toUpperCase(),I),onChange:a,onReset:()=>a(u),choices:[{label:i("No fill"),color:"",selected:x==="none",onPick:()=>a(rh)},{label:`${i("Section band")} \xB7 ${c.band.toUpperCase()}`,color:c.band,selected:x==="band",onPick:()=>a(mo)}]})}function AW(e,o){return{type:"custom",render:({value:t,onChange:r})=>{let a=t,n=Fv(a,o);return S(Je,{label:i(e),icon:S(ck,{}),changed:!n,action:S(ho,{words:Q()?.panel,label:i(e),changed:!n,detail:i("the theme's image stage"),onReset:()=>r(Ns)}),children:_W({swatches:Rv,current:n?an:ah(a,o),onPick:r,names:Av})})}}}function jc(e=t=>t,o){return $s({_gSectionTheme:lt(IC),sectionAccent:{type:"custom",render:({value:t,onChange:r})=>S(CC,{value:e(t),onChange:r,followLabel:o})}})}function Fo({min:e,max:o,step:t,value:r,onChange:a,suffix:n="",readout:s=!0,notch:l,ariaLabel:c,disabled:d=!1,placeholder:f,placeholderWord:m,onClear:u}){let x=l!==void 0&&Number.isFinite(l)&&l>=e&&l<=o;return S("div",{className:x?"sf-slider has-notch":"sf-slider",style:x?{"--sf-notch":(l-e)/(o-e)}:void 0,children:S(aW,{min:e,max:o,step:t,value:r,...r===null&&f!==void 0?{placeholderValue:f}:{},...m?{emptyLabel:i(m)}:{},suffix:n||void 0,showInput:s,label:c===void 0?void 0:i(c),disabled:d,size:"sm",boxSize:"md",className:"sf-slider-track",onChange:I=>{I===null?u?.():I!==r&&a(I)}})})}function Tk(e,o){let{min:t,max:r,step:a=1,unsetLabel:n,hint:s,restTrack:l,unsetMark:c,icon:d,unit:f="px"}=o;return{type:"custom",render:({value:m,onChange:u})=>{let x=typeof m=="number"?m:null,I=x===null;return S(Je,{label:i(e),icon:d?Gs(d):void 0,value:I?c||n===void 0?void 0:i(n):`${x}${f}`,changed:!I,action:c?nk(c,{changed:!I,onReset:()=>u(null)}):S(ho,{words:Q()?.panel,label:i(e),changed:!I,onReset:()=>u(null)}),hint:typeof s=="string"?i(s):s,children:l?l({min:t,max:r,step:a,px:x,label:e,onChange:u}):Fo({min:t,max:r,step:a,value:x??t,readout:!1,ariaLabel:e,onChange:u})})}}}var Kc="Corners";function Ih(e){return{type:"custom",render:({value:o,onChange:t})=>{let r=typeof o=="number"&&Number.isFinite(o)?o:null,a=r!==null;return S(Je,{label:i(Kc),icon:S(v6,{}),changed:a,action:nk(e.mark,{changed:a,onReset:()=>t(null)}),hint:e.hint,children:S(FW,{tier:e,px:r,onRadius:t})})}}}function $t(e){let o=dn();return[o?.values?.[e],t=>o?.onChange(e,t)]}function Pk(){return gk({type:"custom",render:()=>S(lW,{})},"always")}function bm(){let e=dn();return o=>e?.onChangeMany(o)}function FW({tier:e,px:o,onRadius:t}){let r=e.useFollowed(),[a,n]=$t(e.sidesKey),s=wt(a)??[...$i];return S(J6,{label:i(Kc),value:s,corners:GS,onChange:l=>{let c=wt(l)??[];n(c.length===$i.length?null:c)},radius:o,onRadiusChange:t,radiusMin:Mo,radiusMax:Br,radiusStep:e.step??1,radiusPlaceholder:String(r)})}function Ek(){return Pk()}function LW({label:e,changed:o=!1,onReset:t=()=>{}}){let{cornerRadiusPx:r}=ce(),a=typeof r=="number"?`${r}px`:i("not set");return S(ho,{words:Q()?.panel,label:i(e),changed:o,detail:r==null?i("the built-in corners"):na(a,i("Styles")),onReset:t})}function BW(){let{cornerRadiusPx:e}=ce();return typeof e=="number"?e:Mo}function DW(){return Ih({sidesKey:"sectionCornerSides",useFollowed:BW,mark:S(LW,{label:Kc}),hint:NW})}var NW="Follows Styles \u25B8 Basics \u25B8 Corners until you set a number here.";function qc(){return $s({_gShape:lt("Shape"),sectionCorners:DW(),sectionCornerSides:Ek(),...ln("sectionBorder",$W)})}var MW=()=>({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 HW(e){let o=Object.fromEntries(Object.entries(e).filter(([,t])=>t!=null&&t!==""));return Object.keys(o).length?o:void 0}function WW(){let e;try{let o=lo(ce().theme);e=o.themes[o.selected]?.line}catch{e=void 0}return e||Qb.line}function zW({value:e,onChange:o,placeholder:t,presets:r,sides:a=!0,styles:n=!0,above:s={}}){let l=e&&typeof e=="object"?e:{},[c,d]=zs(()=>a?q6(l,s):!1),f=MW(),m=u=>HW(a&&n?u:{width:u.width,color:u.color,...n?{style:u.style}:{}});return S(Je,{label:i("Border"),icon:S(w6,{}),action:a?S(j6,{each:c,label:i("Each side"),onChange:d}):void 0,children:S(U6,{label:i("Border"),value:l,each:c,onChange:u=>o(m(u)),placeholder:t,presets:r,words:f,styles:n,max:20})})}function GW({value:e,onChange:o,view:t}){let[r]=$t("sectionBorder"),[a]=$t(cn("sectionBorder")),n=WW(),s=c=>c&&typeof c=="object"?c:{},l=t==="phone"?{...Zm(s(r)),...Zm(s(a))}:t==="tablet"?s(r):{};return S(zW,{value:e,onChange:o,placeholder:{sides:K6(l),style:l.style??"solid",color:l.color||n},presets:[n],above:l})}function $W(e){return{type:"custom",render:({value:o,onChange:t})=>S(GW,{value:o,onChange:t,view:e})}}function ln(e,o){let t=(r,a)=>zc(e,o(r),mh)[a];return{[e]:t("desktop",e),[cn(e)]:t("tablet",cn(e)),[zt(e)]:t("phone",zt(e))}}function Qme(e){return{type:"custom",render:()=>S(UW,{partKey:e})}}function UW({partKey:e}){let[o]=$t("id"),[t]=$t("_partStyles"),{textStyles:r}=ce(),a=uW(),n=null;try{n=cW().select}catch{n=null}let s=t&&typeof t=="object"?t[e]:void 0,l=Array.isArray(r)?r:null;return S(z6,{name:i("Text"),preview:nv(s,l,{noStyle:i("No style"),styleName:a.textStyles.styleName,cases:(a.copy.panel??fW.copy.panel).cases}),onOpen:()=>{n&&typeof o=="string"&&n(dW(o,e))}})}function Ok(e){let{cornerRadiusPx:o}=ce(),t=typeof o=="number"?o:e,r=null;try{let{appState:n,selectedItem:s}=fh(c=>c),l=s?.props?.id?String(s.props.id):void 0;r=l?Dw(n?.data,l)?.props??null:null}catch{r=null}if(!r)return t;let a=r.sectionCorners;return Ap(a)?a:t}function jW({label:e,changed:o=!1,onReset:t=()=>{}}){let r=Ok(Mo);return S(ho,{words:Q()?.panel,label:i(e),changed:o,detail:na(`${r}px`,i("the section")),onReset:t})}function KW(){return S(Ut,{children:i("Follows the section's Corners until you set a number here.")})}function qW(){return Ih({sidesKey:"cardCornerSides",useFollowed:()=>Ok(Mo),mark:S(jW,{label:Kc}),hint:S(KW,{})})}function VW(){return{type:"custom",render:()=>S(YS,{})}}function ehe(){return{_gShape:lt("Shape"),cardCorners:qW(),cardCornerSides:Ek(),cardCornersApplyAll:VW()}}function YW(){return gr({type:"custom",render:e=>S(ZW,{...e})},{type:"select",label:qr,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 XW(e,o){let t=mp(e);if(t!=="custom")return i(pp.find(a=>a.value===t)?.label??"");let r=xk(Li(e,o),o);return r?[...r,100-r.reduce((a,n)=>a+n,0)].join(" / "):i("Custom")}function ZW(e){let{value:o,onChange:t}=e,[r]=$t("content"),a=Array.isArray(r)?r.length:0,n="follows"in e,s=o!=null,l=s?o:n?e.follows:void 0,c=mp(l),d=a>=2&&a<=Jv,f=()=>[...oW[a]??[]],m=Ws(null),u=C=>{let w=m.current;w&&JSON.stringify(C)===JSON.stringify(w.shares)?t(w.value):C&&t(C)},x=C=>{C===c||C==="custom"&&!d||t(C==="custom"?f():C)},I=i("The width bar works for 2 to {count} blocks.",{count:Jv}),b=s&&(n||o!=="content"),v=rW().widths.hint(a,eW);return S(Je,{label:i(qr),icon:S(uh,{}),changed:b,hint:c!=="custom"?void 0:d?v:I,action:S(ho,{words:Q()?.panel,label:i(qr),changed:b,disabled:e.readOnly===!0,detail:n?fn(C=>i(C),XW(e.follows,a),e.followsView):i("Fit content"),onReset:()=>t(void 0)}),children:Ir("div",{className:"sf-share-row",children:[S("div",{className:"sf-share-pick",children:S(hk,{label:i(qr),value:c,options:pp.map(C=>({value:C.value,label:C.value==="custom"&&!d?I:i(C.label),icon:Hs(S("span",{className:"sf-gallery-pic sf-share-pic",children:_k(C.weights).map((w,g)=>S("i",{style:{gridColumn:`span ${w}`}},g))}),i(C.label),C.value==="custom"&&!d?I:i(C.label))})),onChange:x,columns:3,cell:Rk,tooltips:!1,disabled:e.readOnly===!0})}),c==="custom"&&d?S("div",{onFocus:()=>{m.current={value:o,shares:xk(Li(l,a),a)}},onBlur:()=>{m.current=null},children:S(tW,{label:i(qr),count:a,value:Li(l,a),onChange:u,readOnly:e.readOnly===!0})}):null]})})}function _k(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 ohe(){return st(yS,S(_6,{}),gp,gp[0].value)}function the(){return vt("mobile",Xv(qr,S(uh,{}),mS.map(e=>({label:e.label,value:e.value,picture:S("span",{className:"sf-gallery-pic sf-share-pic",children:_k(e.weights).map((o,t)=>S("i",{style:{gridColumn:`span ${o}`}},t))})})),hS,{columns:2,cell:Rk}))}var Rk={width:"5.75rem",height:"3.25rem"};function rhe(){return zc("share",YW(),mh)[cn("share")]}function JW(){return vt("mobile",vo(hp,S(ik,{}),Di,pS,1,Di,"",{clear:{phoneFollows:!1,hint:Di}}))}var rk={read:e=>e.phoneRow,write:(e,o,t)=>({phoneRow:t}),fieldKey:()=>"phoneRow",ownField:!0};function ahe(){let e=vo(hp,S(ik,{}),Ip,xS,1,Ip,"",{clear:{emptyLabel:"Auto"}}),o=zc("columns",e,{...rk,tablet:mh.tablet}),t=zc("columns",e,rk,{phoneRow:JW()});return{...o,phoneRow:t.phoneRow}}function nhe(e,o,t,r,a,n){return{type:"custom",render:({value:s,onChange:l})=>S(Je,{label:i(e),icon:S(om,{noun:n}),action:S(ho,{words:Q()?.panel,label:i(e),changed:!Bv(s),detail:i("the Text style in Styles"),onReset:()=>l(Lv),defaultAction:{onPress:()=>l(_c),title:i("Keep this section's own built-in size"),icon:S(C6,{})}}),children:Fo({min:o,max:t,step:r,value:typeof s=="number"?s:a,suffix:"px",ariaLabel:e,onChange:l})})}}function she(){return{_gCellWidth:lt("Cell width"),gridSpan:st("Positions",S(uh,{}),[{label:"Auto",value:""},...Array.from({length:Vi},(e,o)=>({label:o===0?"1 position":`${o+1} positions`,value:String(o+1)}))],"")}}function $o(){let e=null,o=null;try{e=u6(gh),o=fh(t=>t).selectedItem}catch{o=null}return e??o?.props??{}}var gh=f6(null);function QW({min:e,max:o,step:t,px:r,label:a,onChange:n,desktopKey:s,fallback:l}){let c=$o()[s],d=ac(void 0,c,l);return S(Ut,{children:Fo({min:e,max:o,step:t,value:ac(r,c,l),readout:!1,ariaLabel:a,notch:d,onChange:n})})}function ez({label:e,desktopKey:o,fallback:t,unit:r="px",changed:a=!1,onReset:n=()=>{}}){let s=$o()[o],l=ac(void 0,s,t);return S(ho,{words:Q()?.panel,label:i(e),changed:a,detail:fn(c=>i(c),`${l}${r}`),onReset:n})}function Vc(e){return Tk(e.label,{icon:e.icon,min:e.min,max:e.max,step:e.step,unit:e.unit,unsetLabel:"Follows Desktop",unsetMark:S(ez,{label:e.label,desktopKey:e.desktopKey,fallback:e.fallback,unit:e.unit}),restTrack:o=>S(QW,{...o,desktopKey:e.desktopKey,fallback:e.fallback})})}var oz={Top:"Padding top",Bottom:"Padding bottom",Left:"Padding left",Right:"Padding right"},tz={Top:mk,Bottom:fk,Left:uk,Right:pk},rz=e=>{let o=tz[e];return S(o,{})};function lhe(e={}){let o=e.keys?.top??"sectionPaddingTop",t=e.keys?.bottom??"sectionPaddingBottom",r=e.group!==!1,a=v=>oz[v],n=v=>vo(a("Top"),S(mk,{}),Go.min,Go.max,Go.step,v,"px"),s=(v,C,w,g=Go)=>vt("mobile",Vc({label:a(v),icon:rz(v),desktopKey:C,min:g.min,max:g.max,step:g.step,fallback:w})),l=e.top??Go.min,c=e.bottom??Go.min,d="sectionPaddingLeft",f="sectionPaddingRight",m=e.sideBounds??Go,u=e.side??m.min,x=e.sidePhone??u,I=e.phone===!0,b=v=>I?vt("desktop",v):v;return $s({...r?{_gSpacing:lt("Padding")}:{},[o]:b(n(l)),...I?{[zt(o)]:s("Top",o,l)}:{},...e.only==="top"?{}:{[t]:b(vo(a("Bottom"),S(fk,{}),Go.min,Go.max,Go.step,c,"px")),...I?{[zt(t)]:s("Bottom",t,c)}:{}},...e.sides?{[d]:b(vo(a("Left"),S(uk,{}),m.min,m.max,m.step,u,"px")),...I?{[zt(d)]:s("Left",d,x,m)}:{},[f]:b(vo(a("Right"),S(pk,{}),m.min,m.max,m.step,u,"px")),...I?{[zt(f)]:s("Right",f,x,m)}:{}}:{}})}function ihe(e,o){let t=Object.fromEntries(Object.entries(o).map(([n,s])=>[n,n in e&&jt(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 Mc="Width";function Yc(e,o=$v,t=!0){let r=o.map(a=>({label:aa[a],value:a}));return $s({...t?{_gWidth:lt(Mc)}:{},widthMode:{type:"custom",render:({onChange:a,field:n})=>S(Je,{label:i(Mc),icon:S(W6,{}),action:t?S(wW,{inherited:n?.inherited??!1,onReset:()=>a(lh),label:Mc}):void 0,children:Bc({options:r,value:n?.currentValue||e,onChange:a,ariaLabel:Mc})})}})}function Xc(){let e=(r,a)=>({type:"custom",render:({value:n,onChange:s})=>S(az,{value:n,onChange:s,view:r,badge:a})}),o=r=>({type:"custom",render:({value:a,onChange:n,field:s})=>S(sz,{value:a,onChange:n,unit:s?.unit,view:r})}),t=r=>{let a=sn("Unit",S(dk,{}),[{label:"px",value:"px"},{label:"%",value:"%"}],"px");if(r==="desktop")return a;let n=a.render;return{...a,render:s=>S(lz,{props:s,draw:n,view:r})}};return $s({_gHeight:lt(en),...ln("sectionHeightMode",r=>r==="desktop"?e(r):e(r,a=>S(iz,{view:r,onClear:()=>a(void 0)}))),...ln("sectionHeightValue",o),...ln("sectionHeightUnit",t)})}function az({value:e,onChange:o,view:t,badge:r}){let a=$o(),n=l=>["auto","fixed","screen"].includes(l),s=Zc(t,a)?.mode??"auto";return S(Je,{label:en,icon:Gs(S(A6,{})),action:r?r(o):void 0,children:Bc({options:[{label:"Auto",value:"auto"},{label:"Fixed",value:"fixed"},{label:"Screen",value:"screen"}],value:n(e)?e:s,onChange:o,ariaLabel:en})})}function Ak(e,o){return e==="phone"&&Ls(o)?pv(o):Fs(o)}function Zc(e,o){return e==="desktop"||(e==="tablet"?Ls(o):Km(o))?null:Ak(e,o)}var xr=(e,o)=>e==="tablet"?cn(o):zt(o);function nz(e,o,t,r){let a=Zc(e,o);return!a||e==="desktop"?null:r===void 0?{}:{[xr(e,"sectionHeightMode")]:a.mode,...a.mode==="fixed"?{[xr(e,"sectionHeightUnit")]:a.unit}:{},...t==="sectionHeightUnit"?{[xr(e,"sectionHeightValue")]:a.value}:{},[xr(e,t)]:r}}function Fk(e,o,t){let r=dn(),a=Zc(e,$o());return!r||!a?{followed:null,write:t}:{followed:a,write:n=>r.onChangeMany(s=>{let l=nz(e,s,o,n);return l===null?{[e==="desktop"?o:xr(e,o)]:n}:Object.keys(l).length?l:null})}}function sz({value:e,onChange:o,unit:t,view:r}){let{followed:a,write:n}=Fk(r,"sectionHeightValue",o),s=(a?a.unit:t)==="%"?"%":"px",l=s==="%"?Um:$m;return S("div",{className:"sf-field",children:Fo({min:l.min,max:l.max,step:l.step,value:a?null:typeof e=="number"?e:l.fallback,...a?{placeholder:a.value}:{},suffix:s,ariaLabel:en,onChange:n})})}function lz({props:e,draw:o,view:t}){let{followed:r,write:a}=Fk(t,"sectionHeightUnit",e.onChange);return o({...e,...r?{value:void 0,storedValue:void 0,follows:r.unit}:{},onChange:a})}function iz({view:e,onClear:o}){let t=$o(),r=Zc(e,t)===null,a=e==="phone"&&Ls(t),n=Ak(e,t),s=fn(l=>i(l),n.mode==="auto"?i("Auto"):`${n.value}${n.unit}`,a?"tablet":"desktop");return S(ho,{words:Q()?.panel,label:i(en),changed:r,detail:s,onReset:o})}function bh(){let e=t=>({type:"custom",render:({value:r,onChange:a,id:n,name:s})=>S(fz,{value:r,onChange:a,labelId:`${n??s??"stickTop"}-label`,view:t})}),o=t=>({type:"custom",render:({value:r,onChange:a})=>S(cz,{value:r,onChange:a,view:t})});return{_gStick:lt(vc),...ln("stickTop",e),...ln("stickTopDistance",o)}}function cz({value:e,onChange:o,view:t}){let r=dn(),a=$o(),n=t==="desktop"||yh(t,a)?null:Lk(t,kc(a)),s=n&&r?l=>r.onChangeMany(c=>{let d=dz(t,c,l);return d===null?{[xr(t,"stickTopDistance")]:l}:Object.keys(d).length?d:null}):o;return S("div",{className:"sf-field",children:Fo({min:pr.min,max:pr.max,step:pr.step,value:n?null:typeof e=="number"?e:pr.fallback,...n?{placeholder:n.distance}:{},suffix:"px",ariaLabel:i("Distance from top"),onChange:s})})}function yh(e,o){return e==="tablet"?Ym(o):Xm(o)}function Lk(e,o){return e==="phone"?{on:o.tablet,distance:o.tabletDistance}:{on:o.desktop,distance:o.desktopDistance}}function dz(e,o,t){return e==="desktop"||yh(e,o)?null:t===void 0?{}:{[xr(e,"stickTop")]:!0,[xr(e,"stickTopDistance")]:t}}function fz({value:e,onChange:o,labelId:t,view:r}){let a=$o(),n=kc(a),s=r==="phone"?n.phone:r==="tablet"?n.tablet:e===!0,l=r==="phone"&&n.ownTablet,c=r==="desktop"?null:Lk(r,n),d=c?.on?`${c.distance}px`:i("Off");return S(Je,{label:i(vc),labelId:t,icon:Gs(S(D6,{})),action:Ir(Ut,{children:[r!=="desktop"?S(ho,{words:Q()?.panel,label:i(vc),changed:yh(r,a),detail:fn(f=>i(f),d,l?"tablet":"desktop"),onReset:()=>o(void 0)}):null,S(ph,{checked:s,onChange:o,ariaLabelledBy:t})]})})}var ak="e.g. about";function Jc(){return{_gAnchor:lt("Anchor"),anchor:la({control:"plainText",label:"Name",placeholder:ak},{type:"custom",render:({value:e,onChange:o})=>S(Fw,{value:e,onChange:o,nameBox:(t,r)=>S(sa,{value:t,onChange:r,label:"Name",placeholder:ak,hideable:!1,markup:!1})})})}}function che(e,o,t){return{type:"custom",render:({value:r,onChange:a,id:n,name:s})=>{let l=`${n??s??e}-datetime`,c=Date.parse(typeof r=="string"?r:"");return S(Je,{label:i(e),icon:o,htmlFor:l,hint:t===void 0?void 0:i(t),children:S(Q6,{id:l,value:Number.isFinite(c)?new Date(c):null,onChange:d=>a(d?d.toISOString():"")})})}}}function uz(e,o,t,r){return{type:"custom",...gr({},{...Gc,label:e}),render:a=>{let{value:n,onChange:s,id:l,name:c}=a,d="follows"in a,f=a,m=typeof n=="boolean",u=typeof f.follows=="boolean"?f.follows:o,x=m?n:d?u:o,I=`${l??c??e}-label`,b=f.readOnly===!0,v=S(ph,{checked:x,onChange:s,disabled:b,ariaLabelledBy:I});return S(Je,{label:i(e),labelId:I,icon:t,hint:r===void 0?void 0:i(r),action:d?Ir(Ut,{children:[S(ho,{words:Q()?.panel,label:i(e),changed:m,detail:fn(C=>i(C),i(u?"On":"Off"),f.followsView),disabled:b,onReset:()=>s(void 0)}),v]}):v})}}}function Bk(){return{type:"custom",render:({value:e,onChange:o,id:t,name:r})=>{let a=`${String(t??r??"pageBackground")}-colour`;return S(zo,{label:i("Background"),icon:S(B6,{}),id:a,value:tm(e),onChange:o})}}}function dhe(e,o,t){return{type:"custom",render:({value:r,onChange:a})=>S(zo,{label:i(e),icon:t,value:r||o,onChange:a})}}function fhe(){return{type:"custom",render:({value:e,onChange:o})=>S(pz,{value:typeof e=="string"?e:"",onChange:o})}}function pz({value:e,onChange:o}){let{hex:t,n:r}=hz();return S(vs,{label:i("Fill"),icon:S(ck,{}),value:e,inherited:t,resetTo:na(t.toUpperCase(),i("Theme {n} background",{n:r})),onChange:o,onReset:()=>o("")})}function mz(e,o,t){if((e?.content??[]).some(n=>n?.props?.id===o))return et(t);let r=Nw(e,o);if(r.length===0)return null;let a=et(Am(t));if(a!==null)return a;for(let n=r.length-1;n>0;n-=1){let s=et(Am(r[n].sectionAccent));if(s!==null)return s}return et(r[0].sectionAccent)}function hz(){let{colors:e,n:o}=Dk();return{hex:e.background,n:o}}function Dk(){let e=lo(ce().theme),[o]=$t("sectionAccent"),t=null;try{let{appState:a,selectedItem:n}=fh(l=>l),s=n?.props?.id?String(n.props.id):void 0;t=s?mz(a?.data,s,o):null}catch{t=null}let r=t!==null&&e.themes[t]?t:e.selected;return{colors:yo(e.themes[r]),n:r+1}}var xz=[{value:"0% 0%",label:"Top left"},{value:"50% 0%",label:"Top"},{value:"100% 0%",label:"Top right"},{value:"0% 50%",label:"Left"},{value:"50% 50%",label:"Center"},{value:"100% 50%",label:"Right"},{value:"0% 100%",label:"Bottom left"},{value:"50% 100%",label:"Bottom"},{value:"100% 100%",label:"Bottom right"}];function Iz({label:e,value:o,onChange:t,points:r=xz}){let a=r.map(n=>({...n,label:i(n.label),...n.title?{title:i(n.title)}:null}));return S(X6,{label:i(e),value:o,points:a,onChange:t})}function uhe(){return Pk()}var Nk={top:S(E6,{}),right:S(P6,{}),bottom:S(k6,{}),left:S(T6,{})};function Mk(e,o,t,r,a,n,s){let l=m=>o.find(u=>u.value===m),c=m=>({value:m,label:"",disabled:!0,title:r}),d=m=>{let u=o.find(I=>I.cell===m);if(!u)return c(`missing-${m}`);let x=n?.[m];return x?{value:u.value,label:u.label,icon:x}:{value:u.value,label:u.label}},f=[c("corner-top-left"),d("top"),c("corner-top-right"),d("left"),c("centre"),d("right"),c("corner-bottom-left"),d("bottom"),c("corner-bottom-right")];return{type:"custom",render:({value:m,onChange:u})=>{let x=o.some(I=>I.value===m)?m:t;return S(Je,{label:i(e),icon:a,value:l(x)?.label?i(l(x).label):s?i(s):"",children:Iz({label:e,value:x,onChange:u,points:f})})}}}function phe(e,o,t){return{type:"custom",options:o,render:({value:r,onChange:a,field:n})=>S(rC,{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 mhe(e,o={}){return{type:"custom",render:({value:t,onChange:r})=>{let a={value:t,onChange:r,...o};return S(e,{...a})}}}var hhe=[{label:"Image",value:"image"},{label:"Video",value:"video"}];function xhe(e,o,t){let r=Object.keys(_p).map(a=>({label:_p[a],value:a,picture:t[a]}));return{type:"custom",...gr({},{type:"radio",label:e,options:r.map(a=>({value:a.value,label:a.label}))}),render:({onChange:a})=>S(gz,{label:e,icon:o,options:r,onChange:a})}}function gz({label:e,icon:o,options:t,onChange:r}){let a=dn()?.values??{},n=Rp(a),s=n==="frame"&&!!lr(a.mediaVideo)&&!lr(a.videoFrame);return S(Je,{label:i(e),icon:Gs(o),hint:s?i("This video has no frame yet. The slide shows its background colour until one is made."):void 0,children:Bc({options:t,value:n,onChange:r,ariaLabel:e})})}function Ihe(e,o,t,r={}){let a={type:"custom",[x6]:!0,render:({value:n,onChange:s,name:l})=>S(oC,{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?vt("each",a):a}function bz(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 ghe({value:e,onChange:o,label:t}){let r=e||{},a=dn(),n=a?a.values!==a.node.props:!0,s=!!r.pending&&n,l=!!r.pending&&!n,c=s?"var(--ink-faint)":r.ok&&!l?"var(--status-success-soft-ink)":"var(--status-danger-soft-ink)",d=!!ze(pW()).geocode,f=sk(),m=(u,x)=>o({...r,[u]:x??void 0});return Ir(Ut,{children:[S(Je,{label:i(t),icon:S(Zv,{}),action:d?S(Wc,{content:i("Find from the address (OpenStreetMap)"),children:S(Ik,{"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:S(N6,{})})}):void 0,children:d&&r.status?S(Wc,{content:bz(r),className:"sf-name-tip",children:S("div",{className:`es-field-hint ${Qp}`,style:{margin:0,whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",minWidth:0,color:c},children:s?i("Finding\u2026"):l?i(nm):i(r.status)})}):null}),S(Je,{label:i("Enter by hand"),labelId:f,icon:S(O6,{}),action:S(ph,{checked:!!r.manual,onChange:u=>o({...r,manual:u}),ariaLabelledBy:f})}),r.manual&&S(Je,{label:i("Latitude, longitude"),icon:S(Zv,{}),children:Ir("div",{style:{display:"grid",gridTemplateColumns:"1fr 1fr",gap:8,width:"100%",minWidth:0},children:[S(Qv,{value:typeof r.lat=="number"?r.lat:null,onChange:u=>m("lat",u),min:-90,max:90,step:1e-4,placeholder:i("Latitude")}),S(Qv,{value:typeof r.lng=="number"?r.lng:null,onChange:u=>m("lng",u),min:-180,max:180,step:1e-4,placeholder:i("Longitude")})]})})]})}function yz(e,o){return o===null||o<0||o>=e.length?"":e[o]?.text??""}function Sz(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 wz(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 Sh={label:"Ticker items",icon:S(L6,{})};function bhe(e,o,t,r){return{type:"custom",[Gt]:{control:"textList",label:e,placeholder:t,itemKey:"text",rendering:r},...gr({},{...wk.textList,label:e}),render:({value:a,onChange:n})=>S(wh,{label:e,icon:Gs(o),items:Array.isArray(a)?a:[],placeholder:t,onChange:n,markup:r==="markup"})}}function wh({label:e,icon:o,items:t,placeholder:r,onChange:a,markup:n=!1}){let s=Ws(null),[l,c]=zs(null),d=m=>m.map(u=>({text:u?.text??""})),f=m=>{let u=wz(t,m,l);u===null&&(s.current=null),c(u),a(d(m))};return S(V6,{label:i(e),icon:o,noun:i("item"),items:t,onChange:f,newItem:()=>({text:""}),open:null,onOpen:()=>{},renderItem:()=>null,above:n?S(im,{target:s,value:yz(t,l),onChange:m=>a(Sz(t,l??-1,m)),disabled:l===null,label:l===null?i("Formatting \u2014 click a row first"):i("Formatting \u2014 row {n}",{n:l+1})}):void 0,renderRow:(m,u,x)=>S("input",{type:"text",className:n&&l===u?"sf-list-marking":void 0,value:m?.text??"",placeholder:i(r),"aria-label":i("{label} {n}",{label:i(e),n:u+1}),onChange:I=>x({text:I.target.value}),onFocus:I=>{s.current=I.currentTarget,c(u)}})})}function Hk(e,o){let t=`${e.label} \u2014 row ${o+1}`;return la({control:"plainText",label:t,placeholder:e.placeholder,offPage:e.offPage},{type:"custom",render:({value:r,onChange:a})=>S(sa,{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 Wk(e){return{_gCards:lt("Cards"),coverIndex:st("Cover image",S(F6,{}),Zw,String(1),e?.coverHint??"A card's opening picture \u2014 a card pinned to a finish keeps its own."),imageBackground:AW("Image background",Oc),cardImage:kz()}}function zk(){return{outline:st("Card outline",S(M6,{}),hm,pm),indexBadge:st("Card number",S(dk,{}),mm,um),showBadge:uz("Product badge",!0,S(om,{noun:"tag"}))}}function Gk(e){let o=e?.defaults??{showCardSizes:!0,showCardBuy:!0,showCardPage:!0},t=a=>({...Gc,label:Hc.find(n=>n.id===a).label}),r=a=>gr(nW(dh),t(a));return{_gShowOnCard:lt("Show on a card"),[dh]:gr({type:"custom",render:()=>S(Cz,{rest:{showCardPrice:!0,showCardFinishes:!0,...o}})},t(dh)),showCardFinishes:r("showCardFinishes"),showCardSizes:r("showCardSizes"),showCardBuy:r("showCardBuy"),showCardPage:r("showCardPage")}}var dh="showCardPrice",Hc=[{id:"showCardPrice",label:"Price"},{id:"showCardFinishes",label:"Finish swatches"},{id:"showCardSizes",label:"Sizes"},{id:"showCardBuy",label:"Buy button"},{id:"showCardPage",label:"Page button"}];function Cz({rest:e}){let o=$o(),t=bm(),r=s=>typeof o[s]=="boolean"?o[s]:void 0,a=s=>r(s)??e[s],n=Hc.some(({id:s})=>r(s)!==void 0&&r(s)!==e[s]);return S(Ch,{parts:Hc,changed:n,shown:a,onPress:(s,l)=>t({[s]:l}),onReset:()=>t(Object.fromEntries(Hc.map(({id:s})=>[s,void 0])))})}function yhe(e,o="display"){let t=zt(o);return{[o]:vt("desktop",{type:"custom",render:({value:r,onChange:a})=>S(Ch,{parts:e,changed:Mw(r),shown:n=>oc(r,n),onPress:(n,s)=>a(Ww(r,n,s)),onReset:()=>a(void 0)})}),[t]:vt("mobile",{type:"custom",render:({value:r,onChange:a})=>S(vz,{parts:e,desktopKey:o,value:r,onChange:a})})}}function Ch({parts:e,changed:o,shown:t,onPress:r,onReset:a,detail:n,disabledReason:s}){let l=i("Display");return S(Je,{label:l,icon:S(b6,{}),changed:o,action:S(ho,{words:Q()?.panel,label:l,changed:o,detail:n,onReset:a}),children:S(Y6,{label:l,items:e.map(c=>({id:c.id,label:i(c.label),shown:t(c.id),...s?{disabled:!0,disabledReason:i(s)}:{}})),onChange:r})})}function vz({parts:e,desktopKey:o,value:t,onChange:r}){let a=$o()[o];return S(Ch,{parts:e,changed:Hw(t),shown:n=>am(a,t,n),onPress:(n,s)=>r(zw(t,n,s)),onReset:()=>r(nc),detail:i("the same as Desktop")})}function kz(){return Tk("Card image",{min:Mo,max:Br,step:lw,hint:"Rounds the picture. The card's own corner is in Styles."})}function She(){return Ih({sidesKey:"cornerSides",step:iw,useFollowed:()=>Mo,mark:S(Tz,{label:cw}),hint:i("Rounds the picture. Left alone it stays square.")})}function Tz({label:e,changed:o=!1,onReset:t=()=>{}}){return S(ho,{words:Q()?.panel,label:i(e),changed:o,onReset:t})}function whe(){return{type:"custom",render:({value:e,onChange:o})=>S(_z,{value:typeof e=="string"?e:"",onChange:o})}}function Pz({layout:e,width:o}){return S("span",{"aria-hidden":"true",style:{display:"grid",width:o,gridTemplateColumns:"repeat(12, minmax(0, 1fr))",gridAutoRows:6,gridAutoFlow:"row dense",gap:2},children:pw(e).map(([t,r],a)=>S("i",{className:"block rounded-xs bg-current opacity-60",style:{gridColumn:`span ${t}`,gridRow:`span ${r}`}},a))})}var Ez={width:"3.5rem",height:"2.5rem"},Oz=200;function _z({value:e,onChange:o}){let[t,r]=zs(null),[a,n]=zs(4),s=Ws(null);p6(()=>{let u=s.current;if(!u||typeof ResizeObserver!="function")return;let x=()=>n(u.getBoundingClientRect().width>=Oz?4:3);x();let I=new ResizeObserver(x);return I.observe(u),()=>I.disconnect()},[]);let l=e&&e in Dt?e:"",c=qp(t,l),d=qp(t,"").length,f=Yi("no-symbol"),m=[{value:"",label:i("Not chosen"),icon:Yv(f,i("Not chosen"))},...c.map(u=>({value:u,label:i(Dt[u].label),icon:S(Pz,{layout:Dt[u],width:40})}))];return S(Je,{label:i("Layout"),icon:S(R6,{}),value:l?i(Dt[l].label):void 0,children:S("div",{ref:s,style:{flex:"1 1 auto",minWidth:0},children:S(hk,{label:i("Layout"),value:l,options:m,onChange:o,columns:a,cell:Ez,header:Ir("div",{className:"mb-2 flex flex-col gap-1",style:{minWidth:"11rem"},children:[S("span",{className:"text-2xs text-ink-faint",children:i("Photos in a row")}),S($6,{options:[{id:"all",label:i("All")},...fw.map(u=>({id:String(u),label:String(u)}))],value:t===null?"all":String(t),ariaLabel:i("Photos in a row"),onChange:u=>r(u==="all"?null:Number(u))}),S("span",{className:"text-2xs text-ink-faint",children:i("{n} of {total} layouts",{n:d,total:Kp.length})})]})})})})}import{decodePartId as Vz}from"efficient-easel/draw";import{decodePartId as Ph,encodePartId as rd}from"efficient-easel/draw";import{LINK_FIELD_MARKER as Jk,SCAFFOLD_FIELD_MARKER as Xk,TEXT_FIELD_MARKER as ad}from"efficient-easel/draw";import{readHidable as Qk}from"efficient-easel/draw";import{SCALAR_TEXT_CONTROLS as Nz}from"efficient-easel/draw";import{TEXT_FIELD_MARKER as Dz}from"efficient-easel/draw";import{TEXT_FIELD_MARKER as $k}from"efficient-easel/draw";import{readHidable as Uk}from"efficient-easel/draw";import{SCALAR_TEXT_CONTROLS as Rz}from"efficient-easel/draw";var Az=Rz,Fz=["text","textarea"],Lz=["textarea","plainTextarea"];function Bz(e){return!e||typeof e!="object"?null:e[$k]?.control??null}function un(e){let o=Bz(e);return o&&Az.includes(o)?o:null}function Qc(e){return Lz.includes(e)}function jk(e){return!e||typeof e!="object"?void 0:e[$k]?.placeholder}function ed(e){return Uk(e).text}function vh(e,o,t){return Fz.includes(e)?{text:t,hidden:Uk(o).hidden}:t}function Kk(e,o,t,r){return ed(e[o])===r?null:{...e,[o]:vh(t,e[o],r)}}function Us(e,o){return o?`${e}[${o.index}].${o.rowKey}`:e}function it(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 od(e){if(!(!e||typeof e!="object"))return e[Dz]}function kh(e){if(!e||typeof e!="object")return null;let o=e.arrayFields;return o&&typeof o=="object"?o:null}function qk(e,o){if(!Array.isArray(o))return[];let t=od(e),r=[];if(t?.control==="textList"){let n=t.itemKey??"text";return o.forEach((s,l)=>{let c=oe(s?.[n]);c&&r.push({row:{index:l,rowKey:n},text:c})}),r}let a=kh(e);return a?(o.forEach((n,s)=>{for(let[l,c]of Object.entries(a)){if(!un(c))continue;let d=ed(n?.[l])||od(c)?.placeholder||"";d&&r.push({row:{index:s,rowKey:l},text:d})}}),r):[]}function js(e,o){if(Array.isArray(e))return e[o.index]?.[o.rowKey]}function Th(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 Vk(e,o,t,r,a){let n=js(e[o],t);return ed(n)===a?null:Th(e,o,t,vh(r,n,a))}function Yk(e,o){return o?`${e} \xB7 row ${o.index+1}`:e}var ct="data-sf-part",$he="data-sf-region-part",Uhe="data-sf-part-row";function jhe(e,o){return`${e}[${o}]`}var Khe="data-sf-part-kind",Mz="data-sf-part-style-owner",Hz="data-sf-part-style-kind";function qhe(e){for(let o=e;o;o=o.parentElement){let t=o.getAttribute(Mz),r=o.getAttribute(Hz);if(t&&r)return{owner:t,kind:r};if(o.getAttribute("data-easel-block"))return null}return null}var Zk=2;function pn(e){return zr(e).replace(/\s+/gu,"")}function td(e,o,t){let r=e[ad];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}=Qk(o);a?t.push(a):r.placeholder&&t.push(r.placeholder);return}if(!e[Jk]){if(e.type==="text"||e.type==="textarea"){let a=oe(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))td(s,a?.[n],t);return}if(e.objectFields&&o&&typeof o=="object")for(let[a,n]of Object.entries(e.objectFields))td(n,o[a],t)}}function eT(e){if(!e||typeof e!="object")return!1;let o=e;return o[Jk]?!1:!!o[ad]||o.type==="text"||o.type==="textarea"}function nd(e,o){let t=e[ad];return t?.label?t.label:typeof e.label=="string"?e.label:o}function Eh(e){let o=e.indexOf(" (");return(o>0?e.slice(0,o):e).trim()}function Vhe(e,o){if(!e)return[];let t=[];for(let[r,a]of Object.entries(e)){if(!a||typeof a!="object"||ks(r))continue;let n=a,s=[];td(n,o?.[r],s),!s.length&&n[Xk]!==void 0&&td(n,n[Xk],s);let l=nd(n,r),c=new Set;for(let{row:m,text:u}of qk(n,o?.[r])){let x=pn(u);x.length<Zk||(c.add(x),t.push({key:r,label:l,texts:[x],row:m}))}let d=new Set(c),f=[];for(let m of s){let u=pn(m);u.length<Zk||d.has(u)||(d.add(u),f.push(u))}f.length&&t.push({key:r,label:l,texts:f})}return t}function Oh(e){return!e.offPage&&!e.hidden}var Wz=Nz;function oT(e,o){if(!o||typeof o!="object"||ks(e)||Kw(o))return null;let t=o[ad];return!t||!Wz.includes(t.control)?null:t}function Yhe(e,o){let t=oT(e,o);return t!==null&&t.identifier!==!0}function tT(e,o){if(!e)return[];let t=[];for(let[r,a]of Object.entries(e)){let n=oT(r,a);if(!n)continue;let{text:s,hidden:l}=Qk(o?.[r]);if(Oh({offPage:n.offPage===!0,hidden:!!l}))continue;let c=s||n.placeholder||"",d=zr(c).replace(/\s+/gu," ").trim();t.push({key:r,label:Eh(nd(a,r)),preview:d,offPage:n.offPage===!0,identifier:n.identifier===!0,hidden:!!l})}return t}function mn(e,o){let t=od(e);return t?.control==="textList"?o.rowKey===(t.itemKey??"text")?Hk(t,o.index):null:kh(e)?.[o.rowKey]??null}function sd(e,o,t){let r=e.node.props,{key:a,row:n}=it(e.propKey),s=n?Vk(r,a,n,e.kind,o):Kk(r,a,e.kind,o);return s?(t(e.zone,e.index,{...e.node,props:s}),!0):!1}import{readHidable as sT}from"efficient-easel/draw";import{isNodeList as zz}from"efficient-easel/data";var _h=e=>String(e+1).padStart(2,"0"),rxe=[{label:"01 \xB7",value:"two-digit"},{label:"1.",value:"plain"}],Rh="two-digit",rT=e=>e==="plain"?"plain":Rh,ld=(e,o)=>e==="plain"?`${o+1}.`:_h(o);var Fh="Contents",Ah="Flex",aT="Text",Gz="numberForm",pxe="_contentsEntries",mxe="_kickerNumber",lT="data-sf-kicker-number",$z=e=>sT(e).text.trim(),iT=e=>Cw(e?.anchor),nT=e=>String(e.props?.id??""),Uz=e=>!sT(e.props?.text).hidden&&!hs(e.props)&&!sr(e.props);function Ks(e){return Object.values(e.props??{}).filter(zz)}function cT(e){for(let o of Ks(e))for(let t of o){if(t.props?._hidden)continue;if(t.type===aT&&Uz(t))return t;if(t.type===aT)continue;let r=cT(t);if(r)return r}}function dT(e){return Ks(e).some(o=>o.some(t=>t&&!t.props?._hidden&&(t.type===Fh||dT(t))))}var fT=e=>e.type===Ah&&on(Ah,e.props?.direction)==="row";function uT(e){return Ks(e).some(o=>o.some(t=>t&&!t.props?._hidden&&(t.type===Fh||!fT(t)&&uT(t))))}function jz(e){let o=[],t=(r,a)=>{for(let n of r){if(!n||n.props?._hidden)continue;if(n.type===Fh){a.open={contents:n,sections:a.waiting??[]},a.waiting=null,o.push(a.open);continue}if(fT(n)&&uT(n)){let l={inRow:!0,open:null,waiting:[]};for(let c of Ks(n))t(c,l);a.inRow||(a.open=null);continue}let s=a.open?.sections??a.waiting;if(n.type===Ah&&iT(n.props)&&s&&!dT(n)){s.push({box:n,kicker:cT(n)});continue}for(let l of Ks(n))t(l,a)}};return t(e,{inRow:!1,open:null,waiting:null}),o}function Kz(e){return e.map(o=>({label:o.kicker?zr($z(o.kicker.props?.text)):"",anchor:iT(o.box.props)}))}function hxe(e){let o=e?.length?jz(e):[];if(!o.length)return null;let t=new Map,r=new Map;for(let a of o){let n=nT(a.contents);n&&t.set(n,Kz(a.sections));let s=rT(a.contents.props?.[Gz]);a.sections.forEach((l,c)=>{let d=l.kicker?nT(l.kicker):"";d&&r.set(d,ld(s,c))})}return{entries:t,numbers:r}}var xxe=e=>e.endsWith(".")?`${e} `:`${e} \xB7 `;var Yz=`[${lT}]`,Xz=["bold","italic","underline","strike","link","sup","sub"],Zz=["bullet","number"];function Dh(e,o){return e?[...Xz,...o?Zz:[]]:[]}function pT(e,o){let t=Vz(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:c}=it(a),d=o.components[n.type]?.fields?.[l],f=c?mn(d,c):d,m=un(f);if(!m)return null;let u=n.props??{};if(Dm(u)!==null||!c&&RS(n.type,u,l)||n.type==="Text"&&l==="text"&&hs(u)||c&&!(Array.isArray(u[l])&&c.index<u[l].length))return null;let x=c?js(u[l],c):u[l];return{node:n,selector:s,propKey:a,kind:m,stored:x,offPage:$c(f)}}function id(e,o){let t=pT(e,o);if(!t)return null;let{text:r,hidden:a}=br(t.stored);if(!Oh({offPage:t.offPage,hidden:!!a}))return null;let n=Qc(t.kind);return{partId:e,value:r,rules:Wr,multiline:n,skip:Yz,offered:Dh(t.kind!=="plainText",n),write:s=>{let l=pT(e,o);l&&sd({node:l.node,propKey:l.propKey,kind:l.kind,zone:l.selector.zone,index:l.selector.index},s,o.replace)}}}function Nh(e,o,t){return e?.isConnected&&e.getAttribute(ct)===t?e:o?.querySelector(`[${ct}="${cd(t)}"]`)??null}function cd(e){return e.replace(/["\\]/g,"\\$&")}function mT(e){let o=e.activeElement;return o?o.tagName==="IFRAME"||!!o.closest(".es-canvas"):!1}var Lh=null,Bh=new Set;function Jz(){return Lh}function Mh(e){if(e!==Lh){Lh=e;for(let o of Bh)o()}}function Qz(e){return Bh.add(e),()=>{Bh.delete(e)}}function hT(){return qz(Qz,Jz,()=>null)}function xT(e,o){if(e.outer)return null;let t=o.getItemById(e.ownerId);if(!t)return null;let r=OS(t.type);return!r||So(t.props)?null:{node:t,rows:r}}function aG(e,o){let t=xT(e,o),r=o.getItemById(e.nodeId);if(!t||!r)return null;let a=vp(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:eG(e.ownerId,Us(t.rows,{index:e.index,rowKey:a}))}function dd(e,o){let t=aG(e,o);return t?id(t,o):null}function IT(e,o){return dd(e,o)?.value}function gT(e,o){let t=dd(e,o);return t?(t.write(e.text),!0):!1}function bT(e,o){let t=xT(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 c=o.components[t.node.type]?.fields?.[t.rows];l=oG(n,s+1,{...c?.defaultItemProps??{}});break}case"moveEarlier":case"moveLater":{let c=e.action==="moveEarlier"?s-1:s+1;if(c<0||c>=n.length)return!1;l=tG(n,s,c);break}case"delete":l=rG(n,s);break;default:return!1}return o.replace(r.zone,r.index,{...t.node,props:{...a,[t.rows]:l}}),!0}import{jsx as Se,Fragment as s0,jsxs as sl}from"react/jsx-runtime";import{Fragment as Vj,useEffect as Yj,useId as Xj,useMemo as l0,useRef as Zj,useState as yr}from"react";import{useScreenDocument as h0}from"efficient-easel/screen/components/ScreenDocumentContext";import{UiIcon as Hx}from"efficient-easel/draw/client";import Jj from"efficient-easel/screen/components/SidePanelHead";import{jsx as ae,Fragment as Pn,jsxs as pa}from"react/jsx-runtime";import{useEasel as JP,useRootFields as JU}from"efficient-easel/easel";import{Inspector as QU}from"efficient-easel/fields";import{SettingsGroup as ej}from"efficient-easel/panel";import{useEffect as oj,useRef as tj,useState as Nd}from"react";import{jsx as ia,Fragment as iG,jsxs as cG}from"react/jsx-runtime";import{useState as CT}from"react";import{SettingsDefaultReset as dG,SettingsField as fG}from"efficient-easel/panel";import{useEaselStrings as uG}from"efficient-easel/strings";import{AddIcon as pG}from"efficient-easel/icons";import{Button as mG}from"efficient-shell/ui";import{iconOf as hG,noGlyph as xG}from"efficient-easel/screen/lib/document/box-fields";import{jsx as fd,Fragment as nG,jsxs as yT}from"react/jsx-runtime";import{Button as ST,Dialog as sG}from"efficient-shell/ui";function lG(e){return xo("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 wT({count:e,onCancel:o,onConfirm:t}){return yT(sG,{open:!0,onClose:o,role:"alertdialog",size:"sm",title:i("Clear this site\u2019s colors?"),footer:yT(nG,{children:[fd(ST,{variant:"secondary",onClick:o,children:i("Cancel")}),fd(ST,{variant:"danger",onClick:t,children:i("Clear colors")})]}),children:[fd("p",{children:lG(e)}),fd("p",{className:"mt-2 font-medium",children:i("This cannot be undone.")})]})}var IG=xG("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"),gG="Reset color",bG={selected:0,themes:[]};function yG(e){e(bG)}function vT({value:e,onChange:o}){let t=e?.themes??[],r=t.length===0,a=lo(e),[n,s]=CT(!1),l=uG(),[c,d]=CT(null),f=(C,w)=>{o({...a,themes:a.themes.map((g,k)=>k===C?w:g)})},m=Ua(a).accent,u=new Set(a.themes.map(C=>C.brandInk).filter(Boolean)),x=ey.filter(C=>!u.has(C)).map(C=>oy(m,C)),I=[...a.themes,...x],b=C=>{if(C<a.themes.length)return o({...a,selected:C});let w=[...a.themes,I[C]];o({...a,themes:w,selected:w.length-1})},v=()=>{let C=[...a.themes,{...yo(a.themes[a.selected])}];o({...a,themes:C,selected:C.length-1}),d(C.length-1)};return cG(iG,{children:[r?null:ia(fG,{label:i(gG),icon:hG(IG),labelId:"sf-theme-reset",action:ia(dG,{label:i("all theme colors"),words:l.panel,changed:!0,onReset:()=>s(!0)})}),n&&ia(wT,{count:t.length,onCancel:()=>s(!1),onConfirm:()=>{s(!1),yG(o)}}),ia("div",{className:"sf-theme-list",role:"radiogroup","aria-label":i("Theme"),children:I.map((C,w)=>ia(ic,{index:w,colors:C,selected:w===a.selected,open:c===w&&w<a.themes.length,editable:w<a.themes.length,onPick:()=>b(w),onEdit:()=>d(g=>g===w?null:w),onChangeColors:g=>f(w,g)},w))}),ia(mG,{variant:"secondary",leftIcon:ia(pG,{}),onClick:v,className:"sf-theme-add",children:i("Add new theme")})]})}import{jsx as ud}from"react/jsx-runtime";import{SettingsDefaultReset as SG,SettingsField as wG}from"efficient-easel/panel";import{SquareIcon as CG}from"efficient-easel/icons";var vG="Applies to panels, cards, inputs and buttons. Round things \u2014 color swatches, switches, status dots \u2014 stay round.",Hh="Corners";function kT({value:e,onChange:o,showHint:t=!0}){let r=e===null;return ud(wG,{label:i(Hh),icon:ud(CG,{}),changed:!r,action:ud(SG,{words:Q()?.panel,label:i(Hh),changed:!r,detail:i("the built-in corners"),onReset:()=>o(null)}),hint:t?i(vG):void 0,children:ud(Fo,{min:Mo,max:Br,step:1,value:e,...e===null?{}:{suffix:"px"},placeholder:Mo,placeholderWord:"Auto",onClear:()=>o(null),ariaLabel:i(Hh),onChange:o})})}import{jsx as qs}from"react/jsx-runtime";import{SettingsDefaultReset as kG,SettingsField as TG}from"efficient-easel/panel";import{IconPicker as PG}from"efficient-shell/ui";import{ShadowIcon as EG}from"efficient-easel/icons";var Wh={none:"None",soft:"Soft",lifted:"Lifted"},OG="Applies to cards \u2014 products, brands, journal entries and filter cells. Round things like swatches and status dots are never shadowed.",_G={none:"none",soft:"0 1px 1px rgba(20, 20, 22, 0.10), 0 2px 4px -1px rgba(20, 20, 22, 0.14)",lifted:"0 1px 2px rgba(20, 20, 22, 0.10), 0 4px 7px -2px rgba(20, 20, 22, 0.30)"};function TT({value:e,onChange:o,showHint:t=!0}){let r=e===null,a=e??Ku;return qs(TG,{label:i("Card shadow"),icon:qs(EG,{}),value:i(Wh[a]),changed:!r,action:qs(kG,{words:Q()?.panel,label:i("Card shadow"),changed:!r,detail:i(Wh[Ku]),onReset:()=>o(null)}),hint:t?i(OG):void 0,children:qs(PG,{label:i("Card shadow"),value:a,options:fy.map(n=>({value:n,label:i(Wh[n]),icon:qs("span",{className:"sf-shadow-chip border border-line bg-surface",style:{boxShadow:_G[n]}})})),onChange:o})})}import{jsx as PT}from"react/jsx-runtime";import{ShadowIcon as RG}from"efficient-easel/icons";var AG="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 ET({value:e,onChange:o,showHint:t=!0}){let r=e===null;return PT(vs,{label:i("Shadow color"),icon:PT(RG,{}),value:e??"",inherited:Vu,resetTo:Vu,onChange:o,onReset:()=>o(null),hint:t?i(AG):void 0})}import{jsx as md}from"react/jsx-runtime";import{SettingsDefaultReset as FG,SettingsField as LG}from"efficient-easel/panel";import{AlignSeparateIcon as BG}from"efficient-easel/icons";function pd(e,o){return e==="tablet"?null:e==="mobile"?o.phone:o.desktop}var DG="The space between the blocks inside a row, a grid or a box. Auto means each one keeps the spacing it already has.",NG="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.",zh="Block gap",OT=rn.Grid;function _T(e,o){return pd(e,{desktop:{key:"block_gap",value:o.gap,followsPx:null},phone:{key:"block_gap_phone",value:o.phone,followsPx:o.gap===null?null:Jm(o.gap)}})}function RT({value:e,onChange:o,showHint:t=!0,followsPx:r=null}){let a=e===null,n=r===null?null:`${r}px`,s=r===null?OT:Bs(r)??OT;return md(LG,{label:i(zh),labelId:"sf-block-gap",icon:md(BG,{}),changed:!a,action:md(FG,{words:Q()?.panel,label:i(zh),changed:!a,detail:n??i("each block's own spacing"),onReset:()=>o(null)}),hint:t?i(n===null?DG:NG):void 0,children:md(Fo,{min:ta.min,max:ta.max,step:ta.step,value:e,...e===null&&r===null?{}:{suffix:"px"},placeholder:s,...r===null?{placeholderWord:"Auto"}:r===s?{}:{placeholderWord:String(r)},onClear:()=>o(null),ariaLabel:i(zh),onChange:o})})}import{jsx as Sd}from"react/jsx-runtime";import{SettingsDefaultReset as GG,SettingsField as $G,SettingsSegmented as UG}from"efficient-easel/panel";import{HoverIcon as jG}from"efficient-easel/icons";import{HOVER_MOTION as MG,motionSeconds as hd}from"efficient-shell/format";var Lo="hover",xd="_gHover",HG=["none","nextImage","rotate","zoom","lift","mono"],Ys={none:"None",nextImage:"Show next image",rotate:"Rotate",zoom:"Zoom",lift:"Lift",mono:"Black and white"};function Id(e){return HG.filter(o=>e.includes(o))}var Gh=Id(["none","lift"]);function AT(e){let o=e[Lo];return Gh.includes(o)?o:"none"}var gd=Id(["none","rotate"]),Be={kind:Lo,angle:"hoverAngle",duration:"hoverDuration",delay:"hoverDelay"},Vs="spinOnHover",hn={min:0,max:360,step:1},FT={ProductGrid:"rotate",RelatedProducts:"rotate",AlloyWheelsListing:"none"},AIe=Object.keys(FT);function $h(e){return FT[e]??"none"}var Uh=MG.rotateFallbackDeg;function jh(e,o){let t=e[Be.kind];if(gd.includes(t))return t;let r=e[Vs];return typeof r=="boolean"?r?"rotate":"none":o}function Kh(e){let o=U(e);return o===void 0?Uh:Math.min(hn.max,Math.max(hn.min,o))}function FIe(e,o){let t=$h(o),r=jh(e,t);return{kind:r,angle:r==="rotate"?Kh(e[Be.angle]):null,duration:hd("hover","duration",r==="rotate"?e[Be.duration]:void 0),delay:hd("hover","delay",r==="rotate"?e[Be.delay]:void 0)}}function LT(e){let o={field:Be.kind,in:[...gd]};return{any:[{field:Be.kind,is:"rotate"},{all:[{not:o},e==="rotate"?{not:{field:Vs,is:!1}}:{field:Vs,is:!0}]}]}}var bd=Id(["none","mono"]),qh=Id(["none","nextImage","mono"]),BT={ImageBlock:"none",Manifesto:"none",Split:"none",ContactLocations:"mono"},LIe=Object.keys(BT);function Vh(e){return BT[e]??"none"}var Xs={zoom:"hoverZoom",darken:"hoverDarken"},Kt={min:100,max:150,step:1,unit:"%"},yd=["nextImage"];function WG(e,o){if(!yd.includes(o))return null;let t=U(e[Xs.zoom]);if(t===void 0)return null;let r=Math.min(Kt.max,Math.max(Kt.min,t));return r===Kt.min?null:String(r/100)}function zG(e,o){if(!yd.includes(o))return null;let t=U(e[Xs.darken]);return t!==void 0&&t>0?t:null}var Yh=["ImageBlock"];function Xh(e,o,t=bd){let r=e[Lo];return t.includes(r)?r:o}function DT(e,o=""){let t=Yh.includes(o)?qh:bd,r=Xh(e,Vh(o),t),a=r!=="none";return{kind:r,duration:hd("hover","duration",a?e[Be.duration]:void 0),delay:hd("hover","delay",a?e[Be.delay]:void 0),...yd.includes(r)?{zoom:WG(e,r),darken:zG(e,r)}:{}}}function NT(){return{field:Lo,in:[...yd]}}function MT(e){return e==="none"?{field:Lo,in:["mono","nextImage"]}:{not:{field:Lo,is:"none"}}}var Zh={none:Ys.none,lift:Ys.lift,highlight:"Highlight"},KG="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 HT({value:e,onChange:o,showHint:t=!0}){let r=e===null,a=e??qu;return Sd($G,{label:i("Hover effect"),icon:Sd(jG,{}),value:i(Zh[a]),changed:!r,action:Sd(GG,{words:Q()?.panel,label:i("Hover effect"),changed:!r,detail:i(Zh[qu]),onReset:()=>o(null)}),hint:t?i(KG):void 0,children:Sd(UG,{options:uy.map(n=>({id:n,label:i(Zh[n])})),value:a,ariaLabel:i("Hover effect"),onChange:o})})}import{jsx as wd}from"react/jsx-runtime";import{SettingsDefaultReset as qG,SettingsField as VG,SettingsSegmented as YG}from"efficient-easel/panel";import{DropIcon as XG}from"efficient-easel/icons";var Jh="Photography",WT={shot:"As shot",mono:"Black and white"},Qh=[{grayscale:!1,label:WT.shot},{grayscale:!0,label:WT.mono}],ZG="Black and white photographs return to color on hover. Wheels and tyres keep their real finish either way.";function zT({value:e,onChange:o,showHint:t=!0}){let r=e===null,a=e??!1;return wd(VG,{label:i(Jh),icon:wd(XG,{}),value:i(Qh.find(n=>n.grayscale===a).label),changed:!r,action:wd(qG,{words:Q()?.panel,label:i(Jh),changed:!r,detail:i(Qh.find(n=>!n.grayscale).label),onReset:()=>o(null)}),hint:t?i(ZG):void 0,children:wd(YG,{options:Qh.map(n=>({id:n.grayscale,label:i(n.label)})),value:a,ariaLabel:i(Jh),onChange:o})})}import{jsx as ex}from"react/jsx-runtime";import{useId as JG}from"react";import{SettingsField as QG,SettingsSwitch as e$}from"efficient-easel/panel";import{ShareIcon as o$}from"efficient-easel/icons";var t$="Share button",r$="On every blog post.";function GT({value:e,onChange:o,showHint:t=!0}){let r=JG();return ex(QG,{label:i(t$),labelId:r,icon:ex(o$,{}),action:ex(e$,{checked:e===!0,onChange:o,ariaLabelledBy:r}),hint:t?i(r$):void 0})}import{usePreviewDevice as Bx}from"efficient-easel/draw/client";import{jsx as Cd}from"react/jsx-runtime";import{SettingsDefaultReset as a$,SettingsField as n$}from"efficient-easel/panel";import{PaddingXIcon as s$}from"efficient-easel/icons";var ox="Side space",$T=Wt.default,l$="The room left at the left and right edge of every page.";function UT(e,o){return pd(e,{desktop:{key:"site_gutter",value:o.gutter,unsetPx:$T,bounds:Wt},phone:{key:"site_gutter_phone",value:o.phone,unsetPx:Fc(o.gutter),bounds:Ms}})}function jT({value:e,onChange:o,showHint:t=!0,unsetPx:r=$T,bounds:a=Wt}){let n=e===null;return Cd(n$,{label:i(ox),labelId:"sf-side-space",icon:Cd(s$,{}),changed:!n,action:Cd(a$,{words:Q()?.panel,label:i(ox),changed:!n,detail:`${r}px`,onReset:()=>o(null)}),hint:t?i(l$):void 0,children:Cd(Fo,{min:a.min,max:a.max,step:a.step,value:e,suffix:"px",placeholder:r,onClear:()=>o(null),ariaLabel:i(ox),onChange:o})})}import{jsx as tx}from"react/jsx-runtime";import{BACKGROUND_WIDTHS as dge,SettingsBackgroundWidth as i$,SettingsContentWidth as c$}from"efficient-easel/panel";var d$="Background width",f$="Content width";var vd=e=>i(aa[e==="content"?"page":"full"]),KT="The width of every section's background.",qT="The width of every section's content.";function VT({value:e,changed:o,detail:t,onChange:r,onReset:a,hint:n,labelId:s}){return tx(i$,{value:e,changed:o,detail:t,onChange:r,onReset:a,hint:n?i(n):void 0,labelId:s,words:{label:i(d$),full:vd("full"),content:vd("content")},resetWords:Q()?.panel})}function YT({mode:e,px:o,max:t=co.max,min:r=co.min,changed:a,detail:n,fullClosed:s,onMode:l,onPx:c,onReset:d,hint:f,labelId:m}){let u=i(f$),x=e!=="full"?tx(Fo,{min:r,max:t,step:co.step,value:Math.min(Math.max(o,r),t),onChange:c,suffix:"px",ariaLabel:u}):null;return tx(c$,{mode:e,onMode:l,number:x,changed:a,detail:n,fullClosed:s,onReset:d,hint:f?i(f):void 0,labelId:m,words:{label:u,full:vd("full"),content:vd("content")},resetWords:Q()?.panel})}import{jsx as MP}from"react/jsx-runtime";import{TextStyleItem as EU,TextStylesGroup as OU}from"efficient-easel/text-styles";import{jsx as SU}from"react/jsx-runtime";import{useState as wU}from"react";import{TextStylesList as CU}from"efficient-easel/text-styles";import{usePreviewDevice as vU}from"efficient-easel/draw/client";import{defaultTextStyles as vP,textStyleCaseCss as uU,textStyleViewKey as pU}from"efficient-easel/text-styles/model";import{phoneKey as mU,resolveViewValue as kP,tabletKey as hU}from"efficient-easel/draw";import{VIEW_DESKTOP_MIN as u$,VIEW_TABLET_MIN as XT}from"efficient-easel/draw";var ZT=.02,kd=`(min-width: ${XT}px) and (max-width: ${u$-ZT}px)`,xn=`(max-width: ${XT-ZT}px)`;import{textStyleCaseCss as I$,textStyleCaseOfCss as g$}from"efficient-easel/draw";import{parseHexColor as eP}from"efficient-shell/format";import{COLOR_SLOTS as oP,colorRole as p$}from"efficient-shell/markup";var tP={main:ls.accent,text:ls.text,background:"var(--bg)",muted:ls.labels},m$={main:"Main",text:"Text",background:"Background",muted:"Muted"},JT={accent:"main",labels:"muted"};function kt(e){return Object.hasOwn(JT,e)?JT[e]:e}function In(e){if(!e)return"";if(e.startsWith("#"))return eP(e)===e.toLowerCase()?e:"";let o=p$(kt(e));return o?.kind==="slot"?tP[o.slot]:""}var h$="#9ca3af";function gn(e){return oP.map(o=>({name:o,label:i(m$[o]),value:e?.[o]||h$}))}function rP(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 oP){let l=tP[s].replace(/^var\((--[\w-]+)\)$/,"$1"),c=a.getPropertyValue(l).trim();if(!c)continue;let d=QT(c);!d&&n&&(n.fillStyle="#000000",n.fillStyle=c,d=QT(String(n.fillStyle))),d&&(o[s]=d)}return o}function QT(e){let o=e.trim().toLowerCase();if(o.startsWith("#"))return eP(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 Td="data-sf-spec-region";function aP(e){return e.writable===!0&&e.sized===!0}function Pd(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 bn(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 rx(e){return`@${e}`}function Zs(e,o){if(!o.startsWith("@"))return null;let t=o.slice(1);return t in e?t:null}function x$(e,o){return o&&o in e?o:null}function yn(e){return!e||typeof e!="object"||Array.isArray(e)?null:e}function Sn(e,o){return yn(e?.[o])??{}}function Ed(e,o,t){let r=Sn(e,o);return Object.hasOwn(r,t)?yn(r[t])??{}:{}}function Od(e,o,t,r){let{[t]:a,...n}=Sn(e,o),s=r?{...n,[t]:r}:n,{[o]:l,...c}=e;return Object.keys(s).length?{...c,[o]:s}:c}var ix="_partStyles",cx="data-sf-part-styled",wn="data-sf-text-style",b$=/^(heading|body)-[1-7]$/;function da(e){return typeof e=="string"&&b$.test(e)}var Rd={heading:"heading-1",heading2:"heading-2",heading3:"heading-3",body:"body-1",label:"body-5"};function y$(e){if(!e)return null;for(let[o,t]of Object.entries(Rd))if(t===e)return o;return null}function dx(e){if(da(e.textStyle))return e.textStyle;let o=Lt(e.role);return o?Rd[o]:void 0}var S$=[400,500,600,700],_d=["left","center","right","justify"],ax=5,nx=1e3,w$=-5,C$=10,fx=0,ux=64,px=2,nP={size:{min:ax,max:nx,step:1},sizeTablet:{min:ax,max:nx,step:1},sizePhone:{min:ax,max:nx,step:1},padding:{min:fx,max:ux,step:px}},v$=.05,k$=.01,T$=["line","letter"],P$=.5,E$=2.5,O$=-1,_$=1,R$=0,A$=400,F$=[...new Set(Object.values($a))];function fP(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 Lge(e){return Sn(e,ix)}function Qs(e,o){return Ed(e,ix,o)}function uP(e,o,t){return Od(e,ix,o,L$(t).length?t:null)}function L$(e){return Object.entries(e).filter(([,o])=>o!==void 0)}function B$(e){return T$.includes(e)}var Js=(e,o,t)=>Math.min(t,Math.max(o,e));function D$(e,o){if(B$(e)){let t=Math.round(Number(o));return!Number.isFinite(t)||t===0?null:Js(t,w$,C$)}if(e==="lineHeight"){let t=Number(o);return Number.isFinite(t)?Cn(Js(t,P$,E$),3):null}if(e==="letterSpacing"){let t=Number(o);return Number.isFinite(t)?Cn(Js(t,O$,_$),4):null}if(e==="paragraphSpacing"){let t=Math.round(Number(o));return!Number.isFinite(t)||t<=0?null:Js(t,R$,A$)}if(Object.hasOwn(nP,e)){let{min:t,max:r}=nP[e],a=Math.round(Number(o));return Number.isFinite(a)?Js(a,t,r):null}return e==="italic"?typeof o=="boolean"?o:null:e==="role"||e==="fontRole"?Lt(o)?o:null:e==="sizeToken"?mx(o)?o:null:e==="textStyle"?da(o)?o:null:e==="alignPhone"?_d.includes(o)?o:null:o}var N$=["weight","size","sizeTablet","sizePhone","line","letter","lineHeight","letterSpacing","paragraphSpacing","padding"];function el(e){let o=null,t=r=>{o??={...e},delete o[r]};for(let r of N$){let a=e[r];a!==void 0&&!(typeof a=="number"&&Number.isFinite(a))&&t(r)}return e.align!==void 0&&!_d.includes(e.align)&&t("align"),e.alignPhone!==void 0&&!_d.includes(e.alignPhone)&&t("alignPhone"),e.textStyle!==void 0&&!da(e.textStyle)&&t("textStyle"),e.sizeToken!==void 0&&!mx(e.sizeToken)&&t("sizeToken"),e.fontRole!==void 0&&!Lt(e.fontRole)&&t("fontRole"),o??e}function mx(e){if(!e||typeof e!="object")return!1;let{step:o,px:t,stepPhone:r,pxPhone:a,fluid:n}=e,s=c=>typeof c=="number"&&Number.isFinite(c)&&c>0,l=c=>typeof c=="string"&&F$.includes(c);return l(o)&&s(t)&&(r===void 0||l(r))&&(a===void 0||s(a))&&(n===void 0||M$(n,t))}function M$(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 hx(e){return e?.pxPhone&&mx(e)?{step:e.stepPhone??e.step,px:e.pxPhone}:null}function pP({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 H$=[["font","role"],["font","fontRole"],["role","textStyle"],["line","lineHeight"],["letter","letterSpacing"]];function W$(e){let o=[];for(let[t,r]of H$)t===e?o.push(r):r===e&&o.push(t);return o}function fa(e,o,t,r){let a={...Qs(e,o)},n=r==null?null:D$(t,r);if(n===null)delete a[t];else{a[t]=n;for(let s of W$(t))delete a[s]}return uP(e,o,a)}function mP(e,o){return uP(e,o,{})}function z$(e){return g$(e)??"none"}function G$(e){return I$(e)??""}var sP={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 $$(e,o){return Lt(e.role)||(o?.blockDrawsStyle?null:y$(e.textStyle))}function hP(e,o){return e==="Text"&&o==="text"}var U$={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 j$(e){let o=$a[e],t=U$[o];return t?`var(--size-${o}, ${t})`:`var(--size-${o})`}function ol(e){let o={};return typeof e.lineHeight=="number"?o.lineHeight=e.lineHeight:e.line&&(o.lineHeight=Cn(K$+e.line*v$,3)),typeof e.letterSpacing=="number"?o.letterSpacingEm=e.letterSpacing:e.letter&&(o.letterSpacingEm=Cn(e.letter*k$,4)),o}var K$=1,ca="--sf-part-para";function q$(e){e=el(e);let o={};if(typeof e.sizePhone=="number"&&e.sizePhone>0)o.fontSize=`${e.sizePhone}px`;else{let t=hx(e.sizeToken);if(t)o.fontSize=pP(t);else{let r=Ad(e);r!==void 0&&(o.fontSize=`${r}px`)}}return e.alignPhone&&(o.textAlign=e.alignPhone),o}function Ad(e){let o=Jo("textSize",e.size,e.sizeTablet,void 0).tablet;return o&&o>0?o:void 0}function V$(e){let o=Ad(el(e));return o===void 0?{}:{fontSize:`${o}px`}}function Y$(e,o){if(o==="desktop")return e;let t=el(e),r=Ad(t);if(o==="tablet")return r===void 0?e:{...e,size:r};let a=e;if(typeof t.sizePhone=="number"&&t.sizePhone>0)a={...a,size:t.sizePhone};else{let n=hx(t.sizeToken);n?a={...a,size:void 0,sizeToken:n}:r!==void 0&&(a={...a,size:r})}return t.alignPhone&&(a={...a,align:t.alignPhone}),a}function xx(e,o,t){return gx(Y$(e,o),Fd,t)}function Ix(e){return e==="mobile"?"sizePhone":e==="tablet"?"sizeTablet":"size"}function xP(e,o){if(o==="desktop")return null;let t=el(e);if(o==="mobile"){if(hx(t.sizeToken))return null;let r=Ad(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 IP(e,o){let t=Ix(o);if(!Object.hasOwn(e,t))return e;let r={...e};return delete r[t],r}function Bge(e,o,t){let r=xx(IP(e,o),o,t);return{fontFamily:r.fontFamily,fontSize:r.fontSize}}function gx(e,o,t){e=el(e);let r=$$(e,t),a=ol(e),n=e.size?`${e.size}px`:e.sizeToken?pP(e.sizeToken):r?j$(r):"";return{fontFamily:e.font?Q$(e.font):e.fontRole?`var(${sP[e.fontRole]})`:r?`var(${sP[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`:"",[ca]:e.paragraphSpacing?`${e.paragraphSpacing}px`:"",textTransform:G$(e.case),textAlign:e.align??"",paddingTop:lP(e.padding),paddingBottom:lP(e.padding),color:X$(e.color),fontStyle:e.italic===!0?"italic":e.italic===!1?"normal":""}}var X$=e=>In(e),lP=e=>e===void 0?"":`${e}px`,Cn=(e,o)=>Number(e.toFixed(o));function Dge(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:Z$(Number.parseInt(e.fontWeight,10)),lineRatio:Number.isFinite(r)?Cn(r/t,3):1.2,letterEm:Number.isFinite(a)?Cn(a/t,4):0,align:J$(e.textAlign),case:z$(e.textTransform),paddingPx:Number.isFinite(n)?Math.round(n):0}}function Z$(e){return Number.isFinite(e)?S$.reduce((o,t)=>Math.abs(t-e)<Math.abs(o-e)?t:o):400}function J$(e){for(let o of _d)if(o===e)return o;return e==="end"?"right":"left"}function Nge(e,o){let t=iP(e);if(!t)return"";for(let r of Zo)if(iP(o(r.cssVar))===t)return r.key;return""}var iP=e=>(e.split(",")[0]??"").replace(/["']/g,"").replace(/\s+/g," ").trim().toLowerCase();function Q$(e){let o=Ga(e);return o?`var(${o.cssVar})`:""}function Mge(e,o,t,r){return!o||Ph(o)?.nodeId!==e?null:t.find(a=>r(a.getAttribute("class")))??t[0]??null}function eU(e,o){return Object.hasOwn(e,o)?yn(e[o])??{}:{}}function Hge(e,o,t=()=>Fd,r=l=>l,a=rU,n="desktop",s=()=>!1){let l=0;for(let{element:c,partId:d}of e){let f=Ph(d)?.propKey;if(!f)continue;let m=eU(o,r(f)),u=xx(m,n,{blockDrawsStyle:s(f)});da(m.textStyle)?c.setAttribute?.(wn,m.textStyle):c.removeAttribute?.(wn);let x=sx.some(b=>c.style[b]),I=!1;for(let[b,v]of Object.entries(u))sU(c,b,v),v&&(I=!0);if(x||sx.some(b=>u[b]))for(let b of oU(c,a))for(let v of sx)b.style[v]=u[v]??"";I&&(l+=1)}return l}function oU(e,o){let t=pn(e.textContent??""),r=[],a=e;for(let n=0;n<tU&&o(a);n+=1){let s=a.parentElement;if(!s||pn(s.textContent??"")!==t)break;r.push(s),a=s}return r}var tU=8;function rU(e){let o=e;return typeof window>"u"||!o?.ownerDocument?!1:window.getComputedStyle(o).display==="inline"}var Fd={fontKey:"",sizePx:16,weight:400,lineRatio:1,letterEm:0,align:"left",case:"none",paddingPx:0};function aU(e){if(!e||typeof e!="object")return null;let o={};return da(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),Object.keys(o).length?o:null}function nU(e,o){let t=aU(e);if(!t)return{};let r=xx(t,o);return{...r.fontFamily?{fontFamily:r.fontFamily}:{},...r.fontSize?{fontSize:r.fontSize}:{}}}function gP(e){return da(e?.textStyle)||!!e?.role||typeof e?.size=="number"&&e.size>0}function Wge(e,o,t){if(!e||typeof e!="object")return{};let r=Pd(e.role,o,$a)??{},a=o.sized?nU(IP(e,t),t):{};return{...r,...a}}function zge(e,o,t){t.fontFamily&&e.fontFamily===t.fontFamily&&(e.fontFamily=o.fontFamily),t.fontSize&&e.fontSize===t.fontSize&&(e.fontSize=o.fontSize)}function sU(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===ca&&(t?a.setAttribute?.(cP,""):a.removeAttribute?.(cP))}var cP="data-sf-part-para",lU=Object.keys(gx({},Fd)),lx=new Set(["color","overflowWrap",ca,"fontStyle"]),sx=lU.filter(e=>!lx.has(e));function bP(e,o,t,r=l=>l,a=()=>!1,n=()=>null,s=[]){let l=new Map;for(let f of e){let m=Us(f.key,f.row);for(let u of f.texts){let x=l.get(u);x?(x.keys.add(f.key),x.partKeys.add(m)):l.set(u,{keys:new Set([f.key]),partKeys:new Set([m])})}}let c=new Map;for(let f of new Set([...Object.keys(o),...s])){if(!iU(f))continue;let m=dP(t,f,yn(o[f])??{},!1,n(f));m&&c.set(f,m)}let d=new Map;for(let[f,{keys:m,partKeys:u}]of l){let x=u.size===1?[...u][0]:m.size===1?[...m][0]:null;if(!x)continue;let I=r(x),b=n(I);if(!Object.hasOwn(o,I)&&!b)continue;let v=yn(o[I])??{},C=dP(t,x,v,a(x),b);C&&d.set(f,C)}return d.size||c.size?{rules:d,kindRules:c,drawn:new Set(l.keys())}:null}function dP(e,o,t,r,a){let n=gx(t,Fd,{blockDrawsStyle:r}),s=V$(t),l=q$(t),c=da(t.textStyle)?t.textStyle:void 0;return!Object.values(n).some(Boolean)&&!Object.keys(s).length&&!Object.keys(l).length&&!c&&!a?null:{stamp:cU(e,o),declarations:n,...Object.keys(s).length?{tablet:s}:{},...Object.keys(l).length?{phone:l}:{},...c?{textStyle:c}:{},...a?{motion:a}:{}}}function iU(e){return e.startsWith("@")}function bx(e,o){return e?.kindRules.get(o)??null}function cU(e,o){let t=r=>r.replace(/[^A-Za-z0-9_-]+/g,"-");return`${t(e)}~${t(o)}`}function yP(e){let o=[],t=new Set,r=a=>{let{stamp:n,declarations:s}=a;if(t.has(n))return;t.add(n);let l=Object.entries(s).filter(([,I])=>I!==""),c=I=>I.map(([b,v])=>`${dU(b)}: ${v}`).join("; "),d=`[${cx}="${n}"]`,f=l.filter(([I])=>!lx.has(I)),m=l.filter(([I])=>lx.has(I));f.length&&o.push(`${d}, *:has(> ${d}) { ${c(f)} }`),m.length&&o.push(`${d} { ${c(m)} }`),s[ca]&&(o.push(`*:has(> ${d}) { ${ca}: ${s[ca]} }`),o.push(...Ld(d,`*:has(> ${d})`)));let u=Object.entries(a.tablet??{}).filter(([,I])=>I!=="");u.length&&o.push(`@media ${kd} { ${d}, *:has(> ${d}) { ${c(u)} } }`);let x=Object.entries(a.phone??{}).filter(([,I])=>I!=="");x.length&&o.push(`@media ${xn} { ${d}, *:has(> ${d}) { ${c(x)} } }`)};for(let a of e.rules.values())r(a);for(let a of e.kindRules.values())r(a);return o.join(`
|
|
38
|
+
`)}function Ld(e,o){let t=`var(${ca})`,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 dU=e=>e.replace(/[A-Z]/g,o=>`-${o.toLowerCase()}`);function SP(e,o){if(!e)return null;let t=pn(o),r=e.rules.get(t);if(r)return r;if(t.length<fU||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 fU=8;function wP(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 yx=e=>e==="sentence"?"none":void 0,TP=["font","color","size","sizeTablet","sizePhone","weight","italic","lineHeight","lineHeightTablet","lineHeightPhone","letterSpacing","letterSpacingTablet","letterSpacingPhone","paragraphSpacing","paragraphSpacingTablet","paragraphSpacingPhone","letterCase","largestSize","largestSizeTablet","largestSizePhone"],vn=["desktop","tablet","phone"],tl=(e,o)=>o==="desktop"?e:o==="tablet"?hU(e):mU(e),ua=(e,o)=>o==="desktop"?e:pU(e,o);function Cx(e,o,t,r=$r()){return kP("textSize",o,e.sizeTablet,e.sizePhone,r)[t]}var xU=[["lineSpacing","lineHeight","line"],["letterSpacing","letterSpacing","letter"]];function Sx(e){for(let[o,t,r]of xU)for(let a of vn)if(e===ua(o,a))return{key:tl(t,a),view:a,spacing:r};return{key:e,view:"desktop",spacing:null}}function Tt(e){let o={};for(let t of TP)e[t]!==void 0&&(o[t]=e[t]);return o}function vx(e,o){let{auto:t,...r}=e,a=new Set(o??[]),n=TP.filter(s=>a.has(s)&&e.values[s]===void 0);return n.length?{...r,auto:n}:r}function PP(e){let o=e.fonts,t=e.sizes,r=e.typography,a=my(e.compression),n={"heading-1":{font:oe(o.heading),size:U(t.headingLarge),weight:U(r.weight),lineHeight:a.lineHeight,letterSpacing:a.letterSpacing,letterCase:yx(r.case),largestSize:U(r.maxPx)},"heading-2":{font:oe(o.heading2),size:U(t.headingMedium),weight:U(r.weight2),lineHeight:a.lineHeight,letterSpacing:a.letterSpacing,letterCase:yx(r.case2)},"heading-3":{font:oe(o.heading3),size:U(t.headingSmall),weight:U(r.weight3),lineHeight:a.lineHeight,letterSpacing:a.letterSpacing,letterCase:yx(r.case3)},"body-1":{font:oe(o.body),size:U(t.body)},"body-5":{font:oe(o.label),size:U(t.label)}};return vP().map(({id:s,kind:l,name:c})=>({id:s,kind:l,name:c,values:Tt(n[s]??{})}))}function kx(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=>vx({...o,values:Tt(o.values??{})},Array.isArray(o.auto)?o.auto:void 0)):null}function ebe(e){return kx(e)??[]}function EP(e){return kx(e)??vP().map(({id:o,kind:t,name:r})=>({id:o,kind:t,name:r,values:{}}))}function qt(e,o){let t=PP(o),r=kx(e);return r?r.map(a=>{let n={...wx(t,a.id)};for(let s of a.auto??[])delete n[s];return{...a,values:Tt({...n,...a.values})}}):t}var wx=(e,o)=>e.find(t=>t.id===o)?.values??{},CP=["heading-1","heading-2","heading-3"];function OP({saved:e,old:o,cur:t,next:r,sizeOf:a,panelView:n="desktop"}){let s=PP(o),l=EP(e),c=qt(l,o),d=[],f=r.map(u=>{let x=t.find(T=>T.id===u.id),I=l.find(T=>T.id===u.id);if(!x||!I){let T=IU([u],a,n)[0],F=T.values.color;return F===void 0?T:{...T,values:{...T.values,color:kt(F)}}}let b={...I.values},v=new Set(I.auto??[]),C=u.values,w=x.values,g=[...new Set([...Object.keys(C),...Object.keys(w)])].filter(T=>JSON.stringify(C[T])!==JSON.stringify(w[T])),k=T=>Sx(T).spacing==="letter";g.sort((T,F)=>Number(k(T))-Number(k(F)));for(let T of g){let{key:F,view:P,spacing:L}=Sx(T),E=F,R=C[T];if(R===void 0){delete b[E],wx(s,u.id)[E]!==void 0&&(d.push([u.id,E]),v.add(E));continue}if(v.delete(E),L==="line")b[E]=kn(R/100,3);else if(L==="letter"){let N={...c.find(A=>A.id===u.id)?.values??{}};for(let A of g)C[A]===void 0&&delete N[Sx(A).key];let y=Tt({...N,...b}),_=Cx(y,a({...u,values:y}),P);b[E]=_?kn(R/_,4):0}else b[E]=R}return vx({id:u.id,kind:u.kind,name:u.name,values:Tt(b)},v)}),m=o.compression;if(d.some(([u,x])=>(x==="lineHeight"||x==="letterSpacing")&&CP.includes(u))&&Dr(m)!=="normal"){for(let u of CP){let x=f.find(b=>b.id===u);if(!x)continue;let I={...x.values};for(let b of["lineHeight","letterSpacing"])d.some(([v,C])=>v===u&&C===b)||I[b]===void 0&&!(x.auto??[]).includes(b)&&(I[b]=wx(s,u)[b]);x.values=Tt(I)}m="normal"}return{saved:f,old:{...o,compression:m}}}function _P(e,o){let t={text_styles:e.saved};return e.old.compression!==o.compression&&(t.heading_compression=Dr(e.old.compression)),t}var kn=(e,o)=>Number(e.toFixed(o)),RP=(e,o)=>vn.indexOf(e)<vn.indexOf(o)?o:e;function AP(e,o,t="desktop"){return e.map(r=>{let a={...r.values},n=o(r);for(let s of vn){let l=tl("lineHeight",s),c=r.values[l],d=r.values[tl("letterSpacing",s)];delete a[l],c!==void 0&&(a[ua("lineSpacing",s)]=kn(c*100,1));let f=RP(s,t);d!==void 0&&(a[ua("letterSpacing",s)]=kn(d*Cx(r.values,n,f),f===s?2:4))}return{id:r.id,kind:r.kind,name:r.name,values:a}})}function IU(e,o,t="desktop"){return e.map(r=>{let a=r.values,n={...a};for(let d of vn)delete n[ua("lineSpacing",d)],delete n[ua("letterSpacing",d)];let s={id:r.id,kind:r.kind,name:r.name,values:Tt(n)},l={...s.values},c=o({...s,values:{...s.values}});for(let d of vn){let f=a[ua("lineSpacing",d)],m=a[ua("letterSpacing",d)];if(typeof f=="number"&&(l[tl("lineHeight",d)]=kn(f/100,3)),typeof m=="number"){let u=Cx(s.values,c,RP(d,t));l[tl("letterSpacing",d)]=u?kn(m/u,4):0}}return{...s,values:Tt(l)}})}function obe(e){let o={fonts:rs({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:ju({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:Dr(e.heading_compression),typography:xy(e)},t=e.text_styles??null,r=Array.isArray(t)?Tx(qt(t,o),o):o;return{fonts:rs(r.fonts),sizes:ju(r.sizes),compression:Dr(r.compression),typography:r.typography,textStyles:t}}function Tx(e,o){let t=u=>e.find(x=>x.id===u)?.values??{},r=t("heading-1"),a=t("heading-2"),n=t("heading-3"),s=t("body-1"),l=t("body-5"),c=o.fonts,d=o.sizes,f=o.typography,m=u=>u==="none"?"sentence":"authored";return{fonts:{...c,heading:r.font??c.heading,heading2:a.font??r.font??c.heading2,heading3:n.font??r.font??c.heading3,body:s.font??c.body,label:l.font??c.label},sizes:{...d,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:m(r.letterCase),weight:r.weight??null,maxPx:r.largestSize??null,weight2:a.weight??null,weight3:n.weight??null,case2:m(a.letterCase),case3:m(n.letterCase)}}}function tbe(e){let o=[];for(let t of e){let r=t.values,a=`.${wP(t)}`,n=`[${wn}="${t.id}"]`,s=`${a}, ${n}`,l=[],c=r.font!==void 0?Zo.find(u=>u.key===r.font)?.cssVar:void 0;if(c&&l.push(`font-family: var(${c})`),r.size!==void 0){let u=r.largestSize!==void 0?Math.min(r.size,r.largestSize):r.size;l.push(`font-size: ${u}px`)}let d=In(r.color);d&&l.push(`color: ${d}`),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 m=uU(r.letterCase);m&&t.kind==="body"&&l.push(`text-transform: ${m}`),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"&&m&&o.push(`${n}, ${a}:is(h1, h2, h3, h4) { text-transform: ${m} }`),r.paragraphSpacing&&(o.push(`*:has(> ${n}) { --sf-part-para: ${r.paragraphSpacing}px }`),o.push(...Ld(`:is(${s})`,`*:has(> ${n})`))),o.push(...gU(t,s,a,n))}return o.join(`
|
|
39
|
+
`)}function gU(e,o,t,r){let a=e.values,n=Jo("textSize",a.size,a.sizeTablet,a.sizePhone),s=Jo("textSize",a.largestSize,a.largestSizeTablet,a.largestSizePhone),l=Jo("same",a.lineHeight,a.lineHeightTablet,a.lineHeightPhone),c=Jo("same",a.letterSpacing,a.letterSpacingTablet,a.letterSpacingPhone),d=Jo("spacing",a.paragraphSpacing,a.paragraphSpacingTablet,a.paragraphSpacingPhone),f=kP("textSize",a.size,a.sizeTablet,a.sizePhone,$r()),m=bU[e.id],u=[];for(let[x,I]of[["tablet",kd],["phone",xn]]){let b=[],v=[],C=f[x],w=s[x],g=n[x]===void 0&&w===void 0||C===void 0?void 0:w===void 0?C:Math.min(C,w);g!==void 0&&v.push(`font-size: ${g}px`);let k=[];l[x]!==void 0&&k.push(`line-height: ${l[x]}`),c[x]!==void 0&&k.push(`letter-spacing: ${c[x]}em`),e.kind==="body"&&v.push(...k),d[x]!==void 0&&v.push(`--sf-part-para: ${d[x]}px`),v.length&&b.push(`${o} { ${v.join("; ")} }`),e.kind==="heading"&&k.length&&b.push(`${o}, ${t}:is(h1, h2, h3, h4), ${r}:is(h1, h2, h3, h4) { ${k.join("; ")} }`),d[x]!==void 0&&b.push(`*:has(> ${r}) { --sf-part-para: ${d[x]}px }`),d[x]!==void 0&&!a.paragraphSpacing&&b.push(...Ld(`:is(${o})`,`*:has(> ${r})`)),g!==void 0&&m&&b.push(`.sf-themed-content { --size-${m}: ${g}px !important }`),b.length&&u.push(`@media ${I} { ${b.join(" ")} }`)}return u}var bU={"heading-1":"headingLarge","heading-2":"headingMedium","heading-3":"headingSmall","body-1":"body","body-5":"label"};function rbe(e){return e!==!0&&e!==!1?"":`em.text-accent { font-style: ${e?"italic":"normal"} }`}function FP(e){return e?Rd[e]:void 0}function Px(e){let o=ol(e);return Tt({font:e.font,color:e.color===void 0?void 0:kt(e.color),size:e.size,weight:e.weight,italic:e.italic,lineHeight:o.lineHeight,letterSpacing:o.letterSpacingEm,paragraphSpacing:e.paragraphSpacing,letterCase:e.case})}function LP(e){return Object.keys(Px(e)).length>0}function BP({saved:e,old:o,styleId:t,values:r}){let a=EP(e);return{saved:yU(a,t,r),old:o}}function yU(e,o,t){return e.map(r=>r.id===o?vx({...r,values:Tt({...r.values,...t})},r.auto):r)}var kU={desktop:"desktop",tablet:"tablet",mobile:"phone"},DP=["font","color","size","weight","emphasis","lineSpacing","letterSpacing","paragraphSpacing","letterCase","largestSize"],TU=["size","lineSpacing","letterSpacing","letterCase"],PU=500,Ex=Zo.map(e=>({value:e.key,label:e.label,family:`var(${e.cssVar})`,italic:e.italicLoaded}));function NP({saved:e,old:o,colours:t,colourNameOf:r,sizeOf:a,onChange:n,openId:s,onOpenChange:l,readOnly:c=!1,withoutSize:d=!1}){let f=vU(),[m,u]=wU(null),x=qt(e,o),I=kU[f],b=AP(x,a,I);return SU(CU,{styles:b,onChange:v=>n(OP({saved:e,old:o,cur:b,next:v,sizeOf:a,panelView:I})),fonts:Ex,colours:t,colourNameOf:r,settings:d?DP.filter(v=>v!=="size"):DP,auto:TU,openId:s===void 0?m:s,onOpenChange:l??u,readOnly:c,device:I,fallback:v=>{let C=x.find(g=>g.id===(v.kind==="heading"?"heading-1":"body-1")),w={};return C?.values.font&&v.id!==C.id&&(w.font=C.values.font),v.kind==="heading"&&(w.weight=PU),w}})}var HP=["font","size","weight","emphasis"],_U=500;function RU({font:e,size:o,weight:t,italic:r}){let a={font:e};return o!==null&&(a.size=o),t!==null&&(a.weight=t),r!==null&&(a.italic=r),{id:"accent",kind:"heading",name:i("Emphasis"),values:a}}function AU(e,o){let t=[],r=e.values,a=o.values;return a.font!==r.font&&a.font!==void 0&&t.push({key:"font",value:a.font}),a.size!==r.size&&t.push({key:"size",value:a.size??null}),a.weight!==r.weight&&t.push({key:"weight",value:a.weight??null}),a.italic!==r.italic&&t.push({key:"italic",value:a.italic??null}),t}function WP(e){let{headingWeight:o,open:t,onOpenChange:r,onChange:a,withoutSize:n=!1}=e,s=RU(e);return MP(OU,{label:i("Emphasis"),children:MP(EU,{style:s,fonts:Ex,settings:n?HP.filter(l=>l!=="size"):HP,auto:["size"],fallback:()=>({weight:o??_U}),open:t,onOpenChange:r,onChange:l=>AU(s,l).forEach(a)})})}import{Button as rj,EmptyState as aj,SliderGroup as nj,Tabs as sj,Tooltip as kye,tabButtonId as lj,tabPanelId as ij}from"efficient-shell/ui";import{ContrastIcon as cj,NoteIcon as dj,SettingsIcon as fj,TypeIcon as uj}from"efficient-easel/icons";function zP(e){switch(e.status){case"saved":return null;case"failed":return{msg:i("Not saved. Try again."),tone:"error"};case"skipped":switch(e.reason){case"empty":return null;case"no-token":return{msg:i("Not saved. Reload the page."),tone:"error"};case"template":return{msg:i("Templates keep their look. Press Done."),tone:"success"}}}}import{jsx as Ax}from"react/jsx-runtime";import{ListIcon as jU,PaddingTopIcon as KU}from"efficient-easel/icons";import{jsx as Bd}from"react/jsx-runtime";import{SettingsDefaultReset as FU,SettingsField as LU,SettingsSegmented as BU}from"efficient-easel/panel";import{WidthIcon as DU}from"efficient-easel/icons";function GP({value:e,resolved:o,onChange:t,label:r="Width",labelId:a,followsLabel:n,hint:s}){let l=e===void 0,c=l?o:e,d=i(r);return Bd(LU,{label:d,labelId:a,icon:Bd(DU,{}),value:l?n:void 0,changed:!l,action:Bd(FU,{words:Q()?.panel,label:d,changed:!l,onReset:()=>t(void 0)}),hint:s,children:Bd(BU,{options:[{label:i(aa.full),id:"full"},{label:i(aa.page),id:"content"}],value:c,ariaLabel:d,onChange:t})})}import{HEADER_TYPE as Ox,FOOTER_TYPE as NU}from"efficient-easel/draw";var MU=new Set(["Hero","HeroSingle","IntroBleed"]),$P={min:56,max:140,default:88},Tbe={min:0,max:120,step:2,default:32},Pbe=`var(--sf-header-h, ${$P.default}px)`,HU="--sf-header-set-h",Ebe="--sf-header-h",Obe=`var(${HU}, ${$P.default}px)`,_be="sf-header-clearance",Rbe="sf-sticky-underheader";function WU(e){return e?.find(o=>o?.type&&o.type!==Ox)??null}function UP(e){let o=WU(e)?.type;return!o||!MU.has(o)}function Abe(e){return!UP(e)}function Fbe(e){return!!e?.some(o=>o?.type===Ox)}function Lbe(e){return!e||e.length===0?!1:!e.some(o=>o?.type===Ox||o?.type===NU)}var zU=["auto","shared","own"],_x="auto",GU="topSpace",Bbe="data-top-space";function $U(e){return zU.includes(e)?e:_x}function UU(e,o){let t=$U(e?.props?.[GU]);return t==="own"?!0:t==="shared"?!1:UP(o)}function Dbe(e,o){return UU(e,o)?"own":null}function qU(){return{type:"custom",render:({value:e,onChange:o})=>Ax(GP,{value:e==="full"?"full":e==="content"?"content":void 0,resolved:"content",label:"Page width",followsLabel:i("Follows the site"),hint:i("Whether this page sits on the site's content column, or runs edge to edge."),onChange:t=>o(t)})}}var VU=[{label:"Auto",value:"auto"},{label:"Shared",value:"shared"},{label:"Its own",value:"own"}],qbe={pageBackground:Bk(),topSpace:st("Top space",Ax(KU,{}),VU,_x),widthChoice:qU()},rl=["pageBackground","topSpace","widthChoice"],YU="Record type",Rx=new Map,jP=-1;function XU(e){jP!==Np()&&(Rx.clear(),jP=Np());let o=Dp(),t=o.some(a=>a.key===e)?"":e,r=Rx.get(t);return r||(r=st(YU,Ax(jU,{}),[...o.map(a=>({label:a.label,value:a.key})),...t?[{label:t,value:t}]:[]],ir),Rx.set(t,r)),r}var KP=new WeakMap;function Vbe(e,o){if(!bs()||Dp().length<2||ji in e)return e;let t=XU(gs(o)),r=KP.get(e);if(r&&r.row===t)return r.fields;let a={[ji]:t,...e};return KP.set(e,{row:t,fields:a}),a}import{previewFrame as pj}from"efficient-easel/screen/lib/document/preview-dom";var qP="background";function VP(e){let o=yo(Ua(e));return gn({main:o.accent,text:o.text,background:o.background,muted:o.muted}).map(t=>({key:t.name,name:t.label??t.name,value:t.value}))}function YP(e){return VP(e).filter(o=>o.key!==qP)}function XP(e){let o=VP(e).filter(t=>t.key===qP);return t=>{let r=kt(t);return o.find(a=>a.key===r)?.value??r}}import{useEasel as ZU}from"efficient-easel/easel";function Dd({themeFromDocument:e,persist:o}){let{appState:t,dispatch:r}=ZU(P=>P),{fonts:a,setFonts:n,sizes:s,setSizes:l,headingCompression:c,setHeadingCompression:d,headingTypography:f,setHeadingTypography:m,textStyles:u,setTextStyles:x}=ce(),I=t.data,b=I.root?.props??{},v=e?rs(b.fonts):a,C=e?iy:s,w=e?Dr(b.headingCompression):c,g=e?hy(b.headingTypography):f,k={fonts:v,sizes:C,compression:w,typography:g},T=e?b.textStyles:u,F=P=>r({type:"replaceRoot",root:{...I.root,props:{...b,...P}},recordHistory:!0});return{fonts:v,sizes:C,compression:w,typography:g,old:k,saved:T,write:(P,L)=>{let E=Tx(qt(P.saved,P.old),P.old);e?F({textStyles:P.saved,fonts:E.fonts,headingCompression:E.compression,headingTypography:E.typography}):(x(P.saved),n(E.fonts),l(E.sizes),d(E.compression),m(E.typography)),o(_P(P,k),L)},writeRoot:F}}var Lx="sf-site-styles",mj="sf-site-styles-tabpanel",Dx=!1,hj="Show hints";function Nx({shown:e,onChange:o}){return ae("div",{className:"sf-hints",children:ae(rj,{type:"button",variant:"ghost","aria-pressed":e,leftIcon:ae(dj,{size:13}),onClick:()=>o(!e),children:i(hj)})})}var QP="text",En="basics",ZP="this-page-group",Tn=[{id:En,label:"Basics",icon:ae(fj,{})},{id:"theme",label:"Theme",icon:ae(cj,{})},{id:"text",label:"Text",icon:ae(uj,{})}];function xj({themeFromDocument:e,persist:o}){let{appState:t,dispatch:r}=JP(d=>d),{theme:a,setTheme:n}=ce(),s=t.data,l=s.root?.props??{},c=d=>{if(e){let f={...l,theme:d};r({type:"replaceRoot",root:{...s.root,props:f},recordHistory:!0})}else n(d);o({selected_preset:d.selected,theme_presets:d.themes})};return ae(vT,{value:e?l.theme:a,onChange:c})}function Ij({themeFromDocument:e,persist:o}){let[t,r]=Nd(null),{theme:a,setFonts:n,setSizes:s,setHeadingTypography:l}=ce(),c=Dd({themeFromDocument:e,persist:o}),{old:d,saved:f,writeRoot:m}=c,u=c.fonts,x=c.sizes,I=c.typography,b=P=>P.values.size??Sj(gj[P.id]??"body")??bj[P.kind],v=P=>c.write(P),C=YP(a),w=XP(a),g=P=>{let L={...u,accent:P};e?m({fonts:L}):n(L),o({accent_font:P})},k=P=>{s({...x,accent:P}),o({accent_size_px:P})},T=P=>{let L={...I,weightStrong:P};e?m({headingTypography:L}):l(L),o({heading_weight_strong:P})},F=P=>{let L={...I,italicStrong:P};e?m({headingTypography:L}):l(L),o({accent_italic:P})};return pa(Pn,{children:[ae(NP,{saved:f,old:d,colours:C,colourNameOf:w,sizeOf:b,onChange:v,openId:t===Fx?null:t,onOpenChange:r,withoutSize:e}),ae(WP,{font:u.accent,size:x.accent,weight:I.weightStrong,italic:I.italicStrong,headingWeight:I.weight,open:t===Fx,onOpenChange:P=>r(P?Fx:null),onChange:P=>{P.key==="font"?g(P.value):P.key==="size"?k(P.value):P.key==="weight"?T(P.value):F(P.value)},withoutSize:e})]})}var Fx="accent",gj={"heading-1":"heading","heading-2":"heading2","heading-3":"heading3","body-1":"body","body-5":"label"},bj={heading:32,body:14},yj={heading:"main h1, main h2",heading2:"main h1, main h2",heading3:"main h1, main h2",accent:"main h1 em, main h2 em",body:"main p",label:"main .mono-eyebrow"};function Sj(e){if(typeof document>"u")return null;let o=(pj()?.contentDocument??document).querySelector(yj[e]);if(!o)return null;let t=parseFloat(getComputedStyle(o).fontSize);return Number.isFinite(t)?t:null}function wj({themeFromDocument:e,persist:o,showHint:t}){let{appState:r,dispatch:a}=JP(u=>u),{cornerRadiusPx:n,setCornerRadiusPx:s}=ce(),l=r.data,c=l.root?.props??{},d=c.cornerRadiusPx===void 0?dy[cy(c.cornerStyle)]:gt(c.cornerRadiusPx),f=e?d:n,m=u=>a({type:"replaceRoot",root:{...l.root,props:{...c,...u}},recordHistory:!0});return ae(kT,{value:f,onChange:u=>{e?m({cornerRadiusPx:u}):s(u),o({corner_radius_px:u})},showHint:t})}function Cj(e){return{site_width:e}}function vj({persist:e,showHint:o}){let{siteWidth:t,setSiteWidth:r,sectionBackgroundWidth:a,setSectionBackgroundWidth:n,sectionContentWidth:s,setSectionContentWidth:l}=ce();if(Bx()!=="desktop")return null;let c=typeof t=="number"?t:co.default,d=u=>{r(u),e(Cj(u),u===null)},f=u=>{n(u),e({section_background_width:u},!0)},m=u=>{l(u),e({section_content_width:u},!0)};return pa(Pn,{children:[ae(VT,{value:a??"full",changed:a!==null,detail:i("Full width"),onChange:f,onReset:()=>f(null),hint:o?KT:void 0}),ae(YT,{mode:s??"content",px:c,min:co.min,max:co.max,changed:typeof t=="number"||s!==null,detail:`${i("Content width")} ${co.default}px`,onMode:m,onPx:u=>d(u),onReset:()=>{m(null),d(null)},hint:o?qT:void 0})]})}function kj(e){return{block_gap:e}}function Tj(e){return{block_gap_phone:e}}function Pj(e){return{site_gutter:e}}function Ej(e){return{site_gutter_phone:e}}function e0(e,[o,t],r){o(e),r(t(e),e===null)}function Oj({persist:e,showHint:o}){let{siteGutter:t,siteGutterPhone:r,setSiteGutter:a,setSiteGutterPhone:n}=ce(),s=UT(Bx(),{gutter:t,phone:r});if(!s)return null;let l=s.key==="site_gutter_phone"?[n,Ej]:[a,Pj];return ae(jT,{value:s.value,onChange:c=>e0(c,l,e),showHint:o,unsetPx:s.unsetPx,bounds:s.bounds})}function _j({persist:e,showHint:o}){let{blockGap:t,blockGapPhone:r,setBlockGap:a,setBlockGapPhone:n}=ce(),s=_T(Bx(),{gap:t,phone:r});if(!s)return null;let l=s.key==="block_gap_phone"?[n,Tj]:[a,kj];return ae(RT,{value:s.value,onChange:c=>e0(c,l,e),showHint:o,followsPx:s.followsPx})}function Rj({persist:e,showHint:o=!0}){return pa(Pn,{children:[ae(vj,{persist:e,showHint:o}),ae(Oj,{persist:e,showHint:o}),ae(_j,{persist:e,showHint:o})]})}function Aj(e){return{card_shadow:e}}function Fj(e){return e===null?{shadow_color:null}:{shadow_color:py(e)}}function Lj(e){return{hover_effect:e}}function Bj({persist:e,showHint:o=!0}){let{cardShadow:t,setCardShadow:r,shadowColor:a,setShadowColor:n,hoverEffect:s,setHoverEffect:l}=ce();return pa(Pn,{children:[ae(TT,{value:t,onChange:c=>{r(c),e(Aj(c),!0)},showHint:o}),ae(ET,{value:a,onChange:c=>{n(c),e(Fj(c),c===null)},showHint:o}),ae(HT,{value:s,onChange:c=>{l(c),e(Lj(c),!0)},showHint:o})]})}function Dj(e){return{photography_grayscale:e}}function Nj({persist:e,showHint:o}){let{photographyGrayscale:t,setPhotographyGrayscale:r}=ce();return ae(zT,{value:t,onChange:a=>{r(a),e(Dj(a),!0)},showHint:o})}function Mj({persist:e,showHint:o=!0}){return ae(Pn,{children:ae(Nj,{persist:e,showHint:o})})}function Hj(e){return{share_button_on_posts:e}}function Wj({persist:e,showHint:o=!0}){let{shareButtonOnPosts:t,setShareButtonOnPosts:r}=ce();return ae(GT,{value:t,onChange:a=>{r(a),e(Hj(a),!0)},showHint:o})}function On(){let{websiteName:e}=ce();return e?.trim()||Cy}function Md({themeFromDocument:e=!1,tokenRef:o,siteId:t,onNotify:r,tab:a,onTabChange:n,initialTab:s,revealPageGroup:l=!1,onPageGroupRevealed:c}){let{persist:d}=Ja({themeFromDocument:e,tokenRef:o,siteId:t,onResult:w=>{let g=zP(w);g&&r?.(g.msg,g.tone)}}),[f,m]=Nd(s??Tn[0].id),u=a!==void 0,x=u?a:f,I=u?n??(()=>{}):m,b=Tn.find(w=>w.id===x)??Tn[0],[v,C]=Nd(Dx);return pa(nj,{children:[ae($j,{activeId:b.id,onSelect:I}),pa("div",{id:ij(Lx,b.id),className:mj,role:"tabpanel","aria-labelledby":lj(Lx,b.id),children:[x===En&&pa(Pn,{children:[ae(wj,{themeFromDocument:e,persist:d,showHint:v}),!e&&ae(Bj,{persist:d,showHint:v}),!e&&ae(Rj,{persist:d,showHint:v}),!e&&ae(Mj,{persist:d,showHint:v}),!e&&ae(Wj,{persist:d,showHint:v}),ae(zj,{reveal:l,onRevealed:c}),ae(Nx,{shown:v,onChange:C})]}),x==="theme"&&ae(xj,{themeFromDocument:e,persist:d}),x==="text"&&ae(Ij,{themeFromDocument:e,persist:d})]})]})}function zj({reveal:e,onRevealed:o}){let[t,r]=Nd(!0),a=tj(o);return a.current=o,oj(()=>{if(!e)return;r(!0);let n=requestAnimationFrame(()=>{document.getElementById(ZP)?.scrollIntoView({block:"start"}),a.current?.()});return()=>cancelAnimationFrame(n)},[e]),ae(ej,{title:i("This page"),open:t,onToggle:r,id:ZP,children:ae(Gj,{})})}function Gj(){let{fields:e,values:o,readOnly:t,onChange:r}=JU(),a=Object.fromEntries(rl.filter(n=>n in e).map(n=>[n,e[n]]));return Object.keys(a).length===0?ae(aj,{variant:"none",icon:!1,message:i("This page has no look of its own to set.")}):ae(QU,{fields:a,values:o,onChange:r,readOnly:t,tabs:!1,idPrefix:"this-page",ariaLabel:i("This page")})}function $j({activeId:e,onSelect:o}){return ae("div",{className:"es-insp-tabs",children:ae(sj,{variant:"underline",block:!0,labelsFit:!0,"aria-label":i("Styles"),idPrefix:Lx,value:e,onChange:o,items:Tn.map(t=>{let r=i(t.label);return{id:t.id,icon:t.icon,label:r}})})})}import{InspectorIconButton as Qj}from"efficient-easel/chrome";import{Button as i0,Dialog as eK,FormField as oK,Input as c0,PopupMenu as tK,PopupMenuItem as d0,toast as f0}from"efficient-shell/ui";import{LayersTree as rK,TreeGroupLabel as aK,TreeRow as u0,TreeRowAction as Gd}from"efficient-easel/tree";import{AddIcon as nK,DuplicateIcon as sK,PageIcon as lK,SettingsIcon as iK}from"efficient-easel/icons";import{PagesIcon as cK}from"efficient-easel/rail";import{useEaselHost as dK}from"efficient-easel/screen/lib/host";import{useEaselSession as x0}from"efficient-easel/screen/lib/session-context";import{useCallback as Hd,useEffect as Uj,useSyncExternalStore as jj}from"react";import{useScreenDocument as a0}from"efficient-easel/screen/components/ScreenDocumentContext";var o0=new WeakMap;function al(e){let o=o0.get(e);return o||(o={rows:null,loading:null,listeners:new Set},o0.set(e,o)),o}function Mx(e,o){e.rows=o;for(let t of e.listeners)t()}var Wd=new Set;function zd(e,o){o?Wd.add(e):Wd.delete(e)}function t0(e){let o=al(e),t=e.listPages().then(r=>Mx(o,Wd.size?r.filter(a=>!Wd.has(a.id)):r),()=>Mx(o,[])).finally(()=>{o.loading===t&&(o.loading=null)});return o.loading=t,t}var r0=()=>null,Kj=()=>()=>{};function nl(){let{adapter:e,ready:o}=a0(),t=Hd(l=>{let{listeners:c}=al(e);return c.add(l),()=>c.delete(l)},[e]),r=Hd(()=>al(e).rows,[e]),a=jj(o?t:Kj,o?r:r0,r0);Uj(()=>{if(!o)return;let l=al(e);l.rows===null&&!l.loading&&t0(e)},[e,o]);let n=Hd(()=>o?t0(e):Promise.resolve(),[e,o]),s=Hd(l=>Mx(al(e),l),[e]);return{rows:a,reload:n,setRows:s,getRows:r}}function qj(e,o){return e?.find(t=>t.slug===o)?.label?.trim()||`/${o}`}function n0(){let{currentSlug:e}=a0(),{rows:o}=nl();return qj(o,e)}import{canDuplicatePage as fK,DuplicatePageDialog as uK,uniqueSlug as p0}from"efficient-easel/page-copy";var m0="sf-editor-pages-collapsed-groups";function pK(){let e=x0(),{siteId:o,templateId:t}=h0(),r=ze(e).pages;if(!(!r.duplicate||t))return(a,n)=>r.duplicate(a.id,{...n,...o?{siteId:o}:{}})}function mK(){try{let e=qa()||(typeof window>"u"?"":window.location.origin);return e?new URL(e).host:""}catch{return""}}function I0({onNavigate:e,onClose:o,activeSurface:t,onPreviewSurface:r}){let a=x0().chrome?.pageRows,n=dK(),{adapter:s,capabilities:l,ready:c,currentSlug:d}=h0(),f=On(),{rows:m,reload:u,setRows:x,getRows:I}=nl(),[b,v]=yr(""),[C,w]=yr(!1),[g,k]=yr(null),[T,F]=yr(!1),[P,L]=yr(""),E=Xj(),R=pK(),[N,y]=yr(null),[_,A]=yr(()=>{if(typeof window>"u")return new Set;try{let M=window.localStorage.getItem(m0);return new Set(M?JSON.parse(M):[])}catch{return new Set}});Yj(()=>{try{window.localStorage.setItem(m0,JSON.stringify([..._]))}catch{}},[_]);let H=M=>A(te=>{let xe=new Set(te);return xe.has(M)?xe.delete(M):xe.add(M),xe}),Z=l0(()=>tw(m??[]),[m]),q=b.trim().toLowerCase(),$=M=>!q||M.toLowerCase().includes(q),ke=M=>q?!0:!_.has(M),be=l0(()=>new Set((m??[]).map(M=>M.slug)),[m]),Ke=()=>{if(l.pageCreationInAdminForm){n.send("storefront-editor:new-page");return}L(""),k(null),F(!0)},Me=async()=>{let M=P.trim();if(!(!M||!c||C||!s.createPage)){w(!0),k(null);try{let te=await s.createPage({slug:p0(M,be),title:M,layout:{}});await u(),F(!1),L(""),e(te.slug)}catch{k(i("Couldn\u2019t add the page \u2014 please retry."))}finally{w(!1)}}},ue=l.hasSiteSettings&&!!s.createPage,pe=async()=>{if(!(!c||C||!s.createPage)){w(!0),k(null);try{let M=await s.createPage(KC(i("New popup"),be));await u(),e(M.slug)}catch{k(i("Couldn\u2019t add the popup \u2014 please retry."))}finally{w(!1)}}},ye=Zj(null),[Ye,qe]=yr(null),se=()=>{if(!ue)return Ke();if(Ye)return qe(null);let M=ye.current?.getBoundingClientRect();M&&qe({top:M.bottom+6,right:Math.max(8,window.innerWidth-M.right)})},Oe=M=>{let te=m??[],xe=s.deletePage;if(!c||C||!xe||te.length<=1)return;let Re=te.findIndex(oo=>oo.id===M.id),Ae=te.filter(oo=>oo.id!==M.id),er=M.slug===d;zd(M.id,!0),x(Ae),k(null),er&&Ae[0]&&e(Ae[0].slug);let Wa=()=>{zd(M.id,!1);let oo=I()??[];if(oo.some(ts=>ts.id===M.id))return;let Rr=[...oo];Rr.splice(Math.max(0,Math.min(Re,Rr.length)),0,M),x(Rr)};f0.undoable(i("Deleted \u201C{name}\u201D",{name:M.label}),{actionLabel:i("Undo"),commit:async oo=>{await xe(M.id,oo),zd(M.id,!1)},undo:()=>{Wa(),er&&e(M.slug)},onFail:()=>{Wa(),f0.error(i("Couldn\u2019t delete the page \u2014 please retry."))}})},eo=M=>n.send("storefront-editor:open-page",{slug:M}),_e=M=>{if(!$(M.label))return null;let te=!t&&M.slug===d,xe=l.canDeletePagesInline&&(m??[]).length>1,Re=Yr(M),Ae=ow(M),er=[...Re?[{label:i("Dynamic"),tone:"info"}]:[],...Ae?[{label:i("Lightbox"),tone:"success"}]:[],...M.draft?[{label:i("draft"),tone:"draft"}]:[]],Wa=er.length>0?er:void 0,oo=!!R&&fK(M),Rr=oo||l.pageCreationInAdminForm||xe?sl(s0,{children:[oo&&Se(Gd,{kind:"plain",label:i("Duplicate \u201C{name}\u201D",{name:M.label}),disabled:C,onClick:()=>y(M),children:Se(sK,{size:13})}),l.pageCreationInAdminForm&&Se(Gd,{kind:"plain",label:i("Page settings for \u201C{name}\u201D",{name:M.label}),onClick:()=>eo(M.slug),children:Se(iK,{size:13})}),xe&&Se(Gd,{kind:"delete",label:i("Delete \u201C{name}\u201D",{name:M.label}),disabled:C,onClick:()=>Oe(M),children:Se(Hx,{name:"trash",size:13,strokeWidth:1.7,rounded:!0})})]}):void 0;return Se(u0,{icon:Se(lK,{size:14}),name:M.label,selected:te,onSelect:()=>e(M.slug),badge:Wa,actions:Rr,rowProps:{"data-page-slug":M.slug}},M.id)},We=(M,te,xe)=>{let Re=xe.filter(Boolean);if(Re.length===0)return null;let Ae=ke(M);return sl(Vj,{children:[Se(aK,{count:Re.length,countLabel:xo("{n} page","{n} pages",Re.length),expanded:Ae,onToggle:()=>H(M),children:te}),Ae&&Re]},M)},_o=(a?.rows??[]).filter(M=>$(M.label)).map(M=>{let te=t===M.key;return Se(u0,{icon:M.icon,name:M.label,selected:te,onSelect:()=>r(M.key),badge:{label:i("Preview"),tone:"warning"},actions:Se(Gd,{kind:"plain",label:i("Open the {name} in a new tab",{name:M.label}),onClick:()=>window.open(M.href,"_blank","noopener,noreferrer"),children:Se(Hx,{name:"external-link",size:13,strokeWidth:1.7,rounded:!0})}),rowProps:{"data-shop-surface":M.key}},M.key)}),No=l.hasSiteSettings&&!!a,Ro=(()=>{if(m===null)return null;let M=[],te=!1;for(let xe of Z){No&&!te&&xe.key.startsWith("system:")&&(M.push(We("shop",a.title,_o)),te=!0);let Re=xe.key===Wp||xe.label===Hp?i(xe.label):xe.label;M.push(We(xe.key,Re,xe.rows.map(_e)))}return No&&!te&&M.push(We("shop",a.title,_o)),M})();return sl("div",{className:"sf-pages",children:[Se(Jj,{icon:Se(cK,{}),title:i("Pages"),context:f,actions:Se(Qj,{buttonRef:ye,label:ue?i("Add"):i("New page"),hasPopup:ue?"menu":void 0,expanded:ue?Ye!==null:void 0,onClick:se,children:Se(nK,{size:15})})}),Ye&&Se(tK,{portal:!0,style:{top:Ye.top,right:Ye.right},onClose:()=>qe(null),children:sl("div",{role:"menu","aria-label":i("Add"),children:[Se(d0,{role:"menuitem",onClick:()=>{qe(null),Ke()},children:i("Page")}),Se(d0,{role:"menuitem",disabled:C,onClick:()=>{qe(null),pe()},children:i("Popup")})]})}),Se("div",{className:"sf-pages-find",children:Se(c0,{type:"search",leftIcon:Se(Hx,{name:"search",size:14,rounded:!0}),placeholder:i("Search all pages\u2026"),value:b,onChange:M=>v(M.target.value),"aria-label":i("Search all pages")})}),g&&!T&&Se("div",{className:"sf-note sf-note--error",role:"alert",children:g}),Ro===null?Se("div",{className:"sf-note",children:i("Loading\u2026")}):Ro.some(Boolean)?Se(rK,{ariaLabel:i("Pages"),className:"sf-scroll",children:Ro}):Se("div",{className:"sf-note",children:b.trim()?i("No pages match your search"):i("No pages yet. Add one with + above.")}),R&&N&&Se(uK,{source:{title:N.label,slug:N.slug},taken:be,host:mK(),duplicate:M=>R(N,M),onClose:()=>y(null),onDuplicated:M=>{y(null),u(),e(M.slug)}},N.id),Se(eK,{open:T,onClose:()=>F(!1),size:"sm",title:i("Add a page"),description:i("Give the new template page a name. It starts blank \u2014 add sections once it opens."),footer:sl(s0,{children:[Se(i0,{variant:"secondary",onClick:()=>F(!1),children:i("Cancel")}),Se(i0,{onClick:()=>{Me()},disabled:C||!P.trim(),loading:C,children:i("Add page")})]}),children:Se(oK,{label:i("Page name"),htmlFor:E,hint:P.trim()?i("URL: /{slug}",{slug:p0(P,be)}):void 0,error:g??void 0,children:Se(c0,{id:E,value:P,invalid:!!g,onChange:M=>L(M.target.value),onKeyDown:M=>{M.key==="Enter"&&Me()},placeholder:i("e.g. About")})})})]})}import{jsx as y0}from"react/jsx-runtime";import{createContext as xK,useCallback as IK,useContext as gK,useMemo as bK,useState as yK}from"react";import{CanvasChromeContext as SK}from"efficient-easel/easel";import{useSelectHandler as wK}from"efficient-easel/draw/client";import{parseHexColor as hK}from"efficient-shell/format";var $d=["chat-bubble-left-right","chat-bubble-oval-left-ellipsis","chat","megaphone","phone","sparkles"],_n=$d[0];var ma="right";function Ud(e){return $d.includes(e??"")?e:_n}function g0(e){return e==="left"?"left":ma}function b0(e){return e&&hK(e)===e.toLowerCase()?e.toLowerCase():""}var S0="chat",jd={enabled:!0,title:"",subtitle:"",greeting:"",launcherColor:"",launcherIcon:"",launcherPosition:ma,launcherLabel:"",showOnPhones:!0};function hSe(e){return{enabled:e.enabled,title:e.title,subtitle:e.subtitle,greeting:e.greeting,launcherColor:b0(e.launcherColor),launcherIcon:e.launcherIcon?Ud(e.launcherIcon):"",launcherPosition:g0(e.launcherPosition),launcherLabel:e.launcherLabel??"",showOnPhones:e.showOnPhones!==!1}}var w0=xK({chat:jd,setChat:()=>{},setSelected:()=>{},setSelectHandler:()=>{}});function xSe({children:e,chat:o=jd,onChatChange:t}){let[r,a]=yK(!1),n=IK(d=>t?.(d),[t]),{select:s,setSelectHandler:l}=wK(),c=bK(()=>({selected:()=>r?S0:null,select:d=>d===S0&&s()}),[r,s]);return y0(w0.Provider,{value:{chat:o,setChat:n,setSelected:a,setSelectHandler:l},children:y0(SK.Provider,{value:c,children:e})})}var Kd=()=>gK(w0);import{jsx as Wx}from"react/jsx-runtime";import{DesktopIcon as CK,PhoneIcon as vK,TabletIcon as kK}from"efficient-easel/icons";import{VIEW_TIERS as TK,VIEW_TIER_LABEL as PK}from"efficient-easel/draw";var EK={desktop:Wx(CK,{}),tablet:Wx(kK,{}),mobile:Wx(vK,{})},C0=TK.map(e=>({id:e,get label(){return i(PK[e])},icon:EK[e]}));import{PreviewDeviceContext as Bte}from"efficient-easel/draw/client";import{jsx as OK}from"react/jsx-runtime";import{createContext as _K,useCallback as v0,useContext as RK,useMemo as AK,useRef as FK}from"react";var LK=Object.fromEntries(ki.map(e=>[e,{value:"",error:null}])),k0=_K({links:ky,rows:LK,canSave:!1,saveLink:async()=>({ok:!1,error:"There is no website to save to."}),openPanel:()=>{},setOpenHandler:()=>{}});function TSe({children:e,value:o}){let t=FK(()=>{}),r=v0(()=>t.current(),[]),a=v0(s=>{t.current=s},[]),n=AK(()=>({...o,openPanel:r,setOpenHandler:a}),[o,r,a]);return OK(k0.Provider,{value:n,children:e})}var ll=()=>RK(k0);import{jsx as BK}from"react/jsx-runtime";import{createContext as DK,useContext as NK,useMemo as MK,useState as HK}from"react";var T0=DK(null);function _Se({children:e}){let[o,t]=HK(null),r=MK(()=>({surface:o,setSurface:t}),[o]);return BK(T0.Provider,{value:r,children:e})}function P0(){return NK(T0)??{surface:null,setSurface:()=>{}}}import{createPreviewSelectionContext as WK}from"efficient-easel/draw/client";var il="Scrolling Bar",{Provider:FSe,useSelection:E0}=WK("selectedHeroId"),LSe="data-sf-hero-ticker";function BSe(e){return`${e}::ticker`}function DSe(e){return!e||!e.endsWith("::ticker")?null:e.slice(0,-8)||null}var O0=["","","","","",""],_0="#ticker",cl="strip",zx={sectionAccent:ur,line:!1};function zK(e){return(Array.isArray(e.tickerItems)?e.tickerItems:[]).map(o=>typeof o?.text=="string"?o.text:"").filter(o=>o.trim()!=="")}function Gx(e){return zK(e).length>0}function HSe(e){return e.showTicker!==!1&&Gx(e)}import{createPreviewSelectionContext as GK}from"efficient-easel/draw/client";var{Provider:GSe,useSelection:qd}=GK("selectedHeroPart");var A0=["one","side","stacked"];var USe={one:"One",side:"Side by side",stacked:"Stacked"};function Vd(e){return A0.includes(e)?e:"one"}function R0(e){return e==="one"?1:2}function $x(e,o){if(A0.includes(e))return e;let t=Vd(o);return t==="side"?"stacked":t}function dl(e){let o=Vd(e.mediaLayout);return Math.max(R0(o),R0($x(e.mediaLayoutPhone,o)))}var ha=["media","image","image2"],Rn={media:"Media",image:"Image",image2:"Image 2"},fl={media:"heroMedia",image:"heroImage",image2:"heroImage2"};function Yd(e,o){return e==="image"&&dl(o)>1?"Image 1":Rn[e]}var VSe="Video file",YSe="Upload a video file";function $K(e,o){return{field:"mediaType",is:e,default:o}}var UK=new Set(["HeroSingle"]),F0="heroPart";function jK(e,o){return{...o,[F0]:e}}function XSe(e,{parts:o={},onlyFor:t,fallback:r,rules:a}){let n={...e};for(let s of["image","video"])for(let l of t[s])n[l]=Xe(n[l],$K(s,r));for(let[s,l]of Object.entries(a??{}))l&&(n[s]=Xe(n[s],l));for(let s of ha)for(let l of o[s]??[])n[l]=jK(s,n[l]);return n}function KK(e){let o=e?.[F0];return ha.includes(o)?o:null}function L0(e,o){let t={};for(let[r,a]of Object.entries(e))KK(a)===o&&(t[r]=a);return t}function B0(e){if(!UK.has(e.type))return[];let o=[{part:"media",label:Rn.media,depth:0}];return(e.props.mediaType??"image")!=="video"&&(o.push({part:"image",label:Yd("image",e.props),depth:1}),dl(e.props)>1&&o.push({part:"image2",label:Yd("image2",e.props),depth:1})),o}function ul(e,o){return`${e}::${o}`}function D0(e){if(!e)return null;let o=e.lastIndexOf("::");if(o<=0)return null;let t=e.slice(o+2);return ha.includes(t)?{nodeId:e.slice(0,o),part:t}:null}var N0="data-sf-hero-part";import{jsx as Ie,jsxs as Ca,Fragment as x1}from"react/jsx-runtime";import{useState as cY}from"react";import{useEasel as dY,useRootFields as fY}from"efficient-easel/easel";import{Button as uY,EmptyState as pY}from"efficient-shell/ui";function M0({kind:e,pageName:o}){return{name:o?.trim()||i("This page"),kindLabel:Yr({kind:e})?i("Template"):i("Page")}}import{headWords as y1,InspectorHead as mY,InspectorIconButton as I1}from"efficient-easel/chrome";import{DuplicateIcon as hY,TrashIcon as xY}from"efficient-easel/icons";import{panelFieldsOf as IY}from"efficient-easel/screen/lib/document/panel-fields";import{jsx as B,Fragment as le,jsxs as fe}from"react/jsx-runtime";import{BlockBannerIcon as YK,BlockBoxIcon as XK,BlockButtonIcon as ZK,BlockDividerIcon as W0,BlockFooterIcon as z0,BlockHeadingIcon as JK,BlockProductIcon as QK,BlockSocialIcon as e8,BlockTextIcon as o8,CardPaymentIcon as t8,ChatIcon as r8,AccountIcon as a8,GlobeIcon as n8,GridIcon as s8,ImageIcon as jx,MapIcon as l8,MediaIcon as i8,PageIcon as c8}from"efficient-easel/icons";import{jsx as Ux,Fragment as qK,jsxs as VK}from"react/jsx-runtime";var H0=VK(qK,{children:[Ux("circle",{cx:"9",cy:"20",r:"1.3"}),Ux("circle",{cx:"18",cy:"20",r:"1.3"}),Ux("path",{d:"M2.5 3.5h3l2.3 11.3a1.6 1.6 0 0 0 1.6 1.3h8.1a1.6 1.6 0 0 0 1.6-1.2L21 7H6"})]});var d8={header:fe(le,{children:[B("rect",{x:"3",y:"5",width:"18",height:"14",rx:"2"}),B("path",{d:"M3 9.5h18"})]}),social:fe(le,{children:[B("circle",{cx:"6",cy:"12",r:"2.5"}),B("circle",{cx:"18",cy:"6",r:"2.5"}),B("circle",{cx:"18",cy:"18",r:"2.5"}),B("path",{d:"M8.2 10.8l7.6-3.6M8.2 13.2l7.6 3.6"})]}),ticker:fe(le,{children:[B("rect",{x:"3",y:"8.5",width:"18",height:"7",rx:"2"}),B("path",{d:"M6 12h3.5M11.5 12h2M15.5 12h2.5"})]}),FooterLogo:fe(le,{children:[B("path",{d:"M4 15.5h6M4 18h4"}),B("path",{d:"M14 8.5l3 7 3-7"})]}),FooterMenu:B("path",{d:"M6 7h12M6 11h12M6 15h8M6 19h8"}),FooterGroup:fe(le,{children:[B("rect",{x:"4",y:"4",width:"16",height:"16",rx:"2",strokeDasharray:"3 2.5"}),B("path",{d:"M8 9h8M8 13h8M8 16h5"})]}),FooterText:B("path",{d:"M5 7h14M5 12h14M5 17h9"}),FooterEmailSignup:fe(le,{children:[B("rect",{x:"3",y:"6",width:"18",height:"12",rx:"2"}),B("path",{d:"M3.5 7l8.5 6 8.5-6"})]}),SearchBlock:fe(le,{children:[B("circle",{cx:"11",cy:"11",r:"6"}),B("path",{d:"M20 20l-4.2-4.2"})]}),CartBlock:H0,CountrySwitchBlock:fe(le,{children:[B("circle",{cx:"12",cy:"12",r:"8.5"}),B("path",{d:"M3.5 12h17M12 3.5c2.6 2.4 3.6 5.2 3.6 8.5s-1 6.1-3.6 8.5M12 3.5c-2.6 2.4-3.6 5.2-3.6 8.5s1 6.1 3.6 8.5"})]}),ThemeSwitchBlock:fe(le,{children:[B("circle",{cx:"12",cy:"12",r:"8.5"}),B("path",{d:"M12 3.5v17M12 5.5l6 6M12 10.5l5.2 5.2M12 15.5l2.8 2.8"})]}),LegalLineBlock:fe(le,{children:[B("path",{d:"M3 9h18"}),B("path",{d:"M3 14h8M14 14h2M18 14h3"})]}),Hero:fe(le,{children:[B("rect",{x:"3",y:"4",width:"18",height:"16",rx:"2"}),B("path",{d:"M7 13.5h7M7 16.5h10"})]}),HeroSlide:fe(le,{children:[B("rect",{x:"3",y:"5",width:"18",height:"14",rx:"2"}),B("path",{d:"M7 15h6M16 9.5h.01M9.5 12l-2.5 3"})]}),HeroSingle:fe(le,{children:[B("rect",{x:"3",y:"4",width:"18",height:"16",rx:"2"}),B("path",{d:"M10.5 8.5l4 2.5-4 2.5z"}),B("path",{d:"M7 17h7"})]}),Collections:fe(le,{children:[B("rect",{x:"3",y:"5",width:"4.6",height:"14",rx:"1.3"}),B("rect",{x:"9.7",y:"5",width:"4.6",height:"14",rx:"1.3"}),B("rect",{x:"16.4",y:"5",width:"4.6",height:"14",rx:"1.3"})]}),CollectionCard:fe(le,{children:[B("rect",{x:"6",y:"4",width:"12",height:"16",rx:"2"}),B("path",{d:"M9 15h6M9 17.5h4"})]}),AlloyWheelsListing:fe(le,{children:[B("path",{d:"M3 5h5M3 9h5M3 13h5M3 17h5"}),B("rect",{x:"11.5",y:"5",width:"4.2",height:"5",rx:"1"}),B("rect",{x:"17.3",y:"5",width:"4.2",height:"5",rx:"1"}),B("rect",{x:"11.5",y:"12",width:"4.2",height:"5",rx:"1"}),B("rect",{x:"17.3",y:"12",width:"4.2",height:"5",rx:"1"})]}),CatalogFilterBar:fe(le,{children:[B("path",{d:"M3 7h9M15.5 7H21"}),B("circle",{cx:"13.5",cy:"7",r:"1.7"}),B("path",{d:"M3 12h4M10.5 12H21"}),B("circle",{cx:"8.5",cy:"12",r:"1.7"}),B("path",{d:"M3 17h9M15.5 17H21"}),B("circle",{cx:"13.5",cy:"17",r:"1.7"})]}),ProductGrid:fe(le,{children:[B("rect",{x:"3",y:"5",width:"4.8",height:"6",rx:"1"}),B("rect",{x:"9.6",y:"5",width:"4.8",height:"6",rx:"1"}),B("rect",{x:"16.2",y:"5",width:"4.8",height:"6",rx:"1"}),B("rect",{x:"3",y:"13",width:"4.8",height:"6",rx:"1"}),B("rect",{x:"9.6",y:"13",width:"4.8",height:"6",rx:"1"}),B("rect",{x:"16.2",y:"13",width:"4.8",height:"6",rx:"1"})]}),RelatedProducts:fe(le,{children:[B("path",{d:"M3 5h10"}),B("rect",{x:"3",y:"9.5",width:"5",height:"9",rx:"1"}),B("rect",{x:"9.5",y:"9.5",width:"5",height:"9",rx:"1"}),B("rect",{x:"16",y:"9.5",width:"5",height:"9",rx:"1"})]}),Gallery:fe(le,{children:[B("rect",{x:"3",y:"4",width:"11",height:"16",rx:"2"}),B("rect",{x:"15.5",y:"4",width:"5.5",height:"7.5",rx:"1.5"}),B("rect",{x:"15.5",y:"12.5",width:"5.5",height:"7.5",rx:"1.5"})]}),GalleryB:fe(le,{children:[B("rect",{x:"3.5",y:"4",width:"7.5",height:"7.5",rx:"1.5"}),B("rect",{x:"13",y:"4",width:"7.5",height:"7.5",rx:"1.5"}),B("rect",{x:"3.5",y:"12.5",width:"7.5",height:"7.5",rx:"1.5"}),B("rect",{x:"13",y:"12.5",width:"7.5",height:"7.5",rx:"1.5"})]}),GalleryItem:fe(le,{children:[B("rect",{x:"4",y:"5",width:"16",height:"14",rx:"2"}),B("circle",{cx:"9",cy:"10",r:"1.6"}),B("path",{d:"M20 15.5l-4.5-4L7 19"})]}),Events:fe(le,{children:[B("rect",{x:"4",y:"5",width:"16",height:"15",rx:"2"}),B("path",{d:"M4 9.5h16M8.5 3v4M15.5 3v4M8 14h2M14 14h2"})]}),PostCard:fe(le,{children:[B("rect",{x:"4",y:"3.5",width:"16",height:"17",rx:"2"}),B("rect",{x:"6.5",y:"6",width:"11",height:"6",rx:"1"}),B("path",{d:"M6.5 14.5h11M6.5 17.5h7"})]}),Manifesto:fe(le,{children:[B("path",{d:"M7 8h3.2v4c0 1.6-1 2.6-3 3.2"}),B("path",{d:"M14 8h3.2v4c0 1.6-1 2.6-3 3.2"})]}),Stats:fe(le,{children:[B("path",{d:"M3.5 20h17"}),B("path",{d:"M6 20v-7M11 20V7M16 20v-5M20.5 20v-9"})]}),Logos:fe(le,{children:[B("circle",{cx:"6",cy:"12",r:"2.6"}),B("rect",{x:"10",y:"9.4",width:"5.2",height:"5.2",rx:"1.2"}),B("path",{d:"M19 9.2l2.4 5h-4.8z"})]}),Ticker:fe(le,{children:[B("rect",{x:"3",y:"8.5",width:"18",height:"7",rx:"2"}),B("path",{d:"M6 12h3.5M11.5 12h2M15.5 12h2.5"})]}),SectionHeader:fe(le,{children:[B("rect",{x:"3.5",y:"6",width:"5",height:"5",rx:"1.2"}),B("path",{d:"M11 8.5h9M3.5 15.5h17"})]}),IntroBleed:fe(le,{children:[B("rect",{x:"3",y:"4",width:"18",height:"16",rx:"2"}),B("path",{d:"M3 13.5h18M7 16.8h6"})]}),Split:fe(le,{children:[B("rect",{x:"3",y:"5",width:"8",height:"14",rx:"1.5"}),B("path",{d:"M14 8.5h6M14 12h6M14 15.5h4"})]}),Eyebrow:fe(le,{children:[B("path",{d:"M4 8.5h4.5M11 8.5h9"}),B("path",{d:"M4 14.5h16"})]}),HeroGroup:fe(le,{children:[B("rect",{x:"3.5",y:"4.5",width:"17",height:"15",rx:"2"}),B("path",{d:"M7 9h8M7 12.5h10M7 16h6"})]}),Form:fe(le,{children:[B("rect",{x:"3",y:"4",width:"18",height:"16",rx:"2"}),B("path",{d:"M6.5 9h11M6.5 12.5h11"}),B("rect",{x:"6.5",y:"15",width:"6.5",height:"2.6",rx:"1.3"})]}),LogoBlock:B(le,{children:B("path",{d:"M12 3.5l7.5 3.2v5.1c0 4.2-3.2 7.1-7.5 8.7-4.3-1.6-7.5-4.5-7.5-8.7V6.7z"})}),Spacer:fe(le,{children:[B("path",{d:"M12 4v6M9.5 6.5L12 4l2.5 2.5M12 20v-6M9.5 17.5L12 20l2.5-2.5"}),B("path",{d:"M5 13h14",strokeDasharray:"2 2.5"})]}),ContactRouting:fe(le,{children:[B("rect",{x:"3",y:"4",width:"5",height:"5",rx:"1"}),B("rect",{x:"9.5",y:"4",width:"5",height:"5",rx:"1"}),B("rect",{x:"16",y:"4",width:"5",height:"5",rx:"1"}),B("path",{d:"M4 13.5h11M4 17.5h7"}),B("path",{d:"M17 15l3 2-3 2"})]}),Contents:fe(le,{children:[B("path",{d:"M4 7h2M4 12h2M4 17h2"}),B("path",{d:"M9 7h11M9 12h9M9 17h10"})]}),CustomHTML:B("path",{d:"M9 8l-4 4 4 4M15 8l4 4-4 4"})},f8=B("rect",{x:"4",y:"4",width:"16",height:"16",rx:"2.5"}),u8={footer:z0,Footer:z0,Divider:W0,FooterDivider:W0,Banner:YK,Flex:XK,FooterSocial:e8,FooterPayment:t8,page:c8,website:n8,AccountBlock:a8,chat:r8,Heading:JK,Text:o8,ImageBlock:jx,ButtonBlock:ZK,LocationMap:l8,Grid:s8,ProductRef:QK,heroMedia:i8,heroImage:jx,heroImage2:jx},p8={MenuBlock:"FooterMenu",EmailFormBlock:"FooterEmailSignup",SocialLogosBlock:"FooterSocial",PaymentLogosBlock:"FooterPayment",SiteHeader:"header",SiteFooter:"footer"};function xa({type:e,size:o=16,className:t}){let r=p8[e]??e,a=u8[r];return a?B(a,{size:o,className:t}):B("svg",{width:o,height:o,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:1.7,strokeLinecap:"round",strokeLinejoin:"round",className:t,"aria-hidden":"true",children:d8[r]??f8})}import{PanelHideButton as g1}from"efficient-easel/screen/components/SidePanelHead";import{useEaselSession as gY}from"efficient-easel/screen/lib/session-context";import{jsx as Ce,jsxs as pl,Fragment as m8}from"react/jsx-runtime";import{useEffect as h8,useId as G0,useState as x8}from"react";import{IconPicker as I8}from"efficient-shell/ui";import{SettingsDefaultReset as g8,SettingsField as ml,SettingsSegmented as b8,SettingsSwitch as $0}from"efficient-easel/panel";import{ButtonIcon as y8,ButtonIconIcon as S8,EyeIcon as w8,PhoneIcon as C8,PlacementIcon as v8,TypeIcon as k8}from"efficient-easel/icons";var T8="Chat with us",P8="We usually reply within a few minutes",E8="Hi! Ask us anything \u2014 about a wheel, an order, or fitment. Leave your details and we\u2019ll reply.";function Xd({label:e,value:o,placeholder:t,onCommit:r,multiline:a=!1,hint:n}){let[s,l]=x8(o);h8(()=>l(o),[o]);let c=()=>{s!==o&&r(s)};return Ce(ml,{label:e,icon:Ce(k8,{}),changed:o!=="",action:Ce(hl,{label:e,changed:o!=="",onReset:()=>r("")}),hint:n,children:a?Ce("textarea",{value:s,placeholder:t,rows:3,onChange:d=>l(d.target.value),onBlur:c,"aria-label":e}):Ce("input",{type:"text",value:s,placeholder:t,onChange:d=>l(d.target.value),onBlur:c,onKeyDown:d=>{d.key==="Enter"&&d.currentTarget.blur()},"aria-label":e,autoComplete:"off"})})}function hl({label:e,changed:o,onReset:t}){return Ce(g8,{words:Q()?.panel,label:e,changed:o,onReset:t})}function O8({label:e,icon:o,checked:t,fallback:r,onChange:a,hint:n}){let s=G0();return Ce(ml,{label:e,labelId:s,icon:o,changed:t!==r,action:pl("span",{className:"inline-flex items-center gap-2",children:[Ce($0,{checked:t,onChange:a,ariaLabelledBy:s}),Ce(hl,{label:e,changed:t!==r,onReset:()=>a(r)})]}),hint:n})}var _8=$d.map(e=>({value:e,icon:Yi(e)}));function R8(){let{theme:e}=ce(),o=lo(e).themes[0];return as(o)??o?.accent??""}function U0(){let{chat:e,setChat:o}=Kd(),t=G0(),r=R8(),a=e.launcherIcon?Ud(e.launcherIcon):_n;return pl(m8,{children:[Ce(ml,{label:i("Show the chat bubble"),labelId:t,icon:Ce(w8,{}),changed:!e.enabled,action:pl("span",{className:"inline-flex items-center gap-2",children:[Ce($0,{checked:e.enabled,onChange:n=>o({enabled:n}),ariaLabelledBy:t}),Ce(hl,{label:i("Show the chat bubble"),changed:!e.enabled,onReset:()=>o({enabled:!0})})]}),hint:e.enabled?i("The floating chat bubble shows in the corner of every page."):i("The chat bubble is hidden across the whole site.")}),pl(xh,{title:i("Look"),children:[Ce(zo,{label:i("Button color"),icon:Ce(y8,{}),changed:e.launcherColor!=="",value:e.launcherColor,inherited:r,caption:e.launcherColor?void 0:i("Site button color"),onChange:n=>o({launcherColor:n}),onReset:()=>o({launcherColor:""})}),Ce(ml,{label:i("Icon"),icon:Ce(S8,{}),value:Ce(ih,{value:a}),changed:a!==_n,action:Ce(hl,{label:i("Icon"),changed:a!==_n,onReset:()=>o({launcherIcon:""})}),children:Ce(I8,{label:i("Icon"),value:a,options:_8,onChange:n=>o({launcherIcon:n===_n?"":n})})}),Ce(ml,{label:i("Position"),icon:Ce(v8,{}),changed:e.launcherPosition!==ma,action:Ce(hl,{label:i("Position"),changed:e.launcherPosition!==ma,onReset:()=>o({launcherPosition:ma})}),children:Ce(b8,{options:[{label:i("Right"),id:"right"},{label:i("Left"),id:"left"}],value:e.launcherPosition,ariaLabel:i("Position"),onChange:n=>o({launcherPosition:n})})}),Ce(Xd,{label:i("Label"),value:e.launcherLabel,placeholder:i("Icon only"),onCommit:n=>o({launcherLabel:n}),hint:i("Shows when a visitor points at the button")}),Ce(O8,{label:i("Show on phones"),icon:Ce(C8,{}),checked:e.showOnPhones,fallback:jd.showOnPhones,onChange:n=>o({showOnPhones:n})})]}),pl(xh,{title:i("Wording"),children:[Ce(Xd,{label:i("Title"),value:e.title,placeholder:T8,onCommit:n=>o({title:n})}),Ce(Xd,{label:i("Subtitle"),value:e.subtitle,placeholder:P8,onCommit:n=>o({subtitle:n})}),Ce(Xd,{label:i("Greeting message"),value:e.greeting,placeholder:E8,onCommit:n=>o({greeting:n}),multiline:!0}),Ce("p",{className:"es-field-hint sf-hint-keep",children:i("Leave a field blank to use the built-in wording.")})]})]})}import{jsx as Ia,Fragment as pI,jsxs as Y0}from"react/jsx-runtime";import{useEffect as l7,useId as q0,useState as V0}from"react";import{SettingsField as i7}from"efficient-easel/panel";import{jsx as J8}from"react/jsx-runtime";import{forwardRef as A8,createElement as Kx}from"react";var j0={outline:{xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},filled:{xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"currentColor",stroke:"none"}};var ee=(e,o,t,r)=>{let a=A8(({color:n="currentColor",size:s=24,stroke:l=2,title:c,className:d,children:f,...m},u)=>Kx("svg",{ref:u,...j0[e],width:s,height:s,className:["tabler-icon",`tabler-icon-${o}`,d].filter(Boolean).join(" "),...e==="filled"?{fill:n}:{strokeWidth:l,stroke:n},...m},[c&&Kx("title",{key:"svg-title"},c),...r.map(([x,I])=>Kx(x,I)),...Array.isArray(f)?f:[f]]));return a.displayName=`${t}`,a};var F8=[["path",{d:"M7 10v4h3v7h4v-7h3l1 -4h-4v-2a1 1 0 0 1 1 -1h3v-4h-3a5 5 0 0 0 -5 5v2h-3",key:"svg-0"}]],qx=ee("outline","brand-facebook","BrandFacebook",F8);var L8=[["path",{d:"M3 7a4 4 0 0 1 4 -4h10a4 4 0 0 1 4 4v10a4 4 0 0 1 -4 4h-10a4 4 0 0 1 -4 -4l0 -10",key:"svg-0"}],["path",{d:"M8.5 12a3.5 3.5 0 1 0 7 0a3.5 3.5 0 0 0 -7 0",key:"svg-1"}],["path",{d:"M17 7v.01",key:"svg-2"}]],Vx=ee("outline","brand-instagram","BrandInstagram",L8);var B8=[["path",{d:"M21 10.663c0 -4.224 -4.041 -7.663 -9 -7.663s-9 3.439 -9 7.663c0 3.783 3.201 6.958 7.527 7.56c1.053 .239 .932 .644 .696 2.133c-.039 .238 -.184 .932 .777 .512c.96 -.42 5.18 -3.201 7.073 -5.48c1.304 -1.504 1.927 -3.029 1.927 -4.715v-.01",key:"svg-0"}]],Yx=ee("outline","brand-line","BrandLine",B8);var D8=[["path",{d:"M8 11v5",key:"svg-0"}],["path",{d:"M8 8v.01",key:"svg-1"}],["path",{d:"M12 16v-5",key:"svg-2"}],["path",{d:"M16 16v-3a2 2 0 1 0 -4 0",key:"svg-3"}],["path",{d:"M3 7a4 4 0 0 1 4 -4h10a4 4 0 0 1 4 4v10a4 4 0 0 1 -4 4h-10a4 4 0 0 1 -4 -4l0 -10",key:"svg-4"}]],Xx=ee("outline","brand-linkedin","BrandLinkedin",D8);var N8=[["path",{d:"M8 20l4 -9",key:"svg-0"}],["path",{d:"M10.7 14c.437 1.263 1.43 2 2.55 2c2.071 0 3.75 -1.554 3.75 -4a5 5 0 1 0 -9.7 1.7",key:"svg-1"}],["path",{d:"M3 12a9 9 0 1 0 18 0a9 9 0 1 0 -18 0",key:"svg-2"}]],Zx=ee("outline","brand-pinterest","BrandPinterest",N8);var M8=[["path",{d:"M15 10l-4 4l6 6l4 -16l-18 7l4 2l2 6l3 -4",key:"svg-0"}]],Jx=ee("outline","brand-telegram","BrandTelegram",M8);var H8=[["path",{d:"M21 7.917v4.034a9.948 9.948 0 0 1 -5 -1.951v4.5a6.5 6.5 0 1 1 -8 -6.326v4.326a2.5 2.5 0 1 0 4 2v-11.5h4.083a6.005 6.005 0 0 0 4.917 4.917",key:"svg-0"}]],Qx=ee("outline","brand-tiktok","BrandTiktok",H8);var W8=[["path",{d:"M16.5 10c3.038 0 5.5 2.015 5.5 4.5c0 1.397 -.778 2.645 -2 3.47l0 2.03l-1.964 -1.178a6.649 6.649 0 0 1 -1.536 .178c-3.038 0 -5.5 -2.015 -5.5 -4.5s2.462 -4.5 5.5 -4.5",key:"svg-0"}],["path",{d:"M11.197 15.698c-.69 .196 -1.43 .302 -2.197 .302a8.008 8.008 0 0 1 -2.612 -.432l-2.388 1.432v-2.801c-1.237 -1.082 -2 -2.564 -2 -4.199c0 -3.314 3.134 -6 7 -6c3.782 0 6.863 2.57 7 5.785l0 .233",key:"svg-1"}],["path",{d:"M10 8h.01",key:"svg-2"}],["path",{d:"M7 8h.01",key:"svg-3"}],["path",{d:"M15 14h.01",key:"svg-4"}],["path",{d:"M18 14h.01",key:"svg-5"}]],eI=ee("outline","brand-wechat","BrandWechat",W8);var z8=[["path",{d:"M3 21l1.65 -3.8a9 9 0 1 1 3.4 2.9l-5.05 .9",key:"svg-0"}],["path",{d:"M9 10a.5 .5 0 0 0 1 0v-1a.5 .5 0 0 0 -1 0v1a5 5 0 0 0 5 5h1a.5 .5 0 0 0 0 -1h-1a.5 .5 0 0 0 0 1",key:"svg-1"}]],oI=ee("outline","brand-whatsapp","BrandWhatsapp",z8);var G8=[["path",{d:"M4 4l11.733 16h4.267l-11.733 -16l-4.267 0",key:"svg-0"}],["path",{d:"M4 20l6.768 -6.768m2.46 -2.46l6.772 -6.772",key:"svg-1"}]],tI=ee("outline","brand-x","BrandX",G8);var $8=[["path",{d:"M2 8a4 4 0 0 1 4 -4h12a4 4 0 0 1 4 4v8a4 4 0 0 1 -4 4h-12a4 4 0 0 1 -4 -4v-8",key:"svg-0"}],["path",{d:"M10 9l5 3l-5 3l0 -6",key:"svg-1"}]],rI=ee("outline","brand-youtube","BrandYoutube",$8);var U8=[["path",{d:"M18 2a1 1 0 0 1 .993 .883l.007 .117v4a1 1 0 0 1 -.883 .993l-.117 .007h-3v1h3a1 1 0 0 1 .991 1.131l-.02 .112l-1 4a1 1 0 0 1 -.858 .75l-.113 .007h-2v6a1 1 0 0 1 -.883 .993l-.117 .007h-4a1 1 0 0 1 -.993 -.883l-.007 -.117v-6h-2a1 1 0 0 1 -.993 -.883l-.007 -.117v-4a1 1 0 0 1 .883 -.993l.117 -.007h2v-1a6 6 0 0 1 5.775 -5.996l.225 -.004h3z",key:"svg-0"}]],aI=ee("filled","brand-facebook-filled","BrandFacebookFilled",U8);var j8=[["path",{d:"M16 3a5 5 0 0 1 5 5v8a5 5 0 0 1 -5 5h-8a5 5 0 0 1 -5 -5v-8a5 5 0 0 1 5 -5zm-4 5a4 4 0 0 0 -3.995 3.8l-.005 .2a4 4 0 1 0 4 -4m4.5 -1.5a1 1 0 0 0 -.993 .883l-.007 .127a1 1 0 0 0 1.993 .117l.007 -.127a1 1 0 0 0 -1 -1",key:"svg-0"}]],nI=ee("filled","brand-instagram-filled","BrandInstagramFilled",j8);var K8=[["path",{d:"M17 2a5 5 0 0 1 5 5v10a5 5 0 0 1 -5 5h-10a5 5 0 0 1 -5 -5v-10a5 5 0 0 1 5 -5zm-9 8a1 1 0 0 0 -1 1v5a1 1 0 0 0 2 0v-5a1 1 0 0 0 -1 -1m6 0a3 3 0 0 0 -1.168 .236l-.125 .057a1 1 0 0 0 -1.707 .707v5a1 1 0 0 0 2 0v-3a1 1 0 0 1 2 0v3a1 1 0 0 0 2 0v-3a3 3 0 0 0 -3 -3m-6 -3a1 1 0 0 0 -.993 .883l-.007 .127a1 1 0 0 0 1.993 .117l.007 -.127a1 1 0 0 0 -1 -1",key:"svg-0"}]],sI=ee("filled","brand-linkedin-filled","BrandLinkedinFilled",K8);var q8=[["path",{d:"M17 3.34a10 10 0 0 1 -8.512 18.023l2.364 -5.315a3.5 3.5 0 0 0 2.398 .952c2.708 0 4.75 -2.089 4.75 -5a6 6 0 1 0 -11.64 2.041a1 1 0 1 0 1.88 -.682a4 4 0 1 1 7.76 -1.36c0 1.818 -1.156 3.001 -2.75 3.001c-.609 0 -1.153 -.361 -1.478 -1.022l1.142 -2.572a1 1 0 0 0 -1.828 -.812l-4.392 9.882a10 10 0 0 1 -4.694 -8.476l.005 -.324a10 10 0 0 1 14.995 -8.336",key:"svg-0"}]],lI=ee("filled","brand-pinterest-filled","BrandPinterestFilled",q8);var V8=[["path",{d:"M16.083 2h-4.083a1 1 0 0 0 -1 1v11.5a1.5 1.5 0 1 1 -2.519 -1.1l.12 -.1a1 1 0 0 0 .399 -.8v-4.326a1 1 0 0 0 -1.23 -.974a7.5 7.5 0 0 0 1.73 14.8l.243 -.005a7.5 7.5 0 0 0 7.257 -7.495v-2.7l.311 .153c1.122 .53 2.333 .868 3.59 .993a1 1 0 0 0 1.099 -.996v-4.033a1 1 0 0 0 -.834 -.986a5.005 5.005 0 0 1 -4.097 -4.096a1 1 0 0 0 -.986 -.835z",key:"svg-0"}]],iI=ee("filled","brand-tiktok-filled","BrandTiktokFilled",V8);var Y8=[["path",{d:"M18.497 4.409a10 10 0 0 1 -10.36 16.828l-.223 -.098l-4.759 .849l-.11 .011a1 1 0 0 1 -.11 0l-.102 -.013l-.108 -.024l-.105 -.037l-.099 -.047l-.093 -.058l-.014 -.011l-.012 -.007l-.086 -.073l-.077 -.08l-.067 -.088l-.056 -.094l-.034 -.07l-.04 -.108l-.028 -.128l-.012 -.102a1 1 0 0 1 0 -.125l.012 -.1l.024 -.11l.045 -.122l1.433 -3.304l-.009 -.014a10 10 0 0 1 1.549 -12.454l.215 -.203a10 10 0 0 1 13.226 -.217m-8.997 3.09a1.5 1.5 0 0 0 -1.5 1.5v1a6 6 0 0 0 6 6h1a1.5 1.5 0 0 0 0 -3h-1l-.144 .007a1.5 1.5 0 0 0 -1.128 .697l-.042 .074l-.022 -.007a4.01 4.01 0 0 1 -2.435 -2.435l-.008 -.023l.075 -.041a1.5 1.5 0 0 0 .704 -1.272v-1a1.5 1.5 0 0 0 -1.5 -1.5",key:"svg-0"}]],cI=ee("filled","brand-whatsapp-filled","BrandWhatsappFilled",Y8);var X8=[["path",{d:"M8.267 3a1 1 0 0 1 .73 .317l.076 .092l4.274 5.828l5.946 -5.944a1 1 0 0 1 1.497 1.32l-.083 .094l-6.163 6.162l6.262 8.54a1 1 0 0 1 -.697 1.585l-.109 .006h-4.267a1 1 0 0 1 -.73 -.317l-.076 -.092l-4.276 -5.829l-5.944 5.945a1 1 0 0 1 -1.497 -1.32l.083 -.094l6.161 -6.163l-6.26 -8.539a1 1 0 0 1 .697 -1.585l.109 -.006h4.267z",key:"svg-0"}]],dI=ee("filled","brand-x-filled","BrandXFilled",X8);var Z8=[["path",{d:"M18 3a5 5 0 0 1 5 5v8a5 5 0 0 1 -5 5h-12a5 5 0 0 1 -5 -5v-8a5 5 0 0 1 5 -5zm-9 6v6a1 1 0 0 0 1.514 .857l5 -3a1 1 0 0 0 0 -1.714l-5 -3a1 1 0 0 0 -1.514 .857z",key:"svg-0"}]],fI=ee("filled","brand-youtube-filled","BrandYoutubeFilled",Z8);var FCe="outline",Zd={fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},Q8={},uI={fillRule:"evenodd"},e7=[["path",{...Zd,d:"M21 4L3 11L7 13L9 19L12 15L17 20z"}],["path",{...uI,d:"M21 4L3 11L7 13L9 19L12 15L17 20zM15.212 8.939 10.576 13.576 11.424 14.424 16.061 9.788z"}]],o7=[["path",{...Zd,d:["M21 10.663c0 -4.224 -4.041 -7.663 -9 -7.663s-9 3.439 -9 7.663","c0 3.783 3.201 6.958 7.527 7.56c1.053 .239 .932 .644 .696 2.133","c-.039 .238 -.184 .932 .777 .512c.96 -.42 5.18 -3.201 7.073 -5.48","c1.304 -1.504 1.927 -3.029 1.927 -4.715v-.01z"].join("")}],["path",{...Q8,d:["M21 10.663c0 -4.224 -4.041 -7.663 -9 -7.663s-9 3.439 -9 7.663","c0 3.783 3.201 6.958 7.527 7.56c1.053 .239 .932 .644 .696 2.133","c-.039 .238 -.184 .932 .777 .512c.96 -.42 5.18 -3.201 7.073 -5.48","c1.304 -1.504 1.927 -3.029 1.927 -4.715v-.01z"].join("")}]],t7=[["path",{...Zd,d:["M16.5 10c3.038 0 5.5 2.015 5.5 4.5c0 1.397 -.778 2.645 -2 3.47l0 2.03l-1.964 -1.178","a6.649 6.649 0 0 1 -1.536 .178c-3.038 0 -5.5 -2.015 -5.5 -4.5s2.462 -4.5 5.5 -4.5z"].join("")}],["path",{...Zd,d:["M8.319 15.972L7.84 15.918L7.349 15.832L6.865 15.715L6.388 15.568L4 17L4 14.199","L3.559 13.775L3.197 13.356L2.877 12.91L2.603 12.439L2.376 11.946L2.201 11.433","L2.079 10.902L2.016 10.405L2.001 9.897L2.036 9.386L2.12 8.889L2.25 8.405L2.425 7.937","L2.642 7.486L2.9 7.055L3.195 6.645L3.459 6.333L3.744 6.037L4.05 5.757L4.377 5.495","L4.723 5.25L5.086 5.025L5.467 4.819L5.864 4.634L6.275 4.471L6.701 4.331L7.139 4.214","L7.589 4.122L8.05 4.055L8.521 4.014L9.352 4.007L9.815 4.04L10.269 4.098L10.713 4.181","L11.146 4.287L11.567 4.416L11.975 4.567L12.369 4.739L12.748 4.932L13.112 5.143","L13.459 5.374L13.788 5.622L14.172 5.956L14.458 6.241L14.722 6.542L14.965 6.856","L15.217 7.237A8.35 7.35 0 0 0 8.319 15.972z"].join("")}],["path",{...uI,d:["M8.319 15.972L7.84 15.918L7.349 15.832L6.865 15.715L6.388 15.568L4 17L4 14.199","L3.559 13.775L3.197 13.356L2.877 12.91L2.603 12.439L2.376 11.946L2.201 11.433","L2.079 10.902L2.016 10.405L2.001 9.897L2.036 9.386L2.12 8.889L2.25 8.405L2.425 7.937","L2.642 7.486L2.9 7.055L3.195 6.645L3.459 6.333L3.744 6.037L4.05 5.757L4.377 5.495","L4.723 5.25L5.086 5.025L5.467 4.819L5.864 4.634L6.275 4.471L6.701 4.331L7.139 4.214","L7.589 4.122L8.05 4.055L8.521 4.014L9.352 4.007L9.815 4.04L10.269 4.098L10.713 4.181","L11.146 4.287L11.567 4.416L11.975 4.567L12.369 4.739L12.748 4.932L13.112 5.143","L13.459 5.374L13.788 5.622L14.172 5.956L14.458 6.241L14.722 6.542L14.965 6.856","L15.217 7.237A8.35 7.35 0 0 0 8.319 15.972zM5.25 7.9a0.85 0.85 0 1 0 1.7 0","a0.85 0.85 0 1 0 -1.7 0zM8.25 7.9a0.85 0.85 0 1 0 1.7 0a0.85 0.85 0 1 0 -1.7 0z"].join("")}],["path",{...uI,d:["M16.5 10c3.038 0 5.5 2.015 5.5 4.5c0 1.397 -.778 2.645 -2 3.47l0 2.03l-1.964 -1.178","a6.649 6.649 0 0 1 -1.536 .178c-3.038 0 -5.5 -2.015 -5.5 -4.5s2.462 -4.5 5.5 -4.5z","M14.15 14a0.85 0.85 0 1 0 1.7 0a0.85 0.85 0 1 0 -1.7 0zM17.15 14","a0.85 0.85 0 1 0 1.7 0a0.85 0.85 0 1 0 -1.7 0z"].join("")}]],r7=ee("filled","brand-telegram-filled","BrandTelegramFilled",e7),a7=ee("filled","brand-line-filled","BrandLineFilled",o7),n7=ee("filled","brand-wechat-filled","BrandWechatFilled",t7),s7={instagram:{outline:Vx,solid:nI},facebook:{outline:qx,solid:aI},tiktok:{outline:Qx,solid:iI},youtube:{outline:rI,solid:fI},x:{outline:tI,solid:dI},linkedin:{outline:Xx,solid:sI},pinterest:{outline:Zx,solid:lI},whatsapp:{outline:oI,solid:cI},telegram:{outline:Jx,solid:r7},line:{outline:Yx,solid:a7},wechat:{outline:eI,solid:n7}};function K0({platform:e,iconStyle:o,size:t}){let r=s7[e][o];return J8(r,{size:t,stroke:1.75,"aria-hidden":"true",focusable:"false"})}var c7={instagram:"instagram.com/yourshop",facebook:"facebook.com/yourshop",tiktok:"tiktok.com/@yourshop",youtube:"youtube.com/@yourshop",x:"x.com/yourshop",linkedin:"linkedin.com/company/yourshop",pinterest:"pinterest.com/yourshop",whatsapp:"wa.me/61400000000",telegram:"t.me/yourshop",line:"line.me/ti/p/~yourshop",wechat:"u.wechat.com/your-qr-code-link"};function d7({platform:e}){let{rows:o,saveLink:t}=ll(),{value:r,error:a}=o[e],[n,s]=V0(r),[l,c]=V0(!1),d=q0(),f=q0();l7(()=>s(r),[r]);let m=async()=>{if(n.trim()===r){n!==r&&s(r);return}c(!0),await t(e,n),c(!1)},u=vy[e];return Y0(pI,{children:[Ia(i7,{label:i(u),htmlFor:d,icon:Ia(K0,{platform:e,iconStyle:"outline",size:18}),children:Ia("input",{id:d,type:"text",inputMode:"url",value:n,placeholder:c7[e],onChange:x=>s(x.target.value),onBlur:()=>{m()},onKeyDown:x=>{x.key==="Enter"&&x.currentTarget.blur(),x.key==="Escape"&&(s(r),x.currentTarget.blur())},"aria-invalid":a?!0:void 0,"aria-describedby":a?f:void 0,"aria-busy":l||void 0,autoComplete:"off",spellCheck:!1})}),a&&Ia("p",{id:f,className:"sf-note sf-note--error",role:"alert",children:a})]})}function X0({unavailable:e}){let{canSave:o}=ll();return!o&&e?Ia(pI,{children:e}):Y0(pI,{children:[Ia("p",{className:"es-field-hint sf-hint-keep",children:i("Paste a link to each profile. A platform left empty shows nothing on the site.")}),ki.map(t=>Ia(d7,{platform:t},t))]})}import{jsx as ya,Fragment as s9,jsxs as l9}from"react/jsx-runtime";import{useId as i9,useMemo as c9}from"react";import{useEasel as d9}from"efficient-easel/easel";import{SettingsField as f9,SettingsSwitch as u9}from"efficient-easel/panel";import{EyeIcon as p9}from"efficient-easel/icons";import{fieldShownInView as m9}from"efficient-easel/fields";import{usePreviewDevice as h9}from"efficient-easel/draw/client";import{jsx as ba,Fragment as pq,jsxs as mq}from"react/jsx-runtime";import{createContext as hq,useContext as xq,useLayoutEffect as _E,useMemo as df,useRef as RE,useState as vI}from"react";import{useEasel as AE,useSelectedFields as Iq}from"efficient-easel/easel";import{fieldShownInView as gq,Inspector as bq,planFields as kI}from"efficient-easel/fields";function Z0({allTabs:e,remembered:o,inherited:t,buckets:r,hasText:a}){return o&&(e||r.includes(o))?o:t&&r.includes(t)?t:a?"Design":r[0]??"Design"}import{group as Q7}from"efficient-easel/screen/lib/document/box-fields";import{deviceField as eq,deviceMetaOf as IE}from"efficient-easel/screen/lib/document/device-fields";import{jsx as J,jsxs as Sr}from"react/jsx-runtime";import{phoneKey as Cr}from"efficient-easel/draw";import{SettingsDefaultReset as S7,SettingsField as dE}from"efficient-easel/panel";import{AnimationIcon as fE,ClockIcon as w7,DirectionDownIcon as C7,DirectionIcon as v7,DirectionLeftIcon as k7,DirectionRightIcon as T7,DirectionUpIcon as P7,DurationIcon as E7,NoSymbolIcon as O7}from"efficient-easel/icons";import{deviceField as Bn}from"efficient-easel/screen/lib/document/device-fields";import{NoControlMark as _7,noControlField as R7}from"efficient-easel/screen/lib/document/panel-no-control-mark";import{describedAs as uE,group as A7,onDesktopWords as F7,phoneTwinFields as L7}from"efficient-easel/screen/lib/document/box-fields";import{ENTRANCE_FROM as B7,ENTRANCE_FROM_DEFAULT as pE,ENTRANCE_KINDS as nf,ENTRANCE_KINDS_WITH_FROM as lE,MOTION_TIMING as D7,entranceAttrs as N7,playEntrance as M7,readEntrance as H7}from"efficient-shell/format";import{IconPicker as W7}from"efficient-shell/ui";import{jsx as II}from"react/jsx-runtime";import{ClockIcon as m7,DurationIcon as h7}from"efficient-easel/icons";import{MOTION_TIMING as aE}from"efficient-shell/format";import{useSelectedHost as x7}from"efficient-easel/easel";import{MOTION_EASING as f7,MOTION_TIMING as J0,motionSeconds as Q0}from"efficient-shell/format";var mI="none",hI=[{label:"None",value:"none"},{label:"Scroll",value:"scroll"}];function KCe(e){return to(hI,mI,e)}var Jd={field:"loop",is:"scroll"},xl="left",xI=[{label:"Left",value:"left",cell:"left"},{label:"Right",value:"right",cell:"right"},{label:"Up",value:"up",cell:"top"},{label:"Down",value:"down",cell:"bottom"}],u7={left:"storefront-ticker",right:"storefront-ticker-right",up:"storefront-ticker-up",down:"storefront-ticker-down"};function eE(e){return to(xI,xl,e)}function oE(e){return e==="up"||e==="down"}function tE(e){return Q0("loop","duration",e.loopDuration!=null?e.loopDuration:e.speed)}var qCe=J0.loop.duration.default,p7=J0.loop.delay.default;function rE(e){return Q0("loop","delay",e.loopDelay)}function VCe(e,o,t=p7){return`${u7[e]} ${o}s ${f7.loop}${t?` ${t}s`:""} infinite`}function An(e){let{min:o,max:t,step:r,default:a}=aE[e].duration;return vo("Duration",II(h7,{}),o,t,r,a,"s")}function Fn(e){let{min:o,max:t,step:r,default:a}=aE[e].delay;return vo("Delay",II(m7,{}),o,t,r,a,"s")}function Ln(e,o){let t=e.render,r=a=>{let n=x7();return t({...a,value:o(a.value,n?.values)})};return{...e,render:a=>II(r,{...a})}}function Qd({readsSpeed:e}){return Ln(An("loop"),(o,t)=>tE({loopDuration:o,speed:e?t?.speed:void 0}))}function ef(){return Ln(Fn("loop"),e=>rE({loopDelay:e}))}import{phoneKey as I7}from"efficient-easel/draw";import{readEntrance as g7}from"efficient-shell/format";var tf="sf-entrance",Pe={kind:"entrance",from:"entranceFrom",duration:"entranceDuration",delay:"entranceDelay"},rf="sectionAnimation",nE=e=>e!=null&&e!=="";function b7(e,o){let t=e[Pe[o]];return o==="kind"&&!nE(t)?e[rf]:t}function of(e,o,t){if(t==="phone"){let r=e[I7(Pe[o])];if(nE(r))return r}return b7(e,o)}function Il(e,o){return g7(of(e,"kind",o),of(e,"from",o),of(e,"duration",o),of(e,"delay",o))}function af(e){let o=Il(e,"desktop"),t=Il(e,"phone");return o.kind==="none"&&t.kind==="none"?null:{desktop:o,phone:t}}var y7={...Object.fromEntries([...gC].map(e=>[e,"a root position: sticky bar; an outer box becomes its sticky containing block and the pin collapses (the same fact every wrapper pass excludes it for, lib/content/section-surface)"])),HeroSlide:"a slide is a direct child of the Hero's transform track ([&>*]:basis-full); a wrapper would take its width, and the Hero already moves one slide in at a time",HeroGroup:"a slide box is placed by grid-item properties on its own root (--sf-hg-row, justify-self); a wrapper becomes the grid item and the box loses its anchor (lib/document/blocks/general/HeroGroup/meta)"},sve=new Set(Object.keys(y7));var sE="_gEntrance";var sf={none:"None",fade:"Fade",rise:"Rise",scale:"Scale",glide:"Glide",bounce:"Bounce",flip:"Flip",reveal:"Reveal",spin:"Spin"},z7={top:"Top",bottom:"Bottom",left:"Left",right:"Right"},G7={top:()=>J(C7,{}),bottom:()=>J(P7,{}),left:()=>J(T7,{}),right:()=>J(k7,{})},yI="Entrance",iE=nf.filter(e=>e!=="none"),gI=e=>({any:[{field:Pe.kind,in:e},{all:[{field:Pe.kind,set:!1},{field:rf,in:e}]}]}),cE=e=>({any:[{field:Cr(Pe.kind),in:e},{all:[{field:Cr(Pe.kind),set:!1},gI(e)]}]}),$7=[[[Pe.from],gI(lE)],[[Cr(Pe.from)],cE(lE)],[[Pe.duration,Pe.delay],gI(iE)],[[Cr(Pe.duration),Cr(Pe.delay)],cE(iE)]],wr=({children:e})=>J("svg",{viewBox:"0 0 40 40",width:"40",height:"40",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":!0,children:e}),Pt=({x:e=12,y:o=12,o:t=1})=>J("rect",{x:e,y:o,width:"16",height:"16",rx:"2",opacity:t}),U7={none:J(O7,{size:20}),fade:Sr(wr,{children:[J(Pt,{x:6,o:.3}),J(Pt,{x:18})]}),rise:Sr(wr,{children:[J(Pt,{y:20,o:.3}),J(Pt,{y:8}),J("path",{d:"M20 36v-5m-2 2 2-2 2 2"})]}),scale:Sr(wr,{children:[J("rect",{x:"16",y:"16",width:"8",height:"8",rx:"1",opacity:".35"}),J(Pt,{}),J("path",{d:"M6 6l4 4M34 34l-4-4"})]}),glide:Sr(wr,{children:[J(Pt,{x:2,o:.3}),J(Pt,{x:20}),J("path",{d:"M4 33h12m-2-2 2 2-2 2"})]}),bounce:Sr(wr,{children:[J(Pt,{y:6}),J("path",{d:"M8 34c3-6 5-6 8 0s5 6 8 0 5-6 8 0"})]}),flip:Sr(wr,{children:[J("path",{d:"M12 12l16 4v8l-16 4z",opacity:".35"}),J(Pt,{}),J("path",{d:"M20 4v32",strokeDasharray:"2 2"})]}),reveal:Sr(wr,{children:[J("rect",{x:"12",y:"12",width:"16",height:"16",rx:"2",strokeDasharray:"2 2",opacity:".5"}),J("path",{d:"M12 22h16v4a2 2 0 0 1-2 2H14a2 2 0 0 1-2-2z",fill:"currentColor",opacity:".35"}),J("path",{d:"M20 36v-5m-2 2 2-2 2 2"})]}),spin:Sr(wr,{children:[J(Pt,{}),J("path",{d:"M33 14a14 14 0 0 1 0 12m0 0-3-1m3 1 1-3"})]})};function j7({kind:e}){let{attrs:o}=N7(H7(e,pE)),t=i(sf[e]);return Hs(J("span",{className:"sf-entrance-stage",children:J("i",{...o,children:U7[e]})}),t,t)}var K7=(e,o)=>{let t=o.querySelector(".sf-entrance-stage > i");t&&M7(t)},q7={width:"3.5rem",height:"4.25rem"};function mE({value:e,onChange:o}){return J(W7,{label:i(yI),value:e,columns:3,cell:q7,onChange:o,onPreview:K7,tooltips:!1,options:nf.map(t=>({value:t,label:i(sf[t]),icon:J(j7,{kind:t})}))})}var bI="Effect";function V7({value:e,onChange:o}){let t=$o(),r=Il({...t,[Pe.kind]:e},"desktop").kind;return J(dE,{label:i(bI),icon:J(fE,{}),children:J(mE,{value:r,onChange:o})})}function Y7({value:e,onChange:o}){let t=$o(),r=typeof e=="string"&&nf.includes(e),a=Il(t,"desktop").kind;return J(dE,{label:i(bI),icon:J(fE,{}),changed:r,action:J(S7,{words:Q()?.panel,label:i(bI),changed:r,detail:F7(n=>i(n),i(sf[a])),onReset:()=>o(void 0)}),children:J(mE,{value:r?e:a,onChange:o})})}var hE={type:"select",label:yI,options:nf.map(e=>({value:e,label:sf[e]}))},X7=()=>uE({type:"custom",render:({value:e,onChange:o})=>J(V7,{value:e,onChange:o})},hE),Z7=()=>uE({type:"custom",render:({value:e,onChange:o})=>J(Y7,{value:e,onChange:o})},hE),J7=B7.map(e=>({label:z7[e],value:e,picture:G7[e]()}));function dt(){let{duration:e,delay:o}=D7.entrance,t={[sE]:A7(yI),[Pe.kind]:Bn("desktop",X7()),[rf]:R7({type:"custom",render:()=>J(_7,{})},"always"),[Cr(Pe.kind)]:Bn("mobile",Z7()),...L7(Pe.from,sn("From",J(v7,{}),J7,pE)),[Pe.duration]:Bn("desktop",An("entrance")),[Cr(Pe.duration)]:Bn("mobile",Vc({label:"Duration",desktopKey:Pe.duration,icon:J(E7,{}),min:e.min,max:e.max,step:e.step,fallback:e.default,unit:"s"})),[Pe.delay]:Bn("desktop",Fn("entrance")),[Cr(Pe.delay)]:Bn("mobile",Vc({label:"Delay",desktopKey:Pe.delay,icon:J(w7,{}),min:o.min,max:o.max,step:o.step,fallback:o.default,unit:"s"}))};return Up(t,$7)}import{DESIGN_GROUPS as wI,SETTINGS_BUCKETS as oq}from"efficient-easel/panel";import{BUCKET_KEY as Bo,DESIGN_GROUP_KEY as gl}from"efficient-easel/screen/lib/document/field-buckets";var bl=oq;var tq="Editor only \u2014 not shown live",CI={"Archive link":"Content",Article:"Content",Blocks:"Content","Blog posts":"Content","Browser mock":"Content",Button:"Content","Call to action":"Content","Car prompt":"Content","Card link":"Content",Cards:"Content","Claims bars":"Content","Contact info":"Content",Content:"Content",Display:"Content","Content source":"Content",Contents:"Content",Filters:"Content","Show on a card":"Content",Footnote:"Content",Form:"Content",Founders:"Content","Gallery A":"Content","Gallery B":"Content","Gallery link":"Content",Header:"Content","Header link":"Content","Image caption":"Content","In this issue":"Content",Items:"Content","Kanban columns":"Content",Lead:"Content","Left panel":"Content",Link:"Content",Links:"Content",List:"Content","Message form":"Content",Metadata:"Content",Milestones:"Content","Mockup card":"Content","Newsletter panel":"Content",Offices:"Content",Options:"Content","Others gallery":"Content","Overlay button":"Content",Product:"Content","Product page":"Content",Products:"Content","Pull quote":"Content",Questions:"Content","Recent issues":"Content","Recent posts":"Content",Reviews:"Content","Right panel \xB7 actions":"Content","Right panel \xB7 choices":"Content","Right panel \xB7 form":"Content","Routing groups":"Content",Rows:"Content",Search:"Content",Section:"Content","Section header":"Content",Sections:"Content","Signup form":"Content",Source:"Content","Source product":"Content","Stat & note":"Content",Stats:"Content","Submit button":"Content","Success state":"Content",Wheel:"Content",Terminal:"Content",Text:"Content","Text column":"Content","Timeline entries":"Content","Top row":"Content",Total:"Content","Trailing note":"Content","\u201COther\u201D reason":"Content","Background images":"Design",Gallery:"Content",Image:"Content","Image column":"Content",Images:"Content",Logo:"Content",Map:"Content",Media:"Content","Background image":"Design",Color:"Design","Image tint":"Design",Style:"Design",Shape:"Design",Shadow:"Design",Texture:"Design",Overlay:"Design","Text style":"Design",Entrance:"Animation",Hover:"Animation",Anchor:"Anchor",Arrangement:"Layout","Auto-slide":"Layout",Bar:"Layout","Cell width":"Size",Behavior:"Layout",Schedule:"Layout",Controls:"Layout",Diagram:"Layout",[tq]:"Layout","Filters shown":"Layout","Slide picker":"Layout",Arrows:"Layout","On a phone":"Layout",Placement:"Position",Nudge:"Position","Stick to top":"Position","Image gallery":"Layout",Grid:"Layout",Layout:"Layout",Padding:"Layout",Price:"Layout",Preview:"Layout",Setup:"Layout","Show / hide elements":"Layout","Show in the buy box":"Layout",Visibility:"Layout",Width:"Size",Size:"Size",Height:"Size"},gE={"AlloyWheelsListing._gCards":"Design","ProductGrid._gCards":"Design"},bE={"Text._gSpacing":"Size","Heading._gSpacing":"Size"};function SI(e,o,t){let r=`${e}.${o}`;return bE[r]??gE[r]??CI[t]}function yE(e){return e==="Animation"?[Bo.Animation]:[Bo.Design,gl[e]]}function lf(...e){let o=[];for(let t of e)for(let r of Object.values(t)){let a=IE(r),n=jt(a?a.inner:r),s=n?CI[n.label]:void 0;if(s)for(let l of yE(s))o.includes(l)||o.push(l)}return o}var Bve=[...lf(Nc({tablet:!0}),Yc("full"),Xc(),Jc(),bh()),...Object.keys(Nc({tablet:!0})),...Object.keys(Yc("full")),...Object.keys(Xc()),...Object.keys(Jc()),...Object.keys(bh())],Dve=[...lf(jc()),...Object.keys(jc())],Nve=[...lf(qc()),...Object.keys(qc())],Mve=[...lf(dt()),...Object.keys(dt())],rq=Object.keys(Wk()),aq=new Set(["cardImage","imageBackground"]),Hve=[...yE(SI("ProductGrid","_gCards","Cards")??"Design"),...rq.filter(e=>e.startsWith("_g")||aq.has(e))],Wve=Object.keys(zk()),zve=Object.keys(Gk()),nq={"ImageBlock._gStyle":"duplicated the Style bucket header above it (2026-09-04)","ButtonBlock._gStyle":"duplicated the Style bucket header above it (2026-09-04)","HeroGroup._gContent":"duplicated the Content bucket header above it (2026-09-04)","HeroGroup._gLayout":"duplicated the Layout bucket header above it (2026-09-04)","Footer._gLayout":"duplicated the Layout bucket header above it (2026-09-04)","FooterLogo._gContent":"duplicated the Content bucket header above it (2026-09-04)","FooterLogo._gStyle":"duplicated the Style bucket header above it (2026-09-04)","FooterMenu._gContent":"duplicated the Content bucket header above it (2026-09-04)","FooterMenu._gStyle":"duplicated the Style bucket header above it (2026-09-04)","FooterGroup._gLayout":"duplicated the Layout bucket header above it (2026-09-04)","FooterText._gContent":"duplicated the Content bucket header above it (2026-09-04)","FooterText._gStyle":"duplicated the Style bucket header above it (2026-09-04)","FooterSocial._gStyle":"duplicated the Style bucket header above it (born tabbed, 2026-09-17)","FooterSocial._gLayout":"duplicated the Layout bucket header above it (born tabbed, 2026-09-17)","MenuBlock._gContent":"duplicated the Content bucket header above it (born tabbed, H.1)","MenuBlock._gStyle":"duplicated the Style bucket header above it (born tabbed, H.1)","SocialLogosBlock._gStyle":"duplicated the Style bucket header above it (born tabbed, H.1)","SocialLogosBlock._gLayout":"duplicated the Layout bucket header above it (born tabbed, H.1)","SearchBlock._gStyle":"duplicated the Style bucket header above it (born tabbed, H.2)","CartBlock._gStyle":"duplicated the Style bucket header above it (born tabbed, H.2)","CountrySwitchBlock._gStyle":"duplicated the Style bucket header above it (born tabbed with its Show as, 2026-10-17)","Split._gContent":"duplicated the Content bucket header above it (2026-09-04)","Gallery._gVehicleContent":"duplicated the Content bucket header above it (2026-09-04)","Gallery._gWheelContent":"duplicated the Content bucket header above it (2026-09-04)","Gallery._gOthersContent":"duplicated the Content bucket header above it (2026-09-04)","Subscribe._gHeadCopy":"duplicated the Content bucket header above it (2026-09-04)","Subscribe._gLeftCopy":"duplicated the Content bucket header above it (2026-09-04)","Subscribe._gRightCopy":"duplicated the Content bucket header above it (2026-09-04)","CollectionCard._gContent":"duplicated the Content bucket header above it (A Card Sets Its Own Corners)","HeroSlide._gContent":"duplicated the Content bucket header above it (Hero Slide Tabs And Theme)","KeyFeatures._gContent":"duplicated the Content bucket header above it (66049)","KeyFeatures._gStyle":"duplicated the Style bucket header above it (66049)","ParagraphsA._gContent":"duplicated the Content bucket header above it (66049)","ParagraphsA._gStyle":"duplicated the Style bucket header above it (66049)","Chart._gContent":"duplicated the Content bucket header above it (66049)","Chart._gStyle":"duplicated the Style bucket header above it (66049)","Logos._gContent":"duplicated the Content bucket header above it (66049)","Logos._gStyle":"duplicated the Style bucket header above it (66049)","Mockup._gContent":"duplicated the Content bucket header above it (66049)","Mockup._gStyle":"duplicated the Style bucket header above it (66049)","Stats._gContent":"duplicated the Content bucket header above it (66049)","Stats._gStyle":"duplicated the Style bucket header above it (66049)","StatsParagraph._gContent":"duplicated the Content bucket header above it (66049)","StatsParagraph._gStyle":"duplicated the Style bucket header above it (66049)","Testimonials._gContent":"duplicated the Content bucket header above it (66049)","Testimonials._gStyle":"duplicated the Style bucket header above it (66049)","AppointmentBooking._gContent":"duplicated the Content bucket header above it (66050)","BookingBox._gContent":"duplicated the Content bucket header above it ([SPLIT] Booking Form Into Three Boxes) \u2014 the same fault its own section retired in 66050, one level down","FAQ._gContent":"duplicated the Content bucket header above it (66050, family sweep)","FAQ._gLayout":"duplicated the Layout bucket header above it (66050, family sweep)","Form._gContent":"duplicated the Content bucket header above it (66050)","ReviewForm._gContent":"duplicated the Content bucket header above it (66050)","SubmitBuild._gContent":"duplicated the Content bucket header above it (66050)","SubmitBox._gContent":"duplicated the Content bucket header above it ([SPLIT] SubmitBuild Keeps Its Two Columns) \u2014 the same fault its own section retired in 66050, one level down","CheckoutCTA._gContent":"duplicated the Content bucket header above it (66051)","CheckoutCTA._gLayout":"duplicated the Layout bucket header above it (66051)","DeliveryOptions._gContent":"duplicated the Content bucket header above it (66051)","DeliveryOptions._gLayout":"duplicated the Layout bucket header above it (66051)","OrderSummary._gContent":"duplicated the Content bucket header above it (66051)","OrderSummary._gLayout":"duplicated the Layout bucket header above it (66051)","PaymentBadges._gContent":"duplicated the Content bucket header above it (66051)","PaymentBadges._gLayout":"duplicated the Layout bucket header above it (66051)","Collections._gContent":"duplicated the Content bucket header above it (66052)","Collections._gLayout":"duplicated the Layout bucket header above it (66052)","DocMasthead._gContent":"duplicated the Content bucket header above it (66053)","Events._gContent":"duplicated the Content bucket header above it (66054)","Events._gLayout":"duplicated the Layout bucket header above it (66054)","FeaturedCover._gContent":"duplicated the Content bucket header above it (66054)","Series._gStyle":"duplicated the Style bucket header above it (66054)","Flex._gContent":"duplicated the Content bucket header above it (66055)","Flex._gLayout":"duplicated the Layout bucket header above it (66055)","SectionHeader._gContent":"duplicated the Content bucket header above it (66055)","Breadcrumb._gContent":"duplicated the Content bucket header above it (66056)","CategoryBar._gStyle":"duplicated the Style bucket header above it (66056)","Hero._gContent":"duplicated the Content bucket header above it (66056)","Hero._gStyle":"duplicated the Style bucket header above it (66056)","HeroSingle._gStyle":"duplicated the Style bucket header above it (66056)","IntroBleed._gContent":"duplicated the Content bucket header above it (66056)","IntroBleed._gLayout":"duplicated the Layout bucket header above it (66056)","BundleOffer._gLayout":"duplicated the Layout bucket header above it (66059)","ProcessSteps._gContent":"duplicated the Content bucket header above it (66059)","Banner._gContent":"duplicated the Content bucket header above it (66060.1)","Banner._gLayout":"duplicated the Layout bucket header above it, and governed no controls (66060.1)","Manifesto._gContent":"duplicated the Content bucket header above it (66060.1)","SubscribeBlogs._gHeadCopy":"duplicated the Content bucket header above it (66060.1)","SubscribeBlogs._gLeftCopy":"duplicated the Content bucket header above it (66060.1)","SubscribeBlogs._gRightCopy":"duplicated the Content bucket header above it (66060.1)","Ticker._gContent":"duplicated the Content bucket header above it (66060.1)","Ticker._gStyle":"duplicated the Style bucket header above it (66060.1)","Timeline._gContent":"duplicated the Content bucket header above it (66060.1)","TitleWithButtons._gContent":"duplicated the Content bucket header above it (66060.1)","TitleWithButtons._gStyle":"duplicated the Style bucket header above it (66060.1)","Cards._gContent":"duplicated the Content bucket header above it (66218)","Cards._gStyle":"duplicated the Style bucket header above it (66218)","Prose._gContent":"duplicated the Content bucket header above it (66218)","Reviews._gContent":"duplicated the Content bucket header above it (66218)","Reviews._gStyle":"duplicated the Style bucket header above it (66218)"},SE={Content:["Content"],Size:["Size"],Design:["Design","Style"],Layout:["Layout"],Position:["Position"],Anchor:["Anchor"],Animation:["Animation"]},wE={_gAnchor:"repeated the Anchor group heading above it (two tabs, 11.0.0)"};{let e={...Nc({tablet:!0}),...Yc("full"),...Xc(),...Jc(),...jc(),...qc(),...dt()};for(let o of Object.keys(wE)){let t=jt(e[o]),r=t?CI[t.label]:void 0;if(!t||t.level!==2||!r||!SE[r].includes(t.label))throw new Error(`INJECTED_RETIRED (lib/document/field-groups.ts) lists "${o}", but no uniform builder makes a level-2 heading by that key whose label repeats its place's word. The heading was renamed, moved or removed and the row is stale \u2014 a list that quietly matches nothing is worse than no list.`)}}var sq=new Set(["_sContent","_sStyle","_sLayout","_sMedia"]),lq=new Map([[Bo.Design,"Content"],[Bo.Animation,"Animation"],...wI.map(e=>[gl[e],e])]);function CE(e){let o=new Set([...Object.values(Bo),gl.Content]);for(let[t,r]of Object.entries(e))if(!o.has(t)&&jt(r)?.level===1)return 1;return 2}function iq(e){let o=`${e}.`;return Object.keys(nq).filter(t=>t.startsWith(o)).map(t=>t.slice(o.length))}function cq(e,o){let t=IE(e),r=Q7(o);return t?eq(t.tier,r):r}function dq(e,o){let t=jt(o);return t?e==="Content"||e==="Animation"?vk(o,t.label):kk(o):o}function xE(e){return e==="Design"?wI:["Animation"]}function vE(e,o){let t=[],r=new Set(iq(o)),a=new Set,n=!1,s=null;for(let[u,x]of Object.entries(e)){let I=jt(x);if(sq.has(u))throw new Error(`${o}.${u}: that key was a tab header until efficient-web-builder 11.0.0, when the panel moved to two tabs (Design \xB7 Animation). Its tab is gone, so the key may not come back. Give the heading a key of the section's own (\`_g\u2026\`), or open a Design group with its own key (\`_dDesign: section("Design")\`, \`_dLayout: section("Layout")\`).`);let b=lq.get(u);if(b!==void 0){if(I?.level!==1)throw new Error(`${o}.${u}: that key is reserved for the ${b} heading of the settings panel, but this field is ${I?`a level-${I.level} "${I.label}" header`:"not a header"}, so it cannot serve as one. Rename the section's own field.`);(u===Bo.Design||u===Bo.Animation)&&(n=!0),t.push(s={place:b,entries:[],adopted:!0});continue}if(!I){s||t.push(s={place:"Content",entries:[]}),s.entries.push([u,x]);continue}if(r.has(u)||u in wE){let C=SI(o,u,I.label);if(I.level!==2||!C||!SE[C].includes(I.label))throw new Error(`${o}.${u}: ${r.has(u)?"RETIRED":"INJECTED_RETIRED"} (lib/document/field-groups.ts) lists this sub-heading as one whose name repeats the place it sits in, but it is a level-${I.level} "${I.label}" header in the ${C??"(unclassified)"} place. Only a level-2 header whose label is one of its place's words (PLACE_WORDS) may be retired \u2014 anything else is a heading a merchant reads for its own sake. Fix the row or drop it.`);r.has(u)&&a.add(u),t.push(s={place:C,entries:[]});continue}let v=SI(o,u,I.label);if(!v)throw new Error(`${o}.${u}: the inspector group "${I.label}" is not classified in LABEL_GROUP (lib/document/field-groups.ts), so there is no way to say which of ${[...wI,"Animation"].join(" / ")} its controls belong under. Classify it \u2014 an unclassified group silently lands wherever it was declared, which is the whole bug.`);t.push(s={place:v,entries:[[u,I.level===2?x:cq(x,I.label)]]})}let l=new Set(Object.entries(e).filter(([,u])=>jt(u)).map(([u])=>u));for(let[u,x]of[["BLOCK_KEY_GROUP",bE],["KEY_GROUP",gE]]){let I=Object.keys(x).filter(b=>b.startsWith(`${o}.`)).filter(b=>!l.has(b.slice(o.length+1)));if(I.length)throw new Error(`${o}: ${u} (lib/document/field-groups.ts) lists ${JSON.stringify(I)}, but no fold header by that key is in this section's panel. Either the heading was renamed or removed and the row is stale, or the row names the wrong key \u2014 an override that quietly matches nothing is worse than no override.`)}let c=n?[]:[...r].filter(u=>!a.has(u));if(c.length)throw new Error(`${o}: RETIRED (lib/document/field-groups.ts) lists ${JSON.stringify(c)}, but this section has no such fold header${c.length>1?"s":""}. Either the heading was renamed or removed and the row is stale, or the row names the wrong section \u2014 a list that quietly matches nothing is worse than no list.`);let d=new Set(t.filter(u=>u.entries.length>0).map(u=>u.place)),f=bl.filter(u=>xE(u).some(x=>d.has(x))),m={};for(let u of f){m[Bo[u]]=Uc(u,u===f[0]?f:null);for(let x of xE(u)){if(!d.has(x))continue;let I=t.filter(v=>v.place===x),b=I.findIndex(v=>v.adopted);b>0&&I.unshift(...I.splice(b,1)),u==="Design"&&(m[gl[x]]=hh(x));for(let v of I)for(let[C,w]of v.entries)m[C]=dq(x,w)}}return m}function Gve(e){return Bo.Design in e?e:{[Bo.Design]:Uc("Design",null),[gl.Content]:hh("Content"),...e}}function $ve(e){return bl.some(o=>Bo[o]in e)}function Uve(e){let o=bl.filter(r=>Bo[r]in e);if(o.length===0)return e;let t={...e};for(let r of o)t[Bo[r]]=Uc(r,r===o[0]?o:null);return t}import{jsx as fq}from"react/jsx-runtime";import{EmptyState as uq}from"efficient-shell/ui";function ga(){return fq(uq,{variant:"none",icon:!1,message:i("These settings apply to every view.")})}import{usePreviewDevice as yq}from"efficient-easel/draw/client";import{deviceField as Sq}from"efficient-easel/screen/lib/document/device-fields";var cf=" text",kE="Text";function yl(e){let o=e.rows.filter(t=>t.shown);return o.length===0||o.length===1&&o[0].labelled}function TE(e){return e.filter(yl).map(o=>o.key)}function PE(e,o){let t=e.filter(a=>!yl(a));if(t.length!==1)return null;let r=e.filter(yl).flatMap(a=>a.rows);return[...o,...r].some(a=>a.shown)?null:t[0].rows.filter(a=>a.shown).length>1?t[0].key:null}function EE(e,o){let t=null;for(let r of o){let a=e[r];!a||a.marker!==!0||typeof a.fold!="string"||(t??={...e},t[r]={...a,fold:!1})}return t??e}function OE(e,o){if(e.size!==o.size)return!1;for(let t of e)if(!o.has(t))return!1;return!0}var TI=new Map,ff=new Set;function FE(e,o){let t=new Map;for(let a of e.querySelectorAll(".es-insp-row[data-field]"))t.set(a.getAttribute("data-field")??"",a);let r=[];for(let[a,n]of o)r.push({key:a,rows:n.map(s=>{let l=t.get(s),c=!!l&&[...l.children].some(f=>!f.hidden),d=l?.querySelector(".es-field-label, .es-list-label")?.textContent?.trim();return{shown:c,labelled:c&&!!d}})});return r}var wq=Object.fromEntries(bl.map(e=>{let o=Ck[e];return[e,ba(o,{},e)]})),LE=hq(null),Cq={_partBody:Sq("each",{type:"custom",render:()=>ba(vq,{})})};function vq(){return ba(pq,{children:xq(LE)})}function ft({entries:e,entryCount:o=0,part:t=null,omit:r,motion:a,body:n}){let{id:s,fields:l,values:c,readOnly:d,onChange:f}=Iq(),m=df(()=>a?{...c,...a.values}:c,[c,a?.values]),u=(se,Oe)=>a?.keys.has(se)?a.onChange(se,Oe):f(se,Oe),x=yq(),{appState:I,config:b}=AE(se=>se),v=sw(x,b,I.data.content??[],I.ui.itemSelector),C=n===void 0?L0(l,t):Cq,w=df(()=>{let se=r?.length?Object.fromEntries(Object.entries(C).filter(([Oe])=>!r.includes(Oe))):C;return a?{...se,...a.fields}:se},[C,r,a?.fields]),g=jp(w,m,v),[k,T]=vI(()=>new Set(ff)),[F,P]=vI(()=>new Set),L=RE(null),{bandRows:E,designBands:R,looseRows:N}=df(()=>{let se=new Map,Oe=new Set,eo=[];for(let _e of kI(g).rows){if(!_e.fold){_e.bucket==="Design"&&eo.push(_e.name);continue}let We=se.get(_e.fold.key)??[];We.push(_e.name),se.set(_e.fold.key,We),_e.bucket==="Design"&&Oe.add(_e.fold.key)}return{bandRows:se,designBands:Oe,looseRows:new Map([["",eo]])}},[g]),y=gq({},x),_={key:cf,rows:Array.from({length:y?o:0},()=>({shown:!0,labelled:!0}))};_E(()=>{let se=L.current?.parentElement;if(!se)return;let Oe=FE(se,E),eo=new Set(TE(Oe)),_e=PE([_,...Oe.filter(We=>R.has(We.key))],FE(se,N)[0].rows);_e&&eo.add(_e),P(We=>OE(We,eo)?We:eo)});let A=df(()=>EE(g,F),[g,F]),H=!yl(_)&&!F.has(cf)?{key:cf,title:kE}:void 0,Z=AE(se=>se.selectedItem)!==null,q=a?.part??t??"",$=`${s}:${q}:${String(x)}`,[ke,be]=vI(()=>({tab:TI.get($)})),Ke=`${s}:${q}`,Me=RE(null),ue={...v,node:m},pe=kI(g,{values:m,context:ue}).buckets,ye=Z0({allTabs:Z,remembered:TI.get($),inherited:Me.current?.panel===Ke?Me.current.tab:ke.tab,buckets:pe,hasText:y&&o>0}),Ye=!y&&!pe.includes(ye)&&(kI(jp(w,m,{...v,device:"desktop"}),{values:m,context:{...ue,device:"desktop"}}).buckets.includes(ye)||ye==="Design"&&o>0);_E(()=>{Me.current={panel:Ke,tab:ye}});let qe=ye==="Design";return ba(LE.Provider,{value:n??null,children:ba(gh.Provider,{value:a?m:null,children:mq(bq,{fields:A,values:m,onChange:u,readOnly:d,allTabs:Z,showWhenContext:ue,tab:ye,onTab:se=>{TI.set($,se),be({tab:se})},tabIcons:wq,idPrefix:s,ariaLabel:i("Section settings"),lead:qe?e:null,leadFold:H,closedFolds:k,onFold:(se,Oe)=>{Oe?ff.delete(se):ff.add(se),T(new Set(ff))},children:[ba("span",{ref:L,hidden:!0}),Ye&&ba(ga,{})]})})})}import{useMemo as Jq}from"react";import{useEasel as Qq}from"efficient-easel/easel";import{useSectionOps as e9}from"efficient-easel/screen/lib/document/use-section-ops";import{jsx as ut}from"react/jsx-runtime";import{ContrastIcon as Tq,HoverIcon as Pq,HoverLiftIcon as Eq,HoverNextImageIcon as Oq,HoverNoneIcon as _q,HoverRotateIcon as Rq,HoverZoomIcon as DE,OpacityIcon as Aq,RotateIcon as Fq}from"efficient-easel/icons";import{group as Lq}from"efficient-easel/screen/lib/document/box-fields";import{deviceField as pt}from"efficient-easel/screen/lib/document/device-fields";import{NoControlMark as Bq,noControlField as Dq}from"efficient-easel/screen/lib/document/panel-no-control-mark";function uf(e){return`color-mix(in srgb, var(--overlay-scrim) ${Math.round(Math.min(1,Math.max(0,e))*1e3)/10}%, transparent)`}var mke="sf-card",vr={min:0,max:100,step:5,fallback:0,unit:"%"},hke=[{label:"Even",value:"even"},{label:"From the bottom",value:"bottom"}],kq="68%",xke={desktop:20,phone:20,side:40,sidePhone:24},Ike="sf-box-sides";function pf(e){return typeof e=="string"&&e.trim()!==""}function gke(e,o){let t=typeof e=="number"?e:Number.parseFloat(String(e??""));if(!Number.isFinite(t)||t<=0)return null;let r=(Math.min(vr.max,Math.max(vr.min,t))/100).toFixed(2);return o!=="bottom"?{background:uf(Number(r))}:{background:`linear-gradient(0deg, ${uf(Number(r))} 0%, ${uf(0)} ${kq})`}}function bke(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"},c={start:"items-start",center:"items-center",end:"items-end"};return`${l[n]} ${c[s]}`}var PI=()=>pt("desktop",Lq("Hover")),Nq="What this does when a shopper points at it, or taps it on a phone.",Mq="What this picture does when a shopper points at it. Black and white shows it in grey until then. A phone shows its colour.",Hq="What this picture does when a shopper points at the card. Show next image fades to the card's next photo. Black and white shows it in grey until then. A phone shows the first photo in colour.",Wq="What each card does when a shopper points at it, or taps it on a phone. Rotate turns the wheel picture.",zq={none:()=>ut(_q,{}),nextImage:()=>ut(Oq,{}),rotate:()=>ut(Rq,{}),zoom:()=>ut(DE,{}),lift:()=>ut(Eq,{}),mono:()=>ut(Tq,{})};function EI(e,o){return sn("Hover effect",ut(Pq,{}),e.map(t=>({label:Ys[t],value:t,picture:zq[t]()})),o)}function NE(){return{[xd]:PI(),[Lo]:pt("desktop",{...EI(Gh,"none"),description:Nq})}}function ME(e){let o=LT(e),t=vo("Angle",ut(Fq,{}),hn.min,hn.max,hn.step,Uh,"\xB0");return{[xd]:PI(),[Be.kind]:pt("desktop",{...Ln(EI(gd,e),(r,a)=>jh(a??{},e)),description:Wq}),[Vs]:Dq({type:"custom",render:()=>ut(Bq,{})},"always"),[Be.angle]:pt("desktop",Xe(Ln(t,r=>Kh(r)),o)),[Be.duration]:pt("desktop",Xe(An("hover"),o)),[Be.delay]:pt("desktop",Xe(Fn("hover"),o))}}function OI(e,o=""){let t=MT(e);return{[xd]:PI(),[Be.kind]:HE(bd,e,Mq),...Yh.includes(o)?Gq():{},[Be.duration]:pt("desktop",Xe(An("hover"),t)),[Be.delay]:pt("desktop",Xe(Fn("hover"),t))}}function Gq(){let e=NT(),o=vo("Zoom",ut(DE,{}),Kt.min,Kt.max,Kt.step,Kt.min,Kt.unit),t=vo("Darken on hover",ut(Aq,{}),vr.min,vr.max,vr.step,vr.fallback,vr.unit);return{[Xs.zoom]:pt("desktop",Xe(o,e)),[Xs.darken]:pt("desktop",Xe(t,e))}}function HE(e,o,t){let r=pt("desktop",{...Ln(EI(e,o),a=>Xh({[Lo]:a},o,e)),description:t});return Object.assign(r,{[WE]:o})}var WE="sfPictureResting",BE=new WeakMap;function Ake(e,o,t){let r=e[Be.kind],a=r?.[WE];if(!r||!a)return e;let n=o.props?.[Lo]==="nextImage",s=n?null:zi(t.appState,o.props?.id),l=s?Cp(String(s.type),sr(o.props),s):null;if(!n&&!l?.next)return e;let c=BE.get(e);return c||(c={...e,[Be.kind]:HE(qh,a,Hq)},BE.set(e,c)),c}import{jsx as zE}from"react/jsx-runtime";import{DirectionIcon as $q,LoopIcon as Uq}from"efficient-easel/icons";function _I(){return Mk("Scroll direction",xI,xl,"A marquee cannot run diagonally, so the corners are not answers.",zE($q,{}),Nk)}function GE(){return{loop:st("Loop",zE(Uq,{}),hI,mI),scrollDirection:Xe(_I(),Jd),loopDuration:Xe(Qd({readsSpeed:!1}),Jd),loopDelay:Xe(ef(),Jd)}}function jq(){let e=OI("none");return ys(e,Object.keys(e),$p("bgImage"))}function $E(e,o=""){switch(e){case"section":case"block":return dt();case"box":return{...dt(),...GE(),...jq()};case"picture":return{...dt(),...OI(Vh(o),o)};case"textPart":return{...dt(),...NE()};case"cards":return{...dt(),...ME($h(o))};case"marquee":return{...dt(),scrollDirection:_I(),loopDuration:Qd({readsSpeed:!0}),loopDelay:ef()}}}import{phoneKey as Kq}from"efficient-easel/draw";import{ENTRANCE_STATE_ATTR as qq,entranceAttrs as Vq}from"efficient-shell/format";var jE={},RI="_partMotion",AI=[...Object.values(Pe).flatMap(e=>[e,Kq(e)]),Lo,Be.duration,Be.delay];function oTe(e){return Sn(e,RI)}function Dn(e,o){return Ed(e,RI,o)}var Yq=new Set([Pe.kind,Lo]);function KE(e,o,t,r){let{[t]:a,...n}=Dn(e,o),s=r==null||r===""||r==="none"&&Yq.has(t)?n:{...n,[t]:r};return Od(e,RI,o,Object.keys(s).length?s:null)}function FI(e){return{entrance:af(e),hover:AT(e)}}function qE(e){let o=FI(e);return o.entrance!==null||o.hover!=="none"}function VE(e,o){let{attrs:t,style:r}=Vq(o),a=Object.keys(t).filter(n=>t[n]!==void 0);for(let n of a)e.setAttribute(n,String(t[n]));for(let[n,s]of Object.entries(r))e.style.setProperty(n,String(s));return()=>{for(let n of a)e.removeAttribute(n);for(let n of Object.keys(r))e.style.removeProperty(n);e.removeAttribute(qq)}}var Xq=4;function YE(e){let o;for(let t of e)(!o||t.element.compareDocumentPosition(o.element)&Xq)&&(o=t);return o}var Zq="data-sf-part-host";function XE(e){let o=e?.ownerDocument.defaultView,t=e;for(;t&&!t.hasAttribute(Zq)&&!t.classList.contains(tf);){let r=o?.getComputedStyle(t).display??"";if(r==="contents")return null;if(r!=="inline")return t;t=t.parentElement}return null}var mf="data-sf-part-lift",UE="sf-part-lift";function ZE(e){if(e.getElementById(UE))return;let o=e.createElement("style");o.id=UE,o.textContent=fP(`[${mf}]`).join(`
|
|
40
|
+
`),e.head.appendChild(o)}var JE=new Map,o9=e=>{let o=JE.get(e);return o||JE.set(e,o=vE($E(e),`part:${e}`)),o},t9=new Set(AI);function Nn(e,o,t){let{getItemById:r,getSelectorForId:a}=Qq(f=>f),n=e9(),s=r(e)?.props??{},l=Dn(s,o),c=JSON.stringify(l),d=Jq(()=>Object.fromEntries(AI.map(f=>[f,l[f]])),[c]);return{part:o,fields:o9(t),values:d,keys:t9,onChange:(f,m)=>{let u=a(e),x=r(e);if(!u||!x)return;let I=KE(x.props??{},o,f,m);n.replaceComponent(u.zone,u.index,{...x,props:I})}}}import{Fragment as r9,createElement as a9}from"react";import{deviceField as LI}from"efficient-easel/screen/lib/document/device-fields";var uo=()=>({type:"custom",render:()=>a9(r9)});var BI={words:uo(),sourceNote:uo(),style:uo(),font:uo(),italic:uo(),fontSize:LI("each",uo()),lineHeight:uo(),letterSpacing:uo(),paragraphSpacing:uo(),padding:uo(),align:LI("each",uo()),letterCase:uo(),fixedSizeHint:LI("each",uo()),regionNote:uo(),regionStyle:uo()},n9=["fontSize"];function QE(e){return n9.includes(e)}var eO={showTicker:uo(),items:uo()};var x9="root:default-zone";function oO({heroId:e}){let{appState:o,dispatch:t}=d9(x=>x),r=o.data.content??[],a=r.findIndex(x=>x.props.id===e),n=a>=0?r[a]:null,s=n?n.props.showTicker??!0:!0,l=c9(()=>{let x=n?.props.tickerItems;return Array.isArray(x)?x:O0.map(I=>({text:I}))},[n]),c=i9(),d=h9(),f=x=>m9(eO[x],d),m=Nn(e,_0,"block");if(!n)return ya("p",{className:"sf-note",children:i("This ticker\u2019s hero is no longer on the page.")});let u=x=>t({type:"replace",destinationZone:x9,destinationIndex:a,data:{...n,props:{...n.props,...x}}});return ya(ft,{motion:m,body:l9(s9,{children:[!f("showTicker")&&!f("items")&&ya(ga,{}),f("showTicker")&&ya(f9,{label:i("Show ticker"),labelId:c,icon:ya(p9,{}),action:ya(u9,{checked:s,onChange:x=>u({showTicker:x}),ariaLabelledBy:c})}),f("items")&&ya(wh,{label:Sh.label,icon:Sh.icon,items:l,placeholder:"item",onChange:x=>u({tickerItems:x}),markup:!0})]})})}import{jsx as Y,Fragment as Tl,jsxs as Uo}from"react/jsx-runtime";import{useContext as N9,useEffect as NI,useRef as M9,useState as bO}from"react";import{FieldSelect as H9,InspectorField as W9,fieldShownInView as z9}from"efficient-easel/fields";import{SettingsField as G9}from"efficient-easel/panel";import{InspectorUpLevel as Cf}from"efficient-easel/chrome";import{StylesIcon as $9,TypeIcon as U9}from"efficient-easel/icons";import{useEasel as j9}from"efficient-easel/easel";import{TextPartPanel as yO}from"efficient-easel/copy";import{Button as K9,IconButton as q9,Tooltip as V9}from"efficient-shell/ui";import{jsx as tO,jsxs as I9}from"react/jsx-runtime";import{COPY_CELLS as hf,CopyBox as g9}from"efficient-easel/copy";import{PaddingYIcon as b9}from"efficient-easel/icons";import{onDesktopWords as y9}from"efficient-easel/screen/lib/document/box-fields";var S9=["left","center","right","justify"];function xf(e,o,t,r="desktop"){let a=ol(e),n=Ix(r),s=e[n]??e.size??o.sizePx,l=xP(e,r);return[{...hf.fontSize,key:"fontSize",value:e[n],styleValue:Math.round(o.sizePx),onChange:c=>t({[n]:c??null}),...n==="size"?{}:{reset:{detail:l?y9(c=>i(c),`${l.px}px`,l.view):void 0}}},{...hf.lineHeight,key:"lineHeight",value:a.lineHeight,styleValue:o.lineRatio,onChange:c=>t(c===void 0?{lineHeight:null,line:null}:{lineHeight:c})},{...hf.letterSpacing,key:"letterSpacing",scale:s,value:a.letterSpacingEm,styleValue:o.letterEm,onChange:c=>t(c===void 0?{letterSpacing:null,letter:null}:{letterSpacing:c})},{...hf.paragraphSpacing,key:"paragraphSpacing",value:e.paragraphSpacing,styleValue:0,onChange:c=>t({paragraphSpacing:c??null})},{key:"padding",name:i("Padding"),icon:tO(b9,{}),unit:"px",step:px,shiftStep:10,min:fx,max:ux,value:e.padding,styleValue:o.paddingPx,onChange:c=>t({padding:c??null})}]}function rO({text:e,onTextChange:o,multiline:t,markup:r=!0,styled:a=!0,style:n,base:s,setValue:l,colors:c,placeholder:d,ariaLabel:f,head:m,typedOnCanvas:u=!1}){let x=xf(n,s,l),I=Dh(r,t);return I9("div",{className:"sf-part-textbox",children:[m,tO(g9,{value:e,onChange:o,multiline:t,placeholder:d,ariaLabel:f,rules:Wr,tools:I,barShows:u?"focus":"always",colors:r?c:[],colorNameOf:kt,align:a?{value:n.align??s.align,allow:S9,onChange:b=>l({align:b})}:void 0,letterCase:a?{value:n.case==="capitalize"?"":n.case??"",onChange:b=>l({case:b||null})}:void 0,cells:a?x:void 0})]})}import{UiIcon as SO}from"efficient-easel/draw/client";import{jsx as If,Fragment as w9,jsxs as C9}from"react/jsx-runtime";import{Button as aO,Dialog as v9}from"efficient-shell/ui";function nO({styleName:e,onCancel:o,onConfirm:t}){return If(v9,{open:!0,onClose:o,role:"alertdialog",size:"sm",title:i("Update {style}?",{style:e}),footer:C9(w9,{children:[If(aO,{variant:"secondary",onClick:o,children:i("Cancel")}),If(aO,{variant:"primary",onClick:t,children:i("Update style")})]}),children:If("p",{children:i("Every text on the site that follows {style} changes to look like this one. This text\u2019s own changes are cleared, and it keeps following {style}.",{style:e})})})}import{ScreenDocumentContext as Y9}from"efficient-easel/screen/components/ScreenDocumentContext";import{usePreviewDevice as X9}from"efficient-easel/draw/client";import{shownTier as Sf}from"efficient-easel/screen/lib/document/device-fields";import{jsx as k9}from"react/jsx-runtime";import{createContext as T9,useContext as P9,useMemo as E9,useState as O9}from"react";var _9={partStyle:null,setPartStyle:()=>{}},sO=T9(_9);function jTe({children:e}){let[o,t]=O9(null),r=E9(()=>({partStyle:o,setPartStyle:t}),[o]);return k9(sO.Provider,{value:r,children:e})}function lO(){return P9(sO)}import{TEXT_FIELD_MARKER as Z9}from"efficient-easel/draw";import{useSectionOps as J9}from"efficient-easel/screen/lib/document/use-section-ops";var Sl="@name",iO="@body",cO="@value",dO={[Sl]:"Name",[iO]:"Body",[cO]:"Value"},R9={TimelineTrack:{"entries.date":Sl,"entries.title":Sl,"entries.blurb":iO},Footprint:{"offices.city":Sl},Stats:{"items.label":Sl,"items.value":cO}};function A9(e){let{key:o,row:t}=it(e);return t?`${o}.${t.rowKey}`:null}function wl(e,o){if(!e)return o;let t=A9(o);return t?R9[e]?.[t]??o:o}import{useEaselHost as Q9}from"efficient-easel/screen/lib/host";function F9(e){let o=new Set([...Object.keys(sc[e]??{}),...lc[e]??[]]);for(let[t,r]of Object.entries(dm[e]??{}))r.verb==="snapshot"&&o.add(t);return[...o].sort()}var L9={CollectionCard:"product",FooterMenu:"menu",Gallery:"product",GalleryItem:"product",ProductGrid:"product",ProductHero:"product",SpecTable:"product",Events:"blog",FeaturedCover:"blog",LongRead:"blog",SubscribeBlogs:"blog"},fO={product:"Synced from the product.",blog:"Synced from the blog post.",menu:"Synced from the site menu."},uO="Open",pO={product:{type:"storefront-editor:open-product",needsSlug:!0},blog:{type:"storefront-editor:open-post",needsSlug:!0},menu:{type:"storefront-editor:open-menus",needsSlug:!1}};function Mn(e){let o=e?.source?.slug;return oe(o)}function Cl(e){return L9[e]??null}function mO(e,o){let t=Cl(e);return t&&F9(e).includes(o)?t:null}function gf(e){let o=e?.menu?.id;return oe(o)}var vl={tag:"text-[length:var(--size-label,13px)]",name:"text-[length:min(var(--size-headingMedium,48px),var(--sf-heading-max,9999px))]",namePhone:"max-view-wide:text-[length:min(var(--size-headingMedium,36px),var(--sf-heading-max,9999px))]",body:"text-[length:var(--size-body,14px)]",price:"text-[length:var(--size-label,15px)]",link:"text-[length:var(--size-label,14px)]"},B9={tag:{label:"Tag",follows:"Labels",builtIn:bn(vl.tag),writable:!0},name:{label:"Name",follows:"Heading 2",builtIn:bn(vl.name),writable:!0},body:{label:"Body",follows:"Body",builtIn:bn(vl.body),writable:!0},price:{label:"Price",follows:"Labels",builtIn:bn(vl.price),writable:!0},link:{label:"Link",follows:"Labels",builtIn:bn(vl.link),writable:!0}},hO=B9;var D9={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}},xO=D9;var bf={entry:{label:"Entry",follows:"Labels",builtIn:"13px",writable:!0},number:{label:"Entry number",follows:"Labels",builtIn:"13px",writable:!0}};var nPe=Td,IO={rowLabel:{label:"Spec row name",follows:"Labels",builtIn:"14px"},rowValue:{label:"Spec row value",follows:"Labels",builtIn:"14px"},diagramTitle:{label:"Diagram title",follows:"Labels",builtIn:"12px"},diagramCallout:{label:"Diagram measurement",follows:"Labels",builtIn:"12px"},diagramStatLabel:{label:"Diagram stat name",follows:"Labels",builtIn:"11px"},diagramStatValue:{label:"Diagram stat value",follows:"Labels",builtIn:"11px"}};var DI={SpecTable:IO,FAQ:xO,Collections:hO,Contents:bf};function gO(){return ar("efficient.section-text-regions",()=>new Map)}function uPe(e){let o=gO();for(let[t,r]of Object.entries(e)){if(Object.hasOwn(DI,t))throw new Error(`lib/sections/section-text-regions: "${t}" is a builder section; its table is the builder's`);let a=o.get(t);if(a&&a!==r)throw new Error(`lib/sections/section-text-regions: "${t}" already has a table`);o.set(t,r)}}function yf(e){return e?Object.hasOwn(DI,e)?DI[e]:gO().get(e)??null:null}function MI(e){return e?i(e):null}function wO(e){return e.kind==="role"?zu[e.role]:e.kind==="custom"?"Custom":null}function eV(e){let o=Lt(e.role);return o?{kind:"role",role:o}:null}function oV(e,o){if(!e)return{kind:"unread"};let{faceRole:t,base:r}=e;if(o[t]===r.fontKey)return{kind:"role",role:t};let a=Object.keys(o).filter(n=>o[n]===r.fontKey);return a.length===1?{kind:"role",role:a[0]}:{kind:"custom"}}function wf(e,o,t,r){return eV(Qs(e,o))??oV(t,r)}function tV(e,o){if(!e.length)return null;let t=o(e[0]);return e.every(r=>o(r)===t)?t:null}function CO(e){return[{value:kl,label:i("No style"),description:i("Section\u2019s own")},...e.map(o=>({value:o.id,label:o.name,description:o.values.font?Ga(o.values.font)?.label:void 0}))]}var kl="";function rV({face:e,base:o,onPick:t}){let r=e.kind==="role"?e.role:kl,a=[{label:i("No style"),value:kl},...Zb.map(n=>({label:i(zu[n]),value:n}))];return Y(H9,{ariaLabel:i("Style"),value:r,options:a,inline:!0,onChange:n=>t(n===kl?null:n),renderOption:n=>n.value===kl?Uo(Tl,{children:[Y("span",{className:"es-fsel-label sf-part-style-keep",children:n.label}),Y("span",{className:"sf-part-style-aside","aria-hidden":"true",children:i("Section\u2019s own")})]}):Y("span",{className:"es-fsel-label",style:{fontFamily:`var(--font-role-${n.value})`},children:n.label}),renderValue:()=>Y("span",{style:{fontFamily:o?.fontKey?`var(${Ga(o.fontKey)?.cssVar})`:void 0,fontWeight:o?.weight},children:MI(wO(e))}),valueText:n=>MI(wO(e))??n?.label??""})}var EO=["regionNote","regionStyle"],aV=Object.keys(BI).filter(e=>!EO.includes(e));function OO(e,o){return!e.some(o)}function nV({sectionName:e,onBack:o,textEditor:t,styleRow:r,children:a,tabs:n}){let s=Uo(Tl,{children:[t,r,a]});return Uo("div",{className:"sf-part-panel",children:[Y(Cf,{inline:!0,name:i(e),onSelect:o}),n?n(s):s]})}function vf({source:e,slug:o,menuId:t}){let r=Q9(),a=pO[e],n=!a.needsSlug||!!o;return Y("div",{className:"sf-note sf-note--source",children:Uo("p",{className:"es-field-hint sf-hint-keep",children:[i(fO[e]),n?Uo(Tl,{children:[" ",Y(K9,{type:"button",variant:"link",size:"sm",onClick:()=>{a.type==="storefront-editor:open-menus"?r.send(a.type,{menuId:t??null}):o&&r.send(a.type,{slug:o})},children:i(uO)})]}):null]})})}var vO=4,sV=120;function kO(e){return i("Every {part} in this section follows it. The face and the size change; the letter case is the section\u2019s own and stays as it is.",{part:i(e.label).toLowerCase()})}function TO({region:e,sizePx:o,face:t,base:r,onFollowStyle:a,source:n,slug:s,onBack:l,shows:c,sizedStyle:d,ownLook:f}){let m=e.follows;return Uo("div",{className:"sf-note",children:[Y("p",{children:Y("strong",{children:i(e.label)})}),c("regionNote")&&!f&&Y("p",{children:o?i("Its size follows Styles \u25B8 {follows} \u2014 {px}px right now.",{follows:i(m),px:Math.round(o)}):i("Its size follows Styles \u25B8 {follows}.",{follows:i(m)})}),d?Uo(Tl,{children:[d,c("regionStyle")&&Y("p",{className:"es-field-hint sf-hint-keep",children:kO(e)})]}):a?c("regionStyle")?Y(Tl,{children:Y(G9,{label:i("Style"),icon:Y($9,{}),hint:kO(e),children:Y(rV,{face:t,base:r,onPick:a})})}):null:c("regionNote")&&Y("p",{className:"es-field-hint sf-hint-keep",children:i("Only the size follows a site style. This section sets its own font, weight and letter case.")}),n&&c("sourceNote")?Y(vf,{source:n,slug:s}):null,OO([...EO,"sourceNote",...d?["fontSize"]:[]],u=>c(u)&&(u!=="sourceNote"||!!n))&&Y(ga,{}),Y(Cf,{inline:!0,name:i("Page"),onSelect:l})]})}function lV({onBack:e}){return Uo("div",{className:"sf-note",children:[Y("p",{children:Y("strong",{children:i("This part is no longer here.")})}),Y("p",{children:i("The section it belonged to has been changed or removed.")}),Y(Cf,{inline:!0,name:i("Page"),onSelect:e})]})}function iV({onBack:e,partId:o,why:t}){return Uo("div",{className:"sf-note",children:[Y("p",{children:Y("strong",{children:i("This part's settings did not open.")})}),Y("p",{children:i("The words are still on your page and nothing has been lost. The editor could not work out which control belongs to them, which is a fault on our side. Go back and click the section to open its settings instead.")}),Y("p",{className:"sf-note-detail",children:Uo("code",{children:[o," \u2014 ",t]})}),Y(Cf,{inline:!0,name:i("Page"),onSelect:e})]})}function _O({nodeId:e,propKey:o,onBack:t,onEditStyle:r}){let{getItemById:a,getSelectorForId:n,config:s}=j9(z=>z),l=J9(),c=hT(),{partStyle:d}=lO(),{fonts:f,textStyles:m}=ce(),u=N9(Y9),x=!u?.capabilities?.hasSiteTheme,{persist:I}=Ja({themeFromDocument:x,tokenRef:u?.tokenRef,siteId:u?.siteId??null}),b=Dd({themeFromDocument:x,persist:I}),[v,C]=bO(!1),w=X9(),g=z=>(Sf(w)!=="tablet"||QE(z))&&z9(BI[z],w),k=M9(null),T=a(e),F=n(e),P=T?s.components[T.type]:void 0,{key:L,row:E}=it(o),R=P?.fields?.[L],N=E?mn(R,E):R,y=rd(e,o),_=T?.props??{},A=un(N),H=$c(N),Z=eT(N),q=T?Cl(T.type):null,$=T?mO(T.type,L):null,ke=E?js(_[L],E):_[L],be=!!E&&!(Array.isArray(_[L])&&E.index<_[L].length);NI(()=>{mT(document)||k.current?.querySelector(".es-copy [contenteditable='true'], .es-copy textarea, .sf-copybox textarea, .sf-copybox input")?.focus()},[y]);let[Ke,Me]=bO(0);NI(()=>Me(0),[y]);let ue=!!T&&!be&&(!F||!N);NI(()=>{if(!ue||Ke>=vO)return;let z=setTimeout(()=>Me(Ue=>Ue+1),sV);return()=>clearTimeout(z)},[ue,Ke]);let pe=ue&&Ke<vO,ye=Nn(e,wl(T?.type,o),"textPart");if(!T||be)return Y(lV,{onBack:t});let Ye=yf(T.type),qe=Ye?Zs(Ye,o):null;if(Ye&&qe){let z=d?.partId===y?d:null,Ue=Ye[qe],Xo=Ue.writable===!0&&!!F,or=Fr=>{F&&l.replaceComponent(F.zone,F.index,{...T,props:fa(_,o,"role",Fr)})};if(Xo&&aP(Ue)){let Fr=Qs(_,o),Xb=Lr=>{if(!F)return;let Wu=_;for(let[tD,rD]of Object.entries(Lr))Wu=fa(Wu,o,tD,rD??null);l.replaceComponent(F.zone,F.index,{...T,props:Wu})},QB=qt(b.saved,b.old),eD=dx(Fr)??"",oD=xf(Fr,z?.base??PO,Xb,Sf(w)).filter(Lr=>Lr.key==="fontSize"&&g(Lr.key));return Y(ft,{motion:ye,body:Y(TO,{region:Ue,sizePx:z?.base.sizePx??null,face:wf(_,o,z,f),base:z?.base??null,source:q,slug:Mn(_),onBack:t,shows:g,ownLook:gP(Fr),sizedStyle:Y(yO,{style:g("style")?{value:eD,options:CO(QB),onChange:Lr=>Xb(Lr?{textStyle:Lr}:{textStyle:null,role:null}),onEditStyles:r}:void 0,cells:oD})})})}return Y(ft,{motion:ye,body:Y(TO,{region:Ue,sizePx:z?.base.sizePx??null,face:wf(_,o,z,f),base:z?.base??null,onFollowStyle:Xo?or:void 0,source:q,slug:Mn(_),onBack:t,shows:g})})}if(!F||!N)return pe?Y("div",{className:"sf-note","aria-busy":"true"}):Y(iV,{onBack:t,partId:y,why:F?"no field":"no selector"});let se=z=>{l.replaceComponent(F.zone,F.index,{...T,props:z})},Oe=z=>{if(br(z).hidden!==br(ke).hidden||!A){let Ue=E?Th(_,L,E,z):{..._,[L]:z};Ue&&se(Ue);return}sd({node:T,propKey:o,kind:A,zone:F.zone,index:F.index},br(z).text,l.replaceComponent)},eo=ke,_e=d?.partId===y?d:null,We=_e?.styleOwner,_o=We?a(We.owner):null,No=We&&_o?n(We.owner):null,Ro=!!(We&&_o&&No),M=Ro?_o.props??{}:_,te=Ro?z=>l.replaceComponent(No.zone,No.index,{..._o,props:z}):se,xe=Ro?We.kind:wl(T?.type,o),Re=Qs(M,xe),Ae=[{partKey:xe,face:wf(M,xe,_e,f),sizeGroup:_e?.sizeGroup??null,base:_e?.base??PO,style:Re}],er=tV(Ae,z=>z.sizeGroup),Wa=gn(_e?.inks),oo=(z,Ue)=>{let Xo=M;for(let or of Ae)Xo=fa(Xo,or.partKey,z,Ue);te(Xo)},Rr=z=>z?oo("textStyle",z):ts({textStyle:null,role:null}),ts=z=>{let Ue=M;for(let Xo of Ae)for(let[or,Fr]of Object.entries(z))Ue=fa(Ue,Xo.partKey,or,Fr??null);te(Ue)},Mu=A==="text"||A==="textarea",{text:jb,hidden:za}=br(ke),Si=N?.[Z9]?.label??o,Kb=za?i("Show {label} on the slide",{label:i(Si)}):i("Hide {label} on the slide",{label:i(Si)}),qb=Uo("div",{className:"sf-field-head",children:[Y(U9,{}),Y("span",{className:"sf-field-label sf-field-label--inline",children:i(Si)}),Mu&&Y(V9,{content:Kb,children:Y(q9,{"aria-pressed":za,"aria-label":Kb,onClick:()=>Oe({text:jb,hidden:!za}),children:za?Y(SO,{name:"eye-off",size:14}):Y(SO,{name:"eye",size:14})})})]}),wi=!H&&Z,KB=!!A&&(Sk(N)||H||za||!Z),Vb=wf(M,xe,_e,f),qB=Vb.kind==="role"?Vb.role:null,Hu=dx(Re)??FP(qB),Yb=qt(b.saved,b.old),VB=Object.entries(Re).filter(([z,Ue])=>z!=="role"&&z!=="textStyle"&&Ue!==void 0).length,YB=()=>{let z=M;for(let Ue of Ae){let{role:Xo,textStyle:or}=Ue.style;z=mP(z,Ue.partKey),Xo&&(z=fa(z,Ue.partKey,"role",Xo)),or&&(z=fa(z,Ue.partKey,"textStyle",or))}te(z)},Ar=Hu,XB=LP(Ae[0].style),ZB=Ar?Yb.find(z=>z.id===Ar)?.name??Ar:"",JB=()=>{C(!1),Ar&&(b.write(BP({saved:b.saved,old:b.old,styleId:Ar,values:Px(Ae[0].style)}),!0),YB())};return Uo(nV,{sectionName:P?.label??T.type,onBack:t,tabs:z=>Y(ft,{motion:ye,body:z}),textEditor:g("words")?Y("div",{ref:k,className:"sf-part-text",children:KB?Y(rO,{text:jb,onTextChange:z=>Oe(Mu?{text:z,hidden:za}:z),multiline:Qc(A),markup:A!=="plainText",styled:!1,style:Ae[0].style,base:Ae[0].base,setValue:ts,colors:Wa,placeholder:MI(jk(N))??void 0,ariaLabel:i(Si),head:qb,typedOnCanvas:c===y}):A?Mu?qb:null:Y(W9,{field:N,name:o,value:eo,onChange:Oe,id:`sf-part-${e}-${o}`})}):void 0,children:[$&&g("sourceNote")&&Y(vf,{source:$,slug:Mn(_),menuId:gf(_)}),wi&&Y(yO,{style:g("style")?{value:Hu??"",options:CO(Yb),onChange:z=>Rr(z||null),changed:VB>0,onEditStyles:r,onUpdateStyle:Ar&&XB?()=>C(!0):void 0}:void 0,font:g("font")?{value:Re.font??"",styleValue:Ga(Ae[0].base.fontKey)?.label,options:Zo.map(z=>({label:z.label,value:z.key})),onChange:z=>oo("font",z||null)}:void 0,italic:g("italic")?{value:Re.italic,styleValue:cV(m,Hu),onChange:z=>oo("italic",z??null)}:void 0,cells:xf(Ae[0].style,Ae[0].base,ts,Sf(w)).filter(z=>g(z.key)),align:g("align")?Sf(w)==="mobile"?{value:Re.alignPhone??"",styleValue:Re.align??Ae[0].base.align,onChange:z=>oo("alignPhone",z||null)}:{value:Re.align??"",styleValue:Ae[0].base.align,onChange:z=>oo("align",z||null)}:void 0,letterCase:g("letterCase")?{value:Re.case??"",styleValue:Ae[0].base.case,onChange:z=>oo("case",z||null)}:void 0}),v&&Ar&&Y(nO,{styleName:ZB,onCancel:()=>C(!1),onConfirm:JB}),wi&&er===null&&g("fixedSizeHint")&&Y("p",{className:"es-field-hint sf-hint-keep",children:i("Fixed size \u2014 the site\u2019s Text setting doesn\u2019t resize this.")}),OO(aV,z=>g(z)&&(z==="words"||(z==="sourceNote"?!!$:z==="fixedSizeHint"?wi&&er===null:wi)))&&Y(ga,{})]})}function cV(e,o){return!o||!Array.isArray(e)?!1:e.find(t=>t?.id===o)?.values?.italic===!0}var PO={fontKey:"",sizePx:16,weight:400,lineRatio:1.4,letterEm:0,align:"left",case:"none",paddingPx:0};import{jsx as mt,jsxs as eg,Fragment as CV}from"react/jsx-runtime";import{useCallback as vV,useRef as kV,useState as _l}from"react";import{InspectorIconButton as TV}from"efficient-easel/chrome";import{useEasel as PV}from"efficient-easel/easel";import{PopupMenu as EV,PopupMenuItem as OV,PopupMenuLabel as Ff}from"efficient-shell/ui";import{CopyToPageIcon as _V}from"efficient-easel/icons";import{useEaselSession as RV}from"efficient-easel/screen/lib/session-context";import{cloneNodeWithFreshIds as AV}from"efficient-easel/screen/lib/document/section-doc";import{FOOTER_TYPE as FV}from"efficient-easel/draw";import{currentEaselSession as dV}from"efficient-easel/screen/lib/session";var fV={general:!0,commerce:!0,service:!0};function HI(e){let o=e?.sets;return o?Object.fromEntries(My.map(t=>[t,o.includes(t)])):fV}function WI(e=dV()){return HI(e.blocks)}import{isBackendError as $n}from"efficient-easel/screen/lib/backend-error";import{isEfficientBackend as QO}from"efficient-easel/screen/lib/session";import{useSyncExternalStore as uV}from"react";var Hn=new Map,zI=new Set;function GI(e,o){if(!(Hn.has(e)&&Hn.get(e)===o)){Hn.set(e,o);for(let t of zI)t()}}function kf(e,o){GI(e,o)}function Tf(e,o){let t=Hn.get(e);GI(e,o??(t==="live"?"changed":t))}function Pf(e,o){GI(e,o??"live")}function RO(e){return Hn.get(e)}function pV(e){return zI.add(e),()=>{zI.delete(e)}}function AO(e){let o=()=>e?Hn.get(e):void 0;return uV(pV,o,o)}function FO(e,o){return e==="live"&&o?"changed":e}function $I({live:e,onPress:o,busy:t=!1,pinnedUnpublished:r=!1,goingLive:a}){let n=e==="live"&&!r,s=e==="changed"?i("Changes not live yet"):e==="never"?i("Never published"):r?i("Header and footer not live yet"):e==="live"?i("Everything is live"):null;return{label:i("Publish"),tooltip:e==="never"?i("Put this page on your site"):i("Put your changes on your site"),status:s,quiet:n?{label:i("Published"),reason:i("Everything is live")}:null,...a&&a.length?{goingLive:a}:{},onPress:o,busy:t}}function LO(e){return e.map(o=>o.change==="take_down"?i("{name} (taken down)",{name:o.name}):o.name)}var De="SiteHeader",Ee="SiteFooter",UI="sections",c0e=[De,Ee],Wn=e=>e===De||e===Ee,BO=e=>`${e}:${UI}`;function DO(e,o,t=[]){return{type:e,props:{id:o,[UI]:t}}}var mV=new Set(["Footer",De,Ee]);function zn(e){let o=new Set,t=!1,r=e.filter(a=>{let n=a?.type??"";return n==="Header"?(t=!0,!1):mV.has(n)?o.has(n)?(t=!0,!1):(o.add(n),!0):!0});return t?r:e}function Ef(e,o){return e.some(t=>t?.type===o.type)?e:o.type===De?[o,...e]:[...e,o]}var NO={[De]:{max:3,takes:["Flex","Ticker"]},[Ee]:{max:6,takes:["Flex","Prose","Logos","Divider"]}};function MO(e,o,t){if(!Wn(e))return!0;let r=NO[e];return t<r.max&&r.takes.includes(o)}function HO(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(!Wn(n?.type))continue;let s=n.props?.[UI];if(!Array.isArray(s)||!s.some(c=>c?.props?.id===r))continue;let l=NO[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{isNode as hV}from"efficient-easel/data";var WO="Footer",xV=[De,WO,Ee],Gn=e=>{let o=e?.content;return Array.isArray(o)?o:[]},Sa=e=>{let o=e?.zones;return o&&typeof o=="object"&&!Array.isArray(o)?o:null},Pl=e=>{let o=e?.props?.id;return typeof o=="string"?o:void 0},zO=e=>Is(e)?.ownerId??"";function GO(e){let o=zn(Gn(e)),t=o.some(r=>r?.type===Ee);return o.filter(r=>r?.type===De||r?.type===Ee||r?.type===WO&&!t)}function jI(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(hV(a)){let n=Pl(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(zO(s))||(n.add(s),r(l),a=!0)}}return t}function KI(e,o){let t={},r={};for(let[a,n]of Object.entries(e??{}))(o.has(zO(a))?t:r)[a]=n;return{owned:t,rest:r}}function $O(e,o){if(!o)return e;let t=GO(o);if(!t.length)return e;let r=t.filter(l=>l.type===De),a=t.filter(l=>l.type!==De),n={...e,content:[...r,...Gn(e),...a]},{owned:s}=KI(Sa(o),jI(t,Sa(o)));return Object.keys(s).length&&(n.zones={...Sa(e)??{},...s}),n}function qI(e,o){if(!o)return{page:e,chrome:null};let t=GO(o),r=new Set(t.map(Pl).filter(w=>!!w)),a=[],n=[];for(let w of Gn(e)){let g=Pl(w);g&&r.has(g)||Wn(w?.type)?n.push(w):a.push(w)}let s=new Map(n.map(w=>[Pl(w),w])),l=new Set,c=zn(Gn(o)).flatMap(w=>{let g=Pl(w);if(!g||!r.has(g))return[w];let k=s.get(g);return k?(l.add(k),[k]):[]});for(let w of n)l.has(w)||c.some(g=>g?.type===w.type)||(c=w.type===De?[w,...c]:[...c,w]);c=zn(c);let d=c.length===Gn(o).length&&c.every((w,g)=>w===Gn(o)[g]),f=Sa(e),m=jI(c,f),{owned:u,rest:x}=KI(f,m),I=KI(Sa(o),jI(t,Sa(o))).owned,b={...o,content:d?o.content:[...c]},v=Sa(o);if(v||Object.keys(u).length){let w={};for(let[g,k]of Object.entries(v??{}))g in I?g in u&&(w[g]=u[g]):w[g]=k;for(let[g,k]of Object.entries(u))g in w||(w[g]=k);b.zones=w,v&&IV(b.zones,v)&&(b.zones=v)}let C={...e,content:a};return f&&(Object.keys(x).length||!Object.keys(I).length?C.zones=x:delete C.zones),{page:C,chrome:b}}function IV(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 UO(e,o){return t=>e(t)||t!==void 0&&xV.includes(t)&&o()}var jO="SharedSection",gV=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i,El=e=>{let o=e?.content;return Array.isArray(o)?o:[]},Ol=e=>{let o=e?.props?.id;return typeof o=="string"?o:void 0};function KO(e){if(e?.type!==jO)return null;let o=e.props?.section;return typeof o=="string"&&gV.test(o)?o.toLowerCase():null}function qO(e){let o=[];for(let t of El(e)){let r=KO(t),a=Ol(t);r&&a&&o.push({refId:a,section:r})}return o}function Of(e){let o=El(e)[0];return o&&typeof o=="object"&&Ol(o)?o:null}function bV(e,o){return{type:jO,props:{id:e,section:o}}}function VO(e,o){let t=new Map,r=new Set,a=!1,n=El(e).map(s=>{let l=KO(s),c=Ol(s);if(!l||!c||r.has(l))return s;let d=Of(o.get(l)),f=Ol(d??void 0);return!d||!f||t.has(f)?s:(r.add(l),t.set(f,{section:l,refId:c,reference:s}),a=!0,d)});return{working:a?{...e,content:n}:e,held:t}}function YO(e,o,t){let r=new Map,a=!1,n=El(e).map(s=>{let l=Ol(s),c=l?o.get(l):void 0,d=c?t.get(c.section):void 0;if(!c||!d||r.has(c.section))return s;let f=El(d).slice(1),m=Of(d);return r.set(c.section,m===s?d:{...d,content:[s,...f]}),a=!0,c.reference??bV(c.refId,c.section)});return{page:a?{...e,content:n}:e,docs:r}}var XO=null;function VI(e){XO=e}function Vt(){return XO}var ZO=null;function YI(e){ZO=e}function _f(){return ZO}var Rf=null;function XI(e){Rf=e}function JO(){return!!(Rf&&Rf.state().lockHolder)}function wa(){return Rf!==null}function QI(e){return!!(e?.publish&&e.liveState)}function yV(e,o){if(!QI(e))return;let{versions:t,nameVersion:r,restoreVersion:a,previewVersion:n}=e;if(!(!t||!r||!a||!n))return{list:()=>t.call(e,o),name:(s,l)=>r.call(e,s,l,o),restore:(s,l)=>a.call(e,s,l??{},o),preview:s=>n.call(e,s,o)}}function SV(e,o){return async(t,r)=>{try{await uC()}catch(a){throw new Error(i("A change waiting to go live could not be saved."),{cause:a})}return(await e.publish(o)).state==="live"?dc({state:"live",changes:[]}):Nt(0),{version:r??null}}}function JI(e,o,t){let r=o?{siteId:o}:void 0;return{resolve:a=>e.load({slug:a,...r}).then(n=>(n&&kf(n.id,n.live),n)),saveLayout:(a,n,s,l)=>e.save(a,{layout:n},{version:s,clientId:l??""}).then(c=>(Tf(a,c.live),Nt(),c)),rereadVersion:e.version?a=>e.version(a):void 0,publish:QI(t)?SV(t,r):e.publish?(a,n)=>e.publish(a,n?{version:n}:void 0).then(s=>(Pf(a,s.live),s)):void 0,listPages:()=>e.list(r),createPage:e.create?a=>e.create({...a,...r}):void 0,deletePage:e.remove?(a,n)=>e.remove(a,n):void 0}}function wV(e,o,t,r,a=!1){let n=null,s=new Set,l=!1,c=new Map,d=new Map,f=new Map,m=new Map,u={docId:null,lockHolder:null,conflict:null,saveFailed:!1,unpublished:!1,loadFailed:!1,sections:[]},x=new Set,I=()=>{if(!n)return!1;let E=RO(n.id);return E==="changed"||E==="never"||E===void 0&&l},b=E=>{u={...u,...E,docId:n?.id??null,unpublished:I(),sections:[...f.values()]};for(let R of x)R()},v=(E,R,N)=>{R?f.set(E,{section:E,title:c.get(E)?.title??"",problem:R,holder:N}):f.delete(E)},C=E=>E&&typeof E=="object"&&!Array.isArray(E)?E:{},w=E=>s.has(E),g=()=>new Map([...c].map(([E,R])=>[E,R.layout])),k=()=>`SharedSection-${typeof crypto<"u"&&crypto.randomUUID?crypto.randomUUID():Math.random().toString(36).slice(2)}`,T=(E,R,N,y)=>{let _=C(R);c.set(E,{layout:_,version:N,savedJson:JSON.stringify(_),title:y})},F={state:()=>u,subscribe:E=>(x.add(E),()=>{x.delete(E)})},P={sectionOf:E=>d.get(E)?.section??null,heldElsewhere:E=>{let R=d.get(E)?.section;return!!(R&&f.get(R)?.problem==="lock")},adopt:(E,R)=>{T(R.id,R.layout,R.layout_updated_at,R.title),d.set(E,{section:R.id,refId:k()}),m.set(R.id,R.used_on),b({})},place:E=>{if([...d.values()].some(y=>y.section===E.id))return null;let R=Of(C(E.layout)),N=typeof R?.props?.id=="string"?R.props.id:null;return!R||!N||!R.type?null:(T(E.id,E.layout,E.layout_updated_at,E.title),d.set(N,{section:E.id,refId:k()}),m.set(E.id,E.used_on),R)},usedOn:E=>m.get(E)??null,learn:E=>{for(let R of E){m.set(R.id,R.used_on);let N=c.get(R.id);N&&(N.title=R.title);let y=f.get(R.id);y&&f.set(R.id,{...y,title:R.title})}b({})}},L=async(E,R)=>{for(let[N,y]of E){let _=c.get(N),A=JSON.stringify(y);if(!(!_||A===_.savedJson||f.get(N)?.problem==="lock"))try{let H=await e.save(N,{layout:y},{version:_.version,clientId:R??""});Tf(N,H.live),_.layout=y,_.version=H.version,_.savedJson=A,v(N,null)}catch(H){$n(H,"changed-elsewhere")?v(N,"conflict"):$n(H,"lock-taken")?v(N,"lock",H.holder??void 0):v(N,"save")}}E.size&&Nt(),b({})};return{resolve:async E=>{if(XI(E===rt?null:F),VI(E===rt?null:P),c=new Map,d=new Map,f=new Map,m=new Map,E===rt)return t.resolve(E);let R=!1,[N,y]=await Promise.all([t.resolve(E),e.load({slug:rt,...o}).catch(()=>(R=!0,null))]);if(y&&!_s(N?.layout)){kf(y.id,y.live);let $=C(y.layout);n={id:y.id,layout:$,version:y.version,savedJson:""}}else n=null;if(l=!1,!N)return b({conflict:null,saveFailed:!1,loadFailed:R}),N;let _=C(N.layout),A=qO(_),H=await Promise.all(A.map($=>e.load({id:$.section,...o}).catch(()=>null)));A.forEach(($,ke)=>{let be=H[ke];be?(kf(be.id,be.live),T($.section,be.layout,be.version,"")):(c.delete($.section),f.set($.section,{section:$.section,title:"",problem:"load"}))});let Z=VO(_,g());if(d=Z.held,!n)return d.size&&s.add(N.id),b({conflict:null,saveFailed:!1,loadFailed:R}),d.size?{...N,layout:Z.working}:N;let q=$O(Z.working,n.layout);return n.savedJson=JSON.stringify(qI(q,n.layout).chrome),s.add(N.id),b({conflict:null,saveFailed:!1,loadFailed:!1}),{...N,layout:q}},saveLayout:async(E,R,N,y)=>{if(!w(E))return t.saveLayout(E,R,N,y);let _=n,A=_?qI(R,_.layout):{page:R,chrome:null},H=YO(A.page,d,g()),Z=await t.saveLayout(E,H.page,N,y);if(await L(H.docs,y),!_)return Z;let q=JSON.stringify(A.chrome);if(!A.chrome||q===_.savedJson||u.lockHolder)return Z;try{let $=await e.save(_.id,{layout:A.chrome},{version:_.version,clientId:y??""});Tf(_.id,$.live),Nt(),_.layout=A.chrome,_.version=$.version,_.savedJson=q,l=!0,b({conflict:null,saveFailed:!1})}catch($){$n($,"changed-elsewhere")?b({conflict:$.conflict??{savedBy:"",savedByYou:!1,secondsAgo:0}}):$n($,"lock-taken")?b({lockHolder:$.holder??{name:"",secondsSinceSeen:0,secondsSinceHeld:0}}):b({saveFailed:!0})}return Z},publish:t.publish?async(E,R)=>{let N=await t.publish(E,R),y=n;if(y&&w(E)&&!a&&e.publish&&I()&&!u.lockHolder){let _=await e.publish(y.id,y.version?{version:y.version}:void 0);Pf(y.id,_.live),_.version!==null&&(y.version=_.version),l=!1,b({})}if(w(E)&&!a&&e.publish)for(let[_,A]of c){if(f.get(_)?.problem==="lock")continue;let H=await e.publish(_,A.version?{version:A.version}:void 0);Pf(_,H.live),H.version!==null&&(A.version=H.version)}return N}:void 0,lock:r?{claim:async(E,R,N)=>{let y=await r.claim(E,R,N);if(!w(E))return y;let _=n;if(_)try{await r.claim(_.id,R,!1),u.lockHolder&&b({lockHolder:null})}catch(A){$n(A,"lock-taken")&&b({lockHolder:A.holder??{name:"",secondsSinceSeen:0,secondsSinceHeld:0}})}for(let A of c.keys())try{await r.claim(A,R,!1),f.get(A)?.problem==="lock"&&v(A,null)}catch(H){$n(H,"lock-taken")&&v(A,"lock",H.holder??void 0)}return c.size&&b({}),y},release:async(E,R)=>{if(await r.release(E,R),!w(E))return;let N=n;N&&!u.lockHolder&&await r.release(N.id,R).catch(()=>{});for(let y of c.keys())f.get(y)?.problem!=="lock"&&await r.release(y,R).catch(()=>{})}}:void 0,pinnedChrome:F}}function Af(e){let o=(t,r,a)=>e.save(t,r.layout?{...r,layout:LS(r.layout)}:r,a);return new Proxy(e,{get(t,r){if(r==="save")return o;let a=Reflect.get(t,r,t);return typeof a=="function"?a.bind(t):a}})}function F0e(e,o,t){return e.update(o,BS(t))}function L0e(e,o=ze(),t=WI(),r={}){let a=QO(o),n=e?{siteId:e}:void 0,s=a?!!e:!0,l=o.site.update,c=a&&t.commerce&&t.service,d=!!r.editsPinnedInPlace&&c,f=QI(o.site)?o.site:void 0,m=Af(o.pages),u=JI(m,e,f),x=d?wV(m,n,u,o.lock,!!f):null;return{capabilities:{canPublish:!!f||!!o.pages.publish,hasSiteSettings:a,hasSiteTheme:!!o.theme,placeholderFrames:!1,mediaEditing:!0,pageCreationInAdminForm:!o.pages.create,canDeletePagesInline:!!o.pages.remove,hasEditLock:!!o.lock,hasEditGuard:!0,hasPinnedChrome:c,editsPinnedInPlace:d,explainsSiteSettings:!1,hasSiteRecord:s,canEditSiteRecord:s&&!!l,hasPreviewLink:a||!!o.preview,hasCatalog:a&&t.commerce,hasForms:a&&t.service,hasBlog:!!o.blog&&t.service,offersCommerce:t.commerce,offersService:t.service},...u,...e1(u.resolve),lock:o.lock,...x,site:s?()=>o.site.get(n):void 0,siteLiveState:f?()=>f.liveState(n):void 0,siteVersions:yV(f,n),updateSite:s&&l?I=>l(I,n):void 0,previewHref:o.preview?I=>o.preview.href(I):void 0}}function B0e(e,o=ze(),t=WI()){let r=QO(o),a=o.templates,n=a?Af(a.pages(e)):{list:()=>Promise.reject(new Error(ZI)),load:()=>Promise.reject(new Error(ZI)),save:()=>Promise.reject(new Error(ZI))};return{capabilities:{canPublish:!1,hasSiteSettings:!1,hasSiteTheme:!1,placeholderFrames:!0,mediaEditing:!1,pageCreationInAdminForm:!n.create,canDeletePagesInline:!!n.remove,hasEditLock:!1,hasEditGuard:!1,hasPinnedChrome:r&&t.commerce&&t.service,editsPinnedInPlace:!1,explainsSiteSettings:r,hasSiteRecord:!1,canEditSiteRecord:!1,hasPreviewLink:!1,hasCatalog:r&&t.commerce,hasForms:r&&t.service,hasBlog:!!o.blog&&t.service,offersCommerce:t.commerce,offersService:t.service},...JI(n,void 0),...e1(JI(n,void 0).resolve),publish:void 0,templateName:a?()=>a.get(e).then(s=>s.name):void 0}}function e1(e){return{resolve:o=>(XI(null),VI(null),e(o))}}var ZI="This editor's backend has no website templates.";function LV(e,o,t){let r=AV(e,void 0,o);return t?.(r)??r}function o1({node:e,currentSlug:o,siteId:t,tokenRef:r,runAuthed:a,onNotify:n}){let[s,l]=_l(!1),[c,d]=_l(null),f=RV(),m=PV(P=>P.config.components),[u,x]=_l(!1),[I,b]=_l(null),v=kV(null),[C,w]=_l(null),g=vV(async()=>{if(f.usesBridgedToken&&!r.current){x(!0);return}try{d(await ze(f).pages.list(t?{siteId:t}:void 0))}catch{x(!0)}},[r,t,f]),k=()=>{if(s){l(!1);return}let P=v.current?.getBoundingClientRect();P&&w({top:P.bottom+6,right:Math.max(8,window.innerWidth-P.right)}),d(null),x(!1),g(),l(!0)},T=(c??[]).filter(P=>P.slug!==o),F=async P=>{if(I)return;b(P.slug);let L=LV(e,m,f.documentHooks?.storedNode),E=await a(()=>BV(ze(f).pages,P,L));b(null),l(!1),n?.(E?i("Duplicated to \u201C{name}\u201D",{name:P.label}):i("Couldn\u2019t duplicate the section \u2014 please retry"),E?"success":"error")};return eg(CV,{children:[mt("span",{"data-menu-toggle":!0,style:{display:"contents"},children:mt(TV,{buttonRef:v,label:i("Duplicate to another page"),hasPopup:"menu",expanded:s,onClick:k,children:mt(_V,{size:15})})}),s&&C&&mt(EV,{portal:!0,style:{top:C.top,right:C.right},onClose:()=>l(!1),children:eg("div",{role:"menu","aria-label":i("Duplicate to page"),children:[mt(Ff,{children:i("Duplicate to page")}),u?mt(Ff,{children:i("Couldn\u2019t load pages")}):c===null?mt(Ff,{children:i("Loading\u2026")}):T.length===0?mt(Ff,{children:i("No other pages")}):T.map(P=>eg(OV,{role:"menuitem",disabled:I!==null,onClick:()=>{F(P)},children:[mt("span",{className:"min-w-0 flex-1 truncate",children:P.label}),I===P.slug?mt("span",{className:"shrink-0 text-xs",children:i("Copying\u2026")}):P.draft&&mt("span",{className:"shrink-0 text-xs",children:i("draft")})]},P.id))]})})]})}async function BV(e,o,t){let r=Af(e),a=await r.load({id:o.id});if(!a)throw new Error(`Page "${o.slug}" no longer exists.`);let n=a.layout??{},s=Array.isArray(n.content)?[...n.content]:[],l=s.findIndex(c=>c?.type===FV);s.splice(l===-1?s.length:l,0,t),await r.save(o.id,{layout:{root:{},zones:{},...n,content:s}},{version:a.version,clientId:""})}import{useScreenDocument as bY}from"efficient-easel/screen/components/ScreenDocumentContext";import{useSectionOps as yY}from"efficient-easel/screen/lib/document/use-section-ops";import{SELECTION_MODE as dOe,isSelectionMode as ng}from"efficient-easel/screen/lib/screen-parts";import{usePreviewParts as SY}from"efficient-easel/draw/client";import{jsx as Rl,jsxs as DV}from"react/jsx-runtime";import{SettingsDrill as NV}from"efficient-easel/panel";import{UiIcon as MV}from"efficient-easel/draw/client";var HV="Not shown on the page";function WV({part:e,onOpen:o}){return Rl(NV,{name:i(e.label),preview:e.offPage?i(HV):e.preview||i("Empty"),offPage:e.offPage,status:e.hidden?Rl("span",{className:"sf-entry-eye",role:"img","aria-label":i("Hidden on the page"),children:Rl(MV,{name:"eye-off",size:14})}):void 0,onOpen:()=>o(e.key)})}function og(e){return e.filter(o=>!o.identifier)}function t1({parts:e,onOpen:o,heading:t=!0}){let r=og(e);return r.length?DV("div",{className:"sf-entries",children:[t?Rl("h3",{className:"sf-entries-head",children:i("Text")}):null,r.map(a=>Rl(WV,{part:a,onOpen:o},a.key))]}):null}import{HEADER_TYPE as wY,ROOT_ZONE as b1}from"efficient-easel/draw";import{HEADER_TYPE as ko,FOOTER_TYPE as Ne,newNodeId as zV}from"efficient-easel/draw";function Lf(){return{type:ko,props:{id:zV(ko)}}}var r1=[{type:"FooterLogo",label:"Logo"},{type:"FooterMenu",label:"Menu"},{type:"FooterText",label:"Text"},{type:"FooterEmailSignup",label:"Email Form"},{type:"FooterSocial",label:"Social Logos"},{type:"FooterPayment",label:"Payment Logos"},{type:"FooterGroup",label:"Footer Box"}],GV=r1.filter(e=>e.type!=="FooterLogo"&&e.type!=="FooterGroup"),$V="FooterGroup",a1="blocks";function n1(e){return e===Ne?r1:e===$V?GV:null}function Bf(){let e=(o,t)=>({type:o,props:{id:`${o}-${crypto.randomUUID()}`,...t}});return[e("FooterLogo",{widthPct:100,align:"left",tagline:""}),e("FooterEmailSignup",{...WC}),e("FooterPayment",{...zC})]}function tg(e){switch(e?.type){case De:case Ee:return i("On every page");case ko:case Ne:return i("On every page \xB7 old style");default:return null}}var s1=()=>null,l1=()=>i("Changed on every page");function Df(e,o){let t=bw(e,o);if(t)return t;let r=HO(e,o);if(!r)return null;let a=r.group===De;return r.why==="type"?a?i("The header cannot take another one of these"):i("The footer cannot take another one of these"):a?i("The header holds at most 3 sections"):i("The footer holds at most 6 sections")}import{jsx as Mf,Fragment as eY,jsxs as oY}from"react/jsx-runtime";import{useState as tY}from"react";import{createNode as rY,newId as aY}from"efficient-easel/data";import{useEasel as nY}from"efficient-easel/easel";import{Banner as sY,Button as rg}from"efficient-shell/ui";import{useScreenDocument as lY}from"efficient-easel/screen/components/ScreenDocumentContext";import{isNodeList as UV}from"efficient-easel/data";var Nf="Flex",jV={FooterMenu:"MenuBlock",FooterEmailSignup:"EmailFormBlock",FooterSocial:"SocialLogosBlock",FooterPayment:"PaymentLogosBlock"},KV=e=>{let{id:o,...t}=e;return t},i1=e=>typeof e=="string"?e:"",c1={sm:12,md:13,lg:15},qV="md",d1=1.5,VV={size:13,lineHeight:d1,width:280},YV=14,XV=40,ZV=e=>e==="center"||e==="right"?e:"left";function JV(e){let o={},t=[["padTop","sectionPaddingTop"],["padRight","sectionPaddingRight"],["padBottom","sectionPaddingBottom"],["padLeft","sectionPaddingLeft"]];for(let[r,a]of t){let n=U(e[r]);n&&(o[a]=n)}return o}function QV(e,o,t){let r=t(e,KV(o));if(Array.isArray(o.template))return{...r,props:{...r.props,template:f1(o.template,String(r.props.id))}};if(o.template!==void 0)return r;let a=TS(e,r.props);return a===r.props?r:{...r,props:a}}function f1(e,o,t={at:0}){return e.map(r=>{let a={...r.props,id:`${o}~t${t.at++}`};for(let[n,s]of Object.entries(a))UV(s)&&(a[n]=f1(s,o,t));return{...r,props:a}})}function u1(e,o){let t=e.props??{},r=jV[e.type];if(r)return[QV(r,t,o)];switch(e.type){case"FooterLogo":{let a=ZV(t.align),n=o("LogoBlock",{...t.reverse?{reverse:t.reverse}:{},...typeof t.customColor=="string"&&t.customColor?{customColor:t.customColor}:{},heightPx:Math.round(Ty*((U(t.widthPct)??100)/100)),href:"/",align:a,...JV(t)}),s=i1(t.tagline).trim();return s?[n,o("Text",{text:s,tone:"dim",align:a,_partStyles:{text:{...VV}}})]:[n]}case"FooterText":{let a=typeof t.size=="string"&&t.size in c1?t.size:qV;return[o("Text",{text:i1(t.text),tone:typeof t.tone=="string"?t.tone:"default",_partStyles:{text:{size:c1[a],lineHeight:d1}}})]}case"FooterDivider":{let a=U(t.thickness),n=U(t.lengthPct);return[o("Divider",{...a!==void 0?{thickness:a}:{},...n!==void 0?{lengthPct:n}:{},...t.hideOnMobile===!0?{hideOnMobile:!0}:{}})]}case"FooterGroup":{let a=Array.isArray(t.blocks)?t.blocks:[];return[o(Nf,{direction:t.direction==="horizontal"?"row":"column",gap:ra("FooterGroup",t.gap),align:t.align==="center"||t.align==="end"||t.align==="stretch"?t.align:"start",...us,content:a.flatMap(n=>u1(n,o))})]}default:return[]}}function Al(e,o,t){let r=e&&Array.isArray(e.props?.blocks)?e.props.blocks:[],a=d=>o(Nf,{direction:"row",wrap:!0,share:"equal",gap:XV,content:d}),n=[],s=[];for(let d of r){let f=u1(d,o);if(d.type==="FooterDivider"){s.length&&n.push(a(s)),s=[],n.push(...f);continue}f.length<=1?s.push(...f):s.push(o(Nf,{direction:"column",gap:YV,align:"stretch",...us,content:f}))}(s.length||!n.length)&&n.push(a(s));let l=o(Nf,{direction:"column",content:[o("LegalLineBlock")]}),c=DO(Ee,t,[...n,l]);return{...c,props:{...c.props,...e?.props?.width==="full"?{fullWidth:!0}:{}}}}function p1(){let{appState:e,dispatch:o,config:t}=nY(f=>f),{readOnly:r}=lY(),[a,n]=tY(!1),s=e.data.content;if(r||s.some(f=>f.type===Ee))return null;let l=s.find(f=>f.type===Ne)??null,c=(f,m)=>rY(t,f,m),d=()=>{let f=Al(l,c,aY(Ee));o({type:"setData",data:m=>({...m,content:[...Ef(m.content,f)]}),recordHistory:!0}),n(!1)};return Mf(sY,{tone:"info",title:i("This footer uses the old layout"),action:a?oY(eY,{children:[Mf(rg,{variant:"primary",size:"sm",onClick:d,children:i("Switch now")}),Mf(rg,{variant:"secondary",size:"sm",onClick:()=>n(!1),children:i("Cancel")})]}):Mf(rg,{variant:"secondary",size:"sm",onClick:()=>n(!0),children:i("Switch to Box footer")}),children:i("Build this footer out of Boxes and blocks, like a page: the same menus, signup, social links and logo, with the copyright as a Legal Line. Your current footer is kept.")})}import{jsx as ag,jsxs as iY}from"react/jsx-runtime";import{InspectorUpLevel as m1}from"efficient-easel/chrome";function h1({nodeId:e,part:o,sectionName:t,onUpToSection:r}){let{select:a}=qd(),n=Nn(e,o,"picture");return iY("div",{children:[o!=="media"?ag(m1,{inline:!0,name:i(Rn.media),onSelect:()=>a(ul(e,"media"))}):ag(m1,{inline:!0,name:i(t),onSelect:r}),ag(ft,{part:o,motion:n})]})}import{SettingsSwitch as CY}from"efficient-easel/panel";var S1={kind:"header"},lg={kind:"website"},w1={kind:"website",tab:En,revealPageGroup:!0},C1={kind:"chat"},v1={kind:"social"},Fl="Part";function vY(e){return i("Part of {name}",{name:i(e)})}function kY(e,o,t){let r=e.describeNode(o);return{name:t,kindLabel:r?vY(r.label):i(Fl)}}function TY(e){switch(e){case"Header":return{title:i("Header settings belong to a website."),own:i("Each website created from this template sets its own header afterwards.")};case"Appearance":return{title:i("Appearance settings belong to a website."),own:i("Each website created from this template sets its own appearance afterwards.")};case"Live chat":return{title:i("Live chat settings belong to a website."),own:i("Each website created from this template sets its own live chat afterwards.")};case"Social link":return{title:i("Social link settings belong to a website."),own:i("Each website created from this template sets its own social link afterwards.")};default:return{title:i("{what} settings belong to a website.",{what:e}),own:i("Each website created from this template sets its own {what} afterwards.",{what:e.toLowerCase()})}}}function k1({what:e}){let o=TY(e);return Ca("div",{className:"sf-note",children:[Ie("p",{children:Ie("strong",{children:o.title})}),Ca("p",{children:[i("A template is a blueprint \u2014 it has no website of its own, so there is nothing here to change.")," ",o.own]})]})}function sg(e){let o=fl[e];return{name:Rn[e],kindLabel:Fl,icon:o,head:(t,r)=>{if(t.kind!==o)return null;let a=r.describeNode(t.nodeId);if(!a)return null;let n=y1({name:i(Yd(e,a.props)),tier:"part",of:i(a.label)},{partOf:({name:s})=>i("Part of {name}",{name:s})});return{name:n.name,kindLabel:n.kind}},render:(t,r)=>t.kind===o?Ie(h1,{nodeId:t.nodeId,part:e,sectionName:r.describeNode(t.nodeId)?.label??"Hero",onUpToSection:()=>r.onSelectNode(t.nodeId)}):null}}var PY={header:{name:"Header",kindLabel:"Site settings",icon:"header",render:(e,o)=>{let t=o.hostPanels?.header;return t?Ie(t,{placeholderMode:o.capabilities.placeholderFrames,tokenRef:o.tokenRef,siteId:o.siteId,websiteName:o.websiteName,onOpenWebsiteSettings:o.onOpenWebsiteSettings,onAuthExpired:()=>o.notifyParent("storefront-editor:auth-expired")}):null}},website:{name:"Appearance",kindLabel:"Site settings",icon:"website",render:(e,o)=>Ie(Md,{initialTab:e.tab,revealPageGroup:e.revealPageGroup,themeFromDocument:!o.capabilities.hasSiteTheme,tokenRef:o.tokenRef,siteId:o.siteId,onNotify:o.onNotify},e.tab??"")},chat:{name:"Live chat",kindLabel:"Site settings",icon:"chat",render:()=>Ie(U0,{})},social:{name:"Social links",kindLabel:"Site settings",icon:"social",render:()=>Ie(X0,{unavailable:Ie(k1,{what:"Social link"})})},ticker:{name:il,kindLabel:Fl,icon:"ticker",head:(e,o)=>e.kind==="ticker"?kY(o,e.heroId,i(il)):null,render:e=>Ie(oO,{heroId:e.kind==="ticker"?e.heroId:""})},heroMedia:sg("media"),heroImage:sg("image"),heroImage2:sg("image2"),part:{name:Fl,kindLabel:Fl,icon:"Text",head:(e,o)=>{if(e.kind!=="part")return null;let t=o.describeNode(e.nodeId);if(!t)return null;let{key:r,row:a}=it(e.propKey),n=a?mn(t.fields[r],a):t.fields[r],s=yf(t.type),l=s?Zs(s,e.propKey):null,c=s&&l?s[l].label:dO[e.propKey],d=c?i(c):Yk(i(Eh(nd(n??{},r))),a),f=y1({name:d,tier:"part",of:i(t.label)},{partOf:({name:m})=>i("Part of {name}",{name:m})});return{name:f.name,kindLabel:f.kind}},render:(e,o)=>e.kind==="part"?Ie(_O,{nodeId:e.nodeId,propKey:e.propKey,onBack:()=>o.onSelectNode(e.nodeId),onEditStyle:o.onOpenSiteStyles}):null}},EY=new Set(["header","website","chat"]);function OY(e,o){if(e==="selection")return null;let t=PY[e];return EY.has(e)&&!o.hasSiteSettings?{...t,kindLabel:"Not part of a template",render:()=>Ie(k1,{what:t.name})}:t}function T1({mode:e,onOpenWebsiteSettings:o,onOpenSiteStyles:t,onOpenPageStyles:r,onSelectNode:a,hideNodeActions:n=!1,onNotify:s,onHidePanel:l}){let{capabilities:c,tokenRef:d,notifyParent:f,currentSlug:m,siteId:u,runAuthed:x,readOnly:I,navigate:b}=bY(),{rows:v}=nl(),C=v?.find(te=>te.slug===m)??null,w=fY(),g=Object.keys(w.fields).some(te=>!te.startsWith("_")&&!rl.includes(te)),{websiteName:k}=ce(),T=yY({readOnly:I}),{select:F}=SY(),{selectedItem:P,getItemById:L,getSelectorForId:E,config:R,appState:N}=dY(te=>te),y=IY(R,P?{type:P.type,props:P.props}:null),_=P?tT(y??R.components[P.type]?.fields,P.props):[],A=te=>R.components[te]?.label??te,H=P?E(P.props.id):void 0,Z=OY(e.kind,c),q=gY(),$={capabilities:c,tokenRef:d,hostPanels:q.chrome?.panels,describeNode:te=>{let xe=L(te);if(!xe)return null;let Re=R.components[xe.type];return{type:xe.type,label:Re?.label??xe.type,fields:Re?.fields??{},props:xe.props??{}}},siteId:u,websiteName:k??null,notifyParent:f,onNotify:s,onOpenWebsiteSettings:o,onOpenSiteStyles:t,onSelectNode:a},ke=Z?.head?.(e,$)??null,be=M0({kind:C?.kind,pageName:C?.label}),Ke=ke?.name??(Z?i(Z.name):P?i(A(P.type)):be.name),Me=ke?.kindLabel??(Z?i(Z.kindLabel):P?H&&H.zone!==b1?i("Block"):i("Section"):be.kindLabel),ue=Z?Z.icon:P?P.type:"page",pe=Z?null:P?R.components[P.type]?.fields??null:R.root?.fields??null,ye=pe?CE(pe):2,Ye=ng(e)&&P?Cl(P.type):null,qe=!!P&&!!H&&H.zone===b1&&P.type!==Ne&&P.type!==wY,se=Df(N?.data,P),Oe=()=>{se||H&&T.duplicateComponent(H.zone,H.index)},eo=()=>{H&&(T.removeComponent(H.zone,H.index),T.select(null))},_e=P?R.components[P.type]?.defaultProps?.previewHover:void 0,We=ng(e)&&!!P&&!!H&&_e!==void 0,_o=We&&P.props.previewHover===!0,No=()=>{!P||!H||T.replaceComponent(H.zone,H.index,{...P,props:{...P.props,previewHover:!_o}})},[Ro,M]=cY(Dx);return Ca("div",{className:`es-sidepanel es-sidepanel--right sf-panel sf-panel--right${Ro||!(!Z&&P)?"":" sf-hints-folded"}`,children:[Ie(mY,{icon:Ie(xa,{type:ue,size:15}),name:Ke,kind:Me,actions:!n&&ng(e)&&P&&P.type!==Ne?Ca(x1,{children:[Ie(I1,{label:i("Duplicate section"),title:se??void 0,disabled:se!==null,onClick:Oe,children:Ie(hY,{size:15})}),qe&&c.hasSiteSettings&&Ie(o1,{node:P,currentSlug:m,siteId:u??void 0,tokenRef:d,runAuthed:x,onNotify:s}),Ie(I1,{label:i("Remove section"),danger:!0,onClick:eo,children:Ie(xY,{size:15})}),l?Ie(g1,{side:"right",onHide:l,divider:!0}):null]}):l?Ie(g1,{side:"right",onHide:l}):void 0}),We&&Ca("div",{className:"sf-preview-pin",children:[Ca("div",{className:"sf-preview-pin-text",children:[Ie("span",{className:"sf-preview-pin-label",children:i("Preview hover state")}),Ie("span",{className:"sf-preview-pin-hint",children:i("not shown live")})]}),Ie(CY,{checked:_o,onChange:No,ariaLabel:i("Preview hover state")})]}),Ie(Kv,{tier:ye,children:Ie("div",{className:"sf-insp-body es-insp-body sf-scroll",children:Z?Z.render(e,$):P?Ca(x1,{children:[P.type===Ne&&c.hasSiteSettings&&Ie(p1,{}),Ie(Vw,{children:Ie(ft,{entries:Ie(t1,{parts:_,heading:!1,onOpen:te=>F(rd(P.props.id,te))}),entryCount:og(_).length})}),Ye&&Ie(vf,{source:Ye,slug:Mn(P?.props),menuId:gf(P?.props)}),Ie(Nx,{shown:Ro,onChange:M})]}):g?Ie(ft,{omit:rl}):Ie(pY,{variant:"none",icon:!1,message:i("Select a section or block to edit it."),children:r&&Ie(uY,{variant:"secondary",onClick:r,children:i("This page")})})})})]})}import{jsx as p,jsxs as O,Fragment as R1}from"react/jsx-runtime";var Qe={dark:"var(--sf-thumb-bar-dark)",soft:"var(--sf-thumb-bar-light)",accent:"var(--sf-thumb-accent)",tint:"var(--sf-thumb-accent-tint)",block:"var(--sf-thumb-block)",line:"var(--sf-thumb-border)",card:"var(--sf-thumb-card)"},ig="repeating-linear-gradient(135deg,var(--sf-thumb-hatch1) 0,var(--sf-thumb-hatch1) 5px,var(--sf-thumb-hatch2) 5px,var(--sf-thumb-hatch2) 10px)";function W({w:e,h:o,tone:t="dark",r=2,style:a}){return p("div",{style:{width:e,height:o,borderRadius:r,background:Qe[t],flex:"none",...a}})}var _Y={Hero:"hero",HeroSingle:"herosingle",IntroBleed:"intro",Collections:"collections",AlloyWheelsListing:"wheelslisting",CatalogFilterBar:"catalogfilterbar",ProductGrid:"productgrid",FitmentFinder:"fitmentfinder",Gallery:"gallery",GalleryB:"gallerygrid",SpecStrip:"specstrip",ProductHero:"producthero",SpecTable:"spectable",ProcessSteps:"processsteps",DetailRows:"detailrows",FitmentTable:"fitmenttable",CompatibleTyres:"compatibletyres",TyreSizes:"tyresizes",TyreFitment:"tyrefitment",EuTyreLabel:"eutyrelabel",RelatedProducts:"productgrid",BundleOffer:"bundleoffer",OrderSummary:"ordersummary",DeliveryOptions:"deliveryoptions",PaymentBadges:"paymentbadges",CheckoutCTA:"checkoutcta",Manifesto:"manifesto",ParagraphsA:"paragraphs",Prose:"prose",StatsParagraph:"statsparagraph",Chart:"chart",Mockup:"mockup",Footprint:"footprint",Timeline:"timeline",TimelineTrack:"timelinetrack",TitleWithButtons:"titlewithbuttons",Split:"split",Cards:"cards",FAQ:"faq",Testimonials:"testimonials",Masthead:"masthead",Breadcrumb:"breadcrumb",CategoryBar:"categorybar",FeaturedCover:"featuredcover",LongRead:"longread",Series:"series",Subscribe:"subscribe",SubscribeBlogs:"subscribe",Events:"events",DocMasthead:"docmasthead",DocTabs:"doctabs",DocBody:"docbody",DocMetaCards:"docmetacards",Banner:"banner",Stats:"stats",KeyFeatures:"keyfeatures",Logos:"logos",Ticker:"ticker",Countdown:"countdown",Reviews:"reviews",SubmitBuild:"submitbuild",ReviewForm:"reviewform",Form:"form",AppointmentBooking:"appointmentbooking",ContactRouting:"contact",ContactLocations:"contactlocations",CityPictures:"citypictures",CityMaps:"citymaps",Header:"header",Footer:"footer",SectionHeader:"sectionheader",Grid:"grid",Flex:"blanksection",Spacer:"spacer",Divider:"divider",CustomHTML:"customhtml",Heading:"heading",Text:"text",ImageBlock:"image",ButtonBlock:"button",MenuBlock:"menu",EmailFormBlock:"emailform",SocialLogosBlock:"sociallogos",PaymentLogosBlock:"paymentlogos",LegalLineBlock:"legalline",SearchBlock:"search",CartBlock:"cart",CountrySwitchBlock:"countryswitch"},j={position:"absolute",inset:0},h={ink:"var(--sf-thumb-ink)",ink2:"var(--sf-thumb-ink-2)",inkSoft:"var(--sf-thumb-ink-soft)",inkSoft2:"var(--sf-thumb-ink-soft-2)",paper:"var(--sf-thumb-paper)",paper2:"var(--sf-thumb-paper-2)",warm:"var(--sf-thumb-warm)",rust:"var(--sf-thumb-rust)",onInk:"var(--sf-thumb-on-ink)",text:"var(--sf-thumb-scene-text)",muted:"var(--sf-thumb-scene-muted)",rule:"var(--sf-thumb-scene-rule)",mark1:"var(--sf-thumb-mark-1)",mark2:"var(--sf-thumb-mark-2)",card:"var(--sf-thumb-card)",scrim:"var(--sf-thumb-scrim)"},Fe=(e,o,t=160)=>({background:`linear-gradient(${t}deg,${e},${o})`});function Xt({size:e,style:o}){let t=Math.max(2,Math.round(e*.13)),r=(a,n,s)=>({position:"absolute",inset:a,background:n,borderRadius:t,...s?{mixBlendMode:s}:null});return O("span",{style:{position:"absolute",display:"block",width:e,height:e,...o},children:[p("span",{style:r("8% 26% 30% 6%",h.mark1)}),p("span",{style:r("26% 6% 8% 30%",h.mark2,"multiply")})]})}function Wf({children:e}){return p("span",{style:{fontSize:"4.64cqw",fontWeight:700,letterSpacing:"0.06em",textTransform:"uppercase",color:h.muted},children:e})}function P1({over:e,overTone:o,head:t,headSize:r=11.5,cta:a,ctaBg:n,ctaFg:s,tone:l}){return O(R1,{children:[e&&p("span",{style:{fontSize:"3.65cqw",letterSpacing:"0.16em",fontWeight:700,color:o},children:e}),p("span",{style:{fontSize:r,lineHeight:1.15,fontWeight:700,maxWidth:"78%",color:l},children:t}),a&&p("span",{style:{alignSelf:"flex-start",fontSize:"3.65cqw",letterSpacing:"0.12em",fontWeight:700,padding:"4px 8px",borderRadius:2,marginTop:2,background:n,color:s},children:a})]})}function cg({name:e,price:o}){return O("div",{style:{display:"flex",flexDirection:"column",gap:2,minWidth:0},children:[p("div",{style:{flex:1,minHeight:0,borderRadius:3,position:"relative",overflow:"hidden",...Fe(h.paper,h.paper2,150)},children:p(Xt,{size:34,style:{left:"50%",top:"50%",transform:"translate(-50%,-50%)"}})}),p("span",{style:{fontSize:"3.65cqw",fontWeight:600,color:h.text},children:e}),p("span",{style:{fontSize:"3.65cqw",color:h.muted},children:o})]})}function Yt({k:e,v:o,ok:t}){return O("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",gap:6,padding:"3.5px 2px",borderBottom:`1px solid ${h.rule}`,fontSize:"3.98cqw",color:h.muted},children:[p("span",{children:e}),O("span",{style:{display:"flex",gap:6,alignItems:"center"},children:[p("b",{style:{color:h.text,fontWeight:700},children:o}),t&&p("span",{style:{color:h.rust,fontWeight:700},children:"\u2713"})]})]})}function Te({title:e,children:o}){return O("div",{style:{...j,background:h.card,padding:"9px 10px",display:"flex",flexDirection:"column",gap:6},children:[p(Wf,{children:e}),o]})}function E1({size:e=14}){return p("span",{style:{width:e,height:e,borderRadius:"50%",flex:"none",display:"block",background:`linear-gradient(150deg,${h.mark1},${h.mark2})`}})}function dg({filled:e=5,size:o=6}){return O("span",{style:{fontSize:o,letterSpacing:"0.06em",color:h.rust,lineHeight:1},children:["\u2605".repeat(e),p("span",{style:{color:h.mark1},children:"\u2605".repeat(5-e)})]})}function Ll({n:e,label:o,tone:t=h.text}){return O("div",{style:{flex:1,display:"flex",flexDirection:"column",gap:1,minWidth:0},children:[p("b",{style:{fontSize:"8.16cqw",lineHeight:1,color:t},children:e}),p("span",{style:{fontSize:"3.65cqw",letterSpacing:"0.08em",textTransform:"uppercase",opacity:.62,color:t},children:o})]})}function po({children:e,w:o}){return p("span",{style:{fontSize:"3.98cqw",lineHeight:1.45,color:h.muted,width:o,display:"block"},children:e})}function Hf({label:e,w:o="100%",filled:t}){return O("div",{style:{width:o,display:"flex",flexDirection:"column",gap:2},children:[p("span",{style:{fontSize:"3.32cqw",letterSpacing:"0.08em",textTransform:"uppercase",color:h.muted},children:e}),p("span",{style:{height:9,borderRadius:3,border:`1px solid ${h.rule}`,background:t?h.paper:h.card}})]})}function O1({children:e}){return p("span",{style:{alignSelf:"flex-start",fontSize:"3.65cqw",letterSpacing:"0.12em",fontWeight:700,padding:"5px 9px",borderRadius:2,background:h.text,color:h.onInk},children:e})}var RY={wheelslisting:p(Te,{title:"All wheels",children:p("div",{style:{flex:1,display:"flex",flexDirection:"column",gap:4,justifyContent:"center"},children:[["Ridge 19","20\xD79 +12","$365"],["Ridge 29","18\xD79 +20","$410"],["Ridge 39","17\xD78 \u221210","$455"]].map(([e,o,t])=>O("div",{style:{display:"flex",alignItems:"center",gap:6},children:[p("span",{style:{width:20,height:15,borderRadius:3,flex:"none",position:"relative",overflow:"hidden",...Fe(h.paper,h.paper2,150)},children:p(Xt,{size:12,style:{left:"50%",top:"50%",transform:"translate(-50%,-50%)"}})}),p("b",{style:{flex:1,fontSize:"4.31cqw",color:h.text},children:e}),p("span",{style:{fontSize:"3.65cqw",color:h.muted},children:o}),p("b",{style:{fontSize:"4.31cqw",color:h.text,width:26,textAlign:"right"},children:t})]},e))})}),catalogfilterbar:O("div",{style:{...j,background:h.card,display:"flex",flexDirection:"column",justifyContent:"center",gap:7,padding:"0 11px"},children:[O("div",{style:{display:"flex",gap:4,alignItems:"center"},children:[["20 inch","6\xD7139.7","Black"].map(e=>O("span",{style:{fontSize:"3.65cqw",fontWeight:600,padding:"4px 7px",borderRadius:99,background:h.text,color:h.onInk,display:"flex",gap:4,alignItems:"center"},children:[e,p("span",{style:{opacity:.6},children:"\u2715"})]},e)),p("span",{style:{fontSize:"3.65cqw",color:h.rust,fontWeight:700},children:"Clear"})]}),O("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center"},children:[p("span",{style:{fontSize:"3.65cqw",color:h.muted},children:"128 results"}),p("span",{style:{fontSize:"3.65cqw",color:h.muted,border:`1px solid ${h.rule}`,borderRadius:3,padding:"3px 6px"},children:"Sort: Price \u25BE"})]})]}),fitmentfinder:O("div",{style:{...j,padding:"10px 12px",display:"flex",flexDirection:"column",gap:6,justifyContent:"center",...Fe(h.ink,h.inkSoft)},children:[p("span",{style:{fontSize:"5.31cqw",fontWeight:700,color:h.onInk},children:"Will it fit your rig?"}),O("div",{style:{display:"flex",gap:4},children:[["2021","Toyota","Hilux"].map(e=>O("span",{style:{flex:1,fontSize:"3.65cqw",color:h.text,background:h.card,borderRadius:3,padding:"5px 6px",display:"flex",justifyContent:"space-between"},children:[e," ",p("span",{style:{color:h.muted},children:"\u25BE"})]},e)),p("span",{style:{fontSize:"3.65cqw",fontWeight:700,letterSpacing:"0.08em",background:h.warm,color:h.ink,borderRadius:3,padding:"5px 7px"},children:"GO"})]})]}),compatibletyres:p(Te,{title:"Tyres that suit",children:p("div",{style:{flex:1,display:"grid",gridTemplateColumns:"repeat(3,1fr)",gap:5,minHeight:0},children:[["Ridge Grappler","$489"],["Trail Grappler","$525"],["Terra Grappler","$438"]].map(([e,o])=>O("div",{style:{display:"flex",flexDirection:"column",gap:2,minWidth:0},children:[p("div",{style:{flex:1,minHeight:0,borderRadius:3,position:"relative",overflow:"hidden",background:h.ink},children:p("span",{style:{position:"absolute",left:"50%",top:"50%",transform:"translate(-50%,-50%)",width:26,height:26,borderRadius:"50%",border:`5px solid ${h.mark2}`,boxSizing:"border-box"}})}),p("span",{style:{fontSize:"3.32cqw",fontWeight:600,color:h.text,overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis"},children:e}),p("span",{style:{fontSize:"3.32cqw",color:h.muted},children:o})]},e))})}),tyresizes:p(Te,{title:"Available sizes",children:p("div",{style:{flex:1,display:"flex",flexWrap:"wrap",gap:4,alignContent:"center"},children:["265/65R17","285/70R17","265/60R18","275/55R20"].map((e,o)=>p("span",{style:{fontSize:"3.65cqw",fontWeight:600,padding:"5px 7px",borderRadius:3,border:`1px solid ${o===0?h.rust:h.rule}`,color:o===0?h.rust:h.text,background:o===0?h.paper:h.card},children:e},e))})}),tyrefitment:O(Te,{title:"Will it fit your car?",children:[p("div",{style:{display:"flex",gap:3},children:["Make","Model","Year","Trim"].map(e=>O("span",{style:{flex:1,minWidth:0,fontSize:"3.32cqw",color:h.muted,background:h.paper,border:`1px solid ${h.rule}`,borderRadius:3,padding:"4px 5px",display:"flex",justifyContent:"space-between",gap:2,overflow:"hidden",whiteSpace:"nowrap"},children:[e," ",p("span",{style:{color:h.muted},children:"\u25BE"})]},e))}),p("div",{style:{flex:1,display:"flex",flexDirection:"column",gap:2,justifyContent:"center",minHeight:0},children:[["265/65R17","Fits",!0],["285/70R17","Not your size",!1]].map(([e,o,t])=>O("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"baseline",gap:6,borderTop:`1px solid ${h.rule}`,paddingTop:3},children:[p("span",{style:{fontSize:"3.32cqw",fontWeight:600,color:h.text},children:e}),p("span",{style:{fontSize:"3.32cqw",fontWeight:t?700:400,letterSpacing:"0.06em",color:t?h.warm:h.muted},children:o})]},e))})]}),eutyrelabel:O("div",{style:{...j,background:h.card,padding:"9px 11px",display:"flex",gap:8,alignItems:"center"},children:[p("div",{style:{flex:1,display:"flex",flexDirection:"column",gap:1.5},children:[["A","42%"],["B","56%"],["C","70%"],["D","84%"]].map(([e,o],t)=>O("div",{style:{display:"flex",alignItems:"center",gap:3},children:[p("span",{style:{width:o,height:6,borderRadius:"0 2px 2px 0",background:t===1?h.rust:h.mark1}}),p("span",{style:{fontSize:"3.32cqw",fontWeight:700,color:t===1?h.rust:h.muted},children:e})]},e))}),O("div",{style:{flex:"none",display:"flex",flexDirection:"column",gap:3,alignItems:"center"},children:[p("b",{style:{fontSize:"6.63cqw",lineHeight:1,color:h.text},children:"72"}),p("span",{style:{fontSize:"3.32cqw",letterSpacing:"0.08em",color:h.muted},children:"dB"})]})]}),bundleoffer:O("div",{style:{...j,background:h.paper,padding:"9px 11px",display:"flex",flexDirection:"column",gap:5,justifyContent:"center"},children:[p(Wf,{children:"Buy it with"}),O("div",{style:{display:"flex",alignItems:"center",gap:5},children:[[0,1].map(e=>p("span",{style:{width:26,height:22,borderRadius:3,flex:"none",position:"relative",overflow:"hidden",background:h.card},children:p(Xt,{size:17,style:{left:"50%",top:"50%",transform:"translate(-50%,-50%)"}})},e)),p("span",{style:{fontSize:"5.69cqw",fontWeight:700,color:h.muted},children:"+"}),O("div",{style:{flex:1,display:"flex",flexDirection:"column",gap:1},children:[p("span",{style:{fontSize:"3.65cqw",color:h.muted,textDecoration:"line-through"},children:"$1,024"}),p("b",{style:{fontSize:"6.02cqw",color:h.rust,lineHeight:1},children:"$899"})]})]})]}),checkoutcta:O("div",{style:{...j,display:"flex",alignItems:"center",justifyContent:"space-between",padding:"0 13px",gap:8,...Fe(h.ink,h.ink2)},children:[O("div",{style:{display:"flex",flexDirection:"column",gap:2},children:[p("span",{style:{fontSize:"3.65cqw",letterSpacing:"0.12em",color:h.warm,fontWeight:700},children:"READY TO ORDER"}),p("b",{style:{fontSize:"6.63cqw",color:h.onInk,lineHeight:1},children:"$1,956"}),p("span",{style:{fontSize:"3.65cqw",color:h.onInk,opacity:.65},children:"4 items \xB7 fitted free"})]}),p("span",{style:{fontSize:"3.65cqw",letterSpacing:"0.12em",fontWeight:700,padding:"6px 10px",borderRadius:2,background:h.warm,color:h.ink,flex:"none"},children:"CHECKOUT"})]}),contact:p(Te,{title:"Who do you need?",children:p("div",{style:{flex:1,display:"flex",flexDirection:"column",gap:4,justifyContent:"center"},children:[["Fitment help","the workshop"],["Order status","the front desk"],["Trade accounts","sales"]].map(([e,o])=>O("div",{style:{display:"flex",alignItems:"center",gap:5},children:[p("b",{style:{flex:1,fontSize:"4.31cqw",color:h.text},children:e}),p("span",{style:{fontSize:"3.65cqw",color:h.muted},children:o}),p("span",{style:{fontSize:"4.64cqw",color:h.rust,lineHeight:1},children:"\u203A"})]},e))})}),contactlocations:p(Te,{title:"Find us",children:p("div",{style:{flex:1,display:"grid",gridTemplateColumns:"repeat(2,1fr)",gap:5,minHeight:0},children:[["Brisbane","7 Kerry Rd","Mon\u2013Sat"],["Townsville","12 Enterprise","Mon\u2013Fri"]].map(([e,o,t])=>O("div",{style:{border:`1px solid ${h.rule}`,borderRadius:4,padding:"5px 6px",display:"flex",flexDirection:"column",gap:1},children:[p("b",{style:{fontSize:"4.31cqw",color:h.text},children:e}),p("span",{style:{fontSize:"3.32cqw",color:h.muted},children:o}),p("span",{style:{fontSize:"3.32cqw",color:h.rust,fontWeight:700},children:t})]},e))})}),citypictures:p(Te,{title:"Our studios",children:O("div",{style:{flex:1,display:"flex",flexDirection:"column",gap:3,minHeight:0},children:[p("span",{style:{fontSize:"3.32cqw",letterSpacing:"0.12em",fontWeight:700,color:h.muted},children:"A \xB7 AMERICAS"}),p("div",{style:{flex:1,display:"grid",gridTemplateColumns:"repeat(3,1fr)",gap:4,minHeight:0},children:["Los Angeles","Miami","Toronto"].map(e=>O("div",{style:{position:"relative",minHeight:0},children:[p(W,{r:3,style:{...j,background:`linear-gradient(transparent 45%,${h.scrim} 45%),${Fe(h.ink,h.inkSoft2).background}`}}),p("b",{style:{position:"absolute",left:5,bottom:4,fontSize:"3.65cqw",color:h.onInk},children:e})]},e))})]})}),citymaps:p(Te,{title:"Find us",children:p("div",{style:{flex:1,display:"grid",gridTemplateColumns:"repeat(2,1fr)",gap:5,minHeight:0},children:[["Brisbane","7 Kerry Rd"],["Townsville","12 Enterprise"]].map(([e,o])=>O("div",{style:{position:"relative",padding:"4px 5px",display:"flex",flexDirection:"column",gap:2,minHeight:0},children:[p(W,{r:4,style:{...j,background:"none",border:`1px solid ${h.rule}`}}),p("b",{style:{position:"relative",fontSize:"4.31cqw",color:h.text},children:e}),p("span",{style:{position:"relative",fontSize:"3.32cqw",color:h.muted},children:o}),O("div",{style:{flex:1,minHeight:0,position:"relative"},children:[p(W,{r:3,style:{...j,...Fe(h.paper,h.paper2,150)}}),p(W,{w:"60%",h:"60%",r:8,style:{position:"absolute",left:"12%",top:"20%",background:h.mark1,opacity:.75}}),p(W,{w:6,h:6,r:3,style:{position:"absolute",left:"44%",top:"34%",background:h.rust}})]})]},e))})}),form:p(Te,{title:"Send us a message",children:O("div",{style:{flex:1,display:"flex",flexDirection:"column",gap:4,justifyContent:"center"},children:[O("div",{style:{display:"flex",gap:5},children:[p(Hf,{label:"Name"}),p(Hf,{label:"Email"})]}),p(Hf,{label:"Message",filled:!0}),p(O1,{children:"SEND"})]})}),appointmentbooking:p(Te,{title:"Book a fitting",children:O("div",{style:{flex:1,display:"flex",flexDirection:"column",gap:4,justifyContent:"center"},children:[p("div",{style:{display:"flex",gap:3},children:["Mon","Tue","Wed","Thu"].map((e,o)=>p("span",{style:{flex:1,textAlign:"center",fontSize:"3.32cqw",fontWeight:o===2?700:500,padding:"4px 0",borderRadius:3,background:o===2?h.text:h.paper,color:o===2?h.onInk:h.muted},children:e},e))}),p("div",{style:{display:"flex",gap:3},children:["8:00","10:30","13:00","15:30"].map((e,o)=>p("span",{style:{flex:1,textAlign:"center",fontSize:"3.32cqw",padding:"4px 0",borderRadius:3,border:`1px solid ${o===1?h.rust:h.rule}`,color:o===1?h.rust:h.muted,background:o===3?h.paper:h.card,textDecoration:o===3?"line-through":"none"},children:e},e))})]})}),reviewform:p(Te,{title:"Leave a review",children:O("div",{style:{flex:1,display:"flex",flexDirection:"column",gap:5,justifyContent:"center"},children:[p(dg,{filled:4,size:14}),p(Hf,{label:"Your review",filled:!0}),p(O1,{children:"POST"})]})}),submitbuild:p(Te,{title:"Show us your build",children:O("div",{style:{flex:1,display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",gap:3,border:`1px dashed ${h.mark1}`,borderRadius:5,background:h.paper},children:[p("span",{style:{fontSize:"6.63cqw",lineHeight:1,color:h.rust,fontWeight:300},children:"+"}),p("span",{style:{fontSize:"3.65cqw",color:h.muted},children:"Drop a photo of your rig"})]})}),masthead:O("div",{style:{...j,background:h.paper,display:"flex",flexDirection:"column",justifyContent:"center",padding:"0 13px",gap:5},children:[p("span",{style:{height:1.5,background:h.text}}),p("span",{style:{fontSize:"7.65cqw",fontWeight:800,letterSpacing:"0.02em",color:h.text,lineHeight:1},children:"THE TRACK"}),O("div",{style:{display:"flex",justifyContent:"space-between",fontSize:"3.65cqw",letterSpacing:"0.1em",textTransform:"uppercase",color:h.muted},children:[p("span",{children:"Issue 14"}),p("span",{children:"Spring 2026"})]}),p("span",{style:{height:1,background:h.rule}})]}),featuredcover:O("div",{style:{...j,overflow:"hidden",...Fe(h.ink,h.inkSoft2)},children:[p(Xt,{size:92,style:{right:-18,top:-14}}),p("div",{style:{position:"absolute",inset:0,background:`linear-gradient(0deg,${h.scrim},transparent 62%)`}}),O("div",{style:{position:"absolute",left:12,right:12,bottom:11,display:"flex",flexDirection:"column",gap:3},children:[p("span",{style:{fontSize:"3.65cqw",letterSpacing:"0.16em",fontWeight:700,color:h.warm},children:"FEATURE"}),p("span",{style:{fontSize:"6.16cqw",lineHeight:1.15,fontWeight:700,color:h.onInk},children:"Four days on the Madigan Line"})]})]}),longread:O("div",{style:{...j,background:h.card,padding:"10px 14px",display:"flex",flexDirection:"column",gap:4,justifyContent:"center"},children:[p("span",{style:{fontSize:"3.65cqw",letterSpacing:"0.14em",fontWeight:700,color:h.rust},children:"12 MIN READ"}),p("span",{style:{fontSize:"6.02cqw",lineHeight:1.15,fontWeight:700,color:h.text},children:"What breaks first, and why"}),p(po,{children:"Every failure starts in the same place \u2014 not the rim, not"}),p(po,{w:"62%",children:"the tyre, but the bolt nobody re-torqued."})]}),series:p(Te,{title:"Recurring columns",children:p("div",{style:{flex:1,display:"flex",flexDirection:"column",gap:5,justifyContent:"center"},children:[["Shed Notes","Monthly"],["Track Tested","Fortnightly"],["Reader Rigs","Weekly"]].map(([e,o])=>O("div",{style:{display:"flex",alignItems:"center",gap:6},children:[p("span",{style:{width:3,height:12,borderRadius:2,background:h.rust,flex:"none"}}),p("b",{style:{flex:1,fontSize:"4.64cqw",color:h.text},children:e}),p("span",{style:{fontSize:"3.65cqw",letterSpacing:"0.08em",textTransform:"uppercase",color:h.muted},children:o})]},e))})}),events:p(Te,{title:"Latest posts",children:p("div",{style:{flex:1,display:"flex",flexDirection:"column",gap:5,justifyContent:"center"},children:[[h.inkSoft,h.inkSoft2,"Madigan Line, four days"],[h.rust,h.warm,"Why offset beats width"]].map(([e,o,t])=>O("div",{style:{display:"flex",gap:6,alignItems:"center"},children:[p("span",{style:{width:24,height:18,borderRadius:3,flex:"none",...Fe(e,o,150)}}),O("div",{style:{display:"flex",flexDirection:"column",gap:1,minWidth:0},children:[p("b",{style:{fontSize:"4.31cqw",color:h.text},children:t}),p("span",{style:{fontSize:"3.65cqw",color:h.muted},children:"4 Sep \xB7 Shed Notes"})]})]},t))})}),docmasthead:O("div",{style:{...j,background:h.card,padding:"12px 14px",display:"flex",flexDirection:"column",gap:5,justifyContent:"center"},children:[p("span",{style:{fontSize:"3.65cqw",letterSpacing:"0.16em",fontWeight:700,color:h.muted},children:"POLICY"}),p("span",{style:{fontSize:"6.49cqw",fontWeight:700,color:h.text,lineHeight:1.1},children:"Returns & refunds"}),p("span",{style:{fontSize:"3.65cqw",color:h.muted},children:"Version 3 \xB7 Updated 4 Sep 2026"}),p("span",{style:{height:2,width:26,background:h.rust,borderRadius:1}})]}),docbody:p("div",{style:{...j,background:h.card,padding:"9px 13px",display:"flex",flexDirection:"column",gap:3,justifyContent:"center"},children:[["1.","You may return an unfitted wheel within 30 days."],["2.","Fitted wheels are covered by the structural warranty."],["3.","Freight on a change of mind is yours."]].map(([e,o])=>O("div",{style:{display:"flex",gap:5},children:[p("b",{style:{fontSize:"3.98cqw",color:h.rust,flex:"none"},children:e}),p(po,{children:o})]},e))}),docmetacards:p(Te,{title:"At a glance",children:p("div",{style:{flex:1,display:"grid",gridTemplateColumns:"repeat(2,1fr)",gap:5,minHeight:0},children:[["30 days","To return"],["5 years","Structural"],["Free","Fitting"],["48 hrs","Dispatch"]].map(([e,o])=>O("div",{style:{border:`1px solid ${h.rule}`,borderRadius:4,padding:"5px 6px",display:"flex",flexDirection:"column",gap:1},children:[p("b",{style:{fontSize:"5.31cqw",color:h.text,lineHeight:1},children:e}),p("span",{style:{fontSize:"3.32cqw",letterSpacing:"0.08em",textTransform:"uppercase",color:h.muted},children:o})]},o))})}),doctabs:O("div",{style:{...j,background:h.card,display:"flex",flexDirection:"column",justifyContent:"center",gap:0,padding:"0 11px"},children:[p("div",{style:{display:"flex",gap:0},children:["Returns","Warranty","Shipping"].map((e,o)=>p("span",{style:{fontSize:"3.98cqw",fontWeight:o===0?700:500,padding:"5px 8px",color:o===0?h.text:h.muted,background:o===0?h.paper:"transparent",borderRadius:"4px 4px 0 0",border:`1px solid ${o===0?h.rule:"transparent"}`,borderBottom:"none"},children:e},e))}),p("span",{style:{height:1,background:h.rule}}),O("div",{style:{paddingTop:6,display:"flex",flexDirection:"column",gap:2},children:[p(po,{children:"Unfitted wheels come back within 30 days, no questions."}),p(po,{w:"58%",children:"Freight on a change of mind is yours."})]})]}),paragraphs:O("div",{style:{...j,background:h.card,padding:"11px 14px",display:"flex",gap:10,alignItems:"center"},children:[p("span",{style:{flex:1,fontSize:"5.86cqw",lineHeight:1.2,fontWeight:700,color:h.text},children:"The right wheel is the boring one."}),O("div",{style:{flex:1,display:"flex",flexDirection:"column"},children:[p(po,{children:"Forged, correctly offset, rated for what you actually"}),p(po,{children:"carry. Everything else is a photograph."})]})]}),keyfeatures:p(Te,{title:"Key features",children:p("div",{style:{flex:1,display:"flex",flexDirection:"column",gap:4,justifyContent:"center"},children:["Flow-formed barrel","1250 kg per corner","Hub-centric fit"].map(e=>O("div",{style:{display:"flex",gap:6,alignItems:"center"},children:[p("span",{style:{fontSize:"4.64cqw",color:h.rust,fontWeight:700,lineHeight:1},children:"\u2713"}),p("span",{style:{fontSize:"4.31cqw",color:h.text},children:e})]},e))})}),statsparagraph:O("div",{style:{...j,background:h.paper,padding:"10px 12px",display:"flex",gap:10,alignItems:"center"},children:[O("div",{style:{flex:"none",display:"flex",flexDirection:"column",gap:5},children:[p(Ll,{n:"27k",label:"Rigs"}),p(Ll,{n:"4.9",label:"Rating"})]}),O("div",{style:{flex:1,display:"flex",flexDirection:"column"},children:[p(po,{children:"Twelve years of fitting the same three questions, and the"}),p(po,{children:"answer has not moved: load rating, offset, then looks."})]})]}),chart:O(Te,{title:"Load vs weight",children:[p("div",{style:{flex:1,display:"flex",alignItems:"flex-end",gap:5,paddingBottom:2},children:[38,62,84,71,96].map((e,o)=>p("span",{style:{flex:1,height:`${e}%`,borderRadius:"2px 2px 0 0",background:o===4?h.rust:h.mark1}},o))}),p("span",{style:{height:1,background:h.rule,marginTop:-4}})]}),mockup:p("div",{style:{...j,overflow:"hidden",display:"flex",alignItems:"center",justifyContent:"center",...Fe(h.inkSoft,h.ink)},children:O("div",{style:{width:"72%",height:"74%",borderRadius:4,overflow:"hidden",background:h.card,boxShadow:`0 6px 14px ${h.scrim}`},children:[p("div",{style:{height:9,background:h.paper,display:"flex",alignItems:"center",gap:2,padding:"0 4px"},children:[0,1,2].map(e=>p("span",{style:{width:2.5,height:2.5,borderRadius:"50%",background:h.mark1}},e))}),O("div",{style:{padding:5,display:"flex",flexDirection:"column",gap:3},children:[p("span",{style:{height:4,width:"56%",borderRadius:1,background:h.mark2}}),p("span",{style:{height:14,borderRadius:2,...Fe(h.paper,h.paper2,150)}}),p("span",{style:{height:3,width:"38%",borderRadius:1,background:h.rust}})]})]})}),manifesto:p("div",{style:{...j,overflow:"hidden",display:"flex",alignItems:"center",padding:"0 16px",...Fe(h.ink,h.ink2)},children:O("span",{style:{fontSize:"6.63cqw",lineHeight:1.2,fontWeight:700,color:h.onInk},children:["We build for the ",p("span",{style:{color:h.warm},children:"last"})," ten percent of the track."]})}),timeline:p(Te,{title:"Our story",children:p("div",{style:{flex:1,display:"flex",flexDirection:"column",justifyContent:"center",gap:6,paddingLeft:4},children:[["1998","One shed, one lathe."],["2009","First forged rim."],["2024","27,000 rigs on."]].map(([e,o],t)=>O("div",{style:{display:"flex",gap:7,alignItems:"flex-start",position:"relative"},children:[t<2&&p("span",{style:{position:"absolute",left:3,top:8,bottom:-8,width:1,background:h.rule}}),p("span",{style:{width:7,height:7,borderRadius:"50%",flex:"none",marginTop:1,background:h.rust,zIndex:1}}),O("div",{style:{display:"flex",flexDirection:"column",gap:0,minWidth:0},children:[p("b",{style:{fontSize:"4.64cqw",color:h.text},children:e}),p(po,{children:o})]})]},e))})}),timelinetrack:O("div",{style:{...j,padding:"0 12px",display:"flex",flexDirection:"column",gap:10,justifyContent:"center",...Fe(h.ink,h.inkSoft)},children:[p("span",{style:{fontSize:"3.98cqw",fontWeight:700,letterSpacing:"0.14em",textTransform:"uppercase",color:h.warm},children:"Milestones"}),O("div",{style:{position:"relative",display:"flex",justifyContent:"space-between",paddingTop:7},children:[p("span",{style:{position:"absolute",left:0,right:0,top:3,height:1,background:h.mark2,opacity:.55}}),["1998","2009","2016","2024"].map((e,o)=>O("div",{style:{display:"flex",flexDirection:"column",alignItems:"center",gap:3,position:"relative"},children:[p("span",{style:{position:"absolute",top:-7,width:6,height:6,borderRadius:"50%",background:o===3?h.warm:h.mark1}}),p("span",{style:{fontSize:"4.31cqw",fontWeight:700,color:o===3?h.warm:h.onInk,opacity:o===3?1:.75},children:e})]},e))]})]}),footprint:O("div",{style:{...j,overflow:"hidden",...Fe(h.paper,h.paper2,150)},children:[p("span",{style:{position:"absolute",left:"8%",top:"18%",width:"62%",height:"64%",borderRadius:"48% 52% 40% 60% / 55% 45% 55% 45%",background:h.mark1,opacity:.75}}),p("span",{style:{position:"absolute",left:"52%",top:"52%",width:"34%",height:"34%",borderRadius:"58% 42% 55% 45% / 45% 58% 42% 55%",background:h.mark2,opacity:.55}}),[["26%","38%"],["44%","58%"],["62%","34%"]].map(([e,o])=>p("span",{style:{position:"absolute",left:e,top:o,width:7,height:7,borderRadius:"50% 50% 50% 0",transform:"rotate(-45deg)",background:h.rust}},e)),p("span",{style:{position:"absolute",left:11,bottom:9,fontSize:"4.64cqw",fontWeight:700,color:h.text},children:"3 fitting bays"})]}),banner:O("div",{style:{...j,display:"flex",alignItems:"center",justifyContent:"space-between",padding:"0 13px",gap:8,background:h.rust},children:[O("div",{style:{display:"flex",flexDirection:"column",gap:2},children:[p("b",{style:{fontSize:"6.02cqw",color:h.onInk},children:"End of season \xB7 20% off"}),p("span",{style:{fontSize:"3.98cqw",color:h.onInk,opacity:.8},children:"Fitted free, this month only."})]}),p("span",{style:{fontSize:"3.65cqw",letterSpacing:"0.12em",fontWeight:700,padding:"5px 9px",borderRadius:2,background:h.onInk,color:h.text,flex:"none"},children:"SHOP"})]}),titlewithbuttons:O("div",{style:{...j,background:h.paper,display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",gap:7,padding:"0 14px",textAlign:"center"},children:[p("span",{style:{fontSize:"6.49cqw",lineHeight:1.15,fontWeight:700,color:h.text},children:"Not sure what fits?"}),O("div",{style:{display:"flex",gap:5},children:[p("span",{style:{fontSize:"3.65cqw",letterSpacing:"0.12em",fontWeight:700,padding:"5px 9px",borderRadius:2,background:h.text,color:h.onInk},children:"FIND MY FIT"}),p("span",{style:{fontSize:"3.65cqw",letterSpacing:"0.12em",fontWeight:700,padding:"5px 9px",borderRadius:2,border:`1px solid ${h.text}`,color:h.text},children:"CALL US"})]})]}),ticker:p("div",{style:{...j,overflow:"hidden",background:h.ink,display:"flex",alignItems:"center"},children:p("span",{style:{whiteSpace:"nowrap",fontSize:"6.29cqw",fontWeight:800,letterSpacing:"0.06em",color:h.warm,marginLeft:-14},children:"FREE FITTING \xB7 48HR DISPATCH \xB7 FREE FITTING \xB7 48HR DISPATCH"})}),countdown:O("div",{style:{...j,padding:"10px 12px",display:"flex",flexDirection:"column",alignItems:"center",gap:6,justifyContent:"center",...Fe(h.ink,h.ink2)},children:[p("span",{style:{fontSize:"3.65cqw",fontWeight:700,letterSpacing:"0.16em",textTransform:"uppercase",color:h.muted},children:"Back online in"}),p("div",{style:{display:"flex",alignItems:"flex-start",gap:5},children:[["23","Hours"],["59","Minutes"],["48","Seconds"]].map(([e,o],t)=>O("div",{style:{display:"flex",alignItems:"flex-start",gap:5},children:[t>0&&p("b",{style:{fontSize:"9.5cqw",lineHeight:1,color:h.warm},children:":"}),O("div",{style:{display:"flex",flexDirection:"column",alignItems:"center",gap:2},children:[p("b",{style:{fontSize:"11.5cqw",lineHeight:1,color:h.onInk,fontVariantNumeric:"tabular-nums"},children:e}),p("span",{style:{fontSize:"3.2cqw",letterSpacing:"0.1em",textTransform:"uppercase",opacity:.62,color:h.onInk},children:o})]})]},o))})]}),breadcrumb:p("div",{style:{...j,background:h.card,display:"flex",alignItems:"center",padding:"0 13px"},children:O("span",{style:{fontSize:"4.64cqw",color:h.muted},children:["Home ",p("span",{style:{opacity:.5},children:"/"})," Wheels ",p("span",{style:{opacity:.5},children:"/"})," ",p("span",{style:{color:h.text,fontWeight:700},children:"20 inch"})]})}),categorybar:O("div",{style:{...j,background:h.card,display:"flex",flexDirection:"column",justifyContent:"center",gap:7,padding:"0 11px"},children:[p("div",{style:{display:"flex",gap:5},children:["All","Wheels","Tyres","Lift"].map((e,o)=>p("span",{style:{fontSize:"3.98cqw",fontWeight:o===0?700:500,padding:"4px 7px",borderRadius:99,background:o===0?h.text:h.paper,color:o===0?h.onInk:h.muted},children:e},e))}),p("span",{style:{height:1,background:h.rule}})]}),intro:O("div",{style:{...j,overflow:"hidden",background:h.card},children:[p("div",{style:{position:"absolute",inset:0,...Fe(h.ink,h.inkSoft2)}}),p(Xt,{size:64,style:{right:8,top:6}}),O("div",{style:{position:"absolute",left:16,right:16,bottom:8,top:"46%",background:h.paper,borderRadius:6,padding:"8px 11px",display:"flex",flexDirection:"column",gap:2,boxShadow:`0 -4px 10px ${h.scrim}`},children:[p("span",{style:{fontSize:"5.69cqw",fontWeight:700,color:h.text},children:"Since 1998"}),p(po,{children:"One shed, one lathe, one idea."}),p(po,{w:"66%",children:"It turned out to be right."})]})]}),gallerygrid:p(Te,{title:"From our customers",children:p("div",{style:{flex:1,display:"grid",gridTemplateColumns:"repeat(3,1fr)",gridTemplateRows:"repeat(2,1fr)",gap:4,minHeight:0},children:[[h.rust,h.warm],[h.inkSoft,h.ink],[h.paper2,h.mark2],[h.ink,h.inkSoft2],[h.warm,h.paper2],[h.mark2,h.inkSoft]].map(([e,o],t)=>p("div",{style:{borderRadius:3,...Fe(e,o,140+t*22)}},t))})}),gallery:O(Te,{title:"Gallery",children:[p("div",{style:{display:"flex",gap:8,alignItems:"center",marginTop:-2},children:["On the truck","Studio","Close-ups"].map((e,o)=>p("span",{style:{fontSize:"3.98cqw",fontWeight:o===0?700:500,color:o===0?h.text:h.muted,borderBottom:`1.5px solid ${o===0?h.rust:"transparent"}`,paddingBottom:2},children:e},e))}),p("div",{style:{flex:1,display:"grid",gridTemplateColumns:"repeat(3,1fr)",gap:4,minHeight:0},children:[[h.rust,h.warm],[h.ink,h.inkSoft],[h.paper2,h.mark2]].map(([e,o],t)=>p("div",{style:{borderRadius:3,...Fe(e,o,150+t*20)}},t))})]}),ordersummary:O(Te,{title:"Order summary",children:[O("div",{style:{display:"flex",gap:6,alignItems:"center",paddingBottom:4},children:[p("span",{style:{width:26,height:26,borderRadius:4,position:"relative",overflow:"hidden",flex:"none",...Fe(h.paper,h.paper2,150)},children:p(Xt,{size:18,style:{left:"50%",top:"50%",transform:"translate(-50%,-50%)"}})}),O("div",{style:{display:"flex",flexDirection:"column",gap:1,minWidth:0},children:[p("b",{style:{fontSize:"4.31cqw",color:h.text},children:"Ridge Grappler"}),p("span",{style:{fontSize:"3.65cqw",color:h.muted},children:"20\xD79 +12 \xB7 qty 4"})]})]}),O("div",{style:{flex:1,minHeight:0,display:"flex",flexDirection:"column",justifyContent:"center"},children:[p(Yt,{k:"Subtotal",v:"$1,956"}),p(Yt,{k:"Fitting",v:"Free"}),O("div",{style:{display:"flex",justifyContent:"space-between",paddingTop:5,fontSize:"4.64cqw"},children:[p("b",{style:{color:h.text},children:"Total"}),p("b",{style:{color:h.text,fontSize:"6.02cqw"},children:"$1,956"})]})]})]}),deliveryoptions:p(Te,{title:"Delivery",children:p("div",{style:{flex:1,display:"flex",flexDirection:"column",gap:4,justifyContent:"center"},children:[["Standard","3\u20135 days","Free",!0],["Express","Next day","$19",!1]].map(([e,o,t,r])=>O("div",{style:{display:"flex",alignItems:"center",gap:6,padding:"5px 6px",borderRadius:4,border:`1px solid ${r?h.rust:h.rule}`,background:r?h.paper:h.card},children:[p("span",{style:{width:7,height:7,borderRadius:"50%",flex:"none",border:`1.5px solid ${r?h.rust:h.mark1}`,background:r?h.rust:"transparent"}}),p("span",{style:{flex:1,fontSize:"4.31cqw",fontWeight:600,color:h.text},children:e}),p("span",{style:{fontSize:"3.98cqw",color:h.muted},children:o}),p("b",{style:{fontSize:"4.31cqw",color:h.text},children:t})]},e))})}),paymentbadges:O("div",{style:{...j,background:h.paper,display:"flex",flexDirection:"column",gap:8,justifyContent:"center",padding:"0 12px"},children:[p(Wf,{children:"Ways to pay"}),p("div",{style:{display:"flex",gap:5},children:[["VISA",h.ink],["MC",h.rust],["AMEX",h.inkSoft],["PayPal",h.ink2]].map(([e,o])=>p("span",{style:{flex:1,textAlign:"center",fontSize:"3.65cqw",fontWeight:800,letterSpacing:"0.06em",color:h.onInk,borderRadius:3,padding:"6px 0",background:o},children:e},e))})]}),stats:O("div",{style:{...j,padding:"10px 12px",display:"flex",flexDirection:"column",gap:9,justifyContent:"center",...Fe(h.ink,h.ink2)},children:[p("span",{style:{fontSize:"3.98cqw",fontWeight:700,letterSpacing:"0.14em",textTransform:"uppercase",color:h.warm},children:"By the numbers"}),O("div",{style:{display:"flex",gap:8},children:[p(Ll,{n:"27k",label:"Rigs fitted",tone:h.onInk}),p(Ll,{n:"12",label:"Years",tone:h.onInk}),p(Ll,{n:"4.9",label:"Avg rating",tone:h.warm})]})]}),testimonials:O("div",{style:{...j,overflow:"hidden",background:h.paper,padding:"10px 11px",display:"flex",flexDirection:"column",gap:6,justifyContent:"center"},children:[p("span",{style:{position:"absolute",right:10,top:2,fontSize:"22.4cqw",lineHeight:1,fontWeight:800,color:h.rust,opacity:.16},children:"\u201D"}),p(dg,{filled:5,size:7}),p("span",{style:{position:"relative",fontSize:"5.31cqw",lineHeight:1.35,color:h.text,fontWeight:600},children:"\u201CTook them out to the Simpson and back. Not one chip.\u201D"}),O("div",{style:{display:"flex",alignItems:"center",gap:5},children:[p(E1,{}),p("span",{style:{fontSize:"3.98cqw",color:h.muted},children:"Dave M. \xB7 Hilux N80"})]})]}),reviews:O(Te,{title:"Reviews",children:[p("div",{style:{display:"flex",gap:4,height:22},children:[[h.inkSoft,h.inkSoft2],[h.rust,h.warm],[h.ink,h.inkSoft],[h.mark2,h.mark1]].map(([e,o],t)=>p("div",{style:{flex:1,borderRadius:3,...Fe(e,o,140+t*15)}},t))}),p("div",{style:{flex:1,display:"flex",flexDirection:"column",gap:5,justifyContent:"center"},children:[["Dave M.",5,"Not one chip after the Simpson."],["Sara K.",4,"Fitted in an hour, no fuss."]].map(([e,o,t])=>O("div",{style:{display:"flex",gap:5,alignItems:"flex-start"},children:[p(E1,{size:12}),O("div",{style:{display:"flex",flexDirection:"column",gap:1,minWidth:0},children:[O("div",{style:{display:"flex",gap:4,alignItems:"center"},children:[p("b",{style:{fontSize:"3.98cqw",color:h.text},children:e}),p(dg,{filled:o})]}),p(po,{children:t})]})]},e))})]}),logos:O("div",{style:{...j,display:"flex",flexDirection:"column",gap:9,justifyContent:"center",padding:"0 12px",...Fe(h.ink,h.inkSoft)},children:[p("span",{style:{fontSize:"3.98cqw",fontWeight:700,letterSpacing:"0.14em",textTransform:"uppercase",color:h.warm},children:"As fitted by"}),p("div",{style:{display:"grid",gridTemplateColumns:"repeat(4,1fr)",gap:8},children:["ARB","TJM","IRONMAN","OPPOSITE"].map(e=>p("span",{style:{textAlign:"center",fontSize:"4.31cqw",fontWeight:800,letterSpacing:"0.08em",color:h.onInk,opacity:.82},children:e},e))})]}),prose:O("div",{style:{...j,background:h.paper,padding:"11px 14px",display:"flex",flexDirection:"column",gap:4,justifyContent:"center"},children:[p("span",{style:{fontSize:"5.86cqw",fontWeight:700,color:h.text},children:"Why offset matters"}),O("div",{style:{display:"flex",gap:6},children:[p("span",{style:{fontSize:"15.3cqw",lineHeight:.78,fontWeight:800,color:h.rust,marginTop:1},children:"T"}),O("div",{style:{display:"flex",flexDirection:"column"},children:[p(po,{children:"he number on the back of your wheel decides whether the"}),p(po,{w:"76%",children:"tyre sits under the guard or an inch outside it."})]})]})]}),cards:p(Te,{title:"What you get",children:p("div",{style:{flex:1,display:"grid",gridTemplateColumns:"repeat(3,1fr)",gap:5,minHeight:0},children:[["Fitted free","In store, same day."],["5 yr cover","Structural, no fine print."],["Swap it","30 days, any reason."]].map(([e,o])=>O("div",{style:{border:`1px solid ${h.rule}`,borderRadius:4,padding:6,display:"flex",flexDirection:"column",gap:2},children:[p("span",{style:{width:11,height:11,borderRadius:3,background:h.rust,opacity:.9}}),p("b",{style:{fontSize:"3.98cqw",color:h.text},children:e}),p(po,{children:o})]},e))})}),faq:p(Te,{title:"Questions",children:p("div",{style:{flex:1,display:"flex",flexDirection:"column",justifyContent:"center"},children:[["Will these fit my Hilux?",!0],["Do you fit them for me?",!1],["What if I pick wrong?",!1]].map(([e,o])=>O("div",{style:{borderBottom:`1px solid ${h.rule}`,padding:"4px 2px"},children:[O("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",gap:6},children:[p("b",{style:{fontSize:"4.31cqw",color:h.text},children:e}),p("span",{style:{fontSize:"4.64cqw",color:h.muted,lineHeight:1},children:o?"\u2212":"+"})]}),o&&p(po,{w:"90%",children:"Use the fitment finder \u2014 it reads your build, not just the model."})]},e))})}),hero:O("div",{style:{...j,overflow:"hidden",...Fe(h.ink,h.ink2)},children:[p("div",{style:{...j,background:`linear-gradient(90deg,${h.scrim},transparent 70%)`}}),p("div",{style:{position:"relative",height:"100%",display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"flex-start",padding:"12px 14px",gap:5},children:p(P1,{over:"NEW \xB7 SUMMER",overTone:h.warm,head:"Built for the worst road you own",cta:"SHOP ALL",ctaBg:h.warm,ctaFg:h.ink,tone:h.onInk})}),p(Xt,{size:104,style:{right:-24,bottom:-30}})]}),herosingle:O("div",{style:{...j,display:"flex",background:h.paper,overflow:"hidden"},children:[p("div",{style:{flex:1,padding:12,display:"flex",flexDirection:"column",gap:5,justifyContent:"center"},children:p(P1,{over:"ALL-TERRAIN",overTone:h.rust,head:"Grip that does not ask",headSize:12,cta:"EXPLORE",ctaBg:h.text,ctaFg:h.onInk,tone:h.text})}),p("div",{style:{flex:1,position:"relative",...Fe(h.inkSoft,h.inkSoft2)},children:p(Xt,{size:74,style:{right:-14,top:16}})})]}),productgrid:p(Te,{title:"Best sellers",children:O("div",{style:{flex:1,display:"grid",gridTemplateColumns:"repeat(3,1fr)",gap:5,minHeight:0},children:[p(cg,{name:"Ridge 19",price:"$365"}),p(cg,{name:"Ridge 29",price:"$410"}),p(cg,{name:"Ridge 39",price:"$455"})]})}),collections:p(Te,{title:"Shop by category",children:p("div",{style:{flex:1,display:"grid",gridTemplateColumns:"repeat(3,1fr)",gap:5,minHeight:0},children:[["Wheels",h.inkSoft,h.inkSoft2],["Tyres",h.rust,h.warm],["Lift kits",h.ink,h.inkSoft]].map(([e,o,t])=>p("div",{style:{borderRadius:4,display:"flex",alignItems:"flex-end",padding:5,color:h.onInk,...Fe(o,t)},children:p("span",{style:{fontSize:"3.98cqw",fontWeight:700,letterSpacing:"0.04em"},children:e})},e))})}),producthero:O("div",{style:{...j,display:"flex",background:h.card,overflow:"hidden"},children:[p("div",{style:{flex:1.1,position:"relative",...Fe(h.paper,h.paper2,150)},children:p(Xt,{size:78,style:{left:"50%",top:"50%",transform:"translate(-50%,-50%)"}})}),O("div",{style:{flex:1,padding:"10px 10px 10px 8px",display:"flex",flexDirection:"column",gap:4,justifyContent:"center"},children:[p("span",{style:{fontSize:"3.65cqw",letterSpacing:"0.16em",fontWeight:700,color:h.rust},children:"NITTO"}),p("b",{style:{fontSize:"6.29cqw",color:h.text},children:"Ridge Grappler"}),p("span",{style:{fontSize:"6.63cqw",fontWeight:700,color:h.text},children:"$489"}),p("span",{style:{alignSelf:"flex-start",fontSize:"3.65cqw",letterSpacing:"0.12em",fontWeight:700,padding:"4px 8px",borderRadius:2,background:h.text,color:h.onInk},children:"ADD TO CART"})]})]}),spectable:p(Te,{title:"Specifications",children:O("div",{style:{flex:1,display:"flex",flexDirection:"column",justifyContent:"center"},children:[p(Yt,{k:"Diameter",v:'20"'}),p(Yt,{k:"Width",v:"9.0J"}),p(Yt,{k:"Offset",v:"+12"}),p(Yt,{k:"Load",v:"1250 kg"})]})}),fitmenttable:p(Te,{title:"Will it fit?",children:O("div",{style:{flex:1,display:"flex",flexDirection:"column",justifyContent:"center"},children:[p(Yt,{k:"Hilux N80",v:"20\xD79 +12",ok:!0}),p(Yt,{k:"Ranger PX3",v:"20\xD79 +12",ok:!0}),p(Yt,{k:"LC79",v:"17\xD78 \u221210",ok:!0})]})}),processsteps:O("div",{style:{...j,background:h.paper,padding:10,display:"flex",flexDirection:"column",gap:7,justifyContent:"center"},children:[p(Wf,{children:"How it works"}),p("div",{style:{display:"flex",gap:6},children:["Pick your rig","Match the fit","We fit it"].map((e,o)=>O("div",{style:{flex:1,display:"flex",flexDirection:"column",gap:2},children:[p("span",{style:{width:11,height:11,borderRadius:"50%",background:h.text,color:h.onInk,fontSize:"3.98cqw",display:"flex",alignItems:"center",justifyContent:"center",fontWeight:700},children:o+1}),p("span",{style:{fontSize:"3.98cqw",color:h.text,fontWeight:600},children:e})]},e))})]}),detailrows:p("div",{style:{...j,background:h.card,display:"flex",flexDirection:"column",overflow:"hidden"},children:[["Forged, not cast","Half the weight, twice the road.",!1],["Fits your load","Rated to 1250 kg a corner.",!0]].map(([e,o,t])=>{let r=p("div",{style:{flex:1,...Fe(t?h.rust:h.inkSoft,t?h.warm:h.inkSoft2)}},"art"),a=O("div",{style:{flex:1.1,padding:8,display:"flex",flexDirection:"column",gap:2,justifyContent:"center"},children:[p("b",{style:{fontSize:"4.64cqw",color:h.text},children:e}),p("span",{style:{fontSize:"3.98cqw",color:h.muted,lineHeight:1.3},children:o})]},"tx");return p("div",{style:{flex:1,display:"flex",minHeight:0},children:t?[a,r]:[r,a]},e)})}),specstrip:p("div",{style:{...j,background:h.ink,color:h.onInk,display:"flex",alignItems:"center",justifyContent:"space-around",padding:"0 8px"},children:[["5 yr","Warranty"],["Free","Fitting"],["48 hr","Dispatch"]].map(([e,o])=>O("div",{style:{display:"flex",flexDirection:"column",alignItems:"center",gap:1},children:[p("b",{style:{fontSize:"5.69cqw",letterSpacing:"0.02em"},children:e}),p("span",{style:{fontSize:"3.65cqw",color:h.mark2,letterSpacing:"0.1em",textTransform:"uppercase"},children:o})]},o))})},_1={subscribe:O("div",{style:{...j,padding:13,display:"flex",flexDirection:"column"},children:[O("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",marginBottom:8},children:[O("div",{style:{display:"flex",alignItems:"center",gap:6},children:[p(W,{w:8,h:8,r:2,tone:"accent"}),p(W,{w:38,h:7,r:3,tone:"dark"}),p(W,{w:16,h:7,r:3,tone:"accent"})]}),p(W,{w:38,h:4,r:2,tone:"soft"})]}),p("div",{style:{height:1,background:Qe.line,marginBottom:10}}),O("div",{style:{flex:1,display:"flex",gap:10,border:`1px solid ${Qe.line}`,borderRadius:7,padding:10},children:[O("div",{style:{flex:1.1,display:"flex",flexDirection:"column",justifyContent:"center",gap:5},children:[p(W,{w:"46%",h:3,r:2,tone:"accent"}),p(W,{w:"84%",h:8,r:4,tone:"dark"}),p(W,{w:"56%",h:8,r:4,tone:"accent"}),p(W,{w:"96%",h:3,r:2,tone:"soft",style:{marginTop:2}}),O("div",{style:{display:"flex",gap:5,marginTop:4},children:[p("div",{style:{flex:1,height:13,borderRadius:5,border:`1px solid ${Qe.line}`,background:Qe.block}}),p(W,{w:34,h:13,r:5,tone:"accent"})]})]}),O("div",{style:{flex:1,background:Qe.block,borderRadius:6,padding:8,display:"flex",flexDirection:"column",gap:6},children:[p(W,{w:"52%",h:4,r:2,tone:"accent"}),Array.from({length:3}).map((e,o)=>O("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",gap:6,borderTop:o?`1px solid ${Qe.line}`:"none",paddingTop:o?4:0},children:[p(W,{w:34,h:4,r:2,tone:"dark"}),p(W,{w:16,h:3,r:2,tone:"soft"})]},o))]})]})]}),split:O("div",{style:{...j,display:"flex"},children:[p("div",{style:{width:"44%",background:ig}}),O("div",{style:{flex:1,padding:15,display:"flex",flexDirection:"column",justifyContent:"center",gap:7},children:[p(W,{w:"44%",h:5,r:3,tone:"accent"}),p(W,{w:"88%",h:8,r:4,tone:"dark"}),p(W,{w:"70%",h:8,r:4,tone:"dark"}),p(W,{w:"94%",h:5,r:2,tone:"soft",style:{marginTop:2}}),p(W,{w:"80%",h:5,r:2,tone:"soft"}),p(W,{w:"40%",h:13,r:6,tone:"accent",style:{marginTop:5}})]})]}),sectionheader:O(R1,{children:[p(W,{w:"18%",h:6,r:3,tone:"accent",style:{position:"absolute",top:15,right:16}}),O("div",{style:{...j,padding:16,display:"flex",flexDirection:"column",justifyContent:"center",gap:10},children:[O("div",{style:{display:"flex",alignItems:"center",gap:9},children:[p(W,{w:16,h:16,r:4,tone:"accent"}),p(W,{w:"20%",h:9,r:4,tone:"dark"})]}),p(W,{w:"62%",h:10,r:5,tone:"dark"}),p(W,{w:"42%",h:6,r:3,tone:"soft"})]})]}),header:p("div",{style:{...j,padding:14,display:"flex",flexDirection:"column",justifyContent:"center"},children:O("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between"},children:[p(W,{w:"22%",h:12,r:4,tone:"dark"}),O("div",{style:{display:"flex",gap:9,alignItems:"center"},children:[p(W,{w:26,h:6,r:3,tone:"soft"}),p(W,{w:26,h:6,r:3,tone:"soft"}),p(W,{w:26,h:6,r:3,tone:"soft"}),p(W,{w:18,h:14,r:5,tone:"accent"})]})]})}),footer:O("div",{style:{...j,padding:15,display:"flex",flexDirection:"column",justifyContent:"center",gap:12},children:[O("div",{style:{display:"flex",gap:14},children:[O("div",{style:{flex:1.4,display:"flex",flexDirection:"column",gap:6},children:[p(W,{w:"60%",h:9,r:4,tone:"dark"}),p(W,{w:"90%",h:5,r:2,tone:"soft"}),p(W,{w:"70%",h:5,r:2,tone:"soft"})]}),[0,1].map(e=>O("div",{style:{flex:1,display:"flex",flexDirection:"column",gap:6},children:[p(W,{w:"50%",h:6,r:3,tone:"dark"}),p(W,{w:"80%",h:5,r:2,tone:"soft"}),p(W,{w:"66%",h:5,r:2,tone:"soft"})]},e))]}),p("div",{style:{height:1,background:Qe.line}}),O("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center"},children:[p(W,{w:"30%",h:5,r:2,tone:"soft"}),p(W,{w:"16%",h:5,r:2,tone:"soft"})]})]}),grid:p("div",{style:{...j,padding:14,display:"grid",gridTemplateColumns:"1fr 1fr",gridTemplateRows:"1fr 1fr",gap:9},children:Array.from({length:4}).map((e,o)=>p("div",{style:{borderRadius:6,background:Qe.block}},o))}),blanksection:p("div",{style:{...j,padding:14,display:"flex"},children:O("div",{style:{flex:1,border:`1px dashed ${Qe.line}`,borderRadius:7,display:"flex",alignItems:"center",justifyContent:"center",position:"relative"},children:[p(W,{w:14,h:2,r:1,tone:"tint"}),p(W,{w:2,h:14,r:1,tone:"tint",style:{position:"absolute"}})]})}),spacer:O("div",{style:{...j,padding:14,display:"flex",flexDirection:"column",justifyContent:"space-between"},children:[p(W,{w:"100%",h:6,r:3,tone:"soft"}),p(W,{w:16,h:22,r:3,tone:"block",style:{alignSelf:"center"}}),p(W,{w:"100%",h:6,r:3,tone:"soft"})]}),divider:p("div",{style:{...j,padding:14,display:"flex",alignItems:"center"},children:p(W,{w:"100%",h:3,r:2,tone:"dark"})}),customhtml:O("div",{style:{...j,display:"flex",alignItems:"center",justifyContent:"center",gap:8,background:ig},children:[p(W,{w:5,h:16,r:2,tone:"dark",style:{transform:"skewX(-14deg)"}}),p(W,{w:16,h:10,r:3,tone:"accent"}),p(W,{w:5,h:16,r:2,tone:"dark",style:{transform:"skewX(14deg)"}})]}),heading:p("div",{style:{...j,padding:14,display:"flex",alignItems:"center"},children:p(W,{w:"64%",h:13,r:4,tone:"dark"})}),text:O("div",{style:{...j,padding:16,display:"flex",flexDirection:"column",justifyContent:"center",gap:7},children:[p(W,{w:"100%",h:6,r:3,tone:"soft"}),p(W,{w:"96%",h:6,r:3,tone:"soft"}),p(W,{w:"100%",h:6,r:3,tone:"soft"}),p(W,{w:"58%",h:6,r:3,tone:"soft"})]}),image:p("div",{style:{position:"absolute",inset:14,borderRadius:7,background:ig}}),button:p("div",{style:{...j,display:"flex",alignItems:"center",justifyContent:"center"},children:p(W,{w:"34%",h:16,r:8,tone:"accent"})}),menu:O("div",{style:{...j,padding:"14px 22%",display:"flex",flexDirection:"column",justifyContent:"center",gap:7},children:[p(W,{w:"48%",h:7,r:3,tone:"dark"}),p(W,{w:"82%",h:5,r:2,tone:"soft"}),p(W,{w:"66%",h:5,r:2,tone:"soft"}),p(W,{w:"74%",h:5,r:2,tone:"soft"}),p(W,{w:"58%",h:5,r:2,tone:"soft"})]}),emailform:O("div",{style:{...j,padding:16,display:"flex",flexDirection:"column",justifyContent:"center",gap:9},children:[p(W,{w:"56%",h:8,r:3,tone:"dark"}),O("div",{style:{display:"flex",gap:6},children:[p("div",{style:{flex:1,height:16,borderRadius:5,border:`1px solid ${Qe.line}`}}),p(W,{w:"30%",h:16,r:5,tone:"accent"})]})]}),sociallogos:p("div",{style:{...j,display:"flex",alignItems:"center",justifyContent:"center",gap:9},children:[0,1,2,3].map(e=>p(W,{w:16,h:16,r:8,tone:"dark"},e))}),paymentlogos:O("div",{style:{...j,display:"flex",alignItems:"center",justifyContent:"center",gap:7},children:[p(W,{w:22,h:6,r:2,tone:"soft"}),[0,1,2,3].map(e=>p(W,{w:20,h:13,r:3,tone:"dark"},e))]}),search:p("div",{style:{...j,padding:"0 18%",display:"flex",alignItems:"center"},children:O("div",{style:{flex:1,height:22,borderRadius:11,border:`1px solid ${Qe.line}`,display:"flex",alignItems:"center",gap:7,padding:"0 9px"},children:[p("div",{style:{width:9,height:9,borderRadius:5,border:`2px solid ${Qe.dark}`}}),p(W,{w:"46%",h:5,r:2,tone:"soft"})]})}),cart:O("div",{style:{...j,display:"flex",alignItems:"center",justifyContent:"center",gap:7},children:[p("div",{style:{width:22,height:18,borderRadius:"3px 3px 6px 6px",border:`2px solid ${Qe.dark}`}}),p("div",{style:{padding:"2px 6px",borderRadius:6,border:`1.5px solid ${Qe.dark}`},children:p(W,{w:7,h:7,r:2,tone:"dark"})})]}),countryswitch:O("div",{style:{...j,padding:14,display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",gap:5},children:[O("div",{style:{display:"flex",alignItems:"center",gap:6,padding:"4px 8px",border:`1px solid ${Qe.line}`},children:[p(W,{w:22,h:6,r:2,tone:"dark"}),p(W,{w:6,h:4,r:1,tone:"soft"})]}),O("div",{style:{width:"46%",display:"flex",flexDirection:"column",gap:4,padding:6,border:`1px solid ${Qe.line}`},children:[p(W,{w:"80%",h:4,r:2,tone:"accent"}),p(W,{w:"64%",h:4,r:2,tone:"soft"}),p(W,{w:"72%",h:4,r:2,tone:"soft"})]})]}),legalline:O("div",{style:{...j,padding:16,display:"flex",flexDirection:"column",justifyContent:"center",gap:9},children:[p("div",{style:{height:1,background:Qe.line}}),O("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center"},children:[p(W,{w:"38%",h:5,r:2,tone:"soft"}),O("div",{style:{display:"flex",gap:5},children:[p(W,{w:14,h:5,r:2,tone:"soft"}),p(W,{w:14,h:5,r:2,tone:"soft"}),p(W,{w:14,h:5,r:2,tone:"soft"})]})]})]}),fallback:p("div",{style:{position:"absolute",inset:14,borderRadius:8,background:Qe.block}})};function A1({type:e}){let o=_Y[e]??"",t=RY[o]??_1[o]??_1.fallback;return p("div",{className:"sf-thumb","aria-hidden":"true",style:{position:"absolute",inset:0,background:"var(--sf-thumb-thumb-bg)",pointerEvents:"none",containerType:"inline-size"},children:t})}import{useScreenDocument as Nu}from"efficient-easel/screen/components/ScreenDocumentContext";import{jsx as Un,jsxs as AY}from"react/jsx-runtime";import FY from"efficient-easel/screen/components/SidePanelHead";import{StylesIcon as LY}from"efficient-easel/rail";import{Tooltip as BY}from"efficient-shell/ui";function F1({tokenRef:e,siteId:o,onClose:t,onNotify:r,tab:a,onTabChange:n,revealPageGroup:s,onPageGroupRevealed:l}){let c=On();return AY("div",{className:"sf-styles",children:[Un(FY,{icon:Un(LY,{}),title:i("Styles"),context:Un(BY,{content:i("{name} \u2014 renamed in the Console: {place}.",{name:c,place:i("Storefront \u25B8 Sites \u25B8 Settings")}),className:"sf-name-tip",children:Un("span",{className:"sf-name-text",children:c})})}),Un("div",{className:"sf-insp-body es-insp-body sf-scroll",children:Un(Md,{tokenRef:e,siteId:o,onNotify:r,tab:a,onTabChange:n,revealPageGroup:s,onPageGroupRevealed:l})})]})}import{jsx as ao,jsxs as ka,Fragment as GY}from"react/jsx-runtime";import{Fragment as q1,useEffect as V1,useRef as xg}from"react";import{useTreeDrag as Y1}from"efficient-easel/drag";import{GlobeIcon as $Y,ImageIcon as UY,LocationIcon as jY,MapIcon as KY,TextLinesIcon as qY,TrashIcon as X1}from"efficient-easel/icons";import{Subtree as Z1,TreeRow as Nl,TreeRowAction as J1,TreeSeam as Q1}from"efficient-easel/tree";import{useEaselStrings as VY}from"efficient-easel/strings";import{createPreviewSelectionContext as DY}from"efficient-easel/draw/client";var{Provider:HOe,useSelection:L1}=DY("selectedLocationPartId");function B1(e,o,t){return`${e}::${o}::${t}`}function D1(e){if(!e)return null;let o=e.split("::");if(o.length<3)return null;let t=o[o.length-1];if(t!=="image"&&t!=="map"&&t!=="city")return null;let r=Number(o[o.length-2]);if(!Number.isInteger(r)||r<0)return null;let a=o.slice(0,-2).join("::");return a?{nodeId:a,index:r,part:t}:null}import{isSelectionMode as YY}from"efficient-easel/screen/lib/screen-parts";import{useSyncExternalStore as NY}from"react";var MY={level:"groups"},M1=MY,fg=new Set;function ht(e){M1=e;for(let o of fg)o()}function HY(e){return fg.add(e),()=>{fg.delete(e)}}var N1=()=>M1;function H1(){return NY(HY,N1,N1)}function zf(e,o,t){let r=[];return e.forEach((a,n)=>{let s=o(a),l=r.find(c=>c.key===s);l||(l={key:s,name:t(a),items:[]},r.push(l)),l.items.push({item:a,index:n})}),r}function $Oe(e){return WY[Bl(e)]}var WY={1:"grid-cols-1",2:"grid-cols-2",3:"grid-cols-3",4:"grid-cols-4"};function Bl(e){if(e<=1)return 1;if(e<=4)return e;let o=t=>e%t||t;return o(4)>=o(3)?4:3}var Dl=e=>String(e?.group??""),ug=new WeakMap,zY=0;function Gf(e){let o=ug.get(e);return o||(o=`loc${++zY}`,ug.set(e,o)),o}var W1=(e,o)=>o||e||"Ungrouped",z1={photo:"",group:"",groupName:"",name:"City name",state:"State",country:"Country",timezone:"GMT \xB7 UTC +0",address:`Address line one
|
|
41
|
+
Address line two`,phone:"+00 000 0000",hours:"Mon\u2013Fri 9:00\u201318:00",lat:0,lng:0,mapsUrl:""};function va(e){return zf(e,Dl,o=>String(o?.groupName??"")).map(o=>({key:o.key,name:o.name,cards:o.items.map(t=>t.item)}))}var pg=e=>e.flatMap(o=>o.cards),G1=(e,o,t)=>Math.min(Math.max(e,o),t);function $f(e,o,t){let r=0;for(let a=0;a<e.length;a++)if(Dl(e[a])===o){if(r===t)return a;r++}return-1}function mg(e,o,t){let r=va(e);if(o<0||o>=r.length)return e;let[a]=r.splice(o,1),n=G1(o<t?t-1:t,0,r.length);return r.splice(n,0,a),pg(r)}function hg(e,o,t,r,a){let n=va(e),s=n.find(m=>m.key===o),l=n.find(m=>m.key===r);if(!s||!l||t<0||t>=s.cards.length)return e;let[c]=s.cards.splice(t,1),d=o===r?c:{...c,group:l.key,groupName:l.name};d!==c&&ug.set(d,Gf(c));let f=G1(s===l&&t<a?a-1:a,0,l.cards.length);return l.cards.splice(f,0,d),pg(n)}function $1(e,o){let t=va(e),r=t.find(n=>n.key===o),a={...z1,group:o,groupName:r?.name??""};return r?(r.cards.push(a),pg(t)):[...e,a]}function U1(e){let o=new Set(va(e).map(a=>a.key)),t=o.size+1,r=`Group ${t}`;for(;o.has(r);)r=`Group ${++t}`;return{cards:[...e,{...z1,group:r,groupName:""}],key:r}}function j1(e,o){return e.filter(t=>Dl(t)!==o)}function K1(e,o,t){let r=$f(e,o,t);return r<0?e:e.filter((a,n)=>n!==r)}function KOe(e,o,t){let r=e.flatMap((s,l)=>Dl(s)===o?[l]:[]),a=e.slice();r.forEach((s,l)=>{a[s]=t[l]});let n=t.slice(r.length);return[...a.filter(s=>s!==void 0),...n]}function qOe(e,o,t){return o.flatMap(r=>{let a=e.filter(n=>Dl(n)===r);return a.length?a:t(r)})}var jf="ContactLocations",Uf=e=>({parentId:`locations-${e}`,slot:"groups"}),Ig=(e,o)=>({parentId:`locations-${e}`,slot:`cities:${o}`});function e_(e,o){let{readOnly:t,selected:r}=o,a=VY().tree,n=o.data?.content??[],s=YY(e),l=xg(null);V1(()=>{let g=r?.type===jf?String(r.props.id):null;g&&g!==l.current&&ht({level:"groups"}),l.current=g},[r?.props.id]);let{selectedLocationPartId:c,setSelectedLocationPartId:d,setSelectHandler:f}=L1(),m=H1(),u=(g,k)=>{let T=n[g];T&&o.replace(g,{type:T.type,props:{...T.props,locations:k}})},x=g=>{let k=n[g]?.props?.locations;return Array.isArray(k)?k:[]},I=Y1({keyOf:g=>`group:${g.si}:${g.index}`,readOnly:!!t,canDrop:(g,k)=>k.parentId===Uf(g.si).parentId&&k.slot==="groups",onDrop:(g,k)=>{u(g.si,mg(x(g.si),g.index,k.index)),m.level==="city"&&ht({level:"groups"})},onStep:(g,k)=>{u(g.si,mg(x(g.si),g.index,k<0?g.index-1:g.index+2)),m.level==="city"&&ht({level:"groups"})}}),b=Y1({keyOf:g=>`city:${g.si}:${g.group}:${g.index}`,readOnly:!!t,canDrop:(g,k)=>k.parentId===Uf(g.si).parentId&&k.slot.startsWith("cities:"),onDrop:(g,k)=>{let T=k.slot.slice(7);u(g.si,hg(x(g.si),g.group,g.index,T,k.index)),ht({level:"group",key:T})},onStep:(g,k)=>{u(g.si,hg(x(g.si),g.group,g.index,g.group,k<0?g.index-1:g.index+2)),m.level==="city"&&ht({level:"group",key:g.group})}}),v=xg(n);v.current=n;let C=xg(()=>{});V1(()=>{f(g=>{let k=D1(g);if(!k)return;let T=v.current.findIndex(F=>F.props?.id===k.nodeId);T<0||C.current(T,{level:k.part,index:k.index})})},[f]);let w=(g,k)=>{l.current=n[g]?.props?.id??null,o.select(g),ht(k),e.reveal();let T=n[g]?.props?.id;typeof T=="string"&&(k.level==="city"||k.level==="image"||k.level==="map")?d(B1(T,k.index,k.level)):d(null),typeof T=="string"&&o.scrollTo(T)};return C.current=w,{renderLocationTree:(g,k,{rowClick:T,isCollapsed:F,toggleCollapse:P})=>{let L=x(k),E=va(L),R=String(g.props.id),N=s&&r?.props.id===R,y=A=>ao(Q1,{...t?{}:I.seam({place:{...Uf(k),index:A}})},`seam:${R}:groups:${A}`),_=(A,H)=>ao(Q1,{...t?{}:b.seam({place:{...Ig(k,A),index:H}})},`seam:${R}:cities:${A}:${H}`);return ka(GY,{children:[ao(Nl,{icon:ao(qY,{size:13}),name:i("Texts"),words:a,onSelect:()=>w(k,{level:"texts"}),selected:N&&m.level==="texts",rowProps:{onClick:T(()=>w(k,{level:"texts"}))}}),E.map((A,H)=>{let Z=`${R}::grp::${A.key}`,q=F(Z),$=N&&m.level==="group"&&m.key===A.key,ke=A.name||A.key?W1(A.key,A.name):i("Ungrouped"),be={...Ig(k,A.key),index:A.cards.length},Ke=b.row({item:{si:k,group:A.key,index:-1},place:be,into:be,canDrag:!1},{onClick:T(()=>w(k,{level:"group",key:A.key}))}),Me=I.row({item:{si:k,index:H},place:{...Uf(k),index:H}},Ke.rowProps);return ka(q1,{children:[H===0&&y(0),ao(Nl,{icon:ao($Y,{size:13}),name:ke,words:a,onSelect:()=>w(k,{level:"group",key:A.key}),selected:$,draggable:Me.draggable,dragging:Me.dragging,drop:Me.drop??Ke.drop,fold:{open:!q,label:i("group"),onToggle:()=>P(Z)},actions:ao(J1,{kind:"delete",label:xo("Delete {label} group ({n} city)","Delete {label} group ({n} cities)",A.cards.length,{label:ke}),onClick:()=>{u(k,j1(L,A.key)),ht({level:"groups"})},children:ao(X1,{size:15})}),rowProps:Me.rowProps,count:A.cards.length,countLabel:xo("{n} city","{n} cities",A.cards.length)}),!q&&ka(Z1,{children:[A.cards.map((ue,pe)=>{let ye=$f(L,A.key,pe),Ye=N&&m.level==="city"&&m.index===ye,qe=String(ue?.name??"")||i("City"),se=`${R}::city::${Gf(ue)}`,Oe=F(se),{rowProps:eo,..._e}=b.row({item:{si:k,group:A.key,index:pe},place:{...Ig(k,A.key),index:pe}},{onClick:T(()=>w(k,{level:"city",index:ye}))});return ka(q1,{children:[pe===0&&_(A.key,0),ao(Nl,{icon:ao(jY,{size:13}),name:qe,words:a,onSelect:()=>w(k,{level:"city",index:ye}),selected:Ye,..._e,fold:{open:!Oe,label:qe,onToggle:()=>P(se)},actions:ao(J1,{kind:"delete",label:i("Delete {name}",{name:qe}),onClick:()=>{u(k,K1(L,A.key,pe)),ht({level:"group",key:A.key})},children:ao(X1,{size:15})}),rowProps:eo}),!Oe&&ka(Z1,{children:[ao(Nl,{icon:ao(UY,{size:13}),name:i("Image"),words:a,onSelect:()=>w(k,{level:"image",index:ye}),selected:N&&m.level==="image"&&m.index===ye,rowProps:{onClick:T(()=>w(k,{level:"image",index:ye}))}}),ao(Nl,{icon:ao(KY,{size:13}),name:i("Map"),words:a,onSelect:()=>w(k,{level:"map",index:ye}),selected:N&&m.level==="map"&&m.index===ye,rowProps:{onClick:T(()=>w(k,{level:"map",index:ye}))}})]}),_(A.key,pe+1)]},Gf(ue))}),ka("button",{type:"button",className:"sf-add-card",onClick:()=>{let ue=$1(L,A.key);u(k,ue);let pe=va(ue).find(ye=>ye.key===A.key);ht(pe&&pe.cards.length?{level:"city",index:$f(ue,A.key,pe.cards.length-1)}:{level:"group",key:A.key})},children:[ao("span",{className:"sf-plus sf-plus--sm",children:"+"}),i("Add city")]})]}),y(H+1)]},Z)}),ka("button",{type:"button",className:"sf-add-card",onClick:()=>{let{cards:A,key:H}=U1(L);u(k,A),w(k,{level:"group",key:H})},children:[ao("span",{className:"sf-plus sf-plus--sm",children:"+"}),i("Add group")]})]})},sectionPressed:g=>{g?.type===jf&&ht({level:"groups"})}}}import{useEffect as uX,useRef as pX}from"react";import{createNode as Sg,newId as wg}from"efficient-easel/data";import{useEaselApi as mX}from"efficient-easel/easel";import{useScreenDocument as hX}from"efficient-easel/screen/components/ScreenDocumentContext";import{useEaselSession as xX}from"efficient-easel/screen/lib/session-context";import{useEffect as lX,useRef as iX}from"react";import{useEasel as cX}from"efficient-easel/easel";import{ROOT_ZONE as yg}from"efficient-easel/draw";import{readHidable as QY}from"efficient-easel/draw";var XY="inline",ZY=[{label:"In this section",value:"inline"},{label:"In its own box",value:"own-box"}];var go={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:"DynamicBundleOffer"},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"}},jn="SectionHeader";function o_(e){return e in go}function t_(e){return to(ZY,XY,e)}var JY=new Set(["Flex"]);function c1e(e){return!!e?.type&&JY.has(e.type)}var r_={not:{field:"headPlacement",is:"own-box"}},d1e={not:r_};function f1e(e,o,t){return ys(e,t,r_)}var Et=V,Ot=je;function Kf(e){if(e.theme)return lo(e.theme);let o=e.site?.themePresets;return o?lo({selected:e.site?.selectedPreset??0,themes:[...o]}):void 0}function eX(e,o){return o===0?`${e}~box`:`${e}~box-${o+1}`}var n_=new Set(["id"]),Ta={},s_=[],Ml=[];function jo(e){for(let[o,t]of Object.entries(e)){if(o in Ta&&Ta[o]!==t)throw new Error(`lib/sections/section-to-box: "${o}" already has a row`);Ta[o]=t}}function qf(e){return Ta[e]}function oX(e){return e in Ta&&s_.includes(e)}function l_(e,o=Ml){return e in Ta&&(o.includes(e)||oX(e))}function w1e(e){let o=go[e];if(!o)throw new Error(`lib/sections/section-to-box: "${e}" has no head row in SPLITTABLE_SECTIONS`);let t=[{kind:"text",key:o.num,role:"eyebrow"},{kind:"text",key:o.title,role:"heading"}];return o.description&&t.push({kind:"text",key:o.description,role:"body"}),o.headRows.includes("linkText")&&o.headRows.includes("linkHref")&&t.push({kind:"button",key:"linkText",href:"linkHref"}),t}var gg=e=>QY(e),no=e=>gg(e).text.trim()!=="";function tX(e){if(e.includes("=="))return e;let o=e.indexOf("/"),t=o===-1?e:e.slice(0,o),r=t.trim();if(!r)return e;let a=t.indexOf(r);return`${t.slice(0,a)}==${r}==${t.slice(a+r.length)}${o===-1?"":e.slice(o)}`}var rX=e=>e==="heading"?Wo():e==="eyebrow"?Io():{};function aX(e,o,t,r){let a={...e._partStyles?.text??{},...o??{},...t??{}};return(r==="center"||r==="right")&&a.align===void 0&&(a.align=r),Object.keys(a).length?{_partStyles:{text:a}}:{}}function nX(e,o){if(e===void 0)return{};if(typeof e=="string")return{variant:e};let t=o[e.key];return{variant:typeof t=="string"&&Object.hasOwn(e.map,t)?e.map[t]:e.fallback}}function a_(e,o,t,r,a={}){let n={...o};for(let s of e){let[l,c,d]=typeof s=="string"?[s,s,void 0]:s;if(t[l]===void 0)continue;let f=d?d(t[l],t,a):t[l];f===void 0?delete n[c]:n[c]=f,r(l,c,f===void 0)}return n}function sX(e){let o=new Set([...n_,"headPlacement","_partStyles",...Object.keys(e.drop??{}),...Object.keys(e.reads??{})]),t=a=>{for(let n of a??[])o.add(typeof n=="string"?n:n[0])},r=a=>{for(let n of a)switch(n.kind){case"text":case"image":o.add(n.key),n.kind==="image"&&n.alt&&o.add(n.alt);break;case"button":o.add(n.key),o.add(n.href),typeof n.variant=="object"&&o.add(n.variant.key);break;case"list":o.add(n.key);break;case"group":case"block":t(n.box),r(n.parts??[]);break;case"core":if(n.keep!=="rest"&&n.keep.forEach(s=>o.add(s)),Object.keys(n.rename??{}).forEach(s=>o.add(s)),n.derive?.reads.forEach(s=>o.add(s)),typeof n.slots!="function")for(let s of Object.values(n.slots??{}))for(let l of s)"kind"in l&&o.add(l.key);break}};for(let a of[e,...e.also??[]])t(a.box),r(a.parts);return o}function bg(e,o,t={}){let r=e.props,a=o.skip?.(r);if(a!==void 0)return{node:e,nodes:[e],carried:[],dropped:[],siteWrites:[],restyled:[],skipped:a};let n=String(r.id??e.type),s=[],l=[],c=[],d=new Set,f=(T,F)=>{s.push({key:T,home:F}),d.add(T)},m=r._partStyles??{},u=sX(o),x=0,I=(T,F)=>({type:T,props:{...F,id:`${n}~${T}-${++x}`}}),b=(T,F,P,L,E,R,N)=>{if(E){for(let _ of T??[]){let A=typeof _=="string"?_:_[0];P[A]!==void 0&&N(A,`nothing \u2014 the ${L} has no parts, so it is not drawn`)}return}let y=typeof F=="function"?F(r,t):F??{};return a_(T??[],y,P,(_,A,H)=>N(_,H?`nothing \u2014 the old value draws nothing (${L}: no ${A})`:`${R}${L}: ${A}`),t)},v=T=>ps(T,F=>`${n}~${F}-${++x}`),C=(T,F,P)=>{let L=T.of?T.of(F):Array.isArray(F[T.key])?F[T.key]:[],E=typeof T.props=="function"?T.props(r,t):T.props??{},R=L.map((H,Z)=>{let q=H??{},$=T.item?.(q,Z,r)??{},ke=w($.reverse?[...T.parts].reverse():T.parts,q,!1,`item ${Z+1}: `);return T.flat?$.props?ke.map(be=>({...be,props:{...be.props,...$.props,id:be.props.id}})):ke:[I(Et,{name:`${T.name} ${Z+1}`,...E,...$.props??{},[Ot]:ke})]});if(T.groups){let H=T.groups;return P(T.key,L.length?`one Box per item (${L.length}), in a Box per group`:"nothing \u2014 the list is empty"),zf(L.map(Z=>Z??{}),H.of,H.of).map((Z,q)=>{let $=Z.items.map(pe=>pe.item),ke=H.parts?w(H.parts,H.head?.($,r)??{},!1,`group ${q+1}: `):[],be=Z.items.map(pe=>R[pe.index]),Ke=H.perRow?.($.length,r),Me=Number.isInteger(Ke)&&Ke>=1?Ke:1,ue=[];if(H.perRow&&Me<be.length)for(let pe=0;pe*Me<be.length;pe++)ue.push(be.slice(pe*Me,(pe+1)*Me).flat());return I(Et,{name:`${H.name} ${q+1}`,...H.props??{},[Ot]:[...ke,I(Et,{name:`${H.itemsName} ${q+1}`,...H.itemsProps?.($.length,r)??{},[Ot]:ue.length?ue.map((pe,ye)=>I(Et,{name:`${H.rowName??`${H.itemsName} row`} ${ye+1}`,...H.rowProps??{},[Ot]:pe})):be.flat()})]})})}let N=T.perRow?.(r),y=T.perRow?Number.isInteger(N)&&N>=1?N:1:0;if(P(T.key,(L.length?T.flat?`each item's parts (${L.length} items), in order`:`one Box per item (${L.length}), its parts inside`:"nothing \u2014 the list is empty")+(y&&L.length?`, in rows of ${y}`:"")),!y)return R.flat();let _=typeof T.rowProps=="function"?T.rowProps(r,t):T.rowProps??{},A=[];for(let H=0;H*y<R.length;H++){let Z=R.slice(H*y,(H+1)*y).flat(),q=T.rowFiller?y-R.slice(H*y,(H+1)*y).length:0;A.push(I(Et,{name:`${T.rowName??`${T.name} row`} ${H+1}`,..._,[Ot]:[...Z,...Array.from({length:q},($,ke)=>I(Et,{name:`Empty ${ke+1}`,...T.rowFiller,[Ot]:[]}))]}))}return A},w=(T,F,P,L)=>{let E=[],R=(y,_)=>P?f(y,_):void 0,N=y=>P?m[y]:void 0;for(let y of T)if(!(y.when&&!y.when(r,P?void 0:F)))switch(y.kind){case"text":{let _=gg(F[y.key]);if(!_.text.trim()){R(y.key,"nothing \u2014 empty words draw nothing, so no block");break}let A=rX(y.role??"body"),{_partStyles:H,...Z}=A,q=aX(A,y.styleFrom?{...y.style,...y.styleFrom(r,t)}:y.style,N(y.key),y.props?.align);if(y.was&&P){let $=q._partStyles?.text??{};c.push({key:y.key,was:y.was,...typeof $.textStyle=="string"?{textStyle:$.textStyle}:{},...U($.size)!==void 0?{size:U($.size)}:{},...U($.sizePhone)!==void 0?{sizePhone:U($.sizePhone)}:{}})}E.push(I("Text",{text:y.mark==="accentLead"?tX(_.text):y.mark==="accentItalic"?Ri(_.text):_.text,...Z,...y.props??{},...q,..._.hidden?{_hidden:!0}:{}})),R(y.key,`${L}Text block: its words${_.hidden?", hidden":""}`);break}case"button":{let _=gg(F[y.key]);if(!_.text.trim()){R(y.key,"nothing \u2014 no words, no button"),R(y.href,"nothing \u2014 no button to link"),typeof y.variant=="object"&&R(y.variant.key,"nothing \u2014 no button to style");break}let A=typeof F[y.href]=="string"&&F[y.href]?F[y.href]:"#",H={...y.style??{},...N(y.key)??{}};E.push(I("ButtonBlock",{label:_.text,href:A,...typeof y.props=="function"?y.props(F,t):y.props??{},...nX(y.variant,F),...Object.keys(H).length?{_partStyles:{label:H}}:{},..._.hidden?{_hidden:!0}:{}})),R(y.key,`${L}Button block: its words`),R(y.href,`${L}Button block: its link`),typeof y.variant=="object"&&R(y.variant.key,`${L}Button block: its Style`);break}case"image":{let _=F[y.key];if(typeof _!="string"||!_){R(y.key,"nothing \u2014 no picture, no block"),y.alt&&R(y.alt,"nothing \u2014 no picture to describe");break}let A=y.alt&&typeof F[y.alt]=="string"?F[y.alt]:"";E.push(I("ImageBlock",{src:_,alt:A,...y.props??{}})),R(y.key,`${L}Image block: its picture`),y.alt&&R(y.alt,`${L}Image block: its alt text`);break}case"list":{E.push(...C(y,F,R));break}case"group":{let _=w(y.parts,F,P,L),A=b(y.box,y.props,F,`${y.name} Box`,!_.length&&!y.keepEmpty,L,R);A&&E.push(I(Et,{name:y.name,...A,[Ot]:_}));break}case"block":{let _=y.parts?w(y.parts,F,P,L):[],A=b(y.box,y.props,F,`${y.type} block`,!!y.parts&&!_.length&&!y.keepEmpty,L,R);A&&E.push(I(y.type,{...A,...y.slot?{[y.slot]:_}:{}}));break}case"core":{let _=y.as??e.type,A={headPlacement:"own-box",...y.props??{}},H=y.keep==="rest"?Object.keys(F).filter(q=>!u.has(q)&&!(q in A)):y.keep;for(let q of H)F[q]!==void 0&&(A[q]=F[q],R(q,`the ${_} block inside the Box`));if(y.keep==="rest"){for(let $ of Object.keys(y.props??{}))F[$]!==void 0&&!u.has($)&&R($,`nothing \u2014 the ${_} block inside the Box has the row's own value`);F.headPlacement!==void 0&&R("headPlacement",`the ${_} block inside the Box: own-box`);let q=Object.fromEntries(Object.entries(m).filter(([$])=>!u.has($)));Object.keys(q).length&&(A._partStyles=q)}for(let[q,$]of Object.entries(y.rename??{}))F[q]!==void 0&&(A[$]=F[q],R(q,`the ${_} block inside the Box: ${$}`));if(y.derive){Object.assign(A,y.derive.props(F,t));for(let q of y.derive.reads)F[q]!==void 0&&R(q,`the ${_} block inside the Box`)}let Z=typeof y.slots=="function"?y.slots(F,t):y.slots??{};for(let[q,$]of Object.entries(Z))A[q]=$.flatMap(ke=>"kind"in ke?C(ke,F,R):v([ke]));E.push(I(_,A));break}}return E},g=(T,F)=>{let P=F===0?"Box":`${T.name} Box`,L=w(T.parts,r,!0,F===0?"":`${P}: `),E=typeof T.boxProps=="function"?T.boxProps(r,t):T.boxProps??{},R=a_(T.box??[],E,r,(N,y,_)=>f(N,_?`nothing \u2014 the old value draws nothing (${P}: no ${y})`:`${P}: ${y}`),t);return{type:Et,props:{name:T.name,...R,[Ot]:L,id:eX(n,F)}}},k=[o,...o.also??[]].map(g);r._partStyles!==void 0&&f("_partStyles","each old part's style moved to its new part");for(let[T,F]of Object.entries(o.reads??{}))r[T]!==void 0&&f(T,F);for(let[T,F]of Object.entries(o.drop??{}))T in r&&(l.push({key:T,why:F}),d.add(T));for(let T of Object.keys(r))n_.has(T)||d.has(T)||l.push({key:T,why:"not in the row \u2014 not carried"});return{node:k[0],nodes:k,carried:s,dropped:l,siteWrites:[...o.site?.(e,t)??[]],restyled:c}}function i_(e,o=s_,t={}){if(!Array.isArray(e))return[];let r=[];return e.forEach((a,n)=>{let s=a&&typeof a.type=="string"&&o.includes(a.type)?Ta[a.type]:void 0;if(!s)return;let l=bg(a,s,t);l.skipped===void 0&&r.push({index:n,node:l.node,nodes:l.nodes})}),r}function c_(e){let o=cX(s=>s.appState.data.content),{theme:t,themeRow:r,themeFromDocument:a}=ce(),n=iX(new Set);lX(()=>{let s=dX({theme:t,themeRow:r,themeFromDocument:a});s&&fX(i_(o,void 0,s),e,n.current)},[o,e,t,r,a])}function dX(e){return e.themeFromDocument||e.themeRow==="none"?{}:e.themeRow==="read"?{theme:e.theme}:null}function fX(e,o,t){for(let{index:r,nodes:a}of[...e].sort((n,s)=>s.index-n.index)){let n=String(a[0].props.id);t.has(n)||(t.add(n),o.replaceComponent(yg,r,a[0]),a.slice(1).forEach((s,l)=>{o.insertNode(yg,r+1+l,s),o.replaceComponent(yg,r+1+l,s)}))}}import{ROOT_ZONE as Kn,missingPinnedTypes as IX,pinnedDuplicateIds as Cg}from"efficient-easel/draw";function d_(e){return!e.docId||e.saveStatus==="saving"?!1:e.seededDocId!==e.docId}function f_(e,o){let t=e.some(l=>l?.type===Ee),r=e[e.length-1],a=!t&&r?.type===Ne?r:null,n=e.filter(l=>l?.type===Ne&&l!==a).map(l=>String(l.props?.id??"")).filter(Boolean),s=o.hasChromeDoc&&!t&&!a;return{remove:n,seedHeader:!e.some(l=>l?.type===ko),seedFooter:s,seedSiteHeader:s&&!e.some(l=>l?.type===De)}}async function u_(e){let o=e.blocks?.seeds?.siteHeader;if(!o)return!1;let t;try{t=await o({make:e.make,id:e.id,siteId:e.siteId,token:e.token})}catch{return!1}if(!t||t.type!==De||!e.stillOpen())return!1;let r=e.latest();return r.some(a=>a?.type===De)?!1:(e.write(Ef(r,t)),!0)}function p_(e,o){let{adapter:t,capabilities:r,currentSlug:a,docId:n,data:s,saveStatus:l,siteId:c,tokenRef:d}=hX(),f=xX(),{hasSiteSettings:m,hasPinnedChrome:u}=r;c_(e);let x=!!r.editsPinnedInPlace&&a!==rt,I=a===rt,b=mX().getState,v=pX(null);uX(()=>{if(!d_({docId:n,saveStatus:l,seededDocId:v.current})||(v.current=n,!u))return;let C=b().appState.data,w=C.content,g=s?.content??[],k=(L,E)=>L.some(R=>R?.type===E);if(!m){let L=new Set(Cg(w)),E=L.size?w.filter(N=>!L.has(N.props.id)):w;if(L.size&&e.setDocument({...C,content:E}),I)return;let R=IX(E,g);if(R.includes(Ne)){let N=E.length,y=e.insertSection(Ne,N);e.replaceComponent(Kn,N,{type:Ne,props:{id:y,blocks:Bf()}})}R.includes(ko)&&e.insertNode(Kn,0,Lf());return}if(I){let L=zn(w);if(L!==w&&e.setDocument({...C,content:[...L]}),!L.find(E=>E.type===Ne)&&!k(g,Ne)&&!k(L,Ee)&&!k(g,Ee)){let E=(N,y)=>Sg(o,N,y),R={type:Ne,props:{blocks:Bf()}};e.insertNode(Kn,L.length,Al(R,E,wg(Ee)))}return}if(x){let L=!!t?.pinnedChrome?.state().docId,E=f_(w,{hasChromeDoc:L}),R=new Set([...E.remove,...Cg(w.filter(y=>!E.remove.includes(String(y.props.id))))]),N=R.size?w.filter(y=>!R.has(String(y.props.id))):w;if(N.length!==w.length&&e.setDocument({...C,content:N}),E.seedFooter&&!k(g,Ne)&&!k(g,Ee)){let y=(A,H)=>Sg(o,A,H),_={type:Ne,props:{blocks:Bf()}};e.insertNode(Kn,N.length,Al(_,y,wg(Ee)))}if(E.seedHeader&&!k(g,ko)){let y=N[0]?.type===De?1:0;e.insertNode(Kn,y,Lf())}if(E.seedSiteHeader&&!k(g,De)&&!k(g,Ne)&&!k(g,Ee)){let y=n;u_({blocks:tc(f),make:(_,A)=>Sg(o,_,A),id:wg(De),siteId:c??null,token:d.current,latest:()=>b().appState.data.content,stillOpen:()=>v.current===y,write:_=>{let A=b().appState.data;e.setDocument({...A,content:[..._]})}})}return}let T=w.filter(L=>L.type!==Ne),F=new Set(Cg(T)),P=F.size?T.filter(L=>!F.has(L.props.id)):T;P.length!==w.length&&e.setDocument({...C,content:P}),!k(P,ko)&&!k(g,ko)&&e.insertNode(Kn,0,Lf())},[n,l,s,b,e,m,u,I,x,t,f,c,d])}import{useEffect as y_,useMemo as vX,useRef as S_}from"react";import{useEasel as kX}from"efficient-easel/easel";import{useEaselHost as TX}from"efficient-easel/screen/lib/host";import{FIELD_DESCRIPTION_MARKER as gX}from"efficient-easel/screen/lib/host";import{isNode as vg}from"efficient-easel/data";function kg(e,o){let t=e.components[o]?.label;return typeof t=="string"&&t.trim()?t.trim():o}function bX(e){return e.length>3&&e.endsWith("s")?e.slice(0,-1):e}function Tg(e,o,t,r){e.forEach((a,n)=>{if(vg(a)){r.push({node:a,list:e,index:n,parent:o,slot:t});for(let[s,l]of Object.entries(a.props))Array.isArray(l)&&l.some(vg)&&Tg(l,a,s,r)}})}function yX(e){let o=[];Tg(Array.isArray(e.content)?e.content:[],null,"",o);for(let t of Object.values(e.zones??{}))Array.isArray(t)&&Tg(t,null,"",o);return o}function h_(e,o){return yX(e).find(t=>String(t.node.props.id)===o)}function x_(e,o,t){if(!t)return null;let r=h_(o,t);if(!r)return null;let a=kg(e,r.node.type),n=r.parent?`${kg(e,r.parent.type)} \xB7 ${bX(r.slot)} ${r.index+1}`:a;return{blockId:t,type:r.node.type,label:n,path:""}}var SX=e=>e.filter(o=>!!o&&typeof o=="object"&&"value"in o).map(o=>typeof o.label=="string"?{value:o.value,label:o.label}:{value:o.value});function wX(e){if(!e||typeof e!="object")return null;let o=e;if(typeof o.type!="string")return null;let t=o.type==="custom"?o[gX]:void 0,r={type:t?.type??o.type},a=t?.label??o.label;typeof a=="string"&&(r.label=a);let n=t?.options??o.options;Array.isArray(n)&&(r.options=SX(n));for(let s of["arrayFields","objectFields"]){let l=t?.[s]??o[s];l&&typeof l=="object"&&(r[s]=I_(l))}return r}function I_(e){let o={};for(let[t,r]of Object.entries(e??{})){let a=wX(r);a&&(o[t]=a)}return o}function g_(e){let o={};for(let[t,r]of Object.entries(e.components))r&&(o[t]={label:kg(e,t),fields:I_(r.fields)});return o}function CX(e,o){let t=e;for(let r of o?o.split("."):[]){let a=/^([A-Za-z_][A-Za-z0-9_]*)(?:\[(\d+)\])?$/.exec(r);if(!a||!t||typeof t!="object")return null;t=t[a[1]],a[2]!==void 0&&(t=Array.isArray(t)?t[Number(a[2])]:void 0)}return t&&typeof t=="object"&&!Array.isArray(t)?t:null}function Pg(e,o){return e.findIndex(t=>vg(t)&&String(t.props.id)===o)}function m_(e,o,t){let r=o||t;if(!r)return e.length;let a=Pg(e,r);if(a<0)throw new Error(`there is no top-level block ${r}`);return o?a+1:a}function b_(e,o,t,r){let a=structuredClone(o),n=Array.isArray(a.content)?a.content:a.content=[];try{t.forEach((s,l)=>{let c=d=>{throw new Error(`change ${l+1}: ${d}`)};switch(s.op){case"set_props":{let d=h_(a,s.block_id)??c(`there is no block ${s.block_id}`);"id"in s.props&&c("a block's id is never changed");let f=CX(d.node.props,s.path)??c(`there is no ${s.path} in that block`);Object.assign(f,structuredClone(s.props));break}case"insert_block":{let d=e.components[s.type]??c(`there is no block type ${s.type}`),f=d.defaultProps&&typeof d.defaultProps=="object"?d.defaultProps:{},m={type:s.type,props:{...structuredClone(f),...structuredClone(s.props),id:r(s.type)}};n.splice(m_(n,s.after,s.before),0,m);break}case"remove_block":{let d=Pg(n,s.block_id);d<0&&c(`there is no top-level block ${s.block_id}`),n.splice(d,1);break}case"move_block":{let d=Pg(n,s.block_id);d<0&&c(`there is no top-level block ${s.block_id}`);let[f]=n.splice(d,1);n.splice(m_(n,s.after,s.before),0,f);break}default:c(`"${s.op}" is not a change this editor makes`)}})}catch(s){return{ok:!1,reason:s instanceof Error?s.message:String(s)}}return{ok:!0,document:a}}var Eg=e=>oe(e.requestId)??null;function w_(){let e=TX(),{appState:o,selectedItem:t,dispatch:r,history:a,config:n}=kX(u=>u),s=n,l=S_({appState:o,dispatch:r,history:a,blockConfig:s});l.current={appState:o,dispatch:r,history:a,blockConfig:s};let c=S_(new Map),d=t?.props?.id,f=vX(()=>x_(s,o.data,d),[s,o.data,d]),m=f?JSON.stringify(f):"";y_(()=>{e.connected&&e.send("storefront-editor:selection",{selection:f})},[e,m]),y_(()=>e.subscribe(u=>{let{appState:x,dispatch:I,history:b,blockConfig:v}=l.current;switch(u.type){case"storefront-editor:request-document":{let C=Eg(u);if(!C)return;e.send("storefront-editor:document",{requestId:C,document:x.data,blocks:g_(v)});return}case"storefront-editor:apply-page-edits":{let C=Eg(u);if(!C)return;let w=Array.isArray(u.ops)?u.ops:[],g=w.length?b_(v,x.data,w,k=>`${k}-${crypto.randomUUID()}`):{ok:!1,reason:"no changes"};g.ok&&(I({type:"setData",data:g.document,recordHistory:!0}),c.current.set(C,JSON.stringify(g.document.content??[]))),e.send("storefront-editor:page-edits-result",{requestId:C,applied:g.ok,reason:g.ok?null:g.reason});return}case"storefront-editor:undo-page-edits":{let C=Eg(u);if(!C)return;let w=c.current.get(C),g=w!==void 0&&w===JSON.stringify(x.data.content??[]);g&&b.hasPast&&(b.back(),c.current.delete(C)),e.send("storefront-editor:page-edits-result",{requestId:C,applied:g&&b.hasPast,reason:g?null:"the page has changed since"});return}case"storefront-editor:set-right-panel":typeof u.shown=="boolean"&&I({type:"setUi",ui:{rightSideBarVisible:u.shown}});return;default:return}}),[e])}import{useEffect as k_,useState as T_}from"react";var Vf=new Map;async function PX(e,o){try{return(await ze().site.get({siteId:o})).slug?.trim()||null}catch(t){return console.warn("[editor-site-slug] could not resolve the site slug",t),null}}function C_(e,o){let t=Vf.get(o);return t||(t=PX(e,o),Vf.set(o,t),t.catch(()=>{Vf.get(o)===t&&Vf.delete(o)})),t}var EX=/^(localhost|(?:[a-z0-9-]+\.)+localhost|127(?:\.\d{1,3}){3}|0\.0\.0\.0|\[::1\]|::1)$/i;function Og(e){return!!e&&EX.test(e)}function v_(e){let{pageSlug:o,siteSlug:t,hostname:r}=e,a=o===Ji?"/":`/${encodeURIComponent(o)}`;if(!Og(r))return a;let n=t?.trim();return n?`${a}?site=${encodeURIComponent(n)}`:a}function P_(e){let{pageSlug:o,siteId:t,token:r}=e,[a,n]=T_(null),[s,l]=T_(null),c=qa();k_(()=>l(c?new URL(c).hostname:window.location.hostname),[c]),k_(()=>{if(!Og(s)||!t||!r){n(null);return}let f=!1;return C_(r,t).then(m=>{f||n(m)}),()=>{f=!0}},[s,t,r]);let d=v_({pageSlug:o,siteSlug:a,hostname:s});return c?`${c}${d}`:d}import{jsx as Hl}from"react/jsx-runtime";import{useEffect as OX,useRef as E_,useState as _X}from"react";import{ExternalIcon as O_}from"efficient-easel/icons";import{EaselIconButton as RX}from"efficient-easel/chrome";import{Tooltip as AX,iconButtonClasses as FX}from"efficient-shell/ui";import{useSettledPress as LX}from"efficient-easel/easel";import{useScreenDocument as BX}from"efficient-easel/screen/components/ScreenDocumentContext";async function DX({pageId:e,liveHref:o,draftLink:t,ready:r=async()=>!0,win:a=window}){let n=a.open("","_blank");if(n)try{n.opener=null}catch{}let s=l=>{n&&!n.closed?n.location.href=l:a.open(l,"_blank","noopener,noreferrer")};try{await r()}catch{}return t(e).then(l=>s(l.url??o),()=>s(o))}function __({liveHref:e,pageId:o,draftLink:t}){let{flushSave:r}=BX(),a=E_(r);a.current=r;let n=LX(),[s,l]=_X(!1),c=E_(null);if(OX(()=>()=>c.current?.(),[]),t&&o){let d=()=>new Promise((m,u)=>{c.current=()=>m(!1),n.run(()=>{c.current=null,a.current().then(m,u)})}),f=()=>{s||n.waiting||(l(!0),DX({pageId:o,liveHref:e,draftLink:t,ready:d}).finally(()=>l(!1)))};return Hl(RX,{label:i("Preview your saved draft in a new tab"),tip:i("Open your saved draft in a new tab. Visitors don't see it."),disabled:s||n.waiting,onClick:f,children:Hl(O_,{})})}return Hl(AX,{content:i("Preview the live site (opens in a new tab)"),side:"bottom",children:Hl("a",{className:FX({className:"es-iconbtn"}),href:e,target:"_blank",rel:"noopener noreferrer","aria-label":i("Preview the live site in a new tab"),children:Hl(O_,{})})})}import{createElement as zX,useCallback as GX,useEffect as q_,useRef as V_,useState as $X}from"react";import{ClockIcon as UX}from"efficient-shell/icons/efficient";import{useScreenDocument as jX}from"efficient-easel/screen/components/ScreenDocumentContext";import{useSyncExternalStore as NX}from"react";import{useScreenDocument as MX}from"efficient-easel/screen/components/ScreenDocumentContext";var HX=()=>()=>{},R_=()=>null;function Yf(e){return NX(e?e.subscribe:HX,e?e.state:R_,e?e.state:R_)}function Xf(){let{adapter:e}=MX();return e?.pinnedChrome}import{useSyncExternalStore as L_}from"react";var Wl=!1,qn=null,_g=new Set;function Gl(){for(let e of _g)e()}function B_(e){return _g.add(e),()=>{_g.delete(e)}}function D_(){Wl||(Wl=!0,Gl())}function N_(){Wl&&(Wl=!1,Gl())}function A_(){return Wl}function M_(){return L_(B_,A_,A_)}function F_(){return qn}function Zf(){qn&&(qn=null,Gl())}function H_(){return L_(B_,F_,F_)}var zl=class extends Error{constructor(){super("The editor's last changes could not be saved, so nothing was restored."),this.name="HeldEditsNotSaved"}};async function W_(e,o,t,{flushSave:r,reload:a}){if(!await r())throw new zl;let n=await e.restore(o,t);return dc(n.liveState),a(),n}async function z_({access:e,version:o,page:t,...r}){let a=await W_(e,o.id,t?{page:t.id}:{},r);qn={title:WX(o,t??null),undo:a.undo},Gl()}async function G_({access:e,...o}){let t=qn?.undo;t&&(await W_(e,t,{},o),qn=null,Gl())}function $_(e){return e.name?e.name:e.kind==="draft_before_restore"?i("Draft before restore"):i("Version {n}",{n:e.number})}function WX(e,o){return e.kind==="draft_before_restore"?i("Your drafts from before the restore are back"):o?i("{page} from version {n} is now your draft",{page:o.name,n:e.number}):i("Version {n} is now your draft",{n:e.number})}function U_(e){let o=e.changes.filter(r=>r.kind==="page").length,t=[...o?[xo("{n} page","{n} pages",o)]:[],...e.changes.filter(r=>r.kind!=="page").map(r=>r.name)];if(!t.length)return"";try{return new Intl.ListFormat(Xu(),{type:"conjunction"}).format(t)}catch{return t.join(", ")}}function j_(e){return e.change==="take_down"?i("{name} (taken down)",{name:e.name}):e.name}function K_(e,o=new Date){let t=new Date(e);if(Number.isNaN(t.getTime()))return"";let r=Xu(),a=new Intl.DateTimeFormat(r,{hour:"numeric",minute:"2-digit"}).format(t);if(t.toDateString()===o.toDateString())return i("Today, {time}",{time:a});let n=new Intl.DateTimeFormat(r,{day:"numeric",month:"short",...t.getFullYear()===o.getFullYear()?{}:{year:"numeric"}}).format(t);return i("{day}, {time}",{day:n,time:a})}function Y_(e){let{docId:o,capabilities:t,hasUnsavedEdits:r,onPublish:a,adapter:n}=jX(),s=FO(AO(o??null),r),l=Yf(Xf()),c=n.siteLiveState;q_(()=>{if(c)return Pm(c),Nt(0),()=>Pm(null)},[c]);let d=fc(),[f,m]=$X(!1),u=V_(e);u.current=e;let x=V_(!0);q_(()=>(x.current=!0,()=>{x.current=!1}),[]);let I=GX(()=>{m(!0),a(u.current).then(()=>{Zf()}).finally(()=>{x.current&&m(!1)})},[a]);if(t.canPublish){if(c){let b=d===void 0?void 0:r||d.state==="changed"?"changed":"live",v=$I({live:b,onPress:I,busy:f,goingLive:LO(d?.changes??[])});return n.siteVersions?{...v,menuItems:KX()}:v}return $I({live:s,onPress:I,busy:f,pinnedUnpublished:l?.unpublished??!1})}}function KX(){return[{key:"version-history",label:i("Version history"),icon:zX(UX),onSelect:D_}]}import{jsx as X,jsxs as Do,Fragment as jl}from"react/jsx-runtime";import{useCallback as qX,useEffect as VX,useId as J_,useRef as YX,useState as Ko}from"react";import{useSettledAction as XX}from"efficient-easel/easel";import{Avatar as ZX,Banner as $l,Button as Pa,ColoredBadge as Rg,Dialog as Q_,Drawer as JX,DropdownMenu as QX,FormField as eR,iconButtonClasses as eZ,Inline as Ag,Input as oZ,ListRow as tZ,Select as rZ,SortableList as aZ,Stack as Ul}from"efficient-shell/ui";import{EditIcon as nZ,EyeIcon as X_,MenuIcon as sZ,MoreIcon as lZ,PageIcon as oR,RevertIcon as Z_,StylesIcon as iZ}from"efficient-shell/icons/efficient";import{useScreenDocument as tR}from"efficient-easel/screen/components/ScreenDocumentContext";var cZ={page:oR,menu:sZ};function dZ(e,o){return e.pages.find(t=>t.id===o)??e.pages[0]??null}function fZ(e,o){let t=window.open("","_blank");if(t)try{t.opener=null}catch{}return e.preview(o).then(({url:r})=>{t&&!t.closed?t.location.href=r:window.open(r,"_blank","noopener,noreferrer")},r=>{throw t?.close(),r})}function uZ({version:e,page:o,waiting:t,busy:r,error:a,onCancel:n,onConfirm:s,onPage:l}){let c=J_();if(!e)return null;let d=e.kind==="draft_before_restore",f=e.number,m=U_(e),u=d?i("Put your drafts back?"):o?i("Restore {page} from version {n}?",{page:o.name,n:f}):i("Restore version {n}?",{n:f}),x=d?i("Your drafts go back to how they were before the restore."):o?i("{page} goes back to version {n} as a draft. Nothing else on your website changes.",{page:o.name,n:f}):m?i("The whole website goes back to version {n} as a draft: {what}.",{n:f,what:m}):i("The whole website goes back to version {n} as a draft.",{n:f}),I=e.deletedPictures??0;return X(Q_,{open:!0,onClose:()=>{r||n()},size:"sm",title:u,footer:Do(jl,{children:[X(Pa,{variant:"secondary",onClick:n,disabled:r,children:i("Cancel")}),X(Pa,{onClick:s,loading:r,disabled:r,children:i("Restore as draft")})]}),children:Do(Ul,{gap:4,children:[o&&e.pages.length>1?X(eR,{label:i("Page"),htmlFor:c,children:X(rZ,{id:c,value:o.id,options:e.pages.map(b=>({value:b.id,label:b.name})),onChange:l,disabled:r})}):null,X("p",{children:x}),X("p",{children:i("Your live website does not change until you press Publish.")}),I>0?X($l,{tone:"warning",children:xo("{n} picture in this version was deleted from the media library. It stays empty.","{n} pictures in this version were deleted from the media library. They stay empty.",I)}):null,t?X($l,{tone:"info",title:i("Your unpublished changes are kept"),children:i("They are saved in Version history as \u201CDraft before restore\u201D, so you can get them back.")}):null,a?X($l,{tone:"danger",children:a}):null]})})}function pZ({version:e,onCancel:o,onSave:t}){let r=J_(),[a,n]=Ko(null),[s,l]=Ko(""),[c,d]=Ko(!1),[f,m]=Ko(null);if(e!==a&&(n(e),l(e?.name??""),m(null)),!e)return null;let u=s.trim()===e.name,x=async()=>{if(!(c||u)){d(!0),m(null);try{await t(s.trim())}catch{m(i("The name was not saved. Try again."))}finally{d(!1)}}};return X(Q_,{open:!0,onClose:()=>{c||o()},size:"sm",title:i("Name this version"),footer:Do(jl,{children:[X(Pa,{variant:"secondary",onClick:o,disabled:c,children:i("Cancel")}),X(Pa,{onClick:()=>{x()},loading:c,disabled:c||u,children:i("Save")})]}),children:X(eR,{label:i("Name"),htmlFor:r,hint:i("Named versions are always kept. Leave it empty to take the name away."),error:f??void 0,children:X(oZ,{id:r,value:s,invalid:!!f,onChange:I=>l(I.target.value),onKeyDown:I=>{I.key==="Enter"&&x()}})})})}function mZ({version:e,expanded:o,onToggle:t,onPreview:r,onRestore:a,onRestorePage:n,onName:s}){let l=e.kind==="draft_before_restore",c=!e.live,d=e.changes.length,f=[...l?[]:[{key:"preview",label:i("Preview"),icon:X(X_,{}),onSelect:r}],...c?[{key:"restore",label:l?i("Put these drafts back"):i("Restore whole website"),icon:X(Z_,{}),onSelect:a}]:[],...c&&!l&&e.pages.length?[{key:"restore-page",label:i("Restore one page only"),icon:X(oR,{}),onSelect:n}]:[],...l?[]:[{type:"divider",key:"divider"},{key:"name",label:i("Name this version"),icon:X(nZ,{}),onSelect:s}]];return X(tZ,{title:Do("span",{className:"sf-version-title",children:[X("span",{children:$_(e)}),e.live?X(Rg,{tone:"success",size:"xs",children:i("Live")}):null,e.name?X(Rg,{tone:"neutral",size:"xs",children:i("Version {n}",{n:e.number})}):null,l?X(Rg,{tone:"warning",size:"xs",children:i("Not published")}):null]}),expanded:o,onToggle:t,actions:X(QX,{align:"end","aria-label":i("More"),items:f,triggerClassName:eZ({variant:"ghost",size:"sm"}),trigger:X(lZ,{})}),below:Do(Ul,{gap:3,children:[Do(Ag,{gap:2,align:"center",wrap:!0,className:"sf-version-meta",children:[X(ZX,{name:e.createdBy,size:"xs"}),X("span",{children:e.createdBy}),X("span",{"aria-hidden":"true",children:"\xB7"}),X("span",{children:K_(e.createdAt)}),d?Do(jl,{children:[X("span",{"aria-hidden":"true",children:"\xB7"}),X("span",{children:xo("{n} change","{n} changes",d)})]}):null]}),o?Do(Ul,{gap:3,children:[d?X(Ul,{gap:2,children:e.changes.map(m=>{let u=cZ[m.kind]??iZ;return Do(Ag,{gap:2,align:"center",children:[X(u,{size:16}),X("span",{children:j_(m)})]},`${m.kind}:${m.id}`)})}):null,Do(Ag,{gap:2,children:[l?null:X(Pa,{variant:"secondary",size:"sm",leftIcon:X(X_,{}),onClick:r,children:i("Preview")}),c?X(Pa,{variant:"secondary",size:"sm",leftIcon:X(Z_,{}),onClick:a,children:i("Restore")}):null]})]}):null]})})}function hZ({open:e,onClose:o,access:t,waiting:r}){let{flushSave:a,reloadFromServer:n,docId:s}=tR(),[l,c]=Ko(null),[d,f]=Ko(!1),[m,u]=Ko(null),[x,I]=Ko(null),[b,v]=Ko(!1),[C,w]=Ko(null),[g,k]=Ko(null),[T,F]=Ko(!1),P=YX(0),L=qX(()=>{let y=++P.current;f(!1),t.list().then(_=>{y===P.current&&c(_)},()=>{y===P.current&&f(!0)})},[t]);VX(()=>{e&&L()},[e,L]);let E=y=>{F(!1),fZ(t,y.id).catch(()=>F(!0))},R=async()=>{if(!(!x||b)){v(!0),w(null);try{await z_({access:t,version:x.version,page:x.page,flushSave:a,reload:n}),I(null),o()}catch(y){w(y instanceof zl?i("Your last changes did not save, so nothing was restored. Try again."):i("The version was not restored. Nothing changed. Try again."))}finally{v(!1)}}},N=XX({onPress:()=>{R()},busy:b});return Do(jl,{children:[X(JX,{open:e,onClose:o,side:"right",size:"md",title:i("Version history"),description:Do(jl,{children:[i("Every Publish keeps a copy of the whole website: pages, menus and site styles.")," ",i("Products, prices and forms always show as they are now.")]}),footer:X("span",{className:"sf-version-foot",children:i("The newest 30 are kept. Named versions are always kept.")}),children:Do(Ul,{gap:3,children:[T?X($l,{tone:"danger",onDismiss:()=>F(!1),children:i("The preview did not open. Try again.")}):null,d?X($l,{tone:"danger",action:X(Pa,{variant:"secondary",size:"sm",onClick:L,children:i("Try again")}),children:i("Version history did not load.")}):l===null?X("p",{className:"sf-version-foot",children:i("Loading versions")}):l.length===0?X("p",{className:"sf-version-foot",children:i("No versions yet. Every Publish from now on keeps one.")}):X(aZ,{"aria-label":i("Versions"),spacing:"comfortable",children:l.map(y=>X(mZ,{version:y,expanded:m===y.id,onToggle:()=>u(_=>_===y.id?null:y.id),onPreview:()=>E(y),onRestore:()=>{w(null),I({version:y,page:null})},onRestorePage:()=>{w(null),I({version:y,page:dZ(y,s)})},onName:()=>k(y)},y.id))})]})}),X(uZ,{version:x?.version??null,page:x?.page??null,waiting:r,busy:N.busy===!0,error:C,onCancel:()=>I(null),onConfirm:N.onPress,onPage:y=>I(_=>_&&{..._,page:_.version.pages.find(A=>A.id===y)??_.page})}),X(pZ,{version:g,onCancel:()=>k(null),onSave:async y=>{await t.name(g.id,y),k(null),L()}})]})}function rR(){let{adapter:e,hasUnsavedEdits:o}=tR(),t=e.siteVersions,r=M_(),a=fc();return t?X(hZ,{open:r,onClose:N_,access:t,waiting:o||a?.state==="changed"}):null}import{useEaselSession as zB}from"efficient-easel/screen/lib/session-context";import{buildPaletteSections as Q_e,categoryLabel as eRe,paletteWithoutPinned as oRe,pinnedSection as tRe}from"efficient-easel/screen/lib/document/palette-sections";var xZ={openers:{label:"Hero & intros",icon:"image"},shop:{label:"Shop & galleries",icon:"bag"},product:{label:"Product page",icon:"box"},checkout:{label:"Checkout & ordering",icon:"bag"},about:{label:"About & brand story",icon:"book"},content:{label:"Text & content",icon:"type"},proof:{label:"Stats & social proof",icon:"star"},promo:{label:"Promotions & sign-ups",icon:"sparkles"},blog:{label:"Blog & journal",icon:"newspaper"},navigation:{label:"Navigation & wayfinding",icon:"bookmark"},legal:{label:"Legal & documents",icon:"file"},contact:{label:"Contact, FAQ & forms",icon:"mail"},structure:{label:"Layout, structure & embeds",icon:"grid"},layouts:{label:"Layouts",icon:"layers"}};function aR(e){return xZ[e]?.label}var nR=tp;import{currentEaselSession as $L}from"efficient-easel/screen/lib/session";var sR=[{text:"Ticker item"},{text:"Ticker item"},{text:"Ticker item"},{text:"Ticker item"}],lRe={label:"Scrolling Bar",defaultProps:{items:[],tone:"scrim",borders:!0,size:lp,separator:ip,scrollDirection:xl}};var lR=()=>[{text:i("Spec label"),tone:"normal"},{text:i("Spec value"),tone:"muted"},{text:i("Spec label"),tone:"normal"},{text:i("Spec value"),tone:"muted"}],dRe={label:"Spec Strip",defaultProps:{cells:[{text:"",tone:"normal"},{text:"",tone:"normal"}],fill:"dark"}};var Jf={direction:"column",justify:"between",gap:14,sectionPaddingLeft:14,sectionPaddingRight:14,sectionPaddingLeftPhone:0,sectionHeightMode:"fixed",sectionHeightValue:280,sectionHeightUnit:"px",sectionHeightModePhone:"auto"},Kl={name:"Year and title",direction:"column",gap:14};var Ea={direction:"row",share:"content",align:"center"},ql={top:14,bottom:14,topPhone:12,bottomPhone:12},Qf={wrap:"nowrap",loop:"scroll",sectionAccent:Rm,gap:60,gapPhone:32,separator:"dot",sectionBorder:{top:1,bottom:1}},iR={gap:120,gapPhone:64},eu={textStyle:"body-5",sizeToken:{step:"label",px:14,pxPhone:12},letterSpacing:.25,case:"upper",lineHeight:1.5},cR={textStyle:"heading-3",letterSpacing:.005,case:"upper",lineHeight:1},Vl={top:16,bottom:16,topPhone:12,bottomPhone:12},ou={justify:"between",wrap:"wrap",gap:32,separator:"none"},Yl={textStyle:"body-5",letterSpacing:.1,case:"upper",lineHeight:1.5};function ne(e,o,t,r={}){return{type:e,props:{...o(e),id:t(e),...r}}}function dR(e,o,t){return ne(V,e,o,{...t,sectionPaddingTop:void 0,sectionPaddingBottom:void 0})}var tu={Manifesto:(e,o)=>({type:V,props:{...e(V),id:o(V),direction:"row",share:"equal",sectionHeightMode:"screen",name:"Brand Text",content:[ne(V,e,o,{direction:"column",justify:"center",blockSpacing:"gap",name:"Text",sectionPaddingTop:100,sectionPaddingBottom:100,sectionPaddingLeft:40,sectionPaddingRight:40,content:[ne("Text",e,o,Io()),ne("Text",e,o,Wo()),ne("Text",e,o),ne("Stats",e,o)]}),dR(e,o,{direction:"column",name:"Picture",content:[]})]}}),Split:(e,o)=>({type:V,props:{...e(V),id:o(V),direction:"row",share:"equal",sectionHeightMode:"screen",sectionHeightValue:70,name:"Image & Text Split",content:[ne(V,e,o,{direction:"column",justify:"center",blockSpacing:"gap",name:"Text",sectionPaddingTop:100,sectionPaddingBottom:100,sectionPaddingLeft:60,sectionPaddingRight:60,content:[ne("Text",e,o,Io()),ne("Text",e,o,Wo()),ne("Text",e,o),ne("ButtonBlock",e,o)]}),dR(e,o,{direction:"column",name:"Image",content:[ne("ImageBlock",e,o)]})]}}),Subscribe:(e,o)=>({type:V,props:{...e(V),id:o(V),direction:"column",name:"Subscribe",content:[ne("Text",e,o,Wo()),ne("Text",e,o),ne("Form",e,o)]}}),Ticker:(e,o)=>fR("Scrolling Bar",Qf,ql,sR.map(t=>({text:t.text,style:eu,muted:!0})),e,o),SpecStrip:(e,o)=>fR("Spec Strip",{...ou,sectionBorder:{top:1}},Vl,lR().map(t=>({text:t.text??"",style:Yl,muted:t.tone==="muted"})),e,o),TimelineTrack:(e,o)=>{let t=r=>ne(V,e,o,{...Jf,name:"Year",sectionPaddingTop:0,sectionPaddingBottom:0,...r?{upcoming:!0}:{},content:[ne(V,e,o,{...Kl,sectionPaddingTop:0,sectionPaddingBottom:0,content:[ne("Text",e,o,Io()),ne("Text",e,o,Wo())]}),ne("Text",e,o)]});return{type:V,props:{...e(V),id:o(V),direction:"column",gap:48,name:"Milestone Timeline",content:[ne(V,e,o,{direction:"row",align:"end",justify:"between",share:"content",name:"Heading",content:[ne("Text",e,o,Io()),ne("Text",e,o,Wo()),ne("Text",e,o)]}),ne(V,e,o,{direction:"row",share:"equal",gap:0,line:!0,name:"Years",content:[t(!1),t(!1),t(!0)]}),ne("ButtonBlock",e,o)]}}},Timeline:(e,o)=>{let t=()=>ne(V,e,o,{direction:"row",share:[25],gap:24,name:"Chapter",content:[ne("Text",e,o,Io()),ne(V,e,o,{direction:"column",gap:12,name:"Words",content:[ne("Text",e,o,Wo()),ne("Text",e,o)]})]});return{type:V,props:{...e(V),id:o(V),direction:"row",share:[33],gap:48,name:"Story Timeline",content:[ne(V,e,o,{direction:"column",gap:24,name:"Heading",content:[ne("Text",e,o,Io()),ne("Text",e,o,Wo()),ne("Text",e,o),ne("ImageBlock",e,o),ne("ButtonBlock",e,o)]}),ne(V,e,o,{direction:"column",gap:48,line:!1,name:"Chapters",content:[t(),t(),t()]})]}}}};function fR(e,o,t,r,a,n){return ne(V,a,n,{...Ea,...o,blockSpacing:"gap",padV2:!0,name:e,sectionPaddingTop:t.top,sectionPaddingBottom:t.bottom,sectionPaddingTopPhone:t.topPhone,sectionPaddingBottomPhone:t.bottomPhone,content:r.map(s=>ne("Text",a,n,{text:s.text,...s.muted?{tone:"dim"}:{},_partStyles:{text:s.style}}))})}function uR(e){return tu[e]??null}import{phoneKey as wZ}from"efficient-easel/draw";var pR={label:"Button",defaultProps:{label:"",href:"#",variant:"primary",align:"left",contained:!0}};import{jsx as IZ}from"react/jsx-runtime";var ru={ParagraphsA:{top:60,bottom:80},StatsParagraph:{top:120,bottom:120},Timeline:{top:120,bottom:120},Footprint:{top:120,bottom:120},TimelineTrack:{top:120,bottom:120},TitleWithButtons:{top:140,bottom:140},ProcessSteps:{top:120,bottom:120},DetailRows:{top:100,bottom:100}},mR=new Set(Object.keys(ru)),xR=new Set(["Flex","Text","Heading","ImageBlock"]),gZ=new Set(["Divider"]),bZ=new Set(["Hero","HeroSingle","IntroBleed","CategoryBar","DocTabs"]),hR=new Set(["ProductGrid"]);function Fg(e,o,t=!1){let r=e.render;e.render=a=>{if(o?.(a))return r(a);let n=bc(ev(a,gc,t)),s=r(a),l=Iv(a);return n?IZ("div",{className:l?`${n.className} ${l}`:n.className,style:n.style,children:s}):s}}var PRe={name:"sectionPadding",applies:(e,o,t)=>o.isSection(e)&&!bZ.has(e)&&!!t&&typeof t.render=="function",panel(e,o,t){mR.has(o)||hR.has(o)||(e.fields={...e.fields,...t.sidesPaddingFields({tablet:!0})})},draw(e,o){if(mR.has(o)){let t=e.render,r=ru[o];e.render=a=>{let n=yc(a,r);return t({...a,padTop:n.top,padBottom:n.bottom})};return}if(hR.has(o)){Fg(e);return}xR.has(o)||gZ.has(o)||Fg(e,o==="Flex"?t=>pf(t.bgImage):void 0,!0)}},yZ=["Heading","Text","ImageBlock"],SZ=["LogoBlock"],ERe={name:"blockPadding",applies:(e,o,t)=>(yZ.includes(e)||SZ.includes(e))&&!!t&&typeof t.render=="function",panel(e,o,t){e.fields={...e.fields,...t.sidesPaddingFields({tablet:!0})}},draw(e,o){xR.has(o)||Fg(e,void 0,!0)}};import{parseHexColor as CZ}from"efficient-shell/format";import{convertLength as vZ,isLengthUnit as kZ}from"efficient-easel/screen/lib/content/length-units";var Lg=e=>kZ(e)?e:"px",Oa=(e,o,t,r)=>o===t?e:vZ(e,o,t,r,{min:0,max:200,step:4}),Yn={...K,[Nr]:""},{label:qRe,href:VRe,...TZ}=pR.defaultProps,Ve=TZ,Zt={buttonFillOpacity:0,buttonBorder:{width:0},buttonPaddingTop:0,buttonPaddingRight:0,buttonPaddingBottom:0,buttonPaddingLeft:0},ie={...Ni,sectionAccent:0},me=["gridSpan","sectionHeightMode","sectionHeightValue","sectionHeightUnit","sectionHeightModeTablet","sectionHeightValueTablet","sectionHeightUnitTablet","sectionHeightModePhone","sectionHeightValuePhone","sectionHeightUnitPhone","sectionCorners","sectionCornerSides","sectionBorder","sectionBorderTablet","sectionBorderPhone","sectionAccent","stickTop","stickTopDistance","stickTopTablet","stickTopDistanceTablet","stickTopPhone","stickTopDistancePhone","anchor","sectionAnimation","_hidden",...Object.values(Pe).flatMap(e=>[e,wZ(e)]),"widthFit","widthFitTablet","widthFitPhone","width","widthTablet","widthPhone","minWidth","minWidthTablet","minWidthPhone","maxWidth","maxWidthTablet","maxWidthPhone",...Object.values(ro)],Vn="a section width key, ignored since efficient-web-builder 45 (an old key; a section's own width has new keys, lib/content/section-width), so dropping it changes nothing",he={sectionSurface:"read by nothing in src/ (searched 2026-10-24): a retired theme key that draws nothing today, so dropping it changes nothing",widthMode:Vn,fullWidth:Vn,pageWidth:Vn,backgroundWidth:Vn,contentWidth:Vn,contentMax:Vn},ve=Object.fromEntries(["sectionPaddingLeft","sectionPaddingRight","sectionPaddingLeftTablet","sectionPaddingRightTablet","sectionPaddingLeftPhone","sectionPaddingRightPhone"].map(e=>[e,"needs Box side padding outside its gutter: the old section added it outside its frame, a Box's side padding replaces the gutter. 0 live nodes store it (JJ's read-only export, 2026-10-24)"]));function we(e,o){let t=U(e.sectionPaddingTop)??0,r=U(e.sectionPaddingBottom)??0,a=U(e.sectionPaddingTopTablet),n=U(e.sectionPaddingBottomTablet),s=Lg(e.sectionPaddingUnit),l=Lg(e.sectionPaddingUnitTablet),c=Lg(e.sectionPaddingUnitPhone),d=(f,m,u,x)=>{let I=U(f);if(I!==void 0)return I+Oa(x,"px",c,"mobile");let b=m===void 0?{n:u,unit:s}:{n:m,unit:l};return Oa(b.n,b.unit,c,"mobile")+Oa(x,"px",c,"mobile")};return{sectionPaddingTop:t+Oa(o.top,"px",s,"desktop"),sectionPaddingBottom:r+Oa(o.bottom,"px",s,"desktop"),...a===void 0?{}:{sectionPaddingTopTablet:a+Oa(o.top,"px",l,"tablet")},...n===void 0?{}:{sectionPaddingBottomTablet:n+Oa(o.bottom,"px",l,"tablet")},sectionPaddingTopPhone:d(e.sectionPaddingTopPhone,a,t,o.topPhone),sectionPaddingBottomPhone:d(e.sectionPaddingBottomPhone,n,r,o.bottomPhone)}}var Le=e=>[...["sectionPaddingTop","sectionPaddingBottom","sectionPaddingTopTablet","sectionPaddingBottomTablet","sectionPaddingTopPhone","sectionPaddingBottomPhone"].map(o=>[o,o,(t,r)=>we(r,typeof e=="function"?e(r):e)[o]]),["sectionPaddingUnit","sectionPaddingUnit"],["sectionPaddingUnitTablet","sectionPaddingUnitTablet"],["sectionPaddingUnitPhone","sectionPaddingUnitPhone"]];function To(e,o){let t=yc(e,ru[o]);return{sectionPaddingTop:t.top,sectionPaddingBottom:t.bottom}}var kr=e=>[["padTop","sectionPaddingTop",(o,t)=>To(t,e).sectionPaddingTop],["padBottom","sectionPaddingBottom",(o,t)=>To(t,e).sectionPaddingBottom],["sectionPaddingTop","sectionPaddingTop",(o,t)=>To(t,e).sectionPaddingTop],["sectionPaddingBottom","sectionPaddingBottom",(o,t)=>To(t,e).sectionPaddingBottom]],PZ={kind:"heading-case-upper",styles:["heading-1","heading-2","heading-3"]},YRe=e=>o=>no(o.props[e])?[PZ]:[],ge=(e,o)=>({kind:"text",key:e,role:"eyebrow",props:K,...o?{style:o}:{}}),IR=e=>e.background!=="transparent",EZ=(e,o)=>{let[t,r]=[e,o].map(a=>typeof a=="string"?a.trim():"");return t?r?`[${t} ]{color=text}${r}`:`[${t}]{color=text}`:r},Xl={align:"right",alignPhone:"left"},OZ=(e,o,t)=>{let r=a=>EZ(a[e],a[o]);return{kind:"block",type:"Text",when:(a,n)=>n!==void 0&&r(n)!=="",box:[[e,"text",(a,n)=>r(n)],[o,"text",(a,n)=>r(n)]],props:t}},Zl=(e,o,t,r={})=>OZ(e,o,{...Yn,...Xl,...r,_partStyles:{text:{textStyle:"body-5",color:"labels",...t,case:"upper",...Xl}}}),Jl=(e,o)=>typeof e=="number"&&Number.isInteger(e)&&e>=0?e:Kf(o)?.selected??0,gR="var(--site-surface)",bR="var(--site-surface-2)",Ql=(e,o)=>Kf(o)?.themes[Jl(e.sectionAccent??0,o)],Po=e=>(o,t)=>{let r=Ql(o,t)?.[e];return r?{fillColor:r}:{}},yR=e=>e.startsWith("#")&&CZ(e)!==null,au=(e,o,t)=>{let r=e?.trim();if(r&&yR(r))return{fillColor:r};if(r===gR)return Po("surface")(o,t);let a=r===bR?Ql(o,t):void 0;return a?{fillColor:Ci(a)}:{}},nu=e=>{let o=e?.trim();return!o||o==="transparent"||o===mo||o===gR||o===bR||yR(o)?void 0:"it paints a colour that no Box Fill can hold"},ei=(e,o)=>{let t=Ql(e,o)?.line;return t?{buttonBorder:{width:1,color:t}}:{}},_a=(e,o)=>{let t=Kf(o)?.themes;return t&&IR(e)?ny(t,Jl(e.sectionAccent,o)):-1},Tr=(e,o,t)=>{let r=_a(o,t);return r>=0?r:e},Ra=(e,o)=>{let t=_a(e,o);return t>=0?{sectionAccent:t}:{}},Pr=(e,o)=>IR(e.props)&&_a(e.props,o)<0?[{kind:"band-preset",page:Jl(e.props.sectionAccent,o)}]:[],Xn=e=>Rc(e.site?.siteGutter),oi=Object.fromEntries(["Top","Right","Bottom","Left","TopPhone","RightPhone","BottomPhone","LeftPhone"].map(e=>[`sectionPadding${e}`,0])),ti=e=>({top:0,right:0,bottom:0,left:0,...e}),Bg=(e,o,t,r=[])=>({kind:"group",name:e,keepEmpty:!0,props:(a,n)=>({...D,...oi,...Po("surface")(a,n),...typeof t=="function"?t(a,n):t}),box:[[o,"bgImage"],Be.kind,Be.duration,Be.delay],parts:r});import{phoneKey as OJ,readHidable as ob}from"efficient-easel/draw";import{jsx as fi,Fragment as xJ,jsxs as KR}from"react/jsx-runtime";import{jsx as Ug,jsxs as tJ}from"react/jsx-runtime";import{jsx as _Z}from"react/jsx-runtime";function SR(){return _Z("span",{className:"block h-px w-[30px] bg-current"})}import{jsxs as li,jsx as $e}from"react/jsx-runtime";import{Fragment as DR}from"react";import{Fragment as KZ,jsx as Gg}from"react/jsx-runtime";import{Fragment as TR,jsx as ai,jsxs as MZ}from"react/jsx-runtime";import{createContext as zg,useContext as ni,useEffect as HZ,useId as WZ,useMemo as zZ,useRef as GZ}from"react";import{armEntrance as $Z}from"efficient-shell/format";import{jsx as FZ}from"react/jsx-runtime";import{useEffect as kR,useRef as vR,useState as LZ}from"react";import{armEntrance as BZ,entranceAttrs as DZ,playEntrance as NZ}from"efficient-shell/format";import{jsx as ri}from"react/jsx-runtime";import{createContext as CR,useContext as Aa}from"react";var wR={stretchedRow:!1,fillingColumn:!1},Fa=CR(null),tAe=()=>Aa(Fa)!==null,rAe=()=>Aa(Fa);var su=CR(!1);function RZ(){let e=Aa(Fa)?.stretchedRow===!0,o=Aa(su);return e&&!o}var AZ=()=>Aa(su);function Dg(){let e=Aa(Fa),o=RZ(),t=AZ();return{fill:t?` ${hv}`:"",inner:r=>{let a=o||t?ri(su.Provider,{value:!0,children:r}):r;return e?.columnsRow?ri(Fa.Provider,{value:{...e,columnsRow:!1},children:a}):a}}}function aAe({className:e,style:o,attrs:t,children:r}){let{fill:a,inner:n}=Dg();return ri("div",{className:`${e}${a}`,...o?{style:o}:{},...t,children:n(r)})}function nAe({children:e}){let o=Aa(Fa),t=o===null?null:o.id===void 0?wR:{...wR,id:o.id};return ri(Fa.Provider,{value:t,children:ri(su.Provider,{value:!1,children:e})})}function Mg({desktop:e,phone:o,editing:t,boxClass:r,boxAttrs:a,boxStyle:n,children:s}){let l=vR(null),c=Dg(),d=Hg(l),f=d?o:e,{attrs:m,style:u}=DZ(f),x=vR(Ng.seed(e,o)),I=JSON.stringify(e),b=JSON.stringify(o);return kR(()=>{let v=l.current;if(v){if(t){let C=Ng.next(x.current,e,o,d);x.current=C.seen,C.play&&NZ(v);return}return BZ(v)}},[I,b,d,t]),FZ("div",{ref:l,className:`${tf}${c.fill}${r?` ${r}`:""}`,...a,...m,...Object.keys(u).length||n?{style:{...n,...u}}:{},children:c.inner(s)})}var Ng={seed(e,o){return{desktop:JSON.stringify(e),phone:JSON.stringify(o)}},next(e,o,t,r){let a=Ng.seed(o,t);return{play:r?a.phone!==e.phone:a.desktop!==e.desktop,seen:a}}};function Hg(e,o=!0){let[t,r]=LZ(!1);return kR(()=>{if(!o)return;let a=e.current?.ownerDocument?.defaultView??(typeof window>"u"?null:window);if(!a?.matchMedia)return;let n=a.matchMedia(xn),s=()=>r(n.matches);return s(),n.addEventListener("change",s),()=>n.removeEventListener("change",s)},[e,o]),t}var lu=zg(null),ER=zg(null),OR=zg(null);function SAe({needles:e,styles:o,motions:t=jE,type:r,children:a}){let n=WZ(),s=JSON.stringify([n,e,o,t,r]),l=zZ(()=>{let d=Object.keys(t).filter(f=>qE(t[f]));return bP(e,o,n,f=>wl(r,f),f=>hP(r,f),f=>d.includes(f)?FI(t[f]):null,d)},[s]);if(!l)return ai(TR,{children:a});let c=yP(l);return MZ(TR,{children:[c&&ai("style",{href:`${UZ}${n}-${jZ(c)}`,precedence:RR,dangerouslySetInnerHTML:{__html:c.replace(/</g,"\\3c ")}}),ai(lu.Provider,{value:l,children:a})]})}var Wg=new WeakMap;function PR(e,o){let t=YE(o.filter(r=>r.arm));for(let r of o)r===t||!r.undo||(r.undo(),r.undo=void 0);t?.arm&&!t.undo&&(t.undo=t.arm()),o.some(r=>r.lift)?(ZE(e.ownerDocument),e.setAttribute(mf,"")):e.removeAttribute(mf)}function _R(e){let o=GZ(null),t=e?.motion?.entrance??null,r=e?.motion?.hover==="lift",a=Hg(o,t!==null),n=JSON.stringify(t);return HZ(()=>{let s=o.current,l=XE(s?.parentElement??null);if(!t&&!r||!s||!l)return;let c=t?()=>{let m=VE(l,a?t.phone:t.desktop),u=$Z(l);return()=>{u?.(),m()}}:null,d=Wg.get(l)??[];Wg.set(l,d);let f={element:s,arm:c,lift:r};return d.push(f),PR(l,d),()=>{let m=d.indexOf(f);m<0||(d.splice(m,1),f.undo?.(),f.undo=void 0,PR(l,d),d.length||Wg.delete(l))}},[n,r,a]),o}var RR="sf-part-styles",UZ=`${RR}-`;function jZ(e){let o=2166136261;for(let t=0;t<e.length;t+=1)o^=e.charCodeAt(t),o=Math.imul(o,16777619);return(o>>>0).toString(36)}function AR(e){let o=ni(lu),t=ni(ER),r=SP(o,e);return r&&r.stamp!==t?r:null}function wAe(e){return bx(ni(lu),e)}function FR({stamp:e,children:o}){return ai(ER.Provider,{value:e,children:o})}function CAe({children:e}){let o=ni(lu);return ai(OR.Provider,{value:o,children:e})}function vAe(e){return bx(ni(OR),e)}function si({value:e,children:o}){let t=AR(e),r=_R(t);return t?Gg(FR,{stamp:t.stamp,children:Gg("span",{ref:r,[cx]:t.stamp,...t.textStyle?{[wn]:t.textStyle}:{},children:o})}):Gg(KZ,{children:o})}import{jsx as $g,Fragment as qZ}from"react/jsx-runtime";function LR({className:e=""}){return $g("sup",{className:`text-accent tracking-normal text-[length:min(1em,max(0.75em,11px))] ${e}`,children:"\xAE"})}function iu(e){if(!e.includes("\xAE"))return e;let o=e.split("\xAE"),t=[];return o.forEach((r,a)=>{r&&t.push(r),a<o.length-1&&t.push($g(LR,{},`r${a}`))}),$g(qZ,{children:t})}var RAe=LR;function qo(e,o=!1,t){let r=oJ(o),a=is(e);if(a.length===1){let[s]=a,l=sp(s),c=l?QZ(l,s.children):s.children;return li(si,{value:e,children:[t,cu(c,r)]})}let n=[];return a.forEach((s,l)=>{if(s.bullet){n.push($e("span",{"data-sf-bullet":"",className:VZ,children:cu(s.children,r)},l));return}if(s.number!=null){n.push(li("span",{"data-sf-number":s.number,className:YZ,children:[li("span",{className:XZ,children:[s.number,"."]}),cu(s.children,r)]},l));return}l>0&&!ZZ(a[l-1])&&n.push($e("br",{},`br${l}`)),n.push($e(DR,{children:cu(s.children,r)},l))}),li(si,{value:e,children:[t,n]})}var VZ="relative block pl-6 before:absolute before:left-1.5 before:font-bold before:text-accent before:content-['\xB7']",YZ="relative block pl-[2em]",XZ="absolute left-0 w-[1.6em] text-right tabular-nums";function ZZ(e){return e.bullet||e.number!=null}var JZ="text-accent underline underline-offset-[0.18em]";function QZ(e,o){let[t,...r]=o;return t?.kind==="text"?[{kind:"text",text:`${e}${t.text}`},...r]:[{kind:"text",text:e},...o]}function eJ(e){return In(e)||void 0}function cu(e,o){let t=[],r=!1;return e.forEach((a,n)=>{if(a.kind==="text"){t.push($e("span",{children:iu(a.text)},n)),r=!0;return}r||t.push($e("span",{},`e${n}`)),t.push(NR(a,n,o)),r=!1}),r||t.push($e("span",{},"end")),t}function BR(e,o){return e.length===1&&e[0].kind==="text"?iu(e[0].text):e.map((t,r)=>t.kind==="text"?$e(DR,{children:iu(t.text)},r):NR(t,r,o))}function oJ(e){return e?"font-normal italic text-accent":"not-italic text-accent"}function WAe(e){return $e(si,{value:e,children:$e("span",{children:e})})}function NR(e,o,t){if(e.kind==="link")return $e("a",{href:e.href,className:JZ,children:BR(e.children,t)},o);let r=BR(e.children,t),a=Ky[e.kind];if(a)return $e("span",{[qy]:a,children:r},o);switch(e.kind){case"underline":return $e("u",{children:r},o);case"sup":return $e("sup",{children:r},o);case"sub":return $e("sub",{children:r},o);case"color":{let n=eJ(e.color);return n?$e("span",{style:{color:n},children:r},o):$e("span",{children:r},o)}case"accent":case"highlight":return $e("em",{className:t,children:r},o);case"bold":return $e("strong",{className:"font-semibold",children:r},o);case"italic":return $e("em",{className:"italic",children:r},o);case"strike":return $e("s",{className:"line-through",children:r},o);default:return $e("span",{children:r},o)}}function MR(e,o=!0){let t=e.split(`
|
|
42
|
+
`);return $e(si,{value:e,children:t.map((r,a)=>li("span",{children:[qo(r,o),a<t.length-1?$e("br",{}):null]},a))})}function HR(e){return e.split(/\n\s*\n/).map(o=>o.trim()).filter(Boolean)}var jg={labelUpTo800:"max-view-wide:text-[length:var(--size-label,12px)]",labelSmall:"text-[length:var(--size-label,12px)]",labelLarge:"text-[length:var(--size-label,14px)]"};function rJ(e,o){return`font-mono text-[length:var(--size-label,${e}px)] uppercase tracking-[0.3em] text-accent`}var aJ=`inline-block w-fit bg-accent px-3.5 py-1.5 font-mono ${jg.labelSmall} font-semibold uppercase tracking-[0.16em] text-bg`,nJ=`flex items-center gap-3.5 font-mono ${jg.labelLarge} uppercase tracking-[0.3em] opacity-80 ${jg.labelUpTo800} max-view-wide:tracking-[0.25em]`;function WR({text:e,look:o="plain",size:t=13,scaled:r=!0,className:a="",classNameAfter:n=""}){if(o==="line")return tJ("div",{className:[a,nJ,n].filter(Boolean).join(" "),children:[Ug(SR,{}),Ug("span",{children:qo(e)})]});let s=o==="filled"?aJ:rJ(t,r);return Ug("span",{className:[a,s,n].filter(Boolean).join(" "),children:qo(e)})}import{jsx as bo,Fragment as qg}from"react/jsx-runtime";import{createContext as di,useContext as _t}from"react";import{isNodeList as sJ}from"efficient-easel/data";var lJ=new Set(["Flex","Grid"]);function zR(e){return typeof e=="string"&&lJ.has(e)}var iJ="contentWidth",cJ="full",dJ="content";function fJ(e){let o=e?.[iJ];return o===cJ?!1:o===dJ?!0:void 0}function GR(e,o){return e&&!o}function $R(e){return e.loop==="scroll"&&e.direction!=="tabs"&&e.direction!=="accordion"&&!pf(typeof e.bgImage=="string"?e.bgImage:null)&&!oE(e.scrollDirection)}function uJ(e,o){return zR(e)&&$R(o)?Lc({}):Lc(o)}function XAe(e){return e!=="full"}function ZAe(e,o,t){if(!Array.isArray(e)||typeof o!="string")return;let r=(a,n,s,l)=>{for(let c of a){let d=c?.props??{};if(d.id===o)return n;let f=zR(c?.type),m=(l?uJ(c?.type,d).content:null)==="content"?!0:s,u=f&&(n.inBox?fJ(d)??m:m),x={insideGutter:n.insideGutter||u||f&&$R(d),inBox:n.inBox||f};for(let I of Object.values(d)){if(!sJ(I))continue;let b=r(I,x,m,!1);if(b!==void 0)return b}}};return r(e,{insideGutter:!1,inBox:!1},t,!0)}var ii=di(!1);function nFe(){return _t(ii)}function UR({children:e}){return bo(ii.Provider,{value:!0,children:e})}var Kg=di(!1);function sFe({children:e}){return bo(Kg.Provider,{value:!0,children:e})}var Vg=di(!1);function pJ(){return _t(Vg)}function lFe({atTop:e,nested:o}){return bo(qg,{children:pJ()?o:e})}var ci=di(void 0);function iFe({children:e}){return bo(ci.Provider,{value:null,children:e})}function mJ(){return _t(ci)===void 0&&!_t(Vg)&&!_t(ii)}function cFe({own:e,followed:o}){return bo(qg,{children:mJ()?e():o()})}var jR=di(null);function dFe({value:e,children:o}){return bo(jR.Provider,{value:e,children:o})}function fFe({draw:e}){return bo(qg,{children:e(_t(jR))})}function uFe(){return _t(ci)??null}function pFe({contained:e,framedClass:o,fillClass:t,columnClass:r,style:a,tabLabel:n,pad:s,border:l,outerAttrs:c,box:d=!1,edge:f=!1,outerStyle:m,bleed:u=!1,children:x}){let I=_t(ii),b=_t(Kg),v=GR(e,I),C=v&&!b,w=s&&!C?tv(s.values,s.frame):null,g=l&&!C?l:null,k=d&&!u?Hv:null,T=[C?o:t,C?k:null,w?.className,g?Cv:null].filter(Boolean).join(" "),F=hJ(u&&C,w||g?{...a,...w?.style,...g}:a),P=_t(ci),L=d&&f&&P===void 0?{gutter:v,...s?{pad:s.values}:{}}:null,E=d?bo(Vg.Provider,{value:!0,children:bo(ci.Provider,{value:L,children:x})}):x,R=v?bo(ii.Provider,{value:!0,children:E}):E,N=s&&C?ov(s.values):null,y=c&&Object.keys(c).length>0?c:null,_=bo("div",{...N?null:y,className:T,style:N||!m?F:{...F,...m},"data-tab-label":n,children:b?bo(Kg.Provider,{value:!1,children:v&&!u?bo("div",{className:k?`${r} ${k}`:r,children:R}):R}):R}),A=N?bo("div",{...y,className:N.className,style:m?{...N.style,...m}:N.style,children:_}):_;return l&&C?bo("div",{className:wv,style:{display:"contents",...l},children:A}):A}function hJ(e,o){return e?{...o,paddingLeft:0,paddingRight:0}:o}var qR={headingMediumUpTo800:"max-view-wide:text-[length:min(var(--size-headingMedium,32px),var(--sf-heading-max,9999px))]",headingMedium:"text-[length:min(var(--size-headingMedium,44px),var(--sf-heading-max,9999px))]"},IJ="mx-auto max-w-[var(--sf-site-width,1600px)] px-[var(--sf-site-gutter,40px)] py-[72px] max-[960px]:px-[min(24px,var(--sf-site-gutter,40px))]",gJ="mx-auto max-w-[var(--sf-site-width,1600px)] px-[var(--sf-site-gutter,40px)] pt-0 pb-[72px] max-[960px]:px-[min(24px,var(--sf-site-gutter,40px))]",bJ="sf-card grid grid-cols-1 gap-px border border-line bg-line view-tablet:[grid-template-columns:repeat(var(--cd-cols),minmax(0,1fr))]",Er={phone:{tl:"max-view-tablet:[border-top-left-radius:inherit]",tr:"max-view-tablet:[border-top-right-radius:inherit]",bl:"max-view-tablet:[border-bottom-left-radius:inherit]",br:"max-view-tablet:[border-bottom-right-radius:inherit]"},wide:{tl:"view-tablet:[border-top-left-radius:inherit]",tr:"view-tablet:[border-top-right-radius:inherit]",bl:"view-tablet:[border-bottom-left-radius:inherit]",br:"view-tablet:[border-bottom-right-radius:inherit]"}};function bFe(e,o,t){let r=du(t),a=o-1,n=Math.floor(a/r)*r,s=[];return e===0&&s.push(Er.phone.tl,Er.phone.tr,Er.wide.tl),e===a&&s.push(Er.phone.bl,Er.phone.br),e===r-1&&o>=r&&s.push(Er.wide.tr),e===n&&s.push(Er.wide.bl),e===a&&o%r===0&&s.push(Er.wide.br),s.join(" ")}function du(e){return Math.min(4,Math.max(2,e??3))}function yFe({look:e,eyebrow:o,title:t,columns:r,omitHead:a=!1,editing:n=!1,cards:s}={}){let l=du(r),c=!!(o??"").trim()||!!(t??"").trim();return!n&&!c&&!s?null:fi("section",{className:"relative z-[2] bg-surface",children:KR("div",{className:a?gJ:IJ,children:[a?null:KR(xJ,{children:[(o??"").trim()&&fi(WR,{text:o??"",look:e,className:"mb-4 block"}),(t??"").trim()&&fi("h2",{className:`mb-9 font-heading2 ${qR.headingMedium} font-medium uppercase leading-none tracking-[-0.02em] text-fg max-view-wide:mb-7 ${qR.headingMediumUpTo800}`,children:MR(t??"",!1)})]}),s?fi("div",{className:bJ,style:{"--cd-cols":String(l),overflowY:"visible"},children:fi(UR,{children:s})}):null]})})}var CFe={eyebrow:"Label",title:"Section *heading.*"},yJ={template:kS()},VR={label:"Cards",fields:yJ,defaultProps:{eyebrow:"",title:"",items:[],columns:3}};var TFe={eyebrow:"Highlight",title:"Key *features.*"},PFe=()=>[{label:i("Feature label one")},{label:i("Feature label two")},{label:i("Feature label three")},{label:i("Feature label four")},{label:i("Feature label five")},{label:i("Feature label six")}],YR={label:"Key Features",defaultProps:{eyebrow:"",title:"",items:[],columns:3}};import{readHidable as SJ}from"efficient-easel/draw";function pu(e){if(e==="ProductGrid")return"shelf";let o=go[e]?.headStyle;return o==="editorial"||o==="simple"||o==="essay"?o:"standard"}var JR={standard:64,editorial:60,simple:36,essay:28,shelf:20},wJ={SectionHeader:"accent",FAQ:"accent",FitmentFinder:"accent",FitmentTable:"accent",SpecTable:"accent",RelatedProducts:"accent",Collections:"accentNum"};function CJ(e){if(e==="SectionHeader")return{num:"num",title:"title",description:"description",link:!0};let o=go[e];if(!o)throw new Error(`section-head-looks: "${e}" has no head row in SPLITTABLE_SECTIONS`);return{num:o.num,title:o.title,description:o.description,link:o.headRows.includes("linkText")&&o.headRows.includes("linkHref")}}function QR(e,o,t){let r=`editorial:${e}|${o}|${t}`,a=uu.get(r);if(a)return a;let n=oA({num:e,title:o,description:t,link:!1});return uu.set(r,n),n}var Xg={top:0,right:0,bottom:1,left:0},Vo=(e,o,t,r)=>({sizeToken:{step:e,px:r,fluid:{minPx:o,vw:t}}}),mu=(e,o,t={})=>ge(e,{...G("label",o),...t}),vJ=(e,o)=>{let t=SJ(e).text.trim();return/\s/.test(t)?{minWidth:Math.ceil(t.length*o*.9),minWidthPhone:0,widthFitPhone:"fill"}:{}},hu=(e,o)=>({kind:"text",key:e,role:"heading",props:K,style:{textStyle:"heading-2",...o}}),Zg=800,Jg=(e,o,t,r)=>({kind:"text",key:e,props:{...de,align:"right",alignPhone:"left",...t?{maxWidth:t,maxWidthPhone:Zg}:{}},style:{textStyle:"body-5",fontRole:"heading",alignPhone:"left",...G("body",o),...r}}),eA={...Ve,align:"right",alignPhone:"left",...Zt,icon:"arrow-right",iconPosition:"after"},Yg=e=>({kind:"button",key:"linkText",href:"linkHref",variant:"ghost",props:eA,style:{textStyle:"body-5",color:"labels",...G("label",e),letterSpacing:.2,case:"upper"}}),XR=(e,o,t)=>{let r=t.role==="heading"?{tag:"h2"}:{};return{kind:"block",type:"Text",when:a=>a[e]===void 0,props:{...K,...r,...t.props,text:o,_partStyles:{text:{...t.role==="eyebrow"?kJ(Io()):{},...t.style}}}}},kJ=e=>e._partStyles.text??{},fu={widthFitPhone:"fill"};function TJ(e,o){let t=wJ[e],r=t==="accent",a=mu(o.num,14,{color:r?"accent":"labels"}),n=t==="accentNum"&&a.kind==="text"?{...a,mark:"accentLead"}:a,s=hu(o.title,r?{...Vo("headingMedium",36,5,64),case:"upper",lineHeight:.95,letterSpacing:-.025}:{...G("headingMedium",56,36),case:"none",lineHeight:1,letterSpacing:-.03}),l=e==="Collections";return{kind:"group",name:"Header",props:{...D,direction:"row",align:"end",justify:"between",gap:40,gapPhone:12,share:"content",sectionBorder:Xg,sectionPaddingBottom:24,sectionPaddingBottomPhone:20},parts:[{kind:"group",name:"Title",props:{...D,...fu,direction:"row",align:"end",gap:40,gapPhone:12,share:"content"},parts:[{kind:"group",name:"Number",props:{...D,...fu,align:"start",gap:12},parts:[{kind:"image",key:"logoSrc",alt:"logoAlt",props:{aspect:"auto",contained:!1}},n,...l?[XR(o.num,"==01== / Collections",n)]:[]]},{kind:"group",name:"Heading",props:{...D,...fu},parts:[s,...l?[XR(o.title,`Three ranges,
|
|
43
|
+
one standard.`,s)]:[]]}]},{kind:"group",name:"Words",props:{...D,...fu,gap:12,maxWidth:340,maxWidthPhone:Zg},parts:[...o.description?[Jg(o.description,14,void 0,{lineHeight:1.5})]:[],...o.link?[Yg(14)]:[],...l?[{kind:"block",type:"ButtonBlock",props:{...eA,variant:"ghost",label:"View all",href:"/wheels",_partStyles:{label:Yg(14).style}}}]:[]]}]}}function oA(e){return{kind:"group",name:"Header",props:{...D,direction:"row",align:"end",justify:"between",gap:40,gapPhone:14,share:"content",sectionBorder:Xg,sectionPaddingBottom:32},parts:[{kind:"group",name:"Title",props:{...D,direction:"row",align:"end",gap:40,gapPhone:14,share:"content"},parts:[{kind:"group",name:"Number",props:o=>({...D,sectionPaddingBottom:8,...vJ(o[e.num],13)}),parts:[mu(e.num,13)]},hu(e.title,{...Vo("headingMedium",40,5.5,80),case:"upper",weight:500,lineHeight:1,letterSpacing:-.03})]},{kind:"group",name:"Words",props:{...D,sectionPaddingBottom:4,maxWidth:360,maxWidthPhone:Zg},parts:e.description?[Jg(e.description,14,void 0,{lineHeight:1.5})]:[]}]}}function ZR(e,o){return{kind:"group",name:"Header",props:{...D,gap:16,gapPhone:16},parts:[mu(e.num,13),hu(e.title,o)]}}var tA=[["para",{textStyle:"body-5",...G("label",13),case:"upper",weight:400,lineHeight:1,letterSpacing:.22}],["sm",{...G("headingMedium",40,28),case:"none",weight:500,lineHeight:1,letterSpacing:-.03}],["md",{...G("headingMedium",48,32),case:"none",weight:500,lineHeight:1,letterSpacing:-.03}],["lg",{...G("headingMedium",56,36),case:"none",weight:500,lineHeight:1,letterSpacing:-.03}],["xl",{...G("headingMedium",64,40),case:"none",weight:500,lineHeight:1,letterSpacing:-.03}]],PJ=e=>tA.some(([o])=>o===e.titleSize)?e.titleSize:"lg";function EJ(e){return{kind:"group",name:"Header",props:{...D,direction:"row",align:"center",justify:"between",gap:16,share:"content",stickTop:!0,sectionBorder:Xg,sectionPaddingTop:12,sectionPaddingBottom:12},parts:[{kind:"group",name:"Title",props:{...D,direction:"row",align:"end",gap:24,share:"content"},parts:[mu(e.num,13,{color:"labels",letterSpacing:.22,lineHeight:1}),...tA.map(([o,t])=>({...hu(e.title,t),when:r=>PJ(r)===o}))]},{kind:"group",name:"Words",props:{...D,direction:"row",align:"center",justify:"end",gap:20,share:"content"},parts:[...e.description?[Jg(e.description,13,340,{lineHeight:1.4})]:[],...e.link?[Yg(13)]:[]]}]}}function rA(e){return pu(e)==="shelf"?{titleSize:"the Header Box's title Text part: its size, as the old shelf title drew it (lib/document/blocks/general/section-head-looks)"}:{}}var uu=new Map;function Rt(e){let o=uu.get(e);if(o)return o;let t=CJ(e),r=pu(e),a=r==="editorial"?oA(t):r==="simple"?ZR(t,{...G("headingMedium",44,32),case:"upper",weight:500,lineHeight:1,letterSpacing:-.02}):r==="essay"?ZR(t,{...G("headingMedium",38,28,"headingSmall"),case:"upper",lineHeight:1,letterSpacing:-.02}):r==="shelf"?EJ(t):TJ(e,t);return uu.set(e,a),a}var La={Series:"transparent",StatsParagraph:"transparent",TimelineTrack:mo,Stats:void 0};var Or=(e,o,t,r)=>({sectionBorder:{top:e,right:o,bottom:t,left:r}}),uA=e=>o=>du(U(o.columns)??U(e.columns)),pA=e=>({kind:"group",name:"Grid",props:{...D,gap:0,...Or(1,0,0,1)},parts:[e]}),mA={...D,direction:"row",gap:0,share:"equal"},hA="its head sits in a Box of its own above it (own-box): the row draws the head inline",xA=e=>t_(e.headPlacement)==="own-box",IA="inline is the head the row draws; an own-box node is skipped (`skip`)",_J=e=>({kind:"group",name:"Heading",props:e,parts:[ge("eyebrow"),{kind:"text",key:"title",role:"heading",props:K,style:{textStyle:"heading-3",case:"upper"},was:{size:44}}]}),aA={top:72,bottom:72,topPhone:72,bottomPhone:72},RJ={...bp,...Or(0,1,1,0)},AJ={name:"Cards",boxProps:(e,o)=>({...ie,direction:"column",gap:36,gapPhone:28,...Po("surface")(e,o),...we(e,aA)}),box:[...me,...Le(aA)],skip:e=>xA(e)?hA:typeof e.dataSource=="string"&&e.dataSource?"its cards come from a source: they are drawn from the card template on Cards":e.template!==void 0?"its cards are drawn from its own card template (an emptied one draws none): the shape the other rows land on":e.cardStyle==="label-only"?"Label only is Key Features' look: no live node holds it, so it has no row of its own yet":void 0,parts:[Rt("Cards"),pA({kind:"list",key:"items",name:"Card",perRow:uA(VR.defaultProps),rowName:"Row",rowProps:mA,props:(e,o)=>({...RJ,...Po("background")(e,o)}),parts:[{kind:"text",key:"title",props:K,style:yp},{kind:"text",key:"body",props:de,style:Sp}]})],drop:{...he,...ve,columns:"the rows of N: one Row Box per `columns` cards, which the Box draws as N equal blocks",cardStyle:"the standard card is what the row draws; a Label only node is skipped (0 live nodes)",dataSource:"an empty source is typed cards, what the row draws; a sourced node is skipped (0 live nodes)",dataSourceOptions:"read only with a source; a sourced node is skipped (0 live nodes)",template:"an empty card template is typed cards, what the row draws; a node with a template is skipped",highlightedCard:"read only with a card template; a node with a template is skipped",highlightBadge:"read only with a card template; a node with a template is skipped",headPlacement:IA,eyebrowLook:"needs the eyebrow's Filled look on a Text block: Plain is the eyebrow start look the row draws; 2 of 62 live nodes store it (JJ's export, 2026-10-24)"}},nA={top:76,bottom:76,topPhone:76,bottomPhone:76},FJ={...D,direction:"row",align:"center",gap:16,sectionPaddingTop:32,sectionPaddingRight:28,sectionPaddingBottom:32,sectionPaddingLeft:28,...Or(0,1,1,0)},sA={textStyle:"body-1",color:"text"},lA=(e,o)=>typeof o?.href=="string"&&o.href.trim()!=="",LJ={name:"Key Features",boxProps:e=>({...ie,direction:"column",gap:44,...Or(1,0,1,0),...we(e,nA)}),box:[...me,...Le(nA)],parts:[_J({...D,direction:"row",align:"end",gap:20,wrap:!0,share:"content"}),pA({kind:"list",key:"items",name:"Feature",perRow:uA(YR.defaultProps),rowName:"Row",rowProps:mA,props:FJ,parts:[{kind:"button",key:"label",href:"href",when:lA,variant:"ghost",props:{...Ve,...Zt,icon:"none"},style:sA},{kind:"text",key:"label",when:(e,o)=>!lA(e,o),props:K,style:sA,was:{size:17}}]})],drop:{...he,...ve,columns:"the rows of N: one Row Box per `columns` cells, which the Box draws as N equal blocks",eyebrowLook:"needs the eyebrow's Filled look on a Text block: Filled is Key Features' own default (lib/sections/section-eyebrow-look), so 20 of 21 published nodes draw it with nothing stored; the row draws the Plain start look (JJ's export, 2026-10-24)"}},iA={top:120,bottom:120,topPhone:80,bottomPhone:80},eb=e=>{let o=Ct(typeof e.background=="string"?e.background:void 0,La.Series);return o&&o!=="transparent"?o:void 0},Qg=e=>eb(e)===mo,BJ={...D,justify:"between",gap:16,gapPhone:16,sectionHeightMode:"fixed",sectionHeightValue:340,sectionHeightUnit:"px",sectionPaddingTop:36,sectionPaddingRight:28,sectionPaddingBottom:32,sectionPaddingLeft:28,sectionPaddingTopPhone:36,sectionPaddingRightPhone:28,sectionPaddingBottomPhone:32,sectionPaddingLeftPhone:28},cA={...D,direction:"row",justify:"between",gap:12,share:"content",phoneRow:2,[OJ("share")]:"content"},dA={textStyle:"body-5",...G("label",12),letterSpacing:.22,case:"upper",lineHeight:1.5},DJ=e=>no(e.viewLabel)&&!ob(e.viewLabel).hidden,Jt=e=>ob(e).text?.trim?.()??"",gA=e=>Object.fromEntries(Object.entries(e).filter(([,o])=>oe(o)!==void 0)),NJ={name:"Recurring Columns",boxProps:(e,o)=>({...ie,direction:"column",gap:60,gapPhone:60,...Or(0,0,1,0),...Qg(e)?Ra(e,o):{},...au(eb(e),e,o),...we(e,iA)}),box:[...me.filter(e=>e!=="sectionAccent"),["sectionAccent","sectionAccent",(e,o,t)=>Qg(o)?Tr(e,o,t):e],...Le(iA)],skip:e=>nu(eb(e))??(xA(e)?hA:void 0),site:(e,o)=>Qg(e.props)?Pr(e,o):[],parts:[Rt("Series"),{kind:"core",as:"Cards",keep:[],props:{columns:4},derive:{reads:["cards"],props:e=>({items:(Array.isArray(e.cards)?e.cards:[]).map(o=>gA({num:Jt(o.num),since:Jt(o.since),title:Jt(o.title),body:Jt(o.desc),count:[Jt(o.entries),Jt(o.entriesLabel)].filter(Boolean).join(" ")}))})},slots:(e,o)=>({template:[{type:V,props:{...BJ,...Po("background")(e,o),name:"Card"},slots:{[je]:[{type:V,props:{...D,name:"Words",gap:16,gapPhone:16},slots:{[je]:[{type:V,props:{...cA,name:"Top"},slots:{[je]:[Qo("num",K,G("label",13),!0),Qo("since",K,G("label",13),!0)]}},Qo("title",{...K,tag:"h3"},{textStyle:"heading-3",...G("headingSmall",28),weight:500,case:"upper",lineHeight:1.04,letterSpacing:-.02}),Qo("body",de,{textStyle:"body-5",fontRole:"heading",...G("body",14),lineHeight:1.6})]}},{type:V,props:{...cA,name:"Footer",align:"center",gap:0,gapPhone:0,sectionPaddingTop:16,sectionPaddingTopPhone:16,...Or(1,0,0,0)},slots:{[je]:[Qo("count",de,dA),...DJ(e)?[{type:V,props:{...D,name:"View",maxWidthPhone:266},slots:{[je]:[{type:"Text",props:{...K,text:ob(e.viewLabel).text,_partStyles:{text:{...Io()._partStyles.text,...dA}}}}]}}]:[]]}}]}}]})}],reads:{viewLabel:"a Text typed once in the card template: the far end of every card's footer",background:"the Box's theme (the band preset) or its Fill"},drop:{...he,...ve,headPlacement:IA}},fA={top:60,bottom:60,topPhone:40,bottomPhone:40},MJ={...D,gap:8,gapPhone:8,...Ho(24),...Or(1,1,1,1)},HJ={name:"Document Detail Cards",boxProps:e=>({...ie,direction:"column",gap:40,gapPhone:16,...Or(0,0,1,0),...we(e,fA)}),box:[...me,...Le(fA)],parts:[{kind:"core",as:"Cards",keep:[],props:{columns:3},derive:{reads:["cards"],props:e=>({items:(Array.isArray(e.cards)?e.cards:[]).map(o=>gA({label:Jt(o.label),value:Jt(o.value),body:Jt(o.desc)}))})},slots:(e,o)=>({template:[{type:V,props:{...MJ,...Po("surface")(e,o),name:"Card"},slots:{[je]:[Qo("label",K,{...G("label",12),lineHeight:1.5},!0),{type:V,props:{...D,name:"Words",gap:14,gapPhone:14},slots:{[je]:[Qo("value",K,{textStyle:"heading-3",...G("headingSmall",20),weight:500,letterSpacing:-.015,lineHeight:1.5}),Qo("body",de,{textStyle:"body-5",fontRole:"accent",...G("body",14),italic:!0,lineHeight:1.5})]}}]}}]})}],drop:{...he,...ve}},bA={Cards:AJ,KeyFeatures:LJ,Series:NJ,DocMetaCards:HJ};import{phoneKey as yA}from"efficient-easel/draw";var tb=e=>typeof e=="string"?e.trim():"";function SA(e){let o=`${tb(e.prefix)}${tb(e.value)}`,t=tb(e.suffix);return e.emphasizeAll===!0?o?`==_${o}_==`:"":`${o}${t?`==_${t}_==`:""}`}var rb={kind:"block",type:"Text",props:{...Yn,_partStyles:{text:{textStyle:"heading-2",...Vo("headingMedium",56,7,96),weight:500,case:"none",lineHeight:.9,letterSpacing:-.04}}},box:[["value","text",(e,o)=>SA(o)]],when:(e,o)=>o!==void 0&&typeof o.value=="string"&&SA(o)!==""},wA=e=>no(e?.supSuffix),nb=e=>Ct(e.background,La.StatsParagraph),ui=e=>nb(e)===mo,ab=e=>({...e,sectionAccent:e.sectionAccent??0}),WJ=(e,o)=>ui(e)?Po("background")(e,o):{},zJ={name:"Stats with Text",skip:e=>nb(e)&&nb(e)!=="transparent"&&!ui(e)?"it paints a colour of its own, not the section band":void 0,boxProps:(e,o)=>({...ie,direction:"column",gap:60,gapPhone:60,sectionBorder:{bottom:1},...To(e,"StatsParagraph"),...ui(e)?Ra(ab(e),o):{}}),box:[...me.filter(e=>e!=="sectionAccent"),["sectionAccent","sectionAccent",(e,o,t)=>ui(o)?Tr(e,ab(o),t):e],...kr("StatsParagraph")],site:(e,o)=>ui(e.props)?Pr({props:ab(e.props)},o):[],parts:[Rt("StatsParagraph"),{kind:"group",name:"Stats",props:{...D,gap:0},parts:[{kind:"list",key:"stats",name:"Stat",perRow:()=>4,rowName:"Stats row",rowProps:{...D,direction:"row",gap:0,share:"equal",phoneRow:2,[yA("share")]:"content"},props:(e,o)=>({...D,justify:"between",gap:12,gapPhone:12,sectionHeightMode:"fixed",sectionHeightValue:242,sectionHeightUnit:"px",widthFitPhone:"fixed",widthPhone:800,sectionPaddingTop:48,sectionPaddingBottom:48,sectionPaddingLeft:32,sectionPaddingRight:32,sectionBorder:{top:1,right:1,bottom:1,left:1},...WJ(e,o)}),parts:[{...rb,when:(e,o)=>!wA(o)&&rb.when(e,o)},{kind:"group",name:"Figure",props:{...D,direction:"row",align:"start",gap:32,gapPhone:32,share:"content",phoneRow:2,[yA("share")]:"content"},when:(e,o)=>wA(o),parts:[rb,{kind:"text",key:"supSuffix",props:K,style:{textStyle:"body-5",...G("label",13),weight:500,color:"accent",letterSpacing:.18,lineHeight:1,padding:12}}]},{kind:"group",name:"Words",props:{...D,gap:4,gapPhone:4},parts:[{kind:"text",key:"label",props:K,style:{textStyle:"body-1",fontRole:"heading",...G("body",16),lineHeight:1.5,letterSpacing:-.01}},ge("sub",{color:"labels",...G("label",12),lineHeight:1.5,letterSpacing:.24})]}]}]}],drop:{...he,...ve,background:"the band is the Box's theme: the site's band preset (`sectionAccent`), or a declared band-preset write; none paints nothing, and any other colour is skipped",headPlacement:"needs a row per head placement: an own-box Stats with Text draws no head (its words sit in a Section Header above it), the row always draws the head"}},GJ=new Set(["value","label",Nr]),CA={top:48,bottom:48,topPhone:48,bottomPhone:48},$J=e=>{let o=Ct(typeof e.background=="string"?e.background:void 0,La.Stats);return!!o&&o!=="transparent"},UJ={name:"Stats",skip:e=>$J(e)?"it paints a colour inside its padding, and a Box paints its Fill over the padding too":no(e.dataSource)?"its figures come from a source":Array.isArray(e.items)&&e.items.some(o=>no(o?.[Nr]))?"a figure names a count, and each figure Text here is typed by hand until it is linked":Array.isArray(e.items)&&e.items.some(o=>Object.keys(o??{}).some(t=>!GJ.has(t)))?"a figure has a key no part here reads":Object.keys(e._partStyles??{}).some(o=>o!=="heading")?"a figure or a name has a style of its own, kept by kind, which no part here reads":void 0,boxProps:e=>({...ie,direction:"column",gap:24,gapPhone:24,...we(e,CA)}),box:[...me,...Le(CA)],parts:[ge("heading",{color:"labels",...G("label",12),letterSpacing:.2}),{kind:"group",name:"Stats",props:{...D,gap:32,gapPhone:32},parts:[{kind:"list",key:"items",name:"Stat",perRow:e=>U(e.columns)??4,rowName:"Stats row",rowProps:{...D,direction:"row",gap:32,gapPhone:32,share:"equal",phoneRow:2},props:{...D,gap:8,gapPhone:8,sectionBorder:{top:1},sectionPaddingTop:20},parts:[{kind:"text",key:"value",props:Yn,style:{textStyle:"heading-2",...G("headingMedium",48,36),weight:500,case:"none",lineHeight:1,letterSpacing:-.03}},ge("label",{color:"labels",...G("label",12),letterSpacing:.2})]}]}],drop:{...he,...ve,columns:"the rows of N: one row Box per `columns` figures, which the Box draws",dataSource:"an empty source is typed figures, what the row draws; a sourced node is skipped (0 Hartes nodes)",dataSourceOptions:"read only with a source; a sourced node is skipped (0 Hartes nodes)",contained:"the Box draws the site frame now; each figure fills the Box's column",background:"only no fill reaches here: a node that paints a colour is skipped"}},vA={StatsParagraph:zJ,Stats:UJ};var TA={contained:!1},PA=(e,o)=>({logos:[{kind:"list",key:e,name:"Logo",flat:!0,parts:[{kind:"block",type:"LogoBlock",box:["src",[o,"alt"]],when:(t,r)=>no(r?.src)||no(r?.[o])}]}]}),sb=e=>{let o=U(e.bandPadding)??40;return{top:o,bottom:o,topPhone:o,bottomPhone:o}},jJ={...ge("heading",{color:"labels",letterSpacing:.2}),props:{...K,align:"center"}},KJ={name:"Logos",boxProps:e=>({...ie,direction:"column",gap:32,...we(e,sb(e))}),box:[...me,...Le(sb),["bandPadding","sectionPaddingTop",(e,o)=>we(o,sb(o)).sectionPaddingTop]],parts:[jJ,{kind:"core",keep:["columns","logoHeight","grayscale"],rename:{logosPerRow:"columns"},props:TA,slots:PA("items","alt")}],drop:{...he,...ve,contained:"the Box draws the site frame now; the Logos block inside it fills the Box's column (`contained: false`)",headPlacement:"a Logos band has no split head (not in SPLITTABLE_SECTIONS): no stored node can hold one, and the converted block stores own-box"}},kA={top:24,bottom:24,topPhone:24,bottomPhone:24},qJ={name:"Payment Methods",boxProps:e=>({...ie,direction:"column",...we(e,kA)}),box:[...me,...Le(kA)],skip:e=>no(e.dataSource)?"its payment methods come from a data source (a venue's Setup): a sourced list needs the card template (plan \xA73.2), not built yet":void 0,parts:[{kind:"group",name:"Methods",props:{...D,align:"center",gap:20,sectionBorder:{top:1,bottom:1},sectionPaddingTop:32,sectionPaddingBottom:32},parts:[{...ge("heading",{color:"labels"}),props:{...K,align:"center"}},{kind:"core",keep:[],as:"Logos",props:{...TA,look:"cards",grayscale:!1},slots:PA("badges","label")},{kind:"group",name:"Reassurance",props:{...D,direction:"row",wrap:!0,justify:"center",gap:24},parts:[{kind:"list",key:"assurances",name:"Line",flat:!0,parts:[{kind:"text",key:"text",props:{...K,align:"center"},style:{size:13,color:"labels"}}]}]}]}],drop:{...he,...ve,contained:"the Box draws the site frame now; the Logos block inside it fills the Box's column (`contained: false`)",dataSource:"empty: no source, so the authored badges above are the list (a node that names a source is skipped, see `skip`)"}},EA={Logos:KJ,PaymentBadges:qJ};import{mixHex as VJ}from"efficient-shell/format";var OA=e=>e.size==="display",YJ=(e,o)=>{let t=Ql(e,o),r=e.tone!=="plain"&&t?.text&&t.background?VJ(t.text,t.background,.3):null;return r?{color:r}:{}},XJ=(e,o)=>e.tone!=="plain"&&et(e.sectionAccent)===null?Po("background")(e,o):{},_A=(e,o)=>({kind:"list",key:"items",name:"Item",flat:!0,when:o,parts:[{kind:"text",key:"text",props:de,style:e,styleFrom:YJ}]}),ZJ={name:"Scrolling Bar",boxProps:(e,o)=>({...ie,...Ea,...Qf,...Ai[cs(e.separator)]===""?iR:{},...we(e,ql),...XJ(e,o)}),box:[["scrollDirection","scrollDirection",e=>eE(e)],["speed","loopDuration",(e,o)=>o.loopDuration!=null?o.loopDuration:e],["loopDuration","loopDuration",(e,o)=>e??o.speed],["loopDelay","loopDelay",e=>e],["separator","separator",e=>cs(e)],["borders","sectionBorder",e=>e===!1?void 0:{top:1,bottom:1}],...me,["tone","sectionAccent",(e,o)=>et(o.sectionAccent)??ur],...Le(ql)],parts:[_A(eu,e=>!OA(e)),_A(cR,OA)],drop:{...he,...ve,join:"the band sitting inside its neighbour: absent on all 18 live Tickers (JJ 2026-10-27), and not the separator",size:"each item's Text style: Small \u2192 Body 5, Display \u2192 Heading 3"}},RA=e=>e?.tone==="muted",JJ={name:"Spec Strip",boxProps:e=>({...ie,...Ea,...ou,...e.fill==="none"?{sectionBorder:{top:1}}:{},...we(e,Vl)}),box:[...me,...Le(Vl)],parts:[{kind:"list",key:"cells",name:"Cell",flat:!0,parts:[{kind:"text",key:"text",props:K,style:Yl,when:(e,o)=>!RA(o)},{kind:"text",key:"text",props:de,style:Yl,when:(e,o)=>RA(o)}]}],drop:{...he,...ve,fill:"None \u2192 no fill and a line on top. Dark band \u2192 the Box follows its theme: the old fixed `plate-band` colour has no home (no site write adds a theme preset since 8622589f); the merchant picks a dark theme on the Box"}},AA={Ticker:ZJ,SpecStrip:JJ};var QJ="jetbrains-mono",LA="space-grotesk",Qt=(e,o,t={})=>({textStyle:"body-5",font:QJ,size:e,sizePhone:e,letterSpacing:o,lineHeight:1.5,weight:400,...t}),Iu=(e,o,t,r)=>({font:LA,size:e,sizePhone:o,case:"upper",weight:500,letterSpacing:t,lineHeight:r}),pi=(e,o,t,r={})=>({textStyle:"body-1",font:LA,size:e,sizePhone:o,weight:400,case:"none",lineHeight:t,...r}),Eo=(e,o,t={})=>({kind:"text",key:e,props:K,style:o,...t}),FA=(e,o)=>o?.future===!0,xu=e=>HR(typeof e?.body=="string"?e.body:""),ib=e=>Ct(typeof e.background=="string"?e.background:void 0,La.TimelineTrack),lb=e=>ib(e)===mo?e:{...e,background:"transparent"},eQ={name:"Milestone Timeline",skip:e=>nu(ib(e)),boxProps:(e,o)=>{let t=_a(lb(e),o);return{...ie,direction:"column",gap:60,sectionBorder:{bottom:1},...To(e,"TimelineTrack"),...au(ib(e),e,o),...t>=0?{sectionAccent:t}:{}}},box:[...me.filter(e=>e!=="sectionAccent"),["sectionAccent","sectionAccent",(e,o,t)=>Tr(e,lb(o),t)],...kr("TimelineTrack")],parts:[{kind:"group",name:"Heading",props:{...D,direction:"row",align:"end",justify:"between",gap:40,share:"content",sectionPaddingBottom:32,sectionBorder:{bottom:1}},parts:[{kind:"group",name:"Title",props:{...D,direction:"row",align:"end",gap:40,share:"content"},parts:[Eo("eyebrow",Qt(13,.3,{case:"upper",color:"accent",padding:8}),{role:"eyebrow"}),Eo("title",{textStyle:"heading-2",...Iu(79,40,-.03,1)},{role:"heading"})]},Eo("intro",pi(14,14,1.5),{props:{...de,align:"right",maxWidth:360}})]},{kind:"group",name:"Years",props:{...D,direction:"row",share:"equal",gap:0,line:!0},parts:[{kind:"list",key:"entries",name:"Year",props:{...D,...Jf},item:e=>({props:e.future===!0?{upcoming:!0}:{}}),parts:[{kind:"group",name:Kl.name,props:{...D,...Kl},parts:[Eo("date",Qt(13,.22,{color:"accent"}),{when:(e,o)=>!FA(e,o)}),Eo("date",Qt(13,.22,{color:"labels"}),{when:FA}),Eo("title",{textStyle:"heading-3",...Iu(20,20,-.02,1.1)},{role:"heading"})]},Eo("blurb",pi(13,13,1.55),{props:de})]}]},{kind:"button",key:"ctaText",href:"ctaHref",variant:"ghost",props:(e,o)=>({...Ve,align:"right",...ei(e,o)}),style:Qt(13,.3,{case:"upper"})}],site:(e,o)=>Pr({props:lb(e.props)},o),drop:{...he,...ve,background:"another colour is the Box's Fill, or a skip if no Fill holds it; the band is the Box's theme: the site's band preset (`sectionAccent`), or a declared band-preset write (`lib/theme` `bandPresetIndex`)",headPlacement:"needs a row per head placement: an own-box Milestone Timeline draws no head (its words sit in a Section Header above it), the row always draws the head"}},oQ={name:"Story Timeline",skip:e=>{let o=typeof e.layout=="string"?e.layout:"split";return o==="split"?void 0:`display "${o}": not converted (0 live pages; Spine and Alternating are not offered, a Track story is not stored anywhere)`},boxProps:e=>({...ie,direction:"row",share:[40],gap:80,align:"start",...To(e,"Timeline")}),box:[...me,...kr("Timeline")],parts:[{kind:"group",name:"Heading",props:{...D,gap:24},parts:[Eo("eyebrow",Qt(12,.3,{case:"upper",color:"accent"}),{role:"eyebrow"}),Eo("title",{textStyle:"heading-2",...Iu(72,40,-.03,.94)},{role:"heading"}),Eo("intro",pi(14,14,1.6),{props:{...de,maxWidth:360}}),{kind:"group",name:"Picture",keepEmpty:!0,box:[["imageSrc","bgImage"]],props:{...D,sectionBorder:{top:1,right:1,bottom:1,left:1},darken:75,darkenStyle:"bottom",placement:"bottom-center",sectionHeightMode:"fixed",sectionHeightValue:667,sectionHeightUnit:"px",sectionHeightModePhone:"fixed",sectionHeightValuePhone:419,sectionHeightUnitPhone:"px",...Ho(12,16)},when:e=>typeof e.imageSrc=="string"&&e.imageSrc.trim()!=="",parts:[{kind:"group",name:"Caption",props:{...D,direction:"row",justify:"between",align:"center",gap:12,share:"content",phoneRow:2},parts:[Eo("imageCaption",Qt(11,.24,{case:"upper",color:"text"})),Eo("imageMeta",Qt(11,.24,{case:"upper",color:"accent"}),{props:{...K,align:"right"}})]}]},{kind:"button",key:"ctaText",href:"ctaHref",variant:"ghost",props:(e,o)=>({...Ve,...ei(e,o)}),style:Qt(13,.3,{case:"upper"})}]},{kind:"group",name:"Chapters",props:{...D,gap:48,line:!1},parts:[{kind:"list",key:"entries",name:"Chapter",props:{...D,direction:"row",gap:24,share:[25],align:"start"},parts:[Eo("date",Qt(13,.24,{color:"accent"})),{kind:"group",name:"Words",props:{...D,gap:14},parts:[Eo("title",{textStyle:"heading-3",...Iu(24,20,-.02,1.5)},{role:"heading"}),{kind:"block",type:"Text",props:{...K,_partStyles:{text:pi(17,16,1.6)}},box:[["body","text",(e,o)=>xu(o)[0]??""]],when:(e,o)=>xu(o).length>0},{kind:"block",type:"Text",props:{...de,_partStyles:{text:pi(17,16,1.6,{paragraphSpacing:14})}},box:[["body","text",(e,o)=>xu(o).slice(1).join(`
|
|
44
|
+
|
|
45
|
+
`)]],when:(e,o)=>xu(o).length>1}]}]}]}],drop:{...he,...ve,layout:"Split is the only display converted (see skip); the Box's own arrangement replaces it"}},BA={TimelineTrack:eQ,Timeline:oQ};import{tabletKey as sQ}from"efficient-easel/draw";import{slugify as ALe}from"efficient-shell/format";import{rootIsDark as tQ}from"efficient-shell/format";function OLe(e="auto"){return e==="light"?!0:e==="dark"?!1:!tQ({whenUnset:!0})}function DA(e,o){return Number.isFinite(e)&&Number.isFinite(o)&&!(e===0&&o===0)}function cb(e){let o=Number.parseFloat(e??"");return Number.isFinite(o)?o:0}var rQ=["tall","square","wide"],aQ="tall";function NA(e){return rQ.includes(String(e??""))?String(e):aQ}var LLe={sectionNumber:"\xB7 Locations",heading:"Our *locations.*",tagline:"Visit us in person \u2014 find your nearest studio below.",galleryKicker:"Gallery",galleryHint:"Hover to see in colour \xB7 click to jump",mapTheme:"auto"},BLe=[{photo:"",group:"",groupName:"",name:"City name",state:"State",country:"Country",timezone:"GMT \xB7 UTC +0",address:`Address line one
|
|
46
|
+
Address line two`,phone:"+00 000 0000",hours:"Mon\u2013Fri 9:00\u201318:00",lat:0,lng:0,mapsUrl:""},{photo:"",group:"",groupName:"",name:"City name",state:"State",country:"Country",timezone:"GMT \xB7 UTC +0",address:`Address line one
|
|
47
|
+
Address line two`,phone:"+00 000 0000",hours:"Mon\u2013Fri 9:00\u201318:00",lat:0,lng:0,mapsUrl:""}],nQ=/^https?:\/\//i;function DLe(e){let o=(e.mapsUrl??"").trim();return{photo:"",group:"",groupName:"",name:e.name??"",state:e.state??"",country:e.country??"",timezone:"",address:e.address??"",phone:e.phone??"",hours:e.hours??"",lat:cb(e.lat),lng:cb(e.lng),mapsUrl:nQ.test(o)?o:""}}function db(e){let o=String(e??"").split(" \xB7 ");return{state:(o[0]??"").trim(),country:(o[1]??"").trim()}}var NLe="other",MLe={routingNumber:"02 \xB7 Routing",routingTagline:"What can we help you with?",groups:[{id:"fitment",eyebrow:"A \xB7 Label",title:"Group one",copy:"Short description of this routing group.",response:"< 48h"},{id:"trade",eyebrow:"B \xB7 Label",title:"Group two",copy:"Short description of this routing group.",response:"< 24h"},{id:"press",eyebrow:"C \xB7 Label",title:"Group three",copy:"Short description of this routing group.",response:"< 48h"},{id:"order",eyebrow:"D \xB7 Label",title:"Group four",copy:"Short description of this routing group.",response:"< 24h"}],formNumber:"03 \xB7 Message",formHeading:"Send *a note.*",metaLines:["Encrypted in transit","Stored 12 months"],showOther:!0,otherLabel:"Other",otherNoteTitle:"No matching team",otherNoteBody:"Tell us what you need in the message field below \u2014 we'll route it to whoever can help.",buttonText:"Send Message \u2192",consent:"By submitting, you agree to our privacy policy. We never share contact details with third parties.",channels:[{label:"Team one",value:"team-one@email.com",href:"mailto:team-one@email.com",sub:"Detail \xB7 Detail",groupId:"fitment"},{label:"Team two",value:"team-two@email.com",href:"mailto:team-two@email.com",sub:"Detail \xB7 Detail",groupId:"trade"},{label:"Team three",value:"team-three@email.com",href:"mailto:team-three@email.com",sub:"Detail \xB7 Detail",groupId:"press"},{label:"Team four",value:"team-four@email.com",href:"mailto:team-four@email.com",sub:"Detail \xB7 Detail",groupId:"order"},{label:"Phone",value:"+1 (000) 000-0000",href:"tel:+10000000000",sub:"Mon\u2013Fri \xB7 9:00\u201318:00"}]};function MA(e){let o=String(e??"").replace(/[^+\d]/g,"");return o?`tel:${o}`:void 0}var Yo=e=>typeof e=="string"?e:e==null?"":String(e),ub=e=>Array.isArray(e.locations)?e.locations.map(o=>o??{}):[],Zn=e=>Yo(e.group),qA=e=>`loc-${e}`,VA=e=>Yo(e.state).trim()||db(Yo(e.region)).state,YA=e=>Yo(e.country).trim()||db(Yo(e.region)).country,HA=e=>[VA(e),YA(e)].filter(Boolean).join(" \xB7 "),lQ=e=>ub(e).some(o=>Yo(o.photo).trim()!==""),iQ=e=>ub(e).some(o=>DA(Number(o.lat),Number(o.lng))),cQ=(e,o)=>ub(e).filter(t=>Zn(t)===Zn(o)).length,dQ=(e,o)=>cQ(e,o)===1?"wide":NA(e.imageShape),fb={top:100,bottom:100,topPhone:60,bottomPhone:60},WA=48,xt=(e,o={})=>({textStyle:"body-5",...G("label",e),case:"upper",...o}),pb={top:1,right:1,bottom:1,left:1},mb={...D,direction:"row",share:"equal",gap:0},fQ=e=>o=>o>Bl(o)?{...D,gap:0}:{...mb,...o>1?{phoneRow:e}:{}},uQ={kind:"group",name:"Gallery",props:{...D,gap:20,_hidden:!0},when:lQ,parts:[{kind:"group",name:"Gallery head",props:{...D,direction:"row",justify:"between",align:"end",gap:24,share:"content",sectionBorder:{bottom:1},sectionPaddingBottom:16},parts:[ge("galleryKicker",xt(12,{color:"accent",letterSpacing:.3})),{kind:"text",key:"galleryHint",props:{...de,align:"right",alignPhone:"left"},style:xt(11,{letterSpacing:.22,alignPhone:"left"})}]},{kind:"group",name:"Groups",props:{...D,gap:24},parts:[{kind:"list",key:"locations",name:"City picture",props:{...D,darken:85,darkenStyle:"bottom",placement:"bottom-left",sectionBorder:pb,...Ho(12,12)},item:(e,o,t)=>({props:{...Yo(e.photo).trim()?{bgImage:Yo(e.photo),hover:"mono"}:{},link:`#${qA(o)}`,boxShape:dQ(t,e)}}),parts:[{kind:"text",key:"name",props:K,style:xt(11,{letterSpacing:.22,color:"text"})}],groups:{of:Zn,name:"Group",props:{...D,gap:10},head:e=>({label:Zn(e[0]??{})}),parts:[ge("label",xt(11,{color:"accent",letterSpacing:.3}))],itemsName:"Cities",itemsProps:fQ(2),perRow:Bl,rowName:"Row",rowProps:{...mb,phoneRow:2}}}]}]},pQ={kind:"group",name:"Words",props:{...D,gap:12,gapPhone:12,...Ho(28,28),sectionHeightMode:"fixed",sectionHeightValue:280,sectionHeightUnit:"px",sectionHeightModePhone:"auto"},parts:[{kind:"group",name:"Name row",props:{...D,direction:"row",justify:"between",align:"start",gap:14,share:"content",phoneRow:2,sharePhone:"content",wrapPhone:"wrap",sectionPaddingBottom:6,sectionPaddingBottomPhone:6},parts:[{kind:"group",name:"Name",props:{...D,gap:6,gapPhone:6},parts:[{kind:"text",key:"name",role:"heading",props:K,style:{textStyle:"heading-3",...G("headingSmall",30),case:"upper",weight:500,lineHeight:1,letterSpacing:-.02}},{kind:"block",type:"Text",props:{...K,_partStyles:{text:xt(12,{color:"accent",letterSpacing:.24,lineHeight:1.5})}},box:["region","state","country"].map(e=>[e,"text",(o,t)=>HA(t)]),when:(e,o)=>HA(o??{})!==""}]},{kind:"group",name:"Time zone",props:{...D,sectionBorder:pb,...Ho(6,10)},parts:[{kind:"text",key:"timezone",props:{...de,textFit:"line"},style:xt(12,{letterSpacing:.22,lineHeight:1.5})}]}]},{kind:"text",key:"address",props:de,style:{textStyle:"body-5",fontRole:"heading",...G("body",14),lineHeight:1.5}},{kind:"block",type:"ButtonBlock",props:{...Ve,...Zt,variant:"ghost",arrow:!1,_partStyles:{label:xt(13,{letterSpacing:.18,color:"text",lineHeight:24/13})}},box:[["phone","label"],["phone","href",e=>MA(Yo(e))??"#"]],when:(e,o)=>Yo(o?.phone).trim()!==""},{kind:"text",key:"hours",props:de,style:xt(12,{letterSpacing:.18,lineHeight:1.7})}]},mQ={kind:"block",type:"LocationMap",props:e=>({mapTheme:typeof e.mapTheme=="string"?e.mapTheme:"auto"}),box:["name","lat","lng","mapsUrl","geocode",...["region","state"].map(e=>[e,"state",(o,t)=>VA(t)]),...["region","country"].map(e=>[e,"country",(o,t)=>YA(t)])]},hQ={kind:"group",name:"Map",props:{...D,sectionBorder:{top:1,right:0,bottom:0,left:0}},parts:[mQ]},xQ={kind:"list",key:"locations",name:"City",props:(e,o)=>({...D,gap:0,justify:"between",sectionBorder:pb,jumpHighlight:!0,sectionAccent:_a(e,o)>=0?Jl(e.sectionAccent,o):-1}),item:(e,o)=>({props:{anchor:qA(o)}}),parts:[pQ,hQ],groups:{of:Zn,name:"Group",props:{...D,gap:20},head:e=>{let o=e[0]??{};return{key:Zn(o),groupName:Yo(o.groupName),count:`${e.length} location${e.length===1?"":"s"}`}},parts:[{kind:"group",name:"Group head",props:{...D,direction:"row",justify:"between",align:"end",gap:16,share:"content",sectionBorder:{bottom:1},sectionPaddingBottom:16},when:(e,o)=>Yo(o?.key).trim()!=="",parts:[ge("key",xt(13,{color:"accent",letterSpacing:.3})),{kind:"text",key:"groupName",role:"heading",props:K,style:{textStyle:"heading-3",...G("headingSmall",24),case:"upper",weight:500,letterSpacing:-.01}},{kind:"text",key:"count",props:de,style:xt(12,{letterSpacing:.22})}]}],itemsName:"Cities",itemsProps:e=>({...mb,columns:Bl(e),[sQ("columns")]:1})}},zA=xt(10,{letterSpacing:.25}),IQ={kind:"block",type:Et,props:{...D,name:"Credit",direction:"row",justify:"end",align:"center",gap:6,share:"content",wrap:!0},when:iQ,slot:Ot,keepEmpty:!0,parts:[{kind:"block",type:"Text",props:{...de,text:"Location coordinates \xA9",_partStyles:{text:zA}}},{kind:"block",type:"ButtonBlock",props:{...Ve,...Zt,variant:"ghost",arrow:!1,label:"OpenStreetMap contributors",href:"https://www.openstreetmap.org/copyright",_partStyles:{label:{...zA,color:"labels"}}}}]},GA=(e,o)=>Object.fromEntries(o.filter(t=>e[t]!==void 0).map(t=>[t,e[t]])),$A=["sectionPaddingTop","sectionPaddingTopTablet","sectionPaddingTopPhone"],UA=["sectionPaddingBottom","sectionPaddingBottomTablet","sectionPaddingBottomPhone"],jA=e=>e.map(o=>[o,o,(t,r)=>we(r,fb)[o]]),KA=["sectionAccent","sectionAccent",Tr],gQ=["gridSpan","_hidden",...Object.values(ro)],bQ={name:"City pictures",skip:e=>So(e)?`fed by the data source "${So(e)}": its cities are read as the page is served, not stored on the node`:void 0,boxProps:(e,o)=>({...ie,direction:"column",gap:40,anchor:"studios",...GA(we(e,fb),$A),sectionPaddingBottom:WA,sectionPaddingBottomPhone:WA,...Ra(e,o)}),box:[...me.filter(e=>e!=="sectionAccent"&&e!=="anchor"),KA,["anchor","anchor",e=>ws(e).trim()?e:"studios"],...jA($A)],parts:[QR("sectionNumber","heading","tagline"),uQ],also:[{name:"City maps",boxProps:(e,o)=>({...ie,direction:"column",gap:40,sectionBorder:{bottom:1},sectionPaddingTop:0,sectionPaddingTopPhone:0,...GA(we(e,fb),UA),...Ra(e,o)}),box:[...gQ,KA,...jA(UA)],parts:[xQ,IQ]}],reads:{mapTheme:"City maps Box: each Map block's Map theme",imageShape:"City pictures Box: each picture Box's Box shape"},site:Pr,drop:{...he,...ve,apiKey:"a stored Google Maps key from before the map needed none: the website's one map (components/SiteMap) takes no key, and a key is a credential, never page content",mapId:"a Google Maps style id from the same retired map: nothing in src/ reads it",gallery:"the retired separate tile list: the wall is derived from the cities (`components/ContactLocations`), nothing in src/ reads it",dataSource:"always empty here: a node fed by a source is skipped (see skip)"}},XA={ContactLocations:bQ};var yQ=["Collections","Events","FAQ","Footprint","GalleryB","LongRead","ProcessSteps","ProductGrid","RelatedProducts"];var _r=(e,o)=>()=>({top:e,topPhone:o}),ZA=e=>o=>{let t=To(o,e).sectionPaddingTop;return{top:t,topPhone:t}},SQ={Collections:_r(120,70),Events:_r(120,70),FAQ:_r(120,70),GalleryB:_r(120,70),FitmentTable:_r(120,80),SpecTable:_r(120,80),LongRead:_r(120,80),FitmentFinder:e=>e.layout==="bar"?{top:32,topPhone:20}:{top:80,topPhone:60},RelatedProducts:_r(0,0),Footprint:ZA("Footprint"),ProcessSteps:ZA("ProcessSteps"),ProductGrid:e=>({top:U(e.padTop)??120,topPhone:0})};function wQ(e,o={}){let t=go[e],r=SQ[e];if(!t||!r)throw new Error(`section-to-box-rows-head: "${e}" has no head row or no head room`);let a=t.padKey,n=Rt(e),s=rA(e),l=t.headRows.filter(d=>![t.num,t.title,t.description,"linkText","linkHref"].includes(d)),c={...Object.fromEntries(l.filter(d=>!(d in s)).map(d=>[d,"a head setting no Header Box part reads (lib/document/blocks/general/section-head-looks `headReads`)"])),...o.drop};return{name:_i[e]??e,boxProps:d=>{let f=r(d);return{...ie,direction:"column",gap:JR[pu(e)],sectionPaddingTop:f.top,sectionPaddingTopPhone:f.topPhone}},box:[...me,...a?[[a,"sectionPaddingTop",(d,f)=>r(f).top]]:[]],parts:[n,{kind:"core",keep:"rest",...a?{props:{[a]:0}}:{},...o.slots?{slots:o.slots}:{}},...o.partsAfter??[]],...Object.keys(s).length?{reads:s}:{},...Object.keys(c).length?{drop:c}:{}}}var JA=Object.fromEntries(yQ.map(e=>[e,wQ(e)]));import{BLOCK_WIDTH_LIMIT as CQ}from"efficient-easel/draw";var gu={textFit:"line",textFitPhone:"wrap"},lF={minWidth:CQ.min},QA=(e,o,t)=>({...ge(e,{...o,...Xl}),props:{...K,align:"right",...gu,...t}}),iF={top:1,bottom:0},xb=(e,o,t,r)=>({kind:"group",name:e,props:{...D,sectionPaddingBottom:o,sectionPaddingBottomPhone:t},parts:[r]}),eF={widthFit:"fill",...lF},oF={top:100,bottom:60,topPhone:60,bottomPhone:40},vQ={...G("label",13),letterSpacing:.22,lineHeight:1.8},tF={textStyle:"heading-1",...Vo("headingLarge",56,8,128),case:"upper",weight:500,lineHeight:.88,letterSpacing:-.04},rF=e=>e.titleLevel===2,kQ=()=>({name:"Document Header",boxProps:e=>({...ie,direction:"column",gap:0,sectionBorder:{bottom:1},...we(e,oF)}),box:[...me,...Le(oF)],parts:[{kind:"group",name:"Header",props:{...D,direction:"row",align:"end",justify:"between",gap:40,gapPhone:16,share:"content",sectionPaddingBottom:32},parts:[xb("Eyebrow",12,0,{...ge("eyebrow",G("label",13)),props:{...K,...gu}}),{kind:"text",key:"title",role:"heading",props:{...K,tag:"h1",...eF},style:tF,when:e=>!rF(e)},{kind:"text",key:"title",role:"heading",props:{...K,tag:"h2",...eF},style:tF,when:rF},{kind:"group",name:"Details",props:{...D,align:"stretch",gap:0,gapPhone:0,sectionPaddingBottom:12,sectionPaddingBottomPhone:0},parts:[{kind:"list",key:"meta",name:"Detail",flat:!0,parts:[Zl("label","value",vQ,gu)]}]}]},{kind:"group",name:"Deck",props:{...D,sectionBorder:iF,sectionPaddingTop:32},parts:[{kind:"text",key:"deck",props:{...de,maxWidth:760},style:{textStyle:"body-1",fontRole:"accent",...G("body",22,19),italic:!0,lineHeight:1.5}}]}],drop:{...he,...ve,titleLevel:"read by the title part's `when`: 2 (set by lib/document/one-h1 on a later opener) makes the Text an h2, anything else an h1"}}),aF={top:80,bottom:40,topPhone:60,bottomPhone:32},TQ={...G("label",13),letterSpacing:.18,lineHeight:1.8},nF={...G("label",13),letterSpacing:.22,lineHeight:1.9},PQ=()=>({name:"Issue Header",boxProps:e=>({...ie,direction:"column",gap:0,sectionBorder:{bottom:1},...we(e,aF)}),box:[...me,...Le(aF)],parts:[{kind:"group",name:"Top",props:{...D,direction:"row",align:"end",justify:"between",gap:60,gapPhone:16,share:"content",sectionPaddingBottom:32},parts:[xb("Eyebrow",14,14,ge("eyebrow",G("label",14))),{kind:"group",name:"Issue",props:{...D,align:"end",gap:0,gapPhone:0,sectionPaddingBottom:14},parts:[{kind:"list",key:"issueMeta",name:"Issue line",flat:!0,parts:[Zl("lead","rest",TQ)]}]}]},{kind:"group",name:"Bottom",props:{...D,direction:"row",align:"start",justify:"between",gap:60,gapPhone:16,share:"content",sectionBorder:iF,sectionPaddingTop:32},parts:[{kind:"text",key:"lead",props:{...K,maxWidth:720,...lF},style:{textStyle:"body-1",fontRole:"heading3",...G("headingSmall",20),lineHeight:1.5,letterSpacing:-.005,paragraphSpacing:16}},{kind:"group",name:"In this issue",props:{...D,align:"stretch",gap:0},parts:[xb("Heading",6,6,{kind:"text",key:"issueHeading",props:{...K,align:"right",...gu},style:{textStyle:"body-1",fontRole:"heading",...G("body",18),weight:400,letterSpacing:-.01,lineHeight:1.9,...Xl}}),{kind:"group",name:"Lines",props:{...D,align:"stretch",gap:0},parts:[{kind:"list",key:"issueList",name:"Line",flat:!0,parts:[QA("text",{color:"labels",...nF})]}]},QA("issueTotal",nF)]}]}],drop:{...he,...ve}}),sF={top:24,bottom:24,topPhone:16,bottomPhone:16},hb={color:"labels",...G("label",13),letterSpacing:.2},cF=e=>(Array.isArray(e.items)?e.items:[]).filter(o=>o&&typeof o.label=="string"&&o.label.trim()!==""),Ib=(e,o)=>o!==void 0&&cF(e).at(-1)===o,dF=(e,o)=>o!==void 0&&cF(e).includes(o),EQ=(e,o)=>dF(e,o)&&!Ib(e,o)&&no(o?.href),OQ=()=>({name:"Breadcrumb",skip:e=>no(e.meta)?'a trailing note after "\xB7" needs a second mark; none live':void 0,boxProps:e=>({...ie,...Ea,gap:16,gapPhone:16,separator:"slash",sectionBorder:{bottom:1},...we(e,sF)}),box:[...me,...Le(sF)],parts:[{kind:"list",key:"items",name:"Crumb",flat:!0,parts:[{kind:"button",key:"label",href:"href",variant:"ghost",when:EQ,props:{...Ve,...Zt,icon:"none"},style:hb},{...ge("label",hb),when:(e,o)=>dF(e,o)&&!Ib(e,o)&&!no(o?.href)},{...ge("label",{...hb,color:"text"}),when:Ib}]}],drop:{...he,...ve,meta:"a node that stores a note is skipped (`skip`); an empty one draws nothing"}}),fF={DocMasthead:kQ(),Masthead:PQ(),Breadcrumb:OQ()};import{jsx as Ba,jsxs as bb}from"react/jsx-runtime";import{slugify as _Q}from"efficient-shell/format";import{jsx as gb,jsxs as uF}from"react/jsx-runtime";var uBe="sticky top-[120px]";var pF=(e,o)=>e?{[Td]:o}:{},mF=(e,o)=>Pd(e?.[rx(o)]?.role,bf[o],$a),hF=120;function xF({title:e,entries:o,stickyTop:t,sticky:r=!0,editing:a=!1,partStyles:n,numberForm:s=Rh,hideClass:l=""}){let c=s==="plain";return uF("aside",{className:`${r?"sticky ":""}flex flex-col self-start max-[900px]:static${l?` ${l}`:""}`,style:r?{top:t}:void 0,children:[e&&gb("h4",{className:"mb-[18px] font-mono text-[length:var(--size-label,12px)] uppercase tracking-[0.3em] text-accent",children:qo(e)}),o.map((d,f)=>{let m=gb("span",{...pF(a,"number"),style:mF(n,"number"),className:"text-accent",children:ld(s,f)});return uF("a",{href:`#${d.anchor}`,className:`flex items-center ${c?"justify-start gap-1":"justify-between gap-3"} border-b border-line py-2.5 font-mono text-[length:var(--size-label,13px)] uppercase tracking-[0.18em] text-fg-dim transition-colors hover:text-fg${f===0?" border-t":""}`,children:[c&&m,gb("span",{...pF(a,"entry"),style:mF(n,"entry"),children:qo(d.label||"Section")}),!c&&m]},`${f}-${d.anchor}`)})]})}function RQ(e,o){return _Q(e)||`section-${o+1}`}var yb=e=>typeof e=="string"&&e.trim()!=="";function Sb(e){return(e??[]).filter(o=>yb(o.heading)||yb(o.label)||yb(o.body))}function wb(e){let o=new Set;return e.map((t,r)=>{let a=RQ(t.label||t.heading||"",r),n=a,s=2;for(;o.has(n);)n=`${a}-${s++}`;return o.add(n),n})}function Cb(e){let o=[];for(let t of e.replace(/\r\n?/g,`
|
|
48
|
+
`).split(/\n[ \t]*\n/))t.split(`
|
|
49
|
+
`).map(r=>r.replace(/\s+$/,"")).filter(r=>r.trim()!=="").forEach((r,a)=>{let n=is(r)[0].bullet,s=o.at(-1),l=a===0||!s||s.type==="ul"!==n;if(n){let c=r.slice(2);!l&&s?.type==="ul"?s.items.push(c):o.push({type:"ul",items:[c]})}else!l&&s?.type==="p"?s.text+=`
|
|
50
|
+
${r}`:o.push({type:"p",text:r})});return o}var AQ=()=>[{label:i("First section"),heading:i("Your *first* section."),body:i(`Write the opening paragraph here.
|
|
51
|
+
|
|
52
|
+
- Start a line with a dash for a bullet.
|
|
53
|
+
- Add as many as you like.`)},{label:i("Second section"),heading:i("Your *second* section."),body:i("Leave a blank line between paragraphs to start a new one.")}],FQ=hF;function OBe({tocTitle:e,sections:o,editing:t=!1,stickyTop:r=FQ}){let a=Sb(o);if(a.length===0&&!t)return null;let n=a.length===0&&t?AQ():a,s=wb(n);return Ba("section",{className:"relative z-[2] bg-bg",children:bb("div",{className:"mx-auto grid max-w-[var(--sf-site-width,1600px)] grid-cols-[240px_1fr] items-start gap-20 border-b border-line px-[var(--sf-site-gutter,40px)] py-20 max-[900px]:grid-cols-1 max-[900px]:gap-10 max-[900px]:px-[min(24px,var(--sf-site-gutter,40px))] max-[900px]:py-[60px]",children:[Ba(xF,{title:e,entries:n.map((l,c)=>({label:l.label||"Section",anchor:s[c]})),stickyTop:r}),Ba("div",{className:"flex flex-col gap-16",children:n.map((l,c)=>bb("article",{id:s[c],className:"flex flex-col gap-[18px]",style:{scrollMarginTop:r},children:[bb("span",{className:"font-mono text-[length:var(--size-label,12px)] uppercase tracking-[0.3em] text-accent",children:[_h(c)," \xB7 ",qo(l.label||"Section")]}),l.heading&&Ba("h2",{className:"mb-2 border-b border-line pb-[18px] font-heading2 text-[length:min(var(--size-headingMedium,clamp(28px,3.5vw,44px)),var(--sf-heading-max,9999px))] font-medium uppercase leading-[1.04] tracking-[-0.025em]",children:qo(l.heading)}),Cb(l.body??"").map((d,f)=>d.type==="ul"?Ba("ul",{className:"flex max-w-[680px] list-none flex-col gap-2.5 pl-0",children:d.items.map((m,u)=>Ba("li",{className:"relative pl-6 font-serif text-[length:var(--size-body,17px)] leading-[1.65] text-fg-dim before:absolute before:-top-0.5 before:left-1.5 before:text-[length:var(--size-body,24px)] before:leading-none before:text-accent before:content-['\xB7']",children:qo(m)},u))},f):Ba("p",{className:"max-w-[680px] font-serif text-[length:var(--size-body,17px)] leading-[1.7] text-fg-dim",children:qo(d.text)},f))]},s[c]))})]})})}import{VIEW_DESKTOP_MIN as vb,VIEW_TABLET_MIN as LQ}from"efficient-easel/draw";var bu=Fi["view-wide"],IF=960,BQ=LQ,gF={min:bu,max:1600,step:10},bF="stackBelow";function FBe(e){if(!(typeof e!="number"||!Number.isFinite(e))&&!(e<gF.min||e>gF.max))return Math.round(e)}var DQ=e=>`sf-stack-${e}`,NQ=e=>`sf-stack-${e}-gutter`,MQ=e=>`sf-stack-${e}-outer`,Jn=e=>`${e-.02}px`;function LBe(e){let o=`.${DQ(e)}`,t=`.${NQ(e)}`,r=`.${MQ(e)}`,a=[];if(e>bu){let n=`${o}>.sf-block-size,${o}>[data-easel-block]>[data-sf-part-host]>.sf-block-size`,s=Math.min(e,vb);a.push(`@media (min-width:${bu}px) and (max-width:${Jn(e)}){${o}${o}{flex-direction:column}.sf-gap-overlap${o}{--sf-gap-overlap-eff:calc(var(--sf-gap-overlap) / 2)}${n}{width:min(var(--sf-bw-p,100%),100%);flex-grow:0}}`,`@media (min-width:${bu}px) and (max-width:${Jn(s)}){.sf-gap-zone${o}{gap:var(--sf-gap-len-tablet,var(--sf-gap-len-phone,calc(var(--sf-gap-len) / 2)))}}`),e>vb&&a.push(`@media (min-width:${vb}px) and (max-width:${Jn(e)}){.sf-gap-zone${o}{gap:var(--sf-gap-len-phone,calc(var(--sf-gap-len) / 2))}}`)}return a.push(`@media (max-width:${Jn(e)}){${t}${t}{padding-inline:min(24px,var(--sf-site-gutter,40px))}}`),e<IF&&a.push(`@media (min-width:${e}px) and (max-width:${Jn(IF)}){${t}${t}{padding-inline:var(--sf-site-gutter,40px)}}`),a.push(`@media (min-width:${BQ}px) and (max-width:${Jn(e)}){`+["top","bottom","left","right"].map(n=>`.sf-pad-${n}-phone:has(>${r}),.sf-pad-${n}-phone${r}{padding-${n}:var(--sf-pad-${n[0]}-phone)!important}`).join("")+"}"),a.join("")}var yF={top:80,bottom:80,topPhone:60,bottomPhone:60},SF=18,wF=18,CF=8,HQ=10,kb=e=>typeof e=="string"&&e.trim()!=="",vF=e=>Sb(e.sections),WQ=e=>Cb(typeof e.body=="string"?e.body:"").map(o=>o.type==="ul"?{kind:"ul",text:o.items.map(t=>`- ${t}`).join(`
|
|
54
|
+
`)}:{kind:"p",text:o.text}),Tb={textStyle:"body-5",...G("label",12),case:"upper",letterSpacing:.3,color:"accent",lineHeight:1.5},kF={textStyle:"body-1",fontRole:"accent",...G("body",17)},zQ=[ge("label",Tb),{...ge("title",Tb),when:(e,o)=>!kb(o?.label)},{kind:"block",type:"Text",when:(e,o)=>!kb(o?.label)&&!kb(o?.title),props:{...K,text:"Section",_partStyles:{text:Tb}}},{kind:"group",name:"Heading",props:{...D,sectionPaddingBottom:CF,sectionPaddingBottomPhone:CF},parts:[{kind:"group",name:"Heading line",props:{...D,sectionBorder:{bottom:1},sectionPaddingBottom:wF,sectionPaddingBottomPhone:wF},parts:[{kind:"text",key:"heading",role:"heading",props:K,style:{textStyle:"heading-2",...Vo("headingMedium",28,3.5,44),case:"upper",weight:500,lineHeight:1.04,letterSpacing:-.025}}]}]},{kind:"list",key:"body",name:"Body",flat:!0,of:WQ,parts:[{kind:"text",key:"text",props:de,style:{...kF,lineHeight:1.7},when:(e,o)=>o?.kind==="p"},{kind:"text",key:"text",props:de,style:{...kF,lineHeight:1.65,paragraphSpacing:HQ},when:(e,o)=>o?.kind==="ul"}]}],GQ=900,$Q={name:"Document Text",boxProps:e=>({...ie,direction:"row",gap:80,gapPhone:40,[bF]:GQ,sectionBorder:{bottom:1},...we(e,yF)}),box:["anchor","sectionAccent","_hidden",...Object.values(ro),...Le(yF)],parts:[{kind:"block",type:"Contents",props:e=>({title:e.tocTitle??"",sticky:!0,widthFit:"fixed",width:240,widthFitPhone:"fill"})},{kind:"group",name:"Sections",props:{...D,gap:64,gapPhone:64,widthFit:"fill"},parts:[{kind:"list",key:"sections",name:"Section",of:e=>vF(e),props:{...D,gap:SF,gapPhone:SF},item:(e,o,t)=>({props:{anchor:wb(vF(t))[o]??`section-${o+1}`}}),parts:zQ}]}],reads:{tocTitle:"the Contents block's Heading"},drop:{...he,stickyTop:"the Contents block draws DocBody's default (120px); 0 live nodes store it"}},TF={DocBody:$Q};var $Be="[--intro-edge:60px] max-[960px]:[--intro-edge:24px]",UQ="overlay",jQ=[{label:"Copy over image",value:"overlay"},{label:"Copy above image",value:"stacked"}];function PF(e){return to(jQ,UQ,e)}var UBe={desktop:40,mobile:45,min:20,max:80,step:5};function jBe(e,o){return`${typeof e=="number"?e:o}%`}var EF=(e,o)=>{let t=U(e),r=U(o);return{...t===void 0?{}:{size:t},...r===void 0?{}:{sizePhone:r}}},KQ=e=>PF(e.layout)==="stacked",OF=e=>Math.min(Math.max(U(e.overlay)??60,0),100),yu=e=>U(e)??100,qQ={textStyle:"heading-1",sizeToken:{...Vo("headingLarge",48,7,96).sizeToken,pxPhone:36},weight:500,lineHeight:.95,letterSpacing:-.03},VQ=[ge("eyebrow",G("label",14)),...[!0,!1].map(e=>({kind:"text",key:"title",role:"heading",props:K,style:{...qQ,case:e?"upper":"none"},styleFrom:o=>EF(o.titleSizeDesktop,o.titleSizeMobile),when:o=>o.uppercase===!0===e})),{kind:"text",key:"body",props:{...de,maxWidth:560},style:{textStyle:"body-1",...G("body",17,16),lineHeight:1.6,paragraphSpacing:24},styleFrom:e=>EF(e.bodySizeDesktop,e.bodySizeMobile)},{kind:"group",name:"Button",props:{...D,align:"start",sectionPaddingTop:8,sectionPaddingTopPhone:8},parts:[{kind:"button",key:"ctaText",href:"ctaHref",variant:"primary",props:Ve}]}],_F=e=>`${e}: a Button block has no colour of its own (it follows the site Button colour, as the old fallback did); 0 of 3 live US nodes store one (CLI read, 2026-11-03)`,YQ=()=>({name:"Scroll-Over Text",skip:e=>KQ(e)?"the stacked layout: its words row's height floor (`copyShare*`) and the header subtraction have no Box setting; 0 live US nodes":void 0,boxProps:e=>({...ie,direction:"column",justify:"center",align:"start",gap:24,gapPhone:24,share:"content",...oi,placement:"left",darken:OF(e),darkenStyle:"even",sectionHeightMode:"fixed",sectionHeightUnit:"%",sectionHeightValue:yu(e.heightDesktop),sectionHeightModePhone:"fixed",sectionHeightUnitPhone:"%",sectionHeightValuePhone:yu(e.heightMobile)}),box:[...me.filter(e=>!String(typeof e=="string"?e:e[0]).startsWith("sectionHeight")),["imageSrc","bgImage"],["imageSrcMobile","bgImagePhone"],["overlay","darken",(e,o)=>OF(o)],["heightDesktop","sectionHeightValue",e=>yu(e)],["heightMobile","sectionHeightValuePhone",e=>yu(e)]],parts:VQ,drop:{uppercase:"not a value of its own: it picks the heading part \u2014 Case Upper when on, None (as typed) when off",layout:"not a value of its own: the overlay layout is this tree; a stacked node is skipped (`skip`)",copyShareDesktop:"the stacked layout's words-row floor, read only there; a stacked node is skipped",copyShareMobile:"the stacked layout's words-row floor, read only there; a stacked node is skipped",sticky:"the old pin never held on a live page (its theme wrapper is as tall as the section; decision 3, 2026-10-14), so the Box does not pin",titleSizeDesktop:"read by the heading part's `styleFrom`: a number is its Size, `inherit` and unset follow the token",titleSizeMobile:"read by the heading part's `styleFrom`: a number is its phone Size, `inherit` and unset follow the token",bodySizeDesktop:"read by the words part's `styleFrom`: a number is its Size, `inherit` and unset follow the token",bodySizeMobile:"read by the words part's `styleFrom`: a number is its phone Size, `inherit` and unset follow the token",buttonColor:_F("Button color"),buttonTextColor:_F("Button text color"),...he}}),FF={textStyle:"heading-2",...G("headingMedium",56,36),weight:400,lineHeight:1.05,letterSpacing:-.03},XQ={textStyle:"body-1",...G("body",16),lineHeight:1.7},LF=e=>({kind:"text",key:"body",props:{...de,maxWidth:520},style:{...XQ,paragraphSpacing:e}}),wu={top:0,bottom:0,topPhone:0,bottomPhone:0},Pb=(e,o)=>typeof e.sectionHeightMode=="string"&&e.sectionHeightMode!=="auto"?{}:{sectionHeightMode:"fixed",sectionHeightUnit:"%",sectionHeightValue:o,sectionHeightModePhone:"auto"},ZQ=(e,o)=>{let t=Pb(e,o);return Object.keys(t).length?t:{sectionHeightMode:e.sectionHeightMode,...e.sectionHeightValue===void 0?{}:{sectionHeightValue:e.sectionHeightValue},...e.sectionHeightUnit===void 0?{}:{sectionHeightUnit:e.sectionHeightUnit},sectionHeightModePhone:"auto"}},BF={boxShapePhone:"landscape"},DF="needs a black-and-white setting on a Box picture (the old photograph followed it, else the site's Photography); 0 live US nodes store it (CLI read, 2026-11-03)",JQ=(e,o)=>({[e]:o,[`${e}Phone`]:o}),QQ={textStyle:"heading-2",...G("headingMedium",40),weight:500,case:"none",lineHeight:1,letterSpacing:-.02},RF=e=>(Array.isArray(e.stats)?e.stats:[]).filter(o=>o&&(String(o.value??"").trim()!==""||String(o.label??"").trim()!=="")),eee=()=>({name:"Brand Text",boxProps:(e,o)=>({...ie,...Po("background")(e,o),direction:"row",share:"equal",gap:0,gapPhone:0,sectionBorder:{top:1,bottom:1},...we(e,wu),...Pb(e,100)}),box:[...me,...Le(wu)],parts:[{kind:"group",name:"Words",props:(e,o)=>({...D,justify:"center",gap:28,gapPhone:28,sectionBorder:ti({right:1}),sectionBorderPhone:ti({}),...oi,sectionPaddingTop:100,sectionPaddingBottom:100,sectionPaddingTopPhone:60,sectionPaddingBottomPhone:60,sectionPaddingRight:Xn(o)}),parts:[ge("eyebrow",G("label",14)),{kind:"text",key:"heading",role:"heading",props:K,style:{...FF,case:"none"},mark:"accentItalic"},LF(28),{kind:"group",name:"Stats",props:{...D,sectionPaddingTop:16,sectionPaddingTopPhone:16},parts:[{kind:"group",name:"Figures",props:e=>({...D,direction:"row",share:"equal",gap:24,gapPhone:24,maxWidth:520,phoneRow:Math.min(Math.max(RF(e).length,1),3),...JQ("sectionBorder",ti({top:1})),sectionPaddingTop:28,sectionPaddingTopPhone:28}),parts:[{kind:"list",key:"stats",name:"Stat",of:RF,props:{...D,gap:4,gapPhone:4},parts:[{kind:"text",key:"value",props:Yn,style:QQ},ge("label",{...G("label",13),color:"labels",letterSpacing:.2})]}]}]}]},Bg("Picture","imageSrc",BF)],drop:{...he,grayscale:DF,...ve}}),Su=e=>{let o=e.textAlign==="center"||e.textAlign==="right"?{align:e.textAlign}:{},t=e.textAlignPhone==="left"||e.textAlignPhone==="center"||e.textAlignPhone==="right"?{alignPhone:e.textAlignPhone}:{};return{...o,...t}},oee=e=>e.textAlign==="center"?"center":e.textAlign==="right"?"end":"stretch",tee=e=>Math.min(Math.max(U(e.overlay)??60,0),100),NF=e=>typeof e=="string"&&e.trim()!=="",ree={...Ve,align:"center",alignPhone:"center",buttonFillOpacity:0,buttonBorder:{width:1},buttonPaddingTop:16,buttonPaddingRight:28,buttonPaddingBottom:16,buttonPaddingLeft:28,buttonPaddingTopPhone:12,buttonPaddingRightPhone:20,buttonPaddingBottomPhone:12,buttonPaddingLeftPhone:20},AF=e=>({...Bg("Picture","imageSrc",(o,t)=>({...NF(o.imageSrc)?{darken:40,darkenStyle:"even"}:{},placement:"center",...BF,sectionBorder:ti(e?{left:1}:{right:1}),...MF(e?"left":"right",Xn(t))}),[{kind:"button",key:"imageBtnText",href:"imageBtnHref",variant:"ghost",props:ree,style:{textStyle:"body-5",...G("label",13,12),case:"upper",letterSpacing:.18}}]),when:o=>o.reverse===!0===e}),MF=(e,o)=>{let t=Math.max(60-o,0);return{sectionPaddingLeft:e==="left"?60:t,sectionPaddingRight:e==="right"?60:t}},aee={kind:"group",name:"Words",props:(e,o)=>{let t=e.reverse===!0;return{...D,justify:"center",align:oee(e),placement:e.textAlign==="center"?"center":e.textAlign==="right"?"right":"left",...ZQ(e,72),gap:24,gapPhone:24,...NF(e.textBgSrc)?{darken:tee(e),darkenStyle:"even"}:{},...oi,sectionPaddingTop:100,sectionPaddingBottom:100,...MF(t?"right":"left",Xn(o)),sectionPaddingTopPhone:60,sectionPaddingBottomPhone:60}},box:[["textBgSrc","bgImage"]],parts:[{...ge("eyebrow",G("label",14)),styleFrom:Su},{kind:"text",key:"title",role:"heading",props:K,style:FF,styleFrom:e=>({case:e.uppercase===!0?"upper":"none",...Su(e)})},{...LF(24),styleFrom:Su},{kind:"group",name:"Button",props:{...D,sectionPaddingTop:8,sectionPaddingTopPhone:8},parts:[{kind:"button",key:"ctaText",href:"ctaHref",variant:"primary",props:e=>{let o=Su(e);return{...Ve,...o.align?{align:o.align}:{},...o.alignPhone?{alignPhone:o.alignPhone}:{}}}}]}]},nee=()=>({name:"Image & Text Split",boxProps:(e,o)=>({...ie,...Po("background")(e,o),direction:"row",share:"equal",gap:0,gapPhone:0,sectionBorder:{top:1,bottom:1},...we(e,wu),...Pb(e,72)}),box:[...me,...Le(wu)],parts:[AF(!1),aee,AF(!0)],drop:{reverse:"not a value of its own: it picks the order \u2014 the Picture Box first, or after the Words",uppercase:"not a value of its own: the heading part's Case \u2014 Upper when on, None (as typed) when off",textAlign:"read by each words part (its Align) and the Words Box (its Align); left writes nothing, as the old emitted no class",textAlignPhone:"read by each words part as its phone Align",textAlignTablet:"a words part has no tablet Align yet (three-views follow-up); no old node stores it (new with the Tablet view's Text alignment row, 0 stored on the US sites 2026-11-05), so nothing moves",overlay:"read by the Words Box: its Darken over the words picture (60 when unset); no picture, no wash",grayscale:DF,...he,...ve}}),HF={IntroBleed:YQ(),Manifesto:eee(),Split:nee()};var WF={top:72,bottom:72,topPhone:72,bottomPhone:72},see={name:"Editorial Text",boxProps:e=>({...ie,direction:"column",gap:28,gapPhone:28,sectionBorder:{top:1},...we(e,WF)}),box:[["topBorder","sectionBorder",e=>e===!1?void 0:{top:1}],...me,...Le(WF)],parts:[Rt("Prose"),{kind:"text",key:"body",props:de,style:{textStyle:"body-1",...G("body",16),lineHeight:1.7,paragraphSpacing:18}}],drop:{...he,...ve,headPlacement:"needs a row per head placement: an own-box Prose draws no head (its words sit in a Section Header above it), the row always draws the head. 0 of 123 live nodes store it (the live export, 2026-10-24)"}},zF={buttonPaddingTop:20,buttonPaddingBottom:20,buttonPaddingLeft:28,buttonPaddingRight:28},GF=(e,o)=>o?.variant==="primary",$F=(e,o)=>({kind:"list",key:"buttons",name:"Button",flat:!0,when:e,parts:[{kind:"button",key:"label",href:"href",when:GF,variant:"primary",style:{letterSpacing:.3},props:{...Ve,...zF,...o}},{kind:"button",key:"label",href:"href",when:(t,r)=>!GF(t,r),variant:"ghost",style:{letterSpacing:.3},props:(t,r)=>({...Ve,...zF,...o,...ei(t,r)})}]}),Cu=e=>no(e.title),lee={name:"Call-to-Action Heading",boxProps:e=>({...ie,direction:"row",align:"center",justify:Cu(e)?"between":"end",gap:60,gapPhone:60,share:"content",sectionBorder:{bottom:1},...To(e,"TitleWithButtons")}),box:[...me,...kr("TitleWithButtons")],parts:[{kind:"group",name:"Title",props:{...D,maxWidth:1e3,widthFitPhone:"fill"},parts:[{kind:"text",key:"title",role:"heading",props:K,style:{textStyle:"heading-1",...Vo("headingLarge",48,7,108),case:"upper",lineHeight:.94,letterSpacing:-.035}}]},{kind:"group",name:"Buttons",props:e=>({...D,gap:14,gapPhone:14,widthFitPhone:"fill",...Cu(e)?{minWidth:280,minWidthPhone:0}:{}}),parts:[$F(Cu,{widthFit:"fill",iconPosition:"end"}),$F(e=>!Cu(e),{})]}],drop:{...he,buttonsAlign:"moves the buttons only when there is no heading (4 of 128 live nodes), where the Box puts them at the end. 0 of 128 live nodes store it (the live export, 2026-10-24)",buttonsAlignPhone:"the phone's own side of `buttonsAlign`, read only with no heading; no old node stores it (it is new with the Phone view's Block alignment row), so nothing moves",buttonsAlignTablet:"the tablet's own side of `buttonsAlign`, read only with no heading; no old node stores it (it is new with the Tablet view's Block alignment row, 0 stored on the US sites 2026-11-05), so nothing moves"}};function iee(e){let{siteGutter:o,siteGutterPhone:t}=e.site??{},r=Xn(e),a=Math.min(20,Ac(t)??Fc(o));return{sectionPaddingLeft:r,sectionPaddingRight:r,sectionPaddingLeftPhone:a,sectionPaddingRightPhone:a}}var UF={top:40,bottom:64,topPhone:24,bottomPhone:36},cee={name:"Section Header",boxProps:(e,o)=>({...ie,direction:"column",gap:0,...we(e,UF),...iee(o)}),box:[...me,...Le(UF)],parts:[Rt("SectionHeader")],drop:{...he,...ve,headStyle:"needs a row per head look: the row draws the standard look; the editorial, simple, statement, natural and essay looks are other layouts. 0 of 69 live nodes store it (the live export, 2026-10-24)",eyebrowLook:"read only by the simple, statement, natural and essay looks, which this row does not draw. 0 of 69 live nodes store it",rowGap:"read only by the natural look, which this row does not draw. 0 of 69 live nodes store it",descriptionSize:"read only by the natural look, which this row does not draw. 0 of 69 live nodes store it",numStyle:"Solid (the default; 4 of 69 live nodes store it) IS the eyebrow Text the row draws; Outlined (0 live) needs an outlined-number text look"}},jF={...D,direction:"row",share:[67],gap:30},KF={...D,sectionPaddingLeft:30,sectionPaddingLeftPhone:0},qF=(e,o,t)=>({kind:"group",name:e,props:o,parts:[t]}),dee={name:"Lead Text",boxProps:e=>({...ie,direction:"column",gap:40,gapPhone:40,sectionBorder:{bottom:1},...To(e,"ParagraphsA")}),box:[...me,...kr("ParagraphsA")],parts:[{kind:"group",name:"Numbers",props:{...jF,gapPhone:24,sectionBorder:{bottom:1},sectionPaddingBottom:40,sectionPaddingBottomPhone:40},parts:[{kind:"group",name:"Eyebrow",props:{...D,sectionPaddingTop:5,sectionPaddingBottom:1,sectionPaddingTopPhone:5,sectionPaddingBottomPhone:1},parts:[ge("eyebrow",{color:"labels",...G("label",12),letterSpacing:.24})]},qF("Stats column",D,{kind:"group",name:"Stats",props:{...KF,gap:0,gapPhone:0},parts:[{kind:"list",key:"stats",name:"Stat",flat:!0,parts:[Zl("value","label",{...G("label",13),letterSpacing:.18,lineHeight:1.8})]}]})]},{kind:"group",name:"Words",props:{...jF,gapPhone:28},parts:[{kind:"group",name:"Lead",props:D,parts:[{kind:"group",name:"Measure",props:{...D,maxWidth:780},parts:[{kind:"text",key:"lead",props:K,style:{textStyle:"heading-3",...G("headingSmall",22,20),weight:400,case:"none",lineHeight:1.45,letterSpacing:-.005}}]}]},qF("Note column",{...D,justify:"end",widthFit:"fill"},{kind:"group",name:"Founders",props:{...KF,gap:8,gapPhone:8},parts:[{kind:"group",name:"Note",props:{...D,gap:6,gapPhone:6},parts:[{kind:"text",key:"foundersHeading",props:K,style:{textStyle:"body-1",fontRole:"heading",...G("body",18,16),weight:500,letterSpacing:-.01,lineHeight:1.7}},{kind:"text",key:"foundersBody",props:de,style:{textStyle:"body-5",fontRole:"heading",...G("body",14,12),lineHeight:1.7}}]},ge("attribution",{...G("label",12,10),letterSpacing:.24,lineHeight:1.7})]})]}],drop:{...he}},VF={top:24,bottom:24,topPhone:24,bottomPhone:24},fee={name:"Banner",boxProps:e=>({...ie,direction:"column",gap:0,...we(e,VF)}),box:[...me,"contained",...Le(VF)],parts:[{kind:"group",name:"Card",keepEmpty:!0,props:{...D,gap:28,placement:"top-left",darken:60,darkenStyle:"even",sectionBorder:{width:1},...Ho(64,40,40,24)},box:[["imageSrc","bgImage"],["overlay","darken",e=>Math.min(Math.max(U(e)??60,0),100)]],parts:[{kind:"group",name:"Words",props:{...D,gap:20},parts:[ge("eyebrow"),{kind:"text",key:"title",role:"heading",props:{...K,maxWidth:680},style:{weight:500,lineHeight:1.05,letterSpacing:-.03,case:"none"}},{kind:"text",key:"body",props:{...de,maxWidth:680},style:{textStyle:"body-1",lineHeight:1.6},was:{size:16}}]},{kind:"button",key:"ctaText",href:"ctaHref",variant:"primary",props:Ve}]}],drop:{...he,...ve}},Eb={Prose:see,TitleWithButtons:lee,SectionHeader:cee,ParagraphsA:dee,Banner:fee};function mDe(){jo(Eb),jo(vA),jo(EA),jo(bA),jo(AA),jo(BA),jo(XA),jo(JA),jo(fF),jo(TF),jo(HF)}import{isNodeList as uee}from"efficient-easel/data";var yDe=Object.keys(Eb);function YF(e,o,t){let r={};for(let a of Object.keys(o(e.type)))r[a]=void 0;for(let[a,n]of Object.entries(e.props))r[a]=uee(n)?n.map(s=>YF(s,o,t)):n;return r.id=t(e.type),{type:e.type,props:r}}function Ob(e,o,t=0){return(r,a)=>{let{nodes:n}=bg({type:e,props:{...r(e),id:a(e)}},o);return YF(n[t],r,a)}}function pee(e,o){if(!l_(e,o))return null;let t=qf(e);return t?Ob(e,t):null}function vu(e,o=Ml){return uR(e)??pee(e,o)}import{blockTypesIn as WL}from"efficient-easel/screen/lib/document/block-types-in";import{jsx as It,jsxs as BL}from"react/jsx-runtime";import{createContext as ioe,useContext as coe,useState as doe}from"react";import{jsx as Qn,jsxs as sL}from"react/jsx-runtime";import{useEffect as Ab,useRef as _ee,useState as mi}from"react";import{jsx as Da}from"react/jsx-runtime";import{Component as Iee,createContext as gee,lazy as ODe,Suspense as _De,useContext as bee}from"react";var mee="hrefRewrite";function hee(){return ar("efficient.link-href-rewrites",()=>({rewrites:new Map,count:0,missed:new Set}))}function xee(){return typeof process<"u"&&!0}function CDe(e){let o=e?.[mee];return typeof o=="string"?o.trim():""}function XF(e){if(!e)return null;let o=hee(),t=o.rewrites.get(e);return!t&&!xee()&&o.missed.add(e),t??null}var yee={Link:gy,Image:Iy},ZF=gee(yee);function LDe({runtime:e,children:o}){return Da(ZF.Provider,{value:e,children:o})}function JF(){return bee(ZF)}function BDe({hrefRewrite:e,...o}){let{Link:t}=JF(),r=XF(e);return r?Da(_b,{name:r.name,href:o.href,fallback:Da(t,{...o}),children:Da(See,{Link:t,rewrite:r.rewrite,...o})},r.key):Da(t,{...o})}function See({Link:e,rewrite:o,...t}){let r=oe(o(t.href)),a=r&&Yy(r)?r:t.href;return Da(e,{...t,href:a})}var _b=class extends Iee{state={failed:!1,href:this.props.href};static getDerivedStateFromProps(o,t){return o.href===t.href?null:{failed:!1,href:o.href}}static getDerivedStateFromError(){return{failed:!0}}componentDidCatch(o){console.error(`The link href rewrite ${this.props.name} failed; the link goes where it was typed.`,o)}render(){return this.state.failed?this.props.fallback:this.props.children}};function QF(e){let{Image:o}=JF();return Da(o,{...e})}import{jsx as eL,Fragment as wee,jsxs as Cee}from"react/jsx-runtime";import{useEffect as vee,useRef as oL,useState as kee}from"react";var Tee="#t=0.001",Pee=2;function Eee(e,o){if(e.readyState<Pee||!e.videoWidth||!e.videoHeight)return!1;let t=o.getContext("2d");return t?(o.width=e.videoWidth,o.height=e.videoHeight,t.drawImage(e,0,0,o.width,o.height),!0):!1}function tL({src:e,objectPosition:o="50% 50%",onError:t}){let r=oL(null),a=oL(null),[n,s]=kee(!1);return vee(()=>{let l=r.current,c=a.current;if(n||!l||!c)return;let d=()=>{Eee(l,c)&&s(!0)};return d(),l.addEventListener("loadeddata",d),l.addEventListener("seeked",d),()=>{l.removeEventListener("loadeddata",d),l.removeEventListener("seeked",d)}},[n]),Cee(wee,{children:[eL("canvas",{ref:a,"aria-hidden":!0,className:"absolute inset-0 z-[3] h-full w-full object-cover",style:{objectPosition:o,visibility:n?"visible":"hidden"}}),!n&&eL("video",{ref:r,src:`${e}${Tee}`,muted:!0,playsInline:!0,preload:"auto",className:"hidden",onError:t})]})}import{imageCopyUrl as aL,imageSrcSet as Oee}from"efficient-shell/image-copies";var rL;function Rb(){return rL===void 0?{}:{host:rL}}var zDe="(max-width: 800px) 100vw, min(100vw, 1600px)";function nL(e,{fallbackWidth:o=1280,maxWidth:t}={}){let r=Oee(e,{...Rb(),...t===void 0?{}:{maxWidth:t}});return r?{src:aL(e,o,Rb()),srcSet:r}:{src:e}}function GDe(e){let o=aL(e,1920,Rb());return o===e?`url(${e})`:`url("${o}")`}var Ree=.5;function hi({videoSrc:e,posterSrc:o,showVideo:t=!0,playbackRate:r=Ree,objectPosition:a="50% 50%",objectPositionPhone:n,objectPositionTablet:s,quiet:l=!1}){let c=Jw(n,s),d=o||"",f=e||"",[m,u]=mi(!1),[x,I]=mi(!1),[b,v]=mi(!1),[C,w]=mi(!1),[g,k]=mi(!1),T=_ee(null);Ab(()=>{u(!1),I(!1),v(!1),w(!1)},[e,o]),Ab(()=>{if(typeof window>"u")return;let L=()=>{let E=window;E.requestIdleCallback?E.requestIdleCallback(()=>k(!0),{timeout:2e3}):setTimeout(()=>k(!0),800)};if(document.readyState==="complete"){L();return}return window.addEventListener("load",L,{once:!0}),()=>window.removeEventListener("load",L)},[]),Ab(()=>{let L=T.current;if(!L)return;let E=()=>{L.playbackRate=r};return E(),L.addEventListener("loadedmetadata",E),()=>L.removeEventListener("loadedmetadata",E)},[e,r]);let F=by(d),P=d&&F&&!x?nL(d):{src:d};return sL("div",{className:"absolute inset-0 z-[1]",children:[Qn("div",{className:"absolute inset-0",style:{background:"var(--site-surface)"}}),d&&(F?Qn("img",{src:P.src,...P.srcSet?{srcSet:P.srcSet,sizes:"100vw"}:{},alt:"",className:`absolute inset-0 z-[2] h-full w-full object-cover ${c.className}`.trim(),style:{display:m?"none":"block",objectPosition:a,...c.style},onError:()=>P.srcSet?I(!0):u(!0)},d):Qn(QF,{src:d,alt:"",fill:!0,priority:!0,sizes:"100vw",className:`z-[2] object-cover ${c.className}`.trim(),style:{display:m?"none":"block",objectPosition:a,...c.style},onError:()=>u(!0)},d)),t&&!l&&f&&g&&!b&&sL("video",{ref:T,autoPlay:!0,loop:!0,muted:!0,playsInline:!0,preload:"metadata",className:"absolute inset-0 z-[3] h-full w-full object-cover",style:{objectPosition:a},onError:()=>v(!0),children:[yy(f)&&Qn("source",{src:f.replace(/\.mp4$/,".av1.mp4"),type:'video/mp4; codecs="av01.0.08M.10"'}),Qn("source",{src:f,type:"video/mp4"})]},f),t&&l&&f&&g&&!C&&(!d||m)&&Qn(tL,{src:f,objectPosition:a,onError:()=>w(!0)},f)]})}import{Fragment as pL,jsx as Oo,jsxs as Bb}from"react/jsx-runtime";import{MOTION_TIMING as Aee}from"efficient-shell/format";var dL="grayscale(1) contrast(1.03)",QDe="Black and white";function Fee(e){return e===!0?{filter:dL}:{}}function Lee(e){let{filter:o}=Fee(e);return o?{style:{filter:o}}:{}}var Ma="sf-photo-grayscale",Lb="data-sf-photo-host",lL={duration:"--sf-photo-hover-duration",delay:"--sf-photo-hover-delay"},Eu=`@media (hover:hover){.${Ma}{filter:${dL};transition:filter var(--sf-photo-hover-duration,var(--page-motion-hover-duration)) var(--page-ease-media) var(--sf-photo-hover-delay,var(--page-motion-hover-delay))}.${Ma}:hover,[data-sf-photo-host]:hover .${Ma}{filter:none}}@media (hover:hover) and (prefers-reduced-motion:reduce){.${Ma}{transition:none}}`;function fL(e){let o=Aee.hover,t={...e.duration!==o.duration.default?{[lL.duration]:`${e.duration}s`}:{},...e.delay!==o.delay.default?{[lL.delay]:`${e.delay}s`}:{}};return Object.keys(t).length?t:void 0}function uL(e,o,t){if(e===!0)return Lee(!0);if(t?.kind==="mono"){let r=fL(t);return{className:Ma,sheet:Eu,...r?{style:r}:{}}}return e===!1?{}:o===!0?{className:Ma}:{}}var Na="sf-photo-next",iL="data-sf-repeat",Fb="sf-photo-zoom",Bee="--sf-photo-zoom",eNe="sf-photo-wash",ku="sf-photo-wash-rest",xi="sf-photo-wash-hover",Tu="sf-photo-frame",Pu=(e,o)=>{let t=`:not([${iL}]:not(:hover) .${e})`;return`${o},[${iL}]:hover .${e}${t},[${Lb}]:hover .${e}${t}`},cL=e=>`${e} var(--sf-photo-hover-duration,var(--page-motion-hover-duration)) var(--page-ease-media) var(--sf-photo-hover-delay,var(--page-motion-hover-delay))`,Dee=`.${Na}{opacity:0}.${xi}{opacity:0}@media (hover:hover){.${Na},.${ku},.${xi}{transition:${cL("opacity")}}${Pu(Na,`.${Na}:hover,.${Tu}:hover .${Na}`)},${Pu(xi,`.${Tu}:hover .${xi}`)}{opacity:1}${Pu(ku,`.${Tu}:hover .${ku}`)}{opacity:0}}@media (hover:hover) and (prefers-reduced-motion:no-preference){.${Fb}{transition:${cL("transform")}}${Pu(Fb,`.${Tu}:hover .${Fb}`)}{transform:scale(var(${Bee}))}}@media (hover:hover) and (prefers-reduced-motion:reduce){.${Na},.${ku},.${xi}{transition:none}}`;function oNe(e){if(e?.kind!=="nextImage")return null;let o=fL(e);return{className:Na,sheet:Dee,...o?{style:o}:{}}}function tNe(e){return e===!0?{[Ma]:Eu}:{}}import{hidableText as Nee}from"efficient-easel/draw";var Mee={one:"max-[719px]:grid-cols-1 max-[719px]:grid-rows-1",side:"max-[719px]:grid-cols-2 max-[719px]:grid-rows-1",stacked:"max-[719px]:grid-cols-1 max-[719px]:grid-rows-2"},Hee={one:"view-tablet:grid-cols-1 view-tablet:grid-rows-1",side:"view-tablet:grid-cols-2 view-tablet:grid-rows-1",stacked:"view-tablet:grid-cols-1 view-tablet:grid-rows-2"};function mL(e){let o=e.isVideo&&NS(e.videoSource)==="youtube",t=e.isVideo&&MS(e.videoPlayback)==="click",r=o?HS(Nee(e.youtubeUrl)):null,a=Vd(e.mediaLayout);return{fromYouTube:o,onClick:t,youTubeId:r,backgroundFile:e.isVideo&&!o&&!t,desktopLayout:a,phoneLayout:$x(e.mediaLayoutPhone,a),twoPictures:!e.isVideo&&dl(e)>1}}function Ii(e,o){return af(Dn({_partMotion:e},o))}function es(e,o){return uL(void 0,void 0,DT(Dn({_partMotion:e},o)))}function hL(e){return ha.some(o=>es(e,o).className)?{hostAttrs:{[Lb]:""},sheet:Eu}:{}}function Ou({treatment:e,children:o}){return e.className?Oo("div",{className:`absolute inset-0 ${e.className}`,...e.style?{style:e.style}:{},children:o}):Oo(pL,{children:o})}function _u({color:e,opacity:o,passClicks:t=!0}){return o>0?Oo("div",{className:t?"pointer-events-none absolute inset-0 z-[2]":"absolute inset-0 z-[2]",style:{background:e,opacity:Math.min(Math.max(o,0),100)/100}}):null}function Ru({part:e,editing:o,marked:t=!0,entrance:r,className:a,children:n}){let s=o&&t?{[N0]:e}:void 0;return r?Oo(Mg,{desktop:r.desktop,phone:r.phone,editing:o,boxClass:a,boxAttrs:s,children:n}):Oo("div",{className:a,...s,children:n})}function xL({partMotion:e,editing:o,children:t}){let r=Ii(e,"media"),a=es(e,"media"),n=a.className?Oo("div",{className:`absolute inset-0 z-[1] ${a.className}`,...a.style?{style:a.style}:{},children:t}):t;return r?Oo(Mg,{desktop:r.desktop,phone:r.phone,editing:o,boxClass:"absolute inset-0 z-[1]",children:n}):Oo(pL,{children:n})}function IL({desktopLayout:e,phoneLayout:o,editing:t,marked:r=!0,partMotion:a,first:n,second:s}){return Bb("div",{className:`absolute inset-0 z-[1] grid ${Mee[o]} ${Hee[e]}`,"data-hero-layout":e,"data-hero-layout-phone":o,children:[Oo(Ru,{part:"image",editing:t,marked:r,entrance:Ii(a,"image"),className:"relative overflow-hidden",children:Bb(Ou,{treatment:es(a,"image"),children:[Oo(hi,{posterSrc:rr(n.src),showVideo:!1,objectPosition:n.objectPosition,objectPositionPhone:n.objectPositionPhone,objectPositionTablet:n.objectPositionTablet}),Oo(_u,{color:n.tintColor,opacity:n.tintOpacity})]})}),Oo(Ru,{part:"image2",editing:t,marked:r,entrance:Ii(a,"image2"),className:`relative overflow-hidden${o==="one"?" max-[719px]:hidden":""}${e==="one"?" view-tablet:hidden":""}`,children:Bb(Ou,{treatment:es(a,"image2"),children:[Oo(hi,{posterSrc:rr(s.src),showVideo:!1,objectPosition:s.objectPosition,objectPositionPhone:s.objectPositionPhone,objectPositionTablet:s.objectPositionTablet}),Oo(_u,{color:s.tintColor,opacity:s.tintOpacity})]})})]})}import{jsx as Ha,Fragment as Wee,jsxs as zee}from"react/jsx-runtime";import{useEffect as Gee,useState as $ee}from"react";import{PlaySolidIcon as Uee}from"efficient-shell/icons/efficient-looks";function gL({youTubeId:e,ownPoster:o,background:t,editing:r}){let[a,n]=$ee("large");return Gee(()=>n("large"),[e]),e?zee(Wee,{children:[!o&&a!=="none"&&Ha("img",{src:a==="large"?WS(e):zS(e),alt:"",className:"absolute inset-0 z-[2] h-full w-full object-cover",onLoad:s=>{a==="large"&&s.currentTarget.naturalWidth<=120&&n("small")},onError:()=>n(a==="large"?"small":"none")},`${e}-${a}`),t&&!r&&Ha("div",{className:"pointer-events-none absolute inset-0 z-[3] overflow-hidden [container-type:size]","aria-hidden":"true",children:Ha("iframe",{src:Ep(e,"background"),title:"",tabIndex:-1,allow:"autoplay; encrypted-media; picture-in-picture",className:"absolute left-1/2 top-1/2 h-[max(100%,56.25cqw)] w-[max(100%,177.78cqh)] -translate-x-1/2 -translate-y-1/2 border-0"})})]}):null}function bL({youTubeId:e,fileSrc:o,playing:t,onPlay:r,editing:a}){return!e&&!o?null:t&&!a?e?Ha("iframe",{src:Ep(e,"click"),title:Op,allow:"autoplay; encrypted-media; picture-in-picture; fullscreen",allowFullScreen:!0,className:"absolute inset-0 z-[6] h-full w-full border-0 bg-overlay-scrim"}):Ha("video",{src:o,controls:!0,autoPlay:!0,playsInline:!0,className:"absolute inset-0 z-[6] h-full w-full bg-overlay-scrim object-contain"}):Ha("button",{type:"button","aria-label":Op,onClick:a?void 0:r,className:`absolute left-1/2 top-1/2 z-[4] grid h-16 w-16 -translate-x-1/2 -translate-y-1/2 place-items-center rounded-full bg-btn text-btn-ink shadow-lg transition-transform motion-reduce:transition-none ${a?"pointer-events-none":"cursor-pointer hover:scale-105"}`,children:Ha(Uee,{size:28})})}var yL=["top","middle","bottom"],SL=["left","center","right"],wL="bottom",CL="left",jee={top:"Top",middle:"Middle",bottom:"Bottom"},Kee={left:"Left",center:"Center",right:"Right"},wNe="Up and down",CNe="Sideways",qee={top:"flex-start",middle:"center",bottom:"flex-end"},Vee={left:"flex-start",center:"center",right:"flex-end"},Yee="--sf-hero-phone-y",Xee="--sf-hero-phone-x";function Zee(e){return yL.includes(e)?e:wL}function Jee(e){return SL.includes(e)?e:CL}function vL(e,o){let t=Zee(e),r=Jee(o),a={};return t!==wL&&(a[Yee]=qee[t]),r!==CL&&(a[Xee]=Vee[r]),a}function vNe(){return yL.map(e=>({label:jee[e],value:e}))}function kNe(){return SL.map(e=>({label:Kee[e],value:e}))}import{hexToRgb as Qee}from"efficient-shell/format";var eoe=!0;var ooe=[[0,".5"],[30,".1"],[60,".1"],[100,".85"]];function kL(e){let o=Qee(e);return o?`${o.r},${o.g},${o.b}`:null}function TL(e){return e==null?eoe:e!==!1}function PL(e){let o=(e?kL(e):null)??kL(tt);return`linear-gradient(180deg, ${ooe.map(([t,r])=>`rgba(${o},${r}) ${t}%`).join(", ")})`}import{hexToRgb as EL}from"efficient-shell/format";var OL="bottom";var toe=[{label:"Bottom",value:"bottom",cell:"bottom"},{label:"Top",value:"top",cell:"top"},{label:"Left",value:"left",cell:"left"},{label:"Right",value:"right",cell:"right"}],roe={bottom:180,top:0,left:270,right:90},aoe=[[.55,0],[.15,18],[null,35],[null,55],[.85,100]],noe=[[null,33],[.6,67],[.94,100]];function soe(e,o){let{r:t,g:r,b:a}=EL(e)??EL(tt);return`rgba(${t},${r},${a},${o})`}function _L(e){return to(toe,OL,e)}function RL(e=tt,o=OL){let t=_L(o),r=(t==="top"||t==="bottom"?aoe:noe).map(([a,n])=>`${a===null?"transparent":soe(e,a)} ${n}%`);return`linear-gradient(${roe[t]}deg, ${r.join(", ")})`}function AL(e,o){let t=oe(e.overlayColor),r=oe(e.overlayPosition),a=oe(o)??tt;return!t&&!r?{own:!1,color:a,position:null}:{own:!0,color:t??a,position:_L(r)}}import{jsx as loe}from"react/jsx-runtime";var FL="sf-photo-hover";function LL({sheet:e,name:o=FL}){return e?loe("style",{href:o,precedence:FL,dangerouslySetInnerHTML:{__html:e}}):null}var foe=ioe({});function YNe({name:e,process:o,mediaType:t="video",mediaSrc:r,videoSpeed:a,poster:n,objectPosition:s,objectPositionPhone:l,objectPositionTablet:c,tintColor:d=tt,tintOpacity:f=0,groups:m,editing:u=!1,themeClassName:x,themeStyle:I,overlayColor:b,overlayPosition:v,mediaLayout:C,mediaLayoutPhone:w,mediaImage2:g,objectPosition2:k,objectPosition2Phone:T,objectPosition2Tablet:F,tintColor2:P=tt,tintOpacity2:L=0,videoSource:E,youtubeUrl:R,videoPlayback:N,partMotion:y}){let{alignment:_="left",textureOpacity:A,textureOn:H,textureColor:Z,quietVideo:q,phoneUpDown:$,phoneSideways:ke,holdReel:be,reelHeld:Ke,ratioMin:Me}=coe(foe),ue=t==="video",pe=ue?rr(r):void 0,ye=ue?rr(n):rr(r)??rr(n),Ye=typeof a=="number"?a/100:1,{fromYouTube:qe,onClick:se,youTubeId:Oe,backgroundFile:eo,desktopLayout:_e,phoneLayout:We,twoPictures:_o}=mL({isVideo:ue,videoSource:E,videoPlayback:N,youtubeUrl:R,mediaLayout:C,mediaLayoutPhone:w}),[No,Ro]=doe(!1);No&&Ke===!1&&Ro(!1);let M=!No,te=AL({overlayColor:b,overlayPosition:v},Z),xe=ue?null:Ii(y,"image"),Re=hL(y),Ae=It(Ou,{treatment:ue?{}:es(y,"image"),children:It(hi,{videoSrc:eo?pe:void 0,posterSrc:ye,showVideo:eo,playbackRate:Ye,objectPosition:s,objectPositionPhone:ue?void 0:l,objectPositionTablet:ue?void 0:c,quiet:q})});return BL("section",{className:`${Me?"relative min-h-full w-full overflow-clip":"relative h-full w-full overflow-hidden"}${x?` ${x}`:""}`,style:I,"data-slide-name":e??"","data-slide-process":o??"","data-slide-media":eo&&pe?"video":"still",...Re.hostAttrs,children:[It(LL,{sheet:Re.sheet}),It(xL,{partMotion:y,editing:u,children:_o?It(IL,{desktopLayout:_e,phoneLayout:We,editing:u,marked:!1,partMotion:y,first:{src:r,objectPosition:s,objectPositionPhone:l,objectPositionTablet:c,tintColor:d,tintOpacity:f},second:{src:g,objectPosition:k,objectPositionPhone:T,objectPositionTablet:F,tintColor:P,tintOpacity:L}}):qe||xe?BL(Ru,{part:ue?"media":"image",editing:u,marked:!1,entrance:xe,className:"absolute inset-0 z-[1]",children:[Ae,qe&&It(gL,{youTubeId:Oe,ownPoster:!!ye,background:!se,editing:u})]}):Ae}),se&&It(bL,{youTubeId:Oe,fileSrc:qe?void 0:pe,playing:No,onPlay:()=>{Ro(!0),be?.()},editing:u}),M&&!_o&&It(_u,{color:d,opacity:f,passClicks:!1}),M&&TL(H)&&It("div",{className:"absolute inset-0 z-[2]",style:{background:te.own?RL(te.color,te.position??void 0):PL(te.color),...A!==void 0?{opacity:A/100}:null}}),M&&It("div",{className:[Me?"sf-hero-group-layer relative min-h-full z-[3] mx-auto max-w-[var(--sf-site-width,1600px)] px-[var(--sf-site-gutter,40px)] pt-[140px] pb-14":"sf-hero-group-layer absolute inset-0 z-[3] mx-auto max-w-[var(--sf-site-width,1600px)] px-[var(--sf-site-gutter,40px)] pt-[140px] pb-14",u?"sf-hero-group-layer-edit":""].filter(Boolean).join(" "),style:{...xC,...vL($,ke)},children:m&&It(m,{className:"sf-hero-group-zone",minEmptyHeight:160})})]})}var DL=Array.from({length:3},(e,o)=>({name:`Slide ${o+1}`,process:"Category",mediaType:"image",mediaVideo:"",poster:""}));import{newNodeId as ML}from"efficient-easel/draw";var uoe="ImageBlock",poe=3,Au=(e,o,t={})=>({type:e,props:{...o?.(e)??{},id:ML(e),...t}}),moe=e=>({...e?.(V)??{},direction:"column",[je]:[Au(uoe,e),Au(V,e,{direction:"column",[je]:[Au("Text",e,Wo()),Au("Text",e)]})]}),At={Hero:{slot:"slides",childType:"HeroSlide",addLabel:"Add slide",slider:!0,seeds:()=>DL.map(e=>({...e}))},HeroSlide:{slot:"groups",childType:"HeroGroup",addLabel:`Add ${Bt.toLowerCase()}`,seeds:()=>[],addBlocked:Xi,notice:Zp},HeroSingle:{slot:"boxes",childType:"HeroGroup",addLabel:`Add ${Bt.toLowerCase()}`,seeds:()=>[],addBlocked:Xi,notice:Zp},ProcessSteps:{slot:"boxes",childType:V,addLabel:`Add ${Bt.toLowerCase()}`,seeds:e=>Array.from({length:poe},()=>moe(e)),skipSeed:e=>Array.isArray(e.steps)&&e.steps.length>0}},NL=1,hoe={slot:cl,childType:V,addLabel:`Add ${Bt.toLowerCase()}`,seeds:()=>[],addBlocked:e=>e.length>=NL?"This Hero has its Scrolling Bar already. Delete it to add another.":null,notice:e=>e.length>NL?`This Hero holds ${e.length} Scrolling Bars. Keep one and delete the others.`:null},HL={Hero:{[cl]:hoe}};function a2e(e){for(let[o,t]of Object.entries(e)){if(o in At&&At[o]!==t)throw new Error(`lib/document/slot-specs: "${o}" already has a slot spec`);At[o]=t}}function n2e(e,o){let t=At[e];return t?{slot:t.slot,children:t.seeds(o).map(r=>({type:t.childType,props:{id:ML(t.childType),...r}}))}:null}var zL=()=>({}),GL=new Map;function xoe(e){let o=GL.get(e);if(o)return o;let t=new Set,r=At[e];if(r)for(let s of r.seeds(zL))for(let l of WL({type:r.childType,props:s}))t.add(l);let a=vu(e);if(a){let s=0;for(let l of WL(a(zL,c=>`${c}-${s+=1}`)))t.add(l)}t.delete(e);let n=[...t].sort();return GL.set(e,n),n}function Ioe(e){if(!e||!e.sets&&!e.allow&&!e.deny?.length)return null;let o=HI(e),t=e.allow?new Set(e.allow):null,r=new Set(e.deny??[]),a=new Set(Object.keys(e.host??{})),n=c=>{if(r.has(c))return!1;if(a.has(c))return!0;let d=Hy(c);return!d||!o[d]?!1:t?t.has(c):!0},s=new Map,l=c=>{let d=s.get(c);if(d!==void 0)return d;s.set(c,!1);let f=n(c)&&xoe(c).every(l);return s.set(c,f),f};return{sets:o,offers:l}}var goe="block-offer";function Db(e=$L()){return e.cache(goe,()=>Ioe(tc(e)))}function UL(e,o=$L()){let t=Db(o);return t?t.offers(e):!0}function boe(e){let o=tu.Ticker(e.nodeDefaults,e.newNodeId),{sectionBorder:t,...r}=o.props,a=zx.line?{sectionBorder:t}:{};return{...o,props:{...r,...a,sectionAccent:zx.sectionAccent}}}var yoe={Hero:{[cl]:{newChild:boe,childLabel:_i.Ticker}}},jL=Object.fromEntries(Object.entries(HL).map(([e,o])=>[e,Object.fromEntries(Object.entries(o).map(([t,r])=>[t,{...r,...yoe[e]?.[t]}]))]));function KL(e,o=0,t,r){let a=woe(Coe(e,o,r),t),n=a?Db():null;return a&&n?Soe(a,n):a}function Soe(e,o){if(e.spec)return o.offers(e.spec.childType)?e:null;let t=e.choices??[],r=t.filter(a=>o.offers(a.type));return r.length===t.length?e:r.length>0?{...e,choices:r}:null}function woe(e,o){if(!e||e.source!=="container"||!o||!PS())return e;let t=zi({data:o.data},o.id),r=typeof t?.type=="string"?ES(t.type):[],a=e.choices??[],n=r.filter(s=>!a.some(l=>l.type===s.type));return n.length?{...e,choices:[...a,...n.map(s=>({type:s.type,label:s.label}))]}:e}function Coe(e,o,t){let r=t?jL[e]?.[t]:void 0;if(r)return{source:"section",slot:r.slot,choices:null,spec:r};let a=At[e];if(a)return{source:"section",slot:a.slot,choices:null,spec:a};let n=Gy(e,o);if(n)return{source:"container",slot:n.slot,choices:n.choices,spec:null};let s=n1(e);return s?{source:"footer",slot:a1,choices:s,spec:null}:null}function qL(e,o=[Wi]){return wp(e.type)?o.map(t=>t===Wi?{slot:t,label:i(vS),rung:!0}:{slot:t,label:t,rung:!1}):null}import{useSyncExternalStore as voe}from"react";var Nb=null,Mb=new Set;function VL(e){if(Nb!==e){Nb=e;for(let o of Mb)o()}}function koe(e){return Mb.add(e),()=>{Mb.delete(e)}}function A2e(){return voe(koe,()=>Nb,()=>null)}function YL(e){return Is(e)?.ownerId??null}function XL(e,o){let t=e.props;if(e.type==="FooterMenu"){let r=t.menu;return t.heading||r?.name||i("Menu")}if(e.type==="FooterText"){let r=typeof t.text=="string"?t.text.trim():"";return r?r.length>28?`${r.slice(0,28)}\u2026`:r:i("Text")}return e.type==="FooterEmailSignup"?t.heading||i("Email signup"):o(e.type)}var ZL=(e,o,t)=>{if(o!=="block"||e.props?.fromProduct!==!0)return t;let r=e.props.product;return!r?.code||typeof r.name!="string"?t:r.name.trim()||t};var JL="sf-editor-left-view";function QL(){if(typeof window>"u")return"pages";try{let e=window.localStorage.getItem(JL);return e==="sections"||e==="styles"?e:"pages"}catch{return"pages"}}function eB(e){if(!(typeof window>"u"))try{window.localStorage.setItem(JL,e)}catch{}}function oB(e,o){return e==="styles"&&!o?"sections":e}function tB(e,o){return e?"sections":o}var Toe=new Set(["BookingBox","SubmitBox"]);function Poe(e){return typeof e=="string"&&Toe.has(e)}var Eoe=UO(Poe,JO);function rB(e,o){return Eoe(e)||Nm(o)}import{copyNode as Ooe}from"efficient-easel/data";function aB(e){let o=typeof e?.props?.id=="string"?e.props.id:null,t=Vt(),r=o&&t?t.sectionOf(o):null;if(!t||!r)return null;let a=t.usedOn(r);return a?a.length===1?i("On 1 page"):i("On {count} pages",{count:a.length}):i("On other pages")}var nB={usedOn:e=>{let o=Vt(),t=o?.sectionOf(e.props.id)??null;return!o||!t?null:o.usedOn(t)??[]},openPage:e=>_f()?.openPage(e),adopt:(e,o)=>Vt()?.adopt(e.props.id,o),nodeOf:e=>Vt()?.place(e)??null,detach:e=>{let o=_f()?.config;return o?Ooe(e,o):e},removed:()=>_f()?.reload()};import{sharedSectionsOf as Dte}from"efficient-easel/screen/lib/shared-sections";import{scrollPreviewToSection as Nte,scrollPreviewToTop as LB}from"efficient-easel/screen/lib/document/preview-dom";import{jsx as zb,Fragment as rte,jsxs as ate}from"react/jsx-runtime";import{useEffect as nte,useMemo as IB,useRef as gB}from"react";import{EaselCanvas as ste,repeatCopyAt as lte}from"efficient-easel/easel";import{jsx as dB,Fragment as Moe,jsxs as Hoe}from"react/jsx-runtime";import{useEffect as fB,useLayoutEffect as Woe}from"react";var Fu="data-theme",sB="light";function _oe(e){return e.getAttribute(Fu)===sB?"light":"dark"}function Roe(e,o){return _oe(e)===o?!1:(o==="light"?e.setAttribute(Fu,sB):e.removeAttribute(Fu),!0)}function Aoe(e){return Yu(e).getItem(Gu)}function V2e(e,o){Yu(e).setItem(Gu,o)}function Foe(e,o,t=new Date().getHours()){return Jb({mode:o.mode,override:Aoe(e),switchShown:o.switchShown,hour:t})}function lB(e,o){let t=e.documentElement;if(!t)return()=>{};let r=()=>Roe(t,Foe(e,o));r();let a=e.defaultView?.MutationObserver;if(!a)return()=>{};let n=new a(r);return n.observe(t,{attributes:!0,attributeFilter:[Fu]}),()=>n.disconnect()}var Loe="style";function Boe(e,o){let t=ly(o),r=!1;for(let a of sy){let n=t[a]??"";e.style.getPropertyValue(a)!==n&&(n?e.style.setProperty(a,n):e.style.removeProperty(a),r=!0)}return r}function iB(e,o){let t=e.body;if(!t)return()=>{};let r=()=>Boe(t,o);r();let a=e.defaultView?.MutationObserver;if(!a)return()=>{};let n=new a(r);return n.observe(t,{attributes:!0,attributeFilter:[Loe]}),()=>n.disconnect()}var Doe=String.raw`(function (doc) {
|
|
55
|
+
if (doc.__sfFitWords) return;
|
|
56
|
+
var win = doc.defaultView;
|
|
57
|
+
var SELECTOR = "h1,h2,h3,h4,h5,h6,[class*='font-heading'],[class*='font-display']";
|
|
58
|
+
// Body text a block asked to shrink (its Text group's Shrink to fit), beside
|
|
59
|
+
// the headings: what this script may fit at all. modeOf() decides each one.
|
|
60
|
+
var SHRINK_BODY = "[data-fit] p,[data-fit] li,[data-fit-phone] p,[data-fit-phone] li";
|
|
61
|
+
var CANDIDATES = SELECTOR + "," + SHRINK_BODY;
|
|
62
|
+
var MIN_SCALE = 0.3, MIN_PX = 16, SLACK = 1, PHONE_BELOW = 800;
|
|
63
|
+
|
|
64
|
+
// A block's own answer (lib/content/block-size, the wrapper's attributes):
|
|
65
|
+
// data-fit "wrap" | "shrink" | "line" and data-fit-min, each with its phone twin read
|
|
66
|
+
// under 800px. With none, a heading shrinks and body text wraps, as always.
|
|
67
|
+
function phone() { return win.innerWidth < PHONE_BELOW; }
|
|
68
|
+
function own(el, attr) {
|
|
69
|
+
var holder = el.closest("[" + attr + "],[" + attr + "-phone]");
|
|
70
|
+
if (!holder) return null;
|
|
71
|
+
return (phone() && holder.getAttribute(attr + "-phone")) || holder.getAttribute(attr);
|
|
72
|
+
}
|
|
73
|
+
function modeOf(el) {
|
|
74
|
+
var mode = own(el, "data-fit");
|
|
75
|
+
if (mode === "wrap" || mode === "shrink") return mode;
|
|
76
|
+
if (mode === "line") return "wrap"; // One line: the block keeps its words whole, nothing shrinks
|
|
77
|
+
return el.matches(SELECTOR) ? "shrink" : "wrap";
|
|
78
|
+
}
|
|
79
|
+
function floorOf(el, set) {
|
|
80
|
+
var min = parseFloat(own(el, "data-fit-min"));
|
|
81
|
+
return min >= 0 ? min : Math.max(set * MIN_SCALE, MIN_PX);
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
function measure(el) {
|
|
85
|
+
var widest = 0, current = 0, last = null, split = false, lastBlock = null;
|
|
86
|
+
function blockOf(n) {
|
|
87
|
+
for (var p = n.parentElement; p && p !== el; p = p.parentElement) {
|
|
88
|
+
var d = win.getComputedStyle(p).display;
|
|
89
|
+
if (d.indexOf("inline") !== 0 && d !== "contents") return p;
|
|
90
|
+
}
|
|
91
|
+
return el;
|
|
92
|
+
}
|
|
93
|
+
function close() { if (current > widest) widest = current; current = 0; last = null; }
|
|
94
|
+
var walker = doc.createTreeWalker(el, 5), range = doc.createRange(), node;
|
|
95
|
+
while ((node = walker.nextNode())) {
|
|
96
|
+
if (node.nodeType === 1) {
|
|
97
|
+
if (node.tagName === "BR" || node.tagName === "WBR") close();
|
|
98
|
+
continue;
|
|
99
|
+
}
|
|
100
|
+
var block = blockOf(node);
|
|
101
|
+
if (block !== lastBlock) close();
|
|
102
|
+
lastBlock = block;
|
|
103
|
+
var re = /(\S+)|(\s+)/g, m;
|
|
104
|
+
while ((m = re.exec(node.data))) {
|
|
105
|
+
if (m[2]) { close(); continue; }
|
|
106
|
+
range.setStart(node, m.index);
|
|
107
|
+
range.setEnd(node, m.index + m[0].length);
|
|
108
|
+
var rects = range.getClientRects();
|
|
109
|
+
for (var i = 0; i < rects.length; i++) {
|
|
110
|
+
var r = rects[i];
|
|
111
|
+
if (r.width <= 0) continue;
|
|
112
|
+
current += r.width;
|
|
113
|
+
if (last && r.top > last.top + last.height / 2) split = true;
|
|
114
|
+
last = r;
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
close();
|
|
119
|
+
return { widest: widest, split: split };
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
function lineWidth(el) {
|
|
123
|
+
var cs = win.getComputedStyle(el);
|
|
124
|
+
return el.getBoundingClientRect().width - parseFloat(cs.paddingLeft) - parseFloat(cs.paddingRight)
|
|
125
|
+
- parseFloat(cs.borderLeftWidth) - parseFloat(cs.borderRightWidth);
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
// ⚠️ THE HEADING ELEMENT IS NEVER TOUCHED — no style="", no data-*. This
|
|
129
|
+
// runs before React hydrates, and React 19 in development reports ANY
|
|
130
|
+
// attribute that differs from what it rendered ("a tree hydrated but some
|
|
131
|
+
// attributes didn't match"): first our inline font-size on the hero (which
|
|
132
|
+
// React owns via --heading-size), then, when that moved to a data-sf-fit
|
|
133
|
+
// attribute, the attribute itself. So the fitted size lives only in this
|
|
134
|
+
// script's own stylesheet, in <head>, addressed to each heading by its
|
|
135
|
+
// POSITION (":root>*:nth-child(2)>…"). A position goes stale when the page's
|
|
136
|
+
// structure changes, so the rules are rewritten in the MutationObserver
|
|
137
|
+
// callback, which runs before the next paint. !important so the size also
|
|
138
|
+
// beats a part's own inline size.
|
|
139
|
+
var head = doc.head || doc.documentElement;
|
|
140
|
+
var fitEl = doc.createElement("style");
|
|
141
|
+
fitEl.id = "storefront-fit-words-sizes";
|
|
142
|
+
head.appendChild(fitEl);
|
|
143
|
+
// heading -> [[element, fitted size]]: the heading and each Text part inside
|
|
144
|
+
// it that holds its own size (a span [data-sf-part-styled]), e.g.
|
|
145
|
+
// [[h2, "43.8px"], [span, "43.8px"]]. Sizing the heading alone leaves such
|
|
146
|
+
// a part at its own size, and the word still breaks (card C25, Spec Table).
|
|
147
|
+
var fitted = new Map();
|
|
148
|
+
|
|
149
|
+
function pathOf(el) {
|
|
150
|
+
var parts = [];
|
|
151
|
+
for (var e = el; e && e.parentElement; e = e.parentElement) {
|
|
152
|
+
var i = 1, s = e;
|
|
153
|
+
while ((s = s.previousElementSibling)) i++;
|
|
154
|
+
parts.unshift("*:nth-child(" + i + ")");
|
|
155
|
+
}
|
|
156
|
+
return ":root>" + parts.join(">");
|
|
157
|
+
}
|
|
158
|
+
function writeRules() {
|
|
159
|
+
var css = "";
|
|
160
|
+
fitted.forEach(function (sizes, el) {
|
|
161
|
+
if (!el.isConnected) { fitted.delete(el); return; }
|
|
162
|
+
for (var i = 0; i < sizes.length; i++) css += pathOf(sizes[i][0]) + "{font-size:" + sizes[i][1] + " !important}";
|
|
163
|
+
});
|
|
164
|
+
if (fitEl.textContent !== css) fitEl.textContent = css;
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
function unfit(el) {
|
|
168
|
+
if (fitted.delete(el)) writeRules();
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
function fits(el) {
|
|
172
|
+
var m = measure(el);
|
|
173
|
+
return !m.split && m.widest <= lineWidth(el) + SLACK;
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
function fit(el) {
|
|
177
|
+
unfit(el);
|
|
178
|
+
if (modeOf(el) !== "shrink") return; // the block's own Wrap
|
|
179
|
+
if (lineWidth(el) <= 0) return; // hidden, or not laid out yet
|
|
180
|
+
if (fits(el)) return;
|
|
181
|
+
var set = parseFloat(win.getComputedStyle(el).fontSize);
|
|
182
|
+
if (!set) return;
|
|
183
|
+
var floor = floorOf(el, set);
|
|
184
|
+
if (floor >= set) return;
|
|
185
|
+
function size(px) { return Math.floor(px * 10) / 10 + "px"; }
|
|
186
|
+
// The SEARCH tries sizes on the element's own style and then puts that
|
|
187
|
+
// attribute back byte for byte (or removes it, if it had none), so nothing
|
|
188
|
+
// is left for React to see. A trial in a stylesheet instead restyles the
|
|
189
|
+
// whole page per step: a full pass on the Hartes home took 75–160ms at 4x
|
|
190
|
+
// CPU that way.
|
|
191
|
+
// Every trial scales the heading AND each part inside it that holds its
|
|
192
|
+
// own size, by the same ratio, so a part keeps its proportion to the
|
|
193
|
+
// heading.
|
|
194
|
+
var carriers = [el].concat(Array.prototype.slice.call(el.querySelectorAll("[data-sf-part-styled]")));
|
|
195
|
+
var base = carriers.map(function (c) { return parseFloat(win.getComputedStyle(c).fontSize) || set; });
|
|
196
|
+
var saved = carriers.map(function (c) { return c.hasAttribute("style") ? c.getAttribute("style") : null; });
|
|
197
|
+
function attempt(px) {
|
|
198
|
+
for (var i = 0; i < carriers.length; i++) carriers[i].style.setProperty("font-size", size(base[i] * px / set), "important");
|
|
199
|
+
}
|
|
200
|
+
function done() {
|
|
201
|
+
for (var i = 0; i < carriers.length; i++) {
|
|
202
|
+
if (saved[i] !== null) carriers[i].setAttribute("style", saved[i]); else carriers[i].removeAttribute("style");
|
|
203
|
+
}
|
|
204
|
+
}
|
|
205
|
+
attempt(floor);
|
|
206
|
+
if (!fits(el)) { done(); return; } // even the floor does not fit: leave it as set
|
|
207
|
+
var lo = floor, hi = set;
|
|
208
|
+
for (var i = 0; i < 8; i++) {
|
|
209
|
+
var mid = (lo + hi) / 2;
|
|
210
|
+
attempt(mid);
|
|
211
|
+
if (fits(el)) lo = mid; else hi = mid;
|
|
212
|
+
}
|
|
213
|
+
done();
|
|
214
|
+
fitted.set(el, carriers.map(function (c, i) { return [c, size(base[i] * lo / set)]; }));
|
|
215
|
+
writeRules();
|
|
216
|
+
}
|
|
217
|
+
|
|
218
|
+
// What each heading measured right after we last fitted it, so the
|
|
219
|
+
// ResizeObserver below can tell a real change (a font swap, a rotate, a
|
|
220
|
+
// container that moved) from the size change our own write just caused.
|
|
221
|
+
var seen = new WeakMap();
|
|
222
|
+
function remember(el) {
|
|
223
|
+
var b = el.getBoundingClientRect();
|
|
224
|
+
seen.set(el, b.width + "x" + b.height);
|
|
225
|
+
}
|
|
226
|
+
function fitAndRemember(el) { fit(el); remember(el); }
|
|
227
|
+
|
|
228
|
+
// ⚠️ A ResizeObserver, NOT fonts.ready or a resize event, and the reason is
|
|
229
|
+
// WHEN it runs: after layout, BEFORE paint. The web font arriving re-wraps a
|
|
230
|
+
// fitted heading, and fonts.ready resolves only after that frame is painted —
|
|
231
|
+
// measured on the Hartes hero: a 42px jump in 2 of 3 loads. A size change
|
|
232
|
+
// reported here is fitted in the same frame, so the broken state is never
|
|
233
|
+
// drawn. It also covers a container that resizes.
|
|
234
|
+
var ro = new win.ResizeObserver(function (entries) {
|
|
235
|
+
for (var i = 0; i < entries.length; i++) {
|
|
236
|
+
var el = entries[i].target;
|
|
237
|
+
var b = el.getBoundingClientRect();
|
|
238
|
+
if (seen.get(el) === b.width + "x" + b.height) continue; // our own write
|
|
239
|
+
fitAndRemember(el);
|
|
240
|
+
}
|
|
241
|
+
});
|
|
242
|
+
// Its own set, not seen: fitAndRemember has written seen by the
|
|
243
|
+
// time watch runs, so a seen test observed no heading at all, and a
|
|
244
|
+
// heading fitted in the fallback face was never fitted again when the web
|
|
245
|
+
// font arrived (hartesmetal.com.au, "FusionForge." with its "." alone).
|
|
246
|
+
var watched = new WeakSet();
|
|
247
|
+
function watch(el) { if (!watched.has(el)) { watched.add(el); ro.observe(el); } }
|
|
248
|
+
|
|
249
|
+
function fitAll() {
|
|
250
|
+
var els = doc.querySelectorAll(CANDIDATES);
|
|
251
|
+
for (var i = 0; i < els.length; i++) {
|
|
252
|
+
if (modeOf(els[i]) === "shrink") { fitAndRemember(els[i]); watch(els[i]); }
|
|
253
|
+
else unfit(els[i]); // Wrap here (a phone value may differ from the desktop's)
|
|
254
|
+
}
|
|
255
|
+
}
|
|
256
|
+
|
|
257
|
+
var queued = 0, all = false, touched = new Set();
|
|
258
|
+
function run() {
|
|
259
|
+
queued = 0;
|
|
260
|
+
if (all) { all = false; touched.clear(); fitAll(); return; }
|
|
261
|
+
var els = Array.from(touched);
|
|
262
|
+
touched.clear();
|
|
263
|
+
for (var i = 0; i < els.length; i++) {
|
|
264
|
+
if (!els[i].isConnected) continue;
|
|
265
|
+
if (modeOf(els[i]) === "shrink") { fitAndRemember(els[i]); watch(els[i]); }
|
|
266
|
+
else unfit(els[i]);
|
|
267
|
+
}
|
|
268
|
+
}
|
|
269
|
+
function schedule() { if (!queued) queued = win.requestAnimationFrame(run); }
|
|
270
|
+
function scheduleAll() { all = true; schedule(); }
|
|
271
|
+
|
|
272
|
+
fitAll();
|
|
273
|
+
// A backstop only: a font that changes widths without changing any
|
|
274
|
+
// heading's box is not seen by the ResizeObserver.
|
|
275
|
+
if (doc.fonts && doc.fonts.ready) doc.fonts.ready.then(scheduleAll, function () {});
|
|
276
|
+
|
|
277
|
+
// …and the viewport WIDTH, which the ResizeObserver cannot stand in for: a
|
|
278
|
+
// heading sized to its own text (fit-content, a flex item) keeps the SAME box
|
|
279
|
+
// when the phone turns to 844, so nothing reports a change and it would stay
|
|
280
|
+
// shrunk. The probe's rotate check caught exactly that.
|
|
281
|
+
var lastWidth = win.innerWidth;
|
|
282
|
+
function onResize() {
|
|
283
|
+
if (win.innerWidth === lastWidth) return; // a phone's toolbar changing HEIGHT is not our business
|
|
284
|
+
lastWidth = win.innerWidth;
|
|
285
|
+
scheduleAll();
|
|
286
|
+
}
|
|
287
|
+
win.addEventListener("resize", onResize);
|
|
288
|
+
|
|
289
|
+
var mo = new win.MutationObserver(function (records) {
|
|
290
|
+
// Positions first: a node added or removed anywhere can shift the
|
|
291
|
+
// nth-child path of a fitted heading, and this callback runs before paint.
|
|
292
|
+
if (fitted.size) {
|
|
293
|
+
for (var q = 0; q < records.length; q++) if (records[q].type === "childList") { writeRules(); break; }
|
|
294
|
+
}
|
|
295
|
+
for (var i = 0; i < records.length; i++) {
|
|
296
|
+
var r = records[i];
|
|
297
|
+
// A block's text fit (Wrap / Shrink to fit / One line) or Min font size changed in the editor:
|
|
298
|
+
// only a data-fit attribute moved, so every heading is measured again.
|
|
299
|
+
if (r.type === "attributes") { scheduleAll(); continue; }
|
|
300
|
+
var target = r.target.nodeType === 1 ? r.target : r.target.parentElement;
|
|
301
|
+
var owner = target && target.closest(CANDIDATES);
|
|
302
|
+
if (owner) touched.add(owner);
|
|
303
|
+
for (var j = 0; j < r.addedNodes.length; j++) {
|
|
304
|
+
var n = r.addedNodes[j];
|
|
305
|
+
if (n.nodeType !== 1) continue;
|
|
306
|
+
if (n.matches(CANDIDATES)) touched.add(n);
|
|
307
|
+
var inner = n.querySelectorAll(CANDIDATES);
|
|
308
|
+
for (var k = 0; k < inner.length; k++) touched.add(inner[k]);
|
|
309
|
+
}
|
|
310
|
+
}
|
|
311
|
+
if (touched.size) schedule();
|
|
312
|
+
});
|
|
313
|
+
mo.observe(doc.body, {
|
|
314
|
+
childList: true,
|
|
315
|
+
subtree: true,
|
|
316
|
+
characterData: true,
|
|
317
|
+
attributes: true,
|
|
318
|
+
attributeFilter: ["data-fit", "data-fit-phone", "data-fit-min", "data-fit-min-phone"],
|
|
319
|
+
});
|
|
320
|
+
|
|
321
|
+
doc.__sfFitWords = function stop() {
|
|
322
|
+
win.removeEventListener("resize", onResize);
|
|
323
|
+
ro.disconnect();
|
|
324
|
+
mo.disconnect();
|
|
325
|
+
if (queued) win.cancelAnimationFrame(queued);
|
|
326
|
+
fitted.clear();
|
|
327
|
+
fitEl.remove();
|
|
328
|
+
delete doc.__sfFitWords;
|
|
329
|
+
};
|
|
330
|
+
// For the probe and for debugging: which headings are fitted, at what size,
|
|
331
|
+
// and the sheet that holds it (disable it to read a heading's set size).
|
|
332
|
+
doc.__sfFitWords.fitted = fitted;
|
|
333
|
+
doc.__sfFitWords.sheet = fitEl;
|
|
334
|
+
// …and the two questions a block's own answer changes, for the guard
|
|
335
|
+
// (scripts/test-block-size.tsx §5): which mode an element is in, and its floor.
|
|
336
|
+
doc.__sfFitWords.modeOf = modeOf;
|
|
337
|
+
doc.__sfFitWords.floorOf = floorOf;
|
|
338
|
+
})(document);`,Noe="storefront-fit-words";function cB(e){let o=e.createElement("script");return o.id=Noe,o.textContent=Doe,(e.head??e.documentElement).appendChild(o),()=>{e.__sfFitWords?.(),o.remove()}}var zoe=`
|
|
339
|
+
[${ct}][${ct}] { cursor: text; }
|
|
340
|
+
`;function uB({children:e,document:o}){let{theme:t,themeMode:r,themeSwitchShown:a}=ce(),n=lo(t);return fB(()=>{if(o)return lB(o,{mode:r,switchShown:a})},[o,r,a]),fB(()=>{if(o)return iB(o,n)},[o,n]),Woe(()=>{if(o)return cB(o)},[o]),Hoe(Moe,{children:[dB(Fy,{}),dB("style",{children:zoe}),e]})}import{jsx as Hb}from"react/jsx-runtime";import{useEffect as Goe,useState as $oe}from"react";import{Banner as Uoe}from"efficient-shell/ui";var Lu={load:"The header and footer could not load. They are hidden for now and nothing in them is saved. Reload to try again.",lock:"{name} is editing the header and footer. Nothing you change in them here is saved.",conflict:"The header and footer were changed somewhere else. Nothing you change in them here is saved. Reload to get the latest.",save:"The header and footer did not save. They are sent again with your next change."},joe={load:"{section} could not load. It stays on the page as it was. Reload to try again.",lock:"{name} is editing {section}. Nothing you change in it here is saved.",conflict:"{section} was changed somewhere else. Nothing you change in it here is saved. Reload to get the latest.",save:"{section} did not save. It is sent again with your next change."},Koe=Lu.load,qoe=Lu.lock,Voe=Lu.conflict,Yoe=Lu.save;function Xoe(e){if(!e)return null;if(e.loadFailed)return i(Koe);if(e.lockHolder)return i(qoe,{name:e.lockHolder.name||i("Somebody else")});if(e.conflict)return i(Voe);if(e.saveFailed)return i(Yoe);let o=e.sections?.[0];if(!o)return null;let t=o.title||i("A shared section"),r=o.holder?.name||i("Somebody else");return i(joe[o.problem],{section:t,name:r})}function Zoe({report:e}){let o=Xoe(Yf(e)),[t,r]=$oe(null);return Goe(()=>{o||r(null)},[o]),!o||t===o?null:Hb("aside",{className:"sf-canvas-notice",children:Hb(Uoe,{tone:"warning",onDismiss:()=>r(o),children:o})})}function pB(){return Hb(Zoe,{report:Xf()})}import{jsx as Bu}from"react/jsx-runtime";import{useState as mB}from"react";import{Banner as Joe,Button as Qoe}from"efficient-shell/ui";import{UndoIcon as ete}from"efficient-shell/icons/efficient";import{useScreenDocument as ote}from"efficient-easel/screen/components/ScreenDocumentContext";import{useSettledAction as tte}from"efficient-easel/easel";function hB(){let e=H_(),{adapter:o,flushSave:t,reloadFromServer:r}=ote(),a=o.siteVersions,[n,s]=mB(!1),[l,c]=mB(!1),d=async()=>{if(!(!a||n)){s(!0),c(!1);try{await G_({access:a,flushSave:t,reload:r})}catch{c(!0)}finally{s(!1)}}},f=tte({onPress:()=>{d()},busy:n});return e?Bu("aside",{className:"sf-canvas-notice",children:Bu(Joe,{tone:l?"danger":"info",title:e.title,onDismiss:Zf,action:a&&e.undo?Bu(Qoe,{variant:"secondary",size:"sm",leftIcon:Bu(ete,{}),loading:f.busy,disabled:f.busy,onClick:f.onPress,children:i("Undo")}):void 0,children:l?i("Undo did not work. Nothing changed. Try again."):i("Check it with Preview. Press Publish to put it live.")})}):null}import{decodePartId as ite,REPEAT_ATTRIBUTE as Gb,REPEAT_INDEX_ATTRIBUTE as $b}from"efficient-easel/draw";import{usePreviewParts as cte}from"efficient-easel/draw/client";var xB=null;function Wb(e){xB=e}function SMe(){return xB}function bB(e){let{mirrorHostStyles:o}=Ju(),t=By(),{sectionBackgroundWidth:r,themeFromDocument:a}=ce(),n=wy(),s=IB(()=>({...e.metadata??t??{},...jv(a?null:r,n)}),[e.metadata,t,r,n,a]);nte(()=>(Wb(n),()=>Wb(null)),[n]);let l=gB(null),c=dte(l),{onDocument:d}=e,f=m=>{l.current=m,d?.(m)};return ate(rte,{children:[zb(hB,{}),zb(pB,{}),zb(ste,{...e,onDocument:f,typing:c,metadata:s,height:"fill",mirrorStyles:o,frameWrapper:uB})]})}function dte(e){let o=Pi(),t=cte(),r=gB({parts:t});return r.current={parts:t},IB(()=>{let a=(n,s)=>{let l=id(n,o),c,d=null,f=s??(l?null:Nh(null,e.current,n)),m=!l&&f?lte(f):null,u=m?ite(n):null;if(m&&f&&u?.propKey){l=dd({...m,nodeId:u.nodeId,key:u.propKey},o),c=u.propKey;let v=f.closest(`[${Gb}][${$b}]`),C=`[${Gb}="${cd(v?.getAttribute(Gb)??"")}"][${$b}="${cd(v?.getAttribute($b)??"")}"]`;d=()=>(f.ownerDocument??e.current)?.querySelector(C)??null}if(!l)return null;let x=f,I=()=>(x=Nh(x,d?d():x?.ownerDocument??e.current,n),x),b=I();return b?{element:I,value:l.value,rules:l.rules,multiline:l.multiline,skip:l.skip,write:l.write,key:c,toolbar:{offered:l.offered,colors:l.offered.length>0?gn(rP(b)):void 0,colorNameOf:kt}}:null};return{at:n=>{let s=n.closest(`[${ct}]`),l=s?.getAttribute(ct);return s&&l?a(l,s):null},atSelection:()=>{let n=r.current.parts.selectedPartId;return n?a(n,null):null},onCopyText:n=>gT(n,o),copyValue:n=>IT(n,o),onChange:n=>{if(!n.typing){Mh(null);return}let s=n.element.closest(`[${ct}]`)?.getAttribute(ct)??null;Mh(s),s&&r.current.parts.selectedPartId!==s&&r.current.parts.select(s)}}},[o,e])}var fte=Sy.mediaFields,ute=/video|poster|focal|phone/i;function yB(e){return(fte[e]??[]).find(o=>!o.includes("[]")&&!ute.test(o))??null}var SB={adds:{kind:"block",type:"ImageBlock"},takes:e=>yB(e.type)!==null,replace:(e,o)=>{let t=yB(e.type);return t?{...e.props,[t]:o.url}:{...e.props}},create:(e,o)=>({type:"ImageBlock",props:{...o.nodeDefaults("ImageBlock"),id:o.newNodeId("ImageBlock"),src:e.url}})};var wB={Hero:"Full-screen opener with rotating slides.",HeroSingle:"Full-screen image or video with a headline.",IntroBleed:"Full-bleed intro image the next section scrolls over.",Collections:"Product collections in a tidy grid.",AlloyWheelsListing:"A full product-listing page: filter rail, sortable card grid and pagination, from the live catalog. Choose which product types it shows.",CatalogFilterBar:"Filters the collection grids below it \u2014 a sticky row of Pills (the default), or Columns, one per filter you switch on.",ProductGrid:"Hand-picked products in a tidy grid.",FitmentFinder:"A vehicle picker \u2014 make, model, year and trim resolve the OEM stock fitment live.",Gallery:"Two image galleries with tabs and filters.",GalleryB:"Customer photos in a card grid with a click-to-open lightbox.",SpecStrip:"A thin one-line spec strip \u2014 small-caps items spread across the width, as a dark band or a bare hairline row.",ProductHero:"A product hero \u2014 image beside price, bullets and a buy button.",SpecTable:"A spec sheet \u2014 labeled rows of product specifications.",ProcessSteps:"A heading over columns of image, title, blurb and specs.",DetailRows:"Repeating full-width rows \u2014 eyebrow, title and copy beside a numbered close-up image, alternating sides each row.",FitmentTable:"A fitment table \u2014 per-size bolt patterns, offsets and load ratings, filterable by diameter.",CompatibleTyres:"The current product's compatible tyres \u2014 image, size, key specs and price per tyre, with an inquiry link. Display only.",RelatedProducts:"The current product's related items in a tidy row \u2014 the product page's built-in 'Pair with' cross-sell.",OrderSummary:"A display order-summary panel \u2014 items, totals and a note.",DeliveryOptions:"Delivery tiers as cards \u2014 name, window and price, one highlighted.",PaymentBadges:"A payment-methods trust strip with reassurance lines.",CheckoutCTA:"A centered 'ready to order?' headline with the checkout button.",Manifesto:"A bold brand statement beside a full-height image, with a stat strip.",ParagraphsA:"An editorial text panel with a stat strip and founders' note.",StatsParagraph:"An editorial heading and paragraph over a row of stat cards whose units and small labels take the main color.",Chart:"A titled chart \u2014 bars, line or donut \u2014 drawn from your own labeled data points.",Mockup:"A headline beside a stylized product-UI mockup card \u2014 spec sheet, fitment, portal, kanban and more.",Prose:"A plain editorial text section \u2014 eyebrow, heading and body copy.",Timeline:"An editorial aside beside a rail-marked timeline of dated entries.",TimelineTrack:"A horizontal year track of milestones \u2014 company history or roadmap.",Footprint:"A world map of your locations with a legend \u2014 designed here, sold worldwide.",TitleWithButtons:"A big headline beside a stack of call-to-action buttons.",Split:"Side-by-side image and text in two columns.",Cards:"A heading over a grid of free-text title-and-blurb cards.",FAQ:"A frequently-asked-questions accordion with a header.",Testimonials:"Customer quotes in a grid \u2014 the quote, a name and a role.",Masthead:"A journal issue header with a lead statement and contents.",Breadcrumb:"A slim trail showing where the reader is (Home / Journal\u2026).",CategoryBar:"A sticky row of category tabs with counts and links.",FeaturedCover:"A featured article \u2014 big cover image beside a headline and dek.",LongRead:"A long-form article spread with a pull-quote and cover image.",Series:"A section heading over a grid of column cards.",Subscribe:"A newsletter signup beside a list of recent issues.",SubscribeBlogs:"A newsletter signup beside your latest blog posts, pulled live.",Events:"Latest journal posts in a three-card row.",DocMasthead:"A document header \u2014 headline, metadata and standfirst.",DocTabs:"A sticky tab bar to switch between documents.",DocBody:"Long-form document body with an 'On this page' contents list.",DocMetaCards:"A three-up meta strip for the foot of a document.",Banner:"Wide promo strip with background image.",Stats:"Highlight key numbers \u2014 years, designs.",Countdown:"Hours, minutes and seconds to a set date and time, then one line.",KeyFeatures:"A theme-color chip and heading over a grid of short feature labels.",Logos:"A row of partner or brand logos.",Ticker:"A scrolling marquee of short phrases, full width.",Reviews:"Approved customer reviews in a star-rated card grid, pulled live.",SubmitBuild:"A 'Show us yours.' headline with a photo-submission form.",ReviewForm:"A write-a-review form \u2014 submissions wait for your approval before they show.",ContactRouting:"Pick who to reach, then a form that routes the message.",ContactLocations:"Your locations as a city gallery plus address and map cards.",SectionHeader:"A numbered section title with optional link.",Grid:"Multi-column container for blocks.",Flex:"An empty section. Add whatever you want inside.",Spacer:"Vertical breathing room between sections.",Divider:"A thin horizontal rule between sections.",CustomHTML:"Drop in your own sanitized HTML.",Heading:"A single heading line.",Text:"A paragraph of body copy.",ImageBlock:"A standalone image, at the width you set.",ButtonBlock:"A call-to-action button."};import{jsx as Du}from"react/jsx-runtime";import{useState as pte}from"react";import{Button as mte,Tooltip as hte,toast as CB}from"efficient-shell/ui";import{TemplateIcon as xte}from"efficient-easel/icons";import{useSettledAction as Ite}from"efficient-easel/easel";import{useScreenDocument as gte}from"efficient-easel/screen/components/ScreenDocumentContext";function kB({enabled:e,reason:o,onSaved:t}){let{flushSave:r}=gte(),[a,n]=pte(!1),s=async()=>{if(!a){n(!0);try{await r()?t():CB.error(i(vB))}catch{CB.error(i(vB))}finally{n(!1)}}},l=Ite({onPress:()=>{s()},busy:a});return Du(hte,{side:"bottom",content:e?i("Save this website as a platform template"):i(o),children:Du("span",{className:"sf-tip-disabled",tabIndex:e?void 0:0,children:Du(mte,{variant:"secondary",disabled:!e||l.busy,loading:l.busy,onClick:l.onPress,rightIcon:Du(xte,{size:15}),children:i("Save as Template")})})})}var vB="Your last changes did not save, so the template was not made. Try again.";var bte="Save your page changes first";function TB(e){return e.hasTrustedConsole?e.canCreatePlatformTemplate?!e.capabilities.canPublish||!e.capabilities.hasSiteSettings?{visible:!1,hiddenReason:"not-a-site-page"}:e.siteId?e.hasUnsavedEdits?{visible:!0,enabled:!1,disabledReason:bte}:{visible:!0,enabled:!0}:{visible:!1,hiddenReason:"no-site"}:{visible:!1,hiddenReason:"not-operator"}:{visible:!1,hiddenReason:"no-console"}}var PB="storefront-editor:save-as-template";var gi="ContactLocations",yte="CityPictures",Ste="CityMaps",wte=[{key:yte,label:"City pictures",desc:"A wall of city photos, grouped by region. Each photo links to its city's card."},{key:Ste,label:"City maps",desc:"A card per city, grouped by region: address, phone, hours and a map."}];function EB(e=Ml){let o=nr.find(t=>t.sections.some(r=>r.type===gi))?.key;return!e.includes(gi)||!o?[]:wte.map(({key:t,label:r,desc:a},n)=>({key:t,label:r,cat:o,after:gi,desc:a,alias:"locations offices stores branches",insert:s=>{let l=qf(gi);return l?Ob(gi,l,n)(s.nodeDefaults,s.newNodeId):null}}))}var Cte="plain",OB=[{label:"Plain",value:"plain"},{label:"Filled",value:"filled"},{label:"Line",value:"line"}],vte="line",kte={KeyFeatures:"filled"};function bi(e){return kte[e]??Cte}function nHe(e,o){return to(OB,bi(o),e)}function sHe(e){return to(OB,vte,e)}function RB(e,{nodeDefaults:o,newNodeId:t,sectionLabel:r,blockIsOffered:a}){let n=vu(e);if(n)return n(o,t);if(o_(e)&&a(V)&&a(jn))return{type:V,props:{...o(V),id:t(V),direction:"column",name:`${r(e)} section`,content:[{type:jn,props:{...o(jn),id:t(jn),...go[e]?.headStyle?{headStyle:go[e].headStyle}:{},...go[e]?.headRowGap?{rowGap:go[e].headRowGap}:{},...go[e]?.headDescriptionSize?{descriptionSize:go[e].headDescriptionSize}:{},...bi(e)!==bi(jn)?{eyebrowLook:bi(e)}:{}}},{type:e,props:{...o(e),id:t(e),headPlacement:"own-box",..._B(e,t)}}]}};if(At[e]?.fixed===!0)return{type:e,props:{...o(e),id:t(e),layout:"boxes"}};let s=_B(e,t);return Object.keys(s).length?{type:e,props:{...o(e),id:t(e),...s}}:null}function _B(e,o){return e==="Cards"?{template:Hi(t=>o(t))}:{}}import{useEffect as Tte,useState as Pte}from"react";import{useEaselSession as Ete}from"efficient-easel/screen/lib/session-context";function AB(){let e=Ete().chrome?.products?.list,[o,t]=Pte(null);return Tte(()=>{if(!e)return;let r=!1;return e().then(a=>{r||t(a)}),()=>{r=!0}},[e]),o}function GB({mode:e,open:o}){let{setSelectedHeroId:t,setSelectHandler:r}=E0(),a=WB().tree,n=e,s=n.kind==="ticker"?n.heroId:null,l=os(c=>{c&&(o({kind:"ticker",heroId:c}),Nte(c))},[o]);return Ft(()=>{t(s)},[s,t]),Ft(()=>{r(l)},[r,l]),{partRows:(c,{rowClick:d})=>{let f=String(c.props.id);return c.type==="Hero"&&Gx(c.props)&&so(MB,{icon:so(xa,{type:"ticker",size:13}),name:i(il),onSelect:()=>l(f),selected:s===f,rowProps:{onClick:d(()=>l(f))},words:a})}}}function $B({mode:e,select:o}){let{setSelectedHeroPart:t,setSelectHandler:r}=qd(),a=WB().tree,{appState:n}=HB(u=>u),s=n.data.content??[],l=Ote(s);l.current=s;let c=e,d=ha.find(u=>fl[u]===c.kind),f=d&&"nodeId"in c?ul(String(c.nodeId),d):null,m=os(u=>{let x=D0(u);if(!x)return;let I=l.current.findIndex(v=>String(v.props.id)===x.nodeId);if(I<0)return;let b={kind:fl[x.part],nodeId:x.nodeId};o({index:I},b)},[o]);return Ft(()=>{t(f)},[f,t]),Ft(()=>{r(m)},[r,m]),{partRows:(u,{rowClick:x})=>{let I=String(u.props.id),b=B0(u);if(b.length===0)return null;let v=g=>{let k=ul(I,g.part);return so(MB,{icon:so(xa,{type:g.part==="media"?"heroMedia":"heroImage",size:13}),name:i(g.label),onSelect:()=>m(k),selected:f===k,rowProps:{onClick:x(()=>m(k))},words:a},k)},[C,...w]=b;return yi(NB,{children:[v(C),w.length>0&&so(Lte,{children:w.map(v)})]})}}}function UB(e,o){return{partRows:(t,r)=>yi(NB,{children:[e.partRows?.(t,r),o.partRows?.(t,r)]})}}function Mte(e){let{adapter:o,capabilities:t,currentSlug:r,siteId:a,docId:n,hasUnsavedEdits:s,bridgeCapabilities:l,notifyParent:c,token:d}=Nu(),{hasPreviewLink:f}=t,m=ze(zB()).preview?.draftLink,u=Y_(e.data),x=TB({hasTrustedConsole:!!d,canCreatePlatformTemplate:l.canCreatePlatformTemplate,capabilities:t,siteId:a,hasUnsavedEdits:s}),I=os(()=>{!a||!r||c(PB,{siteId:a,slug:r})},[c,a,r]),b=P_({pageSlug:r,siteId:a,token:d}),v=o.previewHref?.(r)??b;return{barLead:()=>x.visible&&so(kB,{enabled:x.enabled,reason:x.enabled?"":x.disabledReason,onSaved:I}),barView:()=>f&&r&&so(__,{liveHref:v,pageId:n??null,draftLink:m}),mainAction:u}}function Hte(e,o){let{capabilities:t,templateId:r,siteId:a,tokenRef:n,navigate:s}=Nu(),{hasSiteTheme:l,explainsSiteSettings:c}=t,d=g=>o.setView(g),[f,m]=FB(Tn[0].id),[u,x]=FB(!1),{surface:I,setSurface:b}=P0(),v=()=>{if(l){d("styles"),o.reveal(),LB();return}e.show(lg),e.reveal(),LB()},C={id:"pages",label:i("Pages"),icon:so(Rte,{}),panel:({onHide:g})=>so(I0,{activeSurface:I,onPreviewSurface:b,onNavigate:k=>{b(null),s(r?{kind:"template",id:r,pageSlug:k}:{kind:"page",slug:k,siteId:a??void 0})},onClose:g})},w=[];return!l&&c&&w.push({id:"appearance",label:i("Appearance"),icon:so(Fte,{}),active:e.kind==="website",onSelect:v}),l&&w.push({id:"styles",label:i("Styles"),icon:so(Ate,{}),panel:({onHide:g,notify:k})=>so(F1,{tokenRef:n,siteId:a??void 0,onClose:g,onNotify:k,tab:f,onTabChange:m,revealPageGroup:u,onPageGroupRevealed:()=>x(!1)})}),{railLead:[C],railTrail:w,resolveLeftView:g=>oB(g,l),openSettings:v,openStyles:()=>{m(QP),d("styles")},openPageStyles:l?()=>{m(En),x(!0),d("styles"),o.reveal()}:c?()=>{e.show(w1),e.reveal()}:void 0}}function Wte(){let{navigate:e,siteId:o,reloadFromServer:t,docId:r}=Nu(),a=HB(s=>s.config),n=zB();Ft(()=>(YI({openPage:s=>e({kind:"page",slug:s.slug,siteId:o??void 0}),reload:()=>{t()},config:a}),()=>YI(null)),[e,o,t,a]),Ft(()=>{let s=Vt();if(!s||!r)return;let l=!1;return Dte(n).list().then(c=>{l||s.learn(c)}).catch(()=>{}),()=>{l=!0}},[r,n])}function jB(){let e=Pi();return os(o=>{bT(o,e)},[e])}function zte(e,o,t,r){let{kind:a,open:n}=e,{selected:s,zoneOf:l}=o;Ft(()=>{VL(s?.type==="BookingBox"&&s.props.region==="confirm"?YL(l(String(s.props.id))):null)},[s?.props.id]);let c=e_(e,o),{capabilities:{hasSiteSettings:d}}=Nu();Wte();let{chat:f,setChat:m,setSelected:u,setSelectHandler:x}=Kd(),I=os(()=>n(C1),[n]),b=a==="chat";Ft(()=>{u(b)},[b,u]),Ft(()=>{x(I)},[x,I]);let{setOpenHandler:v}=ll(),C=os(()=>n(v1),[n]);Ft(()=>{v(C)},[v,C]);let w=UB(GB(e),$B(e)),g=Mte(o),k=Hte(e,r),T=t.device,F=jB();return{...w,...g,...k,hasOwnRows:P=>P.type===jf,ownRows:c.renderLocationTree,sectionPressed:c.sectionPressed,onCopyItem:F,wrap:P=>so(Qu.Provider,{value:!0,children:yi(Bte.Provider,{value:T,children:[P,so(rR,{})]})}),addPanelRow:P=>d?yi("div",{className:"sf-addside-sitewide",children:[so("span",{className:"sf-addside-sitewide-glyph","aria-hidden":"true",children:so(xa,{type:"chat",size:16})}),yi("button",{type:"button",className:"sf-addside-sitewide-name",onClick:()=>{P(),I()},children:[i("Live chat"),so("span",{className:"sf-addside-sitewide-desc",children:i("A chat bubble on every page")})]}),so(_te,{checked:f.enabled,onChange:L=>m({enabled:L}),ariaLabel:i("Show the chat bubble on the whole site")})]}):void 0}}var BB=null,Ub=new WeakMap;function Gte(e){let o=Ry();if(!e||!o)return e;BB!==o&&(BB=o,Ub=new WeakMap);let t=Ub.get(e);return t||(t={...e,choices:e.choices?e.choices.map(r=>({...r,label:i(r.label)})):null,spec:e.spec?{...e.spec,addLabel:i(e.spec.addLabel),...e.spec.childLabel?{childLabel:i(e.spec.childLabel)}:{}}:null},Ub.set(e,t)),t}var $te={isLockedBlock:(e,o)=>rB(e,o)||!!(o&&Vt()?.heldElsewhere(o.props.id)),duplicateBlocked:Df,nestDepth:(e,o,t)=>o===Zi?yw(e,t):0,newSectionNode:RB,canAddTo:(e,o,t,r)=>Gte(KL(e,o,r,t)),blockIsOffered:UL,slotsOf:qL,resolveOnInsert:!0},Ute=new Proxy(wB,{get:(e,o)=>{let t=Reflect.get(e,o);return typeof t=="string"?i(t):t}}),jte={labelAtLevel:(e,o,t)=>i(rp(e,o,t)),descriptions:Ute,categoryLabel:e=>{let o=aR(e);return o===void 0?void 0:i(o)},firstSection:nR,blockRowName:XL,rowName:ZL,plainText:zr,Icon:xa,Thumbnail:A1,useProducts:AB,presets:EB()},Kte={desktop:2e3,tablet:800,mobile:390},DB="desktop",qte={options:C0,initial:DB,fluid:DB,widths:Kte},Vte={read:QL,write:e=>eB(e),forSelection:(e,o)=>tB(e,o)},Yte={first:ko,last:Ne,firstGroup:De,lastGroup:Ee,isSectionGroup:Wn,sectionGroupZone:BO,panelOf:e=>e===ko?S1:null,get sharedReach(){return wa()?Zte:void 0},get shared(){return Vt()?nB:void 0},get groupTab(){return wa()?s1:void 0},get groupBadge(){return wa()?tg({type:Ee})??void 0:void 0},get changeNotice(){return wa()?l1():void 0},get band(){return wa()?Xte:void 0},get groupAccepts(){return wa()?MO:void 0}},Xte={foldable:!0},Zte=e=>tg(e)??aB(e);function Jte(e){return{...UB(GB(e),$B(e)),onCopyItem:jB(),openSettings:()=>e.show(lg)}}function Qte(e,o){p_(e,o),w_()}var _5e={useOwnerName:On,useDocumentLabel:n0,useBridges:zte,useStandaloneBridges:Jte,useDocumentPass:Qte,blockRules:$te,blockLook:jte,devices:qte,leftView:Vte,pinned:Yte,Canvas:bB,canvasDrag:{media:SB},Inspector:T1};export{ar as a,oe as b,Ei as c,gD as d,Nr as e,ns as f,wre as g,Cre as h,ep as i,Dy as j,vre as k,So as l,vD as m,kre as n,Pre as o,Ere as p,Ore as q,_i as r,Bt as s,V as t,Wy as u,Dre as v,Gy as w,Hre as x,Wre as y,Qy as z,zr as A,to as B,lp as C,ip as D,nN as E,Ai as F,rae as G,cs as H,aae as I,rS as J,lae as K,aS as L,Gr as M,iae as N,cae as O,dae as P,Fi as Q,pae as R,Jo as S,fs as T,yae as U,xN as V,Sae as W,wae as X,CN as Y,Cae as Z,vae as _,PN as $,kae as aa,ON as ba,Tae as ca,Pae as da,Ip as ea,xS as fa,IS as ga,gS as ha,Eae as ia,Oae as ja,DN as ka,_ae as la,Rae as ma,bS as na,NN as oa,Aae as pa,Fae as qa,SS as ra,K as sa,de as ta,D as ua,G as va,ps as wa,Sp as xa,Qo as ya,Mi as za,GN as Aa,Wi as Ba,yt as Ca,jN as Da,kS as Ea,sne as Fa,qN as Ga,TS as Ha,ES as Ia,lne as Ja,wp as Ka,ine as La,VN as Ma,Cp as Na,sr as Oa,cne as Pa,dne as Qa,fne as Ra,YN as Sa,une as Ta,zi as Ua,pne as Va,mne as Wa,HI as Xa,ze as Ya,tc as Za,Gp as _a,P2 as $a,$p as ab,Up as bb,ys as cb,Xe as db,xse as eb,E2 as fb,go as gb,t_ as hb,c1e as ib,r_ as jb,d1e as kb,f1e as lb,U as mb,zf as nb,$Oe as ob,Et as pb,Ot as qb,jo as rb,w1e as sb,KCe as tb,Jd as ub,xl as vb,eE as wb,oE as xb,tE as yb,qCe as zb,p7 as Ab,rE as Bb,VCe as Cb,sE as Db,sR as Eb,lRe as Fb,tre as Gb,Q as Hb,i as Ib,xo as Jb,lR as Kb,dRe as Lb,xC as Mb,ur as Nb,gC as Ob,Oce as Pb,Am as Qb,f5 as Rb,_ce as Sb,co as Tb,O3 as Ub,nh as Vb,Nv as Wb,fue as Xb,at as Yb,pue as Zb,mue as _b,Rc as $b,hue as ac,Ac as bc,xue as cc,Iue as dc,zv as ec,Gv as fc,D3 as gc,N3 as hc,Sue as ic,Cue as jc,vue as kc,kue as lc,Tue as mc,$v as nc,aa as oc,$3 as pc,Oue as qc,U3 as rc,_ue as sc,ro as tc,Lc as uc,Rue as vc,Aue as wc,Fue as xc,Lue as yc,Bue as zc,Due as Ac,nn as Bc,Nue as Cc,Il as Dc,af as Ec,sve as Fc,xd as Gc,Be as Hc,AIe as Ic,FIe as Jc,LIe as Kc,DT as Lc,bc as Mc,wfe as Nc,H4 as Oc,ev as Pc,pR as Qc,uf as Rc,mke as Sc,vr as Tc,hke as Uc,xke as Vc,Ike as Wc,pf as Xc,gke as Yc,bke as Zc,V4 as _c,$m as $c,Cc as ad,Fs as bd,Dfe as cd,Km as dd,Nfe as ed,Ls as fd,pv as gd,mv as hd,Mfe as id,hv as jd,Iv as kd,ru as ld,xR as md,PRe as nd,ERe as od,oh as pd,Ct as qd,ie as rd,me as sd,he as td,ve as ud,we as vd,Le as wd,YRe as xd,oi as yd,ti as zd,rP as Ad,Us as Bd,ks as Cd,vh as Dd,Ph as Ed,rd as Fd,ct as Gd,$he as Hd,Uhe as Id,jhe as Jd,Khe as Kd,Mz as Ld,Hz as Md,qhe as Nd,pn as Od,Eh as Pd,Vhe as Qd,Yhe as Rd,Td as Sd,Pd as Td,rx as Ud,x$ as Vd,xn as Wd,ix as Xd,cx as Yd,wn as Zd,da as _d,Lge as $d,Qs as ae,hP as be,Bge as ce,gx as de,Dge as ee,Nge as fe,Mge as ge,eU as he,Hge as ie,aU as je,nU as ke,Wge as le,zge as me,lU as ne,Fa as oe,tAe as pe,rAe as qe,su as re,RZ as se,AZ as te,aAe as ue,nAe as ve,Mg as we,Ng as xe,Sl as ye,iO as ze,cO as Ae,wl as Be,jE as Ce,RI as De,oTe as Ee,Dn as Fe,FI as Ge,VE as He,YE as Ie,Zq as Je,XE as Ke,mf as Le,ZE as Me,SAe as Ne,_R as Oe,wAe as Pe,CAe as Qe,vAe as Re,si as Se,iu as Te,RAe as Ue,qo as Ve,WAe as We,MR as Xe,HR as Ye,WR as Ze,wv as _e,qfe as $e,zR as af,iJ as bf,cJ as cf,dJ as df,fJ as ef,GR as ff,$R as gf,uJ as hf,XAe as if,ZAe as jf,nFe as kf,UR as lf,sFe as mf,pJ as nf,lFe as of,iFe as pf,mJ as qf,cFe as rf,dFe as sf,fFe as tf,uFe as uf,pFe as vf,bFe as wf,du as xf,yFe as yf,CFe as zf,yJ as Af,VR as Bf,TFe as Cf,PFe as Df,YR as Ef,La as Ff,Cw as Gf,OLe as Hf,DA as If,cb as Jf,NA as Kf,LLe as Lf,BLe as Mf,DLe as Nf,db as Of,NLe as Pf,MLe as Qf,MA as Rf,wQ as Sf,_h as Tf,rxe as Uf,Rh as Vf,rT as Wf,uBe as Xf,hF as Yf,xF as Zf,OBe as _f,bu as $f,gF as ag,bF as bg,FBe as cg,DQ as dg,NQ as eg,MQ as fg,LBe as gg,$Be as hg,UQ as ig,jQ as jg,PF as kg,UBe as lg,jBe as mg,mDe as ng,CDe as og,LDe as pg,JF as qg,BDe as rg,QF as sg,zDe as tg,nL as ug,GDe as vg,Jw as wg,hi as xg,ir as yg,Jne as zg,g2 as Ag,Np as Bg,gs as Cg,Qne as Dg,tse as Eg,y2 as Fg,QS as Gg,rse as Hg,Yr as Ig,k2 as Jg,cse as Kg,dse as Lg,bs as Mg,fse as Ng,use as Og,jp as Pg,aw as Qg,Cse as Rg,A0 as Sg,USe as Tg,$x as Ug,Rn as Vg,VSe as Wg,YSe as Xg,$K as Yg,XSe as Zg,ul as _g,D0 as $g,N0 as ah,QDe as bh,Lb as ch,uL as dh,Na as eh,Fb as fh,Bee as gh,eNe as hh,ku as ih,xi as jh,Tu as kh,oNe as lh,tNe as mh,JN as nh,wne as oh,QN as ph,e2 as qh,kne as rh,o2 as sh,t2 as th,Tne as uh,Pne as vh,Ene as wh,mL as xh,Ii as yh,es as zh,hL as Ah,Ou as Bh,_u as Ch,Ru as Dh,xL as Eh,IL as Fh,gL as Gh,bL as Hh,wL as Ih,CL as Jh,wNe as Kh,CNe as Lh,vNe as Mh,kNe as Nh,tt as Oh,eoe as Ph,OL as Qh,toe as Rh,RL as Sh,AL as Th,LL as Uh,foe as Vh,YNe as Wh,Ya as Xh,xw as Yh,hw as Zh,G2 as _h,$2 as $h,U2 as ai,$se as bi,j2 as ci,Use as di,Ss as ei,jse as fi,Kse as gi,Zi as hi,yw as ii,_0 as ji,HSe as ki,a2e as li,n2e as mi,Ioe as ni,Tle as oi,d3 as pi,on as qi,jfe as ri,uw as si,L2 as ti,Ase as ui,Vi as vi,mw as wi,B2 as xi,D2 as yi,N2 as zi,Bse as Ai,Dse as Bi,Nse as Ci,Mse as Di,De as Ei,Ee as Fi,c0e as Gi,DO as Hi,Ef as Ii,Ane as Ji,Dne as Ki,vc as Li,zfe as Mi,Gfe as Ni,$fe as Oi,SMe as Pi,jTe as Qi,lO as Ri,il as Si,FSe as Ti,E0 as Ui,LSe as Vi,BSe as Wi,DSe as Xi,HOe as Yi,L1 as Zi,B1 as _i,D1 as $i,qv as aj,s6 as bj,vo as cj,st as dj,Bc as ej,sn as fj,Xue as gj,Zue as hj,Que as ij,epe as jj,ope as kj,tpe as lj,rpe as mj,npe as nj,Nc as oj,ih as pj,i6 as qj,Yv as rj,Xv as sj,Tse as tj,_se as uj,Yi as vj,Ji as wj,Cs as xj,Ew as yj,tle as zj,rle as Aj,om as Bj,vM as Cj,Cle as Dj,Fle as Ej,Lle as Fj,WM as Gj,zo as Hj,vs as Ij,um as Jj,pm as Kj,Iie as Lj,gie as Mj,Xw as Nj,bie as Oj,yie as Pj,Sie as Qj,oC as Rj,rC as Sj,Nt as Tj,fC as Uj,b5 as Vj,Uce as Wj,CC as Xj,Zce as Yj,kC as Zj,OC as _j,_C as $j,RC as ak,AC as bk,FC as ck,LC as dk,Lm as ek,M5 as fk,H5 as gk,Os as hk,Bm as ik,DC as jk,yde as kk,z5 as lk,Sde as mk,wde as nk,Cde as ok,MC as pk,Pde as qk,U5 as rk,Ede as sk,Ode as tk,K5 as uk,Dm as vk,V5 as wk,Fde as xk,Y5 as yk,Lde as zk,X5 as Ak,rt as Bk,Dde as Ck,Nde as Dk,Mde as Ek,Hde as Fk,mc as Gk,Wde as Hk,Hm as Ik,Vde as Jk,UC as Kk,e4 as Lk,Xde as Mk,_s as Nk,m4 as Ok,xfe as Pk,$4 as Qk,_fe as Rk,j4 as Sk,Rfe as Tk,Afe as Uk,Ffe as Vk,Tc as Wk,Bs as Xk,Yfe as Yk,Xfe as Zk,Zfe as _k,vv as $k,kv as al,Tv as bl,Jfe as cl,an as dl,Oc as el,rue as fl,aue as gl,nue as hl,Lv as il,lue as jl,br as kl,jt as ll,na as ml,Rme as nl,Ame as ol,Fme as pl,Lme as ql,Bme as rl,Dme as sl,Nme as tl,zme as ul,Gme as vl,vW as wl,$me as xl,Ume as yl,jme as zl,Kme as Al,qme as Bl,Vme as Cl,Yme as Dl,Xme as El,EW as Fl,Zme as Gl,xh as Hl,Jme as Il,jc as Jl,Fo as Kl,$t as Ll,Pk as Ml,bm as Nl,Ek as Ol,qc as Pl,Qme as Ql,ehe as Rl,YW as Sl,ohe as Tl,the as Ul,rhe as Vl,ahe as Wl,nhe as Xl,she as Yl,$o as Zl,lhe as _l,ihe as $l,Mc as am,Yc as bm,Xc as cm,bh as dm,Jc as em,che as fm,uz as gm,dhe as hm,fhe as im,uhe as jm,Mk as km,phe as lm,mhe as mm,hhe as nm,xhe as om,Ihe as pm,ghe as qm,Sh as rm,bhe as sm,Wk as tm,zk as um,Gk as vm,yhe as wm,Ch as xm,kz as ym,She as zm,whe as Am,Ake as Bm,$E as Cm,Bo as Dm,gl as Em,tq as Fm,yE as Gm,Bve as Hm,Dve as Im,Nve as Jm,Mve as Km,Hve as Lm,Wve as Mm,zve as Nm,vE as Om,Gve as Pm,$ve as Qm,Uve as Rm,VT as Sm,YT as Tm,Ud as Um,g0 as Vm,b0 as Wm,S0 as Xm,jd as Ym,hSe as Zm,xSe as _m,Kd as $m,LK as an,TSe as bn,ll as cn,_Se as dn,P0 as en,hs as fn,ZN as gn,bne as hn,yne as in,F0e as jn,L0e as kn,B0e as ln,GSe as mn,qd as nn,pre as on,Gz as pn,pxe as qn,mxe as rn,lT as sn,hxe as tn,xxe as un,wP as vn,ebe as wn,obe as xn,tbe as yn,rbe as zn,GP as An,$P as Bn,Tbe as Cn,Pbe as Dn,HU as En,Ebe as Fn,Obe as Gn,_be as Hn,Rbe as In,WU as Jn,Abe as Kn,Fbe as Ln,Lbe as Mn,Bbe as Nn,UU as On,Dbe as Pn,qbe as Qn,Vbe as Rn,Dx as Sn,Nx as Tn,H0 as Un,FCe as Vn,K0 as Wn,vl as Xn,B9 as Yn,D9 as Zn,nPe as _n,uPe as $n,yf as ao,Ne as bo,Bf as co,ht as do,H1 as eo,Dl as fo,W1 as go,z1 as ho,KOe as io,qOe as jo,C_ as ko,Og as lo,v_ as mo,KL as no,A2e as oo,ZL as po,rB as qo,Fu as ro,_oe as so,Roe as to,V2e as uo,sre as vo,dre as wo,Cte as xo,OB as yo,vte as zo,bi as Ao,nHe as Bo,sHe as Co,_5e as Do};
|